[Pkg-ceph-commits] [ceph] 01/01: Imported Upstream version 0.80.8

Gaudenz Steinlin gaudenz at moszumanska.debian.org
Mon May 4 16:31:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

gaudenz pushed a commit to annotated tag upstream/0.80.8
in repository ceph.

commit 186f3ad903d74558770df451d37ffd7fc74c2e54
Author: Gaudenz Steinlin <gaudenz at debian.org>
Date:   Fri Jan 30 22:42:52 2015 +0100

    Imported Upstream version 0.80.8
---
 AUTHORS                                            |   294 +-
 COPYING                                            |    15 +-
 ChangeLog                                          | 32689 -------------------
 INSTALL                                            |    10 +-
 Makefile.am                                        |    23 -
 Makefile.in                                        |    58 +-
 README                                             |   154 +-
 aclocal.m4                                         |    41 -
 autogen.sh                                         |    16 +-
 ceph.spec                                          |   123 +-
 ceph.spec.in                                       |   121 +-
 configure                                          |   882 +-
 configure.ac                                       |   183 +-
 m4/ax_cxx_compile_stdcxx_11.m4                     |   142 -
 man/Makefile.am                                    |     5 +-
 man/Makefile.in                                    |    12 +-
 man/mkcephfs.8                                     |   164 +
 man/rados.8                                        |    11 +-
 man/rbd-replay-prep.8                              |    98 -
 man/rbd-replay.8                                   |   132 -
 man/rbd.8                                          |     2 +-
 src/.git_version                                   |     4 +-
 src/Makefile-env.am                                |    11 -
 src/Makefile.am                                    |   415 +-
 src/Makefile.in                                    |  4055 +--
 src/acconfig.h.in                                  |    27 -
 src/auth/Auth.h                                    |     4 +-
 src/auth/Crypto.h                                  |     2 +-
 src/auth/cephx/CephxKeyServer.h                    |     6 +-
 src/auth/cephx/CephxProtocol.h                     |    18 +-
 src/bash_completion/ceph                           |    29 +-
 src/bash_completion/rados                          |     2 +-
 src/bash_completion/rbd                            |    10 +-
 src/brag/client/ceph-brag                          |    23 +-
 src/brag/server/ceph_brag/controllers/root.py      |     6 +-
 src/ceph-disk                                      |   110 +-
 src/ceph-osd-prestart.sh                           |    50 -
 src/ceph.in                                        |    31 +-
 src/ceph_fuse.cc                                   |    12 +-
 src/ceph_mds.cc                                    |    93 +-
 src/ceph_mon.cc                                    |   149 +-
 src/ceph_osd.cc                                    |     9 +-
 src/cephfs.cc                                      |     9 +-
 src/client/Client.cc                               |   880 +-
 src/client/Client.h                                |    60 +-
 src/client/ClientSnapRealm.h                       |     2 +-
 src/client/Dentry.h                                |     2 +-
 src/client/Dir.h                                   |     2 +-
 src/client/Fh.h                                    |     2 +-
 src/client/Inode.cc                                |     3 +-
 src/client/Inode.h                                 |     5 +-
 src/client/MetaRequest.h                           |     5 +-
 src/client/MetaSession.h                           |     2 +-
 src/client/ObjecterWriteback.h                     |    22 +-
 src/client/SyntheticClient.cc                      |    18 +-
 src/client/fuse_ll.cc                              |    55 +-
 src/client/fuse_ll.h                               |     3 -
 src/cls/rbd/cls_rbd.cc                             |    12 +-
 src/cls/replica_log/cls_replica_log_types.h        |     2 +-
 src/cls/rgw/cls_rgw.cc                             |     4 +-
 src/cls/rgw/cls_rgw_client.cc                      |     2 +-
 src/common/AsyncReserver.h                         |    47 +-
 src/common/BackTrace.cc                            |     2 +-
 src/common/Finisher.cc                             |     3 -
 src/common/Finisher.h                              |    21 +-
 src/common/Formatter.cc                            |    75 +-
 src/common/Formatter.h                             |    12 +-
 src/common/LogClient.cc                            |    93 +-
 src/common/LogClient.h                             |   130 +-
 src/common/LogEntry.cc                             |    46 +-
 src/common/LogEntry.h                              |    15 +-
 src/common/Makefile.am                             |    15 +-
 src/common/Mutex.cc                                |    18 +-
 src/common/Mutex.h                                 |     7 +-
 src/common/RWLock.h                                |   137 +-
 src/common/RefCountedObj.h                         |    34 +-
 src/common/TextTable.h                             |     2 +-
 src/common/Thread.h                                |     1 -
 src/common/Timer.cc                                |   191 -
 src/common/Timer.h                                 |    73 -
 src/common/TrackedOp.cc                            |   201 +-
 src/common/TrackedOp.h                             |    80 +-
 src/common/WorkQueue.cc                            |   142 -
 src/common/WorkQueue.h                             |   108 +-
 src/common/addr_parsing.c                          |     6 +-
 src/common/admin_socket.cc                         |     6 +
 src/common/admin_socket.h                          |     2 +-
 src/common/assert.cc                               |    69 -
 src/common/bloom_filter.hpp                        |    66 +
 src/common/buffer.cc                               |   115 +-
 src/common/ceph_context.cc                         |    38 +-
 src/common/ceph_crypto_cms.cc                      |     2 +-
 src/common/ceph_json.cc                            |     4 +-
 src/common/ceph_json.h                             |     2 +-
 src/common/code_environment.h                      |     1 -
 src/common/common_init.cc                          |     1 -
 src/common/config.cc                               |    41 +-
 src/common/config.h                                |     9 +-
 src/common/config_opts.h                           |   125 +-
 src/common/crc32c_intel_fast_asm.S                 |     2 +
 src/common/crc32c_intel_fast_zero_asm.S            |     2 +
 src/common/dummy.cc                                |    20 -
 src/common/entity_name.h                           |     2 +-
 src/common/fd.cc                                   |     2 +-
 src/common/hobject.cc                              |    40 +-
 src/common/hobject.h                               |    18 +-
 src/common/lockdep.cc                              |     2 +-
 src/common/map_cacher.hpp                          |     2 +-
 src/common/module.c                                |    75 -
 src/common/module.h                                |    27 -
 src/common/obj_bencher.h                           |     2 +-
 src/common/perf_counters.cc                        |    84 +-
 src/common/perf_counters.h                         |    43 +-
 src/common/shared_cache.hpp                        |   109 +-
 src/common/simple_cache.hpp                        |    10 -
 src/common/str_map.cc                              |    98 +-
 src/common/sync_filesystem.h                       |     2 +-
 src/common/types.cc                                |    32 -
 src/crush/CrushWrapper.cc                          |    45 +-
 src/crush/CrushWrapper.h                           |    12 +-
 src/crush/builder.c                                |    24 +-
 src/crush/mapper.c                                 |     8 +-
 src/erasure-code/ErasureCode.cc                    |   261 -
 src/erasure-code/ErasureCode.h                     |    97 -
 src/erasure-code/ErasureCodeInterface.h            |    72 +-
 src/erasure-code/ErasureCodePlugin.cc              |    64 +-
 src/erasure-code/ErasureCodePlugin.h               |     9 +-
 src/erasure-code/Makefile.am                       |     9 -
 src/erasure-code/isa/ErasureCodeIsa.cc             |   439 -
 src/erasure-code/isa/ErasureCodeIsa.h              |   164 -
 src/erasure-code/isa/ErasureCodeIsaTableCache.cc   |   327 -
 src/erasure-code/isa/ErasureCodeIsaTableCache.h    |   105 -
 src/erasure-code/isa/ErasureCodePluginIsa.cc       |    81 -
 src/erasure-code/isa/Makefile.am                   |    58 -
 src/erasure-code/isa/isa-l/erasure_code/ec_base.c  |   320 -
 src/erasure-code/isa/isa-l/erasure_code/ec_base.h  |  6680 ----
 .../isa/isa-l/erasure_code/ec_highlevel_func.c     |   152 -
 .../isa/isa-l/erasure_code/ec_multibinary.asm.s    |   266 -
 .../isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s |   234 -
 .../erasure_code/gf_2vect_dot_prod_avx2.asm.s      |   246 -
 .../isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s |   236 -
 .../isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s |   258 -
 .../erasure_code/gf_3vect_dot_prod_avx2.asm.s      |   271 -
 .../isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s |   259 -
 .../isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s |   296 -
 .../erasure_code/gf_4vect_dot_prod_avx2.asm.s      |   305 -
 .../isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s |   296 -
 .../isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s |   311 -
 .../erasure_code/gf_5vect_dot_prod_avx2.asm.s      |   323 -
 .../isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s |   312 -
 .../isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s |   323 -
 .../erasure_code/gf_6vect_dot_prod_avx2.asm.s      |   334 -
 .../isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s |   323 -
 .../isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s  |   198 -
 .../isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s |   203 -
 .../isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s  |   195 -
 .../isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s   |   172 -
 .../isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s   |   178 -
 src/erasure-code/isa/isa-l/include/erasure_code.h  |   659 -
 src/erasure-code/isa/isa-l/include/gf_vect_mul.h   |   148 -
 src/erasure-code/isa/isa-l/include/reg_sizes.asm   |    96 -
 src/erasure-code/isa/isa-l/include/types.h         |    80 -
 src/erasure-code/isa/xor_op.cc                     |   179 -
 src/erasure-code/isa/xor_op.h                      |    88 -
 src/erasure-code/jerasure/ErasureCodeJerasure.cc   |   370 +-
 src/erasure-code/jerasure/ErasureCodeJerasure.h    |   113 +-
 .../jerasure/ErasureCodePluginJerasure.cc          |    20 +-
 .../jerasure/ErasureCodePluginSelectJerasure.cc    |    63 +-
 src/erasure-code/jerasure/Makefile.am              |    31 +-
 .../jerasure/jerasure/include/galois.h             |     1 -
 src/erasure-code/jerasure/jerasure/src/galois.c    |    47 +-
 src/erasure-code/lrc/ErasureCodeLrc.cc             |   838 -
 src/erasure-code/lrc/ErasureCodeLrc.h              |   141 -
 src/erasure-code/lrc/ErasureCodePluginLrc.cc       |    60 -
 src/erasure-code/lrc/Makefile.am                   |    21 -
 src/global/signal_handler.cc                       |    38 +-
 src/include/CompatSet.h                            |    30 +-
 src/include/Context.h                              |   152 +-
 src/include/Makefile.am                            |     9 +-
 src/include/assert.h                               |     8 -
 src/include/buffer.h                               |    16 +-
 src/include/ceph_features.h                        |     2 -
 src/include/cmp.h                                  |    22 -
 src/include/dlist.h                                |   127 +
 src/include/encoding.h                             |    22 +-
 src/include/frag.h                                 |    51 +-
 src/include/int_types.h                            |    12 +-
 src/include/krbd.h                                 |    45 -
 src/include/linux_fiemap.h                         |     2 +
 src/include/lru.h                                  |    15 +-
 src/include/object.h                               |     3 +
 src/include/rados.h                                |    21 -
 src/include/rados/buffer.h                         |    16 +-
 src/include/rados/librados.h                       |    31 +-
 src/include/rados/librados.hpp                     |    16 +-
 src/include/radosstriper/libradosstriper.h         |   574 -
 src/include/radosstriper/libradosstriper.hpp       |   224 -
 src/include/rbd/librbd.h                           |     2 +-
 src/include/rbd/librbd.hpp                         |     5 +-
 src/include/str_map.h                              |   106 +-
 src/include/stringify.h                            |     2 +-
 src/include/types.h                                |    24 +-
 src/include/utime.h                                |     2 +
 src/include/xlist.h                                |    25 +-
 src/init-ceph.in                                   |    11 +-
 src/init-radosgw.sysv                              |     2 +-
 src/init-rbdmap                                    |    91 +-
 src/java/Makefile.in                               |     7 -
 src/java/native/libcephfs_jni.cc                   |    18 +-
 src/json_spirit/Makefile.am                        |     1 -
 src/key_value_store/cls_kvs.cc                     |     4 +-
 src/key_value_store/key_value_structure.h          |     2 +-
 src/key_value_store/kv_flat_btree_async.cc         |     1 +
 src/krbd.cc                                        |   639 -
 src/libcephfs.cc                                   |     6 +-
 src/librados/AioCompletionImpl.h                   |     2 -
 src/librados/IoCtxImpl.cc                          |   252 +-
 src/librados/IoCtxImpl.h                           |    62 +-
 src/librados/Makefile.am                           |    10 +-
 src/librados/RadosClient.cc                        |   391 +-
 src/librados/RadosClient.h                         |    22 +-
 src/librados/RadosXattrIter.cc                     |    27 -
 src/librados/RadosXattrIter.h                      |    38 -
 src/librados/librados.cc                           |   814 +-
 src/libradosstriper/Makefile.am                    |    19 -
 src/libradosstriper/MultiAioCompletionImpl.cc      |    61 -
 src/libradosstriper/MultiAioCompletionImpl.h       |   181 -
 src/libradosstriper/RadosStriperImpl.cc            |  1060 -
 src/libradosstriper/RadosStriperImpl.h             |   319 -
 src/libradosstriper/libradosstriper.cc             |   613 -
 src/librbd/AioCompletion.cc                        |    60 -
 src/librbd/AioCompletion.h                         |    44 +-
 src/librbd/ImageCtx.cc                             |   178 +-
 src/librbd/ImageCtx.h                              |    17 +-
 src/librbd/Makefile.am                             |     5 -
 src/librbd/SnapInfo.h                              |     6 +-
 src/librbd/internal.cc                             |   103 +-
 src/librbd/librbd.cc                               |   243 +-
 src/libs3/GNUmakefile                              |    19 +-
 src/libs3/inc/util.h                               |     2 +-
 src/libs3/src/general.c                            |     2 +-
 src/libs3/src/request.c                            |     2 +-
 src/libs3/src/s3.c                                 |     8 +-
 src/log/Log.cc                                     |    37 +-
 src/log/Log.h                                      |    11 -
 src/log/test.cc                                    |    22 -
 src/mds/Anchor.cc                                  |    64 +
 src/mds/Anchor.h                                   |    55 +
 src/mds/AnchorClient.cc                            |   129 +
 src/mds/AnchorClient.h                             |    46 +
 src/mds/AnchorServer.cc                            |   351 +
 src/mds/AnchorServer.h                             |    87 +
 src/mds/Beacon.cc                                  |   353 -
 src/mds/Beacon.h                                   |   108 -
 src/mds/CDentry.cc                                 |    29 +-
 src/mds/CDentry.h                                  |    29 +-
 src/mds/CDir.cc                                    |   255 +-
 src/mds/CDir.h                                     |    93 +-
 src/mds/CInode.cc                                  |   332 +-
 src/mds/CInode.h                                   |   186 +-
 src/mds/Capability.h                               |    22 +-
 src/{tools/cephfs => mds}/Dumper.cc                |   177 +-
 src/{tools/cephfs => mds}/Dumper.h                 |    12 +-
 src/mds/InoTable.cc                                |    11 +-
 src/mds/JournalPointer.cc                          |   112 -
 src/mds/JournalPointer.h                           |    86 -
 src/mds/LocalLock.h                                |     2 +-
 src/mds/Locker.cc                                  |   326 +-
 src/mds/Locker.h                                   |    51 +-
 src/mds/LogEvent.cc                                |    67 +-
 src/mds/LogEvent.h                                 |    28 +-
 src/mds/LogSegment.h                               |    12 +-
 src/mds/MDBalancer.cc                              |    26 +-
 src/mds/MDBalancer.h                               |     1 +
 src/mds/MDCache.cc                                 |  1625 +-
 src/mds/MDCache.h                                  |   157 +-
 src/mds/MDLog.cc                                   |   797 +-
 src/mds/MDLog.h                                    |   142 +-
 src/mds/MDS.cc                                     |   975 +-
 src/mds/MDS.h                                      |   229 +-
 src/mds/MDSContext.cc                              |    62 -
 src/mds/MDSContext.h                               |   139 -
 src/mds/MDSMap.cc                                  |    95 +-
 src/mds/MDSMap.h                                   |   180 +-
 src/mds/MDSTable.cc                                |    39 +-
 src/mds/MDSTable.h                                 |    13 +-
 src/mds/MDSTableClient.cc                          |    17 +-
 src/mds/MDSTableClient.h                           |    23 +-
 src/mds/MDSTableServer.cc                          |    25 +-
 src/mds/MDSTableServer.h                           |    20 +-
 src/{tools/cephfs => mds}/MDSUtility.cc            |    48 +-
 src/{tools/cephfs => mds}/MDSUtility.h             |     4 +-
 src/mds/Makefile.am                                |    22 +-
 src/mds/Migrator.cc                                |   213 +-
 src/mds/Migrator.h                                 |    11 +-
 src/mds/Mutation.cc                                |    74 +-
 src/mds/Mutation.h                                 |   118 +-
 src/mds/RecoveryQueue.cc                           |   171 -
 src/mds/RecoveryQueue.h                            |    44 -
 src/{tools/cephfs => mds}/Resetter.cc              |    60 +-
 src/{tools/cephfs => mds}/Resetter.h               |    11 +-
 src/mds/ScatterLock.h                              |     8 -
 src/mds/Server.cc                                  |   970 +-
 src/mds/Server.h                                   |    28 +-
 src/mds/SessionMap.cc                              |   177 +-
 src/mds/SessionMap.h                               |    81 +-
 src/mds/SimpleLock.h                               |    23 +-
 src/mds/SnapClient.h                               |     8 +-
 src/mds/SnapRealm.cc                               |     6 +-
 src/mds/SnapRealm.h                                |     5 +-
 src/mds/SnapServer.cc                              |    29 +-
 src/mds/events/EExport.h                           |     2 -
 src/mds/events/EFragment.h                         |     2 -
 src/mds/events/EImportStart.h                      |     2 -
 src/mds/events/EMetaBlob.h                         |   128 +-
 src/mds/events/ENoOp.h                             |    34 -
 src/mds/events/EOpen.h                             |     2 -
 src/mds/events/ESession.h                          |    12 +-
 src/mds/events/ESlaveUpdate.h                      |     2 -
 src/mds/events/ESubtreeMap.h                       |     5 +-
 src/mds/events/EUpdate.h                           |     3 -
 src/mds/flock.cc                                   |     3 +-
 src/mds/journal.cc                                 |   560 +-
 src/mds/mds_table_types.h                          |     4 +-
 src/mds/mdstypes.cc                                |    44 +-
 src/mds/mdstypes.h                                 |   111 +-
 src/mds/snap.h                                     |     3 +-
 src/messages/MBackfillReserve.h                    |     6 +-
 src/messages/MClientReply.h                        |     3 +
 src/messages/MClientRequest.h                      |    19 +-
 src/messages/MClientSession.h                      |    22 +-
 src/messages/MDiscover.h                           |    15 +-
 src/messages/MDiscoverReply.h                      |    30 +-
 src/messages/MExportDirNotify.h                    |     2 +
 src/messages/MExportDirNotifyAck.h                 |     2 +
 src/messages/MLogAck.h                             |     6 +-
 src/messages/MMDSBeacon.h                          |   123 +-
 src/messages/MMDSCacheRejoin.h                     |     4 +
 src/messages/MMDSFragmentNotify.h                  |     2 +
 src/messages/MMDSSlaveRequest.h                    |     9 +-
 src/messages/MMonElection.h                        |     2 +-
 src/messages/MOSDMarkMeDown.h                      |    27 +-
 src/messages/MOSDOp.h                              |    16 +-
 src/messages/MOSDOpReply.h                         |    17 +-
 src/messages/MOSDPGBackfill.h                      |     2 +-
 src/messages/MOSDPGLog.h                           |     4 +-
 src/messages/MOSDPGPull.h                          |     4 +-
 src/messages/MOSDPGPush.h                          |     4 +-
 src/messages/MOSDPGPushReply.h                     |     4 +-
 src/messages/MOSDPGQuery.h                         |     2 +-
 src/messages/MOSDPGRemove.h                        |     2 +-
 src/messages/MOSDPGScan.h                          |     4 +-
 src/messages/MOSDPGTemp.h                          |     2 +-
 src/messages/MOSDPGTrim.h                          |     2 +-
 src/messages/MOSDRepScrub.h                        |     2 +-
 src/messages/MOSDSubOp.h                           |     4 +-
 src/messages/MOSDSubOpReply.h                      |     4 +-
 src/messages/MPGStats.h                            |     2 +-
 src/messages/MRecoveryReserve.h                    |     2 +-
 src/messages/MWatchNotify.h                        |    34 +-
 src/mkcephfs.in                                    |   564 +
 src/mon/AuthMonitor.cc                             |    23 +-
 src/mon/AuthMonitor.h                              |    20 +-
 src/mon/ConfigKeyService.cc                        |     7 +-
 src/mon/DataHealthService.cc                       |     6 +-
 src/mon/Elector.cc                                 |    12 +-
 src/mon/LogMonitor.cc                              |   178 +-
 src/mon/LogMonitor.h                               |   109 +-
 src/mon/MDSMonitor.cc                              |   579 +-
 src/mon/MDSMonitor.h                               |    25 +-
 src/mon/MonCap.cc                                  |    19 -
 src/mon/MonClient.cc                               |    40 +-
 src/mon/MonCommands.h                              |    45 +-
 src/mon/MonMap.cc                                  |     2 +-
 src/mon/Monitor.cc                                 |   815 +-
 src/mon/Monitor.h                                  |   145 +-
 src/mon/MonitorDBStore.h                           |   152 +-
 src/mon/MonmapMonitor.cc                           |    12 +-
 src/mon/MonmapMonitor.h                            |     4 +-
 src/mon/OSDMonitor.cc                              |   780 +-
 src/mon/OSDMonitor.h                               |    22 +-
 src/mon/PGMap.cc                                   |   113 +-
 src/mon/PGMap.h                                    |    20 -
 src/mon/PGMonitor.cc                               |    99 +-
 src/mon/PGMonitor.h                                |     4 +-
 src/mon/Paxos.cc                                   |   278 +-
 src/mon/Paxos.h                                    |    54 +-
 src/mon/PaxosService.cc                            |    33 +-
 src/mon/PaxosService.h                             |    28 +-
 src/mon/Session.h                                  |     9 +-
 src/mon/mon_types.h                                |     6 +-
 src/mount/mount.ceph.c                             |    42 +-
 src/msg/Accepter.cc                                |     3 +
 src/msg/Connection.h                               |   183 -
 src/msg/DispatchQueue.cc                           |   120 +-
 src/msg/DispatchQueue.h                            |    24 -
 src/msg/Dispatcher.h                               |    97 +-
 src/msg/Makefile.am                                |     4 -
 src/msg/Message.cc                                 |     6 +-
 src/msg/Message.h                                  |   182 +-
 src/msg/Messenger.h                                |   193 +-
 src/msg/Pipe.cc                                    |   136 +-
 src/msg/Pipe.h                                     |    44 +-
 src/msg/PipeConnection.cc                          |    91 -
 src/msg/PipeConnection.h                           |    57 -
 src/msg/SimpleMessenger.cc                         |   181 +-
 src/msg/SimpleMessenger.h                          |   105 +-
 src/msg/SimplePolicyMessenger.h                    |   114 -
 src/msg/msg_types.h                                |     7 +
 src/ocf/Makefile.in                                |     7 -
 src/os/BtrfsFileStoreBackend.cc                    |     3 +-
 src/os/BtrfsFileStoreBackend.h                     |     5 +-
 src/os/CollectionIndex.h                           |    34 +-
 src/os/DBObjectMap.cc                              |   148 +-
 src/os/DBObjectMap.h                               |   108 +-
 src/os/FDCache.h                                   |    31 +-
 src/os/FileJournal.cc                              |     2 +-
 src/os/FileJournal.h                               |     5 +-
 src/os/FileStore.cc                                |  1360 +-
 src/os/FileStore.h                                 |    77 +-
 src/os/FlatIndex.cc                                |     6 +-
 src/os/FlatIndex.h                                 |    10 +-
 src/os/GenericFileStoreBackend.h                   |     7 +-
 src/os/GenericObjectMap.cc                         |    13 +-
 src/os/GenericObjectMap.h                          |     5 +-
 src/os/HashIndex.cc                                |   150 +-
 src/os/HashIndex.h                                 |    45 +-
 src/os/IndexManager.cc                             |    56 +-
 src/os/IndexManager.h                              |    49 +-
 src/os/JournalingObjectStore.cc                    |     9 +-
 src/os/JournalingObjectStore.h                     |     1 -
 src/os/KeyValueDB.cc                               |    45 -
 src/os/KeyValueDB.h                                |    20 +-
 src/os/KeyValueStore.cc                            |   507 +-
 src/os/KeyValueStore.h                             |    99 +-
 src/os/KineticStore.cc                             |   309 -
 src/os/KineticStore.h                              |   159 -
 src/os/LFNIndex.cc                                 |    17 +-
 src/os/LFNIndex.h                                  |    25 +-
 src/os/LevelDBStore.cc                             |    10 -
 src/os/LevelDBStore.h                              |    19 +-
 src/os/Makefile.am                                 |    26 -
 src/os/MemStore.cc                                 |   257 +-
 src/os/MemStore.h                                  |     9 +-
 src/os/ObjectStore.cc                              |     6 +-
 src/os/ObjectStore.h                               |    87 +-
 src/os/RocksDBStore.cc                             |   512 -
 src/os/RocksDBStore.h                              |   333 -
 src/os/Transaction.cc                              |   211 +-
 src/os/WBThrottle.cc                               |     3 -
 src/os/XfsFileStoreBackend.cc                      |    13 +-
 src/os/XfsFileStoreBackend.h                       |     5 +-
 src/os/chain_xattr.cc                              |    32 +-
 src/osd/ClassHandler.cc                            |     9 +-
 src/osd/ECBackend.cc                               |    72 +-
 src/osd/ECBackend.h                                |     8 +-
 src/osd/ECMsgTypes.cc                              |    16 +-
 src/osd/ECUtil.h                                   |     8 +-
 src/osd/HitSet.h                                   |     4 +-
 src/osd/Makefile.am                                |     7 -
 src/osd/OSD.cc                                     |  3467 +-
 src/osd/OSD.h                                      |   651 +-
 src/osd/OSDMap.cc                                  |    78 +-
 src/osd/OSDMap.h                                   |    64 +-
 src/osd/OpRequest.cc                               |    69 +-
 src/osd/OpRequest.h                                |    47 +-
 src/osd/PG.cc                                      |   732 +-
 src/osd/PG.h                                       |   106 +-
 src/osd/PGBackend.cc                               |     3 +-
 src/osd/PGBackend.h                                |    11 +-
 src/osd/PGLog.cc                                   |    16 +-
 src/osd/PGLog.h                                    |     2 +-
 src/osd/ReplicatedBackend.cc                       |     6 +-
 src/osd/ReplicatedPG.cc                            |   470 +-
 src/osd/ReplicatedPG.h                             |    22 +-
 src/osd/SnapMapper.cc                              |    16 +-
 src/osd/SnapMapper.h                               |     4 +-
 src/osd/Watch.cc                                   |    28 +-
 src/osd/Watch.h                                    |     1 -
 src/osd/osd_types.cc                               |   274 +-
 src/osd/osd_types.h                                |   123 +-
 src/osdc/Blinker.h                                 |    92 +
 src/osdc/Filer.cc                                  |   115 +-
 src/osdc/Filer.h                                   |     5 +-
 src/osdc/Journaler.cc                              |   508 +-
 src/osdc/Journaler.h                               |   274 +-
 src/osdc/Makefile.am                               |     1 +
 src/osdc/ObjectCacher.cc                           |   101 +-
 src/osdc/ObjectCacher.h                            |    17 +-
 src/osdc/Objecter.cc                               |  2124 +-
 src/osdc/Objecter.h                                |   385 +-
 src/osdc/Striper.cc                                |     6 +-
 src/osdc/Striper.h                                 |     8 +-
 src/pybind/ceph_argparse.py                        |     4 +-
 src/pybind/ceph_rest_api.py                        |     2 +-
 src/pybind/cephfs.py                               |     2 +-
 src/pybind/rados.py                                |    78 +-
 src/pybind/rbd.py                                  |     2 +-
 src/rbd.cc                                         |   737 +-
 src/rbd_fuse/rbd-fuse.c                            |    51 +-
 src/rbd_replay/BoundedBuffer.hpp                   |    60 -
 src/rbd_replay/Deser.cc                            |    67 -
 src/rbd_replay/Deser.hpp                           |    47 -
 src/rbd_replay/ImageNameMap.cc                     |    69 -
 src/rbd_replay/ImageNameMap.hpp                    |    40 -
 src/rbd_replay/Makefile.am                         |    53 -
 src/rbd_replay/PendingIO.cc                        |    44 -
 src/rbd_replay/PendingIO.hpp                       |    55 -
 src/rbd_replay/Replayer.cc                         |   310 -
 src/rbd_replay/Replayer.hpp                        |   155 -
 src/rbd_replay/Ser.cc                              |    53 -
 src/rbd_replay/Ser.hpp                             |    45 -
 src/rbd_replay/actions.cc                          |   380 -
 src/rbd_replay/actions.hpp                         |   307 -
 src/rbd_replay/ios.cc                              |   273 -
 src/rbd_replay/ios.hpp                             |   334 -
 src/rbd_replay/rbd-replay-prep.cc                  |   486 -
 src/rbd_replay/rbd-replay.cc                       |   116 -
 src/rbd_replay/rbd_loc.cc                          |   130 -
 src/rbd_replay/rbd_loc.hpp                         |    46 -
 src/rbd_replay/rbd_replay_debug.hpp                |    34 -
 src/rgw/Makefile.am                                |     3 +-
 src/rgw/rgw_acl.cc                                 |     3 -
 src/rgw/rgw_acl.h                                  |     3 -
 src/rgw/rgw_acl_s3.cc                              |     3 -
 src/rgw/rgw_acl_s3.h                               |     3 -
 src/rgw/rgw_acl_swift.cc                           |     2 -
 src/rgw/rgw_acl_swift.h                            |     5 +-
 src/rgw/rgw_admin.cc                               |   230 +-
 src/rgw/rgw_auth_s3.cc                             |     2 -
 src/rgw/rgw_auth_s3.h                              |     3 -
 src/rgw/rgw_bucket.cc                              |    21 +-
 src/rgw/rgw_bucket.h                               |    36 +-
 src/rgw/rgw_cache.cc                               |    94 +-
 src/rgw/rgw_cache.h                                |    48 +-
 src/rgw/rgw_civetweb.cc                            |     4 +-
 src/rgw/rgw_civetweb.h                             |     3 -
 src/rgw/rgw_civetweb_log.cc                        |     7 +-
 src/rgw/rgw_civetweb_log.h                         |     1 -
 src/rgw/rgw_client_io.cc                           |     2 -
 src/rgw/rgw_client_io.h                            |     3 -
 src/rgw/rgw_common.cc                              |     7 +-
 src/rgw/rgw_common.h                               |    20 +-
 src/rgw/rgw_cors_s3.cc                             |     2 +-
 src/rgw/rgw_dencoder.cc                            |     2 -
 src/rgw/rgw_env.cc                                 |     3 -
 src/rgw/rgw_fcgi.cc                                |     5 +-
 src/rgw/rgw_fcgi.h                                 |     3 -
 src/rgw/rgw_formats.cc                             |     9 +-
 src/rgw/rgw_formats.h                              |     8 +-
 src/rgw/rgw_gc.cc                                  |     6 +-
 src/rgw/rgw_gc.h                                   |     3 -
 src/rgw/rgw_http_client.cc                         |     3 -
 src/rgw/rgw_http_client.h                          |     3 -
 src/rgw/rgw_http_errors.h                          |     3 -
 src/rgw/rgw_json_enc.cc                            |     2 -
 src/rgw/rgw_jsonparser.cc                          |     3 -
 src/rgw/rgw_keystone.cc                            |     3 -
 src/rgw/rgw_keystone.h                             |     9 +-
 src/rgw/rgw_loadgen.cc                             |     2 -
 src/rgw/rgw_loadgen.h                              |     3 -
 src/rgw/rgw_log.cc                                 |     3 -
 src/rgw/rgw_log.h                                  |     3 -
 src/rgw/rgw_main.cc                                |    34 +-
 src/rgw/rgw_metadata.cc                            |     7 +-
 src/rgw/rgw_metadata.h                             |     3 -
 src/rgw/rgw_multi.cc                               |     3 -
 src/rgw/rgw_multi.h                                |     3 -
 src/rgw/rgw_multi_del.cc                           |     3 -
 src/rgw/rgw_multi_del.h                            |     5 +-
 src/rgw/rgw_multiparser.cc                         |     3 -
 src/rgw/rgw_op.cc                                  |    24 +-
 src/rgw/rgw_op.h                                   |    13 -
 src/rgw/rgw_policy_s3.cc                           |     2 -
 src/rgw/rgw_policy_s3.h                            |     3 -
 src/rgw/rgw_quota.cc                               |     7 +-
 src/rgw/rgw_quota.h                                |     2 +-
 src/rgw/rgw_rados.cc                               |   129 +-
 src/rgw/rgw_rados.h                                |   128 +-
 src/rgw/rgw_replica_log.cc                         |     2 -
 src/rgw/rgw_replica_log.h                          |     2 -
 src/rgw/rgw_resolve.cc                             |     5 +-
 src/rgw/rgw_resolve.h                              |     3 -
 src/rgw/rgw_rest.cc                                |    20 +-
 src/rgw/rgw_rest.h                                 |     3 -
 src/rgw/rgw_rest_admin.h                           |     3 -
 src/rgw/rgw_rest_bucket.cc                         |    14 +-
 src/rgw/rgw_rest_bucket.h                          |     3 -
 src/rgw/rgw_rest_client.cc                         |    15 +-
 src/rgw/rgw_rest_client.h                          |     3 -
 src/rgw/rgw_rest_conn.cc                           |    21 +-
 src/rgw/rgw_rest_conn.h                            |     3 -
 src/rgw/rgw_rest_metadata.cc                       |     2 +-
 src/rgw/rgw_rest_s3.cc                             |    24 +-
 src/rgw/rgw_rest_s3.h                              |    11 -
 src/rgw/rgw_rest_swift.cc                          |     2 -
 src/rgw/rgw_rest_swift.h                           |     3 -
 src/rgw/rgw_rest_usage.cc                          |     7 +-
 src/rgw/rgw_rest_usage.h                           |     3 -
 src/rgw/rgw_rest_user.cc                           |    16 +-
 src/rgw/rgw_rest_user.h                            |     3 -
 src/rgw/rgw_string.h                               |     3 -
 src/rgw/rgw_swift.cc                               |     5 +-
 src/rgw/rgw_swift.h                                |     3 -
 src/rgw/rgw_swift_auth.cc                          |     3 -
 src/rgw/rgw_swift_auth.h                           |     3 -
 src/rgw/rgw_tools.cc                               |     8 +-
 src/rgw/rgw_tools.h                                |     6 +-
 src/rgw/rgw_usage.cc                               |     2 -
 src/rgw/rgw_usage.h                                |     3 -
 src/rgw/rgw_user.cc                                |    64 +-
 src/rgw/rgw_user.h                                 |   109 +-
 src/rgw/rgw_xml.cc                                 |     5 +-
 src/rgw/rgw_xml.h                                  |     3 -
 src/rocksdb/.arcconfig                             |    10 -
 src/rocksdb/.clang-format                          |     5 -
 src/rocksdb/.gitignore                             |    60 -
 src/rocksdb/CONTRIBUTING.md                        |    20 -
 src/rocksdb/HISTORY.md                             |    79 -
 src/rocksdb/INSTALL.md                             |    80 -
 src/rocksdb/LICENSE                                |    35 -
 src/rocksdb/Makefile.am                            |   273 -
 src/rocksdb/PATENTS                                |    23 -
 src/rocksdb/README                                 |    82 -
 src/rocksdb/ROCKSDB_LITE.md                        |    20 -
 src/rocksdb/build_tools/build_detect_platform      |   313 -
 src/rocksdb/build_tools/build_detect_version       |    22 -
 src/rocksdb/build_tools/fbcode.clang31.sh          |    74 -
 src/rocksdb/build_tools/fbcode.gcc471.sh           |    70 -
 src/rocksdb/build_tools/fbcode.gcc481.sh           |    81 -
 src/rocksdb/build_tools/format-diff.sh             |   107 -
 src/rocksdb/build_tools/mac-install-gflags.sh      |    25 -
 src/rocksdb/build_tools/make_new_version.sh        |    46 -
 src/rocksdb/build_tools/regression_build_test.sh   |   330 -
 src/rocksdb/build_tools/valgrind_test.sh           |    15 -
 src/rocksdb/configure.ac                           |    80 -
 src/rocksdb/coverage/coverage_test.sh              |    78 -
 src/rocksdb/coverage/parse_gcov_output.py          |   118 -
 src/rocksdb/db/builder.cc                          |   224 -
 src/rocksdb/db/builder.h                           |    45 -
 src/rocksdb/db/c.cc                                |  1476 -
 src/rocksdb/db/c_test.c                            |   494 -
 src/rocksdb/db/column_family.cc                    |   583 -
 src/rocksdb/db/column_family.h                     |   418 -
 src/rocksdb/db/column_family_test.cc               |   977 -
 src/rocksdb/db/compaction.cc                       |   261 -
 src/rocksdb/db/compaction.h                        |   151 -
 src/rocksdb/db/compaction_picker.cc                |   889 -
 src/rocksdb/db/compaction_picker.h                 |   165 -
 src/rocksdb/db/corruption_test.cc                  |   440 -
 src/rocksdb/db/db_bench.cc                         |  2616 --
 src/rocksdb/db/db_filesnapshot.cc                  |   172 -
 src/rocksdb/db/db_impl.cc                          |  4587 ---
 src/rocksdb/db/db_impl.h                           |   623 -
 src/rocksdb/db/db_impl_debug.cc                    |   132 -
 src/rocksdb/db/db_impl_readonly.cc                 |   154 -
 src/rocksdb/db/db_impl_readonly.h                  |   103 -
 src/rocksdb/db/db_iter.cc                          |   477 -
 src/rocksdb/db/db_iter.h                           |    27 -
 src/rocksdb/db/db_stats_logger.cc                  |    95 -
 src/rocksdb/db/db_test.cc                          |  6764 ----
 src/rocksdb/db/dbformat.cc                         |   169 -
 src/rocksdb/db/dbformat.h                          |   340 -
 src/rocksdb/db/dbformat_test.cc                    |   117 -
 src/rocksdb/db/deletefile_test.cc                  |   295 -
 src/rocksdb/db/file_indexer.cc                     |   202 -
 src/rocksdb/db/file_indexer.h                      |   129 -
 src/rocksdb/db/file_indexer_test.cc                |   330 -
 src/rocksdb/db/filename.cc                         |   261 -
 src/rocksdb/db/filename.h                          |   108 -
 src/rocksdb/db/filename_test.cc                    |   140 -
 src/rocksdb/db/internal_stats.cc                   |   369 -
 src/rocksdb/db/internal_stats.h                    |   187 -
 src/rocksdb/db/log_and_apply_bench.cc              |    79 -
 src/rocksdb/db/log_format.h                        |    35 -
 src/rocksdb/db/log_reader.cc                       |   339 -
 src/rocksdb/db/log_reader.h                        |   130 -
 src/rocksdb/db/log_test.cc                         |   689 -
 src/rocksdb/db/log_writer.cc                       |   108 -
 src/rocksdb/db/log_writer.h                        |    55 -
 src/rocksdb/db/memtable.cc                         |   601 -
 src/rocksdb/db/memtable.h                          |   217 -
 src/rocksdb/db/memtable_list.cc                    |   277 -
 src/rocksdb/db/memtable_list.h                     |   152 -
 src/rocksdb/db/merge_context.h                     |    69 -
 src/rocksdb/db/merge_helper.cc                     |   209 -
 src/rocksdb/db/merge_helper.h                      |   105 -
 src/rocksdb/db/merge_operator.cc                   |    77 -
 src/rocksdb/db/merge_test.cc                       |   472 -
 src/rocksdb/db/perf_context_test.cc                |   358 -
 src/rocksdb/db/plain_table_db_test.cc              |   853 -
 src/rocksdb/db/prefix_test.cc                      |   487 -
 src/rocksdb/db/repair.cc                           |   403 -
 src/rocksdb/db/simple_table_db_test.cc             |   794 -
 src/rocksdb/db/skiplist.h                          |   429 -
 src/rocksdb/db/skiplist_test.cc                    |   383 -
 src/rocksdb/db/snapshot.h                          |    86 -
 src/rocksdb/db/table_cache.cc                      |   197 -
 src/rocksdb/db/table_cache.h                       |    94 -
 src/rocksdb/db/table_properties_collector.cc       |    83 -
 src/rocksdb/db/table_properties_collector.h        |    72 -
 src/rocksdb/db/table_properties_collector_test.cc  |   312 -
 src/rocksdb/db/tailing_iter.cc                     |   221 -
 src/rocksdb/db/tailing_iter.h                      |    97 -
 src/rocksdb/db/transaction_log_impl.cc             |   261 -
 src/rocksdb/db/transaction_log_impl.h              |   120 -
 src/rocksdb/db/version_edit.cc                     |   364 -
 src/rocksdb/db/version_edit.h                      |   176 -
 src/rocksdb/db/version_edit_test.cc                |    65 -
 src/rocksdb/db/version_set.cc                      |  2780 --
 src/rocksdb/db/version_set.h                       |   493 -
 src/rocksdb/db/version_set_test.cc                 |   184 -
 src/rocksdb/db/write_batch.cc                      |   489 -
 src/rocksdb/db/write_batch_internal.h              |   123 -
 src/rocksdb/db/write_batch_test.cc                 |   323 -
 src/rocksdb/doc/doc.css                            |    89 -
 src/rocksdb/doc/index.html                         |   831 -
 src/rocksdb/doc/log_format.txt                     |    75 -
 src/rocksdb/doc/rockslogo.jpg                      |   Bin 137232 -> 0 bytes
 src/rocksdb/doc/rockslogo.png                      |   Bin 61703 -> 0 bytes
 src/rocksdb/hdfs/README                            |    26 -
 src/rocksdb/hdfs/env_hdfs.h                        |   323 -
 src/rocksdb/hdfs/hdfs.h                            |   477 -
 src/rocksdb/hdfs/libhdfs.a                         |   Bin 65218 -> 0 bytes
 src/rocksdb/helpers/memenv/memenv.cc               |   395 -
 src/rocksdb/helpers/memenv/memenv_test.cc          |   231 -
 src/rocksdb/include/rocksdb/c.h                    |   575 -
 src/rocksdb/include/rocksdb/cache.h                |   140 -
 src/rocksdb/include/rocksdb/compaction_filter.h    |   198 -
 src/rocksdb/include/rocksdb/comparator.h           |    67 -
 src/rocksdb/include/rocksdb/db.h                   |   495 -
 src/rocksdb/include/rocksdb/env.h                  |   772 -
 src/rocksdb/include/rocksdb/filter_policy.h        |    74 -
 src/rocksdb/include/rocksdb/flush_block_policy.h   |    58 -
 src/rocksdb/include/rocksdb/iterator.h             |   106 -
 src/rocksdb/include/rocksdb/ldb_tool.h             |    18 -
 src/rocksdb/include/rocksdb/memtablerep.h          |   270 -
 src/rocksdb/include/rocksdb/merge_operator.h       |   182 -
 src/rocksdb/include/rocksdb/options.h              |   930 -
 src/rocksdb/include/rocksdb/perf_context.h         |    75 -
 src/rocksdb/include/rocksdb/slice.h                |   136 -
 src/rocksdb/include/rocksdb/slice_transform.h      |    47 -
 src/rocksdb/include/rocksdb/statistics.h           |   268 -
 src/rocksdb/include/rocksdb/status.h               |   145 -
 src/rocksdb/include/rocksdb/table.h                |   206 -
 src/rocksdb/include/rocksdb/table_properties.h     |   112 -
 src/rocksdb/include/rocksdb/transaction_log.h      |   104 -
 src/rocksdb/include/rocksdb/types.h                |    20 -
 src/rocksdb/include/rocksdb/universal_compaction.h |    83 -
 src/rocksdb/include/rocksdb/version.h              |     6 -
 src/rocksdb/include/rocksdb/write_batch.h          |   158 -
 src/rocksdb/include/utilities/backupable_db.h      |   251 -
 src/rocksdb/include/utilities/db_ttl.h             |    68 -
 src/rocksdb/include/utilities/geo_db.h             |   105 -
 src/rocksdb/include/utilities/stackable_db.h       |   215 -
 src/rocksdb/include/utilities/utility_db.h         |    30 -
 src/rocksdb/java/Makefile                          |    31 -
 src/rocksdb/java/RocksDBSample.java                |   253 -
 src/rocksdb/java/jdb_bench.sh                      |     1 -
 src/rocksdb/java/org/rocksdb/BackupableDB.java     |    80 -
 .../java/org/rocksdb/BackupableDBOptions.java      |    44 -
 src/rocksdb/java/org/rocksdb/BloomFilter.java      |    37 -
 src/rocksdb/java/org/rocksdb/Filter.java           |    32 -
 .../org/rocksdb/HashLinkedListMemTableConfig.java  |    52 -
 .../org/rocksdb/HashSkipListMemTableConfig.java    |    97 -
 src/rocksdb/java/org/rocksdb/HistogramData.java    |    43 -
 src/rocksdb/java/org/rocksdb/HistogramType.java    |    39 -
 src/rocksdb/java/org/rocksdb/Iterator.java         |   138 -
 src/rocksdb/java/org/rocksdb/MemTableConfig.java   |    27 -
 src/rocksdb/java/org/rocksdb/Options.java          |  2355 --
 src/rocksdb/java/org/rocksdb/PlainTableConfig.java |   123 -
 src/rocksdb/java/org/rocksdb/ReadOptions.java      |   130 -
 src/rocksdb/java/org/rocksdb/RocksDB.java          |   376 -
 src/rocksdb/java/org/rocksdb/RocksDBException.java |    23 -
 src/rocksdb/java/org/rocksdb/RocksObject.java      |    35 -
 .../java/org/rocksdb/SkipListMemTableConfig.java   |    15 -
 src/rocksdb/java/org/rocksdb/Statistics.java       |    38 -
 .../java/org/rocksdb/TableFormatConfig.java        |    20 -
 src/rocksdb/java/org/rocksdb/TickerType.java       |   123 -
 .../java/org/rocksdb/VectorMemTableConfig.java     |    40 -
 src/rocksdb/java/org/rocksdb/WriteBatch.java       |   113 -
 src/rocksdb/java/org/rocksdb/WriteBatchTest.java   |   124 -
 src/rocksdb/java/org/rocksdb/WriteOptions.java     |   100 -
 .../java/org/rocksdb/benchmark/DbBenchmark.java    |  1577 -
 .../java/org/rocksdb/test/BackupableDBTest.java    |    41 -
 src/rocksdb/java/org/rocksdb/test/OptionsTest.java |   424 -
 .../java/org/rocksdb/test/ReadOptionsTest.java     |    40 -
 src/rocksdb/java/org/rocksdb/util/Environment.java |    37 -
 src/rocksdb/java/org/rocksdb/util/SizeUnit.java    |    16 -
 src/rocksdb/java/rocksjni/backupablejni.cc         |    85 -
 src/rocksdb/java/rocksjni/filter.cc                |    41 -
 src/rocksdb/java/rocksjni/iterator.cc              |   145 -
 src/rocksdb/java/rocksjni/memtablejni.cc           |    58 -
 src/rocksdb/java/rocksjni/options.cc               |  1807 -
 src/rocksdb/java/rocksjni/portal.h                 |   383 -
 src/rocksdb/java/rocksjni/rocksjni.cc              |   438 -
 src/rocksdb/java/rocksjni/statistics.cc            |    50 -
 src/rocksdb/java/rocksjni/table.cc                 |    25 -
 src/rocksdb/java/rocksjni/write_batch.cc           |   264 -
 src/rocksdb/linters/__phutil_library_init__.php    |     3 -
 src/rocksdb/linters/__phutil_library_map__.php     |    27 -
 .../linters/cpp_linter/ArcanistCpplintLinter.php   |    88 -
 src/rocksdb/linters/cpp_linter/FbcodeCppLinter.php |    99 -
 src/rocksdb/linters/cpp_linter/PfffCppLinter.php   |    68 -
 src/rocksdb/linters/cpp_linter/cpplint.py          |  4767 ---
 .../lint_engine/FacebookFbcodeLintEngine.php       |   147 -
 src/rocksdb/m4/libtool.m4                          |  8001 -----
 src/rocksdb/m4/ltoptions.m4                        |   384 -
 src/rocksdb/m4/ltsugar.m4                          |   123 -
 src/rocksdb/m4/ltversion.m4                        |    23 -
 src/rocksdb/m4/lt~obsolete.m4                      |    98 -
 src/rocksdb/port/README                            |    10 -
 src/rocksdb/port/atomic_pointer.h                  |   157 -
 src/rocksdb/port/likely.h                          |    21 -
 src/rocksdb/port/port.h                            |    22 -
 src/rocksdb/port/port_example.h                    |   133 -
 src/rocksdb/port/port_posix.cc                     |   109 -
 src/rocksdb/port/port_posix.h                      |   488 -
 src/rocksdb/port/stack_trace.cc                    |   132 -
 src/rocksdb/port/stack_trace.h                     |    19 -
 src/rocksdb/port/win/stdint.h                      |    24 -
 src/rocksdb/table/block.cc                         |   307 -
 src/rocksdb/table/block.h                          |    61 -
 src/rocksdb/table/block_based_table_builder.cc     |   689 -
 src/rocksdb/table/block_based_table_builder.h      |    91 -
 src/rocksdb/table/block_based_table_factory.cc     |    60 -
 src/rocksdb/table/block_based_table_factory.h      |    48 -
 src/rocksdb/table/block_based_table_reader.cc      |  1129 -
 src/rocksdb/table/block_based_table_reader.h       |   198 -
 src/rocksdb/table/block_builder.cc                 |   134 -
 src/rocksdb/table/block_builder.h                  |    65 -
 src/rocksdb/table/block_hash_index.cc              |   112 -
 src/rocksdb/table/block_hash_index.h               |    72 -
 src/rocksdb/table/block_hash_index_test.cc         |   117 -
 src/rocksdb/table/block_test.cc                    |   242 -
 src/rocksdb/table/filter_block.cc                  |   187 -
 src/rocksdb/table/filter_block.h                   |    92 -
 src/rocksdb/table/filter_block_test.cc             |   139 -
 src/rocksdb/table/flush_block_policy.cc            |    70 -
 src/rocksdb/table/format.cc                        |   371 -
 src/rocksdb/table/format.h                         |   198 -
 src/rocksdb/table/iter_heap.h                      |    44 -
 src/rocksdb/table/iterator.cc                      |    72 -
 src/rocksdb/table/iterator_wrapper.h               |    64 -
 src/rocksdb/table/merger.cc                        |   301 -
 src/rocksdb/table/merger.h                         |    29 -
 src/rocksdb/table/meta_blocks.cc                   |   266 -
 src/rocksdb/table/meta_blocks.h                    |   127 -
 src/rocksdb/table/plain_table_builder.cc           |   211 -
 src/rocksdb/table/plain_table_builder.h            |    84 -
 src/rocksdb/table/plain_table_factory.cc           |    54 -
 src/rocksdb/table/plain_table_factory.h            |    94 -
 src/rocksdb/table/plain_table_reader.cc            |   767 -
 src/rocksdb/table/plain_table_reader.h             |   265 -
 src/rocksdb/table/table_builder.h                  |    55 -
 src/rocksdb/table/table_properties.cc              |   115 -
 src/rocksdb/table/table_reader.h                   |    66 -
 src/rocksdb/table/table_reader_bench.cc            |   271 -
 src/rocksdb/table/table_test.cc                    |  1805 -
 src/rocksdb/table/two_level_iterator.cc            |   190 -
 src/rocksdb/table/two_level_iterator.h             |    45 -
 src/rocksdb/tools/auto_sanity_test.sh              |    71 -
 src/rocksdb/tools/blob_store_bench.cc              |   280 -
 src/rocksdb/tools/db_crashtest.py                  |   150 -
 src/rocksdb/tools/db_crashtest2.py                 |   168 -
 src/rocksdb/tools/db_repl_stress.cc                |   134 -
 src/rocksdb/tools/db_sanity_test.cc                |   203 -
 src/rocksdb/tools/db_stress.cc                     |  1732 -
 src/rocksdb/tools/ldb.cc                           |    13 -
 src/rocksdb/tools/ldb_test.py                      |   383 -
 src/rocksdb/tools/reduce_levels_test.cc            |   197 -
 src/rocksdb/tools/sst_dump.cc                      |   367 -
 src/rocksdb/util/arena.cc                          |   120 -
 src/rocksdb/util/arena.h                           |   115 -
 src/rocksdb/util/arena_test.cc                     |   133 -
 src/rocksdb/util/auto_roll_logger.cc               |   116 -
 src/rocksdb/util/auto_roll_logger.h                |    91 -
 src/rocksdb/util/auto_roll_logger_test.cc          |   292 -
 src/rocksdb/util/autovector.h                      |   307 -
 src/rocksdb/util/autovector_test.cc                |   294 -
 src/rocksdb/util/benchharness.cc                   |   398 -
 src/rocksdb/util/benchharness.h                    |   357 -
 src/rocksdb/util/benchharness_test.cc              |    67 -
 src/rocksdb/util/blob_store.cc                     |   270 -
 src/rocksdb/util/blob_store.h                      |   163 -
 src/rocksdb/util/blob_store_test.cc                |   200 -
 src/rocksdb/util/bloom.cc                          |   111 -
 src/rocksdb/util/bloom_test.cc                     |   170 -
 src/rocksdb/util/build_version.h                   |    16 -
 src/rocksdb/util/cache.cc                          |   481 -
 src/rocksdb/util/cache_test.cc                     |   449 -
 src/rocksdb/util/coding.cc                         |   169 -
 src/rocksdb/util/coding.h                          |   294 -
 src/rocksdb/util/coding_test.cc                    |   296 -
 src/rocksdb/util/comparator.cc                     |    86 -
 src/rocksdb/util/crc32c.cc                         |   393 -
 src/rocksdb/util/crc32c.h                          |    46 -
 src/rocksdb/util/crc32c_test.cc                    |    77 -
 src/rocksdb/util/dynamic_bloom.cc                  |    53 -
 src/rocksdb/util/dynamic_bloom.h                   |   109 -
 src/rocksdb/util/dynamic_bloom_test.cc             |   202 -
 src/rocksdb/util/env.cc                            |   251 -
 src/rocksdb/util/env_hdfs.cc                       |   523 -
 src/rocksdb/util/env_posix.cc                      |  1654 -
 src/rocksdb/util/env_test.cc                       |   550 -
 src/rocksdb/util/filelock_test.cc                  |    58 -
 src/rocksdb/util/filter_policy.cc                  |    16 -
 src/rocksdb/util/hash.cc                           |    49 -
 src/rocksdb/util/hash.h                            |    20 -
 src/rocksdb/util/hash_cuckoo_rep.cc                |   627 -
 src/rocksdb/util/hash_cuckoo_rep.h                 |    42 -
 src/rocksdb/util/hash_linklist_rep.cc              |   483 -
 src/rocksdb/util/hash_linklist_rep.h               |    38 -
 src/rocksdb/util/hash_skiplist_rep.cc              |   336 -
 src/rocksdb/util/hash_skiplist_rep.h               |    43 -
 src/rocksdb/util/histogram.cc                      |   198 -
 src/rocksdb/util/histogram.h                       |    79 -
 src/rocksdb/util/histogram_test.cc                 |    62 -
 src/rocksdb/util/ldb_cmd.cc                        |  1839 --
 src/rocksdb/util/ldb_cmd.h                         |   722 -
 src/rocksdb/util/ldb_cmd_execute_result.h          |    76 -
 src/rocksdb/util/ldb_tool.cc                       |   107 -
 src/rocksdb/util/log_buffer.cc                     |    73 -
 src/rocksdb/util/log_buffer.h                      |    48 -
 src/rocksdb/util/log_write_bench.cc                |    69 -
 src/rocksdb/util/logging.cc                        |    77 -
 src/rocksdb/util/logging.h                         |    44 -
 src/rocksdb/util/manual_compaction_test.cc         |   156 -
 src/rocksdb/util/murmurhash.cc                     |   183 -
 src/rocksdb/util/murmurhash.h                      |    42 -
 src/rocksdb/util/mutexlock.h                       |    78 -
 src/rocksdb/util/options.cc                        |   483 -
 src/rocksdb/util/perf_context.cc                   |    86 -
 src/rocksdb/util/perf_context_imp.h                |    88 -
 src/rocksdb/util/posix_logger.h                    |   161 -
 src/rocksdb/util/random.h                          |    90 -
 src/rocksdb/util/signal_test.cc                    |    34 -
 src/rocksdb/util/skiplistrep.cc                    |   123 -
 src/rocksdb/util/slice.cc                          |    73 -
 src/rocksdb/util/statistics.cc                     |    94 -
 src/rocksdb/util/statistics.h                      |    66 -
 src/rocksdb/util/stats_logger.h                    |    26 -
 src/rocksdb/util/status.cc                         |    86 -
 src/rocksdb/util/stl_wrappers.h                    |    32 -
 src/rocksdb/util/stop_watch.h                      |    67 -
 src/rocksdb/util/string_util.cc                    |    23 -
 src/rocksdb/util/string_util.h                     |    15 -
 src/rocksdb/util/sync_point.cc                     |    64 -
 src/rocksdb/util/sync_point.h                      |    80 -
 src/rocksdb/util/testharness.cc                    |    84 -
 src/rocksdb/util/testharness.h                     |   142 -
 src/rocksdb/util/testutil.cc                       |    56 -
 src/rocksdb/util/testutil.h                        |    80 -
 src/rocksdb/util/thread_local.cc                   |   243 -
 src/rocksdb/util/thread_local.h                    |   166 -
 src/rocksdb/util/thread_local_test.cc              |   472 -
 src/rocksdb/util/vectorrep.cc                      |   282 -
 src/rocksdb/util/xxhash.cc                         |   475 -
 src/rocksdb/util/xxhash.h                          |   164 -
 src/rocksdb/utilities/backupable/backupable_db.cc  |  1306 -
 .../utilities/backupable/backupable_db_test.cc     |   976 -
 src/rocksdb/utilities/geodb/geodb_impl.cc          |   431 -
 src/rocksdb/utilities/geodb/geodb_impl.h           |   191 -
 src/rocksdb/utilities/geodb/geodb_test.cc          |   123 -
 src/rocksdb/utilities/merge_operators.h            |    45 -
 src/rocksdb/utilities/merge_operators/put.cc       |    68 -
 .../merge_operators/string_append/stringappend.cc  |    60 -
 .../merge_operators/string_append/stringappend.h   |    31 -
 .../merge_operators/string_append/stringappend2.cc |   113 -
 .../merge_operators/string_append/stringappend2.h  |    51 -
 .../string_append/stringappend_test.cc             |   595 -
 src/rocksdb/utilities/merge_operators/uint64add.cc |    65 -
 src/rocksdb/utilities/redis/README                 |    14 -
 src/rocksdb/utilities/redis/redis_list_exception.h |    22 -
 src/rocksdb/utilities/redis/redis_list_iterator.h  |   310 -
 src/rocksdb/utilities/redis/redis_lists.cc         |   552 -
 src/rocksdb/utilities/redis/redis_lists.h          |   108 -
 src/rocksdb/utilities/redis/redis_lists_test.cc    |   884 -
 src/rocksdb/utilities/ttl/db_ttl_impl.cc           |   284 -
 src/rocksdb/utilities/ttl/db_ttl_impl.h            |   314 -
 src/rocksdb/utilities/ttl/ttl_test.cc              |   595 -
 src/sample.ceph.conf                               |   269 +-
 src/test/Makefile.am                               |    66 +-
 src/test/ObjectMap/KeyValueDBMemory.cc             |     4 +-
 src/test/ObjectMap/test_object_map.cc              |     8 +-
 src/test/TestTimers.cc                             |    38 +-
 src/test/bufferlist.cc                             |    54 -
 src/test/ceph-disk.sh                              |   248 -
 src/test/cli/osdmaptool/clobber.t                  |     8 +-
 src/test/cli/osdmaptool/create-print.t             |    10 +-
 src/test/cli/osdmaptool/create-racks.t             |    10 +-
 src/test/cli/osdmaptool/pool.t                     |    10 +-
 src/test/cli/osdmaptool/test-map-pgs.t             |    16 +-
 src/test/cli/rbd/help.t                            |     1 +
 src/test/cls_rbd/test_cls_rbd.cc                   |     4 +-
 src/test/common/test_bloom_filter.cc               |    16 -
 src/test/common/test_config.cc                     |    12 +-
 src/test/common/test_lru.cc                        |   133 -
 src/test/common/test_shared_cache.cc               |    77 -
 src/test/common/test_str_map.cc                    |    12 +-
 src/test/confutils.cc                              |     1 +
 src/test/coverage.sh                               |    29 -
 src/test/crush/indep.cc                            |    33 +-
 src/test/daemon_config.cc                          |     4 -
 src/test/encoding/types.h                          |    20 +-
 src/test/erasure-code/ErasureCodeExample.h         |    25 +-
 src/test/erasure-code/ErasureCodePluginExample.cc  |     8 +-
 .../ErasureCodePluginFailToInitialize.cc           |     9 +-
 .../ErasureCodePluginFailToRegister.cc             |     9 +-
 src/test/erasure-code/ErasureCodePluginHangs.cc    |     9 +-
 .../ErasureCodePluginMissingEntryPoint.cc          |     8 +-
 .../ErasureCodePluginMissingVersion.cc             |     3 -
 src/test/erasure-code/Makefile.am                  |    84 +-
 src/test/erasure-code/TestErasureCode.cc           |   134 -
 src/test/erasure-code/TestErasureCodeExample.cc    |     2 +-
 src/test/erasure-code/TestErasureCodeIsa.cc        |   963 -
 src/test/erasure-code/TestErasureCodeJerasure.cc   |   149 +-
 src/test/erasure-code/TestErasureCodeLrc.cc        |   936 -
 src/test/erasure-code/TestErasureCodePlugin.cc     |    29 +-
 src/test/erasure-code/TestErasureCodePluginIsa.cc  |    69 -
 .../erasure-code/TestErasureCodePluginJerasure.cc  |     4 +-
 src/test/erasure-code/TestErasureCodePluginLrc.cc  |    59 -
 src/test/erasure-code/TestJerasurePluginGeneric.cc |    10 +-
 src/test/erasure-code/TestJerasurePluginSSE3.cc    |    10 +-
 src/test/erasure-code/TestJerasurePluginSSE4.cc    |    10 +-
 src/test/erasure-code/ceph_erasure_code.cc         |     8 +-
 .../erasure-code/ceph_erasure_code_benchmark.cc    |    36 +-
 .../erasure-code/ceph_erasure_code_benchmark.h     |     2 +-
 .../ceph_erasure_code_non_regression.cc            |   325 +
 src/test/erasure-code/test-erasure-code.sh         |   277 -
 src/test/filestore/TestFileStore.cc                |    87 -
 src/test/formatter.cc                              |    19 -
 src/test/libcephfs/test.cc                         |     3 +-
 src/test/librados/TestCase.h                       |     4 +-
 src/test/librados/io.cc                            |     4 +-
 src/test/librados/misc.cc                          |    22 -
 src/test/librados/tier.cc                          |   190 -
 src/test/librados/watch_notify.cc                  |     2 -
 src/test/libradosstriper/TestCase.cc               |    79 -
 src/test/libradosstriper/TestCase.h                |    82 -
 src/test/libradosstriper/aio.cc                    |   542 -
 src/test/libradosstriper/io.cc                     |   392 -
 src/test/libradosstriper/striping.cc               |   310 -
 src/test/librbd/fsx.c                              |   961 +-
 src/test/librbd/test_librbd.cc                     |    10 +-
 src/test/mon/misc.sh                               |    60 -
 src/test/mon/mkfs.sh                               |   178 -
 src/test/mon/mon-handle-forward.sh                 |    56 -
 src/test/mon/mon-test-helpers.sh                   |     2 +-
 src/test/mon/osd-crush.sh                          |   182 -
 src/test/mon/osd-erasure-code-profile.sh           |   149 -
 src/test/mon/osd-pool-create.sh                    |   227 -
 src/test/mon/test-mon-msg.cc                       |   337 -
 src/test/mon/test_mon_workloadgen.cc               |    25 +-
 src/test/objectstore/DeterministicOpSequence.cc    |    45 +-
 src/test/objectstore/DeterministicOpSequence.h     |     5 +-
 src/test/objectstore/TestObjectStoreState.cc       |     7 -
 src/test/objectstore/TestObjectStoreState.h        |     5 +-
 src/test/objectstore/chain_xattr.cc                |     1 -
 src/test/objectstore/store_test.cc                 |   447 +-
 src/test/objectstore/test_idempotent_sequence.cc   |     4 +-
 src/test/omap_bench.h                              |     2 +-
 src/test/os/TestFlatIndex.cc                       |     2 +
 src/test/os/TestLFNIndex.cc                        |    11 +-
 src/test/osd/Object.cc                             |    10 +-
 src/test/osd/Object.h                              |     8 +-
 src/test/osd/RadosModel.cc                         |     1 -
 src/test/osd/RadosModel.h                          |     3 +-
 src/test/osd/TestOSDMap.cc                         |     3 +-
 src/test/osd/TestPGLog.cc                          |     4 +-
 src/test/osd/TestRados.cc                          |     3 +-
 src/test/osd/hitset.cc                             |     4 +-
 src/test/osd/osd-bench.sh                          |    80 -
 src/test/osd/osd-config.sh                         |   106 -
 src/test/osd/osd-test-helpers.sh                   |    31 -
 src/test/osd/types.cc                              |    24 +-
 src/test/osdc/FakeWriteback.cc                     |     2 +-
 src/test/pybind/test_ceph_argparse.py              |  1139 -
 src/test/rgw/test_rgw_manifest.cc                  |     2 +-
 src/test/run-cli-tests                             |     3 -
 src/test/signals.cc                                |    10 -
 src/test/system/rados_list_parallel.cc             |    10 +-
 src/test/system/rados_watch_notify.cc              |     6 -
 src/test/system/st_rados_create_pool.cc            |     8 +-
 src/test/system/systest_runnable.cc                |     2 -
 src/test/test_rbd_replay.cc                        |   225 -
 src/test/test_rgw_admin_log.cc                     |    44 +-
 src/test/test_rgw_admin_meta.cc                    |     6 +-
 src/test/test_rgw_admin_opstate.cc                 |     2 +-
 src/test/test_snap_mapper.cc                       |     2 +-
 src/test/vstart_wrapped_tests.sh                   |    30 -
 src/tools/Makefile.am                              |    35 +-
 src/tools/ceph_authtool.cc                         |     9 +-
 src/tools/ceph_conf.cc                             |    13 +-
 src/tools/ceph_filestore_dump.cc                   |  1429 +
 src/tools/ceph_filestore_tool.cc                   |   260 +
 src/tools/ceph_kvstore_tool.cc                     |    14 +-
 src/tools/ceph_monstore_tool.cc                    |    48 +-
 src/tools/ceph_objectstore_tool.cc                 |  2548 --
 src/tools/ceph_osdomap_tool.cc                     |    20 +-
 src/tools/cephfs/EventOutput.cc                    |   123 -
 src/tools/cephfs/EventOutput.h                     |    42 -
 src/tools/cephfs/JournalFilter.cc                  |   276 -
 src/tools/cephfs/JournalFilter.h                   |    64 -
 src/tools/cephfs/JournalScanner.cc                 |   377 -
 src/tools/cephfs/JournalScanner.h                  |   110 -
 src/tools/cephfs/JournalTool.cc                    |   730 -
 src/tools/cephfs/JournalTool.h                     |    69 -
 src/tools/cephfs/cephfs-journal-tool.cc            |    58 -
 src/tools/crushtool.cc                             |    10 +-
 src/tools/dupstore.cc                              |     5 +-
 src/tools/mon_store_converter.cc                   |    66 +-
 src/tools/monmaptool.cc                            |    14 +-
 src/tools/osdmaptool.cc                            |    18 +-
 src/tools/psim.cc                                  |     4 +
 src/tools/rados/rados.cc                           |    44 +-
 src/tools/radosacl.cc                              |    11 +-
 src/tools/rest_bench.cc                            |    21 +-
 src/tools/scratchtool.c                            |    55 +-
 src/tools/scratchtoolpp.cc                         |     9 +-
 src/tracing/Makefile.am                            |    79 -
 src/tracing/Makefile.in                            |   729 -
 src/tracing/librados.tp                            |  3057 --
 src/tracing/librbd.tp                              |   546 -
 src/tracing/objectstore.tp                         |   782 -
 src/tracing/oprequest.tp                           |    45 -
 src/tracing/osd.tp                                 |   756 -
 src/tracing/pg.tp                                  |    16 -
 src/tracing/tracing-common.h                       |    96 -
 src/upstart/ceph-osd.conf                          |    33 +-
 src/vstart.sh                                      |   190 +-
 src/yasm-wrapper                                   |    10 +-
 1132 files changed, 19094 insertions(+), 221444 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 87e1e08..289f54b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,277 +1,19 @@
-Abhishek Lekshmanan <abhishek.lekshmanan at ril.com>
-Abioy <abioy.sun at gmail.com>
-Accela Zhao <accelazh at gmail.com>
-Adam C. Emerson <aemerson at linuxbox.com>
-Adam Crume <adamcrume at gmail.com>
-Adam Manzanares <nmtadam at gmail.com>
-Adam Twardowski <adam.twardowski at gmail.com>
-Ailing Zhang <zhangal1992 at gmail.com>
-Alan Grosskurth <code at alan.grosskurth.ca>
-Alan Somers <asomers at gmail.com>
-Alexandre Marangone <alexandre.marangone at inktank.com>
-Alexandre Oliva <oliva at gnu.org>
-Alex Elder <elder at inktank.com>
-Alexey Lapitsky <lex at realisticgroup.com>
-Alfredo Deza <alfredo.deza at inktank.com>
-Allen Samuels <allen.samuels at sandisk.com>
-Alphat-PC <AlphatPC at gmail.com>
-Anand Bhat <anand.bhat at sandisk.com>
-Andras Elso <elso.andras at gmail.com>
-Andreas Bluemle <andreas.bluemle at itxperts.de>
-Andreas Peters <andreas.joachim.peters at cern.ch>
-Andreas Peters <Andreas.Joachim.Peters at cern.ch>
-Andre Noll <maan at systemlinux.org>
-Andrew Farmer <andrewf at hq.newdream.net>
-Andrew Leung <aleung at cs.ucsc.edu>
-Andrew Woodward <awoodward at mirantis.com>
-Andrey Kuznetsov <Andrey_Kuznetsov at epam.com>
-Andrey Stepachev <octo at yandex-team.ru>
-Anton Blanchard <anton at samba.org>
-apovzner <apovzner at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Ariela <Dell at ARIELA.(none)>
-Aristoteles Neto <aristoteles.neto at webdrive.co.nz>
-Ashish Chandra <ashish.a.chandra at ril.com>
-atwardowski <adam.twardowski at gmail.com>
-Babu Shanmugam <anbu at enovance.com>
-Bastian Blank <waldi at debian.org>
-Benjamin Kerensa <bkerensa at gmail.com>
-Benoît Knecht <benoit.knecht at fsfe.org>
-Bjørnar Ness <bjornar.ness at gmail.com>
-Boris Ranto <branto at redhat.com>
-Brandon Seibel <brandon at seibelnet.ca>
-Brian Chrisman <brchrisman at gmail.com>
-Brian Rak <dn at devicenull.org>
-Brown, David M JR <david.brown at pnl.gov>
-Caleb Miles <caleb.miles at inktank.com>
-Carlos Maltzahn <carlosm at cs.ucsc.edu>
-carsonoid <ca at carsonoid.net>
-Casey Bodley <casey at linuxbox.com>
-CC Lien <cc_lien at tcloudcomputing.com>
-Cesar Mello <cesar at d1.(none)>
-Chen Baozi <baozich at gmail.com>
-cholcombe973 <xfactor973 at gmail.com>
-Chris Dunlop <chris at onthe.net.au>
-Chris Glass <tribaal at gmail.com>
-Christian Brunner <christian at brunner-muc.de>
-Christian Marie <pingu at anchor.net.au>
-Christian Theune <ct at gocept.com>
-Christophe Courtaut <christophe.courtaut at gmail.com>
-Christopher O'Connell <jwriteclub at gmail.com>
-Christoph Hellwig <hch at infradead.org>
-Colin Mattson <colinmattson at gmail.com>
-Colin P. McCabe <colinm at hq.newdream.net>
-cyclonew <cyclonew at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Dan Chai <tengweicai at gmail.com>
-Daniel Gollub <d.gollub at telekom.de>
-Daniel J. Hofmann <daniel at trvx.org>
-Dan Mick <dan.mick at inktank.com>
-Danny Al-Gaaf <danny.al-gaaf at bisect.de>
-Dan van der Ster <daniel.vanderster at cern.ch>
-David Disseldorp <ddiss at suse.de>
-David Moreau Simard <dmsimard at iweb.com>
-David Zafman <david.zafman at inktank.com>
-David Zafman <dzafman at redhat.com>
-Derek Yarnell <derek at umiacs.umd.edu>
-Dmitry Smirnov <onlyjob at member.fsf.org>
-Dominik Hannen <cantares1+github at gmail.com>
-Dongsu Park <dpark1978 at gmail.com>
-Eleanor Cawthon <eleanor.cawthon at inktank.com>
-Emily Popper <emily.popper at dreamhost.com>
-Eric Mourgaya <eric.mourgaya at arkea.com>
-Erik Logtenberg <erik at logtenberg.eu>
-Erwin, Brock A <brock.erwin at pnl.gov>
-Erwin, Brock A <Brock.Erwin at pnl.gov>
-Esteban Molina-Estolano <eestolan at lanl.gov>
-Evan Felix <evan.felix at pnnl.gov>
-fangdong <yp.fangdong at gmail.com>
-Federico Gimenez <fgimenez at coit.es>
-Federico Simoncelli <fsimonce at redhat.com>
-Filippos Giannakos <philipgian at grnet.gr>
-Florent Bautista <florent at coppint.com>
-Florent Flament <florent.flament at cloudwatt.com>
-Florian Haas <florian at hastexo.com>
-Francois Deppierraz <francois at ctrlaltdel.ch>
-François Lafont <flafdivers at free.fr>
-Fred Ar <ar.fred at yahoo.com>
-Gary Lowell <gary.lowell at inktank.com>
-George Ryall <george.ryall at stfc.ac.uk>
-Gerben Meijer <infernix at gmail.com>
-git-harry <git-harry at live.co.uk>
-Greg Farnum <greg at inktank.com>
-Guangliang Zhao <guangliang at unitedstack.com>
-Guang Yang <yguang at yahoo-inc.com>
-Guilhem Lettron <guilhem at lettron.fr>
-Haifeng Liu <haifeng at yahoo-inc.com>
-Hannes Reinecke <hare at suse.de>
-Hannu Valtonen <hannu.valtonen at ormod.com>
-Haomai Wang <haomaiwang at gmail.com>
-Harpreet Dhillon <harpreet at ironsystems.com>
-Henry C Chang <henry_c_chang at tcloudcomputing.com>
-Herb Shiu <herb_shiu at tcloudcomputing.com>
-Holger Macht <hmacht at suse.de>
-Huamin Chen <hchen at redhat.com>
-Huang Jun <hjwsm1989 at gmail.com>
-Ian Holsman <lists at holsman.net>
-Ilya Dryomov <ilya.dryomov at inktank.com>
-James Page <james.page at ubuntu.com>
-James Ryan Cresawn <jrcresawn at gmail.com>
-Jan Harkes <jaharkes at cs.cmu.edu>
-Janne Grunau <j at jannau.net>
-Jason Dillaman <dillaman at redhat.com>
-Jenkins <jenkins at inktank.com>
-Jens-Christian Fischer <jens-christian.fischer at switch.ch>
-jiangheng <jiangheng0511 at gmail.com>
-Jim Schutt <jaschut at sandia.gov>
-Joao Eduardo Luis <jeclui at gmail.com>
-João Eduardo Luís <joao.luis at inktank.com>
-Joao Eduardo Luis <joao at redhat.com>
-Joe Buck <jbbuck at gmail.com>
-Johannes Erdfelt <johannes at erdfelt.com>
-John Spray <jcspray at gmail.com>
-John Spray <john.spray at inktank.com>
-John Spray <jspray at redhat.com>
-Johnu George <johnugeo at cisco.com>
-John Wilkins <john.wilkins at inktank.com>
-John Wilkins <jowilkin at redhat.com>
-John Wilkins <jowilki at redhat.com>
-Jojy George Varghese <jvarghese at scalecomputing.com>
-Jonathan Davies <jonathan.davies at canonical.com>
-Jonathan Dieter <jdieter at lesbg.com>
-Jordi Llonch <llonchj at gmail.com>
-Josef Bacik <josef at redhat.com>
-Josh Durgin <josh.durgin at inktank.com>
-Josh Pieper <jjp at pobox.com>
-JP François <francoisjp at gmail.com>
-JuanJose 'JJ' Galvez <jgalvez at redhat.com>
-Kacper Kowalik <xarthisius at gentoo.org>
-Kai Zhang <zakir.exe at gmail.com>
-Ken Dreyer <ken.dreyer at inktank.com>
-Kevin Cox <kevincox at kevincox.ca>
-Kevin Dalley <kevin at kelphead.org>
-Kevin Jones <k.j.jonez at gmail.com>
-Kuan Kai Chiu <big.chiu at bigtera.com>
-Kun Huang <academicgareth at gmail.com>
-Kyle Bader <kyle.bader at dreamhost.com>
-Kyle Marsh <kyle.marsh at dreamhost.com>
-Laszlo Boszormenyi <gcs at debian.hu>
-Laurent Barbe <laurent at ksperis.com>
-Liam Monahan <liam at umiacs.umd.edu>
-Li Wang <liwang at ubuntukylin.com>
-Lluis Pamies-Juarez <lluis.pamies-juarez at hgst.com>
-Loic Dachary <loic-201408 at dachary.org>
+Ceph core
+---------
+
+Sage Weil <sage at newdream.net>
+Yehuda Sadeh-Weinraub <yehudasa at gmail.com>
+Greg Farnum <gregf at hq.newdream.net>
+
+Kernel client
+-------------
+
+Sage Weil <sage at newdream.net>
+Patience Warnick <patience at newdream.net>
+Yehuda Sadeh-Weinraub <yehudasa at gmail.com>
+Greg Farnum <gregf at hq.newdream.net>
+
+Contributors
+------------
+
 Loic Dachary <loic at dachary.org>
-Luis Pabón <lpabon at redhat.com>
-Lukasz Jagiello <lukasz at wikia-inc.com>
-Ma Jianpeng <jianpeng.ma at intel.com>
-Marco Garcês <marco.garces at bci.co.mz>
-Marcus Sorensen <shadowsor at gmail.com>
-Mark Kampe <mark.kampe at dreamhost.com>
-Mark Nelson <mark.nelson at inktank.com>
-Markus Elfring <elfring at users.sourceforge.net>
-marnberg <marnberg at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Martin Ettl <ettl.martin at gmx.de>
-Matt Benjamin <matt at linuxbox.com>
-Matthew Roy <matthew at royhousehold.net>
-Matthew Wodrich <matthew.wodrich at dreamhost.com>
-Michael McThrow <mmcthrow at gmail.com>
-Michael Nelson <mikenel at tnld.net>
-Michael Riederer <michael at riederer.org>
-Michael Rodriguez <michael at newdream.net>
-Mike Kelly <pioto at pioto.org>
-Mike Lundy <mike at fluffypenguin.org>
-Mike Ryan <mike.ryan at inktank.com>
-Mohammad Salehe <salehe+dev at gmail.com>
-Moritz Möller <mm at mxs.de>
-Mouad Benchchaoui <m.benchchaoui at x-ion.de>
-Neil Horman <nhorman at tuxdriver.com>
-Neil Levine <neil.levine at inktank.com>
-Nikola Kotur <kotnick at gmail.com>
-Noah Watkins <noah.watkins at inktank.com>
-(no author) <(no author)@29311d96-e01e-0410-9327-a35deaab8ce9>
-Owen Synge <osynge at suse.com>
-Padraig O'Sullivan <posulliv at umd.edu>
-Pascal de Bruijn <pascal at unilogicnetworks.net>
-Patience Warnick <patience at cranium.pelton.net>
-Patrick McGarry <patrick at inktank.com>
-Paul Chiang <paul_chiang at tcloudcomputing.com>
-Paul Meserve <paul at pogodan.com>
-Pavan Rallabhandi <pavan.rallabhandi at sandisk.com>
-Peter Reiher <reiher at inktank.com>
-Peter Vinson <peter at hq.newdream.net>
-Peter Wienemann <wienemann at physik.uni-bonn.de>
-Pete V <peter at squid.newdream.net>
-Pierre Rognant <prognant at oodrive.com>
-Ray Lv <xiangyulv at gmail.com>
-rca <bertosmailbox at gmail.com>
-rferrett <rferrett at 29311d96-e01e-0410-9327-a35deaab8ce9>
-riccardo80 <riccardo80 at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Roald J. van Loon <roald at roaldvanloon.nl>
-Robin H. Johnson <robbat2 at gentoo.org>
-Roman Haritonov <reclosedev at gmail.com>
-Ron Allred <rallred at itrefined.com>
-root <root at phenom.dyweni.com>
-Ross Turk <ross.turk at inktank.com>
-Ross Turk <rturk at redhat.com>
-rsdio <rsdio at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Ruben Kerkhof <ruben at rubenkerkhof.com>
-Rutger ter Borg <rutger at terborg.net>
-Sage Weil <sage at inktank.com>
-Sage Weil <sweil at redhat.com>
-Sahid Orentino Ferdjaoui <sahid.ferdjaoui at cloudwatt.com>
-Sam Lang <sam.lang at inktank.com>
-Samuel Just <sam.just at inktank.com>
-Sandon Van Ness <sandon at inktank.com>
-sbrandt <sbrandt at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Scott Devoid <devoid at anl.gov>
-Sean Channel <pentabular at gmail.com>
-Sebastien Han <sebastien.han at enovance.com>
-Sebastien Ponce <sebastien.ponce at cern.ch>
-Sharif Olorin <sio at tesser.org>
-Shawn Edwards <lesser.evil at gmail.com>
-Shu, Xinxin <xinxin.shu at intel.com>
-Simone Gotti <simone.gotti at gmail.com>
-Simon Leinen <simon.leinen at switch.ch>
-Somnath Roy <somnath.roy at sandisk.com>
-Sondra.Menthers <sondra.menthers at dreamhost.com>
-Stanislav Sedov <stas at FreeBSD.org>
-Stefan Eilemann <Stefan.Eilemann at epfl.ch>
-Stephan Renatus <s.renatus at x-ion.de>
-Stephen F Taylor <steveftaylor at gmail.com>
-Stephen Jahl <stephenjahl at gmail.com>
-Steve MacGregor <grape at lapgoat-0.(none)>
-Steve Stock <steve at technolope.org>
-Stratos Psomadakis <psomas at grnet.gr>
-Stuart Longland <stuartl at vrt.com.au>
-Sushma Gurram <sushma.gurram at sandisk.com>
-Swami Reddy <swamireddy at gmail.com>
-Sylvain Munaut <s.munaut at whatever-company.com>
-Takuya ASADA <syuu at dokukino.com>
-Tamil Muthamizhan <tamil.muthamizhan at inktank.com>
-Thomas Bechtold <t.bechtold at telekom.de>
-Thomas Mueller <thomas at chaschperli.ch>
-Thorsten Behrens <tbehrens at suse.com>
-Thorsten Glaser <tg at mirbsd.de>
-Tobias Florek <tobias.florek at bytesandbutter.de>
-Tomasz Paskowski <ss7pro at gmail.com>
-Tom Callaway <spot at redhat.com>
-Tommi Virtanen <tv at inktank.com>
-topher <topher at 29311d96-e01e-0410-9327-a35deaab8ce9>
-Travis Rhoden <trhoden at gmail.com>
-Tyler Brekke <tyler.brekke at inktank.com>
-Vangelis Koukis <vkoukis at cslab.ece.ntua.gr>
-Venky Shankar <vshankar at redhat.com>
-Volker Assmann <volker at twisted-nerve.de>
-Walter Huf <hufman at gmail.com>
-Wang, Yaguang <yaguang.wang at intel.com>
-Warren Usui <warren.usui at inktank.com>
-Wei Luo <luowei at yahoo-inc.com>
-Wesley Spikes <wesley.spikes at dreamhost.com>
-Wido den Hollander <wido at 42on.com>
-Xiaoxi Chen <xiaoxi.chen at intel.com>
-Xihui He <xihuihe at gmail.com>
-Xing Lin <xinglin at cs.utah.edu>
-Yan, Zheng <zheng.z.yan at intel.com>
-Yan, Zheng <zyan at redhat.com>
-Yehuda Sadeh <yehuda at inktank.com>
-Yehuda Sadeh <ysadey at redhat.com>
-Zhiqiang Wang <wonzhq at hotmail.com>
diff --git a/COPYING b/COPYING
index 1c3035a..a0034d5 100644
--- a/COPYING
+++ b/COPYING
@@ -96,6 +96,12 @@ License:
   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
   OTHER DEALINGS IN THE SOFTWARE.
 
+
+
+Files: src/test/common/Throttle.cc src/test/filestore/chain_xattr.cc
+Copyright: Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
+License: LGPL2 or later
+
 Files: src/osd/ErasureCodePluginJerasure/*.{c,h}
 Copyright: Copyright (c) 2011, James S. Plank <plank at cs.utk.edu>
 License:
@@ -132,12 +138,3 @@ Packaging:
     Copyright (C) 2004-2009 by Sage Weil <sage at newdream.net>
     Copyright (C) 2010 Canonical, Ltd.
     Licensed under LGPL-2.1
-
-File: qa/workunits/erasure-code/jquery.js
-  Copyright 2012 jQuery Foundation and other contributors
-  Released under the MIT license
-  http://jquery.org/license
-
-Files: qa/workunits/erasure-code/jquery.{flot.categories,flot}.js
-  Copyright (c) 2007-2014 IOLA and Ole Laursen.
-  Licensed under the MIT license.
diff --git a/ChangeLog b/ChangeLog
index cb5b916..e69de29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,32689 +0,0 @@
-c51c8f9 (HEAD, tag: v0.87) 0.87
-eea9803 (origin/wip-enoent-race) os/LevelDBStore, RocksDBStore: fix race handling for get store size
-c4b2abd .gitmodules: ignoring changes in rocksdb submodule
-082416f (origin/wip-rbd-revert) Revert "Enforce cache size on read requests"
-544b9a8 Revert "rbd: ObjectCacher reads can hang when reading sparse files"
-3b1eafc Revert "Fix read performance regression in ObjectCacher"
-f76f83c (origin/wip-9873) osdc/Objecter: fix tick_event handling in shutdown vs tick race
-4848435 common/Timer: recheck stopping before sleep if we dropped the lock
-44a8d59 (origin/fix-fstat-mode) java: fill in stat structure correctly
-cb9262a (origin/wip-9806-giant) Objecter: resend linger ops on any interval change
-1a3ad30 ReplicatedPG: writeout hit_set object with correct prior_version
-95a0ee1 qa: use sudo when rsyncing /usr so we can read everything
-4128814 FDCache: purge hoid on clear
-3abbd4c shared_cache: add purge and tests
-c116b4b shared_cache::add: do not delete value if existed
-227ecd8 (origin/wip-9859) mon: Monitor: MMonGetMap doesn't require caps
-d9ff3a6 PG:: reset_interval_flush and in set_last_peering_reset
-a49d745 objecter: Unlock in shutdown before waiting for timer thread
-bc8fd49 erasure-code: use ErasureCode::SIMD_ALIGN in ceph_erasure_code_benchmark
-c894812 erasure-code: add ErasureCode::encode unit test
-0749a29 erasure-code: expose ErasureCode::SIMD_ALIGN as a const
-abc1cfb ceph_erasure_code_benchmark: use 32-byte aligned input
-fdeeeb1 erasure code: use 32-byte aligned buffers
-3ce0615 erasure code: use a function for the chunk mapping index
-6154339 common: add an aligned buffer with less alignment than a page
-681dad8 common: remove dead code in buffer.cc
-65be257 Fix read performance regression in ObjectCacher
-ac3c1cb (origin/wip-9820) qa/workunits: cephtool: don't remove self's key on auth tests
-9e6ae73 (origin/giant-unknown-locktype) mds: reply -EOPNOTSUPP for unknown lock type
-5558afa qa/workunits/rbd/import_export.sh: be case insensitive
-c4bac3e (origin/wip-inotable-init) mds: fix inotable initialization/reset
-f1fccb1 rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7
-35bbb2d The fix for issue 9614 was not completed, as a result, for those erasure coded PGs with one OSD down, the state was wrongly marked as active+clean+degraded. This patch makes sure the clean flag is not set for such PG. Signed-off-by: Guang Yang <yguang at yahoo-inc.com>
-d947050 (origin/wip-9718) osd/osd_types: consider CRUSH_ITEM_NONE in check_new_interval() min_size check
-809ddd2 (origin/wip-9706) osdc/Objecter: fix use-after-frees in close_session, shutdown
-72a2ab1 osdc/Objecter: fix tick() session locking
-d458b4f PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.rend()
-459b2d2 mds: Locker: remove unused variable
-9b18d99 (origin/wip-9696) PG::choose_acting: in mixed cluster case, acting may include backfill
-3cd8a7f (origin/giant-locker-null) mds: Locker: fix a NULL deref in _update_cap_fields
-0dd3afd (origin/wip-9496) mon: PGMonitor: populate scrub timestamps with 'now' on pg creation
-ccdbfb4 mon: PGMonitor: prettify access to pg_stats_t in register_pg
-9b39033 (origin/wip-9419) osd: Return EOPNOTSUPP if a set-alloc-hint occurs with OSDs that don't support
-70ef4c1 osd: Remove unused PG functions queue_notify(), queue_info(), queue_log()
-d14ca34 0.86
-7c4e278 (origin/wip-9677-ioprio-class-giant) common: ceph_ioprio_string_to_class always returns -EINVAL
-822b088 osd: log error if set_ioprio fails to parse class
-efb23b8 common: set_ioprio debug message including pid
-62f0ef4 common: do not set ioprio if pid is not set
-19c92d8 doc: missing osd prefix to ioprio config options
-97dcc05 (tag: v0.86) 0.86
-32e8bcd Run configure without liblttng on squeeze as well.
-6aba0ab (origin/wip-9128) Add reset_tp_timeout in long loop in add_source_info for suicide timeout
-63c7e16 test/osd/Object: don't generate length of 0
-6b9e20a (origin/wip-9658) ceph.spec: make ceph -> python-ceph dependency specify version
-fe57fab (origin/wip-9663) client: clean-up objecter on failed client init
-1858f06 (origin/johnugeorge-wip-9492-crush-giant) Crush: Ensuring at most num-rep osds are selected
-01e389a Crush: Ensuring at most num-rep osds are selected
-5c6c366 debian/control: fix python-ceph -> ceph file move to allow upgrades
-35fd272 (origin/wip-9657) messages: provide an explicit COMPAT_VERSION in MMDSBeacon
-7f6c31b debian/control: BuildDepend on lsb-release
-73d5bdb (origin/wip-9245-test-mon-pending-giant) tests: remove tests requiring osdmonitor_prepare_command
-e865781 mon: obsolete osdmonitor_prepare_command
-d0c2d7d test: minor case fix
-d0ceb3a (origin/wip-9545) os/FileStore: do not loop in sync_entry on shutdown
-7e2bd22 (origin/wip-9418) mon: Monitor: let 'handle_command()' deal with caps validation
-f0653c0 qa/workunits: mon: auth_caps: account for mon blank caps
-87d06f1 mon: MonCommands: adjust indentation for 'auth add'
-c7d5c25 qa/workunits: mon: auth_caps: variables must be local
-7e85beb qa/workunits: mon: auth_caps: cleanup on successful exit
-5488f46 test/vstart_wrapper.sh: use cephx
-7469561 mon: Monitor: remove redudant call to osdmon's dispatch
-c0e3bc9 mon: Monitor: check caps and source before dispatching messages
-3d78285 mon: Monitor: create logical divisions on dispatch() based on msg nature
-d0113e0 test: mon: test-mon-msg: Check which msgs the mons handle and reply to
-ea96863 qa/workunits: cephtool: test auth profiles
-d6b702c mon: MonCap: add new profiles
-940c4e2 mon: Monitor: match command module caps against what's on MonCommands.h
-8612461 mon: AuthMonitor: validate caps when creating or changing mon caps
-eb2f0f4 (origin/wip-9653-ceph-disk-bootstrap-osd-giant) ceph-disk: bootstrap-osd keyring ignores --statedir
-19be358 PG::actingset should be used when checking the number of acting OSDs for a given PG. Signed-off-by: Guang Yang <yguang at yahoo-inc.com>
-8253ead osdc/Objecter: use SafeTimer; make callbacks race-tolerant
-a1aa06b ReplicatedPG: dump snap_trimq on pg query
-34f38b6 ReplicatedPG: do not queue the snap trimmer constantly
-b29bf00 ReplicatedPG: clean out completed trimmed objects as we go
-0f731ae (origin/revert-2604-wip-9113) Revert "ReplicatedPG: clean out completed trimmed objects as we go"
-da9ae5c ceph.spec: fix typo
-63d0ec7 (origin/wip-9013) rgw: add civetweb as a default frontend
-8388836 (origin/wip-rpm-epoch) ceph.spec.: add epoch
-a470c96 (origin/wip-fsls-json) mon: fix JSON `fs ls` output
-cefb1a3 (origin/wip-9635) mon: wait for paxos writes before touching state
-46c1d93 mon: flush paxos write before setting shutdown state
-4072ef7 mon: move paxos write wait into a helper
-624aaf2 PG: release backfill reservations if a backfill peer rejects
-62e2bca (origin/wip-8822) osd: swap state spinlock for atomic_t
-a8ac4b6 osdc/Filer: drop probe/purge locks before calling objecter
-0ea20a6 Locker: accept ctime updates from clients without dirty write caps
-fe3434f (origin/wip-python-flask) debian: move ceph_rest_api.py into ceph
-8cda623 ceph.spec.in: move ceph_rest_api.py into ceph
-b241624 ceph.spec: fix python-flask dependency
-e42424e debian: python-flask is needed by ceph, not python-ceph
-beade63 (origin/wip-9620-test-mon-thrash) qa/workunits/cephtool/test.sh: fix thrash (ultimate)
-f8ac224 ceph-disk: add Scientific Linux as a Redhat clone
-d851c3f osd: improve debug output for do_{notifies,queries,infos}
-126d0b3 (origin/wip-9582) osdc/Objecter: only post_rx_buffer if no op timeout
-ba02a5e (origin/wip-9536-isa-alignment) erasure-code: test isa encode/decode with various object sizes
-eb8fdfa erasure-code: add test for isa chunk_size method
-7a468f3 (origin/wip-msgr-shutdown) msg: allow calling dtor immediately after ctor
-af07d29 erasure-code: isa encode tests adapted to per chunk alignment
-aa9d70b erasure-code: isa test compare chunks with memcmp instead of strncmp
-ed77178 erasure-code: run isa tests via libtool and valgrind
-668c352 erasure-code: do not use typed tests for isa
-28c2b6e erasure-code: isa uses per chunk alignment constraints
-6f4909a erasure-code: [ISA] modify get_alignment function to imply a platform/compiler independent alignment constraint of 32-byte aligned buffer addresses & length
-0f884fd (origin/wip-9008) For pgls OP, get/put budget on per list session basis, instead of per OP basis, which could lead to deadlock.
-7f87cf1 ReplicatedPG: clean out completed trimmed objects as we go
-c17ac03 (origin/wip-9487) ReplicatedPG: don't move on to the next snap immediately
-255b430 osd: initialize purged_snap on backfill start; restart backfill if change
-4be53d5 PG: check full ratio again post-reservation
-7f71c11 (origin/wip-mon-fix-checks) ceph-mon: check fs stats just before preforking
-9687150 erasure-code: isa/lrc plugin feature
-f51d21b (origin/wip-9572-erasure-code-blaumroth) erasure-code: restore jerasure BlaumRoth default w
-89fceb3 (origin/wip-mon-data-space-die) mon: Monitor: log RO commands on 'debug' level, RWX on 'info'
-2c5b12d mon: Monitor: use MonCommand::requires_perm() when checking perms
-bb55862 mon: Monitor.h: add 'requires_perm()' function to MonCommand struct
-f1b814e mon: Monitor: log RO admin socket commands on 'debug' level
-282bac7 mon: LogMonitor: adjust debug messages output levels
-9686044 mon: LogMonitor: add debug message upon logging to a channel's file
-3760bc1 mon: LogMonitor: appropriately expand channel meta variables
-6c378ae common: LogEntry: if channel is missing, default to "cluster"
-2da1a29 ceph_mon: check available storage space for mon data dir on start
-9996d44 mon: DataHealthService: use get_fs_stats() instead
-3d74230 common: util: add get_fs_stats() function
-f421d5c documentation: comment the CompatSet data members
-ce8eefc (origin/wip-8629) osd/ReplicatedPG: do not clone or preserve snapdir on cache_evict
-398c74e ceph_test_rados_api_tier: add EvictSnap2 test case
-682b9da os/FileJournal: do not request sync while shutting down
-544b8c7 ReplicatedPG::on_removal: clear rollback info
-781f05c Revert "PG::init: clear rollback info for backfill as well"
-28b7b93 (origin/wip-log-msgs) mds: remove spurious logging
-226c0c7 (origin/wip-9547-python-rados-truncate) test: check python rados aio_read with buffers containing null
-8bda44f pybind: Fix aio_read handling of string buffer
-9d9c8c7 (origin/wip-9539) Filer: add lock to protect strcut PurgeRange
-f3acae4 rgw_main.cc: add missing virtual destructor for RGWRequest
-eeb74a1 os/GenericObjectMap.cc: pass big parameter by reference
-1f134bb mds/Beacon.*: fix UNINIT_CTOR cases
-f2a7d62 ErasureCodeLrc.h: fix UNINIT_CTOR
-1a74822 ErasureCodeLrc.h: fix data_chunk_count UNINIT_CTOR
-0e15df4 LogEntry.h: init LogEntry::seq with 0
-5bb94ed (origin/wip-9529) rgw: calculate hash after writing data
-7b13724 crypto: don't hash zero sized buffer
-76eff95 include/util.h: prevent multiple inclusion of header
-f51e368 erasure-code: fix assert overflow
-13780d7 (origin/wip-9538-format-plain) mon: osd find / metadata --format plain fallback
-3f23709 (origin/wip-giant-messenger-fixes) Objecter: disable fast dispatch of CEPH_MSG_OSD_OPREPLY messages
-681a754 Pipe: stop delayed delivery fast_dispatch in stop_and_wait()
-fb5a244 osd/Watch: handle con without sessions
-93dccdb osd/ReplicatedPG: handle sessionless op con in do_osd_op_effects
-5d37850 osd: drop dead shutdown message handler
-d6913ae mds: fix not journaling client metadata
-4089684 (origin/wip-decode-dump) msg: hexdump bad messages at debug level 1 (not 30)
-5495570 msg: hexdump messages we can't decode at configurable debug level
-480c372 Revert "crushtool: safeguard for missing --num-rep when --test"
-288f05a (origin/wip-9189) mds: use new Session::human_name in health msgs
-6320e53 mds: implement const SessionMap::get_session
-32b51bb mds: generate friendly name for client sessions
-920cac9 ceph_fuse: include mount point in client metadata
-bd8c441 client: send metadata in session open
-bdda237 ceph_fuse: refactor init to make mount_point accessible
-758a7ce mds: include client metadata in `session ls`
-1a9e3cc mds: store client metadata on Session
-cd215c7 messages: add cephfs client metadata to MClientSession
-3025b5f mds: collapse numerous client warnings into one
-0769310 PGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to
-07f54f2 PG::find_best_info: let history.last_epoch_started provide a lower bound
-92cfd37 PG::choose_acting: let the pg go down if acting is smaller than min_size
-681a49c (origin/wip-9435) mon: forbid tier changes when in use by FS
-80441cd mon: prevent cache pools being used CephFS
-86a4bed FileStore: Race condition during object delete is fixed
-10b8966 crushtool: safeguard for missing --num-rep when --test
-8b27997 mon: pool create must not always create a ruleset
-d5084f3 mon: add the get_crush_ruleset helper
-4b8c50f tests: flush logs before grepping them
-45731db os: FileStore::lfn_unlink always clears FDCache
-0ffc5ee tests: set the failure domain to OSD by default
-191d67c tests: add get_osds() and get_pg() helpers
-1b9226c (origin/wip-9219-giant) osd: subscribe to the newest osdmap when reconnecting to a monitor
-56ba341 (origin/wip-objecter-cancel) osdc/Objecter: fix command op cancellation race
-baf7be9 osdc/Objecter: cancel timeout before clearing op->session
-1149639 (origin/wip-xfs-inode64) ceph-disk: mount xfs with inode64 by default
-ded1b30 erasure-code: preload fails if < 0
-a140439 (origin/wip-9284) mds: limit number of caps inspected in caps_tick
-bf590f8 mds: keep per-client revoking caps list
-a6a0fd8 xlist: implement copy constructor
-fd04d5e mds: health metric for late releasing caps
-05d6958 mon: trigger transaction on MDS health changes
-e6062b8 mds: add a health metric for failure to recall caps
-8c0f255 mds: add state for tracking RECALL progress
-8199f80 xlist: implement const_iterator
-00a0021 client: fix trim_caps for inodes in root
-2b5bbab client: failure injection for cap release
-21f5e18 client: fix potentially invalid read in trim_caps
-9007217 client: more precise cap trimming
-c328486 client: fix crash in trim_caps
-83fd1cf bugfix: wrong socket address in log msg of Pipe.cc
-868b6b9 doc: osd_backfill_scan_(min|max) are object counts
-cdb7675 (origin/wip-rbd-objectcacher-hang) rbd: ObjectCacher reads can hang when reading sparse files
-ddd52e8 init-radosgw.sysv: Support systemd for starting the gateway
-d32b428 doc: Added bucket management commands to ops/crush-map
-b8a1ec0 doc: fixes a formatting error on ops/crush-map
-c3c6468 mds: update segment references during journal rewrite
-a8c943a (origin/wip-9445) log: add simple test to verify an internal SEGV doesn't hang
-2313ce1 (origin/wip-client-msg-leak) client: fix a message leak
-e3fe18a global/signal_handler: do not log if SEGV originated inside log code
-558463e log: add Log::is_inside_log_lock()
-386f2d7 (origin/wip-9427-rewrite) mds: update segment references during journal rewrite
-d41c3e8 (origin/wip-9307) rgw: push hash calculater deeper
-28d4460 DBObjectMap: restructure map_header_in_use locking
-0a1abac osd_types: fix pg_log_t tail dump
-ce7b2ec erasure-code: fix erasure_code_benchmark goop (decode)
-9ba4e78 (origin/wip-9446) mon: fix MDS health detail output
-2b45bfa (origin/majianpeng-fix3) buffer: Add a test for bufferlist::rebuild_page_aligned
-c268400 buffer: In rebuild_page_aligned for the last ptr is page aligned, no need call rebuild().
-bccb0eb (origin/wip-always-create-pidfile) daemons: write pid file even when told not to daemonize
-16bd457 ReplicatedPG: cancel cb on blacklisted watcher
-b7bdb93 erasure-code: fix erasure_code_benchmark goop
-11082f7 OpTracker: Race condition removed while dumping ops through admin socket
-3945ead OpTracker: The TrackedOp::events list was not protected while dumping ops
-1de43e0 OpTracker: Removed _dump_op_descriptor_unlocked call for log level < 5
-3fac790 OpTracker: Sharding logic is implemented to improve performance
-2fbe82d doc: Fixed syntax error.
-7dbf750 doc: Updated authentication notes. Fixed syntax error.
-7281638 (origin/wip-mds-beacon) mds: sleep in progress thread if laggy and waiting_for_nolaggy waiters
-6fb5769 mds/Beacon: do not reconnect to mon in quick succession
-4ad5db0 (origin/wip-client-ll-ref) client: include ll_ref when printing inode
-cf70b90 (origin/wip-7934) test: Fix ceph_test_rados_watch_notify to delete the pools it creates
-2e4e98b ReplicatedPG: Make perfcounter record the read-size for  async-read.
-cf34e00 ReplicatedPG: record correctly subop for perfcounter.
-117de00 (origin/wip-9413-erasure-code-version-check) erasure-code: mon, osd etc. depend on the plugins
-5a05e6b [rgw][s3] Allow colon ':' in access key
-46bbe30 (origin/wip-osdc-leak) osdc/Objecter: fix leak of MStatfsReply
-1ff94cc EC-ISA: avoid usage of table cache lock outside the class implementation by introducing the setEncodingTable/setEncodingCoefficient methods
-5b41dac EC-ISA: add intelligent table cache
-83bd343 (origin/wip-replay-locking) mds: fix replay locking
-3448d85 Cache tiering: do not allow flush/evict when there are requests pending
-b40cce7 osd: set min_read_recency_for_promote to default 1 when doing upgrade
-d734600 Change CrushWrapper::crush to private
-5a784cd (origin/wip-9241) osdc/Objecter: drop bad session nref assert
-3c6e888 osd/ClassHandler: fix build
-d165238 FileStore: report l_os_j_lat as commit latency
-70ce400 (origin/wip-9365) osd/ClassHandler: improve error logging
-2305b28 (origin/wip-9362) osdc/Objecter: revoke rx_buffer on op_cancel
-f295c1f ceph_test_rados_api_io: add read timeout test
-977d289 ceph_test_rados_api_*: expose nspace
-1349383 Objecter::_recalc_linger_op: resend for any acting set change
-9e2d04f erasure-code: fix BlaumRoth sanity check on w
-f917166 erasure-code: refactor jerasure Liberation parameters checks
-4843fd5 ReplicatedPG:start_flush send a second delete
-937d2b0 Revert "ReplicatedPG:start_flush send a second delete"
-78d7499 Revert "osd/ReplicatedPG: avoid dereferencing iterator at end()"
-3578b11 ReplicatedPG: create max hitset size
-e9b09e8 (origin/wip-9381-erasure-code-rpm) packaging: add all erasure code plugins to RPM packages
-c5bafae erasure-code: Avoid k/m that we set are not equal in erasure-plugin.
-9606232 KeyValueStore: Fix scrub causing inconsistence state
-ae05edd ObjectStore Test: Add test for simulating scrub behavior
-c664179 KeyValueStore: Fix upgrade from non-exist superblock OSD version error
-6681008  mailmap: M Ranga Swami Reddy affiliation
-448342e mailmap: John Spray name normalization
-2f2c37f mailmap: Marco Garcês affiliation
-0204998 mailmap: Erik Logtenberg affiliation
-284fb49 mailmap: François Lafont affiliation
-6307536 (origin/wip-yasm) configure: do not try yasm on x32
-d5777c4 doc: Fixed broken links and clarified terms for new authentication docs.
-e2de11a doc: Minor cleanup.
-9ab46dc debian: only B-R yasm on amd64
-836a670 doc/release-notes: v0.85
-591a179 (origin/wip-doc-qemu) doc: Added more robust usage example for uid and conf for QEMU.
-b178e97 doc: Clean up syntax to suppress warnings.
-4ad1106 doc: Clean up syntax.
-7531b28 (origin/wip-9366) lttng: Fix 'make tag' when configured --without-lttng
-1c34601 (origin/wip-paxos-dout) mon/Paxos: make is_readable debug output show result
-62ca27d mon/Paxos: don't spam log with is_readable at dout level 1
-a0c2284 (tag: v0.85, origin/next) 0.85
-f0e0c31 Include types.h after stdint.h to accomodate for older distributions. This fixes compilation on CentOS 5.
-9254792 (origin/wip-rbd-force-write-back) rbd should use write-back when caching is enabled
-0fb3e52 correct error of repeatedly adding io_size to off in do_bench_write
-4fc9fff (origin/wip-6494) Enforce cache size on read requests
-f0a4a2f tests: flush logs before grepping them
-03aa113 erasure-code: init function is extern "C"
-484fb85 doc: Update logging path to reflect log rotate script default path.
-f0a1d28 doc: Add a contributing file at the root of repo
-4673242 rgw: add .log to default log path
-6fac815 (origin/wip-formatter-va) formatter: clean up dump_format()
-df3c70a qa: scripts to help test ceph-qa-suite
-2280736 (origin/wip-9358) osdc/Journaler: fix try_read_entry()/wait_for_readable() locking
-94173a3 (origin/wip-9282) mds: warn clients which aren't revoking caps
-d8e672f rgw: Implementation for S3 Get Bucket Location
-9e503b5 test/formatter: Add tests for dump_format_ns
-eaa2bb0 rgw_formats: dump_format_ns implementation
-2fb51b2 Formatter: add a dump_format_ns to base Formatter
-14d87bd (origin/xiaoxichen-refactor_lrc_crush) Refactor ErasureCodeLrc::create_ruleset
-eae88da (origin/wip-8648) mds: clear objects' dirty flags after log segment is expired
-69638df doc: fix missing bracket
-35663fa doc: attempt to get the ayni JS into all head tags
-409c955 (origin/wip-SCA-20140902) OSDMonitor.cc: fix potential division by zero
-7b77210 objectstore/store_test.cc: fix unintentional integer overflow
-6b70483 os/HashIndex.cc: fix unintentional integer overflow
-f29e5b3 mount.ceph.c: free memory before return
-903af9c st_rados_create_pool.cc: cleanup before return from run()
-ece990d rados_list_parallel.cc: cleanup before return from run()
-135ccad erasure-code: warning fix
-7de8d17 FileStore: Remove unused code.
-41df414 (origin/wip-mds-lock) mds: don't take mds_lock when doing journal operations
-7ccabbf librbd.cc: add check to prevent null deref in rbd_list()
-4f35714 (origin/wip-9311) Parallelize RBD import/export
-f53bf53 PendingIO.cc: use static_cast instead of c-style cast
-cbd324d FileStore.cc: use static_cast instead of c-style cast
-ca6eb61 (origin/wip-9026) client: vxattr support for rstat
-c2443b9 (origin/wip-doc-authentication) doc: Provided additional detail on daemon-specific caps syntax.
-8569b93 doc: Updated Keyring settings from comments and ceph-deploy defaults.
-b6a97d8 documentation: disk thread ioprio options
-6ec08e0 client/Client.cc: fix null pointer checks for 'in'
-c8d2388 (origin/wip-9151) mon: add MDS metric metadata to health detail
-9ee8015 mds: add thread to progress queues outside dispatch
-1058a9e mon: handle beacon health metrics in MDSMonitor
-0fc8a0d mds: populate health metrics in beacon
-12ab937 messages: add health fields to MMDSBeacon
-f5e7a4b mds: use HeartbeatMap to control beacons
-681f4f8 mds: const getters in MDLog
-124856a include/CompatSet: more const-ness
-232757f mds: promote Beacon to be a Dispatcher
-17d547e mds: extract beacon state from MDS lock
-e69f321 include/CompatSet: make merge const()
-46c94e9 mds/CInode.h: prefer ++operator for non-primitive iterators
-a5468ab ceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators
-4d9927e (origin/wip-session-stats) mds: cap and lease count in `session ls` asok
-ea2a8d0 (origin/wip-request-count) mds: Fix Session::get_request_count
-15df8ac rbd_replay/Replayer.cc: pass const string parameter by reference
-9d926f1 ReplicatedPG.cc: prefer ++operator for non-primitive iterators
-dae0593 IndexManager.cc: prefer ++operator for non-primitive iterators
-40189a2 PGMonitor.cc: prefer empty() over size() for emptiness check
-99fc33f ErasureCodeLrc.cc: prefer ++operator for non-primitive iterators
-2dcfe0f ErasureCodePlugin.cc: prefer ++operator for non-primitive iterators
-a754ce5 ErasureCodeLrc.cc: fix -Wmaybe-uninitialized compiler warning
-0d27bcc osd/ReplicatedPG.cc: fix resource leak
-38e6c64 test_rgw_admin_log.cc: remove unused variables
-473b33b osdc/ObjectCacher.cc: refer ++operator for non-primitive iterators
-16cbaba osd/PGLog.h: prefer ++operator for non-primitive iterators
-8f368c5 mailmap: Ashish Chandra affiliation
-5fd50c9 mailmap: Boris Ranto affiliation
-a5b4c58 (origin/wip-9309) lockdep: increase max locks (1000 -> 2000)
-9fac072 documentation: add the mark_unfound_lost delete option
-bec3032 osd: MissingLoc::get_all_missing is const
-e13ddc7 tests: qa/workunits/cephtool/test.sh early fail
-fc499aa mailmap: add .peoplemap
-177202e erasure-code: lowercase LRC plugin name
-4c9fdbf common/LogEntry: fix warning on x86_64
-a24c8ba common/LogEntry: fix warning on i386
-fa45ed8 (origin/wip-9285) osd/ReplicatedPG: do not evict blocked objects
-ded1cf4 (origin/wip-9294) osd/ReplicatedPG: avoid dereferencing iterator at end()
-d20432e erasure-code: preload LRC plugin
-982c9dd (origin/wip-hitset-bytes) osd/ReplicatedPG: adjust avg_size calculation in agent_choose_mode
-3fc6a73 osd/ReplicatedPG: calculate num_user_bytes
-6ce36b0 osd/ReplicatedPG: scrub and repair hit_set_archive bytes
-3409c38 osd/ReplicatedPG: account for hit_set_archive bytes
-9edd655 osd/osd_types: add num_bytes_hit_set_archive to stats
-93beff1 erasure-code: use s/get_str_map/get_json_str_map/
-6388934 erasure-code: mkfs.sh needs to know the plugin directory
-8110204 osd: OSDMap: ordered blacklist on non-classic encode function
-1e69ff2 PG::init: clear rollback info for backfill as well
-45a61ad erasure-code: ECRecPred must be true if all chunks can be recovered
-734ae88 erasure-code: LRC plugin documentation
-01b943b erasure-code: test LRC pool, profile and crush ruleset
-c222601 erasure-code: high level LRC configuration
-b0fd481 erasure-code: locally repairable code plugin
-c2ca011 erasure-code: delegate chunk remapping to the plugin
-b517ca4 erasure-code: override the default only if the plugin match
-4670d9e erasure-code: relax profile parameter syntax
-e2e07d9 erasure-code: add ErasureCodeInterface::get_coding_chunk_count
-9fc2684 (origin/wip-9281) tools: use cout instead of cerr in journal tool
-a994145 (origin/wip-mds-recover) mds/RecoveryQueue: do not start prioritized items synchronously
-e0b19e3 (origin/wip-hadoop) qa: fix+cleanup hadoop wordcount test
-76b8e57 erasure-code: preload the default plugins in the mon
-c3e1466 Test: fixing a compile warning in ceph_objectstore_tool.cc
-1b42726 Cache tiering: use local_mtime to calculate the age of objects during evicting
-335c1f7 doc: Added rbd-replay-prep and rbd-replay manpages to block device TOC.
-b965398 doc: Fixed broken hyperlink.
-7948e13 doc: Added sysctl max thread count discussion.
-a257291 (origin/wip-9266) client: fix dispatcher ordering (broken fuse)
-ce29b76 (origin/wip-8231-forreview) Fix ceph_scratchtoolpp to create and delete its own pool
-a03f719 ceph_objectstore_tool: Bug fixes and test improvements
-23ec93a ceph_objectstore_tool, test: Implement import-rados feature and unit test code
-b193812 tools/rados: Improve trigger for op_size rounding info message
-54dcbf2 test: ceph_objectstore_tool unit test improvements
-3694068 ceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes
-9325ec1 ceph_objectstore_tool: Add past_intervals to export/import code
-a2bd2aa ceph_objectstore_tool: Minor improvements
-f01e334 ceph_objectstore_tool, test: Add list-pgs operations and unit test case
-83fbc91 Complete replacement of ceph_filestore_tool and ceph_filestore_dump with unified ceph_objectstore_tool
-7786419 Renames and removal towards a unified ceph_objectstore_tool
-f464f57 ceph_filestore_dump.py: Replace ceph_filestore_dump.sh with better python version
-970d983 PG: wait until we've build the missing set to discover_all_missing
-3e9e108 test: ceph_filestore_dump.sh test improvements
-b4d95cc ceph_filestore_dump: Add set-omaphdr object command
-30c0f31 ceph_filestore_dump: Add get-omaphdr object command
-0fc6bd2 ceph_filestore_dump: Add rm-omap object command
-50cd57e ceph_filestore_dump: Add set-omap object command
-b50c43c ceph_filestore_dump: Add get-omap object command
-465d777 ceph_filestore_dump: Add rm-attr object command
-95554e0 ceph_filestore_dump: Add set-attr object command
-55d43c0 ceph_filestore_dump: Add get-attr object command
-3c24d1f ceph_filestore_dump: Add set-bytes object command
-869dd92 ceph_filestore_dump: Add get-bytes object command
-48890c7 ceph_filestore_dump: Add list-omap object command
-00c6b06 ceph_filestore_dump: Add list-attrs object command
-844dabb ceph_filestore_dump: Add --type list to output objects in a pg in json
-605caec ceph_filestore_dump: Add remove object command and usage for new commands
-d4a9daf ceph_filestore_dump: Add utility function get_fd_data()
-7520e50 ceph_filestore_dump: Fail import/export with a tty for stdin/stdout
-3a574cc ceph_filstore_dump: Save if stdout is a tty and add routine to clean binary strings
-c05f895 common: Add missing ghobject_t::decode() for json
-2e9dcb2 ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap
-3d9fde9 os: Add optional flags to generic ObjectStore creation (SKIP_JOURNAL_REPLAY and SKIP_MOUNT_OMAP)
-44b261d ceph_filestore_dump: Improve debug output by showing actual offset
-087c0f9 ceph_filestore_dump: Use cerr now that we aren't closing stderr
-f7f9b25 common,ceph_filestore_dump: Add ability for utilities to suppress library dout output
-3bc4291 doc/install/manual-deployment: move 'done' comment up
-dc6bd3b mds/Locker: if a client asks for file caps, prioritize file recovery
-0fcdc6b mds/Locker: prioritize file recovery on rd/wr/x lock
-bd3c8bc mds/RecoveryQueue: add method to prioritize a file recovery; fix logging
-8f4ea81 mds: change mds_max_file_recover from 5 -> 32
-0747ca7 mds: make max file recovers configurable
-848fcf7 (origin/wip-8718) rgw: don't try to authenticate a CORS preflight request
-e440fb4 test/mon/*: prime mon with initial command before injection
-7a93258 (origin/wip-mds-namespace) mds: remove `using namespace std` in headers
-fc89c27 messages: remove `using namespace std` in headers
-e5930a3 tests: reduce osd-crush.sh execution time
-b059bcd (origin/wip-jerasure-upgrade) erasure-code: assert the PluginRegistry lock is held when it must
-3c4220e erasure-code: add Ceph version check to plugins
-d4ea682 erasure-code: implement ErasureCodePluginRegistry::remove
-c02c41c erasure-code: wrap lines for emacs compile command
-efc8bfd erasure-code: jerasure preloads the plugin variant
-56db6de erasure-code: add Red Hat to copyright notices
-203d62f erasure-code: remove unused errno.h include
-487105d erasure-code: add directory to plugin init functions
-39bcb43 erasure-code: preload the isa plugin by default
-e9a05b8 doc: Update docs about OSD benchmark syntax
-a087f03 Revert "doc: Update docs about OSD benchmark syntax"
-36f15c3 doc: Update docs about OSD benchmark syntax
-ae3d873 PG::can_discard_op: do discard old subopreplies
-97e4e11 (origin/wip-9148) civetweb: update submodule
-1434e5c (origin/wip-blacklist-mds) mds: restart on -EBLACKLISTED
-bb11936 mon: flush paxos write on shutdown
-b1cf210 mon/Paxos: WRITING != WRITING_PREVIOUS
-96030d6 mon: _reset() before updating state
-d3bb477 mon: flush before scrub
-805e5d7 mon/Paxos: flush io on reset()
-a0e0b9b mon/Paxos: make backend write async
-3dcea3b mon/Paxos[Service]: allow reads during WRITING state
-6a71159 mon/Paxos: add writing and refresh states
-663146a mon/Paxos: move post-commit finish work into commit_finish()
-08f331b mon/Paxos: break commit() into two pieces
-e74c044 mon/MonitorDBStore: assert closed in destructor
-bb50371 mon/MonitorDBStore: drop useless ctor
-02a7209 mon/MonitorDBStore: add async queue_transaction()
-01072b0 mon/MonitorDBStore: add close() method
-a6a1e99 mon: interact with MonitorDBStore::Transactions by shared_ptr Ref
-cfc6830 common/Finisher: fix perfcounter
-97f9b6d mon/OSDMonitor: fix double-free on old MOSDBoot
-06b92ce (origin/wip-rewrite-PR2189) Move fedora patch file (used by ceph.spec.in) to rpm/ subdir
-7474f72 ceph.spec.in: tests for rhel or centos need to not include _version
-e37b262 ceph.spec.in: Add a small comment on the empty %files section
-875a99e ceph.spec.in: Obsolete all older versions.
-8f95daf ceph.spec.in: No version on ceph-libs Obsoletes.
-7598502 ceph.spec.in: Obselete ceph-libcephfs (not libcephfs)
-00877ae ceph.spec.in: We need those nice recent changes for rhel7 in Fedora too.
-461523b ceph.spec.in, init-ceph.in: Don't autostart ceph service on Fedora.
-e9da2d8 ceph.spec.in: Add obsoletes for libcephfs
-6c264f2 ceph.spec.in: add ceph-libs-compat
-62d74b3 civetweb: update submodule
-11acb70 rgw: convert header field underscores into dashes
-06ec5ef (origin/wip-7988) test: common: test_config: whitelist '$channel' meta-variable
-8a9831f osd/mds/monc: Adjust for LogClient/LogChannel usage
-bb9d4ca mon: LogMonitor: debug update_from_paxos
-8f9e105 mon: LogMonitor: expand meta variables at time-of-call
-86b2153 mon: LogMonitor: observe config changes
-b97b06e mon: LogMonitor: write log messages on a per-channel basis
-8b5e0cf mon: Monitor's clog/audit_clog need to accessed as pointers
-68ef681 mon: Monitor: observe log client config changes
-3ee9061 mon: Monitor: propagate return for functions called for admin socket
-301fc0c mon: Monitor: log administrative actions via admin socket
-43075bf mon: Monitor: log every administrative action in an 'audit log'
-b7ce633 common: LogEntry: if 'channel' is empty on decode assign default
-7ef1273 common: LogClient: allow specifying facility for LogClient
-6885824 common: str_map: have 'get_str_map' only handling plain-text
-9181114 rgw: clear bufferlist if write_data() successful
-b1af4bd common: str_map: add helper methods to get values from maps
-15e9fc4 common: LogClient: delegate message reference release to caller
-59dac42 common: LogEntry: refactor how we output to syslog
-8a2bfcd common: LogEntry: add 'channel' field
-3178ca9 common: LogEntry: add clog_type_to_string()
-0d2a6c7 common: LogEntry: change field name from 'type' to 'prio' (aka priority)
-f25bca3 systemd: ceph-mds and ceph-mon need networking too
-c6f4b42 sample.ceph.conf: some updates
-2b13de1 (origin/wip-8863) osd/PG: fix crash from second backfill reservation rejection
-5a63215 (origin/wip-reweight) mon/OSDMonitor: make reweight_by_* output less misleading
-146e60d osd: Remove extra call to release_op_ctx_locks in eval_repop. It is called in remove_repop.
-3bfbc14 test/mon/mkfs.sh: fix test
-c2f21c0 (origin/wip-9218) osd: fix osd_tp shutdown
-8346e10 PG: mark_log_for_rewrite on resurrection
-cb4c5e8 OSD::session_notify_pg_create: requeue at the start of the queue
-3c847c5 (origin/wip-config-diff) common: ceph_context: add admin socket command 'config diff'
-ef51160 common: config: let us obtain a diff between current and default config
-4b8b25e tests: histogram prevent re-use of local variables
-a525bf3 (origin/wip-9054) ReplicatedPG:start_flush send a second delete
-ee02293 tests: histogram prevent re-use of local variables
-66c7439 ReplicatedPG::start_flush: remove superfluous loop
-0416b88 update license for libcephfs
-e6da732 PG: recover from each osd at most once
-8a1723f PG: make the reservation sets more descriptively named
-bf3e483 (origin/wip-9238) mds: fix FP error in ROUND_UP_TO
-4672e50 osd/OSDMap: encode blacklist in deterministic order
-a15ad38 vstart: start rgw on port specified by env var
-dbe6c79 don't update op_rw_rlatency/op_w_rlatency when rlatency is zero
-f3bf246 fix wrong value of op_w_latency perf counter
-501dd3c ceph_filestore_dump: Export omap in batches for large omap case
-398b418 ceph_filestore_dump: Remove unused bufferlist databl
-9449520 (origin/wip-9209-round-up-to) common: ROUND_UP_TO accepts any rounding factor
-df3b6fc Fix syntax error in rst documentation
-cef1299 doc: Added links. Clarified namespace comments. Added limitations.
-d817a6a doc: Minor changes.
-16d946b qa/workunits/hadoop/wordcount: remove bogus rm -r
-5db51d6 doc: Added a few comments and links to other relevant docs.
-751b3e2 (origin/wip-9226) rgw: fix test to identify whether object has tail
-c7e1b9e (origin/wip-9221) ceph_test_rados_api_tier: make PromoteOn2ndRead test tolerate retries
-73733dd documentation: update recovery config options defaults
-97b1916 CollectionIndex: Collection name is added to the access_lock name
-3e85041 rgw: admin ops create user API can not determine existing user
-f7ca1bf Update python.rst
-f651f93 (origin/wip-9079) msg/Accepter: do not unlearn_addr on bind()
-a67421a (origin/wip-objecter) osd: update handle_osd_map call
-ef44292 common/Timer: fix deadlock in RWTimer::shutdown
-10efe17 osdc/Objecter: fix op_cancel on homeless session
-28110ff osdc/Objecter: hold session ref longer in resend
-5d1b295 test: fix prematurely released lock in RadosModel
-e7e7fdb osdc/Objecter: fix ref counts in *Map_Latest
-ad193e1 osdc/Objecter: avoid locking two sessions at once
-2463be5 osdc/Objecter: disable lockdep for double lock
-8a0382b common/RWLock: allow disable lockdep on calls
-9a5651b osdc/Objecter: fix resource management
-213f652 librados: handle (and ignore) MOSDMap; do not leak
-1e1ee48 client: handle (and ignore) MOSDMap
-6baf36f librados: shut down monclient after objecter
-2b94408 mon/MonClient: ensure !cur_con == cur_mon.empty()
-73e5bb0 librados: verbose logging in ::notify
-f356d0b librados: fix uninitialized values in notify
-e784586 librados: separate ::notify return values
-6f3bb55 librbd: handle blacklisting during shutdown
-69612e7 librados: refactor watch/notify; return notify error code
-e4e7a18 librados: prefix msg handler with handle_
-59a9785 librados: rename watch/notify callback register functions
-7a2ec05 osd: include ETIMEDOUT in notify reply on timeout
-a786d2d messages/MWatchNotify: include an error code in the message
-611d0f7 librados: avoid unnecessary locks
-52b0ddc librados: fix race on osdmap initialization
-545baf8 librados: update Objecter shutdown
-28e5c03 tools: update for Journaler/Objecter interfaces
-6373112 common: fix Finisher perf counter
-13fbefa osdc: remove unused Blinker.h
-ed1f807 test: add some missing modelines
-13e6c5f osdc: Add lock to Filer::Probe
-a0fd5e0 mds/Server: fix wait_for_osd_map calls
-3487f21 osdc/Journaler: fix C_RetryRead locking
-c272855 mds: convert IO contexts
-e1e2866 osdc/Journaler: use finisher for public callbacks
-10a08b8 osdc/Journaler: remove unused waitfor_trim
-4f3b803 mds: Switch to new context types
-0860f1a mds: add MDSContext subclasses
-dcdcfd3 include: generalize C_Contexts and C_Gather*
-04d01eb common: assert non-null ptrs in OnFinisher
-6b55c42 client: add missing lock in sync_write_commit
-1e0387a client: remove unused C_SnapFlush
-85fbddc mds: rename IO completions with _IO_
-27aed2d osdc/Objecter: make homeless_session a pointer
-45b355e mds/MDLog: del stale ref to C_MDS_WroteImportMap
-29533f3 mds: fix C_MDC_TruncateFinish locking
-68d1497 mds: fix Server::C_MarkEvent locking
-d893938 mds: update mds_lock handling in Locker contexts
-0cfaeb9 mds/MDLog: enable Journaler finisher
-61a69c8 osdc: Use a finisher from Journaler
-db7369b osdc: locking for Journaler
-2be623b mds: fix calls to Objecter::wait_for_map
-619ea1f mds: update MDLog._replay_thread for locking
-f6cd5fa mds: use finisher for BootStart contexts
-0a54f00 librados: wait for map on create_ioctx failure
-6236521 librados/RadosClient: remove unused get_pool_name()
-83d983f mds: allow Objecter to dispatch its own messages
-5668941 osdc/Objecter: ignore messenger events before or after initalized
-a30f7c6 mon/MonClient: fix shutdown typo
-65f9080 librados dispatch fix
-7262da3 client: let Objecter dispatch directly
-d3b87fb client: add a Finisher for the Objecter
-9cb2c81 include/Context: add generic C_Lock
-2e30812 mds: push objecter completions to a Finisher
-641364e mds: mark objecter completions with _IO_, take mds_lock
-c7b7bdd osdc/Objecter: take over ownership of OSDMap
-8c860f9 osdc/Objecter: make OSDMap private
-659909e osdc/Filer: use lock-safe OSDMap accessors
-0dfe6d6 mds/SnapServer: use lock safe OSDMap accessors
-fad3641 mds: use lock-safe OSDMap accessors; adjust Objecter wait_for_map call
-85bffa3 mds: use lock safe OSDMap accessors for TMAP2OMAP check
-5328f0a client/SyntheticClient: use lock safe OSDMap accessors
-fd179ea test_mon_workloadgen: use Objecter::wait_for_osd_map
-9f37f3d osdc/Objecter: make wait_for_osd_map() locking safe
-5ec56c3 client: use Objecter::{get,put}_osdmap_read() interface
-f698112 librados: use {get,put}_osdmap_read() accessors
-af15f9e osd/OSDMap: return const string from get_pool_name
-1145b2c librados: drop osdmap pool name cache
-1848e99 osd/OSDMap: make lookup_pg_pool_name const
-a37fcd8 osdc/Objecter: add name-base pool_delete
-d0d1605 osdc/Objecter: protect pool ops with rwlock
-d83d0f4 osdc/Objecter: add OSDMap accessors that are lock-safe
-c86d2b9 librados: let Objecter dispatch its own messages
-0c7dd66 osd: let Objecter dispatch directly
-31b0ead osdc/Objecter: wire up native Dispatcher fast dispatch
-09a8543 osdc/Objecter: make Objecter a Dispatcher
-2c2e38e mds: add finisher
-a6a8840 objecter: take write lock in ms_handle_reset()
-8147f9f rwlock: assert on unlock if not locked
-795cba9 objecter: fix locking
-9b811a3 objecter: split objecter initialization
-b440597 objecter: Objecter::Op is refcounted
-e76cfcc objecter: don't serialize responses if there's no object name
-cdb8899 objecter: shard completion_lock
-9e6aedf objecter: a major refactoring
-452dc9e timer: fix RWTimer shutdown
-8f5cb22 librados: cancel operation
-94119c4 test_mon_workloadgen: fix for new objecter interface
-1d07ef2 rgw: abort early from logging function
-09af405 osd: adapt to new Objecter interface
-a2f94d2 librados: remove warning
-c9d4cde librados: push snap related functions down to objecter
-dc8494d librados: call objecter->handle_osd_map() under lock
-517f10d librados: adapt to new objecter interface
-e2fa0cf librados: don't hold client lock in certain operations
-aac2242 librados: don't hold lock in dispatch()
-bcc69ed mds: adapt to new objecter interface
-4c6eb6e client: adapt to new objecter interface
-94e1809 time: create RWTimer
-33ecf3d common/RWLock: add lock context
-91c938f common/RWLock: add explicit unlock() to *Lockers
-3a399ea common/RWLock: add get()
-8f9a9db common/RWLock: check return values
-92615ea common/RWLock: track read/write locks via atomics for assertion checks
-74ce4f2 rbd: fix signess warning
-f7c0001 common: remove spurious uint32_t in buffer.c
-6ad8e61 Fix FTBFS on alpha due to incorrect check on BLKGETSIZE
-2554243 (origin/wip-mds-pc) mds/Server: rename perfcounters
-b0cc869 mds: rename a bunch of metrics
-31ef1a9 mds: set l_mds_req on client request
-06682c4 vstart.sh: debug rgw = 20 on -d
-00c677b (origin/wip-civetweb-log) rgw: use a separate callback for civetweb access log
-850242c rgw: separate civetweb log from rgw log
-f246b56 (origin/wip-weak-refs) common/shared_cache: dump weak refs on shutdown
-6cf583c common/shared_cache: take a cct
-2c27485 Doc: Add config option to turn off crush update
-78e84f3 CrushWrapper: pick a ruleset same as rule_id
-1835778 needs network or it will not start if enabled
-8c69054 osd: make coll_t::META static to each file
-493577b (origin/wip-9173) mds: fix crash killing sessions without conn
-dcf8c03 mds: logging in SessionMap
-01ce249 Revert "Merge pull request #2253 from adamcrume/wip-lttng"
-3ced97b (origin/wip-9176) mon: make dispatch(), _ms_dispatch() void
-610f4be mon: always process the message in dispatch
-19df386 mon: fix occasional message leak after session reset
-b245d60 (origin/wip-fingerprint) mon: generate cluster_fingerprint if null
-675b004 mon: add a cluster fingerprint
-552c4b4 rbd_replay: Add unit test for batch_unreachable_from
-7616092 rbd-replay: Add unit test for Ser
-9673e2f lttng: Split --with-lttng and --with-babeltrace options
-07ab36f lttng: Remove tracing-specfic local variables when lttng disabled
-3f1917c lttng: Add informational messages to configure.ac
-230c5b8 lttng: Only install rbd-replay-prep when enabled
-141f37a lttng: Check for babeltrace when autoconfiguring lttng
-9c388f0 lttng: Check that the main babeltrace header is present
-84bfe91 lttng: Test for sane lttng-gen-tp
-e419ba6 lttng: Don't build trace libraries when lttng is disabled
-d1064bf lttng: Fix build error on 32-bit systems
-42d633f lttng: Remove -lboost_regex from unit test
-a35b5d2 lttng: Don't build trace headers when lttng is disabled
-861e6a3 lttng: Update packaging
-7ff6ed1 lttng: Only require lttng for Fedora >= 20 and RHEL == 6 for RPM distros
-fed22f4 lttng: Add distro packaging
-edddb3f lttng: Fix "make distcheck"
-d4186fe lttng: Support --with-lttng=check
-8d71b6c lttng: Remove tracing from libcommon
-660f1d6 rbd-replay: Fix bug in rbd-replay-prep, Thread::issued_io with wrong IO
-18c081e rbd-replay: Remove extent tracepoints and inline extents
-e555867 rbd-replay: Move tracepoints from internal.cc to librbd.cc
-0cd2651 rbd-replay: Add man page and package binaries for rbd-replay-prep
-0f052f8 rbd-replay: Convert prep-for-replay.py to rbd-replay-prep.cc
-e18748e rbd-replay: Add man page, and add binaries to Debian packaging
-f5272d5 rbd-replay: Remove outdated message that says regexes are used
-63273a2 lttng: Replace Boost dependencies with custom string code
-8b9f887 rbd-replay: Remove boost_regex from LIBADD and LDADD
-f64776a rbd-replay: Fix compiler warning in unit tests
-c78f994 rbd-replay: Switch ImageNameMap from regex to plain string matching
-6f79f13 rbd-replay: Switch ImageNameMap to using rbd_loc
-612e85b rbd-replay: Add rbd_replay::rbd_loc
-c40ac91 rbd-replay: Use standard image at snap instead of image/snap
-684643a lttng: Fix ceph_ctf_stringp
-e22f59f rbd-replay: Support replaying partial traces
-0d82222 rbd-replay: Use non-zero fake data
-8a67647 rbd-replay: Add unit tests
-c4939f9 lttng: Preload liblttng-ust-fork.so in TESTS_ENVIRONMENT
-2a11a5c lttng: Disable LTTng by default, add --with-lttng configure option
-c888a89 lttng: Fix 'make check' by setting up fake HOME
-2eb6ea3 rbd-replay: Add --map-image option for image name mapping
-2a66e09 rbd-replay: Add --pool option
-5365a3e rbd-replay: Add assertions
-4109879 lttng: Default to not storing buffer content
-0421b69 rbd-replay: Add command-line arguments to prep-for-replay.py
-1540f2f rbd-replay: Fix async writes in prep-for-replay.py
-3dc8443 rbd-replay: Add --read-only flag
-4c360ce rbd-replay: Fix examples/rbd-replay/replay
-e7bf657 rbd-replay: Clean up prep-for-replay.py
-25d3d42 rbd-replay: Hash completions across multiple mutexes to reduce contention
-ffc9d05 rbd-replay: Add --latency-multiplier option to usage statement
-d4697bc doc: Add usage comment to librbd::RBD::AioCompletion
-2db768f rbd-replay: Fix memory leak in PendingIO
-dd8ad8e rbd-replay: Check that return values are non-negative
-c651bf2 rbd-replay: Support writing Actions to ostreams
-eec9382 rbd-replay: Print "Still waiting for" more judiciously
-f2228c0 rbd-replay: Change Worker::m_pending_ios from vector to map
-8011016 rbd-replay: Printing pending IOs when worker threads waiting to die
-b99f819 rbd-replay: Bugfix: ensure PendingIOs are added before they're removed
-9452423f rbd-replay: Add rbd_replay subsystem
-4eac518 Add assertf macro
-16b7562 rbd-replay: Switch logging from cout to dout
-4c4289c lttng: Add rbd-replay
-f625775 lttng: Add more tracing to librbd
-e9b39d9 tracing: instrument filestore
-d0834bb lttng: Basic tracing of librbd
-772148e lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY
-e1e157f lttng: Split up libtracepoints
-00b2ec6 lttng: Prevent deletion of tracing-common.h when cleaning
-012ff29 lttng: Prevent creation of incorrect .o files when generating from .tp
-16cd074 lttng: Trace librados C API
-10a476a examples: Add example for the librados C API
-fcf4925 lttng: Add tracing-common.h
-e312be6 lttng: Trace ReplicatedPG::do_osd_ops
-1802bc2 lttng: Add rmw_flags to tracepoint in PG::queue_op
-ae59946 lttng: Trace OpRequest
-33b87f9 tracing: automake-ify tracepoint generation
-915a6a6 lttng: Check for lttng/tracepoint.h when configuring
-3ac99e3 lttng: add pg and osd tracepoints
-7fa513e lttng: trace mutex::unlock
-115cfb3 tracing: bootstrap lttng-ust with mutex events
-e870fd0 (origin/wip-filejournal) os/FileJournal: For journal-aio-mode, don't use aio when closing journal.
-a66a493 os/FileJournal: Only using aio then alloc the related resources.
-c8e2b89 os/FileJournal: Tune the judge logic for read_header.
-3ed8c68 (origin/wip-9153-jerasure-upgrade) erasure-code: do not preload the isa plugin
-4c2ae69 add pom.xml so to deploy the libcephfs to maven repository. to build a jar, version=0.80-rc1-2008-gf71c889 mvn package -Dversioin=; and mvn deploy command will deploy the jar to maven central
-e45f5c2 TrackedOp:_dump_op_descriptor is renamed to _dump_op_descriptor_unlocked
-f680a24 TrackedOp: Removed redundant lock in OpTracker::_mark_event()
-5026a89 Rebased civetweb version to master's
-e665e62 Rebased and changed debug option
-98b24f3 vstart.sh to enable support for simple RadosGW
-57778e2 os/FileJournal: signal aio_cond even if seq is 0
-5bf472a os/FileJournal: Update the journal header when closing journal
-790de97 doc/start/quick-ceph-deploy: missing {ceph-node} from mon create-initial
-615d2d9 CollectionIndex: Collection name is added to the access_lock name
-9b80270 erasure-code: preload the jerasure plugin
-fc41273 mon: fix signed/unsigned warnings
-1441ffe (origin/wip-8587) rgw: subuser creation fixes
-82409ee (origin/wip-reweight-tunables) mon: make reweight-by-* sanity limits configurable
-3304841 mon/OSDMonitor: respect CRUSH weights for reweight-by-pg
-1ecf44e mon/OSDMonitor: reweight-by-pg for pool(s)
-8b971e9 mon/OSDMonitor: adjust weights up, when possible
-977f852 qa/workunits/cephtool/test.sh: test reweight-by-pg
-01cb405 mon/OSDMonitor: reweight-by-pg
-e6658e2 mailmap: Anand Bhat affiliation
-4535cc9 mailmap: Federico Simoncelli affiliation
-dbf624e Add tests for the collection hint OP: 1) Store Test 2) Idempotent Test. Signed-off-by: Guang Yang (yguang at yahoo-inc.com)
-ad6a2be Implement the collection hint transaction, add a new transation type as expected number of objects. Signed-off-by: Guang Yang (yguang at yahoo-inc.com)
-7d266d1 Add a new transaction OP (collection hint) to ObjectStore. Signed-off-by: Guang Yang (yguang at yahoo-inc.com)
-35f323d Add a new monitor command to let user specify the expected number of objects during pool creation.
-da37273 Add a new field 'expected_num_objects' to pg_pool_t which denotes the expected number of objects on this pool.
-ab886c4 doc: Removed quick guide and wireshark from top-level IA.
-acee2e5 doc: Move wireshark documentation to dev.
-ce6e9a9 doc/release-notes: v0.84
-b016f84 (origin/wip-fs-docs) doc: add notes on using "ceph fs new"
-948178a (origin/wip-mon-empty-store) ceph_mon: check for existing mon store before opening db
-8336f81 (tag: v0.84, origin/last) 0.84
-bda2301 qa/workunits/rbd/qemu-iotests: touch common.env
-1dc1fb8 qa/workunits/hadoop: move all hadoop tests into a hadoop/ dir
-3d3fcc9 qa/workunits/hadoop-wordcount: fix/use -rmr command
-adaf5a6 qa/workunits/hadoop-wordcount: use -x
-055be68 qa/workunits/rbd/qemu-iotests: touch common.env
-4cdec2f mailmap: Owen Synge affiliation
-ff893d5 mailmap: Andreas Peters name normalization
-4d5d0d9 mailmap: Pavan Rallabhandi affiliation
-78de7e1 mailmap: Zhiqiang Wang affiliation
-725aa4e mailmap: Huamin Chen affiliation
-309c98b mailmap: Xiaoxi Chen affiliation
-bac88db mailmap: Luis Pabón affiliation
-a06affb mailmap: Thorsten Behrens affiliation
-55227aa mailmap: Shu, Xinxin affiliation
-cc3b5ad mailmap: Abhishek Lekshmanan affiliation
-5045c5c qa/workunits/rest/test.py: use rbd instead of data pool for size tests
-3279f3e qa/workunits/rest/test.py: do snap test on our data2/3 pool
-6d7a229 qa/workunits/rest/test.py: fix rd_kb -> rd_bytes
-0e07f7f osd: fix theoretical use-after-free of OSDMap
-904a5f1 (origin/wip-misplaced) vstart.sh: make filestore fd cache size smaller
-932e478 mon: track stuck undersized
-190dc2f mon: track pgs that get stuck degraded
-5168907 osd: track last_fullsized in pg_stat_t
-dbc3f65 osd: track last_undegraded pg stat
-1907066 osd/osd_types: add last_undegraded, last_undersized to pg_stat_t
-6d6767d osd/PG: track PG_STATE_UNDERSIZED separately from DEGRADED
-b037e47 osd: add PG_STATE_UNDERSIZED
-6c0a213 osd/PG: account for misplaces separately than degraded
-988d741 librados: approximate legacy 'degraded' value
-d734d7f mon: warn about misplaced objects, just like degraded
-a314999 osd: num_objects_misplaced
-14614e0 qa/workunits/rest/test.py: fix 'df' test to use total_used_bytes
-93c5b25 Revert "os/FileJournal: Update the journal header when closing journal"
-29e93f7 (origin/wip-9144) os/FileStore: rename start_sync() -> do_force_sync()
-dd11042 os/FileStore: fix mount/remount force_sync race
-0395914 mailmap: Loic Dachary affiliation
-c83c90c (origin/wip-8621) rgw: update civetweb submodule
-0d6d1aa (origin/wip-init-ceph) init-ceph: don't use bashism
-7df67a5 Fix -Wno-format and -Werror=format-security options clash
-ae0b9f1 (origin/wip-osd-mon-feature) osd: fix feature requirement for mons
-0db3e51 (origin/wip-9119) ReplicatedPG::maybe_handle_cache: do not forward RWORDERED reads
-5040413 ReplicatedPG::cancel_copy: clear cop->obc
-2f0e295 unittest_osdmap: test EC rule and pool features
-0b27610 Remove Old Wireshark Dissectors
-16dadb8 osd: only require crush features for rules that are actually used
-1d95486 crush: add is_v[23]_rule(ruleid) methods
-b22d693 lttng: Add distro packaging
-6891f4e lttng: Fix "make distcheck"
-c54f1e4 (origin/wip-9053) mon/Paxos: share state and verify contiguity early in collect phase
-3e5ce5f mon/Paxos: verify all new peons are still contiguous at end of round
-5c2d232 (origin/wip-9025-chunk-remapping) erasure-code: remap chunks if not sequential
-164cfe8 erasure-code: parse function for the mapping parameter
-298da45 erasure-code: ErasureCodeInterface::get_chunk_mapping()
-240764f rgw: update civetweb submodule
-0e74b7a rgw: don't allow negative / invalid content length
-1293e6b rgw: log civetweb messages
-ffac52b rgw: disable civetweb url decoding
-b24db81 FileStore: Introduced a RLock instead of WLock
-3e7848d FileStore: No need to hold Index lock during omap calls
-cfff9f6 FileStore: FDCache lookup is rearranged
-78d70da FileStore: Index caching is introduced for performance improvement
-b04d84d shared_cache: pass key (K) by const ref in interface methods
-95ac43f FileStore: remove the fdcache_lock
-a9f76d4 FDCache: implement a basic sharding of the FDCache
-4c2828e shared_cache: expose prior existence when inserting an element
-a1e79db (origin/wip-9039) rgw_admin: add --min-rewrite-stripe-size for object rewrite
-46d8c97 doc: Add documentation about Wireshark dissector.
-6a55543 rgw: fix compilation
-f6771f2 shared_cache: use a single lookup for lookup() too
-cec40da (origin/historic/old-wireshark-dissectors) qa/workunits/cephtool: verify setmaxosd doesn't let you clobber osds
-a1c3afb OSDMonitor: Do not allow OSD removal using setmaxosd
-16a4360 rgw: pass set_mtime to copy_obj_data()
-800eff2 rgw: copy_obj_data() uses atomic processor
-5d3a7e5 rgw: copy object data if target bucket is in a different pool
-aec684b (origin/wip-9005) add calamari to the api/index section
-ac70490 doc: update kernel recommendations (avoid 3.15!)
-5374386 doc: Added user management link to quick start.
-5e8eae7 doc: Removed cephx intro. Moved details to user management, config, and architecture.
-3aa3e96 doc: Removed cephx guide. Replaced by user management.
-aac6aa2 doc: Removed auth intro and auth docs and added user management to index.
-4c651b7 doc: Restructured auth configuration reference.
-3faf37a doc: Put architectural details of authentication in to architecture doc.
-118ae72 doc: Created a new User Management doc to replace authentication.
-0a49db8 (origin/wip-9062) msg/PipeConnection: make methods behave on 'anon' connection
-8512904 lttng: Support --with-lttng=check
-bb046ed mon/Paxos: put source mon id in a temp variable
-d74d3f1 (origin/wip-8725) mds/MDSMap: fix incompat version for encoding
-369c639 mds/MDSMap: drop trailing else in favor of early return
-b2c1fa8 (origin/wip-9087) test/system/systest_runnable.cc: debugging on start and end
-d74ed9d (origin/wip-9102) ceph-disk: linter cleanup
-3efa30d lttng: Remove tracing from libcommon
-520b75b rbd-replay: Fix bug in rbd-replay-prep, Thread::issued_io with wrong IO
-89c3860 rbd-replay: Remove extent tracepoints and inline extents
-b5bc14a rbd-replay: Move tracepoints from internal.cc to librbd.cc
-febcce9 rbd-replay: Add man page and package binaries for rbd-replay-prep
-c629241 rbd-replay: Convert prep-for-replay.py to rbd-replay-prep.cc
-dca21ee rbd-replay: Add man page, and add binaries to Debian packaging
-95e3b0b rbd-replay: Remove outdated message that says regexes are used
-de9327c lttng: Replace Boost dependencies with custom string code
-86d0b57 rbd-replay: Remove boost_regex from LIBADD and LDADD
-a602bd4 rbd-replay: Fix compiler warning in unit tests
-6be0c2b rbd-replay: Switch ImageNameMap from regex to plain string matching
-77cf034 rbd-replay: Switch ImageNameMap to using rbd_loc
-429a089 rbd-replay: Add rbd_replay::rbd_loc
-0b68f01 rbd-replay: Use standard image at snap instead of image/snap
-11f55de lttng: Fix ceph_ctf_stringp
-ee4d217 rbd-replay: Support replaying partial traces
-d66ee7a rbd-replay: Use non-zero fake data
-b915161 rbd-replay: Add unit tests
-ecd20a3 lttng: Preload liblttng-ust-fork.so in TESTS_ENVIRONMENT
-c938829 lttng: Disable LTTng by default, add --with-lttng configure option
-ae4e02a lttng: Fix 'make check' by setting up fake HOME
-ff2b9f5 rbd-replay: Add --map-image option for image name mapping
-c83856c rbd-replay: Add --pool option
-0274376 rbd-replay: Add assertions
-3a20acb lttng: Default to not storing buffer content
-bbdd0da rbd-replay: Add command-line arguments to prep-for-replay.py
-b11ab2e rbd-replay: Fix async writes in prep-for-replay.py
-11186af rbd-replay: Add --read-only flag
-9a31808 rbd-replay: Fix examples/rbd-replay/replay
-4f6e775 rbd-replay: Clean up prep-for-replay.py
-b58797e rbd-replay: Hash completions across multiple mutexes to reduce contention
-d4e07f0 rbd-replay: Add --latency-multiplier option to usage statement
-0a629a9 doc: Add usage comment to librbd::RBD::AioCompletion
-a7da7e0 rbd-replay: Fix memory leak in PendingIO
-a06e347 rbd-replay: Check that return values are non-negative
-e06e979 rbd-replay: Support writing Actions to ostreams
-0129841 rbd-replay: Print "Still waiting for" more judiciously
-c4ba997 rbd-replay: Change Worker::m_pending_ios from vector to map
-84edf37 rbd-replay: Printing pending IOs when worker threads waiting to die
-d8a86bf rbd-replay: Bugfix: ensure PendingIOs are added before they're removed
-9ec70b9 rbd-replay: Add rbd_replay subsystem
-6d987ce Add assertf macro
-fc71284 rbd-replay: Switch logging from cout to dout
-b73af7c lttng: Add rbd-replay
-cffb8f3 lttng: Add more tracing to librbd
-ef5c30a tracing: instrument filestore
-4001b28 lttng: Basic tracing of librbd
-289c98d lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY
-8e238b5 lttng: Split up libtracepoints
-50020b0 lttng: Prevent deletion of tracing-common.h when cleaning
-be3c913 lttng: Prevent creation of incorrect .o files when generating from .tp
-c4f29af lttng: Trace librados C API
-1dcf847 examples: Add example for the librados C API
-3e21f8e lttng: Add tracing-common.h
-fb45d60 lttng: Trace ReplicatedPG::do_osd_ops
-469c937 lttng: Add rmw_flags to tracepoint in PG::queue_op
-d5b16e4 lttng: Trace OpRequest
-2f2d6e1 tracing: automake-ify tracepoint generation
-64fbc28 lttng: Check for lttng/tracepoint.h when configuring
-8a28388 lttng: add pg and osd tracepoints
-090f63e lttng: trace mutex::unlock
-7a9eb3f tracing: bootstrap lttng-ust with mutex events
-239401d mon: fix divide by zero when pg_num adjusted and no osds
-c5687b1 mon: fix potential divide by zero on can_mark_{down,out}
-f81d2b0 mon: fix divide by zero when pg_num adjusted and no osds
-8a647f7 mon: fix potential divide by zero on can_mark_{down,out}
-5ed9f4e (origin/wip-9029) mds: Revert from mds_mksnap_ setting to mds_snap_ settings
-6f7798e (origin/wip-ceph-disk) ceph-disk: warn about falling back to sgdisk (once)
-b1651af ceph-disk: only fall back to sgdisk for 'list' if blkid seems old
-b75e8a3 ceph-disk: add get_partition_base() helper
-c7a1ceb ceph-disk: display information about dmcrypted data and journal volumes
-5be56ff osd/ReplicatedPG: only do agent mode calculations for positive values
-7b3714c (origin/wip-9096) osd: fix some line wrapping
-df945a9 osd: fix require_same_peer_instance from fast_dispatch
-3d7e2b3 osd: inline require_osd_up_peer
-e86fdef rgw: move generic server usage after all options
-b09b856 mon/Paxos: add perfcounters for most paxos operations
-f80ed26 ceph-disk: move fs mount probe into a helper
-6c77f5f ceph-disk: use partition type UUIDs, and blkid
-ea90d9f Revert "ReplicatedPG: do not pass cop into C_Copyfrom"
-300b5e8 ReplicatedPG: do not pass cop into C_Copyfrom
-24aeca9 (origin/wip-9064) ReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered
-984f614 erasure-code: isa plugin must link with ErasureCode.cc
-1088d6c ceph-disk: fix log syntax error
-41e4461 doc/changelog: v0.67.10 notes
-44ed188 init-ceph: conditionally update  after argparsing
-350b512 doc/release-notes: v0.67.10
-7998c32 rgw: call throttle_data() even if renew_state() failed
-057c680 (origin/wip-log-client) common/LogClient: fix sending dup log items
-71e827f utime: Because class Clock didn't exist,so remove the declaration in class utime_t.
-78dc4df doc: Replace [default] with [global].
-e5324ed doc: Added yum-priorities procedure to manual install.
-a01252a doc: Added priority = 2 to packages.
-3dfa72d (origin/wip-8912) librbd: fix error path cleanup for opening an image
-2edf01f Revert "Fix for bug #6700"
-d6e6ba1 ceph-disk: fix verify_no_in_use check
-0a2b4c2 rgw: Don't send error body when it's a HEAD request
-b0f5ba9 (origin/wip-rados-df-json) rados: remove {read,write}_kb fields from rados df json output
-5663f91 rados: fix {read,write}_bytes value
-8180713 (origin/wip-9057) msg/Pipe: do not wait for self in Pipe::stop_and_wait()
-fd421b2 mon/MonitorDBStore: add get_{keys,bytes}() accounting to Transaction
-d7fb7bf (origin/wip-9055) ceph_test_rados_api_tier: fix cache cleanup (ec too)
-ebbe8aa ceph_test_rados_api: fix cleanup of cache pool
-1d199fb librados/TestCase: inheret cleanup_default_namespace
-5808d6a (origin/wip-9044-use-ruleset) osd: improve ruleno/ruleset consistency
-3f5d86a erasure-code: ErasureCodeIsa::create_ruleset must return a ruleset
-0029a35 erasure-code: ErasureCodeJerasure::create_ruleset must return a ruleset
-04a484a erasure-code: OSDMonitor::crush_ruleset_create_erasure needs ruleset
-4e8de17 os/FileStore: dump open fds before asserting
-281159b doc: Initial network docs.
-4f6d513 os/chain_xattr: Remove all old xattr entry when overwrite the xattr.
-84c9654 OSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper
-4a0c941 OSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function
-48c9b38 OSD: use OpRequestRef& for a few require_* functions
-f86bf1d OSD: introduce require_up_osd_peer() function for gating replica ops
-ee790e3 (origin/wip-problem-osds) osd/osd_types: s/int/int32_t/ in pg_stat_t
-d862731 osd/PG: bound number of blocked_by OSDs we report per PG
-bee79ec qa/workunits/cephtool: add trivial 'ceph osd blocked-by' test
-6380f47 qa/workunits/cephtool: add simple 'ceph osd perf' test
-c511046 mon: add 'osd blocked-by' command
-d55e973 mon/PGMap: track histogram of pg blocked_by
-47a9af3 osd/PG: set blocked_by in GetMissing
-6fcdbd2 osd/PG: set blocked_by in Incomplete state
-ceaca9f osd/PG: set blocked_by during peering GetLog
-6e96c2d osd/PG: set blocked_by during peering GetInfo
-e4b0071 RadosClient: Enable pool existence check
-c34f935 (origin/wip-fsx-flatten) test_librbd_fsx: also flatten as part of randomize_parent_overlap
-214630b mds: Also check min/max uid on snap removal
-a52a855 (origin/wip-pg-epoch) osd: fix pg epoch floor tracking
-2120f4b OSD: move waiting_for_pg into the session structures
-71cb4d3 doc: Removed Debian reference from Upstart.
-8357cae doc: Incorporated user feedback to clarify upgrade doc.
-b6bf33c doc: Added configuration discussion at end of gateway install with links to config.
-11cefca OSD::shutdown: actually drop sessions waiting on map
-6aba942 OSD: clear_session_waiting_on_map in ms_handle_reset
-11d6e5a OSD: rename session_waiting_for_map_lock to session_waiting_lock
-20fd714 OSD: wake_pg_waiters outside of the pgmap write_lock, pg_lock
-6e7b86a OSD: fix wake_pg_waiters revert error in _open_lock_pg
-4260767 (origin/wip-8625) osd_types: s/stashed/rollback_info_completed and set on create
-d0ccb1c make ceph-disk use the new init flag for cluster
-23b4915 allow passing a --cluster flag to the init script
-6bd2b0f mds: Make min/max UID configurable for who is allowed to create a snapshot
-a5ecf15 powerdns: Update README with better markdown
-bf9726a (origin/xiaoxichen-fix_crush_ruleset) mon/OSDMonitor : Use user provided ruleset for replicated pool
-f1aad8b RadosClient: Fixing potential lock leaks.
-26750fc (origin/wip-filestore-bigxattr) os/FileStore: force any new xattr into omap on E2BIG
-cc3112e (origin/wip-rados-xattr) rados: use STD{IN,OUT}_FILENO for magic values
-e3819b6 qa/workunits/rados/test_rados_tool: add a few xattr tests
-645c28a rados: optionally read setxattr value from stdin
-59a715a rados: don't add \n to getxattr
-e5b67f7 Update doc
-789284c mon/PGMap: s/osdid/osd/ in 'osd perf' plaintext heading
-1b8a9ec mon/OSDMonitor: clean up 'osd perf' command placement
-940e42d osd/PG: populate pg_stats_t blocked_by
-ea731ae qa/workunits/cephtool/test.sh: fix 'ceph df ...' tests
-bdf5f30 use cluster name when checking the host
-3fb25c2 use  name in /var/lib/ceph paths
-9e08e3a when starting an OSD, pass in the cluster name
-0bd7c34 PendingReleaseNotes: make note about rbd cache default change
-c0ef8b8 rocksdb: fix i386 build
-7a9b986 rados: add {read,write}_ops to df json
-ee2dbdb mon/PGMonitor: remove {rd,wr}_kb from pool stat dumps
-4c8e322 mon: remove *_kb perf counters
-3179bb1 mon/PGMonitor: add _bytes perf counters
-adb2791 mon/PGMonitor: add _bytes fields for all usage dumps
-895318c README.md: word wrap
-500b95e README: symlink from README.md
-0114b33 (origin/wip-8496-erasure-code-base-class) erasure-code: rework ErasureCode*::parse methods
-77690f6 erasure-code: move to ErasureCode::decode_concat
-54394fa erasure-code: move to ErasureCode::to_{int,bool}
-b4b7c51 erasure-code: move to ErasureCode::minimum_to_decode*
-4ff981f erasure-code: move to ErasureCode::{encode,decode}{,chunk}
-1ebce98 erasure-code: ErasureCode base class
-859944d (origin/wip-test-ceph-disk) test/osd/osd-test-helpers: mkdir -p for ceph-disk
-4b45e25 Add handles for the ceph-mon starting with upstart
-c2f58e6 test/ceph-disk.sh: mkdir -p
-a923e2c Renamed README to README.md to render in markdown
-52cf693 Developer quick start guide
-c09036a enable info_log_level config option for rocksdb
-66de51d (origin/wip-8875) be a bit more explicit about 'ceph-deploy new' in quickstart
-b4c80e3 Do not make directories by mistake.
-f773b24 powerdns: Define a application variable when not invoked from Shell
-1682e62 doc: typo s/loose/lose
-466aba4 osd/osd_types: add blocked_by to pg_stat_t
-b9b022e add annotation for rocksdb config option
-8dcfbd8 (origin/wip-8998) osd: simplify dout_prefix macros
-80829d7 osd: reorder OSDService methods under proper dout_prefix macro
-047c18d doc/release-notes: make note about init-radosgw change
-354c411 doc: Added 'x' to monitor cap.
-7b2c8b3 cls_rgw: fix object name of objects removed on object creation
-8519e9a rgw: need to pass need_to_wait for throttle_data()
-0620624 rgw: call processor->handle_data() again if needed
-516101a EC-ISA: provide a 10% faster simple parity operation for (k, m=1). Add simple parity unit test for k=4,m=1
-985b7c2 osd/ECBackend: clean up assert(r==0) in continue_recovery_op.
-8363a94 erasure-code: HTML display of benchmark results
-3cc7234 COPYING: Cloudwatt copyright is inline
-e11c3fc erasure-code: rework benchmark suite
-90592e9 erasure-code: properly indent ErasureCodePluginSelectJerasure.cc
-be3e1e4 erasure-code: control jerasure plugin variant selection
-5fb4354 erasure-code: reduce jerasure verbosity
-c7daaaf (origin/wip-8475) erasure-code: implement alignment on chunk sizes
-3987ac2 erasure-code: cauchy techniques allow w 8,16,32
-cb54605 mailmap: sort entries
-accf8c2 mailmap: Tommi Virtanen is not with Red Hat
-f870b34 mailmap: João Eduardo Luís name normalization
-ef620cc mailmap: Sebastien Ponce name normalization
-2f21a11 mailmap: Brian Rak affiliation
-b1ba72f mailmap: George Ryall affiliation
-6f24a04 mailmap: Stephen Jahl affiliation
-6f238fa mailmap: Adam Crume affiliation
-6652494 mailmap: Accela Zhao affiliation
-794f70a mailmap: Kevin Cox affiliation
-d8e6415 mailmap: Ma Jianpeng affiliation
-3230060 (origin/wip-ceph-conf) ceph-conf: flush log on exit
-076f33a ECBackend: Don't directly use get_recovery_chunk_size() in RecoveryOp::WRITING state.
-98997f3 (origin/wip-8891) msg/SimpleMessenger: drop msgr lock when joining a Pipe
-e36babc os/MemStore: fix lock leak
-e93818d (origin/wip-rgw-need-to-wait) rgw: need to pass need_to_wait for throttle_data()
-3de7b7c doc/release-notes: fix syntax error
-c95e91e os/KeyValueStore: clean up operator<< for KVSuperBlock
-1417ede ceph_test_rados_api_tier: test promote-on-second-read behavior
-0ed3adc osd: promotion on 2nd read for cache tiering
-13b9dc7 osd: add local_mtime to struct object_info_t
-57fd60c rocksdb: -Wno-portability
-c574e65 autogen.sh: debug with -x
-213e0ac debian, rpm: build rocksdb statically if we can
-a497a3b debian, rpm: build require bzip2 dev
-da5edb8 add rocksdb bz2 dep
-8fcbb65 configure: enable static rocksdb if check and c++11
-7500b89 Makefile: include rocksdb in dist tarball always
-5502dd3 configure: verify c++11 is present for rocksdb
-3329352 rocksdb: require less shiny autoconf
-bcebf9c do_autogen.sh: build with static librocksdb
-eb1cd78 rocksdb: update submodule makefile
-2e549b4 (origin/wip-ec-isa) unittest_erasure_code_[plugin_]isa: conditionally compile
-04037ef (origin/wip-osd-leaks) osd: do not leak Session* ref in _send_boot()
-d00f23b erasure-code/isa: fix signed/unsigned comparison
-8a193ab erasure-code/isa: don't use typename outside of template
-92d0bbe ECBackend: Using ROUND_UP_TO to refactor function get_recovery_chunk_size()
-e4ed2cb ReplicatedPG: For async-read, set the real result after completing read.
-6e52efa doc/release-notes: tweak quoting
-8091173 (origin/wip-round) use llrintl when converting double to micro
-d8b291f configure: check for 'better' yasm that can build ISA-L
-1520b47 erasure-code/isa/Makefile: add missing \, and missing headers
-e1f32d9 yasm-wrapper: fix -f ...
-1670fd6 yasm-wrapper: turn -I foo into -i foo
-6d95797 yasm-wrapper: echo original args
-b7d0017 EC: add plugin for Intel ISA-L library
-383536a (origin/wip-8982) mon/OSDMonitor: warn when cache pools do not have hit_sets configured
-caf554b osd/ReplicatedPG: improve agent_choose_mode args
-ce4e559 vstart.sh: limit open files
-ea4996d osd/ReplicatedPG: evict blindly if there is no hit_set
-5d1c76f osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't
-51c1f2a FileStore: Add omap_backend to "<<" operator
-7faed14 Add superblock to KeyValueStore
-b879e74 KeyValueStore: use generic KeyValueDB::create()
-9df9d28 (origin/wip-8969) mon/OSDMonitor: fix i386 floating point rounding error
-aa9ae1f (origin/wip-8944) qa/workunits/cephtool/test_daemon.sh: verify ceph -c works with daemon
-22d20f3 qa/workunits/cephtool/test_daemon.sh: typo
-97a8d5a qa/workunits/cephtool/test_daemon.sh: allow local ceph command
-9686312 atomic: fix read() on i386, clean up types
-6d89a99 ceph.in: Pass global args to ceph-conf for proper lookup
-0190df5 (origin/wip-8714) osd: prevent old clients from using tiered pools
-605064d (origin/wip-cli-integration) test/cli-integration/rbd: fix trailing space
-d700076 (origin/wip-double-pc) mon: s/%%/%/
-0f8929a (origin/wip-8972) cls_rgw: fix object name of objects removed on object creation
-061c8e9 (origin/wip-rbd-flush) librbd: enable rbd cache by default; writethrough until flush
-4e1405e (origin/wip-erasure-code-profile-default) erasure-code: create default profile if necessary
-5f65b4d os/FileJournal: When dump journal, using correctly seq avoid misjudging joural corrupt.
-7b169a0 rocksdb backend optimization
-708b5b8 add --with-librocksdb-static configure options
-101954c get a stable rocksdb (3.0)
-6eea02c add rocksdb submodule
-cbd0043 add rocksdb support
-5d5902a (origin/wip-filestore-omap) os/KeyValueStore: rename osd_keyvaluedb -> keyvaluestore_backend
-1a5dea7 os/FileStore: use generic KeyValueDB::create(); store omap_backend in superblock
-a2a3619 mon/MonitorDBStore: use generic KeyValueDB::create()
-86a0b9d os/KeyValueDB: make compaction interface generic
-4bf929e os/KeyValueDB: generic create(), test_init()
-e141872 config: allow unsafe setting of config values
-2f9fe02 mailmap: Red Hat names normalization
-3cfda57 doc/release-notes: v0.83
-18ea2a8 (origin/wip-8586) rgw: fix crash in swift CORS preflight request
-6bb3aea mds: remove some rogue "using namespace std;"
-c283ad4 mds: handle replaying old format journals
-07665ec mds: introduce explicit DaemonState instead of int
-6b004f1 mds: refactor MDS boot
-6832ec0 mds: make MDS::replay_done clearer
-e587088 mds: remove unused purge_prealloc_ino
-6be8087 mds: separate inode recovery queue from MDCache
-0d70989 python-ceph: require libcephfs.
-78ff1f0 (tag: v0.83) 0.83
-06c4736 Remove reference from mkcephfs.
-4045b2e doc/release-notes: typo
-df1bad8 doc/release-notes: v0.80.5 release notes
-e99acf9 (origin/wip-8880) OSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper
-e179e92 OSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function
-f36cffc unittest_crush_wrapper: fix build
-eb2f1ea OSD: use OpRequestRef& for a few require_* functions
-1526546 Remove reference from mkcephfs.
-9b03752 Fix some style and checking issue
-5773a37 (origin/wip-upstart-nfile) upstart/ceph-osd.conf: bump nofile limit up by 10x
-d3e5961 (origin/wip-undump) tools/cephfs: fuller header in dump/undump
-e183a4d (origin/wip-fsx-overlap) test_librbd_fsx: clone/flatten probabilities
-bb095ff test_librbd_fsx: randomize_parent_overlap
-f6d1a92 test_librbd_fsx: introduce rbd_image_has_parent()
-eb697dd librbd: make rbd_get_parent_info() accept NULL out params
-04d0526 PGMonitor: fix bug in caculating pool avail space
-b08470f (origin/wip-libs) configure.ac: link libboost_thread only with json-spirit
-9d23cc6 configure: don't link blkid, udev to everything
-de9cfca (origin/wip-flush-set) Only write bufferhead when it's dirty
-1c26266 ObjectCacher: fix bh_{add,remove} dirty_or_tx_bh accounting
-727ac1d ObjectCacher: fix dirty_or_tx_bh logic in bh_set_state()
-5283cfe Wait tx state buffer in flush_set
-d858fdc Add rbdcache max dirty object option
-b8a5668 Reduce ObjectCacher flush overhead
-288908b Revert "Merge pull request #2129 from ceph/wip-librbd-oc"
-0553890 (origin/wip-8937) rgw: call processor->handle_data() again if needed
-d3de69f mds: fix journal reformat failure in standbyreplay
-8fb761b (origin/wip-8931) osd/ReplicatedPG: requeue cache full waiters if no longer writeback
-36aaab9 osd/ReplicatedPG: fix cache full -> not full requeueing when !active
-ba9d52e (origin/wip-librbd-snap-meta) librbd: store and retrieve snapshot metadata based on id
-c5f766b (origin/wip-8932) ceph_test_rados_api_tier: do fewer writes in HitSetWrite
-f360920 common/RefCountedObject: fix use-after-free in debug print
-14cad5e (origin/wip-rgw-align) rgw: object write should not exceed part size
-fc83e19 rgw: align object chunk size with pool alignment
-1f9c732 doc: Add additional hyperlink to Cache Tiering defaults.
-4047660 doc: Update doc from user feedback.
-d1dfb9b osd: fix bad Message* defer in C_SendMap and send_map_on_destruct
-5740266 test: catch a straggler still using 'data' pool
-4eb18dd (origin/wip-journal-header) os/FileJournal: Update the journal header when closing journal
-63c1711 msg/SimpleMessenger: drop local_conneciton priv link on shutdwon
-2545e80 librbd: fix crash using clone of flattened image
-4fe0792 doc: Updated mon doc per feedback. Fixed hyperlinks.
-c511822 doc: update radosgw man page with available opts
-e259aca rgw: list all available options during help()
-99e80a5 rgw: format help options to align with the rest
-95aaeb6 osd: use Connection::send_message()
-be91daf common/LogClient: use con-based send_message
-694ced9 client: use con-based send_message
-2c28548 msgr: remove Messenger::mark_disposable()
-8b49b3a mds: use Connection::mark_disposable()
-2970396 msgr: add Connection::mark_disposable()
-3ca533e msgr: kill mark_down_on_empty()
-637ada2 msgr: kill addr-based send_keepalive()
-322908b msg: drop Messenger::mark_down() and send_keepalive() con-based calls
-f048102 osdc/Objecter: use Connection::mark_down()
-841d5ac osd: use Connection::mark_down()
-774481b mon/MonClient: use Connection::send_keepalive()
-c42922a mon/MonClient: use Connection::mark_down()
-92c46a7 mon: use Connection::mark_down()
-54eca56 mds: use Connection::mark_down()
-d60e8a2 client: use Connection::mark_down()
-f0fef07 mon: use send_message instead of lazy_send_message
-e184ef8 msgr: remove Messsenger::send_message(..., Connection*)
-2bb9ab2 osdc/Objecter: use Connection::send_message()
-05bf6cf mds: use Connection::send_message()
-aeee097 client: use Connection::send_message()
-f413bc8 mon: use Connection::send_message()
-3d57e39 osd: use Connection::send_message
-531073f msgr: add convenience Connection methods
-afb4c37 msg: factor policy handling out of SimpleMessenger
-6597c20 mon: clean up ref counting for forwarded messages' sessions
-29e04c8 msgr: move PipeConnection out of Connection.h; make anon
-ea14d7b Refactor Messenger class family.
-63abf11 (origin/wip-8882) osd/ReplicatedPG: observe INCOMPLETE_CLONES in is_present_clone()
-4136471 osd/ReplicatedPG: observed INCOMPLETE_CLONES when doing clone subsets
-956f287 osd/ReplicatedPG: do not complain about missing clones when INCOMPLETE_CLONES is set
-54bf055 osd/osd_types: add pg_pool_t FLAG_COMPLETE_CLONES
-67d13d7 mon/OSDMonitor: improve no-op cache_mode set check
-d4faf74 (origin/wip-8701) ceph_test_objectstore: clean up on finish of MoveRename
-3ec9a42 os/LFNIndex: use FDCloser for fsync_dir
-6fb3260 os/LFNIndex: only consider alt xattr if nlink > 1
-ec36f0a os/LFNIndex: remove alt xattr after unlink
-a320c26 os/LFNIndex: FDCloser helper
-b2cdfce os/LFNIndex: handle long object names with multiple links (i.e., rename)
-cf98805 ceph_test_objectstore: fix warning
-6aa48a4 store_test: add long name collection_move_rename tests
-c0cb56f ceph.spec.in: add bash completion file for radosgw-admin
-1ad4cd3 ceph.spec.in: rhel7-related changes:
-c57811f Fix/add missing dependencies:
-793e05a ceph.spec.in: whitespace fixes
-dae6ecb ceph.spec.in: split out ceph-common as in Debian
-a05a0da common/random_cache: fix typo
-5efdc62 common/RandomCache: Fix inconsistence between contents and count
-356af4b (origin/wip-8889) osd/ReplicatedPG: debug obc locks
-6fe2782 osd/ReplicatedPG: greedily take write_lock for copyfrom finish, snapdir
-0962650 osd: allow greedy get_write() for ObjectContext locks
-ccd0eec OSD: introduce require_up_osd_peer() function for gating replica ops
-253ca2b (origin/wip-8897) os: make name/attr max methods unsigned
-daac750 os/KeyValueStore: make get_max_object_name_length() sane
-e311a08 uncomment cleanup command
-c264774 init: add systemd service files
-d87e5b9 powerdns: RADOS Gateway backend for bucket directioning
-b551ae2 (origin/wip-8851) mon: AuthMonitor: always encode full regardless of keyserver having keys
-1518fa2 osd: init local_connection for fast_dispatch in _send_boot()
-34b0efd (origin/wip-librbd-oc) ObjectCacher: fix bh_{add,remove} dirty_or_tx_bh accounting
-8a05f1b ObjectCacher: fix dirty_or_tx_bh logic in bh_set_state()
-d358741 Wait tx state buffer in flush_set
-3c7229a Add rbdcache max dirty object option
-5cb4b00 Reduce ObjectCacher flush overhead
-9061988 osd: init local_connection for fast_dispatch in _send_boot()
-b6f3aff Fix mismatched tags (struct vs. class) inconsistency
-2aa3edc (origin/wip-8174) os/FileStore: fix max object name limit
-f4bffec (origin/wip-memstore) ceph_test_objectstore: test memstore
-6f312b0 os/MemStore: copy attrs on clone
-8dd6b8f os/MemStore: fix wrlock ordering checks
-a2594a5 osd/MemStore: handle collection_move_rename within the same collection
-3467110 (origin/wip-dencoder) ceph-dencoder: don't link librgw.la (and rados, etc.)
-b1a641f rgw: move a bunch of stuff into rgw_dencoder
-1c17077 libosd_types, libos_types, libmon_types
-58cc894 Revert "ceph.spec: move ceph-dencoder to ceph from ceph-common"
-f181f78 Revert "debian: move ceph-dencoder to ceph from ceph-common"
-ad4a4e1 unittest_osdmap: revert a few broken changes
-d7209c1 (origin/wip-8858) rgw: dump prefix unconditionally
-dc417e4 rgw: list extra objects to set truncation flag correctly
-82d2d61 rgw: account common prefixes for MaxKeys in bucket listing
-924686f rgw: add NextMarker param for bucket listing
-4a63396 rgw: fix decoding + characters in URL
-09a5974 crushtool: Send output to stdout instead of stderr
-e6cf618 rgw: improve delmited listing of bucket
-49fc68c utf8: export encode_utf8() and decode_utf8()
-bd3367e osd: add config for osd_max_attr_name_len = 100
-7c0b2a0 os: add ObjectStore::get_max_attr_name_length()
-7e0aca1 osd: add config for osd_max_object_name_len = 2048 (was hard-coded at 4096)
-e60dd0f (origin/wip-8811) osdc: refactor JOURNAL_FORMAT_* constants to enum
-8eef89e doc: fix example s/inspect/journal inspect/
-5438500 mds: fix journal reformat failure in standbyreplay
-ed3bc4c osdc/Journaler: validate header on load and save
-18ca6b6 test: add a missing semicolon
-0cd0268 (origin/wip-vstart-existing-mds) qa: generalise cephtool for vstart+MDS
-bb5a574 mon: carry last_failure_osd_epoch across `fs new`
-b936a27 mon/MDSMonitor: fix msg on idempotent `fs rm`
-06a8f7b configure: do not link leveldb with everything
-0193d3a AUTHORS
-14a9ca6 (origin/wip-logrotate) logrotate.conf: fix osd log rotation under upstart
-7b342ef doc: Add Note about European mirror in Quick Start
-0f11aae (origin/wip-8849) remove suse service restarts
-e3a5756 remove ceph restarts on upgrades for RPMs
-4d6899c qa/workunits/cephtool/test.sh: fix erasure_code_profile get test
-ce9f12d qa/workunits/cephtool/test.sh: test osd pool get erasure_code_profile
-e8ebcb7 mon: OSDMonitor: add "osd pool get <pool> erasure_code_profile" command
-5ccfd37 vstart.sh: default to 3 osds
-5f6b11a (origin/wip-8857) mon/MDSMonitor: make legacy 'newfs' command idempotent
-b89ab5f rgw: don't try to wait for pending if list is empty
-19e68ac (origin/wip-rbd-defaults) rbd: respect rbd_default_* parameters
-e891a93 rbd: remove accidental repeated option
-0f87c55 librbd: use order-agnostic default stripe parameters
-f9f2417 (origin/wip-8846) rgw: don't try to wait for pending if list is empty
-420f0a4 (origin/wip-8813) set the default log level to WARNING
-3e0d980 init-ceph: wrap daemon startup with systemd-run when running under systemd
-99dfaf7 doc/release-notes: v0.80.4
-80ea606 Fix size of network protocol intergers.
-6c48d07 (origin/wip-set_layout) doc: add cephfs layout documentation
-af740ec cephfs: pool safety & print deprecation warning
-d915ceb update hadoop-wordcount test to be able to run on hadoop 2.x. The hadoop and mapreduce library are no longer hard coded so they can be specified to point to the right path. The relative paths hdfs are changed to absolute paths. A sample command to run the test on hadoop 2.x is TESTDIR=/home/test HADOOP_HOME=/usr/lib/hadoop HADOOP_MR_HOME=/usr/lib/hadoop-mapreduce sh workunits/hadoop-wordcount/test.sh starting hadoop-wordcount test
-cceab2b qa: retire kclient-specific layout test
-95f5a44 ceph.spec: move ceph-dencoder to ceph from ceph-common
-b37e3bd debian: move ceph-dencoder to ceph from ceph-common
-01cd3cd (origin/wip-8830) XfsFileStoreBackend: default to disabling extsize on xfs
-fc597e5 doc/release-notes: some additional warnings and recommendations against adjusting tunables
-e17e9d8 (origin/wip-8823) ceph_test_rados_api_tier: fix [EC] HitSet{Read,Write,Trim} tests
-a4ed336 (origin/wip-mds-session-asok-squash) mds: add `session ls` and `session evict` to asok
-0e0be07 client: include ID in mds_sessions asok
-52a2bc5 mon: remove unused attribute notified_global_id
-b120a48 common/admin_socket: remove dead code
-bb47ff3 osd: fix confusing debug output for op_applied
-586d3ee doc: Fixes a broken link on the rados deploy osd page.
-447f849 doc/release-notes: v0.80.3
-29f20b7 (origin/wip-test-post-file) qa/workunits/post-file.sh
-c9e1e82 rbdmap: per-device post-map/pre-unmap hooks
-c93da05 (origin/wip-8815) osd/osd_types: be pedantic about encoding last_force_op_resend without feature bit
-712d5d1 osd/osd_types: remove useless encode_compat local var for pg_pool_t::encode
-50e93c2 (origin/wip-8696) qa/workunits: cephtool: adjust pool name where missing as it has changed
-cf94cf3 (origin/wip-dump-new-crush) crush: include CRUSH_V3, v2/v3 rules checks in dump_tunables()
-daadff4 doc: minor format fix for radosgw admin docs
-b844ec9 rbdmap: per-device mount (Closes: #8538)
-02683ac rbd.cc: Check io-size avoid floating point exception.
-6cd3457 qa/workunits: cephtool: cleanup after pool creation
-704b0a3 qa/workunits: cephtool: pool needs to be a tier to be used as such
-49db676 qa/workunits: cephtool: test erroneous 'tier remove'
-9fea033 qa/workunits: cephtool: test get/set on both tier and non-tier pools
-df59449 qa/workunits: cephtool: split get/set on tier pools from get/set tests
-8e5a8da mon: OSDMonitor: be scary about inconsistent pool tier ids
-64bdf6c osd: pg_pool_t: clear tunables on clear_tier()
-f131dfb mon: OSDMonitor: limit tier-specific pool set/get on non-tier pools
-026b127 doc/changelog/v0.80.2: include tag
-59c00e5 (origin/wip-kinetic-os) os: add prototype KineticStore
-74f5e5e PG::op_must_wait_for_map: pass the epoch rather than the map
-98f92d8 doc: Added CentOS/RHEL install for git.
-115c078 rgw: modelines
-c4afaf9 rgw: fix RGWObjManifestRule decoder
-0839e2a doc: Added keyring location note to resolve pull abandoned pull request #1946.
-4692257 (origin/wip-nuke-dlist) nuke dlist
-a3e5c6d Add random_cache.hpp to Makefile.am
-f51f162 test: fix make_pair() for c++11
-79e3761 Remove some not-resolving make_pair() invocations.
-ebbdb3c Add required spacing after string literals (PRIu64).
-16ef1ed Convert ConnectionRef explicitly to bool.
-c930a1f Work around an apparent binding bug (GCC 4.8).
-228760c Fix the PG listing issue which could miss objects for EC pool (where there is object shard and generation). Backport: firefly Signed-off-by: Guang Yang (yguang at yahoo-inc.com)
-bd6ba10 doc: Clean up formatting, usage and removed duplicate section.
-15d5b51 doc/release-notes: v0.80.2
-29c2bb2 Revert "qa: add an fsx run which turns on kernel debugging"
-c15e524 Revert "qa: add an fsx run which turns on kernel debugging"
-2217f2b doc: fix a typo in quickstart doc
-7a0ea79 doc: fix a few typos in radosgw docs
-d089283 doc: fix a few typos in rados docs
-cc5c33f doc: fix a few typos in the dev docs
-e23ed9b doc: fix a few typos in rbd docs
-d693d7b doc: Fix a few typos in the install docs
-bb881e5 doc: fix a few typos in architecture page
-fcbdd2f doc: Fix a typo in the rbd man page
-ef117fe Use submit_transaction_sync to make change durable
-6ff5fed Add random cache and replace SharedLRU in KeyValueStore
-c0dc245 (origin/wip-7891) osd: cancel agent_timer events on shutdown
-ef40737 osd: s/applying repop/canceling repop/
-cafceae osd: clear PGBackend state on shutdown
-e299357 osd: separate cleanup from PGBackend::on_change()
-b16b64e Support for READFORWARD in the caching tier
-b927c0d (origin/wip-8523) qa/workunits: cephtool: test for 'osd pool {get,set}-quota'
-714a9bb mon: OSDMonitor: add 'osd pool get-quota' command
-c92feeb (origin/wip-8727) messages: MForward: fix compat version
-0bf4f65 osd: clear sessions_waiting_on_map on shutdown
-aefbac5 osd: fix session leak when waiting on map
-17ad083 osd: clear Sessions for loopback Connections on shutdown
-231fe1b Revert "OSD: move waiting_for_pg into Session"
-aa1be2e OSD: fix debug logging output
-b700963 (origin/wip-8306-rebase) ceph.spec.in: add bash completion file for radosgw-admin
-235e4c7 ceph.spec.in: rhel7-related changes:
-7cf8132 Fix/add missing dependencies:
-ec8af52 ceph.spec.in: whitespace fixes
-e131b9d ceph.spec.in: split out ceph-common as in Debian
-08fa16b common: seq_read_bench argument order changed The argument order for seq_read_bench in src/common/obj_bencher.h has been changed to match the argument order in obj_bencher.cc
-cca5841 (origin/wip-8751) test: generalise default_pools in test_rados
-a7a631d (origin/wip-8754) tests: don't depend on 'data' pool in rbd test
-cf5f535 doc/release-notes: clarify CRUSH notes about tunables
-d84d720 decrement WBThrottle perfcounters in clear_object
-16df4c3 (origin/wip-8745) mds: use client-provided time stamp for user-visible file metadata
-73b2928 Remove exclusive lock on GenericObjectMap
-d104979 Add Header cache to KeyValueStore
-c0806bb doc: mention kernel support for rbd format 2
-c7937ff doc: Fix a typo regarding requiretty for RHEL based platforms
-54af810 (origin/wip-8738-next) mon: check changes to the whole CRUSH map and to tunables against cluster features
-2280c0e OSDMonitor: fix quorum_features comparison in check_cluster_features
-c0ba58c (origin/wip-refs) msg: debug refs on incoming Messages
-c0dcf3b common/RefCountedObject: make nref, cct private
-b0da92b msg/Message: use RefCountedObject ctor to set initial ref count
-e621856 msg/Pipe: debug Pipe refs
-242ee89 msg: debug Connection refs
-fc8d198 osd: debug Session refs
-45991c0 common/RefCountedObject: assert nref == 0 in dtor
-ff1521f common/RefCountedObject: optionally take initial ref count to ctor
-0547417 common/RefCountedObject: optionally debug
-2226b91 qa: support running under non privileged user
-f7086d3 Automagically setup submodules on first run.
-0c7c722 ceph_argparse_flag has no regular 3rd parameter.
-909850e [werror] Fix c++11-compat-reserved-user-defined-literal
-fde99e6 OSD: adjust share_map() to handle the case that the osd is down
-ddc04c8 (origin/wip-8670) mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it
-0392ddb ReplicatedPG: Removed the redundant register_snapset_context call
-2f089d8 OpTracker: The optracker enabled/disabled check is added
-63be0f2 OpTracker: use mark_event rather than _mark_event
-bb3e1c9 (origin/wip-8728) qa/workunits/rest/test.py: make osd create test idempotent
-7e1deb6 (origin/wip-async-log) mds: defer encoding/submitting log events to separate thread
-44199d6 mds: use mutex to protect log segment list
-6d8ccdd mds: add thread to encode/submit log events
-70c0723 (origin/wip-osd-dumpres) osd: add dump_reservations asok command
-6483710 common/AsyncReserver: add dump()
-9ce5ff9 (origin/wip-8692) mon: clear osd request queue latency info on down or up
-f8c88a4 OSD: wake_pg_waiters after dropping pg lock
-e2b151d (origin/wip-fs-cmds-oops) mds: Update default FS name
-f62f7f5 qa: update cephtool EC pools test to respect IDs
-710561c mon/MDSMonitor: EC check in 'fs new' like newfs
-44eb259 qa: add a check for crash_replay_interval autoset
-c0ffa01 mon: Set crash_replay_interval automatically
-82d3fcc qa: Update data pool ID for vxattrs test
-917ef15 test: use 0U with gtest to avoid spurious warnings
-522174b (origin/wip-vstart-wrapped) qa: support running under non privileged user
-8697d6a OSD: await_reserved_maps() prior to calling mark_down
-6f97206 (origin/wip-osd-map-cache-size) osd: allow osd map cache size to be adjusted at runtime
-bcc09f9 (origin/wip-cephtool) qa/workunits/cephtool/test.sh: sudo ceph daemon
-959f2b2 (origin/wip-fix-pglog-unittest) PGLog: fix clear() to avoid the IndexLog::zero() asserts
-e0d3b78 (origin/wip-8699) rgw: fix uninit ofs in RGWObjManifect::obj_iterator
-73b929b osd: improve tests for configuration updates
-2dec8a8 (origin/wip-8542) qa/workunits/suites/fsx.sh: don't use zero range
-83f1906 (origin/wip-fs-cmds) mon/MDSMonitor: log warning while MDS up but no FS
-b7f09c2 mon/MDSMonitor: fix incorrect comment
-fc0f8bd mon/MDSMonitor: s/enabled/get_enabled()/
-641b419 mds: Handle setting 'enabled' in upgrades
-96f4e78 mds: journal-related debug messages
-7294e8c test/qa: update for MDSMonitor changes
-fd9c1fe vstart: update for newfs/rmfs changes
-ae5f1db mon: add `ceph fs [new|rm|ls]`
-1dfe913 erasure-code: add definitions to the glossary
-5867464 mon: hide mdsmap in 'ceph status' if not enabled
-6109cc9 mon: stop MDSMonitor when FS disabled
-c442b0d mon: enable deleting pools when FS disabled
-f6d029d mon: warn in newfs if crash_replay_interval=0
-243963c mon: don't require 'sure' flag for new fs
-90e6dae osdmap: Don't create FS pools by default
-13305d5 mds: no initial filesystem
-8f7900a mds: add 'enabled' flag to MDSMap
-ef7d1bc doc: RPM instructions correction
-fcdf273 (origin/wip-port-fixes) mds: avoid comparing MutationRef with 0
-e473790 (origin/wip-krbd-settle) krbd: rework the unmap retry loop
-59d18ac [RGW, memory leak] Memory leak in RGW has been fixed: deletion of allocated pointer to pointer to Log object has been added to "on_exit" handler.
-8e5c921 [RGW, memory leak] Memory leak in RGW GC (losing pointer during allocating Ceph-context) has been fixed.
-8706b74 [RGW, memory leaks] Memory leak in RGW initialization (Inserting new connection into connections map w/o check) has been fixed.
-9bcc19d (origin/wip-map-unmap) map-unmap.sh: fail if 'rbd rm' fails
-16b14ea map-unmap.sh: drop the get_id() logic
-abdb168 (origin/wip-fsx-random-ctx) test_librbd_fsx: use private RNG context
-9517cea os/FileStore: put SUPER usage in ifdef __linux__
-b066e16 common: move #include syscall into ifndef DARWIN
-2db500b client: handle missing O_RSYNC constant
-4b36074 os/FileStore: move ZFS_SUPER_MAGIC in linux ifdef
-656bc04 common/Thread: add missing #include for pid_t
-b2bcf52 ceph.in: handle DYLD_LIBRARY_PATH on OS X
-12079a7 doc: dev: cache-pool.rst: fix typo s/objets/objects/
-4689467 PG: pass OpRequestRef by ref to avoid refcounting overhead
-d48a737 osd/: in scrub, check for and remove obsolete rollback objs
-953c33e osd/: plumb rollback_trim_to through interfaces and messages
-ac11ca4 PGLog: add rollback_info_trimmed_to_riter to IndexedLog and use in PG
-62027ec doc/release-notes: v0.82
-7fae941 rgw: allocate enough space for bucket instance id
-2207ed1 PGLog: fix logging whitespace in trim
-af4970c OSDMap: avoid passing pg_t by value
-d72eec0 PG: block outgoing peering messages until the last interval is durable
-f9f89be PG: add machinery to temporarily buffer outgoing recovery messages
-f749812 os/: add async flush_commit() method to Sequencer and implementations
-0debfe1 OSD: pass param by ref to avoid copying overrhead
-1f3fbc9 mds: print sequence number of log segment
-55ed85b mds: introduce sequence number for log events
-a17462c mds: add get_metablob() to log events
-0690078 mds: pass finish context to MDlog::submit_entry()
-21955d7 MOSDOpReply: Constructor initialization list is used to instantiate members
-44db3d0 MOSDOpreply: The functions are returned by const ref and parameters passed by ref
-1c93c61 MOSDOp: The functions are returned by const ref and parameters passed by ref
-ad81a98 Revert "ceph-disk: Enable creating multiple osds per dev"
-e02957d test: use (unsigned)0 with gtest to avoid spurious warnings
-f8df9bd (origin/wip-da-SCA-20140623) scratchtool.c: cleanup do_rados_getxattrs()
-4e9c2c1 (origin/wip-osd-ints) osd: fix pg_stat_t int -> int32_t
-238b1a3 osd: fix pg_shard_t int -> int32_t
-709f0c4 osd: fix pg_interval_t int -> int32_t
-a5f9a09 Fixed build on 32 bits platforms
-f5a72b7 Added a couple of ASSERTS for avoiding coverity to complain about the possibility of a division by 0
-93df7da mds: set xattr_version to 0 if replay doesn't contain xattrs
-046c976 common/fd.cc: fix possible out-of-bounds write
-605d180 mount.ceph.c: fix strdup related memory leak
-7f7e56c scratchtool.c: fix resource leak and error handling
-bdb1346 scratchtool.c: fix resource leak
-48e38ac (origin/wip-refactor-cephtool-test) qa/workunits: cephtool: fix 'osd bench' test
-802290d osd: OSD: better explanation on 'max_count' calculation for 'osd bench'
-4b0809a qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled
-5c4616e qa/workunits: cephtool: set +e for the tcmalloc tests
-6725543 qa/workunits: cephtool: delete unnecessary function calls
-946bd0d qa/workunits: cephtool: disable bash debug when not running tests
-5d26575 qa/workunits: cephtool: allow running individual tests
-f418408 qa/workunits: cephtool: cleanup state after erasure-code-profile test
-780424d qa/workunits: cephtool: add/remove comments
-3d14a96 qa/workunits: cephtool: split into properly indented functions
-04658b7 qa/workunits: cephtool: move test line to where it's more appropriate
-db6cc13 qa/workunits: cephtool: split into functions
-3953053 (origin/wip-da-fix-make-check) test/ceph-disk.sh: fix for SUSE
-be70c1f osdmaptool/test-map-pgs.t: fix escaping to fix run
-dc1a4df Revert "Give meaningful error when submodules are not checked out"
-9695535 Make <poolname> in "ceph osd tier --help" clearer.
-76361b8 mon: simplify output
-385fd6c (origin/wip-disable-static) do_autogen.sh: --disable-static
-14085f4 (tag: v0.82) 0.82
-152bbd6 osd: workaround race condition in tests
-cb740b3 (origin/wip-mon-perf) mon: shut down perfcounters last
-524700f doc: Fix malformed parameters in librados.h
-56cad1a libcephfs/test.cc: fix use after free
-a5c704b RadosStriperImpl.cc: catch exception by reference
-6d79863 rgw/rgw_rados.h: use static_cast instead of c-style cast
-0b3a398 (origin/wip-8654) osd/OSD.cc: parse lsb release data via lsb_release
-d7350a3 (origin/wip-fix-rados-tool) rados.cc: fix pool alignment check
-2b007c2 (origin/wip-8624) mon: MDSMonitor: print pool name along with id during 'newfs' errors
-378b5ad qa/workunit: cephtool: test mds newfs and add_data_pool with ec pools
-d6f6813 mon: MDSMonitor: do not allow ec pools to be used for data or metadata
-20a1664 (origin/wip-mon-sanity-checks) common: LogClient: output to derr (i.e., dout(-1)) on CLOG_ERROR
-9804360 mon: Monitor: observe conf changes and report on unsage option values
-ec73888 mon: Monitor: sanitize options at start
-87f9dba Give meaningful error when submodules are not checked out
-58212b1 osd: Only normalize extent if op uses extent
-4225e2f (origin/wip-leveldb-stress) osd: remove OSD-specific leveldb options
-52b147c ceph-mon: override 'leveldb_*' config options for the monitor
-d42d19d mon: MonitorDBStore: remove mon-specific leveldb options.
-9844885 mon: DataHealthService: s/mon_leveldb_size_warn/mon_data_size_warn/
-57c5d05 (origin/wip-8610) osd: ignore CRUSH_ITEM_NONE in compat_must_dispatch_immediately
-d9073f4 (origin/wip-disk-ioprio) osd: allow io priority to be set for the disk_tp
-dd6badc common/WorkQueue: allow io priority to be set for wq
-1b87410 common/Thread: allow io priority to be set for a Thread
-a2b4911 common/io_priority: wrap ioprio_set() and gettid()
-8700aa0 test/libradosstriper/striping.cc: fix potential memory leak
-2a8c1e2 MDCache.cc: init 'umaster::ls' with NULL in contructor
-da03e9e MDCache.h: init 'umaster::safe' in constructor
-2210ee3 test/objectstore/store_test.cc: prefer ++operators for iterators
-3e93d4a osd: tests for osd bench
-74be320 Use sized integer.
-66a5f3b doc: Fixed Typo in pools documentation - replaced '-' with '_' in example set-quota comands.
-e189a66 (origin/wip-8603) log the command that is being run with subprocess
-78cbac4 mailmap: Dmitry Smirnov name normalization
-efefbfd mailmap: koleosfuscus affiliation
-1cdea98 mailmap: Walter Huf name normalization
-a58fbf7 mailmap: Colin Mattson affliation
-41c536f mailmap: Dominik Hannen affiliation
-1f96cb7 mailmap: Harpreet Dhillon affiliation
-3716f58 mailmap: Lluis Pamies-Juarez affiliation
-4222f29 mailmap: Wei Luo affiliation
-009f01d mailmap: Sahid Orentino Ferdjaoui name normalization
-06734f1 mailmap: Stephen F Taylor affiliation
-4344295 mailmap: Sushma Gurram affiliation
-2eddee7 mailmap: Sylvain Munaut affiliation
-22c028d mailmap: Red Hat acquires InkTank
-c270172 mailmap: Sebastien Ponce affiliation
-39a4b78 mon: test that pools used in tiers cannot be removed
-1de9071 (origin/wip-misc-fixes) osd/osd_types.cc: dump correct pg_log_entry_t member variable
-363496a osd: use appropriate json types instead of stream when dumping info
-97772c2 (origin/wip-tiermsg) mon: name instead of id in "has tiers" message
-4d5469a osd: ECMsgTypes: dump json bools instead of strings
-3f0ea95 osd: have 'tid' dumped as a json unsigned int where appropriate
-debaf61 mon: dump 'epoch' as json unsigned instead of int
-1a120e9 mon: PGMonitor: dump 'epoch' as json int instead of string
-317cf95 mon: OSDMonitor: dump 'up' as json array instead of string
-b7ff393 mon: OSDMonitor: dump 'acting' as json array instead of string
-78f94a9 mailmap: Ailing Zhang affiliation
-d2e852e doc: Fixed an incorrect flag in radosgw admin docs.
-741ad3f (origin/fix_ut) autotools: avoid check_SCRIPTS duplication
-c0d78c6 Fix dist package run unit test failed.
-b3ace76 tests: prevent gitbuilder trigger in test-erasure-code.sh
-3a9c0fc test: fix -Wsign-compare warnings
-b46c405 erasure-code: verify that rados put enforces alignment
-c35ceef ReplicatedPG: 'ajusted' typo
-de2c085 rgw-admin: Fix the 'show log' command
-304b08a enforce rados put aligment
-8d9201f tests: remove spurious and harmless find command
-cdca7b7 (origin/wip-osd-stats) osd: move osd_stat into OSDService
-4afffb4 osd: fix filestore perf stats update
-0985ae7 (origin/wip-backfill-priority) osd: prioritize backfill based on *how* degraded
-d20da8d osd: add osd_min_recovery_priority tunable
-b65ceb6 common/AsyncReserver: add a min_priority knob
-0e7a979 osd: fix word sizes in MBackfillReserve
-c4e8451 (origin/wip-scrub-sleep) osd: introduce simple sleep during scrub
-7b580a2 mon: Monitor: complex code deduplication algorithm applied to tick()
-0ed1fe6 mon: Monitor: rework tick() so we don't calculate the same thing over and again
-ef8a128 (origin/wip-6703) support dmcrypt partitions when activating
-7dc93a9   Fix EINVAL err when use "ceph tell osd.* bench"
-3ed7f2d (origin/wip-8593) mon: ensure HealthService warning(s) include a summary
-82e47db mon: refactor check_health()
-98883f6 mon: fix typos, punctuation for mon disk space warning(s)
-55a9778 mon/OSDMonitor: make down osd count sensible
-c5b5ed6 (origin/wip-ec-hitset) ceph_test_rados_api_tier: disable LibRadosTierECPP::HitSetWrite
-0bb0095 Revert "erasure-code: create default profile if necessary"
-f53bed1 mon/OSDMonitor: fix build error
-1c72465 osd: verify osd config sanity checks
-4bd1b5e PendingReleaseNotes: note about keyvaluestore-dev on-disk format change
-d93e74e common: Enforces the methods lru_pin() and lru_unpin()
-d48ed68 common: Fixes issue with lru_clear() + add new test
-62aa5c5 common: Adds simple tests to verify good behavior
-64f6232 (origin/wip-ceph-isatty) ceph: output prompt only if stdin is tty
-8d1cb8b (origin/wip-vstart-conf) vstart.sh: echo CEPH_{CONF,KEYRING} exports if necessary
-2eb1f55 vstart.sh: rename conf variable to conf_fn
-18f5807 Make KeyValueStore not use expected_write_size
-360de6a erasure-code: create default profile if necessary
-f3ec7d0 (origin/wip-osd-configs) osd: add sanity check/warning on a few key configs
-4786a48 osd: remove non const get_erasure_code_profile
-a1c13c5 tests: prevent kill race condition
-5c1f9aa osd: improve osd pool create error message readability
-6bf8183 erasure-code: consistent argument parsing for profiles
-3c63811 erasure-code: OSDMonitor::get_erasure_code is a const
-ff2eb23 erasure-code: pool create must not create profiles
-0d63cf2 (origin/wip-import-purge) qa: extend cephfs_journal_tool_smoke
-acd6ebb qa: set +x on cephfs_journal_tool_smoke
-ee487b4 tools/cephfs: Purge trailing objects during import
-ac05799 tools/cephfs: error handling in journal_export
-381163c tools/cephfs: Clean up waits in Dumper
-3fe1699 osd/OSDMap: do not require ERASURE_CODE feature of clients
-250677c osd/OSDMap: make get_features() take an entity type
-e29beff (origin/wip-8071) erasure-code: remove jerasure internals dependencies
-e720314 (origin/wip-doc-os-recommendations) doc: Updated the OS Recommendations for Firefly.
-2e3302c doc: Updated the example configuration.
-5a31df2 doc: Updated doc for more recent versions.
-2eab1c1 Update RBD doc for OpenStack
-a290d34 (origin/wip-fsx-sizeof) test_librbd_fsx: fix sign-compare gcc warning
-40c48bc qa: add script to test krbd setting ro/rw ioctl
-b2542f8 (origin/wip-8585) rgw: set a default data extra pool name
-94c8f70 doc: Made mention of "incomplete" status.
-29c33f0 qa: add an fsx run which turns on kernel debugging
-f978722 (origin/wip-xattr-spillout) FileStore: remove the user_only param from _fgetattrs
-bb4e3a9 FileStore: remove user_only options from getattrs through the ObjectStore stack
-fbe6009 FileStore: do not use user_only in collection_getattrs
-7267a37 FileStore: remove dead code
-e3b995e FileStore: set XATTR_NO_SPILL_OUT when creating new files.
-239476a FileStore: make _clone() copy spill out marker
-af8052b Add xattr test to ceph_test_objectstore
-d9fac9c (origin/wip-7774-3) rgw: chain to multiple cache entries in one call
-c616358 rgw: chain binfo_cache to multiple cache entries
-7e81185 rgw: bucket info uses cache chaining
-a2f6709 rgw: user info uses cache chaining
-ab764f3 rgw: an infrastructure for hooking into the raw cache
-7fb6a3d rgw: cache bucket info
-eaff42f rgw: cache decoded user info
-0bbeeee PG: Added a const spg_t member to the PG class The const spg_t member is been insantiated from constructor and now get_pgid() can reference this to return a spg_t instance without the need of pg_info (thus not requiring to acquire pg_lock).
-85e491f doc: Added a tip to install NTP when running multiple monitors.
-d37ef6a doc: Added additional background to address additional states.
-b7f6147 doc: Added background discussion to clock settings.
-ecbb005 OSD: The thread pool variable name changed The variable names are more meaningful now. op_tp -> osd_tp and op_sharded_tp -> osd_op_tp
-2a5d83d ShardedTP: The config option changed The config option for sharded threadpool is changed to osd_op_num_threads_per_shard instead of osd_op_num_sharded_pool_threads. Along with osd_op_num_shards this will be much more user friendly while configuring the number of op threads for the osd.
-a0e48b8 ShardedTP: Changes related to conforming to Ceph coding guidelines
-2e3f4bc doc: Fixed typo.
-6733947 Fix for bug #6700
-a4923f5 (origin/wip-warnings) fix compilation warnings
-63cc7f9 Add test for objectstore
-50c8fee Fix write operation on a deleted object in the same transaction
-737c13e Remove SequencerPosition from KeyValueStore
-ef06515 doc: fix typo in erasure coding section
-1080e7a Add upper limit to the write size of set_alloc_hint in KeyValueStore
-6a7e201 (origin/wip-8554) init-ceph: continue after failure doing osd data mount
-1f99cda (origin/wip-mon) mon: gather perf stats on elections
-8f36d96 mon: gather perf stats on session adds, removes, counts
-ecda2fe OSD: move waiting_for_pg into Session
-1f40c35 Add set_alloc_hint test to ceph_test_objectstore
-5dd9b2a Make KeyValueStore support set_alloc_hint op
-b0c66a7 doc: Fixes spelling errors on README
-910d73c Added RPM and debian packaging for libradosstriper, creating a new package called libradosstriper1
-fa01ca6 Added unit test suite for the Rados striping API.
-d160ce2 Implementation of the radosstriper interface.
-a6c34e4 (origin/wip-flag-known-redirs) osdc/Objecter: mark all ops as known-if-redirected
-bc3b30e (origin/wip-set-extsize-fix) XfsFileStoreBackend: call ioctl(XFS_IOC_FSSETXATTR) less often
-750b1db XfsFileStoreBackend: nuke redundant goto in set_extsize()
-524a155 (origin/wip-rgw-manifest-iter) rgw: reduce calls to rgw_obj.set_obj()
-e31d3fe doc: Descrption => Description Correct spelling error.
-0ca43d8 doc: Use write_full for C++ example Latest version of librados uses write_full when writing entire object.
-0bd6f67 OSD::calc_priors_during: handle CRUSH_ITEM_NONE correctly
-2081c99 (origin/wip-i386-atomic) include/atomic: make 32-bit atomic64_t unsigned
-64e99d8 ceph-objectstore-test: fix warning in collect_metadata test
-e1ad0bf Added a striper interface on top of rados called radosstriper.
-7ceeb9f Completed librados documentation of rados_write_op_cmpxattr and rados_read_op_cmpxattr concerning their error reporting
-62064f3 Added const qualifiers for the layout argument of file_to_extents and object_truncate_size
-8c12491 Fixed usage of rhel_version in spec file : it should have been rhel
-f92d7bb Fixed missing include of assert.h in RWLock interface
-b9a35b3 Extracted RadosXattrIter from librados.cc into independent .h anc .cc files. This makes this interface usable by clients of librados.
-aede832 (origin/wip-os-rename) os: rename get_*() -> decode_*()
-5bb078f (origin/wip-sahid-dist) Populate ChangeLog when distribute
-b22cc85 Populate AUTHORS when distribute
-d76936b OSD::calc_priors_during: fix confusing for loop bracing (cosmetic)
-59d727d (origin/wip-da-SCA-20140604) kv_flat_btree_async.cc: remove consecutive break after return
-82f5df4 JournalScanner.cc: catch exception by reference
-53533ee KeyValueStore.cc: silence gcc -Wunused-variable
-e24213e MemStore.cc: silence gcc -Wunused-variable
-51abf20 Revert "Remove unused variables in MemStore.cc"
-a325e3e Revert "Remove unused variables in KeyValueStore.cc"
-cac902e os/KeyValueStore.cc: fix possible null pointer deref warning
-3ee3e66 librbd/internal.cc: check earlier for null pointer
-f17a963 test/librbd/fsx.c: fix gcc warning
-f31e4c8 (origin/wip-da-update-libs3) libs3: update to latest git master of ceph/libs3
-18c07ec common/addr_parsing.c: fix realloc memory leak
-5f86652 daemon_config.cc: add some more asserts
-703d0eb (origin/wip-8452-2) rgw: set meta object in extra flag when initializing it
-23b657c Remove unused variables in KeyValueStore.cc
-307ba48 Remove unused variables in MemStore.cc
-5185a36 (origin/wip-autotools-dummy) automake: add dummy.cc to fix 'make tags'
-35509d2 bloom_filter, add test to validate assignement operator
-c50f85e bloom_filter, remove unecessary operators
-90cc6dd bloom_filter, add assertion to test validate element_count()
-c323c5b Fix keyvaluestore fiemap bug
-3ec32a6 (origin/wip-8447) librados: simplify/fix rados_pool_list bounds checks
-5569d40 documentation: add osd erasure-code-profile {set,rm,get,ls}
-8ff4edd documentation: update osd pool create erasure
-22bc886 (origin/wip-rbd-doc-fix) doc: fix 'rbd map' example
-4f834fa doc/release-notes: v0.81
-f4e81d3 librbd: clarify license header
-884a6b3 RadosClient: Avoid the DispatchQueue for OSD responses.
-0cc9ade doc: Updated monitor output and added usage calc explanations.
-9c32cb2 doc: Added usage for pool quotas.
-86754cc doc: Added more discussion of new CRUSH types.
-cabb8f0 doc: Added a section for ceph df.
-8de9501 (tag: v0.81) 0.81
-4bc5aef doc: Updated packages to reference firefly.
-c18cbef (origin/wip-runxfstests) qa: add run_xfstests_krbd.sh wrapper
-cd65246 qa: catch up with xfstests changes
-703166c qa: cp run_xfstests.sh run_xfstests-obsolete.sh
-601e25e erasure-code: Ceph distributed storage system
-9bac31b scripts/run-coverity: don't explicitly specify tool version
-e158ad9 erasure-code: make decode_concat virtual
-6aa45b1 common: s/stringstream/ostream/ in str_map
-319cb50 Make KeyValueStore support "ceph osd perf" command
-06c0a42 Update INSTALL to mention the submodules/recursive
-2dbd85c (origin/wip-sharded-threadpool) WorkQueue: The variable name is corrected. Modified the variable name from shardedpol_cond->shardedpool_cond
-3e3632e WorkQueue: Removed the unused in_process variable
-b05da1c WorkQueue: Taking care of potential race condition during pause() Introduced two variables to keep track of number of threads paused and drained during threadpool pause/drain. The pause()/drain() call is waiting till number of pause/drain threads equals to toral number of thread pool threads.
-b15bf6b OSD:Derived sharded queue implementation is changed All the threadpool related stuff like stop/pause/drain etc. are not handled by sharded queue anymore. All it is implementing are related to processing,enqueue , signaling of waiting threads and shard queue status. The pg ordering is been taken care of by introducing a map <pg,op> in each shard.
-c24ef00 ceph-common: The Sharded threadpool worker logic changed Now, the _process() of the derived queue is processing one request at a time and the outer loop is controlled by the sharded threadpool. The stop/pause/drain functionalities are controlled by the sharded TP.
-06845d0 OSD: Sharded Op worker queue implementation for handling OSD ops This is the implementation for the client of the sharded thread pool/sharded workQ. Removed the op_wq class and now OSD ops are going through sharded workqueue model which is used by the sharded threadpool. Derived ShardedOpWQ implementation has a data structure called ShardData which has it's own lock/cond and storage. ShardedOpWQ holds a vector of that and the size of the vector is a config option. During enqueue  [...]
-8369c08 ceph-common: Implementation of the sharded threadpool. Threadpool will only be having a single work queue and internally the work queue will be having multiple storage data structures. Based on some logic (which is derived class implementation specific) the work queue will shard the requests among these storage structures. Each storage will be guarded by finer grained sunchronization objects. Sharded threadpool threads will be assigned to work on a shard based on some algorithm w [...]
-83ccba3 (origin/wip-sock-cmp) msg: remove comparison operators for sockaddr_storage
-70afaaa (origin/wip-8452) rgw: fetch object attrs on multipart completion
-669b605 PGLog: initialize complete_to
-b300318 (origin/wip-8311) rgw: if extra data pool name is empty, use data pool name instead
-38405d3 (origin/wip-8265) qa/workunits/cephtool: test setting options using SI units
-5500437 common/config.cc: allow integer values to be parsed as SI units
-40587d4 test/strtol.cc: Test 'strict_strtosi()'
-67dc575 common/strtol.cc: strict_strtosi() converts str with SI units to uint64_t
-9c56c86 rgw: calc md5 and compare if user provided appropriate header
-cae085b (origin/wip-8472) msg_types.h: Don't use strncmp for comparing sockaddr_in.
-00b9211 doc: Improve man page for rados bench
-2da2699 doc: update pools documentation
-ab59a10 doc: Improve man page for bench
-0fd6e12 osd: replace shard_t usage with shard_id_t
-dedd8e2 osd: explicit shard_id_t() and NO_SHARD
-20e66d1 osd: loop over uint8_t instead of shard_id_t
-d723cac osd: factorize shard_id_t/shard_t into a struct
-dcf9568 doc: Define RADOS in glossary
-e52b9c6 doc: Added osd pool default size setting example.
-20a04c6 doc: Moved redundant text out of quick-common.
-6786d60 common: WRITE_{EQ,CMP}_OPERATORS_1
-8679cdb osd_types: add pg_log_t::rollback_info_trimmed_to
-f1b890e (origin/wip-8465) osd: fix bad is_active() assert in share_map()
-f153bc1 doc: Made additional changes s/CRUSH/Ceph for pull request #1855
-c08f481 doc: alter doc CSS for the removal of Apex Sans
-7f46b7b doc: removed Apex Sans font, replace with font from GFE
-692f998 doc: Fixes broken hyperlinks
-93a61df (origin/wip-8259) Makefile: make install-deps rule
-6fe7564 debian: improve package dep list
-e06c58c (origin/wip-smart-df) mon: set min_size to data chunk count for erasure pools
-7a9652b mon: include 'max avail' in df output
-2f63a30 mon: right justify df values
-2339d4a vstart.sh: -e to create an ec pool called 'ec'
-297f616 crush: add get_rule_weight_map
-0b5a674 rest-api: key missing for per "rx" and "rwx"
-634780a (origin/wip-8321) remove unused variables, gets all tox envs passing
-23b75b5 add backport of collections.Counter for python2.6
-59b7113 intial take on ceph-brag-client and tox. Python 2.7 passes
-bc85b5d mailmap: Aristoteles Neto affiliation
-0b88659 mailmap: Chris Glass affiliation
-7582fa9 mailmap: Christian Theune affiliation
-b2cb36f mailmap: Shawn Edwards affiliation
-e65b7e2 mailmap: Ilya Dryomov name normalization
-e4928c5 mailmap: Stuart Longland affiliation
-dbc66d7 mailmap: Walter Huf affiliation
-6338542 mailmap: Michael Riederer affiliation
-831b2c9 mailmap: Stefan Eilemann affiliation
-1f22590 mailmap: Stephen F Taylor affiliation
-be9f743 mailmap: Daniel J. Hofmann affiliation
-c758584 mailmap: Kevin Dalley affiliation
-7d1a493 mailmap: Florent Flament affiliation
-2815e4d (origin/wip-tier-doc) doc: Fix cache tier docs
-08b3cff os: FileStore::create_backend unit tests
-3081652 os: ObjectStore::collect_metadata unit tests
-97023dc (origin/wip-reweight-tree) mon/OSDMonitor: simplify 'osd crush reweight ...' flow
-576315a mon/OSDMonitor: add 'osd crush reweight-subtree ...'
-2916148 crush: add adjust_subtree_weight()
-4021fb6 osd/: move split_list and split_request into OSD
-26862ca Fix Documentation Typo
-d4e8119 doc: Added primary affinity. Some minor rewrap edits.
-1ac3a50 (origin/wip-8292) better error reporting on incompatible device requirements
-c2225f8 mon: fix set cache_target_full_ratio
-4c22c6f (origin/wip-pybind-timeout) pybind/rados: Fix timeouts for small t
-1e0a82f (origin/wip-map-advance) osd: fix map advance limit to handle map gaps
-641732d documentation: update pid file description
-c9ff481 Improvements to radosgw docs - Correct a typo (`rados-admin`) in admin docs - Reorder sections in config so "above example" is in expected position
-e741ea4 os/FileStore: include filestore backend, f_type in osd metadata
-827df7d Fix Doc Typo
-9312c5e os/FileStore: refactor backend instantiation
-3cf723c os/FileStore: fix journal-less operation
-200d0ae (origin/wip-multipartition) ceph-disk: Enable creating multiple osds per dev
-2ceb13a (origin/wip-8428) rgw: check appropriate entity permission on put_metadata
-ab0db34 documentation: adapt PG formula for erasure coded pools
-d3af8fa Update architecture.rst:Calculating PG IDs
-99b9682 documentation: update osd pool default size from 2 to 3.
-4d4b77e (origin/wip-java-build) cephfs-java: build against older jni headers
-6069ff0 doc/release-notes: v0.67.9
-f51e33b (origin/wip-librbd-flush) Avoid extra check for clean object
-9235dcb (origin/wip-mon-get-version) mon: set MMonGetVersionReply tid
-ba53889 README: move package dependencies into separate files
-77066a2 README: clean up some whitespace
-c08adbc Fix set_alloc_hint op cause KeyValueStore crash problem
-d04b386 (origin/wip-8342) init-ceph: if we fail to set an OSD's crush position, continue
-46f1eb6 init-ceph: continue loop immediately on daemon start failure
-3bbe29e common/Finisher: add queue(list<Context*>&)
-c2644b2 Update manual-deployment.rst
-74218f3 Define AO_REQUIRE_CAS (fixes FTBFS on 'hppa')
-fb504ba (origin/wip-8373) mon: Fix check of ruleset id on pool update
-1d9e4ac mon: Fix default replicated pool ruleset choice
-799f76a (origin/wip-client-time) mds: remove unused Mutation::now
-8768857 mds: use mds_stamp for mksnap
-d4bfa39 mds: reset mds_stamp for readdir, rename, link
-a09547b mds: use real timestamp for readdir leases
-9c86a11 mds: use client-provided time stamp for user-visible file metadata
-4a6596e mds: do the balancer and propagation timers based on mds_stmap
-fd1f9bd mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp
-29c6844 mds: make sure mds_stamp is set when we journal
-3569e80 mds: set mds_stamp on lock acquisition
-e4c9c34 mds: add {mds,op}_stamp to Mutation
-401319a (origin/wip-buildroot) ceph.spec.in: remove BuildRoot
-93a5b88 (origin/wip-journal-tool) tools/cephfs: error handling in EventOutput
-3207c50 osdc/Journaler: fix obj count in Journaler:erase
-2621b5d tools/cephfs-journal-tool: handle --help cleanly
-d66fa53 tools/MDSUtility: fix crash on bad config
-708c4ed tools/JournalTool: update usage()
-3bef125 qa: Add smoke test for cephfs-journal-tool
-b76e64b tools/JournalTool: Fix 'header set' corner case
-5d913e2 mds: Create JournalPointer in MDLog::create
-bac434d mds: Make EMetaBlob::dirlump::_decode_bits const
-1c2bb37 osdc: new style encoding for Journal::Header
-f609a0a osdc: Simplify JournalStream::read
-f12b9e8 osdc: make JournalStream::readable const
-778b785 osdc/JournalStream: DRY envelope size calc
-45c319e doc: Update ceph-mds manpage
-423dafe osdc/Journaler: use pointers for out params
-fc1d6da tools/cephfs: Update for JournalPointer
-d52eeab Fix JournalStream::read length assertion
-5c2a640 osdc/Journaler: include stream_format in dump()
-68b2009 mds: Introduce mds_journal_format config setting
-aec4c93 tools: update Dumper to use JournalPointer
-1612677 mds: Generalize JournalPointer functionality
-8b0383e dencoder: add JournalPointer to types.h
-a4ae168 mds: add atomic log rewrite on format change
-dba721f osdc: Add Journaler.erase
-c73902b osdc/Journaler: privatize members
-405cb85 osdc: fix redundant branch
-e7fa5be osdc: Clean up journalstream readable check
-79a1e58 mds/CDir: remove redundant inode enc/dec
-49add98 docs: Add cephfs-journal-tool
-5011945 gitignore: Add cephfs-journal-tool
-7e4da00 debian: add cephfs-journal-tool to ceph-mds
-403e028 rpm: add cephfs-journal-tool to RPM build
-f7e9ff1 tools: Create cephfs-journal-tool
-107821f Fix formatting of header
-ad2e20f client: set timestamp in MDS requests
-a91e072 mds: include timestamp in MClientRequest
-d71839a (origin/wip-doc-openstack) doc: clarify openstack cow sentence
-0f7f1e8 doc: note cinder multi-backend restriction
-e92f2d9 doc: link to ephemeral rbd patches
-13d6c3c doc: quick-ceph-deploy cleanup Improve documentation in quick-ceph-deploy.rst Use admin-node consistently. ceph should be installed on admin-node for the following reasons:  "ceph-deploy admin admin-node" assumes that /etc/ceph exists.  "ceph health" requires the use of ceph
-d40ba05 doc: mention admin-node in common documentation
-29f615b (origin/wip-8334) ReplicatedPG::start_flush: fix clone deletion case
-5ff95db (origin/wip-8332) HashIndex: in cleanup, interpret missing dir as completed merge
-bc897b8 rados.py: clarify recent change on write return value
-6372118 doc: Clean up pre-flight documentation Mention recent Ceph releases. Move important message about sudo and ceph-deploy closer to the use of ceph-deploy. Mention files created by ceph-deploy comment Separate apt-get from yum command
-06d05fd doc: fix link to FAQ The location of the ceph wiki FAQ has changed. Now, the link from ceph documentation matches the current FAQ location
-03e3ccd doc: Restored glance_api_version=2 setting.
-e8756be (origin/wip-8380-b) osdc/Objecter: flag ops that have been redirected
-cf2b172 (origin/wip-8380) osd: skip out of order op checks on tiered pools
-e47049b erasure-code: fix URL in developer notes
-23787ba mailmap: Sahid Orentino Ferdjaoui affiliation
-30ae96a Ensure autogen.sh to be executed at the top-level
-fb8f469 mds: add getter for ESession.client_inst
-730a011 mds: Add getter for EMetablob.client_name
-220f9c9 mds: Add EMetaBlob::get_dentries
-f4927f0 mds: switch __u32 with LogEvent::EventType typedef
-c1b185b mds: Add LogEvent::str_to_type
-e7f4b9e mds: Fix Dumper::undump (missing lock)
-96720b6 mds: Add EMetaBlob::get_inodes
-b3e57ba mds: Publicize some EMetaBlob members
-2282739 mds: Refactor CINode encoding into CInodeStore
-bf7b84c mds: Add get_metablob to LogEvent
-e56b88f mds: Add ENoOp for padding journals
-74ac6e4 mds: Add get_paths method to EMetaBlob
-3fa825c osdc: Revise Journaler format
-928d0f5 mds: Fix typo 'Sesion'
-e3a9f66 objecter: Don't warn on multiple admin sockets
-d4a250c common: Add write_stream(ostream) to bufferlist
-5b20deb mds: Add LogEvent::get_type_str()
-d776ec4 (origin/wip-multimds) mds: queue waiters in MDCache::force_dir_fragment()
-b223055 mds: fix remote auth pin race
-57c89bf mds: fix Server::submit_mdlog_entry()
-f19cd4f mds: drop locks after removing import/export state
-0bd4fa2 mds: try trimming exported objects
-affce7a mds: journal rename source inode when rollback rename
-0c14878 mds: allow early reply when there is no journaled slave update
-6fe7d17 mds: skip journaling slave rename when possible
-3783653 mds: include all of directory inode's replicas in rmdir witnesses
-08b79ea mds: journal EImportFinish after adjusting subtree auth
-c18da04 (origin/wip-osd-refs) osd: fix narrow session refcount race
-2c4391b osd: fix session leak in ms_handle_fast_connect
-15350de Add header cache to DBObjectMap
-ee92a39 MDS: add admin socket cleanup on shutdown
-a78b14e (origin/wip-osdmon-pa-wait) OSDMonitor: set next commit in mon primary-affinity reply
-6dfc544 sample.ceph.conf: minor update
-290ac81 (origin/wip-osdmap-sub-bug) OSD: fix an osdmap_subscribe interface misuse
-6ec3c46 (origin/osd-metadata) osd: include osd_objectstore in metadata reported to mon
-405063b workunits: provide some output in the dirfrag.sh test
-aec5634 (origin/wip-8104) osd_types: remove the pool_id argument from (is|check)_new_interval
-f47c160 PG: replace is_split, acting_up_affected with should_restart_peering
-2ee3551 osd_types: factor out is_new_interval from check_new_interval
-c48a4ef (origin/wip-perf-atomic) common/perf_counters: use second atomic to make counters safe to read
-ab907c5 doc: Clarified Debian uses sysvinit.
-c71c292 doc: Added rgw print continue guidance.
-b082fd6 doc: Minor edit.
-ca833bd doc: Added clarifying text to CRUSH add command.
-48337e0 doc: Omitted glance_api_version=2 to fix creating images from volumes.
-17930a1 doc: Changed example to use virtio and put key usage into one line.
-8dd1190 Improve Bash completion for various tools
-00225d7 test: fix some templates to match new output code
-20aad8f doc: update instructions for RPM distros
-26151ec (origin/wip-mds-misc) mds: lower IO priority of storing backtrace
-019483f mds: reduce verbosity of handle_client_file_{readlock,setlock}
-ca313c2 mds: add a Server::submit_mdlog_entry() to provide event marking
-9f0825c (origin/wip-8338) OSD: verify that client ops are targeted correctly in the current epoch
-7411477 (origin/wip-8011) ReplicatedPG: block scrub on blocked object contexts
-2ec2182 ReplicatedPG::start_flush: send delete even if there are no snaps
-ca91743 Locker: mark_event in acquire_locks() when blocking or succeeding
-2df68b6 Server: mark events when journaling and replying
-a6aa812 MDCache: mark ops at various finish points
-87f6cd4 MDS: add an OpTracker and use it
-b277802 Mutation: add an MDRequestParams struct and use that when building MDRequests
-ae80a1f MDS: add stubs for an AdminSocketHook
-0d89e5c MDCache: pass the causative message to request_start_slave()
-06d6d32 mds: remove a couple leftover declarations of MDRequest
-428319e doc/release-notes: v0.80.1
-19f8849 doc: Improvements to qemu installation.
-6e4455d doc: Added note on Default requiretty for CentOS and others.
-8b682d1 (origin/java-gcj) prioritise use of `javac` executable (gcj provides it through alternatives).
-89fe035 pass '-classpath' option (gcj/javah ignores CLASSPATH environment variable).
-0f4120c look for "jni.h" in gcj-jdk path, needed to find "jni.h" with gcj-jdk_4.9.0
-2001572 mds: deny reconnect for closed session
-59f539c mds: revert EMetaBlob::{fullbit,remotebit,nullbit} encoding optimization
-f35648b mds: properly clear new flag for stale client cap
-58ee556 mds: propagate inode rstat if it has never been propagated
-54a9037 mds: avoid journaling unnecessary dir context
-1f92f55 mds: cleanup usage of MDCache::predirty_journal_parent()
-3d7f527 (origin/wip-da-SCA-20140510) BtrfsFileStoreBackend.cc: fix ::unlinkat() result handling
-5f89128 TestLFNIndex.cc: remove unused variable 'mangled_name'
-a445529 rgw_user.cc: remove dead assignment in generate_key()
-b119679 rgw_user.cc: cleanup RGWAccessKeyPool::check_op()
-b731c47 rgw_rados.cc: remove dead assignment / unused variable 'obj_name'
-10e6d6e rgw_main.cc: remove dead assignment and unused variable
-d2d6b0f PGMap.cc: remove dead assignment
-cd611b4 MDBalancer.cc: remove some since 2009 unused code
-6cda1e1 chain_xattr.cc: fix memory leak, free 'expected'
-1d39b11 confutils.cc: remove unused variable 'val'
-1cac491 SyntheticClient.cc: remove double check for "getdir"
-5e05aca rgw_op.cc: reduce scope of 'int r' in execute()
-f45a50f rgw_op.cc: use static_cast instead of c-style cast
-8f90cd2 rgw_quota.cc: remove unused variable 'key'
-4753ae8 test_rgw_admin_log.cc: prefer ++operators for iterators
-218b6d8 test_cls_rbd.cc: use 'delete []' if 'new char[len]' was used
-20455a6 test_rgw_admin_log.cc: prefer empty() over size() for emptiness check
-d69fd90 test_rgw_admin_opstate.cc: prefer ++operators for iterators
-0f899c8 test_rgw_admin_meta.cc: prefer ++operators for iterators
-f523d64 TestErasureCodePluginJerasure.cc: prefer ++operators for non-primitive types
-014f050 test/ObjectMap/KeyValueDBMemory.cc: use empty() instead of size()
-d9fff40 (origin/wip-old-out) mon: restore previous weight when auto-marked out osd boots
-87722a4 mon: remember osd weight when auto-marking osds out
-45281d9 common/perf_counters: use atomics instead of a mutex
-bf3ba60 atomic_t: add atomic64_t
-b24b77a FileStore.cc: remove some dead assignments
-39c071f (origin/wip-update-gitignore) .gitignore: ignore files generated by ctags on topdir
-e847d56 add gitignore for wireshark subdir to track *.patch only here
-b9cf708 .gitignore: add some patch/diff related files
-f067013 .gitignore: add no longer used mkcephfs
-ea69f6b cls_kvs.cc: return 'r' from get_idata_from_key()
-574a940 cls_kvs.cc: remove dead assignment
-36c1c97 rgw_user.cc:
-a121d01 libcephfs.cc: fix possible NULL pointer deref
-76568aa (origin/wip-8305) Objecter::_op_submit: only replace the tid if it's 0
-94773ac osd/OSD.cc: fix possible NULL pointer deref in share_map()
-0d67f9b osd/ReplicatedPG: do not queue NULL dup_op
-79c6491 mds/flock.cc: remove dead initialization of 'new_lock_end'
-e8b4789 mds/flock.cc: remove dead initialization of 'new_lock_start'
-5199c14 mds/Server.cc: remove unused initialization of 'destdnl'
-63d92ab mon/OSDMonitor: force op resend when pool overlay changes
-45e79a1 osd: discard client ops sent before last_force_op_resend
-dd700bd osdc/Objecter: resend ops in the last_force_op_resend epoch
-b3203e5 rbd.cc: remove used parameter from set_pool_image_name()
-fe75075 test_librbd.cc: fix sizeof() in malloc call
-eb2def8 CrushWrapper.cc: fix sizeof() call in calloc
-11e5eef (origin/wip-5021) client: fix whitespace in stat relpath
-cdbe6cf client: use __func__ instead of incorrect function name in insert_readdir_results
-3eb2a77 client: make less noise when unlinking during readdir
-d1c872d client: invalidate dentry leases when unlinking
-d852a69 client: audit unlink() callers
-3b867d3 TrackedOp: create an "initiated" event on construction
-bdee119 msg: Fix inconsistent message sequence negotiation during connection reset
-b5e4cd1 osd: fix MOSDMarkMeDown name
-6b858be (origin/wip-8319) osd: handle race between osdmap and prepare_to_stop
-b640301 osd: fix state method whitespace
-ba01445 Fixed missing initializers issues
-60b1071 Removed extra semicolons
-5986f74 :doc Ceph OSD is standard name This is a method of standardizing the usage of OSD so that "Ceph OSD" is the daemon, and OSD maintains its industry standard usage of Object Storage Device.
-ddc2e1a (origin/wip-8169) rgw: calculate user manifest
-589b639 (origin/wip-7588) osd/ReplicatedPG: carry CopyOpRef in copy_from completion
-db4ccb0 ReplicatedPG: block scrub on blocked object contexts
-3152faf osd/osd_types: add last_force_op_resend to pg_pool_t
-0f19626 (origin/wip-6966) ceph-disk: partprobe before settle when preparing dev
-5690232 (origin/wip-da-sca-20140507) rbd-fuse.c: remove ridiculous linebreak
-7a3724b rbd-fuse.c: fix indentation
-8101f98 rbd-fuse.c: fix -Wmissing-field-initializers
-65ca867 (origin/wip-krbd-fixes) krbd: fix sysfs path in the comment
-f1d953e krbd: match new with delete, not free()
-082367e rbd.cc: init 'snap_protected' to fix -Wconditional-uninitialized
-0d01563 rbd-fuse.c: init 'rbd' in open_rbd_image()
-cfc885f ObjectCacher::_wait_for_write(): init 'bool done'
-8322878 Objecter::calc_target(): init best_locality with 0
-13750a1 (origin/wip-jcsp-clang) rgw: Remove trailing ; from fn definitions
-447335a os/FileJournal: remove unused attribute
-f0231ef mon: Fix % escaping (\% should be %%)
-d85b8fa mds: Remove redundant 'using namespace std'
-3fd8712 encoding: make .size() to __u32 cast explicit
-6b15ce1 fragtree: remove unused and broken verify()
-8584b40 fragtree: remove dead code
-b4b79eb remove superfluous second semicolons at end of lines
-1214257 msg: fix some -Wextra-semi warnings
-9ad6042 crush/builder.c: remove some unreachable return statements
-34e27e4 mds: remove unused MMDSCacheRejoin::{MISSING,FULL}
-1f60060 mds: properly wake up dentry waiters after fragmenting dirfrag
-5fa2bae mds: choose MIX state if replica of scatterlock is in MIX state
-3ca0d01 mds: switch flushing ScatterLock to dirty ScatterLock after cache rejoin
-8f3409d client: unlink dentry on traceless rmdir, unlink reply
-627e644 client: do not manually clean up on unlink/rmdir
-727ad64 client: refactor _lookup; fix NULL dentry case
-635607f client: skip insert_trace on safe requests
-f1d412c doc: Common graph used in 2 quick start files
-d130763 vstart.sh: fix client admin socket path
-0ee409b (origin/wip-7553) osd: Remove classic scrub code since Argonaut osd can't join
-81c7418 ECUtil.h: clarify calculation with braces
-13f54b7 PG::start_peering_interval: use check_new_interval for same_interval_since
-5752d76 rgw_acl_swift.h: fix #define header guard
-8059c9f rgw_rest_metadata.cc: fix -Wparentheses-equality
-8a0c016 ReplicatedPG.cc: fix -Wparentheses
-a0f59df test_rgw_manifest.cc: fix VLA of non-POD element type
-817985b (origin/wip-fsx-krbd) test_librbd_fsx: align temporary buffers allocated in check_clone()
-ab9de9c test_librbd_fsx: wire up O_DIRECT mode
-c4a764c test_librbd_fsx: fix a bug in docloseopen()
-421e6c5 test_librbd_fsx: add krbd mode support
-d5daf71 test_librbd_fsx: add a flag to disable randomized striping
-fef984b test_librbd_fsx: add holebdy option
-d63808e test_librbd_fsx: make resizes sector-size aligned
-3513ba0 test_librbd_fsx: use posix_memalign() to allocate aligned buffers
-7df50ec test_librbd_fsx: align temp_buf by readbdy instead of writebdy
-d13e32e test_librbd_fsx: move prterrcode() and simple_err()
-8d41f86 test_librbd_fsx: update usage
-99400f8 (origin/wip-da-cleanup-includes) osdmaptool.cc: cleanup included headers
-a5e0d80 monmaptool.cc: cleanup included headers
-537385c ceph_osdomap_tool.cc: cleanup included headers
-d57561a ceph_monstore_tool.cc: cleanup included headers
-e2e3d1d ceph_filestore_tool.cc: remove not needed includes
-ea6df88 ceph_kvstore_tool.cc: cleanup includes
-8620609 ceph_filestore_dump.cc: cleanup includes
-16e86ae mon_store_converter.cc: remove not needed includes
-2c33ace dupstore.cc: remove not needed include of <iostream>
-b1f4cd4 rest_bench.cc: remove not needed includes, re-order includes
-bc166f3 psim.cc: remove not used includes
-de252c1 scratchtool.c: remove not needed include of <pthread.h>
-4da8894 radosacl.cc: remove include of <iostream>, re-order includes
-24a047e ceph_conf.cc: cleanup includes, remove not needed headers
-c0dcd23 ceph_authtool.cc: remove not needed includes
-e2b4d41 ceph_monstore_tool.cc: remove not needed includes
-8ab3232 rgw_admin.cc: remove twice included header, resort includes
-ddb9ce0 MDSMonitor.cc: remove twice included header, resorted includes
-a8a2b56 AuthMonitor.cc: remove twice included header, resorted includes
-71b340a ceph_osdomap_tool.cc: remove some twice included headers
-e66aec6 ceph_monstore_tool.cc: remove twice included headers
-f9a91f2 Update doc to reflect the bahavior change for filestore_merge_threshold setting.
-0d3cdb9 test/libcephfs/test.cc: free cmount structure before return
-8fa5408 client: handle traceless rename in insert_trace, not verify_reply_trace
-334c43f client: avoid blindly removing dentries
-25d2469 client: leave NULL dentry in place on ENOENT during lookup
-cc65c39 client: add debugging around traceless reply failures
-545d8ad (origin/wip-8269) rgw: extend manifest to avoid old style manifest
-9968b93 (origin/wip-8299) rgw: fix stripe_size calculation
-6c2b173 mds: handle export freezen race
-a09070a mds: allow negetive rstat
-22abd7b mds: cancel fragmenting dirfrags when cluster is degraded
-6e3501b mds: fix _rollback_repair_dir()
-da17394 mds: fix root and mdsdir inodes' rsubdirs
-5283d80 mds: ignore stale rstat/fragstat when splitting dirfrag
-4e844c9 mds: encode dirfrag base in cache rejoin ack
-f754106 mds: fix-up inode's fragstat/rstat according its dirfrags
-a2caea7 mds: clear aborted flag before rollback slave requests
-a85bf8c mds: remove mdsdir in the final step of shutdown MDS
-c4f0f05 mds: tolerate bad sessionmap during journal replay
-f386e16 mds: pre-allocate inode numbers less frequently
-6d6d188 mds: fix frozen inode check in MDCache::handle_discover()
-7a066f8 mds: include authpinned objects in remote authpin request
-5b86a13 mds: send dentry unlink message to replicas of stray dentry
-7d1fd66 mds: maintain auth bits during replay
-09beebe (origin/wip-7157) ceph-disk: fix list for encrypted or corrupt volume
-bd8e026 rgw: don't allow multiple writers to same multiobject part
-03b0d1c (origin/wip-8289) rgw: cut short object read if a chunk returns error
-2d5d309 Pipe: wait for Pipes to finish running, instead of just stop()ing them
-6ec99f7 (origin/wip-rbd-clang) librbd: check return value during snap_unprotect
-6f2edda ObjectCacher: remove useless assignment
-3e387d6 (origin/wip-8296) osd/ReplicatedPG: fix whiteouts for other cache mode
-5cc5686 (origin/wip-8170) rgw: send user manifest header field
-e65a9da Revert "Fix installation into user home directory, broken by d3f0c0b"
-b78644e (tag: v0.80) 0.80
-cdbbf86 doc: Fixed artifacts from merge.
-a31b9e9 doc: Added sudo to setenforce. Restored merge artifact.
-5158272 doc: Added erasure coding and cache tiering notes. Special thanks to Loic Dachary.
-08a4e88 Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>
-ae434a3 (origin/wip-8290) client: check snap_caps in Incode::is_any_caps()
-4bf20af SimpleMessenger: Don't grab the lock when sending messages if we don't have to
-b038f0c OSD: rename share_map_incoming and share_map_outgoing
-e1277ba OSD: move the peer_epoch and map sharing infrastructure into OSDService
-938feb4 OSD: move the {boot,up,bind} epochs into OSDService
-2ec92c7 OSD: scan for dropped PGs in consume_map instead of advance_map
-fccf1c7 OSD: do not take the pre_publish_lock in connection utility functions
-fd2b57e OSD: enable ms_fast_dispatch
-62b2d43 OSD: remove dead comment
-9028f95 OSD: Juggle the locking when resurrecting a PG
-5268e51 OSD: don't share_map_incoming() directly from handle_replica_op()
-ebdc097 OSD: use the async workqueue to send OSDMap updates on dropped ops
-6c98e36 OSD: add an op threadpool GenContext workqueue
-9fba69a OSD: allow build_incremental_map_msg to fail on lookups
-0ffdeab OSD: fix a few map sharing bugs
-0fbaa16 OSD: move should_share_map and share_map_incoming to OSDService
-399e67f OSD: pass a pointer to last_sent_epoch instead of the whole Session
-c97f968 OSD: share map updates in the op_tp threads instead of the main dispatch thread
-d78988b OSD: refactor handle_op error handling cases
-276a4fe OSD: change Session handling around _share_map_incoming
-1e3c495 OSD: add a Session::sent_epoch_lock
-667769c OSD: simplify _share_map_incoming based on _should_share_map()
-b53cec4 OSD: add _should_share_map function
-b2187ac OSD: use an OSDMapRef& and require the Session* in _share_map_incoming
-9835866 OSD: use safe params in map-sharing functions
-b199194 OSD::send_incremental_map: use service superblock so we can avoid locking osd_lock
-812c672 OSD::_share_map_incoming: pass osdmap in explicitly
-2f97f47 OSD: protect state member with a Spinlock
-a94a64d OSD: protect access to boot_epoch, up_epoch, bind_epoch
-767e94a OSD: shard heartbeat_lock
-9d8c797 OSD: Push responsibility for grabbing pg_map_lock up to callers of _remove_pg()
-00d36f6 OSD: wake_pg_waiters atomically with pg_map update
-3755318 OSD: remove wake_all_pg_waiters
-eb30f88 OSD: add session waiting_for_map mechanisms
-6d53349 OSD: pass osdmap to handle_op and handle_replica_op
-475d831 OSD: add a RWLock pg_map_lock
-5abbbfe OSDService: add osdmap reservation mechanism
-09bf5e8 msgr: change the delay queue flushing semantics
-69fc6b2 msgr: enable fast_dispatch on local connections
-4e20ce1 Messenger,DispatchQueue: add ms_fast_dispatch mechanism
-a62db61 DispatchQueue: factor out pre_dispatch and post_dispatch
-1379c03 OSD: remove never-activated while loop from send_incremental_map
-dd3d023 OSD: rename gen_wq, schedule_work, and PG_QueueAsync to include "recovery"
-e0ac34a OSD: remove unused push_wq
-ec16357 OSD: replace handle_pg_scan, handle_pg_backfill with handle_replica_op
-63cc1ec OSD: add handle_osd_map debug output
-37fac29 OSD::_share_map_incoming: line wrap debug output
-78f310d PG: constify the init() function params
-816b10e RWLock: assert pthread function return values
-e2b62bc (origin/wip-messageless-tracker) TrackedOp: do not require a Message when creating new Ops
-95fc551 TrackedOp: do not track a Message
-5a3efda TrackedOp: introduce an _unregistered() function to let implementations clean up
-2e674de TrackedOp: rename arrived_at to initiated_at, specify when constructed
-6a559a5 TrackedOp: introduce a _dump_op_descriptor function
-d7e04cc TrackedOp: remove the init_from_message function
-fc3318e (origin/wip-doc-radosgw-80) doc: Fix hyperlink.
-a7e7219 doc: Index update and librados.
-fcbc5fa doc: Quotas for Admin Ops API.
-e97b56e doc: New Admin Guide for Ceph Object Storage.
-7539281 Fix installation into user home directory, broken by d3f0c0b
-24c5ea8 osd: check blacklisted clients in ReplicatedPG::do_op()
-f92677c (origin/wip-blacklist) osd: check blacklisted clients in ReplicatedPG::do_op()
-c64b67b ceph-object-corpus: rebase onto firefly corpus
-077e6f8 ceph-object-corpus: v0.80-rc1-35-g4812150
-8bd4e58 Fix out of source builds
-3aee1e0 Fix clone problem
-fd970bb (origin/wip-8155) mon: OSDMonitor: disallow nonsensical cache-mode transitions
-72fdd55 (origin/wip-8283) osd/ReplicatedPG: fix trim of in-flight hit_sets
-8472805 Revert "ReplicatedPG: block scrub on blocked object contexts"
-f47f867 (origin/wip-8113) osd: Prevent divide by zero in agent_choose_mode()
-b7d31e5 osd, common: If agent_work() finds no objs to work on delay 5 (default) secs
-fe0031d (origin/wip-da-SCA-fixes-20140501) rados.cc: fix typo in help output
-8bf039d Dumper::dump_entries(): reduce scope of 'got_data'
-296b8ed PG::read_info(): pass 'const coll_t coll' by reference
-8fad144 PGBackend::be_compare_scrubmaps(): pass pgid by reference
-1e7eb1a osd_types.h: pass eversion_t by reference to operator<<
-be5a99d SimpleLock.h: remove unused private function clear_more()
-70a4a73 SimpleLock.h: remove twice included osd_types.h
-4fe31c1 linux_fiemap.h: remove twice included int_types.h
-b05e04e Dumper::dump_entries(): remove not needed variable
-9a716d8 rgw_bucket.cc: return error if update_containers_stats() fails
-89044a6 mon/PGMonitor: set tid on no-op PGStatsAck
-4e0eaa9 mon/OSDMonitor: share latest map with osd on dup boot message
-5a6ae2a mon/PGMonitor: set tid on no-op PGStatsAck
-2e6b248 mon/OSDMonitor: share latest map with osd on dup boot message
-77a6f0a mon/MonClient: remove stray _finish_hunting() calls
-d024594 mailmap: Florent Bautista affiliation
-61a2f06 mailmap: Warren Usui name normalization
-7b192f7 mailmap: Guang Yang name normalization
-4662890 sample.ceph.conf update:
-9cf470c osd/ReplicatedPG: agent_work() fix next if finished early due to start_max
-9f1a916 (origin/wip-snapmapper-debug) osd/SnapMapper: pass snaps set by const ref
-6105c35 osd/SnapMapper: debug
-f065809 (origin/wip-7576) mon/OSDMonitor: do not reply to MOSDMarkMeDown if ack is not requested
-58ace1a osd: fix 'ack' to be 'request_ack' in MOSDMarkMeDown
-49a3b22 osd: ignore MarkMeDown message if we aren't in PREPARING_TO_STOP state
-cf25bdf osd: prevent pgs from getting too far ahead of the min pg epoch
-81e4c47 osd: track per-pg epochs, min
-c879e89 doc: Include links from hardware-recommendations to glossary Included :term: in parts of hardware-recommendations so that glossary links appear. Signed-off-by: Kevin Dalley <kevin at kelphead.org>
-cc04322 (origin/wip-fix-master) mds: note MDiscoverReply encoding change in corpus
-e597068 (origin/wip-mds-shutdown) mds: remove mdsdir in the final step of shutdown MDS
-1f4a3e1 mds: bump protocol
-1ac05fd doc/release-notes: changelog link
-ffef20f doc/release-notes: final v0.67.8 notes and changelog
-0454962 Fixes a very minor typo in the release notes
-78b3c93 doc: documenting links to get-involved Create a link from documenting-ceph so that it is easy to find the github repository used for ceph.
-0f3235d ReplicatedPG: block scrub on blocked object contexts
-e66f2e3 ReplicatedPG: block scrub on blocked object contexts
-4bac8c7 rados.h,ReplicatedPG: add CEPH_OSD_FLAG_ENFORCE_SNAPC and use on flush
-d9106ce ECBackend::continue_recovery_op: handle a source shard going down
-87195d5 ReplicatedPG: we can get EAGAIN on missing clone flush
-d700d99 ReplicatedPG: do not preserve op context during flush
-aafed10 rgw_common.cc: reduce scope of 'fpos' variable
-49b810f rgw_admin.cc: remove unused string variable
-b9e612c PGBackend.cc: remove unused to_remove variable
-5fec86e KeyValueStore.cc: remove unused variable
-7928fe7 rgw_op.cc: remove unused map variable
-074161f rgw_main.cc: remove unused variable
-ae9a7d0 rgw_main.cc: use static_cast instead of c-style
-e624085 ObjectStore.h: pass const string parameter by reference
-3ebbd99 CDentry.cc: fix bool comparison using relational operator
-5da8e0e rados.cc: reduce scope of variable
-b99f636 buffer.cc: catch exception by reference
-022e705 SimpleLock.h: fix bool comparison using relational operator
-46442ea hitset.cc: fix format string to unsigned int
-ef0de7a OSDMap.cc: prefer prefix ++operator for non-trivial iterator
-5562428 OSDMonitor.cc: prefer prefix ++operator for non-trivial iterator
-e4b3109 KeyValueStore: rename s/logger/perf_logger/
-a84fed6 crush/mapper.c: fix printf format for unsigned variable
-21bbdf5 (origin/wip-early-reply) mds: avoid adding replicas of target dentry to rename witnesses
-3a7d668 mds: allow early reply when request's witness list is empty
-41d93aa mds: include authority of the source inode in rename witnesses
-68b440d (origin/wip-8147) osd: automatically scrub PGs with invalid stats
-d01aa5b mon: OSDMonitor: return immediately if 'osd tier cache-mode' is a no-op
-f689e5f (origin/wip-no-anchor) mds: remove discover ino
-913a5dd mds: remove anchor table
-8217600 (origin/wip-doc-radosgw) doc: Ensure fastcgi socket doesn't clash with gateway daemon socket.
-9c9b92f doc: Verified RHEL configuration.
-ec11bf7 doc: Fixed inconsistent header.
-63b2964 doc: Added rhel-6-server-optional-rpms repo.
-f674f36 Copy range using fiemap not entire length
-3920f40 rbd-fuse: fix unlink
-5d340d2 librbd: add an interface to invalidate cached data
-e08b8b6 librbd: check return code and error out if invalidate_cache fails
-b1df2c3 Changed the -i parameter to -r in order to avoid a conflict with a generic flag interpreted by the common code.
-a027100 rgw: fix url escaping
-9e3b860 (origin/wip-7500-wusui) Fix s3 tests in the rgw workunit.
-3ec0040 Added a new command line parameter (-i or --image=) that allows rbd-fuse to specify a single image to be made available within the mount directory. The purpose of this is to allow a single RBD to be "mounted" in userspace without opening (and locking) the other RBDs in the pool.
-060105c (origin/wip-8086) ReplicatedPG: we can get EAGAIN on missing clone flush
-d83b8f5 ReplicatedPG: do not preserve op context during flush
-a60e15a doc/release-notes: v0.67.8 notes
-bcf92c4 (origin/wip-8202) rgw: fix url escaping
-27ec495 Added Java Example
-8f64b5c Update librados-intro.rst
-3e41f92 (origin/wip-client-sleep) client: cleanup unsafe requests if MDS session is reset
-70ab079 client: wake up cap waiters if MDS session is reset
-b8aa58a client: drop dirty/flushing caps if auth MDS' session is reset
-09a1bc5 client: add asok command to kick sessions that were remote reset
-998b365 Changed the java code example
-5d49782 (origin/wip-7966) mds: terminate readlink result in resapwn
-d0f1806 (origin/wip-8193) ceph_test_rados_api_tier: increase HitSetTrim timeouts
-9ac264a Skipping '_netdev' Debian fstab option
-499adb1 (origin/wip-7941) rados.h,ReplicatedPG: add CEPH_OSD_FLAG_ENFORCE_SNAPC and use on flush
-ddf37d9 (origin/wip-uselocalgithubforqemu-wusui) Use new git mirror for qemu-iotests
-1885792 (origin/wip-8161) ECBackend::continue_recovery_op: handle a source shard going down
-c0c2361 brag : implement --verbose on client
-7009211 brag : document the zero argument behavior
-2b16a81 brag : meaningfull error messages
-83f8934 (origin/wip-8168) ReplicatedPG::do_osd_ops: consider head whiteout in list-snaps
-39c1bfc ReplicatedPG::do_op: don't return ENOENT for whiteout on snapdir read
-a83aff5 test_rbd.py: ignore children in cache pools
-aae16ab mon: add ceph osd pool set <pool> auid
-606e725 (origin/wip-7882-wusui) Support latest qemu iotest code
-f631854 (origin/wip-libkrbd) rbd: deprecate --no-settle option
-0c2b0fb doc: 'rbd showmapped' doesn't need privileges
-4238ffd doc: do not mention modprobe in rbd docs
-0ba3960 rbd: switch to libkrbd for 'rbd {map,showmapped,unmap}' operations
-2521e73 mount.ceph: switch to module_load()
-2651750 rbd: add libkrbd convenience library
-bad34e9 (origin/wip-fs-client) client: check cap ID when handling cap export message
-383d21d client: avoid releasing caps that are being used
-d726251 (origin/wip-doc-cache-tier) doc: Fix hyperlink to CRUSH maps.
-6902e22 doc: Added cache tiering settings to ceph osd pool set.
-0d964bc doc: Added new cache tiering doc to index/TOC.
-44e4e3d doc: Added new cache tiering doc to main docs.
-2182815 (origin/wip-7439) ReplicatedPG: handle ec pools in mark_all_unfound_lost
-6769f4d (tag: v0.80-rc1) 0.80-rc1
-245923e ReplicatedPG: enable mark_unfound_lost delete for ec pools
-009e874 qa/workunits/rbd/copy.sh: skip some tests when tiering is enabled
-c0bff43 qa/workunits/rbd/copy.sh: fix test
-5daf538 ECBackend: use std::swap for boost::optional
-ac9b461 common: add module_{load,has_parameter}()
-944dd1c Makefile: build common/secret.c with libtool
-070a820 configure: check for blkid/blkid.h header
-9004049 rbd: use stringify() in options parsing routines
-be081db stringify: use ostringstream instead of stringstream
-cac15c7 (origin/wip-coverity-respawn) mds: make strncpy in ::respawn safer
-b4eb502 (origin/wip-coverity) osd/osd_types: RWState: initialize snaptrimmer_write_marker
-4e5f442 osdc/Objecter: drop unused field
-124a663 doc/release-notes: a bit of prose about firefly
-18aded2 (origin/wip-8139) osd/osd_types: pg_interval_t: include primaries in operator<<
-931ae6b osd/osd_types: pg_interval_t: include up_primary in pg_interval_t
-66170f3 osd/osd_types: pg_interval_t: dump primary
-000233f osd: change in up set primary constitutes a peering interval change
-5562e26 osd: use parent pgid (as appropriate) in generate_past_intervals()
-025ab9f doc/release-notes: v0.80
-a80e66f qa/workunit/rbd/import_export.sh: skip list-objects tests with tiering
-9d64ac6 qa/workunit/rbd/copy.sh: do not delete/recreate rbd pool
-c3833d7 doc: Fixed syntax to include 'pool'.
-8620bd2 PG::PriorSet: consider lost osds in up_now for pcontdec
-95394b6 ReplicatedPG::do_op: check for blocked snapset obj
-8259d87 ReplicatedPG: in trim, grab w locks on obc and snapset_obc
-0d5a539 ReplicatedPG: if we get ENOENT on clone, remove clone from snapset
-f3df501 ReplicatedPG: do not create whiteout clones
-caa6356 ReplicatedPG,rados: add CEPH_OSD_[COPY_FROM]_MAP_SNAP_TO_CLONE
-2cb0bac qa/workunits/cephtool/test.sh: make set pg_num test non-racy
-506dce8 (origin/wip-8124) ReplicatedPG: do not use shard for hit_set object names
-f7e7588 ReplicatedPG::agent_load_hit_sets: take ondisk_read_lock
-16eccdd PG,PGLog: update hit_set during peering
-5821cc7 osd/: propogate hit_set history with repop
-7bb2011 encoding: use unqualified name for encode/decode in boost::optional encoding
-e4a048c ECMsgTypes::ECSubWrite: fix at_version indentation
-ddf1e98 osd: track the number of hit_set archive objects in a pg
-1fb90c9 ReplicatedPG::hit_set_persist: clean up degraded check
-95d0278 ReplicatedPG::mark_all_unfound_lost: delete local copy if necessary
-61b6564 Simple mechanical cleanups
-7a61cdb buffer: adjust #include order
-f9e9365 (origin/wip-8153) Revert "ReplicatedPG::get_snapset_context: assert snap obj is not missing"
-4413670 (origin/wip-throttle-snap-master) osd: throttle snap trimmming with simple delay
-82edda2 test: handle the create-pg delay when testing cache split syntax
-b2112d5 (origin/wip-7784) mon: OSDMonitor: HEALTH_WARN on 'mon osd down out interval == 0'
-09985d2 (origin/wip-7997) mon: wait for PaxosService readable in handle_get_version
-8fb2388 osd_types: pg_t: add get_ancestor() method
-7e697b1 (origin/wip-8091) ReplicatedPG::recover_replicas: do not recover clones while snap obj is missing
-3ad51c8 (origin/wip-num_objects_omap) osd_types::object_stat_sum_t: fix add/sub for num_objects_omap
-3d0e80a (origin/wip-8048) osd/ReplicatedPG: check clones for degraded
-93c0515 (origin/wip-8130) osdc/Objecter: fix osd target for newly-homeless op
-881680e (origin/wip-8132) mon: set leader commands prior to first election
-40e8dbb (origin/wip-poolset-noblock) mon: EBUSY instead of EAGAIN when pgs creating
-f22e2e9 spelling corrections
-18caa1c OSD: split pg stats during pg split
-5e4a5dc osd_types::osd_stat_sum_t: fix floor for num_objects_omap
-a3d452a common/obj_bencher: Fix error return check from read that is negative on error
-4db1984 osd/ReplicatedPG: add missing whitespace in debug output
-924064f (origin/wip-mds-op-prio) mds: dynamically adjust priority of committing dirfrags
-0640a08 (origin/wip-8092) mds: fix cap revoke confirmation
-8c7a5ab Use string instead of char* when saving arguments for rest-bench
-0d2177a ReplicatedPG::get_snapset_context: assert snap obj is not missing
-015df93 (origin/wip-8043) mon/OSDMonitor: require force argument to split a cache pool
-c252345 (origin/wip-8108) osd: OSDMap: have osdmap json dump print valid boolean instead of string
-aa6df59 (origin/wip-7699) mds: Fix respawn (add path resolution)
-f6db1bc mds: share max size to client who is allowed for WR cap
-358bde5 Add clone test on store_test
-308758b Make rados/rest bench work for multiple write instances without metadata conflict. Signed-off-by: Guang Yang <yguang at yahoo-inc.com>
-9b7fa38 ReplicatedPG::process_copy_chunk: don't check snaps if we got head
-43b7c3a ReplicatedPG::finish_promote: soid.clone may have been trimed, fix assert
-3f7861e ReplicatedPG::agent_work: skip if head is missing
-d39e003 ReplicatedPG::cancel_flush: requeue dup_ops even if !op
-edda6f7 ReplicatedPG::_rollback_to: fix comment, clone certainly could be missing
-37ed4b6 (origin/wip-stress-watch) ceph_test_stress_watch: test over cache pool
-d0a7632 (origin/wip-strerror) Use cpp_strerror() wherever possible, and use autoconf for portability
-502cc61 ReplicatedPG::agent_work: skip hitset objects before getting object context
-0d4aed8 mon: fix Session ref leak in handle_get_version
-d563434 doc: Distro specific rgw.conf example.
-bd22cac doc: Distro specific rgw.conf example.
-75606e9 doc: Created standalone doc for Keystone Integration.
-6650c0e doc: Added new docs to index.
-1310af2 doc: Reworked the simple configuration guide to be more generic.
-6853d21 doc: New admin guide for Ceph Object Gateway. Needs some clarification (todo).
-e02b845 doc: Admin API usage for quotas. Needs additional clarification on syntax.
-d0d162a (origin/wip-8097) buffer: use Mutex instead of Spinlock for raw crcs
-7c17fc4 mds: don't modify inode when calculating client ranges
-65ec24e (origin/wip-client-debug) client: print inode max_size
-d6c71b7 osd/ReplicatedPG: add missing whitespace in debug output
-171d5c5 (origin/wip-librados-tests) ceph_test_rados_api_*: fix build warnings, memset ranges
-8905e3e (origin/wip-8089) osd/ReplicatedPG: handle dup ops earlier in do_op
-26659a5 mds: don't issue/revoke caps before client has caps
-bd8aa6f mds: do file recover after authpin inode
-a72bcdd (origin/wip-8085) osd/ReplicatedPG: handle misdirected do_command
-4ccc845 (origin/wip-mds-typo) mds: fix typo in Server::do_rename_rollback()
-809d0fa (origin/wip-hitset-missing) osd/ReplicatedPG: handle missing hit_set on HITSET_GET rados op
-53a4b71 ceph_test_rados_api_watch_notify: test over cache pool
-b31107b test/librados/TestCase: add Param option that can set up a cache pool
-3ce4078 (origin/wip-7940) test: Add --pool-snaps option to ceph_test_rados
-09b5538 test: Fix ceph_test_rados to not core dump with invalid arguments
-b6b0c3b librados: Add ObjectWriteOperation::snap_rollback() for pool snapshots
-6e0496b librados: Rollback interface additions
-6ff645f (origin/wip-8008) osd/PG: fix repair_object when missing on primary
-19acfeb (origin/wip-8063) ceph_test_librados_tier: tolerage EAGAIN from pg scrub command
-39b9d9d (origin/wip-osd-boot) mon/OSDMonitor: fix osd epoch in boot check
-78df66f (origin/wip-8077) osd/ReplicatedPG: skip missing hit_sets when loading into memory
-7077438 (origin/wip-8054) mds: finish table servers recovery after creating newfs
-052519e Revert "mds: finish table servers recovery after creating newfs"
-82d8397 (origin/wip-5170-firefly) rgw: update bucket / object rewrite
-6f2ee99 radosgw-admin: add some conditions for bucket rewrite
-9130e7d radosgw-admin: new 'bucket rewrite' command
-f12bccc radosgw-admin: check params for object rewrite
-ad40356 Included the total cluster size in components_count object
-78fcb1a Fetching the date from ceph osd dump as that is more reliable across ceph versions
-99d74ee doc: Add additional information over CloudStack and RBD
-db3e0b5 erasure-code: document the ruleset-root profile parameter
-6d42bd9 While generating crush_types, avoiding item parsing, and calculating type count by just iterating thorugh buckets list
-1987832 Bug fix in the way crush_type is extracted from osd crush dump
-072d371 (origin/wip-lockdep) RWLock: make lockdep id mutable
-da0d382 Revert "RWLock: don't assign the lockdep id more than once"
-632098f common_init: remove dup lockdep message
-3c54a49 Wordsmith the erasure-code doc a bit
-f6c2073 mds: finish table servers recovery after creating newfs
-3db7486 mds: issue new caps before starting log entry
-07e8ee2 (origin/wip-7437) test: Add EC testing to ceph_test_rados_api_aio
-69afc59 test: Add multiple write test cases to ceph_test_rados_api_aio
-d99f1d9 test, librados: aio read *return_value consistency, fix ceph_test_rados_api_aio
-3d290c2 test: Add EC unaligned append write test to ceph_test_rados_api_io
-39bf68c pybind, test: Add python binding for append and add to test
-d211381 pybind: Check that "key" is a string
-9812720 librados, test: Have write, append and write_full return 0 on success
-008663a (origin/wip-7499) rgw, radosgw-admin: bucket link uses bucket instance id now
-6ce7116 (origin/wip-7786) civetweb: update subproject
-43d837d rgw: radosgw-admin object rewrite
-4c99e97 (origin/wip-8062) mon/OSDMonitor: ignore boot message from before last up_from
-a8f0953 osd/ReplicatedPG: adjust obc + snapset_obc locking strategy
-86b8594 (origin/wip-6789) mon: Monitor: suicide on start if mon has been removed from monmap
-02048dc mds: guarantee message ordering when importing non-auth caps
-ac51fca mds: include truncate_seq/truncate_size in filelock's state
-808ba13 mds: remove wrong assertion for remote frozen authpin
-860d727 osdc/Objecter: move mapping into struct, helper
-18642ed (origin/wip-8042) mon: tell peers missing features during probe
-39ca440 mon: move required_features back into Monitor
-c8039ab mon: ignore sync clients without required_features
-50ed65f (origin/wip-6480) auth: remove unused get_global_id() method
-b297689 auth: make AuthClientHandler::validate_ticket() protected
-3ccef66 auth: AuthClientHandler const cleanup
-9af10b2 auth: CephxProtocol const cleanup
-7594835 utime: declare is_zero(), ceph_timespec(), and sleep() as const
-3119022 auth: separate writes of build_request() into prepare_build_request()
-970d53f RWLock: make read locking methods const
-957ac3c RWLock: don't assign the lockdep id more than once
-4d3d89b auth: remove unused tick() method
-2cc76bc auth: add rwlock to AuthClientHandler to prevent races
-2e8035f osd: Fix appending write to return any error back to caller
-3371a25 test: Fix Seg fault in ceph_test_rados
-edd542e tools: Improve ceph_scratchtoolpp
-34d69cd mon: refresh elector required_features when they change
-b3b502f mon/Elector: ignore ACK from peers without required features
-f1c6b65 (origin/wip-8028) ceph.spec.in: require redhat-lsb-core
-ae09361 mailmap: Yan, Zheng name normalization
-5ee0b7b mailmap: Nikola Kotur affiliation
-02aedbc (origin/wip-8004) client: wake up umount waiter if receiving session open message
-409999c rbd: Prevent Seg fault by checking read result in snap_read_header()
-9c6733e librados: Allow rados_pool_list() to get NULL buffer if len == 0
-1848a23 librados: Fix typo for read functions documentation
-a8330f5 (origin/wip-5469) librbd: fix zero length request handling
-22a0c1f (origin/wip-8045) osd: do not block when updating osdmap superblock features
-43f0519 doc: Made minor changes to quick start preflight for RHEL.
-ab7a25c doc: Notes and minor modifications to gateway installation doc.
-1d74170 pipe: only read AuthSessionHandler under pipe_lock
-084db49 (origin/wip-die-mkcephfs) remove mkcephfs
-277e7ac (origin/wip-5835) debian: update ceph description
-72dc732 ceph.spec: update ceph description
-79ac2f7 (origin/wip-8001) osd/PG: set CREATING pg state bit until we peer for the first time
-4de49e8 (origin/wip-8019) os/FileStore: reset journal state on umount
-1cdb738 vstart.sh: make crush location match up with what init-ceph does
-d2edd9c (origin/wip-8031) osd: drop unused same_for_*() helpers
-5d61161 osd: drop previous interval ops even if primary happens to be the same
-d3833dd osd: make misdirected checks explicit about replicas, flags
-55cfb14 (origin/wip-8026) mds: fix shared_ptr MDRequest bugs
-2ba00bd (origin/wip-7914) erasure-code: thread-safe initialization of gf-complete
-0022d91 mailmap: Paul Meserve affiliation
-f261ad1 mailmap: Michael Nelson affiliation
-89a5ec7 mailmap: Sandon Van Ness name normalization
-010dff1 osd_types: fix pg_stat_t::encode, object_stat_sum_t::decode version
-22894c3 (origin/wip-4354-shared_ptr) SimpleLock: Switch MutationRef& for MutationRef in get_xlock()
-5f2ccab MDCache: use raw MutationImpl* instead of MutationRef in a few places
-6c3fc3e Locker: use raw MutationImpl* instead of MutationRef in several places
-920fd6c Locker: use a null_ref instead of NULL
-099d1d6 Locker: Use MutationRef instead of raw pointers
-e800bfa Locker: remove Mutation param from xlock_import
-1294e55 MDCache: fix users of active_requests for use of shared_ptr
-a5c7b27 MDCache: use a null_ref instead of NULL in a few places
-6b76998 MDCache: use MutationRef instead of raw pointers
-a6a0800 Server: use MutationRef instead of raw pointer
-4dedab6 MDS: switch cache object classes to use MutationRef instead of raw pointers
-9a4a429 ceph_test_rados_api_misc: print osd_max_attr_size
-4b66868 doc: Removed --stable arg and replaced with --release arg for ceph-deploy.
-7273d9e (origin/wip-7975) osd/ReplicatedPG: warn if invalid stats prevent us from activating agent
-02d7e84 osd/ReplicatedPG: dump agent state on pg query
-fa46aec osd/ReplicatedPG: kickstart the agent if scrub stats become valid
-07099ec (origin/wip-8003) ReplicatedPG: do not evict head while clone is being promoted
-67b2342 ReplicatedPG::trim_object: account evicted prev clone for stats
-6ff6c19 ReplicatedPG::make_writeable: check for evicted clone before adjusting for clone_overlap
-a8a49a0 ReplicatedPG: use get_clone_bytes on evict/promote
-3286283 ReplicatedPG::_scrub: account for clone_overlap on each clone
-4d5db06 ReplicatedPG::find_object_context: check obs.exists on clone obc before checking snaps
-d0e2c98 ReplicatedPG::finish_promote: add debugging assert for clone_size
-e213ee1 (origin/wip-7919) qa: workunits: mon: auth_caps.sh: test 'auth' caps requirements
-85a1cf3 mon: MonCommands: have all 'auth' commands require 'execute' caps
-4c2d73a (tag: v0.79) 0.79
-51da3bb mds: fix uninit val in MMDSSlaveRequest
-09586ec (origin/wip-shrink-icache) client: pin parent dentry of inode who has ll_ref > 0
-76cbd5d mds: fix uninit MMDSSlaveRequest lock_type
-4ea9e48 (origin/wip-8002) osd: fix map subscription in YOU_DIED osd_ping handler
-2f7522c msgr: add ms_dump_on_send option
-87e6a62 mds: fix uninitialized fields in MDiscover
-67fd421 mon: wait for quorum for MMonGetVersion
-a75af4c client: try shrinking kernel inode cache when trimming session caps
-82015e4 (origin/wip-7958) client: release clean pages if no open file want RDCACHE
-9484daf osd: disable agent when stats_invalid (post-split)
-232ac1a (origin/wip-7994) OSD: _share_map_outgoing whenever sending a message to a peer
-6f40b64 (origin/wip-7993) ceph-post-file: use getopt for multiple options, add longopts to help
-2f6a62b (origin/wip-7992) ceph-post-file: fix installation of ssh key files
-e02b7f9 (origin/wip-7983) osd/ReplicatedPG: do not hit_set_persist while potentially backfilling hit_set_*
-4aef403 doc/release-notes: note about emperor backport of mon auth fix
-db266a3 mon: MonCommands.h: have 'auth' read-only operations require 'x' cap
-9caf3db Migrator: use a null ref instead of NULL when calling into path_traverse
-0c9af93 Migrator: use MDRequestRef and MutationRef instead of raw pointers
-3429dc5 SimpleLock: use MutationRef instead of raw pointers
-c09878e Mutation: move self_ref into MutationImpl instead of MDRequestImpl
-3be138f Mutation: rename to MutationImpl and define MutationRef
-f41a2f8 Locker: use MDRequestRef instead of MDRequest*
-5872c2d MDCache: use MDRequestRef instead of MDRequest*
-565b2c8 Server: Use MDRequestRef instead of raw pointers
-90ceb7c MDS: Convert the request_start* functions and their immediate callers
-f773307 mds: MDRequest: rename to MDRequestImpl, and declare MDRequestRef
-fd235cd include/memory: add static_pointer_cast
-d121678 client: fix null pointer dereference in Client::unlink
-f68e60e ObjectCacher: assert no waiter when remove buffer head
-4be0b6b client: cleanup Client::_invalidate_inode_cache()
-abc19dd client: drop Fr cap before gettattr CEPH_STAT_CAP_SIZE
-954007e client: properly retain used caps
-2d5bd84 client: assign implemented caps to caps field of MClientCaps
-1538a98 client: hold Fcr caps during readahead
-701c22a client: implement RDCACHE reference tracking
-b219c8f (origin/wip-cache-create-fix) ReplicatedPG: fix CEPH_OSD_OP_CREATE on cache pools
-be8b228 (origin/wip-7922) osd: Send REJECT to all previously acquired reservations
-18201ef doc/release-notes: v0.79 release notes
-4dc6266 Fix byte-order dependency in calculation of initial challenge
-6cb50d7 (origin/wip-7964) ReplicatedPG::_delete_oid: adjust num_object_clones
-0f2ab4d ReplicatedPG::agent_choose_mode: improve debugging
-0552ecb (origin/wip-7978) rgw: only look at next placement rule if we're not at the last rule
-eb23ac4 ReplicatedPG::agent_choose_mode: use num_user_objects for target_max_bytes calc
-cc9ca67 ReplicatedPG::agent_choose_mode: exclude omap objects for ec base pool
-a130a44 osd/: track num_objects_omap in pg stats
-9894a55 ReplicatedPG: handle FLAG_OMAP on promote and copyfrom
-a11b3e8 (origin/wip-7858) ReplicatedPG::do_op: use get_object_context for list-snaps
-78e9813 ReplicatedPG: do not create snapdir on head eviction
-31df91e (origin/wip-backfill) osd: add 'osd debug reject backfill probability' option
-d323634 (origin/wip-test-alloc-hint-ec-fix) qa: test_alloc_hint: set ec ruleset-failure-domain to osd
-8e46fe0 (origin/wip-vstop-unmap) stop.sh: unmap rbd images when stopping the whole cluster
-afc5dc5 stop.sh: do not trace commands
-0110a19 stop.sh: indent 4 spaces universally
-e4a8535 (origin/wip-vstart-erasure-code-default) vstart: set a sensible default for ruleset-failure-domain
-c43822c (origin/wip-7965) lockdep: reset state on shutdown
-7a49f3d lockdep: do not initialize if already started
-6bf46e2 (origin/wip-7915) OSDMap: bump snap_epoch when adding a tier
-01445d5 (origin/wip-7937) ReplicatedPG::_scrub: don't bail early for snapdir
-5f680f9 (origin/wip-7659) ReplicatedPG::_verify_no_head_clones: missing implies that the clone exists
-7909262 (origin/wip-init) debian: fix control to allow upgrades
-17732dc debian: move rbdmap config and sysvinit/upstart scripts into ceph-common
-1d42de5 init.d: correcting rbdmap init order:
-771e88a (origin/wip-dirfrag) mds: fix check for merging/spliting dirfrag
-43bc39b (origin/wip-largedir2, origin/wip-largedir) mds: ignore CDir::check_rstats() when debug_scatterstat is off
-5a9b99a mds: initialize bloom filter according to dirfrag size
-16af25f mds: add dentries in dirfrag to LRU in reverse order
-06ecb2c mds: handle freeze authpin race
-d1967f3 mds: treat cluster as degraded when there is clientreplay MDS
-b65a818 mds: don't start new segment while finishing disambiguate imports
-ff44a99 mds: trim non-auth subtree more aggressively
-c09f58e (origin/wip-7450) radosgw-admin: don't always generate access key for subusers
-e1783a6 rgw: subuser creation can be idempotent
-f54c684 radosgw-admin: fix subuser modify
-e095b1d debian: make ceph-common own etc/ceph, var/log/ceph
-d4d39a0 (origin/wip-7907) osd/ReplicatedPG: mark_unrollbackable when _rollback_to head
-1acd547 debian: move ceph-rest-api from ceph-common to ceph
-a76a129 (origin/wip-7939) PG: set role for replicated even if role != shard
-ef94fcd test: Add EC testing to ceph_test_rados_api_snaphots
-1871fe7 test: Add EC testing to ceph_test_rados_api_lock
-759878c test: Add EC testing to ceph_test_rados_api_tier
-38b9fe7 test: Add EC to ceph_test_rados_api_watch_notify
-6cedfac test: Add EC testing to ceph_test_rados_api_stat
-7ccf412 test: Add EC testing to ceph_test_rados_api_list
-ea26e13 test: Add EC testing to ceph_test_rados_api_io
-9bd5821 test: Add EC test classes RadosTestEC and RadosTestECPP
-a4da24d test: Fix ceph_test_rados_list_parallel to clean up test pool
-966480b test: Fix ceph_test_rados_api_aio to clean up all test pools
-74ed448 test: Cleanup pools when FlushWriteRaces is done
-c106976 librados: Add missing C variants for alignment
-2d7da1d librados: Add missing rados_wait_for_latest_osdmap()
-dde1c91 osd/ReplicatedPG: continue scrub logic when snapset.head_exists doesn't match
-c2e5a42 osd/ReplicatedPG: handle snapdir properly during scrub
-ed5a5e0 (origin/wip-7935) rgw: reverse logic to identify next part
-48fbce9 (origin/wip-7916) ReplicatedPG: improve get_object_context debugging
-5c9b8a2 osd/PG: debug cached_removed_snaps changes
-824da20 librbd: skip zeroes when copying an image
-e44f85c qa/workunits/cephtool/test.sh: test 'osd pg-temp ...'
-2d4ec6a mon/OSDMonitor: clear primary_temp on osd pg_temp updates
-255f840 OSDMonitor: add 'mon osd allow primary temp' bool option
-63ac079 OSDMonitor: add 'osd primary-temp ...' command
-07dcffa OSDMonitor: add 'osd pg-temp ...' command
-d3183e3 java/test: ceph.file.layout xattr is still not there now
-cd1a9c4 Add ceph-client-debug and jerasure shared objects to RPM spec file.
-81853c6 (origin/wip-7912) mon/PGMap: clear pool sum when last pg is deleted
-8c761c4 (origin/wip-ec-profile-idempotent) mon: make 'ceph osd erasure-code-profile set ...' idempotent
-7d321d8 qa/workunits/rados/test_alloc_hint: fix erasure syntax
-2826fda doc: fix typos in glossary
-7fa025e .gitignore: add examples/librados files
-14418a2 autotools: s/ssse3/sse3/ typo
-1c92453 erasure-code: update jerasure / gf-complete submodules
-ff51d3f doc: pgbackend dev doc outdated notice
-d5973aa doc: update jerasure plugin
-402e104 doc: erasure code developer notes updates
-74fa3a7 (origin/wip-fuse-access) fuse: implement 'access' low level function
-e672c52 osd/ReplicatedPG: fix cache tier scrub again
-ea47b4a ceph_test_rados_api_tier: improve promote+scrub test
-fc1a424 (origin/wip-7849) ceph-conf: use global_pre_init to avoid starting logging
-98551fc global: separate first half of global_init into global_pre_init
-c3292e4 (origin/wip-cache-scrub) ceph_test_rados_api_tier: improve cache tier + scrub test
-cfd6f23 osd/ReplicatedPG: tolerate trailing missing clones on cache tiers
-b8ea656 java/test: ceph.file.layout xattr is not there now
-4f9f7f8 qa/workunits/fs/misc/layout_vxattrs: ceph.file.layout is not listed
-b71e64d mds: find approximal bounds when adjusting subtree auth
-fd28ad5 doc: erasure-code development complete
-399de24 (origin/wip-sse-i386) erasure-code: do not attempt to compile SSE4 on i386
-07ccc4e mds: commit new dirfrag before splitting it
-bd6e35c rbd.cc: yes, cover formatted output as well.  sigh.
-780fa91 Revert "ceph-conf: do not log"
-b5a6320 Revert "ceph-conf: no admin_socket"
-44afc23 init: fix OSD startup issue
-fd76fec rbd.cc: tolerate lack of NUL-termination on block_name_prefix
-056151a (origin/wip-7888) mon/MonClient: use keepalive2 to verify the mon session is live
-d747d79 msgr: add KEEPALIVE2 feature
-1aa1d93 (origin/wip-7904) ReplicatedPG: hit_set_setup, agent_setup, skip if !active
-f1c7b4e (origin/wip-7867) client: pin Inode during readahead
-032d4ec osdc/ObjectCacher: call read completion even when no target buffer
-68dc0c6 (origin/wip-7903) rgw: move max_chunk_size initialization
-a6be1d6 PG: always clear agent_state in clear_primary_state
-dfd3cb5 rgw: only look at prefetched data if we actually prefetched
-d78e678 (origin/wip-7902) osd/PG: fix choose_acting revert to up case
-0bb911c mds: don't trim non-auth root inode/dirfrag
-90b4e53 mds: include authority of the overwrited inode in rename witnesses
-367987f mds: don't increase nlink when rollback stray reintegration
-79aa26f mds: allow sending MMDSFindIno to MDS who is in clientreplay state
-34ef91a mds: fix negative dirstat assertion
-ce93616 mds: fix stack overflow caused by nested dispatch
-71fa779 mds: don't clear scatter dirty when cache rejoin ack is received
-fbf4fbc mds: explicitly set nonce for imported dirfrag
-d14ec95 mds: skip non-opened session when flushing client sessions
-fb19100 mds: fix null pointer dereference in MDCache::rejoin_send_rejoins()
-ed49d5e mds: journal EFragment::OP_COMMIT before drop locks
-1bd575e mds: fix CInode::get_approx_dirfrag
-a1f5c64 mds: don't trim ambiguous import dirfrags
-598c5f1 mds: trim empty non-auth dirfrags
-3c6c712 mds: trim non-auth inode with remote parents
-e811b07 mds: properly journal fragment rollback
-6a548a9 mds: fix CDir::WAIT_ANY_MASK
-e535f7f mds: avoid journaling non-auth opened inode
-ffcbcdd mds: handle race between cache rejoin and fragmenting
-6963a8f mds: handle interaction between slave rollback and fragmenting
-72eaa5e doc: fix typos in tiering dev doc
-1b5e8f4 (origin/wip-7880) mds: properly propagate dirty dirstat to auth inode
-38d4c71 Pipe: rename keepalive->send_keepalive
-c64d03d mon/OSDMonitor: require OSD_CACHEPOOL feature before using tiering features
-69321bf mon/OSDMonitor: prevent setting hit_set unless all OSDs support it
-eb71924 osd/ReplicatedPG: tolerate missing clones in cache pools
-6508d5e osd/ReplicatedPG: improve clone vs head checking
-9e2cd5f osd/ReplicatedPG: do not assert on clone_size mismatch
-7f026ba ceph_test_rados_api_tier: scrub while cache tier is missing clones
-7cb1d3a (origin/wip-fix-pools) qa/workunits/mon/pool_ops.sh: fix test
-233801c qa/workunits/mon/pool_ops.sh: use expect_false
-72715b2 (origin/wip-7849-b) ceph-conf: no admin_socket
-fb20823 jerasure: fix up .gitignore
-acc31e7 ceph-conf: do not log
-ffd69ab (origin/wip-7876) rgw: use s->content_length instead of s->length
-501e31d logrotate: do not rotate empty logs (2nd logrotate file)
-91176f1 erasure-code: test encode/decode of SSE optimized jerasure plugins
-b76ad97 erasure-code: test jerasure SSE optimized plugins selection
-30e7140 osd: increase osd verbosity during functional tests
-10fd6b3 erasure-code: SSE optimized jerasure plugins
-e9878db arch: add SSE3, SSSE3, SSSE41 and PCLMUL intel features
-c07aedb autotools: intel cpu features detection
-cc0cc15 erasure-code: gf-complete / jerasure modules updates
-12d4f38 erasure-code: allow loading a plugin from factory()
-506d2bb logrotate improvement: do not rotate empty logs
-dc3ce58 osd: do not make pg_pool_t incompat when hit_sets are enabled
-92859ed (origin/wip-7837) ReplicatedPG: include pending_attrs when reseting attrs in WRITEFULL
-b6a431b (origin/wip-7874) ReplicatedPG: disable clone subsets for cache pools
-56974b9 (origin/wip-7860) test: Wait for tier removal before next test starts
-7999bc9 (origin/wip-7828) ReplicatedPG:: s/_delete_head/_delete_oid, adjust head_exists iff is_head
-9865409 rgw: configurable chunk size
-832c007 (origin/wip-7871) RadosModel: allow --no-omap to be specified seperately from --ec-pool
-555ae12 (origin/wip-7870) ReplicatedPG::do_osd_ops: only return ENOTSUP on OMAP write ops
-6cb8595 (origin/wip-7835) ReplicatedPG::make_writeable: fill in ssc on clone
-21fc535 (origin/wip-7823) osd: trim copy-get backend read to object size
-18c3e9e osd: fix tests due to no default erasure-code ruleset
-29f7420 Revert "osd: create the erasure-code ruleset in OSDMap::build_simple"
-4cf9a73 fix bug in 'defaultweight' calculation on OSD start.
-2779e2a (origin/wip-7863-wusui) Make sure s3_utilities are found.
-38bcd3c osd: start_flush() should check for missing clones and return if requested
-bf87562 osd: Error from start_flush() not checked in agent_maybe_flush()
-ed43aa0 osd: Add logging of missed l_osd_agent_skip cases
-d1d99df osd: Improve logging output including pg_shard_t as osd#(shard)
-4ac7808 minor corrections to package descriptions
-012bb5f minor init.d scripts lintianisation:
-14b743b (origin/wip-7676-firefly) rgw: don't modify rgw_bucket for data extra pool
-7989cbd rgw: multipart meta object uses extra data pool
-f023f90 rgw: zone placement info includes extra data pool
-3677076 rgw: add data_extra pool to bucket
-58ef0da mailmap: Inktank jenkins bot
-286131e mailmap: Huang Jun name normalization
-0160d19 mailmap: Tyler Brekke name normalization
-a310ea2 mailmap: Guang Yang affiliation
-14921c7 mailmap: James Ryan Cresawn affiliation
-2faf271 mailmap: Mohammad Salehe affiliation
-27c28ad mailmap: Sharif Olorin affiliation
-9fd61c7 mailmap: Stephan Renatus affiliation
-01b9966 (origin/wip-dz-watch-test) qa: Add ceph_multi_stress_watch for rep and ec
-6ec28fd (origin/wip-6465) ensure pybind is in the PYTHONPATH
-37899fa be nitpicky about missing references
-4186916 Revert "erasure-code: gf-complete detects SSE at runtime"
-3f014da (origin/wip-status-function-names) mon: Monitor: s/_mon_status()/get_mon_status()/
-ed780ad mon: Monitor: s/get_status()/get_cluster_status()/
-08a3d6b (origin/wip-listxattr) client: don't include ceph.{file,dir}.layout vxattr in listxattr()
-1bc680e erasure-code: deactivate SSE optimizations
-8116394 (origin/wip-7827) msg: set recv stamp for local delivery
-3ebeb8e mailmap: Allen Samuels affiliation
-a217cd6 mailmap: Warren Usui is with Inktank
-a4c652c document adding dev key for custom Apache/FCGI install
-fb72330 (origin/wip-7810) mds: reset connection priv after connection's session is removed
-e4f2d9f doc/release-notes: 0.78 final notes
-185bcc4 doc/release-notes: final 0.78
-1817c23 rgw: get rid of a memory allocation
-1e7cd10 rgw: remove memory allocation
-f6c746c (tag: v0.78) 0.78
-28d8e7f Revert "ReplicatedPG: disallow trans which atomically create and remove an object"
-49a0190 doc/release-notes: 0.78 notes
-dbcf447 erasure-code: gf-complete detects SSE at runtime
-8c7f6c1 autotools: AX_SSE detects the compiler SSE capabilities
-5a3f6c7 (origin/wip-7438) test: Add erasure coding to stress watch test
-6fb6588 test: Reorg multi_stress_watch to prepare for ec option
-b110275 test: Fix ceph_filestore_dump.sh test for new EC pool creation
-dad0faf tests: use ^ instead of ! as invalid char
-d4d77d7 doc/release-notes: stop confusing sphinx
-78ede90 (origin/wip-7780) objecter: waive OSDMAP_FULL check for MDS
-a4849fb (origin/wip-flush-journal-asok) qa: test_alloc_hint: flush journal before prodding the FS
-9d31c1b osd: add flush_journal admin socket command
-b444e88 (origin/wip-multimds-fixes) mds: fix typo in MDCache::handle_cache_rejoin_strong
-ddbb2f7 (origin/wip-jerasure-submodules) erasure-code: add gf-complete / jerasure submodules
-5c34a0f erasure-code: remove copy of gf-complete / jerasure
-0d167d2 mds: fix NULL pointer dereference in Server::handle_client_rename
-272b53b mds: avoid infinite loop in MDLog::submit_entry()
-3cadbfb mds: fix potential invalid pointer dereference
-91c88c1 mds: rdlock dirfragtree lock when renaming directory
-a867166 mds: don't mark scatter locks dirty when dirfrag is dirty
-5150fe6 mds: trim other MDS' mdsdir during recovery
-150c6ce mds: remove wrong assertion
-de461a9 fragtree_t: fix get_leaves_under()
-cbd1c44 mds: improve success rate of subtree exporting
-3c39d6f mds: cleanup CInode::decode_import()
-4973560 mds: export file locks together with inode
-dc54b7b mds: re-issue caps after importing caps (rename)
-b225ca9 mds: fix open remote dirfrag deadlock
-dc52581 mds: properly initialize MDCache::fragment_info_t
-ed30b83 mds: avoid issuing zero caps to client
-e909eaf mds: drop auth pins before waiting for dir unfreeze
-bc3325b mds: fix stack overflow caused by nested dispatch
-63a597b mds: rollback slave request after slave prepare is journalled
-a1ff489 mds: treat flushing as dirty when rejoining scattered locks
-1268dbb (origin/wip-tid_t) Change tid_t to ceph_tid_t to avoid conflicts with a popular type
-b227426 (origin/wip-no-version) Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking
-cfb04b2 (origin/wip-limit-libkeyutils) Makefiles: remove libkeyutils from every binary except two
-e9eb641 remove gf-complete / jerasure sub modules
-fdcf3eb (origin/wip-7777) ReplicatedPG::do_op: delay if snapdir is unreadable
-7f7a998 (origin/wip-7708) mds/Locker: fix null deref on cap import
-4221e0d build: add gf-complete/jerasure to gitmodule_mirrors
-25d04fb (origin/wip-pq) osd: dump priority queue state on dequeue at level 30
-ff11965 osd: fix OpWQ dump locking
-4a3464c common/PrioritizedQueue: include first item's cost in dump
-de576d5 common/PrioritizedQueue: constify a few things
-8bd8944 common/PrioritizedQueue: fix remove_by_class() corner case
-f1e3bc9 doc/dev/cache-pool: describe the tiering agent
-d728426 (origin/wip-7733) PG::start_peering_interval: always send_notify if !primary
-b4420ff (origin/wip-7755) PG::find_best_info: fix log_tail component
-1ddae7e erasure-code: jerasure and gf-complete moved to ceph namespace
-01a0f2d (origin/wip-6806) mon: OSDMonitor: don't rely on client-side validation for command arguments
-074c880 mon: Monitor: handle invalid 'quorum' command argument
-652056e mon: Properly handle errors from 'cmd_getval()' when needed
-543c642 erasure-code: disable SSE extensions
-1c5411a erasure-code: update gf-complete v1 submodule
-d5e38d4 erasure-code: update jerasure v2 submodule
-eac224a doc: update the erasure-code dev documentation
-b273011 osd,mon: use profile instead of properties
-8cf85f0 mon: add osd crush create-erasure functional tests
-b85330e osd: create the erasure-code ruleset in OSDMap::build_simple
-5c1db3b osd: create erasure_code_profile in OSDMap::build_simple
-f8aa1ed mon: set the profile and ruleset defaults early
-5774344 mon: add crush ruleset name to osd pool create
-4f1b372 osd: use erasure code profile when building the PGBackend
-173e958 mon: OSDMonitor use erasure_code_profile instead of properties
-063de51 osd: obsolete pg_pool_t properties with erasure_code_profile
-04d2fd1 mon: add the erasure-code-profile {set,get,rm,ls} MonCommand
-fa1d957 mon/Paxos: commit only after entire quorum acks
-aed0744 (origin/wip-7738) os/FileJournal: return errors on make_writeable() if reopen fails
-c31f38c (origin/wip-7728) ReplicatedPG: if !obc->obs->exists, lock snapdir obc if exists
-9ee1084 ReplicatedPG: disallow trans which atomically create and remove an object
-f094400 Add file to store mirror location of module's.
-a9f8a9e (origin/wip-cli-err) ceph.in: Better error on bad arg to 'tell'
-1a451f2 mon: functional tests teardown must be run on error
-514b5e3 mon: add helper to selection functions implementing tests
-e4b4b1f osd: OSDMap::erasure_code_profile accessors
-c4f8f26 osd: add OSDMap::erasure_code_profile
-2b9bd26 (origin/wip-tmap2omap-warn) mds: avoid spurious TMAP2OMAP warning
-e39c213 (origin/wip-7611) ceph.in: do not allow using 'tell' with interactive mode
-b2af217 (origin/wip-remotebit-dump) mds: Fix remotebit::dump for less common types
-9d77ce1 (origin/wip-rados-outfile) tools/rados: Allow binary file output of omap data
-be31998 erasure-code: make libcommon include liberasure-code
-e6d9066 erasure-code: add ostream to factory()
-de62572 erasure-code: remove dependency to the global context
-bcc7487 common,erasure-code,mon: s/erasure-code-//
-d4d6ff0 mon,osd,erasure-code: update copyright notices
-29862f6 mon: tests for pool create erasure implicit ruleset creation
-b7db487 mon: pool create erasure implicit ruleset creation
-32e122b mon: add pool name to prepare_pool_crush_ruleset
-cf25946 mon: create-erasure uses crush_ruleset_create_erasure
-9850ab2 mon: crush_ruleset_create_erasure s/_map//
-3bc607a mon: crush_ruleset_create_erasure indent
-9622488 mon: crush_ruleset_create_erasure s/rule/err/
-370e000 mon: crush_ruleset_create_erasure set ruleset
-8e07dbc mon: crush_ruleset_create_erasure error codes
-402e646 mon: crush_ruleset_create_erasure reduce verbosity
-6a16eac mon: create crush_ruleset_create_erasure helper
-1ae3314 (origin/wip-7684) client: force getattr when inline data is missing
-04de781 (origin/wip-7740) OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting
-9e21840 mds: include inline data in lock messages
-5b3422a mds: fix corner case of pushing inline data
-b2fcc6e (origin/wip-s3pm-wusui) Remove code duplication from s3 tests.
-979e8b4 (origin/wip-7732) PG::build_might_have_unfound: check pg_whomai, not osd whoami
-0f75c54 (origin/wip-7712) osd/ReplicatedPG: fix enqueue_front race
-ef1d7c9 rados.py: Fixed docstring syntax warnings.
-02b746d doc: Fixed release notes syntax warnings.
-9cd67bb doc: Fixed hyperlink.
-599a8d7 (origin/wip-7698) test: Add ceph_filestore_dump.sh to test ceph_filestore_dump
-31a6679 tools: Fix ceph_filestore_dump to fully operate on EC pools
-f633a03 tools: Cleanups in ceph_filestore_dump
-bbc0d6d (origin/wip-7718) PG::issue_repop: only adjust peer_info last_updates if not temp
-35f1b04 RGWListBucketMultiparts: init max_uploads/default_max with 0
-ab91b80 mon/OSDMonitor: fix fall-thru case
-fc85075 (origin/wip-cache-last-epoch-clean) mon/PGMap: only recalculate min_last_epoch_clean if incremental touches old min
-208959a mon/PGMap: cache min_last_epoch_clean
-6f9db6c unittest_mon_pgmap: fix warnings
-e941fef unittest_ceph_argparse: fix warnings
-f2c6ff3 tools/: make filenames consistent
-e330097 (origin/wip-7719) PG: clear want_pg_temp in clear_primary_state only if primary
-da159f8 doc/release-notes: note that radosgw's should be upgraded together
-f1bd59f (origin/wip-7692) mon: only do timecheck with known monmap
-fba88de ceph-mon: be a bit more verbose on error
-62af51c (origin/wip-7696) PG::activate: handle peer contigious with primary, but not auth_log
-70d87df (origin/wip-7489) ceph_mon: output error message if unable to bind.
-5ad9c16 ceph_mon: all output after initial fork go to dout/derr
-c95234a ceph_mon: split postfork() in two and finish postfork just before daemonize
-ceac36b doc/release-notes: 0.78 draft nodes; firefly draft notes
-87c911c (origin/wip-7709) osd/ReplicatedPG: release op locks on on commit+applied
-c5b557e qa/workunits: misc -> fs/misc
-8c8b3e9 PGLog: remove unused variable
-282497e osd: add tunables for cache_min_{flush,evict}_age
-fa6887b osd: set default cache_target_{dirty,full}_ratios based on configurable
-a72b636 mds: fix empty fs rstat
-f2124c5 (origin/wip-7705) ceph_test_rados: wait for commit, not ack
-dd946e0 MOSDOp: include reassert_version in print
-73f6b4c (origin/wip-7706) config_opts: raise ms_pq_max_tokens_per_priority to 16MB
-2722a0a PrioritizedQueue: cap costs at max_tokens_per_subqueue
-88cb1c4 (origin/wip-3863) tools: Create ceph-client-debug
-d2ce029 libcephfs: add ceph_ll_lookup_inode
-724f30e client: Add lookup_parent & lookup_name
-f1f2826 mds: Return EINVAL for parent lookup on root ino
-a19ef01 (origin/wip-7703) rgw: manifest hold the actual bucket used for tail objects
-33b889f rbd-fuse: fix signed/unsigned warning
-c973e46 (origin/wip-coverity-20140312) mds/Mutation.h: init export_dir with NULL in ctor
-fd383a9 mds/Migrator.h: init some members of import_state_t in ctor
-5a53aa8 mds/Migrator.h: init some export_state_t members in ctor
-b10692f CInode::encode_cap_message: add assert for cap
-58e35a4 test_filejournal.cc: use strncpy and terminate with '\0'
-a2784ba Add unit test for race condition in libnss
-44aaaaf Work around race condition in libnss
-fe8a715 Make the configuration "filestore merge threshold" can be negative which prevent it from merging, this could help:   1. We are trying to create the PG folder up to several levels with a standalone tool to prevent it from runtime splitting, we need a configuration which prevent it from merging even there is no file within the folder.   2. As runtime split / merge could bring latency issues, customer can use a negative merge threshold to prevent merging but only splitting. This cha [...]
-27f0634 doc: fix formatting on PG recommendation
-7cf81ce libcephfs/test.cc: shutdown cmount at end of MountNonExist
-269cf13 libcephfs/test.cc: shutdown cmount
-94acb6b test_librbd.cc: add missing va_end() to test_ls_pp
-fb4ca94 mailmap: Danny Al-Gaaf name normalization
-fb8ff44 doc/release-notes: note that WATCH can get ENOENT now
-2cbad1b (origin/wip-7671) test/librados/watch_notify: create foo before watching
-9d549eb test/system/st_rados_watch: expect ENOENT for watch on non-existent object
-b23a141 RGWListBucketMultiparts: init max_uploads/default_max with 0
-4057a30 AbstractWrite: initialize m_snap_seq with 0
-90a2654 (origin/wip-7682) ReplicatedPG::already_(complete|ack) should skip temp object ops
-72bc1ef AdminSocket: initialize m_getdescs_hook in the constructor
-f7529cf RGWPutCORS_ObjStore_S3::get_params: check data before dereference
-5334d5c mds/Server.cc: check straydn before dereference
-047287a doc: Add "nearest power of two" to PG rule-of-thumb
-7bb0359 OSDMonitor::prepare_pool_op: add missing break in case
-a4a91cc (origin/wip-7649) PG: do not wait for flushed before activation
-a576eb3 PG: do not serve requests until replicas have activated
-980d2b5 (origin/wip-7681) ECBackend: when removing the temp obj, use the right shard
-dc00661 osd_types: print lb if incomplete even if empty
-8e76e4e (origin/wip-7695) build-doc: fix checks for required commands for non-debian
-dc82cd7 (origin/wip-7641) debian: make ceph depend on ceph-common >= 0.67
-d573710 (origin/wip-7687) rgw: don't overwrite bucket entry data when syncing user stats
-2fbd772 qa/workunits/cephtool/test.sh: fix thrash (more)
-64a6b26 doc/release-notes: fill in some firefly history
-f4196cc doc/release-notes: firefly draft release notes
-24774a8 osd/ReplicatedPG: fix typo
-3d5a4b5 ReplicatedPG: CEPH_OSD_OP_WATCH return -ENOENT if !obs.exists
-00bf3b5 (origin/wip-7674) osd/ReplicatedPG: do not include hit_set objects in full calculation
-1836b6c (origin/wip-7592-final) osd: hit_set_persist(): Verify all objects aren't degraded
-42ef8ba (origin/wip-6889) rgw: don't log system requests in usage log
-406ff0b (origin/wip-is_down-boolean) OSDMap: clarify is_{down,in}() definitions
-fe4ad29 (origin/wip-rbd-fuse-enumerate) rbd-fuse: fix enumerate_images() image names buffer size issue
-377c919 rados_connect not thread-safe when using nss (documentation)
-861e62a Update Python hashbang to respect environment
-fa30eb5 rados.py: fix typo in Ioctx::read() docstring
-1249b0b Use pgrep radosgw to determine if rados gateway is running.
-745f72c Fixed get_status() to find client.radosgw fields inside of ps output.
-880bc3a Fix get_status() to find client.rados text inside of ps command results.
-fbd9c15 osd: Remove unused checkpoint code
-d3e3df7 (origin/wip-flock) mds: fix owner check of file lock
-8a72de3 (origin/wip-7663) ReplicatedPG: adjust pending_attrs correctly in copy_from
-6669e4d ReplicatedPG: _delete_head should adjust pending_attrs
-60c1b9a ReplicatedPG: use pending_attrs in rollback
-d7c4d6a doc: Added init caps to Signed-off-by: and Fixes:
-2b28407 (origin/wip-doc-prereq) doc: update build prerequisites
-7ac98b2 doc: Updated sign-off by to sign-off-by
-2e420f9 (origin/wip-build-doc) doc: rm duplicate info from release-process
-52a2d69 doc: fix reST formatting in release-process
-bb73711 doc: update release-process for packages
-dd5a378 doc: misc updates for release-process
-e272f74 (origin/wip-coverity-20140409) rgw_rados.h: RGWRegion: initialize cct and store with NULL
-8de8819 (origin/wip-7672) PG::choose_acting: filter CRUSH_ITEM_NONE out of have
-c7c9ae3 RadosModel.h: initialize CopyFromOp::snap
-d7af7eb RadosModel.h: TestOp: initialize comp with NULL
-9df9f4c ReplicatedPG.h: CopyResults() initialize final_tx with NULL
-2daabc1 scratchtoolpp.cc: check return value of getchar()
-0f7d954 doc: Updated pull request with suggested changes.
-a9df888 AioTestData: initialize m_ioctx with NULL
-6732c02 rgw_rados.h: generator class: initialize manifest with NULL
-61f640c IoCtxImpl: initialize last_objver with 0
-b6947c0 ECSubWrite: pass some parameter by reference
-200f747 test/bench/distribution.h: pass rngen_t by reference
-d61fcfa ceph-filestore-dump.cc: pass OSDSuperblock by reference
-7e43823 doc: Fixed typo.
-6cd797b osd/Watch.cc: pass entity_addr_t by reference
-40095ee watch_item_t: pass entity_addr_t by reference
-62763d5 watch_info_t: pass parameter by reference
-246564b pg_t::get_split_bits: add assert to silence coverity
-aba5b7c rbdmap: bugfix upstart script
-2e342d6 (origin/wip-libxfs-flag) FileStore: support compiling without libxfs
-2626604 erasure-code: LARGEST_VECTOR_WORDSIZE is always 16
-2beb2a5 erasure-code: upgrade to jerasure version 2
-b74115a autotools: set SIMD_FLAGS with SSE flags
-4105ab8 erasure-code: use jerasure as submodules
-eb6ffdb erasure-code: remove jerasure version 1
-18506ad Removed all regular expression parsing and used '-f json' instead
-4cb6b2a Modified num_bytes attribute in components_count to be a raw integer
-18bdee6 MDSMonitor::prepare_command: fix "mds set"
-7884780 osd_types.cc: add missing break in operator<< case handling
-83731a7 ReplicatedPG::finish_ctx: clear object_info if !obs.exists
-a7afa14 config.cc: add debug_ prefix to subsys logging levels
-55c23a1 (origin/wip-hint-tests) qa: add script for testing rados allocation hint
-54ffdcc (origin/wip-da-fix-doc) get-involved.rst: update information
-d1a888e swift/containerops.rst: fix some typos
-93b95a2 radosgw/troubleshooting.rst: s/ceph-osd/OSD/
-2223a37 radosgw/config-ref.rst: fix typo
-87618d4 session_authentication.rst: fix some typos
-682c695 release-process.rst: fix some typos
-72ee338 doc: s/osd/OSD/ if not part of a command
-e666019 doc/dev/logs.rst; fix some typos
-bbd1c4b filestore-filesystem-compat.rst: fix typo
-ae123a6 corpus.rst: fix typo
-cf9f017 config.rst: fix typo
-5aaecc7 cephx_protocol.rst: fix typo
-2cbb0a4 architecture.rst: fix typos
-f581bda rados: add set-alloc-hint command
-a4cbb19 rados/operations/control.rst: fix typo
-9bf39e2 Broke down sysinfo's format into a histogram with a value and count so that we just see how many of each version/distro/kernel/os/arch/cpu/etc are running
-2591668 (origin/wip-div) PGLog::proc_replica_log: select divergent log entries correctly
-3befb93 PGLog::_merge_object_divergent_entries: handle missing.have == prior_version
-7c77ff6 TestPGLog: add a test case verifying case where we have the prior_version
-e830f9f TestPGLog: check on last_update in run_test_case
-4d6a74d TestPGLog::proc_replica_log: call doesn't adjust olog
-71b4474 (origin/wip-nfs-export) client: fix Client::getcwd()
-617ce67 mds: introduce LOOKUPNAME MDS request
-1c8c618 qa/workunits/cephtool/test.sh: fix 'osd thrash' test
-b62f9f0 (origin/wip-7642) mon/OSDMonitor: feature feature check bit arithmetic
-8d52fb7 (origin/wip-7652) mon/PGMap: send pg create messages to primary, not acting[0]
-c8b34f1 mon/PGMonitor: improve debugging on PGMap updates slightly
-819cce2 mon/OSDMonitor: make osdmap feature checks non-racy
-b9bcc15 mon/OSDMonitor: prevent set primary-affinity unless all OSDs support it
-5f7efec (origin/wip-7650) tools/rados/rados.cc: use write_full for sync_write for ec pools
-38fd666 (origin/wip-7210) qa: workunits/mon/rbd_snaps_ops.sh: ENOTSUP on snap rm from copied pool
-c13e1b7 mon: OSDMonitor: don't remove unamanaged snaps from not-unmanaged pools
-135c27e (origin/wip-7575) osd: Add hit_set_flushing to track current flushes and prevent races
-3dd09e3 Removed nw_info from sysinfo
-09a317f Made crush_types to be a map of type to count, so we can tell how many racks/rows/hosts/etc are there
-e53aed2 SubmittingPatches: clarify "github fork" in preference to "clone"
-c9eaa65 Changed Availability section of ceph-mds.rst to reference ceph-mds, not ceph-mon. Signed-off-by: James Ryan Cresawn <jrcresawn at gmail.com>
-09668a4 (origin/wip-7637) osd: fix agent thread shutdown
-7411c3c logrotate: copy/paste daemon list from *-all-starter.conf
-b6872b2 (origin/wip-7638) ReplicatedPG::trim_object: use old_snaps for rollback
-b5b67d1 (origin/wip-7634) ReplicatedPG: use hobject_t for snapset_contexts map
-b436930 (origin/wip-firefly-misc) qa/workunits/rest/test.py: do not test 'osd thrash'
-237f0fb os/ObjectStore: dump COLL_MOVE_RENAME
-f888ab4 (origin/wip-7632) ReplicatedPG: consistently use ctx->at_version.version for stashed object
-eca7e63 (origin/wip-7393) ReplicatedPG: clean up num_dirty adjustments
-173116f (origin/wip-scrub-lock) osd: only register for scrub if we are the PG primary
-d379b1f osd: bracket role changes with scrub reg/unreg
-c8c2f54 Client: fix build issue (lost semicolon)
-d171418 (origin/wip-7610) obj_bencher: allocate contentsChars to object_size, not op_size
-bafd76a (origin/wip-7624) ReplicatedPG: ensure clones are readable after find_object_context
-90f5a68 1. Removed name of the pool from pool_metadata 2. Included pool type in pool_metadata 3. Renamed rep_size attribute to size in pool_metadata
-da97fee 1. simplified the 'bytes' info to just be bytes 2. prefix all the members of the components_info with 'num_'
-2adc534 (origin/wip-pool-delete) mon/OSDMonitor: fix pool deletion checks, races
-d9e8806 (origin/wip-7618) ReplicatedPG::wait_for_degraded_object: only recover if found
-a222e7a ReplicatedPG::recover_replicas: do not assume that missing objects are unfound
-3f59f02 Revert "c_read_operations.cc: fix resource leak"
-a71ddb0 (origin/wip-7562) mon: make quorum list (by name) be in quorum order
-240446e (origin/wip-7487) test: merge unittest_crushwrapper and unittest_crush_wrapper
-772968e mon/OSDMonitor: disallow crush buckets of type 0
-8b3934f (origin/wip-7616) PGBackend::rollback_stash: remove the correct shard
-1ddec86 FileStore::_collection_move_rename: propogate EEXIST
-ca12e0d qa/workunits/mon/crush_ops: use expect_false
-e016e83 (origin/wip-7608) test: Fix tiering test cases to use ---force-nonempty
-0592368 (origin/wip-cache-warn-full) mon: warn when pool nears target max objects/bytes
-f6edcee (origin/wip-pgmap-stat) mon/PGMap: return empty stats if pool is not in sum
-640ff98 (origin/wip-vstart-paths) test: Use non-default out/ dev/ paths in vstart
-1685c6f (origin/wip-crush-json) crush: revise JSON format for 'item' type
-d4950a1 mailmap: Danny Al-Gaaf affiliation
-0eac1ba mailmap: Bjørnar Ness affiliation
-fdb644a mailmap: Ron Allred affiliation
-a85d0ef mailmap: Steve Stock affiliation
-076bec8 mailmap: Christopher O'Connell affiliation
-4cb1cbf (origin/wip-7607) ReplicatedPG::fill_in_copy_get: fix omap loop conditions
-11393ab ReplicatedPG::fill_in_copy_get: remove extraneous if statement
-8fdfece ReplicatedPG::fill_in_copy_get: fix early return bug
-364fed8 (origin/wip-debian-files) packaging: use wildcard for test files in Debian
-65f3354 (origin/wip-7293) Make symlink  of librbd to qemu's folder so it can detect it.
-d0b1094 (origin/wip-7447) ECBackend,ReplicatedPG: delete temp if we didn't get the transaction
-f2a4eec PGBackend/ECBackend: handle temp objects correctly
-308ea1b ECMsgTypes: fix constructor temp_added/temp_removed ordering to match users
-3e21996 ReplicatedPG::finish_ctx: use correct snapdir prior version in events
-a7057e1 doc: Improve CloudStack RBD documentation
-31eb533 (origin/wip-da-SCA-firefly-20140304) librados.cc: remove unused variable cpp_category
-c2cc178 ECBackend.cc: use !empty() instead of size()
-35ae7ed ceph_argparse.cc: prefer prefix ++operator for non-trivial iterator
-39fc1db KeyValueStore: use !empty() instead of size()
-8c2b2d3 PG.h: use !empty() instead of size() > 0
-9e52695 PG::generate_past_intervals: reduce scope of variable
-3a786ca test_o_trunc.c: fix indentation to kernel style (tabs, 8 spaces)
-e4c4aae ErasureCodePlugin.cc: reduce scope of local variable
-35f2080 SyntheticClient::play_trace: reduce scope of local variable
-f836909 test_o_trunc.c: reduce scope of some variables
-c2f3f2b close file descriptor in error case
-8f63fdb Formatter::new_formatter(): pass const function parameter by reference
-724ad02 doc: update the operator create pool reference
-7461410 doc: erasure coded pool developer documentation
-6d323c0 mailmap: Mike Lundy affiliation
-49e54ab (origin/wip-cache-add) mon/OSDMonitor: fix race in 'osd tier remove ...'
-241b9e8 mon/OSDMonitor: fix some whitespace
-c029c2f mon/OSDMonitor: add 'osd tier add-cache <pool> <size>' command
-62e0eb7 mon/OSDMonitor: handle 'osd tier add ...' race/corner case
-0e5fd0e osd: make default bloom hit set fpp configurable
-eddf7b6 osd/ReplicatedPG: fix agent division by zero
-08efb45 (origin/wip-tier-add) OSDMonitor: do not add non-empty tier pool unless forced
-12909bb (origin/wip-2288) mds: check projected xattr when handling setxattr
-20fe162 (origin/wip-7563) TestPGLog: tests for proc_replica_log/merge_log equivalence
-9a64947 TestPGLog::proc_replica_log: adjust wonky test
-6b6065a TestPGLog::proc_replica_log: adjust to corrected proc_replica_log behavior
-97f3596 TestPGLog::proc_replica_log: add prior_version to some entries
-200e296 PGLog::proc_replica_log: _merge_divergent_entries based on truncated olog
-b0357ab PG.h:PGLogEntryHandler: remove silly cant_rollback logic
-c99b7e1 PG,PGLog: replace _merge_old_entry with _merge_object_divergent_entries
-86b21e0 TestPGLog::merge_old_entry: ne.version cannot be oe.version
-3dc4f10 TestPGLog::merge_old_entry: we no longer use merge_old_entry this way
-ff329ac TestPGLog:rewind_divergent_log: set prior_version for delete
-9e43dd6 TestPGLog: ignore merge_old_entry return value
-3cc9e22 TestPGLog: not worth maintaining tests of assert behavior
-a234053 (origin/wip-osd-verbosity) OSD,config_opts: log osd state changes at level 0 instead
-68890b2 osd: be a bit more verbose on startup
-4e06dfd (origin/wip-messenger-shutdown) msg: Make SimpleMessenger shutdown safer
-371a80c librbd: prefix rbd writes with CEPH_OSD_OP_SETALLOCHINT osd op
-8e49bc3 FileStore: add option to cap alloc hint size
-1f5b796 FileStore: introduce XfsFileStoreBackend class
-391257c FileStore: refactor FS detection checks a bit
-6456802 osd: add SETALLOCHINT operation
-8982734 common: -- support for env_to_vec
-28c29c1 Revert "ObjectCacher: remove unused target/max setters"
-d00a927 Revert "librbd: remove limit on number of objects in the cache"
-195d53a rgw: off-by-one in rgw_trim_whitespace()
-37e7817 In database delete Session.flush() has to be called appropriately, to avoid foreign key conflicts in delete() request to the database
-f3d6491 Following changes are made 1. Increased the String length for distro, version and os_desc columns in osds_info table 2. Corrected version information extraction in client/ceph-brag 3. Removed the version_id json entry when version list returned for UUID 4. Updated the README to reflect point 3
-3cc8b27 Modifed the String variables in db.py to be of fixed length to support databases which doesn't have VARCHAR support
-30a5bdb Added an instruction in 'How to deploy' field in README.md
-aca6ac3 (origin/wip-7248) qa: workunits: cephtool: test 'osd bench' limits
-09099c9 (origin/wip-osd-status) osd: 'status' admin socket command
-25a9bd3 osd: OSD: limit the value of 'size' and 'count' on 'osd bench'
-ef25135 erasure-code: test rados put and get
-0b612d1 mon: prepend current directory to PATH for tests
-eb21bc8 osd: helper to create an OSD for functional tests
-cababd9 mon: add mon-test-helpers.sh to EXTRA_DIST
-927153f osd: do not attempt to read past the object size
-9dd6e34 mailmap: Mouad Benchchaoui affiliation
-e782051 mailmap: Andrey Kuznetsov affiliation
-7b6d417 mailmap: Wang, Yaguang affiliation
-855edc6 Fix typo ceph-disk
-43b7b0b mailmap: The Linux Box affiliations
-62fd382 (origin/wip-7539) osd_types,PG: trim mod_desc for log entries to min size
-d4118e1 MOSDECSubOpWrite: drop transaction, log_entries in clear_buffers
-718cda6 TrackedOp: clear_payload as well in unregister_inflight_op
-59ff572 OpTracker: clarify that unregister_inflight_op is only called if enabled
-fc9b8ef MOSDOp: drop ops vector in clear_data()
-1ea59f6 ReplicatedPG: delete mark_all_unfound_lost transactions after completion
-e19dffb (origin/wip-7572) mon: fix 'pg dump' JSON output
-1a4657a (origin/wip-fix-coverity-20140228) req_state: fix uninitialized bool var
-605e645 Objecter::recalc_op_target: fix uninitialized scalar variable
-754a368 PGMonitor: fix uninitialized scalar variable
-1747c58 MDCache: fix potential null pointer deref
-93c0983 MDCache::handle_discover: fix null pointer deref
-249e210 FileStore: fix resource leak in queue_transactions() blackhole case
-3cd751b c_read_operations.cc: fix resource leak
-ad9b6d2 c_write_operations.cc: fix some ioctx resource leaks
-e8533ee ReplicatedBackend: check result of dynamic_cast to fix null pointer deref
-8d6b25a mds: use "lookup-by-ino" helper to handle LOOKUPPARENT request
-dc20c7d OSDMonitor: enable getting hit set parameters We would like to get the hit set parameters: hit_set_type | hit_set_period | hit_set_count | hit_set_fpp via OSDMonitor
-5b88856 (origin/wip-s3radoscheck-wusui) Use pgrep radosgw to determine if rados gateway is running. Fixes: 7528 Signed-off-by: Warren Usui <warren.usui at inktank.com>
-0ed63fd (origin/wip-libcephfs-fixes) client: fix Client::trim_caps()
-cdbe413 client: update dirfragtree/fragmap according to mds request reply
-214977a client: choose hash function according to dir layout
-23de48b client: check inode's cap when looking up dentry
-0638d61 client: add flushing inode to proper list when auth mds changes
-4bdecf1 client: add imported caps when handling cap export message
-1ddc951 client: remove exported caps when handling cap import message
-a7b7c31 client: use ceph_seq_cmp() to compare cap seq/mseq
-3dd323e client: don't send cap release when removing exported cap
-0bf5f86 store_test.cc: fix unchecked return value
-7eefe85 histogram.h: fix potential div by zero
-500206d ReplicatedPG.cc: fix ressource leak, delete cb
-fbb1ec8 (origin/wip-7542) ECBackend: don't leak transactions
-b0d4264 OSD::handle_misdirected_op: handle ops to the wrong shard
-123ff9e (origin/wip-7458) osd: stray pg ref on shutdown
-448fc0e (origin/wip-pg-msg) mon/OSDMonitor: missing space in string
-799cde0 Fix python-requests package dependencies.
-bfad17b (origin/wip-librados-end-iterator) librados: fix ObjectIterator::operator= for the end iterator
-a850a38 (origin/wip-doc-cache-pool) doc/dev/cache-pool: fix notes
-f0241c8 (origin/wip-cache-pool) mon/OSDMonitor: make default false-positive-probability 5%
-30aa2d6 client: clear migrate seq when MDS restarts
-c1e40c6 client: fix race between cap issue and revoke
-5c55eb1 client: check mds_wanted for imported cap
-9476f84 client: allow revoking duplicated caps issued by non-auth MDS
-6797d30 client: call handle_cap_grant() for cap import message
-154efb1 client: don't update i_max_size when handle reply from non-auth MDS
-9a0ef6a (origin/wip-requests-dependencies) Fix python-requests package dependencies.
-c07a758 (origin/wip-mds-dumper) mds: Add dump-journal-entries
-7a985df mds: Create MDSUtility as base for Dumper/Resetter
-410c507 mds: Fix Dumper shutdown
-7ba3200 mds: fix nested_anchors update during journal replay
-1040d1b (origin/wip-primary-temp-fix) osd/OSDMap: respect temp primary without temp acting
-8020dcf (origin/wip-7375-wusui) Fixed get_status() to find client.radosgw fields inside of ps output. Fixes: 7375 Signed-off-by: Warren Usui <warren.usui at inktank.com>
-8200b8a (origin/wip-7374-wusui) Fix get_status() to find client.rados text inside of ps command results. Added port (fixed value for right now in teuthology) to hostname. Fixes: 7374 Signed-off-by: Warren Usui <warren.usui at inktank.com>
-be2748c (origin/wip-7537) OSDMap::_pg_to_up_acting_osds: use _acting_primary unless acting is empty
-dc079eb OSDMonitor: when thrashing, only generate valid temp pg mappings
-891343a rados.py: add aio_remove
-9f7f4ed (origin/wip-dz-scrub-fixes) Revert "osd/PG: fix assert when deep repair finds no errors"
-728e391 osd: Don't include primary's shard in repair result message
-3ee71a5 (origin/wip-mon-docs) doc: troubleshooting-mons.rst: better document how to troubleshoot mons
-69082a6 (origin/wip-7485) mds: add mds_kill_create_at for testing
-27968a7 ceph_test_objectstore: fix i386 build (again)
-14ea815 (origin/wip-osdmap-inc) mon/OSDMonitor: fix osdmap encode feature logic
-7357b6e (origin/wip-7517) PG: skip pg_whoami.osd, not pg_whoami.shard in scrub feature check
-696fa36 (origin/wip-7512) OSD::project_pg_history needs to account for acting_primary/up_primary
-0442b45 Objecter/OSDMap: factor out primary_changed() into static OSDMap method
-d0359f7 PG: clarify same_primary_since updates regarding primary rank
-73c59a0 (origin/wip-last-epoch-clean) mon/PGMap: fix osd_epochs update
-df3ba72 mon/PGMap: add unit test for min_last_epoch_clean
-8913ab4 ECBackend: skip canceled xattr reads as well
-0e376ee (origin/port/temp-failure-retry) compat: avoid unused warn with TEMP_FAILURE_RETRY
-23e538e (origin/wip-create-null) client: fix possible null dereference in create
-bcc18d4 osd: increase default leveldb write buffer, cache size
-c4a3a86 ceph_test_objectstore: fix i386 build error
-b25c22a ceph_test_objectstore: fix signed/unsigned warning
-9651b18 os/ObjectStore: fix rebase errors
-cfafa0b README: add build dep
-1340b36 erasure-code: test that changing the pool size is not allowed
-d74f128 os/ObjectStore: document interface
-6d8cb22 unittest_ecbackend: fix signed/unsigned warnings
-fed655e (origin/wip-scrub-primary) mon/PGMonitor: fix primary osd check on deep-scrub
-7b0f3d9 (origin/wip-7513) PGLog::activate_not_complete: fix log.complete_to increment typo
-e3e3328 (origin/wip-repair) osd/PG: fix assert when deep repair finds no errors
-9da4d40 (origin/wip-ec-bugs) PGLog: test for missing using the correct shard value
-ace65fe OSD: fix query for ec pgs
-93983c9 Objecter: make is_pg_changed static and const for old/newacting
-8b4cf1c OSDMap: make calc_pg_rank/role const for acting
-005b4fa Objecter: resend op if primary role changed
-b7de0fd ECTransaction: require hash_infos for deleted objects
-ab4c9a6 ECUtil: clear() should reset hashes to -1, not 0
-8593ad7 ReplicatedPG::cancel_pull: ECBackend might cancel_pull on a non-missing object
-9b85241 ECBackend::filter_read_op: clean up read state properly
-70d23b9 (origin/wip-subscribe) osd: fix off-by-one is boot subscription
-90ebdcc Rename keyvaluestore_check_backend to keyvaluestore_debug_check_backend
-a52d7cd Add KeyValueStore op thread options
-62c1631 Remove eio inject codes in KeyValueStore
-8c4d865 Add config tracker to KeyValueStore
-697411c Add backend check option to KeyValueStore
-9543664 Remove filestore_inject_stall
-dcfe098 Remove m_eio in KeyValueStore
-4b3bf3e Make SequencePosition sync by each transaction
-ec8a419 Implement collection_rename interface in KeyValueStore
-6314350 Remove unnecessary "check_coll" check
-88bec06 Optimize write call add enhance error detect
-2a363d6 Unify object level lock in GenericObjectMap
-a9fa341 Fix incorrect read and truncate
-9ed2958 Return 0 when the offset of read exceed the length of object
-3e6a1fc Add read/write operation to store_test.cc
-4e7f1de Adjust some interfaces to optimize caller codes
-024a120 Use rename operation to make colection_move atomic
-d7be540 Add get_*_with_header to StripObjectHeader
-c9fdcee Add test for omap interface
-2b9e893 Move perf counter and add op queue reserve throttle
-5eb7592 Fix deadlock caused by hold collection obj
-c278269 Added a note that the ceph-osd command requires the cluster option.
-0da25e6 (origin/wip-librados-object-iterator) librados: implement ObjectIterator copying and assignment
-d9bedb9 Added evaluation of cluster and fixed evaluation when setting initial weight on start in verbose mode
-8a0017a librados: don't destroy ObjListCtx when iterator reaches the end
-d8a7bef librados: remove extra advance from objects_begin(position)
-a9677e1 (origin/wip-6685-firefly) Revert "ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir"
-133ddb7 packaging: match all test files
-1c129df packaging: add missing file
-bd59db2 (origin/wip-corpus) ceph-object-corpus: prune some old releases
-76046cf (origin/port/updates) dencoder: check for radosgw build option
-5373ee2 osd: use ceph scoped shared_ptr
-0ebb1f8 mon/MDSMonitor: Cope with failures during creation
-c6e6ced (origin/wip-copyget) PG::build_might_have_unfound: skip CRUSH_ITEM_NONE
-1f30d1a ECBackend: deal with temp collection details in handle_sub_write
-c703a89 ReplicatedPG::on_global_recover: requeue degraded, then unreadable
-caf2edf rgw: minor cleanup
-1307ba9 mds: Table read failure should log at error level
-81bcf43 mds: Don't create the /.ceph directory
-2762ede mds/CDir: Remove a few lines of cruft
-a4d0eb1 mds: Remove some unused #defines
-5fb90a2 Fix generate keystone token from credentials
-541beb8 (origin/wip-mds-dencoder) mds: Add encode/decode/dump for use with dencoder
-ebd4397 RadosModel: copyfrom should result in a dirty object
-68184d4 PG: fix scrub feature check
-67d1f36 ReplicatedPG: assert no omap for ec pool in _write_copy_chunk and skip
-4441792 ECBackend: handle short reads
-715cbd3 ReplicatedPG: ensure that ec appends are aligned
-78d9c00 ReplicatedPG::fill_in_copy_get, use getattr_maybe_cache
-c337f63 ReplicatedPG: fix stat uses to use the correct shard
-aa110af OSDMap::_apply_primary_affinity: skip CRUSH_ITEM_NONE in non-default check
-b3bb9ef doc/release-notes: v0.77
-fa96de9 doc/release-notes: v0.67.7
-1bca9c5 (tag: v0.77) v0.77
-40bdcb8 osd/,mon/: add (up|acting)_primary to pg_stat_t
-0427f61 (origin/wip-7099) rgw: fix swift range response
-2b3e3c8 (origin/wip-6830) rgw: fix etag in multipart complete
-859ed33 (origin/wip-6951) rgw: reset objv tracker on bucket recreation
-53de641 (origin/wip-6936) radosgw-admin: don't generate access key if user exists
-9e8882e (origin/wip-da-SCA-20140218) BackedUpObject::get_xattr()  pass function parameter by reference
-53b3689 TestRados.cc: use !empty() instead of size()
-86b0879 ErasureCodeBench: prefer prefix ++operator for non-trivial iterator
-200ebb9 ceph_erasure_code.cc: prefer prefix ++operator for non-trivial iterator
-e6772c7 RGWObjManifest: prefer prefix ++/--operator for non-trivial iterator
-42e6da7 ReplicatedPG: prefer prefix ++operator for non-trivial iterator
-29c4abd OSD: use !empty() instead of size() > 0
-be85727 PG: use !empty() instead of size() > 0
-f23ab4a RPCRecPred: use !empty() instead of size() >= 1
-0626df9 KeyValueStore: prefer prefix ++operator for non-trivial iterator
-76c1723 KeyValueStore: use !empty() instead of size()
-ede614a FileStore: use !empty() instead of size()
-eaf6696 DBObjectMap: use !empty() instead of size()
-0bf0ec0 OSDMonitor: prefer prefix ++operator for non-trivial iterator
-31b4107 OSDMonitor: use !empty() instead of size() > 0
-a1412bd MDCache: prefer prefix ++operator for non-trivial iterator
-4a48d8e CrushWrapper::is_valid_crush_loc(): pass function parameter by reference
-3f68a5c CrushWrapper: prefer prefix ++operator for non-trivial iterator
-dd71051 PGLog.h: prefer prefix ++operator for non-trivial iterator
-8488e71 Client: remove a std::string::c_str() calls
-1099e25 common/config.cc: prefer prefix ++operator for non-trivial iterator
-c7dfdfd str_map.cc: prefer prefix ++operator for non-trivial iterator
-7da714a Client.cc: use !empty() instead of size()
-fd08b09 ceph_argparse.cc: prefer prefix ++operator for non-trivial iterator
-1d1392d Monitor: pass function parameter by reference
-ab45d44 BarrierContext: prefer prefix ++operator for non-trivial iterator
-4adcfa5 BarrierContext: reduce scope of 'done' variable
-19dad03 MonClient: pass function parameter by reference
-314116e PG: insert into stray set if !us_up() && !is_acting()
-a5c5d92 (origin/wip-agent) osd/ReplicatedPG: EOPNOTSUPP on hit_set_get on non-replicated pools
-a40cd50 osd/ReplicatedPG: load older HitSets into memory
-0af7375 osd/ReplicatedPG: strengthen agent_work assertions
-1d907c6 OSD: consider up/acting primary for new intervals
-afbd58e (origin/wip-7064) rgw: don't try to read bucket's policy if it doesn't exist
-3ed68eb rgw: return error if accessing object in non-existent bucket
-b0dcc79 radosgw-admin: gc list --include-all
-609f4c5 Throw a Timeout exception on timeout.
-1975441 (origin/wip-rgw-manifest-2) dencoder: fix for new rgw manifest code
-b3ce188 cls/rgw: fix debug output
-3fb6e25 test/rgw: manifest unitest
-da64bf7 rgw: scalable manifest object
-db88e7f (origin/wip-7463) ceph_rest_api.py: don't fail if no up OSDs found on startup
-7a019b3 (origin/wip-librados-ops-and-rvals) test/librados: remove unused lines and fix return code for cmp guards
-bfbfcd6 ReplicatedPG: fix successful write condition
-18f08cd ReplicatedPG: clear osd op reply output for writes
-1d661ca ReplicatedPG: set individual osd op rvals
-7743698 ReplicatedPG: don't copy the ops vector into OpContext
-e550ad7 ReplicatedPG: avoid undefined behavior in xattr comparison
-4b229f7 qa: add librados c object operations tests to librados test script
-7a76033 packaging: add test programs for librados c object operations
-bac7bb6 librados: bump version number
-995fea9 librados: add omap object operations to the c api
-242a6c8 librados: add read xattr functions for c object operations
-f68b706 Objecter: add a way to chain callbacks
-2543cde librados: add exec to the c object operations api
-0dc4309 librados: add read to c object operation api
-6503f21 Objecter: add a context argument to ObjectOperation::read()
-6094e43 librados: add simple atomic read operations to c api
-770942a librados: add exec to the c write operations api
-bc03fbb librados: add individual op flags for c write operations
-4f4121a librados: add global op flags to the c api
-7f1f0b5 librados: remove constant for CMPXATTR_NOP
-50ca88a librados: add some comments about constants in librados.h
-e255bf5 librados: add section docs for object operations
-c61ba41 test/librados: add ObjectReadOperation tests
-5276e3c test/librados: refactor setup/teardown in tiering tests
-ae072ac test/librados: use standard rados test case for snapshot tests
-5497e1c test/librados: use a test case instead of duplicating code everywhere
-c6d8d0e test/librados/cmd: remove unnecessary pool creation
-d3c6f17 test/librados: use connect_cluster_pp() instead of duplicating it
-8d4a5fd test/librados: add a connect_cluster() helper
-9630f2f test/librados: create general test case classes
-6273ba4 test/librados: move test.cc into its own library
-abca34a Objecter: keep ObjectOperation rval pointers for writes
-4bee6ff (origin/wip-cache-perf) osd/ReplicatedPG: clean up agent skip debug output
-d1a185b osd: l_osd_agent_{wake,skip,flush,evict}
-dbec109 osd: l_osd_tier_[dirty|clean]
-150e87a osd: l_osd_tier_whiteout
-2d5371d osd: l_osd_tier_evict
-c45a477 osd: l_osd_tier_[try_]flush[_fail]
-4b0a0a1 osd: l_osd_copyfrom
-5e727bf (origin/wip-ecbackend-for-review, origin/wip-ecbackend-12) RadosModel: only output if missing header is actually a problem
-11f288e Objecter: track primary explicitly to detect changing primaries
-bc31c4b ReplicatedPG: add some debugging if waiting_for_commit is non-empty
-b90584a osd/: instantiate the right backend based on pool
-792f0a8 ECBackend: flesh out ECBackend implementation
-45b6c59 osd/ECTransaction: add type encapsulating EC transaction
-33c3830 osd/ECUtil: add ec encode/decode util helpers
-7731a94 ObjectStore: add bufferlist/string getattr
-258af5e buffer: allow caller to initialize bufferhash state
-ae827cf osd_types: add swap, claim_append to ObjectModDesc
-7772014 OSD,PG: pass through EC messages
-6cd64a5 messages,osd: add EC messages and associated types
-e8820ac src/osd/: add ECBackend stubs
-0661d80 PGBackend: make getattrs virtual
-ca323ff ReplicatedPG: fix size checking for ECBackend pools
-510585b PGBackend/ReplicatedBackend: factor out logical to ondisk size mapping
-26745ca PGBackend/ReplicatedBackend: move the backend agnostic code into PGBackend for scrub
-1835c29 ReplicatedBackend: factor out be_deep-scrub
-f0b69b3 osd/: replace bufferptr with bufferlist for attrs in recovery
-0b180e6 PG::discover_all_missing: request a FULLLOG
-84e2f39 PG,ReplicatedPG: Generalize missing_loc for ECBackend
-8b33d60 PG: allow PGBackend to set criteria for PG up-ness
-facec76 PGBackend: add some additional helpers.
-74b8a0c PG,PGBackend: expose acting and backfill_targets
-5a8c0bb os/: allow objects with NO_GEN but non-NO_SHARD shard
-2d3205f PG: skip CRUSH_ITEM_NONE in acting set in various places
-5db3b2d osd/: extend pg_interval_t to include primary
-9d8be1b Objecter: handle primary other than acting[0]
-904704a OSDMap: handle CRUSH_ITEM_NONE in acting sets
-109b3c9 OSDMap: fill in get_primary_shard
-285cf77 PG: introduce calc_ec_acting
-41e1945 PG: refactor calc_acting to handle pg_shard_t changes
-035d6cc osd/: refer to pg by spg_t and replica by pg_shard_t
-8b46dd1 messages/: include shard information in various pg messages
-fa98064 ReplicatedBackend: excise OSDService*
-31b7937 PGBackend/ReplicatedBackend: move temp handling into PGBackend
-761f0b1 PGBackend: use whoami_shard().shard in rollback*, objects*
-5d01f88 ReplicatedBackend/PGBackend: move objects_* methods into PGBackend
-8ca875b PGBackend/ReplicatedBackend: move rollback methods into PGBackend
-4a25951 osd_types: introduce spg_t, pg_shard_t
-44b43df ObjectStore: use ghobject_t for setattrs
-f2826fa src/osd: pass in version to recover to recover_object
-1c93e03 osd/: Add a shard parameter to SnapMapper to handle multiple pg shards
-f678aef TestPGLog: remove test with DELETE op with prior_version = eversion_t()
-09d611d PGLog::merge_old_entry: simplify the oe.version > ne.version case
-e6a1122 osd: l_osd_tier_promote
-d116e55 PG: just ignore rollbacks on objects we have already failed to rollback
-0e7b10a PG::remove_snap_mapped_object: use pg_whoami.shard
-fd9da00 ReplicatedPG: take snapset_obc write lock where appropriate
-da4652c ReplicatedPG: release backfill state on_global_recover not peer recover
-d687ed9 ReplicatedPG: take clone write lock as well in make_writeable
-643b6a5 ReplicatedPG,osd_types: seperate require_rollback from ec_pool
-f020ce9 ReplicatedPG:: remove_snap_mapped_object already removes the object
-17e6ecc ReplicatedPG: find_object_context debugging: output oi
-b3b2bab ReplicatedPG: handle xattr cache on rollback and delete_head
-d8b6d4c ReplicatedPG: release_op_ctx_locks in all-applied, not all-committed
-13a41e1 FileStore: permit NULL onreadable callback
-3650da6 ErasureCodeJerasure: fill in decoded if all shards are included
-44f5d4d ErasureCodeJerasure: fix alignement issues in encode/decode
-06ec9bd ObjectStore: fix OP_COLL_ADD dump output
-541a7e2 TestRados: send aligned appends on erasure pools
-e0b0508 ReplicatedPG: reject unaligned writes on ec pools
-211fc4e librados: add calls to expose required write alignment
-4c1338f SimpleMessenger: init_local_connection whenever my_inst changes
-bd8fcd2 osd: improve whiteout debug prints
-63f5a79 osd/ReplicatedPG: make agent skip blocked obcs
-7997646 ReplicatedBackend: print char ack_type as int
-a71d829 (origin/wip-barrier) client: disable barrier support
-747002c client: fix barrier interval
-d7457f7 client/barrier: drop unused active_commit_interval
-ce643e0 client: don't populate Client::barriers from read accesses
-a1dbc9c qa/workunits/suites/pjd: use test suite with acl tweak
-623748e (origin/wip-dirfrags) mds: bump the protocol version
-2a19a1b osd/ReplicatedPG: allow is_degraded_object() to be called outside of backfil
-e5457df mds: open sessions for rejoin imported caps
-c54b3ce mds: fix slave rename rollback
-9e8dbf9 mds: remove failed MDS from export bystanders list
-21d209d mds: wake up dentry waiters when handling cache rejoin ack
-74ef370 mds: fix negative rstat assertion
-2253534 mds: avoid race between cache expire and pushing replicas
-cc77ef2 mds: fix scattered wrlock rejoin
-3b90c78 mds: fixes for thrash fragment
-5b1de69 mds: force fragment subtree bounds when replaying ESubtreeMap
-4d5ceba mds: fix 'force dirfrags' during journal replay
-f3666ed mds: journal dirfragtree change
-ee7ac6f mds: allow fragmenting subtree dirfrags
-98105b2 mds: preserve dir_auth when spliting/merging dirfrags
-3dc51de mds: minor cleanup for EFragment and MMDSFragmentNotify
-9df6861 mds: freeze dir deadlock detection
-9a47913 mds: improve freeze tree deadlock detection
-8079939 mds: handle frag mismatch for cache expire
-305d16f mds: handle frag mismatch for cache rejoin weak
-0eb311d mds: fix open undef dirfrags
-6e013cd mds: properly set COMPLETE flag when merging dirfrags
-ee0ab2b mds: fix CInode::get_dirfrags_under()
-1080fa4 mds: fix MDCache::adjust_subtree_after_rename()
-e0e2565 mds: fix MDCache::get_force_dirfrag_bound_set()
-ffe7151 mds: handle frag mismatch for discover
-b88034e mds: use discover_path to open remote inode
-1ff7766 mds: introduce fine-grained discover dirfrag wait queue
-2c909cd mds: revert commit 15a5d37a
-5faa313 mds: acquire scatter locks when exporting dir
-3154ee8 mds: acquire locks required by exporting dir
-3fb408e mds: introduce nonlocking auth pin
-d0df841 mds: allow acquiring wrlock and remote wrlock at the same time
-1dae27c (origin/wip-7371) ReplicatedPG: return no data if read size is trimmed to zero
-774125c osd: set client incarnation for Objecter instance
-0dd1e07 osd: schedule agent from a priority queue
-a812982 osd/ReplicatedPG: simplify agent_choose_mode
-905df2e osd/ReplicatedPG: block requests to cache PGs when they are full
-85e06f9 osd/ReplicatedPG: redirect reads instead of promoting when full
-b92c79d osd/ReplicatedPG: use reply_ctx in a few cases
-7f85421 osd/ReplicatedPG: do not flush omap objects to an EC base pool
-8c7bc2e osd/ReplicatedPG: do not activate agent unless base pool exists
-11e4695 osd: add OMAP flag to object_info_t
-6581ce9 osd/ReplicatedPG: ignore starvation potential when taking write lock during promote
-f617eba osd/ReplicatedPG: do not choke on op-less flush OpContexts (from flush)
-dd3814f osd/ReplicatedPG: do not flush|evict degraded objects
-90457b1 ceph_test_rados_api_tier: fix osd pool set json syntax
-230aad7 osd: clear agent state when PG becomes a replica
-c2d16d7 osd/ReplicatedPG: do not flush or evict hitsets
-e07f987 osd/ReplicatedPG: fix evict mode selection for large target
-c9daf8e osd/ReplicatedPG: add slop to agent mode selection
-3bc3127 osd/ReplicatedPG: initial agent to random hash position inside pg
-f693045 osd: add pg_pool_t::get_random_pg_position()
-7bb0aa5 osd: only enable tier agent when osd is in active state
-cb4aa3a osd: observe 'notieragent' osdmap flag
-dcf20b9 osd: add 'notieragent' flag to OSDMap
-a5dabb5 histogram: fix histogram::get_position_micro overflow
-199bdb1 mon: test dirty stats in ceph df detail
-18bc151 osd/ReplicatedPG: decay tier agent histograms over time
-da9ed08 osd/ReplicatedPG: basic flush and evict agent functionality
-a54f819 osd: agent worker thread
-9ac03ef osd/ReplicatedPG: fix finish_flush
-34fcf42 osd/HitSet: add HitSetRef
-6950212 osd/ReplicatedPG: factor clone check out of evict op code
-fc28a99 osd/ReplicatedPG: add on_finish to OpContext
-a57052c mon: include dirty stats in 'ceph df detail'
-bc94524 osd: rename test/test_osd_types.cc -> test/osd/types.cc
-e65c280 osd: add pg_pool_t::get_pg_num_divisor
-95f25ce mon/OSDMonitor: allow new pool policy fields to be set
-0988c84 osd/osd_types: add cache policy fields to pg_pool_t
-297d54e histogram: add decay
-fb4152a histogram: move to common, add unit tests
-85a8272 histogram: rename set -> set_bin
-8b68ad0 histogram: calculate bin position of a value in the histrogram
-d921d9b qa: do not create erasure pools yet
-4560078 common: ping existing admin socket before unlink
-c673f40 (origin/wip-primary-affinity) osd/OSDMap: include primary affinity in OSDMap::print
-87be7c1 osd/OSDMap: remove bad assert
-ba3eef8 mon/OSDMonitor: add 'mon osd allow primary affinity' bool option
-c360c60 ceph_psim: some futzing to test primary_affinity
-f825624 osd/OSDMap: add primary_affinity feature bit
-8ecec02 osd/OSDMap: apply primary_affinity to mapping
-871a5f0 (origin/wip-brag) ceph.spec: add ceph-brag
-4ea0a25 debian: add ceph-brag
-57d7018 ceph-brag: add Makefile
-cf4f702 (origin/wip-7212-sage-b) mon/Elector: bootstrap on timeout
-4595c44 mon: tell MonmapMonitor first about winning an election
-7bd2104 mon: only learn peer addresses when monmap == 0
-3c76b81 (origin/wip-7395) OSD: use the osdmap_subscribe helper
-6db3ae8 OSD: create a helper for handling OSDMap subscriptions, and clean them up
-5b9c187 monc: new fsub_want_increment( function to make handling subscriptions easier
-7d398c2 doc/release-notes: v0.67.6
-0ed6a81 (origin/wip-osdmaptool-pool-fix) osdmaptool: add tests for --pool option
-f98435a osdmaptool: add --pool option for --test-map-pgs mode to usage()
-eedbf50 osdmaptool: fix --pool option for --test-map-object mode
-e44122f test: fix signed/unsigned warnings in TestCrushWrapper.cc
-64cedf6 (origin/wip-7394) OSD: disable the PGStatsAck timeout when we are reconnecting to a monitor
-794c86f monc: backoff the timeout period when reconnecting
-60da8ab monc: set "hunting" to true when we reopen the mon session
-1a8c434 monc: let users specify a callback when they reopen their monitor session
-589e2fa mon: ceph hashpspool false clears the flag
-7834535 mon: remove format argument from osd crush dump
-020e543 mon: do not goto reply if a ruleset exists in pending
-0c9c157 mon: osd crush rule create-simple functional tests
-c248e7c mon: osd crush rule functional tests
-4784a68 mon: add ruleset name to crush rule dump
-fce4d68 mon: add missing format argument to crush dump
-cec1893 mon: add missing format argument to crush rule dump
-7ff2756 mon: osd create pool test refactor
-fd13307 mon: minor improvement to test-helpers.sh
-4b687ba mon: if crush rule create-simple exists return
-a7e9a7b crush: display item name in CrushWrapper::dump_rule()
-e5b6eb4 crush: cosmetic changes to CrushWrapper::dump_rule()
-dcfeee6 crush: add the dump_rule(int ruleset) method
-f77e8ea crush: add CrushWrapper::dump_rules() unit test
-462ad76 crush: fix leaks in TestCrushWrapper.cc
-6ad6b09 mon: remove racy tests from osd-pool-create.sh
-8dea588 mon: add osdmonitor_prepare_command to the admin socket
-07c494b mon: add --mon-advanced-debug-mode
-5ea156a mon: Monitor::send_reply gracefully handles no connection
-53e92f6 mon: split prepare_command in two
-d012119 (origin/wip-null-xattr) mds: remove xattr when null value is given to setxattr()
-6e6a333 (origin/wip-open-truncate) mds: properly replay dentry trace for open truncate.
-9035227 doc/release-notes: do not downgrade from v0.67.6
-7533b3b doc/release-notes: note about dumpling xattr backport
-cc1e844 PendingReleaseNotes: note about cephfs backtrace updates
-74951ca osd/OSDMap: pass pps value out from _pg_to_osds
-e107938 osd/OSDMap: fix _raw_to_up_osds for EC pools
-1cc8c25 mon/OSDMonitor: add 'osd primary-affinity ...' command
-cee9142 osd/OSDMap: add osd_primary_affinity fields, accessors, encoding
-af4c142 mon/OSDMonitor: fix legacy tunables warning
-a0b2c74 (origin/wip-moncap) osd/OSDCap: handle any whitespace (not just space)
-824dd52 mon/MonCap: handle any whitespace (not just space)
-5a6c950 packaging: do not package libdir/ceph recursively
-840e918 tests: fix packaging for s/filestore/objectstore/
-b64f1e3 tests: fix objectstore tests
-f34eb1b (origin/wip-update-backtrace) mds: force update backtraces for previously created FS
-b5c10bf Fix bad dealloctor
-a4b3b78 correct one command line at building packages section
-33692a2 osdmaptool: fix cli test
-fed8396 tset_bufferlist: fix signed/unsigned comparison
-8ca3d95 (origin/wip-7346) rgw: multi object delete should be idempotent
-bf38bfb (origin/wip-7271) rgw: set bucket permissions, cors on swift creation
-2682b64 (origin/wip-doc-librados-intro) doc: Incorporated feed back from Loic and Dan.
-0da9621 doc: Adds additional terms for use with librados.
-e1a49e5 (origin/wip-7385) ObjectCacher: remove unused target/max setters
-0559d31 librbd: remove limit on number of objects in the cache
-db034ac ObjectCacher: use uint64_t for target and max values
-bf8cf2d ObjectCacher: remove max_bytes and max_ob arguments to trim()
-d136eb4 (origin/wip-crush) mon: allow firefly crush tunables to be selected
-e3309bc doc/rados/operations/crush: describe new vary_r tunable
-525b2d2 crush: add firefly tunables baseline test
-37f840b crushtool: new cli tests for the vary-r tunable
-e88f843 crush: add infrastructure around SET_CHOOSELEAF_VARY_R rule step/command
-f944ccc crush: add SET_CHOOSELEAF_VARY_R step
-e20a55d crush: add infrastructure around new chooseleaf_vary_r tunable
-ac16fd6 mailmap: Derek Yarnell is with University of Mississippi
-9e43f93 mailmap: Dmitry Smirnov is with Debian GNU/Linux
-0869fcb mailmap: Eric Mourgaya is with Credit Mutuel Arkea
-165e76d common: admin socket fallback to json-pretty format
-e98e344 client ownership info validation corrected
-f2f4eb5 Updated client code to complete PUT and DELETE requests
-69682ad1 memstore: fix touch double-allocation
-9292cc2 doc: highlight that "raw" is the only useful RBD format for QEMU
-9e62beb qa: add script for testing rados client timeout options
-79c1874 rados: check return values for commands that can now fail
-8e9459e librados: check and return on error so timeouts work
-d389e61 msg/Pipe: add option to restrict delay injection to specific msg type
-671a76d MonClient: add a timeout on commands for librados
-3e1f7bb Objecter: implement mon and osd operation timeouts
-9bcc42a (origin/wip-7334) alert the user about error messages from partx
-42900ff use partx for red hat or centos instead of partprobe
-6926272 (origin/wip-fsetpipesz-fix) common/buffer: fix build breakage for CEPH_HAVE_SETPIPE_SZ
-a5f479c configure: fix F_SETPIPE_SZ detection
-450163e configure: don't check for arpa/nameser_compat.h twice
-c1d2a99 libcephfs: fix documentation for ceph_readlink
-dbaf71a mailmap: Moritz Möller is with Bigpoint.com
-4cf2c72 Server changes to deploy in a production env 1. Added the wsgi entry point app.wsgi 2. Updated client code to mandate the update-metadata to have url to publish and unpublish 3. Updated the README to describe a bit about the server operations as well.
-575566b (origin/wip-7329) ceph_test_rados_api_tier: try harder to trigger the flush vs try-flush race
-a8e6c9f crush: add chooseleaf_vary_r tunable
-f17caba (origin/wip-7370) crush: allow crush rules to set (re)tries counts to 0
-795704f crush: fix off-by-one errors in total_tries refactor
-ed32c40 crushtool: add cli test for off-by-one tries vs retries bug
-75c5525 qa/workunits/rest: use larger max_file_size
-a2dae0d mailmap: Somnath Roy is with SanDisk
-17c8a23 mailmap: Yan, Zheng name normalization
-5d20c8d mailmap: Ray Lv is with Yahoo!
-1a588f1 Rename test/filestore to test/objectstore
-3d65660 script to test rgw multi part uploads using s3 interface
-5d59dd9 script to test rgw multi part uploads using s3 interface
-0bac064 added script to test rgw user quota
-8cb3dad doc: Added Python doc.
-22afd6c doc: Added inline literal tag.
-aaa2799 doc: Adds Python to index and sets maxdepth to 2.
-0f2386a script to test rgw user quota functionality
-16ae4f8 fuse: fix for missing ll_ref on create
-c1b0714 client: For rebase need to fix ll_readlink() call in Synthetic client
-349b816 client, libcephfs: make readlink sane
-afcc7eb mds: include requested caps (namely, xattrs) on getattr reply
-77047ee libcephfs: add an xattr ll test
-55a20c0 libcephfs: add ceph_ll_listxattr
-acf2e49 libcephfs: add ceph_ll_lookup_root()
-e2dc1b6 libcephfs: expose new client ll_ interface
-935f8b3 client/fuse_ll: adapt to new ll_ interface
-9ad8f57 client/SyntheticClient: adapt to new ll_* interface
-dad91b5 client: direct read/write methods that bypass cache, cap checks
-b700768 client: expose layout information
-e08210d client: switch ll_* methods to Inode* arguments
-3752660 client/Client: make open fhp argument optional
-23577c8 client/Client: return 1 from readdir cb on full
-ff04629 client: add barrier and types
-7f6d755 client: whitespace
-7f9fdc3 osdc/Objecter: whitespace
-548ccd9 mds/Server: whitespace
-3a5fa87 (origin/wip-osdmap-primary) osd/OSDMap: populate *primary when pool dne
-5b7e2b2 rgw: initialize variable before call
-45d31f0 osdmaptool: tests for --test-map-pgs
-b98eaa5 osdmaptool: test --import/export-crush
-7c31036 osdmaptool: s/simple.t/missing-argument.t/
-362825c osdmaptool: fix cli tests
-9caaef7 osdmaptool: allow a completely random placement
-7f1b12f osdmaptool: add --test-map-pgs mode
-bb6d3f8 rest/test.py: use larger max_file_size for mds set test
-f584de5 With functionality test cases. Test it using 'python setup.py test'
-302fc92 mon: s/ENOSYS/ENOTSUP/
-e1e6c45 Completed model and controller code 1. GET, PUT and DELETE request are added 2. Removed public folder as it will never be used
-42a64e1 Revert test case of "mon: OSDMonitor: do not allow changing an erasure-coded pool's size"
-0aa25b1 Some suggested changes, both errors and rewordings
-30fd0c5 Intial version of the server code. 1. Database modelling is done 2. PUT request is completed
-fc963ac (origin/wip-erasure-code-directory) erasure-code: move test files to a dedicated directory
-7baa62f erasure-code: move source files to a dedicated directory
-9ecf3467 (origin/wip-rgw-vg) rgw: initialize variable before call
-ce0e3bd qa/workunits/snaps: New allow_new_snaps syntax
-22b0057 mon: test osd pool create pg_pool_t::stripe_width behavior
-dfc90cf mon: osd pool create sets pg_pool_t::stripe_width
-33b8ad8 common: add osd_pool_erasure_code_stripe_width
-798b56a unittests: update osdmaptools with stripe_width
-11c11ba mon: add erasure-code pg_pool_t::stripe_width
-922e5cf (origin/port/fixes) osd: fix type mismatch warning
-6fda45b os/kvstore: remove used var
-994bdea os/kvstore: trivial portability fixes
-377a845 common: simpler erasure code technique
-04b1ae4 (origin/wip-7336) rgw: fix rgw_read_user_buckets() use of max param
-fdeb18e (origin/wip-7109) mon: MDSMonitor: Forbid removal of first data pool
-c7d265a mon: OSDMonitor: Refuse to delete CephFS pools
-e80b084 (origin/wip-erasure-code-command) erasure-code: add ceph_erasure_code debug command
-68e6dad (origin/wip-mds-cluster) mds: avoid sending duplicated discovers during recovery
-bec1209 erasure-code: benchmark moves to a dedicated directory
-ad8c666 mon: check cluster features before rule create-erasure
-c8c4cc6 (origin/wip-7146) mon: OSDMonitor: do not allow changing an erasure-coded pool's size
-7b15cb1 mon: osd-pool-create test no longer use hardcoded ruleset
-428c75e mon: osd-pool-create test EAGAIN when pending
-59ba03b mon: test erasure code pool creation
-d40841c mon: osd-pool-create test enforce -e
-d8d747d mon: osd-pool-create test must kill -9
-0ca7ed8 mon: osd-pool-create test initialization
-9cb2215 mon: osd-pool-create shows logs on error
-5bb4ca4 vstart: load erasure code plugins from sources
-5f9f300 unittests: reduce paxos propose interval to increase speed
-3370973 pybind: osd crush rule create-erasure tests
-fdc967d pybind: cosmetic changes to tests
-ad09023 pybind: fix tests that do not fail as expected
-cb39b13 mon: osd crush rule create-erasure
-1acc73b mon: compute the ruleset of erasure-coded pools
-8259e51 mon: compute the size of erasure-coded pools
-caefb8a mon: erasure code plugin loader helper
-61c45fe mon: pool create helper for crush ruleset
-6caac92 mon: pool creation helper for size
-9d766ca mon: no default ruleset except for replicated pools
-0cac202 mon: helper for pool properties parsing
-cc66c6a erasure-code: test ErasureCodeJerasure::create_ruleset
-02869f8 erasure-code: implement ErasureCodeJerasure::create_ruleset
-f019c90 erasure-code: implement example create_ruleset
-6ca9b24 erasure-code: add crush ruleset creation API
-2dca737 erasure-code: the plugin is in a convenience library
-e47e49d doc/release-notes: v0.77 draft notes
-2c504ea doc/release-notes: v0.76
-60ca6f6 client: fix warnings
-1829d2c librados: add timeout to wait_for_osdmap()
-0dcceff conf: add options for librados timeouts
-a23a2c8 os/KeyValueStore: fix warning
-8e30db8 rest: add a few rest api tests
-eb9ffd5 mon: use 'mds set inline_data ...' for enable/disable of inline data
-408b0c8 mon: fix 'mds set allow_new_snaps'
-e5ed1b2 mon: do not force proposal when no osds
-3b99013 (tag: v0.76) v0.76
-7ff2b54 client: use 64-bit value in sync read eof logic
-2f85b8c doc: Incorporated feedback.
-684e5c4 (origin/wip-performance-configs) Pipe, cephx: Message signing under config option
-5fde828 cmp.h: boost tuple comparison is replaced by regular comparison
-8e19488 TrackedOp: optionally disable the actual tracking operations
-98ae059 Throttle: Turn off throttle based on max bytes
-03f7f77 Throttler: optionally disable use of perfcounters
-ee48c87 common/shared_cache.hpp: compact to a single lookup where possible
-27b5f2b common/shared_cache.hpp: avoid list::size()
-ee4cfda doc: rgw: el6 documentation fixes
-48fbcce (origin/wip-5997) osd: Change some be_compare_scrub_objects() args to const
-ce1ea61 osd: Change be_scan_list() arg to const
-e1bfed5 common: buffer::ptr::cmp() is a const function
-34eb549 osd: Move the rest of scrubbing routines to the backend
-f9128e8 osd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list()
-37447e7 osd: Add scrub_supported() backend interface
-560f5f1 OSDMap: fix deepish_copy_from
-d508079 OSDMonitor: use deepish_copy_from for remove_down_pg_temp
-61914d8 OSDMap: deepish_copy_from()
-802692e os/KeyValueStore: fix warning
-0389f1d (origin/wip-osdmap-features) mon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental
-b9208b4 OSDMap: note encoding features in Incremental encoding
-e4dd1be (origin/wip-pybind-enverr) pybind: improve EnvironmentError output
-754ddb1 rgw: fix build on centos
-1628423 mailmap: Rutger ter Borg affiliation
-3a1a8c3 mailmap: Laurent Barbe affiliation
-5b5bc0b mailmap: anonymous contributions are unaffiliated
-b0fe2a9 mailmap: Andras Elso affiliation
-93a62d7 mailmap: Ma Jianpeng affiliation
-74d5bf5 mailmap: Simon Leinen is with SWITCH
-f9132e0 mailmap: John Spray is with Inktank
-49842db mailmap: Alan Somers affiliation
-79563e1 mailmap: Jonathan Dieter affiliation
-a28f1fa mailmap: Christian Marie affiliation
-aa7fc3b mailmap: Dan Chai is unaffiliated
-cb9792e mailmap: Kai Zhang affiliation
-30f4969 mailmap: Ron Allred name normalization
-b5d22eb mailmap: Thomas Bechtold affiliation
-c8c103b mailmap: Xihui He affiliation
-f7b000e mailmap: Adam Twardowski affiliation
-47a5122 mailmap: Huang Jun is unaffiliated
-0dbf44f mailmap: Kun Huang affiliation
-ad515bf ceph-disk: support and test the absence of PATH
-3f5e4f5 ceph-disk: larger timeout in the test script
-d70efe9 FileStore: avoid leveldb check for xattr when possible
-6d1daea unittest_striper: fix warning
-f9071a7 doc: cls moved to subdirectory
-e78f756 (origin/wip-rbd-rm-watchers) run-rbd-tests: run remove_with_watcher test
-4ebc32f rbd: don't forget to call close_image() if remove_child() fails
-0a553cf rbd: check for watchers before trimming an image on 'rbd rm'
-dcbe872 pybind: work around find_library() not searching LD_LIBRARY_PATH
-47dcddc Corrected the sample output in README.md
-9006777 1. Updated README.md with sample output 2. Remove 'osd_hosts' entry from json and added that information as part of sys_info 3. In the 'num_components' entry, 'bytes' entry is replaced to contain an object with 'count' and 'scale' members
-70c7c9e pybind/rados.py: improve error output
-456c727 doc: Removed extraneous character from path.
-f32bfa5 ceph_test_object_map: fix build
-5476b4b keyvaluestore: name to keyvaluetore-dev for now
-cfdfb98 Make ObjectStore unit tests shared with KeyValueStore
-972d4b2 Add KeyValueStore implementation
-03da035 docs: Typo in CloudStack user creation
-f0f4b8d docs: Improve CloudStack documentation.
-8fb366f Add a new KV wrapper GenericObjectMap
-b31c0f0 civetweb: fix warning
-1e85bc9 cls_user: init cls_user_list_buckets_op fields
-fd260c9 cls_user: init cls_user_stats fields in ctor
-d0f13f5 OSDMap: fix deepish_copy_from
-d7b0c7f ceph-disk: run the right executables from udev
-318e208 (origin/wip-7190) OSD: don't assume we have the pool in handle_pg_create
-2a737d8 leveldb: add leveldb_* options
-11cf9bb (origin/wip-7169-2) rgw: fix multipart min part size
-12ba8a3 Add a virtual interface init, open, create_and_open to KeyValueDB
-2e7bd83 rgw: fix multipart upload listing
-f1b5309 osd: OSDMonitor: ignore pgtemps from removed pool
-ff5abfb buffer: make 0-length splice() a no-op
-86c3c5a test/Makefile.am: update test_cls_rgw* rules
-26ace1e test_rgw_admin_opstate: get it compiled
-28c7388 osdc/Striper: test zero-length add_partial_result
-f513f66 (origin/wip-7116-joao) osd: OSDMonitor: ignore pgtemps from removed pool
-3c77c4c (origin/wip-7060) OSDMap: use deepish_copy_from in remove_redundant_temporaries
-368852f OSDMap: fix damaging input osdmap from remove_down_temps
-bd54b98 OSDMap: deepish_copy_from()
-9e52398 packaging: apply udev hack rule to RHEL
-64a0b4f packaging: apply udev hack rule to RHEL
-9265d76 client: Avoid uninline empty inline data
-b99e9d3 mds: Handle client compatibility
-ddbaa5c mds: Shutdown old mds when inline enable
-e3c4c4c mds: Add inline switch
-81c4f54 client: Make inline size tunable
-40a6939 client: Fallocate inline data path
-47e6a78 client: Write inline data path
-a0cb524 client: Read inline data path
-4a5c099 client: Add inline data migration helper
-165ddb9 client: Push inline data to mds by send cap
-3c05e80 client: Receive inline data pushed from mds
-be3db0b client: Add inline fields to Inode
-45c2ab4 mds: Receive updated inline data from client
-1280d99 mds: Push inline data to client in inodestat
-7af7a5e ceph: Add inline fields to InodeStat
-cf63f7e mds: Push inline data to client in cap message
-3aa7f0b mds: Add inline fields to Capability
-0f00f07 osdc: Add write method with truncate parameters
-ac5c9dd ceph: Add inline fields to MClientCaps
-eff9f02 If 'ceph osd metadata' isn't working, inform the user about it via stderr
-fffbfc9 mon: test for MForward messages
-d9a689d mon: shell test helpers to run MONs from sources
-c06eca2 unittests: fail early when low on disk
-9413a51 (origin/wip-user-quota-2) rgw: simplify a code path
-1b0567b radosgw-admin: add usage for user stats [--sync-stats]
-97edd2f doc: Switched logging to true. Now required for sync agent.
-9a55fa1 cls_user: add generate_test_instances() implementation
-e5dc8d6 rgw, cls_user: handle error cases related to response decoding
-8a69ac8 rgw: implement restful set user quota request
-92cabd4 rgw: new restful api for retrieving user quota info
-0f7b3c7 rgw: quota thread for full user stats sync
-51ffede (origin/wip-7215-quorum-features) mon: do not use CEPH_FEATURES_ALL for things that touch the disk
-3d4a673 Elector: send an OP_NAK MMonElection to old peers who support it
-687b570 Elector: ignore messages from mons without required feature capabilities
-41796c0 Monitor: add a function to get the required quorum features from the local compatset
-f8e4af2 OSDMonitor: do not allow creation of EC pools if the quorum can't handle it
-e79e1d2 Monitor: introduce a function that translates quorum features into disk features
-2f9a93d rgw: round bytes to the next 4k for quota use
-6f34df4 rgw: sync bucket stats thread
-7545177 rgw, cls_user: fix bucket creation
-d992043 radosgw-admin: dump header when requested for user stats
-5976bfc radosgw-admin: update stats sync completion
-ba39512 cls_user: op to keep track of sync completion time
-a68b52a cls_user: keep time info about stats update
-0b7968c cls_user: header cleanup
-45b2229 rgw: user quota should rely on cached info
-c59a98e rgw: more quota fixes
-12f5801 rgw: configure user quota also through region map
-a6fae68 rgw: more rgw_quota fixes
-04b5a71 rgw: some quota fixes
-cfb9553 rgw: enable user quota
-15c0189 radosgw-admin: user quota interface
-a854d89 rgw: some fixes
-c1c40df rgw: implement quota handlers for user stats
-c13634e rgw: extend infrastructure to handle user stats read
-364f7c5 rgw: move some code around, no actual changes
-92a87b3 rgw: refactor quota cache
-4aee3fa rgw: rename RGWBucketStats to RGWStorageStats
-5612ded rgw: pass bucket owner all around
-cbe1da8 radosgw-admin: bucket stats --sync-stats [--bucket=...]
-c8793fb cls/user: some fixes + handle old buckets case
-eef7ba4 rgw, radosgw-admin, cls/user: retrieve user stats
-edcf9fe cls/user: a new op to retrieve user header
-438aea7 cls/user: accounting functionality
-c7b4d00 rgw: move bucket add / remove to new user objclass
-23aa65f rgw: replace user bucket listing with objclass call
-248c4ae rgw: new user objclass
-b90570f Fix 404 broken links to logging and debug configuration
-4553e6a Fix trailing space
-7bed2d6 called sysinfo.append(meta) in get_sysinfo within the while loop
-ef3fe7b Updated README with How-to-use instructions
-faae5b9 (origin/use-ceph-sharedptr) libc++: convert tr1 uses
-ea026c6 doc: Added domain pool, and changed zone configs to use domain tool so they don't clash.
-0303f0f doc: Change zone domain to include "domain" so it is clear.
-95e63ac doc: Added space between {Query_String} and [E=HTTP ... to solve for 500 error.
-6f6b1ee ReplicatedBackend: fix uninitialized use warning/bug
-df4df46 Monitor: use a single static accessor for getting CompatSet features off disk
-6915053 doc: Adding more information on style and usage for documenting Ceph.
-2216afd doc: Fixed omission of a comma in zone configuration.
-55ab35b (origin/wip-7207) FileStore: perform LFNIndex lookup without holding fdcache lock
-1560cc0 (origin/wip-rgw-civetweb-2) mongoose: git rm src/mongoose
-bd089b1 civetweb: md5.inl -> md5.h
-1a2bed1 civetweb: add include to makefile
-287ea5c rgw: modify the civetweb rule
-d26e766 civetweb: fix module uri
-3f20a41 civetweb: update submodule
-f2f7475 rgw: switch mongoose to civetweb
-08fa34d (origin/wip-erasure-rule) osd/OSDMap: do not create erasure rule by default
-6f8541c (origin/use-unordered-map) osd: use ceph:: scoped hash_map
-289a400 Corrected ownership info which was presented as string, added stub code for unpublish
-ecbdeb1 PGBackend: clarify rollback_stash name and method comments
-4fc4573 PG: drop messages from down peers
-e73a9f7 ReplicatedPG: make STARTSYNC a noop
-96d4a0c PG::calc_acting: consider newest_update_osd when choosing backfill peers
-7e3ccfe ReplicatedPG: take ReplicatedPGRef in BlessedContext
-167f852 RadosModel: RollBack dirties the object
-6e74123 RadosModel: undirty with update_object_undirty
-ca37d08 ReplicatedPG::trim_object: remove unused int r; declaration
-d0eda79 common/hobject: print shard as unsigned, not as char
-9273177 ReplicatedPG::_process_copy_chunk: use append
-183f41c ReplicatedPG: fill in mod_desc for hitset repops
-9fd7a80 ReplicatedPG: use append for write and writefull
-7c9425c ReplicatedPG: fill in mod_desc in finish_copyfrom
-e8a08ff ReplicatedPG::finish_copyfrom: check new_obs.exists, not obs.exists
-eb8f66d ReplicatedPG: handle removing the old object in finish_copy_op
-f238441 ReplicatedPG: EOPNOTSUPP on ec_pool if there are omaps in the COPY_GET
-b3c2ef2 ReplicatedPG: make COPY_GET async read friendly
-a382ab8 ReplicatedPG: requeue in_progress_async_reads on_change
-0bba79b ReplicatedPG: support async reads on ec pools
-647e75a src/: add CEPH_OSD_OP_READ_SYNC
-3ef6282 ReplicatedPG: use pgbackend->objects_read_sync() as appropriate
-2fe5e1f osd/: add sync/async read methods to PGBackend
-66bc91c ObjectStore: _collection_move_rename needs to increment ops
-a3e4a84 PGLog,PG: reset can_rollback_to when we get a log entry without a transaction
-347d968 PGLog: we cannot rollback past a recovered object entry
-25eced5 PGLog: create interface allowing interface user to cleanup/rollback
-c98cb1c ReplicatedPG: Fill in rollback info for log events
-ecae37c osd/: introduce xattr caching for ec pools
-155b4b0 PGBackend,ReplicatedBackend: add support for rolling back log entries
-0528974 osd_types: add a can_rollback_to line to pg_log_t
-63f64de osd_types: add ObjectModDesc into pg_log_entry_t
-a7a6a2f osd_types: ObjectModDesc
-53c26bc osd/: move client op handling into ReplicatedBackend
-c58c899 PGBackend: allow queue_transaction to specify an op
-1a4694f ReplicatedPG: factor out should_send_op
-26b804f ReplicatedPG: split out op_applied_replica
-09717e6 PG/ReplicatedPG: move snap map management into append_log
-5732f0c ReplicatedBackend: implement RPGTransaction
-bf9390f hobject_t/ReplicatedPG: tempness is now an hobject thing
-c60185c PGBackend: add PGTransaction
-d3c8e85 ReplicatedBackend: update the collection_list mechanisms to skip stashed objects
-4d56e3c test/osd/: verify length of buffer returned in read
-0885880 test/osd/TestRados.cc: skip 0 weight ops
-d0933ee test/osd: add append support to WriteOp
-ca91fb4 test/osd: adapt RadosModel to not do omap ops on ec_pools
-7fe22da test/osd: restructure Object/RadosModel in prep for append
-69ad880 test/osd/Object: create encoders for ContDesc
-8494aa8 src/test/osd: remove tmap test
-03c5344 PGLog: allow for empty pg log in update_range if log_tail == eversion_t()
-1b0335e common: add option to disable filestore sharded object check
-1b5992b FileStore::lfn_link: handle link within a collection
-6d05fa2 PG: prefer older last_update for ec_pool
-393a035 OSDMonitor: add debug_fake_ec_pool
-a1ee1ee PGLog::rewind_divergent_log: we can rewind to tail, fix assert
-a200650 PGLog: don't move up log.tail
-1f9457c ReplicatedBackend: remove pushing entry for each object as it completes
-b7d100b FileStore::_collection_move_rename: remove source before closing guard
-06f7a98 ReplicatedBackend.h: don't need to be active for pushes
-518774d ObjectStore: improve name of the queue_transaction which cleans up the transaction
-c03d027 hobject: admit that gen_t is actually version_t
-8060afd (origin/wip-osdmapenc-fix) MOSDMap: reencode maps if target doesn't have OSDMAP_ENC
-9792500 doc: add-or-rm-mons.rst: better explanation on number of monitors
-9eac5e3 Added update_metadata, clear_metadata, and usage description code
-dcca413 added perl script for rgw bucket quota tests
-28c75f8 removing rgw_tests.sh
-54caa01 removing rgw_tests.sh
-8b8ede7 modified the port to 7280 in the script instead of the default 80
-850b4f4 script for rgw bucket quota testing
-339bed1 (origin/wip-cache-mode-fix) mon/MonCommands: 'invalidate+forward' -> 'forward'
-b88c8ea doc: Added Documenting Ceph (draft) document.
-90aea59 doc: Added documenting Ceph to the toc tree.
-ed2decb doc: Fixed end string from '' to `` to stop warnings. Enforced 80 char line.
-584c2dd (origin/wip-stray-mdsmaps) mon/MDSMonitor: do not generate mdsmaps from already-laggy mds
-4c96853 packaging: ship libdir/ceph
-6bee188 Docs: Add backfill_toofull to list of PG states
-199e614 Initial version of the source code. Statistics extraction is done
-78150bd osd: Add op_process_latency in perf counter
-67d8b72 common: fix bufferlist::append(istream) test
-fdf3b55 Fix #7187: Include all summary items in JSON health output
-c78c300 Remove some almost-duplicate COMMAND definitions
-20cf41d Missing a key for perm 'w' in permmap (src/pybin/ceph_rest_api.py:277) It leads to a 500 error when getting mds help info via rest api. Changed "w" to "rw" in MonCommands.h
-586ad1f rgw: Use correct secret key for POST authn
-52a9154 rgw: Fix signature variable naming/failure print
-6dcf462 rgw: Document fields for access/secret key
-7314cde (origin/wip-7184) osd: ignore num_objects_dirty for old pools
-1b308b6 (origin/port/libc++) libc++: fix null pointer comparison
-1fcbddc libc++: avoid hash re-definitions
-aae4700 libc++: use ceph::shared_ptr in installed header
-4c4e1d0 libc++: use ceph:: namespaced data types
-8e86720 libc++: create portable smart ptr / hash_map/set
-7e7eda4 (origin/wip-osdmap-7177) OSDMap: Populate primary_temp values a little more carefully
-47bc71a fixed the syntax for test maxmds=2
-a13ebd3 fix for the test maxmds=2
-ad203d5 doc: Fixed ruleset typo.
-6b7f27c (origin/wip-rgw-contention) librados: use rwlock for lookup pool, cache results
-4b31456 rgw: add .h file to Makefile rule
-d1de32c doc: Added default-placement to list of placement targets. Added SSL commentary.
-80212ea doc: Added additional comment about port number.
-0215342 (origin/wip-rgw-loadgen) rgw: loadgen, configurable num of objs, buckets
-7c86764 rgw: loadgen shutdown, error out on failures
-85267cf rgw: sign loadgen requests
-e8a4b30 rgw: loadgen frontend read uid, init access key
-57137cb rgw: add a load generation frontend
-f01202d Fixes: #7172
-b1a853e (origin/wip-rbd-mount_timeout) rbd: expose mount_timeout map option
-8ec7fa8 PendingReleaseNotes: note ceph -s fix
-6e93132 doc: Removed Calxeda example.
-dd4a9e1 doc: Removed saucy salamander reference.
-e7d28a7 doc: Added host resolution commentary.
-22e9a75 doc: Added comments from #6682.
-6e37b7a doc: Added modification to quick start.
-742d425 doc: Changed file name.
-f7f9bed doc: Added source file for graphic.
-26aa602 doc: Added source file for graphic.
-c30b138 doc: Added third monitor icon.
-add59b8 doc: Added additional monitor icon.
-4b03326 doc: Removed old file. Changed file name.
-86c1548 (origin/wip-7168) rgw: handle racing object puts when object doesn't exist
-5c24a7e rgw: don't return -ENOENT in put_obj_meta()
-a84cf15 rgw: use rwlock for cache
-790dda9 osd: OSDMap: fix output from ceph status --format=json for num_in_osds num_up_osds returns as an int value, while num_in_osds returns as a string. Since only an int can be returned from get_num_in_osds(), num_in_osds should should also be an int to remain consistant with num_up_osds.
-3194d66 doc: Fixed keyring command and updated for current conventions.
-ec5f7a5 client: ceph-fuse use fuse_session_loop_mt to allow multithreaded operation if "fuse multithreaded = 1". Signed-off-by: Moritz Moeller mm at mxs.de
-e1fd0e8 first commit
-ac5a9fe mon: larger timeout for mon mkfs.sh test
-50808af ceph-disk: larger timeout in the test script
-1aa2601 (origin/wip-7166) osd: OSDMap: build reverse name->pool map upon decoding
-f97264d (origin/wip-rgw-expose-bucket) 6748: rgw: Optionally return the bucket name in a response header.
-2d0d48b (origin/wip-7117-redhat) packaging: ship libdir/ceph
-8b09a43 doc/release-notes: v0.76 draft notes
-2b36761 mon: favor 'mds set max_mds' over 'mds set_max_mds'
-e60dcfa packaging: add missing test files
-5ed7865 (origin/wip-7073) rgw: use configurable prime number for gc hash
-e7b3236 (origin/wip-temp-primary) OSDMonitor: make sure we don't send out maps with a primary_temp mapping
-28e0b76 test: add an OSDMap unittest
-b183115 OSDMap: move temp manipulation functions out of OSDMonitor
-fafc8e9 OSDMap: pay attention to the temp_primary in _get_temp_osds
-12122b1 OSDMap: add primary out params to _pg_to_osds and _raw_to_up_osds
-0c30509 OSDMap: add primary out params to internal _pg_to_up_acting_osds function
-1c750c6 OSDMonitor: implement remove_down_primary_temp()
-412afea OSDMonitor: make remove_redundant_pg_temp clear primary, too
-e2db4ae OSDMonitor: remove primary_temp entries when you remove their pool
-a246039 OSDMap: expose the primary_temp in print()
-1f81fda OSDMap: dedup the primary_temp
-e9e615c OSDMap: add primary_temp to apply_incremental()
-74bdcb6 OSDMap: add [new_]primary_temp to the map and Incremental
-b55c45e OSDMap: update Incremental encode/decode to match the full map's
-3d7c69f OSDMap: add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding
-2646d5e OSDMap: add primary out param to pg_to_raw_up, and use pointers instead of refs
-045e1d7 OSDMap: add primary-specifying pg_to_acting_osds
-93d481a mon, osdmaptool: switch to primary-specifying pg_to_up_acting_osds
-9749f30 OSDMap: implement pg_to_up_acting_osds with primary interface
-5b69978 OSDMap: switch pg_to_osds to have an explicit primary param
-5367d92 OSDMap: rename _raw_to_temp_osds() -> _get_temp_osds()
-69a2ec2 OSDMap: unify the pg_to_acting_osds and pg_to_up_acting_osds implementations
-c1a95f8 OSDMap: remove get_pg_primary() function
-7a9c171 OSDMap: doc the different pg->OSD mapping functions
-268ae82 osd: do not misuse calc_pg_role
-a09d4f1 PG: do not use role == 0 as a determinant of primacy
-644afd6 (origin/wip-3454) radosgw-admin: add temp url params to usage
-fdf1a41 (origin/fix-configure-rerunning) autogen: re-run aclocal after libtoolize
-970f938 doc: Updated paths for OSDs using the OS disk.
-4425f9e librados: Add C API coverage for atomic write operations
-1ffe422 mailmap: add athanatos <sam.just at inktank.com>
-4b5f257 common: fix bufferlist::append(istream) test
-e55a089 doc/release-notes: v0.75
-08c17b7 qa: cleanup cephtool/test.sh tmp files
-5cf6908 mds: Add inline encode/decode to inode_t
-caf7971 mds: Add inline fields to inode_t
-b67e9ef ceph: Add inline state definition
-978ec18 ceph: Add inline data feature
-e268e95 updated "sample.ceph.conf":
-91b8c78 (origin/wip-tier-bits) mon/OSDMonitor: simplify and make 'osd pool set ...' output consistent
-413fc23 osd/ReplicatedPG: no HitSet on non-primary
-be8db8c (origin/wip-cache-snap) osd/ReplicatedPG: use get_object_context in trim_object
-b5ae76e ceph_test_rados: do not delete in-use snaps
-8b39719 osd/OSDMonitor: fix 'osd tier add ...' pool mangling
-d41a1d3 osd/ReplicatedPG: update ObjectContext's object_info_t for new hit_set objects
-10547e6 osd/ReplicatedPG: always return ENOENT on deleted snap
-8cab9e7 ceph_test_rados_api_tier: partial test for promote vs snap trim race
-8221a2a osd/ReplicatedPG: cleanly abort flush if the object no longer exists
-f3ce254 osd/Replicated: mark obc !exists on snap trim
-48306e4 mon: debug propagate_snaps_to_tiers
-6719d30 osd: fix propagation of removed snaps to other tiers
-7e80fa0 osd/ReplicatedPG: handle promote that races with snap deletion
-cd42368 osd/ReplicatedPG: simplify copy-from temp object handling
-1a7335d ceph_test_rados_misc: test bad version for copy-from
-7daab5a osd/ReplicatedPG: adjust flow in process_copy_chunk
-0b816c3 osd/ReplicatedPG: make CopyResults inline in CopyOp
-d00116c ceph_test_rados: flush can also fail due to snap trimming
-7eede85 osd/ReplicatedPG: handle promotion of rollback, src_oids, etc.
-ac446b5 osd/ReplicatedPG: preserve clean/dirty state on clone
-27eb4c5 ceph_test_rados: improve read debug output
-627bdea osd/ReplicatedPG: infer snaps from head when promoting oldest clean clone
-21f3dcb osd: include snap_seq in copy-get results
-c6b73eb osd/ReplicatedPG: always set obc->ssc SnapSetContext for clones
-934de77 osd/ReplicatedPG: do not promote nonexistent clones
-55b83f1 ceph_test_rados: is_dirty on non-flushing objects only
-af5a407 ceph_test_rados: assert on read error
-b70c476 ceph_test_rados: make flush clean correct snap in model
-ac63551 ceph_test_rados: IsDirty on random snaps
-6f4f651 ceph_test_rados: test flush/evict on snaps
-9688642 ceph_test_rados: don't update any state on successful cache-evict
-fc9f8ad ceph_test_rados_api_tier: test flush on snaps/clones
-b2f752a osd/ReplicatedPG: construct appropriate snapc for flush/writeback
-5b8d957 osd: add pg_log_entry_t event type CLEAN
-c91166e osd/ReplicatedPG: refuse to flush when older dirty clones are present
-6bff648 vstart.sh: allow MDS=0
-de8e8b5 osd/ReplicatedPG: make cache-[try-]flush CACHE instead of WR ops
-4e8259d osd/ReplicatedPG: allow cache-evict on snaps
-90e352c osd: add rados CACHE mode (different from RD and WR)
-1f4350e ceph_test_rados_api_tier: test promotion of clones
-c05765e osd/ReplicatedPG: update snap_mapper for promoted clones
-5c94d53 osd/ReplicatedPG: only encode SnapSet on head objects in finish_ctx
-38fe575 osd/ReplicatedPG: always encode snaps in finish_ctx
-bfd4530 osd/ReplicatedPG: mirror SnapSet info when promoting head
-0554735 osd/osd_types: SnapSet::from_snap_set
-c70edf3 osd/ReplicatedPG: add PROMOTE log entry type
-b840aae osd/ReplicatedPG: adjust clone stats when promoting clones
-6dd0a1f osd/ReplicatedPG: include snaps in copy-get results
-d22ecf3 osd/ReplicatedPG: using missing_oid to decide which object to promote
-c3c1541 osd/ReplicatedPG: make find_object_context() pass missing_oid
-33b5ef4 (origin/wip-mon-pgmap) mon/PGMap: make decode version match encode version
-a5aaab3 ceph-dencoder: include offset in 'stray data' error message
-1308225 buffer: do not append trailing newline when appending empty istream
-946d603 (tag: v0.75) v0.75
-9034370 doc: Added comment and example for SSL enablement in rgw.conf
-9615645 doc: Added python example of handle, and closing session examples.
-c0d92b6 (origin/wip-5858-rebase) osd: Implement multiple backfill target handling
-a657fad osd: Interim backfill changes
-54e588c doc: Modified doc examples to use rados_create2.
-4c92dc6 (origin/wip-7141) DBObjectMap::clear_keys_header: use generate_new_header, not _generate_new_header
-93a9b68 (origin/wip-vector-op) erasure-code: use uintptr_t instead of long long
-0082d88 doc: format man pages with s/2013/2014/
-b4054fc doc: copyright s/2013/2014/
-efbdd16 doc: update the crushtool manual page
-283793a doc: crushtool man page nroff format
-d3393e9 crush: tests for crushtool --build
-26f7fa9 crush: crushtool copyright notice update
-b705e52 crush: crushtool emacs compile helper
-d3d75a2 crush: crushtool --build informative messages
-5b28405 crush: crushtool --build uses OSDMap helpers for rulesets
-1368229 crush: print --build debug information when verbose 2
-5b95d18 crush: display args on crushtool failure
-2765f81 crush: parse CEPH_ARGS in crushtool
-cf9a764 osd: factorize build_simple_crush_map* rulesets creation
-7676550 osd: ostream is enough for build_simple*
-cec8d85 (origin/wip-omapdirfrag2) mds: require CEPH_FEATURE_OSD_TMAP2OMAP
-1d8429d osd/OSDMap: get_up_osd_features()
-b8dfcc1 mds: use OMAP to store dirfrags
-0f0dd74 osd: introduce TMAP->OMAP conversion operation
-90d6cec (origin/wip-7135) src/test/ObjectMap: test clear_keys_header() call
-617a50c src/test/librados/misc.cc: verify that omap_clear doesn't blast xattr
-0c81849 os/DBObjectMap, FileStore: omap_clear should not remove xattrs
-6225f2c mailmap: fix typo in Alexandre Maragone
-d429ab5 (origin/wip-tier-snap) osd/OSDMonitor: fix 'osd tier add ...' pool mangling
-f49d9cd osd: fix propagation of removed snaps to other tiers
-3b3511c mon: debug propagate_snaps_to_tiers
-631d0c7 erasure-code: erasure code decode interface helper
-d2b2f5d erasure-code: jerasure implementation of chunk size helpers
-eb2374e erasure-code: refactor the example to use chunk size helpers
-1f3c1bd erasure-code: add chunk size calculation helpers
-fa43d9c organizationmap: joe.buck at inktank.com is Inktank
-8604e76 organizationmap: match authors with organizations
-ce95cef mongoose: fix warning
-af0269d mailmap: make roald at roaldvanloon.nl primary
-f18b310 mailmap: remove company name from Pascal de Bruijn name
-39db90f mailmap: add Andrew Leung, Carlos Maltzahn and Esteban Molina-Estolano
-176cec8 mailmap: add David Moreau Simard alias
-29da2ec FileStore: detect XFS properly
-8c5c55c mon: set next commit in mon command replies
-9395e0d rgw: fix temp url restful apis and support multiple keys
-7ccb513 rgw: support multiple temp url keys
-56e4015 rgw: handle temp url key authorization
-0e43ac9 rgw: add optional tenant name for swift urls
-2626101 rgw: can set temp url key on user
-efb4cf6 doc: Removed extraneous comment from snapshot text.
-5070597 (origin/install-erasure-headers) osd: add missing header to install list
-a5f8cc7 (origin/wip-7110) rgw: convert bucket info if needed
-029b9ef remove spurious executable permissions on files
-995a3cc (origin/wip-max-file-size) mds/MDSMap: include max_file_size in plaintext print output
-2de2148 mailmap: add Yan Zheng fixes for Reviewed-by:
-62fbcac mailmap: add Loic Dachary fixes for Reviewed-by:
-3fe5f11 mailmap: add Gary Lowell fixes for Reviewed-by:
-17e0a5e mailmap: add Noah Watkins fixes for Reviewed-by:
-43fa055 mailmap: add João Eduardo Luís fixes for Reviewed-by:
-96d9b99 mailmap: add Dan Mick fixes for Reviewed-by:
-7aac350 mailmap: add Samuel Just fixes for Reviewed-by:
-6d0ba4d mailmap: add Greg Farnum fixes for Reviewed-by:
-a3eb935 mailmap: add Yehuda Sadeh fixes for Reviewed-by:
-f6b52fd mailmap: add Sage Weil fixes for Reviewed-by:
-ca9acb9 mon: implement 'mds set max_mds|max_file_size'
-0940d8f osd: Change waiting_on_backfill to a set<int>
-695255e osd: Interim working version with backfill reserve state changes
-a07d682 osd: Recovery reservations need to include backfill peers
-25a798e messages, os, osd: Clean-up g/hobject_t MAX handling
-f89d410 osd: Return false for func that returns bool
-7837490 osd: Fix problems in ReplicatedPG::do_op() logic
-f9a11ef osd: Determine if compatibility is required due to back level OSDs
-ba19006 osd: Config OSD when CEPH_FEATURE_OSD_ERASURE_CODES feature first seen
-09d021b doc: Updated for hostname -s and resolving to non-loopback IP address.
-ed605f0 doc: Fixed hyperlink.
-b780f4b osd: Remove redundant incompat feature
-294cdfb erasure-code: relax zero copy requirements in tests
-656de1b erasure-code: ensure that coding chunks are page aligned
-9ba6599 EC-JERASURE: rewrite region-xor function using vector operations to get ~ x1.5 speedups for erasure code and guarantee proper 64-bit/128-bit buffer alignment
-31f3745 mailmap: Adds Christophe Courtaut
-7d5674c doc: Added librados introduction doc. Still wip.
-33e78a4 doc: Updated terminology. Added librados intro to index.
-7acb0a1 (origin/port/onexit) on_exit: remove side effects from asserts
-e3d0b0a common: fix large output in unittest_daemon_config
-822ad58 configure: support Automake 1.12
-b1976dd (origin/wip-7083) radosgw-admin: fix object policy read op
-3f34dc7 common: unit tests for config::expand_meta
-9485409 common: recursive implementation of config::expand_meta
-87db534 common: cosmetic inversion of tests arguments
-5bb1545 common: multiple variable occurence expansion test
-98ed9ac (origin/wip-7093) mon: only send messages to current OSDs
-f68de9f osd: ignore OSDMap messages while we are initializing
-35da8f9 osd: do not send peering messages during init
-7aa9805 log: use on exit manager to flush logs on exit
-2181d25 onexit: add an on exit callback utility
-3d19f7c (origin/port/misc) test: disable cross process sem tests on non-Linux
-6342d05 pipe: handle missing MSG_MORE and MSG_NOSIGNAL
-26c07d9 ipaddr: use IN6_ARE_ADDR_EQUAL for comparison
-ef6a56a keyutils: handle non-linux platform
-ab2b2bb doc: Fixed typo.
-bb8b750 add autotools-generated files to .gitignore
-f2e33e8 mon: get rid of --keyring /dev/null hack
-d110c91 doc: Removed dash from --dmcrypt option.
-c772b6d ceph-disk: fix false positive for gitbuilder
-e2ee528 (origin/wip-objectcacher-backoff) osdc/ObjectCacher: back off less during flush
-daefe81 Be more explicit how to discover available API calls
-de8522f ceph-disk: tests for the --data-dir code path
-a71025d ceph-disk: implement --sysconfdir as /etc/ceph
-ca713f4 ceph-disk: implement --statedir as /var/lib/ceph
-51ee3c0 ceph-disk: add copyright notice
-306b099 ceph-disk: create the data directory if it does not exist
-0fcc081 ceph-disk: run ceph-osd when --mark-init=none
-e773b68 ceph-disk: implement --mark-init=none
-b65eb37 ceph-disk: fsid is a known configuration option
-97f516a ceph-disk: use CalledProcessError.returncode
-d09af0f ceph-disk: display the command output on OSD creation failure
-2b935bb ceph-disk: which() uses PATH first
-ad6b4b4 ceph-disk: add --prepend-to-path to control execution
-908348b ceph-disk: make exception handling terse in main_activate_journal
-55ca7bb ceph-disk: do not hide main_activate() exceptions
-324804a ceph-disk: fix activate() indent
-de00505 ceph-disk: remove noop try:
-b82ccfb ceph-disk: fix Error() messages formatting
-830583f osd: Correction to #6690 change
-6b8d418 init-ceph: pass config file path when adjust crush position
-2ba6930 ceph-disk: cannot run unit tests
-24417f9 test/cli-integration/rbd: silence stderr
-8220549 (origin/port/bitsandints) inttypes: detect and define missing integer types
-8f91cac endian: check byte order on OSX
-46a5674 doc/release-notes: fix bobtail version
-f6bbcf4 mon: tests for ceph-mon --mkfs
-41987db doc/release-notes: v0.74
-229740f ceph-conf: display arguments when an option cannot be parsed
-07f5399 common: CEPH_ARGS should trim whitespaces
-2b848a9 osdc: = is not a delimiter in --crush-location
-7dfe550 ceph-disk: prepare --data-dir must not override files
-4c8a313 mon: implement --key for --mkfs
-ab6203f mon: fix indentation
-e946df1 mon: do not use the keyring if auth = none
-f12abbf (origin/wip-6914) mds: don't allow changing layout for non-regular file
-f292992 mds: always store backtrace xattr in the default pool
-cae663a osd/ReplicatedPG: improve debug output from check_local
-ac547a5 (origin/wip-empty-rbd-ls) rbd: return 0 and an empty list when pool is entirely empty
-e91fb91 librbd: better error when unprotect fails on unprotected snap
-42e98ac Be more explicit how to discover available API calls
-eeba294 mon: remove fixture directory between runs
-1eafe8d mon: make ceph-mon --mkfs idempotent
-f0ae4ab mon: create mon-data directory on --mkfs
-d443841 mon: add flags argument to common_init_finish
-403f777 mon: fix indentation
-a194513 mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS
-10aa220 mon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate
-e0bae95 Fix typos in erasure code documents
-2b0a435 osd_types: add missing osd op flags
-f8e413f msgr: fix rebind() race stop the accepter and mark all pipes down before rebind to avoid race
-8fcfc91 (origin/wip-listomapvals) qa: test rados listomapvals with >512 keys
-be5afa2 rados: allow listomapvals to list all k/v pairs
-c165483 (tag: v0.74) v0.74
-b4fc16c make: conditionally build filestore backends
-9d41fd2 test_cls_rbd: avoid warning -Wno-unnamed-template-args
-fdd8562 test_cls_rbd: avoid shift overflow
-ce8b26e erasure: add dummy symbol to avoid warnings
-5b77533 make: avoid symbol exporting for C++ libs on non-Linux
-8c8be16 json_spirit: don't build json_spirit_value.cpp
-da5a082 make: add top-level libcommon dependency
-f7a66d6 make: restrict use of --as-needed to Linux
-87db89e librados: read into user's bufferlist for aio_read
-0b40bbd common: evaluate --show-config* after CEPH_ARGS
-b5c17f6 vstart: set fsid in [global]
-d7d7ca8 Fix qa/workunits/rados/test_cache_pool.sh typos
-cc67b7b Fix test/filestore/store_test.cc error
-e8e174e (origin/port/public-hdrs) rados: include struct timeval definition
-356d71a inttypes: use portable types in public headers
-76ad85d test: include headers for struct statfs
-93c125c test: remove platform specific header
-a625b28 test: print warning about missing fs features
-9a7a33e test: only build some tests on linux
-a48d038 test: fix VLA of non-POD type
-424d7c7 gtest: disable tr1/tuple
-0c09abd make: use c++ flags for building librados
-891801e warning: fix typo and -Wmismatched-tags
-c7e1c4b c++11: fix std::lock naming conflicts
-bbcb022 kvstore: only build on linux
-1fec818 (origin/port/spinlock) spinlock: add generic spinlock implementation
-12f4631 qa/workunits/rest/test.py: rbd pool ruleset is now 0
-b286e4f ceph_test_rados_api_tier: retry EBUSY race checks
-b88af07 libcephfs: get osd location on -1 should return EINVAL
-250ecf6 qa/workunits/mon/crush_ops.sh: fix in-use rule rm test
-d4f07cd crush: fix get_full_location_ordered
-fd57d99 Fix rbd bench-write improper behavior
-30078e6 autoconf: trim duplicated headers
-f9f5c37 (origin/wip-rgw-leak) rgw: fix leak of RGWProcess
-96fe80d (origin/wip-snaps) osd: preserve user_version in snaps/clones
-80b5487 ceph_test_rados: test read from snapshots
-2f8b602 osd/OSDMap: observe 'osd crush chooseleaf type' option for initial rules
-9b7364d rbd: expose options available to rbd map
-b3bda08 Lack of "start" member function declare in WBThrottle.h
-4a9c770 messages: add tid to string form of MForward
-67f99f3 packaging: make check needs argparse and uuidgen
-4cea789 (origin/wip-rbd-tinc-5426) librbd: call user completion after incrementing perfcounters
-f8a4001 osd: create default ruleset for erasure pools
-8b2b5a3 mon: implement --osd-pool-default-crush-erasure-ruleset
-dd81858 mon: implement --osd-pool-default-crush-replicated-ruleset
-2a7fcc3 osd: use CrushWrapper::add_simple_ruleset
-a10fc02 osd: build_simple creates a single rule
-15b6959 crush: set min_rep and max_rep depending on mode
-da67f7c crush: add rule_type argument to  add_simple_ruleset
-2ae9c1c partially rename rule to ruleset
-8b0b32b doc: Add OpenStack Havana documentation
-6e92ed1 osd: factorize build_simple and build_simple_from_conf
-5cf2cdc qa: remove osd pool create erasure tests
-c6d876a mon: osd-pool-create must not loop forever on kill
-272eed3 client: SyntheticClient uses the first available pool
-20b3da0 mon: MDS data and metadata pool numbers are hardcoded
-bf24317 Fix WBThrottle thread disappear problem
-87b8e54 (origin/wip-argparse-fix) ceph_argparse: kill _daemon versions of argparse calls
-ea4724d rados: deprecated attribute has no argument
-e7bf5b2 (origin/wip-librados-lock) librados: lockless get_instance_id()
-771da13 objecter, librados: create Objecter::Op in two phases
-5ff30d6 crush/CrushWrapper: note about get_immediate_parent()
-0cdbc97 librados: mark old get_version() as deprecated
-006449d librados: deprecate aio_operate() read variant that takes snapid
-909f8a4 librbd: localize or distribute parent (snap) reads
-22df773 osdc/Objecter: use crush location and distance for LOCALIZE_READS
-ac14d4f osdc/Objecter: maintain crush_location multimap
-746069e crush/CrushWrapper: simplify get_full_location_ordered()
-dcc5e35 crush/CrushWrapper: add get_common_ancestor_distance()
-0903f3f mon/OSDMonitor: use generic CrushWrapper::parse_loc_map helper
-8f48906 crush/CrushWrapper: add parse_loc_[multi]map helpers
-8fc66a4 (origin/wip-7056) osd/ReplicatedPG: fix copy-get iteration of omap keys
-0c9acf1 ceph_test_rados: s/tmap/omap/
-3b0d9b2 vstart/stop: do not loop forever on kill
-4ce6400 config: add 'crush location' option
-19213e6 doc: Fix caps documentation for Admin API
-ac10aa5 (origin/wip-fix-mon-fwd) mon: fix forwarded request features when requests are resent
-2e4c61b osd/ReplicatedPG: include omap header in copy-get
-537a7c3 (origin/wip-crush-shrink-diff) crush: misc formatting and whitespace fixes
-fa6a99a crush: use kernel-doc consistently
-6e36794 crush/mapper: unsigned -> unsigned int
-d8512f1 mon: use kill instead of pkill in osd-pool-create
-c030569 (origin/wip-7051) osd: OSDMap: dump osd_xinfo_t::features as an int
-b4fbe4f mon: Monitor: Forward connection features
-93c44cb mon: unit test for osd pool create
-59941b1 mon: erasure code pool properties defaults
-29d1fcd mon: add error message argument to prepare_new_pool
-2d01da6 mon: do not include = in pool properties values
-a44a57a common: implement get_str_map to parse key/values
-df1704e osd: pool properties are not an array
-df0d038 mon: osd create pool must fail on incompatible type
-af22b0a packaging: erasure-code plugins go in /usr/lib/ceph
-203c5d6 mon: s/rep/replicated/ in pool create prototype
-d192062 ceph_test_rados: update in-memory user_version on RemoveAttrsOp
-750da11 osd/ReplicatedPG: clear whiteout on successful copy-from
-37eac2b ceph_test_rados: check existence on is_dirty completion
-173b060 mon/OSDMonitor: propagate snap updates to tier pools on update
-baa74d5 osd/OSDMap: implement propapage_snaps_to_tiers()
-cf34af8 rgw: add -ldl for mongoose
-9b182c7 ceph_test_rados_api_tier: more grace for HitSetTrim
-2bb90b3 ceph_test_rados: update in-memory user_version on RemoveAttrsOp
-a0d1521 replace pool type REP with REPLICATED
-45449b8 doc/release-notes: missed a name
-b0e42d8 doc/release-notes: v0.72.2
-c10ba91 pipe: add compat for TEMP_FAILURE_RETRY symbol
-f13709d linux_version: build on all platforms
-79c5a2e make: add libcommon for missing symbols
-ab19c5f buffer: remove darwin portability cruft
-cf9569f statfs: include headers for statfs structs
-3510400 compat: enable lseek64 alias
-9d72c4f libcephfs: ignore missing offset64 definition
-d9a1ff3 rgw: add some debug output
-cf53d8a rgw: abstract RGWProcess
-cdc178f Revert "Enable libs3 support for debian packages"
-1e238e6 mon: pool create will not fail if the type differs
-5f1957d doc/release-notes: v0.67.5
-98a1525 unittests: fail if one test fail
-9ab947c (origin/port/buffer) buffer: use int64_t instead of loff_t
-03693ac osd: git ignore erasure code benchmark binary
-42b4fe1 osd: erasure code benchmark is installed is part of ceph-test
-81dee1b osd: erasure code benchmark workunit
-a619fe9 osd: erasure code benchmark tool
-a36bc5f osd: set erasure code packet size default to 2048
-c7d8ba7 osd: better performances for the erasure code example
-ff9455b osd: conditionally disable dlclose of erasure code plugins
-8879e43 osd: Fix assert which doesn't apply when compat_mode on
-0bd5cb6 Add backward comptible acting set until all OSDs updated
-8d31f71b osd/ReplicatedPG: fix promote cancellation
-923bff1 osd/ReplicatedPG: drop RepGather::ondone callback
-2a9c6fc vstart.sh: go faster
-bc893f5 osd/ReplicatedPG: fix undirty on clean object
-c561d5e osd/ReplicatedPG: track dirty, whiteout stat counts
-028bb0d osd/osd_types: include num_objects_dirty, num_whiteouts in object_stat_sum_t
-1403798 osd/ReplicatedPG: EBUSY on cache-evict when watchers are present
-9ed6679 ceph_test_rados: test cache_flush, cache_try_flush, cache_evict
-1dcbb66 ceph_test_rados_api_tier: fix HitSet* test names
-99cee55 osd/osd_types: debug: include size in object_info_t operator<<
-1af6723 osd/ReplicatedPG: debug: clean up oi printout
-0d2d6a5 osd/ReplicatedPG: debug: add an assert for copy-get
-2fda4c0 osd/ReplicatedPG: fix locking for promote
-927b0e6 osd/ReplicatedPG: fix user_version preservation for copy_from
-bc05104 osd/ReplicatedPG: handle ECANCELED in C_CopyFrom, C_Flush
-2d5a7e2 osd/ReplicatedPG: uninline CopyFromCallback, PromoteCallback
-54f0c60 osd/osd_types: make object_info_t::dump() dump user_version
-ba2f9e2 osd/osd_types: include user_version in operator<< object_info_t
-ffdaa5f vstart.sh: --cache <pool> to set up pool cache(s) on startup
-57e9145 qa/workunits/rados/test_cache_pool.sh: fixes
-1bde88f qa/workunits/rados: rename cache pool tests
-ea519b4 qa/workunits/rados: test cache-{flush,evict,flush-evict-all}
-71cd4a2 rados: add cache-flush, cache-evict, cache-flush-evict-all commands
-ad3b466 osd/ReplicatedPG: implement cache-flush, cache-try-flush
-edaec9a osd: Fix assert which doesn't apply when compat_mode on
-ac16a9d (origin/wip-kill-raid4) osd: remove remaining instances of raid4 pool types (never implemented)
-40a48de mds: fix Resetter locking
-087fe57 packaging: revert adding argparse and uuidgen
-8272538 packaging: make check needs argparse and uuidgen
-f193925 autogen: test compare strings with != not -ne
-98af37d Fix segmentation fault when handler is NULL pointer
-44aacae (origin/wip-mds-coverity2) mds: fixes for coverity scan
-8b38f10 crush/mapper: fix crush_choose_firstn comment
-ea3a0bb crush/mapper: attempts -> tries
-0497db4 crush/mapper: finish adding choose_local_[fallback_]tries
-99f41de (origin/sage-valgrind) vstart.sh: NOTE, not WARNING, to make gitbuilder happy
-b3ee598 (origin/wip-6028) qa: workunit: cephtool: test osd pool create with erasure type
-250b446 pybind: test_ceph_argparse: test 'ceph osd pool create' with pool type
-c996f66 mon: OSDMonitor: add optional 'pool type' arg to 'osd pool create'
-bdeaa84 osd: OSDMap: add 'get_up_osds()' function
-5756c05 ceph_osd: add EC to OSD's supported features used by the messenger
-59ad6da osd: OSD: reflect OSDMap EC flag being set by setting on-disk feature
-8ac84db mon: OSDMonitor: handle osd features on boot
-31743d5 osd: OSDMap: add 'features' bit mask field to osd_xinfo_t
-73992d2 osd: OSDMap: check for erasure pools when getting features
-178f684 osd: OSD: add binary compat feature for Erasure Codes
-bfc86a8 include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES
-fe13684 added execute permission to the script
-d9e33ea rgw workunit to test bucket quota
-c8890ab rgw: fix use-after-free when releasing completion handle
-d6a4f6a rgw: don't return data within the librados cb
-e6ad4d4 osd: make obc copyfrom blocking generic
-8dec2b2 librados, osd: add flags to COPY_FROM
-e624e16 crush: silence error messages in unit tests
-9414970 ARCH: adding SSE2 flag to arch-test
-7e0c84b (origin/wip-crush-2) mon/OSDMonitor: 'osd crush show-tunables'
-88365c2 crush: expand info about tunables that we dump
-d0f14df mon: warn if crush has non-optimal tunables
-d129e09 crush: add set_choose_local_[fallback_]tries steps
-30f8aa1 vstart: Update apache conf to run against apache 2.4
-b86d450 upstart: add rbdmap script
-e4537d3 ARCH: add variable for sse2 register
-0d217cf qa/workunits/cephtool/test.sh: clean up our client.xx.keyring
-7e4a800 (origin/wip-7026) osd/ReplicatedPG: fix hit_set_setup() on_activate()
-19cff89 (origin/wip-6990) Add backward comptible acting set until all OSDs updated
-b153067 erasure-code: tests must use aligned buffers
-f5d32a3 mds: drop unused find_ino_dir
-c60a364 Fix typo in #undef in ceph-dencoder
-9e45655 qa: add ../qa/workunits/cephtool/test.sh to unittests
-c1eb55c qa: vstart wrapper helper for unittests
-0edbda2 (origin/wip-rbd-coverity) rbd: make coverity happy
-d93881f vstart/stop: use pkill instead of killall
-ae56cef qa: recursively remove .gcno and .gcda
-b082c09 crushtool: reorg test-map-* cli tests
-41d5186 crush/CrushWrapper: minor cleanup on tunables helpers
-685c695 crush/mapper: generalize descend_once
-6f43120 ceph_test_rados_api_tier: fix HitSetTrim vs split, too
-c5bccfe ceph_test_rados_api_tier: fix HitSetRead test race with split
-7e618c9 (origin/wip-7009) mon: move supported_commands fields, methods into Monitor, and fix leak
-deded44 (origin/wip-rgw-standalone-2) mongoose: update submodule
-ef10a5c rgw: fix memory leak
-824b3d8 (origin/wip-linux-version) FileJournal: use pclose() to close a popen() stream
-6696ab6 FileJournal: switch to get_linux_version()
-fcf6e98 common: introduce get_linux_version()
-a2babe2 configure: break up AC_CHECK_HEADERS into one header-file per line
-fae569d Rename filestore_perf_t to objectstore_perf_t
-015e981 Move PerfCounter from ObjectStore.h to FileStore.h
-4526d13 (origin/wip-mds-cluster2) mds: fix stale session handling for multiple mds
-43f7268 mds: properly set dirty flag when journalling import
-802df76 mds: properly update mdsdir's authority during recovery
-b6d1d8f mds: finish opening sessions even if import aborted
-80005f1 mds: fix discover path race
-a680ea7 osd/ReplicatedPG: update pg stat fields when they are queried
-ebb3ad9 osd/PG: move some pg stat update into a helper
-05274f3 osd: include peer_info in pg query
-5fdcc56 mds: fix bug in MDCache::open_ino_finish
-71d1eb3 mds: add CEPH_FEATURE_EXPORT_PEER and bump the protocal version
-d0b744a client: handle session flush message
-05b192f mds: simplify how to export non-auth caps
-9dc52ff mds: send cap import messages to clients after importing subtree succeeds
-6a56588 mds: re-send cap exports in resolve message.
-4fdeb00 mds: include counterpart's information in cap import/export messages
-ef902ee mds: send info of imported caps back to the exporter (rename)
-85171fd mds: send info of imported caps back to the exporter (cache rejoin)
-ff8b9ac mds: send info of imported caps back to the exporter (export dir)
-d00ec79 mds: flush session messages before exporting caps
-77515b7 mds: increase cap sequence when sharing max size
-6525979 mds: include inode version in auth mds' lock messages
-f134c77 mds: avoid allocating MDRequest::More when cleanup request
-e6c4d32 mds: waiting for slave reuqest to finish
-1536e81 mds: check lock state before eval_gather
-e181869 mds: don't request CEPH_CAP_PIN from auth mds
-87ca260 mds: fix sending resolve message
-b7d7891 mds: keep dentry lock in sync state
-d8440c4 mds: avoid leaving bare-bone dirfrags in the cache
-b2a1370 mds: re-issue caps after importing inode
-3ac0886 mds: avoid issuing caps when inode is frozen
-31f5b02 mds: fix rename notify
-bd56177 mds: re-send discover if want_xlocked becomes true
-913f7fd mds: fix empty directory check
-2fea08b mds: merge delayed cache expire
-498d5c4 mds: process delayed expire if exporting dir cancelled in warnning state
-0aed0d4 mds: handle cache rejoin corner case
-5a902a0 mds: unify nonce type
-0344d9a mds: rework stale import/export message detection
-9471fdc mds: put import/export related states together
-ab93aa5 mds: freeze tree deadlock detection.
-f192a60 Revert "common/Formatter: add newline to flushed output if m_pretty"
-c7b44d6 Revert "common: fix perf_counters unittests for trailing newline in m_pretty"
-31507c9 qa: test for error when ceph osd rm is EBUSY
-31b60bf rgw: Fix CORS allow-headers validation
-4b9a41a qa: make cephtool test imune to pool size
-f9cfa24 qa: add function name and line number to cephtool output
-cb35248 qa: silence cephtool tests cleanup
-15b8616 mon: set ceph osd (down|out|in|rm) error code on failure
-6a7edab rgw: Clarify naming of case-change functions
-2abacd9 rgw: Look at correct header about headers for CORS
-e37467b Add -n option to mount.ceph.  Required by autofs when /etc/mtab is a link to /proc/mounts (e.g. Debian Wheezy), otherwise automounting a ceph file system fails.  Also useful when /etc is read-only.  feature 7006
-aa365e4 mon: typo s/degrated/degraded/
-5741bfe osd: format test_osd_types.cc to 80 columns
-07888ef ceph-disk: zap needs at least one device
-e57239e common: fix rare race condition in Throttle unit tests
-938f22c common: format Throttle test to 80 columns
-ba55723 common: fix perf_counters unittests for trailing newline in m_pretty
-0dc59af osd/ReplicatedPG: fix promote: set oi.size
-697151e osd/osd_types: fix operator<< on copy-get operation
-f50389d ceph_test_rados_api_tier: test undirty on non-existent object
-f86d6e7 osd/ReplicatedPG: debug: improve maybe_handle_cache() handling
-81279e3 osd/ReplicatedPG: rename invalidate_forward
-87547bd ceph_test_rados: debug: include exists|dne in update_object_version
-d1e63b3 ceph_test_rados: test is_dirty, undirty
-14f76cc ceph_test_rados: fix CopyFromOp locking
-41be4fe librados: seek during object iteration
-330a130 osdc/Objecter: remove honor_cache_redirects global flag
-42d6af1 osd/ReplicatedPG: use IGNORE_OVERLAY flag for copy-from
-067536c osdc/Objecter: add CEPH_OSD_FLAG_IGNORE_OVERLAY flag
-3d9c499 osd: rename IGNORE_OVERLAY -> IGNORE_CACHE
-ea088fa osd/osd_types: operator<< for ObjectContext::RWState
-c0e4ed3 osd/ReplicatedPG: more verbose heading for process_copy_chunk
-90eb1ec osd/ReplicatedPG: set ctx->obc in simple_repop_create
-ca86656 osd/ReplicatedPG: use finish_ctx for finish_promote
-66263bb osd/ReplicatedPG: use get_next_version() in finish_promote
-56ad14e osd/ReplicatedPG: split off finish_ctx from execute_ctx
-3ef7310 osd/ReplicatedPG: add SKIPRWLOCKS flag
-5e547f8 osd/ReplicatedPG: be consistent about ctx->obs vs ctx->obc->obs
-36bbcf8 osd/ReplicatedPG: drop unnecessary temp vars in execute_ctx()
-10c9be3 osd/ReplicatedPG: allow osds to issue writes to osds
-20d149e osd/ReplcatedPG: maybe_handle_cache style
-0b81ff6 osd/ReplicatedPG: skip promote for DELETE
-4c014ed osd/ReplicatedPG: implement cache_evict
-8b9b713 librados: add an aio_operate that takes a write and flags
-8528231 osd/osd_types: introduce helper for osd op flags -> string conversion
-181cb8e librados, osd: add IGNORE_OVERLAY flag
-387e224 librados: add cache_flush(), cache_try_flus(), cache_evict() methods
-78df1c3 osd/ReplicatedPG: set object_info and snapset xattrs on promote
-dd079e2 osd/ReplicatedPG: handle is_whiteout in do_osd_ops()
-fd8f7d2 osd/ReplicatedPG: clear whiteout when writing into cache tier
-fabc6ba osd/ReplicatedPG: set whiteout in cache pool on delete
-2aea631 ceph_test_rados_api_tier: verify delete creates whiteouts
-e0a4969 osd/ReplicatedPG: ENOENT when deleting a whiteout
-0b085b1 osd/ReplicatedPG: create whiteout on promote ENOENT
-0b7b16d ceph_test_rados_api_tier: add simple promote-on-read test
-be29f47 ceph_test_rados_api_tier: rename tests
-66f2e74 osd/ReplicatedPG: use simple_repop_{create,submit} for finish_promote
-654d8c3 osd/ReplicatedPG: UNDIRTY is not a user_modify
-4a29b22 osd/ReplicatedPG: move r<0 handling into finish_promote()
-920c0bf workunits: break down cache pool tests to be more precise; expand some
-0caa02c5 workunits: check errors propagate on cache pools in caching_redirects.sh
-5fa08fb ReplicatedPG: promote: handle failed promotes
-d15aedb ReplicatedPG: promote: add the OpRequest to the Callback
-b371dd8 ReplicatedPG: promote: first draft pass at doing object promotion
-0699fc5 ReplicatedPG: copy: don't return from finish_copyfrom
-325aae3 ReplicatedPG: copy: switch out the CopyCallback interface
-a3e50b0 rgw: rework framework configuration
-b7946ff doc: Added additional comments on placement targets and default placement.
-902f19c doc: Updates to federated config.
-29cc722 (origin/wip-hitset) test_ipaddr: add another unit test
-026b724 osd/ReplicatedPG: drop unused hit_set_start_stats
-3d768d2 osd/ReplicatedPG: maintain stats for the hit_set_* objects
-9814b93 osd/ReplicatedPG: set object_info_t, SnapSet on hit_set objects
-dabd5d6 vstart.sh: --hitset <pool> <type>
-5bb0476 test/libcephfs: release resources before umount
-897dfc1 (origin/wip-6979) use the new get_command helper in check_call
-eae8531 (origin/wip-rbd-single-major) rbd: modprobe with single_major=Y on newer kernels
-8a473bc rbd: add support for single-major device number allocation scheme
-784cc89 rbd: match against both major and minor on unmap on newer kernels
-462b389 rbd: match against whole disks on unmap
-a421305 rbd: switch to strict_strtol for major parsing
-24a048b Document librados's rados_write's behaviour in reguards to return value.
-a865fec osd/ReplicatedPG: debug: improve hit_set func banners
-b6871cf osd/ReplicatedPG: do not update current_last_update on activate
-bcde200 (origin/wip-vstart-memstore) vstart.sh: add --memstore option
-a9334a1 use the absolute path for executables if found
-43561f7 remove trailing semicolon
-a33c95f radosgw: increase nofiles ulimit on sysvinit machines
-71cefc2 doc/release-notes: sort
-ee3173d doc/release-notes: fix indentation; sigh
-3abc189 doc/release-notes: v0.73
-03429d1 PendingReleaseNotes: note CRUSH and hashpspool default changes
-bb50276 Revert "Partial revert "mon: osd pool set syntax relaxed, modify unit tests""
-0cd36e0 mon/OSDMonitor: take 'osd pool set ...' value as a string again
-e19e380 replace sgdisk subprocess calls with a helper
-4b6d721 (origin/wip-hashpspool) osd: enable HASHPSPOOL by default
-fb47d54 (origin/wip-mon-api) mon: if we're the leader, don't validate command matching
-2bfd34a mon: by default, warn if some members of the quorum are "classic"
-e620057 add apt-get install pkg-config for ubuntu server
-b8884e0 MemStore: update for the new ObjectStore interface
-8ac1da8 crush: remove crushtool test leftover
-ec609ca Elector: use monitor's encoded command sets instead of our own
-e223e53 Monitor: encode and expose mon command sets
-420a2f1 man: update man/ from doc/man/8
-8d60cd1 man: Ceph is also an object store
-faaf546 os/MemStore: do on_apply_sync callback synchronously
-d8ad51e (tag: v0.73) v0.73
-990b2b5 ceph_test_rados_api_tier: make HitSetWrite handle pg splits
-a6f4d71 Elector: keep a list of classic mons instead of each mon's commands
-a888a57 crush: implement --show-bad-mappings for indep
-20263dd crush: add unitest for crushtool --show-bad-mappings
-fbc4f99 crush: remove scary message string
-472f495 crush: document the --test mode of operations
-ea86444 Monitor: Elector: share the classic command set if we have a classic mon
-f1ccdb41 Elector: share local command set when deferring
-ba673be Monitor: import MonCommands.h from original Dumpling and expose it
-3cb58f7 Monitor: validate incoming commands against the leader's set too
-cb51b1e Monitor: disseminate leader's command set instead of our own
-d33df28 Elector: transmit local api on election win, accept leader's on loss
-8025fb3 messages: make room for passing supported monitor commands in MMonElection
-f932903 Monitor: pull command mapping out of _allowed_command()
-b8bdbd9 doc: update erasure code development doc
-41152a6 crush: --show-utilization* implies --show-statistics
-dcb0a4f Monitor: add a separate leader_supported_commands
-4cd5c3b Monitor: expose local monitor commands to other compilation units
-dca5383 MonCommand: add operator== and operator!=
-ac69a01 MonCommand: support encode/decode
-3dcbf46 encoding: fix [encode|decode]_array_nohead
-7482d62 crush: add CrushTester accessors
-c928f07 crush: output --show-bad-mappings on err
-5e0722f crush: fix map->choose_tries boundary test
-ef4061f librbd: remove unused private variable
-ad3825c TrackedOp: remove unused private variable
-3b39a8a librbd: rename howmany to avoid conflict
-539fe26 (origin/port/fdatasync) wbthrottle: use feature check for fdatasync
-663da61 rados_sync: fix mismatched tag warning
-60a2509 rados_sync: remove unused private variable
-43c1676 mon: check for sys/vfs.h existence
-c99cf26 make: increase maximum template recursion depth
-e2be099 (origin/port/compat) compat: define replacement TEMP_FAILURE_RETRY
-3b3cbf5 (origin/wip-fix-tunables) crush/CrushCompiler: make current set of tunables 'safe'
-8535ced crushtool: remove scary tunables messages
-4eb8891 crush/CrushCompiler: start with legacy tunables when compiling
-e8fdef2 crush: add indep data set to cli tests
-564de6e (origin/wip-fix-3x) osdmaptool: fix cli tests for 3x
-6704be6 osd: default to 3x replication
-8d0180b (origin/wip-objecter-full-2) objecter: don't take extra throttle budget for resent ops
-38647f7 Revert "osd: default to 3x replication"
-cbeb1f4 crush: detach_bucket must test item >= 0 not > 0
-2cd73f9 crush: remove obsolete comments from link_bucket
-e00324b crush: remove redundant code from move_bucket
-8ef80a4 crush: unittest CrushWrapper::move_bucket
-a6d66f9 common/bloom_filter: fix copy ctor
-638b274 ceph_test_rados_api_tier: add HitSetRead
-01cbbfa ceph_test_rados_api_tier: HitSetRead -> HitSetWrite
-456daf2 ceph_test_rados_api_tier: add HitSet trim test
-3ea9230 osd/HitSet: fix sealed initialization in Params ctor
-f0cfd22 ceph_test_rados_api_tier: make HitSetRead test less noisy
-bf96a7e osd/HitSet: fix copy ctor
-01f3ff7 osd/HitSet: fix dump() of fpp
-c941e82 test/encoding/check-generated: test copy ctor, operator=
-1c107d3 ceph-dencoder: add 'copy' command to test operator=
-c0eb95b mds/Capability: no copying
-1d0af14 test: add a HitSet unit test
-c365cca osd/HitSet: track BloomHitSet::Params fpp in micros, not as a double
-146e6aa osd/ReplicatedPG: archive hit_set if it is old and not full
-737533f osd: prevent zero BloomHitSet fpp
-a72094d osd/HitSet: take Params as const ref to avoid confusion about ownership
-68c44cb mon/OSDMonitor: non-zero default bloom fpp
-41e0f97 osd/HitSet: make pg_pool_t and Params operator<< less parenthetical
-5da1285 osd/ReplicatedPG: apply log to new HitSet to capture writes after peering
-fa76d5e ReplicatedPG: do not seal() HitSets until we're done with them
-3c2d2d7 pg_hit_set_info_t: remove unused size, target_size members
-1e94e27 ceph_test_rados: hit hit_set_{list,get} rados operations
-4a743fb osd/ReplicatedPG: trim old hit_set objects on persist
-916313c osd/ReplicatedPG: put hit_set objects in a configurable namespace
-a0cfbfd librados: create new ceph_test_rados_api_tier target
-0c43b77 librados, osd: list and get HitSets via librados
-904859e osd/ReplicatedPG: use vectorized osd_op outdata for pg ops
-a97129f osd/ReplicatedPG: add basic HitSet tracking
-b92f431 mon/OSDMonitor: set hit_set fields
-db3fd11 osd: add hit_set_* parameters to pg_pool_t
-e8ef724 osd/osd_types: include pg_hit_set_history_t in pg_info_t
-a430525 osd/osd_types: add pg_hit_set_{info,history}_t
-b5ea470 common/bloom_filter: fix operator=
-c01b183 osd_types: add generic HitSet type with bloom and explicit implementations
-0b9874c osd/ReplicatedPG: factor out simple_repop_{create,submit} helpers
-9776e97 osd/PG: factor out get_next_version()
-0b0d1e8 librados: add wait_for_latest_osdmap()
-8285906 librados: expose methods for calculating object hash position
-4b5ab3f osdc/Objecter: expose methods for getting object hash position and pg
-92879f7 osd: capture hashing of objects to hash positions/pgs in pg_pool_t
-76e0b88 osd/OSDMap: use new object_locator_t::hash to place object in a pg
-d692da3 osd/osd_types: add explicit hash to object_locator_t
-0d4ea9f encoding: allow users to specify a different compatv after encoding
-d2963c0 librados: add mon_command to C++ API
-468fffa librados: document aio_flush()
-bc7ace2 librados: constify inbl command args
-a29d4fc osdc/Objecter: constify inbl command args
-fb49065 mon/MonClient: constify inbl command args
-ef0f255 osdc/Objecter: reimplement list_objects
-d2e6cc6 librados: add get_pg_hash_position to determine pg while listing objects
-eff932c osdc/Objecter: stick bl inside ListContext
-8e5803a osdc/Objecter: factor pg_read out of list_objects code
-dd8c939 osdc/Objecter: separate explicit pg target from current target
-9381b69 osdc/Objecter: drop redundant condition
-bffcca6 osd/osd_types: make pref optional in pg_t constructor
-3caf3ef rbd: check write return code during bench-write
-e32874f objecter: resend all writes after osdmap loses the full flag
-4111729 osd: drop writes when full instead of returning an error
-384f01d crush/mapper: dump indep partial progression for debugging
-e632a79 PendingReleaseNotes: note change of CRUSH indep mode in release notes
-c853019 crush: add feature CRUSH_V2 for new indep mode and SET_*_TRIES rule steps
-caa0e22 crush: CHOOSE_LEAF -> CHOOSELEAF throughout
-431a13e osd/OSDMap: fix feature calculation for CACHEPOOL
-03911b0 crush/CrushCompiler: [de]compile set_choose[leaf]_tries rule step
-09ce7a2 crush/CrushWrapper: set chooseleaf_tries to 5 for 'simple' indep rules
-d1b9746 crush/mapper: add SET_CHOOSE_TRIES rule step
-64aeded crush/mapper: apply chooseleaf_tries to firstn mode too
-cb88763 crush/mapper: fix up the indep tests
-4e26cc0 crush: unittest CrushWrapper::get_immediate_parent
-09938e6 crush: unittest CrushWrapper::update_item
-16ac590 crush: unittest s/std::string/string/
-b819018 crush: unittest use const instead of define
-dc09521 crush: unittest CrushWrapper::check_item_loc
-000c59a crush: unittest remove useless c->create()
-7a9a088 (origin/wip-6940) rgw: fix reading bucket policy in RGWBucket::get_policy()
-cb26fbd (origin/wip-3x) osd: default to 3x replication
-aedbc99 crush: check for invalid names in loc[]
-fe03ad2 osd: queue pg deletion after on_removal txn
-aa63d67 os/MemStore: implement reference 'memstore' backend
-47ee797 (origin/wip-mon-mds-trim) mon: ceph-kvstore-tool: get size of value for prefix/key
-c98c104 tools: ceph-kvstore-tool: output value contents to file on 'get'
-00048fe mon: Have 'ceph report' print last committed versions
-cc64382 mon: MDSMonitor: let PaxosService decide on whether to propose
-5823146 os/ObjectStore: make getattrs() pure virtual
-11e26ee s/true/1 and s/false/0
-cf09941 mon: MDSMonitor: implement 'get_trim_to()' to let the mon trim mdsmaps
-3e845b5 mon: MDSMonitor: print map on encode_pending() iff debug mon = 30+
-62fb475 mon: MDSMonitor: consider 'debug level' parameter on 'print_map()'
-032a00b mon: MDSMonitor: remove reference to no-longer-used encode_trim()
-ccc6014 crush: CrushWrapper unit tests
-b9bff8e crush: remove redundant test in insert_item
-8af7596 crush: insert_item returns on error if bucket name is invalid
-3b8371a os/ObjectStore: prevent copying
-a70200e os/ObjectStore: pass cct to ctor
-35011e0 Call --mbrtogpt on journal run of sgdisk should the drive require a GPT table.
-cae1083 ObjBencher: add rand_read_bench functions to support rand test in rados-bench
-e829859 doc/rados/operations/crush: fix more
-7709a10 doc/rados/operations/crush: fix rst
-68fdcfa (origin/wip-6922) FileSTore: do not time out threads while they're waiting for op throttle
-7ff7cf2 (origin/wip-doc-build-cluster) doc: Partially incorporated comments form Loic Dachary and Aaron Ten Clay.
-5e34beb init, upstart: prevent daemons being started by both
-c43c893 crush/mapper: new SET_CHOOSE_LEAF_TRIES command
-2731d30 crush/mapper: pass parent r value for indep call
-1b567ee crush/mapper: clarify numrep vs endpos
-d51a219 osd/osd_types: pg_pool_t: fix /// -> ///< comments
-1413837 mon, crush: add mode to "osd crush rule create-simple ..."
-6dc68f4 osd/OSDMap: do not shift result when removing nonexistent osds
-9085286 osd, crush: add 'erasure' pool/pg type
-9435099 crush/mapper: strip firstn conditionals out of crush_choose, rename
-0b9bb54 crush: add a few unit tests for INDEP mode
-4551fee crush/mapper: add note about r in recursive choose
-7967ae0 crush/CrushWrapper: add dump_tree()
-86e9780 crush: use breadth-first search for indep mode
-b1d4dd4 crush: return CRUSH_ITEM_UNDEF for failed placements with indep
-1cfe140 crush: eliminate CRUSH_MAX_SET result size limitation
-858a21b (origin/wip-filestore-remount) common/WorkQueue: allow start() after stop()
-36505e8 os/FileStore: allow mount after umount
-cd6be29 common/Finisher: allow finisher to be restarted
-941875d doc: Partially incorporated comments from Aaron Ten Clay.
-d8ccd73 OSDMonitor: use a different approach to prevent extreme multipliers on PG splits
-dc06e23 test/mon/workloadgen: added check of return value for statfs()
-0fd3cbf rgw/rgw_op: added check of return value for rgw_unlink_bucket()
-9c8df34 os/WBThrottle: added check of return value for posix_fadvise()
-de09778 test/filestore: add check of return values in StoreTest::SetUp
-2884c81 test/filestore/workloadgen: added check of return value for mkdir
-602d5d5 osd: include CPU info
-f502530 pybind: syntax check osd metadata
-6570197 ceph-disk: blacklist /dev/fd0
-bcb6bfd test/ceph_decoder: add return value check for read_file()
-20507b5 (origin/wip-crush-tunables) crush/CrushWrapper: default to the "new" bobtail-era tunables
-07978bb crush/CrushWrapper: explicitly set tunables on create, decode
-3f1352f doc/rados/operations/crush-map: describe crush locations, hook
-396ee0d add script/run-coverity
-01ab8e6 OSDMap: use unsigned instead of int for OSD counts
-a5eda4f doc: Updated scrub defaults and added note about deep scrubbing.
-f11b380 osd: read into correct variable for magic string
-f57dad6 OSDMonitor: prevent extreme multipliers on PG splits
-26c00c5 OSDMonitor: return EEXIST if users try to do a PG merge
-4fdc5d9 workunits: use integers instead of true/false for hashpspool command
-c77ce90 doc: Fixed hyperlink to the manual installation section.
-648f3bc doc: Added a link to get packages.
-16b7576 osd/OSDMap: fix typo and crush types helper
-6298a57 (origin/wip-crush-chassis) osd/OSDMap: add region, pdu, pod types while we are at it
-3a6707a osd/OSDMap: add 'chassis' to default type hierarchy
-5e1fc14 README: update a list of build deps for rpm-based systems
-e80ab94 Partial revert "mon: osd pool set syntax relaxed, modify unit tests"
-fd175ab (origin/wip-6699) sysvinit, upstart: use df -P when weighting new OSDs
-4d140a7 os/ObjectStore: add {read,write}_meta
-6bb42a0 osd: move peek_journal_fsid() into ObjectStore (from OSD)
-bf5a7b2 os/ObjectStore: generalize the FileStore's target_version
-e0f2089 osd: construct ObjectStore outside of OSD
-41056e5 osd: use ObjectStore::create() helper to create ObjectStore impl
-237d6b8 os/ObjectStore: add static create() method
-6d92a8e osd: drop obsolete 'filestore' bool option
-2974eb5 osd: include misc osd config info in metadata sent to the mon
-ea9dabf mon/OSDMonitor: include osd metadata in 'ceph report'
-c4f817f mon/OSDMonitor: move osd metadata dump into a helper
-838b6c8 PG: don't query unfound on empty pgs
-964c8e9 PG: retry GetLog() each time we get a notify in Incomplete
-14cf4ca (origin/wip-6892) rgw: don't error out on empty owner when setting acls
-7ec21ed Mark libcls_kvs as a module
-e5357c0 test: remove zero-copy read_fd test temporarily
-bafb5c3 doc: clarify crush rule create-simple and fix typos
-371dc71 doc: fix formatting typo in mon configuration
-00ee9a5 doc: improve ceph-mon usage, fix ceph tell examples
-4fa8f68 README: add yum command line
-b0dce8a (origin/wip-mds-assert) mds: Add assertion to catch object mutation error
-09a4c1b (origin/wip-5871) mds: remove superfluous warning of releasing lease
-c409e36 mon: osd dump should dump pool snaps as array, not object
-03d63c4 buffer: turn off zero-copy reads for now
-784d188 mds: Release resource before return
-524f666 rbd: Release resource before return
-66f51f8 osd: Remove bogus assert(active == acting.size())
-5ccc2ec SubmittingPatches: describe github pull-request process
-ab05580 Add missing stuff to clean target
-ae46c38 Correctly mark library modules
-94ca1cc ceph-object-corpus: revert accidental revert
-75d4a72 (origin/wip-zero-copy-bufferlist-last) buffer: enable tracking of calls to c_str()
-445fb18 buffer: try to do zero copy in read_fd
-be29b34 buffer: attempt to size raw_pipe buffers
-3f6fa05 buffer: add methods to read and write using zero copy
-5021b43 buffer: create raw pipe-based buffer
-eb94b8f buffer: add an exception with an error code
-30bc0e2 safe_io: add functions for handling splice
-b8518fe buffer: remove unused raw::length() method
-ebb261f buffer: abstract raw data related methods
-740d406 doc: Clarified description on scrub load threshold.
-8a3ed9b doc: Fixed instruction.
-fc5789d doc: Added commentary to configure pg defaults. Clarified size commentary.
-dceaef4 doc: PG splitting added to docs.
-d39676b doc: Took out "future" reference to namespaces.
-9a55d89 doc: Clarification of terms.
-b35fc1b (origin/wip-6804) rgw: lower some debug message
-561e7b0 (origin/wip-6829) rgw: initialize RGWUserAdminOpState::system_specified
-b2ee935 (origin/wip-6796) PendingReleaseNotes: mention 6796 and 'ceph osd pool set' behavior change
-7c6d43c doc: rados: operations: pools: document 'osd pool set foo hashpspool'
-49d2fb7 mon: OSDMonitor: don't crash if formatter is invalid during osd crush dump
-337195f mon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString
-7191bb2 mon: OSDMonitor: drop cmdval_get() for unused variable
-50868a5 (origin/wip-6705) qa: workunits: mon: ping.py: test 'ceph ping'
-6b5aaf3 doc: Minor updates to manual deployment document.
-3502d4f init: fix typo s/{$update_crush/${update_crush/
-29178d8 doc: Cleanup of Add/Remove OSDs.
-634295d doc: Cleanup on Add/Remove monitor.
-de2bcd5 doc: Added a manual deployment doc.
-10b4bf6 doc: Added manual deployment section to index.
-f753d56 test: use older names for module setup/teardown
-72bba1f doc: Added fixes to osd reporting section.
-86e4fd4 (origin/wip-flush-5855-review) osd: Backfill peers should not be included in the acting set
-19dbf7b osd: Simple dout() fix
-82e1e7e PG: remove unused Peering::flushed
-9ff0150 PG: don't requeue waiting_for_active unless flushed and active
-41272e7 ReplicatedPG/PGBackend: block all ops other than Pull prior to active
-6c1aaa4 PG: call start_flush in Active() instead of using do_pending_flush()
-e657369 PG,ReplicatedPG: allow multiple flushes to be in progress
-da77553 ReplicatedPG,PG: move duplicate FlushedEvt logic info on_flushed()
-68e0e06 doc: warn about #6796 in release notes
-574cb61 man: re-generate changed man pages
-0de0efa RBD Documentation and Example fixes for --image-format
-40a76ef (origin/wip-osd-bench-size) osd: fix bench block size
-703f9a0 Revert "JounralingObjectStore: journal->committed_thru after replay"
-f0c8931 release-notes: clarify that the osd data directory needs to be mounted
-ba67b9f doc/release-notes.rst: v0.72.1 release notes
-96d7a2e doc: Fix wrong package names on Debian Wheezy for building Ceph
-878f354 ceph-filestore-tool: add tool for fixing lost objects
-bf7c09a osd_types: fix object_info_t backwards compatibility
-1212a21 CephContext: unregister lockdep after stopping service thread
-dd9d8b0 ReplicatedPG: test for missing head before find_object_context
-d8d27f1 JounralingObjectStore: journal->committed_thru after replay
-a7063a1 (origin/wip-6768) Use clearer "local monitor storage" in log messages
-dcef9fb (origin/po-pr838) automake: replaced hardcoded '-lboost_program_options' with a macro
-125582e autoconf: add check for the boost_program_options library
-cfb82a1 (origin/port/fallocate) filejournal: add journal pre-allocate for osx
-d39ff4c mon/OSDMonitor: 'osd metadata N' command
-ea16435 mon/OSDMonitor: record osd metadata key/value info
-6d40e94 osd: send host/kernel metadata to mon on boot
-aef3402 doc/release-notes: fix dup
-21637cc doc: Updated Emperor reference to 0.72.
-8b5719f doc: Added Emperor upgrade.
-7f45e72 doc: Added dumpling to the sequence.
-efe55b1 doc: Remove redundant command for quick start preflight
-fbdfe61 (origin/port/unused-headers) trace: remove unused header
-762acec mon: Monitor: make 'quorum enter/exit' available through the admin socket
-01f7b46 (origin/port/stat) client: use platform-specific stat time members
-2f76ac3 (origin/wip-da-SCA-master) mon/MDSMonitor.cc: remove some unused variables
-91627f2 test_seek_read.c: remove unused variable 'off64_t so'
-0da5a01 rgw: remove unused variables
-6566dfb osd/ReplicatedPG.cc: remove unused variable
-ace35f2 Client.cc: remove unused variable from Client::CommandHook::call()
-9226a97 rgw/rgw_user.cc: use static_cast<>() instead of C-Style cast
-548fc13 rgw/rgw_http_client.cc: use static_cast<>() instead of C-Style cast
-fbdfd87 remove unused variable from Objecter::RequestStateHook::call()
-d0cf2bf ErasureCodeExample.h: prefer prefix ++operator for non-primitive types
-36ae9eb osd/osd_types.cc: use !p.tiers.empty() instead of size()
-6b5a96b ErasureCodeJerasure.cc: prefer prefix ++operator for non-primitive types
-23f7bfc osd/ErasureCodePlugin.cc: prefer prefix ++operator for non-primitive types
-a8e10d3 os/ObjectStore.cc: prefer prefix ++operator for non-primitive types
-555e717 mon/OSDMonitor.cc: prefer prefix ++operator for non-primitive types
-0803d60 common/buffer.cc: prefer prefix ++operator for non-primitive types
-5832e26 (tag: v0.72) v0.72
-84fb1bf rgw: deny writes to a secondary zone by non-system users
-d8f0502 doc/release-notes: note crush update timeout on startup change
-1ee112f osdmaptool: fix cli tests
-082e7c9 Ceph: Fix memory leak in chain_flistxattr()
-c7a30b8 ReplicatedPG: don't skip missing if sentries is empty on pgls
-5fe3dc6 objecter: clean pause / unpause logic
-98ab7d6 (origin/wip-objecter-full) objecter: set op->paused in recalc_op_target(), resend in not paused
-afb3566 (origin/port/detect-clang) conf: use better clang detection
-ac04481 (origin/port/func-name) assert: choose function-var name on non-gnu
-1d030d1 (origin/port/gtest-death-tests) test: Only build death tests on platforms that support them
-c6826c1 (origin/wip-6719) PG: fix operator<<,log_wierdness log bound warning
-f4648bc PGLog::rewind_divergent_log: log may not contain newhead
-25b7349 osd/ErasureCodePlugin: close library before return on error
-c3d20f2 osd/erasurecode: free allocated memory before return NULL
-bfd5b90 mon/MDSMonitor: remove unnecessary assignment
-89d5396 osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()
-2aaed99 Revert "doc: radosgw workaround for OpenStack Horizon bug"
-c5c399d objecter: don't resend paused ops
-5a44e17 (origin/wip-6677) rgw: add compatibility for MultipartUpload
-a3ccd29 RadosModel: use sharedptr_registry for snaps_in_use
-c22c84a osdmaptool: don't put progress on stdout
-81a3ea1 (origin/port/rgw) rgw: add compat file for name service macros
-5dc6419 rgw: avoid sighandler_t in favor of sig_t
-e9880cf (origin/port/missing-headers) crush: add mising header for count
-a10345a auth: add missing header for list
-01a5a83 mon: add missing header for std::find
-e71a2f0 auth: add missing header file for std::replace
-0209568 (origin/port/utime) utime: use to_timespec for conversion
-4c3b6d6 rgw: allow multiple frontends of the same framework
-e25d32c rgw: clean up shutdown signaling
-6d737ce rgw: clean up front end configuration
-abc2177 rgw: more flexible frotnend handler config
-bbcddef Add a verbose argument and some verbosity
-c4b0431 Verify that radosgw started, return appropriate exit code
-0c61091 We should exit 1 if radosgw is not executable
-1cc8558 (origin/port/detect-libresolv) autoconf: check for res_nquery explicitly
-ea725d3 (origin/port/bootstrap) autogen.sh: use glibtoolize when available
-00734ec autogen: set exit on error
-154ee0b FileStore::_collection_move_rename: handle missing dst dir on replay
-1fe762c rgw: refactor request handling processing
-6818795 rgw: support http/1.0 keep-alive response (mongoose)
-fc7c196 rgw: update code to handle mongoose v4.1
-e065b71 rgw: add SERVER_PORT to mongoose environment
-4779e66 rgw: configurable mongoose port
-d0bd7f3 rgw: support for mongoose keepalive
-fe6cd9b rgw: rebase mongoose prototype
-ed3caf7 mongoose: submodule, v4.1
-2fcaa1f pdatedoc: Added index link to new install doc. Requires merge of wip-doc-install to work.
-917dd71 doc: Deleted old manual install doc.
-195e861 (origin/wip-doc-install) doc: Mentioned that install procedure is for manual deployments, not ceph-deploy or others.
-2aa6cde doc: Changed text for ceph-extras. Made it required. Mentioned newer versions.
-d03924c (origin/wip-da-fix-galois-warning) galois.c: fix compiler warning
-6821a6e (origin/wip-static-cast) assert: use feature test for static_cast
-330a6a7 (origin/wip-fadvise) wbthrottle: use posix_fadvise if available
-2bf8ff4 doc: Added DNS and SSL dialog.
-cd0d612 OSD: allow project_pg_history to handle a missing map
-9ab5133 OSD: don't clear peering_wait_for_split in advance_map()
-545135f ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir
-324dd54 (origin/wip-blkdev) test: test helper for get_block_device_size
-268785f blkdev: support blkdev size query on osx
-75b4b47 doc: Implemented changes suggested from feedback.
-41e052d (origin/revert-struct-init) Revert "fix -Wgnu-designator warnings"
-96f4607 test/libcephfs: free cmount after tests finishes
-c0bcdc3 osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()
-09e1597 (origin/wip-pgmap) mon/PGMap: use const ref, not pass-by-value
-fb0f198 rbd: omit 'rw' option during map
-2db20d9 qa: don't run racy xfstest 008
-1bb5aad (origin/wip-6698) upstart: fix ceph-crush-location default
-c3c962e doc: radosgw workaround for OpenStack Horizon bug
-cbc15bf doc: fix typo in openstack radosgw integration
-4032501 mon/OSDMonitor: refix warning
-9834ab9 (origin/wip-6673b) OSDMonitor: be a little nicer about letting users do pg splitting
-59a55fd (origin/wip-pipe) pipe: use pipe2 feature test; check fcntl retval
-5d0d0a9 fix -Wmismatched-tags warnings
-6efc2b5 fix -Wgnu-designator warnings
-382149c OSD: remove unused private var [-Wunused-private-field]
-cf29574 CrushTester: remove unused private var [-Wunused-private-field]
-cc08a4a auth: remove unused private var [-Wunused-private-field]
-306ec71 rgw: don't turn 404 into 400 for the replicalog api
-cd30e5f (origin/master-new) common/buffer.cc: fix rebuild_page_aligned typo
-ffdd30e test: add gcc compile test for installed headers
-12238d0 libcephfs: Fix compilation for C compiler
-b3b1650 ceph: Fix compilation with GCC compiler
-524aee6 Really use the hostname, otherwise ambiguous
-f2622a4 ceph-object-corpus: revert accidental revert
-df3af6c docs: Fix a typo in RGW documentation
-588ed60 (origin/next-new) Wrap hex_to_num table into class HexTable
-148023d [rgw] Set initialized to true after populating table in hex_to_num()
-28e4271 sharedptr_registry.hpp: removed ptrs need to not blast contents
-4402898 prio-q: initialize cur iterator
-353813b PGLog: remove obsolete assert in merge_log
-ca4c166 test/osd/RadosModel.h: select and reserve roll_back_to atomically
-99c5319 test/rados/list.cc: we might get some objects more than once
-4a41d3d os/chain_listxattr: fix leak fix
-a8c3373 doc: Updated rewrite rule.
-ba153ea doc: Incorporated feedback.
-c66beb6 doc: Created new zone sync image.
-d6a6cf5 doc: Modified image.
-698df04 doc: Removed references to OpenSuse and SLES.
-5c9f322 doc: Retitled document. Made example generic. Fixed link.
-29dfb79 doc: Retitled document.
-5df3024 docs: Fix a typo in RGW documentation
-a2090ba doc: Removed the Folsom reference.
-c9aa708 doc: Restored show_image_direct and added a link to older versions.
-8193bad doc: Removed nova-volume, early Ceph references and Folsom references.
-dd14013 doc: Removed install yum priorities. Duplicated where relevant.
-c254da5 doc: Added quick ceph object store with links to manual install and config.
-16e25cd doc: Restored Object Store Quick Start entry for parallelism.
-98603d4 doc: Changed install to ceph-deploy install.
-a62d7c0 doc: Added note for ARM support in quantal and raring.
-3bc6e52 Removed add repositories, yum priorities, and consolidated index.
-f33b118 doc: Added consolidated install of VM/Cloud software.
-ea35f79 doc: Removed install qemu. Consolidated to install-vm-cloud.
-fba056a doc: Removed install libvirt. Consolidated to install-vm-cloud.
-7c4394d doc: Consolidated install object gateway and install Apache/FastCGI
-0f87f15 doc: Removed. Consolidated into install-ceph-gateway.
-68caa1b doc: Consolidated Add Repositories.
-1bdd37f doc: Removed doc. Consolidated with Get Packages.
-6b9104d doc/release-notes: formatting
-04710b5 doc/release-notes: fix formatting
-b605c73 doc/release-notes: fix indentation
-1de46d6 (origin/next-fix) os/chain_listxattr: fix leak fix
-6efd82c ceph: Release resource before return in BackedObject::download()
-e22347d ceph: Fix memory leak in chain_listxattr
-905243b Fix memory leak in Backtrace::print()
-be12f7f (origin/wip-6683) mon: OSDMonitor: proper error msg on invalid epoch on 'osd getmap/dump'
-e5efd88 mon: MonmapMonitor: support 'mon getmap [epoch]'
-e11c975 (tag: v0.72-rc1) v0.72-rc1
-a3119bc (origin/wip-crush-hook) upstart, sysvinit: use ceph-crush-location hook
-9f6af8b ceph-crush-location: new crush location hook
-1e2e429 Revert "ceph-crush-location: new crush location hook"
-22ff717 Revert "upstart, sysvinit: use ceph-crush-location hook"
-0c18609 (origin/wip-6605) mon: OSDMonitor: fix comparison between signed and unsigned integer warning
-e02740a mon: OSDMonitor: only allow an osd to boot iff it has the fsid on record
-42c4137 mon: OSDMonitor: fix some annoying whitespace
-60264f9 doc: Fixed formatting. Fixed hyperlink.
-46d897a doc: fix formatting.
-111a37e upstart, sysvinit: use ceph-crush-location hook
-fc49065 ceph-crush-location: new crush location hook
-df229e5 (origin/wip-6673) mon/PGMonitor: always send pg creations after mapping
-2181b4c mon/OSDMonitor: fix signedness warning on poolid
-7a06a71 ReplicatedPG::recover_backfill: update last_backfill to max() when backfill is complete
-e46d2ca (origin/wip-pr781)   fix the bug  ctypes.util.find_library to search for librados failed on Centos6.4.   Signed-off-by: huangjun  <hjwsm1989 at gmail.com>
-f8fa309 ReplicatedPG: src_obcs can now be empty
-3b99cd0 (origin/wip-readdirend) mds: fix readdir end check
-6eded8a doc: Fixes to normalize header hierarchy. Tweaked IA slightly.
-bd507ef doc: Updated with a verified installation procedure and latest usage.
-4e48dd5 (origin/wip-6585) osd/ReplicatedPG: use MIN for backfill_pos
-4139e75 ReplicatedPG: recover_backfill: don't prematurely adjust last_backfill
-ecddd12 ReplicatedPG: add empty stat when we remove an object in recover_backfill
-9ec35d5 ReplicatedPG: replace backfill_pos with last_backfill_started
-8774f03 PG::BackfillInfo: introduce trim_to
-46dfd91 PG::BackfillInterval: use trim() in pop_front()
-0a9a2d7 ReplicatedPG::prepare_transaction: info.last_backfill is inclusive
-5939eac (origin/wip-5612) upstart: fail osd start if crush update fails
-177e2ab init-ceph: make crush update on osd start time out
-b28b64a (origin/wip-scripts) pybind: use find_library for libcephfs and librbd
-d5d36d0 (origin/wip-6621) radosgw-admin: accept negative values for quota params
-9d136a4 (origin/wip-obc) ReplicatedPG: no need to clear repop->*obc
-f58396a doc/release-notes: emperor blurb
-8db03ed ReplicatedBackend: don't hold ObjectContexts in pull completion callback
-5a416da ReplicatedPG: put repops even in TrimObjects
-420182a ReplicatedPG: improved on_flushed error output
-ce33892 PG: call on_flushed on FlushEvt
-6f975e3 PG,ReplicatedPG: remove the waiting_for_backfill_peer mechanism
-3d0d69f ReplicatedPG: have make_writeable adjust backfill_pos
-3de32bd ReplicatedBackend: fix failed push error output
-807dde4 ReplicatedPG,osd_types: move rw tracking from its own map to ObjectContext
-2cadc23 osd_types,OpRequest: move osd_req_id into OpRequest
-9b003b3 OpRequest: move method implementations into cc
-c4442d7 ReplicatedPG: reset new_obs and new_snapset in execute_ctx
-8a62bf1    fix the bug if we set pgp_num=-1 using "ceph osd pool set data|metadata|rbd -1"    will set the pgp_num to a hunge number.
-c7d975a (origin/wip-ceph-context) ceph_context: use condition variable for wake-up
-e5efc29 test: Use a portable syntax for seq(1)
-fbabd42 test: Change interpreter from /bin/bash to /bin/sh
-0a1579d test: Use portable arguments to /usr/bin/env
-b926930 pybind: use find_library to look for librados
-19d0160 doc/release-notes: v0.72 draft release notes
-bf198e6    fix the bug if we set pgp_num=-1 using "ceph osd pool set data|metadata|rbd -1"    will set the pgp_num to a hunge number.
-5eb836f ReplicatedPG: take and drop read locks when doing backfill
-058c74a PG: switch the start_recovery_ops interface to specify work to do as a param
-87daef7 ReplicatedPG: implement the RWTracker mechanisms for backfill read locking
-96ed5b8 ReplicatedPG: separate RWTracker's waitlist from getting locks
-f0f6750 common: add an hobject_t::is_min() function
-fe30ac6 rgw: Use JSONFormatter to use keystone API
-5733f9c rgw: Use keystone password to validate token too
-bd04a77 rgw: Adds passwd alternative to keystone admin token
-8282e24 (origin/wip-6635) mon/OSDMonitor: make racing dup pool rename behave
-66a9fbe common: rebuild_page_aligned sometimes rebuilds unaligned
-c14c98d mon: OSDMonitor: Make 'osd pool rename' idempotent
-284b73b packages: ceph.spec.in is missing make as a build dependency
-aea985c Objecter: expose the copy-get()'ed object's category
-06b5bf6 osd: add category to object_copy_data_t
-61f2e5d OSD: add back CEPH_OSD_OP_COPY_GET, and use it in the Objecter
-15c8267 OSD: rename CEPH_OSD_OP_COPY_GET -> CEPH_OSD_OP_COPY_GET_CLASSIC
-b75b7ad ReplicatedPG: copy: move the COPY_GET implementation into its own function
-80f3696 osd: Add a new object_copy_data_t, and use it in the OSD/Objecter
-808fa9a ReplicatedPG: cache: don't handle cache if the obc is blocked
-91b589f ReplicatedPG: copy: add a C_KickBlockedObject
-ade8f19 ReplicatedPG: add a Context *ondone to RepGathers
-b403ca8 ReplicatedPG: copy: rename CopyOp::version -> user_version
-4e139fc ReplicatedPG: copy: do not let start_copy() return error codes
-178f9a2 ObjectStore: add a bufferlist-based getattrs() function
-e17ff19 osd/osd_types: init SnapSet::seq in ctor
-d2b661d os/FileStore: fix getattr return value when using omap
-3a469bb os/ObjectStore: fix RMATTRS encoding
-847ea60 PGLog::read_log: don't add items past backfill line to missing
-3c0042c (origin/wip-rbd-parent-info) rbd.py: increase parent name size limit
-87d3f88 PGMap::dirty_all should be asserting about osd_epochs, not in.osd_epochs
-0388b71 Update init-rbdmap
-0d326c3 ceph: tolerate commands without any child args
-cfe8451 rgw: eliminate one unnecessary case statement
-80384a1 Update init-rbdmap
-f9a6d71 (origin/wip-rgw-sync-next) radosgw-admin: remove unused function escape_str()
-ec45b3b rgw: escape bucket and object names in StreamReadRequests
-dd308cd rgw: move url escaping to a common place
-e0e8fb1 rgw: update metadata log list to match data log list
-c275912 rgw: include marker and truncated flag in data log list api
-e74776f cls_log: always return final marker from log_list
-ea816c1 rgw: skip read_policy checks for system_users
-1d7c204 Add a configurable to allow bucket perms to be checked before key perms through rgw_defer_to_bucket_acls config option.  This configurable defaults to an empty string.  Option values include:
-0e8182e (origin/wip-6620) mds: MDSMap: adjust buffer size for uint64 values with more than 5 chars
-af1dee5 doc: clarify that mons must have qurorum during deploy
-4c8be79    rename test_arch.c --> test_arch.cc to avoid undefined reference to `__gxx_personality_v0' error.    Signed-off-by: huangjun  <hjwsm1989 at gmail.com>
-7ba4bc4 (origin/wip-monc-ping) cli: ceph: add support to ping monitors
-400cb18 pybind: rados: ping a monitor via librados
-1a2e0eb pybind: rados: support ETIMEDOUT on make_ex()
-2d7ccab librados: support pinging a monitor without auth via RadosClient
-6a4b196 mon: MonClient: allow pinging a monitor without authenticating first
-c521ba7 mon: MonClient: adjust whitespaces
-5e4652e mon: Monitor: reply to ping messages, letting them know we're alive
-4ca1407 mon: Monitor: do not flush formatter at end of _mon_status()
-b8d54cd doc: Fixed typo, clarified example.
-53486af doc: Updated docs for OSD Daemon RAM requirements.
-828537c doc: Added ARM. Added Calxeda hardware example.
-105fb61 doc: Added install for libvirt.
-6c88d40 doc: Added install for QEMU.
-fe6520b doc: Added install for ceph-deploy.
-df4adef doc: Added install for Apache with 100-continue support.
-1bf413e doc: Added install for storage cluster.
-5a6412e doc: Added a consolidated build document. Prerequisites, build, build packages.
-b88267b doc: Added guide for getting packages. Still needs work.
-90487e3 doc: Added new guide for adding repositories.
-dcbaec5 doc: Created new stepwise manual install section.
-4e6a9a5 doc: Modified cloning source to include git steps. Consolidation.
-314fd2c doc: Updated OS recommendations with an Emperor entry.
-6369d96 doc: Updated Quick Block Device for kernel versions, and linked OS Recommendations.
-df9315c doc: Removed RGW from quick start, since it is not ceph-deploy enabled.
-8a36503 doc: Moved CPU Profiler docs to dev.
-06ec0f6 doc: Removed Calxeda reference since it is now the same as normal install.
-b422d4a doc: Removed old files. Consolidated contents into new IA.
-1821ad7 (origin/wip-6242-b) pybind/rados: create InterruptedOrTimeoutError exception
-1230886 ceph: move timeout
-8baeac0 ceph: catch exceptions thrown during the rados handle init
-d60e532 ceph: show basic help before initializing cluster connection
-b33c315 ceph: default 5 second timeout for -h
-15de2c4 ceph: add --connect-timeout option
-e922475 ceph: print basic options before connecting
-445e8c9 ceph: fixup do_help() function connection check
-32a23c5 ceph.in: add emacs modeline
-771b0c5 (origin/wip-6606) rgw: don't bother to call c_str() on strings passed to dump_string()
-dff41cd (origin/wip-test-librbd) ceph_test_librbd: fix heap overrun
-eb5dd55   test_ceph_argparse.py: No assert_not_in and assert_in in nose.tools   Signed-off-by: huangjun  <hjwsm1989 at gmail.com>
-ccaab2a rgw: init src_bucket_name, src_object in the S3 handler
-db7eb77 rgw: get rid of req_state.bucket_name
-cbf8f9a rgw: turn swift COPY into PUT
-1f6b8b2 librbd: parse args to ceph_test_librbd
-ad4553a librbd: fix build error
-bd2eeb7 ceph-mon: add debug to ip selection
-a107030 (origin/wip-5668-b) librbd: wire up flush counter
-715d2ab (origin/wip-6603) common/BackTrace: fix memory leak
-687ecd8 common/cmdparse: fix memory leak
-9fa357d (origin/wip-backtrace) mds: update backtrace when old format inode is touched
-34d0941 (origin/wip-6599) client: fix invalid iterator dereference in Client::trim_caps()
-4f299ca autoconf: fix typo on AM_COMMON_CFLAGS
-94080de common: get_command_descriptions use cout instead of dout
-8586c75 (origin/wip-6582) ReplicatedPG: copy: conditionally requeue copy ops when cancelled
-6dff926 PG: add a requeue_op() function to complement requeue_ops().
-45d1846 doc: Removed references to Chef.
-89995ef doc/release-notes: missed mds snaps
-5905227 doc/release-notes: v0.71
-5d2cf46 Update ceph-authtool.rst
-7bcfe09 ceph.spec.in:  Add erasure-code related files. Signed-off-by: huangjun  <hjwsm1989 at gmail.com>
-533626c Add Redhat init script option
-3cfe9f6 (origin/wip-cache-crc) common/buffer: invalidate crc on zero, copy_in
-8ec3aed common/buffer: fix crc_map types
-394ec17 common/buffer: drop unused fields
-2edc04c (origin/wip-6475-gl) ceph.spec.in:  Need to cread radosgw log directory.
-1f291f5 qa/workunits/rest/test.py: fix mds {add,remove}_data_pool test
-11fc80d doc/release-notes: link ot the changelog
-eb0a3b7 doc/release-notes: v0.61.9
-d3f0c0b Makefile: fix /sbin vs /usr/sbin behavior
-15ec533 OSD: check for splitting when processing recover/backfill reservations
-08177f2 ceph: Remove unavailable option with clang
-e509cb1 (tag: v0.71) v0.71
-10b466e (origin/wip-6475) radosgw: create /var/log/radosgw in package, not init script
-5c280a2 .gitignore: ceph-kvstore-tool
-14e91bf debian, specfile: fix ceph-kvstore-tool packaging
-fd6e2b8 (origin/wip-kvstore-tool) ceph-kvstore-tool: copy one leveldb store to some other place
-85914b2 ceph-kvstore-tool: calc store crc
-da69fa0 tools: move 'test_store_tool' to 'tools/ceph-kvstore-tool'
-eafdc92 common/buffer: behave when cached crc stats don't start at 0
-c5cdf4e crc32c: expand unit test
-0620eea sctp_crc32c: fix crc calculation in the NULL buffer case
-b96ee5c crc32c: add a special case crc32c NULL buffer handling
-d9e3077 common/buffer: pass NULL buffer instead of a zero-filled one
-9626aaf common/crc32c: document interface
-36e18ae common/crc32c_intel_baseline: accept null data buffer
-c545fc2 common/sctp_crc32: accept NULL buffer pointer
-a3e9344 common/buffer: explicitly init zbuf to zeros
-88ae8f6 common/buffer: add crc caching performance test
-6464516 common/buffer: instrument utilization of cached crcs
-0c23a56 common/buffer: cache crcs in buffer::raw
-8757775 include: add Spinlock
-72ce2ef (origin/wip-4047) cls_rbd: do not make noise in osd log on rbd removal
-e550e3d test_ceph_argparse: fix typo
-dbd6d97 test_ceph_argparse: fix mds {add,remove}_data_pool tests
-5838c09 common: fix non-daemon init
-1d4f501 test/filestore/run_seed_to.sh: avoid obsolete --filestore-xattr-use-omap
-982511e MonCommands: note that pg dump options don't work in plaintext
-c7acc2a (origin/wip-5716) rgw: gracefully handle bad root pool names
-488678f ceph_test_rados: fix snap remove vs rollback fix
-2701231 os/LevelDBStore: handle deletion race when checking store size
-92ea0d1 test/librados/cmd: fix compile error
-c69e76c (origin/wip-6059) ReplicatedPG: remove the other backfill related flushes
-3469dd8 RadosModel: send racing read on write
-0246d47 ReplicatedPG: block reads on an object until the write is committed
-c658258 OSD: ping tphandle during pg removal
-4f403c2 (origin/wip-6334) common: don't do special things for unprivileged daemons
-5aa237e mon, osd: send leveldb log to /dev/null by default
-ab8f9b1 doc: Update from user feedback. Needed to enable S3/Keystone.
-4bb2a4b doc: Updated to ensure that socket name isn't static.
-bd7a7dd os/FileStore: fix fiemap double-free(s)
-26228ed ceph-dencoder: select_generated() should properly validate its input
-8b43d72 vstart.sh: create dev/ automatically
-8d7dbf8 rgw: change default log level
-70cc681 mon/PGMonitor: set floor below which we do not warn about objects/pg
-bebbd6c (origin/wip-6553) rgw: fix authenticated users acl group check
-08327fe mon: osd pool set syntax relaxed, modify unit tests
-02b5eb2 ceph.spec.in: do not list ceph-rest-api twice; add missing cls_hello files
-dd33c98 osd/osd_types: generalize pg_pool_t::get_flags_string()
-5abe5c2 (origin/wip-6147) mon: OSDMonitor: add 'osd pool stats' command
-2cd5320 mon: PGMap: rework client IO rate calc and output
-e3ba8e8 mon: PGMap: reuse existing summary functions to output pool stats
-82e3317 mon: PGMap: keep track of per-pool stats deltas
-e2602c5 (origin/wip-pool) mon: make 'mon {add,remove}_data_pool ...' take pool name or id
-d6146b0 (origin/wip-formatter-newlines) common/Formatter: add newline to flushed output if m_pretty
-f2645e1 rgw: swift update obj metadata also add generic attrs
-6641273 SignalHandler: fix infinite loop on BSD systems
-2cc5805 doc: Removed underscore for consistency.
-4b8eb4f (origin/wip-rgw-quota) radosgw-admin: add --quota-scope param to usage
-f568501 (origin/wip-5025) mds: flock: fix F_GETLK
-3c6710b qa/workunits/misc/dirfrag: make it work on ubuntu
-b0f49e0 ReplicatedPG.h: while there cannot be a read in progress, there may be a read blocked
-bf82ba9 doc: disable cephx requires auth_supported = none
-0f73f0a rgw: switch out param to a pointer instead of reference
-8aa7f65 test: update cli test for radosgw-admin
-91f0c82 radosgw-admin: clarify --max-size param
-ad409f8 formatter: dump_bool dumps unquoted strings
-c1acf9a rgw_quoa.{h,cc}: add copyright notice
-8d8ae58 doc: Created new index to incorporate side-by-side deb/rpm installs.
-bc50dbb doc: Created installation doc for Yum priorities. Ceph-specific packages need it.
-05b2e44 doc: Created new QEMU install for RPMs with provision for Ceph-specific packages.
-f37c75b doc: Created new QEMU install for debian.
-869b721 doc: Added new libvirt install for RPM.
-d466874 doc: Created new libvirt install for debian/ubuntu.
-99fe31e doc: Removed Gatway from Ceph Object Storage. Added Yum repo information.
-cdd851b doc: Moved installation portion to the installation section.
-1dff92b doc: Moved installation portion to the installation section.
-a182535 librados: add some clarifying comments
-7ef5eb0 librados: drop reference to completion in container destructor
-f13cc68 doc: Fixed hyperlinks. Cleanup of old references to Chef.
-70250e8 (origin/wip-mon-pool-set) osd: osd_types: Output pool's flag names during dump
-7113186 (origin/wip-objecter-errors) osdc/Objecter: clean up completion handlers that set *prval=0
-82e9330 osdc/Objecter: only make handlers set *prval if EIO
-1c28869 mon: OSDMonitor: allow (un)setting 'hashpspool' flag via 'osd pool set'
-2fe0d0d mon: OSDMonitor: split 'osd pool set' out of 'prepare_command'
-6bbb772 test/filestore/run_seed_to_range.sh: fix -d syntax
-4e2ff53 (origin/wip-truncate2) mds: avoid leaking objects when purging file.
-eb381ff (origin/wip-filerecover) mds: don't decrease file size when recovering file
-1803f3b radosgw-admin: limit user bucket-level quota
-18a271d mds: optimize map element dereference
-d8faa82 ReplicatedPG: remove unused RWTracker::ObjState::clear
-89d3f47 radosgw-admin: can set user's bucket quota
-cb9ebd6 doc: Minor correction.
-14eabd4 rgw: bucket quota threshold
-34d0526 rgw: configurable bucket quota size
-fc35807 rgw: protect against concurrent async quota updates
-2e4ecc2 rgw: async quota update
-5bc6327 doc: Merge cleanup.
-c0c332c doc: minor clean up.
-007f06e (origin/wip-4405) mds: fix infinite loop of MDCache::populate_mydir().
-1f50750 (origin/wip-5992-3) ReplicatedPG: remove the other backfill related flushes
-db6623f RadosModel: send racing read on write
-2b216c3 ReplicatedPG: block reads on an object until the write is committed
-e8a2992 rgw: rearrange includes
-6ff9570 Go back to $PWD in fsstress.sh if compiling from source.
-8e493ef Go back to $PWD in fsstress.sh if compiling from source.
-768fb0a doc: fix openstack rbd installation command
-e21e573 os: stronger assert on FileStore::lfn_open
-0f323bc common: unintended use of the wrong bloom_filter prototype
-4b911cf (origin/wip-rval) ReplicatedPG: copy: use aggregate return code instead of individual Op return
-6da4b91 os/FileStore: fix ENOENT error code for getattrs()
-71ee6d7 mon: allow MMonGetMap without authentication
-f279641 mon: do not put() unhandle message
-0cae3a1 common/bloom_filter: add a few assertions and checks for bit_table_ == NULL
-cf34adb common/bloom_filter: simplify compressible_bloom_filter encode/decode/dump
-f45c3b9 common/bloom_filter: fix compress; improve argument
-055dc4c common/bloom_filter: fix estimated element count for compressed filters
-16dec28 ceph.spec.in: Always depend on junit4 (fixes bug #6216)
-82f6ec5 doc/release-notes: v0.70
-aaabc65 common/bloom_filter: methods for density, approx unique element counts
-04091f8 common/bloom_filter: remember original target size
-d07f5f3 common/bloom_filter: drop raw_table_size_ member
-ea2378e common/bloom_filter: make compressible_bloom_filter encodable
-92a60a0 mon/PGMap: make generated test instances obey new invariant
-e0be61e qa/workunits: Add large number of files in a directory test script
-f82aefa mds: reduce verbosity of dir fragment logging
-488ddad mds: fix bloom filter leaks
-1d14d11 mds: stop propagating rstat if freezing/frozen dirfrag is encountered.
-576da8e mds: don't scatter gather update bare-bones dirfrags
-c7db090 fragtree_t: fix get_leaves_under()
-c40c5dc client: handle dirfrag mismatch when processing readdir reply
-4054651 client: use dir_result_t::END as flag
-5074464 mds: handle dirfrag mismatch when processing readdir request
-fe99882 mds: fix CInode::get_dirfrags_under()
-473635a mds: fix MDCache::merge_dir()
-a242201 mds: don't fragmentate stray directories
-2eb863d mds: properly update rstat/fragstat when fragmentating directory
-f989396 mds: properly store fragmenting dirfrags
-7515335 mds: trim log segment after finishing uncommitted fragments
-4014ba2 mds: delete orphan dirfrags during MDS recovers
-a881c1d mds: journal original dirfrags for rollback
-e927941 doc/release-notes: v0.67.4
-3fc6cfb (origin/wip-optracker) Makefile: add include/histogram.h to noinst_HEADERS
-bb9b9c8 (origin/wip-6143) common, os: Perform xattr handling based on detected fs type
-b87bc23 (origin/wip-5992-2) ReplicatedPG: lock snapdir obc during write
-0c2769d PGLog: on split, leave log head alone
-391a885 FileStore: make _setattrs not return -ENOENT most of the time
-0c1e251 ReplicatedPG: add debugging in recover_replicas for objects added for backfill
-2ae9ece ReplicatedPG,PG: use PGBackend methods for getattr
-8a919fb ReplicatedPG,PG: adapt collection_list* users to PGBackend interface
-ff17e45 PG,ReplicatedPG: expose PGBackend to PG
-9a10a80 PG.cc: remove leading empty space
-4df481c PGBackend,ReplicatedBackend: add interfaces for scanning the pg
-664b589 ReplicatedPG: don't rescan the local collection if we can avoid it
-e73ec48 common/hobject: add is_degenerate method
-c8a4411 PGMap: calc_min_last_epoch_clean() will now also use osd_epochs
-091809b PGMap,PGMonitor: maintain mapping of osd to recent stat epoch
-e3bb065 (tag: v0.70, tag: mark-v0.70-wip) v0.70
-806725a (origin/wip-start-copy) ReplicatedPG: copy: add op progression output
-639ff9f ReplicatedPG: copy: don't leak a ctx on failed copy ops
-469d471 ReplicatedPG: assert that we have succeeded in do_osd_ops on copyfrom repeats
-f3733a2 ReplicatedPG: copy: switch CopyCallback to use a GenContext
-dc0dfb9 common,os: Remove filestore_xattr_use_omap option
-10a1e9b rgw: update cache atomically
-6ce762f lru_map: add find_and_update()
-4634d3c mds: delete orphan dirfrags after fragmentating directory
-cd4cd3f mds: start internal MDS request for fragmentating directory
-55d279b ceph_test_rados: do not let rollback race with snap delete
-b09a1ef ceph_test_rados: stop on read error!
-03ba740 osd/ReplicatedPG: fix null deref on rollback_to whiteout check
-aacd67e PendingReleaseNotes: fix typo
-fea1e0e PendingReleaseNotes: make a note about K vs k
-d6a1799 TrackedOp: specify queue sizes and warnings on a per-tracker basis
-ea831e0 TrackedOp: give people an _event_marked() notifier instead of a virtual mark_event()
-1033588 qa: fix rbd cli tests checking size
-c19935c doc: Fixed typo.
-0ce1046 doc: Added clarifying comments.
-afb4d83 librados: drop #include of int_types.h from installed headers
-f1e2393 mon: Monitor: reuse 'src_is_mon' bool on dispatch
-29cf2ff mon: Monitor: only handle paxos msgs from a mon && if session has exec caps
-b8a1488 mon: Monitor: dissociate msg handling from session & connection logic
-d0d61b4 mon: Monitor: drop client msg if no session exists and msg is not MAuth
-ed1a54e mon: Monitor: assert on absense of connection during dispatch
-dce3d26 (origin/wip-5896) mon: MonmapMonitor: make 'ceph mon add' idempotent
-8cfeb83 common/bloom_filter: note that uint32_t interface requires well-mixed values
-9299f50 common/bloom_filter: speed up unit tests a bit
-4b23b65 common/bloom_filter: test binning fpp behavior
-0a69bae common/bloom_filter: disable sequential tests
-0122ee9 common/bloom_filter: insert/contains methods for uint32_t
-22f8325 Make fsid comparison case-insensitive
-41a1345 TrackedOp: rework dump interface a little
-80659cc rgw: init RGWBucketStats
-29009b2 doc: Updated diagram for added clarity.
-2c88910 rgw: handle negative quota as non-assigned values
-07bb72a radosgw-admin: quota control api
-69180d5 rgw: dump quota params even if disabled
-a8761a5 TrackedOp: just make CephContext member public
-2723a09 TrackedOp: template OpTracker on only T[::Ref] (ie, OpRequest[::Ref])
-ebae077 rgw: bucket stats also dump quota info
-7973d44 OpTracker: give TrackedOp a default dump() function
-baf1d40 rgw: init quota
-721f170 (origin/wip-fuse) client: remove requests from closed MetaSession
-63f5814 ceph: Update FUSE_USE_VERSION from 26 to 30.
-f8a947d client: trim deleted inode
-563517d rgw: update quota stats when needed
-65ae9b8 COPYING: fix URL
-11461cb debian/copyright: sync up with COPYING
-1a56fe9 COPYING: add Packaging: section
-e70ea84 COPYING: add debian-style headers
-fea12e2 COPYING: fix formatting
-a2e175b COPYING: make note of common/bloom_filer.hpp (boost) license
-f31d691 common/bloom_filter: fix whitespace
-fdb8b0d common/bloom_filter: test behavior of sequences of bloom filters
-f1584fb common/bloom_filter: unit tests
-8835ef8 common, os, osd: Use common functions for safe file reading and writing
-c0cbd9a osd: In read_meta() leave an extra byte in buffer to nul terminate
-238a303 ErasureCode: update PGBackend description
-ff48873 ErasureCode: doc updates
-d1c1f3e common: document ghobject sort order rationale
-16fbdcd common: ghobject get_filestore_key* use hobject counterpart
-2d7dced mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck
-d29be45 ReplicatedPG: rename finish_copy -> finish_copyfrom
-a96b12f ReplicatedPG: copy: use CopyCallback instead of CopyOp in OpContext
-d2cb2bf mds: return -EAGAIN if standby replay falls behind
-fbeabcc os/FileStore: report errors from _crc_load_... and _crc_save
-dfea81e ceph_test_store_tool: add 'set prefix key' feature
-398249a test: test_store_tool: optionally output value crc when listing keys
-18fcd91 test: test_store_tool: add 'crc <prefix> <key>' command
-84c0286 rados: add 'tmap-to-omap' command
-20974dc rados: make 'tmap dump' gracefully handle non-tmap data
-a9e5323 osd: remove magical tmap -> omap conversion
-0d61092 osd: add ISDIRTY, UNDIRTY rados operations
-da1b9b6 ReplicatedPG: copy: implement CopyFromCallback::finish, remove CopyOp::ctx
-613841a ReplicatedPG: copy: add CopyCallback pointer to CopyOp, and set it up
-0b47276 ReplicatedPG: copy: start defining CopyCallback structures
-dcd475d osdc/Objecter: fix return value for copy_get
-1784ef9 ReplicatedPG: copy: split up the transaction generation from the PG management
-010ff37 ReplicatedPG: copy: specify the temp_oid in the caller
-1ae8ef2 ReplicatedPG: copy: take an ObjectContextRef in start_copy and use that
-3257bb4 doc: Incorporated some feedback.
-7e3084e osd/ReplicatedPG: mark objects dirty in make_writeable()
-d42d2b9 osd/osd_types: object_info_t::get_flag_string()
-a0ed9c2 osd/osd_types: add object_info_t::FLAG_DIRTY
-9b7a2ae crush: invalidate rmap on create (and thus decode)
-482938a doc: Fixed a few typos.
-011bff3 osd/osd_types: bump encoding from 11 -> 12
-62cc398 rbd: be helpful with invalid command
-8e33d33 rados: do not dump usage on invalid command
-0d2a2c9 doc: Minor caps change.
-584a6d2 doc: Updated text for more specific region/zone example.
-d421b66 osd/osd_types: convert object_info_t::uses_tmap to a flag
-1aa6067 osd/ReplicatedPG: update all find_object_context() users to handle whiteouts
-ea65b5a osd/osd_types: add WHITEOUT flag to object_info_t
-a1b82f2 osd/osd_types: replace bool lost with a flags field
-5bebf1a doc: Updated diagram.
-6fcea1a rgw: also check quota before starting write
-76284fa rgw: check quota before completing write op
-81aa478 rgw: fix qutoa check
-6ed8b7a ReplicatedPG: copy: add an ObjectContextRef to CopyOp
-5307703 ReplicatedPG: follow the same finish path for failed copy ops
-6658f3c ReplicatedPG: copy: remove most references to OpContext from process_copy_chunk
-4f5b317 ReplicatedPG: copy: do not use an OpContext in _copy_some
-dbfd478 ReplicatedPG: update pg stats correctly when doing a copy
-1bdc3f7 Add unit_to_bytesize test for 'k' on input; continues fix for #4612
-334f655 ReplicatedPG: don't bless C_OSD_SendMessageOnConn
-a9df335 msgr: debug delay_thread join
-bc98013 rgw: higher level quota check functionality
-b43bc1a Use 'k' when printing 'kilo'; accept either 'K' or 'k' as input
-3d062c2 rbd: fix cli test
-cce990e osdc/ObjectCacher: limit writeback IOs generated while holding lock
-055e313 rgw: quiet down warning message
-75b94ba osd/ReplicatedPG: fix iterator corruption in cancel_copy_ops()
-3452aad ceph_argparse.py: clean up error reporting when required param missing
-409aba6 rbd.cc: add readonly option for "rbd map"
-b032931 PendingReleaseNotes: update regarding librados change
-b245ca1 os/FileStore: add sloppy crc tracking
-8912462 rgw: drop async pool create completion reference
-4605792 librados: pool async create / delete does not delete completion handle
-7d1dc55 (origin/wip-doc-quickstart) doc: Diagram update and clarification on ceph-deploy admin results.
-b23718a doc: Diagram update from feedback.
-245296a doc: Diagram updates from feedback.
-71ba833 doc: Updated block device quick start to use ceph-deploy. OS neutral.
-b9000b3 Invoke python with /usr/bin/env python instead of directly
-c8054ac ReplicatedPG: remove unused CopyOp::waiting member, rename function for accuracy
-7bf8cb7 ReplicatedPG: remove useless pcop param from start_copy
-7f3165b ReplicatedPG: use our already-found iterator instead of going back into map
-8dd7ea3 rgw: fix leak in RGWMetadataManager::remove()
-3923874 common/SloppyCRCMap: add type to sloppily track crcs
-481fbbf doc: Added Dumpling to OS Recommendations.
-94478e0 OSD: unset_honor_cache_redirects() on Objecter
-35cdd89 Objecter: add "honor_cache_redirects" flag covering cache settings
-1fc24ff rbd.cc: propagate some errors to user-space when they're available
-b6f278c ceph.in: fix missing exception variable in failure to open -o file
-1e9e34b rgw: don't append NULL char before json parsing
-793d9d2 ceph_json: use different string constructor for parser buffer
-c821da9 rgw: more quota implementation
-434ad76 rgw: add bucket quota config to entities
-4fe01b1 doc: changed journal aio default to true.
-a3aa005 qa: workunits: mon: test snaps ops using rbd.
-28949d5 Formatter: add dump_bool()
-efc6b5e ceph_test_rados: remove useless snapc setup
-37d7220 ceph_test_rados: update for copy_from in begin, not finish
-b06c189 common/crc32c_intel_fast: avoid reading partial trailing word
-e5fa6d1 rgw: more quota utility stuff
-e6e8cb8 pybind: update osd blacklist tests for nonce
-0bfda47 test/common/get_command_descriptions: null terminate c string
-c5831fa ceph_test_rados: improve debug output
-eec315f ceph_test_rados: fix update_object_full
-1ba7e47 ceph_argparse.py, cephtool/test.sh: fix blacklist with no nonce
-97f462b Revert "ceph: parse CEPH_ARGS environment variable"
-30abe32 Add CEPH_ARGS at the end of sys.argv
-cbf0ba2 qa/run_xfstests.sh: use old xfstests until we adapt to new org
-bab72ed os: Simplify collection_list* funcs by removing dynamic_cast
-db5bbdd rgw: quota utility class
-9750965 os: Make write_version_stamp() private
-55f4aa1 osd: Remove code for reading ancient unsupported logs
-4a757eb os/ObjectStore: Interim collection_list* functions in ObjectStore
-222f5aa osd: Cleanup init()/read_superblock()
-aba6efd common, os, osd, test, tools: FileStore must work with ghobjects rather than hobjects
-793ba9f include, test: Add CompatSet::merge() operation
-c6b8318 os, osd, tools: Add backportable compatibility checking for sharded objects
-bb195c2 osd: read_superblock() not outputing unsupported features when incompatible
-4bc8f09 test: Adding unittest for CompatSet
-acc47d2 include: Bug fixes for CompatSet
-98b3cd3 os: Fix version_stamp_is_valid() and write_version_stamp() error return
-a1f6b14 ReplicatedPG: take obc read lock prior to recovering an object to replicas
-b29ac2a ReplicatedBackend::handle_pull_response: use list<ObjectContextRef>
-07905af ReplicatedPG: remove noop C_OSD_CompletedPull
-2bc1e38 ReplicatedPG: assert build_push_op succeeds on primary
-aeadecd ReplicatedPG.h: remove temp_coll stub
-3290065 OSD,ReplicatedPG: queue pushes in a op_tp workqueue
-039da62 ReplicatedPG: don't proceed to backfill until recovering is empty
-02e5c1f ReplicatedPG: correctly handle backfill
-b06dce3 ReplicatedPG/Backend: fix up recalc_subsets
-6cccef2 ReplicatedBackend: wire in start_pushes
-a287167 ReplicatedBackend: handle stats properly
-656d084 ReplicatedBackend: track object contexts in Push/PullInfo
-e7a0b23 ReplicatedBackend: remove priority from Pull/PushInfo
-9e8c3c3 ReplicatedPG/Backend: move prep_push and friends to ReplicatedBackend
-3d6eb6e ReplicatedPG: remove pushing/pulling
-31c6042 ReplicatedPG/Backend: handle down pull sources
-4bc0eab ReplicatedPG/Backend: split recover_missing out of prepare_pull
-273ac2b ReplicatedPG/Backend: shuffle over submit_push_*/build_push_op
-fea30f5 ReplicatedPG/Backend: move over send_pushes/send_pulls/prep_push_op_blank
-c1c2deb ReplicatedPG/Backend: move over _failed_push
-f981079 ReplicatedPG/Backend: move handle_*
-666a316 ReplicatedPG/Backend: shuffle do_pull/do_push_reply
-3e73472 ReplicatedPG/Backend: move _do_push,_do_pull_response,do_push
-8daaeba ReplicatedPG/Backend: convert sub_op_pull
-0e16230 ReplicatedPG: make log_subop_stats static
-d53fc89 ReplicatedPG/Backend: shuffle sub_op_push_reply
-8d447be ReplicatedPG/Backend: shuffle sub_op_push over to ReplicatedBackend
-087f708 osd/: allow dout for ReplicatedBackend methods to work in ReplicatedPG.cc
-7da308b ReplicatedPG: extract PGBackend::Listener recovery callbacks
-3148b12 PG,ReplicatedPG: handle do_request in ReplicatedPG,PGBackend
-30ac934 ReplicatedPG: pass on dump_recovery_info to PGBackend
-138ccbe OSD,ReplicatedPG: let PGBackend handle the temp collection
-62a1eb6 osd/: add PGBackend interfaces and stubs
-f94e6a3 ReplicatedPG: Allow get_object_context caller to provide attributes
-5b7fa62 ReplicatedPG: send_push is unused
-de4cc87 FileStore: ping tphandle between each operation within a transaction
-5f44a94 WorkQueue: add a workqueue which simply runs queued GenContexts
-179001b osd/ReplicatedPG: fix bl resize on write vs truncate race
-bd0f29a mon: OSDMonitor: do not write full_latest during trim
-6b435f5 mon: don't list "--yes-i-really-mean-it" options as required
-9d5b724 do not quote the variable to loop over
-f45675c msg/msg_types: use proper NI_MAXSERV when formatting an IP address
-5584b37 reverse the order of the mons in the init script when stopping
-ca97fae qa: update snaps workunits for allow_new_snaps flag
-9771b1d MDS: lock out snapshots until after a flag has been set in the MDSMap
-b144170 mds: properly return log replay error
-1d67aeb common/crc32c_intel_fast: fix compile-time #ifdef
-a65a867 autoconf: fix build out of tree
-fde0f86 Context: add GenContext templated on the callback argument
-3cffff2 mds/Server: fix LOOKUPSNAP
-12aa53c common/bloom_filter: move header from include/
-9df9155 common/bloom_filter: make bloom_filter encodable
-8dcdeb2 common/bloom_filter: make optimal parameter calculation static
-eda807e common/bloom_filter: make mode match formatting
-4d8f78b mon/PGMonitor: fix segfault when osdmap and pgmap stats are out of sync
-4799368 Makefile: don't use srcdir in TESTS
-7bbadf1 mailmap: add Matthew Roy, Matthew Wodrich
-c8cae87 qa/workunits/mon/crush_ops.sh: fix test
-812234c ErasureCode: get rid of extra copy when encoding
-2422b2a autoconf: remove get_command_descriptions  dependency to gtest
-04c7207 git: consolidate mails in commit logs
-ac0faaa doc: Removed service ops language and added reference to operations.
-3de3256 mon/OSDMonitor: fix 'ceph osd crush reweight ...'
-073732c doc: Refactored diagram and text.
-99c10bc doc: Updated diagrams, refactored text.
-1c12eef osd/ReplicatedPG: fix leak of RepGather on watch timeout
-1d67e15 osd/ReplicatedPG: fix leak of RepGather on large-object COPY_FROM
-afa2468 ceph_test_rados: order racing read wrt to the COPY_FROM
-3faf08f librados: add OPERATION_ORDER_READS_WRITES flag
-9322305 osd/ReplicatedPG: respect RWORDERED rados flag
-f6510c7 osd: change warn_interval_multiplier to uint32_t
-84e1f09 arch/intel: fix old comment
-366b608 arch/intel: use intel probe instructions for x86_64 only
-1bce1f0 osd: change warn_interval_multiplier to uint32_t
-4bc1818 ErasureCode: fix plugin loading threaded test
-e50343e rgw: fix rgw test to reflect usage change
-abb88d7 osd: revert 'osd max xattr size' limit
-73289b3 mds: be more careful about decoding LogEvents
-c32c51a ErasureCode: optimize padding calculation
-60e9e85 vstart: set 'mon pg min per osd'
-befdcfd mon/PGMonitor: health warn if pool has relatively high objects/pg
-a684ac8 mon/PGMonitor: health warn if pg_num != pgp_num
-dc7114e mon: warn if pg to osd ratio is too low
-97471e3 ErasureCode: coding style conformance
-bfd4db2 ceph_argparse: unit tests for validate_command config-key
-fa396d9 ceph_argparse: unit tests for validate_command osd
-c09d01c ceph_argparse: unit tests for validate_command mon
-0ff0030 ceph_argparse: unit tests for validate_command mds
-00d1504 ceph_argparse: unit tests for misc validate_command
-253e53f ceph_argparse: unit tests for validate_command auth
-d3bf39e ceph_argparse: unit tests for validate_command pg
-1d54754 pybind: ceph_argparse unit tests foundations
-f9c7bc6 pybind: catch EntityAddress missing /
-ccf2200 mon: validate mon dump epoch as a positive integer
-8f0bb2f pybind: unit tests for ceph_argparse::parse_json_funcsigs
-96067e0 .gitignore gtags(1) generated files
-c16b54f mon: get_command_descriptions support program
-e0b5697 mon: convenience function to convert commands to json
-9c9d7e6 autotools: set noinst_PROGRAMS
-ee33ff8 autotools: group test scripts in check_SCRIPTS
-ed73e0a doc: Adding context to the federated configuration guide.
-157754b common/config: include --cluster in default usage message
-362dba1 os, ceph_osd: Rename on_disk_version to target_version
-7b7e004 os: Prior version bump should have updated this
-27fb44b (origin/automake-fix-common) make: build common/secret only on linux
-8407669 os: Code conformance of os/LFNIndex.cc
-0d47bf8 os: Fix typo in comment
-c4bcb46 common: Fix get_namespace() definition in hobject_t
-1c0aecb osd: Add assert() on collection_getattr() failure instead of later decode crash
-0655cc1 tools: Fix ceph_filestore_dump usage again
-991139b doc: When bootstrapping mon set the correct caps for client.admin
-9dfac9e ErasureCode: minimum_to_decode unit tests and optimization
-9442cfa os: fix TestLFNIndex test warnings
-945eb3c mds: remove dirfrags when purging stray directory
-7be9b92 mds: avoid fetching backtrace when purging stray
-67386e4 mds: don't trim stray inode from the cache.
-0f3ba29 mds: remove unnecessary MDCache::maybe_eval_stray() calls
-cbf1f3c mds: evaluate stray when releasing inode/dentry's reference
-0a43974 (origin/automake-flags) automake: add per-target AM_CPPFLAGS
-11d8d75 makefile-env: separate cppflags and cflags usage
-2b75abb ceph_test_rados: fix COPY_FROM completion
-935eb22 ceph_test_rados: fix seq_num, improve error output
-4d0ee0b ceph_test_rados: limit max_in_flight to objects/2
-303bc68 ceph_test_rados: do not COPY_FROM self
-59ee51a osd/ReplicatedPG: handle COPY_FROM self
-5cb7b29 mon: fix wrong arg to "instructed to" status message
-9e98620 rgw: destroy get_obj handle in copy_obj()
-c28dd12 note that ceph-deploy should not be called with sudo on certain situations
-2ade5b6 doc: Updated graphic. Removed bullet points. Cleaned up RPM/YUM example.
-c55d7ac doc: Updated graphic to use same name as command line examples.
-1075443 doc: Added Recommendations and Get Involved to Intro.
-5eb4db1 doc: Removed Get Involved from Quick Start.
-af7ad1d doc: Changed title, and removed recommendations sections.
-dc19d24 doc: Moved recommendations sections to Intro.
-b1eeadd (origin/wip-6361) qa: workunits: cephtool: check if 'heap' commands are parseable
-296f2d0 osd: OSD: add 'heap' command to known osd commands array
-238fe27 mds: MDS: pass only heap profiler commands instead of the whole cmd vector
-c98b910 perfglue/heap_profiler.cc: expect args as first element on cmd vector
-e112a83 FileStore: only remove the omap entries if nlink == 1
-7c1d2de lru_map: don't use list::size()
-532e41a common/lru_map: rename tokens to entries
-ca984e3 bufferlist: don't use list::size()
-0681971 Makefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw
-9e0b5ea OpTracker: get rid of TrackedOp::received_time for the Message
-a2d633b OpTracker: demand that a TrackedOp gets to own its Message for life.
-f7f3005 OpTracker: provide a default implementation of TrackedOp::state_string
-e9bcd4c osd: use TrackedOp::get_req() instead of direct access to the request.
-ef1d62b OpTracker: include a destructor for the TrackedOp base class.
-c293465 osd: change how we work around an interface limitation.
-06e1bca OpTracker: move OpTracker pointer and some init code into TrackedOp
-a8bbb81 OpTracker: remove the references to "osd" in config variables
-3cb6abe OpTracker: move the OpTracker and OpHistory into common/TrackedOp.[h|cc]
-5fdaccd OpTracker: add an init_from_message() to the TrackedOp interface
-24c3389 OpTracker: start making the OpTracker into a generic
-0678dcd OpRequest: remove obsolete comment about ref-counting (use OpRequestRef!)
-53e17c2 osd: move pow2_hist_t out of osd_types and into include/
-16ebb25 mon: fix wrong arg to "instructed to" status message
-5c46fc4 doc: Made some changes and incorporated a draft diagram.
-5bb7417 doc: Added draft of region/zone diagram.
-bcc1680 mon: fix inverted test in osd pool create
-f3718c2 (origin/prctl-getname-test) code_env: use feature test for PR_GET_NAME support
-08fe028 rgw: use bufferlist::append() instead of bufferlist::push_back()
-fd6646f Makefile: fix unittest_arch
-5421d6d Makefile: fix unittest_crc32c
-4c9497f ErasureCode: complete plugin loader unit tests
-7324931 ErasureCode: plugin loading in progress flag
-def05f0 ErasureCode: improve API implementation example
-d8b5583 ErasureCode: proofread abstract API documentation
-c63b4ed mds: allow delay in evaluating stray
-298c39f mds: touch dentry bottom recursively
-e303b96 mds: re-integrate stray when link count >= 1
-862e0f1 mds: fix MDCache::truncate_inode_finish() journal
-9601092 os/FileStore: fix uninitialized var
-b66ac77 osdc/ObjectCacher: finish contexts after dropping object reference
-ce723b5 doc/release-notes: v0.69
-6ca6f2f (tag: v0.69) v0.69
-5541a1d doc: Updated link to Storage Cluster Quick Start.
-6af8e3c doc: Updated link to Storage Cluster Quick Start.
-b1d58fa doc: Updated link to Storage Cluster Quick Start.
-a39de7b doc: Made sysvinit and service sections parallel to upstart for clarity.
-0fed6ab doc: Updated for 3-node deployment. Leaner discussion. More use cases.
-3a3ef33 doc: Removed introductory material. Renamed the page.
-c054469 doc: Updated for 3-node deployment and multiple Linux distributions.
-31fff93 doc: Added Intro to Ceph to Index.
-fcd749f doc: Excised content from "Getting Started" and created Intro to Ceph.
-a80f831 ceph_test_rados: identify write seq_num in output
-3a00187 librados: test copy_from without src_version specified
-045b902 osd: allow a copy_from without knowing the src_version
-83f12e4 ceph_test_rados: submit a racing read with every COPY_FROM
-d050596 ceph_test_rados: use get_version64() throughout
-cdc637f osd: block requests on object during COPY_FROM
-f97277c osd: add infrastructure to block io on an obc
-df7c36a osd/ReplicatedPG: factor some bits into finish_copy
-5921703 ceph_test_rados: more readable output
-4e29e36 osd/ReplicatedPG: stage object chunks to replicas during COPY_FROM
-1f80d63 doc: Replaced code-block with inline literal to fix auto numbering.
-7d5dfa2 doc: Made s3gw.fcgi paths consistent.
-0d20cae mon: OSDMonitor: multiple rebuilt full maps per transaction
-59147be osd: compute full ratio from kb_avail
-89e8b8b ErasureCode: improve API implementation example
-3966e6e ErasureCode: proofread abstract API documentation
-971bf60 (origin/wip-buck-centos-core) Remove unneeded junit4 check
-e38bd8d Removing extraneous code
-cd6f4bc Use a loop for testing jdk paths
-3cef755 fix some comments
-ae7912f doc: Added conf example.
-e55d59f doc: Updated usage.
-0be2c87 doc: Removed --fs-type option and text.
-874186b doc: Updated the usage scenario and made a few syntax edits.
-abd2fcd ErasureCode: fix uninitialized variable warning
-81983ba mon: OSDMonitor: update latest_full while rebuilding full maps
-4ac1570 mon: OSDMonitor: smaller transactions when rebuilding full versions
-4216eac rgw: try to create log pool if doesn't exist
-b86c068 hadoop: remove hadoop shim
-e7f7483 rgw: NULL terminate buffer before parsing it
-3f8c969 (origin/fix-no-tcmalloc-build) make: add tmalloc lib dep in tcmalloc guard
-daf417f osd/ReplicatedPG.cc: Verify that recovery is truly complete
-139a714 osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active
-4633729 mon/OSDMonitor: make busy creating pgs message more explicit
-40613b7 mon/MDSMonitor: don't reset incarnation when creating newfs
-31e3a51 rgw: don't call list::size() in ObjectCache
-91375d0 common: fix Mutex, Cond no-copy declarations
-626669a rgw: drain pending requests before completing write
-25a608c osd/ReplicatedPG: allow RepGathers with no version
-155cdd2 osd: flag new/old temp objects in MOSDSubOp
-c4260fa osd/ReplicatedPG: drop unused issue_repop() arguments
-27ca5d2 osd/ReplicatedPG: drop dead code from parallelexec issue_repop
-c9885e7 osd/ReplicatedPG: generate one-off unique temp object names
-6cecd0d osd/osd_types: move coll_t::META_COLL definition
-17c5d76 os/FileStore: implement collection_move_rename
-ef7cffc os/ObjectStore: add collection_move_rename
-288bef3 rgw-admin: Adds --metadata-key option to help Signed-off-by: Christophe Courtaut <christophe.courtaut at gmail.com>
-0499948 rgw: when failing read from client, return correct error
-558d9fc osd: bind objecter messenger to cluster address
-1d1bf41 osd: name the objecter's messenger "ms_objecter" instead of "hbclient"
-14c71ea Objecter: rename cancel_op -> cancel_linger_op
-ab2506d test: update cache test since OSDs support redirects
-76c343b osd: implement basic caching policies in ReplicatedPG
-fbbe3ad Objecter: follow redirect replies from the OSD
-29133fd Objecter: write a helper function to clean up ops that need to be retried
-ac1c921 MOSDOpReply: add a redirect member
-a45612c Objecter: add an Op::target_oid, and use it when submitting Ops
-79f02d6 Objecter: rename Op::oid -> Op::base_oid
-aeec0c6 osd: create a new request_redirect_t
-c24e170 mon: fix syntax error in osd pool create args
-780954e autoconf: use $(UNITTEST_CXXFLAGS) in tests
-647188c ErasureCodeJerasure: plugin
-e9e5391 ErasureCodeJerasure: define technique Liber8tion
-63867e9 ErasureCodeJerasure: define technique BlaumRoth
-9a82010 ErasureCodeJerasure: define technique Liberation
-530fb8a ErasureCodeJerasure: define techniques CauchyOrig and CauchyGood
-b70cb93 ErasureCodeJerasure: define technique ReedSolomonRAID6
-65f1970 ErasureCodeJerasure: define technique ReedSolomonVandermonde
-c8def86 ErasureCodeJerasure: unit test common to all techniques
-454c116 mon: add key[=value] ... to osd pool create
-a786ad7 ceph-disk: make initial journal files 0 bytes
-8c76f3a crushtool: do not dump core with non-unique bucket IDs
-bde2772 doc/release-notes: v0.67.3
-c56e039 buffer: uninline, constify crc32c()
-397b4c2 osd: add empty() function to object_locator_t
-0b24be2 MOSDOpReply: more const-correctness
-82e40a7 ReplicatedPG: do not meaninglessly fill in the reqid on make_writeable() cloning
-e435468 ErasureCodeJerasure: base class for jerasure ErasureCodeInterface
-9b4048a ErasureCodeJerasure: fix jerasure compilation
-8ab29e9 ErasureCodeJerasure: import jerasure-1.2A
-661b377 os/FileStore: pass old + new object name to lfn_link
-deea63f osd: expose bytes used/avail via perf / asok
-3bc618b qa: workunits: mon: crush_ops: test 'ceph osd crush move'
-7d3799f (origin/wip-6230) mon: MonCommands: expect a CephString as 1st arg for 'osd crush move'
-132e403 autoconf: use $(LIBOSD) $(LIBCOMMON) instead of libosd.a libcommon.la
-4c5b3c7 doc: Syntax fix to suppress gitbuilder errors.
-8bf858f doc: Removed mkcephfs reference.
-494aff6 doc: Syntax fixes to suppress gitbuilder warnings.
-95c0c6c doc: Syntax fixes to suppress gitbuilder warnings.
-1e54d83 doc: Syntax fixes to suppress gitbuilder warnings.
-68659a6 doc: Syntax fixes to suppress gitbuilder warnings.
-1bb7225 doc: Syntax fixes to suppress gitbuilder warnings.
-a6a7140 doc: Syntax fixes to suppress gitbuilder warnings.
-ac609a4 doc: Syntax fixes to remove gitbuilder errors.
-3921794 ErasureCodePlugin: plugin registry tests and example
-916901f ErasureCodePlugin: plugin registry
-b61369c ErasureCodePlugin: plugin interface
-640f2f2 ErasureCode: example implementation : K=2 M=1
-95d61c1 Fix usage to include export and import --type options
-dde21bd ErasureCode: abstract interface
-ff9beb2 doc: Syntax fixes to stop gitbuilder warnings.
-9c09701 doc: Syntax fixes to stop gitbuilder warnings.
-5900b43 doc: Syntax fixes to stop gitbuilder warnings.
-99c42e1 make sure we use a version of sphinx that we can handle
-726fe73 rados: fix typo
-6949d22 automake cleanup: implementing non-recursive make
-99c6be2 automake cleanup: renaming buildtest
-417f1f2 automake cleanup: moving rados tool to tools subdir
-3daf6ea automake cleanup: moving misc tools to tools subdir
-0b267b3 automake cleanup: moving tests to test subdir
-bf6341f automake cleanup: moving code away from include to common
-bb312b6 automake cleanup: moving hobject from os to common
-09b42c0 automake cleanup: renamed inttypes.h
-7845115 automake cleanup: adding vta support to configure
-c17d134 fix: build tests need libcrc.la
-b5137ba init-radosgw*: fix status return value if radosgw isn't running
-55a5271 cleanup: state_name in NamedState init list
-1387278 rgw: fix get cors, delete cors
-39c89dc common/crc32c_intel_fast: avoid reading partial trailing word
-c3529ed cleanup: passing context to NamedState for ceph_clock
-159693d cleanup: globals from libosd
-258396d doc: Added entry for federated configuration to the index.
-da5ccf7 doc: Added draft of configuration guide for federated gateways.
-8d0a1db cleanup: reduced number of pointer indirection in osd
-5dd0a83 cleanup: removing globals from common/obj_bencher
-cf93c83 cleanup: removing refs to globals from libosd
-9c4e626 cleanup: removed last references to globals from client
-dfcee0c osd/ReplicatedPG: set reply versions for pg ops (PGLS)
-c4414a3 osd/ReplicatedPG: set reply versions on dup op ACK
-9a55129 rgw: flush pending data when completing multipart part upload
-16b24f1 librados: make note of which calls steal the bufferlist contents
-c8ec532 rgw: check object name after rebuilding it in S3 POST
-6af5a53 rgw: fix certain return status cases in CORS
-6ae4049 rgw: add COPY method to be handled by CORS
-8203b9b rgw: fix CORS rule check
-b564db8 rgw: don't handle CORS if rule not found (is NULL)
-c540798 rgw: tie CORS header response to all relevant operations
-83eb5d6 rgw: add a generic CORS response handling
-df4f712 rgw: OPTIONS request doesn't need to read object info
-77c2a33 rgw: remove use of s->bucket_cors
-3e90c2a common: unit test for crc32c
-3233336 common/crc32c_intel_fast: fix compile-time #ifdef
-cfb07f1 arch: add NEON cpu feature detection
-83a4848 doc: Updated usage for --infile syntax. Added zone name for zone syntax.
-df11247 mon/OSDMonitor: fix POOL_OP_DELETE_SNAP early return
-e95e707 doc: Organized into sections. Added zone/region and pool details.
-9f44de5 doc/release-notes: v0.68
-b05f7ea osd/ReplicatedPG: set reply versions for pg ops (PGLS)
-5148aac osd/ReplicatedPG: set reply versions on dup op ACK
-f566102 doc: remove 'Unexpected indentation' from versions doc.
-a9a516a Correct syntax for generate swift key
-ab69d99 mon: fix typo and remove redundant sentence
-7c09ede mon: fix typo in comment
-3c9f849 doc: erasure code ghobject is made of gen_t + shard_t
-b4cf0f2 (tag: v0.68) v0.68
-dcbdeaf doc: Fix repo URL for Ceph cloning (dev/generatedocs)
-996af2d ceph_test_rados: test COPY_FROM
-ed68079 osd: initial COPY_FROM (not viable for large objects)
-3a8adf5 objecter, librados: add COPY_FROM operation
-746e78c doc: Updated manual install to include sync agent, ARM packages, and DNS configuration.
-c367d6f ceph_test_rados: add missing kick for rollback
-1d1f7f1 rgw: change watch init ordering, don't distribute if can't
-087800e osd: provide better version bounds for cls_current_version and ENOENT replies
-6019558 rgw: Allow wildcard in supported keystone roles.
-f79b379 osd/ReplicatedPG: set user_version in waiting_for_commit replies
-e8506b5 osd/ReplicatedPG: do not set ctx->user_at_version unless ctx->user_modify
-99793d9 osd/ReplicatedPG: do not log a user_version on the snapdir object
-72c6c30 osd/ReplicatedPG: log previous user_version on clone
-cc8e901 osd/ReplicatedPG: do not log user_version on deletion events
-7d72e55 osd/PG: only raise PG's last_user_version if entry is >
-1610768 osd: debug user_versions a bit
-1c5e58a osdc/Objecter: fix dereference of NULL pg_pool_t
-a200e18 Validate S3 tokens against Keystone
-e48d6cb mon: fix uninitialized Op field
-a5d815d automake cleanup: uninitialized version_t
-4f6c6b2 osd/ReplicatedPG: do not requeue if not primary
-b0a30a5 osd: COPY_GET operation
-8d74f41 osd/ReplicatedPG: factor {execute,reply}_ctx() out of do_op()
-bc99437 osd: feed OSDMaps to the Objecter
-3470944 osd: add an Objecter instance
-a6b04c5 osd: discriminate based on connection messenger, not peer type
-20b25c6 ceph-osd: rename msgr vars
-a1dd98d osd: add a separate messenger for the Objecter
-ea61aba osd/ReplicatedPG: add whitespace
-0712d95 osd: less whitespace
-36d6e6f osdc/Objecter: allow ops to be canceled
-42b3d55 osdc/Objecter: only request map on startup if epoch == 0
-c6d0b10 osd, objecter: clean up assert_ver()
-8ba50c0 osd/ReplicatedPG: drop src_obc.clear() calls
-6473060 os/ObjectStore: add bufferlist variant of setattrs
-7ec0b4f unittest_lfnindex testing older HASH_INDEX_TAG
-8a65ae8 doc/rados/operations/pools: remove experimental note about pg splitting
-13aac48 workunits: add a test for caching redirects
-3516996 mon/OSDMonitor: 'osd tier {set,remove}-overlay <pool> [tierpool]'
-dae9a34 osd_types: note that write_tier wins if read_tier is different
-efb7ab2 qa/workunits/cephtool/test.sh: test osd tier CLI
-e3fb912 Objecter: respect read_tier & write_tier for initial op submission
-4e43985 mon/OSDMonitor: 'osd tier cache-mode <pool> <mode>'
-b76953c Objecter: be careful about precalculated pgids
-665acc1 Objecter: add an Op::target_oloc and use it instead of base_oloc in send_op()
-e2fcad0 Objecter: rename Op::oloc -> Op::base_oloc
-64774e5 os: LevelDBStore: ignore ENOENT files when estimating store size
-e60d4e0 ceph-post-file: use mktemp instead of tempfile
-96aaa5e ceph_test_rados: rollback bumps user_version
-42d65b0 PGLog: initialize writeout_from in PGLog constructor
-af0a0cd mon/OSDMonitor: 'osd pool tier <add|remove> <pool> <tierpool>'
-5e2c86a osd/OSDMonitor: avoid polluting pending_inc on error for 'osd pool set ...'
-ed62c45 osd_types: add pg_pool_t cache-related fields
-4f7fce5 osd/ReplicatedPG: drop dout from object_context_destructor_callback
-00b6a94 osd/ReplicatedPG: remove debug lines from snapset_context get/put
-7a7361d rgw: Fix S3 auth when using response-* query string params
-91616ce ceph.spec.in:  remove trailing paren in previous commit
-b03f241 ceph.spec.in:  Don't invoke debug_package macro on centos.
-e20d1f8 ceph_test_rados: validate user_version
-c8dcd2e osd/ReplicatedPG: set version, user_version correctly on reads
-9374dc8 messages/MOSDOpReply: fix user_version in reply (add missing braces)
-985a140 librados: add get_version64()
-7e72224 rbd.cc: propagate some errors to user-space when they're available
-b2b0f20 qa: workunits: mon: test snaps ops using rbd.
-0e85074 mon: OSDMonitor: return earlier on no-ops over currently committed state
-274b4b9 mon: OSDMonitor: don't propose on prepare_pool_op()
-fab7954 mon: OSDMonitor: check if pool is on unmanaged snaps mode on mk/rmsnap
-f808c20 PGLog: maintain writeout_from and trimmed
-fd3fd59 doc/release-notes: v0.56.6 and .7 bobtail
-c240285 mon: discover mon addrs, names during election state too
-61b40f4 doc/dev/cache-pool: document cache pool management interface
-b91c1c5 add CEPH_FEATURE_OSD_CACHEPOOL
-1c0d75d PGLog: don't maintain log_keys_debug if the config is disabled
-fe68b15 PGLog: move the log size check after the early return
-6c432f1 doc: update to describe new OSD version support as it actually exists
-c119afa ReplicatedPG: add OpContext::user_at_version
-7db71fc MOSDOpReply: stop filling in replay_version from the MOSDOp to begin with
-2c05b4f MOSDOpReply: switch to comprehensive instead of individual version setters
-de20997 MOSDOpReply: add enough fields to be backwards compatible.
-dc9d3fc osd: actually fill in user_version in pg_log_entry_t
-cc1c4a7 osd: add last_user_version to pg_info_t
-69280e2 ReplicatedPG: remove OpContext::reply_user_version
-2e764a8 osd: switch object_info_t::user_version to be a version_t
-57e346b ReplicatedPG: Fill in the MOSDOpReply's user_version
-9b998a9 ReplicatedPG: set the replay version based on the at_version
-e42ef0c Objecter: expose MOSDOp's new user_version instead of the replay_version
-ff1a573 Objecter: librados: mass switch from eversion_t to version_t
-931bf7e Objecter: rename Op::version to Op::replay_version
-17e32f9 MOSDOpReply: add user_version field
-295a84b doc: include plan for new user_version support
-1f608bd ReplicatedPG: do not do a redundant set of ctx->new_obs.oi.version
-37bba41 ReplicatedPG: remove long-dead branch
-f400816 MOSDOpReply: rename *_version() -> *_replay_version()
-7a7ae60 MOSDOpReply: rename reassert_version -> replay_version
-b5ea74c docs: document how the current OSD PG/object versions work
-37850e1 ceph.in: add to $PATH if needed regardless of LD_LIBRARY_PATH state
-3266862 doc: Updated to accurately reflect that upstart applies to a single node.
-8df504c ceph.spec.in:  radosgw package doesn't require mod_fcgi
-a10ca4b librbd: fix debug print in aio_write
-228510f cleanup: removed last references to g_conf from auth
-ea2fc85 SharedPtrRegistry: get_next must not delete while holding the lock
-14c31dd doc : erasure code developer notes updates
-af5281e common: move SharedPtrRegistry test after t.join
-c5b5ce1 osd: install admin socket commands after signals
-76a38c3 mon/DataHealthService: preserve compat of data stats dump
-f0805cb (origin/wip-6122) test/librados/cmd.cc: tolerate thrashing on pg_command tests
-d571825 WBThrottle: use fdatasync instead of fsync
-3528100 FileStore: add config option to disable the wbthrottle
-ed712c1 fix nss lib name
-378728e update the README with required RPM packages
-c6a7377 Improve warning message when there are unfound objects, but probing hasn't finished yet.
-96621bd mon: DataHealthService: monitor backing store's size and report it
-46fb86a mon: mon_types: DataStats: add 'dump(Formatter*)' method
-9a1badf mon: MonitorDBStore: rely on backing store to provide estimated store size
-41149c4 test: ceph_test_store_tool: output estimated store size on 'get-size'
-51fe5da rados-config: do not load ceph.conf
-cc3249b osd/ReplicatedPG: require write payload match length
-14a1e6e osd/ReplicatedPG: verify we have enough data for WRITE and WRITEFULL
-2031f39 ceph_rest_api.py: create own default for log_file
-83c8588 ReplicatedPG: mark stats invalid when marking unfound lost
-60abe08 ReplicatedPG: make watch timeout configurable
-7929228 osd/OSDCap: allow . for unquoted strings
-1f573c8 mon/MonCap: allow . in unquoted string
-e48ef9e librados: make safe and complete callback arguments separate
-476e490 mds: remove waiting lock before merging with neighbours
-a816060 doc: Fixed broken link by adding Transitioning to ceph-deploy to this doc.
-99a2ff7 os: make readdir_r buffers larger
-2df66d9 os: fix readdir_r buffer size
-7a091d3 os: KeyValueDB: expose interface to obtain estimated store size
-fe50103 mon/Paxos: fix another uncommitted value corner case
-0373d74 rgw: bucket meta remove don't overwrite entry point first
-f040020 ceph-disk: specify the filetype when mounting
-f404023 doc/release-notes: v0.67.2
-3a4f1ce rgw: Adds --system option help to radosgw-admin
-5637516 osd: add 'osd heartbeat min healthy ratio' tunable
-40f43a0 QA: Compile fsstress if missing on machine.
-4b97fcb QA: Compile fsstress if missing on machine.
-ab4e85d PGMonitor: pg dump_stuck should respect --format (plain works fine)
-a0f3c64 init-ceph: behave if incompletely installed
-309569a mon/MonClient: release pending outgoing messages on shutdown
-226059e MOSDOpReply: set reassert_version for very old clients
-98583b5 yasm-wrapper: more futzing to behave on fedora 19
-3d55534 rgw: fix crash when creating new zone on init
-5c5980b ceph.spec.in:  remove trailing paren in previous commit
-9b667ce ceph.spec.in:  Don't invoke debug_package macro on centos.
-02e14c7 Makefile: move all crc code into libcrc.la
-e55809a crc32c: add intel optimized crc32c implementation
-f008ac4 arch: add cpu probing
-841a695 yasm-wrapper: hide libtool insanity from yasm
-55fa2e8 mon: Monitor: remove lingering debug message from f087d84b
-157f222 doc: fix erasure code formatting warnings and errors
-d70fd35 mon/Paxos: ignore do_refresh() return value
-617dc36 enable mds rejoin with active inodes' old parent xattrs
-b419924 init-rbdmap: fix error on stop rbdmap
-9242d01 ceph-monstore-tool: shut up coverity
-123f79b store: fix issues reported by coverity
-d980f58 ReplicatedPG: create ObjectContext with SharedPtrRegistry
-bd9f73d ReplicatedPG: replace object_contexts.find with object_contexts.lookup
-95349c0 ReplicatedPG: add Context to cleanup the PG after an ObjectContext deletion
-833a225 ReplicatedPG: replace map iterators with SharedPtrRegistry::get_next
-8c74594 ReplicatedPG: remove lookup_object_context method
-13f6807 ReplicatedPG: remove reference counting logic
-ff70e76 ReplicatedPG: ObjectContext * becomes ObjectContextRef
-7e85c63 ReplicatedPG: ObjectContext is made compatible with SharedPtrRegistry
-1688fb4 ReplicatedPG: add Mutex to protect snapset_contexts
-e1be37a PG: remove unused PG::_cond
-be04918 sharedptr_registry: add a variant of get_next() and the empty() method
-8784564 objecter: fix keys of dump_linger_ops
-38a0ca6 objecter: resend unfinished lingers when osdmap is no longer paused
-d26ba3a rgw: change cache / watch-notify init sequence
-576dce0 doc: Clarified quorum requirements.
-deb43d9 doc: Fixed typo.
-bebba3c doc: fix erasure code formatting warnings and errors
-8437304 build-depend on yasm
-33783e5 crc32c: note intel crc code copyrights
-6ee1591 crc32c: add intel baseline algorithm
-552bfe5 vstart.sh: Adds more ENV variables to configure dev cluster
-2af59d5 ceph-disk: partprobe after creating journal partition
-edf2c34 .gitignore: ignore test-driver
-9833e9d fuse: fix warning when compiled against old fuse versions
-6abae35 json_spirit: remove unused typedef
-c9cdd19 gtest: add build-aux/test-driver to .gitignore
-e8e50f6 crc32c: remove old intel implementation
-a286090 common/crc32c: refactor a bit
-981eda9 mon/Paxos: always refresh after any store_state
-7e0848d mon/Paxos: return whether store_state stored anything
-b9dee22 mon/Paxos: cleanup: use do_refresh from handle_commit
-6ef1970 pybind: fix Rados.conf_parse_env test
-eca53bb mon/PGMap: OSD byte counts 4x too large (conversion to bytes overzealous)
-3a83129 erasure code : plugin, interface and glossary documentation updates
-8e53301 Do not use some compilation flag invalid for clang
-1f851cb PG: remove old log when we upgrade log version
-6eee73c ceph-fuse: fallocate appears in fuse 2.9.1, not 2.9
-1019274 client: do not mark_caps_dirty for generic fallocate
-c339456 client: guard fallocate with #ifdefs
-35b00c8 Ceph-fuse: Fallocate and punch hole support
-c2548a5 mon: add 'pg dump delta' to get just the rate info
-00080d7 PGLog: add a config to disable PGLog::check()
-2398c1b doc: Title change.
-220f7d6 osd/ReplicatedPG: remove broken AccessMode logic
-823435c examples: add a librados/hello_world program
-67a95b9 ceph: parse CEPH_ARGS environment variable
-eef7cac rados pybind: add conf_parse_env()
-9dda1cc doc/release-notes: v0.61.8
-090e4c4 filestore-config-ref.rst: mark some filestore keys as deprecated
-4e86be9 librados: synchronous commands should return on commit instead of ack
-f5636be mon: make MonMap error message about unspecified monitors less specific.
-a846294 auth-config-ref.rst: fix signature keys
-4677041 objclass: move cls_log into class_api.cc
-70790ab doc/dev/filestore-filesystem-compatibliity: remove outdated xattr notes
-2f221fe doc: Updated upgrade doc to include dumpling and incorporate ceph-deploy.
-060a463 Makefile: move objclass/*.cc to libosd.la
-8ac1af8 doc/changelog: add missing file
-d0a6ff9 os/FileStore: initialize blk_size on _detect_fs()
-ed4fe32 doc/release-notes: v0.67.1
-4fd34be mds: create only one ESubtreeMap during fs creation
-6bb7c62 doc: quickstart: be more explicit that node == mon node
-3cbf6a7 rgw: drain requests before exiting
-d08e05e ceph-post-file: single command to upload a file to cephdrop
-50cc2ef doc: Removed old mkcephfs references.
-fa10c41 doc: Removed mkcephfs references.
-31c1501 doc: Updated script for dumpling.
-16f4bd5 doc: Updated APT script for dumpling.
-e97100d doc: Removed mkcephfs references. Did a bit of clean-up work.
-211aada ReplicatedPG: add osd_recover_clone_overlap_limit to limit clones
-6f0a498 config_opts: add two ceph-rest-api-only variables for convenience
-aee053c mon: MonitorDBStore: output to derr instead of std::cout
-1c50c44 osdc/ObjectCacher: do not merge rx buffers
-b59f930 osdc/ObjectCacher: match reads with their original rx buffers
-93d8be2 osd: Add perf tracking for all states in RecoveryState
-895d531 cls/hello: hello, world rados class
-359850b osd: enforce RD, WR flags for class methods
-f61698d cls_rbd: remove old assign_bid method
-93ac92d librbd: remove mostly-useless assign_bid helper
-610dc01 osd: do not return data payload for successful writes
-681436a common/Preforker: shut up warning
-266460e ceph.in: --admin-daemon was not returning EINVAL on bad command
-12b012a PendingReleaseNotes: reflect 'osd crush set' behavior change
-249c7f2 vstart.sh: s/osd crush set/osd crush add/ as it's supposed to be
-9c624fb mon: OSDMonitor: don't expose uncommitted state on 'osd crush add/set'
-995a316 mon: OSDMonitor: document 'prepare_command' wrt expected behavior of no-ops
-88464a6 mon: OSDMonitor: don't expose uncommitted state on 'osd crush link'
-97c3a9a mon: clarify 'osd crush add' vs 'osd crush set'
-ed6233e mon/MonCap: remove useless 'osd crush add' perm from profile bootstrap-osd
-0380475 mon: AuthMonitor: fix some >80 columns debug strings
-737fe1f mon: AuthMonitor: fix whitespaces
-cf189cf mon: AuthMonitor: remove dead code
-35565ee mon: use str_join instead of std::copy
-fc23cfe config: fix stringification of config values
-ce3a094 common: add str_join helper
-e7836e6 mon/PGMap: fix typo
-3ba4dc3 Revert "config: fix stringification of config values"
-fefe0c6 config: fix stringification of config values
-9f1ad4d Document unstable nature of CephFS
-3d7a949 Renamed filestore_backend test
-5a15369 store: Add (experimental) ZFS parallel journal support
-a25d73e store: Abstract the underlying filesystem functionality
-24ec320 Ceph-qa: change the fsx.sh to support hole punching test
-086abe4 doc: Fixed typo.
-4422f21 rados.py: fix Rados() unicode checking
-34da9cb rados.py: fix Rados() backwards compatibility
-2cfcb77 mon/PGMap: degraded what?
-49ddecd mon: status: client io, recovery io prefixes
-94c3f29 OSDMonitor: add 'osd perf' command to dump recent osd perf information
-ebde89d ObjectStore: add ObjectStore::get_cur_stats and impl in FileStore
-16ed0b9 librados: fix async aio completion wakeup
-7a52e2f librados: fix locking for AioCompletionImpl refcounting
-4f31756 doc: Added dumpling to RPM installation.
-d38a041 doc: Minor tweaks to debian install.
-456a394 doc: Added dumpling installation for Debian/Ubuntu.
-dfd5854 remove racy test assertions
-90ccd26 qa/workunits/fs/multiclient_sync_read_eof.py
-95f3353 osd_types: add osd_perf_stat_t type
-d1a8165 client: add enclosing object for asok dumps
-0c23633 pybind/ceph_argparse: GPL -> LGPL2
-2206f55 rbd.cc: relicense as LGPL2
-fbc65ea mon/PGMap: make pg state indentation cleaner
-6d8d726 mon: status: only include mdsmap if epoch > 1
-a9033eb mon: move recovery rate to a separate line
-c926d08 mon: move mdsmap up
-eeed33a mon/PGMap: make si modifiers look prettier
-ef9c991 mon: make pg info in 'status' more informative and visually parseable
-9b94f90 types: pretty_si_t
-1860ed9 mon/PGMap: break out print_oneline_summary
-054fd88 mon: expand osd summary (flags on separate line)
-f417b10 osdmap: move oneliner summary to separate function
-6f5d803 librados: fix MWatchNotify leak
-810c52d rgw: do not leak handler in get_handler() error path
-e3b7bc5 (tag: v0.67) v0.67
-977b7f5 doc/release-notes: fix rst
-f501ec7 doc/release-notes: upgrade sequence
-de7bbdb doc/release-notes: roll-up of upgrade/compat notes from cuttlefish to dumpling
-6df75da init-rbdmap: minor fix no rbd exist
-d9cb2ea init-rbdmap: fix for recursive umount
-c927f89 rgw: rgw-admin throw an error when invalid flag is passed
-b9a5664 Makefile.am: fix libglobal.la races
-c81edf1 tools: ceph-monstore-tool: allow copying store contents to a new location
-2632846 rgw: fix multi delete
-c566c03 doc: complete S3 features status from existing doc page
-ef91c69 mon: mon_cluster_log_file_level
-cb50b5a ceph-disk: fix mount options passed to move_mount
-b66a3d6 config_opts.h: reduce osd_recovery_max_active and osd_recovery_max_single_start
-b221a42 doc/release-notes: adjust whitespace
-bec6f09 doc/release-notes: v0.67 release notes
-44b093c ceph: retry new-style mon command if we get EINVAL from the old-style command
-7ed6de9 common: pick_addresses: fix bug with observer class that triggered #5205
-8bf3971 rearrange the documentation to be inserted and maintained in master
-068baae rgw: return 423 Locked response when failing to lock object
-9029555 rgw: make RGWHTTPClient callback methods pure virtual
-71177fe rgw: rename read_header() to receive_header() where needed
-1563613 rgw: rename data receive callbacks in swift token revocation
-eade36d PendingReleaseNotes: note 'ceph daemon ...' argument behavior change
-e1666d0 Fix compilation -Wmismatched-tags warnings
-5082fec doc: Add a page about rgw S3 API compliance
-fd06261 ant is missing from the list of packages to install
-980a073 document the write / read path for erasure encoding
-0aacd10 RadosClient: shutdown monclient after dropping lock
-ca3987f mds: notify clients about deleted inode
-b2515b9 buffer: change #include order
-6cbe0f0 make sure we are using the mount options
-34831d0 make sure we are using the mount options
-fd19235 ceph.in: return EINVAL on daemon command error
-0be1475 ceph.in: Re-enable ceph interactive mode (missing its output).
-2e28087 mon: fix 'osd crush rule rm ...' dup arg
-0c1fd62 qa/workunits/cephtool/test.sh: test set/unset of all osd flags
-298e7d8 mon/MonCommands: fix typo nobackfile -> nobackfill
-afa21e8 Add back the mistakenly removed "ceph osd set noscrub/nodeep-scrub"
-6820390 OSD: suspend timeout on process_peering_events pg lock
-da69756 test: mon: moncap: add 'allow command foo with arg="bar.baz"' tests
-258135b qa: workunits: mon: workunit to stress the monitor's caps
-5c6dc1c mon: AuthMonitor: change 'auth add' behaviour
-94002c4 mon: drop old _allowed_command()
-612444a mon: services: no longer needed to enforce caps on a per-service basis
-2071af2 mon: Monitor: purge old permission checking format on handle_command()
-f087d84 mon: Monitor: check caps considering command's requirements
-944f3b7 OSD: only start osd_recovery_max_single_start at once
-8b53a14 ReplicatedPG: ping tphandle between pushes
-d0cbdde ReplicatedPG: ping TPHandle during scan_range
-95b3604 OSD: also suspend timeout while grabbing recovery_tp lock
-321f57d OpRequest: don't warn as quickly for slow recovery ops
-0017010 mon, osd: Clean up "flush(stringstream)" continued
-e904018 mon, osd: Clean up "flush(stringstream); bl.append(stringstream.str())
-2e9c25f doc: fixing reported bug in CRUSH map example.
-cafccfa doc: Added many new fields to config reference.
-a5d8605 doc: Added trouble shooting entry. Fixed formatting.
-e3d59a2 doc: Nomenclature update.
-1db0f25 doc: Nomenclature update.
-a38ab07 doc: Nomenclature update.
-0f56e3e doc: Nomenclature update.
-ea80532 doc: Nomenclature update. Added topic for monitor key caps. Added default pool steps.
-db27c3f qa/workunits/cephtool/test.sh: add tests for 'pg dump ...'
-42582f0 mon/PGMonitor: add 'pg dump pgs_brief' subcommand
-a092995 mds: fix locking, use-after-free/race in handle_accept
-9e88b1b rgw: only log (as in ops logging) certain operations
-b165d33 rgw_admin: flush replicalog entries
-6dd4ff8 cephtool/test.sh, rest/test.py: add tell command tests
-28d58eb ceph.in, ceph_rest_api.py: import only used syms from ceph_argparse.py
-55095d5 cephtool/test.sh: add a few tests for invalid command args
-71ff794 ceph_argparse.py: add stderr note if nonrequired param is invalid
-9466a0b Fix "too few args validate"
-1cd6e2e fix invalid cluster naming in example
-0304dfb Add links to OSD internals related tracker items.
-0d1040d Add links to scrub related tracker items.
-349e7900 Add links to peering related tracker items.
-4236147 Add links to recovery related tracker items.
-1286288 Add links to backfill related tracker items.
-160fa71 fix typo
-ac6f3b7 M+K means M data + K parity and implies M chunks necessary to recover
-0c22dad mds: don't issue caps while session is stale
-8f67adf mds: change LOCK_SCAN to unstable state
-f86828d mds: handle "state == LOCK_LOCK_XLOCK" when cancelling xlock
-63a21b4 mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking()
-3c3b2ce mds: revoke GSHARED cap when finishing xlock
-7555819 mds: fix cap revoke confirmation
-e5d9ac6 qa/workunits/cephtool/test_daemon.sh: we should error on bad command
-9e7d6d5 PG: set !flushed in Reset()
-826478c dev/osd_internals,src/osd: add erasure_coding.rst and PGBackend.h
-ae15381 rgw: only fetch cors info when needed
-b139a7c rgw: don't read cors attrs if there's no bucket in operation
-43c2712 rgw: rename sync-type to update-type
-bbac69c rgw: only check version if meta object exists
-6256d68 Add the definition of PG temp to the glossary
-caaaf2c ceph.spec.in: merge back JUnit handling from SUSE spec
-cbf3a11 ceph.spec.in: move junit BuildRequires to the cephfs-java subpackage
-4a95796 ceph.spec.in: use snappy-devel only on RHEL derivatives
-17b460c ceph.spec.in: add missing buildrequires for Fedora
-ef20542 Fix for Swift key command
-c70e59e mon/MDSMonitor: don't call all EINVALs "unrecognized command"
-c9e8ff2 rest/test.py: retry mds setmap in case epoch has changed
-dc1d95d rest/test.py: expect_nofail() to allow examination of reason
-4a6eff8 Verify that deleting op never in check_latest_map_ops map
-600e6ac osdc: op left in check_lastest_map_ops
-175feb9 rgw_rados.cc: fix invalid iterator comparison
-b4ed4e2 qa/workunits/cephtool/test_daemon.sh: sudo
-d651658 osdc: Add asserts that client_lock is held
-5bd061c test: Fix valgrind found "Mismatched free() / delete / delete []"
-c48644d qa: Add workunit that hangs for manual thrasher testing
-00dc634 ceph: developer mode: set PATH, too
-e70e08c cephtool/test.sh: add tests for mon daemon command
-47d0d64 Make all AdminSocket commands use argparse/cmdmap.
-736d6a1 rgw: fix set_buckets_enabled(), set_bucket_owner()
-0e125e0 Objecter: set c->session to NULL if acting is empty
-16adb91 (tag: v0.67-rc3) v0.67-rc3
-e747fa8 Revert "Use dh_installinit to install upstart job files"
-ebab04e mon: add missing state name
-b8af38b mon: allow others to sync from us across bootstrap calls
-634dcf3 mon: drop useless sync_reset() calls
-f7d1902 mon/Paxos: be more vocal about calling elections
-eb6e6da rgw: keep a region connection map
-f10c2e7 rgw: cors subresource needs to be in canonical auth header
-b5e7448 rgw: set bucket attrs are a bucket instance meta operation
-68730d8 rgw: track bucket instance oid
-acd16d1 rgw: read / write bucket attributes from bucket instance
-f3eda63 mon/PGMonitor: fix 'pg dump_[pools_]json'
-099ac51 mon: fix xml element name
-ee9f04c check_new_interval must compare old acting with old osdmap
-1f13d8a OSD: suspend tp timeout while taking pg lock in OpWQ
-f1bd4e5 WorkQueue: fix bracing on reset_tp_timeout
-a6cd9fe osd: get initial full map after a map gap
-e24b502 osd: fix off-by-one in map gap logic
-251a6a4 Use dh_installinit to install upstart job files
-b62845e doc/changelog/v0.61.7
-a46f60a doc/dev/repo-lab-access: notes
-12c1f11 ceph_test_rados: print version banner on startup
-74c1bec ceph-authtool: fix cli tests
-7b683f7 test/system/*: parse CEPH_ARGS environment
-347b5a2 ceph-authtool.8: add missing commands to man page
-86b2632 ceph_authtool.cc: update help/usage text
-4b6c569 mon/DataHealthService: do not name xml key after mon
-6881ab3 debian, rpm: make python-ceph depend on python-requests
-2ec480b replace in_method_t with a counter
-6b16cd1 unit tests for sharedptr_registry
-09ee092 pybind/rbd.py: remove unused import of 'pointer'
-2460118 cephfs.py: remove unused imports
-865d5e9 rados.py: fix bad indentation
-6eadb87 ceph_argparse.py: add missing spaces after comma
-da4d23e ceph_argparse.py: remove unnecessary semicolons
-a48b391 ceph_rest_api.py: fix bad indentation
-2594831 rgw: fix leak of RGWDataChangesLog::renew_thread
-a313563 rgw: free resolver on shutdown
-59b13ce rgw: fix up signal handling
-bd0e35f test/admin_socket: fix admin_socket unit tests
-9486536 rgw: fix RGWFormatter_Plain
-535d870 common/admin_socket: do not populate empty help strings
-b4bde3c common/perf_counters: fix unit tests
-2aa9afa common/perf_counters: fix missing decimal in time, quoting
-a8c1a2a common/Formatter: add dump_format_unquoted()
-0041e9f rados.py: missing parameter to make_ex()
-8af4775 ceph-rest-api: clean up options/environment
-629326a qa/fs/.gitignore
-803a1fd ceph_test_admin_socket: fix unit test
-a419354 message: Fix asserts that dont' trigger
-a9ca623 librados: EINVAL on a negative osd id
-3f93691 ceph.in: make osdids() (and mon, mds) work on old mons
-4b73900 osd: humor coverity
-323bdaa mon/MonCap: mds needs to subscribe to the osdmap
-14a3e2d remove unused fiemap code
-6faf8b6 PendingReleaseNotes: note on 'ceph tell <pgid> ...'
-aa00ace ceph_rest_api.py: cleanup, more docstrings, unused vars
-d75b6ea ceph_argparse.py: make find_cmd_target handle tell <pgid>
-8985e1c ceph_argparse, mon: make "tell <pgid>" work (duplicating "pg <pgid>")
-7b42dee ceph_rest_api.py: obtain and handle tell <osd-or-pgid> commands
-6ac8aed mon/PGMonitor: reset in-core PGMap if on-disk format changes
-de51aac rgw/rgw_metadata.cc: delete md_log (RGWMetadataLog) in destructor
-a45e296 rgw/rgw_rest_log.cc: free 'handle' to prevent memory leak
-94cefc7 test_cls_log.cc: fix resource leak, delete 'rop'
-87f8e8f test_cls_log.cc: remove empty lines
-44f43ff test_cls_statelog.cc: fix memory leak, delete 'rop'
-143b843 test_cls_version.cc: close some memory leaks
-a90a2b4 upstart: stop ceph-create-keys when the monitor stops
-6f99622 osd: make open classes on start optional
-c24e652 osd: load all classes on startup
-bcbb807 PG: add formatted output to pg <pgid> query, list_missing
-6e6ceff OSD: "tell <osd.n>" version, bench, dump_pg_recovery_stats: formatted
-c9fcda8 OSD: provide newer command descs with module/perm/avail
-cd16d73 ceph.in: clean up help, fix partial matching on all help
-cb38762 ceph.in: admin_socket() now validates command and passes format
-67eb7de ceph_argparse.py, ceph.in: validate_command: stop handling format
-ba6ca58 In general, flush in caller of dump worker rather than worker
-c562b72 FileStore: fix fd leak in _check_global_replay_guard
-1e991ed add condrestart to the sysvinit script
-c7c4c23 Formatter, admin_socket: make default formatter be json-pretty
-3f598e8 AdminSocket users: use generic formatting
-4aeb73a ceph_rest_api.py: reversed test for failed request
-47d0937 rest/test.py: earlier versions of requests.py don't quote ' ' in params
-6951d23 OSD: tolerate holes in stored maps
-fbf74d9 ceph_rest_api.py: return error in nonformatted mode
-8b3d7a1 ceph_rest_api.py: actually remove the trailing / on baseurl
-dfabc61 mon/MonCap: match param for entity (not name)
-ca8ac95 mon: translate caps=[k1,v1,k2,v2] into [caps_k1=v1, caps_k2=v2]
-05b6c7e mon/Paxos: share uncommitted value when leader is/was behind
-063c71f rgw: expose the version of synced items to the poster
-81b62b5 rgw: return the update status on sync requests
-8ffc4ca rgw: add sync state parsing code and REST interface
-18eabd3 rgw: pass the sync mode into the RGWMetadataManager::put() calls.
-4f9855e rgw: add preliminary support for sync update policies on metadata sync
-176aa39 remove old push_to_kclient.pl
-ebb9ace ceph-disk: use new dumpling-style osd caps if we can, or fall back to old-style ones
-b46fb62 osd: Don't put functional code inside of an assert
-27a0b86 ceph_argparse.py: wrong variable used if valid() fails for Ceph{Osd}Name
-f653aa5 config_opts.h: increase xfs,btrfs wbthrottle defaults
-78214af doc/release-notes: v0.61.7
-870c474 FileStore::_collection_rename: fix global replay guard
-0dc3efd HashIndex: reset attr upon split or merge completion
-37a4c4a test/filestore/store_test: add test for 5723
-cb3ee1e rgw/rgw_metadata.h: init prefix in initialization list
-6bc0d04 test_rgw_admin_log.cc: remove unused variable 'creds'
-dda1014 test_rgw_admin_log.cc: use static_cast<>() instead of C-Style cast
-8f45a73 test_rgw_admin_opstate.cc: remove unused variable 'creds'
-e4dfe8a test_rgw_admin_meta.cc: remove unused variable 'creds'
-9d4c42f test_rgw_admin_opstate.cc: use static_cast<>() instead of C-Style cast
-4c778e2 test_rgw_admin_meta.cc: use static_cast<>() instead of C-Style cast
-a8b70f0 doc/release-notes: v0.67-rc2
-41930b5 ceph.spec.in, debian/control: python-ceph depends on python-flask
-0018b45 (tag: v0.67-rc2) v0.67-rc2
-fe2019c rest/test.py: cope with older requests.py versions
-fd1fd66 ceph-disk: use new get_dev_path helper for list
-0b8cad1 ceph_rest_api.py: allow config section fallback
-d7df620 global/signal_handler: poll on the control pipe, too
-085f129 ceph.in: remove dead code
-1579c34 rest/test.py: osd lspools should be a 'GET'
-e839420 MonCommands.h: osd pool delete "rw" perms, osd pool set no longer exp
-9285506 ceph.in/ceph_argparse.py: move find_cmd_target() to ceph_argparse.py
-c2131d4 mon/OSDMonitor: search for latest full osdmap if record version is missing
-a055988 rgw/rgw_metadata.h: init cur_shard in LogListCtx with 0
-ebff1eb rgw/rgw_metadata.cc: fix possible null dereferencing
-6e6ef01 os/ObjectStore.cc: don't fallthrough after OP_OMAP_RMKEYRANGE
-27e38e4 mon/Monitor.cc: init scrub_version with 0 in constructor
-a7a7d3f test: test_store_tool: global init before using LevelDBStore
-76cd7ac mon: OSDMonitor: fix a bug introduced on 97462a32
-1cdb3ec configure.ac:  Remove -rc suffix from the configure version number.
-c8d66b7 Remove fuse-utils from Recommends in debian/control
-b7c40ec configure.ac:  Set version number to match git describe.
-4444c94 doc/release-notes: v0.61.6
-8e4a78f global/signal_handler: use poll(2) instead of select(2)
-4183b74 mon/MonmapMonitor: make 'mon remove ...' idempotent
-2338a32 client: signal mds sessions with Contexts instead of Conds
-3207542 client: add Context*-based wait_on_list/signal_context_list helpers
-612a9b3 mon: add quorum_names to quorum_status command output
-9a7a055 ceph-fuse: disable getgroups_cb
-2c87d9f mon: PGMap dump shouldn't use strings containing '+' as tags
-96551f9 mon: "status" is missing a close_section for the overall output
-3dcfe38 mon: "osd stat" needs a flush now that osdmap.print_summary() doesn't
-e4d0eee mon: "mds stat" must open/close section around dump_info
-3a69fd0 ceph.spec.in: obsolete ceph-libs only on the affected distro
-e807770 mon/OSDMonitor: fix base case for 7fb3804fb workaround
-e536d66 ceph.spec.in: obsolete ceph-libs only on the affected distro
-8814265 Enable libs3 support for debian packages
-97462a3 mon: OSDMonitor: work around a full version bug introduced in 7fb3804fb
-bc8d62f mon: OSDMonitor: get rid of encode_full() as we don't use it.
-a815547 mon: OSDMonitor: update the osdmap's latest_full with the new full version
-f46e8b9 doc/release-notes: v0.67-rc1
-7b3b989 qa/workunits/suites/fsync-tester.sh: lsof at end
-3f31540 qa/workunits/rest/test: cluster_down/up are now idempotent
-88f4a96 log: remove unused lock
-093182b osd/ReplicatedPG: drop repop refs in ~SnapTrimmer
-6582b31 FileStore: disable fd cacher and wbthrottle during replay
-2fd4421 PGLog::merge_log, unidex() only works from tail, we index() below anyway
-6957dbc PGLog::rewind_divergent_log: unindex only works from tail, index() instead
-046d5cb src/test/osd/TestPGLog.cc: check that the object remains in log.objects
-1ecdb14 rgw: swift, in create bucket set location_constraints
-8a2eb18 rgw: translate swift request to s3 when forwarding
-165b0d0 PendingReleaseNotes: update about new rgw copy obj response
-9f05db6 rgw: add some comments
-c5025d4 rgw: dump progress through swift object copy
-6094685 rgw: send data back when copying object
-cfe1395 mon/Paxos: add failure injection points
-20baf66 mon/Paxos: fix pn for uncommitted value during collect/last phase
-19b2978 mon/Paxos: debug ignored uncommitted values
-b3253a4 mon/Paxos: only learn uncommitted value if it is in the future
-b26b7f6 mon/Paxos: only share uncommitted value if it is next
-99e6054 mon/Paxos: accepted_pn_from has no semantic meaning
-a61635e ceph-monstore-tool: dump paxos transactions
-e60d14d ceph.in: reject --admin-daemon so it can't do harm
-835dd97 (tag: v0.67-rc1) v0.67-rc1
-58c78db FileJournal: fix posix_fallocate error handling
-0897d3a OSD::_make_pg: use createmap, not osdmap
-2dbb273 src/*: make Context::finish private and switch all users to use complete
-d28c18d OSD::RemoveWQ: do not apply_transaction while blocking _try_resurrect_pg
-6c4cd22 FileStore: use complete() instead of finish() and delete
-9f591a6 Finisher: use complete() not finish() and delete
-8536ff9 common/Cond.h: add a simpler C_SaferCond Context
-20bc09c rgw: read attributes when reading bucket entry point
-eabf2f6 ceph.spec.in:  Obsolete ceph-libs
-db2850c test_cls_statelog.cc: fix resource leak, delete 'rop' at end of function
-5f4f87b test_cls_statelog.cc: fix resource leak, delete op at end of function
-fc1c1c6 test_cls_statelog.cc: fix resource leak, delete rop at end of function
-8e8596d test_cls_version.cc: fix resource leak, delete before new()
-3e94393 test_cls_version.cc: fix resource leak, delete before new()
-d3782d8 test_cls_version.cc: fix another ressource leak
-c35eeae test_cls_version.cc: fix ressource leak
-637e106 cls/rgw/cls_rgw.cc: init start_key_added with false
-3846bf2 fuse: fix fuse_getgroups detection
-6402e46 doc: Fixed formatting errors.
-eb03e9d doc: Updated RPM documentation with additional details.
-617b3f7 cls_replica_log_types.h: pass const std::list<> by reference
-6319823 mon/PGMonitor.cc: reduce scope of local 'num_slow_osds' variable
-cf29d17 rgw/rgw_bucket.cc: use static_cast<>() instead of C-Style cast
-d181aaa test_cls_version.cc: don't free object twice, free the right one
-11c51e8 rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style cast
-e910421 rgw: change RGWOp::name() to return string instead of char*
-c3acc25 mon, mds, osd: add early SIGTERM injection
-7e25fec mds: put g_ceph_context on shutdown
-1fd01e3 mon: shutdown: remove sessions under mon->lock
-ba5e357 mds: reorder suicide/shutdown a bit
-318f3df mds: install signal handlers after init
-868b486 mon: install signal handlers after init
-b084a38 osd: do not assume we have an osdmap in prepare_to_stop
-61a298c osd: install async signal handlers after init()
-3dec530 qa/workunits/mon/caps.sh: clean up users; rename
-675d783 mon/MonCap: simplify rwx match logic
-f79d965 mon: fix command caps check
-fb21504 qa: workunits: mon: test mon caps permissions
-0356eeb mon/PaxosService: update on_active() docs to clarify calling rules
-6d326b8 mon/OSDMonitor: discard failure waiters, info on shutdown
-8371680 mon: OSDMonitor: only thrash and propose if we are the leader
-e4f2e3e mon/OSDMonitor: do not wait for readable in send_latest()
-6edec51 Revert "mon/OSDMonitor: send_to_waiting() in on_active()"
-2795eb1 Revert "mon: OSDMonitor: only thrash and propose if we are the leader"
-0a99649 Revert "mon/OSDMonitor: fix typo"
-8c5e1db ceph_rest_api.py: remove unused imports
-ce46961 ceph.in: better error message when daemon command returns nothing
-06ae53e mon: improve osdmap subscription debug output
-934ad88 rgw: grab the old mtime when doing a user metadata put
-f4675dc test: switch the cls_replica_log tests to use a test fixture
-da8584f rgw: remove extra unused param from RGWRados::get_attr()
-d44082e cls_rgw: quiet down verbose log message
-4e05786 rgw: replace logic that compares regions
-e4d2787 rgw-admin: link / unlink should report errors
-0024e5a rgw: fix time parsing in replica log
-7cd0bd8 rgw: bucket entry point object ver fixes
-89ecba2 rgw: remove s->objv_tracker
-85f3f09 rgw: forward delete bucket request to master after removal
-989a4d9 rgw: adjust error for bucket removal on secondary region
-2e51823 rgw: forward x_amz_meta headers when forwarding a request
-4f4bdbd rgw: fix bucket re-creation on secondary region
-0de7085 mon/MonClient: fix small leak
-d1b83be msgr: mark addr-based [lazy_]send_message and get_connection deprecated
-11c47cc client: mark_down by con
-000d4d3 mon: mark_down session by con, not addr
-30de040 mon: break con <-> session ref cycle in mon even if shutting down
-564075c msg/SimpleMessenger: remove duplicated interface docs
-27868ca msgr: update docs for mark_down, mark_down_all semantics
-8dcf0b1 msgr: generate reset event on mark_down to addr (not con)
-bfadcd2 osd/ReplicatedPG: fix obc leak on invalid LIST_SNAPS op
-561ac0b osd: break con <-> session cycle when marking down old peers
-41c67e0 osd: make ms_handle_reset debug more useful
-6ebb486 doc: Update syntax for rbd children
-8574b3c mon/PGMap: don't mangle stamp_delta in clear_delta()
-99fa208 osd: log PG state changes at level 5
-c549e62 mon/PGMap: avoid negative pg stats when calculating rates
-9292c18 mon/PGMap: use signed values for calculated rates
-47516d9 ReplicatedPG: track temp collection contents, clear during on_change
-9f56a7b PG, ReplicatedPG: pass a transaction down to ReplicatedPG::on_change
-2e09b6e osd: add floor() method to pg/osd stat structs
-b4db588 osd: make pool_stat_t *log_size fields signed
-4bf4d92 doc: radosgw needs 'mon = allow rw' to create its own pools
-d3e53cd mon/MonClient: better debugging on version requests
-c4d4f34 doc/release-notes: fix typo
-053659d msg/Pipe: work around incorrect features reported by earlier versions
-f0feabe Message,OSD,PG: make Connection::features private
-d1b47f4 test: update cli test for radosgw-admin
-76040d9 rgw: Adds --rgw-zone --rgw-region help text.
-1b8d50e doc/release-notes: amend 0.61.5 release notes
-c9ba933 mon/MonClient: fix small leak
-4ed7942 init-ceph: don't activate-all for vstart clusters
-f9e9f9c mon/PGMonitor: fix 'pg map' output key names
-9ab539e PG: add perf counter for peering latency
-fd53d53 msgr: mark addr-based [lazy_]send_message and get_connection deprecated
-8ff7d53 client: mark_down by con
-e0067a8 mon: mark_down session by con, not addr
-3c81475 mon: break con <-> session ref cycle in mon even if shutting down
-f7d0403 msg/SimpleMessenger: remove duplicated interface docs
-5e72417 msgr: update docs for mark_down, mark_down_all semantics
-e1e0d50 msgr: generate reset event on mark_down to addr (not con)
-c522634 osd/ReplicatedPG: fix obc leak on invalid LIST_SNAPS op
-d3748b2 osd: break con <-> session cycle when marking down old peers
-2428bfd osd: make ms_handle_reset debug more useful
-921a4aa cls_lock: fix duration test
-dd0246d mds: tracedn should be NULL for LOOKUPINO/LOOKUPHASH reply
-f3f92fe FileStore: add global replay guard for split, collection_rename
-723d691 msg/Pipe: do not hold pipe_lock for verify_authorizer()
-a59493e doc/release-notes: add/fix changelog links
-d21d39e doc/release-notes: v0.61.5
-29c0252 mon: fix off-by-one in check for when sync falls behind
-07dfb6f rgw: drop unused assignment
-aa460c4 mon: make 'health' warn about slow requests
-82722ef osd: include op queue age histogram in osd_stat_t
-2e216b5 qa/workunits/cephtool/test.sh: test 'osd create <uuid>'
-b41f1ba PG: start flush on primary only after we process the master log
-278c7b5 ReplicatedPG: replace clean_up_local with a debug check
-1a84411 msgr: fix a typo/goto-cross from dd4addef2d
-57bd6fd osd: make 'from dead osd' message more informative
-16568d9 msg/Pipe: a bit of additional debug output
-ecab4bb msg/Pipe: hold pipe_lock during important parts of accept()
-687fe88 msgr: close accepting_pipes from mark_down_all()
-dd4adde msgr: maintain list of accepting pipes
-994e2bf msgr: adjust nonce on rebind()
-07a0860 msgr: mark_down_all() after, not before, rebind
-ad548e7 msg/Pipe: unlock msgr->lock earlier in accept()
-9f1c272 msg/Pipe: avoid creating empty out_q entry
-579d858 msg/Pipe: assert lock is held in various helpers
-0ebf23c ceph_mon: obtain backup monmap if store is marked with 'force_sync'
-d150193 mon/OSDMonitor: make 'osd pool mksnap ...' not expose uncommitted state
-56c5b83 qa/workunits/cephtest/test.sh: put 'osd ls' before any 'osd create' tests
-ad9a104 mon: MonCommands: remove obsolete 'sync status' command
-884fa2f OSD::_try_resurrect_pg: fix cur/pgid confusion
-7e16b72 mon/AuthMonitor: make 'auth del ...' idempotent
-f129d17 qa/workunits/cephtool/test.sh: mds cluster_down/up are idempotent
-f2fa01e ceph: send successful commands twice with CEPH_CLI_TEST_DUP_COMMAND
-d45429b mon/MDSMonitor: make 'mds cluster_{up,down}' idempotent
-9c4a030 osdmaptool: fix cli tests
-2ea8fac ceph-disk: use /sys/block to determine partition device names
-5b031e1 ceph-disk: reimplement is_partition() using /sys/block
-3359aae ceph-disk: use get_dev_name() helper throughout
-35d3f2d ceph-disk: refactor list_[all_]partitions
-e040159 ceph-disk: add get_dev_name, path helpers
-d656aed mon/OSDMonitor: fix typo
-d90683f osd/OSDMonitor: make 'osd pool rmsnap ...' not racy/crashy
-1999fa2 ObjectStore: add omap_rmkeyrange to dump
-44c3917 OSD: add perfcounter tracking messages delayed pending a map
-d9e0e78 FileStore: add a perf counter for time spent acquiring op queue throttle
-4d9d0ff mon/OSDMonitor: return error if we can't set the new bucket's name
-466d0f5 crush: return EINVAL on invalid name from {insert,update,create_or_move}_item, set_item_name
-93fc07c crush: add is_valid_crush_name() helper
-5eac387 mon: OSDMonitor: only thrash and propose if we are the leader
-b19ec57 mon/MDSMonitor: make 'ceph mds remove_data_pool ...' idempotent
-ba28c7c mon/OSDMonitor: clean up waiting_for_map messages on shutdown
-f06a124 mon/OSDMonitor: send_to_waiting() in on_active()
-72d4351 rgw: quiet down ECANCELED on put_obj_meta()
-acbc2f0 osd: do not enable HASHPSPOOL pool feature by default
-64379e7 ceph-disk: rely on /dev/disk/by-partuuid instead of special-casing journal symlinks
-3706dbb PendingReleaseNotes: formatted ceph CLI output and ceph-rest-api
-ad1392f mon: Monitor: StoreConverter: clearer debug message on 'needs_conversion()'
-e752c40 mon: Monitor: StoreConverter: sanitize 'store' pointer on init
-036e673 mon: Monitor: do not reopen MonitorDBStore during conversion
-d873c29 rgw/rgw_rest_s3.cc: fix dereferencing after deallocation
-e45a9bb rgw/rgw_op.cc: reduce scope of local 'ret' integer variable
-c484150 rgw/rgw_rados.cc: use static_cast instead of C-Style cast
-cc49d3f rgw/rgw_rest.cc: fix malloc memory leak
-7a2e8a6 rgw/rgw_bucket.cc: return result of function calls
-7769b01 rgw_bucket.cc: don't return bool if return value is int
-64b512c rgw/rgw_bucket.cc: remove unused local variable
-a937a12 rgw_admin.cc: fix same expression on both sides of '||'
-5ea4c5e cls_rgw_client.cc: reduce scope of local variable
-408014e rgw: handle ENOENT when listing bucket metadata entries
-eef4458 rgw: fix bucket placement assignment
-39e5a2a OSD: add config option for peering_wq batch size
-b46930c mon: make report pure json
-daf7672 ceph: drop --threshold hack for 'pg dump_stuck'
-4282971 msg/Pipe: be a bit more explicit about encoding outgoing messages
-314cf04 messages/MClientReconnect: clear data when encoding
-34f76bd mon: set forwarded message recv stamp
-eac559f mon: drop win_election() _reset() kludge and strengthen assertions
-c67d50b mon: set peon state to electing if other mons call an election
-3ea984c mon: once sync full is chosen, make sure we don't change our mind
-1fc85ac mon/PaxosService: consolidate resetting in restart()
-7666c33 mon/PaxosService: assert not proposing in propose_pending
-c711203 mon/Paxos: separate proposal commit from the end of the round
-5c31010 mon/Paxos: make all handle_accept paths go via out label
-f1ce8d7 mon: fix scrub vs paxos race: refresh on commit, not round completion
-a722fb7 rgw: fix bucket instance json encoding
-346d9f4 rgw_admin: fix gc list encoding
-55ff523 doc: Fixed link in Calxeda repo instruction.
-aa60f94 mon: once sync full is chosen, make sure we don't change our mind
-6d3e13f rgw: fix more warnings
-1dfd06d test_rgw: fix a number of unsigned/signed comparison warnings
-01ec4f1 rgw: Fix typo in rgw_user.cc
-fe13f88 doc: Modifies keyring path in radosgw config page.
-cf9571c test_rgw_admin_meta: fix warnings
-bc3088c cls_rgw: fix warning
-6ef48c7 doc: update Hadoop docs with plugin download
-a805958 doc: document new hadoop config options
-9baa668 Makefile: cls_rgw needs cls_rgw_types linked in now too
-6b7d9f2 mon: include some (basic) auth info in report
-56c36fa mon: include paxos info in report
-bf7c402 mon: move quorum out of monmap
-89ced1c mon: include service first_committed in report
-629a9d7 Use mon_host instead of mon_addr in ceph_conf
-9ca4733 hypertable recent version prototyping includes bool verify in length and read functions
-df45b16 Makefile: build cls_rgw even if we're not building radosgw
-35ef873 Makefile: fix cls_rgw linkage
-cda17fd Makefile: fix cls_refcount linkage
-8d9165a qa/workunits/rbd/simple_big: fix unmap
-15e3c9a qa/workunits/fs/test_o_trunc.sh: fix path
-efe5b67 mon/Paxos: bootstrap peon too if monmap updates
-d4876c5 mon/PaxosService: do not prepare new pending if still proposing
-f37c36e mon/PaxosService: remove redundant check
-bf4f802 mon/PaxosService: fix trim completion
-0d66c9e MonCommands.h: use new validation for crush names (CephString goodchars)
-741757a ceph_argparse.py: allow valid char RE arg to CephString
-089dfe8 ceph_argparse: ignore prefix mismatches, but quit if non-prefix
-da4c749 ceph_argparse.py: validate's 3rd arg is not verbose, it's partial
-cc10988 ceph-rest-api: separate into module and front-end for WSGI deploy
-495ee10 msg/Pipe: fix RECONNECT_SEQ behavior
-48a2959 mon: make ancestor arg for 'osd crush rm|remove <name>' optional
-c0845a9 mon: AuthMonitor: don't try to auth import a null buffer
-60a19e7 PendingReleaseNotes: ceph -s --format=json output change
-5dd1d4b test: idempotent filestore test failure
-c70216a Revert "test_filestore_idempotent: use obj name from source coll add"
-0a3c902 Revert "test_filestore_idempotent: make newly created objects globally unique"
-eccbdaa ceph-object-corpus: added cuttlefish objects
-97efc72 rgw: fix a typo
-a44854c qa/workunits/cls: remove new rgw tests
-b7c549d msgr: add 'ms die on old message' to help catch reconnect seq issues
-9f5cae4 mon: structure 'ceph status' json output
-2dcab51 mon: fix copy/paste error
-cf9d1e1 mon: clean up check_fsid() a bit
-2dc8688 mon: stash latest state when flagging force_sync
-96c4883 mon: factor out stashing latest monmap
-0c83b5f cls_rgw: add missing type tests
-d0bee5d cls_refcount: add type tests
-a04525b mon: fix sync_start doc
-e019dd0 mon: fix off-by-one: no need to reapply previous last_committed after sync
-e213b1b mon: fix recent paxos sync from 0 when first_committed == 1
-b8fad05 doc/dev: add corpus.rst
-4a3241c osd: reenable pg_query_t test
-8579d80 mon: add encoding tests for newish MMonSync, MMonScrub
-5139d0c mds: add encoding test for inode_backtrace_t; note incompat in corpus
-0800ea1 osd: add encoding tests for PushOp, PullOp, PushReplyOp
-17c2995 mon: add encoding tests for MonitorDBStore data types
-afb814f ceph-object-corpus: new objects for almost-dumpling
-3e4a291 osd/OSDmap: fix OSDMap::Incremental::dump() for new pool names
-6379f37 test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator
-329e467 cls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0
-734c824 test_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator
-88ba651 test_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator
-028f643 test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator
-cccc09a rgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator
-22e0dbb rgw/rgw_rados.cc: use empty() instead of checking for size() > 0
-ea0fcfa cmdparse.cc: catch exception by reference
-1f8fe70 ceph-rest-api: Missing packaging (binary in .spec, manpage in both)
-3d25f46 ceph-rest-api: make main program be "shell" around WSGI guts
-cb0f831 ceph.in: output even a blank status line in compat mode
-93b3e63 msg/Message: use old footer for encoded message dump
-cf8f16d rgw: handle bucket removal by system user on master region
-3b110db ceph_argparse.py: define some self.* in __init__
-60c9ca6 ceph_argparse.py: fix dangerous default value [] as arg
-a049e29 ceph_argparse.py: remove unnecessary semicolon
-a28d5d6 ceph_argparse.py: fix some ArgumentValid() commands
-3c4ae83 ceph_argparse.py: add missing spaces after comma
-c2a6334 ceph_argparse.py: add missing spaces around operator
-3278295 ceph_argparse.py: fix bad indentation
-707c39d ceph.in: add missing spaces around operator
-f714c01 ceph.in: add missing spaces after comma
-b82473a ceph.in: remove unnecessary semicolons
-5a6251c ceph-rest-api: connect to cluster with configured client name
-e4d063b ceph-rest-api manpage
-07590ae cephtool/test.sh: sync status no longer supported
-e66d011 cephtool/test.sh cleanup
-6cafb0e ceph-rest-api tests
-4cb0e06 Add 'ceph-rest-api'
-45dc573 OSDMonitor: return failure for 'osd lost' without safety switch
-c87f55b CompatSet, MDSMap: formatted dumps must avoid numeric tags
-e75db71 mon: OSDMonitor: formatter output on 'osd map'
-17595f3 mon: OSDMonitor: osd pool get: move to preproc, add formatted output
-a15d932 mon: formatted output for 'fsid'
-04fbc52 mon: Monitor: 'health detail --format=json' should only output JSON
-300f42b mon: Monitor: support multiple formatters on some status functions
-c6d1dba test/encoding/import-genearted: fix
-3cf8ae0 mds: make rename_rollback::drec not assert on unexpected d_type
-846382b mds: fix rename_rollback::drec cctor
-db68975 cls/rgw: init op in rgw_cls_obj_complete_op ctor
-db71a38 mon: add formatted output for several commands:
-f8ee4a7 auth: cephx: KeyServer: list secrets to formatter or plaintext
-e76b05b mon: AuthMonitor: improve error reporting for import
-b18554a mon: AuthMonitor: formatted output to 'auth get-or-create[-key]'
-7da0320 mon: AuthMonitor: dump formatted and plaintext key on 'get-key'
-7049efc mon: AuthMonitor: early out on bad entity name
-83bcde3 mon,auth: AuthMonitor, KeyRing: add Formatter-dumps of auth info
-92d5eb0 auth: Crypto: add encode_formatted/plaintext() functions
-2e2bc6d ceph_argparse.py cleanup: simplify some code, error on unused args
-a562162 ceph CLI: valid() no longer returns bool, but just exception
-0f2ebc6 ceph.in, ceph_argparse.py: move descsort() to ceph_argparse
-bfa2284 MonCommands: add new fields: modulename, perms, availability
-c9b54d7 common: Formatter: add flush to bufferlist
-989be66 rados.py: allow long-form names of 'warn' and 'err' as watch levels
-1ad2127 PGMonitor: fix stat comparison in prepare_pg_stats
-180c7b4 Get device-by-path by looking for it instead of assuming 3rd entry.
-836e35f Get device-by-path by looking for it instead of assuming 3rd entry.
-a120d81 Makefile.am:  fix ceph_sbindir
-dcb42ca test_rados: don't use assert_greater
-d8fe439 Python Ioctx.get_xattrs does not take xattr_name
-bc291d3 osd: fix warning
-653e04a osd: limit number of inc osdmaps send to peers, clients
-5c8a563 mon: do not populate MMonCommand paxos version field
-b36338b messages/MPGStats: do not set paxos version to osdmap epoch
-997c6f4 rgw-admin: add some of the newer flags and specify their use
-2ea6c4c rgw-admin: use 'get' instead of 'show' or info for geo stuff
-d36ec78 qa/workunits/cls/test_cls_rgw: add new rgw class tests
-2e79f73 ceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files
-ff5f25e debian/ceph-test.install: add missing files
-640d138 ceph.spec.in: add some more ceph_test_cls_rgw_* files
-dfe3c21 src/Makefile.am: rename cls_test_rgw_*
-78bae33 ceph.spec.in: add some ceph_test_cls_* files
-dc99a23 Makefile.am: fix build, use $(CRYPTO_LIBS)
-00ae543 mon: do not scrub if scrub is in progress
-8638fb6 unittest_pglog: fix unittest
-c487014 librados/misc.cc: reverse offset and length on write call
-bad317b osd: Add namespace to dump_watchers output
-f03cdf5 osd: Clean-up redundant use of object_locator_t
-8c50165 osd: Add the ability to set capabilities on namespaces
-7129564 osd: Prepare for nspace match with simpler is_match_all()
-6eb88a1 test: Add namespace list test cases to librados test
-fddfdeb test: Add namespace test cases to librados tests
-94ccfac rados: Add namespace arg (--namespace, -N) to rados command
-69af60d librados: Add operate()/operate_read() log messages
-e761e4e librados, os, osd, osdc, test: Add support for client specified namespaces
-8e07514 osd: change pg_stat_t::reported from eversion_t to a pair of fields
-cc0006d mon: be smarter about calculating last_epoch_clean lower bound
-da81228 osd: report pg stats to mon at least every N (=500) epochs
-449283f mon/OSDMonitor: allow osdmap trimming to be forced via a config option
-18a624f mon/OSDMonitor: make 'osd crush rm ...' slightly more idempotent
-c5157dd doc/release-notes: v0.66
-8799872 mon/PaxosService: update docs a bit
-44db2ac mon/PaxosService: inline trim()
-cab8eee mon/PaxosService: move paxos_service_trim_max into caller, clean up
-d97f314 mon/PaxosService: simplify paxos_service_trim_min check
-da248a9 mon: make service trim_to stateless
-886b637 mon/PaxosService: pass trim target into encode_trim()
-8b866d2 mon: preserve last_committed_floor across sync
-1f5e6c2 mon: no need to reset sync state on restart
-bbfb5b4 mon: drop single-use is_sync_on_going() check
-a4d0ccf mon: rev the internal mon protocol
-9fc4e4f mon/MonitorDBStore: drop unused single prefix synchronizer
-45907dc mon: add --force-sync startup option
-af3b49f mon/Paxos: move consistent check into Paxos::init()
-ccceeee mon/Paxos: remove unnecessary trim enable/disable
-aa33bc8 mon/Paxos: config min paxos txns to keep separately
-da0aff2 mon: implement a simpler sync
-f326c4d mon/PGMonitor: cleanup: use const strings for pgmap prefixes
-5faa4ac rgw: warn on the lack of curl_multi_wait()
-76e7926 rgw: fix args parsing
-3c89a19 os: Add missing pool to hobject_t:::dump() and hobject_t::decode()
-b1b188a os: Remove unused hobject_t::set_filestore_key()
-72c27a3 librados, osdc: Refactor IoCtxImpl to use operate()/operate_read()
-9dd60a6 TestRados: Output error for improper usage instead of Floating Point Exception
-30c951c osd: Fix object_locator_t::get_pool() return type
-7efbf5d librados: Fix lock names
-3931bfa psim.cc: Fix comment on how to create .ceph_osdmap
-313b7a1 os: Code conformance in LFNIndex.cc
-395262c rgw: call appropriate curl calls for waiting on sockets
-73c2a3d configure.ac: detect whether libcurl supports curl_multi_wait()
-d08b6d6 mon/PaxosService: prevent reads until initial service commit is done
-63fe863 mon/PaxosService: unwind should_trim()
-d600dc9 mon/PaxosService: unwind service_should_trim() helper
-6aa0230 mon/MDSMonitor: remove unnecessary service_should_trim()
-b71a009 mon/OSDMonitor: remove dup service_should_trim() implementation
-39b71c5 mon/PaxosService: trim periodically instead of via propose_pending
-2f8ff2d mon/PaxosService: reorder definitions
-50ffe32 mon/PaxosService: uninline should_trim()
-5edc1ff doc: Added Ceph Object Storage installation instructions for CentOS/RHEL 6.
-ca54efd mon: sync all service prefixes, including pgmap_*
-b536935 mon/MonitorDBStore: expose get_chunk_tx()
-43fa7aa mon/OSDMonitor: fix base case for loading full osdmap
-ad65de4 ReplicatedPG: send compound messages to enlightened peers
-ae1b2e9 ReplicatedPG: add handlers for MOSDPG(Push|Pull|PushReply)
-c0bd831 OSD: add handlers for MOSDPG(Push|PushReply|Pull)
-264dbf3 messages/,osd_types: add messages for Push, PushReply, Pull
-c56f16d ReplicatedPG: split handle_pull out of sub_op_pull
-175c077 ReplicatedPG: split handle_push_reply out of sub_op_push_reply
-54e5f64 ReplicatedPG: send pulls en masse in recover_primary
-c41d4dc ReplicatedPG: send pushes en mass in recover_replicas, recover_backfill
-eec86b8 OSD: convert handle_push to use PushOp
-a498432 ReplicatedPG: pass a PushOp into handle_pull_response
-82cb922 ReplicatedPG: split send_push into build_push_op and send_push_op
-31e19a6 ReplicatedPG: _committed_pushed_object don't pass op
-0f51b60 ReplicatedPG: submit_push_data must take recovery_info as non-const
-b6b48db (tag: v0.66) v0.66
-a990664 mon: implement simple 'scrub' command
-afd6c7d mon: fix osdmap stash, trim to retain complete history of full maps
-dd1e6d4 Revert "Makefile: fix ceph_sbindir"
-f07d216 rgw: fix bucket link
-eec903a doc: Fix env variables in vstart.sh documentation
-69a5544 osd/osd_types: fix pg_stat_t::dump for last_epoch_clean
-94afedf client: remove O_LAZY
-e9d19b3 common/crc32c: skip cpu detection incantation on not x86_64
-956fafc qa/workunits/rbd/simple_big.sh: don't ENOSPC every time
-d423cf8 qa/workunits/rbd/kernel.sh: move modprobe up
-672f51b qa/workunits/fs/test_o_trunc.sh: fix .sh to match new bin location
-7b7f752 unit tests for ObjectContext read/write locks
-6f1653a rgw: Add --help support to radosgw
-85a1d6c mon: remove bad assert about monmap version
-3f5a962 qa: write a somewhat <1tb image
-54aa797 qa/workunits/rbd/kernel.sh: modprobe rbd
-83f3089 qa: move test_o_trunc.sh into fs dir
-507a4ec qa: move fs test binary into workunits dir so teuthology can build it
-a84e6d1 mds/MDSTable: gracefully suicide on EBLACKLIST
-8b4cb8f rgw: Add explicit messages in radosgw init script
-d09ce3d rgw: fix rgw_remove_bucket()
-972d22e Adding new Wireshark dissector. This is loosely based on the original dissector, it has been re-worked to bring into line with Wireshark coding guidelines that aim to ensure portability. It currently only decodes a handful of messages as test cases, it needs more work to make it useful. See README.txt for a bit more background.
-a793e20 doc: Add a page to document vstart.sh script
-c14847c .gitignore: cls_test_*
-22227cd qa: add O_TRUNC test
-46b7fc2 radosgw-admin: fix cli test
-a0b1be9 rgw: fix type encoding
-71ebfe7 mon/Paxos: make 'paxos trim disabled max versions' much much larger
-ab93696 mon: be less chatty about discarding messages
-e8b42a6 osd/OSDMap: handle case where some new osds have hb_front and others don't
-81343f1 osd: clear hb_front if it was previously non-NULL and is now NULL
-e0da832 doc: Added write caps. Required for auto-creating pools.
-01d3e09 osd: fix race when queuing recovery ops
-d87ae0a osd_types: add PushOp, PushReplyOp PullOp
-194e858 osd: do not use temp_coll for single-step pushes
-b0e339c ObjectStore: only register non-null contexts
-daee9db ObjectStore,Context: add register_on_complete
-a825ae7 rgw: remove a few warnings
-3564e30 Elector.h: features are 64 bit
-4255b5c ceph_features.h: declare all features as ULL
-bc3e2f0 Pipe: use uint64_t not unsigned when setting features
-dc29c7a rgw: renamed a few unit tests
-db63965 ceph.spec.in:  Fix file name typo
-c2873c1 rgw: make rgw_cls_complete_op backward compatible
-08dd35d common: autoselect crc32c based on cpu features
-7c59288 Initial Intel SSE4 crc32c implementation.
-20e3abc rgw: make rgw_bucket_dir_entry backward compatible
-4fb782c mds: fix O_TRUNC locking
-cd44a62 Makefile: include rbdmap in dist tarball
-352f362 Makefile: fix ceph_sbindir
-9941171 rgw: keep max_marker on bucket index
-0da7da8 unitests: fix compilation
-9942efd mon: dead code removal
-5c053b1 rgw: handle new rest operations
-fcc423d rgw: RESTful api for shards info
-19828cb cls_log: store info in header, new op to retrieve it
-b3f6423 rgw: replica log RESTful api uses bucket instance id
-e10005c rgw: rework replica log + RESTful api
-288088d cls_replica_log: implement decode_json for the types
-7db133d ceph_json: add a utime_t decoder
-87c98e9 sysvinit, upstart: handle symlinks to dirs in /var/lib/ceph/*
-cb97338 ceph-disk: handle /dev/foo/bar devices throughout
-e082f12 ceph-disk: make is_held() smarter about full disks
-a4805ef osdc/Objecter: resend command map version checks on reconnect
-653bc2d common: move parse_time into utime_t header
-370d175 rgw: remove get_bound_info from RGWReplicaLogger
-b6c8366 key_value_store: fixup errno handling
-fc7d622 RESTful implementation to dump regionmap implementation
-641bd2f RESTful API implementation for replica_log
-da1fb93 mds: man page: Fixed cut & paste error
-a4cd631 set object_info_t pool of an ObjectContext if it is undefined or bad
-0efcccd Move rbdmap file to /etc/ceph
-ffe7045 install rules for init-rbdmap
-6ff2b16 rgw-admin: Adds option --shard-id to help.t
-3a20b06 rgw: admin: Add --shard-id option to help
-49ff63b rgw: add RGWFormatter_Plain allocation to sidestep cranky strlen()
-94742d4 doc: Minor fix.
-2ad4ff6 rgw: metadata, data logs can be turned on / off
-935c278 mon: Paxos: update first_committed on first paxos proposal
-847465f librados: fix test warning on 32-bit platforms
-6d90dad os/FileStore: automatically enable 'filestore xattr use omap' as needed
-1b578a8 librados: add test for large and many xattrs
-8694d29 osd/PGLog: populate log_keys_debug from read_old_log()
-cfc1f2e rgw: modify RGWBucketInfo::creation_time encoding / decoding
-4089001 rgw: Fix return value for swift user not found
-c73a24b rgw: end-marker serves as last value, not as upperbound
-c414030 rgw: relax marker requirements for log apis
-b21a41a rgw: update log APIs to use markers
-ce7d816 rgw: cls_log_entry has id field
-064e92f Makefile.am: some more makefile rules fixes
-c2a56e5 rgw: date string parsing also parses seconds fraction
-a6bbc91 Makefile.am: some more makefile rules fixes
-26423b9 rgw: date string parsing also parses seconds fraction
-0335905 rgw: fix cli test
-5314e3f Makefile.am: add missing rule
-09e374f osd: set maximum object attr size
-e56ef07 rgw: initialize sent_header in RGWOp_Opstate_List
-e235958 mds: log before respawning when standby-replay falls behind
-e75057f rgw-admin: restructure replicalog commands
-87217e1 client: send all request put's through put_request()
-9af3b86 client: fix remaining Inode::put() caller, and make method psuedo-private
-2e857a4 librados: fix cmd OSDCommand test
-72ac281 rgw: don't remove bucket index when removing a bucket
-10a2b60 rgw: bilog list by bucket instance (RESTful api)
-81bee64 client: use put_inode on MetaRequest inode refs
-977df77 ceph_json: reset values
-674bbab rgw: user param in access key is not manadatory
-9d702e5 rgw: advance ptr when sending data
-13f9c18 doc: Created an install page for Calxeda development packages.
-9e604ee ceph-disk: s/else if/elif/
-b4ee7ca changes to accomodate review comments on previous version
-8f1da8f rgw: fix regionmap json decoding
-cd7510f qa/workunits/misc/multiple_rsync: put tee output in /tmp
-e1f9fe5 rgw: fix radosgw-admin buckets list
-fe66331 Handle non-existent front interface in maps from older MONs
-867ead9 qa/workunits/rbd/simple_1tb: add simple rbd read/write test on large image
-8a17f33 ceph-disk: do not mount over an osd directly in /var/lib/ceph/osd/$cluster-$id
-986185c mon/PGMonitor: avoid duplicating map_pg_create() effort on same maps
-ca55c34 cephtool/test.sh: add case for auth add with no caps
-bfed2d6 MonCommands.h: auth add doesn't require caps (it can use -i <file>)
-71f3e56 Makefile.am: fix libglobal.la race with ceph_test_cors
-e635c47 mon/PGMonitor: use post_paxos_update, not init, to refresh from osdmap
-1316869 mon/PaxosService: add post_paxos_update() hook
-ea1f316 mon: do not reopen MonitorDBStore during startup
-516445b mon/Paxos: simplify trim()
-b8d04a2 mon/PaxosService: rename scrub
-ac63b2e mon/Paxos: clean up removal of pre-conversion paxos states
-d2f3811 mon/Paxos: update first_committed only from paxos
-290ccde mon/Paxos: set first_committed on first commit
-5511daf doc:  public network statement needed on new monitors.
-af00f73 rgw: automatic pool creation for placement pools
-fe36533 mon/Paxos: never write first_committed except during trim
-e93730b mon: enable leveldb cache by default
-ad9c294 mon/Paxos: assert that the store gives us back what we just wrote
-11e0325 mon/Paxos: drop unnecessary last_committed loads
-d31ed95 mon/PaxosService: allow paxos service writes while paxos is updating
-2d2aa00 mon/PGMonitor: store PGMap directly in store, bypassing PaxosService stash_full
-7a2566c rgw: remove test placement info
-224130c rgw (test): remove some warnings
-1b162ce rgw: initialize user system flag
-7681c58 (origin/wip-rgw-geo-bucketinstance) rgw: log in the same shard for bucket entry point and instance
-d4e39a7 rgw: unlink/link don't always update entry point
-5680fa1 doc/release-notes: v0.65
-6673b2d rgw: tie metadata put to bucket link/unlink
-5c3df08 cls_rgw: cleanup
-82db84b rgw: some more internal api cleanups
-c4be5a7 rgw: unlink bucket from user on metadata rm bucket:< bucket>
-86c73c9 rgw: fixes to object versioning tracking
-8bd31d4 rgw: filter read xattrs
-422bb6d rgw: add str_startswith()
-8db289f cls_ver: rename version xattr, add some more logging
-c8f7936 mon/AuthMonitor: start at format 1 (latest) for new clusters
-950c0f3 mon/PaxosService: move upgrade_format() machinery into PaxosService
-0d73eb4 mon/PGMonitor: drop some dead code
-0fd776d mon/PGMap: make int type explicit
-29e14ba mon/PaxosService: s/get_version()/get_last_committed()/
-c2d517e (tag: v0.65) v0.65
-3016f46 get_xattr() can return more than 4KB
-6e320a1 skip TEST(EXT4StoreTest, _detect_fs) if DISK or MOUNTPOINT are undefined
-63e81af rgw: multiple fixes related to metadata, bucket creation
-a4ddf70 Add rc script for rbd map/unmap
-b28bd78 mon/PaxosService: drop unused last_accepted_name
-6060268 mon/PaxosService: some whitespace
-7c9dee0 mon/PaxosService: drop unused {get,set,put}_version(prefix, a, bl)
-1d913d2 mon/OSDMOnitor: use provided get_version_full()
-872f4d5 mon/PaxosService: simplify full helpers, drop single-use helper
-83c49be mon/PaxosService: remove mkfs helpers
-c47f271 mon: fix mkfs monmap cleanup
-78fefe6 mon: make PaxosService::get_value() int return type 64-bit
-78b7ec7 mon/PaxosService: drop unused helpers
-6721122 mon/MonmapMonitor: avoid exists_version() helper
-6429cb1 mon/PaxosService: remove unused exists_version() variant
-9ae0ec8 mon/Elector: cancel election timer if we bootstrap
-03d3be3 mon: cancel probe timeout on reset
-521fdc2 mon/AuthMonitor: ensure initial rotating keys get encoded when create_initial called 2x
-3791a1e osd: tolerate racing threads starting recovery ops
-31d6062 init-radosgw.sysv: remove -x debug mode
-7e41c10 rgw: bucket entry point contains owner, other fix
-eb86eeb common/pick_addresses: behave even after internal_safe_to_start_threads
-cad8cf5 Add python-argparse to dependencies (for pre-2.7 systems)
-046e3b7 debian, rpm: remove python-lockfile dependency
-f046dab mds: do not assume segment list is non-empty in standby_trim_segments
-ab6ccbe test/librados/cmd.cc: use static_cast instead of C-Style cast
-626d9ee opstate RESTful API implementation with unit test application
-79b5a48 osdc/Objecter.cc: use static_cast instead of C-Style cast
-e7602a1 mon/MonClient.cc: use static_cast instead of C-Style cast
-de4a764 common/cmdparse.cc: reduce scope of local variable 'pos'
-b485a3e common/cmdparse.cc: remove unused variable
-a92a720 osd/OSD.cc: prefer prefix ++operator for non-trivial iterator
-835315b OSDMonitor.cc: prefer prefix ++operator for non-trivial iterator
-c700db0 mon/MonCap.cc: use empty() instead of if(size())
-4ab5bf6 common/cmdparse.cc: prefer prefix ++operator for non-trivial iterator
-1e3161a rgw: add a system request param to select op bucket instance
-76228ca rgw: data log contains bucket instance info in key
-5dd137a rgw: format bucket.instance meta entries nicely
-4e90c5e rgw: use new instance handler for bucket operations
-71869c4 rgw: create meta handler for bucket instance
-00973df rgw: put_bucket_info() uses objv_tracker in bucket info
-dab57ef rgw: keep objv_tracker on bucket info
-57dc736 msgr: clear_pipe+queue reset when replacing lossy connections
-e053d17 rgw: refactor policy reading
-9586305 msgr: reaper: make sure pipe has been cleared (under pipe_lock)
-ec612a5 msg/Pipe: goto fail_unlocked on early failures in accept()
-afafb87 msgr: clear con->pipe inside pipe_lock on mark_down
-5fc1dab msgr: clear_pipe inside pipe_lock on mark_down_all
-d74cdad rgw: fix policy read
-ad64067 rgw: init member variable
-b09d799 rgw: encode bucket info only after setting a flag
-cd98eb0 mon/AuthMonitor: make initial auth include rotating keys
-9b2dfb7 mon: do not leak no_reply messages
-ad12b0d mon: fix leak of MOSDFailure messages
-c3260b2 rgw: initial work to separate bucket name and instance
-c103031 rgw: initialize system flag in RGWUserInfo
-7e3493f rgw: various object put processor fixes
-5f43fa8 rgw: fix broken obj put
-1aca370 debian: ceph-common requires matching version of python-ceph
-d7af5e1 rgw: handle bucket creation with specified placement pool
-94eada4 Add header comments and Inktank copyrights to ceph.in/ceph_argparse.py
-67a3c1e ceph.in: rip out reusable code to pybind/ceph_argparse.py
-2fcbf2b rgw: user configuration for bucket placement
-e5e924c rgw: data structures for new data/index placement rules
-c4272a1 ceph: even shinier
-34ef2f2 ceph: do not busy-loop on ceph -w
-27912e5 librados: make cmd test tolerate NXIO for osd commands
-abd0ff6 mds: do not assume segment list is non-empty in standby_trim_segments
-241ad07 rgw: make replica log object name configurable
-469900e RGWReplicaBucketLogger: store bucket replica logs in the .logs pool
-3bebbc0 mds: rev protocol
-ded2e84 mds: kill Server::handle_client_lookup_hash()
-2147c4e mds: use "open-by-ino" helper to handle LOOKUPINO request
-24e59b4 rgw: buffer atomic put handler
-02de43a rgw: tie opstate into intra-region copy operations
-31d221c ceph.in: remove some TAB chars
-69e1a91 ceph.in: fix ^C handling in watch (trap exception in while, too)
-29f6f27 ceph: --version as well as -v
-6d6dc42 fixup "radosgw-admin: new commands to look at and clean up replica logs"
-59bfdd0 radosgw-admin: new commands to look at and clean up replica logs
-ab79ba4 cls_replica_log: integrate with RGWRados
-3651473 cls_replica_log: add tests.
-29df88a cls_replica_log: add client with user documentation
-e4ef5c6 cls_replica_log: add the actual class
-22a02e9 cls_replica_log: add ops for new class
-d1c9594 cls_replica_log: add types for new class
-0deb6d4 (origin/wip-rgw-geo-enovance) rgw: lock related modifications
-3b4c11b rgw: add max-entries, marker for log operations
-714f212 osdc: re-calculate truncate_size for strip objects
-ebb46c4 qa/workunits/misc/multiple_rsync.sh: wtf
-fd769c0 qa/workunits/cephtool/test.sh: fix and cleanup several tests
-f420e5c mon: drop deprecated 'stop_cluster'
-4977b88 mds: make 'mds compat rm_*compat' idempotent
-4a038d6 mon: make 'log ...' command wait for commit before reply
-008bdc5 radosgw_admin: fixup cli test
-483aa74 test: update cli test
-7b5ec74 cls_rgw: skip namespaced entries when listing bucket
-5de54f6 a/workunits/cephtool/test.sh: --no-log-to-stderr when examining stderr
-d60534b mon: more fix dout use in sync_requester_abort()
-8a4ed58 mon: fix raw use of *_dout in sync_requester_abort()
-c8af85d doc/release-notes: v0.61.4
-c39b99c FileStore: handle observers in constructor/destructor
-0211583 init-radosgw: use radosgw --show-config-value to get config values
-88f73c5 ceph: fix ceph-conf call to get admin socket path for 'daemon <name> ...'
-716fc35 ceph-conf: make --show-config-value reflect daemon defaults
-cf3bc25 FileStore: apply changes after disabling m_filestore_replica_fadvise
-ed8b0e6 FileStore: apply changes after disabling m_filestore_replica_fadvise
-2a4953b ceph-disk: use unix lock instead of lockfile class
-8c0daaf ceph-disk: make list_partition behave with unusual device names
-8a5d989 FileStore: get_index prior to taking fdcache_lock in lfn_unlink
-09e869a PGLog::rewind_divergent_log must not call mark_dirty_from on end()
-4d77443 unit tests for PGLog::proc_replica_log
-e11cc1c add constness to PGLog::proc_replica_log
-392a8e2 mon/PaxosService: not active during paxos UPDATING_PREVIOUS
-ee34a21 mon: simplify states
-ec2ea86 mon/Paxos: not readable when LOCKED
-7b7ea8e mon/Paxos: cleanup: drop unused PREPARING state bit
-f985de2 mon/PaxosService: simplify is_writeable
-3aa61a0 mon/PaxosService: simplify readable check
-a9e9c58 mon/MonmapMonitor: remove some dead code
-7229da8 mon/MonmapMonitor: fix typo in check to remove mkfs info
-e565802 mon: fix whitespace
-439e799 mon: debug proposal timers
-e832e76 mon: simplify Monitor::init_paxos()
-e68b1bd mon/Paxos: go active *after* refreshing
-dc83430 mon: safely signal bootstrap from MonmapMonitor::update_from_paxos()
-a42d758 mon/Paxos: do paxos refresh in finish_proposal; and refactor
-2fccb30 mon/PaxosService: cache {first,last}_committed
-d941363 mon: no need to refresh from _active
-03014a4 mon: remove unnecessary update_from_paxos calls
-cc339c0 mon: explicitly refresh_from_paxos() when leveldb state changes
-95bd048 os/FileStore: disable fadvise on XFS
-fd83bc3 client: fix warning
-b2f1a1a mds: fix remote wrlock rejoin
-15a5d37 mds: fix race between scatter gather and dirfrag export
-ded0a5f Revert "client: fix warning"
-96c9493 radosgw-admin: interface to control ops state
-8b1524b rgw: OpState internal api
-258edfc rgw: fix check_state call
-5e6dc4e mon: Monitor: make sure we backup a monmap during sync start
-6284fdc mon: Monitor: obtain latest monmap on sync store init
-af5a986 mon: Monitor: don't remove 'mon_sync' when clearing the store during abort
-d628109f rgw: specialized obj zone copy state for statelog
-13e0302 rgw: internal api for statelog objclass
-0b932bf cls_statelog: pass in timestamp
-2574903 AuthMonitor: auth export's status message to ss, not ds
-75b6c82 doc: Fixed OpenStack Keystone instruction.
-cba4de1 cls_statelog: improve unitest
-b89f47c cls_statelog: fix a few issues
-64ee014 ceph.spec: create /var/run on package install
-97f1322 doc: Updated deployment preflight.
-bb799e6 test_rados.py: add some tests for mon_command
-64b4e4a rados.py: wrap target in c_char_p()
-54f7432 rados.py: return error strings even if ret != 0
-81e73c7 ceph.in: pass parsed conffile to Rados constructor
-2fc8d86 ceph.in: global var dontsplit should be capitalized
-38a595b FileStore: optionally compact leveldb on mount
-4a3127f client: fix warning
-efcf626 FileStore::lfn_open: don't call get_index under fdcache_lock
-bfe4bf9 rgw: handle racing default region creation
-ce7b5ea common/Preforker: fix warning
-8bd936f client: fix warning
-6b52acc config.h: ensure U64 option defaults are computed as 64 bits
-e2af5fb test: test for cls_statelog
-1ecec3a cls_statelog: fixes
-8d5fc70 cls_statelog: add client api functions
-fbe816a cls_statelog: fixes and changes to api
-7669662 cls_statelog: introducing new objclass to handle state tracking
-df8a3e5 client: handle reset during initial mds session open
-2e27f69 rgw: move a couple of unitests to a different Makefile rule
-f5f8314 rgw: object mtime the same for both object and bucket index
-7f63baa rgw: fix inter-region copy (ofs wasn't correct)
-92997a4 mon: fix 'osd dump <epoch>'
-8c6b24e ceph-disk: add some notes on wth we are up to
-94b3700 rgw: intra-region copy, preserve mtime
-29eb333 (origin/wip-log-rewrite-sam) test/osd/TestPGLog: %s/dirty()/is_dirty()
-f164a32 PGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max()
-c6dd60d PGLog: rename dirty() to is_dirty()
-2ad319b PGLog: only iterate over dirty portions of the log
-962b64a PGLog,PG: use normal log dirtying and writing for append and trim
-9b6cb63 PGLog: add debug check on written keys, verify on write
-abac4ea test/osd/TestPGLog: fix pglog unittests for dirty_log and ondisklog
-6dd95c8 PG,PGLog: remove dirty_log arguments
-b16fdf2 PGLog: replace dirty_log with mark_dirty_*
-f35bc02 PG: move instances of log dirtying in PG into PGLog
-d77c4ff PGLog: track dirty_to and dirty_from for log
-fb88873 osd_types: move code for pg_log_entry_t::get_key_name into eversion_t
-b73aa30 PGLog: remove OndiskLog
-ca1637f PGLog: remove other ondisklog references
-a9a41bc PGLog: pass only divergent_priors, not ondisklog
-7bc4305 PG: remove ondisklog usages from PG
-53e1fda FileStore: add rmkeyrange
-3924531 PGLog: clear missing on backfill reset
-4c89a2b rgw: system user get obj returns JSON encoded metadata
-47ce702 *: always include rados.h using types.h
-d46e6c3 OSD: we need to check pg ?.0 for resurrection
-5bf08cd libcephfs: add a couple multiclient tests
-ee40c21 client: fix sync read zeroing at EOF
-e538829 ceph-disk: clear TERM to avoid libreadline hijinx
-d7f7d61 ceph-disk-udev: set up by-partuuid, -typeuuid symlinks on ancient udev
-c907437 ceph-disk: do not stop activate-all on first failure
-253069e ceph.spec: include partuuid rules in package
-00656da rgw: add 'delete' to signed subresources list
-7c72933 test: update cli test
-b8d2ba1 rgw: set default region as master
-d582ee2 rgw: escape prefix correctly when listing objects
-b7143c2 client: fix ancient typo in caps revocation path
-cc9b83a ceph.spec: install/uninstall init script
-1368097 sysvinit, upstart: ceph-disk activate-all on start
-5c7a236 ceph-disk: add 'activate-all'
-d512dc9 udev: /dev/disk/by-parttypeuuid/$type-$uuid
-7f5d6e5 mds: don't journal bare dirfrag
-1d86f77 mds: fix cross-authorty rename race
-aa3e512 mds: try purging stray inode after storing backtrace
-f11ec5c mds: handle undefined dirfrags when opening inode
-29e6597 mds: fix frozen check in Server::try_open_auth_dirfrag()
-18b9e63 mds: don't update migrate_seq when importing non-auth cap
-f179dc1 mon: make mark_me_down asserts match check
-2fe4d29 ceph: remove space when prefix is blank
-8d9eef2 ceph: fix return code for multi-target commands
-84d1847 ceph: error out properly when failing to get commands
-8d9272e test/admin_socket/objecter_requests: fix test
-efebdba ceph: do not print status to output file when talking to old mons
-80c2d5a osd/ReplicatedPG: length 0 writes are allowed
-1113ff0 rgw: get / set user & bucket meta mtime
-7e7ff75 common/Preforker: fix broken recursion on exit(3)
-f25f212 osd/OSDMap: fix is_blacklisted()
-21e85f9 qa/workunits/misc/multiple_rsync.sh: wtf
-a2cf14f rgw: preserve bucket creation time across different zones / regions
-8eae1b8 rgw: show mtime for metadata entries
-8fa4394 rgw: fixes for intra-zone object copy
-5df39aa rgw: set bucket marker and bucket obj version from master
-622f500 rgw: multiple changes for intra-zone object copy
-17d6571 rgw: when setting bucket metadata key, don't override placement
-d5679d0 rgw: forward amz headers of copy request to remote rgw
-5ff2059 rgw: cleanup, move init_meta_info() into req_info
-9253cd8 ceph: pass --format=foo to old monitors
-c35c98d ceph: add newline when using old monitors
-0d3517b doc: Added index tags.
-fb07f9d doc: Added index tags.
-fd423fc doc: Added index tags.
-8a5b276 doc: Added index tag.
-d5dbc2f doc: Updated usage and index tags.
-ceba953 doc: Updated usage and index tags.
-81d4f9d doc: Added introductory section. Updated usage. Index tags.
-0b604fb doc: Index tags.
-f851c5d doc: Update for usage and index tags.
-4a79fab doc: Update for usage. Index tags.
-20e68b7 doc: Updated for glossary usage. Index tags.
-44bf35a doc: Updated index tags.
-a529882 doc: Updated index tags.
-bb5fae4 ceph.in: zero-arg invocation was broken (check array length)
-8f8fd7a doc: Updated index tags.
-2be1670 doc: Minor updates.
-b3a143d doc: Minor updates for usage.
-10c0ae9 rgw: remove unused variable
-3474fa8 rules:  Don't disable tcmalloc on ARM (and other non-intel)
-37cc85e rgw: bucket marker contains zone name
-bcfd2f3 udev: drop useless --mount argument to ceph-disk
-b139152 ceph-disk-udev: activate-journal
-e5ffe0d ceph-disk: do not use mount --move (or --bind)
-f3234c1 ceph.spec: include by-partuuid udev workaround rules
-1aa7f59 ceph.spec: add missing ceph_test_rados_api_cmd to package
-b1293ee ceph: flush stderr, stdout for sane output; add prefix
-82ff72f ceph-disk: work around buggy rhel/centos parted
-92b8300 mon: OSDMonitor: don't ignore apply_incremental()'s return on UfP [1]
-7e08ed1 upstart: start ceph-all on runlevel [2345]
-7503db9 ceph: fix mon.*
-a2b2f39 librados: add tests for too-large objects
-4a1eb3c osd: fix types for size checks
-2be3c8d remove RELEASE_CHECKLIST
-f1b6bd7 osd: EINVAL from truncate causes osd to crash
-bcfbd0a ceph_test_rados: add --pool <name> arg
-7ec64db rgw: pass original object attrs through extra request data
-02599c4 ceph-fuse: fix uninitialized variable
-a2a78e8 ceph-disk: implement 'activate-journal'
-8b3b59e ceph-disk: call partprobe outside of the prepare lock; drop udevadm settle
-10ba60c ceph-disk: add 'zap' command
-06f0b72 ceph.in: allow args with -h to limit help to cmds that match partially
-6ebfd3c ceph.in: better global description of tool
-821b203 ceph.in: less verbosity on error
-99bd5c8 librados: add missing #include
-93505bb librados: wait for osdmap for commands that need it
-f6a864d rules:  Don't disable tcmalloc on ARM (and other non-intel)
-5fb0444 Update adminops.rst add capabilities
-2bda9db osdc/Objecter: dump command ops
-6e73d99 osdc/Objecter: ping osds for which we have pending commands
-e4f9dce ceph.in: refuse 'ceph <type> tell' commands; suggest 'ceph tell <type>'
-a6876ad ceph.in: argparsing cleanup: suppress --completion, add help
-68a9199 osdc/Objecter: kick command ops on osd con resets
-db7d121 osdc/Objecter: add perfcounters for commands
-9a7ed0b mon: fix idempotency of 'osd crush add'
-7e1cf87 librados: do not wait for osdmap on start
-51dae8a doc: Updated with glossary terms.
-35ea163 mon/MonmapMonitor: remove unused label
-987f175 mon/MonCap: bootstrap-* need to subscribe to osdmap, monmap
-0193f88 mon/MonClient: mark_down during get_monmap_privately() shutdown
-962d118 mon/MonClient: mark_down connection on shutdown
-597e439 msgr: queue reset when marking down pipes on shutdown
-ea6880f msg/DispatchQueue: do not discard queued events on stop
-de64bc5 msgr: queue reset exactly once on any connection
-26e16c0 msg/Pipe: include con reef in debug prestring
-eea73ab msg/Pipe: reset replaced pipes
-e96c0ce msgr: use ConnectionRef throughout
-77db175 mon/MonClient: tear down version requests on shutdown
-2818a44 mon/PaxosService: discard messages during shutdown
-c112fc8 mon: add is_shutdown() state helper/accessor
-652c599 mon: shut down Paxos on shutdown
-6630462 osd: break con <-> session cycle on reset
-99172c3 osd: do not leak HeartbeatSession on shutdown
-449bcd6 osd: close classes on shutdown
-b56c965 osd: do not leak MOSDPings on shutdown
-d172c33 osd/ReplicatedPG: don't leak Session refs in do_osd_op_effects()
-cd1c289 messages/MMonSync: initialize crc in ctor
-991d07a vstart.sh: put exports at top
-a3fe2dc PendingReleaseNotes: notes on CLI changes
-314d9c3 PendingReleaseNotes: cli changes, and ceph tell ...
-cb57c41 doc/release-notes: add missed notes for 0.63 and 0.64
-6160e50 mon: remove support for 'mon tell ...' and 'osd tell ...'
-8adf88a ceph: add support for 'tell mon.X ...'
-420e02e librados: new rados_mon_command_target to talk to a specific monitor
-cdd11ea rgw: a few fixes to copy object across region
-169c5de add apt-get update to installation instructions
-165926b rgw: move most of object put processors implementation
-0b491e9 rgw: separate req_state from object put processors
-bcdd475 rgw: organize get_obj handling for copy a bit different
-5fa45f4 Update README dependency lists
-f86b4e7 ceph-disk: extra dash in error message
-ff280b6 Clean up CrushWrapper methods that take string: no c_str() necessary
-c618cf9 OSDMonitor: osd id when id already exists needs to come to stdout too
-a376701 ceph, mon/OSDMonitor: fix up osd crush commands for <osd.N> or <N>
-e9689ac config: fix run_dir typo
-d1b83ff mon/MonClient: send commands to a specific monitor
-d0e6575 ceph: implement 'ceph tell osd.* ...'
-6a6025f rgw: generate read request if source rgw is remote
-3e707da vstart.sh: set run_dir to out
-b0b5b1b rbd image_read.sh: wait for rbd sysfs files to appear
-8808ca5 osdc/Objecter: fix handling for osd_command dne/down cases
-1154b2a init-ceph: look to ceph.conf instead of hard-coding /var/run/ceph
-6542991 global: create /var/run/ceph on daemon startup
-11d5c7a ceph: only use readline when in interactive mode
-862148d mon: fix read of format_version out of leveldb
-1c77be0 doc/release-notes: v0.63 and v0.64 notes
-b3b0f03 ceph: filter out empty lines from osdids()
-edba986 ceph: accept osd.* as a valid name
-e5184ea ceph: make life easier on developers by handling in-tree runs
-701943a qa/workunits/cephtool/test.sh: look for 'ceph log' via -w, not in log file
-b70f565 ceph: flush stdout on watch print
-299f6a6 Usage log and ops log are disabled by defaults since 0.56
-de17238 mon: fix 'pg dump_stuck' stuckops type
-afa16b4 qa: multiple_rsync.sh: more output
-42e06c1 (tag: v0.64) v0.64
-68b5fa9 ceph-fuse: older libfuses don't support FUSE_IOCTL_COMPAT
-1577e20 ceph-create-keys: Make sure directories for admin and bootstrap keys exist
-95434d1 rgw: propagate mtime from remote rgw on copy
-256afa0 store_test: create_collection prior to split
-1a9415a mon: adjust trim defaults
-5f0007e doc: Reworked the landing page.
-dc6cadc doc: Added a hostname resolution section for local host execution.
-f6c51b4 doc: Added some tips and re-organized to simplify the process.
-9b012e2 client: set issue_seq (not seq) in cap release
-c7fb7a3 doc: Added some Java S3 API troubleshooting entries.
-6c557d5 doc: Added install ceph-common instruction.
-5543f19 doc: Added install ceph-common instruction.
-3f3ad61 doc: Fixed :term" syntax.
-00743d5 rgw: propagate error from remote gateway when copying object
-0948624 ceph-create-keys:  Remove unused caps parameter on bootstrap_key()
-3f2017f osd: fix con -> session ref change after hb reset
-ea3efca rgw: pass grant headers to target when writeing object
-da5e443 rgw: head acls target can be quoted
-a378c4d common/admin_socket: fix leak of new m_getdescs_hook
-6bab425 common/cmdparse: no need to use (and leak to) the heap
-5c945cd CrushWrapper: dump tunables along with crush map
-0e0e896 ceph: --keyring must be passed to parse_argv, which means not argparse
-8190b43 OSD: create collection in handle_pg_create before _create_lock_pg
-af92b9a Objecter: fail osd_command if OSD is down
-a741aa0 mon: send "osd create" output to stdout; tests rely on it
-db0c250 rgw: send meta headers with remote PUT request
-566315c rgw: don't busy wait for outgoing rest requests
-cbf860f rgw: don't send redirect if copy object has a local source
-be1d84d rgw: link bucket to owner on metadata update
-bf6b80c6 rgw: fix logic related to operations on different region
-2237086 rgw: minor logging change
-6f6e425 rgw: fix json decoding for swift keys
-4849c8c rgw: stream obj into http request
-284f6a2 rgw: format put request auth
-72cb5fd rgw: bucket metadata, ignore ENOENT on put
-31676c5 rgw: skeleton for obj copy across regions
-f6c7c0c rgw: metadata lock/unlock implemented with test cases
-d1afc81 RESTful APIs for data changes log implemented with test cases
-8f141c4 unit tests for PGLog::rewind_divergent_log
-04e89a4 unit tests for PGLog::merge_log
-6ce2354 messages/MMonProbe: fix uninit vars (again)
-10bfa83 osdc/Objecter: clear osd session command ops xlist on close
-81a786e librados: fix pg command test
-00eaf97 librados.h: Fix up some doxygen problems
-e8300d0 mds: fix filelock eval_gather
-2b4157a .gitignore: add 'ceph', now a generated file
-359f456 ceph: old daemons output to outs and outbuf, combine
-b3f38f3 ceph: handle old OSDs as command destinations, fix status part of -w
-11e1afd ceph: add -v for version.  Makefile processes ceph_ver.h
-fde536f osd: make scrub chunk size tunable
-637e0ea rados: --num-objects will now cause bench to stop after that many objects
-0bc731e test_filestore_idempotent: use obj name from source coll add
-ad3934e rgw: handle deep uri resources
-8d55b87 rgw: fix get_resource_mgr() to correctly identify resource
-9a0a9c2 rgw: add 'cors' to the list of sub-resources
-0b036ec osd: do not include logbl in scrub map
-dea8c2d doc: Updated for glossary terms and added indexing.
-8e24328 doc: Added indexing and did a bit of cleanup.
-a08d620 mds: do not double-queue file recovery in eval_gather
-faa1ae7 MDSMonitor: dead debugging code
-7785fc5 rados.py: make exception with errno string instead of int
-24a5212 ceph, librados, rados.py, librados tests: pass cmd as array
-37a6102 ceph: -v should mean version, not --verbose
-4446681 ceph: error and verbose message improvement
-b114e11 ceph: refactor -s -> status to common code, pass childargs to old mons
-2431bfb librados: rados_X_command need to assemble a vector from char *cmd
-783b7ec librados, ceph, rados.py: -EINVAL for create with null/invalid name
-3f7cac3 ceph: improve error reporting on failure to connect to cluster
-ead8d89 ceph: fix up old-monitor handling
-b1588bd ceph: catch/handle exceptions in admin socket commands
-3720b64 ceph: collect/use clustername, and set defaults like other utilities
-366de90 librados, rados.py: rados_create2: add clustername and future flags
-8108c95 AuthMonitor: fix signed/unsigned comparison warning
-f43c974 mon: upgrade auth database on leader
-afebad4 auth: CephxKeyServer: add secrets_{begin,end}() getters
-f2177a4 mon: AuthMonitor: remove dead code to avoid confusion
-115bb93 ceph: Remove connect/command timeouts; too risky for now Keep 10s timeout when connecting for help descriptions, however
-5c30844 doc: Updated with glossary terms.
-8e13b38 doc: Updated with glossary terms.
-7116de3 doc: Correction and index tags.
-ae5aeb1 doc: Updates for glossary terms.
-b394edc doc/release-notes: v0.61.3
-3d6eaf5 doc: Added upstart syntax.
-2d9a46c doc: Added link to Upstart syntax.
-963a9c4 init-radosgw*: add all sections to usage output
-4ea24ae init-radosgw*: add status
-39fff6a fix init-radosgw* to use the same indentation
-a4dbfa3 test: Add blacklisting to test_stress_watch
-4eb576e Add test_blacklist_self() librados function for test cases
-0cbc0a0 osd: Add dump_watchers to osd admin socket to examine all watchers
-4b80c5b rados: Output client address in rados listwatchers request
-3b0a44d osd: Add dump_blacklist to admin socket
-ab0da28 osd: Drop watchers from blacklisted clients
-0bd60f8 osd: Add entity_addr_t to watch_info_t and Watch
-92d085f mon: fix preforker exit behavior behavior
-5deece1 PG: don't dirty log unconditionally in activate()
-951fc2f OSD: resurrect a parent if it splits into the pg we want to create
-02946e5 qa: stop running xfstests 192 in qemu
-30733af Makefile.am: add -ldl to unittest_pglog
-5a53da3 ceph-test: add ceph_test_rados_api_lock to packaging and qa
-68ccf8e Add RADOS API lock tests
-d841566 Add RADOS lock mechanism to the librados C/C++ API.
-d970311 doc: Added key and ceph repository to ceph-deploy install.
-7acf3de cls,msg: Fix use of set_in4_quad() to set a entity_addr_t
-89524eb osd: Fix usage of commands supported by TestOpsSocketHook::test_ops()
-c76838f osd: Style corrections
-a99435d mon: fix leak of loopback Connection
-08bb8d5 messages/MMonHealth: remove unused flag field
-4974b29 messages/MMonProbe: fix uninitialized variables
-8c23d8c dev/rbd-diff: make formats into bullet lists (solves linebreak probs)
-09a796d doc: Removed ceph-deploy git, and added ceph-deploy packages.
-d1e2e7b doc: Modified pre-flight checklist for ceph-deploy packages.
-72a6767 doc: Added title. Suppresses no title warning messages.
-891641e messages/MMonProbe: remove unused fields
-6dd7d46 rados.py: correct some C types
-6f8b53a ceph: cleanup: accept --conf *and* -c; suppress stderr if no outs
-24a270a librados, rados.py: add rados_create2/init2
-85576db Revert "mds: initialize rejoins_pending"
-0c4ca2a mds: allow purging "dirty parent" stray inode
-d7fb9b1 mds: initialize some member variables of MDCache
-d605eaf OSD: add pgid and res_map to DeletingState
-15a5e09 OSD: make get_or_create_pg handle_pg_peering_evt
-9655946 OSD: remove created argument from get_or_create_pg()
-64b3e83 Revert "mds: allow purging "dirty parent" stray inode"
-05a57bd mds: initialize rejoins_pending
-c216914 Revert "mds: initialize some member variables of MDCache"
-ce67c58 os/LevelDBStore: only remove logger if non-null
-cdf5785 test_filestore_idempotent: make newly created objects globally unique
-713719a test_librbd: use correct type for varargs snap test
-b70868e unit tests for PGLog::merge_old_entry
-21a1c4d mon: fix POOL_OP_AUID_CHANGE
-18f2f19 test/librados: remove "set_auid" pool tests
-51a887a Add ceph_test_rados_api_cmd to the ceph-test package
-fbfdd51 ceph: backward-compatibility hack: blank line before JSON output
-f6f4f8f librados cmd tests: mon_status comes to stdout, not stderr
-6cec9cc librados: fix unsigned vs. signed warning
-5bd93b3 ceph: refactor help so it can be called after cluster connection
-d4bfce7 mon: better debugging of caps messages/values
-0bec7e1 mon/MonCap: fix setting of text in parse()
-5e90e6c mon/MonCap: set text in set_allow_all()
-8c67480 ceph: various cleanups  - make base class valid() do useful work  - remove valid from CephPoolname; pool need not exist for create  - add --user as alias for --id  - remove vestige of special --keyring handing  - be sure childargs is an empty list rather than None  - remove -- from childargs if present (to stop interpreting -- args)  - handle connection timeout cleanly
-a4b824c PGMonitor: fix pg dump and dump_stuck
-be1a512 cmdparse, mon: add cmd_vartype_stringify for _allowed_command
-f1021c9 cmdparse: add handle_bad_get(), ceph:: qualifiers, cmdmap_t
-b8f1cb9 mds: allow purging "dirty parent" stray inode
-2d655bd mds: initialize some member variables of MDCache
-17029b2 test_librbd: use correct type for varargs snap test
-456f96f ceph: remove global declarations, declare verbose and cluster near top
-df34cff ceph: use conf_parse_argv to deal with nonspecial Ceph args
-065b29c librados, rados.py: add conf_parse_argv_remainder()
-73a1b21 ceph: make ceph -w output 'ceph status' first
-dc73581 mon: include cluster fsid/uuid in status output
-74f5ea4 mon/MonCap: allow osd, mds to write to cluster log
-9809371 ceph: move admin-daemon command before connect()
-8dd3618 ceph: finish changing bestsigs to bestcmds
-b0469a1 cephtool/test.sh: fix "expect failure"
-22660bd MDSMonitor, cmdparse: increase resiliency of bad cmd_getval()
-1cb7dbd messages/MClientCapRelease: fix string output
-27f82ce ceph: Add missing usage "ceph osd blacklist ls"
-367e203 fusetrace_ll.cc: handle return value of fuse_session_loop()
-541320c mds/MDCache.cc: reduce scope of 'CDir *dir' in _create_system_file_finish()
-84dedf5 mount/mount.ceph.c: reduce scope of 'value'
-1b70fcd mds/Migrator.cc: reduce scope of 'in' in handle_export_prep()
-8afbc28 kv_flat_btree_async.cc: fix assigned but unused value issue
-575652a key_value_store/kv_flat_btree_async.cc: fix some reassign before use value issues
-f7071b2 osd/PG.cc: prefer prefix ++operator for iterator
-7aa9b92 mds/MDCache.cc: prefer prefix ++operator for iterator
-4fa5f99a ceph-fuse: create finisher threads after fork()
-1e99be1 vstart.sh: make client logs unique
-eb6d5fc os/LevelDBStore: fix merge loop
-6cdc4f8 merge_old_entry arguments info and oe are changed to const because there is no side effect.
-d7e2ab1 mon: fix uninitialized fields in MMonHealth
-f1ccb2d mon: start lease timer from peon_init()
-fb3cd0c mon: discard messages from disconnected clients
-6b8e74f mon/Paxos: adjust trimming defaults up; rename options
-a03ccf1 OSD: *inodes_hard_limit must be less than the fd limit
-e12a9c4 OSD: tell them they died if they don't exist as well
-cec8379 osd: fix msg leak on shutdown in ms_dispatch
-9865bb4 osd: reset heartbeat peers during shutdown
-923683f mon/MonClient: fix leak of MMonGetVersionReply
-222059e osd: fix leak of MOSDMarkMeDown
-08631e7 rgw: some user metadata fixes
-851619a upstart: handle upper case in cluster name and id
-dfad09b rgw_admin: modify mdlog functionality
-2b9ab9f rgw: set truncated as false if ENOENT when listing mdlog entries
-54d2305 doc: Added Java example for setting protocol to HTTP.
-145c480 doc: Text of diagram for osd_throttles.
-8d70c09 doc: Omitted text diagram, and used literal include to text file.
-e6ad9da PGLog: only add entry to caller_ops in add() if reqid_is_indexed()
-ddb3a8d unit tests for pg_missing_t
-db85c52 PG: don't write out pg map epoch every handle_activate_map
-5aa0b12 .gitignore: add directory from coverity tools
-cfdd87c mds/Server.cc: fix dereference after null check
-e555558 mds/Server.cc: fix dereference after null check
-d9b00c4 mds/Server.cc: fix dereference after null check
-0b78e2b mds/Migrator.cc: fix dereference after null check
-578e292 mds/Migrator.cc: fix dereference after null check
-c0e3d04 mds/MDCache.cc: fix dereference null return value
-91f6b0f mds/MDCache.cc: fix dereference null return value
-38ee69c mds/MDCache.cc: fix dereference after null check
-5d8440e mds/MDCache.cc: fix dereference after null check
-59cffba mds/Locker.cc: fix dereference after null check
-3969c69 mds/Locker.cc: fix dereference after null check
-bb8798e mds/Locker.cc: fix dereference after null check
-db2fbb1 bench/dumb_backend.cc: check return value of lseek()
-a7a0425 bench/dumb_backend.cc: check return value of posix_fadvise()
-679775a small_io_bench_fs.cc: check return value of FileStore::mkfs/mount()
-2a02409 mds/Locker.cc: fix explicit null dereferenced
-39a53e5 mds/Server.cc: fix explicit null dereferenced
-c5fc52a rgw: only append prefetched data if reading from head
-b1312f9 rgw: don't copy object idtag when copying object
-8f3f053 rgw: Do not assum rest connection to be established
-df2d06d mon: destroy MonitorDBStore before g_ceph_context
-f4eddd7 doc: Updated to reflect glossary usage.
-474bb16 doc: Updated title and syntax to reflect glossary usage.
-7365d0c doc: Updated to reflect glossary usage.
-eb35d73 doc: Updated title to reflect glossary usage.
-65294bf doc: Updated conf with ServerAlias for S3 subdomains.
-442f082 doc: Updated object storage quick start for S3-style subdomains.
-5e450ba doc: Updated text with new glossary terms.
-c4001b1 doc: Removed FAQ from the index.
-d52b805 doc: Removed FAQ doc. It's now in the wiki.
-cf9aa7a debian: guard upstart {start,stop} with -x check
-6bac8ac rbd/kernel.sh: quit looking for snapshot sysfs entries
-1d75b49 debian: add radosgw.postinst
-d126a20 debian: invoke-rc.d does not work with upstart jobs
-446e077 fix test users of LevelDBStore
-ec7731f move log, ondisklog, missing from PG to PGLog
-d1b3eeb os/WBThrottle: remove asserts in clear()
-7802292 os/LevelDBStore: add perfcounters
-a47ca58 mon: make compaction bounds overlap
-f628dd0 os/LevelDBStore: merge adjacent ranges in compactionqueue
-e9c32b9 doc: note openstack changes for Grizzly
-352b7b5 doc: start Hadoop installation docs
-743c528 doc: Hadoop clarifications
-5fa098f Added -r option to usage
-c888d1d mon: fix leak of health_monitor and config_key_service
-3c57061 mon: return instead of exit(3) via preforker
-626de38 mon: Monitor: backup monmap using all ceph features instead of quorum's
-59916b8 debian: stop radosgw daemons on package removal
-9e658f0 debian: stop sysvinit ceph-mds daemons
-70a3832 debian: only stop daemons on removea; not upgrade
-f402568 rbd/concurrent.sh: probe rbd module at start
-0c05955 osd: wait for healthy pings from peers in waiting-for-healthy state
-04aa2b5 osd: distinguish between definitely healthy and definitely not unhealthy
-28ea184 osd: remove down hb peers
-a4d3b47 osd: only add pg peers if active
-b586f4a osd: factor out _remove_heartbeat_peer
-e1dc3fd osd: augment osd heartbeat peers with neighbors and randoms, to up some min
-d20e30a flushed the formatter after closing the primary section in MDLOG, BILOG and GETSHARDINFO :: list()
-50ac891 osd: initialize new_state field when we use it
-a55e03c WBThrottle: add some comments and some asserts
-4b31c7e WBThrottle: rename replica nocache
-45873b5 rgw: verify bucket location only if exists
-80942eb osd: move health checks into a single helper
-c093e5b osd: avoid duplicate mon requests for a new osdmap
-aac828c osd: tell peers that ping us if they are dead
-ea2b232 osd: simplify is_healthy() check during boot
-81a9608 rgw: forward delete_bucket to master region
-482733e mds: stay in SCAN state in file_eval
-0071b8e mds: stay in SCAN state in file_eval
-f71e1b1 Makefile: include new message header files
-29e4e7e osd: do not assume head obc object exists when getting snapdir
-6da4b20 mon: compact trimmed range, not entire prefix
-ab09f1e mon/MonitorDBStore: allow compaction of ranges
-e20c9a3 os/LevelDBStore: allow compaction of key ranges
-f03a6f2 Fixed default region creation issue
-3e5cead rgw: user master region's version of bucket
-e634d9d Use new fuse package instead of fuse-utils
-1bb4e74 mon: disable tdump by default
-4af917d os/LevelDBStore: do compact_prefix() work asynchronously
-dd35c26 osd: fix note_down_osd
-45b84f3 osd: fix hb con failure handler
-054e96c (tag: v0.63) v0.63
-64d1178 rgw: mdlog, bilog RESTful api cleanup
-fabe723 ceph: first cut at --completion
-2dcc266 ceph, MonCommands.h:  code format/help format tweaks
-5bca9c3 HashIndex: sync top directory during start_split,merge,col_split
-1c35556 doc/dev/osd_internals: add wbthrottle.rst
-4d53e9c WBThrottle: add perfcounters
-b528a91 osd/OSDMap: fix Incremental dump
-478b576 kv_flat_btree_async.cc: fix AioCompletion resource leak
-e6efc39 kv_flat_btree_async.cc: fix AioCompletion resource leak
-6939b12 kv_flat_btree_async.cc: fix AioCompletion resource leak
-554b41b Remove mon socket in post-stop
-7e0e096 mds: use "open-by-ino" function to open remote link
-3120d96 mds: open missing cap inodes
-ceaf51f mds: bump the protocol version
-eeb68eb mds: open inode by ino
-617f70d mds: move fetch_backtrace() to class MDCache
-05a7588 mds: remove old backtrace handling
-39b5e76 mds: update backtraces when unlinking inodes
-b88c49b mds: bring back old style backtrace handling
-c9d2e25 mds: rename last_renamed_version to backtrace_version
-6c72111 mds: journal backtrace update in EMetaBlob::fullbit
-03c0fe9 mds: reorder EMetaBlob::add_primary_dentry's parameters
-26effc0 mds: warn on unconnected snap realms
-f3a9f47 mds: slient MDCache::trim_non_auth()
-9424298 mds: fix check for base inode discovery
-c9707f6 mds: Fix replica's allowed caps for filelock in SYNC_LOCK state
-3962a75 mds: defer releasing cap if necessary
-a918e61 mds: fix Locker::request_inode_file_caps()
-2b1b6ca mds: notify auth MDS when cap_wanted changes
-fc94f47 mds: export CInode:mds_caps_wanted
-e21f328 mds: export CInode::STATE_NEEDSRECOVER
-882be6b mds: send slave request after target MDS is active
-38fb2ec mds: unfreeze inode after rename rollback finishes
-8a1114c mds: remove buggy cache rejoin code
-30c6821 mds: fix typo in Server::do_rename_rollback
-e8497f8 mds: fix import cancel race
-0708d44 mds: fix straydn race
-7a6ec35 mds: fix slave commit tracking
-0c1ca8e mds: fix uncommitted master wait
-5426c75 mds: adjust subtree auth if import aborts in PREPPED state
-d7b999b mds: don't stop at export bounds when journaling dir context
-81d073f mds: fix underwater dentry cleanup
-8b4e991 mds: journal new subtrees created by rename
-a6df764 PendingReleaseNotes: notes about enabling HASHPSPOOL
-aa0649c osdmaptool: fix cli tests
-0740811 With mdlog lock and unlock functionality, listing and trimming base on shard_id
-615b54c doc: Updated rgw.conf example.
-6f93541 doc: Updated RGW Quickstart.
-e59897c doc: Updated index for newer terms.
-b4f63ce ceph: --help-all
-99d7bce ceph: fix format strings for Py2.6 compatibility
-ec0371c ceph: print parameter name for CephString in concise_sig
-1e0222a ceph: Clean up/add missing docstrings
-52b23b5 rgw: propagate region on bucket creation
-3044fa8 rgw: determine owner after effetctive user
-4dafea4 rgw: forward request params through upstream REST
-aee6665 mon: Refactor
-6d1e14e pg_pool_t: enable FLAG_HASHPSPOOL by default
-5187649 rgw: enable data sending via http client
-f9b58e0 rados.py: don't access returned buffers if error/SIGINT
-ef4eb4c PGMonitor: dead code removal
-2c51b91 MonCap: add pg r/w to osd capability profile
-0f54748 kv_flat_btree_async.cc: fix AioCompletion resource leak
-7b438e1 kv_flat_btree_async.cc: fix resource leak
-9785478 ceph-disk: remove unnecessary semicolons
-16ecae1 ceph-disk: cast output of _check_output()
-9429ff9 ceph-disk: fix undefined variable
-c127745 ceph-disk: add missing spaces around operator
-580a08c rgw: multiple fixes and cleanups
-2655c1e utime: add asctime()
-8682248 PG: ping tphandle during omap loop as well
-d62716d PG: reset timeout in _scan_list for each object, read chunk
-b8a25e0 OSD,PG: pass tphandle down to _scan_list
-bb407bf doc: Updated Ceph FS Quick Start.
-7c497d9 doc: Added troubleshooting to Ceph FS index.
-3dda794 doc: Added separate troubleshooting for MDS and Ceph FS.
-8b3a04d rgw: iterate usage entries from correct entry
-0c805b6 rgw: rest_client, forward requests
-f2f7353 rgw: some code cleanup
-75600c6 doc: Updates for ceph-deploy and cuttlefish.
-c812bb5 rgw: separate certain request info into different structure
-87cef3d mon: drop unnecessary conditionals
-e09e944 modified:   src/init-ceph.in 	fixed bug in init script, the "df" should be run on remote host by do_cmd, 	and use $host instead of "hostname -s"
-f9ec5a7 msgr: increase port range to 6900-7300 (from -7100)
-1dd99f0 modified:   src/init-ceph.in 	fixed bug in init script, the "df" should be run on remote host by do_cmd, 	and use $host instead of "hostname -s"
-27381c0 osd: ping both front and back interfaces
-92a558b msgr: add Messenger reference to Connection
-2885142 msgr: take an arbitrary set of ports to avoid binding to
-6ad1055 osd: bind front heartbeat messenger to public_addr
-0262301 osd: send hb front addr to monitor at boot
-da1940a osd: create front and back hb messenger instances
-1fee4cc osd/OSDMap: encode front heartbeat addr
-342eed3 osd/OSDMap: hb_addr -> hb_back_addr
-cf977ce osd/OSDMap: new_hb_up -> new_hb_back_up
-6cfdb74 osd/OSDMap: new_up_internal -> new_up_cluster
-3fa6585 osd: Add asserts for seg faults caused by corrupt OSDs
-b355b98 OSDMonitor: fix osd dump (need enclosing section)
-c2e262f osd: skip mark-me-down message if osd is not up
-32dc463 osd, mds: shut down async signal handler on exit
-4a8d996 rbd image_read.sh: ensure rbd is loaded
-87eaaab rgw: clean up s3 signing code
-08c39b8 ReplicatedPG::submit_push_complete don't remove the head object
-eb91f41 messages/MOSDMarkMeDown: fix uninit field
-70c9851 mds: weaken reconnect assertion
-bec630f cephtool/test.sh: add test for --verbose and --concise
-28a6761 ceph: fix --concise (set verbose to False)
-d81d0ea sysvinit: fix osd weight calculation on remote hosts
-caa15a3 sysvinit: use known hostname $host instead of (incorrectly) recalculating
-903d4a0 rgw: add system users
-b35fafb rgw: pre-generate bucket object version before creating it
-0289c44 OSDMonitor: skip new pools in update_pools_status() and get_pools_health()
-751b73a ceph-syn: specify which types of addresses to pick
-a43d353 ceph-mds: specify which types of addresses to pick
-de49967 mon: PaxosService: drop atomic_t on 'proposing'
-c307d42 ceph-osd: specify which types of addresses to pick
-6d89323 ceph-mon: only care about public addr during pick_addresses()
-1ba9f84 common: add mask argument to pick_addresses() to specify what we need
-78a1834 ceph: remove cli test
-e15d290 mon: Paxos: get rid of the 'prepare_bootstrap()' mechanism
-586e8c2 mon: Paxos: finish queued proposals instead of clearing the list
-549e547 mds/Migrator.cc: fix possible dereference NULL return value
-32b024c mds/Migrator.cc: fix possible dereference NULL return value
-ed53bf1 mds/Migrator.cc: delete some empty lines at EOF
-158e740 mds/Migrator.cc: fix possible dereference NULL return value
-7ba34c1 mds/Migrator.cc: fix dereference NULL return value
-de1e355 mds/Migrator.cc: fix possible NULL pointer dereference
-c266d7c mds/Server.cc: fix possible NULL pointer dereference
-fd818a2 src/rbd.cc: silence CID COPY_PASTE_ERROR warning
-fa3149d mds/MDS.cc: fix dereference null return value
-7118108 mds/MDCache.cc: fix possible NULL pointer dereference
-2ff23fe mon: Paxos: finish_proposal() when we're finished recovering
-f70d463 wip: ceph: print help for osd.0, mon.a, mds.a daemon commands
-34c42f6 ceph: admin_socket() returns data rather than printing.
-06a156d admin_socket and all users: command-descriptor support
-27b60d8 Makefile.am: Move cmdparse to libcommon
-ed31524 rados.py, ceph: add timeout for run_in_thread and selected callers
-70a9697 packaging fixes around the new ceph cli:
-7e6c461 ceph: handle our own help printing
-bf6220e mon: Merge in (and add COMMAND() for) compact command
-948d396 ceph: handle non-EINVAL failure on get_command_descriptions
-d302761 objecter: allow osd-destined commands to fail if osd doesn't exist
-a9b4f46 mon: fix stdout vs. stderr throughout monitor
-de1b855 librados, rados.py: rados_*_command: pass inbuflen to handle zeroes
-5225028 osd: handle new-style JSON commands directly (like mon)
-c3f6e64 mon, cmdparse: move dump_cmds_to_json to common/cmdparse
-623d630 ceph: cleanup: remove dead code/imports, note apparently-unused objects
-a568be8 ceph: hack for tell so that we don't have to duplicate "tell <target>" in each command description
-a502daa ceph: figure out which daemon should get a command early
-9a08573 ceph: add partial to validate()
-aa7f52f ceph: move parsing of a json funcsig into function for reusability
-26df7ac ceph: allow CephName to validate when given only an 'id'
-2a663a9 rados.py: no exception on error, just return errno to caller
-0b9601d MonmapMonitor: use parsed destination for mon tell
-fc629e6 MonmapMonitor: mon tell: allow 'type.id' or 'id' as well as 'n'
-d7c6885 ceph: send pgid in command strings of pg tell
-3ff7c36 ceph: return error from json_command rather than raising exception
-5f211ef ceph: clean up line wraps, comments, add verbose command output
-95e411d ceph: implement -w/--watch.
-2ce5cb7 rados.py: change all calls to librados to be on a child thread
-4849084 rados.py: implement rados_monitor_log
-bcf064f librados: rados_monitor_log's cb takes two ints rather than timespec
-4dc6a16 mon/PGMonitor: reflow command methods
-590cffe mon/OSDMonitor: restructure command flow
-d87e371 mon: fix 'osd dump'
-db589d1 vstart.sh: use new mon cap profiles
-05dda0f mon: weaken security check on 'log' command
-73d08b9 mon: wire new command map to new caps
-839d5b3 mon: transition from MonCaps -> MonCap
-489cd5c FileStore: integrate WBThrottle
-6670e2a os/: Add WBThrottle
-917341e ceph-object-corpus: note MForward encoding change
-5d7dd5a mon: bump wire protocol version
-1123fc2 mon/MonCap: add new MonCap implementation
-27dc4fe osd/OSDCap: avoid typedef for rwxa_t; rename to osd_rwxa_t
-2aefee2 osd/OSDCap: fix allow_all() check
-dc4a508 ceph: remove ceph tool cli tests
-039b757 librados: add rados_monitor_log()
-e830de5 librados: unit tests for mon_command
-63017ba rados.py: use librados-allocating versions of *_command
-a090abf librados: use memcpy rather than strncpy for possibly-NUL data
-d490041 ceph: restructure so old-style commands and new-style can share code
-93d8125 rados.py: remove debug prints from *_command
-9e8397a Check for and handle old-monitor
-d5075ca Return correct error to main; always write outs to stderr
-2919bde Set conffile to passed -c, not conf
-d5497fa rados.py: errnos must have errno. qualifier
-7dbe4ef ceph: pop off 'target' before sending command
-808f518 ceph: fix exception msg
-3b7062b RadosClient: handle command replies
-2e52649 ceph: 'ceph daemon <name|path> <command ...>'
-e748d9b ceph: add support for --admin-socket <path>
-e3f13e8 vstart.sh: set python path(s); echo something for user to paste
-aeeabcd librados: add *_command() variants that allocate the result w/ malloc
-1af5f74 wip: osd tell commands, CephFileparse, etc.
-4698d99 Enhance cephtool tests for coverage of CLI rewrite
-f26bd55 mon, ceph: transition to separate CLI parsing
-d9ff7d4 mon: add JSON command parsing framework
-ed2266a Formatter: fix XML parsing assert
-3148482 Formatter: add new_formatter(type)
-850a4cc Rename "ceph" tool to "ceph-legacy-cli"
-4227490 rados.py: functions for new librados functions {mon,osd,pg}_command
-3bc0d3f Add C and C++ interfaces to mon_command, osd_command, pg_command
-a9ce311 str_list: cleanup/enhancement
-2e17222 osdc/Objecter: implement osd and pg commands
-9f55333 mon/MonClient: assume tid 0 is the first command
-0c6a31c mon/MonClient: add mon command handling
-5e21b30 mon: set tid on MMonCommandAck
-17cf8df Revert "mon: fix validatation of mds ids in mon commands"
-e9d20ff mon: implement --extract-monmap <filename>
-5110497 doc: update mon cluster rescue process for cuttlefish+
-132d5bf Fix usage for "ceph osd lost"
-c0268e2 mon: implement --extract-monmap <filename>
-669e45e rgw: forward bucket creation to master region
-5671fa9 ceph-monstore-tool: implement getmonmap
-d48f1ed rgw: protect ops log socket formatter
-0866517 FileStore: add fd cache
-14d8cc6 ceph-fuse: add ioctl support
-bcc8bfd ceph-disk: fix stat errors with new suppress code
-ca28d87 common/shared_cache.hpp: fix set_size()
-17a6e7f doc/dev/osd_internals: add some info about throttles
-12eff5d common/shared_cache.hpp: add clear()
-bfb08ee rbd image_read.sh: test different clone object orders
-7ad5ceb rbd image_read.sh: add clone-of-clone testing
-a6b4847 rbd image_read.sh: allocate local file at create time
-512e907 rbd image_read.sh: a few cleanups
-cbff720 rbd: prevent import of a dir
-ebc0913 ceph-monstore-tool: be more verbose when replaying a trace
-a6569c5 ceph-monstore-tool: compact command
-9cc787a ceph-monstore-tool: dump-keys command
-7be705e rgw: infrastructure to send requests to different region
-1c7b9c3 os/LevelDBStore: fix compression selection
-19c5ac3 Use invoke-rc.d in maintainer scripts
-047d32a Added send_response implementation for MDLOG and BILOG list APIs so that periodic flushing can happend in execute()
-183280c PG: kill some dead IndexedLog methods
-4cf00b9 OSD: kill old split code, it's been dead for a while
-2f193fb debian: stop sysvinit on ceph.prerm
-d2a4253 mds: better error check on sessionmap load
-87767fb mon: be a bit more verbose about osd mark down events
-03b9326 Makefile: add -Wformat-security
-a7096f8 rgw: add access key to zone info
-d05a4e5 ceph df: fix si units for 'global' stats
-0c2b738 ceph df: fix si units for 'global' stats
-17f6fcc Remove stop on from upstart tasks
-6340ba8 Fix -Werror=format-security errors
-947e133 MDLOG and BILOG REST Apis implemented along with some bug fixes
-8bba266 libcephfs: add ceph_get_pool_name()
-feec1b4 doc: Added more glossary-compliant terms and indexing.
-5c4b4f0 doc: Added another instance term to the glossary.
-decf342 doc: Minor improvements to Ceph FS landing page.
-0f4c67f rgw: store region in bucket info
-3255f11 libcephfs: get the pool name of a file path
-3562c8c libcephfs: get replication factor of a file handle/path
-877fcf0 libcephfs: get file handle/path layout info
-42c74fd libcephfs: get stripe_unit/stripe_count/object_size/pool_id by file handle/path
-10496a8 libcephfs: fix typos
-ee3d50e Client: get describe_layout by file handle/path
-69e2cbe mon: add 'compact' command
-a130cd5 kv_flat_btree_async.cc: release AioCompletion before leave the loop
-4ba70f8 librbd/internal.cc: fix resource leak
-7494e4e doc: Omitted literal syntax from toc.
-381ad24 doc: Added fuse syntax to the fstab doc.
-c80c6a0 sysvinit: fix enumeration of local daemons when specifying type only
-d8d7113 udev: install disk/by-partuuid rules
-65072f2 mon: clear pg delta after some period
-acf6b8f os/FileStore: fix replay guard error msgs (again)
-9b9d322 test_filestore_idempotent_sequence: unmount prior to deleting store
-5a27e85 Revert "test_filejournal.cc: cleanup memory in destructor"
-aacc9ad librbd: make image creation defaults configurable
-c49ba75 os/FileStore: print error code to log on replay guard failure
-53ee6f9 rbd.py: fix stripe_unit() and stripe_count()
-810306a cls_rbd: make sure stripe_unit is not larger than object size
-8fa3039 doc: Added index reference.
-74a73f2 doc: Added glossary references and index references.
-5737d03 doc: Added cluster map and CRUSH definitions.
-58a880b doc: Fixing index references.
-46f5f58 doc: Added latency comment.
-604c83f debian: make radosgw require matching version of librados2
-eaf3abf FileJournal: adjust write_pos prior to unlocking write_lock
-541396f client/Client.cc: fix/silence "logically dead code" CID-Error
-64871e0 mds: avoid assert after suicide()
-49033b6 objclass/class_debug.cc: reduce scope of 'n' in cls_log()
-297b573 tools/ceph-filestore-dump.cc: reduce scope of 'r' in export_files()
-a634a13 test/system/systest_runnable.cc: reduce scope of 'ret' in join()
-6147df4 test/system/st_rados_list_objects.cc: reduce scope of 'ret' in run()
-56f8c36 test/system/st_rados_create_pool.cc_ reduce scope of 'ret' in run()
-d226d9c test/system/rados_list_parallel.cc: reduce scope of 'ret'
-8f486f0 test/librbd/test_librbd.cc: reduce scope of several variables
-95bf066 rgw/rgw_tools.cc: reduce scope of 'ret' in rgw_get_obj()
-492553b rgw/rgw_common.cc: reduce scope of 'end' in two cases
-682f107 rgw/rgw_bucket.cc: reduce scope of 'max' in rgw_remove_bucket()
-9d6e086 rgw/rgw_admin.cc: reduce scope of 'ret'
-a3eeb9f rgw/rgw_acl_s3.cc: remove local variable 'ret' from create_from_headers()
-b9fe22b rbd_fuse/rbd-fuse.c: reduce scope of some variables in open_rbd_image()
-393de32 osdc/Objecter.cc: reduce scope of skipped_map
-84ce4e9 os/chain_xattr.cc: reduce scope of local variable
-829fdd4 src/os/LFNIndex.cc: reduce scope of suffix_len
-8254072 os/HashIndex.cc: reduce scope of a local variable
-ea7d8a4 os/FileStore.cc: reduce scope of a local variable
-2c60bc1 src/os/FlatIndex.cc: reduce scope of suffix_len
-4427528 src/os/DBObjectMap.cc: reduce scope of some variables
-14871d0 mount/mount.ceph.c: reduce scope of 'skip' in parse_options()
-eb808cf src/mds/flock.cc: reduce scope of old_lock_to_end in two cases
-ce84a22 mds/Locker.cc: reduce scope of forced_change_max
-e7d4782 src/crush/mapper.c: reduce scope of some local variables
-e0f1084 auth/Crypto.cc: reduce scope of local variable in_buf
-aa11c68 rgw/rgw_rados.cc: remove not needed code
-cd48f57 rgw/rgw_gc.cc: fix possible NULL pointer dereference
-403bfa4 osd/OSD.cc: remove unused variable
-17d8ee9 Fix some little/big endian issues
-769a16d Makefle: force char to be signed
-3759daa OSD: After repairs finish a new deep-scrub should be avoided
-c0378b6 OSD: Repair with 0 fixed doesn't complete properly
-e34a56f doc: fix mkcephfs production use, deprecated note
-3ac7fb8 rgw: parse location constraint on bucket creation
-a7e80e2 rgw: a function to read all request input
-84c17b6 rgw: update json encode/decode for new bucket info
-c8ac287 rgw: add region to bucket info
-b646407 Modified PutMetadata::get_data() to handle chunked transfers
-3c8ef2b ceph_json: don't try to parse NULL buffer
-0219774 Removed the check for parameter validation in op_get()
-efaa33f Fixed certain bugs on rest admin APIs
-bf612f0 rgw: modify metadata RESTful implementation
-648c3bc With admin metadata rest API implementation and unit test cases for it
-8f3fb97 Added OSD to glossary, removed parenthetical.
-f36ec02 doc: Updated architecture document.
-48e89b5 OSD: scrub interval checking
-1f4e7a5 OSD: Don't scrub newly created PGs until min interval
-7b93d28 doc/release-notes: v0.62
-52b0438 doc/rados/configuration: fix [mon] osd min down report* config docs
-2a4425a reflect recent changes in the pg deletion logic
-1c53991 fix typos and add hyperlink to peering
-b7d4012 typo s/come/some/
-dbddffe update op added to a waiting queue or discarded
-e9935f2 (origin/wip-rgw-bucketlog-3) ceph_json: fix bool decoding
-67ecd75 rgw: json_encode json a bit differently
-afeb8f2 md/Sever.cc: fix straydn assert
-e69257e rgw/rgw_user.cc: fix possible NULL pointer dereference
-d692902 mds/Server.cc: fix possible NULL pointer dereference
-fb222a0 mds/Server.cc: fix possible NULL pointer dereference
-c87788b mds/Server.cc: fix possible NULL pointer dereference
-088455f librados/AioCompletionImpl.h: add missing Lock
-8a52350 src/dupstore.cc: check return value of list_collections()
-70a4a97 mds/Server.cc: fix possible NULL pointer dereference
-21489ac src/rbd.cc: use 64-bits to shift 'order'
-3e44682 mon/Monitor.cc: init 'timecheck_acks' with '0' in constructor
-528ec35 mon/Monitor.h: init 'crc' in constructor with '0'
-9883630 mon/QuorumService.h: remove unused QuorumService::flags
-8df55e0 test/test_cors.cc: initialize key_type in constructor
-eac545e tools/ceph.cc: cleanup memory allocated for 'buf'
-c3c140b tools/ceph.cc: close file descriptor in error case
-043ea2c tools/ceph.cc: close file descriptor in error case
-3602891 test_filejournal.cc: cleanup memory in destructor
-7ea44ee librbd/test_librbd.cc: free memory in test_list_children()
-3c285c4 scratchtool.c: cleanup rados_t on error
-cab8e9b test/kv_store_bench.cc: fix resource leak
-d8cb7df filestore/test_idempotent_sequence.cc: fix FileStore leaks
-349cfb4 ceph-filestore-dump.cc: cleanup on error case
-df4c099 ceph-filestore-dump.cc: cleanup resource in error case
-9382379 (tag: v0.62) v0.62
-c5deb5d doc/release-notes: v0.61.2
-97a7309 rgw: tie bucket/user removal to mdlog differently
-4bb4063 ceph_test_libcephfs: parse environment
-f24b8fb PG: fix some brace styling
-72bf5f4 PG: subset_last_update must be at least log.tail
-395a775 SimpleThrottle: fix -ENOENT checking
-d06d0c3 rgw: slightly simplify metadata abstraction
-bb6d1f0 rgw: read bucket metadata before writing it
-88af2b0 Replace mis-named mon config variables using mon_osd_min_down_reports/mon_osd_min_down_reporters
-225fefe ceph-disk: add '[un]suppress-activate <dev>' command
-5c305d6 mon: fix validatation of mds ids in mon commands
-ba05b16 mon: Monitor: tolerate GV duplicates during conversion
-6db072d libcephfs: add ceph_conf_parse_env()
-9ec77eb ceph_test_libcephfs: fix xattr test
-9bb58b2 OSD: We need to wait on CLEARING_DIR, not DELETED_DIR
-13ae13a librbd: add options to enable balanced or localized reads for snapshots
-0c7414b ReplicatedPG: send -EAGAIN for both balanced and localized reads
-4ddaea7 librados: add per-ObjectOperation flags for balanced and localized reads
-442f058 librados: add sparse_read() to the C++ bindings for an ObjectOperation
-d519346 Objecter, librados: use only ObjectOperation form of sparse_read internally
-ed76824 Objecter: fix error handling for decoding stat
-82211f2 qa: rsync test: exclude /usr/local
-459c731 osd/OSD.h: fix try_stop_deletion
-a0d238c rgw: cache obj version
-93f2794 Throttle: move start_op() to C_SimpleThrottle constructor
-613d747 librbd: run copy in parallel
-fb299d3 librbd: move completion release into rbd_ctx_cb()
-a6d0a25 librbd: parallelize and simplify flatten
-bfa1066 librbd: only send non-zero copyup data
-cfece23 librbd: parallelize rollback
-922df6c rgw: op->PutACLs uses the correct set_attr for buckets
-1f0b947 rgw: rados->set_attr() just calls rados->set_attrs()
-437d69e mds/CDir.cc: fix possible dereference after NULL check
-c006151 ceph-monstore-tool.cc: check if open() was successful
-d1e0fc6 kv_flat_btree_async.cc: fix resource leak
-f6635cb client/SyntheticClient.cc: check return value of describe_layout()
-cb91f0f client/Client.cc: fix possible NULL pointer dereference
-5af2cbf rados.cc: fix leaking of Formatter*
-4b3a7dc client/SyntheticClient.cc: fix another memory leak
-b9fbc82 client/SyntheticClient.cc: fix memory leak
-447f318 mds/MDCache.cc: fix dereference NULL pointer
-d258df4 mds/MDCache.cc: add NULL pointer check
-5392e97 mds/Server.cc: remove dead default in switch
-f56cb98 osd/OSD.h: add missing unlock of osd_lock
-b097f65 rgw/rgw_rest.cc: remove dead and unneeded code
-5babc81 rbd.cc: fix error handling
-4908079 rados_sync.cc: remove dead and not needed code
-077cdb0 test/omap_bench.cc: remove dead code
-0c70e44 libcephfs/test.cc: add assert for result of ceph_getxattr()
-8d61466 rgw/rgw_user.cc: add missing break in switch
-d9c5b5b client/SyntheticClient.cc: add missing break in switch
-6e241b9 ObjectStore.cc: add missing break in switch
-92db7a0 rgw: metadata handler for bucket set_attr operations
-27fb38b doc: Fixed typos. Somehow got a merge error.
-65768a6 mds: be more explicit about path_traverse completion
-8eaa15f doc: fix broken link to ceph-deploy in release notes
-3b2c5fb librados: add selfmanaged_snap_rollback as an ObjectOperation
-4095641 librbd: delete more than one object at once
-537386d Throttle: add a simpler throttle that just blocks above a threshold
-261aaba doc: Added entry for the RGW Admin Ops API.
-54e7a6f libcephfs_jni.cc: reduce scope of ret variable
-cd0f461 include/ceph_hash.cc: reduce scope of a var in ceph_str_hash_rjenkins()
-ad2990c include/addr_parsing.c: reduce scope of port_str in safe_cat()
-cc3376c global/global_init.cc: reduce scope of ret in global_init_daemonize()
-73a10ac crush/builder.c: reduce scope of oldsize in crush_add_bucket()
-e064e67 common/safe_io.c: reduce scope of some ssize_t variables
-8c97e77 common/obj_bencher.cc: reduce scope of avg_bandwidth
-6256d3e common/ceph_argparse.cc: remove scope of some variables
-b66b8dd common/admin_socket.cc: remove scope of ret variable in do_accept()
-e7d1114 cls/rbd/cls_rbd.cc: reduce scope of variable rc
-cdfc4a7 rgw/rgw_op.cc: use empty() instead of size()
-45ffb36 ceph-filestore-dump.cc: use empty() instead of size()
-723062b doc: Updated usage syntax. Added links to hardware and manual OSD remove.
-01a07c1 OSD: rename clear_temp to recursive_remove_collection()
-f5a60ca osd: remove_dir use collection_list_partial
-8b3cd6e rgw: don't handle ECANCELLED anymore
-7a8d6fd PG,OSD: delay ops for map prior to queueing in the OpWQ
-d3dd99b PG: no need to wait on DeletingStateRef for flush
-0ef9b1e osd_internals/pg_removal.rst: update for pg resurrection
-90f50c4 OSD: add pg deletion cancelation
-b274c8a common/sharedptr_registry.hpp: add remove
-0557e6c rgw: bucket metadata operations go through metadata handler
-270ca62 doc: Updated doc for connectivity. Updated text with glossary terms.
-e417312 doc: Updated disk syntax. Updated text with glossary terms.
-af91928 doc: Added connectivity section. Updated doc with glossary terms.
-f1b13a1 doc: Added the non-implemented bit for the gateway to the dev/radosgw TOC.
-69b6482 OSD: don't rename pg collections, handle PGs in RemoveWQ
-fe164e4 doc: Republishing the admin operations API for the gateway.
-d4732e8 doc: Republishing the admin operations API for the gateway.
-00e9031 osd: prioritize recovery for degraded pgs
-09163a3 Add priority option to AsyncReserver class
-df049c1 AsyncReserver: Remove assert in set_max() for max > 0
-da271f7 doc: Document admin api web interface.
-619a68a armor: don't break lines by default
-770d94d rgw: implement metadata hander for buckets data
-499edd8 osd: initialize OSDService::next_notif_id
-e30a032 osd: init test_ops_hook
-72b5629 rbd: fix buffer leak in do_import
-2bc0883 librbd: fix possible use-after-free
-4a90af8 ceph-filestore-dump: fix uninit fields in ctor
-99958e2 rgw: fix various uninit class fields
-ad073c2 radosgw-admin: fix fd leak in read_input()
-110a823 rados: fix fd leak
-3dc7c32 rados: fix buffer leak
-4087e42 os/Filestore: fix fd leak in error path
-8632707 mon: fix Formatter leak
-76b9024 mds: fix fd leak
-5433462 doc/release-notes: v0.61.1 release notes
-e5b2ca8 PG: rename must_delay_request to op_must_wait_for_map, make static
-6c1e479 mon: dump MonitorDBStore transactions to file
-5a631b8 osd: optionally enable leveldb logging
-bb4f65a mon: allow leveldb logging
-a284c9e common/Preforker: fix warnings
-3ebddf1 debian/control:  squeeze requres cryptsetup package
-83bbae4 debian/control:  squeeze requres cryptsetup package
-46c3e48 ceph_json: dump timestamp in utc
-551571c rgw: datalog trim
-52666dc PG: reassert_lock_with_map_lock_held() is dead
-17705d7 OSD,PG: lock_with_map_lock_held() is the same as lock()
-e2528ae ceph-create-keys: gracefully handle no data from admin socket
-f2a54cc init-ceph: fix osd_data location when checking df utilization
-ea809f7 rgw: bucket index log trim
-546ed91 osd: don't assert if get_omap_iterator() returns NULL
-76b736b rgw: metadata log trim
-36ec6f9 osd: don't assert if get_omap_iterator() returns NULL
-3846451 rgw: user operation mask
-ef82ad7 rgw: resend data log entry if took too long
-3385c2c rgw: more data changes log implementation
-a37092f RefCounteCond: keep return val, wait() returns it
-f28df17 rgw: changed data log renew thread
-39b258c rgw: limit num of buckets in data changes log
-d5da152 rgw: use shared_ptr instead of RefCountedObject
-5e642fa lru_map: infrastructure for a bounded map
-6659b2b rgw: data changes log, don't always send new requests
-171b0bf rgw: data changes log, naive implementation
-988dab3 rgw: decouple bucket data pool from bucket index pool
-8e89db8 OSD: handle stray snap collections from upgrade bug
-252d71a PG: clear snap_collections on upgrade
-438d9aa OSD: snap collections can be ignored on split
-1870516 mon: set MonitorDBStore options on open
-393c937 ceph: return error code when failing to get result from admin socket
-dbcd738 ceph-monstore-tool: added replay
-aa94f5b ceph-monstore-tool: add MonitorDBStore trace dumper
-797089e mon: dump MonitorDBStore transactions to file
-4fbf9a7 rgw: fix get_obj() with zero sized obj
-0b526d9 rgw: don't set shadow obj attr in object metadata
-abef2b2 rgw-admin: object stat also decodes policy
-d05d05a rgw: update cli test for radosgw-admin
-2983d98 Makefile.am: add missing header file
-7132e6e rgw-admin: add object stat command
-49b3d2e rgw-admin: bucket list also specifies object namespace
-4b142a1 rgw: copy_obj uses req_id as tag
-b295c64 rgw: radosgw-admin bucket list --bucket lists bucket objects
-3d7b839 rgw: call rgw_store_user_info() with objv_tracker
-85e4ea9 rgw-admin: fix some more merge issues
-fa23b3e rgw-admin: fix user_id initialization
-7e08c57 rgw: share object tag and index tag
-2a16baf rgw: bucket index log fixes
-871b401 radosgw-admin: bilog list gets marker and max-entries params
-b1578ba radosgw-admin, cls_rgw: list bucket index log
-5e19628 cls_rgw: bucket index versioning
-d857896 rgw: fix broken radosgw-admin user * commands
-abd0ab3 cls_rgw, rgw: bucket index logs modifications
-478fe5e rgw: metadata rm
-fe63d44 rgw: cls_log_trim boundary change
-288645d rgw: show metadata log through radosgw-admin
-75ada77 rgw: use new cls_log listing interface
-8444db6 cls_log: adjust listing api
-cb6d4de rgw: log user operations
-7ca9192 rgw: track object versions between reads and writes
-72220bf rgw: initialize meta_mgr earlier
-e98ca56 test_cls_log: remove warning
-0cdce74 cls_log: extend unitest
-c28f864 cls_log: more fixes
-815e0ac cls_log: unitest
-5313b99 cls_log: fixes, other adjustments
-fee51dd objclass: provide new api for unique subop versioning
-4feac81 osd: keep track of current osd subop num
-b77422f cls_log: trim works in chunks, returns -ENODATA when done
-7c19f96 cls_log: a class to handle info sorted by timestamp
-0cccd7c rgw: metadata list user, only show uids
-272635f rgw: user metadata updates also key version
-ff2d3c9 rgw: add top level metadata handler
-dcee3a1 rgw: put metadata, other cleanups
-1269986 rgw: metadata manager, api to list keys
-7cfa89d rgw: metadata set/get infrastructure
-fe96600 rgw: rgw_get_system_obj() can return obj_version
-2223d99 cls_version: add cls_version_read(ObjectReadOpeation&)
-1563ad1 librados: add two more ObjectOperation::exec()
-5f1b897 rgw: start tying metadata objs to version objclass
-913ecd4 cls_version: unitest
-8d7d436 cls_version: various fixes
-6a5966c cls_version: create a new objclass
-8bab4fe rgw: fix json decoding of rgw_bucket
-8bb5e0a rgw: regionmap update
-8ef4f39 rgw: get/set region map
-ea4d033 rgw: zone list, setup changes
-e27f889 common/ceph_parser.cc: cleanup
-67db8a6 rgw: set region info, default region
-5cc34ff rgw: can list regions, show default region info
-708339a rgw: some region/zone related cleanups/fixes
-a12357c rgw: admin command to show region info
-6fa5480 rgw: derr -> lderr
-488a20d rgw: region creation
-960fa0d rgw: region management encoding/decoding changes
-64aa4e4 rgw: define region/zone data structures
-f0c0997 doc/install/os-recs: reverse order of releases
-f8ae2bd doc: Fixed typos.
-452fb52 doc: Fixed typo.
-a0cb5e5 doc: Removed "and" as suggested.
-ad75582 doc: Fixed hyperlink.
-87160c4 doc: Fixed path typo.
-2d6e4d2 doc: Updated OS support for Cuttlefish.
-67b60b9 doc: Minor tweak to the definition list style.
-fd63f8a WorkQueue: Allow WorkQueueVal to be specified with 1 type
-4b548b5 OSD: removal collections will be removed inline and not queued
-d7cd957 OSD::clear_temp should clear snap mapper entries as well
-7b22cfb PG,OSD: mark info as backfilling in _remove_pg()
-c207516 doc: Added glossary to TOC.
-473aae9 doc: Added glossary.
-4e99dca doc: Fixed usage typo.
-8586738 Fix whitespace indentation
-ad504e9 Implement 'config get <var>' for the admin socket
-27d86bd fixed common typo in error messages
-2bd2731 doc/install/{debian,rpm}: update for cuttlefish
-7c3a0e8 doc/start/get-involved: fix links
-b107081 doc/release-notes: I missed rgw rest api in the release notes
-9d85d67 os/ObjectStore: add missing break in dump()
-c693ba5 rados: add whole-object 'clonedata' command
-298ebdb doc: Deleted redundant "so that" phrase.
-277f2de doc: Corrected typo.
-359bd6d doc: Corrected typo.
-2d4b5bd Removed comment out of header, and added "coming soon."
-1cfc6e3 doc: Updated usage for push | pull.
-048e049 Clean up defer_recovery() functions
-bd36e78 osd: make class load errors louder
-0b4c5c1 osd: optionally enable leveldb logging
-c1d5f81 mon: allow leveldb logging
-237f3f1 (tag: v0.61) v0.61
-eb69c7d os/: default to dio for non-block journals
-60603d0 ceph-disk: use separate lock files for prepare, activate
-e662b61 ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool
-eae02fd ceph.spec.in: remove twice listed ceph-coverage
-71cef08 ceph.spec: add some files to ceph
-c5d4302 doc: Update the usage to reflect optional directory name.
-35acb15 doc: Rearranged to show zapping multiple disks and creating multiple OSDs.
-8add78c doc: Moved install to the second step, from the first step.
-6abbe68 doc: Autonumbering syntax correction.
-efa460c doc: Added troubleshooting PGs to the index.
-cddf3b5 doc: Commented out osd list for now.
-0c0fc03 doc: Commented out remove a mds for now.
-41eecf4 doc: Forwarding link. FAQ migrated to new Ceph wiki.
-3540d90 ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool
-6f33885 ceph.spec.in: remove twice listed ceph-coverage
-acb60e5 ceph.spec: add some files to ceph
-1a67f7b mon: fix init sequence when not daemonizing
-a763569 ceph: add 'osd crush rule ...' to usage
-3f0b8ec mon: avoid null deref in Monitor::_mon_status()
-a968692 mon: generate useful error msgs for 'osd crush rule create-simple ...'
-8894c50 crush: return -1 on error from get_type_id
-b2501e9 ceph.spec: require xfsprogs
-a0988be doc/release-notes: warn about sysvinit crush map update
-c189d85 init-ceph: update osd crush map position on start
-2e0dd5a mon: fork early to avoid leveldb static env state
-6f8c1e9 doc/release-notes: add/link complete changelogs
-4fa2c49 doc/release-notes: v0.56.5
-72fc6eb doc: Fixed typos.
-5cdd731 Revert "mon: fix Monitor::pick_random_mon()"
-b4e73cc doc/install/upgrading...: note that argonaut->bobtail->cuttlefish must be v0.56.5
-039a3a9 tools/: add paranoid option to ceph-osdomap-tool
-2610528 osd: default 'osd leveldb paranoid = false'
-444660e librados,client: bump mount timeout to 5 min
-6a61268 OSD: also walk maps individually for start_split in consume_map()
-c659dd7 rgw: increase startup timeout to 5 min
-45c9e24 doc/install/upgrading...: note about transitioning to ceph-deploy
-a8d4647 doc/release-notes: note about ceph-deploy
-f95a053 Update debian.rst
-615b84b Makefile,gitignore: ceph-monstore-tool, not ceph_monstore_tool
-628e232 Makefile: put ceph_monstore_tool in bin_DEBUGPROGRAMS
-d0d93a7 tools: ceph-osdomap-tool.cc
-f498226 OSD: load_pgs() should fill in start_split honestly
-3e0ca62 OSD: cancel_pending_splits needs to cancel all descendants
-d944180 osd: add --osd-leveldb-paranoid flag
-7cc0a35 mon: add --mon-leveldb-paranoid flag
-dfacd1b dumper: fix Objecter locking
-7bb145b doc/rados/deploy: note that osd delete does not work yet
-771f452 doc/rados/deploy: misc edits
-a21ea01 Revert "PaxosService: use get and put for version_t"
-88c030f mon/Paxos: update first_committed when we trim
-3a6138b mon/Paxos: don't ignore peer first_committed
-bb270f8 mon: Monitor: fix bug on _pick_random_mon() that would choose an invalid rank
-7f48fd0 mon: Monitor: use rank instead of name when randomly picking monitors
-8a8ae15 OSD: clean up in progress split state on pg removal
-2f6eb39 docs: Update links to Github and the Tracker
-81b06be docs: Update the ceph-users join and leave addresses
-b3f37ea docs: Update CloudStack RBD documentation
-fe68afe mon: communicate the quorum_features properly when declaring victory.
-b17e842 doc: Incorporating Tamil's feedback.
-bd6ea8d doc: Reordered header levels for visual clarity.
-bb93eba doc: Fixed a few typos.
-14ce0ad doc: Updated the upgrade guide for Aronaut and Bobtail to Cuttlefish.
-7de29dd doc/release-notes: update cuttlefish release notes to include bobtail
-cd1d6fb ceph-disk: tolerate /sbin/service or /usr/sbin/service
-a97ecca mon: Monitor: disregard paxos_max_join_drift when deciding whether to sync
-a39bbdf mon: if we get our own sync_start back, drop it on the floor.
-d00b4cd Revert "mon: update assert for looser requirements"
-cedcb19 Revert "mon: when electing, be sure acked leaders have new enough stores to lead"
-c2bcc2a ObjectCacher: wait for all reads when stopping flusher
-6ae9bbb elector: trigger a mon reset whenever we bump the epoch
-0acede3 mon: change leveldb block size to 64K
-6f2a7df doc: Fix typo.
-35a9823 doc: Added reference to transition from mkcephfs to ceph-deploy.
-de31b61 doc: Updated index for new pages. Added inner table.
-fa9f17c doc: Added transition from mkcephfs to ceph-deploy page.
-02853c5 doc: Added purge page to ceph-deploy.
-45d12f1 doc: Added OSD page to ceph-deploy.
-0b912f4 doc: Added mds page for ceph-deploy.
-3c46c51 doc: Added admin tasks page for ceph-deploy.
-1c15636 Set num_rd, num_wr_kb and num_wr in various places that needed it
-adb7c8a osd: read kb stats not tracked?
-b5e2461 osd: Rename members and methods related to stat publish
-bd68b82 mon: enable 'mon compact on trim' by default; trim in larger increments
-929a994 mon: share extra probe peers with debug log, mon_status
-030bf8a debian: only start/stop upstart jobs if upstart is present
-825a431 man: update remaining copyright notices
-4abf081 man: refresh content from rst
-1bd011a PG,OSD: _remove_pg must remove pg keys
-7146012 OSD: no need to remove snapdirs on _remove_pg()
-8f6a1b8 mon/Paxos: compact on trim
-3cb4f67 mon: compact PaxosService prefix on trim
-e8c9824 mon: add compact_prefix transaction operation
-a2f7d1d leveldb: add compact_prefix method
-90b6b6d mon: compact leveldb on bootstrap
-ee3cdaa mon: compact leveldb on bootstrap
-5fa0f04 mon: --compact argument, config option to compact the store on start
-6a00f33 leveldb: add compact() method
-ffc8557 doc: update rbd man page for new options
-8b2a147 gitignore: add ceph_monstore_tool
-29831f9 Makefile: fix java build warning
-a2fe013 mon: remap creating pgs on startup
-278186d mon: only map/send pg creations if osdmap is defined
-28d495a mon: factor map_pg_creates() out of send_pg_creates()
-896b277 client: make dup reply a louder error
-ee553ac client: fix session open vs mdsmap race with request kicking
-bf0b430 Fix a README typo
-cea2ff8 mon: Fix leak of context
-20d99c4 doc: Removed extra whitespace.
-041b0cf doc: Added rbd-fuse to TOC.
-8f48a3d Added commentary and removed fourth column for now.
-4e805a5 doc: Removed. Redunant information now.
-6612785 doc: Added openssh-server mention, corrections, hyperlink fix.
-21db055 doc: Added openssh-server mention.
-9fa6ba7 doc: Added manpage link and hidden TOC.
-dd6e79a doc: Removed installed Chef. This is now in the ceph wiki.
-945dac6 doc: Removed text for include directive. Wasn't behaving the way I'd hoped.
-3d9bc46 doc: Added ceph-mds to CephFS toc.
-44d13a7 doc: Fix. ceph, not chef.
-5327d06 ceph-filestore-dump: fix warnings on i386 build
-79280d9 OSDMonitor: when adding bucket, delay response if pending map has name
-e725c3e PaxosService: use get and put for version_t
-1e6c390 tools: add ceph_monstore_tool with getosdmap
-50e58b9 ceph.spec.in:  remove conditional checks on tcmalloc
-5c1782a debian/rules:  Fix tcmalloc breakage
-6d348a1 mon: cache osd epochs
-0650fa9 monitor: assert out early if we get our own sync_start back
-1e6f02b mon: update assert for looser requirements
-ba13173 doc: Deleted old index. Generates warnings otherwise.
-9a7a075 doc: General purpose pre-flight checklist.
-9e775f1 doc: Modified Ceph deployment landing page.
-fb8119c doc: Added general pre-flight checklist for ceph-deploy.
-3433aa8 doc: Removed old ceph-deploy placeholder.
-9c0c4c1 doc: Removed Chef section. Now appears in new Ceph wiki.
-c25144e doc: Added Key Management for ceph-deploy.
-d0d1554 doc: Added "Add/Remove Monitors" section for ceph-deploy.
-f24dbde doc: Added Create a Cluster section.
-b631cc6 doc: Added ceph-deploy package management (install | uninstall ) section.
-d85c690 doc: Added new quick start preamble and index.
-3ff7eef doc: Added ceph-deploy preflight.
-9365674 doc: Added ceph-deploy quick start.
-ebbdef2 monitor: squash signed/unsigned comparison warning
-5fa3cbf mon: use brute force to find a sync provider if our first one fails
-c880e95 rgw: fix compilation for certain architectures
-a8b1bfa rgw: fix list buckets limit
-f2df876 rgw: fix bucket listing when reaching limit
-2264078 rgw: swift list containers can return 204
-960eac2 rgw: fix plain formatter flush
-7144ae8 rgw: fix bucket count when stating account
-1670a2b rgw: trivial cleanups post code review
-98f532e Makefile.am: Add -lpthread to fix build on newer ld in Raring Ringtail
-741f468 mon: fix Monitor::pick_random_mon()
-cbc3b91 mon: mark PaxosServiceMessage forward fields deprecated
-77c068d mon: fix double-forwarding check
-e3b602a osd: Fix logic in OSDMap::containing_subtree_is_down()
-a2a23cc debian/rules: use multiline search to look for Build-Depends
-f768fbb client: re-fix cap releases
-5121e56 client: don't embed cap releases in clientreplay
-89692e0 debian/rules: use multiline search to look for Build-Depends
-2146930 mon: do not forward other mon's requests to other mons
-a5cade1 PG: clear want_acting when we leave Primary
-3ce35a6 mon: get own entity_inst_t via messenger, not monmap
-303e739 radosgw: receiving unexpected error code while accessing an non-existing object by authorized not-owner user
-407ce13 PendingReleaseNotes: these are now in the release-notes.rst
-4af93dc doc/release-notes: add note about sysvinit script change
-cd7e52c init-ceph: use remote config when starting daemons on remote nodes (-a)
-d90b0ca gen_state_diagram.py: fix function name
-1ee8f39 gen_state_diagram.py: fix naming of global variables/constants
-d9f8de1 gen_state_diagram.py: add some missing spaces around operators
-7cd9d23 gen_state_diagram.py: remove unnecessary semicolon
-eb3350e test_mon_config_key.py: fix some more naming of local vars
-7436542 test_mon_config_key.py: fix naming of local variable opLOG
-9d3b4fd test_mon_config_key.py: fix naming of local variable
-0407572 fix "Instance of 'list' has no 'split' member"
-c792ea6 test_mon_config_key.py: fix naming of local variable
-912bb82 test_mon_config_key.py: fix naming of global variables/constants
-1464169 test_mon_config_key.py: add missing space after comma
-16c5650 test_mon_config_key.py: remove unnecessary semicolon
-f601eb9 test_mon_config_key.py: fix bad indentation
-9dd5de2 perf-watch.py: fix naming of a local variable
-226ff52 perf-watch.py: fix naming of local variable
-148710f perf-watch.py: add missing space after comma
-dffa9ee perf-watch.py: remove unnecessary semicolons
-ac3dda2 scrub clears inconsistent flag set by deep scrub
-ba527c1 doc/release-notes: enospc note
-2075ec6 doc/release-notes: 0.61 cuttlefish notes
-82d5cd6 ObjectCacher: remove all buffers from a non-existent object
-fcaabf1 mon: when electing, be sure acked leaders have new enough stores to lead
-fb8bad3 mon: be more careful about making sure we're up-to-date on sync check
-290b5eb rgw: fix i386 compile error
-14f2392 FileStore::_split_collection: src or dest may be removed on replay
-3604c98 librados: fix calc_snap_set_diff interval calculation
-81a6165 PG: call check_recovery_sources in remove_down_peer_info
-a9791da mon: send clients away while sychronizing
-12bc9a7 mkcephfs: give mon. key 'allow *' mon caps
-cce1c91 PendingReleaseNotes: note about rbd resize --allow-shrink
-31399d1 Fix typo of the keystone service-create command
-9abec30 rgw: list container only shows stats if needed
-c7a0477 rbd: fix cli-integration tests for striping change
-446641a 95-ceph-osd-alt.rules:  Fix missing parent parameter
-1f7ff41 ReplicatedPG: timeout watches based on last_became_active
-a40772b osd_types: add last_became_active to pg_stats
-d196b5b OSD: don't report peers down if hbclient_messenger is backed up
-49eeaeb Messenger: add interface to get oldest queued message arrival time
-297c671 DispatchQueue: track queued message arrival times and expose oldest
-48631c1 mon: revert part of PaxosService::is_readable() change
-0093d70 librbd: fix i386 build
-857c88e librbd: add read_iterate2 call with fixed argument type
-6c798ed librbd: implement read not in terms of read_iterate
-95ed73a mon: drop forwarded requests after an election
-ab25707 mon: requeue routed_requests for self if elected leader
-4b07d69 mon: track original Connection* for forwarded requests
-8402107 test_filejournal: adjust corrupt entry tests to force header write
-556bb64 rgw: stream list buckets (containers) request
-ccbc4db init-ceph: fix (and simplify) pushing ceph.conf to remote unique name
-7ad63d2 ceph-disk:  OSD hotplug fixes for Centos
-3dd9574 doc: Usage requires --num_osds.
-b71ec9c doc: Added some detail. Calculating PGs, maps; reorganized a bit.
-b73ef01 mon: [MDS]Monitor: remove 'stop_cluster' and 'do_stop()'
-f42fc0e mon: MDSMonitor: tighter leash on cross-proposals to the osdmon
-fa77e1e mon: PaxosService: add request_proposal() to perform cross-proposals
-a634bb1 mon: PaxosService: is_writeable() depends on being ready to be written to
-98e2398 mon: PaxosService: is_readable/writeable() depending on is_active()
-b29a5b1 mon: PaxosService: consider is_recovering() on is_writeable()
-b33fae4 mon: commit LogSummary on every message
-59d6953 mon: set threshold to periodically stash_full
-660752a doc: Added users to Getting Started.
-1164345 ceph-mon: Attempt to obtain monmap from several possible sources
-9ba3240 mon: Monitor: backup monmap prior to starting a store sync
-de5d1da rgw: don't send tail to gc if copying object to itself
-85fd2ca mon: make 'osd pool rmsnap ...' idempotent
-43d62c0 mon: make 'osd pool mksnap ...' idempotent
-08e3ec1 mon: make 'osd blacklist rm ...' idempotent
-5926ffa rbd: only set STRIPINGV2 feature when needed
-5446218 rbd: fix feature display for --info
-568101f rbd: avoid clobbering return value with udevadm settle
-8db9d0a FileJournal: a valid entry after invalid entry =/=> corrupt
-9b953aa radosgw: Fix duplicate 'Content-Type' when using 'response-content-type'
-4b9a2a3 mon: MonmapMonitor: add function to obtain latest monmap
-41b874c mon: PaxosService: add 'exists_key/version' helper functions
-1a8b30e ceph-create-keys:  Don't wait if permission denied
-1fa719d doc: Aesthetic improvements. Removed unnecessary graphic and overrode margin for h3 tag.
-3749ffe doc: Added a scenario to PG troubleshooting.
-cf91594 doc: Changed usage to "bucket-name". Description was okay.
-870f47c tools/ceph-filestore-dump: Implement remove, export and import
-88d9ee1 ReplicatedPG::_finish_mark_all_unfound_lost: only requeue if !deleting
-0e15555 ReplicatedPG::_applied_recovered_object*: don't queue scrub if deleting
-6ef0f16 PG: check for pg change in ~FlushState
-b8cb9d7 PG: bail if deleting in _finish_recovery
-75cb55b AsyncReserver: delete context in cancel_reservation
-d73b9fb tools/ceph-filestore-dump: Error messages lost because stderr is closed
-37d2fe2 osd: Make clear_temp() public for use by remove
-460db08 osd: Add flag to force version write in _write_info()
-da39f91 osd: Create static PG::_write_log() function
-ad845e6 OSDMonitor: pg split is no longer experimental
-56619ab Fix journal partition creation
-fe9d326 rbd: fix qa tests to use --allow-shrink
-d395aa5 init-ceph: do not stop start on first failure
-9a7d1f5 mon: Monitor: fix timechecks get_health clobbering overall status
-aa0d5f3 mon: fix health monitor calls
-be4807f global: call observers (and start logging) in global_init
-76505c2 osd: Create new static function PG::_write_info() for use by PG import
-52d8240 osd: Add OSD::make_infos_oid() as common function to create oid
-5ffb3ef filestore, osd: Fixes to comform to programming guidelines
-fa89cfd mon: QuorumService: return health status on get_health()
-78c9db8 OpRequest: don't maintain history if the OSD is shutting down
-1493e7d osd/: optionally track every pg ref
-66c007f common/: add tracked_int_ptr.hpp
-ec6f71b ReplicatedPG: use the ReplicatedPGRef typedef
-4090eff ReplicatedPG: use ReplicatedPGRef for C_PG_MarkUnfoundLost
-f03ba5a ReplicatedPG: use ReplicatedPGRef for C_OSD_OpCommit
-8fe1b9d ReplicatedPG: use ReplicatedPGRef for C_OSD_OpApplied
-c04c3e5 OSD: use PGRef in handle_pg_remove
-1c2b66c OSD: use PGRef in handle_pg_stats_ack
-c2127a1 PG: use PGRef in QueuePeeringEvt
-0b7795a OSD: use PGRef in consume_map
-f45a541 PG: use PGRef for FlushState
-2f9a35a PG: use PGRef for C_PG_FinishRecovery
-8bd89e1 PG: use PGRef in C_PG_ActivateCommitted
-ce64775 PG: do not put() in scrub() if pg is deleting
-b021036 PG,ReplicatedPG: move intrusive_ptr declarations to top
-220c651 ReplicatedPG: add ReplicatedPGRef
-016e975 FileStore::_do_copy_range: read(2) might return EINTR
-07a80ee FileStore::_do_clone_range: _do_copy_range encodes error in return, not errno
-5e4b8bc config: clarify 'mon osd down out subtree limit'
-cd2cabe doc: Trimmed toc depth for nicer visual appearance.
-44aa696 doc: Added new PG troubleshooting use case.
-2e3579e doc: Updated title.
-304a234 doc: Added PG troubleshooting to toctree.
-d5139ba doc: Bifurcating OSD and PG Troubleshooting. Updated hyperlink.
-3b8057a doc: Bifurcating OSD and PG Troubleshooting. Added PG troubleshooting doc.
-3c4bf83 doc: Bifurcating OSD and PG Troubleshooting. Removed PG section.
-46d8b9f rgw_bucket: Fix dump_index_check.
-b0c1001 mon: ensure 'osd crush rule ...' commands are idempotent
-0d46dc4 mon: make 'osd crush link ...' idempotent
-5f1898d rgw_bucket: Fix dump_index_check.
-87634d8 mds: journal the projected root xattrs in add_root()
-f379ce3 mds: fix setting/removing xattrs on root
-7e4f80b debian/control:  Fix typo in libboost version number
-f4bc760 build:  Add new package dependencies
-fd678ea debian/control:  Fix typo in libboost version number
-4b34b0e mon: PaxosService: fix trim criteria so to avoid constantly trimming
-86c1ea1 build:  Add new package dependencies
-5a5fdfc mon: Paxos: increase debug levels for proposal listing
-a0e457a doc: Removed legacy man page index. Generates warning otherwise.
-d67793c doc: Clarified that admin-socket is accessed from same host.
-da7bf67 doc: Updated hyperlinks to new tshooting section.
-fb4cba4 doc: Removed this doc. Nothing referenced it, and parent directory echoes content.
-f784317 doc: Revised top-level ops page.
-6cf3682 doc: Removed link to nowhere. Otherwise generates a warning.
-064ec2f doc: Removed top-level tshoot page, and created new index.
-0d1e047 doc: Excised community from OSD tshoot, made it stand alone.
-23e3fbe doc: Moved monitor troubleshooting to troubleshooting section.
-594580c doc: Moved troubleshooting OSD to troubleshooting section.
-7875800 doc: Added extraneous rgw settings to rgw conf.
-4e6709b doc: Moved memory profiling from operations to troubleshooting.
-9e9bd2d doc: Moved CPU profiling from operations to troubleshooting.
-f0e3548 doc: Set toc depth to 1 level, and added troubleshooting so it appears in sidebar.
-dd7fd2d doc: Moved journal discussion to OSD ref from Ceph config.
-9ddc8b9 doc: Reordered deployment tools in toc.
-fd8b4d0 doc: Removed logging from config index. Set depth to 1 for clean appearance.
-cd4b242 doc: Removed logging. Added references. Reorganized and edited.
-22a5cb6 doc: Removed. Not in toc, and otherwise generates a warning.
-84b0ec2 doc: Updated hyperlink.
-808ad25 doc: Removed fragmented logging info. Consolidated into one doc.
-3c144e9 rbd: Only allow shrinking an image when --allow-shrink flag is passed
-7b408ec client: disable invalidate callbacks :(
-db37bd8 rbd: add --no-progress switch
-8f21beb leveldbstore: handle old versions of leveldb
-085b3ec mds: change XLOCK/XLOCKDONE's next state to LOCK
-efe7399 mds: pass proper mask to CInode::get_caps_issued
-f25f922 mon: Monitor: convert osdmap_full as well
-1260041 mon: PaxosService: add helper function to check if a given version exists
-246b811 osd/PG.cc: initialize PG::flushed in constructor
-a993d25 Fix policy handling for RESTful admin api.
-f3527d4 Fix policy handling for RESTful admin api.
-544eb9b qa: pull qemu-iotests from ceph.com mirror
-8994566 librbd: flush on diff_iterate
-efce39e doc: Cherry-picked from master to next. Uses ceph-mds package during upgrade.
-82aab8d doc: Cherry-picked from master to next. Rewrite of CloudStack document.
-9753287 doc: Cherry-picked from master to next. Updates config to use virtio.
-72b3919 doc: Cherry-picked from master to next. Reorders ceph osd create.
-3afe84b doc: Cherry picked from master to next. Adds comments on naming OSDs.
-02d3c11 os/FileJournal: fix journal completion plug removal
-d8a354d config: provide settings for the LevelDB stores we use
-fb840c8 osd/PG.cc: initialize PG::flushed in constructor
-4a84ddb client: Fix inode remove from snaprealm race
-0dc0f5b osd/PG.h: remove unused variable prior_set_built
-6133ea5 librbd: use initialized data for DiffIterateDiscard test
-638eb24 librbd: print seed for all DiffIterate tests
-b343c52 doc: Changed MDS upgrade to use ceph-mds package.
-785b25f Fix: use absolute path with udev
-b4fc83c doc: Overhauled Wido's CloudStack document.
-d801ca3 ceph.spec.in: use %{_sbindir} macro again
-98de67d qa: add workunit for running qemu-iotests
-a0ae2ec os: bring leveldbstore options up to date
-6b98162 mds: output error number when failing to load an MDSTable
-ae71b57 init-radosgw.sysv:  New radosgw init file for rpm based systems
-f875c0c mds: only go through the max_size change rigamarole if the client requested it
-9c18fd6 mds: Locker needs to remember requested max_size changes from clients
-87ff4af doc: Added additional note on first step of adding OSD.
-2b6719f doc: Added info on OSD naming, and example.
-a01bc3d doc: Moved ceph osd create to first step.
-74cdbc3 doc: Changed libvirt example to use virtio.
-4977f3e mds: Delay export on missing inodes for reconnect
-3a1cf53 client:  Unify session close handling
-06d05e5 LibrbdWriteback:  complete writes strictly in order
-a329871 OSD: make pg upgrade logging quiet
-351d9b2 rbd qa/workunits: add rbd read data test
-bb8d1c9 rgw_admin: Create keys for a new user by default.
-170d4a3 FileJournal: start_seq is seq+1 if journalq.empty()
-90c256d FileJournal: fix off by one error in committed_thru
-a4fa0a8 Journal: commits may not include all journaled seqs
-13474b0 Journal: pass the sequence number to commit_start
-49bc341 rgw_admin: Create keys for a new user by default.
-a1d9cbe mds: fix session_info_t decoding
-909dfb7 LibrbdWriteback: removed unused and undefined method
-9d19961 LibrbdWriteback: use a tid_t for tids
-870f9cd WritebackHandler: make read return nothing
-f5b81d8 ObjectCacher: deduplicate final part of flush_set()
-4b65673 test_stress_watch: remove bogus asserts
-3888a12 test: update rbd formatted-output for progress changes
-718fa0c pool should be root in osd set syntax for bobtail
-95374c6 config: fix osd_client_message_cap comment
-a48739d FileJournal: clarify meaning of start_seq and fix initialization
-88ab841 Revert "global: call config observers on global_init (and start logging!)"
-be801f6 mon: Use _daemon version of argparse functions
-c76bbc2 ceph_argparse: add _daemon versions of argparse calls
-d7b7ace Pipe: call discard_requeued_up_to under pipe_lock
-4cb18b5 journaler: remove the unused prefetch_from member variable
-3cdc61e mds: Keep LogSegment ref for openc backtrace
-edc9ddf mds: fix journaler to set temp_fetch_len appropriately and read the requested amount
-0031949 md_config_t: change from class to struct as the name indicates
-1734742 rados.py: add docstrings for Ioctx::__aio_*_cb()
-203915c rados.py: add more docstrings
-3daf250 rados.py: add docstrings for *Error classes and others
-2124a4b cephfs.py: add docstring for shutdown() and version()
-94a1f25 rados.py: fix create_pool()
-9adf2e9 rados.py: add some docstrings
-29ae388 rados.py: chmod -x
-059c512 pybind: unify make_ex() code in cephfs.py and rados.py
-5559e1d pybind: add docstrings for make_ex()
-471174b rbd.py: remove unnecessary semicolons
-a309177 global: call config observers on global_init (and start logging!)
-1e7ddd9 global: flush log before stopping/starting on daemonize
-f5ba0fb mon: make 'osd crush move ...' idempotent
-628e9ae librbd: fix DiffIterateStress again
-aca0aea osd: throttle client messages by count, not just by bytes
-f7070e9 msgr: add second per-message throttler to message policy
-79b7144 librbd: fix DiffIterateStress test
-b083dec rgw: translate object marker to raw format
-be6961b Allow creation of buckets starting with underscore in RGW
-6ef9d87 FileJournal: introduce start_seq header entry
-f12a5ed FileJournal: fill in committed_up_to for old headers
-e5cecd7 debian/ceph-test.install: add installed but not packaged files
-a3a658d ceph.spec.in: add installed but not packaged files to ceph-test
-8cf3319 ceph.spec.in: remove some twice created directories
-6bc1488 ceph.spec.in: fix udev rules.d files handling
-4b90a95 ceph.spec.in: use macros for standard directories
-a8362f5 ceph.spec.in: reorder and fix ceph file list
-6b80296 debian/ceph.install: no need to move files to usr/sbin/
-61a2be3 ceph.spec.in: don't move ceph-disk* and ceph-create-keys around
-4d16f38 Makefile.am: install ceph-* python scripts to /usr/bin directly
-354c41e ceph.spec.in: use %{_sbindir} instead of /usr/sbin
-29f9db1 mon: fix crush unit tests for idempotency
-336c4ae mds: verify mds tell 'dumpcache <filename>' target does not exist
-e6d4582 mon: make 'osd crush unlink ..' idempotent
-0d6ddd9 mds: do not go through handle_mds_failure for oneself
-c8cbec2 Makefile.am: fix build of ceph_test_cors
-0ce09fa client: Kick waiters for max size
-f9b7dff client: log inode when waiting on max size
-85a77df mon: limit warnings about low mon disk space
-ea7c6c6 librados: Fixes to list_snaps test changes
-a793853 ceph-disk:  CalledProcessError has no output keyword on 2.6
-b48d6b4 librados: test for EINVAL on bad list_snaps() ioctx snapid
-65a6975 librados: set SNAP_DIR on listsnaps command
-ccb47fd osd: fail with EINVAL if bad snapid set on list_snaps
-ae67d37 librados: fix list_snaps() tests
-8d3c7ff mon: make 'osd crush rm|unlink ...' idempotent
-4e847e8 librbd: simplify diff_iterate calls to list_snaps
-edc46a7 Fix comment typos
-cfd32ff test_mon_config_key.py: fix 'del' to clean up correctly internally
-5cf0c49 mds: initialize tableservers/clients on mds creation
-1054c87 Revert "mds: trigger tableserver active/recovery hook even for self"
-8a6438f README: fix dependency lists
-0c16b31 Adds "mds fail 0" command to operations commmand reference. Partially fixes #2206, though better documentation will eventually be needed.
-968c6c0 mds: trigger tableserver active/recovery hook even for self
-c4eb7e6 ceph-disk: fix some (local) variable names
-3dd8b46 ceph-disk: fix naming of local variable in is_mounted()
-eaf31bf ceph-disk: merge twice defined function is_mounted(dev)
-4c6d644 ceph-disk: define exception type
-058eb92 ceph-disk: fix Redefining name 'uuid' from outer scope
-0080d1d ceph-disk: add missing space after comma
-b99b8cc rgw/rgw_user.cc: reduce scope of variable
-ee7eae3 rgw/rgw_user.h: remove twice initialized purge_keys
-6e9f478 test_cors.cc:  prefer prefix ++operator for iterator
-b4845a6 test_cors.cc: use static_cast instead of C-Style cast
-e2c3511 test_cors.cc: use %u to format unsigned in sprintf()
-bda21f7 rgw/rgw_user.cc: use 'true' directly instead of variable
-84b1914 rgw/rgw_user.cc: reduce scope of same_email in execute_modify()
-13abf32 rgw/rgw_user.cc: remove some unused std::string variables
-4839cf2 rgw/rgw_cors_swift.h: prefer prefix ++operator for iterator
-620ca6c rgw/rgw_op.cc: prefer prefix ++operator for iterator
-275be10 rgw/rgw_op.cc: remove unsused variable
-4a35cfd rgw/rgw_op.cc: use static_cast instead of C-Style cast
-c662733 rgw/rgw_cors_s3.cc: prefer prefix ++operator for iterator
-9850ed1 rgw/rgw_cors_s3.cc: remove unused variable
-2136170 rgw/rgw_cors_s3.cc: use static_cast instead of C-Style cast
-69f60d2 explain what an inline xattr is and how it relates to omap
-7abba7b rgw/rgw_cors.cc: fix inefficient usage of string::find()
-eb815bb rgw/rgw_cors.cc: prefer prefix ++operator for iterator
-5479723 rgw/rgw_cors.cc: use empty() instead of size() == 0
-e1babf4 rgw/rgw_bucket.cc: prefer prefix ++operator for iterator
-c9be9ff rgw/rgw_bucket.cc: remove unused variable
-42109d3 rgw/rgw_user.h: initialize some bool variables in constructor
-a5ce246 rgw/rgw_user.h: move initialization in initialization list
-9b5f8a4 rbd.cc: use static_cast instead of C-Style cast
-07be36c mds/Migrator.cc: prefer prefix ++operator for iterator
-574051f unit tests for FileStore::_detect_fs when running on ext4
-aee6549 fix nspace assignment in LFNIndex::lfn_parse_object_name
-dd19d69 rgw: Create RESTful endpoint for user and bucket administration.
-aa14da2 doc/release-notes: v0.60
-fc13f11 PG::_scan_list: assert if error is neither -EIO nor -ENOENT
-3fa3b67 FileStore: rename debug_delete_obj to debug_obj_on_delete
-40070ce PG: _scan_list can now handle EIO on read, stat, get_omap_header
-fcec1a0 ObjectStore: add allow_eio to read, stat, get_omap_header
-76ad956 librados: test empty ObjectWriteOperation
-690e4df Makefile.am: disable building ceph_test_cors when radosgw is not enabled
-f26f7a3 (tag: v0.60) v0.60
-267ce0d librados: don't use lockdep for AioCompletionImpl
-78acc5c test: fix signed/unsigned comparison in test_cors
-d5b7970 PG: don't compare auth with itself
-39d1a3f PG: pass authoritative scrub map to _scrub
-a838965 PG: read_error should trigger a repair in _compare_scrub_objects
-1940cf3 FileStore,OSD: add mechanism for injecting EIO, truncating obj
-83dbfae PG::_select_auth_object: prefer a peer which did not hit a read error
-e61c94e PG: make _select_auth_object smarter
-a77eaec mds: bump the protocol version.
-93ab1ed mds: don't roll back prepared table updates
-2b0f03c mds: clear scatter dirty if replica inode has no auth subtree
-3d3d85d mds: don't replicate purging dentry
-44db980 mds: eval inodes with caps imported by cache rejoin message
-9939ced mds: try merging subtree after clear EXPORTBOUND
-5ceae8c mds: clear dirty inode rstat if import fails
-d1602b3 mds: don't open dirfrag while subtree is frozen
-fcf170b mds: notify bystanders if export aborts
-7278f64 mds: fix export cancel notification
-27438db mds: unfreeze subtree if import aborts in PREPPED state
-4d532cb mds: check MDS peer's state through mdsmap
-b439588 mds: avoid double auth pin for file recovery
-e072d34 mds: add dirty imported dirfrag to LogSegment
-a4ed7ea mds: send lock action message when auth MDS is in proper state.
-7ad7c34 mds: issue caps when lock state in replica become SYNC
-10b1a56 mds: share inode max size after MDS recovers
-b2342a9 mds: take object's versionlock when rejoinning xlock
-6862fe7 mds: reqid for rejoinning authpin/wrlock need to be list
-d1a2574 mds: handle linkage mismatch during cache rejoin
-ce0b74e mds: encode dirfrag base in cache rejoin ack
-9f66d04 mds: include replica nonce in MMDSCacheRejoin::inode_strong
-cbb38a1 mon: OSDMonitor: only output warn/err messages if quotas are set > 0
-01fd55a mds: remove MDCache::rejoin_fetch_dirfrags()
-e62e48b mds: fix MDS recovery involving cross authority rename
-3ab8663 mds: send resolve acks after master updates are safely logged
-75346d8 mds: send cache rejoin messages after gathering all resolves
-97bc0d2 mds: don't send MDentry{Link,Unlink} before receiving cache rejoin
-e381bb3 mds: set resolve/rejoin gather MDS set in advance
-ed85dd6 mds: don't send resolve message between active MDS
-30dbb1d mds: compose and send resolve messages in batch
-a6d9eb8 mds: don't delay processing replica buffer in slave request
-1312716 mds: unify slave request waiting
-ef9a4f6 mds: defer eval gather locks when removing replica
-12e7c3d mds: avoid sending duplicated table prepare/commit
-a5dce80 mds: make sure table request id unique
-bb83a5d mds: consider MDS as recovered when it reaches clientreplay state.
-7826814 client: always remove cond from list after waiting
-8267bf5 librbd: fix size arg type for diff_iterate
-b2b1034 PendingReleaseNotes: note about rbd progress output
-f1f6407 test_librbd: add diff_iterate test including discard
-e88fe3c rbd.py: add some missing functions
-c0e3f64 librbd: add C and python bindings for diff_iterate
-e83fd3b librados: don't insert zero length extents in a diff
-52097d3 rbd: add formatted output to diff command
-33d1a2f librbd: return -ENOENT from diff_iterate when the snap doesn't exist
-6a04a7f rbd: initialize random number generator for bench-write
-c680531 librbd: change diff_iterate interface to be more C-friendly
-8a1cbf3 rbd: remove alway-true else condition in import-diff
-d86fb04 rbd: make diff banner length depend on the banner
-c499caf mkcephfs: warn that mkcephfs is deprecated in favor of ceph-deploy
-677867d qa: workunits: mon: test 'config-key' store
-c0e5c22 rbd: fail import-diff if we reach the end of the stream sooner than expected
-09898ff rbd: complete progress for import-diff from stdin
-a0fca08 rbd: fix else style in import-diff
-2ec87e6 rbd: update progress as a diff is exported
-f0ddf6c rbd: remove unused argument from do_diff()
-ef49385 rbd: fix size change output
-88706ab rbd: send progress info to stderr, not stdout
-325a337 rbd: include 'diff' command in man page
-64a202a rbd: update man page for import-diff and export-diff
-f67f62a rbd: prevent import-diff if start snapshot is not already present
-9946c69 rbd: fail import-diff if end snap already exists
-5b0c68b doc/dev/rbd-diff: specify that metadata records come before data
-3694968 librbd: implement image.snap_exists()
-c5bd978 librados: move snap_set_diff to librados/
-6af769a librados: cleanly define SNAP_HEAD, SNAP_DIR constants
-10dc0ad librados: document list_snaps
-be8927f librbd: drop unused elapsed calc for diff_iterate
-f0c9a20 librbd: diff_iterate fromsnapname after the end snap is also invalid
-a69532e librbd: document diff_iterate in header
-d0baadb librbd: uint64_t len for diff_iterate
-7bbaa71 doc/dev/rbd-diff: update incremental file format
-44e295a qa: rbd/diff_continuous.sh: use non-standard striping
-39689fe librbd: fix diff_iterate arithmetic for non-standard striping
-f2b0880 qa: rbd/diff_continuous.sh: base test off a clone
-fc3f4fd rbd: implement simple 'diff' command
-4d02e17 librbd: handle diff from clone
-186ddda rbd: send import debug noise to dout, not stdout
-58c2ded qa: add rbd/diff_continuous.sh stress test
-e716743 rbd: implement 'export-diff' and 'import-diff' commands
-cf7d13a rbd: add --io-pattern <seq|rand> option to bench-write
-0296c7c librbd: implement diff_iterate
-6db5109 librados: expose snapset seq via list_snaps
-ebed000 osdc/Objecter: prval optional for listsnaps
-4ae9774 osd: fix error codes for list-snaps
-941cfc2 osd: fix clone snap list for list-snaps
-ceee218 osd: wait for all clones on SNAPDIR requests
-556d334 osd: direct reads on SNAPDIR to either head or snapdir
-b64bb5f osd: do not include snaps with head on list_snaps()
-01b7420 osd: clean up some whitespace
-0074228 osd: include SnapSet seq in the list snaps response
-fa5206c osd: make LIST_WATCHERS and LIST_SNAPS print nicely for OSDOp
-849a45c strings: add 'list-watchers' to MOSDOp strings
-a2956f6 rgw: fix warning
-01779df rgw: add missing include file
-3c52b8b Makefile.am: change some cors rules
-e1a78f9 rgw: fix a few warnings
-d4b22f3 rgw: more cors fixes
-e9e86ad rgw: cors, style fixes, other fixes
-f165049 rgw: with CORS support
-c01e2e4 client: do sync read when 'client oc = false'
-74c7083 client: fix use-after-free on session close and cond signals
-4ad35b2 mds: mark connection down when MDS fails
-fbcc64d mds: fix MDCache::adjust_bounded_subtree_auth()
-573a4ae mds: process finished contexts in batch
-5cbaae6 mds: preserve subtree bounds until slave commit
-c344ff1 fix null character in object name triggering segfault
-e611937 mon: OSDMonitor: add 'osd pool set-quota' command
-9532808 doc: Added entries for Pool, PG, & CRUSH. Moved heartbeat link.
-bcc5c65 doc: Added heartbeat configuration settings.
-6157d68 doc: Moved PG info to separate page. Moved heartbeat to mon-osd doc.
-ca77aab doc: Rewrote monitor configuration section.
-ea3c833 doc: Moved to separate section for parallelism.
-ba73b83 doc: Cleanup.
-e9b3f2e ceph-disk list: say 'unknown cluster $UUID' when cluster is unknown
-9e7ddf6 config_opts: fix rgw_port comments to be plaintext
-3da3129 ReplicatedPG: check for full if delta_stats.num_bytes > 0
-9b09073 mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long()
-e2a936d common: util: add 'unit_to_bytesize()' function
-23c2fa7 osd: osd_types: add pool quota related fields
-655a950 PG::_scan_list: record read errors in the Scrubmap::object
-dab3dac osd_types: add read_error flag to Scrubmap::object
-562e171 ceph-disk: handle missing journal_uuid field gracefully
-4c4d559 librados: move snapc creation to caller for aio_operate
-3cbd036 client: update cap->implemented when handling revoke
-4f8ba0e msgr: allow users to mark_down a NULL Connection*
-2da57d7 debian: Add git to Build-Depends (need by check_version script)
-8f5c665 debian: Run wrap-and-sort from devscripts
-972f0eb unit test LFNIndex::remove_object and LFNIndex::lfn_unlink
-d15c152 ceph_json: add missing include file
-9a07ee3 ceph_json: add template specializations
-6a65b91 ceph-disk: implement 'list'
-b982516 ceph.spec.in:  Add python-argparse dependency
-a021ce6 mon: ConfigKeyService: stash config keys on the monitor
-e950ed0 ceph.spec.in:  Move four scripts from sbin to usr/bin
-06a1e9c ceph: propagate do_command()'s return value to user space
-e91405d ceph: propagate do_command()'s return value to user space
-f804892 PG: update PGPool::name in PGPool::update
-1993c2a PG: use int64_t for pool id in PGPool
-91a8d93 OSD: flush pg osr on shutdown prior to put()
-f1d1f11 librbd: increment version for new functions is_complete() and aio_flush()
-302b93c librbd: add an async flush
-860493e librbd: use the same IoCtx for each request
-2ae3206 librbd: add an is_complete() method to AioCompletions
-f06debe librados: add versions of a couple functions taking explicit snap args
-7cc0940 librados: add async flush interface
-fa27156 librados: increase version number to indicated new functions
-553aaac ObjectCacher: remove unneeded var from flush_set()
-41568b9 ObjectCacher: remove NULL checks in flush_set()
-92db06c ObjectCacher: always complete flush_set() callback
-03ac01f librbd: make aio_writes to the cache always non-blocking by default
-c212504 ObjectCacher: optionally make writex always non-blocking
-bf7cbdf rados: remove confusing argument echo on error
-f891d5a rgw_json_enc.cc: use static_cast instead of C-Style cast
-8d957c1 rgw/rgw_admin.cc: remove double checks from get_cmd()
-c8ac1ee unit test LFNIndex::lfn_get_name
-b9c8d4f librados.h: fix comment describing rados_pool_list
-613b708 librbd: flush cache when set_snap() is called
-2429446 radosgw-admin: fix help clitest
-10626f7 mon: MonitorDBStore: add 'get_iterator()' method to iterate over a prefix
-d3e4904 ceph-disk: reimplement list_all_partitions
-20d594a ceph-disk: reimplement is_partition
-d89a63c doc: Updated usage.
-bc72492 doc: Updated usage.
-4362934 ceph-disk: conditionally remove mount path
-2ae297c ceph-disk: ignore udevadm settle return code
-9844500 upstart: try udevadm settle if osd journal isn't present
-89c6901 osd: disallow classes with flags==0
-f2dda43 osd: EINVAL when rmw_flags is 0
-50b831e osd: fix detection of non-existent class method
-b0103ab OSD fails to start with error assert(values.size() == 2)
-4db4a02 Fix radosgw upstart job
-5aa5bc2 mds: Delay session close if in clientreplay
-9369f91 Change ceph::apt -> ceph::repo in doc
-98f6a25 mkcephfs.in: use 32 chars for mktemp to be more unique
-2cb9f96 mkcephfs.in: cleanup rdir in MON case
-a8338ee mkcephfs.in: provide a valid rdir for MONs on -a
-38f845d mkcephfs.in: use mktemp instead of dd+md5sum+awk
-0e009b1 mds: Clear backtrace updates on standby_trim_seg
-0c43ac3 ceph_common.sh: fix typo in comment
-17029a6 java libcephfs: add serialVersionUID to some Exception classes
-10191a9 CephMount.java: remove unused import
-8c962b5 MDS.cc: remove double is_clientreplay() check in active_start()
-3f2e711 mon: fix crush_ops.sh tests
-76b296f ReplicatedPG: send entire stats on OP_BACKFILL_FINISH
-503ed9e testing: fix hadoop-internal-test
-7c1e9be client: Don't signal requests already handled
-77230d4 fix append to uninitialized buffer in FlatIndex::created
-9eda8e5 ceph-disk:  udevadm settle before partprobe
-14cef27 mds: CInode::build_backtrace() always incr iter
-bb68a20 java: fix test name typo
-b9141e9 client: Cleanup request signaling
-3b520b5 client: Handle duplicate safe replies
-dfb46b9 client: Always cleanup request after safe
-4dda138 client: Remove got_safe from MetaRequest
-f957e72 CrushWrapper.cc: remove some std::string::c_str() calls
-7f65c51 doc/release-notes: extra note for v0.56.4
-82b129f doc/release-notes: v0.56.4
-491795e Improve test by getting cloneid from my_snaps vector
-70e0ee8 rgw: bucket index ops on system buckets shouldn't do anything
-b7d7e68 ceph-disk: rename some local variabels in list_*partitions
-0b5fcff ceph-disk: fix naming of a local variable in find_cluster_by_uuid
-8a999de ceph-disk: rename some constants to upper case variable names
-86e55f5 ceph-disk: add some more docstrings
-543327b ceph-disk: print subprocess.CalledProcessError on error
-2d26bcc ceph-disk: fix indention
-9db05a2 java: pretty print Ceph extent
-486e5b9 java: support ceph_get_osd_addr
-bc65ace java: support ceph_get_osd_crush_location
-60fe136 java: support ceph_get_file_extent_osds
-78fd096 PendingReleaseNotes: mention renamin of cluster to zone
-ece4348 client: don't set other if lookup fails in rename
-836b97f test/libcephfs: Test rename error cases
-8e6a970 client: Fix rename returning ENOENT for dest
-3f5f432 MDSMap: improve health check
-e77cd59 MDSMap:: constify a bunch of methods
-838f1cd preserve /var/lib/ceph on deb/rpm purge
-4f2051c mon: factor out _get_pending_crush() helper
-eae1532 mon, crush: add some tests to build a DAG via the cli
-a60d7df crush, mon: unlink vs remove
-b54db77 crush: fix remove_item on bucket removal
-d8f4be6 mon: add 'osd crush add-bucket <name> <type>'
-96e08ef mon: allow removal of buckets via 'osd crush rm ...'
-683f745 crush: change find_roots(); add find_takes()
-751b4bf mon: add optional ancestor arg to 'ceph osd crush rm <item> [ancestor]'
-ee6b993 crush: add remove_item_under()
-6cba563 mon: 'ceph osd crush link ...' to add a link to an existing bucket
-fe4e86c crush: prevent formation of a loop
-a54a411 crush: add link_bucket()
-05dac04 mon: 'ceph osd crush add ...' to add a second link to an item
-78d8faf rgw: zone info is configurable
-4fe4dea PG::GetMissing: need to check need_up_thru in MLogRec handler
-d611eba PG,osd_types: improve check_new_interval debugging
-c524e2e common/MemoryModel: remove logging to /tmp/memlog
-6a7ad2e init-ceph: clean up temp ceph.conf filename on exit
-0517345 init-ceph: push temp conf file to a unique location on remote host
-f463ef7 mkcephfs: make remote temp directory name unique
-853dd35 doc: Added {id} argument to OSD lost.
-020fb1a rgw: s/cluster/zone
-8bd7915 rgw: generic decode_json for containers
-b07f3cd rgw: add encode_json
-96ad9b1 moved rgw/rgw_json.* common/ceph_json.*
-53ba6c2 rgw: rgw_jsonparser changes
-da33701 rgw: decode RGWUserInfo using decode_json
-959b658 rgw: introduce decode_json to easily decode json structures
-6d63752 ceph-disk: re-add python 2.7 dependency comment
-38a5acb osd: reenable 'journal aio = true'
-e5940da os/FileJournal: fix aio self-throttling deadlock
-6c79604 test/test_snap_mapper.cc: remove twice included <tr1/memory>
-00cf817 mon/MDSMonitor.cc: remove twice included MonitorDBStore.h
-a583029 mon/LogMonitor.cc: remove twice included <sstream>
-9dd5b20 mon/AuthMonitor.cc: remove twice included <sstream>
-1144260 common/Formatter.h: remove twice included <list>
-000310f ReplicatedPG: add debug flag to skip full check at reservation
-29a288f ReplicatedPG: replica should post BackfillTooFull in do_scan if full
-f9c8190 PG: halt backfill on RemoteReservationRejected in Backilling
-022903b PG: add helper for adding a timer event to retry backfill
-3ab4a09 PG: add BackfillTooFull event for RepRecovering
-cd73539 PG: add helper for rejecting backfill reservation
-33aaea5 PG: use OSDService::too_full_for_backfill in RepWaitBackfillReserved
-cec3d82 OSDService: add too_full_for_backfill
-fab0be1 Makefile: add MOSDMarkMeDown
-7bfaaf7 OSD: notify mon prior to shutdown
-a2dba95 Monitor: add MOSDMarkMeDown support
-edebb34 OSDMonitor: factor out check_source helper
-b8929c4 messages: add MOSDMarkMeDown
-bb12522 OSD: clear OpHistory on shutdown
-51ae509 OpRequest: use OpRequestRef for OpHistory
-210ecc5 FileStore::stat: valgrind: don't read *st on error
-6119f29 shared_cache: clear lru in destructor
-95e9322 ceph_osd: clear client_throttler prior to putting g_ceph_context
-8d43a2e OSD: reorder OSD::shutdown
-505bebb OSD: check for is_stopping after locking osd_lock or heartbeat_lock
-9d076a0 OSD: lookup_lock_raw_pg is dead
-e41554d OSD: rename timer to tick_timer
-30b7a15 OSD: move backfill_request_timer cleanup to OSDService::shutdown
-264cd3e ReplicatedPG,OSD: move dequeueing into on_shutdown
-eb8dd0d PG: clarify PG::deleting comment
-71ec9c6 mon: AuthMonitor: delete auth_handler while increasing max_global_id
-42a71c1 FileJournal: quieter debugging on journal scanning
-6740d51 FileJournal: quieter debugging on journal scanning
-7e8cc57 doc: Fixed some typos.
-7698500 libcephfs: fix ceph_get_osd_crush_location
-a72aaff test: add ceph_rename test
-7ed0be1 rados.py: remove unnecessary semicolon
-cffc2d5 rados.py: fix bad indention
-9496622 rados.py: remove lenght modifier 'l' on format string
-d81d2c0 rados.py: fix 'Rados' has no member 'name'
-4e2557a crush: allow an item to be inserted twice
-14f2674 crush: use const string& args
-eed8d53 rados.py: add missing space after ','
-e2df59e ceph-create-keys: rename log to LOG since it's a constants
-17d4a7c doc/release-notes: v0.59
-541cd3c msg/Pipe: fix seq handshake on reconnect
-ac9fa43 Fix tips in documentation
-cd96dbe Fix important in documentation
-3305157 Fix notes in documentation
-e485471 Update Chef deployment documentation
-97fd7b6 mon: DataHealthService: log to derr instead if we're about to shutdown
-51d62d3 mon: DataHealthService: shutdown mon if failed to obtain disk stats
-5bf0331 client/Client.cc: handle error if _lookup() fails
-fc41684 qa/workunits/direct_io/test_sync_io.c: add proper error handling
-a8a5683 test_short_dio_read.c: add proper error handling
-f9c108c mds/Locker.cc: prefer prefix ++operator for iterators
-4151630 mount/mount.ceph.c: remove unused variable
-87691dc ceph-disk: cast output of subprocess.Popen() to str()
-c29812c mon: Monitor: clearer output on error during attempt to convert store
-3575feb ceph-disk: fix adjust_symlink() replace 'journal' with 'target'
-a27cb85 ceph-disk: fix adjust_symlink() replace 'canonical' with 'path'
-6d3247b ceph-disk: there is no os.path.lstat use os.lstat
-97b4f8d ceph-disk: remove unused variable key from prepare_journal_dev()
-9daf6cf ceph-disk: fix except to catch OSError
-0ada43f ceph-disk: add missing space after >> operator
-d3c60dc fix: Redefining name 'uuid' from outer scope (line 14)
-6a8120d ceph-disk: remove unused variables from list_partitions()
-3af7a1a ceph-disk: fix /dev/dm-[0-9] handling list_all_partitions()
-cbae6a4 (tag: v0.59) v0.59
-9bcf5b6 ceph-disk: rename local variable shadowing builtin
-4adf088 ceph-disk: remove twice defined identical function unmount
-ea26ea0 ceph-disk: remove twice defined function mount
-c57daa3 ceph-disk: remove double defined function get_conf
-57dde5c ceph-disk: rename local variable shadowing builtin
-dfb1fbe QuorumService.h: use enum instead of static const int
-6a3aa2a Missed adding rados_types.hpp to package
-c2602d7 ceph-disk: install and package
-f287c6f ceph-disk: simplify command dispatch
-a019753 ceph-disk: consolidate exceptions
-20e4ba5 ceph-disk: consolidate ceph-disk-* into a single binary
-2900bf4 PendingReleaseNotes: fix typo
-1597b3e librbd: optionally wait for a flush before enabling writeback
-47f1a94 Makefile: missing header
-020d1b1 mon: use enum instead of static const int
-efc4b12 mon/Paxos: set state to RECOVERING during restart
-45843f7 Makefile.am: fix misspelt header name
-bee5046 mon/PaxosService: handle non-zero return values
-d477594 ceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type='
-9029b09 mds: Handle ENODATA returned from getxattr
-7aec13f mon/PaxosService: fix proposal waiter handling
-6774290 Makefile: fix header name
-cecfe41 mon: Monitor: take advantage of the new HealthMonitor class.
-b781400 mon: HealthMonitor: Keep track of monitor cluster's health
-a3751d1 mon: QuorumService: Allow for services quorum-bound to be easily created
-a2ac935 qa: add 16MB direct-io write test
-53c1c48 signal_handler: add func to queue an async signal
-a13ae37 client:  Remove unecessary set_inode() in _rmdir()
-5e5e1cd mon/Session.h: prefer prefix ++operator for iterators
-ffaf286 test/filestore/workload_generator.cc: prefer prefix ++operator for iterators
-37fd66e test/filestore/test_idempotent.cc: prefer prefix ++operator for iterators
-7258051 test/filestore/test_idempotent.cc: fix ~TestFileStoreState()
-80615f6 test/test_snap_mapper.cc: prefer prefix ++operator for iterators
-ed159c4 test/osd/RadosModel.h: prefer prefix ++operator for iterators
-0535e1f test/filestore/TestFileStoreState.cc: prefer prefix ++operator for iterators
-2a04a9b test/xattr_bench.cc: prefer prefix ++operator for iterators
-28354c0 test/osd/Object.cc: prefer prefix --/++operator for iterators
-ed4a0fa test/encoding/ceph_dencoder.cc: prefer prefix ++operator for iterators
-a8f6b76 test/bench/bencher.h: prefer prefix ++operator for iterators
-e94cbee ObjectMap/test_object_map.cc: prefer prefix ++operator for iterators
-f56d484 tools/rest_bench.cc: prefer prefix ++operator for iterators
-58d07ad tools/common.cc: prefer prefix ++operator for iterators
-6ba964f ceph-filestore-dump.cc: prefer prefix ++operator for iterators
-12a44bc rgw/rgw_user.cc: prefer prefix ++operator for iterators
-424bce9 rgw/rgw_rest_swift.cc: prefer prefix ++operator for iterators
-360191f osd/OSDMap.cc: prefer prefix ++operator for iterators
-5fe46a3 mds/MDCache.cc: prefer prefix ++operator for iterators
-51a2d78 mds/CInode.cc: prefer prefix ++operator for iterators
-d0a1632 client/Client.cc: prefer prefix ++operator for iterators
-c091dcc auth/AuthMethodList.cc: fix remove_supported_auth()
-a96a1cc mds/mdstypes.h: prefer prefix ++operator for iterators
-3967ce4 rgw/rgw_rados.cc: make sure range_iter != ranges.end()
-5b8a505 rados.cc: prefer prefix ++operator for iterators
-006a70d rgw/rgw_rados.cc: prefer prefix ++operator for iterators
-272ebf3 rgw/rgw_admin.cc: prefer prefix ++operator for iterators
-c4cc2e8 rgw/rgw_acl_s3.cc: prefer prefix ++operator for iterators
-a740eef osdmaptool.cc: prefer prefix ++operator for iterators
-d5f6073 osdc/Striper.cc: prefer prefix ++operator for iterators
-4d46efa osdc/Objecter.cc: prefer prefix ++operator for iterators
-f0ed8c4 osdc/ObjectCacher.cc: prefer prefix ++/--operator for iterators
-da438aa osdc/ObjectCacher.h: prefer prefix ++operator for iterators
-d0df3da osdc/Objecter.h: prefer prefix ++operator for iterators
-060d2d5 osdc/Filer.h: prefer prefix ++operator for iterators
-844671e osdc/Filer.cc: prefer prefix ++operator for iterators
-49c5470 osd/osd_types.cc: prefer prefix ++operator for iterators
-273517a osd/SnapMapper.cc: use empty() instead of size() == 0
-10b0839 osd/ReplicatedPG.cc: prefer prefix ++operator for iterators
-293bb07 osd/PG.cc: prefer prefix ++operator for iterators
-cdfce02 osd/OSDMap.cc: prefer prefix ++operator for iterators
-812ca21 osd/OSD.cc: prefer prefix ++operator for iterators
-7647003 os/LFNIndex.cc: prefer prefix ++operator for iterators
-c089f5d mds/Migrator.cc: prefer prefix ++operator for iterators
-d777e5a os/JournalingObjectStore.cc: prefer prefix ++operator for iterators
-16fa6f1 os/FlatIndex.cc: prefer prefix ++operator for iterators
-b374a3a os/FileStore.cc: prefer prefix ++operator for iterators
-9704dde msg/Pipe.cc: prefer prefix ++operator for iterators
-62f00f0 msg/Pipe.cc: prefer prefix ++operator for iterators
-d7936e8 mon/OSDMonitor.cc: prefer prefix ++operator for iterators
-344feba mds/journal.cc: prefer prefix ++operator for iterators
-d2026a9 mds/events/EMetaBlob.h: prefer prefix ++operator for iterators
-18b4a17 mds/SnapRealm.cc: prefer prefix ++operator for iterators
-206cd8d mds/Migrator.cc: prefer prefix ++operator for iterators
-2b902b3 mds/MDCache.cc: prefer prefix ++operator for iterators
-55e8bcc mds/CDir.cc: prefer prefix ++operator for iterators
-7a3e2ee librados/librados.cc: prefer prefix ++operator for iterators
-ebd959b kv_flat_btree_async.cc: prefer prefix ++operator for iterators
-566b60b common/Finisher.cc: prefer prefix ++operator for iterators
-ba5c935 mds: Add config option for log segment size
-2678db5 qa/workunits/restart:  Add test to check backtrace
-85057e9 mds: Add kill points for backtrace testing
-acae3d0 pybind/cephfs:  Add initial py wrappers for cephfs.
-0c74475 mds: Cleanup new segment conditionals
-8b79886 mds: Backtrace for create,rename,mkdir,setlayout
-4d0448f mds: New backtrace handling
-62d12d8 message/mds:  Fix client reconnect decode
-fb07745 include/elist: Fix clear() to use pop_front()
-b8fb2ee dencoder:  Add inode_backtrace_t to types
-9e13886 mds: Use map for CInode pinrefs
-fc80c1d client: Ensure inode/dentries are ref counted
-f8d66e8 OSD: split temp collection as well
-5b022e8 hobject: fix snprintf args for 32 bit
-9ea02b8 ceph_features: fix CEPH_FEATURE_OSD_SNAPMAPPER definition
-ee178fb ceph.spec.in:  Additional clean-up on package removal
-65c31e1 ceph-fuse: invalidate cache by default
-f3ad12e test_filejournal: add tests for footer, header, payload corruption
-a22cdc6 FileJournal: add testing methods to corrupt entries
-3b767fa FileJournal,Journal: detect some corrupt journal scenarios
-cf00930 FileJournal::wrap_read_bl: convert arguments to explicit in/out arguments
-c3725e9 FileJournal: add committed_up_to to header
-4aa0f8a FileStore: add more debugging for remove and split
-de8edb7 FileJournal: queue_pos \in [get_top(), header.max_size)
-f1b031b OSD: expand_pg_num after pg removes
-8222cbc PG: ignore non MISSING pg query in ReplicaActive
-11650c5 mon: only try to bump max if leader
-80af5fb ceph-disk-activate: identify cluster .conf by fsid
-6f15dba debian/control:  Fix for moved file
-7370b55 ceph-disk-activate: abort if target position is already mounted
-18525eb rados/test.sh fails in the nightly run
-efd153e debian: add start ceph-mds-all on ceph-mds install
-41897fc debian: add start ceph-mds-all on ceph-mds install
-47378d6 libcephfs: add ceph_get_osd_addr interface
-b6102c0 Revert "ceph-disk-activate: rely on default/configured keyring path"
-3e628ee Revert "ceph-disk-activate: don't override default or configured osd journal path"
-282d3aa monmaptool.cc: prefer prefix ++operator for iterators
-0c5532c mon/PGMonitor.cc: prefer prefix ++operator for iterators
-01c6a7e mon/MonmapMonitor.cc: prefer prefix ++operator for iterators
-45a3d0c mon/Monitor.cc: prefer prefix ++operator for iterators
-a26a9f7 mon/MonMap.cc: prefer prefix ++operator for iterators
-a6c4543 mon/MDSMonitor.cc: prefer prefix ++operator for iterators
-a66170d mon/LogMonitor.cc: prefer prefix ++operator for iterators
-23ce79f mon/AuthMonitor.cc: prefer prefix ++operator for iterators
-ab0dac1 mds/mdstypes.cc: prefer prefix ++operator for iterators
-c0506c2 mds/SnapServer.cc: prefer prefix ++operator for iterators
-823a56f mds/SnapServer.h: prefer prefix ++operator for iterators
-6127f43 mds/SnapServer.h: prefer prefix ++operator for iterators
-e98432c mds/Mutation.cc: prefer prefix ++operator for iterators
-e317a97 mds/MDSTableServer.cc: prefer prefix ++operator for iterators
-d0a0ee5 mds/MDSTableClient.cc: prefer prefix ++operator for iterators
-f8825a3 mds/MDSMap.cc: prefer prefix ++operator for iterators
-3ff204e mds/MDS.cc: prefer prefix ++operator for iterators
-865d7a8 mds/MDLog.cc: prefer prefix ++operator for iterators
-6735383 mds/MDCache.cc: prefer prefix ++operator for iterators
-ce8060e mds/MDBalancer.cc: prefer prefix ++operator for iterators
-180d93a mds/Locker.cc: prefer prefix ++operator for iterators
-f2452b1 mds/MDCache.h: prefer prefix ++operator for iterators
-a42e9ef mds/CInode.cc: prefer prefix ++operator for iterators
-1e60fcf mds/CDir.cc: prefer prefix ++operator for iterators
-d0d8929 mds/AnchorServer.h: prefer prefix ++operator for iterators
-8b96655 mds/AnchorServer.cc: prefer prefix ++operator for iterators
-1525053 mds/AnchorClient.cc: prefer prefix ++operator for iterators
-f4a78a2 librbd/internal.cc: prefer prefix ++operator for iterators
-2ef97a6 librbd/ImageCtx.cc: prefer prefix ++operator for iterators
-7332796 librados/RadosClient.cc: prefer prefix ++operator for iterators
-5ac012a librados/IoCtxImpl.cc: prefer prefix ++operator for iterators
-ab46e6d libcephfs.cc: prefer prefix ++operator for iterators
-e8d59d5 kv_flat_btree_async.cc: prefer prefix ++operator for iterators
-46c0d9c key_value_store/cls_kvs.cc: prefer prefix --operator for iterators
-e2776a9 crush/CrushWrapper.cc: prefer prefix ++operator for iterators
-9a1b863 crush/CrushCompiler.cc: prefer prefix --operator for iterators
-381bee3 common/lockdep.cc: prefer prefix ++operator for iterators
-60cedb1 client/SyntheticClient.cc: prefer prefix ++operator for iterators
-31a3645 mon: refuse "mon remove" if only one mon left
-f56620b osd: data loss: low space handling
-ce7ee72 ceph_common.sh:  Fix sed regex in get_local_daemon_list
-8c774aa rbd: clean up do_import() a bit
-8d8f892 Simplify may_write()
-388616b OSD: remove snap_mapper entries in RemoveWQ
-3177cb8 PG: check and repair snap_mapper entries during scrub
-8665839 OSD,PG: add upgrade procedure for snap_mapper
-8631e92 osd/: Integrate SnapMapper with OSD
-8db029d Makefile: add SnapMapper to osd
-354f33d test/: add tests for map_cacher
-580ea54 osd/: add SnapMapper
-2f9e369 common/: add map_cacher
-984c0c3 common/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types
-4ac16ec filestore: add debug option to verify split results
-03e5330 DBObjectMap, hobject: add helpers for pgid bit matching
-0b436ab ObjectStore: add Context management to Transaction
-f6500f5 Context: allow C_Contexts to not have a cct, add list_to_context
-7db2a51 ObjectStore: move queue_transaction into ObjectStore
-78db663 osd_internals/snaps.rst: update description to reflect SnapMapper
-ba449ce osd_internals/snaps.rst: add a description of snaps and trimming
-be95af7 PG::read_log: fix assert, split may introduce holes in the log
-1a8c170 OSD: add debugging to start_split and complete_split
-de22b18 PG: check_recovery_sources must happen even if not active
-7a434d1 FileStore: fix reversed collection_empty return value
-ce4432a HashIndex: _collection_list_partial must tolerate NULL next
-e4bf1bc OSD: lock not needed in ~DeletingState()
-32bf131 ReplicatedPG: don't leak reservation on removal
-3091283 rbd: remove fiemap use from import
-8123a1f mds: log session resets more cleanly
-311704f mds: use session con ref to mark down killing session
-dcda366 mds: mark con for closed session disposable
-5c9186c mds: useless cleanup
-2b55470 mds: mark_down old sessions using con
-ca89cf5 client: fix kick_flushing_caps() args
-e35d19b client: clean up useless MetaSession lookups
-e6f04db client: fix trim_caps() args
-ca5d68a client: fix wake_inode_waiters() arg
-bc2a2eb client: validate/lookup mds session in each message handler
-ced92b0 client: fix remaining s->inst users to use s->con
-1ab8ff9 client: remove unused MetaSession::was_stale
-6d1040b client: only signal session waiters on open and close
-f8272c0 client: use Connection* in MetaSession instead of the inst/addr
-dea707b client: use session->inst where possible
-41f8b61 client: drop unused release_lease()
-6fca300 client: pass session to send_reconnect and resend_unsafe_requests
-90b3014 client: switch kick_requests and send_request to take a session *
-6d0b7c8 client: handle ESTALE redirection in make_request(), not reply handler
-80e81ec client: fix up _closed_mds_session
-72d1184 client: use helper for _close_mds_session()
-3975774 mds: flush log when we hit xlock during path traversal
-e47d490 client: instantiate MetaSession for opening connections
-5f2efe6 client: pass around MetaSession* instead of int mds
-cee8786 client: check for mds state before sending messages
-1779d39 mon: increase max_global_id before we hit the wall
-4637752 mon: simplify assign_global_id()
-436e5be mon: AuthMonitor: don't return global_id right away if we're increasing it
-b99367b mon: Paxos: only finish a queued proposal if there's actually *any*
-7710ee2 auth: assert if auth_debug = true and secret_id == 0
-8659b7e libcephfs_jni.cc: prefer prefix ++operator for iterators
-bc77af7 dupstore.cc: prefer prefix ++operator for iterators
-f6b4f3e crushtool.cc: prefer prefix ++operator for iterators
-c4810a5 libcephfs_jni.cc: fix indention
-6802f27 doc: Added libvirt config comments for discard granularity.
-8872531 rgw: set up curl with CURL_NOSIGNAL
-4056552 src/crush/CrushTester.{cc,h}: prefer prefix ++operator for iterators
-acac2be common/pick_address.cc: prefer prefix ++operator for iterators
-1fc0b4d common/buffer.cc: prefer prefix ++operator for iterators
-7feec80 common/WorkQueue.cc: prefer prefix ++operator for iterators
-ae9fdfd LogEntry.h: prefer prefix ++operator for iterators
-74198cc common/LogClient.cc: : prefer prefix ++operator for iterators
-5c7b603 client/SyntheticClient.cc: prefer prefix ++operator for iterators
-20dbd13 osd/osd_types.h: prefer prefix --/++operator for iterators
-e047260 osd/PG.h: prefer prefix ++operator for iterators
-f59f644 osd/OSD.h: prefer prefix ++operator for iterators
-5e016d9 client/Client.cc: prefer prefix ++operator for iterators
-8998c9f ceph_syn.cc: prefer prefix ++operator for iterators
-b94f4b3 mon/Session.h: prefer prefix --operator for iterators
-1e89f74 mon/Session.h: prefer prefix ++operator for iterators
-69d1eab mds/SnapRealm.h: prefer prefix ++operator for iterators
-62d33e9 mds/SessionMap.h: prefer prefix ++operator for iterators
-d3f9673 mds/MDSMap.h: prefer prefix ++operator for iterators
-89ffc64 mds/CInode.h: prefer prefix ++operator for iterators
-bd4f1a3 msg/Messenger.h: prefer prefix ++operator for iterators
-95749b3 MonMap.h: prefer prefix ++operator for iterators
-6ae0345 buffer.h: prefer prefix ++operator for iterators
-5d401b0 types.h: prefer prefix ++operator for iterators
-81e00c1 auth/Crypto.cc prefer prefix ++operator for iterators
-af3b163 doc: Fixed syntax error.
-be6f7ce doc: Added tcp and bind settings and cleaned up syntax a bit.
-77ecdc7 doc: Setting should use network not single IP.
-669d2ba doc: Fixed usage and added note for copying keyring to client. Added hyperlinks.
-7f66ebe doc: Addressed confusion with version numbering.
-4df44bb doc: Added troubleshooting entry for single OSD and single replica.
-36c672d Fix typo in ceph usage output
-60639ab mon/Monitor.h: return string instead of 'char *' from get_state_name()
-72c6226 client/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators
-5ad2460 cls/rgw/cls_rgw.cc: prefer prefix --operator for iterators
-7a31085 client/Inode.cc: prefer prefix ++operator for iterators
-822c67e SyntheticClient.h: prefer prefix ++operator for iterators
-0f48638 CephxKeyServer.h: prefer prefix ++operator for iterators
-b1437a8 auth/Auth.h: prefer prefix ++operator for non-primitive types
-64dca11 tools/rest_bench.cc: remove unused variable
-9b51c25 test/test_filejournal.cc: use %u to format unsigned in sprintf()
-5e882db test/system/st_rados_list_objects.cc: remove not needed statement
-ae15b2f test/osd/RadosModel.h: remove unused variables
-faab0e8 test/osd/Object.cc: catch exception by reference
-4762fac test/omap_bench.cc: remove unused variables
-b77454c test_mon_workloadgen.cc: remove unused variables
-3cb9b35 test/librados/aio.cc: use static_cast instead of C-Style cast
-a6bd658 test/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast
-8dc0a32 bench/dumb_backend.h: remove never executed delete statement
-3072902 test_object_map.cc: use %u to format unsigned in snprintf()
-a19a2a1 test_keyvaluedb_iterators.cc: remove unused variable
-08bf10b rgw/rgw_xml.cc: use static_cast instead of C-Style cast
-03e0308 rgw/rgw_user.cc: remove unused variables
-69cb92e rgw/rgw_rest_usage.cc: remove unused variables
-3894205 rgw/rgw_rest_s3.cc: remove unused variables
-f8a9fec rgw/rgw_rados.cc: perform initialization of prefix in initialization list
-a37d71d rgw/rgw_rados.cc: remove unused variables
-c6becc6 rgw/rgw_rados.cc: use static_cast instead of C-Style cast
-579d4ad testing: update wordcount to new code layout.
-09fa711 testing: fix hadoop-internal-tests
-936b8f2 ceph-disk-activate: rely on default/configured keyring path
-813e9fe ceph-disk-activate: don't override default or configured osd journal path
-f8bc21a crush: add test for reweighting multiple items in the tree
-9eb0d91 debian: stop ceph-mds before uninstalling ceph-mds
-c021c5c log: drop default 'log max recent' from 100k -> 10k
-46e8fc0 librbd: invalidate cache when flattening
-f2a23dc ObjectCacher: add a method to clear -ENOENT caching
-f6f876f ObjectCacher: keep track of outstanding reads on an object
-28c0ce6 crush: make item adjust weight adjust *all* instances of the item
-b3b059e crush: whitespace
-c48c76f ceph: fix cli test
-2450db1 Revert "Use start-stop-daemon --chuid option to setuid to www-data."
-a52c48d mon: Paxos: increase trim tolerance from 3 to 30.
-41987f3 mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect
-8ce26ea Document scrubbing behavior
-a99ed03 Use start-stop-daemon --chuid option to setuid to www-data.
-44f1cc5 Fix radosgw actually reloading after rotating logs.
-c846e5c rgw/rgw_op.cc: remove unused variables
-7e65048 rgw/rgw_op.cc: use static_cast instead of C-Style cast
-6f85287 rgw/rgw_multi_del.cc: use static_cast instead of C-Style cast
-f87b4ea rgw/rgw_multi.cc: use static_cast instead of C-Style cast
-7ed6fe8 rgw/rgw_http_client.cc: use static_cast instead of C-Style cast
-b322024 rados_sync.cc: fix typo in error msg
-8ad58b4 rgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'
-33f67c9 rgw/rgw_admin.cc: remove some unused variables
-026575b rgw/rgw_admin.cc: reduce scope of 'int ret'
-30938f6 rgw/rgw_admin.cc: remove twice check for 'object'
-9f34cf5 rgw/rgw_rados.h: use static_cast instead of C-Style cast
-ece03bc rgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast
-f106e1a rgw/rgw_common.h: pass some const variables by reference to 'operator<<'
-b669682 rbd_fuse/rbd-fuse.c: remove consecutive return/break statement
-fab9ee5 rbd.cc: use static_cast instead of C-Style cast
-8720f52 rados_sync.{cc,h}: pass some const std::string by reference
-315c8c3 rados_sync.cc: remove unused variable
-2b3cef7 rados_export.cc: reduce scope of 'int ret' in do_rados_export()
-da51f59 src/rados.cc: remove unused variable
-965f5d0 src/osdmaptool.cc: remove some unused variables
-531ff1c osdc/Objecter.cc: use static_cast instead of C-Style cast
-0517a2d osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'
-75531a1 osdc/ObjectCacher.cc: use static_cast instead of C-Style cast
-868447d os/FileStore.cc: move variable async_done to the right #ifdef block
-2a94340 os/FileStore.cc: remove assignment of a never used value
-a6f4de9 msg/SimpleMessenger.cc: use static_cast instead of C-Style cast
-637e8e7 mon/PGMonitor.cc: use static_cast instead of C-Style cast
-0ed2f37 mon/Monitor.cc: Clarify calculation precedence for '%' and '?'
-88b6b57 librbd/internal.cc: clarify expression with parentheses
-f7eec26 SyntheticClient.cc: Clarify calculation precedence for '%' and '?'
-94d370e fusetrace_ll.cc: reduce scope of 'int err' in main()
-5c1dc92 mds/Locker.cc: fix warning about 'Possible null pointer dereference'
-f971a67 mds/Locker.cc: use static_cast instead of C-Style cast
-07820f0 mon/MonMap: don't crash on dup IP in mon host
-0dd956c debian: Fix FTBFS because depend on old libboost-dev
-3fbdfd3 Add code to check flag state
-0e33490 librados: fix installed header include paths
-c7aa897 ceph_common.sh: add warning if 'host' contains dots
-4fe52a7 Revert "Update conf.py"
-7008992 Update conf.py
-776c042 osd: noscrub, nodeepscrub osdmap flags
-cdb4ae3 doc: Added a new network configuration reference document.
-9bcba94 Fix output of 'ceph osd tree --format=json'
-3854d3e doc: Added network settings. Reorganized index.
-4c8c36c doc: Excised network settings.
-da706c1 doc: Format edits. Excised much of network discussion. Added reference to network guide.
-881e9d8 osd: mark down connections from old peers
-ba7e815 osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
-7a9107d mon/Paxos: make old clock skew message more/less suggestive
-416b962 Properly format Content-Length: header on 32-bit systems.
-4384e59 rgw: set attrs on various list bucket xml results (swift)
-7cb6ee2 formatter: add the ability to dump attrs in xml entities
-6669e73 rgw: don't iterate through all objects when in namespace
-3b260f3 Add filestore_replica_fadvise config option default true
-f52ec6d osd: fadvise replica data don't use
-08d5a28 Avoid sending a success response when an error occurs.
-edd0a1c Fix FileStore to notice if filestore_flusher config is changed
-eb9b5f0 client: move annoying traceless handling into verify_reply_trace()
-3f1b7fd client: debug async cache invalidation
-3a7233b mds: pass created_ino back to client on replayed requests
-0bcf2ac mds: track created inos with completed request ids in session info
-977a1cb client: debug created ino
-974dc84 client: unlink old_dentry on traceless rename reply
-bc92b40 client: force lookup on traceless reply
-0d501f6 client: make _do_lookup take a const string
-3112754 mds: do not do traceless reply for open O_TRUNC requests
-98a383b client: handle fh cleanup in ll_create() failure path
-d87035c client: root can write to any file
-613c8f1 client: clear I_COMPLETE on traceless reply for dentry request
-80e122f client: pass ptarget from link, create, mkdir, symlink, setattr
-29abaf6 client: handle traceless replies from make_request()
-1e2864a osd: increate default pg log size from 1000 -> 3000
-a714c16 vstart.sh: osd debug op order = true
-d43384d Set weight of an osd based on df. priority to Weight in ceph.conf
-e6caf69 config: note which options are overridden by common_preinit()
-7c208d2 common: reduce default in-memory logs for non-daemons
-a58eec9 init-ceph: fix run dir
-de2c5b3 osd: add ctor for clone_info
-e1e2d5d Missed adding rados_types.hpp to package
-cb3ee33 ObjectCacher: fix debug log level in split
-439d0e3 osd: add ctor for clone_info
-a319f5c debian: require libsnappy-dev for ceph
-ee158ed libcephfs: return osd location from crush map
-e694ea5 release-process.rst:  Fix typos
-e8da4bf client: expose extent/osd mapping
-32407c9 ceph-disk-prepare: move in-use checks to the top, before zap
-8550e5c doc/release-notes: v0.58
-b244b87 Update doc/radosgw/s3/python.rst
-7cd1cb2 Add list_snaps() calls to snapshots test cases
-818f3d2 Add rados listsnaps command
-db4ccc0 osd/librados: add op to list clones/snaps for an object
-3b5933e Remove unused SnapContext in librados.hpp
-1ebfb41 osd: Improve snapshot test
-8418330 osd: correct comment
-a6196de ceph-disk-prepare: verify device is not in use by device-mapper
-3bd0ac0 ceph-disk-prepare: verify device is not mounted before using
-867586c debian: require >= python2.6 for ceph as well
-f03f626 ceph-disk-prepare: clean up stupid check for a digit
-5950554 ceph-disk-prepare: use os.path.realpath()
-ba3f91e (tag: v0.58) v0.58
-66df847 Add X-Python-Version >=2.6 to debian control file.
-a06ea30 PG,ReplicatedPG: use pg_has_reset_since to discard old async events
-83e9aa5 PG::build_scrub_map: detect race with peering via last_peering_reset
-9e47225 ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg
-3e59667 ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted
-2a7e802 init-ceph: fix --restart option
-007c83d doc: Updated year in footer.
-1d33436 doc: Added instructions for ensuring ceph config file and keyring prior to mounting ceph fuse.
-1cfc3ae jounal: disable aio
-7e2785a Build: no longer need to use LEVELDB_INCLUDE
-d5a453f tools: ceph: add 'ceph df' usage
-de6d0a2 mon: Monitor: 'ceph df'
-e384798 README:  Add libsnappy-dev to build requirements.
-14daccc doc: missing blank line in radosgw/config-ref
-e01c15b librados.hpp: replace paris with pairs
-d5ec9ca doc: Instruction should have been noout, not nodown.
-d54ded4 doc: Fixed OSD pool config settings. Should be in [global], not [osd].
-ded94ad ceph.spec.in: Require gptfdisk for Suse, gdisk for otherwise
-1de23b5 osd/Watch.cc: init NotifyTimeoutCB::canceled in constructor with false
-7ee047c osd/ReplicatedPG.cc: use static_cast instead of C-Style cast
-1695525 ReplicatedPG.cc: remove unused variables
-91e24b8 ReplicatedPG.cc: remove consecutive return/break statement
-79569f7 osd/PG.cc: reduce scope of listed_collection in read_log_old()
-75a265f osd/PG.cc: use static_cast instead of C-Style cast
-b4276cb osd/OSD.cc: remove unused variable 'map<int64_t, int> pool_resize'
-e0308f3 osd/OSD.cc: reduce scope of "PG *pg" in OSD::handle_pg_query()
-054424b osd/OSD.cc: use static_cast instead of C-Style cast
-3c96faa os/IndexManager.cc: reduce scope of 'int r' in IndexManager::build_index()
-b871163 os/LevelDBStore.h: pass const string by reference to past_prefix()
-ea7907f os/FileStore.cc: fix warning about comparing int with bool
-40aaf82 os/FileStore.cc: remove identical else branch
-a68411b os/FileStore.cc: use static_cast instead of C-Style cast
-f1f1c77 SimpleMessenger.cc: use static_cast instead of C-Style cast
-5009c77 msg/Pipe.cc: reduce scope of some variables
-bb172dd mon/Paxos.cc: use static_cast instead of C-Style cast
-8bfe3c6 mon/PGMonitor.cc: use static_cast instead of C-Style cast
-5376a13 mon/PGMap.cc: remove useless assigment to 'first', it's never used
-e13da07 mon/OSDMonitor.cc: use static_cast instead of C-Style cast
-9b73448 mon/MonmapMonitor.cc: remove unused variable
-4d5e3dd mon/MonmapMonitor.cc: use static_cast instead of C-Style cast
-e2fe6f0 mon/Monitor.cc: reduce scope of reuse_caps in Monitor::_ms_dispatch()
-0b73c31 mon/Monitor.cc: use static_cast instead of C-Style cast
-0213806 mon/MonClient.cc: use static_cast instead of C-Style cast
-f26fad2 mon/MDSMonitor.cc: use static_cast instead of C-Style cast
-956408e mon/LogMonitor.cc: move unused variable into related code block
-b232621 mon/LogMonitor.cc: use static_cast instead of C-Style cast
-17bd157 mon/Elector.cc: use static_cast instead of C-Style cast
-00b309c mon/AuthMonitor.cc: remove unused 'std::stringstream ss'
-17aa1b4 mds/flock.cc: remove unused variable 'crossed_waiting_locks'
-eedb463 mds/Server.cc: reduce scope of some variables
-116d8d1 mds/Server.cc: : use static_cast instead of C-Style cast
-146e457 mds/Migrator.cc: use static_cast instead of C-Style cast
-cb31159 mds/MDS.cc: remove unused variable 'oldresolve'
-7def48c mds/MDS.cc: : use static_cast instead of C-Style cast
-926e996 mds/MDCache.cc: remove unused variables recover_q and check_q
-87a1773 mds/MDCache.cc: reduce scope of 'in' in MDCache::open_root_inode()
-ec0e6cb mds/MDCache.cc: use static_cast instead of C-Style cast
-f40932d mds/MDBalancer.h: init some double variables in constructor
-a8be638 mds/MDBalancer.cc: use static_cast instead of C-Style cast
-eabd0b8 ESession.h: initialze 'open' in the constructor with false
-b6305c1 mds/LogEvent.cc: use static_cast instead of C-Style cast
-82f233b mds/Locker.cc: reduce scope of 'pool' in Locker::issue_client_lease()
-eed1476 ceph.spec.in: merge fdupes support from SUSE packages
-558681d ceph.spec.in: add on non-RHEL sharutils to 'BuildRequires:'
-db4fee2 ceph.spec.in: fix 'Requires:' to get sgdisk into the system
-c02e317 mds/Locker.cc: use static_cast instead of C-Style cast
-95cfffb mds/CDir.h: use static_cast instead of C-Style cast
-96e9da1 ceph.spec.in: gdisk for for rpm based systems instead of gptfdisk.
-0f42edd msgr: drop messages on cons with CLOSED Pipes
-2a84437 osd: add 'osd debug op order' to track and assert order of client ops
-2ed9f5a osd: include osdmap epoch in osd_op message operator<<
-0ad717a osd: useful debugging for when we drop requests
-d672452 crush-map.rst: fix chooseleaf syntax in ssd example
-ffc0ff6 init-ceph: kick off ceph-create-keys when starting mons
-1e0b2d8 init-ceph: fix default admin socket path used for status
-0cbe406 osd: show retry attempt in MOSDOp operator<<
-c47c02d msg/Pipe: allow tuning of TCP receive buffer size
-e10c1d1 msg/Pipe: move setting of socket options into a common method
-5d54ab1 FileJournal::wrap_read_bl: adjust pos before returning
-6cba924 librbd/internal.cc: remove unused variable total_write
-c12d91e librbd/internal.cc: reduce scope of 'int r'
-bed61fc librados/librados.cc: don't check unsigned 'len' against less than zero
-a2b14cf librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next()
-f441d38 librados/librados.cc: use static_cast instead of C-Style cast
-56902d7 librados/RadosClient.cc: use static_cast instead of C-Style cast
-2f66b49 crush/builder.c: fix realloc handling
-9b87690 crush/builder.c: fix sizeof handling of bucket->h.items
-56777b0 cls_rbd.cc: remove another unused variable
-9f98b80 cls_rbd.cc: remove unused variable
-d75cf46 CInode.h: use static_cast instead of C-Style cast
-4f1cd46 CDentry.h: use static_cast instead of C-Style cast
-5c3f5c5 ceph.spec.in: add new Requires from ceph-disk-prepare
-5ce0809 fix ceph-object-corpus submodule commit
-58f4cd5 doc: rbd-cloudstack: fix bullet list, missing words, change ! to .
-b65ca56 ceph-test.install:  Add libcephfs-test.jar to package.
-be3581e doc: Consolidated Ubuntu and Ubuntu 12.10 requirements.
-fac4959 mon: PaxosServices: don't ignore get_version(ver,bl) return value
-ded84b1 doc: Added dependencies for ubuntu 12.10.
-cfcacea debian: require cryptsetup-bin
-5e278b8 vstart.sh: give mon. key mon = 'allow *' caps
-202ae8e doc: fixed link and form edit.
-783555f doc: Added auth entry to index.
-7f7b2e7 doc: Removed auth entries from general. Part of an auth-specific section now.
-712fca6 doc: Added comment to enable message. Added link to Auth Config Reference.
-c0ed901 doc: Added Auth Config Reference as standalone config reference.
-f62c5ab osd: allow log trimming during recovery
-c980b76 ceph-fuse: add ceph options for all current fuse options
-cf0d4f8 mon: MonitorDBStore: return -ENOENT on get() if key doesn't exist
-1a581d0 kv_flat_btree_async.cc: remove unused variables
-b6884e8 kv_flat_btree_async.cc: remove some unreachable break statements
-ebdf67f key_value_store/cls_kvs.cc: remove unused variable dupmap
-ca71457 bloom_filter.hpp: check for self assignment
-8d35a66 crush/builder.c: reduce scope of oldsize in crush_add_rule()
-d9d075e debian: let dpkg calculate the shlibs dep for leveldb (if any)
-afa811c CrushCompiler.cc: remove duplicate if/else branches
-9a40ab3 common/secret.c: reduce the scope of some variables
-4b242f9 pick_address.cc: pass const string by refrence
-7b7e912 obj_bencher.cc: use static_cast instead of C-Style cast
-4ac5edd config.cc: remove unused variable 'val' from parse_injectargs()
-7aab480 code_environment.cc: move variable ret in get_process_name()
-de3f80c ceph_context.cc: remove unused variable 'args' from do_command
-cd4dc83 cls_crypto.cc: remove some unused variables
-924040b cls_acl.cc: remove unused variables
-b20d024 common/armor.c: reduce scope of some variables
-289d816 ceph_argparse.cc: accept also 0/1 for boolean injectargs
-a7e797d TextTable: pass const string by refrence to define_column()
-90c407e CephBroker.h: use static_cast instead of C-Style cast
-85e36c1 SyntheticClient.cc: use static_cast instead of C-Style cast
-f42a63b debian/control: fix Depends
-4316153 debian/control: add libleveldb-dev to Build-Depends:
-2becb35 README: add leveldb-dev to package list needed for build
-f811f72 ceph.spec.in: fix leveldb handling
-37d148b configure.ac: check for libsnappy
-83dbaf6 add src/leveldb to .gitignore
-8162215 remove leveldb from master branch
-ea546ae Build: Change build to always use system leveldb
-a34e7c6 ceph-test.install:  remove cepkfs-test.jar
-75ce88f doc: fix rst for watch/notify internals
-c313423 OpRequest: rmw_flags may actually be 0
-0666b63 ceph-test.install:  Add libcephfs-test.jar.
-1d8e119 client: add some new functions: lchmod, fsetattr, lutime
-ac9ed33 client: allow change file owner or group only
-7bd8400 client: use get_filehandle
-3cc0551 client: fix log data
-c5d78f4 libcephfs: fix default parameters document for ceph_open_layout
-b5c9e59 PendingReleaseNotes: mention ceph-mon requiring the creation of data dir
-ebf4717 mon: give useful errors to user when store is missing
-cf20ea6 mon: Monitor: check for an argument to 'quorum' before reading the array
-6810111 mon: Monitor: adjust sync start criteria considering a peon's bootstrap
-d9962cc mon: Paxos: bootstrap if we have fallen behind when we start collecting
-f58601d librbd: fix rollback size
-c8dd2b6 msg: fix entity_addr_t::is_same_host() for IPv6
-5b468e2 mon: fix other debug dumps
-be31390 msgr: print dump before asserting (if that is enabled)
-20b0933 msgr: dump corrupt message to log (at high debug levels)
-6d89b34 osd: allow (some) log trim when degraded, but not during recovery
-86df164 osd: restructure calc_trim
-0ba8db6 osd: allow pg log trim during (non-classic) scrub
-c1cffc7 mon: avoid expensive dump unless log will gather
-95a379a ceph_common.sh: tolerate missing mds, mon, osds in conf
-6bd0969 testing: updating hadoop-internal test
-1274064 CephBroker.cc: fix condition
-f0ae380 test: removing dead code
-5006028 test: updating libcephfs-java tests
-4ce3461 Client.cc: reduce the scope of some variables
-60b9b10 Client.cc: use static_cast instead of C-Style cast
-26e8577 Paxos.h: pass string name function parameter by reference
-dc55c29 Typo: pool should be root in rados/operations/crush-map.rst
-ef20382 osd/ReplicatedPG.cc: remove unused variables
-fd5ce75 osd_types.cc: add parenthesis around expression
-c0da0e1 OSDMap.cc: add parenthesis around expression
-83eadd8 PGMonitor.cc: add parenthesis around expression
-43e2b51 Client.cc: add parenthesis around expression
-d783f95 CephxProtocol.cc: catch end_of_buffer by reference
-bf10e5e CephxProtocol.cc: catch error by reference
-d0e48eb crushtool.cc: remove unneeded function declaration
-a6b3cc7 mds/journal.cc: fix assert in replay()
-88555e7 KeyValueDBMemory.cc: use empty() instead of size() == 0
-4059d94 ReplicatedPG.cc: use empty() instead of size() == 0
-a2d842f FileStore.cc: use if(!empty()) instead of if(size())
-e3b27b7 mon_store_converter.cc: use empty() instead of size()
-ed83d4b Paxos.cc: use empty() instead of size()
-14716fd Monitor.h: use empty() instead of !size()
-7a81b07 Monitor.cc: use empty() instead of size()
-1c8ffc5 ceph.spec.in:  Create placeholder directorys under /var/lib/ceph (Bug 4119)
-aa79077 configure.ac:	Add test for c++ compiler.
-ccdafa0 test_lock_fence.sh, rbdrw.py: rbd lock/fence test
-98408f5 mon: PaxosService: remove lingering uses of paxos getters and wait methods
-9d472ca systest: restrict list error acceptance
-b64d261 systest: fix race with pool deletion
-9e6025b doc: Added subnet example and verbiage to network settings.
-5e5530b doc: Added content to remove REJECT rules from iptables.
-9c693d7 test_rbd: move flatten tests back into TestClone
-55bd768 qa: enable watch-notify dependent test
-345aa2d test_rbd: close image before removing it
-9ab0fd7 doc: Added a small ref section for osd config reference.
-3ef6d5b doc: Updated osd configuration reference.
-5b24a68 systest: restrict list error acceptance
-b0271e3 systest: fix race with pool deletion
-2b7deee qa: output rados test names as they run
-62999ea PG,ReplicatedPG: use pg_has_reset_since to discard old async events
-6722533 PG::build_scrub_map: detect race with peering via last_peering_reset
-04ee8f4 ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg
-a01dea6 ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted
-c453734 librbd: remove unused internal method
-5806226 librbd: drop snap_lock before invalidating cache
-3fdf439 doc: Moved admonition to kernel mount.
-516935b doc: Added verbiage to describe single host deadlocks.
-67103a8 Monitor.cc: fix -Wsign-compare
-cf167a1 debian: add new files
-4b77deb ceph.spec.in: add new files
-6ae10fe Client.cc: don't pass c_str() if std::string is expected
-350481f Paxos.h: fix dangerouse use of c_str()
-9217c4a debian: make gdisk, parted requirements, not recommendations.
-35c951f Minor wording change.
-6bae2a5 Grammar typo
-3896896 Changes to the OS support, multi-data center, and hypervisor questions.
-0cd215e mds: reencode MDSMap in MMDSMap if MDSENC feature is not present
-c07e8ea qa/run_xfstests.sh: use $TESTDIR instead of /tmp/cephtest
-8235b16 osd: an interval can't go readwrite if its acting is empty
-704db85 mkcephfs: create mon data dir prior to ceph-mon --mkfs
-10f50d3 doc: Added a lot of info to OSD troubleshooting.
-e68f2c8 doc: Added mention of Admin Socket interface and brief description.
-73317bd doc: Changed title to OSD and PG, indicating both subjects are covered.
-ab7039d doc: Added references from monitoring OSD to troubleshooting OSD.
-97cc738 doc: set maxdepth to 2, so TOC isn't so long with new OSD troubleshooting.
-7c94083 client: use 4MB f_bsize and f_frsize for statfs
-64267eb test/librados/watch_notify: fix warning
-53586e7 ceph-object-corpus: re-update
-2dae6a6 PG::proc_replica_log: oinfo.last_complete must be *before* first entry in omissing
-3105034 objecter: don't resend linger ops unnecessarily
-15bb9ba objecter: initialize linger op snapid
-5648117 Add test for list_watchers() C++ interface
-1c3241e Add listwatchers command to rados
-af339ae Add ObjectReadOperation and IoCtx functions
-cfe9239 librados: expose a list of watchers on an object
-bf5cf33 Add rados_types.h header file
-8c05af5 configuration parsing: give better error for missing =
-dc18122 osd/PG: fix typo, missing -> omissing
-94ae725 test_librbd_fsx: fix image closing
-6c08c7c objecter: separate out linger_read() and linger_mutate()
-de4fa95 osd: make watch OSDOp print sanely
-dd007db ceph_common.sh: fix iteration of items in ceph.conf
-6cb5374 ceph-conf.rst: missing '=' in example network settings
-ce7ffc3 PG::proc_replica_log: adjust oinfo.last_complete based on omissing
-79f09bf MDS: remove a few other unnecessary is_base() checks
-9f82ae6 mds: allow xattrs on the root inode
-6bd8781 mds: use inode_t::layout for dir layout policy
-84ef164 mds: parse ceph.*.layout vxattr key/value content
-fea7768 osdc/Objecter: unwatch is a mutation, not a read
-81bd996 FileStore::_clone: use _fsetattrs rather than _setattrs
-5b48e63 FileStore::_setattrs: use _fsetattrs
-c33c51f FileStore: add _fsetattrs
-2ec04f9 FileStore::_setattrs: only do omap operations if necessary
-83fad1c FileStore::_setattrs no need to grab an Index lock for the omap operations
-ad00fc7 Fix failing > 4MB range requests through radosgw S3 API.
-96896eb Handle empty CONTENT_LENGTH environment variable.
-c83a01d Fix failing > 4MB range requests through radosgw S3 API.
-4277265 osd: an interval can't go readwrite if its acting is empty
-a1ae856 librbd: make sure racing flattens don't crash
-995ff0e librbd: use rwlocks instead of mutexes for several fields
-e0f8e5a common: add lockers for RWLocks
-6d8dfb1 osd: clear recovery state on pg removal
-94e5dee test: fix run-rbd-tests pool deletion
-6612b04 ceph-object-corpus: use temporary 'wsp.master.new' corpus until we get merged into master
-04dac7e vstart.sh: Create mon data directory before --mkfs
-89f9204 test: ObjectMap: add a generic leveldb store tool
-cb85fb7 mon: ceph-mon: convert an old monitor store to the new format
-19e5098 mon: Add an offline monitor store converter
-091fa82 os: LevelDBStore: scrap init() and create open() and create_and_open()
-cab3411 mon: Monitor: Add monitor store synchronization support
-6db25a3 message: MMonSync: Monitor Synchronization message
-d8a5cf6 mon: MonitorDBStore: add store iterators to obtain chunks for sync
-b33d4ea mon: Paxos: get rid of slurp-related code
-cd4de77 mon: PaxosService: rework full version stashing
-86f6a34 mon: Paxos: trim through Paxos
-a5e2dcb mon: Single-paxos and key/value store support
-5551aa5 mds: parse ceph.*.layout vxattr key/value content
-0202bf2 ReplicatedPG: allow multiple watches in one transaction
-9a399af doc: add some internal docs for watch/notify
-661a283 librados/: include watch cookie in notify_ack
-8ece91f ReplicatedPG: accept watch cookie value with notify ack
-ebdf66d Watch/Notify: rework watch/notify
-7af3299 osd/: move ObjectContext over to osd_types.h
-22ec5bc PG: check object_contexts on flushed
-359c0df ReplicatedPG: add intrusive_ptr hooks
-7fe7eff Timer.cc: use complete() rather than finish()
-8713f18 osd: remove force hack for testing the HASHPSPOOL code
-ceb390f mon: allow syslog level and facility for cluster log to be controlled
-c3d130c mon: Monitor: keyring always on mon_data/keyring by default
-1461967 mon: MonitorDBStore: Add a key/value store to be used in the monitor
-0201cc8 rgw: refactor header grants
-eb0f49d rgw_acl: Support ACL grants in headers.
-04f3fe4 mon: fix new pool type
-2e1b02b osd: lock pg in build_past_intervals_parallel()
-473beb5 qa: mon/pool_ops.sh: fix last test
-3692ccd doc: make the cephfs man page marginally more truthful
-db99fb4 rgw: fix multipart uploads listing
-34f885b rgw: don't copy object when it's copied into itself
-efc4947 man: make the cephfs man page marginally more truthful
-128cb17 osd/OSDMap: note OSDHASHPSPOOL feature when pool FLAG_HASHPSPOOL is set
-b90167d mon: move OSDMap feature bit calculation into an OSDMap method
-8cc2b0f osd: introduce HASHPSPOOL pool flag, feature to avoid overlapping pg placements
-96e153a qa: mon/pool_ops.sh: test pool set size
-7bd49d0 qa: mon/pool_ops.sh: fix pool tests
-4eb9bf2 test/bufferlist: fix warning
-3ff0fe0 testing: updating hadoop-internal test
-f1bff17 qa: sample test for new replication tests
-60d9465 doc/release-notes: v0.57
-dbadb3e PG: remove weirdness log for last_complete < log.tail
-5fc83c8 os/FileStore: check replay guard on src for collection rename
-56c5a07 osd: requeue pg waiters at the front of the finished queue
-f1841e4 osd: pull requeued requests off one at a time
-9a7a9d0 (tag: v0.57) v0.57
-4002d70 osd: fix printf warning on pg_log_entry_t::get_key_name
-f80f849 qa: test_mon_workloadgen: use default config file path
-6d33859 qa: mon/workloadgen.sh: drop TEST_CEPH_CONF code
-8ca2274 rbd: udevadm settle before unmap
-b45f67e test: correcting hadoop-internal tests
-d2dbab1 testing: adding a Hadoop wordcount test
-30b8d65 mon: restrict pool size to 1..10
-45a4fe0 qa: rbd map-snapshot-io: udevadm settle
-8e0be54 debian: allow extra args to get passed to ./configure via the environment
-231dc1b qa: rbd/map-snapshot-io: remove image when done
-1a7a57a qa: fix quoting of wget URLs
-3612ed6 osd: log weirdness if caller_ops hash gets bigger than the log
-ad84ea0 Strip any trailing whitespace from rbd showmapped
-133d0ea buffer: drop large malloc tests
-7fcbfdc buffer: put big buffer on heap, not stack
-fb472a5 unit tests for src/common/buffer.{cc,h}
-94e7c14 mon: fix pgmap stat smoothing
-aa537df doc/release-notes: add note about upgrade to v0.56.3
-28e7212 ceph_common: fix check for defined/undefined entities in conf
-d20bf07 buffer::ptr::cmp only compares up to the smallest length
-fecc3c3 ceph-disk-prepare: -f for mkfs.xfs only
-aff0bb6 debian: fix start of ceph-all
-c4573b7 fix operator>=(bufferlist& l, bufferlist& r)
-3f5c252 qa: rbd/map-snapshat-io: unmap image when done
-d950d83 ceph-disk-prepare: always force mkfs.xfs
-e090a92 udev: trigger on dmcrypted osd partitions
-c6ac0dd ceph-disk-prepare: add initial support for dm-crypt
-e7040f5 ceph-disk-activate: pull mount options from ceph.conf
-b1c0fcc ceph-disk-activate: use full paths for everything
-95835de ceph-disk-prepare: do partprobe after setting final partition type
-ea6cfb5 ReplicatedPG: handle missing set even for old format
-bc74429 qa: rbd/map-snapshot-io.sh: chown rbd device stuff
-29b4466 cls/lock/cls_lock.cc: use !lockers.empty() instead of size()
-adb807c src/client/SyntheticClient.cc: use !subdirs.empty() instead of size()
-5c3e657 client/Client.cc: use empty() instead of size()
-4902836 mds/MDSMap.h: use up.empty() instead of up.size()
-28bf6cb mds/CDentry.h: use projected.empty() instead of projected.size()
-d50a22d ceph_authtool.cc: use empty() instead of size()
-ab17aaf OSD: add leveldblog compatibility flag for OSD
-16b3718 PG: verify log versions during read_log
-5f92b6c PG: write_log if we read an old-format log
-1ef9420 osd: move pg log into leveldb
-ae0c2bb qa: pull qa stuff from ceph.com ceph.git mirror
-160490c doc: radosgw: document config without 100-continue and custom fastcgi
-467f7a7 config: Add small note about default number of PGs
-6f3f173 test_sync_io.c: add error handling
-26cdb6a test_short_dio_read.c: add error handling
-2c42bfc doc: update rados troubleshooting for slow requests
-a6534bc osd/OSDCap: add unit test for parsing pools/objects with _ and -
-6c504d9 osd/OSDCap: tweak unquoted_word parsing in osd caps
-4dfcad4 OSD: always activate_map in advance_pgs, only send messages if up
-2ce28ef osd/OSDCap: add unit test for parsing pools/objects with _ and -
-a14bae6 rgw: user can specify 'rgw port' to listen on a tcp port.
-93bfb36 test/filestore/chain_xattr: remove testfile; disable LOGFILE
-1de16ac osd: log error when ondisk snap collections do not match
-971b161 osd: fix read_log error/warning messages to mon
-533fd7a wireshark/ceph/packet-ceph.c: fix some issues from cppcheck
-ab1166c rest_bench.cc: use empty() to check for emptiness
-8202378 tools/common.cc. use !empty() to check for non-emptiness
-1834885 test_filejournal.cc: use empty() to check for emptiness
-f9bf127 src/test/osd/RadosModel.h: use empty() to check for emptiness
-37bb45f test_mon_workloadgen.cc: use empty() to check for emptiness
-f923be5 TestFileStoreState.cc: use empty() to check for emptiness
-47413b3 FileStoreTracker.cc: use empty() to check for emptiness
-9da963e test_object_map.cc: use empty() to check for emptiness
-e551dd4 test_keyvaluedb_iterators.cc: use empty() to check for emptiness
-a8614b8 scratchtoolpp.cc: print some more results
-e2af5b3 rgw/rgw_user.cc: use empty() to check for emptiness
-a30017f rgw/rgw_usage.cc use empty() to check for emptiness
-b14994e rgw/rgw_rest_swift.cc: don't pass c_str() result to std::string argument
-dfe1b45 rgw/rgw_rados.cc: : use empty() to check for emptiness
-005fe42 rgw/rgw_op.cc: use empty() instead of size() to check for emptiness
-e980d52 rgw/rgw_main.cc: use empty() instead of size() to check for emptiness
-6044083 mds/journal.cc: use !empty() instead of size() to check for emptiness
-f244fd7 mds/SnapServer.cc: use !empty() instead of size() to check for emptiness
-e57d991 mds/MDSMap.cc: use !empty() instead of size() to check for emptiness
-aa2ae6a mds/MDS.cc: use !empty() instead of size() to check for emptiness
-1755fd9 mds/MDCache.cc: use empty() instead of size() to check for emptiness
-3ed962b mds/Locker.cc: use !empty() instead of size()
-a65c71c mds/CInode.cc: use !empty() instead of size()
-d089640 mds/CDir.cc: use !empty() instead of size()
-4c11a5d librbd/internal.cc: use !empty() instead of size()
-15248ae kv_flat_btree_async.cc: use empty() instead of size() to check for emptiness
-fc0a108 cls_kvs.cc: use !empty() instead of 'size() > 0' to check for emptiness
-30fe107 crushtool.cc: use !empty() instead of 'size() > 0' to check for emptiness
-f4cae00 crush/CrushWrapper.cc: don't pass c_str() result to std::string argument
-d6c4a62 obj_bencher.cc: use empty() instead of 'size() == 0' to check for emptiness
-e719e0a common/WorkQueue.cc: use !empty() instead of size() to check for emptiness
-810d23e cls_refcount.cc: use empty() instead of !size() to check for emptiness
-c4f1c07 cls/rbd/cls_rbd.cc: use !empty() instead of 'size() > 0'
-fb811ec rgw/rgw_log.cc: don't pass c_str() result to std::string argument
-59f8c8d rgw/rgw_gc.cc: use !empty() instead of size() to check for emptiness
-338e168 rgw/rgw_admin.cc: use empty() instead of size() to check for emptiness
-8c1cb21 rgw/rgw_admin.cc: prevent useless value assignment
-c115bdb rbd.cc: use empty() instead of size() to check for emptiness
-95eda32 rados.cc: use omap.empty() instead of size() to check for emptiness
-4950a1b osdmaptool.cc: : use empty() instead of 'size() < 1'
-fb6561e Objecter.cc: prevent useless value assignment
-d029b93 init-ceph.in: replace "/var/run/" by already used $RUN_DIR
-aa4cae6 ceph_common.sh: check if $sshdir exist, otherwise create it
-97c6ce0 init-ceph.in: create pid and log dir only on start
-7eefe0b doc: Update create example to use 'allow ' syntax
-51a0a22 doc: Move pool=... syntax inside of single quotes
-01f82b8 ceph.spec.in: remove librados2 requirement from librbd1
-9952f2d ceph.spec.in: cleanup requirements of fuse packages
-03fe479 LDADD PTHREAD_LIBS to fix librados-config linking
-02a353e fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr
-b7b9af5 debian: start/stop ceph-all event on install/uninstall
-690ae05 ceph-disk-activate: catch daemon start errors
-5bd85ee udev: trigger ceph-disk-activate directly from udev
-d1904b2 ceph-disk-activate: auto detect init system
-f06b45e ceph-disk-activate: specify full path for blkid, initctl, service
-1af749e upstart/ceph-osd: make crush update on start optional
-ccdcae3 doc/release-notes: v0.56.3
-1334a42 PG,OSD: convert write_info users to write_if_dirty
-34ed5da OSD: init infos_object in OSD::init()
-93b3da6 PG: place biginfo on the infos object next to the info and epoch keys
-f4b70c8 PG: minor style change for append_log and read_info
-f3bc8df PG: use helpers to generate info and epoch keys
-7e19207 libcephfs:  Fix shutdown segfault
-6879e8b doc: Minor clarification.
-760b5ff OSD: dirty big_info in build_past_intervals_parallel
-e011ad1 upstart: ceph-hotplug -> ceph-osd-activate
-792e45c upstart/ceph-hotplug: tell activate to start via upstart
-b2ff6e8 ceph-disk-prepare: refactor to support DIR, DISK, or PARTITION for data or journal
-64ec2d4 doc: Made a few clarifications from feedback.
-191d5f7 ceph-disk-activate: detect whether PATH is mount or dir
-fd4a921 ceph-disk-activate: add --mark-init INITSYSTEM option
-0765528 ceph-disk-activate: factor mounting out of activate
-23ad3a4 debian: put ceph-mds upstart conf in ceph-mds package
-e80675a debian: include /var/lib/ceph/bootstrap-mds in package
-809143f ceph-create-keys: create mds bootstrap key
-4698b6a upstart/ceph-hotplug: drop -- in ceph-disk-activate args
-c8f528a init-ceph: iterate/locate local sysvinit-tagged directories
-b8aa476 init-ceph: consider sysvinit-tagged dirs as local
-50cbd10 debian: implement purge postrm script for ceph, ceph-mds
-af2372c ceph-disk-prepare: align mkfs, mount config options with mkcephfs
-617bde9 doc: Added many Q/A sections to the FAQ.
-670a148 qa: fix mon/osd.sh
-7aefe92 specfile:  Add ceph-coverage to list of binaries
-612f65b Objecter.cc: use !empty() instead of size() to check for emptiness
-722d12c ObjectCacher.cc: use empty() instead of !size() to check for emptiness
-475967f ReplicatedPG.cc: use empty() instead of size() to check for emptiness
-d9a0638 PG.cc: use empty() instead of size() to check for emptiness
-5d89996 OSD.cc: use empty() instead of size() to check for emptiness
-f94f797 LFNIndex.cc: use !holes.empty() instead of 'size() > 0'
-4893def HashIndex.cc: use empty() instead of size() to check for emptiness
-f65679b FileStore.cc: use empty() instead of size() to check for emptiness
-b0ec071 DBObjectMap.cc: use empty() instead of size() to check for emptiness
-dd855b3 monmaptool.cc: use empty() instead of size() to check for emptiness
-0b31234 PGMonitor.cc: use !empty() instead of size() to check for emptiness
-6f0175e OSDMonitor.cc: use !empty() instead of size()
-8fcd31f Monitor.cc: use empty() instead of size()
-f7078b4 MonCaps.cc: use !empty() instead of size()
-d7705ed OSDMonitor.h: use !reporters.empty() instead of size()
-180cae5 AuthMonitor.cc: use !pending_auth.empty() instead of 'size() > 0'
-6b8458d CInode.h: use !old_inodes.empty() instead of size()
-a3970e5 CephxProtocol.h: pass CryptoKey by reference to decode_decrypt()
-9d6eccb osd/PG: initialize info_struct_v in ctor
-7c2e2b9 java: make CephMountTest use user.* xattr names
-977ba79 doc: clarified ceph id vs. ceph name, and fixed a typo.
-188f3ea osd/PG: store pg_info_t in leveldb (omap), purged_snaps separately
-0e98527 doc: Added some of the troubleshooting steps into the libvirt procedure and removed path for virsh edit.
-fe28381 librbd: unprotect any non-unprotected snapshot
-c036dc7 doc: fix command syntax
-376cca2 deb:  Add ceph-coverage to ceph-test deb package
-78ff229 mds: Setting pool on a file requires latest osdmap
-d8c6b08 mds:  Add retry field to MDRequest
-ed6c3ff qa/workunits:  Add vxattr set pool test script
-5517000 cephtool:  Add add_data_pool command to help
-1b05517 msg/Messenger: rename option
-302b26f osd: only share maps on hb connection of OSD_HBMSGS feature is set
-afda30a osd: tolerate unexpected messages on the heartbeat interface
-1e68ccf msg/Messenger: do not crash on unhandled message
-a88f9be .gitignore: fix ceph_filestore_dump name
-2cb6bcc Revert "Makefile: name binary ceph-filestore-dump"
-0c65cd5 mds/LogEvent.h: change print() signature to const
-e2b8e0f modified the perl file name Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-411770c FileStore: set replay guard on create_collection
-b184ff5 FileStore: _split_collection should not create the collection
-d8891d5 os/FileStore: do not tolerate ENOENT on collection_add
-66ddffb osd: make coll_t::is_pg() correctly validate the snapid suffix
-7edf8ac os: use coll_t:is_pg_prefix() check instead of is_pg()
-ea98fbb doc: Removed legacy comment regarding Keystone integration.
-522a81e doc: Added link to <disk> reference. Added minor clarifications.
-77799a5 auth: cephx: KeyServer: add 'has_secrets()' function
-5659a4e mon: Remove global version code introduced around bobtail's release
-bd6d498 ceph-filestore-dump: Improve error message
-f0b2e32 Makefile: name binary ceph-filestore-dump
-2922287 doc: Added procedures for using libvirt VMs with Ceph.
-1b7fc30 .gitignore: fix typo and missing vstart.sh output
-2783fce work unit for rbd cli tests Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-f923c8c doc: document hadoop replication config
-7c8d3d0 added new cli tests Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-a62d519 Unit tests for chain_xattr.cc
-31e911b osd: update snap collections for sub_op_modify log records conditionaly
-715d871 osd: include snaps in pg_log_entry_t::dump()
-54b6dd9 osd: unconditionally encode snaps buffer
-8b05492 osd: improve debug output on snap collections
-ab89e93 Revert "rgw: plain format always appends eol to data"
-133295e libcephfs: fix for #4068
-755b4bb .gitignore: add local ones for ocf and man
-3d5969d qa/rbd: +x on map-snapshot-io.sh
-b26dc4e test: fix run-rbd-tests
-c52dbd5 .gitignore: re-add vstart dirs and tags, fix typo
-ebe70d7 Mutex.cc: fix implicitly-defined namespace 'std'
-c7970bb ceph_authtool.cc: fix implicitly-defined namespace 'std'
-d6b205f librados/librados.cc: fix implicitly-defined namespace 'std'
-69552ff test_mon_workloadgen.cc: fix -Wgnu
-1f0fd50 src/osd/PG.h: use empty() instead of size()
-76798ea src/osd/OSD.h: use empty() instead of size()
-99f2175 src/msg/Messenger.h: pass function parameter by reference
-72ff806 src/mon/PGMonitor.cc: remove unused variable
-aad71df src/log/Entry.h: pass function parameter by reference
-6986707 common/WorkQueue.h: use empty() instead of size()
-3b77687 common/AsyncReserver.h: use empty() instead of size()
-d427d98 src/msg/msg_types.h: pass function parameter by reference
-79c95a6 common/config.h: declaration of config_option as struct
-f213669 .gitignore: cleanup and sort entries
-125cb71 ceph-test.install: updated filelist
-6cecdd8 spec/debian: don't install rest-bench twice
-7b89ee6 ceph-test: give binaries from ceph-test package useful  names
-749218f buffer::ptr self assignment bug + patch
-89df090 rgw/rgw_rest.cc: fix 4K memory leak
-f0ba807 SyntheticClient.cc: fix some memory leaks in the error handling
-e6591db wireshark: fix some memory leaks
-d48cc78 rgw/rgw_xml.cc: fix realloc memory leak in error case
-c92a0f5 os/FileStore.cc: fix realloc memory leak in error case
-f26f147 common/fiemap.cc: fix realloc memory leak
-4d054e2 qa: fix iogen script
-41537d4 osd: do not spam system log on successful read_log
-abc80ff java: make CephMountTest use user.* xattr names
-c31aff5 rgw: plain format always appends eol to data
-3e4d79f rgw: change json formatting for swift list container
-b19b6dc osd: fix load_pgs collection handling
-1f80a0b osd: fix load_pgs handling of pg dirs without a head
-073f58e OSD::load_pgs: first scan colls before initing PGs
-0d68f3a test/crypto: fix narrowing conversion warning
-20255d9 doc: update commands for fetching release PGP keys
-7761233 mds: enable SnapInfo, snaplink_t, sr_t dencoder usage
-d414875 mds: remove very dead commented-out code
-f1e08e6 mds: add ENCODING to the incompat set
-e7bc4b8 mds: cap_reconnect_t uses modern encoding
-38dd59b doc: Removed unnecessary/contradictory options.
-19c9466 doc: Fixed order of option.
-07b24cf mds: SessionMap now uses modern encoding
-7cbae70 mds: mds_load_t now uses modern encoding
-5c81221 mds: dirfrag_load_vec_t now uses modern encoding
-6a6f75e mds: inode_load_vec_t now uses modern encoding
-4123d01 mds: use modern encoding for LogEvent
-3fb1b21 mds: EUpdate more modernization for dencoder
-05461e8 mds: EUpdate event now uses modern encoding
-8f75db3 mds: ETableServer more modernization for dencoder
-ac8f25c mds: ETableServer event now uses modern encoding
-f82dce8 mds: ETableClient more modernization for dencoder
-d727b12 mds: ETableClient event now uses modern encoding
-d557bcf mds: ESubtreeMap more modernization for dencoder
-7998524 mds: ESubtreeMap event now uses modern encoding
-1842f46 mds: ESlaveUpdate more modernization for dencoder
-70bc6af mds: rename_rollback more modernization for dencoder
-85c67fe mds: rmdir_rollback more modernization for dencoder
-637e99f mds: link_rollback more modernization for dencoder
-a64153f mds: ESlaveUpdate event now uses modern encoding everywhere
-3cea0ca mds: ESessions more modernization for dencoder
-8e8ecb4 mds: ESessions now uses modern encoding
-709ff3d mds: ESession more modernization for dencoder
-3f469ba mds: ESession event now uses modern encoding
-b578ef2 mds: EResetJournal modernization for dencoder
-5db5433 mds: EResetJournal event now uses modern encoding
-a1ed741 mds: EOpen event now uses modern encoding
-de9c1a1 MDS: EMetaBlob more modernization for encoder
-821b74e MDS: EMetaBlob::dirlump more modernization for encoder
-196313b mds: EMetaBlob::nullbit modernization for dencoder
-09a2d66 mds: EMetaBlob::remotebit more modernization for dencoder
-deb0d45 mds: EMetaBlob::full_bit more modernization for dencoder
-6073027 mds: EMetaBlob and its sub-parts use modern encoding now
-83c1a3c mds: EImportStart event uses modern encoding
-a25683f mds: EImportFinish event uses modern encoding
-b079733 mds: EFragment event uses modern encoding
-8906ae9 mds: remove unused EString event
-f886f31 mds: EExport event uses modern encoding
-d21de81 mds: ECommitted now uses modern encoding
-7bad507 SnapServer: use modern encoding for server_state
-6e797e0 InoTable: use modern encoding for encode_state and decode_state
-eb060bb CInode: use modern encoding for encode_export/decode_import
-d8a7b87 CInode: use modern encoding for encode_store
-95cee97 AnchorServer: use modern encoding for server state
-d5a6a25 DecayCounter: use modern encoding
-0fe7a08 mds: old_rstat_t now uses modern encoding
-ff63530 mds: Capability (and sub-structs) now uses modern encoding
-3cf3710 mon: fix typo in C_Stats
-2bdf753 mon: assert valid context return values
-4837063 mon: retry PGStats message on EAGAIN
-1782776 mon: handle -EAGAIN in completion contexts
-1b05b0e radosgw-admin: fix cli test
-2eaa728 keys: renew autobuild.asc key
-278dfe5 rgw: stream get_obj operation
-3383618 throttle: optional non perf counter mode
-ed2bb38 OSD: check pg snap collections on start up
-55f8579 OSD::load_pgs: first scan colls before initing PGs
-70532d1 rgw: get bucket_owner from policy
-f6af1e7 rgw: fix bucket_owner assignment
-e345dfe Feature 3667: Support extra canned acls.
-fa47e77 ReplicatedPG: check store for temp collection in have_temp_coll
-a18045f rgw: a tool to fix clobbered bucket info in user's bucket list
-a00c77a rgw: bucket recreation should not clobber bucket info
-36cf4d0 ceph: fix 'pg' error message to direct user toward better input
-1042060 mds: error messages for export_dir said 'migrate_dir'
-c44846e ceph: ceph mon delete doesn't exist; ceph mon remove is the command Fix up cli test as well (doc is already correct)
-eb9d6ca osd: fix name of setomapval admin-daemon command
-73872e7 ceph: use "config set" consistently in help/error msgs
-5896b97 modified the script to run on both argonaut and bobtail. Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-dbce1d0 PG: dirty_info on handle_activate_map
-9432353 mds: rename mds_traceless_replies to mds_inject_traceless_reply_probability
-af95d93 osd: flush peering queue (consume maps) prior to boot
-75c40fa qa: fix iogen script
-46d7dbd client: trigger the completion in _flush when short-cutting
-08b82b3 mds: add "mds traceless replies" debug option
-9871cf2 logrotate.conf: Silence rgw logrotate some more
-d02340d silence logrotate some more
-c0e1070 test: fix Throttle unit test.
-1948a02 osd: do not spam system log on successful read_log
-3acc4d2 rbd-fuse: fix for loop in open_rbd_image()
-db0dbe5 msg/Message.h: fix C-style pointer casting
-b1fc10e messages/MOSDRepScrub.h: initialize member variable in constructor
-22e48b5 include/xlist.h: fix C-style pointer casting
-d54bd17 include/types.h: change operator<< function parameter
-0327cba include/buffer.h: fix operator=
-ad526c0 obj_bencher.cc: use vector instead of VLA's
-a4042cc ceph_crypto.cc: remove unused shutdown() outside crypto ifdef's
-4268296 WorkQueue.h: fix cast
-27fb0e6 rgw: a tool to fix buckets with leaked multipart references
-50c1775 rgw: radosgw-admin object unlink
-3b63542 mon: move list_rules into CrushWrapper method
-9f4d4ac crush: add list_rules() method
-7f237be Makefile:  Add rgw/logrotate.conf source tarball
-99ea303 logrotate.conf:  Remove unneeded loop and update new rgw version.
-c8eace6 rgw: create a separate logrotate file for radosgw
-b79067a qa: add workunits/mon/crush_ops.sh
-2c559a7 mon: 'osd crush rule rm <name>'
-a19cdd4 osdmap: method to check if a crush ruleset is in use
-b9bd482 crush: remove_rule() method
-43a01c9 crush: factor out (trivial) crush_destroy_rule()
-c370d85 mon: 'osd crush rules list|ls'
-b6036a5 mon: 'osd crush dump'
-9da6290 crush: factor out dump_rules from dump
-a04d3f0 mon: 'osd crush rule create-simple <name> <root> <failure_domain_type>'
-1a386d6 crush: add_simple_rule() command
-d7ada58 crush: fix get_rule_id() return value
-4f992ea crush: add rule_exists()
-3105700 mon: 'osd find <osd-id>' command
-c058285 mds: uninline Capability encoders
-90d93d9 mds: build dencoder with more stuff
-ad40bdd MDSMap: mds_info_t now uses modern encoding
-50ab924 mds: MDSMap now uses modern encoding
-771204b mds: move conditional MDSMap encoding into single encode method
-21901d2 mdsmap: uninline encode/decode
-78632ad mds: modernize SimpleLock on-wire encoding
-924fb18 mds: mds_table_pending_t now uses modern encoding
-49b0be5 mds: rename MDSTableServer::_pending to mds_table_pending_t
-72c7bcd mds: MDSCacheObjectInfo now uses modern encoding
-d580a58 mds: string_snap_t now uses modern encoding
-f57f424 mds: session_info_t now uses modern encoding
-91555e2 mds: move durable Session bits into session_info_t
-4486580 mds: fnode_t now uses modern encoding
-bd4897b mds: old_inode_t now uses modern encoding
-7e85a17 remove common/types.cc
-843a352 mds: inode_t now uses modern encoding
-87da20b mds: fold byte_range_t into client_writeable_range_t
-49eb4d6 mds: client_writeable_range_t now uses modern encoding
-9cf9c54 mds: nest_info_t now uses modern encoding
-cda5590 mds: rename struct default_file_layout to file_layout_policy_t
-a892671 mds: frag_info_t now uses modern encoding
-2888830 mds: default_file_layout now uses modern encoding
-34f7c71 mds: inode_back{trace,pointer}_t now uses modern encoding
-f1baa79 mds: move SnapRealm into its own h/cc files
-3e72893 client: rename client/SnapRealm files to avoid automake build conflict
-08124fc mds: SnapInfo, snaplink_t, sr_t now use modern encoding
-e35b89e  mds: Anchor now uses modern encoding
-ccba2ce mds: add CEPH_FEATURE_MDSENC feature bit
-43468a3 osd: remove DecayCounter header
-ece1c0f mon: check correct length of command
-64ded02 Relax Throttle::_reset_max conditions and associated unit tests
-ca2d645 os: default to 'journal aio = true'
-d41b541 Edit endpoint-create in ./doc/radosgw/config.rst
-6e60330 Edit rgw keystone url in ./doc/radosgw/config.rst
-af8cac1 Note on host in ./doc/radosgw/config.rst
-4b4dba3 doc: Updated to note bobtail supports RGW + Keystone.
-e2e1de2 cli test: add pg deep-scrub option to test
-eba8697 cli test: add pg deep-scrub option to test
-4a6924a install:  remove perl dependency
-804ffc6 Add "pg deep-scrub..." missing from ceph usage output
-9019fbb rgw: fix setting of NULL to string
-e0acc33 xattr_bench.cc: remove twice included <time.h>
-c81a9d4 ceph-filestore-dump.cc: remove twice included <iostream>
-558b238 testmsgr.cc: remove twice included <sys/stat.h>
-60432d9 perf_counters.cc: remove twice included header files
-b70d563 testxattr.cc: remove twice included <iostream>
-b22d641 workload_generator.cc: remove twice included "common/debug.h"
-9421041 test_idempotent.cc: remove twice included "os/FileStore.h"
-d141f79 tp_bench.cc: remove twice included <iostream>
-c8aeb93 small_io_bench*.cc: remove twice included <iostream>
-8197990 MDS.cc: remove twice included common/errno.h
-4e29c95 mon: enforce reweight be between 0..1
-b970d05 qa: smalliobenchrbd workunit
-d050fe1 doc: Minor edits.
-0797be3 rgw: key indexes are only link to user info
-fd1512f Build:  Add -n to files and description for rbd-fuse in ceph.sepc.in
-de01bdd Makefile:  Install new rdb-fuse.8 man page
-16cf9dc build:  Add new rbd-fuse package
-7d1e825 Revert "Don't install rbd-fuse binary"
-334568e rbd-fuse: quick and dirty manpage
-91f8c3c rbd-fuse: quick and dirty manpage
-340b1cf ceph-filestore-dump.cc: don't use po::value<string>()->required()
-1ee46c5 doc: Added more detail to SSD section. Links to performance blogs.
-2292fa6 Add important note in doc/radosgw/config.rst
-129a660 ceph-filestore-dump.cc: don't use po::value<string>()->required()
-9235271 ceph.spec.in: fix file section for ceph-resource-agents
-6e09cb9 ceph.spec.in: extend fix for libedit-devel on special SUSE versions
-4c1d8d0 ceph.spec.in: don't move libcephfs_jni files around
-9b16036 ceph.spec.in: move libcephfs_jni.so to ceph-devel
-3f53c3f Validate format strings for CLS_ERR/CLS_LOG
-97c6619 qa: update the rbd/concurrent.sh workunit
-0758fab Add ceph-filestore-dump to the packaging
-ab778cb doc: v0.56.2 release notes
-3c8d7d7 osd: create tool to extract pg info and pg log from filestore
-4a950aa Move read_log() function to prep for next commit
-b571f8e PGMap: fix -Wsign-compare warning
-b0d4dd2 test_libcephfs: fix xattr test
-c782d2a qa: add test for rbd map and snapshots
-e253830 cls_rbd, cls_rgw: use PRI*64 when printing/logging 64-bit values
-77f5741 mds: move lexical_cast and assert re-#include to the top
-35e5d74 Don't install rbd-fuse binary
-23923ee mds/Server.cc: fix warring assert.h's
-25e9a0b mon: require name for 'auth add ...' command
-e9a6694 client: return errors to the user if fsync fails
-84a024b init-ceph: make ulimit -n be part of daemon command
-61fbe27 qa: add layout_vxattrs.sh test script
-db31a1f mds: allow dir layout/policy to be removed via removexattr on ceph.dir.layout
-ebebf72 mds: handle ceph.*.layout.* setxattr
-09f2854 mds: fix client view of dir layout when layout is removed
-8475148 client: note presence of dir layout in inode operator<<
-ba32ea9 client: list only aggregate xattr, but allow setting subfield xattrs
-3f82912 client: implement ceph.file.* and ceph.dir.* vxattrs
-febb965 client: move xattr namespace enforcement into internal method
-ad7ebad client: allow ceph.* xattrs
-e51299f mds: open mydir after replay
-3bc2114 ObjectCacher: fix flush_set when no flushing is needed
-59ac4d3 qa: add rbd/concurrent workunit
-7cd4e50 client: Wait for caps to flush when flushing metadata.
-907c709 mds: Send created ino in journaled_reply
-cf7c3f7 client: Don't use geteuid/gid for fuse ll_create
-0b66994 (origin/wip-3930) ceph.spec.in:	package rbd udev rule
-a7d15af mon: smooth pg stat rates over last N pgmaps
-ecda120 doc: fix overly-big fixed-width text in Firefox
-3f6837e mon/PGMap: report IO rates
-208b02a mon/PGMap: report recovery rates
-76e9fe5 mon/PGMap: include timestamp
-a2495f6 osd: track recovery ops in stats
-4aea19e osd_types: add recovery counts to object_sum_stats_t
-193dbed rbd-fuse: fix warning
-1e24ce2 doc: Removed indep, and clarified explanation.
-829aeba mds: clear inode dirty when slave rename finishes.
-5884177 mds: mark export bounds for cross authority directory rename
-abc4c78 mds: allow handling slave request in the clientreplay stage
-e69e7e5 mds: fix 'discover' handling in the rejoin stage
-0e9c812 mds: add projected rename's subtree bounds to ESubtreeMap
-77946dc mds: fetch missing inodes from disk
-f4abf00 mds: rejoin remote wrlocks and frozen auth pin
-710bba3 mds: move variables special to rename into MDRequest::more
-4fc68a4 mds: properly clear CDir::STATE_COMPLETE when replaying EImportStart
-9a0cfcc mds: don't journal opened non-auth inode
-0cf5e4e mds: journal inode's projected parent when doing link rollback
-c93cf2d mds: fix for MDCache::disambiguate_imports
-baa6bd6 mds: fix for MDCache::adjust_bounded_subtree_auth
-e0aa64d mds: don't replace existing slave request
-85294a5 mds: always use {push,pop}_projected_linkage to change linkage
-3a66656 mds: send resolve messages after all MDS reach resolve stage
-a42a918 mds: split reslove into two sub-stages
-844cd46 mds: fix slave rename rollback
-1a6626f mds: preserve non-auth/unlinked objects until slave commit
-9944d9f mds: don't journal non-auth rename source directory
-fb49713 mds: force journal straydn for rename if necessary
-ce431eb mds: splits rename force journal check into separate function
-c9ff21a mds: fix "had dentry linked to wrong inode" warning
-cd8d910 mds: don't set xlocks on dentries done when early reply rename
-b429a3a doc: Updated to add indep and first n to chooseleaf. Num only used with firstn.
-f41010c rgw: fix crash when missing content-type in POST object
-09522e5 rgw: fix crash when missing content-type in POST object
-b955a59 mon: set limit so that we do not an entire down subtree out
-2b8ba7c osdmap: implement subtree_is_down() and containing_subtree_is_down()
-75f6ba5 crush: implement get_children(), get_immediate_parent_id()
-97b7892 doc: update ceph man page link
-91a0bc8 ceph, rados: update pool delete docs and usage
-1a6197a qa: fix mon pool_ops workunit
-818e9a2 rbd-fuse: fix printf format for off_t and size_t
-21673e8 rbd-fuse: fix usage of conn->want
-f74265b configure: fix check for fuse_getgroups()
-fb85c7f rbd: don't ignore return value of system()
-014fc6d utime: fix narrowing conversion compiler warning in sleep()
-0ded0fd mon: Monitor: rework timecheck code to clarify logic boundaries
-3a08942 doc: fix rbd create syntax
-659d1a3 mds: properly set error_dentry for discover reply
-6daec53 mds: introduce XSYN to SYNC lock state transition
-6714497 mds: allow journaling multiple root inodes in EMetaBlob
-919df3b mds: lock remote inode's primary dentry during rename
-5176cb7 mds: check deleted directory in Server::rdlock_path_xlock_dentry
-6bd676e mds: fix end check in Server::handle_client_readdir()
-c547816 mon: Elector: reset the acked leader when the election finishes and we lost
-d74b31b mon: Monitor: force timecheck cleanup on finish_election()
-fa421cf configure: remove -m4_include(m4/acx_pthread.m4)
-32276e9 configure: fix RPM_RELEASE
-341e676 osdmaptool: fix clitests
-54c392e osd: dump/display pool min_size
-1ba4c80 qa/workunits/rbd/copy.sh: use non-deprecated --image-format option
-bbb86ec mon: safety interlock for pool deletion
-700bced Revert "mon: implement safety interlock for deleting pools"
-6c40794 Added libexpat dependency
-2a6dcab rbd-fuse: add simple RBD FUSE client
-7daf372 rbd-fuse: Original code from Andreas Bluemle
-aec2a47 s3/php: update to 1.5? version of API
-b2a473b workunit for iogen
-17cd549 mon: Monitor: timecheck: only output report to dout once
-13fb172 mon: Monitor: track timecheck round state and report on health
-b49440b doc: Added new, more comprehensive OSD/PG monitoring doc.
-5f21050 doc: Trimmed some detail and added a x-ref to detailed osd/pg monitoring doc.
-95cfdd4 doc: Added osd/pg monitoring section to the index.
-d36a208 doc: Added x-ref links.
-1af3578 doc: fixed description for pg in control section.
-248835d doc: wider sidebar, larger font, cleaned tip CSS
-037900d sharedptr_registry: remove extaneous Mutex::Locker declaration
-8bd306b doc: Added Subdomain section.
-8fef6fa osd/PG: include map epoch in query results
-e359a86 osd: kill unused addr-based send_map()
-5e2fab5 osd: share incoming maps via Connection*, not addrs
-1bc419a osd: pass new maps to dead osds via existing Connection
-76705ac osd: requeue osdmaps on heartbeat connections for cluster connection
-a7059eb msgr: add get_loopback_connection() method
-a6ed62e common: fix cli tests on usage
-5f9ab93 Revert "filestore: disable extra committing queue allowance"
-38871e2 os/FileStore: only adjust up op queue for btrfs
-d95b431 adminops.rst: revert changes for as-yet-unimplemented features
-bb860e4 rados: remove unused "check_stdio" parameter
-234becd rados: obey op_size for 'get'
-0c1cc68 FileStore: ping TPHandle after each operation in _do_transactions
-e0511f4 OSD: use TPHandle in peering_wq
-4f653d2 WorkQueue: add TPHandle to allow _process to ping the hb map
-79d599c java: remove extra whitespace
-6f0e113 libcephfs-java test: use provided environment
-40ae8ce common: only show -d, -f options for daemons
-7e7130d doc: Syntax fixes.
-b51bfdf doc: Updated usage for Bobtail.
-1d71d05 doc: Updated usage for Bobtail.
-b0a5fe9 java: support ceph_get_file_pool_name
-42d92b7 doc: Added example of ext4 user_xattr mount option.
-b3a2e7e rgw_rest: Make fallback uri configurable.
-352652b libcephfs: document ERANGE rv for get_file_pool_name
-487bacd java: fix exception name typo
-9cefa96 java: add missing chmod unmounted test
-0c6d5a9 java: support fchmod
-4b3bcb9 java: support stat()
-00cfe1d common/HeartbeatMap: fix uninitialized variable
-b9f58ba libcephfs-java test: jar files are in /usr/local/share/java, it seems
-f9f31aa wireshark: fix indention
-3e9cc0d wireshark: fix guint64 print format handling
-67c7757 PendingReleaseNotes: pool removal cli changes
-8a97eef ReplicatedPG: handle omap > max_recovery_chunk
-c3dec3e ReplicatedPG: correctly handle omap key larger than max chunk
-09c71f2 ReplicatedPG: start scanning omap at omap_recovered_to
-62a4b96 ReplicatedPG: don't finish_recovery_op until the transaction completes
-20278c4 ReplicatedPG: ack push only after transaction has completed
-4d6ba06 ObjectStore: add queue_transactions with oncomplete
-a972fd4 mds: fix end check in Server::handle_client_readdir()
-c061e84 rados: safety interlock on 'rmpool' command
-c993ac9 mon: implement safety interlock for deleting pools
-132045c common/HeartbeatMap: inject unhealthy heartbeat for N seconds
-657df85 os/FileStore: add stall injection into filestore op queue
-a4e7865 osd: do not join cluster if not healthy
-c406476 osd: hold lock while calling start_boot on startup
-ad6b231 osd: do not reply to ping if internal heartbeat is not healthy
-61eafff osd: reduce op thread heartbeat default 30 -> 15 seconds
-0d172b9 packaging: add smalliobenchrbd
-9388f94 Update src/rgw/rgw_admin.cc
-db48caf osd: debug support for omap deep-scrub
-509a93e osd: Add digest of omap for deep-scrub
-cfb1aa8 osd: Add missing unregister_command() in OSD::shutdown()
-e328fa6 test/bench: add rbd backend to smalliobench
-c3266ad config: helper to identify internal fields we should be quiet about
-0ee5ec7 common/Throttle: fix modeline, whitespace
-89072fb test/bench: don't alias bl from above
-c50f5f5 test/bench: use uint64_t for uniform distribution
-451cc00 doc: Modified usage for upgrade.
-73a9693 osd: improve sub_op flag points
-23c02bc osd: refactor ReplicatedPG::do_sub_op
-a1137eb osd: make last state for slow requests more informative
-24d0d7e osd: dump op priority queue state via admin socket
-33efe32 osd: simplify asok to single callback
-514af15 common/PrioritizedQueue: dump state to Formatter
-6e3363b common/PrioritizedQueue: add min cost, max tokens per bucket
-c549a0c common/PrioritizedQueue: buckets -> tokens
-128fcfc note puller's max chunk in pull requests
-b685f72 osd: add OpRequest flag point when commit is sent
-a1bf822 osd: set PULL subop cost to size of requested data
-e8e0da1 osd: use Message::get_cost() function for queueing
-bec96a2 osd: debug msg prio, cost, latency
-40654d6 filestore: filestore_queue_max_ops 500 -> 50
-1233e86 osd: target transaction size 300 -> 30
-44dca5c filestore: disable extra committing queue allowance
-cfe4b85 os/FileStore: allow filestore_queue_max_{ops,bytes} to be adjusted at runtime
-101955a osd: make osd_max_backfills dynamically adjustable
-9230c86 osd: make OSD a config observer
-6401abf qa/workunit: Add iozone test script for sync
-72147fd objectcacher: Remove commit_set, use flush_set
-00b1186 testing: add workunit to run hadoop internal tests.
-359d0e9 config: report on log level changes
-c5e0951 config: clean up output
-d7d8192 config: don't make noise about 'internal_safe_to_start_threads'
-2e39dd5 mds: fix default_file_layout constructor
-e461f09 mds: fix byte_range_t ctor
-1716084 osd: calculate initial PG mapping from PG's osdmap
-2491f97 workunits/cephtool: add tests for ceph osd pool set/get
-4830895 Clarify journal size based on filestore max sync
-aea898d ceph: reject negative weights at ceph osd <n> reweight
-7d9d765 workunit/cephtool: Use '! cmd' when expecting failure
-0cb760f OSD: do deep_scrub for repair
-5e00af4 osd: set pg removal transactions based on configurable
-4712e98 osd: make pg removal thread more friendly
-bc99404 os: move apply_transactions() sync wrapper into ObjectStore
-f6c69c3 os: add apply_transaction() variant that takes a sequencer
-4bdcfbf client: Respect O_SYNC, O_DSYNC, and O_RSYNC
-045af95 qa: remove xfstest 068 from qemu testing
-1f911fd ceph: allow osd pool get to get everything you can set
-49726dc os/FileStore: only flush inline if write is sufficiently large
-8ddb55d os/FileStore: fix compile when sync_file_range is missing;
-b8d5e28 doc/rados/operations/crush: need kernel v3.6 for first round of tunables
-736966f java: support get pool id/replication interface
-40415d1 libcephfs: add pool id/size lookup interface
-76e715b doc: Added link to rotation section.
-e1741ba doc: Added hyperlink to log rotation section.
-612717a doc: Added section on log rotation.
-8332658 doc: Modified index to include mon-osd-interaction.
-d6fc92d doc: Added a section describing mon/osd interaction.
-bebdc70 build:  Add perl installation dependency to rpm and debian packages.
-ff7c971 doc: Added an admonishment for SSD write latency.
-6f28faf mds: open mydir after replay
-dd7caf5 mds: gracefully exit if newer gid replaces us by name
-2e11233 mon: enforce unique name in mdsmap
-ca2d9ac doc: Updated OSD configuration reference with backfill config options.
-e330b7e mon: create fail_mds_gid() helper; make 'ceph mds rm ...' more generic
-d81ac84 rbd: fix bench-write infinite loop
-60db6e3 crushtool: warn usefully about missing output spec
-e776b63 crushtool: consolidate_whitespace() should eat everything except \n
-efa595f doc/rados/operations/authentication: update for cephx sig requirement options
-91a573a mon: enforce 'cephx require signatures' during negotiation
-50db10d msg/Pipe: require MSG_AUTH feature on server if option is enabled
-4a49a09 cephx: control signaures for service vs cluster
-c236a51 osdmap: make replica separate in default crush map configurable
-c6f8010 mon: Monitor: drop messages from old timecheck epochs
-b0162fa osdmaptool: more fix cli test
-5bd8765 osdmaptool: fix cli test
-98a7631 osd: leave osd_lock locked in shutdown()
-faa62fa radosgw: increate nofile ulimit in upstart
-19ee231 ceph: adjust crush tunables via 'ceph osd crush tunables <profile>'
-85eb8e3 osdmaptool: allow user to specify pool for test-map-object
-37dbf7d rgw: copy object should not copy source acls
-70c3512 ReplicatedPG: ignore snap link info in scrub if nlinks==0
-381e258 osd/PG: fix osd id in error message on snap collection errors
-665577a osd/ReplicatedPG: validate ino when scrubbing snap collections
-e65ea70 ReplicatedPG: compare nlinks to snapcolls
-5735235 ReplicatedPG/PG: check snap collections during _scan_list
-b856874 osd_types: add nlink and snapcolls fields to ScrubMap::object
-39bc654 PG: move auth replica selection to helper in scrub
-9e44fca ReplicatedPG: correctly handle new snap collections on replica
-88956e3 ReplicatedPG: make_snap_collection when moving snap link in snap_trimmer
-625c3cb rados.cc: fix rmomapkey usage: val not needed
-3f0ad49 librados.hpp: fix omap_get_vals and omap_get_keys comments
-cb5e2be rados.cc: use omap_get_vals_by_keys in getomapval
-44c45e5 rados.cc: fix listomapvals usage: key,val are not needed
-fb4bb5d osd: better error message for request on pool that dne
-9a1f574 osd: drop newlines from event descriptions
-0efb9c5 test: add cram integration test for formatted output
-f6dabc8 rbd: always output result for formatted output
-d7cdcc0 rbd: regenerate man page and cli test
-4e5a07b XMLFormatter: fix pretty printing
-8fea6de rbd: add --pretty-format option
-6934ac3 rbd: move Formatter construction to main
-98487b5 rbd: fix long lines
-84c5d85 rbd: support plain/json/xml output formatting
-8e33a8b mon: note scrub errors in health summary
-a586966 osd: fix rescrub after repair
-c1a86ab configure.ac: fix problem with --enable-cephfs-java
-1d50aff mds: fix usage typo for ceph-mds
-2dc2b48 mds: use #defines for bits per cap
-d56af79 osd: note must_scrub* flags in PG operator<<
-2baf125 osd: based INCONSISTENT pg state on persistent scrub errors
-26a63df osd: fix scrub scheduling for 0.0
-389bed5 osd: note last_clean_scrub_stamp, last_scrub_errors
-2475066 osd: add num_scrub_errors to object_stat_t
-d738328 osd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t
-6f6a419 osd: fix object_stat_sum_t dump signedness
-2995480 osd: change scrub min/max thresholds
-16d67c7 osd/PG: remove useless osd_scrub_min_interval check
-a148120 osd: move scrub schedule random backoff to seperate helper
-62ee6e0 osd/PG: trigger scrub via scrub schedule, must_ flags
-1441095 osd/PG: introduce flags to indicate explicitly requested scrubs
-796907e osd/PG: move scrub schedule registration into a helper
-be0c4b3 ac_prog_javah.m4:  Use AC_CANONICAL_TARGET instead of AC_CANONICAL_SYSTEM.
-13cb196 java: add fine grained synchronization
-85c1035 java: remove all intrinsic locks
-2b9da45 java: remove unnecessary synchronization
-fb8a488 java: remove create/release synchronization
-017b6d6 Revert "osdmap: spread replicas across hosts with default crush map"
-410906e mon: OSDMonitor: don't output to stdout in plain text if json is specified
-7ea5d84 osdmap: spread replicas across hosts with default crush map
-3610e72 mon: OSDMonitor: only share osdmap with up OSDs
-1f72180 rbd: Fix tabs
-3413899 doc: Updates to CRUSH paper.
-e94b06a rbd: make 'add' modprobe rbd so it has a chance of success
-15bb00c rbd: call udevadm settle on map/unmap
-66eb93b OSD: only trim up to the oldest map still in use by a pg
-8cf79f2 OSD: check for empty command in do_command
-0f161f1 Correct typo in mon docs 'ceph.com' to 'ceph.conf'
-aeb0206 qa/run_xfstests.sh: use cloned xfstests repository
-8d0fa15 mon: Monitor: only schedule a timecheck after election if we are not alone
-58e03ec mon: Monitor: unify 'ceph health' and 'ceph status'; add json output
-bc57c7a mon: Monitor: use 'else if' on handle_command instead of bunches of 'if'
-7a7fff5 mon: Monitor: move a couple of if's together on handle_command()
-ff1c254 mon: Monitor: reduce indentation level; make code more readable
-684d4ba mon: Monitor: add timecheck infrastructure to detect clock skews
-aa40de9 messages: add MTimeCheck
-e6f284e doc: Added -a option. Should work without from server, as described.
-de6633f doc: Normalized to term "drive" rather than disk. Changed "(Manual)" entry on remove OSD.
-988f359 rados: add truncate support
-44625d4 config_opts.h: default osd_recovery_delay_start to 0
-0f42c37 ReplicatedPG: fix snapdir trimming
-035caac Revert "rgw: fix handler leak in handle_request"
-797b3db Added python wrapper to rados_cluster_stat
-59aad34 configure.ac: check for org.junit.rules.ExternalResource
-61437ee configure.ac: change junit4 handling
-aedbb97 configure.ac: remove AC_PROG_RANLIB
-d8c4fc5 ceph.spec.in: fix libcephfs-jni package name
-f027d02 ceph.spec.in: rename libcephfs-java package to cephfs-java
-9b167b4 ceph.spec.in: fix handling of java files
-12af11a src/java/Makefile.am: fix default java dir
-00898c1 rbd: allow copy of zero-length images.  Includes simple test.
-1c3d684 doc/install/debian.rst: fix typo in link ref; broke doc build
-48f1394 ReplicatedPG: increment scrubber.errors rather than errors
-62e721a librados: add aio stat tests
-879578c librados: implement aio_stat
-5b12b51 osd: make missing head non-fatal during scrub
-e1da85f rgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI
-eba314a rgw: fix handler leak in handle_request
-4483285 librbd: Allow get_lock_info to fail
-77ddf27 doc/release-notes: v0.48.3argonaut
-f07921b doc/install: new URLs for argonaut vs bobtail
-72674ad doc/release-notes: v0.56.1
-26e8438 test: enforce -ENOTCONN contract in libcephfs
-5c58aa9 libcephfs: return -ENOTCONN when call unmounted
-f83fcf6 PG: set DEGRADED in Active AdvMap handler based on pool size
-c412109 libcephfs: clarify interface return value
-d16ad92 msg/Pipe: prepare Message data for wire under pipe_lock
-40706af msgr: update Message envelope in encode, not write_message
-6258688 osdc/Objecter: fix linger_ops iterator invalidation on pool deletion
-4c9f4c3 ceph-fuse: rename ceph_ll_* to fuse_ll_*
-4cfc490 msg/Pipe: encode message inside pipe_lock
-a058f16 msg/Pipe: associate sending msgs to con inside lock
-2a1eb46 msg/Pipe: fix msg leak in requeue_sent()
-ce49968 os/FileJournal: include limits.h
-e9efa33 java: add stripe unit granularity tests
-ececcf5 java: update javadoc comments
-cdd138d java: fix whitespace
-6954bf3 java: add support for get_stripe_unit_granularity
-abcda95 libcephfs: expose stripe unit granularity
-988a521 osd: special case CALL op to not have RD bit effects
-d3abd0f Revert "OSD: remove RD flag from CALL ops"
-3a94087 libcephfs: delete client after messenger shutdown
-0978dc4 rbd: Don't call ProgressContext's finish() if there's an error.
-e89b6ad ReplicatedPG: remove old-head optization from push_to_replica
-acfa0c9 mds: optimize C_MDC_RetryOpenRemoteIno
-acbe6d9 mds: don't issue caps while inode is exporting caps
-ca4dc4d mds: check if stray dentry is needed
-3705c7c mds: drop locks when opening remote dentry
-ea2fd12 mds: check null context in CDir::fetch()
-420f335 mds: rdlock prepended dest trace when handling rename
-248e4ab mds: fix cap mask for ifile lock
-f9280cb mds: fix replica state for LOCK_MIX_LOCK
-5995325 mds: keep dentry lock in sync state as much as possible
-b03eab2 mds: forbid creating file in deleted directory
-d379ac8 mds: disable concurrent remote locking
-28d59d3 os/FileStore: fix non-btrfs op_seq commit order
-f1e0305 doc: Removed the --without-tcmalloc flag until further advised.
-88af7d1 doc: Added defaults for PGs, links to recommended settings, and updated note on splitting.
-4ae4dce OSD: for old osds, dispatch peering messages immediately
-73bc8ff doc: Added comments on --without-tcmalloc option when building Ceph.
-37b57cd Update doc/rados/configuration/filesystem-recommendations.rst
-43ef677 doc: Added some packages to the copyable line.
-333ae82 doc: Fixed syntax error.
-224a33b     qa/workunit:  Add dbench-short.sh for nfs suite
-a32d6c5 osd: move common active vs booting code into consume_map
-0bfad8e osd: let pgs process map advances before booting
-5fc94e8 osd: drop oldest_last_clean from activate_map
-67f7ee6 osd: drop unused variables from activate_map
-a14a36e OSDMap: fix modifed -> modified typo
-43cba61 log: fix locking typo/stupid for dump_recent()
-64d2760 doc: Added a memory profiling section. Ported from the wiki.
-5066abf doc: Added memory profiling to the index.
-0e9a0cd qa/workunit:  Update pjd script to use new tarball
-d8940d1 fuse: Fix cleanup code path on init failure
-c4370ff librbd: establish watch before reading header
-483c6f7 test_filejournal: optionally specify journal filename as an argument
-c461e7f test_filejournal: test journaling bl with >IOV_MAX segments
-dda7b65 os/FileJournal: limit size of aio submission
-e0858fa Revert "librbd: ensure header is up to date after initial read"
-8229770 doc: Minor edits.
-d3b9803 doc: Fixed typo, clarified usage.
-8422474 mds: fix rename inode exportor check
-5e8642a mds: call maybe_eval_stray after removing a replica dentry
-f5ea5c3 mds: don't defer processing caps if inode is auth pinned
-fe5936b mds: remove unnecessary is_xlocked check
-b2d5005 mds: fix lock state transition check
-b3796f4 mds: indroduce DROPLOCKS slave request
-7e04504 mds: fix on-going two phrase commits tracking
-2f96b47 mds: fix anchor table commit race
-a79493d mds: skip frozen inode when assimilating dirty inodes' rstat
-61da9b1 mds: mark rename inode as ambiguous auth on all involved MDS
-3b13d3d mds: only export directory fragments in stray to their auth MDS
-d9d7147 mds: don't trim ambiguous imports in MDCache::trim_non_auth_subtree
-fcb9f98 mds: use null dentry to find old parent of renamed directory
-7a52016 mds: don't journal null dentry for overwrited remote linkage
-5ae715b mds: xlock stray dentry when handling rename or unlink
-2627957 mds: don't trigger assertion when discover races with rename
-e10267b mds: fix Locker::simple_eval()
-7e23321 mds: don't renew revoking lease
-1a32f0a (tag: v0.56) v0.56
-49ebe1e client: fix _create created ino condition
-a10054b libcephfs: choose more unique nonce
-e2fef38 client: fix _create
-82cec48 doc: add-or-rm-mons.rst: Add 'Changing Monitor's IPs' section
-379f079 doc: add-or-rm-mons.rst: Clarify what the monitor name/id is.
-8bbb4a3 doc: fix rbd permissions for unprotect
-d0a14d1 librbd: fix race between unprotect and clone
-958addc rbd: open (source) image as read-only
-47bf519 librbd: open parent as read-only during clone
-c67c789 librbd: add {rbd_}open_read_only()
-91e941a OSD: remove RD flag from CALL ops
-85e9d4f cls_rbd: get_children does not need write permission
-4aa6af7 doc/release-notes: link to upgrade doc
-7b0dbeb doc/install/upgrading: edits to upgrade document
-6711a4c Revert "mds: replace closed sessions on connect"
-82f8bcd msg/Pipe: use state_closed atomic_t for _lookup_pipe
-a5d692a msgr: inject delays at inconvenient times
-e99b4a3 msgr: fix race on Pipe removal from hash
-6339c5d msgr: don't queue message on closed pipe
-7bf0b08 msgr: atomically queue first message with connect_rank
-c2a7525 test: mon: workloadgen: debug when message fsid != monmap fsid
-b30ab51 test: mon: workloadgen: assert if monmap's fsid is zero after authenticate
-3583684 doc: update Hadoop documentation
-942c714 init-ceph: ok, 8K files
-0a5d6d8 msg/Pipe: remove broken cephs signing requirement check
-65b787e msg/Pipe: include remote socket addr in debug output
-9e5e08f doc: Added a new upgrade document.
-1553267 doc: Minor edit.
-02b8bcd doc: Added upgrade link to index.
-076b418 os/FileJournal: logger is optional
-3debf0c client: fix fh leak in non-create case
-67bc849 mds: Return created inode in mds reply to create
-7f35e5d client: Make ll_create use _create
-813787a log: broadcast cond signals
-ca34fc4 osd: allow RecoveryDone self-transition in RepNotRecovering
-1867b81 docs:  fix typo in release-process doc
-3a8bf3a doc/release-notes: document new 'max open files' default
-ea13ecc osd: less noise about inefficient tmap updates
-672c56b init-ceph: default to 16K max_open_files
-948e752 ceph-fuse: Avoid doing handle cleanup in dtor
-ff2d4ab ceph-fuse:  Pass client handle as userdata
-9967cf2 release-notes: rgw logging now off by default
-1c3e12a doc: warn about using caching without QEMU knowing
-f6ce5dd rgw: disable ops and usage logging by default
-64b845f features is uint64_t
-856f32a ceph-fuse:  Split main into init/main/finalize
-c0fe381 java: remove deprecated libcephfs
-6c7b667 init-ceph: fix status version check across machines
-774a54c docs:  update release process documentation.
-6356739 osd: fix recovery assert for pg repair case
-f230603 osd: only calculate OpRequest rmw flags once
-f1dfd64 messages/MOSDOpReply: remove misleading may_read/may_write
-03f6dfa osd: move rmw_flags to OpRequest, out of MOSDOp
-998f719 dropping xfs test 186 due to bug: 3685
-98e7b59 docs:  remove extra release-process2 file.
-82c7171 osd: drop 'osd recovery max active' back to previous default (5)
-6f1f03c journal: reduce journal max queue size
-0d2ad2f mds: use set to store MDSMap data pools
-2137d5c mds: wait for client's mdsmap when specifying data pool
-9da6d88 doc: document mds config options
-916d1cf doc: journaler config options
-cedea13 docs:  Merge changes from release-process2 document.
-850a056 mds: add waiting_for_mdsmap queue
-c764935 mds: do not check for pool existence in osdmap
-4929fc7 qa: remove xfstests 172 and 173 from qemu testing
-f5403f9 doc/man/8/mkcephfs: update --mkfs a bit
-8b59908 mds: replace closed sessions on connect
-d18f3c2 mds: don't force in->first == dn->first
-a1485f9 mds: compare sessionmap version before replaying imported sessions
-0002546 mds: fix race between send_dentry_link() and cache expire
-efbca31 mds: fix file existing check in Server::handle_client_openc()
-f5e86ec mds: delay processing cache expire when state >= EXPORT_EXPORTING
-1174dd3 mds: don't retry readdir request after issuing caps
-dd44157 mds: take export lock set before sending MExportDirDiscover
-96f48aa mds: re-issue caps after importing caps
-a3e70ae mds: always send discover if want_xlocked is true
-69f9f02 mds: fix error hanlding in MDCache::handle_discover_reply()
-e6b8f0a mds: set want_base_dir to false for MDCache::discover_ino()
-b7e698a mds: no bloom filter for replica dir
-0ab0744 mds: properly mark dirfrag dirty
-48d8ae5 mds: alllow handle_client_readdir() fetching freezing dir.
-8efcf54 mds: *_pg_pool -> *_pool
-d2f5890 client, libcephfs: add method to get the pool name for an open file
-32ab274 client: specify data pool on create operations
-3f45821 mds: verify that the pool id is valid on SET[DIR]LAYOUT
-99d9e1d mds: allow data pool to be specfied on create
-697ed23 client: remove set_default_*() methods
-850d1d5 osd: fix dup failure cancellations
-61d43af osd: make MOSDFailure output more sensible
-9df522e mon: make osd failure report log msgs sensible
-8362e64 monclient: fix get_monmap_privately retry interval
-d843a64 Makefile: fix 'base' rule
-a09f5b1 init-ceph,mkcephfs: default inode64 for mounting xfs
-5f25f9f init-ceph: default osd_data path
-f6b2ca8 OSD: always do a deep scrub when repairing
-ad9bcc7 PG: don't use a self-transition for WaitRemoteRecoveryReserved
-2e96bb1 PG: Handle repair once in scrub_finish
-6325a48 import_export.sh: sparse import export
-5905d7f rbd: harder-working sparse import from stdin
-410903f rbd: check for all-zero buf in export, seek output if so
-4a55804 librbd: move buf_is_zero() to new common/util.cc and include/util.h
-8f5de15 osd: fix pg stat msgs vs timeout
-2bf4f42 doc: Added new journaler page to CephFS section. Needs descriptions.
-53afac1 doc: Added Journaler Configuration to toc tree.
-757902d doc: Added --mkfs options.
-46d0334 doc: Added running multiple clusters. Per Tommi.
-e3d0756 doc: Updated the Configuration File section.
-00ed665 PG::scrub_compare_maps increment scrubber.fixed for missing repairs
-c9e0517 PG::_compare_scrubmaps: increment scrubber.errors on missing object
-4a03939 release-notes: add more user-visible changes
-b39928d release-notes: remove bug fix that does not affect argonaut
-048567e release-notes: fix typos
-3076e45 release-notes: pgnum is required now
-b564fdb release-notes: remove warning about osd caps
-09d4f03 doc: Added sudo the ceph health for when cephx is on.
-085992f doc: minor fix to syntax.
-206ffcd mkcephfs: error out if 'devs' defined but 'osd fs type' not defined
-4a40067 doc: update ceph.conf examples about btrfs default
-999ba1b monc: only warn about missing keyring if we fail to authenticate
-5d5a42b osd: clear CLEAN on exit from Clean state
-b3e62ad auth: use none auth if keyring not found
-4d661e0 PG::sched_scrub: only set PG_STATE_DEEP_SCRUB once reserved
-7c56d8f PG::sched_scrub: return true if scrub newly kicked off
-ae044e6 osd: allow transition from Clean -> WaitLocalRecoveryReserved for repair
-670afc6 PG: in sched_scrub() set PG_STATE_DEEP_SCRUB not scrubber.deep
-19e44bf osd: clear scrub state if queued scrub doesn't start
-feb0aad doc: Moved path to individual OSD entires.
-e765dcb osd: only dec_scrubs_active if we were active
-ada3e27 osd: reintroduce inc_scrubs_active helper
-129a49a cephtool: mention ceph osd ls, fix ceph osd tell N bench
-a36d1db rgw: remove noisy log message
-5b5a19a rgw: fix daemonize initialization
-754fc20 release notes: Mention new cephtool commands
-50914e7 log: fix flush/signal race
-c0e2371 ReplicatedPG::remove_notify : don't leak the notify object
-b5031a2 OSD,ReplicatedPG: do not track notifies on the session
-719679e doc: Added package and repo links for Apache and FastCGI. Added SSL enable too.
-04eb1e7 doc: Fixed restructuredText usage.
-ea9fc87 doc: Removed foo. Apparently myimage was added and foo not removed.
-a803159 rgw: configurable exit timeout
-92b59e9 rgw: don't try to assign content type if not found
-08c6424 rgw: don't initialize keystone if not set up
-799c59a rgw: remove useless configurable, fix swift auth error handling
-5497d22 doc: Modified the demo configuration file for Bobtail.
-40fdd77 doc: Added Gateway Quick Start.
-5281ee2 doc: Added Gateway Quick Start configuration file.
-84fb371 Updated Getting Started index to include Gateway Quick Start.
-5e95510 doc: Added REST Gateway link to 5-minute Quick Start.
-c2b231e doc: Updated the 5-minute Quick Start for Bobtail.
-f596cee doc: Updated Block Device Quick Start for Bobtail.
-60b2857 doc: Updated CephFS Quick Start for Bobtail.
-d17bd38 doc: Added authentication and mkcephfs settings for Bobtail.
-cd5c82d doc: Added javascript code block tag.
-6122a9f OSDMonitor: remove temp pg mappings with no up pgs
-2395af9 OSDMap: make apply_incremental take a const argument
-2e49d5c cephtool: add qa workunit
-d9c2396 ceph.spec.in:  Improve finding location of jni.h for sles11.
-b2eb8bd osd: implement 'version' tell command
-4634410 ceph.spec.in:  Add packages for libcephfs-jni and libcephfs-java
-85763f0 ceph: report error string to stderr, not stdout
-5f24e23 ceph: fix error reporting when tell target is invalid or down
-b00eb6f mon: 'ceph osd ls'
-212f6b5 OSDMap::dump: tag pg_temp mappings with pgid
-04e7a5c rgw: configurable exit timeout
-6c7ec2d crushtool: nicer error message on extra args
-dbe6fb7 crushtool: only dump usage on -h|--help
-fd482a2 ceph.spec.in:  Update pre-reqs for ceph-fuse pacakge.
-1b67a43 Revert "objecter: don't use new tid when retrying notifies"
-bdc998e mon: OSDMonitor: add option 'mon_max_pool_pg_num' and limit 'pg_num' accordingly
-21c47c6 osd: debug EMSGSIZE / OSD_WRITETOOBIG
-f81ca89 doc/release-notes: don't use format 2 rbd images until after osds upgrade
-3c24622 crushtool: add --set-chooseleaf-descend-once to help
-874b273 doc/release-notes: 'mon max pool pg num'
-e8b8531 doc: fix typo in config file
-e9231fe Makefiles:  Two new packages needed in the debian build depdencies.
-bc9d9d8 Refactor rule file to separate arch/indep builds.
-4bf9078 osdc/Objecter: prevent pool dne check from invalidating scan_requests iterator
-6f978aa doc: draft bobtail release notes
-5061481 doc: correct meaning of 'pool' in crush
-1ec70aa qa: add a workunit for fsync-tester
-286dcbe test: remove underscores from cephfs test names
-a7de975 lockdep:  Decrease lockdep backtrace skip by 1
-641b077 mkcephfs: fix == -> =
-bf01b7b map-unmap.sh: use udevadm settle for synchronization
-02aca68 ceph-disk-activate: mark dir as upstart-managed
-96f40b1 upstart: make starter jobs consistent
-e597482 upstart: only start when 'upstart' file exists in daemon dir
-6ab7db6 ReplicatedPG: use default priority for Backfill messages
-7e13356 ReplicatedPG: do not use priority from client op
-8d73f3e Fix comment in sample.ceph.conf
-9f05102 crush-map.rst: add info about multiple crush heirarchies
-f16e571 client: Add config option to inject sleep for tick
-8cf367c rbd.py: check for new librbd methods before use
-c9894ff osd: up != acting okay on mkpg
-e3ed28e mon: OSDMonitor: don't allow creation of pools with > 65535 pgs
-8103414 rbd: handle images disappearing while in ls -l
-2452391 rgw_op: enforce minimum part size in multi-part uploads
-aa2214c mds: document EXCL -> (MIX or SYNC) transition decision
-97cc55d OSD: put connection in disconnect_session_watches as well as the session
-f2c083e OSD: disconnect_session_watches obc might not be valid after we relock
-c17d628 clarify/correct some of sample.ceph.conf
-e6dd068 qa: echo commands run by rbd map-unmap workunit
-975003b auth: guard decode_decrypt with try block
-448db47 mount.fuse.ceph: strip out noauto option
-ae100cf mount.fuse.ceph: add ceph-fuse mount helper
-ac92e4d /etc/init.d/ceph: fs_type assignment syntax error
-4605fdd filestore: Don't keep checking for syncfs if found
-8e25c8d (tag: v0.55.1) v0.55.1
-dba0960 OSD: pg might be removed during disconnect_session_watches
-047aecd PG,ReplicatedPG: handle_watch_timeout must not write during scrub/degraded
-0dfe6c8 ReplicatedPG:, remove_notify, put session after con
-695bb3b ReplicatedPG: only put if we cancel evt in unregister_unconnected_watcher
-fdf66b6 ReplicatedPG: watchers must grab Connection ref as well
-5f55b38 doc: Updated per comments in the mailing list.
-9d71456 docs: better documentation of new rgw feature
-3a95d97 rgw: configurable list of object attributes
-8708724 rgw: option to provide alternative s3 put obj success code
-bece012 doc: document swift compatibility
-88229a4 docs: add rgw POST object as supported feature
-64cefe2 PG,ReplicatedPG: move write_blocked_by_scrub logic into a helper
-54618af docs: fix spacing in radosgw config-ref
-8e6a535 qa: exclude some more xfstests
-caea0cb os/JournalingObjectStore: un-break op quiescing during journal replay
-6a8a58d doc: document swift compatibility
-cf28e78 docs: add rgw POST object as supported feature
-3950182 st_rados_watch: tolerate extra notifies
-29307d3 mds: shutdown cleanly if can't authenticate
-c310700 objecter: don't use new tid when retrying notifies
-9a40ef0 mds: fix journaling issue regarding rstat accounting
-b9d717c fix build of unittest_formatter
-be37276 include/atomic.h: add stdlib.h for size_t
-1699b7d OSD: get_or_create_pg doesn't need an op passed in
-6a4fa89 LFNIndex: fix move_subdir comments
-fdcdca7 HashIndex: fix typo in reset_attr documentation
-7eac968 HashIndex: init exists in col_split_level and reset_attr
-12673c2 PrioritizedQueue: increment ret when removing items from list
-80cca21 PrioritizedQueue: move if check out of loop in filter_list_pairs
-a50c7d3 config: do not always print config file missing errors
-6fb9a55 config: always complain about config parse errors
-2e7cba7 doc: fixed indent in python example.
-788992b config_opts.h: adjust recovery defaults
-f4be3c8 doc: Added sudo to ceph -k command.
-3709519 doc: Fixed typo.
-47c81a3 Makefile.am: add missing flags to some tests targets
-333b3f4 mon: fix leak of pool op reply data
-f66fe77 os/JournalingObjectStore: simplify op_submitting sanity check
-a88b584 os/JournalingObjectStore: remove unused ops_submitting
-ad4158d os/JourningObjectStore: drop now-useless max_applying_seq
-d9dce4e filestore: simplify op quescing
-d4c6a22 rgw: document admin api web interface.
-25ea069 osd: make pool_stat_t encoding backward compatible with v0.41 and older
-e227c70 crush/CrushWrapper: do not crash if you move an item with no current home
-1acb691 mon: Elector: init elector before each election
-f302983 init-ceph: =, not ==
-8816b39 debian: add ceph.postinst to remove /etc/init/ceph.conf on update
-fc58299 PG: remove last_epoch_started asserts in proc_primary_info
-81fdea1 auth: set default auth_client_required
-a3908a6 auth: changed order of test for legacy and new authentication
-907da18 auth: improve logging
-8355733 rbd: use ExportContext for progress, not cerr
-e0761fb doc: Added sudo to the service start command.
-778bad1 doc: Moved sudo to before ssh instead of before tee.
-413b5d0 doc: inverted the steps per doc feedback.
-07b3699 mds: move from EXCL to SYNC if nobody wants to write
-636048d mds/locker:  Add debugging for excl->mix trans
-fa5a46c test/libcephfs: Add a test for validating caps
-10bf150 client: Add routine to get caps of file/fd
-efc6614 librbd: change internal order parameter to pass-by-value
-57d5c69 librbd: clean up after errors in create
-c1bf229 librbd: bump version for new functions
-bc6f726 mon: PGMonitor: erase entries from 'creating_pgs_by_osd' when set is empty
-f81d720 doc/install/os-recommendations: fix syncfs notes
-4d43c86 doc: fix bobtail version in os-recommendations
-e1c27fe mon: Monitor: rework 'paxos' to a list instead of a vector
-27071f3 OSD: store current pg epoch in info and load at that epoch
-9f169ac OSD: account for split in project_pg_history
-15d8993 PG: update info.last_update_started in split_into
-338f368 OSDMonitor: require --allow-experimental-feature to increase pg_num
-fb73850 PG: set child up/acting in split_into
-3f412e8 OSD: do _remove_pg in add_newly_split_pg is pool if gone
-19e6861 osd/: dirty info and log on child during split
-9835e19 osd/: mark info.stats as invalid after split, fix in scrub
-5f8a363 PG: split ops for child objects into child
-9981bee OSD: add initial split support
-58890cf librados: watch() should set the WRITE flag on the op
-f2914af HashIndex: fix list_by_hash handling of next->is_max()
-0c01094 rbd: remove block-by-block messages when exporting
-ef24f53 doc: Change per doc request.
-ca1a4db release: add note about 'ceph osd create' syntax
-214c7a1 client: Allow cap release timeout to be configured
-0a137d7 mkcephfs: fix fs_type assignment typo
-4c31598 upstart: fix radosgw upstart job
-47266cd upstart: rename ceph -> ceph-all
-b7b7242 rbd: update manpage for import/export
-e9653f2 librbd: hold AioCompletion lock while modifying global state
-b2ccf11 librbd: handle parent change while async I/Os are in flight
-64ecc87 Striper: use local variable inside if() that tested it
-a55700c librbd: hold AioCompletion lock while modifying global state
-41e16a3 librbd: handle parent change while async I/Os are in flight
-917a6f2 Striper: use local variable inside if() that tested it
-2a5549c qa: add script for running xfstests in a vm
-2779325 rgw: fix rgw_tools get_obj()
-cb19e99 doc: ceph osd create takes a uuid, not an osd id
-993ff14 PG: add split_into to populate child members
-6e67a27 osd/: splitting a pg now triggers a new interval
-36c0fd2 PrioritizedQueue: allow caller to get items removed by removed_by_filter
-b6c49b4 mon/OSDMonitor: enable split in Monitor
-b8a37fd PGMonitor,OSD: don't send creates on split
-f4f6bd7 OSD: dispatch_context only discard transaction if contexts empty
-fec47ca OSD: don't wait for superblock writes in handle_osd_map
-fdc5e5d os/: Add CollectionIndex::prep_delete
-a48dee5 os/: Add failure CollectionIndex failure injection
-bd46386 test/store_test: add simple tests for collection_split
-f2a2391 os/: add filestore collection_split
-a83d13a OSD: ignore queries on now deleted pools
-3986564 Dropping xfs tests 179 and 183 as they are causing nightly failures
-727c37a mds: journal remote inode's projected parent
-3f69f72 mds: don't create bloom filter for incomplete dir
-3cf2197 doc: write descriptions for the remaining msgr options
-724d5aa doc: added some descriptions in ms-ref and filestore-config-ref
-0756052 PG: remove last_epoch_started asserts in proc_primary_info
-b76f12d doc: Edited striping section. Modified stripe graphic to pretty print. Also modified replication graphic to pretty print.
-2ba9c87 mds: journal remote inode's projected parent
-8cd8f25 mds: don't create bloom filter for incomplete dir
-3ace9a7 logrotate: do not spam stdout
-a74a4ac doc: Added a striping section for Architecture.
-690f817 (tag: v0.55) v0.55
-234cc08 ceph.spec.in:  Add SLES and remove Fedora from debug package list.
-2604557 test_rados_api_misc: fix dup rmmkey test
-f2c7a60 doc: Fixed many hyperlinks, a few typos, and some minor clarifications.
-a7a3cbf doc: Clarified example for root user.
-5bea57b config: we still want osd_thread_recovery_timeout
-e686cb1 config: Remove unused options
-6b105ae client: Fix ceph_mount() when subdir is specified
-f57a798 osd: EINVAL on unknown TMAP op code
-4870b43 mds: use TMAP_RMSLOPPY op when removing dentries
-272e89d osd: add TMAP_RMSLOPPY op
-9961640 osd: ENOENT on TMAP_RM on non-existent key
-85574a3 os/JournalingObjectStore: applied_seq -> max_applied_seq
-5281084 os/FileStore: only wait for applying ops to complete before commit
-c10958e osd: fix RepModify when past last_peering_reset
-880a185 OutputDataSocket: fix uninit var
-3a064dc rgw: fix uninit var
-648c7f0 test/osdc/FakeWriteback: fix uninit var
-0dac9e6 osd: fix missing unlock; simplify
-0fa4875 mds: fix freeze inode deadlock
-2a50689 mds: use rdlock_try() when checking NULL dentry
-1203cd2 mds: allow open_remote_ino() to open xlocked dentry
-587aec1 mds: fix assertion in handle_cache_expire
-961bc0c mds: fix open_remote_inode race
-3fa2582 mds: consider revoking caps in imported caps as issued
-4cd8ea9 mds: drop locks if requiring auth pinning new objects.
-9bfe540 mds: don't forward client request from MDS
-8f67489 mds: call eval() after caps are exported
-ff170ec mds: clear lock flushed if replica is waiting for AC_LOCKFLUSHED
-946b263 mds: Don't acquire replica object's versionlock
-5620f3d mds: allow try_eval to eval unstable locks in freezing object
-8dcc6c3 msg/Pipe: flush delayed messages when stealing/failing pipes
-7794de6 rbd: report striping as a feature in rbd info
-dccf6ee ceph-osd: put g_ceph_context before exit
-49f32ce ReplicatedPG: only increment active_scrub on primary for final push
-a928b6d OSDService: make messengers private
-47699f3 osd/: make OSDService messenger helpers return ConnectionRef
-494711e mon: PaxosService: cancel proposal timer after election
-9cd730b doc: update kernel recs
-dc93132 logrotate: fix rotation
-909b92e mds: assert segements not emtpy in get_current_segment()
-f0c2920 mds: be explicit about MDRequest killed state
-41ef9bb mds: drop redundant mdr->committing = true
-44bc687 mds: fix request_kill()
-0ffafb3 Revert "osd: fix leak of heartbeat con on reset"
-abd9e36 client: only dump cache on umount if we time out
-6d65fa4 msg/Pipe: release dispatch throttle on delayed queue discard
-158260b msg/Pipe: start delay thread *after* we know peer type
-f0bf616 msg/Pipe: drop queue helpers
-f454bb5 msg/Pipe: refactor msgr delays
-b97aaca msgr: add a delay_until queue that is used to delay deliveries.
-01059e9 msgr: clear out the delay queue when stop()ing
-0e92f89 msgr: move the delay queue initialization into start_reader
-90f6698 messenger: add the shell of a system to delay incoming Message delivery
-bea3ecf rgw: treat lack of swift token as anonymous user access
-6a69083 radosgw-admin: close storage before exit
-774d5bf osd: move next_osdmap under separate lock
-b31a99a osd: fix leak of heartbeat con on reset
-3ceaec4 osd: use safe con helpers for scrub
-f865f26 osd: use safe con helpers from do_{infos,queries,notifies}
-30832f5 osd: make _share_map_outgoing() use a Connection
-7d27e2e client:  Fix for #3490 and config option to test
-f9056f5 test/libcephfs:  Test reading an empty file
-5c8cbd2 PG: scrubber.end should be exactly a boundary
-206f39e ReplicatedPG: remove from snap_collections even without objects to trim
-8218d8a OSD: get_or_create_pg return null if pool is gone
-f4f93f8 OSD: history.last_epoch_started should start at 0
-e2c4e2f PG: maintain osd local last_epoch_started for find_best_info
-82517f1 hobject_t: make max private
-0b55fbd Script to install and configure radosgw.
-079dd19 mon: Monitor: don't allow '+' or '-' prefixed values on parse_pos_long()
-c6cc476 mon: OSDMonitor: return -EINVAL on not-a-uuid during 'osd create'
-a87361e osd: fix Connection leaks
-e18f9ee osd: add Connection-base send_map(), send_incremental_map()
-5bc10ec osd: use OSDService send_message helper from PG context
-bd03234 osd: simplify active_committed
-e165330 osd: use safe OSDService msgr helpers for heartbeats
-ea65dff osd: helpers to blacklist messages to down osds
-4c3d5dc test_cls_rgw.c:  Call to cls_rgw_bucket_complete_op() needs new parameter.
-24d61fa mon: add WARN_UNUSED_RESULT to the MonitorStore functions that return error codes
-c762f91 mon: remove the silly write_bl_ss write_bl_ss_impl distinction
-399f269 mon: convert store users with unchecked return codes to just assert on issues
-ab312f8 mon: update Paxos::read()'s successful read check
-3fe7c6c mon: add new get_bl_[sn|ss]_safe functions
-60f60ff mon: In MonitorStore, wrap all uses of ::close and assert success
-dd3a24a create qa/workunits/rbd/map-unmap.sh
-5d6da25 rgw: bucket check --check-objects
-e5dc46f rgw: check_disk_state() removes multipart parts from index
-78286b1 log: 10,000 recent log entries
-4de7748 log: fix log_max_recent config
-39b93f5 mon: check all uses of fsync in the MonitorStore for errors
-88a3e7d Makefile: fix libcephfs for gcov and cleanups
-80c506d rbd: fix import from stdin, add test
-fcebe04 rbd: allow export to stdout, add tests
-a176800 mon: fix compiler warning
-653f134 os/DBObjectMap.h: remove twice included <string>
-e7f8e56 mds/journal.cc: remove twice included common/config.h
-1f3e5ad mon/Monitor.cc: remove twice included osd/OSDMap.h
-ec2f261 messages/MClientRequest.h: remove twice included sys/types.h
-34f6d29 mount/canonicalize.c: remove twice included string.h
-54da979 common/pipe.c: remove twice included unistd.h
-1341e6d crushtool.cc: remove twice included sys/stat.h
-0718c15 rgw/rgw_rest.cc: remove twice included rgw_formats.h
-947b33a os/DBObjectMap.cc: remove twice included headers
-a0d978f remove twice included linux/types.h
-238f932 rados.cc: remove twice included headers
-428d974 osdmaptool.cc: remove twice included sys/stat.h
-93ff160 os/IndexManager.cc: remove twice included FlatIndex.h
-aee71e1 osd/OSD.h: remove twice included OpRequest.h
-03a4c8c tools/common.cc: remove twice included headers
-82c1f48 mds/Resetter.h: remove twice included msg/Messenger.h
-428f300 mds/Migrator.cc: remove twice included Migrator.h
-abc8cb6 mds/Dumper.h: remove twice included msg/Messenger.h
-e1431b8 librados/RadosClient.cc: remove twice included sys/stat.h
-1ca3d75 include/buffer.h: remove twice included stdio.h
-9ac063a monmaptool.cc: remove twice included sys/stat.h
-8a19b89 client/SyntheticClient.cc: remove twice included headers
-f814afa fusetrace_ll.cc: remove twice included sys/time.h
-3fa561e ceph_syn.cc: remove twice included sys/stat.h
-8a6278e ceph_osd.cc: remove twice included sys/stat.h
-5fb2185 client/MetaRequest.cc: remove twice included client/Dentry.h
-f8ef4a8 client/Client.cc: remove twice included headers
-c753f58 ceph_mds.cc: remove twice included sys/stat.h
-1c0c055 ceph_fuse.cc: remove twice included sys/stat.h
-f65307a ceph_mon.cc: remove twice included sys/stat.h
-43ef8c1 mon: do not crash on invalid 'mon tell N ...' target
-c99d9c3 rbd: fix import from stdin, add test
-a738f44 rbd: allow export to stdout, add tests
-cf2a045 config: make $pid a metavariable
-aa37fe7 test_rados_api_misc: fix TMAPPUT sorting test
-8850b3c ceph.spec.in:  Fix typo.
-a1e0868 README: add the libboost-thread-dev dep to the list
-054f761 ceph.spec.in:	Add new test programs to package.
-dbb3fb1 Makefile:  Add test/osdc/FakeWriteback.h to noship-headers.
-10b68b2 osd: detect (some) misordered ondisk tmaps
-bc77e52 osd: verify TMAPPUT data is sorted
-29fae49 osd: do not ENOENT on missing key on remove
-8e91d00 osd: tolerate misordered TMAP updates
-a4439f0 osd: move tmapup into a helper
-919db19 rbd workunit: Add tests for clones across pools
-5164075 rbd workunit: Make "remove_images" silent
-ca5549e rbd workunit: Add tests for cross-pool rename
-bbd343a rbd: tests for copy with explicit/implicit pool names
-e612afc rbd: fix import pool assumptions
-81d3830 rbd: change destpool assumptions.
-724cfd1 rbd: --size fixes
-66b148e rbd: allow parsing image at snap even if --pool given
-37adf2a packaging:  Add ceph-test debian package
-76e2601 ObjectContents.h:  Fix compiler warning by adding parenthesis
-af5d9e4 Makefiles:  Use AM_CXXFLAGS for crypto library compiler options
-1dc0fce ceph.spec.in:  Enable rest-bench and debug configure options
-c04fcaa ceph.spec.in:  Add rest-bench and ceph-test packages.
-10a35ca Makefiles:  Update noinst_headers
-3112cd8 test: mon: run_test.sh: helper script for the mon's workloadgen
-2a68105 qa: workunits: mon: add workloadgen's workunit
-e1820d8 test: mon: workload generator
-f502907 messages: MLog: make ctor's uuid argument a const
-3177774 mon: Monitor: use existing strict_strtol() on parse_pos_long()
-f7276de crush: relax the order by which rules and buckets must be defined
-1fcccd3 crushtool: rework how verbosity works
-9e8c861 rgw: unaccount multipart parts when completing upload
-d4bc372 fix syncfs handling in error case
-ece11b0 rbd workunit: Add tests for clones across pools
-0be9b15 rbd workunit: Make "remove_images" silent
-a96ede9 rbd workunit: Add tests for cross-pool rename
-3918043 rbd: tests for copy with explicit/implicit pool names
-c219698 rbd: fix import pool assumptions
-3b0c360 rbd: change destpool assumptions.
-08f47a4 rbd: --size fixes
-e452df6 rbd: allow parsing image at snap even if --pool given
-854a786 mds: don't add not issued caps when confirming cap receipt
-642ffc9 mds: check parent inode's versionlock when propagating rstats
-a3aad3c mds: fix anchor table update
-5731026 mds: don't expire log segment before it's fully flushed
-3e988d4 osdc/ObjectCacher: touch Objects in lru
-16215d9 osdc/ObjectCacher: remove unused waitfor_{rd,wr}
-011d1e7 osdc/ObjectCacher: *do* pin object during write
-6efe977 mon, osd: adjust msgr requires for CRUSH_TUNABLES2 feature
-0cc47ff crush: introduce CRUSH_TUNABLES2 feature
-88f2181 crush: for chooseleaf rules, retry CRUSH map descent from root if leaf is failed
-0beeb47 rgw: document ops logging setup
-6bc32b2 rgw: usage REST api handles cateogories
-94423ac perfcounters: fl -> time, use u64 nsec instead of double
-3a0ee8e perfcounters: add 'perf' option to disable perf counters
-b1c7108 logrotate on systems without invoke-rc.d
-a37c34d Search for srcdir/.git in check_version
-d72c2c8 Removing ceph dirs while scrubbing ceph off the system
-74b2a2d rgw: POST requests not default to init multipart upload
-1f8c323 java: add ceph_open_layout interface
-f0c608c client: add ceph_open_layout interface
-365ba06 qa: add script to run objectcacher tests
-525f942 init-ceph: do not make noise about missing devs
-bc32fc4 syncfs: check for __NR_syncfs too
-6890675 monmap: fix crash from dup initial seed mons
-7602a05 osdc/ObjectCacher: fix BufferHead leak on ENOENT
-df550c9 make mkcephfs and init-ceph osd filesystem handling more flexible
-96b82eb mon: Monitor: wake up contexts based on paxos machine's state
-3b061ab mon: AuthMonitor: increase log levels when logging secrets
-7527a1e auth: Keyring: increase log levels when logging secrets
-deabdc8 auth: cephx: increase log levels when logging secrets
-d6cf77d crush: CrushWrapper: don't add item to a bucket with != type than wanted
-95e1fe8 mon: PGMonitor: check if pg exists when handling 'pg map <PG>'
-1c715a1 mds: child directory inherits SGID bit
-55081c2 crush: prevent loops from insert_item
-b706945 Try using syscall() for syncfs if not supported directly by glibc
-189d073 rgw: fix usage accounting
-5126bd7 rbd: make snap purge fail if removing a snap fails
-ddf377a rgw: fix cleanup
-820911b msgr: use get_myaddr and set_myaddr to set the nonce
-5c27bc4 rgw: fix cleanup
-f40f715 rgw: signal shuts down fcgi socket
-24fde54 crypto: fix nss related leak
-7f221a5 rgw: fix xml parser leak
-b3b77b6 rgw: fix memory leaks
-c31f94d set the nonce unconditionally on bind
-afd4da7 doc: Added FAQ back into toc tree.
-0dbf6e8 test_librbd_fsx: Add OP_FLATTEN
-7021f1a test_librbd_fsx: consume saved-image files as test runs
-b35e37f osdc/Striper: fix handling for sparse reads in add_partial_sparse_result()
-328d72d rgw: signal shuts down fcgi socket
-4eb50e6 crypto: fix nss related leak
-436baa0 java: add Java exception for ENOTDIR
-700b5c0 qa/run_xfstests.sh: drop tests 174 and 181
-57c8116 doc: filename change to fix a link.
-15f7713 doc: fixed links that broke due to new IA.
-f86522c rgw: fix xml parser leak
-98a04d7 rgw: fix memory leaks
-394768b doc: Removed "deprecated" from toctree. Confused some users.
-739bca1 doc: Removing old/unused images.
-288db95 mon: shutdown async signal handler sooner
-45c652d mon/AuthMonitor: refactor assign_global_id
-92d6b8e mon/AuthMonitor: reorder session->put()
-82042ad msg/Pipe: remove useless reader_joining
-c07c93e msg/Pipe: join previous reader threads
-c4caf87 msg/DispatchQueue: fix message leak from discard_queue()
-183953e msg/SimpleMessenger: use put() on local_connection
-3e2eb3a mon: clean up Subsription xlists
-005967d mon: drop con->session reference in remove_session()
-6d3afce mon: sessions get cleaned up before dtor
-e0e9a2d msg/Pipe: don't leak session_security
-d005732 mon: Monitor: make MSG_MON_PAXOS case a bit more consistent
-bbe2e1a mon: Paxos{,Service}: finish contexts and put messages on shutdown
-9e3ceca mon: Monitor: finish contexts on shutdown
-900a0fa mon: Monitor: drop election messages if entity doesn't have enough caps
-988f92a mon: remove all sessions on shutdown
-5cf6c7e ceph_mon: cleanup on shutdown
-68491af rgw: add -lresolv flags to Makefile.am
-7903aab mon/MonClient: use thread-safe RNG for picking monitors
-07c831a upstart: fix limit lines
-b4a769d upstart: add ceph-osd-all-starter.conf
-ff0a44b upstart: make ceph-osd-all, ceph jobs
-3610754 Makefile.am: fix LDADD for test_objectcacher_stress
-12eb797 client: fix lock leak in lazio_*() failure paths
-be11c31 upstart: set high open file limits
-25f003b msg/Accepter: only close socket if >= 0
-30373ce osd: default journal size to 5GB
-a562518 librbd: take cache lock when discarding data from cache
-2e862f4 ObjectCacher: fix off-by-one error in split
-fdadefe ObjectCacher: begin at the right place when iterating over BufferHeads
-20a0c56 ObjectCacher: add debug function to check BufferHead consistency
-5d760b7 ObjectCacher: more debugging for read completions
-c054ad6 ObjectCacher: assert lock is held everywhere
-7570e6c ObjectCacher: debug read waiters
-8c96161 ObjectCacher: don't needlessly increment iterator
-b948e4c ObjectCacher: retry reads when they are incomplete
-29a96cf rgw: ops log can also go to socket
-7b96807 doc: Added links to APIs.
-feb8451 doc: don't use 'pool=data' as an example
-c42af80 doc: Added documentation for using CPU profiler.
-84eac86 doc: Added documentation for installing CPU profiler.
-3ccaaa0 doc: Added librbd to the RBD toc.
-9ea2609 doc: Added libcephfs to the CephFS section and moved librbd to RBD section.
-8da6dde common/ceph_argparse: fix malloc failure check
-e82ca0d mon/MonClient: initialize ptr in ctor
-8f1f36d os/FileStore: fix fd leak in _rmattr
-426b58d os/FileStore: fix fd leaks in _setattrs
-1df38fd osdc/ObjectCacher: faux use-after-free
-9a10ebb test: add ObjectCacher stress test that does not use a cluster
-fd928b9 ObjectCacher: more debugging for BufferHeads
-8b187bd build: update for boost_thread library.
-493049b mon: OSDMonitor: clarify some command replies
-0b28ef6 mon: OSDMonitor: fix spacing when outputting items on command reply
-f0c7bb3 build: update for boost_thread library.
-c707568 doc: fix crush set syntax
-71cfaf1 os/FileStore: only try BTRFS_IOC_SUBVOL_CREATE on btrfs
-3ca947e mon: clean up 'ceph osd ...' list output
-344c4fd mon: correctly identify crush names
-592a894 mon: use parse_osd_id() throughout
-918c58c PrioritizedQueue: remove internal lock, not used
-b53e06c DispatchQueue: lock DispatchQueue when for get_queue_len()
-659d4c2 run_xfstests.sh: activate more tests that now work
-22cb135 doc: add Hadoop configuration parameters
-63c5128 smalliobench: fix init-only, add don-not-init
-b40387d msg/Pipe: fix leak of Authorizer
-12c2b7f msg/DispatchQueue: release throttle on messages when dropping an id
-5f214b2 PrioritizedQueue: allow remove_by_class to return removed items
-98b93b5 librbd: use delete[] properly
-4a7a81b objecter: fix leak of out_handlers
-ef4e4c8 mon: calculate failed_since relative to message receive time
-9267d8a rgw: update post policy parser
-f6cb078 mon: set default port when binding to random local ip
-ce28455 rgw: relax date format check
-0a2a0c0 doc: config-cluser move to new IA.
-5c302eb doc: Move of cluster ops for new IA.
-8430210 doc: add-or-rm-mons.rst: fix typo
-4a34965 client: register admin socket commands without lock held
-4db9442 objecter: separate locked and unlocked init/shutdown
-d395131 osd/: add config helper for min_size and update build_simple*
-d5bc66a doc/release-notes: fix heading
-74f7607 doc: release-notes for v0.54
-0d42e97 doc: update crush weight ramping process
-131d15a rgw: fix warning
-a0eb891 osd: default pool min_size to 0 (which gives us size-size/2)
-1d00f3a mon: default min_size to size-size/2 if min_size default is 0
-9d979d7 osd: default min_size to size - size/2
-735df02 mon: helpful warning in 'health detail' output about incomplete pgs
-1679a55 osd: start_boot() after init()
-65961ca vstart.sh: support -X by adding 'auth required = none' entries
-60b84b0 (tag: v0.54) v0.54
-5d27f3d rgw: compile with -Woverloaded-virtual
-1be9923 rgw: fix RGWCache api
-e0e33d2 rgw: fix RGWCache api
-9a38059 osd: remove dead rotating key code from init
-eee0982 osd: defer boot until we have rotating keys
-193e2ea PG: persist divergent_priors in ondisklog
-fcbbebc PG::merge_old_entry: fix case for divergent prior_version
-f299be0 PrioritizedQueue: use iterator to streamlink SubQueue::remove_by_class()
-95cb6cf PrioritizedQueue: avoid double-lookup on create_queue()
-57a6255 osd/: de-prioritize recovery ops relative to client ops
-bd4707a msg/: use PrioritizedQueue to handle DispatchQueue queueing
-5d47db2 OSD: queue ops based on message priority
-a62d778 OSD: use PrioritizedQueue for OpWQ
-f02c75e WorkQueue: Add WorkQueueVal for passing params by val
-25eb1fb common: Add PriorititizedQueue
-bbdae98 Pipe: we don't queue DispatchQueue codes on an actual pipe
-d129112 common: add RefCountedObj.cc with intrusive_ptr hooks
-1c20ea9 rgw_cache: change call signature to overwrite rgw_rados put_obj_meta()
-da0ea9f rgw: unquote etag for if-match
-096c8ac rgw: use thread safe version of gmtime
-cc06090 rgw: don't convert object mtime to UTC
-c4981b8 java: remove redundant src.dir
-efdb209 doc: reorder some openstack/rbd instructions
-caed0e9 osdc/ObjectCacher: do not take Object ref for bh writes
-8b4bdda client: Remove object from oset before deleting
-0b85e43 java: fix build.xml formatting
-8970e81 java: fix javadoc builds
-a11940f osdc/ObjectCacher: only return ENOENT if ObjectSet is flagged
-16db00d client: unregister commands on shutdown
-7d1974c client: fix null dentry crash on dump_cache
-ad3063a client: dump mds session info
-fc6b82f client: add dump_cache asok command
-2c28e5d common: dumpers for ceph_{file,dir}_layout
-69c47d3 client: add mds_requests asok command
-809d0e5 Makefile: fix hadoop lib build
-ef71f32 Makefile: use libclient.la for libcephfs
-2f24168 client: fix null put in ~MetaSession
-8b1f547 librbd: fix create existence checking
-614cf34 librbd: debug when copy occurs
-9c31d09 mon: kick failures when we lose leadership
-e43f9d7 mon: process failures when osds go down
-763d348 mon: ignore failure messages if already pending a failure
-23531c2 osd: add 'osd debug drop op probability'
-efa03ce mon: require pgnum in 'ceph osd pool create <poolname> <pgnum> [<pgp_num>]' command
-cda9e51 librbd: return actual error when detecting format fails during creation
-3d76e67 java: add symlink/readlink tests
-6dd7925 test_libcephfs: fix, add symlink loop tests
-3902a01 debug: adjust default debug levels
-6c0be02 client: simplify/fix symlink loop check
-d037ff4 client: fix path_walk for directory symlinks
-cd14453 OSDMonitor: remove max_devices and max_osd interdependency
-ae1f46c mds: re-try_set_loner() after doing evals in eval(CInode*, int mask)
-07b4f8f si_t was not properly converting values < 100KB
-8f49de0 osdc/ObjectCacher: only call flush callback if we transitions to clean
-0cfe632 cleaned up scripts Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-54f6c17 client: ensure we don't leak MClientReply
-a8053c1 ceph-fuse: fix leak of args
-b305fc8 osdc/ObjectCacher: fix leak on readahead
-1c9ec26 ceph.spec.in:  Build debuginfo subpackage.
-de2cd18 test: add cli test for missing args to rbd
-34ebda2 rbd: check for second argument to mv/rename
-9aae0ee rbd: check for second argument to mv/rename
-5ef16ed test.sh: Adding LD_LIBRARY_PATH so JUnit can find .so files. Removing useless java.library.path references.
-9e9feff doc/cluster-ops/pools.rst: Added documentation for min_size
-b5ce4d0 client: fix SnapRealm leak
-56a152b client: debug SnapRealm reference counting
-a34a9af vstart: allow minimum pool size of one
-88cdde3 client: fix leak of Cap
-5e564f9 client: fix leak of session release msg on session close
-c352edd client: only start invalidator thread if cb != NULL
-44a7017 ceph-fuse: deallocate messenger, g_ceph_context on stop
-fe6e426 doc: add-or-rm-mons.rst: fix a formatting typo
-5b32664 doc: add-or-rm-mons.rst: make paths clearer
-66e6a63 client: give get_caps() out-arg a less confusing name
-ad4bd4e client: do not gratuitously drop FILE_CACHE ref in _read()
-128fed8 client: assert cap refs don't go negative
-dc907e2 librbd: take parent lock when examining fields it protects
-a183fe7 OSDMap.cc: Add pool name to OSDMap dump
-faf23ca rbd: fix snap unprotect, which was succeeding while clones existed
-77b4237 librbd: no need to scan snapshots for parents during remove
-c45a415 script clean up
-9ea95a0 Added a function get_cmd_op Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-fc0d6d3 docs: add keystone documentation
-5fda39e rgw: change configurable
-a99b0fa rgw: fix build
-8fcd351 rgw: use a different boost thread library
-ff8c238 rgw: keystone tokens revocation thread
-b69da4b json_spirit: thread safe
-feb24af rgw: decode pki tokens
-02c2c32 rgw: invalidate revoked tokens
-1f05b1a rgw: keep pki tokens by hash
-8249d7b rgw: decode revocation message
-0d164da rgw: use thread safe version of gmtime
-ff5ee98 build:  Add RPM release string generated from git describe.
-82ebbab doc: Clarified text to reflect requirement for majority, not odd number of monitors.
-a39110d ceph.spec.in:  Remove ceph version requirement from ceph-fuse package.
-e37c192 rgw_admin: do not throw error when start-date and end-date are not passed to usage::trim()
-b7da8bb libcephfs_jni.cc: mtime and atime are Long data types. Changing the accessor methods to reflect this fact
-1581db9 configure: fail when missing junit dependency
-a47a966 Makefile: include Java test suite artifacts
-2dfc103 Makefile: include Java unit test runner
-55483d7 Makefile: only add source files to EXTRA_DIST
-74cc299 Makefile: use real file for make target
-4f215b0 Makefile: remove redundant EXTRA_DIST
-c3129a2 Changing build.xml to produce a jar instead of class files Adding a TestSuite class to run all tests Remove the libcephfs-test.jar when running ant clean
-7701542 Adding libcephfs-java.jar to .gitignore
-791a822 Adding a simple workunit that executes one libcephfs-java test
-5dec917 Moving test java files into a proper heirarchy. Moving the compilation of tests classes from build.xml to Makefile and editing configure.ac to look for the junit4 jar in the default location of /usr/share/java. It is still possible to build and run tests from build.xml as well as Makefile.
-08ee736 java: fix return type on JNI function
-b1b9f0a vstart.sh: allow shorter MON, OSD, MDS count env vars
-8ccccbb osdmap: make flag names match
-f2bf7aa mon: make osdmap flags incur a health warning
-9373452 doc: Rewrote index for install section per new IA.
-f2fbe7a doc: Removed source/index from top-level toc tree per new IA.
-6f6df5c doc: Moved doc/source files to doc/install per new IA.
-059294c doc: Syntax cleanup for new IA. Fix tip. Clean up for generating keys.
-631075d doc: Syntax cleanup for new IA. Added reference to repo.
-7a1e952 doc: Syntax cleanup for new IA.
-e11cafb doc: Syntax cleanup for new IA. Removed steps for building docs.
-b5ae387 doc: Syntax cleanup for new IA. Removed info for building documentation.
-9eb0b2b doc: Syntax cleanup for new IA.
-e144582 doc: update the rest of the table for debian wheezy
-cdd73bb doc/: document recovery reservation process
-0ed0d2a pg: recovery reservations
-9d9a222 doc: Wheezy is now using kernel 3.2.0; say so
-e7c02b3 doc: Fix per-daemon public/private settings: "network" -> "addr"
-eac614a doc: Clarify "pool size", copies, and replicas more
-52bada5 doc: fix Hadoop config option typo
-97c19da rgw: unquote etag for if-match
-d3553a5 doc: Made changes to the CSS to make admonitions more prominent.
-067953f doc: Added lines between title and body. Pre IA cleanup.
-282ac92 doc: Updated syntax for consistent usage prior to IA updates.
-d1404c3 doc: Updated index for removal of legacy openstack install.
-9127ebd doc: Minor edit to admonitions.
-04f661f doc: Updated syntax prior to IA updates.
-d38df17 doc: Updated syntax usage prior to IA updates.
-ee07b22 doc: Added new info per Ross's request.
-a1b2f58 doc: Fix and minor edit for admonitions.
-e1195fd doc: Minor edits for admonitions.
-6731b55 doc: Edits from Peter Reiher's feedback, and minor edits for admonitions.
-2260e15 doc: Minor edits for admonitions.
-07f60d4 doc: Added topic for adding OSDs and adjusting CRUSH weights.
-0a939d0 doc: Removed legacy OpenStack installation.
-5ef58d3 doc: Added topic for adding an OSD and adjusting CRUSH weights.
-50d3598 rgw: don't convert object mtime to UTC
-c357474 ceph.spec.in:  Remove ceph version requirement from ceph-fuse package.
-cca606f Update log file when rgw is not running
-1348685 osd/: add pool min_size parameter for min acting set size
-60a9816 qa: Script to run fio and template file
-456c90b Makefile: add missing rgw_resolve.h to dist tarball
-ca89880 client: kick waiters for an mds session to open on mds recovery
-f0927cb qa: disable xfstest 45 until mount issue is resolved on precise
-02527d4 qa: disable xfstest 45 until mount issue is resolved on precise
-0baa927 cls_rbd: send proper format of key to "last_read" for dir_list
-fe9a441 rgw: document cname configurable
-951c6be rgw: resolve hostname dns cname record
-6aa9cff java: use accessors for mode flag tests
-84299e1 rgw: fix multipart overwrite
-be6d563 rgw: don't reset multipart parts when updating their metadata
-488b019 rgw: break out of read loop if we got zero bytes
-138262f doc: fixed some inccorrect syntax.
-2a69627 mds: move to from loner -> mix if *anyone* wants rd|wr
-4b3f97d mds: base loner decision on wanted RD|WR|EXCL, not CACHE|BUFFER
-307fd24 librbd: fix memory leak on read
-241569c rbd: allow removal of image even if rbd_children deletion fails
-4b4e0fa rbd: allow removal of image even if rbd_children deletion fails
-3162f13 rgw: configurable swift token ttl
-0f7dada client: Add symlink loop checking in path_walk()
-60e54d6 client:  Fix path_walk() to support dir symlinks
-beaafe8 test: Add tests for symlink pathological cases
-15b3d98 doc: Minor edits and added reference to Cephx intro.
-85cd694 osd/: encode LOST_REVERT reverting_to in prior_version pos
-bad0114 PG: use remove_object_with_snap_hardlinks for divergent objects
-699e54d rbd: stripe count is not measured in bytes
-0db11c7 chain_xattr: use sys_* methods
-8c3481d os/FileStore: chain_*() methods return error codes; don't check errno
-9cf0be7 chain_xattr: comment about how xattrs are named
-2bf6a2b os/chain_xattr: whitespace, constify *end
-be438dc os/chain_xattr: do not double memory buffer (again)
-b7f89cb os/chain_xattr: fix listxattr buffer size
-5496600 os/FileStore: introduce lfn_close()
-51d3faa os/FileStore: remove lfn_*xattr helpers
-044be91 os/FileStore: recast _rmattr on top of chain_f*
-6a6699b os/FileStore: recast _setattrs() on top of chain_f* methods
-41bc77f os/FileStore: drop _getattr() helpers
-d59cf33 os/FileStore: use new helpers from collection_{get,set,rm}attr[s]
-b6bfeed os/FileStore: use _fgetattr() from getattr()
-307fd42 os/FileStore: remove unused _getattrs() methods
-1862ddd os/FileStore: use _fgetattrs() from collection_getattr()
-a367e6e os/FileStore: use _fgetattrs() from _rmattrs()
-cab1d63 os/FileStore: use _fgetattrs() for _setattrs()
-ad5ac17 os/FileStore: use _fgetattrs() for CLONE
-769f473 os/FileStore: use _fgetattrs() for GETATTRS op
-68377f9 os/FileStore: add _fgetattr(), _fgetattrs() helpers
-bb127bd os/FileStore: use f*xattr() methods to test xattr support
-4e55303 os/chain_xattr: move chained xattr helpers into separate file/module
-e49969a test script for s3 tests Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-7e57c5f librbd: better debug output
-8d8726a osdc/ObjectCacher: wake all rx waiters on ENOENT
-7731d47 test_librbd: add additoinal clone test
-41812c2 osdc/ObjectCacher: trigger copy-on-write before read
-674d266 osdc/ObjectCacher: return ENOENT
-cde4dd0 osdc/ObjectCacher: remove BufferHeads on ENOENT
-1a7caa4 osdc/ObjectCacher: clear complete if may-cow and !exists
-f8e92a1 osdc/ObjectCacher: add object exists flag
-890e492 librbd: remove parent logic from reads beneath the cache
-09dc191 osdc/WritebackHandler: add may_copy_on_write()
-f6d2e9a osdc/Striper: more debug
-e506362 librbd/AioCompletion: ensure read result assembly happens last
-8712958 librbd: complete Context on error from ObjectCacher::readx
-72a710a client: return EBADF for invalid file desc
-132fb34 doc: describe Hadoop configuration options
-342c2c7 PG::merge_old_entry: fix case for divergent prior_version
-7e26467 PG: use remove_object_with_snap_hardlinks for divergent objects
-7483d1f msg/Accepter: use derr
-769bac8 msgr: change port range from 6800-6900 -> 6800-7100
-623553d msgr: make bind port range configurable
-49bd8ab librados: move misc tests into test/librados/ dir
-5893dd5 librados: test/rados-api/* -> test/librados/*
-80880ee client: always follow non-trailing symlinks
-4fc67c5 client: simplify path_walk() loop
-6f7a632 client: Support for fchown
-e4aa6d7 cls_lock: reorg test_cls_lock
-0eedc78 cls_rgw: reorg test_cls_rgw
-a1402b5 fix cls_rbd reorg
-ddf096b librbd: reorg rbd tests
-b749323 cls_rbd: move into new location
-bcefc0e msg/Pipe: fix leak of AuthSessionHandler
-4bff87d doc: Added qemu caching section.
-f171aba doc: Added Commandline Usage and a few fixes.
-f7412fe crypto: add cms utility function
-c51e1f9 test script for s3 tests Signed-off-by: tamil <tamil.muthamizhan at inktank.com>
-a7e1368 test: Add symlink test for absolute paths
-4cd47c4 client: Fix state of symlink with absolute path
-bc4e6b9 doc: Changed term "kernel object" to "kernel module". Added hyperlink to cephx.
-019fee8 doc: Improved the landing page for RBD.
-536d764 doc: Clarified text and added reference back to main RBD pages. Added sidebar.
-2b2ac13 doc: Changed RBD to librbd cache for accuracy.
-a01b112 doc: changed --user to --id, and fixed a typo.
-a7551e4 run_xfstests.sh: add optional iteration count
-dfc57c4 doc: minor edits to the index.
-968b315 doc: Added layering to the snapshot section.
-6c5de99 osd: add PG state recovery_wait
-d2c6d44 message: add MRecoveryReserve
-23dbe3e message: add missing print statement for REJECT message
-614cb50 PG: correct sub-state names in ReplicaActive
-15ada1c doc: update notes on new rpm-based platforms
-45005d3 doc: fix os-recommendations table
-2d52d7c doc: Index entry for OS Recommendations
-049e7fb doc: update os-recommendations
-c435d31 ceph-disk-activate: avoid duplicating mounts if already activated
-da9aed9 osd/: add pg_log_entry_t::reverting_to for LOST_REVERT
-29a03f0 rgw: parse keystone token expiration
-3f08e96 PG: requeue snap_trimmer after scrub finishes
-1bb6537 PG: requeue snap_trimmer after scrub finishes
-c62f3dd rgw: cache keystone tokens
-310796a doc: tiny syntax fix.
-eac443e doc: Added internal anchor references.
-3c034ae doc: using remote copy
-1351e76 README: add libboost-program-options-dev
-f944386 rgw: map keystone tenant id to rgw user
-6bbe7db configure.ac: add program_options header check
-88f4823 rgw: handle keystone roles
-421c352 rgw: auto create rgw user for new keystone users
-845e862 rgw: handle keystone tokens
-9df953c rgw: extend rgw json parser api
-9608a88 ReplicatedPG: actually delay op for backfill_pos
-550ef50 Finisher: add perf counter for queue len
-8d27eda FileJournal: rename queue_lock to finisher_lock
-1a5b626 FileJournal: write_cond is not used
-c6c8fce FileJournal: break writeq locking from queue_lock
-2646a8f Throttle: reduce lock hold periods
-bc91f9d os: instrument submit lock, apply lock, queue_lock, write_lock
-2ed667a FileStore: add op_throttle_lock
-542e134 FileStore: don't lock op_tp in queue_op
-a8ac453 perf_counters: add dec()
-9601b29 JournalingFileStore: move apply/commit sequencing to apply_manager
-1d9f5d2 JournalingFileStore: create submit_manager to order op submission
-117ac90 JournalingObjectStore: remove force_commit, no longer needed
-2d180e7 JournalingObjectStore: whitespace fix
-c2c912b FileStore: remove trigger_commit
-5326c22 JournalingFileStore: pass -1 as the alignment if unimportant
-f7727dd FileStore: next_finish is not used
-a268afa test/bench: add tp bench
-e814d8f test/bench: small io benchmarker
-fe2814e Mutex: Instrument Mutex with perfcouter for Lock() wait
-184a676 msg/SimpleMessenger: start accepter in ready()
-c830a9b mon: separate pre- and post-fork init
-5dd5471 msg/Pipe: fix seq # fix
-1db4bd9 osd: verify authorizers for heartbeat dispatcher
-6d3cafc rgw: refactor curl functionality
-44818eb rgw: configurable swift auth url
-a12bc43 doc: fix typo in cinder upstart config name
-06c62c5 doc: Added syntax fixes to Peter's session authentication doc.
-402e1f5 ceph-disk-prepare: poke kernel into refreshing partition tables
-2e32a0e ceph-disk-prepare: fix journal partition creation
-8921fc7 ceph-disk-prepare: assume parted failure means no partition table
-a4db58f msg/Pipe: whitespace cleanup
-02f6262 msg/Pipe: only randomize start seq #'s if MSG_AUTH feature is present
-3a48cbf doc: update fs recommendations
-1a236e1 cephx: don't check signature if MSG_AUTH feature isn't present
-56bce3b auth: include features in cephx SessionHandler
-100fcca Fixed problem with checking authorizer in accept().
-5324d2d librbd: Fix 32-bit compilation errors
-2157bcb Temporary patch to a problem in Pipe related to monitor initialization.
-b9eccdf osd: make pool_snap_info_t encoding backward compatible
-7239e80 dep-report.sh:  ceph package dependency report.
-1638f62 client: Fix ref counting double free with hardlink
-49ca7d5 test: Functional test for hardlink/unmount pattern
-84c7a34 osdc/ObjectCacher: remove dead locking code
-17c8589 librbd: clip requests past end-of-image.
-86de1fa librbd: size max objects based on actual image object order size
-07e7bc3 rgw_cache: change call signature to overwrite rgw_rados put_obj_meta()
-3384431 mds: Fix SnapRealm differ check in CInode::encode_inodestat()
-eafe0a8 mds: allow try_eval to eval replica locks
-f0c2e12 mds: Send mdsdir as base inode for rejoins
-ceeebaf mds: Fix stray check in Migrator::export_dir()
-d2ac024 mds: fix stray migration/reintegration check in handle_client_rename
-2f09d47 mon: fix leading error string from 'ceph report'
-9cea181 doc: updated front page graphic.
-65ed99b PG: Do not discard op data too early
-047f58d java: use unique directory in test
-0a1e0b7 java: add tests for double mounting
-be94fb4 java: add AlreadyMounted exception
-13f76df java: remove deprecated ceph_shutdown
-16a4c92 java: clean-up in finalize()
-d88c60c java: enable ceph_release
-5c91428 java: enable ceph_unmount
-7e7e06f java: mkdirs returns IOException
-9c9c247 java: log listdir contents in java client
-4a5abc6 java: remove tabs to fix formatting
-1c45775 java: add O_WRONLY open flag
-712bfa5 java: add FileAlreadyExists exception
-d4da4dc doc: fix warning in JavaDoc
-1de3305 osdc/ObjectCacher: handle zero bufferheads on read
-94a84d2 osdc/ObjectCacher: add ZERO bufferheads from map_read()
-fde7fe6 osdc/ObjectCacher: add zero bufferhead state
-4fb6a00 test_librbd_fsx: sleep before exit
-45946c2 osdc/ObjectCacher: some extra debugging
-fdf556a osdc/ObjectCacher: fill in zero buffers in map_read() on miss if complete
-9dc887d osdc/ObjectCacher: improve debug output for readx()
-b9b1be6 osdc/ObjectCacher: set complete flag when we observe ENOENT
-94d2b91 osdc/ObjectCacher: clear complete on trim, release
-ab56e41 osdc/ObjectCacher: add complete flag
-f3db940 osdc/ObjectCacher: refresh iterator in read apply loop
-e287296 osdc/ObjectCacher: do read completions after assimilating read result
-9407046 osdc/ObjectCacher: do not close objects explicitly
-8920f41 osdc/ObjectCacher: make trim() trim Objects
-f241e22 osdc/ObjectCacher: check lru_is_expireable() in can_close()
-cd8e991 osdc/ObjectCacher: add LRU for Object
-46897fd osdc/ObjectCacher: take Object ref for bh writes
-21dc0e0 osdc/ObjectCacher: take refs for inflight lock ops
-57e18a7 osdc/ObjectCacher: take Object ref when there are buffers
-a34a8b8 osdc/ObjectCacher: add ref count to Object
-24d07e8 osdc/ObjectCacher: rename lru_* -> bh_lru_*
-57a4cbb librbd: fix race in AioCompletion that are still being built
-e225767 doc: add JavaDoc to Sphinx
-ffb8c60 Various cleanup changes to session authentication code.
-67bc92a client: add ceph_release, ceph_shutdown
-f1eef53 client: double mount returns -EISCONN
-c9ca3c9 client: do not reset session state on reopened sessions
-3153ec7 mds: fix handling of cache_expire export
-4ac4520 mds: do not mark closed connections disposable
-ad839c7 mds: use connection on closed sessions in force_open_sessions
-53b354d doc: update copyright to include contributors, CC
-c33f93d rgw: abort multipart upload uses part manifest
-c0df832 osd: fix populate_obc_watchers() assert
-3eda37a mds: check getcwd() return value
-1afa8ff leveldb: fix accidental submodule revert
-a5eb72b doc: note raw format required for openstack/rbd
-ee2ce73 rgw: multipart manifest uses parts built manifest
-43caeeb rgw: multipart uses striping
-f085708 rgw: remove objects on failed upload
-19a7f5a rgw: atomic object data is being split over multiple parts
-1ebf0b7 rgw: fix multipart overwrite
-38f4d6a rgw: don't reset multipart parts when updating their metadata
-5c1252f rgw: break out of read loop if we got zero bytes
-345bcac mds: fix #include for getcwd(), simplify
-8c16a83 doc: Added hyperlink.
-da8bb88 doc: Fixed usage and deleted legacy values.
-e510677 vstart.sh:  Use ./init-ceph instead of CEPH_BIN
-1921a06 Script that generates perl wrapper for teuthology tests
-18731b4 rgw_admin: do not throw error when start-date and end-date are not passed to usage::trim()
-bfc4904 rgw: better error responses, logging for specific error cases
-30d11f4 rgw: POST fixes, policy range, policy expiration
-7bb3504 rgw: handle expiration and content length policy conditions.
-ca1e177 rgw: implement POST key can use ${filename}
-d7b5942 rgw: return correct responses with POST
-3faf6ab rgw: handle success_action_redirect
-846bb34 rgw: handle policy as case insensitive where required
-391775b rgw: handle missing content length in POST
-fc05b63 rgw: handle x-ignore- in POST request
-52b78d5 rgw: verify that request variables are in policy
-86b06f1 json_spirit: update grammar
-ccd757f rgw: add policy decoding code
-5b90d10 rgw: basic policy functionality
-81f257d rgw: add a test tool for json parser
-c2b702f rgw: adjustments for 100-continue
-d6d3bf0 rgw: handle content_type, meta
-9f9bc77 rgw: helper functions to parse multipart form
-1bafe7c rgw: Create JSON parser
-256bd62 rgw: Implement POST object to publicly writeable buckets.
-7c67230 osd/osd_types: make stat osd_op print nicely
-4240846 librbd: use assert_exists() to simplify copyup check
-e609c8a librados: add assert_exists guard operation
-59839a8 librbd: validate copy size against proper snapshot id
-eed28da osd: return EOPNOTSUPP on bad class or method name
-31260a3 leveldb: fix accidental revert
-b85cde5 rgw: dump an error message if FCGX_Accept fails
-d4f0a88 workqueue: make debug output include active threads
-4d20b60 msg/Pipe: fix tight reconnect loop on connect failure
-54cab4d throttle: less default log noise
-3dffa6d rbd: document defaults for rbd bench-write
-ac07afa test: Dont check initial permissions
-84a35f8 Makefile: include java in dist tarball
-3cc39f5 rgw: check client write status on swift get_obj
-a755674 rgw: don't continue processing of GET request on error
-2248822 osd: drop conditional check in populate_obc_watchers
-4156b98 osd: populate obc watchers even when degraded
-a135352 run-cli-tests: Include rationale for cram patch and pointer to issue.
-a7a6850 doc: Changed rack, row text to row, rack. Fixed some syntax. Added note.
-3d0a522 vstart.sh: cephx on by default, -X to disable
-2d20f3a objecter: move map checks to helper
-da5b244 mds: avoid copy in SessionMap::get_or_add_session()
-7a3ccef librbd: init layout in ImageCtx ctor
-2c45d1c librbd: init vars in AioRequest ctor
-d2f07cc mon: pass by ref
-0fedc28 monmap: pass by ref
-7d9ee17 client: release import caps we don't have
-66bda16 auth: change default: require 'cephx' for daemons
-91a2492 mds: fix typo, build
-5fb8a22 mds: make dup session close an error; make case consistent
-e6cbcb2 mds: deal with the case where you have a Session close event without a Session.
-5e221a4 doc: Added clarification from Peter's feedback.
-3870ce2 doc: Added backward compatibility text. Additional cleanup.
-50bb659 man: update ceph-debugpack, ceph man pages
-c18e17d rbd: update man page build
-69a96bb doc: clean up doc build directions
-ebcad66 Stopped logging keys in session authentication code.
-b3cc40a java: update deb bits from ceph-devel feedback
-ad3482b java: add test for mount with bad root
-941ac2f Makefile: add src/include to #include path for libcephfs_jni_la
-4a0398d do_autogen.sh: add -j flag to enable java stuff
-9feb4af debian: add libcephfs-java package
-68e0164 automake: setup autotools to build cephfs-java
-3504335 java: add Java and C++ source files
-d2f0f89 libcephfs: return error when not mounted
-233b0bd test/libcephfs: Fix telldir/seekdir test
-cc8b9e2 mds: use const ref instead of large pass-by-value
-ae8aaa4 mds: annotate switch case fall-thru
-667fb72 mds: fix coverity warnings on NULL deref
-1e987ea mds: fix possible inode_t::get_layout_size_increment() overflow
-96ff10a mds: init cap_reconnect_t::flock_len
-091d16a mds: init in cap_reconnect_t ctor
-46054ce mds: init inode_t::dir_layout
-86b4317 rbd: implement bench-write command
-04d32e7 rbd: print useful error message if striping is specified for format 1
-58e920b client: Fix permissions checking for O_WRONLY
-352a7e2 test: Make the test filename unique to test
-b19ac61 client: Fix permissions error on open with O_CREAT
-0571cb7 S3 test scripts
-f6b7b5c doc: minor fix on user name for GW script.
-43e8f76 Cleaned up
-1c38286 addr_parsing: make , and ; and ' ' all delimiters
-e0b3213 vstart.sh: log client to out/$name.log
-03887e0 client: fix signed/unsigned comparison warning
-1fc18c4 mon: MonitorStore: fix error checks for mkdir operations
-e8df212 leveldb: revert accidental rewind
-85a26ad client: initialize tid in MetaRequest ctor
-676db60 test/libcephfs: Fix telldir/seekdir test
-51858b7 test:  Add libcephfs tests for stat, lstat, chmod
-c68c516 client: Fix stat of relative symlinks
-b4bfade doc: Fix wrong wording for symlink xattrs calls
-809587c client: Implement lchown in Client and libcephfs
-39fcd7e test:  Add libcephfs tests for stat, lstat, chmod
-9b0c88b client: Implement stat and correct lstat
-14ef165 client: Support for fchmod
-a0f65a1 mon: MonitorStore: check return value of 'rename' for errors
-e41caa1 mon: MonitorStore: check mkdir return value for errors
-2549bb8 mon: MonitorStore: check return value for errors on 'open'
-6d7dea3 mon: AuthMonitor: check return values
-0292349 mon: LogMonitor: check return value when writing to file
-47a4a7c mon: Monitor: unlock before returning
-52dedc8 mon: Monitor: fix potential null-pointer dereference
-64bf7f9 leveldb: update .gitignore
-bcd6aea monclient: drop now-unused MonClient::is_latest_map()
-8ed86ee test: Add func. test for chmod in libcephfs
-328bf48 client: Add permissions checking to open
-ee20cd0 rbd: reject negative size (can make image that is hard to delete)
-8791db7 qa: run multiprocess rados tests
-935d579 testrados_watch_notify: fix most tests, disable one
-c9de24f testrados_list_parallel: fix
-cce58a3 objecter: refactor pool dne checks
-dc2ec37 objecter: fix handling for pool DNE on pgls
-ed46a85 version: drop 'commit:' prefix on sha1
-6f74e6b radosgw: fix compile warning
-ab4d8b7 doc: Updated the cephx section of the toc for cluster ops.
-256c665 doc: Did a little clean-up work in the cephx guide.
-0818e1e doc: Added a new intro for cephx authentication.
-d2afddd rgw: multiple coverity fixes
-58020d4 test: Add a workunit for chmod
-db97666 mds: explicitly queue messages for unconnected clients
-2542dd5 client: fix implemented caps update on release/flush
-b290dc3 MClientRequest: fix mode formatting
-2528b5e (tag: v0.53) v0.43
-0d3a53d msg/Pipe: correctly read from peers without MSG_AUTH
-96e365b radosgw-admin manpage: Fix broken quotes
-412efc1 admin_socket: fix '0' protocol version
-a43ba9a rbd: fix striping feature bit addition
-7957500 librbd: log why create failed when striping features missing
-b7682c5 librbd: use map-based stripe method to avoid fragmenting io
-d68a806 striper: expose method that works directrly from a map<>
-5599eb7 Striper: move from Filer
-ff304c8 librbd: implement user-facing image to image copy
-6242059 librbd: factor out copy from image create/open/close
-5d5863c librbd: rename get_size() -> get_current_size()
-c7b5cdf filer: trivial unit test
-17bb2c5 osd: include buffer_extents in ObjectExtent operator<<
-e6c98e9 filer: more debug output
-b4f2829 filer: fix add_partial_sparse_result
-059ebac test_librbd_fsx: randomly vary striping on clone
-a736cb0 librbd: allow striping to be specified for clones
-819f939 filer: add debug printability for striped read result stuff
-80ebcee filer: uninline StripedReadResult
-fd8013a librbd: avoid read copy for c++ api read
-ecb040c librbd: read_from_parent into a bufferlist
-b1b3324 librbd: use bufferlist target for read_iterate()
-a8042c7 librbd: make read methods target buffers or bufferlists
-94de63a librbd: kill unused get_block_osd()
-e9e197b librbd: kill legacy striping helpers
-d556eda librbd: reimplement flatten in terms of child objects
-cdb165e librbd: write sync read over an extent list
-2660129 librbd: make rollback use new striping accessors
-113f698 librbd: make trim_image() behave with new world striping order
-0aeedf6 librbd: generate format_string in ImageCtx
-3ae9f57 librbd: make read_iterate iterate over periods
-e114cbf librbd/ImageCtx: accessors
-6151899 librbd: reimplement striping
-9e109e1 filer: add sparse result into a striped read result
-08d1eb5 filer: make tail zeroing in stripe result assembly optional
-6cd51fe librbd: remove callback from handle_sparse_read
-3d010fc objecter: use StripedReadResult for scatter/gather read
-3c2024d filer: helper to assemble striped read results into a single result
-36a2245 buffer: add claim_prepend()
-827ad53 filer: add optional buffer offset
-c85b901 filer: add helper to map from object extent to file extents
-c3f186e filer: use vector<pair<>> instead of map<> for buffer extent map
-058c24f filer: include (numeric) objectno in ObjectExtent
-a7f634a librbd: update python bindings for striped image creation
-ae7271e rbd: document stripe unit options on man page
-d7b912f librbd: document create3
-79a365a librbd: populate struct ceph_file_layout for image
-d54ca67 filer: generalize file_to_extents to take a format string
-848a942 rbd: show striping parameters with 'info' command
-efa1bea librbd: expose image striping properties
-e0b4638 cls_rbd: fix snap key filtering
-8143206 rbd: allow striping to be specified on image creation
-d6501db librbd: allow striping to be specified on image creation
-4ef9a3d librbd: load striping information when opening image
-2e403ef cls_rbd: add stripe_unit, stripe_count metadata
-18a3cee client: avoid possible null deref
-0095a13 client: fix shadowing in inode ctor
-d8bb685 client: init readdir fields
-5511564 Makefile:  Add CRYPTO_C(XX)FLAGS to librdb
-4c134a4 Makefiles:  Add ar-lib to .gitignore.
-f525534 autogen.sh:  On some platforms, the m4 is created earlier.
-d28ba52 autogen.sh:  Create m4 directory for leveldb submodule.
-0cc828b Makefiles:  Update submodule reference to latestes for leveldb.
-3ecd289 Makefile: update submodule reference for leveldb.
-0219b66 leveldb: fix-up submodule entry.
-071fdc2 Makefile: Improve test for boost system library.
-7ea734c Makefiles:  Missing boost library should not be fatal.
-151d940 Makefiles:  ignore the m4 macro directory
-3658157 Makefile:  Updates to eliminates warnings, add test for boost system lib.
-a1d8267 cls_rgw: init var in ctor
-8d7c8e3 rgw: don't add port to url if already has one
-662c69e ceph-disk-prepare, debian/control: Support external journals.
-4db1251 logrotate: fix bash syntax
-251649c doc: remove cephfs warning
-168bd10 doc: fix file system recs
-e0bc555 cephx: simplify signature and check code
-d123e31 msg/Pipe: avoid duplicated code to randomize out_seq
-389fac7 rgw: replace bucket creation with explicit pool creation
-0ec4520 rbd: don't issue usage on errors
-7477a08 doc: Added radosgw temp remove.
-041081c doc: Minor clean-up.
-94aec21 doc: minor clean-up.
-fc34f16 rgw: fix compilation
-15775f8 mon: drop command replies on paxos reset
-06a8d95 doc: Editing and cleanup.
-410ebac test: Allow randomized tests to be repeatable
-baf54b2 client: Reset cache_name pos on dirp
-8518115 rbd cli tests: copy.sh was looking for old version of rbd ls -l output
-0442607 clean up of rbd functionality script
-73462f0 cleaned up the perl module
-bd47169 cleaned up the script
-11c51dc radosgw-admin: don't try to parse date if wasn't specified
-f268d4e ceph-debugpack: updates
-9810517 doc: separate config from I/O in openstack diagram
-4ebe8c2 doc: clarify rbd openstack docs
-8fab972 gitignore: Update to match packaging changes and additions, rest-bench addition.
-dd462ce configure.ac: Typo in human-readable description.
-7ef0df2 mon: Monitor: resolve keyring option to a file before loading keyring
-4eabe57 doc: simplify wording for rbd-openstack config
-b83d38a doc: Add doxygen style documentation for libcephfs
-9da5b53 test: Refactored testceph.cc into gtest framework
-a00a240 test: Allow readdir test to be repeated
-3b5b9ef libcephfs: Check that buffer is non-null
-323a52e mds: Fix removexattr ENODATA error
-629cad5 osdmap: fix null deref in dump
-0406d0c osdmap: fix osdmap dump null check
-5129620 mds: note fall-thru to please coverity
-d68985f test_cfuse_cache_invalidate: check for errors
-75bed10 mon/Elector: fix leak on monmap from peer
-1a28cce test_cfuse_cache_invalidate: zero buffer
-97c2f19 FileJournal: ignore osd journal size for block devices
-df1d17f rgw: switch perm to uint32_t
-f4a0b2d rgw: flexible attr fields
-d4725c0 rgw: get bucket logging stub
-c0b5370 rgw: check_disk_state also updates other object metadata
-acb3053 rgw: set null termination explicitly
-8731d0d cls_rgw: return returned ret code
-58ad3bf rgw: add missing parantheses
-b13a36c rgw: check NULL before dereference
-148ba6e rgw-admin: pass object by reference
-091bf45 rgw: fix leaks in certain error paths
-ce94875 rgw: fix (im)possible leak
-79b15a2 rgw: catch possible exception
-5dbda13 rgw: initialize member variables at req_state
-5a615f1 rgw: initialize data members
-ddb1bb0 rgw: RGWObjState() initialize memebers
-7eb366c rgw: initialize members at RGWRados()
-d16e25f cls_rgw: check pointer before dereferencing
-7ab3d2a rgw: multiple coverity fixes of uninitialized fields
-b5ed23d rgw: trivial fix
-e042d6b rgw: change size_t to ssize_t for string.rfind() result
-d2159bf rgw: fix resource leak
-e233dff Revert "admin/build-doc: Use installed Sphinx and its dependencies, when possible."
-3091b5f rgw: virtual bucket affects resource lookup
-0344c6b rgw: document admin, usage api
-cb1fdb9 rgw: fix chunked object PUT for small objects
-3d1dee2 rgw: abort_early should initialize formatter if needed
-511e639 rgw: configurable set of enabled apis
-d22aa6c rgw: add user caps
-d8223fa rgw: usage trim
-ed04755 rgw: usage show accepts more params
-42d873e rgw: different formatters for different services
-2b6a27d rgw: add a flusher to handle output data, simplify client api
-cecd7af Formatter: fix XML formatter
-02f7870 rgw: add rest-usage handler
-fca6d3b rgw: REST resources init uses configurables
-cea28f8 rgw: refactor protocol stacking
-85f137d rgw: tie callbacks in different handlers directly to REST
-b71b8b0 rgw: sed 's/_REST/_ObjStore/g' *
-e153bce rgw: start moving usage management functions
-a9c9f96 rgw: hide fcgi details from client code
-c038c3f doc: Added admonishments to use separate host for clients.
-fa66eaa mds: Reset session stale timer at end of open
-48fc340 upstart: OSD journal can be a symlink; if it's dangling, don't start.
-8d718ca osd: Make --get-journal-fsid not really start the osd.
-435a5c1 osd: Make --get-journal-fsid not attempt aio or direct_io.
-88fc8b7 ceph-disk-prepare: Use the OSD uuid as the partition GUID.
-d6b065c debian/control, ceph-disk-prepare: Depend on xfsprogs, use xfs by default.
-2e9afc2 ceph-disk-{prepare,activate}: Default mkfs arguments and mount options.
-b40b2d6 ceph-disk-prepare: Avoid triggering activate before prepare is done.
-79320ff ceph-disk-activate: Add a comment about user_xattr being default now.
-ab84949 ceph-disk-activate: Use mount options from ceph.conf
-8eeebe8 ceph-disk-activate: Refactor to extract detect_fstype call.
-d94e421 ceph-disk-activate: Unmount on errors (if it did the mount).
-a146f05 ceph-disk-prepare: Allow setting mkfs arguments and mount options in ceph.conf
-0b934e1 ceph-disk-prepare: Allow specifying fs type to use.
-18d1580 doc: clarify osd journal as a block device
-075c321 rbd: ls -l format tweaks:
-8a484be rbd: Make lock list adapt 'number' of msg (1 lock, 2 locks)
-19147c0 rbd: set_conf_param() rewhack:
-88ea027 Add si_t type for large-number "just the suffix, no space"
-082746d client: Fix assert when stale arrives before open
-0405a44 ceph-disk-activate, upstart: Use "initctl emit" to start OSDs.
-1f3a50a ceph-create-keys: Refactor to share wait_for_quorum call.
-4302f12 ceph-create-keys: Create a bootstrap-osd key too.
-a53a4a2 client: Don't keep sending SESSION_REQUEST_OPEN
-2d6953a Revert "rbd: gracefully handle extra arguments"
-20496b8 OSD: separate class caps from normal read/write
-0d48879 rbd: gracefully handle extra arguments
-aed3612 MOSDBoot: fix compatibility with ~argonaut
-f1ad419 qa: report success if race is not detected
-37ffb27 qa scripts: Replace cut -f 1 with awk '{print $1;}'
-bed5536 rbd: Use TextTable for showmapped and lock list
-c109329 librbd: simplify math
-61b2e4d rbd: use TextTable to implement ls -l
-fb88683 Add TextTable class for table output
-9889d81 librbd: fix error handling in get_parent_info
-3ba7ab2 doc: Whitespace cleanup.
-790b508 doc: rst syntax fixes.
-36f1698 rbd.py: Fix docstring syntax of list_lockers().
-2411ba6 rbd.py: Docstring syntax.
-c65ffe9 admin/build-doc: Use installed Sphinx and its dependencies, when possible.
-d5c3c47 mon: Elector: clean ack set on election start
-35f5eff mon: Elector: bootstrap on new monmap from elector
-a6ba95f mon: dump formatted crushmap on report
-36efcb5 mon: do not tick() until all paxos instances recover
-fec1912 client: Fix #2215 with cache inval in thread
-847728e client: Remove unnecessary checkafter parameter
-68fbbea ceph-fuse: Test for fuse cache issue (#2215)
-2de5670 mds: make migrate_stray() specify full path
-74ea0cb doc: update release-process.rst
-9cabbb2 mds: fix stray reintegration check in handle_client_rename
-2519bd3 doc:  Added description of ceph release process.
-67a201d Avoid sign-extension of non-magic Message* values
-fcc987b release: note possible osd caps incompatibilities
-9362f72 doc: add rbd example to ceph-authtool man page
-2e366ea OSD: deprecate CLS_METHOD_PUBLIC flag
-7ea8f16 doc: update ceph-authtool man page for new osd caps
-13ba5ec objclass: require each class method to have a flag set
-135c85a OSDCap: add separate caps for class read and class write
-bf333d8 OSDCap: allow runs of spaces anywhere
-9e8f69a qa: try to reproduce a race more times
-e8df6a7 mds: Avoid creating unnecessary snaprealm
-5673523 mds: Properly re-calculate mdsdir inode's auth bit
-60b93a7 mds: Trim non auth subtree directory
-d2861d9 mds: Properly update dirty dir fragstat during log replay
-f8110cb mds: Allow export subtrees in other MDS' stray directory
-1cc28d5 mds: Avoid save unnecessary parent snaprealm
-824e593 mds: Set metablob.renamed_dirino in do_rename_rollback()
-35dc221 mds: Fix xlock imports
-bc1e52f mds: Allow rename request for stray migration/reintegration
-c6c6de5 mds: Add finish callback to waiting_for_base_ino wait queue
-7004829 mds: Consider stopping MDS when finding peer inode
-b8aeb76 mds: Don't drop client request from MDS
-60a5d78 doc: first draft of full OpenStack integration
-e2f6ae0 filejournal: check lseek() return value on darwin
-13b841c osdmap, mon: optional dump 'osd tree' in json
-14de7a5 client: Resolves coverity NULL dereference issue
-d250bb8 libcephfs: destroy cmount on ceph_shutdown()
-965ab90 filestore: check ioctl SYNC return code
-8237f68 obj_bencher: fix leak in error path
-709ff14 PG: assert auth is not end in _compare_scrubmaps
-7ca754b FileStore: copy paste error _do_copy_range
-106dc66 doc: Removed languages from librados in tech-specific stack diagrams.
-763ae7c doc: Added stack diagram for rgw. Noted NO MDS. Corrected namespace comment.
-2e78047 doc: Removed a setting we can ignore for now.
-c3f158f doc: Minor updates to filesystem settings.
-8799ef6 doc: Added journal settings to the config TOC.
-d962e89 doc: Completed a journal configuration reference. Journaler is separate.
-1166f3a Compatibility code for session authentication; mostly passing keys around to where they're needed.
-2b56e80 Code to allow pipes to be prepared to sign messages and to call the authentication methods for signing and checking.
-27974c4 Changes to cephx protocol to handle session authentication.
-cc5d05b Changes to existing None and Unknown authentication protocols to handle null session authentication.
-7cce4d4 Changes to basic authentication class to enable session authentication
-3548806 New documentation about Cephx protocol and session authentication.
-12bba4a OSDCap: parse spaces explicitly
-b57b86a test: remove commented out test cases
-32a6394 logrotate: check for executables to avoid cron errors
-2bf3f8c filestore: check lseek64 return value
-409fbb7 filestore: check ioctl WAIT_SYNC return value
-15ebc0f filejournal: check lseek64 return value
-ef393b5 mon: fix large pass by value
-5defa92 mon/PGMap: fix nearfull check
-72ca956 test_libcephfs: fix test
-7af24bb libcephfs: fix test workunit
-1ad339f mon: fix recovered_peon assert
-238b497 mon: debug recovered_{peon,leader}
-b8cbe26 mon: fix recovered_peon assert
-1708cf8 mon: debug recovered_{peon,leader}
-6f7067f mon: avoid large pass by value in MForward
-4878fdc mds: fix MDSCacheObject pin printer * logic
-a3e42d8 mdsmap: init fields in ctor
-1cebd98 mds: fix potential overflow
-694a4f0 mds: init atid in context
-18668ba mds: init log layout in MDCcahe ctor
-7594e9c mds: simplify get_dirfrag()
-bef66e0 mds: fix mlogger shutdown
-4aef86f mds: fix leak from get_current_dir_name
-c517fde librbd: simplify math
-7779901 mds: add assert to lock path
-816bb7e mds: fix uninit Dumper fields in ctor
-e9f350f mds: fix fd leak in dumper
-e604de1 mds: fix uninit Capability::last_issue
-82aeced mds: fix uninit field in CInode
-1acd109 mds: fix typo in rsubdirs warning
-310e486 mds: init CDir fields
-5e51f55 mds: avoid useless have_inode() call
-6047325 osd: pass by value
-af11531 osd: fix coverity NULL warning
-ada0db3 osd: logger is never NULL
-020856b osd/PG: remove redundant NamedState
-0769a1d osd: init all vars in PG::NamedState
-09f602d ceph tool: fix cli test
-7827c56 mon: fix uninit var warning in session startup
-f4c34c0 filstore: fix leak of fd in write error paths
-e0820d2 filestore: fix fd leak
-dfac9b3 mds: dentry always has dir
-d5f8e42 librbd: init value in CopyProgressCtx ctor
-e43f4ff librbd: fix overflow assert check
-5a0461a ceph tool: update url in man page
-f1f7ac7 ceph tool: document 'ceph osd map ...' command
-2e1ea3f OSDCap: parse 'pool=<poolname>' in addition to 'pool <poolname>'
-c925ce8 FileStore: use fresh vector for calls for listing collection
-67ab965 Makefile.am: recompile small file instead of libosd for unit test
-524a438 test: add more OSDCap unit tests
-142d902 OSDCaps: fix allow_all()
-3090366 OSDCap: fix output operators for caps
-47a2f41 OSDCap: fix typo in comment
-42a63f3 OSDCap: remove grants added during failed parsing
-e61b965 osdmap: restore stream format
-70e35ba cephtool: fix resource leak
-779e0f0 cls_refcount: fix uninit vals in ctor
-67cacee rados: fix error paths in do_put()
-903f60a osdmaptool: fix pg_t::parse() return value check
-d5b4f9a osdmaptool: check return values
-0b3c5dc objecter: fix dereference after null check
-b1d8513 objectcacher: fix uninit var in ctor
-62273b5 objectcacher: fix uninit it ctor
-e5103b4 objectcacher: avoid confusing coverity
-a1f9dbc journaler: uninit var in ctor
-7b90139 journaler: uninit var in ctor
-50460f9 filer: fix overflow
-d2cbe1f MOSDFailure: avoid big pass by value
-cb0d969 MMonJoin: avoid large pass by value
-e92b92b MRoute: avoid pass by value
-02e4839 messages: uninit values
-b5fb298 msg/Messenger: avoid large pass by value
-797d3cc msg/Accepter: check getsockbyname() return value
-ae1c38f LogEntry: fix uninit in ctor
-2381f12 utime: restore ostream state
-95dca98 stringify: use const ref
-884daeb addr_parsing: fix memory leak
-98da9f9 pidfile: fix fd leak from pidfile_remove()
-687d6d5 crushtester: fix uninit var
-b7cf603 crushtester: avoid divide by zero
-ffe0e09 crushtester: avoid divide by zero
-7490032 adminsocket: fix sock-fd leak in failure path
-af5f143 PrebufferedStream: avoid dereferencing end()
-cf6639a perfcounters: remove unused members
-5846e27 obj_bencher: protect with lock
-f577c82 obj_bencher: possible divice by zero
-ce06339 lockep: fix leak in failure/assert path
-4bd2799 ipaddr: fix buffer overrun on ipv6 prefix of 128
-6f89765 config: don't leak buf on dump config
-66f7c41 buffer: init data val in ctor
-05dc45f buffer: restore stream state after hexdump()
-9bd673f adminsocket: init vars in ctor
-dfb9488 adminsocket: change failure test
-3ec32c9 adminsocket: check return value
-73d8549 workqueue: reset heartbeat timeout under lock
-bdadc4e MemoryModel: init in ctor
-8d4e6e2 LogEntry: init in ctor
-6984037 doc: Added commentary for BMC and VLAN.
-3223b3d ceph.spec.in:  Build rpms with nss instead of cryptopp.
-53c1db9 vstart.sh: let you specific specific ip to bind to
-0ee6a95 doc: Added commentary for BMC and VLAN.
-cc4dcf6 test: add more OSDCap unit tests
-de6e0d8 OSDCaps: fix allow_all()
-e903ca7 OSDCap: fix output operators for caps
-1d747d1 OSDCap: fix typo in comment
-30e10a9 doc: RST cleanup for RPM dev package installs.
-2fc29fe doc: Removed old ops directory structure and redundant files.
-ff96789 client: add WARN_UNUSED_RESULT to client init func
-27c7c71 client: Remove unmaintained ldceph.cc from tree
-a1cfe74 client: Mods to fix #3184 for messenger shutdown
-1d231f9 Refresh manpages from .rst sources
-3c1e2e1 manpage-howto.txt: note that man/Makefile.am may need update too
-eb27f9a Add howto for changing man pages
-d37ca79 mon: update 'auth' help/usage
-1d552a4 rados: fix man page
-8740ddf doc: fix rpm url (part deux)
-6c5c939 librbd: fix includes for portability
-c9266d6 rgw: check that realloc succeeded
-4513397 ReplicatedPG: track incoming pushes with perf counters
-3f952af PG: explicitely delay ops on backfill_pos
-0a2f827 PG: last_complete might be outside of the log
-4c4c9d5 doc: fix rpm url
-214327e rgw: copy_object should not override ETAG implicitly
-25a9620 FileJournal: correctly check return value of lseek in write_fd
-303f640 OSDCap: remove grants added during failed parsing
-3144690 doc: fix injectargs syntax
-e488594 (tag: v0.52) v0.52
-9e9c5f2 osd: make 'pg <pgid> revert ...' command idempotent
-175465b cephfs:  Fix breakage of cephfs link
-8c3bfaa doc: update ceph-authtool man page
-3b0e120 doc: clarify rbd caching
-fa3a747 doc: fix typo in dev layering notes
-f0a5c56 doc: small fixes to the OpenStack page
-8964f10 doc: remove MDS from diagram describing RBD and OpenStack
-f586add doc: extend QEMU/RBD docs
-4ea9b9f doc: minor fixups to rpm install doc
-85b0151 doc: draft rpm installation
-cc9d7da cephfs: Fix warning - use err instead of errno
-e8c734b client:  Fix compile error: bad {0} initializers
-67535f2 rgw: different test for multi object delete
-cd15405 client: Fix coverity UNINIT_CTOR defects
-844ffd6 client: Fix coverity 716909 [FORWARD_NULL]
-68dea67 client: Add asserts for coverity bugs
-10186fe client:  Fixes coverity defect 716891
-7945f8b client:  Fixes coverity defect 716890 [DEADCODE]
-65700fc client: Coverity fixes for 716841-716844
-bc45cde cephfs:  Fixes for coverity bugs 716840 and 716970
-bba1766 rgw: copy_object should not override ETAG implicitly
-a9e3041 mds: Move check for empty path lookup to getattr
-c689556 PG, OSD: reject backfills when an OSD is nearly full
-a6b0d55 timer: add unsafe callbacks option
-5b232a6 doc: Fixed typo.
-9f6ee01 JournalingObjectStore: lock journal_lock at top of journal_replay
-e022585 FlatIndex: terminate dir_name buffer passed to strncpy
-d3bd9cb FileStore: uninit var in ctor OpSequencer::parent
-0e73313 FileStore: fix omap_store and dbomap leaks in mount
-3bef5eb FileStore: don't leak r in mount
-f9c5ac3 FileStore: fix fd and tmpfd leaks in _detect_fs()
-b99979c FileStore: fix leaked fd and check lseek in _test_fiemap
-620701d FileStore: fix filedescriptor leak in mkfs
-33f9618 FileStore: fix statfs,fstatfs,fstat ret val checks
-ea91ee5 FileJournal: uninit var in ctor aio_ctx FileJournal
-147e90c FileJournal: uninit var in ctor FileJournal
-8ec08c2 FileJournal: check return value of lseek in write_fd
-66b1eb2 rgw: better protocols separation
-35cd5f3 rgw: clean up ops initialization, completion
-47983df client: Fix for #3184 cfuse segv with no keyring
-f310a1c mds: fix ino release on session close
-26882da client: Put all libcephfs gtest tests into one bin
-c92e1dd mds: Handle empty relpath from client getattr
-5c8aea7 FileJournal: fix potential overflow in create()
-5bf6d22 FileJournal: fix memory leak in _open_file
-2455147 doc: Added an anchor to enable linking from CRUSH map section.
-c8be464 doc: Clarified descriptions, and improved IA and navigation.
-2b54391 client: Fix to client filepath initializing
-d5bcf41 mon: include auth mon's paxos version on latest gv calculation
-6b35b88 DBObjectMap::_get_header fix shadowed var causing dead code
-8a3efbb osd_types: uninit var in ctor pg_query_t
-3e4f379 osd_types: typo in object_info_t::decode for struct_v==6
-4f621a1 ReplicatedPG: add assert to snapset.clones search
-10e1ac7 PG: uninit var in ctor Scrubber
-8e214ed PG: big param passed by value, C_PGActivateCommitted
-7808e50 OSDMap: clear setprecision in print_osd_line
-c683fa8 OSD: big parameter passed by value, send_still_alive
-61545de librados: cleanup: use Mutex::Locker
-b581464 librados: protect lookup_pool, get_pool_name with lock
-681f614 mds: Adjust mydir auth when starting MDS that was stopped cleanly
-37881a3 mds: Fix SessionMap::is_any_state()
-cd78cd2 rbd: fix leak of dir handle in get_rbd_seq
-84fa74e rbd: fix leak of fd on error when reading an entire file
-2d44a1a rbd: fix leak of fd when importing an image from a file
-dd10b1e secret: close fd on error
-2371352 librados: always free buffer allocated by md_config_t::_get_val
-e6ced04 librados: fix use without NULL check in rados_pool_list
-f35ab0f librados: init everything in default IoCtxImpl ctor
-68b1fd6 rbd: make sure we have a device before trying to unmap
-399fc01 librbd: fix list for more than 1024 format 2 images
-52943a6 librbd: don't allow order to be more than 64
-74b85e7 librbd: use 64-bits to shift order
-11da12f librbd: init cookie in WatchCtx ctor
-404d45b librbd: init m_req in LibrbdWriteback::C_Read ctor
-38aeb00 librbd: initialize on-disk header in ImageCtx ctor
-efb2a57 librbd: init everything in default AioRequest constructors
-eccf60e librbd: fix coverity warnings for AioCompletions
-b841df0 doc: fix broken link in command reference
-24ef2ef librados: init all variables in ctors
-4015343 PG,osd_types,PGMonitor: make backfill state names more descriptive
-1fafd99 PG: add CEPH_FEATURE for backfill reservation
-3ebf52d doc/: added documentation for backfill_reservation
-796b9b6 osd/: add PG_STATE_BACKFILLING
-b54a0a2 osd/: add backfill reservations
-fa21924 test_librbd_fsx: add missing break statement
-c2cf8eb librbd: assert overflow will not happen
-e653816 rgw: url_decode should allocate extra byte for dest
-200ed2b mds: Adjust mydir auth when starting MDS that was stopped cleanly
-0571535 mds: Fix SessionMap::is_any_state()
-1747c1c rbd: fix leak of dir handle in get_rbd_seq
-55f7230 rbd: fix leak of fd on error when reading an entire file
-5b22c1d rbd: fix leak of fd when importing an image from a file
-2c1b7f2 secret: close fd on error
-4567a6d librados: always free buffer allocated by md_config_t::_get_val
-a677f47 librados: fix use without NULL check in rados_pool_list
-a5c7776 librados: init everything in default IoCtxImpl ctor
-ee1fe15 rbd: make sure we have a device before trying to unmap
-a204058 librbd: fix list for more than 1024 format 2 images
-7df76de librbd: don't allow order to be more than 64
-118c212 librbd: use 64-bits to shift order
-cd3d3aa librbd: init cookie in WatchCtx ctor
-073786e librbd: init m_req in LibrbdWriteback::C_Read ctor
-dea894d librbd: initialize on-disk header in ImageCtx ctor
-c1ffe08 librbd: init everything in default AioRequest constructors
-3486050 librbd: fix coverity warnings for AioCompletions
-86b3e8a OSD: add init and shutdown for OSDService
-e177680 librbd: ensure header is up to date after initial read
-5cba778 librados: note that watch's version param is ignored
-7782ccb doc: Added messaging section to ref. Placeholders. Definitions needed.
-8853469 doc: Added space for Emacs users.
-446e68c doc: Added journal section placeholders. Definitions needed.
-04ddd14 doc: Fixed hyperlink.
-abf1bf4 doc: Clean up and added placeholders for new definitions.
-78439e9 doc: Fixed hyperlink.
-873ccdf doc: Fixed hyperlink.
-441ae00 doc: Restored "Differences from Posix" to /doc/dev
-153fb3b doc: Adds package deps to list in README
-e32ee37 librados: cleanup: use Mutex::Locker
-d1de1f1 librados: protect lookup_pool, get_pool_name with lock
-720a301 mon: tolerate no session on no_reply()
-a794c93 ReplicatedPG: set op return version to pg version on ENOENT
-53b18e3 osd: catch decoding errors from client ops
-ef29d90 osd: some whitespace
-a73777a osd: return -EPERM on insufficient caps
-3b4f754 msg/Accepter: assert that listen_sd always >= 0
-f13eaf4 msg/Accepter: fix race in accepter shutdown
-0c7637d rgw: prepare_update_index should not error on system bucket
-9aa467d ceph-object-corpus: update with v0.52 objects
-58ad4dd uuid: include unistd to make encode testing work
-0c07607 qa: move all rados class unit tests into qa/workunits/cls
-420baa9 Makefile: rename test_rados_api_cls_lock -> test_cls_lock
-69743c1 vstart.sh: Alternative fix for vstart.sh -n
-c9e81fd Makefile.am: librdb_fsx test needs math library on some platforms
-93cd73f doc: link to full 0.48.2 changelog
-8276fa2 mds: Clean up finished two phase commits
-4d39553 cfuse: Define CEPH_INO_DOTDOT (3) for top-level parentdir
-671c4c3 ceph_common.sh: 'hostname -s' (instead of cut ...)
-51d5815 doc: v0.48.2argonaut release notes
-fd205da cfuse: Add the parent entry (..) for a top-level readdir
-d5a048c doc: Removed legacy doc. Not needed.
-9fa5720 doc: Removed legacy doc. Not needed.
-64198f8 doc: Removed legacy doc. Not needed.
-d50aab8 doc: Added enabling Swift access to rgw config.
-4958063 doc; Added troubleshooting to index.
-a83f503 doc: Copied contents of rgw troubleshooting over to the new ops section.
-280aeaf doc: Reverted so that we don't force yes or non-interactive.
-9c8061f doc: Removed legacy usage.
-b3651da doc: Cleanup, spell check, grammar check mostly.
-b311a40 doc: Updating the index to remove legacy and uneeded entries.
-5e9158e Fix description for --nodaemon
-0a83cb9 mon: clean up recovered_leader() checks
-50e7251d Abort on failure
-31f430a Fixup usage to reflect options available
-faddb80 Swap current dir (.) with CEPH_BIN for OOT builds
-0f7c516 Move keyring option to global section
-259fffbe mon: require MON_GV protocol feature
-879ce01 mon: move setting of ondisk GV feature into helper
-414cd1b mon: do not issue global versions if quorum does not support the feature
-3baae15 mon: set new incompat GV feature when paxos stabilizes for the first time
-db04ce4 mon: make MRoute encoding backwards-compatible
-e068bd7 rbd/copy.sh: fix typo
-ed43d4d rbd/copy.sh: fix typo
-7a3d1e6 librbd: bump version
-855dff6 cls_rbd: remove locking methods
-8f2a0d9 rbd: add locking commands
-b66ef43 qa: update rbd tests and runner
-3a9e665 librbd: use generic cls_lock instead of cls_rbd's locking
-69ee9af cls_lock_client: add ObjectOperation-based get_lock_info
-6dcbbbb cls_lock_types: add missing include
-67bbcf2 cls_lock_client: return error when decoding fails
-d1252ea cls_lock_client: fix indentation
-bf2e489 cls_lock_client: change modified reference parameters to pointers
-2dca3a8 cls_lock_client: clean up reference parameters
-e71fdc7 cls_lock: fix some spacing
-b69a959 cls_lock: specify librados namespace explicitly
-55673ba radosgw-admin: fix cli test
-3372f14 rbd: only open the destination pool for import
-ad2ba8e qa: test args for rbd import
-d14a31d rbd: make --pool/--image args easier to understand for import
-a583a60 librbd, cls_rbd: close snapshot creation race with old format
-a4833bb librbd: fix delete[]
-3401f00 doc: clarify rbd man page (esp. layering)
-582001e rbd: add --format option
-a112419 librbd: prevent racing clone and snap unprotect
-e85a238 rbd: add "children" command, update cli test files
-bd94058 librbd: add {rbd_}list_children() methods
-f6b2f79 mon: make heartbeat grace and down out interval scaling optional
-be50391 mon: add tunable to control laggy probability weighting.  simplify decoding.
-5499778 mon: apply grace period scaling to mon_osd_down_out_interval
-2ad62d5 mon: decay laggy calculations over time
-abd2ae7 mon: factor reporter lagginess into grace adjustment
-adf0fe6 mon: scale heartbeat grace based on laggy probability, interval
-3f51d31 mon: check failures in tick
-09b251c mon: clean up osd failure logging
-a3e8ed1 mon: reply to all reporters when an osd is failed
-7952c35 mon: locally apply osd heartbeat grace to failure checks
-3eb7341 mon: no_reply() to failure messages we don't reply to
-d328a28 mon: send 'null' reply to requests we won't reply to
-e06818b mon: refactor osd failure report tracking
-66f31c1 mon: adjust or decay laggy probabilities on osd boot
-e9f051e osdmap: include osd_xinfo_t to track laggy probabilities, timestamps
-b64641c osd: include boot_epoch in MOSDBoot
-4f1792d osd: include failed_for in MOSDFailure reports
-6f5c4a9 PG: need pg lock to read osdmap_ref
-59f8587 OSD: in enqueue_op, cannot read *pg since we don't hold the pg lock
-78a322b OSD: remove some commented out pg->unlock calls
-ed18eea :doc: Changed rados.gateway to radosgw.gateway. Start with /etc/init.d.
-900e4ce workqueue: allow thread pool size to be adjusted dynamically
-5e095ec :doc: Trimmed up the stack diagram and fixed a few hyperlink refs.
-5350830 :doc: Modified hostname to hostname -s.
-7c178be :doc: Modified hostname to hostname -s.
-5936ded :doc: Modified hostname to hostname -s.
-fa93ea1 rgw: fix unused warning message
-496c5d4 rgw: fix uninitialized var in error message
-6bc1ef0 rgw, cls_rgw: a tool to rebuild bucket stats
-11b80ae :doc: Changed title to RBD from RADOS. Clearer.
-9829039 :doc: Made notice to stop i/o a warning. Initial format clean up.
-84c50dd :doc: Added discussion and stack diagram. Initial format cleanup.
-171fcd8 :doc: Remove legacy usage. Initial format cleanup.
-08e9fc0 rgw: obj_stat() returns object version (epoch), use it
-15e97d7 cls_rgw: complete_op() only skip update if epoch is non zero
-3167228 cls_rgw: update index stats based on correct category
-0f82a39 rgw: fix suggested object size
-6a054ea rgw: set exists flag when suggesting existing bucket entry
-b12c147 cls_rgw: change scoping of suggested changes vars
-c11e05f test/rgw: add a test for index suggest
-1217538 cls_rgw: configurable tag timeout
-64b9a89 test/rgw: add bucket index unitest
-519ed24 cpeh.spec.in:  Don't package boto_tool.
-6ff23bb cls_rgw: client api for bucket index init
-b03adda cls_rgw: add client api calls for index suggest
-1bf345e doc/config-cluster/*: update recently added/changed config options
-91f3893 :doc: Title change for clarity. Initial formatting cleanup.
-88dd90e :doc: Removed old rec section.
-2f73c07 docs: add radosgw internals and usage testing section
-3369ea3 :doc: Notes to add data directory. Notes to address key with escape char.
-0398b9f :doc: Added note to clarify use of host=shortname.
-3d86194 :doc: Rewrote architecture paper. Still needs some work.
-fafb195 :doc: Removing old control.rst. New one is in ceph/docs/cluster-ops.rst
-f60ea38 :doc: Removing old init section.
-4f3642c rbd: only open the destination pool for import
-46883a5 ceph.spec.in:  Add new rados libraries, libcls_kvs.so and libcls_refcount.so.
-cb49823 osd: default journal size to 1 GB
-6b0c9ff filejournal: do not enforce that bdev size >= osd journal size
-de93044 remove obsync
-f1819f0 :doc: Changed from bullet list to section titles.
-18cf1b6 :doc: Usage consistent with Tyler's notes.
-da1a9f9 :doc: Corrected a path.
-00e58a5 :doc: Addresses DOCUMENTATION #3155
-4251d78 rgw: update cache interface
-6756f9a rgw-admin: add cluster info command
-7fe1f0b rgw: simplify create_pool
-ff0f88a rgw: store cluster params in a special object
-a150cf3 rgw: document how refcount objclass works
-539a8c7 cls_refcount: add a unitest
-93218ae rgw_rados: adjustments for refcount objclass
-cfe4830 rgw: set atomic context for copy operation src and dest
-3cd17fb rgw: copy of objects using refcount
-20c7852 rgw: use refcount put instead of obj delete where needed
-78d6a60 qa: test args for rbd import
-fd4b294 rbd: make --pool/--image args easier to understand for import
-0bf7723 doc: fix indentation
-cf6899d Adding RBD CLI test automation script, RbdLib and cephscrub.sh
-539786a osd: move permissions check into pg op thread
-221fc78 osd: drop unnecessary can_discard_request() in PG::queue_op()
-2223ac7 osd: introduce PG::_qlock to protect queuing
-1425281 mon: share quorum features on election victory
-ebdfd4b mon: refactor monitor feature checks
-e84f2e4 mon: move feature read/write into helpers
-fa86f7a mon: move start-up feature check into static helper
-4d333ad mon: track when peon paxos machines activate
-e91b16a mon: fix paxos completions
-85ed24a mon: share global version with proposal, collect, commits, slurp, etc.
-39e5138 mon: specify/allocate a global version at begin time
-f4210f8 mon: include global versions in paxos, slurp messages
-8619d87 mon: provide global paxos version helpers
-6a1d34a mon: allow all paxos instances to recover before going writeable
-247ba35 mon/MonitorStore: store global version (gv) alongside paxos values
-d697b54 test/rados-api/aio.cc: use read operation for omap cmp test
-c1372f9 osd/OSD.cc: Fix typo in OSD::heartbeat_check()
-e89cab6 osd/ReplicatedPG: set truncate_seq when handling CEPH_OSD_OP_APPEND
-c73c440 Makefile: rename 'core' -> 'base', add a few things
-24c3cae librbd, cls_rbd: close snapshot creation race with old format
-31560ca Rejig the way the shared libraries are processed so that manual postinst/postrm scripts are not required for lib* packages, ensuring that the .so's in the ceph package are not detected
-9474765 upstart: Give everything a stop on stanza.
-60e273a upstart: Start mds,mon,radosgw after a reboot.
-fb6c5c3 upstart: Use "ceph osd crush create-or-move".
-d8cb19d upstart: Add ceph-create-keys.conf to package.
-ced6c2c :doc: Fixed typo.
-de811db obsync: if OrdinaryCallingFormat fails, try SubdomainCallingFormat
-4e5283d ReplicatedPG: do not start_recovery_op if we are already pushing
-656ab15 osd: fill in user log entry last after snapdir tran
-a4fb9c1 :doc: Added tunables to cruch-map.rst.
-911433f :doc: Removed old pg tuning. New section was added.
-9256a29 :doc: Trimmed the old ops tree. Will remove when all porting verified.
-203ba59 :doc: Trimmed the tree for failures/troubleshooting. RGW remains.
-662fd03 :doc: removed. RBD now has its own section.
-e614100 mon: adjust number of req args for loc
-344fef7 mon: move loc map parsing into a helper
-50c957d crush: constify loc map arguments
-9636991 crush: add const string& versions of accessors
-babef41 doc/control.rst: add 'osd crush create-or-move ...'
-dd9819e doc: make note of crush usage change
-0817b94 mon: make redundant osd.NNN argument optional
-01a8146 ceph tool: add 'osd crush create-or-move ...' to help
-44fa233 :doc: Deleting this. Wrote a new one, but will be revised a bit soon.
-32f30f9 :doc: Removed old ops pool section.
-0313365 :doc: Removed old authentication section.
-d1053d9 :doc: Removed old resize OSD section.
-ad909f3 :doc: Removed old mon resize section.
-7d881dc :doc: Removed from old ops doc. Still needs to be composed though.
-bf342d1 :doc: New cluster ops section addresses the todo.
-e844989 :doc: Removed old OSD troubleshooting. New version to be updated shortly.
-72f802c :doc: Removed old monitor troubleshooting. New version to be revised shortly.
-fe609b7 :doc: Removed old mds troubleshooting. Still needs to be composed.
-a4733b8 :doc: Removed old cephfs disucssion.
-d4e00bc :doc: Trimmed toctree to last bits of legacy data.
-922c59f :doc: Updated FAQ with a friendlier message.
-f1b605c mon: parse '<id>' or 'osd.<id>' for 'osd crush create-or-move ...'
-1da73e5 mon: fail on trailing characters after parsing numbers
-b2409a2 mon: 'osd crush create-or-move <id> <initial-weight> <loc ...>'
-adedd6b crush: create_or_move_item()
-588b263 crush: get_item_weight[f]()
-f8d9f86 osdmap: 4 decimal places for osd tree
-d51d7b3 rgw: fix rgw_dir_suggest_changes() to set header_changed
-f8c365e rgw: add missing ret code check
-0cfac6d librbd: bump version
-d77205d objecter: remove the now-unused "registering" flag on LingerOps
-33def83 cls_rbd: remove locking methods
-eeaa92c rbd: add locking commands
-fd1c634 qa: update rbd tests and runner
-18427ec librbd: use generic cls_lock instead of cls_rbd's locking
-c4c4b20 rgw: encode total usage for backwards compatibility
-06290f6 rgw: configurable swift auth entry point
-03136d0 osd: fill in user log entry last after snapdir tran
-928865b PG: create macro for simple events
-e2129ab :doc: Fixed broken hyperlinks.
-9bbe73c :doc: Addresses Documentation #3096. Also added new information.
-793bebb rgw: rgw-admin filter usage by categories
-9d878bf gitignore: Remove "nbproject", no idea what that even is.
-ddaac56 rgw: usage now account categories
-a5b9ba7 rgw: fix usage
-3fed44a :doc: Minor tweak to heading text.
-6957ae7 :doc: Modified the index page to point to the new cluster-ops section.
-4ff60c7 :doc: Made minor changes to restructuredText headers.
-8fa81ab :doc: Added comment redirecting editors to new page location.
-c22ca72 :doc: Added index/toctree page for cluster ops.
-b8dfe82 :doc: Added new auth settings to reference doc.
-199dc5d :doc: Refactored and moved control.rst page.
-d90fea6 :doc: Consolidated file system recommendations.
-ab020da :doc: Minor syntax update.
-64b9e9f :doc: restructuredText syntax corrections.
-c94034a :doc: Added index page. This will be refactored again soon.
-32398f3 :doc: Refactored and moved to ceph/docs/cluster-ops/pools.rst
-c53a110 :doc: Removed. New section is in ceph/doc/cluster-ops/authentication.rst
-f1c869c :doc: Fixed heading syntax.
-78c844e PG: clear want_acting in choose_acting if want == acting
-5868b00 cls_refcount: a new class for objects refcounting
-df89c96 osd: initialize pg_log_entry_t::invalid_pool in default ctor
-3fd5914 doc: explain what scrub, deep-scrub, and repair actually do
-9013efd osd: deep scrub, read file contents from disk and compare digest
-a0b04bc buffer: class for efficiently calculating CRC32 of >= 1 bufferlist
-a08a28d pg: store scrubber state in its own object
-f504679 osd: chunky scrub, scrub PGs a chunk of objects at a time
-79b3054 crush: change default type from 'pool' to 'root'
-a83fb79 FileStore: get objects whose names fall within a range
-8bad708 pg: change _scrub() to take out parameters as pointers
-195eda6 Monitor.cc:  Added include for limits.h.
-2266876 :doc: Added a section for adding and removing monitors. Singificantly re-factored.
-c1ff83d :doc: Incorporated Joao's feedback into the reference material.
-0c78a03 docs: Add CloudStack documentation
-2b8690b :doc: Added recovering from OSD failures. Will be re-factored again soon.
-9db84be doc: Added monitor failure recovery. Will be re-factored again soon.
-6dff5d5 doc: Re-factored adding an OSD.
-32b44cb doc: Minor updates.
-d233271 doc: Added admonishments for Ceph FS per http://tracker.newdream.net/issues/3077
-4b774b6 doc: Updated to incorporate Sage's changes.
-327969c doc: Added anchor references.
-a50f73e doc: Refactored the debug section to point back to reference.
-31d6328 doc: Added QA reference to --valgrind option.
-ccfd841 Revert "ReplicatedPG: fill in user log entry last after snapdir tran"
-fd76083 rgw: use prefetched buffer even when ofs != 0
-4d2a05f rgw: implement user manifest (swift)
-40fd6ba OSD::handle_pg_stats_ack: grab pg refcount while processing pg
-0aad546 ReplicatedPG: fill in user log entry last after snapdir tran
-1db67c4 PG: In Active, don't transition to WantActingChange
-035cf96 msg/Pipe: kill useless onconnect arg
-31b1c2f doc: Added PG states.
-ef6814d doc: Promoting PG concepts into mainline docs. Redundant version still in Internals.
-25b7593 doc: New section on placement groups.
-3fcdbe4 doc: Moved from configuration to operations. Updated with new info.
-9da4966 doc: Created a more robust doc for monitoring a cluster.
-743e0b8 doc: Consolidated start and stop.
-3e56200 doc: Added a new "Data Placement" overview section for added continuity.
-2a1ac68 doc: Added a new CRUSH map section. Will need to incorporate new tunables info.
-fc093f8 doc: Moving new auth section from configuration to operations.
-e09b265 objecter: fix osdmap wait
-c1e000b doc: Fix leftover "localhost" mention.
-3302a2d doc: Added debug ref to toctree. Trimmed title names a bit.
-4609639 doc: Added "how to" for debug/logging config. Trimmed titles too.
-7465dbe doc: Added logging reference under configuration section.
-4ab9f02 msg/Pipe: do not special-case failure during connect
-7b6c773 doc: Added runtime configuration example.
-73d016f test, key_value_store: added distributed flat btree key-value store
-bfa9a59 vstart.sh: -r to start radosgw
-8578b21 cls_lock_client: add ObjectOperation-based get_lock_info
-e06031d cls_lock_types: add missing include
-8ac8177 osd: defer backfill with NOBACKFILL osdmap flag is set
-e920a61 Clarify CodingStyle with respect to tab compression of space runs Signed-off-by: Dan Mick <dan.mick at inktank.com> Reviewed-by: Greg Farnum <gregory.farnum at inktank.com> Reviewed-by: Josh Durgin <josh.durgin at inktank.com>
-fb37917 Fix rados put from '-' (stdin)
-49375a0 osd: pause/unpause recovery based on NORECOVER osdmap flag
-07ad925 osdmap: add NORECOVER flag
-0a28d79 osdmap: add NOBACKFILL flag
-b273c37 PG: do not update stats in ReplicaActive from info
-5ac52de crushtool: Miscellaneous cleanup.
-fd4d567 osd/osd_types.h: fix pg_history_t::merge copy paste error
-84216d5 osd/Watch.h: uninit var in ctor Watch
-75acb7b osd/ReplicatedPG.h: uninit var in ctor RepModify
-0e2efbc osd/ReplicatedPG.h: uninit var in ctor OpContext
-f30faca osd/ReplicatedPG: pass PGPool to ReplicatedPG ctor by ref
-6fbf9e6 osd/PG.h: uninit var in ctor NamedState
-471787f osd/PG.h: uninit var in ctor OndiskLog
-f84e776 osd/PG.h: uninit var in ctor IndexedLog
-1063673 osd/PG.cc: PG constructor pass PGPool by reference
-9a93eb3 osd/OpRequest.h: uninit vars in ctor OpRequest
-d41c253 osd/OSDMap.cc: uninit vars in ctor struct qi
-d235626 osd/OSD.h: big parameter passed by value, publish_superblock
-db9e120 osd/OSD.cc: OSD::shutdown() leaks lock
-b041260 osd/ClassHandler.cc: uninit var in ctor
-e0b8cb7 osd/ClassHandler: uninit var in ctor
-50ed1fc monclient: uninit var in ctor
-0b4ddc2 mon/MonitorStore: uninit var in ctor
-89add0f paxos: init vars in ctr
-ea078e1 msg/DispatchQueue: simplify shutdown()
-b7af8d8 msg/Message: fix possible null deref
-650ec35 msg: pass by reference
-a3bf558 fix accepter bind fix
-4eb3146 msg/Accepter: move nonce init to ctor
-46c08d6 log: protect m_stop with lock
-f51f568 common/LogEntry: pass by value for contains()
-929892f LogEntry: pass by reference
-ec5133b msg/Pipe: make banner buffer slightly bigger
-b960c62 librbd: fix delete[]
-08a29f9 ceph-dencoder: don't leak object
-7cb3d2e auth: fix uninit vars
-3fd13f5 crypto: fix fd leak from get_random_bytes()
-1b1a0bf msg/Accepter: check setsockopt return value
-484fd0c mds: fix broken EMetablob inode_t* return value
-139ba9f client: unconditional teardown
-532d1b1 rgw: init RGWRados::cct in ctor
-c67eda2 rgw: init RGWGetObj::sent_header in ctor
-757457a rgw: init ptr
-ca4e060 rgw: add missing ctor, init parent
-2214e83 omap_bench: fix uninit var
-2037212 test/osd/RadosModel: uninit value
-26a822b test/osd/RadosModel: fix uninit value
-7c10bdc test/osd/RadosModel: fix uninit values
-8d9d4f6 test/osd/RadosModel: fix uninit ptr
-1247d4d test/rados-api/aio: fix uninit ptr
-220980c cephtool: fix uninitialized scalar in constructor
-998e207 test/Object: comment out dead code
-97bd084 mds: fix unused value
-b9adc27 mds: drop unused value
-1355a67 filer: add missing return
-a6dfa3e rgw: fix use-after-free
-ec0a266 test_librbd: add missing va_end()
-dd4b9ca cls_lock_client: return error when decoding fails
-1779d5a cls_lock_client: fix indentation
-b4298fc cls_lock_client: change modified reference parameters to pointers
-9c6752e cls_lock_client: clean up reference parameters
-3de0d4a cls_lock: fix some spacing
-649bdc1 doc: clarify rbd man page (esp. layering)
-dcbb87c rbd: add --format option
-1b27a7c client: renew/submit subs on startup
-f85863e objclass: add remove operation
-a23351e :doc: Added constraints and revised a description per joshd.
-f2c4510 upstart, ceph-create-keys: Make client.admin key generation automatic.
-0de7195 upstart: Make instance jobs export their cluster and id variables.
-3b0e2a2 config: Add a per-name default keyring to front of keyring search path.
-8b4a9ad doc: Modified index page with table. Pools and Auth will go to Ops.
-b961a66 doc: Some improvements. This still needs review.
-c41fa39 doc: Added additional note to mount data disk to data path.
-b80a1b7 doc: Added a document for general config settings.
-2407b0c doc: Added a doc for filestore settings.
-17dee29 doc: Added a document for RBD cache settings.
-69e1016 doc: Added substantial detail to OSD setting descriptions.
-c0c9fe5 doc: minor edit to use # for comments.
-98eaacc doc: Restructured ceph config. Added network and OSD config details.
-3c9bc47 librbd: prevent racing clone and snap unprotect
-465fcca rbd: add "children" command, update cli test files
-78f6975 librbd: add {rbd_}list_children() methods
-ac481e8 rgw: cleanup create_bucket
-ef92157 rgw: remove static store object
-be00f9b rgw: pool names are not global
-ed8922d rgw: RGWRados holds domain root info
-f71a416 rgw: rgwstore is not global
-4d9802c rgw: remove unused block of code
-e3834f0 rgw_admin.cc: Prevent clobbering the index when linking a bucket.
-82c62bd rgw: clear usage map before reading usage
-5f36b8d osd: fix waiting_for_disk assertion
-745a3c9 rados_bench: wait for completion callbacks before returning
-dfb7f80 Makefile.am: add missing .h
-2d79a62 rados_bench: wait for completion callbacks before returning
-a7867c2 doc: Completed and reviewed RGW config reference.
-8d7912c doc: added admonishment. Updated header syntax, copy semantics and x-ref.
-5507665 rgw: fix usage log read
-3eea910 doc: Added internal references. Clarified language in disk prepare.
-a466dff doc: added sudo for hdparm command.
-080e572 doc: added internal hyperlink targets.
-dd011ab doc: Clean up quick start to ensure nobody uses "localhost".
-9755466 doc: Cleaned up syntax errors, and converted table to list.
-2a3b796 objecter: fix skipped map handling
-8d1efd1 objecter: send queued requests when we get first osdmap
-e59b9da objecter: fix is_latest_map() retry on mon session restart
-7d40cba monclient: pass EAGAIN to is_latest_map() callers
-0adc228 monclient: document get_version(), and fix return value
-0a1f4a9 Implement multi-object delete.
-17ceec0 osd: requeue dup ops inline with in-progress ops
-d5cacac osd: include notif pointer in notify debug output
-0a2ec98 config: add 'fatal signal handlers' option
-bc90c9a test/: renamed omap_bench.hpp to .h, fixed histogram formatting
-aaeb551 librados,ReplicatedPG: add omap_cmp
-7a631f9 cls_rgw_client: fix #include path
-6f68ff5 cls_rgw: add cls_rgw unitest, test gc api
-a30f714 rgw-admin: get rid of lazy remove option, other fixes
-721a6be rgw: implement garbage collector
-bd534bf mon: make parse_pos_long() error message more helpful
-c7d11cd osd: turn off lockdep during shutdown signal handler
-c03ca95 (tag: v0.51) v0.51
-aa91cf8 mon: require --id
-5fd2f10 mon: fix int parsing in monmon
-31c8ccb mon: check for int parsing errors in mdsmon
-304c08e mon: check for int parsing errors in osdmon
-3996076 interval_set: predeclare const_iterator
-ef4ab90 Makefile: update coverity rules
-6b1f23c librbd-dev.install: package new rbd/features.h header file.
-d9bd613 mon: describe how pgs are stuck in 'health detail'
-bcd4b09 osd: fix use-after-free in handle_notify_timeout
-e97f1c5 ceph.spec.in: package new rados library.
-551628e obj_bencher: use async remove during slow remove-by-prefix
-4bef576 obj_bencher: remove all benchmark files matching a prefix
-048c7dc obj_bencher: cleanup files in parallel using aio
-9e58d1b obj_bencher: remove benchmark objects by prefix
-fab73c3 obj_bencher: store per-benchmark metadata
-fb7238e obj_bencher: clean up objects after a write benchmark
-4f1b04c obj_bencher: announce prefix during write benchmark
-e43ba81 Don't package crush header files.
-1cd89d1 ceph.spec.in:  package new rbd header and rados library.
-e229f84 msg/Pipe: conditionally detect session reset
-1c3111f osd: prefer acting osds in calc_acting()
-af15ba6 librados: implement aio_remove
-fed8aea rbd: force all exiting paths through main()/return This properly destroys objects.  In the process, remove usage_exit(); also kill error-handling in set_conf_param (never relevant for rbd.cc, and if you call it with both pointers NULL, well...) Also switch to EXIT_FAILURE for consistency.
-f0e746a mon: name cluster uuid file 'cluster_uuid'
-cada8a6 objecter: use ordered map<> for tracking tids to preserve order on resend
-91d5c19 Don't package crush header files.
-4905c06 mon: create cluster_fsid on startup if not present
-7fde8e9 mon: create, verify cluster_fsid file in mon_data dir on mkfs
-b207b15 cephfs: add 'map' command to dump file mapping onto objects, osds
-0f9f63a perf-watch: initial version
-1113a6c objecter: use ordered map<> for tracking tids to preserve order on resend
-a5901c6 doc: Either use a backslash and a newline, or neither.
-ec90d3f cls_rgw: add gc commands handling
-e4a78d2 config_opts: add gc configurables
-7dd5d06 cls_lock: specify librados namespace explicitly
-eda5a76 cls_rgw: cleanups
-e7c492b mon: implement 'ceph report <tag ...>' command
-8f95c1f config: remove dead osd options
-bfb24a7 Fix compilation warnings on squeeze; can't printf() snapid_t directly
-bb1e65e rgw: use sizeof() for snprintf
-4a0704e osd: fix requeue order for waiting_for_ondisk
-1a09423 rgw: dump content_range using 64 bit formatters
-ddbef47 Revert "rgw: dump content_range using 64 bit formatters"
-2e8689a mon: fix monitor cluster contraction race
-81694c3 Add manpage sections for flatten, snap {un}protect
-6a9bcc0 mkcephfs, init-ceph: Warn if hostname "localhost" is seen in ceph.conf.
-5ad013b "Removed 274 from xfstests"
-5642a5e test_rbd.py: remove clone before image it depends on
-cc435e9 rgw: dump content_range using 64 bit formatters
-dd4c1dc osd: fix requeue order of dup ops
-6ae216e osd: fix warning
-60fdb6f init-ceph: use SSH in "service ceph status -a" to get version
-5c70392 doc: mkcephfs man page, -c ceph.conf is not optional
-7e417bd osd: make notify debug output less noisy
-5e761b4 mds: do not return null dentry lease on getattr
-19ea312 mon: add MonitorStore::sync()
-223d6fa crypto: cache CryptoHandler in CryptoKey
-cfe211a doc: fix key export syntax
-f965358 Roll up loose ends from a marathon merge/rebase session
-380b047 Review:
-5a295c8 librbd: snap_protect: verify layering is supported
-2b6863e librbd: review: don't call to the OSD to get current protection status
-f38dd48 test_rbd.py: actually make unprotect_with_children work, and clean up
-491bd8d librbd: change EINVAL to EBUSY on "can't unprotect because children exist" Add pool, number of children in this pool that caused failure to log
-ff60940 review: librbd, test_librbd: make "protect protected snap" fail
-e21bac9 Update protection methods to use parent_spec, parent_types.h, etc.
-bd2e751 test_rbd: add test for denying removal of protected parent
-bef9180 get_features requires md_lock and snap_lock to be held
-c729e15 librbd: clone return codes: ENOSYS for no layering, EINVAL for no prot
-27a4dea librbd, test_librbd: snap_unprotect: refuse if children still exist
-460242d test_cls_rbd: get_parent with no parent: should fail and return null-pspec
-1b32d78 librbd: cause add_child/remove_child to treat duplicate ops as errors
-53868a9 librbd: review: add helper for 'scanning snapshots for this parent'
-2ca8fb2 librbd: review: change get_snapinfo to get_parent_spec
-31824b6 librbd, cls_rbd: move parent_info and parent_spec to parent_types.h
-9a45ffb librbd: memcpy object_prefix must copy terminating NUL
-c0c29f8 librbd: remove: keep ictx open until snapshots are scanned
-2382425 Review: change to look for parent across base and all snapshots, and remove only if not present in any of them.
-dc1e26f Enhance add/remove child tests
-f1fc2b4 get_parent on non-layered image no longer fails; remove test case
-d09e0e2 Add struct parent_spec Holds poolid,imageid,snapid triple identifying parent Allows for equality comparison of parents
-80d4d38 poolid should be signed
-a09052f run-rbd-tests: prefer local binaries over $PATH
-fd60416 librbd: snap_set and open_image need to refresh parent info
-2dc751e librbd: Manipulate rbd_children in flatten, clone, remove, snap remove
-397285a librbd: make get_parent_info look at snapshot-specific info when needed
-cb74233 Fix some trailing spaces on lines
-767fdf1 rados: allow listomapvals to dump keys with nonprintable characters
-93fed22 cls_rbd, cls_rbd_client: add/remove/get children
-fefdf28 rbd: warn on 0-length secret
-4ce0a51 doc: properly document 'rbd map' without touching sysfs
-b403db1 rbd: update man page to avoid deprecated --secret, --user
-2a36873 rbd: use generic options, keyring for 'rbd map'
-e0b094b keyring: make --key, --keyfile override loaded keyring
-7b57931 config: make --user a synonym for --id
-b2d6ea7 librbd: add test for discard of nonexistent objects
-a3ad98a librbd: hide ENOENT on discard
-7141a6c msg/Pipe: log port number
-1daeb2d cpu_profiler: drop start, stop commands
-d01c126 crypto: remove old crypto globals
-2bca756 doc: small RST syntax fixes for eu.ceph.com mirror
-35004bb docs: Add EU mirror for getting Ceph source and packages
-476e493 ceph-fuse: debug off by default
-107ffc6 auth: move Crypto users to use CephContext
-9b7482f auth: move Crypto{None,AES} definitions to header
-becf206 osd: avoid dereferencing pg info without lock
-130b559 mutex: add is_locked_by_me()
-da48658 run-cli-tests: Check that virtualenv is found.
-ef80abe msg/SimpleMessenger: fix leak of local_connection
-34d626d test_librbd_fsx: fix leak
-6e44e9e SyntheticClient: fix warnings
-aaf0123 librbd: make aio_discard declaration match definition
-7f4851c librbd: fix uninit var new_snap in ictrx_refresh()
-cfd0d4f librbd: fix warning
-17e9414 heap_profiler: return result via ostream
-79bdcbe cpu_profiler: outout to ostream instead of clog
-35753eb osd: avoid generate huge osdmap deletion transactions
-8a4d563 osd: break potentially large transaction into pieces
-e908cb9 osd: only commit past intervals at end of parallel build
-da210be osd: explicitly requeue waiting_for_map in on_change()
-fac699c osd: simplify how in-progress ops are requeued
-1045472 osd: rename op_waiters -> waiting_for_map
-9fd7d4d mds: fix some gcc 4.7 warnings
-407c350 crypto: remove unused label
-5bbd5dc do_autogen.sh: -n for nss
-19063aa byteorder: fix gcc 4.7 warnings
-8555875 do_autogen.sh: apply 'profiler' options to CXXFLAGS, too
-3e50a09 do_autogen.sh: -p to pass --with-profiler to configure (google cpu profiler)
-5962a9d obsync: add missing package specifier to format_exc
-dc76a6c ceph-fuse: add --fuse-debug option to enable libfuse debugging
-a15fde4 fix keyring generation for mds and osd
-36e7b07 fix ceph osd create help
-c6ae5e2 objectcacher: fix bh leak on discard
-77745f9 mkcephfs: fix mon data empty check
-3e7df78 PG,Message: move intrusive_ptr_* into top namespace
-614417e mon: make 'clocks too skewed' message for accurate
-24a26c62 mkcephfs: fix mon_data check
-3d3d91d osdmap: apply mon_max_osd when generating osdmap from conf
-1a5e12e osdmap: fix pg_num calculation when generating osdmap from conf
-cca85af global: only print banner if type is daemon
-615f85d mon: throttle daemon messages independently from client messages
-9fc7958 filejournal: instrument journal write counts, sizes
-2f3e03f perfcounters: add u64 average type
-1eea43d global: fix version banner in log on startup
-3267127 doc: document use of CRUSH tunables
-b254ba7 mon: require CRUSH_TUNABLES when latest osdmap has tunables set
-3dd5ebd osd: require CRUSH_TUNABLES feature of peers, clients when used
-43f7d37 osd: put throttler on default policy
-da35b4c msgr: make set_policy_throttler safe, act on default
-73218a7 msgr: make set_policy() and set_default_policy() safe to re-use
-5ab4939 doc: v0.48.1argonaut release notes, changelog
-75172c7 msg/Accepter: fix nonce initialization
-294c25b ceph-osd: log journal-creation failure with derr
-8af2cf3 msgr: expose get_policy() through generic Messenger API
-1740bd0 crush: add helper has_nondefault_tunables()
-c8af0fa cephtool: make command wait for osdmap explicit
-a4428bd (tag: v0.50) v0.50
-ac02b34 msg/Pipe: discard_queue() -> discard_out_queue()
-d58df35 msg/Pipe: simplify Pipe::tcp_read() return value
-76954c1 msg/Pipe: document tcp_*()
-5d5045d msg/Accepter: use learned_addr() from Accepter::bind()
-1b8f2e0 msg/SimpleMessenger: push need_addr check into learned_addr()
-8453a81 msg/Accepter: pass nonce on start
-a0017fc msgr: protect set_myaddr()
-c84b728 msg/Accepter: make members private
-608c776 msgr: remove useless SimpleMessenger::msgr
-b97f6e3 msgr: some SimpleMessenger docs
-8c1632b cephtool: send keepalive to tell target
-90e0ef9 cephtool: retry 'ceph tell <who> ...' command if connection fails
-ee206a5 cephtool: set messenger policy
-b30ad9a cephtool: fix deadlock on fault when waiting for osdmap
-ce0bc11 rbd: show snap protection status
-98286b4 MonMap: return error on failure in build_initial
-5c116bf addr_parsing: report correct error message
-1fd7acd rbd: fix test compilation on 32-bit
-be6b5e1 test_librbd_fsx: fix warning
-4d71ca6 rbd: fix cli tests
-677934b rgw: modify some error messages
-b28db08 rgw: use multiple notification objects
-b15d639 radosgw-admin.rst: Misc doccumentation update.
-45f7f06 rgw_admin.cc: Allow removal of a user's buckets during user removal.
-53d7750 librados: add method to get the fsid of a cluster
-cd5d724 librbd: fix memory leak on error in clone
-c77f0fb rbd: add snap [un]protect commands
-8d5f1e9 librbd: add methods for protecting/unprotecting snapshots
-cc8eac2 rgw_admin.cc: Allow for deletion of objects through radosgw-admin.
-f9359f0 doc: New example usage.
-6bc1067 rgw: fix usage trim call encoding
-04a0eac cls_rgw: fix rgw_cls_usage_log_trim_op encode/decode
-3499c0e cls_rbd: add methods for getting/setting protection status
-074c3c0 rgw: expand date format support
-d39ea1d rgw: complete multipart upload can handle chunked encoding
-03b787e rgw_xml: xml_handle_data() appends data string
-3809e34 rgw: ETag is unquoted in multipart upload complete
-52f03dc doc: Added debug and logging reference.
-d78dfe5 mkcephfs: use default osd_data, _journal values
-3c90ff4 mkcephfs: use new default keyring locations
-c03f744 keyring: make from_ceph_context() a member
-ece78c8 doc: some basic cephx documentation
-69130d7 monclient: move keyring requirement where it belongs
-35e79f2 keyring: simplify from_ceph_context()
-ac9d429 keyring: simplify from_ceph_context() arguments
-5e13fd6 keyring: check client requirement list too when loading keyring
-e536889 monclient: differentiate clients vs daemons
-e4e4882 mon: differentiate cluster and client auth requirements
-d5704bd buffer: make release() private
-bf4c5e7 mds, osd: require auth_service_required, if defined
-4fd393f librbd: fix bounds of memcpy in info()
-d48d1ff test_librbd_fsx: add cloning
-745783c librbd: expose feature bits through librbd.h
-12e2070 librbd: close parent after shutting down cache
-9bf3d48 librbd: move flush on new snap outside of snap_lock
-53947ed librbd: check new snapc for validity, not the old one
-965271d test_librbd: add a simple io to clone test
-12c9a7d test_rbd.py: refactor cloning tests
-beccac9 librbd: don't open parent again during get_parent_info
-90dc565 librbd: implement read/write from parent images
-4329195 rados.py: add binding for rados_trunc
-3671a37 doc: Explicitly state mount.ceph two first arguments are fixed.
-17ad4e1 doc: mount.ceph is also needed for cephx.
-c961a20 doc: Fix toctree structure for man obsync(1).
-5db3a9e rgw_admin.cc: Disallow addition of S3 keys with subuser creation
-4e40a78 ceph-authtool: Fix usage, it's --print-key not --print.
-25de5e5 Revert "osd: peering: detect when log source osd goes down"
-203dffa doc: cd to repository before running git status.
-48de9b5 doc: Say what to do if submodules are out of date.
-93cbab7 doc: Simplify submodules explanation.
-6af560d doc: Correct Git URL for clone
-0d3d75e osd: peering: detect when log source osd goes down
-ca2c381 osd: peering: detect when log source osd goes down
-bb6e0d0 wireshark: update patch
-deec81b ReplicatedPG: clear waiting_for_ack when we send the commit
-f22b95d rbd: fix off-by-one error in key name
-e775ce5 secret: return error on empty secret
-cda5e8e PG,ReplicatedPG: clarify scrub state clearing
-6d464a2 PG::mark_clean(): queue_snap_trim if snap_trimq is not empty
-1041b92 ReplicatedPG::snap_trimmer: requeue if scrub_block_writes
-c6bc3e1 librbd: refactor synchronous I/O
-ff2a96c rbd: fix copy-pasted snap remove error message
-ea75d1f librbd: check for new snapshots in snap_set
-bd11990 librbd: add method to get the size of an image
-72dc665 librbd: make ImageCtx methods take snap_id parameters
-902bbd7 cls_rbd: don't duplicate encoding
-4111501 qa: add script to run rbd/librbd tests
-9071764 qa: remove rbd image when done
-d3b5ee7 librbd: split into multiple files
-237f240 rbd: flatten command (copyup an entire image)
-bbc2a4e librbd: round #blocks in image_info() for edge cases
-26ed384 librbd, rbd.py, test_rbd.py: flatten methods
-9e5d4e6 osd: initialize send_notify on pg load
-f9ff8dd osd: replace STRAY bit with bool
-8e40477 test: test_keyvaluedb_iterators: Test KeyValueDB implementations iterators
-9dd8a33 os: KeyValueDB: implement snapshot iterators
-fb1d549 os: KeyValueDB: re-implement (prefix) iter in terms of whole-space iter
-effdec9 auth: introduce cluster, service, and client auth settings
-ec6ecc1 auth: AuthSupported -> AuthMethodList
-4a0a7e2 auth: (ordered) list of auth methods, not a set
-9d43c8a test: workloadgen: Don't linearly iterate over a map to obtain a collection
-bae8370 osd: peering: make Incomplete a Peering substate
-d1602ee osd: peering: move to Incomplete when.. incomplete
-d612694 config: send warnings to a ostream* argument
-de4474a vstart.sh: apply extra conf after the defaults
-bbc4917 msg/Pipe: if we send a wait, make sure we follow through
-6c01d46 client: handle fault during session teardown
-a879425 msg/Pipe: make STANDBY behavior optional
-f69d025 conf: make dup lines override previous value
-4dfc14c mon: remove superfluous "can't delete except on master" comments
-5f3ef77 mon: make pool snap creation ops idempotent
-53aa959 objecter: return ENOENT/EEXIST on pool snap delete/create
-507f99e librados: make snap create/destroy handle client-side errors
-3715d20 mon: check for invalid pool snap creates in preprocess_op, too
-640e5fd qa: simple tests for 'ceph osd create|rm' commands
-6f7837a mon: make 'osd rm ...' idempotent
-4788567 qa: simple test for pool create/delete commands
-a01e22d mon: make pool creation idempotent
-5503376 mon: make pool removal idempotent
-597f14a objecter: make pool create/delete return EEXIST/ENOENT
-358d6b6 librados: make pool create/destroy handle client-side errors
-46e819e objecter: fix mon command resends
-c2e1c62 mutex: assert we are unlocked by the same thread that locked
-6ec9555 cond: reorder asserts
-9553c6e osd: fixing sharing of past_intervals on backfill restart
-29aa1cf filestore: check for EIO in read path
-0891948 filestore: add 'filestore fail eio' option, default true
-aef10e7 librbd: fix id initialization in new format
-17bb78a librbd: fix id initialization in new format
-5601ae2 mon: set a configurable max osd cap
-bcb9ab8 doc: updates to fix problem with ceph-cookbooks appearing in chef-server.
-9767146 osd: generate past intervals in parallel on boot
-d45929f osd: move calculation of past_interval range into helper
-18d5fc4 osd: fix map epoch boot condition
-11b275a osd: avoid misc work before we're active
-278b5f5 mon: ignore pgtemp messages from down osds
-08e2eca mon: ignore osd_alive messages from down osds
-404a7f5 admin_socket: json output, always
-0133392 admin_socket: dump config in json; add test
-0ef8cd3 config: fix 'config set' admin socket command
-f565ace osd: fix pg log zeroing
-d67ad0d Wireshark dissector updated, work with the current development tree of wireshark. The way I patched it is not really clean, but it can be useful if some people quickly need to inspect ceph network flows.
-52f51a2 wireshar/ceph/packet-ceph.c: fix eol
-a3d57a6 os: KeyValueDB: Add virtual raw_key() function to return (prefix,key) pair
-a16d9c6 os: KeyValueDB: allow finer-grained control of transaction operations
-6c0fa50 doc: update information about stable vs development releases
-48bd839 librbd: replace assign_bid with client id and random number
-67832c3 osd: fix ACK ordering on resent ops
-96dbc41 rados::cls::lock: move api types into namespace
-ca6265d (tag: v0.49) v0.49
-c8f1311 mon: make 'ceph osd rm ...' wipe out all state bits, not just EXISTS
-f42e187 cls_rbd, cls_rbd_client, test_cls_rbd: copyup method
-127ff61 librbd: drop unnecessary std:: and struct prefixes
-c18c4b8 librbd: open parent image when opening a child
-b82f595 librbd: move all side-effects to snap_{un}set()
-8014d93 librbd: allow opening an image by id
-df71c2d librbd: store parent info in snapshot metadata
-233d44a librbd: allow an image to be opened without watching
-4af1f98 librbd: move watch/unwatch to ImageCtx methods
-02aba7b librbd: rename variables for more consistency
-56bc369 cls_rbd: make get_parent return valid data when layering is disabled
-d5e4541 cls_rbd: return negative pool id if parent does not exist
-9b9efe7 cls_rbd_client: fix locking function indentation
-5fcb22f mkcephfs: add sync between btrfs scan and mount
-2d7e2cb crush: fix name map encoding
-b497bda osd/OpTracker: fix use-after-free
-7cf1f1f msg/Pipe: go to STANDBY on lossless accept fault
-ef3fd1c msg/Pipe: go to standby on lossless server connection faults
-9348bb3 osd: reopen heartbeat connections when they fail
-ea7511b msg/Pipe: fix leak of Connection in ctor
-60eb36e msgr: close get_connection() race
-04fde51 msgr: drop CLOSED checks during queueing
-adce6df msgr: simplify submit_message()
-2e67b7a msgr: do not reopen failed lossy Connections
-9a4e702 msg/Pipe: unregister pipe immediately on fault; fix mark_down
-541694f msg/Pipe: disconnect Pipe from lossy Connection immediately on failure
-cef8510 msg/Connection: add failed flag for lossy Connections
-472d14f msg/DispatchQueue: fix locking in dispatch thread
-9d94ed1 test_stress_watch: verify that the watch operation isn't slow
-7b398a5 msgr: indicate whether clients are lossy
-525830c msgr: do not discard_queue in Pipe reaper
-8966f71 msg/IncomingQueue: make the pipe parent informational only
-999c506 msg/DispatchQueue: give IncomingQueue ref to queue
-5a62dfe msg/DispachQueue: hold lock in IncomingQueue::discard_queue()
-35b7bca msg: kill tcp.{cc,h}
-5ecc5bc msg/DispatchQueue: cleanup debug prefix
-89b07f4 msg/Pipe: move tcp_* functions into Pipe class
-d034e46 msgr: move Accepter into separate .cc
-3e98617 msg/Pipe: get_state_name()
-f78a401 msgr: rework accept() connect_seq/race handling
-a6735ab OpRequest,OSD: track recent slow ops
-9e207aa test/store_test.cc: verify collection_list_partial results are sorted
-49877cd cls_lock: cls_lock_id_t -> cls_lock_locker_id_t
-315bbea cls_lock: document lock properties
-056d42c cls_log: update a comment
-2c7d782 rados: lock info keeps expiration, not duration
-d16844c rados tool: add advisory lock control commands
-2f8de89 cls_lock: objclass for advisory locking
-9c5c3ed objclass: add api calls to get/set xattrs
-adc9b91 os/HashIndex: use set<pair<string, hobject_t>> rather than multimap
-0b84384 mon: shut up about sessionless MPGStats messages
-6580450 osd: clean up boot method names
-369fbf6 osd: defer boot if heartbeatmap indicates we are unhealthy
-dec9369 osd/mon: subscribe (onetime) to pg creations on connect
-7f58b9b mon: track pg creations by osd
-4c6c927 Revert "rbd: fix usage for snap commands"
-42de687 rbd: fix usage for snap commands
-58cd27f doc: add missing dependencies to README
-6f381af add CRUSH_TUNABLES feature bit
-e3349a2 OSD::handle_osd_map: don't lock pgs while advancing maps
-c8ee301 osd: add osd_debug_drop_pg_create_{probability,duration} options
-8f5562f OSD: write_if_dirty during get_or_create_pg after handle_create
-ca9f713 OSD: actually send queries during handle_pg_create
-5dd68b9 objecter: always resend linger registrations
-76efd97 OSD: publish_map in init to initialize OSDService map
-7586cde qa/workunits/suites/pjd.sh: bash -x
-675d630 ObjectCacher: fix cache_bytes_hit accounting
-4e1d973 doc: Fixed heading text.
-ebc5773 doc: favicon.ico should be new Ceph icon.
-3a377c4 doc: Overhauled Swift API documentation.
-d78235b client: fix readdir locking
-82a575c client: fix leak of client_lock when not initialized
-90ddc5a OSD: use service.get_osdmap() in heartbeat(), don't grab map_lock
-58e81c8 OSD: handle_osd_ping: use service->get_osdmap()
-32892c1 doc/dev/osd_internals: add newlines before numbered lists
-fe4c658 librados: simplify locking slightly
-199397d osd: default 'osd_preserve_trimmed_log = false'
-24df8b1 doc/dev: add osd_internals to toc
-5a27f07 doc/internals/osd_internals: fix indentation errors
-6490c84 doc: discuss choice of pg_num
-36d0a35 log: simplify log logic a bit
-96587f3 Robustify ceph-rbdnamer and adapt udev rules
-b046549 doc/radosgw/config.rst: mended small typo
-4eec4fc mkcephfs: nicer empty directory check
-4e66a3b mkcephfs: error out if mon data directory is not empty
-6b1835a vstart.sh: blow away mon directory on creation/start
-54be9d0 mon: stop doing rm -rf on mon mkfs
-52f96b9 log: apply log_level to stderr/syslog logic
-de524ab log: dump logging levels in crash dump
-3821f6c PG: grab reference to pg in C_OSD_AppliedRecoveredObject
-64f7450 log: fix event gather condition
-d4410e4 PG::RecoveryState::Stray::react(LogEvt&): set dirty_info/log
-4afa892 PG: use stats from primary after rewinding divergent entries
-c7fb964 PG::RecoveryState::Stray::react(LogEvt&): reset last_pg_scrub
-5d82a77 doc/dev/osd_internals: OSD overview, pg removal, map/message handling
-1b8819b PG: Place info in biginfo object
-12d7073 PG: use write_info to set snap_collections in make_snap_collections
-90381dc OSD: set superblock compat_features on boot and mkfs
-470796b CompatSet: users pass bit indices rather than masks
-b7814db osd: based misdirected op role calc on acting set
-14d2efc mon/MonitorStore: always O_TRUNC when writing states
-f94c764 mon: remove osds from [near]full sets when their stats are removed from pgmap
-fe57681 mon/MonitorStore: always O_TRUNC when writing states
-bf9a85a filestore: dump open fds when we hit EMFILE
-a278ea1 osdmap: drop useless and unused get_pg_role() method
-38962ab osd: based misdirected op role calc on acting set
-6faeeda osd: simplify helper usage for misdirected ops
-ed4f80f vstart: use absolute path for keyring
-117b286 OSD: add config options to fake missed pings
-ce20e02 crushtool: allow information generated during testing to be dumped to a set of CSV files for off-line analysis.
-8a89d40 doc: remove last reference to ceph-cookbooks.
-2011956 doc: cookbooks issue resolved, so changed 'ceph-cookbooks' back to 'ceph.'
-5a5597f qa: download tests from specified branch
-5360079 OSD: send_still_alive when we get a reply if we reported failure
-5924f8e PG: merge_log always use stats from authoritative replica
-3dd65a8 qa: download tests from specified branch
-ce7e0be mon: use single helper for [near]full sets
-30b3dd1 mon: purge removed osds from [near]full sets
-bcfa573 ReplicatedPG: don't mark repop done until apply completes
-10ec592 test_librbd: fix warnings
-5450567 ReplicatedPG,PG: dump recovery/backfill state on pg query
-508bf3f rbd: enable layering when using the new format
-dfe29af doc: reverted file and role names.
-f8478d4 upstart: Make ceph-osd always set the crush location.
-5ceb7c7 doc: fix config metavariables discussion
-d1054df doc: perf counters
-f33c0be rgw: don't override subuser perm mask if perm not specified
-09c60b4 doc: added :: to code example.
-ad8beeb doc: minor edits.
-63a1799 doc: cookbook name change broke some things in doc. Fixed.
-65c43e3 debian: fix ceph-fs-common-dbg depends
-cc8df29e rados tool: bulk objects removal
-99a048d rados: more usage cleanup
-0081c8e     rados: usage message     Bad linebreaks, wrapping, stringification, missing doc for bench args
-0782db3 doc: changed role file names as part of update to roles.
-e5997f4 doc: added DHO config.
-173d592 rados tool: remove -t param option for target pool
-31c8dcc crush: sum and check quantized weights for bucket
-675a1b7 crush: Set maximum device/bucket weights.
-c9fc5a2 crush: prevent integer overflow on reweight
-d29ec1e     rados: usage message     Bad linebreaks, wrapping, stringification, missing doc for bench args
-2c001b2 Makefile: don't install crush headers
-22d0648 librados: simplify cct refcounting
-c5bcb04 lockdep: stop lockdep when its cct goes away
-7adc6c0 mon: simplify logmonitor check_subs; less noise
-a542d89 mds: fix race in connection accept; fix con replacement
-0f917c2 osd: guard class call decoding
-0ff6c97 test_stress_watch: just one librados instance
-ee1c029 ReplicatedPG: don't warn if backfill peer stats don't match
-d3c97da librados: take lock when signaling notify cond
-ec490d8 client: fix locking for SafeCond users
-38e2de3 doc: No ssh -t -t, forcing a pty allocation there makes it hang.
-79e3416 doc: removed the ceph directory per tommi's update to the chef-cookbooks.
-5c84f01 doc: Adding apt update message. VM users didn't get the package otherwise.
-fe5c0cd osd: guard class call decoding
-2a6af20 rbd: update manpage for clone command
-e353149 rbd: update cli test reference files
-7b0c71c librados: pool_get_name handles "not found" wrong
-6ad5961 rbd, librbd: add tests for cloning
-64949d4 librbd, rbd, rbd.py: Add parent info reporting
-a94fc8c rbd, librbd, rbd.py: cloning (copy-on-write child image of snapshot)
-8cc4342 librbd: open_image snapshot handling Allow opening with no snap, but check for error for nonexistent snap
-96a517b librados: Add mapping from pool id to pool name and ioctx to rados client
-68bad03 msgr: queue accept event when pipe is accepted
-fab6e82 msg/DispatchQueue: queue and deliver accept events
-95f85df librados: add new constructor to form a Rados object from IoCtx
-d4ef004 dispatcher: new 'accept' event type
-1a4a133 msgr: drop unnecessary (un)locking on queuing connection events
-e84565d msgr: move dispatch thread into DispatchQueue
-9e291ba msgr: simplify checks for queueing connection events
-bafcbde msgr: remove unnecessary accept check
-bffd46c msgr: remove obsolete dead path
-3490814 msgr: uninline ctor and dtor
-912123f msgr: move Pipe, DispatchQueue into separate files
-c7caf91 msgr: simplify IncomingQueue creation, pointers
-fa4c192 msgr: use local IncomingQueue instead of Pipe
-2d071b9 msgr: use explicit Connection for messages sent to ourself
-35b1326 msgr: take over existing Connection on Pipe replacement
-80111cc test_stress_watch: just one librados instance
-782a17d doc: added cookbook path instruction.
-8869621 doc: Added some pre-clarification for gdisk. Added DHO OSD hardware config.
-fbe5577 CephContext: don't leak admin socket
-74e6205 CephContext: drop obsolete ceph_destroy_context
-074df64 librados: use CephContext ref counts
-6aa9f49 CephContext: ref count
-58f46bb test_stress_watch: just one librados instance
-67a5e75 ReplicatedPG: don't warn if backfill peer stats don't match
-645ac87 ReplicatedPG: fix replay op ordering
-67361c1 librbd: return an error when removing a non-existent image
-ec87a1e cls_rbd: add logging for failed set_parent steps
-b23e4e5 doc: Removed legacy paths and keyname settings from examples.
-b387077 debian: include librados-config in librados-dev
-8e5fe62 doc: remove reference to 'ceph stop' command
-03c2dc2 lockdep: increase max locks
-b554d11 config: add unlocked version of get_my_sections; use it internally
-01da287 config: fix lock recursion in get_val_from_conf_file()
-c73c64a config: fix recursive lock in parse_config_files()
-97c1562 rgw: handle response-* params
-6646e89 rgw: initialize fields of RGWObjEnt
-b33553a rgw: handle response-* params
-74f6875 osd: add missing formatter close_section() to scrub status
-020b299 pg: report scrub status
-db6d83b pg: track who we are waiting for maps from
-e1d4855 pg: reduce scrub write lock window
-72bf66f doc: added some discussion to libvirt.
-1316f86 cond: cleanup
-da7a328 cond: drop unused Wait variant
-9c6fdd5 librados: drop unused local variables
-b5693a6 librados: take lock when signaling notify cond
-7c919e9 workqueue: kick -> wake or _wake, depending on locking
-8de0c22 cond: assert that we are holding the same mutex as the waiter
-b486f2f client: fix locking for SafeCond users
-540c2c3 doc: Minor cleanup on deploy with Chef.
-3df5104 rgw: don't store bucket info indexed by bucket_id
-27409aa rgw: don't store bucket info indexed by bucket_id
-9814374 test_rados_tool.sh: test copy pool
-d751006 rados tool: copy object in chunks
-16ea64f rados tool: copy entire pool
-960c212 rados tool: copy object
-23d31d3 ceph.spec.in: add ceph-disk-{activate,prepare}
-668ce00 osd: make on_removal() pure virtual
-3d00130 osd: fix PG dtor compile error
-09af670 PG,ReplicatedPG: on_removal must handle repop and watcher state
-6917419 OSDMonitor: disable cluster snapshot
-8e93e8b OSD: ensure that OpSequencer lives through on_commit callback
-816d424 ReplicatedPG.cc: C_OSD_CommittedPushedObject move pg->put() to finish
-fe14c18 OSD::PeeringWQ::_dequeue(PG*) drop pg refs
-0475ee4 OSD,PG:;replica_scrub: move msg->put() into queue process
-bdf09f2 OSD,ReplicatedPG::snap_trimmer: pg->put() in process, not snap_trimmer()
-cab7b75 OSD: drop pg refcounts in OpWQ::_dequeue(PG*)
-868168a OSD: clean up revcovery_wq queueing and ref counting
-c70392a doc: minor typo
-4d7bb07 doc: update copyright notice in footer
-57bc8da doc: minor updates to the restrucuredText file.
-0659f7c doc: minor cleanup.
-1c9e1c6 doc: Publishing as described. Still requires some verification and QA.
-7e26d6d PG: C_PG_MarkUnfoundLost put pg in finish
-31db8ed OSD::activate_map: don't publish map until pgs in deleted pools have been removed
-7f2354c doc/scripts/gen_state_diagram.py: make parser a bit more forgiving
-9fc5db8 ReplicatedPG::op_applied: update last_update_applied iff !aborted
-4ce17cc test/encoding/types.h: disable pg_query_t encoding test
-99c23b6 OSD: split notify|info|query messages for old clients
-193f18f FileStore: delete source collection if not replaying collection_rename
-f0b2310 ReplicatedPG: RepModify track epoch_started and bail on interval change
-7b5d8e8 ReplicatedPG: on_activate for a peer might happen before flush
-87d1cdb OSD: _remove_pg not ruin iterator consistency
-311a061 OSD: move watch into OSDService
-442b558 PG: pass activate epoch with Activate event
-f9282e6 Revert "osd: check against last_peering_reset in _activate_committed"
-392df3b Revert "osd: reset last_peering_interval on replica activate"
-1b558fb OSD: write_info/log during process_peering_events, do_recovery
-c6db1b2 PG: delay ops in do_request, not queue_op
-9b182d2 OSD: maybe_update_heartbeat_peers, don't print pg
-0ee3d87 OSD: process_peering_event check for new map on each pg
-c1f2a80 OSD: peering_wq is now a BatchWorkQueue
-d8a68e7 OSD: do_(notifies|infos|queries) must now be passed a map
-3ca6359 common/WorkQueue.h: add BatchWorkQueue
-5c0e8b4 OSD: bail out of do_recovery if no longer primary and active
-5dc45f7 PG: PG now store its own PGPool
-b242c56 OSD: on pg_removal, project_pg_history to get current interval
-a67a874 CrushWrapper: add locking around crush_do_rule
-c7581b6 CrushWrapper: rmaps don't need to be mutable
-73f5ce9 OSD,PG: issue pg removals in line, remove remove_list
-7c1dc90 OSD: don't advance_pg() if pg is up-to-date
-8079a48 OSD,PG: clean up _get_or_create_pg and set interval based on msg
-a5bf3d7 OSD: lock recovery_wq before debug output on finish_recovery_op
-3dcce50 OSD: only do_(notify|info|query) for up osd
-040a22b OSD: map_cache should contain const OSDMap
-4fec85f OSD: activate_map() in handle_osd_map only when active
-2552a7f OSD,PG: _share_map_outgoing must not require osd_lock
-35949c5 ReplicatedPG: explicitely block on not active for certain ops
-e8d09d0 PG,OSD: prevent pg from completing peering until deletion is complete
-b200710 OSD,PG: clean up pg removal
-9a4a9b9 PG: flush ops by the end of peering without osr.flush
-33b985d OSD,PG: added helper methods for creating and dispatching RecoveryCtxs
-b80b500 OSD,PG: Move pg accesible methods, objects to OSDService
-502c033 PG, OSD: info_map shouldn't contain the MOSDPGInfo*
-f68f52c OSD: queue_want_up_thru in process_peering_event
-492e635 OSD: do not drop osd_lock in handle_osd_map
-14381b3 OSD: get map read lock during queue_want_up_thru
-10ec5bc OSD: push_waiters is no longer used
-90e3727 OSD: do not lock osd during dequeue_op
-3d32712 OSD: don't assume pending pg removals have flushed
-91355fb ReplicatedPG: change ReplicatedPG debug output to match PG
-b6bf573 ReplicatedPG: do not eval_repop if aborted
-f6fc1b3 OSD: remove superfluous pg get/put around enqueue_op
-b0cb96bf PG,OSD: fix op checking in pg, take_waiters during ActMap
-b5078bb PG,OSD: add OSD::queue_for_op, use in PG::queue_op
-64b71c6 OSD: check for deleting in process_peering_event
-fff0874 PG: use osd->requeue_ops for ops, pg->queue_for_peering to requeue pg
-e10e81c PG: compound messages must carry epoch_sent for each part
-b081bd4 PG: CephPeeringEvents can now be descriptively printed
-65abfc0 OSD: initialize pgs in get_or_create_pg via handle_create
-c7e3495 PG: include info and query by value in peering events
-12e22b3 OSD,PG: handle pg map advance in process_peering_event
-bbd8af0 osd/: Make pg osdmap be independent of osd, other pg maps
-ddef446 OSD,PG: Move Op,SubOp queueing into PG
-33bcbb3 PG: process peering events in a queue
-36d1381 PG: use intrusive_ptr in CephPeeringEvt
-6922f9c osd/: move history update from handle_pg_query into pg
-d015823 OSD,PG: push message checking to pg
-7c414c5 OSD: Remove handle_pg_missing, MOSDPGMissing no longer used
-3691e3c PG: Move handle_* methods to PG
-1ffd190 PG: CephPeeringEvt
-18fec69 OSD,PG::scrub() move pg->put() into queue process
-ea11c7f Allow URL-safe base64 cephx keys to be decoded.
-7fa8579 osd: add missing formatter close_section() to scrub status
-f67fe4e librados: Bump the version to 0.48
-bcfcf8e librados: add assert_version as an operation on an ObjectOperation
-39eaa23 ReplicatedPG: do not set reply version to last_update
-e6e36c0 rgw: initialize fields of RGWObjEnt
-35b9ec8 rgw-admin: use correct modifier with strptime
-da251fe rgw: send both swift x-storage-token and x-auth-token
-4c19ecb rgw: radosgw-admin date params now also accept time
-6958aeb rgw-admin: fix usage help
-ad97415 ceph-disk-prepare: Partition and format OSD data disks automatically.
-a1696fe doc: removed /srv/osd.$id.journal  from ceph.conf example.
-8f64647 CrushTester.cc: remove BOOST dependencies.
-7e23aad doc: Updates to 5-minute quick start.
-83c043f radosgw-admin: fix clit test
-c667f5d lockdep: increase max locks
-12ba580 config: add unlocked version of get_my_sections; use it internally
-5674158 ceph: fix cli help test
-fc18cca doc: Clean up of 5-minute quick start.
-151bf0e ReplicatedPG: remove faulty scrub assert in sub_op_modify_applied
-8ade74b ReplicatedPG: remove faulty scrub assert in sub_op_modify_applied
-09dd8ca doc: Updating Getting Started with 5-minute quick start.
-32833e8 ceph: better usage
-8c95b5c doc: restructuring quick start section.
-4bd7c05 IoCtxImpl: pass objver pointer to aio_operate_read
-4e774fb ceph-disk-prepare: Take fsid from config file.
-cd0314d config: remove bad argparse_flag argument in parse_option()
-67455c2 debian: strip new ceph-mds package
-6bb19e7 doc: Cleaned up rbd snapshots.
-ad61bbd config: fix lock recursion in get_val_from_conf_file()
-7009c32 config: fix recursive lock in parse_config_files()
-b53cdb9 config: remove bad argparse_flag argument in parse_option()
-14ec778 client: improve dump_cache output
-8b46201 doc: release notes for 0.48
-562cad6 doc: 'Configuring a Storage Cluster' -> 'Configuration'
-b5287c1 lockdep: enable in common_init
-f7d4e39 msgr: restart_queue when replacing existing pipe and taking over the queue
-5dfd2a5 msgr: choose incoming connection if ours is STANDBY
-b7007a1 msgr: preserve incoming message queue when replacing pipes
-1f3a722 msgr: move dispatch_entry into DispatchQueue class
-0344529 msgr: move incoming queue to separate class
-0dbc541 msgr: make D_CONNECT constant non-zero, fix ms_handle_connect() callback
-2429556 msgr: fix pipe replacement assert
-204bc59 msgr: do not try to reconnect con with CLOSED pipe
-e6ad6d2 msgr: move to STANDBY if we replace during accept and then fail
-c2b20ca (tag: v0.48argonaut) v0.48argonaut
-b5098b3 ceph.spec.in: Change license of base package to GPL and use SPDX format
-a1fe589 mon: initialize quorum_features
-d82a502 qa: add rbd remove tests
-d04b2fb cls_rbd_client: check return code of operate
-1c096a8 qa: run rbd tests against old and new formats
-aa3255b qa: add tests for rbd ls with old and new formats
-288bde3 qa: restructure rbd cli tests
-0ad14c9 qa: add rbd command rename tests
-6f096b6 librbd: use new class methods to access rbd_directory
-f2d37c5 librbd: handle NULL old_format pointer in detect_format()'s logging
-2628530 doc: fixed --cap error and a few additional bits of cleanup.
-2472034 OSD::do_command: unlock pg only if we had it
-841451f MOSDSubOp: set hobject_incorrect_pool in decode_payload
-b91beca doc: Added sudo and cleaner instruction for unmap.
-f16a9c4 doc: updated usage on RBD kernel object commands.
-e186013 doc: drop mention of MDS capabilities from radosgw man page
-deceb70 filestore: initialize m_filestore_do_dump
-31ad263 doc: add design doc for rbd layering
-398a229 filestore: set min flush size
-0810ab6 osdmap: check new pool name on rename
-5a93550 osd: handle pool name changes properly
-d15385b CrushTester: add Monte Carlo generator to more accurately simulate a CRUSH mapping using a RNG
-5de9af5 crush: style changes
-cc4955a PG: reset_recovery_pointers in activate if missing is empty
-657e86c vstart.sh: don't clobber keyring if not -n
-a8d7fd9 mon: 'osd pool rename <oldname> <newname>'
-02f1b0a doc: document new 'osd crush move ...' command
-f5e3a67 mon: fix 'osd crush move <item> <loc ...>'
-5e454bb mon: add 'osd crush move <name> <loc ...>' command
-a2d0cff crush: add move_bucket() method
-d22529d crush: get_loc -> get_immediate_parent
-d7c18c1 PG::merge_old_entry: handle clone prior_version case
-b907c88 ReplicatedPG: adjust log.complete_to based on rmissing
-143afcf ReplicatedPG: clear peer_(missing|log)_requested in check_recovery_sources
-090e510 PG: check_recovery_sources on each map
-c3a02ea doc: radosgw: further simplify Apache rewrite rule
-76c657e cls_rbd: add methods for dealing with rbd_directory objects
-de62c4c objclass: add create method
-4110707 cls_rbd: use already defined local var instead of constant
-a1d477b librbd: add indirection between name and header object
-5ae6e71 cls_rbd: add {get,set}_id methods
-0a6ee69 doc: document osd tell bench
-147114d doc: minor edits.
-15ebf20 rest-bench: mark request as complete later
-5c23d35 buffer.h: fix operator> and operator>= increment error
-335b918 DBObjectMap: clones must inherit spos from parent
-cc1da95 filestore: sync object_map object in lfn_remove when nlink > 1
-218dd5a radosgw Apache configuration: simplify rewrite rule
-5a06af7 Fix example radosgw Apache configuration
-6a5c155 objclass: remove unused variable from cls_cxx_map_get_vals
-f969b59 cls_rbd: fix signed-ness warning
-9d6013e debian: move metadata server into ceph-mds
-915f321 debian: move mount.ceph and cephfs into ceph-fs-common
-0d9b558 debian: arch linux-any
-8949232 debian: build with libnss instead of crypto++
-9d7f048 doc/config-cluster/authentication: keyring default locations, simplify key management
-f366173 pg: report scrub status
-c94583e pg: track who we are waiting for maps from
-ecd7ffe pg: reduce scrub write lock window
-16d5565 mon: MonmapMonitor: Use default port when the specified on 'add' is zero
-04e1c30 rest-bench: mark request as complete later
-c5d19b6 rgw-admin: use correct modifier with strptime
-17f433a OSD: disconnect_session_watches: handle race with watch disconnect
-e34dfc3 doc: removing old 'todo' configuration reference.
-efb74a9 doc: converted daemon references from nasty tables to lines.
-4142ac4 doc: a few minor tweaks to radosgw to cleanup navigation.
-0be2611 doc: Published RADOS GW docs and install as is for now. Needs more work.
-9342573 CrushTester.cc: removed last broken bits of obsolete method
-6d551c1 CrushTester.cc: removed obsolete method for collapsing a CRUSH map
-df7729e CrushTester: eliminated compiler warning
-88e3154 radosgw-admin: improve man page
-63b562f doc: explain how to configure Ceph for radosgw
-07029a4 rgw: send both swift x-storage-token and x-auth-token
-80a939a rgw: radosgw-admin date params now also accept time
-c87c83f rgw-admin: fix usage help
-77fcf06 upstart: fix regex
-840ae24 mon: don't tick the PaxosServices if we are currently slurping.
-ef6beec objecter: do not feed session to op_submit()
-4e45d60 ObjectStore::Transaction: initialize pool_override in all constructors
-ff67210 objecter: do not feed session to op_submit()
-9fcc3de osd_types.cc: remove hobject_t decode asserts
-80649d0 mon: note that monmap may be reencoded later
-77d836c mon: encoding new monmap using quorum feature set
-de5b323 mon: conditionally encode mon features for remote mon
-c399d90 mon: conditionally encode PGMap[::Incremental] with quorum features
-0aaf7334 mon: conditionally encode auth incremental with quorum feature bits
-06288a9 mon: track intersection of quorum member features
-2355b23 mon: conditionally encode old monmap when peer lacks feature
-2fe9816 OSD,PG,ObjectStore: handle messages with old hobject_t encoding
-ddf7e83 doc: ceph osd crush add is now ceph osd crush set
-448f5b0 logrotate: reload all upstart instances
-58db045 docs: clarify example in radosgw-admin
-7044192 filestore: remove btrfs start/end transaction ioctl code
-990febd mon: make pool deletion dne error code consistently ENOENT
-62a4ad6 docs: update usage logging info
-1e539da doc: Normalized shell script syntax. Added generic cookbook path.
-7d38758 doc: Changed libvirt-dev to libvirt-bin, and cleaned up ./autogen.sh
-3e32dd0 doc: Typo.
-c467d9d (tag: v0.47.3) v0.47.3
-17dcf60 filestore: disable 'filestore fiemap' by default
-88c7629 OSD: clear_temp: split delete into many transactions
-b84e1ed doc: document usage log
-25311e9 cls_rbd: note overlap units
-156879f cls_rbd: fix uninitialized var in cls_rbd_parent
-986d0e1 cls_rbd: clean up doxygen, whitespace a bit
-4e73ca4 cls_rbd: include dumpers, test instances for our types
-87cadff cls_rbd: rename parent size -> overlap
-3948e06 cls_rbd: handle parent overlap
-e8b36ed cls_rbd: make snapshots inherit the head's parent
-f87c441 cls_rbd: check for LAYERING feature for parent methods
-2f75b46 cls_rbd: implement get_parent, set_parent, remove_parent
-c7f91e6 cls_rbd_client: use snapid_t type
-145d1c1 rgw: set s->header_ended before flushing formatter
-8a4e2a1 rgw: log user and not bucket owner for service operations
-282e226 rgw: initalize s->enable_usage_log
-f3f144a osd: use derr (instead of cerr) for convertfs
-74658df osd: close stderr on daemonize
-4ec9633 PG: improve find_best_info
-5435a4d osdcap: make grammar build on spirit 2.2/boost 1.42
-992faa4 doc: Added a snapshot page with outline. Needs additional info.
-2be0291 doc: Added prerequisite of running Ceph cluster.
-0d8970f PG: reg_last_pg_scrub on pg resurrection
-b0e66b7 ceph_osd: move auto-upgrade to after fork
-6feeff9 librbd: simplify refresh sequence checks
-b101f4c doc: first cut of OpenStack/RBD w/out cephx. Authentication coming soon.
-37e56e0 filestore: make disk format upgrade warning less scary, more informative
-030a2e3 mon: include quorum in ceph status
-2fc2cf0 mon: gracefully handle slow 'ceph -w' clients
-8b96b9c doc: Added libvirt installation.
-51fcef2 PG: best_info must have a last_epoch_started as high as any other info
-2b92c73 doc: btrfs and parted chef recipes are not needed.
-95ac5ba debian: fix python-ceph depends
-d7fe0e3 debian: update homepage url
-82cb3d6 filestore: fix 'omap' collection skipping
-343cc79 run-cli-test: use new pip incantation
-e3b6957 run-cli-test: use new pip incantation
-3d4ba43 cls_rbd: do not pass snapid_t to vargs
-5efaa8d msg: fix buffer overflow in ipv6 addr parsing
-d9e902f ceph.newdream.net -> ceph.com wiki url -> docs url
-f8a196f cls_rbd: drop useless snapshot metadata helpers
-b08d7ba cls_rbd: use encode macros for on-disk snap metadata
-07f853d PG: best_info must have a last_epoch_started as high as any other info
-5b1b02b librbd: remove the set-r-and-return idiom from some functions.
-b018bef librbd: add cooperative image locking to the C and C++ interfaces
-668aa78 librbd: include the image lockers in the ImageCtx mutable metadata
-48d2376 test: add rbd image locking tests to test_cls_rbd
-71c7ed3 cls_rbd_client: expose locking operations
-71e1b1f cls_rbd: add failure logging to all callers of read_key.
-c88a455 cls_rbd: add locking functions.
-1e899d0 filejournal: make less noise about open failures
-b415fd2 rgw: obj copy respects -metadata-directive
-2dd1798 librbd: only clear the needs_refresh flag on successful updates.
-b5de839 osd: optional verify that sparse_read holes are zero-filled
-1156f94 buffer: add list and ptr is_zero() method
-614d5a7 LFNIndex.cc: escape null in append_[un]escaped
-9d4ce4b filestore: disable 'filestore fiemap' by default
-dbbbe21 osdcap: 'allow rwx pool foo' or 'allow pool foo rwx'
-1bd5d24 nightly push to local repo
-66df6be ceph-authtool: update docs to reflect no more osdcap deny
-f916168 osdcap: make caps additive
-b44092f radosgw: stop startup timer on failed start
-6f30f1fc upstart: make id charset include - _ and .
-7bfcc7c radosgw: takes --id, but not -i
-92589f8 objclass: allow class methods to retrieve their triggering entity_inst
-7515b05 doc: added qemu-img documentation for rbd.
-5db4509 rgw: limit number of buckets per user
-0adb33d doc: Added steps for OpenStack install with DevStack
-446e5d8 doc: fixed bash syntax error.
-97c9f01 qa: disable xfstest 68 for now
-7f4d171 qa: disable xfstest 219 for now
-051e168 osdcap: move semantics of cap check into OSDCap class
-529c484 Makefile: fix leveldb dep for system library case
-3dbad22 Makefile: fix leveldb includes for system library case
-e48dab4 doc: Multi-monitor support means ceph::single_mon was renamed.
-762f6d9 osdcap: whitespace to make grammar more readable
-1cfd65b osdcap: use static const instead of #define
-bf72a00 osdcap: drop unused 'auid' arg from get_cap(), is_match()
-67710a6 rbd: fix usage test
-66553d2 Makefile: link gtest statically
-d1fc562 debian: install radosgw upstart configs, daemon dir
-282277d radosgw: upstart support
-c4a607a CrushTester.cc: eliminated old compiler warning of uninitialized pointer.
-c06e407 osd: reimplement OSDCap struct
-6e551f7 init-ceph: make 'status' report running version
-f822c02 PG: track purged pgs during active
-4ec4b47 ceph_argparse: make entityname parsing error more helpful
-6f9ecef rgw: default keyring to $rgw_data/keyring
-ca2010e vstart.sh: set data dirs instead of keyring locations
-e958efa new default keyring location for daemons
-eeeb599 mds: add mds_data config
-ce79f9e config: improve variable substitution
-d422bf1 config: expand any config variable in config
-500c72e config: make meta expansion in set_val optional
-72edd35 osdcaps: drop dead peer_type code
-8b5336a osd: simplify session peer type check
-4cc122c entity_name: is_*() methods
-b88a5e5 crush: fix retry histogram array overflow due to indexing error
-37dea2d cls_rgw: use updated internal omap api
-6fd80d3 cls_rgw: fix CLS_LOG macro usage
-1fdd411 crush: fix retry histogram array overflow due to indexing error
-ddc9b27 mapper.c: fixed array indexing error.
-c31b4e3 remove ceph-kdump-copy
-d64600d debian: limit build archs
-a3f86b8 rgw: usage statistics also count num of ops/successful_ops
-d023cf5 debian: move ./configure to correct rules section
-d63aca3 debian: remove dup python build-dep
-af16f45 upstart: Read crush location and weight from ceph.conf.
-8eb5c9b mon: allow keys to be cleared in ceph osd crush set ... loc key/values
-6d8d059 rgw: fix cli test
-9a1ea4b rgw: usage log cleanups
-753207c doc: update examples in radosgw-admin man page
-d2b6e49 rgw: rgw_rados related fixes for usage logging
-046395c rgw/rgw_cls_api.h cleanup
-9a56a5b rgw_admin: usage admin commands
-744a1b3 rgw: usage logger
-baa3aff rgw: access methods for new usage ops
-ea2f955 rgw: new config options
-9a70ec9 rgw: new class methods for handling usage information
-d265bb6 rgw: don't fail initialization if socket path returns ENXIO
-9851683 cls_rbd: add get_all_features method
-ee7a027 mon: fix pg state logging
-5cd33cd workunits/rbd: add workunit for running cls_rbd tests
-031d42a workunits/rbd: disable remove_with_watcher test
-3d22546 librbd: remove unnecessary notify from add_snap()
-44e5f3d librbd: ignore RBD_MAX_BLOCK_NAME_SIZE when generating object ids
-3d7925b workunits/rbd: allow creating images in different formats
-a502630 rados: add commands to interact with object maps
-123250b test_librbd, test_rbd.py: optionally use the new format
-074ffc5 rbd.py: add support for creating images in the new format
-857bbcc rbd: update for the new format
-5b40b4b librbd: add create2 to create an image with the new format
-b25f277 doc: Segregated set up git from clone.
-8337775 debian: ceph depends on python
-c526bdb CrushTester: drop range marking
-2436457 crushtool: drop useless clitest
-f2fa31b CrushTester: simplify, clean up mark down
-c5042fe CrushTester: some whitespace
-9b0195b CrushTester: randomize mark_down behavior
-4921bbb CrushTester: remove dead code
-7258076 CrushTester: some cleanup
-2deac08 CrushTester: mark_down_ratio and mark_down_bucket_ratio
-4551808 mon: add 'auth get-or-create' variant that outputs a keyring
-bfbed50 librbd: use ImageCtx members instead of the old header in resize()
-5bc34f4 librbd: validate order before creating an image
-127b425 librbd: rename md_oid parameters to header_oid
-ef38394 librbd: make rename work with any header format
-f1d6963 librbd: use cls_client functions for calling class methods
-8e51e06 librbd: remove on-disk header argument from helper functions
-00f4e84 librbd: check that the current snapid for a snap name matches
-4eb2138 librbd: update ictx_refresh to work with both formats
-7376a77 librbd: Update ImageCtx for new format
-dcc7c96 cls_rbd: add methods for interacting with the new header format
-70686c5 librbd: remove useless ENOMEM checks
-13aa578 DBObjectMap: remove extra semicolon
-8c637f5 vstart: debug osd classes when debugging is on
-49059b2 objclass: add methods to get keys without values, and set multiple values
-23ebc09 objclass: rename omap methods to be consistent with other interfaces
-715c1f1 objclass: allow classes to log at different levels
-fe46a74 class_debug: add indent settings header
-5750e53 test_librbd: don't include a .cc file
-ba56d81 cls_rgw: add indent settings header
-e0fda59 objclass: pass strings as const references
-60c684a objclass: add indent settings header
-fefedc1 cls_rbd: add indent settings header
-92325d0 cls_rbd: remove unused test_exec and snap_revert methods
-b2793c4 mon: require force argument for 'mds newfs ...'
-3eca360 Cleaned some lingering references to "verbose"
-c0a02a4 crushtool: refine tunables warning message
-978d541 re-include assert after boost::pool
-740aa3d crush: compile/decompile tunables
-1a2959e crushtool: add --enable-unsafe-tunables option
-cfbe34d crushtool: --show-* instead of --output-*
-eaad984 CrushTester: clean up output interface
-dba70ee CrushTester: dump histogram of choose attempts
-c04de2b crush: generate histogram of choose tries
-4abb53d crush: fix leaf recursion if we already collided
-4873711 CrushTester: optionally output bad mappings
-c4336a3 crushtool: arguments to adjust tunables
-8b79697 crush: make magic numbers tunable
-7332e9c mon: use mode 0600 throughout
-07169d2 doc: Added mount cephfs with fstab.
-7d1b32a osd: include past_intervals in pg query results
-36a3979 OSD: _have_pg should return NULL if pg is not in map
-fae1d47 deliberately break encoding macros when wrong assert is present
-3571f43 misc assert #include cleanup, hackery
-a1ae8b6 reinclude assert.h after json_spirit
-e87a66b doc: Incorporated Sam's comments.
-3939839 doc: Typo fix.
-22863c3 mon: set policy for client, mds before throttler
-71c2877 DBObjectMap: fix some warnings
-0f6d90c make everyone use our assert #include and macro
-a30601a assert: detect when /usr/include/assert.h clobbers us
-165fbd1 keyserver: also authenticate against mon keyring
-5d520f1 keyring: implement get_caps()
-ca433f2 mon: share mon keyring with KeyServer
-47b202e mon: put cluster log at /var/log/ceph/$cluster.log and/or send to syslog
-78b0bea monclient: be paranoid/defensive about send_log vs log_client==NULL
-58b02f9 crushtool: fix cli tests given new less-chatty output, help
-af4d8db crushtool: allow user to select output reporting in blocks
-87327c2 doc: Added mount cephfs and included it in quick start.
-6c1558e logclient: fix warning
-d4c30da mon: include pg acting in health detail
-0167fd0 mon: include all types of stuck pgs in health detail
-37bf2a1 test/cli/ceph-authtool: keyring.bin -> keyring
-5b443eb doc: keyring.bin -> keyring everwhere
-f918049 test/: Made omap_bench compatible with teuthology
-02a9a01 doc: Added the root discussion to deploy with mkcephfs.
-993caf8 doc: Added chmod for keyring, and moved client.admin user higher.
-85fee04 logclient: fix crashes, fix which entries are sent
-b6059cc monclient: send more log entries when first set is acked
-235f927 logclient: not a dispatcher
-dfd9f5f logclient: limit messages per MLog message
-540865f mon: limit size of each logm paxos event
-ee94512 config_opts: filestore_update_to defaults to 1000
-d8f8b1f OSD: do not convert an entire collection in one transaction
-50331ab FileStore,DBObjectMap: add SequencerPosition argument to ObjectMap
-ffc5f7e ReplicatedPG: push_start, don't insert empty extent into data_subset
-5250e24 test_filestore_idempotent_sequence: add omap
-a2eedec osd_types,PG: handle new hobject format in object_info,pg_log
-c64fc29 test_object_map: remove DBObjectMapv0
-56cf461 OSD,FileStore: clean up filestore convsersion
-875bec2 DBObjectMap,FileStore: Remove IndexedPath parameters from ObjectMap
-ebfde20 DBObjectMap: update header comments for new structure
-df7c407 FileStore: skip omap during list_collections
-92807c2 OSD: exit(0) once filestore is converted
-7c8aac7 ReplicatedPG: adjust missing at push_start
-6ec74ac ReplicatedPG: remove_object_with_snap_hardlinks before creating temp obj
-19c667f DBObjectMap::init: initialize seq and v to correct values
-01ad679 DBObjectMap: update check() for new format
-b6a9932 DBObjectMap: Implement upgrade from previous format
-e083e0e DBObjectMap: restructure for unique hobject_t's
-761140a FileStore,DBObjectMap: remove ObjectMap link method
-9ceed87 DBObjectMap: version bump for new format
-7a3a2d2 DBObjectMap: add parse method for old encoding
-dab238b os/: update CollectionIndex filename encodings
-927458c test/ObjectMap: Copy current DBObjectMap implementation
-d5ab877 src/: Add namespace and pool fields to hobject_t
-ec689e3 rgw: replace 'should_log' with 'enable_ops_log'
-8e41ac1 mon: clear osd_stat on osd creation/destruction
-fb6ea82 doc: Added S3 examples to the toctree.
-62fe9f4 doc: adding code samples for S3 API usage (thanks, DH!)
-644a615 Makefile.am: explicitly mention that -Wl,--as-needed is location-sensitive.
-e83a84c doc: Added ${lsb_release -sc} based on Sam's feedback.
-fc1f9e0 rgw: shutdown init_timer
-5087997 rgw: try to create fcgi socket through open() first
-000f9d3 msg: make clear_pipe work only on a given Pipe, rather than the current one.
-dde85a2 CrushTester: allow build without boost stuff for chi^2 testing
-11b24f7 crush: simiulate using rng; use chi-squared to measure result
-aeb3a8f crush: check_item_present
-4061ae2 ceph_argparse: with_float
-a1c5ef0 admin_socket: only init if path is defined
-3764ca6 upstart: simplify start; allow group stop via an abstract job
-c48de3a paxos: warn on extreme clock skew
-576dff8 omapbench: fix warning
-ab5139b omapbench: fix misc warnings
-6f3e7a8 ReplicatedPG: fix pgls listing, add max listing size
-d8e07a3 objecter: fix pgls
-b9ef314 mon: fix slurp latest race
-f871d83 Makefile: include ceph-mds upstart bits in dist tarball
-7a4e923 test/: Added object map benchmarking tool
-e0f1952 doc: fix autobuild debian source line
-97d4396 mon: throttle client msgr memory
-7e3d90a Objecter: tone down linger op messages on tick
-4a7683c test_stress_watch: exercise watch/unwatch/close from second client
-95e0a88 qa: stress_watch.sh workunit runs test_stress_watch
-fb7ce59 doc: Added preliminary rbd and ko info.
-10b0db3 osd: Adding const to methods in OSDMap
-8609caf vstart.sh: initialize keyring even if not using cephx
-594f2bb perf_counters: use bufferlist instead of vector<char>
-ea1c069 mon: fix admin socket lock dependency
-fa2f1de admin_socket: fix unit test
-51de7c1 osd: ack pending notify when unwatching
-5adc85b admin_socket: pass args separately
-895e24d admin_socket: streamline 'version' commands
-ca8f3ba admin_socket: streamline command set
-e30e937 admin_socket: register command prefixes
-c80bd9d librbd: Simplify timing init
-04e66b4 librbd: Add latency (elapsed-time) stats for rbd operations
-767664d rgw: put_bucket_info does not override attrs
-d8df1e9 rgw: return default policy if policy attr is broken
-a24145f log: add missing .cc file
-52187c3 log: uninline SubsystemMap mutators
-a6f8fe3 filestore: fix my broken ifdef flow
-188d171 doc: ceph.conf cleanup for cephx authentication.
-695f92d doc: fix broken link.
-d05d98c doc: Added -a to service ceph stop.
-cb5c6b5 doc: Consolidated mkcephfs deployment files.
-dd1d388 osd: fix null dereference
-a3f4d59 doc: Added pools and authentication.
-a167213 mon: fix reweight_by_utilization waiting
-519fadb osd: fix rewewight_by_utilization
-07498d6 filestore: log about syncfs(2) etc support
-6dd93b9 doc: Updated authentication with header canonicalization.
-26ecf60 workloadgen: Fix the statistics output and a bug triggered by coll destruction
-f685f4d filestore: initialize dummy xattr buffer
-5842dcd osd: fix misdirected op check
-504c6ce doc: Add Paxos call chain to doc/mon/
-05469b2 mon: add some info on can_mark_out function
-15a30d9 mon: Do some aesthetic reformatting on the Elector class.
-8c95e8b mon: add doxygen-format comments to the Elector class.
-1816856 mon: Do some aesthetic reformatting on the Paxos class.
-28a64fd mon: add doxygen-format comments to the Monitor class.
-c5015ef mon: add doxygen-format comments to the PaxosService class.
-7064a9c mon: add doxygen-format comments to the Paxos class.
-b46b815 test_filestore_workloadgen: less noise
-92fec42 test_filestore_workloadgen: write zeros, not random bytes
-bb0c7c6 admin_socket: fix unittest
-29e6f8c log: add log flush, dump_recent, reopen admin socket commands
-4e2846b config: add 'set_config <var> <val>' admin socket command
-6849f82 rados.cc: added listomap and getomap commands
-a3f8137 config: add 'show_config' admin socket command
-ab8f6b1 admin_socket: initialize explicitly on startup; disallow changes
-f953c4c librados.h: update rados_object_list_next documentation for key/locator
-1277a46 cephcontext: generalize admin socket hook
-73e29b6 doc: needed carriage returns between headings, code tag and syntax.
-d33f4fb doc: removed redundant install.
-68874af doc: Filled in descriptions for object operations.
-e868b44 ceph.spec.in: buildrequires libuuid-devel
-5eda9b7 ceph.spec.in: drop unnecessary rmdirs
-6601ef9 doc: Restored install for dev/unstable packages.
-ba54062 filestore: make SNAP_DESTROY ioctl check more informative
-07c9eda filestore: fix btrfs subvol ioctl tests
-bea1e03 filestore: verify that op_seq is nonzero
-18b0d65 vstart.sh: wipe out btrfs subvols in osd dirs
-0f38d75 filestore: fix initial btrfs snap creation (on mkfs)
-3ae84ee rgw: replace dump_format() with dump_int()
-9a9418e librados, ObjectCacher: include limits.h for INT_MAX
-8c1c882 rbd.py: Fix seemingly-random segfaults
-2f963fa librados: Remove errant sha1
-6e46de3 rbd.py doc: Fix markup on :class: references
-7805978 filestore: make read_fsid() out arg be a pointer
-386139b filestore: more informative fsid mkfs debug output
-c96aa62 osd: verify fsid whoami to match on repeat mkfs
-5bf5e91 osd: require cluster fsid for mkfs
-a980d01 osd: do not clobber existing key with --mkkey
-c18e4d8 filestore: mkfs: do not clobber exisiting journal if it has matching fsid
-a074d0b filejournal: add check() method
-c498827 filestore: drop useless mkjournal error check
-b04b73d filestore: mkfs: less noise about leveldb creation
-598dea1 filestore: mkfs: only create snap_0 if we created current_op_seq
-ec7bf56 filestore: fix misplaced #endif
-09192d6 doc/api/s3/bucketops.rst Corrected heading. doc/install/chef.rst  Added Sam's edits to the Chef install.
-bf2028f rgw: replace all bad use of formatter->dump_format()
-3956cb8 doc/api/s3 <-chipping away at objectops and clean up. Added Copy Object. doc/source <-fixed a typo, updates for installing on precise, rm $ from cmds doc/start  <-replaced clone link with tarball link. Link to Ceph Source Code.
-36951d6 mon: use temp access_{r,all,cmd} variables to simplify the checks
-f1e4d44 upstart: support mds
-176a14a debian, upstart, osd: osd disk preparation and activation scripts
-18af813 mon: drop redundant get_allow_all() cap check
-1870e12 msgr: add mistakenly-removed msgr->lock.Lock() back in
-475e07a debian: Create placeholder dirs for mon and osd data directories.
-ab04d95 monmap: return ENOENT from build_from_host_list when no mons
-80c6278 monmap: ignore conf mon entries when -m is specified
-8bf9fde (tag: v0.47.2) v0.47.2
-26843ad Makefile: do not install librgw.h
-a330c64 Update ceph.spec for ceph-0.47
-244992d libs3: remove make install target
-cf6db40 Makefile.am: only append libs3 to SUBDIRS when needed
-f461e13 monclient: sanity check on monmap size
-d173c7b monmap: avoid dup addrs in generated initial monmap
-75e9c0c monmap: aseert addrs are unique on add(), calc_ranks()
-c31ab04 doc: librados: fix getxattr return code
-311a23c mon: restrict mon 'join' message/command
-e895d61 mon: apply 'r' and 'w' caps to mon and pg commands
-fb6ed15 mon: apply 'r' and 'w' caps to mdsmap
-c1c93e5 mon: apply 'r' and 'w' caps to osdmap
-880e86b mon: allow health, status, log, etc. messages with 'r' cap
-b7f2791 mon: fix error messages
-def15d7 mon: push down 'auth ...' command auth checks
-7d0552a mon: push down command auth checks to each command
-c43c774 mon: require admin privs to issue any monitor commands
-2dec922 vstart.sh: set HOSTNAME when -l is used
-8701439 mon: fix 'get-or-create-key'
-b01dbcd filestore: leave existing current/
-b7a85a8 filestore: create but do not clobber current/commit_op_seq
-79d6077 filestore: mkfs: only (re)set fsid if not already set
-d923e33 filestore: pass target into read_fsid()
-36503d1 filestore: mkfs: rename buf -> fsid_fn
-143762f filestore: always open/verify basedir; clean up error messages
-58d8faf filestore: do not wipe on mkfs
-05db988 filestore: remove unused 'filestore dev' option
-17c4624 osd: only (re)write_meta files if old content is incorrect
-53b05d5 osd: only create superblock if not present
-ff64818 doc/config-cluster/chef.rst <-fixed an error in upload command. doc/config-cluster/deploying-ceph-conf.rst <-added sudo. required. doc/config-cluster/deploying-ceph-with-mkcephfs.rst <-cd to /etc/ceph so keyring goes there. doc/install/chef.rst <-added update and install opscode-keyring, and upgrade. doc/install/debian.rst <-added ceph-common to the install
-5326937 config: add --show-args option
-1103079 objectcacher: fix infinite loop in flusher_entry
-b0d6895 doc/config-cluster/ceph-conf.rst <-Fixed some formatting issues. doc/config-cluster/deploying-ceph-conf.rst <-minor edit. doc/start/get-involved-in-the-ceph-community.rst <-removed $ from command line instruction. doc/start/quick-start.rst <-added additional steps.
-d7a8084 monmap: calc_ranks() on rename()
-cfe261b crush: check reweight return value
-5959ea7 doc: fix broken link in FAQ
-cf58486 doc: added links from the chef install doc to the chef config doc and back
-6149fb7 doc: Added a FAQ page.
-828f619 msgr: pass a Connection instead of a Pipe through submit_message.
-e3b3108 Added the Swift API as is. Still needs a lot of work.
-de7fb97 obj_bencher: add --show-time option for dumping time
-d93410c doc: document range of methods for cluster creation, expansion
-c9e9896 obj_bencher: adding stddev to bandwidth and latency
-812989b doc: misc updates
-bc9e592 obj_bencher: add min/max bandwidth
-133cd69 mon: fix 'no initial monitors' warning
-3a2dc96 libs3: remove make install target
-f5a9404 (tag: v0.47.1) v0.47.1
-4e3807b Makefile.am: only append libs3 to SUBDIRS when needed
-13b350a filestore: test xattrs on temporary file
-6c0a122 ceph-object-corpus: add some old v2 monmaps
-c06fb20 monmap: fix decoding of old monmaps
-a4d034d qa: fix mon single_host_multi.sh test
-731effb mon: rename ourselves if our name does not match committed monmap
-cd9d862 mon: only rename peers in seed monmap
-e1564af mon: move election msg check into elector
-ee13867 mon: allow mons to rename themselves with the join message
-b4d2b1e monmap: fix rename
-29a158a mon: drop useless rank racalc in init
-dae2f53 mon: fix leak of MonMap
-7b2614b monmap: filter_initial_members -> set_initial_members
-13c86ca Update leveldb to remove CompactionInputErrorParanoid
-7d5fa4e man: Remove leftover --bin from ceph-authtool(8).
-ad663d5 (tag: v0.47) v0.47
-e2e7f58 keys: new release key
-5d2ec1d builder: make reweight helpers static, void
-63580a9 formatter: replace malloc with new
-7eb29ae check malloc return values
-c7daf7a crush: check malloc results
-5b39ae7 osdmap: set name_pool correctly in build_simple*()
-033be2b osdmap: use pg[p]_num accessors
-deccc59 filestore: do not test xattrs on fsid file
-bd5fc0a debian: fix ceph-kdump-copy.init
-31102d3 debian: fix ceph-kdump-copy.init
-3f38605 filestore: test xattrs on temporary file
-34e8169 monmaptool: fix clitests
-1314a00 filestore: do not test xattrs on fsid file
-44fe8c8 osdmap: set name_pool correctly in build_simple*()
-ba2488f osdmap: use pg[p]_num accessors
-69e823e cephtool: restore osdmap handler
-360930a qa: use full paths for mon bootstrap tests
-3f637b8 mon: show quorum names in health warning
-ece33e5 monmaptool: add --generate, --filter-initial options
-1473ef4 monmap: move build_initial() from MonClient
-a68c224 mon: move initial_members filtering into MonMap method
-3c77192 mon: always mark seed/mkfs monmap as epoch 0
-777b739 qa: add mon test for seeding bootstrap mon peers via admin socket
-3920ce3 mon: add -or- update blank mon addr with join command
-434c158 mon: send join message if we are in monmap with blank addr
-6551298 mon: simplify/clean up dummy addrs used for initial members
-dfac925 mon: learn peer addrs when probing
-a5eba52 mon: set our addr when populating monmap with initial members
-fc447bd mon: add peers probing us to extra peer list
-b5bec55 mon: 'add_bootstrap_peer_hint <addr>' via admin socket
-824122d mon: all starting with empty monmap
-aa1ee9b cephtool: multiword admin socket commands
-359fc7b admin_socket: match first word against command
-262d5e2 monmap: move monmap generation from ip/host list into MonMap
-b67bc0b mon: drop mon_initial_hosts
-59ccf9c mon: clean up initial_members code slightly
-0b74b8f qa: add a bunch of mon bootstrap tests
-cba3ca7 mon: ignore election messages from outside monmap
-6c8214f mon: include quorum member names in 'mon stat'
-dc9122c mon: limit initial quorum to mon_initial_members
-585adcf mon: only include monmap mon's in outside_quorum, new quorum
-e1d34cc mon: add set of additional peers to probe
-c7ba9fe mon: use current monmap for initial quorum
-0088699 mon: take probed peer's monmap if it has ever joined a quorum
-c52a4f7 monmaptool: don't increment epoch on modification
-5b18665 mon: pass has_ever_joined in probe messages
-e52093c mon: clean up "joined" flag
-e197e79d mon: add initial quorum config options
-7e6be86 mon: discover peer names during probe
-52c2845 monclient: name resolved mon hosts noname-* too
-2b5ee3e mon: include health in status
-7d6facc mon: move health check into helper function
-d599ede mon: fix a bug that was preventing us from subscribing to some log levels.
-20df432 mon: fix the priority filter.
-9fb3cd2 ceph-authtool: fix clitests
-4832c46 ceph-authtool: fix usage
-ca987d3 msgr: If the Connection has a bad Pipe*, replace it with a good one.
-9125e90 mon: monmap first from 'status' command
-9a1d757 mon: only log map state changes from primary
-78d0d09 cephtool: aesthetic change to ceph -w output
-13a9a15 mon: aesthetic changes to map change log entries
-6b76ac3 Makefile: drop MMonObserve*
-8931656 remove gceph
-a586bdf ceph.spec: don't package gceph
-f943f34 debian: don't package gceph
-035bb12 src: get rid of the Observers throughout the code base.
-8413724 cephtool: Slight rework and pub/sub log support.
-6fe96cb mon: Add publish/subscribe capabilities to the log monitor and status cmd.
-572c756 doc: fix sizes in librbd python examples
-e721271 doc: fix link to hardware recommendations section
-25e7889 doc: fix formatting and a couple config defaults
-62db60b FileJournal: Clarify log message on journal too small.
-96426fa ReplicatedPG: fill in data_off in OSDOpReply
-1ec3245 config: improve comments for rbd caching options
-49c6ad4 librbd: check for cache flush errors
-5e3bc57 init-radosgw: skip sections without host= line
-eaea7aa keyring: drop binary encoder
-ec73281 keyring: always encode in plaintext
-6d4e79a mon: make 'auth get-key <name>' return key
-86f2486 mon: 'auth list' is a read-only operation
-c9b220f mon: 'auth get-or-create-key name capsys capval capsys2 capval2 ...'
-66e2737 auth: EntityName ==, != operators
-d079018 mon: make 'auth get <name>' dump plaintext keyring
-2886358 init-ceph: ignore sections without 'host' defined
-23deb43 ObjectCacher: handle write errors
-59c6816 ObjectCacher: propagate read errors to the caller
-24fddf2 ceph-dencoder: add AuthMonitor::Incremental
-7f14854 mon: use new encoder macros for AuthMonitor::Incremantal
-7aaccac features: explicitly use CEPH_FEATURES_ALL instead of -1
-5156495 mon: fix mon removal check
-0f7bf5f rbd: allow importing from stdin
-48d97fe doc: add ioctx parameter to rbd pybind examples.
-1109c13 librados: avoid overflow in the return value of reads
-2f1f808 ObjectCacher: only perfcount reads requested by the client
-4bc63ce msgr: look for a pre-existing Pipe if the Connection doesn't have one.
-1c53f34 osd: include age in 'slow request' messages
-2b44662 workloadgen: Add transaction throughput infos.
-3d2d0ec Additional documentation theme changes:
-067cd5f monmap: new encoder
-31cb3aa mon: conditonally encode monmap for peer mon during probe
-a9f5d77 monmap: use feature bits and single encode() method
-31dc394 mon: new encoding for MonCaps
-d734381 Objecter: don't throttle resent linger ops
-ac85b9e objecter: ping connections with lingering ops every tick()
-7830f85 mon: use external keyring for mon->mon auth
-7be7810 mon: keep mon. secret in an external keyring
-784d1d3 Documentation theme updates:
-ab717bc Updated link to publications
-5922e2c crush: pass weight vector size to map function
-376f0d5 crush: adjust max_devices appropriately in insert_item()
-320d1eb mon: fail 'osd crush set ...' is osd doesn't exist
-f2380f4 cephfs: pass -1 for old preferred_osd field
-bb74b8b osdmap: filter out nonexistent osds from map
-80bbe5e keyring: make child of KeyStore
-7ce157d utime_t: no double ctor
-90fb403 objectcacher: make *_max_dirty_age tunables; pass to ctor
-82a3600 librbd: set cache defaults to 32/24/16 mb
-d96bf6c test_filestore_workloadgen: name the Mutex variable
-8bacc51 workloadgen: time tracking using ceph's utime_t's instead of timevals.
-772276c workloadgen: forcing the user to specify a data and journal.
-f2a2a6e workloadgen: add option to specify the max number of in-flight txs.
-662729f workloadgen: Allow finer control over what the generator does.
-6c2c883 libs3: trailing / does strange things to EXTRA_DIST
-e20fbac Makefile: drop librgw.so unittests
-99ee622 ceph.spec: kill librgw
-caab859 debian: kill librgw.so
-17114f2 osd: reset last_peering_interval on replica activate
-f4befb3 libs3: dist and distdir make targets
-a46cc71 Makefile: include libs3/ contents in dist tarball
-e2ee197 Makefile: osdc/Journaler is only used by the mds
-2e7251e Makefile: librgw.la -> librgw.a; and use it
-aa782b4 Makefile: libos.la -> libos.a
-938f4ac Makefile: libosd.la -> libosd.a
-d96e084 Makefile: libmon.la -> libmon.a
-7dbcc1c libs3: added 'make check' target
-827d222 debian: build-depend on libxml2-dev
-3851423 objectcacher: make cache sizes explicit
-b5e9995 objectcacher: delete unused onfinish from flush_set
-6f3221a objectcacher: explicit write-thru mode
-c19f998 common: add C_Cond
-38edd3b objectcacher: user helper to get starting point in buffer map
-c8bd471 objectcacher: flush range, set
-b50a4c9 mon: add safety checks for 'mds rm <gid>' command
-a50fbd5 mon: move PGMap[::Incremental] to new encode/decode macros
-8ec476e osd: do not mark pg clean until active is durable
-86aa07d osd: check against last_peering_reset in _activate_committed
-9d7ec04 osd: tweak slow request warnings
-a4b42fc keyring: clean up error output
-ae0ca7b keyring: catch key decode errors
-6812309 debian: depend on uuid-runtime
-3509b03 safe_io: int -> ssize_t
-203a7d6 objectcacher: wait directly from writex()
-991c93e mon: fix call to get_uuid() on non-existant osd
-150adcc debian: add rules for rest-bench
-53f642e rest-bench: build conditionally
-f60444f obj_bencher: changed interface
-d54ef1c rest-bench: change thread context for libs3 calls
-6832231 rest-bench: change command line arg for seconds
-9979132 obj_bencher: fix data encoding
-76a5c89 obj_bencher: use better round robin for completion slot scan
-e2eb825 rest-bench: reuse libs3 handle
-e62fd7f obj_bencher: fix param order
-7e96a4a rest-bench: use refcount for req_state life cycle
-072c316 rest-bench: multiple fixes
-4fe068e rest-bench: cleanups, initialization
-6e04380 rest-bench: create workqueue for requests dispatching
-13296a5 rest_bench: cleanups, implement get and put
-54da3e6 rest_bench: some more implementation
-e6026fe rest_bench: initial work
-f9d9fb6 rados_bencher: abstract away rados specific operations
-0fbc3c5 rados_bencher -> obj_bencher
-1a8eea8 rados_bencher: fix build
-a17124e rados_bencher: restructure code, create RadosBencher class
-ddb858c rados_bencher: restructure code (initial work)
-3e260ae librados: call safe callback on read operation
-edd73e2 crush: note that tree bucket size is tree size, not item count
-ce60e1b OpRequest: ignore all ops while the oldest one is still young.
-f3043fe objectcacher: don't wait for write waiters; wait after dirtying
-f3760da crush: update_item() should pass an error back to the caller
-e0a636f crush: improve docs/comments for check_item_loc and insert_item semantics
-878423f crush: comment and clean up checks for check_item_loc and insert_item
-2629474 global_init: do not count threads before daemonize()
-72538c0 Makefile: fix $shell_scripts substution
-16461ac mon: simplify 'osd create <uuid>' command
-42f2d2f crushtool: another simple test for update
-9772d13 crush: document return values
-1cd6f76 crush: compare fixed-point weights in update_item
-c03b852 thread: remove get_num_threads() static
-e50932c global_init: do not count threads before daemonize()
-684558a crush: clean up check_item_loc() comments
-27d98d2 OpRequest: only show a small set of the oldest messages, instead of all.
-3228643 rgw: update cache interface for put_obj_meta
-b5a18ad doc: fix some underscores
-5125daa osd: drop unused CEPH_OSDMAP*VERSION* #defines
-f15c0bb Fixed link to blog.
-b2100ca Fixed another link to the blog.
-5ac8b58 Fixed link.
-7eca0dd Clean up. Changed ceph.newdream.net to ceph.com. Removed {ARCH} references. Added link to Source.
-91c30b3 doc: more fonts
-cabe74b doc: new theme
-54991ff doc/install/debian: simplify more
-c3dc54b doc/install: reorg, simplify
-dc894ee doc: clarify path names for mkcephfs
-bd8577d doc: simplify quick start
-5465e81 doc: Whitespace cleanup.
-93dcc98 doc: Rename to use dashes not underscores in URLs.
-715a69c doc: Remove leading whitespace, that syntax means it's a definition list.
-3226722 Updated URLs for the new ceph.com site.
-be855d8 objecter: ping connections with lingering ops every tick()
-d49c3d2 Removed "Ceph Development Status" per Bryan Modified title syntax per Tommi Modified paragraph width to 80-chars per Dan Moved "Build from Source" out of Install Renamed create_cluster to config-cluster Added config-ref with configuration reference tables Added a toc ref for man/1/obsync per Dan Removed redundant sections from Ops Deleted "Why use Ceph" and "Introduction to Storage Clusters"
-d14b016 config: $cluster-whatever for admin_socket, log files
-ad0330b config: Admin socket path had literal "name" in it instead of $name.
-461e62f config: Admin socket path had literal "name" in it instead of $name.
-28b1fc8 mon: make 'osd map <poolname> <objectname>' return pg and osd mapping
-4dab4ac ceph-object-corpus: a few instances of the newly encoded types
-7284637 ceph-dencoder: ignore trailing goop after OSDMap and OSDMap::Incremental
-69dcd28 mon: drop 'osd crush add ...'
-33e3547 vstart.sh: use 'osd crush set ...'
-79edba2 mon: 'osd crush set ...' do an add or update
-ee00095 crushtool: extent cli test to include --remove-item and --update-item
-ce5842b crushtool: add --update-item command
-5aadb57 crush: do some docs
-8220ab2 crush: implement update_item()
-bfa7635 crush: add check_item_loc
-eca7eac crush: fix weights when removing items
-76d166f rbd.py: add new error for deleting an image with snapshots
-e20cd4b config: no -C shorthand for --cluster
-ec99775 Edits.
-0fb0ef9 Corrections.
-ee44db4 Significant updates to introduction, getting packages, building from source, installing packages, and creating a cluster.
-4cd44ec doc: document NOIN, NOOUT, NOUP, NODOWN flags and flapping
-7d501fc Removed this. As part of restructuring of install to include admin host.
-f53c820 Minor edits. Still WIP.
-33dc4c2 The new files contain S3 APIs and a build from source doc.
-9b48757 Minor cleanup.
-f8b00f3 Added a new landing page graphic, and made some minor edits on the landing page.
-d7922e0 Removed some files for reorg.
-9f9b7f8 Added a plug for commercial support. ;)
-859da18 Building out information architecture. Modified getting involved, why use ceph, etc.
-bc857d8 Remove reference to Introduction to RADOS OSDs
-b0ee6e8 Added introduction to clustered storage and deleted older files that have been moved.
-541a875 Restructuring documentation.
-a1b31dd Initial cut of introduction, getting started, and installing. More to do on installation. RADOS gateway to follow.
-31fb8f9 Put change to rbd manpage in .rst instead, update man/ from output
-d3a2c56 doc: move documentation build instructions to doc/dev section
-ee26c5d Treat rename across pools as an error Fixes: #2370 Reviewed-by: Samuel Just <samuel.just at dreamhost.com>
-2a93258 doc: add warning about multiple monitors on one machine.
-b41f4d1 rgw: normalize bucket/obj before updating cache
-695d377 vstart.sh: explicitly specify uuids during startup
-09e0828 osd: --get-{osd,journal}-uuid synonyms for --get-{osd,journal}-fsid
-5a2fe97 osd: allow uuid to be fed to mkfs with 'osd uuid' setting
-8ec3920 filestore: allow fsid to be fed in for mkfs
-779914b mon: 'osd create <uuid>'
-78b9ccd mon: fill in osd uuid in map on boot
-ca4311e osdmap: store a uuid for each osd
-c3fb68e osd: make output less ugly
-4d095e9 osd: create a 'ready' file on mkfs completion
-29399ee osd: use fsync+rename when writing meta files (during mkfs)
-bb7e5da PG: Add probe set to HB peers during GetInfo
-b9a54b4 PG: check_new_interval now handles adding new maps to past intervals
-06fd0b6 filestore: allow flusher+sync_flush enable/disable via injectargs
-342e76f filestore: fix op_queue_{len,bytes} instrumentation
-274cd0c throttle: count get_or_fail success/failure explicitly
-81f51d2 osd: pg creation calc_priors_during() should count primary as up
-75a107c throttle: note current value and max in perfcounters
-1acdc57 .gitignore: ceph-kdump-copy
-18790b1 osd: add is_unmanaged_snaps_mode() to pg_pool_t; use more consistently
-22bd5df pick_address: don't bother checking struct ifaddrs which have a null ifa_addr
-292ff7f msgr: include msgr name in dispatch_throttler name
-be6a9a6 msgr: name messengers
-36ac452 throttle: report stats via perfcounter
-ccfb6b3 global_init: don't fail out if there is no default config.
-845718d global: fix incorrect CINIT flag.
-f3771b0 throttle: feed cct, name, and add logging
-7413828 osdmap: do no dereference NULL entity_addr_t pointer in addr accessors
-4c597fa OSD: add different config options for map bl caches
-cefaa7d mon: fix nion -> noin typo
-cb7f1c9 (tag: v0.46) v0.46
-88dda3b librbd: use unique error code for image removal failures
-580b520 run_xfstests.sh: drop #62
-4465c3a osdmap: fix identify_osd() and find_osd_on_ip()
-d64e1b9 osd: keep pgs locked during handle_osd_map dance
-4ae857c mon: drop obsolete osd/PG.h #includes
-d48549d osd: set dirty flags on rewind_divergent_log
-f750c3f osd: use dirty flags in activate(), merge_log()
-36b0257 osd: fix nested transaction in all_activated_and_committed()
-3e84ce8 osd: use PG::write_if_dirty() helper
-fc8ce16 osd: do not merge history on query
-ff9bce9 osd: dirty_info if history.merge updated anything
-a13672f osd: write dirty info on handle info, notify, log
-7fd3360 osd: skip scrub scheduling if we aren't up
-0c860c1 osd: fix dirty_info check for advance/activate paths
-36bfdd8 crushtool: fix clitest now that --force is gone
-8af46a4 run_seed_to.sh: clean out merge cruft
-ebdf80e crush: remove parent maps
-ed974b5 crush: remove forcefeed from crush_do_rule
-c4c59a0 log: do not set on_exit() callback for libraries
-254644a osd: always share past_intervals
-352247e fix file_layout.sh layouts test
-e205e11 mon: 'osd [un]set noin'
-c971545 osd: set dirty_info in generate_past_intervals
-944a431 osd: fill in past intervals during advance_map
-0c65ac6 osd: drop useless PG::fulfill_info()
-7e8ab0f osd: share past intervals with notifies
-0c69140 osd: only generate missing intervals in generate_past_intervals
-db8e20b osd: include past_intervals in pg debug printout
-12d1675 osd: fix check for whether to recalculate past_intervals
-90dae62 osd: PG::Interval -> pg_interval_t
-f922dc4 Stop rebuild of libcommon.la on "make dist"
-e44b126 mon: limit size of MOSDMap message sent as reply
-d1df320 ceph-object-corpus: revert rewind
-4274fd0 osdmap: fix addr dedup check
-06d1bc2 osd: fix bad map debug messages
-a477d6b Stop rebuild of libcommon.la on "make dist"
-510eed0 filestore: fix error message
-f03dc34 filestore: first lock osd mount point, next detect fs type
-10c616a OSD: use map bl cache pinning during handle_osd_map
-d0d6912 simple_cache.hpp: add pinning
-92becb6 FileJournal: simply flush by waiting for completions to empty
-155700d PG: in GetInfo Notify handler, fix peer_info_requested filter
-dbd9912 librados: test get/set of debug levels
-4e2e879 config: allow {get,set}_val on subsystem debug levels
-7f3790a OSD.cc: track osdmap refs using an LRU
-ec1ea6a common/: added templated simple lru implementations
-873e9be osdmap: dedup pg_temp
-ed1024f osdmap: use shared_ptr<> for pg_temp
-207eec6 osd: make map dedup optional
-0188d9b osd: dedup osdmaps when added to the in-memory cache
-4cfbd81 osdmap: drop obsolete PG_ROLE_* constants
-2a46564 buffer: make contents_equal() more efficient
-36d4382 osdmap: dedup crush map
-98b1d8f osdmap: use shared_ptr for CrushWrapper
-e0436cb osdmaptool: kludge to load a range of maps into memory
-d6359d4 osdmap: dedup addrs and addr vectors between maps
-ee541c0 osdmap: filter out nonexistent osds from map
-8f4dba6 librbd: the length argument of aio_discard should be uint64_t
-fe76c5b filestore: interprect any fiemap error as EOPNOTSUPP
-313c156 osdmap: use shared_ptr for addrs, addr vectors
-06af38a osdmap: uninline a bunch of stuff
-10914ca mon: consider pending_inc in {up,in}_ratio for can_mark_{out,down}()
-2a22ff4 mon: thrash pg_temp mapping, too
-6910d83 filestore: fix a journal replay issue with collection_add()
-96108c6 filestore: fix a journal replay issue with collection_add()
-ead5d2a osd: filter osds removed from probe set from peer_info_requested
-3e88017 PG: get_infos() should not post GotInfo
-7fe45fd Revert "PG: whitelist MNotifyRec in started"
-cbe795a test_librbd: rollback when mapped to a snapshot should fail
-f873a77 workload_generator: get rid of our lock.
-436f5d6 TestFileStoreState: make 'm_in_flight' var an atomic_t.
-9579365 PG: whitelist MNotifyRec in started
-be9b38e RefCountedObject: fix constructor warning
-35dc2de workload_generator: specify number of ops to run, or 0 to run forever.
-823afcd workload_generator: Delegate store tracking to TestFileStoreState.
-3903b5a TestFileStoreState: Fix issues affecting proper behavior when inherited.
-22ade4a Makefile.am: test_filestore_workloadgen doesn't need gtests lib.
-39f9935 RefCountedObject: relocate from msg/Message.h to common/RefCountedObj.h
-70f70d8 librados: call notification under different thread context
-8bc818c mon: 'osd thrash <num epochs>'
-fa98479 osd: filter osds removed from probe set from peer_info_requested
-f022a94 mon: add 'mon osd min up ratio' and 'mon osd min in ratio'
-ba1d3b1 mon: use can_mark_*() helpers
-75ccd81 DeterministicOpSequence: add 'ceph_asserts()' where we expect != NULL.
-1966402 TestFileStoreState: distinguish between 'get_coll()' and 'get_coll_at()'
-44dafc8 run_seed_to.sh: Add valgrind support.
-4430c01 TestFileStoreState: free memory on terminus.
-4bfcbe6 mon: decode old PGMap Incrementals differently from new ones
-59957da mon: do not mark osds out if NOOUT flag is set
-2673875 mon: do not mark booting osds in if NOIN flag is set
-9ff535a mon: always remove booting osds from down_pending_out
-addfb2c mon: prevent osd mark-down with NODOWN flag
-f077386 osd: do not attempt to boot if NOUP
-d84255e mon: prevent osd from booting if NOUP
-d3f55dd mon: 'osd {set,unset} {noin,noout,noup,nodown}'
-6003325 osdmap: add NOUP, NODOWN, NOIN, NOOUT flags
-e51772c librbd: pass errors removing head back to user
-ccf7d93 mon: clean up handle_osd_timeouts a bit
-36ffed4 mon: fix pg stats timeout
-7b832f4 mon: fix whitespace
-2b30201 mon: fix pgmonitor ratio commands
-d28f850 test_rbd: add tests for snap_set and more complicated resizing
-7add136 librbd: reset needs_refresh flag before re-reading header
-3ef3ab8 librbd: clean up snapshot handling a bit
-e17b5a8 librbd: clarify handle_sparse_read condition
-2bdaba4 run_seed_to.sh: rework the script, make it more flexible and broaden the tests.
-e65b797 librbd: rev version for discard addition
-19ba347 osdmaptool: fix clitests for lack of localized pgs
-637de4d mon: load CompatSet features on startup
-771fd05 mon: set auid for mon-created pools to 0
-a514344 mon: ignore/remove localized pgs
-f01b6dd test_ioctls: remove preferred osd
-b3cdc21 cephfs: remove preferred osd setting
-198544a mds: remove preferred from ceph_file_layout
-21ef979 client: rip out preferred_pg thing
-6d1344c libcephfs: disable ceph_set_default_preferred_pg
-f164b87 osdmap: do not forcefeed preferred osd to crush
-b8f4acf osd: remove preferred from object_locator_t
-0138a76 osd: ignore localized pgs
-94adf5d osd: remove localized pgs from pg_pool_t
-43d1a92 run_seed_to.sh: remove stray arg
-0112e74 run_seed_to.sh: rework the script, make it more flexible and broaden the tests.
-e9ecd1b perfcounters: tolerate multiple loggers with the same name
-97f507f Makefile: disable format-security warning
-c8377e4 filestore: verify that fiemap works
-7471a9b rados: fix error printout for mapext
-07ddff4 librbd: instrument with perfcounters
-fb9fdf4 librbd: fix ictx_check pointer weirdness by using std::string
-888a082 FileJournal: don't wait flusher until completions are queued
-d1740bd filestore: fix collection_add journal replay problem
-92b299a FileStoreDiff: flip sense of diff*() methods around
-ca369c9 test_idempotent_sequence: Use FileStoreDiff class instead.
-5466ebc test_idempotent_sequence: Output missing options on "usage".
-4746129 FileStoreDiff: check if two FileStores match.
-4ddbbf5 librbd: allow image resize to non-block boundaries
-165038d objectcacher: rename truncate_set -> discard_set, and use discard
-7232396 objectcacher: implement Object::discard()
-5b60343 librbd: fix debug output
-81af4e8 librbd: make discard invalidate the range in cache
-b94d6a6 librbd: fix zeroing of trailing bits on short reads that span objects
-379c5e7 librbd: fix debug output for image resize
-dd78c3d test_librbd_fsx: port newer xfsprogs version
-e861e20 revert to xfstests' fsx, which has discard support
-a8aaa93 admin_socket: add a separate debug subsys/level
-f7699cc log: prefix dump with line numbers
-a68b306 test_filestore_workloadgen: track pg log size in memory
-6b28f55 test_filestore_workloadgen: whitespace
-2834f60 organize test_filestore_idempotent*
-8bb58bc remove hopelessly flawed test_filestore_idempotent
-94ebe8d test_store -> test_filestore
-77c645a test_wrkldgen -> test_filestore_workloadgen
-27efa05 msgr: move locking out of submit_message to its callers
-5a8019e msgr: remove useless block addition.
-f00dab6 ceph-authtool: rename cli test dir
-613d817 ceph-conf: rename cli test dir
-ac874a6 OpRequest: mark_event output is now at debug 5
-f2d4574 config: dump subsys log levels with --show-config
-607a8a3 osd: do not create localized pgs
-8335eb5 rgw: can't remove user that owns data
-9df7f6f msgr: merge the send_message and lazy_send_message implementations.
-a394fb2 msgr: do not establish a new Pipe for any server
-42a49cf msgr: Create a proper Connection* lazy_send_message()
-526cd9d msgr: merge submit_message() functions
-56fc92c FileStore: don't read reference to writeq head after pop_write
-758fa9b rgw: bucket HEAD operation should return 200, not 204
-9cb796a obsync: section 8 -> 1
-5c21f7e msgr: remove the Pipe::disposable flag.
-c470e1a msgr: start moving functions around in Pipe
-db6d467 msgr: fix some spacing issues in Pipe
-fcc4481 msgr: minimally document the SimpleMessenger inner classes
-d3e40e0 msgr: reorder the SimpleMessenger data members a little bit
-501553e msgr: group private data members by type
-146e1a4 msgr: make mark_down_on_empty() behave more consistently.
-09100b6 rgw: HEAD bucket, don't dump rounded size
-9c2251f osd: fix vector array out of bounds
-e82c330 ceph-fuse: only call common_init_finish in child; fix admin socket
-f1de0d6 qa: drop rgw.py from test_python.sh workunit
-d3a57a2 ceph.spec.in: drop rgw.py
-0995d08 Makefile: drop rgw.py
-4390c08 mon: fix full/nearfull ratio initialization
-7fbc0fc msgr: add error code returns to send_keepalive.
-cb43eee msgr: add some validity checks to ~SimpleMessenger()
-0c2c18c msgr: convert global_seq_lock to a spinlock.
-dc4c759 msgr: convert get_policy() to return a const reference.
-aab516d rgw: allow subuser creation on radosgw-admin user create
-c9adf07 msgr: move SimpleMessenger function declarations into good order
-dbe779a osd: dump old ops singly rather than all at once.
-b0532aa osdmap: restructure flow in OSDMap::decode
-bc458bf ceph-object-corpus: prune archive
-ebb19e7 test/encoding/import.sh: fix
-e1622e4 rgw: HEAD bucket also dumps bucket meta info
-0769efa rgw: add x-rgw-* as a possible meta header prefix
-c3bfe45 osdmap: remove bad cct reference
-eea982e osdmap: workaround old bug that zeroed pool_max
-ee22c97 python-ceph: remove rgw bindings
-eb8a8fd pgmap: allow Incrementals to specify [near]full_ratios of 0
-88525ea pgmon: add "set_full_ratio x" and "set_nearfull_ratio x" commands
-882bd5b pgmon: convert PGMonitor::prepare_command to our standard infrastructure.
-1242b75 pgmon: remove the PGMonitor update_full_ratios stuff
-f1152e6 mon: only fill in full/nearfull sets if the ratio > 0
-841f288 mon: unconditionally encode PGMap full ratios in the Incremental
-5a6bbd0 rgw-admin: user create is idempotent
-413d8be osdmap: dump pool_max
-4627b67 msgr: Document remaining SimpleMessenger functions and data members
-1f6b7f8 msgr: Group the SimpleMessenger functions following the Messenger's pattern
-dcd34fc FileJournal: let peek_write return a reference
-6561484 common: add blkdev.{h,cc}
-82d7a68 rbd: fix probe of source when block device
-41cb40a filestore: factor block device size probe out into helper
-dea8536 FileJournal: clarify locking in header
-377f75f OpRequest: mark_event output is now at debug 5
-98e2369 librados: add methods to check and wait for safe/complete -and- callback
-001aa46 msgr: add a little detail to mark_down_on_empty() and mark_disposable()
-a422c47 msgr: remove out-of-date comments and function
-2eb2aa5 msgr: group functions more appropriately
-0be9718 librbd: 'rbd cache enabled' -> 'rbd cache'
-6cbda4c qa: comment out xfstest 232
-e0ec286 objecter: recalc pgid in case it wasn't a precalculated pgid
-f22da6c cls_rgw: rgw_dir_suggest_changes move cur_disk_bl inside loop
-31d0d1d librados: test get_pool_name
-2dbea12 librados: C bindings for get_pool_name()
-2f5af83 Filestore: fix guard errors in COLL_REMOVE and COLL_MOVE
-6868ec6 rgw: skip empty entries when listing a bucket
-f87a6a0 cls_rgw: rgw_dir_suggest_changes() don't try to decode cur_disk
-73badda cls_rgw: don't zero out error code before reading value
-20ab74e test_librbd: fix write sizes
-81c8a7b test_idempotent_sequence: no config file
-a40fe5b run_xfstests.sh: ensure cleanup on errors
-3d187db run_xfstests.sh: pass test result via exit status
-a4dd920 objclass: fix cls_cxx_map_remove_key()
-b352a3e rgw: call dir_suggest_changes with correct bufferlist
-a31392c objectcacher: name them
-28e6181 librados: add IoCtx::get_pool_name() to c++ api
-d80c126 ObjectCacher: use "objectcacher" instead of the CephContext::name for perfcounter init
-f355875 ObjectCacher: group all the function definitions properly
-6257a94 ObjectCacher: add a bunch of perfcounters
-446b5e2 ObjectCacher: move functions out of the header.
-72a7573 objectcacher: perf skeleton
-2cc854f msgr: Document all the functions in the Messenger interface.
-b8207dd msgr: remove several functions from the interface.
-bf8847e qa: add run_xfsests.sh script
-ee69f27 test/rbd/fsx: fix signed/unsigned warnings
-812c7c7 librbd: implement discard
-30805bf test_librbd_fsx: clean up properly
-78d14da librbd: flush pending writes when a new snapshot is created
-b26d702 test: port fsx to run on an rbd image instead of a file
-5c2d5b1 test: copy fsx to rbd directory
-9c8b3f7 .gitignore: clean up to not match so many things recursively
-f464e6c ObjectCacher: include object when outputting a BufferHead
-d9aa81b finisher: add indent settings header
-55b6554 test_librbd: flush before opening another handle to the image
-6cf2265 ObjectCacher: remove useless conditional
-20be92e ObjectCacher: always delete callback in commit_set
-ee9987b librados: debug logging for aio writes
-7868dbe ObjectCacher: remove unused/unimplemented methods
-1dd9c30 ObjectCacher: remove redundant 'public:'
-7197825 Remove unused Completion.h header
-d0b1f72 ObjectCacher: add some asserts about when the lock is held
-68e2e00 librbd: flush cache before creating a snapshot
-bb35ecf librbd: fix bytes read accounting in read_iterate
-579d30b librbd: check for writes to snapshots
-c007377 librbd: allow writeback caching
-9546c15 librbd: remove writeback window
-d6dbff0 ObjectCacher: remove dependency on Objecter
-abbfd93 Filer: make file_to_extents static
-cbbd5f9 ObjectCacher: check for read/write errors
-34a10fa librados: do aio callbacks in async thread
-a0fc333 librados: unconditonally associate IoCtxImpl with AioCompletionImpl
-cc1ae67 filestore: flush log on failure injection
-f052c82 run_seed_to: assume tool is in path, not cwd
-4fc48e5 run_seed_to_range.sh: run filestore idempotent sequence tests over a range
-a8b9b98 run_seed_to.sh: set -e
-95bb423 filestore: use our assert
-c772984 test_idempotent_sequence: simple test script
-2cb0032 DeterministicOpSequence: writing to object being cloned in the same tx.
-bb0499a test_idempotent_sequence: outputting collection being diff'ed.
-21be4ad test_idempotent_sequence: Add more info on diff's dout's.
-2d24eb3 FileStore: don't return ENOENT from object_map getters
-56fb027 test_idempotent_sequence: make get-last-op return 0 if no txns applied
-2d20b4c test_idempotent_sequence: return true from diff if different
-08cf4d2 test_idempotent_sequence: include object name in diff output
-a5f533a test_idempotent_sequence: fix diff return value, mount behavior
-1b45129 test_idempotent_sequence: fix/enable do_coll_add
-27cb82e test_idempotent_sequence: use get_obj_at() for clone source
-794fc0b test_idempotent_sequence: fix collection_move arg order
-84175c7 VerifyFileStore: delete from tree
-4289911 Makefile: remove VerifyFileStore from test_idempotent_sequence build
-2c940a4 test_idempotent_sequence: Remove references to VerifyFileStore
-e270e0b test_idempotent_sequence: diff two stores.
-5d30581 test_idempotent_sequence: add remove op
-bec1e50 test_idempotent_sequence: remove existing target for collection_add
-db3d14b test_idempotent_sequence: fewer objects per collection by default
-51bc6df test_idempotent_sequence: make object names overlap
-c056f60 test_idempotent_sequence: simplify clone
-bc5dffe test_idempotent_sequence: replace on coll_move
-a8c3205 test_idempotent_sequence: whitesepace
-5786694 test_idempotent_sequence: implement get-last-op
-795274b test_idempotent_sequence: include tx number in each transaction
-9dba317 test_idempotent_sequence: require nonexistent filestore dir
-5ced86b filestore: init filestore_kill_at in ctor
-975e59a test_idempotent_sequence: Add commands and lose a couple of optional args.
-a5a8395 filestore: name internally
-01daa88 test_idempotent_sequence: no need to reinject value that is already there
-4a6cfcb deterministicopseq: add collection_rename() support
-dee47bb test_idempotent_sequence: Generate a reproducible sequence of txs.
-6573690 VerifyFileStore: Check if two FileStore's match after applying a set of operations.
-2f02a8a DeterministicOpSequence: Generate a reproducible sequence of operations.
-8322755 TestFileStoreState: Represent a FileStore's state to be used by tests.
-f400179 filestore: two-phase guard
-dfcadc9 filestore: simple failure injections via --filestore-kill-at <n>
-583c79a filestore: fix collection_add argument names
-8d3acb5 filestore: replay collection_move using add+remove
-c6551fb test_rados.py: add basic tests for the Object class
-7679968 rados.py: fix Object.read argument order
-5ce8d71 FileJournal: allow write_thread and write_finisher to run in parallel
-dc44950 filestore: implement collection_move() as add + remove
-dc10d04 OSD: improve information and format of OSDTracker messages
-3d11455 osdmaptool: fix clitest for lpg_num 0
-8a6c3c1 msgr: dispatcher: Documentation of security functions
-9b2aff2 FileStore: don't return ENOENT from object_map getters
-241c5e5 msgr: Reorder functions to reduce the number of privacy tags.
-5cf7628 msgr: miscellaneous fixes.
-8e5f562 DBObjectMap: check in clone and link that source is not destination
-308c1fc filestore: use config observer to start/stop dumping/tracing
-816a512 objectstore: tweak dump() a bit
-7223f00 filestore: dump transactions sets, include seq and trans_num
-ddbaf58 filestore: remove commented code, fix whitespace
-9565a8b ObjectStore: Remove code duplication when dumping transactions.
-6a7bbe8 filestore: dump transaction in json on error
-6ee0b71 filejournal: dump injson
-cfac4a9 pgmon: clear out osd reports after the OSD has gone down
-119dd5a mkcephfs: update man page
-4a4b799 ceph-authtool: update man page
-ab08fb8 mkcephfs: note that btrfs (and --mkbtrfs) are optional and experimental
-ee39291 ceph-authtool: add warning to man page
-11b93d3 osd: disable localized pgs by default
-8836b81 mon: alloc pgp_num adjustment up and down
-58671a4 mon: command to disable localized pgs for a pool
-83e1260 mon: set pgp_num == pg_num (by default) for new pools
-7fdf25b debian: python-support -> dh_python2
-ed0653b COPYING: doc/ CC BY-SA
-6e83e11 README: update
-84efc55 debian: drop unnecessary conflicts on librgw
-9678c09 init-radosgw: start in runlevel 4
-af50273 obsync: include man page in tarball, packages
-838a761 ceph-rbdnamer: include in dist tarball and debs/rpms
-292898a init-ceph: start at all runlevels
-c3e4c5b filestore: cleanup: flip sense of replay guard check
-85db25e filestore: fix fd leak on collection_rename
-df4d7a4 filestore: fix collection_rename guard
-4bd9d1b filestore: fix collection_add guard
-be5b25b filestore: fix collection_move guard
-43de5e4 FileStore: dumping transactions to a file
-cd4a760 osd: fix heartbeat set_port()
-1775301 osd: reenable clone on recovery
-6fbac10 osd: allow users to specify the osd heartbeat server address.
-4f030e1 osd_types: fix off by one error in is_temp
-31f16a4 rgw: list multipart response fix
-89fecda Makefile.am: remove some clutter
-0aea1cb (tag: v0.45) v0.45
-d348e1a configure: --with-system-leveldb
-34cc308 filestore: fix leveldb includes
-0b2e1cd cephfs: fix uninit var warning
-f79b95e Makefile: add missing .h to tarball
-8d5c87a rgw: fix object name with slashes when vhost style bucket used
-853b045 OSD: use per-pg temp collections, bug #2255
-bd518e9 encoding: fix iterator use for struct_len copy_in
-36d42de buffer: allow advance() to move an iterator backward
-dd8fd16 configure: HAVE_FALLOCATE -> CEPH_HAVE_FALLOCATE
-8e1cc8a init-ceph: manage pid_file from init script
-81d2cbe config: move /var/run and /var/log defaults to config_opts.h
-dfa043d config: {osd,mon}_data default to /var/lib/ceph/$type/$cluster-$id
-7680cda dencoder, rgw: make ceph-dencoder load much faster
-9832696 encoding: use iterator to copy_in encoded length
-689ac5d (tag: v0.44.2) v0.44.2
-e0c4db9 FileStore: do not check dbobjectmap without option set
-38e24b1 config: include /etc/ceph/$cluster.keyring in keyring search path
-57dff03 config: expand metavariables for --show-config, --show-config-value
-cfee033 config: parse fsid uuid in config, not ceph_mon
-2c14c8b config: add distinct UUID type
-2c0dc47 global: add -C or --cluster early args to specify cluster name
-930a669 config: add cluster name as metavariable; use for config locations
-bda562f config: implement --show-config and --show-config-value <option>
-f18b219 test_workload_gen: fix logging
-32b5d0f config: remove obsolete bdev_* options
-0e5d087 README: update instructions
-0df6fbd rados: fix rados import
-0921c06 config: drop loud ERROR prefix
-b9185bb osdmap: allow row, room, datacenter, pool in conf for initial crush map
-4313a2d crush: don't warn on skipped types
-56a6aa7 osdmap: set 'default' pool type correctly
-dd7b84a ceph-fuse: fix log reopen when -f is specified
-e859611 osd: define more crush types
-2dbdadb test_rewrite_latency: check return value
-493344f Makefile: add mssing header
-d57d8af rgw: throttle at num_threads * 2
-a31efd9 filestore: print Sequencer name in debug output
-756621d msgr: clean up Pipe::do_sendmsg.
-9f10a99 msgr: write minimal documentation for the tcp functions.
-e966c39 msgr: make a bunch of stuff private.
-096971d msg: update the Dispatcher and Messenger documentation
-36ec8e9 dispatcher: fix documentation for ms_handle_reset
-cbe13ab msgr: rename set_ip() -> set_addr_unknowns()
-607f35e msgr: Remove _my_name and ms_addr, replace with direct access to my_inst.
-77f4566 msgr: store the entity_inst_t in the Messenger.
-6374d06 buffer: implement a contents_equal function on bufferlists
-5681461 msgr: change the signature of get_myaddr()
-45a76ea msgr: get_connection() is required to establish a connection if none exists.
-e80126e test: fix monmaptool help text
-e06436e cls_rgw: guard decode
-ebb487a cls_rgw: reset return code in some cases
-a893842 librados: fix exec test
-57f5247 doc: disable broken 'doxygenclass' class in librados c++ doc
-e40cf8c test_workload_gen: fix Sequencer ctor
-addc744 rgw: check for subuser existence
-e792cd9 filestore: fix ZERO fallback write
-8434caf qa: test_rewrite_latency
-f8a5386 osd: fix error code return from class methods
-15f0a32 monmaptool: make clear you can set the fsid when making a new map.
-208daeb ceph_mon: fix fsid parsing.
-aa31035 osd: update_stats() on reads too
-2878865 log: dump_recent in fatal signal handler
-f7f65eb osd: fix typo in debug message
-df5860f objectstore: name Sequencers
-29c01f2 ceph_common.sh: Remove dead code.
-ba6bb4c man: Oops, update ceph-mon(8) for real. Sorry about that.
-541a543 man: Update ceph-mon(8) after reStructuredText syntax fixes.
-2c54244 doc: Remove duplicate anchor from (unused) overview doc.
-1ec47db doc: Convert the mailing list mention to not be a section heading.
-b162696 doc: Fix reStructuredText syntax errors.
-2d1a96d add include/stringify.h
-b25817a FileJournal: check pwrite return value when zeroing journal
-41f84fa filestore: set guard on collection_move
-f89f98d osd: clear RECOVERING on start_peering_interval
-3cdd8d5 osd: more heartbeat debug
-efc27f1 osd: don't fail new heartbeat peers
-21e6e2b osd: ignore peer epoch of 0 on ping reply
-e1a5891 osd: discard heartbeat_peer in note_down_osd
-33b9187 osd: rename hbin -> hbclient, hbout -> hbserver
-fe5f033 osd: send pings from hbin
-4e2f0d1 osd: simplify heartbeat logic
-eebc9ec test: test_workload_gen: Add callback for collection destruction.
-424b5b0 ceph: --concise by default, add --verbose option
-409b648 config: drop old debug_* items
-5d981b1 rgw: add unittest just to verify we link
-69b0172 config: fix librados, libcephfs unit tests
-1c8ec70 PG,ReplicatedPG: update missing_loc_sources with missing_loc
-05ef3ba ReplicatedPG: fix loop in check_recovery_sources
-c39ed56 test: test_workload_gen: Fixing a memleak.
-b3069e5 ceph_argparse: drop useless declaration from unit test
-4269f8d ReplicatedPG: ctx might not contain an OpRequest
-135a11b FileJournal: optionally zero journal on create
-d026cdc FileJournal: use DSYNC for directio path
-2486c61 FileStore: Pass OpRequestRef into filestore in queue_transaction
-533bbf7 osd/: OpRequest implements TrackedOp for passing into filestore
-4f0d170 test: test_workload_gen: Change CLI option and add '--help' usage.
-18d219e rgw: replace dout with ldout
-a3bdf05 test: test_workload_gen: Default arguments, and minor changes.
-37cdbcd log: fix up unittest
-d172b40 test: test_workload_gen: Destroy collections.
-8948ad0 test: test_workload_gen: CodeStyle compliance and cleanup.
-3770096 test: test_workload_gen: Mimic an OSD's workload.
-36c2f27 osdmaptool: fix clitest conf filename
-ffc468f osdmap: less noisy about osd additions during buildmap
-ca1f79b dout: no newlines on dout_emergency
-d536096 throttle: fix off by one issue
-a52d048 rgw: throttle incoming requests
-30cadf0 prebufferedstreambuf: fix typedef
-16b60b3 rgw: minor style fixes
-4d74a7b osd: fix handling of recovery sources when osds go down
-8fdde24 osd: remove down osds from peer_*_requested maps
-1ee6087 osd: maintain missing_loc_sources
-5dbb971 rgw: all intent log operations are now async
-0b1e3ed osd: increase default heartbeat_interval to 6 seconds
-6984449 rgw: remove pool_list(), can't list_objects() on system buckets
-2e9079c rgw: intent log processing uses new pool_iterate()
-2acf4ae mon: Paxos needs to store the latest version permanently on-disk.
-c3b0464 paxos: share_state sends every unknown value, including the stashed one
-d5c4015 uclient: We want to release cache when we lose the CACHE cap, not gain it!
-d0ba27a doc: add a short thing on kernel client troubleshooting.
-c89b7f2 (tag: v0.44.1) v0.44.1
-6044c5b hadoop: define subsystem, fix logging
-fe56818 config: configure log thresholds
-ce61a83 log: throttle message submission, trim recent
-339956d log: don't spam -1 to syslog; add err_to_syslog for consistency
-17a95c2 log: use PrebufferedStreambuf
-bfa2bcd prebufferedstreambuf: fix get_str()
-0e3c0c4 bench_log: flush
-3a87e45 log/EntryQueue: no implicit trim
-f66e075 utime_t: sprintf() method
-6ab8526 do_autogen: control optimization level
-362ca19 log: move create_entry() into Log interface
-8c5046f bench_log: simple util to time how long it takes to log stuff
-23f0af3 test log performance with PreallocatedStreambuf
-a450927 common: add PrebufferedStreambuf
-abfadb9 assert: dump recent log entries on failed assertions
-c7242bf log: flush on_exit
-f41887e log: new logging infrastructure
-974a201 objecter: don't call op_throttle_ops.take(1) unconditionally
-679cd1f objecter: add in-flight ops throttling
-d6b0cbd config: use our assert
-c3dc6a6 msg: assert pipe->msgr == msgr
-483fcf8 doc: include crush in toctree
-3bd1f18 doc: few notes on manipulating the crush map
-6db7715 doc/dev/peering.rst: fix typo
-1a0360c osd/: OpRequest is no longer a RefCountedObject, remove puts/gets
-ea377a0 osd/: Convert OpRequest* to OpRequestRef
-2cb6c7d OSD: Add typedef for shared_ptr<OpRequest>
-3ed784c osd/: add mark_event to OpRequest and move tracking into OpTracker
-e478a75 vstart: enable omap for xattrs
-3ab2895 don't override CFLAGS
-d3bcac2 Makefile: fix modules that cannot find pk11pub.h when compiling with NSS on RHEL6
-b5641ef rgw: don't #include fcgi from rgw_common.h
-2ec8f27 rados_bench: generate_object_name now takes a buffer length
-21a170e doc: dev/peering.rst edits from Greg
-8fa904a doc: update dev/peering document
-de86763 msgr: fix tcp.cc linkage
-fd9935b cephtool: don't prefix log items
-2e21adf Objecter: resend linger_ops on any change
-52aff48 ObjectStore: Add collection_move to generate_instances
-ec52eeb FileStore: remove src on EEXIST during collection_move replay
-23313ee FileStore: whitelist COLLECTION_MOVE on replay
-b47454b ObjectStore: add COLLECTION_MOVE to dump
-1b2a066 ceph-kdump-copy: add tools for saving kdumps
-3caa431 ceph: define and use a shell_scripts Makefile variable
-d0e8f14 doc: update list of debian dists
-7236178 Objecter: resend linger_ops on any change
-3019d46 TestRados: Add watch
-4760536 rgw: keep pool placement info also in cacheable location
-2998368 rgw: remove unused definition
-f1563a6 Revert "Objecter: add op->resend_on_any_change"
-fc7a1bd ReplicatedPG: return -EBUSY on delete for objects with watchers
-c53194d Objecter: add op->resend_on_any_change
-2daff0e ReplicatedPG: osd_max_notify_timeout -> osd_default_notify_timeout
-6a5cbec rgw: replace bucket_id generation
-cdd5298 (tag: v0.44) v0.44
-e42fbb7 rgw: process default alt args before processing conf file
-e0b8f7a rgw: process default alt args before processing conf file
-51a0733 rgw: incrase socket backlog
-5b33198 rgw: fix internal cache api
-f923b84 OSD: do not hold obc lock in disconnect_session_watches
-fd85130 ReplicatedPG: there should be no object_contexts during on_activate
-77c08f8 osd: fix object_info.size mismatch file due to truncate_seq on new object
-619fe73 .gitignore: xattr_bench
-3a6c085 heartbeatmap: use utimes(2) instead of futimens(2)
-63ec06b osd: remove special handline for head recovery from clone
-d8bcc1b config: fix recursive locking of md_config_t::lock
-15d85af osd: explicitly create new object,snap contexts on push
-d4addf5 osd: re-use create_object_context() in get_object_context()
-58c5d5a osd: ReplicatedPG::create_object_context()
-96780bd osd: create_snapset_context()
-872bdd0 osd: ensure we don't clobber other *contexts when registering new ones
-a49a197 ReplicatedPG,FileStore: clone should copy xattrs as well
-2a593dd RadosModel: test xattrs with omap
-14506dc FileStore: add support for omap xattrs
-b09fb15 ObjectMap: use Index object for locking rather than path object
-ecd875f tests/: Added xattr bench
-8fc4317 config_opts.h: opts for omap_xattrs
-fdb9274 test_object_map: update unit test for xattr
-d8325e5 DBObjectMap: implement xattr interface
-983fd19 ObjectMap: add interface for storing xattrs
-9fd4a12 DBObjectMap: add support for storing xattrs
-0904c7b configure: fix warnings
-f2e6b8d ReplicatedPG: populate_object_context during handle_pull_response
-4cfc34f leveldb: .gitignore TAGS
-5db6902 leveldb: un-revert
-89ccd95 osd: maybe clear DEGRADED on recovery completion
-826d30f rgw: remove extra layer of RGWAccess
-80e2a5e msgr: switch all users over to abstract interface
-1e1453c msgr: introduce static Messenger::create() function
-d26feff msgr: promote more methods to abstract Messenger interface
-c2af646 rgw: put_obj() uses bufferlist instead of extra alloc/copy
-2b3bfd0 rgw: remove fs backend
-bec47b5 introduce CEPH_FEATURE_OMAP
-8c96fd2 leveldb: new .gitignore entry
-20d1171 osd: rev cluster internal protocol
-a0bcab5 ceph-fuse: make big_writes optional via 'fuse big writes'
-5912312 rgw: remove some more globals from librgw
-d90298d ceph-dencoder: don't use rgw types if configured without rgw
-213a3f5 rgw: fix identation
-60524ab Added documentation for building the ceph documentation.
-b909761 rgw: get rid of references to g_ceph_context where required
-e455d38 doc: update project status/stability blurb
-e696925 global: drop yellow warning on startup
-e5934f1 qa: kclient/file_layout.sh: ...
-16f9960 osd_types: use uint64_t for ObjectExtent offsets and lengths
-095c3a0 OSDMap: make get_pools() const
-db12627 ObjectCacher: remove unused and crufty atomic sync operations
-5f92f33 librados: move methods that require an IoCtx to IoCtxImpl
-8f27864 librados: split into separate files and remove unnecessary headers
-98792e9 rgw: add more meaningful tests instances of encoded objects
-dfe50bc build-doc: use alternate virtualenv dir, if specified
-6869c57 test_idempotent: fix global_init call
-401a571 qa: kclient/file_layout.sh poking
-7e0e7ce rgw: modify bucket instance for encoding test
-f20f6ea test: add test_filestore_idempotent2
-6ca070a FileStore: ignore ERANGE and ENOENT on replay
-9969bba FileStore: clarify debug/error output
-e19417e Makefile.am, rgw: remove fcgi dependency where not needed
-3ff5492 rgw: add more meaningful test instances of some encoded objects
-31578c1 rgw: tone down some log messages
-452b124 rgw: provide different default values for 'debug rgw'
-2c88f85 config: alternative config options for global_init()
-968d29d qa: use recent kernel for kernel_untar_build.sh
-9316439 rgw: switch ops log flag to use ceph config
-c9898f4 filestore: fix op_num offset/labels
-7c75349 config: tmap to omap upgrade, true by default
-3bba6b7 Makefile: link libfcgi to librgw
-945218c qa/workunits/kclient/file_layout: escape *
-a849787 filejournal: less log noise
-0851b74 filestore: remove unused bool idempotent
-6980ed9 filestore: fix arguments
-9b2a5c5 filestore: sync object_map on _set_replay_guard()
-c9550c5 omap: add sync method to ObjectMap
-13afce8 filestore: remove old post-idempotent transaction trigger_commit
-6613b41 filestore: guard collection_remove replay
-51372a7 filestore: guard replay of collection_add
-4ea6e0d filestore: guard replay of basic collection ops
-dd284c4 filestore: guard collection_rename replay
-63d2c93 filestore: fix collection_rename error code
-e99940d filestore: guard clone replay
-f8a047f filestore: implement _set_replay_guard, _check_replay_guard
-3b47c6b filestore: maintain SequencerPosition during _do_transaction
-e81bc97 filestore: fgetxattr helpers/wrappers
-babb1e9 add SequencerPosition type
-a6077f6 filestore: pass trans_num into _do_transaction
-808812a filestore: use proper type for readdir_r tmp
-1184497 levedb: fix commit
-7f9cfdd RadosModel: fix omap_clear case in RemoveAttrsOp
-799e6f9 rgw: fix rgw_cls_list_ret ctor
-b71d814 ceph-object-corpus: added 0.43
-b4f0578 test/encoding/import.sh: fix target directory
-b66cdea Makefile.am: update link dependencies for some unit tests
-09949b3 rgw: various encoding related fixes
-e43546d osd: fix watch_lock vs map_lock ordering
-80d9252 osd: update_heartbeat_peers as needed
-619244d rgw: implement dump() for encoders
-2277fb4 rgw: add stubs for dencoder test
-ac28b60 ceph: document the way files are laid out
-1ed1d46 librados: fix unit test for omap_get_vals_by_key rename
-ce43bd5 osd: format time nicely in ops_in_flight output
-934ee48 librados: fix map -> std::map in header, string -> std::string
-fafbddd doc: example of diagnosing radosgw hang
-99cb994 doc: explain how unfound objects happen
-47ce7ad doc: make osd failure example include >3 osds
-80864a1 testrados: fix omap_get_vals_by_keys call
-e7e3bae osd: add zero_to field to PG::OndiskLog; track zeroed region of pg log
-ed6cc47 filestore: use FL_ALLOC_PUNCH_HOLE to zero, when available
-1468d95 osd: fix op_wq vs pg->lock ordering
-465a88e rgw: append the currect bucket marker when removing bucket
-72d678b cls_rgw: fix rgw_bucket_init_index
-eaafc57 rgw: remove extra unused params from omap_get()
-765962d rgw: add cls_cxx_map_clear
-afe2598 leveldb: drop compaction unit test
-4d6578c ReplicatedPG,librados: add filter_prefix to omap_get_vals
-e074439 rgw: use prefix filter for bucket listing
-4c90844 objclass, cls_rgw: add prefix to omap_get_vals()
-a6b524f librados: add higher level call for omap_get_keys() with prefix
-ffcf62f rgw: switch to new encoders/decoders
-ffae4df enconding: add legacy decoder for 32 bit versions
-b0c9d58 rbd: pass all mon addrs when mapping devices
-65d170a msgr: remove declaration of undefined SimpleMessenger::write_pid_file
-9dc7c65 msgr: remove SimpleMessenger::get_ms_addr() in favor of Messenger::get_myaddr
-4d0bcdc objectstore: fix collection_move() encoding
-0a59d08 ReplicatedPG,librados: add filter_prefix to omap_get_vals
-6bf7201 rgw: some minor cleanups
-5f8ffde objclass: fix cls_cxx_map_write_header
-799c8ac cls_rgw: fix debug message
-9ba96c0 osd: make degraded pgs count missing replicas as degraded objects
-184a9dd mon: fix full osd detail
-a300db3 mon: assign severity to each health summary/detail item
-bd97923 doc: fix misc typos, bad phrasing
-f266d5a objclass, cls_rgw: update to use omap
-b0ed78c doc: 2 words about radosgw failures
-0becb84 doc: talk about mon failures a bit
-ab41d67 doc: fix link
-25cceca doc: slow osd requests
-75ad897 doc: diagnose full osd cluster
-956e2e2 mon: list nearfull/full osd detail
-2bec51a doc: describe 'stuck' states we check for
-d72b821 doc: document some osd failure recovery scenarios
-2b87d4f osd: list might_have_unfound locations in query result
-2822fe5 mon: include unfound count in health detail
-8b0bd12 mon: refactor health, include optional detail
-8544629 rgw: switch to omap api
-6c0cb55 leveldb: remove flawed unit test for now
-7012c20 librados: rename omap_get_vals_by_key to omap_get_vals_by_keys
-1fefb14 librados: add high level omap calls
-7fc779a rgw: fix warning
-f85ab71 rgw: read bucket through tmap_get
-b6c2e83 test_rados_api_aio: add omap
-4c4fcea osd: testing for tmap auto upgrade
-adace1c ReplicatedPG: transparently upgrade TMAP
-2abf377 RadosModel: Add omap operations to RadosModel
-8228798 ReplicatedPG: Add omap ops to ReplicatedPG
-81c22df librados: Added omap operations to librados
-d2bf68d osdc: Add omap operation stubs to Objecter::ObjectOperation
-b85f7d7 ReplicatedPG: add omap_header to recovery
-d8dcb28 librados: add tmap_put to ObjectWriteOperation
-195301e mds: respawn when blacklisted
-769ef36 journaler: add generic write error handler
-8618640 .gitignore: src/ocf/rbd
-e3b4ba9 filestore: create snap_0 on mkfs
-a14d44f filestore: drop useless read_op_seq() arg
-affda7c rbd OCF RA: fix whitespace inconsistency
-d36b6a9 osd: use new collection_move() operation
-14929e4 filestore: implement OP_COLL_MOVE
-f43c3d9 objectstore: OP_COLL_MOVE
-5137f64 objectstore: use enum for OP_*
-d874009 objectstore: remove _fake_writes, _get_frag_stat
-737132b filestore: drop trim_from_cache, is_cached
-3cd5e31 objectstore: remove cruft
-97993f6 filestore: remove collection, attr faking
-d0c6ad0 rgw: cancel bucket update if operation failed
-1485758 cls_rgw: add cancel operation
-4e9ebd6 rgw: make sure correct locator is used
-e0650ce rgw: implement copy using new scheme
-53a2ceb rgw: don't use locator for multipart uploads
-dfcb841 rgw: multipart object working with manifest
-578c051 rgw: manifest object contains source offset info
-d409c31 rgw: basic functionality of new atomic get/put works
-20244d6 rgw: get_obj uses manifest
-c076e35 rgw: atomic objects hold manifest header
-e36940a rgw: atomic processor writes to shadow object
-3e95dfd osd: delay non-replayed ops during replay
-702f09e librados: close narrow shutdown race
-743da9b osd: don't trust pusher's data_complete
-e1a9e18 osd: warn if recovery still has missing at end
-c31b869 OCF resource agents: add rbd
-75cbed6 DBObjectMap: remove stray ;
-0272b59 LevelDBStore: #include types.h
-004ec66 .gitignore: *.tar.bz2
-6e2a16b msgr: start re-ordering functions into a better order
-38bec5d msgr: remove refcounting of Messengers.
-091b176 msgr: make nonce a required part of the SimpleMessenger constructor.
-26e48f4 msgr: Require that init functions are called before bind() and start().
-29be528 librados: remove gratuitous call to add_dispatcher_head.
-cd174c5 msgr: promote the started bool to Messenger.
-578bc9c msgr: Remove the SimpleMessenger::bind() nonce parameter.
-ef24477 msgr: Remove the SimpleMessenger start/start_with_nonce distinction.
-ffa5955 msgr: Remove SimpleMessenger::register_entity
-3bd1d2a msgr: add start() and wait() stubs to the Messenger interface
-70360f8 github.com/NewDreamNetwork -> github.com/ceph
-cacf0fd filestore: fix rollback safety check
-9fa8781 (tag: v0.43) v0.43
-3a83517 RadosModel: separate initialization and construction
-cd31388 librados: only shutdown objecter after it's initialized
-2c275ef Makefile: add headers for distcheck
-feaf44e ReplicatedPG: Add omap to recovery
-9331e63 MOSDSubOp: Add entry for omap recovery
-6a624b9 test: Add KeyValueDB atomicity checker
-82199d5 os/: DBObjectMap and KeyValueDB interface with tests
-2ab6f02 ObjectStore.h: Initial ObjectStore omap interfaces
-e9dd01f os/CollectionIndex: Add debugging constructor and Path::coll()
-d9b130f Added LevelDBStore
-58a3b7f Added leveldb submodule
-cddcc2d Makefile: make check-local relative to $(srcdir)
-749281e Makefile: add json_spirit headers to tarball
-85d04c6 rgw: don't check for ECANCELED in the _impl() functions
-8634065 rgw: don't retry certain operations if we raced
-b1f2644 msgr: fix race in learned_addr()
-8a2b764 msgr: print existing->state before failing assert
-052d64e osd: unregister signal handlers on shutdown
-db96831 mon: unregister signal handlers on shutdown
-8e9bf61 mds: unregister SIGHUP too
-bb5c764 radosgw: handle SIGHUP
-9c7b63e init-radosgw: add 'reload' command to send SIGHUP
-e843766 osd: fix typo is recovery_state query dump
-0e03e9d osd: add missing space to scrub error
-2437ce0 msgr: discard the local_pipe's queue on shutdown.
-7690f0b osd: remove down OSDs from peer_info on reset
-23a0c03 rgw: check for bucket swift permissions only if failed
-b9a675a mon: report pgs stuck inactive/unclean/stale in health check
-bc80ba1 rgw: fix swift bucket acl verification
-cc93518 rgw: implement swift public group
-d10e1f4 mon: fix slurp_latest to fill in any missing incrementals
-7b48cca test_osd_types: fix unit test for new pg_t::is_split() prototype
-fd0712d Makefile: drop separate libjson_spirit.la
-edd35c0 osd: drop useless ENOMEM check
-a7de459 ceph-osd: clarify error messages
-97926e1 init: Actually do start the daemons when 'service ceph start <type>' is specified
-f317028 doc: beginnings of documentation of stuck pgs and pg states
-1917024 filestore: make less noise on ENOENT
-244b702 pg: use get_cluster_inst instead of get_inst in activate
-b6a0417 osd: pg_t::is_split(): make children out param a pointer, and optional
-85ed06e osd: bypass split code
-15d5324 osd: fix pg locking flags
-fc7b11a osd: partially refactor pg split
-d9cf332 osd: implement pg_t::is_split()
-6a08188 osd: factor hobject key into child pgid calc during split
-ee4d990 journaler: log on unexpected objecter error
-91b119a osd: fix recursive map_lock via check_replay_queue()
-402ece5 init-ceph: stick with /var/run for the time being
-41295b5 debian: /var/run/ceph -> /run/ceph
-0d8b575 debian: build-{indep,arch}
-3ad6ccb debian: sdparm|hdparm, new standards version
-266902a rgw: initialize bucket_id in bucket structure
-f8f6e4d rgw: _exit(0) on SIGTERM
-732f3ec (tag: v0.42.2) v0.42.2
-d85ed91 osd: fix array index
-722e9e5 lockdep: don't make noise on startup
-fdaed0a formatter: fix trailing dump_stream()
-7ad35ce osd: include timestamps in state json dumps
-e22adac osd: use blocks for readability in list_missing
-6d90a6d osd: dump recovery_state states in json
-a7c8bfb osd: query Peering substates
-e22a45a osd: query recovery state machine
-d3b203a osd: add tunable for number of records in osd command replies
-91fbc68 osd: 'pg <pgid> list_missing <json hobject_t offset>'
-6c257c4 hobject_t: decode json
-2677c72 add libjson_spirit.la
-0361a3c osd: pass in data to do_command
-c9416e6 osd: 'tell osd.N mark_unfound_lost revert' -> 'pg <pgid> mark_unfound_lost revert'
-6403852 lockdep: warn on stderr (via derr), not stdout
-804f243 do_autogen.sh: -T for --without-tcmalloc
-5efa821 rgw: swift read acls allow bucket listing
-f09fb87 rgw: fix swift acl enforcement
-7c7349e ceph: fix help.t
-c3e1291 (tag: v0.42.1) v0.42.1
-0281f1c debian: add ceph-dencoder
-f6e42a8 ceph.spec.in: add ceph-dencoder
-730b9ee ceph-dencoder: man page
-cbf79a9 ceph-tool: remove reference to "stop" command
-3bad945 mds: remove unused MDBalancer dump_pop_map() function.
-4dfec57 rgw: enforce swift acls
-065d6dd mds: clean up useless block
-159f2b8 mds: fix Resetter locking
-f5bf9d9 rgw: s3 only shows s3 acls
-e8bc42f osd: only set CLEAN when we are not remapped (up == acting)
-4d1d522 rgw: show swift ACLs
-ddc9998 osd: conditionally encode old pg_pool_t when no CEPH_FEATURE_OSDENC
-d85e915 mon: use pending_mdsmap for deactivate
-a1544c0 doc: 'deactivate mds' instead of 'stop mds'
-079dd6d mon: mds "stop" -> "deactivate"
-2824c07 rgw: can use swift to set bucket permissions
-700fe07 test: add basic test for the OSD's dump_ops_in_flight adminsocket command
-5944016 osd: add "dump_ops_in_flight" to the AdminSocket.
-21c4313 mon: refuse to stop mds if max_mds will make it rejoin
-7700ea9 crushtool: add --reweight-item cli tests
-286df2d crush: fix weight adjust for list, tree buckets
-62a113a mon: unlock mon before msgr shutdown
-d1fe2f8 mon: deprecate mon 'stop' command
-962aa3e msgr: join dispatch_thread after it completes
-86a54a6 filestore: use IOC_CLONERANGE intead of IOC_CLONE ioctl
-49588e9 osd: drop "stop" command
-560ddf4 osd: drop unused "stop" check
-64ca584 osd: don't complete recovery if unfound
-3628f90 mds: make EMetaBlob::fullbit::old_inodes non-ptr
-7842bb5 mds: Add old_inodes to emetablob
-26b5675 Fix ceph-mds --journal-reset
-761ecc6 Makefile: include encoding check scripts in dist tarball
-7fab4fa debian: add ceph-dencoder
-cd5a8f7 ceph.spec.in: add ceph-dencoder
-a6c7f99 ceph-dencoder: man page
-8c48a8e rgw: read correct acls for swift metadata update ops
-e67c0ff osd: make object_info_t::dump  using hobject_t and object_locator_t dumpers
-55a6065 osdmap: dump embedded crush map in Incremental::dump()
-2365c77 rgw: maintain separate policies for object and bucket
-d2335fa crush: write CrushWrapper:dump()
-27c8a3f test/rados-api/misc: fix LibRadosMisc.Operate1PP test
-174f6b8 osd: refuse to return data payload if request wrote anything
-7cafa25 osdmap: dump fullmap from dump()
-0e4367a rgw: accepted access key chars should be url safe
-17d3870 rgw: don't invalidate cache when adding xattrs
-cedb3d7 ceph: if 'pg <pgid> ..' doesn't parse a pgid, send to mon
-9927671 Makefile: fix misplaced unit tests
-1ff7568 hobject_t: remove unused back_up_to_bounding_key()
-4d3de03 osd: sched_scrub() outside of map_lock
-0b7f6e3 global: resurrect lockdep
-4432037 mon: disable pg_num adjustment
-7d3ae37 mon: use encode function for new Incremental
-f3a273a osdmap: successfully decode short map
-f3020c4 osdmap: use FEATURE encoder macro
-ebd29b6 qa/btrfs/test_rmdir_async_snap
-1e407b4 ceph-dencoder: add OSDMap::Incremental
-a4f2fdb osdmap: add Incremental::dump()
-76cc71b osd: don't count SNAPDIR as a clone during backfill
-24b470a crush: fix CrushCompiler warning
-d74e029 test/encoding/readable.sh: sh, not dash
-e33bf5a crushtool: fix clitests
-0429aa7 msgr: fix shutdown race again
-b205c64 (tag: v0.42) v0.42
-76e88d1 msgr: fix accept shutdown race fault
-ca04ee1 mon: test injected crush map
-5dd24f9 crush: move crushtool --test into CrushTester
-e42a0e9 crush: move (de)compile into CrushCompiler class
-2c2b388 mon: fix message discard on shutdown
-4dd8c35 crush: uninline encode/decode
-6b5be27 crush: cleanup: use temp var for curstep
-ff5178c mds: use want_state to indicate shutdown
-481e629 osd: implement 'pg <pgid> query'
-ffddb34 osd: dispatch 'pg <pgid> ...' commands to PG::do_command()
-15016f0 ceph: direct 'pg <pgid> ...' to primary osd for given pgid
-344c202 osd: fix up argument to PG::init()
-2500a9b SimpleMessenger: drop unused sigint()
-1f5e446 msgr: promote SimpleMessenger::Policy to Messenger::Policy
-1001692 mds: ignore all msgr callbacks on shutdown, not just dispatch
-1f240ca mon: discard messages while shutting down
-787dd17 msgr: fix shutdown vs accept race
-c3a509a mds: drop all messages during suicide
-806285f mon: fix STUCK_STALE check
-c08615e mon: add dump_stuck command
-c0ab63e mon: constify functions needed to use dout from a const function
-449d870 PGMap: extract method for outputting plain pg stats
-bcb5059 PGMap: fix else indentation
-6e89d9c osd: update_stats() in GetInfo state start
-fb31f63 osd: don't update_stats() on prec_replica_info
-9e309c4 filestore: hold journal_lock during
-06a2202 osd: only complete/deregister repop once
-4925e9c man: regenerate man pages
-304389c man: move man page fixes to rst
-a446f32 doc: fix snapshot creation/deletion syntax in rbd man page (trivial)
-d373f71 PGMap: add indent settings header
-9baa4b6 PGMap: add last_state_change to dump output
-ff822fb PGMap: fix dump header fields
-7837c19 osd: make op_commit imply op_applied for purposes of repop completion
-d6c7674 osd: add REMAPPED state
-8e6f9ca osd: refactor recovery completion
-8c0e184 osd: introduce RECOVERING pg state
-db41bdd paxos: fix is_consistent() check
-d913e5e osd: change nested iterator name
-2325da8 add missing #includes to build on gcc 4.7
-d938246 mds: comment out unused code in mds dump_pop_map
-95633b9 osd: fix _activate_committed replica->primary message
-41425f6 osd: skip threadpool pause on shutdown when blackholed
-35db2ea rgw: set default acls for certain swift operations
-a4ff47b Revert "swift: auth response returns X-Auth-Token instead of X-Storage-Token"
-4b3bb5a osd: fix _activate_committed replica->primary message
-82eceb9 osd: fix do not always clear DEGRADED/set CLEAN on recovery finish
-45701f5 init: Only check if auto start is disabled when the issued command is "start"
-543e8b9 ceph.spec.in: Move libcls_*.so from -devel to base package
-1a994be objclass: add debug_objclass knob, default to off
-ba0ef62 osd: reduce watch/notify debug noise
-ebbfdef msgr: mark_all_down on shutdown
-c1b6b21 osd: do not sync_and_flush if blackholed
-e6ffe31 workqueue: make pause/unpause count
-40802ae osd: exit code 0 on SIGINT/SIGTERM
-2aafdea signals: check write(2) return values
-9cd0900 osd: semi-clean shutdown on signal
-ec06682 mds: remove some cruft
-395dc65 mds: remove pidfile
-bbe5cd7 mon: do a clean shutdown on SIGINT/SIGTERM
-eafe832 mon: install async signal handlers for SIG{HUP,INT,TERM}
-e905564 osd: install async signal handlers for SIG{HUP,INT,TERM}
-be704fe mds: install async signal handlers for SIG{HUP,INT,TERM}
-afa1f9e signal: remove unused/obsolete handle_shutdown_signal
-7951315 signals: do not install default SIGHUP, SIGINT, SIGTERM handlers
-ecd2802 signals: implement safe async signal handler framework
-4425f3b libradospp: add config_t typedef
-06fa268 librados: use rados_config_t typedef instead of CephContext
-e32668f doc: Balance backticks.
-2281a00 librados: expose CephContext via C API
-bc4e78d mds: use new tmap_get pbl argument
-dd32285 librados: need prval for tmap_get
-7842bf1 librados: add aio_operate for reads and tmap_get for ObjectWriteOp
-7045096 osd: remove unused need_size
-a53a017 ReplicatedPG: pull() should return PULL_NONE, not false
-5a3ef17 ReplicatedPG: clean up push/pull
-f9b7529 osd_types.h: Add constructors for ObjectRecovery*
-7b1c144 test_filestore_idempotent: fix test to create initial object
-6b30cd3 libcephfs: define CEPH_SETATTR_*
-b54bac3 test/encoding/readable.sh: drop bashisms
-ffa1de3 filejournal: drop unused variable
-ccf8867 filejournal: aio off by default
-9fded38 test/encoding/readable.sh: skip old version with known incompatibilities
-3e1cc0b ceph-dencoder: add osd_peer_stat_t
-9065dbd rgw: remove extra useless info in bucket entry encoding
-1bf037b ReplicatedPG: refactor push and pull
-fbbbd01 add CEPH_FEATURE_OSDENC
-af38ce1 ReplicatedPG: consider backfill_pos to be degraded
-d0ccf28 ReplicatedPG: add debugging for in flight backfill ops
-94a198c ReplicatedPG: is_degraded may return true for backfill
-2476dd7 MOSDSubOp: Add new object recovery state
-f80e0c7 ReplicatedPG: consider backfill_pos to be degraded
-4785ae3 ReplicatedPG: add debugging for in flight backfill ops
-d43d5d9 ReplicatedPG: is_degraded may return true for backfill
-389653e osd: remove peer_stat from MOSDOp entirely
-4dfa4dc osd: new osd_peer_stat_t shell type
-1f351cd qa/btrfs/.gitignore: ignore targets
-c97c14f osd: use single helper for pg creation
-04f175f osd: use PG::init() for newly local (but not created) PGs
-cefa55b osd: move new pg initialization into PG::info()
-72a5610 osd: protect per-pg heartbeat peers with inner lock
-508be8e rgw: don't use SCRIPT_NAME and QUERY_STRING vars
-3796c4a osd: flush pg on activate _after_ we queue our transaction
-4d8e9a5 osd: do OpRequest dispatch into PG::do_request
-eba609b filestore: make flush() block forever if blackholed
-610da66 Revert "rgw: don't treat plus as a space in url decode"
-053dc33 osd: emit useful scrub error on missing clone
-43828df filestore: return error from CLONE
-7c6dff4 osd: filter trimming|purged snaps out of op SnapContext
-02bda42 mon: add {mon,quorum}_status admin socket commands
-e4258ce mon: move quorum_status into helper
-60067f8 mon: move mon_status into a helper
-a414fd5 init-ceph, mkcephfs: try 'btrfs device scan' before 'btrfsctl -a'
-a391b0d osd: fix MOSDPGCreate version setting
-e09c90f osd: queue pg removal under pg's epoch
-4834c4c osd: check for valid snapc _before_ doing op work
-a0caa85 osd: some cleanup
-7eff37b mon: validate osmdap input
-7e32a3d rgw: objects can contain '%'
-bd1a956 mon: fix MMonElection encoding version
-22eca41 mon: remove the last_consumed setting in Paxos
-6e6c34f objecter: LingerOp is refcounted
-aecf4e0 mon: handle inconsistent disk states on startup.
-0de1d55 objecter: LingerOp is refcounted
-3c5dcf8 qa/btrfs/create_async_snap
-7b5689a messages: populate header.version in constructor
-0bd545f mon: add a slurping flag to the Paxos state
-e369ec1 ReplicatedPG: don't put the op on -EAGAIN
-3a7bb99 mon: initialize paxos state in constructor
-8d90856 msg: check compat_version before decoding
-989d678 msg: populate compat_version for encoded messages
-811e629 msg: include compat_version in version header
-5b8d0c7 new encoding for Log{Entry,Summary}
-cb15eb8 os: new encoding for hobject_t
-7d85c48 osd: new encoding for pg_create_t
-f9d67f1 osd: new encoding for osd_stat_t
-757e3b0 osd: new encoding for object_locator_t
-4c3a41f osd: new encoding for osd_reqid_t
-7a68fd9 osd: new ScrubMap::object encoding
-92a058a mon: set last_changed when creating new pgs
-a65586c mon: set last_unstale when marking PGs stale
-88f1fbc osd: include state timestamps, mapping_epoch in pg_stat_t
-00997f9 osd: new encoding for PG::Interval
-9f3f119 osd: new encoding for PG::OndiskLog
-14d6ed4 objectstore: new encoding for Transaction
-fa779db osd: new encoding for ScrubMap
-a4a9d52 osd: new encoding for object_info_t
-c8cf0ae osd: new encoding for watch_info_t
-156c6eb osd: new encoding for SnapSet
-92fc5f0 osd: new encoding for pg_missing_t
-02dd0a8 osd: new encoding for pg_log_t
-18c8861 osd: new encoding for pg_log_entry_t
-9304db0 osd: new encoding for pg_history_t
-538e8d1 osd: new encoding for pg_history_t
-0d79b1b osd: new encoding for pool_stat_t
-9016658 osd: new encoding for pg_stat_t
-3a547ef osd: new encoding for object_stat_collection_t
-bd829e3 osd: new encoding for object_stat_sum_t
-5b6b500 osd: new encoding for pg_pool_t
-fc869de osd: new encoding for pool_snap_info_t
-a03ff1b osd: new encoding for OSDSuperblock
-7f10d5f osd: move object_locator_t to osd_types.{h,cc}
-e255044 ceph-dencoder: add osd_reqid_t
-01c7b3b ceph-dencoder: add hobject_t
-b49a55b mon: add/use pg_create_t ctor
-34158ed ceph-dencoder: add pg_create_t (formerly MOSDPGCreate::create_rec)
-7479828 test/encoding/readable.sh: no \t
-e492ffd ceph-dencoder: add Log{Entry,EntryKey,Summary}
-93d7ef9 filestore: wait to start op if other ops are in line
-1009d1a filestore: fix op queue quiesce during commit
-f033467 ReplicatedPG: don't count deletions as ops
-42db09b osd: don't remove pg from recovery queue if not enough recovery ops started
-a6d7629 rgw: don't treat plus as a space in url decode
-72bbaea osd: discard waiting ops when pg mapping changes
-359dfb9 osd: flush on activate
-6c4687f Makefile: check readability of object corpus on 'make check'
-e261317 add ceph-object-corpus.git submodule
-8e2ceb4 mon: fix [near]full_ratio conf update
-3f94c15 mon: better MonCaps test cases
-dfaa7fd ceph-dencoder: MonCap[s]
-59a9e4e mon: fix PGMap::generate_test_instances()
-d20d5c1 mon: refactor calc_stats()
-4df4465 osd: is_zero() method for stat structs
-dc5033f osd: fix ScrubMap::object ctor
-d778cab mon: make [near]full_ratio config options floats
-b6d1c0c mon: initialize [near]full_ratio during create_initial(), not ctor
-8cf81cc ceph-dencoder: MonMap
-bc7fd21 mon: uninline Monmap encode/decode
-6686788 ceph-dencoder: PGMap[::Incremental]
-5ce1097 mon: waitlist new sessions trying to connect while we're out of quorum
-cbf50eb update amazonaws xmlns to correct url
-1a028e5 mds: remove IntervalTree code
-21a1dbd trivial_libceph: need O_RDWR
-d63303d client: -EINVAL write if not opened writable
-4784b98 client: clean up ctor a bit
-b5a5a4b client: initialize initialized
-1f86435 osd: always send scrub errors to cluster log
-f28287f mon: make PaxosService::update_from_paxos return void.
-1125d71 mon: call update_from_paxos() when we finish slurping updates.
-675e4c4 mon: drop election messages with bad rank
-0da793b rgw: cleanup url_decode usage
-6df25e5 rgw: url_decode object name
-f859f25 osd: re-take the osd lock in the init error path where it's not held
-2e84c1e ceph-dencoder: ScrubMap[::object]
-0bf3c54 osd: uninline osd_stat_t methods
-c0711b0 ceph-dencoder: coll_t
-8bf08ab ceph-dencoder: pg_t
-8791cb9 ceph-dencoder: SnapSet
-c5a5842 ceph-dencoder: SnapContext, SnapRealmInfo
-fe39d58 move SnapContext, SnapRealmInfo to common/snap_types.{h,cc}
-f07d283 ceph-dencoder: filepath
-1fbb8eb ceph-dencoder: CompatSet
-5b423b6 kill unused tstring
-cba2674 kill useless [cn]string.h
-c23d217 rgw: escape and list correctly objects that start with underscore
-8ded264 crush: don't BUG_ON
-9895f0b crush: don't BUG_ON within crush_choose
-8427090 filejournal: flush needn't abort on write_stop
-4b8374c filejournal: clean up check_aio_completion
-fffee82 filejournal: get multiple aios at a time
-f3dd583 filejournal: print aio mode on open
-fb0e2a3 configure: add --without-libaio option
-4842b3d ceph.spec.in: buildrequires libaio-devel
-3f0a592 debian: depend on libaio-dev
-30a77ac filejournal: implement aio for writes
-b7c20e7 streamtest: show total throughput, avg latencies
-a9a6046 client: init/shutdown objecter in init/shutdown
-ba12f26 rgw: fix autobuilder errors
-dba22f8 rgw: fix warning
-90fe53c rgw: fix acl cleanup related regression
-06ea2f7 doc: add the ceph mds stop command.
-caabec9 mon: show full status in ceph health
-7641a0e osd: signal dispatch_cond on ms_dispatch completion
-13c8913 rgw: use request uri if script name is empty
-eaa46f5 osd: reorder PG recovery_state initialization
-d7f61c8 test/encoding/readable.sh: nicer output
-5216eb0 ceph-dencoder: more helpful error message for messages
-5103338 messages: set type in default constructor
-ae67c2d pick object from random osd for primary recovery
-05f66c4 msg: fix message leak on receipt of undecodable message
-c3eacb1 Makefile: add test/encoding/types.h
-d597dc2 encoding: document ENCODE/DECODE macros
-625a89d test/encoding/readable.sh: nicer output
-6e62fc4 test/encoding/readable.sh: check all version
-e9b97c1 osd: fix another repop->ctx->op deref
-2f5ba8f osd: avoid null deref of repop->ctx->op
-a0dde42 encoding: document ENCODE_DUMP throttling weirdness
-9687609 encoding: fix DECODE_START macro
-9c2d779 encoding: add DECODE_OLDEST macro
-690b991 osd: fix another issue_repop() ctx->op null deref
-d926194 check-generated.sh: do self-decode test first
-efe77a8 check-generated.sh: nicer output
-153e89d ceph-dencoder: print errors to stderr
-2a26295 osd: do not dereference ctx->op when NULL
-8623c64 encoding: better DECODE_START_LEGACY_COMPAT_LEN
-73e92b3 buffer: iterator::get_remaining()
-83432af common/Throttle: throttle in FIFO order
-c4ca114 osd: fix osd_recover_clone_overlap
-cb75491 osd: use obc for size in calc_head_subsets()
-36a4ca4 filestore: remove obsolete fs type check
-824c3af client: add initialized flag to client
-51ccce0 client: let set_filer_flags clear flags, toos
-3365952 librados: discard incoming messages when DISCONNECTED
-290730e objecter: track whether initialized; add asserts
-4ef4d3f test_filejournal: fix warnings
-030ad87 osd: mark_started() osd sub ops
-da02c40 osd: d'oh again! Make this real exponential, not...ever-linear.
-f7e6e18 osd: OpRequest currently_* needs to look at latest, not hit.
-c81845b rgw: fix crash related to cleanups
-00a2e84 do_autogen.sh: -e <path> to dump encoded objects to a path
-91073a6 check-generated.sh: run on 'make check'
-f125070 osd: pg_stat_t: fix member initialization
-71c59da osd: add check_ops_in_flight()
-63ad89d osd: fix PG::Interval member initialization
-500f4c6 osdmap: finalize crush after building simple map
-c41adac osdmap: make test instnaces deterministic
-d4d1b64 import-generated.sh: fix to use ceph-dencoder syntax
-290c4b7 ceph-dencoder: fix ctor
-2d0da67 ceph_context: initialize member var
-cb5f270 rgw: some more acls cleanup
-fd3108e osd: "mark" OpRequests as they move through the system.
-ba392e3 PG: switch op passing interface to use OpRequest
-544ea29 osd: switch op passing interface to use OpRequest instead of raw Messages
-4075d52 osd: add new OpRequest struct and an xlist to track it
-25c5dae osd: PGLSResponse -> pg_ls_response_t
-ac1fbd1 osd: PG::Missing -> pg_missing_t
-a41679a osd: PG::Log -> pg_log_t
-5263c12 osd: PG::Log::Entry -> pg_log_entry_t
-460a462 osd: PG::Query -> pg_query_t
-3353f57 cls_rgw: update bucket index when deleting object (with pending)
-2529374 osd: PG::Info -> pg_info_t
-1c5370c osd: PG::Info::History -> pg_history_t
-64bdd38 osd: PG::Info[::History] dump, test instances
-139db82 ceph-dencoder: remove message type dups
-2b05000 ceph-dencoder: generate test instances on heap
-1fdb5e5 osd: dump, test instances for PG::Interval
-19313fb osd: dump, instances for PG::OndiskLog
-9307edd ceph-dencoder: use g_ceph_context
-19227b2 ceph-dencoder: OSDMap and osd_info_t
-cbaf83d osdmap: test instances for osd_info_t
-d0dbaaa osdmap: test instances
-ad77bb4 osdmap: normalist encode/decode
-a5366c8 ceph-dencoder: add all message types
-32010d7 msg: add missing #includes for messages
-1cb39fa msg: dump messages via build option
-597e97a osd: fix assignment in PG::rewind_divergent_log()
-9d385f5 msgr: Document recv_stamp and add a dispatch_stamp and throttle_wait.
-ba4aad4 qa: test_backfill.sh: take osd.0 down
-5a54483 osd: restart peering if requesting acting osd goes down
-9dfa46f osd: rename recovery event NeedNewMap -> NeedActingChange
-747b3d4 osd: use RecoveryContext transaction, finishers on recovery completion
-f4e44e4 qa: test_backfill.sh: limit pg log length so we trigger backfill
-f1c3538 osd: fix divergent backfill targets
-9520ee7 filestore: implement filestore_blackhole hook
-1fe75ee rgw: should remove bucket dir instead of sending intent
-2b5bbe8 librados: fix a leak
-2116f01 osd: disable clone overlap for push/pull
-2adabbe mon: make 'osd [out|in|down]' succeed if already whatever
-591a890 ceph-dencoder: handle messages
-11de3f1 msg: implement Message::dump()
-9987f8f msg: go const-crazy on messages
-9279619 paxos: explicitly pass in send timestamp
-0e8129a msg: no cct for decode_payload
-0107aee msg: use absolute times for message encoding
-5436bf5 msg: make decode cct optional
-11f6a84 msg: no cct needed for message encoding
-04497a5 mdsmap: move member initialization to monitor create_initial()
-dabf1e4 msg: use explicit feature argument instead of Connection*
-7999876 msg: pass features explicitly into message encoders
-60ead1e qa: encoding: silence warning
-d3590b5 qa: test/gather fix warning
-e9e212f qa: test/rados-api/list fix warning
-853c8b2 test_ipaddr: reverse ASSERT_EQ order
-773acfd osd: remove unused var
-9454102 admin_socket: fix uninit warning
-483c089 mon: trim old auth states
-9bb3875 filestore: fix rollback when current/ missing entirely
-5e16974 osd: reset pgstats timer when we reopen monitor session
-9e78d53 clock: ignore clock_offset if cct is NULL
-5938d17 filejournal: add corruption test to check crc checking code
-cc11721 filejournal: assume gibberish flags imply none
-e2fbe43 filejournal: include crc in entry header/footer
-6197b5a qa: test_filejournal: test lots of small writes too
-4ddca46 qa: add test_filejournal
-db3b9ee filejournal: fix header initialization
-19f829d filejournal: clean up some errno checks
-7f474ed filejournal: assert submit_entry gets >0 bytes
-8673830 filejournal: initialize header before writing
-8d439e9 filejournal: move zero_buf allocation
-f9620d7 client: do not send release to down mds
-e43db38 signal: use _exit() on SIGTERM
-0f9c6b4 test: add script for checking admin socket 'objecter_requests' output
-097bc5c objecter: add an admin socket command to get in-flight requests
-39f6c4c admin socket: increase debug level for successful requests
-c9cf7b7 admin socket: add include guard
-dbda1b6 CephContext: add method for retrieving admin socket
-56d164c mon: stale pgs -> HEALTH_WARN
-61c54a7 mon: mark pgs stale in pg_map if primary osd is down
-6e44af9 osd: add STALE pg state bit
-c1345f7 (tag: v0.41) v0.41
-374fec4 objector: document Objecter::init_ops()
-6d37d5c objecter: fix out_* initialization
-9472920 Revert "common/Throttle: Remove unused return type on Throttle::get()"
-995ff22 osd: remove unused PG::block_if_wrlocked declaration
-946da5a filestore: dump offending transaction on any error
-6453123 objecter: warn when OSD returns mismatched op vector
-0cc26a9 objecter: fix bounds checking on op reply demuxing
-9b554d4 mds: remove test assert
-b8e6a6bd assert: include timestamp
-b3c80bc rgw: acls cleanup wip
-91b547b osd: remove the unused require_current_map
-2bc7105 filestore: fix typo
-ec7a140 filestore: zero btrfs vol_args prior to ioctl
-dedf575 mon: num_kb -> num_bytes in cluster perfcounters
-625b0b0 osd: remove num_kb from object_stat_sum_t stats
-acb164c osd: improve object context debug output
-f16b38d osd: track obc for clone from log replay
-44b1144 osd: set object_info_t::oid properly when recovering clones
-eec87bb package *.py* files
-2c2cc15 librbd: don't infinite loop when header is too large
-746a230 ReplicatedPG: data_subset may be empty during sub_op_push
-72cd121 rgw: acl changes compile
-f3d200c filestore: fix non-::-prefixed close
-a49a53d filestore: add debugging to each error case in lfn_open
-ae36f59 filestore: TEMP_FAILURE_RETRY on ::close(2)
-a43937f filestore: return -errno from lfn_open
-0fd6ca9 filestore: audit + clean up error checks
-2835d40 rgw: rgw_acl_s3.* compiles
-9dc7b92 rgw: fix warning
-cfe1d01 ceph: bail out on first failing command
-54a7673 ceph: don't write output on error
-c5e7a74 .gitignore: ceph-dencoder
-7ce544e osd: ignore MInfoRec, MNotifyRec in WaitActingChange
-d9eedf5 rgw: fix warning in 32bit arch
-1a10b51 ceph-dencoder: needs ceph_ver.h dependency
-92a8f5e pg: unindex entries when clearing or removing from the log
-5451d87 osd: do not clobber log on backfill progress update
-f002ed4 features: #include ceph_features directly where needed
-0ced79d objectstore: remove unused setattr variants
-56c5e85 osd: initialize fields in watch_info_t constructor
-9985145 ceph-dencoder: fix up usage a bit
-10b87ed objectstore: drop unused Transaction::p
-5898892 ceph-dencoder: reenable generated types
-abb0510 objectstore: implement generator
-f09c01f osd: watch_info_t generator
-37d38f7 osd: pool_stat_t generator
-c095c35 osd: uninline pool_stat_t methods
-e104471 osd: pg_stat_t generator
-89b189a osd: uninline pg_stat_t methods
-8e9c229 osd: generator for object_stat_collection_t; uninline too
-ee82397 osd: uninline object_stat_sum_t methods
-adcc9bf osd: object_sum_stat_t generator
-e07178f osd: pg_pool_t generator
-0b2cf7d osd: pool_snap_info_t generator
-40f59b8 msg: entity_{name,addr}_t generators
-fa20be3 qa: misc encoding scripts, in various states of usefullness.
-47e2006 ceph-dencoder: implement 'version' command
-f1af44f test-generated.sh
-7ece278 osd: dump and generators for OSDSuperblock
-2baa6c0 encoding: adjust ENCODE/DECODE macros
-03b6113 ceph-dencoder: clean up usage
-bbf1826 ceph-dencoder: generate object instances from static method
-7d4c3db osd: osd_stat_t generator
-7393ad1 ceph-dencoder: fix build
-7c0a4da ceph-dencoder: ObjectStore::Transaction
-3f30a6f objectstore: implement Transaction::dump(Formatter*)
-c0bdb07 ceph-dencoder: support feature bits
-e674f2b features: add missing features to default set
-942f302 move feature bit definition to separate header file
-354f2cb ceph-dencoder: encode/decode/dump test tool
-cdeeed6 msgr: dump() entity_name_t and entity_addr_t
-80b80b0 filejournal: use ::encode() wrapper func for Transaction
-4564921 osd: implement watch_info_t, object_info_t::dump()
-d321393 encoding: new {ENCODE,DECODE}_{START,FINISH} macros
-a710642 encoding: instrument to dump encoded objects
-aea6a30 rgw: read_user_buckets() fix redone
-fdaf91e osd: implement --dump-journal
-a52762a rgw: read large bucket directory correctly
-802acb1 rgw: refactor acls, separate protocol dependent code
-6c275c8 rgw: fix warning
-e016cca Convert mount.ceph to use KEY_SPEC_PROCESS_KEYRING
-8a9252f rgw: adjust high level debug level
-148031b rgw: fix intent log processing
-731c883 rgw: initialize tm before calling strptime
-0aab089 objecter: some helpful multiop result debug output
-6f35e32 objecter: make getxattrs set rval on decode error
-f441adf objecter: add stat ops to op vector!
-1d5c8fd objecter: gift reply data to outbl _after_ demuxing
-905e8d8 osd: make in/outdata split/merge helpers static OSDOp methods
-1a7c8b4 rgw: log_show_next() fix reading of the next buffer
-06e7562 filestore: overwrite fsid during --mkfs
-4c6c443 rgw: reset timestamp when processing starts
-127bbd1 hadoop: fix unix timestamp calculation in hadoop lib
-a85ea47 hadoop: check for valid filehandler, before using in next calls
-bd8e32d doc: update control file for setting pg num on pool create
-94f55f4 TestRados: fix {min,max}_stride_size initialization
-79d1932 osd: fix bind error checks
-7804046 Makefile: fix testkeys non-tcmalloc linkage
-241cbeb rgw: add timestamp to high level log
-db65295 rgw: log host_bucket, http status
-0e8b12c rgw: simple request logging
-63b94b6 mds: abort startup if we fail to bind
-4f70acf osd: abort on startup if we fail to bind to a port
-47db4d0 ceph: fix "run_uml.sh" script
-549b780 TestRados: implement max_seconds, reimplement argument parsing
-20f3f68 RadosModel: prefix line with m_op
-7b2fd45 mds: fix uninitialized value in MClientLease::h
-b5f8de7 msgr: move operator<< for sockaddr_storage to msg_types.cc
-e93999f qa/workunits/rados/load-gen-mix.sh
-ba83e8c qa: rados load-gen: use rbd pool
-b7a1102 rados: load-gen: wake up on reply
-51e402e rados: fix load-gen 'max-ops'
-7d3b2c4 librados: allow ObjectReadOperation::stat() to get time_t mtime
-706b691 osd: recover_primary_got() -> recover_got()
-a4e2395 osd: clear missing set on replica when restarting backfill
-a464294 msgr: don't assert on socket(2) failure
-a6c0610 msgr: uninline operator<< on sockaddr_storage
-6b02f9f osd: rev osd internal cluster protocol
-7f123de mds: require OSDREPLYMUX feature bit
-012a985 librados: require OSDREPLYMUX feature
-436f8ca define new OSDREPLYMUX feature bit
-9d0476c objecter: fix add_*() calls to use proper helper
-42a6cef ReplicatedPG: munge truncate_seq 1/truncate_size -1 to seq 0/size 0
-0ded7e4 ReplicatedPG: munge truncate_seq 1/truncate_size -1 to seq 0/size 0
-44cb076 rgw: limit object PUT size
-d575337 objecter: fix up stat, getxattrs handlers
-7eea40e (tag: v0.40) v0.40
-81c0ad8 librados: make new ObjectReadOperations arguments non-optional
-7347538 rgw: use new librados ObjectReadOperation method arguments
-4815caf ReplicatedPG: Update stat accounting for truncate during write
-8ceb388 rgw: wrap cls_cxx_map_* with try/catch around decoding
-05d8ecb rgw: bucket index creation and init in a single operation
-876d829 librados: add ObjectOperation::exec
-dc628a5 secret: move null check before strlen(key_name) deref
-d41ddcd osd: stat op, don't compare in memory state to object
-920bd56 librados: specify read return value pointers in ObjectReadOperation methods
-fe07783 objecter: specify read return values pointers in ObjectOperatio methods
-ff55d2f osd: put result data in OSDOp.outdata
-a855828 osd: mux/demux OSDOp::outdata in MOSDOpReply
-4f4b79c osd: include return code in OSDOp
-f42c658 osd: fill in empty item in peer_missing for strays
-10b0031 rgw: don't crash when copying a zero sized object
-845aa53 ReplicatedPG: Do a write even for 0 length operation
-80f57f9 ReplicatedPG: fix stat accounting error in CEPH_OSD_OP_WRITEFULL
-cfa39bf qa/client/gen-1774.sh
-6cf7753 osd: fix PG::Log::copy_up_to() tail
-805513b osd: reset last_complete on backfill restart
-1e56367 client: avoid taking inode ref in case of nonexistent dir
-7113137 COPYING: note licenses for all files, not just the default
-54e0dfc debian/copyright: note acx_pthread.m4 license
-6b55b6b Makefile: Add headers that were omitted in make dist and prevented tests from building
-c9e028f Makefile: Handle corner case of crypto++ correctly
-c5144ee Makefile: Use ACX_PTHREAD in configure.ac and resulting flags in src/Makefile.am
-7bf01b1 Makefile: Add recent acx_pthread.m4 that has a fix for nostdlib issue.
-b93bf28 PG: gen_prefix should grab a map reference atomically
-38b9b50 rgw-admin: add pool rm and pools list
-e2c0254 rgw-admin: clean up unused commands
-ac1e105 osd: bound log we send when restarting backfill
-79085ad rados.py: avoid getting return value of void function
-85552cf pg: remove unnecessary guard from calc_trim_to()
-b1da511 pg: add a configurable lower bound on log size
-734737f osd: limit size of log sent to reset backfill targets
-8f9549f client: start caching readdir results after readdir_start
-5d98960 monclient: fix resolve_addrs() call
-f09b21e resolve_addrs: return ipv4 and ipv6 addrs
-9e9b5c6 ReplicatedPG: fix typo in stats accounting in _rollback_to
-d4815e5 osd: send log with backfill restart
-c7d92d1 osd: fail to peer if interval lacks any !incomplete replicas
-3b81fa5 mon: allow specifying pg_num and pgp_num when creating new pools.
-69aface auth: Fix Doxygen warnings.
-741f6d5 Fix several doxygen warnings, to minimize noise. Only changes comments.
-b891652 librados: Make API docs use @note instead of @bug for now.
-1f46e7c FileStore: assert on ENOSPC even for SETXATTR
-ac9b2d0 mds: initiate monitor reconnect if beacon acks take too long
-45897b5 mds: remove beacon_killer code.
-ba00f95 osd: make less noise when filestore is already up to date
-9490b36 doc: add librados C aio example
-f99b3e0 doc: describe some rados_pool_stat_t members
-ce53447 doc: add librados pool creation defaults
-dd31ff2 doc: add short section on documenting code
-0e19062 doc: clarify librados return codes
-547e9e3 doc: @return -> @returns to match the sphinx output
-1e8b8a8 doc: standardize rados_tmap_* docs
-590520c doc: fix rados_version todo formatting
-50c9cb1 doc: add a prefix to group names in librados.h
-d9d9e6d doc: Put rados_ioctx_locator_set_key in a group so it can be cross-referenced
-b464b75 doc: move rados_ioctx_get_id to the pool group
-b148bef doc: fix some typos in librados C API
-c960641 doc: Switch doxygen integration from breathe to asphyxiate.
-78cc07f librados: Avoid using "crush_rule" as name of function argument.
-aca3c62 doxygen: Use first sentence as brief description.
-b5759df doc: add configuration and connecting to librados C api example
-43952a3 doc: add librados C api docs
-d3e3477 ceph: add a new "run_uml.sh" script to manage running a UML client
-162ac06 rgw: adjust log level
-1e0afb6 rgw: some cleanup
-a90f34c rgw: only use plain PUT processor when !chunked_upload
-c23cc23 osd: add OSDOp::outdata
-6b38921 osd: move OSDOp vector indata split/merge into helpers
-d8ebbf4 osd: OSDOp::data -> indata
-b17736a osd: populate_obc_watchers when object pulled to primary
-a59ee8f osd: handle case where no acceptable info exists
-92ca3ef perfcounters: fix unittest for new admin_socket interface
-d8e5499 Makefile: disable untitest_interval_tree
-bcf2146 unittest_interval_tree: make it compile
-a774d50 osd: clean up src_oid, src_obc map key calculation
-3c60e80 osd: read op should claim_append data instead of claim
-0d175cd rgw: remove object before writing both xattrs and data
-469f3eb rgw: create plain processor for small objects
-75acc0a rgw: fix multipart PUT
-26b54ae rgw: rearrange PutObj::execute()
-a0b5539 rgw: different atomic handling for small objects
-199b14d mon: fix uninitialized cluster_logger_registered
-bebd393 objecter: ignore replies from old request attempts
-ac177d7 osd: encode retry attempt in MOSDOp[Reply]
-b501efd mon: document quorum_status, mon_status
-ca8df7e mon: fix misplaced else
-643b9db ceph: speak new admin socket protocol
-5a5dece admin_socket: fix, extend admin_socket unit tests
-b389685 admin_socket: string commands
-14a4943 mon: elector needs to reset leader_acked on every election start
-435c294 mon: instrument elector so you can stop participating in the quorum
-99e5f85 mon: kill client sessions when we're not in quorum
-c83b2a0 OCF RA: fix variable name
-b3f8b55 debian: build ceph-resource-agents
-49a96fa osd: parameterize min/max values for backfill scanning
-98881a1 admin_socket: refactor
-b6c43d2 rbd: add a command to delete all snapshots of an image
-a94b731 admin_socket: whitespace
-96b7b0d common: default 'mon osd auto mark in = false'
-a71a0d3 osd: log backfill restart
-bd23391 librbd: don't remove an image that still has snapshots
-4728f4f SimpleMessenger: clarify when ms_bind_ipv6 is used
-4ea8ad4 qa: add a slightly more stressful anchortable test
-c8a13f2 qa: fix mdstable script for proper injectargs use.
-61c3a91 rados: fix run-length option parsing for rados load-gen
-0fb88b6 move cluster protocol definitions out of ceph_fs.h
-9986553 msgr: explicitly specify internal cluster protocol
-b8be338 mon: rev cluster protocol
-857b243 osdmap: include state names in dump()
-80d9010 mon: separately control auto-mark-in of new OSDs
-af53507 mon: maintain CEPH_OSD_NEW bit for new, unused OSDs
-fcb8770 mon: independently control whether AUTOOUT OSDs are marked in on boot
-9510f9c mon: track auto-marked-out osds
-becb71b osd: don't add all strays in calc_acting()
-adea084 osd: mark degraded only when < desired replica count
-3166b37 osd: avoid querying missing set from (full) backfill target
-d339533 osd: fix backfill reset on activate
-8658f0d qa: load-gen-mix-small-long
-5cebc74 obsync: make obsync run without cloudfiles installed
-6a1cac9 osd: initialize backfill_target; include in PG operator<<
-dcd1eba osd: initialize backfill_pos on activate
-4bcdb37 osd: do not use incomplete peer for best info/log
-a5d99ad osd: fix misdirect check for requests with old epochs
-172dd3e osd: check that we're supposed to be getting a PG before waitlisting requests.
-54f36f0 rados: gracefully report errors from 'ls'
-ed9a4a0 osd: return EINVAL on bad PGLS[_FILTER] handle
-2f1720d librados: return int64_t pool ids
-a97aca7 rados.py: use uint64_t for auids
-8e56e99 radosgw-admin: add eol following info
-0e470c5 testrados: replace testreadwrite and testsnaps with testrados
-9112405 RadosModel: check for out of order replies within WriteOps
-f03e770 RadosModel: allow TestOps to pass data to their finish methods
-ec6530d RadosModel: make object write ranges configurable
-a66d90e osd: add a monitor timeout via MPGStatsAck messages
-f4b0cda Fix invalid docdir_SCRIPTS usage with >=automake-1.11.2
-f8929ba osd: trigger RecoveryFinished event on recovery completion
-a125246 librados: take lock in rollback
-4c23e9e objecter: assert lock held in op_submit
-68ec8d8 librados: call aio_operate() with lock held
-1c75418 osd: be a bit more verbose during backfill
-0692bed cmp: fix 5-uple operator==
-3dcaf6c osd: do not backfill if any objects are missing on the primary
-949f24d rgw: create default constructors for some structs
-251fc3d osd: handle backfill_target for pick_newest_available
-a352589 osd: return EINVAL if multi op specified with no src object name
-e686c1b hobject_t: fix operator==, !=
-063ab2e cmp.h: define macros for creating comparison operators
-6687ccf workunits: update rbd test for new error format
-85719b0 config: use autoconf $libdir for default rados class dir
-0d9507c .gitignore: src/ocf/ceph
-9b6422d Spec: conditionally build ceph-resource-agents package
-92cfad4 Add OCF-compliant resource agent for Ceph daemons
-6617063 mon: fix full ratio updates
-f2e4109 mon: don't ignore first full ratio update callback
-a693438 mon: only update full_ratio if we're the leader
-df84594 mon: make full ratio config change callback safe
-585fb5c clitests: update for new error format
-cec2692 clitests: update monmaptool test
-48df71c init script: be LSB compliant for exit code on status
-3b2ca7c keyring: print more useful errors to log/err
-eba235f common: trigger all observers on startup
-1f434da common: make cpp_strerror output prettier
-04c8db0 librados: check for monclient::init() error
-37013b6 qa: load-gen-mix-small.sh
-1a59405 rgw: turn on cache by default
-959fd71 osd: explicitly track leading edge of backfill
-d24ea23 mds: assert if we get an EINVAL on our truncate
-47013c2 osd: get fsid from monmap, not osdmap
-05cc4eb monc: get latest monmap during authentication
-300c758 osd: catch authenticate error on startup
-5d5c9b6 osdmap: add const markers to some unfixed functions
-e18b1c9 rgw: removing swift user index when removing user
-997e35a rgw-admin: remove subuser index when required
-1f40031 osd: fix push completion check
-2dc90d0 rgw: clone operation should only update index for main category
-bb52b18 rgw: fix cache interface (was not overloading method)
-0db9a42 rgw: fix bucket creation
-4ac04e8 rgw: write bucket info in one operation
-60bbf68 Objecter: fix local reads one more time.
-1f02e34 ReplicatedPG: objects currently begin backfilled are degraded
-d2eb119 ReplicatedPG: fill in backfill_peer in on_activate
-517ddf8 ReplicatedPG: only pull in one backfill peer at a time
-855e93b filestore: fix config observer
-decdc36 MOSDPGRepScrub: Fix typo in MOSDPGRepScrub
-8b8aab8 PG: update stats from master only if not backfilling
-298b134 PG: backfill info should be cleared on recovery reset
-3b90df0 ReplicatedPG: init backfill infos to last_backfill
-db04d68 ReplicatedPG: update last_backfill when pushes complete
-fa6bd38 ReplicatedPG: simplify recover_backfill
-c7fee72 MOSDRepScrub: use header.version for payload version
-e93961c monmap: iterate over addr_name when printing summary
-bfbeae6 monmap: clear addr_name map on calculating ranks
-ea9f2f6 interval_set: fix truncation of _size
-9eee1ec osd: remove SIGTERM cruft
-e04109a mon: drop special SIGTERM handler
-2daa655 mds: drop special SIGTERM handler
-d1dbeaf exit(0) on SIGTERM by default
-07e1186 ReplicatedPG: Initialize blocked_by in ObjectContext constructor
-78030bc ReplicatedPG: take references for blocked_by and blocking
-a85ab1e obsync: pull object metadata from swift store
-7eb2873 PG: add some documentation
-ffd1b43 ReplicatedPG: delay op while snapdir is missing/degraded
-45b9659 ReplicatedPG: don't manage waiting_on_backfill in start/finish_recovery_op
-3bea1ed rgw: fix subuser key name when purging subuser keys
-9ddb802 radosgw-admin: add --purge-keys option
-5e9d101 ReplicatedPG: apply_repop: apply local_t before op_t
-97dd28c librados: return -EROFS when trying to write to a snapshot
-68ba186 librados: make getxattrs ENOMEM return negative
-a798a85 PG: Do not update_snap_collections for log entries > last_backfill
-2401176 PG: Fix stat debug output
-1362d3e calc_acting: Prefer up[0] as primary if possible
-01f3f6a rgw: add timeout to init path
-cc22f15 MOSDRepScrub,ReplicatedPG: Add scrub_to to MOSDRepScrub
-2710bd8 mon: update man page to document --mkfs stuff
-ed780fd mds: misc assertions about truncation
-720bab9 osd: EINVAL on truncate to huge object size
-33cb279 rgw: remove temp context in prepare_get_obj
-5e73933 rgw: fix xml parser internal structure leak
-a72348e rgw: fix a leak of acl structure (in req_state)
-002eb58 rgw: remove temp context in prepare_get_obj
-27da89f rgw: fix xml parser internal structure leak
-3a8af0f rgw: fix a leak of acl structure (in req_state)
-3af5fff doc: fix typo
-dc97790 osd: --get-journal-fsid
-ae8fbb8 filejournal: uuid for fsid
-c8c5e5d filestore: make fsid uuid_d instead of uint64_t
-c59eb8c osd: --get-osd-fsid and --get-cluster-fsid
-a582209 osd: store osd_fsid as text in osd_data dir
-dcceb8e osd: include osd_fsid in OSDSuperblock
-237b19c osd: rename OSDSuperblock::fsid -> cluster_fsid
-cd909ac doc: fix mon cluster expansion docs
-f2a9599 mon: pull addr from ceph.conf, mon_host as needed when joining mon cluster
-d959334 mon: fix setting of mon addr when joining a cluster
-37e7a52 rgw: fix updating of object metadata
-44b4e02 rgw: bucket cannot be recreated if already exists
-e5f4910 man: Update the configuration example for radosgw
-83cf1b6 man: It is capital -C instead of -c when for creating a new keyring
-3e323e6 rgw: fix updating of object metadata
-08f968f rgw: bucket cannot be recreated if already exists
-f54f4aa obsync: add authurl to CLI
-bfbde5b object.h: initialize max in hobject_t(sobject_t) constructor
-061e761 ReplicatedPG: fix handle_watch_timeout ctx->at_version
-5274e88 ReplicatedPG: add asserts to catch scrub error
-3f3913c doc: fix filename in mon addition process
-7d81a3b filejournal: preallocate journal bytes on create
-739fd9f man: clarify mount.ceph auth options
-e5a5ae1 man: update rule definition for ceph-rbdnamer
-4eb8365 authx -> cephx everywhere it's used
-b5c3259 ReplicatedPG: fix backfill mismatch error output
-41f64be ReplicatedPG: calc_clone_subsets fix other clone_overlap case
-5b41c47 OSD: use disk_tp.pause() without osd_lock
-ec776f4 ceph.spec: Clean up and fix spec file and build for a couple of distributions
-0e0583f init-ceph/init-radosgw: Don't use unspecified runlevel 4
-7a7aab2 osd: wait for src_oid if it on other side of last_backfill from oid
-ca2e8e5 osd: EINVAL on mismatched locator without waiting for degraded
-0c54704 osd: preserve write order when waiting on src_oids
-da28605 client: fix logger deregistration
-62c830f ReplicatedPG: add_object_context_to_pg_stat, obc->ssc may be null
-5a40093 obsync: add vvprint back in
-cda5f0d PG: clear waiting_on_backfill during clear_recovery_state
-d32fd8c ReplicatedPG: list snapid 0 on collection_list_partial for backfill
-07b3ba8 ReplicatedPG: collection_list_partial also takes a snapid
-1430c8a doc: Make overview.rst valid reStructuredText, so I can stop seeing warnings.
-c119074 pybind: Add a description to docstring.
-53f7323 doc: reStructuredText syntax fix.
-7213c45 PG: Ask for digest at most once at a time
-940a55e osd: track backfill target pg stats
-b9eea70 osd: object_stat_sum_t::clear()
-7832e17 PG: activate, backfill replica can have last_complete < log_tail
-51deeef ReplicatedPG: calc_*_subsets must consider last_backfill
-9d633a4 PG: A backfill osd can have last_complete < log_tail
-f483df1 PG: there may now be backfill entries in the acting set
-999846f PG: fix phantom entry in peer_info
-71893b0 osd: remove bad !is_incomplete() assert
-57baf9e osd: fix signed/unsigned comp
-f1caaa3 osd: fix calc_acting()
-f83a787 osd: some recover_backfill() comments
-cd0c8fb osd: add incomplete, backfill states; simplify calculation
-af7536d hobject_t: fix hobject(sobject_t) constructor
-e1006d7 osd: more backfill changes
-9bb77b4 osd: observe last_backfill in merge_log() and helpers
-f1ae9ed objectstore: make list by hash *next > instead of >=
-c03c49c osd: initialize repop gather set in issue_repop instead of new_repop
-baa21c9 osd: implement PG::copy_range()
-de19a6b Revert "osd: don't keep push state on replicas"
-b99e135 osd: make backfill (basically) work again
-88ee86d osd: keep backfill targets in acting set
-9288f0e osd: advance last_backfill by keys only
-f7a0b9c hobject_t: fix sorting by hash key
-91ee337 osd: osd_kill_backfill_at
-400c27d osd: track backfill with last_backfill, not interval_set<>
-0e7f4af osd: pg whitespace
-b5de19b osd: kill unused PG::trim_write_ahead
-e63c595 osd: kill unused PG::Log::copy_after_unless_divergent
-693950b osd: cleanup lingering backlog refs
-d84a9f6 osd: cleanup
-722ec7e osd: kill unused PG_STATE_SCANNING
-d7f7bbd osd: remove recovery-from-backlog kludge last_update
-9ceecc8 osd: kill PG::Info::backlog
-7521c51 osd: remove backlog case from clean_up_local
-257b85d osd: remove log_backlog from PG::Info
-e7514f7 osd: state machine whitespace
-6d29955 osd: strip backlog logic out of PG::activate()
-3f5ced6 osd: kill backlog_requested
-82a23db osd: strip backlog case out of merge_log
-5b558dc osd: strip out some backlog logic
-78b6447 osd: kill PG::Log::copy_non_backlog
-b8ee27a osd: remove Query::BACKLOG processing
-6e9d135 osd: simplify replica queries for finding divergent objects
-b066485 osd: remove backlog generation code
-73d15e0 osd: do not read backlog off disk
-004e7c9 osd: add Incomplete peering state
-4509e61 test_backfill.sh
-910398f osd: recover discontiguous peers using backfill instead of backlog
-e4ab0e3 osd: add MOSDPGBackfill message
-353195d types: operator<< for multimaps
-17b5d5c osd: implement do_scan
-92d290d osd: implement ReplicatedPG::scan_range
-55c2481 osd: implement ReplicatedPG::_lookup_object_context
-8f14a35 osd: add PG::BackfillInterval type
-9e51c63 osd: MOSDPGScan
-2cdc6b4 osd: rewrite choose_acting process
-99c614f osd: don't keep push state on replicas
-10e481d osd: fix push_to_replica typo
-d745ff8 doc: "ceph -w" clarification.
-bc16ac3 doc: Fix sentence that ended too abruptly.
-f5cfdbb doc: Split intro to talk about the DFS separately. Mention petabytes.
-034dd58 doc: Add more missing commands to control.
-81feae1 doc: Add misc explanations of Ceph internals from email.
-75fd16a doc: Use todo directive, rescue list of missing commands from wiki.
-196d427 doc: Link to manpage when command is mentioned.
-b7a5a6a doc: More consistency on formatting placeholder names.
-55639dc msgr: unset did_bind in stop().
-41049f3 objecter: fix use-after-free
-041d045 client: move PerfCounter into Client
-e8e1e5d swift: auth response returns X-Auth-Token instead of X-Storage-Token
-c9d0e55 osd: fix build_incremental_map_msg
-1a473b7 osd: clean up _delete_head
-6c8f60f osd: simplify creation logic in do_osd_ops
-abecbc5 OSDMonitor: remove useless check
-5804477 qa: trivial_libceph test
-207c40b libceph: add missing #includes
-2f281d1 libceph: catch errors from Client::init()
-c87f31e client: return errors from init
-7133a2f filestore: dump transaction to log if we hit an error
-6b42567 objectstore: implement Transaction::dump()
-3d13f00 objectstore: create Transaction::iterator class
-6ff95e9 qa: rados load-gen workunits
-6d5e5bd pybind/rados: add asynchronous write,append,read,write_full operations
-fb8fd18 doc: Clarify documentation of reweight command.
-db30716 doc: Add missing documentation for osd pool get.
-7dce3e6 doc: Update the list of fields for the pool set command.
-1867a74 doc: Document pause and unpause osd commands.
-9aadd41 doc: Add documentation of missing osd commands.
-78b7a25 doc: Import the list of ceph subcommands from wiki.
-1dd173a messenger: fix up fault()'s "onconnect" parameter.
-e6e6623 mds: mark_disposable when closing a Client connection.
-0604647 SimpleMessenger: remove void send_keepalive.
-711447d mon: add mds, mon info to cluster_logger
-808a851 mdsmap: rename get_num_*_mds() methods
-ac31d52 mon: report basic cluster stats via perfcounters
-1f1b5fd crush: drop unused label
-495307a crush: fix force to behave with non-root TAKE
-14f8f00 crush: simplify force argument check
-cf279a8 workunits: print tests pjd runs
-864847b pybind: add object locator support to pybind pool listing
-4ce7dd4 rados.cc: add --object-locator and object locator output to ls
-111c12c ReplicatedPG: collection_list_handle_t is now an hobject_t
-798ef38 osd: delay pg list on a snapid until missing is empty
-e2a9450 obsync: add swift support to obsync
-d21f4ab msgr: turn up socket debug printouts
-891025e udev: drop device number from name
-a5606ca pybind: trivial fix of missing argument
-e4db129 crush: whitespace
-808763e osdmap: initialize cluster_snapshot_epoch
-c94590a crush: set max_devices=0 for map with empty buckets
-ca002a3 crush: fix stepping on unallocated memory
-d940d68 client: trim lru after flushing dirty data
-1545d03 client: unmount cleanup
-f3c90f8 client: wait for sync writes even with cache enabled
-adbe363 client: send umount warnings to log, not stderr
-2d3721c ObjectStore,ReplicatedPG: remove old collection_list_partial
-717621f librados,Objecter,PG: list objects now includes the locator key
-322f93a hobject_t: encode max properly
-0807e7d hobject_t: make filestore_hobject_key_t 64 bits
-997265a os/HashIndex: some minimal debug output
-9ab445a ObjectStore: Add collection_list_partial for hash order
-63e3d86 hobject_t: define explicit hash, operator<<; drop implicit sobject_t()
-cada2f2 object.h: Sort hobject_t by nibble reversed hash
-348321a hobject_t: sort by (max, hash, oid, snap)
-2026450 hobject_t: define max value
-745be30 gitignore: Ignore src/keyring, as created by vstart.sh
-a1ebd72 ReplicatedPG: don't crash on empty data_subset in sub_op_push
-8afa5a5 workunits: fix secret file and temp file removal for kernel rbd
-03b0355 ReplicatedPG: do not ->put() scrub messages when adding to a WorkQueue.
-bcd26fc workunits: make rbd kernel workunit executable
-2bdf907 doc: Reorganize pip calls to use a requirements file.
-200d7c8 doc: Switch diagram tools from dia to ditaa.
-33753c8 filestore: send back op error to log, not stderr
-20b7af7 doc: fix typo
-66b6b1b workunits: add some tests for kernel rbd
-fd9556f rbd: the showmapped command shouldn't connect to the cluster
-16a211b ceph-rbdnamer: include snapshot name if present
-274f489 rbd, mount.ceph: use pre-stored secret if available
-0ad0fbf secret: add is_kernel_secret function
-01d30e6 secret: fix error check
-575f717 rbd: allow snapshots to be mapped
-ddc11a8 test_rados.py: clean up after EEXIST test
-9512aed doc: fix rst syntax
-7178f1c doc: document monitor cluster expansion/contraction
-16f7928 cephtool: fix shutdown
-019597e filejournal: make FileJournal::open() arg slightly less weird
-86c34ba vstart.sh: .ceph_keyring -> keyring
-1e3da7e filejournal: remove bogus check in read_entry
-dc167ba filejournal: set last_committed_seq based on fs, not journal
-4a0b00a mon: stub perfcounters for monitor, cluster
-8bbe576 osd: safely requeue waiting_for_ondisk waiters on_role_change
-6dd8148 osd: rename {take -> requeue}_object_waiters
-c883100 rados.py: add list_pools method
-0622871 Doc: add a conceptual overview of the peering process
-c45a849 mds: remove obsolete doc
-0c183ec crush: ignore forcefed input that doesn't exist
-faf5ce6 Revert "CrushWrapper: ignore forcefeed if it does not exist"
-321ecda (tag: v0.39) v0.39
-75aff02 OSDMap: build_simple_from_conf pg_num should not be 0 with one osd
-2f5bd5f objecter: initialize global_op_flags to zero
-813523a Doc: delete gratuitous index.html
-48165af Doc: complete reversion of architecture.rst
-3c7a82a Doc: deleted gratuitious PlanningImplementation.html,
-fdf3f7b Doc: Restore the previous version of architecture.rst
-4cfe081 doc: change state model from .svg to .png
-1bbf9ae fixed ubuntu version typo
-6fbab6d CrushWrapper: ignore forcefeed if it does not exist
-363ebb6 librbd: report an error if rbd header does not match
-d4aef20 hadoop: apache license.
-348c71c mds: fix blocking in standby replay thread
-f6ee369 global: make daemon banner print explicit
-5828009 mds: fix usage text
-353ee00 mds: adjust flock lock state on export
-2443878 Objecter: loop the right direction when searching for local replicas
-1c696b6 doc: Add peering state diagram
-30ede64 Makefile: ipaddr.h, pick_address.h
-77a62fd Makefile: add missing uuid.h to tarball
-ebb585d Objecter: fix local reads in recalc_op_target
-8788a40 osd: subscribe to next map if flagged FULL
-c2889fe mds: encode truncate_pending in inode
-98e0a6f uclient: remove filer_flags and use Objecter::global_op_flags instead
-da2e0c3 Objecter: add a new global_op_flags that is passed to every Op constructor.
-5138593 Objecter: remove unused variable in op_submit
-4974a9c uclient: remove useless if-else based on snapid
-cef1673 debian init: Do not stop or start daemons when installing or upgrading
-ce65722 mon: search for local ip during mkfs
-61b9db3 pick_address: implement have_local_addr()
-84b0059 monclient: name nameless monitors noname-<foo>
-7a45340 pick_address: whitespace
-30def38 corrected variable (con) to be consistent with prior examples (cluster)
-934e1e5 ReplicatedPG: Also count overlaps for snapsets on snapdirs
-97d82ed ReplicatedPG: Account for clone space usage in make_writeable
-ad13d0b ceph: fix shutdown race
-414caa7 common/pick_address: Fix IP address stringification.
-9870e2f mon: pick_addresses before common_init_finish
-036ad4c mon: set default port if not specified...
-36978a6 mon: calculate rank by addr, not name
-0045c90 monmap: assign rank by sorting addr, not name
-ebe5fc6 obsync: tear out rgw
-3a20b42 mon: name self in monmap if --public-addr specified during mkfs
-a859763 rgw: don't remove tail of lru if that's what we touch
-aeeeade mon: mark down all connections when rank changes
-bed3c47 mon: handle rank change in bootstrap
-8b46409 mon: pick an address when joining and existing cluster
-5ba356b mon: remove unused myaddr
-0c9724d mon: simplify suicide when removed from map
-eb8d91f PG: it's not necessary to call build_inc_scrub_map in build_scrub_map
-c066e92 mds, osd, synclient: Pick cluster_addr/public_addr based on *_network.
-0477f23 common/pickaddr: Pick cluster_addr/public_addr based on *_network.
-eec61b4 common/ipaddr: Add utility function to parse ip/cidr style networks.
-0f748d4 common/ipaddr: Find a configured IP address in given subnet.
-97464bc msg: Move public_addr use outside ->bind()
-0f9a060 common/str_list: Make unused return value void.
-2bae350 osd: Remove unused variable.
-3c8fec2 osd: fix 'stop' command
-b47347b osd: protect handle_osd_map requeueing with queue lock
-70dfe8e osd: lock pg when requeuing requests
-811145f paxosservice: tolerate _active() call when not active
-88963a1 objecter: simplify map request check
-cd2e523 objecter: cancel tick event on shutdown
-f607028 paxos: fix sharing of learned commits during collect/last
-3b53b72 rgw: support alternative date formatting
-9aabd39 paxosservice: consolidate _active and _commit
-10fed79 paxosservice: remove unused committed() callback
-b521710 mon: mdsmon: tick() from on_active() instead of committed()
-becfce3 mon: share random osd map from update_from_paxos, not committed()
-9920a16 config: support --no-<foo> for bool options
-1a468c7 config: whitespace
-cc5b5e1 osdmon: set the maps-to-keep floor to be at least epoch 0
-45cf89c Revert "osd: simplify finalizing scrub on replica"
-57ad8b2 FileStore.cc: onreadable callbacks in OpSequencer order is enough
-dedf2c4 osd: error responses should trigger all requested notifications.
-09c20c5 objecter: trigger oncommit acks if the request returns an error code.
-9800fae paxos: do not create_pending if !active
-fa58768 Revert "mon: don't propose new state from update_from_paxos"
-66c628a mon: don't propose new state from update_from_paxos
-6ae0f81 rgw: if swift url is not set up, just use whatever client used
-ef5ca29 fuse: fix readdir return code
-d61ba64 paxos: fix trimming when we skip over incrementals
-367ab14 paxos: store stashed state _and_ incrementals
-6bc9a54 mon: elector: always start election via monitor
-685450b common: libraries should not log to stdout/stderr
-f1dd56d objecter: set skipped_map if we skip a map
-5afef02 objecter: add is_locked() asserts
-bf91177 objecter: send slow osd MPing via Connection*
-fa4b0fb osd: add pending_ops assert
-17fa1e0 mon: renamed get_latest* -> get_stashed*
-b9d5fbe mon: fix ver tracking for auth database
-b425f6d mon: always load stashed version when version doesn't match
-2e19550 rgw: don't log entries with bad utf8
-0276eab rgw: adjust error code in swift copy failures
-1fe1692 rgw: fix swift responses encoding
-2445fd8 rgw: Fix some merge problems uncovered by gcc warnings:
-cd90061 Resolve gcc warnings.
-a5b8c85 osd: remove dead osd_max_opq code
-f418775 workunits: rados python workunit should be executable
-102c434 crush: send debug output to dout, not stdout/err
-25eee41 test/run_cmd: use mkstemp instead of mkstemps
-1800986 ceph-authtool: fix clitests
-d476ae2 test_str_list: make sure ' ' and ', ' separaters work for str lists
-ecd713c ceph-authtool: make error msg more helpful
-4f39aaa keyring: don't print auid if it is the default
-ee02a1e mon: implement 'fsid' command
-73f99a1 mon: fix 'osd crush add ..' weight
-1b843e0 osdmap: build_simple with normal osd/host/rack/pool hierarchy
-ec97c85 mon: fix 'osd crush add ..' weight
-0349fa9 vstart.sh: don't generate initial osdmap explicitly
-30ddc85 mon: make initial osdmap optional
-0d81225 osdmap: build_simple: create reasonable pools when numosd==0
-8e150fb mon: add '--fsid foo' arg for setting generated monmap fsid
-b51d817 mon: take '--fsid foo' arg with --mkfs
-0c731ed osd: fix warnings
-73705f6 monmaptool: fix clitests
-36241da paxos: discard waiting_for_active events on reset
-80ab656 monclient: use blank fsid (instead of epoch==0) for monmap checks
-2253c01 use libuuid for fsid
-07950bb crush: grammer: allow '.' in name token
-cf0a53e mon: fix seed monmap removal
-6d370f3 mon: allow monitor to automagically join cluster
-d56485a osd: pass monclient::init errors up the stack
-bf254de mon: verify fsid during probe and election
-f1a98fb mon: tolerate won election while active
-cd736b9 mon: clean up logic a bit
-2633d71 mon: only re bootstrap if monmap actually changes
-622fbad paxos: fix off-by-one in share_state
-6c663d8 mon: fix monmap update
-1134fdf mon: properly process monmaps even when i have the latest
-c097e63 mon: fix up update_from_paxos() methods
-f31825c monmaptool: new maps get epoch 0
-65f797e mon: clean up mkfs seed data
-e545af2 mon: remove empty monstore dirs
-aea7563 mon: create initial states after quorum is formed
-1533f1c mon: stage mkfs seed info in mkfs/ dir
-9e941c4 mon: eliminate PaxosService::init()
-0a926ef mon: include monmap dump in mon_status and quorum_status
-8c3d872 mon: pull initial monmap from monmap/latest OR mkfs/monmap
-0ecae99 mon: take explicit initial monmap -or- generate one via MonClient
-dae6c95 test_filestore_idempotent: detect commit cycles due to non-idempotent ops
-add04d1 filejournal: fix replay of non-idempotent ops
-9f1673c test_filestore_idempotent: transactions are individually idempotent
-8df0cd3 filestore: make trigger_commit() wake up sync; adjust locking
-0981112 filestore: document the btrfs_* fields
-69cd362 filestore: sync after non-idempotent operations
-5407fa7 workunits: add workunit for running rgw and rados python tests
-2fb7029 rgw: remove warning
-71bfe89 test/pybind: add test_rgw
-ea42e02 test/pybind: convert python rados and rgw tests to be runnable by nose
-25cde7f rados.py: fix Snap.get_timestamp
-b600ec2 (tag: v0.38) v0.38
-2a7fbe0c common: return null if mc.init() unsuccessful
-a177a70 rbd.py: fix list when there are no images
-27bb48c mon: overwrite in put_bl
-2f97a22 PG: mark scrubmap entry as not absent when we see an update
-8794112 rgw: implement swift copy, fix copy auth
-704644b PG: gen_prefix: use osdmap_ref rather than osd->osdmap
-7fb182a OSD: sync_and_flush afer mkfs to create first snap
-a3dd5bd PG: update info.history even if lastmap is absent
-023ff59 Makefile: add MMonProbe.h
-fd5fb99 osd: remove useless proc_replica_log() side-effect
-78ad144 hadoop: update patch and Readme.
-386c0db rgw: swift guesses mime type if not specified
-78ccb2a osd: comment PG::lock*(), whitespace
-5fa8df1 osd: improve last_peering_reset debugging
-383dfa3 crypto: make crypto handlers non-static
-b41b1fa PG: cache read-only reference to the current osdmap on pg lock
-5df28ec OSDMap,CrushWrapper: const cleanup on OSDMap
-0dffddf osd/: change type of osd::osdmap to a shared_ptr
-9db994a PG: always add backlog entry
-15da478 rbd: Fix the showmapped cmd usage
-3354933 hadoop: return all replica hostnames
-e6035a6 hadoop: make listStatus quiet
-d7f911f hadoop: handle new ceph_get_file_stripe_address
-619430a client: return stripe address replicas
-c5c5037 client: fix bad perfcounter fset callers
-808c644 Improve use of syncfs.
-c51e2f7 osd: fix perfcounter typo
-1ac6b47 os: rename and make use of the split_threshold parameter.
-09455ee perfcounters: fix users of fset on averages
-87634ce osd: don't open deleted map from generate_past_intervals
-20cf1e9 automake: enable 'make V=0'
-1bc1a24 mon: handle active -> electing transition properly
-7609032 rgw: don't return partial content response with bad header
-7a32cc6 rgw: swift bucket report returns both bytes size and actual size
-a04afd0 rgw: abort early on incorrect method
-2fb73bd paxos: fix race between active and commit
-1ffb7b9 mon: add 'quorum_status' command
-a8b28ee mon: do not participate in the election unless we are in electing state
-64350c0 rgw: guard perfcounter accesses in rgw_cache.
-42f5f02 rgw: initialize all the perfcounters, in order
-e952e10 ReplicatedPG: use finc, not fset, on average counters
-29e091b mon: 'mon_status' command to dump individual mon state
-f0b9a33 rgw: use l_rgw_qactive perfcounter
-9035ffb mon: add probe+slurp timeouts
-cf56655 rgw: implement perfcounters
-57b60b8 perfcounter: add some minimal documentation.
-d0b226e7 perfcounter: assert when you try and set an average.
-0fe0f9d rgw: create and tear down a radosgw perfcounter
-2523b70 mon: slurp latest state from active monitors before joining quorum
-100fba8 mon: fix osdmap trim
-279661f paxos: last_consumed == latest_stashed; behave accordingly
-c2fc986 monmap: simplify constructor
-2f46e8c mon: revamp monitor states
-18941dd mon: rename election_starting -> restart
-628de54 mon: don't call out to mon->call_election for internal election restarts
-40843eb rgw: fix warning
-2836104 rgw: fix accept-range for suffix format, other related issues
-2f881e1 Timer.cc: remove global thread variable
-d4ef921 common: return null if mc.init() unsuccessful
-480b826 rbd: add showmapped to clitests and rst man page
-4e518ed rbd: Document the rbd showmapped cmd
-34d8039 rbd.py: fix list when there are no images
-ae41f32 OSD: write_info/log before dropping lock in generate_backlog
-fb70f5c FileJournal: stop using sync_file_range
-585a46c monclient: simplify auth_supported set
-1014167 Makefile: use static add for test_libcephfs_readdir.
-5b4e9d3 RadosModel: add DeleteOp to test object deletions
-280a4d1 rgw: fix tmp objects leakage
-fc6522a rgw: don't purge pools in any case
-8d914f0 rgw: list system buckets through rados api
-256ac72 rbd: document --order and list required args where they're necessary
-0f98006 rgw: fix PUT without content length (non chunked)
-b873347 gitignore: just ignore all test_ files
-d4faf58 qa: workunit to run test_libcephfs_readder
-120c3fb test: write a test to try and check on Client::readdir_r_cb.
-58eb8c5 rgw: fix null deref, cleanups
-7726e78 rgw: add support for chunked upload
-0d4987d rgw: fix crash when accessing swift auth without user
-376dad9 hadoop: remove unused fs_default_name
-3191e0d hadoop: FileSystem.rename should not return FileNotFound
-60e1e14 hadoop: ENOTDIR should be negative
-6deea1c hadoop: fix unit test: testWorkingDirectory
-ccb08e2 hadoop: remove deprecation warning
-1c24fc7 hadoop: remove deprecated isDirectory()
-a407da0 hadoop: remove statistics initialization
-dcf2d62 hadoop: remove unused variable
-9e8fa02 hadoop: remove initialization check
-3006c6e hadoop: simplify workingDir handling; add home directory
-a79b7e1 hadoop: emulate Ceph file owner as current user
-e9adf73 hadoop: use standard log4j logging facility
-c861ee1 PG: mark scrubmap entry as not absent when we see an update
-f497132 debian: empty dependency_libs in *.la files
-0b0f65a add missingok to logrotate
-47b7036 debian: update VCS sources
-ee34e09 debian: fix libceph1 -> libcephfs1 rename
-26787ce debian: add watch
-2fc01b5 osdmaptool: test --create-with-conf with racks
-885d714 osdmap: assert that osdmap max_osds >= crushmap max_devices
-0bcdd4f osdmap: fix off-by-one in build_simple_from_conf
-b66847e osd: fix assert include
-219141e rgw: swift prefix and path params fixes
-143c572 .gitignore: test_str_list
-aa5f697 Makefile: include/compat.h in tarball
-99bcd7b common: get_str_list unit tests
-79d9718 common: make get_str_list work with other delimiters, and skip the
-7a4c232 monclient: fix else formatting
-ba8c345 monclient: fail fast when our auth protocols aren't supported
-d1e9513 PG: set_last_peering_reset in Reset constructor
-ef51f0f monclient: fix else formatting
-e15177a monclient: fail fast when our auth protocols aren't supported
-9ea0223 osd: kill unused on_osd_failure() hook
-1d9e806 RadosModel.h: use default conf location
-b9a0b2b Revert "PG: call set_last_peering_reset in Started contructor"
-f9b7ecd hadoop: Return NULL when the path does not exist.
-5bd029e osdmap: fix g_ceph_context reference
-0fa8618 ReplicatedPG: check for peering restart before share_pg_info
-199e04a mkcephfs: build initial osdmap from information in ceph.conf
-07c9de8 osdmaptool: build initial map from ceph.conf
-3f67893 crush: make insert_item take float for weight
-ef4b95c ReplicatedPG: Clean up old snap links when recovering a clone
-bd3223f PG: Create new snap directories independently on replica
-b497b38 rgw: canonical resource should use unencoded url
-a845000 rgw: cleanup, remove unused user_id
-7ee0747 mkcephfs: skip non-btrfs osds even with --mkbtrfs
-3a17f02 debian: break redundant dependencies
-b8979f4 MOSDMap: do not leave {oldest,newest}_map uninitialized when decoding old messages
-6353d7b include stdio in order to fix snprintf compilation error
-46bb82f client: fix return value for _readdir_cache_cb
-943893e ceph: fix snprintf warning
-6499211 auth: return unknown if no supported auth is found
-1a4eec2 uclient: fix _getdents and add some documentation.
-e37ab41 uclient: align readdirplus_r with readdir_r.
-27ec04e cfuse: remove unneeded loop.
-55aace7 uclient: readdir_r_cb documentation, and it only returns 0 or -errno.
-354055f rgw: swift related adjustments
-ed839f5 fixed graphic reference and headings
-2c4eb07 fixed image reference
-c57ed06 add images for documentation
-7a02202 rgw: handle swift PUT with incorrect etag
-cae7d5a rgw: handle swift PUT with incorrect etag
-697bba3 rgw: handle swift PUT with incorrect etag
-a817a38 rgw: handle swift PUT with incorrect etag
-d9dfd14 rgw: handle swift PUT with incorrect etag
-87224c0 rgw: handle swift PUT with incorrect etag
-e4dcbd0 ceph: refactor for generic --admin-daemon <sock> <cmd> too
-89dccc0 ceph: --dump-perf-counters[-schema] sockpath
-6979eaa filejournal: journal_replay_from
-b3e1e3e rados: improve error message
-11691a7 radosgw-admin: fix key create check
-921ce53 osd: guard checks for writes
-0c78f0d rgw: handle swift PUT with incorrect etag
-213eb13 Revert "hadoop: get hadoop bindings to build again" and fix.
-e8e1015 rgw: rgw-admin --skip-zero-entries
-180c744 perfcounters: fix accessor name
-1a0a732 objecter: instrument with perfcounter
-e747456 rgw: rgw-admin generate-key/access-key=false fix
-9386a7b rgw: rgw-admin can show log summation
-7fbf28a osd: read_log: only list the collection once
-6752bab rgw: fix bucket suspension
-f197e84 rgw: fix uninitialized variable warnings
-952be11 hadoop: bring back Java changes.
-d9f7360 rgw: fix attr cache
-5151a8a common/ceph_extattr.[ch] > common/xattr.[ch]
-ef48183 fix osdmaptool clitests
-6287ccf mon: reencode routed messages
-72e0ca0 MOSDMap: reencode full map embedded in Incremental, as needed
-90f0429 mon: fix rare races with pool updates
-6ca9906 mon: parse 0 values properly
-03ad5a2 osd: fix last_complete adjustment after recovering an object
-12b3b2d osd: fix generate_past_intervals maybe_went_rw on oldest interval
-c30ab1e osd: MOSDPGNotify: print prettier
-7de2f7a osd: print useful debug info from choose_acting
-e2f3c20 osd: make proc_replica_log missing dump include useful information
-f8e9289 osd: fix/simplify op discard checks
-fa722de osd: move queue checks into enqueue_op, kill _handle_ helpers
-3a2dc65 osd: move op cap check into helper
-662414d osd: drop useless PG hooks
-b1de913 osd: drop ability to disable op queue entirely
-b17c9ca osd: handle missing/degraded in op thread
-7aa0d89 osd: set reqid on push/pull ops
-e2766bd mon: remove compatset cruft
-024bcc4 FileStore: ignore EEXIST on clones and collection creation !btrfs_snap
-6f1b65c ReplicatedPG: fix snapshot directory handling in snap_trimmer
-4d88404 rgw: fix rgw_obj compare function
-df2967a rgw: use a uint64_t instead of a size_t for storing the size
-e161ce1 workunits: test rbd python bindings
-b7aa57f rbd.py: update python bindings for new copy interface
-2af32a4 librados: use stored snap context for all operations
-ae91911 librbd: resize if necessary before rolling back
-a5a8a9c test_rbd: add a test for rolling back after resizing
-315ab94 librbd: propagate error from snap_set
-bfb5ceb workunits: add rbd rollback and snapshot removal tests
-93ccccd rbd: remove unnecessary condition
-e2296c3 clitests: add rbd usage and invalid snap usage tests
-f4aa69a workunit: check that rbd info returns the right size for snapshots
-afa3479 librbd: show correct size for snapshots
-46bb412 rbd: let all commands use the pool/image at snapshot format
-8c6db18 rbd: specify which commands take --snap in usage
-4b10cad rbd: check command before opening the image
-88905b3 test/osd: Add TestReadWrite
-5e4e797 mon: allow adjustment of per-pool crash_replay_interval
-f57c33d rgw: fix check_disk_state; add a strip_namespace function.
-927c357 rgw: add locators to the directory objects, and functions handling them
-0da45ca rgw: rename translate_raw_obj to translate_raw_obj_to_obj_in_ns
-f37b08f librados: behave if shutdown is called twice
-c15e62a mon: need to print pool id for output to be useful
-8a08772 mon: PGMap::dump: fix order in totals
-1b94139 osd: make osd dump slightly more concise
-34c2f6a osd: pg_pool_t: set crash_replay_interval on data pool when decoding old
-6779eb3 osd: make osd replay interval a per-pool property
-7cb4d25 osd: pg_pool_t: introduce flags, crash_replay_interval
-f2816a1 osd: pg_pool_t: normalize encoding
-54e2826 scratchtool[pp]: fix rados_conf_set/get test of log_to_stderr
-9323f25 osd: fix PG::Log::copy_after wrt backlogs (again)
-1b846f4 radosgw: drop useless/broken set_val daemonize
-1f7cb75 config: separate --log-to-stderr and --err-to-stderr
-e98cbc4 rgw: fix xattrs cache
-30c34ab osd: trim past intervals when we complete recovery.
-249ed56 osd: move may_need_replay calculation out of PriorSet
-600bda4 osd: fix last_clean interval bounds
-0359301 mon: fix last_clean_interval calculation
-cf6a940 osd: eliminate CRASHED state
-d6661f9 ReplicatedPG: Include pg version in MOSDOpReply on error
-f8afd8b rgw: reduce rados bucket stats (and getxattrs)
-a1756c5 rgw: object removal should remove object from index anyway
-dd5087f osd: simplify finalizing scrub on replica
-29899de osd: PriorSet: acting/up membership implies still alive
-f94a44e OSDMonitor: reweight towards average utilization
-49b6c11 osd: PG::PriorSet: make debug_pg arg const
-fa66e65 osd: PgPriorSet -> PriorSet
-7bc855a osd: PgPriorSet: rename prior_set_affected -> affected_by_map
-78236e4 osd: PgPriorSet: remove obsolete comment
-2a870c1 osd: PgPriorSet: move prior_set_affected into PgPriorSet
-c2e66fb osd: PgPriorSet: kill whoami; make PG arg strictly optional
-2b3bdea osd: fix requeue_ops
-3b76f9f perfcounters: remove dout
-863e5b0 perfcounters: fix unit test
-28df1e9 filestore: measure commit interval, latency, journal full count
-d2dbae9 osd: clean up perfcounter names
-b000e4d filestore: simplify, clean up perfcounters
-d31e78f filestore: simplify perfcounter lifecycle
-d26488b perfcounters: fix addition/removal
-7207b81 filestore: fix perfcounter definition
-53ad579 filestore: fix logger start
-daea03e perfcounters: use simple names
-288ccc8 perfcounters: clean up interface a bit
-f25879a encoding: add optional features
-0aa40ea assert: no 0x before thread id
-0f0c594 osdmap: uninline big stuff
-a71455c rgw: properly handle cleaning up of listings
-6dc0da4 cls_rgw: implement a dir_suggest_changes function.
-470742d cls_rgw: move stat update code after error checks in complete_op
-952ebba cls_rgw: add constructors to data structs; don't leak tags on races
-9496732 rgw: write and use the check_disk_state function
-a5ada56 rgw: fix bad snprintf
-5de847f .gitignore: add test_filestore_idempotent
-b57e896 test_filestore_idempotent: initialize var
-7f5f1ec rgw: implement swift metadata POST
-b297d1e osdmap: make encoding based on features
-6e2018c osd: normalize encoding of pg_pool_t
-cee1b27 crush: clean up encoder/decoder
-954d3f9 use WRITE_CLASS_ENCOER macro when possible
-9d93bfc encoding: WRITE_CLASS_ENCODER_MEMBER -> WRITE_CLASS_MEMBER_ENCODER
-83914d2 test_filestore_idempotent: simple tool to generate a worklaod of non-idempotent operations
-3e92aac filestore: tolerate EEXIST on mkcoll when not-btrfs
-ba165fe rgw: some swift obj metadata related fixes
-13b0bbb mds: handle xattrs on inode creation
-7ea0783 radosgw-admin: fix conflict with KeyType in libnss
-ed5e434 rgw: add content-type to index dirent
-da6cdfd osd: PgPriorSet: cur -> probe
-4e5242e osd: PgPriorSet: restructure lost checks for prior set
-298dbbe rgw: workqueue suicide timeout is infinity
-0a02759 osd: PgPriorSet: simplify (and change) CRASHED logic
-f7ef94d osd: PgPriorSet: update comment terms a bit
-bbb06d3 osd: do not short-cut up_thru update for new PGs
-33b33f7 osd: PgPriorSet: remove unused PG member
-5338136 osd: PgPriorSet: clean up comments a bit
-57e0ab7 osd: PgPriorSet: clean up per-interval var names
-113b783 osd: PgPriorSet: revert start_since_joining check
-f89f4d9 osd: PgPriorSet: do not include UP osds in prior.cur
-3dda446 osd: PgPriorSet: remove up_thru crap
-9dfa110 rgw: fix swift account and containers listing limits
-c5638b7 osd: PgPriorSet: any_survived -> any_is_alive_now
-e6dbd71 doc: Change diagram to have radosgw closer to direct rados access.
-edcd4d9 rgw: some more swift fixes
-0bad37e streamtest: do mkfs
-525a610 streamtest: print to stdout
-9c95604 mkcephfs: copy ceph.conf to /etc/ceph/ceph.conf (when -a)
-9baf5ef ceph.spec: don't chkconfig
-21d941e ceph.spec: work around build.opensuse.org
-195a484 ceph.spec: capitalize first letter to make rpmlint happy
-a6f3bbb (tag: v0.37) v0.37
-ca8f603 osd: fix assemble_backlog
-2fdec7b osd: fix add_next_event Missing::item::have
-c1cabf5 ceph: don't crash when sending message to !up osd
-3a04677 osd: pull old version to revert to
-615689a osd: implement lost_revert
-7c05c1f osd: simplify share_pg_log
-43bd49d osd: fix up PG::Missing methods a bit
-5115882 osd: factor out recover_primary_got() helper
-efe5abf osd: make C_OSD_CommittedPushedObject::op optional
-22684f2 osd: pass version explicitly to pull
-a3be665 osd: fix share_pg_log()
-c3fa078 messages/MOSDPG*: clean up output a bit
-81f36c2 osd: remove superfluous write_info calls
-ad39d81 osd: all_unfound_are_queried_or_lost
-03cd108 osd: adjust LOST log entry types; simplify log entry type strings
-a8760e5 osd: fix up mark_all_unfound_lost so that it actually works
-84a6f6e osd: implement 'flush_pg_stats' command
-1cbcc95 osd: process commands in a workqueue
-b35d96d mon: feed MPGStats tids back through the MPGStatsAck
-f868e38 osd: remove some pg stats debug cruft
-7f687fc osd: handle (and reply to) direct MCommands
-a37d6d0 cephtool: ability to send commands directly to osds
-beaca74 msg: entity_name_t::parse()
-35dab57 msg: add MCommand, MCommandReply message types
-502fbba paxos: trim extra state dirs
-6d12306 PG: call set_last_peering_reset in Started contructor
-b5c6062 filestore: assert on any unexpected error
-ba41e6c osd: send full map if we don't have sufficiently old incremental
-818cf8c mon: make number of old paxos states configurable
-0cc7da2 osd: share oldest_map info with peers
-607043e osd: send full map if we don't have sufficiently old incremental
-3acb919 paxos: trim extra state dirs
-474e368 osd: remove old osdmaps
-dd3282c rgw: multiple swift fixes and cleanups
-b3c68a5 PG: call set_last_peering_reset in Started contructor
-ef30e69 PG: Fix log.empty confusion
-fccd28d PG: Fix log.empty confusion
-f658cb4 makefile changes for interval tree
-d516f9b mds: Unit tests for interval tree
-72d50fa mds: Interval tree implementation
-87f8389 rgw: more swift fixes and adjustments
-b6d9ed9 auth: remove global instance of auth_supported
-1f3b12e osd: bound generate_past_intervals() by oldest map
-45ebaf7 cls_rgw: remove the write_bucket_dir function.
-0167e82 cls_rgw: rewrite rgw_bucket_complete_op to use update.
-75f7e54 cls_rgw: refactor rgw_bucket_complete_op in terms of TMAP
-2592e41 cls_rgw: refactor rgw_bucket_prepare_op in terms of tmap
-83504c4 cls_rgw: refactor rgw_bucket_init_index in terms of tmap
-15a3df8 cls_rgw: refactor read_bucket_dir in terms of tmap.
-583e16d objclass: add map interfaces.
-c98e1c5 ReplicatedPG: remove unused tmap implementation.
-42c8ae7 test_librbd: expect copy to succeed
-d0d265b librbd: return errors when read_iterate fails during copy
-a50fbe2 PG: merge_old_entry: merged delete might not be in missing
-42bbea8 rgw: swift key removal
-05dae94 Revert "config: base default libdir, sysconfdir off autoconf values"
-1216eb2 rgw: some swift api fixes
-7e5dee9 config: base default libdir, sysconfdir off autoconf values
-e07b956 rgw: implement some missing swift api, other swift fixes
-5790a36 rgw: encoded swift key contains full user name
-f883e63 rgw: multiple swift keys per user
-9b18e55 PG,OSD: clean up xlist::items on pg removal
-b43b864 osd: fix race between op requeueing and _dispatch
-f7ec9f7 thread: whitespace
-fc3aac6 filestore: clean up error output
-cd2dedd filestore: tolerate missing current/
-3f619dd ceph.spec.in: fix radosgw files
-468c7dc rgw: find fcgi headers in /usr/include or /usr/include/fastcgi
-032dd84 ceph.spec.in: more updates to make build.opensuse.org happy
-465f1bf ceph.spec.in: add init-radosgw back
-52bad62 rgw: push log list|show|rm into RGWStore
-93a8815 radosgw-admin: push log listing into RGWRados
-69e9f51 rgw: chdir to dir in conf (default /)
-930d57f rgw: push intent log processing into RGWRados layer
-d7f7a21 librbd: don't return >32bit value from copy().
-42ac18c .gitignore: test_libhadoopcephfs build
-9ec60b4 librbd: fix overflow on large large image copy
-b6c4615 librbd: slightly cleaner
-7060efa librbd: fix copy progress
-6185517 hadoop: get the right class member, and ask for it properly.
-dc40b37 auth: move AuthAuthorizeHandler registry into class
-11a1d60 OSD,ReplicatedPG: expire and cleanup unconnected watchers
-9d846d3 move ceph_mount call
-039035b osd: discard requests that from disconnected clients
-88de6ab ceph.spec.in: handle docdir properly
-0121bcd clitests: add test case for crush exhaustive search
-e5db7b2 Makefile: only reset docdir if it's not already defined
-2f877f8 crushtool: fix --weight arg parsing
-8ff1cbb crushtool: add --force N
-af6a9f3 crush: try _all_ bucket items when doing exhaustive search
-5a23694 ceph.spec.in: build on suse
-6e29c28 mon: tolerate 50ms (instead of 10ms) of clock drift
-ff31d3c rgw: fix printf format warning
-8be9450 rgw: make log object naming configurable
-3d2f89f mon: make other send_incremental variant handle map discontinuity
-64935d4 auth: fix authorizer leak fix
-6e04f60 mon: fix osdmap trimming unsigned overflow
-4fe9cca objecter: cope with missing osdmaps in history
-b344d79 osd, pg: ignore responses to obsolete queries
-ad48ada pg: rename warm_restart and last_warm_restart
-85bbc2f .gitignore: add multi_stress_watch
-6bfae03 ReplicatedPG: assert *_FLUSHING unreachable for AccessMode
-5840ae4 test/multi_stress_watch.cc: add watch notify tester for teuthology
-088d0df qa: rados-api: try harder to make these pool names unique
-646ef6a xlist: more assertive
-d78b8c7 xattr: use sys/types.h instead of linux/types.h
-960deb4 Makefile: include ceph_extattr.h to dist tarball
-07c8860 Revert "osd: simplify the session ref-counting branches"
-fce1761 osd: boot with map of oldest-1
-d272146 radosgw-admin: UTC for time in 'log show', local time in separate field
-e8dd1f8 utime: add gmtime() output function
-77cfbfb radosgw-admin: for date filtering for 'log list'
-d926201 cephx: don't leak Authorizers on each request
-5d7e4bd osd: put session ref in ms_handle_reset
-f002144 osd: simplify the session ref-counting branches
-d78286e rgw: fix chdir result warning
-ca3662c rgw: fix rgw_switch_url_previx printf arg
-02be993 osd: same_acting_since -> same_interval_since
-5ab7f8f osd: fix same_acting_since update
-8f62c3b rgw: use conf for rgw_swift_url[_prefix] instead of fcgi env
-85cf0a8 rgw: use conf for rgw_print_continue instead of fcgi environment
-24e05e3 rgw: use conf for rgw_dns_name instead of fcgi environment
-5235b97 rgw: add conf rgw_remote_addr_param instead of using fcgi environment
-9d53b3d osd: fix pg stats encoding for unfound
-1e15166 vstart: use normal name for .asok files
-ed87871 rgw: fix initscript default user
-4ab2a85 rgw: daemonize by default
-5af012a rgw: set locator key before calling get_obj_state()
-c4b51e3 objecter: normalize oloc.key
-a3316f4 cli: fix test contents again.
-e4a6900 osd: fix map epoch check in handle_osd_map
-b38cba2 paxos: update first_committed
-a76f8d4 rgw: fix mis-merge issues.
-b5c27ae monclient: add an initialized bool to guard shutdown.
-1c2ff9d rgw: remove the rgw_buckets files
-f723f0a rgw: remove the rgw_get_bucket_info functions
-1247278 rgw: move rgw_store_bucket_info into RGWRados.
-5f960f8 rgw: remove select_bucket_placement from RGWAccess interface.
-13d4803 rgw: remove rgw_create_bucket.
-98f15e6 rgw: new command to add pools to the list of available places for storage.
-a788bfd osd: fix PG::up calculation on startup
-36aaa77 mon: fix maps sent after osd boot
-d4340ba On FreeBSD, libedit should be linked in explicitly, because this library is present in the system, but it is not in the pkg-config database.
-cb45fbc SimpleMessenger: pass correct address sizes to bind(2) and connect(2),                  otherwise they fail on FreeBSD (and possibly on other                  platforms).
-3e0122c Change PAGE_MASK/PAGE_SIZE definitions to CEPH_PAGE_MASK/CEPH_PAGE_SIZE so they won't interfere with system definitions.
-07b9bc0 SimpleMessenger: add new method addr_size() to return the correct size of the                  address object.  Also, do not assume ss_family is 2 bytes                  on all platforms.
-8f19bb0 SimpleMessenger: getnameinfo needs the correct address size to be passed in sa_len on FreeBSD,                  not just a size of the whole sockaddr_storage placeholder.
-5d75d69 Change extattr wrapper for FreeBSD to return ERANGE error code in case the buffer provided was too small similar to what Linux does.
-3efa160 Fix endianess detection on FreeBSD.
-71cc72f osd: prevent a potential huge memory allocation in case a error      code is returned from getxattr.
-8140bdb Abstract out extended attribute calls in ceph_extattr.c so all the system-dependent extattr code can be moved into a single place.  Implement FreeBSD and Darwin support.
-c4f4ea9 osd: use numeric values for OSD errnos, as ERESTART and ESHUTDOWN values      are system-dependent.  In future, we'll probably want to use system      independent values as Ceph result codes, not system errno values.
-8ffbaff osd: Minimize amount of #ifdefs in src/os/FileStore.cc by allowing      btrfs_ioctl.h to compile and relying on the btrfs runtime checks      wherever possible.
-2b9ba0b Use system-independent definitions for Ceph's setxattr flags parameter.  Ceph passes Linux setxattr flags on the wire without converting them, so use the same values for these defitions.
-9fde4d9 First cut of FreeBSD support.  This patch allowes ceph to compile successfully under FreeBSD.
-0cd3e56 Use /bin/sh, which is more portable.
-64d2b97 osd: remove some dead code
-167c091 rgw: write debug acl output to the debug output (not cout)
-4e9969e rgw: more sane defaults
-3b645fb common: CINIT_FLAG_NO_BANNER
-09b23b4 rgw: rgw_log -> debug_rgw
-37c8829 rgw: remove useless RGWConf::log_level
-1433861 rgw: set dout condvar to rgw_log
-27cf854 rgw: RGW_LOG -> dout
-a7abb06 rados-api/test: don't srand(time())
-f24216a mon: make MPoolOp*::print() readable
-b2361dc radosgw: run as 'user' field in ceph.conf
-8084272 rgw: set xmlns on ListBucketResult element
-4f591b5 osd: get latest osdmaps before booting
-6ff5793 osdmap: include addrs in json dump
-ddbb2ca osdmap: show weight for out osds
-cd93f18 osdmap: show old addrs for down osds
-a47aedd mon: limit maps send on onetime osdmap subscribe
-b8ada49 osdmap: include oldest, newest known epoch in message
-e661bf8 osd: use pointers for handle_advance_map
-71792e8 objecter: fix locking on is_latest_map checks
-9c56070 monclient: use an async finisher
-04b90cc monclient: clean up old version_requests on session reset
-54ce544 monclient: implement get_version() to get newest _and_ oldest map versions
-51fc234 osd: is_active() instead of !is_booting() for map sharing checks
-2a9330f osd: do not request osdmap when loner if not booted
-799323b mon: trim old osdmaps
-906e1da osd: add last_epoch_clean to pg_stat_t
-ea087e3 mon: implicitly mark lost_at when a fresh osd rejoins the cluster
-b8aca4e radosgw: run as 'user' field in ceph.conf
-8e37140 radosgw-admin: make 'log list' behave when .log pool dne
-81c5f6a debian: don't recommend gceph
-9f71bb0 rgw: don't specify create_pool and set_marker in create_bucket.
-4ae8f1c radosgw: make stop succeed when not running
-36f650b rgw: move rgw_bucket_select_host_pool behind RGWAccess as select_bucket_placement
-c49c19c radosgw: fix init-radosgw provides
-bbc644e rgw: remove withdraw_pool function.
-1018673 rgw: remove preallocation of pools
-df9c660 rgw: remove preallocating pools maintenance tick
-04f825e rgw: set xmlns on ListBucketResult element
-848a1f9 debian: add non-stripped exception for libcls_rgw rados class
-2a078f8 Makefile: more radosgw_admin -> radosgw-admin
-5d54398 mds: fix possible deadlock in multi-mds setup
-b968ff3 workunit: clean up temporary files
-12ce321 ReplicatedPG: reset return code after find_object_context
-6103ee9 more radosgw_admin -> radosgw-admin
-c5b0e3e osd: trim ondisk log using Log::Entry::offset
-f85dfa7 osd: combine log_op into append_log
-8111b61 mds: make jouranl writeable in MDLog::append()
-f4e61db mdcache: tolerate no subtrees in create_subtree_map()
-4922757 ceph.spec.in still packages libceph.so in 0.36
-877cacb (tag: v0.36) v0.36
-c00e06f doc: add documentation for librbd python bindings
-683f4dc rbd.py: add class and method documentation
-1c1785d rbd.py: use a dict to translate error codes
-faeecd8 rbd.py: allow setting an image to no snapshot
-da61e1e rbd.py: turn EROFS into an exception
-b1bed35 rgw: don't remove on-disk bucket object in rgw_user::rgw_remove_bucket
-19228d4 rgw: revert part of commit:30b814e2677659ddda4109a1421f33a47d83a05b
-30b814e rgw: don't remove bucket object twice
-b441ecf rgw: fix bucket-id assignment
-48558bb rgw: separate bucket vs object owner tracking
-cb2d366 radosgw-admin: fix acl vs content-length check
-b269d3c radosgw-admin: rename clitest dir
-44d311a radosgw-admin: fix help clitest
-a47d7ad rgw: set log entry owner to user if s->acl is not set
-a4e6049 rgw: simplify bucket info storage
-aa7c5c5 radosgw-admin: pull 'log show' owner+bucket from first entry
-560f90c rgw: fix RGWBucketInfo encoding of owner
-4b8d72b radosgw: fix log retry after bucket creation
-444ca65 rgw: store bucket information in the .rgw pool instead of .buckets
-80ba05e radosgw_admin: we do want to set markers on these buckets
-79fddd2 Cond.h: adjust nlock during waits
-d38b9a5 ReplicatedPG: dump_watchers in do_osd_op_effects
-1eb1ce4 librados: Make notify a linger op
-2269dc2 test_async_snap: loop a finite number of times.
-697e664 qa: btrfs: test_async_snap
-4be3309 radosgw-admin: 'log list' and 'log rm'
-120736a radosgw-admin: dump ints, not strings
-a1942e6 radosgw-admin: fix bucket stats
-fc8588f rgw: protect the id-based accesses from namespace collisions
-47e5958 rgw: remove get_bucket_info and convert users.
-e701177 radosgw-admin: fix 'bucket stats --uid='
-8147841 radosgw-admin: include 'suspended' in user info output
-6891761 radosgw-admin: clean up some cout usage
-0870764 radosgw-admin: use formatter for 'bucket list'
-ab25a4b radosgw-admin: 'bucket stats --uid'
-0c75ec0 radosgw-admin: clean up 'bucket list' output
-83c59cf rgw_admin: rip out format.empty() special cases
-600126f rgw_admin: fix --pretty-format and --purge-data flag parsing
-2f78faf rgw_admin: default to json output
-17603ee radosgw-admin: use formatter for 'bucket list'
-b69da17 rdosgw_admin -> radosgw-admin
-1392bbb rgw: remove now-unused struct RGWPoolInfo
-2f1fc5a ceph: make -o - the default
-7eb15ce ceph: make --concise hide 'N byte written' message
-0eb433d rgw: remove rgw_[retrieve|store]_pool_info and ".pool" pool
-4884f06 osd: fix leak of src_obc references
-a883c83 librbd: fix end_block calculation for read_iterate
-1e4fdf5 librbd: don't zero negative lengths
-c2fbde4 rgw: remove references to pool_id and replace with new bucket_id.
-bd91444 Use LIBEDIT_LIBS in Makefile.am
-a1521ae clientN -> client.N
-214e7b1 monN -> mon.N
-f5fd7f1 mdsN -> mds.N
-4b09c1a osdN -> osd.N
-594180a msgr: print entity_name_t with a .
-fa2fdd9 osd: fix leak of src_obc references
-fc2df62 test-rados-api: test tmap rm
-21aa6d5 osd: error out current op only on tmap ENOENT
-532c594 osd: some PgPriorSet comments, trivial cleanups, new FIXME
-ce086ff osd: skip replay phase if osd_replay_window=0
-390b790 ReplicatedPG: remove assert in remove_watcher
-57ea6b6 rgw: don't encode the bucket name twice in RGWPoolInfo!
-a28047b ReplicatedPG: clean up watched objects on role change
-e3eb2f2 rgw: put bucketid allocator object in root (.rgw) pool
-8953c4d rgw: use same prefix for locator key as for oid
-e63b86d ceph-authtool: fix -C
-607634f ceph.spec.in: radosgw init script
-b690475 mon: auth: implement 'auth print-key <name>'
-3a73606 mon: fix error return codes for 'auth ...'
-edb2587 ceph.spec.in: add rbd python bindings
-951ce29 debian: make python-ceph depend on librbd
-58003d2 pybind: fix errors found by pyflakes
-25ff9fd debian: move ceph and ceph-authtool into ceph-common
-9be9f91 mon: auth: generate random key on 'auth add ...' if no keyring is provided
-1a14a23 debian: ceph-client-tools -> ceph-common, now required, w/ ceph-conf etc.
-68839a6 rgw: list buckets using bucket objects
-9e2edce osdmap: remove dead code
-d340e8e radosgw: fix content-length checks
-e47c11c radosgw: tolerate race creating .rgw* metadata pools
-916e49d librbd: fix end_block calculation for read_iterate
-d71bf04 test_rbd.py: Add large read and write tests
-8ca79a9 librbd: don't zero negative lengths
-4bb553b rados.py: be paranoid about strings
-a28eea8 rbd.py: remove useless version object
-10157d2 rbd.py: be paranoid about strings
-5cd6fad rbd.py: explicitly cast strings to c_char_p for type clarity
-e8d476d rbd.py: pass 0 for the default order, not NULL
-2d8f52f rbd: improve error messages
-69a5e79 rados.py: make exceptions inherit from a base class
-c53d05a rados.py: allow configuring rados through constructor options
-c60abe1 rbd.py: make Image a context manager
-c34e87d rados.py: make Rados and Ioctx objects context managers
-a381294 rbd.py: make exceptions inherit from a base class
-bc16878 Use cpp_strerror or strerror_r when appropriate.
-5f9be6f rbd.py: add partial bindings for librbd
-fa691df rados.py: raise specific error when write is too long
-9983f07 rbd: init counter to 0 so errors don't say '-1% done'
-0cea48a ReplicatedPG, tmap: return -ENOENT if the key to remove does not exist
-74f07fb librbd: use pre-existing helper methods for tmap operations
-afa3064 librbd: add debugging for failing to remove a header object
-56ce7c2 mon: fix it again
-e1eea2b mon: fix dup pool creation race
-c780494 rgw: get bucket markers from the same object at all times
-d27d9d8 init-ceph: more c* -> ceph-* cleanup
-9cb6c55 osd: fix warning more
-7cd4c68 radosgw_admin: 'bucket list' or 'buckets list'
-3b10fd7 Makefile: include init-radosgw in tarball
-0dc45be radosgw: shut down threadpool
-774aa25 rgw: pass POD c-string instead of string to formatter
-38c6fa5 osd: fix warning more
-b582e7c osd: fix warning
-8563b96 debian: include radosgw init script in package
-b19a200 radosgw: init script
-30d81fe filejournal: improve debug error messge
-8aa15e8 osd/mon: make max maps per MOSDMap message tunable
-8711c32 osd: limit size of osdmap messages
-56071cc osd: drop map_cache_keep_from
-59bcb0d osd: limit size of OSDMap cache
-720788c rgw: only require content-length to be set on non-acl puts
-4aa90a5 osd: don't finish boot unless instance in map is really us
-9fe49f5 init-ceph: don't umount btrfs by default
-ad38abc - Fix atomic set.
-6709455 rgw: user async exec for index completion op
-c8bd67b librados: add async exec
-5369513 rgw: tmp objects can be removed async
-6b9817a rgw: fix bucket stats
-2417617 rgw: fix header encoding
-230ec89 rgw: fix compilation warning
-37f5da4 rgw: fix compilation
-b7ec4d5 cls_rgw: substract obj stats only if obj exists
-ca77ba7 rgw: integrate index categories
-5a39724 rgw: only require content-length to be set on non-acl puts
-00a7d3c Revert "rgw: tolerate missing content-length header on canned ACL puts"
-cdecf71 man: c* -> ceph-* rename: Regenerate manpages.
-7f30151 doc: Fix reStructuredText formatting warnings.
-3fe96be Makefile: c* -> ceph-* rename: missed cdebugpack in CLEANFILES.
-8506c5b Makefile: Add missing header test/unit.h
-d32592e .gitignore: distcheck temporary directory.
-e35d9de Makefile: include run-cli-tests-maybe-unset-ccache in dist tarball.
-a62108b ceph-run: c* -> ceph-* rename: Use ceph-run as stderr prefix.
-0c2cfa1 ceph-debugpack: c* -> ceph-* rename: use "ceph-debugpack" as temp dir name too.
-da8fa78 udev: c* -> ceph-* rename: missed crbdnamer.
-3fd3c6b debian: c* -> ceph-* rename: missed csyn, crbdnamer.
-dea14f7 rpm: c* -> ceph-* rename: missed crbdnamer, cdebugpack.
-98b55b3 Makefile: c* -> ceph-* rename: missed crun.
-1ce18d3 doc: v0.35 is out, remove rpm build workaround.
-c416649 doc: Add index into the sidebar.
-b2d46ef doc: Search page is always in sidebar, no need to have it on page.
-8ca4c5a doc: Add a space after sudoers "NOPASSWD:", as that seems more common.
-76fbdfb doc: Add index entries, remove glossary as it's practically replaced by the index.
-65d2c49 doc: Leftovers of the c* -> ceph-* rename.
-29bbcee rgw: update index when doing put_obj_meta
-05b06e8 rgw: tolerate missing content-length header on canned ACL puts
-3b5cb69 cls_rgw: list entries return upper_bound of marker
-2ffb04b rgw: fix a few regressions
-e0be65c mon: remember source client address in routed requests
-878fedb osd: fix race between handle_osd_ping and handle_osd_map
-dd8d4ec Makefile: drop useless all_sources thing
-0fdc863 rename source files c* -> ceph-*
-5369c77 misc: use strncpy to prevent buffer overflow
-4b8cf14 ceph-elaster: add parentheses around macros
-1707181 test_store: parse args, don't link librados
-5f95172 rgw: fix clone in case state is NULL
-e241433 rgw: send correct object id to class op
-abdb327 rgw: encode correct timestamp
-10c5cee rgw: fix rgw_admin arg parsing
-00e0332 rgw: generate tag if doesn't exist
-9441c41 crushtool: add unit test for adding items to map
-6eb8862 crushtool: fix argument parsing
-33151a9 crushtool: crush_finalize on any map modification
-e6eeaac Revert "crush: refuse to add item >= max_devices"
-b873ec8 rgw: two phase commit for index updating
-bfbda96 man: rebuild manpages
-3e9a936 doc: more c* -> ceph-* renames
-ba9271c rbd: set default pool when none is specified
-fba541e libceph -> libcephfs
-6f8f140 c* -> ceph-*
-97aa1aa mount.ceph: use ":/" instead of just ":" as ip/path delimiter
-e124b15 addr_parsing: null terminate safe_cat result
-17b2451 mount.ceph: fix use-after-free
-ac1a40d test/rados-api/test.cc: Add ability to set client id
-4686b56 test/test_stress_watch.cc: added simple watch stress test
-5503d45 PG: set log.backlog to false on corrupt log
-a01a947 PG: set log.backlog to false on corrupt log
-0fbf86c rgw: fix rgw_bucket_dir_entry encoding
-6f519f9 rgw: list objects (almost completely) works
-b36b01f rgw: obj listing doesn't stat object
-98d0361 rgw: store more info for each indexed object
-8cb5746 vstart: debug filestore = 20
-68fe748 osd: fix PG::copy_after vs backlog
-ca63faf mds: fix traverse snap vs forward check
-82a1935 rbd: fix progress redraw
-ebe6d08 cls_rgw: store more info for each entry, stats categories
-1c2cc8b rgw: account object removal
-8403daf rgw: account clone_range dest object
-f488908 doc: Content for Getting Started with cephfs and rbd.
-028ba54 rgw: class init_index
-69fabca doc: Content for Getting Started with RADOS.
-c3fae7e doc: Structure for Getting Started.
-47dfe29 doc: Separate key management from mounting.
-c01d36c doc: Move config reference to top-level.
-093f4f3 doc: Split data placement into concrete operations and recommendations.
-bc9477a doc: Reorganize ops/manage/
-8648b7a doc: Move recommendations under /rec.
-d292aee doc: Move ops/grow under ops/manage.
-9888fc6 doc: Split manage into multiple pages.
-331510f doc: Split install into multiple pages.
-c448c4c doc: Clean reStructuredText syntax.
-aa666b1 objclass: add stat operation
-2ec5f15 cls_rgw: list marker uses lower_bound
-894a8b6 client: tear down dir when setting I_COMPLETE on empty
-b9e32ff rados: accept '-b' as an argument.
-0afda37 (tag: v0.35) v0.35
-2c28e1c Makefile: include config_opts.h
-6068fc8 osd: set reply version for dup requests
-43967f5 auth: keyring: whitespace
-b39f080 mon: make fsync vs sync threshold configurable
-0852ecf mon: remove unused MonitorStore::sync()
-b2fbbf0 rgw: implement rgw_rados helpers for class calls
-56413b8 mkcephfs: create /var/run/ceph (or wherever pid_file and admin_socket live)
-f5c1632 cconf: do not common_init_finish
-096e3b6 rbd: error out gracefully when snapname specified for command that doesn't use it
-c329d00 mon: 'osd set pool <foo> crush_ruleset <num>'
-3a8568b rgw: fix epoch check (greg)
-f137a04 rgw: reuse pools
-f4d63b0 rgw: fix bucket removal (old scheme)
-b445c6f rgw: fix object removal
-fdd98ee rgw: fix bucket listing (still using old scheme)
-1c11b20 rgw: rgw_admin -- add bucket marker to bucket stats
-0b0e844 OSD: return NULL when the OSD does not have the pg in lookup_lock_raw_pg
-25499b6 pool sharing, initial work
-4fc1e96 rgw: define rgw class api
-726a583 rgw: Makefile changes, move around definitions
-73bc771 rgw: make cls_rgw compile
-0f7a490 ReplicatedPG: populate obc watchers on sub_op_push
-a711f29 osd: remove throttle_op_queue()
-741990c rgw: class for bucket directory
-46cfda7 osd: preserve ordering when throttling races with missing/degraded requeue
-4fb3d34 osd: set reply version for dup requests
-6cce379 CInode: don't leak old default_layouts if they get overwritten
-0ac8985 CDir: put delete with pop so we don't read free'd memory in output
-8c8e1d8 osd: clear need_up_thru in build_prior as appropriate
-d440a67 flock: clean up waiting records of a lock when adding it succeeds
-39970c0 flock: add a replay parameter to add_lock
-d64237a ceph_common.sh: Do not sudo to root unless needed
-ea6986a flock: move operator<<() to flock header, remove extra line
-3e3c0ba flock: remove doubled debug output
-375b8f7 fix .gitignore for test_addrs
-7c5a216 test/test_addrs: unit tests for addr parsing
-362dea3 Remove various unused variables
-b6f4de4 msgr: parse ipv6 addresses without []'s
-cb7f553 doc/dev/logs.rst: Add performance counter writeup
-89c06e7 doc: Add section about changing config values
-7d3aa0e osd: use target obj locator for source object if empty
-0d46f06 conf: allow ; as a list separator
-2981cca Make g_conf constant for all conf variable types
-dd01df7 const-ify integer config values
-a052c2e config: define config vars once in config_opts.h
-ec992be init-ceph.in: change init script status output
-18e5be3 FileStore: use config observers
-c704b52 cfuse.cc: use apply_changes API
-1312f18 testmsgr.cc: use set_val / apply_changes
-6a4a707 osd/OSD.cc: use set_val / apply_changes API
-668afd7 doc: Typo.
-95a3845 Fix double dash handling
-ffe844a mds/MDS.cc: don't crash on bad injectargs
-2f3cfa1 doc: Instructions how to build RPMs.
-b68eaf1 doc: Say "radosgw" not "rgw".
-ecd368c doc: Shrinking of MDSes is not supported yet.
-ee6126b Makefile.am: fix test_librbd
-e86f3bd osd/OSD.cc: don't crash on incorrect injectargs
-6c81960 PG: fix typo in PgPriorSet constructor
-5b57fb6 tools: fix compile
-9a0f55d Get rid of silly unused parameter
-8e141f4 monclient: reopen session on monmap change
-613e906 monclient: use cur_con throughout
-691794f msgr: send_keepalive to a Connection
-7564035 test_librbd: remove unsigned/signed comparison
-37f1b96 librbd: Update .gitignore after moving to gtest.
-f74f603 get_*_compat_set: get ctor param ordering right
-9a1e13c PG: assemble backlog directly rather than queueing on corrupt log
-6228389 qa: add test_librbd workunit
-e84996d Remove global ctors/dtors for CompatSet
-923c60c librados: add conf_parse_env()
-5cb7b37 librbd: move c++ tests to gtest
-e2ec946 librbd: convert C tests to gtest
-9b6f3e1 librbd: rev LIBRBD_VER_EXTRA for rbd_flush() addition
-b90be90 librbd: implement rbd buffered write window
-c9159a0 client: fix odd crash on rename
-6a63223 rbd: show progress
-2b0fab1 mon: stray PGInfo is not an error
-8cb3754 osd: fix leak of osd_lock on pg lookup vs pool deletion race
-79ee90b store_test: fix warning
-405abf5 PG: generate backlog when confronted with corrupt log
-92fa2ff man: Generate manpages from doc/man.
-60aea05 doc: Convert manpages to doc/man/.
-80f5460 doc: Hide TODO note in rbd.8
-3f199be doc: Make rbd.8 "pool-name", like the old man page.
-c25b955 doc: Remove duplicate paragraph from rbd.8
-829ebaa ReplicatedPG: Fix src hobject_t construction in clone_range call
-b37b61e workunit: use sudo when first reading /sys... too
-efaf91b workunit: and delete root-owned file
-d021b22 workunit: you need sudo to look at /sys/kernel/debug
-9713666 rgw: rgw_admin, init gen_secret, gen_key
-ba9cafd debian: no /var/run!
-4281f02 PG.h: Initialize invalid_hash in Entry()
-83c6dd0 debian: create var/run/ceph
-a73d53f debian: radosgw: add dirs to package
-be43ff5 ceph: avoid noise when there is no output
-2eb9baa OSD: reset filestore_update_collections to false after do_convertfs
-ff639c1 object.h: initalize hobject_t correctly
-34822ad workunits: make file_layout.sh more robust
-c16241f rpm: Include ceph.spec in release tarball.
-0978178 rpm: Create the /etc/ceph directory.
-b618528 rpm: Add newly-added files to %files.
-b4bc9f6 rpm: Build without tcmalloc, by default.
-3819beb ceph: -o - to stdout, not stderr
-4c0125d mon: Clean up MonSession/Connection leak on MForwards
-2f04acb osd: Clean up PG leak
-11021e8 osd: clean up leak on old/unneeded peering messages
-8c5cb59 osd: Sessions get weak pointers to Connections
-228bd59 filestore: free fiemap used for testing fs capabilities
-676dc9c WorkQueue: don't deliberately leak memory
-1a44500 ceph: clean up command output
-1986d98 client: some debugging
-fc587d6 client: fix leaked Dir on rename
-7077e67 client: clean up Inode ref counts slightly
-be8c167 OSD: info.pgid gets removed from creating_pgs before _create_lock_new_pg
-c332f97 rbd: --size is megabytes, not bytes
-523283a osd: take ondisk_read_lock on src_oids
-bf1963c object.h: make hobject key private, prevent objects where key == oid
-c164904 rgw: make loop exit case explicit, removes warning
-61708dc README: update a bit
-fa14765 IndexManager: delete index during RemoveOnDelete
-cd2716c OSD: use creating_pgs[pgid].history in get_or_create_pg for new pg
-bce271e client: add inode on IMPORT
-15cd43d client: factor out flush_cap_releases() helper
-3444e48 mds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking
-f9412b1 mds: _finish_xlock helper
-8f7c72b mds: mutation: add start/finish locking hooks
-c975bb8 mds: move Mutation + children out of MDCache.h
-c46430f librbd: {remove,resize,snap_rollback}_with_progress
-3fc9c2f mon: log when we get an error
-c29b221 ceph.spec: spec file should be creating /var/run/ceph
-22fa86c osd: nss build of OSD.cc needs CRYPTO_CXXFLAGS since
-2d2746f rgw: fix arg parsing
-22867fe rbd: fix command option parsing, honor --
-4fa647b cephtool: add --concise option again
-78a3646 rgw: prepare for supporting other meta headers
-0f87638 osdmaptool: fix typo in argument
-37c7067 doc: Note that mkcephfs can't do upgrades etc.
-ecefa8e doc: mkcephfs ssh's directly as root@
-71dc75b mkcephfs: Config $user is irrelevant when we want to run as root.
-24939ce ceph tool: convert to new-style arg parsing
-21dbec9 ceph_argparse: remove unused macros, functions
-a00e9db cfuse: use new-style argument parsing stuff
-64e5308 cmon: use new argument parsing stuff
-b1da7ec cosd.cc: use new argument parsing functions
-ba05e5e crushtool: use new argument parsing stuff
-79ba942 rgw_admin: use new argument parsing stuff
-d481797 rbd.cc: use new argument parsing stuff
-316dd91 Add ceph_argparse_withlonglong
-39538d7 monmaptool, osdmaptool: fix double-dash handling
-1a1eab2 monmaptool: use new argument parsing stuff
-a5fe5e2 cmds: remove unused macro
-aca43cc TestSignalHandlers: use new argument parsing stuff
-98edb3b osdmaptool: use new ceph_argparse stuff
-1ccbfea ceph_argparse: add ceph_argparse_withint
-b71f24a rados.cc: remove unused macro
-7f45388 librados-config: remove unused old-style argparse
-290da11 cauthtool: convert to new-style arg parsing
-bb167e5 gceph tool: convert to new-style arg parsing
-77153d9 rgw: set perm_mask for swift operations
-988ff0f rgw: fix update_container_stats()
-1a52cbd doc: Explicitly say ceph.conf host= must not include domain name.
-47b09e2 mkcephfs: cosd and cmon setup must happen as root.
-28539cc doc: Document mkcephfs-style installation.
-fd7a422 man: mkcephfs: Typo.
-703631e FileStore: close correct fd in version_stamp methods
-3fa2103 FileStore: check write_op_seq return code during sync_entry
-479e9ca ReplicatedPG: use the client_messenger for OSD Op replies
-933e794 os/lfnindex: silence compiler warnings
-abdaf98 client: only flush imported cap if it is now auth
-bd4a247 Makefile: flock.h!
-2a10fba cosd: Do filestore conversion after common_init_finish
-78d13e4 rgw: fix include
-c856a40 LFNIndex: Fix lfn parsing for hobjects with keys
-b1b1808 rgw: rename source file
-50d667e rgw: some var names cleanup
-c16f260 LFNIndex: include index_version in the lfn attribute name
-0f648c6 rgw: fix parameter passing to swift user creation
-8be7f04 PG: Also fix the key when fixing an incomplete log event
-88d73ee LFNIndex: Add support generating keyed hobject_t filenames
-3b8614a FileStore,LFNIndex: Bump filestore version
-9956e52 OSD: fix hobject_t construction
-bdb3abe ReplicatedPG: Update hobject_t construction
-613f111 store_test: fix hobject_t construction
-a04b15c object.h: Update hobject_t to include object locator key
-ba7ab2f rgw: rename openstack to swift
-969c67a rgw: s/OPENSTACK/SWIFT/g
-8b9ca2a rados tool: fix rados df formatting
-b30e157 rgw: catch buffer::error exceptions thrown at decode
-22cc333 mds: flock: remove auto-insertion of waiting locks.
-327d0dd rgw: user info dumps json/xml
-62f3c46 doc: Deb install should work now.
-39b0354 doc: Write about deb installation.
-6506d43 rgw: log of nonexsistent bucket config option
-2641eb3 qa: test false
-d6df086 mds: flock: tidy up comments
-1d5cf73 flock: move implementation into a separate c++ file
-e8b12d8 OSD: Fix flipped error codes in do_convertfs
-d0eed62 rgw: poll allocation thread
-7f640a9 rgw: user removal delets user index last
-2aad7c2 rgw: multipart meta object uses tmap
-e09d4a9 doc: Architecture, placeholder in install, and first appendix.
-0a14c75 doc: Make object store diagram fit in 1024 pix wide browser.
-66ee58f doc: Move internals into a new section, /dev.
-c8c205f objectcacher: write vs truncate races are ok
-b2c762b mds: truncate sanity checks
-4fa62d5 rgw: configurable thread pool size
-bcf9cb7 cfuse: initialize Fh to NULL
-886440d client: clean up _{create,release}_fh
-b71f3bc mon: fix 'osd create ...' error paths
-a8ab69a librbd: cosmetic changes to progress stuff
-2255a9a Finishing moving src/doc/object_store.dot to doc/
-2e63eac Add object store architecture overview picture
-7293537 ceph tool: convert to new-style arg parsing
-9ff3505 qa: add multiple_rsync.sh workunit
-82776e1 osd: one more flush before collection_list
-f3325e6 mds flock: make get_overlapping_locks and share_space handle 0 lengths
-f1cae57 osd: flush previous operations to fs before collection list + destroy
-d519789 osd: whitespace
-5bcea24 architecture.rst: describe debug logs, cephcontext
-600bc8f MOSDSubOpReply/MSDSubOp: No need to update encoding version.
-bcef985 FlatIndex: lfn_get needs to set *exist for short filenames
-00e0b77 OSD: Fix encoding versions affected by hobject switch
-9a26100 librbd: improve copy_with_progress
-d08c784 Makefile: os/CollectionIndex.h
-47a8063 assert: work around libatomic_ops vs assert in a less lame way
-5b7f978 filestore: reorder includes
-cf862c6 assert: use our assert
-5ae3e13 crypto: reinclude our assert to clobber system one
-3714862 global_init: make startup line consistent, less ugly
-961260d Makefile: add os/*Index.h to dist tarball
-4dce9fe doc/architecture: describe lib arch, config arch
-6180c2c osd: fix osd reply message
-5b70958 cosd,OSD: Improve filestore upgrade path
-be2187c ObjectStore: Support older format on journal replay
-f9b8537 librados: don't hide error in case of failed pool ctx creation
-7a8ab74 client: plug leak of inode refs on seekdir(0)
-6247df6 client: fix iterator adjustment in readdir assimilation
-ed7ebf3 client: drop mostly-useless relink()
-cc1cb8d doc: Hide empty and broken "module index" page.
-df0f32b doc: Disable static file copying, we don't use it.
-3144fd7 doc: Flesh out librados API example, to show doxygen & sphinx integration.
-df38a70 JournalingObjectStore: journal_replay committed_seq fix
-c85c2f7 doc: Adjust how table of contents is presented.
-ae55253 client: additional sanity checks on link/unlink
-8b8e47b client: simplify Inode operator<<
-3d58d00 client: fix readder result merge
-8d4c7e8 client: relink_inode -> relink
-7017804 client: add some asserts
-afd5236 client: fix readder result merge
-89fb93e os/hashindex: fix #include
-0598967 osd/,os/,osdc/: Convert collection_list_handle_t to a struct
-e6c91f6 fsconverter.cc: Added fsconverter
-279e163 FileStore: On mount, scan collections for unstable state
-42742cc FileStore: Added update_version_stamp
-341fb20 FileStore: Add filestore version stamp
-e23e192 osd_types.h: Fix support for old object_info_t
-d59f34a FileStore: Integrates HashIndex/IndexManager into FileStore
-eb22b8d os/FlatIndex: FlatIndex encapsulates previous FileStore behavior
-d0744cd FileStore: CollectionIndex, HashIndex, IndexManager
-5492cbd ReplicatedPG: find_object_context now takes an hobject_t
-5e927eb osd/: fix hobject_t construction
-a09c491 dupstore: s/sobject_t/hobject_t
-8fed10e src/messages/: s/sobject_t/hobject_t
-f76baf1 src/osd/: s/sobject_t/hobject_t/g
-1f591c2 src/os/: s/sobject_t/hobject_t/g
-45d8296 object.h: hobject_t definition
-de1f424 ceph/src/test/store_test.cc: added store_test.cc
-71123b2 ObjectStore.h: const cleanup in transaction method params
-1fe54bf FileStore.cc: Fix error in collection_rename
-30856dc JournalingObjectStore: journal_replay committed_seq fix
-afede55 Integrate Doxygen into Sphinx docs.
-f1d8964 First draft of the documentation overhaul.
-68f57f9 test: make escaping unitest happy
-f2d19a0 json escaping fix
-a2b0857 radosgw_admin, rados tool: don't use camel casing for json output
-19f09c0 fix json escaping
-cb89d00 testlibrbdpp: test copy_with_progress
-9512796 librbd: add copy_with_progress API
-8293dfa pg: warn about inconsistent object_info/on-disk size
-281dae6 osd_types: add standard header so spacing is correct
-e61fc66 pg: remove useless line
-b140ff2 client: debug link/unlink and dn_set parent relationship
-853658e heartbeatmap: fix reset_timeout with mixed-used threads
-f8296ef rados tool: df dumps formatted data
-c4219a1 rgw: log show dumps some information about bucket owner
-8cb25ca bandaid for gitbuider
-698df7e osd: remove dead lookup_lock_pg()
-9d37c92 osd: set suicide timeouts on some workqueues
-66b6289 mon: health not ok when up < in osds
-502cf0b filestore: add suicide grace to workqueue
-5fde401 heartbeatmap: add suicide grace
-8d64fee testlibrbdpp: test librbd::Image::copy
-68d1ba8 rgw: don't check for time skew when Expires was set
-1bb0e3c client: simplify Client::remove_cap() args
-b9c824c client: clean up Client::remove_session_caps() args
-16a5761 client: don't falsely populate mds_sessions on bad MClientSession msg
-04153ab testlibrbd: remove useless sizeofs
-3dcb04b testlibrbd: fix assert side effect
-66f1d41 FileJournal: Also classify kernel major version 3 as safe with disk-cache on
-6c27367 osd: decode pg_t in old PG::Info
-5d81c4f osd: requrie PGID64 of mons, other osds
-d996ce2 mds: require PGID64 of mons
-efd43bb mon: require PGID64 of osds and other mons
-f093a2e pgmap: decode old pg_t
-92b524e mdsmap: int64_t pool ids
-6e58bc9 osd: add 64-bit pools to ObjectLocator
-d1ce410 osdmap: encode/decode old + new version
-eae1922 osd: decode old pg_stat_t
-fbeafdf osd: make MOSDOp[Reply] encoding backwards compatible
-7cedf7b osd: add PGID64 feature bit
-468e28e osd: int pool -> int64_t pool
-877aa92 osd: redo pg_t encoding with 64-bit pool id
-d8f1f1d osd: fix pg_pool_t::get_pg_num return types
-0b00350 ceph_context: whitespace
-2f039ee (tag: v0.34) v0.34
-44cb5ee rgw: use formatter->dump_string() instead of dump_format()
-0e8bd0d rgw: get bucket info only if bucket name is not empty
-fa757b7 Makefile.am: install coverage files for libtool outputs as well
-67cc408 librados: watch request should wait for safe response
-3a4d193 objectcacher: only want for commit
-85496ff mds: fix shadow
-09b08c5 fix utime.h #include recursion
-528703b crush: comment fall-thru
-75e53e9 mds: remove unused Mutation in do_rmdir_rollback()
-b826749 workunits: make file_layout test setting only one parameter
-4dba8bc cephfs: use strtol instead of atoi; handle 0 properly
-df8f3cb cephfs: fix the stripe_count documentation.
-d066cc8 mds: server: should apply new layout settings on top of old layout
-65b3050 mds: allow setting all options on a file layout.
-0506386 objectcacher: remove uncommitted xlist<>; fix broken purge() cleanup
-a439e15 rgw: remove some compilation warnings
-1e929ce rgw: don't override ret value in do_read_permisions
-b7b5f2e rgw: return correct bucket missing error when needed
-e478e92 rgw: fix 500 error on bucket creation
-9538e87 rgw: fix clitest
-5fb216e MonClient: fix possible null dereference
-2488e44 mds/Server.c: fix memory leak in err path
-44c68b1 rgw: don't check for zero content when creating a bucket
-94fefce rgw: rgw_admin bucket stats dumps owner
-6dce3b1 client: drop useless insert_trace timestamp argument
-3ef32bc client: be careful about replacing dentries during readdir assimilation
-0b1ad60 rgw: add radosgw_admin bucket stats
-2a4cf8f client: factor update_dentry_lease() out of insert_dentry_inode()
-53b3e14 librados: fix memory leak in error path
-94af6a4 test/confutils.cc: fix resource leak
-f2381f9 client: carry inode reference across calls to _flush
-2ba01bb rgw: fix prepare_get_obj when ENOENT
-ebae5a7 rbd: fix shared_ptr usage
-57fd56c do_kernel_showmapped: fix resource leak
-d69aa59 client: fix readdir + cap recovation/reissue race
-a1afa6d rados_sync: fix resource leak on err
-ad1b2b0 CephBroker.cc: fix allocation/deallocation mismatch
-2e1f2c1 test_rados_tool.sh: test export with --workers
-6fd4f3a rados_sync: make number of worker threads configurable
-76718b0 rgw: clear warning
-e9b739f journaler: fix waiting_for_zero clearing, again
-23d94a4 Revert "pipe.c: #define GNU_SOURCE"
-6c6fa6d client: only link directories into hierarchy once
-eaaefec mon: fix store_state
-ba44cde journaler: fix waiting_for_zero clearing
-2144c7a add missing include, required for certain environments
-adf1efe rgw: fix multipart upload
-1a7eac4 parallelize rados export and import
-b76e054 WorkQueue: don't be chatty about finishing workers
-b20f362 test_rados_tool.sh: fix xattr test
-3269476 librados: fix IoCtx copy constructor
-d81d458 rados_sync:don't need to declare CHANGED_XATTRS 2x
-31bf064 Some fixes to double-dash support, fix warning
-301ae6c rgw: if pool is empty recreate
-eecf4d6 ceph_argparse: handle double dashes consistently
-18ec565 injectargs: binary flags only consume 1 token
-42a65b8 config: print warning on injectargs parse fail
-084fe47 injectargs test: test foo=true
-ddc5674 mon: allow wildcards for mon cap command matching
-3432729 common/config: fix get_val for booleans
-ae9ba22 pipe.c: #define GNU_SOURCE
-9c498e0 qa: add unit tests for mon cap 'allow command ...' stanzas
-6c3d810 mon: whitelist individual commands in mon cap string
-ea0f2f3 mon: adjust max_devices when adding to crush map
-58f98e7 crush: refuse to add item >= max_devices
-dc2be1d mon: 'osd gstcrushmap' or 'osd crush set' both work
-a4f32ba mon: fix arg count checks
-d896d40 mon: 'osd crush reweight <name> <weight>'
-def8382 mon: 'osd crush rm <name>'
-db8ad46 mon: 'osd crush add <id> <name> <weight> [<loc1=foo> [<loc2=bar> ...]]'
-051c4a3 mon: return error message string when no other output string specified
-29cf733 common/config: honor --
-6d29239 mon: remove dead 'setmap' code
-deb25e0 mon: make auto-marking of booting osds 'in' optional
-09f4c46 client: kill dentry_of() macro
-7ef44b7 osd_types: fix category encoding in object_info_t
-d5a9301 qa: define _GNU_SOURCE for qa helpers; add btrfs dir makefile
-ba4551d librados: whitespace
-3205441 librbd: reimplement copy using read_iterate
-f19e613 rbd: fix check_io for snap
-76e18e3 librbd: fix copy
-39b6a9c qa: add rbd copy workunit
-b03a184 mdcache: documentation for path_traverse
-e898fe7 mdcache: Reduce the gratuitous references to onfail
-a1433a1 mds: remove the unused MDS_TRAVERSE_FAIL flag.
-4a17d71 mdcache: handle unreadable null dentries
-a585c4d librbd: specify copy src image as image handle
-3ce4144 Define _GNU_SOURCE in src/Makefile.am
-4e9a0b6 pipe.c: #define GNU_SOURCE
-3d85872 mds: open+pin stray dirfrags on startup
-3f13425 Revert "mds: do not complain/assert about stray inode rstat/fragstat consistency"
-b00b6f6 common/pipe: add function to do pipe2(O_CLOEXEC)
-93c0565 PG: Move reset_last_warm_restart to Initial::exit
-abe5cd2 common/pipe: add function to do pipe2(O_CLOEXEC)
-cf3b7cf PG: Move reset_last_warm_restart to Initial::exit
-3e91525 osd: flush writes prior to PGLS
-c412da8 osd: remove dead code, whitespace
-3a623bb librados: prefix api test pools
-2fb3af4 librados: statically link gtest into librados unit tests
-6decfa7 Makefile: allow gtest to be linked in statically
-239f61e .gitignore: scratchtool
-b02a347 Makefile: rule to upload + submit coverity job
-aa3a8dd addr_parsing: fix warning
-7d2f4a5 escape: fix snprintf args
-952009c .gitignore: scratchtool
-febe232 librados: fix shadow
-244b6ee mds: fix shadow
-56b1484 mds: fix shadow
-6de1e53 mds: fix shadow
-6b8ccb2 mds: fix shadow
-e6467ef mds: fix shadow
-b3821cc moncaps: fix shadow
-14096a8 monclient: fix shadow
-0d73ad8 monclient: fix shadow
-1cbc242 msg: fix shadow
-87a5026 osd: fix shadow
-3283e8e osdcaps: fix shadow
-b5a2ad0 escape: use snprintf
-41745a9 secret: use strncpy, snprintf
-5fb99fa addr_parsing: use strncpy
-05c38fa addr_parsing: avoid strcpy
-ef80b0a mount: fix path leak
-2ebf141 mount: avoid unguarded strcpy
-40fcd2e test_ioctls: reduce stack use
-8b0d065 formatter: less big buffer for dump format string
-3ff9068 mount: avoid big stack item
-b920fac mount: avoid big stack item
-c615685 testlibrbd: add missing va_end()
-29c1ce5 rgw: remove redundant line
-d3d767a mds: do not complain/assert about stray inode rstat/fragstat consistency
-f6c07ef paxos: fix store_state
-0935673 monclient: be less chatty about stray messages
-64ce303 debian: librbd headers require librados headers
-c75f0fc scratchtool: not a test suite
-ab40c3c Revert "Remove old rados tests"
-331d0aa osd: fix compilation
-c095f74 rgw: fix bucket removal
-6fca624 osd: call incorrect osdmap addrs errors
-3794bd9 rgw: fail operation when trying to clone to the same shadow
-e5cf2a4 mds: xlocker_caps are supplemental to caps
-a35ac29 mds: only client hold xlock in xlockdone can change lock state
-1dfdc73 rgw: fix prepare_atomic_for_write
-ac248f1 mds: update truncate_pending on O_TRUNC; pass old_size on O_TRUNC open
-2d0bd2d rados-api: fix #include order
-513f612 cconf: fix clitest
-7204449 cconf: --filter-key and --filter-key-value
-f5b012c mds: fix LOCK_LOCK_XLOCK lock state name/string
-f3396bd rgw: add missing cache locking
-0b216bd rgw: was missing return value
-32db9dc rgw: some more race fixes
-e759021 test/rados-api/misc.cc: update tests after API change
-f0ab8b06 monitorstore: drop unused sync value
-dfab2c9 paxos: use MonitorStore::put_bl_sn_map() to commit batches of values
-bec7390 monitorstore: implement put_bl_sn_map
-ed580c5 mon: whitespace
-635bbe8 atomic_t: update spinlock implementation.
-fb7831c rgw: reread obj meta on racing write operation
-4a1a64e rgw: bucket removal through intent log, fixes
-f336fef rgw: fix some issue, basic stuff works
-40752e9 rgw: create preallocated pools
-8db7daf ReplicatedPG: Don't crash when a clone is missing
-9f5d163 file_layout.sh: add test for setting a new data pool
-665fd82 Remove old rados tests
-eb8925a rgw: fix locator for shadow objects
-1546bea mds: share max_size on any client_range adjustment
-87e20c9 rgw: add missing files
-b8b8f9d add WatchNotifyTimeoutTestPP
-0c0071a rgw: fix a double free in GetObj
-93b484b rgw: prepare for bulk pool creation
-3ebe6b7 rgw: store bucket info
-d454c58 test/rados-api/misc.cc: test CloneRange
-17ee7f8 test/rados-api/misc.cc: test CloneRangePP
-9c8722a test/rados-api/misc.cc: test AioOperatePP
-8ce6544 osd: fix _activate_committed() crash
-0ae230b test/rados-api/misc.cc: test Operate2PP
-2903de0 Operate1PP: test CEPH_OSD_CMPXATTR_OP_EQ
-6d90796 compatset: dump json
-f5f2cd1 librados: remove unused operate param
-d21c918 uninline a bunch of buffer.h stuff
-f6ff0f1 uninline osd types
-df99cd9 mds: add debug_mds_locker
-ff9537e rgw: prepare for bucket/pool decoupling
-a724bc4 librbd: rbd_list: return buffer size, not element count
-9274691 mon: add/remove data_pg_pools from mdsmap
-a88c179 PG: last_warm_restart must be set to the current epoch
-47d75af mds: explain weird encoding
-a21a5ef mds: whitespace
-b4fb82b mds: drop unused projected dirfrag_t arg for EMetaBlob::add_primary_dentry
-93b7167 mds: drop unused snapbl arg
-d011c62 mds: avoid explicit passing of projected_xattrs
-a9998c8 mds: avoid passing snapbl around explicitly
-213ce6a test/rados-api/misc.cc: test Operate1PP
-08fb8a6 mds: use snaprealm projection for MDCache::snaprealm_create()
-6ee52e7 mds: simplify sr_t journaling
-d60d531 mds: journal inode on mksnap
-79db9fc mds: handle O_TRUNC when size is already 0
-45740cf client: send O_TRUNC open requests to MDS
-266110d client: move Inode operator<<
-f326064 Test rados_exec, C and C++ version
-3c3089f test/rados-api/misc.cc: test tmap_update
-d9df58e rgw: fix virtual bucket name handling
-0ed2faf rbd: remove dup 'rm' command from man page
-d314506 cfuse: take out accidental bad channel add
-184c2f5 qa/workunits/rados/test.sh:explicitly invoke tests
-930bd32 Add qa/workunits/rados/test.sh
-2df3f2c cfuse: make use of fuse invalidate callback optional (and off by default)
-1179a31 formatter: remove bad asserts
-afdb1f3 rgw: list objects shows time in GMT, thread safety fix
-a311715 src/perfglue/heap_profiler.cc: fix snprintf
-14de6d2 client: compile with older libfuse2
-cb1f050 osd_types: fix merge
-340b434 (tag: v0.33) v0.33
-89eeb34 osd: pg_stat_t: throw exception on unknown encoding
-ce00564 qa: test rename into snapped dir
-e98669e mds: mark newly created snaprealms as open
-2dd5510 test/rados-api/misc.cc: test Rados::version
-d45b0f6 test/rados-api/list.cc: C++ version
-b8b14c9 test/rados-api/snapshots.cc: C++ version
-65626ed test/rados-api/watch_notify.cc: implement C++ ver
-9ca1527 test/rados-api/stat.cc: implement C++ tests
-d8da2ce rados/librados.h: use rados_snap_t consistently
-80a094d test/rados-api/aio.cc: test RoundTripWriteFull
-9df4605 test/rados-api/aio.cc: implement FlushPP
-4d9dab0 test/rados-api/aio.cc: test ReturnValuePP
-8cc794b test/rados-api/aio.cc: test IsSafePP
-3b81656 test/rados-api/aio.cc: add IsCompletePP
-f4d7382 test/rados-api/aio.cc: Add RoundTripAppendPP
-cc25266 test/rados-api/aio.cc: add RoundTripPP
-8072bdc Fix bug in turning off logging. Remove log_dir.
-77c780d osd: fix heartbeats after bad markdown
-44d3193 monmaptool: don't inc bool
-915aa41 crushtool: don't inc bool
-8df56b5 mds: break #include recursion
-3e66b80 rgw: some encoding fixes
-3b9fbcf rgw: handle zero and invalid max_keys
-b10b3a3 rgw: create CommonPrefixes section for each prefix
-19ec8d0 rgw: adjust returned error when got invalid auth request
-80dfc98 obsync: add SRC_SECURE, DST_SECURE
-e2d4462 LibRadosAio: WaitForSafePP
-ffab58f test/rados-api/aio.cc: SimpleWritePP
-1d6224e rados_setxattr: return 0 on success
-431e98a rados_write_full: remove offset parameter
-361997a librbd: output copy progress
-8c5e7dc mds: avoid issue_caps on snapped inodes
-dc30583 test/rados-api/snapshots.cc:RollbackPP
-8f2933f test/rados-api/snapshots.cc:SnapGetNamePP
-2a766bc test/rados-api/snapshots.cc:SelfManagedRollbackTest
-19ed6b6 SelfManagedSnapTest: test more
-54810b6 test/rados-api/snapshots.cc: SelfManagedSnapTestPP
-db36816 test/rados-api/io.cc: test XattrListPP
-020f063 test/rados-api/io.cc: test RmXattrPP
-4781fa8 test/rados-api/io.cc: test XattrsRoundTripPP
-de681da client: use localized ldout macro
-fc5923a mon: dump mdsmap in json
-529c4d5 test/rados-api/io.cc: add RemoveTestPP
-ceb8cd1 test/rados-api/io.cc: AppendRoundTripPP,TruncPP
-a189574 test/rados-api/io.cc: test WriteFullRoundTripPP
-fef049e test/rados-api/io.cc: test RoundTripPP, etc.
-05e7157 test/rados-api/io.cc: test SimpleWritePP
-a1d8013 test/rados-api/test.cc: add create_one_pool_pp,etc
-2c1ea4a librados: add IoCtx::close
-009968e mds: don't wait for lock 'flushing' flag on replicas
-bbd4a26 librbd: deduplicate sparse read interpretation
-4bf6f6a librbd: make read_iterate mirror AioCompletion::complete
-30c97d5 testlibrbd: remove useless print statements
-a631c46 testlibrbd: NUL-terminate orig_data
-ac0c4d8 testlibrbd(pp): accept standard command line arguments
-9d4f748 osd: don't request heartbeats from down peers
-d745572 cfuse: properly invalidate page cache data via callback
-5d40ed4 client: add callback for cache invalidate
-2a0a5b5 client: use helper to invalidate/truncate cached file data
-9e8f348 client: fix cached file data truncation
-e643e4e fuse: enable atomic_o_trunc
-49a89c9 fuse: allow big writes
-61a712d Add test/rados-api/misc.cc
-d172800 librados: implement/document tmap_{get,put}
-78f0f2d test/rados-api/snapshots: add SelfManagedSnapTest
-0e51231 librados:fix name of rados_ioctx_snap_set_read/wr
-287b0a1 radosgw_admin: fix clitest
-fb774ca mds: don't wait for lock 'flushing' flag on replicas
-4a960e4 rgw: can specify time for intent log purging
-8caef77 test/rados-api/snapshots.cc: test SnapGetName
-3f9c0d0 test/rados-api/snapshots.cc: test Rollback
-762e3e1 rgw: reduce intent log obj name time resolution
-3dbf9d4 test/rados-api/snapshots.cc: test SnapRemove
-75e6731 rgw: add 'temp remove' tool for rgw_admin
-47ab2ba qa/fsstress: be verbose
-c635c46 librados: document tmap_update
-ba3ac0f librados: document rados_pool_list
-e9d9201 rgw: update radosgw man page
-32711fc rgw: remove original object in put_obj, instead of truncate
-68bd54d librados: support op flags
-07837c9 osd: don't request heartbeats from down peers
-4260a58 test/rados-api/snapshots.cc: test SnapList
-3841e06 Add test/rados-api/watch_notify.cc
-5b6b569 test/rados-api: move TestAlarm into test.h
-d61f7ae test/rados-api/stat.cc: test ClusterStat,PoolStat
-3e4a9f2 Makefile: add rule for building coverity build bundle
-b2a3623 objecter: fix compile error
-2a5467d osd: don't try to remove head if it doesn't exist
-b1539a2 objecter: allow setting of op flags for previously added op
-45e7ac7 osd: add CEPH_OSD_OP_FLAG_FAILOK
-5107813 Add test/rados-api/stat.cc: test rados_stat
-7dcae35 auth: use set<> instead of map<,bool>
-446f89e librbd: deduplicate sparse read interpretation
-f7ec378 librbd: make read_iterate mirror AioCompletion::complete
-d48bebe librados, rgw: integrate stats categories
-a3219c9 test/rados-api/pool.cc:test PoolCreateWithCrushRule
-fd0d26d test/rados-api/pool.cc: test rados_ioctx_get_id
-5a06f0c test/rados-api/pool.cc: add AuidTest1, AuidTest2
-54b9441 test/rados-api/pool.cc: test PoolLookup,PoolDelete
-9e8a8b2 .gitignore: add test_rados_api_*
-9935e9f create_one_pool: improve error reporting
-b9348c2 Add test/rados-api/pool.cc
-0ad5500 Add test_rados_api_list
-bb3114c rados/librados.h: remove rados_aio_get_obj_ver
-571608d test/rados-api/aio.cc: add RoundTripWriteFull
-d0d7691 test/rados-api/aio.cc: fix shadowed class variable
-3090322 test/rados-api/aio.cc: test Flush
-c2f7adf test/rados-api/aio.cc: add ReturnValue
-a507712 test/rados-api/aio.cc: test IsSafe
-e9b433e test/rados-api/aio.cc: test IsComplete
-b459070 test/rados-api/aio.cc: use rados_aio_release
-ed19946 test/rados-api/aio.cc: add RoundTripAppend
-03382be test/rados-api/aio: add WaitForSafe, RoundTrip
-271ed93 Add test/rados-api/aio: SimpleWrite
-291c3c2 test/rados-api/io.cc: add RmXattr, XattrIter
-0a29e63 test/rados-api/io: add XattrsRoundTrip
-039c5fc test/rados-api/io: add RemoveTest
-5bee453 test/rados-api/io: add TruncTest
-3509398 test/rados-api/io: add AppendRoundTrip
-6349a13 test/rados-api/io: add WriteFullRoundTrip
-87f2960 test/rados-api/io: add roundtrip, overlappingwrite
-e442a2c Makefile.am: build gtest in debug builds
-41f484d objecter: allow requesting specific maps in maybe_request_map
-5cb2bd2 testlibrbd: remove useless print statements
-52b90b7 testlibrbd: NUL-terminate orig_data
-60b4588 testlibrbd(pp): accept standard command line arguments
-5e9bdf8 librados: add missing method that was lost in merge
-8942d2b rgw: add hour to intent log name for higher resolution
-7cc208b rgw: log shadow objects removal in intent log
-66050ad Add test-rados directory, I/O test
-98ee76b pgmon: use pool.get_last_change whenever creating new PGs
-5b260cd rgw: return ENOENT after get_obj() in some cases
-84462a1 osdmon: maintain ceph_pg_pool::last_change correctly
-fca7908 pgmon: call check_osd_map via a new on_active implementation
-43a5cd7 pgmon: fix comments to output the right function
-6d0192c debian: explicitly bind library users to matching version
-258d743 rgw: ignore hidden objects for bucket deletion, fix namespace
-68cbbf4 osd: missing ! in ifs on bad map after osd boot
-857f2ad mds: fix Migrator::audit() for IMPORT_ABORTING
-8d42c38 rgw: clone_obj can set mtime
-265d29a librados: can set mtime for operate (mutate)
-45ca940 objecter: halt compound operation only if result < 0
-ad31db9 Remove unused dyn_sprintf
-6ad7f46 config.cc: clean up includes
-822d28b mds: chain rename subtree projections
-7a3e750 client: whitespace cleanup
-3d25879 client: send renames to the correct node
-618b074 rgw: multiple fixes
-9f608c7 config: more thread-safety stuff
-d99333d injectargs: forbid unsafe string modifications
-c409e70 test/daemon_config: add injectargs test
-2d4f549 Add daemon_config, libceph_config, etc.
-7be4b6d pgmon: create ALL pgs in new pools with correct creation epoch
-6dcf379 add config unit test
-a33b837 librados.h: fix out-of-date comment
-fa2a406 debian: don't explicitly list deps; let debian figure it out
-92e976a config: more cleanup
-66c3d8f libceph.h: fix C compilation
-2c9949e config: add proper locking, fix comments
-f53cc37 rgw: mark ops as atomic
-d305a5e osd: remove unnecessary history creation.
-8bb4c0a osdmon: remove default values for prepare_new_pool
-3b459ef rgw: conditional clone, depends on src_cmpxattr result
-454d7de librados: modify src_cmpxattr interface
-5bb07df pgmon: create PGs with a creation epoch that matches the pool's
-84ee468 librados: get it compiled
-476f5c6 rgw: prepare for conditional clone_range
-128e948 rgw: adapt some more rados calls to the new atomic structure
-a2bcbf2 librados: restructure ObjectOperation
-bcf25bd rgw: a few more operations are using atomic infrastructure
-b03930f rgw: atomic get, various fixes
-10dda20 rgw: fix decoding
-70cdd5d rgw: atomic get, basic flow for severl rados ops
-71a6481 librados, objecter: add operations to support rgw atomic get
-8d63e14 rgw: introduce context to specific access calls
-76880e3 In RGW, use the common/Formatter
-0bc7e28 filestore: remove unused var
-22e2524 osd: Fix last_epoch_started initialization on new PGs
-9baa009 osd: rename variables in project_pg_history.
-0413e2a Formatter: add open_object_section_in_ns, etc.
-041a22c test/formatter: test stream clearing
-434be6c Formatter: must use str("") to clear ostreams
-e2cbfb6 More changes towards using common/Formatter in rgw
-72b0851 osd: expect heartbeats from anyone peering depends on
-cd01d14 osd: restructure heartbeats
-2f0d3b1 osd: refactor PG creation slightly.
-a8f3602 osd: fix comment for project_pg_history
-b4b61d6 osd: Initialize new PGs with correct info.history.same_primary_since
-92f0237 messages: add print functions to the MOSDPG messages
-cf88ce5 messages: change = to result = for less confusion!
-9bdc43f osdcaps: allow the default UID to have full caps on its own pools.
-309d157 osdmon: always send in the CRUSH rule.
-7078c34 mds: add hooks to test multimds link/unlink failures
-1c1d92e qa: move fsx.sh
-ab537f1 Revert "qa: Remove fsx workunit."
-6a920bb os/FileStore: print out BTRFS_IOC_SNAP_CREATE errs
-efc1566 osd: add CATEGORIES incompat feature
-a71adf1 librados: add create in specific category to c++ api
-fdd9332 osd: allow 'category' to be set on object creation
-ee4460d osd: segregate stats into categories
-8981a23 rgw_rest: don't leak formatters
-cec04ca XmlFormatter: add DTD option
-ede86e7 Formatter.cc: add get_len method
-24a7b5f RGWFormatter: get rid of one flush variant
-dbbce93 rgw_formats: introduce dump_unsigned, dump_int,etc
-7b23944 rgw: rename dump_value_str to dump_format
-9dbeeaa rados tool: fix cmdline parsing for --block-size
-77fed7b Formatter: add XMLFormatter::reset
-8b5cda5 Formatter.cc: whitespace fix
-8c4f729 rgw:rename open_obj_section to open_object_section
-70f585c Add XMLFormatter and unit test
-8003b77 Formatter: remove protected data, methods
-97b6822 osd, objecter, librados: add SRC_CMPXATTR operation
-acc8600 osd: change src_oid encoding -- FLAG DAY
-23a46f2 testradospp: test cmpxattr (eq, str)
-4fbdb99 osd: fix cmpxattr string construction
-7401fea objecter, osd: fix up cmpxattr
-83ad583 systest: add watch/notify tests with pool and object deletion
-602365e systest: st_rados_create_pool: optionally wait before creating the pool
-ee44761 systest: add object deletion to mirror object creation
-cbaddc5 systest: add st_rados_notify building block for watch/notify tests
-aa00e0d systest: add st_rados_watch building block for watch/notify tests
-b8d7c22 systest: make pool configurable
-e6ff13d systest: move pool deletion into its own file
-73c8e81 librados: fix notify deadlock
-50d7684 osd: document remove_watchers race avoidance
-945cdd4 pg: remove do_complete_notify
-8a8d9bf osd: put_object_context: tolerate pgs being deleted
-3a6d8eb osd, pg: clean up watchers on pg deletion and shutdown
-37dc931 mds: detach replay thread
-43daec4 thread: detach()
-6f39bb9 common/Formatter: add unit test
-09a3576 mdsmon: send commands to all MDSes, not just the in&up ones.
-3c77a45 cephtool: accept semicolons in commandline args
-68a6291 testradospp: add version tests
-0df20a0 librados: add assert_src_version
-3a41aa5 objecter: add assert_src_version
-a6d697e osd: add ASSERT_SRC_VERSION operation
-dcaca3e3 osd: set reply_version for read operations
-c06260f rgw: quiet down some log messages
-e5dfa3d escape_json_attr: don't escape single quotes
-1d3acd5 Formatter.cc: use common/escape.h
-95d49de Makefile.am: always #define __STDC_FORMAT_MACROS
-0dc235a mds: request attempt comes from fwd count, not retry flag
-15c344c mds: fix create_subtree_map for new dirs
-534afab vstart: static mapping of names to ranks
-c08d08b (tag: v0.32) v0.32
-360ab7f rgw: don't silently ignore bad user/group when setting acl
-94239ec objecter: rename POOL_DISAPPEARED to POOL_DNE
-9447ce6 objecter: check for updated osdmap when requesting a non-existent pool
-6833f2f objecter: fix error check - error return code is negative
-178c463 monclient: add method to retrieve the latest version of a map
-9efd3a5 mon: add GetVersion message
-5ba1dfe Makefile: include HeartbeatMap.h in dist
-29158d7 mds: fix validation of (slave) request attempts
-6ad7dfb mds: identify slave requests with reqid + attempt number
-97c3bcb scatterlock: fix flag assignments.
-7b574ff osdmap: in json dump, dump out/in, up/down status
-c775c03 rgw: get current utc epoch differently
-aba88f5 rgw: init correctly req_state->{bucket, object}
-a4e4c08 rgw: fix total time reporting in rgw_admin
-5c194f5 rgw: tweak content-md5 handling
-86c7260 heartbeatmap: fix/clarify the commenting
-925cb46 scatterlock: compress boolean flags into a set of state flags
-acca584 scatterlock: rename scatter_flags -> state_flags
-5219402 Makefile: remove from libglobal
-90ce2f7 Add -ltr to libcommon
-8524ed5 Makefile: -lrt for libglobal.la only
-fadb5ae unittest_bufferlist: change include order
-f82b629 mds: fix log trimming races
-8fe50b8 mds: separate type for gratuitous debug ESubtreeMaps
-61a5012 mon: 'ceph mon dump [--format=json]'
-70dee89 heartbeatmap: unit test
-3336665 heartbeatmap: we don't care about pthread_t
-7815237 client: open session with all mds targets
-a3ed402 Makefile: fix unittest_ceph_argparse build
-c304c2c injectargs: complain about unparsed args
-498dd53 injectargs: print out what is changing
-0b66ed2 rgw: fix base64 check
-ef509b3 rgw: check content md5 validity when doing auth
-4a8d8f0 rgw: fix date checks
-07e6061 rgw: fix authentication
-dc4834b scatterlock: convert [un]scatter_wanted to a bitfield
-579f2e9 mds: Handle unscatter_wanted in try_eval(lock, need_issue)
-f5f6b12 mds: Split the CInode::scatter_wanted field in two
-3d9621f heartbeatmap: fix mode
-8e4a358 heartbeatmap: warn if previous deadline is missed
-a981333 ceph_context: only wake up periodically if heartbeat_interval is set
-6eb213d osd: no need to explicitly check health
-9e8bb84 vstart: set heartbeat file
-7265e5c ceph_context: check internal heartbeat in cct service thread
-31d5cbb heartbeatmap: config options, method to touch a file if healthy
-3dfe830 heartbeatmap: use atomic_t
-e68e4f3 heartbeatmap: put in ceph namespace
-058647f heartbeatmap: simplify api
-7aad8f0 heartbeatmap: fix stupid race
-f5db9af heartbeatmap: use a list<> instead of map<>
-7c5f3bc workqueue: register and time out worker threads
-d7b4588 workqueue: provide op timeout to workqueue constructor
-bdfccb0 heartbeatmap: introduce heartbeat_map
-cc82707 mds: mark ambig imports in ESubtreeMap during resolve
-06ebba7 mds: pin inodes on LogSegment::truncating_inodes list
-a20b15c mds: handle aborted slave rename while waiting for second prep
-dac1dc8 mds: honor scatter_wanted while freezing
-1bb12c7 mds: try_eval in many places
-1531e88 mds: implement try_eval() on a single lock
-3bf413d mds: better debugging for scatter_wanted flag
-9c6ec61 mdsmon: Fix handling of follow-by-name MDSes.
-c4a5380 vstart: use paired MDSes with a specified standby.
-5c37057 PG: add an assert for negative entries in the scrub map
-50c42bc osd: label ReplicatedPG::_scrub as virtual.
-4b70d58 osd: turn down debug level on repop commit message
-9d4f741 rgw: parse date from http header
-29e0773 rgw: return required error when conent length missing on PUT
-5089cf7 mds: make two passes on scatter_nudge
-d22e48f mds: honor scatter_wanted flag in scatter_eval()
-447d4f6 testrados_delete_pool_while_open: remove from make
-77dd3b7 remove testrados_delete_pool_while_open
-56f955b mds: fix projected rename adjustment
-c7236d9 mds: clean out rename subtree cruft
-208e8e3 mds: simplify subtree map after adjusting for rename
-854ab3b mds: track projected rename effect on subtree map
-7952bea mds: minor cap cleanups
-699bbe1 mds: only create up renamed diri frag subtrees if they differ from parent
-79b8374 client: reencode cap releases for each request
-2458c89 admin_socket: implement schema request
-28fa250 perf counters: add back inc type for collectd
-68e4d68 client/Client.cc: remove superfluous check
-c9fbef4 rgw: get object with range should return 206
-6fab382 rgw: fix bad initialization
-c08876a rgw: fix warning
-03953df Makefile: sysconfdir for bash_completion install
-35bebee rgw: return error on partial object put
-857f18e rgw: modify print macro to log using default log api
-dec6ef1 bash_completion: no more injectargs command
-f82c254 Makefile: add bash_completion
-440382f bash_completion: Add the bash_completion files to the Debian packages
-0678e51 bash_completion: Add bash completion for ceph, rados, radosgw_admin and rbd
-3e9a982 Add ObsyncException
-b16fa97 rgw: return Bad Request on PUT requests with empty content length
-be8b826 rgw: fix error code returned for bad digest
-7a5e7ff admin socket: handle schema request
-c9f4f90 sync_filesystem: er, fix #define
-a7520e1 sync_files: #include _GNU_SOURCE for syncfs()
-4a48e7a admin_socket: no sock for unprivileged daemons; rename default
-74fdf70 osd: verify src range exists for CLONERANGE
-a6d9d63 objecter: treat RESETSESSION like a reset
-5f43751 admin_socket: change request 0 to get version
-105a991 Add more debugging for pthread_create failures
-6dd5f18 use glibc d_type macros, helpers
-2bce766 perfcounters: no more stat/ dir, yay!
-d32e5d3 mds: be careful about calls to try_subtree_merge
-1f077a0 mds: fix subtree_map simplify, again
-0c09377 mds: journal EImportFinish after updating subtree/import state
-0e6b0dc mds: journal copious ESubtreeMaps if mds_debug_subtrees
-f8c7bfa mds: fix stl iterator misuse in create_subtree_map
-0b7e9fb perfcounters: remove stray #includes
-937976f admin_socket: fix EINTR check
-b98d765 admin_socket: fix busy loop
-da689c0 mds: kill useless MDLog::writing_subtree_map
-4a40c1a mds: submit_entry last
-c8490aa mon: simplify 'mon tell ...'
-04e5295 mon: rip out injectargs command(s)
-0586d4d don't include all the type headers in Client.h
-8f360e6 client: uninline link/unlink helpers
-757ee66 move some types
-b27fa8a client: MetaRequest.cc
-dc1dbdf add Inode.cc
-fad4a63 client: InodeCap -> Cap
-59098fd client: move (most) types into separate headers
-3945370 osd: fix OSDOp printer for CLONERANGE
-ea5d016 mon: 'dump [--format=json]'
-d3887b8 auth: fix compile error when using nss libs
-94eb404 mds: remove broken delay of cap releases from a replica.
-c81a8ea Revert "mds: Only change in->replica_caps_wanted when actually messaging"
-440de00 mds: reorder timing checks in request_inode_file_caps
-a2c761e mds: Only change in->replica_caps_wanted when actually messaging
-9203184 mds: fix keep caps test.
-18314fa mds: rename cache expire variables for clarity
-9e4e660 update documentation on cache expires during exports
-3c7318e mon: 'pg dump [--format=json] [all|sum|pools|pgs|osds]'
-13d68ef librados: async pool creation
-f7f9a48 ceph: understand -- argument
-ee20a8d mds: cleanup-let: use is_leased() for lease revocation checks
-1f47914 mds: revoke client leases on replica dn lock
-9f8ab9a mds: fix ambiguous check when journaling subtree map
-11eecce client: fix stalls on racing revocations can cap migrations
-02b2068 osdmaptool: fix clitest
-3882240 formatter: escape quoted strings
-5059eb2 mon: rewrite pgmap json dump using Formatter
-b3f7a47 formatter: dump float, simplify pending_string stuff
-d4cf312 osd: dump osdmap in json
-d6bb571 common: add Formatter class
-56283eb admin_socket srv:set F_CLOEXEC on listening socket
-555714c admin_socket: fix uninitialized accept() param
-c663d1d admin_socket.cc: Use older sizeof syntax
-7abaf20 rgw: socket path includes full socket name
-72fff26 perfcounters: don't output trailing commas in JSON
-e138f23 Add line break after add_key() failure message.
-8f5e664 mds: more CInode un-inlining
-81ef3b5 mds: uninline a few things
-0c6b2c8 test/perf_counters: more renaming
-7cb1edd ceph_context: remove set_module_type
-a2627f4 Client.cc: rename client_logger -> client_counters
-1b47332 Rename ProfLogger to Perfcounters: part 2
-1b0d9ff Journaler: weaken a few asserts to let it pass errors back up.
-3d0c314 C_Gather: fix comment.
-1212ceb Journaler: return errors from probing back to callers.
-3bb6313 mds: handle EBLACKLISTED in MDCache::do_file_recover; assert on errors
-387e46b Filer: return error codes from probing up to the calling layer.
-1cf5211 Rename ProfLogger to PerfCounters
-9b1ad7b re-enable proflogger test
-ffd92d2 rgw: dump is_truncated when listing bucket
-8d1193b test/admin_socket: test message 0
-b2a3899 Move ProfLogger socket code into admin_socket
-73d66f6 mds: cinode: Add a little debugging and fix an output
-b2b44d4 mds: Drop locks and auth pins when waiting for freezingtree
-022c526 uclient: correctly initialize mseq in flush_snaps.
-4adfd46 mds: mark rmdir with slaves as a master in journal
-573e972 mds: fix rmdir slave commit, rollback
-8692ed7 mds: simplify journaled subtree_map
-a3e4731 mds: add mds_debug_subtrees option
-4fe09c1 mds: set LogEvent _start_off, drop unused _end_off
-a25374e mds: witness rmdir when subtrees are on other hosts
-820b3f3 rgw: setup as external server is configurable
-9eed12f rgw: clearer logging context
-41f7acf config.cc: fix comments
-019955a PGMonitor.cc: add force_create_pg command to monitor
-43575c7 rgw: fix concurrency issue
-bd89bd9 ProfLogger: add request codes
-77fc561 ProfLogger: use double quotes, add commas
-62e6f36 mds: clean up file flags to file mode translation
-f412942 ProfLogger: enable by default for daemons
-c3fa22f Put each ProfLogger's data into its own object
-82faf3d client: check for invalid file mode
-ff82b60 mds: check for invalid file mode
-5e988b8 rgw: fix i386 compilation
-a51b983 config: fix compilation in certain environments
-626f0b1 mon: fix dump_json quoting
-650f9f3 mds: fix O_APPEND file mode calculation
-80c2064 ProfLogger: don't start threads until it's safe
-3286048 vstart.sh: use out/proflog.$name
-daeffbd proflogger: Fix compiler warnings
-64d3314 proflogger: test multiple profloggers
-51039da rgw: use thread pool for rgw work
-48769e2 test/profloger: test fl_avg variables
-6454ecc test/proflogger: test JSON formatting a bit
-cbeedeb proflogger: Unlink our UNIX domain sockets on exit
-59a8e65 mon: pg dump_json
-431df83 rgw: radosgw_admin log show dumps parsable json
-adafec4 test/proflogger.cc: read length of message first
-f8b4aa3 ProfLogger: write out length of message first
-325951d test/proflogger: Add TeardownSetup and SimpleTest
-134a680 Add test/proflogger.cc, fix ProfLogger::init()
-5517b8f Rework ProfLogger
-6424149 osd: remove unused variables
-d07c480 mon: remove unused variables
-1dedbf6 mds: remove unused variables
-7db65d5 tools: remove unused variables
-442b5d5 clien: rados: bench: remove unused variables
-73cf6b89 ProfLoggerBuilder: new API
-09c8d12 ReplicatedPG: _rollback_to
-c54aa7d testsnaps: use self managed snaps and other fixes
-94c3763 Makefile: librados-config apparently depends on libcrypto++
-35b60c6 gitignore: ignore Eclipse files/folders
-c767b61 Introduce ProfLoggerBuilder
-f71ab2a ProfLogger: don't return val from inc/set/etc.
-77bcc06 Remove lingering references to g_conf
-92df6e3 rgw: fix range dump
-aef29ca mds: fix protocol versions
-a7d791d rgw: multithreaded handling
-d4ed22f recalc_op_target must give an error if pool gone
-172dc20 Makefile: remove dup testrados_list_parallel_SOURCES
-02abdca rgw: multiple fixes, prepare main loop for multithreading
-4f08881 rgw: fix compilation for certain architectures
-2955783 botol_tool: add --xattr argument for PUT
-b4b3672 boto_tool: add --get-obj-xattr
-5cb98c9 rgw_op: mime-encode ugly xattrs in PUT
-ac07e76 rgw_common: remove unused variable
-5f89399 mime encoding: encode control chars
-91343a8 Add control character detection
-5d606c2 rgw: fix log
-0593001 rgw: cleanup, remove globals and static craft
-8b1119f bloom filter: update to latest version
-585239a filepath: remove asserts
-56abfd8 honor CINIT_FLAG_NO_DEFAULT_CONFIG_FILE
-d607be8 crushtool: don't parse any generic args
-ba31462 rgw: configurable way to enable/disable cache
-8a8c1e8 ReplicatedPG: project changes to clone_overlap
-a9f815b CodingStyle: whitespace
-bc6eb10 CodingStyle: final decisions?
-357db1d ReplicatedPG: sub_op_push fix
-143e2dd Don't build build tests unless requested
-2de0156 rados parallel tests: prepend "test"
-f4ea331 rados_list_parallel: add test of list-while-modify
-2d757ac rgw: unwatch cache sync object before exiting
-8e8bd67 testrados: fix
-b7d12e5 systest_runnable: print line when joining runnables
-a32bc89 Create rados_delete_pools_parallel test
-585fab7 ReplicatedPG: data_subset may not contain data_needed
-44ea232 encoding.h: need to pass by reference
-5869591 ReplicatedPG: fix snaps decode in recover_primary
-a8dc9a0 test/osd: TestSnaps now writes large, random objects with holes
-aec7796 mds: fix handle_simple_lock on LOCK replica
-1e31961 mds: drop useless from field from MInodeFileCaps
-2539d16 mds: print cur+nested auth_pins on inode
-a078aee mds: move to MIX state if writer wanted and no wanted loner
-7fe5bb5 mds: print mds_caps_wanted on inode
-314be34 mds: improve print() for MInodeFileCaps
-a928f76 mds: migrate loner_cap state
-f0409c4 mds: clear [want_]loner_cap on cap export
-16bedd2 Move list objects logic to st_rados_list_objects
-9b83072 rados_list_parallel: fix rados_ioctx_destroy uses
-0c4f937 rados_list_parallel: add test4
-6d7c86a rados_list_parallel: test adding objects + listing
-a360b7d Add rerun.sh
-b9c0a72 rados_list_parallel: make num_objects selectable
-2b95a61 add CrossProcessSem::reinit, fix rados_list_parallel
-27fbe8b Now we can put runnable logs into separate files
-cccdd43 Add rados_open_pools_parallel test
-aaa1a02 rgw: clean up temp object if failed to PUT
-4089e4d rgw: clean up temp object if failed to PUT
-5983604 rgw: remove include of curl/types.h
-cb86978 test/rgw_escape: add JSON + utf-8 test
-e8b6125 test/rgw_escape.cc: add utf-8 test
-f29b9bd CodingStyle: Typos, whitespace.
-6bca619 rgw: fix escaping clobbering utf8
-da1f92c crushtool: Add call to global_init() to avoid dout segfault
-8af8ec8 Revert "mds: handle importer failure on exporter"
-fa48867 obsync: Depend on python-pyxattr instead of python-xattr
-f44cffd mds: verify deferred messages aren't stale
-bf768cb mds: handle importer failure on exporter
-c9d6907 rados: fix warning
-3698522 client: print ino along with &fh for ll_ file ops
-ad20e71 rados: fix warning
-41451a0 rgw: bucket deletion updates caches
-d5c8b96 mime.c: avoid compiler warning
-1fdf721 test/mime: test invalid decodes
-1bfe9b8 mime.h: better comments
-4f1d6ac Add mime encoding
-cc40f11 rgw: fix lru
-059019c rgw: restructure runtime config env
-844186f mds: only issue xlocker_caps if we are also the loner
-48837e3 mds: rely on master to do anchor locks for slave_link_prep
-cd5c7f4 client: set I_COMPLETE after adding cap
-84ff439 client: reenable local ENOENT
-24faa3d CodingStyle
-6a793f2 mds: journal renamed dirino on rmdir
-d2cdbe7 mds: defer lock eval if freezing or frozen
-9bdde93 rgw: cache lru
-dc41c8d client: remove unused variable
-4f73121 rgw: fix put of zero sized objects
-9019c6c (tag: v0.31) v0.31
-bae40ea filejournal: parse kernel version 3.0+
-3f708ee rgw: fix copy operation (clean up acls)
-44e76fb rgw: when listing objects, set locator key only when needed
-3eb1ba8 qa: make dir tests run by default in rename all.sh
-f200f0d mds: fix warning
-2dd514a osd: use shared helper for WRITE, CLONERANGE stats updates
-da89ef0 osd: clean up a few things in do_osd_ops
-054fbc4 mds: refactor drop_*_locks() to use helpers
-d72bdab mds: take a remote_wrlock on srcdir for cross-mds rename
-025748a mds: implement remote_wrlock
-4d5b053 client: clean up debug output
-c3a4082 mds: add mix->lock(2) state
-d6f35b5 rados: fix usage()
-fbdb0a3 mds: check that dnl exists before dereferencing it.
-a20d110 rgw: cache cleanups
-61fdbbf librados: add conf_parse_argv, use in tests
-ffdbcb5 systest: support passing in argc, argv
-54ca67b handle_pool_op_reply: update osdmap even on error
-75950ac rados_list_parallel: try to handle consistency issues
-8845749 systest: add cross process semaphores
-dbb122d systest_runnable: implement processes
-5a51afa rados_list_parallel: debug hacks
-fbadee0 Add rados_list_parallel to .gitignore
-aece153 Add systest framework. Create rados_list_parallel
-12a5bb8 mon: fix pool vs unmanaged snaps check
-4f87d84 mon: don't use pending_inc in poolop preprocess_*
-af93d81 mon: fix up pending_inc pool op mess
-5dc09dd mds: set old and new dentry lease bits
-616ff50 mds: conclude ENOENT during travrse if we have a readable null dentry
-a91b1bf Revert "mds: fail out of path_traverse if we have a null dentry."
-4761317 rgw: fix copy operation (clean up acls)
-03b6c40 qa: mds rename: account for not being in the ceph root dir
-b5e4a31 move mds rename tests to workunits directory
-e483bb6 qa: mds rename: Rework so it will function in teuthology as a workunit:
-088013b mds: cleanup: use enum for lock states
-8f9eaf0 rgw: when listing objects, set locator key only when needed
-0c6d2e6 rgw: async rados delete should be called with the correct object
-1d7fbed rados: rename load-gen options
-1da8f81 honor CINIT_FLAG_NO_DEFAULT_CONFIG_FILE
-5b2de2b mkcephfs: Only create OSD journal dir if we have a journal.
-2aa146a mds: always clear_flushed() after finish_flush()
-fb7696f client: fix num_flushing_caps accounting
-e9e3883 client: don't call flush_snaps when nothing to flush
-933e349 mds: kill stray break
-7e1f09f context: implement complete()
-531f46c logrotate.conf: Mark stat/*.log as "missingok"; it's not always there.
-8459f80 rgw: remove temp objects asynchronously
-b670f31 Move stat/*.log to the end of logrotate.conf
-6feab3c mds: fix file_excl assert
-924a322 obsync: improve formatting a little bit
-da917ad obsync: add man page, documentation line
-f5cca2e buffer: remove do_cow,  clone_in_place
-a6ffcc8 librados: close very small race condition
-0e6de71 mon: add 'osd create [id]' command
-1af8998 client: clean up cap flush methods
-984e5a0 Makefile: libmds.a, not libmds.la
-038a754 mds: fix off-by-one in cow_inode vs snap flushes
-e6eef5e rgw: sync cache between rgw instances
-1206625 rgw: fix of users are created suspended
-ca6d239 Fix handling of CEPH_CONF
-31d4973 rados: fix warning
-6e49415 client: only send one flushsnap once per mds session
-860c665 rados tool: load generator
-2f5925e Add "How to use C_GatherBuilder" comment
-f69fcc7 C_GatherBuilder: add C_GatherBuilder::activate()
-16b6567 C_Gather: remove unused "any" option
-728c132 C_Gather: hide constructor, convert uses
-9771a8e C_GatherBuilder: more uses, add set_finisher
-562a04d Filer.h: use C_GatherBuilder
-4772bb6 Add C_GatherBuilder
-5f53131 mds/journal.cc: remove deadcode
-a157bbb Add compiler_extensions.h for warn_unused_result
-648e50e obsync: Depend on python-lxml on Debian derived platforms
-2fbba81 osd: don't spew spurious scrub unreserve messages
-7779ca1 client: more inode ref counting debugging
-9da44e6 client: do not leak MetaRequests on get_or_create() failure
-553c8a9 client: do not assume MetaRequest's dentries are linked
-490f7e9 client: pin dentries referenced by MetaRequest
-3ef8671 client: fix dentry ref counting
-bec489d rados: some more load-gen work
-310032e mds: fix mds scatter_writebehind starvation
-d918e67 msgr: simply set_ip by using is_blank_ip
-d1c5fb1 messenger: rename is_blank_addr to is_blank_ip.
-0b252e9 client: make tdout() work in header
-aad529e rgw: merge chunks for clone range, truncate to 0 before
-902f699 qa: add clone_range tool
-7d75441 qa: file_layout.sh is kclient only
-8bcc639 messenger: add a set_ip function to initialize the IP
-1247a22 qa: fix file_layout.sh mode
-cde5dc2 client: improve debug output a bit
-92e0fac mds: fix snaprealm split for dir inode
-b5510a6 qa: move file_layout into workunits/misc
-c292cce radosgw_admin: fix cli test
-4b16d6f radostool: load gen, wip
-f7fb547 qa: make kernel_untar_build.sh output more helpful
-016cf67 testceph: test file opens with extra slashes
-f5cbe50 testceph: expand test cases
-a851a15 filepath: don't parse multiple slashes as multiple dname bits.
-d1fcffa Resetter: Check return values from Journaler.
-2c70bb8 Journaler: pay attention to return codes from read head.
-a440fd0 ReplicatedPG: Fix some obc leaks
-33aa578 PG: simplify merge_log, remove old objects
-b418896 PG: fix add_next_event and merge add_event
-fab24c8 filestore: allow FIEMAP to be disabled via conf
-033f2d6 qa: add file_layout.sh workunit
-0568d5c mds: make cast explicit to suppress compiler warning.
-fb81442 testradospp: fix compilation
-1446d6d mon: Guard injectargs parsing to prevent crashes on bad input
-6a7e635 mds: Explicitly initialize layout fields, and to the correct values.
-64b1b2c (tag: v0.30) v0.30
-842ec22 debian: drop python-support version req
-e27a893 rados: encode bufferlist in watch-notify
-0111835 rados: encode bufferlist in watch-notify
-6d6b05d rgw: fix some issues with call to clone_range
-a0dcf68 rgw: fix clone_range
-e580172 rgw: radosgw_admin --help typo
-d034042 rgw: implement atomic multipart upload, atomic copy
-dbee699 rgw: atomic put
-7bbdcdb rgw: radosgw_admin user rm --purge-data
-ef25dbb config: remove unused iat options
-19614bb testceph: actually call closedir on opened directory.
-92b0e8e qa: initial commit of file_layout.sh
-58e4dc1 filer: no need for tid_t here
-c6f2c32 client: print cache size during trim for debug
-ea73a5c FileStore: fix error in ALIGN and ALIGN_UP
-034aa08 radsogw_admin: fix clitest
-f7b2555 testrados_delete_pool_while_open: fix printf args
-bd7e3e0 radosgw_admin: --help/-h
-6a3626d create testrados_delete_pool_while_open
-8ba05c4 PG: assemble_backlog - fix comparison error, tail is non-inclusive
-24a26c66 client: fix trim_caps
-15dd4f7 client: fix mds touch
-4c47df3 client: prefer auth cap in caps_issued_mask()
-4e2a8fa client: touch cap on lookup even if we use the dentry lease
-00fa99b client: touch dentries during path traversal
-283da88 testrados: add NUM_THREADS
-008e02f .gitignore: update for test_libceph_build
-13909c2 global_init: make global_init_set_globals static
-7dd919c CephFSInterface: de-globalize
-1ddc552 Fix C_NotifyComplete::notify
-0115855 debian: obsync depends on python-xattr
-a1c9bb3 cleanup
-5c65661 mon: order degraded before unfound
-b00eb9f osd: clean up pool/pg_stat_t structs slightly
-178d63e FileStore: ensure that CLONE_RANGE ranges are aligned
-2fbf215 PG: assemble_backlog - fix comparison error, tail is non-inclusive
-5175851 ReplicatedPG: make sure that rollback target is not degraded
-f6320fe ReplicatedPG,OSD: clone srces need to be non-degraded
-6696b0f libceph: build without globals
-5af5b9f libceph: de-globalize
-bfef6c8 filestore: remove warning
-00c5539 Filer, Journaler: deglobalize
-86b41ff ObjectCacher.cc: de-globalize
-757926a rgw: restructure permissions verification
-1fc60a2 filestore: don't bother doing fiemap on small ranges
-c260b25 update .gitignore
-f347ea1 client/Client.cc: deglobalize
-8190099 qa: wget -q for kenrel_untar_build.sh
-d1a7555 librgw: eliminate globals
-88e9004 update .gitignore
-76dae02 librados, librbd, librgw: remove dep on libglobal
-089255e osd: reorder, cleanup prologger metrics
-d379484 osd: rip out old peer stat sharing
-dfa6c8d osd: rename peer_stat_lock -> stat_lock
-2506500 osd: instrument osdmap updates
-560c082 osd: clean up numpg*, hb*
-6a3741a osd: instrument readable latency too
-a9b107f osd: remove lame rlsum/num
-13b0289 osd: fix loadavg check
-6e78e24 osd: instrument pushes, pull requests
-74aaa02 osd: add sub_op instrumentation
-74f4b4f osd: fix up log_op_stats to actually work
-c72cfe0 osd: rename push applied, committed completions
-6c5a7d5 osd: clean up client op stats
-09f6d9f osd: fix compilation
-d593b39 Revert "osd: make it compile on older boost libraries"
-cbc06f0 test_ceph_argparse: fix build
-80df03d push global_init_set_globals into preinit callers
-116241e osd: make it compile on older boost libraries
-7e33d12 create test_librados_build
-ede3a0a librados: fix end_block calculation for aio_read
-39da107 librados: fix end_block calculation for aio_read
-4475945 librbd: track block_ofs instead of ofs in aio_sparse_read callback
-e477e65 Add ceph_argparse unit test
-f1f75df ceph_argparse_witharg: fix dashes in args
-4549501 common/Throttle: Remove unused return type on Throttle::get()
-c23d4c2 libceph: delogbalize, again
-92a3a47 Makefile: add missing common/dout.h header to dist tarball
-5da0662 librados: fix end_block calculation for aio_read
-823a05c proflogger: only register one event for all loggers
-629ac0d librados: deglobalize, again
-9a3a685 OSDMap: kill some deadcode, deglobalize
-0559f84 librados: deglobalize
-e8b4573 AnchorServer: fix return values in add().
-a8eac4f uclient: change snaprealm refcounting to erase at 0 refs.
-8fd2472 mount.ceph, rbd: Output errors to stderr, not stdout.
-151beff mount.ceph, errno: Avoid printing binary, clarify message.
-21df29d mount.ceph, rbd: Avoid clobbering errno with printf and strerror calls.
-02a2518 run-cli-tests: Pass through CCACHE_DIR and such env vars.
-c9cf19c Remove "#include debug.h" from config.h
-2305a7a librbd: Remove derr uses
-6a1572c client: always use get_snap_context() accessor
-0bf1dc3 librbd.cc: de-globalize
-bc27395 AnchorServer: overwrite old Anchor backpointers when proper.
-c9da307 uclient: Update statfs to match the kernel client and its block sizing.
-7fcf29d uclient: fix flush_caps(Inode*,int)
-787f03c uclient: only change the auth_cap if the mseq is newer
-fd9bf2d mds: Include the pinner in nested auth pin debugging output.
-30c4756 librbd: track block_ofs instead of ofs in aio_sparse_read callback
-59ea9f8 Revert "debian: ceph-client-tools depends on librados2, librbd"
-9edb566 librbd: fix read_iterate for the case where block ofs is not 0
-b34e195 librbd: fix read_iterate for the case where block ofs is not 0
-1635bff osd: fix merge
-d42da23 signals unit test: fix
-965aadc ReplicatedPG: clean up OpContext use in do_op
-3f4e11e ReplicatedPG: Replica collection removal
-923617d ReplicatedPG, PG: fill out state machine
-34cb737 ReplicatePG,PG: SnapTrimmer state machine skeleton
-e53c60d ReplicatedPG: factor object trimming out of snap_trimmer
-33395c8 ReplicatedPG: split get_obs_to_trim from snap_trimmer
-79f76dc ReplicatedPG,PG: update snap_collections on replica
-05c3edf ReplicatedPG: update pull_info and data_subset in sub_op_push
-7f29866 FileStore: die if we get an ENOENT on a clone
-52e03b0 librbd: fix read_iterate for the case where block ofs is not 0
-7cd50f2 Makefile.am: use libtool convenience libraries
-a422d1a rbd: --help/-h
-e214420 librbd: sparse read cleanup, fixes
-6ddee81 librbd: fix and cleanup a bit read_iterate
-bfe0d55 librbd: sparse read cleanup, fixes
-e4f7d8e librbd: fix and cleanup a bit read_iterate
-52e6e85 rgw: some cleanups
-6725e74 qa: simple rbd import/export test
-9761810 Objecter.cc: de-globalize
-df2e3bc initialize g_ceph_context in common_preinit
-a66d026 CephContext: not copyable
-74e5c39 make misc items as not copyable
-4e244f2 [dex]list: not copyable
-d3d1159 msgr: avoid copying Pipe* xlist
-ce6f578 mds: make avoid copying sessionmap by_state xlist
-f94e2ab osd: do misdirected request checks before pg active test
-c17d9c0 mds: avoid copying snap client_caps xlist
-cdb500e mon: do not copy subscription xlist
-abafef3 qa: clean up after snaptest-multiple-capsnaps.sh
-0763221 Dispatcher: prevent copying
-2e7d06c msgr: only SO_REUSEADDR when specific port is specified
-4c1cb28 mon: fix log state trimming
-888e880 mon: add 'log ....' command
-112e569 Convert g_ceph_context to a pointer.
-89dca91 gitignore: add test_libcommon_build
-1ef9099 inode_load_vec_t: de-globalize
-b02c8d6 Create test_libcommon_build
-b64a48b DecayCounter: take a utime_t in ::decode
-209d140 Thread.cc: deglobalize
-fbf3f4a common_init: de-globalize
-c48540a filestore: fix fiemap
-39e2c6e rbd: fix read_iterate for sparse read
-5ad52af rgw: use adapting window for put obj
-9e9cec6 AuthNone: encode entity name in authorizer
-7f92d37 osd: warn instead of error if cluster addr specified but not public addr
-37a9762 include/atomic.h:fix build for non-atomic-ops case
-8f1beb1 rgw: put data using a window
-8147350 MDSMap: de-globalize
-83020ad assert: de-globalize
-fae8dde Messenger: de-globalize
-4053204 DoutStreambuf: de-globalize
-2b22c32 OSDMap: de-globalize
-f6c7343 auth: more deglobalization
-4615913 hex.cc: de-globalize
-d5ec8b7 MonClient: deglobalize
-dcc6448 ProfLogger: de-globalize
-ba5b733 tcp.cc: de-globalize
-0fc6ef2 LogClient: remove accidental g_conf references
-ba61191 msg: remove globals
-b0cb480 KeyRing: derr -> lderr
-91065f4 auth: AuthSupported: deglobalize
-fc43438 Create global_context.cc to house g_ceph_context
-6ff09ef Move signal, pidfile to global
-63bbadd move common_init to global_init
-c46814d Makefile: put LIBGLOBAL LDFLAGS into LIBGLOBAL_LDA
-c95062c libclient: remove client/SyntheticClient.cc
-02c2ee1 mon/MonClient: use ldout instead of dout
-b44ead7 mon/MonMap: deglobalize
-8a0d486 SimpleMessenger: de-globalize
-8069e83 common/DecayCounter: deglobalize
-d224876 ThreadPool: de-globalize
-f82611d common: de-globalize LogClient, ProfLogger, Timer
-5d5a711 common_init: misc globals cleanup
-01038fa auth: remove remaining globals
-51ffa7b auth: CephxKeyServer: de-globalize
-76c5f24 auth: AuthAuthorizeHandler: deglobalize
-ab75f2a auth: KeyRing, RotatingKeyRing: deglobalize
-17d22a9 auth: CryptoKey, CryptoAES: deglobalize
-da2d429 Create ProfLoggerCollection to hold ProfLoggers
-7735b35 g_clock.now -> ceph_clock_now
-2452ef4 common/Clock: add deglobalized clock stuff
-d6adc4e auth: de-globlize CephXAuthorizer
-d03c96e auth: de-globalize AuthServiceHandler and pals
-be8fe54 auth: de-globalize AuthClientHandler and friends
-1dbb0ac auth: de-globalize TicketManager, TicketHandler
-9085597 run_cmd: ret empty string on success;err otherwise
-03c8379 include/atomic cleanup
-bf2c226 include/atomic.h: whitespace cleanup
-ff626f0 bufferlist: get rid of derr usage
-07ff69a include/Completion: de-globalize
-c0e804d ObjectStore: clean up includes a little bit
-6c58da0 include/Context.h: de-globalize
-f2bd39f common/MemoryModel: de-globalize
-0fa7794 common/Finisher: use ldout
-d80b331 lockdep: code cleanup and de-globalization
-823eb26 Thread.cc: clean up
-5a612f9 Create de-globalized versions of the dout macro
-ee5502d Remove cdout
-9678ad3 lockdep: add lockdep_register_ceph_context,cleanup
-620d078 signal: const cleanup, don't use derr
-1e5cb06 rgw: put_obj_data uses aio
-128bfcf rgw: put_obj_data doesn't need mtime
-10171ca filestore: fix fiemap
-ca2f4e2 rbd: fix read_iterate for sparse read
-cc644b8 mds: avoid EMetaBlob::fullbit copying with shared_ptr
-f78de01 encoding: add list<shared_ptr<T>> macros
-96ef8a6 debian: ceph-client-tools depends on librados2, librbd
-04d10d1 qa: tiobench workunit: remove timeout
-7335fbb librados: return value on non void function
-93623fb common: fix descriptinos for -i, -n too
-830f48d update clitests with new usage
-1b9575e common: fix generic usage for -D vs -d
-b9c3672 rgw: suspend/enable buckets through pool async api
-e2150a0 librados: add async pool op operations
-6fb971f qa: organize workunits
-b2c803d secret.c: use safe_read when appropriate
-7b8bf55 mds: fix use-after-free on ESession replay
-9e4adf0 qa: make snap-rm-diff workunit clean up
-e9f308d qa: wget -q
-4efdc52 rgw: remove stray semicolon
-4ca8054 rgw: cast RGW_SUSPENDED_USER_AUID
-20e3ac2 mds: CDir::log_mark_dirty needs to flush before waiting
-ad5ff23 mount.ceph: specify full path for /sbin/modprobe
-f5f563d radosgw_admin: fix cli test
-bc1782a osd: fix find_object_context debug output
-447ea1d osd: fix snap_trimmer obc ref
-1c5f655 mds: when prodding head inode on snapped behalf, avoid XSYN
-3a59579 mds: fix transitions away from XSYN state
-9974b7e rgw: user suspension
-3aa6a4d qa: pjd must run as root
-8b4b838 rgw: get multipart list marker to work
-77d38e4 (tag: v0.29.1) v0.29.1
-a379c67 rgw: some multipart cleanups, fixes
-515f088 librbd: fix block_completion race condition
-e9e3fee rgw: implement list multiparts
-2d63264 librbd: add AioCompletion debugging
-4a7a42b uclient: path_walk should notice when it gets absolute paths.
-e90e041 vstart: put .journal outside of osd data dir
-af9879d qa: Make snaptest-git-ceph.sh clean up after itself.
-1aa2932 rgw: fix abort multipart upload
-27f79fc auth: remove CephCryptoManager
-ea3db17 librbd: fix AioCompletion race condition
-eced4d6 monmaptool: implement --help
-41d9335 test/bufferlist: don't alloc large array on stack
-8c97e6c .gitignore man/Makefile
-954e096 qa: do not use automake for workunit makefiles
-40f5ab9 qa/workunits/direct_io: fit .gitignore
-51b3651 radosgw_admin: fix clitest help
-d2b7e29 crbdnamer: man page
-e645152 crbdnamer: +x
-cca3da1 qa: radosgw_admin: fix clitest
-66229c7 qa: direct_io: fix warnings
-7154324 configure: check for boost statechart header
-e304fd0 radosgw_admin: log show can dump info in xml, json
-28e1a89 radosgw_admin: fix log show (with new poolid param)
-efe1aa7 radosgw_admin: pool create command
-b91c2c9 librados: use empty(), not size()
-8ce98b2 qa: test_sync_io: zero buffers prior to read
-d89c9a1 qa: test_sync_io improvements
-bc8e120 rgw: log pool id, and store/retrieve pool id info
-34098a3 librados: expose pool id
-1e96f71 qa: fix test_shorT_dio_read
-f9e9490 PG: clear scrub_received_maps in scrub_clear_state
-9d1e897 qa: fix loopall, runallonce scripts
-d5bba79 qa: move compiled workunits into organized directory
-d851dee qa: add short directio read test
-8a12a01 qa: add henry's direct io tests
-7087b2d qa: include $basedir/src/ (qa/src/) in path
-8147076 qa: add direct and sync io workunits
-adc98c0 qa: expand test_sync_io
-f2aef3e qa: organize workunits a bit
-953bb60 qa: move compiled items into qa/src/
-f3617e5 osd: fix head_exists fix
-056a0c5 osd: don't update snapset head_exists unless full transaction succeeds
-11ad765 osd: fix make_writeable
-35663de monc: protect msg source check with monc_lock
-aa5c224 debian: Move python-ceph into section python.
-efb8282 debian: Strip and do -dbg magic for librgw too.
-061460b debian: Fix copy-pasto in librgw1 control paragraph.
-6fc8819 debian: Depend on python-ceph in obsync.
-822e777 debian: Depend on librgw1 in python-ceph.
-762c87e debian: Package librgw.
-ab9dda8 pybind: Open shared libs by their major version.
-d444d5b debian: Make git ignore obsync, gceph* package dirs.
-ddf0263 debian: Prevent git ignore from recursing on *.substvars etc.
-0a0493d debian: Make git ignore all of the *.debhelper files.
-5cf62c1 debian: Dev packages no longer have soname in their names.
-0da30c3 debian: Properly package the python bindings.
-edc6659 rgw: list bucket display the correct objects owners
-3e284a7 boto_tool: add put_bucket_acl
-7fa8b97 rgw: don't allow handing out object ownership
-b282603 librados: remove useless reference holding
-98a3b54 librados: get reference to the io context for the pending async ops
-52e9e5e heap_profiler: if log_dir is empty, don't try and log to root dir!
-f41773b coverage.sh: use .lcov instead of .info to avoid confusion
-a6afb05 rgw: remove required indexes when modifying user info
-9a705c7 mon: Follow the Message rules when forwarding tells
-842f3ac rgw: remove required indexes when modifying user info
-c2de9e6 mds: clear correct state bit in do_file_recover
-35beabf rgw: remove clutter
-c863f52 rgw: fix user anonymous permissions
-dadf2a3 Thread: remove globals. Thread create must succeed
-4e0ddae LogClient: pass in CephContext explicitly
-03aef0b Monitor: pass in CephContext explicitly
-2b5e011 mds, mon, osd: with coverage enabled, exit(0) when SIGTERM is received
-befe422 Revert "mon: add all_exit and exit commands"
-cf129ff Revert "mds: allow mds to 'exit immediately'"
-dd9ea9c Revert "osd: add command to exit cleanly"
-b6e5c08 mds: fix up MDCache::path_is_mine to remove a totally bogus assert.
-3a582f9 mon: add new "tell" infrastructure.
-4c79875 rgw: can specify alternative remote addr http header param
-cf5e70d rgw: skeleton for list multipart uploads
-2c4367f CephContext: initialize module_type in ctor
-20d11b0 mds: be slightly more careful about checking if lock has caps
-96f01b0 mds: fix xlock_finish do_issue checks
-7c0ae24 mds: fix eval_gather callers passing pissue_gather as wrong arg
-87ba043 mds: fix xlock_finish issue flag check
-5b304bd mds: make pneed_issue required for eval(SimpleLock*)
-bdd94ef mds: explicitly issue_caps after file_recover
-b06fa1c mds: make pneed_issue required for *lock_finish()
-bc69d4e mds: efficiently issue_caps for OOO or extra locks in acquire_locks
-a340421 mds: explicitly issue_caps for rdlock_finish_set
-ffeb59d mds: explicitly issue_caps for slave xlock release
-cc398cc mds: efficiently issue_caps for scatterlocks unlock during refragment
-f62f8de mds: efficiently drop_rdlocks and drop_xlocks too
-3e52a33 mds: set or issue caps on lock state changes
-88b2246 mds: make issue_caps from file_update_finish smarter
-2a45bca mds: issue caps from drop_locks
-c786391 mds: pass pissue_caps through *lock_finish()
-6d4b93d CephContext: remove silly debug code
-e6349ec Dispatcher should take a CephContext argument
-4ef41c5 mds: fix tcmalloc check.
-63073ab mds: xlock_finish should only do_issue in certain cases.
-379dc6f MDiscoverReply: encode/decode wanted_ino.
-58250fd mdcache: correct error message.
-c1ea3a2 mds: replay: save the right dir!
-f69bc30 debian: move gceph into a separate package
-0b40f48 tools/common: fix C_ObserverRefresh constructor
-3308aa6 rgw: implement abort multipart upload
-802e9e5 rgw: implement namespace, use it in complete multipart
-01df7c6 ReplicatedPG: make_writeable, use correct size for clone_size entry
-1376a5a gtest: add -lpthread to AM_LDFLAGS
-b2becef man: update cosd man page to include info on flush-journal option.
-d224b3e Makefile.am: Add -lpthread to UNITTEST_LDADD
-5922de2 mds: only target XSYN state if we have a valid target loner
-7a5201e mkcephfs: fix ceph.conf reference
-6f6ac75 Makefile: remove ancient comment
-9202a4b ceph tools: de-globalize CephToolContext
-92ee0de mds: drop workaround for embedded null decoding
-6069fa6 mon: weaken pool creation caps check
-80c039c rgw_admin: user info dumps auid
-825cec3 moncaps: whitespace
-4026247 rgw_admin: can reset auid
-4e58308 mds: rename: remove illicit assert.
-5b43419 mds: try_trim_non_auth_subtree if we rename a dir away from a non-auth subtree
-072e80e mds: use CDIR_AUTH_UNDEF where possible
-811dcae mds: remove unlinked metadata from cache on replay
-2330281 rgw: set locator on all required rados calls
-5cf6d0e rgw: put locator key in rgw_obj
-8bd984d rgw: refactor rgw backend interface
-f3688b7 Fix build errors in unit tests
-2470130 monitorstore: return error codes for consistency
-cfbcfd7 Fix typo in usage output for --num-osds
-5d56dfb Fix segfault caused by invalid argument string.
-a1a7147 qa: test witness subtree adjustment
-e2c808a qa: test_sync_io
-21795aa qa: add dir rename tests
-00ec86a mds: open renamed import child frags during journal replay
-44d1930 mds: journal open srci frags on srci import (master)
-a7c083e mds: journal renames on witnesses if we have nested subtrees
-5c870c6 mds: CDir::contains() should use projected hierarchy
-1b0fdca re-fix ignore return value change
-3a2ce92 mds: fix check for no-op rename of two links to the same inode
-f225db7 rgw: remove parts after multi-part upload
-a7012f2 cfuse: really ignore write() return value
-37fd3b5 rgw: calc etag for multipart upload
-2969161 qa: add rename dir checks
-b32f00e coverage: add ceph-coverage to run something with the right GCOV_PREFIX_STRIP
-0eda719 Makefile.am: add check-coverage to get coverage of 'make check'
-1f2740a Makefile.am: install gcno files
-e4f0541 Makefile.am: clean gcno and gcda files in "make clean"
-2cb0c11 qa: rename tests
-3e0352d mds: rename: add missing pop_and_dirty_projected_inode calls
-569baab mds: rename: use temp *in in _rename_apply
-bdfcc0d mds: rename: move unlink out of every possible branch
-12bb308 test/bufferlist: add copy_all test
-eb09764 coverage: add helper script to get coverage for a local test
-6909273 mon: add all_exit and exit commands
-c01961f mds: allow mds to 'exit immediately'
-347dba4 mon: ceph tell mds * is a valid command
-1cc78b6 osd: add command to exit cleanly
-24195b9 configure: add option for building with gcov coverage support
-7b9fa3c test/bufferlist.cc: retab for consistency
-d9d3c78 cfuse.cc: fix warning
-ea9c4fc bufferlist::iterator: add copy_all, use in KeyRing
-6b2bf23 mds: rename: fix oldin pop
-bf7d7fa mds: rename: some cleanup
-b794aeb client: fix rename request target selection
-084a1c7 client: fix mds selection for unlink
-a228857 client: make debug prints for choose_target_mds more helpful
-5e679d3 client: allow caps to be dropped on another inode for requests
-0fb7973 mds: fix unlink new snaprealm check
-dbe41a3 client: fix rename debug print
-83e49cd g_conf: change to pointer
-e61f5c5 simple_spin: fix compiler warnings
-776d381 init: set cct->module_type in common_preinit
-e36a4b2 mds: rename: fix handling of target that is remote dentry
-a566229 client: fix mds routing for link requests
-7770e1c mds: rename: only add target to stray if destdn is a primary
-df7f895 mds: fix/clean up xlock import/export
-3c6a7e1 gitbuilder: quiet
-d11f471 rgw: silence gitbuilder (hopefully)
-f292fb7 radosgw_admin: link bucket to user
-b5011e2 mds: adjust subtree roots on rename
-10750f8 common: add module_type to CephContext; use to initialize rotating keys
-b28ba77 osd: use osd_op.soid in call
-5cc146e osd: allow src_oids to be snapped
-8e69c39 (tag: v0.29) v0.29
-f9af9ce remove dumpjournal
-0baa108 osd: src oid is in OSDOp now
-5a86126 osd: don't crash on malformed clone_range (now really)
-ea8917e osd: don't crash on invalid encoded clone_range
-4d214b1 objecter: set src oid on clone_range properly
-e2e6014 monclient: use default mon port if not specified in conf
-ea56a55 monmaptool: use default mon port if not specified
-69f9087 dumpjnl: call msgr->register_entity before start
-4abdf6f simple_spin: use file-scope global not function
-b198e5a messages: fix missing bit
-b0afaac messages: fix test for multi op
-ec18be5 simple_spin: fix linker error
-53adde0 fix the MonClient problems for --with-debug programs. Still doesn't compile, though.
-a635a9c rgw: multipart complete upload
-8e55e18 librados: remove useless reference holding
-a082747 osd: make CLONERANGE src oid encoding more sane
-740eea1 Refactor MonClient, KeyRing
-f2f2f42 osd: src src_oids oloc check
-ed41f29 remove g_keyring
-90b5354 dout:remove stream from dout_emerg_streams earlier
-98226c2 DoutStreambuf: de-globalize dout lock
-5b7049c DoutStreambuf: de-globalize emergency logging
-6ed9a58 Add simple_spin
-70d7709 Revert "cfuse.cc: use safe_write"
-73ea844 librados: get reference to the io context for the pending async ops
-1aee7f9 rgw: use clone_range for multi upload completion
-befcff0 SimpleMessenger: Keep a disposable flag for use in reset
-7bd016f rados_bencher: re-add written objects constraint to read benchmark.
-b4eb5ef rados_bencher: re-add written objects constraint to read benchmark.
-a97451f librados: support clone_range
-d1d3e26 mds: remove now-erroneous comment
-19949f6 mds: Clean up _rename_prepare journaling
-4689073 mds: _rename_prepaer should only journal dest if auth for it
-cd5049d uclient: reset flushing_caps on (mds) cap import.
-c28b749 uclient: don't use racy check for uncommitted data.
-2c6b560 uclient: call the right function pointer on truncate
-39d50c1 mds: fail out of path_traverse if we have a null dentry.
-350e650 mds: use XSYN state for rdlocks during EXCL
-bbaf0b5 mds: add xsyn states
-5fc6d92 filestore: compare dentry->d_type against d_type constant
-ea76ea5 filestore: stat to test for file type if d_type is unsupported
-ade2ccb osd, filestore: debug collection listing
-637dfc3 rados_sync: add test for temp file deletion, fix
-d4edd17 rgw: multipart: use locator on created parts
-0f3224e rados_sync: in export, download, then rename
-3766618 rgw: multipart additions and fixes
-6fd694c Remove unneeded libcrush1 files
-d6bbf3e mds: journal parents of srci when srcdn is remote
-806646b journaler: also initialize safe_pos
-a13b664 journaler: fix trim crash after standby-replay -> active
-7ca240b mds: cleanup rename_prepare a bit
-0bcd9ac vstart.sh: turn down debug ms
-4d03e15 rgw: some more multipard upload list
-52bf3fc rgw: extend multipart list parts response
-a670b4b osd: implement clonerange
-fc4cc39 osd: give obc refs to RepGather
-4cf342a mds: pin inode while one renamed_files list
-b152a93 rgw: more cleanup
-3546cfd rgw: some cleanup
-5073164 rgw: multipart upload parser test util
-2f3f36a rgw: fix multipart upload complete parser
-711a77c rgw: multipart complete fix
-0cce0a5 filestore: allow clone_range to different offsets
-502baea filestore: fix fallback/slow do_clone_range
-6ca168e filestore: fix fallback/slow do_clone_range
-7e2e477 mon: make sure osd paxos is writeable before doing timeouts
-c5470e0 OSD: don't keep old connection over new one in update_heartbeat_peers
-780322d boto_tool: add get_bucket_acl
-65dc841 rgw: implement list multipart
-e340bfe dout: use recursive mutex for dout
-44770df lockdep: fix shadowed global, add printout
-9b37f4f Allow embedded '\0' in bufferlists when copying to std::string.
-7c6c6a9 rados_sync: don't hash paths with periods
-4870393 test_rados_tool.sh: test hashed paths
-b4bc1c6 rados export: better name mangling rules, fix test
-5dd0e12 rgw: handle multipart completion
-d29b3b7 rgw: parser for multi upload completion
-33c39ab rados_sync: prefix user extended attributes
-0806e65 rgw: some more xml reshuffling
-f5d6be6 rgw: move generic xml parsing code to some shared location
-efee746 objecter, osd: clonerange operation
-07c1989 librados: implement aio_flush
-6db2a4e crushtool: error out if uniform weights vary
-35b19a4 osd: fix ScrubFinalizeWQ::_clear condition
-1528d2c debian: depend on libboost-dev >= 1.34
-0cfa911 osd: don't leak Connection reference
-8aa67aa osd: ignore old/stale heartbeat messages
-e5c9100 osd: fix map sharing due to heartbeats
-5b7c8ae osd: protect recovery_wq ops with the recovery lock
-b3fb58e crushtool: add -v verbose for --test mode
-57ea502 Add content to obsync package
-2324204 (tag: v0.28.2) v0.28.2
-7e1de38 hadoop: track Hadoop API changes
-232cd6b rgw: generate random upload id
-4ddf8df SimpleMessenger: allow multiple calls to shutdown
-8490b78 common/Thread.h: const cleanup
-a0d521b rgw: fix signing for some requests
-818bfd1 rgw: serve multipard init upload
-574b58f mkcephfs: pass config to osdmaptool
-d2ab764 drop useless cm.txt
-1292436 osdmap: take default pool size from config
-9e8484e rgw: handle POST requests for s3
-9b8daa9 crushtool: update help
-6f704e3 obysnc: rgw target: validate all users
-22082c4 mon: remove pg_temp mappings when we delete pools
-e0cbb13 test-obsync: test sync directly from s3->rgw
-a93c86e crushtool: fix --add-item weight being zero when parent bucket(s) created
-56d5d95 obsync: fix bucket creation through rgw target
-b2c1bff test-obsync: test big objects, user-defined xattr
-e9eeb16 mkcephfs: set rdir for local mon setup
-5d51b8f init-ceph: ssh
-05cfb4d obysnc: fix content-type on RGWStore
-6cf67a2 test-obsync: compare_directory now compares xattrs
-4cae0ea ceph-pybind-test: test embedded NULLs in data
-a2d3529 obsync: more fixes for RgwStore
-b76874f pybind/rados: correctly return data with NULLs
-970897c pybind/rados.py: throw NoData on ENODATA
-28c3026 mds: fix canceled lock attempt
-596a3d6 librbd: make image contexts threadsafe
-d38001c pybind/rados.py: rados.Object.key should be string
-b255482 obysnc: RgwStore: make sure destination users exist
-5d865fb obsync: fix DST_OWNER
-73e28f2 rgw: return EACCES if acl xattr doesn't exist
-ea76712 obsync: Add boto_retries, remove rgw_store.prefix
-e3dd77d librbd: const cleanup
-2aa9151 librbd: clean up md_oid use a bit
-0adaa6b rados python bindings: handle xattrs with NULL
-d4bfd96 PG: fix race in _activate_committed
-7de7ba0 RgwStore: fix some ACL issues
-3f5f562 test-obysnc.py: support librgw testing
-e4e098b Rename RadosStore to RgwStore
-1705373 test-obsync: refactor a little bit
-42f873e Proper ACL support for rados targets
-0aa18f3 mds: do not shift to EXCL or MIX while rdlocked
-fe95588 crushtool: clean up add-item a bit; don't add item to same bucket twice
-dd89ff4 crushtool: fix remove-item
-1c334d1 radosgw_admin: update clitest
-ab01d74 mkcephfs.in: print out usage if no actions given
-f7ea7c9 rgw: Fix RGWAccess::init_storage_provider
-c67dd16 mkcephfs: error out on bad usage
-5532f89 make: fix build for rgw
-203a43b rgw_admin: clean warning
-ab278b4 rgw_admin: add key create
-bd0eb9a rgw_admin: subuser and key removal
-7330c3c journaler: tolerate ENOENT when prezeroing
-bb13c92 test_common.sh: skip rm before put
-e42736a radostool: rados put should use write_full
-9ff7cc7 Create a libcommon service thread
-2970268 librados: len should be size_t
-ce04e3d osd: add ability to explicitly mark unfound as lost
-87309e9 osd: make automatically marking of unfound as lost optional
-cea7b65 mds: clean up get_or_create_stray
-081acc4 mds: initialize stray_index on startup
-d66c6ca (tag: v0.28.1) v0.28.1
-9a660ac librads, libceph: store CephContext
-13aed89 Add CephContext
-1c7b982 Split common_init_daemonize from common_init_finish
-478c6bb rgw_admin: make interface a bit more explicit
-c167a28 rgw: subuser permissions
-6360154 mon: verify that crush max does not exceed osd max
-5d98280 crushtool: add --reweight-item <name> <weight>
-e9754d8 osdmaptool: fail --import-crush if crush max_devices > osdmap max_osd
-3a2acef common_init: don't init crypto until after fork
-35ee7e6 ceph_crypto: add assert_init
-ba7ef84 config: delete after new
-4cc83a6 crush: fix signedness warnings
-5baef8f rgw_admin: able to create multiple keys/subusers
-cc1737b crushtool: --remove-item name
-9a14402 crush: fix tree bucket encoding
-d287ade crush: fix tree weight accessor, decompile
-127dcde crushtool: default to hash 0 (rjenkins1)
-2cf5048 rgw: user info structure supports multiple subusers and keys
-4a83de1 osd: update last_epoch_clean in PG::Info::History::merge()
-c22aca1 osd: small cleanup
-e3191b7 osd: merge history when primary sends replica new pg info
-a51bf3e osd: more heartbeat rework
-b5ebe6b msgr: don't close close_on_empty until outgoing messages are acked
-bac1021 osd: only forget peer epochs if they are down AND no longer heartbeat peers
-bc960ac osd: show last_epoch_clean in PG::Info::History printer
-726aebe osd: rework peer map epoch caching
-27c0bce mon: fix parsing of 'osd foo N ...' commands with multiple ids
-68021ce dout: reopen log files on SIGHUP
-277dc66 dout: reopen log files on SIGHUP
-960d2a3 Add SignalSafeQueue
-74691e7 osd: clean up old _from target cleanup; fix one case; share map
-0f1be62 osd: mark down old _to targets
-3811d8b osd: share map with old _to peers
-f87e1dd osd: clean up handle_osd_ping output
-3a7931c osd: ignore stale requests for heartbeats
-f9bea34 osd: don't prioritize heartbeat requests
-7a574d8 osd: do not clobber explicitly requested heartbeat_to target addresss
-e1830db osd: request proper log extent for missing
-ff031ce osd: fix log bounds check
-1dba8dd osd: osd# is in log entry header/prefix
-d75f623 osd: log broken pg state to monitor on startup, activate
-b7b8127 osd: fix proc_replica_log when peer log is empty
-f400110 osd: encode keyring as plaintext after --mkkey
-93709f8 keyring: make encode_plaintext method
-bdc371e osd: take remote log when it is clearly superior
-4c97cb5 osd: fix compensation for bad last_complete
-332565f osd: remove some build_prior stringstream cruft
-45e8627 osd: remove useless debug print
-a2cb690 osd: include past acting osds if they were up
-d4b44f9 osd: do not exclude me during build_prior
-f7e6b1c osd: show final build_prior result
-6f8708b mon: log mkfs as INFO with fs
-dfe52d9 OSD, PG: ignore peering messages from before the last peering restart
-628665b OSD: decrement message refcount before returning
-4404116 mds: kick linklock on revoke_stale_caps
-cef8eb9 debian: no shlibs:Depends for obsync either
-4e2c1f4 debian: no shlibs:Depends for -dev packages
-9443389 librbd: don't need to link against crypto libs
-a71981c PG: add_event, add_next_event: ignore prior_version on backlog events
-922f7cc expanding testceph to test open/readdir/telldir
-3471d41 add ceph_readdir() to libceph
-8f7d6c7 librados: add python bindings for getxattrs
-3df86c3 client: hold FILE_BUFFER ref while waiting for dirty throttle
-838067d client: clean up _flush callers
-510f2dd client: assert(in) on _flush
-67533e1 client: be more careful with FILE_BUFFER cap refs
-3f43c78 client: _flush should no-op if nothing to flush
-bc2c31e PG: choose_log_location: prefer OSDs with a backlog
-fe298f6 OSD: send a log in response to a log query when the pg dne
-57f423b librados: add rados_getxattrs API for C bindings
-bcbcf30 ReplicatedPG: wait_for_missing_object in _rollback_to
-4043059 testrados: retab with C-style tabs
-6a580bf testrados: more getxattr / setxattr tests
-1dd1743 Remove libcrush from packaging
-f16903d client: do not retake lock in sync_write_commit
-ce7f78d ceph.spec.in: fix obsync description
-4d39f1b journaler: ENOENT is okay on trim
-ecb7c96 mkcephfs: pick rdir based on whether current daemon is local or not
-2a0f0cd PG: remove unused argument to adjust_need_up_thru
-2452d41 PG: include ourselves in the prior set
-cad3dfa PG: choose acting set and newest_update_osd based on a map of all osds
-524ab3a PG: GetLog: don't fail if we get an outdated log
-92706af PG: reset pg_trim_to in clear_primary_state
-51daa43 PG: choose_acting: we need best_info to have a backlog, not the primary
-dbb2c38 PG: _remove_pg, reset info.last_update and info.log_tail on log zero
-0aeb8ef PG: merge_log- fix extend log case
-9b97979 PG: prefer log with longer tail
-8c6ce34 osd: clean up choose_acting output
-5d161aa PG: make choose_acting a bit smarter
-14a3f26 Move crush into libcommon
-2fc13de Move crush into libcommon
-0d79f1d man: update cosd man page
-071881d (tag: v0.28) v0.28
-b060f5c Revert "Makefile.am: link some utils with libcrush"
-f1c82aa logclient: get rid of send_log; simplify monitor special casing
-baba0a7 msgr: fix signedness in alloc_aligned_buffer
-bd1995c logclient: log synchronously to syslog
-4237da8 logclient: send entries once per mon session
-38ba476 crush: fix clitest now that leading spaces are stripped
-883a980 Makefile: don't clean up some files
-c266498 Makefile.am: link some utils with libcrush
-e3841dc Makefile: don't clean up some files
-09810cb page: fix #ifdef guard
-2f9ff02 page: redefine PAGE_* macros
-ee7fa81 mds: do not shift to EXCL or MIX while rdlocked
-9be7193 vstart: simplify mds keyring add
-bfca7ac osd: add --mkkey mkfs option
-8ad346a mon: 'auth caps <name> [svc value [svc2 value2 [...]]]'
-a22511d PG: update same_acting_since when acting or up changes
-50be4c4 crush: allow - and _ in crushmap type/item names
-45494b4 crushtool: strip leading spaces from identifiers
-73b9916 msgr: avoid clearing connection_state on pipe replacement
-ec63ec3 mon: 'osd tree [epoch]'
-108b2a6 osdmaptool: print crush tree + osd state
-0e3f092 librgw: be quiet by default
-d4c4fe8 pybind/rgw: fix python bindings for librgw
-b5726e1 librgw: make API reentrant
-34ffe73 ceph.spec.in: add obsync
-28e175d debian: obsync
-6d56c20 obsync: no .py
-bbb1747 PG: Replicas send Notifies in response to queries
-9c8f30f PG: choose_log_location, fix error when scanning up set
-d90458a osdmap: set type 0 to 'osd'
-f6dc19e crushtool: fix error handling for adding devices
-c73e37b crushtool: fix unittest map
-c9a257e crushtool: fix usage
-e46804b osdmap: use straw buckets everywhere by default
-d40010b crush: add add_item and reweight functions
-042139d crushtool: include cumulative bucket weight in decompile
-9a2def6 crush: fix up constness some
-36fb084 Add Python bindings for librgw
-b13bbb0 PG: PG can receive a log in WaitActingChange requested in GetLog
-8ed372c rgw: ahrm.. now really fix logging
-0b6cb47 rgw: fix logging
-b7b47a0 rgw: fix typo
-8836b84 rgw: don't log operations on unexisting bucket
-e043962 obsync: preserve user-defined metadata
-24233f2 obsync: filestore: separate xattr metadata nspace
-265ab99 PG: Don't use exit to call proc_master_log
-f863862 obysnc: preserve Content-Type
-a4bd854 client: update ctime for auth, xattr
-8e6b53f obsync: FileStore: test storing ACLs in xattrs
-3865ca5 mon: health WARN if monitor quorum is incomplete
-a82e062 obsync: FileStore: store ACLs in xattrs
-ac6afe0 obsync: FileStore: test for xattr support
-1db29a2 rados: don't force order on params
-e93c0fc fix segfault introduced by commit de640d85fa3e0e5e5a31704eab5a8714a1ffe867
-cd75a9d osd: lazily close connections to down peers
-a5b5aea msgr: mark_down_on_empty and mark_disposable
-5ecc42b PG: Remove downed osds from peer_missing and peer_info
-ba75363 PG: Only pull the master log from a member of the prior_set
-6af0379 rgw: Move rgw_log_level to md_config_t
-56cab8c Makefile.am: add SimpleMessenger.cc to libcommon
-924c000 librgw: only include rgw_acl.cc and librgw.cc
-298e5c7 rgw_acl: move constructors, destructors to .cc
-bf81df2 obsync: fix eventual consistency handler
-12deaaa obsync: add DST_CONSISTENCY
-6f4f702 boto_tool.py: add --rmobjects, --rm_rf
-50e41fb boto_tool.py: fix old-style argument-passing
-0dea92f boto_tool.py: use s3-tests config file
-1c98da6 librgw: use dout for logging
-883d180 librgw: small error handling fix
-9847eb8 rgw: put XML-to-bin translation into a librgw
-e8504c0 uclient: do not accept max_size changes unless they're from auth mds.
-b8ddecc MDS: do journal on rename if we're auth for the inode.
-a17db02 MDS: don't journal slave ops if we only have caps.
-6e0e553 PG: search_for_missing takes the other osd's missing set
-e0d83fe PG: search_for_missing takes the other osd's missing set
-89a821c radosgw_admin: fix clitest
-72ca96e add basic test case for readdir_r
-8161122 fix null deref when callback invoked en route from readdir_r rather than readdirplus_r
-84644dc uclient: compare _revoked_ caps when deciding whether to release.
-932f4eb uclient: clear out cap->wanted when caps get revoked.
-5e2b57d uclient: be more careful about sending caps.
-91a268e radosgw_admin: dump log by object
-30491e8 updated test to cover "." directory stat
-4456b6c Add analogous special case for "." directory alongside ".." in _lookup
-935f7dc mds: drop unneed default arg
-a6417c6 objecter: set pgls start_epoch field
-8a1644e osd: add pgls start_epoch field
-222126e rgw: in S3 PUT, don't crash on Content-Length == 0
-5c382d3 objecter: fix calc_op_budget bit mask checks
-b6cccc7 Objecter: switch handle_osd_map op resending around
-1d29cc7 rgw: in S3 PUT, don't crash on Content-Length == 0
-5e4f6ba Objecter: implement operator<.
-c155a2b osd: prepend missing objects to pgls results
-d9896b3 obsync: handle eventual consistency issues
-7083777 osd: remove weird commit_op_seq fast-forward
-82f9a92 osd: key Missing::rmissing on version (not eversion)
-f1af92f PG: choose_log_location, fix error when scanning up set
-326d01b osd: support rollback to cluster snapshot
-2dc891f Clock: add new clock_offset config option, and use it in g_clock.now()
-7aed34c clock: remove cruft.
-88641b8 osd: trigger a store snapshot when the osdmap says to
-6db09ba filestore: add a snapshot command to create a snapshot of the entire store
-918eeaf mon: add 'osd cluster_snap foo' command
-2ced4e2 osdmap: add cluster_snapshot field
-d3aa0c1 PG: Replicas send Notifies in response to queries
-1429d77 test-obsync.sh: fix obsync unit tests
-484e6e6 rados_sync: tolerate ENOENT when deleting an object.
-8d201d4 librbd: tolerate ENOENT when trying to delete an object.
-140886c mdcache: check return values when purging an inode.
-0f42099 expand testceph to check xattrs
-b0e0c36 client: support security. namespace
-3521771 support for xattrs in libceph
-3a8f36f journaler: tolerate ENOENT when prezeroing
-d2243e8 osd: unlink of nonexistent object should return -ENOENT
-f114cf1 monclient: fix crash on shutdown
-6f34045 Revert "osd: unlink of nonexistent object should return -ENOENT"
-de640d8 monclient: maintain explicit session connection; ignore stray messages
-3425a8e rados tool: integrate rados_sync with rados tool
-1575655 rados tool: change initial argument parsing a bit
-203edac librados: don't crash if we call connect twice
-a7f8796 osd: unlink of nonexistent object should return -ENOENT
-331c01e rados_sync: implement --delete-after, fix bugs
-357910c Allow dashes in ceph_argparse, etc.
-001c18c test_rados_sync: test --force
-6e55b23 rados_sync: support --force
-d006c6f osd: initialize oi.oloc if on-disk value is bogus
-f00edf7 rgw: switch bucket creation operations
-8cb861c osd: rename Pending -> WaitActingChange
-6d70592 osd: log debug output for Crashed state
-7ada5cd osd: wait for up_thru updates
-7a6b9b9 osd: fix pollution of peer_info
-8a781f1 osd: fix osd$foo typos
-70d8c99 osd: simplify build_might_have_unfound
-8e1e45c osd: reset last_complete on mark_all_unfound_as_lost if no more missing
-0ac419e osd: drop bad warning
-d9ea95f rados tool: remove import/export
-1cb611a .gitignore: rados_sync
-25bfb98 osd: reassert our assert definition after including boostchart
-f9ed988 assert: make our assert clobber any others too
-ea0a139 osd: fix compilation for some g++ versions
-588fe67 rgw: minor cleanup
-7db4949 rgw: opening bucket io ctx stats bucket info if failed
-fbe0bd1 test_rados_sync: check that second sync does nada
-210c38d rados_sync: more fixes
-85292b3 osd: warn when obc locator doesn't match ops
-5a726ef rados_sync: fix memory leak, other misc fixes
-5f7df9a osdmap: refactor mapping; don't assert on missing pool
-a61484e test_rados_sync: test xattr preservation
-6b870bb test_rados_sync: add import/export test
-b169379 rados_sync: complain if import src is inaccessible
-010ffce rados_sync: fix --create for import
-e321271 add test_rados_sync.sh
-e00a824 client: map file stripes to acting osds
-f2c9445 rados_sync: fix import a bit
-8a56a74 rados_sync: nicer error formatting
-e9550b5 common: be a little less scary in our startup warning
-f98475d rados_sync: misc bugfixes
-6b6617e rados_sync: nicer printouts
-a4936a5 man: mkcephfs: small fixes
-73facc1 rados_sync: do_export: fix diff'ing
-6c9698b rados_sync: more improvements to xattr_test
-d74ecc2 mkcephfs.man: update man page
-415db79 rados_sync: Add xattr_test
-48d94f6 osd: used fixed size types for fiemap/mapext/sparseread encoding
-739ab87 cfuse: don't -d
-4fbd6c2 mds: assert auth on journal_cow_dentry
-f757f13 mds: don't journal src when not auth on rename
-621af5e PG: choose_acting needs the value of the osd, not its index
-2315a64 Create rados_sync tool to back up rados pools
-0edbc75 stop.sh: Avoid bashisms.
-6ee6261 stop.sh: Whitespace.
-6c366c0 osd: fix include in cosd.cc too
-88875fb osd: rearrange #includes to get our assert
-d6ebf60 mon: fix multi-osd 'ceph in|out N..' operations
-3ee41ab ceph_argparse: ignore dashes after equals sign
-2ab3062 PG: strays don't peer (only the primary does)
-76febd2 PG: clear peering flag when we transition from Peering to Reset
-dc9be20 osdmap: fix temp osd pg mapping
-5c520fe mon: do not stop mds0 unless all other nodes have also stopped
-6ac5572 PG: handle MOSDPGLog messages in Active state.
-79b1a10 ceph_crypto: Fix ceph::crypto::init mutex for NSS.
-44900d4 (tag: v0.27.1) v0.27.1
-27a48c1 ceph::crypto::init: add PTHREAD_MUTEX_INITIALIZER
-7d12d18 mds: fix --reset-journal
-28ccdf4 obsync: remove misguided strip_owner
-8606449 test-obsync.py: allow better nonce,better printout
-8460cff libceph: initialize keyring after conf is parsed
-2ca61c9 osdmap: small cleanup
-e6dfcfd fix some shadowing arguments
-921d4b3 crypto: fix non-reentrancy of ceph::crypto::init
-429bf1f test-obsync: use s3-tests configuration file
-b8055b4 osd: fix GetInfo down check
-db4026d osd: some comment, debug output cleanup
-a284e20 osd: reg_last_scrub on pg load
-2b1c61e obsync: remove omit_owner for acls
-8964359 obsync: implement --force option
-24f641f obsync: be more verbose about set_xml_acl errors
-b39bb46 boto_tool: add getacl, setacl
-6d8ddbc obsync: Fix ACL parsing yet again
-5d77c54 osd: GetLog, GetMissing cleanups, fixes
-fe988b1 osd: only transition to Pending from GetInfo cons
-d286550 osd: consistent naming
-04e343c osd: handle notify+info explicitly in GetInfo state
-ade1fcb osd: statechart whitespace
-565de26 osd: initialize pg state event counters
-c24859f osd: fix GetInfo querying
-1fbefb3 osd: handle event notify/info/log from Initial
-d634739 rgw: don't output optional DisplayName if not set
-b5cb4c5 osd: debug handle_*
-a544bda rgw: don't assume XML is valid
-9ebcd36 osd: fix min_time in state stats
-4d66199 osd: rename states to reflect nesting; fix enter/exit msgs
-4d10126 OSD: fill in rctx properly for pg->handle_create in get_or_create_pg
-d2c245c osd: first pass at pg peering stats
-a347d18 osd: use const char * state names
-228e857 OSD: assert contents exist when erasing from last_scrub_map.
-ca7a372 PG: proc_replica_info, oinfo not info
-db8f96c osd: move directly to Reset state on pg load
-d622a6f OSD: start PG state machine when loading pre-existing PGs
-c3fe4e3 PG: ReplicaActive must repond to requests from discover_all_missing
-d417fb0 uclient: fill in InodeCap::wanted member on send_cap.
-c9859c2 uclient: only try to update caps on the auth MDS.
-9c192e5 PG: collapse crashed transitions to happen on any unexpected event
-8d301d2 PG: use a state_name member instead of overriding get_state_name
-879d6b0 Revert "osd: simplify check for unconsumed events"
-31f6a8c PG: Primary should also discard the ActMap event
-dda3261 PG: ActMap should be dicarded if no outer state handles it
-ab34a3c osd: simplify check for unconsumed events
-71abe26 osd: make debug output include state name
-efcab96 osd: fix event names
-28fdffc PG.h: transition to crashed on unhandled message
-fdc6791 obsync: improve ACL handling again
-0802cfd obsync: fix some bugs
-c71583d osd: feed new pg mapping into state machine
-d0dd549 osdmap: fix some constedness
-39dc084 osd: turn off recovery oid sets
-eac23e1 PG: remove peer_info_requested member
-258fe7c PG: don't become clean in purge_strays
-9c70fdf PG: send notifies when a stray or an active replica gets an ActMap
-c96f3e9 PG: fix proc_master_log output
-892e58d PG: handle info in proc_replica_log just like we did in _process_pg_info
-b659fd0 osd: only specify start version for Qeury::LOG
-f175d27 obsync: check if ACLs match
-780ec44 osd: use enum instead of const static int members
-a5f352c osd: leave recovery hooks in PG
-90ee7cf osd: fix pg log entry types to not always be delete
-8513122 mon: add 'ceph osd rm N...' command
-f680eca osdmap: allow incremental to represent osd deletion
-890dc2a objecter: remove useless mark_down code
-f39f5c8 test-obsync: test ACL translation, run unit tests
-472d7be obsync: remove --owner, elide owner from ACL XML
-a6383e9 obsync: better usage
-48eb343 OSD,PG: Peering refactor
-09f6d22 OSD,PG: Move pg reset code from OSD::advance_map to PG
-f06269d PG: choose_log_location
-21d8e72 PG: Extract query map generation from recover_master_log
-1477c06 PG: Refactor build_prior into a PgPriorSet constructor.
-1b0dfcf PG: Add gen_prefix method for generating the pg error prefix
-fe30d90 TestSnaps.cc: default to testing with the data pool
-789b967 OSD.cc: handle_pg_create fix initial last_epoch_started value
-a8a16c7 obsync: only require --owner if --xuser is set
-441b54c obsync: implement --owner
-5ac87ff cfuse: encode/decode dev_t properly
-8bd2305 obsync: implement user translation (--xuser)
-fa2da0c rgw: fix ACL XML generation
-931b580 obsync: refactor LocalCopy
-1701804 FileStore: use proper object names for linking
-ac23196 MDS: fix handle_client_rename use of path_traverse.
-7d19f18 mds: trim non-auth swallowed subtrees during resolve
-9e4e345 mds: fix replay of EFragment rollback
-a09eb0c rgw: log bytes received
-6a16019 rgw: fix some logging problems
-03d82a3 rgw_admin: dump also user email
-e97ce8e test/ceph_crypto: Check that the shutdown/fork/init trick works for NSS.
-fc36eb6 filestore: fiemap should close the fd
-e4cdc58 filestore: fiemap should close the fd
-264829b common, cfuse: Hook into daemonization and shutdown/init NSS.
-98b0877 msgr, common: Refactor to extract daemonization out of messenger.
-0e6bacc msgr: Rename SimpleMessenger::start(daemonize, nonce) to start_with_nonce.
-84454c2 ceph_crypto: Assert that NSS initialization works.
-4107e29 common_init: create common_init_daemonize
-2d82fef config: Update sample config with more examples
-2047b59 common_init: set log_file, not log_dir, by default
-689a1bd common_init: don't modify log_per_instance
-0a2d3f2 msgr: remove dup .start() call check, remove cruft
-e0ec413 hadoop: cleanups for libceph type update
-c9712e4 lfn: put lfn outside of user.ceph namesapce
-3a146f0 mdsmap: show mds name in summary
-f468742 hadoop: update libceph types
-347bc9f hypertable: update libceph types
-101506a libceph: error out if USE_FILE_OFFSET64 not defined
-95cea34 lfn: don't return ENOENT if it's not lfn in some cases
-e9fac67 mds: ignore fragment_notify when dft state doesn't match
-1c58f80 mds: do not send fragment_notify to <= recovering nodes
-27ca30d mds: fix uninint warning on cur
-4f39fae mds: handle import cancel while logging EImportStart
-2614583 client: do not send request to mds -1
-aee2097 lfn: set hash and file name constants
-9b3c3aa osd: remove warning about max object name length
-87efc95 mds: try_trim_non_auth_subtree on any canceled import (including resolve)
-e942a2a mds: make trim_non_auth paths complete filepaths (not dnames)
-21cc059 mds: fix steal_dentry dir_auth_pins adjustment
-81041de mon: use tcmalloc
-8e4eed5 mds: fix export_prep trace format
-47afbda mon: make 'ceph osd (down,out,in) N' take mulitple osd numbers
-5d6718e libceph: no _t types
-4b9c093 lfn: short fn length is constant and accurate
-c8859f0 osd: bump up max object name size
-7dd592a crypto: add support for SHA256
-1fd2784 libceph: typedef struct mystruct *mystruct_t
-deb27ef libceph: include 'struct' in declarations for C compilation
-8aab0ec mds: fix auth_pin check
-d2a18f6 config: Remove debug output in conf_get
-a490d1e mds: handle freeze completion delayed by frozen inode
-f998bf6 lfn: replace hash function
-0a80865 mds: add 'mds debug auth pins' option
-d994e8b mds: fix nested_auth_pin accounting on refragment
-27135c9 mds: maintain dn pinning invariants during freezing for refragmenting
-d6917cd mds: freeze fragments during split/merge
-af6ed09 lfn: some more fixes
-c9825f0 automake: Make debug targets known but not built by default in non-debug builds.
-63b0cfa mds: remove erroneous fixme.
-d111681 mds: handle discovers that race with refragmenting
-a76d583 mds: Replay new client sessions on slave-rename importing.
-33d1ea0 mds: pay attention to *stat staleness during split
-7aef544 mds: merge accounted_* stats
-512ab30 obsync: use lxml to parse XML ACL
-698b1ea libceph: move header file to include/ceph/libceph.h
-6f07424 lfn: some fixes
-12542c8 lfn: amend long file name hashing
-a68340e mds: ignore resolve messages received prior to resolve stage
-68c2b57 mds: handle aborted export during pre-export sync
-2f16916 lfn: push cid/oid translation down
-f6d1ccb mds: drop messages to down mdss
-dd183ca mds: do not send heartbeat when degraded
-e37878e mds: fix discover tid assignment
-35efa2b vstart.sh: remove cruft
-1f5b620 mon: fix standby-replay assignment (again)
-319c20f auth: Avoid const mismatch in nss_aes_operation
-9854e27 configure.ac: check for supported compiler flags
-00a2520 vstart.sh: set up pairs for each rank when -s is on
-28edbe5 mon: rework assignment of standby-replay, expansion nodes
-53a8e7d mon: fix standby-replay assignment logic
-6025dee osd: move watch/notify effects out of do_osd_ops
-0aeab99 obsync: implement RadosStore
-ccf11fb osd: mention invalid snapc in log
-896de0a osd: include (some) osd op flags in MOSDOp print method
-b08ee2c osd: add RWORDERED osd op flag
-a44065d radostool: fix getxattr / setxattr return code
-9c2f0f0 rbd: make showmapped output a bit prettier
-539f671 rbd: showmapped
-df1e1c8 pybind-rados: fix Ioctx::close
-dd99226 mds: only include head dentries in check_rstats() rstat check
-e643642 osd: move ObjectState side effects out of do_osd_ops
-101ca58 objectstore: implement Transaction::swap()
-f922b64 objectstore: transaction::append()
-424116f buffer: use std::swap
-604e76f test-obsync.py: add tests with --no-preserve-acls
-3210fe7 osd: remove obsolete noop cruft
-2413302 osd: move snapset_context into ObjectContext from ObjectState
-a31a6c1 objectstore: drop decode support for <= v0.19 encoded transactions
-08265b1 mon: fix pg stat summary
-9b30040 mds: undump-journal
-a4c0cfa buffer: break out read_fd method
-55ae580 rgw: check if bucket is empty before removing it
-87ad8da obsync: another fix for --no-preserve-acls
-010cc35 obsync: fix bug in --no-preserve-acls
-dcca146 mds: Don't twiddle lock states in the middle of an import.
-904af33 rgw: send content length on put operation
-99c347a rgw: send content length on put operation
-e8847b2 mds: only move the journaler expire_pos forward
-b31400d mds: always trim standby segments after rereading the head
-68bafc0 mds: only write head once after expiring logsegments
-7464473 mds: small journaler cleanups
-885acf5 journaler: separate out trimmed_pos setter
-6cc6788 mds: wait for blacklisting osdmap on standby-replay -> replay final pass
-a59153e librados python binding: always use 64-bit offsets
-57cfd76 pybind-rados: fix read API
-6b830d8 hypertable: update bindings to use new libceph API
-8cb9018 hadoop: re-add ceph_set_default_preferred_pg
-5b4690d libceph: re-add set_default_preferred_pg
-e8ac7b5 hadoop: get hadoop bindings to build again
-4ebf73d Client.cc: fix mode/flags confusion
-34a72e1 libceph: Remove *_precise
-0da60ea client, libceph: clean up layout methods
-ed7c583 CephFSInterface: don't include Timer.h
-4d41507 hadoop: convert to new libceph interface
-e9fb106 do_autogen: add -H for --with-hadoop
-0bd7ee5 do_autogen.sh: don't clear CFLAGS, CXXFLAGS
-f7e5155 testceph: add more tests
-d3c0b42 libceph: fix some bugs
-529ef2d libceph: avoid DIR*, combine connect and mount
-66b84fa hadoop: whitespace fixes
-bff3004 Client: unmount should not be able to fail
-54782bf libceph API change
-e38fc4f mkcephfs: Fail if there are no mons defined.
-21504a0 mkcephfs: Fail if a mon has no address set.
-3207c5d mkcephfs: Remove temp dir, not just its contents.
-829ca52 journaler: fix flush completion when nothing to flush
-aca14f9 journaler: default to readonly; fix asserts
-0c38da2 vstart.sh: fix -s
-a6ac930 mon: consisder osd recovery state in health check
-2f95d92 mon: include unfound count in pg recovery summary
-52b7481 mon: fix up osd health report
-a9d12cb mon: fix up pg health report
-70640bf mon: generalize health check a bit
-4368e97 Makefile.am: add -fno-strict-aliasing
-4fe53fc Makefile.am: Wpointer-arith, Wstrict-null-sentinel
-793034c (tag: v0.27) v0.27
-268f189 clitests: fix osdmap unit test
-4b547cb Makefile: add some new warnings to CXXFLAGS
-474be65 mds: don't daemonize when doing journal reset.
-625e785 rbd: rename kernel add/remove to map/unmap
-c87fc69 rbd: add commands for manipulating the kernel sysfs interface
-9869859 mount.ceph: use common implementations of secret handling and address resolving
-2ff3c82 addr_parsing: use strtok_r to be safe
-def3666 addr_parsing: rename mount_resolve_dest to resolve_addrs and don't modify its argument
-bffb9ed addr_parsing: move implementation out of header
-20719c7 rbd: use rados' init_with_config because we already called common_init
-4cc88f6 common, mount.ceph: move functions for working with secrets into secret.h
-cb8237e testlibrbd: fix signed/unsigned comparisons
-8cd3f1c osd: drop 'casdata' bucket by default
-b419f3d filestore: lfn_unlink removes the entry as last step
-00ffafa cmds: make journal-check mode run in the foreground.
-804a6d6 mds: massage handling of oneshot-replay.
-7979fa5 OSDMon: make the defaults in reweight-by-utilization work.
-8109f74 testlibrbd: fix signed/unsigned comparisons
-c805937 osd: drop 'casdata' bucket by default
-1cff807 filestore: lfn fixes
-4e21db6 auth: const cleanup
-1421d70 obysnc: use python2.5 compatible exception syntax
-1940875 filestore: fix getxattr
-e209db4 PGMonitor: unregister the config obs in ~PGMonitor
-527ecd4 config: add remove_observer
-3d97c33 PGMon: use the config observer framework
-f940ee8 ProfLogger: add NULL to KEYS in the config observer.
-0e82841 config: add comment clarifying virtual destructor.
-5b218b2 filestore: introduce long-file-names
-7dc5a7f PGMap: fill in full OSD sets on decode.
-8ebbd60 conf: reopen proflogger on conf change
-6e49c06 conf: add observer framework
-36f0068 cauthtool: -C not -c in man page
-433deec dout: make dout a member of md_config_t
-9a38acf dout: remove DOUTSB_FLAG_STDOUT
-0b6a023 PGMap: add redo_full_sets() function for when ratios change.
-515c767 osdmon: Clean up debug output on map full flag.
-a2613f8 PGMap: add [near]full_ratio to the Incremental and encoding.
-af92e8b PGMap: always decode pg_remove.
-f9056d0 osd: better debug output on replay completion
-634dfc9 mkcephfs: allow a prebuild osdmap to be specified
-ad71955 cfuse, mds, dout: Do not create "rank" symlinks for log files.
-4428d1e Revert "Revert "autoconf: Complain if tcmalloc is not found.""
-f6179fc debian: Handle missing tcmalloc on Debian lenny.
-0d98a62 debian: Build without tcmalloc on non-i386/amd64.
-bd7922a remove old debian build helper scripts.
-7c04f81 mon: remove class distribution infrastructure
-deb0ee9 osd: move ClassHandler.{cc,h} to osd/
-964a0a6 osd: load classes from a fixed location off disk
-54284c0 common: add environment.cc/environment.h
-d55399f mds: remove MDSlaveUpdate from list on deletion
-87def51 common_init: move version printout to common_init
-ae0f5f0 interval_set: slightly better API for erase
-faffcc5 Change some global config options to env vars
-2e41f08 journaler: fix do_flush adjustment
-bb4cfab osd: assert on query on deleting pg
-67721b0 osd: do not create pgs on query
-b05f1ba journaler: truncate/zero ahead of write position
-974d859 filer: remove whole objects on zero()
-0f0c1c8 interval_set: implement erase(iterator)
-e639352 journaler: check return code on _finish_write_head.
-68863bb osd: make ZERO on non-existent object a no-op
-42a7013 dout: remove references to g_conf
-ab9dc12 vstart tests: specify ceph.conf
-878f4a4 rgw: return appropriate error for unresolvable email in acl
-b8e791b config: reorder config_option struct members
-8038c49 clitests: fix radosgw_admin test
-756a2ac config: remove unused OPT_NONE type
-3f275bc clitests: eliminate use of old-style section name
-6058a36 MDS: move slave rename xlock handling before finish_export_inode.
-14dd299 improve debug printing
-d857983 mds: Unify migration-handling code in _commit_slave_rename.
-6bd2081 mds: _commit_slave_rename needs to drop auth_pins for exported xlocks.
-1a6f437 MDS: Make _rename_apply inode import auth_pinning more intelligent.
-478c617 mds: If we're a slave, clean up xlocks when we export an inode.
-5299aab mds: properly drop imported xlocks.
-97e357c MDS: Server takes auth_pins for xlocks on imported inodes.
-216fd77 objecter: resub ops on full->nonfull transition
-c966410 osd: show "full" or "nearfull" in osdmap summary line
-796528c rgw: remove get_user_info() and clean up
-d8fe208 rgw: store user info on all indexes in the same format
-11f1e2e rgw_admin: can lookup user by access key
-d778921 mount.ceph: behave when CONFIG_KEYS is not compiled in
-d21bdd6 radosgw_admin: Update manpage to new syntax
-1eccc01 MDS: Fix Locker::handle_reqrdlock for xlocked locks.
-79cac5e mds: Always _open_parents when opening a new snaprealm
-a028c89 mds: don't run all of try_subtree_merge on a rename across MDSes.
-6250e82 mds: adjust LocalLock can_xlock_local().
-5a65a04 mds: Extend use of find_ino_peers.
-bea966a mds: Make use of find_ino_peers
-22e8519 random commenting
-ace54db MDS: Remove inappropriate assert from _logged_slave_rename.
-ac045dc MDS: Server::handle_slave_rename_prep now accounts for dir snaplock.
-597e30e MDS: Don't move inode to snaprealms if not primary inode.
-08bd2ef MDCache: update assert to account for being a slave.
-569cce3 Server: push_projected_linkage in _link_remote
-5b825c3 Server: ensure slave mdses have full dest tree
-544ce94 rgw: basic support for separate uid and access key
-24f35e7 mds: fix null deref in debug
-f855151 mds: keep import/export subtree_map state in sync with journal
-d94c69e mds: fix export cancel during IMPORT_PREPPING
-07098fa mds: clean up trim_non_auth_subtree output
-e15d9ca mds: cancel exports in PREPPING state on any failure
-c7385c1 mds: use helpers for import_reverse
-777bcba mds: don't skip inodes in journal that may be trimmed during replay
-92d349c config: warn about old-style conf section names
-2c0b844 man: Update cmds documentation.
-ff5bc8f mkcephfs: fix check for highest osd
-e34e332 vstart.sh: use new-style section names in config
-cc0e566 mon:don't check for old-style monitor section name
-a6f0ce4 cconf: update man page
-925a2e0 mkcephfs, init-ceph: tolerate complete lack of a type
-a7e7bde objecter: log when we defer a write because of FULL osdmap flag
-c9154c0 mkcephfs, init-ceph: tolerate complete lack of a type
-a0a5ea4 config: do not accept old-style section names
-b740670 cconf: fix usage; clean up some code
-ba69603 config: normalize key names, cleanup
-9b7f223 rgw: fix other err related issues
-303420b rgw: adjustments to error handling
-54bc4b6 libceph: implement ceph_conf_set and ceph_conf_get
-13c6b90 mds: init metablob MDLog* for EImportStart
-68653b3 init-ceph: no log_dir default
-6150f58 mds: fix journal offset types
-f5b566b mds: show migration state names on cancel
-b5f6eb1 rgw: rework error handling a bit
-4eb9d4f config: add test for override ordering, comment
-a199416 config: de-globalize reading config file
-22dbbe8 radosgw_admin: fix make check
-a3a1a04 config: make md_config_t.name a value, not ptr
-a3144a1 rgw: don't modify object owner when setting acls
-6f730af rgw: allow changing acl using canned acl
-54913d4 radosgw_admin: add 'bucket unlink' option
-08e9855 mkcephfs: Actually do a mkfs.btrfs
-141178f MonitorStore: use sync_filesystem when available
-09d4c96 dout: log_per_instance should work with log_file
-98911b6 RadosModel: error handling fixes
-839b4ca filestore: fix do_getxattr check
-9ac7825 FileStore: give better error message about xattrs
-9e0565c mds: fix dn unlocking on export_reverse
-7dc82d0 mds: during export list target second
-607ce44 mds: do not start_new_segment on replay_start
-7c17cd3 mds: fix bad import_state check on handle_export_discover
-338c9a6 mds: queue rejoin_waiters on rejoin_ack survivor
-c9ce4cf mds: fix resolve
-4fe48ed mds: don't check_rstats on non-auth or frozen dirs
-aa07489 mds: fix _freeze_dir assert for refragment case
-4001b81 mds: fix choose_lock_state() on xlocked object
-e341fe0 osd: Use syncfs when available
-5c06fc1 rgw: create bucket with empty name should return a valid error
-59309b3 rgw: recreation of bucket returns success
-b7b66ac mds: update rstats on stray dir when you rename over existing inode.
-cc16277 sample.ceph.conf: add log file and pid file
-694c437 vstart.sh: use "log file" instead of "log dir"
-fd0290a rgw: listing non existent bucket returns NoSuchBucket
-02e9310 osd: move MAX_CEPH_OBJECT_NAME_LEN into object.h
-4082808 osd: check obj name length to avoid ENAMETOOLONG
-2380e70 librbd: don't write to stdout
-1eae9d6 Add test_mutate
-9c731ed mdsmap: initialize standby_for_rank
-5e27a07 mon: simplify mds follow checks
-2b59bc6 mon: simplify mds laggy check
-e9afe17 mon: don't take over for a standby-replay
-2b2766d rados-tool: use init_with_config interface
-466306d mds: make _create_system_file dirty dentries properly
-d7544dd mds: fix create_mydir_hierarchy to save dir
-bc98fe7 mds: improve scatterlog debug msg
-c7f9d2f mds: clear flush state on rejoin ack
-c9872a4 mds: send any dirty scatterlock state on rejoin
-43d7472 mds: reset dirty->flushing on rejoin scatterflush
-2a1af8b mds: drop debugging cruft
-0f10e95 mds: make _create_system_file dirty dentries properly
-31fc9ed mds: fix create_mydir_hierarchy to save dir
-f4d8677 radosacl: read Ceph configuration file
-ceba04f cephtool: don't print anything on SIGTERM, SIGINT
-21df042 mds: don't crash on bad export_dir command
-fb8c09b mds: fix file_eval on subtree roots
-7ca69eb osd: fix ref leak on pg when queueing
-6768586 osd: take reference for RepModify
-60b645e osd: fix race in op enqueuing
-cc5dd6d mon: simplify osd health output
-9c0d42f osd: only log scrub errors (not ok's)
-eacfb8d TestSnaps: Fix compile error
-c02b56e cfuse: pass through SIGTERM, SIGINT to FUSE
-1cb4aae ceph_fuse_ll_main: restructure error handling
-b3f5102 librbdtest: check for error on out of bounds I/O
-46c761f librbd: check for out of bounds I/O in all forms of read/write
-e34078b cfuse recognizing same xattr subset as kernel client
-0e371de TestSnaps.cc: allow client id to be overridden
-2b0e474 rgw: utility, not daemon
-7f3a054 CDir: check_rstats will now print out dir stats whenever there's a bug.
-f3f7383 obsync: preserve ACLs
-556f06e obsync: escape obj names between S3 and local FS
-4995117 osd: futz with stat again.
-0de233c test/osd: Add latency stat collection to TestSnaps.cc/RadosModel.h
-e26626a ReplicatedPG: fix error in snap_trimmer
-84aaa6e crush, clitest: Port old test_crushtool.sh to clitest.
-61ce52c osd: more futzing with stat
-eb08daa libceph: Make header usable from plain old C.
-eee1f92 crush: Remove dead code.
-c494689 Don't crash during initialization when working without an osd journal.
-aefa104 crush: Remove dead code.
-38c6831 radosgw: Remove PHP setting from VirtualHost documentation
-05596d7 osd: Remove dead code.
-f81b505 msg, os: Remove dead code.
-033e29a test-obsync.py: add test for --follow-symlinks
-2506819 test-obsync: some fixes, be more verbose
-2653361 boto_tool.py: fix rmbucket
-42975b1 obsync: add --follow-symlinks
-9599b66 ReplicatedPG: tolerate ENOENT when statting.
-a66da4a qa: Remove fsx workunit.
-d55e98b common, msg: Remove dead code.
-4537d92 crush.old: Remove dead code.
-e01cd3b ebofs: Remove dead code.
-b293d45 osbdb: Remove dead code.
-78716a4 clitest: Disabled problematic rados test, for now.
-fe15727 clitest: Add more simple basic functionality tests.
-8c30f53 librados-config: Distribute the librados-config.8 manpage.
-536ae0c librados: Stop bundling the now-unused headers.
-bcacb13 buffer: Move atomic.h include from buffer.h to buffer.cc
-699c694 buffer, atomic: Explicitly include assert.h where asserts are used.
-c26158b buffer: Move buffer::raw* out of the header.
-ce76798 buffer: Move functions touching buffer::raw internals into buffer.cc
-2bd9ce1 buffer: Move functions touching buffer::raw internals into buffer.cc
-a752d83 buffer: Move functions touching buffer::raw internals into buffer.cc
-f0f4b80 buffer: Move functions touching buffer::raw internals into buffer.cc
-14cff95 buffer: Move functions touching buffer::raw internals into buffer.cc
-4878575 buffer: Move functions touching buffer::raw internals into buffer.cc
-3a80cc6 buffer: Move buffer accounting into functions, don't expose atomic_t.
-456f2fc pybind: Distribute the test script, too. Fixes "make distcheck".
-e5fce7b Revert "mds: rip out rename linkmerge support"
-7470cc4 config: complain if --name gives an invalid type
-cbb4861 ConfFile: add support for backslashes
-24caedc pybind: install ceph-pybind-test on debug builds
-3149649 rgw: fix decl vs goto error
-64185b6 conf: small code cleanups
-2dcfe21 osd: fix signed/unsigned comp
-f3a00ce ConfUtils: new parser
-f842bcf osd: simplify stat
-b0f817a osd: process missing when log is empty
-0139be7 librbd: remove unnecessary includes
-b6084cf config: expand metavariables when needed
-94fade2 config: add ability to complain about parse errs
-4a27cec confutils: test unicode parsing
-0e26ece config: fix metavariable substitution
-9981ff9 (tag: v0.26) v0.26
-32e422e configure: change gtk dep to 2.12 instead of 2.13 for lenny
-3227405 config: remove some unecessary g_conf references
-05c281b Revert "autoconf: Complain if tcmalloc is not found."
-d941422 cclass: add bindir option
-3ce9534 client: close snaprealm on last cap removal during reconnect
-553da45 mds: fix trim_non_auth assert for base inodes
-9ac44d4 MDS: change messenger name for replay mdses
-b21fbab journaler: adjusted requested/received_pos when dropping journal tail
-64afb9d confutils: more parsing tests
-d4c4b4a journaler: fix partial tail entry correction
-2630ecc config: Add confutils unit test
-8ea9380 journaler: fix signedness
-bb81475 journaler: fix warning
-bafff04 mds: fix bounds on import
-03c9365 mds: rejoin dirfrags explicitly
-a01fba1 mds: set dir_auth between EImport{Start,Finish}
-a47c225 mds: use try_trim_non_auth_subtree helper
-6fcecbc mds: close exported dirfrag
-5d998a7 MDSMonitor: MDS do not standby replay until other is active
-ff2c2e3 journaler: fix requested_pos badness in _issue_read
-65714c5 mds: show correct incarnation on mdsmap update
-dec5b6b mds: fix discover_path
-b60a3c9 boto_tool: often use get_bucket rather than lookup
-06ed898 mds: fix find_ino_dir completion
-c736d7f mds: find_ino_dir debugging
-2d92696 mds: fix dir fetch on lookup_hash fix
-9bed4e3 mds: fix discover_path
-3bfc468 mds: don't query self from find_ino_peers
-8408f83 client: lookup_ino command
-2f82b39 client: fix lookup_hash request hash value
-a603acc ceph_argparse: fix silly usage message
-760bc01 config: typecheck initialization macros
-ee48325 config: introduce OPT_U64
-80d5873 client: fix lookuphash to use rjenkins
-6b4fb92 mds: add LOOKUPINO op
-1ff3ce1 mds: rename chained _lookup_hash_? methods
-80b621b mds: also try to look up ino directly
-5e4839b makefile: include MMDSFindIno[Reply].h
-ddc06f1 journaler: fix comments
-30bffab mds: try find_ino_dir if find_ino_peers fails for lookuphash
-d31b76a mds: find_ino_dir
-ce2fabc common: fix cmdline of indashes_to_underscores
-0a63567 rgw: Properly support truncating on S3 PUT
-3f1e9b0 mds: use helper to generate dir inode object names
-2639289 mds: allow explicit finisher context for path_traverse
-34b0813 mds: fix possible null dereference
-705161b mds: add mds failure/recovery support for find_ino_peers
-3970340 mds: try find_ino_peers for lookuphash requests
-c2c333d mds: find_ino_peer
-3afea8f client: lookuphash
-cb2f966 vstart.sh: don't put quotes in generated ceph.conf
-07ffd55 ceph_argparse: convert dashes to underscores
-e6544a3 client: Use NULL instead of 0, for clarity.
-9567ba1 man: Make </VirtualHost> be on its own line.
-0258166 rgw: fix buffer overflow
-4cc7dcc mkcephfs: Actually do a mkfs.btrfs
-9606758 rgw: recover from partial bucket creates
-f895e20 rgw: use tmap key (excl) create when creating a bucket
-7a2b653 config: remove kill_after
-d5f10bc testlibrbd: fix warnings
-e44a547 testlibrbd: fix warnings
-5141e90 testlibrbd: clean up and add tests for snapshots
-e424171 librbd: fix snapshot handling
-7b28d5a librados, librbd: add some debugging messages
-ab6c036 librados: add selfmanaged_snap_rollback
-3946779 librados: return -EROFS when trying to write to a snapshot
-69f174c mkcephfs: minor fix
-cf3bb44 mkcephfs: copy to daemon nodes for each daemon
-5a1ccdc journaler: don't block when we adjust back write_pos
-887a01f config: parse_argv fix
-c6f1cce rados: print error message on exit
-ab8871a rados: add 'tmap {set,create} obj key value'
-58fc0cf osd: add tmap key (exclusive) create
-5837a25 config: fix use of uint64_t* as uint32_t*
-59923a8 config: tighten up uint32_t use
-6f27492 mkcephfs: copy to daemon nodes for each daemon
-c3746da common_init: fix keyring loading
-a68ef60 common: Add strict_strtof, strict_strtod, unittest
-493e2d9 OSD: ReplicatedPG: commits should be high priority, like acks.
-9cde1f4 config: use std::string in md_config_t
-3c94cc2 test/bufferlist.cc: Added append tests
-172835f ConfUtils: move parsing into config.cc
-1fb543c ConfUtils: fix up read API a bit
-a854feb ConfUtils: decode to std::string
-4410000 mount.ceph: Use LDADD not LDFLAGS to bring in -lkeyutils.
-a2ec936 cosd: fix bind to specific address
-3a1a318 mkcephfs: minor fix
-92e0751 Add an RPM BuildRequires on keyutils-libs-devel.
-4af786c config: temporary fix for monclient conf issue
-138f360 cmon: fix typo
-0f9e318 mount.ceph: fix missing includes
-9aab8c6 Add a Debian Build-Dep on libkeyutils-dev.
-bee8551 mount.ceph: Use kernel key management API when possible.
-73671c8 common: Make armor.h safe to use from C.
-69f2467 mount.ceph: Modprobe ceph before trying the mount.
-9233889 mount.ceph: Silently pass through options "name" and "secret".
-db3703a mount.ceph: Fix strncmp length comparing "secretfile".
-ab03eda rgw: add bucket to user list prior to creating bucket
-50ad51a rgw: create bucket object and xattr in single operation
-9d0697a librados: add create to ObjectOperation
-e8ceadb objecter: add create to ObjectOperation, known strings
-12a82a5 SyntheticClient: const cleanup
-59e2ef1 FileStore: convert dev, jdev to std::string
-41899a3 cmon: add --inject-monmap option
-de6338c mkcephfs: don't clobber osdmap when importing crushmap
-dd5063b librados: compound ObjectOperation
-eba5437 config: refactor conf_set_conf_val a bit
-82039d7 config: be stricter in set_val
-f18eac0 config: whitespace, code ordering cleanup
-ddcd641 common: rename old argument parsing macros
-51e21a7 common: more argument parsing into ceph_argparse
-fc81de5 vstart.sh: Filter out IPv6 and localhost IP addresses.
-d8096e7 common: separate file for strict_strtol
-5c21823 objecter: ObjectOperation fixes
-98dd2d1 journaler: remove obsolete journaler_cache thing
-9f57360 rgw: remove extra read_acls
-6966c3e msgr: move pidfile handling, signal handing out
-b4d49df testradospp: zero terminate before printing strs
-e1ce767 mds: include .ceph is root directory
-0f241fc common: run_cmd: fix bad implicit conversion
-009714b mds: fix client session removal on journal replay
-5658857 Fix Debian librados1 -> librados2 package renames
-ba4678d journaler: remove ack/safe distinction
-2a53c83 obsync: Remove deadcode
-e8d8643 rgw: if formatter gets too much data, print some
-a5be372 rgw: implement JSON escaping
-1bfabef rgw: init_rest: small refactoring
-ede7e3d units: remove "performance test" from crypto units
-50d0947 units: fix cauthtool usage test
-1e7b371 rgw: escape XML attributes
-7eca830 boto_tool.py: usage fix
-aac1ef5 rgw: don't reject requests that don't have bucket
-e1457a2 journaler: remove some dead code from read_entry()
-a0704eb journaler: issue separate reads per period
-c9d0ede journaler: fix prefetch to handle multiple in-flight reads
-3129319 journler: make readahead/prefetch smarter
-2ecbd02 journaler: reduce prefetch interval
-921cb06 journaler: remove unused read_entry()
-658b140 common_init: allow init without config file
-227ff6e MDSMon: Add mon_force_standby_active config option.
-1324c93 filestore: fix journaling for writeahead, parallel modes
-d7f4323 filestore: include stat result (size) in debug output
-64141a4 osd: let single large ops through the throttler
-d053f53 rgw: fix str_to_bool
-a9633ce rgw: don't validate bucket/object names if name is empty
-7b6491a boto_tool rework
-cd897e7 rgw: path paramter for pseudo folders
-1236ce6 mds: drop dead journal flush code
-39be6c4 mds: remove mds_log_unsafe mode
-1324f8f bucket name: better ip addr detection, allow caps
-7fa90ec validate_bucket_name: loosen up
-0791dd4 boto_tool.py: add more bucket interaction stuff
-399cae9 mds: reimplement laggy
-e6b0302 mds: check safe_pos for _expired check
-a56a813 mds: skip redundant flush before journal segment trim
-9e6c80e mds: assert on mds table write error
-597e6c2 osd: factor pg get-or-create code into common helper
-70b021d calc_hmac_sha: fix access-past-end-of-buffer
-dff2c5b Use macro for digest size, part 2: tests
-54cc33c mkcephfs: minor fixes
-ac5ad4e do_autogen: create radosgw
-fd5fd94 RGW: validate bucket names and object names
-e835700 mds: add FIXME for renames between snaprealms
-c866536 FileStore: replace op_queue_throttle with op_queue_reserve_throttle
-33a4190 mds: add FIXME for snaprealm on rename slave
-b738b72 rgw: dump content type when listing objects (swift)
-5d8e212 mds: remove bad open_snaprealm()
-14c300f mds: simplify _rename_apply branching
-d397cfd rgw: support pseudo folders in swift
-6346702 ceph_crypto: fix undefined references
-7affbd5 boto_del.py -> boto_tool.py
-77be1da obsync: remove obsolete cmdline options
-cdedfbd rgw: generated swift urls are more compatble with openstack
-f30adbb rgw: fix compilation warning
-b10a836 rgw: change the swift auth config a bit
-942eae4 context: conditional context debugging
-6788c3c Rename objsync -> obsync
-ff1c7a7 Add boto_del.py
-befb87e Add boto_del.py
-aa8b7d2 rgw: save roundtrip when reading user info
-f509c86 rgw: self signed tokens
-1ded567 rgw: keep user info copy in the indexes
-e49fa72 rgw: store openstack secret as part of the user info
-656dc14 librbd: remove RBD_MAX_SEG_NAME_SIZE
-5f14fd9 common: Add utf8 validation functions, test
-8133ffd rgw: remove strerror references
-c19f82e common: Add utf8 validation functions, test
-8aaf93b mds: fix mdsmap dump formatting
-21786af Rename osync to objsync
-444879c Rename osync to objsync
-157e6bd CDir: make check_rstats friendlier.
-82f3cf0 MDCache: make linkunlink rstat propagation work properly.
-5e1ffb7 MDCache: set up rstats properly in create_system_inode.
-964486c MDCache: properly update and project the stats when removing inodes.
-24b4fae mds: add check_rstats function and a few users.
-c4ccbb7 osync: implement delete-before and delete-after
-094aba3 osync: add osync-test.sh
-b708307 rgw: fix logging env variable name
-ffdc995 cosd: Close TEXT_RED with TEXT_NORMAL in a few places.
-8c82f35 osync-test: test --delete in bucket-to-bucket xfer
-de44dc8 osync-test.py: test --dry-run, --delete stuff
-2602eb3 osync: implement --dry-run option
-f2e146a rpm: package python bindings for rados
-bede3fc osync-test.sh: test bucket-to-bucket transfers
-0a5ceb1 osync: add AKEY and SKEY
-b77a323 osync: fix automatic bucket creation
-fc99cca osync: add alternate syntax for file:// transfers
-e08b3a5 osync-test: test file-to-bucket transfers
-453e1f9 osync: add SRC_AKEY, etc. environment variables
-07ee631 (tag: v0.25.2) v0.25.2
-41675b1 Fix manpage typos
-e7abf59 Remove unused cdbs build dependency
-e2f1d78 Change wording of Debian package descriptions
-be97e60 Make Ceph Debian packaging Linux only
-5959e76 Disable libatomic-ops on armel archs
-9b969ce Add cross compilation support
-1ad567e Add parallel building support for multi{core,processor} systems.
-241e29b CephxProtocol.cc: invalid authorizer data should not crash the osd
-54f7d83 ceph.spec.in: some CentOS fixes
-47abc4f osync: fix hash compares
-4f8efd2 osync: fix s3store iterator
-1065bef pybind: convert to new API
-9db1ecf backtrace: user the proper version header
-07ba8ee libceph: use the proper version header
-f772a16 libceph: pull version from new version define
-55bb9ef configure: no ~
-e7f3df7 use 'git describe' version
-45e88eb librados: rados_ioctx_lookup -> rados_pool_lookup
-0b70fe5 librados: bump minor version number
-87e4aa2 librados: bump minor version number
-624410f librados: rados_ioctx_lookup -> rados_pool_lookup
-a347561 direct_io_test: use mkstmp instead of mkostemps
-4db8801 Makefile: check for new enough version of gtkmm
-1e342b7 osync: remove some debug printout
-033eb9b rgw: dump content length for certain operations
-609b9c0 rgw: handle swift auth requests
-172f0a2 osync: s3 fixes
-2aaf2c6 osync: first version
-6b3baf2 msgr: move test binaries to updated msgr bind/start interface
-acd7d74 msgr: fix start() return value
-601f598 PG,OSD: activate pg during replay
-68a2f46 blobhash: Avoid size_t in templatized hash functions.
-ceb76ba msgr: temp hack to keep nonce unique
-7670b26 msgr: let user explicitly set nonce
-2fb9323 config: whitespace fix
-e7e2bb8 config: fix get_val, set_val
-70d92b7 librados: check whether objecter is initialized before shutting it down
-d7c5c56 rados tool: fix fd leak in import
-2dae8ad objecter: close all sessions when shutdown
-17b98e8 rgw: fix plain formatting
-cd40aab rgw: fix openstack list buckets with plain formatting
-2489469 mds: fix replay of fragment ROLLBACK
-6fa470b common: disable log_per_instance for non-daemons
-cae43fc Makefile: drop libradosgw_a LDFLAGS
-1fbd3a7 mds: resync fragmentation during cache rejoin
-9b52da5 rgw_admin: show '-' if bucket owner doesn't exist (in log)
-32fce3c rados_create: correctly handle null id
-f06f4ee librados: always call keyring_init in connect
-586fc66 librados: don't call keyring_init in init_internal
-9e1828a objecter: make response_data bufferlist static
-251fd50 rados_create_internal calls keyring_init
-c548976 rados_create: set id based on parameter
-b1c3321 librados: add rados_create_internal
-d1cea6f rgw: use rados::init_internal
-c9eccb9 librados: add rados_create_internal
-a70b5a8 filestore: return negative error code if open fails
-a772c8b rgw: merge crypto changes
-3f442f0 init-ceph, mkcephfs: fix $name normalization
-d7f6000 init-ceph: use consistent $type.$id naming
-844093f osd: only update last_epoch_started after all replicas commit peering results
-5d7a12c rgw: explicit case mtime to uint64 before encoding/decoding
-6843a0b rados tool: export bucket
-2319ae1 logging: don't add --debug
-9862afa testlibrbd, testradospp: read default conf file
-abc64b0 logging: --foreground options reorganization
-22241f8 librbd: int -> ssize_t for aio completion wrappers too
-d93c118 librbd: ssize_t return values for read, write
-24342a7 filestore: instrument filestore, journal throughput and throttling
-3ecfbfb filestore: adjust op_queue throttle max during fs commit
-51b9372 testrados: test default conf file location
-4c22c15 librados: add default to rados_conf_read_file
-ca61378 rbd: int -> int64_t on do_export
-174aa56 librbd: use int64_t for read_iterate
-4ee75a8 objecter: fix leak of bufferlist from MPoolOpReply
-58ffd37 rados tool: close dir after reading through
-84b65b5 rados tool: recursively import from dir to pool
-df8c009 cfuse: set proper defaults
-7f4a161 (tag: v0.25.1) v0.25.1
-db25852 cfuse: always daemonize hack
-448010f osd: small pull recovery adjustments
-4046c4b ReplicatedPG,OSD: Track which osds we are pulling from
-a7fba4c vstart.sh: escape " "
-7218b09 radosgw: first authorize user then try to read the acls
-8126621 cpp_strerror: handle negative error code
-52542be librbd: delete block completion in aio_read callback
-2b8ef02 librados: initialize done in C_NotifyComplete
-87056e1 monclient: fix leak of AuthClientHandler
-a94cf48 testlibrbdpp: read conf file and don't double-delete AioCompletion
-c52dc5e vstart: put logging options in daemon sections, not [global]
-d99b5b6 mds: journal fragment rollback events
-d01bd86 librbd: size_t -> uint64_t on internal resize
-9bfdf4b librados: use uint64_t for extent len in extmap
-b468d67 librados: fixup rados_trunc
-1fe9c54 cpp_strerror: handle negative error code
-aed8227 rgw_rest: fix printf format specifier
-e55047d rados: fix map type
-a0e8175 librados: fix size_t -> uint64_t
-66603cf librbd: more off_t and size_t -> uint64_t changes
-610c76d librados: rename statfs to cluster_stat
-1695c0e librados: add statfs to C interface
-fe91760 librbd: uint64_t for image sizes
-b8280df rados, rbd: off_t -> uint64_t
-25fcb6b Revert "librados,librbd: use 64-bit offsets and lengths"
-7744441 logging: disable log_sym_history for non-daemons
-bc5b27a librados: make AioCompletions delete themselves when released
-8acdb91 mds: fix stray anchortable debug spam
-34cf240 buffer: disable buffer alloc tracking by default
-f6f1d63 librbd: delete block completion after it's finished
-3a5b4ef librbd: don't leak rados_completion
-e172de9 librados: Remove OperationOp from WatchCtx
-e1605c8 librados: cleanup RadosClient's objecter instance when destroyed
-7ae5c98 librbd: free RBD::AioCompletion when it's released
-277d8ce rgw: avoid duplicate openstack users
-b63d406 debian: Conflict on earlier -dev packages with sonames.
-b0831f2 rgw_admin: typo
-06d9262 rgw: remove bucket metadata object on bucket delete
-2574968 rgw: configurable prefix for openstack urls
-3fb4fd8 utime: fix operator double() to use the right number of zeros.
-f294b26 librados,librbd: use 64-bit offsets and lengths
-a373a3d mkcephfs: some fixes
-2893187 autoconf: Fix typo that made --without-gtk2 not work.
-5d0fa63 autoconf: Handle --without-debug, --with-debug=junk properly.
-5613e36 autoconf: Handle --without-profiler, --with-profiler=junk properly.
-d1d2e87 debian: add udev rules
-8ec6fff osd: fix osdmap scanning on pg creation
-55f2b31 Destructors for virtual classes should be virtual
-bccffec autoconf: If given --with-gtk2, not finding it is fatal.
-290637f atomic.h: fix "crappy slow implementation"
-367131a auth: Let common_init (or CephCrypto::init) init auth crypto.
-c58b0ab common: Initialize ceph_crypto in common_init.
-a60ac55 ceph_crypto: Implement HMAC-SHA1 wrapper for NSS.
-2921d6b ceph_crypto: Add unittests for the HMAC-SHA1 compatibility shim.
-7e099f9 rgw: Make rgw_main use HMAC-SHA1 via compatibility shim.
-edcf6a0 ceph_crypto: Implement MD5 wrapper for NSS.
-efa2506 ceph_crypto: Add unittests for the MD5 compatibility shim.
-d95367c rgw: Make rgw_op use MD5 via compatibility shim.
-4a93e52 auth: Change header file guard define, to make room for non-auth crypto.
-f81e545 rgw: use random byte generation in auth/Crypto, instead of CryptoPP.
-55ab976 auth: Add a microbenchmark for AES encrypt/decrypt.
-3424e3a auth: Allow using NSS as crypto library.
-dfbb5ea auth: Make error message on bad AES key lenght say the bad length too.
-ff24c82 auth: Use AES IV constant directly, not via local static pointer.
-6cef992 auth: Drop "using namespace", it's almost always used explicitly anyway.
-420289d auth: Add unit tests to check basic crypto sanity.
-e639a93 auth: Removed unused function generate_random_string.
-10b0da9 Add test/osd/RadosModel.h to noinst_HEADERS.
-a2c02d1 autoconf: Complain if libatomic-ops is not found.
-a9afdca autoconf: Complain if tcmalloc is not found.
-5df13bb autoconf: Complain if FUSE is not found.
-5c960e1 osd: wait for handle_osd_map transaction ondisk without doing a full sync
-e731885 osd: avoid setting up_thru on new PGs
-0cc4253 testlibrbdpp: include assert.h
-f9e8380 librados: librados::WatchCtx needs virtual dtor
-435470b osd: CapMap: add virtual dtor to virtual class
-c077d6f crushtool: fix warning seen on i386
-1f57d49 tests: add bufferlist unit test
-4a8400b clitest: Fix tests after osdmaptool --clobber bugfix.
-adaa2f0 rados: Add "stat" option, and fix "put" to work on larger block sizes.
-863ef7c debian: add udev rules
-95db4c5 debian: remove so version from -dev packages
-924adaf filestore: assert on ENOTEMPTY
-00f2dee rgw: can read old buckets format
-d3464af filer: set RMW bit on probe
-0abf2c9 osd: fix peer no missing optimization
-f04b6ad rgw: can turn off logging
-99ef6f6 osd: fix missing.rm()
-62054fd osd: fix merge_log missing calculation at split point when logs diverge
-d0abd58 mkcephfs: modularize
-d1f9e5f osd: fix keyring loading
-5c8146b osdmaptool: don't require clobber to create new osdmap
-8e3abf3 Don't use -i to set id for non-daemons
-33d6251 common: replace -I with -i, rework --name
-79605f5 cauthtool: remove short form of --create-keyring
-a6d0a99 librbd.cc: trim includes
-9f32c50 cram: test --conf=foo cconf syntax
-7fe7a81 common_init: Split common_init into multiple parts
-88063e3 config: trim deadcode
-2bbe83e rgw: escape certain strings in log dump
-d0faba06 rgw: fix acl checking when object does not exist
-c607219 rgw: log also includes the REST operation
-d4d1a8c rgw: get acl explicitly return success
-6a19790 rgw: fix log when object not specified
-8148d69 ConfUtils::_parse: fix uninitialized var
-20c1ffb config: ConfFile::open: return error code
-326cb5c build:add common/entity_name.h to noinst_HEADERS
-8f0fd62 makefile:Suppress hash warning in include/encoding
-c913551 rgw: add logging
-1f12028 Suppress gnu_cxx::hash warning a little bit better
-058b353 config.cc: retab
-cf6b1de uclient: Clear the CEPH_CAP_FILE_BUFFER ref on _flush, if safe.
-dae26c5 common_init: call to ProfilerFlush is unneeded
-e11bf6f Replace g_conf.name and g_conf.id with entityname
-d789d55 makefile: Add -Wno-deprecated
-0d7b953 rgw: cast size_t to unsigned long to fix a 32-bit warning.
-deca678 librbd: cast offset values to uint64_t for unsigned comparison warning.
-b9da5f9 common_init: no signal handlers for library code
-37f1c17 Create common/entity_name.h
-d79d4e3 Add missing includes
-56548b2 mds: use projected subtree in rename anchor check
-67b6187 librados: add append to object
-065b518 osd: document last_epoch_clean caveat
-425570a osd: include all stray peers in might_have_unfound
-67c8b91 buffer.h: push_back,push_front of an empty buffer pointer should be noop
-b533727 libceph: when calling common_init,set library flag
-1cd878b Bump debian/changelog timestamp so it's greater than previous one.
-6ef3b67 Make git ignore stamp files from debian build.
-d97064e Typos.
-468ce23 do_autogen: add -O2 when compiling for profiling
-1b99add tests/cli/osdmaptool: default pg_num changed
-d4e4af1 testlibrbd: signed return types
-8fe0f48 filestore: fix signedness so we can handle errors from safe_pread
-69c7e59 version: fix const warning
-aa251bd safe_io: fix signed/unsigned comparisons
-0cbfbee tests/cli/osdmaptool: default pg_num changed
-7a529d5 crush: remove misleading comment
-46d63d9 crush: fix memory leak
-3fa121b (tag: v0.25) v0.25
-4ac0881 Bump librados soname to 2.
-82282f2 config: back to 6 pg bits for now
-08af63d rgw: put object request returns etag
-c07f357 test_missing_unfound: asdf
-072a4bd rgw: rest put returns with etag on all APIs
-43f6a39 rgw: remove warnings
-2494d59 osd: requeue pg for recovery if we may have found someting
-53428c0 osd: include all up peers in might_have_unfound when desperate
-fbc7370 rgw: openstack HEAD on container responds with metadata
-30c5091 osd: recover_primary if recover_replicas starts no ops
-836f72a osd: discover more missing if unfound and do_recovery can't start anything
-88cc244 do_autogen.sh: add -P option
-3d62938 osd: debug the hell out of heartbeat thread
-964f1e1 Fix test/signals.cc
-ab74d49 librados: cosmetic header changes
-e779a3c librados, librbd: use separate IoCtxs for data and metadata
-37edd47 librbd: fix error message and unnamed constant
-4934329 librbd: change RBD::open to take a reference to an Image instead of a pointer
-fdd50a1 librados: remove unused member of IoCtx
-1de0b27 librados: IoCtx destructor should put reference only if initalized
-2e3b844 librados: can set up object locator
-f45a790 librados:rados_ioctx_stat -> rados_ioctx_pool_stat
-3ebaa4c object_locator: fix clear()
-b2ceb75 librados: use atomic_t for reference count
-6f797af librados: make IoCtxImpl a pointer in WatchContext
-773f003 librados: decrement refcount of old io_ctx_impl in assignment operator
-0e32cd2 librados: fix IoCtx::from_rados_ioctx_t
-ecab94c Rename radios_ioctx_{open,close} to create/destroy
-ae77624 librados: remove IoCtx::close()
-7d06b1b Make git ignore core files.
-7788041 Make git ignore python generated files.
-7d6a4fc librados: Crashed on shutdown if connect was never called.
-b734043 libradoshpp: put ceph stuff in namespace librados
-b97388f librados: don't create unused SnapContext objs
-062dd5e librados: fix copy ctor of ObjectIterator
-46d6214 testrados: add object stat test
-60482f5 testlibrbd: recreate test pool each time
-2a4b0d1 radosgw_admin: change usage, improve uid lookup
-1ed2d8c Fix test/signals.cc
-a6ef907 librados, librbd: use separate IoCtxs for data and metadata
-75f7ea3 librbd: fix error message and unnamed constant
-9bd627d rgw: can show bucket size and count
-8c3133e configure: fix profiler check
-b941cfd common: block SIGPIPE everywhere we can
-3b34e2f messanger: shouldn't throw sigpipe on failed socket
-d1fce13 common: block SIGPIPE everywhere we can
-a41865e messanger: shouldn't throw sigpipe on failed socket
-bb42a71 configure: fix profiler check
-ed01fa1 dout: Log version message when (re)opening log
-82c5f3a Thread: don't mask signals except in library code
-5c668d2 dout: Log version message when (re)opening log
-b37facc msgr: fix typo
-1ad48f1 CDir: Don't write out the header on a partial commit.
-a712664 CDir: pay attention to the max_dir_commit_size!
-f12e1a9 tcmalloc: warn if you try and dump without the profiler running.
-d467fbf mds: rip out rename linkmerge support
-f36e458 tcmalloc: create perfglue handle_command functionality.
-aac1e95 locator: pool id is signed
-3fccc0a qa/workunits: added fsstress.sh
-39d70de osd: drop old ceph_osd_request_head
-6fd6db7 osd: new encoding for MOSDOp when OBJECTLOCATOR feature is present
-71e46d8 osd: add OBJECTLOCATOR protocol feature bit
-3e09e1c encode locator information in osd op
-07bf9b8 tcmalloc: switch the interface.
-5edf58a testradospp: don't try to read /etc/ceph/ceph.conf explicitly
-1a2e2a7 msgr: fix chdir after daemonize
-f76cf9b librbd: change RBD::open to take a reference to an Image instead of a pointer
-64186f9 dout: Reopen dout after parsing all config opts
-bf1ae37 dout: remove g_conf.log_to_file
-5ebd4f8 logging: default to foreground logging
-75e2a07 cmds/cosd: Fix IsHeapProfilerRunning implicit return type cast.
-a616733 mds: drop some dead code
-b6bfa8c mds: fix one rename dentry linkage projection case
-0c87dfd dout: Reopen dout after parsing all config opts
-07b99e8 dout: remove g_conf.log_to_file
-b9224d8 logging: default to foreground logging
-c916905 osd: cache map bufferlists until they are flushed to disk
-d5da4f0 safe_io: fix signed/unsigned comparisons
-74f5bc5 mds: drop some dead code
-49bbe0a mds: fix one rename dentry linkage projection case
-7cd8ac0 osd: trigger discover_all_missing after replay delay
-e55c2a9 osd: handle osd_ping (and ack requests) while !active
-c031e5a CDentry/CDir/CInode: Add comment on use of boost::pool.
-f353f59 osd: simple test for random missing objects during recovery
-0b886a8 librados: remove unused member of IoCtx
-b86461d osd: recovery cleanups, better error messages
-29cb6f8 osd: update missing_loc when infering an empty missing set
-f74593e osd: fix unfound output
-f3bdfc5 osd: add object to missing if we find it missing on disk
-1459234 osd: (semi-)handle case where primary copy isn't there
-5997059 osd: continue recovery after encountering missing objects
-5bc1a33 rgw: Remove unused CGI_PRINTF lines
-3e4cf6f rgw: Remove unused definition of "SERVER_NAME"
-a524c09 rgw: initialize bucket creation time
-fa8fa40 rgw: bucket creation uses tmap for atomic update
-3552c29 debian: remove extra dependencies
-4ed8bec debian: fix libcurl dependency again
-644bcb6 debian: add libcurl dependency
-0a4f4d7 configure: add libcurl dependency for rgw
-e2c1125 Makefile.am: update noinst_HEADERS with new rgw headers
-0bad44a rgw: multiple openstack, rgw_admin fixes
-be6f848 rgw: openstack put object fixes
-4e3ad0c rgw: fix get obj
-fecf37e rgw: openstack: implement some more functionality
-93e56b6 rgw: openstack: list containers, list objects
-543b986 rgw: add missing files
-fc63d97 rgw: can output data in multiple formats
-090a7c0 rgw: move authorization to the specific rest handlers
-d3285d6 rgw: move things around, separate implementations
-fe871d9 rgw: keep openstack user to rgw user mapping
-3428fe3 rgw: verify openstack tokens
-c77c753 rgw: disable cache
-57d0c17 rgw: fix crash
-3e62d8a rgw: add a cache layer for the backend
-866b161 osd: enable cpu_profiler
-7c2e4bf librados: IoCtx destructor should put reference only if initalized
-35c4a9f Thread: don't mask signals except in library code
-9359cb5 Makefile.am: fix for testlibrbdpp
-afbd705 librados: can set up object locator
-f3ff51f librados:rados_ioctx_stat -> rados_ioctx_pool_stat
-26dfe15 object_locator: fix clear()
-7a429d9 profiler: move perftools glue into perfglue/
-18e9b66 do_autogen: add -P (--with-profiler)
-9f95489 mds: cpu profiler hooks
-8636313 add --with-profiler to link in google perftools libprofiler
-a466800 librados: use atomic_t for reference count
-412af3e librados: make IoCtxImpl a pointer in WatchContext
-f013b8a librados: decrement refcount of old io_ctx_impl in assignment operator
-0290074 librados: fix IoCtx::from_rados_ioctx_t
-1f5fca8 Rename radios_ioctx_{open,close} to create/destroy
-d134915 librados: remove IoCtx::close()
-5724807 testrados: add object stat test
-58d60e0 testlibrbd: recreate test pool each time
-f191175 PG: unify scrub_received_maps and peer_scrub_maps
-19bcd74 osd: trigger discover_all_missing after replay delay
-7a2bb8d Make git ignore core files.
-adb6750 Make git ignore python generated files.
-d372c50 librados: Crashed on shutdown if connect was never called.
-dd1bd2c PG: refactor scrubmap comparison and repair logic
-d03bd60 PG: replica_scrub also should not block
-88ced09 PG: make scrub non-blocking
-2adb670 OSD: add scrub_finalize_wq
-03135a3 OSD: activate_map should not do_peer on a replaying pg
-ee53452 osd: handle osd_ping (and ack requests) while !active
-399032c osd: share osd->osdmap with map cache
-c76a4b7 Revert "move g_default_file_layout into ceph_fs.cc"
-8d877ab Add comment to ceph_fs.cc
-70564eb libradoshpp: put ceph stuff in namespace librados
-a66fd3b librados: don't create unused SnapContext objs
-13f6223 librados: fix copy ctor of ObjectIterator
-e7f2972 cconf: fix clitest
-3011349 unittests: remember to use AM_LDFLAGS
-141509c Rename PoolHandle to IoContext: part 2
-78ba46a testlibrbd: call rados_connect
-040e546 pybind/rados: Fix invalid variable references in error paths.
-8c2d572 pybind/rados: Remove unused variable.
-9591729 pybind/rados: version call return type is void.
-32cf5ac FileStore.h: reorder queue operations in _journaled_ahead
-afe2d81 Revert "FileStore: fix OpSequencer::flush error"
-96c2cb5 osd: simplify handle_osd_map flushing and map caching
-74aa684 librados: Rename rados_pool_t to rados_ioctx_t
-8903ea3 testradospp: update for new librados API
-454854e testlibrbdpp: convert to new APIs
-bde6dac test_common.sh: should rm objects before adding
-4937854 rbd: de-globalize rbd, rados, Image
-b654787 librbd, librados: fix my last commits to use the new librados API
-2641a69 librados: add snap_get_stamp to C API
-1526047 testlibrbdpp: initialize pointers
-2cb86f7 librados, librbd: remove selfmanaged_snap_rollback_object
-9758af7 testlibrbdpp: use new librbd api
-f9fe949 rbd: update for librbd api changes
-f54ba07 librbd: tweak C++ API
-06bf77e librados: C++ API rework
-037d662 Update Debian packaging for 0.26~rc.
-8dfffd0 FileStore.h: reorder queue operations in _journaled_ahead
-9570d6e Revert "FileStore: fix OpSequencer::flush error"
-d15fe7f rollback rename
-e3f3177 rbd: use new librbd C++ api
-154a21f librbd: make C++ api nicer
-827c950 v0.26~rc
-7abf87a mds: fix gratuitous map lookup
-d844602 mds: mark_down connections to any failed peers
-3e691d3 mds: fix export cancellation vs nested freezes
-7c66adf filejournal: fix type punning warning, drop unneeded cast
-32c913a Some tweaks for the librados C API
-fa3dee1 librbd, rbd: fill in the rest of image_info_t
-71bbd55 Makefile: fix libatomic_ops linking
-92870d7 mds: remove "N stopped" from short mdsmap summary
-f027b08 mon: include mds gid in logs
-9eb3532 mds,osd: print 'starting ...' message to stdout
-298916b common: only print version to stdout for daemons
-813ae59 mds: add 'exit' command
-0f3fe7f mds: fix frag string rendering
-18305fc mds: strengthen assertions in rejoin ack
-c78b29a FileStore: fix OpSequencer::flush error
-15fa05d mds: print waiter tag in hex
-df7c7bd mds: make frag string rendering simpler
-3b1fa97 mon: fix dup mds takeover
-8d37002 mds: print msg when fragtree updates from journal
-436153e mds: verify frags in more approrpiate places
-f13e6a4 mds: refragment dirs when inode dirfragtree updates from journal
-f6a9261 mds: fix CDir::take_waiting() on dentry waiters
-0fb83f1 More fixes, additions for config API
-efc20c6 Update testrados, rename functions in librados.cc
-3c6736d rados_create: add id parameter
-0f90d15 Fold common_set_defaults into common_init
-5f73086 Splt rados_init into rados_create + rados_connect
-871fa1b Add rados_conf_apply, comments
-0d54e31 md_config_t::set_val/get_val
-21544fd common: more include and copyright fixes
-ebc9dbc common: Fix some missing includes, copyrights
-713f9a1 cconf: remove second argument to cconf --lookup
-29b6439 ceph_common.sh: remove get_val, get_val_bool
-431a5bf Rename config.h -> common/config.h
-f2e3d83 config.cc: doesn't depend on ceph_ver.h
-96eddde testlibrbdpp: update for new librados and librbd APIs
-c5bb735 rbd: update for new librados and librbd APIs
-134f261 librbd: implement stacking on top of librados
-b1d6e30 librados: add constructor to allow client re-use
-15f20f5 librados: switch to noun_verb function names
-b2ceebf librbd: stack on top of librados
-7434659 ReplicatedPG: snap_trimmer should bail out while finalizing_scrub
-4ddc5db OSD,PG: fix race between processing scrub and dequeueing scrub
-89b743c osd: fix recovery pointer when pulling head before snapid
-48f6989 osd: verify object version during push
-e4b8274 osd: improve up_thru request behavior
-4df3643 pybind: update rados python bindings for new API
-0e4e5a5 osd: set correct epoch for up_thru osd->mon request
-158889b PGMap: make osd_full and nearfull ratios configurable.
-950e8c3 librados: more API cleanup; rados_conf_ stubs
-1dc12e3 move g_default_file_layout into ceph_fs.cc
-2de8b7b librados: add cluster handle to C API
-0a96e6a Makefile: include ceph_argsparse.h in dist tarball
-4ffe069 filestore: fix clone_range
-2a59b21 common: Split argument parsing into ceph_argparse
-349cb12 keyring_init: don't print error when explicit key/keyfile is specified
-859aaf7 Revert "keyring_init: g_conf.keyring is not a list"
-2fb6036 keyring_init: g_conf.keyring is not a list
-b96f164 Revert "Makefile.am: remove unused libs from linking with librbd tests and rbd"
-f51040c Clock: remove unused mutex
-a2f0cd0 test: Add new memory tests, move to own subdir.
-654dc79 vstart: remove directories, too.
-eea1f09 OSD: convert waiting_for_pg from hash_map to map.
-935eaf3 PG: remove the object locking stubs and some dead code.
-f49909b PG: convert hash_maps to maps, remove unused.
-5db1e50 debug.h: cleanup includes
-d362874 common: Move hex dump functions into hex.h
-61b661b Makefile: version.cc should depend on ceph_ver
-ef0e07d debug.h: move Ceph version stuff into version.h
-38f38a9 Revert "Makefile.am: remove unused libs from linking with librbd"
-eadc3c8 testlibrbdpp: fix off by one error in read test
-e5db46c Makefile.am: remove unused libs from linking with librbd tests and rbd
-9bbd6c3 Makefile.am: remove unused libs from linking with librbd
-b56cafe pybind/rados: write_full: remove silly extra param
-3e4aaf9 pybind/rados: implement Pool.write_full
-7171cf6 librbd: hold image context lock minimally
-b93be8c pybind/rados: implement Pool::change_auid
-23df5ba pybind/rados: add rados.version
-8be3ad1 pybind/rados: Add Rados.pool_exists
-09e01fa pybind/rados: Snap.name should be a py string
-aeac6a6 pybind/rados: add snapshots
-ae702b3 Add Pool::list_objects
-0a3798e Add pybind-test
-f06604c rados-python bindings: Fix pool deletion a bit
-da41600 mkcephfs: fix premature tmp directory deletion
-0406632 .gitignore: ignore testsnaps
-dfafa9f .gitignore: ignore debian packaging outputs
-fc1ce08 monmaptool: fix command-line output
-651fac6 dout: don't print version when forcing fg logging.
-e4ecddd dout initialization: remove unecessary flush()
-e4054d2 dout: properly output ceph version on opening dout
-5676253 monmaptool: set_foreground_logging
-29b5ae0 simplemessenger: Fix num_threads bug printout.
-03e56b7 msgr: complain if there are > 1 threads, not 1
-e86e4cf init-ceph: use do_cmd for pid_file dir creation
-3b03c5a osd: fix population on unconnected_watchers on obc load
-6fb416b common: thread: get number of threads from /proc
-fec2483 Remove ExportControl (we have better auth now)
-2650468 init-ceph: status: use daemon_is_running
-76667c4 init-ceph: fix status for multi-node clusters
-b0862e3 test/osd: Fix indentation on RadosModel.h and TestSnaps.cc
-28bb6fb testsnaps: add snapshot test
-d496b65 Journaler: add some checks for expire_pos.
-bfe2c3c Journaler: call set_layout after init_headers.
-a9c330e OSD: ignore osd_max_write_size if it's set to 0.
-31a17c6 common/lockdep.cc: don't use dout unlocked
-16cd917 assert: allow assertions inside calls to dout()
-3736192 dout: Convert _dout_lock to plain pthread_mutex_t
-1543d36 assert.cc: some cleanup
-dd21803 common/debug.h: use std::string rather than string
-65bb14f common: Remove common/tls.cc
-db188f0 dout: use DoutLocker rather than Mutex::Locker
-a7b8e9c os/FileStore: use derr/dendl for dout locking
-e7b584f os/FileStore: use ceph_abort rather than abort
-97809ee lockdep: balance dout and dendl, fix whitespace
-4ee35b0 Journaler: fix bad assert.
-da69669 testlibrbd: fix printf args
-4f4306e common: create dout_emergency interface and use it
-6a80064 cfuse: use safe_read and check return value
-81beac5 testlibrbd: check return values
-a930c7a debian: add python, python-dev build-deps
-940d58d msgr: clean up Pipe::queue_received locking
-25c71ea MDCache: switch CDir::_commit so that it can limit max write size.
-4328a55 MDCache: add max_dir_commit_size.
-74c4d86 MDS: Don't always _commit_full just because we have a complete dir.
-b7d1d05 objecter: set linger op target pg when a linger is resent
-7e1ebd7 Disable lockdep for ExportControl, ConfFile locks
-3129581 MDCache: switch CDir::_commit so that it can limit max write size.
-12e14f7 MDCache: add max_dir_commit_size.
-fa4a923 MDS: Don't always _commit_full just because we have a complete dir.
-b7de2fd .gitignore: py-compile
-cd85992 librados: include headers in dist tarball
-0c97d79 ceph.spec.in: add librbd
-e21034e Make git ignore librbd tests.
-27a7b5a ceph: add --concise flag
-09c019b monclient: fix weirdness when we explicitly start with non-master mon
-f70d904 config: Remove g_conf.num_osd, num_mds, num_mon
-718c42b Make git ignore qa/workunits/direct_io_test.
-8a1906a MonitorStore: check for ENOENT, not EEXIST
-a350296 common: bufferlist::read_file: use safe_read
-d431295 auth/Crypto.cc: use safe_read_exact
-22dece1 os/FileStore: remove unused variable
-2cd2c56 (tag: v0.24.3) v0.24.3
-b60444b make:add messages/MOSDRepScrub.h to NOINST_HEADERS
-c695a61 cephtool: get_indata should use safe_read_exact
-378ba0a mon/MonitorStore.cc: use safe_read
-42b735c rados.cc: use fwrite to output data to stdout
-c7886ba common/common_init: use safe_read
-e5fbf5e os/FileStore: fix error handling
-12a47f5 s3.sh: simple bug fix
-1021f5e rados: add create op
-ff85407 common/DoutStreambuf: use safe_io.h
-2aabb90 tools/common: use fwrite to write stdout
-70a8b62 osd: write_meta/read_meta: fix error handling
-5987400 msgr: better error checking for write_pid_file
-635c535 os/FileStore.cc: use safe_write
-c3f0f09 common/buffer.cc: kill deadcode
-0d4244d common/ConfUtils.cc: use safe_write
-d249194 MonitorStore::put_int: handle I/O errors
-56943de common/safe_io.h: warn about unchecked returns
-e8ac5aa cfuse.cc: use safe_write
-4a4c2ee mds/Dumper: use safe_write
-ea80a06 btrfs_ioc_test.c: use safe_write
-cd2a2d7 test_disk_bw.cc: use safe_write
-4de7fd4 common: safe_io: allow C files to include safe_io
-84b9089 client/fuse_ll: use safe_write
-b161e6a os: convert some read/write uses to safe variants
-a743e31 common:safe_io: create exact and non-exact variant
-380ccfd common: safe_io: handle EOF on read
-500edf7 rbd: fix signed/unsigned comp on i386
-a476cce Removing files that look completely unused.
-8f43d4e osd: avoid message leak in error path
-5d3a129 config: fix -f option settings.
-af755be filestore: fix fiemap
-65560ef testlibrbd: change strcmp to memcmp, other stuff
-82f5989 librbd: use watch/notify internally to keep ImageCtx updated
-ec01b30 librbd: add C++ interface tests
-e26b194 librbd: fully specify std::string in list function
-f7475de dout: don't print time to syslog
-061b8d9 pybind/rados: expand on error handling a bit
-8284b6b Add python bindings for rados
-820d1a7 On i386, pthread ids are 8 hexdigits. Adjust cli tests.
-fe298fc msg/SimpleMessenger.c: fix signed/unsigned compare
-76fd853 os/FileStore: fix signed/unsigned comparison warn
-af77fa4 os/FileJournal: compare like types in MAX()
-2ca337d tools/gui.cc: fix signed/unsigned comparison
-eb20de4 rbd: fix watch tool
-1ce2a55 rbd: modify watch
-5d7f482 librbd: fix completion cb mixup
-778902b make:add messages/MOSDRepScrub.h to NOINST_HEADERS
-cc525b3 osd: discard scrub reply if pg changed
-a948aa1 osd: avoid map_lock for scrub_map reply
-36097c3 osd: never rewrite log after {advance,activate}_map
-3055d09 osd: always write backlog after creation
-19afe11 osd: fix no missing inferance
-7d5fc1a common_init: don't force profiling_logger = true
-c0416af common: Rename Logger to ProfilingLogger
-2315759 common: combine set_fg_logging into common_init
-0b862ec gitignore: ignore massif.out.*
-e028cc4 config: kill more unused options
-7d3e8af cfuse: remove high level fuse interface
-4162920 PG: remove sub_op_scrub
-212f977 PG: switch _request_scrub_map to send MOSDRepScrub
-03c7b06 OSD: Adds handler for MOSDRepScrub
-aed279e PG: added replica_scrub
-cb4fcfe OSD: Add rep_scrub_wq
-4cab203 rados: Adds CEPH_OSD_OP_SCRUB_MAP sub op
-7245b6a MOSDRepScrub: Adds a message for initiating a replica scrub
-ea3266b librbd: change tests to use new rbd_list and rbd_list_snaps interface
-022faca librbd: depends on librados
-6ce5e88 librbd, librados: cleanup
-d3e6222 librbd: modify rbd_list() interface
-e7312bd librbd: modify list_snaps C interface
-e40bb79 librbd: check aio return values in tests
-6a5c26a librbd: remove redundant casting in C aio completion functions
-52f0945 librbd: add C api I/O tests
-654a1f8 librbd: finish C I/O api
-78c856c librbd: change bufferlist namespace
-e8238bd rbd: revert to the old(er) export implementation
-23426fc librbd: fix aio_read
-b43a52c librbd: aio_read, still buggy
-0d870c4 librbd: add C version of get_rados_pools
-f1d5f1c librbd: add rbd prefix to C version of set_snap
-4220598 librbd: add set_snap and I/O to the C API
-5e1e362 librbd: use RBDClient directly in the C interface
-18c3189 librados, librbd, radosacl: use new include paths
-93d32c6 rados, rbd: move include files to their own directories
-9bb5b55 librbd: Install the headers in the development package
-c4ddbaf librbd: aio write
-a2109d4 librbd: convert to dout
-88a004a librbd: use a pointer instead of a globally constructed RBD instance in the C API
-7aefb32 librbd: initialize order in C API test
-8dd2500 rbd: dynamically link with librbd
-4994174 librbd: re-read image header in get_snapc, and call it after snap create and remove
-6de5908 librbd: remove unnecessary argument to trim_image
-9b9a3c0 librbd: store snapshot names in image context and use them when listing snaps
-f18c721 librbd: add packages for librbd
-78fe393 librbd: update C interface and tests to use image contexts
-0d8bcb1 rbd: fix misc problems
-a411c00 librbd: synchronous read and write functions
-2ac597a librbd: use helper to set ImageCtx snapid
-74b5e97 rbd: use updated interface with image_t
-ccb8659 librbd: use snapshot metadata from ImageCtx insead of refetching it on each call
-014ecb8 librbd: remove pool_t parameter from some api calls
-b443b7a librbd: remove set_assert_version on resize
-747a5ac librbd: make ImageCtx stuff compile and remove it from remove/copy/rename
-9942287 librbd: add ImageCtx and open/close image
-58776ba librbd: implement some more functionality
-691d23f librbd: update C interface and tests
-92a03de librbd: return 0 on success in open_pools
-3e9c183 librbd: remove do_ prefix from RBDClient methods
-3ebefaf librbd: pre-declare RBDClient to avoid a bunch of casts
-36c0c10 rbd: get it compiled with updated librbd
-b93ddac librbd: make it compile
-591fe95 librbd: modify interface a bit
-a5362c5 rbd: update the command line rbd tool to use librbd
-bd3d484 librbd: add tests for the C api
-41036c0 librbd: initial implementation created from rbd.cc
-e531ecd common: call closelog before openlog
-6ad4d10 vstart.sh: -k doesn't take an argument
-7e07ee0 config: call openlog to set ident
-eb9e619 dout: force reopen after conf read, fg logging set
-aa8a255 mkcephfs: fix bug in multi-node setups
-0711599 safe_io: move to C
-9a44295 ceph: use new safe_read wrapper
-79983c2 add safe_{read/write} wrappers
-6799b86 build_debian_image: include bind9-host
-56e4aa4 build_debian_image: fixes
-6bf53f1 filejournal: fix return code check
-be8cdb0 qa: test for proper i_complete handling
-8019878 build_debian_image: include libcrypto++ (need for runtime)
-2635a3b kernel console debug output setup scripts
-b5f7592 script: add script to build uml images
-390786e remove old script
-652fc3f remove ancient web content
-d7af210 mon: ignore mds boot messages with zeroed port
-5a50d33 client: more carefully gaurd local cache truncate
-5b754cb msgr: make remove_pid_file fail silently if nothing to remove
-f77c889 remove ancient mds_local_osd option
-d5fced1 fakemessenger: remove fakemessenger and related dead code
-0797b53 clock: remove tare function
-ffd95ee config: remove (most) unused options
-865d5cf client: set lru midpoint
-f975fde logger: don't calculate variance by default
-bd7a043 msgr: check return values
-6c47bde msgr: check return values for write_pid_file
-ff0e57d msgr: SimpleMessenger::start: fix unchecked return
-a454f23 msgr: remove deadcode, warnings
-4b1d86c msgr: remove_pid_file: fix unchecked returns
-e58c371 os: FileJournal::do_write: fix error handling
-b75846e filestore: handle read_op_seq errors
-f54b793 osd: Return error code when a write is too large.
-e22be43 config: add new osd_max_write_size option.
-a2abe5f assert.h: Add ceph_abort
-23d733a os: _check_disk_write_cache: fix error handling
-712f589 cmds: check return code of chdir
-cf1b969 unittest_encoding: build without -fstrict-aliasing
-b5d2751 FileStore::mount: fix error handling
-e1df71f os: fix zeroing first chunk of FileJournal
-f45d556 os: FileStore::mkjournal: fix error handling
-b1196b8 os: FileJournal::create: fix error handling
-38877bb cmon: check return code of chdir
-5be24ee tools/common: EINTR/unchecked return fix
-00bd2cb rados: fix pedantic gcc warning on writing stdout
-c956ee2 filejournal: fix unchecked returns, modularize
-e49dced signal: fix redefine warnings
-400813c ReplicatedPG: snap_trimmer fix leaked lock
-7a02070 ReplicatedPG:snap_trimmer should return if !clean or !active or !primary
-1778892 cosd: check chdir return code
-2daa45e osd: Ager: remove Ebofs leftovers
-5286675 Add do_autogen.sh
-09c38e8 mkcephfs: clean up temp files, honor $TEMPDIR
-b780b91 filer: fix probe
-87c022c client/fuse_ll.c: const cleanup
-5f18f20 Revert "client/fuse_ll: fully initialize callback struct"
-f0059c2 Revert "client/fuse.cc: explicity zero fuse function ptrs"
-5e6f556 filestore: fix wipe_subvol the rest of the way
-9fd1ae4 filestore: fix (part of) wipe_subvol
-c110812 msgr: add nonce parsing to entity_addr_t::parse()
-6d1f358 os: FileStore::wipe_subvol: fix removing old dir
-92ded7e cosd.cc: better error message if osd->init fails
-af9bc4f auth/ExportControl: fix allow_def leak
-18d882b mds: make SETDIRLAYOUT start with ancestor policy
-02ce734 MonMap: add,remove,contains can take const references
-88313ee SimpleMessenger: learned_addr can take a const ref
-7b43f6b mds: handle_client_setdirlayout: init fl_pg_pool
-8961ce6 librados: print out errs in do_import, check EINTR
-ff64562 include/utime.h: avoid comparing float with 0
-0bcbe7c crush: eliminate signed/unsigned comparisons
-38b5001 client/fuse.cc: explicity zero fuse function ptrs
-e983784 mount.ceph: put static at the beginning of decl
-8b283ff tools/gui.cc: remove empty else statement
-e533a56 mon/OSDMonitor: don't check if unsigned < 0
-7e4cec3 osd/OSD: remove always-true assert
-0c977e8 const-ify some unchanging static structs
-e7e4c44 rgw/rgw_rest.cc: fix uninitialized static struct
-800507e osdc/Filer: assert(0) on stat error
-516ac99 client/fuse_ll: fully initialize callback struct
-e0be4b5 mds/locks: fully initialize lock states
-81c173b osdc/ObjectCacher.h: don't assert unsigned >= 0
-5684a7e Client::readdir_r_cb: fix "always returns true"cmp
-e251f51 direct_io_test: fix signed/unsigned, printf flags
-f4f066b src/config.cc: fully initialize g_default_file_layout
-fa18b74 crush/builder.c: fix signed/unsigned confusion
-c9f4060 include/buffer.h:unsigned variables are always >=0
-e3fe2db RGW: RGW::GetObj - signed/unsigned bug
-960cd6d RGW: fix ret in RGWCopyObj::init_common
-10ceea9 RGW: fix shadowed variable error
-763fb13 RGW: get_service_secret returns a bool, not an int
-d47789d RBD.cc: pread returns a signed value
-4587f1f mount.ceph: option parsing fix
-2b9cb24 Fix base64-decoding when input ends in newline.
-acf40be Fix inner loop index variable. i and j are too close together ;)
-c7ac6f9 osd: Fix compile-time warning.
-cef3ce8 mds: Remove unused variable.
-0b7174f rados: Make rados tool "put" objects in chunks.
-0b166c3 mds: Remove redundant cap suppression code.
-0972202 Speling fixes
-eb3f65a Improve mount.ceph.8
-471b189 monitorstore: check return values
-8ebcc80 mds: check return values in dumper
-cb897a5 confutils: check return values
-05f2658 os: use scoped variables for fds
-a4781df test: add test_csyn
-2faf6a0 csyn: implement localize_reads cmdline option
-e603015 osd: change unfound handling when using localize
-a4c9bdf Hadoop: set localize_reads
-7912f5c cfuse: add --localize-reads argument
-087d415 libceph: iface for CEPH_OSD_FLAG_LOCALIZE_READS
-e165f8e objecter: implement FLAG_LOCALIZE_READS
-a28dbc9 objecter: send read to random replica if BALANCE_READS flag is set
-ece4f61 FileStore: fix double close
-06fe132 FileStore: fix double close
-16ffcf7 common: config.cc: use "admin" as the default id
-ffd549b common: move init_g_conf into md_config_t ctor
-196b817 common: config.cc: whitespace cleanup
-a437532 common: config.cc: de-globalize g_fake_kill_after
-6a03ffb common: config.cc: de-globalize show_config
-68f929a common: clean up g_conf.id initialization a bit
-4380920 common: remove ceph_set_default_id
-49e238b FileStore: fix error handling for mkfs, umount
-79ed51f mds: make --dump-journal preserve offset
-2373972 gitignore: ignore eclipse metadata
-a45e8f2 remove ancient active/ stuff
-f271333 osd: don't leak fd on error
-4d50af7 crypto: don't clobber errno
-0f3198e OSD: update_osd_stat take heartbeat_lock
-cf59cdf mds: skip a few more inodes during journal reset
-e405d4a mds: implement journal reset
-f8f2cae mds: open mydir (along w/ root) inode from boot_start()
-14c669c Locker: Drop loner correctly!
-9b42e8e Locker: Drop loner correctly!
-04728b8 librados: fix C interface const, too.
-9e4325b mds: defer sending resolves until mdsmap.failed.empty()
-f711508 mds: defer sending resolves until mdsmap.failed.empty()
-aed862b mds: standardize option parsing
-334a756 common: _dout_lock: initialize _dout_lock first
-02408ec config: remove dead stringtable cruft
-e373d95 common: Put debug.cc last in linking order
-2a266bd os: FileStore: Add commit timeout
-eda48fa rbd: Rados::init: clean up after failure
-ba5cbb3 os: FileStore: ctor should init all class vars
-184048c os: FileStore: remove default param
-1ea8f2b os:FileStore:use std::string rather than huge bufs
-3544274 osd: fix mutual exclusion for _dispatch
-adffe53 units: add signals unit test
-bb72d95 mds: cluster_fail instead of reset_cluster
-e59007c mon: add mdsmap DOWN flag to prevent mdsmap updates
-c3d4014 mdsmap: add flags
-9ebd773 mon: add 'mds reset_cluster' command
-73e7672 .gitignore: vstart generated files
-0c2ec2d vstart: put tmp files in /tmp
-fbcf669 osd: preserve ordering when ops are requeued
-7d65f6e osd: restart if the osdmap client, heartbeat, OR cluster addrs don't match
-47dc27a osd: avoid extraneous send_boot() calls
-fce3c8d test_unfound.sh: kill cosds rather than mark out
-6685bae disable scrubs during test_unfound
-561224e librados: Remove rados_pool_t& usage, and pointless consts.
-8aff0dd mon: implement PGMonitor::get_health
-5c5408b mon: OSDMonitor::get_health: const cleanup
-23a7e88 mon: MonitorStore::mkfs: use run_cmd
-9ecd5fe os: FileStore: use run_cmd instead of system
-b68e121 common: Add run_cmd
-ba998f0 ReplicatedPG: _rollback_to fix the just cloned condition
-81c0ec1 mon: remove PGMap::pg_set
-b17de79 mon: PGMap::apply_incremental must maintain pg_set
-5beec0b os: readdir_r: read into PATH_MAX-sized buf
-f19ef8e dumper: rework slightly to prevent incorrect usage of g_conf.id.
-bc98a0f MDSMonitor: fix bugs with standby-replay assignment.
-0fbbbad os: FileStore::mkfs error handling fixes
-212289f vstart: Add --standby_mds setting, for auto-creating standby-replays.
-58637ac debian: fix publish.sh for ubuntu
-f7572de (tag: v0.24.2) v0.24.2
-4a49a87 msgr: make connection pipe reset atomic
-3a30eb7 msgr: include con in debug output
-943fd14 filestore: don't wait min sync interval on explicit sync()
-f4a07df MDSMonitor: Don't create new map for standby-replay spam.
-785c498 MDSMonitor: remove unused code.
-1b45088 MDSMonitor: be more conservative with use of pending_mdsmap.
-a9824b0 MDS: MDSMonitor: Make MDS set standby-replay preferences, not MDSMonitor.
-69447f7 man: Update cmds manual.
-76fbdf1 MDSMap: Update/fix print function.
-74ce6e1 MDSMonitor: On restarting MDSes; set to standby-replay if appropriate.
-95ed2e4 MDSMonitor: Try to assign unassigned standby-replay MDSes during tick()
-b7bc471 MDSMap: split up find_standby_for into multiple functions.
-cc207ca MDSMonitor: Adjust handling of MDSes asking for standby-replay.
-54bdac7 mds: Adjust replay state changes and options parsing.
-ea2266d os: fix minor typo in function defs
-6b4ee9e os: fix some obvious error handling problems
-ffb208e Makefile: use new Spirit headers where available
-76a1e09 Makefile: remove unecessary header check
-017495d Makefile: use CXXFLAGS more consistently
-a2a7d03 test: Add test_rw
-a139b24 messages: Let MMDSBeacon set_standby_for_name from a c-string.
-28d08f2 config: add new mds_standby options.
-4b60223 mds: Keep journaler in readonly mode until replay completes.
-785bf0f ReplicatedPG: fix snap_trimmer log version bug
-3e4a82e FileJournal: don't overflow the journal size.
-de013c2 msgr: don't need to reinstall signals after daemon
-444e930 mds: respawn must unblock signals before exec
-59e8e16 common: move signal blocking into signal.cc
-ba000d9 common: add signal_mask_to_str
-aaed6eb msgr: always start reaper
-027335a monclient: fix locking
-78e31f1 mds: respawn must unblock signals before exec
-f2ce966 common: move signal blocking into signal.cc
-a01bc97 common: add signal_mask_to_str
-3b6ce33 units: RandomRoundTrips: fix endptr for buffer
-942eb0e workunits: direct_io_test: fix error message
-6a20b83 workunits: direct_io_test: add cmdline options
-42709d1 workunits: direct_io_test: test more iterations
-f1d7af9 workunits: add direct_io_test
-6c85b10 common: pthread_cond_signal: don't need lock
-715bbca init-ceph: more verbose status
-ad8951a signals: signal.cc: trim includes
-189cf33 common: re-install sighandlers after daemon()
-6041302 common: move signal handler stuff into signal.cc
-ba57520 signals: signal.cc: trim includes
-f33a33e mds: store migrator lock set over course of export
-48ebab6 ReplicatedPG.cc: fix snap_trimmer object context error
-d1b85e0 ReplicatedPG.cc: update coi version and prior_version to match log
-e6b9731 ReplicatedPG.cc: fix use of potentially invalid pointer
-4e3a4e2 ReplicatedPG,PG,OSD: snap_trimmer should run only when the PG is clean
-79c5dc9 mds: use direct replay test when deciding whether to rebalance.
-8e77b35 test: add new unit test "gather" for C_Gather.
-820c54f common: re-install sighandlers after daemon()
-2f72156 common: move signal handler stuff into signal.cc
-35ef7bc signals: handle_fatal_signal: use SA_NODEFER
-3326b75 signals: backtrace some more exotic fatal signals
-22e2061 signals: Handle SIGILL, SIGBUS, SIGFPE.
-457e3e0 mds: fix journaling of root default_file_layout
-047ed15 cephtool: handle init failures correctly
-b13efe2 cephtool: fix usage a bit
-1b46b0d common: fix common_usage a bit
-6152f52 mon: remove rank from failed when taking over for failed node
-e45d859 mds: kick discovers when peers enter active|clientreplay|rejoin
-e276683 mon: fix 'ceph mds fail <N>' command
-7e99efc PG: fix adjust_local_snaps bug
-d69e5f5 units: base64 should test more round-trips
-88530e1 units: better names for the base64 test
-219a1c1 units: don't need -lcrypto
-08110f1 mon: Allow ceph mds fail <name>
-e5b7869 health: fix health display for MDSes
-93a729f mds: add comment explaining MDSMap::max_mds
-9077fa5 automake: check for libedit
-c8d1029 osd: avoid polluting peer_info with acting[0]
-546d65f osd: make misdirected request warnings specify osdmap epoch
-b9b8d7c vstart: set pgp_bits to a sane value
-0a3eec1 osd: disallow pgp_num > pg_num on osdmap creation
-fcab5e8 Revert "objecter: use raw_pg_to_pg when needed"
-7e3d2ae mon: make 'pg map <pgid>' output more explicit
-afefd73 osd: rebind heartbeat_messenger (with cluster one) when wrongly marked down
-d27a0aa messenger: let rebind() avoid multiple ports
-818fa33 osd: drop messages from before we moved back to boot state
-ace8ef9 Make non-runnable source files not have execute bit set.
-3c656ad Make run-cli-tests not abort on first failure.
-fa7e469 Make clitests avoid existing ceph.conf files.
-ba4de2e Add TODO note for cauthtool -c conflict.
-886c7d3 Command line -c should still override CEPH_CONF from env.
-5a0bc6b Sanitize environment before running clitests.
-0c6fb52 cfuse: fix crash when bad address provided
-7d7af85 auth: new rotating secret ttl should depend on now() + ttl
-a90329a Revert "unit tests: do standard ceph init before tests"
-0259e57 Make git ignore *.t.err files generated by clitests.
-bdc1e26 Make git ignore more generated files in src/gtest.
-dab99b0 Patch cram so it is able to write *.err files outside the source tree.
-95d7d6e Clean up test virtualenv on "make clean".
-a549955 Include the cli tests in a dist tarball.
-58f6d09 Also distribute pre-downloaded tarballs.
-5045695 Teach run-cli-tests about build dirs.
-4385aa5 MDS: Use new C_Gather::get_num_remaining() in MDCache.
-a93b970 C_Gather: Set debug #ifdefs to remove set.
-55cf6ba C_Gather: Rewrite for thread safety.
-b0fc2ca Rename variable in run-cli-tests.
-f599b0b run-cli-tests is in srcdir not in build dir.
-d8073c8 Include run-cli-tests in release tarball.
-5f239fa Fix clitests for cconf usage change.
-29825c7 mds: call MonClient::shutdown when doing a journal dump.
-62d9de4 Fix clitests for cauthtool usage change.
-1d7460a Plaintext keyring format is supposed to be user-friendly, so test it.
-0d0e03e Now that cauthtool has two kinds of keyrings, test them both.
-67bec9c Fix a bug where "cauthtool --create-keyring" (no --bin) wrote garbage.
-1bae352 os: don't crash on no-journal case
-c85d5ea common: Add CEPH_CONF override
-77f9097 unit tests: do standard ceph init before tests
-512cc97 qa: Add tiobench test
-9af160c mon: Implement reweight-by-utilization
-97b8eeb mon: some PGMap cleanups
-6f36e9f osd: adjust_osd_weights: small const cleanup
-08caffe vstart.sh: don't depend on /usr/bin/host
-3f4434f mds: use common helper to journal a client session close
-6d0dc4b mds: tolerate (with warning) replayed op with bad prealloc_inos
-8633712 mds: improve debug output on ESession journal replay
-b60ef3a OSD,ReplicatedPG: Do not run snap_trimmer while the pg is degraded
-ef8a60f cconf: fix usage parsing, add --resolve search
-cfae10b keyring: default keyring file name is 'keyring'
-58a0f38 cauthtool: default keyring format is plaintext, add --bin
-2b2d52c config: keyring uses a search path again
-1b3ed03 ReplicatedPG: snap_trimmer skip removed snaps without collections
-6e610a9 OSD: _pg_process_info refactor to use adjust_local_snaps
-cd3b35a PG: added adjust_local_snaps, activate now checks local collections
-cf39db2 PG: change snap_collections to an interval_set
-f2755a5 PG: activate should not enqueue snap_trimmer on a replica
-e060d7a filejournal: rewrite completion handling, fix ordering on full->notfull
-34adf36 common: fix buffer::list::decode_base64
-62024d0 qa: add xattr check
-1869ffc Fix confusing comment about gtest automake hookup.
-4b2ffba unit: add IncorrectBase64Encoding test
-e7153f3 unit: Add test/base64.cc
-983e62c Add a target to build but not run unittests.
-1cdb01b ReplicatedPG: Fix oi.size bug in _rollback_to
-9c80239 ReplicatedPG: register_object_context and register_snapset_context cleanup
-688bdca Fix src/test/run-cli-tests to work with any cwd.
-8f327d1 ReplicatedPG: snap_trimmer work around
-903ed4a Adjust clitests after cauthtool changes.
-f3bfbda Adjust clitests after cauthtool changes.
-d3505a3 Fix osdmaptool error reporting.
-838ebdd uclient: Switch how inodes link to dentries a bit.
-735eb40 auth: change the plaintext keyring format
-0568bee Revert "client: Remove the I_COMPLETE flag from the parent directory in relink_inode."
-70f3c2c conf: ConfFile can parse bufferlists
-3a822d6 osd: avoid creating some temporary coll_t objects
-6fedbf8 osd: de-globalize PG::oldest_update
-039aa1e osd: clean up loop in proc_replica_log
-62a5c20 osd: remove unused PG global
-095574b osd: call prior_set_affected only if we have one
-cf54bd8 osd: prevent PG objects from being copied
-540f42c osd: Put all prior_set fields into a struct
-fad0972 Remove outdated TODO note.
-f4a0c2f Add CLI tests for osdmaptool and friends.
-9a5a7fe Git ignored files cleanup.
-61bd155 osd: OSD::queue_pg_for_deletion: avoid double del
-27f172f osd: OSD::queue_pg_for_deletion: avoid double del
-6e6c22e mds: avoid double-pinning stray inodes
-83d3fb2 debian: make update_pbuilder.sh a bit smarter
-e9a70f1 keyring: can parse plain text keyring files
-e189222 ReplicatedPG: Fix bug in rollback
-1229af5 Port encoding tests over to gtest.
-9b0d577 Use Google Test framework for unit tests.
-1a9ef3f Make git ignore generated files.
-1846355 os: don't crash on no-journal case
-630565f3 (tag: v0.24.1) v0.24.1
-eace439 test_split.sh: add many_pools test
-a64ddbb ReplicatedPG: get_object_context ssc refcount leak
-fde4b97 mds: fix _dout_lock recursion recursion
-e6ee6c4 mds: take rdlocks on bounding dftlocks; clean up migrator lock code
-63125ad mds: make thrash_exports select random frags
-7f357cf mds: force dirfrag fragmention when replaying metablob
-d2dbe9e ReplicatedPG: register_object_context and register_snapset_context cleanup
-2da3ac1 librados: check for initialization before doing certain operations
-7b20c29 librados: fix api declaration
-baae4bc librados: add rados->version, include librados.h from .hpp
-a342477 librados-config: add man page
-98105ad librados-config: added a command line tool to dump librados version
-8665370 ReplicatedPG: clone_overlap should contain one entry per clone
-2a7aad1 osd: Create all_osds_die test
-494b812 mon: mark osds down for not sending MOSDPGStat
-396dce9 mon: Always forward the PGStats to the leader
-fc032af osd: Introduce osd_mon_report_interval_max
-5947769 mon: don't allow Monitor to be copied
-668c0d9 mon: remove obsolete comment
-a942071 osd: Rename osd_mon_report_interval
-3a4afd9 mon: Introduce Monitor::leader_since
-3df2374 mds: Add is_any_replay() method and fill it in as appropriate.
-8dbe529 librados: add library api versioning
-b0676cb journaler: delete Contexts on finish() in new functions.
-60a4189 mdcache: change replay trimming a bit.
-cd4cd01 MDS: rename replay Contexts -- they were ambiguous at best.
-7472806 MDS: add gids to the logger file names.
-8d88f3b mdlog: return EAGAIN if replay falls off the tail of the journal.
-bf0675f journaler: Add init_headers function, call when reading head off disk.
-ff7340a mds: After probing the journal, reset if we've fallen behind.
-b8b172d MDS: make standby_trim_segments functional. Hurray, hot standbys work!
-8ca291c mdlog: Add some helper functions for accessing segments map data.
-ae4dda4 mdcache: adjust trim() to handle running during standby-replay.
-d14c7dd elist: add a clear_list function.
-f84a090 lru: change control flow and an assert to keep purpose clearer.
-7561f80 MDSMonitor: Remove STATE_ONESHOT_REPLAY from takeover logic in tick().
-92824b6 MDSMonitor: Do not set the rank of an MDS in standby-replay or oneshot-replay modes.
-3f5371c MDS: MDSMonitor: if MDS is in standby-replay and its leader goes down, take over as the MDS!
-b9aaa11 MDLog: don't change expire_pos or read_pos on replay.
-3cb8c08 Journaler: Remove the unused read_pos field.
-71f6a08 MDS: miscellaneous standby-replay fixes and cleanups.
-7dcbfb8 MDS: make use of the hooks to start standby-replay.
-d55a657 osd, rados: pgls filter cleanups
-cfd87ce objecter: use raw_pg_to_pg when needed
-a8a7e73 MDS: Implement the hooks for standby_replay.
-87e40c0 journaler: add reread_head_and_probe function.
-6337842 mds: add expire_pos to the ESubtreeMap.
-e30cbaa mds: extend the use of uint64_t instead of (signed) loff_t, et al.
-02d4640 mds: rename is_standby_replay() to is_oneshot_replay. This better represents its current purpose.
-cc0eef4 mds: Create new STATE_ONESHOT_REPLAY for the MDS.
-a34a0cf Journaler: make reprobe() an asynchronous function.
-8da26fd Journaler: make reread_head an asynchronous function.
-c9e1f99 Journaler: redefine states to make them all unique.
-18d89d1 Journaler: Set the privacy of new functions correctly.
-14829c4 Journaler: use uint64_6 instead of int64_t.
-fb074f4 Journaler: Add function reprobe, to search for the new end of log.
-cfd839d Journaler: Add reset() function, which returns it to the immediate post-ctor state
-9359791 Journaler: Add a read-only setting, and asserts to make it fail on writes if readonly.
-25d6576 Journaler: add new reread_head function and state.
-8de5681 Journaler: remove unused vector<snapid_t> snaps from recover().
-e1675f3 Journaler: set state to STATE_ACTIVE in _finish_probe_end.
-4f15b8f objecter, librados: propagate extra pgls info to client
-d386ea2 common: dout_create_rank_symlink: init if needed
-1f3b9c6 mds: remove stray reference& in FragmentMarking context
-17bc293 mds: change refragment journaling/store strategy
-d1d26a5 mds: make adjust_dir_fragments always adjust fragtree
-21d49d9 mds: fix can_authpin assert on post-fragment commit
-15c5e0c mds: add mds_debug_frag option
-2d781ff osd, rados: pgls filter fixes
-8adaa04 common: make command-line programs log to stderr
-bba356b rgw_admin: call common_set_defaults as non-daemon
-f377168 debian: update scripts to build ubuntu (maverick, lucid) packages too
-6dce7b0 mds: move flock types into separate header
-4b2ba49 rados tool: Remove duplicate line in usage
-065e2ac common: generic_dout needs to take the dout mutex
-c46d8d5 osd: add pgls filtering by parent ino
-edd5686 common: handle_fatal_signal: print threadid in hex
-4a1c1b4 mds: fix ancestor backtrace encoding
-3d04d96 mds: force fragmentation for ambiguous imports as well
-a5f9a36 mds: make resolve adjust dir fragmentation as needed
-4c53c72 mds: make get_dirfrags_under behave when dirfragtree is not coherent with dirfrag set
-f66d472 frag: const cleanup fragset_t
-1b0bb7a osd, objecter: pgls filtering option
-fab6139 PG: Fixes bug in _scrub with checking clones
-8f10424 osd: set default pg_bits higher; pgp_bits to old value
-aafb79c assert: print thread id in hex
-4a4a1e5 PG: Fix bug in scrub when checking clone sizes
-3d4e1d9 client: fix frag selection code
-062c4cc vstart.sh: specify keyring in ceph.conf
-d257810 remove ancient uofs.h
-9befd1e mkcephfs: Clarified numosd message
-6c73da0 mds: assert no submit_entry during replay state
-88c445b mds: start new log segment resolve start, not replay finish
-462cb84 osd: clean up backlog generation checks a bit
-ff035ab osd: generate backlog if needed to get last_complete >= log.tail || backlog
-78f35a6 osd: send sufficient log to compensate for replicas with last_complate < log.tail
-16c603b common: Implement max open files
-5dc6624 osd: Make g_conf.osd_max_notify_timeout a uint32_t
-b40e7dc mds: load root inode on replay if auth
-20593b0 msgr: Unlock dispatch_queue.lock when short-circuiting queue_received.
-4efa300 filestore: assert on out of order journal pipeline submissions
-259c509 filestore: fix wake condition when journal submission blocks
-62e4cde common: print thread ID in sig handlers and assert
-15dcc65 mds: fix purge_stray for directories, zeroed layouts
-266cc6c rbd: add watch option for rbd tool
-6cdfa30 osd: PG::Info::History: init last_epoch_clean
-1d5a69f debian: try to update pbuild env as needed
-9ad05cf SimpleMessenger.cc: Fixes a dispatch_throttler leak in queue_received when the pipe has been halted.
-924355d auth: CEPH_KEYRING overrides g_conf.keyring
-13e8507 auth: make g_conf.keyring a plain old string
-789cb9a osdmaptool: better error handling
-e2c0f40 common: bufferlist: handle EINTR, check close rval
-51462d6 common: bufferlist::read_file: return read errors
-c846615 qa: rbd: small optimization to script
-634cca9 qa: rbd: Update rbd test to use the new rbd sysfs
-323ac1a qa: rbd: disable automatic keyring discovery
-adbfd95 cconf: code cleanup
-e1a1e1e auth: Fix buggy parsing of g_conf.keyring
-27cba78 common: str_list: const cleanup
-7e206df osd, librados: configurable notify timeout
-a4223d4 osd: watch request doesn't use version
-de8f021 qa/rbd: minor fixes
-ace9097 makefile: ignore mkdir -p errors in install
-fddbd90 cleanup: don't use __PRETTY_FUNCTION__
-bbd0ce2 logging: clean up some error handling
-22828b9 osd: PG::Info::History: init last_epoch_clean
-b3bb892 signals: handle_fatal_signal: use SA_NODEFER
-cbeddc2 signals: backtrace some more exotic fatal signals
-ce81e6a signals: test infinite_recursion
-ff6e4d4 common: make generic_usage a little prettier
-247b11b signals: Handle SIGILL, SIGBUS, SIGFPE.
-a410360 test: add TestSignalHandlers
-532522d rgw_admin: fix compile error in usage
-61f964c librados: Fix compile error by adding std:: namespace
-180a417 (tag: v0.24) v0.24
-69940e2 osd: compensate for replicas with tail > last_complete
-0e510db objectcacher: Fix erroneous reference to "lock" with "flock."
-b04b6f4 mds: make nested scatterlock state change check more robust
-df7e3ff mds: issue caps on regular files created via MKNOD
-7d33830 mds: set a writeable client range on regular files created via MKNOD
-d64616b mds: set layout on files created by MKNOD instead of CREATE
-7df4693 cephx: fix uninitialized value
-3a235b0 filestore: make OpSequencer::flush() work for writeahead journaling items
-285f351 mon: build_initial_monmap: fix mismatched alloc
-caa4609 common: cleanups
-28bcf0b osd: PG::choose_acting: fix major iterator mistake
-f7dc1a9 rgw: fix fd leak on error path
-795811d hadoop: fix a bunch of mismatched allocations
-2f91608 auth: avoid mismatched allocation
-3c7d30f osd: flush pg writes to disk before starting scrub scan
-5184db4 filestore: add per-sequencer flush operation
-2fb60da osd: debug scan_list and scrub a bit better
-c3a24fc osd: refactor _get_pool / _put_pool a little bit
-39aff22 osd: OSD::_lookup_pool: avoid double lookup
-bf4529b test: create test_pools.sh
-1cfad2e osd: clear INCONSISTENT if scrub detects no errors
-b190875 osd: add assert that we're replica
-1e291fc debian: don't strip rados classes
-9c173bb debian: rename ceph.lintian -> ceph.lintian-overrides
-b2746c9 logging: eliminate out-of-range dout calls
-c4b5c33 common: more cerr -> derr conversions
-30f752c gceph,ceph: replace cerr->derr
-c76379f cosd: replace cerr with derr
-73669d8 PG.cc: 	sub_op_scrub must set finalizing_scrub on the replica 	before waiting for last_update_applied to catch up to 	info.last_update.
-4644247 osd: FileJournal: use derr
-4fc1af5 logging: re-introduce derr
-29480f4 ReplicatedPG.cc: 	_scrub must set head when it encounters a head snap 	curclone counts down, not up
-c321620 osd: send notify message only to unexpired watchers
-1e490ef osd: timed out watcher is added to unconnected map
-619b45a logging: close file when reloading global config
-060fd42 osd: fix watch timer, locking
-914f6dd filestore: detect final version of async ioctl SNAP_CREATE_V2
-06a2d7a mds: Save straydn in mdr so it's consistent across retry attempts.
-e31f0a4 tools: don't start msgr thread before daemonize
-530083c objecter: check for pg mapping changes in each incremental; refactor misc resubmission code
-32a8aed objecter: add reopen_session helper
-f6dc5d9 objecter: cleanup: rename op maps
-065cdf5 objecter: track pending requests by osd, not pg
-07e593c mds: fix inode ancestor attr encoding
-5d44d59 msgr: mark down by Connection*
-fdbd85e automake: ignore rmdir errors during uninstall
-7b5e923 osd: send pending notification for reconnected watcher
-f969464 automake: add osd/Watch.h to noinst_HEADERS
-89d5c91 mon: trim pgmap less aggressively
-b989087 crypto: catch cryptopp decrypt/encrypt exceptions
-3e076c3 logging: use Mutex::Locker
-bf31f3f logger: Fix DoutStreambuf::create_rank_symlink
-4c37719 cephtool: rename tools files
-056e91e librados: drop watch_lock
-d4420a8 objecter: drop linger_info_mutex
-215f332 objecter: simplify linger register
-b60a9ab objecter: fix up linger ack/commit to trigger first time only
-8a75086 objecter: clean up linger interface
-a3fcf90 logging: Fix use-before-access in debug.cc
-3932f08 osd: PG::prior_set_affected: const cleanup
-9add26b mds: fix replay/resent vs completed request check
-0e08cb0 osd: return ENOSPC for non-mds if full flag is set in osdmap
-292414c gceph: Add gceph to rpm, deb
-71a19a9 gceph: run shutdown functions at exit
-bb82fd3 gceph: fix compile
-1a201f8 gceph: add -h argument
-b4ceb19 ceph tool: Create gceph
-4984473 librados, objecter: fix unwatch operation
-346a2aa rpm: update changelog
-e23d620 rpm: fix ceph.spec to work with gcephtool
-e5769b0 objecter: resend_linger copies ops
-83612ef Fix overflow in FileJournal::_open_file()
-d0fbc30 ReplicatedPG.cc: Fixes a bug in snap_trimmer where a pointer to a stack 	Cond is left in the mode.waiting_cond list.
-329ae1b ReplicatedPG: snap_trimmer now acquires a read lock on the osd map 	before calling share_pg_info.
-f68e6e7 rpm: don't try to package radosacl
-6722b0c rpm: add pkgconfig to BuildRequires
-9df18d1 rpm: set files-attr for radosgw
-b4264fb filejournal: reset last_commited_seq if we find journal to be invalid
-cc78bbf objecter: create a new op for resending lingering requests
-027d5bf logger: tweak cmon log output a bit
-fdc7414 logging: DoutStreambuf: handle daemonizing better
-5cba1e6 objecter: a few lingering fixes
-a9c098d mon: use helper for clock drift check; log relative instead of absolute time
-986c2af logging: debug.h: use DoutStreambuf
-c53ffaf logging: Remove _dout_check_log
-8fdd0f4 logging: debug.h: minor cleanup
-aeba6bc logging: eliminate dbeginl
-0f0cb46 logging: Implement rank symlinks
-6c4a7d5 logging: Support isym_path
-e597d02 logging: rename_output_file -> handle_pid_change
-116478a logging: _calculate_opath: use g_conf.log_dir
-ea3414d logging: DoutStreambuf: better debug output
-627399f logging: create_symlink:sometimes use rel symlinks
-b00baab logging: implement get_dirname, move get_basename
-ef22366 logging: fix normalize_relative
-fe10300 mds: sync->mix replica state is sync->mix(2)
-2000f69 mds: no not choose lock state on replicas
-3825c4b mds: small rejoin cleanup
-9b9b869 mds: rev mds cluster internal protocol
-2ea9b2d mds: fix replay of already-journaled requests
-b5fd2e4 mds: open undef dirfrags during rejoin
-39c5933 mds: add missing try_clear_more() to scatterlock
-c681ed7 mds: explicitly pass scatterlock dirty flag to auth on gather
-9bbb33b mds: send LOCKFLUSHED to trigger finish_flush on replicas
-681b010 mds: clear EXPORTINGCAPS on export_reverse
-f97660f mds: fix LOOKUPHASH to avoid creating bogus replica CDir
-4f64399 mds: introduce rejoin_invent_dirfrag() helper
-42464fb logging: Add symlink helper functions
-e2ba601 logger: fix EINTR handling
-bacdd49 logging: rename_output_file: fix bug
-d70851e logging: DoutStreambuf: Implement log-to-file
-9521114 logging: Add log_to_file option
-df5d4e6 logging: DoutStreambuf improvements
-1e2e4aa automake: in scripts, use sysconfdir as-is
-10b6887 automake: in deb pkg, use --syconfdir=/etc
-d4043e8 logging: add DoutStreambuf::set_prio
-6c7735f logging: DoutStreambuf must handle stdout + stderr
-12544a4 logging: Add log_to_syslog option
-57bcdc5 mkcephfs: require -k; update man page
-5ac581d Rename SyslogStreambuf -> DoutStreambuf
-d1e0a2a logging: debug.h: move some debug functions
-c94e0d2d logging: optimize with likely/unlikely macros
-9811fbd logging: Replace derr with dout
-ab18aae logging: add g_conf.clog_to_syslog
-ab61823 logging: LogEntry: don't pass enums by reference
-fcae8a7 logging: MLog.h: const cleanup
-82fa7f2 logging: LogClient: refactor handle_log_ack
-4ef069c logging:Move LogEntry.h into common with LogClient
-f2ead26 logging: better syntax for LogClient
-87545d0 configure: detect crypto++ library
-ebcc939 osd: drop not-quite-copy constructor for object_info_t
-d69f3dd MDS: Encode a full ancestor trace on inodes, not just the immediate parent.
-11c7dc0 librados: fix the C++ interface init
-b1afea5 librados: fix error path in rados_deinitialize
-aa3dda6 librados: fix the C++ interface init
-9a60481 librados: fix C interface error handling in init code
-130b8b3 librados: fix C interface error handling in init code
-bf030ca client: resync ioctl header from ceph-client.
-4e3c201 Tune Debian packaging for the upcoming v0.24 release.
-27b70eb osd: search for unfound on osds in might_have_unfound
-8aa7b39 Makefile: make radosacl build WITH_DEBUG only
-23f3704 ceph.spec.in: update dependency
-e005925 rgw: null terminate armor result
-f2424df rgw: get rid of openssl altogether
-a28b449 configure: check for the presence of libcrypto++ header files
-8821377 crypto: change include
-76e02c7 common: remove base64.c
-e135e92 crypto: remove old openssl implementation
-7fa9426 makefile.am: most binaries (except rgw_*) don't link with openssl
-6ec622c common: use ceph_armor instead of openssl based functions
-58f3ce4 crypto: test for allocation failure, cleanup
-15d8bdf crypto: use crypto++ for aes instead of openssl
-378d13d osd: remove poid/soid from ScrubMap::object; clean up callers
-a457cbb mon: fix typo
-a4cc929 make: create log directories and tmp directories
-a529738 msgr: Correctly handle half-open connections.
-39b42b2 make: create /etc/ceph if it doesn't exist
-da5ab7c ost: object_info_t: decode old versions correctly
-03eb4e7 man: add man page for cephfs
-6518fae watch: some more linger fixes
-78a1462 osd: fix log tail vs last_complete assert on replica activation
-63fab45 rados_bencher.h: 	bench_write and bench_seq will now wait on any write/read 	rather than the one least recently started.
-0ea601a Create SyslogStreambuf
-a3d8c52 filestore: call lower-level do_transactions() during journal replay
-9ecbc30 filestore: do journal mode autodetect and sanity check _before_ replay
-f9fa855 filestore: fix journal locking on trailing mode
-cbb5620 rbd: use MIN instead of min()
-792b04b client: connect to export targets on cap EXPORT
-5bdae2a (tag: v0.23.2) ceph v0.23.2
-bde0c72 filestore: do not autodetect BTRFS_IOC_SNAP_CREATE_ASYNC until interface is finalized
-4592c22 client: fix cap export handler
-15c272e man: fix monmaptool man page
-6d96104 osd: simplify scrub sanity checks
-76b55c8 osd: only adjust osd scrub_pending if pg was reserved
-260840f mds: fix import_reverse re-exporting of caps
-fe9fad7 v0.25~rc
-109e3f1 mds: turn off mds_bal_frag until resolve vs split/merge is fixed
-0cc8d34 osd: refactor object_info_t constructor a bit
-cee3cd5 osd: share_pg_log: update peer_missing
-e9ccd7e osd: mark_obj_as_lost: fix oloc init, eversion
-c29fbb1 osd: mark_all_unfound_as_lost: bugfix, refactor
-b46f847 osd: mark_obj_as_lost: don't assume we have obj
-5e243f3 osd: create lost2 test
-55f7e56 osd: mark_all_unfound_as_lost: set lost attr
-d5e6cae radostool: fix memleak in error path
-c281e1e osd: mark_all_unfound_as_lost: wake waiters
-b15a97c test_lost: add lost1 test
-ad4e5f3 osd: ReplicatedPG::do_op: error on read-from-lost
-136dfde osd: don't mark objs as lost unless we're active
-08bd4ea mds: fix resolve for surviving observers
-c0e60af test: dump_osd_store: sort dump output
-e555899 osd: active replicas process logs from primaries
-de09422 osd: object_info_t: add lost field
-80f3ea1 Add ./ceph dump pg debug degraded_pgs_exist
-fb4734b (re)add mechanism for marking objects as lost
-1123b5c osd, librados: misc fixes, linger related issues
-bf784cd osd: fix object_info_t() initialization of oloc
-91a7559 mds: add debug output to make completions easier to track
-ba1f3cb osd: fix misuses of OLOC_BLANK
-2ad901b Revert "mds: resolve cleanup"
-1b06332 osd: make recovery_oids debug list per-pg
-05ad97b client: Set the DirResult buffer to NULL when deleting it.
-559d4d2 ceph.spec.in: include gui files
-9360126 debian: many many cleanups
-5eb8ef7 filejournal: fix throttle vs FULL behavior
-7af9ffd filestore: make sure blocked op_start's wake up in order
-fac7266 filestore: assert op_submit_finish is called in order
-5e391db filejournal: rework journal FULL behavior and fix throttling
-79419c3 filestore: refactor op_queue/journal locking
-0df9dd6 filestore: do not throttle op_queue in queue_op()
-8003915 Makefile: add bloom_filter.hpp to noinst_HEADERs
-62075f3 Makefile: Fix VPATH builds
-0bcdc84 osd: osd_types.h: const cleanup
-7ee50ad osd: don't try to load a PG in a nonexistent pool
-6ab1723 filestore: simplify apply_transactions
-c9f864a osd: PG::trim: fix inverted conditional in assert
-b2bcf4b common: prevent infinite recursion on SIGSEGV
-8519181 osd: Create pg_split test
-fb60e11 logger: Fix a crash when the MDS shuts down cleanly.
-b4db410 Timer: add some asserts to catch certain errors.
-adbb545 osd: some notify simplifications and FIXMEs
-ec15c46 osd: track unconnected_watchers and when they expire
-376870f osd: add timeout to watch_info_t
-239c0a1 rbd: fix version renaming
-b305153 osd: fix up WATCH
-2563905 osd: some cleanup
-b722662 osd: use pg_t to find PG's again
-a61f6b5 osd: add missing Watch.cc
-0e62c42 osdc: spell out version
-15ffbc8 makefile: add missing MWatchNotify.h
-4dca64b osd: drop unused fields
-463d624 Makefile: Add --as-needed to LDFLAGS
-a77eb6b vstart.sh: don't specify journaling mode
-e0b927b osd: PG::trim: add assert
-756918b osd: _process_pg_info: add assert for replicas
-3ab6009 osd: dump_missing: also dump missing_loc
-da087e4 osd: discover_all_missing fix
-d6e8e8d gui: some cleanup
-1b1e040 osd: add a map for lingering messages
-4c8bdc5 osd: don't notify notifier
-520b523 librados: fix unnecessary locking
-454ea06 rbd: notify about header changes
-c4b9795 librados: last_objver is set on the pool, and not per thread
-99e1e4d librados: assert_version on sync operations
-38c8e38 librados: rename cookie to handle in api
-a76de3b librados: complete C interface for watch/notify
-2954799 librados: notify waits for completion
-f36677f librados: update C api
-a4864bd librados: enable object versioning
-e7184e6 librados: start implementing watch/notify
-7272bfe osd: send notify response from reset handler if needed
-d5cc673 osd: some notify related cleanups
-e0c548a osd: fix ms_handle_reset
-cc62f2e osd: fix bad mutex lock
-f8af4f2 osd: add watch/notify timeout
-f7b7d67 osd: check requested watch version number
-7bda45a osd: reply with either user_version or at_version, depends on the op
-9437ea8 osd: add user_version field in obect_info_t
-f5f3382 osd: send notify reply if there are not watchers
-59e61d0 osd: discard of disconnected watchers
-2b5e61c osd: send notification id
-d66b52e osd: watch infrastructure
-e493c7a osd: handle notify-ack
-3110e36 osd: basic watch/notify handling
-2bce34e osd: handle watch op, register client on object xattr
-2f13dd8 gui: more reindenting
-66a78c2 gui: reindent a bunch of code
-d8652de mdcache: in trim_non_auth, only print out path if it has a parent dentry.
-8768b52 mds: Reply checking_lock while reading filelock
-5ed06ff client: remove inode from flush_caps list when auth_cap changes
-4041bf0 mds: fix set_state_rejoin auth_pin check
-e97eae1 init-ceph: tolerate failure in cleanallogs
-5498c46 osd: fix recover_replicas() unfound check
-5452dae osd: recover_primary() until primary has all found objects
-7ea7a43 osd: only discover_all_missing if unfound
-671b1c0 osd: add get_num_unfound() helper
-413ecb0 osd: only search_for_missing if there are unfound objects
-36f703e osd: removing unused variable, fix warning
-285cc94 osd: fix is_all_uptodate()
-55570ba osd: fix PG::is_all_uptodate
-c0c301d osd: PG::read_log: don't be clever with lost xattr
-0e15da8 Rename  peer_summary_requested to peer_backlog_req
-8461228 Build might_have_unfound set at activation
-36c6569 monmaptool: Return a non-zero error code and print a useful error 	message if unable to read the monmap file.
-fc21254 mds: allow for old fs's with stray instead of stray0
-868665d (tag: v0.23.1) v0.23.1
-c327c6a mon: always use send_reply for auth replies
-61dd4f0 mon: simplify send_reply code
-2c71bd3 osd: add assert to _process_pg_info
-a70943f osd: re-indent some code in _process_pg_info
-7136954 msgr: tolerate 0 bytes from tcp_read_nonblocking
-7ec0034 init-ceph: fix (and test!) cleanlogs and cleanalllogs
-7b4a801 mds: fix rejoin_scour_survivor_replicas inode check
-dd11fe2 types: Allow inodeno_t structs to alias.
-8d95b5b messenger: init rc to -1, removing compiler warning.
-ac6b018 Causes the MDSes to switch among a set of stray directories when switching to a new journal segment.
-3f8f590 Timer must be initialized in Client::init and shutdown in Client::shutdown.
-8eb4de9 generate_past_intervals:generate back to lastclean
-80f2823 vstart.sh: 'init-ceph stop' instead of 'stop.sh'
-27c6f21 mds: remove bogus assert
-9e15ade mds: do not eval subtree root when replay|resolve
-c0c81d5 mds: trim exported subtree _after_ adjusting auth
-cd53719 mds: resolve cleanup
-924b1fc osd: bind to new cluster address when wrongly marked down
-1940976 msgr: implement rebind() to pick a new port
-f7170f9 client: only encode_cap_releases once per request.
-51abcaa mon: clean up cluster_addr code a bit, better debug output
-28498a0 osd: send correct ip addrs to monitor for cluster_, hb_addr
-2031364 osdmap: fix cluster_addr encoding; printing
-ec434ed osd: unconditionally set up separate msgr instance for osd<->osd msgs
-0dddf45 filestore: only warn about disk write cache on kernels <2.6.33
-0856f57 osd: fix search_for_missing: old last_update implies object not present
-6ef5c2f init-ceph: fix cleanlogs for no log_sym_dir case
-fc9b097 OSDMap: const cleanup
-2a5c389 mds-dumper: Define Dumper::~Dumper()
-8566c5c ReplicatedPG::pull: fix test for unfound
-2f5502f osdmap: fix printing, again
-b91e14e multi-dump.sh: add diff mode
-9cab522 Add multi-dump.sh
-6e2b594 ReplicatedPG::get_object_contect: fix broken calls
-43e0b26 ReplicatedPG: call finish_recovery when needed
-ea5d1d6 osd_resurrection_1_impl: turn on recovery at end
-4adfdee Makefile: fix builddir weirdness
-7e9812b osd: rev PG::Info encoding for last_epoch_clean change
-f6823a7 mds: adjust dir_auth_pins on steal_dentry
-b705be1 mds: wrlock scatterlocks to prevent a gather racing with split/merge logging
-66d43ac mds: fix subtree map update on dirfrag merge
-7f6a256 mds: clear PIN_SUBTREE on split/merge in purge_strays
-669b554 mds: don't complete freeze while parent inode is frozen
-3777ff8 mds: move dirty rstat inodes to new dir on refragment
-d538817 mds: flush log on fragment
-cd5ee00 mds: initialize PIN_SUBTREE on split
-b58b8d0 mds: fix discover requests, tracking wrt fragments
-a63c06c mds: fix EFragment replay
-a961049 mds: don't fragment mdsdir or .ceph
-b54880e Detect broken system linux/fiemap.h
-29a9e66 osdmap: don't include blacklist info in summary
-c43455c client: Remove the I_COMPLETE flag from the parent directory in relink_inode.
-d57181d config: added max_mds MDSMonitor: create_new_fs adapted to use the max_mds parameter
-d1dcc03 mds: allow frag merge on subtree root
-c493126 mds: make dirfrag thrashing join and split
-8f24919 mds: add timestamp to LogEvents
-56b9e92 osd: fix trailing + in pg state string rendering
-d17f744 mds: be less noisy about cap imports
-77c05fb mds/client: pass dir hash over the wire
-3358046 mds: set dir hash on root inode
-be29e4c mds: set mode before all the file type dependent inode initialization!
-cc709df mds: add DIRLAYOUTHASH feature bit
-e146767 mds: make dentry hash a dir layout property
-267cd84 RadosClient::shutdown: call monclient::shutdown
-dfb78eb osd: don't stop recovery when there are unfound
-d014acb dumpjournal.cc: fix compile
-da2d501 rbd: fix rbd snap rm class handling
-c707511 Add ./ceph osd tell <osd-num> dump_missing <out>
-755f575 search_for_missing:recalc stats if unfound changed
-d883a54 mds: Use CDir bloom filter as appropriate.
-be2da00 mds: Add bloom filter to CDir.
-1fe31e1 timer: make init/shutdown explicit
-d2af7b7 test_unfound.sh: start recovery at end of test
-c293b9a test_common.sh: add dump_osd_store
-05a16d3 test_unfound.sh: fix return codes
-470b199 stray_test:don't use up/down. timeout extension
-e3f6507 osd: add discover_all_missing
-796ff1d Fix bugs in search_for_missing, _process_pg_info
-e768bbd Add stray_test to test_unfound.sh
-d3cf478 PG::finish_recovery: set info.last_epoch_clean
-b0c22bd Add MOSDPGMissing
-873e9bf osd: add incompat feature LEC for last_epoch_clean
-184fbf5 osd: add last_epoch_clean to PG::Info
-6a65cc4 test_common.sh: remove messenger debug for now
-873180a osd: skip unfound in recover_replicas
-d61bc3b osd: skip unfound objects in recover_primary()
-9ea1d8b osdmap: make printing a bit easier to read
-beae97f objecter: don't dereference null op->outbl
-089cd12 include: Add bloom filter library to include/
-556ba73 osd: unreg scrub when removing pg
-975dd8f librados: pass provided buffer to objecter on rados_read
-e8132cd objecter: post rx buffer to msgr if target bufferlist is present
-7cb2d50 msgr: use provided rx buffer if present
-2854dae msgr: add Connection rx buffer interface
-c04ba72 msgr: implement get_connection()
-6785235 buffer: implement list::iterator::get_current_ptr()
-4af14db Objecter::shutdown: shut down timer.
-2be4215 debug: don't print thread id twice
-b61af6a msgr: cleanup: make queue_received non-inline; some helpful debug
-f99c84e msgr: do not clear halt_delivery
-d4746ab msgr: close enqueue/discard race
-1071a9a msgr: protect pipe queue_item map with pipe_lock AND dispatch_queue lock
-70fe062 msgr: add 'ms inject socket failures = foo'
-cbf154e msgr: only close socket on reconnect or shutdown
-20937e8 msgr: protect pipe queuing with _both_ pipe and dispatch_queue locks
-20affc6 TestTimers: don't test (nonexistent) Timer
-d5032a0 Rename PG::peer to PG::do_peer
-c5b2d28 uclient: insert lssnap results under snapdir, not live dir
-7ccdae8 msg: fix buffer size for IPv6 address parsing
-ce6d639 timer: rewrite mostly from scratch
-5484899 mds: hit inode created via CREATE
-5d1d8d0 (tag: v0.23) v0.23
-3d10b34 mds: fix null_snapflush with multiple intervening snaps
-85e0890 osd: scrub least recently scrubbed pgs first; once a day
-c12829a osd: don't scrub something we just scrubbed
-9257291 osd: call sched_scrub on reserve reply
-815c3d5 osd: fix sched_scrub
-6548fb6 osd: do scrub schedule state changes inside scrub()
-a87e890 osd: track last_scrubbed in PG::Info::History
-4d941cf osd: scrub: change cancel behavior
-231434a pg_state_string: use an ostringstream
-d247616 vstart: stop logging to /tmp/foo
-74be621 osd: fix scrub reserved state when starting scrub
-8650418 vstart: turn down msgr debugging
-9e4027f monc: cancel timer events with lock held
-07bb675 Wake up clients waiting for now-found objects
-b9191dd test_unfound.sh: test reading an unfound object.
-fc605ce test_unfound.sh: verify that we have unfound objs
-02ec721 Add num_objects_unfound to struct pg_stat_t
-b518113 test_unfound.sh: shorter test
-6a04ac5 PG::recover_master_log: rename a local variable
-85c4e6e OSD::_process_pg_info:search_for_missing sometimes
-5153ba5 Add PG::Missing::have_missing()
-040c4bc PG::search_for_missing: minor refactoring, comment
-8288a23 PG::peer: don't block if objects are unfound
-e6b6c53 PG::peer: count/find cleanup
-ef1f8ec PG.h erase deadcode
-a46f15e PG: nomenclature change: talk about unfound objs
-b80f3e6 PG: move ostream operator to .cpp file
-82aa79f mds: fix inode->frag rstat projected with snaps
-5deef24 osdmap: break up asserts for easier debugging
-586c9e7 objecter: throttle before looking at lock protected state
-5751373 mon: drop unnecessary state checks
-84840ed debian: don't explicitly depend on libgoogle-perftools0
-ca3693d mds: Enable --journal_check mode.
-214b726 osdc: Fix bad assert in ~ObjectCacher.
-5035c82 uclient: only update inode if version increased
-255e34a decompile_crush_bucket: fix depth-first decomp
-d1f15da CrushWrapper:get_bucket: ret ENOENT for no bucket
-e8ad6d2 osd: small cleanup
-28b4429 osd: scrub: list objects without lock held
-966369a ps-ceph.pl: don't show self
-6bc3151 gui: add missing #include
-e991702 objecter: set READ flag on new objecter mapext/read_sparse ops
-adac516 objecter: fix balancer for ops with length < 0
-2006054 filestore: autodetect presense of FIEMAP ioctl
-e548871 fiemap: include linux fiemap.h header; unconditionally compile helper
-9f14dd2 ps-ceph.pl: display Ceph tests
-2325a1a Fix example config file
-2947d19 TimerThread:don't call pop_front before iter deref
-1c7d8f1 Makefile: use openssl module check
-954ad98 osd: shut down if we do not exist
-ea56dfd osd: handle osds that no longer exist in prior_set_affected
-29428b9 Objecter: initialize timer in Objecter::init
-ec4200b Add test_crushtool.sh
-019bb70 mds: turn on mds_bal_frag (dir fragmentation) by default
-e15c956 mds: fix inode freeze auth pin allowance
-ae13fc8 osd: handle osds that no longer exist in build_prior
-f28b99b CrushWrapper::get_bucket_item: bounds check
-9b48725 crushtool: don't create a dump we can't recompile
-3107944 osdmap: cleanup: add parens
-e1588dc mds: wipe out client sessions on startup
-05a4738 mon: implement 'mds newfs <metapool> <datapool>' command
-d80948a mds: use mdsmap data pool for root inode default layout
-8a21c6f mds: add mds_skip_ino and mds_wipe_ino_prealloc options
-aad3f7f ceph.spec.in: don't strip rados classes
-64f95ad mds: add missing Dumper.[h,cc]
-be9328a mds: tolerate/fix negative dir size counts
-d5515a8 mds: add missing Dumper.[h,cc]
-1ab7c7f Replace ps-ceph.sh shell script with perl script
-deb9ef7 v0.24~rc
-a4674af mds: eval: put scatter in MIX if replicated, otherwise LOCK
-33c6e23 mds: do not scatter_writebehind in MIX state
-bdc2fa5 mds: remove MIX_STALE
-c1ee560 mds: don't fuss with versions when taking frag/rstat from frag; it's never stale here
-1eb94da mds: introduce/use helpers to resync stale fragstat/rstat; update version
-c203482 mds: ignore done_locking on slave requests' acquire_locks()
-51b6a86 mds: don't use helper for rename srcdn
-eb0a60d mds: never complete a gather on a flushing lock
-bdf3bc5 mds: update version when bring stale rstat back up to date
-a74054d mds: simplify stale semantics a bit
-e27f111 mds: preserve stale state on import; some cleanup
-4126d1c mds: add more verify_scatter asserts
-ae670c3 mds: fix version check on resyncing stale rstat in predirty_journal_parents
-4cee6ea mds: Fix bad inode deref.
-93344fb Revisit std::multimap decoder
-f015c98 autogen.sh: check for pkg-config
-fd397ab PG.cc: build_scrub_map now drops the PG lock while scanning the PG        build_inc_scrub_map scans all files modified since the given            version number and creates an incremental scrub map to            be merged with a scrub map created with build_scrub_map.            This scan is done while holding the pg lock.        ScrubMap.objects is now represented as a map rather than as            a vector.
-989fa67 mds: preserve version when recovering rstat from dirfrag in predirty_journal_parents
-9586e90 mds: restructure finish_scatter_gather_update()
-669a8af mds: do not bump scatter stat lock in predirty_journal_parents
-663b470 mds: mark scatterlock stale on import of stale frag scatter stat
-63c1ad8 mds: match bottom half of assilate_dirty_rstat_inodes with a dir flag
-9b6d96e mds: fix inode version used for inest in decode_lock_state
-62716aa PGMonitor::update_from_paxos: check for bad input
-8f3672d Replace sprintf with snprintf
-56179d1 start_profiler/enable_profiler_options:fix memleak
-e6a751b Set HEAP_PROFILE_INUSE_INTERVAL based on conf
-8c8bfdb CInode::make_path_string: don't coerce ino
-53f6ed1 mds: mds debug scatterstat to print out projected rstat/fragstat
-f23ba00 mds: verify single frag rstat on projection too
-d3c2b9c cmds: Include journal dumper functionality.
-e0a5de2 dumper: Add new Dumper class.
-28f956a mds: fix optional frag asserts
-86d6e51 objecter: add new wait_for_osd_map function.
-8a41d09 osd: clean up active <-> booting state transitions
-f917df7 TestEncoding: count number of ctor invocations
-e90a3b6 mds: dump corrupt events; optionally skip them
-1c934eb mds: wait for last_failure_osd_epoch before starting journal replay
-f511286 mon: blacklist and update last_failure_osd_epoch in all failure paths
-6345fcd mon: update mdsmap.last_failure_osd_epoch when blacklisting
-0fb2297 mds: add last_failure_osd_epoch to extended section of mdsmap
-c4e56e9 MonClient: start SafeTimer in MonClient::init()
-8f33a41 cosd: start SafeTimer in OSD::init()
-124d287 Monitor: start timer thread in init(), not ctor
-0b9f2e2 Timer: add verbose debugging when debug timer = 20
-b0e7374 TestTimers: add test for out-of-order timer insert
-e4853fa SafeTimer: delete contexts under the event_lock
-2c7d293 vstart.sh: turn on MDS debugging
-1cf5bc7 cephtool: fix timer init/destruction
-d3ead43 Logger.cc: avoid creating SafeTimer in global-ctor
-571e375 SafeTimer: clean up copy constructor declaration
-8279f14 Timer.cc: clean up debug printouts
-d840e4f TestTimers: test cancelling single events
-cd31665 TestTimers: call common_init and parse argv
-e6b8dba Timer: fix timer shutdown, efficiency issues
-0d1bfe0 client: print useful max_size waiting message
-4f24fcb debian: add gtk build-depends
-d0c29d7 mds: add 'mds verify scatter' and re-add some scatter asserts
-fd57f4d mds: fix put_xlock() assert for slave masters
-a98812f mds: rename 'mix stale' => 'mix_stale'
-4d669c8 mds: request unscatter when MIX_STALE on replica
-8b9342c mds: disable tempsync
-563a9ba mds: finish_scatter_update on auth dirfrags too
-0e079bc mds: use helper for scatter dirfrag update; use on local dirfrags
-77ec378 Add the ps-ceph.sh tool
-4e586dd encoding.h: fix compiler warning
-c98b026 TestEncoding: add templated encode-then-decode fn
-84e2da8 Create TestEncoding to test serialization code
-60c59ae mds: add some scatterlock notes
-0dc75a9 ceph: remove bad assert for old frag stat
-3413518 mds: match conditions in finish_scatter_gather_update_accounted
-33268e2 mds: handle MIX_STALE on auth too
-14f4d22 mds: scatter_info_t ancestor for nest_info_t and frag_info_t
-cbacc1d mds: only mark auth dirfrags stale in start_scatter
-44574e8 mds: mark scatterlock stale if any auth dirfrags appear stale
-4a0f731 mds: do not update accounted_*stat if auth and frozen
-839371c osd: Added load threshold for scrub scheduling
-3ae8c00 osd: Make a per-pg sched_scrub, and remove non-active accounting from the scrub_wq.
-9d1984e mds: mark scatterlock stale if dir is frozen, not inode
-e304a24 rados: benchmark using unique object names
-38f96c6 debian packaging: set --sbindir=/sbin
-68f7fed config: fix sigsegv handler
-235aa1c filestore: disable 'filestore btrfs snap' when SNAP_DESTROY is missing
-4cfd198 Makefile.am: include the libcrush headers when installing
-5310ab6 uclient: Warn on truncate_[size|seq] changes for non-file inodes.
-630db2a mds: Init system CInodes to have a truncate_size of -1. This should help with bug #518.
-524c890 client: match initialization with mds
-20e8a45 client: only do truncate on regular files
-905ff76 debian: add pkg-config as build-depends
-bc9bc4c init-ceph: make lockfile dir configuration (redhat)
-85ba4f2 object.h: const cleanup
-ee3fc3b osd: Add scrub to the names of scrub scheduling-related things.
-993ba1c osd: refactor OSD::sched_scrub
-8d200a7 osd: Move pending/active scrub accounting into the scrub work queue.
-378f84c osd: Add the rest of infrastructure for scheduling scrubbing
-7b68a40 osd: add variables to track scrub scheduling
-3d85a7b logrotate: separate rule for stat/*.log
-49153c2 osd::PG: Update PG comments
-e6df807 test: create test_unfound.sh
-1dd5042 fix make distcheck, make uninstall
-c044829 filestore: automatically choose appropriate journaling mode
-9f4fd4a (tag: v0.22.2) v0.22.2
-5b06ca1 filestore: use updated btrfs ioctls
-a831b2a btrfs: update ioctls.h
-bb628d3 Get "make dist" working, fix gui build issues
-7e8fc10 mds: detect small dirs that should be merged, and merge them
-8a8e37b mds: hit dir popularity on unlink
-73c6e4c osd: write potentially large pg info to object, not xattr [format change]
-ed89d9a cephtool-gui : more helpful error on pixbuf fail
-18bb14e osd: snap_trimmer: flush between collection sets
-440cc43 mds: auth_pin head/snap pairs for all need_snapflush entries
-0ce1d50 mds: Refactor need_snapflush into CInode helpers
-9f86a79 configure.ac: default to --enable-gtk
-c204528 osd: fix decoding of legacy (v2) coll_t
-96e583d mds: use list instead of vector for trim_unlinked_inodes
-4e180fe mds: fix use-after-free iterator no-no in remove_inode_recursive()
-aa83e11 mds: log if trim_non_auth does anything, since it shouldn't be now except on rollbacks.
-404c83e mds: Call trim_non_auth_subtree when appropriate.
-2074521 mds: add function MDCache::trim_non_auth_subtree
-8255a67 debian: fix changelog
-ba6d931 Mutex: add more checks to lockdep
-7f90cc2 ceph: gui: update copyright foo
-329fbc2 cephtool: gui: handle bad input in view_node
-89273b7 cephtool: only initialize the tokenizer once
-819ad63 cephtool: fix initialization race
-c13183e cephtool: join GUI thread before shutting down
-c883903 cephtool gui: install and locate gui_resources
-65fbd2e Add the Ceph monitoring GUI
-10466c5 qa: add rbd test
-b44901c SubmittingPatches: initial version
-b6ffdf1 qa: add basic rbd test
-b434bb1 osd: store locator with object_info; add incompat feature
-ec8960f osd: make object_locator_t encodable
-771c2c4 mds: Migrator needs to add_dir_context all the way to root. It was going to the default subtree root, which doesn't work when we've just created a new subtree root out of the given dir!
-66e1d9f osd: fix unneeded get_object_context() (and leak) in _rollback_to
-4fe3ec9 cephfs: remove unused variables
-7a688a9 config: fix signal handler recursion
-ee27a61 objecter: refactor interface with object_locator_t
-8f08510 mds: pin NEEDSNAPFLUSH only when adding item
-8d37b28 debian: change compat to 6 to match debhelper require
-1a0ac01 osd: handle missing objects on snap read
-69f5ccd mds: store dir inode in separate object; fetch from both.  incompat flag.
-745a8ee clarify CDir/CInode content comments a little bit
-c1d0781 filestore: can force use of stale snaps
-c1a6ee5 filestore: don't revert to old snapshots on startup
-bcc068e filestore: read commit_seq before mounting (btrfs ioctls)
-ae78ed4 ceph.cc: delete deadcode
-551711f Move ceph.cc to tools/
-a14dd81 configure.ac: add ./configure option for gtk2
-5fe0b5a mds: fix split use after free; merge works
-b771ba8 mds: simplify fragtree_t printer
-7bd00b9 mds: implement command 'merge_dir path frag'
-05fa106 mds: implement frag.parse()
-4c79f36 mds: requeue dir if we can't split now due to dftlock
-4afbc52 mds: check/take wrlock on dirfragtreelock; unwind after freeze if needed
-e79417b mds: move fragment checks into shared helper
-a4b2144 mds: don't replicate new frags (at least for now)
-332195a mds: clean up merge() callchain
-e1b5379 mds: generalize split/merge call chain a bit
-96d26e3 mds: reimplement split_dir
-2f9c960 client: fix dup entries in multifrag readdir
-0f8f02d mds: add 'mds bal split bits' config option (default 3)
-96beaf6 messenger: always unlock existing pipes, even if they're lossy
-b5d9bec client: Initialize Inode::truncate_size to 0 instead of -1, and check prior_size on truncation.
-ef90cb5 filestore: some cleanup
-54fdd64 filestore: escape the xattr chunk names
-84b85aa osd::Missing: const cleanup
-45f7110 osd: move PG::Missing implementation to PG.cc
-4420287 filestore: some cleanup
-f131f42 filestore: warn if btrfs_snaps enabled but no async snap create ioctl
-e275e85 mon: remove pg from deleted pools from pg_map
-00d5442 mds: fix up mds_bal_frag options
-a8f6ba9 add cephfs to deb, rpm
-b15e3b4 client: fix to handle new ObjectCacher pool requirements.
-38d7ddf osdc: Add pool awareness to the ObjectCacher, to prevent unfortunate collisions.
-7bb31f7 osdc: Fix release_all so it loops properly
-e27f0b1 filestore: escape the xattr chunk names
-961d3bc PG::Log::Entry: remove unused snap_t field
-61b3fc3 makefile: add cephfs
-d4bbde5 ./ceph osd setcrushmap: validate crushmap
-394b071 crush: improve error handling in map decoding
-a869b35 cap_reconnect_t: ignore embedded NULLs in the path
-e912e68 (tag: v0.22.1) v0.22.1
-96d4673 Makefile: add errno.h
-a974cfd mds: be quiet about snaprealm push/pop
-6907894 filestore: ignore ENOSPC on setxattr pending a better workaround
-6826ce4 filestore: change xattr chunk size to 2048
-76157d9 filestore: split xattrs to multiple chunks
-3ee37ee rados: add getxattr, setxattr
-22bb211 filestore: change xattr chunk size to 2048
-b4fd986 mds: Remove scatter_pins.
-db6759f mds: use set_stale() as appropriate: 1) When we update a lock but can't write its new data, 2) We load potentially-stale data off disk (ie, in restart).
-47a5fc9 mds: Whenever we set locks to state LOCK_MIX, check is_stale() and set to state LOCK_MIX_STALE instead, if necessary.
-372e8b3 mds: Add bool "dirty" to ScatterLock, plus manipulation functions. Also add is_dirty() to SimpleLock so we don't need typing in these checks.
-f893a63 mds: rename Locker::file_mixed to scatter_mix
-512a1da mds: Check for LOCK_MIX_STALE along with LOCK_MIX LOCK_MIX_STALE precludes writing to the protected data, but in general cases it's an acceptable state whenever LOCK_MIX is.
-557e7e3 mds: Add new LOCK_MIX_STALE state to lock structs.
-9d4f7b8 librados: add rmxattr
-429b2d9 Revert "messenger: Make sure to unlock existing->pipe_lock. There are a few cases in the "open" section where we can go to fail_unlocked while still holding existing->pipe_lock. So unlock it."
-242b599 test_lost.sh: put common functions in test_common
-696da81 messenger: If we error out of accept() but have messages in our queue, save Pipe. This can occur if we're replacing another Pipe and hit an error in the process.
-49d8fd8 messenger: If we're replacing an existing Pipe, steal queue when we kill it! Previously we could fail out after killing existing but before splicing its queue into our own, which lost messages.
-bf0d347 PG::peer: introduce prior_set_build flag
-b8c0d3d filestore: update btrfs_ioctl.h
-1a7a341 filestore: use different encoding for snap async_create
-bb451d2 filestore: use SNAP_DESTROY_ASYNC ioctl if available
-a3d8c1f filestore: remove stray async_snap_test if present
-953ef1d filestore: use new async btrfs ioctls
-78352b3 osd: fix deadlock in map handler
-f96eb80 filestore: split xattrs to multiple chunks
-515efd5 rados: add getxattr, setxattr
-6a88d57 mds: implement 'fragment_dir path frag by' command
-7207476 PG::recover_master_log: replace count with find
-3cbeaa1 prior_set_affected: log msg when we see a lost osd
-17c615c osd: build_prior: clean up started_since_joining
-831075c osd: PG::prior_set_affected: fix lost OSD detection
-399d31f test_lost.sh: ensure that recovery doesn't start.
-881bf02 include/utime.h: should include include/types.h
-dec5b78 errno: add missing common/errno.h
-ce050ef Create cpp_strerror to make error reporting easier
-3d94b6a FileJournal: fix journal size calculation
-4d1b9e6 makefile: simplify cdebugpack install rule
-9c59a6a debian: 0.22-4
-17b8b0d TestTimers: test SafeTimer as well as Timer
-10ec8ce Timer.cc: add testtimers
-1d8d744 test_lost.sh: update timeout, fix payload
-f812f7e OSDMap: const cleanup
-dca856d PG::build_prior: update comment
-e3a53bb osd: track prior_set_lost
-794cf70 osd: fix spacing in OSDMap::print
-3e4e73f OSDMap::print: print osd_info_t using ostream op
-dc18e7a osd mon: validate arguments before marking lost
-ad270f9 osd: test: Add script to test LOST state
-96692d2 messenger: Make sure to unlock existing->pipe_lock. There are a few cases in the "open" section where we can go to fail_unlocked while still holding existing->pipe_lock. So unlock it.
-acc2e4d mds: show readdir frag
-e380fc2 client: reset fg after _readdir_get_frag
-0abf57b client: fix skipped dentry on readdir chunk boundaries
-59426bd client: fix dcache removal during multiple frags
-6c2f0f0 client: show file offsets in hex
-28d8992 messenger: a 0 timeout on ::poll really means don't wait (as opposed to -1, which waits until an event occurs).
-32ba776 mds: fix inodestat encoding when frags are present
-cb82eb5 mds: do not finish_scatter_gather_update_accounted on dirfraglock
-814f9db objecter: reconnect on osd disconnect
-34da1ac rgw: return 204 on successful removal of bucket/object
-44c7863 init-ceph: Make sure daemon_is_running() checks the correct instance
-78660cd objecter: pause writes when FULL flag is set
-66e493d objecter: always set READ or WRITE flag
-58f2f37 include/utime.h: should include include/types.h
-c1f2f9a rgw: return 204 on successful removal of bucket/object
-a5f6da4 errno: add missing common/errno.h
-1127e47 Create cpp_strerror to make error reporting easier
-18b1f78 FileJournal: fix journal size calculation
-9b4ec49 makefile: simplify cdebugpack install rule
-9e3607f debian: 0.22-4
-6620a5a TestTimers: test SafeTimer as well as Timer
-1b0cf69 Timer.cc: add testtimers
-99013ba mon: Don't force a wait of paxos_propose_interval seconds on every commit.
-197928c Objecter::shutdown(): call SafeTimer::Join()
-5aca728 btrfs_ioc_test.c: added a unitest
-dac9ecd SimpleMessenger::Pipe::Accept(): fix open
-b55af75 Revert "Revert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery.""
-fd42c85 filestore: deliberate crash on ENOSPC or EIO
-aab2a36 debian: sign/publish specific deb version
-c0db71f debian: update standards-version; fix ceph-client-tools-dbg
-19c2c83 filestore: deliberate crash on ENOSPC or EIO
-781874f messenger: Make sure to unlock existing->pipe_lock. There are a few cases in the "open" section where we can go to fail_unlocked while still holding existing->pipe_lock. So unlock it.
-1b2e992 debian: update scripts to do packaging fixes
-d44267c Revert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery."
-69b764a mon: add 'mds rm <gid>' and 'mds rmfailed <id>' commands
-8a7c95f (tag: v0.22) v0.22
-2bc159e debian: no libgoogle-perftools-dev on lenny
-180f441 mds: cleanup: clarify issue_seq in cap release debug output
-b8ab009 mds: cleanup: print waiter masks in hex
-0e472d4 mds: use correct helper when pinning past snaprealm parent
-d8ee92a mds: take nestlock wrlock when projecting rstat into dirfrag
-8528ebb messenger: introduce timeouts on pipes.
-6e1eeac rgw: small cleanup
-b378cb4 Add RGW_PRINT_CONTINUE to control wether we print the 100-continue header
-32e790c conf: only set sig handler if wasn't set already
-dfc46f5 mon: do not assert if paxosv < monmap->epoch
-406648e mon: do not delete mon->monmap which is not created by new
-04189f8 mds: fix can_scatter_pin() to be only SYNC and MIX
-9a8f1ad object store: create OP_COLL_RENAME operation
-039a86f doc: add object_store.dot
-966a5b8 conf: actually handle long long config options from conf file
-ad12d5d Fix bug #487: osd: fix hang during mkfs
-17de417 FileJournal.h: add attribute __packed where needed
-69be0df messenger: introduce a "halt_delivery" flag, checked by queue_delivery. Defaults to false, is set to true by destroy_queue.
-60bfc67 osd: fix MOSDBoot versioning
-0ff6e41 RadosClient: clean up Rados::client use
-36b61da mds: SimpleLock and subclasses: const cleanup
-d5d4503 lists templates: const cleanup
-7f493a1 qa: add ffsb
-e6d28ce prefix git sha1 with commit:
-dc295a3 mds: don't assert on mismatched rbytes
-f35bdc2 add rc to release.sh
-098a493 mdsmonitor: remove unused variable
-fbb5a45 mon: add 'ceph health' command
-219b476 mds: fix const-ness of is_dirty()
-df265a2 mon: don't include endl on clock drift warning
-dead368 Makefile: add cdebugpack.in to EXTRA_DIST
-b438b3d mds: Fix projection in rename code paths. We aren't actually projecting the inode unless destdn->is_auth(), so check for that before projecting the snaprealm (which requires a projected inode)! Then on rename_apply, open the snaprealm on non-auth MDSes.
-4ba060c mds: CInode doesn't always call assimilate_dirty_rstate_inodes_finish
-c56ab53 mds: Locker::local_wrlock_finish now calls finish_waiters!
-53fe418 mds: MDCache should adjust_nested_anchors once the op's been logged. Fixes crashes from assert(nested_anchors >= 0) failures when updating at the wrong point.
-fc60984 mds: avoid EXCL if mds_caps_wanted in _do_cap_update
-fa2c371 mds: bump dirstat.version during link/unlink/mtime update
-9e5a203 mds: fix get_xlock() assert on slave xlock
-f9b102e mds: bump rstat version in predirty_journal_parents
-d2175ee filestore: don't start commit if nothing new is _applied_
-a7ed2ee mon: const crusade
-55370d3 cdebugpack: update Makefile.am, add missing line
-3d9a93e mount.ceph: make -v a little more verbose
-8efef66 mount.ceph: const cleanup
-566292a mount.ceph: allow the user to omit ceph_options
-0b26f31 mon: class library encodes/decodes activated class
-932cfcb mount.ceph: add usage message
-35c08d5 mount.ceph: argument parsing cleanup
-873095b osd: fix merge_log cut point
-6bcda25 osd: loosen caller_ops asserts
-6679c27 osd: move to boot state if down OR wrong address in map
-6545f3c cdebugpack: behave when /bin/sh is dash
-af749e6 cdebugpack: man page
-9805eb5 cdebugpack: include cdebugpack.XXXX dir in tarball
-2c49ac4 cdebugpack: include .tar.gz in usage filename
-3b1b8f8 cdebugpack: include in deb, rpm
-f10906b mds: respawn (instead of suicide) on being marked down
-a2bcb41 debug: always append to log
-a7deada init-ceph: DTRT when cconf returns host = localhost
-a18213d debugpack: add ceph-pg-dump
-f6e49cb cdebugpack: save some more info
-8b716c6 mds: Check the lock state, not the inode state!
-b778f83 osd: on clearing corrupt logs, call pg::write_info
-430377b v0.23~rc (new unstable branch)
-e588298 osd: fix pull completion tests, again
-47f2efb osd: log error instead of crashing on failed pull attempt
-a280685 osd: save corrupt pg_logs to a special collection
-f6b47e3 osd: clean out redundant (and wrong) complete calculation
-1bb60b4 osd: make sparse data/clone push behave with partial object push
-ed3976c rgw: change default content type to binary/octet-stream
-1f94a8f monclient: fix leaks in build_initial_monmap address lookup
-7935e30 monclient: fix off-by-one buffer overrun
-16f053f addr_parsing: remove unused mount_path logic
-109dcdf cdebugpack: add a utility to generate a debug package
-4bc4cba osd: ignore info queries on deleting pgs
-a4eb599 osd: cancel deletion on pg change
-ed2eee5 config: fix address list parsing
-414bc4f cmon: better error handling
-bcf1bde conf: cconf return default values from config.cc if not found
-12373a6 mds: allow do_null_snapflush on multiversion inodes
-e064796 signal handlers: be more elaborate about caught signals
-22c3846 mds: don't call mrk_dirty_rstat for base/root inodes
-d600596 mds: fix EMetaBlob dir_layout lifecycle
-11a24f5 mds: set root dir_layout during mkfs
-09b2db7 mds: use helper to update inode from EMetaBlob during replay
-f5958ad mds: set dir layout during replay
-cdc2b89 mds: set root inode default_file_layout on mkfs
-994525a mds: fix typo in EMetaBlob encoder
-50d91f6 osd: less chatty in log about caps
-95e273a mds: zero inode layout for dirs
-3e56ac4 dump backtrace when getting sigsegv and sigabrt
-e4d86f3 client: Fix truncate_seq/truncate_length initialization. Initializing to 0 was causing file_to_extents to get called on every inode since the MDS initializes truncate_seq to 1 and truncate_length to -1. This revealed itself as a crash on directory inodes, which have their layouts zeroed since merging the file_layouts branch. To make clearer, assert that anything being truncated is a file inode.
-ede3763 mds: fix LocalLock xlocking by replacing default
-5febcb9 osd: read_log: clear the pagelog if it is corrupt
-f4581e0 mds: fix ESession/ESessions event id type again
-ff463df filestore: drop unused parse_coll() declaration
-2b4eb4a add set layout ops to ceph_strings
-8938f27 cephfs: Wrote and committed cephfs
-45fa4a2 mds: Conditionally encode default dir layout.
-212c189 client: update test_ioctls to test new stuff
-b588983 always throw by value; always catch by const ref
-fbbf448 client: import ioctl header from ceph-client
-64c3556 mds: fix setlayout truncation check.
-cb7b360 mds: misc fixes for dir default layout projection
-2d194c6 mds: If a projected inode has a dir_layout, we now encode it to disk.
-42c7ed4 mds: Implement op CEPH_MDS_OP_SETDIRLAYOUT.
-79d1893 mds: zero out the layout in handle_client_setlayout
-54e95fe mds: Look for and make use of directory tree default layouts, if existent.
-01ae1be filestore: make list_collections() list all dirs
-940354b osd: make load_pgs verbose
-0b7c1af mds: fix setlayout truncation check.
-c9e6955 mds: zero out the layout in handle_client_setlayout
-8a5008b mds: remove unused CompatSet mds_features.
-f389afc mon: add 'mds fail N' command
-cdf43d5 buffer::list::copy: complain about invalid strings
-e87f751 mds: fix and use add_replica_stray() helper for handle_dentry_unlink
-e18001c mds: fix stray replica push on _rename_prepare_witness()
-26511cf osd: revamp forgetting lost objects
-36067ea osd: revamp forgetting lost objects
-5e45030 osd: move PG::Info::coll to PG::coll
-e305ea0 osd: cache coll_t in PG
-5b798a3 osd: fix recovery_primary loop on local clone
-aaa58f5 gitignore: Ignore cscope and vim temporary files
-a4138c9 osd: generalize coll_t to a string
-0e67718 mds: drop bad assert
-ea6286a Makefile: add missing include
-7657a6d interval_set: hide data members
-b9f2816 Makefile: add missing include
-548df8e mon: Fix issue first addressed in 2c5a3d99aa3be5ce114072e84f73a0a6426e63fd. We were properly falling out of the while loop when we reached end(), but not checking for it in the following if-else. Now we do! Reported-by: Henry C Chang <henry_c_chang at tcloudcomputing.com>
-0523ce1 osd: do not request backlog from peers with empty pg
-aa04c8f osd: try to object from other replica(s) on EOF
-3bab6ac Add the setup-chroot.sh script
-2223b22 osd: clarify comment in recovery code
-ab62aab msgr: Don't take over old pipes if they're lossy. Fixes bug #443.
-d8f595e Implement interval_set::const_iterator
-fb41b8f Rename interval_set::begin and end
-5a9a5e7 rgw: send 100-continue response only if requested
-da41f66 mds: set PREXLOCK next state to LOCK
-f1921c3 mds: don't block request on freezing if we're already auth_pinned.
-569d96b rgw: fix meta attr setting when doing copy operation
-ead92c4 mds: block request is freezing
-2ae0172 osd: add coll_t::is_pg() method
-afa2d2f mds: fix ESessions event type
-44587aa mds: fix xlock state asserts for LocalLock
-1d7eb8a mds: fix locallock rule (missing column)
-f4114cf mds: add rename failure hooks
-87d5df1 osd: fix pull completion tests, again
-0a719d5 ceph: make version in backtrace look nice
-27f712a osd: clean out redundant (and wrong) complete calculation
-574fc5a mds: Create struct default_file_layout and encoder/decoder functions. Also enable the state transfer when lock state changes.
-eb0a3fa osd: make sparse data/clone push behave with partial object push
-7ca8e38 mds: defer MExportDirDiscover until we have root inode open
-ea49ea6 mds: alloc auth xlock on versionlock/LocalLock
-63bc150 mds: defer cap release and update consistently when frozen
-7f329df mds: refactor process_cap_update a bit
-82e52b4 mds: drop old/incorrect comment
-f0c89ba mds: always mark parent scatterlock when marking dirty rstat
-416470d mds: mark dirty rstat inodes during recovery
-c503d36 mds: error to log when inode/dirfrag rbytes get out of sync
-143438a mds: stubs for printing projected fragstat/rstat
-28a4c34 mds: assimilate dirty rstat inodes during scatter_writeback
-c0d7e8f mds: maintain dirty_rstat list
-29b1e84 mds: add dirty_rstat CInode elist, state, pins
-810ff49 osd: remove assertion
-628e28e qa: improved rgw tests
-0ccdd6e osd: add checksums to pg log
-f7f32b2 makefile: drop quotes on tcmalloc CXXFLAGS
-043c9c8 mds: scatter pin frozen tree on importer too
-c82bc1c mds: drop dead Renamer code
-2fbd843 mds: clarify inode dirstat/rstat locking
-b108b6a mds: fix bounding frag rstat/fragstat update during import
-1c09263 mds: do not scatter_writebehind on nudge if replicated
-d715338 mds: use scatter pins for migration instead of rd/wrlocks
-961e186 mds: add scatterpins
-690607c backtrace: include ceph version
-113a9bc mds: always pass pick_inode_snap the head
-1eaec17 qa: add simple rgw test
-56ae116 mds: remove unused CompatSet mds_features.
-0277823 mds: add policylock to the inodes. This will be used to cover per-directory default file distribution policies, and maybe other things that come up.
-2e5fa67 mds: fix eval_gather() for non-auth inodes
-79b6f2f mon: return errors (not 0) from MonitorStore::get_bl_ss()
-a783f40 mon: move election start reset to starting_election() helper
-79166a2 mds: distribute flocklock properly!
-6efd1e8 mds: distribute flocklock properly!
-96c08e4 mds: Make SimpleLock wait shift bits unique like they should be.
-84a09ba mds: Make SimpleLock wait shift bits unique like they should be.
-2c5a3d9 mon: Fix infinite looping, if failed_notes is empty.
-2e71037 mon: add debug output
-01b58f3 msgr: do no open connection when policy indicates we are lossy server
-4b4bdb4 rgw: url_decode url prefix
-8fc9adf rgw: url_decode delimiter
-c336857 Makefile: move tcmalloc checks outside of FUSE checks. Whoops.
-ca2f2d5 mds: enable tcmalloc profiling on MDSes. Add commands to start/dump/stop.
-a850708 osd: enable tcmalloc profiling on OSDs. Add commands to start/dump/stop.
-0ef684d config: build infrastructure for handling tcmalloc's profiling.
-381447d qa: add snaptest-git-ceph.sh
-6cb6aa1 mds: correctly set straydn->first for rename target
-b7c4185 mds: do full pre_dirty()/mark_dirty() on cowed dentries
-3aa948f mds: only return pdnvec for full path_traverse
-fa277ae mds: don't instantiate null dentries for snapped namespace
-f080bb9 rgw: url_decode delimiter
-23b1b52 makefile: build cfuse with tcmalloc
-f4be4b9 librados: throttle messages via the objecter
-e64109e objecter: enable automatic throttling of all messages
-0c800a9 objecter: add accounting to keep track of total in-flight messages.
-c8de979 Revert "throttle: make count an atomic_t"
-e4e37a9 (tag: v0.21.3) v0.21.3
-df1d5d8 cauthtool: update man page
-ce63cf4 client: increase default cache size to 16K dentries and lru insertion point .25
-487b8a6 debian: allow builddebs.sh build a specific dist
-67f1f1d rgw: get_data should not be initialized after being set
-06e27d5 rgw: make gateway dns name configurable
-5cf850f debian: make update_pbuilder.sh update a single dist at a time
-2eee1af makefile: add some flags recommended for use with tcmalloc.
-29c4037 mkcephfs: use new cauthtool --cap syntax
-2dbc44e vstart.sh: use new cauthtool --cap syntax
-028fdf8 cauthtool: add simpler '--cap key val' syntax
-a6b1a5e mds: drop x/wrlocks before, rdlocks after sending reply
-9b93367 mds: touch missed dentry when fetching dir on path traverse
-2e5731b qa: update snaptests, add snaptest-multi-capsnaps.sh
-22d2113 client: Make truncation work properly The previous if block didn't work because inode->size was usually changed well before handle_cap_trunc was ever invoked, so it never did the truncation in the objectcacher! This was okay if you just truncated a file and then closed it, but if you wrote a file, truncated part of it out, and then wrote past the (new) end you would get reads that returned the previously-truncated data out of what should have been a hole.
-1a4bbb7 osd: copy truncate_seq et al to clone oi
-0023c88 osd: fix is_pool_snaps_mode() for empty pools
-3f8b3f7 throttle: make count an atomic_t
-63898bf update TODO
-fd0b1d2 init-ceph: fix log_dir creation
-52f83d9 rgw: fix cleanup for certain ops
-3c14051 rgw: fix cleanup for certain ops
-2a6fcfd mds: update realm parent pointer and pin parent inode changing realm past_parents
-1847dbf mds: need_snapflush for all snaps intersecting cowed inode range
-973133e time: format dates based on ISO 8601
-2af8806 mds: include tid in MClientCaps printout
-7aae37c throttle: add non-blocking get_or_fail method
-409bc41 addr_parsing: make more resilient; turn down debugging
-902b1c1 monclient: parse named addresses, not just IPs
-2dc3a01 client: in choose_target_mds, break parent lookup if inode is unlinked.
-c6447c7 mon: only remove laggy standby mds's; mark others laggy
-e77ca65 mds: don't suppress cap on eval following do_cap_update
-c1faba7 Revert "msgr: Test reconnect protocol changes."
-5dd9a45 objecter: remove unused bufferlist
-fb6454f objecter: remove unused bufferlist
-7349bce msgr: Test reconnect protocol changes.
-08f5cdf msgr: when both ends support it, exchange in_seq values on reconnect to prevent gratuitously re-sending messages.
-412f530 msgr: Let requeue_sent remove items completely, given a seq to remove from.
-1d5e6b2 msgr: If one Connection/Pipe replaces an old one that faulted, fully replace.
-ac0a178 client: don't crash on cache readdir of empty dir
-d10d76f client: implement readdir from cache
-1aa96a9 client: maintain dn->offset
-850ac65 client: remove stray dcache items while insert readdir results
-dc773de client: buffer name->ino linkage only; do stat at time of readdir
-6346aae client: only parse readdir result once
-100dd7b client: keep map<> _and_ hash_map<> of dir names
-778c0bd client: avoid trivial helper _readdir_add_dirent
-3be64f1 config: fix buffer overrun in env_to_{vec,deq}()
-3695de1 osd: fix osdcaps parsing negative return value
-c8da246 filestore: handle error opening fsid on mkjournal
-0fd8934 filestore: handle error reading current_op_seq_fn
-daa733a filestore: return on error creating fsid file
-1a16c01 filestore: fix error paths for _clone()
-eeeaf7a moncaps: fix array out of bounds in parsing
-5f7a999 osd: handle nonexistant file in ager
-ca4bb65 osd: check for errors in open, write in write_meta()
-c7658de str_list: fix buffer index when start<0
-ad8a0d9 mon: remove laggy standby nodes (instead of marking laggy)
-23b8198 mds: re-add if standby and removed from mdsmap
-c25d9a4 osd: don't create clone_obc on replica
-ffad213 osd: don't leak map_in_progress_cond
-ed1f0ca mon: less log noise
-cf82ada init-ceph: mkdir log_sym_dir only if not default
-8aa15c4 mds: propagate accounted_* into dirfrags on scatterwriteback
-fb96c17 mds: don't xlock and wrlock same dn->versionlock
-0f963b5 mds: drop useless virtual-ness for finish_scatter_gather_update
-89af63e mds: journal dirfrag accounted_{r,frag}stat on inode update
-30f9795 mds: in cinode debug, only show nl= if != 1
-2a534d7 init-ceph: mkdir log_dir and log_sym_dir
-e47cd48 mon: be a little more conservating in MOSDBoot handling
-a34eddb osdmap: allow blacklist of an entire ip
-33fdb9d mon: add 'osd blacklist ls'
-ad40652 common: close fd after parsed config file
-6bc8090 mount.ceph: exit with error code from mount
-bdd5c16 mon: 'osd blacklist (add|rm) addr [duration]'
-797950e mon: fix up variable names to be more clear this is an inclusive range
-2a07960 mon: fix osdmap subscribe range
-6cefd5f mon: fix send_incremental ranges; behave when sending just 1 inc.
-e7462f9 mon: handle subscribe to osdmap=1
-611ba9d objecter: remove unused bufferlist
-448d3d5 mds: fix journal replay of session close->open after reconnect
-9e383c7 objectcacher: fix use-after-free atomic_sync_readx
-717f458 mds: fix use-after-free
-bb4d45d mds: fix use-after-free in snaprealm_create_finish
-5e98e2d objectcacher: cleanup release(), just to be clear
-4ccf69b objecter: add missing return in list_objects
-c30fde4 objectcacher: fix use-after-free
-3eb332a mount: fix scope of secret[]
-066a588 crushtool: fix bucket type array bound check
-9434b12 rados: fix delete[] in aio_bencher
-1de5617 client: move readdir code around
-c8be0a5 client: reimplement getdir() with readdir_r_cb()
-d558674 client: reimplement readdir
-eefabc7 cfuse: use readdir_r_cb
-561f302 uclient: implement readdir_r_cb (callback based readdir)
-a4a1448 mds: sync replicas after finishing XLOCK gather
-bc90591 mds: fix replica state for mix->sync
-397e3a1 mds: don't export any system dirs
-046a86f mds: authpin non-auth items we may need to REQSCATTER or REQRDLOCK for any lock type
-b7b77ff Revert "Merge branch 'auth_change_waiters' into unstable"
-2c47edc mds: lock path, parent dir scatterlocks _after_ freezing
-4084bf3 mds: can next state lockability checks in eval_gather
-f0e22fc mds: don't allow read in sync->mix2 state, request rdlock in sync->mix
-8698692 mds: rename process_reconnected_caps()
-ae7dcdf mds: make is_dirty() const in parent and child
-f6f8e5c mds: choose lock states for nestlock and dftlock too
-4205b7d mds: choose lock states on all inodes, not just those with caps
-a478ab5 mds: choose LOCK if !replicated and dirty scatterlock
-c80a1d0 mds: fix bad iterator usage in process_reconnected_caps()
-518b95d mkcephfs: fix bad |
-7f9bab9 osd: log error instead of crashing on failed pull attempt
-59f75d5 rgw: send status: 100 after auth code to signal fastcgi module
-52aa8be rgw: update the rgw_admin usage
-5ae8e26 class: fix adding of class library, when previously existed
-46a16b9 mds: fix bad iterator usage in process_reconnected_caps()
-783d2ed mon: more useful class debug output
-f24cee3 (tag: v0.21.2) ceph v0.21.2
-85814d4 client: Make truncation work properly The previous if block didn't work because inode->size was usually changed well before handle_cap_trunc was ever invoked, so it never did the truncation in the objectcacher! This was okay if you just truncated a file and then closed it, but if you wrote a file, truncated part of it out, and then wrote past the (new) end you would get reads that returned the previously-truncated data out of what should have been a hole.
-610b2e9 osd: fix class timeouts
-79f86c9 osd: clean up class loading code a bit
-412a1c8 osd: less log noise
-20da360 osdmap: whitespace
-9ee5842 osd: use cluster msgr to share map with old hb peers
-c3b97ff osd: mark down old _from connections too; and fix old _from debug output
-41cd1ea osd: don't mark down old _to peers that are still _from peers
-d273c99 osd: always mark down old hb peers; send map update via cluster link
-7d1179e filejournal: clean up journal initialization sequence, error codes, output
-4e30032 mds: omit lock state in debug output when it's uninteresting (sync, no locks)
-6dae938 qa: rename snapmove -> snaptest-parents
-f429dc8 osd: don't reply on missing class
-c1a8c30 mds: only wrlock filelock during max_size changes on the head
-27cc3bd qa: add snaptest-dir-rename.sh
-54d661a qa: add blogbench test to qa
-4963675 debian: don't need to add .git_version in release script
-7fde620 makefile: include .git_version in tarball
-b33c051 mon: error out gracefully when we can't read the magic
-655199a mds: fix invalid comparison.
-98cf3c3 client: don't improperly conclude COMPLETE on empty dir
-1c176ee qa: clean up snaptest-* suite a bit
-4f3407d client: don't print inode, it might be NULL. This is especially bad because you can't start cfuse with debug level 20.
-5b099f5 Revert "qa: remove random ordering from runallonce, for predictable resource matching" This snuck in by mistake in the leaks merge.
-f07fdee client: only includee xattrs in caps msg if we are flushing that bit
-99674a5 client: queue capsnap on any dirty metadata
-d34c778 mds: fix cow_old_inode to properly save xattrs
-c9b1c54 mds: fix snaprealm create split
-ec02fe3 mds: no snaps in system dirs, but root is ok
-2f2cccb mds: drop old debug output
-f32a880 mds: rename project_past_parent -> project_past_snaprealm_parent
-ac12b0c mds: drop unused projected_srnode list
-7172a63 qa: snaptest-xattrwb.sh
-10ed520 qa: chmod +x snaptest-authwb.sh
-08920f4 mds: expose projected values for all locks to loner (not just filelock)
-25cc145 mds: do null snapflush as soon as we have all file wr caps
-cd92072 mds: fix null deref of cap in do_cap_update when doing intermediate snap updates
-c4ab621 mon: add clock sync backoff to handle_lease_ack
-6998372 mon: Adjust lease time checks.
-067d8bb mds: don't auth_pin non-auth wrlock targets
-8d46243 mds: don't auth_pin non-auth rdlock targets
-aa226df mds: add wait on auth change machinery
-fa11800 Revert librados portions of b0a8f6be815a03db36ef14e5006425c60951e396 and 6289b3e409acd050937bd23fba268f61e03ab30f. These were never meant to occur, just a tool failure.
-46bf806 mon: ignore osd boot with bad addr
-cde89c5 mds: only revoke client leases when there are leases in AC_LOCK handler
-45ab5ac mds: fix retry on discover_*
-8588100 mds: ignore reqrdlock if frozen
-3adccf5 mds: handle REQRDLOCK on simple locks too
-5ec305d mds: eval inodes with caps after import
-d636223 msgr: release dispatch_throttle on reset connection
-fc8176c qa: add test for snapcap writeback of auth bits
-8950599 qa: test xattr snap wb
-c85a499 osd: disable potentially dangerous dead code
-1ac5675 backtrace: fix segfault in tcmalloc. The print function is only called when we're about to crash anyway, and the datamember 'foo' is allocated by ptmalloc, not tcmalloc. Freeing it via tcmalloc causes its own crash which pollutes our debugging and incorrectly sticks tcmalloc into the stack. So, just don't free.
-0a98202 mds: fix get_projected_srnode. We might have projected nodes without projected snaprealms
-ee912be mds: remove compiler warning in CInode
-34dbf80 mds: fix get_projected_srnode to actually find an srnode, instead of returning the (possibly NULL) last projected_node has set
-5835a79 mds: remove unnecessary silent fallout from add_primary_dentry.
-f669adb mds: drop old thrash_exports time limit
-cfdc5f0 osdmaptool: print useful error instead of crashing if osdmap is corrupt
-ec80b10 crush: return error instead of BUGing on bad forcefed mapping
-80c8902 mds: return error to client on invalid mds op
-4007669 mds: fix ENOTEMPTY checking on rmdir/rename
-6ea292d mds: drop projected_snaprealm_ptr
-12a5801 mds: drop projected_xattrs_ptr
-6aec681 mds: allow you to DELETE snapshots in root directory too
-c60db74 osd: disable potentially dangerous dead code
-6b92231 backtrace: fix segfault in tcmalloc. The print function is only called when we're about to crash anyway, and the datamember 'foo' is allocated by ptmalloc, not tcmalloc. Freeing it via tcmalloc causes its own crash which pollutes our debugging and incorrectly sticks tcmalloc into the stack. So, just don't free.
-b1350c9 mds: fix pick_inode_snap
-84e835f mds: fix intermediate snapped inode updates
-22bd837 osd: disable potentially dangerous dead code
-3b5a53f utime: microsecond -> nanosecond resolution
-b18ee37 backtrace: fix segfault in tcmalloc. The print function is only called when we're about to crash anyway, and the datamember 'foo' is allocated by ptmalloc, not tcmalloc. Freeing it via tcmalloc causes its own crash which pollutes our debugging and incorrectly sticks tcmalloc into the stack. So, just don't free.
-0d5829e mds: allow snaps in root dir. This may be too large a stick, though
-8c5ffdb mds: CInode should set projected_snaprealm_ptr to NULL if we pop the last one!
-233ed55 mds: project_snaprealm in project_and_dirty_inode. Fix users.
-35ea515 mds: journal snaprealm changes in MDCache::journal_cow_dentry, if a new snapnode exists.
-481402a mds: implement get_previous_projected_xattrs; use in MDCache::cow_inode().
-6d8f0f0 mds: move snaprealm projection to operate cooperatively with inode projection.
-2716c0c mds: move inode and xattr projection into projected_nodes list.
-b279a50 start switching to use projected_nodes in projection and journaling code
-e3aacf6 mds: CInode: create new projection_node with pointers for inode, xattrs, and snaprealm.
-7aac992 notes on snaprealm projection in project_inode situations
-228613f mds: CDentry. Remove needlessly redundant inline if-else.
-c63ca5e qa: add simple snaprealm test script.
-e3654df mds: make null snapflush helper, and call on cap removal too
-02522af mds: simplify/fix early null snapflush check, clean up comment
-d0f6991 osd: carry ondisk write lock for cloned objects
-824de0d mds: fix crash when REQSCATTER races with an actual scatter/MIX
-c8701f2 mds: fix null snapflush logic
-f3b323f mds: don't send null ack in do_snap_update
-466c002f qa: add snaptest-snap-rm-cmp
-0bcdd0b mds: remove forward-on-nonauth-rdlock behavior
-e8f56d3 auth: fix skipping of ~/ if $HOME subst fails
-28d7a40 mds: oops, fix null snapflush fix
-9908c0e mds: clean up {have,get}_inode() definitions
-625ffd3 mds: fix null snapflush inode lookup
-9092d65 rgw: fix commit warning. size_t is a long unsigned, not a long long unsigned.
-5a89b8b qa: add simple snaprealm test script.
-6d0ccd9 mds: handle no flushsnap
-9dd2ffd qa: snaptest-capwb check no snapflush case first
-d2205a9 qa: snaptest-upchildreams.sh should clean up after itself
-2551651 qa: add capwb check for case where client doesn't send flushsnap
-5f9cc44 mds: fix rdlock referral on snapped inode to head
-60596c7 mds: drop x/wrlocks before, rdlocks after sending reply
-caec5d2 client: direct requests in snapped namespace based on nonsnap parent
-a4930d9 qa: add snaptest-estale.sh
-4b6deda qa: make snaptest-2 output less ugly
-945c62c mds: make inode first track dn first on rename
-cc8f5ac mds: make new inodes follow dn->first
-7beeecc mds: Use project_past_parent and pop_projected_snaprealm instead of add_past_parent hack.
-b590b4b mds: use snaprealm projection in rmsnap
-d7ac8ee mds: use snaprealm projection methods for mksnap
-830b62a mds: Move SnapRealm::project_past_parent to the CInode and fix users.
-e4ea064 mds: move snaprealm projection into CInode
-bb0dcd2 mds: add SnapRealm projection methods
-6289b3e mds: rename SnapRealm::snaprealm to SnapRealm::srnode
-b0a8f6b mds: switch all SnapRealm users to make use of snaprealm.
-ca1d1ed mds: create a new sr_t struct to hold versioned data of a SnapRealm.
-2921e13 mds: flush log on cap writeback if !dirty and unstable locks
-18cf92a mds: show cdentry authpin debug state
-eb5213e qa: show rm/cp progress on snaptest-2
-4e9ae5d qa: add test that client updates realm children on snap update
-064c248 client: correctly direct snapdir requests
-ab20269 qa: add snap-rm-diff.sh to look for issues with snapshot integrity. Currently passes the script, although running these steps manually (especially with smaller files) fails a fair percentage of the time for me.
-1a0ab55 mds: only kick head on snap rdlock if in SNAP_SYNC state
-cdb8a98 monclient: gracefully error out when given an invalid monmap path
-2733199 osd: update missing_loc earlier in push
-e5c0912 debian: fix tcmalloc dependency
-165c5f2 client: fix xattr cap writeback
-0be7dcf client: fix capsnap writeback of uid/gid/mode/xattrs
-462d317 ceph.spec.in: require, build with tcmalloc
-49f3ac4 debian: require tcmalloc
-9069b8e mds: only kick head on snap rdlock if auth
-c5e5237 filestore: fix throttling on journal, op_queue for parallel and writeahead
-c3e0915 filestore: fix race in op enqueuing to ensure throttle limit is honors
-bfee1fa objectstore: fix transaction get_num_bytes
-c4b7c97 mon: mon_clock_drift_* for consistency
-c1da827 msg: use RefCountedObject; overload get() only to cast return type
-998d97f osd: whitespace
-dcedfb8 osd: improve l_osd_buf accuracy
-4280200 buffer: fix/improve debug
-a3eefd5 msgr: don't leak message when sending to a closed connection
-a406cfa osd: log push ops as push, not pull
-d00f43a logger: fix logger counter reset
-7aa332c (tag: v0.21.1) ceph v0.21.1
-255bf71 mon: use elector's epoch
-acd17a5 Makefile: include logrotate.conf in tarball
-a234df0 debian: fix update_pbuilder.sh
-13defe0 mon: rename mon_lease_wiggle_room -> mon_allowed_clock_drift
-0e7cfc6 mon: backoff clock drift warnings
-fd080d5 osd: write (empty) log, bounds on remove_pg start
-d708a74 rgw: fix content length encoding
-c8e7e1a mds: remove an extra m->put().
-e5923ac mds: open_remote_dirfrag: don't lose an op if a remote mds is down, queue it!
-062f531 mds: add documentation to MDCache, Server, Locker
-0c6c48c mds: add documentation to Locker, MDS, TableServer, Objecter
-43af88e MDBalancer: fix a few leaks, add documentation.
-5cbbf10 mds: Server documentation and some leak fixes.
-744e372 MDS: Migrator leak fixes and documentation.
-3ebc768 mds: MDCache documentation, and a few missing puts.
-195c382 mds: remove dead code
-f1eb9a8 osd: clean up ReplicatedPG leaks and comments
-6573a1a osd: put message before shutdown.
-c81be3b osd: rename shadowing variable for clarity
-a43897b mon: delete Subscriptions, don't just clear them. Fixes minor memory leak.
-9c18972 auth: delete Exception once it's caught; fixing minor memory leak
-8dd4b46 msgr: Fix leak of authorizer
-5e04249 conf: fix memory leak
-a8786f8 monclient: fix memory leak
-6a3baec auth: fix memory leak
-4cbe2b4 filejournal: fix small memory leak
-ae6a530 auth: delete char array, fixing memory leak.
-4916cc1 auth: no need to duplicate character arrays, just turn to string implicitly Fixes small leak.
-9893269 osd: Remove PG::preprocess_op. It hasn't been used for a while now.
-768eb41 osd: remove some very dead code from ReplicatedPG.
-6b93dc9 filestore: flush using sync(2) hammer
-8778bac qa: remove random ordering from runallonce, for predictable resource matching
-9ac243e mds: fix snap lookups in CInode encoding
-fc37591 tcmalloc: add support for tcmalloc.
-f5487fd mds: don't try to recover filelocks if the client didn't encode any
-fd43724 osd: simplify class waiter list
-840530e rgw: make gateway dns name configurable
-92665f8 client: fill in num_fwd in messages to mds
-2cac166 osd: class load shouldn't hang when failed to load
-8100841 qa: echo output
-af96ba5 fiemap: fix include
-185f4e5 fiemap: move read_fiemap from rbd.cc to fiemap.cc
-bce3a63 mds: fix send_message_client_counted helper
-ec91ea1 mon: add 'mds compat rm_* id' commands to adjust mdsmap compat set
-823c36c autoconf: detect existence of linux/fiemap.h
-d97e42e mon: automatically incorporate new incompat features into mdsmap
-846e979 mds: include compatset in beacon message
-9cdd4a6 mds: add incompat clientranges bit for the format change
-7e00212 qa: add snap test for cap writeback
-afb8cdf rbd: implement copy operation using sparse_read
-4a4d687 mds: non-head requests always rdlock as_anon
-af92287 rbd: use sparse_read op for export
-6f38165 osd: implement sparse_read
-1fba876 mds: write flushsnap cap metadata into old_inode if appropriate
-acfcfa0 mds: ensure that rdlock on snap filelock flushes data
-f8333de mds: rdlock head when snapped inode is snap->sync
-81ab0a0 mds: do not clone caps to snapped inodes
-2f03347 mds: group finishers after eval_cap_gather does all locks
-77ee6dc config: set osd_min_down_reports to 3.
-5a8a218 osd: only access failure_queue while under heartbeat_lock.
-d979e48 osd: Adjust failure reporting.
-83e5825 osdmon: Adjust failure reporting.
-7f9cef0 makefile: define docdir for old automake versions
-773dd82 monmaptool: man page typo fix
-aa5eced osd: add a mapext operation for mapping extents (fiemap)
-e2bb2e7 rbd: import using fiemap
-5b5c006 osdmap: only decode internal addresses if map is new enough version
-6f7523a rados: -i and -o are still there for other commands
-a7038da ceph.spec.in: fix docdir paths
-1cf4501 ceph.spec.in: fix sample.ceph.conf chown
-1ecda51 rados: fix usage
-ef711e2 osd: fix heartbeat to/from map updates
-fa27b31 osd: cover map_in_progress by osd_lock instead of an individual lock. The separate lock is no longer needed and removing it reduces lock contention and makes it easier to avoid races elsewhere.
-207a1bd osd: Unlock osd_lock in _dispatch before locking handle_map_lock
-2fbf1e9 osd: switching dispatch_running to be a counter Now it works with multiple messengers dispatching.
-c7d2352 osd: guard _dispatch to prevent execution of new messages while the map is updating
-dfb85d2 osd: adjust map_in_progress guarding
-c26cb72 cosd: adjust client/cluster messenger setup to be more consistent and poison better
-b588a56 config: Error out when you can't parse an addr from the config file.
-d7d615b osd: use the client_messenger for the logclient.
-42c0085 osdmap: remove unused versions of get_[cluster_]inst
-24989fe OSD: use get_cluster_inst instead of get_inst when checking other OSD instances
-595543f osd: when checking OSD identities via require_same_or_newer_map, use cluster_addr
-cec513f osd: add Mutex and flag to cover execution of handle_map_lock. Fixes a crash when the cluster and client messenger both dispatch an OSDMap and their handling gets intertwined.
-28b5497 osd: be more careful with cluster/client messenger use.
-582f928 osd: register the OSD on cluster_messenger if needed
-d6c8f8c config: correctly notify when OPT_ADDR config options are found.
-d0f7412 config: add OPT_ADDR type, move "public_addr"/"cluster_addr" processing there Necessary side effect: move public_addr/cluster_addr into g_conf.
-382290e messages: add cluster_addr to MOSDBoot, use it in OSD and OSDMonitor
-d290a04 cosd: move messenger existence checks to where they're useful
-7eeca9b cosd: create separate cluster/client messengers if separate addresses are provided.
-eb70820 msgr: set up bind and Accepter::bind to take in addresses and bind to them
-6abf48d config: rename g_my_addr to g_public_addr, add g_cluster_addr
-26ff6cb osdmap: move osd_cluster_addr decoding, and make sure that size matches osd_addr
-ed28d5e osdmap: Make sure osd_cluster_addr matches osd_addr size on decode
-ef9a4ee osd: remove messenger pointer, fix calls to it in PG and ReplicatedPG
-abff099 osd: use cluster/client_messenger as appropriate.
-7f70112 osdmap: add osd_cluster_addr to full map Include it in lookups and add get_cluster_inst et al to match get_inst et al
-ded7b8e osd: make new cluster_messenger, client_messenger pointers.
-bc9cb93 osdmap: make room in incremental for separate cluster/client OSD addrs.
-4ea24d7 osd: fix replies to dup/already-committed requests
-22a7d42 assert: only include acconfig.h ifdef __CEPH__
-0ffb08c librados.hpp fix
-be7d84b mon: fix signed/unsigned compile warning
-4bcba12 osd: fix map sharing with old heartbeat peers
-6573635 mds: fix cap encoding skipping when snaprealm differs
-ccdfcd3 osdmap: show flags
-0b964c3 msgr: Add CEPH_FEATURE_FLOCK to default features set, remove extraneous data from protocol
-aed240c ceph_fs: use __le64 instead of __u64 for over-the-wire data
-f30efb2 mds: new low-level debug output, and turn down previous debugs
-3e42191 debian: add ceph-client-tools dep to ceph
-f725f20 debian: move utils rbd,rados,csyn to ceph-client-tools
-c61a6c3 debian: move mount.ceph to ceph-client-tools
-9ccf9cb debian: move fuse-utils dep to ceph-fuse
-baa69ad cclass: fix .so loading file
-9bfb8da osd: send latest osdmap when we stop sending heartbeats to peer
-4a7c355 osd: avoid most of handle_osd_map if there are no new maps in message
-025bce6 osd: send heartbeat request from update_heartbeat_peers
-30cdc3d mon: drop redundant pg_temp mappings
-90a2f20 mon: make backward-compat mon id's start at '0', not 'a'
-88c17f4 osd: add asserts when indexing pg log by reqid
-e555ac6 mds: recover filelocks properly on client reconnect
-e501da4 mds: debug output and some comments.
-eb669ad mds: locking. Compare iterator to right list!
-c0eccba mds: locking. Fix waiting lock count map deletion
-8d85f34 mds: drop distributed locks on waiting filelock messages, so they don't block
-40bb86a mds: better printing on lock messages
-b4e9e4c mds: replace accidnetal __u64 with uint64_t
-5850363 mds: Determine if there are file locks based on flockbl size, not dirty cap bit
-fe0c511 mds: need to size values read from a bufferlist
-fa058c4 mds: handle file locking in MClientCaps on a reconnect.
-0d4bfea mds: locking. remove ceph_filelock* lists and replace with iter lists This allows for more efficient deletion of elements.
-2cfbddc mds: Fix ceph_lock_state_t to use uint64_t
-8dd1960 mds: locks. Fix possible naughty dereference, and fix existence checks
-b443f13 mds: locking. Keep trap of neighbors and coalesce them
-df81336 mds: locking. remove zero-valued client held/waiting lock counts from the map.
-8315b5d mds: Move lock print function; add debugging; fix fencepost errors.
-367ff97 ceph_fs: CEPH_LOCK_UNLOCK should have its own bit, for safety
-cc84546 mds: use the right size mask for file cap bits
-c14fa1d ceph_fs: Add cap bits for advisory file locks
-6a3600a mds: Remove unnecessary if check.
-8041253 mds: Now actually requeues blocked locks whenever locks are removed.
-71cf9d6 mds: fcntl locks can efficiently remove all locks from one client.
-cc652fe mds: fcntl. Keep track of how many locks/waiting locks each client has.
-0dbcdd8 mds: implement look_for_lock, for fcntl F_GETLK-style things
-5d375ea mds: ceph_filelock and filelock_change need to be explicitly sized
-68e592a mds: cleanup
-4ea76e8 mds: Implement file lock message handling.
-4520fdf mds: add distributed lock support for fcntl/flock support
-b7b349e mds: fcntl. add proper encoding to ceph_filelock and ceph_lock_state_t
-18b1d77 mds: fnctl. finish remove_locks so it'll activate whichever locks it can.
-e41056a mds: fnctl. add get_waiting_overlaps function; fix get_overlapped locks so that it won't do bad things if there aren't any.
-1fe8ab3 mds: fnctl. implement half of remove_lock.
-27ff76b mds: fnctl. implement adjust_locks method, with helpers
-b75fe3b mds: fcntl. implement add_lock function Still need to write some of the helpers
-f60e20e mds: fcntl. add skeleton [add, remove]_lock functions. Implement helper functions to be used later.
-aab26ff mds: add messenging support for advisory file locking
-eb3d9b4 msg: rename MClientReply::dir_bl to extra_bl. Fix uses
-fd61e1b mds: conditionally include flock metadata in MClientReconnect
-a11a319 mds: conditionally include flock metadata in MClientCaps
-6be6c48 mds: remove size, mtime, atime from cap reconnect
-2136ee7 mds: make mislinked dentry during replay workaround tolerate directories, too
-67236ae move logrotate conf out of debian/ to fix ceph.spec
-1d22196 auth: fix cast
-e372163 rgw: Support a loglevel of 0
-309f065 cauthtool: correct man page sample of minimal fs client caps
-7153244 rgw: fix setting acls on the bucket
-b502be7 move mkcephfs to /sbin
-7465b5e debian: more cleanups
-8b8fd7e auth: define AES iv in common header
-325b41a add files to .gitignore
-bcbad88 redirect stdout to /dev/null when reloading
-b72c1bb monclient: use default port if not specified via -m
-728c766 mon: we support MONNAMES feature
-11dc1af mon: fix signed/unsigned compile warning
-719aa18 debian: add update_pbuilder.sh script; don't do it during build
-f3ac22a bump unstable version to v0.22~rc
-090436f (tag: v0.21) v0.21
-ea2ce9d cclass.in: fix libdir definition
-fd4029c debian/ceph.logrotate: enhance postrotate for "service" util
-6db8975 mon: trim old logm states
-e1a9768 debian: ceph-cfuse: move ceph from Recommends to Suggests
-183984e ceph.spec.in: create /var/log/ceph/stat dir
-ce07f28 ceph.spec.in: rbdtool -> rbd
-b0616f8 debian: drop gcc, g++ build deps
-9c6ae54 release: drop wildcard
-487f0e8 debian: remove gcc/g++ build-depends
-58181fe debian: add trailing newline
-39a3db6 debian: fix debhelper depend version
-07d880e debian: update to latest standards version
-47688a4 debian: fix weak-library-dev-dependency
-3ed08a3 check_version: don't globber .git_version if we're not in a git repo
-8b0bf8e filestore: add option to disable use of btrfs clone range ioctl
-eb1f587 filestore: fix fallback clone_range implementation on short files
-43d28db release: put .git_version in release tarball
-9b8e2b4 pgmon: Remove creating_pgs which are from deleted pools.
-425e052 osd: drop broken (and useless) PG::merge_log assert
-05a18e2 mds: handle this log replay error better: Log it to the central log so it gets noticed, and delete the "wrong inode" instead of just unlinking it, to prevent later crashiness.
-b01cc38 rgw: set default log level to 20
-593937d librados: quiet down some log messages
-801150a rgw: Support loglevel settings
-6bd40ac qa: consistent snaptest-%d.sh naming
-9127cd9 mds: fix uninitialized LeaseStat for null lease
-5c714bf osd: log when we get marked down but aren't
-7fbe165 debug: no name symlink when explicit --log-file
-3de9c8d client: some whitespace cleanup
-8195899 qa: add localized version of Thomas Mueller's snaptest-2.sh
-2d35d24 rgw: exit after 5 seconds from SIGUSR1 anyway
-a48b150 rgw: fix that we return data when partial content is requested
-50a89fc rgw: handle sigusr1, get notified for shutdown requests
-3d1f307 rgw: fix returned error code in If-None-Match
-58cf95b rgw: Make sure all times are converted to GMT, so we can compare them correctly
-a2ba0d3 rgw: make sure error structure is initialized
-b628ba1 rgw: fix date/time format string
-d9ff7e0 rgw: fix return code for prepare_get_obj() on the fs storage
-577095b rgw: fix error status code
-017588e We should sent back the Last-Modified header in GMT as specified by RFC2616
-234b691 We shoud always return the Accept-Ranges header, with a GET or HEAD request, even when the client is not requesting for partial content.
-0acfd01 rgw: support partial content (206) response
-e2b1a4e mds: Use get_oldest_snap() (not first) in handle_client_lssnap.
-49c2183 rgw: remove unused label 'done' (compiler warning)
-0ae06c8 msgr: fix direct send to loopback connection
-997d67e mon: revamp subscribe protocol [backward compatible protocol change]
-fa48a1a mds: restore CInode::get_oldest_snap()
-bc9a795 mds: defer anchortable updates before CLIENTREPLAY, not ACTIVE
-0775c30 mds: get rid of old lease mask cruft
-ac9305f mds: fix lease revocation mask vs type
-9932e4b osd: on dups, reply if committed, or wait until ondisk
-47fd7fe osd: helper should reply with ACK on error, op flags on success
-fb359c8 osd: map indexed caller_ops back to relevant entry
-b033259 osd: maintain pg last_update_ondisk
-3733b17 initscripts: fix type.id check in ceph.conf
-b219435 osd: make assemble_backlog more tolerant of races
-b59cb10 osd: skip degraded objects we're already recoverying in recover_replicas
-c611192 osd: create missing temp collection/dir
-1d0c91d osd: populate in-memory snapset context with just-pulled SnapSet
-dd68483 osd: clean up size learning during pull
-9520917 mds: drop remove_client_lease return value
-74fcb6b mds: fix dentry lease mask/lockid disconnect
-c33171c mds: no return value for issue_client_lease()
-34957ff mds: fix lease issue mask
-15abbfb mds: create leases with non-zero seq
-92273f7 osd: log/debug hb set changes
-b33b53b osdmap: recalc num_osds after applying incremental
-4ab66fa osd: clean_up_local should ignore snapped, snapdir objects
-fdd13cb filestore: make stat print correct errno
-622e9b4 osd: simplify heartbeat checks
-9e3650b osd: red is good enough; don't blink
-9c1ceb1 mds: only try and lssnaps on a dir for as long as it's been around
-7bba844 qa: runoncfuse shouldn't start cfuse in background any more.
-f731d4d mds: fix snap lookups in CInode encoding
-ff53e9b mon: don't crash on 'osd pool set' command
-e986721 osd: zero ondisklog pointers when starting pg deletion
-16c0fea librados: remove use of snapid_t
-6b7693b objecter: default debug level 0 (no 'laggy' messages)
-d665d49 initscripts: use $type.$id, not $name, when possible
-de9262e initscripts: accept osd0 or osd.0, regardless of what conf uses
-ad1cd81 mds: be careful obeying REQRDLOCK
-b8c1bda debian: fix typo in libcrush description
-1271fdd mds: initialize snaprealm created, current_parent_since on creation
-93a2ba8 rgw: fix calls to finish_get_obj() with uninitialized handle
-0bd671f debian: drop unused *.modules.in
-68fc3fc debian: no more ceph-kclient-soruce
-dd9d23b debian: cleanup from Clint Byrum <clint at ubuntu.com>
-ef2ecda fuse.cc: make license GPL
-6cb3ea7 mon: specify default new pool size/rule/pg_num in conf
-24c7516 clean up new pool crush rule values [backward compatible protocol change]
-9ddb6ab osd: infer missing map is empty when last_complete==last_update
-e8eec86 mon: set/clear pause{rd,wr} osdmap flags
-856999e osd: clear failure_queue when marked down
-618f7f2 osd: clean up pulling first/complete business
-4624764 osd: push in chunks
-f3eb964 rgw: fix content-length reporting
-190df1c debug: fix log append
-538ceed debug: say 'append' or 'new' when opening log
-2483096 osd: wait for non-existant pools (w/o crashing); clean up handle_op()
-a0cd80c rgw: fix copy
-925e209 rgw: get/put read and write by chunks
-1e30dea osd: refactor push code
-eed7f72 rgw: lay groundwork for chunky read/write
-1d20183 osd: recover degraded objects _before_ modifying it
-2e521b8 osd: make client op version actual at_version
-f7cc6e8 osd: fix subop version in snaptrimmer
-71ff557 osd: observe osd_recovery_max_chunk when pulling objects to primary
-be8359a intervalset: implement span_of()
-2e137c9 osd: clean out temp pg on startup
-e0b6255 osd: create temp collection during mkfs
-a108774 osd: give coll_t an explicit type in {meta,temp,pg}
-b4b6a82 osd: add osd_recovery_max_chunk
-0b36674 mon: check command length on osdmon
-bf8aa18 rbd: add removal of snapshots
-9810f7e librados: don't read attributes until the callback is done!
-7315f4f rgw: rgw_rest: Properly return the content-length. From wido.
-344c431 rgw: rgw_rados: initialize the position in list_buckets_init!
-bee69c8 monc: be quiet about 'continuing hunt' too
-f00992c librados: librados.hpp should be standalone
-0656d0f mds: small EMetablob fixup
-fdd79de osd: always set snapset context if can_create
-8ea9cd5 mds: journal dirty items in order
-1ac265f mds: helpful journal replay debug output
-6364222 client: drop unnecessary #include
-74e3d79 mds: simplify rstat/dirstat debug printing
-00fae3a mds: remove bogus 'oldest snap' floor on lssnap result
-eb17387 lower loglevel for successfull mon hunting
-cf02db4 messages: fix MClientRequest::is_write(), rename to may_write().
-2d358a4 msgr: use in6addr_any extern for is_blank_addr()
-0d9b998 msgr: put brackets around ipv6 addrs
-5f6d077 mds: throw std::bad_alloc on boost:pool<> depletion
-1f7e11a rbd: fix usage
-d565ae3 rbd: rbd tool can parse embedded snapshots name
-b0a5cc2 rbd: update man page, other external tools
-851a734 mon: limit size of MOSDMap messages when subscribing
-17a31fd debug: fix append to log file
-cf6cc8b osd: oops, fix pool thing
-787ecb8 osd: MOSDOp: print snapc if snap_seq != 0, not when snap list is empty
-e8991f1 osd: use client or pool snapc based on _pool_ snap mode, not client op
-af65f15 rgw: delete bucket objects from root pool on destruction.
-27bd901 rbdtool: rename rbdtool to 'rbd' tool and change usage
-1454291 cfuse: return EROFS when attempting to modify snapshots
-9c90f7b mds: Check all write ops to make sure they aren't in a snapshot; return EROFS if they are.
-4884f74 rbdtool: fix add-snap
-8b96c3c rbdtool: rearrange usage
-2b02afd rbdtool: rename should first check source
-e61ceee debian: override lintian warning unstripped-binary-or-object
-d19f05a debug: fix debug rank symlink rotate when log_per_instance
-e0229b0 rbdtool: implement copy
-8f0da0a rbdtool: use canonical image name (pool/image)
-98bdd8d rbdtool: can read data using snapshot
-8921a18 mds: fix up snap cap issue logic comments
-372db05 mds: fix acquire_lock() calls in handle_client_open()
-3cbf578 mds: issue all snap_caps allowed given locks, not by current cap
-f5c4fc6 fix FCGI detection and specfile
-878a7de mon: avoid OOB m->cmd access in auth proprocess_command
-c91c8a3 msgr: brackets (not braces) for ipv6 addrs
-71b9daa debug: only truncate log file on open if log_per_instance is set
-876cca9 mds: termiante client sessions before flushign log during shutdown
-84d4c11 ceph.spec.in: create /var/log/ceph directory
-8ec5134 ceph.spec.in: add a build option for radosgw (--with radosgw)
-bf047a6 ceph.spec.in: add /var/lib/ceph/
-19886eb ceph.spec.in: add logrotate configuration
-293299f ceph.spec.in: set correct path for rbd classes
-9b74eb6 osd: print debug write before adding to transaction
-4701e83 msgr: return error and dethrottle if message decode fails
-b81273d debian: make helper scripts remember most recent release
-f456b51 osd: fix delayed pg creation use after free
-6612a1f vstart: specify osd class tmp dir
-9fd3f59 monc: make hunt, ping rates configuration
-a396fcb client: increase client mount timeout
-89c7d92 filestore: improve lseek64 error checking, and use buffer::list::write_fd()
-a3fa966 buffer: make write_fd() const
-303a1e3 mount.ceph: handle ipv6 addrs, colons, braces
-25ff6e4 ceph.spec: require libedit
-e0d443c ceph.spec.in: require binutils
-c5d86f9 debian: require binutils
-fd8ba5d debian: explicit postinst/postrm for shlibs
-ae82dd5 rbdtool: fix export
-1e08e4b mon: create new pools using rjenkins hash
-0764630 rbdtool: should support files larger than 2GB
-b977f4e debian: _do_ strip cosd
-cf38e86 class: make class tmp directory configurable, not /tmp
-2096d8d logger: shut up
-d5e3962 config: can use '-' as a config option
-0198990 msgr: remove fake orig_source_addr fakery
-6ae95b6 mon: fix message forwarding to use Connection to fake source addr
-243491e debian: do not strip cosd
-ed66dd5 classhandler: print error when dlopen fails
-cc5fcb9 ceph: drop version from ceph_fs.h, use autoconf VERSION macro instead
-6cca139 shell script fixes
-9432a95 mds: fix logger init on startup, rank symlink creation
-f6e1fd5 debian: do not strip rados classes
-a321ae4 debian: add postinst, postrm for ceph package
-4fb67c3 Makefile: cleanup
-0bf19e5 debian: put rbd classes in ceph, not librados1 package
-8d2393c osd: consolidate osd stats in _refresh_my_stats
-929f672 debian: include rados-classes
-b0e6e4f cclass: $libdir/rados-classes
-83d1ea6 logger: huge rewrite, cleanup
-1ca446d auth: rename supported_auth -> auth_supported
-74bd8d7 client: handle_client_session now careful opening mds sessions while unmounting
-0c345a9 client: put MDSSession pointers in the msd_session map, rather than the sessions themselves. This is a bit cleaner and clears the way to make it more closely mimic the kernel.
-c39ee59 paxos: send summary if observer has fallen behind first_committed
-5b09760 msgr: immediately drop messages with null dest
-a40631f mds: fix handle_dentry_unlink to handle remote unlink (no straydn)
-0fbb8ee mds: be less noisy about memory usage in log
-08f7406 ceph: --in-file, not --in-data
-89a40b3 osd: track pg_num by type in logger
-013df04 librados: add pool set_snap_context
-84bca03 client: take the first inode as root, rather than whatever comes out with ino=1.
-4a80e5e ceph.spec: install /etc/logrotate.d/ceph
-de66815 osd: document some of the logger stats
-fdcc241 rbdtool: modify usage
-cff705b config: allow optional parameters
-100b677 mds: do not include snapped inodes in EOpen or LogSegment::open_files
-a497c61 mds: print useful error on malformed EOpen event
-26b67ff Makefile: drop unnecessary dist-hook for make_version
-2950580 debian: simplify release.sh
-1d45074 Makefile: distribute check_version
-0f8099a radosgw: fix usage syntax
-b0056ad mount.ceph: ignore noauto, _netdev options
-b433625 debian: include libcls_rbd.so.*
-e240a27 cclsinfo: fixes for dash
-b150b68 ceph.spec.in: make -j and unpackaged files
-5338e7d Makefile: fix up ceph_ver.h autogeneration
-d724d2c Makefile: fix build when WITH_DEBUG not set
-0e70f21 debug: don't create rank symlink if log-file
-d059aa6 client: update ctime on setattr(no mask)
-cf7d180 client: return errors from setattr
-8b886df client: fix lookup error codes
-377a531 client: better debug output
-adf2f98 client: return ENAMETOOLONG where appropriate
-56cc68d qa: do untar_snap_rm on two different tarballs (medium and big)
-525063c client: fix f_namemax returned by statfs
-e5cef56 Makefile: make more random crap only build with WITH_DEBUG
-1b363dd rbdtool: implement import
-1cb1c25 client: remove typo
-818e793 client: synchronize metadata on fsync, when requested.
-ec2c31d rbdtool: cleanup
-da9353e osd: cleanup: move pools can into advance_map()
-d847a4f osd: fix null pg deref, put auid in PGPool, cleanup.
-2170c64 msgr: add config option to set stacksize of reader&writer threads
-76d2392 thread: force stacksize to be multiple of page size; clean up
-86111a0 thread: allow setting stacksize when calling create & check return value of pthread_create
-b031d11 update authors
-14a871a rbdtool: implement export
-3204f45 shift feature supported/required specifications into Policy
-3253ed4 msgr: add set_policy_throttler
-efc187e ceph.spec.in: remove mkmonfs manpage
-340cb06 ceph.spec.in: initrddir, not initddir
-7eb12d5 ceph.spec.in: some fixes
-9c3fc0a mkmonfs: remove all traces
-e63d3f7 mount.ceph: add mount options/flags
-9be9762 Makefile: add/fix ceph_ver.h dependencies
-89a6554 filejournal: make journal alignment max of block, page sizes
-67b9fa6 ceph: fix decoding of class incrementals
-9154b5f msgr: handle ipv4 or ipv6 addresses (untested)
-640eaad osd: caps configuration file uses pool names
-c6969f1 vstart.sh: added -c to the cclass execution
-9108858 osd, class: introduce public class methods
-ece7098 osd: pgpool keeps pool name
-a08c6f7 osd: modify caps calculation
-ed02afd cfuse: log_per_instance by default
-c2debcc man: install cclass, cclsinfo man pages; include in ceph.deb
-57aeed1 debian: add logrotate.d/ceph
-0233257 Makefile: link ssl to libceph
-7e5e519 libceph: Add check before umount in deinitialize
-139e820 hostname override option for ceph init script
-10476ad buffer: fix logic in write_fd()
-2c25029 mon: break loop if config file parsed successfully
-e006e79 msgr: fix dispatch throttler release
-bbbf240 cfuse: daemonize by default
-a7d4987 config: -f just means foreground; do not change log output
-21432ec client: start/stop objectcacher thread in init/shutdown, not constructor
-e38ed51 config: disallow -d|--daemonize
-2c7cd49 common: break init into set_defaults and init steps
-8043ee2 debug: fixup
-85e626d common: disable logger by default; make daemon settings explicit in (3) callers
-c253873 debug: add max count for name symlinks
-633af04 vstart: normalize pid file names
-79991ed debug: revamp debug/logging
-1bd46c0 client: set MetaRequest::inode to the inode or directory inode whenever possible. Provides link to caps, useful when requests come back ESTALE or similar.
-e5b60fa client: set inode/dentry fields where available
-beeb08b client: remove now-unused authority and pick_replica functions
-fa62e9d client: rewrite choose_target_mds to more closely mirror kclient logic and be correct.
-39796b4 client: make fragmap updates a little more space efficient.
-60f2672 client: add mds_num to MDSSession struct
-0992001 client: clean up Inode::authority
-4f2f78d client: move all mds selection code into choose_target_mds
-060d22d client: remove dead code
-194986a client: remove Inode::dir_auth data member
-abd26ee client: initialize auth_caps in Inode! Prevents bad pointer derefs.
-18c305a qa: set runoncfuse.sh to run cfuse in background and kill at end of tests.
-bfd335c rbd: some header cleanup
-77a1664 rbdtool: implement snap rollback
-2fdd43e buffer: handle write_fd() on empty bufferlist
-8410e6a osd: fix, cleanup ack/disk reply logic
-aa30dd1 buffer: make write_fd() tolerate zero length ptrs in the bufferlist
-3235abe msgr: clean up aborted message handling
-7cedafd msgr: release bytes reserved from throttlers in failure paths
-3c80b9d uclient: rename make_path; cleanup/move make_request_from_Meta
-e76ce44 man: add man pages for cclass and cclsinfo
-2f9ea76 filejournal: fix buffer realignment condition; useful debug output on error
-134a0d0 rbdtool: fix uninitialized variable
-0627965 rbdtool: implement rename
-015faa8 config: update __isarg before reading config param
-4d9f49a debian: include cclsinfo
-013f9e5 Makefile: include cclsinfo; lose the old .cc
-0812b8f Makefile: include cclass.in in dist
-f9dc4b9 buffer: write_fd should skip empty buffers
-96b1db8 rbdtool: init rbd block id, later will be used for rename
-c993090 cclass.in: LIBDIR=.libs in certain cases
-0f4ddba cls: cls_read, cls_cxx_read return the number of bytes read
-2ec729d config: use <<20 for MB
-2df8b9f script/plot.pl: don't pause
-fcc39c8 msgr: use dedicated reaper thread
-3e33402 osd: removed unused RepGather::indata
-852ab94 osd: change write osd logging timing
-419bd91 osd: always use original Connection when replying
-def4b40 osd: always include osd op result, result code in the first reply
-e85d98b osd: track open repops in logger
-ff8df7d osd: add 'logger reset' command
-fc1d166 journal: set max journal write to 10MB
-1d51798 conf:  fix parsing when there's no eol at the end of file
-d9dc7cb msg: fix entity_addr_t::parse() to return false on failure
-0cb7a71 mkcephfs: Fix wrong maxosd when OSD ids are random ordered in ceph.conf
-50f254d filejournal: fix journal write_pos advance
-d9554d5 mount.ceph: update mount options
-6bae200 msgr: fix throttle deadlock
-8f2731b crushwrapper: gracefully handle crush error
-928512f crushtool: add simple test function
-59b114a crush: fix "in" threshold to be 1.0, not 0.1
-19b4a5f cfuse: remove some NPEs with ESTALE from MDSes.
-bef0629 mds: keep cap follows above in->first in FLUSHSNAP
-eeede27 qa: read recently written/deleted data back from snap
-9795fab mds: fix client cap condition
-478fe72 ceph_fs: add CEPH_LOCK_IFLOCK so its inclusion elsewhere continues to build
-6282715 mds: add IFLOCK to wait bits to prevent collisions with lock branch
-7ce0338 crush: fix recursion through intervening types
-241d011 crush: make CHOOSE_LEAF to behave when leaf type is encountered
-8f7df4e client: resync with kernel's ioctl.h
-07cfbad mds: fix SimpleLock wait_shift()
-5634ce8 ceph_fs: add CEPH_FEATURE_FLOCK to ceph_fs so its bit doesn't get covered again
-58f4dce osdmap: negative osd ids do not exist
-b7ad8aa crush: behave when chooseleaf is given leaf type
-364521a mds: handle_export_caps, copy cap_import map (instead of swap content)
-43a7ec4 client: properly handle ESTALE by redirecting to auth MDS
-c89afb4 client: don't send cap snap message to MDS if not dirty or writing.
-2e73f73 mds: only acquire_locks once in handle_client_open
-2cd04f4 mds: rename handle_client_opent
-027b6c3 rados: more descriptive ls usage failure, stdout set implicitly
-4d86180 rbdtool: fix --list
-9051112 osd: fix incorrect logic check on fsid comparison
-9bbeec4 osd: Warn and shutdown on a mismatched fsid, instead of failing an assert
-c9af6de add helptext for option "snapdirname" to manpage of mount.ceph
-bf3d52a journal: initialize applied_seq during journal replay
-2540ea4 mkcephfs: push conf to remote machines
-3bfabd4 mon: allow 10ms clock drift before complaining
-775506e debian: include cclass
-d4173fa initscript: fix for dash
-1f2725b cclass: fix for dash
-6d83347 initscript: remove class loading for now
-b3dc5ec vstart: only need to load classes once, not for each monitor
-3a2c916 Revert "class: able to add classes when doing mkfs"
-fb1ad6e filestore: op_start when op is _queued_, so that q is drained on commit
-6a261eb journal: maintain applied_seq, use that value during the commit.
-ed768c9 buffer: fix includes for writev/iovec stuff in write_fd()
-a3e906e filestore: make sync() and friends actually sync!
-ae90ba1 initscripts: fix verbose output for root commands
-10d41d2 filejournal: only pad to align for data segments above 64 KB
-f98c0b4 filejournal: make alignment optional (<0 == no preferred alignment)
-3fbc2a2 buffer: remove debug cruft
-d162609 filejournal: pad entries on disk based on preferred alignment
-f59d77b objectstore: track offset, alignment of largest data segment [encoding change]
-0995f28 buffer: list::rebuild_page_aligned()
-25116b2 client: if checking caps on a snap, return, don't assert
-bd4188a filejournal: use buffer::write_fd() instead of open coding
-ca9b756 osd: implement bench command
-e4b9dd4 msgr: avoid calculating data crc is peer didn't either
-2bb94b3 msgr: Fix crash in policy.throttler->get(message_size) when message_size == 0
-3509543 qa: another mds test fix... wait long enough for the previous death to trigger
-c606713 msgr: ref count Pipe to avoid use after free
-920b2d8 qa: fix mdstable failure tests
-4d66a72 ceph: fix straggler header ifdef guards
-f4b9d9d Bug #98: Unique names for include guards
-6de2dde ceph: remove leading _ from macro
-9013832 Bug #98: Movement of an underscore for a data structure identifier
-57d79aa Revert "mkcephfs: cosd mkfs as root, then chown"
-081bbe1 mds: fix cdir head/snap items/null accounting
-e6b033a osd: make clean_up_local remove hardlinks from collection dirs
-af2d023 osd: don't requeue null OSDOp on apply_and_flush_repops
-8c5ee65 osd: fix snap_trimmer AccessMode interaction
-f976bbd filejournal: journal write cache is safe on >= 2.6.33
-583f9f4 mkcephfs: error out of journal dev is included in btrfs devs
-b472722 osd: optionally periodically check pglog for corruption
-b30ff17 logclient: clean up interaction with monclient, monitor
-d7b9f39 filejournal: log if journal item is larger than journal
-5dfc411 osd: warn when failing to mount journal on ENOTTY
-5c001f4 conf: can specify environment variables for substitution
-d599566 conf: fix buffer initalization
-ce909c2 osd: error out when failing to read journal header
-d971bb0 osd: mkfs failures are colored red
-bdda73f monc: handle mon0 or mon.a syntax when pull mon addrs from .conf
-aabaa06 monc: more debug info on monmap receipt
-690ea1c mon: MONNAMES feature is supported by all userland
-ddf739f mon: simplify request forwarding
-8cc096f monmaptool: don't allow dup names, addrs to be added to the map
-658d51d mon: make send_reply always consume reply ref (even if not sent); fix caller hackery
-e5ff518 mds: add force_wrlock to lock states; use for filemax changes
-6a40008 mon: make send_reply always consume reply ref (even if not sent); fix caller hackery
-33850a2 monmaptool: fix usages tring
-9fddee9 mkcephfs: behave with new mon naming scheme
-3336d9d rgw: put_obj uses write_full
-0b0009c cls_rbd: use write_full when writing image header
-5d2e85d class: implement write_full interface
-f34c5b9 cls_rbd: fix snapshots seq number
-912e3c8 osd: fix rollback when head points at the rolled back snapshot
-ae5bb84 cclass: add some options
-3bb153c class: modify startup scripts to add classes on mon startup
-7584fef class: modify scripts, fix configuration
-e737e63 class: more flexible class loading, new cclass.sh script
-6537148 class: able to add classes when doing mkfs
-d87c057 cclsinfo.sh: better architecture detection
-057ccbb cclsinfo.sh: shell script to dump class info
-203af22 cls: export relevant functions
-d071cb1 cclsinfo: replace error message
-e3b23bd cclsinfo: some fixes
-80d2afc cclsinfo: utility to display class information
-94308d1 cls-rbd: some adjustments, debug info
-e297aa0 rbd: snap revert header manipulation fixes
-a6e50c2 rbd: implement snap revert header manipulation via class
-2991c30 rbd: add snapshot creation via rbd class
-c5abf58 class: add CLS_LOG macro
-4716b48 rbd: snapshots management via class mechanism
-b58e1b9 rados: update documentation to mention mkpool and rmpool
-7739caf testradospp: add a test for librados trunc
-42ff45b librados: add trunc operation
-3de397f testradospp: update test, use write_full
-d1c779c librados: implement write_full
-92f2ecd osd: fix null dereference in dout
-effe5db mds: be extra careful
-607ba5d mds: fix another instance of bad stray trimming code to use proper helper
-673fdc7 mds: remove erroneous return statement
-8be5b02 mds: a checker function like _is_dir_nonempty should only report results.
-214a427 mds: handle dup anchorclient ACKs gracefully
-c35cb29 mds: fix export caps
-0349c78 mds: allow import caps pin from multiple replicas at once
-1a3fac4 osd: return EINVAL when snapc is invalid and trying to write
-e74250d osd: don't clobber racing pg_info on active pg
-4273809 osd: refine SnapContext::is_valid()
-2648e40 osd: implement SnapContext::is_valid()
-7c78059 init-ceph: don't fail if we fail to umount
-12798de osd: add --dump-pg-log command
-464fcd0 monmap: use this here vector size to be clear
-16a4671 mon: send old format monmap to old clients (backward compatible)
-fb1c3b9 osd: clear newly_removed_snaps on osdmap update if unchanged
-15a7a83 mds: use helper to send message to client; fix send to null connection
-c992d02 mds: remove erroneous bracket
-2a88e2e add checks for being a snapshot root to dir_is_nonempty
-e3c4459 monclient: track cur_mon by name, not rank
-1d16297 mon: rename whoami rank, simplify rank change logic
-26a4d0e throttle: allow take(0)
-0dc9569 mds: fix stale lease trimming xlist iterator abuse
-2fa4a06 mon: identify monitors by name, not rank
-7c85646 mon: fix memory-leaked messages
-76fb75e buffer: fix padding distances
-c196851 osd: init auid to CEPH_AUTH_UID_DEFAULT in case authorizer doesn't set it.
-80c42d0 mds: scan stray dir, eval strays on mds startup
-da520d7 mon: clean up monmapmonitor warnings, style
-76191d2 logclient: clean up interaction with monclient, monitor
-0ab54c7 monclient: make get_monmap_privately() clean up after itself
-0b44ef0 monclient: Make MonClient update cur_mon on getting new monmap
-2e1b0d3 mon: make mon lease clock check protocol change backward compatible
-bc9fba0 Introduced ceph mon remove command
-58fe4b8 qa: add untar_snap_rm.sh
-ac10d83 osd: print rollback osd_op nicely
-470a6fd mds: wire Connection to Session when Session already exists on connect
-6d770ab mds: funnel mds->client messages through single Session* helper
-29a42ef mon: simplify clock drift checks
-527d5fd monc: behave in ms_handle_reset if cur_mon is < 0
-6ff2a87 msgr: don't throttle.get 0
-191cb2e throttle: allow put(0)
-e505fb5 msgr: don't thottle.put 0
-4ecd8fa mds: use cap on head if there is none on the snapped inode
-5be2660 osd: use low-level helper getting obc in sub_op_push
-61555cc throtle: add asserts on max and change parameters where appropriate
-8413ed4 throttle: fix assert count to actually use count
-520a2c3 crypto: don't clean up EVP table on every decrypt()
-d57b629 crypto: don't leak memory in CryptoAES::encrypt()
-21a97d1 mon: don't leak MAuth
-ba63a7a Removed all copies of the whoami value
-989c9ee throttle: use signed counters and assert that count never drops below 0
-800da08 msgr: Fix uses of get_[data, payload, middle] to use throttling-aware functions.
-3b333f7 msgr: put throttler usage on Message destruct
-246415b osd: fix compile issues
-46040a5 msgr: switch to get/set functions for Message:throttler
-0d4bdfa osd: add osd_client_message_size_cap option to config; default 500MB
-0c38b3d objectcacher: add verify_stats() debugging helper
-dff7cb3 objectcacher: fix stat accounting when resizing bufferheads
-a76d8fc objectcacher: cleanup formatting
-462552a objectcacher: fix use of  invalid iterator in map_write()
-12a5d7b objectcacher: match states before merging in map_write
-522c12e osd: fix rollback when head points at the rolled back snapshot
-33b947c msg: remove copy_payload and copy_data functions; change set to use throttler
-7b6aea6 osd: clean up rollback debug output
-1b5920f uclient: handle inode with no caps from mds
-e79a3fa osd: filter_xattrs on a rollback op
-48555f5 osd: fix naughty iterator usage after invalidating it
-a70a366 osd: _make_clone now properly duplicates xattrs
-c730b85 osd: add filter_xattrs function to remove non-user xattrs from a map of them
-f60be8e progress
-84b279a mds: fix straydn->first part deux
-97f00ae debugging output
-d386327 rados: print out pool instead of object
-c4e6482 mds: only purge dentries with no extra refs (besides dirty)
-9ed0c30 mds: set straydn first to match inode on unlink
-ec0aa43 mds: don't export stray (~mdsfoo/stray), and ignore in balancer
-074a9b1 mds: make discover work for multiversion inodes (e.g. dirs)
-9ead80f mds: fix CDir::take_sub_waiting vs dnwaiter pin
-791ca28 mds: kill open_foreign_stray; but open remote mdsdirs instead
-551a12f mds: fix cap clone logic to look at matching first, not last
-ff0e871 libatomic: fix assert.h compilation
-900d4c6 msgr: add Throttle pointer to Policy
-3989ae4 osd: make sure we don't return EAGAIN to client
-62b900f mds: open past snap parents at end of rejoin phase
-26449e7 mdsmap: show individual mds states in summary
-09185a0 osd: improve snap_trimmer debug output
-2b33d99 mds: another cap_exports message/mdcache encoding fix
-55da048 mds: only adjust dn->first on lock msg if !multiversion
-5f90596 mds: more fix cap_exports typing
-054669a mds: fix scatter_nudge infinite loop
-40b2322 mds: fix ESessions type
-5cd7919 mds: drag in->first forward with straydn in handle_dentry_unlink
-394d9c3 mds: fix anchorclient dup lookups, again
-980f234 mds: only log successful requests as completed
-fa1e560 mds: anchor dir on mksnap
-c09d610 mkcephfs: error when creating journal file in a directory that  differs from OSD data dir
-5dd4a2d mds: fix mismatched cap_exports type between msg and MDCache
-609e657 mds: fix trim_unlinked iterator badness
-915ab3c mds: define MDS_REF_SET in unstable
-ef095e1 mds: clear dirtyscattered in remove_inode()
-2682216 mds: allow dup lookups in anchorclient
-8a2a9bd assert: fix assert vs atomic_ops.h breakage
-f5ccc66 mds: ensure past snap parents get opened before doing file recovery
-c0e9d21 mds: relax lock state before encoding export (and lock state)
-3768ef9 mds: do not bother tableserver until it is active
-7c0df05 mds: do not reset filelock state when checking max_size during recovery
-15c6651 mds: lock->sync replica state is lock, not sync
-1c930f9 msg: add missing msg_types.cc
-5262a96 mds: add export_dir command
-4075b95 mds: add MDCache::cache_traverse()
-eac36cb initscript: unmount btrfs if we mounted it
-0d1e5db move addr parse() into entity_addr_t
-a3323c9 tcp: parse ipv4 and ipv6 addresses
-08afc8d mon: fix unsynchronized clock logic; change output for clarity
-b441fbd mds: lookup exact snap dn on import
-38cb240 mds: update dn->first too when lock state adjusts inode->first
-9248cd9 mds: don't change lock states on replicated inode
-afadb12 mds: fix root null deref in recalc_auth_bits
-364f3cb mds: adjust subtree map when unlinking dirs
-c4bbb00 mds: discover snapped paths on retried ops
-464e46c mon: add wiggle room for clock synchronization check
-7f8a743 mds: add case for CEPH_LOCK_DVERSION to LockType
-00c3daf xlist: add assert to catch invalid iterator usage
-79b3962 ObjectCacher: do not try to deref an invalidated xlist::iterator
-83094d9 paxos: fix store_state fix
-62e290e msgr: print bind errors to stderr
-6060bdd rbd: some fixes to conform with qemy code style
-3a705de paxos: cleanup
-3c3e82e paxos: only store committed values in store_state
-187011c initscript: fix typo with $lockfile stuff
-6b72d70 paxos: set last_committed in share_state()
-8c44825 osd: fix compilation
-4b79774 mds: fix null dn deref during anchor_prepare
-bb8b139 mds: fix invalid use of connection
-9380441 mds: switch some session->inst send_message calls to session->connection; switch an MDS broadcast from instance-based to Connection *-based send.
-892a0e2 config: parse in $host from conf file
-594d456 osdmaptool: include raw, up, acting mappings
-0a1d526 osdmap: assert maxrep >= minrep
-a1a1350 mkcephfs: pass -c to cmon --mkfs
-330e1e2 osd: warn, don't crash, on purged_snaps shrinkage
-d2c4005 initscript: incorporate Josef's fedora fixes
-7cc3ab6 rados.h: should use __le64 instead of __u64
-edffc12 librados: update C header file to proper name for rollback function
-bd9cf96 osd: set clone_overlaps properly on rollback
-9dd3558 rados: add rollback functionality to rados
-0292f2e librados: add rollback_object functions.
-91fb924 objecter: add rollback_object function, which rolls back a single object to a prior snapshot
-b82ba82 osd: implement rollback functionality
-be1030d rados: add snap.snapid to ceph_osd_op, to replace use of MOSDOp's snapid
-2333656 osd: create _delete_head function, move CEPH_OSD_OP_DELETE handling to it.
-e935b8e osd: add rollback to ceph_osd_op_name
-b83b073 rados: add op for rollback
-08f6966 ceph.spec: build-required libatomic_ops-devel, not libatomic_ops
-f95e1e0 mds: add Connection * to Session
-a3dc4bd sample.ceph.conf: include debug options, commented out
-05256bb rados: you can now set the crush rule to use when creating a pool
-8044f7a librados: add crush_rule parameter to create_pool functions
-a9e1727 objecter: add optional crush_rule parameter; set in pool_op_submit as needed
-78375cf mon: add crush_rule data member to MPoolOp; use it in new pool creation on mon
-648ce97 mds: LAYZIO is not liked, but it is allowed
-297d3ec client: update ioctl.h (lazyio, invalidate_range)
-a13b5b1 mds: include LAYZIO cap in sync->mix and mix->sync transitions
-a92df20 mds: include LAZYIO in CEPH_CAP_ANY set
-75de272 mon: warn to log, not just dout, on clock drift
-9b4d25b mon: detect and warn on clock synchronization problems; change MMonPaxos::lease_expire to lease_timestamp
-bee74a1 ceph: add conversion to qemu coding style
-a1c9981 paxos: use helper to store committed state; fix master mon catch up using stash
-c0df916 cfuse: bail out on mount() errors
-e6b9055 interval_set: fix union_of, intersection_of size accounting
-2b9ef64 init-ceph: use = not == for comparison operator
-701d267 mds: better debugging on rmdir
-29ca21f mds: fix scatterlock gather, writebehind
-f8f9e6c mds: make export targets stay in mdsmap for a while
-7f0ef1c mds: balancer cleanup
-da42d06 mds: warn on dn release that dne
-06b86ea rbd: modify rbd on-disk header
-7cf4861 rbd: fix push_to_qemu.pl
-7113775 mon: roll mkmonfs functionality into cmon --mkfs
-be082f0 filestore: make mkfs() zap any file or dirs it finds
-5e8a609 rbd: modify header, add utility to ease sync with qemu tree
-0d98fc6 osd: keep recovery ops in sync with pull
-a9b494c mon: no need for 'whoami' file in store
-56c4043 reword blacklisted output so it's clearly discussing MDSes and not OSDs
-f7708de uclient: don't unlink null dentry when getting null linkage in mds reply
-bf1cb87 mon: trim pgmap states even when we don't have a full quorum
-357aa03 paxos: recover using stashed latest when state histories don't overlap
-51c5823 mds: anchor multiversion inode before unlinking it
-fbbff74 librados.h: add other TMAP definitions
-929048f mds: fix readdir pingpong on snapped dir with multiple mds
-cd1b071 monc: pick a different mon when repicking
-3ec4605 monc: hunting by default
-16ab067 librados: update librados to define CEPH_OSD_TMAP_SET
-0050dd8 mon: fix mon injectargs, and simplify
-9e4e53e osd: simplify --mkjournal, add --flush-journal
-1d9ab26 osd: nicer debug output
-f3ab812 interval_set: fix union_of _size accounting; optimize ==
-e162aab mds: fix interval_set copy of projected_free
-155efe2 mds: fix interval_set copy of projected_free
-f6c4827 osd: use blank reqid for snapdir events, too
-8dfe74f osd: do not index by reqid if reqid not defined
-4ed3acb osd: update purged_snaps in PG::Info on trim completion; and replicate
-9149dfa rbd: fix snap_seq type in rbd_header
-99690f6 initscripts: remove 'flushoncommit' from default btrfs mount options
-46891dd osd: trim snaps via replicated osd ops
-ff94c3a osd: make build_removed_snaps, is_removed_snap consistent
-e031548 rados: update documentation to mention mkpool and rmpool
-ee218a1 osd: fix peer_info updates on active primary
-baba34b msgr: remove unused utime_t now
-a776975 automake: some clean up
-1ea0f85 poolop: fix MPoolOpReply decoding
-736d837 throttle: allow large items if we're under our max
-d006ae9 osd: purged_snaps in PG::Info, queue snap trim on primary
-47ba928 osd: include snapdir objects in pg log for proper replication, recovery
-ffd72a9 strings: clean up pool op names
-d1c78fc mds: allow readdir result limit in bytes
-7be27f4 debian: put proper distribution in debian changelog
-33bf1a2 version: use next version ~rc for unstable branch
-0e177d2 radosgw_admin: die after first bad argument
-c54d6cd objecter: separately track pgmap, osdmap state machine version
-52e544b mon: return correct state machine epoch in replies
-ecc4f68 testrados: fix aio api usage
-c3a8ada librados: implement rados_stat_pool()
-e741d43 rados: fix typo
-342fc87 osd: add CEPH_PG_MAX_SIZE to header
-7f43cf8 filestore: update btrfs ioctl.h
-856bdf2 client: un-"fix" u64 types in client/ioctl.h
-c9b1aee msgr: fix possible overflow when sending seq
-65074e5 msgr: print message encoding version to aid debugging
-afa1993 ceph_strings: checkpatch fix
-80dcc28 ceph_fs.h: checkpatch fixes
-a902bf0 cmpxattr: null termination fixes
-07fdde4 rados: add 'tmap dump'
-b502916 osd: set obs.exists in projected object state during recovery
-dbcb4f8 mds: warn, don't crash, on trailing garbage in dir objects
-8fbabe0 msgr: put msgvec on heap
-876a0cc msgr: tolerate incoming seq #'s that skip ahead
-a576e6e ceph: return error code returned by server
-12f7c0b mds: drop 'closed' bit from MClientReconnect
-7a23b5f msgr: set outgoing msg connection before encoding
-f6c2e1c poolop: make new encoding backward compatible
-ffc3e63 osd: fix compile error from cmpxattr, cleanup.
-0ebf259 osd: fix layout return type
-4a7118e msgr: be less noisy about msgr throttling
-f857a2e osd: add cmpxattr op handling
-4d667dd debian: remove pull.sh calls from helper .sh scripts
-324fe82 atomic: cast away const on read()
-99cdd52 osd: 'stop' command
-d37c9dc mds: fix max_size==1 bug
-6f00c8f types: clean up printf format warnings
-0aa2208 rgw: clean up dup #define
-edc9249 types: standardize on uint64_t
-737b504 endian: simplify __le* type hackery
-2741e18 ceph.spec.in: --without-hadoop --without-debug
-91b9f01 rbdtool: --list on empty pool returns correct message
-404938c time: include _ between date and time
-a8579eb osd: remove bad assert in get_object_context()
-906d3e6 mds: always release snap cap after flushsnap
-76e40e3 osd: don't put() null ctx->op (message)
-8580aa5 scripts: fix check_pglog.sh
-fe7a8be script: add check_pglog.sh
-a290fc5 mdsmap: lose angle braces, use tabs
-f0e6af9 osdmap: initially osds don't exist; create them as they boot
-dc24ab0 osd: resurrect CEPH_OSD_EXISTS flag
-1959f87 logger: be more careful calculating variance
-a8fa528 debian: use 'testing' or 'unstable' in place of 'git' in version suffix
-e9cc4a3 librados: separate callbacks for aio ack/complete and safe
-66350d2 osd: clear pg REPLAY when we reinitiate peering
-642be31 rgw: admin uses --secret instead of --key (as --key is already taken)
-ec600db osd: fix critical cap parsing bugs and documentation.
-33b5e42 msgr: fix local_pipe peer_type
-89d1b5d msgr: existing connection may be OPEN on connection race
-9bbb545 osd: add CMPXATTR defines
-3d7d7d1 osdmaptool: add -h; don't assert on bad filename
-3278466 ceph.spec.in: run configure
-f28dece poolop: do op immediately, instead of waiting for timeout
-8a37ac6 rbd: update rbd image header format
-cea221c MPoolOp: rearrange parsing, for easier kernel implementation
-1c098c2 osd: add removed snapid to removed_snaps for unmanaged snaps
-7ec68dc mds: add removal snap_seq to removed_snaps
-14dd8a9 mds: acquire anchor_create locks in caller
-11184b9 objecter: fix ~Message() calls (use ->put())
-53a5b4a mdsmap: cleanup up braces
-632b24f mds: fix EXCL rdlock rule
-409a54f mds: fix lock->sync rdlock rule
-291c0ab filejournal: create if mkfs and journal is small OR dne.
-b53d0ed filejournal: return error instead of asserting
-60095d9 mon: correctly update up map when taking over for creating|starting mds
-266d207 (tag: v0.20) debian: fix up debian scripts
-b022a28 ceph.spec.in: updates
-f244067 ceph.spec.in: from Josef
-974f2ee mds: fix trim_dentry on dentry under unlinked dir
-aebc239 osd: fix pg_to_acting_osds() calculation to consider pg_temp
-17a2dcb objecter: show osds in laggy debug output
-0b0e120 mds: fix trim_dentry on dentry under unlinked dir
-1b3e4fb osd: fix pg_to_acting_osds() calculation to consider pg_temp
-5210d6c objecter: show osds in laggy debug output
-0cb8ad4 filestore: fail to mount if journal open fails
-dc84acd filestore: fail to mount if journal open fails
-7ad4202 msgr: fix sigint/term signal handler to actually quit (by chaining)
-3480dc6 msgr: fix sigint/term signal handler to actually quit (by chaining)
-269d142 librados: fix blank pool stats
-96a90ef librados: fix blank pool stats
-61b4b29 qa: make pjd clean up
-ebe05ae mds: clean up MIN/MAX, client_ranges
-d595ad4 msgr: remove pid file on SIGINT, SIGTERM
-8fcb0cc qa: make pjd clean up
-3a9439c mds: clean up MIN/MAX, client_ranges
-30561d8 msgr: remove pid file on SIGINT, SIGTERM
-a31ea46 config: post-process default config options too
-d144146 config: post-process default config options too
-318dfbe mon: use (robust) buffer::list::write_fd() to write to disk
-63385d0 mon: use (robust) buffer::list::write_fd() to write to disk
-1f55b17 mon: m->get_session() may return null if session has closed
-84c386e mon: m->get_session() may return null if session has closed
-a846236 configure: remove second AM_INIT_AUTOMAKE line
-6e7ff1a msgr: fix segfault sending msg on closed Connection/pipe
-48c086a string fix
-2e2222f msgr: fix segfault sending msg on closed Connection/pipe
-59e77b3 msgr: add message throttling; with a default max of 100MB waiting for dispatch
-b8cca8f replace nstring with std::string
-07e1a2f throttle: add fairness
-218f031 mds: fix snaprealm split on capless inode
-f688ffa mds: fix snaprealm split on capless inode
-b3bb8c6 buffer: clean up namespace pollution
-6ec8870 poolop: rename and move definitions to ceph_fs.h
-0decb33 Makefile: define __CEPH__ in ceph builds. use it.
-a6ee3ae mds: fix req use-after-free to get connection to direct reply
-282b242 atomic: reverse if test so we don't break things on separately-compiled librados
-07dea44 mds: remove unused variable from Locker
-3ed1a55 debian: build-depends libatomicops-dev
-8f5d5ea mon: clean up mon snap type checks
-cf8ce29 osd: no error checking in data structure (caller should do it)
-ca46428 mon: don't create/delete unmanaged snaps if pool snaps exist
-4a53f1c librados: clean up headres
-ec7ecc5 objecter: do pool op result parsing in Objecter completion wrapper
-832c919 librados: Adjust snapid allocation ufnctions and implement new objecter spec
-076517f objecter: Implement bufferlist-based return code for pool ops
-f612ab8 mon: OSDMonitor fills in MPoolOpReply's bufferlist on unmanaged snap creation
-5706476 msg: Give MPoolOpReply a bufferlist for reply data
-503c41e mon: change the unmanaged snap interface for better distinction of reply codes and snapid numbers.
-0fb4a6e librados: Set selfmanaged snap functions to use int instead of int64_t, too
-39817b3 librados: add small bit of documentation, fix headers
-4b0021f mon: don't crash if a client tries to self-manage managed snaps, or vice versa
-d1d235e librados: add functions for client-managed snapshots in all the interfaces
-5fb4e8f objecter: New functions for client-managed snapshots.
-eba044c mon: OSDMonitor handles client-managed snapshot requests.
-ac129d7 osd: pg_pool_t gets new functions for unmanaged (ie, client-managed) snaps
-5116700 msg: Add space for snapid in MPoolOp. Reply now uses an int64_t replyCode.
-4fda5f9 msgr: fix atomic_t test
-756b251 v0.20
-609eaa1 mds: skip client snap notification on unlink
-7a8daed osd: more useful debugging on repop version, out of order completion
-f502547 osd: print a bit more debug info about compat problems
-feca69d mds: verify mdsmap compatset on startup
-4d7b2ce mds: add CompatSet to mdsmap
-bfd9629 rbd: change rbd header disk format, update protocol version
-e3ef148 msgr: never (re)open pipe when sending message directly to Connection*
-7632037 mdsmap: add separate struct version for extended portion of mdsmap
-d03bddc cauthtool: add --gen-print-key
-5d2dcce auth: take key or file containing key on command line
-2acb843 cauthtool: always print entire encoded CryptoKey
-0fc47e2 msgr: increment connect_seq when STANDBY->CONNECTING
-4420873 filestore: default to writeahead journal, and no btrfs snaps
-2caf513 rbdtool: add, use prettybyte_t type
-0cf079a rbdtool: add --info, --resize commands
-f4ef6a9 auth: make 'admin' the default user
-99ac12b librados: adjust C++ aio completion creation api
-d5c8927 sample.ceph.conf: add example on writeahead (vs parallel) journal
-f2160f1 osd: create 'rbd' pool
-8478ebe debian: require hdparm, recommend btrfs-tools
-d4bf8ee debian: require hdparm, recommend btrfs-tools
-476606f mds: always use get_newest_seq (not snap) when doing cow
-327432a mds: rename move_to_realm(), add debugging (cleanup)
-c719f4e mds: don't cow already cowed dentry
-93058af sample.ceph.conf: updated
-ba5a0d1 fetch_config: enable fetching ceph.conf from a remote location
-5a5cc18 osd: don't capture SIGINT/SIGTERM; journal and/or btrfs snaps are sufficient.
-f7f6daf auth: less noisy debug
-34d3087 mds: drop mutation locks
-d8f1de5 osd: fix snapset loading from _snapdir
-1915f2d mds: clone dentry for multiversion dir if linkage is changing...
-07c7873 mds: avoid null deref when hiding .ceph dir
-f9225fe mds: xlock dentry versionlock to cleanly avoid projected dn linkage replication issues
-463792d reorder locks
-c8d7c97 mds: always issue lease mask 1; assume CEPH_LOCK_DN
-beb562d mds: add versionlock to dentry
-4f402cb mds: rename send_message_client to send_message_client_counted
-09366cb mds: fix erroneous uses of send_message that need to be send_message_client
-3484b84 mds: Add new Connection-based send_message_client that uses inc_push_seq too
-65ec024 autoconf: Fix detection of sync_file_range.
-a0e7d8d remove references to [group] and [mount] in sample.ceph.conf
-d2af75d add executables to .gitignore
-edf935d mds: Fix bad pointer dereference brought about by switch to Message ref-counting
-d8be246 mds: xlock versionlock on rename if witnesses
-06e5528 mds: use Connection-based send_message in handle_discover
-6a0d0d0 msg: Remove "asker" data member from MDiscover. Fix uses.
-751a405 mds: Fix some compile-time issues.
-da13000 mds: Subsystems generally use the connection-based send_message when possible.
-05b0e3a mds: create send_message(Message *m, Connection *c) passthrough
-b4d4231 rados: aio, reorder callback completion handler creation
-bd34079 mds: set trivial uses of send_message to use the Connection version.
-69682ad8 osd: send_message via Connection when possible
-b38cebf osd: send reply via connection for MOSDSubOps
-f6d2666 osd: Send messages via Connection * when possible.
-85b67ce msgr: Implement new send_message[_lazy](Message *m, Connection *con) functions.
-47f5315 filestore: be thorough about wiping out old osd data content during mkfs
-057897e msgr: if a pipe** is passed in to submit_message, it's used.
-731414b msgr: give submit_message new interface.
-6c9bee4 msgr: Add a void *pipe to Connection. This is set on Connection creation and zeroed out in ~Pipe().
-a9800e7 msgr: remove unnecessary clone variable from submit_message
-fd28d9a cephfs: include LAZYIO caps if LAZY file mode bit is set
-06d032e filestore: log snap_create error before asserting success
-2cc0ec2 mon: do not build mon to mon authorizer if cephx is disabled
-ca74b4b atomic_t: Add a new version based on libatomic_ops.
-d1d6da3 atomic_t: Remove (never used) unstable commonc++-based version
-69b849c buffer: Include Spinlock.h.
-d0213dd mds: allow LAZYIO cap along with WR
-198d710 osd: fix source type checks (osd, mon)
-afcee3b osd: don't ->put() a null session in _share_map_incoming
-ec8471d osd: queue pg update under pg sequencer
-69b108f osd: queue pg creation under pg sequencer
-cfabc02 mds: not dout(0) request latency
-09916d3 qa: set -e in workunits
-96befd4 mds: fix broken snaprealm split optimization for (unlinked) files
-6573493 rgw: don't crash if HTTP_HOST isn't set
-a6c80a3 osd: avoid PGPool lookup in inner loop
-69fda2a osd: fix loading of snapset from _snapdir object attr
-e5cd2b7 osd: replace the ALLOW_MESSAGES_FROM macro with use of OSDCaps functions.
-50cad81 osd: add a message_from_mon function
-c94e490 Revert "osd: replace the ALLOW_MESSAGES_FROM macro with use of OSDCaps functions"
-81e748d mds: only recover files from stale clients when auth
-e7547dc osd: add some put()s of Session * that weren't being used properly.
-9ceb3be osd: replace the ALLOW_MESSAGES_FROM macro with use of OSDCaps functions
-4e138c1 osd: Add is_X functions to OSDCaps (where X is mon, osd, mds).
-17d2451 rados: check that given pool name actually exists when deleting
-d44c262 mon: OSDMonitor makes sure pool ID is good, preventing crashiness
-c4892be osdmap: move pool names into first part of encoding; add version to second part
-6bf54f1 librados: add lookup_pool()
-6417e6a librados: no need to include linux/types.h
-26325b1 debian: more librados1-dev deps
-414a6e3 spinlock: clean up #include deps
-33e604d monclient: seed RNG so we pick a random monitor
-6ed1f04 todo: move bugs to tracker
-94307c9 auth: cauthtool now identifies itself properly to common_init
-d5b3924 mon: add 'get' command to AuthMon, letting you retrive one entity's keyring data
-fa9588a filestore: fix weird references for clone/clone_range
-a9ecb46 objectstore: fix clone_range() transaction encoding
-1cfb41f osd: rename PGPool::removed_snaps to cached_removed_snaps to clearly identify
-e2ca9a3 auth: cauthtool now identifies itself properly to common_init
-e949931 mon: add 'get' command to AuthMon, letting you retrive one entity's keyring data
-b4c564c librados: clean up object listing api
-bb2c0a9 osd: clear initial interval_set in build_removed_snaps
-1bcdf34 testrados: create/use own pool
-0f22be7 crc32c: ifdef out dead code to shut up warning
-736a271 filestore: more informative error on current/ rename failure
-c511dd1 init-ceph: include 'noatime' btrfs mount option by default
-4a2ca2b testrados: test more stuff
-c2987ce objecter: cleanup
-f7f38df librados: clean up c header
-2112d20 debian: fix up librados1-dev with all necessary headers
-13d6b38 librados: move c++ api into librados.hpp; more type cleanup
-1e05d5c librados: use std::string, not nstring, in c++ api
-181b81c librados: avoid snapid_t type, types.h
-6c9b36b rbdtool: fix man warnings
-5c00d5f filestore: check for SNAP_DESTROY ioctl, and file if not present
-c9cb118 librados: move librados.h to include/
-2fae333 spinlock: move to include/
-ee13f60 spinlock: move to ceph namespace
-e1896d8 atomic: move to ceph namespace
-3ea82ba atomic: rename test() -> read()
-aa55570 buffer: avoid including ceph assert directly
-df2422f assert: use ceph namespace
-74be677 crc32c: prefix with ceph_
-ac70c56 page: move to ceph namespace, defs to common/page.cc
-fc8e3c3 buffer: move to ceph namespace
-50ea193 osd: fix transposed clone_range args
-250ff72 spinlock: avoid lockdep include unless lockdep is on
-0fb8d93 buffer: avoid spinlock include unless debugging is on
-75699db librados: reduce #includes
-7f16acc librados: c binding for rados_tmap_update()
-e5381a5 rbdtool: maintain an rbd_directory object; add --list
-a1cf10a auth: shut up about loading the key file
-be1e87f librados: add tmap_update to c++ interface
-ba58412 osd: fix tmap when header update not specified, or initial object dne
-b89e743 debian: include rbdtool
-3d7848d rbdtool: add man page
-2576089 rbdtool: delete rbd images too
-89b0558 rbdtool: use shared rbd_types.h
-50fcf79 msgr: drop useless was_session_reset() call on lossy channel close
-d2d80c6 ceph: print output to stdout, not dout
-3d4a692 msgr: fail on sd < 0
-686192a osd: flush store ops after map update
-2f21010 mds: set laggy in tick() if its been a while
-56de662 debian: drop empty dir from radosgw
-8741959 todo: mds
-03e2019 mon: set osd up_thru when adjusting pg_temp
-634441e osd: distinguish between per-pool snap pools and user-managed snap pools
-e52aa5e mds: remove null clean stray dentries after dir commit
-be4a797 mds: fix purge_stray to be smart about NEW dentries
-0efe4fb mds: fix ref count check in eval_stray, purge_stray_purged
-50b1772 osd: return more useful errno (ENOENT) on missing base
-985a981 mds: move new stray dentries to end of lru
-4de289f mds: use send_dentry_unlink helper for remote unlink
-07e3984 mds: journal oldest client tid
-2c2ea0a todo: updates
-190067e rgw: rgw_admin checks that it hasn't regenerated user ids
-4ee4ba7 mon: add new command 'lspools [uid]' to OSDMonitor
-4b6e4fa osd: pg_pool_t prints out its owner
-2b92ddc mds: fix snap purging during commit
-e9f4a6c mds: streamline stray checks with helper
-955cfdb mds: make beacon output more informative
-4d5ce88 qa: run tests in random order
-fd60670 mds: allow reconnect as long as we are in reconnect state
-2cb1128 Add missing Makefile dependency for debug.cc
-d08ef70 rgw: radosgw_admin can delete users from the system
-473c22a rgw: call url_decode in more appropriate places
-fa8b9b9 rgw: convert + to space in url_decode
-1f3431a rgw: send an error response if reading an ACL off disk fails
-9cb74b9 rgw: remove bad local variable shadowing class member variable
-a962063 rgw: remove some invalid FIXMEs
-a98f811 rbdtool: don't create empty object data
-00f1ec8 rbd: created a userspace tool for creating rbd objects
-fdd5709 mds: set laggy flag if dispatch takes too long
-ea035fe msgr: set OPEN state after accepting connection
-5fa1658 mds: fix file recovery
-4d56710 mds: remove dir from 'new' list on any commit, not just on clean
-96262fc filejournal: fix journal full handling
-e6bc437 qa: make snaptest trigger capsnap dirty(caps)==0 bug
-4f8a353 mds: remove dentry AND inode when dropping snap metadata; add helper
-7498048 osd: improve print of snapc in MOSDOp
-3f094f7 osd: fix snap trimmer SnapSet adjustment
-bd43b3a todo: updates
-4bb676d osd: improve snap trimmer debug output
-bca73ed mds: clear old snap_trace before building new one
-ad840ed msg: Fix a few invalid asserts.
-b74962f msg: Message::nref now starts at 1; remove a get() in SimpleMessenger to adjust
-7d23bb4 msg: Remove dead MExportDirWarning/Ack
-9c17958 msg: Remove dead MMDSOffloadComplete
-92a4049 msg: Remove dead MMDSBoot
-daf2e2c msg: MClassAck has a private destructor
-157ecf6 msg: Add MClassAck to Message.cc so it will decode properly
-2618289 msg: fix uses of MClass destructor to use put()
-d43fad3 msg: MClass has a private destructor
-7fd1197 msg: fix uses of MLock destructor to use put()
-9c28162 msg: MLock has a private destructor
-943bb00 msg: fix uses of MInodeFileCaps destructor to use put()
-124bcc2 msg: MInodeFileCaps has a private destructor
-4b89e7b msg: fix uses of MCacheExpire destructor to use put()
-0b3c949 msg: MCacheExpire has a private destructor
-c392b16 msg: fix uses of MMDSTableRequest destructor to use put()
-07cc53a msg: MMDSTableRequest has a private destructor
-806aaca msg: fix uses of MHeartbeat destructor to use put()
-6511d4e msg: MHeartbeat has a private destructor
-63fb33e msg: fix uses of MDentryLink destructor to use put()
-eeabbb7 msg: MDentryLink has a private destructor
-0a23748 msg: fix uses of MDentryUnlink destructor to use put()
-e32f9c6 msg: MDentryUnlink has a private destructor
-833aebf msg: fix uses of MExportCapsAck destructor to use put()
-666e23a msg: MExportCapsAck has a private destructor
-804d232 msg: fix uses of MExportCaps destructor to use put()
-58c680a msg: MExportCaps has a private destructor
-9efa0cf msg: fix uses of MExportDirFinish destructor to use put()
-b52dc99 msg: MExportDirFinish has a private destructor
-aa25b7e msg: fix uses of MExportDirNotify destructor to use put()
-93b751b msg: MExportDirNotifyAck has a private destructor
-d2959c3 msg: fix uses of MExportDirNotify destructor to use put()
-2b54b55 msg: MExportDirNotify has a private destructor
-ff460ea msg: fix uses of MExportDirAck destructor to use put()
-36058ce msg: MExportDirAck has a private destructor
-f722386 msg: fix uses of MExportDir destructor to use put()
-cbe16f7 msg: MExportDir has a private destructor
-f10c816 msg: MExportDirWarningAck has a private destructor
-a571f9f msg: MExportDirWarning has a private destructor
-1641130 msg: fix uses of MExportDirPrepAck destructor to use put()
-1af2f4c msg: MExportDirPrepAck has a private destructor
-4fc722a msg: fix uses of MExportDirPrep destructor to use put()
-76174f4 msg: MExportDirPrep has a private destructor
-7862fd4 msg: fix uses of MExportDirCancel destructor to use put()
-5899fcc msg: MExportDirCancel has a private destructor
-e48ccde msg: fix uses of MExportDirDiscoverAck destructor to use put()
-95c24a9 msg: MExportDirDiscoverAck has a private destructor
-d9b57aa msg: fix uses of MExportDirDiscover destructor to use put()
-723923a msg: MExportDirDiscover has a private destructor
-35fce27 msg: fix uses of MMDSFragmentNotify destructor to use put()
-2e42b9b msg: MMDSFragmentNotify has a private destructor
-7bb62db msg: fix uses of MDiscoverReply destructor to use put()
-8b85aa3 msg: MDiscoverReply has a private destructor
-a9afd9e msg: MDiscover has a private destructor
-ed68080 msg: fix uses of MDirUpdate destructor to use put()
-3e91bf8 msg: MDirUpdate has a private destructor
-c8eb706 msg: fix uses of MMDSCacheRejoin destructor to use put()
-5c5831c msg: MMDSCacheRejoin has a private destructor
-224423a msg: MMDSResolveAck has a private destructor
-88cfb93 msg: fix uses of MMDSResolve destructor to use put()
-b5e4475 msg: MMDSResolve has a private destructor
-3bd67ca msg: MMDSLoadTargets has a private destructor
-7f83723 msg: fix uses of MMDSBeacon destructor to use put()
-95609f2 msg: MMDSBeacon has a private destructor
-cda652b msg: fix uses of MMDSMap destructor to use put()
-241be82 msg: MMDSMap has a private destructor
-375c87f msg: fix uses of MMDSSlaveRequest destructor to use put()
-4825944 msg: MMDSSlaveRequest has a private destructor
-d5c4f0e msg: fix uses of MClientSnap destructor to use put()
-cbe66c7 msg: MClientSnap has a private destructor
-51db4d9 msg: fix uses of MClientLease destructor to use put()
-fa6d8d8 msg: MClientLease has a private destructor
-4c911b5 msg: fix uses of MClientCapRelease destructor to use put()
-f94a49b msg: MClientCapRelease has a private destructor
-2fb219a msg: fix uses of MClientCaps destructor to use put()
-565fcb5 msg: MClientCaps has a private destructor
-63ecb92 msg: fix uses of MClientReply destructor to use put()
-c31d5b0 msg: MClientReply has a private destructor
-62d676b msg: fix uses of MClientRequestForward destructor to use put()
-698315c msg: MClientRequestForward has a private destructor
-5ab622f msg: fix uses of MClientRequest destructor to use put()
-1d86804 msg: MClientRequest has a private destructor
-9f1dfed msg: fix uses of MClientReconnect destructor to use put()
-a9f616b msg: MClientReconnect has a private destructor
-72dbbfb msg: fix uses of MClientSession destructor to use put()
-609a4ac msg: MClientSession has a private destructor
-f2b8309 msg: MMonGlobalID has a private destructor
-565ac00 msg: fix uses of MMonSubscribeAck destructor to use put()
-568ad65 msg: MMonSubscribeAck has a private destructor
-7f5202b msg: fix uses of MMonSubscribe destructor to use put()
-9abc2f2 msg: MMonSubscribe has a private destructor
-8b7dae0 msg: fix uses of MAuthReply destructor to use put()
-ccadd53 msg: MAuthReply has a private destructor
-abe5eb1 msg: fix uses of MAuth destructor to use put()
-6163156 msg: MAuth has a private destructor
-7488944 msg: fix uses of MMonGetMap destructor to use put()
-8399e9a msg: MMonGetMap has a private destructor
-b42a71f msg: fix uses of MMonMap destructor to use put()
-cae9b13 msg: MMonMap has a private destructor
-af60290 msg: fix uses of MRemoveSnaps destructor to use put()
-7c4dd41 msg: MRemoveSnaps has a private destructor
-d55404c msg: fix uses of MOSDScrub destructor to use put()
-96230f0 msg: MOSDScrub has a private destructor
-a149c82 msg: fix uses of MOSDPGTrim destructor to use put()
-d04b48c msg: MOSDPGTrim has a private destructor
-c271bc3 msg: fix uses of MOSDPGCreate destructor to use put()
-c5c7f2f msg: MOSDPGCreate has a private destructor
-9c1f3ea msg: MOSDPGInfo has a private destructor
-7a58fef msg: fix uses of MOSDPGRemove destructor to use put()
-8046e9d msg: MOSDPGRemove has a private destructor
-cf47b5a msg: fix uses of MOSDPGLog destructor to use put()
-cfdc17f msg: MOSDPGLog has a private destructor
-553e0a7 msg: fix uses of MOSDPGQuery destructor to use put()
-8f8a454 msg: MOSDPGQuery has a private destructor
-3b38cbf msg: fix uses of MOSDPGNotify destructor to use put()
-57ad0e4 msg: MOSDPGNotify has a private destructor
-a03c723 msg: fix uses of MOSDMap destructor to use put()
-8917929 msg: MOSDMap has a private destructor
-d1076cd msg: fix uses of MOSDSubOpReply destructor to use put()
-b3423d3 msg: MOSDSubOpReply has a private destructor
-e85d368 msg: fix uses of MOSDSubOp destructor to use put()
-7df6eab msg: MOSDSubOp has a private destructor
-b1c6ac3 msg: fix uses of MOSDOpReply destructor to use put()
-3685e63 msg: MOSDOpReply has a private destructor
-d483315 msg: fix uses of MOSDOp destructor to use put()
-1282875 msg: MOSDOp has a private destructor
-b4a6d92 msg: MOSDPing has a private destructor
-e86c1d5 msg: fix uses of MOSDFailure destructor to use put()
-61ba461 msg: MOSDFailure has a private destructor
-f7a56bd msg: MOSDPGTemp has a private destructor
-8122f16 msg: MOSDAlive has a private destructor
-f275a5f msg: fix uses of MOSDBoot destructor to use put()
-d2d2418 msg: MOSDBoot has a private destructor
-fcbb4cf msg: fix uses of MForward destructor to use put()
-2f7406f msg: MForward has a private destructor
-89b130f msg: fix uses of PaxosServiceMessage destructor to use put()
-d767c13 msg: PaxosServiceMessage has a protected destructor
-e327247 msg: fix uses of MRoute destructor to use put()
-163386f msg: MRoute has a private destructor
-2861c56 msg: MPing has a private destructor
-6165c55 msg: fix uses of MLogAck destructor to use put()
-15e1935 msg: MLogAck has a private destructor
-7d26070 msg: fix uses of MLog destructor to use put()
-990f01b msg: MLog has a private destructor
-fa839c0 msg: fix uses of MMonElection destructor to use put()
-3a2164f msg: MMonElection has a private destructor
-e1f6cef msg: fix uses of MMonObserveNotify destructor to use put()
-dddf647 msg: MMonObserveNotify has a private destructor
-f7f38ff msg: fix uses of MMonObserve destructor to use put()
-098898f msg: MMonObserve has a private destructor
-97fd8be msg: fix uses of MMonPaxos destructor to use put()
-527648f msg: MMonPaxos has a private destructor
-2f12ffd msg: fix uses of MMonCommandAck to use put()
-23e3c37 msg: MMonCommandAck has a private destructor
-30389dc msg: fix uses of MMonCommand destructor to use put()
-10f7cfc msg: MMonCommand has a private destructor
-8102918 msg: fix uses of MPoolOp destructor to use put()
-2f0af62 msg: MPoolOp has a private destructor
-b8c5d1c msg: fix uses of MGetPoolStatsReply destructor to use put()
-57db7b9 msg: MGetPoolStatsReply has a private destructor
-34dbbbc msg: fix uses of MGetPoolStats destructor to use put()
-ae8fff9 msg: MGetPoolStats has a private destructor
-9fb3b15 msg: fix uses of MStatfs destructor to use put()
-246835d msg: MStatfs has a private destructor
-48ac8cc msg: fix uses of MPGStatsAck destructor to use put()
-a976fd6 msg: MPGStatsAck has a private destructor
-6e9943e msg: fix uses of MPGStats destructor to use put()
-6da9bb3 msg: MPGStats has a private destructor
-1a69560 msg: Change all uses of ~Message to Message->put()
-4d174b5 qa: make snaptest.sh repeatable in same dir
-1111433 todo: kclient snap bug
-8c3765e mds: don't adjust subtree map in rename_prepare
-7293dd5 mds: subtree map should always reflect current hierarchy
-4abb47a qa: drop numeric prefix from workunits
-b206d2a osd: don't filter out shutdown msg to self
-2a0ed83 msgr: init local_pipe peer_{addr,type}
-177061e msg: Declare ~Message to be protected.
-47286cb mds: todo rejoin bug
-3ab157f todo: kclient bug
-a9f6bd3 rgw: revert accidental commit of get_attr prototype change
-3edc9d6 msgr: source, not orig_source, in dbg output
-bf62cc0 mds: don't use get_orig_source
-ddf61d0 msgr: NOSRCADDR protocol feature drops src/orig_src in msg header
-9a4b768 msgr: put features in connection_state
-cd102fb msgr: use connection for src addr
-9413730 msgr: make Message::get_orig_* differ only when explicitly directed to
-58ce32c mds: fix MDSTableClient ack double journaling
-d557499 mds: start file recovery after sending rejoin ack
-65d3f3f mds: delay check_inode_max_size if frozen
-e6cd1c2 mds: less noisy about snaprealm siblings
-dab367f rgw: add optional auid parameter to create_bucket.
-66c5af2 rgw: remove dead code. rebuild_policy exists elsewhere; the acl needs no main()
-7030731 rgw: radosgw_admin will quit gracefully if it can't open the store
-a5d8092 rgw: set auid if specified at creation
-83a6efe rgw: add auid field to RGWUserInfo
-06393de auth: Keyring no longer segfaults if HOME env variable is unset.
-9dd4f99 rgw: if you can't init_storage_provider(), quit instead of segfaulting later.
-d9439dd rgw: say why the store failed to open in admin
-06d8e16 rgw: add minor data to schema examination
-aa490a7 mkcephfs: osd=allow * caps for osd, mds
-9d81f9d mds: migrate frag/nest scatterlock info on bounding frags during export
-848caaf auth: standardize on -n/--name [type.]name
-c6028ae auth: initialized uninitialized variable, don't free pts we don't own
-855bae7 mds: make rdlock waiter wait on STABLE | RD, not just RD, when lock is unstable
-a046ca2 mds: use 32 bits for MDSCacheObject::ref count
-c5933e4 mkcephf: behave when user is not defined
-158d4ec auth: fix a few memory leaks, uninit vars
-7975cf0 mds: skip purge_stray when stray pins are present
-3b5d359 Makefile: add missing MDentryLink.h
-9095963 mds: drop unused CInode::PIN_PURGING
-ee127d2 src/README is required
-20f7f79 filestore: less noisy about OpSequencer queue
-52a9083 mds: drop obsolete hack for base inodes
-992e429 mds: fix lost completion in scatter_nudge (broke log trimming)
-21b88da rados_bencher: Don't re-initialize passed-in pool, it breaks stuff
-99e48ee osd: Fix up OSDCaps::get_pool_cap to work/make more sense
-2860eea rados: add interface to change pool owners
-c2e7eed6 librados: add change_pool_auid functions
-1a4899d objecter: add change_pool_auid function.
-a33e9e7 mds: allow rdlock on replica to request sync from auth
-8d9f4fa mon: Set MForward::client_caps explicitly; this fixes a bad connection deref.
-213ffe2 mon: set mon_caps with authenticated monitor check instead of claimed one.
-cd7edca mon: Fix all uses of Session and get_caps. They now use MonSession and get_service()->caps, respectively.
-5c9aa88 mon: Change name of Session to MonSession.
-1045738 msg: Add get_session function to PaxosServiceMessage
-c69a033 Revert "msg: PaxosServiceMessage includes a MonCap*"
-ef5e874 mon: MonCaps default initializes more variables
-4ecd615 osd: drop useless ENOMEM check
-95eb2fc vstart.sh: include mon secret during mkfs
-33a02af mon: fix up authorizer generation/validation
-3273581 mds: fix bug in handle_discover on mdsdir
-59b4c60 mds: check myin, not stray, in rejoin_send_acks
-94794ab mon: change forwarding behavior somewhat
-d3d243c mon: initialize routed_request_tid
-9dfc4fb msgr: set m->connection for messages sent to self
-9656a75 osd: detect TMAPUP no-op and do no work
-1916e29 debug: include timestamp + thread in _all_ debug output
-864b1a4 qa: fix loopall.sh mode
-8e069f6 todo
-c2d6aba todo mds bug
-0eeec6f mon: Hack in setting monitor caps
-bf4a1b5 fix up READMEs
-41f6adc mds: fix up client session importing
-9733882 mon: Fix initialization-crossing goto jump
-b932727 mds: importing, ugh
-c99207d mds: clean up kill_session()
-74d638a mds: possible session 'importing' state
-205e883 mds: drop purge step when closing client sessions
-772daf2 mon: Removing dead code; been commented out for 5 months
-efd344d mon: remove dead 'magic' code
-d77185e todo
-c965812 mds: fix bug in handle_discover on mdsdir
-f3ea95b mds: check myin, not stray, in rejoin_send_acks
-328c990 mds: fix eval_gather for sync->mix(2) and mix->sync(2)
-f1a59b0 mds: encode fnode when replicating CDir
-fbdbdc0 mon: addition to MonCaps docs mentioning how perms are used
-fdddc1e mon: remove unused label out, which was causing compiler warning
-5fe3af8 mon: remove now-unused macros.
-99172e2 mon: MRoutes are now checked by check_privileges instead of a macro
-029a56b mon: MForwards are handled by check_privileges instead of a macro.
-e4f623e mon: handling MSG_CLASS now uses caps->check_privileges instead of macros.
-7b11014 mon: use check_privileges instead of macro for MSG_MON_ELECTION
-7d7d2aa mon: MSG_MON_OBSERVE handled in-function instead of with macro, sends response
-298073f mon: don't use macros in evaluating MSG_MON_PAXOS messages
-45f8072 mon: MSG_LOG uses an in-handler cap check instead of a macro
-ccb5cff mon: Pool ops are already cap-checked by the handler; remove macro
-6818a01 mon: add mon_caps used for unconnected monitor messages
-aeab0f6 mon: stat requests use caps->check_privileges instead of a macro
-7e70afb mon: the MDS messages use caps->check_privileges instead of the macro
-48e64a3 mon: MRemoveSnaps uses caps->check_privileges
-1ad850f mon: OSD handling messages use caps->check_privileges instead of macros
-d61d42d mon: Use MonCaps::check_privileges instead of a macro for MSG_MON_COMMANDs.
-b107e5b mds: combine new, closed states; few small fixes
-032fd32 mds: style fixes (from cppcheck)
-c2e9ffb osd: warn on no osd journal
-020f920 mds: don't kick clients if we've been laggy ourselves
-e53d35f mds: no early complete from scatter_nudge after partial work
-061ed42 todo fixed some bugs
-a01233e msgr: no more forward_message()
-d6378f2 mds: re-send, do not forward, mds messages
-f8478e8 mds: encode source mds in MDirUpdate
-1ad3434 mds: encode source mds in MExportDirDiscover explicitly
-3f06aa7 mds: rev mds internal protocol
-10c2b20 mon: Fix resend_routed_requests. Stuff was left over from when forwards came in as a standard PaxosServiceMessage, which is now removed.
-72a4b92 mon: another forwarding fix for resend_routed_requests
-96f5ad3 mon: Forwarding fixes.
-e1d4854 msg: Remove dead code MSG_OSD_IN/OUT
-52aa9ca mon: x has little meaning for a mon, let's not confuse things for pool ops
-65e53e7 mon: use our standard indicator for locked/unlocked in ms_dispatch: ms_dispatch locks and calls _ms_dispatch.
-3bd625c objecter: don't lose reply codes when we wait_for_new_map
-575d709 rados: add undocumented option to specify auid when making pools
-bfbec0e mon: msg: Better output/debugging
-d8efb1c objecter: always fill in auid
-49a69e7 msg: MPoolOp now encodes its auid, prints more.
-b071569 mon: handle_subscribe now uses check_privileges instead of get_caps.
-78c4abc mon: Pretty sure MDS BEACON messages should only come from MDSes
-baa4cd2 osdc: fix truncation of multiple extents of the same object
-d1c1744 mds: fix resolve stage
-965d737 mds: drop gather if it's empty
-83203b5 context: don't complete C_Gather until finisher is set
-66a554d init-ceph: do already running check early to avoid extra work
-0b6357e todo
-4b6688e mds: session is always defined in handle_client_reconnect
-d58656f qa: make pjd test behave when run twice in same dir
-0301d55 mds: acknowledge reconnect success with a session open message
-7d88f7f qa: add fsx workunit
-80c9ee2 mon: msg: better output
-c763f64 mon: don't use get_priv() without put!
-0d1b802 mon: forwarded messages should use the same connection as their carrier message
-1f0cc52 mon: when possible, fill PaxosServiceMap::caps before exiting ms_dispatch
-47e2864 mon: let ms_dispatch be non-locking for forwards
-cf719ba mon: Encapsulate forwarded PaxosServiceMessages into MForward with their caps
-001b5f1 mon: Use PaxosServiceMessage::caps instead of Session::caps where applicable
-40179fb msg: Add a new MForward message for encapsulating client caps and messages
-60677da qa: add loopall.sh
-a4bdcdd mds: fix up root/base inode special cases
-31dbd12 todo: more kclient bugs
-3ebbec2 qa: runallonce.sh each workunit in a clean directory
-a431c52 filestore: fix CLONE_RANGE detection
-b8e47ad todo kclient osd_client bug
-1d72d18 mds: fix SimpleLock::try_clear_more()
-eb47abf mds: fix add_replica_dir to use is_base() helper for adjusting subtree auth
-ebeef97 mds: fix SimpleLock state encode/decode
-389e313 mds: remove unlinked metadata after replay
-f2172eb mds: do not add null dentry to frozen dir
-c104960 mon: declare class MonCaps in PaxosServiceMessage
-9994180 osd: do no index reqid for CLONE ops (or BACKLOG ops)
-b1cc16f ceph: drop (broken) poll mode (use -w instead)
-a472338 ceph: add -s|--status command
-797ee53 Revert "mon: PaxosServiceMessages now routed through paxos_dispatch and get caps set"
-49ab169 mon: handle_route uses lazy_send_message for unknown MRoutes
-9f59a1e mon: add encode/decode functions to MonCaps
-3941ee2 mds: adjust rdlock forwarding on replicas
-b818f5b mds: send resolve to resolve_set
-5c70d30 mds: fix replica dentry linkage updates
-a4d2caa osd: only insert non-zero intervals into interval_set
-f059e49 qa: fix snaptest1.sh
-3ac3e89 mds: add array bounds check for null dentry lease
-e33e17e mon: Use PaxosServiceMessage::caps instead of Session::caps where applicable
-0c688f9 mon: PaxosServiceMessages now routed through paxos_dispatch and get caps set
-167b28a msg: PaxosServiceMessage includes a MonCap*
-390258a mon: Add a Session operator<<, use it in OSDMonitor
-7af73ac mds: avoid null deref of SimpleLock::_unstable
-5b17264 mds: use CDir::item_new for LogSegment::new_dirfrags elist
-7950356 auth: update documentation on caps
-5c2319f mon: return error codes from prepare_new_pool
-0dca240 mon: add warning/debugging prints to prepare_new_pool
-b38ef13 mds: be consistent about list<>::item naming (item_foo)
-a58243d dlist: fix pop_front/back
-718d646 xlist: clean up interface
-1c92836 dlist: clean up interface
-e092710 mds: use elist instead of dlist
-c1e8d37 elist: simpler embedded list
-cc27a4c rgw: remove unused refcount data member from XMLObj. Also clears up ctor
-62e1111 rgw: Add documentation
-1f2876b cephx: initialize values
-bbf6b16 synclient: print mount error
-24b0f03 xlist: clean up users
-1278e48 mds: use dlist instead of xlist for main cache objects
-ebc8336 dlist: simpler version of xlist without _list pointer
-75e44d3 mds: reduce MDSCacheObject footprint a bit
-5a9a50c mds: replica_nonce can wrap; fix asserts
-7f19ee1 mds: put rare state in more_bits_t in ScatterLock
-b8e4afa mds: show xlist overhead
-580cf83 mds: move unstable SimpleLock state into separate struct
-34f5cfe debian: specify mirror explicitly when creating pbuilder image
-010dd0f mds: make mds stopping work (with new mdsdir changes)
-d641a63 mds: don't do_cap_update() if not inode auth
-6c88cf3 mds: detach mdsdir inode from hierarchy
-0e44c85 mds: don't assume lock parent is inode in eval_gather
-03c93a0 mds: notify replica on XLOCKDONE -> SYNC transition
-9cfd98d mds: simplify LocalLock wrlock methods
-de8a55e mds: add locallock statemachine
-019c052 synclient: print mount error
-7f0791c mds: create abstract LockType that includes numeric type and state machine
-cbd6b2f debian: build binary-arch debs only from builddebs.sh
-d2e6374 debian: clean out unused debhelper rules steps
-debaa52 debian: put debian/ in .diff.gz, not release tarball
-4fdb6ce msgr: remove dead kill_after code bits
-71cfe30 todo multi-mds issue
-ff887e2 mon: users can now change pool owners.
-543c9eb osd: Check auid permissions in get_pool_cap
-fd3168a mon: use MonCaps::check_privileges in prepare_new_pool
-5302994 Revert "mon: add check_privileges function to OSDMon." Deprecated by the existence of MonCaps::check_privileges
-e59f544 mon: add check_privileges function to MonCaps
-a9b15cc vstart: use 'allow *' notation instead of 'allow rwx'
-9b3786f osd: accept 'allow *' as an admin flag that sets allow_all in the OSDCap.
-9a8dd4f osd: OSDCaps parses and stores auid permissions
-719c13a mon: AuthMonitor doesn't overwrite allow_all bit on incoming messages, only on initial connect.
-efcd0d8 mon: Add basic operator<< to MonCaps
-c6e7495 mon: Accept 'allow *' as an admin flag that sets allow_all in MonCaps.
-55ace06 mon: MonCaps parses and stores auid permissions
-e4e775b thread: mask all signals on child threads
-e976c53 timer: kill unused g_timer
-fe4f42b mds: create mds.$id debug log symlink
-72e04c8 mds: only check for canceled _client_ requests, not slaves
-233d2d8 mds: fix MDentryUnlink
-cf44146 messenger: don't use signal SIGUSRx anymore
-a7ae330 qa: make -j on kernel build
-c9506f7 Revert "mon: Hack -- set allow_all in caps if client name is admin"
-e0c3c15 mds: note when we last became non-laggy
-0383878 mkcephfs: cosd mkfs as root, then chown
-d77caf2 todo bugs
-822ae4a filestore: clean up btrfs, clone range detection
-ca02d68 cauthtool: verify set_uid arg
-dc38d48 mds: dump misc struct sizes to log
-9c8eef2 monclient: time out properly from wait_auth_rotating
-fb5ecb9 decay: separate fixed DecayRate from DecayCounter
-fdb85ca mds: drop useless double from DecayCounter
-f07ce46 mon: Hack -- set allow_all in caps if client name is admin
-9199dd2 objecter: librados: add optional auid param to 	create_pool functions
-14cdfd4 objecter: add auid to PoolOp, fill it in during pool_op_submit
-fbe08c7 mon: let prepare_new_pool assign an auid. Add new version that takes an MPoolOp and checks permissions first.
-07df67f mon: add check_privileges function to OSDMon.
-1b7119f msg: Add an auid field to MPoolOp; additional constructor to match
-3b1bf4b auth: move CEPH_AUTH_UID_DEFAULT into ceph_fs.h
-4020dd1 cauthtool: set auid in data member format instead of as (ignored) text key
-6d6eba3 mon: store auid in MonCaps
-c898ba5 osd: store auid in OSDCaps
-1b211e5 mon: fix bad return test!
-036f923 auth: add set_uid() to KeyRing, print out auid in print function
-846acac auth: Add an auid parameter to verify_authorizer and handle_request
-4637d18 cephx: Piece-wise initialization of structs is BAD! If you add, say, a field "auid" to the struct and it's being piece-wise initialized then you need to change every copy to include it. Or you assume it's just copied wholesale and then spend many hours trying to find where it isn't. Like in this one.
-f58c41b auth: rename auth_uid -> auid
-1d2516d auth: re-add auid to EntityAuth and AuthTicket.
-d4c9453 mon: add auid field to MonCaps. Also make it a struct -- we want those data members accessible!"
-4dd6b8d After discussing with Sage, we do want auid to be a part of AuthTicket, et al. Let's do it that way. Revert "authtool: give generated key specific uid if one is provided on the cli."
-e931466 mds: shut up about request latency
-f4d9916 mds: return lease on null dentries (ENOENT lookups)
-1f49bff mds: behave when passed NULL *need_issue
-18173b5 crushtool: fail on parse error
-0f11eee mds: accept stray reconnects
-265ad9e filestore: fix --mkjournal option
-1477ec7 filestore: avoid sync_file_range(2) if not present
-71b9a19 filejournal: avoid sync_file_range(2) if not present
-3a76b63 autoconf: detect sync_file_range(2)
-6a296bf crushtool: allow multiple -v's to increase verbosity
-dd43f08 crushtool: fix parsing with new boost library (compress whitespace)
-08e21ca osd: mon: caps store auth_uid as an int for fast checking
-1cb95b4 cephx: Add auth_uid (if present) to Info for all service types
-363647b osd: OSDCaps have a better check for ownership
-3a080fa authtool: give generated key specific uid if one is provided on the cli.
-c8e4f54 Revert a number of auth_uid commits.
-ed12397 todo
-51081fa init-ceph: return success error code on missing ceph.conf if no -c
-e307f2b mds: fix snapid tests in encode_inodestat
-0ee0a8d mds: fix null pointer deref in resolve on mostly-empty mds
-d844dde journal: set committing_seq in commit_start
-5fa2083 osd: use per-PG ObjectStore::Sequencer when possible
-0ca85bc filestore: add Sequencer to queue_transaction interface
-8f67cb4 msgr: don't redefine value of ENTITY_TYPE_AUTH
-a38802e osd: fix TRIMTRUNC truncation size
-46a771a filestore: use separate finisher for journaled ahead completion
-5e36574 0.19.1
-2e6c366 builddebs.sh: suppress lintian as root warning
-62c8ceb auth: Add an auth_uid to AuthTicket. Still to do: copy it around
-ae8ed24 auth: misc printing and initialization fixes
-1a6e0ed vstart:/mkcephfs: set client.admin auth_uid to 0
-2ab6e75 authtool: set generated key to specific uid if one is given
-afdab56 msgr: Remove the type CEPH_ENTITY_TYPE_ADMIN. It *looks* like this won't break EntityName's isAdmin() function as that depends on a set name, and client.admin will satisfy it. I think.
-ce20691 ceph_fs: Split CEPH_FEATURE_{SUPPORTED, REQUIRED} flags into service-based flags msgr: New get_{required,supported}_bits methods which calculate required bits based on type of self and of peer. Replace all hard-coded flag uses with these.
-647e4ce OSD: If an auth_uid owns a pool and has no explicit permissions, grant it full privileges.
-b30a6f5 osd: Add auth_uid to OSDCaps, and fill in.
-ea01f18 auth: constant for unknown/unsecured user
-8980fa2 filestore: fix ondisk vs onreadable_sync deadlock
-2a63168 todo
-4b77a04 builddebs.sh: keep base.tgz outside ~/debian
-d0974d1 mds: put forced open sessions in OPENING then OPEN
-73f49ad todo
-ab32fae debian: new release, push, build, publish scripts
-80731d6 Makefile: fix /sbin hack
-62571f2 Makefile: include debian/
-19ededd mds: fix (new) sessionmap decoding
-dc2c1e9 mds: fix mds_export_targets message parent
-038a8eb qa: download linux tarball from ceph.newdream.net for kernel compile test
-2191ca3 cauthtool: validate arguments better, cleanup
-a64caec osd: use onreadable_sync finishers to drop ondisk locks
-429a9ef filestore: add onreadable_sync callback
-5e6b5aa context: minor finish_contexts() cleanup
-03a9257 finisher: generic C_OnFinisher context
-d410381 objectstore: conflate onjournal and ondisk
-155abb4 mds: revise mds sessionmap encoding [disk format change]
-a0e5564 mds: initialize session state, even if we had it already
-f3c6dff mds: assert client_msut_resend on forward.
-6abf766 mds: print session states as string; nicer dump
-2209736 encoding: make bool encoder explicitly u8
-d499cf5 auth: auth_uid needs to be in AuthCapsInfo as well.
-a2295f7 authmon: reminder --> remainder, for less confusion!
-5464b0b mds: if we have no subtrees on rejoin_done, leave cluster
-6aa4924 mds: fix trim_non_auth empty lru case
-4a68eb4 qa: specify logdir on command line (or assume rundir)
-5b78f5d osd: do not activate pg if lost osds and no acting has gone active
-07005fa osd: detect permanently lost objects, and continue
-812fe1e osd: send log events to monitor
-6d34a28 osd: print lost_at
-20f5f33 mds: fix sessionmap decoding
-a239159 rados: revert indentation so it matches kernel. Oops.
-cfbc85d msgr: Set features in ceph_msg_connect_reply
-14052d4 auth: Add a uid field to EntityAuth; make it a required feature
-2b4e605 rados: fix indentation
-1f82e10 filer: remove -> purge_range, and scale to large ranges
-e3b63c9 mds: make scatter_nudge actually nudge when replica asks
-71626d0 mds: correctly set root inode_auth during recovery
-d489951 mds: show nref=%d if MDS_REF_SET is not defined
-c51148c mds: fix file purge race
-68b7d43 filestore: explicitly parse args for _touch
-ae63fc9 init-ceph: don't barf on dash when no command
-166a76f automake: fix mount sbin dir when configured with prefix
-86cab4a osd: clean up WRITE, TRUNCATE, TRIMTRUNC
-734bbe8 cauthtool: --caps fn alone is a command
-1d1c497 todo
-74ac290 debian: mount.ceph in /sbin, not /usr/sbin
-9ad91c0 objectstore: simpler transaction encoding
-59d1b67 vstart: default to 3 mds
-ed87bef uclient: do not retain caps being revoked
-aac8930 debug: fix warnings, use larger path buffers
-4aeed81 logger: fix warning
-109f37f workqueue: behave when multiple threads call drain()
-f8b2584 mds: add support for directory sticky bit
-4540b5e filestore: only do btrfs_snap if btrfs
-ef27fd6 update release checklist
-98f5be5 (tag: v0.19) v0.19
-801d248 mon: disable 'osd setmap'
-e2ed6db osdmap: fix uninit var warning
-f4a5f53 mon: add 'auth export ]name]' to export a full or partial keyring
-65f5123 qa: fix snaptest1.sh
-ab03efb osdmap: decode old osdmaps prior to pool_max stuff
-157dec1 osdmap: get rid of useless max_pools
-1b0711d osd: pool cleanups
-465b46f todo
-9f79756 mds: ignore session RENEWCAPS if state not open|stale
-455c594 osdmap/mon: Be more defensive about highest_pool_num usage
-5bbb3d6 rados tool: mkpool/rmpool commands now available
-c555ee3 mon: can now delete pools via 'ceph osd pool delete foo'
-12e3742 rgw: actually delete pools when using rados!
-9851a20 rados/objecter: can now delete pools!
-aea1082 mon/msg: MPoolOp can carry POOL_OP_DELETE; OSDMon puts pool in incre old_pools
-69f923d librados: init PoolCtx properly -- was always setting snap_seq to CEPH_NOSNAP
-3ced5e7 osd: Deal with pools being removed from OSDMap.
-212a9fd OSDMap: get_pg_pool now returns a pointer This lets us return NULL if the pool isn't in the map, which is needed functionality for pool deletion. Meanwhile, code which expects the pool to exist will continue to cause a crash if it doesn't.
-6059479 rados: fix seg fault on cleanup of a failed pool open
-3b1a90e mds: infer 'follows' in journal_dirty_inode on non-head inodes
-01ed8d0 mds: clear cap->issued on flushsnap
-6deb60b mds: don't croak on null dentries in cache during reconnect/rejoin
-34ad5bf8 objectcacher: use trimtrunc read/write ops
-92baa54 osdc: clean up some mess
-bc32b8f objecter: add read_trunc, write_trunc
-7a73f91 mkmonfs: rm -rf, so that we kill 0600 admin_keyring.bin
-ce464a5 osd: fix recovery requeue race
-72d7117 init-ceph: print 'already started' instead of failing to start
-10ae652 msgr: more conservative locking, thread join asserts
-f5209d7 mon: note mds beacon times more carefully
-28257a0 osd: bail out of interval loop completely
-d7eb8ce osd: always update up_thru if pg changes before going active
-f931fec osd: simplify, and version, pg attrs
-d8b622a osd: remove some dead code from build_prior
-d17257b osd: fail startup if store is in use (before we fork)
-226c727 osd: set heartbeat addr properly
-5f3f958 osd: fix memset transposed params
-8538efc osd: don't block on mon negotiation on startup
-315c8cd mkcephfs: fix up permissions, ownership on temp keyrings
-28783e3 ceph_common: sudo su, not su
-6cc6d10 mkcephfs: always clobber, since we don't support not clobbering anyway
-6932971 mkmonfs: require '-c conf' to avoid accidents; stash admin keyring
-26fdf06 cauthtool: mode 0600 for keyrings
-6bfb95c mkcephfs: put admin keyring in mon_data, for safe keeping
-ba2723c mkcephfs: --clobber, not --clobber_old_data
-fa5478b qa: +x snaptest1.sh
-f85f60f objectcacher: use ObjectSet container instead of inodeno_t hash_maps
-d5b9c5f cephx: adjust auth ticket renewal encoding a bit
-b509371 qa: fix up runallonce.sh
-fe58fdb debian: fix init script hackery
-ef50a0c todo
-9a2e5ba mon: print caps to debug log
-1216059 cephx: nicer debug output in service handler
-3d1c079 cephx: use 'next' key for ticketes when 'current' is expired
-378ce41 csyn: print something on mount failure
-142b779 cephx: return expires service keys from rotatingkeyring
-8cbfb32 cephx: fix negotiation on reconnect
-44dc114 monclient: renew service tickets a bit after the current expires
-ef54e0c osd: don't update object size if didn't write anything
-2feea3c cmon: suggest mkcephfs when 'whoami' not in monfs
-2f90018 cephx: fix up key rotation
-9be2e6a cephx: nicer keyserver debug output
-e401cd2 osd: write op updates trancation sequence if not already set
-3fb7364 msgr: Update 'documentation'.
-878f5fc init-ceph, mkcephfs: fix ETCDIR
-9662ad4 mds: behave when we pipeline session updates to journal
-159dc00 msg: union sockaddr_storage to hush strict aliasing warnings and clean up code
-53d3df0 init-ceph: Required-start: $remote_fs
-469d089 debian: do not include var/run/ceph in package; mkdir -p dirname unconditionally
-2d745bc rados man page; include rados in ceph package
-789d702 debian: include cauthtool
-c77dd33 rename authtool -> cauthtool
-d6d3d2a mds: behave when we pipeline session updates to journal
-ad9f8db workqueue: make drain() wait for processing AND queue
-c77b536 mutex: fix file mode
-6aea5cc osd: take ondisk_read_lock if pushing object to peer
-a3a248c filestore: return 0 for no-op transaction
-b06b232 debian: fixups to build inside pbuilder
-270a7bdd ceph: fix manpages so they are only installed once
-0ef0ab4 osd: count objects degraded due to degraded pg
-62a0e4b osd: prevent do_waiters() while _dispatch() is running
-4a8d1ec ceph: wait for monmap
-03da8ba osd: btrfs_snap by default
-48e3b00 osd: carry ondisk_read_lock if prepare_transaction may_read()
-153a37e osd: order rmdir in remove_collection after deleting dir contents
-816ab37 filestore: fix old clobbering of commit_op_seq
-408c81c osd: fix lock inversion with ondisk_write_unlock
-c91716e osd: store local osd magic, whoami, and other static bits outside of ObjectStore
-73cc468 osd: print truncate_size signed, and only print at all if _seq > 0
-0f42df4 debian: updated debian build scripts, changelog
-d87f66d mkcephfs: warn on missing keyring for mds, osd
-4b3c3d3 authtool: add -a/--add-key command
-a23cdb0 buffer: add decode_base64 method
-dbcb325 cephx: pipe down about ticket renewals
-fdbd893 osd, mds: don't time out authenticate()
-2ec2d57 filejournal: make io contiguous in write_bl() for directio
-d289ea0 ceph: error out on authentication failure
-82afbb6 monc: fix authentication timeout
-26eb29d monclient: kill unused wait_authenticate()
-29d5dd6 objectstore: include struct_v for Transaction
-ffb1b6c osd: wait for readable on primary after pulling an object
-f668ce9 authtool: only create keyring if --create-keyring (or -c)
-0a6e4ed mkcephfs: misc cephx fixes
-c76ea9d debian: fix builder; add newish headers to Makefile.am
-aa85188 mkcephfs: misc cephx fixes
-4d18995 filestore: roll back to last clean snap on mount; clean up sanity checks
-9747e16 filestore: fix up commit_op_seq
-e878373 filestore: use WorkQueue for ops (so we can have >1 thread issueing fs ops)
-496d764 spinlock: make lockdep optional; off by default
-147c6f5 osd: add uid to ceph_pg_pool; move encoding versions of rados.h
-213bd01 monclient: return authetnication error
-035389a auth: tolerate bad authenticator replies (retry instead of crashing)
-91bf3e3 mkcephfs: no scp -v
-dfc1b11 auth: fix KeyStore interface
-53c0abc auth: simplify KeyRing map type, authmon add/importing
-7761ad9 cephx: separate KeyRing and RotatingKeyRing
-bee7be2 cephx: add struct_v throughout.  some cleanup.
-ba515fe mkcephfs: generate cephx keys during mkfs
-40b9022 auth: use KeyRing encode/decode
-0b9f40e todo
-329178d mount: set flags when getting -o sync
-6ea3030 mds: fix dumpcache
-6285b61 authtool: only create keyring if --create-keyring (or -c)
-f40957e config: rename 'keys file' to 'keyring'
-3ebf9a4 filestore: optionally checkpoint with snaps
-5bdb348 journal: make sure max_size is multiple of block_size
-54898b3 mds: print setattr'd values with MClientRequest
-0fcd68b mds: only set smaller flag in setattr completion if actually truncating
-5ba3462 authtool: only create keyring if --create-keyring (or -c)
-3a29b5c filestore: (try to) warn if not btrfs or ext3
-6b09917 vstart: writeahead journal by default
-7923a19 filestore: adjust default sync intervals
-b8bf499 filestore: warn on bad journaling, sync options
-c8f27ec journal: throttle journal
-c736e81 filestore: throttle op queue
-bd76ae9 todo
-37a45d5 osd: fix osd shutdown
-6963a6f journal: fix mis-merge
-2474783 mds: dump_cache even when debug_mds < 2
-3642c2b journal: allow journal seq #'s to jump
-f46b1b4 journal: make wrapping simpler
-99e316f osd: increase osdc protocol number
-e72cc23 truncate: don't write beyong truncation with old trunc seq
-9919b09 truncate: initialize truncate_seq, truncate_size
-2f72778 truncate: truncate information sent on each read/write op
-af6803b osd: quiet down about request perms
-c1259b9 librados: guard against double-release; clean up ref counting
-1389bf9 rados: fix delete[] vs delete
-1f680bf lockdep: fix use after free; avoid register in unlocked() path
-1cf80d5 uclient: fix uninitialized var
-82728db filestore: fix empty cond location
-405f17a mount: fix compile errors
-c0058fe streamtest: do concurrent ios; async commit AND ack
-3f3aa0b osd: add mutual exclusion while writes are applied
-089afab journal: sync_file_range on bdev, fdatasync on file
-b73861a journal: warn if we detect disk write cache is on
-22bdecd journal: align (by default) even when !directio; directio by default; log latency
-8c737cf journal: group entries into single io in directio mode
-c89d9bb mon: fix auth restart decoding
-bf1b88d mon: fix osd tell *
-d4735c8 mount: fix compile errors
-11dcd42 TODO: mark bugs completed
-9133157 mount: canonicalize path name for mtab
-a96af2e mon: possible fix for rare problem where osd boot messages are double-logged. From Sage.
-883c6fa mon: don't delete all laggy mds beacons, just the one's you've replaced
-5953505 mon: print out proper address in debug log
-1422241 mds: unify two if blocks with identical checks
-c99c857 todo: Slightly out of date
-3332509 journal: fix padding
-03901bd osd: streamline writing new maps to disk, somewhat
-14a5105 osd: use flush, not sync_on_flush
-d1b41e6 filestore: flush() will wait for queued transactions to be readable
-94d76e9 journal: add flags field to header, entry_header
-5c264b1 journal: allow pre and post padding for journal payload
-6d96b58 debian: use bash for debian build script
-f131790 journal: fix thread id printing
-31a2ce2 finisher: fix flushing, debug output
-3a68274 dout: print thread id hex (to match up with gdb)
-9586cd3 filepath: add struct_v
-a52203e common/include/rgw: Add versioning to structs without it.
-9ebbeb6 mds: add v to encoded mds structs
-caaeb52 rgw: struct_v in RGWObjEnt
-87a0d76 journaler: struct_v in structs
-6283749 mds: remove unused _pad variable
-e574c84 osd: add struct_v to most encoded structs that don't already have one
-adeb0be msg: add type to ceph_entity_addr
-eebe6df osd: set reqid for push/pull subops
-69d8e4e filestore: fix journal flush
-d12b51d osd: use queue_transaction throughout
-b4c1805 filestore: queue onreadable _after_ starting journal item
-343e344 filestore: queue_transaction and generic C_DeleteTransaction
-3ebb4da osd: reply with ACK if client doesn't ask for a COMMIT
-6ba2d3e journal: include a version field in header
-8b42318 osd: simplify pg write mode transitions
-e6683d7 osd: only use DELAYED if no journal or journal is writebehind
-2da1030 osd: make Transaction lifetime match RepModify (not stack)
-b645e20 dout: print thread id hex (to match up with gdb)
-43581e5 wip
-f2b5b52 finisher: wait_for_empty
-23a8a8c filestore: add writeahead journal support
-1cc63ac filejournal: optionally block on full journal
-707b5c6 filestore: refactor applied/committed completions
-9171241 osd: refactor op_applied logic
-9765bc4 filestore: preliminary support for parallel journaling
-3d3d1ea finish: support non-zero return values
-69d9e87 osd: encode struct v for ceph_pg_pool
-e49a673 mon: add struct encoding v to ease future revisions
-90bfb99 mds: make CEPH_MDS_OP_CREATE a write op [mds protocol change]
-ec86934 ceph: remove stray #include
-da13c5a librados: implement C versions of snap calls
-818c73e Change CompatSet usage to be compatible with new struct
-80979bb change CompatSet
-b826611 mds: Revert CInode/Journaler changes as we'll move them into MDSMap later.
-eb27307 add versioning and awareness bla bla
-8883cd2 mon: use CompatSet in disk format
-15fa588 mds: use CompatSet in disk format
-5530e3b osd: use CompatSet in the superblock. Only one 'feature' right now
-77e196c include: new CompatSet.h
-c74be20 replace strcat with strncat
-fa0a0c5 replace sprintf with snprintf all around
-f78d3d0 msgr: fix mark_down
-adf613f filestore: don't croak if current/ exists
-ca27bd6 todo
-d39149b logger: use larger buffer, snprinf instead of sprintf
-9b6cf70 osd: use journal in peek_super
-5cd5b11 filestore: put data in current/, a btrfs subvol if possible
-8f06f08 filestore: rip out usertrans experiment
-b102e81 filestore: rename _apply_transaction
-7b06739 mds: add 'dumpcache [filename]' mds command
-a26fec6 mds: disable cache dump on rejoin by default
-45e15bb TODO
-0ce86b3 mon: properly clean up SessionMap on a shutdown.
-d2ddb9d csyn: properly use multiple clients
-ff83762 don't keep configs in git
-bfc75d6 todo
-1f95289 botched merge
-9ea4562 msgr: make use of references and const slightly more consistent
-89bdc33 monClient: fix potential naming confusion with messenger
-40c37fc msgr: rename endpoint_stopped to destination_stopped
-6c63428 msgr: rank is just a bad name for local SimpleMessengers now
-42b7af6 msgr: remove erank
-b914135 msgr: should be destroyed in the same thread it's created
-7e799bc filestore: don't bother masking signals
-5f54543 msgr: Remove erroneous rank->destroy calls I inserted in 9a96bf
-644ce37 msgr: get and put inside DispatchThread, not when you create/end DispatchThread
-52a37a9 msgr: Remove unregister_entity since there's only ever one now. Move needed functionality into the end of dispatch_entry.
-6737529 msgr: Make usage compatible with last commit
-1534b96 msgr: Remove all references to Endpoint
-e292d72 msgr: Remove declarations of unimplemented functions: rename_entity and new_entity
-04ba435 msgr: SimpleMessenger takes responsibility for Messenger functions.
-9a96bf6 msgr: All SimpleMessenger uses are now on the heap for appropriate destruction
-032d975 msgr: SimpleMessenger is now a Messenger itself -- sort of
-98bdb8b msgr: remove rank number from endpoint, since there's only one. Remove Endpoint's wait() method as it's unused.
-11fed1b todo
-d52e8d2 osd: fix MASKTRUNC
-14f2c78 qa: dl pjd.tgz
-a929438 todo, sepia reformat
-2de29d2 mds: change MClientReconnect encoding (mds protocol change)
-2492449 uclient: clean up mark_down of failed mds
-ed96d87 mds: add NEW session state
-076e0dd msgr: drop rank lock while verifying authorizer
-6d2bfb5 uclient: don't renew caps while mds is recovering
-93dd9f0 mds: expose projected ctime is client is last versionlock wrlocker
-40bcc6b todo
-e7892cd osd: prioritized repop acks
-3ef3264 qa: don't fail rm of old log
-775d682 qa: make logging more forgiving
-e357203 msgr: separate incoming queue from local_endpoint
-87682d1 osd: put meta_coll const in OSD.{cc,h}
-eae3004 filejournal: delete[] not delete
-37f04d9 backtrace: fix #includes for ppc
-4bfa758 hash: use native appropriately sized hash for word, not native host word size
-e5ff148 change LP64 ifdefs to casts for printf formatting
-2c328d1 logger: cleanup 64
-0fb2ac1 todo, confs
-d06992d msgr: include features in connection handshake (protocol change)
-4e7b383 msgr: put tid in ceph_msg_header (protocol change)
-b3808b4 todo more bugs
-bef2ac0 assert: leave cruft off top of assert failure backtrace
-6dbb718 backtrace: demangle c++ names
-a4f1430 todo bugs
-f579387 mds: new commands! issue_caps inodenumber calls locker->issue_caps try_eval inodenumber mask calls locker->try_eval
-b6b7ba5 mds: new command kill session xxxx ends that client session
-196f277 create a new function end_session to end client sessions
-6dce782 vstart: allow -o 'some option for config file = whatever'
-00f6cf5 osd: fix PG print log bound check
-299d620 todo (bugs)
-54b8cd3 Make a more flexible 'tell' command to replace injectargs osd/mds: make a handle_command function; don't parse all MMonCommands as config
-e066744 todo (bugs, filestore notes)
-22701b3 osd: include last_epoch_split in PG::Info::History
-e2ca4eb msgr: don't keep sent messages on lossy connections
-687cc41 mds: log client timeouts
-dd2eeef mds: don't croak on stray ACK
-580dd13 qa: Copy the output of each test to a log file
-796d3ba qa: Whoops, never added the runonkclient script
-6fc3f5e auth: rename mutex so that it doesn't confuse lockdep
-6e72b20 msgr: maintain per-pipe in_qlen; avoid list.size(); some cleanup
-e243c7f librados: fix locking slightly
-43ab6e5 qa: fix runallonce target dir verification
-2611a57 filestore: disable USERTRANS for now
-105b669 todo
-6088777 librados: less noisy
-7c3dc89 vstart: fix small bash thing
-072be5c osd: drop backlog on recovery completion (when we mark PG_STATE_CLEAN)
-6258b4f osd: split pg log too
-894d252 osd: make osd thread pool sizes adjustable
-6ebd816 init-ceph: use pkill, not killall, so that c$type.$date is also killed
-ebc3136 mon: fix mon injectargs
-0deb520 mon: fix null pointer ref on connection
-3955dd1 crush: fix grammer to parse hash
-298a2d8 msgr: lockdep found some not-actually-possible bad dependencies; they've been removed to make it happy
-2433250 msgr: Add at least a little documentation
-82af707 msgr: Remove noisy debug output.
-15f05d4 msgr: discard_queue now removes empty pipe queues from endpoint's map This prevents bad pointer dereferences
-eb371aa msgr: Cover qlen with a Spinlock for faster access and to limit blocking
-ec2720c msgr: That unlock's not in the right spot
-2e78035 msgr: Fix a number of locking and deletion bugs. Appears to work.
-3a7ad1b msgr: Fix blocking locks and another potential block.
-c58f0e9 msgr: rename locks for clarity; move some around to prevent blocking.
-0792302 msgr: implement round-robin pipe message delivery.
-ec0031b msgr: Remove Endpoint::dispatch_queue and queue_message; set up local pipe and necessary routing code.
-c017414 msgr: Add queues, etc needed for message delivery by round-robin pipe
-eb1be2b msgr: rename pipe's outbound message queue
-2756e43 config: parse 'lockdep' option in .conf
-429ac4e ceph.conf.sepia: more osds, lockdep
-1eabf8d mon: log error, don't abort, on stray pg_stat notify
-0b83b54 osd: set pg_stat.created
-4efe6ae osd: respond to query on uncreated pg with empty info; do not create
-cfda3be mon: stop trying to create localized pgs >= max osd|device
-6743d3f todo
-60373a1 osd: fix mark_down on heartbeat_messenger addrs
-8882369 filestore: avoid string copy after collection_list sort
-0bc006e osd: don't forcefeed bad (large) device ids to crush
-5b6ca82 filestore: test xattrs on basedir/fsid, not basedir
-4c1f64a ceph.conf.cosd changes
-4a98c46 osd: drop old osdmap compatibility cruft
-823513f osd: fix decoding for old osdmaps (pre osd hb change)
-70d22ba mds: mark down stray connections on reset
-cff5512 vstart: add --smallmds option
-9bc4922 logger: avoid dup lines when we get behind
-9922ae1 qa: add bonnie++ to the workunits
-616a655 filestore: limit size of flusher queue
-222c6c2 osd: rev cluster protocol to match osd hearbeat change
-e0862fd msgr: Only allow one local endpoint; now has simpler, less iterative code!
-1ebcebf osd: Now uses separate messenger for heartbeats.
-31ebbe5 rados: benching sequential reads can now have a time limit
-a0d3b8f rados: change benchmark interface and record objects written/size to osds
-ff4e155 mds: debug reconnect timeouts
-3d97239 debian: only upload tarball whem building amd64
-9bea9d0 logger: use proper format for s64
-ee44121 qa: put qa used files on ceph.newdream.net
-2f10137 (tag: v0.18) v0.18
-a08d961 rados: move librados.h, rados_bencher.h
-dc24351 mds: avoid scatter writebehind from predirty_*
-e71e361 crush: fix whitespace
-f700844 logger: s64, not long
-a4257d8 buffer: optional buffer debug output
-25e8202 ceph: fix message leaks
-f3c83bf init-ceph: optionally copy executable to remote host before running it
-7fd1a21 mds: typos *sigh*
-e2939a1 mds: Cleanup/doc updates
-a010652 mds: Add export killpoints
-b6dba80 mds: Add killpoints for mds export
-00dbe2b mds: Add mds_kill_export_at asserts. Create and begin documenting doc/killpoints.txt
-e439bd3 config: add kill arguments for mds import/export
-b709a72 mds: bracket mds journal events with {start,submit}_entry
-95ee211 todo
-adbd7d8 dropped old aleung mds branch code
-714a9af (origin/historic/aleung_mds_security) mon: fix allocation of low global_ids after mon restart
-89603b6 test_ioctls: print preferred_osd value from GET_LAYOUT ioctl
-54b8537 hash: fix whitespace
-fd0195a mds: set mdr->in[n] in rdlock_path_xlock_dentry
-378e476 mds: do not include /.ceph in readdir results
-7928120 librados: set id in messenger
-364e045 rados: read benchmark is asynchronous.
-8efea57 Change hump-backed variable names. Initialize data->in_flight!
-18b909a rados: pull sequential benchmark into its own function
-3d43376 rados: remove iTime from object names for complete determinism
-bcbafa6 rados: Handle errors slightly better
-6a8bda5 rados: split up function into more subfunctions
-b790636 rados: Deterministically fill data, reverse count:time order
-1537340 librados: minor comments
-ae9edc8 rados: Move variables into data structure; rename to be generic
-e328d28 rados: Move benchmark functions into separate file
-6250b93 qa: Rename a file for future clarity.
-83e2b9c qa: specify test path as argument ot runallone.sh
-9b5b0f9 config: preserve argv[0] if appropriate
-defeedb qa: test mdstable failures
-c280aac todo
-8bc7d22 mds: inject mds failure during mdstable operations
-5bd7404 mds: log successful client reconnect
-77d26c9 sepia: asdf
-89beb68 mds: journal/replay rollback on MDSTableServer
-6c34e67 mds: track _note_prepared/committed in normal path, too
-5c0be5d mds: pass do_eval through to adjsut_subtreeauth
-8dd0991 vstart: add [mds.a] section when no -x
-75d4ce8 mds: drop requests on closed|closing|etc sessions
-beb2fb9 ceph.spec: mostly in line with .deb
-4c94d16 object: add missing include
-99379f6 mds: ignore reconnect if session state is closed
-d66f290 todo
-05bd3f7 mds: don't renew caps (or touch_session) on closed session
-e66778b mds: less --, more -
-cd6f381 mds: update pending_for_mds during table server replay
-fd21693 mon: add 'mds set_state <gid> <stateid>'
-1ac56b7 mon: avoid mds state update when clearing laggy flag
-e6e8f87 vstart.sh: fix -k for mds loading
-efe705c vstart.sh: fix -k (cmds init)
-3c9fa27 msgr: fix bad unlock on tcp_write error
-cf28787 mds: fix replay of hard links
-6d10f06 mds: clear session before remove_session
-1ee8308 mds: do not eval subtree root during rename_prepare
-b62daac todo
-83f560c mds: fix client purge crash
-bf3cd28 mon: fix use-after-free in mds mon blacklisting
-a7e5be7 mds: warn if replay used ino doesn't match session's next
-29efb0b mds: fix reconnect race
-780ee5a mds: remove dead session request list trim waiter code
-3c8defe mds: associate session with connection; clean up
-d7364a4 vstart: include [mds.$name] for auth_none
-69ff349 osd: don't crash on (and allow) messages sent to self
-32c81a2 conf: don't crash if conf file not specified and not found
-dad2011 filestore: fix mkfs with no jourhal
-16c8c5b auth: change error code when not supporting authentication
-ddf47d8 rgw: ifdef out dead code
-e648986 auth: set initial values in misc structs
-ba9fd9a sepia: no valgrind on osds for now
-b580653 mon: allow mds injectargs on recovering mdss
-23eaa6d mds: use global_id as key in MDSMap
-f35f8fe filestore: don't magically enable journal if ${osd_data}.journal exists
-bf58196 rados: kill unused ceph_fsid_set
-fec3196 auth: when renewing session, encrypt ticket
-6a34c6a rgw: fix base64 warnings (move impl to .c file)
-b05e184 mon: only remove_session if !s->closed
-beac937 atomic: assert valid ref counts
-0b85f09 auth: initialize EntityName type in constructor
-bf709f5 mon: fix session ref leak
-2cc368c monc: restart auth handshake each time we connect to mon
-68b5da9 mds: don't change directory size/rbytes from client cap update
-8f38d0e auth: add ull to large constant
-8696cd9 mds: fix inode rstat debug output
-dda61fe auth: add missing virtual destructors
-55d7bf7 osdc: use __u64, not size_t
-d8f3c4f mds: do not crash if m->connection == NULL
-34a57c1 mds: do not send MMDSMap to ourselves
-082aa7c add ceph_fsid_set helper
-2cb286f filejournal: use single shared zeroed buffer for alignment padding
-9a2606d buffer: add create_static constructor
-9a4083e vstart.sh: fix -k
-053db04 vstart: fix errors on auth none
-c88e60c msgr: rev protocol
-85a25b5 auth: fix monclient startup issue
-eb295b9 auth: fix client and server side negotiation
-d00b917 uclient: replace C_Cond with C_SafeCond
-ca5e4dd todo
-a845b66 todo
-4fab3f7 osd: allow reinitialization of osd journal
-30a057c rados: Move array to heap. Prevent segfault when you use too-large a write size
-ba8aa58 rados: remove unused paramater, add very primitive read bench in verify step
-d4db1ec rados: Cosmetic changes for Sage
-5eeb711 auth: change server side negotiation a bit
-88377be osd: eval access mode before try_*
-cec672d osd: debug pg mode
-955351f sepia: valgrind for a while
-18bbb8f objecter: be more verbose about laggy requests
-ae4e978 msgr: use discard_queue, kill drop_msgs
-4a644e2 msgr: don't initiate connect if we keepalive on unconnected peer
-6e88d27 msgr: fix possible use-after-free by taking pipe lock during reap
-302fc82 msgr: use common helper for reader/writer thread stop and reap queueing; fix locking
-760165c msgr: rename report_failures -> drop_msgs
-318698b msgr: small cleanups
-62ccae8 monc: small sanity check
-81fd4e1 uclient: set mode on snapdir properly
-09938e8 uclient: assert we have CAP_PIN
-3e8e5f6 uclient: always retain CAP_PIN
-fcc234a monc: small cleanup
-cfd69fc rados: Update stat calculation and display; change to wait_for_safe
-a3cb25c qa: We want to stop on errors. Add new scripts.
-0669ca2 auth: reuse global_id when requesting tickets
-9731313 vstart: fix overwrite conf
-fecee16 mon: fix decode authmon stash on restart
-709be25 mds: don't crap on !check_from, this doesn't happen with nolaggy
-8c6d276 mon: move misplaced parens
-aa4e5b5 todo
-f50a051 msgr: get rid of harmless valgrind error
-40edb9e mon: fail on write error
-37145dc monc: fix race/deadlock for get_monmap_privately
-a22418b uclient: use Inode::auth_cap to find mds to write back snap cap metadata to
-e5ca40d uclient: keep MClientRequest local to send_request
-63f75e5 mds: journal open_files based on is_any_caps_wanted(), not is_any_caps()
-0736930 mds: don't rejournal files with caps that are unwanted
-7e7a79e mds: don't croak on open_files without caps
-f3e746d rados: status printouts are now threaded
-ca342b8 mkmonfs: cleanup monmap fn arg
-531f227 Makefile: include all the headers we need to build
-788ddaa config: accept list of possible conf file locations; include ./ceph.conf
-75a3c1a vstart: -x to start up with cephx
-2acf8b6 monc: fix race/deadlock for get_monmap_privately
-9880cad mds: don't try to send mdsmap to clients that need to reconnect
-2fb6f73 mds: ignore/warn on late client reconnect attempts
-19087cf auth: don't try to read keys if cephx not supported
-96b5d97 auth: use user admin as the default user
-565448b qa: prepare for a hierarchical test script system
-27bc574 vstart: some cleanup
-f8b0e54 conf: default to auth type 'none'
-1b5bb1f auth: fix compile errors, warnings
-2dcdd08 auth: kill residual kernel/ files
-a4cc231 uclient: fewer msgs
-35e6892 todo
-35c3586 put testing ceph.conf's in git
-9284e90 osd: print useful mode wait message
-c514691 filestore: skip sync_file_range if the full commit has started
-ad41e44 mds: recommit after commit if waiting for newer version
-946b889 auth: fix mds messages filtering
-05fceac rados: fix usage() and -p option checking
-1a4557e mds: warn, don't crash, on rfiles/rsubdirs underflow
-ebe6623 msg: don't die unconditionally when got unknown message type
-0bd9fda uclient: increase cache size
-fff600c filestore: flusher thread; commit snaps (disabled)
-28f2765 osd: avoid truncate, remove ops we know will fail
-c267d25 osd: don't requeue pg removal if already removing
-6b6b7e1 todo
-a600b2e mds: force rdlock on any snapped inodes
-91d10bb sessionmap is an object, not a pointer
-dc2d15a mds: fix typo; also only suicide if we have clients
-55a29c5 mds: underwater is function of _loaded_ version, not in core version
-a86e540 todo
-76635a4 mds: If last MDS, suicide on stop rather than entering infinite requeue loop
-1848005 osd: do not apply_transaction in finish_recovery
-41c176b filestore: don't croak on 0 op usertrans error
-6e77d52 filestore: check return values
-9c46520 test_trans
-a1fb28e filestore: fix usertrans setxattr, print it out nicely
-7349d66 filestore: clean up btrfs ioctls; use actual btrfs ioctl.h
-48d9957 sample.ceph.conf: include usertrans flag
-82df8b5 filestore: make FileStore btrfs ioctl tests more readable
-486d696 mon: ignore MAuth message when connection has no session
-79c4d2a ceph: default to admin user
-d0be790 auth: make ~ in keyring search path subst in $HOME
-b36dbd6 auth: auth none encodes global_id at build_authorizer
-286553c auth: pass global_id to the osd, mds verify-authorizers
-2412a49 mds, osd: call monc->authenticate(), not wait_authenticate()
-d8da229 uclient: get keys, build authorizer
-16ad7a7 auth: don't display auth incrementals in the ceph tool
-4459382 auth: fix global id alloc on peon monitors
-c507e3c auth: kill ClientMOnitor, MCLientMOunt*, etc.
-fed2831 mon: use g_conf.mon_globalid_prealloc
-63f28b9 auth: added should_propose callback to auth mon
-688ee61 auth: verify global_id with the one on the ticket
-f5dc818 auth: increase max global id only when paxos is writable
-b051a2f osd: log misdirected ops; reply with -ENXIO
-255e328 sample.ceph.conf: fix btrfs mountoptions
-077e9cf auth: distribute global instance id to client
-e931ba0 osdmap: clear out old hash distribution code
-5301d08 osd: make pgids sort on (pool, preferred, ps)
-d9f94b5 crushtool: small fix
-407e934 Revert "crush: use spirit classic headers"
-a1340e6 hash: small cleanup
-63d2008 crush: hrm fix up builder too
-28ac444 crush: use spirit classic headers
-89d46be crush: make hash function selectable
-5779a13 osd: make object hash a pg_pool parameter
-2a7e2f2 osdmaptool: test-map-object
-1ffdf51 osd: use stronger hash function for mapping objects -> pgs
-be33008 crush: no more static inline
-575a40e auth: some cleanup, compilation fixes
-da08915 auth: manage global id in the auth mon
-b2a1c30 osd: This logic is slightly less confusing without the always-true 'full' param
-ec28906 mon: don't delete stats when sending osdmap incremental
-12482db qa: test subdir mounts
-057b046 init-ceph: tell user we're mounting btrfs
-4eafc99 osd: send single osd_boot on startup
-79c8c60 mon: don't log dup osd boot msgs
-3b9ecdd msgr: leave off ss_family when printing
-e3900c9 todo
-bf63449 ppc: do not copy_in unencoded __u32
-d9b5969 buffer: only define _XOPEN_SOURCE ifndef
-cd5026c todo
-64976b0 mon: make initial monmap epoch match paxos version
-587b2a0 mkmonfs: use common_init and parse regular args
-f2b2607 don't forget -standalone.git in release checklist
-87e4ee3 OSD: Don't repeatedly send the same incremental map update to clients.
-8ecf4d0 uclient: set NAME_MAX = PAGE_SIZE
-db142df Hadoop: Update JavaDoc and put in new patch file
-56a1f5e Hadoop: Numerous fixes. Set bufUsed=0 on a flush to avoid bad rewrites of data Downgrade a warning in IOStream since Hadoop apparently checks for EOF by reading until a read returns -1. Remove some leftover if checks that don't do anything. TODO: Remove something Sage did already.
-9ad69bd mount: fix hint initialization for getaddrinfo
-b758dcb mount: fix hint initialization for getaddrinfo
-28920de filestore: oops less noisy
-a80a510 osdmap: fix pps calc for preferred pgs
-3ec9de1 osd: nicer debug output on misdirected requests
-3a32c23 mds: mark scatterlocks with dirty rstat/fragstat during replay
-ee7affe mds: use fnode when replaying journal
-1687ce3 debian: gracefully replace lib packages prior to '1' suffix
-c643836 osd: kill int <-> pg_t conversions
-4672244 osd: convert ceph_pg union to struct
-f482600 msgr: encode sockaddr.ss_family big endian in ceph_entity_addr
-2a65271 filestore: close btrfs transactions cleanly
-3023509 default pid file /var/run/ceph/$type.$id.pid
-ad5ade0 auth: fix authorizer in the 'none' protocol case
-f4e91c8 vstart.sh: add option to avoid conf file overwrite
-574525a auth: set caps to allow-all with auth-none
-a4b7dc4 Hadoop: Don't use the local pg by default.
-22f3f90 Now passes all unit tests! Changes made to rename and between error codes/exception throwing.
-e0da411 Hadoop: Don't throw IOExceptions on extra calls to close
-f0e1ca7 Hadoop: f5 e3
-ed0f064 Hadoop: Behavioral fixes to CephFileSystem
-cd8e369 Hadoop: Various changes to CephFaker; not completed.
-6c5445b HadooP: CephFaker now properly sanitizes input filenames.
-95d7e5f Hadoop: Update constructor/initialize usage a bit
-44fc402 Simplify CephInputStream so that it actually works
-321063d Hadoop: Simplify CephOutputStream so that it actually works.
-81aca0e Hadoop: Reorder a few things for better safety and fix compile bugs
-be6b56d auth: don't wait for rotating secret with auth-none
-3f301ac crush: always return a value from crush_bucket_choose
-acf51eb auth: fix 'auth none' authentication
-f908337 mds: set isvalid in verify_authroizer
-320979c auth: fix osd authorizer
-3f71207 auth: add mds authorizer
-ef1800c auth: search list of files when loading keyring
-2746caf auth: allocate authorizers once
-2f19cc8 auth: define authorize callbacks for different auth protocols
-61216cd auth: always verify auth reply, even if it's length 0
-6ae47fa include guards cleanup
-0e6ae77 auth: less chatty
-c878561 auth: configuratble supported auth type
-949c263 todo
-e97c152 auth: fix verify_authorize_reply stupid
-761f09f auth: use u64 nonce, not timestamp, in authorizer[_reply]
-582a8b4 auth: fix service side bug on bad authorizer
-2a1270f auth: AuthBlob -> CephXTicketBlob
-08fbca8 auth: simplify challenge key encoding
-05e198b buffer: make [], hexdump const
-6133f02 auth: break client/server challenge calc into helper
-9ea4e4a auth: CEPH_AUTH_NONE auth and caps working
-e98eb90 auth: return correct auth type
-8de5de0 auth: auth-none protocol stubs
-0717270 auth: redefine CEPH_AUTH_NONE
-2f994ff auth: check caps before allowing osdmap, mdsmap subscription
-8b22652 todo
-3e781bb Makefile: fix lib dependencies
-34206c6 auth: some paxos messages require admin user
-44bab24 makefile: don't link libm and libpthread with crush
-4545f8b debian: fix copyright to avoid lintian check
-b279b0f debian: fix -dbg packages
-65a9ab8 debian: warn on no args to build script
-307382f radosgw: fix man page names, include in package
-751ff79 debian: strip, put debug binaries in usr/lib/debug
-e0cf00c rgw: man page for rgw_admin
-236c7ea rgw: radosgw man page continued
-f8fb331 radosgw: rename binaries rgw -> radosgw
-5f7951d debian: remove rgw_aclparser from package
-b89673b auth: mon does not filter messages that come from mon
-5a9cee2 rgw: initial man page
-887a347 debian: override openssl warning on radosgw
-882e82d debian: update package descriptions, sections
-84edfe0 debian: make lib package versions match SONAMES
-e38c4f5 Makefile: make all lib versions 1:0:0, fix libcrush
-bd41a8d debian: some lintian fixes
-44c37f1 auth: filter mon messages according to peer type
-2bced02 auth: client requests tickets when needed
-8886c03 utime: fix bug when decreasing double
-dd0a86c auth: bit less noise
-2b4f571 auth: no more state in cephx client handler
-031a9ce authtool: print encoded CryptoKey in base64
-23161f8 mount.ceph: only return INET addr when doing lookup
-168045a authtool: add --print-key, -p option
-6c77629 auth: fix mon crashing when filtering paxos messages
-606a522 auth: CEPH_SECRET_* -> CEPH_CRYPTO_*
-6956532 auth: make ceph_crypto_key match CryptoKey
-c44ebce auth: send request for tickets when needed
-fe56393 mon: Move full OSD test logic around
-8b85704 auth: cephx handler verifies keys expiration
-0e11376 auth: don't enforce caps on internal mon messages
-6625079 auth: filter mon paxos requests according to caps
-2a89ffa auth: get_caps, for MonCaps
-2714ef7 auth: keep caps after closing mon session
-c4f1af5 osd: break out OSDCaps into a separate file
-a8d7b3b Objecter: subscribe to OSDMap updates when paused or full
-b137227 auth: parse mon caps
-0203ad1 auth: clean up debug output some
-979e81a auth: clean up debug output a bit
-55875a4 mon: Fix bug that would make OSDMon over-excited about pushing new maps
-60c761e monc: less noisy about rotating keys
-cd095d8 auth: move auth rotating interaction into auth handlers
-6943b4b auth: pass mon caps to the session
-24c1c3e osd: fix authorizer verify
-c9c3f26 monc: fix rotating keys
-68eb539 vstart: debug monc for now
-7c75db7 msgr: handle bad authorize_reply gracefully
-3ea69d5 msgr: use authorizer, init to 0
-eeb4885 osd: simplify ms_verify_authorizer
-4c12ed7 auth: move one more type
-8fb0537 auth: a few comments
-2390701 auth: move most Auth.h stuff into cephx/CephxProtocol.h
-bb2bea0 mon: Fix an if so that PGMon doesn't send some reads on to leader
-0e84f49 mon: Move fullness checks into OSDMonitor where they belong
-89686fa mon: On every incoming MPGStats, check for a full/near-full OSD and mark map if needed.
-d0b6e81 uclient: Return ENOSPC if osdmap is marked full
-2a3834b Hadoop: Add buffering to CephIOStreams
-4e9e17e Hadoop: Add preliminary TestCeph code. It fails a lot.
-4739f2c Hadoop: Add the CephFaker source.
-9298535 hadoop: minor cleanup edits
-e85855b auth: initialize protocol field in AuthAuthorizer
-eb242e5 osd: don't try to build authorizer for connection with mon
-48527c8 msgr: put AuthAuthorizer on heap, set protocol field during connect
-ab4e687 mon: initialize vars
-394b3cf auth: filter mds messages according to remote peer type
-4f4c071 osd: fix log messages
-513ae17 auth: osd parser to accept 'pool'
-cf5fbb3 msgr: include authorizer_protocol in connect header
-5575ce6 auth: simplify AuthClientHandler interface
-2780b8d auth: simplify part of initial auth handshake
-f23c5ab auth: move cephx server side into cephx dir
-ac5194a auth: better encapsulate cephx protocol
-da062d9 auth: add exec caps
-a64e55e objecter: fix handling when pgls returns error
-55f92f7 auth: return bool from build_authorizer
-8cedb16 auth: cleaner about timestamp change
-e44aa1c utime: add != operator
-7c2afee auth: merge envelope, cephx handshake
-44c73b1 auth: remove (unused) addr field from authenticate, ticket
-6183e12 auth: kill some unused AuthClientHandler fields
-3e0675c auth: kill client side timeouts
-101148a auth: kill dead code
-15d776e auth: enforce read/write caps for osd_op
-c671c44 auth: fix pg_create filtering
-cb0c937 auth: filter osd messages according to their peer type
-61bd2ee auth: kill CephXPremable, put trans_id in msg
-84483b9 auth: nicer msg names
-10c8b04 msgr: be quieter
-019e744 uclient: implement ms_get_authorizer
-81d362b auth: fix up ms_get_authorizer
-88a65d8 auth: call the protocol CEPHX
-c4e1e3b auth: CEPH_PRINCIPLE_ -> CEPH_ENTITY_TYPE_*
-8679ec5 msgr: define C ceph_entity_type_name
-855d8ca auth: kill unused MAuthMon[Ack]
-7d9842c auth: AuthLib* -> KeyServerData::Incremental
-7bb6922 auth: list secrets using the second interface
-328973f osd: fix deadlock on initialization
-b204f6e auth: auth class list operation dumps key
-4cf754e librados: create objecter before other initialization
-6850433 auth: authtool dumps the key either
-b953da2 hexdump: can dump to a buffer
-cf744cc auth: fix uninitialized var, bad interface use
-b887cb7 ceph: add missing include
-7c2bd6a auth: rename Keys* classes
-ba7aac2 auth: some cleanup
-d334ef8 auth: clean out old authorizer cruft, unneeded AuthContext
-9f09331 authtool: useful error/output msg when creating new key file
-085ff62 authtool: print key, too
-332b9ae Makefile: include armor.[ch]
-65c9689 todo
-dacfb4e mount: include all A/AAAA records when resolving host name
-aae985d auth: verify authorize reply on connect
-fa5671c auth: authorize keeps state
-6955f53 monc: simplify authentication state
-31b6f46 auth: fix Makefile
-caeef31 auth: link AuthServiceHandler to mon only
-dbde927 auth: kill useless AuthServiceManager; rename file to AuthServiceHandler
-b7263ca qa: add dbench
-fa77429 auth: add osd caps parser
-0b26194 osd: assert apply_transaction success
-2109a91 auth: get rid of AuthorizeServer
-1b4db2f todos
-dac3a8c (tag: v0.17) v0.17
-413340e auth: fix vstart.sh
-74be02f debian: don't try to sign packages; it fails anyway
-2d0a8b2 auth: send caps to principals with the ticket
-6668669 mon: log each client mount
-e555cd3 Revert "msgr: be a bit more verbose during shutdown"
-3b6ed5e osd: mix preferred osd into placement seed
-c73c666 objecter: call renew_subs when appropriate
-a083596 osd: call renew_subs when appropriate
-5d672b1 vstart: build osdmap of correct size
-6e43fa2 osd: fix pgid parsing
-b2a81e9 monc: cleanup stray sub_want()
-8f51c8c mon: semireliable message push from mon to mon clients
-0a83ec8 qa: add pjd test; change default monhost to cosd0
-a5eb175 mon: fix use-after-free in session removal
-c0c6600 monclient: always subscribe to monmap
-13287e4 mon: fix up some uninitialized memory
-bbba6be monclient: show when hunting
-87b99f4 Hadoop: Move CephIOStream native methods into CephFS/CephTalker
-a6f2a3a Hadoop: Move debug output into CephFS, preparing for CephIOStreams
-e0e2c4d libhadoop: Convert CephFSInterface to match the proper Java classes.
-c1cede1 Hadoop: Newly-generated JNI header files
-f958d57 Hadoop: Now wraps all ceph calls in a CephFS ABC with a CephTalker implementing
-9e08f0e Hadoop: Now also uses their logging framework
-9bec695 Hadoop: getFileBlockSize has an unclear contract, but it's followed better now
-e114fc9 Hadoop: clean out unused functions.
-5277aac Hadoop: Better documentation between Ceph[Input Output]Stream and libhadoop
-8d00264 Hadoop: Better document interface between CephFileSystem and libhadoopcephfs
-289028a libhadoop: Remove some silly asserts and fix a minor memory leak.
-bb6e112 Hadoop: Remove unnecessary imports.
-67e5d49 Hadoop: Remove some unused data members/methods.
-3228ab6 hadoop: Moving back to older use of debug.
-2cc3cc1 Hadoop: Fix tabs to be 2 spaces.
-340c90e mon: Remove bad FIX_ME comment
-0f4d70d uclient: Return an error if you open a non-dir via opendir
-3f182b8 monclient: start with hunting=true
-78e3bdd osd: send boot message if we get marked down
-794e2a3 Makefile: 'core' rule to do just the core daemons, tools
-16ef647 sample: rename sample ceph.conf
-7da385d mon: show election quorum info on 'mon stat'
-2219956 mon: defined struct for MMonSubscribeAck
-cd2b37b todo
-600e550 mds: fix stupid float conversion warnings
-f23530f auth: fix connect response
-bdc218e wireshark: update with latest version, some other fixes
-15fc0c3 mon: make 'mon add ...' work
-46e32b0 auth: enable mds again
-74a8f0c auth: mon does not deny connection without auth data
-aa819ff mon: use master key for inter-mon auth
-3ce86d0 mon: clean up 'mon ...' command processing, add 'mon getmap'
-46d0f9a mon: set initial timeout on sessions; clean up a bit
-6b6a674 mon: fix warning
-a069318 mon: PaxosServices needs virtual destructor
-064d00c mon: small cleanup
-e7315e4 debian: bail out on error during package build
-235ef86 Makefile: include client/ioctl.h in tarball
-d7f9d19 msgr: kill dead code
-a0fa5b0 uclient: pipe down about connects
-39d12a9 msgr: add version field to msg header
-b3d09e0 osd: use ms_handle_connect to resend mon messages
-bd81038 monclient: ignore resets on non-current mon
-df0c52a mon: use connection hook to resend mon requests
-7e5d162 msgr: add ms_handle_connect callback
-d8f771e msgr: drop extra arg
-7cc97f3 msgr: change ms_handle_[peer_]reset prototype
-a90e63c msgr: put peer type, addr in Connection
-83a25c7 todo
-5d33a74 msgr: simple exponential backoff, with tunable initial and max delay
-329f5c6 msgr: simplify policy
-78dcc39 msgr: kill unused ms_handle_failure
-7d1e3b9 mon: MonmapMonitor now sends responses to commands and doesn't double-add monitor addresses.
-508e047 mon: use send_reply for pool ops; fix msg leak
-e71255b mon: share new osd maps with 'random' osds
-4c1cc01 mon: send osd map if MPGStats sender has an old map
-33cbbd9 mon: clean out old crufty cluster shutdown code
-c9e053a mon: send MOSDPGCreate from all mons, not just leader
-dda3426 mon: oops, make PaxosServiceMessage match ceph_mon_request_header
-8c6896f mon: kill some dead code
-53efdb9 mon: use send_reply for MPoolOpReply
-afa1578 LogClient: Add a mon data member and mon selection code.
-d3ebec3 MonMap: Remove pick_mon() and last_mon data member -- doesn't belong here
-008031a monmap: add a utime_t created data member
-3ebd645 uclient: Accept -1 in set_default_preferred_pg to go back to non-local writes
-e2e8047 mon/msg: Remove MMonAdd; switch MonmapMonitor to use MMonCommand
-6ddbe14 mon: Replace old question comment with explanation comment
-58111a6 mon: Remember to delete the Message when done
-aa3ab0b ceph: follow monmap changes in -w mode
-0d9bd68 monmaptool: use generic MonMap::print methods
-97b76ff mon: store latest monmap is paxos-compatible format
-72f68c9 mon: don't trim cluster sessions
-b67b1d9 mon: route osdmaps sent by mon properly
-d1c51b2 mon: kill unused MOSDGetMap
-78759f9 osd: stop using MOSDGetMap
-89d4d12 mon: kill MMDSGetMap, clean up MDSMonitor map sending code
-aa72a52 mon: kill more dead code
-ca633c6 monc: clean up mon pick code slightly
-e6f8229 mon: kill dead faking, bcast code
-6d66b43 all: change disk format numbers
-3f95cef mon: Remove invalid assert; fix mon_type constants.
-ed70b5a mdsmap: add a last_changed utime_t data member.
-535072b mon: Add MonmapMonitor to whole system
-4651dc1 mon: Add MonmapMonitor source.
-e8dd447 PaxosService: Add some function documentation.
-1053856 message: Add a new MMonAdd message type
-b3dfe6e Hadoop: Set preferred_pg after client mounts
-7e08ea8 uclient: Debugging output
-02af096 mon: use reply_request in pgmon pg stats update
-56f0814 push_to_kclient: no -u to cp, the timestamps may be ordered
-abd6254 mon: new, improved monitor request/reply routing
-c3916c7 mon: create session for all incoming monitor messages
-cd8eb72 todo
-31ab233 byteorder: more typos
-1d95c8f qa: start new qa dir, add some client tests
-119a73e comm: monitor dispatch should check for closed connection
-419e1b7 byteorder: braces!
-a5a7c55 osd: check is_dup earlier; do not set osdop version if it's a noop
-8d146b5 auth: monitors authenticate themselves on outgoing connections
-4eebe54 osd: use sized int32 in osdmap incremental new_pg_temp
-4f4a231 msgr: reset session state on lossy_tx fault
-a04ec62 byteorder: include endian.h for good measure
-5bb047c Revert "byteorder: properly detect endianness"
-a33441c byteorder: properly detect endianness
-5a0c6fa osd: fix up handling of dup PG::Info
-208dc55 mon: fix session close races
-fa4e2a0 objecter: don't send duplicate onetime sub requests
-ddb359e osd: don't manually set rank addr
-94f9905 msgr: include port when printing sockaddrs!
-008216b libceph: move to main dir with other main .cc files
-de211f3 monc: no msgr bind needed
-0a34d60 libceph: no bind
-416cd96 osd: use fast_fail() policy to connect to osd
-71d5bcf msgr: do not require bind() on client apps
-aeacbe7 msgr: clean out dead connect-side bind code
-0059482 mds: validate file layouts on file creation, setlayout
-1817888 ceph: add ceph_file_layout_is_valid function, minimum stripe unit
-081cf36 filestore: be less excited about btrfs version
-e53fbdf mon: take lock in ms_handle_reset before adjusting session map
-74cbc3e msgr: no need for sockaddr_storage encoder
-4c6f0e9 messenger: do not bind socket before connecting
-d3973ae auth: few session creation error cases handling
-ab1bc91 messenger: do not bind socket before connecting
-1f22d70 version: git rev-parse, not git-rev-parse
-27281f9 auth: fix several issues with system init
-904d903 mon: fix missing lock, avoid trimmin sessions with empty s->until
-3bf149d utime_t: add is_zero()
-1c7e251 mon: allow {getmap,getcurhsmap} <epoch>
-0a8dd93 crushtool: show zero weight items in crush map decode/dump
-5628240 crush: zero weight items get 0 length straws
-8176472 crush: silence (bogus) item uninit warning
-ebca3de push_to_kclient: fix dest tree check
-529f5b8 msgr: fix operator<< for sockaddr_in, too
-bde055a msgr: uninline tcp_{read,write}
-935d41f msgr: fix uninitialized memory on sockaddr_storage print
-8438eea auth: authorize on the connect message
-8e55d56 todo
-b859b38 crush: reject on empty bucket (and avoid divide by zero)
-ab29d04 Makefile: drop src/kernel/* from Makefile.am
-74ea51b uclient: pull ioctl.h from kernel tree to out tree
-0d7d2e1 uclient: fail gracefully if the mount fails
-e6bfbec script to push shared files to kclient repo
-c9b5eb7 debian: don't build ceph-kclient-source
-538e10e kclient: moving to linux-ceph-client.git
-ed08416 move tests around
-1d4bc1c conf: also skip utf8 encoded characters that are not printable in current locale
-4c32af6 Hadoop: Add the patch and a Readme file.
-335cd8f debian: upload tarball before .deb build
-ae5bf1b debian: name unstable package version ${vers}git${stamp}
-53ca2a8 (tag: v0.16.1) v0.16.1
-1e51d19 rgw: fix build errors on i386
-14ad6cd Makefile: include buffer.c in tarball, kclient package
-bfc18d2 rgw: encode time_t, size_t using fixed-size types
-a7c0f56 test_ioctls: add missing open arg
-bc9b863 kclient: include fs/{Kconfig,Makefile} in patchset
-90fee8b mds: Don't perform proper rebalancing if set to thrash
-6f7043b mds: rename do_rebalance to prep_rebalance
-165a729 uclient: Only connect to offload targets if the mds goes down.
-3a3ccd8 kclient: checkpatch cleanups
-522f570 mds: fix default layout settings
-38dbaa5 (tag: v0.16) v0.16
-e678fbc msgr: authorizer get/verify callbacks
-faa5fb5 msgr: get_authorizer hook?
-56f45b4 objecter: Session type
-8b04f9a auth: authorizer for osd
-439ee9e uclient: fix null deref in unlink() on null dn
-854d664 todo
-5faa851 mon: fix offload_targets
-5a9d225 uclient: Put some guards up around the Inode->cap map accesses
-12aa62f msg: handle MMDSLoadTargets
-88c81a9 mon: Handle MMDSLoadTarget messages
-42ab72b mds/message: MMDSLoadTargets should use a set<int32_t> not a map
-7391e22 mds: Pull my_target checking out into a function targets_safe
-3e36d32 mds: Don't do rebalancing until the target mds' are in the MDSMap. This will break rebalancing until the monitor code to add targets is in place.
-74c1f84 messages: Add a completely useless and unused MMDSOffloadComplete message.
-f250cf2 mon: Put in placeholder code to handle MDS target messages
-fd5623f mds: Break apart rebalance function into prepwork and offload
-2f36c62 messages: Add an MMDSLoadTargets message for mds->monitor info.
-09f060b Message: add constants for MDS offload messages, and clean up the alignment
-0748dd6 Check for invalid layout input in uclient and MDS, replace with sane if needed
-3a3c099 libceph: Actually implement ceph_get_local_osd so that libhadoop works!
-8a11a56 auth: separate authenticate and authorize messages and handling
-e043a46 kclient: add missing include for in[46]_pton
-0ddaad3 msgr: use getnameinfo to format socket addresses
-dd732cb use sockaddr_storage; and some ipv6 support groundwork
-17ac2ce auth: cleanup
-88bf9ef auth: fix authorize
-18b3bfc kclient: don't choke on missing snaprealm
-dabc0dc auth: pass secret_id for rotating secret, use it, some other fixes
-4d20619 kclient: no system.* xattrs, yet
-9f0e5b0 kclient: kill generic_*xattr calls until we implement xattr_handler
-3c7c817 kclient: clean up module startup
-7dffced kclient: fix ra_pages setup after bdi initiation
-c8fa11d kclient: single thread wq for invalidate, truncate
-76cdbb5 kclient: use KMEM_CACHE macro where possible
-3c228f0 kclient: mark initialization functions __init
-960d385 auth: fix system init
-864aac0 kclient: fix maintainers record
-8c62f05 kclient: backport sync_page_range change
-5b41c13 todo
-6a57711 kclient: add to MAINTAINERS
-34439e7 kclient: sync_page_range gone in 2.6.32; use vfs_fsync_range
-a3dc335 kclient: current_is_pdflush() gone in 2.6.32
-6350e84 todo
-d67381f Revert "kclient: add smp_mb to sensitive bitops in msgr"
-4ea86ba kclient: use smp_mb in place of spinlock for testing flag bit
-fe11285 kclient: add smp_mb to sensitive bitops in msgr
-c30d453 uclient: set new file layout to 0, which lets mds choose its default
-ca96595 auth: try to authorize with mon after authenticating
-860dca7 uclient: Use much saner/not insane defaults for layout settings
-e3e9116 auth: librados requests for osd and mon keys
-97ef084 auth: don't wait if already authenticated, fix unitest
-bce85f1 kclient: debugfs fix; better osdmap debug output
-adb48e2 kclient: default pg_preferred to -1
-37f42d6 auth: mds gets rotating secrets
-95c4710 mds: fix layout typo
-15d45e7 kclient: include new files in patch set
-cc9915a osd: name args in ceph_osd_op union
-21df30f document data structs; kill ttl_ms in caps msg
-25bba5d mds: kill old rdcaps_ttl business
-fa884ec fix object_stripe_unit -> stripe_unit
-272d462 auth: init mds keys on startup
-4874b19 kclient: try kmalloc, then vmalloc
-86f225b kclient: audit inline
-59fc0e2 kclient: more fixes from akpm's review
-c064c44 uninline some header types
-69322e7 auth: fix osd init sequence
-8dbf358 kclient: parse updated mdsmap
-6b68faa mdsmap: another unsized int
-bc91919 mdsmap: use sized int type
-4dbb6fd todo
-dc6d0d9 kclient: reorder cap ops a bit (wrt invalidation)
-4b2e65e urandom: fix fd leak
-2c9ad41 auth: authenticate in the x-env protocol
-52f038e Hadoop: Set the local osd to be the preferred osd for all writes.
-ecc4bd6 uclient: Add methods for setting a default preferred osd.
-58fb071 mds/ceph_fs: Add a preferred argument to ceph_mds_request_args and listen to it
-6ed33d5 mon: create lpg_num (not pg_num) lpg's
-462dd4f cosd: 3 monitors
-1010c20 uclient: open mds sessions to export targets
-ce87f0f mds: add export targest to mds_info_t
-4fa1ba7 osd: rev disk format
-a858ffa mon: create localized pgs
-6af69e0 filestore: make collection dir have better name; move coll_t type around
-3c315e3 objecter: send renew sub from maybe_request_map()
-6e76160 osd: make pg_pool_t print clearer
-b1b612f uclient: Return EFBIG rather than EBADF on too-large file sizes.
-78648b2 kclient: bug on bad msg in msgr
-56affd7 filestore: use btrfs TRANS_RESV_START ioctl if present
-db66e19 osd: make shutdown msg higher priority
-4fe2e6a msgr: be a bit more verbose during shutdown
-10e4b6e uclient: get_local_osd() to find an osd with the given ip
-7755f3c kclient: fix generic xattr calls
-281acde kclient: user.ceph.layout readonly for now
-22c146f osdmaptool: more usage
-a8ba448 config: allow object replication from 1-10 (instead of 2-3)
-272128f kclient: check xattr readonly flag on setxattr, removexattr
-412eefb kclient: add helper to set allowed xattr prefixes
-4ac459b kclient: distinguish file vs dir xattrs; move the getvxattr_cb under i_lock
-095a16a auth: fix monclient deadlock
-286f018 auth: fix keys loading via ceph tool
-0bdf90d auth: common_init should not always init keys
-f9689a2 kclient: do not recurse into truncate|invalidate pages
-467926f uclient: Pass in the right variables to update_inode_file_bits!
-4b819b9 uclient: Rework update_inode_file_bits to mimic kclient; better debugging
-c7e248b uclient: Pass uid/gid from ll_create to _mknod Add some debugging outputs
-e23dd8a uclient/filepath: Update filepath's empty() function and switch make_request_from_Meta to use that
-ad3a7be fuse: have FUSE enforce permissions
-797d50f uclient: Update ctime one setattr changes
-11b5cb3 uclient/objecter: Add max_file_size checks and an accessor for max_file_size
-aadeccd uclient: make_request_from_Meta will now create the path if none is given
-b12ef82 uclient: Add cap dropping to setattr.
-e7697b9 auth: use key in keyring getting session key and ticket
-b195ce0 auth: fix decode_decrypt
-ea56e80 mds: update mtime on truncation!
-ce5c138 auth: don't run over g_conf options when setting them
-e554ea0 auth: use global keyring, entity name
-9acb199 conf: don't run over g_conf options when setting them
-5e9707e auth: cleanup get session key
-e92662b auth: generate meaningful service ticket
-88bd97d auth: rename authenticator -> authorizer
-238c984 auth: move hexdump into a header
-1342eac auth: monitor reads initial auth state
-6d39107 auth: encode/decode functions use magic
-8848973 configure: kill more commas
-2f50017 configure: no commas?
-1d9f161 configure: whitespace
-dfa34db configure: fix libexpat1, libfcgi checks (again)
-6e13ad2 auth: protocol fixes, keys tool changes, keys init
-1a696b6 mds: make the directory commit priority be low(er than journal)
-168edb8 objecter: optionally set priority on ObjectOperations
-7ca3fd0 mds: do not attach mdr to NULL session
-d0c4c30 auth: set up entity name on startup
-291916d auth: get rid of stab keys handler
-1c5084c auth: reuse authorize request handling for service tickets requests
-a2ae9e7 auth: start integrate keys_server with authentication
-d5b79be auth: move keys_server to the monitor
-0d2a3f1 auth: move session_key to the AuthHandler
-bc691a9 mon: put auth_handler in mon Session
-3312f34 auth: small cleanup
-a5322e2 mon: route all auth traffic through authmon
-eadb9ec auth: fill out server side authenticate steps
-c9ee839 auth: build an almost real mon ticket
-b04667e osd: session skeleton
-6f79fb2 auth: break out authenticate request
-315da40 auth: add missing file
-6c8d6a5 todo
-fcdfaa2 mds: warn on dup inodes; don't crash
-6609779 auth: monclient creates session asynchronously
-8d71c47 objecter: remove dead code
-e5f7a89 librados: pass resets to objecter, with proper locking
-56067bd mds: pass resets to objecter, with proper locking
-92e6c42 uclient: pass reset events to objecter, with proper locking
-0c92b63 objecter: resend mon ops on handle mon connection reset
-a963e51 mds: fix inode load existence check
-d9f94b2 todo
-2f1e6a9 uclient: don't readdir first frag on opendir
-a9eb97f objecter: fix uninitialized variable last_seen_version
-cb1b7e7 librados: fix dispatch
-aaa6e40 auth: fix deadlock
-8ee96d8 auth: monclient deciphers rotating key
-6b9f780 uclient: Better fix for insert_dentry_inode to work with pre-built Dentrys.
-a905078 uclient: get_or_create should return out-of-date lease Dentrys too
-c57f0d0 uclient: encode_cap_releases shouldn't update caps if inode isn't in the cache
-e46c720 uclient: First attempt at preemptive cache dropping in the functions.
-df48cad uclient: Don't *always* set_dentry_wanted() on MClientRequests.
-99c58ba uclient: Only make the MClientRequest in send_request itself. Add a few more functions to MetaRequest so we can use those in choose_mds.
-5fd3cf0 uclient: More debugging. May want to back off the inode printout to not include caps_issued.
-425dcc1 uclient: changed link and insert_dentry_inode to behave with pre-built dentrys
-f3c78be uclient: Attempt preemptive cap dropping on mknod.
-3ea4fbf uclient: dout statements in new functions.
-4acdb05 uclient: Fixes for get_or_create
-f8c0285 uclient: Functions to create Dentrys prior to gettin caps from mds.
-2a4a364 auth: typo
-ac934bf auth: load master key on startup
-eed8bc0 remove extra whitespace
-8b4c05d kclient: fix bit test logic
-73cfce7 kclient: use pr_fmt to prefix module name
-f255bbc auth: osd loads rotating keys on startup
-949f1bf kclient: prefix frag_ functions with ceph_
-c6faf6a kclient: kill out_qlen
-1744628 make inline string functions non-inline
-c2b4dc3 kclient: whitespace
-ab3c421 (tag: v0.15) v0.15
-c6e5d6e Makefile: include ioctl-number.patch
-1f1ec71 msgr: don't print source in msg debug output
-13e6f34 todo
-48866c2 monclient: change pick_new_mon -> reopen_session
-88fd161 monclient: avoid dup subscribe messages
-d8c8da8 osd: subscribe to monmap
-cf3192d todo
-0a338c1 kclient: fix le encoding bugs (yay sparse)
-f5b46bf kclient: clean whitespace
-ee04c56 kclient: include object name in DATALOC ioctl result
-41a169d auth: fix merge
-4963bbd auth: fix deadlock
-1af7303 kclient: include ioctl-number doc file in patch set
-c0c3444 kclient: no need for static ceph_buffer
-bf4cf7d auth: entity can request rotating keys (in progress)
-0f22324 mds: fix mds standby map handling
-84c1a14 mon: consolidate sub request msgs; cleaner api
-98e6da6 mon: allow sub for monmap
-c2c9ecd mon: fix up subscribe infrastructure to use msgr connection for sessions
-f65d127 msgr: pass Connection* to msgr error handlers
-35dc047 mon: fix client id preallocation
-9a45979 monclient: send a single mount request
-316f716 uclient: use ref in constructor for MClientRequest
-1a8d910 auth: more than 1 rotating key per service, key id
-2c54f8a authmon: distribute rotating keys
-5dfe8fa kclient: two msgpool modes: blocking (ala mempool_t) and !blocking (strict)
-84aec7d kclient: fix symlink kmalloc under spinlock
-71b2ee0 strerror -> strerror_r
-6f00f11 kclient: rename msgpool type
-c517d7f kclient: use msgpools for osd requests, replies
-ebc6e6c uclient: fix null pointer ref
-6194849 kclient: fix up ceph_client init error handling
-f0f10d6 kclient: fix patchset comment
-d0efb5a kclient: fall back to WARN + new allocation if msgpool is depleted
-3be2b62 kclient: use msgpools for other monc messages
-d1ec687 kclient: add back msgpools
-dbfb0f0 kclient: add GET_DATALOC ioctl to get object location, osd addr
-35c2966 auth: authmon incremenetal can hold rotating key
-e60417c auth: keep keys in single data structure
-7d9b858 auth: some authmon fixes
-3fa407e uclient: _removexattr should be naming the xattr to remove!
-9843d1f uclient: Add functions/data members for preemptive cap dropping.
-271de28 MClientRequest: Releases should have a constructor
-3702230 uclient: First pass at encode_cap_release function; not used.
-3393d55 uclient: Move the MetaRequest to MClientRequest into its own code, and cut out the payload encode/decode since MClientRequests are now made from MetaRequests.
-33c50ad uclient: The basic passing mechanism is now a MetaRequest. It seems to work.
-04f4911 uclient: Make the uclient work properly with the new MetaRequest structure.
-ae16b1c uclient: MetaRequests are going to be how we pass requests around; repurpose them so they don't require an MClientRequest.
-fabaeb9 Hadoop: Minor fixes and style changes to satisfy Hadoop's FindBugs system. Remove a few deprecated methods.
-5f78fc9 auth: add authmon handling
-24c84ab kclient: fix osd request kicking
-b2c7655 mon: fix bug with client id assignment of -1
-28b2df3 kclient: avoid no-op dir cap release when no dentry lease
-1d8a91e kclient: make mds console msgs consistent
-b780d54 monc: pick monitor before sending initial mount
-7e17e27 uclient: implement basic I_COMPLETE support
-b53f9a4 uclient: factor out command cap issue checks
-9e3f6fd mds: minor comments
-310af17 kclient: move some inode update code inside i_lock
-ee0f158 kclient: use shared_gen, not cache_gen, for I_COMPLETE tracking
-0f892e3 todo
-84322a7 auth: define header in makefile
-364b2a2 auth: add missing header file
-e9f480d monclient: small cleanup
-c7b904e todo
-81bb175 kclient: fix console msg
-131fa21 kclient: move caps stats into client debugfs dir; fix error checking
-2cc5826 kclient: put fsid in debugfs dir name
-f11918b mds: make parallel_fetch work with hard/remote links
-69f13a2 cosd.conf: fix date stamp
-50f3ee4 msgr: fix null deref setting message connection ref
-8719866 auth: rotate rotating keys every time interval
-8194e9f auth: add missing lock
-71c1f4f configure: don't link expat, fcgi to everything
-3d63b7c Makefile: fix mode on installed headers
-5ba03ef auth: authorize
-decde38 msgr: change dispatcher interfaces; some monclient cleanups
-9bd52e7 auth: new improved mechanism works now
-cca45f3 uclient: do not do locking for 'atomic' writes
-86bf798 auth: move code around, making some order
-f82e57c auth: comprehensive overhaul (not working yet)
-147f25a mds: flush log in caller(s), not scatter_writebehind
-ac49ccc check_mds_request_latency: fix parsing for current debug output
-a57a8eb auth: authorize response handling
-54aa0b2 auth: interface adjustments
-af1c653 Hadoop: Final submission prep. IO classes should be public, updated Javadoc, and added license grants.
-746bb5e Hadoop: Remove old reference CephFileSystem material.
-c76574b Hadoop: Change to work with trunk rather than .20; update documentation.
-784bcc2 Hadoop: Remove unused CephException class.
-244692b Hadoop: Changed debug printing so it doesn't construct useless strings. Removed some commented-out code.
-9c9404d auth: authorize stuff
-c2b9664 uclient: fix warning
-e5b1d5b kclient: set/verify seq in renew caps messages
-70ca9c9 uclient: fix cap renewal
-61d52a5 mds: include original seq in renew caps reply
-83c5d10 synclient: fix bad leading / on play ~ prefix
-52a99fa armor: make armor encoding match libssl's base64
-4fddaad debian: fix radosgw package
-10096bc msgr: be slightly smarter about corking on partial msgs, acks
-b40b64d msgr: make ack le64 to match seq
-d205109 kclient: fix format strings for entity num
-933320f logger: fix avg calculation
-cc9de15 auth: refactor interface with monclient
-0888b5f mds: log latency of _first_ (unsafe) reply, not safe
-40f83e8 uclient: and reply cond guard; make forward _always_ resend request
-335ea1d debian: create radosgw package
-3b0a6c9 configure: fix radosgw conditional compilation
-6b9d6de kclient: sparse endian fixes, fsid cleanup
-122c612 kclient: fix checkpatch label warnings
-c7987d7 kclient: avoid short reconnect loop on connection close
-235914c msgr: kill per-msg protocol version values
-1917c2e msgr: check protocol version during connection
-5f3b046 kclient: allow sent msgs to be revoked from a connection
-c0cc24c auth: remove redundant delete
-d2deea8 auth: multiple tickets handling
-806f73b auth: refactor MonClient <-> AuthClientHandler interface
-78b005b crush: fix long line
-86addcf kclient: whitespace
-df985c4 mds: avoid client lookup by using per-connection msgr state
-7026e35 msgr: per connection state
-70a098b kclient: kill ceph_fsid_t typedef
-c2b6534 kclient: checkpatch cleanups
-035b08f kclient: update Documentation/ioctl/ioctl-number.txt
-69f84d1 todo
-1ec1e8d (tag: v0.14) v0.14
-b985882 kclient: remove msgpools for now
-3046334 init-ceph: fix pre/post commands
-deec333 auth: stop auth sequence after getting the tickets
-cffa5b8 kclient: msgr init cleanup
-add1582 kclient: clean up keepalive send logic
-fe8765e kclient: msgr zero in ceph_con_init
-2f65caf kclient: kill msgr WAIT
-900215b todo
-0767154 uclient: debug file_max
-5dded5a cfuse: disable -d (fuse debug) by default
-cc24585 mds: bump file_max to powers of two
-f2e3692 auth: fix session key, encode_encrypt using templates
-0bbc474 auth: cleanup
-7f3573b auth: redo authenticate request/response
-4ea8d97 Hadoop: Refactor open to open optimistically and then check for errors on the return code and cached data. Also fix a bad return in CephFSInterface from the last commit.
-1026691 Hadoop: Some changes in order to reduce the number of messages sent on non-existent files
-4347f4a Hadoop: Return a couple of unecessary isX calls.
-b510ad5 Hadoop: Fix an apparent bug and remove an unnecessary conditional. (the cwd can't be set to "".) Also replace references to "/" with root.
-11f5197 uclient: Add better in/out dout messages to a few functions.
-5673148 auth: fix decoding
-9e95265 auth: consolidate messages, rename
-81a2efa auth: rewrite second authentication stage
-d0cde49 auth: rewrite messages encoding/decoding stuff
-c460921 auth: some more fixes
-b95c290 Makefile: do not install init.d script at all; let packages do that
-31946b1 Revert "monc: hunt for new monitor on failure; cleanup interface"
-7a6f114 mds: only move ScatterLock to MIX if WR is wanted
-b92f5cb uclient: debug open()
-43bcf1b uclient: add 'dropcache' synclient op
-3cd5d73 uclient: use objectcacher->is_cached to make readahead smarter
-359f258 objectcacher: add is_cached method
-5c664ae uclient: Fix in the readahead logic
-6f11678 Hadoop: Sets default block sizes according to a config property; defaults to 64MB
-3f78e66 monc: hunt for new monitor on failure; cleanup interface
-252aaec monc: clean up mount code (not everyone is a client!)
-b357486 mon: remove obsolete osdmap bcast
-d05c729 mon: remove obsolete mds map bcast
-c6ddbdb monc: explicit init(); subscribe to mdsmap on mds
-8b680a3 auth: some more compilation fixes
-8a215c8 Makefile: do not install init.d script at all; let packages do that
-6137988 auth: some compilation fixes
-72ccd20 monc: hunt for new monitor on failure; cleanup interface
-52be66c msgr: small cleanup; hexdump code (disabled)
-217533c msgr: small fault logic fix
-ca7af73 Makefile: add missing MRoute.h
-421e7ab mon: fast assignment of client ids
-4462bc5 uclient: fix warning
-8e202cc mon: use client_t
-df45d25 wireshark: update patch to latest wireshark svn snapshot
-cbd2ac5 wireshark: keep plugin code outside of the patch
-43426dd uclient: tweak readahead logic
-6f7bbdf kclient: embed ceph_connection in ceph_osd
-642408f kclient: send subscribe along with mount request
-f456a01 mon: no need to send osdmap until client asks
-18d9eb5 kclient: use single ceph_connection over lifetime on monc
-81e0bd6 kclient: msgr fixes to use proper connect_seq, avoid unnecessary faults
-3309f98 kclient: simplify con_open/close interface a bit
-f8b8069 kclient: fix unzeroed pages after readpage
-1073c04 kclient: take inode ref on first WRBUFFER cap ref in set_page_dirty
-7043dec kclient: fix bug in ESTALE handling in mdsc
-dc73123 mon: oops, some client_t fixes in ClientMonitor
-8ab87b2 auth: adding missing file
-1b583a7 rev disk format
-5bc0dea msgr todos
-a7fbab9 mds: use 0 for layout defaults, not -1
-85aa242 msgr: fix entity_inst_t comparators
-db49435 kclient: learn address during connect handshake
-218e4ed msgr: detect rank addr during connect handshake; clean up addr apis
-4330037 msgr: include my addr AND socket addr during connect handshake
-398d221 libceph: return 0, extern "C"
-3b92ee7 uclient/libceph: Framework for letting users specify file striping and object sizes is in place.
-0e812e6 mds: Handle the client requesting special stripe units, counts and object sizes.
-65f2d4a libceph: add ceph_version()
-a1d5533 debian: add lib{ceph,rados,crush}-dev packages
-1c1addc ceph: include version in ceph_fs.h
-5608be0 debian: fix lib* packages
-3e67dd8 kclient: whoami is __s64
-8d64e4d uclient: use client_t for client id
-a2c869c mds: use client_t throughout
-27f6aa3 msgr: 64bit entity name num
-7bb5895 kclient: fix osd request kicking
-a790820 Makefile: force init.d script into /etc/init.d (not sysconfdir)
-d415a80 man: fix mkcephfs man page
-1e4c2a7 auth: handle keys request, cleanup
-f445219 uclient: implement CREATE operation
-4ce2692 kclient: kill msgr->parent, dead msg pool code, prepare_pages arg
-5901023 kclient: osd restart fixes
-b7a9da1 kclient: set prepare_pages for osd client (der)
-738da1e kclient: fix request kicking crash
-79b2740 kclient: cleanup old FIXME comments
-ba2acd5 kclient: improve osd error handling
-1ca9177 kclient: reuse osd struct when possible
-88c788f kclient: make mon hunt explicit; note in kern.log
-63aebff mon: actually send updates to subscribers :)
-cdc4570 kclient: avoid get_random_int(), it's new
-ad0c753 kclient: pick new mon on _fault_, not peer reset
-6e0e406 kclient: fix osdmap requests, subscription timeouts
-eb5b6ad kclient: no need for r_fwd_session
-488cbb1 kclient: fix bad mds session put
-c31e926 kclient: don't leak ref when queuing fault work
-ee2175f kclient: use subscribe to get mdsmap, osdmap updates
-2e49846 msgr: print louder notice on bad banner; rev
-b2155c8 mon: subscribe duration in units of seconds, not ms
-1530e93 osd: remove ticket from MOSDOp
-9063663 uclient: fixing a backwards test in Client::put_cap_ref that resulted in bad Inode ref counting.
-d2e0186 Hypertable: fix ups on the readdir interface that now uses getdnames.
-cdeb19e vstart: be quiet
-c47c926 kclient: subscribe to mdsmap
-d863584 mon: clean up subscribe types a bits
-f7c1bec objecter: use one-time subscription request for osdmap
-0009d67 mon: do one-time subscriptions, too
-a0cc21d monc: resubscribe on monitor connection reset
-cdf683c monclient: fix subscription renewal
-0635d43 objecter: request full map on startup
-6f919f1 msgr: deliver resets to all dispatchers; make naming consistent
-44d519b mon: clean up send_reply interface
-269448a uclient: subscribe to mdsmap; strip out some signed_ticket cruft; fix mount
-dbc4f60 msgr: keepalive
-dbc00a6 mon: route replies
-eb92fb1 auth: follow auth with keys request
-afd038b mon: add subscribe function
-cfab067 uclient: Sage: Whoops. My wrapper doesn't actually call the function.
-af5154c Hadoop: getDefaultBlockSize() now actually looks it up instead of guessing.
-98dabb6 Hadoop: Insert accidentally removed throwaway first argument to ceph
-7b5670a msgr: oops
-4fab953 mon: simplify mount; remove MClientUnmount
-83d554c uclient: pin inodes on first cap ref to CAP_FILE_BUFFER
-bf304fa auth: client/auth tgt sequence, protocol implementation
-8e996d2 mon: don't delay mount/umount paxos commits
-b69e7d8 kclient: handle mds reconnect.. mostly..
-8e356bf kclient: make con_close, con_reopen work
-e8a2690 mon: treat osd, mds as peers, not clients (i.e. connect to them)
-c0c2143 msgr: server shouldn't initiate outgoing connections
-5b431b8 msgr: set default policy correctly
-52f55c7 mds: never forward messages for the client
-e5847ba kclient: avoid session lookup in mdsc
-3dd1c4d Hadoop: Allow a command-line like property, and change the parameter passing so that Java passes one string to the C++ code and that parses it.
-47e5530 libceph: Speed up for programs that try to mount ceph too often
-c53fcce msgr: remove 'dst' from ceph_msg_header
-094d3b6 msgr: remove 'dst' from ceph_msg_header
-ffcb564 kclient: close socket in work queue (and still on last ref.)
-79b1234 kclient: msgr cleanup
-66efd40 kclient: fail con->ops->get() if ref count is zero, and avoid requeueing work
-475dd60 kclient: handle osd resets, timeouts, etc.
-c8a6c3a kclient: remove connection tracking from msgr
-00f1d32 kclient: use a per-connection ops vector
-c9c6ec5 auth: monclient auth handling
-b24c4a2 kclient: use per-connectino peer_reset callback
-7dbfe0f kclient: use connection api for osdc (almost, no kick or timeout)
-6ead20b msgr: handle keepalive
-60a3ed0 kclient: use connection msgr api for mon client
-a9c9365 kclient: use connection msgr api for mds
-1afa62e auth: move things around
-238afe6 auth: rename first part of auth protocol
-811276f auth: client side protocol handler
-f2494d1 kclient: add explicit connection-based api
-d99fbb0 msgr: fix policy setting
-207880e kclient: factor out connection creation; add con_send, con_keepalive
-6bad246 kclient: periodically ping mds's
-e11a7e4 kclient: do not accept connections in messager (client only!)
-0cfc905 msgr: server flag to avoid connecting to peer
-8e76f20 mds: handle ping
-ef15a07 kclient: fix bad kfree on kmem_cache cap
-d34958c auth: mount is working again
-1e5e8d8 mds: update dir parent pointer on rename
-ecf93ab mds: factor inode parent pointer encoding out of CDir commit
-2c1a1f7 auth: add unmount to the generic MonClient code
-08997b5 auth: generalize mount-like ops in MonClient
-e0508c8 auth: rename ClientAuth to Auth, MonClient basic infrastructure
-2bdcc68 uclient: don't croak on flush_set_callback on nonexistant ino
-e433110 mds: propagate scatterlock data w/o changing lock state in scatter_nudge
-03411a1 mds: avoid propagating nestlock more frequently than mds_dirstat_min_interval
-9114e6f mds: kill SimpleLock::wait_shift
-a937275 auth: clarify protocol comments a bit
-c840ac9 todo
-9d1bee7 uclient: warn about stat_precise struct changes
-10e644a libceph: no need for frag_info_t
-5d9d1ef msgr: add ms_die_on_bad_msg option, make assert(0) conditional
-f6f1263 Hadoop: Style fixes.
-cc7b36c Hadoop: Move the . and .. elimination from Java to C++ for less copying.
-4a6d22d uclient: _getdents should *always* return the number of bytes written at end of dir, not just assume it's zero!
-8d1f4d5 Hadoop: Use the new ceph_getdnames instead of getdir Hypertable: fix a nasty not-closing-the-dir bug
-93552e4 libceph: Change the C++-only functions to be C-compatible. Hypertable: Change to use ceph_getdnames instead of getdir.
-af72edd Hadoop: Fix a nasty IO bug. CephInputStream.read() needs to return an int between 0 and 255, but bytes are signed and casting preserves that. Adjust if needed.
-e9b00e0 Hadoop: Clean up ceph_delete code as it's redundant.
-575158a Hadoop: Fixed time modification in getFileStatus. No wonder I hadn't noticed an issue with statting!
-c5dd75e Hadoop: Add package.html; fix a NULL instead of null error (Java)
-bc372c7 Hadoop: Put guards up to prevent a nasty bug in case of unspecified preferences, and the unlikely case that initialize is called twice.
-1d7726e upload tarball with 'stable' deb
-2b32297 (tag: v0.13) v0.13
-884ec32 auth: kernel side aes functions
-43dcbc2 todo
-88179a3 auth: rearrange types
-a74c1a9 mon: lose ClientTicket; simplify mon's client map [disk format change]
-350190c kclient: cleanup msgpool pr_err
-d349d57 kclient: update ctime on 'no-op' ->setattr(.., ATTR_CTIME)
-94b85ee kclient tests: fix dir names
-411dcbe uclient: small _getdents cleanup
-2279e43 uclient: let's do getdents() too, while we're at it
-3ccb164 crush: put temp arrays on the stack
-206eddb uclient: remove readdirplus, readdirlite cruft
-8daf25b uclient: add getdnames()
-873a160 kclient: better info in cap msg debug prints
-9397867 mds: debug show cap issued/pending/wanted or issued/wanted, depending
-b180b6c mds: clean out old revocation history on racing release
-f9ec9d4 mount.ceph: block same signals as /sbin/mount
-5822c6a mds: remove mdstable ino cruft; version all ondisk encoding
-d149c7e mds: do not save cap_push_seq on disk [disk format change]
-28afd69 kclient: make msgpools blocking or non-blocking
-7962554 auth: kernel side aes crypto functions (not tested)
-f155bd8 kclient: stop using msgpools for incoming msgs
-921260a kclient: be smarter about osd reply message refs
-a23e25f configure: check for expat for radosgw
-10940c2 Makefile: add missing MOSDPGTemp.h
-c55f2e9 mds: clean up loner set/drop logic
-0266f87 kclient: don't keep reply ref in osd_request; just parse out the result
-56e0ab7 auth: use common definition for crypto types
-6c43e5d auth: consolidate different secret types to one type
-d0b204a auth: pass const buffers to crypto encrypt/decrypt
-7f32084 kclient: add iozone, kernel tar+compile tests
-32a2b41 kclient: remove ancient crufty test code
-9bb9672 auth: fix compilation errors
-fbe53c2 auth: bits
-4a0298e auth: replace crypto_stupid with crypto_none
-951028f auth: fix aes encryption
-1f7b82d auth: don't use bufferptr
-4863bd5 kclient: add missing armor.c symlink
-f806044 kclient: use msgpool for client_caps
-8fc4666 auth: fixed aes, added test utility
-59a1eb9 auth: aes decrypt
-3cb690d kclient: add base64, crypt.[ch]
-0157567 auth: compiles, everything links with libcrypto
-2d4556f auth: work in progress
-065b1fd kclient: clean up msgr debug output a bit
-d142cf3 kclient: fix data skip arithmetic
-11376ca kclient: drop middle, data in ceph_msg_put
-414e47d auth: check key in the stab auth implementation
-93834d6 auth: refine layers on kernel client
-3c275a5 auth: auth stub implementation
-4c07d29 auth: client <-> mon auth skeleton
-a849be3 auth: auth scheme notes
-8d223df kclient: requeue cap if cap send fails
-6d8144c kclient: don't reuse message for revoke_ack
-a46441c mds: shut up cap sanity check
-81a8fe8 kclient: use reference counted ceph_buffer for xattr blob, msg middle
-b2bf914 fix client caps encoding
-85d893c uclient/hadoop: Implement lstat_precise.
-c398b0e uClient: Whoops, apparently I thought stat's atime was in millis, but it's in seconds.
-e87b7e7 msgr: handle 'middle' section of message
-a7756e3 Hadoop: What's with all these unused variables?
-bca0fba Hadoop: Javadoc and cleanup in CephInput/OutputStream.
-fea91de Hadoop: Javadoc and cleanup in CephInputStream.
-50d72f3 kclient: alloc 'middle' section of messages via callback
-3279ac8 kclient: fix up msgpool some
-7dca3af uclient: A Sage-given fix for something Sage broke.
-4d81290 msgr: add 'middle' section to msgs
-40aa353 kclient: use msgpools for some messages
-4a07672 Hadoop: cleanup compile bugs from previous cleanup work.
-8fff740 kclient: add msgpools
-4d0589f Hadoop: Remove an exists call by checking return codes on mkdirs
-59db5df Hadoop: Remove references to uid and gid.
-3b4c423 Hadoop: Remove unused getLength and supporting C stuff.
-c03b1f8 Hadoop: uses the new stat_precise.
-0caab94 uclient/libceph: setattr and _setattr now use a stat_precise struct that handles both seconds and microseconds. stat_precise has a stat_precise(struct stat) constructor. ll_setattr still uses struct stat.
-d66b0a8 testceph: Clarify use of endl so it's non-ambiguous when the includes change.
-abf2fc4 Hadoop: More Javadoc, indentation fixes, etc.
-20bd315 Hadoop: Convert bytes to kb in statfs
-ad46d47 Hadoop: Javadoc and consistency.
-dbfdcc1 Hadoop: Adds the getStatus method introduced by Hadoop .21; currently commented out since it doesn't compile in .20, but it's tested.
-cfd3d87 kclient: zero pages we did readahead on
-0f33aa4 kclient: zero page on ->readpage() ENOENT
-f972f0d kclient: fix bad up_read(snap_rwsem) on readpage failure in write_begin
-b362024 mount.ceph: key -> secret
-821d9ef kclient: kill unused unsafe_writeback option
-6809650 kclient: fix up snapdirname, secret mount options
-cd0fae2 mount: translate keyfile=file to key=thekey
-dc31490 todo
-9462ba5 mds: keep precalculated _issued instead of recalcing each time
-35bac67 mds: rewrite Capability issue/revoke tracking
-dae6eae kclient: set issue_seq in revoke ack
-5848391 todo
-0836ba2 uclient: clean up write path a bit; better max_size handling
-7ce833c kclient: check size on llseek(..., SEEK_END)
-4ddb70e uclient: check size on lseek(..., SEEK_END)
-762b56e uclient: remove dead code
-2c2ee44 todo
-f021e18 uclient: handle short sync reads vs eof
-772d49e osd: reorder snapc setup and ORDERSNAP check
-afc5da5 radosgw: remove unneeded INT_MAX
-8977453 radosgw: list objects in chunks
-85f89c5 kclient: zero tail of page in readpage, readpages after short read
-8f95ec3 kclient: check EOF on sync read to do short result when appropriate
-6a78671 configure: fix --with-radosgw
-2d47dcd mds: track caps we release in requests, and reissue on request cleanup if needed
-5d9eb39 mds: do not suppress cap msg if it is a revocation
-62868a8 Hadoop: Added some checks for not-a-file paths; changed what delete returns on not-a-file.
-51186d6 uClient: move last_flush_tid into Inodes, make kick_flushing_caps faster by overwriting tids.
-0d45c57 Makefile: include stop.sh in tarball
-a5b60b5 todo
-a4bfaa6 psim: ifdef out dead code
-ccf950e filestore: clean out old debug print
-f3ffaf4 uclient: avoid cap release delay on revoke
-25309a4 rev ondisk versions
-8631573 auth: add versioning to ClientTicket
-25df09b kclient: print osdmap pgid info
-23b81b9 kclient: refactor readpages, striping
-e55e5fa kclient: fix msgr incoming msg allocation stupid
-a3a61bc nstring: use correct hash function !!!!
-b48dfeb kclient: fix sync_read return value
-26f6a8e mds: fix multiclient RD+WR loner logic
-7861115 kclient: fix sync read, avoid unnecessary zeroing in readpages
-ad2dc34 osd: recover primary in version (not object) order
-e5df115 osd: avoid calling std::list.size() in PG print method
-014ae01 kclient: allocate mempool prior to sget()
-0be3669 uClient: Now pipelines cap flushes like the kclient. Analagous to the kclient changes in f7e60edead6d025d167715372dad601b499fb5a4. The kick_flushing_caps function does way too many comparisons, though.
-f07150e uClient: debug output for inode issues.
-6fd8636 Hadoop: CEPH_SETTATTR_ATIME -> CEPH_SETATTR_ATIME typo fix
-6901172 todo
-a5c1337 osd: wait for primary to build backlog when needed
-ad4d5f3 kclient: decode, map osdmap pg_temp
-a73ec38 kclient: specify incoming message allocation function
-e8ef23b kclient: use ceph_msg_new to allocate incoming msgs
-097b468 osd: der, prior_set may contain down osds
-6c215cd osd: fixed up some debug output
-ff41752 osd: fix osdmap decoding typo/crash for old versions
-296e8db mon: include pool op in MPoolOp msg print
-86e631d kclient: GFP_NOFS for vmalloc; vmalloc large incoming msgs too
-9ce83e4 osd: pg removal in a work queue
-f5828cc osd: ignore info racing with PGRemove
-6a51840 osd: rev protocols
-a8baf7b elector: off by one check
-963c3f0 osd: exclude lagging peers during backlog generation
-429f8f0 osd: use same_acting_since instead of same_primary_since in most cases
-fd1ca00 osd: track same_up_since, same_acting_since, same_primary_since
-9dcce33 osd: use pg_temp to limit acting set to nodes who don't need backlog
-a964888 rados: statically allocate time
-2e4e434 rados: change command line arg
-3ee2282 mon: handle MOSDPGTemp
-6785be9 osd: track both up and acting sets in PG, PG::Interval
-020350e osd: decode old maps
-12d53be osdmap: add pg_temp mapping
-08dc661 Hadoop: Added setTimes to CephFileSystem and CephFSInterface.
-7e44866 Hadoop: Cleanup for readability; removed warnings by typing a Vector.
-1719db2 Hadoop: CephFSInterface cleanup: better error catching on JNI function use; removed a few unused functions; now takes advantage of implicit typecasting for clearer code (no more manually creating j_ints and storing results to make a 1-line function into 3+ lines; no more if statements returning JNI_TRUE/FALSE); modified the getDir function as it wasn't very robust about checking for . and .. entries and the Java code does that; modified the Java code listPaths as it wasn't necess [...]
-f3db8c5 Hadoop: Added in initialization checks and limited use of Progressables.
-83c11b9 Hadoop: Changed back to isDirectory as that method was un-deprecated.
-700c276 Hadoop: Throws IOException -> return null; interface requirement. setReplicationRaw is an old method name, and it doesn't need to be overridden. getReplication was deprecated and no longer exists.
-788e5dd radosgw: static linkage
-d0f58ad radosgw: rename symbols, use generic name for rgw
-a7995b7 radosgw: rename files to use the generic name
-38daf9e todo
-c49fd9a debian: fix typo in build script
-e15c40a Hadoop: libhadoopcephfs now links against libceph rather than incorporating it; the Java code accounts for this and loads based on a configuration setting -- no more worries about java.library.path.
-360834b uClient: now cleans up open files on shutdown. Doesn't crash on a failed assert!
-b6862d6 Hadoop: Implements getFileBlockLocations; adds ceph_close to CephFileSystem.
-b639c21 uClient/libceph: initial implementation of get_file_stripe_address
-f42bb1d Hadoop: Makes use of newly-available replication reporting.
-9bc42b5 uClient/libceph: implement get_file_replication add it to libceph.
-90b0a6c uClient: Change file data function names for clarity; add function stubs for Hadoop use.
-290233e Hadoop: time conversion between Ceph and Hadoop; ditch filling in the uid/gid since it's meaningless.
-2387afb uClient: fill_stat now fills times properly
-f524150 (tag: v0.12) v0.12
-dad494c Makefile: add missing header to noinst_HEADERS
-1b89c16 Makefile: remove java hadoop _SOURCES dep
-6b4d8f9 osdmap: kill unused/useless get_num_osds()
-2a1f329 mds: show journal entry lengths in debug output
-1fd35e1 kclient: cleanup unused label
-f539036 kclient: revamp fsync
-f96501a mds: include mds # in table names
-660ca27 mds: wait for rejoin_gather_finish to complete before finishing
-f8501ab mds: set primary lock state to LOCK from strong replica when appropriate
-7032e8a Makefile: reorg
-80b9480 mds: fix lock state assert on sync->excl
-2eb7363 mds: set up root inode properly on replay
-72a1dc3 mds: fix reversed conditional on simplelock ->excl transition
-b3a1b78 Makefile: no fakefuse
-55e713b psim: calc stddev
-841bc5f osdmap: only use domains if ndom > 1
-55f4e00 crush: fix grammar so we can recompile what we decompiled
-2c49cc3 mds: start resolve with root as UNKNOWN (if it's not ours)
-f663a3f mds: fix typo (C_Locker_Eval crash)
-f0b0ce4 kclient: fix locking snafu in ESTALE handling
-128e9d2 kclient: choose mds based on dentry parent, if needed
-40f1ab8 mds: adjust mds state asserts to include clientreplay
-da7793a mds: twiddle missing locks on export
-0d5ef77 mds: open_root only after up:active
-84300ab mds: issue caps on non-auth inodes
-6976f2c kclient: use caps, fragtree only to choose mds (not hierarchy)
-849bae8 kclient: remove stray ; in dout macro
-df3be32 Hadoop: Replaced some unclean file references. Hey cool, it can do a map-reduce now!
-7490276 uClient: chmod now protects unchangeable bits.
-7e19b03 uClient: _rename doesn't remove nodes from cache. Sage says this is unnecessary.
-80912bb Hadoop: Added a setPermissions method.
-9f2bd9e Hadoop: CephFSInterface cleans up memory better on errors.
-c5b3436 Hadoop: Is much more careful with filepath sanitizing in BOTH directions. Also has a minor interface change allowing it to build in Hadoop .20
-249c1f1 uClient: Unmounting now waits on mds_requests.
-18c35b3 Hadoop: All configuration is now done through Hadoop's config mechanism.
-f0ce81d Hadoop: Now does a proper stat.
-11f17fc kclient: less noisy about mds session timeouts
-eb06eb6 msgr: avoid closing fd twice
-dbc3c61 todo
-b6d0806 kclient: debug peer_reset thing
-f7e60ed kclient: maintain per-cap-bit tid map to fix pipelined cap updates
-2c6606d kclient: maintain list of flushing snaps; reflush after reconnect
-21cb069 kclient: fix queue_cap_snap refs, calls in handle_snap
-0fffbfe Hadoop: Moved ceph debug level set into Java code; disabled CephIOStream debugs.
-c087ffc uClient: Whoops! Made Inode get/put dout at a lower importance.
-95fd09c Hadoop: Much cleanup of methods.
-ceb2d41 Hadoop: This method no longer exists in the FileSystem API.
-c2aa810 Hadoop: No good reason to overwrite these copy/move functions that I can see
-d3b7d17 Hadoop: Since Client is behaving, put back in the close.
-b89046a uclient: Fixes refcounting bug when you chdir to cwd.
-2ff4fbd Hadoop: More work with deprecated and inappropriately-overridden functions.
-16d68ce Hadoop: Removed deprecated functions
-546860e Hadoop: moveFromLocalFile uses copyFromLocalFile; is more robust.
-9785824 Hadoop: More debugging output changes.
-3be1ed3 Hadoop: getFileStatus behaves better with folders.
-4626bb9 uclient: removed cout debug statement
-a3f144e kclient: don't croak on mds request will NULL r_request
-81872b6 mds: process session msgs during clientreplay
-5f5ab2a mds: no need to take mds_lock in truncate callback
-02a226e mds: defer caps msgs until clientreplay or active
-be25f71 osd: adjust debug output
-df39e7b mds: tolerate a missing directory object
-96598f4 kclient: release unused caps, but keep some reserve
-b7178da kclient: nofail mode for osd writes
-dcdd7d0 kclient: use mempool for osd req in writeback paths
-72cf9fe Hadoop: Removed unnecessary reload of hadoopcephfs.
-5db5de7 Hadoop: More debugging statements, converted to use a method we can flag off.
-923bc9a libceph: add a check in ceph_deinitialize to prevent badness on multiple calls.
-3872642 uclient: getcwd fixes
-052b174 kclient: bug on back kmap
-769eedb osd: fail gracefully when problems reading /proc/loadavg
-31c7b5d auth: compat with old struct
-ae14d99 initscript: skip if auto start = no/false/0 and nothing or type specified
-2278e9c kclient: avoid overflow in mds reconnect msg size calc
-841f26f mon: allow osd down->out interval to be 0 (i.e., manual)
-bf5ac3a osd: remove bad osdmap access
-483bc18 auth: add ClientTicket
-98ace93 uclient: use lookup parent in getcwd()
-0a72563 mds: add lookup parent op
-2ac8274 Hadoop: Many silly debug statements.
-f90df69 Hadoop: Minor fixes to the still-unworking Hadoop code.
-a41c762 Hadoop: hadoopcephfs is now self-contained instead of requiring other libs.
-2a36c63 uclient/libceph: add a getcwd function
-b92d2cb kclient: replace osdc request_tree with rbtree
-3699623 auth: remove ceph_client_ticket struct
-aa2252a osd: generate primary backlog independent of master log
-3ef5491 kclient: set mapping error on writepage error
-db90dcd kclient: debugfs mounts on /sys/kernel/debug
-5f7581d Makefile: skip hadoop client if jni.h not present
-aca6d39 kclient: use a mempool for page vector in writepages
-f485e1e kclient: put writepages pagevec on the stack
-9a51ad3 debian: upload packages as sage
-e389408 kclient: fix bad kmalloc
-ddc1707 kclient: rewrite layout ioctls
-61d99cf mds: only set striping component of file layout, for now.
-8327112 fix compat
-249721c kclient: define compat_ioctl too
-87dddc4 osd: actually adjust rd/wr accounting values
-15ec923 osd: add rd/wr ops/bytes stats to pgs, pools
-b34648e Hadoop: Compiles now. Stupid macros.
-9f254d5 Hadoop: Converted CephFSInterface.cc to use libceph.
-66045f5 libceph: Added get_stripe_unit method; used by Hadoop.
-a7a7f63 Hadoop:Remove the clientPointer convention from the C headers.
-adf0477 Hadoop: Remove the silly clientPointer convention from the Java.
-e18b613 Hadoop: Created new and modified old CephFSInterface.cc methods
-38e8ce2 Hadoop: Newly-generated JNI files into CephFSInterface.h
-ee0e17b Hadoop: Adding JNI header files to repository.
-9fa6f5e (tag: v0.11) v0.11
-a8de8c7 kclient: simple dout macro by default
-b66da8f todo
-ea54a6a kclient: msgr cleanup
-8d7d3c8 kclient: caps.c cleanup
-d88a4b3 Hadoop: CephInputStream seekNewSource done. That was easy.
-f205273 Hadoop: CephOutputStream retabbed, and it's an OutputStream now.
-035f803 Hadoop: CephInputStream retabbing and add seekToNewSource stub.
-5fc0182 Hadoop: Renamed listPathsRaw as listPaths
-3eec8bb Hadoop: Continued cleanup work.
-9d4680e Hadoop:Stubs for new append method
-2e9c614 Hadoop: Minor changes to most of the methods.
-a6a98ad Hadoop: Retab CephFileSystem.
-391b2fa Added Hadoop fs components.
-c58bb8d kclient: fix up export.c
-f1264f4 kclient: mon_client, kobject cleanups
-6088a8e crush: more cleanup
-4dde6e3 crush: comments
-abc5f1d kclient: osd_client cleanup
-d9d3d62 mount.ceph: update /etc/mtab
-8c58361 kclient: mds_client cleanup
-307a11e kclient: fix dcache readdir -> sync readdir transition
-559860f kclient: addr.c comment cleanup
-c464350 kclient: file.c cleanup
-bb0dca2 kclient: separate kmem_cache for ceph_file_info
-d3f38c7 kclient: fix inc osdmap decoding
-8040abb s3gw: some more cleanup
-7d25910 kclient: more dir.c cleanup
-3138356 kclient: some dir.c cleanup
-e2100bc s3gw: rearrange code, move REST related stuff away from s3gw
-15d3bd2 kclient: small inode cleanups
-b7646b5 kclient: remove unneeded mdsmap request
-d00c1dc kclient: fix mdsmap decoding
-3d123c5 kclient: fix osdmap decoding
-84a51eb kclient: fix monmap decoding
-44cbcfe CephBroker: Removed unneeded ++
-e631be7 osd: include version in ondisk osd metadata types
-05d0e73 mds: include version in ondisk metadata types
-a451157 mon: include version in monmap encoding
-017788a osd: include version in osdmap encoding
-7e2c83a mds: include version in mdsmap encoding
-016aaea kclient: some super.c cleanup
-0a8dde9 kclient: simplify wait for maps on mount
-b9da0f4 kclient: clean up parse_ips, mount option parsing
-c2e3f9c kclient: use kmem_cache for ceph_dentry_info
-ad9fdd1 kclient: don't croak on null dev_name
-1aa1581 kclient: drop pr_fmt
-78492f4 kclient: EBADF if there are no caps on an inode
-0e4ada9 mds: ignore stray reconnects
-87c7f2e mds: semi-tolerate/warn on bad client_ranges
-e46faf7 mds: clean open file lists when we go active
-f33711d mds: adjust client_ranges on setattr size
-260ea82 mds: always share min of projected, actual max_size
-5853663 debian: build git snapshot packages for unstable
-c2d922c debian: build libcrush, librados, libceph packages
-472925d kclient: use kcalloc for decoded count * size allocations
-f324172 configure.ac: cleanup
-536a8b6 s3gw: restructure code, better layering (not done yet)
-031018d kclient: dout is a no-op without DEBUG or CONFIG_DYNAMIC_DEBUG
-343ea5f kclient: signoff in patch series
-1e27485 hypertable: few cleanups
-9e3a69f kclient: cleanup debugfs
-06de1c4 kclient: simplify dout.  again.
-d554e39 kclient: simplify nfs export handles.  untested.
-80e392f kclient: messenger cleanup
-5ee1e9c kclient: fix unaligned access in snap.c's dup_array
-32b7372 kclient: make dout's ceph_file_part NOT inline
-22f2996 kclient: caps, mon_client cleanup
-d65cc7b debian: require libtool, but not libfcgi-dev.
-f4d9466 kclient: fix monmap buffer overrun
-7fe548c kclient: respond to control-c on slow mount
-0dca028 crush: cleanup
-9a57ecc kclient: clean up osdc
-fc67f91 kclient: cleanup addr, mdsc
-4073a46 kclient: file.c cleanup
-bcfe850 kclient: dir.c cleanups
-614a9e7 kclient: inode.c cleanup
-cda85b2 kclient: super.c cleanup
-3cb357a kclient: use in4_pton to parse ipv4 addrs
-44b93ac kclient: misc cleanup
-d63e3dd kclient: in dout there may be no / in __FILE__
-83cf089 CephBroker: New version check-in.
-496d29d uclient: Fix inode ref counting in rename.
-747794a Client: removed extra debugging calls, fixed fencepost error
-28df215 Hypertable: Fixed up error reporting.
-21c73bb Client: mkdirs; move test logic into a loop.
-26905ca Client: Rewrote mkdirs to avoid possible race condition.
-bae629d libceph: Added calls for lstat and mkdirs.
-98db71c Hypertable: numerous fixes.
-ad94b19 client: new mkdirs command, and debugging output.
-b29f507 filepath: constructor works correctly on relative filename.
-869af81 kclient: make dout() behave despite file prefix, cleanup
-129ef5e kclient: make debug output look nicer
-bcd0bda kclient: replace dout hackery with pr_debug
-cfc0e0e kclient: kill dout(0, ...) calls
-36b91af kclient: kill derr, use pr_err instead
-9c4ca47 kclient: specify file max size in mdsmap
-bc2a567 kclient: __attribute__ ((packed)) all around
-2870371 s3gw: fix operations with url encoded object name
-860f65c osd: don't crash on a zero length write (sage)
-007313f (tag: v0.10) v0.10
-464d248 Makefile: fix up initscript packaging
-6b3309a initscripts: /etc, not /usr/etc
-348c2dd s3gw: prefix/delmiter can be used for listing objects
-1c1e7df kclient: kill debug msg
-8f09da9 kclient: fix up patchset comments, docs
-36dd23a mds: adjust client reconnect timeout
-f7e0622 s3gw: conserve object's content type
-5a0b3ed s3gw: fix missing null termination of attr
-4dd480f s3gw: store/retrieve user metadata
-f80db8d msgr: use SIGUSR2 for pipe kills, USR1 for accepter kills
-921b9d6 rados: fix user_only option for getxattrs
-fc6172a s3gw: interface changes, preparing grounds for user metadata
-b42438c rados: added getxattrs
-81cc70a kclient: whitespace
-7cf994d kclient: some comment cleanup
-8e1d2ad mds: eval locks too in reissue_all_caps after mds restart
-09dffea mds: reset seq on mds after reconnect, too
-b32f7cf mds: flush log during clientreplay
-161a8b1 mds: fix max_size calculation
-5249a2b uclient: make lstat() take mask
-b5bae80 mds: truncate journal on partial write
-ab82440 mds: apply cap mask in choose_lock_state
-e9f4568 msgr: fix race with signals vs select with pselect
-82fe78c mkcephfs: chown/chmod mount point if non-root
-e4f8170 mds: reconnect caps added via replay+issue_new_caps
-ea2f834 mds: check client ranges on mds restart
-2b03d81 mds: adjust client range on open existing for write
-e842cf5 mds: journal recovered mtime; cleanup
-6867c0c mds: do not check_inode_max_size in eval() path
-b1d5bea mds: set client_range on open O_TRUNC
-0b45429 mds: base client_ranges update on issued|wanted, not just issued
-23aeea4 mds: use SCAN state for file recovery on mds restart
-ac33cb1 s3gw: copy operation can use url encoding
-94d296d s3gw: fix some more jets3t issues
-0d5b2c0 Makefile: fix whitespace
-5cfa35e initscript: fix 'reload'
-9a7fdb2 initscripts: do what we can to run as user specified in the conf
-5bb2968 initscripts: substitute in proper autoconf paths
-ec1e401 s3gw: some more fixes for jets3t
-c73c954 s3gw: change xml layout, to fit with some s3 client
-08a6fb7 mds todos
-2789732 kclient: simplify/fix cap delay timeouts
-f871d3e mds: on restart, only recover files affected by missing clients
-3a86b94 mds: maintain per-client write ranges instead of single max_size
-167f4ca uclient: fix getdir() to use new readdir_r return value
-8733b56 uclient: stop using mds inode_t
-28e444d mds: add SCAN, PRE_SCAN lock states
-2ca5659 osd: less hexdump on tmap updates
-38a5347 todos
-394c6bd s3rados: bucket creation bug fixes
-489c24f s3gw: admin tool, able to list buckets
-bdfc852 objecter: fix pool objects listing
-434159b objecter: fix pool objects listing
-7494390 Makefile.am: missing some header files declarations
-6908f59 s3gw: rados backend seems to work
-58fa7c1 kclient: fix uninitialized vars
-21804bc todo
-9a5d053 Revert "kclient: strip out kernel version compatibility cruft"
-67822ef s3gw: make compilation optional (./configure --with-s3gw)
-280e4df uclient: include tid in cap flush, flushsnap
-1961fb7 kclient: include tid in cap flush, flushsnap
-6d95e29 mds: add tid to cap flush/flushsnap ops
-45e4094 kclient: assign seq to cap flush; avoid starvation on sync_fs
-c8744d6 kclient: debug output cleanup
-b5d32fa uclient: assign sequence to cap flushes, avoiding sync_fs starvation
-1a255ca kclient: fix write_inode; force dirty cap flush by mdsc_sync
-dab180c libceph: SimpleMessenger usage bugfix, added testceph.cc, fixed dependencies
-a4b0764 kclient: make sync_fs wait on unsafe mds requests
-72b03df libceph: add dependencies to the Makefile
-6c1fddd libceph: Added getdir to the C++ interface.
-4260265 Hypertable:Completed initial Cephbroker. Requires testing.
-523d703 hypertable: added skeleton .h and .cc CephBroker
-0f6e0b3 uclient: resend cap flushes on mds restart
-387778e uclient: change readdir_r return value
-8ecffa5 mds: make clientreplay go faster
-cd4e086 s3rados: put_obj, get_obj
-4daf476 uclient: track issue_seq; reset on reconnect
-2acd03a kclient: reset issue_seq on reconnect
-1d4deb1 mds: ignore cap updates in replayed ops
-cc54b17 mds: do not include trace with replayed replies
-dd0148b s3rados: implement some ops for the rados backend
-ab76397 osd: add a commit op
-5b2b455 kclient: track and kick flushing caps per-mds
-feca5cd mds: adjust all lock states in process_reconnected_caps
-c5ee747 osdc: pool creation via objecter
-17201c6 mds: set cap_id on caps reconnected after a delayed load
-ed6a18d mds: replay client ops one at a time
-cad13f2 mds: maybe eval instead of eval_gather on file recovery
-105d791 mds: reissue all caps after recovery
-f19b7c4 kclient: make mds map checks more robust
-e5cc6c2 kclient: clean out caps that don't reconnect
-c930281 kclient: request _next_ mdsmap epoch
-21a3a94 kclient: send mds reconnect regardless of who we get the mdsmap from
-79b8a5d kclient: don't skip most recent mds op
-92dff86 mds: add reconnected caps whose paths are loaded
-193ff6f mon: handle pool creation
-d5b01ee objecter: rename snap ops to pool ops
-4e87169 s3gw: some interface adjustments
-d9b1ddf libceph: Split into .h and .cc files
-ec04622 s3rados: some makefile changes, other misc stuff
-d957488 libceph: Now exists! client/libceph.h.
-85e3e06 mon:Initialize rank to NULL to avoid warning.
-e9a362b s3gw: rados backend, beginning of implementation
-663f8a1 rados: some interface fixes
-85b67b3 rados: added stat/getxattr/setxattr on objects
-320e5a2 todos
-0fbcb7c s3gw: return correct etag when listing objects
-2c2b511 s3gw: return etag with the GET response
-a92daaa s3gw: can set acl by user's email
-039a373 s3gw: support query string requests
-9f2dbcf s3gw: most of the copy options implemented
-652ff5b s3gw todos
-0fbb17f s3gw: partially implementation of copy object
-ac22c47 s3gw: canned acls
-fe227c9 s3gw: anonymous access support
-9a0258f s3acl: fix some issues with group acls
-c0643fa s3gw: handle anonymous and group acls
-648e8fc s3gw todos
-c826d2f s3gw: list buckets show only user's owned buckets
-0ce157d s3 todos
-d1db8a1 s3gw: can update acls
-b70baa6 s3gw: enforce acls on required operations
-62d9ffe s3gw: acls somewhat working, some operations use them
-76566ac s3gw: store default acls when putting object, retrieve them
-bd6555a s3gw: more flexible storage of attributes, store default acls
-9f1a952 s3gw: storage access done via S3Access interface
-f589547 s3gw: change the user access id style
-1774031 s3gw: authenticate users
-b06009c s3gw: can modify existing user info
-946dfba s3gw: add s3admin utility for users manipulation
-6a2c20c s3gw: signatures verification
-597cde9 s3gw: infrastructure for storing user info
-b5dcdd8 s3gw: can send a get-acl response
-e5a20d2 s3gw: can create a default acl policy
-6146f0a s3gw: acl xml encoding
-7bcd96c s3gw: owner class holds id and name
-11fc24a s3gw: s3acl rearranged
-dd20d46 s3gw: acls encoding/decoding
-7060aac s3gw: dos2unix on s3acl.cc
-f1b25d0 s3gw: some more acl implementation
-6627137 s3gw: xml parser for the s3 acls
-7873722 s3gw: cleanup; bucket/object parsing changes
-c3b2ef7 s3gw: implement head command
-9b4e957 s3gw: get operation, preconditions handling
-4faa62d s3gw: put supports md5, better error report
-f4a7f9d s3gw: some cleanup
-83283c3 s3gw: support delete of buckets and objects
-a1c1491 s3gw: bucket creation and put object
-d30cb70 s3gw: some more work
-8ae6719 osd: no need for RMW flags in op reply
-9a7cb3b filer: remove bad memset
-9a2c17b msg: allow multiple dispatchers to chain together
-ada466a mds: alloc cleanup, log recoverable journal errors
-b042df7 mds: fix session close ino release journaling
-661b6bc uclient: make_request returns int, not MClientReply
-9e4c776 uclient: insert_trace in reply handler
-d871b6c uclient: fix make_long_path, and thus reconnect
-f7616a1 uclient: fix op replay
-52e53f5 uclient: Cleaned up resend_unsafe_requests; handle_client_reply; debugging.
-5fb8b63 mds: drop loner on gather before doing waiters
-cc95ab0 uclient: fix order of session cap removal
-00f4480 mds: refcount MDRequest so that timed out client sessions behave
-5fd1b70 uclient: use session->caps list an lru
-a994068 osd: change log terminology: bottom..top -> tail..head
-9f05cb4 uclient: fix kickback, reply handler logic
-ea21113 uclient: fix MMDSGetMap 'have' epoch
-6f5f507 DON'T USE, BROKEN. uclient's MetaRequest extra ref counts removed.
-bb23de4 BROKEN, DON'T USE.
-53b9bf4 mon: better warning with injectargs on non-up mds
-843700b osd: make write mode per-PG
-5f43310 uclient: support mds recall_state
-f514210 uclient: remove debug print
-3bbdbaf uclient: DOESN'T WORK, but more ref counting stuff. Now attempts to resend unsafe ops on a reconnect.
-0908e10 uclient: MetaRequests go on the heap and are ref-counted; safe/unsafe replies dealt with better.
-8b054d3 kclient: checkpatch fixes
-e57a5bd kclient: use list_for_each_entry macro when possible
-1e381cc osd: fix hb down check
-5d89b6e osd: fix failure report on already-down osd
-fed00ae osd: fix log msg after var name changes
-3f7ef16 mds: don't choke on path_traverse_to_dir that fully exists
-6f83420 osd: nicer scrub ok message
-9505c09 osd: rearrange make_writeable prints
-f8ef1c2 osd: fix pg log trimming
-4583506 initscripts: fix do_root_cmd
-2b39f45 msgs: clean up v in message prints
-fd8012a uclient: Kick requests and renew caps on stale.
-95b97b1 uclient: fix bad merge
-59d08cb monc: debug option
-6e3412b osd: switch to MonClient, fix cmds and ceph
-34168a9 mds, objecter, ceph: use MonClient
-ce49901 monc: create send_mon_message helper
-653ec48 monclient: refactor MonMap into MonClient
-e65287e uclient todo
-c7d9a58 uclient: Now handles STALE state nicely.
-b5c2940 uclient: fix cap reconnect
-116140b buffer: throw exceptions instead of always asserting.
-c5faf40 assert: throw FailedAssertion exception instead of inducing segfault
-14d7fdf cosd: valgrind off
-a93ab1d auth: use string instead of const char* for maps
-621c53f mds: attach requests to session; cleanup on session close
-c84a9cd osd: fix _scrub head_exists test
-cd492b7 uclient: fix test condition
-30a4dbf uclient: verify dentries belong to current session
-d8987ee Client: put guards around some dentries[foo] accesses without checking for existence.
-09040d9 kclient: typo
-866d979 paxos: allow wait on newer version
-f49579f kclient: set have_version in MOSDGetMap
-f16a28d No more VERSION_T; just 0.
-52046d7 mon: remove old asserts conflicting with new readable semantics
-77db2e0 messages: Clean up of PaxosServiceMessages, and some fixes for their users.
-cff3f6f messages/MClass[Ack]: Roll back some unification. version_t last and PaxosServiceMessage::version shouldn't be the same in these messages. Remove that and add a new constructor that does set the version (but it's unneeded).
-1ebe88d mon/objecter: The monitors and Objecter now use the version in messages.
-c0892b2 initscripts: do mount/mkfs as root, otherwise as any user
-5e15db3 osd: update primary's notion of peer last_update on activate
-4c5a17c osd: force RMW ordering globally
-7f48ac1 osd: fix TMAPUP bug
-f558968 osd: fix tmapup
-35ac86e initscripts: allow 'user' option, defaults to current user
-1491962 mds: fix CDir decoding
-2d01cfa mds: rev format (for TMAP changes)
-4e81feb osd: fix head_existed check
-d939762 todo
-2c88b31 osd: print lost objects
-81eb5dc osd: rebuild missing OI_ATTR from log entry when possible
-51f898f osd: fix proc_replica_log stop condition
-c2ff551 todo
-258a3ba osd: rev ondisk format, protocols
-3796bf4 osd: store snapset in _snapdir object if head dne
-b791c9e osd: zero out pg_pool_t in constructor
-c80b4a1 mon: set snap epoch for poolsnap removal, too
-8dd6d21 osd: fix MOSDBoot, MOSDGetMap initialization
-7f9d387 mon: cleanup
-9ffaaee kclient: update with new monitor message formats
-491dd43 mon: change MMDSMap to send map we have, not map we want.
-1fd46cc osd: make object delete not remove _head if there are clones
-1d5c805 filestore: rmattrs command
-5c39415 messages: Added PaxosServiceMessage to repository so previous commits work.
-dd3ffaf Monitor/Message: All messages used by Paxos are now PaxosServiceMessages.
-540ad29 mon/msg: PThey mostly hold version_t's now. Unused, though.
-b3f7108 osd: adjust recovery op accounting; explicitly track set of recovering objects
-ca7d025 osd: abort generate_backlog if already canceled
-4b5572a osd: fix merge_log when log and olog share bottom
-2ebc00f filestore: use readdir_r to avoid SIGBUS badness
-c301e10 mds: fix session purge bug
-63f4073 osd: allow recovery of missing objects not in log
-303fe16 osd: avoid using null ctx pointer
-89eb728 osd: stop rewinding replica log when we reach log.bottom
-e6cb251 mds: no fatal assert on ino allocation failures
-40e4434 osd: small cleanups
-7878052 mds: don't choke on bad parallel_fetch paths
-5430076 rados: cleanup
-299edda kclient: make r_path[12] dup strings
-8bbd633 kclient: clean up mds_request path generation
-541669c todo
-f8d0535 Makefile: add missing kernel/ headers
-5f1ea72 kclient: import into fs/, not fs/staging/?
-74ceb01 rados/objecter: Changes to rados in/out, and various things work.
-2bd1377 Objecter/librados: Refactored and renamed for clarity.
-0e3e444 todo
-794002e todo
-aa615b8 kclient: clean up unaligned pointer accesses
-3652d17 cosd: conf updates
-1d21494 mon: allow repair of entire osd
-29a2b2f mds: reduce default memory, journal footprint
-e0097bc osd: do NOT include op vector when shipping raw transaction
-4148185 (tag: v0.9) kclient: strip out kernel version compatibility cruft
-7e51c52 kclient: update script importer
-58f2820 todo
-9f58773 osd: on scrub repair, update replica pg stats as necessary
-bcab1f1 osd: pass updated stats to replica
-3e0c3e2 uclient: close mds session close race
-4f0e84c objecter: some list_objects cleanups
-d82ea93 osd: check that pg matches
-0258c45 todo: bugs that have come up >2x now
-f6981fc osd: adjust debug levels a bit
-5d24752 osd: fix initialization of log.complete_to in PG::activate()
-ddd6242 osd: remove bad trim assertion: trim point may preceed local log.bottom
-695e6a7 osd: remove bad assertion to allow trim before pg is clean
-17b0f26 Objecter: now has list instead of librados. Hurrah.
-f3210a7 Objecter: Now resubmits *Op as part of tick() if the response takes too long.
-5720080 osd: be a bit more verbose about peer_info
-9e33bf1 osd: don't trim pg log if degraded
-fc7ec60 osd: we don't use MOSDPGInfo to signal replica uptodate anymore
-1eae016 osd: make add_next_entry behave when we start at backlog split point
-8b35425 uclient: wait for mds sessions close on unmount
-9c7cf29 mds: only use send_message_client for caps, lease, and snap msgs
-048c61b uclient: init, shutdown objecter
-663e482 osd: consolidate trim logic in calc_trim_to()
-2bb0b09 todo
-b86731e kclient: fix whitespace
-a1623d5 kclient: include fs/staging patch in series
-03217f4 crush: fix coding style, whitespace
-eaf39b2 crush: redefine hash using __u32, for consistency across 32/64 bit
-c9b39bb mark v0.9
-45b21c0 Makefile: add missing includes
-0eca313 Makefile: kill cls_trivialmap
-7e76918 kclient: avoid i_ino of 0 on 32-bit platforms
-fffc9f3 osd: trim pg logs on recovery completion
-754e686 osd: track last_complete_ondisk over pushes, too.
-e635d0e osd: revamp complete_thru code
-9603162 osd: some infrastructure for primary to trim replica logs
-e0719d4 osd: fix pg log trim on the non-primary
-4247691 rados: less chatty
-cd6cbff rados: shutdown on exit
-7371074 librados: add shutdown to c++ interface
-8418270 kclient: initialize readdir next_offset on dir open
-04455b8 kclient: update client for statfs changes
-1309477 osd: add pg log sizes, bottoms to pg_stat_t et al
-7d14caf kclient: clean out old debug cruft
-923e9a9 rados: fix statfs definition
-b5024a1 mds: change readdir wire format again
-4e54d11 kclient: fix readdir vs rm
-5fc7fe0 objectstore: use nstrings to store all attrs
-4f0c30b rados: prettify dfpools output
-ab7d2b2 kclient: fix dout() macro protection of x, mask
-2abc25a kclient: fix pps calculation to factor in pg pool
-9d6538c osd: fix pps calculation from pgid.ps() and pgid.pool()
-1f086d9 rados: Now properly writes 0-byte files on a get.
-b59e70a mon: implement 'mds setmap <epoch>' to (re)set mdsmap
-dc9042c mon: clean up some mdsmon stuff
-52a9ea6 librados: added a write-full method.
-119c339 rados: clean up output a bit
-e83ad7c librados: clean up librados debug output a bit
-e725f38 config: no -p shorthand for --pid-file
-114ad51 kclient: fix skipped entires in dcache_readdir
-3efb869 kclient: fix non-dcache readdir offset calculation
-92c48b0 kclient: specify smallish blksize for directories
-a07894d osd: fix cloned object context
-e3105a0 Objecter: fixed a bug in snaps.
-3e68190 mon/Objecter: Snapshot creation/removal now waits for proper epoch to return.
-9b621fe rev osd disk format, protocol due to crush, osdmap mapping changes
-d9cf568 osdmaptool: crush regression test
-bc7d48f osd: include pg pool in pg to placement seed mapping
-cb719ac crush: fix perm_choose bug
-ac64f05 rados: submit snap creation and removal to the system.
-dd7c2f2 mon: Now handles snapshot removals too.
-9ce5802 mon:Added server-side handling of MPoolSnap. Currently assumes it's a snap-create message.
-52bee4b osd: bail out of backlog generation early if osd is stopping
-6609951 mds: kill old #include
-ed34a0c Client-side support for creating/removing pool snapshots.
-0a7e559 kclient: fix di->off calculation
-60ec1cb kclient: fix I_COMPLETE
-fd7c1f3 mds: mark CDir objects with parent ino, dname
-ca1f545 mkcephfs: fix btrfs mount option
-82b2477 mds: lower default cache size (now ~3.5GB on x86_64)
-8c6410f osd: cleanup log trim check
-1a1da21 osd: do tmap update without decoding entire map
-17aa53b mds: encode dentry key as _head, not _, so that it sorts
-1614f22 todo
-d8b9c00 debug: fix log reopen
-1003b60 osd: clean up tmap ops.  now GET, PUT, UP
-c9e1a62 mds: fix CDir encoding bug
-72d43e4 mds: use TMAPUP for dir updates only if g_conf.mds_use_tmap
-0ed9d01 Makefile: kill cls_trivialmap
-dd180c9 osd: make TMAPUP (trivialmap update) a native op
-497c3a9 mds: encode dirs in TrivialMap format
-85aca87 osd: fix PGOP check
-4320680 s3: return objects mtime
-ed22e06 s3: partial implementation of get bucket
-2f2cb89 s3: handle 'get bucket' opereation
-a80a0ca rados:Added basic df functionality to rados and fixed librados.cc to handle statfs_reply messages
-7605982 objecter: add hook to get notification on new osdmap
-26ff613 debian: add build depends libssl-dev, libfcgi-dev
-c645d26 osd: autodetect PGOP flag if there are PG ops
-b4eaf55 rados: rename radostool -> rados
-98a8175 rados: external acls [beginning of] implementation
-e5e1264 s3: fastcgi s3 gateway
-6ddb9e5 objecter: unify read and write paths
-bb9a109 osd: you may, but need not, specify READ|WRITE flag in MOSDOp.
-8b6fa65 uClient: Fixed a copying error and a double lock.
-db9a785 Switched Client to use objecter's statfs methods.
-9f88b5b Rebase and better naming.
-c4b42a8 Added support for MStatfs to librados and Objecter.
-9932e78 mds: turn off mds ref sets
-910dc15 mds: kill unused CInode.last_open_journaled
-ada20b1 kclient: include full path names (in parens) in debugfs mdsc
-d116bf2 kclient: fix cap reconnect path generation
-f365ae5 uclient: mark down failed mds
-97d6f34 cosd: one mds for now
-091991c mds: use boost::pool for CInode, CDentry, CDir, Capability
-bb23599 osd: fail gracefully if OSDOp.data is empty
-242d442 mon: use pool_stat_t for pool summation in PGMap
-f7954f3 mds: cut back on hash_map usage
-ad19982 mds: fix inotable encoding
-61a6b40 librados: add const to aio_write bl arg
-6b16ab0 librados: make get pool stats work
-1a0d12c mon: process MGetPoolStats
-8fa73c1 osd: fix encoding/decoding of [sub]op response
-6d81f56 kclient: fix typo
-dc46641 buffer: append individual chars
-c66f684 osd: fix MOSDOp printout
-37d252f rados: add new headers
-5779fd2 librados: client side for getting pg stats
-9e34aa5 kclient: make /debug/ceph/client#/mdsc filenames work, cleanup
-2103b19 radostool: lssnap
-0fe5a57 Added a current bandwidth meter to radostool bench.
-2368a22 osd: destroy messengers on shutdown
-8ac2665 monclient: avoid hang during startup
-93984cf osd: fix huge memory leak (MOSDOp)
-73ac6f3 radostool: select snaps, rm objects
-e4fa8f5 rados: get rid of wrcall
-c8b162f rados: rename rdcall to call
-a1b134a class: add cls_setxattr
-43439e2 class: set method flags on registration
-659b20e osd: don't call may_read/may_write prematurely (revert previous)
-91f0af3 osd: update rwm flags for incoming ops
-0a3ae36 radostool: clean up bench args, usage
-3a3bd4f osd: include size in object_info_t
-8ac00cb osd: include ondisk magic in encoding for key ondisk state structs
-aed778a rados: remove testradoscio[pp] targets
-5052dc8 rados: add helper to header
-931b0d7 buffer: remove unused field
-8502be2 osd: fix up OSDOp printing
-109ed97 radostool now includes benchmarking functionality from testradosciopp.cc
-0660c2c osd: rev osd protocol
-70efc45 kclient: include tid in osdc debugfs dump
-7a624a4 osd: hold op data on the specific op
-82e14ae msgr: calculate data crc after encode_payload, in worker thread
-5317718 Removed time_t -> int conversion warnings.
-01d91ac mds: fix dir frag split replay
-399f22c osd: don't clobber pg_stats.reported when repairing stats
-ef5f8f6 mds: do not fragment dirs if mds_bal_fragment_interval <= 0
-debd502 radostool: cleanup
-60e3862 Hurray, this file works properly as a standalone.
-6f47790 Added initial testradosciopp.cc.
-5792669 A properly working testradoscio.c. For the moment it just takes a number of writes to make and does that number in a loop.
-ae4d91c osd: simplify op read/write flag setup
-ca27616 osd: kick pg on active set change
-efdf894 common: kill obsolete common/ThreadPool.h
-abb9fa4 osd: fix osd shutdown vs scrub work queue deadlock
-799723a mon: fix 'scrub' -> 'repair' in command reply msg
-1a35911 osd: counnt errors fixed during repair, and indicate scrub vs repair
-daeed42 osd: fix pg stats on repair
-3c91cb5 osd: replica should not check missing map on push
-7b50664 osd: improved logging for scrub
-7f01a4b osd: fix repair_object attr name
-9f8fc96 osd: fix pg parsing
-85a65e5 osd: read/write op flags revision (for class methods)
-bdfbc61 class: class acl stuff preliminary stuff
-cb6e700 mon: don't dup entires in log.err
-916b199 osd: fix backlog ordering part deux
-24dd3ee osd: repair out of order logs in read_log
-f1ff934 osd: fix order of prior_version backlog entries
-61995ee osd: cleanup
-e16ed9b mon: handle failures during CLIENTREPLAY state
-7685e7f radostool: 'ls' fixes
-6753260 librados: fix locking on sync methods
-431f38d objclass: fix compilation
-501a1a6 class: makefile, include fixes
-4e451c1 conf: avoid parsing daemon related config options when not needed
-ac8b799 osd: copy soid out of iterator
-4202ec1 kclient: filemap_write_and_wait_range not exported < 2.6.30
-9390fab cosd: put mds on ceph4
-0e312e7 osd: fix use-after-free on osd
-8dcb1e6 osd: write pg info _after_ updating log
-e64a6db mds: restore session state on load; only save opened sessions
-bb6c79e osd: remove bad assertions from IndexedLog::print()
-ece39bb librados: add/fix locking
-b284534 librados: rename AioCompletion::put -> release
-0e67ce6 filestore: escape / and leading . in object names
-c4c9fb6 mds: allow online changes in mds_log_max_segments, events
-522b6ca mds: move 'buf' column to right
-d490bd7 osd: only update peer_info if !noop
-7878e38 mds: log memory stats to mds%d.mem
-a47ad22 librados: basic snap api?
-3133932 radostool: add 'get' and 'put'
-726adea radostool: add simple radostool shell
-1e8f726 add Completion class
-3a54484 objclass: trivialmap
-99be4f1 objclass: add support for c++ methods
-57271df librados: clean up snap and ctx a bit
-e22f0a9 buffer: add ability to claim ownership of memory allocated via new or malloc()
-966f26e librados: aio completion notification via a callback
-18d136c Added testradoscio.
-53ec401 rados: can set snapshot sequence
-411adab rados: fixes for dynamic oids
-e78a3a1 memorymodel: fix crash on weird input
-1644e1d rados: rados.initialize returns negative on error
-b2cc702 rados: rados_initialize returns negative on error
-edb2f80 osd: add 'osd pool rmsnap poolname snapname' command
-48d43e1 mon: create pool snaps
-7c035e3 osd: use the pool snapc if client doesn't specify one
-766069e osd: handle removal of pool snaps
-1c3fe56 osd: purge snaps on a per-pool basis
-9967c69 encoding: kill T* templates
-dd4db22 kclient: parse expanded pg_pools in osdmap (now with snap info)
-41a38d4 rados: include pool_snap_info in pg_pools
-b0a958a rados: fix includdes
-6c42339 rados: comment SnapContext fields
-6765374 mds: share max_size updates even if cap is suppressed
-2ab1bf3 kclient: use capsnap to get snapped file size
-4225176 kclient: independently track size of address space
-d356911 kclient: fix truncate_pending up in fill_file_bits
-bd90e3f kclient: do all truncation outside of i_lock, via helper
-3158316 kclient: move max_size update logic into ceph_get_cap_refs; fix race
-4204453 mds: allow cap updates to root inode
-07bdbfa kclient: fix snap_rwsem vs s_mutex deadlock in ceph_inode_set_size
-0eae70f mon: set seq properly on mds takeover
-95392b3 osd: fix sub_op_push wakeup on pulled object
-86ef54e object: pass const refs to comparators
-db943c0 rados: pgls small cleanup
-0c28def rados: pgls fixes, uses context
-c60bf49 filestore: nicer filenames for CEPH_NOSNAP objects
-e6804f8 osd: clear reqid in backlog log entries
-40acf6f osd: don't index BACKLOG caller_ops
-fa7b0a5 mds: keep only one dir commit in flight
-434fade osd: rev osd protocol, disk format
-82e9a9a kclient: specify object id as string
-c0a1e11 raods: minor and merge fixes
-76ad687 rados: list pg, first take, partially works
-9d07dd3 osd: add PGLS op
-b6c7b94 osd: nicer pg log object names
-344a9a6 osd: clean up object_t args
-a90d876 osdc: clean up object_t args
-b7939e0 rados: clean up object_t args
-f18e448 osd: kill pobject_t (use sobject_t throughout)
-2818544 os: const ref (p)object_t arguments where possible
-af4b5d4 osd: make object_t a string
-e071d19 osd: fix obc ref counting
-4546bd0 osd: fix object context registration
-df3b7ad osd: fix replication
-4a3dfcb filestore: fix build error on 32-bit
-290330e objecter, rados: constify write bufferlist& refs
-3603dad rados: c++ aio methods
-f872659 mds todo
-5268892 uclient: fix snaprealm update in add_update_cap
-7ad8798 mds: purge preallocated inos/files when client disconnected
-3551be9 kclient: correctly set REPLAY flag in requests on replay
-f23717f mds: replay all old client requests before handling new requests
-0e0b557 crushtool: fix warning
-44d24de mds: no early reply when request has slaves
-c9869fd rados: add pg (non-object) ops
-60917d9 rados: fix warning
-e98aa17 rados: test aio write
-d84ef63 rados: rename aio_free to aio_release, fix bug
-bfe84e6 filestore: add collection_list_partial
-5cca7e1 class: add cls_read api function
-11a5655 todo
-eaa9a05 rados: first pass at aio interface
-1eb6440 class: able to update classes in runtime
-fd4260f class: classhandler locking cleanup
-c56615c mds todos
-b93918f osd: cleanup types
-3d6855b logger: fix warning
-b9dd08a osd: include client ticket in MOSDOp
-b9bca9c logger: limit precision of averages
-d020419 initscript: fix instance check, again
-7ae61e1 cosd: bad disks in cosd3
-b2ebd5e cosd: fix typo
-79b06b2 autoconf: check for openssl dev files
-77d78ba class: added file
-80e8584 kclient: max trim_caps actually work
-3943f96 mds: trim client state based on # caps, not real memory utilization
-7ba4845 mem: gather meminfo stats
-50558df mds: encapsulate /proc examination in MemoryModel; calc heap size
-e92b7c8 mds: some infrastructure to recall state from clients when under memory pressure
-03d84f1 vstart: pipe down
-711e300 kclient: trim caps on demand
-cb8018f kclient: rework iterate_session_caps
-72380f0 kclient: make session cap list an LRU; combine touch with check for issued caps
-3db66ad class: added a crypto class that does md5 and sha1
-42cb3f6 class: dlopen uses RTLD_NOW instead of lazy loading
-8447f18 class: rdcall implemented
-f789410 vstart: fewer pgs
-ec08459 osdmaptool: fix usage
-a2942af buffer: fix hexdump formatting
-1f87d00 osd: ship transaction (not op) to replicas
-8eb0c4e kclient: avoid null resv ctx dereference
-0ebda4a osd: move object_info_t, exists, size into ObjectState
-41cee82 class: dependent classes are loaded automatically
-e7a1225 class: utility to load classes
-4d5a87f kclient: fix cap resv BUG
-6481802 filer: fix probing when recovered size is 0
-568d745 kclient: put readdir max entries in mount options
-44ff8b1 kclient: rework cap reservation accounting a bit
-f8d4836 initscript: fix instance check
-31d17fc cosd: journal to a dedicated disk
-62a0ded osd: fix PG::IndexLog unindex()
-e48bc19 initscript: remove notreelog by default
-d47415d script: fix req format in osd latency check
-cf57e06 filestore: stop sync thread before journal
-3110c17 osd: create journal of specified size during mkfs
-ee9be54 kclient: avoid d_time reuse s.t. leases and dir rdcache can coexist
-93a6f3e mds: look at loner issued|wanted in file_eval
-4bd9a9e rados: aio prototypes
-8e9d10f librados: display result _after_ wait
-095f79c class: don't add a class when no valid binary is supplied
-2f26c4d osd: don't send reply on message that got EAGAIN
-8ca227d osd: show error string in reply msg printout
-8528d46 mds: fix EXCL -> * check in file_eval to use loner_wanted, not issued
-a6dd5a6 vstart: set debug levels in conf, not cmd line
-91972ad librados: remove length args from C++ interface
-cb29e2c makefile: don't build fakesyn
-15a8b9f osd: some cleanup, todos
-4473c11 kclient: fix READ|WRITE check
-3ad9ce2 osd: remove some dead code
-eda5079 osd: prepare clone before write op
-e6cc012 osd: track ObjectContext for cloned objects
-eae14f5 osd: implement rmw mode
-497998e osd: move everything into do_op, log helper
-0c205a5 osd: only register the ObjectContext if we go on to write
-4c34cce osd: unify read and write paths
-3c72caf osd: break apart write stages, transactions
-1636113 filestore: apply multiple Transactions as a unit
-c36100b osd: clean out zero->delete munging
-553eff0 osd: clean up op_modify a bit
-4c64663 class: when class not found, don't wait forever
-920a8a9 class: fix class removal via classmon
-f0e65c2 class: cmon doesn't crash if can't find requested class
-3a07498 class: some cleanup
-d1c440a class: paxos distribution of class operations fixes
-75597d2 class: some fixes, testrados works again
-b10c2ae class: same version, multiple archs work
-474f4c9 osd: unify ReadOpContext and WriteOpContext -> OpContext
-c2012f3 osd: refactor pick_read_snap into find_object_context
-7256871 osd: always set snapid in MOSDOp
-4a37091 osd: check/change object mode in response to ops; fixes.
-14ee192 make: fix libtestclass.so name
-ea68018 class: fix class storage
-c91327b class: add architecture to version
-0cdc968 osd: some ObjectContext changes
-ced9929 osd: don't look at snapid if may_write().. it's not defined (see snapc!)
-9fc4da8 osd: fix pg locking in handle_op
-94d5f1e class: remove default test class
-62c409e class: osd specifies class version when fetching class
-0602e55 osd: ProjectedObject -> ObjectContext; object access mode state notes
-48801c1 osd: reorg handle_op; turn off preprocess_op
-83cdb0e class: fix a class version issue
-99c4fcf class: string class version can be specified
-33d5b98 rados: add 'remove' operation
-67baf00 rados: supply a C++ api
-6e12a89 class: don't return nonexisting method
-b8228b3 osd: describe osd ops as READ, WRITE, or READ|WRITE
-e039780 objecter: kill inc_locks.
-9a37e17 osd: add WriteOpContext; some refactoring
-34e0906 osd: push all the read state into OpContext
-dbe0e3b librados: don't care about mds messages
-f9bdfab librados: use generic C_SafeCond and wait safely for acks
-13f1998 class: fix warning
-85f5609 osd: return immediately after -EAGAIN
-2969e84 osd: don't free message on EAGAIN after get_class
-8b4b822 librados: keep bufferlist on the stack
-faa61bd class: pass context to method execution
-20e3d32 osd: some interface change in do_read_ops, uses context
-d0bac06 rados: look up pool by name
-00d9174 kclient: import into fs/staging
-15dec9c makefile: remove unneeded libtestclass_so_SOURCES
-36f70f4 header comments
-b566903 osd: get rid of the grep op
-a05f6ef class: able to list loaded classes on the monitor
-284161c (tag: v0.8) kclient: kill dput/d_drop debug cruft
-ba73ac8 kclient: remove bookkeeper
-e3efa40 kclient: fix kbuild.patch for 2.6.30
-de954bf changelog
-8ec32b2 osd: factor out do_read_ops helper
-ee4c55c todo'd
-82031ad initscript: fix instance check
-ddfb2d7 mon: send mount error to client on EPERM or protocol version mismatch
-01512cd kclient: fix mount err reporting
-d302207 osd: handle errors on rdcall
-2e03c11 filer: make probe recover size and/or mtime; fix some bugs
-3b6db0d osd: cleanly implement OSD_OP_STAT
-31adbd9 kclient: fix compilation error
-bdc16c8 class: end to end method execution
-b064ed3 uclient: fix missing cap behavior
-507cd9a kclient: style fixes
-bd5319b kclient: strip trailing whitespace
-de0611c initscript: make sure cmdline instance exists
-04e072c kclient: make bookkeeper compile when not in .config
-9359168 mon: use generic C_Command in ClassMonitor
-9fd68cd kclient: disable bookkeeper when including some kernel headers
-791d916 osd: clean up output
-3563d61 mds: drop mut locks after file_recover_cow
-76d831d mds: fix caps issued on snapped inodes
-0e590b7 kclient: keep page locked after page_mkwrite call
-e7036c8 kclient: disable bookkeeper when including some kernel headers
-b763653 class: fix compilation
-a3df8f7 class: moving ClassHandler to common/
-61c8385 debian: add KERNELDIR
-9197648 debian: behave without Makefile
-afb4256 class: some fixes
-2ff889c class: some api implementation
-9ec4326 osd: fix compilation issue
-bbb682d class: add register/unregister
-4726252 class: remove initial test class
-b799837 class: typedef method, use C style naming
-72b5883 class: rename ClassEntry.h -> ClassLibrary.h
-5d43e27 mds: kill fugly arg to rdlock_path_pin_ref
-713da5c mds: rdlock filelock during readdir
-3caa386 mds: no rdlock in filelock LOCK state
-f275b45 mds: drain wrlocks before going from LOCK->SYNC in file_eval
-2956352 class: basic api for class, call class_init when class loads
-a2871f1 rados: define rdcall, wrcall on arbitrary class, method
-586b1cb osd: make classhandler requests async
-959848b class: rename ClassList -> ClassLibrary
-79a14d0 class: rename ClassLibrary -> ClassInfo
-89c826f rados: only export rados_* from librados.so
-3b6a6f1 .gitignore update
-c840445 mds: break CAP_RDCACHE into CAP_SHARED, CAP_CACHE
-4ba1d99 kclient: don't skip EXPIREABLE caps
-a9c98e0 class: can use ceph utility to add classes
-c0aa0e2 kclient: fix crush decoding for recent changes
-56cc833 rev osd protocol, disk format to reflect crush changes
-bc58419 crush: fix crush_perm_choose; optimize r=0 case.
-041e417 class: handle class_set messages
-5691ddd class: osd loads class
-2ecdf8d class: osd can request and receive class data
-0c2871f psim: count result set sizes
-904b299 crush: fall back to exhaustive bucket search for any bucket type
-94983dc crush: ditch prime number theorem; generate random permutation on the fly
-39f31ae crush: improve uniform selection a bit
-b821a4b testrados: C, not C++
-a379c3c librados: fix up #includes; use C for testrados
-6fd390d rados: build librados, libcrush using libtool
-12bfb53 librados: drop librados/ dir.
-ae02970 librados: build the .so
-2a0faaf librados: rename c3 -> librados
-a6fe0fb c3: remove unnecessary include
-651ff74 class: partial implementation of class osd mon messages
-3eecfe0 class: remove redundant fields from the class library
-eb2df1e class: add class name to the library list
-e0be965 class: fix class decoding
-dbe457f class: add a class monitor for the paxos services
-1d70c0b c3: exec op string
-959c821 c3: handle unhandled message
-035c5f6 c3: rados merges issues
-123540a c3: implement exec poc
-5d564b3 c3: fix rank
-e65c283 c3: fix rank static allocation
-c5cdc4c osd: add an exec op
-9af8745 c3: create a very simple interface
-3b6876a c3: mount through MonClient
-d22787d c3: add mount/umount to mon client
-51521a8 s3: add read to unitest
-88e4c81 c3: ceph simple interface
-f528c89 mds todo
-7ce1f09 kclient: fail connection when s_addr==0 and port/nonce don't match
-75ebabf mds: maintain capid across mds restart and client reconnect
-9689aca mon: don't replace standby mds
-9cc6958 mds: handle MMonMap
-5d51f27 journaler: fix replay
-3428526 osd: based reported eversion in pg_stat_t on same_primary_since
-25d7b08 osd: skip initial bit of peering if already have_master_log
-94ea226 mds: fix loner drops
-1424a36 rev protocols
-ceac0e0 debian: new rules file.  don't strip.
-9418e28 osd: fix accounting .snap thing
-88ee0d1 todo
-0fca6d3 conf: improved sample
-f673908 mon: check for osd exists before up/down
-026166f osd: maintain up_epoch AND boot_epoch; revise OSDSuperblock accordingly
-dbf03b6 osd: add back in support for unversioned sobject_t (.snap=0)
-91ed56a osd: use / in sobject_t output
-18851ce osd: adjust heartbeat peer lock
-79f9c3c osd: reset heartbeat peer set on osd down
-f738ef4 buffer: add malloc raw buffer type
-24f8b80 osd: adjust snap collection memberships during pg split
-ddbadfe osd: adjust pg_stats during pg split
-c24acf8 osd: generate correct child pg when doing pg split
-89aa789 ceph: don't choke on unexpected MMonMap
-9aecf17 osd: factor out clear_recovery_state from {cancel,finish}_recovery
-c9ba42b osd: make sure _finish_recovery only completes when it's supposed to
-26681c5 filestore: fix object filename parsing
-1f7a21d cosd: debug filestore
-1b9babf mon: don't send mdsmap on client mount
-aa0a9f1 kclient: don't wait for mdsmap on mount
-975c800 osd: set snapid in read requests
-530aad3 uclient: use MonClient for mount + unmount
-fda9dbb monc: add mount/umount to mon client
-3da7ca1 objecter: fix osdmap requesting
-bb27c54 osd: fix pg splits vs lockdep
-ddaa5e0 mon: 'osd pool create foo'
-a6d4eab todo
-fc057ff osd: move .snap out of object_t
-21c8b59 osd: do not use ebofs
-e34f6d1 ceph: break up ceph_fs.h header into msgr.h, rados.h
-05466ba kclient: recalculate pgid each time request is sent
-d90ebc8 mds: include CAP_PIN in caps_liked()
-2c980d1 osd: fix bug in recovery ops accounting
-c5e64e1 kclient: a few sparse fixes
-563024f mds: only issue sensible caps on directories
-0c3becd mds: make eval take a mask; kill try_*_eval
-7c344e6 start v0.8
-be072be (tag: v0.7.3) msgr: kill static instance 'rank' of SimpleMessenger
-2519f3c msgr: clean up refs to static 'rank'
-08daaa4 uclient: clean up mount wrt osdmap, mdsmap
-497ade3 journaler: store layout in journal header
-b5c4b54 mds: clean up layouts
-0bf1a8e osd: more pg_pool, pg changes
-9b39a63 kclient: fix page_mkwrite for 2.6.30
-8718007 osd: typo
-56170a8 config: fix pg pools in default file layouts
-840813a osd: fix up recovery op accounting
-e0d92e9 todo
-aee6335 kclient: retry 2x on ESTALE; fix up mds reply error paths
-888a760 kclient: fix symbol names without 'ceph_' prefix
-2a96b68 kclient: add missing parameter
-ce011f2 conf: added missing allocations
-63ef9f1 mon: track per-pg_pool usage
-3865b6a config: make uninit var warning go away
-0d33f93 osd: push pg_num etc into pg_pool
-22f389d osd: clean up assemble_backlog
-b72b34e kclient: don't allow to pass max file size
-5da6354 todo
-c301482 osd: make osd mark itself back up if it is marked down
-851852d mon: optionally dump specific osdmap epoch
-91a96db uclient: update dir inode, cap from reply
-12631f4 vstart: --nodaemon to run via crun and -f (so that gprof works)
-8949828 uclient: take inode ref when dirtying inode
-aa82aff initscript: default btrfs mount options notreelog,flushoncommit
-86e1325 cosd: use \ in dev list in .conf
-8fc8b5b osd: fix merge_log split point
-7935a2d mon: order log entries as they're committed
-917bfcb mon: adjust log levels
-7a7a6e9 todo
-3b9e05f assert: turn off tls in assert macro
-9f1f262 kclient: mark caps sync in check_caps writeback path too
-53ba086 kclient: added missing include
-573c3e8 todo
-e286a7e osd: make pg pools resizeable
-9c0b3eb todo
-8bc2bfa config: -v or --version to print version info
-f4fc04e mon: make down->out osd occur despite mon restarts
-e0b883e cosd: no valgrind for now
-fd6e6d0 common: add some colors on startup (errors, warnings)
-d99ed0a conf: fix allocation
-86cf106 auth: some leaks fixes
-bd4e779 conf: some more leak fixes
-c6e8cbe conf: some more leak fixes
-bbb81a3 cmon: redo remove backslash from end of line
-af07922 conf: remove backslash from the end of line
-c4cf294 conf: add backslash line continuation
-76bfc47 todo
-232c21a mds: use interval_set for ino allocation
-de880ff mon: only log osd boot once
-512c7ef osd: fix merge_log when split point is divergent
-fc11885 kclient: avoid spinlock recursion
-84c55ed conf: remove some memory leaks, still have some more
-f90404e updated sample ceph.conf
-b33f706 initscript: cleanup debug
-f960d7a osd: fix pg missing updates
-f8b552e osd: do not advance past split point if it is not shared
-24b4d79 initscript: run valgrind with specified options
-f8dc1a5 osd: reformat osd map dump
-7276b3d osd: set mtime in backlog log entries
-b30c5ff initscript: modprobe btrfs and btrfsctl -a before mount
-93a05f7 mon: fix osd mark out code
-18caea1 kclient: fix dcache_lock ordering
-b56efbf mon: allow clusters of size 2
-030ca53 mon: clean up log msg formats a bit
-75a6c1d mon: don't log 'osd alive' updates
-bb85101 osd: only trim pg log if pg is complete
-7ae8ed2 osd: set osd down -> out interval to 5 minutes
-73b17e6 osd: make sure pg_stats_t.reported increases
-4d431b6 makefile: add missing Spinlock.h
-2d52741 mds: make eval_caps safe on non-auth
-00f62f8 mds: eval_caps on cap removal
-a7b7ff5 journaler: fix flush bug
-025041d mon: avoid duplicate log entries
-6e3cec6 kclient: some sparse fixes
-7505e9f kclient: stat -> getattr
-3857f00 mds: clean up mds args (rename stat -> getattr)
-83dee3f todo
-c8abf51 mds: consolidate loner checks
-5e3d2df mds: fix get_caps_issued shift/mask bug
-69b8602 uclient: do local lookups if FILE_RDCACHE on dir and rdcache_gen matches
-398f2f0 kclient: requeue inode whenever we dirty (use) EXCL|WR caps.
-22d2987 kclient: queue cap or delayed check if we get unwanted WR|EXCL caps
-f58079b kclient: fix delayed counter in check_caps
-aec1203 journaler: write out objects as we complete them
-36913b5 todo
-9e98eba cosd: conf changes
-1c46fbd mds: finish waiters for root (fixes mds recovery)
-8c30d33 mds: only delete mds on clean shutdown
-96dd4b3 trivial cleanups
-04dc763 mon: replace mds even if state < 0
-cdb8976 init: killall || true
-c42ed2b config: set g_daemon flag; only create pid file is daemon (even if in foreground)
-e90ed79 cosd.conf: more disks
-8acecb1 mkcephfs: modprobe btrfs; create mount point earlier
-b692259 spinlock: pass 0, not NULL
-96beb1c kclient: drop i_lock over dput in dcache_readdir
-611cf8e kclient: preserve dentry readdir offset during a rename
-700e3c4 todo
-535bc3f mds: avoid journal flush on max_size decrease; clean up some flush checks
-b6bdac0 mds: make is_waiter_for() efficient, maskable
-bafb499 mds: kill unused purging xlist
-cfb3583 mds: move leases to dentry only; use map instead of hash_map
-f602d4f debug: fix memory leak
-9dee087 logger: fix memory leak (kill timer on shutdown)
-b7ff29c kclient: move igrab, __mark_inode_dirty into __ceph_mark_dirty_caps
-d3ece53 buffer: cleanups
-47045f7 atomic: use a spinlock instead of a mutex
-6442494 spinlock: add support for pthread spinlocks
-d0b7c57 vstart: valgrind select components; make tool + args selectable
-c4d1f15 mds: kill unused cap updating field
-ceb2a3b mds: delete mds on shutdown
-5ea5e67 journaler: put magic in journal headers
-3806055 mds: fix root fullbit memory leak
-20d68a2 buffer: make hexdump non-inline
-8207f9c kclient: fix blob size initalization
-9f456a3 mds: add/remove inodes to/from open file list based on wanted caps changes
-f24baf5 mds: fix file_excl() call preconditions
-ee5a63c mds: avoid dup locallock wrlocks
-83c880c kclient: reorder setxattr to avoid race
-a68bfa1 kclient: removexattr marks inode dirty when required
-4bc6291 kclient: break I_NODELAY into NODELAY and FLUSH
-2d1e6dc mds: rewrite scatter_tempsync
-74907b2 vstart: selectively run mds through valgrind
-5fc8205 mds: drop unused mdr->cap
-27b1972 mds: remove debug msg
-4b8036d kclient: helpers for mount options
-a8deb11 kclient: fix dcache readdir bug; add mount option to turn it off
-7d04390 mds: init var
-939787b kclient: setxattr cleanups
-0af0f45 mds: issue all caps we can (except RD|WR on dirs)
-95d4d52 mds: fix snap.c debug prefix
-7ae4ddd kclient: drop RD, WR caps on file lock setattr
-2c3690d mds: use actual cap wanted, not requested
-14f47c5 mds: allow request_release to update wanted; do so if I_NODELAY
-5bb63d1 kclient: fix up cap timeouts
-1ef1316 mds, kclient: fix issue_seq vs seq, limit dup cap messages
-6ccb97f mds: consolidate calls to issue_caps
-91f52b9 kclient: silence down log messages
-f46db4f kclient: add missing initialization
-fee4d7f kclient: fix xattrs cap message
-9b745ec kclient: merge asyncxattr
-4767269 kclient: refactor setxattr, listxattr
-48d9fc9 kclient: fix removexattr
-fadaa7a kclient: fix some leaks
-d18b354 kclient: xattrs, selective rb erasing, fix tree tear down
-6de31cb kclient: make listxattr actually work
-8e44f03 kclient: xattr name length fixes
-bb9e410 kclient: initialize xattrs version
-7d4de7b kclient: send xattr name on setxattr
-50ce3cb kclient: verbose xattrs
-22dfd1b kclient: list, get cached xattrs
-e370937 kclient: don't copy null xattrs blob
-a61bef3 kclient: send xattrs blob when dropping xattr rdcache
-51788b5 kclient: preallocated buffer for the xattr blob
-e838f56 kclient: xattrs cleanup, preallocate xattr structure
-f6382ba kclient: don't rebuild xattr rbtree if exists
-192d56f kclient: fix some more xattr stuff, basic stuff works
-af48904 kclient: some more xattr fixes
-731822a kclient: xattr initalization and bug fixes
-895477f kclient: xattr uses rbtree for indexing
-a566a59 mds: fix CInode::get_caps_wanted to do the shift on returned mask
-31a0d5f mds: move simplelocks (auth, xattr) to EXCL in simple_eval
-59eae6a kclient: assign meaningful readdir offset to client-created dentry
-f21a082 mds: add mds_max_mem conf item, hook to check memory utilization
-f0813fb mds: trim cache during tick, not every request
-ec71ed4 mds: put mds format magic in root inode, journal; check on start, replay
-55e3851 context: return error from C_Gather
-9a00bc9 mds: kill rdcaps code
-be6fdbb mds: count caps, inodes with caps
-714bdca todo
-36c133c kclient: fix up dcache readdir
-308294f kclient: initialize xattrs version
-de57c08 kclient: send xattr name in setxattr
-fa6f9fc uclient: make O_CREAT work
-d4742c1 kclient: do readdir from dcache when possible
-be1baa9 filestore: clean up attr name, path buffer lengths
-979583f filestore: make path buffers longer
-dcd827c scripts: fix mds and osd request latency checkers
-be60e30 mds: flush log in do_cap_update if there are unissued but wanted caps
-9c55e30 mds: issue caps as needed in xlock_finish
-ead910f debug: make log symlinks relative if dirs match
-f9a4818 mds: eval_gather on cap removal
-96a13d4 mds: never issue caps in file_eval
-fbd11d9 mds: hide stray dentries and inodes that are purging
-b3af208 mds: reorder some code
-7eee8a8 mds: use rdlock_path_* for rename; fix helper paths
-bf96e2e mds: make dn vec accurate after rdlock_path_xlock_dentry
-a2bc5a1 mds: store up to two paths in MDRequest; generalize rdlock_path_*
-bce7044 mds: kill mdr->ref_snapdiri
-5e24537 mds: move done_locking into acquire_locks
-df14710 mds: acquire_locks in callers, not rdlock_path_* helpers
-9d4d3d1 mds: refactor path_traverse, callers
-64295cf todo
-b1c02ce vstart: behave a bit better when sudoing
-3b1c513 kclient: allocate cap releases outside of spinlock
-8dd39cc kclient: use FLUSH cap op on cap writeback
-7e7d1ee kclient: only check auth cap for WRBUFFER, max_size checks
-1d8b820 kclient: switch check_caps interface to use flags field
-a532955 kclient: fix setxattr
-f0320c5 kclient: kill ceph_release_caps and check_caps drop arg
-3832dad kclient: fix up cap/wanted delayed release logic
-145b7e3 mds: don't reissue caps on embedded request releases
-3424847 mds: default to issue_caps in file_eval, _unless_ we are dropping caps
-814c629 mon: make log messages a bit nicer
-3994833 mds: journal max_size update as loner, if any
-b63f127 kclient: less chatty
-c48c720 mds: include cap, dentry lease release in request messages
-2db1436 mds: avoid dup change_max in _do_cap_update
-e2cff3b kclient: dequeue cap on non-drop send caps
-4ab3e35 mds: drop 'careful' caps concept
-68b83d6 mds: choose reasonable state after xlock finishes
-fcb5f0c mds: better max_size lock checks when EXCL
-bec3449 mds: stay in EXCL and keep loner until wrlocks drain
-400e5f0 mds: clean up can_wrlock() so that it checks of loner
-1a52cf1 mds: replace WANT cap op with DROP
-fd55fa3 mds: use EXCL instead of LOCK to adjust max_size if loner
-123f621 mds: don't rdlock_try authlock for path_traverse permission check
-3854881 mds: issue caps in file_eval only if needed, indicated by WANTED cap op
-cc2e18d mds: fix file_eval to issue caps from EXCL state
-45525d4 todo
-557af5f kclient: only flush caps in write_inode if wait=1
-dbb6036 kclient: maintain min and max cap hold delays
-33c2e49 kclient: drop FILE_RD if !wanted and max_size non-zero
-24694e3 mds: adjust mds client request format to include optional releases
-4f50d83 mds: separate CREATE vs OPEN handling
-79abc98 mds: allow full dir lease (FILE_RDCACHE) on root ino
-b723bca kclient: drop root ino special cases
-ccbcd3b kclient: mark dentries with dir rdcache_gen, not i_version
-9d74bbf kclient: don't clear I_COMPLETE on dentry revalidate failure
-dcf61d0 kclient: reverse logic of O_CREAT create vs open check
-45f04b7 todo
-4eb5ac2 config: remove INSTALL_PREFIX
-ca723a2 uclient: fix up caps some.  make dentry leases work
-7f61d63 uclient: set fsid in statfs request
-074dc38 kclient: fix ino returned in fstat for 32 bit arch
-8dd782f kclient: don't alter mds_wanted caps if dropping caps
-95604db vstart: kill bashisms
-4a972d0 kclient: remove alignment restrictions on O_DIRECT reads and writes
-5faa828 mds: fix compilation error
-accb18c mds: bump mds protocol
-72c1932 mds: add CEPH_CAP_OP_REVOKE
-23a41e4 kclient: clear di->lease_session when dropping session
-8e87ea3 mds: flush log when expanding caps and filelock is unstable
-a1c904b mds, kclient: add CEPH_MDS_OP_CREATE operation
-3b585ed kclient: implement permission iop
-f7d206d kclient: make do_getattr take inode, not dentry
-afbc8ea kclient: d_alloc_anon on older kernels
-9892183 mds: make sure kick wasn't immediatley fruitful in rdlock_try
-b70721e mds: simplify EMetaBlob interface - don't pass explicit inode_t pointer
-2c822ff mds: fix journal replay
-b1af668 mds: journal projected inode values by default
-cf61768 vstart: run valgrind properly
-aee59b1 todo
-a7ab44b mds: make mds restart work
-c8dc035 mon: fix mds stopping and restart
-c31ba43 mds: fix permissions checks on root, system inodes
-dcc9bc4 mds: journal root inode changes
-3321cd4 mds: inode fetch/store
-3ba1175 objecter: only send one ping per laggy osd
-95710f0 objecter: add support for compound read ops (ObjectRead)
-b1c0073 osd: implement GETXATTR read op
-365105f kclient: better readdir debug output
-83c9f4a mds: make rdlock_try kick the lock if it blocks
-fdf99b5 mds: issue AUTH_EXCL on mkdir
-e6b7299 kclient: drop LINK_RDCACHE cap on rename source inode
-0b32433 kclient: update cap->mds_wanted on revocation reply
-ff2c0c5 mds: do not want LINK caps for any open file; no non-FILE caps when readonly
-86b79af kclient: drop any unwanted caps when unlinking a file
-6e2e4da kclient: send messages with default priority (to match mds)
-04ac4cf msgr: show seq # of incoming messages
-3b2a105 mds: alloc wrlock by EXCL client
-065ecd1 mds: don't issue new caps with a revocation
-e030885 kclient: queue inode for cap check if mds_wanted mismatch
-dab345d mds: fix wanted updates
-7f538a1 mds: clean up issue_new_caps interface
-fb16331 kclient: fix session leak
-5b7c5c3 kclient: grab inode before queue_cap_snap; cleanup
-cbabe12 kclient: fix some log messages
-c1629b6 uclient: mksnap/rmsnap via mkdir/rmdir
-66fa179 uclient: remove some dead code
-5954fd6 kclient: protect realm->inodes_with_caps_lock
-c92e997 kclient: protect session->s_caps list with s_cap_lock
-72dd9a0 kclient: adjust caps accounting a bit
-7b4636b kclient: link snap dentry for MKSNAP as well as LOOKUPSNAP
-6e967ae mds: include target inode in mksnap result
-a0e9549 kclient: fix readdir dup requests
-e085e5d uclient: fix up snapped path generation
-c1934a5 uclient: fix reply trace
-0702554 uclient: fix root inode open on mount; fix readdir
-551c7a0 uclient: use new mds protocol for replies
-111c032 mds: kill symlink following in the mds; handle this on the client
-c6e0abe uclient: big refactoring
-4c75c36 mds: cleanup
-1d0c8ab mds: fix open on snapped files
-ce93cc9 mds: fix open on snapped files
-959a18f kclient: fix opens on snapped files
-9d53eb5 kclient: special case LOOKUPSNAP in fill_trace to add in the dentry
-1463020 mds: clean up path_traverse vs snap interface
-ef37e0d kclient: send new LOOKUPSNAP opcode
-cde4e3f mds: add LOOKUPSNAP op; synthesize snapname dentries in replies
-90ec742 mds: make lssnap use new readdir response format
-d040e34 kclient: snap snapdir fixes
-eb32f44 kclient: some list handling api cleanup
-ffcde4f kclient: remove leaked preallocated cap releases messages
-58ba66f kclient: lookup is the only vfs call on which we init the dentry
-fee66b3 kclient: don't free dentry private data when dropping lease
-44b535b kclient: fix compilation error
-2483bbe kclient: change dentry private data initialization scheme
-5d46671 start v0.7.3
-6a0729d kclient: drop caps in setattr
-3b135e5 mds: flush log when waiting on xlock
-e787348 kclient: fix mds session check in update_dentry_lease
-68a380b kclient: reduce log levels on some messages
-5c97dab kclient: merge conflict
-7b63dab kclient: adjust nfs reexport
-6b8ffa6 kclient: refactor message creation
-2a71709 mon: log quorum on election victory
-54987e2 kclient: make some get/put_cap res methods static; allow reclaim
-126cd84 kclient: some cap reservation cleanups
-573de83 mon: log monitor election events
-436a4b8 kclient: remove bad iput from check_delay_caps
-86ed05c mds: make open() _not_ follow symlinks
-fd27816 kclient: make ceph_lookup_open on symlink behave
-4c89deb mds: replace FINDINODE with LOOKUPHASH
-b08e8d6 mds: simplify mds command set
-10d7631 kclient: simplify cap flushing
-2626d4b kclient: fix caps reservation cleanup
-f6ee8ee kclient: caps bug fixes, less verbose
-0424cfe kclient: small adjustments
-dcaca3e0 kclient: debugfs for caps reservation system
-76453ca kclient: caps reservation system
-69050a1 kclient: flush dirty inodes on sync_fs
-68c3189 kclient: read each frag over multiple readdir calls, as needed
-e0da8d3 kclient: fix mds reply error codes
-60b950f mds: include 'last', 'complete' flags in readdir reply
-64e6ded mds: kill CEPH_MDS_OP_FSYNC
-0e27214 kclient: fix fill_trace comments
-7b4da89 kclient: use kmem_cache for caps
-3951b52 kclient: add missing ceph dentry init
-1b8b3c3 mds: all request paths must be relative to a non-snapped inode
-f2cb274 kclient: generate request paths relative to a non-snapshotted inode
-ace82ea kclient: only flush caps to auth mds.  wait in write_inode, if asked.
-9d1eff1 todo
-d0a654b kclient: roll up setattr helpers into a single function
-2db15ce mds: roll up various ops into single SETATTR
-6d73799 kclient: small bug fix
-ef29431 kclient: add dentry lru
-58e6a82 kclient: pin inode with FILE_WRBUFFER cap refs
-6208f57 caps: track last_issue seq, check on release
-ca070e3 kclient: make ->write_inode() flush dirty caps
-47f798e mds: leave simplelock in EXCL if there is a loner
-49d8bca kclient: fix flush_ack cleaned logic
-d306df9 kclient: drop old_atime cruft
-80b576f kclient: fix cap_release accounting
-6445270 kclient: no need to clean out cap_delay_list
-8ef8db9 mds: release caps only via cap_release
-45ff6c0 kclient: never release via client_cap message
-87f4de2 scripts: make mds request checker show the operation
-4fe37b0 mds: disallow setlayout on non-new file
-5b8d405 todo
-3136418 kclient: release caps in destroy_inode
-220c41c mds: add bulk MClientCapRelease message
-55a5453 kclient: do not pin cap inodes
-3e69829 kclient: pin dirty caps
-e20c361 kclient: drop cap lru
-ee2736e kclient: only request wanted caps if they aren't already issued
-3c9cc24 caps: fix CEPH_FILE_MODE_RD caps (no WR!)
-902a117 mds: try choosing loner on encode_inodestat
-5c0fb6e mds: avoid going to MIX when unnecessary
-ab7420b kclient: do async wanted adjustment on open if we hold any caps
-a92e75e mds: issue FILE_RD+FILE_RDCACHE caps speculatively
-afcbfd5 cosd: dump error when failed to mount, fix logs
-c33ef1f cmon: add mds state changes logclient notifications
-afdda99 kclient: fix touch_cap; release old caps
-def2748 kclient: make clean_caps lru; explicitly release old caps
-facfff1 cmon: less verbose
-1c448a3 kclient: drop rdcaps (cap expiration) in favor of clean_caps
-4dd5a3c kclient: drop cap renewal
-e0013f4 kclient: keep track of which cap is authoritative
-9bed373 osd: add logclient state changes
-3f0cee1 kclient: drop unused USE_CAP_MDS
-98d896b kclient: remove unused dentry in ceph_open
-c287bd0 more cap notes
-82960da kclient: take CAP_PIN refs on requests
-3c48083 cap todos
-6b76607 kclient: i_pin_ref
-ee507a4 kclient: fix deep mount refcounting on s_root
-659fcfc mon: avoid dup umount log entires on client unmount
-c8d9a09 mon: clean up client mount/unmount messages a bit
-87850dd mon: use separate message type for log ack
-23167ad mds: fix rename common parent checks
-6e62707 mds: expose projected inode to loners, even if they don't have EXCL yet
-6612493 kclient: handle mds replies with no trace.
-694582f cmon: add logclient, mount/unmount messsages
-d37034e mds: fix rename common parent checks
-1b7cc4a kclient: clean up
-b143747 kclient: d_move only on rename
-dbe6606 mds: expose projected inode to loners, even if they don't have EXCL yet
-3489516 kclient: add a "show_bookkeeper" entry to debugfs
-24ee9ca mds: return open dn to client when it wants it
-5464051 partial cleanup of snap related ops.  still not really working.
-c5a58f7 common: fix buffer::list::read_file, add buffer.cc
-cb7269a conf: ressurect the g_conf init_stuff
-f2dd55a kclient: cleanup some sparse warnings
-d62a744 kclient: replace crc32c_le with crc32c
-6d31cc7 kclient: set s_root, fix misc refcounting
-bfe8af7 mds: include diri in readdir result
-f2a14a5 kclient: make mds requests relative to inode or single dentry
-fb9c432 mds: simplify reply trace
-c8fe66f filepath: leave off / if bare inode (no relative part)
-7f36fe3 kclient: simplify fill_trace, mount
-fc3f798 train wreck
-cb8e9d3 mds: specify number of dentries want in mds request
-710bcf6 todo
-b105149 config: remove unused init_g_conf()
-ad23ed6 buffer: make read_file check read(2) result code
-bfd6a90f kclient: kill bad r_locked_dir in getattr
-a6d4178 mds: fix unlink stray snaprealm reference
-6ed1263 mds: make root dir default to 0755
-8736af0 config: make log sym dir default to log dir
-e878991 config: open conf file readonly
-8fc3b8c todo
-c055b56 mds: fix auth_pin vs xlocks
-4c1256e kclient: fix r_locked_dir to match VFS locking
-f0be3da debian: no restart on upgrade, no start
-32a34ff conf: compare mon addr in monmap and in conf, warn
-ecfc3f3 todo
-416cc9d mds: avoid including caps in readdir items if snaprealm differs
-20e03c8 mds: no snaprealm for stray dir is needed
-6e3871c initscript: don't fail if $btrfs_path already mounted
-d913f89 osd: separate CEPH_OSD_OP_* and FLAGS_* namespaces
-4b738e8 todo
-9483576 kclient: print reassert_version in /debug/ceph/.../osdc
-8f38a4b buffer: check posix_memalign result code
-411b381 kclient: clean osd read requests after receiving reply
-4160adc initscripts: make do_cmd properly bail when command fails
-565dae5 conf: exit if -c specified and conf file not found
-b5ca501 initscript: fix .conf push to other nodes
-46913ed todo
-24ac254 mds: creation, subtree map tweaks
-7357b56 kclient: fix default timeout values
-d59cb1d kclient: add configurable caps_delay option
-4261747 kclient: less verbose
-71b99ad mkcephfs: fix monmap/osdmap copying
-5a9e8e1 mds: fix fs creation, replay
-9ebccd4 kclient: locally open file based on what MDS thinks we want, not what we still want
-568969e kclient: properly maintain mds_wanted value
-ea7344c mds: put pending (not added) caps in reply caps
-d2923c9 kclient: do not retain unEXPIREABLE caps if !wanted
-20086ac kclient: schedule check_caps if unwanted, unEXPIREABLE caps are issued by the mds
-376d490 todos
-ab592b8 kclient: debugfs cleanups
-faa9643 common: reorder config option parsing vs defaults for daemonization
-c72be99 mds: fix xlock authpinning
-6cef95c kclient: adjust makefile, patch series for sysfs->debugfs
-c34b922 monclient: fix error message to suggest correct arg (-c not -C)
-9f8436a makefile: add new files
-0f00c59 kclient: remove sysfs stuff
-eca98f4 kclient: put all info stuff in debugfs
-ee89098 todo
-c27d93a crun: remove bashisms
-56b9199 initscript: make crun/valgrind init arguments override conf
-55c0204 osd: only set mtime if non-zero
-6cd4de3 objecter: provide mtime for writes
-eeb4b17 kclient: set mtime on writes
-60909dd debian: which gcc/g++, not fixed at 4.1
-13d7ba4 osd: set mtime based on client-provided timestamp
-c2ce7c1 mds: rejoin dirfragtreelock too
-84b2074 fakefuse: fix common_init call
-f572d4a mds: fix xlock behavior
-2f4ee29 mds: properly check xlocker caps
-bf26f0e mds: set xlocks done _before_ setting trace dist
-1353b3f mds: allow caps to be selectively issued to xlockers
-52ead7c kclient: ceph_open caps check cleanup
-7afa26c mds: restructure mds root directory
-06f4281 mds: make scatterlock flush on mix <-> lock transitions, not just mix <-> sync
-3243029 auth: fix uninitialized variable
-a5bdede mds: add MClientMountAck
-41766cd config: clean up common_init a bit
-9803d09 initscripts: add default mount options
-3251b15 auth: advanced auth config options
-5251c8b kclient: remove renew_from from lease renew message
-3b9ec08 protocol: add mount_ack to client mount protocol
-c2410ce cstring: don't fall over on null initialization
-6ad4c1f debian: description updates
-aceb6ff Revert "mds: make CAP_FILE_RD expireable"
-8a9893d ceph: ceph_client_ticket
-313888a debian: improve description a bit
-eaec24c mds: be sure to issue new caps _without revocation_ from encode_indoestat
-5d733cf mds: fix get_caps_liked()
-5610fa7 mkcephfs: create osd_data if it dne
-1f99e6c todo
-3895499 auth: fix case when mount sections are not defined
-58aef96 conf: remove some junk
-3814189 auth: added basic client ip authorization
-57f0184 mds: do not issue non-EXPIREABLE|wanted caps
-c952d11 kclient: always hit r_safe_callback, even if no callback
-b29c8eb debian: fix changelog/version
-466ca18 osd: fix osdmap timestamp updates; rename
-23f2509 mds: add mdsmap modified stamp
-205275d mds: make scatter_nudge a bit more robust
-809080f mds: add lookup mds op name
-ca34554 todo
-7ae075f mds: remember scatter requests
-615db12 mds: don't automatically bump dir locks to loner if it's a subtree root
-2e0dc4a mds: fix ->mix lock transition
-e259399 kclient: drop unused r_expected_cap
-cf7106d mds: show laggy status in map summary
-1bf9ce5 initscripts: remove bash-isms so they work with dash
-c79c579 config: fix warnings
-ed9f3ee todo
-0575227 mds: make CAP_FILE_RD expireable
-e044250 kclient: handle cap renew message
-b0b214b kclient: renew old rdcaps when we use them
-1dd2b3c kclient: choose cap op in check_caps, no __send_cap
-58155fb config: allow arithmetic in default conf values in config.cc
-4e4f538 kclient: adjust rdcaps status in cap grant
-0013219 kclient: shift some work out of __send_cap back to ceph_check_caps
-bbf44ac mds: clean up rdcap list handling a bit, show rdcap status in debug
-22ce288 mds: process cap RENEW
-f427162 kclient: factor out directory content lease/cap check
-839e48f kclient: fix trim_session_rdcaps
-f04aa20 kclient: less noisy
-91d8b0f mds: reverse rename arg order when migrating or reintegrating strays
-49b16ae kclient: use LOOKUP op for lookup
-8bf11e1 mds: create explicit LOOKUP operation
-25abe74 kclient: merge and simplify ceph_lookup, ceph_do_lookup
-0232ac6 kclient: a bit more verbose about ?time changes
-e0b9ef9 kclient: fix ceph_caps_issued_mask
-4764e24 kclient: disentangle getattr from lookup
-b1a267e mds: return NXIO for open on special files
-525081d mds: flush mdlog for time sensitive ops
-fa65938 mds: flush log on talbeserver prepare, but not commit or server_update
-3f9b566 kclient: fix file refs vs special files
-b4e78f8 kclient: fix lookup open intent
-6e77a58 kclient: add osd sync that will flush all open osd requests
-fda06a1 kclient: fix osd request kicking
-8e5015d filestore: allow commit interval to be adjusted	at runtime
-d67a463 configure: check for histedit.h (libedit-dev)
-23b5c06 kclient: fix statfs sysfs entries init/cleanup
-943127d todo: mds
-51ffd75 mds: make mds_short_reply_trace tunable
-d80a68d kclient: fix out_more business
-041bfb7 kclient: remove /sysfs/fs/ceph/debug*
-36e462a kclient: add debugfs for debug control
-7ccc65b filestore: add missing mode arg to open()
-ac83567 kclient: do not flush request stream on lease release
-06884b9 kclient: make message stream flush optional
-72e068e todo
-3ea9811 kclient: rename listener -> unsafe; fix fsync; simplify dir_fsync
-22b9ec7 kclient: fix inode refcount leak
-bfd6a908 kclient: handle partial trace responses
-2c933dc kclient: refactor osdc write; handle dual ack/commit, and fsync on sync writes
-4ce68b2 kclient: do filemap_write_and_wait
-d327d2c kclient: do filemap_write_and_wait
-cf9c81a todo
-d7fe34f kclient: drop unneeded current_is_pdflush() call
-dbe3d7b bump version to v0.7.2
-d8f4664 mds: return only a single path segment in reply trace
-1e8073b kclient: fix uninitialized var warnings
-aa1289b kclient: put_page O_DIRECT pages after read or write
-0cccc18 vstart: only 1 mds
-e6b7a89 kclient: make O_DIRECT io flush or truncate page cache pages
-48e5907 kclient: more cleanup
-9bc9b69 kclient: some sparse fixes
-db16698 kclient: small cleanups
-c7584c6 kclient: lease renewal fixes, cleanups
-0c9d408 kclient: zero lease_renew_after ttl before requesting renewal
-c980158 kclient: send lease renew message when passed ttl
-62f46d2 kclient: refactoring of lease msg sending, add lease half-time accounting
-466484b kclient: update lease handler to cope with a renewal
-acd7041 mdsmap: fix find_standby_for
-ae0ed71 mon: allow 'mds getmap [epoch]'
-a8f39cc mon: allow 'mds dump [epoch]'
-4296efb kclient: clean up setattr vs caps vs i_lock
-cdeb001 kclient: remove redundant ceph_inode_holds_caps
-2066f68 kclient: fix printk format
-2c9ca41 kclient: dentry_lease_is_valid cleanup
-60b65ea kclient: do revalidate RDCACHE check under protection of lock
-f56ac90 mds: fix lease release; add lease renew support in MDS
-25880ed conf: use dynamic sized strings
-0fa04fc kclient: set osd op sync flag on O_SYNC|O_DIRECT sync writes
-5203650 kclient: enable direct_IO
-3589141 kclient: refactor read path, allow O_DIRECT
-7990b38 kclient: refactor write path to facilitate sync or O_DIRECT writes
-04458cb kclient: fix file reopen on existing caps
-4c2ee41 kclient: show wanted in trim_rdcaps
-55d3012 ceph: fix argument parsing to allow commands with '-' in them
-6938bfa config: indent warning
-3597469 kclient: don't read into pages if request is aborted
-1302560 todo
-386814f man: update with latest args
-ab78b75 remove newsyn
-5fe9791 ceph.cc: fix arg parsing
-f30c4a3 config: fix bool argument parsing
-5683ff7 kclient todos
-f741766 mds: clear replica lock dirty flag when state is flushed back to primary
-b92d354 conf: redo all arg parsing for different modules
-06b06ea conf: arguments parsing cleanup
-106efe2 mds: fix excl->mix transition when replicated
-ed517dc mds: simplify lock msg handler by leveraging eval_gather
-1c8f8e3 vstart: no thrashing for now
-2e93f03 mds: merge scatter and file lock message handlers
-50c7d85 mds: lock lock actions (no more LOCK_AC_SCATTER)
-201e230 mds: more eval_gather() caller fixes
-d24c1df mds: add SYNC_MIX2 state
-5425a65 mds: only adjust inode auth_pins if we have cum auth pins
-2723bf7 mds: remove bad eval_gather calls
-22aaa47 mds: cope with non-mdr request in path_traverse
-c9c231a mds: fix eval_gather on capless inode locks
-3bdfb56 kclient: friendly mds state names
-32bde73 mds: MDSMap::get_state_naem -> ceph_mds_state_name
-1a345b2 kclient: decode new mdsmap format
-d5bd163 todo
-35cbf3f vstart: more mdss
-3ce1980 monclient: do not show monmap source on startup
-e10a2b1 cmon, cosd: show fsid on startup
-2088378 cmds: show name, fsid on startup
-ca49b3b objecter: throttle read or write ops as per osdmap flags
-dcffdec osdmap: PAUSE flags
-84e5bc3 initscripts: print cconf command if verbose
-866d4cd cosd: change osd path
-8d6d2b7 initscript: remove mon_addr generation
-2a316c3 ceph_common: use new cconf syntax
-f87a7ab mkcephfs: modprobe btrfs after the mkfs
-0bfff79 conf: enlarge post processing buffer
-c446d43 cconf: fix -s options and some other cleanup
-ae22895 cconf: fix behavior when key not found
-865606a conf: enable default values
-242394c cconf: shouldn't open the conf file
-e36b363 cconf: can read keys that are not related to g_conf
-c6da33b cconf: restructure, use common infrastructure
-7d66049 cmon: typo
-458dd90 drop dstart/dstop
-8da9655 initscript: get pid_file so stop/reload/etc work
-225cbfc vstart: fix mkmonfs call
-479ba78 confutils: initialize pointer to null
-c6b6b3b conf: parameter substitution work (not fully working)
-31194c8 config: clean up sample conf
-bd9cf1b makefile: remove sample.cluster.conf
-883f069 cconf: added $num to substitution variables
-7b9c0ab cconf: can use substitution variables
-73b4ce4 config: fix sample conf files
-93742fa initscript: more fixes
-c5e8d2b mkmonfs: fix argument parsing
-c72aeff config: fix cosd conf files
-66b4d51 config: just ceph.conf, no more cluster.conf
-acbfc6a config: more config fixes
-8a8f825 man: some manpages fixes
-2c88568 config: can use alternative module name
-45d36ff config: search in global section by default
-cee1468 initscript: lots of changes
-11ee8ab config: fix mds, mon, osd startup
-5625c21 mds: rework mds standby framework
-dfefb98 mds: fix up startup options
-ddd08fd mds: name mds daemon instances independent of their current logical rank
-735d89b cconf: resort to search in global section
-b7bd031 cconf: fix alternate section name
-24a4c36 cconf: search in both ${type}.${id} and ${type}${id}
-dcac96d cconf: add -i, -t options
-29b65ed conf: restructure of the conf mechanism
-6ff61b8 initscript: add 'pre start eval' hook
-15e9837 cosd: keep cores in src dir
-da51835 mkcephfs: no need for cluster.conf on cosd --mkfs_for_osd
-20b5620 monclient: check for monmap_file _first_
-9472dfe msgr: use daemon() to daemonize
-deb2292 cosd: use absolute paths
-2ae69e6 monclient: clean up
-2dacba8 initscripts: fix some conf vs clusterconf problem
-894eb66 osd: be more verbose about startup failures
-c2c8f88 man: fix makefile
-634bdd3 config: print warning on daemon startup
-3b5b27d debian: don't include dupstore
-8409282 man: mount.ceph man page
-a14c3c9 man: mkmonfs, monmaptool, ceph
-8929cf9 man: cconf
-2764df2 man: crushtool, osdmaptool
-3214a01 man: csyn, crun man pages
-ebd9a94 man: add cfuse man page
-cdc34bc mkcephfs: fix typo
-869b544 debian: add man pages so far
-12a1813 conf: add --show-conf,-S option that dumps conf and exits
-ef986dc man: document -m monaddr
-fc84637 config: -c foo or --conf=foo; -C bar or --cluster-conf=bar
-27b0546 kclient: add mon enries for sysfs
-9b7c9b0 usage
-5de6ad8 man: more man pages
-ac07483 cmds: remove unused --standby arg, rename --standby_replay_for to --shadow
-91ce181 config: default to -d for server daemons; -D/--nodaemon for foreground operation
-a4582b4 cosd: clean up startup options
-160e00f man: mkcephfs, cosd man pages
-3ef9395 debian: fix lintian errors (except missing man pages)
-f3786fe initscript: LSB block; add reload and force-reload
-f3c4a24 initscript: pre/post start/stop/forcestop hooks
-4c62970 config: allow chdir to arbitrary dir on daemonize (not just /)
-d594f91 mkcephfs: take compiled 'crush map' or 'crush map src' from cluster.conf
-33a9a21 crushtool: add --build command
-e587771 remove user error induced asserts
-6ea23d7 initscript: fix btrfs path default to osd data
-4b60f10 kclient: add osdc data to sysfs
-c353d14 bump version to v0.7.1 for unstable branch
-c46e1b3 (tag: v0.7) mkcephfs: btrfsctl -a between mkfs and mount
-3260c75 kclient: patch series updates
-f5a3d61 kclient: fix /sys/fs/ceph/mdsmap
-e2afd17 kclient: sysfs whitespace cleanup
-cbd43e3 kclient: fix patch series
-c057c834 osdmap: use generic crush_build_bucket
-f05b1be kclient: fix osdmap decoding of straw buckets
-a098a3f kclient: sysfs, free path after build_path
-c90746a kclient: sysfs cleanup
-2c7a38f kclient: sysfs, add mds name and op of current requests
-207403a kclient: simplify osd timeouts
-0422395 cosd: fewer osds, with big btrfs devices
-180f416 initscripts: allow vars with spaces
-04ca68e osdmap: build default crush maps out of mostly straw buckets
-b734092 confutils: make max line very large
-927926e kclient: add sysfs directory per mds request
-626d1db filepath: always prepend ino if it's nonzero
-7966f98 client: fix request paths
-04d6926 kclient: fix up replay after mds recovery
-cd41295 mds: incorporate reconnect cap info after requests replay if ino originally missing
-b88f450 mds: include path base ino in client reconnect paths
-b857a03 filepath: no more leading / weirdness
-17d716a kclient: drop unused redirty code from set_page_dirty
-5f397ce filestore: lower min_sync_interval
-1a33f6c kclient: some bookkeeper fixes
-35bb1b9 kclient: fix bookkeeper ifdef
-8148cb6 kclient: patch series descriptions, updates
-10397b6 kclient: docs
-9c4e9ee kclient: rename ceph_tools -> bookkeeper
-f793c7f kclient: some caps.c cleanup
-bc1e7ea mon: tolerate stray victory message (restart the election)
-858df3f kclient: BUG instead of WARN on wanted item on rdcaps list
-3e31202 kclient: cosmetic
-40cb55a kclient: wait for requests to be safe before tearing down dcache
-3af0372 kclient: don't fall over on !dirty page in invalidatepage
-a4f01bb kclient: some documentation
-c201148 kclient: fix osd timeout handling
-ec1f5d5 kclient: more sanity checks in set_page_dirty
-ffce699 kclient: only remember leases on regular dentries
-61e6665 kclient: fix snap creation/deletion, memory leak
-ff52f0a kclient: fix snap_realm leak
-82ffc7a kclient: revise osd client timeout mechanism
-4c5369d kclient: simplify invalidatepage; strengthen assertions
-867aa99 kclient: writepages cleanup
-9cd5fa4 synclient: optionally do a sync on object writes; wait for sync, not ack
-bdc527e filestore: enforce min and max sync interval
-48a53ad kclient: dosync in writepages if sync_mode is WB_SYNC_ALL
-e9ea5fe kclient: fix readpages zeroing bug
-0a9ed85 kclient: return 0 from readpage on success
-e6726b2 kclient: addr debug, cleanup
-69e4f19 kclient: fix readpages zeroing
-5b52d03 kclient: reschedule timeout for timeout length if remaining is zero
-24df3cf kclient: merge conflict
-5251f2e kclient: sparse cleanup
-70d7a96 kclient: small cleanup
-d2f189a kclient: fix readpages
-9c79168 kclient: use helper to clearly define which caps belond on rdcaps
-9af3b9c kclient: adjust debug output
-30394f1 kclient: be more careful about putting cap on rdcaps in ceph_add_cap()
-e9c9523 kclient: some cleanup
-6d31eca kclient: do not drop rdcaps that are dirty or flushing
-f56c056 kclient: remove unused code
-ee63801 kclient: user zero_user_segment helper
-0f9a8f0 kclient: avoid zero_user_segment on old kernels
-d4f98e9 kclient: fix __read_mostly attributes
-0c68b4f kclient: zero trailing pages in readpage(s) on short read or ENOENT
-a418ff1 kclient: mark debug vars __read_mostly
-058b9ea initscript: --btrfs flag
-cfb33b7 mds: flush journal on truncate if readers/writers are waiting
-7846f51 kclient: include ceph_ver.h in kernel patch series, package
-1b6450b kclient: remove /sys/fs/ceph when doing cleanup
-2727657 mds: logger typo
-97ec829 cosd: fixes
-7762ea9 mkcephfs: bit more verbose
-4e04c53 configure: remove some silly checks
-98e8d36 makefile: include make_version in dist tarball
-1fa2611 todo
-5e61967 mds: fix logger key id; call validate() for all logtypes
-af87076 config: no more .ceph_monmap; parse cluster.conf for mon addrs
-a273072 todo: cas notes
-6a53bfc mds: small cleanups
-ea10a67 mds: fix file_eval
-e66072f ceph_ver: write log message whenever a new log is opened
-e52e455 ceph_ver: add ceph_ver.h to list of .h files
-ed90742 kclient: write ceph git version when module loads
-6733493 ceph_ver: add unconditional rule
-b931906 ceph_ver: uncomment important line
-c88c4da ceph_ver: show the git sha1 version in the logs
-c2ba9b2 kclient: wakeup wq waiting on caps on write
-0d43747 kclient: some fmode cleanup
-4bab554 kclient: fix fmode ref count buf
-93ef8a3 kclient: wake up i_cap_wq in ceph_add_cap
-e508fb2 kclient: check d_inode before clearing its COMPLETE flag.
-6f48094 mds: fix try_remove_unlinked_dn
-ff2a6f6 kclient: do not return new null dentry from lookup
-fcbbe9a cfuse: fix startup
-4a5dbb7 conf: some cleanup
-b0b5616 conf: some more fixes (again)
-4570354 conf: fix typo
-212cb78 mds: clean up auth_pin nesting code a bit
-ea1962e mkcephfs: take optional crush map on command line
-95bfdd7 conf: lockdep again
-88334c2 conf: fix some other errors
-ad13632 conf: the return of --lockdep, other fixes
-6fdcf74 config: some cleanup
-2f3a19e debian: fix dependencies
-d9f8db2 conf: fix erronous scoping
-0fc4a23 conf: moved options to the preparse section
-3a116a0 conf: added old remarks
-c99ecb9 config: remove 'debug_after' cruft
-a7ee341 conf: removed some more old stuff
-8a61385 conf: remove old stuff
-69b7578 kclient: revamp async truncation
-e518e4a mds: flush log on wrlock_start if lock isn't stable
-fc72a5a mds: flush mdlog on max_size increase
-648349d mds: only issue cap TRUNC if truncating smaller
-97e2071 filestore: more helpful error message with xattrs don't work
-2ac56cc sample.cluster.conf: fix mon path/osd dev option names
-41a5e98 mds: fix truncate bug
-4c1f314 conf: fixed issue with deleted conf options
-13d874f conf: added all the conf options
-b971b9c conf: revised cmd line parsing and conf reading
-5f02f82 kclient: make sure we cleanup in all error paths
-b026ec8 kclient: make statfs() cleanup when interrupted
-911ca61 kclient: remove /proc cruft
-3af9ad4 kclient: remove old client_list cruft
-d4dbed6 Revert "kclient: fix __grab_cache_page #if"
-3e0fd16 vstart: fix conf, use -d on startup, etc.
-96e0f59 debian: restructure packages
-7f26fda todos, changelog
-220b116 kclient: fix __grab_cache_page #if
-f27c792 initscripts: clean out old scripts
-1d0e25a initscripts: rename ceph-daemons init-ceph
-2e2cf34 initscripts: add 'killall' command
-36f224c cosd: rename conf file
-5aa9cc9 initscripts: fix stop_daemon; add 'forcestop' command
-0c17cc4 initscripts: add 'cleanlogs' and 'cleanalllogs' options
-67bf2bf initscripts: ensure cluster.conf exists
-0b34138 debian: missing files
-d3c6a61 config: remove osd_rep
-82751f5 config: remove obsolete ms_* fields
-1aab459 config: remove some debug cruft
-861155b makefile: cleanup, some sample conf files
-bb32760 config: rename logger/dout config fields to make more sense
-3433741 makefile: put sample conf files in /etc/ceph
-5047e6b initial sample.ceph.conf (incomplete)
-a0cbcc0 fix pid file removal
-e16d2fd initscript: include all monitor addrs on command line
-28d5d51 initscripts: make mkcephfs and initscript behave on cosd*
-aed7cdc config: parse 'monmap file' from conf files
-0060269 cosd: don't screw up stdout with NULL string
-b7a42ba config: chdir_root on by default
-19c0c1a config: use daemon() call; rename use_abspath to chdir_root
-7b3d2c0 config: fix conf metaoption parsing
-6745adf ceph-daemons: some more fixes
-f34dafd ceph-daemons: some more fixes
-dcec5b8 rename sample.startup.conf
-785d67e more cleanup
-46fd66c makefile: cleanup
-d73e021 ceph-daemons: generate list of items to stop/start in ceph_common.sh
-ad86cf6 ceph-daemons: simplify crun/valgrind logic
-c882031 ceph-daemons: fixed merge
-1e4d4d2 ceph-daemons: minor changes
-6e31ae0 ceph-daemons: 'stop' works
-c2e1fa5 ceph-daemons: works partially
-4fc8291 vstart: some changes
-295fc87 vstart: no more crun
-2b97810 mkcephfs
-b13663e debian: update packages
-268bb2c makefile, todo
-528dd9b config: specify --monmap_file on command line
-1819950 client: fix warning
-e3312b5 ceph-daemon: some comments
-06572bb ceph-daemons: no norestart any more
-ab773a7 ceph-daemons: read config for different entities
-1a88397 crun: replace $* with "$@"
-3e78cb8 ceph-daemons: replace $* with "$@"
-1aed41c crun: simplify to just restart if coredump
-c4eef37 cephd: added "osd journal" option
-fb330f6 ceph-daemons: add --allhosts option
-84a1ae3 sample startup.conf
-357e8bb ceph-daemons: restructured (but incomplete) init.d script
-c2070b4 config: optionally maintain a pid file
-6b5c13b cconf: ability to list section names
-250f42d ceph_init: assume CEPH_BIN is `dirname ceph_init`
-1490b7f ceph_init: default to /etc/ceph/startup.conf
-ab14b5a debian: Build-depends libedit-dev
-238400d logger: validate log type; remove unused mds.logger2
-e2389c5 debug: ensure a SIGHUP reopens log reasonably soon
-843c598 logger: fix again
-48c61ba config: only build an abspath if it's not already absolute
-40459d5 config: default to etc/ceph/ceph.conf
-37f77ce debian: include var/log/ceph in package
-4d2c546 logger: cleanup; make feeble attempt to create log dir
-8667c26 config: prefix default paths with install prefix
-40bb418 config: verify argument exists before dereferencing args[++i]
-78f8168 config: use sane default paths for logs; use .conf for *start.sh
-48533a5 logger: fixes
-61dd86d logger: identify fields with int constants instead of strings
-9156a56 config: remove ms_hosts
-849d3f4 logger: configurable output dir
-131a2d8 osd: strip out hard-coded osd device paths
-6ff39ba kclient: zero_user_segments doesn't appear until 2.6.25
-13c67f6 kclient: more sysfs cleanup, bug fixes
-180a3d9 kclient: fix kbuild patch, import script
-a21385a kclient: move parens
-95675f5 kclient: changes for 2.6.29
-dc6cdbe kclient: avoid simple_prepare_write()
-0d23c09 kclient: separate Kconfig
-a69f197 todos
-e9f470e kclient: add module author
-6adae97 kclient: dup kobj_sysfs_ops from kobject.c
-662afd5 journal: initiate full commit when journal hits 50% full
-9643b96 filestore: don't initiate sync on _start_sync if there's a journal
-34ccad5 osd: don't clobber log output stream
-96b3f36 mon: only do big sync if we're flushing lots of states
-dd7ff9d kclient: include sysfs (and not proc) in kernel client patchset
-f5f3688 osd: take journal on command line
-c23235e kclient: remove /proc/fs/ceph
-fb0183d kclient: add other maps to sysfs
-783215b kclient: add debug levels, mask to /sys/fs/ceph
-1a0b99d kclient: some sysfs cleanup
-290b7d3 dstop: remove cosd hostname prefix
-34db3a1 todos
-7d1af70 dstart: remove cosd hostname prefix
-909781d kclient: consider issued AND implemented AND dirty when updating inode
-7c60c04 mds: flush cap update if affected lock is unstable
-df453b0 debian: include new binaries, scripts in ceph-common
-f825647 Makefile: mount.ceph goes in usr/sbin
-0324487 debian: pull version from configure.ac
-e75b4fa debian: specify arch on command line
-e235eda makefile: add missing files for kernel module
-a628262 debian: script to build and upload debs to repo
-bc39a2d make unstable v0.7
-a8dbeb0 common: uninit var
-b82705a debian: cleanup, changelog fix
-31fa2f8 kclient: typo
-a5d747a mds: xlock filelock during truncate
-04cb3f7 mds: look at active (not projected) inode when issuing truncation
-39cd8b0 mds: only do truncation process when file size goes down
-4c3a7aa mds: limit propagation of full auth_pin count up hierarchy
-8be929d kclient: don't remove from clients list if we're not on it
-151d5f5 Makefile: link libcommon, lockdep last
-940a78f objecter: shouldn't swap bufferlist buffers
-e1fd643 common: remove warning
-b5860ee common: virtual destructor for class Timer
-52b90a4 todo
-740da72 SafeTimer: getting rid of global timer
-06e3961 kclient: only unregister after both acks
-440a84f mds: reverse rename argument order
-d083f8e client: reverse rename argument order
-e92f0a6 kclient: add missing r_wait list_head init
-15b2d60 kclient: initialize request list_heads
-76ec1b6 kclient: cast path
-b732c0d kclient: unregister mds requests on unsafe reply
-d7cb96b kclient: clean up some mdsc locking
-919b214 kclient: fix path memory leak
-c3ac056 kclient: async mds requestion completion callbacks
-0990d83 kclient: fix fh_to_dentry; move build_path to mds_client.c
-3dc43aa kclient: mds requests in terms of dentries, not paths
-376ac88 kclient: async mds requests
-77a5f24 kclient: remove extra log output
-0c46645 kclient: sync writeout when not pdflush
-2d17b3a mds: only flush journal when we need to
-0f05de9 kclient: set 'sync' flag for fsync
-94c5031 script: fix check_osd_request_latency
-cec662c script: check_osd_request_latency
-ffc756e conf: can turn on debug logs in startup.conf
-6a71ef7 conf: add debug_ms option
-dbfa9c3 mds: don't rdlock stat fields that client has EXCL cap for
-4e88a94 add ceph_init to distribution
-d8ac8e5 kclient: backport changes to kernel 2.6.25
-f62e4db kclient: fix mdsc->snap_empty cleanup
-f0a2967 kclient: remove client from client list before destorying
-c5ed89a kclient: fix proc cleanup
-c98bb11 assert: some more assert_warn
-af812a0 cosd: change some assert to assert_warn and clean exit
-5dc7bea kclient: show some meaningful info in client proc entry
-172afed kclient: per client proc data file
-2b82ea4 kclient: added a proc function to read client data
-9ddbf9d kclient: proc subdir for each ceph client
-3b2cffd kclient: keep global list of ceph clients
-b1203c2 assert: warn on assertion if requested for current thread
-c511d68 added a common initialization function
-3ce47d0 tls: addeed a thread local storage infrastructure (cherry picked from commit 1b6b128f4e2aaab016575f48f2ec50d4abe002c9)
-62ee408 osd: fix log level
-7e10dfa mds: make sure we eval_stray when inode was replicated
-db46dad mds: remove traces of CDir::committed_version_equivalent
-306e556 kclient: release CAP_LINK_RDCACHE before unlink
-83c19c8 vstart: fix call to stop.sh
-d37775d todos
-95f63ea osd: print ops args correctly
-0b75ee6 mds: use generic helper when removing a cap
-179f7a8 mds: fix try_remove_unlinked_dn
-569c5d2 mds: fix purge of 0-length inode
-7b118b3 mds: remove unused inode purge fields
-756a4c1 ceph_init: fix initalization
-bfb6cda ceph_init: added missing file
-c6ff2e6 ceph_init: initial version
-7ed99ea crun: restart only processes that should have dumped core
-fe1a365 todo
-81bf6ef osd: put full original reqid in osd_op_reply
-4968553 mds: typos
-1df22a5 kclient: don't retain caps if inode is closed and nlink == 0
-57d8ba9 mds: rip out old purge_inode crap
-0d8ba65 mds: simplify purge_stray
-e32e434 mds: clean up opent a bit
-93e587e mds: drop _do_open helper
-f49d8ac mds: open O_TRUNC implemented.. but not used by kclient :/
-1d15f8f mds: implement async truncate (trimtrunc); fix log segment trim vs purge bug
-0f11a1a osd: fix truncate ops; add TRIMTRUNC
-e0dcc7c mds: truncate changes.  not complete.
-d8d2886 kclient: fix and clean up osd request generation
-1e17153 kclient: include old size in truncate
-3518479 kclient: truncate bits
-a7397d8 kclient: include truncate osd_ops when needed
-116e0fb osd: MASKTRUNC and SETTRUNC osd ops
-72fc7a2 mds: add truncate_size
-703d89c renamed common.sh to ceph_common.sh
-b4f70d2 rename stop.sh to ceph_stop, added to Makefile.am
-c7a6798 cephd: update Makefile.am
-d463db6 mon: only propose new osdmap once at end of mdsmonitor tick()
-cedaea2 ceph.sh renamed to cephd
-40504d5 msgr: fix WAIT connection race handling
-807a90d ceph.sh: some changes, fixes
-dba09e8 ceph.sh: some fixes
-89f9607 ceph.sh: try to locate cconf
-4651403 ceph.sh: enable script
-f121086 ceph.sh: able to specify start/stop/restart, specific modules
-a6bb1d5 ceph.sh: add missing file
-d1cd775 ceph.sh: can specify remote modules
-48d9c94 ceph.sh: startup script that uses conf file
-400e04e osd: rev internal osd protocol
-cbe1eef osd: push wrlocks into object_info_t
-6462555 osd: remove inc_lock
-478e51a osd: combine all internal object state into single '_' object_info_t xattr
-c9554fc osd: replace version attr with oi (object_info_t) (disk format change)
-ab34751 cconf: able to specify multiple sections
-cd2669f dstart: --ramjournal option
-2c0422b scripts: osd latency check script
-a61c0bf kclient: start writeback without blocking
-d68f60c cconf: set default conf filename
-a34c82d cconf: added utility to read configuration
-ac22c78 mds: fix open file rejounal in try_to_expire
-dbeb6c9 kclient: fix nocrc behavior
-20ec768 mds: shorten mds beacon grace to 15 seconds
-6258c64 todo
-309e595 vstart: fix btrfs test
-ee114f9 msgr: make nocrc only apply to data payload; and set flag if no crc
-0545b4d todo
-83f5fec mon: clean mon monmap cons
-c103163 dstart: no preload gprof helper
-3297553 config: avoid wonky times in g_config
-1a837aa mon: disable pgmap_dumps
-40d56a9 mds: optimize EMetaBlob::fullbit, remotebit, nullbit encoding
-abe6de3 buffer: optimize append()
-8a053aa kclient: fix osd timeout merge error
-bff9432 dstart: less debug output
-c24b160 osd: throttle sub_ops too
-5dfa423 osd: adjust pending_ops when requeuing opq
-fc806ef mds: show which segment trimming is blocked on
-5429016 osd: locally requeue on repeer if still primary
-08a1898 kclient: fix RETRY_SESSION seq value
-63f2754 kclient: only send one ping per laggy osd
-43b8621 mds: include xattr updates in cap messages; accept xattr cap updates
-5abd410 mds: adjust some debug levels
-b1939af todo
-39732f7 osd: drop osd_lock while pausing/requeueing opq
-36bd20b osd: fix merge_old_entry assertion
-ee916bd osd: fix up_thru_pending conditional
-b66ffdb osd: requeue instead of draining op_queue on map update
-59d6e18 osd: keep peer_info.last_{update,complete} up to date in case we get later stray
-63f04bf osd: bit more verbose in oldest_update calculation
-f37d4b4 osd: adjust generate_backlog assertions
-da981f5 mds: clean up EUpdate output
-c5f55f2 mds: do not trim log during recovery
-898e90c osd: only check replicas in recover_replicas
-69d2fad osd: clean up activate, peer recovery debug output
-85b9900 messenger: added a no-crc option
-814e9c7 osd: fix pg log trimming
-68d19a3 paxos: tolerate commits for older states
-654e907 osd: fix repop cleanup in on_change, _shutdown
-2136755 ceph: warn when we get message with wrong fsid
-bdf405c todos
-9a63cb1 paxos: ignore LAST message if pn is old
-6e2728e mds: increase ino prealloc limit to 1000
-4df3be7 osd: remove RepGather::put() debug print
-fd55dc6 crush: remote list builder printf
-d3591be dstart: mount btrfs with new options
-cfdd83d kclient: statfs_request_tree alloc context is NOFS, not ATOMIC
-59369fb config: added include, misc stuff
-c4760af kclient: do sync writepages if FILE_WRBUFFER is being revoked
-26cac11 mds: fix max_size update
-311d3a4 kclient: initiate a sync when doing writepages for O_SYNC writers
-63c2e9e mds: set straydn.first properly for rename overwrite
-8239bed mds: only update cap wanted if seq matches
-37348a1 kclient: fix osd writes
-a4a1d54 mds: take straydn.first form inode.first during unlink
-9664adf kclient: resend osd ops when pg membership changes
-46696ad config: read configuration file before parsing command line
-a92400c mount.ceph: fix segfault when port is not specified
-b929f12 confutils: complete config.cc configuration and adjustments
-331d1c4 confutils: cleanup, bug fixes
-44550ae confutils: can flush config, preliminary config.cc integration
-0ba80f8 confutils: some cleanup
-78d12c82 confutils: encoding/decoding using templates
-68a1445 confutils: going forward
-1acf016 confutils: adding missing file
-1481960 confutils: some more
-9a103e5 confutils: some more changes
-dbc6141 config: some more changes
-18fdf6e confutils: still not usable
-0af200d config: remove some old cruft
-f49f78d osd: reset peering, in-flight repops on every pg change
-4b224b9 mds: eval_cap_gather in handle_client_caps even if no update
-2564622 script: find high latency requests in mds log
-4c75e0a mds: fix xattr projection
-1c2d624 mds: drop rdlocks _after_ journaling; use new journal_and_reply helper
-0c6ffaa mds: make cdentry debug print nicer
-004898a mds: unique (per mds) cap_id
-62e5b80 mds: set straydn.first correctly during unlink
-1094344 mds: make straydn.first match the inode
-7a0abc3 uclient: flush/release buffered data on umount
-74f2a9c uclient: update caps code to match kclient logic
-33f4443 kclient: some caps cleanup
-0017712 kclient: improve snap locking scheme
-a4c752d (tag: v0.6) v0.6
-00577b5 kclient: rename lookup_mds_session get_mds_session
-b078856 kclient: realm create does not take a ref count
-70365be kclient: split get_snap_realm to lookup and create
-c784a54 objectcacher: fix object trimming
-26cec48 mds: count in-flight updates per cap, not release attempts.  do not expire if updating.
-f62bb44 mds: drop rdlocks after early reply is sent
-ac59f6d mds: properly close session when inodes are still being preallocated
-773bc5f kclient: set i_op for special inodes
-96a16b6 todos
-9ccd599 kclient: retain comments
-3b1d6b5 kclient: zero out *implemented in __ceph_caps_issued()
-ca29a2a kclient: don't retain unwanted RD cap
-b76be04 mds: take srci lock during rename to ensure ctime change propagates
-14a1ebf mds: expose projected fields via caps if locks permit
-878b649 kclient: shouldn't lookup_open with special inode
-490d04a kclient: considered _held_ caps when deciding what to ignore in fill_inode
-b9cb866 kclient: don't require all inode fields when just doing a lookup
-6c6f75d mds: check against client in rdlock_try
-413d5e6 kclient: fix cap writeback vs revocation
-5ac7642 mds: fix rmdir ENOTEMPTY checks
-764b0b3 mon: include fsid in MMonObserveNotify
-468fbbe mds: fix forward truncation
-cd058c9 vstart: -l | --localhost to use 127.0.0.1
-96dbed7 bash, not sh
-a4ab377 bash, not sh
-6ffdd43 mds: carry RDCACHE|WRBUFFER through xlock.
-f4644ac kclient: fix fill_file_bits logic
-b8bb36e mds: include projected ctime if _any_ other fields are projected
-96080a3 kclient: fix snap_rwsem link on non-existent cap release
-88e3e31 kclient: some cleanup
-997e998 kclient: fix gid setattr
-c952110 mds: also verify in rename() that mds reintegrate/merge is valid
-6ee8770 mds: do not reintegrate stray if target dentry is projected
-58f166c mds: look at issued(), not pending(), when putting cap on the rdcaps list
-039bbc0 mds: eval_cap_gather when trimming rdcaps
-ee50c98 mds: look at inode locks to determine whether to expose stable or projected inode fields
-7bfc61c kclient: some more sparse fixes
-241d02c mds: fix uninitialized value in ceph_inode_holds_cap()
-3aefbc0 mds: fix inode version projected on open O_CREAT, too
-4f3a288 mds: set .inode in projected linkages; add dentry to remote_parents only when active
-9f33c84 mds: fix link() dn linkage projection
-cd31824 kclient: some sparse cleanups
-4a4e0a4 mds: only set max_size on open+O_CREAT if file opened for writing
-bcdc1f4 mds: optionally pass a specific linkage for journal_cow_dentry to use
-461cb1a mds: fix fast create + rm failure
-7eeca0b mds: make xlock stable
-962e1ab kclient: set dentry d_time when doing local ENOENT
-9a2c7e9 mds: get_linkage() should return projected if xlocked by self
-b025d4f mds: touch using projected parents too
-811f5fc mds: journal using projected parent
-6cf44cd kclient: one more update_parent fix
-dd729d1 kclient: don't mark root complete (empty); debug complete flag
-ee7547d uclient: small bug fix
-1c09fe5 journaler: don't request ACKs if in safe mode; do safe mode by default (since mds does too)
-3045691 kclient: refine dir complete/readdir handling
-a0d9aa8 mds: kill FileLock
-e4c8ef0 mds: redo choose_loner/drop_loner
-547b4e1 mds: merge *_sync() methods
-0a20684 mds: more lock refactoring.  merge *_lock() methods.
-7a9a689 mds: ENOENT on null dentry in unlink()
-5a29c9f mds: add lock->xlock state
-49fea8a mds: simplify loner_cap update
-d467cbf mds: generic locking helpers, step 1
-3eabcec mds: rewrite SimpleLock using generic state specifications; new xlock semantics
-31bc1b0 lease: difrentiate lease release cases (revoke, preemptive)
-3a1b22c kclient: clear dir complete/readdir bits when appropriate
-09b1666 mds: remove some uninitialized cases
-4d3553a mds: disable empty directory fastpath check
-4f70eb8 mds: fix unlink
-196a620 mds: path_traverse cleanup
-813c963 mds: always traverse projected hierarchy; xlocks will handle client views
-7bd9588 mds: force explicit current vs projected dentry linkage in API
-8128eba objectcacher: don't trim uncommitted objects
-82b3bd5 mds: use projected dentry linkages in rename
-05f6554 mds: fix simplelock cap check
-e73f735 mds: a few comments
-3f4bb5f mds: fix up EXCL state some.  fix set_trace_dist use of projected parent
-cbbe543 mds: some cleanup
-a5bc3f8 mds: project dentry linkage
-447a3e0 kclient: fix lock leak in mdsc_handle_map
-79dea4b mds: verify is_stable() before calling simple_eval()
-d7ecf25 mds: end of traverse may be indoe or projected_inode
-698400c kclient: use CEPH_INO_ROOT constant
-b2d23ad mds: include projected dn+inode to client if xlock_done
-b0f2842 mds: fix LOCK_LOCK -> LOCK_LOCK_SYNC issue_lease transition logic
-5e9be53 mds: allow FileLock wrlock when client holding FILE_EXCL
-c7c72b4 mds: issue cap on mkdir; set authlock to EXCL on open O_CREAT.
-ddb07d9 mds: fix encode_inode caps issue logic
-94f28a9 mds: loner if only client with cap on a dir
-b05bed3 kclient: only release dir RDCACHE if we're not holding EXCL
-ea4f54b kclient: hold onto dir EXCL cap
-a3497b1 kclient: track COMPLETE flag on directories with RDCACHE; lookup ENOENT locally when possible
-f889c15 mds: make Server use CDentry accessors
-9483c51 kclient: handle case in which splice_dentry fails in fill_trace
-7c7d228 kclient: avoid starvation when fsync on dir
-8f1801b mds: increase preallocated ino
-1ac0ed0 mds: allow clients to traverse dentries they xlock.
-95d65bc mds: fix CInode::adjust_nested_auth_pin()
-9a6320c kclient: add missing parens in kick_requests
-5df141c uclient: lease seq #'s; clean out inode leases
-52a9129 kclient: use lease seq #
-bb95b37 mds: introduce lease seq #
-bfba421 osd: fix ager missing open() arg
-34d429e osdmaptool: fix --test-map-pg
-cd345c1 todo
-6a9f8ce mds: do rename, unlink early replies; set_xlock_done as appropriate
-885b0c2 mds: early_reply for link, unlink, rename.
-c50f9eb mds: by default, always wait for journal safe
-d90d186 mds: wait for journal safe when doing ino allocations
-0bc0a42 kclient: resend unsafe requests just before to MClientReconnect
-95fa0a1 kclient: list unsafe requests in the MDS session
-ceda178 kclient: break out __prepare_send_request helper
-6b88cca kclient: separate flag for got_safe and got_unsafe
-ce45c26 kclient: set ino in request if we got an early reply
-68acb5d kclient: missing spin_unlock
-dfcac4b kclient: replace radix tree with list for req dir listener
-c0decc1 kclient: listener tree should use GFP_ATOMIC
-e2dc885 kclient: remove extra mutex_unlock
-5ed3cbc start.sh: add $CEPH_BIN
-8d24be2 kclient: fix fsync for directories
-fc1ba61 kclient: handle safe reply, sync dir waits for safe reply
-24860c9 mds: can_xlock_soon() should include LOCK_LOCK
-fae7a97 mds: for wrlock when updating max_size in issue_caps()
-72a231f mds: drop dup code
-f70e754 kclient: fix add_cap cap update
-0f5688a uclient: handle xattr updates
-c7fa14d kclient: only update xattr blob when defined and newer (caps|reply)
-82c970f mds: send xattrs down to client efficiently
-a92e29f move to generic ceph_seq_t 32-bit sequence number and comparator
-f2d48e4 kclient: make fill_trace look for RDCACHE cap on directory
-7b581b8 stop.sh: stop valgrind procs too
-cdc74f2 mds: fix capability off-by-one bug
-3bdc45a mds: safely allow client to rdlock|lease dentries it xlocked
-e8cc0e5 mds: fix SimpleLock release evals
-d84552c todos
-99a0911 mds: use projected parent when updating max_size
-9ad5577 mds: only check max_size if inode is a file
-4e34247 mon: fix uninitialized variable
-40570f1 vstart: run cmon through crun, valgrind
-db723ae mds: set issue_stamp on cap reconnect
-61ab9e9 kclient: exclude expireable caps from reconnect
-1d724db mds: fix sessionmap->version value during EMetaBlob replay
-06087d9 mds: fix EMetaBlob initialization
-f4b4f30 mds: only file_eval on xlock_finish if stable
-83d6f65 mds: only file_eval on xlock_finish if stable
-0089e1a todos
-4fc9283 kclient: don't pin dentry with lease
-459749d kclient: separate mds session lookup from ref get
-cc0e803 vstart: fix ip determination
-d644e34 mds: disable inode leases
-8bed365 mds: no inode lease in lssnap
-8a173dd kclient: fix cap release logic a bit
-638a76a kclient: fix request ref count leak from duplicate replies
-babfd42 mds: expire rdcaps
-31f7435 kclient: trim expired rdcaps; ignored issued but timed out caps
-f123d3a kclient: fix buffer overrun in parse_reply_info_trace()
-92ae5e2 mds: issue AUTH_EXCL if also issuing FILE_EXCL
-9a8d935 mds: update cap notes
-bdf8818 kclient: implement ceph_release_caps
-a186c3b mds: set ttl_ms in cap IMPORT message
-8a20fbd kclient: keep readonly caps on per-session lru
-ee6debb mds: keep caps in lru; put ttl in cap issue to clients
-8185635 kclient: local chmod/chown if holding CEPH_CAP_AUTH_EXCL
-8713b4b client: send release anytime we get a caps message and have no inode or cap
-0e559c7 mds: always issue cap in inodestat
-47f2385 mds: don't let release race with any caps
-314f065 mds: simplify capability issued tracking
-aef5170 uclient: fix likes bits
-9b2af42 kclient: use new caps protocol
-b0c6a3a mds: fix stat mask
-1cf4b71 mds: only send clientcaps if we need to revoke, or we can issue explicitly wanted caps
-c1d9372 mds: fix cap release seq check
-12f429d uclient: set dirty bits in cap_snap
-4a499ee mds: bunch of cap protocol changes, and user client adjustments.
-437226e kclient: fix snap realm update on reply
-7ba06ac mds: fix set_trace_dist snaprealm problem on unlink
-886091e kclient: ref count cap_snap to avoid unnecessarily copying into temp variables
-be1d556 kclient: take fmode ref atomically while adding cap
-94e3abfe client: do not update when already holding EXCL cap
-fb882d3 kclient: caps basically working
-f920808 kclient: use ceph_caps_release instead of dropping inode lease
-f17fabe kclient: switch from inode leases to new caps
-a46dbfd notes
-6a71cda uclient: adjust cap release logic...
-2dfa4db mds: only _do_cap_update if client held ANY_WR caps
-8276576 mds: issue RDCACHE caps to client when possible.  add cap to do so if inode auth.
-01f28e5 uclient: sorta working
-dad9bf4 mds: fix scatterlock print
-3c571d4 mds: put a cap in each inode stat in trace; simplify snaprealm trace encoding
-e3e3f2d mds: cap comments
-b4561ba mds: rewrite CEPH_STAT_MASK_* as CEPH_STAT_CAP_* (cap masks)
-6ff545c mds: cap writeback authlock fields as well as filelock fields
-9828060 mds: don't rdlock and xlock at the same time
-7f2d406 mds: check for xlock in simple_sync()
-d5130ab mds: fix lock print methods
-7f46121 mds: share caps across multiple lock types.
-4087a07 todo
-7ad7e04 mds: clean up lock print methods
-142e2f6 objecter: fix ack vs safe behavior
-0faa47e journaler: add --journaler_safe hack support back
-40277f6 objecter: fix ack vs safe behavior
-9a3988e kclient: setattr on inode (not path) if holding WR cap
-4377dba mds: fix xattr projection
-a77b0cb kclient: update for ceph_fsid_t
-d359afd vstart.sh: disable lockdep in default
-f46c771 mds todos
-3b253bd mds: avoid recursion on log trim
-99fc60e mds: add wrlock to simplelock; wrlock authlock on chmod, chown
-3d93ca0 mds: link on commit in openc; make find_snaprealm() follow projected_parent for unlinked inode
-836513e mon: make 'osd setmap' take epoch, to avoid executing multiple times
-6f9132e ceph: increase command timeout
-3ed25a3 mds: flush log only when we need to
-89900f3 mds: add --mds_early_reply option
-270a12a mds: only include trace in first reply
-8380244 mds: rewrite, clean up mds open+O_CREAT; issue dn lease to xlocker; many other server cleanups
-8ba7f14 change ceph_fsid
-74cf3e7 mds: early_reply on open, mknod, symlink, mkdir when possible
-1419f00 os: start_sync osd operation
-3ed4b78 osd: use .version in eversion_t to determine divergence
-b4d9cb5 osd: cleanup
-85327b7 osd: clear entire pushing map on_change()
-960ab70 osd: fix read_log version attr check
-a6022be osd: only request replica backlogs one at a time when searching for lost objects
-6d41141 osd: cancel_generate_backlog on activate
-1144b55 mon: fix mds cluster expansion
-ff2ac52 mount.ceph: fix warnings, add to Makefile.am
-701ae00 mds: fix inotable project, sessionmap projection, ino (pre)allocation.
-c59650c mds: optional ino for mknod/mkdir/open requests
-0d68565 mds: preallocate inos for each client session
-5b19c4a mds: do early replies for basic inode update operations
-d11f5f1 mds: early_reply infrastructure
-e5ba5ed mds: fix null_okay traverse logic
-968cfc8 mds: add safe flag to mds reply
-bbe70a1 mds: process caps if freezing and unstable lock
-bed844f mds: misc filelock fixes
-16ed267 mds: auth_pin rdlocks too
-04cf78c kclient: make mdsmap_decode print nicer info
-1f06b73 kclient: update num_fwd in client requests
-ac9d80b kclient: allow mds to force open a client session
-55e6b07 mds: don't bump to sync if dir and subtree root
-0332cd0 mds: fix file_wrlock_start waiting
-a902349 mds: filelock typo in can_rdlock
-402c186 mds: cleanup
-edab8a7 vstart: 1 mds
-fd2b7c7 mds: check_inode_max_size only change filelock state if needed
-557e7d9 kclient: ICONTENT -> IFILE
-3393809 vstart: start 3 mdss
-89b8283 mds: basic filelock fixes
-624ed85 mon: add multiple mds's at once
-fca6c27 mds: kill the dirlock
-09c0288 mds: make filelock a scatterlock child; move wrlock into simplelock
-fe744dc mds: fix mixed_sync state; send replica mixed state to primary as needed
-b9ce3da mds: message include cleanup
-247e6d9 mds: fix up filelock states
-397938f mds: new FileLock lock->sync state
-1df9248 mds: rename gather lock states
-2050e49 mds: include max mds in mdsmap summary
-1163bcd mds: fix standby_replay on startup
-c8f31fb remove uninitialized warnings
-f21f172 osd: gracefully exit when create_object_store() returns NULL
-5852262 osd: inc_lock attr is optional
-63f63bb osd: update pg degraded stats only when active
-b873c17 osd: initialize generate_backlog_epoch
-35d5c74 osd: clear_prior when activating
-21bf68c osd: clear backlog flag when done
-199d032 osd: only update degraded object stats after peering
-af9559e osd: clear STATE_PEERING during replay
-e194bc9 osd: safely encode all other attributes
-0db8c4c osd: properly encode ondisklog attr
-ee4b961 buffer: optionally preallocate some append_buffer
-9f1c7b1 make time format easier to read
-41dfd40 ceph: terminate dumped output
-1a94147 mon: tell stdout where the monmap came from
-705496f dstart: cm.txt update (for 3x)
-7059183 ceph: fix observe renewal; ack by paxos
-901e582 todo
-022d801 verify-mds-journal: periodically verify mds replay; stop if error
-75421fc mds: only standby-replay when explicitly requested on startup.
-6bf3f40 mds: basic standby-replay hack
-81be48b mon: replace laggy standby-replay nodes too
-7b695ec mon: mark extra standby mds's as standby-replay
-c941da1 osd: enable queue_generate_backlog on pg query
-450cfee mds: fix mdsmap dump
-ba140b5 msgr: stop accepter on socket error
-82b0bc3 mds: restructure mds map, clean up mdsmon
-6fb760b mon: clean up mdsmon a bit; do takeovers from tick(), not _committed()
-8030217 mon: blacklist failed mds
-c04ef1a mon: expire old blacklist items (osdmap change)
-117fc9d osd: clean out acker cruft
-d2d3048 rev protocol, mon disk formats due to mdsmap change
-b3aa3ed mon: mdsmap infrastructure for standby states, up:standby-replay
-17d5ff6 osd: fix pg stat reporting
-dd091b3 osd: do delayed activation after replay via a queue, not timer event
-6d28c86 osd: take osd_lock in generate_backlog before peer()
-e48fc3c mds cleanup
-e1abc7f mds: add logclient
-cff97c1 logclient: adjust link_dispatcher; add unlink_dispatcher
-b917de3 todos
-d0041ee mds: remove follows==0 special cases
-dc0cc83 mds: when recovering size, don't munge up projected->size; use new_size
-415b4bb mds: update rbytes with size on truncate, etc.
-48c3da0 mon: send mdsmap on beacon from mds not in the map
-016cf1e mon: clean up mds failure output
-2b0337f mon: immediately propose after 'osd setmap'
-1a5c8ae update debian, spec files to reflect cmonctl->ceph rename
-6cd31da ceph: allow > and < to redirect command input/output
-483dba8 ceph: fold cobserver into ceph
-1aa9446 todo
-213eae1 mds: mark new directories new in journal; add to new list on replay
-2cd256f cobserver: usage
-8b0bd3e rename cmonctl -> ceph
-c75a099 cobserver: retry if when no response on startup
-3e37543 vstart.sh: can specify mon address
-e1f536d osd: add missing declaration
-5026d0e vstart: debug pg reporting
-b3f831f osd: generate_backlog asynchronously in a work queue; simplify peering a bit
-aab8882 osd: half-finished backlog_wq
-0aecb46 crush: don't recurse to leaf unless item is a bucket
-f0d706e osd: shift generate_backlog out of merge_log
-b48646a osd: for remaining peers, pull either log or backlog, but not both.
-ba89596 osd: comment clean up
-1b773f5 dstart: 3x replication
-c7c3392 osd: simplify peer code a bit
-e42e3d1 osd: simplify master log recreation; fix up Log::copy_after
-ab73378 vstart.sh/stop.sh can start and stop specific modules
-93cc10e dstop: kill crun too
-1c1f564 osd: move max_rep back to 3x
-bcbebfd osd: rewrite proc_replica_log
-d1c7eb7 osd: fix merge_old_entry bug
-e0dbaa7 osd: small peer cleanup
-625e950 todos
-fa8904d cobserver: print all log entries in each state
-5ad877e osd: initialize all MOSDSubOp fields
-ab77f97 mon: fix up MLog constructor
-f0f9512 filestore: fix buffer overruns, mismatched delete[], small buffer
-e3bf21f osd: pad eversion_t and zero remainder
-aed8eba mon: mkfs log msg as error
-b9ffeaf osd: clear out pg_stat_queue on shutdown
-151f201 filestore: sort objects by ino
-7741ea0 workqueue: include types.h
-b842655 dstart.sh fix broken commit
-217103e dstart.sh uses crun instead of -d (for gprof)
-62ca619 osd: don't clear pg_stats_valid on send
-87e8500 todo
-19eb21b osd: small cleanup
-7126fe4 osd: call peer() if we need up_thru to activate
-b300aa6 osd: remove/fix waiting_for_head primary recovery logic
-e26a9c6 mon: observer cleanup
-44b8c2f cmonctl: fix compile error
-f309afd workqueue: drain
-408b498 workqueue: virtual destructor
-183e3aa makefile: missing headers
-c92b8fd osd: cleanup
-642420a workqueue: non-inline worker, control methods; debugging
-b3affe5 mon: fix use after free
-ae18421 osd: use new workqueue in osd for ops
-ec4da94 osd: shared threadpool for multiple work queues
-37ea68e osd: fix uninit value in scrub message
-d77ce28 todos
-c32f67f mon: mark unresponsive mds laggy instead of failed until we can replace it
-2b2fede cobserver: simplify headers
-c79e073 osd: make sure hb peers get marked down
-3da9ffa osd: update_stat during recover_replicas()
-6ed8d8b dstart: --nostop option
-984b07d osd: drive primary recovery via missing map, not log
-aea394d mon: osdmon cleanup
-0590296 dstart: keep old cosd binaries around for a bit
-ac6e86a osd: 'pg repair <pgid>' to repair an inconsistent pg using replicas
-f114b86 osd: don't read file content during _scrub
-3062b7b msgr: be noisier about mark_down calls
-77fa4e6 osd: avoid needless calls to peer(), build_prior()
-27481a4 osd: make prior_set_affected() slightly smarter
-d999ba0 cobserver: cleanups
-36f5813 mon: use 'latest' for latest osd, mds maps
-2e32e87 cobserver: cleanup; print map summaries w/ each new state
-ab8a921 mon: refactor map print_summary/operator<< methods
-202f8cd cobserver: accidentaly removed a line
-4964511 kclient: missing files
-3a168be whitespaces
-426f47a mon: factor ClientMap class out
-d216720 cobserver: utility, observe changes in different maps
-8a5f231 osd: use push() to push clone op
-c0b005f mon: factor our osdmap print, print_summary
-b764b63 mon: factor out mds print, print_summary
-57578b3 mds: stay loner if client has B and no other reason to switch state
-c035a73 osd: missing last_mon_heartbeat declaration
-cc8a4fc msgr: make sure nonce matches too when connecting to peer
-addea2e msgr: print error when message type is unrecognized
-5b550c0 osd: ping mon less frequently when peerless
-815c1e2 mon: typo in pg dump output
-dc38de9 ceph: new default mon port; try to bind to port in known range
-2398219 mon: 'pg map <pgid>' command
-5b74986 mon: 'osd dump' command; refactor sstream->bufferlist code a bit
-a4bae51 osdmap: use print method from osdmaptool
-090e5f8 osd: pause scrub wq async
-f319e52 osd: lock pg before calling on_shutdown
-5289830 osd: fix degraded figure calculation typo
-fe903cc cmonctl: resend command if monitor is not responsive
-8223f52 cmonctl: interactive mode using libedit
-a2203c1 osd: log scrub ok
-c7c8fcf mon: rename out to log, log.type files
-ee75196 mon: notify PaxosService of any paxos state changes
-fa34945 mon: dump full pgmap on each state change (for debugging)
-4cc6a2d osd: don't die on stray sub op acks
-b94c4e5 osd: generate_backlog sanity check
-c1368ed osd: fix merge_log divergent item detection
-34ee473 osd: clean on ondisklog a bit
-7fb6a0a osd: make read_log output a bit more informative
-6cc5c54 vstart: only sudo if -e dev/sudo
-bba2a54 osd: revise missing map adjustment
-fddf29a osd: mark backlog events as BACKLOG
-5d44924 osd: generate_backlog fixes
-3b909a7 crush: add include
-aaf32a1 kclient: reduce stack usage
-cc8bb08 mon: 'osd scrub \*' to scrub all osds
-1ce00a4 filestore: fix up listxattr buffer management a bit
-1006e2c dstart: put debug output on local disk
-d39ab9c debug: allow output and output symlinks to go in different directories
-5689c78 logmonitor: append all notifications in a single file
-fccde5c set/check subprotocol versions
-7c160a4 mon: clean up paxos service registration a bit.  rev disk format.
-0820e7c cleanup, whitespace
-a6ed26f log: use of cascading dispatcher for log messages
-a5a7eea dispatcher: cascading dispatch infrastructure
-9797225 mon: keep pgmap consistent
-c1af677 osd: make replica scrub_map generation a subop
-6d53b35 logclient: always print log messages to debug output
-ef6f428 osd: fix up scrub error log formatting
-778ac40 logclient: optionally take a stringstream
-ee18c91 osd: some scrub fixes
-2053ee1 osd: fix pg_stats.reported value
-4cfb679 osd: drop lock during most of scrub; only disallow concurrent writes
-3925eea osd: ignore dup scrub maps
-b1d69de osd: take pg ref on scrub_wq
-e1a74f4 osd: make scrub verify replica object attrs match
-ee8665d osd: fix pg stat acking in osd
-358db66 log: logclient uses log types instead of log level
-f0ef5fc osd: check for missing clones in pick_read_snap
-7d32935 osd: clear waiting_for_head when we pull the head; set skipped if we do
-b711ed1 osd: fix missing.add_event
-ab3986d kclient: fix NULL dereferencing oops
-7ecda8d osd: version pg_stats_t with <epoch,version> pair; clean up pgmon a bit
-7a1eaa9 osd: keep projected info on in-progress object modifications in memory
-cdea03e osd: fix problems with propagation of info.stats during recovery
-5711c03 osd: keep tabs on total object copies vs missing/degraded
-cdf685f osd: fix uninitialized var use
-48b1703 add missing header file declaration
-8ad8839 osd: move logging messages to a common infrastructure
-1e3604f mon: clean up pg dump
-75150c3 osd: update stats on primary pull
-5731c23 osd: fix stupid no-op typo
-53bca96 osd: log scrub errors to central log
-988e350 mon: include last_scrub info in pg dump
-9a9be6d osd: remove pg from recovery_wq with clear_primary_state
-f2c70ed osd: make pg refcounting vs work queues constent
-aeb89b9 osd: do clone scrub based on our generated scrub map
-51f3d2d osd: scrub info in pg_stat_t.  scrub states.
-ed2c3db osd: fix small quirk read_log missing generation
-431443e mon: always discard pending on election completion
-e934ea6 mds: update segment on ETableServer replay
-3780abb mds: print table version loaded during log replay
-ffc6897 osd: default 2x pg only for now
-f51348d osd: distributed scrub compares primary vs replica contents
-85f06ad osd: do not clear ops vector to indicate noop (protocol change)
-1c0bdf1 osd: rewrite pg_stats queueing
-fd241b6 osd: remove useless raid4pg from build
-5c43a39 kclient: fix oops in case written size doesn't match request
-7dfb905 kclient: some logs revision
-4a6bd48 osd: don't forget about skipped clones during recover_primary
-674942e always print snapids in hex
-3b782a4 osd: log scrub errors to system log
-566a955 mon: system-wide log
-1876ca5 mds: pick_inode_snap should consider follows==0 valid
-a31778f kclient: initialize some protocol fields
-431dc5c osd: log stats for push and pull bytes
-f99e081 mds: avoid overlapping release attempts
-19cdd84 kclient: avoid queueing cap_snap when nothing is dirty or writing
-de347b1 osd: send old_version to replicas
-055b510 osd: always get old_version; include in debug output
-1d5011b osd: show prior_version in log dump, output recovery_primary debug output
-488b016 mds: suspend instead of suicide on beacon timeout
-fdbf05d filestore: show return codes in debug output
-e13951d object: print snapid in hex
-95d6947 osd: allow admin to mark osd lost to kickstart recovery (disk format change)
-cc650b8 osd: clean up pg_stat, osd_stat summation, fields a bit
-e7e39f0 kclient: no page cache for write without wrbuf cap
-d731ff0 kclient: sync writes use page cache
-aa7efb6 kclient: clean out old BACKOFF bit flag, comments
-7c5e8cc osdmaptool: print new osd_info fields
-881c680 osd: make pg log dump obey debug levels
-7ae60b4 osd: rebuild past intervals when needed; tolerate partial info
-e8158d1 osd: send and process heartbeats in separate thread, channel
-5ab62f5 mds: do not purge until leases expire
-6eb3bfd lockdep: lockdep_dump_locks()
-7b680b8 rwlock: try_get_read, try_get_write
-ca4e754 osd: optionally avoid zeroing trimmed log on disk
-c813af3 kclient: fix bad check
-ab728c0 kclient: slient down some log message
-fa98083 osd: skip peer_info on down osds
-867cfe9 osd: remove bad PG::put() assertion
-91fe2a9 osd: fix lock inversion on workqueue shutdown
-4aa2fe2 todo
-a2005b0 workqueue: deliberately leak string with lock name
-6107617 wireshark: update for win32
-bde1d81 osd: fix bad sub_op_push assertion; only write data we need
-98b05e2 objectcacher: only call flushed callback if there are also no dirty buffers
-54fd735 mds: fix up loner_cap whenever we manually change filelock state
-ff05b93 osd: clean up touch() calls to use exists bool
-9362622 objectstore: fix touch()
-8f74075 mon: instruct individual pgs to scrub
-4d05087 osd: debug write_info a bit, clean up Transaction cruft
-4efcfe3 osd: initiate scrub via monitor message
-cb8d181 objecter: scan_pgs even on original full map
-86aa86a osd: ensure target osd is still up when sending MPGRemoves
-1199270 osd: move stats into PG::Info (disk format change)
-43cf770 osd: (re)set degraded flag on activate
-681e6d1 timer: discard unfired events on shutdown
-65f81fb client: fix use-after-free
-7e9da44 msgr: discard queued messages when closing pipe
-308aecc objectcacher: do callbacks _last_ to avoid a use-after-free
-6dd9f2c mds: initialize CInode::loner_cap when twiddling filelock states after reconnect
-51023a9 objecter: use full osdmap to get started
-b97f64d osd: ensure 0-byte object created by push
-29a6535 osd: mark repops aborteds in on_shutdown
-36f1313 dstart: show filestore ops
-f90330d osd: clear out workqueue queues on shutdown
-7103fb1 mon: show both user data and actual disk space used
-aea5095 debug: rotate old courtesy symlinks to .0, .1, etc.
-b5f0481 osd: remove bad assertion in op_modify_ondisk
-2fa65b5 osd: fix clone push when head is correct old version
-1cff740 mds: remove anchors when destroy stray inodes
-ee289ee mds: clean up request write condition, can_forward logic a bit
-e81fb6d osd: fix rare memory leak
-c09c427 cmonctl: print summary every 20 lines when in watch mode
-1856c5e osd: fix up recovery pointers a bit
-9521a6a wireshark: wireshark ceph plugin patch
-5c29fb6 osd: be a bit more verbose in push_to_replica
-5678116 osd: lots of fixes
-d3f593b todos
-4c2404e osd: clean up repop code
-4e64af5 osd: fix up repop_ack
-ec6f801 osd: ack type in osd sub ops
-d5c6af1 osd: infrastructure for ack vs nvram vs disk osd_op ack types
-aeccf34 os: separate onjournal, ondisk callbacks for apply_transaction
-0e5c7b6 context: all C_Gather to OR instead of AND subs.
-4f8fb97 osd: remove snap collection after it is trimmed
-f57a4cf os: add collection_empty method
-f5d9ae7 todos
-557700a osd: reply with EBLACKLISTED if sender is blacklisted
-3a93c1d osd: include a blacklist in the OSDMap
-141c45c osd: comment
-fa038fe rev wire, disk formats
-71d8ae5 osd: ignore intervals prior to last_epoch_started in build_prior
-4823b07 osd: simplify osdmap tracking of osd up/down epochs; fix pg build_prior logic
-3ef312f mds: move filelock to lock state if we can't wrlock but lock is stable
-5efda11 mds: rejournal using EUpdate instead of EOpen if no caps in check_inode_max_size
-3e71db7 mds: use vector for EOpen
-f10c997 make assertion output look more like gcc
-2b53788 mds: remove bad assertion
-31b6d3e osd: use last_clean_interval in build_prior logic
-f794840 osd: track last_clean_interval in osdmap; simplify encoding/decoding a bit
-1100224 osd: track last_clean_interval in superblock
-552d85a osd: add a few getattr assertions
-1859113 osd: log a delete only if the head object is deleted
-dc85daf osd: remove bad assertion in pick_read_snap
-f9c36b5 mds: remove capless inodes from logsegment open_file lists after reconnect
-33ee113 mds: fix up completed_request handling during journal replay
-d7f30a5 osd: clean up info setattrs, such that write_info is called once per map update
-829b7b7 filestore: clean up debug output
-3ad38ec osd: minor append_log cleanup
-790d282 filestore: only commit if changes are pending
-8e82b52 filestore: fix truncate argument, subsequent Transaction fuggering
-32d8623 dstart: modprobe btrfs
-830dec4 mds: assert ref count is 0 on inode deletion
-d0ec09e mds: mark dirty inode clean before dropping
-e26f5f3 mds: exclude BADREMOTEINO dentriess in readdir
-74d8d37 mds: make open_remote_ino terminate if the anchortrace refers to a non-existent ino
-acd6b36 mds: fix cdentry states
-455b842 mds: add version to anchor; avoid looping in open_remote_ino
-b0eb94d mon: send osdmap to _original_ PGStats source
-557299f msgr: fix replace_connection bucket list manipulation
-9d20acc kclient: increase max data and front sizes to 16MB
-e3791e0 kclient: preserve peer_name across connection replacement
-d1fc58e osd: factor out add_log_entry into a helper that adjusts pg info accordingly
-c60d657 osd: use old acting set when noting past intervals
-9f54249 dstart: only clean up old output on mkfs
-647e42b client: ignore dropped messages
-8b3db45 pg: fix build_prior debug output
-23c338d client: fix ms_handle_failure
-0a65ddd osd: only trim past intervals that _fully_ preceed last epoch started
-174e03c osd: ignore pushes if stray
-7844d0e mon: send osdmap updates if pg_stats indicates an old map for a long time
-66d9ad0 osd: fix read_superblock
-95e9385 mds: mark dn clean before removing
-7974d6b kclient: debug info for connections and crc errors
-72989aa osd: fix read_superblock
-09102b5 dstart: fix crush map typo
-e61130e osd: fix default crush map rules
-5ffff11 crush: introduce crush magic
-f85e9ca crush: make recurse_to_leaf slightly less fragile
-e7493a9 osd: don't fail assertion on out empty ops list (i.e. no-op)
-51b5212 osd: include magic in osd volumes
-de137e7 osd: get rid of snaptrimming/snaptrimqueue pg states
-b95422d mon: include magic in mondata
-9cbda1e osdmap: use chooseleaf in default crush map
-726767b osd: fix transaction argument order
-f58ff71 OSD: pg ref count debugging
-0b1128e osd: use map_lock to avoid osdmap update race in _finish_recovery
-997582c osd: convert recovery to a work queue
-82bb185 wq: use a single lock
-7afce5b osd: clean up mkfs vs peek_super
-ab07241 osd: fix peek_whoami
-6be0af4 osd: make peek_whoami verify fsid
-eddf4e1 osd: decode superblock properly
-dd5ef3e vstart: 3 osds
-003e17d cstring: pre-terminate even if content unspecified
-ce81791 osd: feed type name into workqueue
-69eea16 osd: convert snap trimming to snap_trim_wq
-aa2c138 osd: basic scrub works
-73507e3 osd: update stats when op is applied
-2bea2d5 osd: add scrub wq
-5a7142f os: use nstring instead of string for attrsets
-38527f9 ebofs: fix occasional bdev shutdown hang
-3b2807c osd: adjust merge_log
-802d0e2 msgr: ref count message while they are owned by the messenger
-e85c9f8 msgr: reference count messenger
-9c31bb4 vstart: launch valgrind with --valgrind
-aaf94a0 msgr todo
-1fa04c3 Makefile: adjust link order (libcommon first _and_ last)
-7049c61 ebofs: add new objects to main collection
-20de77f mds: remove session from xlist before deleting
-0aab274 client: remove xlist items before deleting
-3534411 mds: remove Capability from session list before deleting
-d2d27c3 mds: pull scatterlock of xlist in destructor
-337cfc0 os: clean up ObjectStore::Transaction interface
-43a26d8 msg: initialize footer
-be97d02 lockdep: turn lockdep off during shutdown
-725db5e osd: fix osd_reqid_t hash
-484ecd8 filestore: pad with zeroed buffer
-9c3c61c xlist: enforce removal from xlist
-b4a9fb5 mds: fix uninit value
-79d9f63 osd: adjust missing in merge_old_entry
-0d91ac6 osd: type cleanup
-bae8a3c osd: more merge_log updates
-fc1d956 monclient: dont free messenger until races there are fixed
-eb65590 cmonctl: fix busy loop
-8906ba1 mon: ignore 0-byte latest
-7d38e5a osd: merge_log fix when logs abut but do not overlap
-17d9b07 kclient: different handling of EIO, bad crc
-20a09af dstart: smaller cluster
-46de32f osd: track bytes/kb usage over clones too
-0babb1a osd: track per-pg bytes, kb utilization
-124ca8a osd: fix update_stats
-9d775e0 osd: verify monmap.fsid matches superblock on startup
-86dc12e osd: include fsid in OSDPing, and verify
-2311789 osd: maintain some per-pg stats (object counts, for now)
-2c55e8e dstart: larger cluster
-07f847c msgr: fix reconnect after error
-92542f0 mount: typo
-027fa30 mds: add new directory to new_dirfrags list
-f3d2dbf mds: unqueue recovery on purging inodes
-1c94897 kclient: fix unmount (broken by 01a33259dbbeb380104d185073f8802eee743f98)
-4cca1db kclient: limit incoming messages size
-7f68a22 mount: remove extra log
-c51cb88 created mount helper, can resolve mount addresses
-e8f6cbe4 osd: rewrite merge_log
-0462d5f cmonctl: include original command in command reply to avoid weirdness
-01bbcd0 osd: fix build_prior any_up logic again
-3994811 filestore: fix btrfs detection based on latest btrfs-unstable
-ba97e96 todos
-248f3cf cmonctl: pick new mon on timeout
-ab184d9 mon: fix get_latest
-35e9899 msg: non-destructively copy data buffers in set_data()
-3a8c816 mds: use last_sent (not last_open) to untangle cap release races
-3f66a1a mds: be more forgiving on EPurgeFinish
-b4e986b osd: adjust build_prior any_up logic
-8182101 kclient: silence down some warning
-6cef101 mds: fix an erroneous assertion (sage)
-050dfe3 osd todos
-6213227 osd: fix deadlock on map_lock vs peer_stat_lock
-1c64db0 osd: remember past intervals instead of recalculating each time
-5aad578 msgr: adjust mark_down locking to avoid possible race
-66cabfa cmonctl: reprobe every second
-0a20bb2 osd: clear_map_cache at end of activate_map
-0234e3c osd: introduce map_lock RWLock, take read lock during heartbeat
-f833d88 msgr: small cleanup
-b38e8c6 lockdep: force backtraces on specific mutexes
-8b5f0f7 osd: maintain a cache of past osd maps during repeering
-e24344d osd: pause/unpause recovery thread while processing map
-6121883 mds: journal updates _after_ predirty_parents (which adds parent context)
-ef4a50e mds: remove bad assertion
-d2d5df4 mds: mark inode clean only when purge is complete
-cfae1fb mds: only mark clean if dirty
-d46c1e8 mds: adjust purge_stray sequence; include explicit ino destroy
-324b026 mds: avoid unnecessary issue_caps in file_eval
-0c3664b mds: fix placement of eval_stray call on caps release
-28251a1 mds: restructure purge_stray to remove inode objects, _then_ dentry
-b5c399c mds: mark and pin dentries while purging, so they don't get trimmed out from under us
-530cc2d mon: commit large numbers of state values quickly
-a1511eb mon: use generic stash mechism to manage latest version of paxos-managed object
-01a3325 kclient: use generic timeout/retry code for various monitor request types
-cd32920 kclient: pick new mon if statfs is unresponsive; clean up other retry code
-e14818c streamtest: fix recursive locking
-1dd4209 (tag: v0.5) journal: detect size of raw block devices properly
-200c569 osd: only trim pg log if pg contains complete set of osds
-8c1908a osdmap: fix type conversions
-41065ee crush: mention license.  minor cleanup
-831800a be quiet
-37f6d19 kclient: fix small resource leak when mds is down on mount
-8bf6c7a csyn: fix msgr startup
-fdbd20e kclient: whitespace
-b513f2e mon: standardize storage of monmap revisions
-8ff44d6 mon: indicate last_consumed state after writing "latest" full maps
-59b9595 paxos: only trim old states if they've been "consumed" by PaxosService
-c76edfb mon: fix mon injectargs
-bb36144 cmonctl: seed random number generator so we pick a truly random mds
-9391465 mds: treat open requests as non-idempotent
-5fb2827 mds todo
-53839a3 kclient: only kick requests when they may make progress
-109d425 kclient: only submit mds request if mds is active
-75a866c osd: always pick new mon during boot
-d3ecd64 kclient: fix connect_seq on connect-side after connect
-b96b68f mds: keep inode multiversion if it has snapped old_inodes
-c948f7b mon: pave way for more per-client mount info in monitor
-d618cb0 mon: client mon stat, dump commands; add to cmonctl -w
-db8e522 msgr: include entity type in negotiation
-5537f22 msgr: lotsa cleanup, protocol change, fixes, etc.
-353c9ee msgr: various locking fixes
-728ce57 msgr: zero msgr header
-f702c95 thread: complain on bad join() calls
-223ab88 testmsgr: messenger tester
-4f1a19a mds: multiversion inodes with multiple links, too
-647f6dd kclient: grab reference on inode before async operation
-267679a client: use separate locks for SafeCond completions
-996c8bf Revert "client: adjust objecter locking"
-9cb6ae5 mds: cap may already be released in file_update_finish
-fbdad41 mds: remove cap _after_ journaling update, at the same time we send the msg
-eddb879 mds: use null snap context for purge if no realm
-879af6f osd: keep head_exists accurate
-a13845e filestore: implement touch
-ad82fe0 ebofs: implement touch
-2582d1b objectstore: introduce touch operation
-2221718 kclient: some osd endianity fixes
-ad71575 kclient: fix symbol overshadowing
-83ffa29 protocol, disk format change
-3c1e75f osdmap: move offload from crush map into osdmap as osd_weight
-d30ed6c dstart.sh: larger cluster
-cb272c0 mds: fix replay lookup of snapshotted null dentries
-f0b26ff objecter: fix read scatter/gather
-d18c180 osd: pass at_version by reference, so that cloning works
-536f51b mds: remove spurious warning
-21e37cc osd: ignore logs i don't expect without freaking out
-db4e626 osd: assert length on write, zero
-1fbe68e objecter: whoops, do DELETE, not ZERO
-88d0317 osd: fix typo/bug when picking osd to pull missing object from
-5ec7017 osd: fix missing vs lost counting idiocy
-ef6efb6 filestore: cope with zero-length attribute values
-2883397 ebofs: cope with zero-length attribute values
-0f944df osd: use modify flag to decide whether to take read fast path
-8b14747 kclient: fix up writes, reads for new op structure
-48688a2 osd: MODIFY is a flag; fix up op_read
-7e6cc5f osd: simple higher-order append mutation
-920abc9 kclient: fix osd reply handler sanity check
-de0bdde objecter: destructively take ops[], bufferlist passed to read(), modify().
-8a6d7ee mds: set path attr on directory objects
-e46705c osd: object attr operations
-950eb91 objecter: tweaking interface
-1a0958f objecter: simplify objecter (no scatter/gather, generic ops vector)
-7bfde0a osdc: avoid using objecter readx/writex
-cc9958d osd: compound osd operations
-1c70b1d client: adjust objecter locking
-07f0ee5 osd: track recovery sources independently of missing list
-209ad64 mds: debug session ref in EMetaBlob during replay
-214f0fa mds: match last snap exactly on replay, add_*_dentry
-5c492af kclient: when going down, release caps anyway
-fc0f6db mon: avoid updating pg_map when osd_stat is unchanged
-60a706e cmonctl: -w or --watch to watch (and print) mds/osd/pg stat changes
-7066f80 mds: don't cow a null dentry
-94cc9ca kclient: sparse warnings
-b826562 vstart.sh: add usage of $CEPH_BIN
-7e1c35c osd: don't repeer an active pg just because the prior_set was affected
-d87e7c1 mds: check dn->last when finding existing dentries during replay
-607aca9 todos
-8e6af7d ebofs: another recursive lock bug
-39fc3c6 osd: turn up debug on any shutdown, not just SIGINT/SIGTERM, for now
-cd2cd42 msgr: fix problem with forced stop of pipe
-c72f129 ebofs: fix lock recursion
-ad52c2f mon: handle invalid commands to pgmon
-1f77a71 osd: add degraded pg state bit
-4a1a33f osd: improve build_prior logic
-fd9479b osd: turn up debugging on SIGINT/TERM
-efb89f9 osd: fix osd_lock recursion in wake_snap_trimmer
-24b3bbf kclient: bookkeeper detects buffer overrun
-2dbf524 kclient: frag_make_child fix (sage)
-2c15749 osd: don't pull if source osd is down
-5ee78a4 kclient: ran checkpatch
-f48ed5f todos
-0197dfd synclient: fix debug prefix
-ba907e9 cfuse: fix symlink call
-616dcd1 vstart.sh
-5df7fb8 fix env parsing
-ef34517 streamtest: fix debug
-f7dbfcb vstartnew.sh: clean out gmon
-59fd71d journal: debugging journal full
-b21e8cf dstart.sh: -d flag
-48c2c02 config: parse CEPH_ARGS env var too
-89744fb client: fix client_lock recursion
-9499a8e rewrite debug macros, infrastructure
-0639334 try to chdir on exit to avoid clobbering ./gmon.out
-1cf9beb osd: fix prior_set_up_thru condition
-9fd1e26 osd: fix PG::Info::History::same_since adjustment in advance_map
-ab3dc66 osd: repeer osd if prior set may be affected
-41eefe8 osd: shutdown cleanly on SIGINT, too
-82e9c62 osd: clean up shutdown sequence
-0adc8af osd: shutdown cleanly on SIGTERM
-ba12b62 filestore: lock fsid file to avoid multiple users
-2d31faa journal: fix recursive locking when queueing commit callback; simplify
-330f5e5 lockdep: separate from Mutex; include checks for RWLock
-e9f2f10 osd: remove odd divergent log assertion
-8ed2d2d osd: put pg logs in collection 0, not the pg itself
-92d2683 osd: fix recovery deferral
-1b39f54 dstart.sh: debug journal
-4417f48 osd: mention pgs that do not change during advance_map()
-e44c2d2 journal: ensure we see a clean sequence of entries on read/replay
-f0f3107 msgr: reorder locking in mark_down()
-e415263 dstart.sh: enable lockdep
-044c119 osd: fix recursive lock on remove_list_lock
-e8d619c msgr: fix recursive locking in mark_down()
-463b615 osd: avoid locking multiple pgs at once
-2a1299a lockdep: error out on recursive locks
-25129f2 mutex: non-recursive by default
-09aef2a mutex: remove nlock assertions
-bc94753 /bin/bash, not /bin/sh
-4bcaba4 lockdep: faster
-a0c4885 crun: no let
-4e6d132 lockdep: use static array for dependency map
-b34563b fakemsgr: missing mutex annotation
-dfd080f lockdep: assign numeric ids to each lock type
-811d867 lockdep: only track/show held lock backtraces if --lockdep 2
-76dd6d9 reopen log files on usespace daemons when getting a HUP signal
-82341e3 lockdep: BackTrace.h
-a7e5c55 vstartnew.sh: enable lockdep
-020d6a4 msgr: fix lock ordering on accept()
-895ef1a lockdep: fix include
-f9ebb62 ebofs: avoid taking mutex recursively
-a0c698e lockdep: disable on _dout_lock
-91108bb lockdep: include Mutex.cc
-9a7d25c lockdep: disable on per-mutex basis (and do so for atomic_t)
-641b1e2 lockdep: enable with '--lockdep 1', off by default.
-18a5ba0 lockdep: make it work
-1a51eb9 lockdep: annotate Mutex declarations
-bc55688 msgr: set lossy flag on connect attempt
-ab17c56 kclient: style, tabs
-6877771 crush: no debug output
-70612ad crush: dprintk lameness
-b592ada crush todos
-8f7cf32 crush: fall back to a linear search if pseudorandom mapping isn't finding anything
-656e92e crush todo
-5faa8e3 dstart.sh: use chooseleaf for data, cas crush rules
-183a684 crush: fix list bucket, chooseleaf behavior
-d7042ce osdmaptool: test pg mapping
-1f1eeff makefile: make --with-debug work, fix build errors
-5a2c576 osd: report pg osds, osd peers to pgmonitor; include in pg dump
-f0c43da kclient: keep a pointer to the current snap context in the inode
-14a6694 kclient: use current snap context if not found
-d2c6d5f kclient: don't register a new bdi for the same client
-d12ba8c osd: do all recovery operations in dedicated recovery thread
-c62691e dstart.sh: 2x rep only
-68c8e83 dstop.sh: stop crun too
-9bbcc54 kclient: override rdcache invalidation time when going down
-aeaf2fe osd: avoid trimming unless pg is clean; keep recovered_to, complete_to log pointers cleared when not in use
-801d42a kclient: do LCHOWN, not CHOWN, so that mds does not follow the symlink
-3cfbe40 kclient: update patch generator
-30d44d1 mds: fix bad EINVAL error code in unlink
-c3b17a8 kclient: note locked new_dir in ceph_rename
-4a1d38b mds: fix pre_dirty/mark_dirty order for remote dentries in unlink_local
-507e08f kclient: use vmalloc for messages larger than one page
-e1470e5 kclient: make reconnect allocation a bit more generous
-31f0fe3 kclient: remove extra dput on failed rmdir/unlink
-2cad895 osd: initialize curclone
-416e977 filestore: fix getattrs return value
-ad019f3 kclient: fix mds request reference after free bug
-d5037c2 Revert "mds: CInode::mark_dirty should then dirty the projected parent inode, if present"
-b1b8f74 mon: lossless communication between monitors
-ccf6bfc kclient: set r_got_reply _after_ we ensure we have a session
-bc2208a mds: ClientCaps typo
-087b6b3 mds: eval FileLock after last wrlock releases
-8d49da0 kclient: no cap delay if mdsc->stopping (unmounting)
-a853eb4 osd: clean up debug output a bit
-676b455 filestore: don't clobber file on clone_range
-bd24a8b osd: initialize clone_overlap on clone
-45985f3 osd: skip pg log object when generating backlog
-c301ac9 filestore: use strtoull (unsigned) instead of strtoll when parsing object names, etc.
-c20745e buffer: print 'no raw' for 'null' bufferptrs
-111e851 objectstore: do not include 0-length bufferptr in bufferlist if attr not found
-bea6d9e vstartnew.sh: clean up out/* even if owned by root
-bd1145c osd: sync on shutdown
-e5cef7a osd: batch pg remove messages, do them all at once
-5e001e2 filestore: encode transaction only if journaling it
-3e419ed synclient: mksnapfile to generate a simple multi-snapshot object
-fdba326 mds: generate valid seq value on rmsnap
-f0ff8d8 osd: fix typo on setting complete_to
-cf763fd osd: include fsid in MPGStats
-8c5d589 buffer: skip crc calc on zero length bufferptrs
-89c635d mds: CInode::mark_dirty should then dirty the projected parent inode, if present
-db11db1 mon: ensure snap doesn't already exist in pending set
-48b6a68 kclient: comment on paths for mds ops
-0e3cc35 osd: reduce max_rep to 3 by default
-52fd91b mds: increase max_size based on loner AND other caps
-cfbc510 osd: recovery more efficiently keeps N ops in flight
-0637e65 objectcacher: fix commit callback accounting
-e63791b kclient: clean out when generating patches
-83fc675 xlist: implement push_front()
-fb42eee kclient: remove warning due to missing format
-cc99958 mds: make loner unitialized warning go away
-ed1761b kclient: bleh
-49416b8 kclient: include documentation in patch queue
-db12d2d filestore: be less noisy
-51a33c3 kclient: typo
-140031e mds: fix filelock loner modes
-2c8ce87 mds: fix rfile/rsubdirs accounting vs linkunlink
-077ff61 kclient: xattr rsubdirs fix
-5676745 kclient: take i_lock in flush_snaps
-95514e8 kclient: get code up to date with latest linux kernel
-3bf62ff kclient: flush/release all caps back to mds before closing a session
-ab86bcf crush: return 1.0 from get_offload if osd is not in the map
-a9ce056 kclient: remove realm from parent's child list on removal; avoid letting ref count hit 0 during split
-d98c377 kclient: remove some sparse warnings
-cc2f471 kclient: fix cap flush, and drop ref when acked by mds
-5fc21b2 kclient: finish_cap_snap fixes
-619c37d kclient: queue finished cap_snaps and flush them after snap_rwsem is dropped
-efbd7c0 kclient: cleanup some sparse messages
-8de7cb2 kclient: free snap_rwsem at ceph_handle_snap
-541be96 kclient: remove the use of snap_rwsem at ceph_mdsc_close_sessions()
-86419d3 kclient: fix __ceph_flush_snaps use of 'follows'
-94a9389 kclient: drop reply mutex, add a flag instead
-6fc3fcb kclient: use a new reply mutex, fixes locks dependency problem
-89e7a3b kclient: fix allocation flags for osd client radix tree
-25544aa kclient: try to release RDCACHE if _no_ caps are wanted
-498e21d kclient: invalidate pages if RDCACHE used but not wanted
-4bed5af kclient: changing around the rdcache invalidation stuff
-000c5f9 kclient: fix messenger tmp var name
-c98fad8 kclient: cleanup
-95f5fb4 kclient: revocation of rdcache handling
-6b5b11a kclient: more patch queue futzing
-e077a45 crush: comments, cleanup
-44c9462 kclient: flush cap_snaps on session close
-304373f kclient: build patches too in import script
-a53c85c kclient: remove remaining #include/#ifdef cruft from ceph_fs.h
-5fae8fa kclient: patch queue commit comments
-b6c0980 clean up ceph_fs.h a bit
-f0cc438 kclient: more patch queue fun
-69871a6 kclient: adjust import queue
-9116b4c kclient: allow monitor port to be specified with the ip(s) during mount
-c8c4762 kclient: include Documentation/filesystems/ceph.txt in patch series
-1929449 kclient: some changes for 2.6.28
-fe67ddd kclient: added crush.h for the git import tool
-d53f5a9 kclient: add dput to getattr for do_lookup splice case
-bef7d81 kclient: import tool fix, take two
-4da935b kclient: add Makefile to git import script
-bb0249f kclient: fix bookkeeper dynamic setup
-5367246 kclient: bookkeeper cleanup, configurable via kconfig
-5b20213 kclient: replace printk with dout in the leak tool
-fc20ce5 kclient: some more cleanup
-fad30fe kclient: cleanup
-5976e2a kclient: some leak tool cleanup
-883b5ce kclient: remove extra debug messages
-5794592 kclient: analyze crush correctly, kzalloc
-5f8dbc7 Merge branch 'unstable' into kleak
-a29a01d kclient: leak output shows filename and line
-05c4e0c kclient: add missing files
-6e47822 kclient: leak detections tool
-2997c91 mds todo
-7fae5ac filestore: fix getattrs to interpret listxattr return value correctly
-ea5b625 filestore: clean up xattr routines using nice helpers
-136470c mds: kill off inodes that get recovered but no longer have any parents
-57cb4db mds: don't clobber ctime on snap removal
-e2cbb01 kclient: fix snap_realm leak
-ef69049 osd: clean up write_info vs write_log vs write_state
-1fa1fee kclient: fix possible null pointer deref
-050354b crush: include cleanup
-69dd48f kclient: include crush in patch series
-37cd4a2 mds: update log segment tid list on journaled tableclient ack
-9203eff kclient: free sessions container on exit
-5b10e64 kclient: whitespace
-fe1ba42 kclient: remove useless __ for __u32 et al
-a5d951c kclient: fix else as per CodingStyle
-c458499 kclient: wrong parameter passed to mdsmap_destroy
-ff200bd kclient: fix leak in osd reply messages
-fc30eb7 kclient: mdsmap leak fix
-4e0e8f8 kclient: free monmap on exit
-d67b500 kclient: move dout etc. defs to ceph_debug.h
-e7aa663 kclient: some osd, mds client comments
-4f560a7 kclient: last bit of mon_client cleanup
-78b2cac kclient: script to build patch set for upstream
-8d0c9e8 kclient: some mon client cleanup
-6d57020 kclient: kbuild patch update
-ebb7eb9 kclient: more messenger cleanups, comments
-5424a33 kclient: messenger.c cleanup, reorganization, comments
-378de9b kclient: fix cap_snap flush to reference correct snap
-57709b2 osd todos
-8f92c35 mds: only check osdmap against snap table while active
-a15fdb9 osd: track snap collections per pg, and clean them up
-57965a8 osd: fast path if snap collection doesn't exist in snap_trimmer
-a420cf5 filestore: return error code (instead of asserting) if collection doesn't exist on collection_list
-c8a89f6 vstartnew.sh: turn up debugging on osd
-688dd38 mds: cleanly update snapserver table after snap purge
-80532dd kclient: more snap.c comments, cleanup
-ca312ca kclient: a few more snap.c comments
-80432c2 kclient: adjust ceph_finish_cap behavior
-8f4baaa kclient: some snap.c comments, cleanup
-9a001d5 kclient: osd messages timeout retriggering
-5702a77 kclient: refine osd messages timeout handling
-460f597 kclient: debug message
-2608820 debian: include debian dir in usr/src/modules/ceph
-629d5a9 kclient: some export.c comments
-0f03831 kclient: addr.c comments, cleanup
-b4a0e6c debian: make ceph-source include module source
-143845d kclient: mdsmap cleanups
-7fb8111 kclient: osdmap.c cleanups
-f753fb8 kclient: osd_client comments, cleanup
-e9cd366 debian: fix kernel module in source package
-97de3cd ceph_fs.h: whitespace
-be29270 kclient: more mds_client comments, cleanup
-6dd96e6 kclient: more endianity fixes
-25c67dc kclient: endianity handling fixes
-82f19da kclient: endianity fixes
-a2623aa kclient: some mds_client.c comments, cleanup
-e6b5e02 kclient: send osd, ping messages in lossless mode
-e0951ba kclient: super.c comments, cleanup
-625e38c kclient: move inode alloc/destroy into inode.c
-000defc kclient: caps.c comments, cleanup
-b08b840 kclient: remove compilation warning
-835e371 kclient: sparse code cleanup
-c6c6635 kclient: file.c comments, cleanup
-3b15ed5 kclient: dir.c comments, cleanup
-8992ec6 vstartnew.sh: -n (norestart) to avoid crun restart loop
-552786c kclient: fix inode refcount problems in ceph_fill_trace
-3dbec47 kclient: some more code cleanup
-7824aae fix crc issue (when len < 4)
-302bb2d kclient: some sparse cleaning
-1ed5520 use flags for mds chown requests
-e683417 kclient: inode.c comments, cleanup
-6df723c kclient: fix umount_begin for 2.6.26+
-934a539 fix wrong byte ordering handling (thanks brent!)
-66889f2 remove debug helper code for crc32
-bab9ea7 osd: use central queue to dispatch recovery events
-f7e57cf kclient: preallocate cap if we expect it
-81bfddd kclient: remove static caps from inode
-5d184bd kclient: super.h comments, cleanup, some minor cruft removed
-b619063 ceph_fs: some cleanup, including mon statfs messages
-462b003 checking buffer before calculating the crc (for debug)
-8e3971a kclient: some more error handling
-9c8c8ce kclient: remove ping_ack entirely
-cffeb79 dstart.sh: use unstable btrfs
-cddb600 filestore: fix btrfs version detection
-49db767 kclient: lower debug level on debug message
-d174b80 kclient: fix race condition
-e8f5ca0 kclient: remove ping ack
-d3f6a6f kclient: preliminary forced umount
-5a4df68 kclient: ping osds whose requests are timing out
-634e383 msgr: ping needs no payload.  lose ping_ack.
-5b41f2b kclient: convert spinlock to mutex in osdc
-ae0daf0 kclient: resend osd requests if osd resets the connection
-2ce58a6 kclient: some error handling
-8daa211 assert: include rudimentary stack dump
-8ba36cd custom assertion handler
-6c83cec objecter: ping laggy osds
-91518f8 osd: lossy send policy on acks
-0d03cfe objecter: kick requests when we detect a remote session reset
-72864d9 msgr: handle incoming lossy connection when outgoing policy is lossless
-a2a4235 filestore: use CLONE_RANGE ioctl, when available
-c4d2160 msgr: track lossy mode independently for self, peer
-d4024af client: fix && || parens
-7518dd3 filestore: use BTRFS_IOC_SYNC instead of fsync
-dd25463 filestore: detect new btrfs ioctls
-f9fdc56 fix of crc32c calculation
-cfa0992 replace the crc32c code
-54548de debian: changelog update
-9457aa3 debian: fix debian-doc; include debian dir in dist tarball
-92fb44d mon: populate last_beacon properly for mds liveness check
-18e5042 debian: tweak ceph-doc paths
-ad0ab3a dstart.sh: replace dstartnew.sh
-903959e filestore: fix collection attrs
-cbe084d todos
-ce0cb5e mon: include pg usage stats, header in pg dump
-3e5e554 debian: move map tools and crun to ceph-common
-1d109f1 osd: account for used kb separately
-c6e5338 osd: use kb instead of blocks for pg, osd utilization
-48295b8 osd: prioritize heartbeat messages
-c3a68d7 msgr: include priority in msg header, make dispatch a priority queue
-b3d6eef journal: protect journal access (namely, completions) with mutex
-8618940 debian: include crun in osd, mds, mon packages
-6e669cf osdmaptool: fix silly num_dom bug
-7cb7ada ceph.spec.in: include crun
-13b1bf7 (tag: v0.4) kclient: initializing kaddr (merge fix)
-d9262de kclient: use both writepage and crc
-fbd3cfa kclient: disabling the readpage
-34dccf9 kclient: disabling readpage
-133d95d kclient: use writepage instead of sendmsg for some of the data
-0e95949 kclient: missing include file
-8ef1cb2 Revert "kclient: use writepage instead of sendmsg for some of the data"
-cd305cf kclient: use writepage instead of sendmsg for some of the data
-f61042e msgr: expand footer flags, include nocrc, kclient nocrc mount option
-d301485 ebofs: -ENOSPC in apply_transaction
-3491f92 kclient: change default rsize to 128k
-27feb1f kclient: use both writepage and crc
-d4bf9b9 kclient: disabling the readpage
-556d427 kclient: disabling readpage
-406fc33 kclient: use writepage instead of sendmsg for some of the data
-d574c96 kclient: small fix take two
-12dacf8 kclient: small fix for bdi
-d0a822e kclient: use a private bdi
-45a5eaf kclient: fix file to object mapping
-66c76af crushtool: verify explicit item pos
-da85303 cm.txt: fix up metaroot pool
-7b601f4 crushtool: verify item pos
-ee0c804 dstartnew.sh: use custom crush map with separate metadata osd pool
-353e957 crush: fix grammar
-049ca24 crun won't be removed in make clean
-87dd735 kclient: set first,last snap interval in lease release messages
-7a7391f dstartnew.sh: keep core dumps
-efc7bf1 mon: tell osd we manually mark "down"
-e33471c kclient: fix mds session leak
-86b312d client: fix objectcacher flush/commit callback
-961ab8d kclient: fix mds timeout waiting for map
-8137d0f update dstartnew to do btrfs
-17e98ee filestore: fix completion callbacks when journaling is off
-721219d osd: increase osd_heartbeat_grace
-e460037 fix for cmon startup
-50a1c6a kclient: fix readpages when not all pages are found
-22b5f60 mds: create snaprealm for stray dentries resulting from rename
-0af4603 cmon will run as a daemon in any case
-4de216b combined vstartnew.sh and startnew.sh into vstartnew.sh
-0f3ab37 startnew.sh uses crun in order to execute modules
-ab5845e crun will not run infintely if -d specified on the command line
-6f8d6bb msgr: clean up crc handling
-e6dd588 mds: don't issue leases on dentries in stray dir
-8a5070f msgr: don't host msg bufferlists in write_message
-09b1bc2 also kill crun when stopping the system
-a5a99b8 added crun wrapper
-14305a3 add -f flag for foreground execution of modules (with logs in the log files)
-3e33302 msgr: include crc in msg header.  verify crc for received messages.
-f809ab18 clean up crc32c
-65c5b2c add crc to messages.  protocol change.
-403f643 todos
-19cab1d kclient: can use names of modules in order to set debug mask
-ed10f32 kclient: set asynchronous error cleanup
-c718dd8 kclient: writepages async error handling and some cleanup
-d1a7894 kclient: set page error bit on readpages error
-44ead2d kclient: fix incremental osdmap decoding bug
-7e4491f kclient: some osdmap cleanups
-bab9251 mon: reweight osds via cmonctl
-830a56e kclient: make standby an allowable connection race state
-8dadb7b msgr: make standby an allowable connection race state
-e88956a kclient: no .snap in root dir
-d97cfc0 osd: fix reversed logic on push
-0b6408b mds: remove stale proc_message()
-9653098 mon: allow new arguments to be sent to running mon, mds, osd via cmonctl
-cefdb4e todos
-d05dfe8 kclient: mds reset stub
-c7da2e8 msgr: fixed bug in accept
-73c689c messenger protocol changes
-5ca0b33 kclient: whitespaces
-960bb0f kclient: can supply multiple monitor ips on mount
-2b449c0 kclient: adding unmaskable debug flag
-4893720 makefile update
-2909ef7 v0.4, todos
-024d0c0 config: comment
-1b3a1c4 mds: fix file recovery
-2542192 kclient: fix pending cap_snap checks, queuing
-51e0ff5 client: fix queued cap_snap write-in-progress checks
-ef37668 filestore: clean up clone_range a bit
-66daf9c kclient: be more paranoid in prepare_pages
-1c886b7 kclient: fix bad pointer arithmetic in messenger
-91dd8eb kclient: don't include pages in read requests; some osdc cleanup
-38770d2 kclient: switch to sync writes when NEARFULL osdmap flag set; ENOSPC on FULL flag
-5e7f50c filestore: (trivially) implement OP_CLONERANGE
-f8d64da ebofs: (trivially) implement OP_CLONERANGE
-750c944 todos
-e3ce64f kclient: default to safe writeback
-aea485a mds: choose new mon only if beacons are delayed, and switch to mon that sends up beacons
-76c7cd0 kclient: some async writeback cleanup
-37d7bf5 kclient: async writepages
-2165022 kclient: using special protocol mask for mds requests
-a4b26a3 kclient: added missing file
-9f630cf kclient: mask to enable/disable debug messages
-45f704f osd: fix PG::Log::Entry version arg order
-8833e12 journal: fix off-by-one bug in committed_thru callbacks
-fd439bf journal: avoid queueing null context
-c623948 kclient: writepage noop should be kswapd
-275a06b osd: first pass at scrub() for verifying SnapSet relationships
-2bbed59 osd: push/pull based on existing clones. track clone_size in SnapSet
-54cbfdb osd: simplify SnapSet (remove head_overlap, keep only clone_overlap)
-a6ca836 osd: identify clones in generate_backlog
-44f7df2 osd: include from_version attr on clones
-76ccde4 osd: clone locally in do_recovery() where possible
-9bae2a4 osd: include old version in missing map
-db1ebcd osd: include old_version in Log::Entry
-0d6f98f osdmaptool: print osdmap
-3d618f8 osdmap: set ctime+mtime on creation
-534746c kclient: writeback cleanups (use filemap_write_and_wait)
-8ecd757 kclient: time out mds session close on umount.  messily.
-c67f2c2 kclient: fix up safe/unsafe writeback flags
-1712898 kclient: unify mount timeouts
-c95f010 todos
-a0eb5e7 todos
-f8ec9d6 psim: test localized placement groups
-997a5f9 crush: fix forcefeeding for forceleaf
-3b5f237 osdmaptool: lpg_bits specifiable
-ecf1ba1 set bl length in buffer::read_file
-8adb5dd osdmaptool: fix crush import
-52f9d15 crushtool: fix chooseleaf compilation/decompilation
-fb8cf71 todo
-0a9c986 crush: chooseleaf
-1cc73c2 fixes
-8245f5b hrm
-2977839 kclient: writepage noop should be kswapd
-8bcbcd6 kclient: remove extraneous dput in fill_trace
-43e7e39 osd: push/pull data_subset, clone_subsets
-1d20e73 objectstore: clonerange, list->vector encoding
-c43adbe kclient: lowered debug level on some message
-d76ce49 kclient: fix mds reconnect message encoding; include snaprealms
-d7a103f filejournal: typo, fixes callbacks
-9ec27ab journal: remove some dead code
-07c3f01 kclient: fill in kstatfs f_fsid
-ae4b5ac paxosservice: reset propose timer when election is called
-00d1759 filestore: constrain ObjectStore interface, simplify journaling, update commit_op_seq on each transaction
-c0d94c4 filejournal: noop is committed_thru is same seq
-c635d7e kclient: fix bug in mdsc check_new_map
-20f81f7 filestore: serialize journal entries
-d572871 kclient: dirfrag access using mutex and not inode's spinlock
-79a612d kclient: fix random mds selection bug
-2c0f3cc ebofs: maintain an op seq count, and use that for the journal
-37c3ad3 journal: journal rewrite
-5e6c8c5 use vector or deque in place of list<Context*> in finisher, ebofs
-09efdf6 kclient: removing of virutal xattr is not allowed
-b4e7754 kclient: setxattr for virtual xattr is not allowed
-07771ce kclient: mount default without DIRSTAT
-7a7947c kclient: no need to check for mount with dir stat (xattr)
-a810152 kclient: remove whitespace
-ce86d54 kclient: xattr show dir extended data
-a481bfe startnew.sh: sudo if btrfs
-3bee915 filestore: no rmdir in mkfs
-bfb5b8d osd: some snap_trimmer fixes
-29ff13c mds: purge stray files immediately; only keep snapped directories around
-90bf053 mds: optimize open_snaprealm() for stray and/or non-dirs
-d4fad4c kclient: some todos
-4eceb97 kclient: rename __ceph_get_frag -> __get_or_create_frag
-6096536 mds: recover file size for all affected snapshots, not just the head
-525b26c mds: adjust TABLE_OP namespaces; fix prepare journal event
-7f78004 filer: snapid should be nonzero on all reads
-2a57107 kclient: allocate xattr buffer outside of i_lock
-a153418 msgr: relax seq checking on lossy channels (incomplete fix)
-9bc050e mds: write objects directory, avoid filer
-88ebb73 osd: typo
-c6231da mds: read mds objects with CEPH_NOSNAP
-e4dc829 synclient: loff_t in write_file
-7812ffc objectcacher: off_t -> loff_t
-e049e53 osdmaptool: require num_osd > 0 when creating new osdmap
-4a11365 mon: verify osdmap fsid in 'setmap'
-99a4c2c osd: fix _finish_recovery locking, refcounting
-12941b4 osd: prevent _finish_recovery from going off after primary changes
-b47aa99 fix coll_t != comparator
-1445664 ebofs: use correct remove in alloc_dec (so that btree remains balanced)
-32906d5 todos
-1408d4a kclient: use truncate_inode_pages instead of vmtruncate
-51e44b6 kclient: fix revocation races
-b3781ec mds: fix lock ordering
-3e4ae45 another fix for kernel 2.6.26
-74169bd some changes for work collaboration
-ad7d666 kclient: send time_warp_seq with flushsnaps
-c67475e client: update cap_snap code to mirror kclient
-fe5908cb kclient: restart writeback index each time snapc advances
-34d140a add truncate_seq to inode, mds<->client protocol
-808226c kclient: adjust kernel version conditionals
-32cca70 mds: fix client_follows in live cap
-a1f6d93 kclient: misc addr fixes (fsx + snap testing)
-a1ba86d kclient: force sync writes hack
-0629e50 todos
-82a034b kclient: no short write in ceph_osdc_sync_write
-6aeb288 kclient: no short read in ceph_osdc_sync_read
-af733c1 kclient: do/wait for writeback in write_begin if page isn't clean or current snapc
-dba320b kclient: writepage is noop if page is not oldest snapc
-a53b148 synclient: dump placement
-f957edc dstartnew.sh
-7fc51e1 kclient: last put_connection after dropping spinlock
-5a28e48 ebofs: kick waiters if commit skipped because fs is clean
-18069b2 kclient: retry sync_write on EOLDSNAP
-9b4d778 osd: truncate(0) fix
-bb1a937 kclient: make sync_write free memory
-d2bbc6e kclient: make sync_write update f_pos
-88515b7 kclient: make sync_write free memory
-fbfcd61 kclient: make sync_write update f_pos
-b1da940 kclient: some writepage cleanup
-a7eeea1 kclient: clean up page->private
-291971e kclient: fix redirty_page to actually set the dirty bit
-369a84a mds: fix ltruncate to actually purge underlying objects
-7aea75c mds: fix ltruncate to actually purge underlying objects
-3a3c48f kclient: page_mkwrite, improved dirty page accounting
-95cead7 kclient: no fallback to writepage, be careful with wsize
-7e66635 kclient: mmap/page_mkwrite shell
-0e4b664 kclient: snap ordered writepages, improved cap_snap handling
-3b54e27 kclient: fix osdmap incremental decoder
-44be659 kclient: taking snapshot basically works
-56cc913 kclient: optimistically adjust dirty accounting before taking tree lock (to avoid lock dependency issue)
-1669fe5 kclient: fix snap_rwsem write/read redux
-25cb320 kclient: revamp dirty page accounting with cap_snap dirty counts
-5614170 kclient: fix i_lock/snap_rwsem lock inversion (read, not write)
-b50649b mds: introduce ceph_session_op_name()
-9258ee9 todos
-e35da01 kclient: i_cap_snap_pending
-f538df6 Makefile.am: add kernel/caps.c
-6ea3689 kclient: initial pass at queue_cap_snaps etc., unfinished
-2ca1809 client: small queue_cap_snap cleanup
-4e03f61 mds: blindly lease immutable bits of inodes
-ce533f0 client: delay snapflush until after data is flushed, sync writes complete
-f64da6c client: cap snaps
-82baa28 client: use objecter callback for write flush notification
-05d2ddb objectcacher: flush_set_callback
-d2384ab objecter: fix writefull
-944b3d3 kclient: snap type cleanup
-9d8e4e8 kclient: introduce ceph_cap_snap
-7677c9a mds: writefull directory objects
-43400e3 objecter: introduce write_full()
-fe9a27d osd: clean up osd opcodes, introduce WRITEFULL
-6d05abf kclient: recheck caps after import, in case RELEASE went to old mds auth
-5908e0c kclient: handle session close vs mds push races (by periodically retrying session close)
-5cd1db4 kclient: fix cap inode ref count bug
-d19f8be kclient: drop snap_rwsem while waiting for mds sessions to close
-adc660f mds: inc session seq on cap import
-6bdbe2a kclient: use rbtree for inode caps; avoid looping in ceph_check_caps()
-9fa35bc kclient: move caps code into caps.c
-b12f6ef kclient: close out caps on RELEASED, not release request
-f9676da todods
-0e91d67 client: close out caps on RELEASED, not RELEASE request
-ac2e696 mds: send RELEASED, FLUSHEDSNAP cap messages when cap updates are safe
-9004635 kclient: down_read snap_rwsem for buffered writes
-b5ad12e kclient: snap_mutex -> snap_rwsem
-6ddeab0 osd: ORDERSNAP osd_op flag
-a177e46 osd: fix _overlap updates
-e9e120f todos
-6472f2c osd: track clone overlap (instead of diff) in snapset
-301d0c8 osd: include pushed clones in proper snap collections
-5797c3e os: list -> vector in collection_list, list_collections
-e8e57d9 osd: rough trimmer, non-functional
-c598d48 osdc: fix objecter, objectcacher lock interfaces
-dc7953d osd: don't clone for lock or meta ops
-1d0fb08 osd: push removed_snaps down into each pg
-8a5207e mon: typo
-0c4ac33 todos
-e170093 mds: do not allow snaps on root dir
-923f72d osd: track byte range diffs between clones
-95b02e4 osd: fix zero -> remove munge ordering wrt snaps
-4435097 osd: sync on finish_recovery, but don't block
-eec476c yay, my own private fsx.c
-b54fd0e Makefile.am: include new headers
-aae0a4d test_setlayout.c
-4177e20 todos
-580f2b2 mds: setlayout support
-ff7dcb5 kclient: get/set layout ioctls
-028e721 kclient: nicer debug output for fill_trace
-4cb4089 kclient: beginnings of layout ioctls
-1d5d970 mds: fix ceph_add_cap for non-inline caps
-a7fd8a1 kclient: typo
-81b442b todos
-38667db kclient: 2.6.26 updates
-4223813 mds: follow latest seq, not latest create
-875d890 mds: start new items at snapid 2, _after_ root seq of 1
-7662720 kclient: disable partial paths for the time being
-802724a only update inode lease if we took i_mutex.  fugly.
-eba09fe mds: mark scatterlock if we import dirty scatterlock dir data
-4510ff4 kclient: include migrate_seq in caps message
-03f7750 mds: fix ceph_add_cap for non-inline caps
-02d6a14 kclient: remove from snaprealm list on cap removal; fix various ceph_remove_cap bugs
-49edcfb kclient: take snap_mutex during cap release
-2872de0 mds: mark inode clean when purging dentries for deleted snaps
-5235949 mds: don't fall over discover_reply with dir_auth_hint
-a71a2a5 kclient: add snap_mutex
-c6e3925 mds: snapdir may be non-auth
-0cb9b50 kclient: mds client spinlock -> mutex
-cc269a1 kclient: handle snap trace on cap import
-a46bc45 mds: do split in mksnap
-87ee866 mds: root snaprealm starts with seq 1
-6ad5271 kclient: handle_snap
-b01570c kclient: take ref on snapc during writepages
-6ed11f7 mds: set seq correctly for rmsnap, snaprealm create
-967e0cd kclient: set snap_follows in MClientCap
-aaace9d kclient: clean up inode hashing, remove i_hashval
-98b1975 kclient: ceph_ino, ceph_snap helpers
-42a204b kclient: EROFS in snapdir, snapped dirs
-c9b40d8 kclient: stateless snap_caps on non-head inodes
-748209f kclient: include snap in ino hash
-254ac6a kclient: some refcounting fixes
-9856d9a osd: off-by-one in log merging
-ecc8d53 kclient: fold mksnap/rmsnap into mkdir/rmdir
-880c2ff kclient: rmdir to rmsnap
-425115e kclient: mkdir to mksnap
-feaf511 kclient: fix readdir_prepopulate for snapdir; fix splice_dentry failure case
-347cccb kclient: basic .snap dir support
-e7d1791 objecter: better pg state debug output
-3051ec2 osd: remove failed osds from pulling map
-5db3f79 mon: guard in/out/down commands a bit more carefully
-4bb8bb8 osd: zap waiters on shutdown
-7ac0fb2 osd: ignore log if pg is active
-0e70238 max_rep 4->3
-c39a0e9 kclient: force early writeback if page belongs to a (different) snap
-be6a43d kclient: rebuild snap contexts instead of just invalidating
-1f9b0d5 mon: more precision in pg usage output
-ab905ef kclient: attach snap context directly to dirty page
-87ceca6 kclient: ceph_snap_context, pass context with osd writes
-f3f0458 kclient: set pg_pool in osd requests
-94c69f3 kclient: set pg_pool in osd requests
-6aae4d7 kclient: very basic snaprealm handling
-adb4d3d osd: fix snap dne error code
-9c94eff kclient: mdsc handle snap blob
-b9ffb42 osd: forget pushes to newly stray osds
-c585e63 kclient: mdsc session fixes
-49ac8bc osd: filter heartbeat stamps when adding to heartbeat_from set, too
-ccb4004 osd: prevent pg stats from non-primary osds
-11f5e48 osd: guard rep_ops based on map epoch.  fix DOWN state.  prefer prior_osds for newest_update_osd
-896dd08 osd: only accept push if it is the specific object version we were missing
-5273796 osd: pg DOWN state; require at least one osd from last_epoch_started
-fed94eb osd: don't rebuild backlog if we already have it
-84eded7 osd: only re-push pulled object if active, to avoid weird interaction with repeering
-32a54a7 osd: update last_complete if nothing missing
-ba7fb39 kclient: fix mdsc shutdown, crash on mount failure
-0141907 kclient: fix osdmap decoding
-573a9dd kclient: versioned inodes (ino,snap)
-bee65fe mds: adjust MClientSnaps encoding
-b05085f mds: structify up snaprealminfo, MClientSnap encoding
-7cc9015 rename MClientFileCaps MClientCaps
-41c8a85 mds: rdlock filelock when opening snapped files
-4e86444 mds: clean up MDSTableServer interface a bit
-326b17f mds: allocate consecutive snapids
-eb2fc50 mds mon: propagate deleted snaps to osdmap
-52c3a2b filestore: reenable clone.  don't use splice.
-d86d1c9 osd: add clones to bounding snap collection(s)
-f4e056b osd: make coll_t 128 bits
-3a4f9e6 client: flush delayed caps on shutdown; fix release starvation
-20d6dfa mds: list -> vector
-7720471 osd: more list -> vector, remove old message types
-fcc9095 list -> vector
-aab685b osd: observe snapset.head_exists on read
-e54851f mds: do not purge strays with snapped references/past parents
-32998e2 osd: fix head deletion
-544a7e0 mds: fix unlink snaprealm creation
-936e42e client: delayed caps release.  fix caps release after writeback.
-56e5431 mds: adjust snaprealm parents in link helpers
-83459d1 mds: clean up mutations, drop pins
-450d91c vstartnew.sh
-74ab7f3 osd: redid snapped reads, writes
-a07b7a8 client: fix cap ref drop on snapped read
-9dc5c36 ebofs: allow attr updates on cloned objects
-7f050e7 synclient: rmfile
-c1bef7a osd: pick_read_snap v1
-689a8d2 mon: read() needn't check is_readable()
-afb3e4d ebofs: fix uninit value on o/cnode creation
-4b06928 osd: encode/decode PG::Info in pg xattr
-c6fb705 os: add collection_getattr that takes a bufferlist
-7def571 osd: clean up _create_lock_new_pg
-083de43 ebofs: fix apply_transaction vs cids on object ops
-e936ca8 osd: fix pg create peer ordering
-59405cb client: 'follows' is snap_context seq
-8f557ad osdc: adjust objecter interface to use SnapContext for writes
-09d3701 mds client: initial steps for cap-less opens of snapped files
-f1537f1 mds: split snaprealm on unlink; clean up rename realm updates
-64bbb0b mds: send snap updates on snaplock update
-d65b58a mds: factor out do_realm_split_notify, call on snap lock update
-128c728 mds: handle realm split in open_snaprealm()
-e5e4ce0 darwin changes
-4fe4f59 filestore: --filestore_btrfs_trans to enable/disable btrfs transaction ioctls
-710f5f6 mds: snaprealm replay, reconnect fixes
-b577d8e client: snaprealm reconnect, update fixes
-44eeb6a mds: list child snaprealms in split, and send split notifications to all clients with caps in nested snaprealms
-e169674 mds: adjust open_parent on replay relinking
-2b8061b client: invalidate child snaprealms; adjust snaprealm parents on split
-7538e0a mds: fix replay of tableclient tids to include in logseg list
-6889c59 osd: ignore CEPH_OSD_EXISTS until we have a use for it
-69dfd06 osd: ignore CEPH_OSD_EXISTS status bit until we have a real use for it
-21b2ea9 mds: fix snaptable initialization/recovery, mdsmap anchortable -> tableserver
-0c2fa24 vstartnew.sh
-47c8cf9 msgr: debug level
-b5763d8 mds: reconnect encoding
-998badb mds: fix open_parent addition in rename
-8cb2387 mds: fix open_remote_ino freeze_dir check
-a49b294 mds: mdstable/client, anchorserver/client fixes
-4209531 client: snap msgs inc mds session push seq
-1ccb1a9 mds: adjust debug output
-08b4a4e mds: fix open_parents context deletion
-e9ebd9c client: add missing dendl
-4f1c228 check_dendl.pl script
-11c1de5 msgr: adjust policies
-640e4ed mon: fix mds takeover
-d6c55cf mon: fix mds takeover
-2b76325 mds: reconnect compiles...
-9cd32de mds: some snaprealm reconnect bits
-b212b34 mds: lots of reconnect fun
-924cac5 debian: include missing items in ceph-mon, chmod +x rules
-e429a55 ebofs: fix NodePool::expand_usemap() to correctly reallocate a contiguous buffer
-779f970 mds: the reconnect trainwreck continues
-7d4e45f mds: first pass at snap-aware client reconnect
-d4d428e osd: reset complete_to/requested_to pointers on recovery finish
-289be81 osd: pull last_complete forward on recovery completion
-a97dcaf osd: fix merge_log to process in _forward_ order
-0757ae8 osd: add_event() helper to assimilate Log::Entry into Missing
-b4adc0f osd: small cleanup
-f40412e dstartnew.sh/dstop.sh
-4053125 ebofs: replace hash_map with unordered_map in nodepool
-993d196 osd: write empty log on pg creation
-3152d65 osd: wake up all pg waiters on activate_map; clean up wake code
-0bd8b1a osd: check in with mon when no heartbeat peers
-f349d23 osd: some additional do_recovery debugging
-e787871 osd: filter heartbeat stamps against source set (fixes false timeout when peer leaves then rejoins from set)
-b3c8869 mds: fix rejoin encoding
-00c3131 buffer: fix iterator assignment to between bufferlists
-5ed79ce mds: misc rejoin, reconnect fixes
-58da4b9 buffer: fix iterator assignment to between bufferlists
-a502848 mon: fix double propose in mdsmon tick
-fe4ac3b mon: fix double propose in mdsmon tick
-54694df mon: allow tick on peons; make most actions in update_from_paxos for leaders only
-292fd40 mds: hook session version in EImportStart
-86eecef mds: fix dirty assertion in CDir post-commit clean sweep
-cacecf4 mds: encode _replica_ lock state
-aa041e1 bug todo
-99a3fe2 mon: election bugfix
-b579d31 mon: election bugfix
-716b1f7 mds: remove useless dn dir_offset
-dbeb04a mds: frag's rstat may update without nestlock held
-fccd17b mds: move snap_purged_thru into fnode, fix commit/fetch
-6371b22 client: use cache for lookup on dn lease OR dir ICONTENT lease
-b0354e5 mds: clean up empty/null/infinite leasing
-e964c0d mds: discover_reply handler fix for null dentries
-5bd9619 mds: fix up scatter/gather, but in project_rstat_to_inode
-5a5bc85 mds: cleaned up rejoin vs scatterlocks
-95681fe mds: some scatterlock cleanup, incomplete
-1bd2936 todos
-c9f1af2 mds: scattered rstat fixups.  old_inodes only fully defined on auth.
-438d771 mds: fix predirty/dirty ordering bug in unlink
-395fb25 mds: discover bug
-b37ff48 client: cap flush, import/export fixes
-5f138e2 mds: some scatterlock dirstat fixes
-0aa842c mds: pin and dirty cow items
-9ae428d mds: misc small snap fixups
-8ec2aba mds: make wait mask __u64
-8070a84 mds: missing lock cases
-6d5e759 mds: client session force-open fixes
-6c7bd4f mds: delay cap handler if freezing|frozen.  drop cap msg if migrate_seq is older.
-10dcdbf mds: handle recent new locks in cache expire
-661f212 mds: rejoin snap support
-cb17c5f osd: ignore remove request if pg has changed since request was sent
-65dfe14 osd: replica may have missing/lost objects when it activates; the primary is responsible for pushing them
-82f5d05 osd: on_change, abort repop entirely if we are no longer primary
-26d9555 msgr: warn+fault on bad seq.  but keep assert, for now.
-4691e06 osd: osd_lock assertions around pg_map access
-aa30a68 mds: dentry waiters wait on specific snap; wake on entire dn [first,last] interval
-94b8dd4 mds: preserve snap info on import/export, clean up CInode constructor
-d1c6369 todos
-1bad07f mds: include snapid in MDSCacheObjectInfo (used to identify locks, remote auth pins, etc.)
-5ae5205 mds: add snap to discover+reply
-819e089 mds: fix up replicate, cache expires to include [first,last]
-27a3d38 mds: dirty_old_fragstat to dirty_old_rstat
-1ed36b5 mds: huge discover rewrite
-743a40f mds: refactor cache rejoin, encoding/decoding
-5199f92 mds: purge stale snap data during readdir.  also, dirty dir if anything gets purged
-e4dc3e5 mds: condition dir fetch/commit snap purge on last_destroyed, not seq
-13a817f mds: open snaprealm parents during path_traverse.  once parents are all open, set a flag
-cea2819 mds: pin/unpin open_past_parents
-1959c61 mon: print failure msg payload
-5bf291d todos
-b052e3d mds: purge stale snap data on fetch too, if newest_seq has changed since store
-8497009 mds: factor out dup snap update code
-e74118e mds: snap deletion
-bc2e9f2 mds: purge old_inode data too
-6852086 mds: purge stale snap dentries during dir commit, or explicitly
-2307cfb mds: catrack last_created, clean up caching semantics, use either get_newest_snap() or get_last_create() in callers
-2b6093b kclient: fix multiple subdir mounts from same client (remove path from mount_args)
-4ce3f48 mds: rdlock snaplock up to root
-404b6c4 kclient: fix multiple mount points from same client; serialize mount attempts
-d751b0b todos
-1594a2b mds: leave remote links behind on dir rename
-44bd1dd mds: adjust snaprealm parents on dir rename
-c2d5c4a osd: tweak heartbeat failure timeout
-2a99958 mon: apply osd_stat updates to pgmap correctly
-524ec39 fixes for debian directory
-d4fd217 mds: some fixes for rstat projections into snaps
-99d7ec9 todos
-1a8f454 allow leases on snapped metadata
-cd57913 ceph.spec.in changes
-a4d20ae missing headers for MAX_IOV on some platforms
-63655e6 mds: fix anchorclient update
-a7fc5b5 mds: reenable opportunistic rstat propagation
-6839c5e mds: encode proper indoe version for readdir
-2c3f3f7 mds: rstat propagation into snapshots working...
-fe71e8c mds: closer...
-affa507 mds: fix cached_snaps
-8a37642 objectcacher: fix truncation bug
-78c4acd objectcacher: fix truncation bug
-04e5f1b mds: project projected inodes' rstat.  introduce old_fnode_t
-ae4d87f make gcc 4.3 shut up about deprecated hash_map etc
-02bff47 mon: fix int overflow
-369aa3d simplify includes
-247281b missing parens
-db567c9 make gcc 4.3 shut up about deprecated hash_map etc
-781a332 mon: fix int overflow
-c1a0189 simplify includes
-2b8f15a mds: missing constructor
-b65aa9a missing parens
-c14d415 client: missing include
-2a2e9bc mds: start to project rstats into snapshots
-6c20ae4 mon: fix MDSMonitor prototype
-248a21c filestore: close journal on umount
-8e42200 ebofs: close journal on umount
-a386fc5 thread: start/stop debugging
-0e78f62 use atomic_t to count threads
-0f108d6 mds: half-finished
-421c8e7 osd: stop timer thread before forking
-13608f2 mds: separate nest_info_t from frag_info_t, covered by a new CInode lock
-fbe7c6c mds: move Locker::predirty_nested to MDCache::predirty_journal_parents
-ee3ff62 client: flush caps on realm + its children
-d5a65b4 kclient: update proc for 2.6.26
-b085ef7 client: trace realm parent/child relationships; use per-realm seq
-52aed2a mds: separate snaprealm creation from snap creation
-67122c5 mds: basic rename, more journal_dirty_inode
-24d16ad client: fix fuse ino generation for getattr
-8ef60ce mds: clean up cdir head vs snap (null)item accounting
-a522c1f mds: small snap fix
-a86eaec mds: watch out for wrlock in file_eval
-a5d5e67 mds: make CInode.last NOSNAP instead of 0
-6eae091 osd: fix clone selection for reads
-f033366 mds: fix recovery on snapped files
-5d9eff8 ebofs: enable cloning
-3c30900 mds: metablob replay, cap cloning, mksnap journaling fixes
-dd90259 mds: fix shared write vs max_size adjustment
-6ec022b mds: fix up snap cap flushing
-e12df24 mds: dup caps; fix journal_cow_dentry
-517f2b3 mds: fixed up caps vs cow_inode
-77a92f2 mds: snaptable -> snapserver+snapclient
-d907674 mds: more inotable cleanup
-88e48bc mds: rename IdAllocator -> InoTable
-586236c mds: refactor Anchor{Table,Client} into MDSTable{Server,Client}
-4ca584e mds: EUpdate in mksnap; fix ESnap
-37ffe78 mds: snapid cleanup
-7d94d8f mds: watch dn first,last in metablob replay
-cb201ff mds: server cleanup.  link/unlink.
-8314c44 mds: refactor journal_dirty_inode into journal_cow_inode for versioned xattr updates
-a327204 mds: touch dir ctime on mksnap
-0685534 mds: adjust trace encoding, clean up snap naming
-9bbc472 mds: .snap mostly working
-b408d51 rename, fix ceph.spec.in
-f254beb mds: follow snaps in path_traverse, returning resulting snapid to caller
-0fcadab client: track snapdir ref to parent explicitly
-5a83812 filepath: don't remove dup /'s
-83f2e4f client: hidden .snap dir, lssnap fixes
-2e986fe (tag: v0.3) include ceph.spec in configure.ac
-d38b0af ceph.spec changes
-90a0dfc mds: fix purging for unlinked inodes with caps
-1949cce client: cache versioned inodes.  use high bits of ino in fuse client.
-45e0889 no more m4
-2cdc7b1 autoconf fixup
-24113c9 client: basic objectacher read/write support
-d4f917f mds: use set (not vector) for cached_snaps
-156d276 mds: snapid_t, multiversion inodes, fixed up perdirty_nested
-33c6a6b no more m4 dir
-a1c3ea1 ceph.spec for building RPMS
-8c96daf autotools crap
-d6b3d66 mds: cap flush on snap updates; mds may update snapshotted inodes
-4af5c26 todo
-bbe6b46 mds: include dentry first,last in emetablob
-8026691 mds: cdir fetch/commit versioned dentries
-dccae6d use orig_source for MClientRequest, MOSDOp
-13c809b todos
-7c3c27a convert more off_t to loff_t
-7390eb3 ebofs: use lseek64 in blockdev
-517c00f fix PAGE_MASK
-fdc77db mds: fix file purging vs delayed cap release
-1e98f3e mds: versioned dentry, dir items, inode_map
-839af33 ebofs: reduce commit interval to increase (single) client write throughput
-a49ac8e client: fix occasional segfault
-11e4680 client: adjust readahead default
-fdb1212 client: show read throughput in csyn read_file
-7f6d09a client: don't readhead past eof
-8b408f5 kclient: debug info
-43867a2 objectcacher: insert new buffers at top (not middle) of lru
-177bd06 client: align readahead with object boundaries
-c6b7dea osdc: don't set RETRY flag on all reads
-ee3fc34 mds: no link for current parent; rename some fields
-095ff6a client: readahead
-4d6a6bb mds: cache snap vectors, adjust snap_highwater meaning a bit
-1966276 mds: eliminate children linkages, instead maintain open_children; make split adjust open_children
-b1936b6 client: introduce snap_created to behave with out-of-order split notification to the client
-5c22b81 todos
-07c0a8b msgr: fix RESETSESSION handling
-03697af msgr: fix up global_seq handling a bit
-42eb490 mds: fix snap spitting; update caps under all active nested realms
-ee2d432 mds: basic split support
-a030e4a mds: simple mksnap
-3d098d9 mds: add snaplock
-affd4f6 client: handle_snap
-b77c0b2 mds: encode snapbl into metablob
-be77f3d client: snap_highwater, MClientSnap
-46a12aa osd: misc fixes.. basic cloning works
-8e1f254 cfixups.  niceify object_t printing
-ee43dee filer: set object snap field
-7132303 mon: use orig_src in clientmon, elsewhere
-c863b1b mon: skip osdmap update if max_osd is too small
-9e8963e pass snaps through filer, objecter.  link snaprealm to inode (not cap) in client.  fix up dirstat/inodestat encoding
-cd230f1 mds, client: group caps by realm
-6389d40 mds: attach snaprealm to CInode, encoding/decoding
-3d4e4ac mds: SnapRealm
-33c2ae0 mds: ESnap, SnapInfo
-ed4bc51 mds: introduce snaptable
-a891e8b mds: factor MDSTable out of IdAllocator
-70b3aba osd: snap cloning
-09e025b osdmap: removed_snaps
-9891cdc os: getattr to bufferptr
-f89a038 snap: fix oid.snap
-4374245 kclient: handle potential splice_dentry failure
-3dd86f8 mon: use forward_message, orig_source_inst throughout
-52117c3 msgr: introduce orig_src, forward_message()
-787a678 msgr: add global_seq to disambiguate reset and slow connect
-dae0be3 Revert "msgr: half-assed fix to msgr race vs reset issue"
-80754a5 msgr: half-assed fix to msgr race vs reset issue
-3bdcbf8 mon: reset new_value(); cancel_timers() cleanup
-149e806 mds: i missed a take_diff caller
-f443105 mon: forgot paxos_pgmap
-897069b paxos: remove old 'HI MOM'
-105ce27 mds: avoid touching dir utimes()'d mtime unless dirfrag mtime actually changes
-ed7076c test with multiple monitors
-3859475 mon: elector fixes
-e248e16 mon: fix pgstat for multiple monitors
-b970414 mds: fix dir mtime/ctime
-09dc9b4 kclient: fix up dentry if we can take i_mutex, but avoid rehashing dentry if there is no lease
-b36601b kclient: fill_trace takes i_mutex, avoids dentry if no lease
-f8801b6 osd: check if osd exists such that pg_layout=linear behaves
-7e2baa9 snap: base types
-e147a82 todos
-1629099 kclient: pass in flag indicating whether dir i_mutex is held
-f2a8d10 todos
-bde1b55 msgr: fix need_addr public/private
-3daad65 fill_trace todos
-0772d62 mds: fix dn lease issue in base/root dir
-f2f3c27 kclient: ensure materialised dentry is hashed
-db62d9d asdf
-4031bf4 vstart.sh
-73fdcdc todos
-28b9ab0 kclient: ignore ICONTENT on root inode
-565617d mds: issue per-dentry leases on base inodes, despite ICONTENT
-9ac74f8 mds: verify src and dest paths are non-empty in rename
-7e07b3a Revert "mds: fixed rename ancestor thing.. again"
-c7ba639 kclient: set min depth for ceph_build_path_dentry (fixes spurious Invalid argument errors)
-795ccbe kclient: improve osdmap decoding, error reporting
-44078a2 kclient: typos
-98bef16 kclient: make ceph_lookup_open return spliced dentry (fixes and reenables open intents); factor out a post-lookup helper
-6840401 kclient: be less noisy about dn splicing
-64f9a80 kclient: disable open intents, for now
-b1d3dbd mds: wait_for_sync for predirty/dirty cycle in try_subtree_merge_at
-c13d91b kclient: typo
-a672ab2 mds: fixed rename ancestor thing.. again
-dcb520b kclient: more helpful info for bad ceph_msg_put
-1b9f12d mds: add parent before child dentries to metablob in predirty_nested
-0748ea5 kclient: norbytes mount option; rbytes on by default
-2fa2bdb kclient: kick mds requests on mds status change
-f298e04 osd: ack ops that drop out of replica set
-4c14789 mds: fix rename ancestor check and locking
-3a1c44a todos
-f999b12 todos
-9bdc1c7 mds: more robust rename path check
-fe29675 kclient: msgr state bit cleanup
-e0d1a3f kclient: small msgr fixup
-03027bb mds: fix trimmable_at logic in try_to_expire
-b7c1cf1 kclient: clean up setup/shutdown; merge ktcp.c into messenger.c
-4b3a51a kclient: multithread
-9e1928b kclient: fix up socket handling in msgr
-34a578a kclient: use single thread for messenger
-94d6645 kclient: use d_time to track dir version
-f824c12 mds: fix dir projection on truncate
-ad6ed67 mds: debug try_to_expire
-910a605 synclient: observe data flag on import_find
-c27e27a Makefile.am, configure.ac updates for v0.3
-5be3bb5 disable string table for now
-07bdb97 cfuse: warn on 32-bit kernels
-8ff270c client: fix init() with multiple clients in proc
-3c2ae7e msgr: fix ip discovery with multiple entities in proc (csyn)
-8d074b5 missing include
-bb97d3b objectcacher: fix writeback logic to be less braindead
-038a25a dstartnew.sh
-9e1ee71 msgr: fix ip address discovery when using -m monip:port
-4a2cca4 msgr: initialize need_addr in rank.bind() instead of constructor
-8f332c1 mds: be more verbose when not found in mdsmap
-b71a6c9 osd: clean up pg creation state
-87d5220 objectcacher: avoid unnecessary flush_set calls
-0662ba2 client: bigger default objectcacher size
-38014f6 synclient: show writefile progress
-a31b052 crush: fix warning
-8837e63 osd: clean up pg_t printing
-4379d8a osd: fix up osd_auto_weight
-1817ab8 mds: commit new dirs before first mention is trimmed from journal
-9cc46e0 kclient: debug dput
-4fe1bb7 kclient: use d_materialise_unique to properly reattached renamed directories
-bb367cb kclient: revalidate dentries while constructing paths.
-7e63262 osd: do osd_auto_weight in mkfs
-caa48eb fix buffer.h headers
-43357c7 todos
-5d65fd5 kclient: never use VFS-provided dentry if d_parent is incorrect
-c517fee osd: add flags to osdmap
-3d63675 osd: shutdown cleanly on SIGHUP
-5f419e2 ebofs: fix memory leakage
-9460b75 ceph_fs.h include order tweak
-d081424 kclient: debugging d_drop
-48fa1b0 fix up includes
-b6c2f9f kclient: fix i_lock vs kmalloc in ceph_get_frag et al
-a31f0d4 mds: mark sessionmapv in LogSegment during replay
-accefdd frag: fix parens
-bd14bb1 todos
-b9f88f4 mds: fix frag replay
-a739997 frag: fix bug in force_to_leaf
-32c2507 mds: disable authpin debugging
-69311a6 mds: fix fragstat accounting across dirfrag splits
-967e871 string table
-0c75f12 mds: use nstring class
-d9153d5 mds: stop munging hash
-7e559a7 frag: remove old cruft
-500cc16 mds: auth_pin dir we are projecting in predirty_nested
-416cac1 new frag encoding uses _most_ significant bits.
-c9108d3 mds: rdlock dft during readdir
-caa8701 fix frag_next, using lame old frag encoding strategy
-39ea428 mds: added auth_pin debugging; fixed auth_pin leak in scatter_writebehind
-86c9667 mds: frag fixups.  but there is a lost auth_pin somewhere...
-c58ea2e mds: some initial dirfrag cleanups
-8577351 more
-2c5a57b asdf
-450c169 store data and metadata in separate pg_pools; name crush rules
-2615072 mds: move inode_t et al to mdstypes.h; remove inode_t from osdc/*
-9471cc9 more
-2ddd136 more notes
-3c0af16 more notes
-2d10b13 filestore: mask SIGINT, SIGTERM to (somewhat) protect transactions
-06d43b7 os: remove read ops from transactions
-bfe3ca5 filestore: alternative btrfs usertrans ioctl
-6da0358 notes
-f57b15f mds: make scatter gather completion skip fragstat/accounted_fragstat differential when version is old (i.e. it was already counted)
-b2e1d27 mds: wait for journal safe for import/export
-4daed64 journaler: ack barriers
-9224945 journaler: wait for ack and safe.. ack_pos flushed thing still wonky tho
-02fa8b0 todo
-3f3b226 osd: write full maps out outside of advance_map transaction
-a5f2869 kclient: close wanted->needed cap transition ordering hole
-a871bc7 kclient: avoid sending renew to non-active mds
-70e4361 kclient: small cleanup
-b80e4e7 asdf
-ba8507a kclient: tolerate starting peer with 0.0.0.0 addr
-0670d2a kclient: ClearPagePrivate more aggressively in invalidatepage
-0128992 kclient: simplify osdmap array allocation
-0894862 kclient: add mount_attempts mount option
-be22b3e kclient: fix mount failure unwinding
-8f81b27 kclient: fix bad socket_put on connect error
-d001319 kclient: more debug info in osdc
-cc0e252 mds: fix FileLock can_wrlock
-adeaca9 mds: fix ScatterLock can_wrlock
-69324ab mds: clean up old mtime cruft, bug
-de49815 some cap todos done
-9d44676 crush: add a few assertions to catch badness early
-592df8b client: some cap cleanup
-0ffe9df kclient: cap import/export, some cleanups
-14e2b0f client: simplify caps import/export behavior
-d683eca client: fixed up cap import/exports.  still need to deal with mds failures.
-6c2f711 mds: slight cleanup of client reconnect failures
-c1eceb6 allow lease duration to exceed session timeout
-2d9726e kclient: replace ceph_read/write with aio_read/write
-0131536 mds: disable rename test hack
-65accca kclient: fix crush cleanup
-f820605 kclient: simplify no-xattr encoding a bit
-d4b7c6f client: ignore STALE session msg for nwo
-ea69719 filer: fix file size probing
-ae09ad0 mon: use fcntl F_SETLK instead of flock
-1e55175 mds todos
-287b5d2 mds: another FileLock fix; call predirty_nested with correct args everywhere
-fc0e7a5 mds: fix FileLock handling of loner vs lock on replicas
-b1bcbb4 kclient: default to osd acks instead of safe, for now
-714a518 client: ignore STALE session msg for nwo
-6e04fdb mds: more scatter fiddling
-0f4741f filer: fix file size probing
-941ccc3 todos
-c136fb7 mds: lock NUDGE op that is tolerant of ambiguous/migrating auth
-af16e96 mds: propagation basically behaving
-68b3b21 mds: scatter tweaks; take auth_pins along with predirty_nested locks
-0dfca47 mds: rip out autoscatter nonsense
-5bff884 mds: cleaned up scatter_nudge
-1c0355a mds: half-finished scatter timeouts
-f4d22e8 kclient: simplify no-xattr encoding a bit
-8474665 mds: fragstat rejoin basically works...
-4eb6dd2 mds: fixed up master commit stuff
-5b6d568 mds: fix resolution, trimming of master requests with slaves
-4dac277 mds: check/take versionlock along with wrlock in predirty_nested
-db02ed7 mds: rollback fix.  avoid scatterlock change during rejoin.
-5126710 mds: show fragstat
-a8b1118 mds: rename rollback closer..
-ef89aec mds: rename exports behave in non-failure case
-2dbc067 paxos: add timeout to collect stage
-4307f79 mds: rename rollback coded, untested.  but the inode import/export is fundamentally broken...
-c220c34 mds: kick discovers on mds recovery too, not just failure
-7d78042 mds: fixed unlink journaling
-6a18bf4 mds: fix resolve bug
-01d813b mds: verified slave failure is tolerated. fixed remote_auth_pin rejoin bug.
-7ad7233 mds: link rollback works.  nested anchor, replay fixups.
-82199a3 mds: do rollback.  unlink done, untested.
-01df6cd mds: fixed up accounting bugs with scatterlock
-05ab69b mds: fixed various predirty_nested problems, rename, straydir locking.  temp fragstat sanity checks.
-2e7bc80 mds: fix nested update in rename
-8158aa4 mds: include time_warp_seq in inode_t encoding
-f67021e mds: use dn_hash in anchor records instead of frag_t (which may change)
-fb922ed synclient: make walk do some basic dirstat verification
-47d1db1 mds: fix rmdir to correctly and safely verify directories are empty prior to removal
-9595584 mds: check auth bit in unscatter_autoscattered
-1d17508 mds: many many scatterlock fixes
-c684e1c kclient: fixed msgr connection refcounting, and some cleanups
-68c488e kclient: fix osdc request kicking
-0fa7fc8 kclient: fix division lameness in calc_file_object_mapping
-cff97a9 mds: fix conditional for srci export finish (didnt account for link merge)
-6278968 mds: create, adjust anchors more carefully (esp for directories)
-f16b6d7 pack struct ceph_object
-1c2febc kclient: fix up kobj for 2.6.24
-a56953a mds: make cache track nested anchors
-5341c8c mds: remove old predirty_dn_dir code
-c42e6f4 mds: recursive counts for anchors
-353f41c todos
-4c44566 mds: some remote rename fixes, more to come
-2f61c4c mds: yet another rename rewrite (tested locally)
-e01d426 mds: fix up open_remote_ino_2 to open remote stray, root if necessary
-a7eef2d mds: dont xlock dirlock on rename
-48316ed mds: initialize projected_version
-2bc0cfe mds: avoid rename straydn when merging links
-bc8873a client: fix relink, memory leak in dcache
-da3e9f3 mds: disable fragments, for now
-3e2a640 kclient: make it static
-b82c709 mds: fixed stray reintegration (rename should not change nlink, dir mtime)
-b9fd37a mds: fixed locker wait bug
-23a88ee client: fix relink, memory leak in dcache
-acb3828 mds: partial accounting during split
-151ba23 mds: disable fragments, for now
-fdec4c4 mds: fix up filelock state encoders to include time_warp_seq, max_size
-cde2c54 synclient: thrashlinks mixup
-d099ac0 mds: remote link/unlink behaving well enough. various bugfixes.
-40cee8f mds: set dirty flag when subtree root dirfrag gets scatter
-6781093 kclient: wrap socket in refcounting kobject
-f4c976a mds: avoid file size probe when size >= max_size
-01af201 mds: scatter writebehind cleanup.
-98ed030 mds: wrlock straydir on unlink
-595f4bd mds: fill out calls in server
-9915bd5 mds: remove nestedlock
-e71096f mds: moree type cleanup; dirlock encoder/decoder
-d0630d5 mds: simplify frag_info_t typing
-3eb47ba mds: set_updated on scatterlocks
-f0deeb3 mds: no need for nestedlock
-6fc0627 kclient: (unnested) file/subdir stats for dir, too
-e532700 kclient: get nesting stats w/ cat dir
-6b4003a mds: remote unlink
-a8913af mds: unlink_local fixed up, still need to do remote
-8281790 mds: remove bogus assert
-ddf1d81 mds: rename sorta redone
-db7c137 mds: cleaned up link/unlink accounting a bit
-6951563 kclient: end_page_writeback w/ page still locked
-3233ebd mds: link/unlink behaving
-5b6a007 off_t -> __u64 throughout osd/os/ebofs
-7db671f client: larger default cache
-7e58420 kclient: use current->fsuid
-2617baf client: return proper error for getxattr
-cdbfce4 client: set st_blocks correctly
-d8e588b client: return proper error for getxattr
-5d5be41 client: take nested
-b8ae3cd mds: send rsubdirs to client
-31dd781 mds: openc uses predirty_nested
-b44c7c9 mds: mknod/mkdir behave
-e3b0ae1 mds: put accounted_nested in fnode.  clean up locker interface a bit.
-4b3e3d7 mds: pass force down into get_wrlock()
-9379c95 mds: unmarry cdir projected_versoin vs project_fnode; pull Mutation out of MDRequest
-0363b72 mds: fix cdir dirtying, for mknod at least
-3598858 mds: added fnode_t.  compiles, but untested.
-076d902 mds: move predirty_nested into locker, and update with file size
-89ca370 mds: some prelim nesting updates
-5a181af mds: fix lock WAIT masks
-1d4cde4 some fixups
-523d184 mds: more nesting lock, data type work
-f5a7b8d mds: initial nested lock types, inode fields
-7884972 kclient: fix radix_tree_preload vs preempt behavior
-6cb7994 vstartnew.sh: jsut 1 node
-cbf7595 kclient: partial fixes for PREEMPT
-0887302 client: only user.* xattrs for now
-539897f mds: pass force flag down to file_wrlock_start
-0c4428a mon: be more tolerant of mds states
-574ad08 kclient: only allow user.* xattrs for now
-1ee58d1 osd: some push/pull cleanup
-0855e56 filestore: use user.* xattrs.  correctly.
-ae8b814 osd: don't send msgs to down osds, unless its a map telling them they're dead
-e3d13ec filestore: more carefully check that xattrs work
-cffb323 msgr: lazy_send_message
-d27fe45 object: pack
-3a91173 kclient: increment i_version on inode update
-e08d566 osd: don't send messages to down osds; enforce in OSDMap::get_inst()
-07c56b8 objectstore: remove list_objects
-d52912e objectstore: change interface to include mandatory coll_t
-9cd7eaa csyn: chunk stub
-9893725 csyn chunk stub
-08900c3 cas stubs
-90435d1 kclient: release ICONTENT in ceph_open
-cd4ae79 kclient: add ceph_aio_write (instead of generic) to take cap refs
-66af8d4 kclient: ioctl stub
-1b9a6a0 remove libattr1-dev dependency; check for sys/xattr.h in configure.ac
-83015d3 makefile: fixups
-836c1df ebofs: fix table corruption bug
-59c757c filestore, not fakestore.  add os/ dir
-1b509d1 mon: shutdown cleanup.  fixed leak of MOSDFailure.
-7885879 msgr: kill off replaced connection threads
-61b4a65 osd: fix fakestore error msg
-ed00cd7 mon: keep sorted pg list for benefit of dump
-12f0c1f osd: fix osd_lock deadlock from activate_pg()
-bb4ad56 osd: update pg stats more reliably
-59d3479 cmonctl: stdout, not stderr
-466d94f osd: replay cleanup, send_alive fix
-5ff0c24 cmonctl: -o -
-335bc04 osd: clear hml
-d350bad mon: lock monitorstore
-77e943a mon: pg dump
-f7c3da3 osd: fix project_pg_history off-by-one bugs
-fb63853 kclient: unsafewrites mount flag
-7aa5745 osd: include history in mkpg INFO query
-a4f95a0 kclient: xattrs
-e45e700 buffer: fix 0-byte bufferptr behavior, encoding
-20a14ad mds: handle empty xattrs
-32535f8 mds: fix replay of xattrs
-9567c8d mds: xattr ops.  works.
-16a9e8c client: xattr ops, fuse hooks
-764630e mds: basic xattr map, lock
-49b30c1 mds: clean up file_sync(); initiate file size recovery on any filelock state change
-1a64c29 msgr: always replace existing lossy connections
-163cc12 osd: retry all reports to monitor; pg stat feedback; min_rep; no simple osdmap domains unless >8 osds
-3c2a8b0 kclient: wait for SAFE on buffered writes
-e2689c8 mon: pg debug output
-59c20f4 osd: finish_recovery in peer() if already active, as with late info from stray
-4fc0345 osd: read_superblock cleanup.  purge_strays() is generic
-aed2e8b mon: trim old paxos state values.  just pgmap, for now
-90b7952 paxos: invalidate lease in handle_commit, because we're paranoid
-1864a1b osd: clean up pg change slightly
-f325d85 osd: remove adjust_prior; fold crash logic into build_prior
-9da2079 osd: remove old adjust_prior assertion
-ac1ed4f osd: swap instead of copy big query list
-56332f0 todos
-b12353e osd: fix adjust_prior assert; clear peer_missing_requested in clear_primary_state
-6a1a840 osd: remove last_epoch_started_any
-3cf58e7 osd: clean up output
-f220c5a osd: add osd_up_from to osdmap; mostly rewrote build_prior
-e65cd43 osd: fix pg entry log encoding
-01ce583 osd: move epoch_created, last_epoch_started into History
-c9a3e5c client: add reported_size
-9a9390e kclient: update reported_size with size, in helper
-f5363e4 zero inode_t in containing classes' constructors
-63b9c88 client: fix time_warp_seq debug output
-b49e55b client: turn down refcount debugging
-4b7d6e2 config.cc: better write_file.  and no more -o
-0cbd6b3 kclient: d_find_alias takes a ref; drop it
-1b72415 kclient: fix warnings
-3e24c4d client: fix warnings
-3afa091 kclient: d_find_alias takes a ref; drop it
-79e1184 kclient: use helper to update size/ctime/mtime/atime in cap grant and fill_inode paths
-9321bc4 client: use helper to fill inode file info in safely
-ba1232d todos
-636edcc client: killed FileCache
-d1f9f67 mds: pick up mtime changes with EXCL, not just WR|WRBUFFER
-760f86e kclient: fix time_warp_seq behavior in fill_inode, cap_grant
-675a8ad no FileCache for writes
-8642ea0 client: flush commits for caching mode behaves?
-df16bc2 client: client_oc=0 writes work
-49dd675 more
-1c4343f tearing up client cap code
-73a668c client: obey and request max_size for client_oc=0 mode
-fb6d02a mds: file size recovery when client goes stale
-0fb028f msgr: trust peer_addr based on port+pid if s_addr=0, to avoid weird ip-less startup races
-d564eb0 mds: recover file sizes on mds recovery
-139f497 mds: disable fragmentation for now, until the replay bug gets fixed
-86c1f6f kclient: use d_find_alias in ceph_open
-200ec57 mds: vastly simplify locker file_lock, file_mixed, file_loner
-207e057 mds: fix gather deadlock in FileLock
-9e94718 client: implement fsync() for cache-disabled mode
-24f9335 kclient: fix getattr.  dont rehash everything in fill_trace
-3005916 kclient: brehash more aggressively in fill_trace, and be more cautious with USE_CAP_MDS in getattr
-1b2296e osd: make it MOSDAlive, and respond with new osdmap
-ba65cd7 osd: put full precision ps in osd ops; keep in mind that ps -> pg mapping may shift as osdmap is updated
-8b1f3fa journaler: throw error on len=0 entry
-90c8550 osd: add alive_thru to map; use MOSDIn to bump it in osdmon
-41979e6 journaler: bit more debug output
-d8e2257 osd: sync on advance/activate_map
-891454b make object a union
-46e57e7 160-bit object_t (64-bit rev)
-725e26b mds: count nonstale caps only in Locker::file_loner() assert
-1a67fc2 helper script readme
-fc85ec5 kclient: comments.  undo stupid in dir.c
-1865b7e rearrange mkfs/start scripts a bit
-f49f6b5 ebofs: redefine derr(x) macro in bdev
-c781fd3 kclient: handle mds replies on write ops with empty trace
-77869d9 mds: eliminate OP_CREATE; make open O_TRUNC|O_CREAT retry behave
-3114ad9 msgr: use accessor to set addrless entity's addr
-fce9513 mds: don't export or split unlinked dirs in stray
-5cc9102 make kernel client request redirection work
-7096b6d mds: mark replication messages unsolicited to avoid confusing discover reply handler
-ea5a039 kclient: nfs fh encoding cleanup
-6e4ae00 kclient: use ceph_inopath_item type when building fhs
-7167822 kclient: mark mds requests with dentry to direct to proper mds
-cac204f osd: more debug output in handle_pg_notify
-bf886e1 auto-detect ip for all non-monitor components from initial exchange with monitor
-2e030e2 todos
-ba6e926 kclient: make readdir handle fragments
-2d7532c kclient: tolerate release on null sock
-0b409b5 inopath goof in MClientRequest
-ed1748f build fat nfs handles, and add mds GETINODE op to resolve them
-1930d85 client: fixed signedness
-bbb62df mds: dont bother with small inos anymore
-086cebd mds: __u32, not long
-9de61f0 kclient: add fragtree, mds delegation/replication info to ceph_inode_info
-4204d3a kclient: cleanup
-5b37daf kclient: export ops should use ceph_find_inode
-d2547d2 more int size cleanup
-8baf844 journaler: dont use off_t
-669ed0c mds: fixed EImportStart bug (cmapv not set)
-7358742 mds: clean up MExportDir encoding
-c81493b mds: clean up startup, state transitions
-529f354 mon: expand mds cluster if max_mds increases
-84a4744 default to out/ output if daemonizing
-b04519e mds: fix EMetaBlob encoding bug
-eaa7517 todo.. done!
-3121ac9 cosmetic macro rename for consistent naming
-2585276 changes some ints to __u32 or __s32
-2dd0c93 removed old buffer encoders entirely!
-c23747f mds: tons of encoding changes
-1479fe8 fixed encoding for remaining non-mds messages
-88d4fff fixed mon message encoding
-b8f5dcb fixed osd message encoding
-657c28a pg encoding cleanup
-2fdb0a6 kclient: left off *HZ on mds session ttl
-0351d56 mon: new encoding throughout
-4e13cd0 mds: fix encoding
-5687ac2 fix up mds map requests, kclient mds timeouts
-4ae3dfb fully removed encodable.h
-ee51055 crushwrapper and a few others
-6f33e06 mds: time out reconnect
-ef52658 kclient: another dumb typo
-b1764fe kclient: fix osdc kick_requests spinlocking.  and handle copy_to/from_user faults
-3ca0f4b mds: typo
-965b0d4 mds: normalize _xlock_finish
-ed523d0 kclient: create -> mknod sets S_IFREG.  debug mode.
-80c023f mds: wake rdlock waiters on xlock_finish
-f56a91d kclient: fix up mdsc spinlocking a bit
-cd5cd72 mds: fix can_rdlock_soon vs xlock on FileLock
-2b5f76f (tag: v0.2) readme
-7f9f1ea kclient: use d_splice_alias in prepopulate
-41443ce kclient: create fall back to mknod if no nameidata (as with nfs-kernel-server)
-5e5ed11 kclient: drop nameidata printk
-0ce7360 kclient: remove unnecessary flush/truncate bits from flush_write_caps
-70855bd kclient: drop r_old_dentry ref in put_request
-041e838 kclient: remove weird igrab/iput pair in unlink
-44b33ef kclient: slight cleanup of do_lookup ENOENT handler
-e1b2a0c kclient: fill_trace now uses d_splice_alias
-9f44718 kclient: fix dentry ref leak in dn lease revocation
-8618e69 mds: stop gratuitously issuing dn leases
-36b5f8e kclient: simplify unlink
-c9f8443 kclient: clean out cap_delay_list on umount
-9a38a65 kclient: sync stop osdc timeout timer on shutdown
-5612e99 kclient: fix page redirtying when writeback is canceled
-2db61e2 kclient: osdc cancel timeout work _a_sync, to avoid deadlock
-a296989 introduce time_warp_seq to EXCL utimes() + cap release vs file_cap/fill_inode races
-2a71df2 kclient: fix page revocation for osdc reads
-02e6805 kclient: kmap in messenger read path
-d24423c kclient: unwind lock on enomem
-951ed44 kclient: fix missed pages for redirty in writepages
-edfae42 mds: fix client session lru
-4e1c55e mds: retry client messages indefinitely, since mds has its own timeout/markdown mechanism
-aad04da todos
-751116c kclient: fix message skipping
-56c5eab kclient: handle revoked pages in read msg
-7936815 kclient: clean up mtime/size attribute updates in fill_inode
-e3e957f kclient: turn down dirty page debug output
-bc33ca2 kclient: fixed up dirty page accounting.  hopefully.
-d2948bc kclient: fix leaking page refs in writepages?
-1ce1380 kclient: dirty page accounting hell
-eaf4610 disable ccgnu2 (for atomic_t) by default, as it seems to be buggy!
-7c9cd59 kclient: trivially clean up cap_trunc
-7e48dec kclient: more truncate tomfoolery
-ae72852 kclient: use vmtruncate; do cap trunc via wq to avoid i_mutex deadlock
-c744c06 kclient: only truncate fwd with EXCL; normal truncations require cleaning up of old objects etc. by the mds...
-d95c80a utime from float conversion fix
-e239107 fakestore: fix error values
-af84bc0 kclient: munging up umount a bit, not real change tho
-9649878 mds: fix stale cap revoke/resume
-decee63 kclient: check caps outside mdsc spinlock
-9f0287e kclient: improved dirty page accounting (supports mmap writes)
-955a0ce kclient: mucking with dirty page accounting
-0ff33ac mds: check max size on truncate, in case we truncate forward
-820d675 kclient: ping mds a bit more aggressively when we hit max_size
-3854ce1 kclient: show outgoing msg seq #s
-bb2b4e1 kclient: zero leftovers for partial page write
-b7b94d4 client: include lease msgs in mds session seq, so that umount is clean
-1965cee client: cleaned up mds sessions a bit
-1f681b5 fix cap stale/resume in mds, kclient.
-33a9fd5 kclient: misc cleanup
-4f0b975 kclient: small mdsc cleanup
-0bb16d3 kclient: removed spurious unlock in mdsc forward handler
-6433ae8 kclient: quiet down on unmount
-4a732cb kclient: put delayed caps on single queue, use existing mdsc delayed work handler
-fc74337 kclient: fixed some bugs in messenger shutdown
-b0241b6 mds: fix hang on FileLock transition to LOCK
-c630feb kclient: drop s_mutex in __ceph_mdsc_send_cap
-6c9fece kclient: check for corrupt osd_op_reply
-c698bcc fixed
-3a91404 more crap
-b10b5d2 buncha encoding
-a431df3 todos
-4793748 kclient: typo
-629f053 kclient: take spinlock while processing acks in msgr
-52bc7ef increase default pg_bits
-910e366 kclient: fix double mutex unlock in check_caps
-d141049 automagic endian conversions for userland
-d622e9e final type munging in ceph_fs.h
-80373f3 fix up mds reply types
-e3b0003 kclient: tear down /proc/fs/ceph on exit
-74bd345 type hell
-bf4fb4f kclient: switch mds sessions s_mutex to struct mutex
-6b9c420 kclient: merged client.c and super.c
-096f854 kclient: fix reset_connection
-965d58f kclient: remove delay ack hack in msgr
-1ec7f0f kclient: use MSG_MORE flag appropriately with sendmsg
-cb6c75a kclient: oops, be quiet
-6094787 kclient: fixed various msgr bugs on incoming connections
-5b8e0e2 kclient: fix mds reconnect for caps on dentryless inodes
-5290162 simplify mds session caps stale/resume
-e6e489b kclient: deal with osdc abort vs kick races; revoke pages on msg dup
-bee75a9 kclient: some msgr cleanups
-90ccceb kclient: msgr shutdown fix, warn on enomem
-8c025b9 kclient: disable sysfs for < 2.6.25
-2589ac2 kclient: beginnings of sysfs
-3819a6e kclient: cancel work while shutting down
-42cf9a9 kclient: osdc tid output
-0749693 kclient: proc entry for debug_console
-5158d4e kclient: fixed do_lookup dentry refcount problem
-4d4cb9b kclient: fixed up page revocation
-4617c72 kclient: only do footer with data payloads
-8a40eef add message footer.  kclient safely revokes pages away from sending ceph_msg
-39a1bd4 synclient: fix size print
-19a7ab3 kclient: fix calc_pages_for
-e0b8b28 kclient: clean  up req refcounting in osdc
-aec4cb6 kclient: fix up write endoff vs max_size logic
-c25711a kclient: rdo_lookup returns dentry
-60cfda5 kclient: fixed dentry lease revocation
-9fe96f9 kclient: lots of jiffies fixups
-8e22b29 kclient: drop leases before kill_anon_super
-9d5555b kclient: drop readdir cache on rewinddir()
-321c80b fakestore: copy if theres no splice
-07517da kclient: i_blocks is _sectors_, not blocks.  naturally.
-18bc338 fakestore: clone, using either btrfs clone or splice
-46d5965 kclient: d_add only in do_lookup
-38de820 kclient: handle traces that dont start at root (e.g. unlinked, stray inodes)
-5a5eefc kclient: lease ttl fix, again
-d4d8246 kclient: fix inode lease revocation bug
-9769e8e kclient: debug d_move
-0cad544 kclient: mdsc dentry lease release bug
-263260d kclient: fix lease time comparison
-e15dfb4 kclient: flush write caps on umount; refactor send_cap code out of ceph_check_cap
-4dda4e2 client: handle cap msg on missing inode
-be5d919 kclient: improved kmap/kunmap behavior
-652865b kclient: warn in osdc if osd request is interrupted
-544c8bb vstart msgs on osds
-93d3197 kclient: better
-e041ba6 kclient: GFP_NOFS on sockets
-c83b1fc kclient: KERN_ERR for debug_console
-3bf3290 kclient: adjust debug levels, add debug_console mount option
-e0b75a2 objecter: fix tid handling so that we want for ack AND commit
-0b1bd64 kclient: some msgr cleanups
-633ee9c kclient: statfs cleanup
-dee905d client: some cap release cleanup
-52c4c0f kclient: reset session cap seq # on reconnect
-b9ccdf0 mds: allow client to carry WRBUFFER during FileLock LOCK (== faster stat on files open for write)
-a607976 mds: fix max_allowed_caps_ever, and small issue_caps fixups
-52036f2 client: fix default cwd so that relative paths always work
-f7eaf50 kclient: debug_addr mount option
-f537f99 kclient: osdc fixed circular lock dependency
-f780afe kclient: cleanup mount/umount a bit
-3118122 kclient: GFP_NOFS
-ccd9758 kclient: fix lease regression 2
-e1bfa84 kclient: fix lease regression
-2e2db63 mds: fix cap bit calculation
-f019f5b kclient: declare wanted_max_size properly
-fb1b64e osd: autodetect ebofs vs fakestore by mode bits
-f2139f2 objectcacher: dont count dirty pages as RDCACHE
-5e6c6a0 fakestore: fixed up btrfs ioctls
-d1dba21 ebofs: fixed up test, mkfs tools
-1b22378 fakestore: btrfs ioctls, take 1
-28b023f transaction start/end stubs
-9ad5655 todos
-c6be01c kclient: moved ceph_fs.h for easier out-of-tree build as module
-9949c8c kclient: fix ktcp warningf
-45f3661 kclient: clear socket callbacks before releasing
-24af0c8 kclient: mark osd retries as such
-a20c9bf kclient: reset cap seq on mds reconnect
-266c955 kclient: fixed mds client session handling, request kicking
-8e7e3bf kclient: osdc properly note down osds
-4f2ed08 client: fix mds opcode generation
-5db85f8 filepath: a few fixes
-e2aa8a9 kclient: osd timeouts; also cleaned up MOSDGetMap and map request handling
-5e78d40 kclient: msgr drop msg references when connect is dropped
-06ae99f todos
-453fcea kclient: proper cap lifetimes, and fixed session resume
-e7e500a mds: locker fix
-7b5b686 kclient: simplify dentry lease revocation a bit
-4b43810 kclient: fh_to_parent
-dec0ba7 kclient: clean up method naming
-e6f5a7f kclient: basic nfs export support
-35036a1 kclient: fix update_inode_lease ttl bug
-22f4265 kclient: remove dput debug crap
-0457783 client: report large blocksize
-7cdcae2 fixed up getattr
-ea95dfc kclient: handle tag_retry
-5ea7c55 kclient: umount unregisters with monitor
-fdc529a client: clean up follow vs not follow links
-35226f3 clean up mds ops and follow symlink semantics
-7247154 mds: pretty much never follow trailing symlink
-16fe3c1 huge client and filepath cleanup
-ccb9e49 filepath cleanup
-3eb71dd crushtool: wrong type
-f377735 kclient: fix lease release, fix truncate, set iops on non-directories
-9043437 mds: a couple truncate bugs
-fb586a4 missing include for 2.6.25
-4fc9136 more debug output
-94003dd kclient: update local ctime when adoing setattr locally
-892ac54 vstart.sh
-7fbe9f4 kclient: send debug output to syslog, not console
-22df837 kclient: changed per-ci delayed work cancellation
-7d3c683 kclient: combine ack with message; send ack of >1 received
-11b96a8 kclient: send msgr acks
-bc84a35 Revert "kclient: track in_seq"
-dea7a88 debugging
-24a220e mds: some locking fixups
-4a15a83 m4: lower automake req version
-c2f3e22 kclient: track in_seq
-6e12615 kclient: fixed lease release bug
-22ebd6e kclient: compensate for open flags munging done by vfs
-93d9219 style fixups... no more complaints from checkpatch.pl
-c0b3ca8 kclient: obey ATTR_FILE on any setattr, even tho only truncate sets it; allow [am]time increases with CAP_WR
-34f45f7 kclient: writepages should return 0
-f615fe7 kclient: fsync returns 0 (fixes final vi issue)
-f066de8 kclient: fill_trace null deref
-9e7f2a1 consolidate and clean up FILE_CAPS
-8fea869 kclient: apply_truncate does not verify limits for cap messages
-b328a10 kclient: refactoring of setattr, apply_truncate removes pages from pagecache
-92559b1 msgr: send signal to reader_thread to ensure it wakes up on shutdown
-636cf0d kclient: mdsc delayed_work avoid null pointer use
-ea5a699 objecter: clean up correctly after compound writes
-f132907 mds: wake up waiting requests when we go active
-f549bbf kclient: mds session tweaks
-49c14ac crushtool basically working
-f23b791 kclient: clean up some debug output
-59fd1e0 kclient: make osd ops interruptible
-5791415 todos
-229c7eb kclient: simple fsync, splice
-2624253 kclient: unlock page in readpage
-e93e65c mds: simplelock should wait for rdlocks to drop before going to LOCK
-006a55c adjust verbosity
-f3be916 msgr: don't try to write/ack on standby
-54fba8c kclient: fixed msgr short write bug
-230e136 mds: wait for STABLE, not WR, when we can't wrlock
-66c97dc kclient: cancel old work before rescheduling
-934cf88 client: lazy should wait on correct waitlist
-6b83335 buffer iterator fixed
-279fc3b kclient: trim expired dentry and inode leases
-5e29aba kclient: fix cap delayed_work inode refcounting
-54a219c kclient: atomically handle fmode refcounts (untested)
-2690195 kclient: invalidate pages outside i_lock; carry inode ref for delayed work
-67d97ce kclient: misc ktcp cleanups
-c72bd6c kclient: take lock in ceph_cap_delayed_work
-4693752 kclient: quieter
-0cfa8e5 kclient: added missing put_session in msg handler
-1f4c8dc kclient: fix misplaced put_session slab corruption bug
-1e7c5b7 kclient: fix up msg refcounting
-c1d3efb kclient: force dir open flags to O_DIRECTORY...hrm
-e4fd5b7 kclient: delay cap release, and re-use on open
-7ffe310 mds: issue CAP_PIN always
-dff2eff kclient: addr cleanup
-a1abca4 psim crush placement sim
-3a351ba kclient: reuse directory cap_pins when we can
-123aba6 message names
-9832048 kclient: rewrote readdir_prepopulate
-979fb53 todos
-1a62a11 include version in mds reply
-1ace9b5 mds: initial inode.version is 1
-f373483 kclient: use list_del_init generously in msgr
-86c346b kclient: allocate correctly sized get(osd|mds)map messages
-21ab131 journaler: disable batching by default
-273a387 kclient: reorder mdsc delayed work wrt spinlocks
-7462630 mds: truncate can _increase_ file size, too!
-dcaa1b3 kclient: dont die (immediately) if we get a reply with no trace
-dfa0d82 kclient: fix spinlock stupid
-68f035b kclient: fix up cap vs session locking mess with s_mutex
-53349f2 bufferlist: clear last_p iterator when appropriate
-10bd525 mds: delay eval_gather until after lease removal
-bf640a7 msgr: dont close(-1)
-4810346 msgr: fix peer address determination
-e4ad822 kclient: missing spin_unlock
-ed7ae87 mds: uninit value
-38b3fb2 kclient: use wait queue instead of completion on mount
-ea4b4d3 kclient: nicer msgr debug output
-b00d44f mon: dont freak out when last_beacon has a failed mds in it
-45c84a4 encode ctime in MClientFileCaps
-ef0104c buffer: be a bit pedantic about buffer::ptr assignment
-f50d8ca mds: set request timestamp for readdir
-e33291f todos
-5aedd2a client: carefully evaluate whether out size is valid during read
-882877c mds: do not issue new EXCL is size|mtime are projected
-0f1b144 kclient: fix renewcaps delay
-21ba23b only start up a single osd for testing
-7b7d85c next steo is pass a map along with crush to store offloads
-53e01d4 needs its own item number
-741961b mds: be more careful about updating inode.max_size
-16bc6f2 mds: dont be stupid
-5dcce28 more encoding fun
-6f08bed monmap
-cfa62ea kclient: separate thread/workqueue to do inode writeback
-28f6aaf mds: pipe down
-f43cc2f pack ceph_mds_request_head properly
-d23980d new encoding header
-a41fe97 mkcephfs
-0734aae client: basic O_APPEND support
-6e5b292 todos
-187b84d osd: take out last_epoch_finished.. its not used anymore
-362846f kclient: request max_size explicitly went necessary
-07421c6 tag MMDSMap with fsid
-ebae73f kclient: request larger max_size when needed (not done yet)
-02d7e8d mds: allow client to request a larger max_size
-dd9206b mds: fix max_size (again); move from loner to mixed when multiple writers
-998ce13 kclient: made pdflush do our dirty work
-d518b59 kclient: oops, fix write size
-ace25a7 configure.ac: check for boost/spirit.hpp
-3a5b2af mds: tweak file_max increase
-10e21dc kclient: use inode_set_size helper to keep i_blocks accurate
-81c4aaa kclient: send mds a cap message when we approach file_max
-a6283d0 kclient: obey max_size, and return current size/mtime/atime when acking with re-used cap msg
-5ebd85f mds: only allow ctime to increase monotonically
-249eeba buffer: throw assertion when mmap allocations fail
-4546904 buffer: throw assertion when posix_memalign allocations fail
-902ac7e mon: send incremental (not full) map to seed osd cluster with new maps
-552a441 osd: be more careful about noticing osds go down and updating timers etc appropriately
-132bbec monmaptool: srand when generating fsid
-9269ea6 mon: apply osdmap updates to pg_map osd_stat
-6096683 cmon: set msgr policies
-8682236 msgr: apply policy to incoming connections too, based on first message
-366df44 mon: send new clients monmap before osd, mds maps
-98df3c7 kclient: renew caps twice as often for now (to counteract slow clock on uml)
-47f7d3a a bit of redo of timer events to resend map requests
-746a1d5 msgr policies; osds now batch and retry failure reports
-5c64c1e kclient: parse+verify fsid in osdmap message
-5a98bb8 mon: include fsid in most mon, map messages
-207494e tag monitor messages with fsid
-8260ed2 kclient: reverting ctime changes -- mds controls the ctime value
-0e50b5f kclient: fix typo
-e515cdf kclient: ctime updates handled differently
-f16e992 client: missing semicolon
-144fc72 kclient: some more ctime changes
-918a2da client: add utime mask
-1a562f3 kclient: some cleanups
-9deb362 kclient: invalidate pages when dropping RDCACHE
-474108b kclient: export ceph_debug_msgr to /proc
-544a8b2 kclient: fix statfs units
-7b5a0f2 todos
-65e4503 kclient: utime handle ctime updates too
-077d32d kclient: don't use release_pages; it isn't exported to modules
-b00100c mds: only increase file_max if filelock is wrlockable
-2302510 mds: fix rename dirtying goofup
-b70ebdf kclient: try to carry CAP_EXCL when we buffer data, even if file is now closed
-f9d55e9 kclient: fix cap revocation/release logic
-9aab71c kclient: carry CAP_WRBUFFER until writeback completes
-527c1cf kclient: carry CAP_WRBUFFER until writeback completes
-7ea89a1 mds: update renamed inode ctime
-a411d75 kclient: fix d_move invocation (reuse old_dentry)
-dc7f866 mds: update dir mtime on open + O_CREAT
-1bc66c3 mds: wrlock dir mtime on create, even if neg dentry exists
-b54710b kclient: use provided mode, or mask against current->fs->umask, on path_lookup_open (possible create)
-227d781 mds: fix legal mode mask
-ed364e1 kclient: use current->e[ug]id
-8a0ba55 kclient: check for ENAMETOOLONG in lookup
-3ebeb81 mds: mask mode on chmod properly
-2672502 kclient: validate uid/gid on setattr
-eea1c90 Added delayed_worky
-7e03bd6 removed some junk..
-95053ee kclient: do rename d_move in ceph_fill_trace
-c6226f0 Added timer event to periodically resend map request
-a3bc73b kclient: make fill_trace cope a bit better with mis-linked dentries
-ad150d5 kclient: linux seems to treat an illegal combinatino of O_RDWR, O_WRONLY and O_RDONLY as O_RDWR, strangely
-16b823b mds: simplify link_remote_inode interface slightly
-8472d3a kclient: tracking, delayed ack for cap revocation
-632331f kclient: apply_truncate helper, used by setattr and handle_cap_trunc
-2af40a2 kclient: avoid mds op if lease indicates utimes() is a no-op
-c6e1401 kclient: factor out dentry and inode lease validation
-028e44f kclient: fixed writepages bug.. writeback works now.  use ceph_write_begin and simple_write_end.
-986c9a7 kclient: ok writeback works, with small wsize.  simple_write_{begin,end}.
-d5d942e kclient: avoid leaving pages pinned in writepages
-9f0c5e7 osd: init value in pg_stat
-6b0dd59 osd: pack PG::Info and History
-e768ad1 ebofs: zero tail bit of cnode blocks
-f4322e7 osd: init my_stat
-9750907 pack any types we use blobhash on
-6e0739c asdf
-4468f78 kclient: forgot dir.c
-03ee6df kclient: default msgr+tcp debug levels to 0, so that it has to be turned up explicitly with -o debug_msgr=N,debug_tcp=N
-858372a kclient: redo debug level handling
-25e62b5 timer debug crap
-d32cd6d kclient: writepages will write in stripe unit-sized chunks
-bda8924 kclient: writepages work in progress
-0fd6063 kclient: cleanly flush dirty pages at umount
-fa63cfd removed ifdef junk
-efe104b kclient: syncfs stub
-420a3a7 removed unused retries
-7d4e7c9 makefile: don't build crushwrapper
-db89d37 kclient: osdmap decoding bugfix; request osdmaps when pg has no primary
-7cccaf8 removed ifdef junk..
-cf0ad85 logger: typo
-3f9904f timer: cleanup
-813dc29 msgr: do not check for remote reset on connect, to avoid flaw in protocol
-87673ac verbose, for now
-4b38d8e kmsgr: close connection on rx of CLOSED tag
-8de51e0 todos
-48bd692 kclient: minor cleanup
-738f65a kclient: some more osdc refactoring.  sync read/write basically working
-223f3d6 kclient: iput and dput in mdsc handle_lease
-8ff832e kclient: some io refactoring, still a bit busted tho
-535f3b8 kclient: mount arg parsing; remove dead io code
-5d31511 kmsgr: some formatting and style cleanup, and removed some legacy support
-9328a94 kmsgr: change peer_reset callback prototype
-0f2ea11 kclient: oops2
-99acf98 kclient: oops
-f374d23 kclient: ceph_get_inode cleanup; use ceph_get_inode in ceph_fill_trace
-4fbaef9 fixed connection sequence
-61e5a4e kclient: readpages cleanup
-d5b1153 kmsgr: allow short data payloads
-a4e82ad kclient: for hard links, use the inode from the supplied dentry in the fill_trace()
-acd63b0 kclient: readpages works
-e41b4cc Fixed some potential bugs in message protocol changes
-2b280a2 kclient: disable readpages, for now
-86ca609 kclient: writepages works
-bc2ad22 mds: fix O_CREAT on existing file trace behavior
-73cbeca client: cancel tick timer on unmount, clean up debug output
-f626b9c kclient: lease messages increment mds session seq
-d699c99 parse_device from text config file
-6c48578 kclient: wsize option, some writepages bits
-84f2bac kclient: writepage cleanup, behaving
-c33811f more message protocol changes..
-c2f5b52 kclient: write_begin and write_end
-293dcab kclient: reworked cap-related locking, now protected by i_lock
-241bb4c mds: small open handler cleanup
-203f054 kclient: drop leases for setattr
-9107882 mds: handle dir open modes more sanely
-82bcb5c kclient: move readdir cache prepopulation inside reply handler, out of caller process context
-da32e8d client: do not reply on caps we don't hold
-f6fae85 client: be careful about filling in size, mtime, atime fields; and cleaned up userspace client reply decoding, filer interface
-5266cad kclient: refrain from kmalloc while under spinlock
-b840d17 kclient: disable link post-request step for now
-77ff57a kclient: sillywrite mount option
-ff7142d kclient: fixed up the lease refs on inodes/dentries a bit
-85a3a2f kclient: keep leases in per-session lru lists.  locking needs some work still
-bb9a9ca client: behave if we get a file_caps message and want caps, but don't have a cap yet
-617f7c9 mds: send client reply after dropping request locks, so that leases on modified metadata can be issued
-cb6a50c mds: fix locker dn lease issue logic
-738e84a mds: only issue PIN caps on open directories; and fix lease revocation bug
-57f5b44 kclient: only send release on lease bits we actually hold
-2fda8ba kclient: drop leases before modify ops that would require revocation
-d8708bb mds: fix scatterlock lease revocation
-43ef12d kclient: dir icontent lease or caps imply dentry validity
-d9f8735 mds: dont issue dentry lease if dir-wide lease will do
-9c9d441 client: release_lease, not used yet
-6bd7eeb mds todos
-4aab459 kclient: preemptive lease release; allow dir inode+dentry leases in single message
-15a39f6 kclient: drop dn lease before unlink/rmdir
-2305a87 extra device
-cdbd178 kclient: return mtime/atime in cap messages to mds
-1dbaebb make ceph_timeval nsec, to match linux timespec
-3b854bb kclient: removed i_wr_size and i_wr_mtime from ceph_inode_info
-5fe205f kclient: set time granularity; do utimes locally if holding EXCL
-987ae8e kclient: "fixed" O_CREAT|O_EXCL
-74d8388 nil_t why do you torment me
-74ba033 fix kclient lease release, client_lease encoding
-97e7e73 kclient: fix inode revalidate
-b9f382f kclient: inode revalidate, untested
-d1bd332 kclient lease callback, dentry.d_time works
-2ab9407 kclient: d_revalidate simpler.  no inode validation yet.
-fcd35b4 kclient: new mds reply parsing
-f2d1ba6 mds: fix max_size handling
-fbcf061 client: messenger should loop through the front part of the message
-1ee99cd client: always dump errors
-3b8e6b6 client: small fix for compilation on other kernels
-abed58a client: BUG_ON at relevant places
-89a3caf mds: make scatterlock revoke leases
-82107d2 improve dirlock vs filelock interaction, filelock lease callbacks
-16b8ac9 todos
-c327d04 client: fixed file refcounting
-3c25b09 client: use EXCL cap as implicit IFILE lease.  fix file refcounting bug.
-048d69c client: fixed up trace and readdir decoding
-c959b6f mds: some lease packaging cleanup
-7e5adad mds: rework lease encoding and such in client reply.  still need to do the client side...
-0ff20dd mds: lease duration pools
-52f54e5 client: fix file_caps_wanted bug
-68b83cb excl works (fully client-side utimes() for untar)
-3f314cd forgot MClientLease
-9cf05c6 osdmaptool: small fix
-ff9874d client: excl, unfinished
-9169a8b todos
-14d9dd2 mds: fix openc trace
-c668f40 reworked reply trace generation to allow null dentries and hard links
-f5056fd mds: oops, use corrent ClientLease
-50053f8 call it a client lease, not lock
-b1e8f0e mds: lease revocation works.  cleaned up stat vs lock ids.
-59cc2e4 client: observe dn mask in reply
-c7b44c5 todos
-eb67f0c client: handler, include dn mask in trace
-8dac09b mds: trim client replicas, fix client duration calc
-ffe736d mds: maintain client replica lrus in session, cache, and dont crash
-c53d11f client: insert_trace cleanup, and derive ttl from MClientReply
-90f378b mds: include lease duration in MClientReply
-018fecb todos
-6c428c5 generic ClientReplica + mask
-f2291bf basic dentry leases work...
-e17cef3 dont build hadoop
-e53e4dd init osd stores in mkfs.sh, not boot.sh
-1df4c6b MClientLock
-9044e95 some lock bits
-18ac05d objecter and journaler error paths for inc_lock
-113d12a osd: set inc_lock attrs
-f74506d osd: verify inc_lock
-985286d mdsmap: update last_failure
-eb505d8 osdc: inc_lock
-3ab32f1 osd: le notation in osd op structs
-cf04043 objecter: on do ack or safe messages if they are requested
-1dd25f3 osdc: take flags args
-86fa2bc crush: grammar changes
-e841dd4 crushtool cleanup
-d5f92ab crushtool: useful parse error messages
-b844151 hadoopclient bits
-ae7af72 connect_seq changes
-225d6b7 Still changing messaging protocol...
-6b1f973 crushtool: perl version hacks
-9ec7ddf client: make fill_trace use provided dentry even if parent doesn't match
-1278a1b hadoop client builds, makefile cleanup
-3d09096 mds: misc hardlink fixes
-0012bb6 crushtool: generate human readable map
-1fcf06a client: fix erroneous commit
-d37730b client: unlink
-a693dd5 client: instantiate inode for new link
-1e0b1c8 crushtool: parses!
-40e0c7b crushtool: grammar?
-49e4f26 crushtool: shell based on spirit example
-f5a54a7 todos
-82d6aeb crush: bugfix in builder
-2381870 crushtool: beginnings of rule parsing
-a31efa9 crush: store item_weight with straw buckets; crushtool progress
-e7d366a buffer::read_file into pages to avoid c++ allocator's disagreement with perl
-f6f54a2 crushtool: encoding works?
-482722b crush: bugfixes
-b27fe6a crush: destroy and wrapper bugfixes
-6f83a01 work in progress
-415e127 default alg should be 'straw' not '4'
-b21fa85 refer to algortihms without bucket. strawbucket -> straw
-47b85cf handle ids greater that max_buckets
-3fa7f1d work in progress
-6bb6726 client: -1 debug level is now being used for default debug instead of 0
-9baca1e mon: mds stat command
-1a7fa36 config compile error
-26922d6 osd: fix pg.__pad initialization bug
-2ac29de crush: check for null crush
-e3649c8 mkfs and startup scripts
-e4f4387 bufferlist read_file and write_file
-9248821 enabled readpages
-9e9282b mkmonmfs: usage fix
-7ef27c7 cmonctl: usage cleanup
-11625a1 client: fix wrong mtime/atime bug
-607e6d9 client: switched over to new encode/decode macros
-d28c98f msgr: reworked accept a bit to more closely mirror pseudocode in wiki
-4af8a8c msgr: minor accept cleanup
-06bd870 todos
-462b6a9 account for new pg parent split levels to allow pg_num increases; mon command handling cleanups
-78ddc62 some pg split fixes.  seems to work
-3f0354f splitting appears to work, at least sort of
-197f1ae Some process_accept changes for message protocol chnages..
-01267a8 readme summarizes binary targets
-250ee8b client: osdmap decoding updated
-9e992d8 client: avoid using d_add when shouldn't. Fixes lock on d_lookup bug.
-8976184 osd: pgp_num support, and some reworking to facilitate splitting (soon)
-7891010 Was reading peer sequence whe not sent.
-34ea548 client: some osdc cleanup, but still broken
-d487600 todos
-804c3cb client: implement ceph_dir_link
-6143869 client: new monmap decoding
-fc32c65 client: redid mdsmap decoding
-6b08fd8 client: new decode.h, used by jsut osdmap.c so far
-01fd415 Added some debug output to ceph_peer_reset().
-4477c03 message protocol changes
-ca1a0fa message protocol changes for connect.
-75b6683 client: parse new osdmap
-a6f6792 osd: adjust creating_pgs in advance_map
-8700311 mon, osd recovery and pg creation cleanups - osd mkpg cleanup - osd recovery fixes - pg state reporting fixes
-80bf406 basics are working
-12bd9bd mon: mkpg simplification and cleanup, much nicer
-3b39d52 mon: forgot MOSDPGCreate
-6e29f4e client: crush mask bits
-8bd7c06 mon: registers new pgs and sends create msgs; throttles
-d43fd66 osd: mkpg craziness
-a2d43ab client: minor fill_trace cleanup
-5c9a5c5 crush: use rule masks instead of hard coded rule numbers
-5164f0a client: minor fill_trace cleanup
-3c5ff38 client: resurrected ceph_lookup_open (open intents)
-dad9ae8 client: touch vs init dentry
-a4e95cc client: cleanup
-d92a0a9 kernel: filter out O_CREAT and O_TRUNC in ceph_open, since vfs already did the mknod (yuck)
-86e6ef0 todos
-1421898 client: clear r_last_dentry when used
-48be66d osdmaptool: import/export crush map from osdmap
-912ac29 client: error handling in ceph_fill_trace()
-8e839e2 client: fix crash when doing umount due to dentry count leak
-06b1fbf makefile cleanup
-1ccd5d9 ok, builds up from scratch now
-d152a24 renamed crushtool
-57db9eb libcrushwrapper.so now builds, yay
-05611eb m4 macros
-afbba3a osdmaptool: cleanup
-3c38bb6 getting closer to building swig stuff
-55ff866 msgr: lots of fixes, cleanup.  reset detection and races both seem to work
-c0c51e5 msgr: rewrote connect and accept based on new protocol spec
-2585407 client: fix ENOENT handling during lookup
-6ea95c2 client: fixed crash when stat on nonexistent dirent
-dd16089 kernel: missing dput after dget
-b20e618 osd: uninitialized var
-59f5ac8 handle inodes collisions in 32 bit architectures
-c5070ff osd: fix startup after mkfs when osds dont come up in unison
-a4435fc osd: revamp osd startup
-c60834d osd: reworked pg creation a bit
-0a84dca makefile fix
-02e8873 revamped mkfs procedures, mon startup, and more
-c4a90aa msgr: fix msg destroy race
-26ae57c take -o instead of --doutdir
-0a0c54b client: fix
-05087c6 client: cleanup
-be6af43 web: updates
-1076d73 make cmonctl and cfuse use MonClient too
-8b795e1 kernel module compiles on 2.6.18
-23b9d55 monclient: simplify interface, used by csyn cmds cosd
-13a5650 todos
-41755e5 partially compiles on older kernels
-f675756 csyn: use MonClient to accept monitor name on command line in place of .ceph_monmap
-0785cf7 client: wait for caps on write too
-a3815e5 client: check for rd caps on read
-1894e18 client: some preliminary cap checking
-7555480 client: fixed lookup on missing dentry
-a33d292 client: use provided dentry on lookup
-1ca3588 todos
-542e4d6 client: fix ipquad macro
-1674afe mds: default mknod mode to S_IFREG
-546e42f msgr: bug fix: properly cope with sd=0
-9dba8b1 updated sample config file to reflect new requirements
-127cc8d work in progress -- incomplete
-f350a21 small sanity checks for size = 0
-f66c8fd crush: some comments
-809fafb client: fixed multiple mounts
-7fb9554 client: small msgr cleanup
-11ee5a8 darwin: moving missing types to types.h, fix start/stop.sh
-017d9ef client: refactored most of open_root_inode cruft into fill_trace
-a166612 Just spacing
-34d22f9 defined ceph_osdc_readpages() and ceph_osdc_readpage_filler().
-61c2627 client: new cap code working
-3510f75 client: caps cleanup, almost
-7bc158a added reset_peer callback
-538fba1 added peer_reset callback
-ffa7bff kernel: simplify do_request error return path
-322f201 client: small open_root_inode cleanup
-c830fe0 todos
-20cb76a client: take references in fill_trace and drop them later (normally in put_request)
-a98d66a mds: ignore atime updates until code can handle non-wrlockable updates
-d586b8a client: error handling, open cleanups
-831c4af client: disable ceph_lookup_open intent stuff for now
-4c6431b client: refactor mds requests to put most processing in reply handler
-9acc42b mds: fix open flags check on directories
-75bb647 configure.ac hack
-0fd7daa work in progress, process bucket numbering ourselves in perl
-4227ae2 not sure
-a845edf no more update bucket
-7734afc fakestore: use wrappers around setxattr and friends
-a74202b build under darwin
-e7c5103 adding more busket types from the config
-25dc2b2 nothing significant
-e469efd start of crush map manip from perl
-9dabea7 int * working with perl
-371f4bc client: inode.i_size locking, cap TRUNC handler
-8bcbeb5 FileLayout rename
-8e06479 client: addr.c tabs
-da06f08 client: fix dout/derr macros
-466fdb4 client: require rd cap before checking size in Client::_read()
-83e4a66 journal: some fixes, still some issues left
-4c9987a mds, client: fixed races with cap release, open, size/mtime update journaling, and file size
-060b76e peer reset during standby
-317bb0f todo, client verbosity
-0a13505 cap fix unfinished
-2db7486 mon: osd commands to mark osds in/out/down
-f3f3bf1 manual merge of volker and dongsu's write stuff
-ab5be39 cas: pg_pool and file_layout bits to pass object pool down through stack
-ece3fef cleanups
-c8d2a8f byteorder fixup
-91582d1 todos
-d99d887 mds: fix pre_dirty + projected_parent to bump pv properly; fix unlink vs cap release race
-1f2db92 fakestore: various fixes (esp on 32bit)
-fe91c06 mon: oops
-22d102a mon: get/set maxosd
-3cfd18b mon: reworked command interface to use preprocess_ and prepare_command
-5dd9f1a mds: projected_parent on inode to allow concurrent rename and inode updates (due to cap changes)
-63187b6 mon: setcrushmap hack; basic fwd to leader strategy
-dd34c81 cmonctl: send data payload
-42ea68f mon: added getmap and getcrushmap to extract osdmap or just crush map from monitor
-e52743f client: ipquad printf cleanups
-8cf5aea mds: truncate fixes
-57e0de0 fakestore: fix collection_setattrs
-0aee328 fakestore: cleanup
-be972e8 mds: untested fix for opent/openc inode versioning bug
-fc0ae5f fakestore: journal replay
-7d34187 fakestore: more journaling bits, fixes
-99f3e71 client: ignore long crush blob
-d42d98f fakestore: use a journal, with periodic sync
-30adf9f osd: factor journaling out of ebofs
-c288b4f todos
-0728c4a crushmap generator in testing phase
-c11e803 Config::General doesn't like items all on one line
-c7292db lower autoconf version req to 2.59 (works, with warnings)
-7afb7e2 crush: git bucket id calc for additional buckets
-d6731f9 crush: git bucket id calc for additional buckets
-138d8bd mds: add wrlock bits to FileLock
-05d5730 mds: temp workaround mtime update race
-64220b6 swig wrapper
-6d247c4 print the contents of arrays passed via SWIG
-e247428 this makefile won't work if the object files already exist from another compile
-8603b42 temporary fix of a crash due to missing decode
-224eca6 start.sh can execute binaries from alternative locations
-0e2de00 added missing file
-4be7eca added proc entry for setting debug level
-4e281b8 cleanup
-88a817d fix compilation error
-1428e0e whitespace
-9c235a6 added d_revalidate
-14b6c9e cleanup
-b373a57 crush: more accessors/modifiers in crushwrapper, some builder changes
-04b5f9e crush: some crushwrapper methods, initial swig makefile?
-225e9d8 forgot these
-e9eb850 Added checks for STANDBY state
-fb512c0 mon: monmaptool; elector shares monmaps; some cleanup
-1a69243 autoconf changes to build on a debian/testing machine
-4699935 some fixes on x86
-f2d52d3 fix bug in silly_write, calc_pages_for
-a1e774f kernel: set inode blksize properly
-4ac7ffc kernel: some encoding/decoding cleanup
-5f2e6af test
-25b07d1 msgr: fix stupid bug
-7b00551 kernel: fix mds client session ref counting bug
-452bba7 kernel: use le macros for msg->hdr
-1554543 some startup cleanup
-a2db5ae write after open with O_APPEND
-9731226 convert more types in ceph_fs.h to __le* notation
-d7a9643 userspace: use structs to enforce type safety on __le64 etc
-0d95a0d mds: dont force journal flush on every op; mdlog+journaler are smart enough to detect waiters
-ce56246 client: fstat support
-3445480 mds: only journal size_max extended inodes once on open
-a459e12 mds: simplify+fix open file journaling, replay
-947afd3 msgr: turn down messenger debug defaults
-cf98b54 mds+kernel: more file_max work; factored out intarithh
-65fd61d removed comment
-a097c70 added defensive code
-9bc3c8a Added SOCK_CLOSE state etc..
-1ba0236 Added new states for connection
-6d9ec71 Cleanup etc..
-2ba5f32 improved max_size handling in mds, client.  avoid spurious setattr/utime after open in client by ignoring sub-second mtime resolution... weird
-bbc61d9 mds: flush file (size+mtime) metadata to journal on close
-35ee017 cleanup
-638a997 added inode revalidation
-f19c71d fix mds cap interaction; echo blah > mnt/blah now works
-204c175 (tag: v0.1) msg: blobhash on entity_name_t causes strange badness... should look into that, but avoid for now
-39d2a25 mds: adjust cap issue sequence to avoid unnecessary file_caps messages
-8adc9da debian packing stuffs
-78924fb more automake.  make dist seems to work
-7853234 autogen.sh
-307723d more automake fun
-0e8e273 more autoconf- and automake-fu
-5f218c2 minor fixups
-0cf7971 copy of old Makefile
-7469f26 first pass at autoconf and automake
-a1b68dc smarter start.sh
-b2badc8 startup: adjust out/* symlinks after forking (from call to daemon())
-a8d7999 -d to daemonize, other startup cleanup
-13eb18f allow client to initially bind to INADDR_ANY and learn its ip from the monitor
-48616a7 misc style cleanup
-72c9d8b build with 2.6.24 or earlier (well, 2.6.23, at least)
-7a2f413 some x86 cleanups
-9aa7439 some reduction in stack space
-003f022 protecting inode's i_block
-fda8219 quieter startup
-1e4215e write output to default/* by default
-ef67100 kernel: cleaned up mds_client locking, reconnect
-83700ff map u64 ceph inos into ino_t on <64bit platforms
-c24a228 ebofs: journal replay working; better journal validation on mount
-3e7d710 ebofs: avoid buffer cow bug
-5fe44f3 journal replay, makefile cleanup
-0e77815 ebofs: journal cleanup, tuning params in g_conf
-219710e roll directio into FileJournal
-8d4c8e7 Added STANDBY state
-f99bee7 Added STANDBY state for a connection
-78d363f hacked dio journal
-8a104be simplified FileJournal, journal interface
-611ca71 some small cleanups
-e988d85 osd: write sanity check
-80a0796 streamtest.ebofs
-83b4a0a cleanup
-0224126 cleanup
-fb4ed9e fixed a crash when doing lookup
-5ddab7b mdsc: more locking cleanup (not done yet)
-896a845 rework request alloc in mds_client; use radix_tree_preload
-f977804 msgr: use radix_tree_preload, and lookup_slot for replacement
-43df670 msgr: no kmalloc under spinlocks, except make radix tree GFP_ATOMIC
-f059015 clean up msgr in/out debug output
-4f558d2 simplify do_open_request args
-937a368 atomic lookup+open
-e76abb9 comments
-5ffcd84 more open refactoring
-3764e1c refactor open a bit; initial pass at ceph_lookup_open
-8b218a5 msgr: check for failure to resolve hostname
-c13bee4 vfs create() is just OP_MKNOD with rdev=0... make OP_CREATE openc (mknod+open), even tho linux won't use it (yet?)
-e793742 mdsc: dput after d_find_alias
-85af728 kernel msgr: fix connection lookup radix tree bucketing bugs
-d3d1da2 a few client/mds reconnect fixes
-0aa46ac mon,msg: small fd cleanups
-d6ebc26 silly_write
-6495e69 utime_t cleanup
-5d57a37 simplied TCP_CLOSE state, added some prints
-fb92c33 removed some unneeded connection states
-1610990 Fixed up fault handling some, and some other bugs.. Merge branch 'rados' of ssh://patience@ceph.newdream.net/home/sage/ceph.newdream.net/git/ceph into rados
-220a146 more todos
-4025c2a todos
-43e429d added create (without open)
-34abc5d change lookup operation to use lstat and not stat (to match expected behavior)
-4a79887 hash inodes only when required. This fixes hang that occurs when searching for an inode with a hash value that equals to the hash value of the root inode. Also added default implementation for getattr.
-b3a4699 simplified script
-a154ec1 strip_trailing_whitespace.sh
-c53144c kernel: setattr; moved fill_trace to inode.c
-a6d3c74 drop caps granted by mds on inodes we dont have; use send_cap_ack helper
-9147344 todos
-66fdbf3 crush: check overload map for forcefed values
-01ca1b4 fixed missing iput; cleanup
-215fb5b close mds sessions on umount
-098dd09 fixed inode cap init bug
-4c3b3d5 renew, resume, etc. caps from kernel client
-6040571 fix double-delete bug in SimpleMessenger
-f57de8f ebofs: oops, be quiet about csums
-3fe7fbb ebofs: fix superblock csum calc
-7492a58 kernel todos
-745fc77 fixed calc_csum alignment on superblock
-fddd4f5 link caps into a per-mds-session list
-e92f7fb fixed add_cap inode ref count bug
-cb612b1 resurrected ldceph.so, sort of
-7aa095a cleaned up mds map requesting
-9296475 clean up mds session open; request mdsmap when necessary
-9ccbcab note client reconnect todo
-fe6610c note seq on export
-c1fc7bc msgr todos
-49cebc0 mark_down.  some cleanup.
-03efe1f backoff/retry seems to work
-7896c9e rework messenger work queueing, retry - take a reference whene queueing work; use helpers - use a READABLE/READING type latches on both try_read and try_write - move some code around to avoid prototypes - simplify lossy send_fault case
-16a7362 fix mds session handling
-040b87e some debug crap
-65ab8d2 reconnect getting closer
-72b8a79 Now remove connection if state isn't OPEN for no delay case..(mon case)
-1692248 fixed up fault case for EAGAIN just before tcp close to requeue...
-e55d850 rework get/add/replace connection msgr spinlocks
-a10cb3a implement fsync in fuse_ll
-c67ac7d multiple mounts, single sb
-3f02a40 comments
-30b9ef1 comments
-943cc83 comments
-673f771 comments
-cd13061 some caps bits
-7106e47 use do_div() instead of /
-95feeb6 simplify client caps release; track last_open to avoid open race on mds
-b0aefac dir_lookup now uses new_inode instead of iget that deadlocks
-c1abd75 only close connection if EAGAIN and socket state closed..
-709055b more mount churn
-25ccfe6 rework client mount slightly
-4c832d3 decreased initial fault delay
-03c7867 Just left debugging in..
-c184999 fixed up ref count on connection
-bc4cf52 reworked monmap
-791b949 various mount related cleanups.. much improved
-61f3df1 inode super_ops and iget usage cleanup
-cdf1a92 fix fuse statfs
-11d22bc kernel: include . and .. in readdir result
-d4ca548 mknod, symlink work
-e32c1c1 don't clear OPEN on tcp CLOSED state, we get this when we can't connect and will probably retry..
-6ae4b93 use improved ceph_build_dentry_path
-07ad49a Increased attempts to 10 for now.
-950fbea clear OPEN bit on close
-f1a3ba6 fixed a few fault problems..
-4a6f708 Fixed bugs and crashes that were related to inconsistent iget ( + ilookup)/iput.
-44bf91e insert inode into the icache after changing the ino value
-83bd70a fix dput in the wrong place
-baf1174 lots of cap bits in the kenrel client; cap vars in ceph_fs.h, renamed
-8f4641f Fixes in ceph_fill_trace():  - dentries accounting  - fix for deep mounts  - verify that inode has not change along the path
-cd98533 Fix unlink crash
-135ca7b mkdir works now with helper function ceph_fill_trace()
-68a829f file cap ops cleanup
-7a7b814 mkdir now doesn't crash
-37aa0af new MClientFileCaps encoding
-228d7be kernel statfs works
-51db6c1 ebofs: rename Extent and make it packable
-0a14b54 make default (now 12345) work
-fd307f1 more statfs bits
-5bda5cd cleaned up int types, page size info, byteorder for userspace
-84a678e statfs returns real data; osds report utilization properly; works in fuse client
-f53b9ab kernel: clean up mds request creation, move mdsmap states to ceph_fs.h
-bd1a47d Fix a crash when unmounting due to wrong dentry accounting. Don't allocate new dentries for entryies that already exist.
-1d83f77 fix up fault case a bit
-ec0952c removed bad access
-5c8211d ignore TAGS
-dc9766f new MClientReconnect encoding, basic support in kernel client
-6828aab etags for vi
-5c829c7 ignore mnt
-8663484 check do_request result codes
-498acf2 todos, start.sh tweak
-d3125cf more minor encoding cleanup
-21c0aca todos
-cc63cd5 client: encode connect_seq, minor accept cleanup
-b309a4a mds: allow open on root dir
-4052c90 accept connections properly
-538445e mds: handle reconnect
-1a4ae0c no readpages for now
-b118c77 some initial readpages bits
-aa61492 fixed data_off bug in messenger when reading data pages
-d87016b note when new mdsmap is accepted
-748f396 some kenrel todos
-3ee344c remove 1234
-d8d4623 test
-cd91d90 fixed prepare_pages, osd_client bugs
-d63e06b cleanup
-832fd0e handle_ms_failure in dispatch thread too
-630589a client: count caps per mds
-9ac3d73 deliver ms_*reset in dispatch thread to avoid delivery vs sessoin mgmt races
-fcfb4b0 add standby state to simplemessenger, so that we can close sockets and still track connect_seq
-6ece3bb simplemessenger policies
-a0c0c11 start.sh gets ip from hostname
-3d8e38b mds: fix bug in session close
-2f68ae8 mds_session_head struct
-f5c157a Revert GIT test changes
-b8e4e42 cap todos
-4615d19 cap stale -> resume works
-ec96739 fixed cap killing on session close
-e00bb20 per-state session xlists; kill caps on close
-67a834e GIT Test
-eaaebe5 Test for the public branch
-b613593 fixed use of PAGE_MASK in simplemessenger
-86f118e notes
-4835f68 todo
-e683fed more caps work; fixes to avoid xlist::item copying, which is bad
-95efa1f build without 64-bit block dev size probing
-f405e16 fix problem with long messages
-8dae58b revoke caps, mark stale
-d930ae8 mds identifies oldest sessions
-5337d30 xlist cleanup
-f201013 document clone via http, gitweb url
-6526103 client regularly renews caps
-2ee1df1 Just left some brackets around..
-3459f71 CEPH_MDS_SESSION_OPENING never got set.
-08f0e3e basic request_renewcaps and renewcaps session ops
-4ba592e caps in per-session list; cleaned up cap bit defs
-4642cc1 fixed up subops
-9a52f5b session lru; g_conf cleanup
-f1d2f0d cleaned up char* vs const char*
-b02d01f sessionmap encode/decode
-0338815 removed old has_expired/expired log event cruft
-51cc939 clientmap replaced with sessionmap; untested
-bea73a7 complete close from peer, increase delay for retries
-2a86cd1 removed old MMonOSDMap*
-dafa9a1 fixed get_type_name type to make latest g++ happy
-8230273 fixed up rename relative path root check
-6047992 some switchover to sessionmap
-d2e355c define mark_down
-ccee162 updated for git
-90e6467 rename src+dst must share common root
-5b633a1 rough SessionMap, to replace ClientMap
-0746d86 con state must be unsigned long
-6707c91 fixed up mds session states
-a3975e8 kick requests on failed/recovering mds (untested)
-d2a7e40 osd: typo in fakestore
-5eb106a some kernel todos
-3e2f42c web: ceph-commit, not ceph-svn
-111d052 web: ceph-commit, not ceph-svn
-e627271 kernel: fixed PAGE_MASK idiocy; read path almost sort of works
-117ac8d use PAGE_SIZE/MASK from asm/page.h
-ef6c393 remove attrset from osd op and reply
-7968254 start.sh gets ip from hostname
-5de7634 kernel msgr: ignore messages with unexpected data payload
-555706a kernel: ceph_readpage, osd_client reply handler
-136fd14 moved crush defs around, fixed crush call site
-512caca kernel: msgr uses preallocated pages; lots of osd_client bits
-0ae0459 kernel: rename; debug arg parsing
-c253b6e mkdir, crashy
-b0ca149 .gitignores
-a9fcf2c kernel: quick and dirty unlink
-b8bb936 test2
-aa353c8 test
-40b0355 more type cleanup
-c682669 less typedef
-b2057d4 cleaned up frag funcs in ceph_fs.h
-3d7aec0 kernel: osd client bits
-7dc730b refactored osd_reqid_t
-e9817bb MOSDOpReply uses ceph_ods_reply_head
-d3e8602 MOSDOp uses ceph_osd_op_head, and related type tomfoolery
-9a12ba7 make mdsmon be a bit more robust/simple
-f9e2c97 rados: refactored to use MOSDSubOp; ripped out splay, chain support for now
-02bb928 .gitignores
-836e4f0 subop messages
-71531ed factored out some osd types into ceph_fs.h (not done yet)
-c8181f8 moved osdmap decoding code out of osd_client
-71b37d5 kernel mds_client cleanup
-586b211 handy start/stop scripts
-6922d08 updated web site with git links, info
-fcf95f7 todo cleanup
-725be5e last committed
-f8d463f objectversioner
-f6a0447 code tree cleanup
-f02a295 g_conf.ms_hosts
-3c3b625 test update
-c186544 reorganized source tree
-745c9a5 asdf
-9167b27 removed ebofs branch
-6a3926e ebofs: don't scrub csums :)
-f49fdb2 ebofs: fixed csum calc on inodes
-0720b74 ebofs: fixed 0 length writes
-62ee713 merged branches/ebofs r2100:2229 back into trunk
-02ff03a readdir over multiple fragments
-2f3d792 todos
-5aaf99a ms_hosts
-e0c547a mon todos!
-0838493 minor mon command handler cleanup
-9c9f8ca btree onode/cnode pointers now include a csum
-e320acd link to ceph-svn list
-f5d9b5d added pdsw workshop paper to publications page
-9954853 fixed bug with full partial overwrite; cleaned up map_read; fixed bug in attempt_read on partial bh
-d0272a4 minor bug fixes, cleanup
-cea9e01 fixed bug with bdev barriers and no intervening ios
-3de39fa ripped out handling of partial writes that span commit epochs
-5ca1068 writes may have to wait if partial reads are necessary and a commit is preparing
-b9cbf1a bits
-7842b2d minor cleanup
-b24257c more partial csum handling.. leading to disaster
-bccd022 minor fixes; pack dstructs
-b108f5e cleanup; onode checksums; fixed stat_ bug
-c69465f fixed non-root rooted path issue
-208d2fd slfixed slab corruption in mds reply parsing; opendir now opens directories as needed
-a45bebb ability to poison commits; untested
-7a39ae3 some readdir, lookup bits
-ac7253b minor web edit
-a2ed1fe uml setup info
-1ba0bc3 superblock checksums
-4215e10 some sample code for mapping logical object extent onto physical objects
-87f5b2b zero trimmed bits of pg log to free disk space
-d25befe fixed zero; some checksum fixes
-9c97981 were never queuing accept ready
-90e799e bug fix where state was getting corrupt etc..
-966597e Need to clear NEW otherwise we try to create new connection during accept
-1df79df readdir request half works
-66e9074 beginnings of readdir
-a3be590 added module level debugging, some error handling
-7b25e93 moved dout derr to super.h
-f2fd9c3 changed mds request format slightly, streamlined handler in mds/Server.cc
-72e0f1a small fix
-e834084 makefile clean; no weird crush recursive thing now
-a54df03 dumb typo
-6de865f the uml config i'm currently using
-f7b0c5f be less noisy
-67b428e typo
-2828ca6 smarter suicide
-427eb6f moving stuff around
-cea4b2b newsyn can reuse an existing monmap
-12c82da minor updates
-b1587e7 init fsid
-2ffbdd6 no more bufferlist
-7eedbc5 mounts and unmounts.  vfs ops stubs
-2555683 Added newsyn mode overloadosd0 to overload OSD 0. It's a bit broken at the moment.
-2b18ed1 fixed page alignment/sizing checks
-b63e6a4 don't mark_down osds on monitor or else they won't know to shut themselves down
-c010a0a wow, it mounts
-10594ff renamed ceph_client_request/reply structs ceph_mds_request/reply
-579447d quiet down
-b810a9d improved
-6f25cd6 short seek test
-3de4e9f fixed
-85776a6 mostly cleanup2
-687c4cf mostly cleanup
-d7250a3 clear SOCK_NOSPACE flag
-841a718 some mdsc fixes to request/reply handling
-282966b cleaned up connection spin_locks: READING/WRITING bits now used for mutual exclusion
-a9fe364 mask SIGPIPE in a kludgey way.. bleh
-34cea80 fixed mount waiting
-980282a check work_pending now
-00e1f1d mount progress; write callback fix
-a743a22 didn't build submitted garbage..
-e316e14 should nolonger have reentrancy problem
-8a31f93 Oops wrong check
-53b5c46 monmap epoch fix; mon sends monmap to client on mount
-600c81d added pg_swap_primary mechanism in osdmap
-fa542ea resurrected RAID4PG
-ed45b7d first pass at adding pobject abstraction
-e0db724 queue send work if new messages are queued
-38e83d5 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2159 29311d96-e01e-0410-9327-a35deaab8ce9
-e3a00b0 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2158 29311d96-e01e-0410-9327-a35deaab8ce9
-fa6abf8 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2157 29311d96-e01e-0410-9327-a35deaab8ce9
-1f80ce5 fixed some possible memory corruption problems, and cleaned up code a bit.
-206b10c osdmap/crush decoding works; cleaning up mount wakeup, but still need monmap
-4d900ce fixed last_beacon bug in mdsmon
-f6047f7 simplified crush rule allocation
-a29994d new atomic_t type factored out of buffer class
-8cca442 some type rearranging
-1efccfb cosmetic changes
-54d0ac2 rest
-df94756 more port bits
-47f9277 part of port bits
-c1e1238 quick and dirty kernel build patch+instructions
-debbf6a crush decoder (untested)
-05d4a4b safe destructor; pfactored parent calc out of finalize
-5397814 fixed slab corruption, cleaned up msg get/put
-9e8a843 fixed mount fialure and rmmod hangs
-bc04585 some cleanup, but theres a slab corruption still
-52fe08a minor cleanup
-c0d0c4b kernel messenger sort of working!
-c64a4a0 mount fails gracefully
-ce3c3bf fixed merge hole bug; bad_extent_bytes prelim stuff
-c8bc1c3 init workqueues once; fixed get_connection
-23fc8b4 some small messenger fixes
-1335420 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2134 29311d96-e01e-0410-9327-a35deaab8ce9
-14607e5 accepts connection now
-a238b0b osd_heartbeat_grace arg
-a34205c fixed spontanous death bug; fixed useless post-closed reconnect attempt bug
-49eb11e Added a cheap hack for testing purposes. It's commented out via a #define CHEAP_HACK 0
-94cb28d fixed uninit var in simplemessenger
-e792836 fixed small bug in crush
-a761413 some minor module fixes
-4f2d1e5 replace existing out/osd0 etc symlinks
-6e9d6f0 valgrind on newsyn
-17ce9fb crush symlinks
-4539a8b destroy inodecache on shutdown; fix kernel debug output
-613c289 links
-b856a2f removed some old outdated docs
-d5f114a compiles
-a4bf3b5 function name changes
-d75f3fa git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2118 29311d96-e01e-0410-9327-a35deaab8ce9
-e7493e1 validate checksums on reads; still need to deal with partial writes
-e0d9c6b fixed osd bug on failure that caused clients to hang
-e8ec0c4 fixed bufferlist c_ptr() weirdness with ebofs buffer duping
-6a9ac6c tweak simplemessenger to tolerate zero-length bufferptrs (weird)
-9d09786 cleaned up share_single_client business in newsyn, works
-5bfe10c _kaccept uniformity
-7b3e6db some kernel osd_client bits
-f516a6c minor cleanups
-2fcade6 crush compiles in kernel; removed cygwin cruft, who cares
-60fad09 Added some active OSD stuff. Also, modified newsyn to add a mode (turned on by setting ALL_SYNCLIENTS_THROUGH_ONE_CLIENT to 1 in newsyn.cc) that makes all synthetic clients on a node go through the same Ceph client (effectively making them all use the same buffer cache).
-5fe5806 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2107 29311d96-e01e-0410-9327-a35deaab8ce9
-131231f added socket callbacks, worker threads etc..
-e8a919f csum stabilizing
-16f2752 more csum fun; need to clean up bh handling, i think
-4af6a92 removed files
-6978f76 basic read/write support for holes.  with bugs.
-447be86 preliminary support for holes, data checksums in ebofs
-dc48f25 branch for ebofs changes
-8d29198 move mds op defs into ceph_fs
-0631674 osd map decoding in kernel client
-1dc06c7 asdf
-89926a0 osdmap cleanup; osd failure detection cleanup
-b7c5a08 client reply encoding uses ceph_fs structs
-04a96e0 kernel osd_client bits
-fa1b150 set recv_stamp in fakemessenger properly
-1324406 easier to read entity_addr
-ecdbfda fixed osd recovery bug
-889db3c oops
-9f62ad1 report failure if we do not receive timely heartbeats from replicas
-1b2d166 tell at least 1 osd about each osdmap change
-0934316 another crush fix
-b892cd0 fixed crush bug with forcefeeding
-cf0e433 some osd failure reporting fixes
-03ee4cf asdf
-b123f7d kernel test module
-b231f2c cleanup addr bug from mds merge
-d2ffce9 client reply decoding bits
-72d2e31 kernel client bits to decode client replies... will need to be moved around still
-7170a05 changed client reply encoding to be easier to decode
-f3e73bb fixed readdir path crash
-e78944c small mdsmon fix
-1fae43b merged r1958:2075 from branches/sage/mds back into trunk
-d793b0f reworked message encoding/decoding header vs payload vs data payload, alignment preservation
-6038210 missing pieces
-4f1ed7b client (mount-ralted) bits build, at least
-d697bfc fixed header encoding/decoding
-ef4a4f1 some client request/reply struct redefinition; no more file_data_version, for now; utime_t now uses ceph_timeval
-425169f no more bufferlist; streamlined ceph_msg object instead
-b3808583 all chunk sizes come first, before payload
-da820e7 build errors
-e30b0f5 random crap
-6369889 send_message func, creates new connections as needed
-e55adeb added connecting to peer and removed junk
-48e8ccf wow, it all compiles!
-320d9cd ceph_fs.h cleanup, etc.
-61f6ce6 super cleanup, fixed some misc compile errors
-581f249 handle (ignore) monmap message
-1b784de cleaned up some
-cd539a7 more bits for mounting
-08cef71 MMonMap message type, minor client cleanup, monmap cleanup
-108101d typo
-eb06a33 home page warning
-4f2b664 main page, overview
-0386b95 tasks/roadmap
-f2a52f5 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2053 29311d96-e01e-0410-9327-a35deaab8ce9
-9e68ca2 asdf
-bef84b6 some mount option parsing fiddling
-0c05cf9 ceph_fsid, fixed bug in osd recovery wrt 1x pgs, last_epoch_started_any
-0ef2a74 client mount instance cleanup, ceph_fsid checks
-17ff9b1 split out poll structures
-dff96db Initial version
-6bbc60e git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2046 29311d96-e01e-0410-9327-a35deaab8ce9
-2426a00 builds somewhat..
-62a78bf builds now
-e74dd97 super/inode reorg.  getting started on mount related code
-1c0b75d more error printing
-59f1c4b print strerror before any call to fault()
-cab34df segment trimming race bug
-77a544c more code
-bab5dc3 added start_poll, stop_poll
-c7fb095 more code
-7ba96f6 Accidently deleting listener
-3336509 added more structure, not finished ofcourse
-b6cfc8d git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2034 29311d96-e01e-0410-9327-a35deaab8ce9
-c0818ab Initial version, doesn't build yet
-f6aa893 renamed ceph_kmsgr
-791de6f git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2031 29311d96-e01e-0410-9327-a35deaab8ce9
-65ec3b3 closer to compiling2
-bef61dd closer to compiling
-5cd8eb2 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2028 29311d96-e01e-0410-9327-a35deaab8ce9
-5dc3e0d duh
-110eafa misc kernel cruft
-f9a51d2 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2025 29311d96-e01e-0410-9327-a35deaab8ce9
-0c3329e stray reintegration, purging
-47122cb a few rename bugs; lame attempt at shutdown cleanup
-18cf981 fiddling
-6ec98c1 finished reworking the msg type defs
-a1cbc73 moved message type defines around some
-3118d72 dispatch bits
-e324ecb fixed sockaddr_in stuff in SimpleMessenger
-431d034 accepter bits; no connect, yet
-337154a nonblocking reader bits
-a39d3ae some nonblocking write helpers
-8d91802 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2014 29311d96-e01e-0410-9327-a35deaab8ce9
-008a98e migrate_stray; filepath fixup; messenger _myaddr/inst cleanup; server rename pin bugfix
-d476445 some bits, untested
-9c249b7 various cruft to build under cygwin
-64c860f git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2010 29311d96-e01e-0410-9327-a35deaab8ce9
-46bea38 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2009 29311d96-e01e-0410-9327-a35deaab8ce9
-b49bf3f git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2008 29311d96-e01e-0410-9327-a35deaab8ce9
-29d41e3 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2007 29311d96-e01e-0410-9327-a35deaab8ce9
-d616aa4 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2006 29311d96-e01e-0410-9327-a35deaab8ce9
-281c4fd git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2005 29311d96-e01e-0410-9327-a35deaab8ce9
-0ed3d96 atomic_t oops
-e3d4a00 atomic_t type; now used by buffer.h
-4d77d5d new branch for ebofs changes
-6269326 nav update
-705cf4a no news
-e39f438 simplemessenger send handshake, reconnect attempts, timeout; ceph_entity_addr now uses sockaddr_in
-11c19c9 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1998 29311d96-e01e-0410-9327-a35deaab8ce9
-2445356 removed ports from messenger interface
-a1b09d2 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1996 29311d96-e01e-0410-9327-a35deaab8ce9
-42109c9 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1995 29311d96-e01e-0410-9327-a35deaab8ce9
-114ec15 in development
-2bc8674 in development
-b51b5cd in development
-1132a1c git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1991 29311d96-e01e-0410-9327-a35deaab8ce9
-d1b2e81 senseless rewrite of fakemessenger directory to use addr.erank
-dae8bec merged r1961:1988 from ceph/branches/sage/crush back into trunk
-6820be6 formatting
-9ae2900 better error checking
-823b130 fixed crush map generation
-1f0726e client calls reset_myname; msg quieter
-23d688b git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1984 29311d96-e01e-0410-9327-a35deaab8ce9
-4acb77c git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1983 29311d96-e01e-0410-9327-a35deaab8ce9
-bfdb511 removed functions
-68cd4c6 builds now
-25b8e5f working copy
-ab01b92 removed
-0f712f8 more mds_client, first pass at bufferlist, marshalling
-ab25afd new entity_addr struct
-e454a48 fixed entity_addr to include rank in process, simplifying SimpleMessenger, eliminating client/mds startup naming ambiguity
-34d1396 reworked mdsmon, beacon handling, mdsmap standby queues
-a1f129e git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1974 29311d96-e01e-0410-9327-a35deaab8ce9
-90e4359 first pass at mds client request handling
-79bec38 more cleanup
-e809bd0 migrator export_caps
-c6a783f cleanup
-92f23e2 tester program
-4a97a2d tested each bucket type, fixed many bugs
-3dfc341 cleaned up
-2786ef3 reorganized
-c740878 crush2 to crush
-c2e3495 old crush
-979eb4d works
-6d90380 delay caps import until after EImportStart is journaled; "export" all caps in import_reverse
-e0593d7 new crush branch
-1ed7d25 more crush2
-fa5cb1e some cleanup to better force open client sessions on cap imports; import on rename still fuggered
-eea7d84 merged r1937:1957 from trunk into branches/sage/mds
-c248cd2 partial C port of crush
-f2845dc fixes on i386
-bd6eb7a syntax fixes builds now
-a95f0f2 syntax fixes builds now
-b2dd40b git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1953 29311d96-e01e-0410-9327-a35deaab8ce9
-ccf9ef9 builds now, still need much work
-f6c62b1 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1951 29311d96-e01e-0410-9327-a35deaab8ce9
-9b7c53c git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1950 29311d96-e01e-0410-9327-a35deaab8ce9
-c25a0a5 Initial version
-d273c0f int on 32bit machines?
-c204c1c int on 32bit machines?
-5a1e594 runjob.pl sample
-dae2335 bufferlist thing in c
-e9b5247 kmsg bits
-bcf4be0 more data types and moving bits around
-e74896e remove branches/sage/pgs
-c71563c more header, data type cleanup
-739ad66 no modelines
-8ea7f27 rename kernel/ceph_fs.h to super.h
-1891103 more data type rework
-0bcbbf6 merged r1936 from branches/sage/mds back into trunk
-26d3277 merged 1934:1935 from trunk into branches/sage/mds
-9403050 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1935 29311d96-e01e-0410-9327-a35deaab8ce9
-82b1142 merged 1863:1933 from trunk into branches/sage/mds
-5e5416e fixed discovery of base inodes
-017e646 fixed rename bug
-bcc563b superfluous CDir::PIN_EXPORTING
-178debc be quiet!
-8b6f208 tempexporting pins between encode_ and finish_export, and subtree pins on all subtrees (not just exports)
-a4f0f74 monmap, mdsmap
-c57a3fb minor scatter_eval cleanup
-0a9b51e MDRequest cleanup; partially implemented slave rename in-memory rollback; fix autoscatter unscatter vs migration
-ac31165 fixed bug in trim_non_auth that broke rejoin; fixed up handle_mds_map to be more robust/clean
-0ed6f43 random bits
-e53b5a6 cleanup
-67a610c Initial version of kernel module
-d08d52b remove old buffer.h crap
-6bf2f46 fixed up scatterlocks; minor discover bugfix
-c76bf4e gethostbyname valgrind suppression (from issdm)
-5d6f385 verify xlist empty in destructor
-8d2795c fixed slaveupdate trimming; journal rollback metablob for safety
-bff426d uninit bug, struct padding, debug
-e5bbcf1 encode const
-131dfd8 uninit var fix, heap trashing/encoding bug during rejoin
-a5a2f4b debug_mds_log_expire, balancer tweak, MLock cleanup
-40c0af3 fixed bug in clientmap save callback
-afc69b1 fixed memory leak in path_traverse
-3a12ce6 simplemessenger fixup w new structs
-1467c99 fixed uninit var bug
-eaee69d fixed heapc-corrupting EMetablob encoding bug, base inode trim bug
-5392139 logger uninit var cleanup
-d1276f0 parallel_fetch fixup, client mdsmap fix, freeze tweak, rejoin tweak
-b0731a3 again
-0792530 freeze fixups fixed
-30d359c cleaned up freeze_tree and freeze_dir interface
-836f7f4 no mds logs for standby nodes
-324737d only verify all subtrees unambiguous when recovering
-06f05b9 only open logs when named
-6da205a segment changes, simplified shutdown, rejoin base inodes
-a886ba0 ceph_message_header, etc.
-f8a1010 fixed fakesyn
-187e792 split out raw bit sof msg_types
-91f2ff2 prioritize monitor messages; move non-monitor messages to dispatch one by one
-eb8b157 client bits for DirStat
-7386f0e pass dir auth etc info to client separately from inode
-ad05ba3 eliminate useless CInodeExport and CDirExport intermediaries
-ed016b9 xlist itesm remove themselves in destructor; dump mdcache when shutdown looks hung
-aa05b00 scatter_unscatter_autoscattered
-38f5a8f uninit var fixes
-ddb633b discover_path fix; try to merge subtree when cleaning up after a rename
-99a6975 maybe_request_map cleanup; uninit var fix
-c3ae0ee bugfixes, EOpen works with logsegments * try_to_expire does teh right thing with open files * dirlock on base inodes never scattered * trim more aggressive about base inodes when max==0
-60d059e big cleanup of rename operation. * simplified rename slave ops * WAIT_PTRWAITER for save contexts with pointers (used in Locker.cc) * CInode specifc freezing and aubmiguous_authing * fixed some problems with discover duping, dir_auth_hint
-7b0315e set file mode atomically
-716cd84 rename fixup plans..
-8997767 oops
-284dfc6 some rejoin fixes, export throttling during shutdown (hack)
-f111d21 rbig cleanup/rewrite f mdiscover machinery
-182bd79 mix bugfixes shaken out with thrash_links
-f286f14 migrator export now makes second pass over subtree to delay auth change, dirty->clean transition
-8898929 fix bug with large bufferlists with > IOV_MAX buffers
-420236a mdlog trim fixup, makefile cleanup
-d1d0838 takeobjectrw args
-f1fe9e0 mds performance tweaks
-d82f100 encode/decode_simple, streamlined MClientReply::InodeStat encoding
-8da82c0 preserve chunk_at on received messages
-9873f5a asdf
-c1a9347 mdlog logger cleanup; trim fixup
-73829a5 ref_set can be ifdefed out with MDS_REF_SET
-2032147 mdlog logging overhaul; fixed mkdir bug; improved auth_pin assertions and debug output
-9931869 dirty performance hack to streamline single-block appends
-5be31ff build newsyn properly
-e725c07 type cleanup
-1f7d171 type cleanup
-1cd29f1 merged r1850:1862 from trunk
-68d95ad journal buffering tweaks
-37469b0 be quiet
-805a3d6 osd_auto_weigth pt 2
-84b1202 osd_auto_weight
-db19ba5 osds may benchmark themeslves on startup and supply crush weights config.cc config.h
-2011b3b use hash_map in osd for rep ops
-b9c0070 improved test_disk_bw
-e016533 fix bug with add_primary_dentry
-c5eaefc journaler flush delay/batching
-9bdbd4c subsecond add_event_after precision
-598c396 working
-ce62768 more log segments, inode purging
-c997c2f goof from merge
-ed61241 merged r1654:1848 from trunk
-7d06949 log segments, unfinished
-f00e677 fix truncate
-6a30da2 added test_disk_bw
-65de06f fixed striding/segments on createobjects
-766dd40 init osds before the rest.. not for any good reason realy
-66b6dd1 mds boot cleanup; mds profiling stuff (commented out); mds server bugfixes (unlink); mdslog append
-b5bfdc5 less particular about identity of failed osd when applying incrmental -- useful only when patching osd images with non-matching mondata
-b3b2c4b less warning
-5703132 be less anal during find output parsing
-56a852d client tweaks from destro replay
-a37f92d todo!
-6e3899c hold rank lock a bit longer during submit_message, in case an entity tries to shut itself down
-7e87bc1 todo!
-5258c34 debug_after tweak, untested
-f555310 less noisy about message failures
-a3c75c0 various mds tweaks, bug notations from load balancing/failure experiements
-773b706 config tuning for lb; more aggressive journal replay
-9163ba4 quick fix: handle failure during reconnect phase
-5a0bcab pin stray dentries to avoid premature trimming
-79c7fe9 file_eval cleanup
-af5438e simpler request direction when replicated; hack to workaround mds session bug on cap migration
-07dc9ba don't stat the root directory so much
-a0583c8 fixed up load spread
-dc41ec6 load_spread
-4bd32ce trace repetition weirdness
-82c7576 other mds cleanups
-d973f65 few bugfixes, share dir_rep during rejoin
-c06dee1 fixed trace looping
-4c2d37d client tweaks
-c960503 use CDir::map_t
-9cd8f98 fixed symlink, old trace playback
-856f7d1 fix absolute symlink following
-3b22f13 cleaned up trace playabk a bit
-e37a8bc propose all mdsmap changes immediately
-474b16d localized ll trace playback
-c596425 mds appends to log on restart
-7c51dc8 include context in EOpen
-f0f542d inc 0 defined
-95ecf91 bad
-a60ead6 fake_kill_mds_after
-0d5b359 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1808 29311d96-e01e-0410-9327-a35deaab8ce9
-fcf3ea2 fixed up log trimming after replay
-24f0d25 go straight to standby, do not pass creating or starting
-7de63e0 standby mds do automatic takeover
-68284c6 remove useless sigint handler, dont die on misdirected message
-f86b863 path traverse stats
-f44073d shut up
-befb9a8 smooth over time
-fb5854a temper offload
-874e4c7 anchortable on mds0
-39d2f7d performance tweak
-6572435 fixed dendl whoops, fewer cache dumps
-c83e90e fixed up do_sendmsg
-7c411d2 sendmsg, tcp_nodelay, again
-7767c0b nicer printout
-d06c6f0 use hash_map for CDir dentries
-45a7c7e buffer performance improvements
-b5d1726 link test
-d59118f revert sendmsg change, it hangs
-28e2d0f journal latency uses logger averager
-167431d segment-based trimming; balancer does queued exports
-c93efe0 stupid hack to pull osdmaps out of an osd store
-c8487f0 more buffer iterator improvements.. substr cleaned up
-5d81a0a synclient fixup
-4bedb61 hacked up client authority caching.  still a mess, but marginally better
-95be587 dendl dummy
-bc3aa38 balancer fixups, logger takes mdsmap timeline, readdir trimmer race fixup
-047181a approximate popularity in new fragments
-fc25fc7 fix lru midpoint calculation
-3fcfd15 track queue len in simplemessenger
-ad32837 logger avg fixup
-9e71117 syn client cleanup
-b1fe02e bufferlist iterators
-718ced0 make ll_forget more foregiving
-88620e7 ll_link playback fix
-24a7b0e trace playback fixes
-dd20060 logger avg fix
-377f4de shut up
-7b89218 hard link fixup
-f190c14 anchor table, hard links fixups
-9b8b9d1 basic permissions checking
-0275bd8 import_find now parallel
-7136598 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1766 29311d96-e01e-0410-9327-a35deaab8ce9
-ebe775a study_find improvements
-c875c01 nomore
-479c18c no default srun
-2a45d6f llnl mpi fixups
-6d1b7a1 minor cleanups
-d015a9c blobhash fixup on 32-bit
-904e36d new hash function
-85b4b55 object_rw fixed up
-e170ac9 use logger averager inc lient
-cee51c1 logger can calc average and variance
-d596ccf use sendmsg in simplemessenger
-51a29a0 whee
-6cdfd2e createobjects fixup
-166e468 fixed osdmap oid hashing; osd shutdown
-2f5ceab messenger fixup
-11f5efa better client layout, dont delete clients
-c338e27 reorder bugfix
-1c6adde osd_pg_bits means per osd
-e577788 be quiet
-651e7dd locking attempt 2
-e805569 fixed object workload locking (but not trace playback)
-feb1f9a asdf
-73eb0fa cleanup
-a0dcde1 fakemsgr fix
-0eea8d6 log loadavg
-f2707f5 skew object workload
-57919d9 read shedding improvements, better interaction with immediate_read_from_cache, better op latency calculation (messenger apploies recv stamp)
-472490a lots of read shedding tweaks, vaguely behaving now
-d6ef0ec new runjob.pl replaces old runset.pl.  comb fix for floating point values
-0d20631 more read shedding bits
-4fc8e71 balance_reads watches object temperature (hack)
-9799d49 cleaned up read shedding
-e611b13 osd load calc changes
-00f81b3 allow %d (client number) in trace filename
-ab5988f more locking fixes
-140da74 fixed object tracer playback; object creation, uniform rw workload
-435f4ec fixed an osd recovery bug
-9da420e fixed objecter timeout to request new osdmap
-ce5f6fe lots of recovery fixups * objecter has timeout mechanism (untested) to request maps * primary-driven recovery (re)implemented in replicatedpg * raid4pg temporarily ripped out * pgmonitor fixups*
-43f0720 quick gprofing for individual mpi ranks
-7795db3 fixed fakemessenger segfault during shutdown
-75cbf93 osd cleanup, small bugfix
-cda62de dupstore, ObjectStore, Ebofs and Fakestore interface fixups
-7fec368 onlyrange syn command
-95f209a shut up about cow
-6f5f4e7 minor tuning
-1d2139e dup.ebofs to efficiently duplicate an ebofs volume
-c7ea8cb verify tables on mount
-5bd408e fixed node cow (ptrs need to update too)
-ede177f added clean bh merging, removed unnecessary dirty list
-5d99f42 fixed do_cow()
-d923037 fixed xlist push_back bug
-b6af38f logger fixup
-da6b446 fixed new bug in buffer encoding, finally implemented a proper substr that returns a string
-6ea88ae rewrote logger
-af6bbfc fixed cmon
-ef8f41c recovery bugfix, and some pg stats work
-20827c0 object-level trace playback
-24a7b51 rewrote ebofs node management to eliminate crap performance with large object counts
-9231b21 hash_map instead of map
-3c2c90a small cleanups
-5e8a9e0 bitmapper, etc.
-8574281 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1703 29311d96-e01e-0410-9327-a35deaab8ce9
-c915a90 fixed .ceph_hosts, paxos should_propose interface
-bd348ba allow dout redirection to somedir/hostname.pid with --doutdir somedir
-cec0f70 quieter
-c170821 buffer page alignment, simplemessenger bug fixes * simplemessenger bug fixes * simplemessenger chunks message payload based on hints; receiver page-aligns new buffers if chunks are n page sized * client mounting fixed up (now an 'instance' number that identifies instances at each address) * paxos update buffering fixup * ebofs avoid copying written buffers when they're already page aligned
-9b9bba9 fixed objectcacher write throttling
-a6bc293 fixed parallel client naming race
-54d81ae fixed parallel client mount/init
-985f903 nicer mon output
-805c6d5 fixed unnamed entity naming, parallel synclient mounting
-405a3a3 made conflicting endl symbol to catch dendl/endl mixups at compile time
-ff7516a nicer output
-cfbe8ac objecter periodically requests new map if it hits an empty pg
-5cc78b2 debug_paxos arg, longer default mds grace
-5ecbf7b quieter
-3c60627 fixed osd_hack_fast_startup and monitor shutdown
-f839eda misc
-d624d5b fixed idle kicker stuff
-c9ec799 der
-547133e more debug output fixups2
-23007ad more debug output fixups
-84ee6f0 dendl oops
-971f9f7 fixed ownership when run as root.  still no security.
-792ea3f stragglers
-652d686 new debug output locking everywhere!
-54c41e2 bugfix in osd
-c0dd8cf locked debug output
-5fab029 small ebofs fix
-74f13f4 ebofs tuning, locked debug output
-1f4bd15 logging changes; hooks for bencharmking journaling;
-4eab5b7 fixed trimming race issue in journaler
-d16f9a1 new debug.h
-5819b76 minor client cleanup
-69ade9e asdf
-e72e9ea asdf
-ab537a7 create, timestamps
-1d41bad fixed up
-e1840d6 asdf
-bd7667c some bugfixes, remember fds, fd paranoid weirdness
-6d36972 fsync instead of close(dup())?
-8add023 simplified, better assertions
-d3d4838 fixed up lstating on lnink change etc.
-11c6adf cleaned up cache teardown, ref counting, etc.
-f047964 better hard link support
-a4fadf4 quiet
-b8a68cc fixed link bug
-5176cf5 statfs better
-15d6bf6 asdf
-6c2c8bd build under 32bit
-a6db179 merged branches/sage/mds r1653 back into trunk
-79149d7 merged r1628:1652 from trunk into branches/sage/mds
-a69d97d Fixed spurious conflicts
-9475438 some cleanup
-949863a trace now reads from file, implemented ll_flush stub (still a noop)
-cd1bb64 fixed re-broken cdir complete flag bug (which resulted in lost dentries)
-3d82e39 works ok
-76164d9 asdf
-7afde62 new log segments correspond with new journal objects
-1892b13 fixed up mds_local_osd, crush, osd mkfs for preferred pgs, etc.
-8bfab80 fusetrace!
-1b1e18c git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1643 29311d96-e01e-0410-9327-a35deaab8ce9
-ac188a7 study a static file system, look at hardlinks and directory size
-10b4644 asdf
-e77740f asdf
-3917aad .ceph_hosts files
-acc862d lots of migrator bugfixes, refactoring, cleanup.  needs more testing, esp bystander vs ambiguous imports
-c5611ad mds.migrator import bound handling refactor, untested
-db8d7cb fixed bug in metablob->add_dir_context and scatterlock tempsync
-e84caa4 client tweaks, small mds bugfix, improved ll_lookup
-dc07fa4 osd updates and bugfixes * MOSDPGActivateSet for faster startup * "clean" osd (shut)down * fixed some pg log/attribute bugs, strengthened invariant * fixed project_pg_history (and subsequent assert(from == pg->acting[0]) bug)
-0f53605 fixed non-mkfs startup mds shutdown idiocy
-008b87f fixed cdir fetch auth_pin bug
-6f65592 client bugfixes, basic statfs implementation (minus mon.pgmon)
-85690d6 objectcacher bugfixes, better bh merging
-2430469 removed active/* binaries
-2aec5d1 merged branches/sage/mds r1627 back to trunk
-773e40a merged r1566:1626 from trunk into branches/sage/mds
-ef54ec5 some more client fixes
-0c07fda misc cleanups
-1edb00e fixed pesky read objectcacher bug
-5727387 fixed caps race with client, play_trace can do metadata only
-3a158b7 fixed problem with premature fakemessenger thread shutdown
-1f0eb59 fixed a few objectcacher bugs
-3db4253 trace playback behaving
-334e485 lots of client tracing, and 32bit ino number hack
-e01e895 fuse_ll seems to be in good shape
-2003497 client fuse work
-b81c9a4 client fixups
-f84348d fsync bits
-431d61d nicer popdump
-29479c7 be quiet about remove_onode ref counts
-8ec0b1c be quiet about cache reads
-a63057f shut up frags
-5c3352f cleanup
-7f6679f some frag fixes, debugging
-46d574d fixed up freezing.. not it takes an auth_pin and is just better
-e58c898 cleanly stop simplemessenger accepter thread
-37af714 cleanup
-8259ffc Starting experiments in locality-aware task distribution
-b5d049c commit new frags on split instead of journaling and dirtying everything
-d41ca3a cleanups
-e52e216 fixed mds shutdwon state change race
-5a435b1 logger in mds.server
-dfe07a6 stat mask rename fallout
-88eca4a big cleanup of popularity tracking code
-e6da94e fixed up client, mds * frag_t bug * client stat mask handling * client debug output cleanup * potential CDir store/fecth problem with shrinkage
-91c7f76 some mon.pg bits
-b082d24 adjust verbosity, timestamp debug output
-2128d22 more fuse_ll, client cleanup
-cf575f6 makefile beautification
-170b7b2 fuse_ll mkdir, mknod, symlink
-9598828 some int size cleanup, hopefully everything that touches the osds
-9f1b2af more client readdir cleanup, and initial fuse_ll implementation
-30d2087 client readdir cleanup; import_find
-80f437b removed branch
-c7f4a6a prelim dn dir_offset work
-0653682 cleanups
-b3c7109 cleanups
-e5881a2 mon_allow_mds_bully
-a56d4c4 include pid in fakemessenger addr.nonce
-56392fc fixed random fsid creation
-00dc400 mdsmonitor boot logic cleanup
-55448d4 ObjectStore::Transaction encoding and interface changes
-f346fb4 be pretty
-b7e4741 return proper value to fuse
-02a0a46 cleanup BDB build
-0674752 use regular Mutex for buffer.h by default; make flag to use cc++
-29563c8 readdir on fragmented directories works now; also some client readdir cleanup
-4cf9319 some frag readdir progress
-d0e9935 include trace on readdir EAGAIN frag mismatch
-2c9ed7f journaler cache object (for benchmarking)
-d84cb68 cosmetic
-e887aed more efficient encoding in EMetablob
-12cf843 jump more easily into scatter state when unreplicated and unlocked
-3b0ba45 use GNU Common C++ AtomicCounter instead of a Mutex in buffer.h
-76542e8 merged r1561:1566 from trunk into branches/sage/mds
-3ab2c0c some blaancing cleanup, performance tuning
-0759800 allow multiclient nodes to mount
-d32f177 utime fix; decaycounter improvements
-af52f93 rewrote client readdir, cleaned up readdir handling on server etc.
-ad7df19 inode last_journaled
-42e9a3c merged r1543:1561 from trunk into branches/sage/mds
-b156ff7 half of inode->last_journaled business
-6306a64 some warning cleanup under cygwin
-ce1e7f7 more split fun
-bcd349d swap() in buffer::ptr and ::list
-50e58af preserve file type in mode during chmod
-5ee2f57 fixed a few bugs
-2f29b29 some debug info, slightly improve mds choosing
-cccf613 don't include . in readdir results
-6087b9e use get_random_in_mds
-ab4b8a5 frag bugs, migrator bugs (!), other frag+migration work
-3624203 fragtree force_to_leaf is bool
-ee05988 journal old subtree bound ino on merge
-572640b redid d_type as remote_d_type
-cd6e066 initial d_type code; some CDir::committed_version_equivalent cleanup
-005dd45 fixed antoher stupid get_num_blocks bug
-918d2ad some housecleaning
-18d3496 split appears to not crash
-9df08e9 more fragment work
-665688c new mds branch
-53b5215 clean up inode number ranges
-cbda054 fragtree simplified/normalized form
-1c6ffab more frag/split work
-b57474a fragtree, fragset work; migrator/cache dirfrag bounds cleanup
-1a3529e bounding dirfrag_t's maybe ambiguous
-a288fd1 fixed follow_symlink for truncate, other ops
-650e278 allow purge of 0 bytes inodes
-83688c5 mount validates superblock vs actual dev size
-a455e96 fixed bdev size detection; mount validates s_magic
-f3e5d28 removed legacy obfs stuff
-98f1850 prelim split/merge work, freeze_dir, pin rearrangement
-2ca9a37 include full inode in all acks (even to survivors)
-13e3a45 osd pg locking fix
-0e79154 uninitialized value fixes
-459080e fall back to BLKGETSIZE if BLKGETSIZE64 isn't defined
-fdaf362 verify that we can determine device size on blockdev open
-ae21650 mdsmap same_in_set_since
-ea9c3fb fixed open(O_CREAT) bug
-f159160 a few osd/pg locking fixes, cleanup
-0e98193 rework of osd pg locking
-4a39c28 query for new mdsmap if missing an inst
-35ac040 cleaned up osdmap sharing code
-3478c34 some osd fixes
-a78d136 no raid pgs yet
-61bc6f6 mark osd down and then up again in separate epochs
-150bbe9 cleaner mds suicide (not coredump!)
-e1f9b77 merged r1515 branches/sage/pgs back into trunk/ceph
-39b8094 merged r1475:1514 from trunk into branches/sage/pgs
-0f78284 merged r1513 branches/sage/cephmds2 back to trunk/ceph
-5daedb7 pgmonitor shell
-c1a5517 pg monitor compiles
-8ffff6d reorder osd up/down in/out output
-183ccf2 todo
-90f9133 removed old rejoin ack message
-fa78769 cosmetic rejoin cleanup
-035ee45 cdentry new, cdir committed_version_equivalent, some rejoin cleanup, inode purge bugfix
-5f6628a reset beacon on boot
-1676a2d bug fix in partial bh code
-c14bb94 reset session seq on reconnect
-64ce680 decompose utime_t when printing
-46756a1 some rejoin and naming cleanup
-11c907d * finished missing/full rejoin * CInode STATE_REJOINUNDEF * renamed some rejoin_* functions to be more consistent * fixed newsyn/fakesyn mon_stop_on_last_unmount defaultiness
-8d61c36 merged r1497:1499 from trunk into branches/sage/cephmds2
-8e350e1 * merged 1447:1497 from trunk into branches/sage/cephmds2
-d3a9318 * be quiet
-08dce39 * locker caps fun
-2fa46c1 * fixed a bug in buffer.h!  yay!  should be much more memory efficient now, too.
-2f5718f * uninit mem bug in ebofs
-d1436d2 * get_rand_in_mds
-ee36a38 * separate debug_paxos setting
-79628c8 * turn down debugginb in ebofs * trivial replay bug in ebofs
-91085dc * cleanup in MClientFileCaps * cap reconnect migration appears to work, yay!
-d820c28 * fixed subtree_map metablob bug (some bounds were left out) * fixed importstart/finish spanning subtree_map replay bug
-eb2abe0 * EImportMap -> ESubtreeMap * MMDSImportMap -> MMDSResolve * clientmap saved separate from journal now; much cleaner * some rejoin cleanup
-fae14b8 * fixed import_map trimming * fixed mds -> client session opens on caps migration (untested) * fixed CDir fetch/store * fixed journaler flush bug * worked around audit() weirdness on import disambiguation
-a226b82 * larger log import map interval
-c9820bc * reworked mds states, target mds cluster size, other mdsmap updates
-8f44c46 * reconnecting caps * parallel_fetch, etc.
-619afbb * push seq number of mds to client messages, client session close attempts may fail
-850c15d - fixed subtree recovery weirdness - lots of work on rejoin - fixing up some of hte caps migration code
-12b5746 * some small bugfixes
-afe979e * restore fakesyn, newsyn shutdown-with-last-client behavior for testing etc.
-79cfcb2 * misc rejoin bugs * parallel_fetch (untested) * two server bugs * MDCache::list_subtrees()
-628e654 * lots of work on rejoin.  still some details left.
-c23e3c1 * partial start on rejoin rework
-fab2212 removed mon2 branch
-922df76 merged r1472:1475 from trunk/ceph into branches/sage/pgs
-34c54d3 * formatting goof
-6ee499d * formatting screwup
-a419ff6 merged r1409:1471 from trunk/ceph into branches/sage/pgs (the rest)
-4e4c5bc merged r1409:1471 from trunk/ceph into branches/sage/pgs
-2c9f27e * fixed scatter writebehind
-5391bf4 * journal trimming waits for scatterlocks to flush.
-e5e1404 * EAlloc merged into EMetablob
-366eabf * partial move of ino alloc into EMetablob (not done) * ESlaveUpdate log flushing fixed up * slave update rollback cleane dup * locallock integrated * some rename bug fixes * acquire_locks will auth pin scatterlock parent if !auth and !scattered (in case we have to request) * scatter_wrlock_start will request a scatter * rename dirfrags forced into subtrees for duration * bugfixes in inode expire scatter/file lock eval
-6732318 * iversion lock
-79312af * versionlock (LocalLock.. crappy name) * CInode.force_auth
-f571124 * migrator: pin exporting dirs * migrator: send export_cancel to right person.. and dispatch it * locker: auth_pin in unstable states * locker: _eval functions broken up, cleaned up * server: projected_inodes tweaking * server: commit/rollback needs reworking.  link() partly there.
-24d5e84 * quick doc update
-1c91e2c merged branches/sage/mon2 r1462 into trunk/ceph
-41e1212 merged trunk changes r1424:1461 into branches/sage/mon2
-03e77ac * minor osd failure handling bug fix * better sanity checking
-e04dfa2 * typo
-951bb3c * more partial canges, untested
-c095792 * some prelim work for locker authpin changes
-e82af91 * removed crufty locker docs
-994d808 * this _appears_ to fix a valgrind error, and conforms to the 'always signal with lock held' rule.
-33b9f70 * fixed migrator shutdown/fail notify waiter bug * some prelim scatterlock work for updated flag.. * projected_inode, and associated Server method rewrites (way cleaner!)
-7f21269 * some MDS event cleanup * fake kill, suicides
-15aacc9 * destdn auth opens any dirfrags under srci * minor cleanup in path_traverse for dir discovers
-26d36c4 * fixed bug with renaming directories and subtree map adjustment * lock can_rdlock() cleanup
-6ec9a95 * fixed client cache bug with relinking
-e08b94c * todo
-4513093 * fix anchortable commits * resolve remote inos during traverse * reply, then finish slave requests.
-c8015df * fixed up indoe/dentry/dir discover; all now add_replica_*() * fixed bug with discover auth hints * cleaned up handle_discover_reply
-9d73dc4 merged trunk changes r1407:1446 into branches/sage/cephmds2
-918e5a2 * cosmetic
-4c1ea57 * fixed link/unlink recovery behavior * fixed up slave request recovery handling in general * unlink now reanchors when moving ots tray * fixed rename replication of straydn
-705bbe4 * new link thrasher, still needs some work.
-76fec3d * cleaned up old message types, unlink/link cruft * rejoin restores authpins AND xlocks, slightly more cleanly * rename reanchor cleaned up * fixed migrator export vs stopping mds race * slave update recovery implemented (untested)
-2cfdd57 * remote unlink, genericized slave link++/--
-15d9d63 * foreign link implemented
-7693801 * resolved request forward vs slave request finish race
-e70608a * clientmon: save latest only once, at end of recovery
-bb07a81 * fixed up dir inode mtime handling * lock set finalized during rename to avoid wrlock auth race
-428db51 * path_traverse cleanup, DISCOVERXLOCK fixes
-b9c6b44 * rename thrash test ran to completion.
-039aad1 * some prelim for rename inode migration
-ced8e97 * client mount timeout/retry; but we need a general approach to mon query retries
-125e6fe * some journal tidying
-da3a11d * simple ebofs journaling, yay!
-b719c69 * rename commits on slaves
-7b3497e * rename now generic, and works locally so far
-1f6a7d6 * small MMonCommand fix
-a6f5abd * force trim of replicated null dentries that sync to non-null * fixed authpinnable waits in server (now wait only if frozen; locker->acquire_locks will wait while freezing, and handle auth_pins properly)
-dd6a261 * genericized auth_pinning * cleaned up Locker auth_pinning * slave auth_pinning implemented, but still buggy * identified some migration vs null dentry issues!
-1de1285 * minor osdmon fixes
-2eb4408 * lots of fixes.
-92e776a * rewrite of osdmon, clientmon, mdsmon using new paxos framework
-1f2ce98 branch for distributed monitor work
-a541ba3 * mds remote locking bugfixes, etc.
-2027970 * forgot this
-159536b * fixed mdsmon startup race * pulled out generic PaxosService stuff (wasn't that much it turns out) * some paxos bug fixes
-6d7c053 * fixed client mount race under fakesyn
-2f4658f * more paxos work
-ebe1abb * finish_contexts is now loop-safe * mon: lots of paxos work, still in progress * mon: elector rewrite with epoch!  yay
-14d3733 * only auth_pin wrlocks if auth
-4718149 * dir mtime fix * some slave request infrastructure fixes
-99a67f6 * small flash crowd candidate check cleanup
-7923e37 * minor read balancing fixes
-cd9f72a * export twiddle cleanup * misc locker bugfixes, getting stabler
-59ccbb7 * scatterlock rewrite (untested) * slave mdrequest, remote xlock, etc. rewrite * fixed request forwarding bug
-f9430fe * bugfix on filelock caps callback
-af8a786 merged trunk changes r1397:1408 into branches/sage/pgs
-eae75f1 * mon: send osdmap to waiting too when all osds finally boot
-26c8a9e merged branches/sage/cephmds2 into trunk/ceph
-3b6ca5d merged trunk changes r1394:1405 into branches/sage/cephmds2
-d5520d0 todo
-b9e1163 * be slightly less dumb about sending initial osdmap to clients
-d9931d4 * bugfix in mount()
-dfb99b6 * show osdmap content
-b05d2d9 * be explicit about journal append ack/commit safety
-5d24169 * tweak to still allow primary-directed read balancing * pg_bits -> pg_num, smarter 'mod' function
-943bbbf * recast in terms of read-balance attribute
-dd2d7f9 merged rewrite of suresh's patches so far: * objecter reads from replicas, if directed to * primary-lock half implemented * popular objects added to replicated_objects list on replicas * replicas satisfy reads on listed objects, or fwd to primary * syntheticlicent 'exclude' option * wrapped into a preprocess_op() PG method * read balancing cleanup
-affb267 merged trunk changes r1361:1396 into branches/sage/pgs
-820a06b * fixed dir mtime updates on dentry creation/deletion
-8c1a8d9 * account for open popularity properly (rd vs wr) * locker bugfixes
-df4d6d5 merged trunk changes r1360:1393 into branches/sage/cephmds2
-4f3abae * noisy about replication
-dc1db55 * mds boot osdmap weirdness fixup
-ebf0a39 * waiter debug output
-6236b80 * fixed lock waiters
-09b7d7f * use int for mds state var
-12ed9df * some edits
-653205e * added vim modeline
-3a02059 * beginnings of ebofs journaling
-10db815 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1385 29311d96-e01e-0410-9327-a35deaab8ce9
-9fd9096 * clear dirfrag dirty bit when closing/purging
-3e9dd40 * fixed some unsigned overflows
-c72e30e * grab rank lock while changing local map!
-d1de85d * mds bug in Server.cc
-54cf315 * scatterlock fix
-1cd3c4a * fixed bug with multiple mds restarts (log ambiguous import success/failure)
-b96cbfa todo
-bdc5655 typo
-9f02806 * use stdint.h
-66961f2 * mds bugfix: file_eval shouldn't change lock state when xlocked
-66eb87f * bugfix for filelock xlocking
-40f37d0 spurious conflicts
-e9b7e21 hardwired in absolute .ceph_monmap path
-f1a87dd * improved behavior of locker versus migrations and recovery
-56830d4 * some simple recovery fixes
-ca8acff * roadmap update, etc.
-aade738 * some rejoin cleanup; missing still not implemented
-3beb089 * rollback caps goof
-8ddd710 * removed branches/riccardo/monitor2
-638a325 * merged branches/riccardo/monitor2 into trunk * some paxos bugfixes/cleanup
-361416a * merged trunk changes r1131:1363 into branches/riccardo/monitor1
-b0469bd * merged suresh's read balancing changes
-aaf363d merged trunk changes r1351:1360 into branches/sage/pgs
-9d04a68 before branches/sage/cephmds2 was merged into trunk/ceph
-13ab418 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1360 29311d96-e01e-0410-9327-a35deaab8ce9
-6b365d7 merged branches/sage/cephmds2 into trunk/ceph
-74a34f1 * from trunk
-7c048c8 * fixed client_inc bug w/ fakesyn
-48d55ae * fixed caps on open idiocy
-1907282 * some dumb typos
-5fa0268 merged trunk changes r1338:1353 into branches/sage/cephmds2
-35ce952 * open_remote_ino rewrite * some scatterlock work.  not done yet. * rejoin cleans out xlock cruft
-b86e591 * scatterlock fixes
-4e21456 merged trunk changes r1138:1350 to branches/sage/pgs
-06a85f1 * syntheticclient lseek
-a511e19 * mds: osdmap handling bugfix * common/Thread.h: fixed stupid join() problem (again)
-e0aa204 * allow multiple batchopenjournal pins
-d8dd31a * chdir back to original dir on fuse shutdown, for benefit of gmon.out
-53abf94 * scatterlock.  untested.
-bd8c940 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1345 29311d96-e01e-0410-9327-a35deaab8ce9
-f66e3b9 * lowered default pg count for now * fixed mds restart bug * osd quieter * default mds_beacon_grace is now higher
-e1953a9 * fixed small locker, rejoin bug
-be35730 * client make_request rewritten, now handle forwards and sessions and recovery gracefully * mds rejoin fixed up, recovery basically working.
-a21552d * session recovery cleanup * EOpen batching
-38a77c2 * rewrite of client mount process.  sessions opened for each mds. * mds recovery step reconnects with clients with open sessions
-b97405e merged trunk changes 1256:1338 into branches/sage/cephmds2
-edadd14 * more non-idemptoent clietn ops stuff
-7bba52e * client idempotent ops
-b3ffcce * prelim work for EOpen journaling * cache rejoin rewrite * export dir prep cleanup * thread cleanup
-0579856 * some hashing cleanup
-6c46386 * hardlock broken into auth, link, and dirfragtree locks
-963bd25 * ambiguous auth cleanup, now generic in MDSCacheObject * mds.locker: first pass at remote xlocks
-3cf427f added new prediction for new test
-dd50894 * mds: generic waiters * mds.dir: cleaned up dentry waiters
-c843188 * mds: more bits into MDSCacheObject * utime_t timestamp precision in inode
-f039c23 added some renewal stuff
-a0ff476 added 2 more workloads
-25a393a added configurable prediction
-4cb8c4a * mds.locker: huge rewrite.  cache objects now share lock code (for real).  not tested yet.
-85bbbc8 * mds.server: more rewriting, now we explicitly rdlock path always, for proper auth check atomicity * mds: remote inode link groundwork, just need remote xlocks * mds.server: rewrote open O_TRUNC path
-fb16ca7 redid some renewal stuff
-a1dc12a * mds.migrator: fixed auth_pin vs exporting deadlock by allowing discover stage to abort. * mds/journal: fixed importing bug
-b7af801 * mds and osd ops now set 'retry' flag, so osd|mds can eventually skip dup op checks
-516e512 adding some test results to parse
-e024a2c sequential, non random trace usage
-65a4f4b added a ior2 workload
-feee225 unlink
-5de9a7f * rename reintegrated.  so much simpler, yay!
-15aff09 * buffer.h encoder/decoder rewrite; can now encode/dequeue any stl-based structure, provide base encoders are defined
-50a672e * reqid refactoring (metareqid_t vs osdreqid_t) * lock name cleanup
-ea78497 * extensive rewrite of locker, server request handling, lock acquisition code * mds: path_traverse cleanup (no more onfinish--we cache negative dentries now)
-4c00d13 ditto for lseek
-cb8a866 does trace lseek stuff
-5916f82 eh a bunch of stuff here and there
-9364687 * mon: default to a ~128 PGs per osd (up from 4!)
-520d3df unix group preloading
-f1c7968 minor unix group tweaking
-088e5f0 script to parse open/closes from trace for prediction
-1ab4400 Prediction now actually work...with some hacky fixes
-1e901bb * buffer: deque map<t,deque<u>>
-88d3f21 * more mds lock notes
-bf7efb0 * rename notes
-fc112a7 Added clients side file access prediction
-772e4e7 forgot the batch file
-f89c21f on file batching working...with some client cache issues
-53d4e98 * dentry unlink notification moves to stray dir (w/ discovers) * eval_stray, purge_stray * adjust_subtree_after_rename (untested, of course) * EMetaBlob cleanup to allow un/relinking.  need to test. * rename dirs checks for emptyness. * unlink/rename auth_pinning fixed up
-61fc0d4 * mds: simplify unlink, rename logic by always moving existing primary inode into stray dir; purging will be async
-12adbb9 * hadoop: minor cleanup
-ceb020e * mds: make sure loggers open properly (w/ newsyn), and flush on shutdown
-8d98b37 * mds: fix lost auth_pin
-6d5728d * fixed rename semantics (helps to read the spec) * local rename makes anchortable updates. * local rename vs hard links behaves
-96353bf even more debugging of Hadoop interface
-d6f473d added some logging stuff
-5c4ae62 * some mds ino cleanup * Renamer stripped out; handle_client_rename cleaned up, _rename_local stuff there * finished dirfrag refactoring * stray dir creation on create/boot, trimmer fixes, etc.
-6c0dca0 clean up again, changed output
-d00cf71 * mds: alloc RDCACHE during glockl * client: fixed truncate handling, implemented helper in FileCache * osdc: implemented truncate in ObjectCacher
-cebf626 * SimpleMessenger only lets you do start_rank once
-981f2a1 * thread join more forgiving
-6683ede Even more debugging. Reading is currently broken.
-5d8ce37 more debugging
-f396c4b clean up stuff
-a67c29d * clock_tare arg to allow wall clock time * cleaned out some old build targets
-89c8662 * tested failure on requesting mds vs anchortable
-af7614d * per-line locking on osd debug output (dstartl and dendl)
-446a733 * some idempotent client ops groundwork * tested/fixed up a few AnchorTable failure cases * fixed remote_ino linking bug in Server.cc
-1f5cc96 Debugging interface
-786bf56 * ms_tcp_nodelay
-c6a2e15 grr try this
-8c2fcd7 * more SimpleMessenger cleanup
-aa03d08 * changed SimpleMessenger to send using sendmsg(), to fix weird recv latency
-d9b1a2d forgot crypto.o
-ac3eab6 more clean up for getting numbers
-bebce27 some optimizations, not sure they help
-42bf150 some unix group cleanup
-0d0e046 asdf
-8a8cf2b * libhadoopcephfs.so
-80ed795 key management changes
-f275c16 more Hadoop stuff
-f212de3 * some client cache tweaks
-b9c6921 calc update latency w/ optimizaitons
-eb07ec9 2007-03-19  Casey Marshall  <csm at soe.ucsc.edu>
-c8c238e more latency recording added
-070d854 Added read/write latency timing
-a41774a added an mds latency testing file
-6fc29fa moved cap call around, helps alleviate an assertion
-bef33e1 fixed a deadlock problem, may come back to bite me
-eb36db6 * singleauth waiting; discover waits * moved auth_pins out of Locker; explicitly in Server.cc handlers now * prepare_null_dentry/prepare_new_inode cleanup * reqeust_auth_pin stuff
-17cce2b buffer flash crowd stuff ground work is working
-fb147bf merged trunk changes r1208:1255 into branches/sage/cephmds2
-6ed8c55 * O_TRUNC implemented in open()
-b80c3a6 * fixed problem with client cache caps
-9d06283 merged trunk changes r1223:1251 into branches/aleung/security1/ceph
-62ffc11 * some discover cleanup * fixed CDentry state replication (preserves dirty pins) * fixed clientmap versioning vs journaling
-785e6e5 * fixed bug with lost waiters on null dentries (e.g. mknod race)
-2bcc95a * some changes to client cache: readers/writers block properly, wake up when data is flushed
-974c3fe fixed trace_convert to write to previous offset
-183857f Created a quota branch
-5cb6d95 Added branch marnberg for quata
-1d423e3 * csyn: start up N synthetic clients, not just 1
-1b71965 some fixes for client shutdown
-89c6aab * fixed getdir() on empty dir shutdown hang in client
-4bb27d7 * fixed buglet with open(O_CREAT)
-df01263 * fixed looping bug with clean_dir (called after trace playback)
-88b0b7d * fix bug with lost waiters on null dentries (e.g. mknod race)
-db4e931 Added test trace file and trace now plays
-5a5c7f3 fixed it to not spit out root, which is already there from mds boot journal flush
-93b3e0c script to first spit out all dirs used in a trace
-8d3760d * more dirfrag refactoring.  slowly but surely. * fixed up message forwarding, even from path_traverse
-786924e * unlink message handler tweak (clean out inode+dirfrags) * EMetaBlob interface cleanup: explicitly specify dentry type, unless updating existing
-c44ced6 script to translate strace i/o data to ceph trace format
-d40ae71 * local unlink works, unless primary and nlink>1
-8e19f2b start of unlink rewrite
-6f40cc9 * carry CDentry state over a migration
-d4a8848 * AnchorTable/AnchorClient update to handle failure for table of initiator. * Simplified anchor ops. * Rollback.
-a29ff7f make renewal an option, switched monmap key management
-4e10806 Applying sages changes
-79e24af * fixed read/write idiocy in MonitorStore
-4d95972 * fixed read/write idiocy in MonitorStore
-5c3e102 * anchortable rewrite.  now journals updates.  partial recovery logic; does not handle others' failures (i.e. disambiguate uncommitted ops.) * anchorclient rewrite.  does not yet retry ops if anchortable fails. * rewrite of MDCache::anchor_create() and _destroy().  no _update() yet.
-8f2c19f * some more discover cleanup with open_remote_dir() * MClientRequest cleanup: args not in a union, self-documenting, cleaner.
-defcd00 using cryptopp headers instead of ++
-47b0059 merged trunk changes r1151:1222 into branches/aleung/security1/ceph
-8eac477 turned some optimizations flags on for crypto stuff
-c1e9220 * emacs headers, formatting
-3562c8b * minor osdmap cleanup
-baaee0f * fixed SyntheticCLient.read_file() to notice EOF
-11add1f * added try_map_read, which checks for missing bufferheads without creating them.  for _is_cached.
-f35b883 * fixed bug with writefile/readfile data fingerprinting (for detecting data corruption errors)
-b803102 renewal stuff is mostly there and working...added some timing stuff for perf debugging
-e980109 fixed some migrator memory leaks; bug in client getdir on empty dir; add_replica_dir in MDCache; fixed mdcache handle_expire behavior during EXPORT_WARNING
-f2bedc9 - CDentry wasn't setting auth bit on import - discover_reply bugfix - improved MDCache.trim() and friends.. proper CEx logic. - cleaned up MDCache.shutdown_pass - Migrator::audit() will verify import/export_state is clean - importing, exporting pins on CDir - fixed bug with EMetaBlob expire logic (on import)
-fa7d4cf Client periodic renewal request works
-c7a1b84 error suppression file to make valgrind shut up about a bug in libc's writev
-e8435da - mdcache wasn't deleting trimmed inodes - client metadata request queuing was goofed; fixed memory leak and other issues
-c728d59 merged trunk changes r1171:1207 into branches/sage/cephmds2 (take 2, worked better this time.)
-dc8f0e0 undo previous broken merge of trunk r1171:1207
-d364c93 merged trunk changes r1171:1207 into branches/sage/cephmds2
-958e3ec fixed lots of memory leaks!  cleaned up C_Gather.  Thread has stricter interface (join() dies if thread didn't start).  lots of objectcacher cleanup (including memory leakage).  some fakemessenger cleanup.
-b6c7941 renewal stuff coming together, mds handling stuff incomplete
-ce7bd32 Client cap caching totally redone
-f849b45 sage helped me fix some stupid i was doing
-ea993eb group bug fixed...i hope
-8ac1851 filepath cleanup.  major discover code cleanup.  thrashing+log trimming is stable!
-f2b2a33 fixed an initialization bug
-5270810 update bug fixed
-42bc516 2007-03-10  Casey Marshall  <csm at soe.ucsc.edu>
-f646f4a fixed warnings on LP64; removed MonitorStore debug message
-5c5e4d8 mds unix group handling better now
-95b21cc some small discover fixes; migrator cleanup; a more serious overhaul is needed both for dirfrags, and to interact well with ambiguous auth and dir auth hints
-0d5fa02 --fix_client_id 1/default off toggles a fixed group for all clients and uid based on clientid
-73e2686 secure_io toggles security (on defaultly) and --no_sec doesnt do anything anymore
-2a38c3e don't require 'fs' to be defined
-6e0d88e multiset pins (with counters); some fixes with migration (mostly dirfrag_t fallout); lots of fixes with cdir->fetch and commit, esp w/ interaction with subtree migration.
-700d946 fixed funny hash output thingy
-b6bd884 changed hash output
-4eaee5a Added an example grouping file
-631a004 Oops, forgot to check in reply message
-34bc782 add the sample file
-7f23506 cleanup
-e8b063c List verification is done
-b9ce005 mds unix group management redone
-93dfe2d a sample
-a0bd45d random stuff here and there
-e14f24e gobs of dirfrag_t refactoring.  mds readdir implementation.  minor client tweaks. ripped out more old hashing stuff.
-23ade8a more dirfrag prep work.  cleaned out MDStore.  soem CInode and CDir constant cleanup.
-34d3bcd use absolute paths when using fuse
-c41901c some prelim cdir frag stuff.  mdstore fetch/commit moved into cdir, and significantly cleaned up
-c49a04f Update protocol with Merkle trees bascially done
-cf115de oops
-284a61d big cleanup of OSD, generic PG interface.  do_op moved into PG.  new ObjectLayout added to Objecter interface (and ObjectCacher), pg in MOSDOp rolled into that.  new PG locking architecture.
-f1f9e9c sharing of mdsmap with clients as appropriate; mds recovery bugfix; some mds cache documentation
-171e5c5 merkle trees added, full cap stuff almost done
-ffe5263 merged trunk changes r1107:1170 into branches/sage/cephmds2
-611c608 eek, use SimpleMessenger.  surprised that worked at all!
-cde976d client mds request retry, forward notification; messages housecleaning; messenger housecleaning; mds journaling of mount/unmount events, client map contents
-f530986 base of update protocol there
-4e2bfa2 moved everything to cryptopp5.4
-95be0dc client describe_layout interface; monitorstore fuse-changes-cwd workaround; osdc debug printer cleanup
-552137f less crap in the output
-e1e1e97 little cleanup
-2abaa3f added lseek to Client
-42e7238 security can be disabled now with --no_sec
-4da3810 basic cap caching done
-332112b Added capids and caching class
-1cdfa1f copiles and runs.  RAID4PG instantiation and pg creation commented out in OSD.cc until the virutal methods are implemented...
-3efd474 build on 64-bit machines (LP64)
-6f36b1e compiles, too
-2f0aa62 wrote it out.. hmm..
-8fa2c00 2007-03-01  Casey Marshall  <csm at soe.ucsc.edu>
-85fcea7 minor fixes...i think we in a happy state (knock on wood)
-c3df762 fixed cache rejoin.  --mds_dump_cache_on_map
-3b8f05b import/export failure recovery basically working!
-f293d98 Cleaned up the mon key gen
-dbac310 merge trunk changes r1058:1150 into branches/aleung/security1/ceph - new monitor key boostrapping
-ba197ff passing of caps works to s degree...still some issues to resolve. About to merge trunk into branch. note version number is case bad things happen.
-81de513 more transplanted old guts. blood everywhere.
-27ac80e comment
-fa5e6eb newsyn fix for numclients>1, mds_beacon_* args for config.cc, simplemessenger now dies on dup register_entity, doesn't assert on missing local destination (still warns)
-42c9f1c Start of new interface to use Ceph under Hadoop --Esteban
-11632e9 More normal state...not that everything works yet but better
-cd8c127 more stuff
-5b9186f stupid bug fix for _is_cached and _trim_from_cache
-98b3943 little changed...still in weird state :)
-73f4d1c Stuffs kinda in a weird state...weird extcap compile error...cap caching on client buffer not totally done
-1e0a427 der
-a476b85 make mds notice incarnation, even when it starts up as a specific mds# (e.g. via newsyn)
-9213a23 eek
-4a10f2b hmm
-f583f34 fixed stupid cache client shutdown bug
-559d2bf reverse_import works with 2 nodes.  bystander subtree cleanup is going to be a little tricky.
-2038950 online recovery from importer failure works.  open_remote_dir fixed.
-6595ded yay!  still need to test online recovery, and write reverse_import.  cleaned out old crope crap.
-18ca629 import/export stable with new subtree infrastructure.  now to fix recovery.
-9c7f67d added basic implementation
-edcf4c0 merge branches/riccardo/monitor1 changes into trunk (pg log storage fix, monitorstore, simplemssenger fixes, fakestore rewrite, and the latest monitor stuff)
-a32d6d3 fixed pg log storage (and the stupid recovery problems); fakestore cleanup
-90c7ca3 minor set_dest_inst cleanup
-54ce20a fakestore rewrite.  new dir layout.  now only optionally fake collections or attrs.  verify xattr support on mount.
-e9fb0a2 mdsmon startup/shutdown cleanup.  minor monitorstore fixup
-3e58658 Read caps are being received by OSD...write caps are next
-93528d8 monitorstore fixes
-fd9422e fixed osd failure reporting; monitorstore mkfs; monitorstore cleanup
-3968ca4 merged trunk changes r1107:1121 into branches/riccardo/monitor1
-432611e Read cap is being passed through client
-8dae85d Removed RC5 encryption, not compatible with older crypto libs
-a60cdad Changed cap cache handling
-2d23769 Resolved some capability generation issues
-ba38fe2 cmonctl; omg gobs of dir_auth import/export crap, that i am about to scrap anyway.  fun times.
-2fb0b4f untested auth_pin changes; ctime changes (i am an idiot)
-9fe20ec Modified extcap buffer management
-e50846f 2007-02-20  Casey Marshall  <csm at soe.ucsc.edu>
-d8814bd minor cap bit handling fixes.  should tide us over until there's time for a more thorough code review.
-ecd44c7 significant rework of export messaging.  cache expire rewritten to dup expire messages to old and new auth during ambiguous phase.  CDir.dir_auth_pending to track that.  CDentry state properly migrated now.  lots of related bugfixes.
-771f8f2 2007-02-19  Casey Marshall  <csm at soe.ucsc.edu>
-acea5fb 2007-02-17  Casey Marshall  <csm at soe.ucsc.edu>
-d872f20 paxos message delivery, elector change
-ed572c0 fixed port handling, nonce
-0d081ba merged trunk changes r1084:1106 to branches/riccardo/monitor2 (namely, the mds updates merged back into trunk)
-92f7e6e merge from branches/sage/cephmds2
-7df5fac iasdf
-bc0d400 openc hack, works for now
-e68d24c debug prefix
-41dcb87 pipe close bugfix
-a734251 added the extcap class
-9ce10fb Client gets cap back and begins passing to OSD
-9511a6e merged trunk changes r1047:1098 into branches/sage/cephmds2
-b796b30 move ip parsing into config.o, generic --bind option for all build targets
-3d79d61 fixed get_new_proposal_number
-f4e4556 function skeletons
-58a1b3e paxos messages
-53a7ffa create a mess of directories w/ a realistic nesting structure
-bcb9b1e surviving exporter will recovery importer failure during export
-ae472db some web page updates
-a8f8019 osd ops tagged with reqid_t, which includes osd client (client|mds) incarnation.  types.h files restructured/cleaned up somewhat.
-1b4868a ginormous message layer refactoring, i want to die
-49784ff monitorstore.  paxos get_last_proposal_number.
-c434146 paxos shell
-8eef495 elector bugfix 2
-f2d75fa elector bugfix
-e4f8d29 beginnings of monitorstore thinger
-18268f7 merged trunk changes r1068:1083 into branches/riccardo/monitor2
-feb103f try to close bound socket to avoid TIME_WAIT after control-c
-7856be3 tweak to cache purge thing
-61a7f7b client key distro is close to done
-d1cb0f5 Passing of keys is working...but not finished
-7978d89 elector signedness cleanup
-87c47f7 only use ar -rc for darwin, ld is faster the rest of the time
-809da8b ebofs trim_from_cache(object, start, len)
-133ed04 statvfs in client, as per newer fuse api
-a73bbfa basic mds recovery now working, mostly missing graceful handling of surviving mds; synclient 'walk' tweaks
-7426f9f Waiting for ClientMonitor to respond with ACK
-e7619b6 Ticket's are updated and supposedly passable
-83e1102 client blocking to get a user ticket
-ccddcb4 First steps towards client auth
-32ade6d user auth messages
-a5dd885 fixed htons goof in SimpleMessenger; mkmonmap now works; monitor elector sorta working!
-07ac5d3 creating branch for distributed monitor
-cf298fc elector stuff for distributed monitor
-e08a9eb A bit mote on the user.h
-f113ad3 Modified the monmap to have keys
-d60308f Added the (empty) user class
-31d854b ebofs sync() tweaks (untested!); first pass at is_cached interface (with half-assed implementation)
-b100a1f More map stuff, should be ready to serialize to .ceph_monmap
-05c59eb got the seg fault fixed
-d5d4231 more buffer encode templates for list<string> and map<T,string>
-41770ec Doesn't compile at the moment but fixing that now
-89334e7 merged trunk changes r1025:1057 into branches/aleung/security1/ceph
-4bbd5ba more timer bugfixes; mds recovery disambiguates imports and exports, twiddles auth bits properly (at least with collective failure); still need to do cache rejoin, and deal with recovery of a surviving mds doing an import/export
-3a82697 probe detect empty journal
-ff1784e minor simplemessenger bugs
-0bdfef5 another minor SafeTimer issue
-e423ec5 fixed cancel_event with SafeTimer
-86be297 silently ignore messages for entities that have shut themselves down
-6840a1b more darwin tweaks
-e1a5844 updates to build on darwin.  fuse untested.  need to edit Makefile to enable darwin cflags.
-a98d4d4 more mds states; import map sharing; beginnging of cache rejoin framework; different mds log/journal cap strategy (make it empty)
-540afc0 Preparing the monitor to recieve keys from the MDS
-8314359 merged trunk changes r1038:1046 into branches/sage/cephmds2 (standalone are clustered cmon startup; mkmonmap)
-15e3db0 EExportStart/Finish partially implemented.  next up is rejoin phase, auth bit adjustment, etc..
-137c90f mkmonmap; cmon can startup standalone or in a specific monitor rank (given an existing monmap); monmap file read/write moved into MonMap class
-381429c Modified the osd boot message to pass key string
-a684066 Fixed a core dump?
-1cf877a Added some of the initial keys
-4b92f84 Keys can now turn to string and everything is a namespace
-103b128 mds startup either to standby or to starting/creating via cmds flag.  fixed mdlog inode generation.
-50f2b00 vastly improved timer conventions (new SafeTimer wrapper with a mutex ref); some messenger and Makefile cleanup
-dcce282 merged trunk changes r1032:1037 into branches/sage/cephmds2 (csyn, Makefile tweaks)
-3b8ae62 mds failure detection, shutdown, and basic takover working.
-42dc444 fixed a make bug
-11189de mds state beacon working (monitor doesn't detect failures yet)
-a36c509 standalone synthetic client (csyn)
-4d86037 Added files need to test crypto libraries. These should also be used as examples of use
-5b2ef1a merged trunk changes r1019:1031 into sage/cephmds2
-3786384 fixed fakemessenger whoops
-95ebd79 more journaling work. initial bits of MDS states and revised startup process.
-98b2658 NewerMessenger replaced with SimpleMessenger, which is much... simpler. new build targets for standalone monitor and mds: cmon and cmds. it's now possible to start up a distributed fs without mpi and newsyn. some cleanup in other messenger code. client boot process modified to contact montior explicitly for client id.
-f0e1567 added security flags to the config files
-7f00a63 Makefile now builds crytpo stuff into fakesyn (and only fakesyn)
-3f1811b added the base crypto packages...requires crypto++5.2
-1bfa322 creating a security related branch
-34a5436 added my working dir
-88a5f86 import/exports logged; mds log capped with import_map on shutdown
-b54ffb0 svn change
-1a1b3f4 new repository localtion
-2332ff1 work so far on the journaling, mds update stuff
-c80eca7 sage mds branch
-9b45315 move into trunk
-70327f3 move web into trunk
-4432e5c git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1016 29311d96-e01e-0410-9327-a35deaab8ce9
-a46e96d oops
-c047165 typos
-a2211fe my stuff
-5b94371 branches
-aec461c trunk
-55d3638 have_oc() bool
-f5178db return
-4ddca7c raw_hack_aligned only for CYGWIN.
-807f4eb reencode request after setting client inst
-30636b3 rearrange to not crap out under cygwin compile (statlite stuff)
-3c93e6e return from non-void
-6850112 fixed hack_aligned
-6baff10 asf
-c971fe6 optest
-69ce53e ongoing alloc_inc/dec (clone() allocation) mess
-531e975 nothin
-044e272 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@999 29311d96-e01e-0410-9327-a35deaab8ce9
-186368a raw not copyable
-ab452c5 shut up
-a2fdfc3 turn off clone() by default
-b9ae4f4 comment
-2e2359d quieter
-4225e52 quieter
-4f10914 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@992 29311d96-e01e-0410-9327-a35deaab8ce9
-afc2edb git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@991 29311d96-e01e-0410-9327-a35deaab8ce9
-4ec3a7d quieter
-864abe6 smallere bofs cache; ms_die_on_failure
-4d09bcd quieter
-0f4fd68 onward
-1c9cb9c exchange load (qlen) info
-b761f0b rev
-1c95b0f object revisions; acker is now second osd; primitive read balancing
-9c20f99 improved forcefeeding of crush
-0841a4b osd_balance_reads
-5c1f460 better revision picking logic
-05d1bb2 testing osd revision
-073a55f rev in ObjectExtent
-6e44869 don't test osdmap using old pg_t
-283b68e improved support for forcing the first element of a crush result
-8cf72d4 bugfix: usemaps in the extent ref count table
-d790174 more on mpi
-76dfaeb out,overload
-3845ac9 out and overload
-a447ee2 ebofs buffercache changes to fix behavior of clones. conflicting reads still need to be tested/resolved.
-d9ea844 fixed > and < on object_t
-e822b6f some preliminary object revision stuff; ebofs reference counts allocated extents
-e12a0f0 future tense
-7bfd49d bugfix
-d3567e5 cleanup
-b5aa44d pg_t stuff
-dc966b5 pg_t stuff
-2f86da0 tons of mds recovery stuffs
-a7fa25d more
-b51834b Journaler ignores fragmented entries at end of journal. does not truncate them, though!
-2462e61 desribe_layout possibility
-0b90cc5 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@960 29311d96-e01e-0410-9327-a35deaab8ce9
-11ebb28 journaler_allow_split_entries
-6ff1f7b reorder class elements
-5d6c26e ceph paper link to usenix
-dbf106f git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@956 29311d96-e01e-0410-9327-a35deaab8ce9
-1c7ff0e operator[] on buffers
-f096553 fixed port
-886e755 exceed's flaky cut and paste is the bane of my existence
-fc980ed git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@952 29311d96-e01e-0410-9327-a35deaab8ce9
-7b35df8 typos
-6527540 mknod mds event; type munging
-d5f4044 mds reorg (locker separated from mdcache); inode, dir update events use ETraced
-f48befa git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@948 29311d96-e01e-0410-9327-a35deaab8ce9
-580c28a event fun
-175ba5b updated!
-77ecf6a idallocator recovery replay working!
-d40a2c7 is_active()
-90764b3 mds restructuring; logstreamer -> journaler; basic journaler recovery working; mds and osd boot changes; buffer bugfixes
-40efd8c zero op (tho inactive)
-46b4eab logstream trimming, recovery (untested)
-e317e4f bugfix
-2529afe new buffer.h; beginning of mds cleanup work
-9cf37bb git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@938 29311d96-e01e-0410-9327-a35deaab8ce9
-564ece9 sadf
-eae81d2 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@936 29311d96-e01e-0410-9327-a35deaab8ce9
-1236933 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@935 29311d96-e01e-0410-9327-a35deaab8ce9
-62a5dd3 monitor device
-7c6f78a anchortable separated out anchorclient; logstream updated; misc mds cleanup
-c603ac2 caching fixes
-6a8d6f8 namespace
-5840c5e fixed objectcacher bug; LogStreamer, replaces mds/LogStream
-6500419 namespace
-b6dcfc0 cleanup mem leak
-b71ce36 cleanup
-8d269ef send_message fun
-0baacd7 fail on lock held
-0690b4c mds client map; send_message cleanup
-7bfdd53 monitor fun
-382a2d0 newer messenger
-53ce37a tabs
-430e47a headers
-ff7ce8c new object_t struct; monitor work
-19771b7 logo fix
-3ab9358 other binaries working.  minor mon tweaks.
-1b49b2a git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@916 29311d96-e01e-0410-9327-a35deaab8ce9
-8fcfa31 tab cleanup; monitor maps, mds maps; monitor cleanup
-2e98e54 crude arch diagram
-24f6667 tabbing
-09abb39 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@912 29311d96-e01e-0410-9327-a35deaab8ce9
-6eaa8eb Added a link to the wiki
-c7eace5 oops
-e4861f8 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@909 29311d96-e01e-0410-9327-a35deaab8ce9
-39700e7 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@908 29311d96-e01e-0410-9327-a35deaab8ce9
-48751ce git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@907 29311d96-e01e-0410-9327-a35deaab8ce9
-c533fac constifying entity_inst_t, starting to rework messenger lookup stuff...
-f55e7d6 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@905 29311d96-e01e-0410-9327-a35deaab8ce9
-c583dd5 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@904 29311d96-e01e-0410-9327-a35deaab8ce9
-fd61c5f git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@903 29311d96-e01e-0410-9327-a35deaab8ce9
-7c8b73e This commit was manufactured by cvs2svn to create tag 'merge_newrepop_add'.
-119870c This commit was manufactured by cvs2svn to create tag 'merge_HEAD_newrepop_add2'.
-68fa262 This commit was manufactured by cvs2svn to create tag 'merge_HEAD_newrepop_add'.
-599b20b This commit was manufactured by cvs2svn to create tag 'from_newrepop_add'.
-12439be This commit was manufactured by cvs2svn to create tag 'from_HEAD_newrepop_add2'.
-043a148 This commit was manufactured by cvs2svn to create tag 'from_HEAD_newrepop_add'.
-ea1aa73 This commit was manufactured by cvs2svn to create tag 'ceph_newrepop_add_root'.
-73932db This commit was manufactured by cvs2svn to create branch 'ceph_newrepop_add_branch'.
-cadaea9 *** empty log message ***
-06bc7e6 *** empty log message ***
-8543b8d *** empty log message ***
-d373cff *** empty log message ***
-2d3ffef New repository initialized by cvs2svn.
-80702c9 git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@889 29311d96-e01e-0410-9327-a35deaab8ce9
-78f9a9d release rd caps on close.
-13afdc9 cleaned up queueing in blockdevice
-85d4b4f osd handles divergent logs now.
-9931638 client oc on by default now
-39e4c2d lazy io
-1f800ab attribute dangling pointer bug
-38ad938 flusher. failure upcall.
-922c588 client readdir() realted stuff; some mds bug fixes;
-ce2bbad g_conf has pg log padding and ebofs realloc crap
-76d6c79 tare before startup
-985169b *** empty log message ***
-5dc9efc finally fixed, i think!
-93cbf03 *** empty log message ***
-a8917e8 ok, _now_ the parital thing is fixed.
-7af8512 fixed partial bug.  still ugly, and there's a lingering issue with commit notification...
-57ba78c *** empty log message ***
-e4a188b fixed stupid evil memory bug thing
-2cbbe08 *** empty log message ***
-32025fb *** empty log message ***
-a65b0bc bdev barrier
-d2236e3 fixed file caps modes
-8e07741 *** empty log message ***
-899ded6 *** empty log message ***
-12ceff8 ...
-5622eda *** empty log message ***
-e22b12a better!
-fcf95d2 simplify realloc; still testing
-80f1514 bug: mem access after delete
-b104594 no core dump; conditional toch
-ef41218 *** empty log message ***
-ee14d98 cleanup of osd failure recovery
-a9ff51d new clock stuff
-b86414e ebofs realloc thing
-aed420a post fast.
-5ff714f read threading changes.  locking fixes.
-77ea0c2 wait for sync before read.  untested.
-d0f0df2 copy buffer
-c8e6cf0 couple fixes.  prelim stuff for snapshots/cloning.
-1693db3 newrepop merge
-3ad6d13 *** empty log message ***
-726e007 *** empty log message ***
-381d4c1 *** empty log message ***
-9a85357 *** empty log message ***
-5e95b6d *** empty log message ***
-c0c0716 *** empty log message ***
-bf772ef *** empty log message ***
-1353471 fixed sync() crap
-0be4a26 fixed sync()
-c39ee94 hack around pg log ebofs thing
-fe1e4a2 fixed stpuid write blocking bug, yay!
-b0d537e *** empty log message ***
-1afc661 *** empty log message ***
-548bbbb *** empty log message ***
-fdd4aa5 *** empty log message ***
-fcec5a9 aging stuff, ebofs bughunting
-ec6347f *** empty log message ***
-8ec9171 *** empty log message ***
-60200eb freelist
-8a9f6b6 load/save freelists
-b9a9241 *** empty log message ***
-687d5ce stuff
-8482c61 recovery fixes
-24c7029 *** empty log message ***
-c5c26dc *** empty log message ***
-169e4ed trim_inodes bug
-ef2fbc2 *** empty log message ***
-2b58c4c asdf
-706886c removed some old hack_* funcs
-da55e6d *** empty log message ***
-8008182 *** empty log message ***
-8974c7d 64bit?
-207b646 *** empty log message ***
-5369c4d *** empty log message ***
-8eaf0a6 monitor switchover; makefile changes; ebofs no-write aging (untested)
-8fbf68e *** empty log message ***
-3d5233f *** empty log message ***
-1bcee06 *** empty log message ***
-fd7f577 *** empty log message ***
-23b2e76 *** empty log message ***
-3481d21 *** empty log message ***
-4635eac no message
-290a6f2 *** empty log message ***
-d2bdb7a *** empty log message ***
-bf66a61 first part of election algorithm
-4ac5acd first part of election algorithm
-eee6e4c *** empty log message ***
-ba5d452 *** empty log message ***
-250876b *** empty log message ***
-febbfa9 *** empty log message ***
-e63c872 *** empty log message ***
-6353b88 *** empty log message ***
-3949722 *** empty log message ***
-fe13503 new monitor messages
-29c1d71 *** empty log message ***
-94285f2 *** empty log message ***
-877f671 *** empty log message ***
-45e2329 client oc fixup
-7d2afd1 *** empty log message ***
-02a94f8 *** empty log message ***
-cdceb05 objectcacher trims, but doesn't flush
-2eb210f *** empty log message ***
-7fc860c stabilized new rados logging stuff
-ebeb7c7 objectcacher fixes mostly
-87e84ef objectcacher locking.  untested.
-d88ae53 tons of rados and client stuff.  untested!
-7ee52b9 some stabilizing!
-c17c16b stabilized!
-b120131 newmessenger progress!  new binaries!
-8b15934 *** empty log message ***
-3600aec *** empty log message ***
-a56a37e more rados fun. osdmonitor separation from mds.
-433d549 *** empty log message ***
-4e321de *** empty log message ***
-178a98b *** empty log message ***
-88555a7 *** empty log message ***
-5d63514 client file cache basically working
-a4c15d9 *** empty log message ***
-079b78d semi-busted client progress.
-33dc2d3 new objectstore transactions.  way slicker!
-5478ffc *** empty log message ***
-7742a1b some rearranging
-7dd1a5f *** empty log message ***
-9b60b96 *** empty log message ***
-9cbe39b more objectcacher changes some osd locking cleanup/tweaking
-e2cc2d3 Implemented putting operations to the wait queue if target objects are locked for writing, and taking them back from the queue when objects become unlocked. Actual blocing is commented out for now, becuase of problems with ggetattr().
-f3d7f30 objectcacher compiles.  some more osd changes (still not done yet)
-3f9bc5c Modified Files:  	ObjectCacher.cc ObjectCacher.h Partial checkin
-2f9a1a5 Modified Files:  	ObjectCacher.cc
-dd96cfb *** empty log message ***
-609e641 Added OSD_OP_* values for WRLOCK and WRUNLOCK, and handling of lock and unlock cases to OSD::op_nodify and op_rep_modify; moved common code from OSD::op_modify and op_rep_modify to the new function op_apply().
-4887f9a *** empty log message ***
-57be928 *** empty log message ***
-0c69135 *** empty log message ***
-33bae7f *** empty log message ***
-3593900 lotsa osd-related changes
-c8a77d9 *** empty log message ***
-0e25112 *** empty log message ***
-1d0de0d *** empty log message ***
-5e54748 *** empty log message ***
-917ba46 *** empty log message ***
-1418c0d *** empty log message ***
-1c820a0 *** empty log message ***
-b29413a *** empty log message ***
-c0ec659 *** empty log message ***
-f67ae6f *** empty log message ***
-b958b21 *** empty log message ***
-e1957b9 osd_remount_at
-3521b62 *** empty log message ***
-32ecfd2 *** empty log message ***
-af7ae6d *** empty log message ***
-55cee5d *** empty log message ***
-d1a475e *** empty log message ***
-c287607 *** empty log message ***
-f992e87 *** empty log message ***
-a27f453 *** empty log message ***
-ae3562e *** empty log message ***
-241cfed *** empty log message ***
-2e3f59c *** empty log message ***
-150dc34 *** empty log message ***
-34a2ad9 *** empty log message ***
-7158902 *** empty log message ***
-ac69fcb *** empty log message ***
-d453c97 *** empty log message ***
-0edda2e *** empty log message ***
-b2150a9 *** empty log message ***
-f090a97 *** empty log message ***
-c061869 *** empty log message ***
-15133a6 *** empty log message ***
-1032be6 *** empty log message ***
-bd6fc80 *** empty log message ***
-4a3220c *** empty log message ***
-bb0c607 *** empty log message ***
-66eab36 *** empty log message ***
-e9f9430 *** empty log message ***
-cce471c *** empty log message ***
-e754361 *** empty log message ***
-2231221 *** empty log message ***
-4aa1dfe *** empty log message ***
-b65ef7d *** empty log message ***
-fd30d9e *** empty log message ***
-4124a32 *** empty log message ***
-c6826b6 *** empty log message ***
-cd0fc7a truncate bug; stupid
-d3e50a6 release a tx node?
-24c9230 *** empty log message ***
-289c59d *** empty log message ***
-c481bcf *** empty log message ***
-c7141e1 *** empty log message ***
-c34eb86 *** empty log message ***
-343ca66 *** empty log message ***
-1e3d4b7 *** empty log message ***
-a4ea071 *** empty log message ***
-9f4163a *** empty log message ***
-4559dd5 *** empty log message ***
-c607d05 *** empty log message ***
-cd5a738 *** empty log message ***
-b09e556 *** empty log message ***
-5db9aa5 *** empty log message ***
-6e21801 *** empty log message ***
-b62bbba *** empty log message ***
-3f06651 *** empty log message ***
-784f8ec *** empty log message ***
-13945fe *** empty log message ***
-19160b6 *** empty log message ***
-908c9bc *** empty log message ***
-3ab99df *** empty log message ***
-8dd5142 *** empty log message ***
-421e540 *** empty log message ***
-962cee0 *** empty log message ***
-8801284 *** empty log message ***
-a1e4594 import/export filelock transitions
-4c01d71 *** empty log message ***
-4f59877 *** empty log message ***
-2a3d57f *** empty log message ***
-fdbcbd2 *** empty log message ***
-9dfbe32 *** empty log message ***
-6965c53 better traffic control; objectstore aging
-962394c *** empty log message ***
-46f8257 *** empty log message ***
-4c4c02b *** empty log message ***
-68690dd *** empty log message ***
-b5df4a4 *** empty log message ***
-9547857 *** empty log message ***
-3dbd237 *** empty log message ***
-b5ee88a *** empty log message ***
-49a605b save memory.. don't keep buffers after apply_write
-bd1ac7c *** empty log message ***
-5ff4f33 *** empty log message ***
-178e181 *** empty log message ***
-7800b07 *** empty log message ***
-42af1f6 *** empty log message ***
-1aaa3fc *** empty log message ***
-80ebaa3 *** empty log message ***
-345bf25 *** empty log message ***
-73aaf7e *** empty log message ***
-2e1eff3 *** empty log message ***
-6393cf6 *** empty log message ***
-91a04b0 *** empty log message ***
-4ae7ec7 *** empty log message ***
-e0cd38a *** empty log message ***
-98cd119 *** empty log message ***
-5619666 avoid stupid pg_update startup flurry
-157183d *** empty log message ***
-0cf77b5 *** empty log message ***
-6859fe8 *** empty log message ***
-9902cfd *** empty log message ***
-42cf5b4 *** empty log message ***
-4f21d5a *** empty log message ***
-72518c6 *** empty log message ***
-2de0cbb *** empty log message ***
-42cec6f *** empty log message ***
-c4bbad3 *** empty log message ***
-6f82c4d *** empty log message ***
-d3bc7d5 *** empty log message ***
-41e34e5 *** empty log message ***
-a53cbfa *** empty log message ***
-f05d4cf *** empty log message ***
-7a8e52d *** empty log message ***
-4e7d056 *** empty log message ***
-24a7b64 *** empty log message ***
-3762e3a *** empty log message ***
-903e2fb *** empty log message ***
-8b5d61c *** empty log message ***
-0d9ec21 *** empty log message ***
-7c6568a dley unmount until sync writes are flushed
-5da0be3 *** empty log message ***
-2c528ab *** empty log message ***
-a031ad6 *** empty log message ***
-442552c *** empty log message ***
-a5fef10 *** empty log message ***
-15b247f *** empty log message ***
-039b656 *** empty log message ***
-b81522b *** empty log message ***
-1657cac *** empty log message ***
-a54b797 *** empty log message ***
-b629ca6 *** empty log message ***
-5dccc7d *** empty log message ***
-b4bdd5d *** empty log message ***
-509150a *** empty log message ***
-b5ec02e truncate()
-78cef27 *** empty log message ***
-549c27f *** empty log message ***
-6e63166 *** empty log message ***
-6088a0f *** empty log message ***
-8e4ac27 *** empty log message ***
-7642998 fixed op queueing/threading stupidity
-7f141a7 *** empty log message ***
-b09d80d *** empty log message ***
-c3c350c *** empty log message ***
-0a70fed *** empty log message ***
-343565f *** empty log message ***
-f741218 C;VS: ----------------------------------------------------------------------
-42610a9 faster
-f4f37c5 *** empty log message ***
-49a15b1 *** empty log message ***
-a512b4e *** empty log message ***
-281a7d3 *** empty log message ***
-46eb777 *** empty log message ***
-edaf3cd *** empty log message ***
-5a0ae4c reintegrated obfs
-73be88e *** empty log message ***
-27111e5 *** empty log message ***
-120a70c *** empty log message ***
-a27897f *** empty log message ***
-8bf725f *** empty log message ***
-791ab53 *** empty log message ***
-1414e04 *** empty log message ***
-12133bd *** empty log message ***
-742c3bf *** empty log message ***
-cb56c17 *** empty log message ***
-a3d83ab *** empty log message ***
-1ac107a *** empty log message ***
-e0c0c47 *** empty log message ***
-ea43d66 *** empty log message ***
-dad2ebe *** empty log message ***
-5071a28 *** empty log message ***
-1119d46 *** empty log message ***
-e776ee5 *** empty log message ***
-59f20a1 *** empty log message ***
-7fd0b1b *** empty log message ***
-2d911a3 *** empty log message ***
-d651e58 *** empty log message ***
-49291e9 *** empty log message ***
-eba9b2d *** empty log message ***
-79e21a2 *** empty log message ***
-9b3bf5c *** empty log message ***
-c630275 *** empty log message ***
-ce8851f *** empty log message ***
-e5f073c *** empty log message ***
-12154ca *** empty log message ***
-dd736df *** empty log message ***
-5a7abb0 *** empty log message ***
-2d84700 *** empty log message ***
-3fc6cb3 *** empty log message ***
-9a654dd *** empty log message ***
-b29aa20 *** empty log message ***
-947695f *** empty log message ***
-f668209 *** empty log message ***
-1a15a59 *** empty log message ***
-110a6f0 *** empty log message ***
-82350af *** empty log message ***
-b4ccfba *** empty log message ***
-7deb057 *** empty log message ***
-53866b4 *** empty log message ***
-fcbd7fc *** empty log message ***
-1334786 *** empty log message ***
-cf95d4f *** empty log message ***
-afd5530 *** empty log message ***
-3ab97af *** empty log message ***
-27cef48 *** empty log message ***
-aaf0ef0 *** empty log message ***
-d5cd874 *** empty log message ***
-a4e15d0 *** empty log message ***
-fd5db76 *** empty log message ***
-d44b0f3 *** empty log message ***
-ba788e7 *** empty log message ***
-c43e3a4 *** empty log message ***
-fdfae34 *** empty log message ***
-0b0f23c *** empty log message ***
-02baeeb *** empty log message ***
-e72f3ce *** empty log message ***
-1f4a180 *** empty log message ***
-c8b4f75 *** empty log message ***
-242449a working pretty well!
-20946a3 *** empty log message ***
-0374319 *** empty log message ***
-3e3e205 *** empty log message ***
-2bbb810 *** empty log message ***
-969fe2e *** empty log message ***
-4be66ae *** empty log message ***
-0b76b3d *** empty log message ***
-0282b89 *** empty log message ***
-0761216 *** empty log message ***
-72bf7e7 *** empty log message ***
-28efa36 *** empty log message ***
-c50a325 *** empty log message ***
-18d9132 *** empty log message ***
-1bfdebf custom free func
-5cd42f4 hmm
-7de72cc *** empty log message ***
-58227ec *** empty log message ***
-2484df3 caps fun, but centralized writers ultimatley busted!
-50f373c *** empty log message ***
-ccd7490 *** empty log message ***
-6071834 *** empty log message ***
-fa1664b osd stuff working pretty well
-ad779ae *** empty log message ***
-6aafbae *** empty log message ***
-c982780 *** empty log message ***
-af48e22 *** empty log message ***
-7f35d12 *** empty log message ***
-8f6ce52 *** empty log message ***
-4efd65d *** empty log message ***
-69c3761 *** empty log message ***
-7695df9 *** empty log message ***
-e339fe0 *** empty log message ***
-28670bb better
-e260660 replication mostly working
-98d20ec  Modified Files:  	config.cc config.h fakesyn.cc client/Buffercache.cc  	client/Buffercache.h client/Client.cc client/Client.h
-fa5b470 *** empty log message ***
-2b40417 *** empty log message ***
-185b440 Modified Files:  	TODO config.cc config.h client/Buffercache.cc  	client/Buffercache.h client/Client.cc client/Client.h
-44ba53c *** empty log message ***
-88086b8 lots of OSD peering stuff (still not complete) TCPMessenger rewrite!!!
-1915b86 layout is in inode
-258300d  Modified Files:  	Cond.h Mutex.h
-c64cf75 Modified Files: 	Buffercache.cc Buffercache.h Client.cc Client.h
-f63690d disabled release locking stuff until this implemented correctly
-8dabf4f *** empty log message ***
-91ba93c *** empty log message ***
-7ef2f6b lots of osd replication/recovery bits
-1b6f270 OSDCluster -> OSDMap
-b557dfc *** empty log message ***
-1329a8f *** empty log message ***
-8af8b8d *** empty log message ***
-8e3cf0e hashed dirs on MDS! lots of cleanup too.
-adfd89c *** empty log message ***
-4449be3  Modified Files:  	Buffercache.cc Buffercache.h Client.cc Client.h
-cd99de4  Modified Files:  	Buffercache.cc Buffercache.h Client.cc Client.h
-42e438f  Modified Files:  	Buffercache.cc Client.cc
-bdf5994  Modified Files:  	Buffercache.cc Buffercache.h Client.cc Client.h
-a21f6ec Modified Files:  	client/Buffercache.cc client/Client.cc
-4d4cbd4 Modified Files: 	include/buffer.h include/bufferlist.h
-4fcc8f4 Modified Files:  	client/Client.cc client/Client.h client/Buffercache.cc  	client/Buffercache.h
-35210312 *** empty log message ***
-8c7283a lots of cleanup clock stuff bug fixes client capabilities! object store attributes, collections (untested in FakeStore)
-176a49c *** empty log message ***
-5711b3a *** empty log message ***
-560eaf9 *** empty log message ***
-5aaaccc *** empty log message ***
-209a90e *** empty log message ***
-2ad3066 *** empty log message ***
-33475a3 Modified Files:  	client/Buffercache.cc
-c25cb29 Modified Files:  	client/Buffercache.cc client/Client.cc
-f21af4e  Modified Files:  	client/Client.cc
-16cd59a Modified Files:  	client/Buffercache.cc client/Client.cc
-939c859 *** empty log message ***
-1c6ac1a *** empty log message ***
-c26b4e5 full traces (w/ read and write)
-eea765a *** empty log message ***
-3fe218a client logs
-a7f3331 *** empty log message ***
-4eb8ae9 *** empty log message ***
-1d7aa8f *** empty log message ***
-a9efb21 *** empty log message ***
-3169807 *** empty log message ***
-4b9ac4b *** empty log message ***
-15b67ed *** empty log message ***
-92f0573 Modified Files:  	config.cc client/Buffercache.cc client/Buffercache.h  	client/Client.cc include/config.h
-54b7bc4 *** empty log message ***
-cf1c142 *** empty log message ***
-5759e59 Modified Files:  	Makefile config.cc client/Buffercache.cc client/Buffercache.h  	client/Client.cc client/Client.h include/config.h
-6ee92e2 osd replication
-f652659 *** empty log message ***
-5be02b6 *** empty log message ***
-1cd6799 *** empty log message ***
-e3b966e *** empty log message ***
-482ad5d *** empty log message ***
-57f7562 *** empty log message ***
-3254534 *** empty log message ***
-a564c96 *** empty log message ***
-e03fd6f *** empty log message ***
-315aeb4 *** empty log message ***
-b8a98e6 *** empty log message ***
-8dd2f47 *** empty log message ***
-3c5a7f1 *** empty log message ***
-b614753 *** empty log message ***
-219b77f *** empty log message ***
-c4872c0 *** empty log message ***
-7881082 *** empty log message ***
-56bd28a *** empty log message ***
-db73dc4 *** empty log message ***
-81e01f7 *** empty log message ***
-9f550ae *** empty log message ***
-508e02a *** empty log message ***
-ff265b9 traces!
-82e27fc Modified Files:  	client/Client.cc client/Client.h client/Buffercache.cc  	client/Buffercache.h
-4f04a64 *** empty log message ***
-91ec757 *** empty log message ***
-73c3fa4 *** empty log message ***
-a34312c synchronous writes unless buffer cache is enabled
-d5e6f23 *** empty log message ***
-b219045 *** empty log message ***
-1e5e0fd don't reclaim fh's... hack until later!
-30c474a *** empty log message ***
-8503b6b *** empty log message ***
-a01c764 *** empty log message ***
-6493661 Modified Files:  	client/Buffercache.h client/Buffercache.cc include/config.h  	config.cc
-4c9ee7c *** empty log message ***
-fff3924 Modified Files: 	Makefile client/Client.cc client/Client.h include/buffer.h 	include/bufferlist.h
-54491e3 *** empty log message ***
-1ea60c9 *** empty log message ***
-919f5ec *** empty log message ***
-e7648fd *** empty log message ***
-d73f46a *** empty log message ***
-feb4730 Modified Files: Buffercache.cc Buffercache.h
-c48638b mdstore readdir bugfix
-b0e8d66 Modified Files: 	Buffercache.cc Buffercache.h Write path tested.
-5a6260c *** empty log message ***
-524e3a4 *** empty log message ***
-4e4ab63 bufferized exports; mds shutdown bug
-6e48217 *** empty log message ***
-fbd43ea Filer fixes
-59d6cd9 filer fixes?
-923a115 *** empty log message ***
-d3a243f *** empty log message ***
-cb8e50d weird
-262717a misc; buffer() _len init change (matches _alloc_len)
-875fb43 *** empty log message ***
-fe202dc *** empty log message ***
-a9d737f bugfix w/ striping crap
-2083fa4 *** empty log message ***
-f09ca0d *** empty log message ***
-e54aee1 more efficient reads for striping
-a77e833 *** empty log message ***
-2768cb9 *** empty log message ***
-0fdf74c *** empty log message ***
-71d798b *** empty log message ***
-0870ab1 mdstore uses bufferlists, no more ropes
-4434adf *** empty log message ***
-acb5ca6 *** empty log message ***
-ca4e99b *** empty log message ***
-e4d37b0 hex filenames!
-8ecd056 *** empty log message ***
-da2923b *** empty log message ***
-157bf90 *** empty log message ***
-07fc14b *** empty log message ***
-0f80865 *** empty log message ***
-cce3a8f Modified Files:  	client/Buffercache.cc client/Buffercache.h
-f199774 *** empty log message ***
-dbf12de *** empty log message ***
-3d7b6b3 client request/reply encoded into buffers, not ropes
-ac9d0d4 *** empty log message ***
-0e65074 *** empty log message ***
-e794904 Added Files: 	Buffercache.cc Buffercache.h
-c7fca00 *** empty log message ***
-cc0c6cb *** empty log message ***
-1084b9d file layout policies
-89e4c24 *** empty log message ***
-45d4bed *** empty log message ***
-d73cef0 Feng adds the OBFS stuff into the pmds.
-da16b96 *** empty log message ***
-7804916 *** empty log message ***
-d3ef7c4 fixed Context destructor snafu; Messenger serializes itself (no more CheesySerialize)
-bb0b4db *** empty log message ***
-c0fc56a *** empty log message ***
-25468b3 buffer debug
-389fe77 logger locks
-aa516bc *** empty log message ***
-ca06566 *** empty log message ***
-2176392 *** empty log message ***
-755f780 shut up
-c4b08bc memory leaks, threadpool tweaks
-f5ae814 *** empty log message ***
-b266409 *** empty log message ***
-9273135 *** empty log message ***
-057aaef *** empty log message ***
-94ade9d *** empty log message ***
-4ef1430 Added tp to test ThreadPool.h
-e880236 *** empty log message ***
-4434bca First version.  Untested.
-a7fdc27 *** empty log message ***
-478b50d *** empty log message ***
-0df31ac tcp messenger!
-1fd67ea *** empty log message ***
-e5b46b7 *** empty log message ***
-f4678c3 *** empty log message ***
-1ea8cae *** empty log message ***
-f64729e *** empty log message ***
-dbab170 *** empty log message ***
-43f0911 *** empty log message ***
-7416379 *** empty log message ***
-0e89fe0 *** empty log message ***
-a4bd398 *** empty log message ***
-f69665c md cache bugs
-84deee7 *** empty log message ***
-daac6b0 memory leaks
-85e25b9 *** empty log message ***
-2a2331e *** empty log message ***
-7e1717c memory leaks, etc.
-cd9c673 rewrote mds log
-5053f46 *** empty log message ***
-399e845 *** empty log message ***
-a1ba05c *** empty log message ***
-d2197ce *** empty log message ***
-fba2d5d *** empty log message ***
-10e38fa *** empty log message ***
-0e93a8a *** empty log message ***
-eb7bfec *** empty log message ***
-324f1e9 *** empty log message ***
-252d5ec *** empty log message ***
-31551a5 quick tweaks
-4355545 buffer tweaks; logger tweaks; osd read/writes now go through MOSDOp(Reply), OSD checks cluster version, other replication groundwork
-4fd53be *** empty log message ***
-f5c405b *** empty log message ***
-13c6eb0 *** empty log message ***
-986830a *** empty log message ***
-71dd008 *** empty log message ***
-a5642a9 *** empty log message ***
-6084ae4 *** empty log message ***
-5a08031 *** empty log message ***
-afd55dc *** empty log message ***
-b3ce21e *** empty log message ***
-896b9b3 *** empty log message ***
-0f6e052 rush!
-e8d2574 *** empty log message ***
-e74adca Added Files:  	buffercache.h
-ef8d098 random stuff, mostly time related
-a45dc6f balancer stuff (popularity)
-430a5a1 *** empty log message ***
-8158f9e *** empty log message ***
-ef0ba71 *** empty log message ***
-0b754d3 *** empty log message ***
-2b257d3 *** empty log message ***
-45ba0d1 cleanup
-d38f894 dumb bug in .copy
-c158d0f async writes (in a lame way)
-4a3f56d *** empty log message ***
-937f8f1 *** empty log message ***
-b09fc47 *** empty log message ***
-d16a990 *** empty log message ***
-66563e3 mpi messenger seems to be working!
-4d0f46a *** empty log message ***
-f699624 *** empty log message ***
-8b5e39e *** empty log message ***
-9045ec6 *** empty log message ***
-1fb2642 *** empty log message ***
-88f03b8 *** empty log message ***
-e6f2f55 *** empty log message ***
-e05e000 *** empty log message ***
-222267e tons of buffer, mpi crap.. mpi not working yet
-5f936ca *** empty log message ***
-eb2674f use Filer for reads/writes
-4275d65 *** empty log message ***
-3a693b7 mkfs hook
-4bd53d6 *** empty log message ***
-edd7ef4 hard links sort of work (they're fragile)
-c3d7d81 *** empty log message ***
-c1f8e2c *** empty log message ***
-c9a7641 *** empty log message ***
-caf8d22 *** empty log message ***
-81007b8 *** empty log message ***
-b71a62a *** empty log message ***
-960c19b *** empty log message ***
-6cdfb3a *** empty log message ***
-0beaa03 *** empty log message ***
-8f3d130 *** empty log message ***
-7dc2228 *** empty log message ***
-cb39284 *** empty log message ***
-74c5f2f *** empty log message ***
-8d37272 *** empty log message ***
-5f8c717 *** empty log message ***
-a7fb4bc *** empty log message ***
-00fadaa *** empty log message ***
-0c8ddd7 *** empty log message ***
-b17b6db *** empty log message ***
-9cd4673 starting on hard links
-df50017 mount/unmount, fixed symlink store/fetch bug
-06fa3a8 more hard link groundwork
-96c1bf9 *** empty log message ***
-db07905 *** empty log message ***
-4aed963 *** empty log message ***
-cb323e6 *** empty log message ***
-a6e5fa5 *** empty log message ***
-42faba4 *** empty log message ***
-3b3cb7e *** empty log message ***
-6e29f88 *** empty log message ***
-791ae61 changes per ethan's suggestions!
-19b194b timers work
-ba1cfdb *** empty log message ***
-ae9e377 *** empty log message ***
-cfeca6a foreign rename works, in small tests at least!
-9cff0e9 foreign renames getting closer...
-ef4b7eb *** empty log message ***
-019a81b *** empty log message ***
-1d291c1 *** empty log message ***
-f6987a1 *** empty log message ***
-6ddac1f *** empty log message ***
-360683e Modified Files:  	client/Client.h
-bdfe5e0 Modified Files:  	config.cc client/Client.cc client/Client.h include/config.h
-c7f8a5f *** empty log message ***
-1f7433a crap
-ac542f7 *** empty log message ***
-65daff4 *** empty log message ***
-9e831d7 Modified Files:  	client/Client.cc client/Client.h
-0d362c6 remote rename works! buggy tho.
-695e81a rush disk groups
-fb43a54 *** empty log message ***
-ae62cbb *** empty log message ***
-41c66a2 *** empty log message ***
-9bda084 *** empty log message ***
-3a8a2f2 *** empty log message ***
-ff281d3 *** empty log message ***
-5176d3e *** empty log message ***
-4f705c3 *** empty log message ***
-60488cc *** empty log message ***
-ebedbaf *** empty log message ***
-64ac277 new mpi builds.  untested.
-7f9e267 For those that haven't already included <vector>.
-6e84a8e Error reporting.
-738440a Multithreaded version of MPI Messenger and associated tests.
-9de7b80 Changes for multithreading.
-c892f08 Second try: Update for MPICH2; use $@ & $^ to eliminate redundancy.
-4aceb77 Modified for MPICH2.  Used $@ and $^ to eliminate some redundancy.
-c6b7889 *** empty log message ***
-ab4d992 *** empty log message ***
-e24938b *** empty log message ***
-2c0a604 Fix MPI paths for Szilard.
-a786d5c fuse bits compile!
-3ec0e28 *** empty log message ***
-de8f631 *** empty log message ***
-cde8de2 Modified Files:         fakesingleclient.cc client/Client.cc messages/MClientRequest.h
-405f8a7 CVS----------------------------------------------------------------------
-7c8f077 *** empty log message ***
-c860097 Modified Files:  	fakesingleclient.cc client/Client.cc
-8d578ad Modified Files:  	fakesingleclient.cc client/Client.cc
-003d5a8 *** empty log message ***
-8f64eab *** empty log message ***
-08b2cd0 *** empty log message ***
-26023cd Modified Files:  	client/Client.cc client/Client.h client/fuse.cc
-e985056 *** empty log message ***
-2730ffc more rename fixes
-836ffe9 *** empty log message ***
-dcfc7a5 *** empty log message ***
-421affd er, works now i think!  more testing to come
-96694a6 *** empty log message ***
-71d15dc omg renames actually work (when on teh same mds at least). getting closer!
-160f8da *** empty log message ***
-8907f1e *** empty log message ***
-8157459 *** empty log message ***
-bdab1ad *** empty log message ***
-a604867 *** empty log message ***
-8d89d38 *** empty log message ***
-e767d4a *** empty log message ***
-9f2e908 *** empty log message ***
-880a419 *** empty log message ***
-870748b *** empty log message ***
-149e119 *** empty log message ***
-2ffb379 need to figure out MDS path locking, requset handling framework. fine w/ no rename, otherwise everythign falls apart...
-d1d75ef *** empty log message ***
-79cb138 *** empty log message ***
-e65f511 *** empty log message ***
-2b05eb1 yowsers
-13400b7 *** empty log message ***
-435bccf *** empty log message ***
-ed71ba6 *** empty log message ***
-ff58476 *** empty log message ***
-78784e5 *** empty log message ***
-ca0df73 rewrote most of hte locking code.  lot sof stuff ripped out for hte time being..
-96b2c2f *** empty log message ***
-69277a7 *** empty log message ***
-b1ac4d8 *** empty log message ***
-d82e54e some reorganization
-9a9086d *** empty log message ***
-4bbd5e4 *** empty log message ***
-02a0eb2 *** empty log message ***
-5698411 inos and fh's
-772eec1 cleanup
-7498ac9 *** empty log message ***
-edbb52f *** empty log message ***
-9dfe61b *** empty log message ***
-50103fa *** empty log message ***
-2e46092 *** empty log message ***
-908bb37 *** empty log message ***
-81beb94 *** empty log message ***
-0b66d65 some bugfixes
-4d9e615 *** empty log message ***
-e4cd6c2 *** empty log message ***
-797ef19 ll
-d280e38 *** empty log message ***
-e0290a0 *** empty log message ***
-a4e87ce *** empty log message ***
-d9dc4bb *** empty log message ***
-15ba795 *** empty log message ***
-1cf68bc *** empty log message ***
-2634520 *** empty log message ***
-f31e0ba *** empty log message ***
-991d50d *** empty log message ***
-cd0d8ec "progress"
-4bb3422 *** empty log message ***
-8781ab4 *** empty log message ***
-a490fe6 ...
-81c0fad good lord, here we go again
-6b409c6 new auth model
-c99a476 *** empty log message ***
-a919aa5 *** empty log message ***
-a391aba *** empty log message ***
-2387851 *** empty log message ***
-20125b9 *** empty log message ***
-76eddbf *** empty log message ***
-897885f *** empty log message ***
-b1e2a98 *** empty log message ***
-b2fbbfd *** empty log message ***
-971e062 unlink sems to work, but the client is retarded
-9d33c30 openwrc works.  starting on unlink
-f18dded hashing compiles.. untested!
-e7d2a8f hashed directory madness
-565f7f9 *** empty log message ***
-bbe3cd3 *** empty log message ***
-9b7941a *** empty log message ***
-cb4611c *** empty log message ***
-22872c5 *** empty log message ***
-ad6228a *** empty log message ***
-80dfe99 *** empty log message ***
-ab7cc84 *** empty log message ***
-ce2378a *** empty log message ***
-6c6c486 *** empty log message ***
-318862a *** empty log message ***
-b85cdf4 *** empty log message ***
-27cf8d8 locks (untested)
-76c7233 *** empty log message ***
-f6d9a0a *** empty log message ***
-2723afc *** empty log message ***
-3e74ac1 *** empty log message ***
-f578a27 *** empty log message ***
-3383213 *** empty log message ***
-c86fd98 *** empty log message ***
-5a61afd *** empty log message ***
-225f5e4 *** empty log message ***
-689df81 cleaned up config crap
-2ce81ec *** empty log message ***
-eba9e7e *** empty log message ***
-3bd996a *** empty log message ***
-1d86b67 *** empty log message ***
-ee63c70 *** empty log message ***
-90a1c02 *** empty log message ***
-bac0031 *** empty log message ***
-2576492 import is currently broken
-b247412 *** empty log message ***
-61a5130 *** empty log message ***
-9475610 *** empty log message ***
-11e5ee0 *** empty log message ***
-c57d70f *** empty log message ***
-c27f51d *** empty log message ***
-0077a02 *** empty log message ***
-94ba59e *** empty log message ***
-cdb0476 *** empty log message ***
-a539bcf *** empty log message ***
-8a53315 *** empty log message ***
-e9ed589 *** empty log message ***
-a2cfa89 *** empty log message ***
-669d2a5 *** empty log message ***
-b5e6cc8 *** empty log message ***
-58f8a29 yay better
-6fe1beb *** empty log message ***
-65cb06b ughm
-b891cc1 *** empty log message ***
-45eab89 *** empty log message ***
-20d7ed2 *** empty log message ***
-0d1d57e YES
-f73f344 closer
-911aaac *** empty log message ***
-fe6b5e4 so close
-a8ab173 progress
-4405bf6 *** empty log message ***
-cb63be1 *** empty log message ***
-db2cf1d *** empty log message ***
-51c7a5c *** empty log message ***
-cb8e932 logging working now
-fa868d6 *** empty log message ***
-af88317 *** empty log message ***
-577aadc *** empty log message ***
-5f147d3 *** empty log message ***
-4a914f1 *** empty log message ***
-03aa87e *** empty log message ***
-5ede249 *** empty log message ***
-5345042 *** empty log message ***
-fc7e45c *** empty log message ***
-12fe2f6 *** empty log message ***
-84f5ba5 *** empty log message ***
-91988b8 *** empty log message ***
-cd4cfcc *** empty log message ***
-dc19bf1 *** empty log message ***
-849f41c *** empty log message ***
-0ca67f3 *** empty log message ***
-b5c7ba8 *** empty log message ***
-e4c47e7 *** empty log message ***
-ab4d115 *** empty log message ***
-7536155 yay a real makefile
-0926ac5 *** empty log message ***
-b812bce *** empty log message ***
-d5b362b last week
-9afeaa0 *** empty log message ***
-0daa6ab *** empty log message ***
-fa8f4df *** empty log message ***
-0ac5aed *** empty log message ***
-1893aa1 *** empty log message ***
-48cdbbf New repository initialized by cvs2svn.
diff --git a/INSTALL b/INSTALL
index 089ef83..0dc8965 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,21 +1,17 @@
 Installation Instructions
 *************************
 
-When pulling from git, use the --recursive option to include sub-modules:
-
-$ git clone --recursive https://github.com/ceph/ceph.git
-
-And then build the configure script with:
+If pulling from git, you first need to build the configure script with
 
 $ ./autogen.sh
 
-Then the usual:
+Then,
 
 $ ./configure
 $ make
 
 Note that if the FUSE library is not found, the user-space fuse client
-will not be built.
+will not be built.  
 
 If you are doing development, you may want to do
 
diff --git a/Makefile.am b/Makefile.am
index 0a07d05..cba3af2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,26 +48,3 @@ clean-local:
 	fi
 
 	@rm -rf src/test/virtualenv
-
-
-# NOTE: This only works when enough dependencies are installed for
-# autoconf to be happy.  These commands should be run manually to
-# bootstrap.
-install-deps:
-	if test -x /usr/bin/apt-get; then \
-	  sudo apt-get -y --no-install-recommends install `cat deps.deb.txt`; \
-	else \
-	  sudo yum -y install `cat deps.rpm.txt`; \
-	fi
-
-dist-hook:
-#	Generates the full list of contributors
-	if test -d $(srcdir)/.git; then \
-	  cd $(srcdir); \
-	  git log --format='%aN <%aE>' | sort -u >$(distdir)/AUTHORS; \
-	fi
-#	Generates ChangeLog from git
-	if test -d $(srcdir)/.git; then \
-	  cd $(srcdir); \
-	  git log --oneline --decorate --no-merges > $(distdir)/ChangeLog; \
-	fi
diff --git a/Makefile.in b/Makefile.in
index 59c1960..eb16431 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,7 +50,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
 	$(top_srcdir)/m4/ax_c_pretty_func.m4 \
 	$(top_srcdir)/m4/ax_c_var_func.m4 \
 	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
-	$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
 	$(top_srcdir)/m4/ax_cxx_static_cast.m4 \
 	$(top_srcdir)/m4/ax_intel.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -137,7 +136,6 @@ AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@
 CC = @CC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
@@ -170,7 +168,6 @@ FGREP = @FGREP@
 GCOV_PREFIX_STRIP = @GCOV_PREFIX_STRIP@
 GIT_CHECK = @GIT_CHECK@
 GREP = @GREP@
-HAVE_CXX11 = @HAVE_CXX11@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -195,8 +192,6 @@ LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
 LIBEDIT_LIBS = @LIBEDIT_LIBS@
 LIBFUSE = @LIBFUSE@
 LIBOBJS = @LIBOBJS@
-LIBROCKSDB_CFLAGS = @LIBROCKSDB_CFLAGS@
-LIBROCKSDB_LIBS = @LIBROCKSDB_LIBS@
 LIBS = @LIBS@
 LIBTCMALLOC = @LIBTCMALLOC@
 LIBTOOL = @LIBTOOL@
@@ -205,8 +200,6 @@ LIBZFS_LIBS = @LIBZFS_LIBS@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LTTNG_GEN_TP_CHECK = @LTTNG_GEN_TP_CHECK@
-LTTNG_GEN_TP_PROG = @LTTNG_GEN_TP_PROG@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -564,9 +557,6 @@ distdir: $(DISTFILES)
 	      || exit 1; \
 	  fi; \
 	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
 	-test -n "$(am__skip_mode_fix)" \
 	|| find "$(distdir)" -type d ! -perm -755 \
 		-exec chmod u+rwx,go+rx {} \; -o \
@@ -809,19 +799,19 @@ uninstall-am:
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am all-local am--refresh check check-am check-local \
 	clean clean-generic clean-libtool clean-local ctags \
-	ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
-	dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-	distcheck distclean distclean-generic distclean-libtool \
-	distclean-tags distcleancheck distdir distuninstallcheck dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-data-local install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am tags tags-recursive uninstall uninstall-am
+	ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzip \
+	dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
+	distclean distclean-generic distclean-libtool distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-data-local install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am
 
 
 # why is it so hard to make autotools to this?
@@ -854,28 +844,6 @@ clean-local:
 
 	@rm -rf src/test/virtualenv
 
-# NOTE: This only works when enough dependencies are installed for
-# autoconf to be happy.  These commands should be run manually to
-# bootstrap.
-install-deps:
-	if test -x /usr/bin/apt-get; then \
-	  sudo apt-get -y --no-install-recommends install `cat deps.deb.txt`; \
-	else \
-	  sudo yum -y install `cat deps.rpm.txt`; \
-	fi
-
-dist-hook:
-#	Generates the full list of contributors
-	if test -d $(srcdir)/.git; then \
-	  cd $(srcdir); \
-	  git log --format='%aN <%aE>' | sort -u >$(distdir)/AUTHORS; \
-	fi
-#	Generates ChangeLog from git
-	if test -d $(srcdir)/.git; then \
-	  cd $(srcdir); \
-	  git log --oneline --decorate --no-merges > $(distdir)/ChangeLog; \
-	fi
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/README b/README
index 76a190c..0eb3ac7 100644
--- a/README
+++ b/README
@@ -23,38 +23,18 @@ We do not require assignment of copyright to contribute code; code is
 contributed under the terms of the applicable license.
 
 
-Build Prerequisites
-===================
-
-debian-based
-------------
-
-The list of debian package dependencies can be found in deps.deb.txt:
-
-	sudo apt-get install `cat deps.deb.txt`
-
-Note: libsnappy-dev and libleveldb-dev are not available upstream for
-natty, oneiric, and squeeze.  Backports for Ceph can be found at
-ceph.com/debian-leveldb.
-
-rpm-based
----------
-
-The list of RPM package dependencies can be found in deps.rpm.txt:
-
-	sudo yum install `cat deps.rpm.txt`
-
 Building Ceph
 =============
 
-Developers, please refer to the [Developer
-Guide](doc/dev/quick_guide.rst) for more information, otherwise, you
-can build the server daemons, and FUSE client, by executing the
-following:
+To prepare the source tree after it has been git cloned,
 
-	./autogen.sh
-	./configure
-	make
+	$ git submodule update --init
+
+To build the server daemons, and FUSE client, execute the following:
+
+	$ ./autogen.sh
+	$ ./configure
+	$ make
 
 (Note that the FUSE client will only be built if libfuse is present.)
 
@@ -67,9 +47,9 @@ package build dependencies on those platforms.  In many cases,
 dependencies can be avoided with --with-foo or --without-bar switches.
 For example,
 
-	./configure --with-nss         # use libnss instead of libcrypto++
-	./configure --without-radosgw  # do not build radosgw
-	./configure --without-tcmalloc # avoid google-perftools dependency
+$ ./configure --with-nss         # use libnss instead of libcrypto++
+$ ./configure --without-radosgw  # do not build radosgw and avoid libfcgi-dev
+$ ./configure --without-tcmalloc # avoid google-perftools dependency
 
 
 Building packages
@@ -78,30 +58,120 @@ Building packages
 You can build packages for Debian or Debian-derived (e.g., Ubuntu)
 systems with
 
-	sudo apt-get install dpkg-dev
-	dpkg-checkbuilddeps        # make sure we have all dependencies
-	dpkg-buildpackage
+$ sudo apt-get install dpkg-dev
+$ dpkg-checkbuilddeps        # make sure we have all dependencies
+$ dpkg-buildpackage
 
-For RPM-based systems (Red Hat, SUSE, etc.),
+For RPM-based systems (Redhat, Suse, etc.),
+
+$ rpmbuild
 
-	rpmbuild
 
 Building the Documentation
 ==========================
 
 Prerequisites
 -------------
+To build the documentation, you must install the following:
+
+- python-dev
+- python-pip
+- python-virtualenv
+- doxygen
+- ditaa
+- libxml2-dev
+- libxslt-dev
+- dot
+- graphviz
 
-The list of package dependencies for building the documentation can be
-found in doc_deps.deb.txt:
+For example:
 
-	sudo apt-get install `cat doc_deps.deb.txt`
+	sudo apt-get install python-dev python-pip python-virtualenv doxygen ditaa libxml2-dev libxslt-dev dot graphviz
 
 Building the Documentation
 --------------------------
 
-To build the documentation, ensure that you are in the top-level
-`/ceph directory, and execute the build script. For example:
+To build the documentation, ensure that you are in the top-level `/ceph directory, and execute the build script. For example:
+
+	$ admin/build-doc
+
+
+Build Prerequisites
+===================
 
-	admin/build-doc
+debian-based
+------------
+To build the source code, you must install the following:
+
+- automake
+- autoconf
+- pkg-config
+- gcc
+- g++
+- make
+- libboost-dev
+- libedit-dev
+- libssl-dev
+- libtool
+- libfcgi
+- libfcgi-dev
+- xfslibs-dev
+- libfuse-dev
+- linux-kernel-headers
+- libcrypto++-dev
+- libaio-dev
+- libgoogle-perftools-dev
+- libkeyutils-dev
+- uuid-dev
+- libblkid-dev
+- libatomic-ops-dev
+- libboost-program-options-dev
+- libboost-system-dev
+- libboost-thread-dev
+- libexpat1-dev
+- libleveldb-dev
+- libsnappy-dev
+- libcurl4-gnutls-dev
+- python-argparse
+- python-flask
+
+For example:
+
+	$ apt-get install automake autoconf pkg-config gcc g++ make libboost-dev libedit-dev libssl-dev libtool libfcgi libfcgi-dev xfslibs-dev libfuse-dev linux-kernel-headers libcrypto++-dev libaio-dev libgoogle-perftools-dev libkeyutils-dev uuid-dev libblkid-dev libatomic-ops-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libexpat1-dev libleveldb-dev libsnappy-dev libcurl4-gnutls-dev python-argparse python-flask python-nose
+
+Note: libsnappy-dev and libleveldb-dev are not available upstream for natty, oneiric, and squeeze.  Backports for Ceph can be found at ceph.com/debian-leveldb.
+
+rpm-based
+---------
+These are the rpm packages needed to install in an rpm-based OS:
+
+    autoconf
+    automake
+    gcc
+    gcc-c++
+    make
+    libtool
+    python-argparse
+    python-flask
+    libuuid-devel
+    libblkid-devel
+    keyutils-libs-devel
+    cryptopp-devel
+    nss-devel
+    fcgi-devel
+    expat-devel
+    libcurl-devel
+    xfsprogs-devel
+    fuse-devel
+    gperftools-devel
+    libedit-devel
+    libatomic_ops-devel
+    snappy-devel
+    leveldb-devel
+    libaio-devel
+    boost-devel
+
+For example:
+
+	$ yum install autoconf automake gcc gcc-c++ make libtool python-argparse python-flask libuuid-devel libblkid-devel keyutils-libs-devel cryptopp-devel nss-devel fcgi-devel expat-devel libcurl-devel xfsprogs-devel fuse-devel gperftools-devel libedit-devel libatomic_ops-devel snappy-devel leveldb-devel libaio-devel boost-devel python-nose
 
diff --git a/aclocal.m4 b/aclocal.m4
index 7793cc5..fa0745a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -197,46 +197,6 @@ AC_PREREQ([2.50])dnl
 am_aux_dir=`cd $ac_aux_dir && pwd`
 ])
 
-# AM_COND_IF                                            -*- Autoconf -*-
-
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_COND_IF
-# _AM_COND_ELSE
-# _AM_COND_ENDIF
-# --------------
-# These macros are only used for tracing.
-m4_define([_AM_COND_IF])
-m4_define([_AM_COND_ELSE])
-m4_define([_AM_COND_ENDIF])
-
-
-# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
-# ---------------------------------------
-# If the shell condition COND is true, execute IF-TRUE, otherwise execute
-# IF-FALSE.  Allow automake to learn about conditional instantiating macros
-# (the AC_CONFIG_FOOS).
-AC_DEFUN([AM_COND_IF],
-[m4_ifndef([_AM_COND_VALUE_$1],
-	   [m4_fatal([$0: no such condition "$1"])])dnl
-_AM_COND_IF([$1])dnl
-if test -z "$$1_TRUE"; then :
-  m4_n([$2])[]dnl
-m4_ifval([$3],
-[_AM_COND_ELSE([$1])dnl
-else
-  $3
-])dnl
-_AM_COND_ENDIF([$1])dnl
-fi[]dnl
-])
-
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
@@ -1415,7 +1375,6 @@ m4_include([m4/acx_pthread.m4])
 m4_include([m4/ax_c_pretty_func.m4])
 m4_include([m4/ax_c_var_func.m4])
 m4_include([m4/ax_check_compile_flag.m4])
-m4_include([m4/ax_cxx_compile_stdcxx_11.m4])
 m4_include([m4/ax_cxx_static_cast.m4])
 m4_include([m4/ax_intel.m4])
 m4_include([m4/libtool.m4])
diff --git a/autogen.sh b/autogen.sh
index 7b7a7d1..103caa4 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,12 +1,7 @@
-#!/bin/sh -x
+#!/bin/sh
 
 set -e
 
-test -f src/ceph.in || {
-    echo "You must run this script in the top-level ceph directory"
-    exit 1
-}
-
 check_for_pkg_config() {
     which pkg-config >/dev/null && return
 
@@ -28,14 +23,6 @@ else
   exit 1
 fi
 
-if test -d ".git" ; then
-  if ! git submodule update --init; then
-    echo "Error: could not initialize submodule projects"
-    echo "  Network connectivity might be required."
-    exit 1
-  fi
-fi
-
 rm -f config.cache
 aclocal -I m4 --install
 check_for_pkg_config
@@ -45,5 +32,4 @@ autoconf
 autoheader
 automake -a --add-missing -Wall
 ( cd src/gtest && autoreconf -fvi; )
-( cd src/rocksdb && autoreconf -fvi; )
 exit
diff --git a/ceph.spec b/ceph.spec
index 12a6301..30636fa 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -9,9 +9,8 @@
 # common
 #################################################################################
 Name:		ceph
-Version:	0.87
+Version:	0.80.8
 Release:	0%{?dist}
-Epoch:		1
 Summary:	User space components of the Ceph file system
 License:	GPL-2.0
 Group:		System Environment/Base
@@ -20,13 +19,13 @@ Source0:	http://ceph.com/download/%{name}-%{version}.tar.bz2
 %if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
 Patch0:		init-ceph.in-fedora.patch
 %endif
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
-Requires:	ceph-common = %{epoch}:%{version}-%{release}
-Requires:	python-ceph = %{epoch}:%{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
+Requires:	ceph-common = %{version}-%{release}
 Requires:	python
 Requires:	python-argparse
+Requires:	python-ceph
 Requires:	python-requests
 Requires:	python-flask
 Requires:	xfsprogs
@@ -39,7 +38,6 @@ BuildRequires:	make
 BuildRequires:	gcc-c++
 BuildRequires:	libtool
 BuildRequires:	boost-devel
-BuildRequires:  bzip2-devel
 BuildRequires:	libedit-devel
 BuildRequires:	perl
 BuildRequires:	gdbm
@@ -52,7 +50,6 @@ BuildRequires:	libcurl-devel
 BuildRequires:	libxml2-devel
 BuildRequires:	libuuid-devel
 BuildRequires:	libblkid-devel >= 2.17
-BuildRequires:	libudev-devel
 BuildRequires:	leveldb-devel > 1.2
 BuildRequires:	xfsprogs-devel
 BuildRequires:	yasm
@@ -105,9 +102,9 @@ block and file system storage.
 %package -n ceph-common
 Summary:	Ceph Common
 Group:		System Environment/Base
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	python-ceph = %{epoch}:%{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	python-ceph = %{version}-%{release}
 Requires:	python-requests
 Requires:	redhat-lsb-core
 %description -n ceph-common
@@ -125,8 +122,8 @@ FUSE based client for Ceph distributed network file system
 Summary:	Ceph fuse-based client
 Group:		System Environment/Base
 Requires:	%{name}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
 BuildRequires:	fuse-devel
 %description -n rbd-fuse
 FUSE based client to map Ceph rbd images to files
@@ -135,12 +132,11 @@ FUSE based client to map Ceph rbd images to files
 Summary:	Ceph headers
 Group:		Development/Libraries
 License:	LGPL-2.0
-Requires:	%{name} = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	libradosstriper1 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs_jni1 = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
+Requires:	libcephfs_jni1 = %{version}-%{release}
 %description devel
 This package contains libraries and headers needed to develop programs
 that use Ceph.
@@ -148,8 +144,8 @@ that use Ceph.
 %package radosgw
 Summary:	Rados REST gateway
 Group:		Development/Libraries
-Requires:	ceph-common = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
+Requires:	ceph-common = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
 %if 0%{defined suse_version}
 BuildRequires:	libexpat-devel
 BuildRequires:	FastCGI-devel
@@ -168,7 +164,7 @@ conjunction with any FastCGI capable web server.
 Summary:	OCF-compliant resource agents for Ceph daemons
 Group:		System Environment/Base
 License:	LGPL-2.0
-Requires:	%{name} = %{epoch}:%{version}
+Requires:	%{name} = %{version}
 Requires:	resource-agents
 %description resource-agents
 Resource agents for monitoring and managing Ceph daemons
@@ -181,7 +177,7 @@ Summary:	RADOS distributed object store client library
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
-Obsoletes:	ceph-libs < %{epoch}:%{version}-%{release}
+Obsoletes:	ceph-libs < %{version}-%{release}
 %endif
 %description -n librados2
 RADOS is a reliable, autonomic distributed object storage cluster
@@ -189,23 +185,13 @@ developed as part of the Ceph distributed storage system. This is a
 shared library allowing applications to access the distributed object
 store using a simple file-like interface.
 
-%package -n libradosstriper1
-Summary:	RADOS striping interface
-Group:		System Environment/Libraries
-License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}
-%description -n libradosstriper1
-Striping interface built on top of the rados library, allowing
-to stripe bigger objects onto several standard rados objects using
-an interface very similar to the rados one.
-
 %package -n librbd1
 Summary:	RADOS block device client library
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
 %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
-Obsoletes:	ceph-libs < %{epoch}:%{version}-%{release}
+Obsoletes:	ceph-libs < %{version}-%{release}
 %endif
 %description -n librbd1
 RBD is a block device striped across multiple distributed objects in
@@ -218,7 +204,7 @@ Summary:	Ceph distributed file system client library
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
-Obsoletes:	ceph-libs < %{epoch}:%{version}-%{release}
+Obsoletes:	ceph-libs < %{version}-%{release}
 Obsoletes:	ceph-libcephfs
 %endif
 %description -n libcephfs1
@@ -231,8 +217,8 @@ POSIX-like interface.
 Summary:	Python libraries for the Ceph distributed filesystem
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
 %if 0%{defined suse_version}
 %py_requires
 %endif
@@ -244,7 +230,7 @@ object storage.
 Summary:	RESTful benchmark
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	ceph-common = %{epoch}:%{version}-%{release}
+Requires:	ceph-common = %{version}-%{release}
 %description -n rest-bench
 RESTful bencher that can be used to benchmark radosgw performance.
 
@@ -252,13 +238,9 @@ RESTful bencher that can be used to benchmark radosgw performance.
 Summary:	Ceph benchmarks and test tools
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
-%if (0%{?fedora} >= 20 || 0%{?rhel} == 6)
-BuildRequires:	lttng-ust-devel
-BuildRequires:	libbabeltrace-devel
-%endif
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
 %description -n ceph-test
 This package contains Ceph benchmarks and test tools.
 
@@ -267,7 +249,7 @@ Summary:	Java Native Interface library for CephFS Java bindings.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
 BuildRequires:	java-devel
 %description -n libcephfs_jni1
 This package contains the Java Native Interface library for CephFS Java
@@ -278,7 +260,7 @@ Summary:	Java libraries for the Ceph File System.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
-Requires:	libcephfs_jni1 = %{epoch}:%{version}-%{release}
+Requires:	libcephfs_jni1 = %{version}-%{release}
 BuildRequires:	java-devel
 Requires:	junit4
 BuildRequires:	junit4
@@ -290,9 +272,9 @@ Summary:	Meta package to include ceph libraries.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Obsoletes:	ceph-libs
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
 Provides:	ceph-libs
 
 %description libs-compat
@@ -338,7 +320,6 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
 		--with-rest-bench \
 		--with-debug \
 		--enable-cephfs-java \
-		--with-librocksdb-static=check \
 		$MY_CONF_OPT \
 		%{?_with_ocf} \
 		CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
@@ -387,6 +368,7 @@ install -m 0644 -D udev/95-ceph-osd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/95-ce
 
 %if 0%{?rhel} >= 7 || 0%{?fedora}
 mv $RPM_BUILD_ROOT/lib/udev/rules.d/95-ceph-osd.rules $RPM_BUILD_ROOT/usr/lib/udev/rules.d/95-ceph-osd.rules
+mv $RPM_BUILD_ROOT/sbin/mkcephfs $RPM_BUILD_ROOT/usr/sbin/mkcephfs
 mv $RPM_BUILD_ROOT/sbin/mount.ceph $RPM_BUILD_ROOT/usr/sbin/mount.ceph
 mv $RPM_BUILD_ROOT/sbin/mount.fuse.ceph $RPM_BUILD_ROOT/usr/sbin/mount.fuse.ceph
 %endif
@@ -456,7 +438,6 @@ fi
 %{_bindir}/ceph-rbdnamer
 %{_bindir}/librados-config
 %{_bindir}/ceph-client-debug
-%{_bindir}/cephfs-journal-tool
 %{_bindir}/ceph-debugpack
 %{_bindir}/ceph-coverage
 %{_bindir}/ceph_mon_store_converter
@@ -474,7 +455,6 @@ fi
 %endif
 %dir %{_libdir}/ceph
 %{_libdir}/ceph/ceph_common.sh
-%{_libexecdir}/ceph/ceph-osd-prestart.sh
 %dir %{_libdir}/rados-classes
 %{_libdir}/rados-classes/libcls_rbd.so*
 %{_libdir}/rados-classes/libcls_hello.so*
@@ -488,7 +468,13 @@ fi
 %{_libdir}/rados-classes/libcls_user.so*
 %{_libdir}/rados-classes/libcls_version.so*
 %dir %{_libdir}/ceph/erasure-code
-%{_libdir}/ceph/erasure-code/libec_*.so*
+%{_libdir}/ceph/erasure-code/libec_example.so*
+%{_libdir}/ceph/erasure-code/libec_fail_to_initialize.so*
+%{_libdir}/ceph/erasure-code/libec_fail_to_register.so*
+%{_libdir}/ceph/erasure-code/libec_hangs.so*
+%{_libdir}/ceph/erasure-code/libec_jerasure*.so*
+%{_libdir}/ceph/erasure-code/libec_test_jerasure*.so*
+%{_libdir}/ceph/erasure-code/libec_missing_entry_point.so*
 %if 0%{?rhel} >= 7 || 0%{?fedora}
 /usr/lib/udev/rules.d/60-ceph-partuuid-workaround.rules
 /usr/lib/udev/rules.d/95-ceph-osd.rules
@@ -502,6 +488,7 @@ fi
 %{_mandir}/man8/ceph-mon.8*
 %{_mandir}/man8/ceph-mds.8*
 %{_mandir}/man8/ceph-osd.8*
+%{_mandir}/man8/mkcephfs.8*
 %{_mandir}/man8/ceph-run.8*
 %{_mandir}/man8/ceph-rest-api.8*
 %{_mandir}/man8/crushtool.8*
@@ -592,9 +579,6 @@ fi
 %{_includedir}/rados/rados_types.h
 %{_includedir}/rados/rados_types.hpp
 %{_includedir}/rados/memory.h
-%dir %{_includedir}/radosstriper
-%{_includedir}/radosstriper/libradosstriper.h
-%{_includedir}/radosstriper/libradosstriper.hpp
 %dir %{_includedir}/rbd
 %{_includedir}/rbd/librbd.h
 %{_includedir}/rbd/librbd.hpp
@@ -602,7 +586,6 @@ fi
 %{_libdir}/libcephfs.so
 %{_libdir}/librbd.so
 %{_libdir}/librados.so
-%{_libdir}/libradosstriper.so
 %{_libdir}/libcephfs_jni.so
 
 #################################################################################
@@ -662,17 +645,6 @@ fi
 /sbin/ldconfig
 
 #################################################################################
-%files -n libradosstriper1
-%defattr(-,root,root,-)
-%{_libdir}/libradosstriper.so.*
-
-%post -n libradosstriper1
-/sbin/ldconfig
-
-%postun -n libradosstriper1
-/sbin/ldconfig
-
-#################################################################################
 %files -n librbd1
 %defattr(-,root,root,-)
 %{_libdir}/librbd.so.*
@@ -734,7 +706,8 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{_bindir}/ceph_smalliobenchdumb
 %{_bindir}/ceph_smalliobenchfs
 %{_bindir}/ceph_smalliobenchrbd
-%{_bindir}/ceph_objectstore_tool
+%{_bindir}/ceph_filestore_dump
+%{_bindir}/ceph_filestore_tool
 %{_bindir}/ceph_streamtest
 %{_bindir}/ceph_test_*
 %{_bindir}/ceph_tpbench
@@ -742,12 +715,6 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{_bindir}/ceph-monstore-tool
 %{_bindir}/ceph-osdomap-tool
 %{_bindir}/ceph-kvstore-tool
-%{_mandir}/man8/rbd-replay.8*
-%{_bindir}/rbd-replay
-%if (0%{?fedora} >= 20 || 0%{?rhel} == 6)
-%{_mandir}/man8/rbd-replay-prep.8*
-%{_bindir}/rbd-replay-prep
-%endif
 
 %files -n libcephfs_jni1
 %defattr(-,root,root,-)
diff --git a/ceph.spec.in b/ceph.spec.in
index 8a37b03..02b300b 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -11,7 +11,6 @@
 Name:		ceph
 Version:	@VERSION@
 Release:	@RPM_RELEASE@%{?dist}
-Epoch:		1
 Summary:	User space components of the Ceph file system
 License:	GPL-2.0
 Group:		System Environment/Base
@@ -20,13 +19,13 @@ Source0:	http://ceph.com/download/%{name}-%{version}.tar.bz2
 %if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
 Patch0:		init-ceph.in-fedora.patch
 %endif
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
-Requires:	ceph-common = %{epoch}:%{version}-%{release}
-Requires:	python-ceph = %{epoch}:%{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
+Requires:	ceph-common = %{version}-%{release}
 Requires:	python
 Requires:	python-argparse
+Requires:	python-ceph
 Requires:	python-requests
 Requires:	python-flask
 Requires:	xfsprogs
@@ -39,7 +38,6 @@ BuildRequires:	make
 BuildRequires:	gcc-c++
 BuildRequires:	libtool
 BuildRequires:	boost-devel
-BuildRequires:  bzip2-devel
 BuildRequires:	libedit-devel
 BuildRequires:	perl
 BuildRequires:	gdbm
@@ -52,7 +50,6 @@ BuildRequires:	libcurl-devel
 BuildRequires:	libxml2-devel
 BuildRequires:	libuuid-devel
 BuildRequires:	libblkid-devel >= 2.17
-BuildRequires:	libudev-devel
 BuildRequires:	leveldb-devel > 1.2
 BuildRequires:	xfsprogs-devel
 BuildRequires:	yasm
@@ -105,9 +102,9 @@ block and file system storage.
 %package -n ceph-common
 Summary:	Ceph Common
 Group:		System Environment/Base
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	python-ceph = %{epoch}:%{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	python-ceph = %{version}-%{release}
 Requires:	python-requests
 Requires:	redhat-lsb-core
 %description -n ceph-common
@@ -125,8 +122,8 @@ FUSE based client for Ceph distributed network file system
 Summary:	Ceph fuse-based client
 Group:		System Environment/Base
 Requires:	%{name}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
 BuildRequires:	fuse-devel
 %description -n rbd-fuse
 FUSE based client to map Ceph rbd images to files
@@ -135,12 +132,11 @@ FUSE based client to map Ceph rbd images to files
 Summary:	Ceph headers
 Group:		Development/Libraries
 License:	LGPL-2.0
-Requires:	%{name} = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	libradosstriper1 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs_jni1 = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
+Requires:	libcephfs_jni1 = %{version}-%{release}
 %description devel
 This package contains libraries and headers needed to develop programs
 that use Ceph.
@@ -148,8 +144,8 @@ that use Ceph.
 %package radosgw
 Summary:	Rados REST gateway
 Group:		Development/Libraries
-Requires:	ceph-common = %{epoch}:%{version}-%{release}
-Requires:	librados2 = %{epoch}:%{version}-%{release}
+Requires:	ceph-common = %{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
 %if 0%{defined suse_version}
 BuildRequires:	libexpat-devel
 BuildRequires:	FastCGI-devel
@@ -168,7 +164,7 @@ conjunction with any FastCGI capable web server.
 Summary:	OCF-compliant resource agents for Ceph daemons
 Group:		System Environment/Base
 License:	LGPL-2.0
-Requires:	%{name} = %{epoch}:%{version}
+Requires:	%{name} = %{version}
 Requires:	resource-agents
 %description resource-agents
 Resource agents for monitoring and managing Ceph daemons
@@ -181,7 +177,7 @@ Summary:	RADOS distributed object store client library
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
-Obsoletes:	ceph-libs < %{epoch}:%{version}-%{release}
+Obsoletes:	ceph-libs < %{version}-%{release}
 %endif
 %description -n librados2
 RADOS is a reliable, autonomic distributed object storage cluster
@@ -189,23 +185,13 @@ developed as part of the Ceph distributed storage system. This is a
 shared library allowing applications to access the distributed object
 store using a simple file-like interface.
 
-%package -n libradosstriper1
-Summary:	RADOS striping interface
-Group:		System Environment/Libraries
-License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}
-%description -n libradosstriper1
-Striping interface built on top of the rados library, allowing
-to stripe bigger objects onto several standard rados objects using
-an interface very similar to the rados one.
-
 %package -n librbd1
 Summary:	RADOS block device client library
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
 %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
-Obsoletes:	ceph-libs < %{epoch}:%{version}-%{release}
+Obsoletes:	ceph-libs < %{version}-%{release}
 %endif
 %description -n librbd1
 RBD is a block device striped across multiple distributed objects in
@@ -218,7 +204,7 @@ Summary:	Ceph distributed file system client library
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
-Obsoletes:	ceph-libs < %{epoch}:%{version}-%{release}
+Obsoletes:	ceph-libs < %{version}-%{release}
 Obsoletes:	ceph-libcephfs
 %endif
 %description -n libcephfs1
@@ -231,8 +217,8 @@ POSIX-like interface.
 Summary:	Python libraries for the Ceph distributed filesystem
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
 %if 0%{defined suse_version}
 %py_requires
 %endif
@@ -244,7 +230,7 @@ object storage.
 Summary:	RESTful benchmark
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	ceph-common = %{epoch}:%{version}-%{release}
+Requires:	ceph-common = %{version}-%{release}
 %description -n rest-bench
 RESTful bencher that can be used to benchmark radosgw performance.
 
@@ -252,13 +238,9 @@ RESTful bencher that can be used to benchmark radosgw performance.
 Summary:	Ceph benchmarks and test tools
 Group:		System Environment/Libraries
 License:	LGPL-2.0
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
-%if (0%{?fedora} >= 20 || 0%{?rhel} == 6)
-BuildRequires:	lttng-ust-devel
-BuildRequires:	libbabeltrace-devel
-%endif
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
 %description -n ceph-test
 This package contains Ceph benchmarks and test tools.
 
@@ -267,7 +249,7 @@ Summary:	Java Native Interface library for CephFS Java bindings.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
 BuildRequires:	java-devel
 %description -n libcephfs_jni1
 This package contains the Java Native Interface library for CephFS Java
@@ -278,7 +260,7 @@ Summary:	Java libraries for the Ceph File System.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
-Requires:	libcephfs_jni1 = %{epoch}:%{version}-%{release}
+Requires:	libcephfs_jni1 = %{version}-%{release}
 BuildRequires:	java-devel
 Requires:	junit4
 BuildRequires:	junit4
@@ -290,9 +272,9 @@ Summary:	Meta package to include ceph libraries.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Obsoletes:	ceph-libs
-Requires:	librados2 = %{epoch}:%{version}-%{release}
-Requires:	librbd1 = %{epoch}:%{version}-%{release}
-Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
+Requires:	librados2 = %{version}-%{release}
+Requires:	librbd1 = %{version}-%{release}
+Requires:	libcephfs1 = %{version}-%{release}
 Provides:	ceph-libs
 
 %description libs-compat
@@ -338,7 +320,6 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
 		--with-rest-bench \
 		--with-debug \
 		--enable-cephfs-java \
-		--with-librocksdb-static=check \
 		$MY_CONF_OPT \
 		%{?_with_ocf} \
 		CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
@@ -387,6 +368,7 @@ install -m 0644 -D udev/95-ceph-osd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/95-ce
 
 %if 0%{?rhel} >= 7 || 0%{?fedora}
 mv $RPM_BUILD_ROOT/lib/udev/rules.d/95-ceph-osd.rules $RPM_BUILD_ROOT/usr/lib/udev/rules.d/95-ceph-osd.rules
+mv $RPM_BUILD_ROOT/sbin/mkcephfs $RPM_BUILD_ROOT/usr/sbin/mkcephfs
 mv $RPM_BUILD_ROOT/sbin/mount.ceph $RPM_BUILD_ROOT/usr/sbin/mount.ceph
 mv $RPM_BUILD_ROOT/sbin/mount.fuse.ceph $RPM_BUILD_ROOT/usr/sbin/mount.fuse.ceph
 %endif
@@ -456,7 +438,6 @@ fi
 %{_bindir}/ceph-rbdnamer
 %{_bindir}/librados-config
 %{_bindir}/ceph-client-debug
-%{_bindir}/cephfs-journal-tool
 %{_bindir}/ceph-debugpack
 %{_bindir}/ceph-coverage
 %{_bindir}/ceph_mon_store_converter
@@ -474,7 +455,6 @@ fi
 %endif
 %dir %{_libdir}/ceph
 %{_libdir}/ceph/ceph_common.sh
-%{_libexecdir}/ceph/ceph-osd-prestart.sh
 %dir %{_libdir}/rados-classes
 %{_libdir}/rados-classes/libcls_rbd.so*
 %{_libdir}/rados-classes/libcls_hello.so*
@@ -488,7 +468,13 @@ fi
 %{_libdir}/rados-classes/libcls_user.so*
 %{_libdir}/rados-classes/libcls_version.so*
 %dir %{_libdir}/ceph/erasure-code
-%{_libdir}/ceph/erasure-code/libec_*.so*
+%{_libdir}/ceph/erasure-code/libec_example.so*
+%{_libdir}/ceph/erasure-code/libec_fail_to_initialize.so*
+%{_libdir}/ceph/erasure-code/libec_fail_to_register.so*
+%{_libdir}/ceph/erasure-code/libec_hangs.so*
+%{_libdir}/ceph/erasure-code/libec_jerasure*.so*
+%{_libdir}/ceph/erasure-code/libec_test_jerasure*.so*
+%{_libdir}/ceph/erasure-code/libec_missing_entry_point.so*
 %if 0%{?rhel} >= 7 || 0%{?fedora}
 /usr/lib/udev/rules.d/60-ceph-partuuid-workaround.rules
 /usr/lib/udev/rules.d/95-ceph-osd.rules
@@ -502,6 +488,7 @@ fi
 %{_mandir}/man8/ceph-mon.8*
 %{_mandir}/man8/ceph-mds.8*
 %{_mandir}/man8/ceph-osd.8*
+%{_mandir}/man8/mkcephfs.8*
 %{_mandir}/man8/ceph-run.8*
 %{_mandir}/man8/ceph-rest-api.8*
 %{_mandir}/man8/crushtool.8*
@@ -592,9 +579,6 @@ fi
 %{_includedir}/rados/rados_types.h
 %{_includedir}/rados/rados_types.hpp
 %{_includedir}/rados/memory.h
-%dir %{_includedir}/radosstriper
-%{_includedir}/radosstriper/libradosstriper.h
-%{_includedir}/radosstriper/libradosstriper.hpp
 %dir %{_includedir}/rbd
 %{_includedir}/rbd/librbd.h
 %{_includedir}/rbd/librbd.hpp
@@ -602,7 +586,6 @@ fi
 %{_libdir}/libcephfs.so
 %{_libdir}/librbd.so
 %{_libdir}/librados.so
-%{_libdir}/libradosstriper.so
 %{_libdir}/libcephfs_jni.so
 
 #################################################################################
@@ -662,17 +645,6 @@ fi
 /sbin/ldconfig
 
 #################################################################################
-%files -n libradosstriper1
-%defattr(-,root,root,-)
-%{_libdir}/libradosstriper.so.*
-
-%post -n libradosstriper1
-/sbin/ldconfig
-
-%postun -n libradosstriper1
-/sbin/ldconfig
-
-#################################################################################
 %files -n librbd1
 %defattr(-,root,root,-)
 %{_libdir}/librbd.so.*
@@ -734,7 +706,8 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{_bindir}/ceph_smalliobenchdumb
 %{_bindir}/ceph_smalliobenchfs
 %{_bindir}/ceph_smalliobenchrbd
-%{_bindir}/ceph_objectstore_tool
+%{_bindir}/ceph_filestore_dump
+%{_bindir}/ceph_filestore_tool
 %{_bindir}/ceph_streamtest
 %{_bindir}/ceph_test_*
 %{_bindir}/ceph_tpbench
@@ -742,12 +715,6 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{_bindir}/ceph-monstore-tool
 %{_bindir}/ceph-osdomap-tool
 %{_bindir}/ceph-kvstore-tool
-%{_mandir}/man8/rbd-replay.8*
-%{_bindir}/rbd-replay
-%if (0%{?fedora} >= 20 || 0%{?rhel} == 6)
-%{_mandir}/man8/rbd-replay-prep.8*
-%{_bindir}/rbd-replay-prep
-%endif
 
 %files -n libcephfs_jni1
 %defattr(-,root,root,-)
diff --git a/configure b/configure
index aedef52..f9dbb53 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ceph 0.87.
+# Generated by GNU Autoconf 2.68 for ceph 0.80.8.
 #
 # Report bugs to <ceph-devel at vger.kernel.org>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='ceph'
 PACKAGE_TARNAME='ceph'
-PACKAGE_VERSION='0.87'
-PACKAGE_STRING='ceph 0.87'
+PACKAGE_VERSION='0.80.8'
+PACKAGE_STRING='ceph 0.80.8'
 PACKAGE_BUGREPORT='ceph-devel at vger.kernel.org'
 PACKAGE_URL=''
 
@@ -627,14 +627,7 @@ PYTHON_VERSION
 PYTHON
 WITH_BUILD_TESTS_FALSE
 WITH_BUILD_TESTS_TRUE
-WITH_BABELTRACE_FALSE
-WITH_BABELTRACE_TRUE
-LTTNG_GEN_TP_PROG
-LTTNG_GEN_TP_CHECK
-WITH_LTTNG_FALSE
-WITH_LTTNG_TRUE
 BOOST_PROGRAM_OPTIONS_LIBS
-BOOST_THREAD_LIBS
 USE_BOOST_SPIRIT_OLD_HDR_FALSE
 USE_BOOST_SPIRIT_OLD_HDR_TRUE
 WITH_LIBZFS_FALSE
@@ -649,17 +642,6 @@ WITH_REST_BENCH_FALSE
 WITH_REST_BENCH_TRUE
 WITH_SYSTEM_LIBS3_FALSE
 WITH_SYSTEM_LIBS3_TRUE
-WITH_LIBROCKSDB_FALSE
-WITH_LIBROCKSDB_TRUE
-WITH_SLIBROCKSDB_FALSE
-WITH_SLIBROCKSDB_TRUE
-WITH_DLIBROCKSDB_FALSE
-WITH_DLIBROCKSDB_TRUE
-LIBROCKSDB_LIBS
-LIBROCKSDB_CFLAGS
-HAVE_CXX11
-WITH_KINETIC_FALSE
-WITH_KINETIC_TRUE
 INTEL_FLAGS
 INTEL_SSE4_2_FLAGS
 INTEL_SSE4_1_FLAGS
@@ -719,8 +701,6 @@ ENABLE_FPU_NEON_FALSE
 ENABLE_FPU_NEON_TRUE
 WARN_IGNORED_QUALIFIERS
 WARN_TYPE_LIMITS
-WITH_BETTER_YASM_ELF64_FALSE
-WITH_BETTER_YASM_ELF64_TRUE
 WITH_GOOD_YASM_ELF64_FALSE
 WITH_GOOD_YASM_ELF64_TRUE
 AM_CXXFLAGS
@@ -886,16 +866,11 @@ enable_cephfs_java
 with_jdk_dir
 with_libatomic_ops
 with_ocf
-with_kinetic
-with_librocksdb
-with_librocksdb_static
 with_system_libs3
 with_rest_bench
 with_libaio
 with_libxfs
 with_libzfs
-with_lttng
-with_babeltrace
 '
       ac_precious_vars='build_alias
 host_alias
@@ -921,13 +896,10 @@ NSS_CFLAGS
 NSS_LIBS
 LIBEDIT_CFLAGS
 LIBEDIT_LIBS
-LIBROCKSDB_CFLAGS
-LIBROCKSDB_LIBS
 LIBZFS_CFLAGS
 LIBZFS_LIBS
 PYTHON'
-ac_subdirs_all='src/gtest
-src/rocksdb'
+ac_subdirs_all='src/gtest'
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1469,7 +1441,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ceph 0.87 to adapt to many kinds of systems.
+\`configure' configures ceph 0.80.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1540,7 +1512,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ceph 0.87:";;
+     short | recursive ) echo "Configuration of ceph 0.80.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1579,17 +1551,11 @@ Optional Packages:
   --with-jdk-dir(=DIR)    Path to JDK directory
   --without-libatomic-ops disable libatomic-ops for the atomic_t type
   --with-ocf              build OCF-compliant cluster resource agent
-  --with-kinetic          build kinetic support
-  --with-librocksdb       build rocksdb support
-  --with-librocksdb-static
-                          build rocksdb support
   --with-system-libs3     use system libs3
   --with-rest-bench       enables rest-bench
   --without-libaio        disable libaio use by journal
   --without-libxfs        disable libxfs use by FileStore
   --with-libzfs           build ZFS support
-  --with-lttng            Trace with LTTng
-  --with-babeltrace       Enable Babeltrace
 
 Some influential environment variables:
   CC          C compiler command
@@ -1620,10 +1586,6 @@ Some influential environment variables:
               C compiler flags for LIBEDIT, overriding pkg-config
   LIBEDIT_LIBS
               linker flags for LIBEDIT, overriding pkg-config
-  LIBROCKSDB_CFLAGS
-              C compiler flags for LIBROCKSDB, overriding pkg-config
-  LIBROCKSDB_LIBS
-              linker flags for LIBROCKSDB, overriding pkg-config
   LIBZFS_CFLAGS
               C compiler flags for LIBZFS, overriding pkg-config
   LIBZFS_LIBS linker flags for LIBZFS, overriding pkg-config
@@ -1695,7 +1657,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ceph configure 0.87
+ceph configure 0.80.8
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2562,52 +2524,6 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_type
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
 # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES
 # -----------------------------------------------
 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -2766,7 +2682,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ceph $as_me 0.87, which was
+It was created by ceph $as_me 0.80.8, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -4766,7 +4682,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ceph'
- VERSION='0.87'
+ VERSION='0.80.8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12744,7 +12660,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ceph'
- VERSION='0.87'
+ VERSION='0.80.8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16792,50 +16708,12 @@ AM_CXXFLAGS="${AM_CXXFLAGS}"
 # Check for yasm
 if yasm -f elf64 src/common/crc32c_intel_fast_asm.S -o /dev/null; then
    echo 'we have a modern and working yasm'
-   if test `arch` = "x86_64" ; then
+   if test `arch` = "x86_64"; then
       echo 'we are x86_64'
-      arch_x32=0
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-        #if defined(__x86_64__) && defined(__ILP32__)
-        #error x32
-        #endif
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  arch_x32=1
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      if test $arch_x32 -eq 0 ; then
-         echo 'we are not x32'
 
 $as_echo "#define HAVE_GOOD_YASM_ELF64 1" >>confdefs.h
 
-         with_good_yasm=yes
-
-         if yasm -f elf64 -i src/ceph/src/ceph/src/erasure-code/isa/isa-l/include/ src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s -o /dev/null 2> /dev/null ; then
-            echo 'yasm can also build the isa-l stuff'
-
-$as_echo "#define HAVE_BETTER_YASM_ELF64 1" >>confdefs.h
-
-	    with_better_yasm=yes
-         else
-            echo "yasm doesn't build the isa-l stuff"
-	 fi
-      else
-         echo 'we are x32; no yasm for you'
-      fi
-   else
-      echo 'we are not x86_64 && !x32'
+      with_good_yasm=yes
    fi
 else
    echo 'we do not have a modern/working yasm'
@@ -16848,16 +16726,6 @@ else
   WITH_GOOD_YASM_ELF64_FALSE=
 fi
 
- if test "$with_better_yasm" = "yes"; then
-  WITH_BETTER_YASM_ELF64_TRUE=
-  WITH_BETTER_YASM_ELF64_FALSE='#'
-else
-  WITH_BETTER_YASM_ELF64_TRUE='#'
-  WITH_BETTER_YASM_ELF64_FALSE=
-fi
-
-
-# check for better yasm
 
 # Checks for compiler warning types
 
@@ -17754,17 +17622,7 @@ See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 
-# rbd {map,unmap,showmapped} dependencies, Linux only
 if test x"$linux" = x"yes"; then
-  # libblkid
-  ac_fn_c_check_header_mongrel "$LINENO" "blkid/blkid.h" "ac_cv_header_blkid_blkid_h" "$ac_includes_default"
-if test "x$ac_cv_header_blkid_blkid_h" = xyes; then :
-
-else
-  as_fn_error $? "blkid/blkid.h not found (libblkid-dev, libblkid-devel)" "$LINENO" 5
-fi
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid_devno_to_wholedisk in -lblkid" >&5
 $as_echo_n "checking for blkid_devno_to_wholedisk in -lblkid... " >&6; }
 if ${ac_cv_lib_blkid_blkid_devno_to_wholedisk+:} false; then :
@@ -17810,61 +17668,6 @@ as_fn_error $? "libblkid not found
 See \`config.log' for more details" "$LINENO" 5; }
 fi
 
-
-  # libudev
-  ac_fn_c_check_header_mongrel "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default"
-if test "x$ac_cv_header_libudev_h" = xyes; then :
-
-else
-  as_fn_error $? "libudev.h not found (libudev-dev, libudev-devel)" "$LINENO" 5
-fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev_monitor_receive_device in -ludev" >&5
-$as_echo_n "checking for udev_monitor_receive_device in -ludev... " >&6; }
-if ${ac_cv_lib_udev_udev_monitor_receive_device+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ludev  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char udev_monitor_receive_device ();
-int
-main ()
-{
-return udev_monitor_receive_device ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_udev_udev_monitor_receive_device=yes
-else
-  ac_cv_lib_udev_udev_monitor_receive_device=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_udev_monitor_receive_device" >&5
-$as_echo "$ac_cv_lib_udev_udev_monitor_receive_device" >&6; }
-if test "x$ac_cv_lib_udev_udev_monitor_receive_device" = xyes; then :
-  true
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "libudev not found
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
 fi
 
 #
@@ -19281,7 +19084,7 @@ else
 JAVA_TEST=Test.java
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 19284 "configure" */
+/* #line 19087 "configure" */
 public class Test {
 }
 EOF
@@ -20128,363 +19931,6 @@ $as_echo "#define HAVE_SSE4_2 /**/" >>confdefs.h
 
 
 
-# kinetic osd backend?
-
-# Check whether --with-kinetic was given.
-if test "${with_kinetic+set}" = set; then :
-  withval=$with_kinetic;
-else
-  with_kinetic=no
-fi
-
-# no pkg-config support yet
-#AS_IF([test "x$with_kinetic" = "xyes"],
-#            [PKG_CHECK_MODULES([KINETIC], [kinetic_client], [], [true])])
-if test "x$with_kinetic" = "xyes"; then :
-
-$as_echo "#define HAVE_KINETIC 1" >>confdefs.h
-
-fi
- if  test "$with_kinetic" = "yes" ; then
-  WITH_KINETIC_TRUE=
-  WITH_KINETIC_FALSE='#'
-else
-  WITH_KINETIC_TRUE='#'
-  WITH_KINETIC_FALSE=
-fi
-
-
-# check for c++11 (but do not enable it)
-old_cxxflags="$CXXFLAGS"
-    ax_cxx_compile_cxx11_required=false
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-  ac_success=no
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
-$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
-if ${ax_cv_cxx_compile_cxx11+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    struct Base {
-    virtual void f() {}
-    };
-    struct Child : public Base {
-    virtual void f() override {}
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
-
-    auto d = a;
-    auto l = [](){};
-
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ax_cv_cxx_compile_cxx11=yes
-else
-  ax_cv_cxx_compile_cxx11=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
-$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
-  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
-    ac_success=yes
-  fi
-
-    if test x$ac_success = xno; then
-    for switch in -std=gnu++11 -std=gnu++0x; do
-      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
-$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
-if eval \${$cachevar+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    struct Base {
-    virtual void f() {}
-    };
-    struct Child : public Base {
-    virtual void f() override {}
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
-
-    auto d = a;
-    auto l = [](){};
-
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  eval $cachevar=yes
-else
-  eval $cachevar=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         CXXFLAGS="$ac_save_CXXFLAGS"
-fi
-eval ac_res=\$$cachevar
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-      if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
-        ac_success=yes
-        break
-      fi
-    done
-  fi
-
-    if test x$ac_success = xno; then
-    for switch in -std=c++11 -std=c++0x; do
-      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
-$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
-if eval \${$cachevar+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    struct Base {
-    virtual void f() {}
-    };
-    struct Child : public Base {
-    virtual void f() override {}
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
-
-    auto d = a;
-    auto l = [](){};
-
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  eval $cachevar=yes
-else
-  eval $cachevar=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         CXXFLAGS="$ac_save_CXXFLAGS"
-fi
-eval ac_res=\$$cachevar
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-      if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
-        ac_success=yes
-        break
-      fi
-    done
-  fi
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-  if test x$ax_cxx_compile_cxx11_required = xtrue; then
-    if test x$ac_success = xno; then
-      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
-    fi
-  else
-    if test x$ac_success = xno; then
-      HAVE_CXX11=0
-      { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
-$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
-    else
-      HAVE_CXX11=1
-
-$as_echo "#define HAVE_CXX11 1" >>confdefs.h
-
-    fi
-
-
-  fi
-
-CXXFLAGS="$old_cxxflags"
-
-# use rocksdb
-
-# Check whether --with-librocksdb was given.
-if test "${with_librocksdb+set}" = set; then :
-  withval=$with_librocksdb;
-else
-  with_librocksdb=no
-fi
-
-if test "x$with_librocksdb" = "xyes"; then :
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBROCKSDB" >&5
-$as_echo_n "checking for LIBROCKSDB... " >&6; }
-
-if test -n "$LIBROCKSDB_CFLAGS"; then
-    pkg_cv_LIBROCKSDB_CFLAGS="$LIBROCKSDB_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rocksdb\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "rocksdb") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBROCKSDB_CFLAGS=`$PKG_CONFIG --cflags "rocksdb" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBROCKSDB_LIBS"; then
-    pkg_cv_LIBROCKSDB_LIBS="$LIBROCKSDB_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rocksdb\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "rocksdb") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBROCKSDB_LIBS=`$PKG_CONFIG --libs "rocksdb" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBROCKSDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "rocksdb" 2>&1`
-        else
-	        LIBROCKSDB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "rocksdb" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBROCKSDB_PKG_ERRORS" >&5
-
-	true
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	true
-else
-	LIBROCKSDB_CFLAGS=$pkg_cv_LIBROCKSDB_CFLAGS
-	LIBROCKSDB_LIBS=$pkg_cv_LIBROCKSDB_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-fi
-if test "x$with_librocksdb" = "xyes"; then :
-
-$as_echo "#define HAVE_LIBROCKSDB 1" >>confdefs.h
-
-fi
- if  test "$with_librocksdb" = "yes" ; then
-  WITH_DLIBROCKSDB_TRUE=
-  WITH_DLIBROCKSDB_FALSE='#'
-else
-  WITH_DLIBROCKSDB_TRUE='#'
-  WITH_DLIBROCKSDB_FALSE=
-fi
-
-
-
-# Check whether --with-librocksdb-static was given.
-if test "${with_librocksdb_static+set}" = set; then :
-  withval=$with_librocksdb_static;
-else
-  with_librocksdb_static=no
-fi
-
-if test "x$with_librocksdb_static" = "xcheck" -a "x$HAVE_CXX11" = "x1" ; then :
-  with_librocksdb_static="yes"
-fi
-if test "x$with_librocksdb_static" = "xyes"; then :
-  subdirs="$subdirs src/rocksdb"
-
-fi
-if test "x$with_librocksdb_static" = "xyes"; then :
-
-$as_echo "#define HAVE_LIBROCKSDB 1" >>confdefs.h
-
-fi
- if  test "x$with_librocksdb_static" = "xyes" ; then
-  WITH_SLIBROCKSDB_TRUE=
-  WITH_SLIBROCKSDB_FALSE='#'
-else
-  WITH_SLIBROCKSDB_TRUE='#'
-  WITH_SLIBROCKSDB_FALSE=
-fi
-
- if  test "x$with_librocksdb_static" = "xyes" -o "x$with_librocksdb" = "xyes" ; then
-  WITH_LIBROCKSDB_TRUE=
-  WITH_LIBROCKSDB_FALSE='#'
-else
-  WITH_LIBROCKSDB_TRUE='#'
-  WITH_LIBROCKSDB_FALSE=
-fi
-
-
 # use system libs3?
 
 # Check whether --with-system-libs3 was given.
@@ -21329,9 +20775,6 @@ fi
 
 
 # Find the right boost_thread library.
-BOOST_THREAD_LIBS=""
-saved_LIBS="${LIBS}"
-LIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lboost_thread-mt" >&5
 $as_echo_n "checking for main in -lboost_thread-mt... " >&6; }
 if ${ac_cv_lib_boost_thread_mt_main+:} false; then :
@@ -21416,9 +20859,6 @@ fi
 
 fi
 
-BOOST_THREAD_LIBS="${LIBS}"
-LIBS="${saved_LIBS}"
-
 
 #
 # Check for boost_program_options library (defines BOOST_PROGRAM_OPTIONS_LIBS).
@@ -21983,267 +21423,6 @@ _ACEOF
 fi
 
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lttng-gen-tp is sane" >&5
-$as_echo_n "checking if lttng-gen-tp is sane... " >&6; }
-lttng_gen_tp_dir=`mktemp -d`
-echo "#include <foo-inc.h>" > "$lttng_gen_tp_dir/foo.tp"
-if ( ( cd "$lttng_gen_tp_dir" && lttng-gen-tp foo.tp -o foo.h && grep "#include <foo-inc.h>" foo.h ) > /dev/null 2>&1 ) ; then
-  have_good_lttng_gen_tp=yes
-else
-  have_good_lttng_gen_tp=no
-fi
-rm -rf "$lttng_gen_tp_dir"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_good_lttng_gen_tp" >&5
-$as_echo "$have_good_lttng_gen_tp" >&6; }
-
-
-# Check whether --with-lttng was given.
-if test "${with_lttng+set}" = set; then :
-  withval=$with_lttng;
-fi
-
-if test "x$with_lttng" = "xno"; then :
-  use_lttng=no
-elif test "x$with_lttng" = "xyes"; then :
-  use_lttng=yes
-elif test "x$have_good_lttng_gen_tp" = "xyes"; then :
-  use_lttng=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: lttng auto-enabled" >&5
-$as_echo "$as_me: lttng auto-enabled" >&6;}
-else
-  use_lttng=no; { $as_echo "$as_me:${as_lineno-$LINENO}: lttng auto-disabled" >&5
-$as_echo "$as_me: lttng auto-disabled" >&6;}
-fi
- if test x"$use_lttng" = x"yes"; then
-  WITH_LTTNG_TRUE=
-  WITH_LTTNG_FALSE='#'
-else
-  WITH_LTTNG_TRUE='#'
-  WITH_LTTNG_FALSE=
-fi
-
-if test -z "$WITH_LTTNG_TRUE"; then :
-
-
-$as_echo "#define WITH_LTTNG 1" >>confdefs.h
-
-
-  ac_fn_c_check_header_mongrel "$LINENO" "lttng/tracepoint.h" "ac_cv_header_lttng_tracepoint_h" "$ac_includes_default"
-if test "x$ac_cv_header_lttng_tracepoint_h" = xyes; then :
-
-else
-  as_fn_error $? "lttng/tracepoint.h not found (liblttng-ust-dev, lttng-ust-devel)" "$LINENO" 5
-fi
-
-
-
-  # Extract the first word of "lttng-gen-tp", so it can be a program name with args.
-set dummy lttng-gen-tp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LTTNG_GEN_TP_CHECK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LTTNG_GEN_TP_CHECK"; then
-  ac_cv_prog_LTTNG_GEN_TP_CHECK="$LTTNG_GEN_TP_CHECK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_LTTNG_GEN_TP_CHECK="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-LTTNG_GEN_TP_CHECK=$ac_cv_prog_LTTNG_GEN_TP_CHECK
-if test -n "$LTTNG_GEN_TP_CHECK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LTTNG_GEN_TP_CHECK" >&5
-$as_echo "$LTTNG_GEN_TP_CHECK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  if test x"$LTTNG_GEN_TP_CHECK" != "xyes"; then
-      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "lttng-gen-tp not found
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-  LTTNG_GEN_TP_PROG=lttng-gen-tp
-
-
-  if test x"$have_good_lttng_gen_tp" != "xyes"; then
-      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "lttng-gen-tp does not behave properly
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t is an integer" >&5
-$as_echo_n "checking if time_t is an integer... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
-int
-main ()
-{
-
-      struct {
-          unsigned int time_t_is_integer: ((time_t) 1.5 == 1) ? 1 : -1;
-      } x;
-      return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "time_t is not an integer.  We assume this for tracing.
-See \`config.log' for more details" "$LINENO" 5; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t fits in uint64_t" >&5
-$as_echo_n "checking if time_t fits in uint64_t... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
-  #include <inttypes.h>
-int
-main ()
-{
-
-      struct {
-          unsigned int time_t_fits_in_uin64_t: (sizeof(time_t) <= sizeof(uint64_t)) ? 1 : -1;
-      } x;
-      return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "time_t is larger than uint64_t.  We assume it can be cast to uint64_t, for tracing.
-See \`config.log' for more details" "$LINENO" 5; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-else
-
-
-$as_echo "#define tracepoint(...) /**/" >>confdefs.h
-
-
-fi
-
-
-for ac_header in babeltrace/ctf/events.h babeltrace/babeltrace.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-ac_fn_c_check_decl "$LINENO" "BT_CLOCK_REAL" "ac_cv_have_decl_BT_CLOCK_REAL" "#include <babeltrace/babeltrace.h>
-"
-if test "x$ac_cv_have_decl_BT_CLOCK_REAL" = xyes; then :
-  have_good_babeltrace=yes
-else
-  have_good_babeltrace=no
-fi
-
-
-# Check whether --with-babeltrace was given.
-if test "${with_babeltrace+set}" = set; then :
-  withval=$with_babeltrace;
-fi
-
-if test "x$with_babeltrace" = "xno"; then :
-  use_babeltrace=no
-elif test "x$with_babeltrace" = "xyes"; then :
-  use_babeltrace=yes
-elif test "x$ac_cv_header_babeltrace_ctf_events_h$ac_cv_header_babeltrace_babeltrace_h$have_good_babeltrace" = "xyesyesyes"; then :
-  use_babeltrace=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: babeltrace auto-enabled" >&5
-$as_echo "$as_me: babeltrace auto-enabled" >&6;}
-else
-  use_babeltrace=no; { $as_echo "$as_me:${as_lineno-$LINENO}: babeltrace auto-disabled" >&5
-$as_echo "$as_me: babeltrace auto-disabled" >&6;}
-fi
- if test x"$use_babeltrace" = x"yes"; then
-  WITH_BABELTRACE_TRUE=
-  WITH_BABELTRACE_FALSE='#'
-else
-  WITH_BABELTRACE_TRUE='#'
-  WITH_BABELTRACE_FALSE=
-fi
-
-if test -z "$WITH_BABELTRACE_TRUE"; then :
-
-
-$as_echo "#define WITH_BABELTRACE 1" >>confdefs.h
-
-
-  ac_fn_c_check_header_mongrel "$LINENO" "babeltrace/babeltrace.h" "ac_cv_header_babeltrace_babeltrace_h" "$ac_includes_default"
-if test "x$ac_cv_header_babeltrace_babeltrace_h" = xyes; then :
-
-else
-  as_fn_error $? "babeltrace/babeltrac.h not found (libbabeltrace-dev, libbabeltrace-devel)" "$LINENO" 5
-fi
-
-
-
-  ac_fn_c_check_header_mongrel "$LINENO" "babeltrace/ctf/events.h" "ac_cv_header_babeltrace_ctf_events_h" "$ac_includes_default"
-if test "x$ac_cv_header_babeltrace_ctf_events_h" = xyes; then :
-
-else
-  as_fn_error $? "babeltrace/ctf/events.h not found (libbabeltrace-ctf-dev, libbabeltrace-devel)" "$LINENO" 5
-fi
-
-
-
-fi
-
-
-
 # Checks for typedefs, structures, and compiler characteristics.
 #AC_HEADER_STDBOOL
 #AC_C_CONST
@@ -22633,7 +21812,7 @@ $as_echo "$am_cv_python_pyexecdir" >&6; }
 
 ac_config_headers="$ac_config_headers src/acconfig.h"
 
-ac_config_files="$ac_config_files Makefile src/Makefile src/ocf/Makefile src/ocf/ceph src/ocf/rbd src/java/Makefile src/tracing/Makefile man/Makefile ceph.spec"
+ac_config_files="$ac_config_files Makefile src/Makefile src/ocf/Makefile src/ocf/ceph src/ocf/rbd src/java/Makefile man/Makefile ceph.spec"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -22800,10 +21979,6 @@ if test -z "${WITH_GOOD_YASM_ELF64_TRUE}" && test -z "${WITH_GOOD_YASM_ELF64_FAL
   as_fn_error $? "conditional \"WITH_GOOD_YASM_ELF64\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${WITH_BETTER_YASM_ELF64_TRUE}" && test -z "${WITH_BETTER_YASM_ELF64_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_BETTER_YASM_ELF64\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${ENABLE_FPU_NEON_TRUE}" && test -z "${ENABLE_FPU_NEON_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_FPU_NEON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -22852,22 +22027,6 @@ if test -z "${WITH_OCF_TRUE}" && test -z "${WITH_OCF_FALSE}"; then
   as_fn_error $? "conditional \"WITH_OCF\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${WITH_KINETIC_TRUE}" && test -z "${WITH_KINETIC_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_KINETIC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${WITH_DLIBROCKSDB_TRUE}" && test -z "${WITH_DLIBROCKSDB_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_DLIBROCKSDB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${WITH_SLIBROCKSDB_TRUE}" && test -z "${WITH_SLIBROCKSDB_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_SLIBROCKSDB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${WITH_LIBROCKSDB_TRUE}" && test -z "${WITH_LIBROCKSDB_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_LIBROCKSDB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${WITH_SYSTEM_LIBS3_TRUE}" && test -z "${WITH_SYSTEM_LIBS3_FALSE}"; then
   as_fn_error $? "conditional \"WITH_SYSTEM_LIBS3\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -22892,14 +22051,6 @@ if test -z "${USE_BOOST_SPIRIT_OLD_HDR_TRUE}" && test -z "${USE_BOOST_SPIRIT_OLD
   as_fn_error $? "conditional \"USE_BOOST_SPIRIT_OLD_HDR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${WITH_LTTNG_TRUE}" && test -z "${WITH_LTTNG_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_LTTNG\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${WITH_BABELTRACE_TRUE}" && test -z "${WITH_BABELTRACE_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_BABELTRACE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${WITH_BUILD_TESTS_TRUE}" && test -z "${WITH_BUILD_TESTS_FALSE}"; then
   as_fn_error $? "conditional \"WITH_BUILD_TESTS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -23313,7 +22464,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ceph $as_me 0.87, which was
+This file was extended by ceph $as_me 0.80.8, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23379,7 +22530,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ceph config.status 0.87
+ceph config.status 0.80.8
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -23892,7 +23043,6 @@ do
     "src/ocf/ceph") CONFIG_FILES="$CONFIG_FILES src/ocf/ceph" ;;
     "src/ocf/rbd") CONFIG_FILES="$CONFIG_FILES src/ocf/rbd" ;;
     "src/java/Makefile") CONFIG_FILES="$CONFIG_FILES src/java/Makefile" ;;
-    "src/tracing/Makefile") CONFIG_FILES="$CONFIG_FILES src/tracing/Makefile" ;;
     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
     "ceph.spec") CONFIG_FILES="$CONFIG_FILES ceph.spec" ;;
 
diff --git a/configure.ac b/configure.ac
index 40b33e9..9b6448c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_PREREQ(2.59)
 # VERSION define is not used by the code.  It gets a version string
 # from 'git describe'; see src/ceph_ver.[ch]
 
-AC_INIT([ceph], [0.87], [ceph-devel at vger.kernel.org])
+AC_INIT([ceph], [0.80.8], [ceph-devel at vger.kernel.org])
 
 # Create release string.  Used with VERSION for RPMs.
 RPM_RELEASE=0
@@ -87,38 +87,15 @@ AM_CXXFLAGS="${AM_CXXFLAGS}"
 # Check for yasm
 if yasm -f elf64 src/common/crc32c_intel_fast_asm.S -o /dev/null; then
    echo 'we have a modern and working yasm'
-   if test `arch` = "x86_64" ; then
+   if test `arch` = "x86_64"; then
       echo 'we are x86_64'
-      arch_x32=0
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
-        #if defined(__x86_64__) && defined(__ILP32__)
-        #error x32
-        #endif]])], [], [arch_x32=1])
-      if test $arch_x32 -eq 0 ; then
-         echo 'we are not x32'
-         AC_DEFINE([HAVE_GOOD_YASM_ELF64], [1], [we have a recent yasm and are x86_64])
-         with_good_yasm=yes
-
-         if yasm -f elf64 -i src/ceph/src/ceph/src/erasure-code/isa/isa-l/include/ src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s -o /dev/null 2> /dev/null ; then
-            echo 'yasm can also build the isa-l stuff'
-            AC_DEFINE([HAVE_BETTER_YASM_ELF64], [1], [yasm can also build the isa-l])
-	    with_better_yasm=yes
-         else
-            echo "yasm doesn't build the isa-l stuff"
-	 fi
-      else
-         echo 'we are x32; no yasm for you'
-      fi
-   else
-      echo 'we are not x86_64 && !x32'
+      AC_DEFINE([HAVE_GOOD_YASM_ELF64], [1], [we have a recent yasm and are x86_64])
+      with_good_yasm=yes
    fi
 else
    echo 'we do not have a modern/working yasm'
 fi
 AM_CONDITIONAL(WITH_GOOD_YASM_ELF64, test "$with_good_yasm" = "yes")
-AM_CONDITIONAL(WITH_BETTER_YASM_ELF64, test "$with_better_yasm" = "yes")
-
-# check for better yasm
 
 # Checks for compiler warning types
 
@@ -157,19 +134,8 @@ ACX_PTHREAD
 
 AC_CHECK_LIB([uuid], [uuid_parse], [true], AC_MSG_FAILURE([libuuid not found]))
 
-# rbd {map,unmap,showmapped} dependencies, Linux only
 if test x"$linux" = x"yes"; then
-  # libblkid
-  AC_CHECK_HEADER([blkid/blkid.h], [],
-    AC_MSG_ERROR([blkid/blkid.h not found (libblkid-dev, libblkid-devel)]))
-  AC_CHECK_LIB([blkid], [blkid_devno_to_wholedisk], [true],
-    AC_MSG_FAILURE([libblkid not found]))
-
-  # libudev
-  AC_CHECK_HEADER([libudev.h], [],
-    AC_MSG_ERROR([libudev.h not found (libudev-dev, libudev-devel)]))
-  AC_CHECK_LIB([udev], [udev_monitor_receive_device], [true],
-    AC_MSG_FAILURE([libudev not found]))
+  AC_CHECK_LIB([blkid], [blkid_devno_to_wholedisk], [true], AC_MSG_FAILURE([libblkid not found]))
 fi
 
 #
@@ -540,47 +506,6 @@ AC_LANG_POP([C++])
 # Find supported SIMD / SSE extensions supported by the compiler
 AX_INTEL_FEATURES()
 
-# kinetic osd backend?
-AC_ARG_WITH([kinetic],
-            [AS_HELP_STRING([--with-kinetic], [build kinetic support])],
-            [],
-            [with_kinetic=no])
-# no pkg-config support yet
-#AS_IF([test "x$with_kinetic" = "xyes"],
-#            [PKG_CHECK_MODULES([KINETIC], [kinetic_client], [], [true])])
-AS_IF([test "x$with_kinetic" = "xyes"],
-            [AC_DEFINE([HAVE_KINETIC], [1], [Defined if you have kinetic enabled])])
-AM_CONDITIONAL(WITH_KINETIC, [ test "$with_kinetic" = "yes" ])
-
-# check for c++11 (but do not enable it)
-old_cxxflags="$CXXFLAGS"
-AX_CXX_COMPILE_STDCXX_11([], [optional])
-CXXFLAGS="$old_cxxflags"
-
-# use rocksdb
-AC_ARG_WITH([librocksdb],
-            [AS_HELP_STRING([--with-librocksdb], [build rocksdb support])],
-            [],
-            [with_librocksdb=no])
-AS_IF([test "x$with_librocksdb" = "xyes"],
-            [PKG_CHECK_MODULES([LIBROCKSDB], [rocksdb], [], [true])])
-AS_IF([test "x$with_librocksdb" = "xyes"],
-            [AC_DEFINE([HAVE_LIBROCKSDB], [1], [Defined if you have librocksdb enabled])])
-AM_CONDITIONAL(WITH_DLIBROCKSDB, [ test "$with_librocksdb" = "yes" ])
-
-AC_ARG_WITH([librocksdb-static],
-            [AS_HELP_STRING([--with-librocksdb-static], [build rocksdb support])],
-            [],
-            [with_librocksdb_static=no])
-AS_IF([test "x$with_librocksdb_static" = "xcheck" -a "x$HAVE_CXX11" = "x1" ],
-            [with_librocksdb_static="yes"])
-AS_IF([test "x$with_librocksdb_static" = "xyes"],
-            [AC_CONFIG_SUBDIRS([src/rocksdb])])
-AS_IF([test "x$with_librocksdb_static" = "xyes"],
-            [AC_DEFINE([HAVE_LIBROCKSDB], [1], [Defined if you have librocksdb enabled])])
-AM_CONDITIONAL(WITH_SLIBROCKSDB, [ test "x$with_librocksdb_static" = "xyes" ])
-AM_CONDITIONAL(WITH_LIBROCKSDB, [ test "x$with_librocksdb_static" = "xyes" -o "x$with_librocksdb" = "xyes" ])
-
 # use system libs3?
 AC_ARG_WITH([system-libs3],
 	[AS_HELP_STRING([--with-system-libs3], [use system libs3])],
@@ -678,15 +603,9 @@ AC_CHECK_LIB(boost_system-mt, main, [],
         AC_MSG_NOTICE(["Boost system library not found."]))])
 
 # Find the right boost_thread library.
-BOOST_THREAD_LIBS=""
-saved_LIBS="${LIBS}"
-LIBS=""
 AC_CHECK_LIB(boost_thread-mt, main, [],
     [AC_CHECK_LIB(boost_thread, main, [],
         AC_MSG_FAILURE(["Boost thread library not found."]))])
-BOOST_THREAD_LIBS="${LIBS}"
-LIBS="${saved_LIBS}"
-AC_SUBST(BOOST_THREAD_LIBS)
 
 #
 # Check for boost_program_options library (defines BOOST_PROGRAM_OPTIONS_LIBS).
@@ -812,97 +731,6 @@ AC_CHECK_HEADERS([linux/types.h])
 AC_CHECK_TYPES([__u8, __s8, __u16, __s16, __u32, __s32, __u64, __s64, __le16,
   __be16, __le32, __be32, __le64, __be64], [], [], [[#include <linux/types.h>]])
 
-
-dnl Old versions of lttng-gen-tp leave out includes, and they break our stuff.
-AC_MSG_CHECKING([if lttng-gen-tp is sane])
-lttng_gen_tp_dir=`mktemp -d`
-echo "#include <foo-inc.h>" > "$lttng_gen_tp_dir/foo.tp"
-if ( ( cd "$lttng_gen_tp_dir" && lttng-gen-tp foo.tp -o foo.h && grep "#include <foo-inc.h>" foo.h ) > /dev/null 2>&1 ) ; then
-  have_good_lttng_gen_tp=yes
-else
-  have_good_lttng_gen_tp=no
-fi
-rm -rf "$lttng_gen_tp_dir"
-AC_MSG_RESULT([$have_good_lttng_gen_tp])
-
-AC_ARG_WITH([lttng],
-	[AS_HELP_STRING([--with-lttng], [Trace with LTTng])])
-AS_IF([test "x$with_lttng" = "xno"], [use_lttng=no],
-      [test "x$with_lttng" = "xyes"], [use_lttng=yes],
-      [test "x$have_good_lttng_gen_tp" = "xyes"], [use_lttng=yes; AC_MSG_NOTICE([lttng auto-enabled])],
-      [use_lttng=no; AC_MSG_NOTICE([lttng auto-disabled])])
-AM_CONDITIONAL([WITH_LTTNG], test x"$use_lttng" = x"yes")
-AM_COND_IF([WITH_LTTNG], [
-  AC_DEFINE([WITH_LTTNG], [1], [Define if you want to use LTTng])
-
-  AC_CHECK_HEADER([lttng/tracepoint.h], [],
-    AC_MSG_ERROR([lttng/tracepoint.h not found (liblttng-ust-dev, lttng-ust-devel)]))
-
-  AC_CHECK_PROG([LTTNG_GEN_TP_CHECK], [lttng-gen-tp], [yes])
-  if test x"$LTTNG_GEN_TP_CHECK" != "xyes"; then
-      AC_MSG_FAILURE([lttng-gen-tp not found])
-  fi
-  AC_SUBST([LTTNG_GEN_TP_PROG], [lttng-gen-tp])
-
-  if test x"$have_good_lttng_gen_tp" != "xyes"; then
-      AC_MSG_FAILURE([lttng-gen-tp does not behave properly])
-  fi
-
-  AC_MSG_CHECKING([if time_t is an integer])
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[
-      struct {
-          unsigned int time_t_is_integer: ((time_t) 1.5 == 1) ? 1 : -1;
-      } x;
-      return 0;
-  ]])], [
-     AC_MSG_RESULT([yes])
-  ], [
-     AC_MSG_RESULT([no])
-     AC_MSG_FAILURE([time_t is not an integer.  We assume this for tracing.])
-  ])
-
-  AC_MSG_CHECKING([if time_t fits in uint64_t])
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
-  #include <inttypes.h>]], [[
-      struct {
-          unsigned int time_t_fits_in_uin64_t: (sizeof(time_t) <= sizeof(uint64_t)) ? 1 : -1;
-      } x;
-      return 0;
-  ]])], [
-     AC_MSG_RESULT([yes])
-  ], [
-     AC_MSG_RESULT([no])
-     AC_MSG_FAILURE([time_t is larger than uint64_t.  We assume it can be cast to uint64_t, for tracing.])
-  ])
-], [
-  AC_DEFINE([tracepoint(...)], [], [LTTng is disabled, so define this macro to be nothing.])
-])
-
-
-AC_CHECK_HEADERS([babeltrace/ctf/events.h babeltrace/babeltrace.h])
-AC_CHECK_DECL([BT_CLOCK_REAL],
-              [have_good_babeltrace=yes],
-              [have_good_babeltrace=no],
-              [[#include <babeltrace/babeltrace.h>]])
-AC_ARG_WITH([babeltrace],
-	[AS_HELP_STRING([--with-babeltrace], [Enable Babeltrace])])
-AS_IF([test "x$with_babeltrace" = "xno"], [use_babeltrace=no],
-      [test "x$with_babeltrace" = "xyes"], [use_babeltrace=yes],
-      [test "x$ac_cv_header_babeltrace_ctf_events_h$ac_cv_header_babeltrace_babeltrace_h$have_good_babeltrace" = "xyesyesyes"], [use_babeltrace=yes; AC_MSG_NOTICE([babeltrace auto-enabled])],
-      [use_babeltrace=no; AC_MSG_NOTICE([babeltrace auto-disabled])])
-AM_CONDITIONAL([WITH_BABELTRACE], test x"$use_babeltrace" = x"yes")
-AM_COND_IF([WITH_BABELTRACE], [
-  AC_DEFINE([WITH_BABELTRACE], [1], [Define if you want to use Babeltrace])
-
-  AC_CHECK_HEADER([babeltrace/babeltrace.h], [],
-    AC_MSG_ERROR([babeltrace/babeltrac.h not found (libbabeltrace-dev, libbabeltrace-devel)]))
-
-  AC_CHECK_HEADER([babeltrace/ctf/events.h], [],
-    AC_MSG_ERROR([babeltrace/ctf/events.h not found (libbabeltrace-ctf-dev, libbabeltrace-devel)]))
-])
-
-
-
 # Checks for typedefs, structures, and compiler characteristics.
 #AC_HEADER_STDBOOL
 #AC_C_CONST
@@ -962,7 +790,6 @@ AC_CONFIG_FILES([Makefile
 	src/ocf/ceph
 	src/ocf/rbd
 	src/java/Makefile
-	src/tracing/Makefile
 	man/Makefile
 	ceph.spec])
 AC_OUTPUT
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4
deleted file mode 100644
index 163a4c6..0000000
--- a/m4/ax_cxx_compile_stdcxx_11.m4
+++ /dev/null
@@ -1,142 +0,0 @@
-# ============================================================================
-#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-#   AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
-#
-# DESCRIPTION
-#
-#   Check for baseline language coverage in the compiler for the C++11
-#   standard; if necessary, add switches to CXXFLAGS to enable support.
-#
-#   The first argument, if specified, indicates whether you insist on an
-#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
-#   -std=c++11).  If neither is specified, you get whatever works, with
-#   preference for an extended mode.
-#
-#   The second argument, if specified 'mandatory' or if left unspecified,
-#   indicates that baseline C++11 support is required and that the macro
-#   should error out if no mode with that support is found.  If specified
-#   'optional', then configuration proceeds regardless, after defining
-#   HAVE_CXX11 if and only if a supporting mode is found.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Benjamin Kosnik <bkoz at redhat.com>
-#   Copyright (c) 2012 Zack Weinberg <zackw at panix.com>
-#   Copyright (c) 2013 Roy Stogner <roystgnr at ices.utexas.edu>
-#   Copyright (c) 2014 Alexey Sokolov <sokolov at google.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 4
-
-m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    struct Base {
-    virtual void f() {}
-    };
-    struct Child : public Base {
-    virtual void f() override {}
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
-
-    auto d = a;
-    auto l = [](){};
-]])
-
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
-  m4_if([$1], [], [],
-        [$1], [ext], [],
-        [$1], [noext], [],
-        [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
-  m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
-        [$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
-        [$2], [optional], [ax_cxx_compile_cxx11_required=false],
-        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])
-  AC_LANG_PUSH([C++])dnl
-  ac_success=no
-  AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
-  ax_cv_cxx_compile_cxx11,
-  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
-    [ax_cv_cxx_compile_cxx11=yes],
-    [ax_cv_cxx_compile_cxx11=no])])
-  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
-    ac_success=yes
-  fi
-
-  m4_if([$1], [noext], [], [dnl
-  if test x$ac_success = xno; then
-    for switch in -std=gnu++11 -std=gnu++0x; do
-      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
-      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
-                     $cachevar,
-        [ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
-         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
-          [eval $cachevar=yes],
-          [eval $cachevar=no])
-         CXXFLAGS="$ac_save_CXXFLAGS"])
-      if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
-        ac_success=yes
-        break
-      fi
-    done
-  fi])
-
-  m4_if([$1], [ext], [], [dnl
-  if test x$ac_success = xno; then
-    for switch in -std=c++11 -std=c++0x; do
-      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
-      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
-                     $cachevar,
-        [ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
-         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
-          [eval $cachevar=yes],
-          [eval $cachevar=no])
-         CXXFLAGS="$ac_save_CXXFLAGS"])
-      if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
-        ac_success=yes
-        break
-      fi
-    done
-  fi])
-  AC_LANG_POP([C++])
-  if test x$ax_cxx_compile_cxx11_required = xtrue; then
-    if test x$ac_success = xno; then
-      AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
-    fi
-  else
-    if test x$ac_success = xno; then
-      HAVE_CXX11=0
-      AC_MSG_NOTICE([No compiler with C++11 support was found])
-    else
-      HAVE_CXX11=1
-      AC_DEFINE(HAVE_CXX11,1,
-                [define if the compiler supports basic C++11 syntax])
-    fi
-
-    AC_SUBST(HAVE_CXX11)
-  fi
-])
diff --git a/man/Makefile.am b/man/Makefile.am
index 4dc71cc..be071b1 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -4,6 +4,7 @@ dist_man_MANS = \
 	ceph-osd.8 \
 	ceph-mds.8 \
 	ceph-mon.8 \
+	mkcephfs.8 \
 	ceph-fuse.8 \
 	ceph-syn.8 \
 	crushtool.8 \
@@ -26,6 +27,4 @@ dist_man_MANS = \
 	ceph-rest-api.8 \
 	ceph-rbdnamer.8 \
 	ceph-post-file.8 \
-	rbd-fuse.8 \
-	rbd-replay.8 \
-	rbd-replay-prep.8
+	rbd-fuse.8
diff --git a/man/Makefile.in b/man/Makefile.in
index ae24489..e573231 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -47,7 +47,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
 	$(top_srcdir)/m4/ax_c_pretty_func.m4 \
 	$(top_srcdir)/m4/ax_c_var_func.m4 \
 	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
-	$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
 	$(top_srcdir)/m4/ax_cxx_static_cast.m4 \
 	$(top_srcdir)/m4/ax_intel.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -109,7 +108,6 @@ AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@
 CC = @CC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
@@ -142,7 +140,6 @@ FGREP = @FGREP@
 GCOV_PREFIX_STRIP = @GCOV_PREFIX_STRIP@
 GIT_CHECK = @GIT_CHECK@
 GREP = @GREP@
-HAVE_CXX11 = @HAVE_CXX11@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -167,8 +164,6 @@ LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
 LIBEDIT_LIBS = @LIBEDIT_LIBS@
 LIBFUSE = @LIBFUSE@
 LIBOBJS = @LIBOBJS@
-LIBROCKSDB_CFLAGS = @LIBROCKSDB_CFLAGS@
-LIBROCKSDB_LIBS = @LIBROCKSDB_LIBS@
 LIBS = @LIBS@
 LIBTCMALLOC = @LIBTCMALLOC@
 LIBTOOL = @LIBTOOL@
@@ -177,8 +172,6 @@ LIBZFS_LIBS = @LIBZFS_LIBS@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LTTNG_GEN_TP_CHECK = @LTTNG_GEN_TP_CHECK@
-LTTNG_GEN_TP_PROG = @LTTNG_GEN_TP_PROG@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -287,6 +280,7 @@ dist_man_MANS = \
 	ceph-osd.8 \
 	ceph-mds.8 \
 	ceph-mon.8 \
+	mkcephfs.8 \
 	ceph-fuse.8 \
 	ceph-syn.8 \
 	crushtool.8 \
@@ -309,9 +303,7 @@ dist_man_MANS = \
 	ceph-rest-api.8 \
 	ceph-rbdnamer.8 \
 	ceph-post-file.8 \
-	rbd-fuse.8 \
-	rbd-replay.8 \
-	rbd-replay-prep.8
+	rbd-fuse.8
 
 all: all-am
 
diff --git a/man/mkcephfs.8 b/man/mkcephfs.8
new file mode 100644
index 0000000..0341f49
--- /dev/null
+++ b/man/mkcephfs.8
@@ -0,0 +1,164 @@
+.TH "MKCEPHFS" "8" "April 29, 2013" "dev" "Ceph"
+.SH NAME
+mkcephfs \- create a ceph file system
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.nf
+\fBmkcephfs\fP \-c \fIceph.conf\fP [ \-\-mkfs ] [ \-a, \-\-all\-hosts [ \-k
+\fI/path/to/admin.keyring\fP ] ]
+.fi
+.sp
+.SH DESCRIPTION
+.sp
+\fBmkcephfs\fP is used to create an empty Ceph file system, possibly
+spanning multiple hosts. The ceph.conf file describes the composition
+of the entire Ceph cluster, including which hosts are participating,
+which daemons run where, and which paths are used to store file system
+data or metadata.
+.sp
+The mkcephfs tool can be used in two ways. If \-a is used, it will use
+ssh and scp to connect to remote hosts on your behalf and do the setup
+of the entire cluster. This is the easiest solution, but can also be
+inconvenient (if you don\(aqt have ssh to connect without prompting for
+passwords) or slow (if you have a large cluster).
+.sp
+Alternatively, you can run each setup phase manually. First, you need
+to prepare a monmap that will be shared by each node:
+.sp
+.nf
+.ft C
+# prepare
+master# mkdir /tmp/foo
+master# mkcephfs \-c /etc/ceph/ceph.conf \e
+  \-\-prepare\-monmap \-d /tmp/foo
+.ft P
+.fi
+.sp
+Share the \fB/tmp/foo\fP directory with other nodes in whatever way is
+convenient for you. On each OSD and MDS node:
+.sp
+.nf
+.ft C
+osdnode# mkcephfs \-\-init\-local\-daemons osd \-d /tmp/foo
+mdsnode# mkcephfs \-\-init\-local\-daemons mds \-d /tmp/foo
+.ft P
+.fi
+.sp
+Collect the contents of the /tmp/foo directories back onto a single
+node, and then:
+.sp
+.nf
+.ft C
+master# mkcephfs \-\-prepare\-mon \-d /tmp/foo
+.ft P
+.fi
+.sp
+Finally, distribute \fB/tmp/foo\fP to all monitor nodes and, on each of
+those nodes:
+.sp
+.nf
+.ft C
+monnode# mkcephfs \-\-init\-local\-daemons mon \-d /tmp/foo
+.ft P
+.fi
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-a, \-\-allhosts
+Performs the necessary initialization steps on all hosts in the
+cluster, executing commands via SSH.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-c ceph.conf, \-\-conf=ceph.conf
+Use the given conf file instead of the default \fB/etc/ceph/ceph.conf\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-k /path/to/keyring
+When \fB\-a\fP is used, we can specify a location to copy the
+client.admin keyring, which is used to administer the cluster. The
+default is \fB/etc/ceph/keyring\fP (or whatever is specified in the
+config file).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-mkfs
+Create and mount the file systems specified in the ceph.conf for
+OSD data storage using mkfs.$type. The \fBdevs\fP option in ceph.conf
+must specify the device(s) and the \fBosd mkfs type\fP option must
+specify the file system type (normally one of btrfs, xfs, or ext4).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-no\-copy\-conf
+By default, mkcephfs with \-a will copy the new configuration to
+/etc/ceph/ceph.conf on each node in the cluster.  This option
+disables that behavior.
+.UNINDENT
+.SH SUBCOMMANDS
+.sp
+The sub\-commands performed during cluster setup can be run individually with
+.INDENT 0.0
+.TP
+.B \-\-prepare\-monmap \-d dir \-c ceph.conf
+Create an initial monmap with a random fsid/uuid and store it and
+the ceph.conf in dir.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-init\-local\-daemons type \-d dir
+Initialize any daemons of type type on the local host using the
+monmap in dir.  For types osd and mds, the resulting authentication
+keys will be placed in dir.  For type mon, the initial data files
+generated by \-\-prepare\-mon (below) are expected in dir.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-prepare\-mon \-d dir
+Prepare the initial monitor data based on the monmap, OSD, and MDS
+authentication keys collected in dir, and put the result in dir.
+.UNINDENT
+.SH AVAILABILITY
+.sp
+\fBmkcephfs\fP is part of the Ceph distributed file system. Please refer
+to the Ceph documentation at \fI\%http://ceph.com/docs\fP for more
+information.
+.SH SEE ALSO
+.sp
+\fBceph\fP(8),
+\fBmonmaptool\fP(8),
+\fBosdmaptool\fP(8),
+\fBcrushtool\fP(8)
+.SH COPYRIGHT
+2010-2013, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
+.\" Generated by docutils manpage writer.
+.
diff --git a/man/rados.8 b/man/rados.8
index eea4357..0b9881f 100644
--- a/man/rados.8
+++ b/man/rados.8
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "RADOS" "8" "May 29, 2014" "dev" "Ceph"
+.TH "RADOS" "8" "January 12, 2014" "dev" "Ceph"
 .SH NAME
 rados \- rados object storage utility
 .
@@ -148,16 +148,9 @@ Create pool snapshot named \fIfoo\fP\&.
 Remove pool snapshot named \fIfoo\fP\&.
 .TP
 .B \fBbench\fP \fIseconds\fP \fImode\fP [ \-b \fIobjsize\fP ] [ \-t \fIthreads\fP ]
-Benchmark for \fIseconds\fP\&. The mode can be \fIwrite\fP, \fIseq\fP, or
-\fIrand\fP\&. \fIseq\fP and \fIrand\fP are read benchmarks, either
-sequential or random. Before running one of the reading benchmarks,
-run a write benchmark with the \fI\-\-no\-cleanup\fP option. The default
+Benchmark for seconds. The mode can be write or read. The default
 object size is 4 MB, and the default number of simulated threads
 (parallel writes) is 16.
-.UNINDENT
-.sp
-\fBcleanup\fP
-.INDENT 0.0
 .TP
 .B \fBlistomapkeys\fP \fIname\fP
 List all the keys stored in the object map of object name.
diff --git a/man/rbd-replay-prep.8 b/man/rbd-replay-prep.8
deleted file mode 100644
index 707fe73..0000000
--- a/man/rbd-replay-prep.8
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Man page generated from reStructuredText.
-.
-.TH "RBD-REPLAY-PREP" "8" "August 11, 2014" "dev" "Ceph"
-.SH NAME
-rbd-replay-prep \- prepare captured rados block device (RBD) workloads for replay
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.SH SYNOPSIS
-.nf
-\fBrbd\-replay\-prep\fP [ \-\-window \fIseconds\fP ] \fItrace_dir\fP \fIreplay_file\fP
-.fi
-.sp
-.SH DESCRIPTION
-.sp
-\fBrbd\-replay\-prep\fP processes raw rados block device (RBD) traces to prepare them for \fBrbd\-replay\fP\&.
-.SH OPTIONS
-.INDENT 0.0
-.TP
-.B \-\-window seconds
-Requests further apart than \(aqseconds\(aq seconds are assumed to be independent.
-.UNINDENT
-.SH EXAMPLES
-.sp
-To prepare workload1\-trace for replay:
-.INDENT 0.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
-rbd\-replay\-prep workload1\-trace/ust/uid/1000/64\-bit workload1
-.ft P
-.fi
-.UNINDENT
-.UNINDENT
-.SH AVAILABILITY
-.sp
-\fBrbd\-replay\-prep\fP is part of the Ceph distributed storage system. Please refer to
-the Ceph documentation at \fI\%http://ceph.com/docs\fP for more information.
-.SH SEE ALSO
-.sp
-\fBrbd\-replay\fP(8),
-\fBrbd\fP(8)
-.SH COPYRIGHT
-2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
-.\" Generated by docutils manpage writer.
-.
diff --git a/man/rbd-replay.8 b/man/rbd-replay.8
deleted file mode 100644
index 87cde13..0000000
--- a/man/rbd-replay.8
+++ /dev/null
@@ -1,132 +0,0 @@
-.\" Man page generated from reStructuredText.
-.
-.TH "RBD-REPLAY" "8" "August 07, 2014" "dev" "Ceph"
-.SH NAME
-rbd-replay \- replay rados block device (RBD) workloads
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.SH SYNOPSIS
-.nf
-\fBrbd\-replay\fP [ \fIoptions\fP ] \fIreplay_file\fP
-.fi
-.sp
-.SH DESCRIPTION
-.sp
-\fBrbd\-replay\fP is a utility for replaying rados block device (RBD) workloads.
-.SH OPTIONS
-.INDENT 0.0
-.TP
-.B \-c ceph.conf, \-\-conf ceph.conf
-Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to
-determine monitor addresses during startup.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-p pool, \-\-pool pool
-Interact with the given pool.  Defaults to \(aqrbd\(aq.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-latency\-multiplier
-Multiplies inter\-request latencies.  Default: 1.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-read\-only
-Only replay non\-destructive requests.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-map\-image rule
-Add a rule to map image names in the trace to image names in the replay cluster.
-A rule of image1 at snap1=image2 at snap2 would map snap1 of image1 to snap2 of image2.
-.UNINDENT
-.SH EXAMPLES
-.sp
-To replay workload1 as fast as possible:
-.INDENT 0.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
-rbd\-replay \-\-latency\-multiplier=0 workload1
-.ft P
-.fi
-.UNINDENT
-.UNINDENT
-.sp
-To replay workload1 but use test_image instead of prod_image:
-.INDENT 0.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
-rbd\-replay \-\-map\-image=prod_image=test_image workload1
-.ft P
-.fi
-.UNINDENT
-.UNINDENT
-.SH AVAILABILITY
-.sp
-\fBrbd\-replay\fP is part of the Ceph distributed storage system. Please refer to
-the Ceph documentation at \fI\%http://ceph.com/docs\fP for more information.
-.SH SEE ALSO
-.sp
-\fBceph\fP(8),
-\fBrbd\fP(8)
-.SH COPYRIGHT
-2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
-.\" Generated by docutils manpage writer.
-.
diff --git a/man/rbd.8 b/man/rbd.8
index ce457bd..1bec65d 100644
--- a/man/rbd.8
+++ b/man/rbd.8
@@ -105,7 +105,7 @@ understood by all versions of librbd and the kernel rbd module, but
 does not support newer features like cloning.
 .IP \(bu 2
 format 2 \- Use the second rbd format, which is supported by
-librbd and kernel since version 3.11 (except for striping). This adds
+librbd (but not the kernel rbd module) at this time. This adds
 support for cloning and is more easily extensible to allow more
 features in the future.
 .UNINDENT
diff --git a/src/.git_version b/src/.git_version
index e8d6e73..178a99e 100644
--- a/src/.git_version
+++ b/src/.git_version
@@ -1,2 +1,2 @@
-c51c8f9d80fa4e0168aa52685b8de40e42758578
-v0.87
+69eaad7f8308f21573c604f121956e64679a52a7
+v0.80.8
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
index f2ab655..d62247b 100644
--- a/src/Makefile-env.am
+++ b/src/Makefile-env.am
@@ -131,7 +131,6 @@ endif # PROFILER
 
 LIBGLOBAL = libglobal.la
 LIBCOMMON = libcommon.la
-LIBSECRET = libsecret.la
 LIBARCH = libarch.la
 LIBPERFGLUE = libperfglue.la
 LIBAUTH = libauth.la
@@ -150,16 +149,10 @@ LIBMDS = libmds.la
 LIBCLIENT = libclient.la
 LIBCLIENT_FUSE = libclient_fuse.la
 LIBRADOS = librados.la
-LIBRADOSSTRIPER = libradosstriper.la
 LIBRGW = librgw.la
 LIBRBD = librbd.la
-LIBKRBD = libkrbd.la
 LIBCEPHFS = libcephfs.la
 LIBERASURE_CODE = liberasure_code.la
-LIBOSD_TP = tracing/libosd_tp.la
-LIBRADOS_TP = tracing/librados_tp.la
-LIBRBD_TP = tracing/librbd_tp.la
-LIBOS_TP = tracing/libos_tp.la
 
 if WITH_LIBAIO
 LIBOS += -laio
@@ -169,10 +162,6 @@ if WITH_LIBZFS
 LIBOS += libos_zfs.a -lzfs
 endif # WITH_LIBZFS
 
-if WITH_LIBROCKSDB
-LIBOS += libos_rocksdb.la
-endif # WITH_LIBROCKSDB
-
 if WITH_TCMALLOC
 LIBPERFGLUE += -ltcmalloc
 endif # WITH_TCMALLOC
diff --git a/src/Makefile.am b/src/Makefile.am
index b954f3f..9c394e8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,7 @@
 include Makefile-env.am
 
-SUBDIRS += ocf java tracing
-DIST_SUBDIRS += gtest ocf libs3 java tracing
-
+SUBDIRS += ocf java
+DIST_SUBDIRS += gtest ocf libs3 java
 
 
 # subdirs
@@ -27,12 +26,10 @@ include msg/Makefile.am
 include messages/Makefile.am
 include include/Makefile.am
 include librados/Makefile.am
-include libradosstriper/Makefile.am
 include librbd/Makefile.am
 include rgw/Makefile.am
 include cls/Makefile.am
 include key_value_store/Makefile.am
-include rbd_replay/Makefile.am
 include test/Makefile.am
 include tools/Makefile.am
 
@@ -57,8 +54,8 @@ bin_PROGRAMS += ceph-mds
 
 # user tools
 
-mount_ceph_SOURCES = mount/mount.ceph.c
-mount_ceph_LDADD = $(LIBSECRET) $(LIBCOMMON)
+mount_ceph_SOURCES = mount/mount.ceph.c common/secret.c
+mount_ceph_LDADD = $(LIBCOMMON) $(KEYUTILS_LIB)
 if LINUX
 su_sbin_PROGRAMS += mount.ceph
 endif # LINUX
@@ -77,20 +74,14 @@ ceph_syn_SOURCES += client/SyntheticClient.cc # uses g_conf.. needs cleanup
 ceph_syn_LDADD = $(LIBCLIENT) $(CEPH_GLOBAL)
 bin_PROGRAMS += ceph-syn
 
-
-libkrbd_la_SOURCES = krbd.cc
-libkrbd_la_LIBADD = $(LIBSECRET) -lblkid -ludev
-if LINUX
-noinst_LTLIBRARIES += libkrbd.la
-endif LINUX
-
-rbd_SOURCES = rbd.cc
-rbd_LDADD = $(LIBKRBD) $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL)
+rbd_SOURCES = rbd.cc common/secret.c
+rbd_LDADD = $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL) -lblkid $(KEYUTILS_LIB)
 if LINUX
 bin_PROGRAMS += rbd
 endif #LINUX
 
 
+
 # Fuse targets
 
 if WITH_FUSE
@@ -156,7 +147,6 @@ EXTRA_DIST += \
 	$(srcdir)/vstart.sh \
 	$(srcdir)/stop.sh \
 	ceph-run \
-	$(srcdir)/ceph-osd-prestart.sh \
 	$(srcdir)/ceph_common.sh \
 	$(srcdir)/init-radosgw \
 	$(srcdir)/init-radosgw.sysv \
@@ -167,6 +157,7 @@ EXTRA_DIST += \
 	$(srcdir)/.git_version \
 	$(srcdir)/ceph-rbdnamer \
 	$(srcdir)/test/encoding/readable.sh \
+	$(srcdir)/test/encoding/check-generated.sh \
 	$(srcdir)/upstart/ceph-all.conf \
 	$(srcdir)/upstart/ceph-mon.conf \
 	$(srcdir)/upstart/ceph-mon-all.conf \
@@ -192,6 +183,7 @@ EXTRA_DIST += \
 	ceph-crush-location \
 	mount.fuse.ceph \
 	rbdmap \
+	unittest_bufferlist.sh \
 	yasm-wrapper
 
 EXTRA_DIST += \
@@ -214,380 +206,6 @@ EXTRA_DIST += \
 	libs3/test \
 	unittest_bufferlist.sh
 
-if WITH_SLIBROCKSDB
-  SUBDIRS += rocksdb
-else
-  EXTRA_DIST += \
-        rocksdb/.arcconfig \
-        rocksdb/.clang-format \
-        rocksdb/.gitignore \
-        rocksdb/CONTRIBUTING.md \
-        rocksdb/HISTORY.md \
-        rocksdb/INSTALL.md \
-        rocksdb/LICENSE \
-        rocksdb/Makefile.am \
-        rocksdb/PATENTS \
-        rocksdb/README \
-        rocksdb/ROCKSDB_LITE.md \
-        rocksdb/build_tools/build_detect_platform \
-        rocksdb/build_tools/build_detect_version \
-        rocksdb/build_tools/fbcode.clang31.sh \
-        rocksdb/build_tools/fbcode.gcc471.sh \
-        rocksdb/build_tools/fbcode.gcc481.sh \
-        rocksdb/build_tools/format-diff.sh \
-        rocksdb/build_tools/mac-install-gflags.sh \
-        rocksdb/build_tools/make_new_version.sh \
-        rocksdb/build_tools/regression_build_test.sh \
-        rocksdb/build_tools/valgrind_test.sh \
-        rocksdb/configure.ac \
-        rocksdb/coverage/coverage_test.sh \
-        rocksdb/coverage/parse_gcov_output.py \
-        rocksdb/db/builder.cc \
-        rocksdb/db/builder.h \
-        rocksdb/db/c.cc \
-        rocksdb/db/c_test.c \
-        rocksdb/db/column_family.cc \
-        rocksdb/db/column_family.h \
-        rocksdb/db/column_family_test.cc \
-        rocksdb/db/compaction.cc \
-        rocksdb/db/compaction.h \
-        rocksdb/db/compaction_picker.cc \
-        rocksdb/db/compaction_picker.h \
-        rocksdb/db/corruption_test.cc \
-        rocksdb/db/db_bench.cc \
-        rocksdb/db/db_filesnapshot.cc \
-        rocksdb/db/db_impl.cc \
-        rocksdb/db/db_impl.h \
-        rocksdb/db/db_impl_debug.cc \
-        rocksdb/db/db_impl_readonly.cc \
-        rocksdb/db/db_impl_readonly.h \
-        rocksdb/db/db_iter.cc \
-        rocksdb/db/db_iter.h \
-        rocksdb/db/db_stats_logger.cc \
-        rocksdb/db/db_test.cc \
-        rocksdb/db/dbformat.cc \
-        rocksdb/db/dbformat.h \
-        rocksdb/db/dbformat_test.cc \
-        rocksdb/db/deletefile_test.cc \
-        rocksdb/db/file_indexer.cc \
-        rocksdb/db/file_indexer.h \
-        rocksdb/db/file_indexer_test.cc \
-        rocksdb/db/filename.cc \
-        rocksdb/db/filename.h \
-        rocksdb/db/filename_test.cc \
-        rocksdb/db/internal_stats.cc \
-        rocksdb/db/internal_stats.h \
-        rocksdb/db/log_and_apply_bench.cc \
-        rocksdb/db/log_format.h \
-        rocksdb/db/log_reader.cc \
-        rocksdb/db/log_reader.h \
-        rocksdb/db/log_test.cc \
-        rocksdb/db/log_writer.cc \
-        rocksdb/db/log_writer.h \
-        rocksdb/db/memtable.cc \
-        rocksdb/db/memtable.h \
-        rocksdb/db/memtable_list.cc \
-        rocksdb/db/memtable_list.h \
-        rocksdb/db/merge_context.h \
-        rocksdb/db/merge_helper.cc \
-        rocksdb/db/merge_helper.h \
-        rocksdb/db/merge_operator.cc \
-        rocksdb/db/merge_test.cc \
-        rocksdb/db/perf_context_test.cc \
-        rocksdb/db/plain_table_db_test.cc \
-        rocksdb/db/prefix_test.cc \
-        rocksdb/db/repair.cc \
-        rocksdb/db/simple_table_db_test.cc \
-        rocksdb/db/skiplist.h \
-        rocksdb/db/skiplist_test.cc \
-        rocksdb/db/snapshot.h \
-        rocksdb/db/table_cache.cc \
-        rocksdb/db/table_cache.h \
-        rocksdb/db/table_properties_collector.cc \
-        rocksdb/db/table_properties_collector.h \
-        rocksdb/db/table_properties_collector_test.cc \
-        rocksdb/db/tailing_iter.cc \
-        rocksdb/db/tailing_iter.h \
-        rocksdb/db/transaction_log_impl.cc \
-        rocksdb/db/transaction_log_impl.h \
-        rocksdb/db/version_edit.cc \
-        rocksdb/db/version_edit.h \
-        rocksdb/db/version_edit_test.cc \
-        rocksdb/db/version_set.cc \
-        rocksdb/db/version_set.h \
-        rocksdb/db/version_set_test.cc \
-        rocksdb/db/write_batch.cc \
-        rocksdb/db/write_batch_internal.h \
-        rocksdb/db/write_batch_test.cc \
-        rocksdb/doc/doc.css \
-        rocksdb/doc/index.html \
-        rocksdb/doc/log_format.txt \
-        rocksdb/doc/rockslogo.jpg \
-        rocksdb/doc/rockslogo.png \
-        rocksdb/hdfs/README \
-        rocksdb/hdfs/env_hdfs.h \
-        rocksdb/hdfs/hdfs.h \
-        rocksdb/hdfs/libhdfs.a \
-        rocksdb/helpers/memenv/memenv.cc \
-        rocksdb/helpers/memenv/memenv_test.cc \
-        rocksdb/include/rocksdb/c.h \
-        rocksdb/include/rocksdb/cache.h \
-        rocksdb/include/rocksdb/compaction_filter.h \
-        rocksdb/include/rocksdb/comparator.h \
-        rocksdb/include/rocksdb/db.h \
-        rocksdb/include/rocksdb/env.h \
-        rocksdb/include/rocksdb/filter_policy.h \
-        rocksdb/include/rocksdb/flush_block_policy.h \
-        rocksdb/include/rocksdb/iterator.h \
-        rocksdb/include/rocksdb/ldb_tool.h \
-        rocksdb/include/rocksdb/memtablerep.h \
-        rocksdb/include/rocksdb/merge_operator.h \
-        rocksdb/include/rocksdb/options.h \
-        rocksdb/include/rocksdb/perf_context.h \
-        rocksdb/include/rocksdb/slice.h \
-        rocksdb/include/rocksdb/slice_transform.h \
-        rocksdb/include/rocksdb/statistics.h \
-        rocksdb/include/rocksdb/status.h \
-        rocksdb/include/rocksdb/table.h \
-        rocksdb/include/rocksdb/table_properties.h \
-        rocksdb/include/rocksdb/transaction_log.h \
-        rocksdb/include/rocksdb/types.h \
-        rocksdb/include/rocksdb/universal_compaction.h \
-        rocksdb/include/rocksdb/version.h \
-        rocksdb/include/rocksdb/write_batch.h \
-        rocksdb/include/utilities/backupable_db.h \
-        rocksdb/include/utilities/db_ttl.h \
-        rocksdb/include/utilities/geo_db.h \
-        rocksdb/include/utilities/stackable_db.h \
-        rocksdb/include/utilities/utility_db.h \
-        rocksdb/java/Makefile \
-        rocksdb/java/RocksDBSample.java \
-        rocksdb/java/jdb_bench.sh \
-        rocksdb/java/org/rocksdb/BackupableDB.java \
-        rocksdb/java/org/rocksdb/BackupableDBOptions.java \
-        rocksdb/java/org/rocksdb/BloomFilter.java \
-        rocksdb/java/org/rocksdb/Filter.java \
-        rocksdb/java/org/rocksdb/HashLinkedListMemTableConfig.java \
-        rocksdb/java/org/rocksdb/HashSkipListMemTableConfig.java \
-        rocksdb/java/org/rocksdb/HistogramData.java \
-        rocksdb/java/org/rocksdb/HistogramType.java \
-        rocksdb/java/org/rocksdb/Iterator.java \
-        rocksdb/java/org/rocksdb/MemTableConfig.java \
-        rocksdb/java/org/rocksdb/Options.java \
-        rocksdb/java/org/rocksdb/PlainTableConfig.java \
-        rocksdb/java/org/rocksdb/ReadOptions.java \
-        rocksdb/java/org/rocksdb/RocksDB.java \
-        rocksdb/java/org/rocksdb/RocksDBException.java \
-        rocksdb/java/org/rocksdb/RocksObject.java \
-        rocksdb/java/org/rocksdb/SkipListMemTableConfig.java \
-        rocksdb/java/org/rocksdb/Statistics.java \
-        rocksdb/java/org/rocksdb/TableFormatConfig.java \
-        rocksdb/java/org/rocksdb/TickerType.java \
-        rocksdb/java/org/rocksdb/VectorMemTableConfig.java \
-        rocksdb/java/org/rocksdb/WriteBatch.java \
-        rocksdb/java/org/rocksdb/WriteBatchTest.java \
-        rocksdb/java/org/rocksdb/WriteOptions.java \
-        rocksdb/java/org/rocksdb/benchmark/DbBenchmark.java \
-        rocksdb/java/org/rocksdb/test/BackupableDBTest.java \
-        rocksdb/java/org/rocksdb/test/OptionsTest.java \
-        rocksdb/java/org/rocksdb/test/ReadOptionsTest.java \
-        rocksdb/java/org/rocksdb/util/Environment.java \
-        rocksdb/java/org/rocksdb/util/SizeUnit.java \
-        rocksdb/java/rocksjni/backupablejni.cc \
-        rocksdb/java/rocksjni/filter.cc \
-        rocksdb/java/rocksjni/iterator.cc \
-        rocksdb/java/rocksjni/memtablejni.cc \
-        rocksdb/java/rocksjni/options.cc \
-        rocksdb/java/rocksjni/portal.h \
-        rocksdb/java/rocksjni/rocksjni.cc \
-        rocksdb/java/rocksjni/statistics.cc \
-        rocksdb/java/rocksjni/table.cc \
-        rocksdb/java/rocksjni/write_batch.cc \
-        rocksdb/linters/__phutil_library_init__.php \
-        rocksdb/linters/__phutil_library_map__.php \
-        rocksdb/linters/cpp_linter/ArcanistCpplintLinter.php \
-        rocksdb/linters/cpp_linter/FbcodeCppLinter.php \
-        rocksdb/linters/cpp_linter/PfffCppLinter.php \
-        rocksdb/linters/cpp_linter/cpplint.py \
-        rocksdb/linters/lint_engine/FacebookFbcodeLintEngine.php \
-        rocksdb/m4/libtool.m4 \
-        rocksdb/m4/ltoptions.m4 \
-        rocksdb/m4/ltsugar.m4 \
-        rocksdb/m4/ltversion.m4 \
-        rocksdb/m4/lt~obsolete.m4 \
-        rocksdb/port/README \
-        rocksdb/port/atomic_pointer.h \
-        rocksdb/port/likely.h \
-        rocksdb/port/port.h \
-        rocksdb/port/port_example.h \
-        rocksdb/port/port_posix.cc \
-        rocksdb/port/port_posix.h \
-        rocksdb/port/stack_trace.cc \
-        rocksdb/port/stack_trace.h \
-        rocksdb/port/win/stdint.h \
-        rocksdb/table/block.cc \
-        rocksdb/table/block.h \
-        rocksdb/table/block_based_table_builder.cc \
-        rocksdb/table/block_based_table_builder.h \
-        rocksdb/table/block_based_table_factory.cc \
-        rocksdb/table/block_based_table_factory.h \
-        rocksdb/table/block_based_table_reader.cc \
-        rocksdb/table/block_based_table_reader.h \
-        rocksdb/table/block_builder.cc \
-        rocksdb/table/block_builder.h \
-        rocksdb/table/block_hash_index.cc \
-        rocksdb/table/block_hash_index.h \
-        rocksdb/table/block_hash_index_test.cc \
-        rocksdb/table/block_test.cc \
-        rocksdb/table/filter_block.cc \
-        rocksdb/table/filter_block.h \
-        rocksdb/table/filter_block_test.cc \
-        rocksdb/table/flush_block_policy.cc \
-        rocksdb/table/format.cc \
-        rocksdb/table/format.h \
-        rocksdb/table/iter_heap.h \
-        rocksdb/table/iterator.cc \
-        rocksdb/table/iterator_wrapper.h \
-        rocksdb/table/merger.cc \
-        rocksdb/table/merger.h \
-        rocksdb/table/meta_blocks.cc \
-        rocksdb/table/meta_blocks.h \
-        rocksdb/table/plain_table_builder.cc \
-        rocksdb/table/plain_table_builder.h \
-        rocksdb/table/plain_table_factory.cc \
-        rocksdb/table/plain_table_factory.h \
-        rocksdb/table/plain_table_reader.cc \
-        rocksdb/table/plain_table_reader.h \
-        rocksdb/table/table_builder.h \
-        rocksdb/table/table_properties.cc \
-        rocksdb/table/table_reader.h \
-        rocksdb/table/table_reader_bench.cc \
-        rocksdb/table/table_test.cc \
-        rocksdb/table/two_level_iterator.cc \
-        rocksdb/table/two_level_iterator.h \
-        rocksdb/tools/auto_sanity_test.sh \
-        rocksdb/tools/blob_store_bench.cc \
-        rocksdb/tools/db_crashtest.py \
-        rocksdb/tools/db_crashtest2.py \
-        rocksdb/tools/db_repl_stress.cc \
-        rocksdb/tools/db_sanity_test.cc \
-        rocksdb/tools/db_stress.cc \
-        rocksdb/tools/ldb.cc \
-        rocksdb/tools/ldb_test.py \
-        rocksdb/tools/reduce_levels_test.cc \
-        rocksdb/tools/sst_dump.cc \
-        rocksdb/util/arena.cc \
-        rocksdb/util/arena.h \
-        rocksdb/util/arena_test.cc \
-        rocksdb/util/auto_roll_logger.cc \
-        rocksdb/util/auto_roll_logger.h \
-        rocksdb/util/auto_roll_logger_test.cc \
-        rocksdb/util/autovector.h \
-        rocksdb/util/autovector_test.cc \
-        rocksdb/util/benchharness.cc \
-        rocksdb/util/benchharness.h \
-        rocksdb/util/benchharness_test.cc \
-        rocksdb/util/blob_store.cc \
-        rocksdb/util/blob_store.h \
-        rocksdb/util/blob_store_test.cc \
-        rocksdb/util/bloom.cc \
-        rocksdb/util/bloom_test.cc \
-        rocksdb/util/build_version.h \
-        rocksdb/util/cache.cc \
-        rocksdb/util/cache_test.cc \
-        rocksdb/util/coding.cc \
-        rocksdb/util/coding.h \
-        rocksdb/util/coding_test.cc \
-        rocksdb/util/comparator.cc \
-        rocksdb/util/crc32c.cc \
-        rocksdb/util/crc32c.h \
-        rocksdb/util/crc32c_test.cc \
-        rocksdb/util/dynamic_bloom.cc \
-        rocksdb/util/dynamic_bloom.h \
-        rocksdb/util/dynamic_bloom_test.cc \
-        rocksdb/util/env.cc \
-        rocksdb/util/env_hdfs.cc \
-        rocksdb/util/env_posix.cc \
-        rocksdb/util/env_test.cc \
-        rocksdb/util/filelock_test.cc \
-        rocksdb/util/filter_policy.cc \
-        rocksdb/util/hash.cc \
-        rocksdb/util/hash.h \
-        rocksdb/util/hash_cuckoo_rep.cc \
-        rocksdb/util/hash_cuckoo_rep.h \
-        rocksdb/util/hash_linklist_rep.cc \
-        rocksdb/util/hash_linklist_rep.h \
-        rocksdb/util/hash_skiplist_rep.cc \
-        rocksdb/util/hash_skiplist_rep.h \
-        rocksdb/util/histogram.cc \
-        rocksdb/util/histogram.h \
-        rocksdb/util/histogram_test.cc \
-        rocksdb/util/ldb_cmd.cc \
-        rocksdb/util/ldb_cmd.h \
-        rocksdb/util/ldb_cmd_execute_result.h \
-        rocksdb/util/ldb_tool.cc \
-        rocksdb/util/log_buffer.cc \
-        rocksdb/util/log_buffer.h \
-        rocksdb/util/log_write_bench.cc \
-        rocksdb/util/logging.cc \
-        rocksdb/util/logging.h \
-        rocksdb/util/manual_compaction_test.cc \
-        rocksdb/util/murmurhash.cc \
-        rocksdb/util/murmurhash.h \
-        rocksdb/util/mutexlock.h \
-        rocksdb/util/options.cc \
-        rocksdb/util/perf_context.cc \
-        rocksdb/util/perf_context_imp.h \
-        rocksdb/util/posix_logger.h \
-        rocksdb/util/random.h \
-        rocksdb/util/signal_test.cc \
-        rocksdb/util/skiplistrep.cc \
-        rocksdb/util/slice.cc \
-        rocksdb/util/statistics.cc \
-        rocksdb/util/statistics.h \
-        rocksdb/util/stats_logger.h \
-        rocksdb/util/status.cc \
-        rocksdb/util/stl_wrappers.h \
-        rocksdb/util/stop_watch.h \
-        rocksdb/util/string_util.cc \
-        rocksdb/util/string_util.h \
-        rocksdb/util/sync_point.cc \
-        rocksdb/util/sync_point.h \
-        rocksdb/util/testharness.cc \
-        rocksdb/util/testharness.h \
-        rocksdb/util/testutil.cc \
-        rocksdb/util/testutil.h \
-        rocksdb/util/thread_local.cc \
-        rocksdb/util/thread_local.h \
-        rocksdb/util/thread_local_test.cc \
-        rocksdb/util/vectorrep.cc \
-        rocksdb/util/xxhash.cc \
-        rocksdb/util/xxhash.h \
-        rocksdb/utilities/backupable/backupable_db.cc \
-        rocksdb/utilities/backupable/backupable_db_test.cc \
-        rocksdb/utilities/geodb/geodb_impl.cc \
-        rocksdb/utilities/geodb/geodb_impl.h \
-        rocksdb/utilities/geodb/geodb_test.cc \
-        rocksdb/utilities/merge_operators.h \
-        rocksdb/utilities/merge_operators/put.cc \
-        rocksdb/utilities/merge_operators/string_append/stringappend.cc \
-        rocksdb/utilities/merge_operators/string_append/stringappend.h \
-        rocksdb/utilities/merge_operators/string_append/stringappend2.cc \
-        rocksdb/utilities/merge_operators/string_append/stringappend2.h \
-        rocksdb/utilities/merge_operators/string_append/stringappend_test.cc \
-        rocksdb/utilities/merge_operators/uint64add.cc \
-        rocksdb/utilities/redis/README \
-        rocksdb/utilities/redis/redis_list_exception.h \
-        rocksdb/utilities/redis/redis_list_iterator.h \
-        rocksdb/utilities/redis/redis_lists.cc \
-        rocksdb/utilities/redis/redis_lists.h \
-        rocksdb/utilities/redis/redis_lists_test.cc \
-        rocksdb/utilities/ttl/db_ttl_impl.cc \
-        rocksdb/utilities/ttl/db_ttl_impl.h \
-        rocksdb/utilities/ttl/ttl_test.cc
-endif
-
-
 # work around old versions of automake that don't define $docdir
 # NOTE: this won't work on suse, where docdir is /usr/share/doc/packages/$package.
 docdir ?= ${datadir}/doc/ceph
@@ -599,9 +217,6 @@ doc_DATA = $(srcdir)/sample.ceph.conf sample.fetch_config
 shell_commondir = $(libdir)/ceph
 shell_common_SCRIPTS = ceph_common.sh
 
-ceph_libexecdir = $(libexecdir)/ceph
-ceph_libexec_SCRIPTS = ceph-osd-prestart.sh
-
 bash_completiondir = $(sysconfdir)/bash_completion.d
 bash_completion_DATA = $(srcdir)/bash_completion/ceph \
                $(srcdir)/bash_completion/rados \
@@ -626,8 +241,9 @@ bin_SCRIPTS += \
 	ceph-crush-location
 
 BUILT_SOURCES += init-ceph
+su_sbin_SCRIPTS += mkcephfs
 
-shell_scripts += init-ceph
+shell_scripts += init-ceph mkcephfs
 
 
 
@@ -642,14 +258,9 @@ TESTS = \
 	$(check_SCRIPTS)
 
 check-local:
+	$(top_srcdir)/qa/workunits/erasure-code/encode-decode-non-regression.sh 
 	$(srcdir)/test/encoding/readable.sh ../ceph-object-corpus
 
-if WITH_LTTNG
-# TODO: If we're running the parallel test harness (the preferred harness), this should be AM_TESTS_ENVIRONMENT instead.
-# See: https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
-# I don't see the serial-tests Automake option anywhere, but my AM_TESTS_ENVIRONMENT was being ignored.
-TESTS_ENVIRONMENT = LD_PRELOAD=liblttng-ust-fork.so; export LD_PRELOAD; echo "LD_PRELOAD=$${LD_PRELOAD}";
-endif
 
 # base targets
 
@@ -658,7 +269,7 @@ admin-tools: monmaptool osdmaptool crushtool ceph-authtool
 base: core-daemons admin-tools \
 	cephfs ceph-syn ceph-conf \
 	rados librados-config \
-	init-ceph ceph_mon_store_converter ceph-post-file
+	init-ceph mkcephfs ceph_mon_store_converter ceph-post-file
 
 
 # version stuff
diff --git a/src/Makefile.in b/src/Makefile.in
index 33b90ea..f7a982f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -48,47 +48,38 @@ DIST_COMMON = README $(am__noinst_HEADERS_DIST) $(dist_bin_SCRIPTS) \
 	$(srcdir)/client/Makefile.am $(srcdir)/cls/Makefile.am \
 	$(srcdir)/common/Makefile.am $(srcdir)/crush/Makefile.am \
 	$(srcdir)/erasure-code/Makefile.am \
-	$(srcdir)/erasure-code/isa/Makefile.am \
 	$(srcdir)/erasure-code/jerasure/Makefile.am \
-	$(srcdir)/erasure-code/lrc/Makefile.am \
 	$(srcdir)/global/Makefile.am $(srcdir)/include/Makefile.am \
 	$(srcdir)/json_spirit/Makefile.am \
 	$(srcdir)/key_value_store/Makefile.am \
-	$(srcdir)/librados/Makefile.am \
-	$(srcdir)/libradosstriper/Makefile.am \
-	$(srcdir)/librbd/Makefile.am $(srcdir)/log/Makefile.am \
-	$(srcdir)/mds/Makefile.am $(srcdir)/messages/Makefile.am \
-	$(srcdir)/mon/Makefile.am $(srcdir)/msg/Makefile.am \
-	$(srcdir)/os/Makefile.am $(srcdir)/osd/Makefile.am \
-	$(srcdir)/osdc/Makefile.am $(srcdir)/perfglue/Makefile.am \
-	$(srcdir)/rbd_replay/Makefile.am $(srcdir)/rgw/Makefile.am \
+	$(srcdir)/librados/Makefile.am $(srcdir)/librbd/Makefile.am \
+	$(srcdir)/log/Makefile.am $(srcdir)/mds/Makefile.am \
+	$(srcdir)/messages/Makefile.am $(srcdir)/mon/Makefile.am \
+	$(srcdir)/msg/Makefile.am $(srcdir)/os/Makefile.am \
+	$(srcdir)/osd/Makefile.am $(srcdir)/osdc/Makefile.am \
+	$(srcdir)/perfglue/Makefile.am $(srcdir)/rgw/Makefile.am \
 	$(srcdir)/test/Makefile.am \
 	$(srcdir)/test/erasure-code/Makefile.am \
 	$(srcdir)/tools/Makefile.am TODO
-bin_PROGRAMS = $(am__EXEEXT_9) $(am__EXEEXT_10) $(am__EXEEXT_11) \
-	$(am__EXEEXT_12) ceph-dencoder$(EXEEXT) \
-	ceph_objectstore_tool$(EXEEXT) monmaptool$(EXEEXT) \
-	crushtool$(EXEEXT) osdmaptool$(EXEEXT) rados$(EXEEXT) \
-	cephfs-journal-tool$(EXEEXT) $(am__EXEEXT_13) \
-	ceph-conf$(EXEEXT) ceph-authtool$(EXEEXT) \
-	ceph_mon_store_converter$(EXEEXT) ceph-mon$(EXEEXT) \
-	ceph-osd$(EXEEXT) ceph-mds$(EXEEXT) cephfs$(EXEEXT) \
-	librados-config$(EXEEXT) ceph-syn$(EXEEXT) $(am__EXEEXT_14) \
-	$(am__EXEEXT_15)
-noinst_PROGRAMS = get_command_descriptions$(EXEEXT)
+bin_PROGRAMS = $(am__EXEEXT_9) $(am__EXEEXT_10) ceph-dencoder$(EXEEXT) \
+	ceph_filestore_tool$(EXEEXT) ceph_filestore_dump$(EXEEXT) \
+	monmaptool$(EXEEXT) crushtool$(EXEEXT) osdmaptool$(EXEEXT) \
+	rados$(EXEEXT) $(am__EXEEXT_11) ceph-conf$(EXEEXT) \
+	ceph-authtool$(EXEEXT) ceph_mon_store_converter$(EXEEXT) \
+	ceph-mon$(EXEEXT) ceph-osd$(EXEEXT) ceph-mds$(EXEEXT) \
+	cephfs$(EXEEXT) librados-config$(EXEEXT) ceph-syn$(EXEEXT) \
+	$(am__EXEEXT_12) $(am__EXEEXT_13)
+noinst_PROGRAMS = ceph_erasure_code_non_regression$(EXEEXT) \
+	get_command_descriptions$(EXEEXT)
 sbin_PROGRAMS =
-su_sbin_PROGRAMS = $(am__EXEEXT_17)
+su_sbin_PROGRAMS = $(am__EXEEXT_14)
 check_PROGRAMS = unittest_erasure_code_plugin$(EXEEXT) \
-	unittest_erasure_code$(EXEEXT) \
 	unittest_erasure_code_jerasure$(EXEEXT) \
 	unittest_erasure_code_plugin_jerasure$(EXEEXT) \
-	$(am__EXEEXT_16) unittest_erasure_code_lrc$(EXEEXT) \
-	unittest_erasure_code_plugin_lrc$(EXEEXT) \
 	unittest_erasure_code_example$(EXEEXT) \
 	unittest_encoding$(EXEEXT) unittest_addrs$(EXEEXT) \
 	unittest_bloom_filter$(EXEEXT) unittest_histogram$(EXEEXT) \
 	unittest_str_map$(EXEEXT) unittest_sharedptr_registry$(EXEEXT) \
-	unittest_shared_cache$(EXEEXT) \
 	unittest_sloppy_crc_map$(EXEEXT) unittest_util$(EXEEXT) \
 	unittest_crush_indep$(EXEEXT) unittest_osdmap$(EXEEXT) \
 	unittest_workqueue$(EXEEXT) unittest_striper$(EXEEXT) \
@@ -98,25 +89,25 @@ check_PROGRAMS = unittest_erasure_code_plugin$(EXEEXT) \
 	unittest_base64$(EXEEXT) unittest_ceph_argparse$(EXEEXT) \
 	unittest_ceph_compatset$(EXEEXT) unittest_osd_types$(EXEEXT) \
 	unittest_pglog$(EXEEXT) unittest_ecbackend$(EXEEXT) \
-	unittest_hitset$(EXEEXT) unittest_lru$(EXEEXT) \
-	unittest_io_priority$(EXEEXT) unittest_gather$(EXEEXT) \
-	unittest_run_cmd$(EXEEXT) unittest_signals$(EXEEXT) \
-	unittest_simple_spin$(EXEEXT) unittest_librados$(EXEEXT) \
-	unittest_bufferlist$(EXEEXT) unittest_crc32c$(EXEEXT) \
-	unittest_arch$(EXEEXT) unittest_crypto$(EXEEXT) \
-	unittest_crypto_init$(EXEEXT) unittest_perf_counters$(EXEEXT) \
-	unittest_admin_socket$(EXEEXT) unittest_ceph_crypto$(EXEEXT) \
-	unittest_utf8$(EXEEXT) unittest_mime$(EXEEXT) \
-	unittest_escape$(EXEEXT) unittest_chain_xattr$(EXEEXT) \
-	unittest_flatindex$(EXEEXT) unittest_strtol$(EXEEXT) \
-	unittest_confutils$(EXEEXT) unittest_config$(EXEEXT) \
-	unittest_context$(EXEEXT) unittest_heartbeatmap$(EXEEXT) \
-	unittest_formatter$(EXEEXT) unittest_libcephfs_config$(EXEEXT) \
-	unittest_lfnindex$(EXEEXT) unittest_librados_config$(EXEEXT) \
+	unittest_hitset$(EXEEXT) unittest_io_priority$(EXEEXT) \
+	unittest_gather$(EXEEXT) unittest_run_cmd$(EXEEXT) \
+	unittest_signals$(EXEEXT) unittest_simple_spin$(EXEEXT) \
+	unittest_librados$(EXEEXT) unittest_bufferlist$(EXEEXT) \
+	unittest_crc32c$(EXEEXT) unittest_arch$(EXEEXT) \
+	unittest_crypto$(EXEEXT) unittest_crypto_init$(EXEEXT) \
+	unittest_perf_counters$(EXEEXT) unittest_admin_socket$(EXEEXT) \
+	unittest_ceph_crypto$(EXEEXT) unittest_utf8$(EXEEXT) \
+	unittest_mime$(EXEEXT) unittest_escape$(EXEEXT) \
+	unittest_chain_xattr$(EXEEXT) unittest_flatindex$(EXEEXT) \
+	unittest_strtol$(EXEEXT) unittest_confutils$(EXEEXT) \
+	unittest_config$(EXEEXT) unittest_context$(EXEEXT) \
+	unittest_heartbeatmap$(EXEEXT) unittest_formatter$(EXEEXT) \
+	unittest_libcephfs_config$(EXEEXT) unittest_lfnindex$(EXEEXT) \
+	unittest_librados_config$(EXEEXT) \
 	unittest_daemon_config$(EXEEXT) unittest_osd_osdcap$(EXEEXT) \
 	unittest_mon_moncap$(EXEEXT) unittest_mon_pgmap$(EXEEXT) \
 	unittest_ipaddr$(EXEEXT) unittest_texttable$(EXEEXT) \
-	unittest_on_exit$(EXEEXT) unittest_rbd_replay$(EXEEXT)
+	unittest_on_exit$(EXEEXT)
 
 # when doing a debug build, make sure to make the targets
 @WITH_DEBUG_TRUE at am__append_1 = $(bin_DEBUGPROGRAMS)
@@ -130,63 +121,31 @@ check_PROGRAMS = unittest_erasure_code_plugin$(EXEEXT) \
 @WITH_PROFILER_TRUE at am__append_9 = -lprofiler
 @WITH_LIBAIO_TRUE at am__append_10 = -laio
 @WITH_LIBZFS_TRUE at am__append_11 = libos_zfs.a -lzfs
- at WITH_LIBROCKSDB_TRUE@am__append_12 = libos_rocksdb.la
- at WITH_TCMALLOC_TRUE@am__append_13 = -ltcmalloc
- at ENABLE_COVERAGE_TRUE@am__append_14 = -lgcov
- at LINUX_TRUE@am__append_15 = os/BtrfsFileStoreBackend.cc
- at WITH_LIBXFS_TRUE@am__append_16 = os/XfsFileStoreBackend.cc
- at WITH_LIBZFS_TRUE@am__append_17 = os/ZFSFileStoreBackend.cc
- at WITH_LTTNG_TRUE@am__append_18 = $(LIBOS_TP)
- at WITH_SLIBROCKSDB_TRUE@am__append_19 = libos_rocksdb.la
- at WITH_SLIBROCKSDB_TRUE@am__append_20 = os/RocksDBStore.h
- at WITH_DLIBROCKSDB_TRUE@am__append_21 = libos_rocksdb.la
- at WITH_DLIBROCKSDB_TRUE@am__append_22 = os/RocksDBStore.h
- at WITH_LIBZFS_TRUE@am__append_23 = libos_zfs.a
- at WITH_LIBZFS_TRUE@am__append_24 = os/ZFS.h
- at WITH_KINETIC_TRUE@am__append_25 = os/KineticStore.cc
- at WITH_KINETIC_TRUE@am__append_26 = -std=gnu++11
- at WITH_KINETIC_TRUE@am__append_27 = -lkinetic_client -lprotobuf -lglog -lgflags libcrypto.a
- at WITH_KINETIC_TRUE@am__append_28 = os/KineticStore.h
- at WITH_LTTNG_TRUE@am__append_29 = $(LIBOSD_TP)
- at WITH_KINETIC_TRUE@am__append_30 = -std=gnu++11
- at LINUX_TRUE@am__append_31 = -export-symbols-regex '.*__erasure_code_.*'
- at LINUX_TRUE@am__append_32 = -export-symbols-regex '.*__erasure_code_.*'
- at LINUX_TRUE@am__append_33 = -export-symbols-regex '.*__erasure_code_.*'
- at LINUX_TRUE@am__append_34 = -export-symbols-regex '.*__erasure_code_.*'
- at LINUX_TRUE@am__append_35 = -export-symbols-regex '.*__erasure_code_.*'
-
-# ISA
- at WITH_BETTER_YASM_ELF64_TRUE@am__append_36 = \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/ErasureCodeIsa.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/ErasureCodeIsaTableCache.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/xor_op.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/ec_base.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/include/erasure_code.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/include/reg_sizes.asm \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/include/erasure_code.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/include/gf_vect_mul.h \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/include/types.h
-
- at LINUX_TRUE@@WITH_BETTER_YASM_ELF64_TRUE at am__append_37 = -export-symbols-regex '.*__erasure_code_.*'
- at WITH_BETTER_YASM_ELF64_TRUE@am__append_38 = libec_isa.la
- at WITH_FUSE_TRUE@am__append_39 = libclient_fuse.la
- at WITH_FUSE_TRUE@am__append_40 = client/fuse_ll.h
- at WITH_TCMALLOC_TRUE@am__append_41 = perfglue/heap_profiler.cc
- at WITH_TCMALLOC_TRUE@am__append_42 = -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
- at WITH_TCMALLOC_TRUE@am__append_43 = -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
- at WITH_TCMALLOC_FALSE@am__append_44 = perfglue/disabled_heap_profiler.cc
- at WITH_PROFILER_TRUE@am__append_45 = perfglue/cpu_profiler.cc
- at WITH_PROFILER_FALSE@am__append_46 = perfglue/disabled_stubs.cc
- at WITH_GOOD_YASM_ELF64_TRUE@am__append_47 = common/crc32c_intel_fast_asm.S common/crc32c_intel_fast_zero_asm.S
- at LINUX_TRUE@am__append_48 = -lrt
- at LINUX_TRUE@am__append_49 = libsecret.la
- at WITH_LTTNG_TRUE@am__append_50 = $(LIBRADOS_TP)
- at LINUX_TRUE@am__append_51 = -export-symbols-regex '^rados_.*'
- at LINUX_TRUE@am__append_52 = -export-symbols-regex '^radosstriper_.*'
- at WITH_LTTNG_TRUE@am__append_53 = $(LIBRBD_TP)
- at LINUX_TRUE@am__append_54 = -export-symbols-regex '^rbd_.*'
- at WITH_RADOSGW_TRUE@am__append_55 = librgw.la
- at WITH_RADOSGW_TRUE@am__append_56 = \
+ at WITH_TCMALLOC_TRUE@am__append_12 = -ltcmalloc
+ at ENABLE_COVERAGE_TRUE@am__append_13 = -lgcov
+ at LINUX_TRUE@am__append_14 = os/BtrfsFileStoreBackend.cc
+ at WITH_LIBXFS_TRUE@am__append_15 = os/XfsFileStoreBackend.cc
+ at WITH_LIBZFS_TRUE@am__append_16 = os/ZFSFileStoreBackend.cc
+ at WITH_LIBZFS_TRUE@am__append_17 = libos_zfs.a
+ at WITH_LIBZFS_TRUE@am__append_18 = os/ZFS.h
+ at LINUX_TRUE@am__append_19 = -export-symbols-regex '.*__erasure_code_.*'
+ at LINUX_TRUE@am__append_20 = -export-symbols-regex '.*__erasure_code_.*'
+ at LINUX_TRUE@am__append_21 = -export-symbols-regex '.*__erasure_code_.*'
+ at LINUX_TRUE@am__append_22 = -export-symbols-regex '.*__erasure_code_.*'
+ at WITH_FUSE_TRUE@am__append_23 = libclient_fuse.la
+ at WITH_FUSE_TRUE@am__append_24 = client/fuse_ll.h
+ at WITH_TCMALLOC_TRUE@am__append_25 = perfglue/heap_profiler.cc
+ at WITH_TCMALLOC_TRUE@am__append_26 = -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
+ at WITH_TCMALLOC_TRUE@am__append_27 = -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
+ at WITH_TCMALLOC_FALSE@am__append_28 = perfglue/disabled_heap_profiler.cc
+ at WITH_PROFILER_TRUE@am__append_29 = perfglue/cpu_profiler.cc
+ at WITH_PROFILER_FALSE@am__append_30 = perfglue/disabled_stubs.cc
+ at WITH_GOOD_YASM_ELF64_TRUE@am__append_31 = common/crc32c_intel_fast_asm.S common/crc32c_intel_fast_zero_asm.S
+ at LINUX_TRUE@am__append_32 = -lrt
+ at LINUX_TRUE@am__append_33 = -export-symbols-regex '^rados_.*'
+ at LINUX_TRUE@am__append_34 = -export-symbols-regex '^rbd_.*'
+ at WITH_RADOSGW_TRUE@am__append_35 = librgw.la
+ at WITH_RADOSGW_TRUE@am__append_36 = \
 @WITH_RADOSGW_TRUE@	$(LIBRADOS) \
 @WITH_RADOSGW_TRUE@	libcls_rgw_client.la \
 @WITH_RADOSGW_TRUE@	libcls_log_client.a \
@@ -202,433 +161,55 @@ check_PROGRAMS = unittest_erasure_code_plugin$(EXEEXT) \
 @WITH_RADOSGW_TRUE@	-lfcgi \
 @WITH_RADOSGW_TRUE@	-ldl
 
- at WITH_RADOSGW_TRUE@am__append_57 = radosgw radosgw-admin
- at WITH_RADOSGW_TRUE@am__append_58 = ceph_rgw_multiparser \
+ at WITH_RADOSGW_TRUE@am__append_37 = radosgw radosgw-admin
+ at WITH_RADOSGW_TRUE@am__append_38 = ceph_rgw_multiparser \
 @WITH_RADOSGW_TRUE@	ceph_rgw_jsonparser
 
 # inject rgw stuff in the decoder testcase
- at WITH_RADOSGW_TRUE@am__append_59 = \
+ at WITH_RADOSGW_TRUE@am__append_39 = \
 @WITH_RADOSGW_TRUE@	rgw/rgw_dencoder.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_acl.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_common.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_env.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_json_enc.cc
 
- at LINUX_TRUE@am__append_60 = libcls_kvs.la
- at LINUX_TRUE@am__append_61 = rbd-replay
- at WITH_BABELTRACE_TRUE@am__append_62 = rbd-replay-prep
- at LINUX_TRUE@am__append_63 = -ldl
- at LINUX_TRUE@am__append_64 = -ldl
- at LINUX_TRUE@am__append_65 = -ldl
- at LINUX_TRUE@am__append_66 = -ldl
- at LINUX_TRUE@am__append_67 = -ldl
- at LINUX_TRUE@@WITH_BETTER_YASM_ELF64_TRUE at am__append_68 = -ldl
- at WITH_BETTER_YASM_ELF64_TRUE@am__append_69 =  \
- at WITH_BETTER_YASM_ELF64_TRUE@	unittest_erasure_code_isa \
- at WITH_BETTER_YASM_ELF64_TRUE@	unittest_erasure_code_plugin_isa
- at LINUX_TRUE@@WITH_BETTER_YASM_ELF64_TRUE at am__append_70 = -ldl
- at LINUX_TRUE@am__append_71 = -ldl
- at LINUX_TRUE@am__append_72 = -ldl
- at COMPILER_HAS_VTA_TRUE@am__append_73 = -fno-var-tracking-assignments
- at COMPILER_HAS_VTA_TRUE@am__append_74 = -fno-var-tracking-assignments
- at WITH_BUILD_TESTS_TRUE@am__append_75 = test_build_libcommon \
+ at LINUX_TRUE@am__append_40 = libcls_kvs.la
+ at LINUX_TRUE@am__append_41 = -ldl
+ at LINUX_TRUE@am__append_42 = -ldl
+ at LINUX_TRUE@am__append_43 = -ldl
+ at LINUX_TRUE@am__append_44 = -ldl
+ at LINUX_TRUE@am__append_45 = -ldl
+ at LINUX_TRUE@am__append_46 = -ldl
+ at COMPILER_HAS_VTA_TRUE@am__append_47 = -fno-var-tracking-assignments
+ at COMPILER_HAS_VTA_TRUE@am__append_48 = -fno-var-tracking-assignments
+ at WITH_BUILD_TESTS_TRUE@am__append_49 = test_build_libcommon \
 @WITH_BUILD_TESTS_TRUE@	test_build_librados test_build_librgw \
 @WITH_BUILD_TESTS_TRUE@	test_build_libcephfs
- at LINUX_TRUE@am__append_76 = ceph_kvstorebench \
+ at LINUX_TRUE@am__append_50 = ceph_kvstorebench \
 @LINUX_TRUE@	ceph_test_rados_list_parallel \
 @LINUX_TRUE@	ceph_test_rados_open_pools_parallel \
 @LINUX_TRUE@	ceph_test_rados_delete_pools_parallel \
 @LINUX_TRUE@	ceph_test_rados_watch_notify
- at LINUX_TRUE@am__append_77 = libsystest.la
- at LINUX_TRUE@am__append_78 = -ldl
- at WITH_RADOSGW_TRUE@am__append_79 = ceph_test_cors \
+ at LINUX_TRUE@am__append_51 = libsystest.la
+ at LINUX_TRUE@am__append_52 = -ldl
+ at WITH_RADOSGW_TRUE@am__append_53 = ceph_test_cors \
 @WITH_RADOSGW_TRUE@	ceph_test_rgw_manifest \
 @WITH_RADOSGW_TRUE@	ceph_test_cls_rgw_meta \
 @WITH_RADOSGW_TRUE@	ceph_test_cls_rgw_log \
 @WITH_RADOSGW_TRUE@	ceph_test_cls_rgw_opstate
- at LINUX_TRUE@am__append_80 = ceph_test_librbd_fsx
- at WITH_RADOSGW_TRUE@am__append_81 = ceph_test_cls_rgw
- at LINUX_TRUE@am__append_82 = ceph_test_objectstore ceph_test_filestore
- at LINUX_TRUE@am__append_83 = -ldl
- at WITH_REST_BENCH_TRUE@am__append_84 = rest-bench
- at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_TRUE at am__append_85 = -ls3
- at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at am__append_86 = libs3/build/lib/libs3.a -lcurl -lxml2
- at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at am__append_87 = libs3
- at LINUX_TRUE@am__append_88 = mount.ceph
- at LINUX_TRUE@am__append_89 = libkrbd.la
- at LINUX_TRUE@am__append_90 = rbd
- at WITH_FUSE_TRUE@am__append_91 = ceph-fuse rbd-fuse
- at ENABLE_CEPHFS_JAVA_TRUE@am__append_92 = libcephfs_jni.la
- at WITH_SLIBROCKSDB_TRUE@am__append_93 = rocksdb
- at WITH_SLIBROCKSDB_FALSE@am__append_94 = \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/.arcconfig \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/.clang-format \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/.gitignore \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/CONTRIBUTING.md \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/HISTORY.md \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/INSTALL.md \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/LICENSE \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/Makefile.am \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/PATENTS \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/README \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/ROCKSDB_LITE.md \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/build_detect_platform \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/build_detect_version \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/fbcode.clang31.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/fbcode.gcc471.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/fbcode.gcc481.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/format-diff.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/mac-install-gflags.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/make_new_version.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/regression_build_test.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/build_tools/valgrind_test.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/configure.ac \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/coverage/coverage_test.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/coverage/parse_gcov_output.py \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/builder.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/builder.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/c.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/c_test.c \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/column_family.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/column_family.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/column_family_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/compaction.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/compaction.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/compaction_picker.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/compaction_picker.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/corruption_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_bench.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_filesnapshot.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_impl.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_impl.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_impl_debug.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_impl_readonly.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_impl_readonly.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_iter.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_iter.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_stats_logger.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/db_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/dbformat.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/dbformat.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/dbformat_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/deletefile_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/file_indexer.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/file_indexer.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/file_indexer_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/filename.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/filename.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/filename_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/internal_stats.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/internal_stats.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_and_apply_bench.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_format.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_reader.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_reader.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_writer.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/log_writer.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/memtable.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/memtable.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/memtable_list.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/memtable_list.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/merge_context.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/merge_helper.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/merge_helper.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/merge_operator.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/merge_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/perf_context_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/plain_table_db_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/prefix_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/repair.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/simple_table_db_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/skiplist.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/skiplist_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/snapshot.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/table_cache.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/table_cache.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/table_properties_collector.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/table_properties_collector.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/table_properties_collector_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/tailing_iter.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/tailing_iter.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/transaction_log_impl.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/transaction_log_impl.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/version_edit.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/version_edit.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/version_edit_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/version_set.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/version_set.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/version_set_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/write_batch.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/write_batch_internal.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/db/write_batch_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/doc/doc.css \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/doc/index.html \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/doc/log_format.txt \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/doc/rockslogo.jpg \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/doc/rockslogo.png \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/hdfs/README \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/hdfs/env_hdfs.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/hdfs/hdfs.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/hdfs/libhdfs.a \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/helpers/memenv/memenv.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/helpers/memenv/memenv_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/c.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/cache.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/compaction_filter.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/comparator.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/db.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/env.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/filter_policy.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/flush_block_policy.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/iterator.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/ldb_tool.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/memtablerep.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/merge_operator.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/options.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/perf_context.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/slice.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/slice_transform.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/statistics.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/status.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/table.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/table_properties.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/transaction_log.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/types.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/universal_compaction.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/version.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/rocksdb/write_batch.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/utilities/backupable_db.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/utilities/db_ttl.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/utilities/geo_db.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/utilities/stackable_db.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/include/utilities/utility_db.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/Makefile \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/RocksDBSample.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/jdb_bench.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/BackupableDB.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/BackupableDBOptions.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/BloomFilter.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/Filter.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/HashLinkedListMemTableConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/HashSkipListMemTableConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/HistogramData.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/HistogramType.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/Iterator.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/MemTableConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/Options.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/PlainTableConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/ReadOptions.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/RocksDB.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/RocksDBException.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/RocksObject.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/SkipListMemTableConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/Statistics.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/TableFormatConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/TickerType.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/VectorMemTableConfig.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/WriteBatch.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/WriteBatchTest.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/WriteOptions.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/benchmark/DbBenchmark.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/test/BackupableDBTest.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/test/OptionsTest.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/test/ReadOptionsTest.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/util/Environment.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/org/rocksdb/util/SizeUnit.java \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/backupablejni.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/filter.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/iterator.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/memtablejni.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/options.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/portal.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/rocksjni.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/statistics.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/table.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/java/rocksjni/write_batch.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/__phutil_library_init__.php \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/__phutil_library_map__.php \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/cpp_linter/ArcanistCpplintLinter.php \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/cpp_linter/FbcodeCppLinter.php \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/cpp_linter/PfffCppLinter.php \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/cpp_linter/cpplint.py \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/linters/lint_engine/FacebookFbcodeLintEngine.php \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/m4/libtool.m4 \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/m4/ltoptions.m4 \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/m4/ltsugar.m4 \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/m4/ltversion.m4 \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/m4/lt~obsolete.m4 \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/README \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/atomic_pointer.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/likely.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/port.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/port_example.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/port_posix.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/port_posix.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/stack_trace.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/stack_trace.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/port/win/stdint.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_based_table_builder.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_based_table_builder.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_based_table_factory.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_based_table_factory.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_based_table_reader.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_based_table_reader.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_builder.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_builder.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_hash_index.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_hash_index.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_hash_index_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/block_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/filter_block.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/filter_block.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/filter_block_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/flush_block_policy.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/format.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/format.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/iter_heap.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/iterator.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/iterator_wrapper.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/merger.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/merger.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/meta_blocks.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/meta_blocks.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/plain_table_builder.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/plain_table_builder.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/plain_table_factory.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/plain_table_factory.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/plain_table_reader.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/plain_table_reader.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/table_builder.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/table_properties.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/table_reader.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/table_reader_bench.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/table_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/two_level_iterator.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/table/two_level_iterator.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/auto_sanity_test.sh \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/blob_store_bench.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/db_crashtest.py \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/db_crashtest2.py \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/db_repl_stress.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/db_sanity_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/db_stress.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/ldb.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/ldb_test.py \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/reduce_levels_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/tools/sst_dump.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/arena.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/arena.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/arena_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/auto_roll_logger.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/auto_roll_logger.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/auto_roll_logger_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/autovector.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/autovector_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/benchharness.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/benchharness.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/benchharness_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/blob_store.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/blob_store.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/blob_store_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/bloom.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/bloom_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/build_version.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/cache.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/cache_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/coding.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/coding.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/coding_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/comparator.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/crc32c.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/crc32c.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/crc32c_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/dynamic_bloom.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/dynamic_bloom.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/dynamic_bloom_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/env.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/env_hdfs.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/env_posix.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/env_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/filelock_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/filter_policy.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash_cuckoo_rep.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash_cuckoo_rep.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash_linklist_rep.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash_linklist_rep.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash_skiplist_rep.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/hash_skiplist_rep.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/histogram.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/histogram.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/histogram_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/ldb_cmd.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/ldb_cmd.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/ldb_cmd_execute_result.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/ldb_tool.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/log_buffer.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/log_buffer.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/log_write_bench.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/logging.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/logging.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/manual_compaction_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/murmurhash.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/murmurhash.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/mutexlock.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/options.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/perf_context.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/perf_context_imp.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/posix_logger.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/random.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/signal_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/skiplistrep.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/slice.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/statistics.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/statistics.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/stats_logger.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/status.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/stl_wrappers.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/stop_watch.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/string_util.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/string_util.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/sync_point.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/sync_point.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/testharness.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/testharness.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/testutil.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/testutil.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/thread_local.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/thread_local.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/thread_local_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/vectorrep.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/xxhash.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/util/xxhash.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/backupable/backupable_db.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/backupable/backupable_db_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/geodb/geodb_impl.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/geodb/geodb_impl.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/geodb/geodb_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/put.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/string_append/stringappend.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/string_append/stringappend.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/string_append/stringappend2.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/string_append/stringappend2.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/string_append/stringappend_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/merge_operators/uint64add.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/redis/README \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/redis/redis_list_exception.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/redis/redis_list_iterator.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/redis/redis_lists.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/redis/redis_lists.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/redis/redis_lists_test.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/ttl/db_ttl_impl.cc \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/ttl/db_ttl_impl.h \
- at WITH_SLIBROCKSDB_FALSE@        rocksdb/utilities/ttl/ttl_test.cc
-
+ at LINUX_TRUE@am__append_54 = ceph_test_librbd_fsx
+ at WITH_RADOSGW_TRUE@am__append_55 = ceph_test_cls_rgw
+ at LINUX_TRUE@am__append_56 = ceph_test_objectstore
+ at LINUX_TRUE@am__append_57 = -ldl
+ at LINUX_TRUE@am__append_58 = -ldl
+ at WITH_REST_BENCH_TRUE@am__append_59 = rest-bench
+ at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_TRUE at am__append_60 = -ls3
+ at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at am__append_61 = libs3/build/lib/libs3.a -lcurl -lxml2
+ at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at am__append_62 = libs3
+ at LINUX_TRUE@am__append_63 = mount.ceph
+ at LINUX_TRUE@am__append_64 = rbd
+ at WITH_FUSE_TRUE@am__append_65 = ceph-fuse rbd-fuse
+ at ENABLE_CEPHFS_JAVA_TRUE@am__append_66 = libcephfs_jni.la
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
@@ -640,7 +221,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
 	$(top_srcdir)/m4/ax_c_pretty_func.m4 \
 	$(top_srcdir)/m4/ax_c_var_func.m4 \
 	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
-	$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
 	$(top_srcdir)/m4/ax_cxx_static_cast.m4 \
 	$(top_srcdir)/m4/ax_intel.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -729,14 +309,13 @@ am__installdirs = "$(DESTDIR)$(erasure_codelibdir)" \
 	"$(DESTDIR)$(libdir)" "$(DESTDIR)$(radoslibdir)" \
 	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
 	"$(DESTDIR)$(su_sbindir)" "$(DESTDIR)$(bindir)" \
-	"$(DESTDIR)$(ceph_libexecdir)" "$(DESTDIR)$(ceph_sbindir)" \
-	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
-	"$(DESTDIR)$(shell_commondir)" "$(DESTDIR)$(su_sbindir)" \
-	"$(DESTDIR)$(pythondir)" "$(DESTDIR)$(bash_completiondir)" \
-	"$(DESTDIR)$(docdir)" "$(DESTDIR)$(libcephfs_includedir)" \
+	"$(DESTDIR)$(ceph_sbindir)" "$(DESTDIR)$(bindir)" \
+	"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(shell_commondir)" \
+	"$(DESTDIR)$(su_sbindir)" "$(DESTDIR)$(pythondir)" \
+	"$(DESTDIR)$(bash_completiondir)" "$(DESTDIR)$(docdir)" \
+	"$(DESTDIR)$(libcephfs_includedir)" \
 	"$(DESTDIR)$(librbd_includedir)" \
-	"$(DESTDIR)$(rados_includedir)" \
-	"$(DESTDIR)$(radosstriper_includedir)"
+	"$(DESTDIR)$(rados_includedir)"
 LTLIBRARIES = $(erasure_codelib_LTLIBRARIES) $(lib_LTLIBRARIES) \
 	$(noinst_LTLIBRARIES) $(radoslib_LTLIBRARIES)
 libarch_la_LIBADD =
@@ -919,7 +498,7 @@ am_libcommon_la_OBJECTS = ceph_ver.lo common/DecayCounter.lo \
 	common/snap_types.lo common/str_list.lo common/str_map.lo \
 	common/errno.lo common/RefCountedObj.lo common/blkdev.lo \
 	common/common_init.lo common/pipe.lo common/ceph_argparse.lo \
-	common/ceph_context.lo common/buffer.lo common/types.lo \
+	common/ceph_context.lo common/buffer.lo \
 	common/code_environment.lo common/dout.lo common/histogram.lo \
 	common/signal.lo common/simple_spin.lo common/Thread.lo \
 	common/Formatter.lo common/HeartbeatMap.lo common/config.lo \
@@ -930,10 +509,10 @@ am_libcommon_la_OBJECTS = ceph_ver.lo common/DecayCounter.lo \
 	common/pick_address.lo common/util.lo common/TextTable.lo \
 	common/ceph_fs.lo common/ceph_hash.lo common/ceph_strings.lo \
 	common/ceph_frag.lo common/addr_parsing.lo common/hobject.lo \
-	common/bloom_filter.lo common/linux_version.lo \
-	common/module.lo mon/MonCap.lo mon/MonClient.lo mon/MonMap.lo \
-	osd/OSDMap.lo osd/osd_types.lo osd/ECMsgTypes.lo osd/HitSet.lo \
-	mds/MDSMap.lo mds/inode_backtrace.lo mds/mdstypes.lo
+	common/bloom_filter.lo common/linux_version.lo mon/MonCap.lo \
+	mon/MonClient.lo mon/MonMap.lo osd/OSDMap.lo osd/osd_types.lo \
+	osd/ECMsgTypes.lo osd/HitSet.lo mds/MDSMap.lo \
+	mds/inode_backtrace.lo mds/mdstypes.lo
 libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS)
 libcommon_crc_la_LIBADD =
 am__libcommon_crc_la_SOURCES_DIST = common/sctp_crc32.c \
@@ -991,74 +570,6 @@ libec_hangs_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(libec_hangs_la_CXXFLAGS) $(CXXFLAGS) \
 	$(libec_hangs_la_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_DEPENDENCIES = $(LIBCRUSH) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_1) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_2)
-am__libec_isa_la_SOURCES_DIST = erasure-code/ErasureCode.cc \
-	erasure-code/isa/isa-l/erasure_code/ec_base.c \
-	erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c \
-	erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s \
-	erasure-code/isa/ErasureCodeIsa.cc \
-	erasure-code/isa/ErasureCodeIsaTableCache.cc \
-	erasure-code/isa/ErasureCodePluginIsa.cc \
-	erasure-code/isa/xor_op.cc
- at WITH_BETTER_YASM_ELF64_TRUE@am__objects_2 = erasure-code/libec_isa_la-ErasureCode.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_multibinary.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx2.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx2.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx2.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx2.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx2.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx2.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_avx.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_sse.asm.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/libec_isa_la-xor_op.lo
- at WITH_BETTER_YASM_ELF64_TRUE@am_libec_isa_la_OBJECTS =  \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__objects_2)
-libec_isa_la_OBJECTS = $(am_libec_isa_la_OBJECTS)
-libec_isa_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CXXLD) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) \
-	$(libec_isa_la_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_BETTER_YASM_ELF64_TRUE@am_libec_isa_la_rpath = -rpath \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(erasure_codelibdir)
 libec_jerasure_la_DEPENDENCIES = $(LIBCRUSH) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_2)
 am_libec_jerasure_la_OBJECTS = erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo
@@ -1069,8 +580,7 @@ libec_jerasure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(libec_jerasure_la_LDFLAGS) $(LDFLAGS) -o $@
 libec_jerasure_generic_la_DEPENDENCIES = $(LIBCRUSH) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-am__objects_3 = erasure-code/libec_jerasure_generic_la-ErasureCode.lo \
-	erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-cauchy.lo \
+am__objects_2 = erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-cauchy.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-galois.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-jerasure.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-liberation.lo \
@@ -1088,7 +598,7 @@ am__objects_3 = erasure-code/libec_jerasure_generic_la-ErasureCode.lo \
 	erasure-code/jerasure/gf-complete/src/libec_jerasure_generic_la-gf_w8.lo \
 	erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodePluginJerasure.lo \
 	erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodeJerasure.lo
-am_libec_jerasure_generic_la_OBJECTS = $(am__objects_3)
+am_libec_jerasure_generic_la_OBJECTS = $(am__objects_2)
 libec_jerasure_generic_la_OBJECTS =  \
 	$(am_libec_jerasure_generic_la_OBJECTS)
 libec_jerasure_generic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
@@ -1097,8 +607,7 @@ libec_jerasure_generic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(libec_jerasure_generic_la_LDFLAGS) $(LDFLAGS) -o $@
 libec_jerasure_sse3_la_DEPENDENCIES = $(LIBCRUSH) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-am__objects_4 = erasure-code/libec_jerasure_sse3_la-ErasureCode.lo \
-	erasure-code/jerasure/jerasure/src/libec_jerasure_sse3_la-cauchy.lo \
+am__objects_3 = erasure-code/jerasure/jerasure/src/libec_jerasure_sse3_la-cauchy.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_sse3_la-galois.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_sse3_la-jerasure.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_sse3_la-liberation.lo \
@@ -1116,7 +625,7 @@ am__objects_4 = erasure-code/libec_jerasure_sse3_la-ErasureCode.lo \
 	erasure-code/jerasure/gf-complete/src/libec_jerasure_sse3_la-gf_w8.lo \
 	erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodePluginJerasure.lo \
 	erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodeJerasure.lo
-am_libec_jerasure_sse3_la_OBJECTS = $(am__objects_4)
+am_libec_jerasure_sse3_la_OBJECTS = $(am__objects_3)
 libec_jerasure_sse3_la_OBJECTS = $(am_libec_jerasure_sse3_la_OBJECTS)
 libec_jerasure_sse3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1124,8 +633,7 @@ libec_jerasure_sse3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(libec_jerasure_sse3_la_LDFLAGS) $(LDFLAGS) -o $@
 libec_jerasure_sse4_la_DEPENDENCIES = $(LIBCRUSH) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-am__objects_5 = erasure-code/libec_jerasure_sse4_la-ErasureCode.lo \
-	erasure-code/jerasure/jerasure/src/libec_jerasure_sse4_la-cauchy.lo \
+am__objects_4 = erasure-code/jerasure/jerasure/src/libec_jerasure_sse4_la-cauchy.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_sse4_la-galois.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_sse4_la-jerasure.lo \
 	erasure-code/jerasure/jerasure/src/libec_jerasure_sse4_la-liberation.lo \
@@ -1143,23 +651,12 @@ am__objects_5 = erasure-code/libec_jerasure_sse4_la-ErasureCode.lo \
 	erasure-code/jerasure/gf-complete/src/libec_jerasure_sse4_la-gf_w8.lo \
 	erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodePluginJerasure.lo \
 	erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodeJerasure.lo
-am_libec_jerasure_sse4_la_OBJECTS = $(am__objects_5)
+am_libec_jerasure_sse4_la_OBJECTS = $(am__objects_4)
 libec_jerasure_sse4_la_OBJECTS = $(am_libec_jerasure_sse4_la_OBJECTS)
 libec_jerasure_sse4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(libec_jerasure_sse4_la_CXXFLAGS) $(CXXFLAGS) \
 	$(libec_jerasure_sse4_la_LDFLAGS) $(LDFLAGS) -o $@
-libec_lrc_la_DEPENDENCIES = $(LIBCRUSH) $(am__DEPENDENCIES_1) \
-	$(LIBJSON_SPIRIT)
-am__objects_6 = erasure-code/libec_lrc_la-ErasureCode.lo \
-	erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo \
-	erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo
-am_libec_lrc_la_OBJECTS = $(am__objects_6) \
-	common/libec_lrc_la-str_map.lo
-libec_lrc_la_OBJECTS = $(am_libec_lrc_la_OBJECTS)
-libec_lrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libec_lrc_la_CXXFLAGS) \
-	$(CXXFLAGS) $(libec_lrc_la_LDFLAGS) $(LDFLAGS) -o $@
 libec_missing_entry_point_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_2)
 am_libec_missing_entry_point_la_OBJECTS = test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.lo
@@ -1169,15 +666,6 @@ libec_missing_entry_point_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(libec_missing_entry_point_la_CXXFLAGS) $(CXXFLAGS) \
 	$(libec_missing_entry_point_la_LDFLAGS) $(LDFLAGS) -o $@
-libec_missing_version_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_2)
-am_libec_missing_version_la_OBJECTS = test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo
-libec_missing_version_la_OBJECTS =  \
-	$(am_libec_missing_version_la_OBJECTS)
-libec_missing_version_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(libec_missing_version_la_CXXFLAGS) $(CXXFLAGS) \
-	$(libec_missing_version_la_LDFLAGS) $(LDFLAGS) -o $@
 libec_test_jerasure_generic_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_2)
 am_libec_test_jerasure_generic_la_OBJECTS = test/erasure-code/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.lo
@@ -1205,6 +693,7 @@ libec_test_jerasure_sse4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(libec_test_jerasure_sse4_la_CXXFLAGS) $(CXXFLAGS) \
 	$(libec_test_jerasure_sse4_la_LDFLAGS) $(LDFLAGS) -o $@
+liberasure_code_la_DEPENDENCIES =
 am_liberasure_code_la_OBJECTS = erasure-code/ErasureCodePlugin.lo
 liberasure_code_la_OBJECTS = $(am_liberasure_code_la_OBJECTS)
 libglobal_la_DEPENDENCIES = $(LIBCOMMON)
@@ -1212,31 +701,27 @@ am_libglobal_la_OBJECTS = global/global_context.lo \
 	global/global_init.lo global/pidfile.lo \
 	global/signal_handler.lo
 libglobal_la_OBJECTS = $(am_libglobal_la_OBJECTS)
-libjson_spirit_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+libjson_spirit_la_LIBADD =
 am_libjson_spirit_la_OBJECTS = json_spirit/json_spirit_reader.lo \
 	json_spirit/json_spirit_writer.lo
 libjson_spirit_la_OBJECTS = $(am_libjson_spirit_la_OBJECTS)
-libkrbd_la_DEPENDENCIES = $(LIBSECRET)
-am_libkrbd_la_OBJECTS = krbd.lo
-libkrbd_la_OBJECTS = $(am_libkrbd_la_OBJECTS)
- at LINUX_TRUE@am_libkrbd_la_rpath =
 liblog_la_LIBADD =
 am_liblog_la_OBJECTS = log/Log.lo log/SubsystemMap.lo
 liblog_la_OBJECTS = $(am_liblog_la_OBJECTS)
 libmds_la_DEPENDENCIES = $(LIBOSDC)
-am_libmds_la_OBJECTS = mds/Capability.lo mds/MDS.lo mds/Beacon.lo \
-	mds/flock.lo mds/locks.lo mds/journal.lo mds/Server.lo \
-	mds/Mutation.lo mds/MDCache.lo mds/RecoveryQueue.lo \
+am_libmds_la_OBJECTS = mds/Anchor.lo mds/Capability.lo mds/Dumper.lo \
+	mds/Resetter.lo mds/MDS.lo mds/flock.lo mds/locks.lo \
+	mds/journal.lo mds/Server.lo mds/Mutation.lo mds/MDCache.lo \
 	mds/Locker.lo mds/Migrator.lo mds/MDBalancer.lo mds/CDentry.lo \
 	mds/CDir.lo mds/CInode.lo mds/LogEvent.lo mds/MDSTable.lo \
-	mds/InoTable.lo mds/JournalPointer.lo mds/MDSTableClient.lo \
-	mds/MDSTableServer.lo mds/SnapRealm.lo mds/SnapServer.lo \
-	mds/snap.lo mds/SessionMap.lo mds/MDSContext.lo mds/MDLog.lo \
-	common/TrackedOp.lo
+	mds/InoTable.lo mds/MDSTableClient.lo mds/MDSTableServer.lo \
+	mds/AnchorServer.lo mds/AnchorClient.lo mds/SnapRealm.lo \
+	mds/SnapServer.lo mds/snap.lo mds/SessionMap.lo mds/MDLog.lo \
+	mds/MDSUtility.lo
 libmds_la_OBJECTS = $(am_libmds_la_OBJECTS)
 @WITH_LIBZFS_TRUE at am__DEPENDENCIES_4 = libos_zfs.a
 am__DEPENDENCIES_5 = libos.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_4) $(am__append_12)
+	$(am__DEPENDENCIES_4)
 libmon_la_DEPENDENCIES = $(LIBAUTH) $(LIBCOMMON) $(am__DEPENDENCIES_5) \
 	$(LIBMON_TYPES)
 am_libmon_la_OBJECTS = mon/Monitor.lo mon/Paxos.lo mon/PaxosService.lo \
@@ -1251,24 +736,20 @@ libmon_types_la_OBJECTS = $(am_libmon_types_la_OBJECTS)
 libmsg_la_LIBADD =
 am_libmsg_la_OBJECTS = msg/Accepter.lo msg/DispatchQueue.lo \
 	msg/Message.lo msg/Messenger.lo msg/Pipe.lo \
-	msg/PipeConnection.lo msg/SimpleMessenger.lo msg/msg_types.lo
+	msg/SimpleMessenger.lo msg/msg_types.lo
 libmsg_la_OBJECTS = $(am_libmsg_la_OBJECTS)
- at WITH_KINETIC_TRUE@am__DEPENDENCIES_6 = libcrypto.a
-libos_la_DEPENDENCIES = $(LIBOS_TYPES) $(am__append_18) \
-	$(am__DEPENDENCIES_6)
+libos_la_DEPENDENCIES = $(LIBOS_TYPES)
 am__libos_la_SOURCES_DIST = os/chain_xattr.cc os/DBObjectMap.cc \
 	os/GenericObjectMap.cc os/FileJournal.cc os/FileStore.cc \
 	os/FlatIndex.cc os/GenericFileStoreBackend.cc os/HashIndex.cc \
 	os/IndexManager.cc os/JournalingObjectStore.cc \
 	os/LevelDBStore.cc os/LFNIndex.cc os/MemStore.cc \
-	os/KeyValueDB.cc os/KeyValueStore.cc os/ObjectStore.cc \
-	os/WBThrottle.cc common/TrackedOp.cc \
-	os/BtrfsFileStoreBackend.cc os/XfsFileStoreBackend.cc \
-	os/ZFSFileStoreBackend.cc os/KineticStore.cc
- at LINUX_TRUE@am__objects_7 = os/libos_la-BtrfsFileStoreBackend.lo
- at WITH_LIBXFS_TRUE@am__objects_8 = os/libos_la-XfsFileStoreBackend.lo
- at WITH_LIBZFS_TRUE@am__objects_9 = os/libos_la-ZFSFileStoreBackend.lo
- at WITH_KINETIC_TRUE@am__objects_10 = os/libos_la-KineticStore.lo
+	os/KeyValueStore.cc os/ObjectStore.cc os/WBThrottle.cc \
+	common/TrackedOp.cc os/BtrfsFileStoreBackend.cc \
+	os/XfsFileStoreBackend.cc os/ZFSFileStoreBackend.cc
+ at LINUX_TRUE@am__objects_5 = os/libos_la-BtrfsFileStoreBackend.lo
+ at WITH_LIBXFS_TRUE@am__objects_6 = os/libos_la-XfsFileStoreBackend.lo
+ at WITH_LIBZFS_TRUE@am__objects_7 = os/libos_la-ZFSFileStoreBackend.lo
 am_libos_la_OBJECTS = os/libos_la-chain_xattr.lo \
 	os/libos_la-DBObjectMap.lo os/libos_la-GenericObjectMap.lo \
 	os/libos_la-FileJournal.lo os/libos_la-FileStore.lo \
@@ -1277,28 +758,14 @@ am_libos_la_OBJECTS = os/libos_la-chain_xattr.lo \
 	os/libos_la-HashIndex.lo os/libos_la-IndexManager.lo \
 	os/libos_la-JournalingObjectStore.lo \
 	os/libos_la-LevelDBStore.lo os/libos_la-LFNIndex.lo \
-	os/libos_la-MemStore.lo os/libos_la-KeyValueDB.lo \
-	os/libos_la-KeyValueStore.lo os/libos_la-ObjectStore.lo \
-	os/libos_la-WBThrottle.lo os/libos_la-KeyValueDB.lo \
-	common/libos_la-TrackedOp.lo $(am__objects_7) $(am__objects_8) \
-	$(am__objects_9) $(am__objects_10)
+	os/libos_la-MemStore.lo os/libos_la-KeyValueStore.lo \
+	os/libos_la-ObjectStore.lo os/libos_la-WBThrottle.lo \
+	common/libos_la-TrackedOp.lo $(am__objects_5) $(am__objects_6) \
+	$(am__objects_7)
 libos_la_OBJECTS = $(am_libos_la_OBJECTS)
 libos_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libos_la_CXXFLAGS) \
 	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_SLIBROCKSDB_TRUE@libos_rocksdb_la_DEPENDENCIES =  \
- at WITH_SLIBROCKSDB_TRUE@	rocksdb/librocksdb.la
-am__libos_rocksdb_la_SOURCES_DIST = os/RocksDBStore.cc
- at WITH_DLIBROCKSDB_FALSE@@WITH_SLIBROCKSDB_TRUE at am_libos_rocksdb_la_OBJECTS = os/libos_rocksdb_la-RocksDBStore.lo
- at WITH_DLIBROCKSDB_TRUE@am_libos_rocksdb_la_OBJECTS =  \
- at WITH_DLIBROCKSDB_TRUE@	os/libos_rocksdb_la-RocksDBStore.lo
-libos_rocksdb_la_OBJECTS = $(am_libos_rocksdb_la_OBJECTS)
-libos_rocksdb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(libos_rocksdb_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
- at WITH_DLIBROCKSDB_TRUE@am_libos_rocksdb_la_rpath =
- at WITH_SLIBROCKSDB_TRUE@am_libos_rocksdb_la_rpath =
 libos_types_la_LIBADD =
 am_libos_types_la_OBJECTS = os/libos_types_la-Transaction.lo
 libos_types_la_OBJECTS = $(am_libos_types_la_OBJECTS)
@@ -1307,7 +774,7 @@ libos_types_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(libos_types_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 libosd_la_DEPENDENCIES = $(LIBOSDC) $(am__DEPENDENCIES_5) \
-	$(LIBOSD_TYPES) $(LIBOS_TYPES) $(am__append_29)
+	$(LIBOSD_TYPES) $(LIBOS_TYPES)
 am_libosd_la_OBJECTS = osd/libosd_la-PG.lo \
 	osd/libosd_la-ReplicatedPG.lo \
 	osd/libosd_la-ReplicatedBackend.lo osd/libosd_la-ECBackend.lo \
@@ -1338,43 +805,24 @@ libperfglue_la_DEPENDENCIES =
 am__libperfglue_la_SOURCES_DIST = perfglue/heap_profiler.cc \
 	perfglue/disabled_heap_profiler.cc perfglue/cpu_profiler.cc \
 	perfglue/disabled_stubs.cc
- at WITH_TCMALLOC_TRUE@am__objects_11 = perfglue/heap_profiler.lo
- at WITH_TCMALLOC_FALSE@am__objects_12 =  \
+ at WITH_TCMALLOC_TRUE@am__objects_8 = perfglue/heap_profiler.lo
+ at WITH_TCMALLOC_FALSE@am__objects_9 =  \
 @WITH_TCMALLOC_FALSE@	perfglue/disabled_heap_profiler.lo
- at WITH_PROFILER_TRUE@am__objects_13 = perfglue/cpu_profiler.lo
- at WITH_PROFILER_FALSE@am__objects_14 = perfglue/disabled_stubs.lo
-am_libperfglue_la_OBJECTS = $(am__objects_11) $(am__objects_12) \
-	$(am__objects_13) $(am__objects_14)
+ at WITH_PROFILER_TRUE@am__objects_10 = perfglue/cpu_profiler.lo
+ at WITH_PROFILER_FALSE@am__objects_11 = perfglue/disabled_stubs.lo
+am_libperfglue_la_OBJECTS = $(am__objects_8) $(am__objects_9) \
+	$(am__objects_10) $(am__objects_11)
 libperfglue_la_OBJECTS = $(am_libperfglue_la_OBJECTS)
 librados_la_DEPENDENCIES = $(LIBRADOS_DEPS) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
 am_librados_la_OBJECTS = librados/librados_la-librados.lo \
 	librados/librados_la-RadosClient.lo \
 	librados/librados_la-IoCtxImpl.lo \
-	librados/librados_la-snap_set_diff.lo \
-	librados/librados_la-RadosXattrIter.lo
+	librados/librados_la-snap_set_diff.lo
 librados_la_OBJECTS = $(am_librados_la_OBJECTS)
 librados_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(librados_la_CXXFLAGS) \
 	$(CXXFLAGS) $(librados_la_LDFLAGS) $(LDFLAGS) -o $@
-libradosstriper_la_DEPENDENCIES = $(LIBRADOSSTRIPER_DEPS)
-am_libradosstriper_la_OBJECTS =  \
-	libradosstriper/libradosstriper_la-libradosstriper.lo \
-	libradosstriper/libradosstriper_la-RadosStriperImpl.lo \
-	libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo
-libradosstriper_la_OBJECTS = $(am_libradosstriper_la_OBJECTS)
-libradosstriper_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) \
-	$(libradosstriper_la_LDFLAGS) $(LDFLAGS) -o $@
-libradosstripertest_la_DEPENDENCIES = $(RADOS_TEST_LDADD)
-am_libradosstripertest_la_OBJECTS =  \
-	test/libradosstriper/libradosstripertest_la-TestCase.lo
-libradosstripertest_la_OBJECTS = $(am_libradosstripertest_la_OBJECTS)
-libradosstripertest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(libradosstripertest_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
 libradostest_la_LIBADD =
 am_libradostest_la_OBJECTS = test/librados/libradostest_la-test.lo \
 	test/librados/libradostest_la-TestCase.lo
@@ -1385,7 +833,7 @@ libradostest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(LDFLAGS) -o $@
 librbd_la_DEPENDENCIES = $(LIBRADOS) $(LIBOSDC) libcls_rbd_client.la \
 	libcls_lock_client.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_2) $(am__append_53)
+	$(am__DEPENDENCIES_2)
 am_librbd_la_OBJECTS = librbd/librbd.lo librbd/AioCompletion.lo \
 	librbd/AioRequest.lo librbd/ImageCtx.lo librbd/internal.lo \
 	librbd/LibrbdWriteback.lo librbd/WatchCtx.lo
@@ -1393,19 +841,6 @@ librbd_la_OBJECTS = $(am_librbd_la_OBJECTS)
 librbd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
 	$(CXXFLAGS) $(librbd_la_LDFLAGS) $(LDFLAGS) -o $@
-am__DEPENDENCIES_7 = $(LIBGLOBAL) $(LIBCOMMON) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-librbd_replay_la_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_7)
-am_librbd_replay_la_OBJECTS = rbd_replay/actions.lo \
-	rbd_replay/Deser.lo rbd_replay/ImageNameMap.lo \
-	rbd_replay/PendingIO.lo rbd_replay/rbd_loc.lo \
-	rbd_replay/Replayer.lo rbd_replay/Ser.lo
-librbd_replay_la_OBJECTS = $(am_librbd_replay_la_OBJECTS)
-librbd_replay_ios_la_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_7) librbd_replay.la
-am_librbd_replay_ios_la_OBJECTS = rbd_replay/ios.lo
-librbd_replay_ios_la_OBJECTS = $(am_librbd_replay_ios_la_OBJECTS)
 librgw_la_LIBADD =
 am__librgw_la_SOURCES_DIST = rgw/librgw.cc rgw/rgw_acl.cc \
 	rgw/rgw_acl_s3.cc rgw/rgw_acl_swift.cc rgw/rgw_client_io.cc \
@@ -1458,11 +893,9 @@ librgw_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(librgw_la_CXXFLAGS) \
 	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 @WITH_RADOSGW_TRUE at am_librgw_la_rpath =
-libsecret_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libsecret_la_OBJECTS = common/secret.lo
-libsecret_la_OBJECTS = $(am_libsecret_la_OBJECTS)
- at LINUX_TRUE@am_libsecret_la_rpath =
- at LINUX_TRUE@libsystest_la_DEPENDENCIES = $(am__DEPENDENCIES_7)
+am__DEPENDENCIES_6 = $(LIBGLOBAL) $(LIBCOMMON) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+ at LINUX_TRUE@libsystest_la_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am__libsystest_la_SOURCES_DIST = test/system/cross_process_sem.cc \
 	test/system/systest_runnable.cc \
 	test/system/systest_settings.cc
@@ -1490,8 +923,7 @@ libsystest_la_OBJECTS = $(am_libsystest_la_OBJECTS)
 @WITH_RADOSGW_TRUE@	ceph_test_cls_rgw_opstate$(EXEEXT)
 @LINUX_TRUE at am__EXEEXT_5 = ceph_test_librbd_fsx$(EXEEXT)
 @WITH_RADOSGW_TRUE at am__EXEEXT_6 = ceph_test_cls_rgw$(EXEEXT)
- at LINUX_TRUE@am__EXEEXT_7 = ceph_test_objectstore$(EXEEXT) \
- at LINUX_TRUE@	ceph_test_filestore$(EXEEXT)
+ at LINUX_TRUE@am__EXEEXT_7 = ceph_test_objectstore$(EXEEXT)
 am__EXEEXT_8 = ceph_test_ioctls$(EXEEXT) $(am__EXEEXT_1) \
 	ceph_erasure_code_benchmark$(EXEEXT) \
 	ceph_erasure_code$(EXEEXT) ceph_test_timers$(EXEEXT) \
@@ -1510,7 +942,7 @@ am__EXEEXT_8 = ceph_test_ioctls$(EXEEXT) $(am__EXEEXT_1) \
 	ceph_test_cls_log$(EXEEXT) ceph_test_cls_statelog$(EXEEXT) \
 	ceph_test_cls_replica_log$(EXEEXT) ceph_test_cls_lock$(EXEEXT) \
 	ceph_test_cls_hello$(EXEEXT) $(am__EXEEXT_6) \
-	ceph_test_mon_workloadgen$(EXEEXT) ceph_test_mon_msg$(EXEEXT) \
+	ceph_test_mon_workloadgen$(EXEEXT) \
 	ceph_test_rados_api_cmd$(EXEEXT) \
 	ceph_test_rados_api_io$(EXEEXT) \
 	ceph_test_rados_api_c_write_operations$(EXEEXT) \
@@ -1524,12 +956,8 @@ am__EXEEXT_8 = ceph_test_ioctls$(EXEEXT) $(am__EXEEXT_1) \
 	ceph_test_rados_api_cls$(EXEEXT) \
 	ceph_test_rados_api_misc$(EXEEXT) \
 	ceph_test_rados_api_tier$(EXEEXT) \
-	ceph_test_rados_api_lock$(EXEEXT) \
-	ceph_test_rados_striper_api_io$(EXEEXT) \
-	ceph_test_rados_striper_api_aio$(EXEEXT) \
-	ceph_test_rados_striper_api_striping$(EXEEXT) \
-	ceph_test_libcephfs$(EXEEXT) $(am__EXEEXT_7) \
-	ceph_test_objectstore_workloadgen$(EXEEXT) \
+	ceph_test_rados_api_lock$(EXEEXT) ceph_test_libcephfs$(EXEEXT) \
+	$(am__EXEEXT_7) ceph_test_objectstore_workloadgen$(EXEEXT) \
 	ceph_test_filestore_idempotent$(EXEEXT) \
 	ceph_test_filestore_idempotent_sequence$(EXEEXT) \
 	ceph_xattr_bench$(EXEEXT) ceph_test_filejournal$(EXEEXT) \
@@ -1548,45 +976,41 @@ am__EXEEXT_8 = ceph_test_ioctls$(EXEEXT) $(am__EXEEXT_1) \
 @WITH_DEBUG_TRUE at am__EXEEXT_9 = $(am__EXEEXT_8)
 @WITH_RADOSGW_TRUE at am__EXEEXT_10 = radosgw$(EXEEXT) \
 @WITH_RADOSGW_TRUE@	radosgw-admin$(EXEEXT)
- at LINUX_TRUE@am__EXEEXT_11 = rbd-replay$(EXEEXT)
- at WITH_BABELTRACE_TRUE@am__EXEEXT_12 = rbd-replay-prep$(EXEEXT)
- at WITH_REST_BENCH_TRUE@am__EXEEXT_13 = rest-bench$(EXEEXT)
- at LINUX_TRUE@am__EXEEXT_14 = rbd$(EXEEXT)
- at WITH_FUSE_TRUE@am__EXEEXT_15 = ceph-fuse$(EXEEXT) rbd-fuse$(EXEEXT)
- at WITH_BETTER_YASM_ELF64_TRUE@am__EXEEXT_16 = unittest_erasure_code_isa$(EXEEXT) \
- at WITH_BETTER_YASM_ELF64_TRUE@	unittest_erasure_code_plugin_isa$(EXEEXT)
- at LINUX_TRUE@am__EXEEXT_17 = mount.ceph$(EXEEXT)
+ at WITH_REST_BENCH_TRUE@am__EXEEXT_11 = rest-bench$(EXEEXT)
+ at LINUX_TRUE@am__EXEEXT_12 = rbd$(EXEEXT)
+ at WITH_FUSE_TRUE@am__EXEEXT_13 = ceph-fuse$(EXEEXT) rbd-fuse$(EXEEXT)
+ at LINUX_TRUE@am__EXEEXT_14 = mount.ceph$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS) \
 	$(su_sbin_PROGRAMS)
 am_ceph_authtool_OBJECTS = tools/ceph_authtool.$(OBJEXT)
 ceph_authtool_OBJECTS = $(am_ceph_authtool_OBJECTS)
-ceph_authtool_DEPENDENCIES = $(am__DEPENDENCIES_7) $(LIBCOMMON)
+ceph_authtool_DEPENDENCIES = $(am__DEPENDENCIES_6) $(LIBCOMMON)
 am_ceph_client_debug_OBJECTS = tools/ceph-client-debug.$(OBJEXT)
 ceph_client_debug_OBJECTS = $(am_ceph_client_debug_OBJECTS)
-ceph_client_debug_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_7) \
+ceph_client_debug_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_6) \
 	$(LIBCOMMON)
 am_ceph_conf_OBJECTS = tools/ceph_conf.$(OBJEXT)
 ceph_conf_OBJECTS = $(am_ceph_conf_OBJECTS)
-ceph_conf_DEPENDENCIES = $(am__DEPENDENCIES_7) $(LIBCOMMON)
+ceph_conf_DEPENDENCIES = $(am__DEPENDENCIES_6) $(LIBCOMMON)
 am__ceph_dencoder_SOURCES_DIST = test/encoding/ceph_dencoder.cc \
 	rgw/rgw_dencoder.cc rgw/rgw_acl.cc rgw/rgw_common.cc \
 	rgw/rgw_env.cc rgw/rgw_json_enc.cc
- at WITH_RADOSGW_TRUE@am__objects_15 =  \
+ at WITH_RADOSGW_TRUE@am__objects_12 =  \
 @WITH_RADOSGW_TRUE@	rgw/ceph_dencoder-rgw_dencoder.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/ceph_dencoder-rgw_acl.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/ceph_dencoder-rgw_common.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/ceph_dencoder-rgw_env.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/ceph_dencoder-rgw_json_enc.$(OBJEXT)
-am__objects_16 = $(am__objects_15)
+am__objects_13 = $(am__objects_12)
 am_ceph_dencoder_OBJECTS =  \
 	test/encoding/ceph_dencoder-ceph_dencoder.$(OBJEXT) \
-	$(am__objects_16)
+	$(am__objects_13)
 ceph_dencoder_OBJECTS = $(am_ceph_dencoder_OBJECTS)
-am__DEPENDENCIES_8 = libperfglue.la $(am__DEPENDENCIES_1)
-am__DEPENDENCIES_9 = libmds.la $(am__DEPENDENCIES_8)
+am__DEPENDENCIES_7 = libperfglue.la $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_8 = libmds.la $(am__DEPENDENCIES_7)
 ceph_dencoder_DEPENDENCIES = $(LIBOSD_TYPES) $(LIBOS_TYPES) \
-	$(am__DEPENDENCIES_9) $(LIBMON_TYPES) $(DENCODER_DEPS) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_8) $(LIBMON_TYPES) $(DENCODER_DEPS) \
+	$(am__DEPENDENCIES_6)
 ceph_dencoder_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_dencoder_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
@@ -1595,63 +1019,79 @@ am__ceph_fuse_SOURCES_DIST = ceph_fuse.cc
 @WITH_FUSE_TRUE at am_ceph_fuse_OBJECTS = ceph_fuse.$(OBJEXT)
 ceph_fuse_OBJECTS = $(am_ceph_fuse_OBJECTS)
 @WITH_FUSE_TRUE at ceph_fuse_DEPENDENCIES = $(LIBCLIENT_FUSE) \
- at WITH_FUSE_TRUE@	$(am__DEPENDENCIES_7)
+ at WITH_FUSE_TRUE@	$(am__DEPENDENCIES_6)
 am_ceph_kvstore_tool_OBJECTS =  \
 	tools/ceph_kvstore_tool-ceph_kvstore_tool.$(OBJEXT)
 ceph_kvstore_tool_OBJECTS = $(am_ceph_kvstore_tool_OBJECTS)
 ceph_kvstore_tool_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 ceph_kvstore_tool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_kvstore_tool_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_ceph_mds_OBJECTS = ceph_mds.$(OBJEXT)
 ceph_mds_OBJECTS = $(am_ceph_mds_OBJECTS)
-ceph_mds_DEPENDENCIES = $(am__DEPENDENCIES_9) $(LIBOSDC) \
-	$(am__DEPENDENCIES_7) $(LIBCOMMON)
+ceph_mds_DEPENDENCIES = $(am__DEPENDENCIES_8) $(LIBOSDC) \
+	$(am__DEPENDENCIES_6) $(LIBCOMMON)
 am_ceph_mon_OBJECTS = ceph_mon.$(OBJEXT)
 ceph_mon_OBJECTS = $(am_ceph_mon_OBJECTS)
-am__DEPENDENCIES_10 = libmon.la $(am__DEPENDENCIES_8)
-ceph_mon_DEPENDENCIES = $(am__DEPENDENCIES_10) $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7) $(LIBCOMMON)
+am__DEPENDENCIES_9 = libmon.la $(am__DEPENDENCIES_7)
+ceph_mon_DEPENDENCIES = $(am__DEPENDENCIES_9) $(am__DEPENDENCIES_5) \
+	$(am__DEPENDENCIES_6) $(LIBCOMMON)
 am_ceph_monstore_tool_OBJECTS = tools/ceph_monstore_tool.$(OBJEXT)
 ceph_monstore_tool_OBJECTS = $(am_ceph_monstore_tool_OBJECTS)
 ceph_monstore_tool_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_6) $(am__DEPENDENCIES_1)
 am_ceph_osd_OBJECTS = ceph_osd.$(OBJEXT)
 ceph_osd_OBJECTS = $(am_ceph_osd_OBJECTS)
-am__DEPENDENCIES_11 = libosd.la $(LIBOSDC) $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_8)
-ceph_osd_DEPENDENCIES = $(am__DEPENDENCIES_11) $(am__DEPENDENCIES_7) \
+am__DEPENDENCIES_10 = libosd.la $(LIBOSDC) $(am__DEPENDENCIES_5) \
+	$(am__DEPENDENCIES_7)
+ceph_osd_DEPENDENCIES = $(am__DEPENDENCIES_10) $(am__DEPENDENCIES_6) \
 	$(LIBCOMMON)
 am_ceph_osdomap_tool_OBJECTS = tools/ceph_osdomap_tool.$(OBJEXT)
 ceph_osdomap_tool_OBJECTS = $(am_ceph_osdomap_tool_OBJECTS)
 ceph_osdomap_tool_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_6) $(am__DEPENDENCIES_1)
 am_ceph_syn_OBJECTS = ceph_syn.$(OBJEXT) \
 	client/SyntheticClient.$(OBJEXT)
 ceph_syn_OBJECTS = $(am_ceph_syn_OBJECTS)
-ceph_syn_DEPENDENCIES = $(LIBCLIENT) $(am__DEPENDENCIES_7)
+ceph_syn_DEPENDENCIES = $(LIBCLIENT) $(am__DEPENDENCIES_6)
 am_ceph_bench_log_OBJECTS = test/bench_log.$(OBJEXT)
 ceph_bench_log_OBJECTS = $(am_ceph_bench_log_OBJECTS)
-ceph_bench_log_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ceph_bench_log_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_ceph_dupstore_OBJECTS = tools/dupstore.$(OBJEXT)
 ceph_dupstore_OBJECTS = $(am_ceph_dupstore_OBJECTS)
 ceph_dupstore_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am_ceph_erasure_code_OBJECTS =  \
 	test/erasure-code/ceph_erasure_code.$(OBJEXT)
 ceph_erasure_code_OBJECTS = $(am_ceph_erasure_code_OBJECTS)
-ceph_erasure_code_DEPENDENCIES = $(am__DEPENDENCIES_11) $(LIBCOMMON) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_7) \
+ceph_erasure_code_DEPENDENCIES = $(am__DEPENDENCIES_10) $(LIBCOMMON) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_6) \
 	$(am__DEPENDENCIES_1)
 am_ceph_erasure_code_benchmark_OBJECTS =  \
-	erasure-code/ErasureCode.$(OBJEXT) \
 	test/erasure-code/ceph_erasure_code_benchmark.$(OBJEXT)
 ceph_erasure_code_benchmark_OBJECTS =  \
 	$(am_ceph_erasure_code_benchmark_OBJECTS)
-ceph_erasure_code_benchmark_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_7) \
+ceph_erasure_code_benchmark_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(LIBCOMMON) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_6) \
+	$(am__DEPENDENCIES_1)
+am_ceph_erasure_code_non_regression_OBJECTS =  \
+	test/erasure-code/ceph_erasure_code_non_regression.$(OBJEXT)
+ceph_erasure_code_non_regression_OBJECTS =  \
+	$(am_ceph_erasure_code_non_regression_OBJECTS)
+ceph_erasure_code_non_regression_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_10) $(LIBCOMMON) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_6) $(am__DEPENDENCIES_1)
+am_ceph_filestore_dump_OBJECTS = tools/ceph_filestore_dump.$(OBJEXT)
+ceph_filestore_dump_OBJECTS = $(am_ceph_filestore_dump_OBJECTS)
+ceph_filestore_dump_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_ceph_filestore_tool_OBJECTS = tools/ceph_filestore_tool.$(OBJEXT)
+ceph_filestore_tool_OBJECTS = $(am_ceph_filestore_tool_OBJECTS)
+ceph_filestore_tool_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) \
 	$(am__DEPENDENCIES_1)
 am__ceph_kvstorebench_SOURCES_DIST = test/kv_store_bench.cc \
 	key_value_store/kv_flat_btree_async.cc
@@ -1660,34 +1100,28 @@ am__ceph_kvstorebench_SOURCES_DIST = test/kv_store_bench.cc \
 @LINUX_TRUE@	key_value_store/kv_flat_btree_async.$(OBJEXT)
 ceph_kvstorebench_OBJECTS = $(am_ceph_kvstorebench_OBJECTS)
 @LINUX_TRUE at ceph_kvstorebench_DEPENDENCIES = $(LIBRADOS) \
- at LINUX_TRUE@	$(am__DEPENDENCIES_7)
+ at LINUX_TRUE@	$(am__DEPENDENCIES_6)
 am_ceph_mon_store_converter_OBJECTS =  \
 	tools/mon_store_converter.$(OBJEXT)
 ceph_mon_store_converter_OBJECTS =  \
 	$(am_ceph_mon_store_converter_OBJECTS)
-ceph_mon_store_converter_DEPENDENCIES = $(am__DEPENDENCIES_10) \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7)
+ceph_mon_store_converter_DEPENDENCIES = $(am__DEPENDENCIES_9) \
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6)
 am_ceph_multi_stress_watch_OBJECTS =  \
 	test/multi_stress_watch.$(OBJEXT)
 ceph_multi_stress_watch_OBJECTS =  \
 	$(am_ceph_multi_stress_watch_OBJECTS)
 ceph_multi_stress_watch_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_7) $(RADOS_TEST_LDADD)
-am_ceph_objectstore_tool_OBJECTS =  \
-	tools/ceph_objectstore_tool.$(OBJEXT)
-ceph_objectstore_tool_OBJECTS = $(am_ceph_objectstore_tool_OBJECTS)
-ceph_objectstore_tool_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7) \
-	$(am__DEPENDENCIES_1) $(LIBRADOS) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_6) $(RADOS_TEST_LDADD)
 am_ceph_omapbench_OBJECTS = test/omap_bench.$(OBJEXT)
 ceph_omapbench_OBJECTS = $(am_ceph_omapbench_OBJECTS)
-ceph_omapbench_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+ceph_omapbench_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am_ceph_psim_OBJECTS = tools/psim.$(OBJEXT)
 ceph_psim_OBJECTS = $(am_ceph_psim_OBJECTS)
-ceph_psim_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ceph_psim_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_ceph_radosacl_OBJECTS = tools/radosacl.$(OBJEXT)
 ceph_radosacl_OBJECTS = $(am_ceph_radosacl_OBJECTS)
-ceph_radosacl_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+ceph_radosacl_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am__ceph_rgw_jsonparser_SOURCES_DIST = rgw/rgw_jsonparser.cc \
 	rgw/rgw_common.cc rgw/rgw_env.cc rgw/rgw_json_enc.cc
 @WITH_RADOSGW_TRUE at am_ceph_rgw_jsonparser_OBJECTS =  \
@@ -1696,7 +1130,7 @@ am__ceph_rgw_jsonparser_SOURCES_DIST = rgw/rgw_jsonparser.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_env.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/rgw_json_enc.$(OBJEXT)
 ceph_rgw_jsonparser_OBJECTS = $(am_ceph_rgw_jsonparser_OBJECTS)
- at WITH_RADOSGW_TRUE@am__DEPENDENCIES_12 = $(LIBRADOS) \
+ at WITH_RADOSGW_TRUE@am__DEPENDENCIES_11 = $(LIBRADOS) \
 @WITH_RADOSGW_TRUE@	libcls_rgw_client.la libcls_log_client.a \
 @WITH_RADOSGW_TRUE@	libcls_statelog_client.a \
 @WITH_RADOSGW_TRUE@	libcls_user_client.a \
@@ -1704,30 +1138,30 @@ ceph_rgw_jsonparser_OBJECTS = $(am_ceph_rgw_jsonparser_OBJECTS)
 @WITH_RADOSGW_TRUE@	libcls_lock_client.la \
 @WITH_RADOSGW_TRUE@	libcls_refcount_client.la \
 @WITH_RADOSGW_TRUE@	libcls_version_client.a
-am__DEPENDENCIES_13 = $(am__DEPENDENCIES_12)
+am__DEPENDENCIES_12 = $(am__DEPENDENCIES_11)
 @WITH_RADOSGW_TRUE at ceph_rgw_jsonparser_DEPENDENCIES = $(LIBRGW) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_7)
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_12) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_6)
 am__ceph_rgw_multiparser_SOURCES_DIST = rgw/rgw_multiparser.cc
 @WITH_RADOSGW_TRUE at am_ceph_rgw_multiparser_OBJECTS =  \
 @WITH_RADOSGW_TRUE@	rgw/rgw_multiparser.$(OBJEXT)
 ceph_rgw_multiparser_OBJECTS = $(am_ceph_rgw_multiparser_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_rgw_multiparser_DEPENDENCIES = $(LIBRGW) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_7)
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_12) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_6)
 am_ceph_scratchtool_OBJECTS = tools/scratchtool.$(OBJEXT)
 ceph_scratchtool_OBJECTS = $(am_ceph_scratchtool_OBJECTS)
-ceph_scratchtool_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+ceph_scratchtool_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am_ceph_scratchtoolpp_OBJECTS = tools/scratchtoolpp.$(OBJEXT)
 ceph_scratchtoolpp_OBJECTS = $(am_ceph_scratchtoolpp_OBJECTS)
-ceph_scratchtoolpp_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+ceph_scratchtoolpp_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am_ceph_smalliobench_OBJECTS = test/bench/small_io_bench.$(OBJEXT) \
 	test/bench/rados_backend.$(OBJEXT) \
 	test/bench/detailed_stat_collector.$(OBJEXT) \
 	test/bench/bencher.$(OBJEXT)
 ceph_smalliobench_OBJECTS = $(am_ceph_smalliobench_OBJECTS)
 ceph_smalliobench_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am_ceph_smalliobenchdumb_OBJECTS =  \
 	test/bench/small_io_bench_dumb.$(OBJEXT) \
 	test/bench/dumb_backend.$(OBJEXT) \
@@ -1735,7 +1169,7 @@ am_ceph_smalliobenchdumb_OBJECTS =  \
 	test/bench/bencher.$(OBJEXT)
 ceph_smalliobenchdumb_OBJECTS = $(am_ceph_smalliobenchdumb_OBJECTS)
 ceph_smalliobenchdumb_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6)
 am_ceph_smalliobenchfs_OBJECTS =  \
 	test/bench/small_io_bench_fs.$(OBJEXT) \
 	test/bench/testfilestore_backend.$(OBJEXT) \
@@ -1743,7 +1177,7 @@ am_ceph_smalliobenchfs_OBJECTS =  \
 	test/bench/bencher.$(OBJEXT)
 ceph_smalliobenchfs_OBJECTS = $(am_ceph_smalliobenchfs_OBJECTS)
 ceph_smalliobenchfs_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6)
 am_ceph_smalliobenchrbd_OBJECTS =  \
 	test/bench/small_io_bench_rbd.$(OBJEXT) \
 	test/bench/rbd_backend.$(OBJEXT) \
@@ -1751,11 +1185,11 @@ am_ceph_smalliobenchrbd_OBJECTS =  \
 	test/bench/bencher.$(OBJEXT)
 ceph_smalliobenchrbd_OBJECTS = $(am_ceph_smalliobenchrbd_OBJECTS)
 ceph_smalliobenchrbd_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_6)
 am_ceph_streamtest_OBJECTS = test/streamtest.$(OBJEXT)
 ceph_streamtest_OBJECTS = $(am_ceph_streamtest_OBJECTS)
 ceph_streamtest_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am_ceph_test_c_headers_OBJECTS = test/test_c_headers.$(OBJEXT)
 ceph_test_c_headers_OBJECTS = $(am_ceph_test_c_headers_OBJECTS)
 ceph_test_c_headers_DEPENDENCIES = $(LIBRADOS) $(LIBCEPHFS)
@@ -1767,11 +1201,11 @@ ceph_test_cfuse_cache_invalidate_LDADD = $(LDADD)
 am_ceph_test_cls_hello_OBJECTS =  \
 	test/cls_hello/ceph_test_cls_hello-test_cls_hello.$(OBJEXT)
 ceph_test_cls_hello_OBJECTS = $(am_ceph_test_cls_hello_OBJECTS)
-am__DEPENDENCIES_14 = $(top_builddir)/src/gtest/lib/libgtest.a \
+am__DEPENDENCIES_13 = $(top_builddir)/src/gtest/lib/libgtest.a \
 	$(top_builddir)/src/gtest/lib/libgtest_main.a \
 	$(am__DEPENDENCIES_1)
 ceph_test_cls_hello_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(RADOS_TEST_LDADD)
 ceph_test_cls_hello_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1781,7 +1215,7 @@ am_ceph_test_cls_lock_OBJECTS =  \
 	test/cls_lock/ceph_test_cls_lock-test_cls_lock.$(OBJEXT)
 ceph_test_cls_lock_OBJECTS = $(am_ceph_test_cls_lock_OBJECTS)
 ceph_test_cls_lock_DEPENDENCIES = $(LIBRADOS) libcls_lock_client.la \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_cls_lock_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_cls_lock_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -1790,7 +1224,7 @@ am_ceph_test_cls_log_OBJECTS =  \
 	test/cls_log/ceph_test_cls_log-test_cls_log.$(OBJEXT)
 ceph_test_cls_log_OBJECTS = $(am_ceph_test_cls_log_OBJECTS)
 ceph_test_cls_log_DEPENDENCIES = $(LIBRADOS) libcls_log_client.a \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(RADOS_TEST_LDADD)
 ceph_test_cls_log_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1800,7 +1234,7 @@ am_ceph_test_cls_rbd_OBJECTS =  \
 	test/cls_rbd/ceph_test_cls_rbd-test_cls_rbd.$(OBJEXT)
 ceph_test_cls_rbd_OBJECTS = $(am_ceph_test_cls_rbd_OBJECTS)
 ceph_test_cls_rbd_DEPENDENCIES = $(LIBRADOS) libcls_rbd_client.la \
-	libcls_lock_client.la $(am__DEPENDENCIES_14) \
+	libcls_lock_client.la $(am__DEPENDENCIES_13) \
 	$(RADOS_TEST_LDADD)
 ceph_test_cls_rbd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1809,7 +1243,7 @@ ceph_test_cls_rbd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_ceph_test_cls_refcount_OBJECTS = test/cls_refcount/ceph_test_cls_refcount-test_cls_refcount.$(OBJEXT)
 ceph_test_cls_refcount_OBJECTS = $(am_ceph_test_cls_refcount_OBJECTS)
 ceph_test_cls_refcount_DEPENDENCIES = $(LIBRADOS) \
-	libcls_refcount_client.la $(am__DEPENDENCIES_14) \
+	libcls_refcount_client.la $(am__DEPENDENCIES_13) \
 	$(RADOS_TEST_LDADD)
 ceph_test_cls_refcount_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1819,8 +1253,8 @@ am_ceph_test_cls_replica_log_OBJECTS = test/cls_replica_log/ceph_test_cls_replic
 ceph_test_cls_replica_log_OBJECTS =  \
 	$(am_ceph_test_cls_replica_log_OBJECTS)
 ceph_test_cls_replica_log_DEPENDENCIES = $(LIBRADOS) \
-	libcls_replica_log_client.a $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7) $(RADOS_TEST_LDADD)
+	libcls_replica_log_client.a $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6) $(RADOS_TEST_LDADD)
 ceph_test_cls_replica_log_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_cls_replica_log_CXXFLAGS) $(CXXFLAGS) \
@@ -1829,7 +1263,7 @@ am__ceph_test_cls_rgw_SOURCES_DIST = test/cls_rgw/test_cls_rgw.cc
 @WITH_RADOSGW_TRUE at am_ceph_test_cls_rgw_OBJECTS = test/cls_rgw/ceph_test_cls_rgw-test_cls_rgw.$(OBJEXT)
 ceph_test_cls_rgw_OBJECTS = $(am_ceph_test_cls_rgw_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_test_cls_rgw_DEPENDENCIES = $(LIBRADOS) \
- at WITH_RADOSGW_TRUE@	libcls_rgw_client.la $(am__DEPENDENCIES_14) \
+ at WITH_RADOSGW_TRUE@	libcls_rgw_client.la $(am__DEPENDENCIES_13) \
 @WITH_RADOSGW_TRUE@	$(RADOS_TEST_LDADD)
 ceph_test_cls_rgw_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1839,8 +1273,8 @@ am__ceph_test_cls_rgw_log_SOURCES_DIST = test/test_rgw_admin_log.cc
 @WITH_RADOSGW_TRUE at am_ceph_test_cls_rgw_log_OBJECTS = test/ceph_test_cls_rgw_log-test_rgw_admin_log.$(OBJEXT)
 ceph_test_cls_rgw_log_OBJECTS = $(am_ceph_test_cls_rgw_log_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_test_cls_rgw_log_DEPENDENCIES = $(LIBRADOS) \
- at WITH_RADOSGW_TRUE@	$(LIBRGW) $(am__DEPENDENCIES_7) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_14) \
+ at WITH_RADOSGW_TRUE@	$(LIBRGW) $(am__DEPENDENCIES_6) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
 @WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_1) \
 @WITH_RADOSGW_TRUE@	libcls_version_client.a libcls_log_client.a \
 @WITH_RADOSGW_TRUE@	libcls_statelog_client.a \
@@ -1855,8 +1289,8 @@ am__ceph_test_cls_rgw_meta_SOURCES_DIST = test/test_rgw_admin_meta.cc
 @WITH_RADOSGW_TRUE at am_ceph_test_cls_rgw_meta_OBJECTS = test/ceph_test_cls_rgw_meta-test_rgw_admin_meta.$(OBJEXT)
 ceph_test_cls_rgw_meta_OBJECTS = $(am_ceph_test_cls_rgw_meta_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_test_cls_rgw_meta_DEPENDENCIES = $(LIBRADOS) \
- at WITH_RADOSGW_TRUE@	$(LIBRGW) $(am__DEPENDENCIES_7) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_14) \
+ at WITH_RADOSGW_TRUE@	$(LIBRGW) $(am__DEPENDENCIES_6) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
 @WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_1) \
 @WITH_RADOSGW_TRUE@	libcls_version_client.a libcls_log_client.a \
 @WITH_RADOSGW_TRUE@	libcls_statelog_client.a \
@@ -1873,8 +1307,8 @@ am__ceph_test_cls_rgw_opstate_SOURCES_DIST =  \
 ceph_test_cls_rgw_opstate_OBJECTS =  \
 	$(am_ceph_test_cls_rgw_opstate_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_test_cls_rgw_opstate_DEPENDENCIES =  \
- at WITH_RADOSGW_TRUE@	$(LIBRADOS) $(LIBRGW) $(am__DEPENDENCIES_7) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_14) \
+ at WITH_RADOSGW_TRUE@	$(LIBRADOS) $(LIBRGW) $(am__DEPENDENCIES_6) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
 @WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_1) \
 @WITH_RADOSGW_TRUE@	libcls_version_client.a libcls_log_client.a \
 @WITH_RADOSGW_TRUE@	libcls_statelog_client.a \
@@ -1888,8 +1322,8 @@ ceph_test_cls_rgw_opstate_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_ceph_test_cls_statelog_OBJECTS = test/cls_statelog/ceph_test_cls_statelog-test_cls_statelog.$(OBJEXT)
 ceph_test_cls_statelog_OBJECTS = $(am_ceph_test_cls_statelog_OBJECTS)
 ceph_test_cls_statelog_DEPENDENCIES = $(LIBRADOS) \
-	libcls_statelog_client.a $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7) $(RADOS_TEST_LDADD)
+	libcls_statelog_client.a $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6) $(RADOS_TEST_LDADD)
 ceph_test_cls_statelog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_cls_statelog_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -1897,7 +1331,7 @@ ceph_test_cls_statelog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_ceph_test_cls_version_OBJECTS = test/cls_version/ceph_test_cls_version-test_cls_version.$(OBJEXT)
 ceph_test_cls_version_OBJECTS = $(am_ceph_test_cls_version_OBJECTS)
 ceph_test_cls_version_DEPENDENCIES = $(LIBRADOS) \
-	libcls_version_client.a $(am__DEPENDENCIES_14) \
+	libcls_version_client.a $(am__DEPENDENCIES_13) \
 	$(RADOS_TEST_LDADD)
 ceph_test_cls_version_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1908,34 +1342,24 @@ am__ceph_test_cors_SOURCES_DIST = test/test_cors.cc
 @WITH_RADOSGW_TRUE@	test/ceph_test_cors-test_cors.$(OBJEXT)
 ceph_test_cors_OBJECTS = $(am_ceph_test_cors_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_test_cors_DEPENDENCIES = $(LIBRADOS) $(LIBRGW) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_7) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_14)
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_6) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13)
 ceph_test_cors_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_cors_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_ceph_test_crypto_OBJECTS = test/testcrypto.$(OBJEXT)
 ceph_test_crypto_OBJECTS = $(am_ceph_test_crypto_OBJECTS)
-ceph_test_crypto_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ceph_test_crypto_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_ceph_test_filejournal_OBJECTS =  \
 	test/ceph_test_filejournal-test_filejournal.$(OBJEXT)
 ceph_test_filejournal_OBJECTS = $(am_ceph_test_filejournal_OBJECTS)
 ceph_test_filejournal_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 ceph_test_filejournal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_filejournal_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__ceph_test_filestore_SOURCES_DIST =  \
-	test/filestore/TestFileStore.cc
- at LINUX_TRUE@am_ceph_test_filestore_OBJECTS = test/filestore/ceph_test_filestore-TestFileStore.$(OBJEXT)
-ceph_test_filestore_OBJECTS = $(am_ceph_test_filestore_OBJECTS)
- at LINUX_TRUE@ceph_test_filestore_DEPENDENCIES = $(am__DEPENDENCIES_5) \
- at LINUX_TRUE@	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
-ceph_test_filestore_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(ceph_test_filestore_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
 am_ceph_test_filestore_idempotent_OBJECTS =  \
 	test/objectstore/test_idempotent.$(OBJEXT) \
 	test/objectstore/FileStoreTracker.$(OBJEXT) \
@@ -1943,7 +1367,7 @@ am_ceph_test_filestore_idempotent_OBJECTS =  \
 ceph_test_filestore_idempotent_OBJECTS =  \
 	$(am_ceph_test_filestore_idempotent_OBJECTS)
 ceph_test_filestore_idempotent_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am_ceph_test_filestore_idempotent_sequence_OBJECTS =  \
 	test/objectstore/test_idempotent_sequence.$(OBJEXT) \
 	test/objectstore/DeterministicOpSequence.$(OBJEXT) \
@@ -1952,7 +1376,7 @@ am_ceph_test_filestore_idempotent_sequence_OBJECTS =  \
 ceph_test_filestore_idempotent_sequence_OBJECTS =  \
 	$(am_ceph_test_filestore_idempotent_sequence_OBJECTS)
 ceph_test_filestore_idempotent_sequence_DEPENDENCIES =  \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6)
 am_ceph_test_get_blkdev_size_OBJECTS =  \
 	test/test_get_blkdev_size.$(OBJEXT)
 ceph_test_get_blkdev_size_OBJECTS =  \
@@ -1963,13 +1387,13 @@ ceph_test_ioctls_OBJECTS = $(am_ceph_test_ioctls_OBJECTS)
 ceph_test_ioctls_LDADD = $(LDADD)
 am_ceph_test_keys_OBJECTS = test/testkeys.$(OBJEXT)
 ceph_test_keys_OBJECTS = $(am_ceph_test_keys_OBJECTS)
-ceph_test_keys_DEPENDENCIES = $(am__DEPENDENCIES_10) \
-	$(am__DEPENDENCIES_7)
+ceph_test_keys_DEPENDENCIES = $(am__DEPENDENCIES_9) \
+	$(am__DEPENDENCIES_6)
 am_ceph_test_keyvaluedb_atomicity_OBJECTS = test/ObjectMap/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.$(OBJEXT)
 ceph_test_keyvaluedb_atomicity_OBJECTS =  \
 	$(am_ceph_test_keyvaluedb_atomicity_OBJECTS)
 ceph_test_keyvaluedb_atomicity_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 ceph_test_keyvaluedb_atomicity_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_keyvaluedb_atomicity_CXXFLAGS) $(CXXFLAGS) \
@@ -1979,7 +1403,7 @@ am_ceph_test_keyvaluedb_iterators_OBJECTS = test/ObjectMap/ceph_test_keyvaluedb_
 ceph_test_keyvaluedb_iterators_OBJECTS =  \
 	$(am_ceph_test_keyvaluedb_iterators_OBJECTS)
 ceph_test_keyvaluedb_iterators_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 ceph_test_keyvaluedb_iterators_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_keyvaluedb_iterators_CXXFLAGS) $(CXXFLAGS) \
@@ -1990,7 +1414,7 @@ am_ceph_test_libcephfs_OBJECTS =  \
 	test/libcephfs/ceph_test_libcephfs-caps.$(OBJEXT) \
 	test/libcephfs/ceph_test_libcephfs-multiclient.$(OBJEXT)
 ceph_test_libcephfs_OBJECTS = $(am_ceph_test_libcephfs_OBJECTS)
-ceph_test_libcephfs_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_14)
+ceph_test_libcephfs_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_13)
 ceph_test_libcephfs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_libcephfs_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -1999,47 +1423,39 @@ am_ceph_test_librbd_OBJECTS =  \
 	test/librbd/ceph_test_librbd-test_librbd.$(OBJEXT)
 ceph_test_librbd_OBJECTS = $(am_ceph_test_librbd_OBJECTS)
 ceph_test_librbd_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(RADOS_TEST_LDADD)
 ceph_test_librbd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_librbd_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__ceph_test_librbd_fsx_SOURCES_DIST = test/librbd/fsx.c \
-	common/dummy.cc
+am__ceph_test_librbd_fsx_SOURCES_DIST = test/librbd/fsx.c
 @LINUX_TRUE at am_ceph_test_librbd_fsx_OBJECTS =  \
- at LINUX_TRUE@	test/librbd/ceph_test_librbd_fsx-fsx.$(OBJEXT) \
- at LINUX_TRUE@	common/dummy.$(OBJEXT)
+ at LINUX_TRUE@	test/librbd/ceph_test_librbd_fsx-fsx.$(OBJEXT)
 ceph_test_librbd_fsx_OBJECTS = $(am_ceph_test_librbd_fsx_OBJECTS)
- at LINUX_TRUE@ceph_test_librbd_fsx_DEPENDENCIES = $(LIBKRBD) $(LIBRBD) \
- at LINUX_TRUE@	$(LIBRADOS)
-am_ceph_test_mon_msg_OBJECTS =  \
-	test/mon/ceph_test_mon_msg-test-mon-msg.$(OBJEXT)
-ceph_test_mon_msg_OBJECTS = $(am_ceph_test_mon_msg_OBJECTS)
-ceph_test_mon_msg_DEPENDENCIES = $(am__DEPENDENCIES_5) $(LIBOSDC) \
-	$(am__DEPENDENCIES_7) $(am__DEPENDENCIES_14)
-ceph_test_mon_msg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(ceph_test_mon_msg_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ at LINUX_TRUE@ceph_test_librbd_fsx_DEPENDENCIES = $(LIBRBD) $(LIBRADOS)
+ceph_test_librbd_fsx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ceph_test_librbd_fsx_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_ceph_test_mon_workloadgen_OBJECTS =  \
 	test/mon/test_mon_workloadgen.$(OBJEXT)
 ceph_test_mon_workloadgen_OBJECTS =  \
 	$(am_ceph_test_mon_workloadgen_OBJECTS)
 ceph_test_mon_workloadgen_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(LIBOSDC) $(am__DEPENDENCIES_7)
+	$(LIBOSDC) $(am__DEPENDENCIES_6)
 am_ceph_test_msgr_OBJECTS = test/testmsgr.$(OBJEXT)
 ceph_test_msgr_OBJECTS = $(am_ceph_test_msgr_OBJECTS)
-ceph_test_msgr_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ceph_test_msgr_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_ceph_test_mutate_OBJECTS = test/test_mutate.$(OBJEXT)
 ceph_test_mutate_OBJECTS = $(am_ceph_test_mutate_OBJECTS)
-ceph_test_mutate_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+ceph_test_mutate_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am_ceph_test_object_map_OBJECTS =  \
 	test/ObjectMap/ceph_test_object_map-test_object_map.$(OBJEXT) \
 	test/ObjectMap/ceph_test_object_map-KeyValueDBMemory.$(OBJEXT)
 ceph_test_object_map_OBJECTS = $(am_ceph_test_object_map_OBJECTS)
 ceph_test_object_map_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 ceph_test_object_map_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_object_map_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2050,14 +1466,14 @@ am_ceph_test_objectcacher_stress_OBJECTS =  \
 ceph_test_objectcacher_stress_OBJECTS =  \
 	$(am_ceph_test_objectcacher_stress_OBJECTS)
 ceph_test_objectcacher_stress_DEPENDENCIES = $(LIBOSDC) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am__ceph_test_objectstore_SOURCES_DIST =  \
 	test/objectstore/store_test.cc
 @LINUX_TRUE at am_ceph_test_objectstore_OBJECTS = test/objectstore/ceph_test_objectstore-store_test.$(OBJEXT)
 ceph_test_objectstore_OBJECTS = $(am_ceph_test_objectstore_OBJECTS)
 @LINUX_TRUE at ceph_test_objectstore_DEPENDENCIES =  \
- at LINUX_TRUE@	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_14) \
- at LINUX_TRUE@	$(am__DEPENDENCIES_7)
+ at LINUX_TRUE@	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_13) \
+ at LINUX_TRUE@	$(am__DEPENDENCIES_6)
 ceph_test_objectstore_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_objectstore_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2068,18 +1484,18 @@ am_ceph_test_objectstore_workloadgen_OBJECTS =  \
 ceph_test_objectstore_workloadgen_OBJECTS =  \
 	$(am_ceph_test_objectstore_workloadgen_OBJECTS)
 ceph_test_objectstore_workloadgen_DEPENDENCIES =  \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6)
 am_ceph_test_rados_OBJECTS = test/osd/TestRados.$(OBJEXT) \
 	test/osd/TestOpStat.$(OBJEXT) test/osd/Object.$(OBJEXT) \
 	test/osd/RadosModel.$(OBJEXT)
 ceph_test_rados_OBJECTS = $(am_ceph_test_rados_OBJECTS)
-ceph_test_rados_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+ceph_test_rados_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am_ceph_test_rados_api_aio_OBJECTS =  \
 	test/librados/ceph_test_rados_api_aio-aio.$(OBJEXT)
 ceph_test_rados_api_aio_OBJECTS =  \
 	$(am_ceph_test_rados_api_aio_OBJECTS)
 ceph_test_rados_api_aio_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_aio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_aio_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2088,7 +1504,7 @@ am_ceph_test_rados_api_c_read_operations_OBJECTS = test/librados/ceph_test_rados
 ceph_test_rados_api_c_read_operations_OBJECTS =  \
 	$(am_ceph_test_rados_api_c_read_operations_OBJECTS)
 ceph_test_rados_api_c_read_operations_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_c_read_operations_LINK = $(LIBTOOL) $(AM_V_lt) \
 	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
 	$(CXXLD) $(ceph_test_rados_api_c_read_operations_CXXFLAGS) \
@@ -2097,7 +1513,7 @@ am_ceph_test_rados_api_c_write_operations_OBJECTS = test/librados/ceph_test_rado
 ceph_test_rados_api_c_write_operations_OBJECTS =  \
 	$(am_ceph_test_rados_api_c_write_operations_OBJECTS)
 ceph_test_rados_api_c_write_operations_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_c_write_operations_LINK = $(LIBTOOL) $(AM_V_lt) \
 	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
 	$(CXXLD) $(ceph_test_rados_api_c_write_operations_CXXFLAGS) \
@@ -2107,7 +1523,7 @@ am_ceph_test_rados_api_cls_OBJECTS =  \
 ceph_test_rados_api_cls_OBJECTS =  \
 	$(am_ceph_test_rados_api_cls_OBJECTS)
 ceph_test_rados_api_cls_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_cls_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_cls_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2117,7 +1533,7 @@ am_ceph_test_rados_api_cmd_OBJECTS =  \
 ceph_test_rados_api_cmd_OBJECTS =  \
 	$(am_ceph_test_rados_api_cmd_OBJECTS)
 ceph_test_rados_api_cmd_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_cmd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_cmd_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2126,7 +1542,7 @@ am_ceph_test_rados_api_io_OBJECTS =  \
 	test/librados/ceph_test_rados_api_io-io.$(OBJEXT)
 ceph_test_rados_api_io_OBJECTS = $(am_ceph_test_rados_api_io_OBJECTS)
 ceph_test_rados_api_io_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_io_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_io_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2136,7 +1552,7 @@ am_ceph_test_rados_api_list_OBJECTS =  \
 ceph_test_rados_api_list_OBJECTS =  \
 	$(am_ceph_test_rados_api_list_OBJECTS)
 ceph_test_rados_api_list_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_list_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_list_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2146,7 +1562,7 @@ am_ceph_test_rados_api_lock_OBJECTS =  \
 ceph_test_rados_api_lock_OBJECTS =  \
 	$(am_ceph_test_rados_api_lock_OBJECTS)
 ceph_test_rados_api_lock_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_lock_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_lock_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2156,7 +1572,7 @@ am_ceph_test_rados_api_misc_OBJECTS =  \
 ceph_test_rados_api_misc_OBJECTS =  \
 	$(am_ceph_test_rados_api_misc_OBJECTS)
 ceph_test_rados_api_misc_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(RADOS_TEST_LDADD)
 ceph_test_rados_api_misc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -2167,7 +1583,7 @@ am_ceph_test_rados_api_pool_OBJECTS =  \
 ceph_test_rados_api_pool_OBJECTS =  \
 	$(am_ceph_test_rados_api_pool_OBJECTS)
 ceph_test_rados_api_pool_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_pool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_pool_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2176,7 +1592,7 @@ am_ceph_test_rados_api_snapshots_OBJECTS = test/librados/ceph_test_rados_api_sna
 ceph_test_rados_api_snapshots_OBJECTS =  \
 	$(am_ceph_test_rados_api_snapshots_OBJECTS)
 ceph_test_rados_api_snapshots_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_snapshots_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_snapshots_CXXFLAGS) $(CXXFLAGS) \
@@ -2186,7 +1602,7 @@ am_ceph_test_rados_api_stat_OBJECTS =  \
 ceph_test_rados_api_stat_OBJECTS =  \
 	$(am_ceph_test_rados_api_stat_OBJECTS)
 ceph_test_rados_api_stat_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_stat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_rados_api_stat_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2197,7 +1613,7 @@ am_ceph_test_rados_api_tier_OBJECTS =  \
 ceph_test_rados_api_tier_OBJECTS =  \
 	$(am_ceph_test_rados_api_tier_OBJECTS)
 ceph_test_rados_api_tier_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(RADOS_TEST_LDADD)
 ceph_test_rados_api_tier_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -2207,7 +1623,7 @@ am_ceph_test_rados_api_watch_notify_OBJECTS = test/librados/ceph_test_rados_api_
 ceph_test_rados_api_watch_notify_OBJECTS =  \
 	$(am_ceph_test_rados_api_watch_notify_OBJECTS)
 ceph_test_rados_api_watch_notify_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_watch_notify_LINK = $(LIBTOOL) $(AM_V_lt) \
 	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
 	$(CXXLD) $(ceph_test_rados_api_watch_notify_CXXFLAGS) \
@@ -2248,36 +1664,6 @@ ceph_test_rados_open_pools_parallel_OBJECTS =  \
 	$(am_ceph_test_rados_open_pools_parallel_OBJECTS)
 @LINUX_TRUE at ceph_test_rados_open_pools_parallel_DEPENDENCIES =  \
 @LINUX_TRUE@	$(LIBRADOS) libsystest.la $(am__DEPENDENCIES_1)
-am_ceph_test_rados_striper_api_aio_OBJECTS = test/libradosstriper/ceph_test_rados_striper_api_aio-aio.$(OBJEXT)
-ceph_test_rados_striper_api_aio_OBJECTS =  \
-	$(am_ceph_test_rados_striper_api_aio_OBJECTS)
-ceph_test_rados_striper_api_aio_DEPENDENCIES = $(LIBRADOS) \
-	$(LIBRADOSSTRIPER) $(am__DEPENDENCIES_14) \
-	$(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_aio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(ceph_test_rados_striper_api_aio_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_ceph_test_rados_striper_api_io_OBJECTS = test/libradosstriper/ceph_test_rados_striper_api_io-io.$(OBJEXT)
-ceph_test_rados_striper_api_io_OBJECTS =  \
-	$(am_ceph_test_rados_striper_api_io_OBJECTS)
-ceph_test_rados_striper_api_io_DEPENDENCIES = $(LIBRADOS) \
-	$(LIBRADOSSTRIPER) $(am__DEPENDENCIES_14) \
-	$(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_io_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(ceph_test_rados_striper_api_io_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_ceph_test_rados_striper_api_striping_OBJECTS = test/libradosstriper/ceph_test_rados_striper_api_striping-striping.$(OBJEXT)
-ceph_test_rados_striper_api_striping_OBJECTS =  \
-	$(am_ceph_test_rados_striper_api_striping_OBJECTS)
-ceph_test_rados_striper_api_striping_DEPENDENCIES = $(LIBRADOS) \
-	$(LIBRADOSSTRIPER) $(am__DEPENDENCIES_14) \
-	$(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_striping_LINK = $(LIBTOOL) $(AM_V_lt) \
-	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CXXLD) $(ceph_test_rados_striper_api_striping_CXXFLAGS) \
-	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am__ceph_test_rados_watch_notify_SOURCES_DIST =  \
 	test/system/rados_watch_notify.cc \
 	test/system/st_rados_create_pool.cc \
@@ -2307,9 +1693,9 @@ am__ceph_test_rgw_manifest_SOURCES_DIST =  \
 @WITH_RADOSGW_TRUE at am_ceph_test_rgw_manifest_OBJECTS = test/rgw/ceph_test_rgw_manifest-test_rgw_manifest.$(OBJEXT)
 ceph_test_rgw_manifest_OBJECTS = $(am_ceph_test_rgw_manifest_OBJECTS)
 @WITH_RADOSGW_TRUE at ceph_test_rgw_manifest_DEPENDENCIES = $(LIBRADOS) \
- at WITH_RADOSGW_TRUE@	$(LIBRGW) $(am__DEPENDENCIES_13) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_7) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_14) \
+ at WITH_RADOSGW_TRUE@	$(LIBRGW) $(am__DEPENDENCIES_12) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_6) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
 @WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_1)
 ceph_test_rgw_manifest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -2319,12 +1705,12 @@ am_ceph_test_signal_handlers_OBJECTS =  \
 	test/TestSignalHandlers.$(OBJEXT)
 ceph_test_signal_handlers_OBJECTS =  \
 	$(am_ceph_test_signal_handlers_OBJECTS)
-ceph_test_signal_handlers_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ceph_test_signal_handlers_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_ceph_test_snap_mapper_OBJECTS =  \
 	test/ceph_test_snap_mapper-test_snap_mapper.$(OBJEXT)
 ceph_test_snap_mapper_OBJECTS = $(am_ceph_test_snap_mapper_OBJECTS)
-ceph_test_snap_mapper_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+ceph_test_snap_mapper_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 ceph_test_snap_mapper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_snap_mapper_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2333,28 +1719,28 @@ am_ceph_test_stress_watch_OBJECTS =  \
 	test/ceph_test_stress_watch-test_stress_watch.$(OBJEXT)
 ceph_test_stress_watch_OBJECTS = $(am_ceph_test_stress_watch_OBJECTS)
 ceph_test_stress_watch_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14) $(RADOS_TEST_LDADD)
+	$(am__DEPENDENCIES_13) $(RADOS_TEST_LDADD)
 ceph_test_stress_watch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_test_stress_watch_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_ceph_test_timers_OBJECTS = test/TestTimers.$(OBJEXT)
 ceph_test_timers_OBJECTS = $(am_ceph_test_timers_OBJECTS)
-ceph_test_timers_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ceph_test_timers_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_ceph_test_trans_OBJECTS = test/test_trans.$(OBJEXT)
 ceph_test_trans_OBJECTS = $(am_ceph_test_trans_OBJECTS)
 ceph_test_trans_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am_ceph_tpbench_OBJECTS = test/bench/tp_bench.$(OBJEXT) \
 	test/bench/detailed_stat_collector.$(OBJEXT)
 ceph_tpbench_OBJECTS = $(am_ceph_tpbench_OBJECTS)
 ceph_tpbench_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6)
 am_ceph_xattr_bench_OBJECTS =  \
 	test/ceph_xattr_bench-xattr_bench.$(OBJEXT)
 ceph_xattr_bench_OBJECTS = $(am_ceph_xattr_bench_OBJECTS)
 ceph_xattr_bench_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 ceph_xattr_bench_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(ceph_xattr_bench_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2362,45 +1748,35 @@ ceph_xattr_bench_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_cephfs_OBJECTS = cephfs.$(OBJEXT)
 cephfs_OBJECTS = $(am_cephfs_OBJECTS)
 cephfs_DEPENDENCIES = $(LIBCOMMON)
-am_cephfs_journal_tool_OBJECTS =  \
-	tools/cephfs/cephfs-journal-tool.$(OBJEXT) \
-	tools/cephfs/JournalTool.$(OBJEXT) \
-	tools/cephfs/JournalFilter.$(OBJEXT) \
-	tools/cephfs/JournalScanner.$(OBJEXT) \
-	tools/cephfs/EventOutput.$(OBJEXT) \
-	tools/cephfs/Dumper.$(OBJEXT) tools/cephfs/Resetter.$(OBJEXT) \
-	tools/cephfs/MDSUtility.$(OBJEXT)
-cephfs_journal_tool_OBJECTS = $(am_cephfs_journal_tool_OBJECTS)
-cephfs_journal_tool_DEPENDENCIES = $(am__DEPENDENCIES_9) $(LIBRADOS) \
-	$(am__DEPENDENCIES_7)
 am_crushtool_OBJECTS = tools/crushtool.$(OBJEXT)
 crushtool_OBJECTS = $(am_crushtool_OBJECTS)
-crushtool_DEPENDENCIES = $(am__DEPENDENCIES_7)
+crushtool_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_get_command_descriptions_OBJECTS =  \
 	test/common/get_command_descriptions.$(OBJEXT)
 get_command_descriptions_OBJECTS =  \
 	$(am_get_command_descriptions_OBJECTS)
-get_command_descriptions_DEPENDENCIES = $(am__DEPENDENCIES_10) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_7)
+get_command_descriptions_DEPENDENCIES = $(am__DEPENDENCIES_9) \
+	$(LIBCOMMON) $(am__DEPENDENCIES_6)
 am_librados_config_OBJECTS = librados-config.$(OBJEXT)
 librados_config_OBJECTS = $(am_librados_config_OBJECTS)
-librados_config_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_7)
+librados_config_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_6)
 am_monmaptool_OBJECTS = tools/monmaptool.$(OBJEXT)
 monmaptool_OBJECTS = $(am_monmaptool_OBJECTS)
-monmaptool_DEPENDENCIES = $(am__DEPENDENCIES_7) $(LIBCOMMON)
-am_mount_ceph_OBJECTS = mount/mount.ceph.$(OBJEXT)
+monmaptool_DEPENDENCIES = $(am__DEPENDENCIES_6) $(LIBCOMMON)
+am_mount_ceph_OBJECTS = mount/mount.ceph.$(OBJEXT) \
+	common/secret.$(OBJEXT)
 mount_ceph_OBJECTS = $(am_mount_ceph_OBJECTS)
-mount_ceph_DEPENDENCIES = $(LIBSECRET) $(LIBCOMMON)
+mount_ceph_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_1)
 am_osdmaptool_OBJECTS = tools/osdmaptool.$(OBJEXT)
 osdmaptool_OBJECTS = $(am_osdmaptool_OBJECTS)
-osdmaptool_DEPENDENCIES = $(am__DEPENDENCIES_7)
+osdmaptool_DEPENDENCIES = $(am__DEPENDENCIES_6)
 am_rados_OBJECTS = tools/rados/rados.$(OBJEXT) \
 	tools/rados/rados_import.$(OBJEXT) \
 	tools/rados/rados_export.$(OBJEXT) \
 	tools/rados/rados_sync.$(OBJEXT) common/obj_bencher.$(OBJEXT)
 rados_OBJECTS = $(am_rados_OBJECTS)
 rados_DEPENDENCIES = libcls_lock_client.la $(LIBRADOS) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_6)
 am__radosgw_SOURCES_DIST = rgw/rgw_resolve.cc rgw/rgw_rest.cc \
 	rgw/rgw_rest_swift.cc rgw/rgw_rest_s3.cc rgw/rgw_rest_usage.cc \
 	rgw/rgw_rest_user.cc rgw/rgw_rest_bucket.cc \
@@ -2433,54 +1809,46 @@ am__radosgw_SOURCES_DIST = rgw/rgw_resolve.cc rgw/rgw_rest.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_main.$(OBJEXT)
 radosgw_OBJECTS = $(am_radosgw_OBJECTS)
 @WITH_RADOSGW_TRUE at radosgw_DEPENDENCIES = $(LIBRGW) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_7)
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_12) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_6)
 am__radosgw_admin_SOURCES_DIST = rgw/rgw_admin.cc
 @WITH_RADOSGW_TRUE at am_radosgw_admin_OBJECTS = rgw/rgw_admin.$(OBJEXT)
 radosgw_admin_OBJECTS = $(am_radosgw_admin_OBJECTS)
 @WITH_RADOSGW_TRUE at radosgw_admin_DEPENDENCIES = $(LIBRGW) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_13) \
- at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_7)
-am_rbd_OBJECTS = rbd.$(OBJEXT)
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_12) \
+ at WITH_RADOSGW_TRUE@	$(am__DEPENDENCIES_6)
+am_rbd_OBJECTS = rbd.$(OBJEXT) common/secret.$(OBJEXT)
 rbd_OBJECTS = $(am_rbd_OBJECTS)
-rbd_DEPENDENCIES = $(LIBKRBD) $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_7)
+rbd_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) $(am__DEPENDENCIES_6) \
+	$(am__DEPENDENCIES_1)
 am__rbd_fuse_SOURCES_DIST = rbd_fuse/rbd-fuse.c
 @WITH_FUSE_TRUE at am_rbd_fuse_OBJECTS = rbd_fuse/rbd-fuse.$(OBJEXT)
 rbd_fuse_OBJECTS = $(am_rbd_fuse_OBJECTS)
 @WITH_FUSE_TRUE at rbd_fuse_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
- at WITH_FUSE_TRUE@	$(am__DEPENDENCIES_7)
-am_rbd_replay_OBJECTS = rbd_replay/rbd-replay.$(OBJEXT)
-rbd_replay_OBJECTS = $(am_rbd_replay_OBJECTS)
-rbd_replay_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) $(am__DEPENDENCIES_7) \
-	librbd_replay.la
-am_rbd_replay_prep_OBJECTS = rbd_replay/rbd-replay-prep.$(OBJEXT)
-rbd_replay_prep_OBJECTS = $(am_rbd_replay_prep_OBJECTS)
-rbd_replay_prep_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_7) librbd_replay.la librbd_replay_ios.la
+ at WITH_FUSE_TRUE@	$(am__DEPENDENCIES_6)
 am__rest_bench_SOURCES_DIST = tools/rest_bench.cc \
 	common/obj_bencher.cc
 @WITH_REST_BENCH_TRUE at am_rest_bench_OBJECTS =  \
 @WITH_REST_BENCH_TRUE@	tools/rest_bench-rest_bench.$(OBJEXT) \
 @WITH_REST_BENCH_TRUE@	common/rest_bench-obj_bencher.$(OBJEXT)
 rest_bench_OBJECTS = $(am_rest_bench_OBJECTS)
- at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at am__DEPENDENCIES_15 = libs3/build/lib/libs3.a
- at WITH_REST_BENCH_TRUE@rest_bench_DEPENDENCIES = $(am__DEPENDENCIES_7) \
+ at WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at am__DEPENDENCIES_14 = libs3/build/lib/libs3.a
+ at WITH_REST_BENCH_TRUE@rest_bench_DEPENDENCIES = $(am__DEPENDENCIES_6) \
 @WITH_REST_BENCH_TRUE@	$(am__DEPENDENCIES_1) \
- at WITH_REST_BENCH_TRUE@	$(am__DEPENDENCIES_15)
+ at WITH_REST_BENCH_TRUE@	$(am__DEPENDENCIES_14)
 rest_bench_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(rest_bench_CXXFLAGS) \
 	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am__test_build_libcephfs_SOURCES_DIST = test/buildtest_skeleton.cc \
 	osdc/Objecter.cc osdc/ObjectCacher.cc osdc/Filer.cc \
 	osdc/Striper.cc osdc/Journaler.cc
-am__objects_17 = osdc/test_build_libcephfs-Objecter.$(OBJEXT) \
+am__objects_14 = osdc/test_build_libcephfs-Objecter.$(OBJEXT) \
 	osdc/test_build_libcephfs-ObjectCacher.$(OBJEXT) \
 	osdc/test_build_libcephfs-Filer.$(OBJEXT) \
 	osdc/test_build_libcephfs-Striper.$(OBJEXT) \
 	osdc/test_build_libcephfs-Journaler.$(OBJEXT)
 @WITH_BUILD_TESTS_TRUE at am_test_build_libcephfs_OBJECTS = test/test_build_libcephfs-buildtest_skeleton.$(OBJEXT) \
- at WITH_BUILD_TESTS_TRUE@	$(am__objects_17)
+ at WITH_BUILD_TESTS_TRUE@	$(am__objects_14)
 test_build_libcephfs_OBJECTS = $(am_test_build_libcephfs_OBJECTS)
 @WITH_BUILD_TESTS_TRUE at test_build_libcephfs_DEPENDENCIES =  \
 @WITH_BUILD_TESTS_TRUE@	$(LIBCEPHFS) $(am__DEPENDENCIES_1) \
@@ -2505,7 +1873,7 @@ am__test_build_libcommon_SOURCES_DIST = test/buildtest_skeleton.cc \
 	common/snap_types.cc common/str_list.cc common/str_map.cc \
 	common/errno.cc common/RefCountedObj.cc common/blkdev.cc \
 	common/common_init.cc common/pipe.c common/ceph_argparse.cc \
-	common/ceph_context.cc common/buffer.cc common/types.cc \
+	common/ceph_context.cc common/buffer.cc \
 	common/code_environment.cc common/dout.cc common/histogram.cc \
 	common/signal.cc common/simple_spin.cc common/Thread.cc \
 	common/Formatter.cc common/HeartbeatMap.cc common/config.cc \
@@ -2516,11 +1884,11 @@ am__test_build_libcommon_SOURCES_DIST = test/buildtest_skeleton.cc \
 	common/pick_address.cc common/util.cc common/TextTable.cc \
 	common/ceph_fs.cc common/ceph_hash.cc common/ceph_strings.cc \
 	common/ceph_frag.cc common/addr_parsing.c common/hobject.cc \
-	common/bloom_filter.cc common/linux_version.c common/module.c \
-	mon/MonCap.cc mon/MonClient.cc mon/MonMap.cc osd/OSDMap.cc \
-	osd/osd_types.cc osd/ECMsgTypes.cc osd/HitSet.cc mds/MDSMap.cc \
+	common/bloom_filter.cc common/linux_version.c mon/MonCap.cc \
+	mon/MonClient.cc mon/MonMap.cc osd/OSDMap.cc osd/osd_types.cc \
+	osd/ECMsgTypes.cc osd/HitSet.cc mds/MDSMap.cc \
 	mds/inode_backtrace.cc mds/mdstypes.cc
-am__objects_18 = test_build_libcommon-ceph_ver.$(OBJEXT) \
+am__objects_15 = test_build_libcommon-ceph_ver.$(OBJEXT) \
 	common/test_build_libcommon-DecayCounter.$(OBJEXT) \
 	common/test_build_libcommon-LogClient.$(OBJEXT) \
 	common/test_build_libcommon-LogEntry.$(OBJEXT) \
@@ -2560,7 +1928,6 @@ am__objects_18 = test_build_libcommon-ceph_ver.$(OBJEXT) \
 	common/test_build_libcommon-ceph_argparse.$(OBJEXT) \
 	common/test_build_libcommon-ceph_context.$(OBJEXT) \
 	common/test_build_libcommon-buffer.$(OBJEXT) \
-	common/test_build_libcommon-types.$(OBJEXT) \
 	common/test_build_libcommon-code_environment.$(OBJEXT) \
 	common/test_build_libcommon-dout.$(OBJEXT) \
 	common/test_build_libcommon-histogram.$(OBJEXT) \
@@ -2593,7 +1960,6 @@ am__objects_18 = test_build_libcommon-ceph_ver.$(OBJEXT) \
 	common/test_build_libcommon-hobject.$(OBJEXT) \
 	common/test_build_libcommon-bloom_filter.$(OBJEXT) \
 	common/test_build_libcommon-linux_version.$(OBJEXT) \
-	common/test_build_libcommon-module.$(OBJEXT) \
 	mon/test_build_libcommon-MonCap.$(OBJEXT) \
 	mon/test_build_libcommon-MonClient.$(OBJEXT) \
 	mon/test_build_libcommon-MonMap.$(OBJEXT) \
@@ -2605,7 +1971,7 @@ am__objects_18 = test_build_libcommon-ceph_ver.$(OBJEXT) \
 	mds/test_build_libcommon-inode_backtrace.$(OBJEXT) \
 	mds/test_build_libcommon-mdstypes.$(OBJEXT)
 @WITH_BUILD_TESTS_TRUE at am_test_build_libcommon_OBJECTS = test/test_build_libcommon-buildtest_skeleton.$(OBJEXT) \
- at WITH_BUILD_TESTS_TRUE@	$(am__objects_18)
+ at WITH_BUILD_TESTS_TRUE@	$(am__objects_15)
 test_build_libcommon_OBJECTS = $(am_test_build_libcommon_OBJECTS)
 @WITH_BUILD_TESTS_TRUE at test_build_libcommon_DEPENDENCIES =  \
 @WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_3) \
@@ -2618,15 +1984,13 @@ test_build_libcommon_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(test_build_libcommon_LDFLAGS) $(LDFLAGS) -o $@
 am__test_build_librados_SOURCES_DIST = test/buildtest_skeleton.cc \
 	librados/librados.cc librados/RadosClient.cc \
-	librados/IoCtxImpl.cc librados/snap_set_diff.cc \
-	librados/RadosXattrIter.cc
-am__objects_19 = librados/test_build_librados-librados.$(OBJEXT) \
+	librados/IoCtxImpl.cc librados/snap_set_diff.cc
+am__objects_16 = librados/test_build_librados-librados.$(OBJEXT) \
 	librados/test_build_librados-RadosClient.$(OBJEXT) \
 	librados/test_build_librados-IoCtxImpl.$(OBJEXT) \
-	librados/test_build_librados-snap_set_diff.$(OBJEXT) \
-	librados/test_build_librados-RadosXattrIter.$(OBJEXT)
+	librados/test_build_librados-snap_set_diff.$(OBJEXT)
 @WITH_BUILD_TESTS_TRUE at am_test_build_librados_OBJECTS = test/test_build_librados-buildtest_skeleton.$(OBJEXT) \
- at WITH_BUILD_TESTS_TRUE@	$(am__objects_19)
+ at WITH_BUILD_TESTS_TRUE@	$(am__objects_16)
 test_build_librados_OBJECTS = $(am_test_build_librados_OBJECTS)
 @WITH_BUILD_TESTS_TRUE at test_build_librados_DEPENDENCIES =  \
 @WITH_BUILD_TESTS_TRUE@	$(LIBRADOS_DEPS) $(am__DEPENDENCIES_1) \
@@ -2649,7 +2013,7 @@ am__test_build_librgw_SOURCES_DIST = test/buildtest_skeleton.cc \
 	rgw/rgw_cors_s3.cc rgw/rgw_auth_s3.cc rgw/rgw_metadata.cc \
 	rgw/rgw_replica_log.cc rgw/rgw_keystone.cc rgw/rgw_quota.cc \
 	rgw/rgw_dencoder.cc
- at WITH_RADOSGW_TRUE@am__objects_20 =  \
+ at WITH_RADOSGW_TRUE@am__objects_17 =  \
 @WITH_RADOSGW_TRUE@	rgw/test_build_librgw-librgw.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/test_build_librgw-rgw_acl.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/test_build_librgw-rgw_acl_s3.$(OBJEXT) \
@@ -2685,22 +2049,22 @@ am__test_build_librgw_SOURCES_DIST = test/buildtest_skeleton.cc \
 @WITH_RADOSGW_TRUE@	rgw/test_build_librgw-rgw_quota.$(OBJEXT) \
 @WITH_RADOSGW_TRUE@	rgw/test_build_librgw-rgw_dencoder.$(OBJEXT)
 @WITH_BUILD_TESTS_TRUE at am_test_build_librgw_OBJECTS = test/test_build_librgw-buildtest_skeleton.$(OBJEXT) \
- at WITH_BUILD_TESTS_TRUE@	$(am__objects_20)
+ at WITH_BUILD_TESTS_TRUE@	$(am__objects_17)
 test_build_librgw_OBJECTS = $(am_test_build_librgw_OBJECTS)
 @WITH_BUILD_TESTS_TRUE at test_build_librgw_DEPENDENCIES =  \
- at WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_13) \
+ at WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_12) \
 @WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_1) \
 @WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_1) \
 @WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_2) \
- at WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_7)
+ at WITH_BUILD_TESTS_TRUE@	$(am__DEPENDENCIES_6)
 test_build_librgw_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(test_build_librgw_CXXFLAGS) $(CXXFLAGS) \
 	$(test_build_librgw_LDFLAGS) $(LDFLAGS) -o $@
 am_unittest_addrs_OBJECTS = test/unittest_addrs-test_addrs.$(OBJEXT)
 unittest_addrs_OBJECTS = $(am_unittest_addrs_OBJECTS)
-unittest_addrs_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_addrs_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_addrs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_addrs_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2708,23 +2072,23 @@ unittest_addrs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_admin_socket_OBJECTS =  \
 	test/unittest_admin_socket-admin_socket.$(OBJEXT)
 unittest_admin_socket_OBJECTS = $(am_unittest_admin_socket_OBJECTS)
-unittest_admin_socket_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_admin_socket_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_admin_socket_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_admin_socket_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_unittest_arch_OBJECTS = test/unittest_arch-test_arch.$(OBJEXT)
 unittest_arch_OBJECTS = $(am_unittest_arch_OBJECTS)
-unittest_arch_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_arch_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_arch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_arch_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
 am_unittest_base64_OBJECTS = test/unittest_base64-base64.$(OBJEXT)
 unittest_base64_OBJECTS = $(am_unittest_base64_OBJECTS)
-unittest_base64_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_14)
+unittest_base64_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_13)
 unittest_base64_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_base64_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2732,8 +2096,8 @@ unittest_base64_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_bloom_filter_OBJECTS =  \
 	test/common/unittest_bloom_filter-test_bloom_filter.$(OBJEXT)
 unittest_bloom_filter_OBJECTS = $(am_unittest_bloom_filter_OBJECTS)
-unittest_bloom_filter_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_bloom_filter_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_bloom_filter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_bloom_filter_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2741,8 +2105,8 @@ unittest_bloom_filter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_bufferlist_OBJECTS =  \
 	test/unittest_bufferlist-bufferlist.$(OBJEXT)
 unittest_bufferlist_OBJECTS = $(am_unittest_bufferlist_OBJECTS)
-unittest_bufferlist_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_bufferlist_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_bufferlist_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_bufferlist_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2750,8 +2114,8 @@ unittest_bufferlist_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_ceph_argparse_OBJECTS =  \
 	test/unittest_ceph_argparse-ceph_argparse.$(OBJEXT)
 unittest_ceph_argparse_OBJECTS = $(am_unittest_ceph_argparse_OBJECTS)
-unittest_ceph_argparse_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_ceph_argparse_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_ceph_argparse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_ceph_argparse_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2760,8 +2124,8 @@ am_unittest_ceph_compatset_OBJECTS =  \
 	test/unittest_ceph_compatset-ceph_compatset.$(OBJEXT)
 unittest_ceph_compatset_OBJECTS =  \
 	$(am_unittest_ceph_compatset_OBJECTS)
-unittest_ceph_compatset_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_ceph_compatset_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_ceph_compatset_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_ceph_compatset_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2769,8 +2133,8 @@ unittest_ceph_compatset_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_ceph_crypto_OBJECTS =  \
 	test/unittest_ceph_crypto-ceph_crypto.$(OBJEXT)
 unittest_ceph_crypto_OBJECTS = $(am_unittest_ceph_crypto_OBJECTS)
-unittest_ceph_crypto_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_ceph_crypto_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_ceph_crypto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_ceph_crypto_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2779,7 +2143,7 @@ am_unittest_chain_xattr_OBJECTS =  \
 	test/objectstore/unittest_chain_xattr-chain_xattr.$(OBJEXT)
 unittest_chain_xattr_OBJECTS = $(am_unittest_chain_xattr_OBJECTS)
 unittest_chain_xattr_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_chain_xattr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_chain_xattr_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2787,8 +2151,8 @@ unittest_chain_xattr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_config_OBJECTS =  \
 	test/common/unittest_config-test_config.$(OBJEXT)
 unittest_config_OBJECTS = $(am_unittest_config_OBJECTS)
-unittest_config_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_config_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_config_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2796,8 +2160,8 @@ unittest_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_confutils_OBJECTS =  \
 	test/unittest_confutils-confutils.$(OBJEXT)
 unittest_confutils_OBJECTS = $(am_unittest_confutils_OBJECTS)
-unittest_confutils_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_confutils_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_confutils_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_confutils_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2805,8 +2169,8 @@ unittest_confutils_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_context_OBJECTS =  \
 	test/common/unittest_context-test_context.$(OBJEXT)
 unittest_context_OBJECTS = $(am_unittest_context_OBJECTS)
-unittest_context_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_context_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_context_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_context_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2814,8 +2178,8 @@ unittest_context_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_crc32c_OBJECTS =  \
 	test/common/unittest_crc32c-test_crc32c.$(OBJEXT)
 unittest_crc32c_OBJECTS = $(am_unittest_crc32c_OBJECTS)
-unittest_crc32c_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_crc32c_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_crc32c_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_crc32c_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2824,8 +2188,8 @@ am_unittest_crush_indep_OBJECTS =  \
 	test/crush/unittest_crush_indep-indep.$(OBJEXT)
 unittest_crush_indep_OBJECTS = $(am_unittest_crush_indep_OBJECTS)
 unittest_crush_indep_DEPENDENCIES = $(LIBCOMMON) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_2) \
-	$(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_6)
 unittest_crush_indep_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_crush_indep_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2833,16 +2197,16 @@ unittest_crush_indep_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_crush_wrapper_OBJECTS =  \
 	test/crush/unittest_crush_wrapper-TestCrushWrapper.$(OBJEXT)
 unittest_crush_wrapper_OBJECTS = $(am_unittest_crush_wrapper_OBJECTS)
-unittest_crush_wrapper_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7) $(LIBCRUSH)
+unittest_crush_wrapper_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6) $(LIBCRUSH)
 unittest_crush_wrapper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_crush_wrapper_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_unittest_crypto_OBJECTS = test/unittest_crypto-crypto.$(OBJEXT)
 unittest_crypto_OBJECTS = $(am_unittest_crypto_OBJECTS)
-unittest_crypto_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_crypto_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_crypto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_crypto_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2850,8 +2214,8 @@ unittest_crypto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_crypto_init_OBJECTS =  \
 	test/unittest_crypto_init-crypto_init.$(OBJEXT)
 unittest_crypto_init_OBJECTS = $(am_unittest_crypto_init_OBJECTS)
-unittest_crypto_init_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_crypto_init_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_crypto_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_crypto_init_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2859,8 +2223,8 @@ unittest_crypto_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_daemon_config_OBJECTS =  \
 	test/unittest_daemon_config-daemon_config.$(OBJEXT)
 unittest_daemon_config_OBJECTS = $(am_unittest_daemon_config_OBJECTS)
-unittest_daemon_config_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_daemon_config_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_daemon_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_daemon_config_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2868,8 +2232,8 @@ unittest_daemon_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_ecbackend_OBJECTS =  \
 	test/osd/unittest_ecbackend-TestECBackend.$(OBJEXT)
 unittest_ecbackend_OBJECTS = $(am_unittest_ecbackend_OBJECTS)
-unittest_ecbackend_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+unittest_ecbackend_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_ecbackend_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_ecbackend_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -2878,52 +2242,21 @@ am_unittest_encoding_OBJECTS =  \
 	test/unittest_encoding-encoding.$(OBJEXT)
 unittest_encoding_OBJECTS = $(am_unittest_encoding_OBJECTS)
 unittest_encoding_DEPENDENCIES = $(LIBCEPHFS) $(LIBRADOS) \
-	$(am__DEPENDENCIES_14)
+	$(am__DEPENDENCIES_13)
 unittest_encoding_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_encoding_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_unittest_erasure_code_OBJECTS =  \
-	erasure-code/unittest_erasure_code-ErasureCode.$(OBJEXT) \
-	test/erasure-code/unittest_erasure_code-TestErasureCode.$(OBJEXT)
-unittest_erasure_code_OBJECTS = $(am_unittest_erasure_code_OBJECTS)
-unittest_erasure_code_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
-unittest_erasure_code_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
-am_unittest_erasure_code_example_OBJECTS = erasure-code/unittest_erasure_code_example-ErasureCode.$(OBJEXT) \
-	test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.$(OBJEXT)
+am_unittest_erasure_code_example_OBJECTS = test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.$(OBJEXT)
 unittest_erasure_code_example_OBJECTS =  \
 	$(am_unittest_erasure_code_example_OBJECTS)
-unittest_erasure_code_example_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+unittest_erasure_code_example_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(LIBCOMMON) $(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_erasure_code_example_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am__unittest_erasure_code_isa_SOURCES_DIST =  \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodeIsa.cc
- at WITH_BETTER_YASM_ELF64_TRUE@am_unittest_erasure_code_isa_OBJECTS = erasure-code/unittest_erasure_code_isa-ErasureCode.$(OBJEXT) \
- at WITH_BETTER_YASM_ELF64_TRUE@	test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.$(OBJEXT)
-unittest_erasure_code_isa_OBJECTS =  \
-	$(am_unittest_erasure_code_isa_OBJECTS)
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_isa_DEPENDENCIES =  \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_11) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBCOMMON) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_14) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_7) \
- at WITH_BETTER_YASM_ELF64_TRUE@	.libs/libec_isa.la \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBERASURE_CODE) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_1)
-unittest_erasure_code_isa_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am__objects_21 = erasure-code/unittest_erasure_code_jerasure-ErasureCode.$(OBJEXT) \
-	erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-cauchy.$(OBJEXT) \
+am__objects_18 = erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-cauchy.$(OBJEXT) \
 	erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-galois.$(OBJEXT) \
 	erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-jerasure.$(OBJEXT) \
 	erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-liberation.$(OBJEXT) \
@@ -2942,85 +2275,40 @@ am__objects_21 = erasure-code/unittest_erasure_code_jerasure-ErasureCode.$(OBJEX
 	erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.$(OBJEXT) \
 	erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodeJerasure.$(OBJEXT)
 am_unittest_erasure_code_jerasure_OBJECTS = test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.$(OBJEXT) \
-	$(am__objects_21)
+	$(am__objects_18)
 unittest_erasure_code_jerasure_OBJECTS =  \
 	$(am_unittest_erasure_code_jerasure_OBJECTS)
-unittest_erasure_code_jerasure_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+unittest_erasure_code_jerasure_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(LIBCOMMON) $(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(am__DEPENDENCIES_1)
 unittest_erasure_code_jerasure_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am__objects_22 =  \
-	erasure-code/unittest_erasure_code_lrc-ErasureCode.$(OBJEXT) \
-	erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.$(OBJEXT) \
-	erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.$(OBJEXT)
-am_unittest_erasure_code_lrc_OBJECTS = test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.$(OBJEXT) \
-	$(am__objects_22)
-unittest_erasure_code_lrc_OBJECTS =  \
-	$(am_unittest_erasure_code_lrc_OBJECTS)
-unittest_erasure_code_lrc_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
-	$(am__DEPENDENCIES_1)
-unittest_erasure_code_lrc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_unittest_erasure_code_plugin_OBJECTS = erasure-code/unittest_erasure_code_plugin-ErasureCode.$(OBJEXT) \
-	test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.$(OBJEXT)
+am_unittest_erasure_code_plugin_OBJECTS = test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.$(OBJEXT)
 unittest_erasure_code_plugin_OBJECTS =  \
 	$(am_unittest_erasure_code_plugin_OBJECTS)
-unittest_erasure_code_plugin_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(LIBCOMMON) $(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+unittest_erasure_code_plugin_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(LIBCOMMON) $(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(am__DEPENDENCIES_1)
 unittest_erasure_code_plugin_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am__unittest_erasure_code_plugin_isa_SOURCES_DIST =  \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodePluginIsa.cc
- at WITH_BETTER_YASM_ELF64_TRUE@am_unittest_erasure_code_plugin_isa_OBJECTS = erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.$(OBJEXT) \
- at WITH_BETTER_YASM_ELF64_TRUE@	test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.$(OBJEXT)
-unittest_erasure_code_plugin_isa_OBJECTS =  \
-	$(am_unittest_erasure_code_plugin_isa_OBJECTS)
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_plugin_isa_DEPENDENCIES =  \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_11) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBCOMMON) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_14) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_7) \
- at WITH_BETTER_YASM_ELF64_TRUE@	.libs/libec_isa.la \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBERASURE_CODE) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__DEPENDENCIES_1)
-unittest_erasure_code_plugin_isa_LINK = $(LIBTOOL) $(AM_V_lt) \
-	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CXXLD) $(unittest_erasure_code_plugin_isa_CXXFLAGS) \
-	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am_unittest_erasure_code_plugin_jerasure_OBJECTS = test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.$(OBJEXT)
 unittest_erasure_code_plugin_jerasure_OBJECTS =  \
 	$(am_unittest_erasure_code_plugin_jerasure_OBJECTS)
 unittest_erasure_code_plugin_jerasure_DEPENDENCIES =  \
-	$(am__DEPENDENCIES_11) $(LIBCOMMON) $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_10) $(LIBCOMMON) $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6) $(am__DEPENDENCIES_1)
 unittest_erasure_code_plugin_jerasure_LINK = $(LIBTOOL) $(AM_V_lt) \
 	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
 	$(CXXLD) $(unittest_erasure_code_plugin_jerasure_CXXFLAGS) \
 	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_unittest_erasure_code_plugin_lrc_OBJECTS = test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.$(OBJEXT)
-unittest_erasure_code_plugin_lrc_OBJECTS =  \
-	$(am_unittest_erasure_code_plugin_lrc_OBJECTS)
-unittest_erasure_code_plugin_lrc_DEPENDENCIES =  \
-	$(am__DEPENDENCIES_11) $(LIBCOMMON) $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7) $(am__DEPENDENCIES_1)
-unittest_erasure_code_plugin_lrc_LINK = $(LIBTOOL) $(AM_V_lt) \
-	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CXXLD) $(unittest_erasure_code_plugin_lrc_CXXFLAGS) \
-	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am_unittest_escape_OBJECTS = test/unittest_escape-escape.$(OBJEXT)
 unittest_escape_OBJECTS = $(am_unittest_escape_OBJECTS)
-unittest_escape_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_escape_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_escape_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_escape_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3029,7 +2317,7 @@ am_unittest_flatindex_OBJECTS =  \
 	test/os/unittest_flatindex-TestFlatIndex.$(OBJEXT)
 unittest_flatindex_OBJECTS = $(am_unittest_flatindex_OBJECTS)
 unittest_flatindex_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_flatindex_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_flatindex_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3038,16 +2326,16 @@ am_unittest_formatter_OBJECTS =  \
 	test/unittest_formatter-formatter.$(OBJEXT) \
 	rgw/unittest_formatter-rgw_formats.$(OBJEXT)
 unittest_formatter_OBJECTS = $(am_unittest_formatter_OBJECTS)
-unittest_formatter_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_formatter_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_formatter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_formatter_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_unittest_gather_OBJECTS = test/unittest_gather-gather.$(OBJEXT)
 unittest_gather_OBJECTS = $(am_unittest_gather_OBJECTS)
-unittest_gather_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_gather_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_gather_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_gather_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3056,7 +2344,7 @@ am_unittest_heartbeatmap_OBJECTS =  \
 	test/unittest_heartbeatmap-heartbeat_map.$(OBJEXT)
 unittest_heartbeatmap_OBJECTS = $(am_unittest_heartbeatmap_OBJECTS)
 unittest_heartbeatmap_DEPENDENCIES = $(LIBCOMMON) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_heartbeatmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_heartbeatmap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3064,8 +2352,8 @@ unittest_heartbeatmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_histogram_OBJECTS =  \
 	test/common/unittest_histogram-histogram.$(OBJEXT)
 unittest_histogram_OBJECTS = $(am_unittest_histogram_OBJECTS)
-unittest_histogram_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_histogram_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_histogram_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_histogram_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3073,8 +2361,8 @@ unittest_histogram_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_hitset_OBJECTS =  \
 	test/osd/unittest_hitset-hitset.$(OBJEXT)
 unittest_hitset_OBJECTS = $(am_unittest_hitset_OBJECTS)
-unittest_hitset_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+unittest_hitset_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_hitset_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_hitset_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3082,8 +2370,8 @@ unittest_hitset_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_io_priority_OBJECTS =  \
 	test/common/unittest_io_priority-test_io_priority.$(OBJEXT)
 unittest_io_priority_OBJECTS = $(am_unittest_io_priority_OBJECTS)
-unittest_io_priority_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_io_priority_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_io_priority_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_io_priority_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3091,8 +2379,8 @@ unittest_io_priority_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_ipaddr_OBJECTS =  \
 	test/unittest_ipaddr-test_ipaddr.$(OBJEXT)
 unittest_ipaddr_OBJECTS = $(am_unittest_ipaddr_OBJECTS)
-unittest_ipaddr_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_ipaddr_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_ipaddr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_ipaddr_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3101,7 +2389,7 @@ am_unittest_lfnindex_OBJECTS =  \
 	test/os/unittest_lfnindex-TestLFNIndex.$(OBJEXT)
 unittest_lfnindex_OBJECTS = $(am_unittest_lfnindex_OBJECTS)
 unittest_lfnindex_DEPENDENCIES = $(am__DEPENDENCIES_5) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_lfnindex_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_lfnindex_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3111,7 +2399,7 @@ am_unittest_libcephfs_config_OBJECTS =  \
 unittest_libcephfs_config_OBJECTS =  \
 	$(am_unittest_libcephfs_config_OBJECTS)
 unittest_libcephfs_config_DEPENDENCIES = $(LIBCEPHFS) \
-	$(am__DEPENDENCIES_14)
+	$(am__DEPENDENCIES_13)
 unittest_libcephfs_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_libcephfs_config_CXXFLAGS) $(CXXFLAGS) \
@@ -3119,7 +2407,7 @@ unittest_libcephfs_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_librados_OBJECTS =  \
 	test/librados/unittest_librados-librados.$(OBJEXT)
 unittest_librados_OBJECTS = $(am_unittest_librados_OBJECTS)
-unittest_librados_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_14)
+unittest_librados_DEPENDENCIES = $(LIBRADOS) $(am__DEPENDENCIES_13)
 unittest_librados_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_librados_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3128,28 +2416,21 @@ am_unittest_librados_config_OBJECTS = test/librados/unittest_librados_config-lib
 unittest_librados_config_OBJECTS =  \
 	$(am_unittest_librados_config_OBJECTS)
 unittest_librados_config_DEPENDENCIES = $(LIBRADOS) \
-	$(am__DEPENDENCIES_14)
+	$(am__DEPENDENCIES_13)
 unittest_librados_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_librados_config_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_unittest_log_OBJECTS = log/unittest_log-test.$(OBJEXT)
 unittest_log_OBJECTS = $(am_unittest_log_OBJECTS)
-unittest_log_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_14)
+unittest_log_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_13)
 unittest_log_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(unittest_log_CXXFLAGS) \
 	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_unittest_lru_OBJECTS = test/common/unittest_lru-test_lru.$(OBJEXT)
-unittest_lru_OBJECTS = $(am_unittest_lru_OBJECTS)
-unittest_lru_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
-unittest_lru_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(unittest_lru_CXXFLAGS) \
-	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am_unittest_mime_OBJECTS = test/unittest_mime-mime.$(OBJEXT)
 unittest_mime_OBJECTS = $(am_unittest_mime_OBJECTS)
-unittest_mime_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_mime_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_mime_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_mime_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
@@ -3157,8 +2438,8 @@ unittest_mime_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_mon_moncap_OBJECTS =  \
 	test/mon/unittest_mon_moncap-moncap.$(OBJEXT)
 unittest_mon_moncap_OBJECTS = $(am_unittest_mon_moncap_OBJECTS)
-unittest_mon_moncap_DEPENDENCIES = $(am__DEPENDENCIES_10) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+unittest_mon_moncap_DEPENDENCIES = $(am__DEPENDENCIES_9) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_mon_moncap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_mon_moncap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3166,8 +2447,8 @@ unittest_mon_moncap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_mon_pgmap_OBJECTS =  \
 	test/mon/unittest_mon_pgmap-PGMap.$(OBJEXT)
 unittest_mon_pgmap_OBJECTS = $(am_unittest_mon_pgmap_OBJECTS)
-unittest_mon_pgmap_DEPENDENCIES = $(am__DEPENDENCIES_10) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+unittest_mon_pgmap_DEPENDENCIES = $(am__DEPENDENCIES_9) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_mon_pgmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_mon_pgmap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3178,8 +2459,8 @@ unittest_on_exit_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am_unittest_osd_osdcap_OBJECTS =  \
 	test/osd/unittest_osd_osdcap-osdcap.$(OBJEXT)
 unittest_osd_osdcap_OBJECTS = $(am_unittest_osd_osdcap_OBJECTS)
-unittest_osd_osdcap_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7)
+unittest_osd_osdcap_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6)
 unittest_osd_osdcap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_osd_osdcap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3187,8 +2468,8 @@ unittest_osd_osdcap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_osd_types_OBJECTS =  \
 	test/osd/unittest_osd_types-types.$(OBJEXT)
 unittest_osd_types_OBJECTS = $(am_unittest_osd_types_OBJECTS)
-unittest_osd_types_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_osd_types_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_osd_types_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_osd_types_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3196,8 +2477,8 @@ unittest_osd_types_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_osdmap_OBJECTS =  \
 	test/osd/unittest_osdmap-TestOSDMap.$(OBJEXT)
 unittest_osdmap_OBJECTS = $(am_unittest_osdmap_OBJECTS)
-unittest_osdmap_DEPENDENCIES = $(am__DEPENDENCIES_14) $(LIBCOMMON) \
-	$(am__DEPENDENCIES_7)
+unittest_osdmap_DEPENDENCIES = $(am__DEPENDENCIES_13) $(LIBCOMMON) \
+	$(am__DEPENDENCIES_6)
 unittest_osdmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_osdmap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3205,8 +2486,8 @@ unittest_osdmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_perf_counters_OBJECTS =  \
 	test/unittest_perf_counters-perf_counters.$(OBJEXT)
 unittest_perf_counters_OBJECTS = $(am_unittest_perf_counters_OBJECTS)
-unittest_perf_counters_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_perf_counters_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_perf_counters_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_perf_counters_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3214,8 +2495,8 @@ unittest_perf_counters_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_pglog_OBJECTS =  \
 	test/osd/unittest_pglog-TestPGLog.$(OBJEXT)
 unittest_pglog_OBJECTS = $(am_unittest_pglog_OBJECTS)
-unittest_pglog_DEPENDENCIES = $(am__DEPENDENCIES_11) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_7) \
+unittest_pglog_DEPENDENCIES = $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_6) \
 	$(am__DEPENDENCIES_1)
 unittest_pglog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -3225,50 +2506,31 @@ am_unittest_prebufferedstreambuf_OBJECTS = test/unittest_prebufferedstreambuf-te
 unittest_prebufferedstreambuf_OBJECTS =  \
 	$(am_unittest_prebufferedstreambuf_OBJECTS)
 unittest_prebufferedstreambuf_DEPENDENCIES = $(LIBCOMMON) \
-	$(am__DEPENDENCIES_14) $(am__DEPENDENCIES_2)
+	$(am__DEPENDENCIES_13) $(am__DEPENDENCIES_2)
 unittest_prebufferedstreambuf_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_prebufferedstreambuf_CXXFLAGS) $(CXXFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_unittest_rbd_replay_OBJECTS =  \
-	test/unittest_rbd_replay-test_rbd_replay.$(OBJEXT)
-unittest_rbd_replay_OBJECTS = $(am_unittest_rbd_replay_OBJECTS)
-unittest_rbd_replay_DEPENDENCIES = $(LIBRBD) $(LIBRADOS) \
-	$(am__DEPENDENCIES_7) librbd_replay.la librbd_replay_ios.la \
-	$(am__DEPENDENCIES_14)
-unittest_rbd_replay_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(unittest_rbd_replay_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
 am_unittest_run_cmd_OBJECTS = test/unittest_run_cmd-run_cmd.$(OBJEXT)
 unittest_run_cmd_OBJECTS = $(am_unittest_run_cmd_OBJECTS)
-unittest_run_cmd_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_14)
+unittest_run_cmd_DEPENDENCIES = $(LIBCEPHFS) $(am__DEPENDENCIES_13)
 unittest_run_cmd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_run_cmd_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_unittest_shared_cache_OBJECTS =  \
-	test/common/unittest_shared_cache-test_shared_cache.$(OBJEXT)
-unittest_shared_cache_OBJECTS = $(am_unittest_shared_cache_OBJECTS)
-unittest_shared_cache_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
-unittest_shared_cache_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
-	$(unittest_shared_cache_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
 am_unittest_sharedptr_registry_OBJECTS = test/common/unittest_sharedptr_registry-test_sharedptr_registry.$(OBJEXT)
 unittest_sharedptr_registry_OBJECTS =  \
 	$(am_unittest_sharedptr_registry_OBJECTS)
-unittest_sharedptr_registry_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_sharedptr_registry_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_sharedptr_registry_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_sharedptr_registry_CXXFLAGS) $(CXXFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 am_unittest_signals_OBJECTS = test/unittest_signals-signals.$(OBJEXT)
 unittest_signals_OBJECTS = $(am_unittest_signals_OBJECTS)
-unittest_signals_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_signals_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_signals_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_signals_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3277,7 +2539,7 @@ am_unittest_simple_spin_OBJECTS =  \
 	test/unittest_simple_spin-simple_spin.$(OBJEXT)
 unittest_simple_spin_OBJECTS = $(am_unittest_simple_spin_OBJECTS)
 unittest_simple_spin_DEPENDENCIES = $(LIBCEPHFS) \
-	$(am__DEPENDENCIES_14)
+	$(am__DEPENDENCIES_13)
 unittest_simple_spin_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_simple_spin_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3285,8 +2547,8 @@ unittest_simple_spin_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_sloppy_crc_map_OBJECTS = test/common/unittest_sloppy_crc_map-test_sloppy_crc_map.$(OBJEXT)
 unittest_sloppy_crc_map_OBJECTS =  \
 	$(am_unittest_sloppy_crc_map_OBJECTS)
-unittest_sloppy_crc_map_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_sloppy_crc_map_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_sloppy_crc_map_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_sloppy_crc_map_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3294,8 +2556,8 @@ unittest_sloppy_crc_map_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_str_list_OBJECTS =  \
 	test/unittest_str_list-test_str_list.$(OBJEXT)
 unittest_str_list_OBJECTS = $(am_unittest_str_list_OBJECTS)
-unittest_str_list_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_str_list_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_str_list_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_str_list_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3303,8 +2565,8 @@ unittest_str_list_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_str_map_OBJECTS =  \
 	test/common/unittest_str_map-test_str_map.$(OBJEXT)
 unittest_str_map_OBJECTS = $(am_unittest_str_map_OBJECTS)
-unittest_str_map_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_str_map_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_str_map_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_str_map_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3312,16 +2574,16 @@ unittest_str_map_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_striper_OBJECTS =  \
 	test/unittest_striper-test_striper.$(OBJEXT)
 unittest_striper_OBJECTS = $(am_unittest_striper_OBJECTS)
-unittest_striper_DEPENDENCIES = $(LIBOSDC) $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_striper_DEPENDENCIES = $(LIBOSDC) $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_striper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_striper_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_unittest_strtol_OBJECTS = test/unittest_strtol-strtol.$(OBJEXT)
 unittest_strtol_OBJECTS = $(am_unittest_strtol_OBJECTS)
-unittest_strtol_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_strtol_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_strtol_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_strtol_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3329,7 +2591,7 @@ unittest_strtol_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_texttable_OBJECTS =  \
 	test/unittest_texttable-test_texttable.$(OBJEXT)
 unittest_texttable_OBJECTS = $(am_unittest_texttable_OBJECTS)
-unittest_texttable_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_14)
+unittest_texttable_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_13)
 unittest_texttable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_texttable_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
@@ -3337,16 +2599,16 @@ unittest_texttable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_throttle_OBJECTS =  \
 	test/common/unittest_throttle-Throttle.$(OBJEXT)
 unittest_throttle_OBJECTS = $(am_unittest_throttle_OBJECTS)
-unittest_throttle_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_throttle_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_throttle_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_throttle_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_unittest_utf8_OBJECTS = test/unittest_utf8-utf8.$(OBJEXT)
 unittest_utf8_OBJECTS = $(am_unittest_utf8_OBJECTS)
-unittest_utf8_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_utf8_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_utf8_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_utf8_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
@@ -3354,7 +2616,7 @@ unittest_utf8_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_util_OBJECTS =  \
 	test/common/unittest_util-test_util.$(OBJEXT)
 unittest_util_OBJECTS = $(am_unittest_util_OBJECTS)
-unittest_util_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_14) \
+unittest_util_DEPENDENCIES = $(LIBCOMMON) $(am__DEPENDENCIES_13) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
 unittest_util_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -3363,15 +2625,14 @@ unittest_util_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 am_unittest_workqueue_OBJECTS =  \
 	test/unittest_workqueue-test_workqueue.$(OBJEXT)
 unittest_workqueue_OBJECTS = $(am_unittest_workqueue_OBJECTS)
-unittest_workqueue_DEPENDENCIES = $(am__DEPENDENCIES_14) \
-	$(am__DEPENDENCIES_7)
+unittest_workqueue_DEPENDENCIES = $(am__DEPENDENCIES_13) \
+	$(am__DEPENDENCIES_6)
 unittest_workqueue_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(unittest_workqueue_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-SCRIPTS = $(bin_SCRIPTS) $(ceph_libexec_SCRIPTS) $(ceph_sbin_SCRIPTS) \
-	$(dist_bin_SCRIPTS) $(sbin_SCRIPTS) $(shell_common_SCRIPTS) \
-	$(su_sbin_SCRIPTS)
+SCRIPTS = $(bin_SCRIPTS) $(ceph_sbin_SCRIPTS) $(dist_bin_SCRIPTS) \
+	$(sbin_SCRIPTS) $(shell_common_SCRIPTS) $(su_sbin_SCRIPTS)
 DEFAULT_INCLUDES = -I. at am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -3417,13 +2678,6 @@ CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 AM_V_CXXLD = $(am__v_CXXLD_ at AM_V@)
 am__v_CXXLD_ = $(am__v_CXXLD_ at AM_DEFAULT_V@)
 am__v_CXXLD_0 = @echo "  CXXLD " $@;
-CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
-LTCCASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
-	$(CCASFLAGS)
-AM_V_CCAS = $(am__v_CCAS_ at AM_V@)
-am__v_CCAS_ = $(am__v_CCAS_ at AM_DEFAULT_V@)
-am__v_CCAS_0 = @echo "  CCAS  " $@;
 AM_V_GEN = $(am__v_GEN_ at AM_V@)
 am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
@@ -3447,41 +2701,37 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(libcrush_la_SOURCES) $(libec_example_la_SOURCES) \
 	$(libec_fail_to_initialize_la_SOURCES) \
 	$(libec_fail_to_register_la_SOURCES) $(libec_hangs_la_SOURCES) \
-	$(libec_isa_la_SOURCES) $(libec_jerasure_la_SOURCES) \
+	$(libec_jerasure_la_SOURCES) \
 	$(libec_jerasure_generic_la_SOURCES) \
 	$(libec_jerasure_sse3_la_SOURCES) \
-	$(libec_jerasure_sse4_la_SOURCES) $(libec_lrc_la_SOURCES) \
+	$(libec_jerasure_sse4_la_SOURCES) \
 	$(libec_missing_entry_point_la_SOURCES) \
-	$(libec_missing_version_la_SOURCES) \
 	$(libec_test_jerasure_generic_la_SOURCES) \
 	$(libec_test_jerasure_sse3_la_SOURCES) \
 	$(libec_test_jerasure_sse4_la_SOURCES) \
 	$(liberasure_code_la_SOURCES) $(libglobal_la_SOURCES) \
-	$(libjson_spirit_la_SOURCES) $(libkrbd_la_SOURCES) \
-	$(liblog_la_SOURCES) $(libmds_la_SOURCES) $(libmon_la_SOURCES) \
+	$(libjson_spirit_la_SOURCES) $(liblog_la_SOURCES) \
+	$(libmds_la_SOURCES) $(libmon_la_SOURCES) \
 	$(libmon_types_la_SOURCES) $(libmsg_la_SOURCES) \
-	$(libos_la_SOURCES) $(libos_rocksdb_la_SOURCES) \
-	$(libos_types_la_SOURCES) $(libosd_la_SOURCES) \
-	$(libosd_types_la_SOURCES) $(libosdc_la_SOURCES) \
-	$(libperfglue_la_SOURCES) $(librados_la_SOURCES) \
-	$(libradosstriper_la_SOURCES) \
-	$(libradosstripertest_la_SOURCES) $(libradostest_la_SOURCES) \
-	$(librbd_la_SOURCES) $(librbd_replay_la_SOURCES) \
-	$(librbd_replay_ios_la_SOURCES) $(librgw_la_SOURCES) \
-	$(libsecret_la_SOURCES) $(libsystest_la_SOURCES) \
-	$(ceph_authtool_SOURCES) $(ceph_client_debug_SOURCES) \
-	$(ceph_conf_SOURCES) $(ceph_dencoder_SOURCES) \
-	$(ceph_fuse_SOURCES) $(ceph_kvstore_tool_SOURCES) \
-	$(ceph_mds_SOURCES) $(ceph_mon_SOURCES) \
-	$(ceph_monstore_tool_SOURCES) $(ceph_osd_SOURCES) \
-	$(ceph_osdomap_tool_SOURCES) $(ceph_syn_SOURCES) \
-	$(ceph_bench_log_SOURCES) $(ceph_dupstore_SOURCES) \
-	$(ceph_erasure_code_SOURCES) \
+	$(libos_la_SOURCES) $(libos_types_la_SOURCES) \
+	$(libosd_la_SOURCES) $(libosd_types_la_SOURCES) \
+	$(libosdc_la_SOURCES) $(libperfglue_la_SOURCES) \
+	$(librados_la_SOURCES) $(libradostest_la_SOURCES) \
+	$(librbd_la_SOURCES) $(librgw_la_SOURCES) \
+	$(libsystest_la_SOURCES) $(ceph_authtool_SOURCES) \
+	$(ceph_client_debug_SOURCES) $(ceph_conf_SOURCES) \
+	$(ceph_dencoder_SOURCES) $(ceph_fuse_SOURCES) \
+	$(ceph_kvstore_tool_SOURCES) $(ceph_mds_SOURCES) \
+	$(ceph_mon_SOURCES) $(ceph_monstore_tool_SOURCES) \
+	$(ceph_osd_SOURCES) $(ceph_osdomap_tool_SOURCES) \
+	$(ceph_syn_SOURCES) $(ceph_bench_log_SOURCES) \
+	$(ceph_dupstore_SOURCES) $(ceph_erasure_code_SOURCES) \
 	$(ceph_erasure_code_benchmark_SOURCES) \
+	$(ceph_erasure_code_non_regression_SOURCES) \
+	$(ceph_filestore_dump_SOURCES) $(ceph_filestore_tool_SOURCES) \
 	$(ceph_kvstorebench_SOURCES) \
 	$(ceph_mon_store_converter_SOURCES) \
-	$(ceph_multi_stress_watch_SOURCES) \
-	$(ceph_objectstore_tool_SOURCES) $(ceph_omapbench_SOURCES) \
+	$(ceph_multi_stress_watch_SOURCES) $(ceph_omapbench_SOURCES) \
 	$(ceph_psim_SOURCES) $(ceph_radosacl_SOURCES) \
 	$(ceph_rgw_jsonparser_SOURCES) $(ceph_rgw_multiparser_SOURCES) \
 	$(ceph_scratchtool_SOURCES) $(ceph_scratchtoolpp_SOURCES) \
@@ -3499,7 +2749,6 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_cls_statelog_SOURCES) \
 	$(ceph_test_cls_version_SOURCES) $(ceph_test_cors_SOURCES) \
 	$(ceph_test_crypto_SOURCES) $(ceph_test_filejournal_SOURCES) \
-	$(ceph_test_filestore_SOURCES) \
 	$(ceph_test_filestore_idempotent_SOURCES) \
 	$(ceph_test_filestore_idempotent_sequence_SOURCES) \
 	$(ceph_test_get_blkdev_size_SOURCES) \
@@ -3507,7 +2756,7 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_keyvaluedb_atomicity_SOURCES) \
 	$(ceph_test_keyvaluedb_iterators_SOURCES) \
 	$(ceph_test_libcephfs_SOURCES) $(ceph_test_librbd_SOURCES) \
-	$(ceph_test_librbd_fsx_SOURCES) $(ceph_test_mon_msg_SOURCES) \
+	$(ceph_test_librbd_fsx_SOURCES) \
 	$(ceph_test_mon_workloadgen_SOURCES) $(ceph_test_msgr_SOURCES) \
 	$(ceph_test_mutate_SOURCES) $(ceph_test_object_map_SOURCES) \
 	$(ceph_test_objectcacher_stress_SOURCES) \
@@ -3530,9 +2779,6 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_rados_delete_pools_parallel_SOURCES) \
 	$(ceph_test_rados_list_parallel_SOURCES) \
 	$(ceph_test_rados_open_pools_parallel_SOURCES) \
-	$(ceph_test_rados_striper_api_aio_SOURCES) \
-	$(ceph_test_rados_striper_api_io_SOURCES) \
-	$(ceph_test_rados_striper_api_striping_SOURCES) \
 	$(ceph_test_rados_watch_notify_SOURCES) \
 	$(ceph_test_rewrite_latency_SOURCES) \
 	$(ceph_test_rgw_manifest_SOURCES) \
@@ -3541,13 +2787,12 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_stress_watch_SOURCES) $(ceph_test_timers_SOURCES) \
 	$(ceph_test_trans_SOURCES) $(ceph_tpbench_SOURCES) \
 	$(ceph_xattr_bench_SOURCES) $(cephfs_SOURCES) \
-	$(cephfs_journal_tool_SOURCES) $(crushtool_SOURCES) \
-	$(get_command_descriptions_SOURCES) $(librados_config_SOURCES) \
-	$(monmaptool_SOURCES) $(mount_ceph_SOURCES) \
-	$(osdmaptool_SOURCES) $(rados_SOURCES) $(radosgw_SOURCES) \
-	$(radosgw_admin_SOURCES) $(rbd_SOURCES) $(rbd_fuse_SOURCES) \
-	$(rbd_replay_SOURCES) $(rbd_replay_prep_SOURCES) \
-	$(rest_bench_SOURCES) $(test_build_libcephfs_SOURCES) \
+	$(crushtool_SOURCES) $(get_command_descriptions_SOURCES) \
+	$(librados_config_SOURCES) $(monmaptool_SOURCES) \
+	$(mount_ceph_SOURCES) $(osdmaptool_SOURCES) $(rados_SOURCES) \
+	$(radosgw_SOURCES) $(radosgw_admin_SOURCES) $(rbd_SOURCES) \
+	$(rbd_fuse_SOURCES) $(rest_bench_SOURCES) \
+	$(test_build_libcephfs_SOURCES) \
 	$(test_build_libcommon_SOURCES) $(test_build_librados_SOURCES) \
 	$(test_build_librgw_SOURCES) $(unittest_addrs_SOURCES) \
 	$(unittest_admin_socket_SOURCES) $(unittest_arch_SOURCES) \
@@ -3563,15 +2808,10 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(unittest_crypto_init_SOURCES) \
 	$(unittest_daemon_config_SOURCES) \
 	$(unittest_ecbackend_SOURCES) $(unittest_encoding_SOURCES) \
-	$(unittest_erasure_code_SOURCES) \
 	$(unittest_erasure_code_example_SOURCES) \
-	$(unittest_erasure_code_isa_SOURCES) \
 	$(unittest_erasure_code_jerasure_SOURCES) \
-	$(unittest_erasure_code_lrc_SOURCES) \
 	$(unittest_erasure_code_plugin_SOURCES) \
-	$(unittest_erasure_code_plugin_isa_SOURCES) \
 	$(unittest_erasure_code_plugin_jerasure_SOURCES) \
-	$(unittest_erasure_code_plugin_lrc_SOURCES) \
 	$(unittest_escape_SOURCES) $(unittest_flatindex_SOURCES) \
 	$(unittest_formatter_SOURCES) $(unittest_gather_SOURCES) \
 	$(unittest_heartbeatmap_SOURCES) $(unittest_histogram_SOURCES) \
@@ -3580,14 +2820,13 @@ SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(unittest_libcephfs_config_SOURCES) \
 	$(unittest_librados_SOURCES) \
 	$(unittest_librados_config_SOURCES) $(unittest_log_SOURCES) \
-	$(unittest_lru_SOURCES) $(unittest_mime_SOURCES) \
-	$(unittest_mon_moncap_SOURCES) $(unittest_mon_pgmap_SOURCES) \
-	$(unittest_on_exit_SOURCES) $(unittest_osd_osdcap_SOURCES) \
-	$(unittest_osd_types_SOURCES) $(unittest_osdmap_SOURCES) \
-	$(unittest_perf_counters_SOURCES) $(unittest_pglog_SOURCES) \
+	$(unittest_mime_SOURCES) $(unittest_mon_moncap_SOURCES) \
+	$(unittest_mon_pgmap_SOURCES) $(unittest_on_exit_SOURCES) \
+	$(unittest_osd_osdcap_SOURCES) $(unittest_osd_types_SOURCES) \
+	$(unittest_osdmap_SOURCES) $(unittest_perf_counters_SOURCES) \
+	$(unittest_pglog_SOURCES) \
 	$(unittest_prebufferedstreambuf_SOURCES) \
-	$(unittest_rbd_replay_SOURCES) $(unittest_run_cmd_SOURCES) \
-	$(unittest_shared_cache_SOURCES) \
+	$(unittest_run_cmd_SOURCES) \
 	$(unittest_sharedptr_registry_SOURCES) \
 	$(unittest_signals_SOURCES) $(unittest_simple_spin_SOURCES) \
 	$(unittest_sloppy_crc_map_SOURCES) \
@@ -3617,30 +2856,26 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(libcrush_la_SOURCES) $(libec_example_la_SOURCES) \
 	$(libec_fail_to_initialize_la_SOURCES) \
 	$(libec_fail_to_register_la_SOURCES) $(libec_hangs_la_SOURCES) \
-	$(am__libec_isa_la_SOURCES_DIST) $(libec_jerasure_la_SOURCES) \
+	$(libec_jerasure_la_SOURCES) \
 	$(libec_jerasure_generic_la_SOURCES) \
 	$(libec_jerasure_sse3_la_SOURCES) \
-	$(libec_jerasure_sse4_la_SOURCES) $(libec_lrc_la_SOURCES) \
+	$(libec_jerasure_sse4_la_SOURCES) \
 	$(libec_missing_entry_point_la_SOURCES) \
-	$(libec_missing_version_la_SOURCES) \
 	$(libec_test_jerasure_generic_la_SOURCES) \
 	$(libec_test_jerasure_sse3_la_SOURCES) \
 	$(libec_test_jerasure_sse4_la_SOURCES) \
 	$(liberasure_code_la_SOURCES) $(libglobal_la_SOURCES) \
-	$(libjson_spirit_la_SOURCES) $(libkrbd_la_SOURCES) \
-	$(liblog_la_SOURCES) $(libmds_la_SOURCES) $(libmon_la_SOURCES) \
+	$(libjson_spirit_la_SOURCES) $(liblog_la_SOURCES) \
+	$(libmds_la_SOURCES) $(libmon_la_SOURCES) \
 	$(libmon_types_la_SOURCES) $(libmsg_la_SOURCES) \
-	$(am__libos_la_SOURCES_DIST) \
-	$(am__libos_rocksdb_la_SOURCES_DIST) $(libos_types_la_SOURCES) \
+	$(am__libos_la_SOURCES_DIST) $(libos_types_la_SOURCES) \
 	$(libosd_la_SOURCES) $(libosd_types_la_SOURCES) \
 	$(libosdc_la_SOURCES) $(am__libperfglue_la_SOURCES_DIST) \
-	$(librados_la_SOURCES) $(libradosstriper_la_SOURCES) \
-	$(libradosstripertest_la_SOURCES) $(libradostest_la_SOURCES) \
-	$(librbd_la_SOURCES) $(librbd_replay_la_SOURCES) \
-	$(librbd_replay_ios_la_SOURCES) $(am__librgw_la_SOURCES_DIST) \
-	$(libsecret_la_SOURCES) $(am__libsystest_la_SOURCES_DIST) \
-	$(ceph_authtool_SOURCES) $(ceph_client_debug_SOURCES) \
-	$(ceph_conf_SOURCES) $(am__ceph_dencoder_SOURCES_DIST) \
+	$(librados_la_SOURCES) $(libradostest_la_SOURCES) \
+	$(librbd_la_SOURCES) $(am__librgw_la_SOURCES_DIST) \
+	$(am__libsystest_la_SOURCES_DIST) $(ceph_authtool_SOURCES) \
+	$(ceph_client_debug_SOURCES) $(ceph_conf_SOURCES) \
+	$(am__ceph_dencoder_SOURCES_DIST) \
 	$(am__ceph_fuse_SOURCES_DIST) $(ceph_kvstore_tool_SOURCES) \
 	$(ceph_mds_SOURCES) $(ceph_mon_SOURCES) \
 	$(ceph_monstore_tool_SOURCES) $(ceph_osd_SOURCES) \
@@ -3648,10 +2883,11 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_bench_log_SOURCES) $(ceph_dupstore_SOURCES) \
 	$(ceph_erasure_code_SOURCES) \
 	$(ceph_erasure_code_benchmark_SOURCES) \
+	$(ceph_erasure_code_non_regression_SOURCES) \
+	$(ceph_filestore_dump_SOURCES) $(ceph_filestore_tool_SOURCES) \
 	$(am__ceph_kvstorebench_SOURCES_DIST) \
 	$(ceph_mon_store_converter_SOURCES) \
-	$(ceph_multi_stress_watch_SOURCES) \
-	$(ceph_objectstore_tool_SOURCES) $(ceph_omapbench_SOURCES) \
+	$(ceph_multi_stress_watch_SOURCES) $(ceph_omapbench_SOURCES) \
 	$(ceph_psim_SOURCES) $(ceph_radosacl_SOURCES) \
 	$(am__ceph_rgw_jsonparser_SOURCES_DIST) \
 	$(am__ceph_rgw_multiparser_SOURCES_DIST) \
@@ -3672,7 +2908,6 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_cls_version_SOURCES) \
 	$(am__ceph_test_cors_SOURCES_DIST) $(ceph_test_crypto_SOURCES) \
 	$(ceph_test_filejournal_SOURCES) \
-	$(am__ceph_test_filestore_SOURCES_DIST) \
 	$(ceph_test_filestore_idempotent_SOURCES) \
 	$(ceph_test_filestore_idempotent_sequence_SOURCES) \
 	$(ceph_test_get_blkdev_size_SOURCES) \
@@ -3681,7 +2916,6 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_keyvaluedb_iterators_SOURCES) \
 	$(ceph_test_libcephfs_SOURCES) $(ceph_test_librbd_SOURCES) \
 	$(am__ceph_test_librbd_fsx_SOURCES_DIST) \
-	$(ceph_test_mon_msg_SOURCES) \
 	$(ceph_test_mon_workloadgen_SOURCES) $(ceph_test_msgr_SOURCES) \
 	$(ceph_test_mutate_SOURCES) $(ceph_test_object_map_SOURCES) \
 	$(ceph_test_objectcacher_stress_SOURCES) \
@@ -3704,9 +2938,6 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(am__ceph_test_rados_delete_pools_parallel_SOURCES_DIST) \
 	$(am__ceph_test_rados_list_parallel_SOURCES_DIST) \
 	$(am__ceph_test_rados_open_pools_parallel_SOURCES_DIST) \
-	$(ceph_test_rados_striper_api_aio_SOURCES) \
-	$(ceph_test_rados_striper_api_io_SOURCES) \
-	$(ceph_test_rados_striper_api_striping_SOURCES) \
 	$(am__ceph_test_rados_watch_notify_SOURCES_DIST) \
 	$(ceph_test_rewrite_latency_SOURCES) \
 	$(am__ceph_test_rgw_manifest_SOURCES_DIST) \
@@ -3715,13 +2946,11 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(ceph_test_stress_watch_SOURCES) $(ceph_test_timers_SOURCES) \
 	$(ceph_test_trans_SOURCES) $(ceph_tpbench_SOURCES) \
 	$(ceph_xattr_bench_SOURCES) $(cephfs_SOURCES) \
-	$(cephfs_journal_tool_SOURCES) $(crushtool_SOURCES) \
-	$(get_command_descriptions_SOURCES) $(librados_config_SOURCES) \
-	$(monmaptool_SOURCES) $(mount_ceph_SOURCES) \
-	$(osdmaptool_SOURCES) $(rados_SOURCES) \
+	$(crushtool_SOURCES) $(get_command_descriptions_SOURCES) \
+	$(librados_config_SOURCES) $(monmaptool_SOURCES) \
+	$(mount_ceph_SOURCES) $(osdmaptool_SOURCES) $(rados_SOURCES) \
 	$(am__radosgw_SOURCES_DIST) $(am__radosgw_admin_SOURCES_DIST) \
 	$(rbd_SOURCES) $(am__rbd_fuse_SOURCES_DIST) \
-	$(rbd_replay_SOURCES) $(rbd_replay_prep_SOURCES) \
 	$(am__rest_bench_SOURCES_DIST) \
 	$(am__test_build_libcephfs_SOURCES_DIST) \
 	$(am__test_build_libcommon_SOURCES_DIST) \
@@ -3741,15 +2970,10 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(unittest_crypto_init_SOURCES) \
 	$(unittest_daemon_config_SOURCES) \
 	$(unittest_ecbackend_SOURCES) $(unittest_encoding_SOURCES) \
-	$(unittest_erasure_code_SOURCES) \
 	$(unittest_erasure_code_example_SOURCES) \
-	$(am__unittest_erasure_code_isa_SOURCES_DIST) \
 	$(unittest_erasure_code_jerasure_SOURCES) \
-	$(unittest_erasure_code_lrc_SOURCES) \
 	$(unittest_erasure_code_plugin_SOURCES) \
-	$(am__unittest_erasure_code_plugin_isa_SOURCES_DIST) \
 	$(unittest_erasure_code_plugin_jerasure_SOURCES) \
-	$(unittest_erasure_code_plugin_lrc_SOURCES) \
 	$(unittest_escape_SOURCES) $(unittest_flatindex_SOURCES) \
 	$(unittest_formatter_SOURCES) $(unittest_gather_SOURCES) \
 	$(unittest_heartbeatmap_SOURCES) $(unittest_histogram_SOURCES) \
@@ -3758,14 +2982,13 @@ DIST_SOURCES = $(libcls_log_client_a_SOURCES) \
 	$(unittest_libcephfs_config_SOURCES) \
 	$(unittest_librados_SOURCES) \
 	$(unittest_librados_config_SOURCES) $(unittest_log_SOURCES) \
-	$(unittest_lru_SOURCES) $(unittest_mime_SOURCES) \
-	$(unittest_mon_moncap_SOURCES) $(unittest_mon_pgmap_SOURCES) \
-	$(unittest_on_exit_SOURCES) $(unittest_osd_osdcap_SOURCES) \
-	$(unittest_osd_types_SOURCES) $(unittest_osdmap_SOURCES) \
-	$(unittest_perf_counters_SOURCES) $(unittest_pglog_SOURCES) \
+	$(unittest_mime_SOURCES) $(unittest_mon_moncap_SOURCES) \
+	$(unittest_mon_pgmap_SOURCES) $(unittest_on_exit_SOURCES) \
+	$(unittest_osd_osdcap_SOURCES) $(unittest_osd_types_SOURCES) \
+	$(unittest_osdmap_SOURCES) $(unittest_perf_counters_SOURCES) \
+	$(unittest_pglog_SOURCES) \
 	$(unittest_prebufferedstreambuf_SOURCES) \
-	$(unittest_rbd_replay_SOURCES) $(unittest_run_cmd_SOURCES) \
-	$(unittest_shared_cache_SOURCES) \
+	$(unittest_run_cmd_SOURCES) \
 	$(unittest_sharedptr_registry_SOURCES) \
 	$(unittest_signals_SOURCES) $(unittest_simple_spin_SOURCES) \
 	$(unittest_sloppy_crc_map_SOURCES) \
@@ -3784,8 +3007,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
 py_compile = $(top_srcdir)/py-compile
 DATA = $(bash_completion_DATA) $(doc_DATA) $(libcephfs_include_DATA) \
-	$(librbd_include_DATA) $(rados_include_DATA) \
-	$(radosstriper_include_DATA)
+	$(librbd_include_DATA) $(rados_include_DATA)
 am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	auth/cephx/CephxAuthorizeHandler.h auth/cephx/CephxKeyServer.h \
 	auth/cephx/CephxProtocol.h auth/cephx/CephxClientHandler.h \
@@ -3817,39 +3039,40 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	mon/PGMap.h mon/PGMonitor.h mon/Paxos.h mon/PaxosService.h \
 	mon/QuorumService.h mon/Session.h mon/mon_types.h \
 	mds/inode_backtrace.h mds/flock.h mds/locks.c mds/locks.h \
+	mds/Anchor.h mds/AnchorClient.h mds/AnchorServer.h \
 	mds/CDentry.h mds/CDir.h mds/CInode.h mds/Capability.h \
-	mds/InoTable.h mds/JournalPointer.h mds/LocalLock.h \
-	mds/Locker.h mds/LogEvent.h mds/LogSegment.h mds/MDBalancer.h \
-	mds/MDCache.h mds/RecoveryQueue.h mds/MDLog.h mds/MDS.h \
-	mds/Beacon.h mds/MDSContext.h mds/MDSMap.h mds/MDSTable.h \
-	mds/MDSTableServer.h mds/MDSTableClient.h mds/Mutation.h \
-	mds/Migrator.h mds/ScatterLock.h mds/Server.h mds/SessionMap.h \
-	mds/SimpleLock.h mds/SnapClient.h mds/SnapRealm.h \
-	mds/SnapServer.h mds/mds_table_types.h mds/mdstypes.h \
-	mds/snap.h mds/events/ECommitted.h mds/events/EExport.h \
+	mds/Dumper.h mds/InoTable.h mds/LocalLock.h mds/Locker.h \
+	mds/LogEvent.h mds/LogSegment.h mds/MDBalancer.h mds/MDCache.h \
+	mds/MDLog.h mds/MDS.h mds/MDSMap.h mds/MDSTable.h \
+	mds/MDSTableServer.h mds/MDSTableClient.h mds/MDSUtility.h \
+	mds/Mutation.h mds/Migrator.h mds/Resetter.h mds/ScatterLock.h \
+	mds/Server.h mds/SessionMap.h mds/SimpleLock.h \
+	mds/SnapClient.h mds/SnapRealm.h mds/SnapServer.h \
+	mds/mds_table_types.h mds/mdstypes.h mds/snap.h \
+	mds/events/ECommitted.h mds/events/EExport.h \
 	mds/events/EFragment.h mds/events/EImportFinish.h \
 	mds/events/EImportStart.h mds/events/EMetaBlob.h \
-	mds/events/ENoOp.h mds/events/EOpen.h \
-	mds/events/EResetJournal.h mds/events/ESession.h \
-	mds/events/ESessions.h mds/events/ESlaveUpdate.h \
-	mds/events/ESubtreeMap.h mds/events/ETableClient.h \
-	mds/events/ETableServer.h mds/events/EUpdate.h \
-	os/btrfs_ioctl.h os/chain_xattr.h os/BtrfsFileStoreBackend.h \
-	os/CollectionIndex.h os/DBObjectMap.h os/GenericObjectMap.h \
-	os/FileJournal.h os/FileStore.h os/FlatIndex.h os/FDCache.h \
+	mds/events/EOpen.h mds/events/EResetJournal.h \
+	mds/events/ESession.h mds/events/ESessions.h \
+	mds/events/ESlaveUpdate.h mds/events/ESubtreeMap.h \
+	mds/events/ETableClient.h mds/events/ETableServer.h \
+	mds/events/EUpdate.h os/btrfs_ioctl.h os/chain_xattr.h \
+	os/BtrfsFileStoreBackend.h os/CollectionIndex.h \
+	os/DBObjectMap.h os/GenericObjectMap.h os/FileJournal.h \
+	os/FileStore.h os/FlatIndex.h os/FDCache.h \
 	os/GenericFileStoreBackend.h os/HashIndex.h os/IndexManager.h \
 	os/Journal.h os/JournalingObjectStore.h os/KeyValueDB.h \
 	os/LevelDBStore.h os/LFNIndex.h os/MemStore.h \
 	os/KeyValueStore.h os/ObjectMap.h os/ObjectStore.h \
 	os/SequencerPosition.h os/WBThrottle.h \
-	os/XfsFileStoreBackend.h os/ZFSFileStoreBackend.h \
-	os/RocksDBStore.h os/ZFS.h os/KineticStore.h osd/Ager.h \
-	osd/ClassHandler.h osd/HitSet.h osd/OSD.h osd/OSDCap.h \
-	osd/OSDMap.h osd/ObjectVersioner.h osd/OpRequest.h \
-	osd/SnapMapper.h osd/PG.h osd/PGLog.h osd/ReplicatedPG.h \
-	osd/PGBackend.h osd/ReplicatedBackend.h osd/TierAgentState.h \
-	osd/ECBackend.h osd/ECUtil.h osd/ECMsgTypes.h \
-	osd/ECTransaction.h osd/Watch.h osd/osd_types.h \
+	os/XfsFileStoreBackend.h os/ZFSFileStoreBackend.h os/ZFS.h \
+	osd/Ager.h osd/ClassHandler.h osd/HitSet.h osd/OSD.h \
+	osd/OSDCap.h osd/OSDMap.h osd/ObjectVersioner.h \
+	osd/OpRequest.h osd/SnapMapper.h osd/PG.h osd/PGLog.h \
+	osd/ReplicatedPG.h osd/PGBackend.h osd/ReplicatedBackend.h \
+	osd/TierAgentState.h osd/ECBackend.h osd/ECUtil.h \
+	osd/ECMsgTypes.h osd/ECTransaction.h osd/Watch.h \
+	osd/osd_types.h \
 	erasure-code/jerasure/jerasure/include/cauchy.h \
 	erasure-code/jerasure/jerasure/include/galois.h \
 	erasure-code/jerasure/jerasure/include/jerasure.h \
@@ -3861,25 +3084,17 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	erasure-code/jerasure/gf-complete/include/gf_method.h \
 	erasure-code/jerasure/gf-complete/include/gf_general.h \
 	erasure-code/jerasure/ErasureCodeJerasure.h \
-	erasure-code/lrc/ErasureCodeLrc.h \
-	erasure-code/isa/ErasureCodeIsa.h \
-	erasure-code/isa/ErasureCodeIsaTableCache.h \
-	erasure-code/isa/xor_op.h \
-	erasure-code/isa/isa-l/erasure_code/ec_base.h \
-	erasure-code/isa/isa-l/include/erasure_code.h \
-	erasure-code/isa/isa-l/include/reg_sizes.asm \
-	erasure-code/isa/isa-l/include/gf_vect_mul.h \
-	erasure-code/isa/isa-l/include/types.h \
-	erasure-code/ErasureCode.h erasure-code/ErasureCodeInterface.h \
-	erasure-code/ErasureCodePlugin.h osdc/Filer.h osdc/Journaler.h \
-	osdc/ObjectCacher.h osdc/Objecter.h osdc/Striper.h \
-	osdc/WritebackHandler.h client/Client.h client/Dentry.h \
-	client/Dir.h client/Fh.h client/Inode.h client/MetaRequest.h \
-	client/MetaSession.h client/ClientSnapRealm.h \
-	client/SyntheticClient.h client/Trace.h client/ioctl.h \
-	client/ObjecterWriteback.h client/fuse_ll.h global/pidfile.h \
-	global/global_init.h global/global_context.h \
-	global/signal_handler.h json_spirit/json_spirit.h \
+	erasure-code/ErasureCodeInterface.h \
+	erasure-code/ErasureCodePlugin.h osdc/Blinker.h osdc/Filer.h \
+	osdc/Journaler.h osdc/ObjectCacher.h osdc/Objecter.h \
+	osdc/Striper.h osdc/WritebackHandler.h client/Client.h \
+	client/Dentry.h client/Dir.h client/Fh.h client/Inode.h \
+	client/MetaRequest.h client/MetaSession.h \
+	client/ClientSnapRealm.h client/SyntheticClient.h \
+	client/Trace.h client/ioctl.h client/ObjecterWriteback.h \
+	client/fuse_ll.h global/pidfile.h global/global_init.h \
+	global/global_context.h global/signal_handler.h \
+	json_spirit/json_spirit.h \
 	json_spirit/json_spirit_error_position.h \
 	json_spirit/json_spirit_reader.h \
 	json_spirit/json_spirit_reader_template.h \
@@ -3920,44 +3135,42 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	common/config_obs.h common/config_opts.h common/ceph_crypto.h \
 	common/ceph_crypto_cms.h common/ceph_json.h common/lru_map.h \
 	common/utf8.h common/mime.h common/pick_address.h \
-	common/strtol.h common/static_assert.h common/AsyncReserver.h \
-	common/sync_filesystem.h common/cmdparse.h common/hobject.h \
-	common/linux_version.h common/module.h common/secret.h \
-	msg/Accepter.h msg/Connection.h msg/DispatchQueue.h \
-	msg/Dispatcher.h msg/Message.h msg/Messenger.h msg/Pipe.h \
-	msg/PipeConnection.h msg/SimpleMessenger.h \
-	msg/SimplePolicyMessenger.h msg/msg_types.h messages/MAuth.h \
-	messages/MAuthReply.h messages/MCacheExpire.h \
-	messages/MClientCaps.h messages/MClientCapRelease.h \
-	messages/MClientLease.h messages/MClientReconnect.h \
-	messages/MClientReply.h messages/MClientRequest.h \
-	messages/MClientRequestForward.h messages/MClientSession.h \
-	messages/MClientSnap.h messages/MCommand.h \
-	messages/MCommandReply.h messages/MDentryLink.h \
-	messages/MDentryUnlink.h messages/MDirUpdate.h \
-	messages/MDiscover.h messages/MDiscoverReply.h \
-	messages/MExportCaps.h messages/MExportCapsAck.h \
-	messages/MExportDir.h messages/MExportDirAck.h \
-	messages/MExportDirCancel.h messages/MExportDirDiscover.h \
-	messages/MExportDirDiscoverAck.h messages/MExportDirFinish.h \
-	messages/MExportDirNotify.h messages/MExportDirNotifyAck.h \
-	messages/MExportDirPrep.h messages/MExportDirPrepAck.h \
-	messages/MGenericMessage.h messages/MGetPoolStats.h \
-	messages/MGetPoolStatsReply.h messages/MHeartbeat.h \
-	messages/MInodeFileCaps.h messages/MLock.h messages/MLog.h \
-	messages/MLogAck.h messages/MMDSBeacon.h \
-	messages/MMDSCacheRejoin.h messages/MMDSLoadTargets.h \
-	messages/MMDSFindIno.h messages/MMDSFindInoReply.h \
-	messages/MMDSFragmentNotify.h messages/MMDSMap.h \
-	messages/MMDSOpenIno.h messages/MMDSOpenInoReply.h \
-	messages/MMDSResolve.h messages/MMDSResolveAck.h \
-	messages/MMDSSlaveRequest.h messages/MMDSTableRequest.h \
-	messages/MMonCommand.h messages/MMonCommandAck.h \
-	messages/MMonElection.h messages/MMonGetMap.h \
-	messages/MMonGetVersion.h messages/MMonGetVersionReply.h \
-	messages/MMonGlobalID.h messages/MMonHealth.h \
-	messages/MMonJoin.h messages/MMonMap.h messages/MMonPaxos.h \
-	messages/MMonProbe.h messages/MMonScrub.h \
+	common/secret.h common/strtol.h common/static_assert.h \
+	common/AsyncReserver.h common/sync_filesystem.h \
+	common/cmdparse.h common/hobject.h common/linux_version.h \
+	msg/Accepter.h msg/DispatchQueue.h msg/Dispatcher.h \
+	msg/Message.h msg/Messenger.h msg/Pipe.h msg/SimpleMessenger.h \
+	msg/msg_types.h messages/MAuth.h messages/MAuthReply.h \
+	messages/MCacheExpire.h messages/MClientCaps.h \
+	messages/MClientCapRelease.h messages/MClientLease.h \
+	messages/MClientReconnect.h messages/MClientReply.h \
+	messages/MClientRequest.h messages/MClientRequestForward.h \
+	messages/MClientSession.h messages/MClientSnap.h \
+	messages/MCommand.h messages/MCommandReply.h \
+	messages/MDentryLink.h messages/MDentryUnlink.h \
+	messages/MDirUpdate.h messages/MDiscover.h \
+	messages/MDiscoverReply.h messages/MExportCaps.h \
+	messages/MExportCapsAck.h messages/MExportDir.h \
+	messages/MExportDirAck.h messages/MExportDirCancel.h \
+	messages/MExportDirDiscover.h messages/MExportDirDiscoverAck.h \
+	messages/MExportDirFinish.h messages/MExportDirNotify.h \
+	messages/MExportDirNotifyAck.h messages/MExportDirPrep.h \
+	messages/MExportDirPrepAck.h messages/MGenericMessage.h \
+	messages/MGetPoolStats.h messages/MGetPoolStatsReply.h \
+	messages/MHeartbeat.h messages/MInodeFileCaps.h \
+	messages/MLock.h messages/MLog.h messages/MLogAck.h \
+	messages/MMDSBeacon.h messages/MMDSCacheRejoin.h \
+	messages/MMDSLoadTargets.h messages/MMDSFindIno.h \
+	messages/MMDSFindInoReply.h messages/MMDSFragmentNotify.h \
+	messages/MMDSMap.h messages/MMDSOpenIno.h \
+	messages/MMDSOpenInoReply.h messages/MMDSResolve.h \
+	messages/MMDSResolveAck.h messages/MMDSSlaveRequest.h \
+	messages/MMDSTableRequest.h messages/MMonCommand.h \
+	messages/MMonCommandAck.h messages/MMonElection.h \
+	messages/MMonGetMap.h messages/MMonGetVersion.h \
+	messages/MMonGetVersionReply.h messages/MMonGlobalID.h \
+	messages/MMonHealth.h messages/MMonJoin.h messages/MMonMap.h \
+	messages/MMonPaxos.h messages/MMonProbe.h messages/MMonScrub.h \
 	messages/MMonSubscribe.h messages/MMonSubscribeAck.h \
 	messages/MMonSync.h messages/MOSDAlive.h messages/MOSDBoot.h \
 	messages/MOSDFailure.h messages/MOSDMarkMeDown.h \
@@ -3991,18 +3204,16 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	include/err.h include/error.h include/filepath.h \
 	include/frag.h include/hash.h include/intarith.h \
 	include/interval_set.h include/int_types.h include/ipaddr.h \
-	include/krbd.h include/linux_fiemap.h include/lru.h \
-	include/msgr.h include/object.h include/page.h \
-	include/rangeset.h include/rados.h include/rbd_types.h \
-	include/statlite.h include/str_list.h include/str_map.h \
-	include/stringify.h include/triple.h include/types.h \
-	include/utime.h include/elist.h include/uuid.h include/xlist.h \
+	include/linux_fiemap.h include/lru.h include/msgr.h \
+	include/object.h include/page.h include/rangeset.h \
+	include/rados.h include/rbd_types.h include/statlite.h \
+	include/str_list.h include/str_map.h include/stringify.h \
+	include/triple.h include/types.h include/utime.h \
+	include/dlist.h include/elist.h include/uuid.h include/xlist.h \
 	include/rados/librados.h include/rados/rados_types.h \
 	include/rados/rados_types.hpp include/rados/librados.hpp \
 	include/rados/librgw.h include/rados/page.h \
 	include/rados/crc32c.h include/rados/buffer.h \
-	include/radosstriper/libradosstriper.h \
-	include/radosstriper/libradosstriper.hpp \
 	include/rbd/features.h include/rbd/librbd.h \
 	include/rbd/librbd.hpp include/util.h include/stat.h \
 	include/on_exit.h include/memory.h include/rados/memory.h \
@@ -4010,8 +3221,6 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	include/unordered_map.h librados/snap_set_diff.h \
 	librados/AioCompletionImpl.h librados/IoCtxImpl.h \
 	librados/PoolAsyncCompletionImpl.h librados/RadosClient.h \
-	librados/RadosXattrIter.h libradosstriper/RadosStriperImpl.h \
-	libradosstriper/MultiAioCompletionImpl.h \
 	librbd/AioCompletion.h librbd/AioRequest.h librbd/ImageCtx.h \
 	librbd/internal.h librbd/LibrbdWriteback.h \
 	librbd/parent_types.h librbd/SnapInfo.h librbd/WatchCtx.h \
@@ -4053,18 +3262,14 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	cls/user/cls_user_ops.h cls/user/cls_user_types.h \
 	key_value_store/key_value_structure.h \
 	key_value_store/kv_flat_btree_async.h \
-	key_value_store/kvs_arg_types.h rbd_replay/BoundedBuffer.hpp \
-	rbd_replay/actions.hpp rbd_replay/Deser.hpp \
-	rbd_replay/ImageNameMap.hpp rbd_replay/ios.hpp \
-	rbd_replay/PendingIO.hpp rbd_replay/rbd_loc.hpp \
-	rbd_replay/rbd_replay_debug.hpp rbd_replay/Replayer.hpp \
-	rbd_replay/Ser.hpp \
+	key_value_store/kvs_arg_types.h \
+	test/erasure-code/ErasureCodeExample.h \
 	test/erasure-code/ceph_erasure_code_benchmark.h \
-	test/erasure-code/ErasureCodeExample.h test/bench/backend.h \
-	test/bench/bencher.h test/bench/detailed_stat_collector.h \
-	test/bench/distribution.h test/bench/dumb_backend.h \
-	test/bench/rados_backend.h test/bench/rbd_backend.h \
-	test/bench/stat_collector.h test/bench/testfilestore_backend.h \
+	test/bench/backend.h test/bench/bencher.h \
+	test/bench/detailed_stat_collector.h test/bench/distribution.h \
+	test/bench/dumb_backend.h test/bench/rados_backend.h \
+	test/bench/rbd_backend.h test/bench/stat_collector.h \
+	test/bench/testfilestore_backend.h \
 	test/common/ObjectContents.h test/encoding/types.h \
 	test/objectstore/DeterministicOpSequence.h \
 	test/objectstore/FileStoreDiff.h \
@@ -4072,7 +3277,6 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	test/objectstore/TestObjectStoreState.h \
 	test/objectstore/workload_generator.h test/kv_store_bench.h \
 	test/librados/test.h test/librados/TestCase.h \
-	test/libradosstriper/TestCase.h \
 	test/ObjectMap/KeyValueDBMemory.h test/omap_bench.h \
 	test/osdc/FakeWriteback.h test/osd/Object.h \
 	test/osd/RadosModel.h test/osd/TestOpStat.h \
@@ -4083,11 +3287,7 @@ am__noinst_HEADERS_DIST = arch/intel.h arch/neon.h arch/probe.h \
 	test/system/st_rados_list_objects.h \
 	test/system/st_rados_notify.h test/system/st_rados_watch.h \
 	test/system/systest_runnable.h test/system/systest_settings.h \
-	test/unit.h tools/cephfs/JournalTool.h \
-	tools/cephfs/JournalScanner.h tools/cephfs/JournalFilter.h \
-	tools/cephfs/EventOutput.h tools/cephfs/Resetter.h \
-	tools/cephfs/Dumper.h tools/cephfs/MDSUtility.h \
-	tools/rados/rados_sync.h tools/common.h cls_acl.cc \
+	test/unit.h tools/rados/rados_sync.h tools/common.h cls_acl.cc \
 	cls_crypto.cc fetch_config logrotate.conf sample.ceph.conf \
 	bash_completion/ceph bash_completion/rados bash_completion/rbd \
 	bash_completion/radosgw-admin mount/canonicalize.c \
@@ -4132,7 +3332,7 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_CXXFLAGS = @AM_CXXFLAGS@ $(AM_COMMON_CFLAGS) -ftemplate-depth-1024 \
 	-Wnon-virtual-dtor -Wno-invalid-offsetof $(am__append_3) \
-	$(am__append_6) $(am__append_43)
+	$(am__append_6) $(am__append_27)
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -4140,7 +3340,6 @@ AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@
 CC = @CC@
 CCAS = ${srcdir}/yasm-wrapper
 CCASDEPMODE = @CCASDEPMODE@
@@ -4173,7 +3372,6 @@ FGREP = @FGREP@
 GCOV_PREFIX_STRIP = @GCOV_PREFIX_STRIP@
 GIT_CHECK = @GIT_CHECK@
 GREP = @GREP@
-HAVE_CXX11 = @HAVE_CXX11@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -4198,8 +3396,6 @@ LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
 LIBEDIT_LIBS = @LIBEDIT_LIBS@
 LIBFUSE = @LIBFUSE@
 LIBOBJS = @LIBOBJS@
-LIBROCKSDB_CFLAGS = @LIBROCKSDB_CFLAGS@
-LIBROCKSDB_LIBS = @LIBROCKSDB_LIBS@
 LIBS = @LIBS@
 LIBTCMALLOC = @LIBTCMALLOC@
 LIBTOOL = @LIBTOOL@
@@ -4208,8 +3404,6 @@ LIBZFS_LIBS = @LIBZFS_LIBS@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LTTNG_GEN_TP_CHECK = @LTTNG_GEN_TP_CHECK@
-LTTNG_GEN_TP_PROG = @LTTNG_GEN_TP_PROG@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -4314,24 +3508,23 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = gnu subdir-objects
-SUBDIRS = ocf java tracing $(am__append_87) $(am__append_93)
-DIST_SUBDIRS = gtest ocf libs3 java tracing
+SUBDIRS = ocf java $(am__append_62)
+DIST_SUBDIRS = gtest ocf libs3 java
 BUILT_SOURCES = init-ceph
 
 # extra bits
 EXTRA_DIST = brag/server brag/README.md brag/client \
 	$(srcdir)/test/mon/mon-test-helpers.sh \
 	$(srcdir)/test/osd/osd-test-helpers.sh \
-	$(srcdir)/test/coverage.sh $(patsubst \
-	%,$(srcdir)/%,$(check_SCRIPTS)) \
 	$(srcdir)/$(shell_scripts:%=%.in) \
 	$(srcdir)/verify-mds-journal.sh $(srcdir)/vstart.sh \
-	$(srcdir)/stop.sh ceph-run $(srcdir)/ceph-osd-prestart.sh \
-	$(srcdir)/ceph_common.sh $(srcdir)/init-radosgw \
-	$(srcdir)/init-radosgw.sysv $(srcdir)/init-rbdmap \
-	$(srcdir)/ceph-clsinfo $(srcdir)/make_version \
-	$(srcdir)/check_version $(srcdir)/.git_version \
-	$(srcdir)/ceph-rbdnamer $(srcdir)/test/encoding/readable.sh \
+	$(srcdir)/stop.sh ceph-run $(srcdir)/ceph_common.sh \
+	$(srcdir)/init-radosgw $(srcdir)/init-radosgw.sysv \
+	$(srcdir)/init-rbdmap $(srcdir)/ceph-clsinfo \
+	$(srcdir)/make_version $(srcdir)/check_version \
+	$(srcdir)/.git_version $(srcdir)/ceph-rbdnamer \
+	$(srcdir)/test/encoding/readable.sh \
+	$(srcdir)/test/encoding/check-generated.sh \
 	$(srcdir)/upstart/ceph-all.conf \
 	$(srcdir)/upstart/ceph-mon.conf \
 	$(srcdir)/upstart/ceph-mon-all.conf \
@@ -4349,18 +3542,16 @@ EXTRA_DIST = brag/server brag/README.md brag/client \
 	$(srcdir)/upstart/rbdmap.conf ceph.in ceph-disk \
 	ceph-disk-prepare ceph-disk-activate ceph-disk-udev \
 	ceph-create-keys ceph-rest-api ceph-crush-location \
-	mount.fuse.ceph rbdmap yasm-wrapper libs3/COPYING \
-	libs3/ChangeLog libs3/GNUmakefile libs3/GNUmakefile.mingw \
-	libs3/GNUmakefile.osx libs3/INSTALL libs3/LICENSE libs3/README \
-	libs3/TODO libs3/archlinux libs3/debian libs3/doxyfile \
-	libs3/inc libs3/libs3.spec libs3/mswin libs3/src libs3/test \
-	unittest_bufferlist.sh $(am__append_94)
+	mount.fuse.ceph rbdmap unittest_bufferlist.sh yasm-wrapper \
+	libs3/COPYING libs3/ChangeLog libs3/GNUmakefile \
+	libs3/GNUmakefile.mingw libs3/GNUmakefile.osx libs3/INSTALL \
+	libs3/LICENSE libs3/README libs3/TODO libs3/archlinux \
+	libs3/debian libs3/doxyfile libs3/inc libs3/libs3.spec \
+	libs3/mswin libs3/src libs3/test unittest_bufferlist.sh
 CLEANFILES = $(shell_scripts) ceph_ver.h sample.fetch_config
 
 # jerasure plugin
 
-# lrc plugin
-
 # everything else we want to include in a 'make dist'
 noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	auth/cephx/CephxAuthorizeHandler.h auth/cephx/CephxKeyServer.h \
@@ -4393,34 +3584,34 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	mon/PGMap.h mon/PGMonitor.h mon/Paxos.h mon/PaxosService.h \
 	mon/QuorumService.h mon/Session.h mon/mon_types.h \
 	mds/inode_backtrace.h mds/flock.h mds/locks.c mds/locks.h \
+	mds/Anchor.h mds/AnchorClient.h mds/AnchorServer.h \
 	mds/CDentry.h mds/CDir.h mds/CInode.h mds/Capability.h \
-	mds/InoTable.h mds/JournalPointer.h mds/LocalLock.h \
-	mds/Locker.h mds/LogEvent.h mds/LogSegment.h mds/MDBalancer.h \
-	mds/MDCache.h mds/RecoveryQueue.h mds/MDLog.h mds/MDS.h \
-	mds/Beacon.h mds/MDSContext.h mds/MDSMap.h mds/MDSTable.h \
-	mds/MDSTableServer.h mds/MDSTableClient.h mds/Mutation.h \
-	mds/Migrator.h mds/ScatterLock.h mds/Server.h mds/SessionMap.h \
-	mds/SimpleLock.h mds/SnapClient.h mds/SnapRealm.h \
-	mds/SnapServer.h mds/inode_backtrace.h mds/mds_table_types.h \
-	mds/mdstypes.h mds/snap.h mds/events/ECommitted.h \
-	mds/events/EExport.h mds/events/EFragment.h \
-	mds/events/EImportFinish.h mds/events/EImportStart.h \
-	mds/events/EMetaBlob.h mds/events/ENoOp.h mds/events/EOpen.h \
-	mds/events/EResetJournal.h mds/events/ESession.h \
-	mds/events/ESessions.h mds/events/ESlaveUpdate.h \
-	mds/events/ESubtreeMap.h mds/events/ETableClient.h \
-	mds/events/ETableServer.h mds/events/EUpdate.h \
-	os/btrfs_ioctl.h os/chain_xattr.h os/BtrfsFileStoreBackend.h \
-	os/CollectionIndex.h os/DBObjectMap.h os/GenericObjectMap.h \
-	os/FileJournal.h os/FileStore.h os/FlatIndex.h os/FDCache.h \
+	mds/Dumper.h mds/InoTable.h mds/LocalLock.h mds/Locker.h \
+	mds/LogEvent.h mds/LogSegment.h mds/MDBalancer.h mds/MDCache.h \
+	mds/MDLog.h mds/MDS.h mds/MDSMap.h mds/MDSTable.h \
+	mds/MDSTableServer.h mds/MDSTableClient.h mds/MDSUtility.h \
+	mds/Mutation.h mds/Migrator.h mds/Resetter.h mds/ScatterLock.h \
+	mds/Server.h mds/SessionMap.h mds/SimpleLock.h \
+	mds/SnapClient.h mds/SnapRealm.h mds/SnapServer.h \
+	mds/inode_backtrace.h mds/mds_table_types.h mds/mdstypes.h \
+	mds/snap.h mds/events/ECommitted.h mds/events/EExport.h \
+	mds/events/EFragment.h mds/events/EImportFinish.h \
+	mds/events/EImportStart.h mds/events/EMetaBlob.h \
+	mds/events/EOpen.h mds/events/EResetJournal.h \
+	mds/events/ESession.h mds/events/ESessions.h \
+	mds/events/ESlaveUpdate.h mds/events/ESubtreeMap.h \
+	mds/events/ETableClient.h mds/events/ETableServer.h \
+	mds/events/EUpdate.h os/btrfs_ioctl.h os/chain_xattr.h \
+	os/BtrfsFileStoreBackend.h os/CollectionIndex.h \
+	os/DBObjectMap.h os/GenericObjectMap.h os/FileJournal.h \
+	os/FileStore.h os/FlatIndex.h os/FDCache.h \
 	os/GenericFileStoreBackend.h os/HashIndex.h os/IndexManager.h \
 	os/Journal.h os/JournalingObjectStore.h os/KeyValueDB.h \
 	os/LevelDBStore.h os/LFNIndex.h os/MemStore.h \
 	os/KeyValueStore.h os/ObjectMap.h os/ObjectStore.h \
 	os/SequencerPosition.h os/WBThrottle.h \
 	os/XfsFileStoreBackend.h os/ZFSFileStoreBackend.h \
-	$(am__append_20) $(am__append_22) $(am__append_24) \
-	$(am__append_28) osd/Ager.h osd/ClassHandler.h osd/HitSet.h \
+	$(am__append_18) osd/Ager.h osd/ClassHandler.h osd/HitSet.h \
 	osd/OSD.h osd/OSDCap.h osd/OSDMap.h osd/ObjectVersioner.h \
 	osd/OpRequest.h osd/SnapMapper.h osd/PG.h osd/PGLog.h \
 	osd/ReplicatedPG.h osd/PGBackend.h osd/ReplicatedBackend.h \
@@ -4438,17 +3629,17 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	erasure-code/jerasure/gf-complete/include/gf_method.h \
 	erasure-code/jerasure/gf-complete/include/gf_general.h \
 	erasure-code/jerasure/ErasureCodeJerasure.h \
-	erasure-code/lrc/ErasureCodeLrc.h $(am__append_36) \
-	erasure-code/ErasureCode.h erasure-code/ErasureCodeInterface.h \
-	erasure-code/ErasureCodePlugin.h osdc/Filer.h osdc/Journaler.h \
-	osdc/ObjectCacher.h osdc/Objecter.h osdc/Striper.h \
-	osdc/WritebackHandler.h client/Client.h client/Dentry.h \
-	client/Dir.h client/Fh.h client/Inode.h client/MetaRequest.h \
-	client/MetaSession.h client/ClientSnapRealm.h \
-	client/SyntheticClient.h client/Trace.h client/ioctl.h \
-	client/ObjecterWriteback.h $(am__append_40) global/pidfile.h \
-	global/global_init.h global/global_context.h \
-	global/signal_handler.h json_spirit/json_spirit.h \
+	erasure-code/ErasureCodeInterface.h \
+	erasure-code/ErasureCodePlugin.h osdc/Blinker.h osdc/Filer.h \
+	osdc/Journaler.h osdc/ObjectCacher.h osdc/Objecter.h \
+	osdc/Striper.h osdc/WritebackHandler.h client/Client.h \
+	client/Dentry.h client/Dir.h client/Fh.h client/Inode.h \
+	client/MetaRequest.h client/MetaSession.h \
+	client/ClientSnapRealm.h client/SyntheticClient.h \
+	client/Trace.h client/ioctl.h client/ObjecterWriteback.h \
+	$(am__append_24) global/pidfile.h global/global_init.h \
+	global/global_context.h global/signal_handler.h \
+	json_spirit/json_spirit.h \
 	json_spirit/json_spirit_error_position.h \
 	json_spirit/json_spirit_reader.h \
 	json_spirit/json_spirit_reader_template.h \
@@ -4489,44 +3680,42 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	common/config_obs.h common/config_opts.h common/ceph_crypto.h \
 	common/ceph_crypto_cms.h common/ceph_json.h common/lru_map.h \
 	common/utf8.h common/mime.h common/pick_address.h \
-	common/strtol.h common/static_assert.h common/AsyncReserver.h \
-	common/sync_filesystem.h common/cmdparse.h common/hobject.h \
-	common/linux_version.h common/module.h common/secret.h \
-	msg/Accepter.h msg/Connection.h msg/DispatchQueue.h \
-	msg/Dispatcher.h msg/Message.h msg/Messenger.h msg/Pipe.h \
-	msg/PipeConnection.h msg/SimpleMessenger.h \
-	msg/SimplePolicyMessenger.h msg/msg_types.h messages/MAuth.h \
-	messages/MAuthReply.h messages/MCacheExpire.h \
-	messages/MClientCaps.h messages/MClientCapRelease.h \
-	messages/MClientLease.h messages/MClientReconnect.h \
-	messages/MClientReply.h messages/MClientRequest.h \
-	messages/MClientRequestForward.h messages/MClientSession.h \
-	messages/MClientSnap.h messages/MCommand.h \
-	messages/MCommandReply.h messages/MDentryLink.h \
-	messages/MDentryUnlink.h messages/MDirUpdate.h \
-	messages/MDiscover.h messages/MDiscoverReply.h \
-	messages/MExportCaps.h messages/MExportCapsAck.h \
-	messages/MExportDir.h messages/MExportDirAck.h \
-	messages/MExportDirCancel.h messages/MExportDirDiscover.h \
-	messages/MExportDirDiscoverAck.h messages/MExportDirFinish.h \
-	messages/MExportDirNotify.h messages/MExportDirNotifyAck.h \
-	messages/MExportDirPrep.h messages/MExportDirPrepAck.h \
-	messages/MGenericMessage.h messages/MGetPoolStats.h \
-	messages/MGetPoolStatsReply.h messages/MHeartbeat.h \
-	messages/MInodeFileCaps.h messages/MLock.h messages/MLog.h \
-	messages/MLogAck.h messages/MMDSBeacon.h \
-	messages/MMDSCacheRejoin.h messages/MMDSLoadTargets.h \
-	messages/MMDSFindIno.h messages/MMDSFindInoReply.h \
-	messages/MMDSFragmentNotify.h messages/MMDSMap.h \
-	messages/MMDSOpenIno.h messages/MMDSOpenInoReply.h \
-	messages/MMDSResolve.h messages/MMDSResolveAck.h \
-	messages/MMDSSlaveRequest.h messages/MMDSTableRequest.h \
-	messages/MMonCommand.h messages/MMonCommandAck.h \
-	messages/MMonElection.h messages/MMonGetMap.h \
-	messages/MMonGetVersion.h messages/MMonGetVersionReply.h \
-	messages/MMonGlobalID.h messages/MMonHealth.h \
-	messages/MMonJoin.h messages/MMonMap.h messages/MMonPaxos.h \
-	messages/MMonProbe.h messages/MMonScrub.h \
+	common/secret.h common/strtol.h common/static_assert.h \
+	common/AsyncReserver.h common/sync_filesystem.h \
+	common/cmdparse.h common/hobject.h common/linux_version.h \
+	msg/Accepter.h msg/DispatchQueue.h msg/Dispatcher.h \
+	msg/Message.h msg/Messenger.h msg/Pipe.h msg/SimpleMessenger.h \
+	msg/msg_types.h messages/MAuth.h messages/MAuthReply.h \
+	messages/MCacheExpire.h messages/MClientCaps.h \
+	messages/MClientCapRelease.h messages/MClientLease.h \
+	messages/MClientReconnect.h messages/MClientReply.h \
+	messages/MClientRequest.h messages/MClientRequestForward.h \
+	messages/MClientSession.h messages/MClientSnap.h \
+	messages/MCommand.h messages/MCommandReply.h \
+	messages/MDentryLink.h messages/MDentryUnlink.h \
+	messages/MDirUpdate.h messages/MDiscover.h \
+	messages/MDiscoverReply.h messages/MExportCaps.h \
+	messages/MExportCapsAck.h messages/MExportDir.h \
+	messages/MExportDirAck.h messages/MExportDirCancel.h \
+	messages/MExportDirDiscover.h messages/MExportDirDiscoverAck.h \
+	messages/MExportDirFinish.h messages/MExportDirNotify.h \
+	messages/MExportDirNotifyAck.h messages/MExportDirPrep.h \
+	messages/MExportDirPrepAck.h messages/MGenericMessage.h \
+	messages/MGetPoolStats.h messages/MGetPoolStatsReply.h \
+	messages/MHeartbeat.h messages/MInodeFileCaps.h \
+	messages/MLock.h messages/MLog.h messages/MLogAck.h \
+	messages/MMDSBeacon.h messages/MMDSCacheRejoin.h \
+	messages/MMDSLoadTargets.h messages/MMDSFindIno.h \
+	messages/MMDSFindInoReply.h messages/MMDSFragmentNotify.h \
+	messages/MMDSMap.h messages/MMDSOpenIno.h \
+	messages/MMDSOpenInoReply.h messages/MMDSResolve.h \
+	messages/MMDSResolveAck.h messages/MMDSSlaveRequest.h \
+	messages/MMDSTableRequest.h messages/MMonCommand.h \
+	messages/MMonCommandAck.h messages/MMonElection.h \
+	messages/MMonGetMap.h messages/MMonGetVersion.h \
+	messages/MMonGetVersionReply.h messages/MMonGlobalID.h \
+	messages/MMonHealth.h messages/MMonJoin.h messages/MMonMap.h \
+	messages/MMonPaxos.h messages/MMonProbe.h messages/MMonScrub.h \
 	messages/MMonSubscribe.h messages/MMonSubscribeAck.h \
 	messages/MMonSync.h messages/MOSDAlive.h messages/MOSDBoot.h \
 	messages/MOSDFailure.h messages/MOSDMarkMeDown.h \
@@ -4560,18 +3749,16 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	include/err.h include/error.h include/filepath.h \
 	include/frag.h include/hash.h include/intarith.h \
 	include/interval_set.h include/int_types.h include/ipaddr.h \
-	include/krbd.h include/linux_fiemap.h include/lru.h \
-	include/msgr.h include/object.h include/page.h \
-	include/rangeset.h include/rados.h include/rbd_types.h \
-	include/statlite.h include/str_list.h include/str_map.h \
-	include/stringify.h include/triple.h include/types.h \
-	include/utime.h include/elist.h include/uuid.h include/xlist.h \
+	include/linux_fiemap.h include/lru.h include/msgr.h \
+	include/object.h include/page.h include/rangeset.h \
+	include/rados.h include/rbd_types.h include/statlite.h \
+	include/str_list.h include/str_map.h include/stringify.h \
+	include/triple.h include/types.h include/utime.h \
+	include/dlist.h include/elist.h include/uuid.h include/xlist.h \
 	include/rados/librados.h include/rados/rados_types.h \
 	include/rados/rados_types.hpp include/rados/librados.hpp \
 	include/rados/librgw.h include/rados/page.h \
 	include/rados/crc32c.h include/rados/buffer.h \
-	include/radosstriper/libradosstriper.h \
-	include/radosstriper/libradosstriper.hpp \
 	include/rbd/features.h include/rbd/librbd.h \
 	include/rbd/librbd.hpp include/util.h include/stat.h \
 	include/on_exit.h include/memory.h include/rados/memory.h \
@@ -4579,8 +3766,6 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	include/unordered_map.h librados/snap_set_diff.h \
 	librados/AioCompletionImpl.h librados/IoCtxImpl.h \
 	librados/PoolAsyncCompletionImpl.h librados/RadosClient.h \
-	librados/RadosXattrIter.h libradosstriper/RadosStriperImpl.h \
-	libradosstriper/MultiAioCompletionImpl.h \
 	librbd/AioCompletion.h librbd/AioRequest.h librbd/ImageCtx.h \
 	librbd/internal.h librbd/LibrbdWriteback.h \
 	librbd/parent_types.h librbd/SnapInfo.h librbd/WatchCtx.h \
@@ -4622,18 +3807,14 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	cls/user/cls_user_ops.h cls/user/cls_user_types.h \
 	key_value_store/key_value_structure.h \
 	key_value_store/kv_flat_btree_async.h \
-	key_value_store/kvs_arg_types.h rbd_replay/BoundedBuffer.hpp \
-	rbd_replay/actions.hpp rbd_replay/Deser.hpp \
-	rbd_replay/ImageNameMap.hpp rbd_replay/ios.hpp \
-	rbd_replay/PendingIO.hpp rbd_replay/rbd_loc.hpp \
-	rbd_replay/rbd_replay_debug.hpp rbd_replay/Replayer.hpp \
-	rbd_replay/Ser.hpp \
+	key_value_store/kvs_arg_types.h \
+	test/erasure-code/ErasureCodeExample.h \
 	test/erasure-code/ceph_erasure_code_benchmark.h \
-	test/erasure-code/ErasureCodeExample.h test/bench/backend.h \
-	test/bench/bencher.h test/bench/detailed_stat_collector.h \
-	test/bench/distribution.h test/bench/dumb_backend.h \
-	test/bench/rados_backend.h test/bench/rbd_backend.h \
-	test/bench/stat_collector.h test/bench/testfilestore_backend.h \
+	test/bench/backend.h test/bench/bencher.h \
+	test/bench/detailed_stat_collector.h test/bench/distribution.h \
+	test/bench/dumb_backend.h test/bench/rados_backend.h \
+	test/bench/rbd_backend.h test/bench/stat_collector.h \
+	test/bench/testfilestore_backend.h \
 	test/common/ObjectContents.h test/encoding/types.h \
 	test/objectstore/DeterministicOpSequence.h \
 	test/objectstore/FileStoreDiff.h \
@@ -4641,7 +3822,6 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	test/objectstore/TestObjectStoreState.h \
 	test/objectstore/workload_generator.h test/kv_store_bench.h \
 	test/librados/test.h test/librados/TestCase.h \
-	test/libradosstriper/TestCase.h \
 	test/ObjectMap/KeyValueDBMemory.h test/omap_bench.h \
 	test/osdc/FakeWriteback.h test/osd/Object.h \
 	test/osd/RadosModel.h test/osd/TestOpStat.h \
@@ -4652,11 +3832,7 @@ noinst_HEADERS = arch/intel.h arch/neon.h arch/probe.h \
 	test/system/st_rados_list_objects.h \
 	test/system/st_rados_notify.h test/system/st_rados_watch.h \
 	test/system/systest_runnable.h test/system/systest_settings.h \
-	test/unit.h tools/cephfs/JournalTool.h \
-	tools/cephfs/JournalScanner.h tools/cephfs/JournalFilter.h \
-	tools/cephfs/EventOutput.h tools/cephfs/Resetter.h \
-	tools/cephfs/Dumper.h tools/cephfs/MDSUtility.h \
-	tools/rados/rados_sync.h tools/common.h cls_acl.cc \
+	test/unit.h tools/rados/rados_sync.h tools/common.h cls_acl.cc \
 	cls_crypto.cc fetch_config logrotate.conf sample.ceph.conf \
 	bash_completion/ceph bash_completion/rados bash_completion/rbd \
 	bash_completion/radosgw-admin mount/canonicalize.c \
@@ -4665,53 +3841,48 @@ bin_SCRIPTS = brag/client/ceph-brag ceph ceph-run ceph-rest-api \
 	ceph-clsinfo ceph-debugpack ceph-rbdnamer ceph-post-file \
 	ceph-crush-location ceph-coverage
 sbin_SCRIPTS = 
-su_sbin_SCRIPTS = mount.fuse.ceph
+su_sbin_SCRIPTS = mount.fuse.ceph mkcephfs
 dist_bin_SCRIPTS = 
-lib_LTLIBRARIES = librados.la libradosstriper.la librbd.la \
-	libcephfs.la $(am__append_92)
+lib_LTLIBRARIES = librados.la librbd.la libcephfs.la $(am__append_66)
 noinst_LTLIBRARIES = libarch.la libauth.la libcrush.la libmon_types.la \
-	libmon.la libmds.la libos_types.la libos.la $(am__append_19) \
-	$(am__append_21) libosd_types.la libosd.la liberasure_code.la \
-	libosdc.la libclient.la $(am__append_39) libglobal.la \
-	libjson_spirit.la liblog.la libperfglue.la libcommon_crc.la \
-	libcommon.la $(am__append_49) libmsg.la $(am__append_55) \
-	libcls_lock_client.la libcls_refcount_client.la \
-	libcls_rgw_client.la libcls_rbd_client.la librbd_replay.la \
-	librbd_replay_ios.la $(am__append_77) libradostest.la \
-	libradosstripertest.la $(am__append_89)
-noinst_LIBRARIES = $(am__append_23) libcls_version_client.a \
+	libmon.la libmds.la libos_types.la libos.la libosd_types.la \
+	libosd.la liberasure_code.la libosdc.la libclient.la \
+	$(am__append_23) libglobal.la libjson_spirit.la liblog.la \
+	libperfglue.la libcommon_crc.la libcommon.la libmsg.la \
+	$(am__append_35) libcls_lock_client.la \
+	libcls_refcount_client.la libcls_rgw_client.la \
+	libcls_rbd_client.la $(am__append_51) libradostest.la
+noinst_LIBRARIES = $(am__append_17) libcls_version_client.a \
 	libcls_log_client.a libcls_statelog_client.a \
 	libcls_replica_log_client.a libcls_user_client.a
 radoslib_LTLIBRARIES = libcls_hello.la libcls_rbd.la libcls_lock.la \
 	libcls_refcount.la libcls_version.la libcls_log.la \
 	libcls_statelog.la libcls_replica_log.la libcls_user.la \
-	libcls_rgw.la $(am__append_60)
+	libcls_rgw.la $(am__append_40)
 
 # like bin_PROGRAMS, but these targets are only built for debug builds
-bin_DEBUGPROGRAMS = ceph_test_ioctls $(am__append_58) \
+bin_DEBUGPROGRAMS = ceph_test_ioctls $(am__append_38) \
 	ceph_erasure_code_benchmark ceph_erasure_code ceph_test_timers \
 	ceph_test_signal_handlers ceph_test_rados ceph_test_mutate \
 	ceph_test_rewrite_latency ceph_test_msgr ceph_streamtest \
 	ceph_test_trans ceph_test_crypto ceph_test_keys \
-	$(am__append_75) ceph_smalliobench ceph_smalliobenchfs \
+	$(am__append_49) ceph_smalliobench ceph_smalliobenchfs \
 	ceph_smalliobenchdumb ceph_smalliobenchrbd ceph_tpbench \
-	ceph_omapbench $(am__append_76) ceph_bench_log \
-	$(am__append_79) ceph_multi_stress_watch ceph_test_librbd \
-	$(am__append_80) ceph_test_cls_rbd ceph_test_cls_refcount \
+	ceph_omapbench $(am__append_50) ceph_bench_log \
+	$(am__append_53) ceph_multi_stress_watch ceph_test_librbd \
+	$(am__append_54) ceph_test_cls_rbd ceph_test_cls_refcount \
 	ceph_test_cls_version ceph_test_cls_log ceph_test_cls_statelog \
 	ceph_test_cls_replica_log ceph_test_cls_lock \
-	ceph_test_cls_hello $(am__append_81) ceph_test_mon_workloadgen \
-	ceph_test_mon_msg ceph_test_rados_api_cmd \
-	ceph_test_rados_api_io ceph_test_rados_api_c_write_operations \
+	ceph_test_cls_hello $(am__append_55) ceph_test_mon_workloadgen \
+	ceph_test_rados_api_cmd ceph_test_rados_api_io \
+	ceph_test_rados_api_c_write_operations \
 	ceph_test_rados_api_c_read_operations ceph_test_rados_api_aio \
 	ceph_test_rados_api_list ceph_test_rados_api_pool \
 	ceph_test_rados_api_stat ceph_test_rados_api_watch_notify \
 	ceph_test_rados_api_snapshots ceph_test_rados_api_cls \
 	ceph_test_rados_api_misc ceph_test_rados_api_tier \
-	ceph_test_rados_api_lock ceph_test_rados_striper_api_io \
-	ceph_test_rados_striper_api_aio \
-	ceph_test_rados_striper_api_striping ceph_test_libcephfs \
-	$(am__append_82) ceph_test_objectstore_workloadgen \
+	ceph_test_rados_api_lock ceph_test_libcephfs $(am__append_56) \
+	ceph_test_objectstore_workloadgen \
 	ceph_test_filestore_idempotent \
 	ceph_test_filestore_idempotent_sequence ceph_xattr_bench \
 	ceph_test_filejournal ceph_test_stress_watch \
@@ -4734,9 +3905,9 @@ check_SCRIPTS = test/erasure-code/test-erasure-code.sh \
 	unittest_bufferlist.sh test/encoding/check-generated.sh \
 	test/mon/osd-pool-create.sh test/mon/misc.sh \
 	test/mon/osd-crush.sh test/mon/osd-erasure-code-profile.sh \
-	test/mon/mkfs.sh test/osd/osd-config.sh test/osd/osd-bench.sh \
-	test/ceph-disk.sh test/mon/mon-handle-forward.sh \
-	test/vstart_wrapped_tests.sh test/pybind/test_ceph_argparse.py
+	test/mon/mkfs.sh test/ceph-disk.sh \
+	test/mon/mon-handle-forward.sh test/vstart_wrapped_tests.sh \
+	test/pybind/test_ceph_argparse.py
 
 ##################################
 AM_COMMON_CPPFLAGS = \
@@ -4760,7 +3931,7 @@ AM_COMMON_CFLAGS = \
 	-fno-strict-aliasing \
 	-fsigned-char
 
-AM_CFLAGS = $(AM_COMMON_CFLAGS) $(am__append_5) $(am__append_42)
+AM_CFLAGS = $(AM_COMMON_CFLAGS) $(am__append_5) $(am__append_26)
 AM_CPPFLAGS = $(AM_COMMON_CPPFLAGS)
 
 # note: this is position dependant, it affects the -l options that
@@ -4776,12 +3947,11 @@ AM_CCASFLAGS = -f elf64
 
 #####################
 EXTRALIBS = -luuid -lm $(am__append_7) $(am__append_8) $(am__append_9) \
-	$(am__append_14)
+	$(am__append_13)
 LIBGLOBAL = libglobal.la
 LIBCOMMON = libcommon.la
-LIBSECRET = libsecret.la
 LIBARCH = libarch.la
-LIBPERFGLUE = libperfglue.la $(am__append_13)
+LIBPERFGLUE = libperfglue.la $(am__append_12)
 LIBAUTH = libauth.la
 LIBMSG = libmsg.la
 LIBCRUSH = libcrush.la
@@ -4789,8 +3959,7 @@ LIBJSON_SPIRIT = libjson_spirit.la
 LIBLOG = liblog.la
 
 # Always use system leveldb
-LIBOS = libos.la $(am__append_10) $(am__append_11) $(am__append_12) \
-	-lleveldb -lsnappy
+LIBOS = libos.la $(am__append_10) $(am__append_11) -lleveldb -lsnappy
 LIBOS_TYPES = libos_types.la
 
 # Libosd always needs osdc and os
@@ -4805,16 +3974,10 @@ LIBMDS = libmds.la $(LIBPERFGLUE)
 LIBCLIENT = libclient.la
 LIBCLIENT_FUSE = libclient_fuse.la
 LIBRADOS = librados.la
-LIBRADOSSTRIPER = libradosstriper.la
 LIBRGW = librgw.la
 LIBRBD = librbd.la
-LIBKRBD = libkrbd.la
 LIBCEPHFS = libcephfs.la
 LIBERASURE_CODE = liberasure_code.la
-LIBOSD_TP = tracing/libosd_tp.la
-LIBRADOS_TP = tracing/librados_tp.la
-LIBRBD_TP = tracing/librbd_tp.la
-LIBOS_TP = tracing/libos_tp.la
 
 # Use this for binaries requiring libglobal
 CEPH_GLOBAL = $(LIBGLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
@@ -4824,13 +3987,12 @@ CEPH_GLOBAL = $(LIBGLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXT
 # important; libmsg before libauth!
 LIBCOMMON_DEPS = libcommon_crc.la $(LIBERASURE_CODE) $(LIBMSG) \
 	$(LIBAUTH) $(LIBCRUSH) $(LIBJSON_SPIRIT) $(LIBLOG) $(LIBARCH) \
-	$(am__append_48)
-LIBRADOS_DEPS = libcls_lock_client.la $(LIBOSDC) $(LIBCOMMON) \
-	$(am__append_50)
-LIBRGW_DEPS = $(am__append_56)
+	$(am__append_32)
+LIBRADOS_DEPS = libcls_lock_client.la $(LIBOSDC) $(LIBCOMMON)
+LIBRGW_DEPS = $(am__append_36)
 
 # This is used by the dencoder test
-DENCODER_SOURCES = $(am__append_59)
+DENCODER_SOURCES = $(am__append_39)
 DENCODER_DEPS = libcls_lock_client.la libcls_refcount_client.la \
 	libcls_replica_log_client.a libcls_rgw_client.la \
 	libcls_user_client.a
@@ -4888,16 +4050,17 @@ libmon_la_SOURCES = \
 
 libmon_la_LIBADD = $(LIBAUTH) $(LIBCOMMON) $(LIBOS) $(LIBMON_TYPES)
 libmds_la_SOURCES = \
+	mds/Anchor.cc \
 	mds/Capability.cc \
+	mds/Dumper.cc \
+	mds/Resetter.cc \
 	mds/MDS.cc \
-	mds/Beacon.cc \
 	mds/flock.cc \
 	mds/locks.c \
 	mds/journal.cc \
 	mds/Server.cc \
 	mds/Mutation.cc \
 	mds/MDCache.cc \
-	mds/RecoveryQueue.cc \
 	mds/Locker.cc \
 	mds/Migrator.cc \
 	mds/MDBalancer.cc \
@@ -4907,16 +4070,16 @@ libmds_la_SOURCES = \
 	mds/LogEvent.cc \
 	mds/MDSTable.cc \
 	mds/InoTable.cc \
-	mds/JournalPointer.cc \
 	mds/MDSTableClient.cc \
 	mds/MDSTableServer.cc \
+	mds/AnchorServer.cc \
+	mds/AnchorClient.cc \
 	mds/SnapRealm.cc \
 	mds/SnapServer.cc \
 	mds/snap.cc \
 	mds/SessionMap.cc \
-	mds/MDSContext.cc \
 	mds/MDLog.cc \
-	common/TrackedOp.cc
+	mds/MDSUtility.cc
 
 libmds_la_LIBADD = $(LIBOSDC)
 libos_types_la_SOURCES = \
@@ -4928,18 +4091,11 @@ libos_la_SOURCES = os/chain_xattr.cc os/DBObjectMap.cc \
 	os/FlatIndex.cc os/GenericFileStoreBackend.cc os/HashIndex.cc \
 	os/IndexManager.cc os/JournalingObjectStore.cc \
 	os/LevelDBStore.cc os/LFNIndex.cc os/MemStore.cc \
-	os/KeyValueDB.cc os/KeyValueStore.cc os/ObjectStore.cc \
-	os/WBThrottle.cc os/KeyValueDB.cc common/TrackedOp.cc \
-	$(am__append_15) $(am__append_16) $(am__append_17) \
-	$(am__append_25)
-libos_la_CXXFLAGS = ${AM_CXXFLAGS} $(am__append_26)
-libos_la_LIBADD = $(LIBOS_TYPES) $(am__append_18) $(am__append_27)
- at WITH_DLIBROCKSDB_TRUE@libos_rocksdb_la_SOURCES = os/RocksDBStore.cc
- at WITH_SLIBROCKSDB_TRUE@libos_rocksdb_la_SOURCES = os/RocksDBStore.cc
- at WITH_DLIBROCKSDB_TRUE@libos_rocksdb_la_CXXFLAGS = ${AM_CXXFLAGS} ${LIBROCKSDB_CFLAGS} -std=gnu++11
- at WITH_SLIBROCKSDB_TRUE@libos_rocksdb_la_CXXFLAGS = ${AM_CXXFLAGS} ${LIBROCKSDB_CFLAGS} -std=gnu++11 -I rocksdb/include
- at WITH_DLIBROCKSDB_TRUE@libos_rocksdb_la_LIBADD = -lrocksdb
- at WITH_SLIBROCKSDB_TRUE@libos_rocksdb_la_LIBADD = rocksdb/librocksdb.la
+	os/KeyValueStore.cc os/ObjectStore.cc os/WBThrottle.cc \
+	common/TrackedOp.cc $(am__append_14) $(am__append_15) \
+	$(am__append_16)
+libos_la_CXXFLAGS = ${AM_CXXFLAGS}
+libos_la_LIBADD = $(LIBOS_TYPES)
 @WITH_LIBZFS_TRUE at libos_zfs_a_SOURCES = os/ZFS.cc
 @WITH_LIBZFS_TRUE at libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
 libosd_types_la_SOURCES = \
@@ -4967,20 +4123,17 @@ libosd_la_SOURCES = \
 	osd/SnapMapper.cc \
 	objclass/class_api.cc
 
-libosd_la_CXXFLAGS = ${AM_CXXFLAGS} $(am__append_30)
-libosd_la_LIBADD = $(LIBOSDC) $(LIBOS) $(LIBOSD_TYPES) $(LIBOS_TYPES) \
-	$(am__append_29)
+libosd_la_CXXFLAGS = ${AM_CXXFLAGS}
+libosd_la_LIBADD = $(LIBOSDC) $(LIBOS) $(LIBOSD_TYPES) $(LIBOS_TYPES)
 erasure_codelibdir = $(pkglibdir)/erasure-code
 erasure_codelib_LTLIBRARIES = libec_jerasure_generic.la \
 	libec_jerasure_sse3.la libec_jerasure_sse4.la \
-	libec_jerasure.la libec_lrc.la $(am__append_38) \
-	libec_example.la libec_missing_entry_point.la \
-	libec_missing_version.la libec_hangs.la \
+	libec_jerasure.la libec_example.la \
+	libec_missing_entry_point.la libec_hangs.la \
 	libec_fail_to_initialize.la libec_fail_to_register.la \
 	libec_test_jerasure_sse4.la libec_test_jerasure_sse3.la \
 	libec_test_jerasure_generic.la
 jerasure_sources = \
-  erasure-code/ErasureCode.cc \
   erasure-code/jerasure/jerasure/src/cauchy.c \
   erasure-code/jerasure/jerasure/src/galois.c \
   erasure-code/jerasure/jerasure/src/jerasure.c \
@@ -5002,36 +4155,36 @@ jerasure_sources = \
 
 libec_jerasure_generic_la_SOURCES = ${jerasure_sources}
 libec_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}  \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 
 libec_jerasure_generic_la_CXXFLAGS = ${AM_CXXFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 
 libec_jerasure_generic_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_generic_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 \
-	$(am__append_31)
+	$(am__append_19)
 libec_jerasure_sse3_la_SOURCES = ${jerasure_sources}
 libec_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 
 libec_jerasure_sse3_la_CXXFLAGS = ${AM_CXXFLAGS} \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 
 libec_jerasure_sse3_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_sse3_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 \
-	$(am__append_32)
+	$(am__append_20)
 libec_jerasure_sse4_la_SOURCES = ${jerasure_sources}
 libec_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSE_FLAGS} \
@@ -5040,8 +4193,8 @@ libec_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
 	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 
 libec_jerasure_sse4_la_CXXFLAGS = ${AM_CXXFLAGS} \
 	${INTEL_SSE_FLAGS} \
@@ -5050,74 +4203,23 @@ libec_jerasure_sse4_la_CXXFLAGS = ${AM_CXXFLAGS} \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
 	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 
 libec_jerasure_sse4_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_sse4_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 \
-	$(am__append_33)
+	$(am__append_21)
 libec_jerasure_la_SOURCES = \
 	erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
 
-libec_jerasure_la_CFLAGS = ${AM_CFLAGS}
+libec_jerasure_la_CFLAGS = ${AM_CFLAGS} 
 libec_jerasure_la_CXXFLAGS = ${AM_CXXFLAGS}
 libec_jerasure_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 \
-	$(am__append_34)
-lrc_sources = \
-  erasure-code/ErasureCode.cc \
-  erasure-code/lrc/ErasureCodePluginLrc.cc \
-  erasure-code/lrc/ErasureCodeLrc.cc
-
-libec_lrc_la_SOURCES = ${lrc_sources} common/str_map.cc
-libec_lrc_la_CFLAGS = ${AM_CFLAGS}
-libec_lrc_la_CXXFLAGS = ${AM_CXXFLAGS}
-libec_lrc_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(LIBJSON_SPIRIT)
-libec_lrc_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 \
-	$(am__append_35)
- at WITH_BETTER_YASM_ELF64_TRUE@isa_sources = \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/ErasureCode.cc \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/ec_base.c \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/ErasureCodeIsa.cc \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/ErasureCodeIsaTableCache.cc \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/ErasureCodePluginIsa.cc \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/isa/xor_op.cc
-
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_SOURCES = ${isa_sources}
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_CFLAGS = ${AM_CFLAGS} -I $(srcdir)/erasure-code/isa/isa-l/include/
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_CXXFLAGS = ${AM_CXXFLAGS} -I $(srcdir)/erasure-code/isa/isa-l/include/
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_CCASFLAGS = ${AM_CCASFLAGS} -I $(abs_srcdir)/erasure-code/isa/isa-l/include/
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_LDFLAGS = ${AM_LDFLAGS} \
- at WITH_BETTER_YASM_ELF64_TRUE@	-version-info 2:10:0 \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__append_37)
- at WITH_BETTER_YASM_ELF64_TRUE@libec_isa_la_LIBTOOLFLAGS = --tag=CC
+	$(am__append_22)
 liberasure_code_la_SOURCES = \
 	erasure-code/ErasureCodePlugin.cc
 
-liberasure_code_la_DEPENDENCIES = $(erasure_codelib_LTLIBRARIES)
 @LINUX_TRUE at liberasure_code_la_LIBADD = -ldl
 libosdc_la_SOURCES = \
 	osdc/Objecter.cc \
@@ -5150,13 +4252,12 @@ libjson_spirit_la_SOURCES = \
 	json_spirit/json_spirit_reader.cpp \
 	json_spirit/json_spirit_writer.cpp
 
-libjson_spirit_la_LIBADD = $(BOOST_THREAD_LIBS)
 liblog_la_SOURCES = \
 	log/Log.cc \
 	log/SubsystemMap.cc
 
-libperfglue_la_SOURCES = $(am__append_41) $(am__append_44) \
-	$(am__append_45) $(am__append_46)
+libperfglue_la_SOURCES = $(am__append_25) $(am__append_28) \
+	$(am__append_29) $(am__append_30)
 @WITH_TCMALLOC_TRUE at libperfglue_la_LIBADD = -ltcmalloc
 
 # these should go out of libcommon
@@ -5174,7 +4275,7 @@ libcommon_la_SOURCES = ceph_ver.c common/DecayCounter.cc \
 	common/snap_types.cc common/str_list.cc common/str_map.cc \
 	common/errno.cc common/RefCountedObj.cc common/blkdev.cc \
 	common/common_init.cc common/pipe.c common/ceph_argparse.cc \
-	common/ceph_context.cc common/buffer.cc common/types.cc \
+	common/ceph_context.cc common/buffer.cc \
 	common/code_environment.cc common/dout.cc common/histogram.cc \
 	common/signal.cc common/simple_spin.cc common/Thread.cc \
 	common/Formatter.cc common/HeartbeatMap.cc common/config.cc \
@@ -5185,26 +4286,23 @@ libcommon_la_SOURCES = ceph_ver.c common/DecayCounter.cc \
 	common/pick_address.cc common/util.cc common/TextTable.cc \
 	common/ceph_fs.cc common/ceph_hash.cc common/ceph_strings.cc \
 	common/ceph_frag.cc common/addr_parsing.c common/hobject.cc \
-	common/bloom_filter.cc common/linux_version.c common/module.c \
-	mon/MonCap.cc mon/MonClient.cc mon/MonMap.cc osd/OSDMap.cc \
-	osd/osd_types.cc osd/ECMsgTypes.cc osd/HitSet.cc mds/MDSMap.cc \
+	common/bloom_filter.cc common/linux_version.c mon/MonCap.cc \
+	mon/MonClient.cc mon/MonMap.cc osd/OSDMap.cc osd/osd_types.cc \
+	osd/ECMsgTypes.cc osd/HitSet.cc mds/MDSMap.cc \
 	mds/inode_backtrace.cc mds/mdstypes.cc
 
 # inject crc in common
 libcommon_crc_la_SOURCES = common/sctp_crc32.c common/crc32c.cc \
 	common/crc32c_intel_baseline.c common/crc32c_intel_fast.c \
-	$(am__append_47)
+	$(am__append_31)
 @WITH_GOOD_YASM_ELF64_TRUE at libcommon_crc_la_LIBTOOLFLAGS = --tag=CC
 libcommon_la_LIBADD = $(LIBCOMMON_DEPS)
-libsecret_la_SOURCES = common/secret.c
-libsecret_la_LIBADD = $(KEYUTILS_LIB)
 libmsg_la_SOURCES = \
 	msg/Accepter.cc \
 	msg/DispatchQueue.cc \
 	msg/Message.cc \
 	msg/Messenger.cc \
 	msg/Pipe.cc \
-	msg/PipeConnection.cc \
 	msg/SimpleMessenger.cc \
 	msg/msg_types.cc
 
@@ -5227,36 +4325,18 @@ rados_include_DATA = \
 	$(srcdir)/include/crc32c.h \
 	$(srcdir)/include/memory.h
 
-radosstriper_includedir = $(includedir)/radosstriper
-radosstriper_include_DATA = \
-	$(srcdir)/include/radosstriper/libradosstriper.h \
-	$(srcdir)/include/radosstriper/libradosstriper.hpp
-
 librados_la_SOURCES = \
 	librados/librados.cc \
 	librados/RadosClient.cc \
 	librados/IoCtxImpl.cc \
-	librados/snap_set_diff.cc \
-	librados/RadosXattrIter.cc
+	librados/snap_set_diff.cc
 
 
 # We need this to avoid basename conflicts with the librados build tests in test/Makefile.am
 librados_la_CXXFLAGS = ${AM_CXXFLAGS}
 librados_la_LIBADD = $(LIBRADOS_DEPS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
 librados_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 \
-	$(am__append_51)
-libradosstriper_la_SOURCES = \
-	libradosstriper/libradosstriper.cc \
-	libradosstriper/RadosStriperImpl.cc \
-	libradosstriper/MultiAioCompletionImpl.cc
-
-
-# We need this to avoid basename conflicts with the libradosstriper build tests in test/Makefile.am
-libradosstriper_la_CXXFLAGS = ${AM_CXXFLAGS}
-LIBRADOSSTRIPER_DEPS = $(LIBRADOS)
-libradosstriper_la_LIBADD = $(LIBRADOSSTRIPER_DEPS)
-libradosstriper_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 \
-	$(am__append_52)
+	$(am__append_33)
 librbd_la_SOURCES = \
 	librbd/librbd.cc \
 	librbd/AioCompletion.cc \
@@ -5266,10 +4346,12 @@ librbd_la_SOURCES = \
 	librbd/LibrbdWriteback.cc \
 	librbd/WatchCtx.cc
 
-librbd_la_LIBADD = $(LIBRADOS) $(LIBOSDC) libcls_rbd_client.la \
-	libcls_lock_client.la $(PTHREAD_LIBS) $(EXTRALIBS) \
-	$(am__append_53)
-librbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 $(am__append_54)
+librbd_la_LIBADD = \
+	$(LIBRADOS) $(LIBOSDC) \
+	libcls_rbd_client.la libcls_lock_client.la \
+	$(PTHREAD_LIBS) $(EXTRALIBS)
+
+librbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 $(am__append_34)
 @WITH_RADOSGW_TRUE at librgw_la_SOURCES = \
 @WITH_RADOSGW_TRUE@	rgw/librgw.cc \
 @WITH_RADOSGW_TRUE@	rgw/rgw_acl.cc \
@@ -5330,7 +4412,7 @@ librbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 $(am__append_54)
 @WITH_RADOSGW_TRUE@	civetweb/src/civetweb.c \
 @WITH_RADOSGW_TRUE@	rgw/rgw_main.cc
 
- at WITH_RADOSGW_TRUE@radosgw_CFLAGS = -I$(srcdir)/civetweb/include
+ at WITH_RADOSGW_TRUE@radosgw_CFLAGS = -Icivetweb/include
 @WITH_RADOSGW_TRUE at radosgw_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(RESOLV_LIBS) $(CEPH_GLOBAL)
 @WITH_RADOSGW_TRUE at radosgw_admin_SOURCES = rgw/rgw_admin.cc
 @WITH_RADOSGW_TRUE at radosgw_admin_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(CEPH_GLOBAL)
@@ -5415,53 +4497,21 @@ libcls_user_client_a_SOURCES = cls/user/cls_user_client.cc \
 @LINUX_TRUE at libcls_kvs_la_SOURCES = key_value_store/cls_kvs.cc
 @LINUX_TRUE at libcls_kvs_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
 @LINUX_TRUE at libcls_kvs_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared -export-symbols-regex '.*__cls_.*'
-
-# librbd_replay_la exists only to help with unit tests
-librbd_replay_la_SOURCES = rbd_replay/actions.cc \
-	rbd_replay/Deser.cc \
-	rbd_replay/ImageNameMap.cc \
-	rbd_replay/PendingIO.cc \
-	rbd_replay/rbd_loc.cc \
-	rbd_replay/Replayer.cc \
-	rbd_replay/Ser.cc
-
-librbd_replay_la_LIBADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL)
-
-rbd_replay_SOURCES = rbd_replay/rbd-replay.cc
-rbd_replay_LDADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la
-
-librbd_replay_ios_la_SOURCES = rbd_replay/ios.cc
-librbd_replay_ios_la_LIBADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la
-
-rbd_replay_prep_SOURCES = rbd_replay/rbd-replay-prep.cc
-rbd_replay_prep_LDADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la \
-	librbd_replay_ios.la \
-	-lbabeltrace \
-	-lbabeltrace-ctf \
-	-lboost_date_time
-
 ceph_erasure_code_benchmark_SOURCES = \
-	erasure-code/ErasureCode.cc \
 	test/erasure-code/ceph_erasure_code_benchmark.cc
 
 ceph_erasure_code_benchmark_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL) $(am__append_63)
+	$(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL) $(am__append_41)
+ceph_erasure_code_non_regression_SOURCES = \
+	test/erasure-code/ceph_erasure_code_non_regression.cc
+
+ceph_erasure_code_non_regression_LDADD = $(LIBOSD) $(LIBCOMMON) \
+	$(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL) $(am__append_42)
 ceph_erasure_code_SOURCES = \
 	test/erasure-code/ceph_erasure_code.cc
 
 ceph_erasure_code_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL) $(am__append_64)
+	$(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL) $(am__append_43)
 libec_example_la_SOURCES = test/erasure-code/ErasureCodePluginExample.cc
 libec_example_la_CFLAGS = ${AM_CFLAGS}
 libec_example_la_CXXFLAGS = ${AM_CXXFLAGS}
@@ -5472,11 +4522,6 @@ libec_missing_entry_point_la_CFLAGS = ${AM_CFLAGS}
 libec_missing_entry_point_la_CXXFLAGS = ${AM_CXXFLAGS}
 libec_missing_entry_point_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_missing_entry_point_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
-libec_missing_version_la_SOURCES = test/erasure-code/ErasureCodePluginMissingVersion.cc
-libec_missing_version_la_CFLAGS = ${AM_CFLAGS}
-libec_missing_version_la_CXXFLAGS = ${AM_CXXFLAGS}
-libec_missing_version_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libec_missing_version_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
 libec_hangs_la_SOURCES = test/erasure-code/ErasureCodePluginHangs.cc
 libec_hangs_la_CFLAGS = ${AM_CFLAGS}
 libec_hangs_la_CXXFLAGS = ${AM_CXXFLAGS}
@@ -5507,19 +4552,10 @@ libec_test_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}
 libec_test_jerasure_generic_la_CXXFLAGS = ${AM_CXXFLAGS}
 libec_test_jerasure_generic_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_test_jerasure_generic_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
-unittest_erasure_code_plugin_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodePlugin.cc 
-
+unittest_erasure_code_plugin_SOURCES = test/erasure-code/TestErasureCodePlugin.cc 
 unittest_erasure_code_plugin_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_erasure_code_plugin_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_65)
-unittest_erasure_code_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCode.cc
-
-unittest_erasure_code_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_erasure_code_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_44)
 unittest_erasure_code_jerasure_SOURCES = \
 	test/erasure-code/TestErasureCodeJerasure.cc \
 	${jerasure_sources}
@@ -5533,52 +4569,14 @@ unittest_erasure_code_jerasure_CXXFLAGS = $(UNITTEST_CXXFLAGS) \
 	-Ierasure-code/jerasure/jerasure/include
 
 unittest_erasure_code_jerasure_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_66)
+	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_45)
 unittest_erasure_code_plugin_jerasure_SOURCES = \
 	test/erasure-code/TestErasureCodePluginJerasure.cc
 
 unittest_erasure_code_plugin_jerasure_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
 unittest_erasure_code_plugin_jerasure_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_67)
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_isa_SOURCES = \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/ErasureCode.cc \
- at WITH_BETTER_YASM_ELF64_TRUE@	test/erasure-code/TestErasureCodeIsa.cc
-
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_isa_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_isa_LDADD =  \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBOSD) $(LIBCOMMON) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(UNITTEST_LDADD) $(CEPH_GLOBAL) \
- at WITH_BETTER_YASM_ELF64_TRUE@	.libs/libec_isa.la \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBERASURE_CODE) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__append_68)
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_plugin_isa_SOURCES = \
- at WITH_BETTER_YASM_ELF64_TRUE@	erasure-code/ErasureCode.cc \
- at WITH_BETTER_YASM_ELF64_TRUE@	test/erasure-code/TestErasureCodePluginIsa.cc
-
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_plugin_isa_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
- at WITH_BETTER_YASM_ELF64_TRUE@unittest_erasure_code_plugin_isa_LDADD =  \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBOSD) $(LIBCOMMON) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(UNITTEST_LDADD) $(CEPH_GLOBAL) \
- at WITH_BETTER_YASM_ELF64_TRUE@	.libs/libec_isa.la \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(LIBERASURE_CODE) \
- at WITH_BETTER_YASM_ELF64_TRUE@	$(am__append_70)
-unittest_erasure_code_lrc_SOURCES = \
-	test/erasure-code/TestErasureCodeLrc.cc \
-	${lrc_sources}
-
-unittest_erasure_code_lrc_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_erasure_code_lrc_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_71)
-unittest_erasure_code_plugin_lrc_SOURCES = \
-	test/erasure-code/TestErasureCodePluginLrc.cc
-
-unittest_erasure_code_plugin_lrc_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_erasure_code_plugin_lrc_LDADD = $(LIBOSD) $(LIBCOMMON) \
-	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_72)
-unittest_erasure_code_example_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodeExample.cc
-
+	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(am__append_46)
+unittest_erasure_code_example_SOURCES = test/erasure-code/TestErasureCodeExample.cc 
 unittest_erasure_code_example_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_erasure_code_example_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 ceph_test_timers_SOURCES = test/TestTimers.cc
@@ -5620,8 +4618,8 @@ ceph_dencoder_LDADD = \
 
 
 # These should always use explicit _CFLAGS/_CXXFLAGS so avoid basename conflicts
-ceph_dencoder_CFLAGS = ${AM_CFLAGS} $(am__append_73)
-ceph_dencoder_CXXFLAGS = ${AM_CXXFLAGS} $(am__append_74)
+ceph_dencoder_CFLAGS = ${AM_CFLAGS} $(am__append_47)
+ceph_dencoder_CXXFLAGS = ${AM_CXXFLAGS} $(am__append_48)
 get_command_descriptions_SOURCES = test/common/get_command_descriptions.cc
 get_command_descriptions_LDADD = $(LIBMON) $(LIBCOMMON) $(CEPH_GLOBAL)
 
@@ -5776,9 +4774,6 @@ unittest_str_map_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 unittest_sharedptr_registry_SOURCES = test/common/test_sharedptr_registry.cc
 unittest_sharedptr_registry_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_sharedptr_registry_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-unittest_shared_cache_SOURCES = test/common/test_shared_cache.cc
-unittest_shared_cache_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_shared_cache_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 unittest_sloppy_crc_map_SOURCES = test/common/test_sloppy_crc_map.cc
 unittest_sloppy_crc_map_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_sloppy_crc_map_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -5827,16 +4822,13 @@ unittest_osd_types_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 unittest_pglog_SOURCES = test/osd/TestPGLog.cc
 unittest_pglog_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_pglog_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL) \
-	$(am__append_78)
+	$(am__append_52)
 unittest_ecbackend_SOURCES = test/osd/TestECBackend.cc
 unittest_ecbackend_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_ecbackend_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 unittest_hitset_SOURCES = test/osd/hitset.cc
 unittest_hitset_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_hitset_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-unittest_lru_SOURCES = test/common/test_lru.cc
-unittest_lru_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_lru_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 unittest_io_priority_SOURCES = test/common/test_io_priority.cc
 unittest_io_priority_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_io_priority_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -5960,15 +4952,6 @@ unittest_texttable_LDADD = $(LIBCOMMON) $(UNITTEST_LDADD)
 unittest_texttable_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_on_exit_SOURCES = test/on_exit.cc
 unittest_on_exit_LDADD = $(PTHREAD_LIBS)
-unittest_rbd_replay_SOURCES = test/test_rbd_replay.cc
-unittest_rbd_replay_LDADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la \
-	librbd_replay_ios.la \
-	$(UNITTEST_LDADD)
-
-unittest_rbd_replay_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 @WITH_RADOSGW_TRUE at ceph_test_cors_SOURCES = test/test_cors.cc
 @WITH_RADOSGW_TRUE at ceph_test_cors_LDADD = \
 @WITH_RADOSGW_TRUE@	$(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
@@ -6019,20 +5002,14 @@ libradostest_la_SOURCES = \
 
 libradostest_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 RADOS_TEST_LDADD = libradostest.la
-libradosstripertest_la_SOURCES = test/libradosstriper/TestCase.cc
-libradosstripertest_la_LIBADD = $(RADOS_TEST_LDADD)
-libradosstripertest_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-RADOS_STRIPER_TEST_LDADD = libradosstripertest.la
 ceph_multi_stress_watch_SOURCES = test/multi_stress_watch.cc
 ceph_multi_stress_watch_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
 ceph_test_librbd_SOURCES = test/librbd/test_librbd.cc
 ceph_test_librbd_LDADD = $(LIBRBD) $(LIBRADOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
 ceph_test_librbd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-
-# Force use of C++ linker with dummy.cc - LIBKRBD is a C++ library
- at LINUX_TRUE@ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c common/dummy.cc
- at LINUX_TRUE@ceph_test_librbd_fsx_LDADD = $(LIBKRBD) $(LIBRBD) $(LIBRADOS)
- at LINUX_TRUE@ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS}
+ at LINUX_TRUE@ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
+ at LINUX_TRUE@ceph_test_librbd_fsx_LDADD = $(LIBRBD) $(LIBRADOS) -lm
+ at LINUX_TRUE@ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
 ceph_test_cls_rbd_SOURCES = test/cls_rbd/test_cls_rbd.cc
 ceph_test_cls_rbd_LDADD = $(LIBRADOS) libcls_rbd_client.la libcls_lock_client.la $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
 ceph_test_cls_rbd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
@@ -6068,9 +5045,6 @@ ceph_test_cls_hello_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 @WITH_RADOSGW_TRUE at ceph_test_cls_rgw_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 ceph_test_mon_workloadgen_SOURCES = test/mon/test_mon_workloadgen.cc
 ceph_test_mon_workloadgen_LDADD = $(LIBOS) $(LIBOSDC) $(CEPH_GLOBAL)
-ceph_test_mon_msg_SOURCES = test/mon/test-mon-msg.cc
-ceph_test_mon_msg_LDADD = $(LIBOS) $(LIBOSDC) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
-ceph_test_mon_msg_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 ceph_test_rados_api_cmd_SOURCES = test/librados/cmd.cc
 ceph_test_rados_api_cmd_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
@@ -6120,15 +5094,6 @@ ceph_test_rados_api_tier_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 ceph_test_rados_api_lock_SOURCES = test/librados/lock.cc
 ceph_test_rados_api_lock_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-ceph_test_rados_striper_api_io_SOURCES = test/libradosstriper/io.cc
-ceph_test_rados_striper_api_io_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_io_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-ceph_test_rados_striper_api_aio_SOURCES = test/libradosstriper/aio.cc
-ceph_test_rados_striper_api_aio_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_aio_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-ceph_test_rados_striper_api_striping_SOURCES = test/libradosstriper/striping.cc
-ceph_test_rados_striper_api_striping_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_striping_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 ceph_test_libcephfs_SOURCES = \
 	test/libcephfs/test.cc \
 	test/libcephfs/readdir_r_cb.cc \
@@ -6140,9 +5105,6 @@ ceph_test_libcephfs_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 @LINUX_TRUE at ceph_test_objectstore_SOURCES = test/objectstore/store_test.cc
 @LINUX_TRUE at ceph_test_objectstore_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 @LINUX_TRUE at ceph_test_objectstore_CXXFLAGS = $(UNITTEST_CXXFLAGS)
- at LINUX_TRUE@ceph_test_filestore_SOURCES = test/filestore/TestFileStore.cc
- at LINUX_TRUE@ceph_test_filestore_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
- at LINUX_TRUE@ceph_test_filestore_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 ceph_test_objectstore_workloadgen_SOURCES = \
 	test/objectstore/workload_generator.cc \
 	test/objectstore/TestObjectStoreState.cc
@@ -6205,9 +5167,12 @@ ceph_monstore_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL) $(BOOST_PROGRAM_OPTIONS_LIBS)
 ceph_kvstore_tool_SOURCES = tools/ceph_kvstore_tool.cc
 ceph_kvstore_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL)
 ceph_kvstore_tool_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-ceph_objectstore_tool_SOURCES = tools/ceph_objectstore_tool.cc
-ceph_objectstore_tool_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) \
-	$(BOOST_PROGRAM_OPTIONS_LIBS) $(LIBRADOS) $(am__append_83)
+ceph_filestore_tool_SOURCES = tools/ceph_filestore_tool.cc
+ceph_filestore_tool_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) \
+	-lboost_program_options $(am__append_57)
+ceph_filestore_dump_SOURCES = tools/ceph_filestore_dump.cc
+ceph_filestore_dump_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) \
+	$(BOOST_PROGRAM_OPTIONS_LIBS) $(am__append_58)
 monmaptool_SOURCES = tools/monmaptool.cc
 monmaptool_LDADD = $(CEPH_GLOBAL) $(LIBCOMMON)
 crushtool_SOURCES = tools/crushtool.cc
@@ -6231,22 +5196,11 @@ rados_SOURCES = tools/rados/rados.cc tools/rados/rados_import.cc \
 	common/obj_bencher.cc # needs cleanup so it can go in \
 	libcommon.la
 rados_LDADD = libcls_lock_client.la $(LIBRADOS) $(CEPH_GLOBAL)
-cephfs_journal_tool_SOURCES = \
-	tools/cephfs/cephfs-journal-tool.cc \
-	tools/cephfs/JournalTool.cc \
-	tools/cephfs/JournalFilter.cc \
-	tools/cephfs/JournalScanner.cc \
-	tools/cephfs/EventOutput.cc \
-	tools/cephfs/Dumper.cc \
-	tools/cephfs/Resetter.cc \
-	tools/cephfs/MDSUtility.cc
-
-cephfs_journal_tool_LDADD = $(LIBMDS) $(LIBRADOS) $(CEPH_GLOBAL)
 @WITH_REST_BENCH_TRUE at rest_bench_SOURCES = tools/rest_bench.cc \
 @WITH_REST_BENCH_TRUE@	common/obj_bencher.cc # needs cleanup so \
 @WITH_REST_BENCH_TRUE@	it can go in libcommon.la
 @WITH_REST_BENCH_TRUE at rest_bench_LDADD = $(CEPH_GLOBAL) \
- at WITH_REST_BENCH_TRUE@	$(am__append_85) $(am__append_86)
+ at WITH_REST_BENCH_TRUE@	$(am__append_60) $(am__append_61)
 @WITH_REST_BENCH_TRUE@@WITH_SYSTEM_LIBS3_FALSE at rest_bench_CXXFLAGS = ${AM_CXXFLAGS} -I$(top_srcdir)/src/libs3/inc
 ceph_conf_SOURCES = tools/ceph_conf.cc
 ceph_conf_LDADD = $(CEPH_GLOBAL) $(LIBCOMMON)
@@ -6268,8 +5222,8 @@ ceph_mds_LDADD = $(LIBMDS) $(LIBOSDC) $(CEPH_GLOBAL) $(LIBCOMMON)
 # admin tools
 
 # user tools
-mount_ceph_SOURCES = mount/mount.ceph.c
-mount_ceph_LDADD = $(LIBSECRET) $(LIBCOMMON)
+mount_ceph_SOURCES = mount/mount.ceph.c common/secret.c
+mount_ceph_LDADD = $(LIBCOMMON) $(KEYUTILS_LIB)
 cephfs_SOURCES = cephfs.cc
 cephfs_LDADD = $(LIBCOMMON)
 librados_config_SOURCES = librados-config.cc
@@ -6277,10 +5231,8 @@ librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
 ceph_syn_SOURCES = ceph_syn.cc client/SyntheticClient.cc # uses \
 	g_conf.. needs cleanup
 ceph_syn_LDADD = $(LIBCLIENT) $(CEPH_GLOBAL)
-libkrbd_la_SOURCES = krbd.cc
-libkrbd_la_LIBADD = $(LIBSECRET) -lblkid -ludev
-rbd_SOURCES = rbd.cc
-rbd_LDADD = $(LIBKRBD) $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL)
+rbd_SOURCES = rbd.cc common/secret.c
+rbd_LDADD = $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL) -lblkid $(KEYUTILS_LIB)
 
 # Fuse targets
 @WITH_FUSE_TRUE at ceph_fuse_SOURCES = ceph_fuse.cc
@@ -6317,14 +5269,12 @@ editpaths = sed \
 
 # coverage
 shell_scripts = ceph-debugpack ceph-post-file ceph-crush-location \
-	init-ceph ceph-coverage
+	init-ceph mkcephfs ceph-coverage
 doc_DATA = $(srcdir)/sample.ceph.conf sample.fetch_config
 
 # various scripts
 shell_commondir = $(libdir)/ceph
 shell_common_SCRIPTS = ceph_common.sh
-ceph_libexecdir = $(libexecdir)/ceph
-ceph_libexec_SCRIPTS = ceph-osd-prestart.sh
 bash_completiondir = $(sysconfdir)/bash_completion.d
 bash_completion_DATA = $(srcdir)/bash_completion/ceph \
                $(srcdir)/bash_completion/rados \
@@ -6347,11 +5297,6 @@ TESTS = \
 	$(check_SCRIPTS)
 
 
-# TODO: If we're running the parallel test harness (the preferred harness), this should be AM_TESTS_ENVIRONMENT instead.
-# See: https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
-# I don't see the serial-tests Automake option anywhere, but my AM_TESTS_ENVIRONMENT was being ignored.
- at WITH_LTTNG_TRUE@TESTS_ENVIRONMENT = LD_PRELOAD=liblttng-ust-fork.so; export LD_PRELOAD; echo "LD_PRELOAD=$${LD_PRELOAD}";
-
 # pybind
 python_PYTHON = pybind/rados.py \
 		pybind/rbd.py \
@@ -6366,8 +5311,8 @@ all: $(BUILT_SOURCES) acconfig.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-.SUFFIXES: .S .c .cc .cpp .lo .o .obj .s
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/Makefile-env.am $(srcdir)/arch/Makefile.am $(srcdir)/auth/Makefile.am $(srcdir)/brag/Makefile.am $(srcdir)/crush/Makefile.am $(srcdir)/mon/Makefile.am $(srcdir)/mds/Makefile.am $(srcdir)/os/Makefile.am $(srcdir)/osd/Makefile.am $(srcdir)/erasure-code/Makefile.am $(srcdir)/erasure-code/jerasure/Makefile.am $(srcdir)/erasure-code/lrc/Makefile.am $(srcdir)/erasure-code/isa/Makefile.am $(srcdir)/osdc/Makefile.am $(srcdir)/client/Makefil [...]
+.SUFFIXES: .S .c .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/Makefile-env.am $(srcdir)/arch/Makefile.am $(srcdir)/auth/Makefile.am $(srcdir)/brag/Makefile.am $(srcdir)/crush/Makefile.am $(srcdir)/mon/Makefile.am $(srcdir)/mds/Makefile.am $(srcdir)/os/Makefile.am $(srcdir)/osd/Makefile.am $(srcdir)/erasure-code/Makefile.am $(srcdir)/erasure-code/jerasure/Makefile.am $(srcdir)/osdc/Makefile.am $(srcdir)/client/Makefile.am $(srcdir)/global/Makefile.am $(srcdir)/json_spirit/Makefile.am $(srcdir)/ [...]
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -6388,7 +5333,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(srcdir)/Makefile-env.am $(srcdir)/arch/Makefile.am $(srcdir)/auth/Makefile.am $(srcdir)/brag/Makefile.am $(srcdir)/crush/Makefile.am $(srcdir)/mon/Makefile.am $(srcdir)/mds/Makefile.am $(srcdir)/os/Makefile.am $(srcdir)/osd/Makefile.am $(srcdir)/erasure-code/Makefile.am $(srcdir)/erasure-code/jerasure/Makefile.am $(srcdir)/erasure-code/lrc/Makefile.am $(srcdir)/erasure-code/isa/Makefile.am $(srcdir)/osdc/Makefile.am $(srcdir)/client/Makefile.am $(srcdir)/global/Makefile.am $(srcdir)/js [...]
+$(srcdir)/Makefile-env.am $(srcdir)/arch/Makefile.am $(srcdir)/auth/Makefile.am $(srcdir)/brag/Makefile.am $(srcdir)/crush/Makefile.am $(srcdir)/mon/Makefile.am $(srcdir)/mds/Makefile.am $(srcdir)/os/Makefile.am $(srcdir)/osd/Makefile.am $(srcdir)/erasure-code/Makefile.am $(srcdir)/erasure-code/jerasure/Makefile.am $(srcdir)/osdc/Makefile.am $(srcdir)/client/Makefile.am $(srcdir)/global/Makefile.am $(srcdir)/json_spirit/Makefile.am $(srcdir)/log/Makefile.am $(srcdir)/perfglue/Makefile.am [...]
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -6905,8 +5850,6 @@ common/ceph_context.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
 common/buffer.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
-common/types.lo: common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
 common/code_environment.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
 common/dout.lo: common/$(am__dirstamp) \
@@ -6968,8 +5911,6 @@ common/bloom_filter.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
 common/linux_version.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
-common/module.lo: common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
 mon/$(am__dirstamp):
 	@$(MKDIR_P) mon
 	@: > mon/$(am__dirstamp)
@@ -7060,110 +6001,6 @@ test/erasure-code/libec_hangs_la-ErasureCodePluginHangs.lo:  \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 libec_hangs.la: $(libec_hangs_la_OBJECTS) $(libec_hangs_la_DEPENDENCIES) $(EXTRA_libec_hangs_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_hangs_la_LINK) -rpath $(erasure_codelibdir) $(libec_hangs_la_OBJECTS) $(libec_hangs_la_LIBADD) $(LIBS)
-erasure-code/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code
-	@: > erasure-code/$(am__dirstamp)
-erasure-code/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/$(DEPDIR)
-	@: > erasure-code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/libec_isa_la-ErasureCode.lo:  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/isa/isa-l/erasure_code
-	@: > erasure-code/isa/isa-l/erasure_code/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/isa/isa-l/erasure_code/$(DEPDIR)
-	@: > erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_multibinary.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx2.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx2.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx2.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx2.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx2.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx2.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_avx.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_sse.asm.lo:  \
-	erasure-code/isa/isa-l/erasure_code/$(am__dirstamp) \
-	erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/isa
-	@: > erasure-code/isa/$(am__dirstamp)
-erasure-code/isa/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/isa/$(DEPDIR)
-	@: > erasure-code/isa/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo:  \
-	erasure-code/isa/$(am__dirstamp) \
-	erasure-code/isa/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo:  \
-	erasure-code/isa/$(am__dirstamp) \
-	erasure-code/isa/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo:  \
-	erasure-code/isa/$(am__dirstamp) \
-	erasure-code/isa/$(DEPDIR)/$(am__dirstamp)
-erasure-code/isa/libec_isa_la-xor_op.lo:  \
-	erasure-code/isa/$(am__dirstamp) \
-	erasure-code/isa/$(DEPDIR)/$(am__dirstamp)
-libec_isa.la: $(libec_isa_la_OBJECTS) $(libec_isa_la_DEPENDENCIES) $(EXTRA_libec_isa_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(libec_isa_la_LINK) $(am_libec_isa_la_rpath) $(libec_isa_la_OBJECTS) $(libec_isa_la_LIBADD) $(LIBS)
 erasure-code/jerasure/$(am__dirstamp):
 	@$(MKDIR_P) erasure-code/jerasure
 	@: > erasure-code/jerasure/$(am__dirstamp)
@@ -7175,9 +6012,6 @@ erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo:  \
 	erasure-code/jerasure/$(DEPDIR)/$(am__dirstamp)
 libec_jerasure.la: $(libec_jerasure_la_OBJECTS) $(libec_jerasure_la_DEPENDENCIES) $(EXTRA_libec_jerasure_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_jerasure_la_LINK) -rpath $(erasure_codelibdir) $(libec_jerasure_la_OBJECTS) $(libec_jerasure_la_LIBADD) $(LIBS)
-erasure-code/libec_jerasure_generic_la-ErasureCode.lo:  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 erasure-code/jerasure/jerasure/src/$(am__dirstamp):
 	@$(MKDIR_P) erasure-code/jerasure/jerasure/src
 	@: > erasure-code/jerasure/jerasure/src/$(am__dirstamp)
@@ -7246,9 +6080,6 @@ erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodeJerasure.lo:  \
 	erasure-code/jerasure/$(DEPDIR)/$(am__dirstamp)
 libec_jerasure_generic.la: $(libec_jerasure_generic_la_OBJECTS) $(libec_jerasure_generic_la_DEPENDENCIES) $(EXTRA_libec_jerasure_generic_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_jerasure_generic_la_LINK) -rpath $(erasure_codelibdir) $(libec_jerasure_generic_la_OBJECTS) $(libec_jerasure_generic_la_LIBADD) $(LIBS)
-erasure-code/libec_jerasure_sse3_la-ErasureCode.lo:  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 erasure-code/jerasure/jerasure/src/libec_jerasure_sse3_la-cauchy.lo:  \
 	erasure-code/jerasure/jerasure/src/$(am__dirstamp) \
 	erasure-code/jerasure/jerasure/src/$(DEPDIR)/$(am__dirstamp)
@@ -7305,9 +6136,6 @@ erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodeJerasure.lo:  \
 	erasure-code/jerasure/$(DEPDIR)/$(am__dirstamp)
 libec_jerasure_sse3.la: $(libec_jerasure_sse3_la_OBJECTS) $(libec_jerasure_sse3_la_DEPENDENCIES) $(EXTRA_libec_jerasure_sse3_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_jerasure_sse3_la_LINK) -rpath $(erasure_codelibdir) $(libec_jerasure_sse3_la_OBJECTS) $(libec_jerasure_sse3_la_LIBADD) $(LIBS)
-erasure-code/libec_jerasure_sse4_la-ErasureCode.lo:  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 erasure-code/jerasure/jerasure/src/libec_jerasure_sse4_la-cauchy.lo:  \
 	erasure-code/jerasure/jerasure/src/$(am__dirstamp) \
 	erasure-code/jerasure/jerasure/src/$(DEPDIR)/$(am__dirstamp)
@@ -7364,35 +6192,11 @@ erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodeJerasure.lo:  \
 	erasure-code/jerasure/$(DEPDIR)/$(am__dirstamp)
 libec_jerasure_sse4.la: $(libec_jerasure_sse4_la_OBJECTS) $(libec_jerasure_sse4_la_DEPENDENCIES) $(EXTRA_libec_jerasure_sse4_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_jerasure_sse4_la_LINK) -rpath $(erasure_codelibdir) $(libec_jerasure_sse4_la_OBJECTS) $(libec_jerasure_sse4_la_LIBADD) $(LIBS)
-erasure-code/libec_lrc_la-ErasureCode.lo:  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/lrc/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/lrc
-	@: > erasure-code/lrc/$(am__dirstamp)
-erasure-code/lrc/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) erasure-code/lrc/$(DEPDIR)
-	@: > erasure-code/lrc/$(DEPDIR)/$(am__dirstamp)
-erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo:  \
-	erasure-code/lrc/$(am__dirstamp) \
-	erasure-code/lrc/$(DEPDIR)/$(am__dirstamp)
-erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo:  \
-	erasure-code/lrc/$(am__dirstamp) \
-	erasure-code/lrc/$(DEPDIR)/$(am__dirstamp)
-common/libec_lrc_la-str_map.lo: common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
-libec_lrc.la: $(libec_lrc_la_OBJECTS) $(libec_lrc_la_DEPENDENCIES) $(EXTRA_libec_lrc_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(libec_lrc_la_LINK) -rpath $(erasure_codelibdir) $(libec_lrc_la_OBJECTS) $(libec_lrc_la_LIBADD) $(LIBS)
 test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.lo:  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 libec_missing_entry_point.la: $(libec_missing_entry_point_la_OBJECTS) $(libec_missing_entry_point_la_DEPENDENCIES) $(EXTRA_libec_missing_entry_point_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_missing_entry_point_la_LINK) -rpath $(erasure_codelibdir) $(libec_missing_entry_point_la_OBJECTS) $(libec_missing_entry_point_la_LIBADD) $(LIBS)
-test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo:  \
-	test/erasure-code/$(am__dirstamp) \
-	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-libec_missing_version.la: $(libec_missing_version_la_OBJECTS) $(libec_missing_version_la_DEPENDENCIES) $(EXTRA_libec_missing_version_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(libec_missing_version_la_LINK) -rpath $(erasure_codelibdir) $(libec_missing_version_la_OBJECTS) $(libec_missing_version_la_LIBADD) $(LIBS)
 test/erasure-code/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.lo:  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
@@ -7408,6 +6212,12 @@ test/erasure-code/libec_test_jerasure_sse4_la-TestJerasurePluginSSE4.lo:  \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 libec_test_jerasure_sse4.la: $(libec_test_jerasure_sse4_la_OBJECTS) $(libec_test_jerasure_sse4_la_DEPENDENCIES) $(EXTRA_libec_test_jerasure_sse4_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libec_test_jerasure_sse4_la_LINK) -rpath $(erasure_codelibdir) $(libec_test_jerasure_sse4_la_OBJECTS) $(libec_test_jerasure_sse4_la_LIBADD) $(LIBS)
+erasure-code/$(am__dirstamp):
+	@$(MKDIR_P) erasure-code
+	@: > erasure-code/$(am__dirstamp)
+erasure-code/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) erasure-code/$(DEPDIR)
+	@: > erasure-code/$(DEPDIR)/$(am__dirstamp)
 erasure-code/ErasureCodePlugin.lo: erasure-code/$(am__dirstamp) \
 	erasure-code/$(DEPDIR)/$(am__dirstamp)
 liberasure_code.la: $(liberasure_code_la_OBJECTS) $(liberasure_code_la_DEPENDENCIES) $(EXTRA_liberasure_code_la_DEPENDENCIES) 
@@ -7440,8 +6250,6 @@ json_spirit/json_spirit_writer.lo: json_spirit/$(am__dirstamp) \
 	json_spirit/$(DEPDIR)/$(am__dirstamp)
 libjson_spirit.la: $(libjson_spirit_la_OBJECTS) $(libjson_spirit_la_DEPENDENCIES) $(EXTRA_libjson_spirit_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(CXXLINK)  $(libjson_spirit_la_OBJECTS) $(libjson_spirit_la_LIBADD) $(LIBS)
-libkrbd.la: $(libkrbd_la_OBJECTS) $(libkrbd_la_DEPENDENCIES) $(EXTRA_libkrbd_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(CXXLINK) $(am_libkrbd_la_rpath) $(libkrbd_la_OBJECTS) $(libkrbd_la_LIBADD) $(LIBS)
 log/$(am__dirstamp):
 	@$(MKDIR_P) log
 	@: > log/$(am__dirstamp)
@@ -7452,17 +6260,17 @@ log/Log.lo: log/$(am__dirstamp) log/$(DEPDIR)/$(am__dirstamp)
 log/SubsystemMap.lo: log/$(am__dirstamp) log/$(DEPDIR)/$(am__dirstamp)
 liblog.la: $(liblog_la_OBJECTS) $(liblog_la_DEPENDENCIES) $(EXTRA_liblog_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(CXXLINK)  $(liblog_la_OBJECTS) $(liblog_la_LIBADD) $(LIBS)
+mds/Anchor.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/Capability.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
+mds/Dumper.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
+mds/Resetter.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDS.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
-mds/Beacon.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/flock.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/locks.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/journal.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/Server.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/Mutation.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDCache.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
-mds/RecoveryQueue.lo: mds/$(am__dirstamp) \
-	mds/$(DEPDIR)/$(am__dirstamp)
 mds/Locker.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/Migrator.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDBalancer.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
@@ -7472,20 +6280,18 @@ mds/CInode.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/LogEvent.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDSTable.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/InoTable.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
-mds/JournalPointer.lo: mds/$(am__dirstamp) \
-	mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDSTableClient.lo: mds/$(am__dirstamp) \
 	mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDSTableServer.lo: mds/$(am__dirstamp) \
 	mds/$(DEPDIR)/$(am__dirstamp)
+mds/AnchorServer.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
+mds/AnchorClient.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/SnapRealm.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/SnapServer.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/snap.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/SessionMap.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
-mds/MDSContext.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 mds/MDLog.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
-common/TrackedOp.lo: common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
+mds/MDSUtility.lo: mds/$(am__dirstamp) mds/$(DEPDIR)/$(am__dirstamp)
 libmds.la: $(libmds_la_OBJECTS) $(libmds_la_DEPENDENCIES) $(EXTRA_libmds_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(CXXLINK)  $(libmds_la_OBJECTS) $(libmds_la_LIBADD) $(LIBS)
 mon/Monitor.lo: mon/$(am__dirstamp) mon/$(DEPDIR)/$(am__dirstamp)
@@ -7523,8 +6329,6 @@ msg/DispatchQueue.lo: msg/$(am__dirstamp) \
 msg/Message.lo: msg/$(am__dirstamp) msg/$(DEPDIR)/$(am__dirstamp)
 msg/Messenger.lo: msg/$(am__dirstamp) msg/$(DEPDIR)/$(am__dirstamp)
 msg/Pipe.lo: msg/$(am__dirstamp) msg/$(DEPDIR)/$(am__dirstamp)
-msg/PipeConnection.lo: msg/$(am__dirstamp) \
-	msg/$(DEPDIR)/$(am__dirstamp)
 msg/SimpleMessenger.lo: msg/$(am__dirstamp) \
 	msg/$(DEPDIR)/$(am__dirstamp)
 msg/msg_types.lo: msg/$(am__dirstamp) msg/$(DEPDIR)/$(am__dirstamp)
@@ -7556,8 +6360,6 @@ os/libos_la-LFNIndex.lo: os/$(am__dirstamp) \
 	os/$(DEPDIR)/$(am__dirstamp)
 os/libos_la-MemStore.lo: os/$(am__dirstamp) \
 	os/$(DEPDIR)/$(am__dirstamp)
-os/libos_la-KeyValueDB.lo: os/$(am__dirstamp) \
-	os/$(DEPDIR)/$(am__dirstamp)
 os/libos_la-KeyValueStore.lo: os/$(am__dirstamp) \
 	os/$(DEPDIR)/$(am__dirstamp)
 os/libos_la-ObjectStore.lo: os/$(am__dirstamp) \
@@ -7572,14 +6374,8 @@ os/libos_la-XfsFileStoreBackend.lo: os/$(am__dirstamp) \
 	os/$(DEPDIR)/$(am__dirstamp)
 os/libos_la-ZFSFileStoreBackend.lo: os/$(am__dirstamp) \
 	os/$(DEPDIR)/$(am__dirstamp)
-os/libos_la-KineticStore.lo: os/$(am__dirstamp) \
-	os/$(DEPDIR)/$(am__dirstamp)
 libos.la: $(libos_la_OBJECTS) $(libos_la_DEPENDENCIES) $(EXTRA_libos_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(libos_la_LINK)  $(libos_la_OBJECTS) $(libos_la_LIBADD) $(LIBS)
-os/libos_rocksdb_la-RocksDBStore.lo: os/$(am__dirstamp) \
-	os/$(DEPDIR)/$(am__dirstamp)
-libos_rocksdb.la: $(libos_rocksdb_la_OBJECTS) $(libos_rocksdb_la_DEPENDENCIES) $(EXTRA_libos_rocksdb_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(libos_rocksdb_la_LINK) $(am_libos_rocksdb_la_rpath) $(libos_rocksdb_la_OBJECTS) $(libos_rocksdb_la_LIBADD) $(LIBS)
 os/libos_types_la-Transaction.lo: os/$(am__dirstamp) \
 	os/$(DEPDIR)/$(am__dirstamp)
 libos_types.la: $(libos_types_la_OBJECTS) $(libos_types_la_DEPENDENCIES) $(EXTRA_libos_types_la_DEPENDENCIES) 
@@ -7677,38 +6473,8 @@ librados/librados_la-IoCtxImpl.lo: librados/$(am__dirstamp) \
 	librados/$(DEPDIR)/$(am__dirstamp)
 librados/librados_la-snap_set_diff.lo: librados/$(am__dirstamp) \
 	librados/$(DEPDIR)/$(am__dirstamp)
-librados/librados_la-RadosXattrIter.lo: librados/$(am__dirstamp) \
-	librados/$(DEPDIR)/$(am__dirstamp)
 librados.la: $(librados_la_OBJECTS) $(librados_la_DEPENDENCIES) $(EXTRA_librados_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(librados_la_LINK) -rpath $(libdir) $(librados_la_OBJECTS) $(librados_la_LIBADD) $(LIBS)
-libradosstriper/$(am__dirstamp):
-	@$(MKDIR_P) libradosstriper
-	@: > libradosstriper/$(am__dirstamp)
-libradosstriper/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) libradosstriper/$(DEPDIR)
-	@: > libradosstriper/$(DEPDIR)/$(am__dirstamp)
-libradosstriper/libradosstriper_la-libradosstriper.lo:  \
-	libradosstriper/$(am__dirstamp) \
-	libradosstriper/$(DEPDIR)/$(am__dirstamp)
-libradosstriper/libradosstriper_la-RadosStriperImpl.lo:  \
-	libradosstriper/$(am__dirstamp) \
-	libradosstriper/$(DEPDIR)/$(am__dirstamp)
-libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo:  \
-	libradosstriper/$(am__dirstamp) \
-	libradosstriper/$(DEPDIR)/$(am__dirstamp)
-libradosstriper.la: $(libradosstriper_la_OBJECTS) $(libradosstriper_la_DEPENDENCIES) $(EXTRA_libradosstriper_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(libradosstriper_la_LINK) -rpath $(libdir) $(libradosstriper_la_OBJECTS) $(libradosstriper_la_LIBADD) $(LIBS)
-test/libradosstriper/$(am__dirstamp):
-	@$(MKDIR_P) test/libradosstriper
-	@: > test/libradosstriper/$(am__dirstamp)
-test/libradosstriper/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) test/libradosstriper/$(DEPDIR)
-	@: > test/libradosstriper/$(DEPDIR)/$(am__dirstamp)
-test/libradosstriper/libradosstripertest_la-TestCase.lo:  \
-	test/libradosstriper/$(am__dirstamp) \
-	test/libradosstriper/$(DEPDIR)/$(am__dirstamp)
-libradosstripertest.la: $(libradosstripertest_la_OBJECTS) $(libradosstripertest_la_DEPENDENCIES) $(EXTRA_libradosstripertest_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(libradosstripertest_la_LINK)  $(libradosstripertest_la_OBJECTS) $(libradosstripertest_la_LIBADD) $(LIBS)
 test/librados/$(am__dirstamp):
 	@$(MKDIR_P) test/librados
 	@: > test/librados/$(am__dirstamp)
@@ -7744,32 +6510,6 @@ librbd/WatchCtx.lo: librbd/$(am__dirstamp) \
 	librbd/$(DEPDIR)/$(am__dirstamp)
 librbd.la: $(librbd_la_OBJECTS) $(librbd_la_DEPENDENCIES) $(EXTRA_librbd_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(librbd_la_LINK) -rpath $(libdir) $(librbd_la_OBJECTS) $(librbd_la_LIBADD) $(LIBS)
-rbd_replay/$(am__dirstamp):
-	@$(MKDIR_P) rbd_replay
-	@: > rbd_replay/$(am__dirstamp)
-rbd_replay/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) rbd_replay/$(DEPDIR)
-	@: > rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/actions.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/Deser.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/ImageNameMap.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/PendingIO.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/rbd_loc.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/Replayer.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd_replay/Ser.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-librbd_replay.la: $(librbd_replay_la_OBJECTS) $(librbd_replay_la_DEPENDENCIES) $(EXTRA_librbd_replay_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(CXXLINK)  $(librbd_replay_la_OBJECTS) $(librbd_replay_la_LIBADD) $(LIBS)
-rbd_replay/ios.lo: rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-librbd_replay_ios.la: $(librbd_replay_ios_la_OBJECTS) $(librbd_replay_ios_la_DEPENDENCIES) $(EXTRA_librbd_replay_ios_la_DEPENDENCIES) 
-	$(AM_V_CXXLD)$(CXXLINK)  $(librbd_replay_ios_la_OBJECTS) $(librbd_replay_ios_la_LIBADD) $(LIBS)
 rgw/$(am__dirstamp):
 	@$(MKDIR_P) rgw
 	@: > rgw/$(am__dirstamp)
@@ -7846,10 +6586,6 @@ rgw/librgw_la-rgw_dencoder.lo: rgw/$(am__dirstamp) \
 	rgw/$(DEPDIR)/$(am__dirstamp)
 librgw.la: $(librgw_la_OBJECTS) $(librgw_la_DEPENDENCIES) $(EXTRA_librgw_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(librgw_la_LINK) $(am_librgw_la_rpath) $(librgw_la_OBJECTS) $(librgw_la_LIBADD) $(LIBS)
-common/secret.lo: common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
-libsecret.la: $(libsecret_la_OBJECTS) $(libsecret_la_DEPENDENCIES) $(EXTRA_libsecret_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(LINK) $(am_libsecret_la_rpath) $(libsecret_la_OBJECTS) $(libsecret_la_LIBADD) $(LIBS)
 test/system/$(am__dirstamp):
 	@$(MKDIR_P) test/system
 	@: > test/system/$(am__dirstamp)
@@ -8108,14 +6844,28 @@ test/erasure-code/ceph_erasure_code.$(OBJEXT):  \
 ceph_erasure_code$(EXEEXT): $(ceph_erasure_code_OBJECTS) $(ceph_erasure_code_DEPENDENCIES) $(EXTRA_ceph_erasure_code_DEPENDENCIES) 
 	@rm -f ceph_erasure_code$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(ceph_erasure_code_OBJECTS) $(ceph_erasure_code_LDADD) $(LIBS)
-erasure-code/ErasureCode.$(OBJEXT): erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 test/erasure-code/ceph_erasure_code_benchmark.$(OBJEXT):  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 ceph_erasure_code_benchmark$(EXEEXT): $(ceph_erasure_code_benchmark_OBJECTS) $(ceph_erasure_code_benchmark_DEPENDENCIES) $(EXTRA_ceph_erasure_code_benchmark_DEPENDENCIES) 
 	@rm -f ceph_erasure_code_benchmark$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(ceph_erasure_code_benchmark_OBJECTS) $(ceph_erasure_code_benchmark_LDADD) $(LIBS)
+test/erasure-code/ceph_erasure_code_non_regression.$(OBJEXT):  \
+	test/erasure-code/$(am__dirstamp) \
+	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
+ceph_erasure_code_non_regression$(EXEEXT): $(ceph_erasure_code_non_regression_OBJECTS) $(ceph_erasure_code_non_regression_DEPENDENCIES) $(EXTRA_ceph_erasure_code_non_regression_DEPENDENCIES) 
+	@rm -f ceph_erasure_code_non_regression$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ceph_erasure_code_non_regression_OBJECTS) $(ceph_erasure_code_non_regression_LDADD) $(LIBS)
+tools/ceph_filestore_dump.$(OBJEXT): tools/$(am__dirstamp) \
+	tools/$(DEPDIR)/$(am__dirstamp)
+ceph_filestore_dump$(EXEEXT): $(ceph_filestore_dump_OBJECTS) $(ceph_filestore_dump_DEPENDENCIES) $(EXTRA_ceph_filestore_dump_DEPENDENCIES) 
+	@rm -f ceph_filestore_dump$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ceph_filestore_dump_OBJECTS) $(ceph_filestore_dump_LDADD) $(LIBS)
+tools/ceph_filestore_tool.$(OBJEXT): tools/$(am__dirstamp) \
+	tools/$(DEPDIR)/$(am__dirstamp)
+ceph_filestore_tool$(EXEEXT): $(ceph_filestore_tool_OBJECTS) $(ceph_filestore_tool_DEPENDENCIES) $(EXTRA_ceph_filestore_tool_DEPENDENCIES) 
+	@rm -f ceph_filestore_tool$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ceph_filestore_tool_OBJECTS) $(ceph_filestore_tool_LDADD) $(LIBS)
 test/kv_store_bench.$(OBJEXT): test/$(am__dirstamp) \
 	test/$(DEPDIR)/$(am__dirstamp)
 key_value_store/kv_flat_btree_async.$(OBJEXT):  \
@@ -8134,11 +6884,6 @@ test/multi_stress_watch.$(OBJEXT): test/$(am__dirstamp) \
 ceph_multi_stress_watch$(EXEEXT): $(ceph_multi_stress_watch_OBJECTS) $(ceph_multi_stress_watch_DEPENDENCIES) $(EXTRA_ceph_multi_stress_watch_DEPENDENCIES) 
 	@rm -f ceph_multi_stress_watch$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(ceph_multi_stress_watch_OBJECTS) $(ceph_multi_stress_watch_LDADD) $(LIBS)
-tools/ceph_objectstore_tool.$(OBJEXT): tools/$(am__dirstamp) \
-	tools/$(DEPDIR)/$(am__dirstamp)
-ceph_objectstore_tool$(EXEEXT): $(ceph_objectstore_tool_OBJECTS) $(ceph_objectstore_tool_DEPENDENCIES) $(EXTRA_ceph_objectstore_tool_DEPENDENCIES) 
-	@rm -f ceph_objectstore_tool$(EXEEXT)
-	$(AM_V_CXXLD)$(CXXLINK) $(ceph_objectstore_tool_OBJECTS) $(ceph_objectstore_tool_LDADD) $(LIBS)
 test/omap_bench.$(OBJEXT): test/$(am__dirstamp) \
 	test/$(DEPDIR)/$(am__dirstamp)
 ceph_omapbench$(EXEEXT): $(ceph_omapbench_OBJECTS) $(ceph_omapbench_DEPENDENCIES) $(EXTRA_ceph_omapbench_DEPENDENCIES) 
@@ -8373,18 +7118,6 @@ test/ceph_test_filejournal-test_filejournal.$(OBJEXT):  \
 ceph_test_filejournal$(EXEEXT): $(ceph_test_filejournal_OBJECTS) $(ceph_test_filejournal_DEPENDENCIES) $(EXTRA_ceph_test_filejournal_DEPENDENCIES) 
 	@rm -f ceph_test_filejournal$(EXEEXT)
 	$(AM_V_CXXLD)$(ceph_test_filejournal_LINK) $(ceph_test_filejournal_OBJECTS) $(ceph_test_filejournal_LDADD) $(LIBS)
-test/filestore/$(am__dirstamp):
-	@$(MKDIR_P) test/filestore
-	@: > test/filestore/$(am__dirstamp)
-test/filestore/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) test/filestore/$(DEPDIR)
-	@: > test/filestore/$(DEPDIR)/$(am__dirstamp)
-test/filestore/ceph_test_filestore-TestFileStore.$(OBJEXT):  \
-	test/filestore/$(am__dirstamp) \
-	test/filestore/$(DEPDIR)/$(am__dirstamp)
-ceph_test_filestore$(EXEEXT): $(ceph_test_filestore_OBJECTS) $(ceph_test_filestore_DEPENDENCIES) $(EXTRA_ceph_test_filestore_DEPENDENCIES) 
-	@rm -f ceph_test_filestore$(EXEEXT)
-	$(AM_V_CXXLD)$(ceph_test_filestore_LINK) $(ceph_test_filestore_OBJECTS) $(ceph_test_filestore_LDADD) $(LIBS)
 test/objectstore/$(am__dirstamp):
 	@$(MKDIR_P) test/objectstore
 	@: > test/objectstore/$(am__dirstamp)
@@ -8495,22 +7228,15 @@ ceph_test_librbd$(EXEEXT): $(ceph_test_librbd_OBJECTS) $(ceph_test_librbd_DEPEND
 test/librbd/ceph_test_librbd_fsx-fsx.$(OBJEXT):  \
 	test/librbd/$(am__dirstamp) \
 	test/librbd/$(DEPDIR)/$(am__dirstamp)
-common/dummy.$(OBJEXT): common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
 ceph_test_librbd_fsx$(EXEEXT): $(ceph_test_librbd_fsx_OBJECTS) $(ceph_test_librbd_fsx_DEPENDENCIES) $(EXTRA_ceph_test_librbd_fsx_DEPENDENCIES) 
 	@rm -f ceph_test_librbd_fsx$(EXEEXT)
-	$(AM_V_CXXLD)$(CXXLINK) $(ceph_test_librbd_fsx_OBJECTS) $(ceph_test_librbd_fsx_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(ceph_test_librbd_fsx_LINK) $(ceph_test_librbd_fsx_OBJECTS) $(ceph_test_librbd_fsx_LDADD) $(LIBS)
 test/mon/$(am__dirstamp):
 	@$(MKDIR_P) test/mon
 	@: > test/mon/$(am__dirstamp)
 test/mon/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) test/mon/$(DEPDIR)
 	@: > test/mon/$(DEPDIR)/$(am__dirstamp)
-test/mon/ceph_test_mon_msg-test-mon-msg.$(OBJEXT):  \
-	test/mon/$(am__dirstamp) test/mon/$(DEPDIR)/$(am__dirstamp)
-ceph_test_mon_msg$(EXEEXT): $(ceph_test_mon_msg_OBJECTS) $(ceph_test_mon_msg_DEPENDENCIES) $(EXTRA_ceph_test_mon_msg_DEPENDENCIES) 
-	@rm -f ceph_test_mon_msg$(EXEEXT)
-	$(AM_V_CXXLD)$(ceph_test_mon_msg_LINK) $(ceph_test_mon_msg_OBJECTS) $(ceph_test_mon_msg_LDADD) $(LIBS)
 test/mon/test_mon_workloadgen.$(OBJEXT): test/mon/$(am__dirstamp) \
 	test/mon/$(DEPDIR)/$(am__dirstamp)
 ceph_test_mon_workloadgen$(EXEEXT): $(ceph_test_mon_workloadgen_OBJECTS) $(ceph_test_mon_workloadgen_DEPENDENCIES) $(EXTRA_ceph_test_mon_workloadgen_DEPENDENCIES) 
@@ -8690,24 +7416,6 @@ test/system/rados_open_pools_parallel.$(OBJEXT):  \
 ceph_test_rados_open_pools_parallel$(EXEEXT): $(ceph_test_rados_open_pools_parallel_OBJECTS) $(ceph_test_rados_open_pools_parallel_DEPENDENCIES) $(EXTRA_ceph_test_rados_open_pools_parallel_DEPENDENCIES) 
 	@rm -f ceph_test_rados_open_pools_parallel$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(ceph_test_rados_open_pools_parallel_OBJECTS) $(ceph_test_rados_open_pools_parallel_LDADD) $(LIBS)
-test/libradosstriper/ceph_test_rados_striper_api_aio-aio.$(OBJEXT):  \
-	test/libradosstriper/$(am__dirstamp) \
-	test/libradosstriper/$(DEPDIR)/$(am__dirstamp)
-ceph_test_rados_striper_api_aio$(EXEEXT): $(ceph_test_rados_striper_api_aio_OBJECTS) $(ceph_test_rados_striper_api_aio_DEPENDENCIES) $(EXTRA_ceph_test_rados_striper_api_aio_DEPENDENCIES) 
-	@rm -f ceph_test_rados_striper_api_aio$(EXEEXT)
-	$(AM_V_CXXLD)$(ceph_test_rados_striper_api_aio_LINK) $(ceph_test_rados_striper_api_aio_OBJECTS) $(ceph_test_rados_striper_api_aio_LDADD) $(LIBS)
-test/libradosstriper/ceph_test_rados_striper_api_io-io.$(OBJEXT):  \
-	test/libradosstriper/$(am__dirstamp) \
-	test/libradosstriper/$(DEPDIR)/$(am__dirstamp)
-ceph_test_rados_striper_api_io$(EXEEXT): $(ceph_test_rados_striper_api_io_OBJECTS) $(ceph_test_rados_striper_api_io_DEPENDENCIES) $(EXTRA_ceph_test_rados_striper_api_io_DEPENDENCIES) 
-	@rm -f ceph_test_rados_striper_api_io$(EXEEXT)
-	$(AM_V_CXXLD)$(ceph_test_rados_striper_api_io_LINK) $(ceph_test_rados_striper_api_io_OBJECTS) $(ceph_test_rados_striper_api_io_LDADD) $(LIBS)
-test/libradosstriper/ceph_test_rados_striper_api_striping-striping.$(OBJEXT):  \
-	test/libradosstriper/$(am__dirstamp) \
-	test/libradosstriper/$(DEPDIR)/$(am__dirstamp)
-ceph_test_rados_striper_api_striping$(EXEEXT): $(ceph_test_rados_striper_api_striping_OBJECTS) $(ceph_test_rados_striper_api_striping_DEPENDENCIES) $(EXTRA_ceph_test_rados_striper_api_striping_DEPENDENCIES) 
-	@rm -f ceph_test_rados_striper_api_striping$(EXEEXT)
-	$(AM_V_CXXLD)$(ceph_test_rados_striper_api_striping_LINK) $(ceph_test_rados_striper_api_striping_OBJECTS) $(ceph_test_rados_striper_api_striping_LDADD) $(LIBS)
 test/system/rados_watch_notify.$(OBJEXT): test/system/$(am__dirstamp) \
 	test/system/$(DEPDIR)/$(am__dirstamp)
 test/system/st_rados_delete_objs.$(OBJEXT):  \
@@ -8774,32 +7482,6 @@ ceph_xattr_bench$(EXEEXT): $(ceph_xattr_bench_OBJECTS) $(ceph_xattr_bench_DEPEND
 cephfs$(EXEEXT): $(cephfs_OBJECTS) $(cephfs_DEPENDENCIES) $(EXTRA_cephfs_DEPENDENCIES) 
 	@rm -f cephfs$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(cephfs_OBJECTS) $(cephfs_LDADD) $(LIBS)
-tools/cephfs/$(am__dirstamp):
-	@$(MKDIR_P) tools/cephfs
-	@: > tools/cephfs/$(am__dirstamp)
-tools/cephfs/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) tools/cephfs/$(DEPDIR)
-	@: > tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/cephfs-journal-tool.$(OBJEXT):  \
-	tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/JournalTool.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/JournalFilter.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/JournalScanner.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/EventOutput.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/Dumper.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/Resetter.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-tools/cephfs/MDSUtility.$(OBJEXT): tools/cephfs/$(am__dirstamp) \
-	tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-cephfs-journal-tool$(EXEEXT): $(cephfs_journal_tool_OBJECTS) $(cephfs_journal_tool_DEPENDENCIES) $(EXTRA_cephfs_journal_tool_DEPENDENCIES) 
-	@rm -f cephfs-journal-tool$(EXEEXT)
-	$(AM_V_CXXLD)$(CXXLINK) $(cephfs_journal_tool_OBJECTS) $(cephfs_journal_tool_LDADD) $(LIBS)
 tools/crushtool.$(OBJEXT): tools/$(am__dirstamp) \
 	tools/$(DEPDIR)/$(am__dirstamp)
 crushtool$(EXEEXT): $(crushtool_OBJECTS) $(crushtool_DEPENDENCIES) $(EXTRA_crushtool_DEPENDENCIES) 
@@ -8827,6 +7509,8 @@ mount/$(DEPDIR)/$(am__dirstamp):
 	@: > mount/$(DEPDIR)/$(am__dirstamp)
 mount/mount.ceph.$(OBJEXT): mount/$(am__dirstamp) \
 	mount/$(DEPDIR)/$(am__dirstamp)
+common/secret.$(OBJEXT): common/$(am__dirstamp) \
+	common/$(DEPDIR)/$(am__dirstamp)
 mount.ceph$(EXEEXT): $(mount_ceph_OBJECTS) $(mount_ceph_DEPENDENCIES) $(EXTRA_mount_ceph_DEPENDENCIES) 
 	@rm -f mount.ceph$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(mount_ceph_OBJECTS) $(mount_ceph_LDADD) $(LIBS)
@@ -8924,16 +7608,6 @@ rbd_fuse/rbd-fuse.$(OBJEXT): rbd_fuse/$(am__dirstamp) \
 rbd-fuse$(EXEEXT): $(rbd_fuse_OBJECTS) $(rbd_fuse_DEPENDENCIES) $(EXTRA_rbd_fuse_DEPENDENCIES) 
 	@rm -f rbd-fuse$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(rbd_fuse_OBJECTS) $(rbd_fuse_LDADD) $(LIBS)
-rbd_replay/rbd-replay.$(OBJEXT): rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd-replay$(EXEEXT): $(rbd_replay_OBJECTS) $(rbd_replay_DEPENDENCIES) $(EXTRA_rbd_replay_DEPENDENCIES) 
-	@rm -f rbd-replay$(EXEEXT)
-	$(AM_V_CXXLD)$(CXXLINK) $(rbd_replay_OBJECTS) $(rbd_replay_LDADD) $(LIBS)
-rbd_replay/rbd-replay-prep.$(OBJEXT): rbd_replay/$(am__dirstamp) \
-	rbd_replay/$(DEPDIR)/$(am__dirstamp)
-rbd-replay-prep$(EXEEXT): $(rbd_replay_prep_OBJECTS) $(rbd_replay_prep_DEPENDENCIES) $(EXTRA_rbd_replay_prep_DEPENDENCIES) 
-	@rm -f rbd-replay-prep$(EXEEXT)
-	$(AM_V_CXXLD)$(CXXLINK) $(rbd_replay_prep_OBJECTS) $(rbd_replay_prep_LDADD) $(LIBS)
 tools/rest_bench-rest_bench.$(OBJEXT): tools/$(am__dirstamp) \
 	tools/$(DEPDIR)/$(am__dirstamp)
 common/rest_bench-obj_bencher.$(OBJEXT): common/$(am__dirstamp) \
@@ -9036,8 +7710,6 @@ common/test_build_libcommon-ceph_context.$(OBJEXT):  \
 	common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp)
 common/test_build_libcommon-buffer.$(OBJEXT): common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
-common/test_build_libcommon-types.$(OBJEXT): common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
 common/test_build_libcommon-code_environment.$(OBJEXT):  \
 	common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp)
 common/test_build_libcommon-dout.$(OBJEXT): common/$(am__dirstamp) \
@@ -9102,8 +7774,6 @@ common/test_build_libcommon-bloom_filter.$(OBJEXT):  \
 	common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp)
 common/test_build_libcommon-linux_version.$(OBJEXT):  \
 	common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp)
-common/test_build_libcommon-module.$(OBJEXT): common/$(am__dirstamp) \
-	common/$(DEPDIR)/$(am__dirstamp)
 mon/test_build_libcommon-MonCap.$(OBJEXT): mon/$(am__dirstamp) \
 	mon/$(DEPDIR)/$(am__dirstamp)
 mon/test_build_libcommon-MonClient.$(OBJEXT): mon/$(am__dirstamp) \
@@ -9137,8 +7807,6 @@ librados/test_build_librados-IoCtxImpl.$(OBJEXT):  \
 	librados/$(am__dirstamp) librados/$(DEPDIR)/$(am__dirstamp)
 librados/test_build_librados-snap_set_diff.$(OBJEXT):  \
 	librados/$(am__dirstamp) librados/$(DEPDIR)/$(am__dirstamp)
-librados/test_build_librados-RadosXattrIter.$(OBJEXT):  \
-	librados/$(am__dirstamp) librados/$(DEPDIR)/$(am__dirstamp)
 test_build_librados$(EXEEXT): $(test_build_librados_OBJECTS) $(test_build_librados_DEPENDENCIES) $(EXTRA_test_build_librados_DEPENDENCIES) 
 	@rm -f test_build_librados$(EXEEXT)
 	$(AM_V_CXXLD)$(test_build_librados_LINK) $(test_build_librados_OBJECTS) $(test_build_librados_LDADD) $(LIBS)
@@ -9333,39 +8001,15 @@ test/unittest_encoding-encoding.$(OBJEXT): test/$(am__dirstamp) \
 unittest_encoding$(EXEEXT): $(unittest_encoding_OBJECTS) $(unittest_encoding_DEPENDENCIES) $(EXTRA_unittest_encoding_DEPENDENCIES) 
 	@rm -f unittest_encoding$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_encoding_LINK) $(unittest_encoding_OBJECTS) $(unittest_encoding_LDADD) $(LIBS)
-erasure-code/unittest_erasure_code-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
-test/erasure-code/unittest_erasure_code-TestErasureCode.$(OBJEXT):  \
-	test/erasure-code/$(am__dirstamp) \
-	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-unittest_erasure_code$(EXEEXT): $(unittest_erasure_code_OBJECTS) $(unittest_erasure_code_DEPENDENCIES) $(EXTRA_unittest_erasure_code_DEPENDENCIES) 
-	@rm -f unittest_erasure_code$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_erasure_code_LINK) $(unittest_erasure_code_OBJECTS) $(unittest_erasure_code_LDADD) $(LIBS)
-erasure-code/unittest_erasure_code_example-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.$(OBJEXT):  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 unittest_erasure_code_example$(EXEEXT): $(unittest_erasure_code_example_OBJECTS) $(unittest_erasure_code_example_DEPENDENCIES) $(EXTRA_unittest_erasure_code_example_DEPENDENCIES) 
 	@rm -f unittest_erasure_code_example$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_erasure_code_example_LINK) $(unittest_erasure_code_example_OBJECTS) $(unittest_erasure_code_example_LDADD) $(LIBS)
-erasure-code/unittest_erasure_code_isa-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
-test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.$(OBJEXT):  \
-	test/erasure-code/$(am__dirstamp) \
-	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-unittest_erasure_code_isa$(EXEEXT): $(unittest_erasure_code_isa_OBJECTS) $(unittest_erasure_code_isa_DEPENDENCIES) $(EXTRA_unittest_erasure_code_isa_DEPENDENCIES) 
-	@rm -f unittest_erasure_code_isa$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_erasure_code_isa_LINK) $(unittest_erasure_code_isa_OBJECTS) $(unittest_erasure_code_isa_LDADD) $(LIBS)
 test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.$(OBJEXT):  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/unittest_erasure_code_jerasure-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-cauchy.$(OBJEXT):  \
 	erasure-code/jerasure/jerasure/src/$(am__dirstamp) \
 	erasure-code/jerasure/jerasure/src/$(DEPDIR)/$(am__dirstamp)
@@ -9423,51 +8067,18 @@ erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodeJerasure.$(OBJEX
 unittest_erasure_code_jerasure$(EXEEXT): $(unittest_erasure_code_jerasure_OBJECTS) $(unittest_erasure_code_jerasure_DEPENDENCIES) $(EXTRA_unittest_erasure_code_jerasure_DEPENDENCIES) 
 	@rm -f unittest_erasure_code_jerasure$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_erasure_code_jerasure_LINK) $(unittest_erasure_code_jerasure_OBJECTS) $(unittest_erasure_code_jerasure_LDADD) $(LIBS)
-test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.$(OBJEXT):  \
-	test/erasure-code/$(am__dirstamp) \
-	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/unittest_erasure_code_lrc-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
-erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.$(OBJEXT):  \
-	erasure-code/lrc/$(am__dirstamp) \
-	erasure-code/lrc/$(DEPDIR)/$(am__dirstamp)
-erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.$(OBJEXT):  \
-	erasure-code/lrc/$(am__dirstamp) \
-	erasure-code/lrc/$(DEPDIR)/$(am__dirstamp)
-unittest_erasure_code_lrc$(EXEEXT): $(unittest_erasure_code_lrc_OBJECTS) $(unittest_erasure_code_lrc_DEPENDENCIES) $(EXTRA_unittest_erasure_code_lrc_DEPENDENCIES) 
-	@rm -f unittest_erasure_code_lrc$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_erasure_code_lrc_LINK) $(unittest_erasure_code_lrc_OBJECTS) $(unittest_erasure_code_lrc_LDADD) $(LIBS)
-erasure-code/unittest_erasure_code_plugin-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
 test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.$(OBJEXT):  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 unittest_erasure_code_plugin$(EXEEXT): $(unittest_erasure_code_plugin_OBJECTS) $(unittest_erasure_code_plugin_DEPENDENCIES) $(EXTRA_unittest_erasure_code_plugin_DEPENDENCIES) 
 	@rm -f unittest_erasure_code_plugin$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_erasure_code_plugin_LINK) $(unittest_erasure_code_plugin_OBJECTS) $(unittest_erasure_code_plugin_LDADD) $(LIBS)
-erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.$(OBJEXT):  \
-	erasure-code/$(am__dirstamp) \
-	erasure-code/$(DEPDIR)/$(am__dirstamp)
-test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.$(OBJEXT):  \
-	test/erasure-code/$(am__dirstamp) \
-	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-unittest_erasure_code_plugin_isa$(EXEEXT): $(unittest_erasure_code_plugin_isa_OBJECTS) $(unittest_erasure_code_plugin_isa_DEPENDENCIES) $(EXTRA_unittest_erasure_code_plugin_isa_DEPENDENCIES) 
-	@rm -f unittest_erasure_code_plugin_isa$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_erasure_code_plugin_isa_LINK) $(unittest_erasure_code_plugin_isa_OBJECTS) $(unittest_erasure_code_plugin_isa_LDADD) $(LIBS)
 test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.$(OBJEXT):  \
 	test/erasure-code/$(am__dirstamp) \
 	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 unittest_erasure_code_plugin_jerasure$(EXEEXT): $(unittest_erasure_code_plugin_jerasure_OBJECTS) $(unittest_erasure_code_plugin_jerasure_DEPENDENCIES) $(EXTRA_unittest_erasure_code_plugin_jerasure_DEPENDENCIES) 
 	@rm -f unittest_erasure_code_plugin_jerasure$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_erasure_code_plugin_jerasure_LINK) $(unittest_erasure_code_plugin_jerasure_OBJECTS) $(unittest_erasure_code_plugin_jerasure_LDADD) $(LIBS)
-test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.$(OBJEXT):  \
-	test/erasure-code/$(am__dirstamp) \
-	test/erasure-code/$(DEPDIR)/$(am__dirstamp)
-unittest_erasure_code_plugin_lrc$(EXEEXT): $(unittest_erasure_code_plugin_lrc_OBJECTS) $(unittest_erasure_code_plugin_lrc_DEPENDENCIES) $(EXTRA_unittest_erasure_code_plugin_lrc_DEPENDENCIES) 
-	@rm -f unittest_erasure_code_plugin_lrc$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_erasure_code_plugin_lrc_LINK) $(unittest_erasure_code_plugin_lrc_OBJECTS) $(unittest_erasure_code_plugin_lrc_LDADD) $(LIBS)
 test/unittest_escape-escape.$(OBJEXT): test/$(am__dirstamp) \
 	test/$(DEPDIR)/$(am__dirstamp)
 unittest_escape$(EXEEXT): $(unittest_escape_OBJECTS) $(unittest_escape_DEPENDENCIES) $(EXTRA_unittest_escape_DEPENDENCIES) 
@@ -9550,12 +8161,6 @@ log/unittest_log-test.$(OBJEXT): log/$(am__dirstamp) \
 unittest_log$(EXEEXT): $(unittest_log_OBJECTS) $(unittest_log_DEPENDENCIES) $(EXTRA_unittest_log_DEPENDENCIES) 
 	@rm -f unittest_log$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_log_LINK) $(unittest_log_OBJECTS) $(unittest_log_LDADD) $(LIBS)
-test/common/unittest_lru-test_lru.$(OBJEXT):  \
-	test/common/$(am__dirstamp) \
-	test/common/$(DEPDIR)/$(am__dirstamp)
-unittest_lru$(EXEEXT): $(unittest_lru_OBJECTS) $(unittest_lru_DEPENDENCIES) $(EXTRA_unittest_lru_DEPENDENCIES) 
-	@rm -f unittest_lru$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_lru_LINK) $(unittest_lru_OBJECTS) $(unittest_lru_LDADD) $(LIBS)
 test/unittest_mime-mime.$(OBJEXT): test/$(am__dirstamp) \
 	test/$(DEPDIR)/$(am__dirstamp)
 unittest_mime$(EXEEXT): $(unittest_mime_OBJECTS) $(unittest_mime_DEPENDENCIES) $(EXTRA_unittest_mime_DEPENDENCIES) 
@@ -9606,22 +8211,11 @@ test/unittest_prebufferedstreambuf-test_prebufferedstreambuf.$(OBJEXT):  \
 unittest_prebufferedstreambuf$(EXEEXT): $(unittest_prebufferedstreambuf_OBJECTS) $(unittest_prebufferedstreambuf_DEPENDENCIES) $(EXTRA_unittest_prebufferedstreambuf_DEPENDENCIES) 
 	@rm -f unittest_prebufferedstreambuf$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_prebufferedstreambuf_LINK) $(unittest_prebufferedstreambuf_OBJECTS) $(unittest_prebufferedstreambuf_LDADD) $(LIBS)
-test/unittest_rbd_replay-test_rbd_replay.$(OBJEXT):  \
-	test/$(am__dirstamp) test/$(DEPDIR)/$(am__dirstamp)
-unittest_rbd_replay$(EXEEXT): $(unittest_rbd_replay_OBJECTS) $(unittest_rbd_replay_DEPENDENCIES) $(EXTRA_unittest_rbd_replay_DEPENDENCIES) 
-	@rm -f unittest_rbd_replay$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_rbd_replay_LINK) $(unittest_rbd_replay_OBJECTS) $(unittest_rbd_replay_LDADD) $(LIBS)
 test/unittest_run_cmd-run_cmd.$(OBJEXT): test/$(am__dirstamp) \
 	test/$(DEPDIR)/$(am__dirstamp)
 unittest_run_cmd$(EXEEXT): $(unittest_run_cmd_OBJECTS) $(unittest_run_cmd_DEPENDENCIES) $(EXTRA_unittest_run_cmd_DEPENDENCIES) 
 	@rm -f unittest_run_cmd$(EXEEXT)
 	$(AM_V_CXXLD)$(unittest_run_cmd_LINK) $(unittest_run_cmd_OBJECTS) $(unittest_run_cmd_LDADD) $(LIBS)
-test/common/unittest_shared_cache-test_shared_cache.$(OBJEXT):  \
-	test/common/$(am__dirstamp) \
-	test/common/$(DEPDIR)/$(am__dirstamp)
-unittest_shared_cache$(EXEEXT): $(unittest_shared_cache_OBJECTS) $(unittest_shared_cache_DEPENDENCIES) $(EXTRA_unittest_shared_cache_DEPENDENCIES) 
-	@rm -f unittest_shared_cache$(EXEEXT)
-	$(AM_V_CXXLD)$(unittest_shared_cache_LINK) $(unittest_shared_cache_OBJECTS) $(unittest_shared_cache_LDADD) $(LIBS)
 test/common/unittest_sharedptr_registry-test_sharedptr_registry.$(OBJEXT):  \
 	test/common/$(am__dirstamp) \
 	test/common/$(DEPDIR)/$(am__dirstamp)
@@ -9724,38 +8318,6 @@ uninstall-binSCRIPTS:
 	files=`for p in $$list; do echo "$$p"; done | \
 	       sed -e 's,.*/,,;$(transform)'`; \
 	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
-install-ceph_libexecSCRIPTS: $(ceph_libexec_SCRIPTS)
-	@$(NORMAL_INSTALL)
-	test -z "$(ceph_libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(ceph_libexecdir)"
-	@list='$(ceph_libexec_SCRIPTS)'; test -n "$(ceph_libexecdir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n' \
-	    -e 'h;s|.*|.|' \
-	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
-	      if (++n[d] == $(am__install_max)) { \
-		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
-	    else { print "f", d "/" $$4, $$1 } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	     test -z "$$files" || { \
-	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(ceph_libexecdir)$$dir'"; \
-	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(ceph_libexecdir)$$dir" || exit $$?; \
-	     } \
-	; done
-
-uninstall-ceph_libexecSCRIPTS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(ceph_libexec_SCRIPTS)'; test -n "$(ceph_libexecdir)" || exit 0; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	       sed -e 's,.*/,,;$(transform)'`; \
-	dir='$(DESTDIR)$(ceph_libexecdir)'; $(am__uninstall_files_from_dir)
 install-ceph_sbinSCRIPTS: $(ceph_sbin_SCRIPTS)
 	@$(NORMAL_INSTALL)
 	test -z "$(ceph_sbindir)" || $(MKDIR_P) "$(DESTDIR)$(ceph_sbindir)"
@@ -10062,8 +8624,6 @@ mostlyclean-compile:
 	-rm -f common/Throttle.lo
 	-rm -f common/Timer.$(OBJEXT)
 	-rm -f common/Timer.lo
-	-rm -f common/TrackedOp.$(OBJEXT)
-	-rm -f common/TrackedOp.lo
 	-rm -f common/WorkQueue.$(OBJEXT)
 	-rm -f common/WorkQueue.lo
 	-rm -f common/addr_parsing.$(OBJEXT)
@@ -10110,7 +8670,6 @@ mostlyclean-compile:
 	-rm -f common/config.lo
 	-rm -f common/dout.$(OBJEXT)
 	-rm -f common/dout.lo
-	-rm -f common/dummy.$(OBJEXT)
 	-rm -f common/entity_name.$(OBJEXT)
 	-rm -f common/entity_name.lo
 	-rm -f common/environment.$(OBJEXT)
@@ -10143,8 +8702,6 @@ mostlyclean-compile:
 	-rm -f common/libcommon_crc_la-crc32c_intel_fast_zero_asm.lo
 	-rm -f common/libcommon_crc_la-sctp_crc32.$(OBJEXT)
 	-rm -f common/libcommon_crc_la-sctp_crc32.lo
-	-rm -f common/libec_lrc_la-str_map.$(OBJEXT)
-	-rm -f common/libec_lrc_la-str_map.lo
 	-rm -f common/libos_la-TrackedOp.$(OBJEXT)
 	-rm -f common/libos_la-TrackedOp.lo
 	-rm -f common/libosd_la-TrackedOp.$(OBJEXT)
@@ -10155,8 +8712,6 @@ mostlyclean-compile:
 	-rm -f common/lockdep.lo
 	-rm -f common/mime.$(OBJEXT)
 	-rm -f common/mime.lo
-	-rm -f common/module.$(OBJEXT)
-	-rm -f common/module.lo
 	-rm -f common/obj_bencher.$(OBJEXT)
 	-rm -f common/page.$(OBJEXT)
 	-rm -f common/page.lo
@@ -10172,7 +8727,6 @@ mostlyclean-compile:
 	-rm -f common/safe_io.$(OBJEXT)
 	-rm -f common/safe_io.lo
 	-rm -f common/secret.$(OBJEXT)
-	-rm -f common/secret.lo
 	-rm -f common/signal.$(OBJEXT)
 	-rm -f common/signal.lo
 	-rm -f common/simple_spin.$(OBJEXT)
@@ -10240,7 +8794,6 @@ mostlyclean-compile:
 	-rm -f common/test_build_libcommon-linux_version.$(OBJEXT)
 	-rm -f common/test_build_libcommon-lockdep.$(OBJEXT)
 	-rm -f common/test_build_libcommon-mime.$(OBJEXT)
-	-rm -f common/test_build_libcommon-module.$(OBJEXT)
 	-rm -f common/test_build_libcommon-page.$(OBJEXT)
 	-rm -f common/test_build_libcommon-perf_counters.$(OBJEXT)
 	-rm -f common/test_build_libcommon-pick_address.$(OBJEXT)
@@ -10253,13 +8806,10 @@ mostlyclean-compile:
 	-rm -f common/test_build_libcommon-str_list.$(OBJEXT)
 	-rm -f common/test_build_libcommon-str_map.$(OBJEXT)
 	-rm -f common/test_build_libcommon-strtol.$(OBJEXT)
-	-rm -f common/test_build_libcommon-types.$(OBJEXT)
 	-rm -f common/test_build_libcommon-utf8.$(OBJEXT)
 	-rm -f common/test_build_libcommon-util.$(OBJEXT)
 	-rm -f common/test_build_libcommon-version.$(OBJEXT)
 	-rm -f common/test_build_libcommon-xattr.$(OBJEXT)
-	-rm -f common/types.$(OBJEXT)
-	-rm -f common/types.lo
 	-rm -f common/utf8.$(OBJEXT)
 	-rm -f common/utf8.lo
 	-rm -f common/util.$(OBJEXT)
@@ -10282,63 +8832,8 @@ mostlyclean-compile:
 	-rm -f crush/hash.lo
 	-rm -f crush/mapper.$(OBJEXT)
 	-rm -f crush/mapper.lo
-	-rm -f erasure-code/ErasureCode.$(OBJEXT)
 	-rm -f erasure-code/ErasureCodePlugin.$(OBJEXT)
 	-rm -f erasure-code/ErasureCodePlugin.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_multibinary.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_multibinary.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx2.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx2.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_sse.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx2.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx2.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_sse.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx2.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx2.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_sse.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx2.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx2.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_sse.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx2.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx2.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_sse.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx2.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx2.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_sse.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_avx.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_avx.asm.lo
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_sse.asm.$(OBJEXT)
-	-rm -f erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_sse.asm.lo
-	-rm -f erasure-code/isa/libec_isa_la-ErasureCodeIsa.$(OBJEXT)
-	-rm -f erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo
-	-rm -f erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.$(OBJEXT)
-	-rm -f erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo
-	-rm -f erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.$(OBJEXT)
-	-rm -f erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo
-	-rm -f erasure-code/isa/libec_isa_la-xor_op.$(OBJEXT)
-	-rm -f erasure-code/isa/libec_isa_la-xor_op.lo
 	-rm -f erasure-code/jerasure/gf-complete/src/libec_jerasure_generic_la-gf.$(OBJEXT)
 	-rm -f erasure-code/jerasure/gf-complete/src/libec_jerasure_generic_la-gf.lo
 	-rm -f erasure-code/jerasure/gf-complete/src/libec_jerasure_generic_la-gf_general.$(OBJEXT)
@@ -10467,29 +8962,6 @@ mostlyclean-compile:
 	-rm -f erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodePluginJerasure.lo
 	-rm -f erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodeJerasure.$(OBJEXT)
 	-rm -f erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.$(OBJEXT)
-	-rm -f erasure-code/libec_isa_la-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/libec_isa_la-ErasureCode.lo
-	-rm -f erasure-code/libec_jerasure_generic_la-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/libec_jerasure_generic_la-ErasureCode.lo
-	-rm -f erasure-code/libec_jerasure_sse3_la-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/libec_jerasure_sse3_la-ErasureCode.lo
-	-rm -f erasure-code/libec_jerasure_sse4_la-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/libec_jerasure_sse4_la-ErasureCode.lo
-	-rm -f erasure-code/libec_lrc_la-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/libec_lrc_la-ErasureCode.lo
-	-rm -f erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.$(OBJEXT)
-	-rm -f erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo
-	-rm -f erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.$(OBJEXT)
-	-rm -f erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo
-	-rm -f erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.$(OBJEXT)
-	-rm -f erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code_example-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code_isa-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code_jerasure-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code_lrc-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code_plugin-ErasureCode.$(OBJEXT)
-	-rm -f erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.$(OBJEXT)
 	-rm -f global/global_context.$(OBJEXT)
 	-rm -f global/global_context.lo
 	-rm -f global/global_init.$(OBJEXT)
@@ -10513,23 +8985,14 @@ mostlyclean-compile:
 	-rm -f librados/librados_la-IoCtxImpl.lo
 	-rm -f librados/librados_la-RadosClient.$(OBJEXT)
 	-rm -f librados/librados_la-RadosClient.lo
-	-rm -f librados/librados_la-RadosXattrIter.$(OBJEXT)
-	-rm -f librados/librados_la-RadosXattrIter.lo
 	-rm -f librados/librados_la-librados.$(OBJEXT)
 	-rm -f librados/librados_la-librados.lo
 	-rm -f librados/librados_la-snap_set_diff.$(OBJEXT)
 	-rm -f librados/librados_la-snap_set_diff.lo
 	-rm -f librados/test_build_librados-IoCtxImpl.$(OBJEXT)
 	-rm -f librados/test_build_librados-RadosClient.$(OBJEXT)
-	-rm -f librados/test_build_librados-RadosXattrIter.$(OBJEXT)
 	-rm -f librados/test_build_librados-librados.$(OBJEXT)
 	-rm -f librados/test_build_librados-snap_set_diff.$(OBJEXT)
-	-rm -f libradosstriper/libradosstriper_la-MultiAioCompletionImpl.$(OBJEXT)
-	-rm -f libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo
-	-rm -f libradosstriper/libradosstriper_la-RadosStriperImpl.$(OBJEXT)
-	-rm -f libradosstriper/libradosstriper_la-RadosStriperImpl.lo
-	-rm -f libradosstriper/libradosstriper_la-libradosstriper.$(OBJEXT)
-	-rm -f libradosstriper/libradosstriper_la-libradosstriper.lo
 	-rm -f librbd/AioCompletion.$(OBJEXT)
 	-rm -f librbd/AioCompletion.lo
 	-rm -f librbd/AioRequest.$(OBJEXT)
@@ -10549,8 +9012,12 @@ mostlyclean-compile:
 	-rm -f log/SubsystemMap.$(OBJEXT)
 	-rm -f log/SubsystemMap.lo
 	-rm -f log/unittest_log-test.$(OBJEXT)
-	-rm -f mds/Beacon.$(OBJEXT)
-	-rm -f mds/Beacon.lo
+	-rm -f mds/Anchor.$(OBJEXT)
+	-rm -f mds/Anchor.lo
+	-rm -f mds/AnchorClient.$(OBJEXT)
+	-rm -f mds/AnchorClient.lo
+	-rm -f mds/AnchorServer.$(OBJEXT)
+	-rm -f mds/AnchorServer.lo
 	-rm -f mds/CDentry.$(OBJEXT)
 	-rm -f mds/CDentry.lo
 	-rm -f mds/CDir.$(OBJEXT)
@@ -10559,10 +9026,10 @@ mostlyclean-compile:
 	-rm -f mds/CInode.lo
 	-rm -f mds/Capability.$(OBJEXT)
 	-rm -f mds/Capability.lo
+	-rm -f mds/Dumper.$(OBJEXT)
+	-rm -f mds/Dumper.lo
 	-rm -f mds/InoTable.$(OBJEXT)
 	-rm -f mds/InoTable.lo
-	-rm -f mds/JournalPointer.$(OBJEXT)
-	-rm -f mds/JournalPointer.lo
 	-rm -f mds/Locker.$(OBJEXT)
 	-rm -f mds/Locker.lo
 	-rm -f mds/LogEvent.$(OBJEXT)
@@ -10575,8 +9042,6 @@ mostlyclean-compile:
 	-rm -f mds/MDLog.lo
 	-rm -f mds/MDS.$(OBJEXT)
 	-rm -f mds/MDS.lo
-	-rm -f mds/MDSContext.$(OBJEXT)
-	-rm -f mds/MDSContext.lo
 	-rm -f mds/MDSMap.$(OBJEXT)
 	-rm -f mds/MDSMap.lo
 	-rm -f mds/MDSTable.$(OBJEXT)
@@ -10585,12 +9050,14 @@ mostlyclean-compile:
 	-rm -f mds/MDSTableClient.lo
 	-rm -f mds/MDSTableServer.$(OBJEXT)
 	-rm -f mds/MDSTableServer.lo
+	-rm -f mds/MDSUtility.$(OBJEXT)
+	-rm -f mds/MDSUtility.lo
 	-rm -f mds/Migrator.$(OBJEXT)
 	-rm -f mds/Migrator.lo
 	-rm -f mds/Mutation.$(OBJEXT)
 	-rm -f mds/Mutation.lo
-	-rm -f mds/RecoveryQueue.$(OBJEXT)
-	-rm -f mds/RecoveryQueue.lo
+	-rm -f mds/Resetter.$(OBJEXT)
+	-rm -f mds/Resetter.lo
 	-rm -f mds/Server.$(OBJEXT)
 	-rm -f mds/Server.lo
 	-rm -f mds/SessionMap.$(OBJEXT)
@@ -10664,8 +9131,6 @@ mostlyclean-compile:
 	-rm -f msg/Messenger.lo
 	-rm -f msg/Pipe.$(OBJEXT)
 	-rm -f msg/Pipe.lo
-	-rm -f msg/PipeConnection.$(OBJEXT)
-	-rm -f msg/PipeConnection.lo
 	-rm -f msg/SimpleMessenger.$(OBJEXT)
 	-rm -f msg/SimpleMessenger.lo
 	-rm -f msg/msg_types.$(OBJEXT)
@@ -10692,12 +9157,8 @@ mostlyclean-compile:
 	-rm -f os/libos_la-IndexManager.lo
 	-rm -f os/libos_la-JournalingObjectStore.$(OBJEXT)
 	-rm -f os/libos_la-JournalingObjectStore.lo
-	-rm -f os/libos_la-KeyValueDB.$(OBJEXT)
-	-rm -f os/libos_la-KeyValueDB.lo
 	-rm -f os/libos_la-KeyValueStore.$(OBJEXT)
 	-rm -f os/libos_la-KeyValueStore.lo
-	-rm -f os/libos_la-KineticStore.$(OBJEXT)
-	-rm -f os/libos_la-KineticStore.lo
 	-rm -f os/libos_la-LFNIndex.$(OBJEXT)
 	-rm -f os/libos_la-LFNIndex.lo
 	-rm -f os/libos_la-LevelDBStore.$(OBJEXT)
@@ -10714,8 +9175,6 @@ mostlyclean-compile:
 	-rm -f os/libos_la-ZFSFileStoreBackend.lo
 	-rm -f os/libos_la-chain_xattr.$(OBJEXT)
 	-rm -f os/libos_la-chain_xattr.lo
-	-rm -f os/libos_rocksdb_la-RocksDBStore.$(OBJEXT)
-	-rm -f os/libos_rocksdb_la-RocksDBStore.lo
 	-rm -f os/libos_types_la-Transaction.$(OBJEXT)
 	-rm -f os/libos_types_la-Transaction.lo
 	-rm -f os/libos_zfs_a-ZFS.$(OBJEXT)
@@ -10792,24 +9251,6 @@ mostlyclean-compile:
 	-rm -f perfglue/heap_profiler.$(OBJEXT)
 	-rm -f perfglue/heap_profiler.lo
 	-rm -f rbd_fuse/rbd-fuse.$(OBJEXT)
-	-rm -f rbd_replay/Deser.$(OBJEXT)
-	-rm -f rbd_replay/Deser.lo
-	-rm -f rbd_replay/ImageNameMap.$(OBJEXT)
-	-rm -f rbd_replay/ImageNameMap.lo
-	-rm -f rbd_replay/PendingIO.$(OBJEXT)
-	-rm -f rbd_replay/PendingIO.lo
-	-rm -f rbd_replay/Replayer.$(OBJEXT)
-	-rm -f rbd_replay/Replayer.lo
-	-rm -f rbd_replay/Ser.$(OBJEXT)
-	-rm -f rbd_replay/Ser.lo
-	-rm -f rbd_replay/actions.$(OBJEXT)
-	-rm -f rbd_replay/actions.lo
-	-rm -f rbd_replay/ios.$(OBJEXT)
-	-rm -f rbd_replay/ios.lo
-	-rm -f rbd_replay/rbd-replay-prep.$(OBJEXT)
-	-rm -f rbd_replay/rbd-replay.$(OBJEXT)
-	-rm -f rbd_replay/rbd_loc.$(OBJEXT)
-	-rm -f rbd_replay/rbd_loc.lo
 	-rm -f rgw/ceph_dencoder-rgw_acl.$(OBJEXT)
 	-rm -f rgw/ceph_dencoder-rgw_common.$(OBJEXT)
 	-rm -f rgw/ceph_dencoder-rgw_dencoder.$(OBJEXT)
@@ -10988,8 +9429,6 @@ mostlyclean-compile:
 	-rm -f test/common/unittest_crc32c-test_crc32c.$(OBJEXT)
 	-rm -f test/common/unittest_histogram-histogram.$(OBJEXT)
 	-rm -f test/common/unittest_io_priority-test_io_priority.$(OBJEXT)
-	-rm -f test/common/unittest_lru-test_lru.$(OBJEXT)
-	-rm -f test/common/unittest_shared_cache-test_shared_cache.$(OBJEXT)
 	-rm -f test/common/unittest_sharedptr_registry-test_sharedptr_registry.$(OBJEXT)
 	-rm -f test/common/unittest_sloppy_crc_map-test_sloppy_crc_map.$(OBJEXT)
 	-rm -f test/common/unittest_str_map-test_str_map.$(OBJEXT)
@@ -11000,6 +9439,7 @@ mostlyclean-compile:
 	-rm -f test/encoding/ceph_dencoder-ceph_dencoder.$(OBJEXT)
 	-rm -f test/erasure-code/ceph_erasure_code.$(OBJEXT)
 	-rm -f test/erasure-code/ceph_erasure_code_benchmark.$(OBJEXT)
+	-rm -f test/erasure-code/ceph_erasure_code_non_regression.$(OBJEXT)
 	-rm -f test/erasure-code/libec_example_la-ErasureCodePluginExample.$(OBJEXT)
 	-rm -f test/erasure-code/libec_example_la-ErasureCodePluginExample.lo
 	-rm -f test/erasure-code/libec_fail_to_initialize_la-ErasureCodePluginFailToInitialize.$(OBJEXT)
@@ -11010,24 +9450,16 @@ mostlyclean-compile:
 	-rm -f test/erasure-code/libec_hangs_la-ErasureCodePluginHangs.lo
 	-rm -f test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.$(OBJEXT)
 	-rm -f test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.lo
-	-rm -f test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.$(OBJEXT)
-	-rm -f test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo
 	-rm -f test/erasure-code/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.$(OBJEXT)
 	-rm -f test/erasure-code/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.lo
 	-rm -f test/erasure-code/libec_test_jerasure_sse3_la-TestJerasurePluginSSE3.$(OBJEXT)
 	-rm -f test/erasure-code/libec_test_jerasure_sse3_la-TestJerasurePluginSSE3.lo
 	-rm -f test/erasure-code/libec_test_jerasure_sse4_la-TestJerasurePluginSSE4.$(OBJEXT)
 	-rm -f test/erasure-code/libec_test_jerasure_sse4_la-TestJerasurePluginSSE4.lo
-	-rm -f test/erasure-code/unittest_erasure_code-TestErasureCode.$(OBJEXT)
 	-rm -f test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.$(OBJEXT)
-	-rm -f test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.$(OBJEXT)
 	-rm -f test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.$(OBJEXT)
-	-rm -f test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.$(OBJEXT)
 	-rm -f test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.$(OBJEXT)
-	-rm -f test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.$(OBJEXT)
 	-rm -f test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.$(OBJEXT)
-	-rm -f test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.$(OBJEXT)
-	-rm -f test/filestore/ceph_test_filestore-TestFileStore.$(OBJEXT)
 	-rm -f test/kv_store_bench.$(OBJEXT)
 	-rm -f test/libcephfs/ceph_test_libcephfs-caps.$(OBJEXT)
 	-rm -f test/libcephfs/ceph_test_libcephfs-multiclient.$(OBJEXT)
@@ -11053,14 +9485,8 @@ mostlyclean-compile:
 	-rm -f test/librados/libradostest_la-test.lo
 	-rm -f test/librados/unittest_librados-librados.$(OBJEXT)
 	-rm -f test/librados/unittest_librados_config-librados_config.$(OBJEXT)
-	-rm -f test/libradosstriper/ceph_test_rados_striper_api_aio-aio.$(OBJEXT)
-	-rm -f test/libradosstriper/ceph_test_rados_striper_api_io-io.$(OBJEXT)
-	-rm -f test/libradosstriper/ceph_test_rados_striper_api_striping-striping.$(OBJEXT)
-	-rm -f test/libradosstriper/libradosstripertest_la-TestCase.$(OBJEXT)
-	-rm -f test/libradosstriper/libradosstripertest_la-TestCase.lo
 	-rm -f test/librbd/ceph_test_librbd-test_librbd.$(OBJEXT)
 	-rm -f test/librbd/ceph_test_librbd_fsx-fsx.$(OBJEXT)
-	-rm -f test/mon/ceph_test_mon_msg-test-mon-msg.$(OBJEXT)
 	-rm -f test/mon/test_mon_workloadgen.$(OBJEXT)
 	-rm -f test/mon/unittest_mon_moncap-moncap.$(OBJEXT)
 	-rm -f test/mon/unittest_mon_pgmap-PGMap.$(OBJEXT)
@@ -11143,7 +9569,6 @@ mostlyclean-compile:
 	-rm -f test/unittest_mime-mime.$(OBJEXT)
 	-rm -f test/unittest_perf_counters-perf_counters.$(OBJEXT)
 	-rm -f test/unittest_prebufferedstreambuf-test_prebufferedstreambuf.$(OBJEXT)
-	-rm -f test/unittest_rbd_replay-test_rbd_replay.$(OBJEXT)
 	-rm -f test/unittest_run_cmd-run_cmd.$(OBJEXT)
 	-rm -f test/unittest_signals-signals.$(OBJEXT)
 	-rm -f test/unittest_simple_spin-simple_spin.$(OBJEXT)
@@ -11156,18 +9581,11 @@ mostlyclean-compile:
 	-rm -f tools/ceph-client-debug.$(OBJEXT)
 	-rm -f tools/ceph_authtool.$(OBJEXT)
 	-rm -f tools/ceph_conf.$(OBJEXT)
+	-rm -f tools/ceph_filestore_dump.$(OBJEXT)
+	-rm -f tools/ceph_filestore_tool.$(OBJEXT)
 	-rm -f tools/ceph_kvstore_tool-ceph_kvstore_tool.$(OBJEXT)
 	-rm -f tools/ceph_monstore_tool.$(OBJEXT)
-	-rm -f tools/ceph_objectstore_tool.$(OBJEXT)
 	-rm -f tools/ceph_osdomap_tool.$(OBJEXT)
-	-rm -f tools/cephfs/Dumper.$(OBJEXT)
-	-rm -f tools/cephfs/EventOutput.$(OBJEXT)
-	-rm -f tools/cephfs/JournalFilter.$(OBJEXT)
-	-rm -f tools/cephfs/JournalScanner.$(OBJEXT)
-	-rm -f tools/cephfs/JournalTool.$(OBJEXT)
-	-rm -f tools/cephfs/MDSUtility.$(OBJEXT)
-	-rm -f tools/cephfs/Resetter.$(OBJEXT)
-	-rm -f tools/cephfs/cephfs-journal-tool.$(OBJEXT)
 	-rm -f tools/crushtool.$(OBJEXT)
 	-rm -f tools/dupstore.$(OBJEXT)
 	-rm -f tools/mon_store_converter.$(OBJEXT)
@@ -11193,7 +9611,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ceph_syn.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ceph_ver.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cephfs.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/krbd.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libcephfs.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/librados-config.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rbd.Po at am__quote@
@@ -11276,7 +9693,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/Thread.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/Throttle.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/Timer.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/TrackedOp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/WorkQueue.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/addr_parsing.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/admin_socket.Plo at am__quote@
@@ -11300,7 +9716,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/common_init.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/config.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/dout.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/dummy.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/entity_name.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/environment.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/errno.Plo at am__quote@
@@ -11317,13 +9732,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/libcommon_crc_la-crc32c_intel_fast_asm.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/libcommon_crc_la-crc32c_intel_fast_zero_asm.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/libcommon_crc_la-sctp_crc32.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/libec_lrc_la-str_map.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/libos_la-TrackedOp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/libosd_la-TrackedOp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/linux_version.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/lockdep.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/mime.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/module.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/obj_bencher.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/page.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/perf_counters.Plo at am__quote@
@@ -11332,7 +9745,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/rest_bench-obj_bencher.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/run_cmd.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/safe_io.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/secret.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/secret.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/signal.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/simple_spin.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/snap_types.Plo at am__quote@
@@ -11394,7 +9807,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-linux_version.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-lockdep.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-mime.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-module.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-page.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-perf_counters.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-pick_address.Po at am__quote@
@@ -11407,12 +9819,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-str_list.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-str_map.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-strtol.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-types.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-utf8.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-util.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-version.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/test_build_libcommon-xattr.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/types.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/utf8.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/util.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/version.Plo at am__quote@
@@ -11424,26 +9834,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at crush/$(DEPDIR)/crush.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at crush/$(DEPDIR)/hash.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at crush/$(DEPDIR)/mapper.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/ErasureCode.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/ErasureCodePlugin.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/libec_isa_la-ErasureCode.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/libec_jerasure_generic_la-ErasureCode.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCode.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCode.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/libec_lrc_la-ErasureCode.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsa.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsaTableCache.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodePluginIsa.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/isa/$(DEPDIR)/libec_isa_la-xor_op.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_base.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_highlevel_func.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/jerasure/$(DEPDIR)/libec_jerasure_generic_la-ErasureCodeJerasure.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/jerasure/$(DEPDIR)/libec_jerasure_generic_la-ErasureCodePluginJerasure.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/jerasure/$(DEPDIR)/libec_jerasure_la-ErasureCodePluginSelectJerasure.Plo at am__quote@
@@ -11517,10 +9908,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/jerasure/jerasure/src/$(DEPDIR)/unittest_erasure_code_jerasure-jerasure.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/jerasure/jerasure/src/$(DEPDIR)/unittest_erasure_code_jerasure-liberation.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at erasure-code/jerasure/jerasure/src/$(DEPDIR)/unittest_erasure_code_jerasure-reed_sol.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodeLrc.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodePluginLrc.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at global/$(DEPDIR)/global_context.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at global/$(DEPDIR)/global_init.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at global/$(DEPDIR)/pidfile.Plo at am__quote@
@@ -11533,17 +9920,12 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at key_value_store/$(DEPDIR)/kv_flat_btree_async.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/librados_la-IoCtxImpl.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/librados_la-RadosClient.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/librados_la-RadosXattrIter.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/librados_la-librados.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/librados_la-snap_set_diff.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/test_build_librados-IoCtxImpl.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/test_build_librados-RadosClient.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/test_build_librados-librados.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librados/$(DEPDIR)/test_build_librados-snap_set_diff.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at libradosstriper/$(DEPDIR)/libradosstriper_la-MultiAioCompletionImpl.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at libradosstriper/$(DEPDIR)/libradosstriper_la-RadosStriperImpl.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at libradosstriper/$(DEPDIR)/libradosstriper_la-libradosstriper.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librbd/$(DEPDIR)/AioCompletion.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librbd/$(DEPDIR)/AioRequest.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at librbd/$(DEPDIR)/ImageCtx.Plo at am__quote@
@@ -11554,27 +9936,29 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at log/$(DEPDIR)/Log.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at log/$(DEPDIR)/SubsystemMap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at log/$(DEPDIR)/unittest_log-test.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Beacon.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Anchor.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/AnchorClient.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/AnchorServer.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/CDentry.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/CDir.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/CInode.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Capability.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Dumper.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/InoTable.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/JournalPointer.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Locker.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/LogEvent.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDBalancer.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDCache.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDLog.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDS.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDSContext.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDSMap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDSTable.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDSTableClient.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDSTableServer.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/MDSUtility.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Migrator.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Mutation.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/RecoveryQueue.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Resetter.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/Server.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/SessionMap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at mds/$(DEPDIR)/SnapRealm.Plo at am__quote@
@@ -11615,7 +9999,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at msg/$(DEPDIR)/Message.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at msg/$(DEPDIR)/Messenger.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at msg/$(DEPDIR)/Pipe.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at msg/$(DEPDIR)/PipeConnection.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at msg/$(DEPDIR)/SimpleMessenger.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at msg/$(DEPDIR)/msg_types.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at objclass/$(DEPDIR)/libosd_la-class_api.Plo at am__quote@
@@ -11629,9 +10012,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-HashIndex.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-IndexManager.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-JournalingObjectStore.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-KeyValueDB.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-KeyValueStore.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-KineticStore.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-LFNIndex.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-LevelDBStore.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-MemStore.Plo at am__quote@
@@ -11640,7 +10021,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-XfsFileStoreBackend.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-ZFSFileStoreBackend.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_la-chain_xattr.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_rocksdb_la-RocksDBStore.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_types_la-Transaction.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at os/$(DEPDIR)/libos_zfs_a-ZFS.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at osd/$(DEPDIR)/ECMsgTypes.Plo at am__quote@
@@ -11685,16 +10065,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at perfglue/$(DEPDIR)/disabled_stubs.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at perfglue/$(DEPDIR)/heap_profiler.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at rbd_fuse/$(DEPDIR)/rbd-fuse.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/Deser.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/ImageNameMap.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/PendingIO.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/Replayer.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/Ser.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/actions.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/ios.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/rbd-replay-prep.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/rbd-replay.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at rbd_replay/$(DEPDIR)/rbd_loc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at rgw/$(DEPDIR)/ceph_dencoder-rgw_acl.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at rgw/$(DEPDIR)/ceph_dencoder-rgw_common.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at rgw/$(DEPDIR)/ceph_dencoder-rgw_dencoder.Po at am__quote@
@@ -11846,7 +10216,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_mime-mime.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_perf_counters-perf_counters.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_prebufferedstreambuf-test_prebufferedstreambuf.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_run_cmd-run_cmd.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_signals-signals.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/$(DEPDIR)/unittest_simple_spin-simple_spin.Po at am__quote@
@@ -11889,8 +10258,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_crc32c-test_crc32c.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_histogram-histogram.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_io_priority-test_io_priority.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_lru-test_lru.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_sharedptr_registry-test_sharedptr_registry.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_sloppy_crc_map-test_sloppy_crc_map.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/common/$(DEPDIR)/unittest_str_map-test_str_map.Po at am__quote@
@@ -11901,25 +10268,19 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at test/encoding/$(DEPDIR)/ceph_dencoder-ceph_dencoder.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/ceph_erasure_code.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/ceph_erasure_code_benchmark.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/ceph_erasure_code_non_regression.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_example_la-ErasureCodePluginExample.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_fail_to_initialize_la-ErasureCodePluginFailToInitialize.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_fail_to_register_la-ErasureCodePluginFailToRegister.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_hangs_la-ErasureCodePluginHangs.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_missing_version_la-ErasureCodePluginMissingVersion.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_test_jerasure_sse3_la-TestJerasurePluginSSE3.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/libec_test_jerasure_sse4_la-TestJerasurePluginSSE4.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_example-TestErasureCodeExample.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-TestErasureCodeJerasure.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-TestErasureCodePlugin.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/libcephfs/$(DEPDIR)/ceph_test_libcephfs-caps.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/libcephfs/$(DEPDIR)/ceph_test_libcephfs-multiclient.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/libcephfs/$(DEPDIR)/ceph_test_libcephfs-readdir_r_cb.Po at am__quote@
@@ -11942,13 +10303,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at test/librados/$(DEPDIR)/libradostest_la-test.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/librados/$(DEPDIR)/unittest_librados-librados.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/librados/$(DEPDIR)/unittest_librados_config-librados_config.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/libradosstriper/$(DEPDIR)/libradosstripertest_la-TestCase.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/librbd/$(DEPDIR)/ceph_test_librbd-test_librbd.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/librbd/$(DEPDIR)/ceph_test_librbd_fsx-fsx.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/mon/$(DEPDIR)/test_mon_workloadgen.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/mon/$(DEPDIR)/unittest_mon_moncap-moncap.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at test/mon/$(DEPDIR)/unittest_mon_pgmap-PGMap.Po at am__quote@
@@ -11992,9 +10348,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph-client-debug.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_authtool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_conf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_filestore_dump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_filestore_tool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_kvstore_tool-ceph_kvstore_tool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_monstore_tool.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_objectstore_tool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/ceph_osdomap_tool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/crushtool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/dupstore.Po at am__quote@
@@ -12006,14 +10363,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/rest_bench-rest_bench.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/scratchtool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/$(DEPDIR)/scratchtoolpp.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/Dumper.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/EventOutput.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/JournalFilter.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/JournalScanner.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/JournalTool.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/MDSUtility.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/Resetter.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tools/cephfs/$(DEPDIR)/cephfs-journal-tool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/rados/$(DEPDIR)/rados.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/rados/$(DEPDIR)/rados_export.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tools/rados/$(DEPDIR)/rados_import.Po at am__quote@
@@ -12102,20 +10451,6 @@ common/libcommon_crc_la-crc32c_intel_fast.lo: common/crc32c_intel_fast.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libcommon_crc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common/libcommon_crc_la-crc32c_intel_fast.lo `test -f 'common/crc32c_intel_fast.c' || echo '$(srcdir)/'`common/crc32c_intel_fast.c
 
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo: erasure-code/isa/isa-l/erasure_code/ec_base.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CFLAGS) $(CFLAGS) -MT erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo -MD -MP -MF erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_base.Tpo -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo `test -f 'erasure-code/isa/isa-l/erasure_code/ec_ba [...]
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_base.Tpo erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_base.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='erasure-code/isa/isa-l/erasure_code/ec_base.c' object='erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CFLAGS) $(CFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_base.lo `test -f 'erasure-code/isa/isa-l/erasure_code/ec_base.c' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/ec_base.c
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo: erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CFLAGS) $(CFLAGS) -MT erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo -MD -MP -MF erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_highlevel_func.Tpo -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo `test -f 'erasure-cod [...]
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_highlevel_func.Tpo erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/libec_isa_la-ec_highlevel_func.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c' object='erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CFLAGS) $(CFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_highlevel_func.lo `test -f 'erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c
-
 erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-cauchy.lo: erasure-code/jerasure/jerasure/src/cauchy.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_generic_la_CFLAGS) $(CFLAGS) -MT erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-cauchy.lo -MD -MP -MF erasure-code/jerasure/jerasure/src/$(DEPDIR)/libec_jerasure_generic_la-cauchy.Tpo -c -o erasure-code/jerasure/jerasure/src/libec_jerasure_generic_la-cauchy.lo `test -f 'erasu [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/jerasure/src/$(DEPDIR)/libec_jerasure_generic_la-cauchy.Tpo erasure-code/jerasure/jerasure/src/$(DEPDIR)/libec_jerasure_generic_la-cauchy.Plo
@@ -12620,20 +10955,6 @@ common/test_build_libcommon-linux_version.obj: common/linux_version.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CFLAGS) $(CFLAGS) -c -o common/test_build_libcommon-linux_version.obj `if test -f 'common/linux_version.c'; then $(CYGPATH_W) 'common/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/common/linux_version.c'; fi`
 
-common/test_build_libcommon-module.o: common/module.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CFLAGS) $(CFLAGS) -MT common/test_build_libcommon-module.o -MD -MP -MF common/$(DEPDIR)/test_build_libcommon-module.Tpo -c -o common/test_build_libcommon-module.o `test -f 'common/module.c' || echo '$(srcdir)/'`common/module.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) common/$(DEPDIR)/test_build_libcommon-module.Tpo common/$(DEPDIR)/test_build_libcommon-module.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='common/module.c' object='common/test_build_libcommon-module.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CFLAGS) $(CFLAGS) -c -o common/test_build_libcommon-module.o `test -f 'common/module.c' || echo '$(srcdir)/'`common/module.c
-
-common/test_build_libcommon-module.obj: common/module.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CFLAGS) $(CFLAGS) -MT common/test_build_libcommon-module.obj -MD -MP -MF common/$(DEPDIR)/test_build_libcommon-module.Tpo -c -o common/test_build_libcommon-module.obj `if test -f 'common/module.c'; then $(CYGPATH_W) 'common/module.c'; else $(CYGPATH_W) '$(srcdir)/common/module.c'; fi`
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) common/$(DEPDIR)/test_build_libcommon-module.Tpo common/$(DEPDIR)/test_build_libcommon-module.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='common/module.c' object='common/test_build_libcommon-module.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CFLAGS) $(CFLAGS) -c -o common/test_build_libcommon-module.obj `if test -f 'common/module.c'; then $(CYGPATH_W) 'common/module.c'; else $(CYGPATH_W) '$(srcdir)/common/module.c'; fi`
-
 erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-cauchy.o: erasure-code/jerasure/jerasure/src/cauchy.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CFLAGS) $(CFLAGS) -MT erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-cauchy.o -MD -MP -MF erasure-code/jerasure/jerasure/src/$(DEPDIR)/unittest_erasure_code_jerasure-cauchy.Tpo -c -o erasure-code/jerasure/jerasure/src/unittest_erasure_code_jerasure-cauchy.o `test -f 'erasure-code/jerasure/jerasure/src/cauchy.c' || echo '$(srcdir)/'`er [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/jerasure/src/$(DEPDIR)/unittest_erasure_code_jerasure-cauchy.Tpo erasure-code/jerasure/jerasure/src/$(DEPDIR)/unittest_erasure_code_jerasure-cauchy.Po
@@ -12945,41 +11266,6 @@ test/erasure-code/libec_hangs_la-ErasureCodePluginHangs.lo: test/erasure-code/Er
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_hangs_la_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/libec_hangs_la-ErasureCodePluginHangs.lo `test -f 'test/erasure-code/ErasureCodePluginHangs.cc' || echo '$(srcdir)/'`test/erasure-code/ErasureCodePluginHangs.cc
 
-erasure-code/libec_isa_la-ErasureCode.lo: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/libec_isa_la-ErasureCode.lo -MD -MP -MF erasure-code/$(DEPDIR)/libec_isa_la-ErasureCode.Tpo -c -o erasure-code/libec_isa_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/libec_isa_la-ErasureCode.Tpo erasure-code/$(DEPDIR)/libec_isa_la-ErasureCode.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/libec_isa_la-ErasureCode.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/libec_isa_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo: erasure-code/isa/ErasureCodeIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo -MD -MP -MF erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsa.Tpo -c -o erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo `test -f 'erasure-code/isa/ErasureCodeIsa.cc' || echo '$(srcdir)/'`erasure-code [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsa.Tpo erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsa.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/isa/ErasureCodeIsa.cc' object='erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/isa/libec_isa_la-ErasureCodeIsa.lo `test -f 'erasure-code/isa/ErasureCodeIsa.cc' || echo '$(srcdir)/'`erasure-code/isa/ErasureCodeIsa.cc
-
-erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo: erasure-code/isa/ErasureCodeIsaTableCache.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo -MD -MP -MF erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsaTableCache.Tpo -c -o erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo `test -f 'erasure-code/isa/ErasureCodeIsaTableCac [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsaTableCache.Tpo erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodeIsaTableCache.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/isa/ErasureCodeIsaTableCache.cc' object='erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/isa/libec_isa_la-ErasureCodeIsaTableCache.lo `test -f 'erasure-code/isa/ErasureCodeIsaTableCache.cc' || echo '$(srcdir)/'`erasure-code/isa/ErasureCodeIsaTableCache.cc
-
-erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo: erasure-code/isa/ErasureCodePluginIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo -MD -MP -MF erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodePluginIsa.Tpo -c -o erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo `test -f 'erasure-code/isa/ErasureCodePluginIsa.cc' || echo ' [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodePluginIsa.Tpo erasure-code/isa/$(DEPDIR)/libec_isa_la-ErasureCodePluginIsa.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/isa/ErasureCodePluginIsa.cc' object='erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/isa/libec_isa_la-ErasureCodePluginIsa.lo `test -f 'erasure-code/isa/ErasureCodePluginIsa.cc' || echo '$(srcdir)/'`erasure-code/isa/ErasureCodePluginIsa.cc
-
-erasure-code/isa/libec_isa_la-xor_op.lo: erasure-code/isa/xor_op.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/isa/libec_isa_la-xor_op.lo -MD -MP -MF erasure-code/isa/$(DEPDIR)/libec_isa_la-xor_op.Tpo -c -o erasure-code/isa/libec_isa_la-xor_op.lo `test -f 'erasure-code/isa/xor_op.cc' || echo '$(srcdir)/'`erasure-code/isa/xor_op.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/isa/$(DEPDIR)/libec_isa_la-xor_op.Tpo erasure-code/isa/$(DEPDIR)/libec_isa_la-xor_op.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/isa/xor_op.cc' object='erasure-code/isa/libec_isa_la-xor_op.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_isa_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/isa/libec_isa_la-xor_op.lo `test -f 'erasure-code/isa/xor_op.cc' || echo '$(srcdir)/'`erasure-code/isa/xor_op.cc
-
 erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo: erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo -MD -MP -MF erasure-code/jerasure/$(DEPDIR)/libec_jerasure_la-ErasureCodePluginSelectJerasure.Tpo -c -o erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo `te [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/$(DEPDIR)/libec_jerasure_la-ErasureCodePluginSelectJerasure.Tpo erasure-code/jerasure/$(DEPDIR)/libec_jerasure_la-ErasureCodePluginSelectJerasure.Plo
@@ -12987,13 +11273,6 @@ erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo: eras
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/jerasure/libec_jerasure_la-ErasureCodePluginSelectJerasure.lo `test -f 'erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc' || echo '$(srcdir)/'`erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
 
-erasure-code/libec_jerasure_generic_la-ErasureCode.lo: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_generic_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/libec_jerasure_generic_la-ErasureCode.lo -MD -MP -MF erasure-code/$(DEPDIR)/libec_jerasure_generic_la-ErasureCode.Tpo -c -o erasure-code/libec_jerasure_generic_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/ [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/libec_jerasure_generic_la-ErasureCode.Tpo erasure-code/$(DEPDIR)/libec_jerasure_generic_la-ErasureCode.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/libec_jerasure_generic_la-ErasureCode.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_generic_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/libec_jerasure_generic_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
 erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodePluginJerasure.lo: erasure-code/jerasure/ErasureCodePluginJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_generic_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodePluginJerasure.lo -MD -MP -MF erasure-code/jerasure/$(DEPDIR)/libec_jerasure_generic_la-ErasureCodePluginJerasure.Tpo -c -o erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodePluginJ [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/$(DEPDIR)/libec_jerasure_generic_la-ErasureCodePluginJerasure.Tpo erasure-code/jerasure/$(DEPDIR)/libec_jerasure_generic_la-ErasureCodePluginJerasure.Plo
@@ -13008,13 +11287,6 @@ erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodeJerasure.lo: erasure-
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_generic_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/jerasure/libec_jerasure_generic_la-ErasureCodeJerasure.lo `test -f 'erasure-code/jerasure/ErasureCodeJerasure.cc' || echo '$(srcdir)/'`erasure-code/jerasure/ErasureCodeJerasure.cc
 
-erasure-code/libec_jerasure_sse3_la-ErasureCode.lo: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse3_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/libec_jerasure_sse3_la-ErasureCode.lo -MD -MP -MF erasure-code/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCode.Tpo -c -o erasure-code/libec_jerasure_sse3_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-co [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCode.Tpo erasure-code/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCode.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/libec_jerasure_sse3_la-ErasureCode.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse3_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/libec_jerasure_sse3_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
 erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodePluginJerasure.lo: erasure-code/jerasure/ErasureCodePluginJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse3_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodePluginJerasure.lo -MD -MP -MF erasure-code/jerasure/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCodePluginJerasure.Tpo -c -o erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodePluginJerasure.lo ` [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCodePluginJerasure.Tpo erasure-code/jerasure/$(DEPDIR)/libec_jerasure_sse3_la-ErasureCodePluginJerasure.Plo
@@ -13029,13 +11301,6 @@ erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodeJerasure.lo: erasure-cod
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse3_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/jerasure/libec_jerasure_sse3_la-ErasureCodeJerasure.lo `test -f 'erasure-code/jerasure/ErasureCodeJerasure.cc' || echo '$(srcdir)/'`erasure-code/jerasure/ErasureCodeJerasure.cc
 
-erasure-code/libec_jerasure_sse4_la-ErasureCode.lo: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse4_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/libec_jerasure_sse4_la-ErasureCode.lo -MD -MP -MF erasure-code/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCode.Tpo -c -o erasure-code/libec_jerasure_sse4_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-co [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCode.Tpo erasure-code/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCode.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/libec_jerasure_sse4_la-ErasureCode.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse4_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/libec_jerasure_sse4_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
 erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodePluginJerasure.lo: erasure-code/jerasure/ErasureCodePluginJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse4_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodePluginJerasure.lo -MD -MP -MF erasure-code/jerasure/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCodePluginJerasure.Tpo -c -o erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodePluginJerasure.lo ` [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCodePluginJerasure.Tpo erasure-code/jerasure/$(DEPDIR)/libec_jerasure_sse4_la-ErasureCodePluginJerasure.Plo
@@ -13050,34 +11315,6 @@ erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodeJerasure.lo: erasure-cod
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_jerasure_sse4_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/jerasure/libec_jerasure_sse4_la-ErasureCodeJerasure.lo `test -f 'erasure-code/jerasure/ErasureCodeJerasure.cc' || echo '$(srcdir)/'`erasure-code/jerasure/ErasureCodeJerasure.cc
 
-erasure-code/libec_lrc_la-ErasureCode.lo: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/libec_lrc_la-ErasureCode.lo -MD -MP -MF erasure-code/$(DEPDIR)/libec_lrc_la-ErasureCode.Tpo -c -o erasure-code/libec_lrc_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/libec_lrc_la-ErasureCode.Tpo erasure-code/$(DEPDIR)/libec_lrc_la-ErasureCode.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/libec_lrc_la-ErasureCode.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/libec_lrc_la-ErasureCode.lo `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo: erasure-code/lrc/ErasureCodePluginLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo -MD -MP -MF erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodePluginLrc.Tpo -c -o erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo `test -f 'erasure-code/lrc/ErasureCodePluginLrc.cc' || echo '$(srcdir)/ [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodePluginLrc.Tpo erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodePluginLrc.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/lrc/ErasureCodePluginLrc.cc' object='erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/lrc/libec_lrc_la-ErasureCodePluginLrc.lo `test -f 'erasure-code/lrc/ErasureCodePluginLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/ErasureCodePluginLrc.cc
-
-erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo: erasure-code/lrc/ErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo -MD -MP -MF erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodeLrc.Tpo -c -o erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo `test -f 'erasure-code/lrc/ErasureCodeLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/Erasu [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodeLrc.Tpo erasure-code/lrc/$(DEPDIR)/libec_lrc_la-ErasureCodeLrc.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/lrc/ErasureCodeLrc.cc' object='erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/lrc/libec_lrc_la-ErasureCodeLrc.lo `test -f 'erasure-code/lrc/ErasureCodeLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/ErasureCodeLrc.cc
-
-common/libec_lrc_la-str_map.lo: common/str_map.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -MT common/libec_lrc_la-str_map.lo -MD -MP -MF common/$(DEPDIR)/libec_lrc_la-str_map.Tpo -c -o common/libec_lrc_la-str_map.lo `test -f 'common/str_map.cc' || echo '$(srcdir)/'`common/str_map.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) common/$(DEPDIR)/libec_lrc_la-str_map.Tpo common/$(DEPDIR)/libec_lrc_la-str_map.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='common/str_map.cc' object='common/libec_lrc_la-str_map.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_lrc_la_CXXFLAGS) $(CXXFLAGS) -c -o common/libec_lrc_la-str_map.lo `test -f 'common/str_map.cc' || echo '$(srcdir)/'`common/str_map.cc
-
 test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.lo: test/erasure-code/ErasureCodePluginMissingEntryPoint.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_missing_entry_point_la_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.lo -MD -MP -MF test/erasure-code/$(DEPDIR)/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.Tpo -c -o test/erasure-code/libec_missing_entry_point_la- [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.Tpo test/erasure-code/$(DEPDIR)/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.Plo
@@ -13085,13 +11322,6 @@ test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoin
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_missing_entry_point_la_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/libec_missing_entry_point_la-ErasureCodePluginMissingEntryPoint.lo `test -f 'test/erasure-code/ErasureCodePluginMissingEntryPoint.cc' || echo '$(srcdir)/'`test/erasure-code/ErasureCodePluginMissingEntryPoint.cc
 
-test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo: test/erasure-code/ErasureCodePluginMissingVersion.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_missing_version_la_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo -MD -MP -MF test/erasure-code/$(DEPDIR)/libec_missing_version_la-ErasureCodePluginMissingVersion.Tpo -c -o test/erasure-code/libec_missing_version_la-ErasureCodePluginMissi [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/libec_missing_version_la-ErasureCodePluginMissingVersion.Tpo test/erasure-code/$(DEPDIR)/libec_missing_version_la-ErasureCodePluginMissingVersion.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/ErasureCodePluginMissingVersion.cc' object='test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_missing_version_la_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/libec_missing_version_la-ErasureCodePluginMissingVersion.lo `test -f 'test/erasure-code/ErasureCodePluginMissingVersion.cc' || echo '$(srcdir)/'`test/erasure-code/ErasureCodePluginMissingVersion.cc
-
 test/erasure-code/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.lo: test/erasure-code/TestJerasurePluginGeneric.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libec_test_jerasure_generic_la_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.lo -MD -MP -MF test/erasure-code/$(DEPDIR)/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.Tpo -c -o test/erasure-code/libec_test_jerasure_generic_la-TestJerasu [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.Tpo test/erasure-code/$(DEPDIR)/libec_test_jerasure_generic_la-TestJerasurePluginGeneric.Plo
@@ -13204,13 +11434,6 @@ os/libos_la-MemStore.lo: os/MemStore.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -c -o os/libos_la-MemStore.lo `test -f 'os/MemStore.cc' || echo '$(srcdir)/'`os/MemStore.cc
 
-os/libos_la-KeyValueDB.lo: os/KeyValueDB.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -MT os/libos_la-KeyValueDB.lo -MD -MP -MF os/$(DEPDIR)/libos_la-KeyValueDB.Tpo -c -o os/libos_la-KeyValueDB.lo `test -f 'os/KeyValueDB.cc' || echo '$(srcdir)/'`os/KeyValueDB.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) os/$(DEPDIR)/libos_la-KeyValueDB.Tpo os/$(DEPDIR)/libos_la-KeyValueDB.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='os/KeyValueDB.cc' object='os/libos_la-KeyValueDB.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -c -o os/libos_la-KeyValueDB.lo `test -f 'os/KeyValueDB.cc' || echo '$(srcdir)/'`os/KeyValueDB.cc
-
 os/libos_la-KeyValueStore.lo: os/KeyValueStore.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -MT os/libos_la-KeyValueStore.lo -MD -MP -MF os/$(DEPDIR)/libos_la-KeyValueStore.Tpo -c -o os/libos_la-KeyValueStore.lo `test -f 'os/KeyValueStore.cc' || echo '$(srcdir)/'`os/KeyValueStore.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) os/$(DEPDIR)/libos_la-KeyValueStore.Tpo os/$(DEPDIR)/libos_la-KeyValueStore.Plo
@@ -13260,20 +11483,6 @@ os/libos_la-ZFSFileStoreBackend.lo: os/ZFSFileStoreBackend.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -c -o os/libos_la-ZFSFileStoreBackend.lo `test -f 'os/ZFSFileStoreBackend.cc' || echo '$(srcdir)/'`os/ZFSFileStoreBackend.cc
 
-os/libos_la-KineticStore.lo: os/KineticStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -MT os/libos_la-KineticStore.lo -MD -MP -MF os/$(DEPDIR)/libos_la-KineticStore.Tpo -c -o os/libos_la-KineticStore.lo `test -f 'os/KineticStore.cc' || echo '$(srcdir)/'`os/KineticStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) os/$(DEPDIR)/libos_la-KineticStore.Tpo os/$(DEPDIR)/libos_la-KineticStore.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='os/KineticStore.cc' object='os/libos_la-KineticStore.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_la_CXXFLAGS) $(CXXFLAGS) -c -o os/libos_la-KineticStore.lo `test -f 'os/KineticStore.cc' || echo '$(srcdir)/'`os/KineticStore.cc
-
-os/libos_rocksdb_la-RocksDBStore.lo: os/RocksDBStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_rocksdb_la_CXXFLAGS) $(CXXFLAGS) -MT os/libos_rocksdb_la-RocksDBStore.lo -MD -MP -MF os/$(DEPDIR)/libos_rocksdb_la-RocksDBStore.Tpo -c -o os/libos_rocksdb_la-RocksDBStore.lo `test -f 'os/RocksDBStore.cc' || echo '$(srcdir)/'`os/RocksDBStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) os/$(DEPDIR)/libos_rocksdb_la-RocksDBStore.Tpo os/$(DEPDIR)/libos_rocksdb_la-RocksDBStore.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='os/RocksDBStore.cc' object='os/libos_rocksdb_la-RocksDBStore.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_rocksdb_la_CXXFLAGS) $(CXXFLAGS) -c -o os/libos_rocksdb_la-RocksDBStore.lo `test -f 'os/RocksDBStore.cc' || echo '$(srcdir)/'`os/RocksDBStore.cc
-
 os/libos_types_la-Transaction.lo: os/Transaction.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libos_types_la_CXXFLAGS) $(CXXFLAGS) -MT os/libos_types_la-Transaction.lo -MD -MP -MF os/$(DEPDIR)/libos_types_la-Transaction.Tpo -c -o os/libos_types_la-Transaction.lo `test -f 'os/Transaction.cc' || echo '$(srcdir)/'`os/Transaction.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) os/$(DEPDIR)/libos_types_la-Transaction.Tpo os/$(DEPDIR)/libos_types_la-Transaction.Plo
@@ -13449,41 +11658,6 @@ librados/librados_la-snap_set_diff.lo: librados/snap_set_diff.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librados_la_CXXFLAGS) $(CXXFLAGS) -c -o librados/librados_la-snap_set_diff.lo `test -f 'librados/snap_set_diff.cc' || echo '$(srcdir)/'`librados/snap_set_diff.cc
 
-librados/librados_la-RadosXattrIter.lo: librados/RadosXattrIter.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librados_la_CXXFLAGS) $(CXXFLAGS) -MT librados/librados_la-RadosXattrIter.lo -MD -MP -MF librados/$(DEPDIR)/librados_la-RadosXattrIter.Tpo -c -o librados/librados_la-RadosXattrIter.lo `test -f 'librados/RadosXattrIter.cc' || echo '$(srcdir)/'`librados/RadosXattrIter.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) librados/$(DEPDIR)/librados_la-RadosXattrIter.Tpo librados/$(DEPDIR)/librados_la-RadosXattrIter.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='librados/RadosXattrIter.cc' object='librados/librados_la-RadosXattrIter.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librados_la_CXXFLAGS) $(CXXFLAGS) -c -o librados/librados_la-RadosXattrIter.lo `test -f 'librados/RadosXattrIter.cc' || echo '$(srcdir)/'`librados/RadosXattrIter.cc
-
-libradosstriper/libradosstriper_la-libradosstriper.lo: libradosstriper/libradosstriper.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) -MT libradosstriper/libradosstriper_la-libradosstriper.lo -MD -MP -MF libradosstriper/$(DEPDIR)/libradosstriper_la-libradosstriper.Tpo -c -o libradosstriper/libradosstriper_la-libradosstriper.lo `test -f 'libradosstriper/libradosstriper.cc' || echo '$(srcdir)/ [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) libradosstriper/$(DEPDIR)/libradosstriper_la-libradosstriper.Tpo libradosstriper/$(DEPDIR)/libradosstriper_la-libradosstriper.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='libradosstriper/libradosstriper.cc' object='libradosstriper/libradosstriper_la-libradosstriper.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) -c -o libradosstriper/libradosstriper_la-libradosstriper.lo `test -f 'libradosstriper/libradosstriper.cc' || echo '$(srcdir)/'`libradosstriper/libradosstriper.cc
-
-libradosstriper/libradosstriper_la-RadosStriperImpl.lo: libradosstriper/RadosStriperImpl.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) -MT libradosstriper/libradosstriper_la-RadosStriperImpl.lo -MD -MP -MF libradosstriper/$(DEPDIR)/libradosstriper_la-RadosStriperImpl.Tpo -c -o libradosstriper/libradosstriper_la-RadosStriperImpl.lo `test -f 'libradosstriper/RadosStriperImpl.cc' || echo '$(srcd [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) libradosstriper/$(DEPDIR)/libradosstriper_la-RadosStriperImpl.Tpo libradosstriper/$(DEPDIR)/libradosstriper_la-RadosStriperImpl.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='libradosstriper/RadosStriperImpl.cc' object='libradosstriper/libradosstriper_la-RadosStriperImpl.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) -c -o libradosstriper/libradosstriper_la-RadosStriperImpl.lo `test -f 'libradosstriper/RadosStriperImpl.cc' || echo '$(srcdir)/'`libradosstriper/RadosStriperImpl.cc
-
-libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo: libradosstriper/MultiAioCompletionImpl.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) -MT libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo -MD -MP -MF libradosstriper/$(DEPDIR)/libradosstriper_la-MultiAioCompletionImpl.Tpo -c -o libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo `test -f 'libradosstriper/MultiAioCompletion [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) libradosstriper/$(DEPDIR)/libradosstriper_la-MultiAioCompletionImpl.Tpo libradosstriper/$(DEPDIR)/libradosstriper_la-MultiAioCompletionImpl.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='libradosstriper/MultiAioCompletionImpl.cc' object='libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstriper_la_CXXFLAGS) $(CXXFLAGS) -c -o libradosstriper/libradosstriper_la-MultiAioCompletionImpl.lo `test -f 'libradosstriper/MultiAioCompletionImpl.cc' || echo '$(srcdir)/'`libradosstriper/MultiAioCompletionImpl.cc
-
-test/libradosstriper/libradosstripertest_la-TestCase.lo: test/libradosstriper/TestCase.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstripertest_la_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/libradosstripertest_la-TestCase.lo -MD -MP -MF test/libradosstriper/$(DEPDIR)/libradosstripertest_la-TestCase.Tpo -c -o test/libradosstriper/libradosstripertest_la-TestCase.lo `test -f 'test/libradosstriper/TestCase.cc' || echo '$( [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/libradosstripertest_la-TestCase.Tpo test/libradosstriper/$(DEPDIR)/libradosstripertest_la-TestCase.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/TestCase.cc' object='test/libradosstriper/libradosstripertest_la-TestCase.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradosstripertest_la_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/libradosstripertest_la-TestCase.lo `test -f 'test/libradosstriper/TestCase.cc' || echo '$(srcdir)/'`test/libradosstriper/TestCase.cc
-
 test/librados/libradostest_la-test.lo: test/librados/test.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libradostest_la_CXXFLAGS) $(CXXFLAGS) -MT test/librados/libradostest_la-test.lo -MD -MP -MF test/librados/$(DEPDIR)/libradostest_la-test.Tpo -c -o test/librados/libradostest_la-test.lo `test -f 'test/librados/test.cc' || echo '$(srcdir)/'`test/librados/test.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/librados/$(DEPDIR)/libradostest_la-test.Tpo test/librados/$(DEPDIR)/libradostest_la-test.Plo
@@ -14030,20 +12204,6 @@ test/ceph_test_filejournal-test_filejournal.obj: test/test_filejournal.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_filejournal_CXXFLAGS) $(CXXFLAGS) -c -o test/ceph_test_filejournal-test_filejournal.obj `if test -f 'test/test_filejournal.cc'; then $(CYGPATH_W) 'test/test_filejournal.cc'; else $(CYGPATH_W) '$(srcdir)/test/test_filejournal.cc'; fi`
 
-test/filestore/ceph_test_filestore-TestFileStore.o: test/filestore/TestFileStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_filestore_CXXFLAGS) $(CXXFLAGS) -MT test/filestore/ceph_test_filestore-TestFileStore.o -MD -MP -MF test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Tpo -c -o test/filestore/ceph_test_filestore-TestFileStore.o `test -f 'test/filestore/TestFileStore.cc' || echo '$(srcdir)/'`test/filestore/TestFileStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Tpo test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/filestore/TestFileStore.cc' object='test/filestore/ceph_test_filestore-TestFileStore.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_filestore_CXXFLAGS) $(CXXFLAGS) -c -o test/filestore/ceph_test_filestore-TestFileStore.o `test -f 'test/filestore/TestFileStore.cc' || echo '$(srcdir)/'`test/filestore/TestFileStore.cc
-
-test/filestore/ceph_test_filestore-TestFileStore.obj: test/filestore/TestFileStore.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_filestore_CXXFLAGS) $(CXXFLAGS) -MT test/filestore/ceph_test_filestore-TestFileStore.obj -MD -MP -MF test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Tpo -c -o test/filestore/ceph_test_filestore-TestFileStore.obj `if test -f 'test/filestore/TestFileStore.cc'; then $(CYGPATH_W) 'test/filestore/TestFileStore.cc'; else $(CYGPATH_W) '$(srcdir)/test/filestore/TestFi [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Tpo test/filestore/$(DEPDIR)/ceph_test_filestore-TestFileStore.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/filestore/TestFileStore.cc' object='test/filestore/ceph_test_filestore-TestFileStore.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_filestore_CXXFLAGS) $(CXXFLAGS) -c -o test/filestore/ceph_test_filestore-TestFileStore.obj `if test -f 'test/filestore/TestFileStore.cc'; then $(CYGPATH_W) 'test/filestore/TestFileStore.cc'; else $(CYGPATH_W) '$(srcdir)/test/filestore/TestFileStore.cc'; fi`
-
 test/ObjectMap/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.o: test/ObjectMap/test_keyvaluedb_atomicity.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_keyvaluedb_atomicity_CXXFLAGS) $(CXXFLAGS) -MT test/ObjectMap/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.o -MD -MP -MF test/ObjectMap/$(DEPDIR)/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.Tpo -c -o test/ObjectMap/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.o `test -f 'test/ObjectMap/test_keyvaluedb_atomicity.cc' || echo '$(srcdir)/ [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/ObjectMap/$(DEPDIR)/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.Tpo test/ObjectMap/$(DEPDIR)/ceph_test_keyvaluedb_atomicity-test_keyvaluedb_atomicity.Po
@@ -14156,20 +12316,6 @@ test/librbd/ceph_test_librbd-test_librbd.obj: test/librbd/test_librbd.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_librbd_CXXFLAGS) $(CXXFLAGS) -c -o test/librbd/ceph_test_librbd-test_librbd.obj `if test -f 'test/librbd/test_librbd.cc'; then $(CYGPATH_W) 'test/librbd/test_librbd.cc'; else $(CYGPATH_W) '$(srcdir)/test/librbd/test_librbd.cc'; fi`
 
-test/mon/ceph_test_mon_msg-test-mon-msg.o: test/mon/test-mon-msg.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_mon_msg_CXXFLAGS) $(CXXFLAGS) -MT test/mon/ceph_test_mon_msg-test-mon-msg.o -MD -MP -MF test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Tpo -c -o test/mon/ceph_test_mon_msg-test-mon-msg.o `test -f 'test/mon/test-mon-msg.cc' || echo '$(srcdir)/'`test/mon/test-mon-msg.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Tpo test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/mon/test-mon-msg.cc' object='test/mon/ceph_test_mon_msg-test-mon-msg.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_mon_msg_CXXFLAGS) $(CXXFLAGS) -c -o test/mon/ceph_test_mon_msg-test-mon-msg.o `test -f 'test/mon/test-mon-msg.cc' || echo '$(srcdir)/'`test/mon/test-mon-msg.cc
-
-test/mon/ceph_test_mon_msg-test-mon-msg.obj: test/mon/test-mon-msg.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_mon_msg_CXXFLAGS) $(CXXFLAGS) -MT test/mon/ceph_test_mon_msg-test-mon-msg.obj -MD -MP -MF test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Tpo -c -o test/mon/ceph_test_mon_msg-test-mon-msg.obj `if test -f 'test/mon/test-mon-msg.cc'; then $(CYGPATH_W) 'test/mon/test-mon-msg.cc'; else $(CYGPATH_W) '$(srcdir)/test/mon/test-mon-msg.cc'; fi`
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Tpo test/mon/$(DEPDIR)/ceph_test_mon_msg-test-mon-msg.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/mon/test-mon-msg.cc' object='test/mon/ceph_test_mon_msg-test-mon-msg.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_mon_msg_CXXFLAGS) $(CXXFLAGS) -c -o test/mon/ceph_test_mon_msg-test-mon-msg.obj `if test -f 'test/mon/test-mon-msg.cc'; then $(CYGPATH_W) 'test/mon/test-mon-msg.cc'; else $(CYGPATH_W) '$(srcdir)/test/mon/test-mon-msg.cc'; fi`
-
 test/ObjectMap/ceph_test_object_map-test_object_map.o: test/ObjectMap/test_object_map.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_object_map_CXXFLAGS) $(CXXFLAGS) -MT test/ObjectMap/ceph_test_object_map-test_object_map.o -MD -MP -MF test/ObjectMap/$(DEPDIR)/ceph_test_object_map-test_object_map.Tpo -c -o test/ObjectMap/ceph_test_object_map-test_object_map.o `test -f 'test/ObjectMap/test_object_map.cc' || echo '$(srcdir)/'`test/ObjectMap/test_object_map.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/ObjectMap/$(DEPDIR)/ceph_test_object_map-test_object_map.Tpo test/ObjectMap/$(DEPDIR)/ceph_test_object_map-test_object_map.Po
@@ -14422,48 +12568,6 @@ test/librados/ceph_test_rados_api_watch_notify-watch_notify.obj: test/librados/w
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_api_watch_notify_CXXFLAGS) $(CXXFLAGS) -c -o test/librados/ceph_test_rados_api_watch_notify-watch_notify.obj `if test -f 'test/librados/watch_notify.cc'; then $(CYGPATH_W) 'test/librados/watch_notify.cc'; else $(CYGPATH_W) '$(srcdir)/test/librados/watch_notify.cc'; fi`
 
-test/libradosstriper/ceph_test_rados_striper_api_aio-aio.o: test/libradosstriper/aio.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_aio_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/ceph_test_rados_striper_api_aio-aio.o -MD -MP -MF test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Tpo -c -o test/libradosstriper/ceph_test_rados_striper_api_aio-aio.o `test -f 'test/libradosstriper/aio.cc' || echo '$(srcdir)/'`test/libradosstriper/aio.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Tpo test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/aio.cc' object='test/libradosstriper/ceph_test_rados_striper_api_aio-aio.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_aio_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/ceph_test_rados_striper_api_aio-aio.o `test -f 'test/libradosstriper/aio.cc' || echo '$(srcdir)/'`test/libradosstriper/aio.cc
-
-test/libradosstriper/ceph_test_rados_striper_api_aio-aio.obj: test/libradosstriper/aio.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_aio_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/ceph_test_rados_striper_api_aio-aio.obj -MD -MP -MF test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Tpo -c -o test/libradosstriper/ceph_test_rados_striper_api_aio-aio.obj `if test -f 'test/libradosstriper/aio.cc'; then $(CYGPATH_W) 'test/libradosstriper/aio.cc'; else $(CYGPATH_W) '$(s [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Tpo test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_aio-aio.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/aio.cc' object='test/libradosstriper/ceph_test_rados_striper_api_aio-aio.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_aio_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/ceph_test_rados_striper_api_aio-aio.obj `if test -f 'test/libradosstriper/aio.cc'; then $(CYGPATH_W) 'test/libradosstriper/aio.cc'; else $(CYGPATH_W) '$(srcdir)/test/libradosstriper/aio.cc'; fi`
-
-test/libradosstriper/ceph_test_rados_striper_api_io-io.o: test/libradosstriper/io.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_io_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/ceph_test_rados_striper_api_io-io.o -MD -MP -MF test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Tpo -c -o test/libradosstriper/ceph_test_rados_striper_api_io-io.o `test -f 'test/libradosstriper/io.cc' || echo '$(srcdir)/'`test/libradosstriper/io.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Tpo test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/io.cc' object='test/libradosstriper/ceph_test_rados_striper_api_io-io.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_io_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/ceph_test_rados_striper_api_io-io.o `test -f 'test/libradosstriper/io.cc' || echo '$(srcdir)/'`test/libradosstriper/io.cc
-
-test/libradosstriper/ceph_test_rados_striper_api_io-io.obj: test/libradosstriper/io.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_io_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/ceph_test_rados_striper_api_io-io.obj -MD -MP -MF test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Tpo -c -o test/libradosstriper/ceph_test_rados_striper_api_io-io.obj `if test -f 'test/libradosstriper/io.cc'; then $(CYGPATH_W) 'test/libradosstriper/io.cc'; else $(CYGPATH_W) '$(srcdir)/te [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Tpo test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_io-io.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/io.cc' object='test/libradosstriper/ceph_test_rados_striper_api_io-io.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_io_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/ceph_test_rados_striper_api_io-io.obj `if test -f 'test/libradosstriper/io.cc'; then $(CYGPATH_W) 'test/libradosstriper/io.cc'; else $(CYGPATH_W) '$(srcdir)/test/libradosstriper/io.cc'; fi`
-
-test/libradosstriper/ceph_test_rados_striper_api_striping-striping.o: test/libradosstriper/striping.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_striping_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/ceph_test_rados_striper_api_striping-striping.o -MD -MP -MF test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Tpo -c -o test/libradosstriper/ceph_test_rados_striper_api_striping-striping.o `test -f 'test/libradosstriper/striping.cc' || echo '$(srcdir)/'`test/libradosstrip [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Tpo test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/striping.cc' object='test/libradosstriper/ceph_test_rados_striper_api_striping-striping.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_striping_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/ceph_test_rados_striper_api_striping-striping.o `test -f 'test/libradosstriper/striping.cc' || echo '$(srcdir)/'`test/libradosstriper/striping.cc
-
-test/libradosstriper/ceph_test_rados_striper_api_striping-striping.obj: test/libradosstriper/striping.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_striping_CXXFLAGS) $(CXXFLAGS) -MT test/libradosstriper/ceph_test_rados_striper_api_striping-striping.obj -MD -MP -MF test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Tpo -c -o test/libradosstriper/ceph_test_rados_striper_api_striping-striping.obj `if test -f 'test/libradosstriper/striping.cc'; then $(CYGPATH_W) 'test/librado [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Tpo test/libradosstriper/$(DEPDIR)/ceph_test_rados_striper_api_striping-striping.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/libradosstriper/striping.cc' object='test/libradosstriper/ceph_test_rados_striper_api_striping-striping.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rados_striper_api_striping_CXXFLAGS) $(CXXFLAGS) -c -o test/libradosstriper/ceph_test_rados_striper_api_striping-striping.obj `if test -f 'test/libradosstriper/striping.cc'; then $(CYGPATH_W) 'test/libradosstriper/striping.cc'; else $(CYGPATH_W) '$(srcdir)/test/libradosstriper/striping.cc'; fi`
-
 test/rgw/ceph_test_rgw_manifest-test_rgw_manifest.o: test/rgw/test_rgw_manifest.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ceph_test_rgw_manifest_CXXFLAGS) $(CXXFLAGS) -MT test/rgw/ceph_test_rgw_manifest-test_rgw_manifest.o -MD -MP -MF test/rgw/$(DEPDIR)/ceph_test_rgw_manifest-test_rgw_manifest.Tpo -c -o test/rgw/ceph_test_rgw_manifest-test_rgw_manifest.o `test -f 'test/rgw/test_rgw_manifest.cc' || echo '$(srcdir)/'`test/rgw/test_rgw_manifest.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/rgw/$(DEPDIR)/ceph_test_rgw_manifest-test_rgw_manifest.Tpo test/rgw/$(DEPDIR)/ceph_test_rgw_manifest-test_rgw_manifest.Po
@@ -15122,20 +13226,6 @@ common/test_build_libcommon-buffer.obj: common/buffer.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CXXFLAGS) $(CXXFLAGS) -c -o common/test_build_libcommon-buffer.obj `if test -f 'common/buffer.cc'; then $(CYGPATH_W) 'common/buffer.cc'; else $(CYGPATH_W) '$(srcdir)/common/buffer.cc'; fi`
 
-common/test_build_libcommon-types.o: common/types.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CXXFLAGS) $(CXXFLAGS) -MT common/test_build_libcommon-types.o -MD -MP -MF common/$(DEPDIR)/test_build_libcommon-types.Tpo -c -o common/test_build_libcommon-types.o `test -f 'common/types.cc' || echo '$(srcdir)/'`common/types.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) common/$(DEPDIR)/test_build_libcommon-types.Tpo common/$(DEPDIR)/test_build_libcommon-types.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='common/types.cc' object='common/test_build_libcommon-types.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CXXFLAGS) $(CXXFLAGS) -c -o common/test_build_libcommon-types.o `test -f 'common/types.cc' || echo '$(srcdir)/'`common/types.cc
-
-common/test_build_libcommon-types.obj: common/types.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CXXFLAGS) $(CXXFLAGS) -MT common/test_build_libcommon-types.obj -MD -MP -MF common/$(DEPDIR)/test_build_libcommon-types.Tpo -c -o common/test_build_libcommon-types.obj `if test -f 'common/types.cc'; then $(CYGPATH_W) 'common/types.cc'; else $(CYGPATH_W) '$(srcdir)/common/types.cc'; fi`
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) common/$(DEPDIR)/test_build_libcommon-types.Tpo common/$(DEPDIR)/test_build_libcommon-types.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='common/types.cc' object='common/test_build_libcommon-types.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CXXFLAGS) $(CXXFLAGS) -c -o common/test_build_libcommon-types.obj `if test -f 'common/types.cc'; then $(CYGPATH_W) 'common/types.cc'; else $(CYGPATH_W) '$(srcdir)/common/types.cc'; fi`
-
 common/test_build_libcommon-code_environment.o: common/code_environment.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_libcommon_CXXFLAGS) $(CXXFLAGS) -MT common/test_build_libcommon-code_environment.o -MD -MP -MF common/$(DEPDIR)/test_build_libcommon-code_environment.Tpo -c -o common/test_build_libcommon-code_environment.o `test -f 'common/code_environment.cc' || echo '$(srcdir)/'`common/code_environment.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) common/$(DEPDIR)/test_build_libcommon-code_environment.Tpo common/$(DEPDIR)/test_build_libcommon-code_environment.Po
@@ -15738,20 +13828,6 @@ librados/test_build_librados-snap_set_diff.obj: librados/snap_set_diff.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_librados_CXXFLAGS) $(CXXFLAGS) -c -o librados/test_build_librados-snap_set_diff.obj `if test -f 'librados/snap_set_diff.cc'; then $(CYGPATH_W) 'librados/snap_set_diff.cc'; else $(CYGPATH_W) '$(srcdir)/librados/snap_set_diff.cc'; fi`
 
-librados/test_build_librados-RadosXattrIter.o: librados/RadosXattrIter.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_librados_CXXFLAGS) $(CXXFLAGS) -MT librados/test_build_librados-RadosXattrIter.o -MD -MP -MF librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Tpo -c -o librados/test_build_librados-RadosXattrIter.o `test -f 'librados/RadosXattrIter.cc' || echo '$(srcdir)/'`librados/RadosXattrIter.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Tpo librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='librados/RadosXattrIter.cc' object='librados/test_build_librados-RadosXattrIter.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_librados_CXXFLAGS) $(CXXFLAGS) -c -o librados/test_build_librados-RadosXattrIter.o `test -f 'librados/RadosXattrIter.cc' || echo '$(srcdir)/'`librados/RadosXattrIter.cc
-
-librados/test_build_librados-RadosXattrIter.obj: librados/RadosXattrIter.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_librados_CXXFLAGS) $(CXXFLAGS) -MT librados/test_build_librados-RadosXattrIter.obj -MD -MP -MF librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Tpo -c -o librados/test_build_librados-RadosXattrIter.obj `if test -f 'librados/RadosXattrIter.cc'; then $(CYGPATH_W) 'librados/RadosXattrIter.cc'; else $(CYGPATH_W) '$(srcdir)/librados/RadosXattrIter.cc'; fi`
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Tpo librados/$(DEPDIR)/test_build_librados-RadosXattrIter.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='librados/RadosXattrIter.cc' object='librados/test_build_librados-RadosXattrIter.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_librados_CXXFLAGS) $(CXXFLAGS) -c -o librados/test_build_librados-RadosXattrIter.obj `if test -f 'librados/RadosXattrIter.cc'; then $(CYGPATH_W) 'librados/RadosXattrIter.cc'; else $(CYGPATH_W) '$(srcdir)/librados/RadosXattrIter.cc'; fi`
-
 test/test_build_librgw-buildtest_skeleton.o: test/buildtest_skeleton.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_build_librgw_CXXFLAGS) $(CXXFLAGS) -MT test/test_build_librgw-buildtest_skeleton.o -MD -MP -MF test/$(DEPDIR)/test_build_librgw-buildtest_skeleton.Tpo -c -o test/test_build_librgw-buildtest_skeleton.o `test -f 'test/buildtest_skeleton.cc' || echo '$(srcdir)/'`test/buildtest_skeleton.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/$(DEPDIR)/test_build_librgw-buildtest_skeleton.Tpo test/$(DEPDIR)/test_build_librgw-buildtest_skeleton.Po
@@ -16536,48 +14612,6 @@ test/unittest_encoding-encoding.obj: test/encoding.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_encoding_CXXFLAGS) $(CXXFLAGS) -c -o test/unittest_encoding-encoding.obj `if test -f 'test/encoding.cc'; then $(CYGPATH_W) 'test/encoding.cc'; else $(CYGPATH_W) '$(srcdir)/test/encoding.cc'; fi`
 
-erasure-code/unittest_erasure_code-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
-test/erasure-code/unittest_erasure_code-TestErasureCode.o: test/erasure-code/TestErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code-TestErasureCode.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Tpo -c -o test/erasure-code/unittest_erasure_code-TestErasureCode.o `test -f 'test/erasure-code/TestErasureCode.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCode.cc' object='test/erasure-code/unittest_erasure_code-TestErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code-TestErasureCode.o `test -f 'test/erasure-code/TestErasureCode.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCode.cc
-
-test/erasure-code/unittest_erasure_code-TestErasureCode.obj: test/erasure-code/TestErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code-TestErasureCode.obj -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Tpo -c -o test/erasure-code/unittest_erasure_code-TestErasureCode.obj `if test -f 'test/erasure-code/TestErasureCode.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCode.cc'; else $(CYGPATH_W) [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code-TestErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCode.cc' object='test/erasure-code/unittest_erasure_code-TestErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code-TestErasureCode.obj `if test -f 'test/erasure-code/TestErasureCode.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCode.cc'; fi`
-
-erasure-code/unittest_erasure_code_example-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_example-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_example-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_example-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_example-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code_example-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_example-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_example-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/e [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_example-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_example-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_example-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
 test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.o: test/erasure-code/TestErasureCodeExample.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_example-TestErasureCodeExample.Tpo -c -o test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.o `test -f 'test/erasure-code/TestErasureCodeExample.cc' || echo '$(srcdir)/'`te [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_example-TestErasureCodeExample.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_example-TestErasureCodeExample.Po
@@ -16592,34 +14626,6 @@ test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.obj: test
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_example_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_example-TestErasureCodeExample.obj `if test -f 'test/erasure-code/TestErasureCodeExample.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodeExample.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodeExample.cc'; fi`
 
-erasure-code/unittest_erasure_code_isa-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_isa-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_isa-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_isa-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_isa-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code_isa-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_isa-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_isa-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/Eras [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_isa-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_isa-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_isa-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
-test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.o: test/erasure-code/TestErasureCodeIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Tpo -c -o test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.o `test -f 'test/erasure-code/TestErasureCodeIsa.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCodeIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodeIsa.cc' object='test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.o `test -f 'test/erasure-code/TestErasureCodeIsa.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCodeIsa.cc
-
-test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.obj: test/erasure-code/TestErasureCodeIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.obj -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Tpo -c -o test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.obj `if test -f 'test/erasure-code/TestErasureCodeIsa.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasur [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_isa-TestErasureCodeIsa.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodeIsa.cc' object='test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_isa_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_isa-TestErasureCodeIsa.obj `if test -f 'test/erasure-code/TestErasureCodeIsa.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodeIsa.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodeIsa.cc'; fi`
-
 test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.o: test/erasure-code/TestErasureCodeJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-TestErasureCodeJerasure.Tpo -c -o test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.o `test -f 'test/erasure-code/TestErasureCodeJerasure.cc' || echo '$(srcd [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-TestErasureCodeJerasure.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-TestErasureCodeJerasure.Po
@@ -16634,20 +14640,6 @@ test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.obj: te
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_jerasure-TestErasureCodeJerasure.obj `if test -f 'test/erasure-code/TestErasureCodeJerasure.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodeJerasure.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodeJerasure.cc'; fi`
 
-erasure-code/unittest_erasure_code_jerasure-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_jerasure-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_jerasure-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_jerasure-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_jerasure-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code_jerasure-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_jerasure-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_jerasure-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdi [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_jerasure-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_jerasure-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
 erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.o: erasure-code/jerasure/ErasureCodePluginJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.o -MD -MP -MF erasure-code/jerasure/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.Tpo -c -o erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.o `test -f 'erasure-code/jerasure/ErasureCodePluginJera [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/jerasure/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.Tpo erasure-code/jerasure/$(DEPDIR)/unittest_erasure_code_jerasure-ErasureCodePluginJerasure.Po
@@ -16676,76 +14668,6 @@ erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodeJerasure.obj: er
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_jerasure_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/jerasure/unittest_erasure_code_jerasure-ErasureCodeJerasure.obj `if test -f 'erasure-code/jerasure/ErasureCodeJerasure.cc'; then $(CYGPATH_W) 'erasure-code/jerasure/ErasureCodeJerasure.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/jerasure/ErasureCodeJerasure.cc'; fi`
 
-test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.o: test/erasure-code/TestErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Tpo -c -o test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.o `test -f 'test/erasure-code/TestErasureCodeLrc.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodeLrc.cc' object='test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.o `test -f 'test/erasure-code/TestErasureCodeLrc.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCodeLrc.cc
-
-test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.obj: test/erasure-code/TestErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.obj -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Tpo -c -o test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.obj `if test -f 'test/erasure-code/TestErasureCodeLrc.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasur [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-TestErasureCodeLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodeLrc.cc' object='test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_lrc-TestErasureCodeLrc.obj `if test -f 'test/erasure-code/TestErasureCodeLrc.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodeLrc.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodeLrc.cc'; fi`
-
-erasure-code/unittest_erasure_code_lrc-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_lrc-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_lrc-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_lrc-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_lrc-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code_lrc-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_lrc-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_lrc-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/Eras [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_lrc-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_lrc-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
-erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.o: erasure-code/lrc/ErasureCodePluginLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.o -MD -MP -MF erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Tpo -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.o `test -f 'erasure-code/lrc/ErasureCodePluginLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/ErasureCodePl [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Tpo erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/lrc/ErasureCodePluginLrc.cc' object='erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.o `test -f 'erasure-code/lrc/ErasureCodePluginLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/ErasureCodePluginLrc.cc
-
-erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.obj: erasure-code/lrc/ErasureCodePluginLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.obj -MD -MP -MF erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Tpo -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.obj `if test -f 'erasure-code/lrc/ErasureCodePluginLrc.cc'; then $(CYGPATH_W) 'erasure-code/lrc/Erasure [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Tpo erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodePluginLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/lrc/ErasureCodePluginLrc.cc' object='erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodePluginLrc.obj `if test -f 'erasure-code/lrc/ErasureCodePluginLrc.cc'; then $(CYGPATH_W) 'erasure-code/lrc/ErasureCodePluginLrc.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/lrc/ErasureCodePluginLrc.cc'; fi`
-
-erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.o: erasure-code/lrc/ErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.o -MD -MP -MF erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Tpo -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.o `test -f 'erasure-code/lrc/ErasureCodeLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/ErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Tpo erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/lrc/ErasureCodeLrc.cc' object='erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.o `test -f 'erasure-code/lrc/ErasureCodeLrc.cc' || echo '$(srcdir)/'`erasure-code/lrc/ErasureCodeLrc.cc
-
-erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.obj: erasure-code/lrc/ErasureCodeLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.obj -MD -MP -MF erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Tpo -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.obj `if test -f 'erasure-code/lrc/ErasureCodeLrc.cc'; then $(CYGPATH_W) 'erasure-code/lrc/ErasureCodeLrc.cc'; else $(CYGP [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Tpo erasure-code/lrc/$(DEPDIR)/unittest_erasure_code_lrc-ErasureCodeLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/lrc/ErasureCodeLrc.cc' object='erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_lrc_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/lrc/unittest_erasure_code_lrc-ErasureCodeLrc.obj `if test -f 'erasure-code/lrc/ErasureCodeLrc.cc'; then $(CYGPATH_W) 'erasure-code/lrc/ErasureCodeLrc.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/lrc/ErasureCodeLrc.cc'; fi`
-
-erasure-code/unittest_erasure_code_plugin-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_plugin-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_plugin-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_plugin-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_plugin-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code_plugin-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_plugin-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_plugin-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasu [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_plugin-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_plugin-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
 test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.o: test/erasure-code/TestErasureCodePlugin.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-TestErasureCodePlugin.Tpo -c -o test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.o `test -f 'test/erasure-code/TestErasureCodePlugin.cc' || echo '$(srcdir)/'`test/erasu [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-TestErasureCodePlugin.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin-TestErasureCodePlugin.Po
@@ -16760,34 +14682,6 @@ test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.obj: test/e
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_plugin-TestErasureCodePlugin.obj `if test -f 'test/erasure-code/TestErasureCodePlugin.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodePlugin.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodePlugin.cc'; fi`
 
-erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.o: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.o -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.o `test -f 'erasure-code/ErasureCode.cc' || echo '$(srcdir)/'`erasure-code/ErasureCode.cc
-
-erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.obj: erasure-code/ErasureCode.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -MT erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.obj -MD -MP -MF erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Tpo -c -o erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W)  [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Tpo erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-ErasureCode.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='erasure-code/ErasureCode.cc' object='erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -c -o erasure-code/unittest_erasure_code_plugin_isa-ErasureCode.obj `if test -f 'erasure-code/ErasureCode.cc'; then $(CYGPATH_W) 'erasure-code/ErasureCode.cc'; else $(CYGPATH_W) '$(srcdir)/erasure-code/ErasureCode.cc'; fi`
-
-test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.o: test/erasure-code/TestErasureCodePluginIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Tpo -c -o test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.o `test -f 'test/erasure-code/TestErasureCodePluginIsa.cc' ||  [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodePluginIsa.cc' object='test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.o `test -f 'test/erasure-code/TestErasureCodePluginIsa.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCodePluginIsa.cc
-
-test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.obj: test/erasure-code/TestErasureCodePluginIsa.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.obj -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Tpo -c -o test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.obj `if test -f 'test/erasure-code/TestErasureCodePluginIsa. [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodePluginIsa.cc' object='test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_isa_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_plugin_isa-TestErasureCodePluginIsa.obj `if test -f 'test/erasure-code/TestErasureCodePluginIsa.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodePluginIsa.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodePluginIsa.cc'; fi`
-
 test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.o: test/erasure-code/TestErasureCodePluginJerasure.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_jerasure_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.Tpo -c -o test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.o `test -f 'test/erasure-co [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.Po
@@ -16802,20 +14696,6 @@ test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJer
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_jerasure_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_plugin_jerasure-TestErasureCodePluginJerasure.obj `if test -f 'test/erasure-code/TestErasureCodePluginJerasure.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodePluginJerasure.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodePluginJerasure. [...]
 
-test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.o: test/erasure-code/TestErasureCodePluginLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_lrc_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.o -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Tpo -c -o test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.o `test -f 'test/erasure-code/TestErasureCodePluginLrc.cc' ||  [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodePluginLrc.cc' object='test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_lrc_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.o `test -f 'test/erasure-code/TestErasureCodePluginLrc.cc' || echo '$(srcdir)/'`test/erasure-code/TestErasureCodePluginLrc.cc
-
-test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.obj: test/erasure-code/TestErasureCodePluginLrc.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_lrc_CXXFLAGS) $(CXXFLAGS) -MT test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.obj -MD -MP -MF test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Tpo -c -o test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.obj `if test -f 'test/erasure-code/TestErasureCodePluginLrc. [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Tpo test/erasure-code/$(DEPDIR)/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/erasure-code/TestErasureCodePluginLrc.cc' object='test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_erasure_code_plugin_lrc_CXXFLAGS) $(CXXFLAGS) -c -o test/erasure-code/unittest_erasure_code_plugin_lrc-TestErasureCodePluginLrc.obj `if test -f 'test/erasure-code/TestErasureCodePluginLrc.cc'; then $(CYGPATH_W) 'test/erasure-code/TestErasureCodePluginLrc.cc'; else $(CYGPATH_W) '$(srcdir)/test/erasure-code/TestErasureCodePluginLrc.cc'; fi`
-
 test/unittest_escape-escape.o: test/escape.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_escape_CXXFLAGS) $(CXXFLAGS) -MT test/unittest_escape-escape.o -MD -MP -MF test/$(DEPDIR)/unittest_escape-escape.Tpo -c -o test/unittest_escape-escape.o `test -f 'test/escape.cc' || echo '$(srcdir)/'`test/escape.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/$(DEPDIR)/unittest_escape-escape.Tpo test/$(DEPDIR)/unittest_escape-escape.Po
@@ -17026,20 +14906,6 @@ log/unittest_log-test.obj: log/test.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_log_CXXFLAGS) $(CXXFLAGS) -c -o log/unittest_log-test.obj `if test -f 'log/test.cc'; then $(CYGPATH_W) 'log/test.cc'; else $(CYGPATH_W) '$(srcdir)/log/test.cc'; fi`
 
-test/common/unittest_lru-test_lru.o: test/common/test_lru.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_lru_CXXFLAGS) $(CXXFLAGS) -MT test/common/unittest_lru-test_lru.o -MD -MP -MF test/common/$(DEPDIR)/unittest_lru-test_lru.Tpo -c -o test/common/unittest_lru-test_lru.o `test -f 'test/common/test_lru.cc' || echo '$(srcdir)/'`test/common/test_lru.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/common/$(DEPDIR)/unittest_lru-test_lru.Tpo test/common/$(DEPDIR)/unittest_lru-test_lru.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/common/test_lru.cc' object='test/common/unittest_lru-test_lru.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_lru_CXXFLAGS) $(CXXFLAGS) -c -o test/common/unittest_lru-test_lru.o `test -f 'test/common/test_lru.cc' || echo '$(srcdir)/'`test/common/test_lru.cc
-
-test/common/unittest_lru-test_lru.obj: test/common/test_lru.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_lru_CXXFLAGS) $(CXXFLAGS) -MT test/common/unittest_lru-test_lru.obj -MD -MP -MF test/common/$(DEPDIR)/unittest_lru-test_lru.Tpo -c -o test/common/unittest_lru-test_lru.obj `if test -f 'test/common/test_lru.cc'; then $(CYGPATH_W) 'test/common/test_lru.cc'; else $(CYGPATH_W) '$(srcdir)/test/common/test_lru.cc'; fi`
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/common/$(DEPDIR)/unittest_lru-test_lru.Tpo test/common/$(DEPDIR)/unittest_lru-test_lru.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/common/test_lru.cc' object='test/common/unittest_lru-test_lru.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_lru_CXXFLAGS) $(CXXFLAGS) -c -o test/common/unittest_lru-test_lru.obj `if test -f 'test/common/test_lru.cc'; then $(CYGPATH_W) 'test/common/test_lru.cc'; else $(CYGPATH_W) '$(srcdir)/test/common/test_lru.cc'; fi`
-
 test/unittest_mime-mime.o: test/mime.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_mime_CXXFLAGS) $(CXXFLAGS) -MT test/unittest_mime-mime.o -MD -MP -MF test/$(DEPDIR)/unittest_mime-mime.Tpo -c -o test/unittest_mime-mime.o `test -f 'test/mime.cc' || echo '$(srcdir)/'`test/mime.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/$(DEPDIR)/unittest_mime-mime.Tpo test/$(DEPDIR)/unittest_mime-mime.Po
@@ -17166,20 +15032,6 @@ test/unittest_prebufferedstreambuf-test_prebufferedstreambuf.obj: test/test_preb
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_prebufferedstreambuf_CXXFLAGS) $(CXXFLAGS) -c -o test/unittest_prebufferedstreambuf-test_prebufferedstreambuf.obj `if test -f 'test/test_prebufferedstreambuf.cc'; then $(CYGPATH_W) 'test/test_prebufferedstreambuf.cc'; else $(CYGPATH_W) '$(srcdir)/test/test_prebufferedstreambuf.cc'; fi`
 
-test/unittest_rbd_replay-test_rbd_replay.o: test/test_rbd_replay.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_rbd_replay_CXXFLAGS) $(CXXFLAGS) -MT test/unittest_rbd_replay-test_rbd_replay.o -MD -MP -MF test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Tpo -c -o test/unittest_rbd_replay-test_rbd_replay.o `test -f 'test/test_rbd_replay.cc' || echo '$(srcdir)/'`test/test_rbd_replay.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Tpo test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/test_rbd_replay.cc' object='test/unittest_rbd_replay-test_rbd_replay.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_rbd_replay_CXXFLAGS) $(CXXFLAGS) -c -o test/unittest_rbd_replay-test_rbd_replay.o `test -f 'test/test_rbd_replay.cc' || echo '$(srcdir)/'`test/test_rbd_replay.cc
-
-test/unittest_rbd_replay-test_rbd_replay.obj: test/test_rbd_replay.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_rbd_replay_CXXFLAGS) $(CXXFLAGS) -MT test/unittest_rbd_replay-test_rbd_replay.obj -MD -MP -MF test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Tpo -c -o test/unittest_rbd_replay-test_rbd_replay.obj `if test -f 'test/test_rbd_replay.cc'; then $(CYGPATH_W) 'test/test_rbd_replay.cc'; else $(CYGPATH_W) '$(srcdir)/test/test_rbd_replay.cc'; fi`
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Tpo test/$(DEPDIR)/unittest_rbd_replay-test_rbd_replay.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/test_rbd_replay.cc' object='test/unittest_rbd_replay-test_rbd_replay.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_rbd_replay_CXXFLAGS) $(CXXFLAGS) -c -o test/unittest_rbd_replay-test_rbd_replay.obj `if test -f 'test/test_rbd_replay.cc'; then $(CYGPATH_W) 'test/test_rbd_replay.cc'; else $(CYGPATH_W) '$(srcdir)/test/test_rbd_replay.cc'; fi`
-
 test/unittest_run_cmd-run_cmd.o: test/run_cmd.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_run_cmd_CXXFLAGS) $(CXXFLAGS) -MT test/unittest_run_cmd-run_cmd.o -MD -MP -MF test/$(DEPDIR)/unittest_run_cmd-run_cmd.Tpo -c -o test/unittest_run_cmd-run_cmd.o `test -f 'test/run_cmd.cc' || echo '$(srcdir)/'`test/run_cmd.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/$(DEPDIR)/unittest_run_cmd-run_cmd.Tpo test/$(DEPDIR)/unittest_run_cmd-run_cmd.Po
@@ -17194,20 +15046,6 @@ test/unittest_run_cmd-run_cmd.obj: test/run_cmd.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_run_cmd_CXXFLAGS) $(CXXFLAGS) -c -o test/unittest_run_cmd-run_cmd.obj `if test -f 'test/run_cmd.cc'; then $(CYGPATH_W) 'test/run_cmd.cc'; else $(CYGPATH_W) '$(srcdir)/test/run_cmd.cc'; fi`
 
-test/common/unittest_shared_cache-test_shared_cache.o: test/common/test_shared_cache.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_shared_cache_CXXFLAGS) $(CXXFLAGS) -MT test/common/unittest_shared_cache-test_shared_cache.o -MD -MP -MF test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Tpo -c -o test/common/unittest_shared_cache-test_shared_cache.o `test -f 'test/common/test_shared_cache.cc' || echo '$(srcdir)/'`test/common/test_shared_cache.cc
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Tpo test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/common/test_shared_cache.cc' object='test/common/unittest_shared_cache-test_shared_cache.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_shared_cache_CXXFLAGS) $(CXXFLAGS) -c -o test/common/unittest_shared_cache-test_shared_cache.o `test -f 'test/common/test_shared_cache.cc' || echo '$(srcdir)/'`test/common/test_shared_cache.cc
-
-test/common/unittest_shared_cache-test_shared_cache.obj: test/common/test_shared_cache.cc
- at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_shared_cache_CXXFLAGS) $(CXXFLAGS) -MT test/common/unittest_shared_cache-test_shared_cache.obj -MD -MP -MF test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Tpo -c -o test/common/unittest_shared_cache-test_shared_cache.obj `if test -f 'test/common/test_shared_cache.cc'; then $(CYGPATH_W) 'test/common/test_shared_cache.cc'; else $(CYGPATH_W) '$(srcdir)/test/com [...]
- at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Tpo test/common/$(DEPDIR)/unittest_shared_cache-test_shared_cache.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='test/common/test_shared_cache.cc' object='test/common/unittest_shared_cache-test_shared_cache.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_shared_cache_CXXFLAGS) $(CXXFLAGS) -c -o test/common/unittest_shared_cache-test_shared_cache.obj `if test -f 'test/common/test_shared_cache.cc'; then $(CYGPATH_W) 'test/common/test_shared_cache.cc'; else $(CYGPATH_W) '$(srcdir)/test/common/test_shared_cache.cc'; fi`
-
 test/common/unittest_sharedptr_registry-test_sharedptr_registry.o: test/common/test_sharedptr_registry.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unittest_sharedptr_registry_CXXFLAGS) $(CXXFLAGS) -MT test/common/unittest_sharedptr_registry-test_sharedptr_registry.o -MD -MP -MF test/common/$(DEPDIR)/unittest_sharedptr_registry-test_sharedptr_registry.Tpo -c -o test/common/unittest_sharedptr_registry-test_sharedptr_registry.o `test -f 'test/common/test_sharedptr_registry.cc' || echo '$(srcdir)/'`test/common/test_sharedptr_reg [...]
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) test/common/$(DEPDIR)/unittest_sharedptr_registry-test_sharedptr_registry.Tpo test/common/$(DEPDIR)/unittest_sharedptr_registry-test_sharedptr_registry.Po
@@ -17414,78 +15252,6 @@ test/unittest_workqueue-test_workqueue.obj: test/test_workqueue.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
-.s.o:
-	$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $<
-
-.s.obj:
-	$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.s.lo:
-	$(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $<
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_multibinary.asm.lo: erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-ec_multibinary.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx2.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx2.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_2vect_dot_prod_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx2.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx2.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_3vect_dot_prod_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx2.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx2.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_4vect_dot_prod_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx2.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx2.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_5vect_dot_prod_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx2.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx2.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_6vect_dot_prod_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx2.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx2.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_dot_prod_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_avx.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_avx.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s
-
-erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_sse.asm.lo: erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s
-	$(AM_V_CCAS)$(LIBTOOL) $(AM_V_lt) $(libec_isa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(libec_isa_la_CCASFLAGS) $(CCASFLAGS) -c -o erasure-code/isa/isa-l/erasure_code/libec_isa_la-gf_vect_mul_sse.asm.lo `test -f 'erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s' || echo '$(srcdir)/'`erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -17510,18 +15276,14 @@ clean-libtool:
 	-rm -rf common/.libs common/_libs
 	-rm -rf crush/.libs crush/_libs
 	-rm -rf erasure-code/.libs erasure-code/_libs
-	-rm -rf erasure-code/isa/.libs erasure-code/isa/_libs
-	-rm -rf erasure-code/isa/isa-l/erasure_code/.libs erasure-code/isa/isa-l/erasure_code/_libs
 	-rm -rf erasure-code/jerasure/.libs erasure-code/jerasure/_libs
 	-rm -rf erasure-code/jerasure/gf-complete/src/.libs erasure-code/jerasure/gf-complete/src/_libs
 	-rm -rf erasure-code/jerasure/jerasure/src/.libs erasure-code/jerasure/jerasure/src/_libs
-	-rm -rf erasure-code/lrc/.libs erasure-code/lrc/_libs
 	-rm -rf global/.libs global/_libs
 	-rm -rf java/native/.libs java/native/_libs
 	-rm -rf json_spirit/.libs json_spirit/_libs
 	-rm -rf key_value_store/.libs key_value_store/_libs
 	-rm -rf librados/.libs librados/_libs
-	-rm -rf libradosstriper/.libs libradosstriper/_libs
 	-rm -rf librbd/.libs librbd/_libs
 	-rm -rf log/.libs log/_libs
 	-rm -rf mds/.libs mds/_libs
@@ -17532,11 +15294,9 @@ clean-libtool:
 	-rm -rf osd/.libs osd/_libs
 	-rm -rf osdc/.libs osdc/_libs
 	-rm -rf perfglue/.libs perfglue/_libs
-	-rm -rf rbd_replay/.libs rbd_replay/_libs
 	-rm -rf rgw/.libs rgw/_libs
 	-rm -rf test/erasure-code/.libs test/erasure-code/_libs
 	-rm -rf test/librados/.libs test/librados/_libs
-	-rm -rf test/libradosstriper/.libs test/libradosstriper/_libs
 	-rm -rf test/system/.libs test/system/_libs
 install-pythonPYTHON: $(python_PYTHON)
 	@$(NORMAL_INSTALL)
@@ -17663,24 +15423,6 @@ uninstall-rados_includeDATA:
 	@list='$(rados_include_DATA)'; test -n "$(rados_includedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(rados_includedir)'; $(am__uninstall_files_from_dir)
-install-radosstriper_includeDATA: $(radosstriper_include_DATA)
-	@$(NORMAL_INSTALL)
-	test -z "$(radosstriper_includedir)" || $(MKDIR_P) "$(DESTDIR)$(radosstriper_includedir)"
-	@list='$(radosstriper_include_DATA)'; test -n "$(radosstriper_includedir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(radosstriper_includedir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(radosstriper_includedir)" || exit $$?; \
-	done
-
-uninstall-radosstriper_includeDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(radosstriper_include_DATA)'; test -n "$(radosstriper_includedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(radosstriper_includedir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -17982,7 +15724,7 @@ install-binPROGRAMS: install-libLTLIBRARIES
 
 installdirs: installdirs-recursive
 installdirs-am:
-	for dir in "$(DESTDIR)$(erasure_codelibdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(radoslibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(su_sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(ceph_libexecdir)" "$(DESTDIR)$(ceph_sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(shell_commondir)" "$(DESTDIR)$(su_sbindir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(bash_completiondir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(libcephfs_includedir)" "$(DESTDIR)$(librbd_includ [...]
+	for dir in "$(DESTDIR)$(erasure_codelibdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(radoslibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(su_sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(ceph_sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(shell_commondir)" "$(DESTDIR)$(su_sbindir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(bash_completiondir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(libcephfs_includedir)" "$(DESTDIR)$(librbd_includedir)" "$(DESTDIR)$(rados_inclu [...]
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: $(BUILT_SOURCES)
@@ -18053,18 +15795,12 @@ distclean-generic:
 	-rm -f crush/$(am__dirstamp)
 	-rm -f erasure-code/$(DEPDIR)/$(am__dirstamp)
 	-rm -f erasure-code/$(am__dirstamp)
-	-rm -f erasure-code/isa/$(DEPDIR)/$(am__dirstamp)
-	-rm -f erasure-code/isa/$(am__dirstamp)
-	-rm -f erasure-code/isa/isa-l/erasure_code/$(DEPDIR)/$(am__dirstamp)
-	-rm -f erasure-code/isa/isa-l/erasure_code/$(am__dirstamp)
 	-rm -f erasure-code/jerasure/$(DEPDIR)/$(am__dirstamp)
 	-rm -f erasure-code/jerasure/$(am__dirstamp)
 	-rm -f erasure-code/jerasure/gf-complete/src/$(DEPDIR)/$(am__dirstamp)
 	-rm -f erasure-code/jerasure/gf-complete/src/$(am__dirstamp)
 	-rm -f erasure-code/jerasure/jerasure/src/$(DEPDIR)/$(am__dirstamp)
 	-rm -f erasure-code/jerasure/jerasure/src/$(am__dirstamp)
-	-rm -f erasure-code/lrc/$(DEPDIR)/$(am__dirstamp)
-	-rm -f erasure-code/lrc/$(am__dirstamp)
 	-rm -f global/$(DEPDIR)/$(am__dirstamp)
 	-rm -f global/$(am__dirstamp)
 	-rm -f java/native/$(DEPDIR)/$(am__dirstamp)
@@ -18075,8 +15811,6 @@ distclean-generic:
 	-rm -f key_value_store/$(am__dirstamp)
 	-rm -f librados/$(DEPDIR)/$(am__dirstamp)
 	-rm -f librados/$(am__dirstamp)
-	-rm -f libradosstriper/$(DEPDIR)/$(am__dirstamp)
-	-rm -f libradosstriper/$(am__dirstamp)
 	-rm -f librbd/$(DEPDIR)/$(am__dirstamp)
 	-rm -f librbd/$(am__dirstamp)
 	-rm -f log/$(DEPDIR)/$(am__dirstamp)
@@ -18101,8 +15835,6 @@ distclean-generic:
 	-rm -f perfglue/$(am__dirstamp)
 	-rm -f rbd_fuse/$(DEPDIR)/$(am__dirstamp)
 	-rm -f rbd_fuse/$(am__dirstamp)
-	-rm -f rbd_replay/$(DEPDIR)/$(am__dirstamp)
-	-rm -f rbd_replay/$(am__dirstamp)
 	-rm -f rgw/$(DEPDIR)/$(am__dirstamp)
 	-rm -f rgw/$(am__dirstamp)
 	-rm -f test/$(DEPDIR)/$(am__dirstamp)
@@ -18137,14 +15869,10 @@ distclean-generic:
 	-rm -f test/encoding/$(am__dirstamp)
 	-rm -f test/erasure-code/$(DEPDIR)/$(am__dirstamp)
 	-rm -f test/erasure-code/$(am__dirstamp)
-	-rm -f test/filestore/$(DEPDIR)/$(am__dirstamp)
-	-rm -f test/filestore/$(am__dirstamp)
 	-rm -f test/libcephfs/$(DEPDIR)/$(am__dirstamp)
 	-rm -f test/libcephfs/$(am__dirstamp)
 	-rm -f test/librados/$(DEPDIR)/$(am__dirstamp)
 	-rm -f test/librados/$(am__dirstamp)
-	-rm -f test/libradosstriper/$(DEPDIR)/$(am__dirstamp)
-	-rm -f test/libradosstriper/$(am__dirstamp)
 	-rm -f test/librbd/$(DEPDIR)/$(am__dirstamp)
 	-rm -f test/librbd/$(am__dirstamp)
 	-rm -f test/mon/$(DEPDIR)/$(am__dirstamp)
@@ -18163,8 +15891,6 @@ distclean-generic:
 	-rm -f test/system/$(am__dirstamp)
 	-rm -f tools/$(DEPDIR)/$(am__dirstamp)
 	-rm -f tools/$(am__dirstamp)
-	-rm -f tools/cephfs/$(DEPDIR)/$(am__dirstamp)
-	-rm -f tools/cephfs/$(am__dirstamp)
 	-rm -f tools/rados/$(DEPDIR)/$(am__dirstamp)
 	-rm -f tools/rados/$(am__dirstamp)
 
@@ -18182,7 +15908,7 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS \
 	clean-sbinPROGRAMS clean-su_sbinPROGRAMS mostlyclean-am
 
 distclean: distclean-recursive
-	-rm -rf ./$(DEPDIR) arch/$(DEPDIR) auth/$(DEPDIR) auth/cephx/$(DEPDIR) auth/none/$(DEPDIR) auth/unknown/$(DEPDIR) civetweb/src/$(DEPDIR) client/$(DEPDIR) cls/hello/$(DEPDIR) cls/lock/$(DEPDIR) cls/log/$(DEPDIR) cls/rbd/$(DEPDIR) cls/refcount/$(DEPDIR) cls/replica_log/$(DEPDIR) cls/rgw/$(DEPDIR) cls/statelog/$(DEPDIR) cls/user/$(DEPDIR) cls/version/$(DEPDIR) common/$(DEPDIR) crush/$(DEPDIR) erasure-code/$(DEPDIR) erasure-code/isa/$(DEPDIR) erasure-code/isa/isa-l/erasure_code/$(DEPDIR) er [...]
+	-rm -rf ./$(DEPDIR) arch/$(DEPDIR) auth/$(DEPDIR) auth/cephx/$(DEPDIR) auth/none/$(DEPDIR) auth/unknown/$(DEPDIR) civetweb/src/$(DEPDIR) client/$(DEPDIR) cls/hello/$(DEPDIR) cls/lock/$(DEPDIR) cls/log/$(DEPDIR) cls/rbd/$(DEPDIR) cls/refcount/$(DEPDIR) cls/replica_log/$(DEPDIR) cls/rgw/$(DEPDIR) cls/statelog/$(DEPDIR) cls/user/$(DEPDIR) cls/version/$(DEPDIR) common/$(DEPDIR) crush/$(DEPDIR) erasure-code/$(DEPDIR) erasure-code/jerasure/$(DEPDIR) erasure-code/jerasure/gf-complete/src/$(DEP [...]
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-hdr distclean-tags
@@ -18204,18 +15930,16 @@ install-data-am: install-bash_completionDATA install-ceph_sbinSCRIPTS \
 	install-erasure_codelibLTLIBRARIES \
 	install-libcephfs_includeDATA install-librbd_includeDATA \
 	install-pythonPYTHON install-rados_includeDATA \
-	install-radoslibLTLIBRARIES install-radosstriper_includeDATA \
-	install-shell_commonSCRIPTS install-su_sbinPROGRAMS \
-	install-su_sbinSCRIPTS
+	install-radoslibLTLIBRARIES install-shell_commonSCRIPTS \
+	install-su_sbinPROGRAMS install-su_sbinSCRIPTS
 
 install-dvi: install-dvi-recursive
 
 install-dvi-am:
 
 install-exec-am: install-binPROGRAMS install-binSCRIPTS \
-	install-ceph_libexecSCRIPTS install-dist_binSCRIPTS \
-	install-libLTLIBRARIES install-sbinPROGRAMS \
-	install-sbinSCRIPTS
+	install-dist_binSCRIPTS install-libLTLIBRARIES \
+	install-sbinPROGRAMS install-sbinSCRIPTS
 
 install-html: install-html-recursive
 
@@ -18238,7 +15962,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-	-rm -rf ./$(DEPDIR) arch/$(DEPDIR) auth/$(DEPDIR) auth/cephx/$(DEPDIR) auth/none/$(DEPDIR) auth/unknown/$(DEPDIR) civetweb/src/$(DEPDIR) client/$(DEPDIR) cls/hello/$(DEPDIR) cls/lock/$(DEPDIR) cls/log/$(DEPDIR) cls/rbd/$(DEPDIR) cls/refcount/$(DEPDIR) cls/replica_log/$(DEPDIR) cls/rgw/$(DEPDIR) cls/statelog/$(DEPDIR) cls/user/$(DEPDIR) cls/version/$(DEPDIR) common/$(DEPDIR) crush/$(DEPDIR) erasure-code/$(DEPDIR) erasure-code/isa/$(DEPDIR) erasure-code/isa/isa-l/erasure_code/$(DEPDIR) er [...]
+	-rm -rf ./$(DEPDIR) arch/$(DEPDIR) auth/$(DEPDIR) auth/cephx/$(DEPDIR) auth/none/$(DEPDIR) auth/unknown/$(DEPDIR) civetweb/src/$(DEPDIR) client/$(DEPDIR) cls/hello/$(DEPDIR) cls/lock/$(DEPDIR) cls/log/$(DEPDIR) cls/rbd/$(DEPDIR) cls/refcount/$(DEPDIR) cls/replica_log/$(DEPDIR) cls/rgw/$(DEPDIR) cls/statelog/$(DEPDIR) cls/user/$(DEPDIR) cls/version/$(DEPDIR) common/$(DEPDIR) crush/$(DEPDIR) erasure-code/$(DEPDIR) erasure-code/jerasure/$(DEPDIR) erasure-code/jerasure/gf-complete/src/$(DEP [...]
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -18256,16 +15980,15 @@ ps: ps-recursive
 ps-am:
 
 uninstall-am: uninstall-bash_completionDATA uninstall-binPROGRAMS \
-	uninstall-binSCRIPTS uninstall-ceph_libexecSCRIPTS \
-	uninstall-ceph_sbinSCRIPTS uninstall-dist_binSCRIPTS \
-	uninstall-docDATA uninstall-erasure_codelibLTLIBRARIES \
-	uninstall-libLTLIBRARIES uninstall-libcephfs_includeDATA \
-	uninstall-librbd_includeDATA uninstall-local \
-	uninstall-pythonPYTHON uninstall-rados_includeDATA \
-	uninstall-radoslibLTLIBRARIES \
-	uninstall-radosstriper_includeDATA uninstall-sbinPROGRAMS \
-	uninstall-sbinSCRIPTS uninstall-shell_commonSCRIPTS \
-	uninstall-su_sbinPROGRAMS uninstall-su_sbinSCRIPTS
+	uninstall-binSCRIPTS uninstall-ceph_sbinSCRIPTS \
+	uninstall-dist_binSCRIPTS uninstall-docDATA \
+	uninstall-erasure_codelibLTLIBRARIES uninstall-libLTLIBRARIES \
+	uninstall-libcephfs_includeDATA uninstall-librbd_includeDATA \
+	uninstall-local uninstall-pythonPYTHON \
+	uninstall-rados_includeDATA uninstall-radoslibLTLIBRARIES \
+	uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \
+	uninstall-shell_commonSCRIPTS uninstall-su_sbinPROGRAMS \
+	uninstall-su_sbinSCRIPTS
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
 	check-am ctags-recursive install install-am install-strip \
@@ -18283,34 +16006,32 @@ uninstall-am: uninstall-bash_completionDATA uninstall-binPROGRAMS \
 	distclean-hdr distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
 	install-bash_completionDATA install-binPROGRAMS \
-	install-binSCRIPTS install-ceph_libexecSCRIPTS \
-	install-ceph_sbinSCRIPTS install-data install-data-am \
-	install-data-local install-dist_binSCRIPTS install-docDATA \
-	install-dvi install-dvi-am install-erasure_codelibLTLIBRARIES \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-libLTLIBRARIES \
+	install-binSCRIPTS install-ceph_sbinSCRIPTS install-data \
+	install-data-am install-data-local install-dist_binSCRIPTS \
+	install-docDATA install-dvi install-dvi-am \
+	install-erasure_codelibLTLIBRARIES install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES \
 	install-libcephfs_includeDATA install-librbd_includeDATA \
 	install-man install-pdf install-pdf-am install-ps \
 	install-ps-am install-pythonPYTHON install-rados_includeDATA \
-	install-radoslibLTLIBRARIES install-radosstriper_includeDATA \
-	install-sbinPROGRAMS install-sbinSCRIPTS \
-	install-shell_commonSCRIPTS install-strip \
+	install-radoslibLTLIBRARIES install-sbinPROGRAMS \
+	install-sbinSCRIPTS install-shell_commonSCRIPTS install-strip \
 	install-su_sbinPROGRAMS install-su_sbinSCRIPTS installcheck \
 	installcheck-am installdirs installdirs-am maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-recursive uninstall uninstall-am \
 	uninstall-bash_completionDATA uninstall-binPROGRAMS \
-	uninstall-binSCRIPTS uninstall-ceph_libexecSCRIPTS \
-	uninstall-ceph_sbinSCRIPTS uninstall-dist_binSCRIPTS \
-	uninstall-docDATA uninstall-erasure_codelibLTLIBRARIES \
-	uninstall-libLTLIBRARIES uninstall-libcephfs_includeDATA \
-	uninstall-librbd_includeDATA uninstall-local \
-	uninstall-pythonPYTHON uninstall-rados_includeDATA \
-	uninstall-radoslibLTLIBRARIES \
-	uninstall-radosstriper_includeDATA uninstall-sbinPROGRAMS \
-	uninstall-sbinSCRIPTS uninstall-shell_commonSCRIPTS \
-	uninstall-su_sbinPROGRAMS uninstall-su_sbinSCRIPTS
+	uninstall-binSCRIPTS uninstall-ceph_sbinSCRIPTS \
+	uninstall-dist_binSCRIPTS uninstall-docDATA \
+	uninstall-erasure_codelibLTLIBRARIES uninstall-libLTLIBRARIES \
+	uninstall-libcephfs_includeDATA uninstall-librbd_includeDATA \
+	uninstall-local uninstall-pythonPYTHON \
+	uninstall-rados_includeDATA uninstall-radoslibLTLIBRARIES \
+	uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \
+	uninstall-shell_commonSCRIPTS uninstall-su_sbinPROGRAMS \
+	uninstall-su_sbinSCRIPTS
 
 
 # python unit tests need to know where the scripts are located
@@ -18325,23 +16046,6 @@ export PYTHONPATH=$(top_srcdir)/src/pybind
 #	$(srcdir)/crush/mapper.h \
 #	$(srcdir)/crush/types.h
 
-erasure-code/jerasure/ErasureCodePluginJerasure.cc: ./ceph_ver.h
-
-erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc: ./ceph_ver.h
-
-erasure-code/lrc/ErasureCodePluginLrc.cc: ./ceph_ver.h
-
- at WITH_BETTER_YASM_ELF64_TRUE@erasure-code/isa/ErasureCodePluginIsa.cc: ./ceph_ver.h
-erasure-code/ErasureCodePlugin.cc: ./ceph_ver.h
-test/erasure-code/ErasureCodePluginExample.cc: ./ceph_ver.h
-test/erasure-code/ErasureCodePluginMissingEntryPoint.cc: ./ceph_ver.h
-test/erasure-code/ErasureCodePluginHangs.cc: ./ceph_ver.h
-test/erasure-code/ErasureCodePluginFailToInitialize.cc: ./ceph_ver.h
-test/erasure-code/ErasureCodePluginFailToRegister.cc: ./ceph_ver.h
-test/erasure-code/TestJerasurePluginSSE4.cc: ./ceph_ver.h
-test/erasure-code/TestJerasurePluginSSE3.cc: ./ceph_ver.h
-test/erasure-code/TestJerasurePluginGeneric.cc: ./ceph_ver.h
-
 # target to build but not run the unit tests
 unittests:: $(check_PROGRAMS)
 $(shell_scripts): Makefile
@@ -18357,6 +16061,7 @@ $(shell_scripts): %: %.in
 docdir ?= ${datadir}/doc/ceph
 
 check-local:
+	$(top_srcdir)/qa/workunits/erasure-code/encode-decode-non-regression.sh 
 	$(srcdir)/test/encoding/readable.sh ../ceph-object-corpus
 
 # base targets
@@ -18366,7 +16071,7 @@ admin-tools: monmaptool osdmaptool crushtool ceph-authtool
 base: core-daemons admin-tools \
 	cephfs ceph-syn ceph-conf \
 	rados librados-config \
-	init-ceph ceph_mon_store_converter ceph-post-file
+	init-ceph mkcephfs ceph_mon_store_converter ceph-post-file
 
 # version stuff
 
diff --git a/src/acconfig.h.in b/src/acconfig.h.in
index 7c38745..bed7a05 100644
--- a/src/acconfig.h.in
+++ b/src/acconfig.h.in
@@ -27,24 +27,12 @@
 /* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
 #undef HAVE_ARPA_NAMESER_COMPAT_H
 
-/* Define to 1 if you have the <babeltrace/babeltrace.h> header file. */
-#undef HAVE_BABELTRACE_BABELTRACE_H
-
-/* Define to 1 if you have the <babeltrace/ctf/events.h> header file. */
-#undef HAVE_BABELTRACE_CTF_EVENTS_H
-
-/* yasm can also build the isa-l */
-#undef HAVE_BETTER_YASM_ELF64
-
 /* have boost::random::discrete_distribution */
 #undef HAVE_BOOST_RANDOM_DISCRETE_DISTRIBUTION
 
 /* Define if have curl_multi_wait() */
 #undef HAVE_CURL_MULTI_WAIT
 
-/* define if the compiler supports basic C++11 syntax */
-#undef HAVE_CXX11
-
 /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
    don't. */
 #undef HAVE_DECL_STRERROR_R
@@ -86,9 +74,6 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Defined if you have kinetic enabled */
-#undef HAVE_KINETIC
-
 /* Defined if LevelDB supports bloom filters */
 #undef HAVE_LEVELDB_FILTER_POLICY
 
@@ -123,9 +108,6 @@
 /* Define to 1 if you have the `profiler' library (-lprofiler). */
 #undef HAVE_LIBPROFILER
 
-/* Defined if you have librocksdb enabled */
-#undef HAVE_LIBROCKSDB
-
 /* Define if you have tcmalloc */
 #undef HAVE_LIBTCMALLOC
 
@@ -397,14 +379,5 @@
 /* Version number of package */
 #undef VERSION
 
-/* Define if you want to use Babeltrace */
-#undef WITH_BABELTRACE
-
-/* Define if you want to use LTTng */
-#undef WITH_LTTNG
-
 /* define if radosgw enabled */
 #undef WITH_RADOSGW
-
-/* LTTng is disabled, so define this macro to be nothing. */
-#undef tracepoint
diff --git a/src/auth/Auth.h b/src/auth/Auth.h
index 2d89a03..0adc900 100644
--- a/src/auth/Auth.h
+++ b/src/auth/Auth.h
@@ -164,7 +164,7 @@ struct ExpiringCryptoKey {
     ::decode(expiration, bl);
   }
 };
-WRITE_CLASS_ENCODER(ExpiringCryptoKey)
+WRITE_CLASS_ENCODER(ExpiringCryptoKey);
 
 static inline ostream& operator<<(ostream& out, const ExpiringCryptoKey& c)
 {
@@ -226,7 +226,7 @@ struct RotatingSecrets {
 
   void dump();
 };
-WRITE_CLASS_ENCODER(RotatingSecrets)
+WRITE_CLASS_ENCODER(RotatingSecrets);
 
 
 
diff --git a/src/auth/Crypto.h b/src/auth/Crypto.h
index c811222..f0fc97b 100644
--- a/src/auth/Crypto.h
+++ b/src/auth/Crypto.h
@@ -99,7 +99,7 @@ public:
 
   void to_str(std::string& s) const;
 };
-WRITE_CLASS_ENCODER(CryptoKey)
+WRITE_CLASS_ENCODER(CryptoKey);
 
 static inline ostream& operator<<(ostream& out, const CryptoKey& k)
 {
diff --git a/src/auth/cephx/CephxKeyServer.h b/src/auth/cephx/CephxKeyServer.h
index 250331d..bc30fef 100644
--- a/src/auth/cephx/CephxKeyServer.h
+++ b/src/auth/cephx/CephxKeyServer.h
@@ -180,8 +180,8 @@ struct KeyServerData {
   }
 
 };
-WRITE_CLASS_ENCODER(KeyServerData)
-WRITE_CLASS_ENCODER(KeyServerData::Incremental)
+WRITE_CLASS_ENCODER(KeyServerData);
+WRITE_CLASS_ENCODER(KeyServerData::Incremental);
 
 
 
@@ -302,7 +302,7 @@ public:
   map<EntityName, EntityAuth>::iterator secrets_end()
   { return data.secrets_end(); }
 };
-WRITE_CLASS_ENCODER(KeyServer)
+WRITE_CLASS_ENCODER(KeyServer);
 
 
 #endif
diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h
index d72a23d..8a3e094 100644
--- a/src/auth/cephx/CephxProtocol.h
+++ b/src/auth/cephx/CephxProtocol.h
@@ -111,7 +111,7 @@ struct CephXServerChallenge {
     ::decode(server_challenge, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXServerChallenge)
+WRITE_CLASS_ENCODER(CephXServerChallenge);
 
 
 // request/reply headers, for subsequent exchanges.
@@ -126,7 +126,7 @@ struct CephXRequestHeader {
     ::decode(request_type, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXRequestHeader)
+WRITE_CLASS_ENCODER(CephXRequestHeader);
 
 struct CephXResponseHeader {
   uint16_t request_type;
@@ -141,7 +141,7 @@ struct CephXResponseHeader {
     ::decode(status, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXResponseHeader)
+WRITE_CLASS_ENCODER(CephXResponseHeader);
 
 struct CephXTicketBlob {
   uint64_t secret_id;
@@ -163,7 +163,7 @@ struct CephXTicketBlob {
     ::decode(blob, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXTicketBlob)
+WRITE_CLASS_ENCODER(CephXTicketBlob);
 
 // client -> server response to challenge
 struct CephXAuthenticate {
@@ -248,7 +248,7 @@ struct CephXServiceTicketRequest {
     ::decode(keys, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXServiceTicketRequest)
+WRITE_CLASS_ENCODER(CephXServiceTicketRequest);
 
 
 /*
@@ -268,7 +268,7 @@ struct CephXAuthorizeReply {
     ::decode(nonce_plus_one, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXAuthorizeReply)
+WRITE_CLASS_ENCODER(CephXAuthorizeReply);
 
 
 struct CephXAuthorizer : public AuthAuthorizer {
@@ -365,7 +365,7 @@ struct CephXServiceTicket {
     ::decode(validity, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXServiceTicket)
+WRITE_CLASS_ENCODER(CephXServiceTicket);
 
 /* B */
 struct CephXServiceTicketInfo {
@@ -385,7 +385,7 @@ struct CephXServiceTicketInfo {
     ::decode(session_key, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXServiceTicketInfo)
+WRITE_CLASS_ENCODER(CephXServiceTicketInfo);
 
 struct CephXAuthorize {
   uint64_t nonce;
@@ -400,7 +400,7 @@ struct CephXAuthorize {
     ::decode(nonce, bl);
   }
 };
-WRITE_CLASS_ENCODER(CephXAuthorize)
+WRITE_CLASS_ENCODER(CephXAuthorize);
 
 /*
  * Decode an extract ticket
diff --git a/src/bash_completion/ceph b/src/bash_completion/ceph
index eef885d..2ea53c6 100644
--- a/src/bash_completion/ceph
+++ b/src/bash_completion/ceph
@@ -16,7 +16,6 @@ _ceph()
         COMPREPLY=()
         cur="${COMP_WORDS[COMP_CWORD]}"
         prev="${COMP_WORDS[COMP_CWORD-1]}"
-        prevprev="${COMP_WORDS[COMP_CWORD-2]}"
 
         if [[ ${cur} == -* ]] ; then
             COMPREPLY=( $(compgen -W "--conf -c --name --id -m --version -s --status -w --watch -o --out-file -i --in-file" -- ${cur}) )
@@ -33,41 +32,29 @@ _ceph()
                 return 0
                 ;;
             auth)
-                COMPREPLY=( $(compgen -W "list add del print_key print-key export get get-key import get-or-create get-or-create-key" -- ${cur}) )
+                COMPREPLY=( $(compgen -W "list add del" -- ${cur}) )
                 return 0
                 ;;
             pg)
-                COMPREPLY=( $(compgen -W "stat dump dump_json dump_stuck force_create_pg getmap map send_pg_creates scrub deep-scrub repair" -- ${cur}) )
+                COMPREPLY=( $(compgen -W "stat dump getmap map send_pg_creates scrub deep-scrub repair" -- ${cur}) )
                 return 0
                 ;;
             osd)
-                COMPREPLY=( $(compgen -W "stat pool dump getmaxosd tree getmap getcrushmap lspools reweight-by-utilization trash tier" -- ${cur}) )
+                COMPREPLY=( $(compgen -W "tell stat pool dump getmaxosd tree getmap getcrushmap lspools" -- ${cur}) )
                 return 0
                 ;;
             mon)
-                COMPREPLY=( $(compgen -W "stat getmap add remove dump" -- ${cur}) )
+                COMPREPLY=( $(compgen -W "tell stat getmap" -- ${cur}) )
                 return 0
                 ;;
             mds)
-                COMPREPLY=( $(compgen -W "stat stat getmap dump compat" -- ${cur}) )
+                COMPREPLY=( $(compgen -W "tell stat stat getmap dump compat" -- ${cur}) )
                 return 0
                 ;;
-            pool)
-                COMPREPLY=( $(compgen -W "create delete rename stats set set-quota get rmsnap mksnap" -- ${cur}) )
+            *)
+                COMPREPLY=( $(compgen -W "osd mon mds pg auth" -- ${cur}) )
                 return 0
-                ;;
-            health)
-                COMPREPLY=( $(compgen -W "detail" -- ${cur}) )
-                return 0
-                ;;
-            tier)
-                COMPREPLY=( $(compgen -W "remove cache-mode" -- ${cur}) )
-                return 0
-                ;;
-            ceph)
-                COMPREPLY=( $(compgen -W "osd mon mds pg auth health df" -- ${cur}) )
-                return 0
-                ;;
+            ;;
         esac
 }
 complete -F _ceph ceph
diff --git a/src/bash_completion/rados b/src/bash_completion/rados
index a1bf3f0..aa277c3 100644
--- a/src/bash_completion/rados
+++ b/src/bash_completion/rados
@@ -31,7 +31,7 @@ _rados()
                 COMPREPLY=( $(compgen -A hostname ${cur}) )
                 return 0
                 ;;
-            rados)
+            *)
                 COMPREPLY=( $(compgen -W "lspools mkpool rmpool df ls chown get put create rm listxattr getxattr setxattr rmxattr stat mapext lssnap mksnap rmsnap rollback bench" -- ${cur}) )
                 return 0
             ;;
diff --git a/src/bash_completion/rbd b/src/bash_completion/rbd
index 5e9a733..7fe8bee 100644
--- a/src/bash_completion/rbd
+++ b/src/bash_completion/rbd
@@ -32,15 +32,11 @@ _rbd()
                 return 0
                 ;;
             snap)
-                COMPREPLY=( $(compgen -W "ls create rollback rm purge protect unprotect" -- ${cur}) )
+                COMPREPLY=( $(compgen -W "ls create rollback rm" -- ${cur}) )
                 return 0
                 ;;
-            lock)
-                COMPREPLY=( $(compgen -W "list add remove" -- ${cur}) )
-                return 0
-                ;;
-            rbd)
-                COMPREPLY=( $(compgen -W "ls list info create clone flatten resize rm export import diff export-diff import-diff cp copy mv rename snap watch lock bench-write map unmap showmapped" -- ${cur}) )
+            *)
+                COMPREPLY=( $(compgen -W "ls list info create resize rm export import cp copy mv rename snap watch map unmap showmapped" -- ${cur}) )
                 return 0
             ;;
         esac
diff --git a/src/brag/client/ceph-brag b/src/brag/client/ceph-brag
index ba785e3..9ae8e5a 100755
--- a/src/brag/client/ceph-brag
+++ b/src/brag/client/ceph-brag
@@ -15,8 +15,6 @@ from itertools import repeat, ifilter
 CLUSTER_UUID_NAME='cluster-uuid'
 CLUSTER_OWNERSHIP_NAME='cluster-ownership'
 
-verbose = False
-
 
 class Counter(dict):
     '''Dict subclass for counting hashable objects.  Sometimes called a bag
@@ -201,8 +199,6 @@ class Counter(dict):
 
 
 def run_command(cmd):
-  if verbose:
-    print "run_command: " + str(cmd)
   child = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                        stderr=subprocess.PIPE)
   (o, e) = child.communicate()
@@ -328,6 +324,7 @@ def get_sysinfo(max_osds):
 
   incr = lambda a,k: 1 if k not in a else a[k]+1
   while count < max_osds:
+    meta = {'id':count}
     (rc, o, e) = run_command(['ceph', 'osd', 'metadata', str(count)])
     if rc is 0:
       if osd_metadata_available is False:
@@ -353,7 +350,7 @@ def get_sysinfo(max_osds):
         dstr += jmeta['distro_codename'] + ' ('
         dstr += jmeta['distro_description'] + ')'
         distro[dstr] = incr(distro, dstr)
-      except KeyError:
+      except KeyError as ke:
         pass
 
       cpu[jmeta['cpu']] = incr(cpu, jmeta['cpu'])
@@ -413,11 +410,7 @@ def describe_usage():
   print >> sys.stderr, "Usage:"
   print >> sys.stderr, "======\n"
 
-  print >> sys.stderr, sys.argv[0] + " [-v|--verbose] [<commands> [command-options]]\n"
-  print >> sys.stderr, "without any option, shows the data to be published and do nothing"
-  print >> sys.stderr, ""
-  print >> sys.stderr, "-v|--verbose: toggle verbose output on stdout"
-  print >> sys.stderr, ""
+  print >> sys.stderr, sys.argv[0] + " <commands> [command-options]\n"
   print >> sys.stderr, "commands:"
   print >> sys.stderr, "publish - publish the brag report to the server"
   print >> sys.stderr, "update-metadata <update-metadata-options> - Update"
@@ -472,8 +465,6 @@ def publish():
     print >> sys.stderr, "Cannot publish until a URL is set using update-metadata"
     return 1
 
-  if verbose:
-    print "PUT " + str(url) + " : " + str(data)
   req = requests.put(url, data=data)
   if req.status_code is not 201:
     print >> sys.stderr, "Failed to publish, server responded with code " + str(req.status_code)
@@ -493,7 +484,7 @@ def unpublish():
     fail = True
   try:
     url = owner['url']
-  except KeyError:
+  except KeyError as e:
     fail = True
 
   if fail:
@@ -511,14 +502,10 @@ def unpublish():
   return 0
 
 def main():
-  if len(sys.argv) > 1 and ( sys.argv[1] == '--verbose' or sys.argv[1] == '-v' ):
-    global verbose
-    verbose = True
-    sys.argv.pop(1)
   if len(sys.argv) is 1:
     print output_json()[0]
     return 0
-  if sys.argv[1] == 'update-metadata':
+  elif sys.argv[1] == 'update-metadata':
     return update_metadata()
   elif sys.argv[1] == 'clear-metadata':
     return clear_metadata()
diff --git a/src/brag/server/ceph_brag/controllers/root.py b/src/brag/server/ceph_brag/controllers/root.py
index ae1d8ec..254ab86 100644
--- a/src/brag/server/ceph_brag/controllers/root.py
+++ b/src/brag/server/ceph_brag/controllers/root.py
@@ -45,12 +45,12 @@ class RootController(RestController):
         try:
             db.put_new_version(request.body)
         except ValueError as ve:
-            return self.fail(status_code=422, msg="Improper payload : " + str(ve))
+            return self.fail(status_code=422, msg="Improper payload")
         except KeyError as ke:
-            msg = "Payload not as expected, some keys are missing : " + str(ke)
+            msg = "Payload not as expected, some keys are missing"
             return self.fail(status_code=422, msg=msg)
         except Exception as e:
-            return self.fail(status_code=500, msg="Internal Server Error : " + str(e))
+            return self.fail(status_code=500, msg="Internal Server Error")
        
         response.status = 201
         return "CREATED"
diff --git a/src/ceph-disk b/src/ceph-disk
index 90f706f..6bd0220 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -791,11 +791,13 @@ def get_or_create_dmcrypt_key(
     # make a new key
     try:
         if not os.path.exists(key_dir):
-            os.makedirs(key_dir)
+            os.makedirs(key_dir, stat.S_IRUSR|stat.S_IWUSR|stat.S_IXUSR)
         with file('/dev/urandom', 'rb') as i:
             key = i.read(256)
-            with file(path, 'wb') as key_file:
-                key_file.write(key)
+            fd = os.open(path, os.O_WRONLY|os.O_CREAT,
+                         stat.S_IRUSR|stat.S_IWUSR)
+            assert os.write(fd, key) == len(key)
+            os.close(fd)
         return path
     except:
         raise Error('unable to read or create dm-crypt key', path)
@@ -968,6 +970,35 @@ def get_free_partition_index(dev):
     return num
 
 
+def update_partition(action, dev, description):
+     # try to make sure the kernel refreshes the table.  note
+     # that if this gets ebusy, we are probably racing with
+     # udev because it already updated it.. ignore failure here.
+
+     # On RHEL and CentOS distros, calling partprobe forces a reboot of the
+     # server. Since we are not resizing partitons so we rely on calling
+     # partx
+     if platform_distro().startswith(('centos', 'red', 'scientific')):
+         LOG.info('calling partx on %s device %s', description, dev)
+         LOG.info('re-reading known partitions will display errors')
+         command(
+             [
+                 'partx',
+                 action,
+                 dev,
+             ],
+         )
+
+     else:
+         LOG.debug('Calling partprobe on %s device %s', description, dev)
+         command(
+             [
+                 'partprobe',
+                 dev,
+             ],
+         )
+
+
 def zap(dev):
     """
     Destroy the partition table and content of a given disk.
@@ -993,6 +1024,9 @@ def zap(dev):
                 dev,
             ],
         )
+
+        update_partition('-d', dev, 'zapped')
+
     except subprocess.CalledProcessError as e:
         raise Error(e)
 
@@ -1068,32 +1102,7 @@ def prepare_journal_dev(
             ],
         )
 
-        # try to make sure the kernel refreshes the table.  note
-        # that if this gets ebusy, we are probably racing with
-        # udev because it already updated it.. ignore failure here.
-
-        # On RHEL and CentOS distros, calling partprobe forces a reboot of the
-        # server. Since we are not resizing partitons so we rely on calling
-        # partx
-        if platform_distro().startswith(('centos', 'red', 'scientific')):
-            LOG.info('calling partx on prepared device %s', journal)
-            LOG.info('re-reading known partitions will display errors')
-            command(
-                [
-                    'partx',
-                    '-a',
-                    journal,
-                    ],
-                )
-
-        else:
-            LOG.debug('Calling partprobe on prepared device %s', journal)
-            command(
-                [
-                    'partprobe',
-                    journal,
-                    ],
-                )
+        update_partition('-a', journal, 'prepared')
 
         # wait for udev event queue to clear
         command(
@@ -1118,7 +1127,6 @@ def prepare_journal_dev(
     except subprocess.CalledProcessError as e:
         raise Error(e)
 
-
 def prepare_journal_file(
     journal):
 
@@ -1279,12 +1287,7 @@ def prepare_dev(
                     data,
                 ],
             )
-            command(
-                [
-                    'partprobe',
-                    data,
-                    ],
-                )
+            update_partition('-a', data, 'created')
             command(
                 [
                     # wait for udev event queue to clear
@@ -1368,10 +1371,9 @@ def main_prepare(args):
         prepare_lock.acquire()  # noqa
         if not os.path.exists(args.data):
             if args.data_dev:
-                raise Error('data path for device does not exist', args.data)
-            if args.data_dir:
-                raise Error('data path for directory does not exist', args.data)
-            raise Error('data path does not exist', args.data)
+                raise Error('data path does not exist', args.data)
+            else:
+                os.mkdir(args.data)
 
         # in use?
         dmode = os.stat(args.data).st_mode
@@ -1501,33 +1503,7 @@ def main_prepare(args):
         prepare_lock.release()  # noqa
 
         if stat.S_ISBLK(dmode):
-            # try to make sure the kernel refreshes the table.  note
-            # that if this gets ebusy, we are probably racing with
-            # udev because it already updated it.. ignore failure here.
-
-            # On RHEL and CentOS distros, calling partprobe forces a reboot of
-            # the server. Since we are not resizing partitons so we rely on
-            # calling partx
-            if platform_distro().startswith(('centos', 'red', 'scientific')):
-                LOG.info('calling partx on prepared device %s', args.data)
-                LOG.info('re-reading known partitions will display errors')
-
-                command(
-                    [
-                        'partx',
-                        '-a',
-                        args.data,
-                        ],
-                    )
-
-            else:
-                LOG.debug('Calling partprobe on prepared device %s', args.data)
-                command(
-                    [
-                        'partprobe',
-                        args.data,
-                        ],
-                    )
+            update_partition('-a', args.data, 'prepared')
 
     except Error as e:
         if journal_dm_keypath:
diff --git a/src/ceph-osd-prestart.sh b/src/ceph-osd-prestart.sh
deleted file mode 100644
index 77153c9..0000000
--- a/src/ceph-osd-prestart.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-eval set -- "$(getopt -o i: --long id:,cluster: -- $@)"
-
-while true ; do
-	case "$1" in
-		-i|--id) id=$2; shift 2 ;;
-		--cluster) cluster=$2; shift 2 ;;
-		--) shift ; break ;;
-	esac
-done
-
-if [ -z "$id"  ]; then
-    echo "Usage: $0 [OPTIONS]"
-    echo "--id/-i ID        set ID portion of my name"
-    echo "--cluster NAME    set cluster name (default: ceph)"
-    exit 1;
-fi
-
-update="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_update_on_start || :)"
-
-if [ "${update:-1}" = "1" -o "${update:-1}" = "true" ]; then
-    # update location in crush
-    hook="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_location_hook || :)"
-    if [ -z "$hook" ]; then
-        hook="/usr/bin/ceph-crush-location"
-    fi
-    location="$($hook --cluster ${cluster:-ceph} --id $id --type osd)"
-    weight="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_initial_weight || :)"
-    defaultweight=`df -P -k /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'`
-    ceph \
-        --cluster="${cluster:-ceph}" \
-        --name="osd.$id" \
-        --keyring="/var/lib/ceph/osd/${cluster:-ceph}-$id/keyring" \
-        osd crush create-or-move \
-        -- \
-        "$id" \
-        "${weight:-${defaultweight:-1}}" \
-        $location
-fi
-
-journal="/var/lib/ceph/osd/${cluster:-ceph}-$id/journal"
-if [ -L "$journal" -a ! -e "$journal" ]; then
-    udevadm settle --timeout=5 || :
-    if [ -L "$journal" -a ! -e "$journal" ]; then
-        echo "ceph-osd($UPSTART_INSTANCE): journal not present, not starting yet." 1>&2
-        stop
-        exit 0
-    fi
-fi
diff --git a/src/ceph.in b/src/ceph.in
index 4cc5c42..c5b97ef 100755
--- a/src/ceph.in
+++ b/src/ceph.in
@@ -20,7 +20,6 @@ Foundation.  See file COPYING.
 
 import os
 import sys
-import platform
 
 # Make life easier on developers:
 # If in src/, and .libs and pybind exist here, assume we're running
@@ -34,20 +33,14 @@ DEVMODEMSG = '*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH *
 if MYDIR.endswith('src') and \
    os.path.exists(os.path.join(MYDIR, '.libs')) and \
    os.path.exists(os.path.join(MYDIR, 'pybind')):
-
-    if platform.system() == "Darwin":
-        lib_path_var = "DYLD_LIBRARY_PATH"
-    else:
-        lib_path_var = "LD_LIBRARY_PATH"
-
     MYLIBPATH = os.path.join(MYDIR, '.libs')
-    if lib_path_var in os.environ:
-        if MYLIBPATH not in os.environ[lib_path_var]:
-            os.environ[lib_path_var] += ':' + MYLIBPATH
+    if 'LD_LIBRARY_PATH' in os.environ:
+        if MYLIBPATH not in os.environ['LD_LIBRARY_PATH']:
+            os.environ['LD_LIBRARY_PATH'] += ':' + MYLIBPATH
             print >> sys.stderr, DEVMODEMSG
             os.execvp('python', ['python'] + sys.argv)
     else:
-        os.environ[lib_path_var] = MYLIBPATH
+        os.environ['LD_LIBRARY_PATH'] = MYLIBPATH
         print >> sys.stderr, DEVMODEMSG
         os.execvp('python', ['python'] + sys.argv)
     sys.path.insert(0, os.path.join(MYDIR, 'pybind'))
@@ -378,8 +371,6 @@ def ceph_conf(parsed_args, field, name):
         raise RuntimeError('unable to get conf option %s for %s: %s' % (field, name, errdata))
     return outdata.rstrip()
 
-PROMPT = 'ceph> '
-
 def new_style_command(parsed_args, cmdargs, target, sigdict, inbuf, verbose):
     """
     Do new-style command dance.
@@ -410,14 +401,8 @@ def new_style_command(parsed_args, cmdargs, target, sigdict, inbuf, verbose):
             # do the command-interpreter looping
             # for raw_input to do readline cmd editing
             import readline
-
-            if sys.stdin.isatty():
-                prompt = PROMPT
-            else:
-                prompt = ''
-
             while True:
-                interactive_input = raw_input(prompt)
+                interactive_input = raw_input('ceph> ')
                 if interactive_input in ['q', 'quit', 'Q']:
                     return 0, '', ''
                 cmdargs = parse_cmdargs(interactive_input.split())[2]
@@ -856,4 +841,8 @@ def main():
     return 0
 
 if __name__ == '__main__':
-    sys.exit(main())
+    retval = main()
+    # shutdown explicitly; Rados() does not
+    if cluster_handle:
+        cluster_handle.shutdown()
+    sys.exit(retval)
diff --git a/src/ceph_fuse.cc b/src/ceph_fuse.cc
index f6a421b..54616f6 100644
--- a/src/ceph_fuse.cc
+++ b/src/ceph_fuse.cc
@@ -134,12 +134,6 @@ int main(int argc, const char **argv, const char *envp[]) {
 
     cfuse = new CephFuse(client, fd[1]);
 
-    r = cfuse->init(newargc, newargv);
-    if (r != 0) {
-      cerr << "ceph-fuse[" << getpid() << "]: fuse failed to initialize" << std::endl;
-      goto out_messenger_start_failed;
-    }
-
     cout << "ceph-fuse[" << getpid() << "]: starting ceph client" << std::endl;
     r = messenger->start();
     if (r < 0) {
@@ -154,8 +148,6 @@ int main(int argc, const char **argv, const char *envp[]) {
       goto out_init_failed;
     }
     
-    client->update_metadata("mount_point", cfuse->get_mount_point());
-
     // start up fuse
     // use my argc, argv (make sure you pass a mount point!)
     r = client->mount(g_conf->client_mountpoint.c_str());
@@ -164,9 +156,9 @@ int main(int argc, const char **argv, const char *envp[]) {
       goto out_shutdown;
     }
 
-    r = cfuse->start();
+    r = cfuse->init(newargc, newargv);
     if (r != 0) {
-      cerr << "ceph-fuse[" << getpid() << "]: fuse failed to start" << std::endl;
+      cerr << "ceph-fuse[" << getpid() << "]: fuse failed to initialize" << std::endl;
       goto out_client_unmount;
     }
     cerr << "ceph-fuse[" << getpid() << "]: starting fuse" << std::endl;
diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc
index b1ab386..1f1fbd3 100644
--- a/src/ceph_mds.cc
+++ b/src/ceph_mds.cc
@@ -27,6 +27,8 @@ using namespace std;
 
 #include "mon/MonMap.h"
 #include "mds/MDS.h"
+#include "mds/Dumper.h"
+#include "mds/Resetter.h"
 
 #include "msg/Messenger.h"
 
@@ -53,14 +55,65 @@ void usage()
        << "        connect to monitor at given address\n"
        << "  --debug_mds n\n"
        << "        debug MDS level (e.g. 10)\n"
+       << "  --dump-journal rank filename\n"
+       << "        dump the MDS journal (binary) for rank.\n"
+       << "  --dump-journal-entries rank filename\n"
+       << "        dump the MDS journal (JSON) for rank.\n"
        << "  --journal-check rank\n"
        << "        replay the journal for rank, then exit\n"
        << "  --hot-standby rank\n"
        << "        start up as a hot standby for rank\n"
+       << "  --reset-journal rank\n"
+       << "        discard the MDS journal for rank, and replace it with a single\n"
+       << "        event that updates/resets inotable and sessionmap on replay.\n"
        << dendl;
   generic_server_usage();
 }
 
+static int do_cmds_special_action(const std::string &action,
+				  const std::string &dump_file, int rank)
+{
+  common_init_finish(g_ceph_context, CINIT_FLAG_NO_DAEMON_ACTIONS);
+
+  if (action == "dump-journal") {
+    dout(0) << "dumping journal for mds." << rank << " to " << dump_file << dendl;
+    Dumper journal_dumper;
+    journal_dumper.init(rank);
+    journal_dumper.dump(dump_file.c_str());
+    journal_dumper.shutdown();
+  } else if (action == "dump-journal-entries") {
+    Dumper journal_dumper;
+    journal_dumper.init(rank);
+    journal_dumper.dump_entries();
+    journal_dumper.shutdown();
+  } else if (action == "undump-journal") {
+    dout(0) << "undumping journal for mds." << rank << " from " << dump_file << dendl;
+    Dumper journal_dumper;
+    journal_dumper.init(rank);
+    journal_dumper.undump(dump_file.c_str());
+    journal_dumper.shutdown();
+  } else if (action == "reset-journal") {
+    dout(0) << "resetting journal" << dendl;
+    Resetter resetter;
+    resetter.init(rank);
+    resetter.reset();
+    resetter.shutdown();
+  } else {
+    assert(0);
+  }
+  return 0;
+}
+
+static void set_special_action(std::string &dest, const std::string &act)
+{
+  if (!dest.empty()) {
+    derr << "Parse error! Can't specify more than one action. You "
+	 << "specified both " << act << " and " << dest << "\n" << dendl;
+    usage();
+    exit(1);
+  }
+  dest = act;
+}
 
 static int parse_rank(const char *opt_name, const std::string &val)
 {
@@ -94,7 +147,8 @@ int main(int argc, const char **argv)
   global_init(NULL, args, CEPH_ENTITY_TYPE_MDS, CODE_ENVIRONMENT_DAEMON, 0);
 
   // mds specific args
-  MDSMap::DaemonState shadow = MDSMap::STATE_NULL;
+  int shadow = 0;
+  int rank = -1;
   std::string dump_file;
 
   std::string val, action;
@@ -102,9 +156,39 @@ int main(int argc, const char **argv)
     if (ceph_argparse_double_dash(args, i)) {
       break;
     }
+    else if (ceph_argparse_witharg(args, i, &val, "--dump-journal", (char*)NULL)) {
+      set_special_action(action, "dump-journal");
+      rank = parse_rank("dump-journal", val);
+      if (i == args.end()) {
+	derr << "error parsing --dump-journal: you must give a second "
+	     << "dump-journal argument: the filename to dump the journal to. "
+	     << "\n" << dendl;
+	usage();
+      }
+      dump_file = *i++;
+    }
+    else if (ceph_argparse_witharg(args, i, &val, "--undump-journal", (char*)NULL)) {
+      set_special_action(action, "undump-journal");
+      rank = parse_rank("undump-journal", val);
+      if (i == args.end()) {
+	derr << "error parsing --undump-journal: you must give a second "
+	     << "undump-journal argument: the filename to undump the journal from. "
+	     << "\n" << dendl;
+	usage();
+      }
+      dump_file = *i++;
+    }
+    else if (ceph_argparse_witharg(args, i, &val, "--dump-journal-entries", (char*)NULL)){
+      set_special_action(action, "dump-journal-entries");
+      rank = parse_rank("dump-journal-entries", val);
+    }
+    else if (ceph_argparse_witharg(args, i, &val, "--reset-journal", (char*)NULL)) {
+      set_special_action(action, "reset-journal");
+      rank = parse_rank("reset-journal", val);
+    }
     else if (ceph_argparse_witharg(args, i, &val, "--journal-check", (char*)NULL)) {
       int r = parse_rank("journal-check", val);
-      if (shadow != MDSMap::STATE_NULL) {
+      if (shadow) {
         dout(0) << "Error: can only select one standby state" << dendl;
         return -1;
       }
@@ -136,6 +220,11 @@ int main(int argc, const char **argv)
 
   pick_addresses(g_ceph_context, CEPH_PICK_ADDRESS_PUBLIC);
 
+  // Check for special actions
+  if (!action.empty()) {
+    return do_cmds_special_action(action, dump_file, rank);
+  }
+
   // Normal startup
   if (g_conf->name.has_default_id()) {
     derr << "must specify '-i name' with the ceph-mds instance name" << dendl;
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc
index ef0a99c..1b52f58 100644
--- a/src/ceph_mon.cc
+++ b/src/ceph_mon.cc
@@ -102,31 +102,24 @@ int obtain_monmap(MonitorDBStore &store, bufferlist &bl)
   return -ENOENT;
 }
 
-int check_mon_data_exists()
+int mon_data_exists(bool *r)
 {
   string mon_data = g_conf->mon_data;
   struct stat buf;
   if (::stat(mon_data.c_str(), &buf)) {
-    if (errno != ENOENT) {
+    if (errno == ENOENT) {
+      *r = false;
+    } else {
       cerr << "stat(" << mon_data << ") " << cpp_strerror(errno) << std::endl;
+      return -errno;
     }
-    return -errno;
+  } else {
+    *r = true;
   }
   return 0;
 }
 
-/** Check whether **mon data** is empty.
- *
- * Being empty means mkfs has not been run and there's no monitor setup
- * at **g_conf->mon_data**.
- *
- * If the directory g_conf->mon_data is not empty we will return -ENOTEMPTY.
- * Otherwise we will return 0.  Any other negative returns will represent
- * a failure to be handled by the caller.
- *
- * @return **0** on success, -ENOTEMPTY if not empty or **-errno** otherwise.
- */
-int check_mon_data_empty()
+int mon_data_empty(bool *r)
 {
   string mon_data = g_conf->mon_data;
 
@@ -137,6 +130,7 @@ int check_mon_data_empty()
   }
   char buf[offsetof(struct dirent, d_name) + PATH_MAX + 1];
 
+  *r = false;
   int code = 0;
   struct dirent *de;
   errno = 0;
@@ -150,7 +144,7 @@ int check_mon_data_empty()
     }
     if (string(".") != de->d_name &&
 	string("..") != de->d_name) {
-      code = -ENOTEMPTY;
+      *r = true;
       break;
     }
   }
@@ -160,6 +154,14 @@ int check_mon_data_empty()
   return code;
 }
 
+int mon_exists(bool *r)
+{
+  int code = mon_data_exists(r);
+  if (code || *r == false)
+    return code;
+  return mon_data_empty(r);
+}
+
 void usage()
 {
   cerr << "usage: ceph-mon -i monid [flags]" << std::endl;
@@ -213,28 +215,6 @@ int main(int argc, const char **argv)
   argv_to_vec(argc, argv, args);
   env_to_vec(args);
 
-  // We need to specify some default values that may be overridden by the
-  // user, that are specific to the monitor.  The options we are overriding
-  // are also used on the OSD (or in any other component that uses leveldb),
-  // so changing them directly in common/config_opts.h is not an option.
-  // This is not the prettiest way of doing this, especially since it has us
-  // having a different place than common/config_opts.h defining default
-  // values, but it's not horribly wrong enough to prevent us from doing it :)
-  //
-  // NOTE: user-defined options will take precedence over ours.
-  //
-  //  leveldb_write_buffer_size = 32*1024*1024  = 33554432  // 32MB
-  //  leveldb_cache_size        = 512*1024*1204 = 536870912 // 512MB
-  //  leveldb_block_size        = 64*1024       = 65536     // 64KB
-  //  leveldb_compression       = false
-  //  leveldb_log               = ""
-  vector<const char*> def_args;
-  def_args.push_back("--leveldb-write-buffer-size=33554432");
-  def_args.push_back("--leveldb-cache-size=536870912");
-  def_args.push_back("--leveldb-block-size=65536");
-  def_args.push_back("--leveldb-compression=false");
-  def_args.push_back("--leveldb-log=");
-
   int flags = 0;
   {
     vector<const char*> args_copy = args;
@@ -255,8 +235,7 @@ int main(int argc, const char **argv)
     }
   }
 
-  global_init(&def_args, args,
-              CEPH_ENTITY_TYPE_MON, CODE_ENVIRONMENT_DAEMON, flags);
+  global_init(NULL, args, CEPH_ENTITY_TYPE_MON, CODE_ENVIRONMENT_DAEMON, flags);
 
   uuid_d fsid;
   std::string val;
@@ -305,32 +284,27 @@ int main(int argc, const char **argv)
     usage();
   }
 
+  bool exists;
+  if (mon_exists(&exists))
+    exit(1);
+
+  if (mkfs && exists) {
+    cerr << g_conf->mon_data << " already exists" << std::endl;
+    exit(0);
+  }
+
   // -- mkfs --
   if (mkfs) {
 
-    int err = check_mon_data_exists();
-    if (err == -ENOENT) {
+    if (mon_data_exists(&exists))
+      exit(1);
+
+    if (!exists) {
       if (::mkdir(g_conf->mon_data.c_str(), 0755)) {
 	cerr << "mkdir(" << g_conf->mon_data << ") : "
 	     << cpp_strerror(errno) << std::endl;
 	exit(1);
       }
-    } else if (err < 0) {
-      cerr << "error opening '" << g_conf->mon_data << "': "
-           << cpp_strerror(-err) << std::endl;
-      exit(-err);
-    }
-
-    err = check_mon_data_empty();
-    if (err == -ENOTEMPTY) {
-      // Mon may exist.  Let the user know and exit gracefully.
-      cerr << "'" << g_conf->mon_data << "' already exists and is not empty"
-           << ": monitor may already exist" << std::endl;
-      exit(0);
-    } else if (err < 0) {
-      cerr << "error checking if '" << g_conf->mon_data << "' is empty: "
-           << cpp_strerror(-err) << std::endl;
-      exit(-err);
     }
 
     // resolve public_network -> public_addr
@@ -440,35 +414,11 @@ int main(int argc, const char **argv)
       cerr << argv[0] << ": error creating monfs: " << cpp_strerror(r) << std::endl;
       exit(1);
     }
-    store.close();
     cout << argv[0] << ": created monfs at " << g_conf->mon_data 
 	 << " for " << g_conf->name << std::endl;
     return 0;
   }
 
-  err = check_mon_data_exists();
-  if (err < 0 && err == -ENOENT) {
-    cerr << "monitor data directory at '" << g_conf->mon_data << "'"
-         << " does not exist: have you run 'mkfs'?" << std::endl;
-    exit(1);
-  } else if (err < 0) {
-    cerr << "error accessing monitor data directory at '"
-         << g_conf->mon_data << "': " << cpp_strerror(-err) << std::endl;
-    exit(1);
-  }
-
-  err = check_mon_data_empty();
-  if (err == 0) {
-    derr << "monitor data directory at '" << g_conf->mon_data
-      << "' is empty: have you run 'mkfs'?" << dendl;
-    exit(1);
-  } else if (err < 0 && err != -ENOTEMPTY) {
-    // we don't want an empty data dir by now
-    cerr << "error accessing '" << g_conf->mon_data << "': "
-         << cpp_strerror(-err) << std::endl;
-    exit(1);
-  }
-
   {
     // check fs stats. don't start if it's critically close to full.
     ceph_data_stats_t stats;
@@ -502,7 +452,7 @@ int main(int argc, const char **argv)
     }
     common_init_finish(g_ceph_context);
     global_init_chdir(g_ceph_context);
-    if (preload_erasure_code() < 0)
+    if (preload_erasure_code() < -1)
       prefork.exit(1);
   }
 
@@ -510,26 +460,19 @@ int main(int argc, const char **argv)
 
   Monitor::StoreConverter converter(g_conf->mon_data, store);
   if (store->open(std::cerr) < 0) {
-    int needs_conversion = converter.needs_conversion();
-    if (needs_conversion < 0) {
-      if (needs_conversion == -ENOENT) {
-        derr << "monitor data directory at '" << g_conf->mon_data
-             << "' is not empty but has no valid store nor legacy monitor"
-             << " store." << dendl;
-      } else {
-        derr << "found errors while validating legacy unconverted"
-             << " monitor store: " << cpp_strerror(needs_conversion) << dendl;
-      }
-      prefork.exit(1);
-    }
-
     int ret = store->create_and_open(std::cerr);
     if (ret < 0) {
       derr << "failed to create new leveldb store" << dendl;
       prefork.exit(1);
     }
 
-    if (needs_conversion > 0) {
+    ret = converter.needs_conversion();
+    if (ret < 0) {
+      derr << "found errors while validating legacy unconverted monitor store: "
+           << cpp_strerror(ret) << dendl;
+      prefork.exit(1);
+    }
+    if (ret > 0) {
       dout(0) << "converting monitor store, please do not interrupt..." << dendl;
       int r = converter.convert();
       if (r) {
@@ -547,7 +490,7 @@ int main(int argc, const char **argv)
   bufferlist magicbl;
   err = store->get(Monitor::MONITOR_NAME, "magic", magicbl);
   if (!magicbl.length()) {
-    derr << "unable to read magic from mon data" << dendl;
+    derr << "unable to read magic from mon data.. did you run mkcephfs?" << dendl;
     prefork.exit(1);
   }
   string magic(magicbl.c_str(), magicbl.length()-1);  // ignore trailing \n
@@ -593,11 +536,11 @@ int main(int argc, const char **argv)
     ::encode(v, final);
     ::encode(mapbl, final);
 
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+    MonitorDBStore::Transaction t;
     // save it
-    t->put("monmap", v, mapbl);
-    t->put("monmap", "latest", final);
-    t->put("monmap", "last_committed", v);
+    t.put("monmap", v, mapbl);
+    t.put("monmap", "latest", final);
+    t.put("monmap", "last_committed", v);
     store->apply_transaction(t);
 
     dout(0) << "done." << dendl;
@@ -777,8 +720,6 @@ int main(int argc, const char **argv)
 
   messenger->wait();
 
-  store->close();
-
   unregister_async_signal_handler(SIGHUP, sighup_handler);
   unregister_async_signal_handler(SIGINT, handle_mon_signal);
   unregister_async_signal_handler(SIGTERM, handle_mon_signal);
diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc
index 1ee2364..a2f4542 100644
--- a/src/ceph_osd.cc
+++ b/src/ceph_osd.cc
@@ -89,12 +89,7 @@ int main(int argc, const char **argv)
   argv_to_vec(argc, argv, args);
   env_to_vec(args);
 
-  vector<const char*> def_args;
-  // We want to enable leveldb's log, while allowing users to override this
-  // option, therefore we will pass it as a default argument to global_init().
-  def_args.push_back("--leveldb-log=");
-
-  global_init(&def_args, args, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_DAEMON, 0);
+  global_init(NULL, args, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_DAEMON, 0);
   ceph_heap_profiler_init();
 
   // osd specific args
@@ -473,7 +468,7 @@ int main(int argc, const char **argv)
     return -1;
   global_init_chdir(g_ceph_context);
 
-  if (preload_erasure_code() < 0)
+  if (preload_erasure_code() < -1)
     return -1;
 
   osd = new OSD(g_ceph_context,
diff --git a/src/cephfs.cc b/src/cephfs.cc
index fe2d6c6..90aee32 100644
--- a/src/cephfs.cc
+++ b/src/cephfs.cc
@@ -50,7 +50,7 @@ int main (int argc, char **argv) {
   int stripe_unit = 0;
   int stripe_count = 0;
   int object_size = 0;
-  int64_t pool = -1;
+  int64_t pool = 0;
   int file_offset = 0;
   bool dir = false;
 
@@ -60,9 +60,6 @@ int main (int argc, char **argv) {
     return 0;
   }
 
-  cerr << "WARNING: This tool is deprecated.  Use the layout.* xattrs "
-          "to query and modify layouts." << endl;
-
   if (CMD_SHOW_LAYOUT == cmd) {
     struct ceph_ioctl_layout layout;
     memset(&layout, 0, sizeof(layout));
@@ -100,10 +97,6 @@ int main (int argc, char **argv) {
     struct ceph_ioctl_layout layout;
     memset(&layout, 0, sizeof(layout));
     int ioctl_num = (dir ? CEPH_IOC_SET_LAYOUT_POLICY : CEPH_IOC_SET_LAYOUT);
-    if (pool == -1) {
-      cerr << "Pool not specified (use --pool <name or id>)" << endl;
-      return 1;
-    }
     layout.data_pool = pool;
     layout.object_size = object_size;
     layout.stripe_count = stripe_count;
diff --git a/src/client/Client.cc b/src/client/Client.cc
index 48e5400..6b19a7a 100644
--- a/src/client/Client.cc
+++ b/src/client/Client.cc
@@ -21,7 +21,6 @@
 #include <sys/stat.h>
 #include <sys/param.h>
 #include <fcntl.h>
-#include <sys/utsname.h>
 
 #if defined(__linux__)
 #include <linux/falloc.h>
@@ -91,11 +90,6 @@ using namespace std;
 
 #define  tout(cct)       if (!cct->_conf->client_trace.empty()) traceout
 
-// Darwin fails to define this
-#ifndef O_RSYNC
-#define O_RSYNC 0x0
-#endif
-
 
 
 void client_flush_set_callback(void *p, ObjectCacher::ObjectSet *oset)
@@ -163,7 +157,6 @@ Client::Client(Messenger *m, MonClient *mc)
     getgroups_cb_handle(NULL),
     async_ino_invalidator(m->cct),
     async_dentry_invalidator(m->cct),
-    objecter_finisher(m->cct),
     tick_event(NULL),
     monclient(mc), messenger(m), whoami(m->get_myname().num()),
     initialized(false), mounted(false), unmounting(false),
@@ -183,9 +176,6 @@ Client::Client(Messenger *m, MonClient *mc)
 
   num_flushing_caps = 0;
 
-  _dir_vxattrs_name_size = _vxattrs_calcu_name_size(_dir_vxattrs);
-  _file_vxattrs_name_size = _vxattrs_calcu_name_size(_file_vxattrs);
-
   lru.lru_set_max(cct->_conf->client_cache_size);
   lru.lru_set_midpoint(cct->_conf->client_cache_mid);
 
@@ -196,12 +186,12 @@ Client::Client(Messenger *m, MonClient *mc)
   messenger = m;
 
   // osd interfaces
+  osdmap = new OSDMap;     // initially blank.. see mount()
   mdsmap = new MDSMap;
-  objecter = new Objecter(cct, messenger, monclient,
+  objecter = new Objecter(cct, messenger, monclient, osdmap, client_lock, timer,
 			  0, 0);
   objecter->set_client_incarnation(0);  // client always 0, for now.
-  writeback_handler = new ObjecterWriteback(objecter, &objecter_finisher,
-					    &client_lock);
+  writeback_handler = new ObjecterWriteback(objecter);
   objectcacher = new ObjectCacher(cct, "libcephfs", *writeback_handler, client_lock,
 				  client_flush_set_callback,    // all commit callback
 				  (void*)this,
@@ -211,7 +201,6 @@ Client::Client(Messenger *m, MonClient *mc)
 				  cct->_conf->client_oc_target_dirty,
 				  cct->_conf->client_oc_max_dirty_age,
 				  true);
-  objecter_finisher.start();
   filer = new Filer(objecter);
 }
 
@@ -227,6 +216,7 @@ Client::~Client()
 
   delete filer;
   delete objecter;
+  delete osdmap;
   delete mdsmap;
 
   delete logger;
@@ -355,26 +345,28 @@ int Client::init()
 
   objectcacher->start();
 
-  objecter->init();
-
   // ok!
-  messenger->add_dispatcher_tail(objecter);
-  messenger->add_dispatcher_tail(this);
+  messenger->add_dispatcher_head(this);
 
   int r = monclient->init();
   if (r < 0) {
     // need to do cleanup because we're in an intermediate init state
-    objecter->shutdown();
     timer.shutdown();
     client_lock.Unlock();
     objectcacher->stop();
     monclient->shutdown();
     return r;
   }
-  objecter->start();
+
+  client_lock.Unlock();
+  objecter->init_unlocked();
+  client_lock.Lock();
+
+  objecter->init_locked();
 
   monclient->set_want_keys(CEPH_ENTITY_TYPE_MDS | CEPH_ENTITY_TYPE_OSD);
   monclient->sub_want("mdsmap", 0, 0);
+  monclient->sub_want("osdmap", 0, CEPH_SUBSCRIBE_ONETIME);
   monclient->renew_subs();
 
   // logger
@@ -423,8 +415,6 @@ int Client::init()
 	       << cpp_strerror(-ret) << dendl;
   }
 
-  populate_metadata();
-
   client_lock.Lock();
   initialized = true;
   client_lock.Unlock();
@@ -459,12 +449,9 @@ void Client::shutdown()
   assert(initialized);
   initialized = false;
   timer.shutdown();
-  objecter->shutdown();
+  objecter->shutdown_locked();
   client_lock.Unlock();
-
-  objecter_finisher.wait_for_empty();
-  objecter_finisher.stop();
-
+  objecter->shutdown_unlocked();
   monclient->shutdown();
 
   if (logger) {
@@ -516,7 +503,7 @@ void Client::trim_dentry(Dentry *dn)
     dn->dir->parent_inode->flags &= ~I_COMPLETE;
     dn->dir->release_count++;
   }
-  unlink(dn, false, false);  // drop dir, drop dentry
+  unlink(dn, false);
 }
 
 
@@ -739,14 +726,10 @@ Inode * Client::add_update_inode(InodeStat *st, utime_t from,
     in->flags |= I_COMPLETE;
     if (in->dir) {
       ldout(cct, 10) << " dir is open on empty dir " << in->ino << " with "
-		     << in->dir->dentry_map.size() << " entries, marking all dentries null" << dendl;
-      for (map<string, Dentry*>::iterator p = in->dir->dentry_map.begin();
-	   p != in->dir->dentry_map.end();
-	   ++p) {
-	unlink(p->second, true, true);  // keep dir, keep dentry
-      }
-      if (in->dir->dentry_map.empty())
-	close_dir(in->dir);
+		     << in->dir->dentry_map.size() << " entries, tearing down" << dendl;
+      while (!in->dir->dentry_map.empty())
+	unlink(in->dir->dentry_map.begin()->second, true);
+      close_dir(in->dir);
     }
   }
 
@@ -779,14 +762,15 @@ Dentry *Client::insert_dentry_inode(Dir *dir, const string& dname, LeaseStat *dl
       ldout(cct, 12) << " had dentry " << dname
 	       << " with WRONG vino " << dn->inode->vino()
 	       << dendl;
-      unlink(dn, true, true);  // keep dir, keep dentry
+      unlink(dn, true);
+      dn = NULL;
     }
   }
   
   if (!dn || dn->inode == 0) {
     in->get();
-    if (old_dentry)
-      unlink(old_dentry, dir == old_dentry->dir, false);  // drop dentry, keep dir open if its the same dir
+    if (old_dentry && old_dentry->dir)
+      unlink(old_dentry, dir == old_dentry->dir);  // keep dir open if its the same dir
     dn = link(dir, dname, in, dn);
     put_inode(in);
     if (set_offset) {
@@ -900,7 +884,7 @@ void Client::insert_readdir_results(MetaRequest *request, MetaSession *session,
       readdir_start.clear();
     }
 
-    ldout(cct, 10) << __func__ << " " << numdn << " readdir items, end=" << (int)end
+    ldout(cct, 10) << "insert_trace " << numdn << " readdir items, end=" << (int)end
 		   << ", offset " << readdir_offset
 		   << ", readdir_start " << readdir_start << dendl;
 
@@ -923,14 +907,10 @@ void Client::insert_readdir_results(MetaRequest *request, MetaSession *session,
       while (pd != dir->dentry_map.end() && pd->first < dname) {
 	if (pd->first < dname &&
 	    fg.contains(diri->hash_dentry_name(pd->first))) {  // do not remove items in earlier frags
+	  ldout(cct, 15) << "insert_trace  unlink '" << pd->first << "'" << dendl;
 	  Dentry *dn = pd->second;
-	  if (dn->inode) {
-	    ldout(cct, 15) << __func__ << "  unlink '" << pd->first << "'" << dendl;
-	    ++pd;
-	    unlink(dn, true, true);  // keep dir, dentry
-	  } else {
-	    ++pd;
-	  }
+	  ++pd;
+	  unlink(dn, true);
 	} else {
 	  ++pd;
 	}
@@ -949,9 +929,8 @@ void Client::insert_readdir_results(MetaRequest *request, MetaSession *session,
 	if (pd->second->inode != in) {
 	  // replace incorrect dentry
 	  ++pd;  // we are about to unlink this guy, move past it.
-	  unlink(olddn, true, true);  // keep dir, dentry
-	  dn = link(dir, dname, in, olddn);
-	  assert(dn == olddn);
+	  unlink(olddn, true);
+	  dn = link(dir, dname, in, NULL);
 	} else {
 	  // keep existing dn
 	  dn = olddn;
@@ -969,7 +948,7 @@ void Client::insert_readdir_results(MetaRequest *request, MetaSession *session,
       in->get();
       request->readdir_result.push_back(pair<string,Inode*>(dname, in));
 
-      ldout(cct, 15) << __func__ << "  " << hex << dn->offset << dec << ": '" << dname << "' -> " << in->ino << dendl;
+      ldout(cct, 15) << "insert_trace  " << hex << dn->offset << dec << ": '" << dname << "' -> " << in->ino << dendl;
     }
     request->readdir_last_name = dname;
 
@@ -977,10 +956,10 @@ void Client::insert_readdir_results(MetaRequest *request, MetaSession *session,
     if (end) {
       while (pd != dir->dentry_map.end()) {
 	if (fg.contains(diri->hash_dentry_name(pd->first))) {
-	  ldout(cct, 15) << __func__ << "  unlink '" << pd->first << "'" << dendl;
+	  ldout(cct, 15) << "insert_trace  unlink '" << pd->first << "'" << dendl;
 	  Dentry *dn = pd->second;
 	  ++pd;
-	  unlink(dn, true, true); // keep dir, dentry
+	  unlink(dn, true);
 	} else
 	  ++pd;
       }
@@ -1005,12 +984,6 @@ Inode* Client::insert_trace(MetaRequest *request, MetaSession *session)
 	   << dendl;
 
   bufferlist::iterator p = reply->get_trace_bl().begin();
-  if (request->got_unsafe) {
-    ldout(cct, 10) << "insert_trace -- already got unsafe; ignoring" << dendl;
-    assert(p.end());
-    return NULL;
-  }
-
   if (p.end()) {
     ldout(cct, 10) << "insert_trace -- no trace" << dendl;
 
@@ -1021,21 +994,6 @@ Inode* Client::insert_trace(MetaRequest *request, MetaSession *session)
       d->dir->parent_inode->flags &= ~I_COMPLETE;
       d->dir->release_count++;
     }
-
-    if (d && reply->get_result() == 0) {
-      if (request->head.op == CEPH_MDS_OP_RENAME) {
-	// rename
-	Dentry *od = request->old_dentry();
-	ldout(cct, 10) << " unlinking rename src dn " << od << " for traceless reply" << dendl;
-	assert(od);
-	unlink(od, true, true);  // keep dir, dentry
-      } else if (request->head.op == CEPH_MDS_OP_RMDIR ||
-		 request->head.op == CEPH_MDS_OP_UNLINK) {
-	// unlink, rmdir
-	ldout(cct, 10) << " unlinking unlink/rmdir dn " << d << " for traceless reply" << dendl;
-	unlink(d, true, true);  // keep dir, dentry
-      }
-    }
     return NULL;
   }
 
@@ -1085,7 +1043,7 @@ Inode* Client::insert_trace(MetaRequest *request, MetaSession *session)
       if (diri->dir && diri->dir->dentries.count(dname)) {
 	Dentry *dn = diri->dir->dentries[dname];
 	if (dn->inode)
-	  unlink(dn, true, true);  // keep dir, dentry
+	  unlink(dn, false);
       }
     }
   } else if (reply->head.op == CEPH_MDS_OP_LOOKUPSNAP ||
@@ -1109,7 +1067,7 @@ Inode* Client::insert_trace(MetaRequest *request, MetaSession *session)
       if (diri->dir && diri->dir->dentries.count(dname)) {
 	Dentry *dn = diri->dir->dentries[dname];
 	if (dn->inode)
-	  unlink(dn, true, true);  // keep dir, dentry
+	  unlink(dn, false);
       }
     }
   }
@@ -1169,49 +1127,50 @@ int Client::choose_target_mds(MetaRequest *req)
       is_hash = true;
     }
   }
-  if (in) {
-    if (in->snapid != CEPH_NOSNAP) {
-      ldout(cct, 10) << "choose_target_mds " << *in << " is snapped, using nonsnap parent" << dendl;
-      while (in->snapid != CEPH_NOSNAP) {
-        if (in->snapid == CEPH_SNAPDIR)
-  	in = in->snapdir_parent;
-        else if (!in->dn_set.empty())
-          /* In most cases there will only be one dentry, so getting it
-           * will be the correct action. If there are multiple hard links,
-           * I think the MDS should be able to redirect as needed*/
-  	in = in->get_first_parent()->dir->parent_inode;
-        else {
-          ldout(cct, 10) << "got unlinked inode, can't look at parent" << dendl;
-          break;
-        }
+  if (in && in->snapid != CEPH_NOSNAP) {
+    ldout(cct, 10) << "choose_target_mds " << *in << " is snapped, using nonsnap parent" << dendl;
+    while (in->snapid != CEPH_NOSNAP) {
+      if (in->snapid == CEPH_SNAPDIR)
+	in = in->snapdir_parent;
+      else if (!in->dn_set.empty())
+        /* In most cases there will only be one dentry, so getting it
+         * will be the correct action. If there are multiple hard links,
+         * I think the MDS should be able to redirect as needed*/
+	in = in->get_first_parent()->dir->parent_inode;
+      else {
+        ldout(cct, 10) << "got unlinked inode, can't look at parent" << dendl;
+        break;
       }
-      is_hash = false;
     }
+    is_hash = false;
+  }
   
-    ldout(cct, 20) << "choose_target_mds " << *in << " is_hash=" << is_hash
-             << " hash=" << hash << dendl;
-  
-    if (is_hash && S_ISDIR(in->mode) && !in->dirfragtree.empty()) {
-      frag_t fg = in->dirfragtree[hash];
-      if (in->fragmap.count(fg)) {
-        mds = in->fragmap[fg];
-        ldout(cct, 10) << "choose_target_mds from dirfragtree hash" << dendl;
-        goto out;
-      }
+  if (!in)
+    goto random_mds;
+
+  ldout(cct, 20) << "choose_target_mds " << *in << " is_hash=" << is_hash
+           << " hash=" << hash << dendl;
+
+  if (is_hash && S_ISDIR(in->mode) && !in->dirfragtree.empty()) {
+    frag_t fg = in->dirfragtree[hash];
+    if (in->fragmap.count(fg)) {
+      mds = in->fragmap[fg];
+      ldout(cct, 10) << "choose_target_mds from dirfragtree hash" << dendl;
+      goto out;
     }
-  
-    if (req->auth_is_best())
-      cap = in->auth_cap;
-    if (!cap && !in->caps.empty())
-      cap = in->caps.begin()->second;
-    if (!cap)
-      goto random_mds;
-    mds = cap->session->mds_num;
-    ldout(cct, 10) << "choose_target_mds from caps on inode " << *in << dendl;
-  
-    goto out;
   }
 
+  if (req->auth_is_best())
+    cap = in->auth_cap;
+  if (!cap && !in->caps.empty())
+    cap = in->caps.begin()->second;
+  if (!cap)
+    goto random_mds;
+  mds = cap->session->mds_num;
+  ldout(cct, 10) << "choose_target_mds from caps on inode " << *in << dendl;
+
+  goto out;
+
 random_mds:
   if (mds < 0) {
     mds = mdsmap->get_random_up_mds();
@@ -1243,7 +1202,6 @@ void Client::connect_mds_targets(int mds)
 
 void Client::dump_mds_sessions(Formatter *f)
 {
-  f->dump_int("id", get_nodeid().v);
   f->open_array_section("sessions");
   for (map<int,MetaSession*>::const_iterator p = mds_sessions.begin(); p != mds_sessions.end(); ++p) {
     f->open_object_section("session");
@@ -1302,17 +1260,18 @@ int Client::verify_reply_trace(int r,
       Inode *target = 0;  // ptarget may be NULL
       Dentry *d = request->dentry();
       if (d) {
-	if (d->dir) {
-	  ldout(cct, 10) << "make_request got traceless reply, looking up #"
-			 << d->dir->parent_inode->ino << "/" << d->name
-			 << " got_ino " << got_created_ino
-			 << " ino " << created_ino
-			 << dendl;
-	  r = _do_lookup(d->dir->parent_inode, d->name, &target);
-	} else {
-	  // if the dentry is not linked, just do our best. see #5021.
-	  assert(0 == "how did this happen?  i want logs!");
+	// rename is special: we handle old_dentry unlink explicitly in insert_dentry_inode(), so
+	// we need to compensate and do the same here.
+	Dentry *od = request->old_dentry();
+	if (od) {
+	  unlink(od, false);
 	}
+	ldout(cct, 10) << "make_request got traceless reply, looking up #"
+		       << d->dir->parent_inode->ino << "/" << d->name
+		       << " got_ino " << got_created_ino
+		       << " ino " << created_ino
+		       << dendl;
+	r = _do_lookup(d->dir->parent_inode, d->name, &target);
       } else {
 	Inode *in = request->inode();
 	ldout(cct, 10) << "make_request got traceless reply, forcing getattr on #"
@@ -1369,10 +1328,6 @@ int Client::make_request(MetaRequest *request,
   // assign a unique tid
   ceph_tid_t tid = ++last_tid;
   request->set_tid(tid);
-
-  // and timestamp
-  request->op_stamp = ceph_clock_now(NULL);
-
   // make note
   mds_requests[tid] = request->get();
   if (uid < 0) {
@@ -1615,42 +1570,6 @@ MetaSession *Client::_get_or_open_mds_session(int mds)
   return _open_mds_session(mds);
 }
 
-/**
- * Populate a map of strings with client-identifying metadata,
- * such as the hostname.  Call this once at initialization.
- */
-void Client::populate_metadata()
-{
-  // Hostname
-  struct utsname u;
-  int r = uname(&u);
-  if (r >= 0) {
-    metadata["hostname"] = u.nodename;
-    ldout(cct, 20) << __func__ << " read hostname '" << u.nodename << "'" << dendl;
-  } else {
-    ldout(cct, 1) << __func__ << " failed to read hostname (" << cpp_strerror(r) << ")" << dendl;
-  }
-
-  // Ceph entity id (the '0' in "client.0")
-  metadata["entity_id"] = cct->_conf->name.get_id();
-}
-
-/**
- * Optionally add or override client metadata fields.
- */
-void Client::update_metadata(std::string const &k, std::string const &v)
-{
-  Mutex::Locker l(client_lock);
-  assert(initialized);
-
-  if (metadata.count(k)) {
-    ldout(cct, 1) << __func__ << " warning, overriding metadata field '" << k
-      << "' from '" << metadata[k] << "' to '" << v << "'" << dendl;
-  }
-
-  metadata[k] = v;
-}
-
 MetaSession *Client::_open_mds_session(int mds)
 {
   ldout(cct, 10) << "_open_mds_session mds." << mds << dendl;
@@ -1662,9 +1581,8 @@ MetaSession *Client::_open_mds_session(int mds)
   session->con = messenger->get_connection(session->inst);
   session->state = MetaSession::STATE_OPENING;
   mds_sessions[mds] = session;
-  MClientSession *m = new MClientSession(CEPH_SESSION_REQUEST_OPEN);
-  m->client_meta = metadata;
-  session->con->send_message(m);
+  messenger->send_message(new MClientSession(CEPH_SESSION_REQUEST_OPEN),
+			  session->con);
   return session;
 }
 
@@ -1672,13 +1590,14 @@ void Client::_close_mds_session(MetaSession *s)
 {
   ldout(cct, 2) << "_close_mds_session mds." << s->mds_num << " seq " << s->seq << dendl;
   s->state = MetaSession::STATE_CLOSING;
-  s->con->send_message(new MClientSession(CEPH_SESSION_REQUEST_CLOSE, s->seq));
+  messenger->send_message(new MClientSession(CEPH_SESSION_REQUEST_CLOSE, s->seq),
+			  s->con);
 }
 
 void Client::_closed_mds_session(MetaSession *s)
 {
   s->state = MetaSession::STATE_CLOSED;
-  s->con->mark_down();
+  messenger->mark_down(s->con);
   signal_context_list(s->waiting_for_open);
   mount_cond.Signal();
   remove_session_caps(s);
@@ -1731,7 +1650,8 @@ void Client::handle_client_session(MClientSession *m)
     break;
 
   case CEPH_SESSION_FLUSHMSG:
-    session->con->send_message(new MClientSession(CEPH_SESSION_FLUSHMSG_ACK, m->get_seq()));
+    messenger->send_message(new MClientSession(CEPH_SESSION_FLUSHMSG_ACK, m->get_seq()),
+			    session->con);
     break;
 
   default:
@@ -1785,14 +1705,13 @@ void Client::send_request(MetaRequest *request, MetaSession *session)
   session->requests.push_back(&request->item);
 
   ldout(cct, 10) << "send_request " << *r << " to mds." << mds << dendl;
-  session->con->send_message(r);
+  messenger->send_message(r, session->con);
 }
 
 MClientRequest* Client::build_client_request(MetaRequest *request)
 {
   MClientRequest *req = new MClientRequest(request->get_op());
   req->set_tid(request->tid);
-  req->set_stamp(request->op_stamp);
   memcpy(&req->head, &request->head, sizeof(ceph_mds_request_head));
 
   // if the filepath's haven't been set, set them!
@@ -1914,7 +1833,6 @@ void Client::handle_client_reply(MClientReply *reply)
       // have to return ESTALE
     } else {
       request->caller_cond->Signal();
-      reply->put();
       return;
     }
     ldout(cct, 20) << "have to return ESTALE" << dendl;
@@ -1975,6 +1893,18 @@ bool Client::ms_dispatch(Message *m)
   }
 
   switch (m->get_type()) {
+    // osd
+  case CEPH_MSG_OSD_OPREPLY:
+    objecter->handle_osd_op_reply((MOSDOpReply*)m);
+    break;
+  case CEPH_MSG_OSD_MAP:
+    objecter->handle_osd_map((class MOSDMap*)m);
+    break;
+  case CEPH_MSG_STATFS_REPLY:
+    objecter->handle_fs_stats_reply((MStatfsReply*)m);
+    break;
+
+    
     // mounting and mds sessions
   case CEPH_MSG_MDS_MAP:
     handle_mds_map(static_cast<MMDSMap*>(m));
@@ -1983,10 +1913,6 @@ bool Client::ms_dispatch(Message *m)
     handle_client_session(static_cast<MClientSession*>(m));
     break;
 
-  case CEPH_MSG_OSD_MAP:
-    m->put();
-    break;
-
     // requests
   case CEPH_MSG_CLIENT_REQUEST_FORWARD:
     handle_client_request_forward(static_cast<MClientRequestForward*>(m));
@@ -2051,7 +1977,7 @@ void Client::handle_mds_map(MMDSMap* m)
     int newstate = mdsmap->get_state(p->first);
     if (!mdsmap->is_up(p->first) ||
 	mdsmap->get_inst(p->first) != p->second->inst) {
-      p->second->con->mark_down();
+      messenger->mark_down(p->second->con);
       if (mdsmap->is_up(p->first))
 	p->second->inst = mdsmap->get_inst(p->first);
     } else if (oldstate == newstate)
@@ -2134,7 +2060,7 @@ void Client::send_reconnect(MetaSession *session)
   //make sure unsafe requests get saved
   resend_unsafe_requests(session);
 
-  session->con->send_message(m);
+  messenger->send_message(m, session->con);
 
   mount_cond.Signal();
 }
@@ -2164,21 +2090,15 @@ void Client::kick_requests_closed(MetaSession *session)
 {
   ldout(cct, 10) << "kick_requests_closed for mds." << session->mds_num << dendl;
   for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
-       p != mds_requests.end(); ) {
-    MetaRequest *req = p->second;
-    ++p;
-    if (req->mds == session->mds_num) {
-      if (req->caller_cond) {
-	req->kick = true;
-	req->caller_cond->Signal();
-      }
-      req->item.remove_myself();
-      if (req->got_unsafe) {
-	lderr(cct) << "kick_requests_closed removing unsafe request " << req->get_tid() << dendl;
-	req->unsafe_item.remove_myself();
-	mds_requests.erase(req->get_tid());
-	put_request(req);
+       p != mds_requests.end();
+       ++p) {
+    if (p->second->mds == session->mds_num) {
+      if (p->second->caller_cond) {
+	p->second->kick = true;
+	p->second->caller_cond->Signal();
       }
+      p->second->item.remove_myself();
+      p->second->unsafe_item.remove_myself();
     }
   }
   assert(session->requests.empty());
@@ -2197,7 +2117,8 @@ void Client::got_mds_push(MetaSession *s)
   s->seq++;
   ldout(cct, 10) << " mds." << s->mds_num << " seq now " << s->seq << dendl;
   if (s->state == MetaSession::STATE_CLOSING) {
-    s->con->send_message(new MClientSession(CEPH_SESSION_REQUEST_CLOSE, s->seq));
+    messenger->send_message(new MClientSession(CEPH_SESSION_REQUEST_CLOSE, s->seq),
+			    s->con);
   }
 }
 
@@ -2237,10 +2158,9 @@ void Client::handle_lease(MClientLease *m)
   }
 
  revoke:
-  m->get_connection()->send_message(
-    new MClientLease(
-      CEPH_MDS_LEASE_RELEASE, seq,
-      m->get_mask(), m->get_ino(), m->get_first(), m->get_last(), m->dname));
+  messenger->send_message(new MClientLease(CEPH_MDS_LEASE_RELEASE, seq,
+					   m->get_mask(), m->get_ino(), m->get_first(), m->get_last(), m->dname),
+			  m->get_source_inst());
   m->put();
 }
 
@@ -2322,7 +2242,7 @@ Dentry* Client::link(Dir *dir, const string& name, Inode *in, Dentry *dn)
     if (in->is_dir() && !in->dn_set.empty()) {
       Dentry *olddn = in->get_first_parent();
       assert(olddn->dir != dir || olddn->name != name);
-      unlink(olddn, true, true);  // keep dir, dentry
+      unlink(olddn, false);
     }
 
     in->dn_set.insert(dn);
@@ -2333,7 +2253,7 @@ Dentry* Client::link(Dir *dir, const string& name, Inode *in, Dentry *dn)
   return dn;
 }
 
-void Client::unlink(Dentry *dn, bool keepdir, bool keepdentry)
+void Client::unlink(Dentry *dn, bool keepdir)
 {
   Inode *in = dn->inode;
   ldout(cct, 15) << "unlink dir " << dn->dir->parent_inode << " '" << dn->name << "' dn " << dn
@@ -2353,23 +2273,17 @@ void Client::unlink(Dentry *dn, bool keepdir, bool keepdentry)
     ldout(cct, 20) << "unlink  inode " << in << " parents now " << in->dn_set << dendl; 
     put_inode(in);
   }
+        
+  // unlink from dir
+  dn->dir->dentries.erase(dn->name);
+  dn->dir->dentry_map.erase(dn->name);
+  if (dn->dir->is_empty() && !keepdir) 
+    close_dir(dn->dir);
+  dn->dir = 0;
 
-  if (keepdentry) {
-    dn->lease_mds = -1;
-  } else {
-    ldout(cct, 15) << "unlink  removing '" << dn->name << "' dn " << dn << dendl;
-
-    // unlink from dir
-    dn->dir->dentries.erase(dn->name);
-    dn->dir->dentry_map.erase(dn->name);
-    if (dn->dir->is_empty() && !keepdir)
-      close_dir(dn->dir);
-    dn->dir = 0;
-
-    // delete den
-    lru.lru_remove(dn);
-    dn->put();
-  }
+  // delete den
+  lru.lru_remove(dn);
+  dn->put();
 }
 
 
@@ -2438,9 +2352,6 @@ void Client::put_cap_ref(Inode *in, int cap)
 int Client::get_caps(Inode *in, int need, int want, int *phave, loff_t endoff)
 {
   while (1) {
-    if (!in->is_any_caps())
-      return -ESTALE;
-
     if (endoff > 0 &&
 	(endoff >= (loff_t)in->max_size ||
 	 endoff > (loff_t)(in->size << 1)) &&
@@ -2514,17 +2425,8 @@ void Client::send_cap(Inode *in, MetaSession *session, Cap *cap,
 	   << " dropping " << ccap_string(dropping)
 	   << dendl;
 
-  if (cct->_conf->client_inject_release_failure && revoking) {
-    // Simulated bug:
-    //  - tell the server we think issued is whatever they issued plus whatever we implemented
-    //  - leave what we have implemented in place
-    ldout(cct, 20) << __func__ << " injecting failure to release caps" << dendl;
-    cap->issued = cap->issued | cap->implemented;
-  } else {
-    // Normal behaviour
-    cap->issued &= retain;
-    cap->implemented &= cap->issued | used;
-  }
+  cap->issued &= retain;
+  cap->implemented &= cap->issued | used;
 
   uint64_t flush_tid = 0;
   snapid_t follows = 0;
@@ -2583,7 +2485,7 @@ void Client::send_cap(Inode *in, MetaSession *session, Cap *cap,
     in->requested_max_size = in->wanted_max_size;
     ldout(cct, 15) << "auth cap, setting max_size = " << in->requested_max_size << dendl;
   }
-  session->con->send_message(m);
+  messenger->send_message(m, session->con);
 }
 
 
@@ -2692,6 +2594,15 @@ void Client::check_caps(Inode *in, bool is_delayed)
   }
 }
 
+struct C_SnapFlush : public Context {
+  Client *client;
+  Inode *in;
+  snapid_t seq;
+  C_SnapFlush(Client *c, Inode *i, snapid_t s) : client(c), in(i), seq(s) {}
+  void finish(int r) {
+    client->_flushed_cap_snap(in, seq);
+  }
+};
 
 void Client::queue_cap_snap(Inode *in, snapid_t seq)
 {
@@ -2816,7 +2727,7 @@ void Client::flush_snaps(Inode *in, bool all_again, CapSnap *again)
     capsnap->atime.encode_timeval(&m->head.atime);
     m->head.time_warp_seq = capsnap->time_warp_seq;
 
-    session->con->send_message(m);
+    messenger->send_message(m, session->con);
   }
 }
 
@@ -2878,8 +2789,6 @@ public:
     inode->get();
   }
   void finish(int r) {
-    // _async_invalidate takes the lock when it needs to, call this back from outside of lock.
-    assert(!client->client_lock.is_locked_by_me());
     client->_async_invalidate(inode, offset, length, keep_caps);
   }
 };
@@ -2948,9 +2857,6 @@ public:
     in->get();
   }
   void finish(int) {
-    // I am used via ObjectCacher, which is responsible for taking
-    // the client lock before calling me back.
-    assert(client->client_lock.is_locked_by_me());
     client->put_inode(in);
   }
 };
@@ -3169,31 +3075,12 @@ void Client::remove_all_caps(Inode *in)
     remove_cap(in->caps.begin()->second, true);
 }
 
-void Client::remove_session_caps(MetaSession *s)
+void Client::remove_session_caps(MetaSession *mds) 
 {
-  ldout(cct, 10) << "remove_session_caps mds." << s->mds_num << dendl;
-
-  while (s->caps.size()) {
-    Cap *cap = *s->caps.begin();
-    Inode *in = cap->inode;
-    int dirty_caps = 0;
-    if (in->auth_cap == cap) {
-      dirty_caps = in->dirty_caps | in->flushing_caps;
-      in->wanted_max_size = 0;
-      in->requested_max_size = 0;
-    }
+  while (mds->caps.size()) {
+    Cap *cap = *mds->caps.begin();
     remove_cap(cap, false);
-    signal_cond_list(in->waitfor_caps);
-    if (dirty_caps) {
-      lderr(cct) << "remove_session_caps still has dirty|flushing caps on " << *in << dendl;
-      if (in->flushing_caps)
-	num_flushing_caps--;
-      in->flushing_caps = 0;
-      in->dirty_caps = 0;
-      put_inode(in);
-    }
   }
-  sync_cond.Signal();
 }
 
 void Client::trim_caps(MetaSession *s, int max)
@@ -3203,11 +3090,10 @@ void Client::trim_caps(MetaSession *s, int max)
 
   int trimmed = 0;
   xlist<Cap*>::iterator p = s->caps.begin();
-  while ((s->caps.size() - trimmed) > max && !p.end()) {
+  while (s->caps.size() > max && !p.end()) {
     Cap *cap = *p;
     s->s_cap_iterator = cap;
     Inode *in = cap->inode;
-
     if (in->caps.size() > 1 && cap != in->auth_cap) {
       int mine = cap->issued | cap->implemented;
       int oissued = in->auth_cap ? in->auth_cap->issued : 0;
@@ -3221,29 +3107,15 @@ void Client::trim_caps(MetaSession *s, int max)
       ldout(cct, 20) << " trying to trim dentries for " << *in << dendl;
       bool all = true;
       set<Dentry*>::iterator q = in->dn_set.begin();
-      in->get();
       while (q != in->dn_set.end()) {
 	Dentry *dn = *q++;
-	if (dn->lru_is_expireable()) {
-          if (dn->dir->parent_inode->ino == MDS_INO_ROOT) {
-            // Only issue one of these per DN for inodes in root: handle
-            // others more efficiently by calling for root-child DNs at
-            // the end of this function.
-            _schedule_invalidate_dentry_callback(dn, true);
-          }
+	if (dn->lru_is_expireable())
 	  trim_dentry(dn);
-
-        } else {
-          ldout(cct, 20) << "  not expirable: " << dn->name << dendl;
+	else
 	  all = false;
-        }
       }
-      if (all && in->ino != MDS_INO_ROOT) {
-        ldout(cct, 20) << __func__ << " counting as trimmed: " << *in << dendl;
+      if (all)
 	trimmed++;
-      }
-
-      put_inode(in);
     }
 
     ++p;
@@ -3254,21 +3126,14 @@ void Client::trim_caps(MetaSession *s, int max)
   }
   s->s_cap_iterator = NULL;
 
-
   // notify kernel to invalidate top level directory entries. As a side effect,
   // unused inodes underneath these entries get pruned.
   if (dentry_invalidate_cb && s->caps.size() > max) {
-    assert(root);
-    if (root->dir) {
-      for (ceph::unordered_map<string, Dentry*>::iterator p = root->dir->dentries.begin();
-           p != root->dir->dentries.end();
-           ++p) {
-        if (p->second->inode)
-          _schedule_invalidate_dentry_callback(p->second, false);
-      }
-    } else {
-      // This seems unnatural, as long as we are holding caps they must be on
-      // some descendent of the root, so why don't we have the root open?
+    for (ceph::unordered_map<string, Dentry*>::iterator p = root->dir->dentries.begin();
+	 p != root->dir->dentries.end();
+	 ++p) {
+      if (p->second->inode)
+	_schedule_invalidate_dentry_callback(p->second, false);
     }
   }
 }
@@ -3794,9 +3659,10 @@ void Client::handle_cap_flush_ack(MetaSession *session, Inode *in, Cap *cap, MCl
   int mds = session->mds_num;
   int dirty = m->get_dirty();
   int cleaned = 0;
+  uint16_t flush_ack_tid = static_cast<uint16_t>(m->get_client_tid());
   for (int i = 0; i < CEPH_CAP_BITS; ++i) {
     if ((dirty & (1 << i)) &&
-	(m->get_client_tid() == in->flushing_cap_tid[i]))
+	(flush_ack_tid == in->flushing_cap_tid[i]))
       cleaned |= 1 << i;
   }
 
@@ -3870,8 +3736,6 @@ public:
 	ino.ino = inodeno_t();
   }
   void finish(int r) {
-    // _async_dentry_invalidate is responsible for its own locking
-    assert(!client->client_lock.is_locked_by_me());
     client->_async_dentry_invalidate(dirino, ino, name);
   }
 };
@@ -3897,7 +3761,7 @@ void Client::_invalidate_inode_parents(Inode *in)
     // FIXME: we play lots of unlink/link tricks when handling MDS replies,
     //        so in->dn_set doesn't always reflect the state of kernel's dcache.
     _schedule_invalidate_dentry_callback(dn, true);
-    unlink(dn, true, true);
+    unlink(dn, false);
   }
 }
 
@@ -4052,7 +3916,7 @@ int Client::mount(const std::string &mount_root)
   Mutex::Locker lock(client_lock);
 
   if (mounted) {
-    ldout(cct, 5) << "already mounted" << dendl;
+    ldout(cct, 5) << "already mounted" << dendl;;
     return 0;
   }
 
@@ -4069,7 +3933,10 @@ int Client::mount(const std::string &mount_root)
 
   tick(); // start tick
   
-  ldout(cct, 2) << "mounted: have mdsmap " << mdsmap->get_epoch() << dendl;
+  ldout(cct, 2) << "mounted: have osdmap " << osdmap->get_epoch() 
+	  << " and mdsmap " << mdsmap->get_epoch() 
+	  << dendl;
+
 
   // hack: get+pin root inode.
   //  fuse assumes it's always there.
@@ -4227,8 +4094,6 @@ class C_C_Tick : public Context {
 public:
   C_C_Tick(Client *c) : client(c) {}
   void finish(int r) {
-    // Called back via Timer, which takes client_lock for us
-    assert(client->client_lock.is_locked_by_me());
     client->tick();
   }
 };
@@ -4240,12 +4105,7 @@ void Client::flush_cap_releases()
        p != mds_sessions.end();
        ++p) {
     if (p->second->release && mdsmap->is_clientreplay_or_active_or_stopping(p->first)) {
-      if (cct->_conf->client_inject_release_failure) {
-        ldout(cct, 20) << __func__ << " injecting failure to send cap release message" << dendl;
-        p->second->release->put();
-      } else {
-        p->second->con->send_message(p->second->release);
-      }
+      messenger->send_message(p->second->release, p->second->con);
       p->second->release = 0;
     }
   }
@@ -4307,7 +4167,8 @@ void Client::renew_caps(MetaSession *session)
   ldout(cct, 10) << "renew_caps mds." << session->mds_num << dendl;
   session->last_cap_renew_request = ceph_clock_now(cct);
   uint64_t seq = ++session->cap_renew_seq;
-  session->con->send_message(new MClientSession(CEPH_SESSION_REQUEST_RENEWCAPS, seq));
+  messenger->send_message(new MClientSession(CEPH_SESSION_REQUEST_RENEWCAPS, seq),
+			  session->con);
 }
 
 
@@ -4334,7 +4195,6 @@ int Client::_do_lookup(Inode *dir, const string& name, Inode **target)
 int Client::_lookup(Inode *dir, const string& dname, Inode **target)
 {
   int r = 0;
-  Dentry *dn = NULL;
 
   if (!dir->is_dir()) {
     r = -ENOTDIR;
@@ -4367,7 +4227,7 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target)
 
   if (dir->dir &&
       dir->dir->dentries.count(dname)) {
-    dn = dir->dir->dentries[dname];
+    Dentry *dn = dir->dir->dentries[dname];
 
     ldout(cct, 20) << "_lookup have dn " << dname << " mds." << dn->lease_mds << " ttl " << dn->lease_ttl
 	     << " seq " << dn->lease_seq
@@ -4382,10 +4242,12 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target)
 	MetaSession *s = mds_sessions[dn->lease_mds];
 	if (s->cap_ttl > now &&
 	    s->cap_gen == dn->lease_gen) {
+	  *target = dn->inode;
 	  // touch this mds's dir cap too, even though we don't _explicitly_ use it here, to
 	  // make trim_caps() behave.
 	  dir->try_touch_cap(dn->lease_mds);
-	  goto hit_dn;
+	  touch_dn(dn);
+	  goto done;
 	}
 	ldout(cct, 20) << " bad lease, cap_ttl " << s->cap_ttl << ", cap_gen " << s->cap_gen
 		       << " vs lease_gen " << dn->lease_gen << dendl;
@@ -4393,7 +4255,9 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target)
       // dir lease?
       if (dir->caps_issued_mask(CEPH_CAP_FILE_SHARED) &&
 	  dn->cap_shared_gen == dir->shared_gen) {
-	goto hit_dn;
+	*target = dn->inode;
+	touch_dn(dn);
+	goto done;
       }
     } else {
       ldout(cct, 20) << " no cap on " << dn->inode->vino() << dendl;
@@ -4408,15 +4272,6 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target)
   }
 
   r = _do_lookup(dir, dname, target);
-  goto done;
-
- hit_dn:
-  if (dn->inode) {
-    *target = dn->inode;
-  } else {
-    r = -ENOENT;
-  }
-  touch_dn(dn);
 
  done:
   if (r < 0)
@@ -4916,7 +4771,7 @@ int Client::fsetattr(int fd, struct stat *attr, int mask)
 int Client::stat(const char *relpath, struct stat *stbuf,
 			  frag_info_t *dirstat, int mask)
 {
-  ldout(cct, 3) << "stat enter (relpath " << relpath << " mask " << mask << ")" << dendl;
+  ldout(cct, 3) << "stat enter (relpath" << relpath << " mask " << mask << ")" << dendl;
   Mutex::Locker lock(client_lock);
   tout(cct) << "stat" << std::endl;
   tout(cct) << relpath << std::endl;
@@ -4931,14 +4786,14 @@ int Client::stat(const char *relpath, struct stat *stbuf,
     return r;
   }
   fill_stat(in, stbuf, dirstat);
-  ldout(cct, 3) << "stat exit (relpath " << relpath << " mask " << mask << ")" << dendl;
+  ldout(cct, 3) << "stat exit (relpath" << relpath << " mask " << mask << ")" << dendl;
   return r;
 }
 
 int Client::lstat(const char *relpath, struct stat *stbuf,
 			  frag_info_t *dirstat, int mask)
 {
-  ldout(cct, 3) << "lstat enter (relpath " << relpath << " mask " << mask << ")" << dendl;
+  ldout(cct, 3) << "lstat enter (relpath" << relpath << " mask " << mask << ")" << dendl;
   Mutex::Locker lock(client_lock);
   tout(cct) << "lstat" << std::endl;
   tout(cct) << relpath << std::endl;
@@ -4954,7 +4809,7 @@ int Client::lstat(const char *relpath, struct stat *stbuf,
     return r;
   }
   fill_stat(in, stbuf, dirstat);
-  ldout(cct, 3) << "lstat exit (relpath " << relpath << " mask " << mask << ")" << dendl;
+  ldout(cct, 3) << "lstat exit (relpath" << relpath << " mask " << mask << ")" << dendl;
   return r;
 }
 
@@ -6542,16 +6397,12 @@ public:
     in->get();
   }
   void finish(int) {
-    // Called back by Filter, then Client is responsible for taking its own lock
-    assert(!cl->client_lock.is_locked_by_me()); 
     cl->sync_write_commit(in);
   }
 };
 
 void Client::sync_write_commit(Inode *in)
 {
-  Mutex::Locker l(client_lock);
-
   assert(unsafe_sync_write > 0);
   unsafe_sync_write--;
 
@@ -6588,13 +6439,8 @@ int Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf)
   if ((uint64_t)(offset+size) > mdsmap->get_max_filesize()) //too large!
     return -EFBIG;
 
-  {
-    const OSDMap *osdmap = objecter->get_osdmap_read();
-    bool full = osdmap->test_flag(CEPH_OSDMAP_FULL);
-    objecter->put_osdmap_read();
-    if (full)
-      return -ENOSPC;
-  }
+  if (osdmap->test_flag(CEPH_OSDMAP_FULL))
+    return -ENOSPC;
 
   //ldout(cct, 7) << "write fh " << fh << " size " << size << " offset " << offset << dendl;
   Inode *in = f->inode;
@@ -6723,7 +6569,7 @@ int Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf)
     r = filer->write_trunc(in->ino, &in->layout, in->snaprealm->get_snap_context(),
 			   offset, size, bl, ceph_clock_now(cct), 0,
 			   in->truncate_size, in->truncate_seq,
-			   onfinish, new C_OnFinisher(onsafe, &objecter_finisher));
+			   onfinish, onsafe);
     if (r < 0)
       goto done;
 
@@ -7490,15 +7336,41 @@ int Client::_getxattr(Inode *in, const char *name, void *value, size_t size,
 {
   int r;
 
-  const VXattr *vxattr = _match_vxattr(in, name);
-  if (vxattr) {
-    r = -ENODATA;
-
+  if (strncmp(name, "ceph.", 5) == 0) {
+    string n(name);
     char buf[256];
-    // call pointer-to-member function
-    if (!(vxattr->exists_cb && !(this->*(vxattr->exists_cb))(in)))
-      r = (this->*(vxattr->getxattr_cb))(in, buf, sizeof(buf));
 
+    r = -ENODATA;
+    if ((in->is_file() && n.find("ceph.file.layout") == 0) ||
+	(in->is_dir() && in->has_dir_layout() && n.find("ceph.dir.layout") == 0)) {
+      string rest = n.substr(n.find("layout"));
+      if (rest == "layout") {
+	r = snprintf(buf, sizeof(buf),
+		     "stripe_unit=%lu stripe_count=%lu object_size=%lu pool=",
+		     (long unsigned)in->layout.fl_stripe_unit,
+		     (long unsigned)in->layout.fl_stripe_count,
+		     (long unsigned)in->layout.fl_object_size);
+	if (osdmap->have_pg_pool(in->layout.fl_pg_pool))
+	  r += snprintf(buf + r, sizeof(buf) - r, "%s",
+			osdmap->get_pool_name(in->layout.fl_pg_pool));
+	else
+	  r += snprintf(buf + r, sizeof(buf) - r, "%lu",
+			(long unsigned)in->layout.fl_pg_pool);
+      } else if (rest == "layout.stripe_unit") {
+	r = snprintf(buf, sizeof(buf), "%lu", (long unsigned)in->layout.fl_stripe_unit);
+      } else if (rest == "layout.stripe_count") {
+	r = snprintf(buf, sizeof(buf), "%lu", (long unsigned)in->layout.fl_stripe_count);
+      } else if (rest == "layout.object_size") {
+	r = snprintf(buf, sizeof(buf), "%lu", (long unsigned)in->layout.fl_object_size);
+      } else if (rest == "layout.pool") {
+	if (osdmap->have_pg_pool(in->layout.fl_pg_pool))
+	  r = snprintf(buf, sizeof(buf), "%s",
+		       osdmap->get_pool_name(in->layout.fl_pg_pool));
+	else
+	  r = snprintf(buf, sizeof(buf), "%lu",
+		       (long unsigned)in->layout.fl_pg_pool);
+      }
+    }
     if (size != 0) {
       if (r > (int)size) {
 	r = -ERANGE;
@@ -7552,9 +7424,6 @@ int Client::_listxattr(Inode *in, char *name, size_t size, int uid, int gid)
 	 ++p)
       r += p->first.length() + 1;
 
-    const VXattr *vxattrs = _get_vxattrs(in);
-    r += _vxattrs_name_size(vxattrs);
-
     if (size != 0) {
       if (size >= (unsigned)r) {
 	for (map<string,bufferptr>::iterator p = in->xattrs.begin();
@@ -7565,20 +7434,6 @@ int Client::_listxattr(Inode *in, char *name, size_t size, int uid, int gid)
 	  *name = '\0';
 	  name++;
 	}
-	if (vxattrs) {
-	  for (int i = 0; !vxattrs[i].name.empty(); i++) {
-	    const VXattr& vxattr = vxattrs[i];
-	    if (vxattr.hidden)
-	      continue;
-	    // call pointer-to-member function
-	    if(vxattr.exists_cb && !(this->*(vxattr.exists_cb))(in))
-	      continue;
-	    memcpy(name, vxattr.name.c_str(), vxattr.name.length());
-	    name += vxattr.name.length();
-	    *name = '\0';
-	    name++;
-	  }
-	}
       } else
 	r = -ERANGE;
     }
@@ -7616,10 +7471,6 @@ int Client::_setxattr(Inode *in, const char *name, const void *value,
       strncmp(name, "ceph.", 5))
     return -EOPNOTSUPP;
 
-  const VXattr *vxattr = _match_vxattr(in, name);
-  if (vxattr && vxattr->readonly)
-    return -EOPNOTSUPP;
-
   if (!value)
     flags |= CEPH_XATTR_REMOVE;
 
@@ -7671,10 +7522,6 @@ int Client::_removexattr(Inode *in, const char *name, int uid, int gid)
       strncmp(name, "ceph.", 5))
     return -EOPNOTSUPP;
 
-  const VXattr *vxattr = _match_vxattr(in, name);
-  if (vxattr && vxattr->readonly)
-    return -EOPNOTSUPP;
-
   MetaRequest *req = new MetaRequest(CEPH_MDS_OP_RMXATTR);
   filepath path;
   in->make_nosnap_relative_path(path);
@@ -7704,180 +7551,6 @@ int Client::ll_removexattr(Inode *in, const char *name, int uid, int gid)
   return _removexattr(in, name, uid, gid);
 }
 
-bool Client::_vxattrcb_layout_exists(Inode *in)
-{
-  char *p = (char *)&in->layout;
-  for (size_t s = 0; s < sizeof(in->layout); s++, p++)
-    if (*p)
-      return true;
-  return false;
-}
-size_t Client::_vxattrcb_layout(Inode *in, char *val, size_t size)
-{
-  int r = snprintf(val, size,
-      "stripe_unit=%lld stripe_count=%lld object_size=%lld pool=",
-      (unsigned long long)in->layout.fl_stripe_unit,
-      (unsigned long long)in->layout.fl_stripe_count,
-      (unsigned long long)in->layout.fl_object_size);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  if (osdmap->have_pg_pool(in->layout.fl_pg_pool))
-    r += snprintf(val + r, size - r, "%s",
-	osdmap->get_pool_name(in->layout.fl_pg_pool).c_str());
-  else
-    r += snprintf(val + r, size - r, "%lld",
-	(unsigned long long)in->layout.fl_pg_pool);
-  objecter->put_osdmap_read();
-  return r;
-}
-size_t Client::_vxattrcb_layout_stripe_unit(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->layout.fl_stripe_unit);
-}
-size_t Client::_vxattrcb_layout_stripe_count(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->layout.fl_stripe_count);
-}
-size_t Client::_vxattrcb_layout_object_size(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->layout.fl_object_size);
-}
-size_t Client::_vxattrcb_layout_pool(Inode *in, char *val, size_t size)
-{
-  size_t r;
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  if (osdmap->have_pg_pool(in->layout.fl_pg_pool))
-    r = snprintf(val, size, "%s", osdmap->get_pool_name(in->layout.fl_pg_pool).c_str());
-  else
-    r = snprintf(val, size, "%lld", (unsigned long long)in->layout.fl_pg_pool);
-  objecter->put_osdmap_read();
-  return r;
-}
-size_t Client::_vxattrcb_dir_entries(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)(in->dirstat.nfiles + in->dirstat.nsubdirs));
-}
-size_t Client::_vxattrcb_dir_files(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->dirstat.nfiles);
-}
-size_t Client::_vxattrcb_dir_subdirs(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->dirstat.nsubdirs);
-}
-size_t Client::_vxattrcb_dir_rentries(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)(in->rstat.rfiles + in->rstat.rsubdirs));
-}
-size_t Client::_vxattrcb_dir_rfiles(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->rstat.rfiles);
-}
-size_t Client::_vxattrcb_dir_rsubdirs(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->rstat.rsubdirs);
-}
-size_t Client::_vxattrcb_dir_rbytes(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%lld", (unsigned long long)in->rstat.rbytes);
-}
-size_t Client::_vxattrcb_dir_rctime(Inode *in, char *val, size_t size)
-{
-  return snprintf(val, size, "%ld.09%ld", (long)in->rstat.rctime.sec(),
-      (long)in->rstat.rctime.nsec());
-}
-
-#define CEPH_XATTR_NAME(_type, _name) "ceph." #_type "." #_name
-#define CEPH_XATTR_NAME2(_type, _name, _name2) "ceph." #_type "." #_name "." #_name2
-
-#define XATTR_NAME_CEPH(_type, _name)				\
-{								\
-  name: CEPH_XATTR_NAME(_type, _name),				\
-  getxattr_cb: &Client::_vxattrcb_ ## _type ## _ ## _name,	\
-  readonly: true,						\
-  hidden: false,						\
-  exists_cb: NULL,						\
-}
-#define XATTR_LAYOUT_FIELD(_type, _name, _field)		\
-{								\
-  name: CEPH_XATTR_NAME2(_type, _name, _field),			\
-  getxattr_cb: &Client::_vxattrcb_ ## _name ## _ ## _field,	\
-  readonly: false,						\
-  hidden: true,							\
-  exists_cb: &Client::_vxattrcb_layout_exists,			\
-}
-
-const Client::VXattr Client::_dir_vxattrs[] = {
-  {
-    name: "ceph.dir.layout",
-    getxattr_cb: &Client::_vxattrcb_layout,
-    readonly: false,
-    hidden: true,
-    exists_cb: &Client::_vxattrcb_layout_exists,
-  },
-  XATTR_LAYOUT_FIELD(dir, layout, stripe_unit),
-  XATTR_LAYOUT_FIELD(dir, layout, stripe_count),
-  XATTR_LAYOUT_FIELD(dir, layout, object_size),
-  XATTR_LAYOUT_FIELD(dir, layout, pool),
-  XATTR_NAME_CEPH(dir, entries),
-  XATTR_NAME_CEPH(dir, files),
-  XATTR_NAME_CEPH(dir, subdirs),
-  XATTR_NAME_CEPH(dir, rentries),
-  XATTR_NAME_CEPH(dir, rfiles),
-  XATTR_NAME_CEPH(dir, rsubdirs),
-  XATTR_NAME_CEPH(dir, rbytes),
-  XATTR_NAME_CEPH(dir, rctime),
-  { name: "" }     /* Required table terminator */
-};
-
-const Client::VXattr Client::_file_vxattrs[] = {
-  {
-    name: "ceph.file.layout",
-    getxattr_cb: &Client::_vxattrcb_layout,
-    readonly: false,
-    hidden: true,
-    exists_cb: &Client::_vxattrcb_layout_exists,
-  },
-  XATTR_LAYOUT_FIELD(file, layout, stripe_unit),
-  XATTR_LAYOUT_FIELD(file, layout, stripe_count),
-  XATTR_LAYOUT_FIELD(file, layout, object_size),
-  XATTR_LAYOUT_FIELD(file, layout, pool),
-  { name: "" }     /* Required table terminator */
-};
-
-const Client::VXattr *Client::_get_vxattrs(Inode *in)
-{
-  if (in->is_dir())
-    return _dir_vxattrs;
-  else if (in->is_file())
-    return _file_vxattrs;
-  return NULL;
-}
-
-const Client::VXattr *Client::_match_vxattr(Inode *in, const char *name)
-{
-  if (strncmp(name, "ceph.", 5) == 0) {
-    const VXattr *vxattr = _get_vxattrs(in);
-    if (vxattr) {
-      while (!vxattr->name.empty()) {
-	if (vxattr->name == name)
-	  return vxattr;
-	vxattr++;
-      }
-    }
-  }
-  return NULL;
-}
-
-size_t Client::_vxattrs_calcu_name_size(const VXattr *vxattr)
-{
-  size_t len = 0;
-  while (!vxattr->name.empty()) {
-    if (!vxattr->hidden)
-      len += vxattr->name.length() + 1;
-    vxattr++;
-  }
-  return len;
-}
 
 int Client::ll_readlink(Inode *in, char *buf, size_t buflen, int uid, int gid)
 {
@@ -7992,9 +7665,7 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode,
 
   int64_t pool_id = -1;
   if (data_pool && *data_pool) {
-    const OSDMap * osdmap = objecter->get_osdmap_read();
     pool_id = osdmap->lookup_pg_pool_name(data_pool);
-    objecter->put_osdmap_read();
     if (pool_id < 0)
       return -EINVAL;
     if (pool_id > 0xffffffffll)
@@ -8227,6 +7898,13 @@ int Client::_unlink(Inode *dir, const char *name, int uid, int gid)
   req->set_inode(dir);
 
   res = make_request(req, uid, gid);
+  if (res == 0) {
+    if (dir->dir && dir->dir->dentries.count(name)) {
+      Dentry *dn = dir->dir->dentries[name];
+      unlink(dn, false);
+    }
+  }
+  ldout(cct, 10) << "unlink result is " << res << dendl;
 
   trim_cache();
   ldout(cct, 3) << "unlink(" << path << ") = " << res << dendl;
@@ -8282,6 +7960,15 @@ int Client::_rmdir(Inode *dir, const char *name, int uid, int gid)
   req->set_inode(in);
 
   res = make_request(req, uid, gid);
+  if (res == 0) {
+    if (dir->dir && dir->dir->dentries.count(name) ) {
+      Dentry *dn = dir->dir->dentries[name];
+      if (dn->inode->dir && dn->inode->dir->is_empty() &&
+	  (dn->inode->dn_set.size() == 1))
+	close_dir(dn->inode->dir);  // FIXME: maybe i shoudl proactively hose the whole subtree from cache?
+      unlink(dn, false);
+    }
+  }
 
   trim_cache();
   ldout(cct, 3) << "rmdir(" << path << ") = " << res << dendl;
@@ -8463,26 +8150,21 @@ int Client::ll_link(Inode *parent, Inode *newparent, const char *newname,
 int Client::ll_num_osds(void)
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  int ret = osdmap->get_num_osds();
-  objecter->put_osdmap_read();
-  return ret;
+  return osdmap->get_num_osds();
 }
 
 int Client::ll_osdaddr(int osd, uint32_t *addr)
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  bool exists = osdmap->exists(osd);
-  entity_addr_t g;
-  if (exists)
-    g = osdmap->get_addr(osd);
-  objecter->put_osdmap_read();
-  if (!exists) {
+  entity_addr_t g = osdmap->get_addr(osd);
+  uint32_t nb_addr = (g.in4_addr()).sin_addr.s_addr;
+
+  if (!(osdmap->exists(osd))) {
     return -1;
   }
-  uint32_t nb_addr = (g.in4_addr()).sin_addr.s_addr;
+
   *addr = ntohl(nb_addr);
+
   return 0;
 }
 
@@ -8528,9 +8210,8 @@ int Client::ll_get_stripe_osd(Inode *in, uint64_t blockno,
   uint64_t objectno = objectsetno * stripe_count + stripepos;  // object id
 
   object_t oid = file_object_t(ino, objectno);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  ceph_object_layout olayout = osdmap->file_to_object_layout(oid, *layout, "");
-  objecter->put_osdmap_read();
+  ceph_object_layout olayout
+    = objecter->osdmap->file_to_object_layout(oid, *layout, "");
 
   pg_t pg = (pg_t)olayout.ol_pgid;
   vector<int> osds;
@@ -8902,13 +8583,8 @@ int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
   if ((mode & FALLOC_FL_PUNCH_HOLE) && !(mode & FALLOC_FL_KEEP_SIZE))
     return -EOPNOTSUPP;
 
-  {
-    const OSDMap *osdmap = objecter->get_osdmap_read();
-    bool full = osdmap->test_flag(CEPH_OSDMAP_FULL);
-    objecter->put_osdmap_read();
-    if (full && !(mode & FALLOC_FL_PUNCH_HOLE))
-      return -ENOSPC;
-  }
+  if (osdmap->test_flag(CEPH_OSDMAP_FULL) && !(mode & FALLOC_FL_PUNCH_HOLE))
+    return -ENOSPC;
 
   Inode *in = fh->inode;
 
@@ -8972,7 +8648,7 @@ int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
                       in->snaprealm->get_snap_context(),
                       offset, length,
                       ceph_clock_now(cct),
-                      0, true, onfinish, new C_OnFinisher(onsafe, &objecter_finisher));
+                      0, true, onfinish, onsafe);
       if (r < 0)
         goto done;
 
@@ -9107,34 +8783,23 @@ int Client::fdescribe_layout(int fd, ceph_file_layout *lp)
 int64_t Client::get_pool_id(const char *pool_name)
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  int64_t pool = osdmap->lookup_pg_pool_name(pool_name);
-  objecter->put_osdmap_read();
-  return pool;
+  return osdmap->lookup_pg_pool_name(pool_name);
 }
 
 string Client::get_pool_name(int64_t pool)
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  string ret;
-  if (osdmap->have_pg_pool(pool))
-    ret = osdmap->get_pool_name(pool);
-  objecter->put_osdmap_read();
-  return ret;
+  if (!osdmap->have_pg_pool(pool))
+    return string();
+  return osdmap->get_pool_name(pool);
 }
 
 int Client::get_pool_replication(int64_t pool)
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  int ret;
   if (!osdmap->have_pg_pool(pool))
-    ret = -ENOENT;
-  else
-    ret = osdmap->get_pg_pool(pool)->get_size();
-  objecter->put_osdmap_read();
-  return ret;
+    return -ENOENT;
+  return osdmap->get_pg_pool(pool)->get_size();
 }
 
 int Client::get_file_extent_osds(int fd, loff_t off, loff_t *len, vector<int>& osds)
@@ -9150,11 +8815,8 @@ int Client::get_file_extent_osds(int fd, loff_t off, loff_t *len, vector<int>& o
   Striper::file_to_extents(cct, in->ino, &in->layout, off, 1, in->truncate_size, extents);
   assert(extents.size() == 1);
 
-  const OSDMap *osdmap = objecter->get_osdmap_read();
   pg_t pg = osdmap->object_locator_to_pg(extents[0].oid, extents[0].oloc);
   osdmap->pg_to_acting_osds(pg, osds);
-  objecter->put_osdmap_read();
-
   if (osds.empty())
     return -EINVAL;
 
@@ -9185,10 +8847,7 @@ int Client::get_osd_crush_location(int id, vector<pair<string, string> >& path)
   Mutex::Locker lock(client_lock);
   if (id < 0)
     return -EINVAL;
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  int ret = osdmap->crush->get_full_location_ordered(id, path);
-  objecter->put_osdmap_read();
-  return ret;
+  return osdmap->crush->get_full_location_ordered(id, path);
 }
 
 int Client::get_file_stripe_address(int fd, loff_t offset, vector<entity_addr_t>& address)
@@ -9206,34 +8865,30 @@ int Client::get_file_stripe_address(int fd, loff_t offset, vector<entity_addr_t>
   assert(extents.size() == 1);
 
   // now we have the object and its 'layout'
-  const OSDMap *osdmap = objecter->get_osdmap_read();
   pg_t pg = osdmap->object_locator_to_pg(extents[0].oid, extents[0].oloc);
   vector<int> osds;
   osdmap->pg_to_acting_osds(pg, osds);
-  int ret = 0;
-  if (!osds.empty()) {
-    ret = -EINVAL;
-  } else {
-    for (unsigned i = 0; i < osds.size(); i++) {
-      entity_addr_t addr = osdmap->get_addr(osds[i]);
-      address.push_back(addr);
-    }
+  if (osds.empty())
+    return -EINVAL;
+
+  for (unsigned i = 0; i < osds.size(); i++) {
+    entity_addr_t addr = osdmap->get_addr(osds[i]);
+    address.push_back(addr);
   }
-  objecter->put_osdmap_read();
-  return ret;
+
+  return 0;
 }
 
 int Client::get_osd_addr(int osd, entity_addr_t& addr)
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  int ret = 0;
+
   if (!osdmap->exists(osd))
-    ret = -ENOENT;
-  else
-    addr = osdmap->get_addr(osd);
-  objecter->put_osdmap_read();
-  return ret;
+    return -ENOENT;
+
+  addr = osdmap->get_addr(osd);
+
+  return 0;
 }
 
 int Client::enumerate_layout(int fd, vector<ObjectExtent>& result,
@@ -9260,12 +8915,11 @@ int Client::enumerate_layout(int fd, vector<ObjectExtent>& result,
 int Client::get_local_osd()
 {
   Mutex::Locker lock(client_lock);
-  const OSDMap *osdmap = objecter->get_osdmap_read();
+
   if (osdmap->get_epoch() != local_osd_epoch) {
     local_osd = osdmap->find_osd_on_ip(messenger->get_myaddr());
     local_osd_epoch = osdmap->get_epoch();
   }
-  objecter->put_osdmap_read();
   return local_osd;
 }
 
@@ -9279,11 +8933,15 @@ int Client::get_local_osd()
 void Client::ms_handle_connect(Connection *con)
 {
   ldout(cct, 10) << "ms_handle_connect on " << con->get_peer_addr() << dendl;
+  Mutex::Locker l(client_lock);
+  objecter->ms_handle_connect(con);
 }
 
 bool Client::ms_handle_reset(Connection *con)
 {
   ldout(cct, 0) << "ms_handle_reset on " << con->get_peer_addr() << dendl;
+  Mutex::Locker l(client_lock);
+  objecter->ms_handle_reset(con);
   return false;
 }
 
@@ -9292,6 +8950,10 @@ void Client::ms_handle_remote_reset(Connection *con)
   ldout(cct, 0) << "ms_handle_remote_reset on " << con->get_peer_addr() << dendl;
   Mutex::Locker l(client_lock);
   switch (con->get_peer_type()) {
+  case CEPH_ENTITY_TYPE_OSD:
+    objecter->ms_handle_remote_reset(con);
+    break;
+
   case CEPH_ENTITY_TYPE_MDS:
     {
       // kludge to figure out which mds this is; fixme with a Connection* state
diff --git a/src/client/Client.h b/src/client/Client.h
index 1ac9754..e31e90a 100644
--- a/src/client/Client.h
+++ b/src/client/Client.h
@@ -53,6 +53,7 @@ using std::fstream;
 #include "osdc/ObjectCacher.h"
 
 class MDSMap;
+class OSDMap;
 class MonClient;
 
 class CephContext;
@@ -108,7 +109,7 @@ struct DirEntry {
   DirEntry(const string &n, struct stat& s, int stm) : d_name(n), st(s), stmask(stm) {}
 };
 
-struct Inode;
+class Inode;
 struct Cap;
 class Dir;
 class Dentry;
@@ -209,6 +210,7 @@ class Client : public Dispatcher {
 
   // cluster descriptors
   MDSMap *mdsmap;
+  OSDMap *osdmap;
 
   SafeTimer timer;
 
@@ -223,7 +225,6 @@ class Client : public Dispatcher {
 
   Finisher async_ino_invalidator;
   Finisher async_dentry_invalidator;
-  Finisher objecter_finisher;
 
   Context *tick_event;
   utime_t last_cap_renew;
@@ -242,7 +243,6 @@ public:
   map<int, MetaSession*> mds_sessions;  // mds -> push seq
   list<Cond*> waiting_for_mdsmap;
 
-  void get_session_metadata(std::map<std::string, std::string> *meta) const;
   bool have_open_session(int mds);
   void got_mds_push(MetaSession *s);
   MetaSession *_get_mds_session(int mds, Connection *con);  ///< return session for mds *and* con; null otherwise
@@ -315,11 +315,6 @@ protected:
   int num_flushing_caps;
   ceph::unordered_map<inodeno_t,SnapRealm*> snap_realms;
 
-  // Optional extra metadata about me to send to the MDS
-  std::map<std::string, std::string> metadata;
-  void populate_metadata();
-
-
   /* async block write barrier support */
   //map<uint64_t, BarrierContext* > barriers;
 
@@ -379,8 +374,6 @@ protected:
   friend class C_Client_CacheInvalidate;  // calls ino_invalidate_cb
   friend class C_Client_DentryInvalidate;  // calls dentry_invalidate_cb
   friend class C_Block_Sync; // Calls block map and protected helpers
-  friend class C_C_Tick; // Asserts on client_lock
-  friend class C_Client_SyncCommit; // Asserts on client_lock
 
   //int get_cache_size() { return lru.lru_get_size(); }
   //void set_cache_size(int m) { lru.lru_set_max(m); }
@@ -391,7 +384,7 @@ protected:
    * a new inode to a pre-created Dentry
    */
   Dentry* link(Dir *dir, const string& name, Inode *in, Dentry *dn);
-  void unlink(Dentry *dn, bool keepdir, bool keepdentry);
+  void unlink(Dentry *dn, bool keepdir);
 
   // path traversal for high-level interface
   Inode *cwd;
@@ -432,8 +425,6 @@ protected:
   ~Client();
   void tear_down_cache();
 
-  void update_metadata(std::string const &k, std::string const &v);
-
   client_t get_nodeid() { return whoami; }
 
   inodeno_t get_root_ino();
@@ -622,49 +613,6 @@ private:
   vinodeno_t _get_vino(Inode *in);
   inodeno_t _get_inodeno(Inode *in);
 
-  /*
-   * These define virtual xattrs exposing the recursive directory
-   * statistics and layout metadata.
-   */
-  struct VXattr {
-	  const string name;
-	  size_t (Client::*getxattr_cb)(Inode *in, char *val, size_t size);
-	  bool readonly, hidden;
-	  bool (Client::*exists_cb)(Inode *in);
-  };
-
-  bool _vxattrcb_layout_exists(Inode *in);
-  size_t _vxattrcb_layout(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_layout_stripe_unit(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_layout_stripe_count(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_layout_object_size(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_layout_pool(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_entries(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_files(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_subdirs(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_rentries(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_rfiles(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_rsubdirs(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_rbytes(Inode *in, char *val, size_t size);
-  size_t _vxattrcb_dir_rctime(Inode *in, char *val, size_t size);
-  size_t _vxattrs_calcu_name_size(const VXattr *vxattrs);
-
-  static const VXattr _dir_vxattrs[];
-  static const VXattr _file_vxattrs[];
-
-  static const VXattr *_get_vxattrs(Inode *in);
-  static const VXattr *_match_vxattr(Inode *in, const char *name);
-
-  size_t _file_vxattrs_name_size;
-  size_t _dir_vxattrs_name_size;
-  size_t _vxattrs_name_size(const VXattr *vxattrs) {
-	  if (vxattrs == _dir_vxattrs)
-		  return _dir_vxattrs_name_size;
-	  else if (vxattrs == _file_vxattrs)
-		  return _file_vxattrs_name_size;
-	  return 0;
-  }
-
 public:
   int mount(const std::string &mount_root);
   void unmount();
diff --git a/src/client/ClientSnapRealm.h b/src/client/ClientSnapRealm.h
index 040430a..34d8956 100644
--- a/src/client/ClientSnapRealm.h
+++ b/src/client/ClientSnapRealm.h
@@ -8,7 +8,7 @@
 #include "common/snap_types.h"
 #include "include/xlist.h"
 
-struct Inode;
+class Inode;
 
 struct SnapRealm {
   inodeno_t ino;
diff --git a/src/client/Dentry.h b/src/client/Dentry.h
index dcfee83..c51a87c 100644
--- a/src/client/Dentry.h
+++ b/src/client/Dentry.h
@@ -4,7 +4,7 @@
 #include "include/lru.h"
 
 class Dir;
-struct Inode;
+class Inode;
 
 class Dentry : public LRUObject {
  public:
diff --git a/src/client/Dir.h b/src/client/Dir.h
index ad4ca52..f0029b1 100644
--- a/src/client/Dir.h
+++ b/src/client/Dir.h
@@ -1,7 +1,7 @@
 #ifndef CEPH_CLIENT_DIR_H
 #define CEPH_CLIENT_DIR_H
 
-struct Inode;
+class Inode;
 
 class Dir {
  public:
diff --git a/src/client/Fh.h b/src/client/Fh.h
index 235b244..083ccd1 100644
--- a/src/client/Fh.h
+++ b/src/client/Fh.h
@@ -3,7 +3,7 @@
 
 #include "include/types.h"
 
-struct Inode;
+class Inode;
 class Cond;
 
 // file handle for any open file state
diff --git a/src/client/Inode.cc b/src/client/Inode.cc
index 3f3de6a..2f6389d 100644
--- a/src/client/Inode.cc
+++ b/src/client/Inode.cc
@@ -11,7 +11,6 @@ ostream& operator<<(ostream &out, Inode &in)
 {
   out << in.vino() << "("
       << "ref=" << in._ref
-      << " ll_ref=" << in.ll_ref
       << " cap_refs=" << in.cap_refs
       << " open=" << in.open_by_mode
       << " mode=" << oct << in.mode << dec
@@ -138,7 +137,7 @@ int Inode::put_cap_ref(int cap)
 
 bool Inode::is_any_caps()
 {
-  return !caps.empty() || snap_caps;
+  return caps.size();
 }
 
 bool Inode::cap_is_valid(Cap* cap)
diff --git a/src/client/Inode.h b/src/client/Inode.h
index f0c3b32..221a91a 100644
--- a/src/client/Inode.h
+++ b/src/client/Inode.h
@@ -17,7 +17,7 @@ struct MetaSession;
 class Dentry;
 class Dir;
 struct SnapRealm;
-struct Inode;
+class Inode;
 
 struct Cap {
   MetaSession *session;
@@ -71,7 +71,8 @@ struct CapSnap {
 // inode flags
 #define I_COMPLETE 1
 
-struct Inode {
+class Inode {
+ public:
   CephContext *cct;
 
   // -- the actual inode --
diff --git a/src/client/MetaRequest.h b/src/client/MetaRequest.h
index fb7f5b1..45a90dc 100644
--- a/src/client/MetaRequest.h
+++ b/src/client/MetaRequest.h
@@ -16,7 +16,7 @@
 #include "messages/MClientRequest.h"
 
 class MClientReply;
-struct Inode;
+class Inode;
 class Dentry;
 
 struct MetaRequest {
@@ -27,7 +27,6 @@ private:
   Dentry *_old_dentry; //associated with path2
 public:
   uint64_t tid;
-  utime_t  op_stamp;
   ceph_mds_request_head head;
   filepath path, path2;
   bufferlist data;
@@ -76,7 +75,7 @@ public:
 
   Inode *target;
 
-  MetaRequest(int op) :
+  MetaRequest(int op) : 
     _inode(NULL), _old_inode(NULL), _other_inode(NULL),
     _dentry(NULL), _old_dentry(NULL),
     tid(0),
diff --git a/src/client/MetaSession.h b/src/client/MetaSession.h
index b6fd8f3..5525f07 100644
--- a/src/client/MetaSession.h
+++ b/src/client/MetaSession.h
@@ -12,7 +12,7 @@
 #include "messages/MClientCapRelease.h"
 
 struct Cap;
-struct Inode;
+class Inode;
 struct CapSnap;
 struct MetaRequest;
 class MClientCapRelease;
diff --git a/src/client/ObjecterWriteback.h b/src/client/ObjecterWriteback.h
index b7e4bd2..f2d903a 100644
--- a/src/client/ObjecterWriteback.h
+++ b/src/client/ObjecterWriteback.h
@@ -8,10 +8,7 @@
 
 class ObjecterWriteback : public WritebackHandler {
  public:
-  ObjecterWriteback(Objecter *o, Finisher *fin, Mutex *lock)
-    : m_objecter(o),
-      m_finisher(fin),
-      m_lock(lock) { }
+  ObjecterWriteback(Objecter *o) : m_objecter(o) {}
   virtual ~ObjecterWriteback() {}
 
   virtual void read(const object_t& oid, const object_locator_t& oloc,
@@ -19,13 +16,10 @@ class ObjecterWriteback : public WritebackHandler {
 		    bufferlist *pbl, uint64_t trunc_size,  __u32 trunc_seq,
 		    Context *onfinish) {
     m_objecter->read_trunc(oid, oloc, off, len, snapid, pbl, 0,
-			   trunc_size, trunc_seq,
-			   new C_OnFinisher(new C_Lock(m_lock, onfinish),
-					    m_finisher));
+			   trunc_size, trunc_seq, onfinish);
   }
 
-  virtual bool may_copy_on_write(const object_t& oid, uint64_t read_off,
-				 uint64_t read_len, snapid_t snapid) {
+  virtual bool may_copy_on_write(const object_t& oid, uint64_t read_off, uint64_t read_len, snapid_t snapid) {
     return false;
   }
 
@@ -34,22 +28,16 @@ class ObjecterWriteback : public WritebackHandler {
 		      const bufferlist &bl, utime_t mtime, uint64_t trunc_size,
 		      __u32 trunc_seq, Context *oncommit) {
     return m_objecter->write_trunc(oid, oloc, off, len, snapc, bl, mtime, 0,
-				   trunc_size, trunc_seq, NULL,
-				   new C_OnFinisher(new C_Lock(m_lock, oncommit),
-						    m_finisher));
+				   trunc_size, trunc_seq, NULL, oncommit);
   }
 
   virtual ceph_tid_t lock(const object_t& oid, const object_locator_t& oloc, int op,
 		     int flags, Context *onack, Context *oncommit) {
-    return m_objecter->lock(oid, oloc, op, flags, onack,
-			    new C_OnFinisher(new C_Lock(m_lock, oncommit),
-					     m_finisher));
+    return m_objecter->lock(oid, oloc, op, flags, onack, oncommit);
   }
 
  private:
   Objecter *m_objecter;
-  Finisher *m_finisher;
-  Mutex *m_lock;
 };
 
 #endif
diff --git a/src/client/SyntheticClient.cc b/src/client/SyntheticClient.cc
index 7b4f4a4..cd0f03e 100644
--- a/src/client/SyntheticClient.cc
+++ b/src/client/SyntheticClient.cc
@@ -1140,6 +1140,10 @@ int SyntheticClient::play_trace(Trace& t, string& prefix, bool metadata_only)
       const char *a = t.get_string(buf, p);
       list<string> contents;
       client->getdir(a, contents);
+    } else if (strcmp(op, "getdir") == 0) {
+      const char *a = t.get_string(buf, p);
+      list<string> contents;
+      client->getdir(a, contents);
     } else if (strcmp(op, "opendir") == 0) {
       const char *a = t.get_string(buf, p);
       int64_t b = t.get_int();
@@ -1722,9 +1726,7 @@ int SyntheticClient::dump_placement(string& fn) {
   for (vector<ObjectExtent>::iterator i = extents.begin(); 
        i != extents.end(); ++i) {
     
-    const OSDMap *osdmap = client->objecter->get_osdmap_read();
-    int osd = osdmap->get_pg_acting_primary(osdmap->object_locator_to_pg(i->oid, i->oloc));
-    client->objecter->put_osdmap_read();
+    int osd = client->osdmap->get_pg_acting_primary(client->osdmap->object_locator_to_pg(i->oid, i->oloc));
 
     // run through all the buffer extents
     for (vector<pair<uint64_t, uint64_t> >::iterator j = i->buffer_extents.begin();
@@ -2001,15 +2003,11 @@ int SyntheticClient::overload_osd_0(int n, int size, int wrsize) {
 
 
 // See what the primary is for the first object in this file.
-int SyntheticClient::check_first_primary(int fh)
-{
+int SyntheticClient::check_first_primary(int fh) {
   vector<ObjectExtent> extents;
   client->enumerate_layout(fh, extents, 1, 0);  
-  const OSDMap *osdmap = client->objecter->get_osdmap_read();
-  int primary = osdmap->get_pg_acting_primary(osdmap->object_locator_to_pg(extents.begin()->oid,
-									   extents.begin()->oloc));
-  client->objecter->put_osdmap_read();
-  return primary;
+  return client->osdmap->get_pg_acting_primary(client->osdmap->object_locator_to_pg(extents.begin()->oid,
+									     extents.begin()->oloc));
 }
 
 int SyntheticClient::rm_file(string& fn)
diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc
index c97c6df..7f419c3 100644
--- a/src/client/fuse_ll.cc
+++ b/src/client/fuse_ll.cc
@@ -64,10 +64,8 @@ static dev_t new_decode_dev(uint32_t dev)
 class CephFuse::Handle {
 public:
   Handle(Client *c, int fd);
-  ~Handle();
 
   int init(int argc, const char *argv[]);
-  int start();
   int loop();
   void finalize();
 
@@ -90,7 +88,6 @@ public:
   ceph::unordered_map<uint64_t,int> snap_stag_map;
   ceph::unordered_map<int,uint64_t> stag_snap_map;
 
-  struct fuse_args args;
 };
 
 static void fuse_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char *name)
@@ -777,12 +774,6 @@ CephFuse::Handle::Handle(Client *c, int fd) :
 {
   snap_stag_map[CEPH_NOSNAP] = 0;
   stag_snap_map[0] = CEPH_NOSNAP;
-  memset(&args, 0, sizeof(args));
-}
-
-CephFuse::Handle::~Handle()
-{
-  fuse_opt_free_args(&args);
 }
 
 void CephFuse::Handle::finalize()
@@ -834,41 +825,36 @@ int CephFuse::Handle::init(int argc, const char *argv[])
   for (int argctr = 1; argctr < argc; argctr++)
     newargv[newargc++] = argv[argctr];
 
-  derr << "init, newargv = " << newargv << " newargc=" << newargc << dendl;
-  struct fuse_args a = FUSE_ARGS_INIT(newargc, (char**)newargv);
-  args = a;  // Roundabout construction b/c FUSE_ARGS_INIT is for initialization not assignment
+  struct fuse_args args = FUSE_ARGS_INIT(newargc, (char**)newargv);
+  int ret = 0;
 
+  char *mountpoint;
   if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) == -1) {
     derr << "fuse_parse_cmdline failed." << dendl;
-    fuse_opt_free_args(&args);
-    free(newargv);
-    return EINVAL;
+    ret = EINVAL;
+    goto done;
   }
 
-  assert(args.allocated);  // Checking fuse has realloc'd args so we can free newargv
-  free(newargv);
-  return 0;
-}
-
-int CephFuse::Handle::start()
-{
   ch = fuse_mount(mountpoint, &args);
   if (!ch) {
     derr << "fuse_mount(mountpoint=" << mountpoint << ") failed." << dendl;
-    return EIO;
+    ret = EIO;
+    goto done;
   }
 
   se = fuse_lowlevel_new(&args, &fuse_ll_oper, sizeof(fuse_ll_oper), this);
   if (!se) {
     derr << "fuse_lowlevel_new failed" << dendl;
-    return EDOM;
+    ret = EDOM;
+    goto done;
   }
 
   signal(SIGTERM, SIG_DFL);
   signal(SIGINT, SIG_DFL);
   if (fuse_set_signal_handlers(se) == -1) {
     derr << "fuse_set_signal_handlers failed" << dendl;
-    return ENOSYS;
+    ret = ENOSYS;
+    goto done;
   }
 
   fuse_session_add_chan(se, ch);
@@ -891,7 +877,10 @@ int CephFuse::Handle::start()
   if (client->cct->_conf->fuse_use_invalidate_cb)
     client->ll_register_ino_invalidate_cb(ino_invalidate_cb, this);
 
-  return 0;
+done:
+  fuse_opt_free_args(&args);
+  free(newargv);
+  return ret;
 }
 
 int CephFuse::Handle::loop()
@@ -962,11 +951,6 @@ int CephFuse::init(int argc, const char *argv[])
   return _handle->init(argc, argv);
 }
 
-int CephFuse::start()
-{
-  return _handle->start();
-}
-
 int CephFuse::loop()
 {
   return _handle->loop();
@@ -976,12 +960,3 @@ void CephFuse::finalize()
 {
   return _handle->finalize();
 }
-
-std::string CephFuse::get_mount_point() const
-{
-  if (_handle->mountpoint) {
-    return _handle->mountpoint;
-  } else {
-    return "";
-  }
-}
diff --git a/src/client/fuse_ll.h b/src/client/fuse_ll.h
index 85e587b..cf0fb6a 100644
--- a/src/client/fuse_ll.h
+++ b/src/client/fuse_ll.h
@@ -17,12 +17,9 @@ public:
   CephFuse(Client *c, int fd);
   ~CephFuse();
   int init(int argc, const char *argv[]);
-  int start();
-  int mount();
   int loop();
   void finalize();
   class Handle;
-  std::string get_mount_point() const;
 private:
   CephFuse::Handle *_handle;
 };
diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc
index 68d9606..709036c 100644
--- a/src/cls/rbd/cls_rbd.cc
+++ b/src/cls/rbd/cls_rbd.cc
@@ -506,7 +506,7 @@ int get_protection_status(cls_method_context_t hctx, bufferlist *in,
   key_from_snap_id(snap_id.val, &snapshot_key);
   r = read_key(hctx, snapshot_key, &snap);
   if (r < 0) {
-    CLS_ERR("could not read key for snapshot id %" PRIu64, snap_id.val);
+    CLS_ERR("could not read key for snapshot id %"PRIu64, snap_id.val);
     return r;
   }
 
@@ -573,7 +573,7 @@ int set_protection_status(cls_method_context_t hctx, bufferlist *in,
   key_from_snap_id(snap_id.val, &snapshot_key);
   r = read_key(hctx, snapshot_key, &snap);
   if (r < 0) {
-    CLS_ERR("could not read key for snapshot id %" PRIu64, snap_id.val);
+    CLS_ERR("could not read key for snapshot id %"PRIu64, snap_id.val);
     return r;
   }
 
@@ -957,7 +957,7 @@ int add_child(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
   if (r < 0)
     return r;
 
-  CLS_LOG(20, "add_child %s to (%" PRIu64 ", %s, %" PRIu64 ")", c_image_id.c_str(),
+  CLS_LOG(20, "add_child %s to (%"PRIu64", %s, %"PRIu64")", c_image_id.c_str(),
 	  p_pool_id, p_image_id.c_str(), p_snap_id.val);
 
   string key = parent_key(p_pool_id, p_image_id, p_snap_id);
@@ -1011,7 +1011,7 @@ int remove_child(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
   if (r < 0)
     return r;
 
-  CLS_LOG(20, "remove_child %s from (%" PRIu64 ", %s, %" PRIu64 ")",
+  CLS_LOG(20, "remove_child %s from (%"PRIu64", %s, %"PRIu64")",
 	       c_image_id.c_str(), p_pool_id, p_image_id.c_str(),
 	       p_snap_id.val);
 
@@ -1072,7 +1072,7 @@ int get_children(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
   if (r < 0)
     return r;
 
-  CLS_LOG(20, "get_children of (%" PRIu64 ", %s, %" PRIu64 ")",
+  CLS_LOG(20, "get_children of (%"PRIu64", %s, %"PRIu64")",
 	  p_pool_id, p_image_id.c_str(), p_snap_id.val);
 
   string key = parent_key(p_pool_id, p_image_id, p_snap_id);
@@ -1423,7 +1423,7 @@ int get_id(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
 
   ::encode(id, *out);
   return 0;
-}
+};
 
 /**
  * Set the id of an image. The object must already exist.
diff --git a/src/cls/replica_log/cls_replica_log_types.h b/src/cls/replica_log/cls_replica_log_types.h
index b1cfe8e..6056f8e 100644
--- a/src/cls/replica_log/cls_replica_log_types.h
+++ b/src/cls/replica_log/cls_replica_log_types.h
@@ -189,6 +189,6 @@ public:
   void decode_json(JSONObj *obj);
   static void generate_test_instances(std::list<cls_replica_log_bound*>& ls);
 };
-WRITE_CLASS_ENCODER(cls_replica_log_bound)
+WRITE_CLASS_ENCODER(cls_replica_log_bound);
 
 #endif /* CLS_REPLICA_LOG_TYPES_H_ */
diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc
index eb4a423..7a15a90 100644
--- a/src/cls/rgw/cls_rgw.cc
+++ b/src/cls/rgw/cls_rgw.cc
@@ -755,7 +755,7 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, bufferlist *in, bufferlis
     if (cur_disk.pending_map.empty()) {
       if (cur_disk.exists) {
         struct rgw_bucket_category_stats& old_stats = header.stats[cur_disk.meta.category];
-        CLS_LOG(10, "total_entries: %" PRId64 " -> %" PRId64 "\n", old_stats.num_entries, old_stats.num_entries - 1);
+        CLS_LOG(10, "total_entries: %"PRId64" -> %"PRId64"\n", old_stats.num_entries, old_stats.num_entries - 1);
         old_stats.num_entries--;
         old_stats.total_size -= cur_disk.meta.size;
         old_stats.total_size_rounded -= get_rounded_size(cur_disk.meta.size);
@@ -771,7 +771,7 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, bufferlist *in, bufferlis
 	  return ret;
         break;
       case CEPH_RGW_UPDATE:
-        CLS_LOG(10, "CEPH_RGW_UPDATE name=%s total_entries: %" PRId64 " -> %" PRId64 "\n", cur_change.name.c_str(), stats.num_entries, stats.num_entries + 1);
+        CLS_LOG(10, "CEPH_RGW_UPDATE name=%s total_entries: %"PRId64" -> %"PRId64"\n", cur_change.name.c_str(), stats.num_entries, stats.num_entries + 1);
         stats.num_entries++;
         stats.total_size += cur_change.meta.size;
         stats.total_size_rounded += get_rounded_size(cur_change.meta.size);
diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc
index 87d6127..a26d0af 100644
--- a/src/cls/rgw/cls_rgw_client.cc
+++ b/src/cls/rgw/cls_rgw_client.cc
@@ -175,7 +175,7 @@ public:
     }
 
     ret_ctx->handle_response(r, ret.dir.header);
-  }
+  };
 };
 
 int cls_rgw_get_dir_header_async(IoCtx& io_ctx, string& oid, RGWGetDirHeader_CB *ctx)
diff --git a/src/common/AsyncReserver.h b/src/common/AsyncReserver.h
index 467e257..111db3f 100644
--- a/src/common/AsyncReserver.h
+++ b/src/common/AsyncReserver.h
@@ -21,7 +21,6 @@
 
 #include "common/Mutex.h"
 #include "common/Finisher.h"
-#include "common/Formatter.h"
 
 /**
  * Manages a configurable number of asyncronous reservations.
@@ -34,7 +33,6 @@ template <typename T>
 class AsyncReserver {
   Finisher *f;
   unsigned max_allowed;
-  unsigned min_priority;
   Mutex lock;
 
   map<unsigned, list<pair<T, Context*> > > queues;
@@ -44,9 +42,7 @@ class AsyncReserver {
   void do_queues() {
     typename map<unsigned, list<pair<T, Context*> > >::reverse_iterator it;
     for (it = queues.rbegin();
-         it != queues.rend() &&
-	   in_progress.size() < max_allowed &&
-	   it->first >= min_priority;
+         it != queues.rend() && in_progress.size() < max_allowed;
          ++it) {
       while (in_progress.size() < max_allowed &&
              !it->second.empty()) {
@@ -61,12 +57,8 @@ class AsyncReserver {
 public:
   AsyncReserver(
     Finisher *f,
-    unsigned max_allowed,
-    unsigned min_priority = 0)
-    : f(f),
-      max_allowed(max_allowed),
-      min_priority(min_priority),
-      lock("AsyncReserver::lock") {}
+    unsigned max_allowed)
+    : f(f), max_allowed(max_allowed), lock("AsyncReserver::lock") {}
 
   void set_max(unsigned max) {
     Mutex::Locker l(lock);
@@ -74,39 +66,6 @@ public:
     do_queues();
   }
 
-  void set_min_priority(unsigned min) {
-    Mutex::Locker l(lock);
-    min_priority = min;
-    do_queues();
-  }
-
-  void dump(Formatter *f) {
-    Mutex::Locker l(lock);
-    f->dump_unsigned("max_allowed", max_allowed);
-    f->dump_unsigned("min_priority", min_priority);
-    f->open_array_section("queues");
-    for (typename map<unsigned, list<pair<T, Context*> > > ::const_iterator p =
-	   queues.begin(); p != queues.end(); ++p) {
-      f->open_object_section("queue");
-      f->dump_unsigned("priority", p->first);
-      f->open_array_section("items");
-      for (typename list<pair<T, Context*> >::const_iterator q =
-	     p->second.begin(); q != p->second.end(); ++q) {
-	f->dump_stream("item") << q->first;
-      }
-      f->close_section();
-      f->close_section();
-    }
-    f->close_section();
-    f->open_array_section("in_progress");
-    for (typename set<T>::const_iterator p = in_progress.begin();
-	 p != in_progress.end();
-	 ++p) {
-      f->dump_stream("item") << *p;
-    }
-    f->close_section();
-  }
-
   /**
    * Requests a reservation
    *
diff --git a/src/common/BackTrace.cc b/src/common/BackTrace.cc
index 208c5de..886ed6a 100644
--- a/src/common/BackTrace.cc
+++ b/src/common/BackTrace.cc
@@ -64,6 +64,6 @@ void BackTrace::print(std::ostream& out)
     }
     free(function);
   }
-}
+};
 
 }
diff --git a/src/common/Finisher.cc b/src/common/Finisher.cc
index f3f4107..0cbfc44 100644
--- a/src/common/Finisher.cc
+++ b/src/common/Finisher.cc
@@ -11,19 +11,16 @@
 
 void Finisher::start()
 {
-  ldout(cct, 10) << __func__ << dendl;
   finisher_thread.create();
 }
 
 void Finisher::stop()
 {
-  ldout(cct, 10) << __func__ << dendl;
   finisher_lock.Lock();
   finisher_stop = true;
   finisher_cond.Signal();
   finisher_lock.Unlock();
   finisher_thread.join();
-  ldout(cct, 10) << __func__ << " finish" << dendl;
 }
 
 void Finisher::wait_for_empty()
diff --git a/src/common/Finisher.h b/src/common/Finisher.h
index 76a3944..610470e 100644
--- a/src/common/Finisher.h
+++ b/src/common/Finisher.h
@@ -55,36 +55,36 @@ class Finisher {
     } else
       finisher_queue.push_back(c);
     finisher_cond.Signal();
+    finisher_lock.Unlock();
     if (logger)
       logger->inc(l_finisher_queue_len);
-    finisher_lock.Unlock();
   }
   void queue(vector<Context*>& ls) {
     finisher_lock.Lock();
     finisher_queue.insert(finisher_queue.end(), ls.begin(), ls.end());
     finisher_cond.Signal();
-    if (logger)
-      logger->inc(l_finisher_queue_len, ls.size());
     finisher_lock.Unlock();
     ls.clear();
+    if (logger)
+      logger->inc(l_finisher_queue_len);
   }
   void queue(deque<Context*>& ls) {
     finisher_lock.Lock();
     finisher_queue.insert(finisher_queue.end(), ls.begin(), ls.end());
     finisher_cond.Signal();
-    if (logger)
-      logger->inc(l_finisher_queue_len, ls.size());
     finisher_lock.Unlock();
     ls.clear();
+    if (logger)
+      logger->inc(l_finisher_queue_len);
   }
   void queue(list<Context*>& ls) {
     finisher_lock.Lock();
     finisher_queue.insert(finisher_queue.end(), ls.begin(), ls.end());
     finisher_cond.Signal();
-    if (logger)
-      logger->inc(l_finisher_queue_len, ls.size());
     finisher_lock.Unlock();
     ls.clear();
+    if (logger)
+      logger->inc(l_finisher_queue_len);
   }
   
   void start();
@@ -104,7 +104,7 @@ class Finisher {
     finisher_thread(this) {
     PerfCountersBuilder b(cct, string("finisher-") + name,
 			  l_finisher_first, l_finisher_last);
-    b.add_u64(l_finisher_queue_len, "queue_len");
+    b.add_time_avg(l_finisher_queue_len, "queue_len");
     logger = b.create_perf_counters();
     cct->get_perfcounters_collection()->add(logger);
     logger->set(l_finisher_queue_len, 0);
@@ -122,10 +122,7 @@ class C_OnFinisher : public Context {
   Context *con;
   Finisher *fin;
 public:
-  C_OnFinisher(Context *c, Finisher *f) : con(c), fin(f) {
-    assert(fin != NULL);
-    assert(con != NULL);
-  }
+  C_OnFinisher(Context *c, Finisher *f) : con(c), fin(f) {}
   void finish(int r) {
     fin->queue(con, r);
   }
diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc
index 2458a70..8a6aed2 100644
--- a/src/common/Formatter.cc
+++ b/src/common/Formatter.cc
@@ -80,33 +80,6 @@ new_formatter(const std::string &type)
     else
       return (Formatter *)NULL;
 }
-
-void Formatter::dump_format(const char *name, const char *fmt, ...)
-{
-  va_list ap;
-  va_start(ap, fmt);
-  dump_format_va(name, NULL, true, fmt, ap);
-  va_end(ap);
-}
-
-void Formatter:: dump_format_ns(const char *name, const char *ns, const char *fmt, ...)
-{
-  va_list ap;
-  va_start(ap, fmt);
-  dump_format_va(name, ns, true, fmt, ap);
-  va_end(ap);
-
-}
-
-
-void Formatter::dump_format_unquoted(const char *name, const char *fmt, ...)
-{
-  va_list ap;
-  va_start(ap, fmt);
-  dump_format_va(name, NULL, false, fmt, ap);
-  va_end(ap);
-}
-
 // -----------------------
 JSONFormatter::JSONFormatter(bool p)
   : m_pretty(p), m_is_pending_string(false)
@@ -270,17 +243,28 @@ std::ostream& JSONFormatter::dump_stream(const char *name)
   return m_pending_string;
 }
 
-void JSONFormatter::dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap)
+void JSONFormatter::dump_format(const char *name, const char *fmt, ...)
 {
   char buf[LARGE_SIZE];
+  va_list ap;
+  va_start(ap, fmt);
   vsnprintf(buf, LARGE_SIZE, fmt, ap);
+  va_end(ap);
 
   print_name(name);
-  if (quoted) {
-    print_quoted_string(buf);
-  } else {
-    m_ss << buf;
-  }
+  print_quoted_string(buf);
+}
+
+void JSONFormatter::dump_format_unquoted(const char *name, const char *fmt, ...)
+{
+  char buf[LARGE_SIZE];
+  va_list ap;
+  va_start(ap, fmt);
+  vsnprintf(buf, LARGE_SIZE, fmt, ap);
+  va_end(ap);
+
+  print_name(name);
+  m_ss << buf;
 }
 
 int JSONFormatter::get_len() const
@@ -418,19 +402,32 @@ std::ostream& XMLFormatter::dump_stream(const char *name)
   return m_pending_string;
 }
 
-void XMLFormatter::dump_format_va(const char* name, const char *ns, bool quoted, const char *fmt, va_list ap)
+void XMLFormatter::dump_format(const char *name, const char *fmt, ...)
 {
   char buf[LARGE_SIZE];
+  va_list ap;
+  va_start(ap, fmt);
   vsnprintf(buf, LARGE_SIZE, fmt, ap);
+  va_end(ap);
 
   std::string e(name);
   print_spaces();
-  if (ns) {
-    m_ss << "<" << e  << " xmlns=\"" << ns << "\">" << buf << "</" << e << ">";
-  } else {
-    m_ss << "<" << e << ">" << escape_xml_str(buf) << "</" << e << ">";
-  }
+  m_ss << "<" << e << ">" << escape_xml_str(buf) << "</" << e << ">";
+  if (m_pretty)
+    m_ss << "\n";
+}
 
+void XMLFormatter::dump_format_unquoted(const char *name, const char *fmt, ...)
+{
+  char buf[LARGE_SIZE];
+  va_list ap;
+  va_start(ap, fmt);
+  vsnprintf(buf, LARGE_SIZE, fmt, ap);
+  va_end(ap);
+
+  std::string e(name);
+  print_spaces();
+  m_ss << "<" << e << ">" << buf << "</" << e << ">";
   if (m_pretty)
     m_ss << "\n";
 }
diff --git a/src/common/Formatter.h b/src/common/Formatter.h
index 5b76c3a..87b225a 100644
--- a/src/common/Formatter.h
+++ b/src/common/Formatter.h
@@ -48,10 +48,8 @@ class Formatter {
     dump_format_unquoted(name, "%s", (b ? "true" : "false"));
   }
   virtual std::ostream& dump_stream(const char *name) = 0;
-  virtual void dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap) = 0;
-  virtual void dump_format(const char *name, const char *fmt, ...);
-  virtual void dump_format_ns(const char *name, const char *ns, const char *fmt, ...);
-  virtual void dump_format_unquoted(const char *name, const char *fmt, ...);
+  virtual void dump_format(const char *name, const char *fmt, ...) = 0;
+  virtual void dump_format_unquoted(const char *name, const char *fmt, ...) = 0;
   virtual int get_len() const = 0;
   virtual void write_raw_data(const char *data) = 0;
 
@@ -85,7 +83,8 @@ class JSONFormatter : public Formatter {
   void dump_float(const char *name, double d);
   void dump_string(const char *name, std::string s);
   std::ostream& dump_stream(const char *name);
-  void dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap);
+  void dump_format(const char *name, const char *fmt, ...);
+  void dump_format_unquoted(const char *name, const char *fmt, ...);
   int get_len() const;
   void write_raw_data(const char *data);
 
@@ -125,7 +124,8 @@ class XMLFormatter : public Formatter {
   void dump_float(const char *name, double d);
   void dump_string(const char *name, std::string s);
   std::ostream& dump_stream(const char *name);
-  void dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap);
+  void dump_format(const char *name, const char *fmt, ...);
+  void dump_format_unquoted(const char *name, const char *fmt, ...);
   int get_len() const;
   void write_raw_data(const char *data);
 
diff --git a/src/common/LogClient.cc b/src/common/LogClient.cc
index 1a4a769..e4536c7 100644
--- a/src/common/LogClient.cc
+++ b/src/common/LogClient.cc
@@ -15,7 +15,6 @@
 
 
 #include "include/types.h"
-#include "include/str_map.h"
 
 #include "msg/Messenger.h"
 #include "msg/Message.h"
@@ -39,30 +38,6 @@
 #include "common/config.h"
 
 #define dout_subsys ceph_subsys_monc
-#undef dout_prefix
-#define dout_prefix _prefix(_dout, this)
-static ostream& _prefix(std::ostream *_dout, LogClient *logc) {
-  return *_dout << "log_client ";
-}
-
-static ostream& _prefix(std::ostream *_dout, LogChannel *lc) {
-  return *_dout << "log_channel(" << lc->get_log_channel() << ") ";
-}
-
-LogChannel::LogChannel(CephContext *cct, LogClient *lc, const string &channel)
-  : cct(cct), parent(lc), channel_lock("LogChannel::channel_lock"),
-    log_channel(channel), log_to_syslog(false), log_to_monitors(false)
-{
-}
-
-LogChannel::LogChannel(CephContext *cct, LogClient *lc,
-                       const string &channel, const string &facility,
-                       const string &prio)
-  : cct(cct), parent(lc), channel_lock("LogChannel::channel_lock"),
-    log_channel(channel), log_prio(prio), syslog_facility(facility),
-    log_to_syslog(false), log_to_monitors(false)
-{
-}
 
 LogClient::LogClient(CephContext *cct, Messenger *m, MonMap *mm,
 		     enum logclient_flag_t flags)
@@ -71,7 +46,7 @@ LogClient::LogClient(CephContext *cct, Messenger *m, MonMap *mm,
 {
 }
 
-LogClientTemp::LogClientTemp(clog_type type_, LogChannel &parent_)
+LogClientTemp::LogClientTemp(clog_type type_, LogClient &parent_)
   : type(type_), parent(parent_)
 {
 }
@@ -88,40 +63,44 @@ LogClientTemp::~LogClientTemp()
     parent.do_log(type, ss);
 }
 
-void LogChannel::do_log(clog_type prio, std::stringstream& ss)
+void LogClient::do_log(clog_type type, std::stringstream& ss)
 {
   while (!ss.eof()) {
     string s;
     getline(ss, s);
     if (!s.empty())
-      do_log(prio, s);
+      do_log(type, s);
   }
 }
 
-void LogChannel::do_log(clog_type prio, const std::string& s)
+void LogClient::do_log(clog_type type, const std::string& s)
 {
-  Mutex::Locker l(channel_lock);
-  int lvl = (prio == CLOG_ERROR ? -1 : 0);
-  ldout(cct,lvl) << "log " << prio << " : " << s << dendl;
+  Mutex::Locker l(log_lock);
+  ldout(cct,0) << "log " << type << " : " << s << dendl;
   LogEntry e;
-  // who will be set when we queue the entry on LogClient
-  //e.who = messenger->get_myinst();
+  e.who = messenger->get_myinst();
   e.stamp = ceph_clock_now(cct);
-  // seq will be set when we queue the entry on LogClient
-  // e.seq = ++last_log;
-  e.prio = prio;
+  e.seq = ++last_log;
+  e.type = type;
   e.msg = s;
-  e.channel = get_log_channel();
 
   // log to syslog?
-  if (do_log_to_syslog()) {
-    ldout(cct,0) << __func__ << " log to syslog"  << dendl;
-    e.log_to_syslog(get_log_prio(), get_syslog_facility());
+  if (cct->_conf->clog_to_syslog) {
+    e.log_to_syslog(cct->_conf->clog_to_syslog_level,
+		    cct->_conf->clog_to_syslog_facility);
   }
 
   // log to monitor?
-  if (log_to_monitors) {
-    parent->queue(e);
+  if (cct->_conf->clog_to_monitors) {
+    log_queue.push_back(e);
+
+    // if we are a monitor, queue for ourselves, synchronously
+    if (is_mon) {
+      assert(messenger->get_myname().is_mon());
+      ldout(cct,10) << "send_log to self" << dendl;
+      Message *log = _get_mon_log_message();
+      messenger->send_message(log, messenger->get_myinst());
+    }
   }
 }
 
@@ -189,31 +168,7 @@ Message *LogClient::_get_mon_log_message()
   return log;
 }
 
-void LogClient::_send_to_mon()
-{
-  assert(log_lock.is_locked());
-  assert(is_mon);
-  assert(messenger->get_myname().is_mon());
-  ldout(cct,10) << __func__ << "log to self" << dendl;
-  Message *log = _get_mon_log_message();
-  messenger->get_loopback_connection()->send_message(log);
-}
-
-version_t LogClient::queue(LogEntry &entry)
-{
-  Mutex::Locker l(log_lock);
-  entry.seq = ++last_log;
-  entry.who = messenger->get_myinst();
-  log_queue.push_back(entry);
-
-  if (is_mon) {
-    _send_to_mon();
-  }
-
-  return entry.seq;
-}
-
-bool LogClient::handle_log_ack(MLogAck *m)
+void LogClient::handle_log_ack(MLogAck *m)
 {
   Mutex::Locker l(log_lock);
   ldout(cct,10) << "handle_log_ack " << *m << dendl;
@@ -228,6 +183,6 @@ bool LogClient::handle_log_ack(MLogAck *m)
     ldout(cct,10) << " logged " << entry << dendl;
     q = log_queue.erase(q);
   }
-  return true;
+  m->put();
 }
 
diff --git a/src/common/LogClient.h b/src/common/LogClient.h
index 8d80823..d62147e 100644
--- a/src/common/LogClient.h
+++ b/src/common/LogClient.h
@@ -29,12 +29,10 @@ class MonMap;
 class Message;
 struct Connection;
 
-class LogChannel;
-
 class LogClientTemp
 {
 public:
-  LogClientTemp(clog_type type_, LogChannel &parent_);
+  LogClientTemp(clog_type type_, LogClient &parent_);
   LogClientTemp(const LogClientTemp &rhs);
   ~LogClientTemp();
 
@@ -46,28 +44,22 @@ public:
 
 private:
   clog_type type;
-  LogChannel &parent;
+  LogClient &parent;
   stringstream ss;
 };
 
-/** Manage where we output to and at which priority
- *
- * Not to be confused with the LogClient, which is the almighty coordinator
- * of channels.  We just deal with the boring part of the logging: send to
- * syslog, send to file, generate LogEntry and queue it for the LogClient.
- *
- * Past queueing the LogEntry, the LogChannel is done with the whole thing.
- * LogClient will deal with sending and handling of LogEntries.
- */
-class LogChannel
+class LogClient
 {
 public:
+  enum logclient_flag_t {
+    NO_FLAGS = 0,
+    FLAG_MON = 0x1,
+  };
+
+  LogClient(CephContext *cct, Messenger *m, MonMap *mm,
+	    enum logclient_flag_t flags);
 
-  LogChannel(CephContext *cct, LogClient *lc, const std::string &channel);
-  LogChannel(CephContext *cct, LogClient *lc,
-             const std::string &channel,
-             const std::string &facility,
-             const std::string &prio);
+  void handle_log_ack(MLogAck *m);
 
   LogClientTemp debug() {
     return LogClientTemp(CLOG_DEBUG, *this);
@@ -100,106 +92,14 @@ public:
     do_log(CLOG_SEC, s);
   }
 
-  void set_log_to_monitors(bool v) {
-    log_to_monitors = v;
-  }
-  void set_log_to_syslog(bool v) {
-    log_to_syslog = v;
-  }
-  void set_log_channel(const std::string& v) {
-    log_channel = v;
-  }
-  void set_log_prio(const std::string& v) {
-    log_prio = v;
-  }
-  void set_syslog_facility(const std::string& v) {
-    syslog_facility = v;
-  }
-  std::string get_log_prio() { return log_prio; }
-  std::string get_log_channel() { return log_channel; }
-  std::string get_syslog_facility() { return syslog_facility; }
-  bool must_log_to_syslog() { return log_to_syslog; }
-  /**
-   * Do we want to log to syslog?
-   *
-   * @return true if log_to_syslog is true and both channel and prio
-   *         are not empty; false otherwise.
-   */
-  bool do_log_to_syslog() {
-    return must_log_to_syslog() &&
-          !log_prio.empty() && !log_channel.empty();
-  }
-  bool must_log_to_monitors() { return log_to_monitors; }
-
-  typedef shared_ptr<LogChannel> Ref;
-
-private:
-  void do_log(clog_type prio, std::stringstream& ss);
-  void do_log(clog_type prio, const std::string& s);
-
-  CephContext *cct;
-  LogClient *parent;
-  Mutex channel_lock;
-  std::string log_channel;
-  std::string log_prio;
-  std::string syslog_facility;
-  bool log_to_syslog;
-  bool log_to_monitors;
-
-
-  friend class LogClientTemp;
-};
-
-typedef LogChannel::Ref LogChannelRef;
-
-class LogClient
-{
-public:
-  enum logclient_flag_t {
-    NO_FLAGS = 0,
-    FLAG_MON = 0x1,
-  };
-
-  LogClient(CephContext *cct, Messenger *m, MonMap *mm,
-	    enum logclient_flag_t flags);
-  virtual ~LogClient() {
-    channels.clear();
-  }
-
-  bool handle_log_ack(MLogAck *m);
   void reset_session();
   Message *get_mon_log_message();
   bool are_pending();
 
-  LogChannelRef create_channel() {
-    return create_channel(CLOG_CHANNEL_DEFAULT);
-  }
-
-  LogChannelRef create_channel(const std::string& name) {
-    LogChannelRef c;
-    if (channels.count(name))
-      c = channels[name];
-    else {
-      c = LogChannelRef(new LogChannel(cct, this, name));
-      channels[name] = c;
-    }
-    return c;
-  }
-
-  void destroy_channel(const std::string& name) {
-    if (channels.count(name))
-      channels.erase(name);
-  }
-
-  void shutdown() {
-    channels.clear();
-  }
-  
-  version_t queue(LogEntry &entry);
-
 private:
+  void do_log(clog_type type, std::stringstream& ss);
+  void do_log(clog_type type, const std::string& s);
   Message *_get_mon_log_message();
-  void _send_to_mon();
 
   CephContext *cct;
   Messenger *messenger;
@@ -210,7 +110,7 @@ private:
   version_t last_log;
   std::deque<LogEntry> log_queue;
 
-  std::map<std::string, LogChannelRef> channels;
-
+  friend class LogClientTemp;
 };
+
 #endif
diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc
index f3fb989..97b173f 100644
--- a/src/common/LogEntry.cc
+++ b/src/common/LogEntry.cc
@@ -130,69 +130,38 @@ int string_to_syslog_facility(string s)
   return LOG_USER;
 }
 
-string clog_type_to_string(clog_type t)
-{
-  switch (t) {
-    case CLOG_DEBUG:
-      return "debug";
-    case CLOG_INFO:
-      return "info";
-    case CLOG_WARN:
-      return "warn";
-    case CLOG_ERROR:
-      return "err";
-    case CLOG_SEC:
-      return "crit";
-    default:
-      assert(0);
-      return 0;
-  }
-}
-
 void LogEntry::log_to_syslog(string level, string facility)
 {
   int min = string_to_syslog_level(level);
-  int l = clog_type_to_syslog_level(prio);
+  int l = clog_type_to_syslog_level(type);
   if (l <= min) {
     int f = string_to_syslog_facility(facility);
-    syslog(l | f, "%s %llu : %s",
-	   stringify(who).c_str(),
-	   (long long unsigned)seq,
-	   msg.c_str());
+    syslog(l | f, "%s", stringify(*this).c_str());
   }
 }
 
 void LogEntry::encode(bufferlist& bl) const
 {
-  ENCODE_START(3, 2, bl);
-  __u16 t = prio;
+  ENCODE_START(2, 2, bl);
+  __u16 t = type;
   ::encode(who, bl);
   ::encode(stamp, bl);
   ::encode(seq, bl);
   ::encode(t, bl);
   ::encode(msg, bl);
-  ::encode(channel, bl);
   ENCODE_FINISH(bl);
 }
 
 void LogEntry::decode(bufferlist::iterator& bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
   __u16 t;
   ::decode(who, bl);
   ::decode(stamp, bl);
   ::decode(seq, bl);
   ::decode(t, bl);
-  prio = (clog_type)t;
+  type = (clog_type)t;
   ::decode(msg, bl);
-  if (struct_v >= 3) {
-    ::decode(channel, bl);
-  } else {
-    // prior to having logging channels we only had a cluster log.
-    // Ensure we keep that appearance when the other party has no
-    // clue of what a 'channel' is.
-    channel = CLOG_CHANNEL_CLUSTER;
-  }
   DECODE_FINISH(bl);
 }
 
@@ -201,8 +170,7 @@ void LogEntry::dump(Formatter *f) const
   f->dump_stream("who") << who;
   f->dump_stream("stamp") << stamp;
   f->dump_unsigned("seq", seq);
-  f->dump_string("channel", channel);
-  f->dump_stream("priority") << prio;
+  f->dump_stream("type") << type;
   f->dump_string("message", msg);
 }
 
diff --git a/src/common/LogEntry.h b/src/common/LogEntry.h
index 7329595..58022fe 100644
--- a/src/common/LogEntry.h
+++ b/src/common/LogEntry.h
@@ -32,11 +32,6 @@ typedef enum {
   CLOG_ERROR = 4,
 } clog_type;
 
-static const std::string CLOG_CHANNEL_NONE    = "none";
-static const std::string CLOG_CHANNEL_DEFAULT = "default";
-static const std::string CLOG_CHANNEL_CLUSTER = "cluster";
-static const std::string CLOG_CHANNEL_AUDIT   = "audit";
-
 /*
  * Given a clog log_type, return the equivalent syslog priority
  */
@@ -45,8 +40,6 @@ int clog_type_to_syslog_level(clog_type t);
 int string_to_syslog_level(string s);
 int string_to_syslog_facility(string s);
 
-string clog_type_to_string(clog_type t);
-
 
 struct LogEntryKey {
   entity_inst_t who;
@@ -71,11 +64,8 @@ struct LogEntry {
   entity_inst_t who;
   utime_t stamp;
   uint64_t seq;
-  clog_type prio;
+  clog_type type;
   string msg;
-  string channel;
-
-  LogEntry() : seq(0) {}
 
   LogEntryKey key() const { return LogEntryKey(who, stamp, seq); }
 
@@ -135,8 +125,7 @@ inline ostream& operator<<(ostream& out, clog_type t)
 
 inline ostream& operator<<(ostream& out, const LogEntry& e)
 {
-  return out << e.stamp << " " << e.who << " " << e.seq << " : "
-             << e.channel << " " << e.prio << " " << e.msg;
+  return out << e.stamp << " " << e.who << " " << e.seq << " : " << e.type << " " << e.msg;
 }
 
 #endif
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 0b99c6e..69e5ad3 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -39,7 +39,6 @@ libcommon_la_SOURCES = \
 	common/ceph_argparse.cc \
 	common/ceph_context.cc \
 	common/buffer.cc \
-	common/types.cc \
 	common/code_environment.cc \
 	common/dout.cc \
 	common/histogram.cc \
@@ -71,8 +70,7 @@ libcommon_la_SOURCES = \
 	common/addr_parsing.c \
 	common/hobject.cc \
 	common/bloom_filter.cc \
-	common/linux_version.c \
-	common/module.c
+	common/linux_version.c
 
 # these should go out of libcommon
 libcommon_la_SOURCES += \
@@ -196,22 +194,15 @@ noinst_HEADERS += \
 	common/utf8.h \
 	common/mime.h \
 	common/pick_address.h \
+	common/secret.h \
 	common/strtol.h \
 	common/static_assert.h \
 	common/AsyncReserver.h \
 	common/sync_filesystem.h \
 	common/cmdparse.h \
 	common/hobject.h \
-	common/linux_version.h \
-	common/module.h
+	common/linux_version.h
 
 noinst_LTLIBRARIES += libcommon.la
 
 
-libsecret_la_SOURCES = common/secret.c
-libsecret_la_LIBADD = $(KEYUTILS_LIB)
-if LINUX
-noinst_LTLIBRARIES += libsecret.la
-endif
-
-noinst_HEADERS += common/secret.h
diff --git a/src/common/Mutex.cc b/src/common/Mutex.cc
index a0c1202..f1e9a55 100644
--- a/src/common/Mutex.cc
+++ b/src/common/Mutex.cc
@@ -77,32 +77,20 @@ Mutex::~Mutex() {
 }
 
 void Mutex::Lock(bool no_lockdep) {
-  utime_t start;
-  int r;
-
   if (lockdep && g_lockdep && !no_lockdep) _will_lock();
 
   if (TryLock()) {
-    goto out;
+    return;
   }
 
+  utime_t start;
   if (logger && cct && cct->_conf->mutex_perf_counter)
     start = ceph_clock_now(cct);
-  r = pthread_mutex_lock(&_m);
+  int r = pthread_mutex_lock(&_m);
   if (logger && cct && cct->_conf->mutex_perf_counter)
     logger->tinc(l_mutex_wait,
 		 ceph_clock_now(cct) - start);
   assert(r == 0);
   if (lockdep && g_lockdep) _locked();
   _post_lock();
-
-out:
-  ;
-}
-
-void Mutex::Unlock() {
-  _pre_unlock();
-  if (lockdep && g_lockdep) _will_unlock();
-  int r = pthread_mutex_unlock(&_m);
-  assert(r == 0);
 }
diff --git a/src/common/Mutex.h b/src/common/Mutex.h
index e2ebe1f..e26a090 100644
--- a/src/common/Mutex.h
+++ b/src/common/Mutex.h
@@ -101,7 +101,12 @@ public:
       assert(nlock == 0);
     }
   }
-  void Unlock();
+  void Unlock() {
+    _pre_unlock();
+    if (lockdep && g_lockdep) _will_unlock();
+    int r = pthread_mutex_unlock(&_m);
+    assert(r == 0);
+  }
 
   friend class Cond;
 
diff --git a/src/common/RWLock.h b/src/common/RWLock.h
index e647e17..f901ac0 100644
--- a/src/common/RWLock.h
+++ b/src/common/RWLock.h
@@ -18,61 +18,41 @@
 #define CEPH_RWLock_Posix__H
 
 #include <pthread.h>
-#include <include/assert.h>
 #include "lockdep.h"
-#include "include/atomic.h"
 
 class RWLock
 {
   mutable pthread_rwlock_t L;
   const char *name;
   mutable int id;
-  mutable atomic_t nrlock, nwlock;
 
 public:
   RWLock(const RWLock& other);
   const RWLock& operator=(const RWLock& other);
 
-  RWLock(const char *n) : name(n), id(-1), nrlock(0), nwlock(0) {
+  RWLock(const char *n) : name(n), id(-1) {
     pthread_rwlock_init(&L, NULL);
     if (g_lockdep) id = lockdep_register(name);
   }
 
-  bool is_locked() const {
-    return (nrlock.read() > 0) || (nwlock.read() > 0);
-  }
-
-  bool is_wlocked() const {
-    return (nwlock.read() > 0);
-  }
   virtual ~RWLock() {
     pthread_rwlock_unlock(&L);
     pthread_rwlock_destroy(&L);
   }
 
-  void unlock(bool lockdep=true) const {
-    if (nwlock.read() > 0) {
-      nwlock.dec();
-    } else {
-      assert(nrlock.read() > 0);
-      nrlock.dec();
-    }
-    if (lockdep && g_lockdep) id = lockdep_will_unlock(name, id);
-    int r = pthread_rwlock_unlock(&L);
-    assert(r == 0);
+  void unlock() const {
+    if (g_lockdep) id = lockdep_will_unlock(name, id);
+    pthread_rwlock_unlock(&L);
   }
 
   // read
   void get_read() const {
     if (g_lockdep) id = lockdep_will_lock(name, id);
-    int r = pthread_rwlock_rdlock(&L);
-    assert(r == 0);
+    pthread_rwlock_rdlock(&L);
     if (g_lockdep) id = lockdep_locked(name, id);
-    nrlock.inc();
   }
   bool try_get_read() const {
     if (pthread_rwlock_tryrdlock(&L) == 0) {
-      nrlock.inc();
       if (g_lockdep) id = lockdep_locked(name, id);
       return true;
     }
@@ -83,18 +63,14 @@ public:
   }
 
   // write
-  void get_write(bool lockdep=true) {
-    if (lockdep && g_lockdep) id = lockdep_will_lock(name, id);
-    int r = pthread_rwlock_wrlock(&L);
-    assert(r == 0);
+  void get_write() {
+    if (g_lockdep) id = lockdep_will_lock(name, id);
+    pthread_rwlock_wrlock(&L);
     if (g_lockdep) id = lockdep_locked(name, id);
-    nwlock.inc();
-
   }
-  bool try_get_write(bool lockdep=true) {
+  bool try_get_write() {
     if (pthread_rwlock_trywrlock(&L) == 0) {
-      if (lockdep && g_lockdep) id = lockdep_locked(name, id);
-      nwlock.inc();
+      if (g_lockdep) id = lockdep_locked(name, id);
       return true;
     }
     return false;
@@ -103,117 +79,28 @@ public:
     unlock();
   }
 
-  void get(bool for_write) {
-    if (for_write) {
-      get_write();
-    } else {
-      get_read();
-    }
-  }
-
 public:
   class RLocker {
     const RWLock &m_lock;
 
-    bool locked;
-
   public:
     RLocker(const RWLock& lock) : m_lock(lock) {
       m_lock.get_read();
-      locked = true;
-    }
-    void unlock() {
-      assert(locked);
-      m_lock.unlock();
-      locked = false;
     }
     ~RLocker() {
-      if (locked) {
-        m_lock.unlock();
-      }
+      m_lock.put_read();
     }
   };
 
   class WLocker {
     RWLock &m_lock;
 
-    bool locked;
-
   public:
     WLocker(RWLock& lock) : m_lock(lock) {
       m_lock.get_write();
-      locked = true;
-    }
-    void unlock() {
-      assert(locked);
-      m_lock.unlock();
-      locked = false;
     }
     ~WLocker() {
-      if (locked) {
-        m_lock.unlock();
-      }
-    }
-  };
-
-  class Context {
-    RWLock& lock;
-
-  public:
-    enum LockState {
-      Untaken = 0,
-      TakenForRead = 1,
-      TakenForWrite = 2,
-    };
-
-  private:
-    LockState state;
-
-  public:
-    Context(RWLock& l) : lock(l) {}
-    Context(RWLock& l, LockState s) : lock(l), state(s) {}
-
-    void get_write() {
-      assert(state == Untaken);
-
-      lock.get_write();
-      state = TakenForWrite;
-    }
-
-    void get_read() {
-      assert(state == Untaken);
-
-      lock.get_read();
-      state = TakenForRead;
-    }
-
-    void unlock() {
-      assert(state != Untaken);
-      lock.unlock();
-      state = Untaken;
-    }
-
-    void promote() {
-      assert(state == TakenForRead);
-      unlock();
-      get_write();
-    }
-
-    LockState get_state() { return state; }
-    void set_state(LockState s) {
-      state = s;
-    }
-
-    bool is_locked() {
-      return (state != Untaken);
-    }
-
-    bool is_rlocked() {
-      return (state == TakenForRead);
-    }
-
-    bool is_wlocked() {
-      return (state == TakenForWrite);
+      m_lock.put_write();
     }
   };
 };
diff --git a/src/common/RefCountedObj.h b/src/common/RefCountedObj.h
index 729bbb9..042adb5 100644
--- a/src/common/RefCountedObj.h
+++ b/src/common/RefCountedObj.h
@@ -18,42 +18,22 @@
 #include "common/Mutex.h"
 #include "common/Cond.h"
 #include "include/atomic.h"
-#include "common/ceph_context.h"
+
 
 struct RefCountedObject {
-private:
   atomic_t nref;
-  CephContext *cct;
-public:
-  RefCountedObject(CephContext *c = NULL, int n=1) : nref(n), cct(c) {}
-  virtual ~RefCountedObject() {
-    assert(nref.read() == 0);
-  }
+  RefCountedObject() : nref(1) {}
+  virtual ~RefCountedObject() {}
   
   RefCountedObject *get() {
-    int v = nref.inc();
-    if (cct)
-      lsubdout(cct, refs, 1) << "RefCountedObject::get " << this << " "
-			     << (v - 1) << " -> " << v
-			     << dendl;
+    //generic_dout(0) << "RefCountedObject::get " << this << " " << nref.read() << " -> " << (nref.read() + 1) << dendl;
+    nref.inc();
     return this;
   }
   void put() {
-    CephContext *local_cct = cct;
-    int v = nref.dec();
-    if (v == 0)
+    //generic_dout(0) << "RefCountedObject::put " << this << " " << nref.read() << " -> " << (nref.read() - 1) << dendl;
+    if (nref.dec() == 0)
       delete this;
-    if (local_cct)
-      lsubdout(local_cct, refs, 1) << "RefCountedObject::put " << this << " "
-				   << (v + 1) << " -> " << v
-				   << dendl;
-  }
-  void set_cct(CephContext *c) {
-    cct = c;
-  }
-
-  uint64_t get_nref() {
-    return nref.read();
   }
 };
 
diff --git a/src/common/TextTable.h b/src/common/TextTable.h
index 282bf73..9f8e8ea 100644
--- a/src/common/TextTable.h
+++ b/src/common/TextTable.h
@@ -42,7 +42,7 @@ private:
     Align hd_align;
     Align col_align;
 
-    TextTableColumn() {}
+    TextTableColumn() {};
     TextTableColumn(std::string h, int w, Align ha, Align ca) :
 		    heading(h), width(w), hd_align(ha), col_align(ca) { }
     ~TextTableColumn() {}
diff --git a/src/common/Thread.h b/src/common/Thread.h
index 8c0b745..8173ca5 100644
--- a/src/common/Thread.h
+++ b/src/common/Thread.h
@@ -17,7 +17,6 @@
 #define CEPH_THREAD_H
 
 #include <pthread.h>
-#include <sys/types.h>
 
 class Thread {
  private:
diff --git a/src/common/Timer.cc b/src/common/Timer.cc
index e398841..f90d9ab 100644
--- a/src/common/Timer.cc
+++ b/src/common/Timer.cc
@@ -107,10 +107,6 @@ void SafeTimer::timer_thread()
 	lock.Lock();
     }
 
-    // recheck stopping if we dropped the lock
-    if (!safe_callbacks && stopping)
-      break;
-
     ldout(cct,20) << "timer_thread going to sleep" << dendl;
     if (schedule.empty())
       cond.Wait(lock);
@@ -195,190 +191,3 @@ void SafeTimer::dump(const char *caller) const
        ++s)
     ldout(cct,10) << " " << s->first << "->" << s->second << dendl;
 }
-
-class RWTimerThread : public Thread {
-  RWTimer *parent;
-public:
-  RWTimerThread(RWTimer *s) : parent(s) {}
-  void *entry() {
-    parent->timer_thread();
-    return NULL;
-  }
-};
-
-RWTimer::RWTimer(CephContext *cct_, RWLock &rwl, bool safe_callbacks)
-  : cct(cct_), rwlock(rwl), lock("RWTimer::lock"),
-    safe_callbacks(safe_callbacks),
-    thread(NULL)
-{
-}
-
-RWTimer::~RWTimer()
-{
-  assert(thread == NULL);
-}
-
-void RWTimer::init()
-{
-  ldout(cct,10) << "init" << dendl;
-  thread = new RWTimerThread(this);
-  thread->create();
-}
-
-void RWTimer::shutdown()
-{
-  ldout(cct,10) << "shutdown" << dendl;
-  if (thread) {
-    assert(rwlock.is_locked());
-    cancel_all_events();
-    stopping.set(1);
-    lock.Lock();
-    cond.Signal();
-    lock.Unlock();
-    rwlock.unlock();
-    thread->join();
-    rwlock.get_write();
-    delete thread;
-    thread = NULL;
-  }
-}
-
-void RWTimer::timer_thread()
-{
-  rwlock.get_write();
-  ldout(cct,10) << "timer_thread starting" << dendl;
-  lock.Lock();
-
-  while (!stopping.read()) {
-    utime_t now = ceph_clock_now(cct);
-
-    while (!schedule.empty()) {
-      scheduled_map_t::iterator p = schedule.begin();
-
-      // is the future now?
-      if (p->first > now)
-	break;
-
-      Context *callback = p->second;
-
-      events.erase(callback);
-      schedule.erase(p);
-      ldout(cct,10) << "timer_thread executing " << callback << dendl;
-
-      lock.Unlock();
-      
-      if (!safe_callbacks)
-	rwlock.unlock();
-      callback->complete(0);
-      if (!safe_callbacks)
-	rwlock.get_read();
-
-      lock.Lock();
-    }
-
-    /* need to drop off rwlock here, don't want to wait on lock when rwlock is taken */
-
-    rwlock.unlock();
-
-    ldout(cct,20) << "timer_thread going to sleep" << dendl;
-
-    if (schedule.empty())
-      cond.Wait(lock);
-    else
-      cond.WaitUntil(lock, schedule.begin()->first);
-
-    lock.Unlock();
-
-    ldout(cct,20) << "timer_thread awake" << dendl;
-
-    if (stopping.read()) {
-      ldout(cct,10) << "timer_thread exiting" << dendl;
-      return;
-    }
-
-    rwlock.get_write();
-    lock.Lock();
-  }
-  lock.Unlock();
-  ldout(cct,10) << "timer_thread exiting" << dendl;
-  rwlock.unlock();
-}
-
-void RWTimer::add_event_after(double seconds, Context *callback)
-{
-  utime_t when = ceph_clock_now(cct);
-  when += seconds;
-  add_event_at(when, callback);
-}
-
-void RWTimer::add_event_at(utime_t when, Context *callback)
-{
-  assert(rwlock.is_locked());
-
-  ldout(cct,10) << "add_event_at " << when << " -> " << callback << dendl;
-
-  Mutex::Locker l(lock);
-
-  scheduled_map_t::value_type s_val(when, callback);
-  scheduled_map_t::iterator i = schedule.insert(s_val);
-
-  event_lookup_map_t::value_type e_val(callback, i);
-  pair < event_lookup_map_t::iterator, bool > rval(events.insert(e_val));
-
-  /* If you hit this, you tried to insert the same Context* twice. */
-  assert(rval.second);
-
-  /* If the event we have just inserted comes before everything else, we need to
-   * adjust our timeout. */
-  if (i == schedule.begin())
-    cond.Signal();
-}
-
-bool RWTimer::cancel_event(Context *callback)
-{
-  assert(rwlock.is_locked());
-
-  Mutex::Locker l(lock);
-  
-  std::map<Context*, std::multimap<utime_t, Context*>::iterator>::iterator p = events.find(callback);
-  if (p == events.end()) {
-    ldout(cct,10) << "cancel_event " << callback << " not found" << dendl;
-    return false;
-  }
-
-  ldout(cct,10) << "cancel_event " << p->second->first << " -> " << callback << dendl;
-  delete p->first;
-
-  schedule.erase(p->second);
-  events.erase(p);
-  return true;
-}
-
-void RWTimer::cancel_all_events()
-{
-  assert(rwlock.is_locked());
-
-  ldout(cct,10) << "cancel_all_events" << dendl;
-
-  Mutex::Locker l(lock);
-  
-  while (!events.empty()) {
-    std::map<Context*, std::multimap<utime_t, Context*>::iterator>::iterator p = events.begin();
-    ldout(cct,10) << " cancelled " << p->second->first << " -> " << p->first << dendl;
-    delete p->first;
-    schedule.erase(p->second);
-    events.erase(p);
-  }
-}
-
-void RWTimer::dump(const char *caller) const
-{
-  if (!caller)
-    caller = "";
-  ldout(cct,10) << "dump " << caller << dendl;
-
-  for (scheduled_map_t::const_iterator s = schedule.begin();
-       s != schedule.end();
-       ++s)
-    ldout(cct,10) << " " << s->first << "->" << s->second << dendl;
-}
diff --git a/src/common/Timer.h b/src/common/Timer.h
index 374bd4a..40d5015 100644
--- a/src/common/Timer.h
+++ b/src/common/Timer.h
@@ -17,14 +17,12 @@
 
 #include "Cond.h"
 #include "Mutex.h"
-#include "RWLock.h"
 
 #include <map>
 
 class CephContext;
 class Context;
 class SafeTimerThread;
-class RWTimerThread;
 
 class SafeTimer
 {
@@ -94,75 +92,4 @@ public:
   void cancel_all_events();
 
 };
-
-class RWTimer
-{
-  // This class isn't supposed to be copied
-  RWTimer(const RWTimer &rhs);
-  RWTimer& operator=(const RWTimer &rhs);
-
-  CephContext *cct;
-  RWLock& rwlock;
-  Mutex lock;
-  Cond cond;
-  bool safe_callbacks;
-
-  friend class RWTimerThread;
-  RWTimerThread *thread;
-
-  void timer_thread();
-  void _shutdown();
-
-  std::multimap<utime_t, Context*> schedule;
-  std::map<Context*, std::multimap<utime_t, Context*>::iterator> events;
-  atomic_t stopping;
-
-  void dump(const char *caller = 0) const;
-
-public:
-  /* Safe callbacks determines whether callbacks are called with the lock
-   * held.
-   *
-   * safe_callbacks = true (default option) guarantees that a cancelled
-   * event's callback will never be called.
-   *
-   * Under some circumstances, holding the lock can cause lock cycles.
-   * If you are able to relax requirements on cancelled callbacks, then
-   * setting safe_callbacks = false eliminates the lock cycle issue.
-   * */
-  RWTimer(CephContext *cct, RWLock &rwl, bool safe_callbacks=true);
-  ~RWTimer();
-
-  /* Call with the event_lock UNLOCKED.
-   *
-   * Cancel all events and stop the timer thread.
-   *
-   * If there are any events that still have to run, they will need to take
-   * the event_lock first. */
-  void init();
-  void shutdown();
-
-  /* Schedule an event in the future
-   * Call with the event_lock LOCKED */
-  void add_event_after(double seconds, Context *callback);
-  void add_event_at(utime_t when, Context *callback);
-
-  /* Cancel an event.
-   * Call with the event_lock LOCKED
-   *
-   * Returns true if the callback was cancelled.
-   * Returns false if you never addded the callback in the first place.
-   */
-  bool cancel_event(Context *callback);
-
-  /* Cancel all events.
-   * Call with the event_lock LOCKED
-   *
-   * When this function returns, all events have been cancelled, and there are no
-   * more in progress.
-   */
-  void cancel_all_events();
-
-};
-
 #endif
diff --git a/src/common/TrackedOp.cc b/src/common/TrackedOp.cc
index 32dbc53..5a76f64 100644
--- a/src/common/TrackedOp.cc
+++ b/src/common/TrackedOp.cc
@@ -30,7 +30,6 @@ static ostream& _prefix(std::ostream* _dout)
 
 void OpHistory::on_shutdown()
 {
-  Mutex::Locker history_lock(ops_history_lock);
   arrived.clear();
   duration.clear();
   shutdown = true;
@@ -40,10 +39,8 @@ void OpHistory::insert(utime_t now, TrackedOpRef op)
 {
   if (shutdown)
     return;
-
-  Mutex::Locker history_lock(ops_history_lock);
   duration.insert(make_pair(op->get_duration(), op));
-  arrived.insert(make_pair(op->get_initiated(), op));
+  arrived.insert(make_pair(op->get_arrived(), op));
   cleanup(now);
 }
 
@@ -60,7 +57,7 @@ void OpHistory::cleanup(utime_t now)
 
   while (duration.size() > history_size) {
     arrived.erase(make_pair(
-	duration.begin()->second->get_initiated(),
+	duration.begin()->second->get_arrived(),
 	duration.begin()->second));
     duration.erase(duration.begin());
   }
@@ -68,7 +65,6 @@ void OpHistory::cleanup(utime_t now)
 
 void OpHistory::dump_ops(utime_t now, Formatter *f)
 {
-  Mutex::Locker history_lock(ops_history_lock);
   cleanup(now);
   f->open_object_section("OpHistory");
   f->dump_int("num to keep", history_size);
@@ -90,29 +86,24 @@ void OpHistory::dump_ops(utime_t now, Formatter *f)
 
 void OpTracker::dump_historic_ops(Formatter *f)
 {
+  Mutex::Locker locker(ops_in_flight_lock);
   utime_t now = ceph_clock_now(cct);
   history.dump_ops(now, f);
 }
 
 void OpTracker::dump_ops_in_flight(Formatter *f)
 {
+  Mutex::Locker locker(ops_in_flight_lock);
   f->open_object_section("ops_in_flight"); // overall dump
-  uint64_t total_ops_in_flight = 0;
+  f->dump_int("num_ops", ops_in_flight.size());
   f->open_array_section("ops"); // list of TrackedOps
   utime_t now = ceph_clock_now(cct);
-  for (uint32_t i = 0; i < num_optracker_shards; i++) {
-    ShardedTrackingData* sdata = sharded_in_flight_list[i];
-    assert(NULL != sdata); 
-    Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);    
-    for (xlist<TrackedOp*>::iterator p = sdata->ops_in_flight_sharded.begin(); !p.end(); ++p) {
-      f->open_object_section("op");
-      (*p)->dump(now, f);
-      f->close_section(); // this TrackedOp
-      total_ops_in_flight++;
-    }
+  for (xlist<TrackedOp*>::iterator p = ops_in_flight.begin(); !p.end(); ++p) {
+    f->open_object_section("op");
+    (*p)->dump(now, f);
+    f->close_section(); // this TrackedOp
   }
   f->close_section(); // list of TrackedOps
-  f->dump_int("num_ops", total_ops_in_flight);
   f->close_section(); // overall dump
 }
 
@@ -120,16 +111,9 @@ void OpTracker::register_inflight_op(xlist<TrackedOp*>::item *i)
 {
   if (!tracking_enabled)
     return;
-
-  uint64_t current_seq = seq.inc();
-  uint32_t shard_index = current_seq % num_optracker_shards;
-  ShardedTrackingData* sdata = sharded_in_flight_list[shard_index];
-  assert(NULL != sdata);
-  {
-    Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);
-    sdata->ops_in_flight_sharded.push_back(i);
-    sdata->ops_in_flight_sharded.back()->seq = current_seq;
-  }
+  Mutex::Locker locker(ops_in_flight_lock);
+  ops_in_flight.push_back(i);
+  ops_in_flight.back()->seq = seq++;
 }
 
 void OpTracker::unregister_inflight_op(TrackedOp *i)
@@ -137,94 +121,64 @@ void OpTracker::unregister_inflight_op(TrackedOp *i)
   // caller checks;
   assert(tracking_enabled);
 
-  uint32_t shard_index = i->seq % num_optracker_shards;
-  ShardedTrackingData* sdata = sharded_in_flight_list[shard_index];
-  assert(NULL != sdata);
-  {
-    Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);
-    assert(i->xitem.get_list() == &sdata->ops_in_flight_sharded);
-    i->xitem.remove_myself();
-  }
-  i->_unregistered();
+  Mutex::Locker locker(ops_in_flight_lock);
+  i->request->clear_data();
+  i->request->clear_payload();
+
+  assert(i->xitem.get_list() == &ops_in_flight);
   utime_t now = ceph_clock_now(cct);
+  i->xitem.remove_myself();
   history.insert(now, TrackedOpRef(i));
 }
 
 bool OpTracker::check_ops_in_flight(std::vector<string> &warning_vector)
 {
+  Mutex::Locker locker(ops_in_flight_lock);
+  if (!ops_in_flight.size()) // this covers tracking_enabled, too
+    return false;
+
   utime_t now = ceph_clock_now(cct);
   utime_t too_old = now;
   too_old -= complaint_time;
-  utime_t oldest_op;
-  uint64_t total_ops_in_flight = 0;
-  bool got_first_op = false;
-
-  for (uint32_t i = 0; i < num_optracker_shards; i++) {
-    ShardedTrackingData* sdata = sharded_in_flight_list[i];
-    assert(NULL != sdata);
-    Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);
-    if (!sdata->ops_in_flight_sharded.empty()) {
-      utime_t oldest_op_tmp = sdata->ops_in_flight_sharded.front()->get_initiated();
-      if (!got_first_op) {
-        oldest_op = oldest_op_tmp;
-        got_first_op = true;
-      } else if (oldest_op_tmp < oldest_op) {
-        oldest_op = oldest_op_tmp;
-      }
-    } 
-    total_ops_in_flight += sdata->ops_in_flight_sharded.size();
-  }
-      
-  if (0 == total_ops_in_flight)
-    return false;
 
-  utime_t oldest_secs = now - oldest_op;
+  utime_t oldest_secs = now - ops_in_flight.front()->get_arrived();
 
-  dout(10) << "ops_in_flight.size: " << total_ops_in_flight
+  dout(10) << "ops_in_flight.size: " << ops_in_flight.size()
            << "; oldest is " << oldest_secs
            << " seconds old" << dendl;
 
   if (oldest_secs < complaint_time)
     return false;
 
+  xlist<TrackedOp*>::iterator i = ops_in_flight.begin();
   warning_vector.reserve(log_threshold + 1);
 
   int slow = 0;     // total slow
   int warned = 0;   // total logged
-  for (uint32_t iter = 0; iter < num_optracker_shards; iter++) {
-    ShardedTrackingData* sdata = sharded_in_flight_list[iter];
-    assert(NULL != sdata);
-    Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);
-    if (sdata->ops_in_flight_sharded.empty())
-      continue;
-    xlist<TrackedOp*>::iterator i = sdata->ops_in_flight_sharded.begin();    
-    while (!i.end() && (*i)->get_initiated() < too_old) {
-      slow++;
+  while (!i.end() && (*i)->get_arrived() < too_old) {
+    slow++;
 
-      // exponential backoff of warning intervals
-      if (((*i)->get_initiated() +
+    // exponential backoff of warning intervals
+    if (((*i)->get_arrived() +
 	 (complaint_time * (*i)->warn_interval_multiplier)) < now) {
       // will warn
-        if (warning_vector.empty())
-          warning_vector.push_back("");
-        warned++;
-        if (warned > log_threshold)
-          break;
-
-        utime_t age = now - (*i)->get_initiated();
-        stringstream ss;
-        ss << "slow request " << age << " seconds old, received at "
-           << (*i)->get_initiated() << ": ";
-        (*i)->_dump_op_descriptor_unlocked(ss);
-        ss << " currently "
-	   << ((*i)->current.size() ? (*i)->current : (*i)->state_string());
-        warning_vector.push_back(ss.str());
-
-        // only those that have been shown will backoff
-        (*i)->warn_interval_multiplier *= 2;
-      }
-      ++i;
+      if (warning_vector.empty())
+	warning_vector.push_back("");
+      warned++;
+      if (warned > log_threshold)
+        break;
+
+      utime_t age = now - (*i)->get_arrived();
+      stringstream ss;
+      ss << "slow request " << age << " seconds old, received at " << (*i)->get_arrived()
+	 << ": " << *((*i)->request) << " currently "
+	 << ((*i)->current.size() ? (*i)->current : (*i)->state_string());
+      warning_vector.push_back(ss.str());
+
+      // only those that have been shown will backoff
+      (*i)->warn_interval_multiplier *= 2;
     }
+    ++i;
   }
 
   // only summarize if we warn about any.  if everything has backed
@@ -241,74 +195,64 @@ bool OpTracker::check_ops_in_flight(std::vector<string> &warning_vector)
 
 void OpTracker::get_age_ms_histogram(pow2_hist_t *h)
 {
+  Mutex::Locker locker(ops_in_flight_lock);
+
   h->clear();
 
   utime_t now = ceph_clock_now(NULL);
   unsigned bin = 30;
   uint32_t lb = 1 << (bin-1);  // lower bound for this bin
   int count = 0;
-  
-  for (uint32_t iter = 0; iter < num_optracker_shards; iter++) {
-    ShardedTrackingData* sdata = sharded_in_flight_list[iter];
-    assert(NULL != sdata);
-    Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);
-
-    for (xlist<TrackedOp*>::iterator i = sdata->ops_in_flight_sharded.begin();
-                                                               !i.end(); ++i) {
-      utime_t age = now - (*i)->get_initiated();
-      uint32_t ms = (long)(age * 1000.0);
-      if (ms >= lb) {
-        count++;
-        continue;
-      }
-      if (count)
-        h->set_bin(bin, count);
-      while (lb > ms) {
-        bin--;
-        lb >>= 1;
-      }
-      count = 1;
+  for (xlist<TrackedOp*>::iterator i = ops_in_flight.begin(); !i.end(); ++i) {
+    utime_t age = now - (*i)->get_arrived();
+    uint32_t ms = (long)(age * 1000.0);
+    if (ms >= lb) {
+      count++;
+      continue;
+    }
+    if (count)
+      h->set_bin(bin, count);
+    while (lb > ms) {
+      bin--;
+      lb >>= 1;
     }
+    count = 1;
   }
   if (count)
     h->set_bin(bin, count);
 }
 
-void OpTracker::mark_event(TrackedOp *op, const string &dest, utime_t time)
+void OpTracker::mark_event(TrackedOp *op, const string &dest)
 {
   if (!tracking_enabled)
     return;
-  return _mark_event(op, dest, time);
+  utime_t now = ceph_clock_now(cct);
+  return _mark_event(op, dest, now);
 }
 
 void OpTracker::_mark_event(TrackedOp *op, const string &evt,
 			    utime_t time)
 {
-  dout(5);
-  *_dout  <<  "seq: " << op->seq
+  Mutex::Locker locker(ops_in_flight_lock);
+  dout(5) << //"reqid: " << op->get_reqid() <<
+	     ", seq: " << op->seq
 	  << ", time: " << time << ", event: " << evt
-	  << ", op: ";
-  op->_dump_op_descriptor_unlocked(*_dout);
-  *_dout << dendl;
-     
+	  << ", request: " << *op->request << dendl;
 }
 
 void OpTracker::RemoveOnDelete::operator()(TrackedOp *op) {
-  op->mark_event("done");
   if (!tracker->tracking_enabled) {
-    op->_unregistered();
+    op->request->clear_data();
     delete op;
     return;
   }
+  op->mark_event("done");
   tracker->unregister_inflight_op(op);
   // Do not delete op, unregister_inflight_op took control
 }
 
 void TrackedOp::mark_event(const string &event)
 {
-  if (!tracker->tracking_enabled)
-    return;
-
   utime_t now = ceph_clock_now(g_ceph_context);
   {
     Mutex::Locker l(lock);
@@ -320,11 +264,12 @@ void TrackedOp::mark_event(const string &event)
 
 void TrackedOp::dump(utime_t now, Formatter *f) const
 {
+  Message *m = request;
   stringstream name;
-  _dump_op_descriptor_unlocked(name);
+  m->print(name);
   f->dump_string("description", name.str().c_str()); // this TrackedOp
-  f->dump_stream("initiated_at") << get_initiated();
-  f->dump_float("age", now - get_initiated());
+  f->dump_stream("received_at") << get_arrived();
+  f->dump_float("age", now - get_arrived());
   f->dump_float("duration", get_duration());
   {
     f->open_array_section("type_data");
diff --git a/src/common/TrackedOp.h b/src/common/TrackedOp.h
index 6c28a89..4673c1b 100644
--- a/src/common/TrackedOp.h
+++ b/src/common/TrackedOp.h
@@ -29,14 +29,13 @@ class OpTracker;
 class OpHistory {
   set<pair<utime_t, TrackedOpRef> > arrived;
   set<pair<double, TrackedOpRef> > duration;
-  Mutex ops_history_lock;
   void cleanup(utime_t now);
   bool shutdown;
   uint32_t history_size;
   uint32_t history_duration;
 
 public:
-  OpHistory() : ops_history_lock("OpHistory::Lock"), shutdown(false),
+  OpHistory() : shutdown(false),
   history_size(0), history_duration(0) {}
   ~OpHistory() {
     assert(arrived.empty());
@@ -60,36 +59,19 @@ class OpTracker {
   };
   friend class RemoveOnDelete;
   friend class OpHistory;
-  atomic64_t seq;
-  struct ShardedTrackingData {
-    Mutex ops_in_flight_lock_sharded;
-    xlist<TrackedOp *> ops_in_flight_sharded;
-    ShardedTrackingData(string lock_name):
-        ops_in_flight_lock_sharded(lock_name.c_str()) {}
-  };
-  vector<ShardedTrackingData*> sharded_in_flight_list;
-  uint32_t num_optracker_shards;
+  uint64_t seq;
+  Mutex ops_in_flight_lock;
+  xlist<TrackedOp *> ops_in_flight;
   OpHistory history;
   float complaint_time;
   int log_threshold;
-  void _mark_event(TrackedOp *op, const string &evt, utime_t now);
 
 public:
   bool tracking_enabled;
   CephContext *cct;
-  OpTracker(CephContext *cct_, bool tracking, uint32_t num_shards) : seq(0), 
-                                     num_optracker_shards(num_shards),
-				     complaint_time(0), log_threshold(0),
-				     tracking_enabled(tracking), cct(cct_) {
-
-    for (uint32_t i = 0; i < num_optracker_shards; i++) {
-      char lock_name[32] = {0};
-      snprintf(lock_name, sizeof(lock_name), "%s:%d", "OpTracker::ShardedLock", i);
-      ShardedTrackingData* one_shard = new ShardedTrackingData(lock_name);
-      sharded_in_flight_list.push_back(one_shard);
-    }
-  }
-      
+  OpTracker(CephContext *cct_, bool tracking) : seq(0), ops_in_flight_lock("OpTracker mutex"),
+						complaint_time(0), log_threshold(0),
+						tracking_enabled(tracking), cct(cct_) {}
   void set_complaint_and_threshold(float time, int threshold) {
     complaint_time = time;
     log_threshold = threshold;
@@ -113,25 +95,30 @@ public:
    * @return True if there are any Ops to warn on, false otherwise.
    */
   bool check_ops_in_flight(std::vector<string> &warning_strings);
-  void mark_event(TrackedOp *op, const string &evt,
-                          utime_t time = ceph_clock_now(g_ceph_context));
+  void mark_event(TrackedOp *op, const string &evt);
+  void _mark_event(TrackedOp *op, const string &evt, utime_t now);
 
   void on_shutdown() {
+    Mutex::Locker l(ops_in_flight_lock);
     history.on_shutdown();
   }
   ~OpTracker() {
-    while (!sharded_in_flight_list.empty()) {
-      assert((sharded_in_flight_list.back())->ops_in_flight_sharded.empty());
-      delete sharded_in_flight_list.back();
-      sharded_in_flight_list.pop_back();
-    }    
+    assert(ops_in_flight.empty());
   }
 
-  template <typename T, typename U>
-  typename T::Ref create_request(U params)
+  template <typename T>
+  typename T::Ref create_request(Message *ref)
   {
-    typename T::Ref retval(new T(params, this),
+    typename T::Ref retval(new T(ref, this),
 			   RemoveOnDelete(this));
+    
+    _mark_event(retval.get(), "header_read", ref->get_recv_stamp());
+    _mark_event(retval.get(), "throttled", ref->get_throttle_stamp());
+    _mark_event(retval.get(), "all_read", ref->get_recv_complete_stamp());
+    _mark_event(retval.get(), "dispatched", ref->get_dispatch_stamp());
+    
+    retval->init_from_message();
+    
     return retval;
   }
 };
@@ -142,49 +129,46 @@ private:
   friend class OpTracker;
   xlist<TrackedOp*>::item xitem;
 protected:
+  Message *request; /// the logical request we are tracking
   OpTracker *tracker; /// the tracker we are associated with
 
-  utime_t initiated_at;
   list<pair<utime_t, string> > events; /// list of events and their times
-  mutable Mutex lock; /// to protect the events list
+  Mutex lock; /// to protect the events list
   string current; /// the current state the event is in
   uint64_t seq; /// a unique value set by the OpTracker
 
   uint32_t warn_interval_multiplier; // limits output of a given op warning
 
-  TrackedOp(OpTracker *_tracker, const utime_t& initiated) :
+  TrackedOp(Message *req, OpTracker *_tracker) :
     xitem(this),
+    request(req),
     tracker(_tracker),
-    initiated_at(initiated),
     lock("TrackedOp::lock"),
     seq(0),
     warn_interval_multiplier(1)
   {
     tracker->register_inflight_op(&xitem);
-    events.push_back(make_pair(initiated_at, "initiated"));
   }
 
+  virtual void init_from_message() {}
   /// output any type-specific data you want to get when dump() is called
   virtual void _dump(utime_t now, Formatter *f) const {}
   /// if you want something else to happen when events are marked, implement
   virtual void _event_marked() {}
-  /// return a unique descriptor of the Op; eg the message it's attached to
-  virtual void _dump_op_descriptor_unlocked(ostream& stream) const = 0;
-  /// called when the last non-OpTracker reference is dropped
-  virtual void _unregistered() {};
 
 public:
-  virtual ~TrackedOp() {}
+  virtual ~TrackedOp() { assert(request); request->put(); }
 
-  const utime_t& get_initiated() const {
-    return initiated_at;
+  utime_t get_arrived() const {
+    return request->get_recv_stamp();
   }
   // This function maybe needs some work; assumes last event is completion time
   double get_duration() const {
     return events.size() ?
-      (events.rbegin()->first - get_initiated()) :
+      (events.rbegin()->first - get_arrived()) :
       0.0;
   }
+  Message *get_req() const { return request; }
 
   void mark_event(const string &event);
   virtual const char *state_string() const {
diff --git a/src/common/WorkQueue.cc b/src/common/WorkQueue.cc
index 5c7fefc..0f8bc9d 100644
--- a/src/common/WorkQueue.cc
+++ b/src/common/WorkQueue.cc
@@ -280,145 +280,3 @@ void ThreadPool::set_ioprio(int cls, int priority)
       lderr(cct) << " set_ioprio got " << cpp_strerror(r) << dendl;
   }
 }
-
-ShardedThreadPool::ShardedThreadPool(CephContext *pcct_, string nm, 
-  uint32_t pnum_threads): cct(pcct_),name(nm),lockname(nm + "::lock"), 
-  shardedpool_lock(lockname.c_str()),num_threads(pnum_threads),stop_threads(0), 
-  pause_threads(0),drain_threads(0), num_paused(0), num_drained(0), wq(NULL) {}
-
-void ShardedThreadPool::shardedthreadpool_worker(uint32_t thread_index)
-{
-  assert(wq != NULL);
-  ldout(cct,10) << "worker start" << dendl;
-
-  std::stringstream ss;
-  ss << name << " thread " << (void*)pthread_self();
-  heartbeat_handle_d *hb = cct->get_heartbeat_map()->add_worker(ss.str());
-
-  while (!stop_threads.read()) {
-    if(pause_threads.read()) {
-      shardedpool_lock.Lock();
-      ++num_paused;
-      wait_cond.Signal();
-      while(pause_threads.read()) {
-       cct->get_heartbeat_map()->reset_timeout(hb, 4, 0);
-       shardedpool_cond.WaitInterval(cct, shardedpool_lock, utime_t(2, 0));
-      }
-      --num_paused;
-      shardedpool_lock.Unlock();
-    }
-    if (drain_threads.read()) {
-      shardedpool_lock.Lock();
-      if (wq->is_shard_empty(thread_index)) {
-        ++num_drained;
-        wait_cond.Signal();
-        while (drain_threads.read()) {
-          cct->get_heartbeat_map()->reset_timeout(hb, 4, 0);
-          shardedpool_cond.WaitInterval(cct, shardedpool_lock, utime_t(2, 0));
-        }
-        --num_drained;
-      }
-      shardedpool_lock.Unlock();
-    }
-
-    wq->_process(thread_index, hb);
-
-  }
-
-  ldout(cct,10) << "sharded worker finish" << dendl;
-
-  cct->get_heartbeat_map()->remove_worker(hb);
-
-}
-
-void ShardedThreadPool::start_threads()
-{
-  assert(shardedpool_lock.is_locked());
-  int32_t thread_index = 0;
-  while (threads_shardedpool.size() < num_threads) {
-
-    WorkThreadSharded *wt = new WorkThreadSharded(this, thread_index);
-    ldout(cct, 10) << "start_threads creating and starting " << wt << dendl;
-    threads_shardedpool.push_back(wt);
-    wt->create();
-    thread_index++;
-  }
-}
-
-void ShardedThreadPool::start()
-{
-  ldout(cct,10) << "start" << dendl;
-
-  shardedpool_lock.Lock();
-  start_threads();
-  shardedpool_lock.Unlock();
-  ldout(cct,15) << "started" << dendl;
-}
-
-void ShardedThreadPool::stop()
-{
-  ldout(cct,10) << "stop" << dendl;
-  stop_threads.set(1);
-  assert(wq != NULL);
-  wq->return_waiting_threads();
-  for (vector<WorkThreadSharded*>::iterator p = threads_shardedpool.begin();
-       p != threads_shardedpool.end();
-       ++p) {
-    (*p)->join();
-    delete *p;
-  }
-  threads_shardedpool.clear();
-  ldout(cct,15) << "stopped" << dendl;
-}
-
-void ShardedThreadPool::pause()
-{
-  ldout(cct,10) << "pause" << dendl;
-  shardedpool_lock.Lock();
-  pause_threads.set(1);
-  assert(wq != NULL);
-  wq->return_waiting_threads();
-  while (num_threads != num_paused){
-    wait_cond.Wait(shardedpool_lock);
-  }
-  shardedpool_lock.Unlock();
-  ldout(cct,10) << "paused" << dendl; 
-}
-
-void ShardedThreadPool::pause_new()
-{
-  ldout(cct,10) << "pause_new" << dendl;
-  shardedpool_lock.Lock();
-  pause_threads.set(1);
-  assert(wq != NULL);
-  wq->return_waiting_threads();
-  shardedpool_lock.Unlock();
-  ldout(cct,10) << "paused_new" << dendl;
-}
-
-void ShardedThreadPool::unpause()
-{
-  ldout(cct,10) << "unpause" << dendl;
-  shardedpool_lock.Lock();
-  pause_threads.set(0);
-  shardedpool_cond.Signal();
-  shardedpool_lock.Unlock();
-  ldout(cct,10) << "unpaused" << dendl;
-}
-
-void ShardedThreadPool::drain()
-{
-  ldout(cct,10) << "drain" << dendl;
-  shardedpool_lock.Lock();
-  drain_threads.set(1);
-  assert(wq != NULL);
-  wq->return_waiting_threads();
-  while (num_threads != num_drained) {
-    wait_cond.Wait(shardedpool_lock);
-  }
-  drain_threads.set(0);
-  shardedpool_cond.Signal();
-  shardedpool_lock.Unlock();
-  ldout(cct,10) << "drained" << dendl;
-}
-
diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h
index 0373d73..cbf49a8 100644
--- a/src/common/WorkQueue.h
+++ b/src/common/WorkQueue.h
@@ -42,13 +42,13 @@ public:
     heartbeat_handle_d *hb;
     time_t grace;
     time_t suicide_grace;
-  public:
     TPHandle(
       CephContext *cct,
       heartbeat_handle_d *hb,
       time_t grace,
       time_t suicide_grace)
       : cct(cct), hb(hb), grace(grace), suicide_grace(suicide_grace) {}
+  public:
     void reset_tp_timeout();
     void suspend_tp_timeout();
   };
@@ -404,7 +404,7 @@ public:
   
   void _enqueue(GenContext<ThreadPool::TPHandle&> *c) {
     _queue.push_back(c);
-  }
+  };
   void _enqueue_front(GenContext<ThreadPool::TPHandle&> *c) {
     _queue.push_front(c);
   }
@@ -433,108 +433,4 @@ public:
   }
 };
 
-class ShardedThreadPool {
-
-  CephContext *cct;
-  string name;
-  string lockname;
-  Mutex shardedpool_lock;
-  Cond shardedpool_cond;
-  Cond wait_cond;
-  uint32_t num_threads;
-  atomic_t stop_threads;
-  atomic_t pause_threads;
-  atomic_t drain_threads;
-  uint32_t num_paused;
-  uint32_t num_drained;
-
-public:
-
-  class BaseShardedWQ {
-  
-  public:
-    time_t timeout_interval, suicide_interval;
-    BaseShardedWQ(time_t ti, time_t sti):timeout_interval(ti), suicide_interval(sti) {}
-    virtual ~BaseShardedWQ() {}
-
-    virtual void _process(uint32_t thread_index, heartbeat_handle_d *hb ) = 0;
-    virtual void return_waiting_threads() = 0;
-    virtual bool is_shard_empty(uint32_t thread_index) = 0;
-  };      
-
-  template <typename T>
-  class ShardedWQ: public BaseShardedWQ {
-  
-    ShardedThreadPool* sharded_pool;
-
-  protected:
-    virtual void _enqueue(T) = 0;
-    virtual void _enqueue_front(T) = 0;
-
-
-  public:
-    ShardedWQ(time_t ti, time_t sti, ShardedThreadPool* tp): BaseShardedWQ(ti, sti), 
-                                                                 sharded_pool(tp) {
-      tp->set_wq(this);
-    }
-    virtual ~ShardedWQ() {}
-
-    void queue(T item) {
-      _enqueue(item);
-    }
-    void queue_front(T item) {
-      _enqueue_front(item);
-    }
-    void drain() {
-      sharded_pool->drain();
-    }
-    
-  };
-
-private:
-
-  BaseShardedWQ* wq;
-  // threads
-  struct WorkThreadSharded : public Thread {
-    ShardedThreadPool *pool;
-    uint32_t thread_index;
-    WorkThreadSharded(ShardedThreadPool *p, uint32_t pthread_index): pool(p),
-      thread_index(pthread_index) {}
-    void *entry() {
-      pool->shardedthreadpool_worker(thread_index);
-      return 0;
-    }
-  };
-
-  vector<WorkThreadSharded*> threads_shardedpool;
-  void start_threads();
-  void shardedthreadpool_worker(uint32_t thread_index);
-  void set_wq(BaseShardedWQ* swq) {
-    wq = swq;
-  }
-
-
-
-public:
-
-  ShardedThreadPool(CephContext *cct_, string nm, uint32_t pnum_threads);
-
-  ~ShardedThreadPool(){};
-
-  /// start thread pool thread
-  void start();
-  /// stop thread pool thread
-  void stop();
-  /// pause thread pool (if it not already paused)
-  void pause();
-  /// pause initiation of new work
-  void pause_new();
-  /// resume work in thread pool.  must match each pause() call 1:1 to resume.
-  void unpause();
-  /// wait for all work to complete
-  void drain();
-
-};
-
-
 #endif
diff --git a/src/common/addr_parsing.c b/src/common/addr_parsing.c
index d50b10e..c01f817 100644
--- a/src/common/addr_parsing.c
+++ b/src/common/addr_parsing.c
@@ -31,13 +31,11 @@ int safe_cat(char **pstr, int *plen, int pos, const char *str2)
   //printf("safe_cat '%s' max %d pos %d '%s' len %d\n", *pstr, *plen, pos, str2, len2);
   while (*plen < pos + len2 + 1) {
     *plen += BUF_SIZE;
+    *pstr = (char *)realloc(*pstr, (size_t)*plen);
 
-    void *_realloc = NULL;
-    if ((_realloc = realloc(*pstr, (size_t)*plen)) == NULL) {
+    if (!*pstr) {
       printf("Out of memory\n");
       exit(1);
-    } else {
-      *pstr = (char *)_realloc;
     }
     //printf("safe_cat '%s' max %d pos %d '%s' len %d\n", *pstr, *plen, pos, str2, len2);
   }
diff --git a/src/common/admin_socket.cc b/src/common/admin_socket.cc
index 24d1656..4af2904 100644
--- a/src/common/admin_socket.cc
+++ b/src/common/admin_socket.cc
@@ -334,6 +334,12 @@ bool AdminSocket::do_accept()
     format = "json-pretty";
   cmd_getval(m_cct, cmdmap, "prefix", c);
 
+  string firstword;
+  if (c.find(" ") == string::npos)
+    firstword = c;
+  else
+    firstword = c.substr(0, c.find(" "));
+
   m_lock.Lock();
   map<string,AdminSocketHook*>::iterator p;
   string match = c;
diff --git a/src/common/admin_socket.h b/src/common/admin_socket.h
index 20e3f9b..3bc8483 100644
--- a/src/common/admin_socket.h
+++ b/src/common/admin_socket.h
@@ -32,7 +32,7 @@ class AdminSocketHook {
 public:
   virtual bool call(std::string command, cmdmap_t &cmdmap, std::string format,
 		    bufferlist& out) = 0;
-  virtual ~AdminSocketHook() {}
+  virtual ~AdminSocketHook() {};
 };
 
 class AdminSocket : public Thread
diff --git a/src/common/assert.cc b/src/common/assert.cc
index 67c43df..7889ad0 100644
--- a/src/common/assert.cc
+++ b/src/common/assert.cc
@@ -77,75 +77,6 @@ namespace ceph {
     throw FailedAssertion(bt);
   }
 
-  void __ceph_assertf_fail(const char *assertion, const char *file, int line, const char *func, const char* msg, ...)
-  {
-    ostringstream tss;
-    tss << ceph_clock_now(g_assert_context);
-
-    class BufAppender {
-    public:
-      BufAppender(char* buf, int size) : bufptr(buf), remaining(size) {
-      }
-
-      void printf(const char * format, ...) {
-	va_list args;
-	va_start(args, format);
-	this->vprintf(format, args);
-	va_end(args);
-      }
-
-      void vprintf(const char * format, va_list args) {
-	int n = vsnprintf(bufptr, remaining, format, args);
-	if (n >= 0) {
-	  if (n < remaining) {
-	    remaining -= n;
-	    bufptr += n;
-	  } else {
-	    remaining = 0;
-	  }
-	}
-      }
-
-    private:
-      char* bufptr;
-      int remaining;
-    };
-
-    char buf[8096];
-    BufAppender ba(buf, sizeof(buf));
-    BackTrace *bt = new BackTrace(1);
-    ba.printf("%s: In function '%s' thread %llx time %s\n"
-	     "%s: %d: FAILED assert(%s)\n",
-	     file, func, (unsigned long long)pthread_self(), tss.str().c_str(),
-	     file, line, assertion);
-    ba.printf("Assertion details: ");
-    va_list args;
-    va_start(args, msg);
-    ba.vprintf(msg, args);
-    va_end(args);
-    ba.printf("\n");
-    dout_emergency(buf);
-
-    // TODO: get rid of this memory allocation.
-    ostringstream oss;
-    bt->print(oss);
-    dout_emergency(oss.str());
-
-    dout_emergency(" NOTE: a copy of the executable, or `objdump -rdS <executable>` "
-		   "is needed to interpret this.\n");
-
-    if (g_assert_context) {
-      lderr(g_assert_context) << buf << std::endl;
-      bt->print(*_dout);
-      *_dout << " NOTE: a copy of the executable, or `objdump -rdS <executable>` "
-	     << "is needed to interpret this.\n" << dendl;
-
-      g_assert_context->_log->dump_recent();
-    }
-
-    throw FailedAssertion(bt);
-  }
-
   void __ceph_assert_warn(const char *assertion, const char *file,
 			  int line, const char *func)
   {
diff --git a/src/common/bloom_filter.hpp b/src/common/bloom_filter.hpp
index 2a04d12..735d6c4 100644
--- a/src/common/bloom_filter.hpp
+++ b/src/common/bloom_filter.hpp
@@ -356,6 +356,51 @@ public:
     return std::pow(1.0 - std::exp(-1.0 * salt_.size() * insert_count_ / size()), 1.0 * salt_.size());
   }
 
+  inline bloom_filter& operator &= (const bloom_filter& filter)
+  {
+    /* intersection */
+    if (
+	(salt_count_  == filter.salt_count_) &&
+	(table_size_  == filter.table_size_) &&
+	(random_seed_ == filter.random_seed_)
+	) {
+      for (std::size_t i = 0; i < table_size_; ++i) {
+	bit_table_[i] &= filter.bit_table_[i];
+      }
+    }
+    return *this;
+  }
+
+  inline bloom_filter& operator |= (const bloom_filter& filter)
+  {
+    /* union */
+    if (
+	(salt_count_  == filter.salt_count_) &&
+	(table_size_  == filter.table_size_) &&
+	(random_seed_ == filter.random_seed_)
+	) {
+      for (std::size_t i = 0; i < table_size_; ++i) {
+        bit_table_[i] |= filter.bit_table_[i];
+      }
+    }
+    return *this;
+  }
+
+  inline bloom_filter& operator ^= (const bloom_filter& filter)
+  {
+    /* difference */
+    if (
+	(salt_count_  == filter.salt_count_) &&
+	(table_size_  == filter.table_size_) &&
+	(random_seed_ == filter.random_seed_)
+	) {
+      for (std::size_t i = 0; i < table_size_; ++i) {
+	bit_table_[i] ^= filter.bit_table_[i];
+      }
+    }
+    return *this;
+  }
+
   inline const cell_type* table() const
   {
     return bit_table_;
@@ -529,6 +574,27 @@ public:
 };
 WRITE_CLASS_ENCODER(bloom_filter)
 
+inline bloom_filter operator & (const bloom_filter& a, const bloom_filter& b)
+{
+  bloom_filter result = a;
+  result &= b;
+  return result;
+}
+
+inline bloom_filter operator | (const bloom_filter& a, const bloom_filter& b)
+{
+  bloom_filter result = a;
+  result |= b;
+  return result;
+}
+
+inline bloom_filter operator ^ (const bloom_filter& a, const bloom_filter& b)
+{
+  bloom_filter result = a;
+  result ^= b;
+  return result;
+}
+
 
 class compressible_bloom_filter : public bloom_filter
 {
diff --git a/src/common/buffer.cc b/src/common/buffer.cc
index 9ee2bfe..35c5d36 100644
--- a/src/common/buffer.cc
+++ b/src/common/buffer.cc
@@ -33,7 +33,7 @@
 namespace ceph {
 
 #ifdef BUFFER_DEBUG
-static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
+static uint32_t simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
 # define bdout { simple_spin_lock(&buffer_debug_lock); std::cout
 # define bendl std::endl; simple_spin_unlock(&buffer_debug_lock); }
 #else
@@ -134,7 +134,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
       : data(c), len(l), nref(0),
 	crc_lock("buffer::raw::crc_lock", false, false)
     { }
-    virtual ~raw() {}
+    virtual ~raw() {};
 
     // no copying.
     raw(const raw &other);
@@ -230,23 +230,20 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
   };
 
   class buffer::raw_posix_aligned : public buffer::raw {
-    unsigned align;
   public:
-    raw_posix_aligned(unsigned l, unsigned _align) : raw(l) {
-      align = _align;
-      assert((align >= sizeof(void *)) && (align & (align - 1)) == 0);
+    raw_posix_aligned(unsigned l) : raw(l) {
 #ifdef DARWIN
       data = (char *) valloc (len);
 #else
       data = 0;
-      int r = ::posix_memalign((void**)(void*)&data, align, len);
+      int r = ::posix_memalign((void**)(void*)&data, CEPH_PAGE_SIZE, len);
       if (r)
 	throw bad_alloc();
 #endif /* DARWIN */
       if (!data)
 	throw bad_alloc();
       inc_total_alloc(len);
-      bdout << "raw_posix_aligned " << this << " alloc " << (void *)data << " l=" << l << ", align=" << align << " total_alloc=" << buffer::get_total_alloc() << bendl;
+      bdout << "raw_posix_aligned " << this << " alloc " << (void *)data << " " << l << " " << buffer::get_total_alloc() << bendl;
     }
     ~raw_posix_aligned() {
       ::free((void*)data);
@@ -254,36 +251,34 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
       bdout << "raw_posix_aligned " << this << " free " << (void *)data << " " << buffer::get_total_alloc() << bendl;
     }
     raw* clone_empty() {
-      return new raw_posix_aligned(len, align);
+      return new raw_posix_aligned(len);
     }
   };
 #endif
 
 #ifdef __CYGWIN__
   class buffer::raw_hack_aligned : public buffer::raw {
-    unsigned align;
     char *realdata;
   public:
-    raw_hack_aligned(unsigned l, unsigned _align) : raw(l) {
-      align = _align;
-      realdata = new char[len+align-1];
-      unsigned off = ((unsigned)realdata) & (align-1);
+    raw_hack_aligned(unsigned l) : raw(l) {
+      realdata = new char[len+CEPH_PAGE_SIZE-1];
+      unsigned off = ((unsigned)realdata) & ~CEPH_PAGE_MASK;
       if (off)
-	data = realdata + align - off;
+	data = realdata + CEPH_PAGE_SIZE - off;
       else
 	data = realdata;
-      inc_total_alloc(len+align-1);
+      inc_total_alloc(len+CEPH_PAGE_SIZE-1);
       //cout << "hack aligned " << (unsigned)data
       //<< " in raw " << (unsigned)realdata
       //<< " off " << off << std::endl;
-      assert(((unsigned)data & (align-1)) == 0);
+      assert(((unsigned)data & (CEPH_PAGE_SIZE-1)) == 0);
     }
     ~raw_hack_aligned() {
       delete[] realdata;
-      dec_total_alloc(len+align-1);
+      dec_total_alloc(len+CEPH_PAGE_SIZE-1);
     }
     raw* clone_empty() {
-      return new raw_hack_aligned(len, align);
+      return new raw_hack_aligned(len);
     }
   };
 #endif
@@ -339,6 +334,10 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
       return true;
     }
 
+    bool is_page_aligned() {
+      return false;
+    }
+
     int set_source(int fd, loff_t *off) {
       int flags = SPLICE_F_NONBLOCK;
       ssize_t r = safe_splice(fd, off, pipefds[1], NULL, len, flags);
@@ -521,17 +520,14 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
   buffer::raw* buffer::create_static(unsigned len, char *buf) {
     return new raw_static(buf, len);
   }
-  buffer::raw* buffer::create_aligned(unsigned len, unsigned align) {
+  buffer::raw* buffer::create_page_aligned(unsigned len) {
 #ifndef __CYGWIN__
     //return new raw_mmap_pages(len);
-    return new raw_posix_aligned(len, align);
+    return new raw_posix_aligned(len);
 #else
-    return new raw_hack_aligned(len, align);
+    return new raw_hack_aligned(len);
 #endif
   }
-  buffer::raw* buffer::create_page_aligned(unsigned len) {
-    return create_aligned(len, CEPH_PAGE_SIZE);
-  }
 
   buffer::raw* buffer::create_zero_copy(unsigned len, int fd, int64_t *offset) {
 #ifdef CEPH_HAVE_SPLICE
@@ -1017,22 +1013,22 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
     return true;
   }
 
-  bool buffer::list::is_aligned(unsigned align) const
+  bool buffer::list::is_page_aligned() const
   {
     for (std::list<ptr>::const_iterator it = _buffers.begin();
 	 it != _buffers.end();
 	 ++it) 
-      if (!it->is_aligned(align))
+      if (!it->is_page_aligned())
 	return false;
     return true;
   }
 
-  bool buffer::list::is_n_align_sized(unsigned align) const
+  bool buffer::list::is_n_page_sized() const
   {
     for (std::list<ptr>::const_iterator it = _buffers.begin();
 	 it != _buffers.end();
 	 ++it) 
-      if (!it->is_n_align_sized(align))
+      if (!it->is_n_page_sized())
 	return false;
     return true;
   }
@@ -1082,16 +1078,6 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
     return &(*_buffers.begin()) == &(*_buffers.rbegin());
   }
 
-  bool buffer::list::is_n_page_sized() const
-  {
-    return is_n_align_sized(CEPH_PAGE_SIZE);
-  }
-
-  bool buffer::list::is_page_aligned() const
-  {
-    return is_aligned(CEPH_PAGE_SIZE);
-  }
-
   void buffer::list::rebuild()
   {
     ptr nb;
@@ -1115,16 +1101,16 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
     _buffers.push_back(nb);
   }
 
-void buffer::list::rebuild_aligned(unsigned align)
+void buffer::list::rebuild_page_aligned()
 {
   std::list<ptr>::iterator p = _buffers.begin();
   while (p != _buffers.end()) {
-    // keep anything that's already align and sized aligned
-    if (p->is_aligned(align) && p->is_n_align_sized(align)) {
+    // keep anything that's already page sized+aligned
+    if (p->is_page_aligned() && p->is_n_page_sized()) {
       /*cout << " segment " << (void*)p->c_str()
-	     << " offset " << ((unsigned long)p->c_str() & (align - 1))
+	     << " offset " << ((unsigned long)p->c_str() & ~CEPH_PAGE_MASK)
 	     << " length " << p->length()
-	     << " " << (p->length() & (align - 1)) << " ok" << std::endl;
+	     << " " << (p->length() & ~CEPH_PAGE_MASK) << " ok" << std::endl;
       */
       ++p;
       continue;
@@ -1135,31 +1121,24 @@ void buffer::list::rebuild_aligned(unsigned align)
     unsigned offset = 0;
     do {
       /*cout << " segment " << (void*)p->c_str()
-             << " offset " << ((unsigned long)p->c_str() & (align - 1))
-             << " length " << p->length() << " " << (p->length() & (align - 1))
-             << " overall offset " << offset << " " << (offset & (align - 1))
+	     << " offset " << ((unsigned long)p->c_str() & ~CEPH_PAGE_MASK)
+	     << " length " << p->length() << " " << (p->length() & ~CEPH_PAGE_MASK)
+	     << " overall offset " << offset << " " << (offset & ~CEPH_PAGE_MASK)
 	     << " not ok" << std::endl;
       */
       offset += p->length();
       unaligned.push_back(*p);
       _buffers.erase(p++);
     } while (p != _buffers.end() &&
-	     (!p->is_aligned(align) ||
-	      !p->is_n_align_sized(align) ||
-	      (offset & (align-1))));
-    if (!(unaligned.is_contiguous() && unaligned._buffers.front().is_aligned(align))) {
-      ptr nb(buffer::create_aligned(unaligned._len, align));
-      unaligned.rebuild(nb);
-    }
+	     (!p->is_page_aligned() ||
+	      !p->is_n_page_sized() ||
+	      (offset & ~CEPH_PAGE_MASK)));
+    ptr nb(buffer::create_page_aligned(unaligned._len));
+    unaligned.rebuild(nb);
     _buffers.insert(p, unaligned._buffers.front());
   }
 }
 
-void buffer::list::rebuild_page_aligned()
-{
-  rebuild_aligned(CEPH_PAGE_SIZE);
-}
-
   // sort-of-like-assignment-op
   void buffer::list::claim(list& bl)
   {
@@ -1454,7 +1433,7 @@ void buffer::list::rebuild_page_aligned()
     // splice in *replace (implement me later?)
     
     last_p = begin();  // just in case we were in the removed region.
-  }
+  };
 
   void buffer::list::write(int off, int len, std::ostream& out) const
   {
@@ -1560,7 +1539,7 @@ int buffer::list::read_fd_zero_copy(int fd, size_t len)
   try {
     bufferptr bp = buffer::create_zero_copy(len, fd, NULL);
     append(bp);
-  } catch (buffer::error_code &e) {
+  } catch (buffer::error_code e) {
     return e.code;
   } catch (buffer::malformed_input) {
     return -EIO;
@@ -1713,20 +1692,6 @@ __u32 buffer::list::crc32c(__u32 crc) const
   return crc;
 }
 
-
-/**
- * Binary write all contents to a C++ stream
- */
-void buffer::list::write_stream(std::ostream &out) const
-{
-  for (std::list<ptr>::const_iterator p = _buffers.begin(); p != _buffers.end(); ++p) {
-    if (p->length() > 0) {
-      out.write(p->c_str(), p->length());
-    }
-  }
-}
-
-
 void buffer::list::hexdump(std::ostream &out) const
 {
   std::ios_base::fmtflags original_flags = out.flags();
diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc
index 4816acb..4ebf79e 100644
--- a/src/common/ceph_context.cc
+++ b/src/common/ceph_context.cc
@@ -229,38 +229,6 @@ void CephContext::do_command(std::string command, cmdmap_t& cmdmap,
 	    f->dump_string(var.c_str(), buf);
 	}
       }
-    } else if (command == "config diff") {
-      md_config_t def_conf;
-      def_conf.set_val("cluster", _conf->cluster);
-      def_conf.name = _conf->name;
-      def_conf.set_val("host", _conf->host);
-      def_conf.apply_changes(NULL);
-
-      map<string,pair<string,string> > diff;
-      set<string> unknown;
-      def_conf.diff(_conf, &diff, &unknown);
-      f->open_object_section("diff");
-
-      f->open_object_section("current");
-      for (map<string,pair<string,string> >::iterator p = diff.begin();
-           p != diff.end(); ++p) {
-        f->dump_string(p->first.c_str(), p->second.second);
-      }
-      f->close_section(); // current
-      f->open_object_section("defaults");
-      for (map<string,pair<string,string> >::iterator p = diff.begin();
-           p != diff.end(); ++p) {
-        f->dump_string(p->first.c_str(), p->second.first);
-      }
-      f->close_section(); // defaults
-      f->close_section(); // diff
-
-      f->open_array_section("unknown");
-      for (set<string>::iterator p = unknown.begin();
-           p != unknown.end(); ++p) {
-        f->dump_string("option", *p);
-      }
-      f->close_section(); // unknown
     } else if (command == "log flush") {
       _log->flush();
     }
@@ -279,7 +247,7 @@ void CephContext::do_command(std::string command, cmdmap_t& cmdmap,
   delete f;
   lgeneric_dout(this, 1) << "do_command '" << command << "' '" << ss.str()
 		         << "result is " << out->length() << " bytes" << dendl;
-}
+};
 
 
 CephContext::CephContext(uint32_t module_type_)
@@ -318,9 +286,6 @@ CephContext::CephContext(uint32_t module_type_)
   _admin_socket->register_command("config show", "config show", _admin_hook, "dump current config settings");
   _admin_socket->register_command("config set", "config set name=var,type=CephString name=val,type=CephString,n=N",  _admin_hook, "config set <field> <val> [<val> ...]: set a config variable");
   _admin_socket->register_command("config get", "config get name=var,type=CephString", _admin_hook, "config get <field>: get the config value");
-  _admin_socket->register_command("config diff",
-      "config diff", _admin_hook,
-      "dump diff of current config and default config");
   _admin_socket->register_command("log flush", "log flush", _admin_hook, "flush log entries to log file");
   _admin_socket->register_command("log dump", "log dump", _admin_hook, "dump recent log entries to log file");
   _admin_socket->register_command("log reopen", "log reopen", _admin_hook, "reopen log file");
@@ -346,7 +311,6 @@ CephContext::~CephContext()
   _admin_socket->unregister_command("config show");
   _admin_socket->unregister_command("config set");
   _admin_socket->unregister_command("config get");
-  _admin_socket->unregister_command("config diff");
   _admin_socket->unregister_command("log flush");
   _admin_socket->unregister_command("log dump");
   _admin_socket->unregister_command("log reopen");
diff --git a/src/common/ceph_crypto_cms.cc b/src/common/ceph_crypto_cms.cc
index 043376b..4d7a4ef 100644
--- a/src/common/ceph_crypto_cms.cc
+++ b/src/common/ceph_crypto_cms.cc
@@ -313,7 +313,7 @@ loser:
 int ceph_decode_cms(CephContext *cct, bufferlist& cms_bl, bufferlist& decoded_bl)
 {
     NSSCMSMessage *cmsg = NULL;
-    struct decodeOptionsStr decodeOptions = { };
+    struct decodeOptionsStr decodeOptions = { 0 };
     struct optionsStr options;
     SECItem input;
 
diff --git a/src/common/ceph_json.cc b/src/common/ceph_json.cc
index d1d33a9..a48e063 100644
--- a/src/common/ceph_json.cc
+++ b/src/common/ceph_json.cc
@@ -32,12 +32,12 @@ void JSONObjIter::operator++()
 {
   if (cur != last)
     ++cur;
-}
+};
 
 JSONObj *JSONObjIter::operator*()
 {
   return cur->second;
-}
+};
 
 // does not work, FIXME
 ostream& operator<<(ostream& out, JSONObj& obj) {
diff --git a/src/common/ceph_json.h b/src/common/ceph_json.h
index 5f8642d..32f5dcf 100644
--- a/src/common/ceph_json.h
+++ b/src/common/ceph_json.h
@@ -45,7 +45,7 @@ protected:
 
 public:
 
-  JSONObj() : parent(NULL){}
+  JSONObj() : parent(NULL){};
 
   virtual ~JSONObj();
 
diff --git a/src/common/code_environment.h b/src/common/code_environment.h
index e21f0ef..761d6c0 100644
--- a/src/common/code_environment.h
+++ b/src/common/code_environment.h
@@ -19,7 +19,6 @@ enum code_environment_t {
   CODE_ENVIRONMENT_UTILITY = 0,
   CODE_ENVIRONMENT_DAEMON = 1,
   CODE_ENVIRONMENT_LIBRARY = 2,
-  CODE_ENVIRONMENT_UTILITY_NODOUT = 3,
 };
 
 #ifdef __cplusplus
diff --git a/src/common/common_init.cc b/src/common/common_init.cc
index dd0b0e7..1f97e29 100644
--- a/src/common/common_init.cc
+++ b/src/common/common_init.cc
@@ -63,7 +63,6 @@ CephContext *common_preinit(const CephInitParameters &iparams,
       conf->set_val("keyring", "$osd_data/keyring", false);
     break;
 
-  case CODE_ENVIRONMENT_UTILITY_NODOUT:
   case CODE_ENVIRONMENT_LIBRARY:
     conf->set_val_or_die("log_to_stderr", "false");
     conf->set_val_or_die("err_to_stderr", "false");
diff --git a/src/common/config.cc b/src/common/config.cc
index a968cb7..fc47083 100644
--- a/src/common/config.cc
+++ b/src/common/config.cc
@@ -659,7 +659,7 @@ void md_config_t::set_val_or_die(const char *key, const char *val)
   assert(ret == 0);
 }
 
-int md_config_t::set_val(const char *key, const char *val, bool meta, bool safe)
+int md_config_t::set_val(const char *key, const char *val, bool meta)
 {
   Mutex::Locker l(lock);
   if (!key)
@@ -696,7 +696,7 @@ int md_config_t::set_val(const char *key, const char *val, bool meta, bool safe)
   for (int i = 0; i < NUM_CONFIG_OPTIONS; ++i) {
     config_option *opt = &config_optionsp[i];
     if (strcmp(opt->name, k.c_str()) == 0) {
-      if (safe && internal_safe_to_start_threads) {
+      if (internal_safe_to_start_threads) {
 	// If threads have been started...
 	if ((opt->type == OPT_STR) || (opt->type == OPT_ADDR) ||
 	    (opt->type == OPT_UUID)) {
@@ -947,7 +947,7 @@ int md_config_t::set_val_raw(const char *val, const config_option *opt)
 }
 
 static const char *CONF_METAVARIABLES[] =
-  { "cluster", "type", "name", "host", "num", "id", "pid" };
+  { "cluster", "type", "name", "host", "num", "id", "pid", "cctid" };
 static const int NUM_CONF_METAVARIABLES =
       (sizeof(CONF_METAVARIABLES) / sizeof(CONF_METAVARIABLES[0]));
 
@@ -1059,6 +1059,8 @@ bool md_config_t::expand_meta(std::string &origval,
 	  out += name.get_id().c_str();
 	else if (var == "pid")
 	  out += stringify(getpid());
+	else if (var == "cctid")
+	  out += stringify((unsigned long long)this);
 	else
 	  assert(0); // unreachable
 	expanded = true;
@@ -1098,39 +1100,6 @@ bool md_config_t::expand_meta(std::string &origval,
   return found_meta;
 }
 
-void md_config_t::diff(
-    const md_config_t *other,
-    map<string,pair<string,string> > *diff,
-    set<string> *unknown)
-{
-  Mutex::Locker l(lock);
-
-  char local_buf[4096];
-  char other_buf[4096];
-  for (int i = 0; i < NUM_CONFIG_OPTIONS; i++) {
-    config_option *opt = &config_optionsp[i];
-    memset(local_buf, 0, sizeof(local_buf));
-    memset(other_buf, 0, sizeof(other_buf));
-
-    char *other_val = other_buf;
-    int err = other->get_val(opt->name, &other_val, sizeof(other_buf));
-    if (err < 0) {
-      if (err == -ENOENT) {
-        unknown->insert(opt->name);
-      }
-      continue;
-    }
-
-    char *local_val = local_buf;
-    err = _get_val(opt->name, &local_val, sizeof(local_buf));
-    if (err != 0)
-      continue;
-
-    if (strcmp(local_val, other_val))
-      diff->insert(make_pair(opt->name, make_pair(local_val, other_val)));
-  }
-}
-
 md_config_obs_t::
 ~md_config_obs_t()
 {
diff --git a/src/common/config.h b/src/common/config.h
index d4a84be..242b467 100644
--- a/src/common/config.h
+++ b/src/common/config.h
@@ -130,10 +130,7 @@ public:
 
   // Set a configuration value.
   // Metavariables will be expanded.
-  int set_val(const char *key, const char *val, bool meta=true, bool safe=true);
-  int set_val(const char *key, const string& s, bool meta=true, bool safe=true) {
-    return set_val(key, s.c_str(), meta, safe);
-  }
+  int set_val(const char *key, const char *val, bool meta=true);
 
   // Get a configuration value.
   // No metavariables will be returned (they will have already been expanded)
@@ -156,10 +153,6 @@ public:
   /// dump all config values to a formatter
   void show_config(Formatter *f);
 
-  /// obtain a diff between our config values and another md_config_t values
-  void diff(const md_config_t *other,
-            map<string,pair<string,string> > *diff, set<string> *unknown);
-
 private:
   void _show_config(std::ostream *out, Formatter *f);
 
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index 2c4f4da..7791246 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -44,21 +44,15 @@ OPTION(err_to_syslog, OPT_BOOL, false)
 OPTION(log_flush_on_exit, OPT_BOOL, true) // default changed by common_preinit()
 OPTION(log_stop_at_utilization, OPT_FLOAT, .97)  // stop logging at (near) full
 
-// options will take k/v pairs, or single-item that will be assumed as general
-// default for all, regardless of channel.
-// e.g., "info" would be taken as the same as "default=info"
-// also, "default=daemon audit=local0" would mean
-//    "default all to 'daemon', override 'audit' with 'local0'
-OPTION(clog_to_monitors, OPT_STR, "default=true")
-OPTION(clog_to_syslog, OPT_STR, "false")
-OPTION(clog_to_syslog_level, OPT_STR, "info") // this level and above
-OPTION(clog_to_syslog_facility, OPT_STR, "default=daemon audit=local0")
-
-OPTION(mon_cluster_log_to_syslog, OPT_STR, "default=false")
+OPTION(clog_to_monitors, OPT_BOOL, true)
+OPTION(clog_to_syslog, OPT_BOOL, false)
+OPTION(clog_to_syslog_level, OPT_STR, "info")         // this level and above
+OPTION(clog_to_syslog_facility, OPT_STR, "daemon")
+
+OPTION(mon_cluster_log_to_syslog, OPT_BOOL, false)
 OPTION(mon_cluster_log_to_syslog_level, OPT_STR, "info")   // this level and above
 OPTION(mon_cluster_log_to_syslog_facility, OPT_STR, "daemon")
-OPTION(mon_cluster_log_file, OPT_STR,
-    "default=/var/log/ceph/$cluster.$channel.log cluster=/var/log/ceph/$cluster.log")
+OPTION(mon_cluster_log_file, OPT_STR, "/var/log/ceph/$cluster.log")
 OPTION(mon_cluster_log_file_level, OPT_STR, "info")
 
 DEFAULT_SUBSYS(0, 5)
@@ -78,7 +72,6 @@ SUBSYS(striper, 0, 1)
 SUBSYS(objecter, 0, 1)
 SUBSYS(rados, 0, 5)
 SUBSYS(rbd, 0, 5)
-SUBSYS(rbd_replay, 0, 5)
 SUBSYS(journaler, 0, 5)
 SUBSYS(objectcacher, 0, 5)
 SUBSYS(client, 0, 5)
@@ -103,7 +96,6 @@ SUBSYS(civetweb, 1, 10)
 SUBSYS(javaclient, 1, 5)
 SUBSYS(asok, 1, 5)
 SUBSYS(throttle, 1, 1)
-SUBSYS(refs, 0, 0)
 
 OPTION(key, OPT_STR, "")
 OPTION(keyfile, OPT_STR, "")
@@ -136,7 +128,6 @@ OPTION(ms_inject_delay_max, OPT_DOUBLE, 1)         // seconds
 OPTION(ms_inject_delay_probability, OPT_DOUBLE, 0) // range [0, 1]
 OPTION(ms_inject_internal_delays, OPT_DOUBLE, 0)   // seconds
 OPTION(ms_dump_on_send, OPT_BOOL, false)           // hexdump msg to log on send
-OPTION(ms_dump_corrupt_message_level, OPT_INT, 1)  // debug level to hexdump undecodeable messages at
 
 OPTION(inject_early_sigterm, OPT_BOOL, false)
 
@@ -199,12 +190,9 @@ OPTION(mon_slurp_bytes, OPT_INT, 256*1024)    // limit size of slurp messages
 OPTION(mon_client_bytes, OPT_U64, 100ul << 20)  // client msg data allowed in memory (in bytes)
 OPTION(mon_daemon_bytes, OPT_U64, 400ul << 20)  // mds, osd message memory cap (in bytes)
 OPTION(mon_max_log_entries_per_event, OPT_INT, 4096)
-OPTION(mon_reweight_min_pgs_per_osd, OPT_U64, 10)   // min pgs per osd for reweight-by-pg command
-OPTION(mon_reweight_min_bytes_per_osd, OPT_U64, 100*1024*1024)   // min bytes per osd for reweight-by-utilization command
 OPTION(mon_health_data_update_interval, OPT_FLOAT, 60.0)
 OPTION(mon_data_avail_crit, OPT_INT, 5)
 OPTION(mon_data_avail_warn, OPT_INT, 30)
-OPTION(mon_data_size_warn, OPT_U64, 15*1024*1024*1024) // issue a warning when the monitor's data store goes over 15GB (in bytes)
 OPTION(mon_config_key_max_entry_size, OPT_INT, 4096) // max num bytes per config-key entry
 OPTION(mon_sync_timeout, OPT_DOUBLE, 60.0)
 OPTION(mon_sync_max_payload_size, OPT_U32, 1048576) // max size for a sync chunk payload (say, 1MB)
@@ -218,14 +206,23 @@ OPTION(mon_osd_min_down_reports, OPT_INT, 3)     // number of times a down OSD m
 OPTION(mon_osd_force_trim_to, OPT_INT, 0)   // force mon to trim maps to this point, regardless of min_last_epoch_clean (dangerous, use with care)
 OPTION(mon_mds_force_trim_to, OPT_INT, 0)   // force mon to trim mdsmaps to this point (dangerous, use with care)
 
+OPTION(mon_advanced_debug_mode, OPT_BOOL, false) // true for developper oriented testing
 // dump transactions
 OPTION(mon_debug_dump_transactions, OPT_BOOL, false)
 OPTION(mon_debug_dump_location, OPT_STR, "/var/log/ceph/$cluster-$name.tdump")
 
 OPTION(mon_sync_provider_kill_at, OPT_INT, 0)  // kill the sync provider at a specific point in the work flow
 OPTION(mon_sync_requester_kill_at, OPT_INT, 0) // kill the sync requester at a specific point in the work flow
+OPTION(mon_leveldb_write_buffer_size, OPT_U64, 32*1024*1024) // monitor's leveldb write buffer size
+OPTION(mon_leveldb_cache_size, OPT_U64, 512*1024*1024) // monitor's leveldb cache size
+OPTION(mon_leveldb_block_size, OPT_U64, 64*1024) // monitor's leveldb block size
+OPTION(mon_leveldb_bloom_size, OPT_INT, 0) // monitor's leveldb bloom bits per entry
+OPTION(mon_leveldb_max_open_files, OPT_INT, 0) // monitor's leveldb max open files
+OPTION(mon_leveldb_compression, OPT_BOOL, false) // monitor's leveldb uses compression
+OPTION(mon_leveldb_paranoid, OPT_BOOL, false)   // monitor's leveldb paranoid flag
+OPTION(mon_leveldb_log, OPT_STR, "")
+OPTION(mon_leveldb_size_warn, OPT_U64, 40*1024*1024*1024) // issue a warning when the monitor's leveldb goes over 40GB (in bytes)
 OPTION(mon_force_quorum_join, OPT_BOOL, false) // force monitor to join quorum even if it has been previously removed from the map
-OPTION(mon_keyvaluedb, OPT_STR, "leveldb")   // type of keyvaluedb backend
 OPTION(paxos_stash_full_interval, OPT_INT, 25)   // how often (in commits) to stash a full copy of the PaxosService state
 OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores
 OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0)  // gather updates for this long before proposing a map update
@@ -280,7 +277,6 @@ OPTION(client_oc_max_objects, OPT_INT, 1000)      // max objects in cache
 OPTION(client_debug_force_sync_read, OPT_BOOL, false)     // always read synchronously (go to osds)
 OPTION(client_debug_inject_tick_delay, OPT_INT, 0) // delay the client tick for a number of seconds
 OPTION(client_max_inline_size, OPT_U64, 4096)
-OPTION(client_inject_release_failure, OPT_BOOL, false)  // synthetic client bug for testing
 // note: the max amount of "in flight" dirty data is roughly (max - target)
 OPTION(fuse_use_invalidate_cb, OPT_BOOL, false) // use fuse 2.8+ invalidate callback to keep page cache consistent
 OPTION(fuse_allow_other, OPT_BOOL, true)
@@ -296,7 +292,6 @@ OPTION(objecter_tick_interval, OPT_DOUBLE, 5.0)
 OPTION(objecter_timeout, OPT_DOUBLE, 10.0)    // before we ask for a map
 OPTION(objecter_inflight_op_bytes, OPT_U64, 1024*1024*100) // max in-flight data (both directions)
 OPTION(objecter_inflight_ops, OPT_U64, 1024)               // max in-flight ios
-OPTION(objecter_completion_locks_per_session, OPT_U64, 32) // num of completion locks per each session, for serializing same object responses
 OPTION(journaler_allow_split_entries, OPT_BOOL, true)
 OPTION(journaler_write_head_interval, OPT_INT, 15)
 OPTION(journaler_prefetch_periods, OPT_INT, 10)   // * journal object size
@@ -307,7 +302,6 @@ OPTION(mds_data, OPT_STR, "/var/lib/ceph/mds/$cluster-$id")
 OPTION(mds_max_file_size, OPT_U64, 1ULL << 40)
 OPTION(mds_cache_size, OPT_INT, 100000)
 OPTION(mds_cache_mid, OPT_FLOAT, .7)
-OPTION(mds_max_file_recover, OPT_U32, 32)
 OPTION(mds_mem_max, OPT_INT, 1048576)        // KB
 OPTION(mds_dir_max_commit_size, OPT_INT, 10) // MB
 OPTION(mds_decay_halflife, OPT_FLOAT, 5)
@@ -316,11 +310,8 @@ OPTION(mds_beacon_grace, OPT_FLOAT, 15)
 OPTION(mds_enforce_unique_name, OPT_BOOL, true)
 OPTION(mds_blacklist_interval, OPT_FLOAT, 24.0*60.0)  // how long to blacklist failed nodes
 OPTION(mds_session_timeout, OPT_FLOAT, 60)    // cap bits and leases time out if client idle
-OPTION(mds_revoke_cap_timeout, OPT_FLOAT, 60)    // detect clients which aren't revoking caps
-OPTION(mds_recall_state_timeout, OPT_FLOAT, 60)    // detect clients which aren't trimming caps
-OPTION(mds_freeze_tree_timeout, OPT_FLOAT, 30)    // detecting freeze tree deadlock
+OPTION(mds_freeze_tree_timeout, OPT_FLOAT, 30)    // cap bits and leases time out if client idle
 OPTION(mds_session_autoclose, OPT_FLOAT, 300) // autoclose idle session
-OPTION(mds_health_summarize_threshold, OPT_INT, 10) // collapse N-client health metrics to a single 'many'
 OPTION(mds_reconnect_timeout, OPT_FLOAT, 45)  // seconds to wait for clients during mds restart
 	      //  make it (mds_session_timeout - mds_beacon_grace)
 OPTION(mds_tick_interval, OPT_FLOAT, 5)
@@ -332,7 +323,6 @@ OPTION(mds_default_dir_hash, OPT_INT, CEPH_STR_HASH_RJENKINS)
 OPTION(mds_log, OPT_BOOL, true)
 OPTION(mds_log_skip_corrupt_events, OPT_BOOL, false)
 OPTION(mds_log_max_events, OPT_INT, -1)
-OPTION(mds_log_events_per_segment, OPT_INT, 1024)
 OPTION(mds_log_segment_size, OPT_INT, 0)  // segment size for mds log,
 	      // defaults to g_default_file_layout.fl_object_size (4MB)
 OPTION(mds_log_max_segments, OPT_INT, 30)
@@ -382,8 +372,8 @@ OPTION(mds_kill_openc_at, OPT_INT, 0)
 OPTION(mds_kill_journal_at, OPT_INT, 0)
 OPTION(mds_kill_journal_expire_at, OPT_INT, 0)
 OPTION(mds_kill_journal_replay_at, OPT_INT, 0)
-OPTION(mds_journal_format, OPT_U32, 1)  // Default to most recent JOURNAL_FORMAT_*
 OPTION(mds_kill_create_at, OPT_INT, 0)
+OPTION(mds_open_remote_link_mode, OPT_INT, 0)
 OPTION(mds_inject_traceless_reply_probability, OPT_DOUBLE, 0) /* percentage
 				of MDS modify replies to skip sending the
 				client a trace on [0-1]*/
@@ -394,13 +384,6 @@ OPTION(max_mds, OPT_INT, 1)
 OPTION(mds_standby_for_name, OPT_STR, "")
 OPTION(mds_standby_for_rank, OPT_INT, -1)
 OPTION(mds_standby_replay, OPT_BOOL, false)
-OPTION(mds_enable_op_tracker, OPT_BOOL, true) // enable/disable MDS op tracking
-OPTION(mds_op_history_size, OPT_U32, 20)    // Max number of completed ops to track
-OPTION(mds_op_history_duration, OPT_U32, 600) // Oldest completed op to track
-OPTION(mds_op_complaint_time, OPT_FLOAT, 30) // how many seconds old makes an op complaint-worthy
-OPTION(mds_op_log_threshold, OPT_INT, 5) // how many op log messages to show in one go
-OPTION(mds_snap_min_uid, OPT_U32, 0) // The minimum UID required to create a snapshot
-OPTION(mds_snap_max_uid, OPT_U32, 65536) // The maximum UID allowed to create a snapshot
 
 // If true, compact leveldb store on mount
 OPTION(osd_compact_leveldb_on_mount, OPT_BOOL, false)
@@ -408,9 +391,6 @@ OPTION(osd_compact_leveldb_on_mount, OPT_BOOL, false)
 // Maximum number of backfills to or from a single osd
 OPTION(osd_max_backfills, OPT_U64, 10)
 
-// Minimum recovery priority (255 = max, smaller = lower)
-OPTION(osd_min_recovery_priority, OPT_INT, 0)
-
 // Refuse backfills when OSD full ratio is above this value
 OPTION(osd_backfill_full_ratio, OPT_FLOAT, 0.85)
 
@@ -456,13 +436,7 @@ OPTION(osd_pool_default_erasure_code_profile,
        "k=2 "
        "m=1 "
        ) // default properties of osd pool create
-OPTION(osd_erasure_code_plugins, OPT_STR,
-       "jerasure"
-       " lrc"
-#ifdef HAVE_BETTER_YASM_ELF64
-       " isa"
-#endif
-       ) // list of erasure code plugins
+OPTION(osd_erasure_code_plugins, OPT_STR, "jerasure") // list of erasure code plugins
 OPTION(osd_pool_default_flags, OPT_INT, 0)   // default flags for new pools
 OPTION(osd_pool_default_flag_hashpspool, OPT_BOOL, true)   // use new pg hashing to prevent pool/pg overlap
 OPTION(osd_pool_default_hit_set_bloom_fpp, OPT_FLOAT, .05)
@@ -478,7 +452,6 @@ OPTION(osd_tier_default_cache_mode, OPT_STR, "writeback")
 OPTION(osd_tier_default_cache_hit_set_count, OPT_INT, 4)
 OPTION(osd_tier_default_cache_hit_set_period, OPT_INT, 1200)
 OPTION(osd_tier_default_cache_hit_set_type, OPT_STR, "bloom")
-OPTION(osd_tier_default_cache_min_read_recency_for_promote, OPT_INT, 1) // number of recent HitSets the object must appear in to be promoted (on read)
 
 OPTION(osd_map_dedup, OPT_BOOL, true)
 OPTION(osd_map_max_advance, OPT_INT, 200) // make this < cache_size!
@@ -494,8 +467,6 @@ OPTION(osd_disk_thread_ioprio_class, OPT_STR, "") // rt realtime be besteffort b
 OPTION(osd_disk_thread_ioprio_priority, OPT_INT, -1) // 0-7
 OPTION(osd_recovery_threads, OPT_INT, 1)
 OPTION(osd_recover_clone_overlap, OPT_BOOL, true)   // preserve clone_overlap during recovery/migration
-OPTION(osd_op_num_threads_per_shard, OPT_INT, 2)
-OPTION(osd_op_num_shards, OPT_INT, 5)
 
 // Only use clone_overlap for recovery if there are fewer than
 // osd_recover_clone_overlap_limit entries in the overlap set
@@ -569,7 +540,6 @@ OPTION(osd_min_pg_log_entries, OPT_U32, 3000)  // number of entries to keep in t
 OPTION(osd_max_pg_log_entries, OPT_U32, 10000) // max entries, say when degraded, before we trim
 OPTION(osd_op_complaint_time, OPT_FLOAT, 30) // how many seconds old makes an op complaint-worthy
 OPTION(osd_command_max_records, OPT_INT, 256)
-OPTION(osd_max_pg_blocked_by, OPT_U32, 16)    // max peer osds to report that are blocking our progress
 OPTION(osd_op_log_threshold, OPT_INT, 5) // how many op log messages to show in one go
 OPTION(osd_verify_sparse_read_holes, OPT_BOOL, false)  // read fiemap-reported holes and verify they are zeros
 OPTION(osd_debug_drop_ping_probability, OPT_DOUBLE, 0)
@@ -583,12 +553,19 @@ OPTION(osd_debug_verify_stray_on_activate, OPT_BOOL, false)
 OPTION(osd_debug_skip_full_check_in_backfill_reservation, OPT_BOOL, false)
 OPTION(osd_debug_reject_backfill_probability, OPT_DOUBLE, 0)
 OPTION(osd_enable_op_tracker, OPT_BOOL, true) // enable/disable OSD op tracking
-OPTION(osd_num_op_tracker_shard, OPT_U32, 32) // The number of shards for holding the ops 
 OPTION(osd_op_history_size, OPT_U32, 20)    // Max number of completed ops to track
 OPTION(osd_op_history_duration, OPT_U32, 600) // Oldest completed op to track
 OPTION(osd_target_transaction_size, OPT_INT, 30)     // to adjust various transactions that batch smaller items
 OPTION(osd_failsafe_full_ratio, OPT_FLOAT, .97) // what % full makes an OSD "full" (failsafe)
 OPTION(osd_failsafe_nearfull_ratio, OPT_FLOAT, .90) // what % full makes an OSD near full (failsafe)
+OPTION(osd_leveldb_write_buffer_size, OPT_U64, 0) // OSD's leveldb write buffer size
+OPTION(osd_leveldb_cache_size, OPT_U64, 0) // OSD's leveldb cache size
+OPTION(osd_leveldb_block_size, OPT_U64, 0) // OSD's leveldb block size
+OPTION(osd_leveldb_bloom_size, OPT_INT, 0) // OSD's leveldb bloom bits per entry
+OPTION(osd_leveldb_max_open_files, OPT_INT, 0) // OSD's leveldb max open files
+OPTION(osd_leveldb_compression, OPT_BOOL, true) // OSD's leveldb uses compression
+OPTION(osd_leveldb_paranoid, OPT_BOOL, false) // OSD's leveldb paranoid flag
+OPTION(osd_leveldb_log, OPT_STR, "")  // enable OSD leveldb log file
 
 // determines whether PGLog::check() compares written out log to stored log
 OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false)
@@ -603,34 +580,6 @@ OPTION(leveldb_paranoid, OPT_BOOL, false) // leveldb paranoid flag
 OPTION(leveldb_log, OPT_STR, "/dev/null")  // enable leveldb log file
 OPTION(leveldb_compact_on_mount, OPT_BOOL, false)
 
-OPTION(kinetic_host, OPT_STR, "") // hostname or ip address of a kinetic drive to use
-OPTION(kinetic_port, OPT_INT, 8123) // port number of the kinetic drive
-OPTION(kinetic_user_id, OPT_INT, 1) // kinetic user to authenticate as
-OPTION(kinetic_hmac_key, OPT_STR, "asdfasdf") // kinetic key to authenticate with
-OPTION(kinetic_use_ssl, OPT_BOOL, false) // whether to secure kinetic traffic with TLS
-
-OPTION(rocksdb_compact_on_mount, OPT_BOOL, false)
-OPTION(rocksdb_write_buffer_size, OPT_U64, 0) // rocksdb write buffer size
-OPTION(rocksdb_target_file_size_base, OPT_U64, 0) // target file size for compaction
-OPTION(rocksdb_cache_size, OPT_U64, 0) // rocksdb cache size
-OPTION(rocksdb_block_size, OPT_U64, 0) // rocksdb block size
-OPTION(rocksdb_bloom_size, OPT_INT, 0) // rocksdb bloom bits per entry
-OPTION(rocksdb_write_buffer_num, OPT_INT, 0) // rocksdb bloom bits per entry
-OPTION(rocksdb_background_compactions, OPT_INT, 0) // number for background compaction jobs
-OPTION(rocksdb_background_flushes, OPT_INT, 0) // number for background flush jobs
-OPTION(rocksdb_max_open_files, OPT_INT, 0) // rocksdb max open files
-OPTION(rocksdb_compression, OPT_STR, "") // rocksdb uses compression : none, snappy, zlib, bzip2
-OPTION(rocksdb_paranoid, OPT_BOOL, false) // rocksdb paranoid flag
-OPTION(rocksdb_log, OPT_STR, "/dev/null")  // enable rocksdb log file
-OPTION(rocksdb_level0_file_num_compaction_trigger, OPT_U64, 0) // Number of files to trigger level-0 compaction
-OPTION(rocksdb_level0_slowdown_writes_trigger, OPT_U64, 0)  // number of level-0 files at which we start slowing down write.
-OPTION(rocksdb_level0_stop_writes_trigger, OPT_U64, 0)  // number of level-0 files at which we stop writes
-OPTION(rocksdb_disableDataSync, OPT_BOOL, true) // if true, data files are not synced to stable storage
-OPTION(rocksdb_disableWAL, OPT_BOOL, false)  // diable write ahead log
-OPTION(rocksdb_num_levels, OPT_INT, 0) // number of levels for this database
-OPTION(rocksdb_wal_dir, OPT_STR, "")  //  rocksdb write ahead log file
-OPTION(rocksdb_info_log_level, OPT_STR, "info")  // info log level : debug , info , warn, error, fatal
-
 /**
  * osd_client_op_priority and osd_recovery_op_priority adjust the relative
  * priority of client io vs recovery io.
@@ -650,8 +599,6 @@ OPTION(osd_recovery_op_warn_multiple, OPT_U32, 16)
 OPTION(osd_mon_shutdown_timeout, OPT_DOUBLE, 5)
 
 OPTION(osd_max_object_size, OPT_U64, 100*1024L*1024L*1024L) // OSD's maximum object size
-OPTION(osd_max_object_name_len, OPT_U32, 2048) // max rados object name len
-OPTION(osd_max_attr_name_len, OPT_U32, 100)    // max rados attr name len; cannot go higher than 100 chars for file system backends
 OPTION(osd_max_attr_size, OPT_U64, 0)
 
 OPTION(osd_objectstore, OPT_STR, "filestore")  // ObjectStore backend type
@@ -664,8 +611,6 @@ OPTION(osd_bench_large_size_max_throughput, OPT_U64, 100 << 20) // 100 MB/s
 OPTION(osd_bench_max_block_size, OPT_U64, 64 << 20) // cap the block size at 64MB
 OPTION(osd_bench_duration, OPT_U32, 30) // duration of 'osd bench', capped at 30s to avoid triggering timeouts
 
-OPTION(filestore_omap_backend, OPT_STR, "leveldb")
-
 OPTION(filestore_debug_disable_sharded_check, OPT_BOOL, false)
 
 /// filestore wb throttle limits
@@ -692,7 +637,6 @@ OPTION(filestore_index_retry_probability, OPT_DOUBLE, 0)
 OPTION(filestore_debug_inject_read_err, OPT_BOOL, false)
 
 OPTION(filestore_debug_omap_check, OPT_BOOL, 0) // Expensive debugging check on sync
-OPTION(filestore_omap_header_cache_size, OPT_INT, 1024) 
 
 // Use omap for xattrs for attrs over
 // filestore_max_inline_xattr_size or
@@ -742,7 +686,6 @@ OPTION(filestore_split_multiple, OPT_INT, 2)
 OPTION(filestore_update_to, OPT_INT, 1000)
 OPTION(filestore_blackhole, OPT_BOOL, false)     // drop any new transactions on the floor
 OPTION(filestore_fd_cache_size, OPT_INT, 128)    // FD lru size
-OPTION(filestore_fd_cache_shards, OPT_INT, 16)   // FD number of shards
 OPTION(filestore_dump_file, OPT_STR, "")         // file onto which store transaction dumps
 OPTION(filestore_kill_at, OPT_INT, 0)            // inject a failure at the n'th opportunity
 OPTION(filestore_inject_stall, OPT_INT, 0)       // artificially stall for N seconds in op queue thread
@@ -762,7 +705,6 @@ OPTION(keyvaluestore_op_thread_suicide_timeout, OPT_INT, 180)
 OPTION(keyvaluestore_default_strip_size, OPT_INT, 4096) // Only affect new object
 OPTION(keyvaluestore_max_expected_write_size, OPT_U64, 1ULL << 24) // bytes
 OPTION(keyvaluestore_header_cache_size, OPT_INT, 4096)    // Header cache size
-OPTION(keyvaluestore_backend, OPT_STR, "leveldb")
 
 // max bytes to search ahead in journal searching for corruption
 OPTION(journal_max_corrupt_search, OPT_U64, 10<<20)
@@ -780,8 +722,8 @@ OPTION(journal_ignore_corruption, OPT_BOOL, false) // assume journal is not corr
 OPTION(rados_mon_op_timeout, OPT_DOUBLE, 0) // how many seconds to wait for a response from the monitor before returning an error from a rados operation. 0 means on limit.
 OPTION(rados_osd_op_timeout, OPT_DOUBLE, 0) // how many seconds to wait for a response from osds before returning an error from a rados operation. 0 means no limit.
 
-OPTION(rbd_cache, OPT_BOOL, true) // whether to enable caching (writeback unless rbd_cache_max_dirty is 0)
-OPTION(rbd_cache_writethrough_until_flush, OPT_BOOL, true) // whether to make writeback caching writethrough until flush is called, to be sure the user of librbd will send flushs so that writeback is safe
+OPTION(rbd_cache, OPT_BOOL, false) // whether to enable caching (writeback unless rbd_cache_max_dirty is 0)
+OPTION(rbd_cache_writethrough_until_flush, OPT_BOOL, false) // whether to make writeback caching writethrough until flush is called, to be sure the user of librbd will send flushs so that writeback is safe
 OPTION(rbd_cache_size, OPT_LONGLONG, 32<<20)         // cache size in bytes
 OPTION(rbd_cache_max_dirty, OPT_LONGLONG, 24<<20)    // dirty limit in bytes - set to 0 for write-through caching
 OPTION(rbd_cache_target_dirty, OPT_LONGLONG, 16<<20) // target dirty limit in bytes
@@ -812,8 +754,8 @@ OPTION(rbd_localize_parent_reads, OPT_BOOL, true)
  */
 OPTION(rbd_default_format, OPT_INT, 1)
 OPTION(rbd_default_order, OPT_INT, 22)
-OPTION(rbd_default_stripe_count, OPT_U64, 0) // changing requires stripingv2 feature
-OPTION(rbd_default_stripe_unit, OPT_U64, 0) // changing to non-object size requires stripingv2 feature
+OPTION(rbd_default_stripe_count, OPT_U64, 1) // changing requires stripingv2 feature
+OPTION(rbd_default_stripe_unit, OPT_U64, 4194304) // changing to non-object size requires stripingv2 feature
 OPTION(rbd_default_features, OPT_INT, 3) // 1 for layering, 3 for layering+stripingv2. only applies to format 2 images
 
 OPTION(nss_db_path, OPT_STR, "") // path to nss db
@@ -828,6 +770,7 @@ OPTION(rgw_cache_lru_size, OPT_INT, 10000)   // num of entries in rgw cache
 OPTION(rgw_socket_path, OPT_STR, "")   // path to unix domain socket, if not specified, rgw will not run as external fcgi
 OPTION(rgw_host, OPT_STR, "")  // host for radosgw, can be an IP, default is 0.0.0.0
 OPTION(rgw_port, OPT_STR, "")  // port to listen, format as "8080" "5000", if not specified, rgw will not run external fcgi
+OPTION(rgw_fcgi_explicit_free, OPT_BOOL, true) // whether to call FCGX_Free explicitly on every complete request
 OPTION(rgw_dns_name, OPT_STR, "")
 OPTION(rgw_script_uri, OPT_STR, "") // alternative value for SCRIPT_URI if not set in request
 OPTION(rgw_request_uri, OPT_STR,  "") // alternative value for REQUEST_URI if not set in request
@@ -910,7 +853,7 @@ OPTION(rgw_bucket_quota_cache_size, OPT_INT, 10000) // number of entries in buck
 
 OPTION(rgw_expose_bucket, OPT_BOOL, false) // Return the bucket name in the 'Bucket' response header
 
-OPTION(rgw_frontends, OPT_STR, "fastcgi, civetweb port=7480") // rgw front ends
+OPTION(rgw_frontends, OPT_STR, "") // alternative front ends
 
 OPTION(rgw_user_quota_bucket_sync_interval, OPT_INT, 180) // time period for accumulating modified buckets before syncing stats
 OPTION(rgw_user_quota_sync_interval, OPT_INT, 3600 * 24) // time period for accumulating modified buckets before syncing entire user stats
diff --git a/src/common/crc32c_intel_fast_asm.S b/src/common/crc32c_intel_fast_asm.S
index 4ca5d65..2189684 100644
--- a/src/common/crc32c_intel_fast_asm.S
+++ b/src/common/crc32c_intel_fast_asm.S
@@ -662,3 +662,5 @@ global %1_slver
 %endmacro
 ;;;       func            core, ver, snum
 slversion crc32_iscsi_00, 00,   02,  0014
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/src/common/crc32c_intel_fast_zero_asm.S b/src/common/crc32c_intel_fast_zero_asm.S
index b7246f2..34b7f48 100644
--- a/src/common/crc32c_intel_fast_zero_asm.S
+++ b/src/common/crc32c_intel_fast_zero_asm.S
@@ -644,3 +644,5 @@ global %1_slver
 %endmacro
 ;;;       func            core, ver, snum
 slversion crc32_iscsi_zero_00, 00,   02,  0014
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/src/common/dummy.cc b/src/common/dummy.cc
deleted file mode 100644
index 2626714..0000000
--- a/src/common/dummy.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Inktank, Inc
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-/*
- * A dummy file with a .cc extension to make autotools link
- * ceph_test_librbd_fsx with a C++ linker.  An approach w/o a physical
- * dummy.cc recommended in 8.3.5 Libtool Convenience Libraries works,
- * but breaks 'make tags' and friends.
- */
diff --git a/src/common/entity_name.h b/src/common/entity_name.h
index 2949f1f..550bf1d 100644
--- a/src/common/entity_name.h
+++ b/src/common/entity_name.h
@@ -81,7 +81,7 @@ private:
 
 uint32_t str_to_ceph_entity_type(const char * str);
 
-WRITE_CLASS_ENCODER(EntityName)
+WRITE_CLASS_ENCODER(EntityName);
 
 WRITE_EQ_OPERATORS_2(EntityName, type, id)
 
diff --git a/src/common/fd.cc b/src/common/fd.cc
index 1154e05..547e0f8 100644
--- a/src/common/fd.cc
+++ b/src/common/fd.cc
@@ -41,7 +41,7 @@ void dump_open_fds(CephContext *cct)
     char path[PATH_MAX];
     snprintf(path, sizeof(path), "%s/%s", fn, de.d_name);
     char target[PATH_MAX];
-    ssize_t r = readlink(path, target, sizeof(target) - 1);
+    ssize_t r = readlink(path, target, sizeof(target));
     if (r < 0) {
       r = -errno;
       lderr(cct) << "dump_open_fds unable to readlink " << path << ": " << cpp_strerror(r) << dendl;
diff --git a/src/common/hobject.cc b/src/common/hobject.cc
index 0abe59a..28cb86a 100644
--- a/src/common/hobject.cc
+++ b/src/common/hobject.cc
@@ -230,32 +230,18 @@ void ghobject_t::decode(bufferlist::iterator& bl)
     ::decode(shard_id, bl);
   } else {
     generation = ghobject_t::NO_GEN;
-    shard_id = shard_id_t::NO_SHARD;
+    shard_id = ghobject_t::NO_SHARD;
   }
   DECODE_FINISH(bl);
 }
 
-void ghobject_t::decode(json_spirit::Value& v)
-{
-  hobj.decode(v);
-  using namespace json_spirit;
-  Object& o = v.get_obj();
-  for (Object::size_type i=0; i<o.size(); i++) {
-    Pair& p = o[i];
-    if (p.name_ == "generation")
-      generation = p.value_.get_uint64();
-    else if (p.name_ == "shard_id")
-      shard_id.id = p.value_.get_int();
-  }
-}
-
 void ghobject_t::dump(Formatter *f) const
 {
   hobj.dump(f);
-  if (generation != NO_GEN) {
+  if (generation != NO_GEN)
     f->dump_int("generation", generation);
+  if (shard_id != ghobject_t::NO_SHARD)
     f->dump_int("shard_id", shard_id);
-  }
 }
 
 void ghobject_t::generate_test_instances(list<ghobject_t*>& o)
@@ -266,29 +252,29 @@ void ghobject_t::generate_test_instances(list<ghobject_t*>& o)
   o.push_back(new ghobject_t(hobject_t(object_t("oname"), string(), 1, 234, -1, "")));
 
   o.push_back(new ghobject_t(hobject_t(object_t("oname2"), string("okey"), CEPH_NOSNAP,
-        67, 0, "n1"), 1, shard_id_t(0)));
+	67, 0, "n1"), 1, 0));
   o.push_back(new ghobject_t(hobject_t(object_t("oname2"), string("okey"), CEPH_NOSNAP,
-        67, 0, "n1"), 1, shard_id_t(1)));
+	67, 0, "n1"), 1, 1));
   o.push_back(new ghobject_t(hobject_t(object_t("oname2"), string("okey"), CEPH_NOSNAP,
-        67, 0, "n1"), 1, shard_id_t(2)));
+	67, 0, "n1"), 1, 2));
   o.push_back(new ghobject_t(hobject_t(object_t("oname3"), string("oname3"),
-        CEPH_SNAPDIR, 910, 1, "n2"), 1, shard_id_t(0)));
+	CEPH_SNAPDIR, 910, 1, "n2"), 1, 0));
   o.push_back(new ghobject_t(hobject_t(object_t("oname3"), string("oname3"),
-        CEPH_SNAPDIR, 910, 1, "n2"), 2, shard_id_t(0)));
+	CEPH_SNAPDIR, 910, 1, "n2"), 2, 0));
   o.push_back(new ghobject_t(hobject_t(object_t("oname3"), string("oname3"),
-        CEPH_SNAPDIR, 910, 1, "n2"), 3, shard_id_t(0)));
+	CEPH_SNAPDIR, 910, 1, "n2"), 3, 0));
   o.push_back(new ghobject_t(hobject_t(object_t("oname3"), string("oname3"),
-        CEPH_SNAPDIR, 910, 1, "n2"), 3, shard_id_t(1)));
+	CEPH_SNAPDIR, 910, 1, "n2"), 3, 1));
   o.push_back(new ghobject_t(hobject_t(object_t("oname3"), string("oname3"),
-        CEPH_SNAPDIR, 910, 1, "n2"), 3, shard_id_t(2)));
+	CEPH_SNAPDIR, 910, 1, "n2"), 3, 2));
 }
 
 ostream& operator<<(ostream& out, const ghobject_t& o)
 {
   out << o.hobj;
   if (o.generation != ghobject_t::NO_GEN ||
-      o.shard_id != shard_id_t::NO_SHARD) {
-    assert(o.shard_id != shard_id_t::NO_SHARD);
+      o.shard_id != ghobject_t::NO_SHARD) {
+    assert(o.shard_id != ghobject_t::NO_SHARD);
     out << "/" << o.generation << "/" << (unsigned)(o.shard_id);
   }
   return out;
diff --git a/src/common/hobject.h b/src/common/hobject.h
index 8312280..fc12c9f 100644
--- a/src/common/hobject.h
+++ b/src/common/hobject.h
@@ -231,7 +231,11 @@ WRITE_CMP_OPERATORS_7(hobject_t,
 		      snap)
 
 typedef version_t gen_t;
+typedef uint8_t shard_t;
 
+#ifndef UINT8_MAX
+#define UINT8_MAX (255)
+#endif
 #ifndef UINT64_MAX
 #define UINT64_MAX (18446744073709551615ULL)
 #endif
@@ -239,16 +243,18 @@ typedef version_t gen_t;
 struct ghobject_t {
   hobject_t hobj;
   gen_t generation;
-  shard_id_t shard_id;
+  shard_t shard_id;
 
 public:
+  static const shard_t NO_SHARD = UINT8_MAX;
+  static shard_t no_shard() { return NO_SHARD; }
   static const gen_t NO_GEN = UINT64_MAX;
 
-  ghobject_t() : generation(NO_GEN), shard_id(shard_id_t::NO_SHARD) {}
+  ghobject_t() : generation(NO_GEN), shard_id(NO_SHARD) {}
 
-  ghobject_t(const hobject_t &obj) : hobj(obj), generation(NO_GEN), shard_id(shard_id_t::NO_SHARD) {}
+  ghobject_t(const hobject_t &obj) : hobj(obj), generation(NO_GEN), shard_id(NO_SHARD) {}
 
-  ghobject_t(const hobject_t &obj, gen_t gen, shard_id_t shard) : hobj(obj), generation(gen), shard_id(shard) {}
+  ghobject_t(const hobject_t &obj, gen_t gen, shard_t shard) : hobj(obj), generation(gen), shard_id(shard) {}
 
   bool match(uint32_t bits, uint32_t match) const {
     return hobj.match_hash(hobj.hash, bits, match);
@@ -269,7 +275,7 @@ public:
   }
 
   bool is_degenerate() const {
-    return generation == NO_GEN && shard_id == shard_id_t::NO_SHARD;
+    return generation == NO_GEN && shard_id == NO_SHARD;
   }
 
   bool is_no_gen() const {
@@ -277,7 +283,7 @@ public:
   }
 
   bool is_no_shard() const {
-    return shard_id == shard_id_t::NO_SHARD;
+    return shard_id == NO_SHARD;
   }
 
   // maximum sorted value.
diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc
index 26ebe10..6a8a1fa 100644
--- a/src/common/lockdep.cc
+++ b/src/common/lockdep.cc
@@ -37,7 +37,7 @@ CEPH_HASH_NAMESPACE_END
 #undef DOUT_COND
 #define DOUT_COND(cct, l) cct && l <= XDOUT_CONDVAR(cct, dout_subsys)
 #define lockdep_dout(v) lsubdout(g_lockdep_ceph_ctx, lockdep, v)
-#define MAX_LOCKS  2000   // increase me as needed
+#define MAX_LOCKS  1000   // increase me as needed
 #define BACKTRACE_SKIP 2
 
 /******* Globals **********/
diff --git a/src/common/map_cacher.hpp b/src/common/map_cacher.hpp
index 101a0be..da79e82 100644
--- a/src/common/map_cacher.hpp
+++ b/src/common/map_cacher.hpp
@@ -195,6 +195,6 @@ public:
     return 0;
   } ///< @return error value, 0 on success
 };
-} // namespace
+}; // namespace
 
 #endif
diff --git a/src/common/module.c b/src/common/module.c
deleted file mode 100644
index cdae181..0000000
--- a/src/common/module.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Inktank Storage, Inc.
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-/*
- * TODO: Switch to libkmod when we abandon older platforms.  The APIs
- * we want are:
- *
- * - kmod_module_new_from_name() for obtaining handles;
- * - kmod_module_probe_insert_module() for module_load();
- * - kmod_module_get_info(), kmod_module_info_get_{key,value}() for
- *   module_has_param().
- */
-
-/*
- * Return command's exit status or -1 on error.
- */
-static int run_command(const char *command)
-{
-	int status;
-
-	status = system(command);
-	if (status >= 0 && WIFEXITED(status))
-		return WEXITSTATUS(status);
-
-	if (status < 0) {
-		char error_buf[80];
-		fprintf(stderr, "couldn't run '%s': %s\n", command,
-			strerror_r(errno, error_buf, sizeof(error_buf)));
-	} else if (WIFSIGNALED(status)) {
-		fprintf(stderr, "'%s' killed by signal %d\n", command,
-			WTERMSIG(status));
-	} else {
-		fprintf(stderr, "weird status from '%s': %d\n", command,
-			status);
-	}
-
-	return -1;
-}
-
-int module_has_param(const char *module, const char *param)
-{
-	char command[128];
-
-	snprintf(command, sizeof(command),
-		 "/sbin/modinfo -F parm %s | /bin/grep -q ^%s:",
-		 module, param);
-
-	return run_command(command) == 0;
-}
-
-int module_load(const char *module, const char *options)
-{
-	char command[128];
-
-	snprintf(command, sizeof(command), "/sbin/modprobe %s %s",
-		 module, (options ? options : ""));
-
-	return run_command(command);
-}
diff --git a/src/common/module.h b/src/common/module.h
deleted file mode 100644
index d5fa6a1..0000000
--- a/src/common/module.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Inktank Storage, Inc.
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_MODULE_H
-#define CEPH_MODULE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int module_has_param(const char *module, const char *param);
-int module_load(const char *module, const char *options);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CEPH_MODULE_H */
diff --git a/src/common/obj_bencher.h b/src/common/obj_bencher.h
index ffdd641..216e265 100644
--- a/src/common/obj_bencher.h
+++ b/src/common/obj_bencher.h
@@ -64,7 +64,7 @@ protected:
   int fetch_bench_metadata(const std::string& metadata_file, int* object_size, int* num_objects, int* prevPid);
 
   int write_bench(int secondsToRun, int maxObjects, int concurrentios, const string& run_name_meta);
-  int seq_read_bench(int secondsToRun, int num_objects, int concurrentios, int writePid);
+  int seq_read_bench(int secondsToRun, int concurrentios, int num_objects, int writePid);
   int rand_read_bench(int secondsToRun, int num_objects, int concurrentios, int writePid);
 
   int clean_up(int num_objects, int prevPid, int concurrentios);
diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc
index 39df713..4fe1354 100644
--- a/src/common/perf_counters.cc
+++ b/src/common/perf_counters.cc
@@ -101,18 +101,15 @@ void PerfCounters::inc(int idx, uint64_t amt)
   if (!m_cct->_conf->perf)
     return;
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   if (!(data.type & PERFCOUNTER_U64))
     return;
-  if (data.type & PERFCOUNTER_LONGRUNAVG) {
-    data.avgcount.inc();
-    data.u64.add(amt);
-    data.avgcount2.inc();
-  } else {
-    data.u64.add(amt);
-  }
+  data.u64 += amt;
+  if (data.type & PERFCOUNTER_LONGRUNAVG)
+    data.avgcount++;
 }
 
 void PerfCounters::dec(int idx, uint64_t amt)
@@ -120,13 +117,15 @@ void PerfCounters::dec(int idx, uint64_t amt)
   if (!m_cct->_conf->perf)
     return;
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   assert(!(data.type & PERFCOUNTER_LONGRUNAVG));
   if (!(data.type & PERFCOUNTER_U64))
     return;
-  data.u64.sub(amt);
+  assert(data.u64 >= amt);
+  data.u64 -= amt;
 }
 
 void PerfCounters::set(int idx, uint64_t amt)
@@ -134,19 +133,15 @@ void PerfCounters::set(int idx, uint64_t amt)
   if (!m_cct->_conf->perf)
     return;
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   if (!(data.type & PERFCOUNTER_U64))
     return;
-  data.u64.set(amt);
-  if (data.type & PERFCOUNTER_LONGRUNAVG) {
-    data.avgcount.inc();
-    data.u64.set(amt);
-    data.avgcount2.inc();
-  } else {
-    data.u64.set(amt);
-  }
+  data.u64 = amt;
+  if (data.type & PERFCOUNTER_LONGRUNAVG)
+    data.avgcount++;
 }
 
 uint64_t PerfCounters::get(int idx) const
@@ -154,12 +149,13 @@ uint64_t PerfCounters::get(int idx) const
   if (!m_cct->_conf->perf)
     return 0;
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   const perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   if (!(data.type & PERFCOUNTER_U64))
     return 0;
-  return data.u64.read();
+  return data.u64;
 }
 
 void PerfCounters::tinc(int idx, utime_t amt)
@@ -167,18 +163,15 @@ void PerfCounters::tinc(int idx, utime_t amt)
   if (!m_cct->_conf->perf)
     return;
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   if (!(data.type & PERFCOUNTER_TIME))
     return;
-  if (data.type & PERFCOUNTER_LONGRUNAVG) {
-    data.avgcount.inc();
-    data.u64.add(amt.to_nsec());
-    data.avgcount2.inc();
-  } else {
-    data.u64.add(amt.to_nsec());
-  }
+  data.u64 += amt.to_nsec();
+  if (data.type & PERFCOUNTER_LONGRUNAVG)
+    data.avgcount++;
 }
 
 void PerfCounters::tset(int idx, utime_t amt)
@@ -186,12 +179,13 @@ void PerfCounters::tset(int idx, utime_t amt)
   if (!m_cct->_conf->perf)
     return;
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   if (!(data.type & PERFCOUNTER_TIME))
     return;
-  data.u64.set(amt.to_nsec());
+  data.u64 = amt.to_nsec();
   if (data.type & PERFCOUNTER_LONGRUNAVG)
     assert(0);
 }
@@ -201,13 +195,13 @@ utime_t PerfCounters::tget(int idx) const
   if (!m_cct->_conf->perf)
     return utime_t();
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   const perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
   if (!(data.type & PERFCOUNTER_TIME))
     return utime_t();
-  uint64_t v = data.u64.read();
-  return utime_t(v / 1000000000ull, v % 1000000000ull);
+  return utime_t(data.u64 / 1000000000ull, data.u64 % 1000000000ull);
 }
 
 pair<uint64_t, uint64_t> PerfCounters::get_tavg_ms(int idx) const
@@ -215,6 +209,7 @@ pair<uint64_t, uint64_t> PerfCounters::get_tavg_ms(int idx) const
   if (!m_cct->_conf->perf)
     return make_pair(0, 0);
 
+  Mutex::Locker lck(m_lock);
   assert(idx > m_lower_bound);
   assert(idx < m_upper_bound);
   const perf_counter_data_any_d& data(m_data[idx - m_lower_bound - 1]);
@@ -222,12 +217,13 @@ pair<uint64_t, uint64_t> PerfCounters::get_tavg_ms(int idx) const
     return make_pair(0, 0);
   if (!(data.type & PERFCOUNTER_LONGRUNAVG))
     return make_pair(0, 0);
-  pair<uint64_t,uint64_t> a = data.read_avg();
-  return make_pair(a.second, a.first / 1000000ull);
+  return make_pair(data.avgcount, data.u64/1000000);
 }
 
 void PerfCounters::dump_formatted(Formatter *f, bool schema)
 {
+  Mutex::Locker lck(m_lock);
+
   f->open_object_section(m_name.c_str());
   perf_counter_data_vec_t::const_iterator d = m_data.begin();
   perf_counter_data_vec_t::const_iterator d_end = m_data.end();
@@ -243,27 +239,25 @@ void PerfCounters::dump_formatted(Formatter *f, bool schema)
     } else {
       if (d->type & PERFCOUNTER_LONGRUNAVG) {
 	f->open_object_section(d->name);
-	pair<uint64_t,uint64_t> a = d->read_avg();
 	if (d->type & PERFCOUNTER_U64) {
-	  f->dump_unsigned("avgcount", a.second);
-	  f->dump_unsigned("sum", a.first);
+	  f->dump_unsigned("avgcount", d->avgcount);
+	  f->dump_unsigned("sum", d->u64);
 	} else if (d->type & PERFCOUNTER_TIME) {
-	  f->dump_unsigned("avgcount", a.second);
-	  f->dump_format_unquoted("sum", "%" PRId64 ".%09" PRId64,
-				  a.first / 1000000000ull,
-				  a.first % 1000000000ull);
+	  f->dump_unsigned("avgcount", d->avgcount);
+	  f->dump_format_unquoted("sum", "%"PRId64".%09"PRId64,
+				  d->u64 / 1000000000ull,
+				  d->u64 % 1000000000ull);
 	} else {
 	  assert(0);
 	}
 	f->close_section();
       } else {
-	uint64_t v = d->u64.read();
 	if (d->type & PERFCOUNTER_U64) {
-	  f->dump_unsigned(d->name, v);
+	  f->dump_unsigned(d->name, d->u64);
 	} else if (d->type & PERFCOUNTER_TIME) {
-	  f->dump_format_unquoted(d->name, "%" PRId64 ".%09" PRId64,
-				  v / 1000000000ull,
-				  v % 1000000000ull);
+	  f->dump_format_unquoted(d->name, "%"PRId64".%09"PRId64,
+				  d->u64 / 1000000000ull,
+				  d->u64 % 1000000000ull);
 	} else {
 	  assert(0);
 	}
@@ -293,6 +287,14 @@ PerfCounters::PerfCounters(CephContext *cct, const std::string &name,
   m_data.resize(upper_bound - lower_bound - 1);
 }
 
+PerfCounters::perf_counter_data_any_d::perf_counter_data_any_d()
+  : name(NULL),
+    type(PERFCOUNTER_NONE),
+    u64(0),
+    avgcount(0)
+{
+}
+
 PerfCountersBuilder::PerfCountersBuilder(CephContext *cct, const std::string &name,
                   int first, int last)
   : m_perf_counters(new PerfCounters(cct, name, first, last))
diff --git a/src/common/perf_counters.h b/src/common/perf_counters.h
index 78c8684..f4651c6 100644
--- a/src/common/perf_counters.h
+++ b/src/common/perf_counters.h
@@ -111,51 +111,14 @@ private:
 
   /** Represents a PerfCounters data element. */
   struct perf_counter_data_any_d {
-    perf_counter_data_any_d()
-      : name(NULL),
-	type(PERFCOUNTER_NONE),
-	u64(0),
-	avgcount(0),
-	avgcount2(0)
-    {}
-    perf_counter_data_any_d(const perf_counter_data_any_d& other)
-      : name(other.name),
-	type(other.type),
-	u64(other.u64.read()) {
-      pair<uint64_t,uint64_t> a = other.read_avg();
-      u64.set(a.first);
-      avgcount.set(a.second);
-      avgcount2.set(a.second);
-    }
-
+    perf_counter_data_any_d();
     void write_schema_json(char *buf, size_t buf_sz) const;
     void  write_json(char *buf, size_t buf_sz) const;
 
     const char *name;
     enum perfcounter_type_d type;
-    atomic64_t u64;
-    atomic64_t avgcount;
-    atomic64_t avgcount2;
-
-    perf_counter_data_any_d& operator=(const perf_counter_data_any_d& other) {
-      name = other.name;
-      type = other.type;
-      pair<uint64_t,uint64_t> a = other.read_avg();
-      u64.set(a.first);
-      avgcount.set(a.second);
-      avgcount2.set(a.second);
-      return *this;
-    }
-
-    /// read <sum, count> safely
-    pair<uint64_t,uint64_t> read_avg() const {
-      uint64_t sum, count;
-      do {
-	count = avgcount.read();
-	sum = u64.read();
-      } while (avgcount2.read() != count);
-      return make_pair(sum, count);
-    }
+    uint64_t u64;
+    uint64_t avgcount;
   };
   typedef std::vector<perf_counter_data_any_d> perf_counter_data_vec_t;
 
diff --git a/src/common/shared_cache.hpp b/src/common/shared_cache.hpp
index cb478a5..df52178 100644
--- a/src/common/shared_cache.hpp
+++ b/src/common/shared_cache.hpp
@@ -24,7 +24,6 @@
 
 template <class K, class V>
 class SharedLRU {
-  CephContext *cct;
   typedef ceph::shared_ptr<V> VPtr;
   typedef ceph::weak_ptr<V> WeakVPtr;
   Mutex lock;
@@ -35,7 +34,7 @@ class SharedLRU {
   map<K, typename list<pair<K, VPtr> >::iterator > contents;
   list<pair<K, VPtr> > lru;
 
-  map<K, pair<WeakVPtr, V*> > weak_refs;
+  map<K, WeakVPtr> weak_refs;
 
   void trim_cache(list<VPtr> *to_release) {
     while (size > max_size) {
@@ -44,7 +43,7 @@ class SharedLRU {
     }
   }
 
-  void lru_remove(const K& key) {
+  void lru_remove(K key) {
     typename map<K, typename list<pair<K, VPtr> >::iterator>::iterator i =
       contents.find(key);
     if (i == contents.end())
@@ -54,7 +53,7 @@ class SharedLRU {
     contents.erase(i);
   }
 
-  void lru_add(const K& key, const VPtr& val, list<VPtr> *to_release) {
+  void lru_add(K key, VPtr val, list<VPtr> *to_release) {
     typename map<K, typename list<pair<K, VPtr> >::iterator>::iterator i =
       contents.find(key);
     if (i != contents.end()) {
@@ -67,12 +66,9 @@ class SharedLRU {
     }
   }
 
-  void remove(const K& key, V *valptr) {
+  void remove(K key) {
     Mutex::Locker l(lock);
-    typename map<K, pair<WeakVPtr, V*> >::iterator i = weak_refs.find(key);
-    if (i != weak_refs.end() && i->second.second == valptr) {
-      weak_refs.erase(i);
-    }
+    weak_refs.erase(key);
     cond.Signal();
   }
 
@@ -82,70 +78,32 @@ class SharedLRU {
     K key;
     Cleanup(SharedLRU<K, V> *cache, K key) : cache(cache), key(key) {}
     void operator()(V *ptr) {
-      cache->remove(key, ptr);
+      cache->remove(key);
       delete ptr;
     }
   };
 
 public:
-  SharedLRU(CephContext *cct = NULL, size_t max_size = 20)
-    : cct(cct), lock("SharedLRU::lock"), max_size(max_size), size(0) {}
+  SharedLRU(size_t max_size = 20)
+    : lock("SharedLRU::lock"), max_size(max_size), size(0) {}
   
   ~SharedLRU() {
     contents.clear();
     lru.clear();
-    if (!weak_refs.empty()) {
-      lderr(cct) << "leaked refs:\n";
-      dump_weak_refs(*_dout);
-      *_dout << dendl;
-      assert(weak_refs.empty());
-    }
-  }
-
-  void set_cct(CephContext *c) {
-    cct = c;
-  }
-
-  void dump_weak_refs() {
-    lderr(cct) << "leaked refs:\n";
-    dump_weak_refs(*_dout);
-    *_dout << dendl;
+    assert(weak_refs.empty());
   }
 
-  void dump_weak_refs(ostream& out) {
-    for (typename map<K, pair<WeakVPtr, V*> >::iterator p = weak_refs.begin();
-	 p != weak_refs.end();
-	 ++p) {
-      out << __func__ << " " << this << " weak_refs: "
-	  << p->first << " = " << p->second.second
-	  << " with " << p->second.first.use_count() << " refs"
-	  << std::endl;
-    }
-  }
-
-  void clear(const K& key) {
+  void clear(K key) {
     VPtr val; // release any ref we have after we drop the lock
     {
       Mutex::Locker l(lock);
       if (weak_refs.count(key)) {
-	val = weak_refs[key].first.lock();
+	val = weak_refs[key].lock();
       }
       lru_remove(key);
     }
   }
 
-  void purge(const K &key) {
-    VPtr val; // release any ref we have after we drop the lock
-    {
-      Mutex::Locker l(lock);
-      if (weak_refs.count(key)) {
-	val = weak_refs[key].first.lock();
-      }
-      lru_remove(key);
-      weak_refs.erase(key);
-    }
-  }
-
   void set_size(size_t new_size) {
     list<VPtr> to_release;
     {
@@ -161,7 +119,7 @@ public:
     return weak_refs.begin()->first;
   }
 
-  VPtr lower_bound(const K& key) {
+  VPtr lower_bound(K key) {
     VPtr val;
     list<VPtr> to_release;
     {
@@ -171,11 +129,10 @@ public:
 	retry = false;
 	if (weak_refs.empty())
 	  break;
-	typename map<K, pair<WeakVPtr, V*> >::iterator i =
-	  weak_refs.lower_bound(key);
+	typename map<K, WeakVPtr>::iterator i = weak_refs.lower_bound(key);
 	if (i == weak_refs.end())
 	  --i;
-	val = i->second.first.lock();
+	val = i->second.lock();
 	if (val) {
 	  lru_add(i->first, val, &to_release);
 	} else {
@@ -188,7 +145,7 @@ public:
     return val;
   }
 
-  VPtr lookup(const K& key) {
+  VPtr lookup(K key) {
     VPtr val;
     list<VPtr> to_release;
     {
@@ -196,9 +153,8 @@ public:
       bool retry = false;
       do {
 	retry = false;
-	typename map<K, pair<WeakVPtr, V*> >::iterator i = weak_refs.find(key);
-	if (i != weak_refs.end()) {
-	  val = i->second.first.lock();
+	if (weak_refs.count(key)) {
+	  val = weak_refs[key].lock();
 	  if (val) {
 	    lru_add(key, val, &to_release);
 	  } else {
@@ -212,37 +168,12 @@ public:
     return val;
   }
 
-  /***
-   * Inserts a key if not present, or bumps it to the front of the LRU if
-   * it is, and then gives you a reference to the value. If the key already
-   * existed, you are responsible for deleting the new value you tried to
-   * insert.
-   *
-   * @param key The key to insert
-   * @param value The value that goes with the key
-   * @param existed Set to true if the value was already in the
-   * map, false otherwise
-   * @return A reference to the map's value for the given key
-   */
-  VPtr add(const K& key, V *value, bool *existed = NULL) {
-    VPtr val;
+  VPtr add(K key, V *value) {
+    VPtr val(value, Cleanup(this, key));
     list<VPtr> to_release;
     {
       Mutex::Locker l(lock);
-      typename map<K, pair<WeakVPtr, V*> >::iterator actual =
-	weak_refs.lower_bound(key);
-      if (actual != weak_refs.end() && actual->first == key) {
-        if (existed) 
-          *existed = true;
-
-        return actual->second.first.lock();
-      }
-
-      if (existed)      
-        *existed = false;
-
-      val = VPtr(value, Cleanup(this, key));
-      weak_refs.insert(actual, make_pair(key, make_pair(val, value)));
+      weak_refs.insert(make_pair(key, val));
       lru_add(key, val, &to_release);
     }
     return val;
diff --git a/src/common/simple_cache.hpp b/src/common/simple_cache.hpp
index 30abd0a..60919fd 100644
--- a/src/common/simple_cache.hpp
+++ b/src/common/simple_cache.hpp
@@ -62,16 +62,6 @@ public:
     }
   }
 
-  void clear(K key) {
-    Mutex::Locker l(lock);
-    typename map<K, typename list<pair<K, V> >::iterator>::iterator i =
-      contents.find(key);
-    if (i == contents.end())
-      return;
-    lru.erase(i->second);
-    contents.erase(i);
-  }
-
   void set_size(size_t new_size) {
     Mutex::Locker l(lock);
     max_size = new_size;
diff --git a/src/common/str_map.cc b/src/common/str_map.cc
index 719f94f..ef9b7d4 100644
--- a/src/common/str_map.cc
+++ b/src/common/str_map.cc
@@ -23,11 +23,9 @@
 
 using namespace std;
 
-int get_json_str_map(
-    const string &str,
-    ostream &ss,
-    map<string,string> *str_map,
-    bool fallback_to_plain)
+int get_str_map(const string &str,
+                ostream &ss,
+                map<string,string> *str_map)
 {
   json_spirit::mValue json;
   try {
@@ -48,83 +46,23 @@ int get_json_str_map(
 	 ++i) {
       (*str_map)[i->first] = i->second.get_str();
     }
+    
   } catch (json_spirit::Error_position &e) {
-    if (fallback_to_plain) {
-      // fallback to key=value format
-      get_str_map(str, "\t\n ", str_map);
-    } else {
-      return -EINVAL;
+    // fallback to key=value format
+
+    list<string> pairs;
+    get_str_list(str, "\t\n ", pairs);
+    for (list<string>::iterator i = pairs.begin(); i != pairs.end(); ++i) {
+      size_t equal = i->find('=');
+      if (equal == string::npos)
+	(*str_map)[*i] = string();
+      else {
+	const string key = i->substr(0, equal);
+	equal++;
+	const string value = i->substr(equal);
+	(*str_map)[key] = value;
+      }
     }
   }
   return 0;
 }
-
-int get_str_map(
-    const string &str,
-    const char *delims,
-    map<string,string> *str_map)
-{
-  list<string> pairs;
-  get_str_list(str, delims, pairs);
-  for (list<string>::iterator i = pairs.begin(); i != pairs.end(); ++i) {
-    size_t equal = i->find('=');
-    if (equal == string::npos)
-      (*str_map)[*i] = string();
-    else {
-      const string key = i->substr(0, equal);
-      equal++;
-      const string value = i->substr(equal);
-      (*str_map)[key] = value;
-    }
-  }
-  return 0;
-}
-
-int get_str_map(
-    const string &str,
-    map<string,string> *str_map)
-{
-  const char *delims = ",;\t\n ";
-  return get_str_map(str, delims, str_map);
-}
-
-string get_str_map_value(
-    const map<string,string> &str_map,
-    const string &key,
-    const string *def_val)
-{
-  map<string,string>::const_iterator p = str_map.find(key);
-
-  // key exists in str_map
-  if (p != str_map.end()) {
-    // but value is empty
-    if (p->second.empty())
-      return p->first;
-    // and value is not empty
-    return p->second;
-  }
-
-  // key DNE in str_map and def_val was specified
-  if (def_val != NULL)
-    return *def_val;
-
-  // key DNE in str_map, no def_val was specified
-  return string();
-}
-
-string get_str_map_key(
-    const map<string,string> &str_map,
-    const string &key,
-    const string *fallback_key)
-{
-  map<string,string>::const_iterator p = str_map.find(key);
-  if (p != str_map.end())
-    return p->second;
-
-  if (fallback_key != NULL) {
-    p = str_map.find(*fallback_key);
-    if (p != str_map.end())
-      return p->second;
-  }
-  return string();
-}
diff --git a/src/common/sync_filesystem.h b/src/common/sync_filesystem.h
index 8882cbb..eff18d2 100644
--- a/src/common/sync_filesystem.h
+++ b/src/common/sync_filesystem.h
@@ -16,11 +16,11 @@
 #define CEPH_SYNC_FILESYSTEM_H
 
 #include <unistd.h>
+#include <syscall.h>
 
 #ifndef __CYGWIN__
 # ifndef DARWIN
 #  include <sys/ioctl.h>
-#  include <syscall.h>
 #  include "../os/btrfs_ioctl.h"
 # endif
 #endif
diff --git a/src/common/types.cc b/src/common/types.cc
deleted file mode 100644
index 1ad2ccc..0000000
--- a/src/common/types.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- * 
- */
-#ifndef __CEPH_TYPES_H
-#define __CEPH_TYPES_H
-
-#include <include/types.h>
-
-#ifndef UINT8_MAX
-#define UINT8_MAX (255)
-#endif
-
-const shard_id_t shard_id_t::NO_SHARD(UINT8_MAX);
-
-ostream &operator<<(ostream &lhs, const shard_id_t &rhs)
-{
-  return lhs << (unsigned)rhs.id;
-}
-
-#endif
diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc
index 9618d98..895c9ff 100644
--- a/src/crush/CrushWrapper.cc
+++ b/src/crush/CrushWrapper.cc
@@ -171,8 +171,8 @@ bool CrushWrapper::_search_item_exists(int item) const
     if (!crush->buckets[i])
       continue;
     crush_bucket *b = crush->buckets[i];
-    for (unsigned i=0; i<b->size; ++i) {
-      if (b->items[i] == item)
+    for (unsigned j=0; j<b->size; ++j) {
+      if (b->items[j] == item)
 	return true;
     }
   }
@@ -585,7 +585,7 @@ int CrushWrapper::create_or_move_item(CephContext *cct, int item, float weight,
   if (check_item_loc(cct, item, loc, &old_iweight)) {
     ldout(cct, 5) << "create_or_move_item " << item << " already at " << loc << dendl;
   } else {
-    if (item_exists(item)) {
+    if (_search_item_exists(item)) {
       weight = get_item_weightf(item);
       ldout(cct, 10) << "create_or_move_item " << item << " exists with weight " << weight << dendl;
       remove_item(cct, item, true);
@@ -676,33 +676,6 @@ int CrushWrapper::adjust_item_weight(CephContext *cct, int id, int weight)
   return changed;
 }
 
-int CrushWrapper::adjust_subtree_weight(CephContext *cct, int id, int weight)
-{
-  ldout(cct, 5) << "adjust_item_weight " << id << " weight " << weight << dendl;
-  crush_bucket *b = get_bucket(id);
-  if (IS_ERR(b))
-    return PTR_ERR(b);
-  int changed = 0;
-  list<crush_bucket*> q;
-  q.push_back(b);
-  while (!q.empty()) {
-    b = q.front();
-    q.pop_front();
-    for (unsigned i=0; i<b->size; ++i) {
-      int n = b->items[i];
-      if (n >= 0) {
-	crush_bucket_adjust_item_weight(b, n, weight);
-      } else {
-	crush_bucket *sub = get_bucket(n);
-	if (IS_ERR(sub))
-	  continue;
-	q.push_back(sub);
-      }
-    }
-  }
-  return changed;
-}
-
 bool CrushWrapper::check_item_present(int id)
 {
   bool found = false;
@@ -874,13 +847,14 @@ int CrushWrapper::get_rule_weight_osd_map(unsigned ruleno, map<int,float> *pmap)
 	  assert(b);
 	  for (unsigned j=0; j<b->size; ++j) {
 	    int item_id = b->items[j];
-	    if (item_id >= 0) { //it's an OSD
+	    if (item_id >= 0) //it's an OSD
+	    {
 	      float w = crush_get_bucket_item_weight(b, j);
 	      m[item_id] = w;
 	      sum += w;
-	    } else { //not an OSD, expand the child later
-	      q.push_back(item_id);
 	    }
+	    else //not an OSD, expand the child later
+	      q.push_back(item_id);
 	  }
 	}
       }
@@ -1130,7 +1104,7 @@ void CrushWrapper::decode_crush_bucket(crush_bucket** bptr, bufferlist::iterator
     ::decode(bucket->items[j], blp);
   }
 
-  bucket->perm = (__u32*)calloc(1, bucket->size * sizeof(__u32));
+  bucket->perm = (__u32*)calloc(1, bucket->size * sizeof(__s32));
   bucket->perm_n = 0;
 
   switch (bucket->alg) {
@@ -1275,9 +1249,6 @@ void CrushWrapper::dump_tunables(Formatter *f) const
 
   f->dump_int("require_feature_tunables", (int)has_nondefault_tunables());
   f->dump_int("require_feature_tunables2", (int)has_nondefault_tunables2());
-  f->dump_int("require_feature_tunables3", (int)has_nondefault_tunables3());
-  f->dump_int("has_v2_rules", (int)has_v2_rules());
-  f->dump_int("has_v3_rules", (int)has_v3_rules());
 }
 
 void CrushWrapper::dump_rules(Formatter *f) const
diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h
index 2d1fa95..1024f83 100644
--- a/src/crush/CrushWrapper.h
+++ b/src/crush/CrushWrapper.h
@@ -52,15 +52,16 @@ using namespace std;
 class CrushWrapper {
   mutable Mutex mapper_lock;
 public:
+  struct crush_map *crush;
   std::map<int32_t, string> type_map; /* bucket/device type names */
   std::map<int32_t, string> name_map; /* bucket/device names */
   std::map<int32_t, string> rule_name_map;
 
-private:
-  struct crush_map *crush;
   /* reverse maps */
   bool have_rmaps;
   std::map<string, int> type_rmap, name_rmap, rule_name_rmap;
+
+private:
   void build_rmaps() {
     if (have_rmaps) return;
     build_rmap(type_map, type_rmap);
@@ -552,11 +553,6 @@ public:
   }
   void reweight(CephContext *cct);
 
-  int adjust_subtree_weight(CephContext *cct, int id, int weight);
-  int adjust_subtree_weightf(CephContext *cct, int id, float weight) {
-    return adjust_subtree_weight(cct, id, (int)(weight * (float)0x10000));
-  }
-
   /// check if item id is present in the map hierarchy
   bool check_item_present(int id);
 
@@ -882,7 +878,7 @@ public:
     return crush_find_rule(crush, ruleset, type, size);
   }
 
-  bool ruleset_exists(int const ruleset) const {
+  bool ruleset_exists(int ruleset) const {
     for (size_t i = 0; i < crush->max_rules; ++i) {
       if (rule_exists(i) && crush->rules[i]->mask.ruleset == ruleset) {
 	return true;
diff --git a/src/crush/builder.c b/src/crush/builder.c
index 41b90aa..f6c2dad 100644
--- a/src/crush/builder.c
+++ b/src/crush/builder.c
@@ -726,6 +726,7 @@ int crush_bucket_add_item(struct crush_bucket *b, int item, int weight)
 	default:
 		return -1;
 	}
+	return 0;
 }
 
 /************************************************/
@@ -745,7 +746,10 @@ int crush_remove_uniform_bucket_item(struct crush_bucket_uniform *bucket, int it
 	for (j = i; j < bucket->h.size; j++)
 		bucket->h.items[j] = bucket->h.items[j+1];
 	newsize = --bucket->h.size;
-	bucket->h.weight -= bucket->item_weight;
+	if (bucket->item_weight < bucket->h.weight)
+		bucket->h.weight -= bucket->item_weight;
+	else
+		bucket->h.weight = 0;
 
 	if ((_realloc = realloc(bucket->h.items, sizeof(__s32)*newsize)) == NULL) {
 		return -ENOMEM;
@@ -778,7 +782,10 @@ int crush_remove_list_bucket_item(struct crush_bucket_list *bucket, int item)
 		bucket->item_weights[j] = bucket->item_weights[j+1];
 		bucket->sum_weights[j] = bucket->sum_weights[j+1] - weight;
 	}
-	bucket->h.weight -= weight;
+	if (weight < bucket->h.weight)
+		bucket->h.weight -= weight;
+	else
+		bucket->h.weight = 0;
 	newsize = --bucket->h.size;
 	
 	void *_realloc = NULL;
@@ -829,7 +836,10 @@ int crush_remove_tree_bucket_item(struct crush_bucket_tree *bucket, int item)
 			bucket->node_weights[node] -= weight;
 			printf(" node %d weight %d\n", node, bucket->node_weights[node]);
 		}
-		bucket->h.weight -= weight;
+		if (weight < bucket->h.weight)
+			bucket->h.weight -= weight;
+		else
+			bucket->h.weight = 0;
 		break;
 	}
 	if (i == bucket->h.size)
@@ -884,7 +894,10 @@ int crush_remove_straw_bucket_item(struct crush_bucket_straw *bucket, int item)
 	for (i = 0; i < bucket->h.size; i++) {
 		if (bucket->h.items[i] == item) {
 			bucket->h.size--;
-			bucket->h.weight -= bucket->item_weights[i];
+			if (bucket->item_weights[i] < bucket->h.weight)
+				bucket->h.weight -= bucket->item_weights[i];
+			else
+				bucket->h.weight = 0;
 			for (j = i; j < bucket->h.size; j++) {
 				bucket->h.items[j] = bucket->h.items[j+1];
 				bucket->item_weights[j] = bucket->item_weights[j+1];
@@ -938,6 +951,7 @@ int crush_bucket_remove_item(struct crush_bucket *b, int item)
 	default:
 		return -1;
 	}
+	return 0;
 }
 
 
@@ -1043,6 +1057,7 @@ int crush_bucket_adjust_item_weight(struct crush_bucket *b, int item, int weight
 	default:
 		return -1;
 	}
+	return 0;
 }
 
 /************************************************/
@@ -1158,6 +1173,7 @@ int crush_reweight_bucket(struct crush_map *crush, struct crush_bucket *b)
 	default:
 		return -1;
 	}
+	return 0;
 }
 
 /***************************/
diff --git a/src/crush/mapper.c b/src/crush/mapper.c
index cce7d94..327668f 100644
--- a/src/crush/mapper.c
+++ b/src/crush/mapper.c
@@ -516,12 +516,12 @@ static void crush_choose_indep(const struct crush_map *map,
 	for (ftotal = 0; left > 0 && ftotal < tries; ftotal++) {
 #ifdef DEBUG_INDEP
 		if (out2 && ftotal) {
-			printf("%u %d a: ", ftotal, left);
+			printf("%d %d a: ", ftotal, left);
 			for (rep = outpos; rep < endpos; rep++) {
 				printf(" %d", out[rep]);
 			}
 			printf("\n");
-			printf("%u %d b: ", ftotal, left);
+			printf("%d %d b: ", ftotal, left);
 			for (rep = outpos; rep < endpos; rep++) {
 				printf(" %d", out2[rep]);
 			}
@@ -646,12 +646,12 @@ static void crush_choose_indep(const struct crush_map *map,
 	}
 #ifdef DEBUG_INDEP
 	if (out2) {
-		printf("%u %d a: ", ftotal, left);
+		printf("%d %d a: ", ftotal, left);
 		for (rep = outpos; rep < endpos; rep++) {
 			printf(" %d", out[rep]);
 		}
 		printf("\n");
-		printf("%u %d b: ", ftotal, left);
+		printf("%d %d b: ", ftotal, left);
 		for (rep = outpos; rep < endpos; rep++) {
 			printf(" %d", out2[rep]);
 		}
diff --git a/src/erasure-code/ErasureCode.cc b/src/erasure-code/ErasureCode.cc
deleted file mode 100644
index 96a6b39..0000000
--- a/src/erasure-code/ErasureCode.cc
+++ /dev/null
@@ -1,261 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph distributed storage system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- * 
- */
-
-#include <errno.h>
-#include <vector>
-#include <algorithm>
-
-#include "common/strtol.h"
-#include "ErasureCode.h"
-
-const unsigned ErasureCode::SIMD_ALIGN = 32;
-
-int ErasureCode::chunk_index(unsigned int i) const
-{
-  return chunk_mapping.size() > i ? chunk_mapping[i] : i;
-}
-
-int ErasureCode::minimum_to_decode(const set<int> &want_to_read,
-                                   const set<int> &available_chunks,
-                                   set<int> *minimum)
-{
-  if (includes(available_chunks.begin(), available_chunks.end(),
-	       want_to_read.begin(), want_to_read.end())) {
-    *minimum = want_to_read;
-  } else {
-    unsigned int k = get_data_chunk_count();
-    if (available_chunks.size() < (unsigned)k)
-      return -EIO;
-    set<int>::iterator i;
-    unsigned j;
-    for (i = available_chunks.begin(), j = 0; j < (unsigned)k; ++i, j++)
-      minimum->insert(*i);
-  }
-  return 0;
-}
-
-int ErasureCode::minimum_to_decode_with_cost(const set<int> &want_to_read,
-                                             const map<int, int> &available,
-                                             set<int> *minimum)
-{
-  set <int> available_chunks;
-  for (map<int, int>::const_iterator i = available.begin();
-       i != available.end();
-       ++i)
-    available_chunks.insert(i->first);
-  return minimum_to_decode(want_to_read, available_chunks, minimum);
-}
-
-int ErasureCode::encode_prepare(const bufferlist &raw,
-                                map<int, bufferlist> &encoded) const
-{
-  unsigned int k = get_data_chunk_count();
-  unsigned int m = get_chunk_count() - k;
-  unsigned blocksize = get_chunk_size(raw.length());
-  unsigned pad_len = blocksize * k - raw.length();
-  unsigned padded_chunks = k - raw.length() / blocksize;
-  bufferlist prepared = raw;
-
-  if (!prepared.is_aligned(SIMD_ALIGN)) {
-    // splice padded chunks off to make the rebuild faster
-    if (padded_chunks)
-      prepared.splice((k - padded_chunks) * blocksize,
-                      padded_chunks * blocksize - pad_len);
-    prepared.rebuild_aligned(SIMD_ALIGN);
-  }
-
-  for (unsigned int i = 0; i < k - padded_chunks; i++) {
-    bufferlist &chunk = encoded[chunk_index(i)];
-    chunk.substr_of(prepared, i * blocksize, blocksize);
-  }
-  if (padded_chunks) {
-    unsigned remainder = raw.length() - (k - padded_chunks) * blocksize;
-    bufferptr buf(buffer::create_aligned(blocksize, SIMD_ALIGN));
-
-    raw.copy((k - padded_chunks) * blocksize, remainder, buf.c_str());
-    buf.zero(remainder, blocksize - remainder);
-    encoded[chunk_index(k-padded_chunks)].push_back(buf);
-
-    for (unsigned int i = k - padded_chunks + 1; i < k; i++) {
-      bufferptr buf(buffer::create_aligned(blocksize, SIMD_ALIGN));
-      buf.zero();
-      encoded[chunk_index(i)].push_back(buf);
-    }
-  }
-  for (unsigned int i = k; i < k + m; i++) {
-    bufferlist &chunk = encoded[chunk_index(i)];
-    chunk.push_back(buffer::create_aligned(blocksize, SIMD_ALIGN));
-  }
-
-  return 0;
-}
-
-int ErasureCode::encode(const set<int> &want_to_encode,
-                        const bufferlist &in,
-                        map<int, bufferlist> *encoded)
-{
-  unsigned int k = get_data_chunk_count();
-  unsigned int m = get_chunk_count() - k;
-  bufferlist out;
-  int err = encode_prepare(in, *encoded);
-  if (err)
-    return err;
-  encode_chunks(want_to_encode, encoded);
-  for (unsigned int i = 0; i < k + m; i++) {
-    if (want_to_encode.count(i) == 0)
-      encoded->erase(i);
-  }
-  return 0;
-}
-
-int ErasureCode::encode_chunks(const set<int> &want_to_encode,
-                               map<int, bufferlist> *encoded)
-{
-  assert("ErasureCode::encode_chunks not implemented" == 0);
-}
- 
-int ErasureCode::decode(const set<int> &want_to_read,
-                        const map<int, bufferlist> &chunks,
-                        map<int, bufferlist> *decoded)
-{
-  vector<int> have;
-  have.reserve(chunks.size());
-  for (map<int, bufferlist>::const_iterator i = chunks.begin();
-       i != chunks.end();
-       ++i) {
-    have.push_back(i->first);
-  }
-  if (includes(
-	have.begin(), have.end(), want_to_read.begin(), want_to_read.end())) {
-    for (set<int>::iterator i = want_to_read.begin();
-	 i != want_to_read.end();
-	 ++i) {
-      (*decoded)[*i] = chunks.find(*i)->second;
-    }
-    return 0;
-  }
-  unsigned int k = get_data_chunk_count();
-  unsigned int m = get_chunk_count() - k;
-  unsigned blocksize = (*chunks.begin()).second.length();
-  for (unsigned int i =  0; i < k + m; i++) {
-    if (chunks.find(i) == chunks.end()) {
-      bufferptr ptr(buffer::create_aligned(blocksize, SIMD_ALIGN));
-      (*decoded)[i].push_front(ptr);
-    } else {
-      (*decoded)[i] = chunks.find(i)->second;
-      (*decoded)[i].rebuild_aligned(SIMD_ALIGN);
-    }
-  }
-  return decode_chunks(want_to_read, chunks, decoded);
-}
-
-int ErasureCode::decode_chunks(const set<int> &want_to_read,
-                               const map<int, bufferlist> &chunks,
-                               map<int, bufferlist> *decoded)
-{
-  assert("ErasureCode::decode_chunks not implemented" == 0);
-}
-
-int ErasureCode::parse(const map<std::string,std::string> &parameters,
-		       ostream *ss)
-{
-  return to_mapping(parameters, ss);
-}
-
-const vector<int> &ErasureCode::get_chunk_mapping() const {
-  return chunk_mapping;
-}
-
-int ErasureCode::to_mapping(const map<std::string,std::string> &parameters,
-			    ostream *ss)
-{
-  if (parameters.find("mapping") != parameters.end()) {
-    std::string mapping = parameters.find("mapping")->second;
-    int position = 0;
-    vector<int> coding_chunk_mapping;
-    for(std::string::iterator it = mapping.begin(); it != mapping.end(); ++it) {
-      if (*it == 'D')
-	chunk_mapping.push_back(position);
-      else
-	coding_chunk_mapping.push_back(position);
-      position++;
-    }
-    chunk_mapping.insert(chunk_mapping.end(),
-			 coding_chunk_mapping.begin(),
-			 coding_chunk_mapping.end());
-  }
-  return 0;
-}
-
-int ErasureCode::to_int(const std::string &name,
-			const map<std::string,std::string> &parameters,
-			int *value,
-			int default_value,
-			ostream *ss)
-{
-  if (parameters.find(name) == parameters.end() ||
-      parameters.find(name)->second.size() == 0) {
-    *value = default_value;
-    return 0;
-  }
-  std::string p = parameters.find(name)->second;
-  std::string err;
-  int r = strict_strtol(p.c_str(), 10, &err);
-  if (!err.empty()) {
-    *ss << "could not convert " << name << "=" << p
-	<< " to int because " << err
-	<< ", set to default " << default_value << std::endl;
-    *value = default_value;
-    return -EINVAL;
-  }
-  *value = r;
-  return 0;
-}
-
-int ErasureCode::to_bool(const std::string &name,
-			 const map<std::string,std::string> &parameters,
-			 bool *value,
-			 bool default_value,
-			 ostream *ss)
-{
-  if (parameters.find(name) == parameters.end() ||
-      parameters.find(name)->second.size() == 0) {
-    *value = default_value;
-    return 0;
-  }
-  const std::string p = parameters.find(name)->second;
-  *value = (p == "yes") || (p == "true");
-  return 0;
-}
-
-int ErasureCode::decode_concat(const map<int, bufferlist> &chunks,
-			       bufferlist *decoded)
-{
-  set<int> want_to_read;
-
-  for (unsigned int i = 0; i < get_data_chunk_count(); i++) {
-    want_to_read.insert(chunk_index(i));
-  }
-  map<int, bufferlist> decoded_map;
-  int r = decode(want_to_read, chunks, &decoded_map);
-  if (r == 0) {
-    for (unsigned int i = 0; i < get_data_chunk_count(); i++) {
-      decoded->claim_append(decoded_map[chunk_index(i)]);
-    }
-  }
-  return r;
-}
diff --git a/src/erasure-code/ErasureCode.h b/src/erasure-code/ErasureCode.h
deleted file mode 100644
index b135ade..0000000
--- a/src/erasure-code/ErasureCode.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph distributed storage system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- * 
- */
-
-#ifndef CEPH_ERASURE_CODE_H
-#define CEPH_ERASURE_CODE_H
-
-/*! @file ErasureCode.h
-    @brief Base class for erasure code plugins implementors
-
- */ 
-
-#include <vector>
-
-#include "ErasureCodeInterface.h"
-
-namespace ceph {
-
-  class ErasureCode : public ErasureCodeInterface {
-  public:
-    static const unsigned SIMD_ALIGN;
-
-    vector<int> chunk_mapping;
-
-    virtual ~ErasureCode() {}
-
-    virtual unsigned int get_coding_chunk_count() const {
-      return get_chunk_count() - get_data_chunk_count();
-    }
-
-    virtual int minimum_to_decode(const set<int> &want_to_read,
-                                  const set<int> &available_chunks,
-                                  set<int> *minimum);
-
-    virtual int minimum_to_decode_with_cost(const set<int> &want_to_read,
-                                            const map<int, int> &available,
-                                            set<int> *minimum);
-
-    int encode_prepare(const bufferlist &raw,
-                       map<int, bufferlist> &encoded) const;
-
-    virtual int encode(const set<int> &want_to_encode,
-                       const bufferlist &in,
-                       map<int, bufferlist> *encoded);
-
-    virtual int encode_chunks(const set<int> &want_to_encode,
-                              map<int, bufferlist> *encoded);
-
-    virtual int decode(const set<int> &want_to_read,
-                       const map<int, bufferlist> &chunks,
-                       map<int, bufferlist> *decoded);
-
-    virtual int decode_chunks(const set<int> &want_to_read,
-                              const map<int, bufferlist> &chunks,
-                              map<int, bufferlist> *decoded);
-
-    virtual int parse(const map<std::string,std::string> &parameters,
-		      ostream *ss);
-
-    virtual const vector<int> &get_chunk_mapping() const;
-
-    int to_mapping(const map<std::string,std::string> &parameters,
-		   ostream *ss);
-
-    static int to_int(const std::string &name,
-		      const map<std::string,std::string> &parameters,
-		      int *value,
-		      int default_value,
-		      ostream *ss);
-
-    static int to_bool(const std::string &name,
-		       const map<std::string,std::string> &parameters,
-		       bool *value,
-		       bool default_value,
-		       ostream *ss);
-
-    virtual int decode_concat(const map<int, bufferlist> &chunks,
-			      bufferlist *decoded);
-
-  private:
-    int chunk_index(unsigned int i) const;
-  };
-}
-
-#endif
diff --git a/src/erasure-code/ErasureCodeInterface.h b/src/erasure-code/ErasureCodeInterface.h
index 56b5265..1dc12c5 100644
--- a/src/erasure-code/ErasureCodeInterface.h
+++ b/src/erasure-code/ErasureCodeInterface.h
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
  *
@@ -142,7 +142,6 @@
 
 #include <map>
 #include <set>
-#include <vector>
 #include "include/memory.h"
 #include "include/buffer.h"
 
@@ -198,18 +197,6 @@ namespace ceph {
     virtual unsigned int get_data_chunk_count() const = 0;
 
     /**
-     * Return the number of coding chunks created by a call to the
-     * **encode** method. The coding chunks are used to recover from
-     * the loss of one or more chunks. If there is one coding chunk,
-     * it is possible to recover from the loss of exactly one
-     * chunk. If there are two coding chunks, it is possible to
-     * recover from the loss of at most two chunks, etc.
-     *
-     * @return the number of coding chunks created by encode()
-     */
-    virtual unsigned int get_coding_chunk_count() const = 0;
-
-    /**
      * Return the size (in bytes) of a single chunk created by a call
      * to the **decode** method. The returned size multiplied by
      * **get_chunk_count()** is greater or equal to **object_size**.
@@ -315,10 +302,6 @@ namespace ceph {
                        const bufferlist &in,
                        map<int, bufferlist> *encoded) = 0;
 
-
-    virtual int encode_chunks(const set<int> &want_to_encode,
-                              map<int, bufferlist> *encoded) = 0;
-
     /**
      * Decode the **chunks** and store at least **want_to_read**
      * chunks in **decoded**.
@@ -356,45 +339,6 @@ namespace ceph {
                        const map<int, bufferlist> &chunks,
                        map<int, bufferlist> *decoded) = 0;
 
-    virtual int decode_chunks(const set<int> &want_to_read,
-                              const map<int, bufferlist> &chunks,
-                              map<int, bufferlist> *decoded) = 0;
-
-    /**
-     * Return the ordered list of chunks or an empty vector
-     * if no remapping is necessary.
-     *
-     * By default encoding an object with K=2,M=1 will create three
-     * chunks, the first two are data and the last one coding. For
-     * a 10MB object, it would be:
-     *
-     *   chunk 0 for the first 5MB
-     *   chunk 1 for the last 5MB
-     *   chunk 2 for the 5MB coding chunk
-     *
-     * The plugin may, however, decide to remap them in a different
-     * order, such as:
-     *
-     *   chunk 0 for the last 5MB
-     *   chunk 1 for the 5MB coding chunk
-     *   chunk 2 for the first 5MB
-     *
-     * The vector<int> remaps the chunks so that the first chunks are
-     * data, in sequential order, and the last chunks contain parity
-     * in the same order as they were output by the encoding function.
-     *
-     * In the example above the mapping would be:
-     *
-     *   [ 1, 2, 0 ]
-     *
-     * The returned vector<int> only contains information for chunks
-     * that need remapping. If no remapping is necessary, the
-     * vector<int> is empty.
-     *
-     * @return vector<int> list of indices of chunks to be remapped
-     */
-    virtual const vector<int> &get_chunk_mapping() const = 0;
-
     /**
      * Decode the first **get_data_chunk_count()** **chunks** and
      * concatenate them them into **decoded**.
@@ -405,8 +349,18 @@ namespace ceph {
      * @param [out] decoded concatenante of the data chunks
      * @return **0** on success or a negative errno on error.
      */
-    virtual int decode_concat(const map<int, bufferlist> &chunks,
-			      bufferlist *decoded) = 0;
+    int decode_concat(const map<int, bufferlist> &chunks,
+		      bufferlist *decoded) {
+      set<int> want_to_read;
+      for (unsigned int i = 0; i < get_data_chunk_count(); i++)
+	want_to_read.insert(i);
+      map<int, bufferlist> decoded_map;
+      int r = decode(want_to_read, chunks, &decoded_map);
+      if (r == 0)
+	for (unsigned int i = 0; i < get_data_chunk_count(); i++)
+	  decoded->claim_append(decoded_map[i]);
+      return r;
+    }
   };
 
   typedef ceph::shared_ptr<ErasureCodeInterface> ErasureCodeInterfaceRef;
diff --git a/src/erasure-code/ErasureCodePlugin.cc b/src/erasure-code/ErasureCodePlugin.cc
index 980efd6..3ce0563 100644
--- a/src/erasure-code/ErasureCodePlugin.cc
+++ b/src/erasure-code/ErasureCodePlugin.cc
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
  * Copyright (C) 2014 Red Hat <contact at redhat.com>
@@ -18,7 +18,6 @@
 #include <errno.h>
 #include <dlfcn.h>
 
-#include "ceph_ver.h"
 #include "ErasureCodePlugin.h"
 #include "common/errno.h"
 #include "include/str_list.h"
@@ -26,7 +25,6 @@
 #define PLUGIN_PREFIX "libec_"
 #define PLUGIN_SUFFIX ".so"
 #define PLUGIN_INIT_FUNCTION "__erasure_code_init"
-#define PLUGIN_VERSION_FUNCTION "__erasure_code_version"
 
 ErasureCodePluginRegistry ErasureCodePluginRegistry::singleton;
 
@@ -51,23 +49,9 @@ ErasureCodePluginRegistry::~ErasureCodePluginRegistry()
   }
 }
 
-int ErasureCodePluginRegistry::remove(const std::string &name)
-{
-  assert(lock.is_locked());
-  if (plugins.find(name) == plugins.end())
-    return -ENOENT;
-  std::map<std::string,ErasureCodePlugin*>::iterator plugin = plugins.find(name);
-  void *library = plugin->second->library;
-  delete plugin->second;
-  dlclose(library);
-  plugins.erase(plugin);
-  return 0;
-}
-
 int ErasureCodePluginRegistry::add(const std::string &name,
                                    ErasureCodePlugin* plugin)
 {
-  assert(lock.is_locked());
   if (plugins.find(name) != plugins.end())
     return -EEXIST;
   plugins[name] = plugin;
@@ -76,7 +60,6 @@ int ErasureCodePluginRegistry::add(const std::string &name,
 
 ErasureCodePlugin *ErasureCodePluginRegistry::get(const std::string &name)
 {
-  assert(lock.is_locked());
   if (plugins.find(name) != plugins.end())
     return plugins[name];
   else
@@ -95,8 +78,7 @@ int ErasureCodePluginRegistry::factory(const std::string &plugin_name,
     plugin = get(plugin_name);
     if (plugin == 0) {
       loading = true;
-      assert(parameters.count("directory") != 0);
-      r = load(plugin_name, parameters.find("directory")->second, &plugin, ss);
+      r = load(plugin_name, parameters, &plugin, ss);
       loading = false;
       if (r != 0)
 	return r;
@@ -106,17 +88,14 @@ int ErasureCodePluginRegistry::factory(const std::string &plugin_name,
   return plugin->factory(parameters, erasure_code);
 }
 
-static const char *an_older_version() {
-  return "an older version";
-}
-
 int ErasureCodePluginRegistry::load(const std::string &plugin_name,
-				    const std::string &directory,
+				    const map<std::string,std::string> &parameters,
 				    ErasureCodePlugin **plugin,
 				    ostream &ss)
 {
-  assert(lock.is_locked());
-  std::string fname = directory + "/" PLUGIN_PREFIX
+  assert(parameters.count("directory") != 0);
+  std::string fname = parameters.find("directory")->second
+    + "/" PLUGIN_PREFIX
     + plugin_name + PLUGIN_SUFFIX;
   void *library = dlopen(fname.c_str(), RTLD_NOW);
   if (!library) {
@@ -124,25 +103,13 @@ int ErasureCodePluginRegistry::load(const std::string &plugin_name,
     return -EIO;
   }
 
-  const char * (*erasure_code_version)() =
-    (const char *(*)())dlsym(library, PLUGIN_VERSION_FUNCTION);
-  if (erasure_code_version == NULL)
-    erasure_code_version = an_older_version;
-  if (erasure_code_version() != string(CEPH_GIT_NICE_VER)) {
-    ss << "expected plugin " << fname << " version " << CEPH_GIT_NICE_VER
-       << " but it claims to be " << erasure_code_version() << " instead";
-    dlclose(library);
-    return -EXDEV;
-  }
-
-  int (*erasure_code_init)(const char *, const char *) =
-    (int (*)(const char *, const char *))dlsym(library, PLUGIN_INIT_FUNCTION);
+  int (*erasure_code_init)(const char *) =
+    (int (*)(const char *))dlsym(library, PLUGIN_INIT_FUNCTION);
   if (erasure_code_init) {
     std::string name = plugin_name;
-    int r = erasure_code_init(name.c_str(), directory.c_str());
+    int r = erasure_code_init(name.c_str());
     if (r != 0) {
       ss << "erasure_code_init(" << plugin_name
-	 << "," << directory 
 	 << "): " << cpp_strerror(r);
       dlclose(library);
       return r;
@@ -174,14 +141,21 @@ int ErasureCodePluginRegistry::preload(const std::string &plugins,
 				       const std::string &directory,
 				       ostream &ss)
 {
-  Mutex::Locker l(lock);
+  map<string,string> profile;
+  profile["directory"] = directory;
   list<string> plugins_list;
   get_str_list(plugins, plugins_list);
   for (list<string>::iterator i = plugins_list.begin();
        i != plugins_list.end();
-       ++i) {
+       i++) {
     ErasureCodePlugin *plugin;
-    int r = load(*i, directory, &plugin, ss);
+    int r = load(*i, profile, &plugin, ss);
+    if (r)
+      return r;
+
+    ErasureCodeInterfaceRef erasure_code;
+    profile["technique"] = "reed_sol_van";
+    r = plugin->factory(profile, &erasure_code);
     if (r)
       return r;
   }
diff --git a/src/erasure-code/ErasureCodePlugin.h b/src/erasure-code/ErasureCodePlugin.h
index 035bf2e..7f0b1e9 100644
--- a/src/erasure-code/ErasureCodePlugin.h
+++ b/src/erasure-code/ErasureCodePlugin.h
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -22,8 +21,7 @@
 #include "ErasureCodeInterface.h"
 
 extern "C" {
-  const char *__erasure_code_version();
-  int __erasure_code_init(char *plugin_name, char *directory);
+  int __erasure_code_init(char *plugin_name);
 }
 
 namespace ceph {
@@ -62,11 +60,10 @@ namespace ceph {
 		ostream &ss);
 
     int add(const std::string &name, ErasureCodePlugin *plugin);
-    int remove(const std::string &name);
     ErasureCodePlugin *get(const std::string &name);
 
     int load(const std::string &plugin_name,
-	     const std::string &directory,
+	     const map<std::string,std::string> &parameters,
 	     ErasureCodePlugin **plugin,
 	     ostream &ss);
 
diff --git a/src/erasure-code/Makefile.am b/src/erasure-code/Makefile.am
index e42e126..ea13bcf 100644
--- a/src/erasure-code/Makefile.am
+++ b/src/erasure-code/Makefile.am
@@ -1,25 +1,16 @@
 ## erasure code plugins
-
 erasure_codelibdir = $(pkglibdir)/erasure-code
 erasure_codelib_LTLIBRARIES =  
 
 include erasure-code/jerasure/Makefile.am
-include erasure-code/lrc/Makefile.am
-
-if WITH_BETTER_YASM_ELF64
-include erasure-code/isa/Makefile.am
-endif # WITH_BETTER_YASM_ELF64
 
 liberasure_code_la_SOURCES = \
 	erasure-code/ErasureCodePlugin.cc
-erasure-code/ErasureCodePlugin.cc: ./ceph_ver.h
-liberasure_code_la_DEPENDENCIES = $(erasure_codelib_LTLIBRARIES)
 if LINUX
 liberasure_code_la_LIBADD = -ldl
 endif # LINUX
 noinst_LTLIBRARIES += liberasure_code.la
 
 noinst_HEADERS += \
-	erasure-code/ErasureCode.h \
 	erasure-code/ErasureCodeInterface.h \
 	erasure-code/ErasureCodePlugin.h
diff --git a/src/erasure-code/isa/ErasureCodeIsa.cc b/src/erasure-code/isa/ErasureCodeIsa.cc
deleted file mode 100644
index bfa72c5..0000000
--- a/src/erasure-code/isa/ErasureCodeIsa.cc
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-// -----------------------------------------------------------------------------
-#include <algorithm>
-#include <dlfcn.h>
-#include <errno.h>
-// -----------------------------------------------------------------------------
-#include "common/debug.h"
-#include "ErasureCodeIsa.h"
-#include "xor_op.h"
-#include "crush/CrushWrapper.h"
-#include "osd/osd_types.h"
-// -----------------------------------------------------------------------------
-extern "C" {
-#include "isa-l/include/erasure_code.h"
-}
-// -----------------------------------------------------------------------------
-#define dout_subsys ceph_subsys_osd
-#undef dout_prefix
-#define dout_prefix _prefix(_dout)
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-
-static ostream&
-_prefix(std::ostream* _dout)
-{
-  return *_dout << "ErasureCodeIsa: ";
-}
-// -----------------------------------------------------------------------------
-
-int
-ErasureCodeIsa::create_ruleset(const string &name,
-                               CrushWrapper &crush,
-                               ostream *ss) const
-{
-  int ruleid = crush.add_simple_ruleset(name,
-                                        ruleset_root,
-                                        ruleset_failure_domain,
-                                        "indep",
-                                        pg_pool_t::TYPE_ERASURE,
-                                        ss);
-
-  if (ruleid < 0)
-    return ruleid;
-  else
-    return crush.get_rule_mask_ruleset(ruleid);
-}
-
-// -----------------------------------------------------------------------------
-
-void
-ErasureCodeIsa::init(const map<string, string> &parameters)
-{
-  dout(10) << "technique=" << technique << dendl;
-  map<string, string>::const_iterator parameter;
-  parameter = parameters.find("ruleset-root");
-  if (parameter != parameters.end())
-    ruleset_root = parameter->second;
-  parameter = parameters.find("ruleset-failure-domain");
-  if (parameter != parameters.end())
-    ruleset_failure_domain = parameter->second;
-  ostringstream ss;
-  if (parse(parameters, &ss))
-    derr << ss.str() << dendl;
-  prepare();
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned int
-ErasureCodeIsa::get_chunk_size(unsigned int object_size) const
-{
-  unsigned alignment = get_alignment();
-  unsigned chunk_size = ( object_size + k - 1 ) / k;
-  dout(20) << "get_chunk_size: chunk_size " << chunk_size
-           << " must be modulo " << alignment << dendl;
-  unsigned modulo = chunk_size % alignment;
-  if (modulo) {
-    dout(10) << "get_chunk_size: " << chunk_size
-             << " padded to " << chunk_size + alignment - modulo << dendl;
-    chunk_size += alignment - modulo;
-  }
-  return chunk_size;
-}
-
-// -----------------------------------------------------------------------------
-
-int ErasureCodeIsa::encode_chunks(const set<int> &want_to_encode,
-                                  map<int, bufferlist> *encoded)
-{
-  char *chunks[k + m];
-  for (int i = 0; i < k + m; i++)
-    chunks[i] = (*encoded)[i].c_str();
-  isa_encode(&chunks[0], &chunks[k], (*encoded)[0].length());
-  return 0;
-}
-
-int ErasureCodeIsa::decode_chunks(const set<int> &want_to_read,
-                                  const map<int, bufferlist> &chunks,
-                                  map<int, bufferlist> *decoded)
-{
-  unsigned blocksize = (*chunks.begin()).second.length();
-  int erasures[k + m + 1];
-  int erasures_count = 0;
-  char *data[k];
-  char *coding[m];
-  for (int i = 0; i < k + m; i++) {
-    if (chunks.find(i) == chunks.end()) {
-      erasures[erasures_count] = i;
-      erasures_count++;
-    }
-    if (i < k)
-      data[i] = (*decoded)[i].c_str();
-    else
-      coding[i - k] = (*decoded)[i].c_str();
-  }
-  erasures[erasures_count] = -1;
-  assert(erasures_count > 0);
-  return isa_decode(erasures, data, coding, blocksize);
-}
-
-// -----------------------------------------------------------------------------
-
-void
-ErasureCodeIsaDefault::isa_encode(char **data,
-                                  char **coding,
-                                  int blocksize)
-{
-
-  if (m == 1)
-    // single parity stripe
-    region_xor((unsigned char**) data, (unsigned char*) coding[0], k, blocksize);
-  else
-    ec_encode_data(blocksize, k, m, encode_tbls,
-                   (unsigned char**) data, (unsigned char**) coding);
-}
-
-// -----------------------------------------------------------------------------
-
-bool
-ErasureCodeIsaDefault::erasure_contains(int *erasures, int i)
-{
-  for (int l = 0; erasures[l] != -1; l++) {
-    if (erasures[l] == i)
-      return true;
-  }
-  return false;
-}
-
-// -----------------------------------------------------------------------------
-
-
-
-// -----------------------------------------------------------------------------
-
-int
-ErasureCodeIsaDefault::isa_decode(int *erasures,
-                                  char **data,
-                                  char **coding,
-                                  int blocksize)
-{
-  int nerrs = 0;
-  int i, j, r, s;
-
-  // count the errors
-  for (int l = 0; erasures[l] != -1; l++) {
-    nerrs++;
-  }
-
-  unsigned char *recover_source[k];
-  unsigned char *recover_target[m];
-
-  memset(recover_source, 0, sizeof (recover_source));
-  memset(recover_target, 0, sizeof (recover_target));
-
-  // ---------------------------------------------
-  // Assign source and target buffers
-  // ---------------------------------------------
-  for (i = 0, s = 0, r = 0; ((r < k) || (s < nerrs)) && (i < (k + m)); i++) {
-    if (!erasure_contains(erasures, i)) {
-      if (r < k) {
-        if (i < k) {
-          recover_source[r] = (unsigned char*) data[i];
-        } else {
-          recover_source[r] = (unsigned char*) coding[i - k];
-        }
-        r++;
-      }
-    } else {
-      if (s < m) {
-        if (i < k) {
-          recover_target[s] = (unsigned char*) data[i];
-        } else {
-          recover_target[s] = (unsigned char*) coding[i - k];
-        }
-        s++;
-      }
-    }
-  }
-
-  if (m == 1) {
-    // single parity decoding
-    assert(1 == nerrs);
-    dout(20) << "isa_decode: reconstruct using region xor [" <<
-      erasures[0] << "]" << dendl;
-    region_xor(recover_source, recover_target[0], k, blocksize);
-    return 0;
-  }
-
-
-  if ((matrixtype == kVandermonde) &&
-      (nerrs == 1) &&
-      (erasures[0] < (k + 1))) {
-    // use xor decoding if a data chunk is missing or the first coding chunk
-    dout(20) << "isa_decode: reconstruct using region xor [" <<
-      erasures[0] << "]" << dendl;
-    assert(1 == s);
-    assert(k == r);
-    region_xor(recover_source, recover_target[0], k, blocksize);
-    return 0;
-  }
-
-  unsigned char b[k * (m + k)];
-  unsigned char c[k * (m + k)];
-  unsigned char d[k * (m + k)];
-  unsigned char decode_tbls[k * (m + k)*32];
-  unsigned char *p_tbls = decode_tbls;
-
-  int decode_index[k];
-
-  if (nerrs > m)
-    return -1;
-
-  std::string erasure_signature; // describes a matrix configuration for caching
-
-  // ---------------------------------------------
-  // Construct b by removing error rows
-  // ---------------------------------------------
-
-  for (i = 0, r = 0; i < k; i++, r++) {
-    char id[128];
-    while (erasure_contains(erasures, r))
-      r++;
-
-    decode_index[i] = r;
-
-    snprintf(id, sizeof (id), "+%d", r);
-    erasure_signature += id;
-  }
-
-  for (int p = 0; p < nerrs; p++) {
-    char id[128];
-    snprintf(id, sizeof (id), "-%d", erasures[p]);
-    erasure_signature += id;
-  }
-
-  // ---------------------------------------------
-  // Try to get an already computed matrix
-  // ---------------------------------------------
-  if (!tcache.getDecodingTableFromCache(erasure_signature, p_tbls, matrixtype, k, m)) {
-    for (i = 0; i < k; i++) {
-      r = decode_index[i];
-      for (j = 0; j < k; j++)
-        b[k * i + j] = encode_coeff[k * r + j];
-    }
-    // ---------------------------------------------
-    // Compute inverted matrix
-    // ---------------------------------------------
-
-    // --------------------------------------------------------
-    // Remark: this may fail for certain Vandermonde matrices !
-    // There is an advanced way trying to use different
-    // source chunks to get an invertible matrix, however
-    // there are also (k,m) combinations which cannot be
-    // inverted when m chunks are lost and this optimizations
-    // does not help. Therefor we keep the code simpler.
-    // --------------------------------------------------------
-    if (gf_invert_matrix(b, d, k) < 0) {
-      dout(0) << "isa_decode: bad matrix" << dendl;
-      return -1;
-    }
-
-    for (int p = 0; p < nerrs; p++) {
-      if (erasures[p] < k) {
-        // decoding matrix elements for data chunks
-        for (j = 0; j < k; j++) {
-          c[k * p + j] = d[k * erasures[p] + j];
-        }
-      } else {
-        int s = 0;
-        // decoding matrix element for coding chunks
-        for (i = 0; i < k; i++) {
-          s = 0;
-          for (j = 0; j < k; j++)
-            s ^= gf_mul(d[j * k + i],
-                        encode_coeff[k * erasures[p] + j]);
-
-          c[k * p + i] = s;
-        }
-      }
-    }
-
-    // ---------------------------------------------
-    // Initialize Decoding Table
-    // ---------------------------------------------
-    ec_init_tables(k, nerrs, c, decode_tbls);
-    tcache.putDecodingTableToCache(erasure_signature, p_tbls, matrixtype, k, m);
-  }
-  // Recover data sources
-  ec_encode_data(blocksize,
-                 k, nerrs, decode_tbls, recover_source, recover_target);
-
-
-  return 0;
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned
-ErasureCodeIsaDefault::get_alignment() const
-{
-  return EC_ISA_ADDRESS_ALIGNMENT;
-}
-
-// -----------------------------------------------------------------------------
-
-int ErasureCodeIsaDefault::parse(const map<std::string,
-                                 std::string> &parameters,
-                                 ostream *ss)
-{
-  int err = ErasureCode::parse(parameters, ss);
-  err |= to_int("k", parameters, &k, DEFAULT_K, ss);
-  err |= to_int("m", parameters, &m, DEFAULT_M, ss);
-
-  if (matrixtype == kVandermonde) {
-    // these are verified safe values evaluated using the
-    // benchmarktool and 10*(combinatoric for maximum loss) random
-    // full erasures
-    if (k > 32) {
-      *ss << "Vandermonde: m=" << m
-        << " should be less/equal than 32 : revert to k=32" << std::endl;
-      k = 32;
-      err = -EINVAL;
-    }
-
-    if (m > 4) {
-      *ss << "Vandermonde: m=" << m
-        << " should be less than 5 to guarantee an MDS codec:"
-        << " revert to m=4" << std::endl;
-      m = 4;
-      err = -EINVAL;
-    }
-    switch (m) {
-    case 4:
-      if (k > 21) {
-        *ss << "Vandermonde: k=" << k
-          << " should be less than 22 to guarantee an MDS"
-          << " codec with m=4: revert to k=21" << std::endl;
-        k = 21;
-        err = -EINVAL;
-      }
-      break;
-    default:
-      ;
-    }
-  }
-  return err;
-}
-
-// -----------------------------------------------------------------------------
-
-void
-ErasureCodeIsaDefault::prepare()
-{
-  // setup shared encoding table and coefficients
-  unsigned char** p_enc_table =
-    tcache.getEncodingTable(matrixtype, k, m);
-
-  unsigned char** p_enc_coeff =
-    tcache.getEncodingCoefficient(matrixtype, k, m);
-
-  if (!*p_enc_coeff) {
-    dout(10) << "[ cache tables ] creating coeff for k=" <<
-      k << " m=" << m << dendl;
-    // build encoding coefficients which need to be computed once for each (k,m)
-    encode_coeff = (unsigned char*) malloc(k * (m + k));
-
-    if (matrixtype == kVandermonde)
-      gf_gen_rs_matrix(encode_coeff, k + m, k);
-    if (matrixtype == kCauchy)
-      gf_gen_cauchy1_matrix(encode_coeff, k + m, k);
-
-      // either our new created coefficients are stored or if they have been
-      // created in the meanwhile the locally allocated coefficients will be
-      // freed by setEncodingCoefficient
-    encode_coeff = tcache.setEncodingCoefficient(matrixtype, k, m, encode_coeff);
-  } else {
-    encode_coeff = *p_enc_coeff;
-  }
-
-  if (!*p_enc_table) {
-    dout(10) << "[ cache tables ] creating tables for k=" <<
-      k << " m=" << m << dendl;
-    // build encoding table which needs to be computed once for each (k,m)
-    encode_tbls = (unsigned char*) malloc(k * (m + k)*32);
-    ec_init_tables(k, m, &encode_coeff[k * k], encode_tbls);
-
-    // either our new created table is stored or if it has been
-    // created in the meanwhile the locally allocated table will be
-    // freed by setEncodingTable
-    encode_tbls = tcache.setEncodingTable(matrixtype, k, m, encode_tbls);
-  } else {
-    encode_tbls = *p_enc_table;
-  }
-
-  unsigned memory_lru_cache =
-    k * (m + k) * 32 * tcache.decoding_tables_lru_length;
-
-  dout(10) << "[ cache memory ] = " << memory_lru_cache << " bytes" <<
-    " [ matrix ] = " <<
-    ((matrixtype == kVandermonde) ? "Vandermonde" : "Cauchy") << dendl;
-
-  assert((matrixtype == kVandermonde) || (matrixtype == kCauchy));
-
-}
-// -----------------------------------------------------------------------------
diff --git a/src/erasure-code/isa/ErasureCodeIsa.h b/src/erasure-code/isa/ErasureCodeIsa.h
deleted file mode 100644
index 118f8c0..0000000
--- a/src/erasure-code/isa/ErasureCodeIsa.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-/**
- * @file   ErasureCodeIsa.cc
- *
- * @brief  Erasure Code CODEC using the INTEL ISA-L library.
- *
- * The INTEL ISA-L library supports two pre-defined encoding matrices (cauchy = default, reed_sol_van = default)
- * The default CODEC implementation using these two matrices is implemented in class ErasureCodeIsaDefault.
- * ISA-L allows to use custom matrices which might be added later as implementations deriving from the base class ErasoreCodeIsa.
- */
-
-#ifndef CEPH_ERASURE_CODE_ISA_L_H
-#define CEPH_ERASURE_CODE_ISA_L_H
-
-// -----------------------------------------------------------------------------
-#include "common/Mutex.h"
-#include "erasure-code/ErasureCode.h"
-#include "ErasureCodeIsaTableCache.h"
-// -----------------------------------------------------------------------------
-#include <list>
-// -----------------------------------------------------------------------------
-
-class ErasureCodeIsa : public ErasureCode {
-public:
-
-  enum eMatrix {
-    kVandermonde = 0, kCauchy = 1
-  };
-
-  int k;
-  int m;
-  int w;
-
-  ErasureCodeIsaTableCache &tcache;
-  const char *technique;
-  string ruleset_root;
-  string ruleset_failure_domain;
-
-  ErasureCodeIsa(const char *_technique,
-                 ErasureCodeIsaTableCache &_tcache) :
-  tcache(_tcache),
-  technique(_technique),
-  ruleset_root("default"),
-  ruleset_failure_domain("host")
-  {
-  }
-
-  virtual
-  ~ErasureCodeIsa()
-  {
-  }
-
-  virtual int create_ruleset(const string &name,
-                             CrushWrapper &crush,
-                             ostream *ss) const;
-
-  virtual unsigned int
-  get_chunk_count() const
-  {
-    return k + m;
-  }
-
-  virtual unsigned int
-  get_data_chunk_count() const
-  {
-    return k;
-  }
-
-  virtual unsigned int get_chunk_size(unsigned int object_size) const;
-
-  virtual int encode_chunks(const set<int> &want_to_encode,
-                            map<int, bufferlist> *encoded);
-
-  virtual int decode_chunks(const set<int> &want_to_read,
-                            const map<int, bufferlist> &chunks,
-                            map<int, bufferlist> *decoded);
-
-  void init(const map<std::string, std::string> &parameters);
-
-  virtual void isa_encode(char **data,
-                          char **coding,
-                          int blocksize) = 0;
-
-
-  virtual int isa_decode(int *erasures,
-                         char **data,
-                         char **coding,
-                         int blocksize) = 0;
-
-  virtual unsigned get_alignment() const = 0;
-
-  virtual int parse(const map<std::string,
-                    std::string> &parameters,
-                    ostream *ss) = 0;
-
-  virtual void prepare() = 0;
-
-};
-
-// -----------------------------------------------------------------------------
-
-class ErasureCodeIsaDefault : public ErasureCodeIsa {
-private:
-  int matrixtype;
-
-public:
-
-  static const int DEFAULT_K = 7;
-  static const int DEFAULT_M = 3;
-
-  unsigned char* encode_coeff; // encoding coefficient
-  unsigned char* encode_tbls; // encoding table
-
-  ErasureCodeIsaDefault(ErasureCodeIsaTableCache &_tcache,
-                        int matrix = kVandermonde) :
-
-  ErasureCodeIsa("default", _tcache),
-  encode_coeff(0), encode_tbls(0)
-  {
-    matrixtype = matrix;
-  }
-
-  virtual
-  ~ErasureCodeIsaDefault()
-  {
-
-  }
-
-  virtual void isa_encode(char **data,
-                          char **coding,
-                          int blocksize);
-
-  virtual bool erasure_contains(int *erasures, int i);
-
-  virtual int isa_decode(int *erasures,
-                         char **data,
-                         char **coding,
-                         int blocksize);
-
-  virtual unsigned get_alignment() const;
-
-  virtual int parse(const map<std::string,
-                    std::string> &parameters,
-                    ostream *ss);
-
-  virtual void prepare();
-
-
-};
-
-#endif
diff --git a/src/erasure-code/isa/ErasureCodeIsaTableCache.cc b/src/erasure-code/isa/ErasureCodeIsaTableCache.cc
deleted file mode 100644
index 003ff22..0000000
--- a/src/erasure-code/isa/ErasureCodeIsaTableCache.cc
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-
-/**
- * @file   ErasureCodeIsaTableCache.cc
- *
- * @brief  Erasure Code Isa CODEC Table Cache
- *
- * The INTEL ISA-L library supports two pre-defined encoding matrices (cauchy = default, reed_sol_van = default)
- * The default CODEC implementation using these two matrices is implemented in class ErasureCodeIsaDefault.
- * ISA-L allows to use custom matrices which might be added later as implementations deriving from the base class ErasoreCodeIsa.
- */
-
-// -----------------------------------------------------------------------------
-#include "ErasureCodeIsaTableCache.h"
-#include "ErasureCodeIsa.h"
-#include "common/debug.h"
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-#define dout_subsys ceph_subsys_osd
-#undef dout_prefix
-#define dout_prefix _tc_prefix(_dout)
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-
-static ostream&
-_tc_prefix(std::ostream* _dout)
-{
-  return *_dout << "ErasureCodeIsaTableCache: ";
-}
-
-// -----------------------------------------------------------------------------
-
-ErasureCodeIsaTableCache::~ErasureCodeIsaTableCache()
-{
-  Mutex::Locker lock(codec_tables_guard);
-
-  codec_technique_tables_t::const_iterator ttables_it;
-  codec_tables_t::const_iterator tables_it;
-  codec_table_t::const_iterator table_it;
-
-  std::map<int, lru_map_t*>::const_iterator lru_map_it;
-  std::map<int, lru_list_t*>::const_iterator lru_list_it;
-
-  // clean-up all allocated tables
-  for (ttables_it = encoding_coefficient.begin(); ttables_it != encoding_coefficient.end(); ++ttables_it) {
-    for (tables_it = ttables_it->second.begin(); tables_it != ttables_it->second.end(); ++tables_it) {
-      for (table_it = tables_it->second.begin(); table_it != tables_it->second.end(); ++table_it) {
-        if (table_it->second) {
-          if (*(table_it->second)) {
-            delete *(table_it->second);
-          }
-          delete table_it->second;
-        }
-      }
-    }
-  }
-
-  for (ttables_it = encoding_table.begin(); ttables_it != encoding_table.end(); ++ttables_it) {
-    for (tables_it = ttables_it->second.begin(); tables_it != ttables_it->second.end(); ++tables_it) {
-      for (table_it = tables_it->second.begin(); table_it != tables_it->second.end(); ++table_it) {
-        if (table_it->second) {
-          if (*(table_it->second)) {
-            delete *(table_it->second);
-          }
-          delete table_it->second;
-        }
-      }
-    }
-  }
-
-  for (lru_map_it = decoding_tables.begin(); lru_map_it != decoding_tables.end(); ++lru_map_it) {
-    if (lru_map_it->second) {
-      delete lru_map_it->second;
-    }
-  }
-
-  for (lru_list_it = decoding_tables_lru.begin(); lru_list_it != decoding_tables_lru.end(); ++lru_list_it) {
-    if (lru_list_it->second) {
-      delete lru_list_it->second;
-    }
-  }
-}
-
-// -----------------------------------------------------------------------------
-
-int
-ErasureCodeIsaTableCache::getDecodingTableCacheSize(int matrixtype)
-{
-  Mutex::Locker lock(codec_tables_guard);
-  if (decoding_tables[matrixtype])
-    return decoding_tables[matrixtype]->size();
-  else
-    return -1;
-}
-
-// -----------------------------------------------------------------------------
-
-ErasureCodeIsaTableCache::lru_map_t*
-ErasureCodeIsaTableCache::getDecodingTables(int matrix_type)
-{
-  // the caller must hold the guard mutex:
-  // => Mutex::Locker lock(codec_tables_guard);
-
-  // create an lru_map if not yet allocated
-  if (!decoding_tables[matrix_type]) {
-    decoding_tables[matrix_type] = new lru_map_t;
-  }
-  return decoding_tables[matrix_type];
-}
-
-// -----------------------------------------------------------------------------
-
-ErasureCodeIsaTableCache::lru_list_t*
-ErasureCodeIsaTableCache::getDecodingTablesLru(int matrix_type)
-{
-  // the caller must hold the guard mutex:
-  // => Mutex::Locker lock(codec_tables_guard);
-
-  // create an lru_list if not yet allocated
-  if (!decoding_tables_lru[matrix_type]) {
-    decoding_tables_lru[matrix_type] = new lru_list_t;
-  }
-  return decoding_tables_lru[matrix_type];
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned char**
-ErasureCodeIsaTableCache::getEncodingTable(int matrix, int k, int m)
-{
-  Mutex::Locker lock(codec_tables_guard);
-  return getEncodingTableNoLock(matrix,k,m);
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned char**
-ErasureCodeIsaTableCache::getEncodingTableNoLock(int matrix, int k, int m)
-{
-  // create a pointer to store an encoding table address
-  if (!encoding_table[matrix][k][m]) {
-    encoding_table[matrix][k][m] = new (unsigned char*);
-    *encoding_table[matrix][k][m] = 0;
-  }
-  return encoding_table[matrix][k][m];
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned char**
-ErasureCodeIsaTableCache::getEncodingCoefficient(int matrix, int k, int m)
-{
-  Mutex::Locker lock(codec_tables_guard);
-  return getEncodingCoefficientNoLock(matrix,k,m);
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned char**
-ErasureCodeIsaTableCache::getEncodingCoefficientNoLock(int matrix, int k, int m)
-{
-  // create a pointer to store an encoding coefficients adddress
-  if (!encoding_coefficient[matrix][k][m]) {
-    encoding_coefficient[matrix][k][m] = new (unsigned char*);
-    *encoding_coefficient[matrix][k][m] = 0;
-  }
-  return encoding_coefficient[matrix][k][m];
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned char*
-ErasureCodeIsaTableCache::setEncodingTable(int matrix, int k, int m, unsigned char* ec_in_table)
-{
-  Mutex::Locker lock(codec_tables_guard);
-  unsigned char** ec_out_table = getEncodingTableNoLock(matrix, k, m);
-  if (*ec_out_table) {
-    // somebody might have deposited this table in the meanwhile, so clean
-    // the input table and return the stored one
-    free (ec_in_table);
-    return *ec_out_table;
-  } else {
-    // we store the provided input table and return this one
-    *encoding_table[matrix][k][m] = ec_in_table;
-    return ec_in_table;
-  }
-}
-
-// -----------------------------------------------------------------------------
-
-unsigned char*
-ErasureCodeIsaTableCache::setEncodingCoefficient(int matrix, int k, int m, unsigned char* ec_in_coeff)
-{
-  Mutex::Locker lock(codec_tables_guard);
-  unsigned char** ec_out_coeff = getEncodingCoefficientNoLock(matrix, k, m);
-  if (*ec_out_coeff) {
-    // somebody might have deposited these coefficients in the meanwhile, so clean
-    // the input coefficients and return the stored ones
-    free (ec_in_coeff);
-    return *ec_out_coeff;
-  } else {
-    // we store the provided input coefficients and return these
-    *encoding_coefficient[matrix][k][m] = ec_in_coeff;
-    return ec_in_coeff;
-  }
-}
-
-// -----------------------------------------------------------------------------
-
-Mutex*
-ErasureCodeIsaTableCache::getLock()
-{
-  return &codec_tables_guard;
-}
-
-// -----------------------------------------------------------------------------
-
-bool
-ErasureCodeIsaTableCache::getDecodingTableFromCache(std::string &signature,
-                                                    unsigned char* &table,
-                                                    int matrixtype,
-                                                    int k,
-                                                    int m)
-{
-  // --------------------------------------------------------------------------
-  // LRU decoding matrix cache
-  // --------------------------------------------------------------------------
-
-  dout(12) << "[ get table    ] = " << signature << dendl;
-
-  // we try to fetch a decoding table from an LRU cache
-  bool found = false;
-
-  Mutex::Locker lock(codec_tables_guard);
-
-  lru_map_t* decode_tbls_map =
-    getDecodingTables(matrixtype);
-
-  lru_list_t* decode_tbls_lru =
-    getDecodingTablesLru(matrixtype);
-
-  if (decode_tbls_map->count(signature)) {
-    dout(12) << "[ cached table ] = " << signature << dendl;
-    // copy the table out of the cache
-    memcpy(table, (*decode_tbls_map)[signature].second.c_str(), k * (m + k)*32);
-    // find item in LRU queue and push back
-    dout(12) << "[ cache size   ] = " << decode_tbls_lru->size() << dendl;
-    decode_tbls_lru->splice((*decode_tbls_map)[signature].first, *decode_tbls_lru, decode_tbls_lru->end());
-    found = true;
-  }
-
-  return found;
-}
-
-// -----------------------------------------------------------------------------
-
-void
-ErasureCodeIsaTableCache::putDecodingTableToCache(std::string &signature,
-                                                  unsigned char* &table,
-                                                  int matrixtype,
-                                                  int k,
-                                                  int m)
-{
-  // --------------------------------------------------------------------------
-  // LRU decoding matrix cache
-  // --------------------------------------------------------------------------
-
-  dout(12) << "[ put table    ] = " << signature << dendl;
-
-  // we store a new table to the cache
-
-  bufferptr cachetable;
-
-  Mutex::Locker lock(codec_tables_guard);
-
-  lru_map_t* decode_tbls_map =
-    getDecodingTables(matrixtype);
-
-  lru_list_t* decode_tbls_lru =
-    getDecodingTablesLru(matrixtype);
-
-  // evt. shrink the LRU queue/map
-  if ((int) decode_tbls_lru->size() >= ErasureCodeIsaTableCache::decoding_tables_lru_length) {
-    dout(12) << "[ shrink lru   ] = " << signature << dendl;
-    // reuse old buffer
-    cachetable = (*decode_tbls_map)[decode_tbls_lru->front()].second;
-    if ((int) cachetable.length() != (k * (m + k)*32)) {
-      // we need to replace this with a different size buffer
-      cachetable = buffer::create(k * (m + k)*32);
-      (*decode_tbls_map)[signature] = std::make_pair(decode_tbls_lru->begin(), cachetable);
-    }
-
-    // remove from map
-    decode_tbls_map->erase(decode_tbls_lru->front());
-    // remove from lru
-    decode_tbls_lru->pop_front();
-    // add the new to the map
-    (*decode_tbls_map)[signature] = std::make_pair(decode_tbls_lru->begin(), cachetable);
-    // add to the end of lru
-    decode_tbls_lru->push_back(signature);
-  } else {
-    dout(12) << "[ store table  ] = " << signature << dendl;
-    // allocate a new buffer
-    cachetable = buffer::create(k * (m + k)*32);
-    decode_tbls_lru->push_back(signature);
-    (*decode_tbls_map)[signature] = std::make_pair(decode_tbls_lru->begin(), cachetable);
-    dout(12) << "[ cache size   ] = " << decode_tbls_lru->size() << dendl;
-  }
-
-  // copy-in the new table
-  memcpy(cachetable.c_str(), table, k * (m + k)*32);
-}
diff --git a/src/erasure-code/isa/ErasureCodeIsaTableCache.h b/src/erasure-code/isa/ErasureCodeIsaTableCache.h
deleted file mode 100644
index 64aaae7..0000000
--- a/src/erasure-code/isa/ErasureCodeIsaTableCache.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-/**
- * @file   ErasureCodeIsaTableCache.h
- *
- * @brief  Erasure Code Isa CODEC Table Cache
- *
- * The INTEL ISA-L library supports two pre-defined encoding matrices (cauchy = default, reed_sol_van = default)
- * The default CODEC implementation using these two matrices is implemented in class ErasureCodeIsaDefault.
- * ISA-L allows to use custom matrices which might be added later as implementations deriving from the base class ErasoreCodeIsa.
- */
-
-#ifndef CEPH_ERASURE_CODE_ISA_TABLE_CACHE_H
-#define CEPH_ERASURE_CODE_ISA_TABLE_CACHE_H
-
-// -----------------------------------------------------------------------------
-#include "common/Mutex.h"
-#include "erasure-code/ErasureCodeInterface.h"
-// -----------------------------------------------------------------------------
-#include <list>
-// -----------------------------------------------------------------------------
-
-class ErasureCodeIsaTableCache {
-  // ---------------------------------------------------------------------------
-  // This class implements a table cache for encoding and decoding matrices.
-  // Encoding matrices are shared for the same (k,m) combination. It supplies
-  // a decoding matrix lru cache which is shared for identical
-  // matrix types e.g. there is one cache (lru-list + lru-map) for Cauchy and
-  // one for Vandermonde matrices!
-  // ---------------------------------------------------------------------------
-
-public:
-
-  // the cache size is sufficient up to (12,4) decodings
-
-  static const int decoding_tables_lru_length = 2516;
-
-  typedef std::pair<std::list<std::string>::iterator, bufferptr> lru_entry_t;
-  typedef std::map< int, unsigned char** > codec_table_t;
-  typedef std::map< int, codec_table_t > codec_tables_t;
-  typedef std::map< int, codec_tables_t > codec_technique_tables_t;
-
-  typedef std::map< std::string, lru_entry_t > lru_map_t;
-  typedef std::list< std::string > lru_list_t;
-
-  ErasureCodeIsaTableCache() :
-  codec_tables_guard("isa-lru-cache")
-  {
-  }
-
-  virtual ~ErasureCodeIsaTableCache();
-
-  Mutex codec_tables_guard; // mutex used to protect modifications in encoding/decoding table maps
-
-  bool getDecodingTableFromCache(std::string &signature,
-                                 unsigned char* &table,
-                                 int matrixtype,
-                                 int k,
-                                 int m);
-
-  void putDecodingTableToCache(std::string&,
-                               unsigned char*&,
-                               int matrixtype,
-                               int k,
-                               int m);
-
-  unsigned char** getEncodingTable(int matrix, int k, int m);
-  unsigned char** getEncodingCoefficient(int matrix, int k, int m);
-
-  unsigned char** getEncodingTableNoLock(int matrix, int k, int m);
-  unsigned char** getEncodingCoefficientNoLock(int matrix, int k, int m);
-
-  unsigned char* setEncodingTable(int matrix, int k, int m, unsigned char*);
-  unsigned char* setEncodingCoefficient(int matrix, int k, int m, unsigned char*);
-
-  int getDecodingTableCacheSize(int matrixtype = 0);
-
-private:
-  codec_technique_tables_t encoding_coefficient; // encoding coefficients accessed via table[matrix][k][m]
-  codec_technique_tables_t encoding_table; // encoding coefficients accessed via table[matrix][k][m]
-
-  std::map<int, lru_map_t*> decoding_tables; // decoding table cache accessed via map[matrixtype]
-  std::map<int, lru_list_t*> decoding_tables_lru; // decoding table lru list accessed via list[matrixtype]
-
-  lru_map_t* getDecodingTables(int matrix_type);
-
-  lru_list_t* getDecodingTablesLru(int matrix_type);
-
-  Mutex* getLock();
-
-};
-
-#endif
diff --git a/src/erasure-code/isa/ErasureCodePluginIsa.cc b/src/erasure-code/isa/ErasureCodePluginIsa.cc
deleted file mode 100644
index 4000fd1..0000000
--- a/src/erasure-code/isa/ErasureCodePluginIsa.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-
-/**
- * @file   ErasureCodePluginIsa.cc
- *
- * @brief  Erasure Code Plug-in class wrapping the INTEL ISA-L library
- *
- * The factory plug-in class allows to call individual encoding techniques.
- * The INTEL ISA-L library provides two pre-defined encoding matrices
- * (cauchy, reed_sol_van = default).
- */
-
-// -----------------------------------------------------------------------------
-#include "ceph_ver.h"
-#include "common/debug.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#include "ErasureCodeIsaTableCache.h"
-#include "ErasureCodeIsa.h"
-// -----------------------------------------------------------------------------
-
-class ErasureCodePluginIsa : public ErasureCodePlugin {
-public:
-  ErasureCodeIsaTableCache tcache;
-
-  virtual int factory(const map<std::string, std::string> &parameters,
-                      ErasureCodeInterfaceRef *erasure_code)
-  {
-    ErasureCodeIsa *interface;
-    std::string t = "reed_sol_van";
-    if (parameters.find("technique") != parameters.end())
-      t = parameters.find("technique")->second;
-    if ((t == "reed_sol_van")) {
-      interface = new ErasureCodeIsaDefault(tcache,
-                                            ErasureCodeIsaDefault::kVandermonde);
-    } else {
-      if ((t == "cauchy")) {
-        interface = new ErasureCodeIsaDefault(tcache,
-                                              ErasureCodeIsaDefault::kCauchy);
-      } else {
-        derr << "technique=" << t << " is not a valid coding technique. "
-          << " Choose one of the following: "
-          << "reed_sol_van,"
-          << "cauchy" << dendl;
-        return -ENOENT;
-      }
-    }
-
-    interface->init(parameters);
-    *erasure_code = ErasureCodeInterfaceRef(interface);
-    return 0;
-  }
-};
-
-// -----------------------------------------------------------------------------
-
-const char *__erasure_code_version()
-{
-  return CEPH_GIT_NICE_VER;
-}
-
-// -----------------------------------------------------------------------------
-
-int __erasure_code_init(char *plugin_name, char *directory)
-{
-  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
-
-  return instance.add(plugin_name, new ErasureCodePluginIsa());
-}
diff --git a/src/erasure-code/isa/Makefile.am b/src/erasure-code/isa/Makefile.am
deleted file mode 100644
index 649ddaa..0000000
--- a/src/erasure-code/isa/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-# ISA
-noinst_HEADERS += \
-	erasure-code/isa/ErasureCodeIsa.h \
-	erasure-code/isa/ErasureCodeIsaTableCache.h \
-	erasure-code/isa/xor_op.h \
-	erasure-code/isa/isa-l/erasure_code/ec_base.h \
-	erasure-code/isa/isa-l/include/erasure_code.h \
-	erasure-code/isa/isa-l/include/reg_sizes.asm \
-	erasure-code/isa/isa-l/include/erasure_code.h \
-	erasure-code/isa/isa-l/include/gf_vect_mul.h \
-	erasure-code/isa/isa-l/include/types.h
-
-isa_sources = \
-	erasure-code/ErasureCode.cc \
-	erasure-code/isa/isa-l/erasure_code/ec_base.c \
-	erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c \
-	erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s \
-	erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s \
-	erasure-code/isa/ErasureCodeIsa.cc \
-	erasure-code/isa/ErasureCodeIsaTableCache.cc \
-	erasure-code/isa/ErasureCodePluginIsa.cc \
-	erasure-code/isa/xor_op.cc
-
-erasure-code/isa/ErasureCodePluginIsa.cc: ./ceph_ver.h
-
-libec_isa_la_SOURCES = ${isa_sources}
-
-libec_isa_la_CFLAGS = ${AM_CFLAGS} -I $(srcdir)/erasure-code/isa/isa-l/include/
-libec_isa_la_CXXFLAGS = ${AM_CXXFLAGS} -I $(srcdir)/erasure-code/isa/isa-l/include/
-libec_isa_la_CCASFLAGS = ${AM_CCASFLAGS} -I $(abs_srcdir)/erasure-code/isa/isa-l/include/
-
-libec_isa_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
-libec_isa_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:10:0
-if LINUX
-libec_isa_la_LDFLAGS += -export-symbols-regex '.*__erasure_code_.*'
-endif
-libec_isa_la_LIBTOOLFLAGS = --tag=CC
-
-erasure_codelib_LTLIBRARIES += libec_isa.la
diff --git a/src/erasure-code/isa/isa-l/erasure_code/ec_base.c b/src/erasure-code/isa/isa-l/erasure_code/ec_base.c
deleted file mode 100644
index 5e93cb6..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/ec_base.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/**********************************************************************
-  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-    * Neither the name of Intel Corporation nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**********************************************************************/
-
-#include <limits.h>
-#include <string.h>		// for memset
-#include "erasure_code.h"
-#include "ec_base.h"		// for GF tables
-#include "types.h"
-
-unsigned char gf_mul(unsigned char a, unsigned char b)
-{
-#ifndef GF_LARGE_TABLES
-	int i;
-
-	if ((a == 0) || (b == 0))
-		return 0;
-
-	return gff_base[(i = gflog_base[a] + gflog_base[b]) > 254 ? i - 255 : i];
-#else
-	return gf_mul_table_base[b * 256 + a];
-#endif
-}
-
-unsigned char gf_inv(unsigned char a)
-{
-#ifndef GF_LARGE_TABLES
-	if (a == 0)
-		return 0;
-
-	return gff_base[255 - gflog_base[a]];
-#else
-	return gf_inv_table_base[a];
-#endif
-}
-
-void gf_gen_rs_matrix(unsigned char *a, int m, int k)
-{
-	int i, j;
-	unsigned char p, gen = 1;
-
-	memset(a, 0, k * m);
-	for (i = 0; i < k; i++)
-		a[k * i + i] = 1;
-
-	for (i = k; i < m; i++) {
-		p = 1;
-		for (j = 0; j < k; j++) {
-			a[k * i + j] = p;
-			p = gf_mul(p, gen);
-		}
-		gen = gf_mul(gen, 2);
-	}
-}
-
-void gf_gen_cauchy1_matrix(unsigned char *a, int m, int k)
-{
-	int i, j;
-	unsigned char *p;
-
-	// Identity matrix in high position
-	memset(a, 0, k * m);
-	for (i = 0; i < k; i++)
-		a[k * i + i] = 1;
-
-	// For the rest choose 1/(i + j) | i != j
-	p = &a[k * k];
-	for (i = k; i < m; i++)
-		for (j = 0; j < k; j++)
-			*p++ = gf_inv(i ^ j);
-
-}
-
-int gf_invert_matrix(unsigned char *in_mat, unsigned char *out_mat, const int n)
-{
-	int i, j, k;
-	unsigned char temp;
-
-	// Set out_mat[] to the identity matrix
-	for (i = 0; i < n * n; i++)	// memset(out_mat, 0, n*n)
-		out_mat[i] = 0;
-
-	for (i = 0; i < n; i++)
-		out_mat[i * n + i] = 1;
-
-	// Inverse
-	for (i = 0; i < n; i++) {
-		// Check for 0 in pivot element
-		if (in_mat[i * n + i] == 0) {
-			// Find a row with non-zero in current column and swap
-			for (j = i + 1; j < n; j++)
-				if (in_mat[j * n + i])
-					break;
-
-			if (j == n)	// Couldn't find means it's singular
-				return -1;
-
-			for (k = 0; k < n; k++) {	// Swap rows i,j
-				temp = in_mat[i * n + k];
-				in_mat[i * n + k] = in_mat[j * n + k];
-				in_mat[j * n + k] = temp;
-
-				temp = out_mat[i * n + k];
-				out_mat[i * n + k] = out_mat[j * n + k];
-				out_mat[j * n + k] = temp;
-			}
-		}
-
-		temp = gf_inv(in_mat[i * n + i]);	// 1/pivot
-		for (j = 0; j < n; j++) {	// Scale row i by 1/pivot
-			in_mat[i * n + j] = gf_mul(in_mat[i * n + j], temp);
-			out_mat[i * n + j] = gf_mul(out_mat[i * n + j], temp);
-		}
-
-		for (j = 0; j < n; j++) {
-			if (j == i)
-				continue;
-
-			temp = in_mat[j * n + i];
-			for (k = 0; k < n; k++) {
-				out_mat[j * n + k] ^= gf_mul(temp, out_mat[i * n + k]);
-				in_mat[j * n + k] ^= gf_mul(temp, in_mat[i * n + k]);
-			}
-		}
-	}
-	return 0;
-}
-
-// Calculates const table gftbl in GF(2^8) from single input A
-// gftbl(A) = {A{00}, A{01}, A{02}, ... , A{0f} }, {A{00}, A{10}, A{20}, ... , A{f0} }
-
-void gf_vect_mul_init(unsigned char c, unsigned char *tbl)
-{
-	unsigned char c2 = (c << 1) ^ ((c & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	unsigned char c4 = (c2 << 1) ^ ((c2 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	unsigned char c8 = (c4 << 1) ^ ((c4 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-
-#if __WORDSIZE == 64 || _WIN64 || __x86_64__
-	unsigned long long v1, v2, v4, v8, *t;
-	unsigned long long v10, v20, v40, v80;
-	unsigned char c17, c18, c20, c24;
-
-	t = (unsigned long long *)tbl;
-
-	v1 = c * 0x0100010001000100ull;
-	v2 = c2 * 0x0101000001010000ull;
-	v4 = c4 * 0x0101010100000000ull;
-	v8 = c8 * 0x0101010101010101ull;
-
-	v4 = v1 ^ v2 ^ v4;
-	t[0] = v4;
-	t[1] = v8 ^ v4;
-
-	c17 = (c8 << 1) ^ ((c8 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c18 = (c17 << 1) ^ ((c17 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c20 = (c18 << 1) ^ ((c18 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c24 = (c20 << 1) ^ ((c20 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-
-	v10 = c17 * 0x0100010001000100ull;
-	v20 = c18 * 0x0101000001010000ull;
-	v40 = c20 * 0x0101010100000000ull;
-	v80 = c24 * 0x0101010101010101ull;
-
-	v40 = v10 ^ v20 ^ v40;
-	t[2] = v40;
-	t[3] = v80 ^ v40;
-
-#else // 32-bit or other
-	unsigned char c3, c5, c6, c7, c9, c10, c11, c12, c13, c14, c15;
-	unsigned char c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30,
-	    c31;
-
-	c3 = c2 ^ c;
-	c5 = c4 ^ c;
-	c6 = c4 ^ c2;
-	c7 = c4 ^ c3;
-
-	c9 = c8 ^ c;
-	c10 = c8 ^ c2;
-	c11 = c8 ^ c3;
-	c12 = c8 ^ c4;
-	c13 = c8 ^ c5;
-	c14 = c8 ^ c6;
-	c15 = c8 ^ c7;
-
-	tbl[0] = 0;
-	tbl[1] = c;
-	tbl[2] = c2;
-	tbl[3] = c3;
-	tbl[4] = c4;
-	tbl[5] = c5;
-	tbl[6] = c6;
-	tbl[7] = c7;
-	tbl[8] = c8;
-	tbl[9] = c9;
-	tbl[10] = c10;
-	tbl[11] = c11;
-	tbl[12] = c12;
-	tbl[13] = c13;
-	tbl[14] = c14;
-	tbl[15] = c15;
-
-	c17 = (c8 << 1) ^ ((c8 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c18 = (c17 << 1) ^ ((c17 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c19 = c18 ^ c17;
-	c20 = (c18 << 1) ^ ((c18 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c21 = c20 ^ c17;
-	c22 = c20 ^ c18;
-	c23 = c20 ^ c19;
-	c24 = (c20 << 1) ^ ((c20 & 0x80) ? 0x1d : 0);	//Mult by GF{2}
-	c25 = c24 ^ c17;
-	c26 = c24 ^ c18;
-	c27 = c24 ^ c19;
-	c28 = c24 ^ c20;
-	c29 = c24 ^ c21;
-	c30 = c24 ^ c22;
-	c31 = c24 ^ c23;
-
-	tbl[16] = 0;
-	tbl[17] = c17;
-	tbl[18] = c18;
-	tbl[19] = c19;
-	tbl[20] = c20;
-	tbl[21] = c21;
-	tbl[22] = c22;
-	tbl[23] = c23;
-	tbl[24] = c24;
-	tbl[25] = c25;
-	tbl[26] = c26;
-	tbl[27] = c27;
-	tbl[28] = c28;
-	tbl[29] = c29;
-	tbl[30] = c30;
-	tbl[31] = c31;
-
-#endif //__WORDSIZE == 64 || _WIN64 || __x86_64__
-}
-
-void gf_vect_dot_prod_base(int len, int vlen, unsigned char *v,
-			   unsigned char **src, unsigned char *dest)
-{
-	int i, j;
-	unsigned char s;
-	for (i = 0; i < len; i++) {
-		s = 0;
-		for (j = 0; j < vlen; j++)
-			s ^= gf_mul(src[j][i], v[j * 32 + 1]);
-
-		dest[i] = s;
-	}
-}
-
-void ec_encode_data_base(int len, int srcs, int dests, unsigned char *v,
-			 unsigned char **src, unsigned char **dest)
-{
-	int i, j, l;
-	unsigned char s;
-
-	for (l = 0; l < dests; l++) {
-		for (i = 0; i < len; i++) {
-			s = 0;
-			for (j = 0; j < srcs; j++)
-				s ^= gf_mul(src[j][i], v[j * 32 + l * srcs * 32 + 1]);
-
-			dest[l][i] = s;
-		}
-	}
-}
-
-void gf_vect_mul_base(int len, unsigned char *a, unsigned char *src, unsigned char *dest)
-{
-	//2nd element of table array is ref value used to fill it in
-	unsigned char c = a[1];
-	while (len-- > 0)
-		*dest++ = gf_mul(c, *src++);
-}
-
-struct slver {
-	UINT16 snum;
-	UINT8 ver;
-	UINT8 core;
-};
-
-// Version info
-struct slver gf_vect_mul_init_slver_00020035;
-struct slver gf_vect_mul_init_slver = { 0x0035, 0x02, 0x00 };
-
-struct slver ec_encode_data_base_slver_00010135;
-struct slver ec_encode_data_base_slver = { 0x0135, 0x01, 0x00 };
-
-struct slver gf_vect_mul_base_slver_00010136;
-struct slver gf_vect_mul_base_slver = { 0x0136, 0x01, 0x00 };
-
-struct slver gf_vect_dot_prod_base_slver_00010137;
-struct slver gf_vect_dot_prod_base_slver = { 0x0137, 0x01, 0x00 };
diff --git a/src/erasure-code/isa/isa-l/erasure_code/ec_base.h b/src/erasure-code/isa/isa-l/erasure_code/ec_base.h
deleted file mode 100644
index 519ac7a..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/ec_base.h
+++ /dev/null
@@ -1,6680 +0,0 @@
-/**********************************************************************
-  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-    * Neither the name of Intel Corporation nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**********************************************************************/
-
-#ifndef _EC_BASE_H_
-#define _EC_BASE_H_
-
-// Global GF(256) tables
-#ifndef GF_LARGE_TABLES
-unsigned char gff_base[] = {
-	0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a,
-	0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, 0x4c, 0x98, 0x2d, 0x5a,
-	0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30,
-	0x60, 0xc0, 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35,
-	0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, 0x46, 0x8c,
-	0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2,
-	0xb9, 0x6f, 0xde, 0xa1, 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f,
-	0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,
-	0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1,
-	0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, 0xd9, 0xaf, 0x43, 0x86,
-	0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd,
-	0x67, 0xce, 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93,
-	0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, 0x85, 0x17,
-	0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42,
-	0x84, 0x15, 0x2a, 0x54, 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4,
-	0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,
-	0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5,
-	0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, 0xe3, 0xdb, 0xab, 0x4b,
-	0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57,
-	0xae, 0x41, 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e,
-	0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, 0x51, 0xa2,
-	0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56,
-	0xac, 0x45, 0x8a, 0x09, 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a,
-	0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,
-	0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36,
-	0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x01
-};
-
-unsigned char gflog_base[] = {
-	0x00, 0xff, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf,
-	0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, 0x04, 0x64, 0xe0, 0x0e,
-	0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08,
-	0x4c, 0x71, 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21,
-	0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, 0x1d, 0xb5,
-	0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78,
-	0x4d, 0xe4, 0x72, 0xa6, 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd,
-	0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,
-	0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2,
-	0x13, 0x5c, 0x83, 0x38, 0x46, 0x40, 0x1e, 0x42, 0xb6, 0xa3,
-	0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85,
-	0xba, 0x3d, 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b,
-	0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57, 0x07, 0x70,
-	0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed,
-	0x31, 0xc5, 0xfe, 0x18, 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8,
-	0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,
-	0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87,
-	0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61, 0xf2, 0x56, 0xd3, 0xab,
-	0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d,
-	0x41, 0xa2, 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76,
-	0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6, 0x6c, 0xa1,
-	0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1,
-	0xbb, 0xcc, 0x3e, 0x5a, 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9,
-	0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,
-	0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6,
-	0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf
-};
-#else
-unsigned char gf_mul_table_base[] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03,
-	0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
-	0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21,
-	0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
-	0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
-	0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
-	0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
-	0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
-	0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d,
-	0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
-	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
-	0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b,
-	0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
-	0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
-	0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
-	0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3,
-	0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad,
-	0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
-	0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1,
-	0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb,
-	0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5,
-	0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
-	0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
-	0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3,
-	0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd,
-	0xfe, 0xff, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
-	0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22,
-	0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36,
-	0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, 0x48, 0x4a,
-	0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e,
-	0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72,
-	0x74, 0x76, 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86,
-	0x88, 0x8a, 0x8c, 0x8e, 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a,
-	0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, 0xa8, 0xaa, 0xac, 0xae,
-	0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xc0, 0xc2,
-	0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xd0, 0xd2, 0xd4, 0xd6,
-	0xd8, 0xda, 0xdc, 0xde, 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea,
-	0xec, 0xee, 0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0xfe,
-	0x1d, 0x1f, 0x19, 0x1b, 0x15, 0x17, 0x11, 0x13, 0x0d, 0x0f,
-	0x09, 0x0b, 0x05, 0x07, 0x01, 0x03, 0x3d, 0x3f, 0x39, 0x3b,
-	0x35, 0x37, 0x31, 0x33, 0x2d, 0x2f, 0x29, 0x2b, 0x25, 0x27,
-	0x21, 0x23, 0x5d, 0x5f, 0x59, 0x5b, 0x55, 0x57, 0x51, 0x53,
-	0x4d, 0x4f, 0x49, 0x4b, 0x45, 0x47, 0x41, 0x43, 0x7d, 0x7f,
-	0x79, 0x7b, 0x75, 0x77, 0x71, 0x73, 0x6d, 0x6f, 0x69, 0x6b,
-	0x65, 0x67, 0x61, 0x63, 0x9d, 0x9f, 0x99, 0x9b, 0x95, 0x97,
-	0x91, 0x93, 0x8d, 0x8f, 0x89, 0x8b, 0x85, 0x87, 0x81, 0x83,
-	0xbd, 0xbf, 0xb9, 0xbb, 0xb5, 0xb7, 0xb1, 0xb3, 0xad, 0xaf,
-	0xa9, 0xab, 0xa5, 0xa7, 0xa1, 0xa3, 0xdd, 0xdf, 0xd9, 0xdb,
-	0xd5, 0xd7, 0xd1, 0xd3, 0xcd, 0xcf, 0xc9, 0xcb, 0xc5, 0xc7,
-	0xc1, 0xc3, 0xfd, 0xff, 0xf9, 0xfb, 0xf5, 0xf7, 0xf1, 0xf3,
-	0xed, 0xef, 0xe9, 0xeb, 0xe5, 0xe7, 0xe1, 0xe3, 0x00, 0x03,
-	0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d,
-	0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f,
-	0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21,
-	0x60, 0x63, 0x66, 0x65, 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b,
-	0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71, 0x50, 0x53, 0x56, 0x55,
-	0x5c, 0x5f, 0x5a, 0x59, 0x48, 0x4b, 0x4e, 0x4d, 0x44, 0x47,
-	0x42, 0x41, 0xc0, 0xc3, 0xc6, 0xc5, 0xcc, 0xcf, 0xca, 0xc9,
-	0xd8, 0xdb, 0xde, 0xdd, 0xd4, 0xd7, 0xd2, 0xd1, 0xf0, 0xf3,
-	0xf6, 0xf5, 0xfc, 0xff, 0xfa, 0xf9, 0xe8, 0xeb, 0xee, 0xed,
-	0xe4, 0xe7, 0xe2, 0xe1, 0xa0, 0xa3, 0xa6, 0xa5, 0xac, 0xaf,
-	0xaa, 0xa9, 0xb8, 0xbb, 0xbe, 0xbd, 0xb4, 0xb7, 0xb2, 0xb1,
-	0x90, 0x93, 0x96, 0x95, 0x9c, 0x9f, 0x9a, 0x99, 0x88, 0x8b,
-	0x8e, 0x8d, 0x84, 0x87, 0x82, 0x81, 0x9d, 0x9e, 0x9b, 0x98,
-	0x91, 0x92, 0x97, 0x94, 0x85, 0x86, 0x83, 0x80, 0x89, 0x8a,
-	0x8f, 0x8c, 0xad, 0xae, 0xab, 0xa8, 0xa1, 0xa2, 0xa7, 0xa4,
-	0xb5, 0xb6, 0xb3, 0xb0, 0xb9, 0xba, 0xbf, 0xbc, 0xfd, 0xfe,
-	0xfb, 0xf8, 0xf1, 0xf2, 0xf7, 0xf4, 0xe5, 0xe6, 0xe3, 0xe0,
-	0xe9, 0xea, 0xef, 0xec, 0xcd, 0xce, 0xcb, 0xc8, 0xc1, 0xc2,
-	0xc7, 0xc4, 0xd5, 0xd6, 0xd3, 0xd0, 0xd9, 0xda, 0xdf, 0xdc,
-	0x5d, 0x5e, 0x5b, 0x58, 0x51, 0x52, 0x57, 0x54, 0x45, 0x46,
-	0x43, 0x40, 0x49, 0x4a, 0x4f, 0x4c, 0x6d, 0x6e, 0x6b, 0x68,
-	0x61, 0x62, 0x67, 0x64, 0x75, 0x76, 0x73, 0x70, 0x79, 0x7a,
-	0x7f, 0x7c, 0x3d, 0x3e, 0x3b, 0x38, 0x31, 0x32, 0x37, 0x34,
-	0x25, 0x26, 0x23, 0x20, 0x29, 0x2a, 0x2f, 0x2c, 0x0d, 0x0e,
-	0x0b, 0x08, 0x01, 0x02, 0x07, 0x04, 0x15, 0x16, 0x13, 0x10,
-	0x19, 0x1a, 0x1f, 0x1c, 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14,
-	0x18, 0x1c, 0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 0x38, 0x3c,
-	0x40, 0x44, 0x48, 0x4c, 0x50, 0x54, 0x58, 0x5c, 0x60, 0x64,
-	0x68, 0x6c, 0x70, 0x74, 0x78, 0x7c, 0x80, 0x84, 0x88, 0x8c,
-	0x90, 0x94, 0x98, 0x9c, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4,
-	0xb8, 0xbc, 0xc0, 0xc4, 0xc8, 0xcc, 0xd0, 0xd4, 0xd8, 0xdc,
-	0xe0, 0xe4, 0xe8, 0xec, 0xf0, 0xf4, 0xf8, 0xfc, 0x1d, 0x19,
-	0x15, 0x11, 0x0d, 0x09, 0x05, 0x01, 0x3d, 0x39, 0x35, 0x31,
-	0x2d, 0x29, 0x25, 0x21, 0x5d, 0x59, 0x55, 0x51, 0x4d, 0x49,
-	0x45, 0x41, 0x7d, 0x79, 0x75, 0x71, 0x6d, 0x69, 0x65, 0x61,
-	0x9d, 0x99, 0x95, 0x91, 0x8d, 0x89, 0x85, 0x81, 0xbd, 0xb9,
-	0xb5, 0xb1, 0xad, 0xa9, 0xa5, 0xa1, 0xdd, 0xd9, 0xd5, 0xd1,
-	0xcd, 0xc9, 0xc5, 0xc1, 0xfd, 0xf9, 0xf5, 0xf1, 0xed, 0xe9,
-	0xe5, 0xe1, 0x3a, 0x3e, 0x32, 0x36, 0x2a, 0x2e, 0x22, 0x26,
-	0x1a, 0x1e, 0x12, 0x16, 0x0a, 0x0e, 0x02, 0x06, 0x7a, 0x7e,
-	0x72, 0x76, 0x6a, 0x6e, 0x62, 0x66, 0x5a, 0x5e, 0x52, 0x56,
-	0x4a, 0x4e, 0x42, 0x46, 0xba, 0xbe, 0xb2, 0xb6, 0xaa, 0xae,
-	0xa2, 0xa6, 0x9a, 0x9e, 0x92, 0x96, 0x8a, 0x8e, 0x82, 0x86,
-	0xfa, 0xfe, 0xf2, 0xf6, 0xea, 0xee, 0xe2, 0xe6, 0xda, 0xde,
-	0xd2, 0xd6, 0xca, 0xce, 0xc2, 0xc6, 0x27, 0x23, 0x2f, 0x2b,
-	0x37, 0x33, 0x3f, 0x3b, 0x07, 0x03, 0x0f, 0x0b, 0x17, 0x13,
-	0x1f, 0x1b, 0x67, 0x63, 0x6f, 0x6b, 0x77, 0x73, 0x7f, 0x7b,
-	0x47, 0x43, 0x4f, 0x4b, 0x57, 0x53, 0x5f, 0x5b, 0xa7, 0xa3,
-	0xaf, 0xab, 0xb7, 0xb3, 0xbf, 0xbb, 0x87, 0x83, 0x8f, 0x8b,
-	0x97, 0x93, 0x9f, 0x9b, 0xe7, 0xe3, 0xef, 0xeb, 0xf7, 0xf3,
-	0xff, 0xfb, 0xc7, 0xc3, 0xcf, 0xcb, 0xd7, 0xd3, 0xdf, 0xdb,
-	0x00, 0x05, 0x0a, 0x0f, 0x14, 0x11, 0x1e, 0x1b, 0x28, 0x2d,
-	0x22, 0x27, 0x3c, 0x39, 0x36, 0x33, 0x50, 0x55, 0x5a, 0x5f,
-	0x44, 0x41, 0x4e, 0x4b, 0x78, 0x7d, 0x72, 0x77, 0x6c, 0x69,
-	0x66, 0x63, 0xa0, 0xa5, 0xaa, 0xaf, 0xb4, 0xb1, 0xbe, 0xbb,
-	0x88, 0x8d, 0x82, 0x87, 0x9c, 0x99, 0x96, 0x93, 0xf0, 0xf5,
-	0xfa, 0xff, 0xe4, 0xe1, 0xee, 0xeb, 0xd8, 0xdd, 0xd2, 0xd7,
-	0xcc, 0xc9, 0xc6, 0xc3, 0x5d, 0x58, 0x57, 0x52, 0x49, 0x4c,
-	0x43, 0x46, 0x75, 0x70, 0x7f, 0x7a, 0x61, 0x64, 0x6b, 0x6e,
-	0x0d, 0x08, 0x07, 0x02, 0x19, 0x1c, 0x13, 0x16, 0x25, 0x20,
-	0x2f, 0x2a, 0x31, 0x34, 0x3b, 0x3e, 0xfd, 0xf8, 0xf7, 0xf2,
-	0xe9, 0xec, 0xe3, 0xe6, 0xd5, 0xd0, 0xdf, 0xda, 0xc1, 0xc4,
-	0xcb, 0xce, 0xad, 0xa8, 0xa7, 0xa2, 0xb9, 0xbc, 0xb3, 0xb6,
-	0x85, 0x80, 0x8f, 0x8a, 0x91, 0x94, 0x9b, 0x9e, 0xba, 0xbf,
-	0xb0, 0xb5, 0xae, 0xab, 0xa4, 0xa1, 0x92, 0x97, 0x98, 0x9d,
-	0x86, 0x83, 0x8c, 0x89, 0xea, 0xef, 0xe0, 0xe5, 0xfe, 0xfb,
-	0xf4, 0xf1, 0xc2, 0xc7, 0xc8, 0xcd, 0xd6, 0xd3, 0xdc, 0xd9,
-	0x1a, 0x1f, 0x10, 0x15, 0x0e, 0x0b, 0x04, 0x01, 0x32, 0x37,
-	0x38, 0x3d, 0x26, 0x23, 0x2c, 0x29, 0x4a, 0x4f, 0x40, 0x45,
-	0x5e, 0x5b, 0x54, 0x51, 0x62, 0x67, 0x68, 0x6d, 0x76, 0x73,
-	0x7c, 0x79, 0xe7, 0xe2, 0xed, 0xe8, 0xf3, 0xf6, 0xf9, 0xfc,
-	0xcf, 0xca, 0xc5, 0xc0, 0xdb, 0xde, 0xd1, 0xd4, 0xb7, 0xb2,
-	0xbd, 0xb8, 0xa3, 0xa6, 0xa9, 0xac, 0x9f, 0x9a, 0x95, 0x90,
-	0x8b, 0x8e, 0x81, 0x84, 0x47, 0x42, 0x4d, 0x48, 0x53, 0x56,
-	0x59, 0x5c, 0x6f, 0x6a, 0x65, 0x60, 0x7b, 0x7e, 0x71, 0x74,
-	0x17, 0x12, 0x1d, 0x18, 0x03, 0x06, 0x09, 0x0c, 0x3f, 0x3a,
-	0x35, 0x30, 0x2b, 0x2e, 0x21, 0x24, 0x00, 0x06, 0x0c, 0x0a,
-	0x18, 0x1e, 0x14, 0x12, 0x30, 0x36, 0x3c, 0x3a, 0x28, 0x2e,
-	0x24, 0x22, 0x60, 0x66, 0x6c, 0x6a, 0x78, 0x7e, 0x74, 0x72,
-	0x50, 0x56, 0x5c, 0x5a, 0x48, 0x4e, 0x44, 0x42, 0xc0, 0xc6,
-	0xcc, 0xca, 0xd8, 0xde, 0xd4, 0xd2, 0xf0, 0xf6, 0xfc, 0xfa,
-	0xe8, 0xee, 0xe4, 0xe2, 0xa0, 0xa6, 0xac, 0xaa, 0xb8, 0xbe,
-	0xb4, 0xb2, 0x90, 0x96, 0x9c, 0x9a, 0x88, 0x8e, 0x84, 0x82,
-	0x9d, 0x9b, 0x91, 0x97, 0x85, 0x83, 0x89, 0x8f, 0xad, 0xab,
-	0xa1, 0xa7, 0xb5, 0xb3, 0xb9, 0xbf, 0xfd, 0xfb, 0xf1, 0xf7,
-	0xe5, 0xe3, 0xe9, 0xef, 0xcd, 0xcb, 0xc1, 0xc7, 0xd5, 0xd3,
-	0xd9, 0xdf, 0x5d, 0x5b, 0x51, 0x57, 0x45, 0x43, 0x49, 0x4f,
-	0x6d, 0x6b, 0x61, 0x67, 0x75, 0x73, 0x79, 0x7f, 0x3d, 0x3b,
-	0x31, 0x37, 0x25, 0x23, 0x29, 0x2f, 0x0d, 0x0b, 0x01, 0x07,
-	0x15, 0x13, 0x19, 0x1f, 0x27, 0x21, 0x2b, 0x2d, 0x3f, 0x39,
-	0x33, 0x35, 0x17, 0x11, 0x1b, 0x1d, 0x0f, 0x09, 0x03, 0x05,
-	0x47, 0x41, 0x4b, 0x4d, 0x5f, 0x59, 0x53, 0x55, 0x77, 0x71,
-	0x7b, 0x7d, 0x6f, 0x69, 0x63, 0x65, 0xe7, 0xe1, 0xeb, 0xed,
-	0xff, 0xf9, 0xf3, 0xf5, 0xd7, 0xd1, 0xdb, 0xdd, 0xcf, 0xc9,
-	0xc3, 0xc5, 0x87, 0x81, 0x8b, 0x8d, 0x9f, 0x99, 0x93, 0x95,
-	0xb7, 0xb1, 0xbb, 0xbd, 0xaf, 0xa9, 0xa3, 0xa5, 0xba, 0xbc,
-	0xb6, 0xb0, 0xa2, 0xa4, 0xae, 0xa8, 0x8a, 0x8c, 0x86, 0x80,
-	0x92, 0x94, 0x9e, 0x98, 0xda, 0xdc, 0xd6, 0xd0, 0xc2, 0xc4,
-	0xce, 0xc8, 0xea, 0xec, 0xe6, 0xe0, 0xf2, 0xf4, 0xfe, 0xf8,
-	0x7a, 0x7c, 0x76, 0x70, 0x62, 0x64, 0x6e, 0x68, 0x4a, 0x4c,
-	0x46, 0x40, 0x52, 0x54, 0x5e, 0x58, 0x1a, 0x1c, 0x16, 0x10,
-	0x02, 0x04, 0x0e, 0x08, 0x2a, 0x2c, 0x26, 0x20, 0x32, 0x34,
-	0x3e, 0x38, 0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
-	0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77,
-	0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41,
-	0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb,
-	0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd,
-	0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf,
-	0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xdd, 0xda, 0xd3, 0xd4,
-	0xc1, 0xc6, 0xcf, 0xc8, 0xe5, 0xe2, 0xeb, 0xec, 0xf9, 0xfe,
-	0xf7, 0xf0, 0xad, 0xaa, 0xa3, 0xa4, 0xb1, 0xb6, 0xbf, 0xb8,
-	0x95, 0x92, 0x9b, 0x9c, 0x89, 0x8e, 0x87, 0x80, 0x3d, 0x3a,
-	0x33, 0x34, 0x21, 0x26, 0x2f, 0x28, 0x05, 0x02, 0x0b, 0x0c,
-	0x19, 0x1e, 0x17, 0x10, 0x4d, 0x4a, 0x43, 0x44, 0x51, 0x56,
-	0x5f, 0x58, 0x75, 0x72, 0x7b, 0x7c, 0x69, 0x6e, 0x67, 0x60,
-	0xa7, 0xa0, 0xa9, 0xae, 0xbb, 0xbc, 0xb5, 0xb2, 0x9f, 0x98,
-	0x91, 0x96, 0x83, 0x84, 0x8d, 0x8a, 0xd7, 0xd0, 0xd9, 0xde,
-	0xcb, 0xcc, 0xc5, 0xc2, 0xef, 0xe8, 0xe1, 0xe6, 0xf3, 0xf4,
-	0xfd, 0xfa, 0x47, 0x40, 0x49, 0x4e, 0x5b, 0x5c, 0x55, 0x52,
-	0x7f, 0x78, 0x71, 0x76, 0x63, 0x64, 0x6d, 0x6a, 0x37, 0x30,
-	0x39, 0x3e, 0x2b, 0x2c, 0x25, 0x22, 0x0f, 0x08, 0x01, 0x06,
-	0x13, 0x14, 0x1d, 0x1a, 0x7a, 0x7d, 0x74, 0x73, 0x66, 0x61,
-	0x68, 0x6f, 0x42, 0x45, 0x4c, 0x4b, 0x5e, 0x59, 0x50, 0x57,
-	0x0a, 0x0d, 0x04, 0x03, 0x16, 0x11, 0x18, 0x1f, 0x32, 0x35,
-	0x3c, 0x3b, 0x2e, 0x29, 0x20, 0x27, 0x9a, 0x9d, 0x94, 0x93,
-	0x86, 0x81, 0x88, 0x8f, 0xa2, 0xa5, 0xac, 0xab, 0xbe, 0xb9,
-	0xb0, 0xb7, 0xea, 0xed, 0xe4, 0xe3, 0xf6, 0xf1, 0xf8, 0xff,
-	0xd2, 0xd5, 0xdc, 0xdb, 0xce, 0xc9, 0xc0, 0xc7, 0x00, 0x08,
-	0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58,
-	0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8,
-	0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8,
-	0x1d, 0x15, 0x0d, 0x05, 0x3d, 0x35, 0x2d, 0x25, 0x5d, 0x55,
-	0x4d, 0x45, 0x7d, 0x75, 0x6d, 0x65, 0x9d, 0x95, 0x8d, 0x85,
-	0xbd, 0xb5, 0xad, 0xa5, 0xdd, 0xd5, 0xcd, 0xc5, 0xfd, 0xf5,
-	0xed, 0xe5, 0x3a, 0x32, 0x2a, 0x22, 0x1a, 0x12, 0x0a, 0x02,
-	0x7a, 0x72, 0x6a, 0x62, 0x5a, 0x52, 0x4a, 0x42, 0xba, 0xb2,
-	0xaa, 0xa2, 0x9a, 0x92, 0x8a, 0x82, 0xfa, 0xf2, 0xea, 0xe2,
-	0xda, 0xd2, 0xca, 0xc2, 0x27, 0x2f, 0x37, 0x3f, 0x07, 0x0f,
-	0x17, 0x1f, 0x67, 0x6f, 0x77, 0x7f, 0x47, 0x4f, 0x57, 0x5f,
-	0xa7, 0xaf, 0xb7, 0xbf, 0x87, 0x8f, 0x97, 0x9f, 0xe7, 0xef,
-	0xf7, 0xff, 0xc7, 0xcf, 0xd7, 0xdf, 0x74, 0x7c, 0x64, 0x6c,
-	0x54, 0x5c, 0x44, 0x4c, 0x34, 0x3c, 0x24, 0x2c, 0x14, 0x1c,
-	0x04, 0x0c, 0xf4, 0xfc, 0xe4, 0xec, 0xd4, 0xdc, 0xc4, 0xcc,
-	0xb4, 0xbc, 0xa4, 0xac, 0x94, 0x9c, 0x84, 0x8c, 0x69, 0x61,
-	0x79, 0x71, 0x49, 0x41, 0x59, 0x51, 0x29, 0x21, 0x39, 0x31,
-	0x09, 0x01, 0x19, 0x11, 0xe9, 0xe1, 0xf9, 0xf1, 0xc9, 0xc1,
-	0xd9, 0xd1, 0xa9, 0xa1, 0xb9, 0xb1, 0x89, 0x81, 0x99, 0x91,
-	0x4e, 0x46, 0x5e, 0x56, 0x6e, 0x66, 0x7e, 0x76, 0x0e, 0x06,
-	0x1e, 0x16, 0x2e, 0x26, 0x3e, 0x36, 0xce, 0xc6, 0xde, 0xd6,
-	0xee, 0xe6, 0xfe, 0xf6, 0x8e, 0x86, 0x9e, 0x96, 0xae, 0xa6,
-	0xbe, 0xb6, 0x53, 0x5b, 0x43, 0x4b, 0x73, 0x7b, 0x63, 0x6b,
-	0x13, 0x1b, 0x03, 0x0b, 0x33, 0x3b, 0x23, 0x2b, 0xd3, 0xdb,
-	0xc3, 0xcb, 0xf3, 0xfb, 0xe3, 0xeb, 0x93, 0x9b, 0x83, 0x8b,
-	0xb3, 0xbb, 0xa3, 0xab, 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d,
-	0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77,
-	0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, 0xd8, 0xd1,
-	0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3d, 0x34, 0x2f, 0x26,
-	0x19, 0x10, 0x0b, 0x02, 0x75, 0x7c, 0x67, 0x6e, 0x51, 0x58,
-	0x43, 0x4a, 0xad, 0xa4, 0xbf, 0xb6, 0x89, 0x80, 0x9b, 0x92,
-	0xe5, 0xec, 0xf7, 0xfe, 0xc1, 0xc8, 0xd3, 0xda, 0x7a, 0x73,
-	0x68, 0x61, 0x5e, 0x57, 0x4c, 0x45, 0x32, 0x3b, 0x20, 0x29,
-	0x16, 0x1f, 0x04, 0x0d, 0xea, 0xe3, 0xf8, 0xf1, 0xce, 0xc7,
-	0xdc, 0xd5, 0xa2, 0xab, 0xb0, 0xb9, 0x86, 0x8f, 0x94, 0x9d,
-	0x47, 0x4e, 0x55, 0x5c, 0x63, 0x6a, 0x71, 0x78, 0x0f, 0x06,
-	0x1d, 0x14, 0x2b, 0x22, 0x39, 0x30, 0xd7, 0xde, 0xc5, 0xcc,
-	0xf3, 0xfa, 0xe1, 0xe8, 0x9f, 0x96, 0x8d, 0x84, 0xbb, 0xb2,
-	0xa9, 0xa0, 0xf4, 0xfd, 0xe6, 0xef, 0xd0, 0xd9, 0xc2, 0xcb,
-	0xbc, 0xb5, 0xae, 0xa7, 0x98, 0x91, 0x8a, 0x83, 0x64, 0x6d,
-	0x76, 0x7f, 0x40, 0x49, 0x52, 0x5b, 0x2c, 0x25, 0x3e, 0x37,
-	0x08, 0x01, 0x1a, 0x13, 0xc9, 0xc0, 0xdb, 0xd2, 0xed, 0xe4,
-	0xff, 0xf6, 0x81, 0x88, 0x93, 0x9a, 0xa5, 0xac, 0xb7, 0xbe,
-	0x59, 0x50, 0x4b, 0x42, 0x7d, 0x74, 0x6f, 0x66, 0x11, 0x18,
-	0x03, 0x0a, 0x35, 0x3c, 0x27, 0x2e, 0x8e, 0x87, 0x9c, 0x95,
-	0xaa, 0xa3, 0xb8, 0xb1, 0xc6, 0xcf, 0xd4, 0xdd, 0xe2, 0xeb,
-	0xf0, 0xf9, 0x1e, 0x17, 0x0c, 0x05, 0x3a, 0x33, 0x28, 0x21,
-	0x56, 0x5f, 0x44, 0x4d, 0x72, 0x7b, 0x60, 0x69, 0xb3, 0xba,
-	0xa1, 0xa8, 0x97, 0x9e, 0x85, 0x8c, 0xfb, 0xf2, 0xe9, 0xe0,
-	0xdf, 0xd6, 0xcd, 0xc4, 0x23, 0x2a, 0x31, 0x38, 0x07, 0x0e,
-	0x15, 0x1c, 0x6b, 0x62, 0x79, 0x70, 0x4f, 0x46, 0x5d, 0x54,
-	0x00, 0x0a, 0x14, 0x1e, 0x28, 0x22, 0x3c, 0x36, 0x50, 0x5a,
-	0x44, 0x4e, 0x78, 0x72, 0x6c, 0x66, 0xa0, 0xaa, 0xb4, 0xbe,
-	0x88, 0x82, 0x9c, 0x96, 0xf0, 0xfa, 0xe4, 0xee, 0xd8, 0xd2,
-	0xcc, 0xc6, 0x5d, 0x57, 0x49, 0x43, 0x75, 0x7f, 0x61, 0x6b,
-	0x0d, 0x07, 0x19, 0x13, 0x25, 0x2f, 0x31, 0x3b, 0xfd, 0xf7,
-	0xe9, 0xe3, 0xd5, 0xdf, 0xc1, 0xcb, 0xad, 0xa7, 0xb9, 0xb3,
-	0x85, 0x8f, 0x91, 0x9b, 0xba, 0xb0, 0xae, 0xa4, 0x92, 0x98,
-	0x86, 0x8c, 0xea, 0xe0, 0xfe, 0xf4, 0xc2, 0xc8, 0xd6, 0xdc,
-	0x1a, 0x10, 0x0e, 0x04, 0x32, 0x38, 0x26, 0x2c, 0x4a, 0x40,
-	0x5e, 0x54, 0x62, 0x68, 0x76, 0x7c, 0xe7, 0xed, 0xf3, 0xf9,
-	0xcf, 0xc5, 0xdb, 0xd1, 0xb7, 0xbd, 0xa3, 0xa9, 0x9f, 0x95,
-	0x8b, 0x81, 0x47, 0x4d, 0x53, 0x59, 0x6f, 0x65, 0x7b, 0x71,
-	0x17, 0x1d, 0x03, 0x09, 0x3f, 0x35, 0x2b, 0x21, 0x69, 0x63,
-	0x7d, 0x77, 0x41, 0x4b, 0x55, 0x5f, 0x39, 0x33, 0x2d, 0x27,
-	0x11, 0x1b, 0x05, 0x0f, 0xc9, 0xc3, 0xdd, 0xd7, 0xe1, 0xeb,
-	0xf5, 0xff, 0x99, 0x93, 0x8d, 0x87, 0xb1, 0xbb, 0xa5, 0xaf,
-	0x34, 0x3e, 0x20, 0x2a, 0x1c, 0x16, 0x08, 0x02, 0x64, 0x6e,
-	0x70, 0x7a, 0x4c, 0x46, 0x58, 0x52, 0x94, 0x9e, 0x80, 0x8a,
-	0xbc, 0xb6, 0xa8, 0xa2, 0xc4, 0xce, 0xd0, 0xda, 0xec, 0xe6,
-	0xf8, 0xf2, 0xd3, 0xd9, 0xc7, 0xcd, 0xfb, 0xf1, 0xef, 0xe5,
-	0x83, 0x89, 0x97, 0x9d, 0xab, 0xa1, 0xbf, 0xb5, 0x73, 0x79,
-	0x67, 0x6d, 0x5b, 0x51, 0x4f, 0x45, 0x23, 0x29, 0x37, 0x3d,
-	0x0b, 0x01, 0x1f, 0x15, 0x8e, 0x84, 0x9a, 0x90, 0xa6, 0xac,
-	0xb2, 0xb8, 0xde, 0xd4, 0xca, 0xc0, 0xf6, 0xfc, 0xe2, 0xe8,
-	0x2e, 0x24, 0x3a, 0x30, 0x06, 0x0c, 0x12, 0x18, 0x7e, 0x74,
-	0x6a, 0x60, 0x56, 0x5c, 0x42, 0x48, 0x00, 0x0b, 0x16, 0x1d,
-	0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f,
-	0x62, 0x69, 0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81,
-	0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9, 0x7d, 0x76,
-	0x6b, 0x60, 0x51, 0x5a, 0x47, 0x4c, 0x25, 0x2e, 0x33, 0x38,
-	0x09, 0x02, 0x1f, 0x14, 0xcd, 0xc6, 0xdb, 0xd0, 0xe1, 0xea,
-	0xf7, 0xfc, 0x95, 0x9e, 0x83, 0x88, 0xb9, 0xb2, 0xaf, 0xa4,
-	0xfa, 0xf1, 0xec, 0xe7, 0xd6, 0xdd, 0xc0, 0xcb, 0xa2, 0xa9,
-	0xb4, 0xbf, 0x8e, 0x85, 0x98, 0x93, 0x4a, 0x41, 0x5c, 0x57,
-	0x66, 0x6d, 0x70, 0x7b, 0x12, 0x19, 0x04, 0x0f, 0x3e, 0x35,
-	0x28, 0x23, 0x87, 0x8c, 0x91, 0x9a, 0xab, 0xa0, 0xbd, 0xb6,
-	0xdf, 0xd4, 0xc9, 0xc2, 0xf3, 0xf8, 0xe5, 0xee, 0x37, 0x3c,
-	0x21, 0x2a, 0x1b, 0x10, 0x0d, 0x06, 0x6f, 0x64, 0x79, 0x72,
-	0x43, 0x48, 0x55, 0x5e, 0xe9, 0xe2, 0xff, 0xf4, 0xc5, 0xce,
-	0xd3, 0xd8, 0xb1, 0xba, 0xa7, 0xac, 0x9d, 0x96, 0x8b, 0x80,
-	0x59, 0x52, 0x4f, 0x44, 0x75, 0x7e, 0x63, 0x68, 0x01, 0x0a,
-	0x17, 0x1c, 0x2d, 0x26, 0x3b, 0x30, 0x94, 0x9f, 0x82, 0x89,
-	0xb8, 0xb3, 0xae, 0xa5, 0xcc, 0xc7, 0xda, 0xd1, 0xe0, 0xeb,
-	0xf6, 0xfd, 0x24, 0x2f, 0x32, 0x39, 0x08, 0x03, 0x1e, 0x15,
-	0x7c, 0x77, 0x6a, 0x61, 0x50, 0x5b, 0x46, 0x4d, 0x13, 0x18,
-	0x05, 0x0e, 0x3f, 0x34, 0x29, 0x22, 0x4b, 0x40, 0x5d, 0x56,
-	0x67, 0x6c, 0x71, 0x7a, 0xa3, 0xa8, 0xb5, 0xbe, 0x8f, 0x84,
-	0x99, 0x92, 0xfb, 0xf0, 0xed, 0xe6, 0xd7, 0xdc, 0xc1, 0xca,
-	0x6e, 0x65, 0x78, 0x73, 0x42, 0x49, 0x54, 0x5f, 0x36, 0x3d,
-	0x20, 0x2b, 0x1a, 0x11, 0x0c, 0x07, 0xde, 0xd5, 0xc8, 0xc3,
-	0xf2, 0xf9, 0xe4, 0xef, 0x86, 0x8d, 0x90, 0x9b, 0xaa, 0xa1,
-	0xbc, 0xb7, 0x00, 0x0c, 0x18, 0x14, 0x30, 0x3c, 0x28, 0x24,
-	0x60, 0x6c, 0x78, 0x74, 0x50, 0x5c, 0x48, 0x44, 0xc0, 0xcc,
-	0xd8, 0xd4, 0xf0, 0xfc, 0xe8, 0xe4, 0xa0, 0xac, 0xb8, 0xb4,
-	0x90, 0x9c, 0x88, 0x84, 0x9d, 0x91, 0x85, 0x89, 0xad, 0xa1,
-	0xb5, 0xb9, 0xfd, 0xf1, 0xe5, 0xe9, 0xcd, 0xc1, 0xd5, 0xd9,
-	0x5d, 0x51, 0x45, 0x49, 0x6d, 0x61, 0x75, 0x79, 0x3d, 0x31,
-	0x25, 0x29, 0x0d, 0x01, 0x15, 0x19, 0x27, 0x2b, 0x3f, 0x33,
-	0x17, 0x1b, 0x0f, 0x03, 0x47, 0x4b, 0x5f, 0x53, 0x77, 0x7b,
-	0x6f, 0x63, 0xe7, 0xeb, 0xff, 0xf3, 0xd7, 0xdb, 0xcf, 0xc3,
-	0x87, 0x8b, 0x9f, 0x93, 0xb7, 0xbb, 0xaf, 0xa3, 0xba, 0xb6,
-	0xa2, 0xae, 0x8a, 0x86, 0x92, 0x9e, 0xda, 0xd6, 0xc2, 0xce,
-	0xea, 0xe6, 0xf2, 0xfe, 0x7a, 0x76, 0x62, 0x6e, 0x4a, 0x46,
-	0x52, 0x5e, 0x1a, 0x16, 0x02, 0x0e, 0x2a, 0x26, 0x32, 0x3e,
-	0x4e, 0x42, 0x56, 0x5a, 0x7e, 0x72, 0x66, 0x6a, 0x2e, 0x22,
-	0x36, 0x3a, 0x1e, 0x12, 0x06, 0x0a, 0x8e, 0x82, 0x96, 0x9a,
-	0xbe, 0xb2, 0xa6, 0xaa, 0xee, 0xe2, 0xf6, 0xfa, 0xde, 0xd2,
-	0xc6, 0xca, 0xd3, 0xdf, 0xcb, 0xc7, 0xe3, 0xef, 0xfb, 0xf7,
-	0xb3, 0xbf, 0xab, 0xa7, 0x83, 0x8f, 0x9b, 0x97, 0x13, 0x1f,
-	0x0b, 0x07, 0x23, 0x2f, 0x3b, 0x37, 0x73, 0x7f, 0x6b, 0x67,
-	0x43, 0x4f, 0x5b, 0x57, 0x69, 0x65, 0x71, 0x7d, 0x59, 0x55,
-	0x41, 0x4d, 0x09, 0x05, 0x11, 0x1d, 0x39, 0x35, 0x21, 0x2d,
-	0xa9, 0xa5, 0xb1, 0xbd, 0x99, 0x95, 0x81, 0x8d, 0xc9, 0xc5,
-	0xd1, 0xdd, 0xf9, 0xf5, 0xe1, 0xed, 0xf4, 0xf8, 0xec, 0xe0,
-	0xc4, 0xc8, 0xdc, 0xd0, 0x94, 0x98, 0x8c, 0x80, 0xa4, 0xa8,
-	0xbc, 0xb0, 0x34, 0x38, 0x2c, 0x20, 0x04, 0x08, 0x1c, 0x10,
-	0x54, 0x58, 0x4c, 0x40, 0x64, 0x68, 0x7c, 0x70, 0x00, 0x0d,
-	0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f,
-	0x5c, 0x51, 0x46, 0x4b, 0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9,
-	0xfe, 0xf3, 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b,
-	0xbd, 0xb0, 0xa7, 0xaa, 0x89, 0x84, 0x93, 0x9e, 0xd5, 0xd8,
-	0xcf, 0xc2, 0xe1, 0xec, 0xfb, 0xf6, 0x6d, 0x60, 0x77, 0x7a,
-	0x59, 0x54, 0x43, 0x4e, 0x05, 0x08, 0x1f, 0x12, 0x31, 0x3c,
-	0x2b, 0x26, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44,
-	0x0f, 0x02, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0xb7, 0xba,
-	0xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8,
-	0xeb, 0xe6, 0xf1, 0xfc, 0xda, 0xd7, 0xc0, 0xcd, 0xee, 0xe3,
-	0xf4, 0xf9, 0xb2, 0xbf, 0xa8, 0xa5, 0x86, 0x8b, 0x9c, 0x91,
-	0x0a, 0x07, 0x10, 0x1d, 0x3e, 0x33, 0x24, 0x29, 0x62, 0x6f,
-	0x78, 0x75, 0x56, 0x5b, 0x4c, 0x41, 0xce, 0xc3, 0xd4, 0xd9,
-	0xfa, 0xf7, 0xe0, 0xed, 0xa6, 0xab, 0xbc, 0xb1, 0x92, 0x9f,
-	0x88, 0x85, 0x1e, 0x13, 0x04, 0x09, 0x2a, 0x27, 0x30, 0x3d,
-	0x76, 0x7b, 0x6c, 0x61, 0x42, 0x4f, 0x58, 0x55, 0x73, 0x7e,
-	0x69, 0x64, 0x47, 0x4a, 0x5d, 0x50, 0x1b, 0x16, 0x01, 0x0c,
-	0x2f, 0x22, 0x35, 0x38, 0xa3, 0xae, 0xb9, 0xb4, 0x97, 0x9a,
-	0x8d, 0x80, 0xcb, 0xc6, 0xd1, 0xdc, 0xff, 0xf2, 0xe5, 0xe8,
-	0xa9, 0xa4, 0xb3, 0xbe, 0x9d, 0x90, 0x87, 0x8a, 0xc1, 0xcc,
-	0xdb, 0xd6, 0xf5, 0xf8, 0xef, 0xe2, 0x79, 0x74, 0x63, 0x6e,
-	0x4d, 0x40, 0x57, 0x5a, 0x11, 0x1c, 0x0b, 0x06, 0x25, 0x28,
-	0x3f, 0x32, 0x14, 0x19, 0x0e, 0x03, 0x20, 0x2d, 0x3a, 0x37,
-	0x7c, 0x71, 0x66, 0x6b, 0x48, 0x45, 0x52, 0x5f, 0xc4, 0xc9,
-	0xde, 0xd3, 0xf0, 0xfd, 0xea, 0xe7, 0xac, 0xa1, 0xb6, 0xbb,
-	0x98, 0x95, 0x82, 0x8f, 0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36,
-	0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a,
-	0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, 0x90, 0x9e,
-	0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba, 0xdd, 0xd3, 0xc1, 0xcf,
-	0xe5, 0xeb, 0xf9, 0xf7, 0xad, 0xa3, 0xb1, 0xbf, 0x95, 0x9b,
-	0x89, 0x87, 0x3d, 0x33, 0x21, 0x2f, 0x05, 0x0b, 0x19, 0x17,
-	0x4d, 0x43, 0x51, 0x5f, 0x75, 0x7b, 0x69, 0x67, 0xa7, 0xa9,
-	0xbb, 0xb5, 0x9f, 0x91, 0x83, 0x8d, 0xd7, 0xd9, 0xcb, 0xc5,
-	0xef, 0xe1, 0xf3, 0xfd, 0x47, 0x49, 0x5b, 0x55, 0x7f, 0x71,
-	0x63, 0x6d, 0x37, 0x39, 0x2b, 0x25, 0x0f, 0x01, 0x13, 0x1d,
-	0x7a, 0x74, 0x66, 0x68, 0x42, 0x4c, 0x5e, 0x50, 0x0a, 0x04,
-	0x16, 0x18, 0x32, 0x3c, 0x2e, 0x20, 0x9a, 0x94, 0x86, 0x88,
-	0xa2, 0xac, 0xbe, 0xb0, 0xea, 0xe4, 0xf6, 0xf8, 0xd2, 0xdc,
-	0xce, 0xc0, 0x53, 0x5d, 0x4f, 0x41, 0x6b, 0x65, 0x77, 0x79,
-	0x23, 0x2d, 0x3f, 0x31, 0x1b, 0x15, 0x07, 0x09, 0xb3, 0xbd,
-	0xaf, 0xa1, 0x8b, 0x85, 0x97, 0x99, 0xc3, 0xcd, 0xdf, 0xd1,
-	0xfb, 0xf5, 0xe7, 0xe9, 0x8e, 0x80, 0x92, 0x9c, 0xb6, 0xb8,
-	0xaa, 0xa4, 0xfe, 0xf0, 0xe2, 0xec, 0xc6, 0xc8, 0xda, 0xd4,
-	0x6e, 0x60, 0x72, 0x7c, 0x56, 0x58, 0x4a, 0x44, 0x1e, 0x10,
-	0x02, 0x0c, 0x26, 0x28, 0x3a, 0x34, 0xf4, 0xfa, 0xe8, 0xe6,
-	0xcc, 0xc2, 0xd0, 0xde, 0x84, 0x8a, 0x98, 0x96, 0xbc, 0xb2,
-	0xa0, 0xae, 0x14, 0x1a, 0x08, 0x06, 0x2c, 0x22, 0x30, 0x3e,
-	0x64, 0x6a, 0x78, 0x76, 0x5c, 0x52, 0x40, 0x4e, 0x29, 0x27,
-	0x35, 0x3b, 0x11, 0x1f, 0x0d, 0x03, 0x59, 0x57, 0x45, 0x4b,
-	0x61, 0x6f, 0x7d, 0x73, 0xc9, 0xc7, 0xd5, 0xdb, 0xf1, 0xff,
-	0xed, 0xe3, 0xb9, 0xb7, 0xa5, 0xab, 0x81, 0x8f, 0x9d, 0x93,
-	0x00, 0x0f, 0x1e, 0x11, 0x3c, 0x33, 0x22, 0x2d, 0x78, 0x77,
-	0x66, 0x69, 0x44, 0x4b, 0x5a, 0x55, 0xf0, 0xff, 0xee, 0xe1,
-	0xcc, 0xc3, 0xd2, 0xdd, 0x88, 0x87, 0x96, 0x99, 0xb4, 0xbb,
-	0xaa, 0xa5, 0xfd, 0xf2, 0xe3, 0xec, 0xc1, 0xce, 0xdf, 0xd0,
-	0x85, 0x8a, 0x9b, 0x94, 0xb9, 0xb6, 0xa7, 0xa8, 0x0d, 0x02,
-	0x13, 0x1c, 0x31, 0x3e, 0x2f, 0x20, 0x75, 0x7a, 0x6b, 0x64,
-	0x49, 0x46, 0x57, 0x58, 0xe7, 0xe8, 0xf9, 0xf6, 0xdb, 0xd4,
-	0xc5, 0xca, 0x9f, 0x90, 0x81, 0x8e, 0xa3, 0xac, 0xbd, 0xb2,
-	0x17, 0x18, 0x09, 0x06, 0x2b, 0x24, 0x35, 0x3a, 0x6f, 0x60,
-	0x71, 0x7e, 0x53, 0x5c, 0x4d, 0x42, 0x1a, 0x15, 0x04, 0x0b,
-	0x26, 0x29, 0x38, 0x37, 0x62, 0x6d, 0x7c, 0x73, 0x5e, 0x51,
-	0x40, 0x4f, 0xea, 0xe5, 0xf4, 0xfb, 0xd6, 0xd9, 0xc8, 0xc7,
-	0x92, 0x9d, 0x8c, 0x83, 0xae, 0xa1, 0xb0, 0xbf, 0xd3, 0xdc,
-	0xcd, 0xc2, 0xef, 0xe0, 0xf1, 0xfe, 0xab, 0xa4, 0xb5, 0xba,
-	0x97, 0x98, 0x89, 0x86, 0x23, 0x2c, 0x3d, 0x32, 0x1f, 0x10,
-	0x01, 0x0e, 0x5b, 0x54, 0x45, 0x4a, 0x67, 0x68, 0x79, 0x76,
-	0x2e, 0x21, 0x30, 0x3f, 0x12, 0x1d, 0x0c, 0x03, 0x56, 0x59,
-	0x48, 0x47, 0x6a, 0x65, 0x74, 0x7b, 0xde, 0xd1, 0xc0, 0xcf,
-	0xe2, 0xed, 0xfc, 0xf3, 0xa6, 0xa9, 0xb8, 0xb7, 0x9a, 0x95,
-	0x84, 0x8b, 0x34, 0x3b, 0x2a, 0x25, 0x08, 0x07, 0x16, 0x19,
-	0x4c, 0x43, 0x52, 0x5d, 0x70, 0x7f, 0x6e, 0x61, 0xc4, 0xcb,
-	0xda, 0xd5, 0xf8, 0xf7, 0xe6, 0xe9, 0xbc, 0xb3, 0xa2, 0xad,
-	0x80, 0x8f, 0x9e, 0x91, 0xc9, 0xc6, 0xd7, 0xd8, 0xf5, 0xfa,
-	0xeb, 0xe4, 0xb1, 0xbe, 0xaf, 0xa0, 0x8d, 0x82, 0x93, 0x9c,
-	0x39, 0x36, 0x27, 0x28, 0x05, 0x0a, 0x1b, 0x14, 0x41, 0x4e,
-	0x5f, 0x50, 0x7d, 0x72, 0x63, 0x6c, 0x00, 0x10, 0x20, 0x30,
-	0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0, 0xd0,
-	0xe0, 0xf0, 0x1d, 0x0d, 0x3d, 0x2d, 0x5d, 0x4d, 0x7d, 0x6d,
-	0x9d, 0x8d, 0xbd, 0xad, 0xdd, 0xcd, 0xfd, 0xed, 0x3a, 0x2a,
-	0x1a, 0x0a, 0x7a, 0x6a, 0x5a, 0x4a, 0xba, 0xaa, 0x9a, 0x8a,
-	0xfa, 0xea, 0xda, 0xca, 0x27, 0x37, 0x07, 0x17, 0x67, 0x77,
-	0x47, 0x57, 0xa7, 0xb7, 0x87, 0x97, 0xe7, 0xf7, 0xc7, 0xd7,
-	0x74, 0x64, 0x54, 0x44, 0x34, 0x24, 0x14, 0x04, 0xf4, 0xe4,
-	0xd4, 0xc4, 0xb4, 0xa4, 0x94, 0x84, 0x69, 0x79, 0x49, 0x59,
-	0x29, 0x39, 0x09, 0x19, 0xe9, 0xf9, 0xc9, 0xd9, 0xa9, 0xb9,
-	0x89, 0x99, 0x4e, 0x5e, 0x6e, 0x7e, 0x0e, 0x1e, 0x2e, 0x3e,
-	0xce, 0xde, 0xee, 0xfe, 0x8e, 0x9e, 0xae, 0xbe, 0x53, 0x43,
-	0x73, 0x63, 0x13, 0x03, 0x33, 0x23, 0xd3, 0xc3, 0xf3, 0xe3,
-	0x93, 0x83, 0xb3, 0xa3, 0xe8, 0xf8, 0xc8, 0xd8, 0xa8, 0xb8,
-	0x88, 0x98, 0x68, 0x78, 0x48, 0x58, 0x28, 0x38, 0x08, 0x18,
-	0xf5, 0xe5, 0xd5, 0xc5, 0xb5, 0xa5, 0x95, 0x85, 0x75, 0x65,
-	0x55, 0x45, 0x35, 0x25, 0x15, 0x05, 0xd2, 0xc2, 0xf2, 0xe2,
-	0x92, 0x82, 0xb2, 0xa2, 0x52, 0x42, 0x72, 0x62, 0x12, 0x02,
-	0x32, 0x22, 0xcf, 0xdf, 0xef, 0xff, 0x8f, 0x9f, 0xaf, 0xbf,
-	0x4f, 0x5f, 0x6f, 0x7f, 0x0f, 0x1f, 0x2f, 0x3f, 0x9c, 0x8c,
-	0xbc, 0xac, 0xdc, 0xcc, 0xfc, 0xec, 0x1c, 0x0c, 0x3c, 0x2c,
-	0x5c, 0x4c, 0x7c, 0x6c, 0x81, 0x91, 0xa1, 0xb1, 0xc1, 0xd1,
-	0xe1, 0xf1, 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,
-	0xa6, 0xb6, 0x86, 0x96, 0xe6, 0xf6, 0xc6, 0xd6, 0x26, 0x36,
-	0x06, 0x16, 0x66, 0x76, 0x46, 0x56, 0xbb, 0xab, 0x9b, 0x8b,
-	0xfb, 0xeb, 0xdb, 0xcb, 0x3b, 0x2b, 0x1b, 0x0b, 0x7b, 0x6b,
-	0x5b, 0x4b, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-	0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x0d, 0x1c,
-	0x2f, 0x3e, 0x49, 0x58, 0x6b, 0x7a, 0x85, 0x94, 0xa7, 0xb6,
-	0xc1, 0xd0, 0xe3, 0xf2, 0x1a, 0x0b, 0x38, 0x29, 0x5e, 0x4f,
-	0x7c, 0x6d, 0x92, 0x83, 0xb0, 0xa1, 0xd6, 0xc7, 0xf4, 0xe5,
-	0x17, 0x06, 0x35, 0x24, 0x53, 0x42, 0x71, 0x60, 0x9f, 0x8e,
-	0xbd, 0xac, 0xdb, 0xca, 0xf9, 0xe8, 0x34, 0x25, 0x16, 0x07,
-	0x70, 0x61, 0x52, 0x43, 0xbc, 0xad, 0x9e, 0x8f, 0xf8, 0xe9,
-	0xda, 0xcb, 0x39, 0x28, 0x1b, 0x0a, 0x7d, 0x6c, 0x5f, 0x4e,
-	0xb1, 0xa0, 0x93, 0x82, 0xf5, 0xe4, 0xd7, 0xc6, 0x2e, 0x3f,
-	0x0c, 0x1d, 0x6a, 0x7b, 0x48, 0x59, 0xa6, 0xb7, 0x84, 0x95,
-	0xe2, 0xf3, 0xc0, 0xd1, 0x23, 0x32, 0x01, 0x10, 0x67, 0x76,
-	0x45, 0x54, 0xab, 0xba, 0x89, 0x98, 0xef, 0xfe, 0xcd, 0xdc,
-	0x68, 0x79, 0x4a, 0x5b, 0x2c, 0x3d, 0x0e, 0x1f, 0xe0, 0xf1,
-	0xc2, 0xd3, 0xa4, 0xb5, 0x86, 0x97, 0x65, 0x74, 0x47, 0x56,
-	0x21, 0x30, 0x03, 0x12, 0xed, 0xfc, 0xcf, 0xde, 0xa9, 0xb8,
-	0x8b, 0x9a, 0x72, 0x63, 0x50, 0x41, 0x36, 0x27, 0x14, 0x05,
-	0xfa, 0xeb, 0xd8, 0xc9, 0xbe, 0xaf, 0x9c, 0x8d, 0x7f, 0x6e,
-	0x5d, 0x4c, 0x3b, 0x2a, 0x19, 0x08, 0xf7, 0xe6, 0xd5, 0xc4,
-	0xb3, 0xa2, 0x91, 0x80, 0x5c, 0x4d, 0x7e, 0x6f, 0x18, 0x09,
-	0x3a, 0x2b, 0xd4, 0xc5, 0xf6, 0xe7, 0x90, 0x81, 0xb2, 0xa3,
-	0x51, 0x40, 0x73, 0x62, 0x15, 0x04, 0x37, 0x26, 0xd9, 0xc8,
-	0xfb, 0xea, 0x9d, 0x8c, 0xbf, 0xae, 0x46, 0x57, 0x64, 0x75,
-	0x02, 0x13, 0x20, 0x31, 0xce, 0xdf, 0xec, 0xfd, 0x8a, 0x9b,
-	0xa8, 0xb9, 0x4b, 0x5a, 0x69, 0x78, 0x0f, 0x1e, 0x2d, 0x3c,
-	0xc3, 0xd2, 0xe1, 0xf0, 0x87, 0x96, 0xa5, 0xb4, 0x00, 0x12,
-	0x24, 0x36, 0x48, 0x5a, 0x6c, 0x7e, 0x90, 0x82, 0xb4, 0xa6,
-	0xd8, 0xca, 0xfc, 0xee, 0x3d, 0x2f, 0x19, 0x0b, 0x75, 0x67,
-	0x51, 0x43, 0xad, 0xbf, 0x89, 0x9b, 0xe5, 0xf7, 0xc1, 0xd3,
-	0x7a, 0x68, 0x5e, 0x4c, 0x32, 0x20, 0x16, 0x04, 0xea, 0xf8,
-	0xce, 0xdc, 0xa2, 0xb0, 0x86, 0x94, 0x47, 0x55, 0x63, 0x71,
-	0x0f, 0x1d, 0x2b, 0x39, 0xd7, 0xc5, 0xf3, 0xe1, 0x9f, 0x8d,
-	0xbb, 0xa9, 0xf4, 0xe6, 0xd0, 0xc2, 0xbc, 0xae, 0x98, 0x8a,
-	0x64, 0x76, 0x40, 0x52, 0x2c, 0x3e, 0x08, 0x1a, 0xc9, 0xdb,
-	0xed, 0xff, 0x81, 0x93, 0xa5, 0xb7, 0x59, 0x4b, 0x7d, 0x6f,
-	0x11, 0x03, 0x35, 0x27, 0x8e, 0x9c, 0xaa, 0xb8, 0xc6, 0xd4,
-	0xe2, 0xf0, 0x1e, 0x0c, 0x3a, 0x28, 0x56, 0x44, 0x72, 0x60,
-	0xb3, 0xa1, 0x97, 0x85, 0xfb, 0xe9, 0xdf, 0xcd, 0x23, 0x31,
-	0x07, 0x15, 0x6b, 0x79, 0x4f, 0x5d, 0xf5, 0xe7, 0xd1, 0xc3,
-	0xbd, 0xaf, 0x99, 0x8b, 0x65, 0x77, 0x41, 0x53, 0x2d, 0x3f,
-	0x09, 0x1b, 0xc8, 0xda, 0xec, 0xfe, 0x80, 0x92, 0xa4, 0xb6,
-	0x58, 0x4a, 0x7c, 0x6e, 0x10, 0x02, 0x34, 0x26, 0x8f, 0x9d,
-	0xab, 0xb9, 0xc7, 0xd5, 0xe3, 0xf1, 0x1f, 0x0d, 0x3b, 0x29,
-	0x57, 0x45, 0x73, 0x61, 0xb2, 0xa0, 0x96, 0x84, 0xfa, 0xe8,
-	0xde, 0xcc, 0x22, 0x30, 0x06, 0x14, 0x6a, 0x78, 0x4e, 0x5c,
-	0x01, 0x13, 0x25, 0x37, 0x49, 0x5b, 0x6d, 0x7f, 0x91, 0x83,
-	0xb5, 0xa7, 0xd9, 0xcb, 0xfd, 0xef, 0x3c, 0x2e, 0x18, 0x0a,
-	0x74, 0x66, 0x50, 0x42, 0xac, 0xbe, 0x88, 0x9a, 0xe4, 0xf6,
-	0xc0, 0xd2, 0x7b, 0x69, 0x5f, 0x4d, 0x33, 0x21, 0x17, 0x05,
-	0xeb, 0xf9, 0xcf, 0xdd, 0xa3, 0xb1, 0x87, 0x95, 0x46, 0x54,
-	0x62, 0x70, 0x0e, 0x1c, 0x2a, 0x38, 0xd6, 0xc4, 0xf2, 0xe0,
-	0x9e, 0x8c, 0xba, 0xa8, 0x00, 0x13, 0x26, 0x35, 0x4c, 0x5f,
-	0x6a, 0x79, 0x98, 0x8b, 0xbe, 0xad, 0xd4, 0xc7, 0xf2, 0xe1,
-	0x2d, 0x3e, 0x0b, 0x18, 0x61, 0x72, 0x47, 0x54, 0xb5, 0xa6,
-	0x93, 0x80, 0xf9, 0xea, 0xdf, 0xcc, 0x5a, 0x49, 0x7c, 0x6f,
-	0x16, 0x05, 0x30, 0x23, 0xc2, 0xd1, 0xe4, 0xf7, 0x8e, 0x9d,
-	0xa8, 0xbb, 0x77, 0x64, 0x51, 0x42, 0x3b, 0x28, 0x1d, 0x0e,
-	0xef, 0xfc, 0xc9, 0xda, 0xa3, 0xb0, 0x85, 0x96, 0xb4, 0xa7,
-	0x92, 0x81, 0xf8, 0xeb, 0xde, 0xcd, 0x2c, 0x3f, 0x0a, 0x19,
-	0x60, 0x73, 0x46, 0x55, 0x99, 0x8a, 0xbf, 0xac, 0xd5, 0xc6,
-	0xf3, 0xe0, 0x01, 0x12, 0x27, 0x34, 0x4d, 0x5e, 0x6b, 0x78,
-	0xee, 0xfd, 0xc8, 0xdb, 0xa2, 0xb1, 0x84, 0x97, 0x76, 0x65,
-	0x50, 0x43, 0x3a, 0x29, 0x1c, 0x0f, 0xc3, 0xd0, 0xe5, 0xf6,
-	0x8f, 0x9c, 0xa9, 0xba, 0x5b, 0x48, 0x7d, 0x6e, 0x17, 0x04,
-	0x31, 0x22, 0x75, 0x66, 0x53, 0x40, 0x39, 0x2a, 0x1f, 0x0c,
-	0xed, 0xfe, 0xcb, 0xd8, 0xa1, 0xb2, 0x87, 0x94, 0x58, 0x4b,
-	0x7e, 0x6d, 0x14, 0x07, 0x32, 0x21, 0xc0, 0xd3, 0xe6, 0xf5,
-	0x8c, 0x9f, 0xaa, 0xb9, 0x2f, 0x3c, 0x09, 0x1a, 0x63, 0x70,
-	0x45, 0x56, 0xb7, 0xa4, 0x91, 0x82, 0xfb, 0xe8, 0xdd, 0xce,
-	0x02, 0x11, 0x24, 0x37, 0x4e, 0x5d, 0x68, 0x7b, 0x9a, 0x89,
-	0xbc, 0xaf, 0xd6, 0xc5, 0xf0, 0xe3, 0xc1, 0xd2, 0xe7, 0xf4,
-	0x8d, 0x9e, 0xab, 0xb8, 0x59, 0x4a, 0x7f, 0x6c, 0x15, 0x06,
-	0x33, 0x20, 0xec, 0xff, 0xca, 0xd9, 0xa0, 0xb3, 0x86, 0x95,
-	0x74, 0x67, 0x52, 0x41, 0x38, 0x2b, 0x1e, 0x0d, 0x9b, 0x88,
-	0xbd, 0xae, 0xd7, 0xc4, 0xf1, 0xe2, 0x03, 0x10, 0x25, 0x36,
-	0x4f, 0x5c, 0x69, 0x7a, 0xb6, 0xa5, 0x90, 0x83, 0xfa, 0xe9,
-	0xdc, 0xcf, 0x2e, 0x3d, 0x08, 0x1b, 0x62, 0x71, 0x44, 0x57,
-	0x00, 0x14, 0x28, 0x3c, 0x50, 0x44, 0x78, 0x6c, 0xa0, 0xb4,
-	0x88, 0x9c, 0xf0, 0xe4, 0xd8, 0xcc, 0x5d, 0x49, 0x75, 0x61,
-	0x0d, 0x19, 0x25, 0x31, 0xfd, 0xe9, 0xd5, 0xc1, 0xad, 0xb9,
-	0x85, 0x91, 0xba, 0xae, 0x92, 0x86, 0xea, 0xfe, 0xc2, 0xd6,
-	0x1a, 0x0e, 0x32, 0x26, 0x4a, 0x5e, 0x62, 0x76, 0xe7, 0xf3,
-	0xcf, 0xdb, 0xb7, 0xa3, 0x9f, 0x8b, 0x47, 0x53, 0x6f, 0x7b,
-	0x17, 0x03, 0x3f, 0x2b, 0x69, 0x7d, 0x41, 0x55, 0x39, 0x2d,
-	0x11, 0x05, 0xc9, 0xdd, 0xe1, 0xf5, 0x99, 0x8d, 0xb1, 0xa5,
-	0x34, 0x20, 0x1c, 0x08, 0x64, 0x70, 0x4c, 0x58, 0x94, 0x80,
-	0xbc, 0xa8, 0xc4, 0xd0, 0xec, 0xf8, 0xd3, 0xc7, 0xfb, 0xef,
-	0x83, 0x97, 0xab, 0xbf, 0x73, 0x67, 0x5b, 0x4f, 0x23, 0x37,
-	0x0b, 0x1f, 0x8e, 0x9a, 0xa6, 0xb2, 0xde, 0xca, 0xf6, 0xe2,
-	0x2e, 0x3a, 0x06, 0x12, 0x7e, 0x6a, 0x56, 0x42, 0xd2, 0xc6,
-	0xfa, 0xee, 0x82, 0x96, 0xaa, 0xbe, 0x72, 0x66, 0x5a, 0x4e,
-	0x22, 0x36, 0x0a, 0x1e, 0x8f, 0x9b, 0xa7, 0xb3, 0xdf, 0xcb,
-	0xf7, 0xe3, 0x2f, 0x3b, 0x07, 0x13, 0x7f, 0x6b, 0x57, 0x43,
-	0x68, 0x7c, 0x40, 0x54, 0x38, 0x2c, 0x10, 0x04, 0xc8, 0xdc,
-	0xe0, 0xf4, 0x98, 0x8c, 0xb0, 0xa4, 0x35, 0x21, 0x1d, 0x09,
-	0x65, 0x71, 0x4d, 0x59, 0x95, 0x81, 0xbd, 0xa9, 0xc5, 0xd1,
-	0xed, 0xf9, 0xbb, 0xaf, 0x93, 0x87, 0xeb, 0xff, 0xc3, 0xd7,
-	0x1b, 0x0f, 0x33, 0x27, 0x4b, 0x5f, 0x63, 0x77, 0xe6, 0xf2,
-	0xce, 0xda, 0xb6, 0xa2, 0x9e, 0x8a, 0x46, 0x52, 0x6e, 0x7a,
-	0x16, 0x02, 0x3e, 0x2a, 0x01, 0x15, 0x29, 0x3d, 0x51, 0x45,
-	0x79, 0x6d, 0xa1, 0xb5, 0x89, 0x9d, 0xf1, 0xe5, 0xd9, 0xcd,
-	0x5c, 0x48, 0x74, 0x60, 0x0c, 0x18, 0x24, 0x30, 0xfc, 0xe8,
-	0xd4, 0xc0, 0xac, 0xb8, 0x84, 0x90, 0x00, 0x15, 0x2a, 0x3f,
-	0x54, 0x41, 0x7e, 0x6b, 0xa8, 0xbd, 0x82, 0x97, 0xfc, 0xe9,
-	0xd6, 0xc3, 0x4d, 0x58, 0x67, 0x72, 0x19, 0x0c, 0x33, 0x26,
-	0xe5, 0xf0, 0xcf, 0xda, 0xb1, 0xa4, 0x9b, 0x8e, 0x9a, 0x8f,
-	0xb0, 0xa5, 0xce, 0xdb, 0xe4, 0xf1, 0x32, 0x27, 0x18, 0x0d,
-	0x66, 0x73, 0x4c, 0x59, 0xd7, 0xc2, 0xfd, 0xe8, 0x83, 0x96,
-	0xa9, 0xbc, 0x7f, 0x6a, 0x55, 0x40, 0x2b, 0x3e, 0x01, 0x14,
-	0x29, 0x3c, 0x03, 0x16, 0x7d, 0x68, 0x57, 0x42, 0x81, 0x94,
-	0xab, 0xbe, 0xd5, 0xc0, 0xff, 0xea, 0x64, 0x71, 0x4e, 0x5b,
-	0x30, 0x25, 0x1a, 0x0f, 0xcc, 0xd9, 0xe6, 0xf3, 0x98, 0x8d,
-	0xb2, 0xa7, 0xb3, 0xa6, 0x99, 0x8c, 0xe7, 0xf2, 0xcd, 0xd8,
-	0x1b, 0x0e, 0x31, 0x24, 0x4f, 0x5a, 0x65, 0x70, 0xfe, 0xeb,
-	0xd4, 0xc1, 0xaa, 0xbf, 0x80, 0x95, 0x56, 0x43, 0x7c, 0x69,
-	0x02, 0x17, 0x28, 0x3d, 0x52, 0x47, 0x78, 0x6d, 0x06, 0x13,
-	0x2c, 0x39, 0xfa, 0xef, 0xd0, 0xc5, 0xae, 0xbb, 0x84, 0x91,
-	0x1f, 0x0a, 0x35, 0x20, 0x4b, 0x5e, 0x61, 0x74, 0xb7, 0xa2,
-	0x9d, 0x88, 0xe3, 0xf6, 0xc9, 0xdc, 0xc8, 0xdd, 0xe2, 0xf7,
-	0x9c, 0x89, 0xb6, 0xa3, 0x60, 0x75, 0x4a, 0x5f, 0x34, 0x21,
-	0x1e, 0x0b, 0x85, 0x90, 0xaf, 0xba, 0xd1, 0xc4, 0xfb, 0xee,
-	0x2d, 0x38, 0x07, 0x12, 0x79, 0x6c, 0x53, 0x46, 0x7b, 0x6e,
-	0x51, 0x44, 0x2f, 0x3a, 0x05, 0x10, 0xd3, 0xc6, 0xf9, 0xec,
-	0x87, 0x92, 0xad, 0xb8, 0x36, 0x23, 0x1c, 0x09, 0x62, 0x77,
-	0x48, 0x5d, 0x9e, 0x8b, 0xb4, 0xa1, 0xca, 0xdf, 0xe0, 0xf5,
-	0xe1, 0xf4, 0xcb, 0xde, 0xb5, 0xa0, 0x9f, 0x8a, 0x49, 0x5c,
-	0x63, 0x76, 0x1d, 0x08, 0x37, 0x22, 0xac, 0xb9, 0x86, 0x93,
-	0xf8, 0xed, 0xd2, 0xc7, 0x04, 0x11, 0x2e, 0x3b, 0x50, 0x45,
-	0x7a, 0x6f, 0x00, 0x16, 0x2c, 0x3a, 0x58, 0x4e, 0x74, 0x62,
-	0xb0, 0xa6, 0x9c, 0x8a, 0xe8, 0xfe, 0xc4, 0xd2, 0x7d, 0x6b,
-	0x51, 0x47, 0x25, 0x33, 0x09, 0x1f, 0xcd, 0xdb, 0xe1, 0xf7,
-	0x95, 0x83, 0xb9, 0xaf, 0xfa, 0xec, 0xd6, 0xc0, 0xa2, 0xb4,
-	0x8e, 0x98, 0x4a, 0x5c, 0x66, 0x70, 0x12, 0x04, 0x3e, 0x28,
-	0x87, 0x91, 0xab, 0xbd, 0xdf, 0xc9, 0xf3, 0xe5, 0x37, 0x21,
-	0x1b, 0x0d, 0x6f, 0x79, 0x43, 0x55, 0xe9, 0xff, 0xc5, 0xd3,
-	0xb1, 0xa7, 0x9d, 0x8b, 0x59, 0x4f, 0x75, 0x63, 0x01, 0x17,
-	0x2d, 0x3b, 0x94, 0x82, 0xb8, 0xae, 0xcc, 0xda, 0xe0, 0xf6,
-	0x24, 0x32, 0x08, 0x1e, 0x7c, 0x6a, 0x50, 0x46, 0x13, 0x05,
-	0x3f, 0x29, 0x4b, 0x5d, 0x67, 0x71, 0xa3, 0xb5, 0x8f, 0x99,
-	0xfb, 0xed, 0xd7, 0xc1, 0x6e, 0x78, 0x42, 0x54, 0x36, 0x20,
-	0x1a, 0x0c, 0xde, 0xc8, 0xf2, 0xe4, 0x86, 0x90, 0xaa, 0xbc,
-	0xcf, 0xd9, 0xe3, 0xf5, 0x97, 0x81, 0xbb, 0xad, 0x7f, 0x69,
-	0x53, 0x45, 0x27, 0x31, 0x0b, 0x1d, 0xb2, 0xa4, 0x9e, 0x88,
-	0xea, 0xfc, 0xc6, 0xd0, 0x02, 0x14, 0x2e, 0x38, 0x5a, 0x4c,
-	0x76, 0x60, 0x35, 0x23, 0x19, 0x0f, 0x6d, 0x7b, 0x41, 0x57,
-	0x85, 0x93, 0xa9, 0xbf, 0xdd, 0xcb, 0xf1, 0xe7, 0x48, 0x5e,
-	0x64, 0x72, 0x10, 0x06, 0x3c, 0x2a, 0xf8, 0xee, 0xd4, 0xc2,
-	0xa0, 0xb6, 0x8c, 0x9a, 0x26, 0x30, 0x0a, 0x1c, 0x7e, 0x68,
-	0x52, 0x44, 0x96, 0x80, 0xba, 0xac, 0xce, 0xd8, 0xe2, 0xf4,
-	0x5b, 0x4d, 0x77, 0x61, 0x03, 0x15, 0x2f, 0x39, 0xeb, 0xfd,
-	0xc7, 0xd1, 0xb3, 0xa5, 0x9f, 0x89, 0xdc, 0xca, 0xf0, 0xe6,
-	0x84, 0x92, 0xa8, 0xbe, 0x6c, 0x7a, 0x40, 0x56, 0x34, 0x22,
-	0x18, 0x0e, 0xa1, 0xb7, 0x8d, 0x9b, 0xf9, 0xef, 0xd5, 0xc3,
-	0x11, 0x07, 0x3d, 0x2b, 0x49, 0x5f, 0x65, 0x73, 0x00, 0x17,
-	0x2e, 0x39, 0x5c, 0x4b, 0x72, 0x65, 0xb8, 0xaf, 0x96, 0x81,
-	0xe4, 0xf3, 0xca, 0xdd, 0x6d, 0x7a, 0x43, 0x54, 0x31, 0x26,
-	0x1f, 0x08, 0xd5, 0xc2, 0xfb, 0xec, 0x89, 0x9e, 0xa7, 0xb0,
-	0xda, 0xcd, 0xf4, 0xe3, 0x86, 0x91, 0xa8, 0xbf, 0x62, 0x75,
-	0x4c, 0x5b, 0x3e, 0x29, 0x10, 0x07, 0xb7, 0xa0, 0x99, 0x8e,
-	0xeb, 0xfc, 0xc5, 0xd2, 0x0f, 0x18, 0x21, 0x36, 0x53, 0x44,
-	0x7d, 0x6a, 0xa9, 0xbe, 0x87, 0x90, 0xf5, 0xe2, 0xdb, 0xcc,
-	0x11, 0x06, 0x3f, 0x28, 0x4d, 0x5a, 0x63, 0x74, 0xc4, 0xd3,
-	0xea, 0xfd, 0x98, 0x8f, 0xb6, 0xa1, 0x7c, 0x6b, 0x52, 0x45,
-	0x20, 0x37, 0x0e, 0x19, 0x73, 0x64, 0x5d, 0x4a, 0x2f, 0x38,
-	0x01, 0x16, 0xcb, 0xdc, 0xe5, 0xf2, 0x97, 0x80, 0xb9, 0xae,
-	0x1e, 0x09, 0x30, 0x27, 0x42, 0x55, 0x6c, 0x7b, 0xa6, 0xb1,
-	0x88, 0x9f, 0xfa, 0xed, 0xd4, 0xc3, 0x4f, 0x58, 0x61, 0x76,
-	0x13, 0x04, 0x3d, 0x2a, 0xf7, 0xe0, 0xd9, 0xce, 0xab, 0xbc,
-	0x85, 0x92, 0x22, 0x35, 0x0c, 0x1b, 0x7e, 0x69, 0x50, 0x47,
-	0x9a, 0x8d, 0xb4, 0xa3, 0xc6, 0xd1, 0xe8, 0xff, 0x95, 0x82,
-	0xbb, 0xac, 0xc9, 0xde, 0xe7, 0xf0, 0x2d, 0x3a, 0x03, 0x14,
-	0x71, 0x66, 0x5f, 0x48, 0xf8, 0xef, 0xd6, 0xc1, 0xa4, 0xb3,
-	0x8a, 0x9d, 0x40, 0x57, 0x6e, 0x79, 0x1c, 0x0b, 0x32, 0x25,
-	0xe6, 0xf1, 0xc8, 0xdf, 0xba, 0xad, 0x94, 0x83, 0x5e, 0x49,
-	0x70, 0x67, 0x02, 0x15, 0x2c, 0x3b, 0x8b, 0x9c, 0xa5, 0xb2,
-	0xd7, 0xc0, 0xf9, 0xee, 0x33, 0x24, 0x1d, 0x0a, 0x6f, 0x78,
-	0x41, 0x56, 0x3c, 0x2b, 0x12, 0x05, 0x60, 0x77, 0x4e, 0x59,
-	0x84, 0x93, 0xaa, 0xbd, 0xd8, 0xcf, 0xf6, 0xe1, 0x51, 0x46,
-	0x7f, 0x68, 0x0d, 0x1a, 0x23, 0x34, 0xe9, 0xfe, 0xc7, 0xd0,
-	0xb5, 0xa2, 0x9b, 0x8c, 0x00, 0x18, 0x30, 0x28, 0x60, 0x78,
-	0x50, 0x48, 0xc0, 0xd8, 0xf0, 0xe8, 0xa0, 0xb8, 0x90, 0x88,
-	0x9d, 0x85, 0xad, 0xb5, 0xfd, 0xe5, 0xcd, 0xd5, 0x5d, 0x45,
-	0x6d, 0x75, 0x3d, 0x25, 0x0d, 0x15, 0x27, 0x3f, 0x17, 0x0f,
-	0x47, 0x5f, 0x77, 0x6f, 0xe7, 0xff, 0xd7, 0xcf, 0x87, 0x9f,
-	0xb7, 0xaf, 0xba, 0xa2, 0x8a, 0x92, 0xda, 0xc2, 0xea, 0xf2,
-	0x7a, 0x62, 0x4a, 0x52, 0x1a, 0x02, 0x2a, 0x32, 0x4e, 0x56,
-	0x7e, 0x66, 0x2e, 0x36, 0x1e, 0x06, 0x8e, 0x96, 0xbe, 0xa6,
-	0xee, 0xf6, 0xde, 0xc6, 0xd3, 0xcb, 0xe3, 0xfb, 0xb3, 0xab,
-	0x83, 0x9b, 0x13, 0x0b, 0x23, 0x3b, 0x73, 0x6b, 0x43, 0x5b,
-	0x69, 0x71, 0x59, 0x41, 0x09, 0x11, 0x39, 0x21, 0xa9, 0xb1,
-	0x99, 0x81, 0xc9, 0xd1, 0xf9, 0xe1, 0xf4, 0xec, 0xc4, 0xdc,
-	0x94, 0x8c, 0xa4, 0xbc, 0x34, 0x2c, 0x04, 0x1c, 0x54, 0x4c,
-	0x64, 0x7c, 0x9c, 0x84, 0xac, 0xb4, 0xfc, 0xe4, 0xcc, 0xd4,
-	0x5c, 0x44, 0x6c, 0x74, 0x3c, 0x24, 0x0c, 0x14, 0x01, 0x19,
-	0x31, 0x29, 0x61, 0x79, 0x51, 0x49, 0xc1, 0xd9, 0xf1, 0xe9,
-	0xa1, 0xb9, 0x91, 0x89, 0xbb, 0xa3, 0x8b, 0x93, 0xdb, 0xc3,
-	0xeb, 0xf3, 0x7b, 0x63, 0x4b, 0x53, 0x1b, 0x03, 0x2b, 0x33,
-	0x26, 0x3e, 0x16, 0x0e, 0x46, 0x5e, 0x76, 0x6e, 0xe6, 0xfe,
-	0xd6, 0xce, 0x86, 0x9e, 0xb6, 0xae, 0xd2, 0xca, 0xe2, 0xfa,
-	0xb2, 0xaa, 0x82, 0x9a, 0x12, 0x0a, 0x22, 0x3a, 0x72, 0x6a,
-	0x42, 0x5a, 0x4f, 0x57, 0x7f, 0x67, 0x2f, 0x37, 0x1f, 0x07,
-	0x8f, 0x97, 0xbf, 0xa7, 0xef, 0xf7, 0xdf, 0xc7, 0xf5, 0xed,
-	0xc5, 0xdd, 0x95, 0x8d, 0xa5, 0xbd, 0x35, 0x2d, 0x05, 0x1d,
-	0x55, 0x4d, 0x65, 0x7d, 0x68, 0x70, 0x58, 0x40, 0x08, 0x10,
-	0x38, 0x20, 0xa8, 0xb0, 0x98, 0x80, 0xc8, 0xd0, 0xf8, 0xe0,
-	0x00, 0x19, 0x32, 0x2b, 0x64, 0x7d, 0x56, 0x4f, 0xc8, 0xd1,
-	0xfa, 0xe3, 0xac, 0xb5, 0x9e, 0x87, 0x8d, 0x94, 0xbf, 0xa6,
-	0xe9, 0xf0, 0xdb, 0xc2, 0x45, 0x5c, 0x77, 0x6e, 0x21, 0x38,
-	0x13, 0x0a, 0x07, 0x1e, 0x35, 0x2c, 0x63, 0x7a, 0x51, 0x48,
-	0xcf, 0xd6, 0xfd, 0xe4, 0xab, 0xb2, 0x99, 0x80, 0x8a, 0x93,
-	0xb8, 0xa1, 0xee, 0xf7, 0xdc, 0xc5, 0x42, 0x5b, 0x70, 0x69,
-	0x26, 0x3f, 0x14, 0x0d, 0x0e, 0x17, 0x3c, 0x25, 0x6a, 0x73,
-	0x58, 0x41, 0xc6, 0xdf, 0xf4, 0xed, 0xa2, 0xbb, 0x90, 0x89,
-	0x83, 0x9a, 0xb1, 0xa8, 0xe7, 0xfe, 0xd5, 0xcc, 0x4b, 0x52,
-	0x79, 0x60, 0x2f, 0x36, 0x1d, 0x04, 0x09, 0x10, 0x3b, 0x22,
-	0x6d, 0x74, 0x5f, 0x46, 0xc1, 0xd8, 0xf3, 0xea, 0xa5, 0xbc,
-	0x97, 0x8e, 0x84, 0x9d, 0xb6, 0xaf, 0xe0, 0xf9, 0xd2, 0xcb,
-	0x4c, 0x55, 0x7e, 0x67, 0x28, 0x31, 0x1a, 0x03, 0x1c, 0x05,
-	0x2e, 0x37, 0x78, 0x61, 0x4a, 0x53, 0xd4, 0xcd, 0xe6, 0xff,
-	0xb0, 0xa9, 0x82, 0x9b, 0x91, 0x88, 0xa3, 0xba, 0xf5, 0xec,
-	0xc7, 0xde, 0x59, 0x40, 0x6b, 0x72, 0x3d, 0x24, 0x0f, 0x16,
-	0x1b, 0x02, 0x29, 0x30, 0x7f, 0x66, 0x4d, 0x54, 0xd3, 0xca,
-	0xe1, 0xf8, 0xb7, 0xae, 0x85, 0x9c, 0x96, 0x8f, 0xa4, 0xbd,
-	0xf2, 0xeb, 0xc0, 0xd9, 0x5e, 0x47, 0x6c, 0x75, 0x3a, 0x23,
-	0x08, 0x11, 0x12, 0x0b, 0x20, 0x39, 0x76, 0x6f, 0x44, 0x5d,
-	0xda, 0xc3, 0xe8, 0xf1, 0xbe, 0xa7, 0x8c, 0x95, 0x9f, 0x86,
-	0xad, 0xb4, 0xfb, 0xe2, 0xc9, 0xd0, 0x57, 0x4e, 0x65, 0x7c,
-	0x33, 0x2a, 0x01, 0x18, 0x15, 0x0c, 0x27, 0x3e, 0x71, 0x68,
-	0x43, 0x5a, 0xdd, 0xc4, 0xef, 0xf6, 0xb9, 0xa0, 0x8b, 0x92,
-	0x98, 0x81, 0xaa, 0xb3, 0xfc, 0xe5, 0xce, 0xd7, 0x50, 0x49,
-	0x62, 0x7b, 0x34, 0x2d, 0x06, 0x1f, 0x00, 0x1a, 0x34, 0x2e,
-	0x68, 0x72, 0x5c, 0x46, 0xd0, 0xca, 0xe4, 0xfe, 0xb8, 0xa2,
-	0x8c, 0x96, 0xbd, 0xa7, 0x89, 0x93, 0xd5, 0xcf, 0xe1, 0xfb,
-	0x6d, 0x77, 0x59, 0x43, 0x05, 0x1f, 0x31, 0x2b, 0x67, 0x7d,
-	0x53, 0x49, 0x0f, 0x15, 0x3b, 0x21, 0xb7, 0xad, 0x83, 0x99,
-	0xdf, 0xc5, 0xeb, 0xf1, 0xda, 0xc0, 0xee, 0xf4, 0xb2, 0xa8,
-	0x86, 0x9c, 0x0a, 0x10, 0x3e, 0x24, 0x62, 0x78, 0x56, 0x4c,
-	0xce, 0xd4, 0xfa, 0xe0, 0xa6, 0xbc, 0x92, 0x88, 0x1e, 0x04,
-	0x2a, 0x30, 0x76, 0x6c, 0x42, 0x58, 0x73, 0x69, 0x47, 0x5d,
-	0x1b, 0x01, 0x2f, 0x35, 0xa3, 0xb9, 0x97, 0x8d, 0xcb, 0xd1,
-	0xff, 0xe5, 0xa9, 0xb3, 0x9d, 0x87, 0xc1, 0xdb, 0xf5, 0xef,
-	0x79, 0x63, 0x4d, 0x57, 0x11, 0x0b, 0x25, 0x3f, 0x14, 0x0e,
-	0x20, 0x3a, 0x7c, 0x66, 0x48, 0x52, 0xc4, 0xde, 0xf0, 0xea,
-	0xac, 0xb6, 0x98, 0x82, 0x81, 0x9b, 0xb5, 0xaf, 0xe9, 0xf3,
-	0xdd, 0xc7, 0x51, 0x4b, 0x65, 0x7f, 0x39, 0x23, 0x0d, 0x17,
-	0x3c, 0x26, 0x08, 0x12, 0x54, 0x4e, 0x60, 0x7a, 0xec, 0xf6,
-	0xd8, 0xc2, 0x84, 0x9e, 0xb0, 0xaa, 0xe6, 0xfc, 0xd2, 0xc8,
-	0x8e, 0x94, 0xba, 0xa0, 0x36, 0x2c, 0x02, 0x18, 0x5e, 0x44,
-	0x6a, 0x70, 0x5b, 0x41, 0x6f, 0x75, 0x33, 0x29, 0x07, 0x1d,
-	0x8b, 0x91, 0xbf, 0xa5, 0xe3, 0xf9, 0xd7, 0xcd, 0x4f, 0x55,
-	0x7b, 0x61, 0x27, 0x3d, 0x13, 0x09, 0x9f, 0x85, 0xab, 0xb1,
-	0xf7, 0xed, 0xc3, 0xd9, 0xf2, 0xe8, 0xc6, 0xdc, 0x9a, 0x80,
-	0xae, 0xb4, 0x22, 0x38, 0x16, 0x0c, 0x4a, 0x50, 0x7e, 0x64,
-	0x28, 0x32, 0x1c, 0x06, 0x40, 0x5a, 0x74, 0x6e, 0xf8, 0xe2,
-	0xcc, 0xd6, 0x90, 0x8a, 0xa4, 0xbe, 0x95, 0x8f, 0xa1, 0xbb,
-	0xfd, 0xe7, 0xc9, 0xd3, 0x45, 0x5f, 0x71, 0x6b, 0x2d, 0x37,
-	0x19, 0x03, 0x00, 0x1b, 0x36, 0x2d, 0x6c, 0x77, 0x5a, 0x41,
-	0xd8, 0xc3, 0xee, 0xf5, 0xb4, 0xaf, 0x82, 0x99, 0xad, 0xb6,
-	0x9b, 0x80, 0xc1, 0xda, 0xf7, 0xec, 0x75, 0x6e, 0x43, 0x58,
-	0x19, 0x02, 0x2f, 0x34, 0x47, 0x5c, 0x71, 0x6a, 0x2b, 0x30,
-	0x1d, 0x06, 0x9f, 0x84, 0xa9, 0xb2, 0xf3, 0xe8, 0xc5, 0xde,
-	0xea, 0xf1, 0xdc, 0xc7, 0x86, 0x9d, 0xb0, 0xab, 0x32, 0x29,
-	0x04, 0x1f, 0x5e, 0x45, 0x68, 0x73, 0x8e, 0x95, 0xb8, 0xa3,
-	0xe2, 0xf9, 0xd4, 0xcf, 0x56, 0x4d, 0x60, 0x7b, 0x3a, 0x21,
-	0x0c, 0x17, 0x23, 0x38, 0x15, 0x0e, 0x4f, 0x54, 0x79, 0x62,
-	0xfb, 0xe0, 0xcd, 0xd6, 0x97, 0x8c, 0xa1, 0xba, 0xc9, 0xd2,
-	0xff, 0xe4, 0xa5, 0xbe, 0x93, 0x88, 0x11, 0x0a, 0x27, 0x3c,
-	0x7d, 0x66, 0x4b, 0x50, 0x64, 0x7f, 0x52, 0x49, 0x08, 0x13,
-	0x3e, 0x25, 0xbc, 0xa7, 0x8a, 0x91, 0xd0, 0xcb, 0xe6, 0xfd,
-	0x01, 0x1a, 0x37, 0x2c, 0x6d, 0x76, 0x5b, 0x40, 0xd9, 0xc2,
-	0xef, 0xf4, 0xb5, 0xae, 0x83, 0x98, 0xac, 0xb7, 0x9a, 0x81,
-	0xc0, 0xdb, 0xf6, 0xed, 0x74, 0x6f, 0x42, 0x59, 0x18, 0x03,
-	0x2e, 0x35, 0x46, 0x5d, 0x70, 0x6b, 0x2a, 0x31, 0x1c, 0x07,
-	0x9e, 0x85, 0xa8, 0xb3, 0xf2, 0xe9, 0xc4, 0xdf, 0xeb, 0xf0,
-	0xdd, 0xc6, 0x87, 0x9c, 0xb1, 0xaa, 0x33, 0x28, 0x05, 0x1e,
-	0x5f, 0x44, 0x69, 0x72, 0x8f, 0x94, 0xb9, 0xa2, 0xe3, 0xf8,
-	0xd5, 0xce, 0x57, 0x4c, 0x61, 0x7a, 0x3b, 0x20, 0x0d, 0x16,
-	0x22, 0x39, 0x14, 0x0f, 0x4e, 0x55, 0x78, 0x63, 0xfa, 0xe1,
-	0xcc, 0xd7, 0x96, 0x8d, 0xa0, 0xbb, 0xc8, 0xd3, 0xfe, 0xe5,
-	0xa4, 0xbf, 0x92, 0x89, 0x10, 0x0b, 0x26, 0x3d, 0x7c, 0x67,
-	0x4a, 0x51, 0x65, 0x7e, 0x53, 0x48, 0x09, 0x12, 0x3f, 0x24,
-	0xbd, 0xa6, 0x8b, 0x90, 0xd1, 0xca, 0xe7, 0xfc, 0x00, 0x1c,
-	0x38, 0x24, 0x70, 0x6c, 0x48, 0x54, 0xe0, 0xfc, 0xd8, 0xc4,
-	0x90, 0x8c, 0xa8, 0xb4, 0xdd, 0xc1, 0xe5, 0xf9, 0xad, 0xb1,
-	0x95, 0x89, 0x3d, 0x21, 0x05, 0x19, 0x4d, 0x51, 0x75, 0x69,
-	0xa7, 0xbb, 0x9f, 0x83, 0xd7, 0xcb, 0xef, 0xf3, 0x47, 0x5b,
-	0x7f, 0x63, 0x37, 0x2b, 0x0f, 0x13, 0x7a, 0x66, 0x42, 0x5e,
-	0x0a, 0x16, 0x32, 0x2e, 0x9a, 0x86, 0xa2, 0xbe, 0xea, 0xf6,
-	0xd2, 0xce, 0x53, 0x4f, 0x6b, 0x77, 0x23, 0x3f, 0x1b, 0x07,
-	0xb3, 0xaf, 0x8b, 0x97, 0xc3, 0xdf, 0xfb, 0xe7, 0x8e, 0x92,
-	0xb6, 0xaa, 0xfe, 0xe2, 0xc6, 0xda, 0x6e, 0x72, 0x56, 0x4a,
-	0x1e, 0x02, 0x26, 0x3a, 0xf4, 0xe8, 0xcc, 0xd0, 0x84, 0x98,
-	0xbc, 0xa0, 0x14, 0x08, 0x2c, 0x30, 0x64, 0x78, 0x5c, 0x40,
-	0x29, 0x35, 0x11, 0x0d, 0x59, 0x45, 0x61, 0x7d, 0xc9, 0xd5,
-	0xf1, 0xed, 0xb9, 0xa5, 0x81, 0x9d, 0xa6, 0xba, 0x9e, 0x82,
-	0xd6, 0xca, 0xee, 0xf2, 0x46, 0x5a, 0x7e, 0x62, 0x36, 0x2a,
-	0x0e, 0x12, 0x7b, 0x67, 0x43, 0x5f, 0x0b, 0x17, 0x33, 0x2f,
-	0x9b, 0x87, 0xa3, 0xbf, 0xeb, 0xf7, 0xd3, 0xcf, 0x01, 0x1d,
-	0x39, 0x25, 0x71, 0x6d, 0x49, 0x55, 0xe1, 0xfd, 0xd9, 0xc5,
-	0x91, 0x8d, 0xa9, 0xb5, 0xdc, 0xc0, 0xe4, 0xf8, 0xac, 0xb0,
-	0x94, 0x88, 0x3c, 0x20, 0x04, 0x18, 0x4c, 0x50, 0x74, 0x68,
-	0xf5, 0xe9, 0xcd, 0xd1, 0x85, 0x99, 0xbd, 0xa1, 0x15, 0x09,
-	0x2d, 0x31, 0x65, 0x79, 0x5d, 0x41, 0x28, 0x34, 0x10, 0x0c,
-	0x58, 0x44, 0x60, 0x7c, 0xc8, 0xd4, 0xf0, 0xec, 0xb8, 0xa4,
-	0x80, 0x9c, 0x52, 0x4e, 0x6a, 0x76, 0x22, 0x3e, 0x1a, 0x06,
-	0xb2, 0xae, 0x8a, 0x96, 0xc2, 0xde, 0xfa, 0xe6, 0x8f, 0x93,
-	0xb7, 0xab, 0xff, 0xe3, 0xc7, 0xdb, 0x6f, 0x73, 0x57, 0x4b,
-	0x1f, 0x03, 0x27, 0x3b, 0x00, 0x1d, 0x3a, 0x27, 0x74, 0x69,
-	0x4e, 0x53, 0xe8, 0xf5, 0xd2, 0xcf, 0x9c, 0x81, 0xa6, 0xbb,
-	0xcd, 0xd0, 0xf7, 0xea, 0xb9, 0xa4, 0x83, 0x9e, 0x25, 0x38,
-	0x1f, 0x02, 0x51, 0x4c, 0x6b, 0x76, 0x87, 0x9a, 0xbd, 0xa0,
-	0xf3, 0xee, 0xc9, 0xd4, 0x6f, 0x72, 0x55, 0x48, 0x1b, 0x06,
-	0x21, 0x3c, 0x4a, 0x57, 0x70, 0x6d, 0x3e, 0x23, 0x04, 0x19,
-	0xa2, 0xbf, 0x98, 0x85, 0xd6, 0xcb, 0xec, 0xf1, 0x13, 0x0e,
-	0x29, 0x34, 0x67, 0x7a, 0x5d, 0x40, 0xfb, 0xe6, 0xc1, 0xdc,
-	0x8f, 0x92, 0xb5, 0xa8, 0xde, 0xc3, 0xe4, 0xf9, 0xaa, 0xb7,
-	0x90, 0x8d, 0x36, 0x2b, 0x0c, 0x11, 0x42, 0x5f, 0x78, 0x65,
-	0x94, 0x89, 0xae, 0xb3, 0xe0, 0xfd, 0xda, 0xc7, 0x7c, 0x61,
-	0x46, 0x5b, 0x08, 0x15, 0x32, 0x2f, 0x59, 0x44, 0x63, 0x7e,
-	0x2d, 0x30, 0x17, 0x0a, 0xb1, 0xac, 0x8b, 0x96, 0xc5, 0xd8,
-	0xff, 0xe2, 0x26, 0x3b, 0x1c, 0x01, 0x52, 0x4f, 0x68, 0x75,
-	0xce, 0xd3, 0xf4, 0xe9, 0xba, 0xa7, 0x80, 0x9d, 0xeb, 0xf6,
-	0xd1, 0xcc, 0x9f, 0x82, 0xa5, 0xb8, 0x03, 0x1e, 0x39, 0x24,
-	0x77, 0x6a, 0x4d, 0x50, 0xa1, 0xbc, 0x9b, 0x86, 0xd5, 0xc8,
-	0xef, 0xf2, 0x49, 0x54, 0x73, 0x6e, 0x3d, 0x20, 0x07, 0x1a,
-	0x6c, 0x71, 0x56, 0x4b, 0x18, 0x05, 0x22, 0x3f, 0x84, 0x99,
-	0xbe, 0xa3, 0xf0, 0xed, 0xca, 0xd7, 0x35, 0x28, 0x0f, 0x12,
-	0x41, 0x5c, 0x7b, 0x66, 0xdd, 0xc0, 0xe7, 0xfa, 0xa9, 0xb4,
-	0x93, 0x8e, 0xf8, 0xe5, 0xc2, 0xdf, 0x8c, 0x91, 0xb6, 0xab,
-	0x10, 0x0d, 0x2a, 0x37, 0x64, 0x79, 0x5e, 0x43, 0xb2, 0xaf,
-	0x88, 0x95, 0xc6, 0xdb, 0xfc, 0xe1, 0x5a, 0x47, 0x60, 0x7d,
-	0x2e, 0x33, 0x14, 0x09, 0x7f, 0x62, 0x45, 0x58, 0x0b, 0x16,
-	0x31, 0x2c, 0x97, 0x8a, 0xad, 0xb0, 0xe3, 0xfe, 0xd9, 0xc4,
-	0x00, 0x1e, 0x3c, 0x22, 0x78, 0x66, 0x44, 0x5a, 0xf0, 0xee,
-	0xcc, 0xd2, 0x88, 0x96, 0xb4, 0xaa, 0xfd, 0xe3, 0xc1, 0xdf,
-	0x85, 0x9b, 0xb9, 0xa7, 0x0d, 0x13, 0x31, 0x2f, 0x75, 0x6b,
-	0x49, 0x57, 0xe7, 0xf9, 0xdb, 0xc5, 0x9f, 0x81, 0xa3, 0xbd,
-	0x17, 0x09, 0x2b, 0x35, 0x6f, 0x71, 0x53, 0x4d, 0x1a, 0x04,
-	0x26, 0x38, 0x62, 0x7c, 0x5e, 0x40, 0xea, 0xf4, 0xd6, 0xc8,
-	0x92, 0x8c, 0xae, 0xb0, 0xd3, 0xcd, 0xef, 0xf1, 0xab, 0xb5,
-	0x97, 0x89, 0x23, 0x3d, 0x1f, 0x01, 0x5b, 0x45, 0x67, 0x79,
-	0x2e, 0x30, 0x12, 0x0c, 0x56, 0x48, 0x6a, 0x74, 0xde, 0xc0,
-	0xe2, 0xfc, 0xa6, 0xb8, 0x9a, 0x84, 0x34, 0x2a, 0x08, 0x16,
-	0x4c, 0x52, 0x70, 0x6e, 0xc4, 0xda, 0xf8, 0xe6, 0xbc, 0xa2,
-	0x80, 0x9e, 0xc9, 0xd7, 0xf5, 0xeb, 0xb1, 0xaf, 0x8d, 0x93,
-	0x39, 0x27, 0x05, 0x1b, 0x41, 0x5f, 0x7d, 0x63, 0xbb, 0xa5,
-	0x87, 0x99, 0xc3, 0xdd, 0xff, 0xe1, 0x4b, 0x55, 0x77, 0x69,
-	0x33, 0x2d, 0x0f, 0x11, 0x46, 0x58, 0x7a, 0x64, 0x3e, 0x20,
-	0x02, 0x1c, 0xb6, 0xa8, 0x8a, 0x94, 0xce, 0xd0, 0xf2, 0xec,
-	0x5c, 0x42, 0x60, 0x7e, 0x24, 0x3a, 0x18, 0x06, 0xac, 0xb2,
-	0x90, 0x8e, 0xd4, 0xca, 0xe8, 0xf6, 0xa1, 0xbf, 0x9d, 0x83,
-	0xd9, 0xc7, 0xe5, 0xfb, 0x51, 0x4f, 0x6d, 0x73, 0x29, 0x37,
-	0x15, 0x0b, 0x68, 0x76, 0x54, 0x4a, 0x10, 0x0e, 0x2c, 0x32,
-	0x98, 0x86, 0xa4, 0xba, 0xe0, 0xfe, 0xdc, 0xc2, 0x95, 0x8b,
-	0xa9, 0xb7, 0xed, 0xf3, 0xd1, 0xcf, 0x65, 0x7b, 0x59, 0x47,
-	0x1d, 0x03, 0x21, 0x3f, 0x8f, 0x91, 0xb3, 0xad, 0xf7, 0xe9,
-	0xcb, 0xd5, 0x7f, 0x61, 0x43, 0x5d, 0x07, 0x19, 0x3b, 0x25,
-	0x72, 0x6c, 0x4e, 0x50, 0x0a, 0x14, 0x36, 0x28, 0x82, 0x9c,
-	0xbe, 0xa0, 0xfa, 0xe4, 0xc6, 0xd8, 0x00, 0x1f, 0x3e, 0x21,
-	0x7c, 0x63, 0x42, 0x5d, 0xf8, 0xe7, 0xc6, 0xd9, 0x84, 0x9b,
-	0xba, 0xa5, 0xed, 0xf2, 0xd3, 0xcc, 0x91, 0x8e, 0xaf, 0xb0,
-	0x15, 0x0a, 0x2b, 0x34, 0x69, 0x76, 0x57, 0x48, 0xc7, 0xd8,
-	0xf9, 0xe6, 0xbb, 0xa4, 0x85, 0x9a, 0x3f, 0x20, 0x01, 0x1e,
-	0x43, 0x5c, 0x7d, 0x62, 0x2a, 0x35, 0x14, 0x0b, 0x56, 0x49,
-	0x68, 0x77, 0xd2, 0xcd, 0xec, 0xf3, 0xae, 0xb1, 0x90, 0x8f,
-	0x93, 0x8c, 0xad, 0xb2, 0xef, 0xf0, 0xd1, 0xce, 0x6b, 0x74,
-	0x55, 0x4a, 0x17, 0x08, 0x29, 0x36, 0x7e, 0x61, 0x40, 0x5f,
-	0x02, 0x1d, 0x3c, 0x23, 0x86, 0x99, 0xb8, 0xa7, 0xfa, 0xe5,
-	0xc4, 0xdb, 0x54, 0x4b, 0x6a, 0x75, 0x28, 0x37, 0x16, 0x09,
-	0xac, 0xb3, 0x92, 0x8d, 0xd0, 0xcf, 0xee, 0xf1, 0xb9, 0xa6,
-	0x87, 0x98, 0xc5, 0xda, 0xfb, 0xe4, 0x41, 0x5e, 0x7f, 0x60,
-	0x3d, 0x22, 0x03, 0x1c, 0x3b, 0x24, 0x05, 0x1a, 0x47, 0x58,
-	0x79, 0x66, 0xc3, 0xdc, 0xfd, 0xe2, 0xbf, 0xa0, 0x81, 0x9e,
-	0xd6, 0xc9, 0xe8, 0xf7, 0xaa, 0xb5, 0x94, 0x8b, 0x2e, 0x31,
-	0x10, 0x0f, 0x52, 0x4d, 0x6c, 0x73, 0xfc, 0xe3, 0xc2, 0xdd,
-	0x80, 0x9f, 0xbe, 0xa1, 0x04, 0x1b, 0x3a, 0x25, 0x78, 0x67,
-	0x46, 0x59, 0x11, 0x0e, 0x2f, 0x30, 0x6d, 0x72, 0x53, 0x4c,
-	0xe9, 0xf6, 0xd7, 0xc8, 0x95, 0x8a, 0xab, 0xb4, 0xa8, 0xb7,
-	0x96, 0x89, 0xd4, 0xcb, 0xea, 0xf5, 0x50, 0x4f, 0x6e, 0x71,
-	0x2c, 0x33, 0x12, 0x0d, 0x45, 0x5a, 0x7b, 0x64, 0x39, 0x26,
-	0x07, 0x18, 0xbd, 0xa2, 0x83, 0x9c, 0xc1, 0xde, 0xff, 0xe0,
-	0x6f, 0x70, 0x51, 0x4e, 0x13, 0x0c, 0x2d, 0x32, 0x97, 0x88,
-	0xa9, 0xb6, 0xeb, 0xf4, 0xd5, 0xca, 0x82, 0x9d, 0xbc, 0xa3,
-	0xfe, 0xe1, 0xc0, 0xdf, 0x7a, 0x65, 0x44, 0x5b, 0x06, 0x19,
-	0x38, 0x27, 0x00, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0, 0xe0,
-	0x1d, 0x3d, 0x5d, 0x7d, 0x9d, 0xbd, 0xdd, 0xfd, 0x3a, 0x1a,
-	0x7a, 0x5a, 0xba, 0x9a, 0xfa, 0xda, 0x27, 0x07, 0x67, 0x47,
-	0xa7, 0x87, 0xe7, 0xc7, 0x74, 0x54, 0x34, 0x14, 0xf4, 0xd4,
-	0xb4, 0x94, 0x69, 0x49, 0x29, 0x09, 0xe9, 0xc9, 0xa9, 0x89,
-	0x4e, 0x6e, 0x0e, 0x2e, 0xce, 0xee, 0x8e, 0xae, 0x53, 0x73,
-	0x13, 0x33, 0xd3, 0xf3, 0x93, 0xb3, 0xe8, 0xc8, 0xa8, 0x88,
-	0x68, 0x48, 0x28, 0x08, 0xf5, 0xd5, 0xb5, 0x95, 0x75, 0x55,
-	0x35, 0x15, 0xd2, 0xf2, 0x92, 0xb2, 0x52, 0x72, 0x12, 0x32,
-	0xcf, 0xef, 0x8f, 0xaf, 0x4f, 0x6f, 0x0f, 0x2f, 0x9c, 0xbc,
-	0xdc, 0xfc, 0x1c, 0x3c, 0x5c, 0x7c, 0x81, 0xa1, 0xc1, 0xe1,
-	0x01, 0x21, 0x41, 0x61, 0xa6, 0x86, 0xe6, 0xc6, 0x26, 0x06,
-	0x66, 0x46, 0xbb, 0x9b, 0xfb, 0xdb, 0x3b, 0x1b, 0x7b, 0x5b,
-	0xcd, 0xed, 0x8d, 0xad, 0x4d, 0x6d, 0x0d, 0x2d, 0xd0, 0xf0,
-	0x90, 0xb0, 0x50, 0x70, 0x10, 0x30, 0xf7, 0xd7, 0xb7, 0x97,
-	0x77, 0x57, 0x37, 0x17, 0xea, 0xca, 0xaa, 0x8a, 0x6a, 0x4a,
-	0x2a, 0x0a, 0xb9, 0x99, 0xf9, 0xd9, 0x39, 0x19, 0x79, 0x59,
-	0xa4, 0x84, 0xe4, 0xc4, 0x24, 0x04, 0x64, 0x44, 0x83, 0xa3,
-	0xc3, 0xe3, 0x03, 0x23, 0x43, 0x63, 0x9e, 0xbe, 0xde, 0xfe,
-	0x1e, 0x3e, 0x5e, 0x7e, 0x25, 0x05, 0x65, 0x45, 0xa5, 0x85,
-	0xe5, 0xc5, 0x38, 0x18, 0x78, 0x58, 0xb8, 0x98, 0xf8, 0xd8,
-	0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0xbf, 0xdf, 0xff, 0x02, 0x22,
-	0x42, 0x62, 0x82, 0xa2, 0xc2, 0xe2, 0x51, 0x71, 0x11, 0x31,
-	0xd1, 0xf1, 0x91, 0xb1, 0x4c, 0x6c, 0x0c, 0x2c, 0xcc, 0xec,
-	0x8c, 0xac, 0x6b, 0x4b, 0x2b, 0x0b, 0xeb, 0xcb, 0xab, 0x8b,
-	0x76, 0x56, 0x36, 0x16, 0xf6, 0xd6, 0xb6, 0x96, 0x00, 0x21,
-	0x42, 0x63, 0x84, 0xa5, 0xc6, 0xe7, 0x15, 0x34, 0x57, 0x76,
-	0x91, 0xb0, 0xd3, 0xf2, 0x2a, 0x0b, 0x68, 0x49, 0xae, 0x8f,
-	0xec, 0xcd, 0x3f, 0x1e, 0x7d, 0x5c, 0xbb, 0x9a, 0xf9, 0xd8,
-	0x54, 0x75, 0x16, 0x37, 0xd0, 0xf1, 0x92, 0xb3, 0x41, 0x60,
-	0x03, 0x22, 0xc5, 0xe4, 0x87, 0xa6, 0x7e, 0x5f, 0x3c, 0x1d,
-	0xfa, 0xdb, 0xb8, 0x99, 0x6b, 0x4a, 0x29, 0x08, 0xef, 0xce,
-	0xad, 0x8c, 0xa8, 0x89, 0xea, 0xcb, 0x2c, 0x0d, 0x6e, 0x4f,
-	0xbd, 0x9c, 0xff, 0xde, 0x39, 0x18, 0x7b, 0x5a, 0x82, 0xa3,
-	0xc0, 0xe1, 0x06, 0x27, 0x44, 0x65, 0x97, 0xb6, 0xd5, 0xf4,
-	0x13, 0x32, 0x51, 0x70, 0xfc, 0xdd, 0xbe, 0x9f, 0x78, 0x59,
-	0x3a, 0x1b, 0xe9, 0xc8, 0xab, 0x8a, 0x6d, 0x4c, 0x2f, 0x0e,
-	0xd6, 0xf7, 0x94, 0xb5, 0x52, 0x73, 0x10, 0x31, 0xc3, 0xe2,
-	0x81, 0xa0, 0x47, 0x66, 0x05, 0x24, 0x4d, 0x6c, 0x0f, 0x2e,
-	0xc9, 0xe8, 0x8b, 0xaa, 0x58, 0x79, 0x1a, 0x3b, 0xdc, 0xfd,
-	0x9e, 0xbf, 0x67, 0x46, 0x25, 0x04, 0xe3, 0xc2, 0xa1, 0x80,
-	0x72, 0x53, 0x30, 0x11, 0xf6, 0xd7, 0xb4, 0x95, 0x19, 0x38,
-	0x5b, 0x7a, 0x9d, 0xbc, 0xdf, 0xfe, 0x0c, 0x2d, 0x4e, 0x6f,
-	0x88, 0xa9, 0xca, 0xeb, 0x33, 0x12, 0x71, 0x50, 0xb7, 0x96,
-	0xf5, 0xd4, 0x26, 0x07, 0x64, 0x45, 0xa2, 0x83, 0xe0, 0xc1,
-	0xe5, 0xc4, 0xa7, 0x86, 0x61, 0x40, 0x23, 0x02, 0xf0, 0xd1,
-	0xb2, 0x93, 0x74, 0x55, 0x36, 0x17, 0xcf, 0xee, 0x8d, 0xac,
-	0x4b, 0x6a, 0x09, 0x28, 0xda, 0xfb, 0x98, 0xb9, 0x5e, 0x7f,
-	0x1c, 0x3d, 0xb1, 0x90, 0xf3, 0xd2, 0x35, 0x14, 0x77, 0x56,
-	0xa4, 0x85, 0xe6, 0xc7, 0x20, 0x01, 0x62, 0x43, 0x9b, 0xba,
-	0xd9, 0xf8, 0x1f, 0x3e, 0x5d, 0x7c, 0x8e, 0xaf, 0xcc, 0xed,
-	0x0a, 0x2b, 0x48, 0x69, 0x00, 0x22, 0x44, 0x66, 0x88, 0xaa,
-	0xcc, 0xee, 0x0d, 0x2f, 0x49, 0x6b, 0x85, 0xa7, 0xc1, 0xe3,
-	0x1a, 0x38, 0x5e, 0x7c, 0x92, 0xb0, 0xd6, 0xf4, 0x17, 0x35,
-	0x53, 0x71, 0x9f, 0xbd, 0xdb, 0xf9, 0x34, 0x16, 0x70, 0x52,
-	0xbc, 0x9e, 0xf8, 0xda, 0x39, 0x1b, 0x7d, 0x5f, 0xb1, 0x93,
-	0xf5, 0xd7, 0x2e, 0x0c, 0x6a, 0x48, 0xa6, 0x84, 0xe2, 0xc0,
-	0x23, 0x01, 0x67, 0x45, 0xab, 0x89, 0xef, 0xcd, 0x68, 0x4a,
-	0x2c, 0x0e, 0xe0, 0xc2, 0xa4, 0x86, 0x65, 0x47, 0x21, 0x03,
-	0xed, 0xcf, 0xa9, 0x8b, 0x72, 0x50, 0x36, 0x14, 0xfa, 0xd8,
-	0xbe, 0x9c, 0x7f, 0x5d, 0x3b, 0x19, 0xf7, 0xd5, 0xb3, 0x91,
-	0x5c, 0x7e, 0x18, 0x3a, 0xd4, 0xf6, 0x90, 0xb2, 0x51, 0x73,
-	0x15, 0x37, 0xd9, 0xfb, 0x9d, 0xbf, 0x46, 0x64, 0x02, 0x20,
-	0xce, 0xec, 0x8a, 0xa8, 0x4b, 0x69, 0x0f, 0x2d, 0xc3, 0xe1,
-	0x87, 0xa5, 0xd0, 0xf2, 0x94, 0xb6, 0x58, 0x7a, 0x1c, 0x3e,
-	0xdd, 0xff, 0x99, 0xbb, 0x55, 0x77, 0x11, 0x33, 0xca, 0xe8,
-	0x8e, 0xac, 0x42, 0x60, 0x06, 0x24, 0xc7, 0xe5, 0x83, 0xa1,
-	0x4f, 0x6d, 0x0b, 0x29, 0xe4, 0xc6, 0xa0, 0x82, 0x6c, 0x4e,
-	0x28, 0x0a, 0xe9, 0xcb, 0xad, 0x8f, 0x61, 0x43, 0x25, 0x07,
-	0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, 0xf3, 0xd1,
-	0xb7, 0x95, 0x7b, 0x59, 0x3f, 0x1d, 0xb8, 0x9a, 0xfc, 0xde,
-	0x30, 0x12, 0x74, 0x56, 0xb5, 0x97, 0xf1, 0xd3, 0x3d, 0x1f,
-	0x79, 0x5b, 0xa2, 0x80, 0xe6, 0xc4, 0x2a, 0x08, 0x6e, 0x4c,
-	0xaf, 0x8d, 0xeb, 0xc9, 0x27, 0x05, 0x63, 0x41, 0x8c, 0xae,
-	0xc8, 0xea, 0x04, 0x26, 0x40, 0x62, 0x81, 0xa3, 0xc5, 0xe7,
-	0x09, 0x2b, 0x4d, 0x6f, 0x96, 0xb4, 0xd2, 0xf0, 0x1e, 0x3c,
-	0x5a, 0x78, 0x9b, 0xb9, 0xdf, 0xfd, 0x13, 0x31, 0x57, 0x75,
-	0x00, 0x23, 0x46, 0x65, 0x8c, 0xaf, 0xca, 0xe9, 0x05, 0x26,
-	0x43, 0x60, 0x89, 0xaa, 0xcf, 0xec, 0x0a, 0x29, 0x4c, 0x6f,
-	0x86, 0xa5, 0xc0, 0xe3, 0x0f, 0x2c, 0x49, 0x6a, 0x83, 0xa0,
-	0xc5, 0xe6, 0x14, 0x37, 0x52, 0x71, 0x98, 0xbb, 0xde, 0xfd,
-	0x11, 0x32, 0x57, 0x74, 0x9d, 0xbe, 0xdb, 0xf8, 0x1e, 0x3d,
-	0x58, 0x7b, 0x92, 0xb1, 0xd4, 0xf7, 0x1b, 0x38, 0x5d, 0x7e,
-	0x97, 0xb4, 0xd1, 0xf2, 0x28, 0x0b, 0x6e, 0x4d, 0xa4, 0x87,
-	0xe2, 0xc1, 0x2d, 0x0e, 0x6b, 0x48, 0xa1, 0x82, 0xe7, 0xc4,
-	0x22, 0x01, 0x64, 0x47, 0xae, 0x8d, 0xe8, 0xcb, 0x27, 0x04,
-	0x61, 0x42, 0xab, 0x88, 0xed, 0xce, 0x3c, 0x1f, 0x7a, 0x59,
-	0xb0, 0x93, 0xf6, 0xd5, 0x39, 0x1a, 0x7f, 0x5c, 0xb5, 0x96,
-	0xf3, 0xd0, 0x36, 0x15, 0x70, 0x53, 0xba, 0x99, 0xfc, 0xdf,
-	0x33, 0x10, 0x75, 0x56, 0xbf, 0x9c, 0xf9, 0xda, 0x50, 0x73,
-	0x16, 0x35, 0xdc, 0xff, 0x9a, 0xb9, 0x55, 0x76, 0x13, 0x30,
-	0xd9, 0xfa, 0x9f, 0xbc, 0x5a, 0x79, 0x1c, 0x3f, 0xd6, 0xf5,
-	0x90, 0xb3, 0x5f, 0x7c, 0x19, 0x3a, 0xd3, 0xf0, 0x95, 0xb6,
-	0x44, 0x67, 0x02, 0x21, 0xc8, 0xeb, 0x8e, 0xad, 0x41, 0x62,
-	0x07, 0x24, 0xcd, 0xee, 0x8b, 0xa8, 0x4e, 0x6d, 0x08, 0x2b,
-	0xc2, 0xe1, 0x84, 0xa7, 0x4b, 0x68, 0x0d, 0x2e, 0xc7, 0xe4,
-	0x81, 0xa2, 0x78, 0x5b, 0x3e, 0x1d, 0xf4, 0xd7, 0xb2, 0x91,
-	0x7d, 0x5e, 0x3b, 0x18, 0xf1, 0xd2, 0xb7, 0x94, 0x72, 0x51,
-	0x34, 0x17, 0xfe, 0xdd, 0xb8, 0x9b, 0x77, 0x54, 0x31, 0x12,
-	0xfb, 0xd8, 0xbd, 0x9e, 0x6c, 0x4f, 0x2a, 0x09, 0xe0, 0xc3,
-	0xa6, 0x85, 0x69, 0x4a, 0x2f, 0x0c, 0xe5, 0xc6, 0xa3, 0x80,
-	0x66, 0x45, 0x20, 0x03, 0xea, 0xc9, 0xac, 0x8f, 0x63, 0x40,
-	0x25, 0x06, 0xef, 0xcc, 0xa9, 0x8a, 0x00, 0x24, 0x48, 0x6c,
-	0x90, 0xb4, 0xd8, 0xfc, 0x3d, 0x19, 0x75, 0x51, 0xad, 0x89,
-	0xe5, 0xc1, 0x7a, 0x5e, 0x32, 0x16, 0xea, 0xce, 0xa2, 0x86,
-	0x47, 0x63, 0x0f, 0x2b, 0xd7, 0xf3, 0x9f, 0xbb, 0xf4, 0xd0,
-	0xbc, 0x98, 0x64, 0x40, 0x2c, 0x08, 0xc9, 0xed, 0x81, 0xa5,
-	0x59, 0x7d, 0x11, 0x35, 0x8e, 0xaa, 0xc6, 0xe2, 0x1e, 0x3a,
-	0x56, 0x72, 0xb3, 0x97, 0xfb, 0xdf, 0x23, 0x07, 0x6b, 0x4f,
-	0xf5, 0xd1, 0xbd, 0x99, 0x65, 0x41, 0x2d, 0x09, 0xc8, 0xec,
-	0x80, 0xa4, 0x58, 0x7c, 0x10, 0x34, 0x8f, 0xab, 0xc7, 0xe3,
-	0x1f, 0x3b, 0x57, 0x73, 0xb2, 0x96, 0xfa, 0xde, 0x22, 0x06,
-	0x6a, 0x4e, 0x01, 0x25, 0x49, 0x6d, 0x91, 0xb5, 0xd9, 0xfd,
-	0x3c, 0x18, 0x74, 0x50, 0xac, 0x88, 0xe4, 0xc0, 0x7b, 0x5f,
-	0x33, 0x17, 0xeb, 0xcf, 0xa3, 0x87, 0x46, 0x62, 0x0e, 0x2a,
-	0xd6, 0xf2, 0x9e, 0xba, 0xf7, 0xd3, 0xbf, 0x9b, 0x67, 0x43,
-	0x2f, 0x0b, 0xca, 0xee, 0x82, 0xa6, 0x5a, 0x7e, 0x12, 0x36,
-	0x8d, 0xa9, 0xc5, 0xe1, 0x1d, 0x39, 0x55, 0x71, 0xb0, 0x94,
-	0xf8, 0xdc, 0x20, 0x04, 0x68, 0x4c, 0x03, 0x27, 0x4b, 0x6f,
-	0x93, 0xb7, 0xdb, 0xff, 0x3e, 0x1a, 0x76, 0x52, 0xae, 0x8a,
-	0xe6, 0xc2, 0x79, 0x5d, 0x31, 0x15, 0xe9, 0xcd, 0xa1, 0x85,
-	0x44, 0x60, 0x0c, 0x28, 0xd4, 0xf0, 0x9c, 0xb8, 0x02, 0x26,
-	0x4a, 0x6e, 0x92, 0xb6, 0xda, 0xfe, 0x3f, 0x1b, 0x77, 0x53,
-	0xaf, 0x8b, 0xe7, 0xc3, 0x78, 0x5c, 0x30, 0x14, 0xe8, 0xcc,
-	0xa0, 0x84, 0x45, 0x61, 0x0d, 0x29, 0xd5, 0xf1, 0x9d, 0xb9,
-	0xf6, 0xd2, 0xbe, 0x9a, 0x66, 0x42, 0x2e, 0x0a, 0xcb, 0xef,
-	0x83, 0xa7, 0x5b, 0x7f, 0x13, 0x37, 0x8c, 0xa8, 0xc4, 0xe0,
-	0x1c, 0x38, 0x54, 0x70, 0xb1, 0x95, 0xf9, 0xdd, 0x21, 0x05,
-	0x69, 0x4d, 0x00, 0x25, 0x4a, 0x6f, 0x94, 0xb1, 0xde, 0xfb,
-	0x35, 0x10, 0x7f, 0x5a, 0xa1, 0x84, 0xeb, 0xce, 0x6a, 0x4f,
-	0x20, 0x05, 0xfe, 0xdb, 0xb4, 0x91, 0x5f, 0x7a, 0x15, 0x30,
-	0xcb, 0xee, 0x81, 0xa4, 0xd4, 0xf1, 0x9e, 0xbb, 0x40, 0x65,
-	0x0a, 0x2f, 0xe1, 0xc4, 0xab, 0x8e, 0x75, 0x50, 0x3f, 0x1a,
-	0xbe, 0x9b, 0xf4, 0xd1, 0x2a, 0x0f, 0x60, 0x45, 0x8b, 0xae,
-	0xc1, 0xe4, 0x1f, 0x3a, 0x55, 0x70, 0xb5, 0x90, 0xff, 0xda,
-	0x21, 0x04, 0x6b, 0x4e, 0x80, 0xa5, 0xca, 0xef, 0x14, 0x31,
-	0x5e, 0x7b, 0xdf, 0xfa, 0x95, 0xb0, 0x4b, 0x6e, 0x01, 0x24,
-	0xea, 0xcf, 0xa0, 0x85, 0x7e, 0x5b, 0x34, 0x11, 0x61, 0x44,
-	0x2b, 0x0e, 0xf5, 0xd0, 0xbf, 0x9a, 0x54, 0x71, 0x1e, 0x3b,
-	0xc0, 0xe5, 0x8a, 0xaf, 0x0b, 0x2e, 0x41, 0x64, 0x9f, 0xba,
-	0xd5, 0xf0, 0x3e, 0x1b, 0x74, 0x51, 0xaa, 0x8f, 0xe0, 0xc5,
-	0x77, 0x52, 0x3d, 0x18, 0xe3, 0xc6, 0xa9, 0x8c, 0x42, 0x67,
-	0x08, 0x2d, 0xd6, 0xf3, 0x9c, 0xb9, 0x1d, 0x38, 0x57, 0x72,
-	0x89, 0xac, 0xc3, 0xe6, 0x28, 0x0d, 0x62, 0x47, 0xbc, 0x99,
-	0xf6, 0xd3, 0xa3, 0x86, 0xe9, 0xcc, 0x37, 0x12, 0x7d, 0x58,
-	0x96, 0xb3, 0xdc, 0xf9, 0x02, 0x27, 0x48, 0x6d, 0xc9, 0xec,
-	0x83, 0xa6, 0x5d, 0x78, 0x17, 0x32, 0xfc, 0xd9, 0xb6, 0x93,
-	0x68, 0x4d, 0x22, 0x07, 0xc2, 0xe7, 0x88, 0xad, 0x56, 0x73,
-	0x1c, 0x39, 0xf7, 0xd2, 0xbd, 0x98, 0x63, 0x46, 0x29, 0x0c,
-	0xa8, 0x8d, 0xe2, 0xc7, 0x3c, 0x19, 0x76, 0x53, 0x9d, 0xb8,
-	0xd7, 0xf2, 0x09, 0x2c, 0x43, 0x66, 0x16, 0x33, 0x5c, 0x79,
-	0x82, 0xa7, 0xc8, 0xed, 0x23, 0x06, 0x69, 0x4c, 0xb7, 0x92,
-	0xfd, 0xd8, 0x7c, 0x59, 0x36, 0x13, 0xe8, 0xcd, 0xa2, 0x87,
-	0x49, 0x6c, 0x03, 0x26, 0xdd, 0xf8, 0x97, 0xb2, 0x00, 0x26,
-	0x4c, 0x6a, 0x98, 0xbe, 0xd4, 0xf2, 0x2d, 0x0b, 0x61, 0x47,
-	0xb5, 0x93, 0xf9, 0xdf, 0x5a, 0x7c, 0x16, 0x30, 0xc2, 0xe4,
-	0x8e, 0xa8, 0x77, 0x51, 0x3b, 0x1d, 0xef, 0xc9, 0xa3, 0x85,
-	0xb4, 0x92, 0xf8, 0xde, 0x2c, 0x0a, 0x60, 0x46, 0x99, 0xbf,
-	0xd5, 0xf3, 0x01, 0x27, 0x4d, 0x6b, 0xee, 0xc8, 0xa2, 0x84,
-	0x76, 0x50, 0x3a, 0x1c, 0xc3, 0xe5, 0x8f, 0xa9, 0x5b, 0x7d,
-	0x17, 0x31, 0x75, 0x53, 0x39, 0x1f, 0xed, 0xcb, 0xa1, 0x87,
-	0x58, 0x7e, 0x14, 0x32, 0xc0, 0xe6, 0x8c, 0xaa, 0x2f, 0x09,
-	0x63, 0x45, 0xb7, 0x91, 0xfb, 0xdd, 0x02, 0x24, 0x4e, 0x68,
-	0x9a, 0xbc, 0xd6, 0xf0, 0xc1, 0xe7, 0x8d, 0xab, 0x59, 0x7f,
-	0x15, 0x33, 0xec, 0xca, 0xa0, 0x86, 0x74, 0x52, 0x38, 0x1e,
-	0x9b, 0xbd, 0xd7, 0xf1, 0x03, 0x25, 0x4f, 0x69, 0xb6, 0x90,
-	0xfa, 0xdc, 0x2e, 0x08, 0x62, 0x44, 0xea, 0xcc, 0xa6, 0x80,
-	0x72, 0x54, 0x3e, 0x18, 0xc7, 0xe1, 0x8b, 0xad, 0x5f, 0x79,
-	0x13, 0x35, 0xb0, 0x96, 0xfc, 0xda, 0x28, 0x0e, 0x64, 0x42,
-	0x9d, 0xbb, 0xd1, 0xf7, 0x05, 0x23, 0x49, 0x6f, 0x5e, 0x78,
-	0x12, 0x34, 0xc6, 0xe0, 0x8a, 0xac, 0x73, 0x55, 0x3f, 0x19,
-	0xeb, 0xcd, 0xa7, 0x81, 0x04, 0x22, 0x48, 0x6e, 0x9c, 0xba,
-	0xd0, 0xf6, 0x29, 0x0f, 0x65, 0x43, 0xb1, 0x97, 0xfd, 0xdb,
-	0x9f, 0xb9, 0xd3, 0xf5, 0x07, 0x21, 0x4b, 0x6d, 0xb2, 0x94,
-	0xfe, 0xd8, 0x2a, 0x0c, 0x66, 0x40, 0xc5, 0xe3, 0x89, 0xaf,
-	0x5d, 0x7b, 0x11, 0x37, 0xe8, 0xce, 0xa4, 0x82, 0x70, 0x56,
-	0x3c, 0x1a, 0x2b, 0x0d, 0x67, 0x41, 0xb3, 0x95, 0xff, 0xd9,
-	0x06, 0x20, 0x4a, 0x6c, 0x9e, 0xb8, 0xd2, 0xf4, 0x71, 0x57,
-	0x3d, 0x1b, 0xe9, 0xcf, 0xa5, 0x83, 0x5c, 0x7a, 0x10, 0x36,
-	0xc4, 0xe2, 0x88, 0xae, 0x00, 0x27, 0x4e, 0x69, 0x9c, 0xbb,
-	0xd2, 0xf5, 0x25, 0x02, 0x6b, 0x4c, 0xb9, 0x9e, 0xf7, 0xd0,
-	0x4a, 0x6d, 0x04, 0x23, 0xd6, 0xf1, 0x98, 0xbf, 0x6f, 0x48,
-	0x21, 0x06, 0xf3, 0xd4, 0xbd, 0x9a, 0x94, 0xb3, 0xda, 0xfd,
-	0x08, 0x2f, 0x46, 0x61, 0xb1, 0x96, 0xff, 0xd8, 0x2d, 0x0a,
-	0x63, 0x44, 0xde, 0xf9, 0x90, 0xb7, 0x42, 0x65, 0x0c, 0x2b,
-	0xfb, 0xdc, 0xb5, 0x92, 0x67, 0x40, 0x29, 0x0e, 0x35, 0x12,
-	0x7b, 0x5c, 0xa9, 0x8e, 0xe7, 0xc0, 0x10, 0x37, 0x5e, 0x79,
-	0x8c, 0xab, 0xc2, 0xe5, 0x7f, 0x58, 0x31, 0x16, 0xe3, 0xc4,
-	0xad, 0x8a, 0x5a, 0x7d, 0x14, 0x33, 0xc6, 0xe1, 0x88, 0xaf,
-	0xa1, 0x86, 0xef, 0xc8, 0x3d, 0x1a, 0x73, 0x54, 0x84, 0xa3,
-	0xca, 0xed, 0x18, 0x3f, 0x56, 0x71, 0xeb, 0xcc, 0xa5, 0x82,
-	0x77, 0x50, 0x39, 0x1e, 0xce, 0xe9, 0x80, 0xa7, 0x52, 0x75,
-	0x1c, 0x3b, 0x6a, 0x4d, 0x24, 0x03, 0xf6, 0xd1, 0xb8, 0x9f,
-	0x4f, 0x68, 0x01, 0x26, 0xd3, 0xf4, 0x9d, 0xba, 0x20, 0x07,
-	0x6e, 0x49, 0xbc, 0x9b, 0xf2, 0xd5, 0x05, 0x22, 0x4b, 0x6c,
-	0x99, 0xbe, 0xd7, 0xf0, 0xfe, 0xd9, 0xb0, 0x97, 0x62, 0x45,
-	0x2c, 0x0b, 0xdb, 0xfc, 0x95, 0xb2, 0x47, 0x60, 0x09, 0x2e,
-	0xb4, 0x93, 0xfa, 0xdd, 0x28, 0x0f, 0x66, 0x41, 0x91, 0xb6,
-	0xdf, 0xf8, 0x0d, 0x2a, 0x43, 0x64, 0x5f, 0x78, 0x11, 0x36,
-	0xc3, 0xe4, 0x8d, 0xaa, 0x7a, 0x5d, 0x34, 0x13, 0xe6, 0xc1,
-	0xa8, 0x8f, 0x15, 0x32, 0x5b, 0x7c, 0x89, 0xae, 0xc7, 0xe0,
-	0x30, 0x17, 0x7e, 0x59, 0xac, 0x8b, 0xe2, 0xc5, 0xcb, 0xec,
-	0x85, 0xa2, 0x57, 0x70, 0x19, 0x3e, 0xee, 0xc9, 0xa0, 0x87,
-	0x72, 0x55, 0x3c, 0x1b, 0x81, 0xa6, 0xcf, 0xe8, 0x1d, 0x3a,
-	0x53, 0x74, 0xa4, 0x83, 0xea, 0xcd, 0x38, 0x1f, 0x76, 0x51,
-	0x00, 0x28, 0x50, 0x78, 0xa0, 0x88, 0xf0, 0xd8, 0x5d, 0x75,
-	0x0d, 0x25, 0xfd, 0xd5, 0xad, 0x85, 0xba, 0x92, 0xea, 0xc2,
-	0x1a, 0x32, 0x4a, 0x62, 0xe7, 0xcf, 0xb7, 0x9f, 0x47, 0x6f,
-	0x17, 0x3f, 0x69, 0x41, 0x39, 0x11, 0xc9, 0xe1, 0x99, 0xb1,
-	0x34, 0x1c, 0x64, 0x4c, 0x94, 0xbc, 0xc4, 0xec, 0xd3, 0xfb,
-	0x83, 0xab, 0x73, 0x5b, 0x23, 0x0b, 0x8e, 0xa6, 0xde, 0xf6,
-	0x2e, 0x06, 0x7e, 0x56, 0xd2, 0xfa, 0x82, 0xaa, 0x72, 0x5a,
-	0x22, 0x0a, 0x8f, 0xa7, 0xdf, 0xf7, 0x2f, 0x07, 0x7f, 0x57,
-	0x68, 0x40, 0x38, 0x10, 0xc8, 0xe0, 0x98, 0xb0, 0x35, 0x1d,
-	0x65, 0x4d, 0x95, 0xbd, 0xc5, 0xed, 0xbb, 0x93, 0xeb, 0xc3,
-	0x1b, 0x33, 0x4b, 0x63, 0xe6, 0xce, 0xb6, 0x9e, 0x46, 0x6e,
-	0x16, 0x3e, 0x01, 0x29, 0x51, 0x79, 0xa1, 0x89, 0xf1, 0xd9,
-	0x5c, 0x74, 0x0c, 0x24, 0xfc, 0xd4, 0xac, 0x84, 0xb9, 0x91,
-	0xe9, 0xc1, 0x19, 0x31, 0x49, 0x61, 0xe4, 0xcc, 0xb4, 0x9c,
-	0x44, 0x6c, 0x14, 0x3c, 0x03, 0x2b, 0x53, 0x7b, 0xa3, 0x8b,
-	0xf3, 0xdb, 0x5e, 0x76, 0x0e, 0x26, 0xfe, 0xd6, 0xae, 0x86,
-	0xd0, 0xf8, 0x80, 0xa8, 0x70, 0x58, 0x20, 0x08, 0x8d, 0xa5,
-	0xdd, 0xf5, 0x2d, 0x05, 0x7d, 0x55, 0x6a, 0x42, 0x3a, 0x12,
-	0xca, 0xe2, 0x9a, 0xb2, 0x37, 0x1f, 0x67, 0x4f, 0x97, 0xbf,
-	0xc7, 0xef, 0x6b, 0x43, 0x3b, 0x13, 0xcb, 0xe3, 0x9b, 0xb3,
-	0x36, 0x1e, 0x66, 0x4e, 0x96, 0xbe, 0xc6, 0xee, 0xd1, 0xf9,
-	0x81, 0xa9, 0x71, 0x59, 0x21, 0x09, 0x8c, 0xa4, 0xdc, 0xf4,
-	0x2c, 0x04, 0x7c, 0x54, 0x02, 0x2a, 0x52, 0x7a, 0xa2, 0x8a,
-	0xf2, 0xda, 0x5f, 0x77, 0x0f, 0x27, 0xff, 0xd7, 0xaf, 0x87,
-	0xb8, 0x90, 0xe8, 0xc0, 0x18, 0x30, 0x48, 0x60, 0xe5, 0xcd,
-	0xb5, 0x9d, 0x45, 0x6d, 0x15, 0x3d, 0x00, 0x29, 0x52, 0x7b,
-	0xa4, 0x8d, 0xf6, 0xdf, 0x55, 0x7c, 0x07, 0x2e, 0xf1, 0xd8,
-	0xa3, 0x8a, 0xaa, 0x83, 0xf8, 0xd1, 0x0e, 0x27, 0x5c, 0x75,
-	0xff, 0xd6, 0xad, 0x84, 0x5b, 0x72, 0x09, 0x20, 0x49, 0x60,
-	0x1b, 0x32, 0xed, 0xc4, 0xbf, 0x96, 0x1c, 0x35, 0x4e, 0x67,
-	0xb8, 0x91, 0xea, 0xc3, 0xe3, 0xca, 0xb1, 0x98, 0x47, 0x6e,
-	0x15, 0x3c, 0xb6, 0x9f, 0xe4, 0xcd, 0x12, 0x3b, 0x40, 0x69,
-	0x92, 0xbb, 0xc0, 0xe9, 0x36, 0x1f, 0x64, 0x4d, 0xc7, 0xee,
-	0x95, 0xbc, 0x63, 0x4a, 0x31, 0x18, 0x38, 0x11, 0x6a, 0x43,
-	0x9c, 0xb5, 0xce, 0xe7, 0x6d, 0x44, 0x3f, 0x16, 0xc9, 0xe0,
-	0x9b, 0xb2, 0xdb, 0xf2, 0x89, 0xa0, 0x7f, 0x56, 0x2d, 0x04,
-	0x8e, 0xa7, 0xdc, 0xf5, 0x2a, 0x03, 0x78, 0x51, 0x71, 0x58,
-	0x23, 0x0a, 0xd5, 0xfc, 0x87, 0xae, 0x24, 0x0d, 0x76, 0x5f,
-	0x80, 0xa9, 0xd2, 0xfb, 0x39, 0x10, 0x6b, 0x42, 0x9d, 0xb4,
-	0xcf, 0xe6, 0x6c, 0x45, 0x3e, 0x17, 0xc8, 0xe1, 0x9a, 0xb3,
-	0x93, 0xba, 0xc1, 0xe8, 0x37, 0x1e, 0x65, 0x4c, 0xc6, 0xef,
-	0x94, 0xbd, 0x62, 0x4b, 0x30, 0x19, 0x70, 0x59, 0x22, 0x0b,
-	0xd4, 0xfd, 0x86, 0xaf, 0x25, 0x0c, 0x77, 0x5e, 0x81, 0xa8,
-	0xd3, 0xfa, 0xda, 0xf3, 0x88, 0xa1, 0x7e, 0x57, 0x2c, 0x05,
-	0x8f, 0xa6, 0xdd, 0xf4, 0x2b, 0x02, 0x79, 0x50, 0xab, 0x82,
-	0xf9, 0xd0, 0x0f, 0x26, 0x5d, 0x74, 0xfe, 0xd7, 0xac, 0x85,
-	0x5a, 0x73, 0x08, 0x21, 0x01, 0x28, 0x53, 0x7a, 0xa5, 0x8c,
-	0xf7, 0xde, 0x54, 0x7d, 0x06, 0x2f, 0xf0, 0xd9, 0xa2, 0x8b,
-	0xe2, 0xcb, 0xb0, 0x99, 0x46, 0x6f, 0x14, 0x3d, 0xb7, 0x9e,
-	0xe5, 0xcc, 0x13, 0x3a, 0x41, 0x68, 0x48, 0x61, 0x1a, 0x33,
-	0xec, 0xc5, 0xbe, 0x97, 0x1d, 0x34, 0x4f, 0x66, 0xb9, 0x90,
-	0xeb, 0xc2, 0x00, 0x2a, 0x54, 0x7e, 0xa8, 0x82, 0xfc, 0xd6,
-	0x4d, 0x67, 0x19, 0x33, 0xe5, 0xcf, 0xb1, 0x9b, 0x9a, 0xb0,
-	0xce, 0xe4, 0x32, 0x18, 0x66, 0x4c, 0xd7, 0xfd, 0x83, 0xa9,
-	0x7f, 0x55, 0x2b, 0x01, 0x29, 0x03, 0x7d, 0x57, 0x81, 0xab,
-	0xd5, 0xff, 0x64, 0x4e, 0x30, 0x1a, 0xcc, 0xe6, 0x98, 0xb2,
-	0xb3, 0x99, 0xe7, 0xcd, 0x1b, 0x31, 0x4f, 0x65, 0xfe, 0xd4,
-	0xaa, 0x80, 0x56, 0x7c, 0x02, 0x28, 0x52, 0x78, 0x06, 0x2c,
-	0xfa, 0xd0, 0xae, 0x84, 0x1f, 0x35, 0x4b, 0x61, 0xb7, 0x9d,
-	0xe3, 0xc9, 0xc8, 0xe2, 0x9c, 0xb6, 0x60, 0x4a, 0x34, 0x1e,
-	0x85, 0xaf, 0xd1, 0xfb, 0x2d, 0x07, 0x79, 0x53, 0x7b, 0x51,
-	0x2f, 0x05, 0xd3, 0xf9, 0x87, 0xad, 0x36, 0x1c, 0x62, 0x48,
-	0x9e, 0xb4, 0xca, 0xe0, 0xe1, 0xcb, 0xb5, 0x9f, 0x49, 0x63,
-	0x1d, 0x37, 0xac, 0x86, 0xf8, 0xd2, 0x04, 0x2e, 0x50, 0x7a,
-	0xa4, 0x8e, 0xf0, 0xda, 0x0c, 0x26, 0x58, 0x72, 0xe9, 0xc3,
-	0xbd, 0x97, 0x41, 0x6b, 0x15, 0x3f, 0x3e, 0x14, 0x6a, 0x40,
-	0x96, 0xbc, 0xc2, 0xe8, 0x73, 0x59, 0x27, 0x0d, 0xdb, 0xf1,
-	0x8f, 0xa5, 0x8d, 0xa7, 0xd9, 0xf3, 0x25, 0x0f, 0x71, 0x5b,
-	0xc0, 0xea, 0x94, 0xbe, 0x68, 0x42, 0x3c, 0x16, 0x17, 0x3d,
-	0x43, 0x69, 0xbf, 0x95, 0xeb, 0xc1, 0x5a, 0x70, 0x0e, 0x24,
-	0xf2, 0xd8, 0xa6, 0x8c, 0xf6, 0xdc, 0xa2, 0x88, 0x5e, 0x74,
-	0x0a, 0x20, 0xbb, 0x91, 0xef, 0xc5, 0x13, 0x39, 0x47, 0x6d,
-	0x6c, 0x46, 0x38, 0x12, 0xc4, 0xee, 0x90, 0xba, 0x21, 0x0b,
-	0x75, 0x5f, 0x89, 0xa3, 0xdd, 0xf7, 0xdf, 0xf5, 0x8b, 0xa1,
-	0x77, 0x5d, 0x23, 0x09, 0x92, 0xb8, 0xc6, 0xec, 0x3a, 0x10,
-	0x6e, 0x44, 0x45, 0x6f, 0x11, 0x3b, 0xed, 0xc7, 0xb9, 0x93,
-	0x08, 0x22, 0x5c, 0x76, 0xa0, 0x8a, 0xf4, 0xde, 0x00, 0x2b,
-	0x56, 0x7d, 0xac, 0x87, 0xfa, 0xd1, 0x45, 0x6e, 0x13, 0x38,
-	0xe9, 0xc2, 0xbf, 0x94, 0x8a, 0xa1, 0xdc, 0xf7, 0x26, 0x0d,
-	0x70, 0x5b, 0xcf, 0xe4, 0x99, 0xb2, 0x63, 0x48, 0x35, 0x1e,
-	0x09, 0x22, 0x5f, 0x74, 0xa5, 0x8e, 0xf3, 0xd8, 0x4c, 0x67,
-	0x1a, 0x31, 0xe0, 0xcb, 0xb6, 0x9d, 0x83, 0xa8, 0xd5, 0xfe,
-	0x2f, 0x04, 0x79, 0x52, 0xc6, 0xed, 0x90, 0xbb, 0x6a, 0x41,
-	0x3c, 0x17, 0x12, 0x39, 0x44, 0x6f, 0xbe, 0x95, 0xe8, 0xc3,
-	0x57, 0x7c, 0x01, 0x2a, 0xfb, 0xd0, 0xad, 0x86, 0x98, 0xb3,
-	0xce, 0xe5, 0x34, 0x1f, 0x62, 0x49, 0xdd, 0xf6, 0x8b, 0xa0,
-	0x71, 0x5a, 0x27, 0x0c, 0x1b, 0x30, 0x4d, 0x66, 0xb7, 0x9c,
-	0xe1, 0xca, 0x5e, 0x75, 0x08, 0x23, 0xf2, 0xd9, 0xa4, 0x8f,
-	0x91, 0xba, 0xc7, 0xec, 0x3d, 0x16, 0x6b, 0x40, 0xd4, 0xff,
-	0x82, 0xa9, 0x78, 0x53, 0x2e, 0x05, 0x24, 0x0f, 0x72, 0x59,
-	0x88, 0xa3, 0xde, 0xf5, 0x61, 0x4a, 0x37, 0x1c, 0xcd, 0xe6,
-	0x9b, 0xb0, 0xae, 0x85, 0xf8, 0xd3, 0x02, 0x29, 0x54, 0x7f,
-	0xeb, 0xc0, 0xbd, 0x96, 0x47, 0x6c, 0x11, 0x3a, 0x2d, 0x06,
-	0x7b, 0x50, 0x81, 0xaa, 0xd7, 0xfc, 0x68, 0x43, 0x3e, 0x15,
-	0xc4, 0xef, 0x92, 0xb9, 0xa7, 0x8c, 0xf1, 0xda, 0x0b, 0x20,
-	0x5d, 0x76, 0xe2, 0xc9, 0xb4, 0x9f, 0x4e, 0x65, 0x18, 0x33,
-	0x36, 0x1d, 0x60, 0x4b, 0x9a, 0xb1, 0xcc, 0xe7, 0x73, 0x58,
-	0x25, 0x0e, 0xdf, 0xf4, 0x89, 0xa2, 0xbc, 0x97, 0xea, 0xc1,
-	0x10, 0x3b, 0x46, 0x6d, 0xf9, 0xd2, 0xaf, 0x84, 0x55, 0x7e,
-	0x03, 0x28, 0x3f, 0x14, 0x69, 0x42, 0x93, 0xb8, 0xc5, 0xee,
-	0x7a, 0x51, 0x2c, 0x07, 0xd6, 0xfd, 0x80, 0xab, 0xb5, 0x9e,
-	0xe3, 0xc8, 0x19, 0x32, 0x4f, 0x64, 0xf0, 0xdb, 0xa6, 0x8d,
-	0x5c, 0x77, 0x0a, 0x21, 0x00, 0x2c, 0x58, 0x74, 0xb0, 0x9c,
-	0xe8, 0xc4, 0x7d, 0x51, 0x25, 0x09, 0xcd, 0xe1, 0x95, 0xb9,
-	0xfa, 0xd6, 0xa2, 0x8e, 0x4a, 0x66, 0x12, 0x3e, 0x87, 0xab,
-	0xdf, 0xf3, 0x37, 0x1b, 0x6f, 0x43, 0xe9, 0xc5, 0xb1, 0x9d,
-	0x59, 0x75, 0x01, 0x2d, 0x94, 0xb8, 0xcc, 0xe0, 0x24, 0x08,
-	0x7c, 0x50, 0x13, 0x3f, 0x4b, 0x67, 0xa3, 0x8f, 0xfb, 0xd7,
-	0x6e, 0x42, 0x36, 0x1a, 0xde, 0xf2, 0x86, 0xaa, 0xcf, 0xe3,
-	0x97, 0xbb, 0x7f, 0x53, 0x27, 0x0b, 0xb2, 0x9e, 0xea, 0xc6,
-	0x02, 0x2e, 0x5a, 0x76, 0x35, 0x19, 0x6d, 0x41, 0x85, 0xa9,
-	0xdd, 0xf1, 0x48, 0x64, 0x10, 0x3c, 0xf8, 0xd4, 0xa0, 0x8c,
-	0x26, 0x0a, 0x7e, 0x52, 0x96, 0xba, 0xce, 0xe2, 0x5b, 0x77,
-	0x03, 0x2f, 0xeb, 0xc7, 0xb3, 0x9f, 0xdc, 0xf0, 0x84, 0xa8,
-	0x6c, 0x40, 0x34, 0x18, 0xa1, 0x8d, 0xf9, 0xd5, 0x11, 0x3d,
-	0x49, 0x65, 0x83, 0xaf, 0xdb, 0xf7, 0x33, 0x1f, 0x6b, 0x47,
-	0xfe, 0xd2, 0xa6, 0x8a, 0x4e, 0x62, 0x16, 0x3a, 0x79, 0x55,
-	0x21, 0x0d, 0xc9, 0xe5, 0x91, 0xbd, 0x04, 0x28, 0x5c, 0x70,
-	0xb4, 0x98, 0xec, 0xc0, 0x6a, 0x46, 0x32, 0x1e, 0xda, 0xf6,
-	0x82, 0xae, 0x17, 0x3b, 0x4f, 0x63, 0xa7, 0x8b, 0xff, 0xd3,
-	0x90, 0xbc, 0xc8, 0xe4, 0x20, 0x0c, 0x78, 0x54, 0xed, 0xc1,
-	0xb5, 0x99, 0x5d, 0x71, 0x05, 0x29, 0x4c, 0x60, 0x14, 0x38,
-	0xfc, 0xd0, 0xa4, 0x88, 0x31, 0x1d, 0x69, 0x45, 0x81, 0xad,
-	0xd9, 0xf5, 0xb6, 0x9a, 0xee, 0xc2, 0x06, 0x2a, 0x5e, 0x72,
-	0xcb, 0xe7, 0x93, 0xbf, 0x7b, 0x57, 0x23, 0x0f, 0xa5, 0x89,
-	0xfd, 0xd1, 0x15, 0x39, 0x4d, 0x61, 0xd8, 0xf4, 0x80, 0xac,
-	0x68, 0x44, 0x30, 0x1c, 0x5f, 0x73, 0x07, 0x2b, 0xef, 0xc3,
-	0xb7, 0x9b, 0x22, 0x0e, 0x7a, 0x56, 0x92, 0xbe, 0xca, 0xe6,
-	0x00, 0x2d, 0x5a, 0x77, 0xb4, 0x99, 0xee, 0xc3, 0x75, 0x58,
-	0x2f, 0x02, 0xc1, 0xec, 0x9b, 0xb6, 0xea, 0xc7, 0xb0, 0x9d,
-	0x5e, 0x73, 0x04, 0x29, 0x9f, 0xb2, 0xc5, 0xe8, 0x2b, 0x06,
-	0x71, 0x5c, 0xc9, 0xe4, 0x93, 0xbe, 0x7d, 0x50, 0x27, 0x0a,
-	0xbc, 0x91, 0xe6, 0xcb, 0x08, 0x25, 0x52, 0x7f, 0x23, 0x0e,
-	0x79, 0x54, 0x97, 0xba, 0xcd, 0xe0, 0x56, 0x7b, 0x0c, 0x21,
-	0xe2, 0xcf, 0xb8, 0x95, 0x8f, 0xa2, 0xd5, 0xf8, 0x3b, 0x16,
-	0x61, 0x4c, 0xfa, 0xd7, 0xa0, 0x8d, 0x4e, 0x63, 0x14, 0x39,
-	0x65, 0x48, 0x3f, 0x12, 0xd1, 0xfc, 0x8b, 0xa6, 0x10, 0x3d,
-	0x4a, 0x67, 0xa4, 0x89, 0xfe, 0xd3, 0x46, 0x6b, 0x1c, 0x31,
-	0xf2, 0xdf, 0xa8, 0x85, 0x33, 0x1e, 0x69, 0x44, 0x87, 0xaa,
-	0xdd, 0xf0, 0xac, 0x81, 0xf6, 0xdb, 0x18, 0x35, 0x42, 0x6f,
-	0xd9, 0xf4, 0x83, 0xae, 0x6d, 0x40, 0x37, 0x1a, 0x03, 0x2e,
-	0x59, 0x74, 0xb7, 0x9a, 0xed, 0xc0, 0x76, 0x5b, 0x2c, 0x01,
-	0xc2, 0xef, 0x98, 0xb5, 0xe9, 0xc4, 0xb3, 0x9e, 0x5d, 0x70,
-	0x07, 0x2a, 0x9c, 0xb1, 0xc6, 0xeb, 0x28, 0x05, 0x72, 0x5f,
-	0xca, 0xe7, 0x90, 0xbd, 0x7e, 0x53, 0x24, 0x09, 0xbf, 0x92,
-	0xe5, 0xc8, 0x0b, 0x26, 0x51, 0x7c, 0x20, 0x0d, 0x7a, 0x57,
-	0x94, 0xb9, 0xce, 0xe3, 0x55, 0x78, 0x0f, 0x22, 0xe1, 0xcc,
-	0xbb, 0x96, 0x8c, 0xa1, 0xd6, 0xfb, 0x38, 0x15, 0x62, 0x4f,
-	0xf9, 0xd4, 0xa3, 0x8e, 0x4d, 0x60, 0x17, 0x3a, 0x66, 0x4b,
-	0x3c, 0x11, 0xd2, 0xff, 0x88, 0xa5, 0x13, 0x3e, 0x49, 0x64,
-	0xa7, 0x8a, 0xfd, 0xd0, 0x45, 0x68, 0x1f, 0x32, 0xf1, 0xdc,
-	0xab, 0x86, 0x30, 0x1d, 0x6a, 0x47, 0x84, 0xa9, 0xde, 0xf3,
-	0xaf, 0x82, 0xf5, 0xd8, 0x1b, 0x36, 0x41, 0x6c, 0xda, 0xf7,
-	0x80, 0xad, 0x6e, 0x43, 0x34, 0x19, 0x00, 0x2e, 0x5c, 0x72,
-	0xb8, 0x96, 0xe4, 0xca, 0x6d, 0x43, 0x31, 0x1f, 0xd5, 0xfb,
-	0x89, 0xa7, 0xda, 0xf4, 0x86, 0xa8, 0x62, 0x4c, 0x3e, 0x10,
-	0xb7, 0x99, 0xeb, 0xc5, 0x0f, 0x21, 0x53, 0x7d, 0xa9, 0x87,
-	0xf5, 0xdb, 0x11, 0x3f, 0x4d, 0x63, 0xc4, 0xea, 0x98, 0xb6,
-	0x7c, 0x52, 0x20, 0x0e, 0x73, 0x5d, 0x2f, 0x01, 0xcb, 0xe5,
-	0x97, 0xb9, 0x1e, 0x30, 0x42, 0x6c, 0xa6, 0x88, 0xfa, 0xd4,
-	0x4f, 0x61, 0x13, 0x3d, 0xf7, 0xd9, 0xab, 0x85, 0x22, 0x0c,
-	0x7e, 0x50, 0x9a, 0xb4, 0xc6, 0xe8, 0x95, 0xbb, 0xc9, 0xe7,
-	0x2d, 0x03, 0x71, 0x5f, 0xf8, 0xd6, 0xa4, 0x8a, 0x40, 0x6e,
-	0x1c, 0x32, 0xe6, 0xc8, 0xba, 0x94, 0x5e, 0x70, 0x02, 0x2c,
-	0x8b, 0xa5, 0xd7, 0xf9, 0x33, 0x1d, 0x6f, 0x41, 0x3c, 0x12,
-	0x60, 0x4e, 0x84, 0xaa, 0xd8, 0xf6, 0x51, 0x7f, 0x0d, 0x23,
-	0xe9, 0xc7, 0xb5, 0x9b, 0x9e, 0xb0, 0xc2, 0xec, 0x26, 0x08,
-	0x7a, 0x54, 0xf3, 0xdd, 0xaf, 0x81, 0x4b, 0x65, 0x17, 0x39,
-	0x44, 0x6a, 0x18, 0x36, 0xfc, 0xd2, 0xa0, 0x8e, 0x29, 0x07,
-	0x75, 0x5b, 0x91, 0xbf, 0xcd, 0xe3, 0x37, 0x19, 0x6b, 0x45,
-	0x8f, 0xa1, 0xd3, 0xfd, 0x5a, 0x74, 0x06, 0x28, 0xe2, 0xcc,
-	0xbe, 0x90, 0xed, 0xc3, 0xb1, 0x9f, 0x55, 0x7b, 0x09, 0x27,
-	0x80, 0xae, 0xdc, 0xf2, 0x38, 0x16, 0x64, 0x4a, 0xd1, 0xff,
-	0x8d, 0xa3, 0x69, 0x47, 0x35, 0x1b, 0xbc, 0x92, 0xe0, 0xce,
-	0x04, 0x2a, 0x58, 0x76, 0x0b, 0x25, 0x57, 0x79, 0xb3, 0x9d,
-	0xef, 0xc1, 0x66, 0x48, 0x3a, 0x14, 0xde, 0xf0, 0x82, 0xac,
-	0x78, 0x56, 0x24, 0x0a, 0xc0, 0xee, 0x9c, 0xb2, 0x15, 0x3b,
-	0x49, 0x67, 0xad, 0x83, 0xf1, 0xdf, 0xa2, 0x8c, 0xfe, 0xd0,
-	0x1a, 0x34, 0x46, 0x68, 0xcf, 0xe1, 0x93, 0xbd, 0x77, 0x59,
-	0x2b, 0x05, 0x00, 0x2f, 0x5e, 0x71, 0xbc, 0x93, 0xe2, 0xcd,
-	0x65, 0x4a, 0x3b, 0x14, 0xd9, 0xf6, 0x87, 0xa8, 0xca, 0xe5,
-	0x94, 0xbb, 0x76, 0x59, 0x28, 0x07, 0xaf, 0x80, 0xf1, 0xde,
-	0x13, 0x3c, 0x4d, 0x62, 0x89, 0xa6, 0xd7, 0xf8, 0x35, 0x1a,
-	0x6b, 0x44, 0xec, 0xc3, 0xb2, 0x9d, 0x50, 0x7f, 0x0e, 0x21,
-	0x43, 0x6c, 0x1d, 0x32, 0xff, 0xd0, 0xa1, 0x8e, 0x26, 0x09,
-	0x78, 0x57, 0x9a, 0xb5, 0xc4, 0xeb, 0x0f, 0x20, 0x51, 0x7e,
-	0xb3, 0x9c, 0xed, 0xc2, 0x6a, 0x45, 0x34, 0x1b, 0xd6, 0xf9,
-	0x88, 0xa7, 0xc5, 0xea, 0x9b, 0xb4, 0x79, 0x56, 0x27, 0x08,
-	0xa0, 0x8f, 0xfe, 0xd1, 0x1c, 0x33, 0x42, 0x6d, 0x86, 0xa9,
-	0xd8, 0xf7, 0x3a, 0x15, 0x64, 0x4b, 0xe3, 0xcc, 0xbd, 0x92,
-	0x5f, 0x70, 0x01, 0x2e, 0x4c, 0x63, 0x12, 0x3d, 0xf0, 0xdf,
-	0xae, 0x81, 0x29, 0x06, 0x77, 0x58, 0x95, 0xba, 0xcb, 0xe4,
-	0x1e, 0x31, 0x40, 0x6f, 0xa2, 0x8d, 0xfc, 0xd3, 0x7b, 0x54,
-	0x25, 0x0a, 0xc7, 0xe8, 0x99, 0xb6, 0xd4, 0xfb, 0x8a, 0xa5,
-	0x68, 0x47, 0x36, 0x19, 0xb1, 0x9e, 0xef, 0xc0, 0x0d, 0x22,
-	0x53, 0x7c, 0x97, 0xb8, 0xc9, 0xe6, 0x2b, 0x04, 0x75, 0x5a,
-	0xf2, 0xdd, 0xac, 0x83, 0x4e, 0x61, 0x10, 0x3f, 0x5d, 0x72,
-	0x03, 0x2c, 0xe1, 0xce, 0xbf, 0x90, 0x38, 0x17, 0x66, 0x49,
-	0x84, 0xab, 0xda, 0xf5, 0x11, 0x3e, 0x4f, 0x60, 0xad, 0x82,
-	0xf3, 0xdc, 0x74, 0x5b, 0x2a, 0x05, 0xc8, 0xe7, 0x96, 0xb9,
-	0xdb, 0xf4, 0x85, 0xaa, 0x67, 0x48, 0x39, 0x16, 0xbe, 0x91,
-	0xe0, 0xcf, 0x02, 0x2d, 0x5c, 0x73, 0x98, 0xb7, 0xc6, 0xe9,
-	0x24, 0x0b, 0x7a, 0x55, 0xfd, 0xd2, 0xa3, 0x8c, 0x41, 0x6e,
-	0x1f, 0x30, 0x52, 0x7d, 0x0c, 0x23, 0xee, 0xc1, 0xb0, 0x9f,
-	0x37, 0x18, 0x69, 0x46, 0x8b, 0xa4, 0xd5, 0xfa, 0x00, 0x30,
-	0x60, 0x50, 0xc0, 0xf0, 0xa0, 0x90, 0x9d, 0xad, 0xfd, 0xcd,
-	0x5d, 0x6d, 0x3d, 0x0d, 0x27, 0x17, 0x47, 0x77, 0xe7, 0xd7,
-	0x87, 0xb7, 0xba, 0x8a, 0xda, 0xea, 0x7a, 0x4a, 0x1a, 0x2a,
-	0x4e, 0x7e, 0x2e, 0x1e, 0x8e, 0xbe, 0xee, 0xde, 0xd3, 0xe3,
-	0xb3, 0x83, 0x13, 0x23, 0x73, 0x43, 0x69, 0x59, 0x09, 0x39,
-	0xa9, 0x99, 0xc9, 0xf9, 0xf4, 0xc4, 0x94, 0xa4, 0x34, 0x04,
-	0x54, 0x64, 0x9c, 0xac, 0xfc, 0xcc, 0x5c, 0x6c, 0x3c, 0x0c,
-	0x01, 0x31, 0x61, 0x51, 0xc1, 0xf1, 0xa1, 0x91, 0xbb, 0x8b,
-	0xdb, 0xeb, 0x7b, 0x4b, 0x1b, 0x2b, 0x26, 0x16, 0x46, 0x76,
-	0xe6, 0xd6, 0x86, 0xb6, 0xd2, 0xe2, 0xb2, 0x82, 0x12, 0x22,
-	0x72, 0x42, 0x4f, 0x7f, 0x2f, 0x1f, 0x8f, 0xbf, 0xef, 0xdf,
-	0xf5, 0xc5, 0x95, 0xa5, 0x35, 0x05, 0x55, 0x65, 0x68, 0x58,
-	0x08, 0x38, 0xa8, 0x98, 0xc8, 0xf8, 0x25, 0x15, 0x45, 0x75,
-	0xe5, 0xd5, 0x85, 0xb5, 0xb8, 0x88, 0xd8, 0xe8, 0x78, 0x48,
-	0x18, 0x28, 0x02, 0x32, 0x62, 0x52, 0xc2, 0xf2, 0xa2, 0x92,
-	0x9f, 0xaf, 0xff, 0xcf, 0x5f, 0x6f, 0x3f, 0x0f, 0x6b, 0x5b,
-	0x0b, 0x3b, 0xab, 0x9b, 0xcb, 0xfb, 0xf6, 0xc6, 0x96, 0xa6,
-	0x36, 0x06, 0x56, 0x66, 0x4c, 0x7c, 0x2c, 0x1c, 0x8c, 0xbc,
-	0xec, 0xdc, 0xd1, 0xe1, 0xb1, 0x81, 0x11, 0x21, 0x71, 0x41,
-	0xb9, 0x89, 0xd9, 0xe9, 0x79, 0x49, 0x19, 0x29, 0x24, 0x14,
-	0x44, 0x74, 0xe4, 0xd4, 0x84, 0xb4, 0x9e, 0xae, 0xfe, 0xce,
-	0x5e, 0x6e, 0x3e, 0x0e, 0x03, 0x33, 0x63, 0x53, 0xc3, 0xf3,
-	0xa3, 0x93, 0xf7, 0xc7, 0x97, 0xa7, 0x37, 0x07, 0x57, 0x67,
-	0x6a, 0x5a, 0x0a, 0x3a, 0xaa, 0x9a, 0xca, 0xfa, 0xd0, 0xe0,
-	0xb0, 0x80, 0x10, 0x20, 0x70, 0x40, 0x4d, 0x7d, 0x2d, 0x1d,
-	0x8d, 0xbd, 0xed, 0xdd, 0x00, 0x31, 0x62, 0x53, 0xc4, 0xf5,
-	0xa6, 0x97, 0x95, 0xa4, 0xf7, 0xc6, 0x51, 0x60, 0x33, 0x02,
-	0x37, 0x06, 0x55, 0x64, 0xf3, 0xc2, 0x91, 0xa0, 0xa2, 0x93,
-	0xc0, 0xf1, 0x66, 0x57, 0x04, 0x35, 0x6e, 0x5f, 0x0c, 0x3d,
-	0xaa, 0x9b, 0xc8, 0xf9, 0xfb, 0xca, 0x99, 0xa8, 0x3f, 0x0e,
-	0x5d, 0x6c, 0x59, 0x68, 0x3b, 0x0a, 0x9d, 0xac, 0xff, 0xce,
-	0xcc, 0xfd, 0xae, 0x9f, 0x08, 0x39, 0x6a, 0x5b, 0xdc, 0xed,
-	0xbe, 0x8f, 0x18, 0x29, 0x7a, 0x4b, 0x49, 0x78, 0x2b, 0x1a,
-	0x8d, 0xbc, 0xef, 0xde, 0xeb, 0xda, 0x89, 0xb8, 0x2f, 0x1e,
-	0x4d, 0x7c, 0x7e, 0x4f, 0x1c, 0x2d, 0xba, 0x8b, 0xd8, 0xe9,
-	0xb2, 0x83, 0xd0, 0xe1, 0x76, 0x47, 0x14, 0x25, 0x27, 0x16,
-	0x45, 0x74, 0xe3, 0xd2, 0x81, 0xb0, 0x85, 0xb4, 0xe7, 0xd6,
-	0x41, 0x70, 0x23, 0x12, 0x10, 0x21, 0x72, 0x43, 0xd4, 0xe5,
-	0xb6, 0x87, 0xa5, 0x94, 0xc7, 0xf6, 0x61, 0x50, 0x03, 0x32,
-	0x30, 0x01, 0x52, 0x63, 0xf4, 0xc5, 0x96, 0xa7, 0x92, 0xa3,
-	0xf0, 0xc1, 0x56, 0x67, 0x34, 0x05, 0x07, 0x36, 0x65, 0x54,
-	0xc3, 0xf2, 0xa1, 0x90, 0xcb, 0xfa, 0xa9, 0x98, 0x0f, 0x3e,
-	0x6d, 0x5c, 0x5e, 0x6f, 0x3c, 0x0d, 0x9a, 0xab, 0xf8, 0xc9,
-	0xfc, 0xcd, 0x9e, 0xaf, 0x38, 0x09, 0x5a, 0x6b, 0x69, 0x58,
-	0x0b, 0x3a, 0xad, 0x9c, 0xcf, 0xfe, 0x79, 0x48, 0x1b, 0x2a,
-	0xbd, 0x8c, 0xdf, 0xee, 0xec, 0xdd, 0x8e, 0xbf, 0x28, 0x19,
-	0x4a, 0x7b, 0x4e, 0x7f, 0x2c, 0x1d, 0x8a, 0xbb, 0xe8, 0xd9,
-	0xdb, 0xea, 0xb9, 0x88, 0x1f, 0x2e, 0x7d, 0x4c, 0x17, 0x26,
-	0x75, 0x44, 0xd3, 0xe2, 0xb1, 0x80, 0x82, 0xb3, 0xe0, 0xd1,
-	0x46, 0x77, 0x24, 0x15, 0x20, 0x11, 0x42, 0x73, 0xe4, 0xd5,
-	0x86, 0xb7, 0xb5, 0x84, 0xd7, 0xe6, 0x71, 0x40, 0x13, 0x22,
-	0x00, 0x32, 0x64, 0x56, 0xc8, 0xfa, 0xac, 0x9e, 0x8d, 0xbf,
-	0xe9, 0xdb, 0x45, 0x77, 0x21, 0x13, 0x07, 0x35, 0x63, 0x51,
-	0xcf, 0xfd, 0xab, 0x99, 0x8a, 0xb8, 0xee, 0xdc, 0x42, 0x70,
-	0x26, 0x14, 0x0e, 0x3c, 0x6a, 0x58, 0xc6, 0xf4, 0xa2, 0x90,
-	0x83, 0xb1, 0xe7, 0xd5, 0x4b, 0x79, 0x2f, 0x1d, 0x09, 0x3b,
-	0x6d, 0x5f, 0xc1, 0xf3, 0xa5, 0x97, 0x84, 0xb6, 0xe0, 0xd2,
-	0x4c, 0x7e, 0x28, 0x1a, 0x1c, 0x2e, 0x78, 0x4a, 0xd4, 0xe6,
-	0xb0, 0x82, 0x91, 0xa3, 0xf5, 0xc7, 0x59, 0x6b, 0x3d, 0x0f,
-	0x1b, 0x29, 0x7f, 0x4d, 0xd3, 0xe1, 0xb7, 0x85, 0x96, 0xa4,
-	0xf2, 0xc0, 0x5e, 0x6c, 0x3a, 0x08, 0x12, 0x20, 0x76, 0x44,
-	0xda, 0xe8, 0xbe, 0x8c, 0x9f, 0xad, 0xfb, 0xc9, 0x57, 0x65,
-	0x33, 0x01, 0x15, 0x27, 0x71, 0x43, 0xdd, 0xef, 0xb9, 0x8b,
-	0x98, 0xaa, 0xfc, 0xce, 0x50, 0x62, 0x34, 0x06, 0x38, 0x0a,
-	0x5c, 0x6e, 0xf0, 0xc2, 0x94, 0xa6, 0xb5, 0x87, 0xd1, 0xe3,
-	0x7d, 0x4f, 0x19, 0x2b, 0x3f, 0x0d, 0x5b, 0x69, 0xf7, 0xc5,
-	0x93, 0xa1, 0xb2, 0x80, 0xd6, 0xe4, 0x7a, 0x48, 0x1e, 0x2c,
-	0x36, 0x04, 0x52, 0x60, 0xfe, 0xcc, 0x9a, 0xa8, 0xbb, 0x89,
-	0xdf, 0xed, 0x73, 0x41, 0x17, 0x25, 0x31, 0x03, 0x55, 0x67,
-	0xf9, 0xcb, 0x9d, 0xaf, 0xbc, 0x8e, 0xd8, 0xea, 0x74, 0x46,
-	0x10, 0x22, 0x24, 0x16, 0x40, 0x72, 0xec, 0xde, 0x88, 0xba,
-	0xa9, 0x9b, 0xcd, 0xff, 0x61, 0x53, 0x05, 0x37, 0x23, 0x11,
-	0x47, 0x75, 0xeb, 0xd9, 0x8f, 0xbd, 0xae, 0x9c, 0xca, 0xf8,
-	0x66, 0x54, 0x02, 0x30, 0x2a, 0x18, 0x4e, 0x7c, 0xe2, 0xd0,
-	0x86, 0xb4, 0xa7, 0x95, 0xc3, 0xf1, 0x6f, 0x5d, 0x0b, 0x39,
-	0x2d, 0x1f, 0x49, 0x7b, 0xe5, 0xd7, 0x81, 0xb3, 0xa0, 0x92,
-	0xc4, 0xf6, 0x68, 0x5a, 0x0c, 0x3e, 0x00, 0x33, 0x66, 0x55,
-	0xcc, 0xff, 0xaa, 0x99, 0x85, 0xb6, 0xe3, 0xd0, 0x49, 0x7a,
-	0x2f, 0x1c, 0x17, 0x24, 0x71, 0x42, 0xdb, 0xe8, 0xbd, 0x8e,
-	0x92, 0xa1, 0xf4, 0xc7, 0x5e, 0x6d, 0x38, 0x0b, 0x2e, 0x1d,
-	0x48, 0x7b, 0xe2, 0xd1, 0x84, 0xb7, 0xab, 0x98, 0xcd, 0xfe,
-	0x67, 0x54, 0x01, 0x32, 0x39, 0x0a, 0x5f, 0x6c, 0xf5, 0xc6,
-	0x93, 0xa0, 0xbc, 0x8f, 0xda, 0xe9, 0x70, 0x43, 0x16, 0x25,
-	0x5c, 0x6f, 0x3a, 0x09, 0x90, 0xa3, 0xf6, 0xc5, 0xd9, 0xea,
-	0xbf, 0x8c, 0x15, 0x26, 0x73, 0x40, 0x4b, 0x78, 0x2d, 0x1e,
-	0x87, 0xb4, 0xe1, 0xd2, 0xce, 0xfd, 0xa8, 0x9b, 0x02, 0x31,
-	0x64, 0x57, 0x72, 0x41, 0x14, 0x27, 0xbe, 0x8d, 0xd8, 0xeb,
-	0xf7, 0xc4, 0x91, 0xa2, 0x3b, 0x08, 0x5d, 0x6e, 0x65, 0x56,
-	0x03, 0x30, 0xa9, 0x9a, 0xcf, 0xfc, 0xe0, 0xd3, 0x86, 0xb5,
-	0x2c, 0x1f, 0x4a, 0x79, 0xb8, 0x8b, 0xde, 0xed, 0x74, 0x47,
-	0x12, 0x21, 0x3d, 0x0e, 0x5b, 0x68, 0xf1, 0xc2, 0x97, 0xa4,
-	0xaf, 0x9c, 0xc9, 0xfa, 0x63, 0x50, 0x05, 0x36, 0x2a, 0x19,
-	0x4c, 0x7f, 0xe6, 0xd5, 0x80, 0xb3, 0x96, 0xa5, 0xf0, 0xc3,
-	0x5a, 0x69, 0x3c, 0x0f, 0x13, 0x20, 0x75, 0x46, 0xdf, 0xec,
-	0xb9, 0x8a, 0x81, 0xb2, 0xe7, 0xd4, 0x4d, 0x7e, 0x2b, 0x18,
-	0x04, 0x37, 0x62, 0x51, 0xc8, 0xfb, 0xae, 0x9d, 0xe4, 0xd7,
-	0x82, 0xb1, 0x28, 0x1b, 0x4e, 0x7d, 0x61, 0x52, 0x07, 0x34,
-	0xad, 0x9e, 0xcb, 0xf8, 0xf3, 0xc0, 0x95, 0xa6, 0x3f, 0x0c,
-	0x59, 0x6a, 0x76, 0x45, 0x10, 0x23, 0xba, 0x89, 0xdc, 0xef,
-	0xca, 0xf9, 0xac, 0x9f, 0x06, 0x35, 0x60, 0x53, 0x4f, 0x7c,
-	0x29, 0x1a, 0x83, 0xb0, 0xe5, 0xd6, 0xdd, 0xee, 0xbb, 0x88,
-	0x11, 0x22, 0x77, 0x44, 0x58, 0x6b, 0x3e, 0x0d, 0x94, 0xa7,
-	0xf2, 0xc1, 0x00, 0x34, 0x68, 0x5c, 0xd0, 0xe4, 0xb8, 0x8c,
-	0xbd, 0x89, 0xd5, 0xe1, 0x6d, 0x59, 0x05, 0x31, 0x67, 0x53,
-	0x0f, 0x3b, 0xb7, 0x83, 0xdf, 0xeb, 0xda, 0xee, 0xb2, 0x86,
-	0x0a, 0x3e, 0x62, 0x56, 0xce, 0xfa, 0xa6, 0x92, 0x1e, 0x2a,
-	0x76, 0x42, 0x73, 0x47, 0x1b, 0x2f, 0xa3, 0x97, 0xcb, 0xff,
-	0xa9, 0x9d, 0xc1, 0xf5, 0x79, 0x4d, 0x11, 0x25, 0x14, 0x20,
-	0x7c, 0x48, 0xc4, 0xf0, 0xac, 0x98, 0x81, 0xb5, 0xe9, 0xdd,
-	0x51, 0x65, 0x39, 0x0d, 0x3c, 0x08, 0x54, 0x60, 0xec, 0xd8,
-	0x84, 0xb0, 0xe6, 0xd2, 0x8e, 0xba, 0x36, 0x02, 0x5e, 0x6a,
-	0x5b, 0x6f, 0x33, 0x07, 0x8b, 0xbf, 0xe3, 0xd7, 0x4f, 0x7b,
-	0x27, 0x13, 0x9f, 0xab, 0xf7, 0xc3, 0xf2, 0xc6, 0x9a, 0xae,
-	0x22, 0x16, 0x4a, 0x7e, 0x28, 0x1c, 0x40, 0x74, 0xf8, 0xcc,
-	0x90, 0xa4, 0x95, 0xa1, 0xfd, 0xc9, 0x45, 0x71, 0x2d, 0x19,
-	0x1f, 0x2b, 0x77, 0x43, 0xcf, 0xfb, 0xa7, 0x93, 0xa2, 0x96,
-	0xca, 0xfe, 0x72, 0x46, 0x1a, 0x2e, 0x78, 0x4c, 0x10, 0x24,
-	0xa8, 0x9c, 0xc0, 0xf4, 0xc5, 0xf1, 0xad, 0x99, 0x15, 0x21,
-	0x7d, 0x49, 0xd1, 0xe5, 0xb9, 0x8d, 0x01, 0x35, 0x69, 0x5d,
-	0x6c, 0x58, 0x04, 0x30, 0xbc, 0x88, 0xd4, 0xe0, 0xb6, 0x82,
-	0xde, 0xea, 0x66, 0x52, 0x0e, 0x3a, 0x0b, 0x3f, 0x63, 0x57,
-	0xdb, 0xef, 0xb3, 0x87, 0x9e, 0xaa, 0xf6, 0xc2, 0x4e, 0x7a,
-	0x26, 0x12, 0x23, 0x17, 0x4b, 0x7f, 0xf3, 0xc7, 0x9b, 0xaf,
-	0xf9, 0xcd, 0x91, 0xa5, 0x29, 0x1d, 0x41, 0x75, 0x44, 0x70,
-	0x2c, 0x18, 0x94, 0xa0, 0xfc, 0xc8, 0x50, 0x64, 0x38, 0x0c,
-	0x80, 0xb4, 0xe8, 0xdc, 0xed, 0xd9, 0x85, 0xb1, 0x3d, 0x09,
-	0x55, 0x61, 0x37, 0x03, 0x5f, 0x6b, 0xe7, 0xd3, 0x8f, 0xbb,
-	0x8a, 0xbe, 0xe2, 0xd6, 0x5a, 0x6e, 0x32, 0x06, 0x00, 0x35,
-	0x6a, 0x5f, 0xd4, 0xe1, 0xbe, 0x8b, 0xb5, 0x80, 0xdf, 0xea,
-	0x61, 0x54, 0x0b, 0x3e, 0x77, 0x42, 0x1d, 0x28, 0xa3, 0x96,
-	0xc9, 0xfc, 0xc2, 0xf7, 0xa8, 0x9d, 0x16, 0x23, 0x7c, 0x49,
-	0xee, 0xdb, 0x84, 0xb1, 0x3a, 0x0f, 0x50, 0x65, 0x5b, 0x6e,
-	0x31, 0x04, 0x8f, 0xba, 0xe5, 0xd0, 0x99, 0xac, 0xf3, 0xc6,
-	0x4d, 0x78, 0x27, 0x12, 0x2c, 0x19, 0x46, 0x73, 0xf8, 0xcd,
-	0x92, 0xa7, 0xc1, 0xf4, 0xab, 0x9e, 0x15, 0x20, 0x7f, 0x4a,
-	0x74, 0x41, 0x1e, 0x2b, 0xa0, 0x95, 0xca, 0xff, 0xb6, 0x83,
-	0xdc, 0xe9, 0x62, 0x57, 0x08, 0x3d, 0x03, 0x36, 0x69, 0x5c,
-	0xd7, 0xe2, 0xbd, 0x88, 0x2f, 0x1a, 0x45, 0x70, 0xfb, 0xce,
-	0x91, 0xa4, 0x9a, 0xaf, 0xf0, 0xc5, 0x4e, 0x7b, 0x24, 0x11,
-	0x58, 0x6d, 0x32, 0x07, 0x8c, 0xb9, 0xe6, 0xd3, 0xed, 0xd8,
-	0x87, 0xb2, 0x39, 0x0c, 0x53, 0x66, 0x9f, 0xaa, 0xf5, 0xc0,
-	0x4b, 0x7e, 0x21, 0x14, 0x2a, 0x1f, 0x40, 0x75, 0xfe, 0xcb,
-	0x94, 0xa1, 0xe8, 0xdd, 0x82, 0xb7, 0x3c, 0x09, 0x56, 0x63,
-	0x5d, 0x68, 0x37, 0x02, 0x89, 0xbc, 0xe3, 0xd6, 0x71, 0x44,
-	0x1b, 0x2e, 0xa5, 0x90, 0xcf, 0xfa, 0xc4, 0xf1, 0xae, 0x9b,
-	0x10, 0x25, 0x7a, 0x4f, 0x06, 0x33, 0x6c, 0x59, 0xd2, 0xe7,
-	0xb8, 0x8d, 0xb3, 0x86, 0xd9, 0xec, 0x67, 0x52, 0x0d, 0x38,
-	0x5e, 0x6b, 0x34, 0x01, 0x8a, 0xbf, 0xe0, 0xd5, 0xeb, 0xde,
-	0x81, 0xb4, 0x3f, 0x0a, 0x55, 0x60, 0x29, 0x1c, 0x43, 0x76,
-	0xfd, 0xc8, 0x97, 0xa2, 0x9c, 0xa9, 0xf6, 0xc3, 0x48, 0x7d,
-	0x22, 0x17, 0xb0, 0x85, 0xda, 0xef, 0x64, 0x51, 0x0e, 0x3b,
-	0x05, 0x30, 0x6f, 0x5a, 0xd1, 0xe4, 0xbb, 0x8e, 0xc7, 0xf2,
-	0xad, 0x98, 0x13, 0x26, 0x79, 0x4c, 0x72, 0x47, 0x18, 0x2d,
-	0xa6, 0x93, 0xcc, 0xf9, 0x00, 0x36, 0x6c, 0x5a, 0xd8, 0xee,
-	0xb4, 0x82, 0xad, 0x9b, 0xc1, 0xf7, 0x75, 0x43, 0x19, 0x2f,
-	0x47, 0x71, 0x2b, 0x1d, 0x9f, 0xa9, 0xf3, 0xc5, 0xea, 0xdc,
-	0x86, 0xb0, 0x32, 0x04, 0x5e, 0x68, 0x8e, 0xb8, 0xe2, 0xd4,
-	0x56, 0x60, 0x3a, 0x0c, 0x23, 0x15, 0x4f, 0x79, 0xfb, 0xcd,
-	0x97, 0xa1, 0xc9, 0xff, 0xa5, 0x93, 0x11, 0x27, 0x7d, 0x4b,
-	0x64, 0x52, 0x08, 0x3e, 0xbc, 0x8a, 0xd0, 0xe6, 0x01, 0x37,
-	0x6d, 0x5b, 0xd9, 0xef, 0xb5, 0x83, 0xac, 0x9a, 0xc0, 0xf6,
-	0x74, 0x42, 0x18, 0x2e, 0x46, 0x70, 0x2a, 0x1c, 0x9e, 0xa8,
-	0xf2, 0xc4, 0xeb, 0xdd, 0x87, 0xb1, 0x33, 0x05, 0x5f, 0x69,
-	0x8f, 0xb9, 0xe3, 0xd5, 0x57, 0x61, 0x3b, 0x0d, 0x22, 0x14,
-	0x4e, 0x78, 0xfa, 0xcc, 0x96, 0xa0, 0xc8, 0xfe, 0xa4, 0x92,
-	0x10, 0x26, 0x7c, 0x4a, 0x65, 0x53, 0x09, 0x3f, 0xbd, 0x8b,
-	0xd1, 0xe7, 0x02, 0x34, 0x6e, 0x58, 0xda, 0xec, 0xb6, 0x80,
-	0xaf, 0x99, 0xc3, 0xf5, 0x77, 0x41, 0x1b, 0x2d, 0x45, 0x73,
-	0x29, 0x1f, 0x9d, 0xab, 0xf1, 0xc7, 0xe8, 0xde, 0x84, 0xb2,
-	0x30, 0x06, 0x5c, 0x6a, 0x8c, 0xba, 0xe0, 0xd6, 0x54, 0x62,
-	0x38, 0x0e, 0x21, 0x17, 0x4d, 0x7b, 0xf9, 0xcf, 0x95, 0xa3,
-	0xcb, 0xfd, 0xa7, 0x91, 0x13, 0x25, 0x7f, 0x49, 0x66, 0x50,
-	0x0a, 0x3c, 0xbe, 0x88, 0xd2, 0xe4, 0x03, 0x35, 0x6f, 0x59,
-	0xdb, 0xed, 0xb7, 0x81, 0xae, 0x98, 0xc2, 0xf4, 0x76, 0x40,
-	0x1a, 0x2c, 0x44, 0x72, 0x28, 0x1e, 0x9c, 0xaa, 0xf0, 0xc6,
-	0xe9, 0xdf, 0x85, 0xb3, 0x31, 0x07, 0x5d, 0x6b, 0x8d, 0xbb,
-	0xe1, 0xd7, 0x55, 0x63, 0x39, 0x0f, 0x20, 0x16, 0x4c, 0x7a,
-	0xf8, 0xce, 0x94, 0xa2, 0xca, 0xfc, 0xa6, 0x90, 0x12, 0x24,
-	0x7e, 0x48, 0x67, 0x51, 0x0b, 0x3d, 0xbf, 0x89, 0xd3, 0xe5,
-	0x00, 0x37, 0x6e, 0x59, 0xdc, 0xeb, 0xb2, 0x85, 0xa5, 0x92,
-	0xcb, 0xfc, 0x79, 0x4e, 0x17, 0x20, 0x57, 0x60, 0x39, 0x0e,
-	0x8b, 0xbc, 0xe5, 0xd2, 0xf2, 0xc5, 0x9c, 0xab, 0x2e, 0x19,
-	0x40, 0x77, 0xae, 0x99, 0xc0, 0xf7, 0x72, 0x45, 0x1c, 0x2b,
-	0x0b, 0x3c, 0x65, 0x52, 0xd7, 0xe0, 0xb9, 0x8e, 0xf9, 0xce,
-	0x97, 0xa0, 0x25, 0x12, 0x4b, 0x7c, 0x5c, 0x6b, 0x32, 0x05,
-	0x80, 0xb7, 0xee, 0xd9, 0x41, 0x76, 0x2f, 0x18, 0x9d, 0xaa,
-	0xf3, 0xc4, 0xe4, 0xd3, 0x8a, 0xbd, 0x38, 0x0f, 0x56, 0x61,
-	0x16, 0x21, 0x78, 0x4f, 0xca, 0xfd, 0xa4, 0x93, 0xb3, 0x84,
-	0xdd, 0xea, 0x6f, 0x58, 0x01, 0x36, 0xef, 0xd8, 0x81, 0xb6,
-	0x33, 0x04, 0x5d, 0x6a, 0x4a, 0x7d, 0x24, 0x13, 0x96, 0xa1,
-	0xf8, 0xcf, 0xb8, 0x8f, 0xd6, 0xe1, 0x64, 0x53, 0x0a, 0x3d,
-	0x1d, 0x2a, 0x73, 0x44, 0xc1, 0xf6, 0xaf, 0x98, 0x82, 0xb5,
-	0xec, 0xdb, 0x5e, 0x69, 0x30, 0x07, 0x27, 0x10, 0x49, 0x7e,
-	0xfb, 0xcc, 0x95, 0xa2, 0xd5, 0xe2, 0xbb, 0x8c, 0x09, 0x3e,
-	0x67, 0x50, 0x70, 0x47, 0x1e, 0x29, 0xac, 0x9b, 0xc2, 0xf5,
-	0x2c, 0x1b, 0x42, 0x75, 0xf0, 0xc7, 0x9e, 0xa9, 0x89, 0xbe,
-	0xe7, 0xd0, 0x55, 0x62, 0x3b, 0x0c, 0x7b, 0x4c, 0x15, 0x22,
-	0xa7, 0x90, 0xc9, 0xfe, 0xde, 0xe9, 0xb0, 0x87, 0x02, 0x35,
-	0x6c, 0x5b, 0xc3, 0xf4, 0xad, 0x9a, 0x1f, 0x28, 0x71, 0x46,
-	0x66, 0x51, 0x08, 0x3f, 0xba, 0x8d, 0xd4, 0xe3, 0x94, 0xa3,
-	0xfa, 0xcd, 0x48, 0x7f, 0x26, 0x11, 0x31, 0x06, 0x5f, 0x68,
-	0xed, 0xda, 0x83, 0xb4, 0x6d, 0x5a, 0x03, 0x34, 0xb1, 0x86,
-	0xdf, 0xe8, 0xc8, 0xff, 0xa6, 0x91, 0x14, 0x23, 0x7a, 0x4d,
-	0x3a, 0x0d, 0x54, 0x63, 0xe6, 0xd1, 0x88, 0xbf, 0x9f, 0xa8,
-	0xf1, 0xc6, 0x43, 0x74, 0x2d, 0x1a, 0x00, 0x38, 0x70, 0x48,
-	0xe0, 0xd8, 0x90, 0xa8, 0xdd, 0xe5, 0xad, 0x95, 0x3d, 0x05,
-	0x4d, 0x75, 0xa7, 0x9f, 0xd7, 0xef, 0x47, 0x7f, 0x37, 0x0f,
-	0x7a, 0x42, 0x0a, 0x32, 0x9a, 0xa2, 0xea, 0xd2, 0x53, 0x6b,
-	0x23, 0x1b, 0xb3, 0x8b, 0xc3, 0xfb, 0x8e, 0xb6, 0xfe, 0xc6,
-	0x6e, 0x56, 0x1e, 0x26, 0xf4, 0xcc, 0x84, 0xbc, 0x14, 0x2c,
-	0x64, 0x5c, 0x29, 0x11, 0x59, 0x61, 0xc9, 0xf1, 0xb9, 0x81,
-	0xa6, 0x9e, 0xd6, 0xee, 0x46, 0x7e, 0x36, 0x0e, 0x7b, 0x43,
-	0x0b, 0x33, 0x9b, 0xa3, 0xeb, 0xd3, 0x01, 0x39, 0x71, 0x49,
-	0xe1, 0xd9, 0x91, 0xa9, 0xdc, 0xe4, 0xac, 0x94, 0x3c, 0x04,
-	0x4c, 0x74, 0xf5, 0xcd, 0x85, 0xbd, 0x15, 0x2d, 0x65, 0x5d,
-	0x28, 0x10, 0x58, 0x60, 0xc8, 0xf0, 0xb8, 0x80, 0x52, 0x6a,
-	0x22, 0x1a, 0xb2, 0x8a, 0xc2, 0xfa, 0x8f, 0xb7, 0xff, 0xc7,
-	0x6f, 0x57, 0x1f, 0x27, 0x51, 0x69, 0x21, 0x19, 0xb1, 0x89,
-	0xc1, 0xf9, 0x8c, 0xb4, 0xfc, 0xc4, 0x6c, 0x54, 0x1c, 0x24,
-	0xf6, 0xce, 0x86, 0xbe, 0x16, 0x2e, 0x66, 0x5e, 0x2b, 0x13,
-	0x5b, 0x63, 0xcb, 0xf3, 0xbb, 0x83, 0x02, 0x3a, 0x72, 0x4a,
-	0xe2, 0xda, 0x92, 0xaa, 0xdf, 0xe7, 0xaf, 0x97, 0x3f, 0x07,
-	0x4f, 0x77, 0xa5, 0x9d, 0xd5, 0xed, 0x45, 0x7d, 0x35, 0x0d,
-	0x78, 0x40, 0x08, 0x30, 0x98, 0xa0, 0xe8, 0xd0, 0xf7, 0xcf,
-	0x87, 0xbf, 0x17, 0x2f, 0x67, 0x5f, 0x2a, 0x12, 0x5a, 0x62,
-	0xca, 0xf2, 0xba, 0x82, 0x50, 0x68, 0x20, 0x18, 0xb0, 0x88,
-	0xc0, 0xf8, 0x8d, 0xb5, 0xfd, 0xc5, 0x6d, 0x55, 0x1d, 0x25,
-	0xa4, 0x9c, 0xd4, 0xec, 0x44, 0x7c, 0x34, 0x0c, 0x79, 0x41,
-	0x09, 0x31, 0x99, 0xa1, 0xe9, 0xd1, 0x03, 0x3b, 0x73, 0x4b,
-	0xe3, 0xdb, 0x93, 0xab, 0xde, 0xe6, 0xae, 0x96, 0x3e, 0x06,
-	0x4e, 0x76, 0x00, 0x39, 0x72, 0x4b, 0xe4, 0xdd, 0x96, 0xaf,
-	0xd5, 0xec, 0xa7, 0x9e, 0x31, 0x08, 0x43, 0x7a, 0xb7, 0x8e,
-	0xc5, 0xfc, 0x53, 0x6a, 0x21, 0x18, 0x62, 0x5b, 0x10, 0x29,
-	0x86, 0xbf, 0xf4, 0xcd, 0x73, 0x4a, 0x01, 0x38, 0x97, 0xae,
-	0xe5, 0xdc, 0xa6, 0x9f, 0xd4, 0xed, 0x42, 0x7b, 0x30, 0x09,
-	0xc4, 0xfd, 0xb6, 0x8f, 0x20, 0x19, 0x52, 0x6b, 0x11, 0x28,
-	0x63, 0x5a, 0xf5, 0xcc, 0x87, 0xbe, 0xe6, 0xdf, 0x94, 0xad,
-	0x02, 0x3b, 0x70, 0x49, 0x33, 0x0a, 0x41, 0x78, 0xd7, 0xee,
-	0xa5, 0x9c, 0x51, 0x68, 0x23, 0x1a, 0xb5, 0x8c, 0xc7, 0xfe,
-	0x84, 0xbd, 0xf6, 0xcf, 0x60, 0x59, 0x12, 0x2b, 0x95, 0xac,
-	0xe7, 0xde, 0x71, 0x48, 0x03, 0x3a, 0x40, 0x79, 0x32, 0x0b,
-	0xa4, 0x9d, 0xd6, 0xef, 0x22, 0x1b, 0x50, 0x69, 0xc6, 0xff,
-	0xb4, 0x8d, 0xf7, 0xce, 0x85, 0xbc, 0x13, 0x2a, 0x61, 0x58,
-	0xd1, 0xe8, 0xa3, 0x9a, 0x35, 0x0c, 0x47, 0x7e, 0x04, 0x3d,
-	0x76, 0x4f, 0xe0, 0xd9, 0x92, 0xab, 0x66, 0x5f, 0x14, 0x2d,
-	0x82, 0xbb, 0xf0, 0xc9, 0xb3, 0x8a, 0xc1, 0xf8, 0x57, 0x6e,
-	0x25, 0x1c, 0xa2, 0x9b, 0xd0, 0xe9, 0x46, 0x7f, 0x34, 0x0d,
-	0x77, 0x4e, 0x05, 0x3c, 0x93, 0xaa, 0xe1, 0xd8, 0x15, 0x2c,
-	0x67, 0x5e, 0xf1, 0xc8, 0x83, 0xba, 0xc0, 0xf9, 0xb2, 0x8b,
-	0x24, 0x1d, 0x56, 0x6f, 0x37, 0x0e, 0x45, 0x7c, 0xd3, 0xea,
-	0xa1, 0x98, 0xe2, 0xdb, 0x90, 0xa9, 0x06, 0x3f, 0x74, 0x4d,
-	0x80, 0xb9, 0xf2, 0xcb, 0x64, 0x5d, 0x16, 0x2f, 0x55, 0x6c,
-	0x27, 0x1e, 0xb1, 0x88, 0xc3, 0xfa, 0x44, 0x7d, 0x36, 0x0f,
-	0xa0, 0x99, 0xd2, 0xeb, 0x91, 0xa8, 0xe3, 0xda, 0x75, 0x4c,
-	0x07, 0x3e, 0xf3, 0xca, 0x81, 0xb8, 0x17, 0x2e, 0x65, 0x5c,
-	0x26, 0x1f, 0x54, 0x6d, 0xc2, 0xfb, 0xb0, 0x89, 0x00, 0x3a,
-	0x74, 0x4e, 0xe8, 0xd2, 0x9c, 0xa6, 0xcd, 0xf7, 0xb9, 0x83,
-	0x25, 0x1f, 0x51, 0x6b, 0x87, 0xbd, 0xf3, 0xc9, 0x6f, 0x55,
-	0x1b, 0x21, 0x4a, 0x70, 0x3e, 0x04, 0xa2, 0x98, 0xd6, 0xec,
-	0x13, 0x29, 0x67, 0x5d, 0xfb, 0xc1, 0x8f, 0xb5, 0xde, 0xe4,
-	0xaa, 0x90, 0x36, 0x0c, 0x42, 0x78, 0x94, 0xae, 0xe0, 0xda,
-	0x7c, 0x46, 0x08, 0x32, 0x59, 0x63, 0x2d, 0x17, 0xb1, 0x8b,
-	0xc5, 0xff, 0x26, 0x1c, 0x52, 0x68, 0xce, 0xf4, 0xba, 0x80,
-	0xeb, 0xd1, 0x9f, 0xa5, 0x03, 0x39, 0x77, 0x4d, 0xa1, 0x9b,
-	0xd5, 0xef, 0x49, 0x73, 0x3d, 0x07, 0x6c, 0x56, 0x18, 0x22,
-	0x84, 0xbe, 0xf0, 0xca, 0x35, 0x0f, 0x41, 0x7b, 0xdd, 0xe7,
-	0xa9, 0x93, 0xf8, 0xc2, 0x8c, 0xb6, 0x10, 0x2a, 0x64, 0x5e,
-	0xb2, 0x88, 0xc6, 0xfc, 0x5a, 0x60, 0x2e, 0x14, 0x7f, 0x45,
-	0x0b, 0x31, 0x97, 0xad, 0xe3, 0xd9, 0x4c, 0x76, 0x38, 0x02,
-	0xa4, 0x9e, 0xd0, 0xea, 0x81, 0xbb, 0xf5, 0xcf, 0x69, 0x53,
-	0x1d, 0x27, 0xcb, 0xf1, 0xbf, 0x85, 0x23, 0x19, 0x57, 0x6d,
-	0x06, 0x3c, 0x72, 0x48, 0xee, 0xd4, 0x9a, 0xa0, 0x5f, 0x65,
-	0x2b, 0x11, 0xb7, 0x8d, 0xc3, 0xf9, 0x92, 0xa8, 0xe6, 0xdc,
-	0x7a, 0x40, 0x0e, 0x34, 0xd8, 0xe2, 0xac, 0x96, 0x30, 0x0a,
-	0x44, 0x7e, 0x15, 0x2f, 0x61, 0x5b, 0xfd, 0xc7, 0x89, 0xb3,
-	0x6a, 0x50, 0x1e, 0x24, 0x82, 0xb8, 0xf6, 0xcc, 0xa7, 0x9d,
-	0xd3, 0xe9, 0x4f, 0x75, 0x3b, 0x01, 0xed, 0xd7, 0x99, 0xa3,
-	0x05, 0x3f, 0x71, 0x4b, 0x20, 0x1a, 0x54, 0x6e, 0xc8, 0xf2,
-	0xbc, 0x86, 0x79, 0x43, 0x0d, 0x37, 0x91, 0xab, 0xe5, 0xdf,
-	0xb4, 0x8e, 0xc0, 0xfa, 0x5c, 0x66, 0x28, 0x12, 0xfe, 0xc4,
-	0x8a, 0xb0, 0x16, 0x2c, 0x62, 0x58, 0x33, 0x09, 0x47, 0x7d,
-	0xdb, 0xe1, 0xaf, 0x95, 0x00, 0x3b, 0x76, 0x4d, 0xec, 0xd7,
-	0x9a, 0xa1, 0xc5, 0xfe, 0xb3, 0x88, 0x29, 0x12, 0x5f, 0x64,
-	0x97, 0xac, 0xe1, 0xda, 0x7b, 0x40, 0x0d, 0x36, 0x52, 0x69,
-	0x24, 0x1f, 0xbe, 0x85, 0xc8, 0xf3, 0x33, 0x08, 0x45, 0x7e,
-	0xdf, 0xe4, 0xa9, 0x92, 0xf6, 0xcd, 0x80, 0xbb, 0x1a, 0x21,
-	0x6c, 0x57, 0xa4, 0x9f, 0xd2, 0xe9, 0x48, 0x73, 0x3e, 0x05,
-	0x61, 0x5a, 0x17, 0x2c, 0x8d, 0xb6, 0xfb, 0xc0, 0x66, 0x5d,
-	0x10, 0x2b, 0x8a, 0xb1, 0xfc, 0xc7, 0xa3, 0x98, 0xd5, 0xee,
-	0x4f, 0x74, 0x39, 0x02, 0xf1, 0xca, 0x87, 0xbc, 0x1d, 0x26,
-	0x6b, 0x50, 0x34, 0x0f, 0x42, 0x79, 0xd8, 0xe3, 0xae, 0x95,
-	0x55, 0x6e, 0x23, 0x18, 0xb9, 0x82, 0xcf, 0xf4, 0x90, 0xab,
-	0xe6, 0xdd, 0x7c, 0x47, 0x0a, 0x31, 0xc2, 0xf9, 0xb4, 0x8f,
-	0x2e, 0x15, 0x58, 0x63, 0x07, 0x3c, 0x71, 0x4a, 0xeb, 0xd0,
-	0x9d, 0xa6, 0xcc, 0xf7, 0xba, 0x81, 0x20, 0x1b, 0x56, 0x6d,
-	0x09, 0x32, 0x7f, 0x44, 0xe5, 0xde, 0x93, 0xa8, 0x5b, 0x60,
-	0x2d, 0x16, 0xb7, 0x8c, 0xc1, 0xfa, 0x9e, 0xa5, 0xe8, 0xd3,
-	0x72, 0x49, 0x04, 0x3f, 0xff, 0xc4, 0x89, 0xb2, 0x13, 0x28,
-	0x65, 0x5e, 0x3a, 0x01, 0x4c, 0x77, 0xd6, 0xed, 0xa0, 0x9b,
-	0x68, 0x53, 0x1e, 0x25, 0x84, 0xbf, 0xf2, 0xc9, 0xad, 0x96,
-	0xdb, 0xe0, 0x41, 0x7a, 0x37, 0x0c, 0xaa, 0x91, 0xdc, 0xe7,
-	0x46, 0x7d, 0x30, 0x0b, 0x6f, 0x54, 0x19, 0x22, 0x83, 0xb8,
-	0xf5, 0xce, 0x3d, 0x06, 0x4b, 0x70, 0xd1, 0xea, 0xa7, 0x9c,
-	0xf8, 0xc3, 0x8e, 0xb5, 0x14, 0x2f, 0x62, 0x59, 0x99, 0xa2,
-	0xef, 0xd4, 0x75, 0x4e, 0x03, 0x38, 0x5c, 0x67, 0x2a, 0x11,
-	0xb0, 0x8b, 0xc6, 0xfd, 0x0e, 0x35, 0x78, 0x43, 0xe2, 0xd9,
-	0x94, 0xaf, 0xcb, 0xf0, 0xbd, 0x86, 0x27, 0x1c, 0x51, 0x6a,
-	0x00, 0x3c, 0x78, 0x44, 0xf0, 0xcc, 0x88, 0xb4, 0xfd, 0xc1,
-	0x85, 0xb9, 0x0d, 0x31, 0x75, 0x49, 0xe7, 0xdb, 0x9f, 0xa3,
-	0x17, 0x2b, 0x6f, 0x53, 0x1a, 0x26, 0x62, 0x5e, 0xea, 0xd6,
-	0x92, 0xae, 0xd3, 0xef, 0xab, 0x97, 0x23, 0x1f, 0x5b, 0x67,
-	0x2e, 0x12, 0x56, 0x6a, 0xde, 0xe2, 0xa6, 0x9a, 0x34, 0x08,
-	0x4c, 0x70, 0xc4, 0xf8, 0xbc, 0x80, 0xc9, 0xf5, 0xb1, 0x8d,
-	0x39, 0x05, 0x41, 0x7d, 0xbb, 0x87, 0xc3, 0xff, 0x4b, 0x77,
-	0x33, 0x0f, 0x46, 0x7a, 0x3e, 0x02, 0xb6, 0x8a, 0xce, 0xf2,
-	0x5c, 0x60, 0x24, 0x18, 0xac, 0x90, 0xd4, 0xe8, 0xa1, 0x9d,
-	0xd9, 0xe5, 0x51, 0x6d, 0x29, 0x15, 0x68, 0x54, 0x10, 0x2c,
-	0x98, 0xa4, 0xe0, 0xdc, 0x95, 0xa9, 0xed, 0xd1, 0x65, 0x59,
-	0x1d, 0x21, 0x8f, 0xb3, 0xf7, 0xcb, 0x7f, 0x43, 0x07, 0x3b,
-	0x72, 0x4e, 0x0a, 0x36, 0x82, 0xbe, 0xfa, 0xc6, 0x6b, 0x57,
-	0x13, 0x2f, 0x9b, 0xa7, 0xe3, 0xdf, 0x96, 0xaa, 0xee, 0xd2,
-	0x66, 0x5a, 0x1e, 0x22, 0x8c, 0xb0, 0xf4, 0xc8, 0x7c, 0x40,
-	0x04, 0x38, 0x71, 0x4d, 0x09, 0x35, 0x81, 0xbd, 0xf9, 0xc5,
-	0xb8, 0x84, 0xc0, 0xfc, 0x48, 0x74, 0x30, 0x0c, 0x45, 0x79,
-	0x3d, 0x01, 0xb5, 0x89, 0xcd, 0xf1, 0x5f, 0x63, 0x27, 0x1b,
-	0xaf, 0x93, 0xd7, 0xeb, 0xa2, 0x9e, 0xda, 0xe6, 0x52, 0x6e,
-	0x2a, 0x16, 0xd0, 0xec, 0xa8, 0x94, 0x20, 0x1c, 0x58, 0x64,
-	0x2d, 0x11, 0x55, 0x69, 0xdd, 0xe1, 0xa5, 0x99, 0x37, 0x0b,
-	0x4f, 0x73, 0xc7, 0xfb, 0xbf, 0x83, 0xca, 0xf6, 0xb2, 0x8e,
-	0x3a, 0x06, 0x42, 0x7e, 0x03, 0x3f, 0x7b, 0x47, 0xf3, 0xcf,
-	0x8b, 0xb7, 0xfe, 0xc2, 0x86, 0xba, 0x0e, 0x32, 0x76, 0x4a,
-	0xe4, 0xd8, 0x9c, 0xa0, 0x14, 0x28, 0x6c, 0x50, 0x19, 0x25,
-	0x61, 0x5d, 0xe9, 0xd5, 0x91, 0xad, 0x00, 0x3d, 0x7a, 0x47,
-	0xf4, 0xc9, 0x8e, 0xb3, 0xf5, 0xc8, 0x8f, 0xb2, 0x01, 0x3c,
-	0x7b, 0x46, 0xf7, 0xca, 0x8d, 0xb0, 0x03, 0x3e, 0x79, 0x44,
-	0x02, 0x3f, 0x78, 0x45, 0xf6, 0xcb, 0x8c, 0xb1, 0xf3, 0xce,
-	0x89, 0xb4, 0x07, 0x3a, 0x7d, 0x40, 0x06, 0x3b, 0x7c, 0x41,
-	0xf2, 0xcf, 0x88, 0xb5, 0x04, 0x39, 0x7e, 0x43, 0xf0, 0xcd,
-	0x8a, 0xb7, 0xf1, 0xcc, 0x8b, 0xb6, 0x05, 0x38, 0x7f, 0x42,
-	0xfb, 0xc6, 0x81, 0xbc, 0x0f, 0x32, 0x75, 0x48, 0x0e, 0x33,
-	0x74, 0x49, 0xfa, 0xc7, 0x80, 0xbd, 0x0c, 0x31, 0x76, 0x4b,
-	0xf8, 0xc5, 0x82, 0xbf, 0xf9, 0xc4, 0x83, 0xbe, 0x0d, 0x30,
-	0x77, 0x4a, 0x08, 0x35, 0x72, 0x4f, 0xfc, 0xc1, 0x86, 0xbb,
-	0xfd, 0xc0, 0x87, 0xba, 0x09, 0x34, 0x73, 0x4e, 0xff, 0xc2,
-	0x85, 0xb8, 0x0b, 0x36, 0x71, 0x4c, 0x0a, 0x37, 0x70, 0x4d,
-	0xfe, 0xc3, 0x84, 0xb9, 0xeb, 0xd6, 0x91, 0xac, 0x1f, 0x22,
-	0x65, 0x58, 0x1e, 0x23, 0x64, 0x59, 0xea, 0xd7, 0x90, 0xad,
-	0x1c, 0x21, 0x66, 0x5b, 0xe8, 0xd5, 0x92, 0xaf, 0xe9, 0xd4,
-	0x93, 0xae, 0x1d, 0x20, 0x67, 0x5a, 0x18, 0x25, 0x62, 0x5f,
-	0xec, 0xd1, 0x96, 0xab, 0xed, 0xd0, 0x97, 0xaa, 0x19, 0x24,
-	0x63, 0x5e, 0xef, 0xd2, 0x95, 0xa8, 0x1b, 0x26, 0x61, 0x5c,
-	0x1a, 0x27, 0x60, 0x5d, 0xee, 0xd3, 0x94, 0xa9, 0x10, 0x2d,
-	0x6a, 0x57, 0xe4, 0xd9, 0x9e, 0xa3, 0xe5, 0xd8, 0x9f, 0xa2,
-	0x11, 0x2c, 0x6b, 0x56, 0xe7, 0xda, 0x9d, 0xa0, 0x13, 0x2e,
-	0x69, 0x54, 0x12, 0x2f, 0x68, 0x55, 0xe6, 0xdb, 0x9c, 0xa1,
-	0xe3, 0xde, 0x99, 0xa4, 0x17, 0x2a, 0x6d, 0x50, 0x16, 0x2b,
-	0x6c, 0x51, 0xe2, 0xdf, 0x98, 0xa5, 0x14, 0x29, 0x6e, 0x53,
-	0xe0, 0xdd, 0x9a, 0xa7, 0xe1, 0xdc, 0x9b, 0xa6, 0x15, 0x28,
-	0x6f, 0x52, 0x00, 0x3e, 0x7c, 0x42, 0xf8, 0xc6, 0x84, 0xba,
-	0xed, 0xd3, 0x91, 0xaf, 0x15, 0x2b, 0x69, 0x57, 0xc7, 0xf9,
-	0xbb, 0x85, 0x3f, 0x01, 0x43, 0x7d, 0x2a, 0x14, 0x56, 0x68,
-	0xd2, 0xec, 0xae, 0x90, 0x93, 0xad, 0xef, 0xd1, 0x6b, 0x55,
-	0x17, 0x29, 0x7e, 0x40, 0x02, 0x3c, 0x86, 0xb8, 0xfa, 0xc4,
-	0x54, 0x6a, 0x28, 0x16, 0xac, 0x92, 0xd0, 0xee, 0xb9, 0x87,
-	0xc5, 0xfb, 0x41, 0x7f, 0x3d, 0x03, 0x3b, 0x05, 0x47, 0x79,
-	0xc3, 0xfd, 0xbf, 0x81, 0xd6, 0xe8, 0xaa, 0x94, 0x2e, 0x10,
-	0x52, 0x6c, 0xfc, 0xc2, 0x80, 0xbe, 0x04, 0x3a, 0x78, 0x46,
-	0x11, 0x2f, 0x6d, 0x53, 0xe9, 0xd7, 0x95, 0xab, 0xa8, 0x96,
-	0xd4, 0xea, 0x50, 0x6e, 0x2c, 0x12, 0x45, 0x7b, 0x39, 0x07,
-	0xbd, 0x83, 0xc1, 0xff, 0x6f, 0x51, 0x13, 0x2d, 0x97, 0xa9,
-	0xeb, 0xd5, 0x82, 0xbc, 0xfe, 0xc0, 0x7a, 0x44, 0x06, 0x38,
-	0x76, 0x48, 0x0a, 0x34, 0x8e, 0xb0, 0xf2, 0xcc, 0x9b, 0xa5,
-	0xe7, 0xd9, 0x63, 0x5d, 0x1f, 0x21, 0xb1, 0x8f, 0xcd, 0xf3,
-	0x49, 0x77, 0x35, 0x0b, 0x5c, 0x62, 0x20, 0x1e, 0xa4, 0x9a,
-	0xd8, 0xe6, 0xe5, 0xdb, 0x99, 0xa7, 0x1d, 0x23, 0x61, 0x5f,
-	0x08, 0x36, 0x74, 0x4a, 0xf0, 0xce, 0x8c, 0xb2, 0x22, 0x1c,
-	0x5e, 0x60, 0xda, 0xe4, 0xa6, 0x98, 0xcf, 0xf1, 0xb3, 0x8d,
-	0x37, 0x09, 0x4b, 0x75, 0x4d, 0x73, 0x31, 0x0f, 0xb5, 0x8b,
-	0xc9, 0xf7, 0xa0, 0x9e, 0xdc, 0xe2, 0x58, 0x66, 0x24, 0x1a,
-	0x8a, 0xb4, 0xf6, 0xc8, 0x72, 0x4c, 0x0e, 0x30, 0x67, 0x59,
-	0x1b, 0x25, 0x9f, 0xa1, 0xe3, 0xdd, 0xde, 0xe0, 0xa2, 0x9c,
-	0x26, 0x18, 0x5a, 0x64, 0x33, 0x0d, 0x4f, 0x71, 0xcb, 0xf5,
-	0xb7, 0x89, 0x19, 0x27, 0x65, 0x5b, 0xe1, 0xdf, 0x9d, 0xa3,
-	0xf4, 0xca, 0x88, 0xb6, 0x0c, 0x32, 0x70, 0x4e, 0x00, 0x3f,
-	0x7e, 0x41, 0xfc, 0xc3, 0x82, 0xbd, 0xe5, 0xda, 0x9b, 0xa4,
-	0x19, 0x26, 0x67, 0x58, 0xd7, 0xe8, 0xa9, 0x96, 0x2b, 0x14,
-	0x55, 0x6a, 0x32, 0x0d, 0x4c, 0x73, 0xce, 0xf1, 0xb0, 0x8f,
-	0xb3, 0x8c, 0xcd, 0xf2, 0x4f, 0x70, 0x31, 0x0e, 0x56, 0x69,
-	0x28, 0x17, 0xaa, 0x95, 0xd4, 0xeb, 0x64, 0x5b, 0x1a, 0x25,
-	0x98, 0xa7, 0xe6, 0xd9, 0x81, 0xbe, 0xff, 0xc0, 0x7d, 0x42,
-	0x03, 0x3c, 0x7b, 0x44, 0x05, 0x3a, 0x87, 0xb8, 0xf9, 0xc6,
-	0x9e, 0xa1, 0xe0, 0xdf, 0x62, 0x5d, 0x1c, 0x23, 0xac, 0x93,
-	0xd2, 0xed, 0x50, 0x6f, 0x2e, 0x11, 0x49, 0x76, 0x37, 0x08,
-	0xb5, 0x8a, 0xcb, 0xf4, 0xc8, 0xf7, 0xb6, 0x89, 0x34, 0x0b,
-	0x4a, 0x75, 0x2d, 0x12, 0x53, 0x6c, 0xd1, 0xee, 0xaf, 0x90,
-	0x1f, 0x20, 0x61, 0x5e, 0xe3, 0xdc, 0x9d, 0xa2, 0xfa, 0xc5,
-	0x84, 0xbb, 0x06, 0x39, 0x78, 0x47, 0xf6, 0xc9, 0x88, 0xb7,
-	0x0a, 0x35, 0x74, 0x4b, 0x13, 0x2c, 0x6d, 0x52, 0xef, 0xd0,
-	0x91, 0xae, 0x21, 0x1e, 0x5f, 0x60, 0xdd, 0xe2, 0xa3, 0x9c,
-	0xc4, 0xfb, 0xba, 0x85, 0x38, 0x07, 0x46, 0x79, 0x45, 0x7a,
-	0x3b, 0x04, 0xb9, 0x86, 0xc7, 0xf8, 0xa0, 0x9f, 0xde, 0xe1,
-	0x5c, 0x63, 0x22, 0x1d, 0x92, 0xad, 0xec, 0xd3, 0x6e, 0x51,
-	0x10, 0x2f, 0x77, 0x48, 0x09, 0x36, 0x8b, 0xb4, 0xf5, 0xca,
-	0x8d, 0xb2, 0xf3, 0xcc, 0x71, 0x4e, 0x0f, 0x30, 0x68, 0x57,
-	0x16, 0x29, 0x94, 0xab, 0xea, 0xd5, 0x5a, 0x65, 0x24, 0x1b,
-	0xa6, 0x99, 0xd8, 0xe7, 0xbf, 0x80, 0xc1, 0xfe, 0x43, 0x7c,
-	0x3d, 0x02, 0x3e, 0x01, 0x40, 0x7f, 0xc2, 0xfd, 0xbc, 0x83,
-	0xdb, 0xe4, 0xa5, 0x9a, 0x27, 0x18, 0x59, 0x66, 0xe9, 0xd6,
-	0x97, 0xa8, 0x15, 0x2a, 0x6b, 0x54, 0x0c, 0x33, 0x72, 0x4d,
-	0xf0, 0xcf, 0x8e, 0xb1, 0x00, 0x40, 0x80, 0xc0, 0x1d, 0x5d,
-	0x9d, 0xdd, 0x3a, 0x7a, 0xba, 0xfa, 0x27, 0x67, 0xa7, 0xe7,
-	0x74, 0x34, 0xf4, 0xb4, 0x69, 0x29, 0xe9, 0xa9, 0x4e, 0x0e,
-	0xce, 0x8e, 0x53, 0x13, 0xd3, 0x93, 0xe8, 0xa8, 0x68, 0x28,
-	0xf5, 0xb5, 0x75, 0x35, 0xd2, 0x92, 0x52, 0x12, 0xcf, 0x8f,
-	0x4f, 0x0f, 0x9c, 0xdc, 0x1c, 0x5c, 0x81, 0xc1, 0x01, 0x41,
-	0xa6, 0xe6, 0x26, 0x66, 0xbb, 0xfb, 0x3b, 0x7b, 0xcd, 0x8d,
-	0x4d, 0x0d, 0xd0, 0x90, 0x50, 0x10, 0xf7, 0xb7, 0x77, 0x37,
-	0xea, 0xaa, 0x6a, 0x2a, 0xb9, 0xf9, 0x39, 0x79, 0xa4, 0xe4,
-	0x24, 0x64, 0x83, 0xc3, 0x03, 0x43, 0x9e, 0xde, 0x1e, 0x5e,
-	0x25, 0x65, 0xa5, 0xe5, 0x38, 0x78, 0xb8, 0xf8, 0x1f, 0x5f,
-	0x9f, 0xdf, 0x02, 0x42, 0x82, 0xc2, 0x51, 0x11, 0xd1, 0x91,
-	0x4c, 0x0c, 0xcc, 0x8c, 0x6b, 0x2b, 0xeb, 0xab, 0x76, 0x36,
-	0xf6, 0xb6, 0x87, 0xc7, 0x07, 0x47, 0x9a, 0xda, 0x1a, 0x5a,
-	0xbd, 0xfd, 0x3d, 0x7d, 0xa0, 0xe0, 0x20, 0x60, 0xf3, 0xb3,
-	0x73, 0x33, 0xee, 0xae, 0x6e, 0x2e, 0xc9, 0x89, 0x49, 0x09,
-	0xd4, 0x94, 0x54, 0x14, 0x6f, 0x2f, 0xef, 0xaf, 0x72, 0x32,
-	0xf2, 0xb2, 0x55, 0x15, 0xd5, 0x95, 0x48, 0x08, 0xc8, 0x88,
-	0x1b, 0x5b, 0x9b, 0xdb, 0x06, 0x46, 0x86, 0xc6, 0x21, 0x61,
-	0xa1, 0xe1, 0x3c, 0x7c, 0xbc, 0xfc, 0x4a, 0x0a, 0xca, 0x8a,
-	0x57, 0x17, 0xd7, 0x97, 0x70, 0x30, 0xf0, 0xb0, 0x6d, 0x2d,
-	0xed, 0xad, 0x3e, 0x7e, 0xbe, 0xfe, 0x23, 0x63, 0xa3, 0xe3,
-	0x04, 0x44, 0x84, 0xc4, 0x19, 0x59, 0x99, 0xd9, 0xa2, 0xe2,
-	0x22, 0x62, 0xbf, 0xff, 0x3f, 0x7f, 0x98, 0xd8, 0x18, 0x58,
-	0x85, 0xc5, 0x05, 0x45, 0xd6, 0x96, 0x56, 0x16, 0xcb, 0x8b,
-	0x4b, 0x0b, 0xec, 0xac, 0x6c, 0x2c, 0xf1, 0xb1, 0x71, 0x31,
-	0x00, 0x41, 0x82, 0xc3, 0x19, 0x58, 0x9b, 0xda, 0x32, 0x73,
-	0xb0, 0xf1, 0x2b, 0x6a, 0xa9, 0xe8, 0x64, 0x25, 0xe6, 0xa7,
-	0x7d, 0x3c, 0xff, 0xbe, 0x56, 0x17, 0xd4, 0x95, 0x4f, 0x0e,
-	0xcd, 0x8c, 0xc8, 0x89, 0x4a, 0x0b, 0xd1, 0x90, 0x53, 0x12,
-	0xfa, 0xbb, 0x78, 0x39, 0xe3, 0xa2, 0x61, 0x20, 0xac, 0xed,
-	0x2e, 0x6f, 0xb5, 0xf4, 0x37, 0x76, 0x9e, 0xdf, 0x1c, 0x5d,
-	0x87, 0xc6, 0x05, 0x44, 0x8d, 0xcc, 0x0f, 0x4e, 0x94, 0xd5,
-	0x16, 0x57, 0xbf, 0xfe, 0x3d, 0x7c, 0xa6, 0xe7, 0x24, 0x65,
-	0xe9, 0xa8, 0x6b, 0x2a, 0xf0, 0xb1, 0x72, 0x33, 0xdb, 0x9a,
-	0x59, 0x18, 0xc2, 0x83, 0x40, 0x01, 0x45, 0x04, 0xc7, 0x86,
-	0x5c, 0x1d, 0xde, 0x9f, 0x77, 0x36, 0xf5, 0xb4, 0x6e, 0x2f,
-	0xec, 0xad, 0x21, 0x60, 0xa3, 0xe2, 0x38, 0x79, 0xba, 0xfb,
-	0x13, 0x52, 0x91, 0xd0, 0x0a, 0x4b, 0x88, 0xc9, 0x07, 0x46,
-	0x85, 0xc4, 0x1e, 0x5f, 0x9c, 0xdd, 0x35, 0x74, 0xb7, 0xf6,
-	0x2c, 0x6d, 0xae, 0xef, 0x63, 0x22, 0xe1, 0xa0, 0x7a, 0x3b,
-	0xf8, 0xb9, 0x51, 0x10, 0xd3, 0x92, 0x48, 0x09, 0xca, 0x8b,
-	0xcf, 0x8e, 0x4d, 0x0c, 0xd6, 0x97, 0x54, 0x15, 0xfd, 0xbc,
-	0x7f, 0x3e, 0xe4, 0xa5, 0x66, 0x27, 0xab, 0xea, 0x29, 0x68,
-	0xb2, 0xf3, 0x30, 0x71, 0x99, 0xd8, 0x1b, 0x5a, 0x80, 0xc1,
-	0x02, 0x43, 0x8a, 0xcb, 0x08, 0x49, 0x93, 0xd2, 0x11, 0x50,
-	0xb8, 0xf9, 0x3a, 0x7b, 0xa1, 0xe0, 0x23, 0x62, 0xee, 0xaf,
-	0x6c, 0x2d, 0xf7, 0xb6, 0x75, 0x34, 0xdc, 0x9d, 0x5e, 0x1f,
-	0xc5, 0x84, 0x47, 0x06, 0x42, 0x03, 0xc0, 0x81, 0x5b, 0x1a,
-	0xd9, 0x98, 0x70, 0x31, 0xf2, 0xb3, 0x69, 0x28, 0xeb, 0xaa,
-	0x26, 0x67, 0xa4, 0xe5, 0x3f, 0x7e, 0xbd, 0xfc, 0x14, 0x55,
-	0x96, 0xd7, 0x0d, 0x4c, 0x8f, 0xce, 0x00, 0x42, 0x84, 0xc6,
-	0x15, 0x57, 0x91, 0xd3, 0x2a, 0x68, 0xae, 0xec, 0x3f, 0x7d,
-	0xbb, 0xf9, 0x54, 0x16, 0xd0, 0x92, 0x41, 0x03, 0xc5, 0x87,
-	0x7e, 0x3c, 0xfa, 0xb8, 0x6b, 0x29, 0xef, 0xad, 0xa8, 0xea,
-	0x2c, 0x6e, 0xbd, 0xff, 0x39, 0x7b, 0x82, 0xc0, 0x06, 0x44,
-	0x97, 0xd5, 0x13, 0x51, 0xfc, 0xbe, 0x78, 0x3a, 0xe9, 0xab,
-	0x6d, 0x2f, 0xd6, 0x94, 0x52, 0x10, 0xc3, 0x81, 0x47, 0x05,
-	0x4d, 0x0f, 0xc9, 0x8b, 0x58, 0x1a, 0xdc, 0x9e, 0x67, 0x25,
-	0xe3, 0xa1, 0x72, 0x30, 0xf6, 0xb4, 0x19, 0x5b, 0x9d, 0xdf,
-	0x0c, 0x4e, 0x88, 0xca, 0x33, 0x71, 0xb7, 0xf5, 0x26, 0x64,
-	0xa2, 0xe0, 0xe5, 0xa7, 0x61, 0x23, 0xf0, 0xb2, 0x74, 0x36,
-	0xcf, 0x8d, 0x4b, 0x09, 0xda, 0x98, 0x5e, 0x1c, 0xb1, 0xf3,
-	0x35, 0x77, 0xa4, 0xe6, 0x20, 0x62, 0x9b, 0xd9, 0x1f, 0x5d,
-	0x8e, 0xcc, 0x0a, 0x48, 0x9a, 0xd8, 0x1e, 0x5c, 0x8f, 0xcd,
-	0x0b, 0x49, 0xb0, 0xf2, 0x34, 0x76, 0xa5, 0xe7, 0x21, 0x63,
-	0xce, 0x8c, 0x4a, 0x08, 0xdb, 0x99, 0x5f, 0x1d, 0xe4, 0xa6,
-	0x60, 0x22, 0xf1, 0xb3, 0x75, 0x37, 0x32, 0x70, 0xb6, 0xf4,
-	0x27, 0x65, 0xa3, 0xe1, 0x18, 0x5a, 0x9c, 0xde, 0x0d, 0x4f,
-	0x89, 0xcb, 0x66, 0x24, 0xe2, 0xa0, 0x73, 0x31, 0xf7, 0xb5,
-	0x4c, 0x0e, 0xc8, 0x8a, 0x59, 0x1b, 0xdd, 0x9f, 0xd7, 0x95,
-	0x53, 0x11, 0xc2, 0x80, 0x46, 0x04, 0xfd, 0xbf, 0x79, 0x3b,
-	0xe8, 0xaa, 0x6c, 0x2e, 0x83, 0xc1, 0x07, 0x45, 0x96, 0xd4,
-	0x12, 0x50, 0xa9, 0xeb, 0x2d, 0x6f, 0xbc, 0xfe, 0x38, 0x7a,
-	0x7f, 0x3d, 0xfb, 0xb9, 0x6a, 0x28, 0xee, 0xac, 0x55, 0x17,
-	0xd1, 0x93, 0x40, 0x02, 0xc4, 0x86, 0x2b, 0x69, 0xaf, 0xed,
-	0x3e, 0x7c, 0xba, 0xf8, 0x01, 0x43, 0x85, 0xc7, 0x14, 0x56,
-	0x90, 0xd2, 0x00, 0x43, 0x86, 0xc5, 0x11, 0x52, 0x97, 0xd4,
-	0x22, 0x61, 0xa4, 0xe7, 0x33, 0x70, 0xb5, 0xf6, 0x44, 0x07,
-	0xc2, 0x81, 0x55, 0x16, 0xd3, 0x90, 0x66, 0x25, 0xe0, 0xa3,
-	0x77, 0x34, 0xf1, 0xb2, 0x88, 0xcb, 0x0e, 0x4d, 0x99, 0xda,
-	0x1f, 0x5c, 0xaa, 0xe9, 0x2c, 0x6f, 0xbb, 0xf8, 0x3d, 0x7e,
-	0xcc, 0x8f, 0x4a, 0x09, 0xdd, 0x9e, 0x5b, 0x18, 0xee, 0xad,
-	0x68, 0x2b, 0xff, 0xbc, 0x79, 0x3a, 0x0d, 0x4e, 0x8b, 0xc8,
-	0x1c, 0x5f, 0x9a, 0xd9, 0x2f, 0x6c, 0xa9, 0xea, 0x3e, 0x7d,
-	0xb8, 0xfb, 0x49, 0x0a, 0xcf, 0x8c, 0x58, 0x1b, 0xde, 0x9d,
-	0x6b, 0x28, 0xed, 0xae, 0x7a, 0x39, 0xfc, 0xbf, 0x85, 0xc6,
-	0x03, 0x40, 0x94, 0xd7, 0x12, 0x51, 0xa7, 0xe4, 0x21, 0x62,
-	0xb6, 0xf5, 0x30, 0x73, 0xc1, 0x82, 0x47, 0x04, 0xd0, 0x93,
-	0x56, 0x15, 0xe3, 0xa0, 0x65, 0x26, 0xf2, 0xb1, 0x74, 0x37,
-	0x1a, 0x59, 0x9c, 0xdf, 0x0b, 0x48, 0x8d, 0xce, 0x38, 0x7b,
-	0xbe, 0xfd, 0x29, 0x6a, 0xaf, 0xec, 0x5e, 0x1d, 0xd8, 0x9b,
-	0x4f, 0x0c, 0xc9, 0x8a, 0x7c, 0x3f, 0xfa, 0xb9, 0x6d, 0x2e,
-	0xeb, 0xa8, 0x92, 0xd1, 0x14, 0x57, 0x83, 0xc0, 0x05, 0x46,
-	0xb0, 0xf3, 0x36, 0x75, 0xa1, 0xe2, 0x27, 0x64, 0xd6, 0x95,
-	0x50, 0x13, 0xc7, 0x84, 0x41, 0x02, 0xf4, 0xb7, 0x72, 0x31,
-	0xe5, 0xa6, 0x63, 0x20, 0x17, 0x54, 0x91, 0xd2, 0x06, 0x45,
-	0x80, 0xc3, 0x35, 0x76, 0xb3, 0xf0, 0x24, 0x67, 0xa2, 0xe1,
-	0x53, 0x10, 0xd5, 0x96, 0x42, 0x01, 0xc4, 0x87, 0x71, 0x32,
-	0xf7, 0xb4, 0x60, 0x23, 0xe6, 0xa5, 0x9f, 0xdc, 0x19, 0x5a,
-	0x8e, 0xcd, 0x08, 0x4b, 0xbd, 0xfe, 0x3b, 0x78, 0xac, 0xef,
-	0x2a, 0x69, 0xdb, 0x98, 0x5d, 0x1e, 0xca, 0x89, 0x4c, 0x0f,
-	0xf9, 0xba, 0x7f, 0x3c, 0xe8, 0xab, 0x6e, 0x2d, 0x00, 0x44,
-	0x88, 0xcc, 0x0d, 0x49, 0x85, 0xc1, 0x1a, 0x5e, 0x92, 0xd6,
-	0x17, 0x53, 0x9f, 0xdb, 0x34, 0x70, 0xbc, 0xf8, 0x39, 0x7d,
-	0xb1, 0xf5, 0x2e, 0x6a, 0xa6, 0xe2, 0x23, 0x67, 0xab, 0xef,
-	0x68, 0x2c, 0xe0, 0xa4, 0x65, 0x21, 0xed, 0xa9, 0x72, 0x36,
-	0xfa, 0xbe, 0x7f, 0x3b, 0xf7, 0xb3, 0x5c, 0x18, 0xd4, 0x90,
-	0x51, 0x15, 0xd9, 0x9d, 0x46, 0x02, 0xce, 0x8a, 0x4b, 0x0f,
-	0xc3, 0x87, 0xd0, 0x94, 0x58, 0x1c, 0xdd, 0x99, 0x55, 0x11,
-	0xca, 0x8e, 0x42, 0x06, 0xc7, 0x83, 0x4f, 0x0b, 0xe4, 0xa0,
-	0x6c, 0x28, 0xe9, 0xad, 0x61, 0x25, 0xfe, 0xba, 0x76, 0x32,
-	0xf3, 0xb7, 0x7b, 0x3f, 0xb8, 0xfc, 0x30, 0x74, 0xb5, 0xf1,
-	0x3d, 0x79, 0xa2, 0xe6, 0x2a, 0x6e, 0xaf, 0xeb, 0x27, 0x63,
-	0x8c, 0xc8, 0x04, 0x40, 0x81, 0xc5, 0x09, 0x4d, 0x96, 0xd2,
-	0x1e, 0x5a, 0x9b, 0xdf, 0x13, 0x57, 0xbd, 0xf9, 0x35, 0x71,
-	0xb0, 0xf4, 0x38, 0x7c, 0xa7, 0xe3, 0x2f, 0x6b, 0xaa, 0xee,
-	0x22, 0x66, 0x89, 0xcd, 0x01, 0x45, 0x84, 0xc0, 0x0c, 0x48,
-	0x93, 0xd7, 0x1b, 0x5f, 0x9e, 0xda, 0x16, 0x52, 0xd5, 0x91,
-	0x5d, 0x19, 0xd8, 0x9c, 0x50, 0x14, 0xcf, 0x8b, 0x47, 0x03,
-	0xc2, 0x86, 0x4a, 0x0e, 0xe1, 0xa5, 0x69, 0x2d, 0xec, 0xa8,
-	0x64, 0x20, 0xfb, 0xbf, 0x73, 0x37, 0xf6, 0xb2, 0x7e, 0x3a,
-	0x6d, 0x29, 0xe5, 0xa1, 0x60, 0x24, 0xe8, 0xac, 0x77, 0x33,
-	0xff, 0xbb, 0x7a, 0x3e, 0xf2, 0xb6, 0x59, 0x1d, 0xd1, 0x95,
-	0x54, 0x10, 0xdc, 0x98, 0x43, 0x07, 0xcb, 0x8f, 0x4e, 0x0a,
-	0xc6, 0x82, 0x05, 0x41, 0x8d, 0xc9, 0x08, 0x4c, 0x80, 0xc4,
-	0x1f, 0x5b, 0x97, 0xd3, 0x12, 0x56, 0x9a, 0xde, 0x31, 0x75,
-	0xb9, 0xfd, 0x3c, 0x78, 0xb4, 0xf0, 0x2b, 0x6f, 0xa3, 0xe7,
-	0x26, 0x62, 0xae, 0xea, 0x00, 0x45, 0x8a, 0xcf, 0x09, 0x4c,
-	0x83, 0xc6, 0x12, 0x57, 0x98, 0xdd, 0x1b, 0x5e, 0x91, 0xd4,
-	0x24, 0x61, 0xae, 0xeb, 0x2d, 0x68, 0xa7, 0xe2, 0x36, 0x73,
-	0xbc, 0xf9, 0x3f, 0x7a, 0xb5, 0xf0, 0x48, 0x0d, 0xc2, 0x87,
-	0x41, 0x04, 0xcb, 0x8e, 0x5a, 0x1f, 0xd0, 0x95, 0x53, 0x16,
-	0xd9, 0x9c, 0x6c, 0x29, 0xe6, 0xa3, 0x65, 0x20, 0xef, 0xaa,
-	0x7e, 0x3b, 0xf4, 0xb1, 0x77, 0x32, 0xfd, 0xb8, 0x90, 0xd5,
-	0x1a, 0x5f, 0x99, 0xdc, 0x13, 0x56, 0x82, 0xc7, 0x08, 0x4d,
-	0x8b, 0xce, 0x01, 0x44, 0xb4, 0xf1, 0x3e, 0x7b, 0xbd, 0xf8,
-	0x37, 0x72, 0xa6, 0xe3, 0x2c, 0x69, 0xaf, 0xea, 0x25, 0x60,
-	0xd8, 0x9d, 0x52, 0x17, 0xd1, 0x94, 0x5b, 0x1e, 0xca, 0x8f,
-	0x40, 0x05, 0xc3, 0x86, 0x49, 0x0c, 0xfc, 0xb9, 0x76, 0x33,
-	0xf5, 0xb0, 0x7f, 0x3a, 0xee, 0xab, 0x64, 0x21, 0xe7, 0xa2,
-	0x6d, 0x28, 0x3d, 0x78, 0xb7, 0xf2, 0x34, 0x71, 0xbe, 0xfb,
-	0x2f, 0x6a, 0xa5, 0xe0, 0x26, 0x63, 0xac, 0xe9, 0x19, 0x5c,
-	0x93, 0xd6, 0x10, 0x55, 0x9a, 0xdf, 0x0b, 0x4e, 0x81, 0xc4,
-	0x02, 0x47, 0x88, 0xcd, 0x75, 0x30, 0xff, 0xba, 0x7c, 0x39,
-	0xf6, 0xb3, 0x67, 0x22, 0xed, 0xa8, 0x6e, 0x2b, 0xe4, 0xa1,
-	0x51, 0x14, 0xdb, 0x9e, 0x58, 0x1d, 0xd2, 0x97, 0x43, 0x06,
-	0xc9, 0x8c, 0x4a, 0x0f, 0xc0, 0x85, 0xad, 0xe8, 0x27, 0x62,
-	0xa4, 0xe1, 0x2e, 0x6b, 0xbf, 0xfa, 0x35, 0x70, 0xb6, 0xf3,
-	0x3c, 0x79, 0x89, 0xcc, 0x03, 0x46, 0x80, 0xc5, 0x0a, 0x4f,
-	0x9b, 0xde, 0x11, 0x54, 0x92, 0xd7, 0x18, 0x5d, 0xe5, 0xa0,
-	0x6f, 0x2a, 0xec, 0xa9, 0x66, 0x23, 0xf7, 0xb2, 0x7d, 0x38,
-	0xfe, 0xbb, 0x74, 0x31, 0xc1, 0x84, 0x4b, 0x0e, 0xc8, 0x8d,
-	0x42, 0x07, 0xd3, 0x96, 0x59, 0x1c, 0xda, 0x9f, 0x50, 0x15,
-	0x00, 0x46, 0x8c, 0xca, 0x05, 0x43, 0x89, 0xcf, 0x0a, 0x4c,
-	0x86, 0xc0, 0x0f, 0x49, 0x83, 0xc5, 0x14, 0x52, 0x98, 0xde,
-	0x11, 0x57, 0x9d, 0xdb, 0x1e, 0x58, 0x92, 0xd4, 0x1b, 0x5d,
-	0x97, 0xd1, 0x28, 0x6e, 0xa4, 0xe2, 0x2d, 0x6b, 0xa1, 0xe7,
-	0x22, 0x64, 0xae, 0xe8, 0x27, 0x61, 0xab, 0xed, 0x3c, 0x7a,
-	0xb0, 0xf6, 0x39, 0x7f, 0xb5, 0xf3, 0x36, 0x70, 0xba, 0xfc,
-	0x33, 0x75, 0xbf, 0xf9, 0x50, 0x16, 0xdc, 0x9a, 0x55, 0x13,
-	0xd9, 0x9f, 0x5a, 0x1c, 0xd6, 0x90, 0x5f, 0x19, 0xd3, 0x95,
-	0x44, 0x02, 0xc8, 0x8e, 0x41, 0x07, 0xcd, 0x8b, 0x4e, 0x08,
-	0xc2, 0x84, 0x4b, 0x0d, 0xc7, 0x81, 0x78, 0x3e, 0xf4, 0xb2,
-	0x7d, 0x3b, 0xf1, 0xb7, 0x72, 0x34, 0xfe, 0xb8, 0x77, 0x31,
-	0xfb, 0xbd, 0x6c, 0x2a, 0xe0, 0xa6, 0x69, 0x2f, 0xe5, 0xa3,
-	0x66, 0x20, 0xea, 0xac, 0x63, 0x25, 0xef, 0xa9, 0xa0, 0xe6,
-	0x2c, 0x6a, 0xa5, 0xe3, 0x29, 0x6f, 0xaa, 0xec, 0x26, 0x60,
-	0xaf, 0xe9, 0x23, 0x65, 0xb4, 0xf2, 0x38, 0x7e, 0xb1, 0xf7,
-	0x3d, 0x7b, 0xbe, 0xf8, 0x32, 0x74, 0xbb, 0xfd, 0x37, 0x71,
-	0x88, 0xce, 0x04, 0x42, 0x8d, 0xcb, 0x01, 0x47, 0x82, 0xc4,
-	0x0e, 0x48, 0x87, 0xc1, 0x0b, 0x4d, 0x9c, 0xda, 0x10, 0x56,
-	0x99, 0xdf, 0x15, 0x53, 0x96, 0xd0, 0x1a, 0x5c, 0x93, 0xd5,
-	0x1f, 0x59, 0xf0, 0xb6, 0x7c, 0x3a, 0xf5, 0xb3, 0x79, 0x3f,
-	0xfa, 0xbc, 0x76, 0x30, 0xff, 0xb9, 0x73, 0x35, 0xe4, 0xa2,
-	0x68, 0x2e, 0xe1, 0xa7, 0x6d, 0x2b, 0xee, 0xa8, 0x62, 0x24,
-	0xeb, 0xad, 0x67, 0x21, 0xd8, 0x9e, 0x54, 0x12, 0xdd, 0x9b,
-	0x51, 0x17, 0xd2, 0x94, 0x5e, 0x18, 0xd7, 0x91, 0x5b, 0x1d,
-	0xcc, 0x8a, 0x40, 0x06, 0xc9, 0x8f, 0x45, 0x03, 0xc6, 0x80,
-	0x4a, 0x0c, 0xc3, 0x85, 0x4f, 0x09, 0x00, 0x47, 0x8e, 0xc9,
-	0x01, 0x46, 0x8f, 0xc8, 0x02, 0x45, 0x8c, 0xcb, 0x03, 0x44,
-	0x8d, 0xca, 0x04, 0x43, 0x8a, 0xcd, 0x05, 0x42, 0x8b, 0xcc,
-	0x06, 0x41, 0x88, 0xcf, 0x07, 0x40, 0x89, 0xce, 0x08, 0x4f,
-	0x86, 0xc1, 0x09, 0x4e, 0x87, 0xc0, 0x0a, 0x4d, 0x84, 0xc3,
-	0x0b, 0x4c, 0x85, 0xc2, 0x0c, 0x4b, 0x82, 0xc5, 0x0d, 0x4a,
-	0x83, 0xc4, 0x0e, 0x49, 0x80, 0xc7, 0x0f, 0x48, 0x81, 0xc6,
-	0x10, 0x57, 0x9e, 0xd9, 0x11, 0x56, 0x9f, 0xd8, 0x12, 0x55,
-	0x9c, 0xdb, 0x13, 0x54, 0x9d, 0xda, 0x14, 0x53, 0x9a, 0xdd,
-	0x15, 0x52, 0x9b, 0xdc, 0x16, 0x51, 0x98, 0xdf, 0x17, 0x50,
-	0x99, 0xde, 0x18, 0x5f, 0x96, 0xd1, 0x19, 0x5e, 0x97, 0xd0,
-	0x1a, 0x5d, 0x94, 0xd3, 0x1b, 0x5c, 0x95, 0xd2, 0x1c, 0x5b,
-	0x92, 0xd5, 0x1d, 0x5a, 0x93, 0xd4, 0x1e, 0x59, 0x90, 0xd7,
-	0x1f, 0x58, 0x91, 0xd6, 0x20, 0x67, 0xae, 0xe9, 0x21, 0x66,
-	0xaf, 0xe8, 0x22, 0x65, 0xac, 0xeb, 0x23, 0x64, 0xad, 0xea,
-	0x24, 0x63, 0xaa, 0xed, 0x25, 0x62, 0xab, 0xec, 0x26, 0x61,
-	0xa8, 0xef, 0x27, 0x60, 0xa9, 0xee, 0x28, 0x6f, 0xa6, 0xe1,
-	0x29, 0x6e, 0xa7, 0xe0, 0x2a, 0x6d, 0xa4, 0xe3, 0x2b, 0x6c,
-	0xa5, 0xe2, 0x2c, 0x6b, 0xa2, 0xe5, 0x2d, 0x6a, 0xa3, 0xe4,
-	0x2e, 0x69, 0xa0, 0xe7, 0x2f, 0x68, 0xa1, 0xe6, 0x30, 0x77,
-	0xbe, 0xf9, 0x31, 0x76, 0xbf, 0xf8, 0x32, 0x75, 0xbc, 0xfb,
-	0x33, 0x74, 0xbd, 0xfa, 0x34, 0x73, 0xba, 0xfd, 0x35, 0x72,
-	0xbb, 0xfc, 0x36, 0x71, 0xb8, 0xff, 0x37, 0x70, 0xb9, 0xfe,
-	0x38, 0x7f, 0xb6, 0xf1, 0x39, 0x7e, 0xb7, 0xf0, 0x3a, 0x7d,
-	0xb4, 0xf3, 0x3b, 0x7c, 0xb5, 0xf2, 0x3c, 0x7b, 0xb2, 0xf5,
-	0x3d, 0x7a, 0xb3, 0xf4, 0x3e, 0x79, 0xb0, 0xf7, 0x3f, 0x78,
-	0xb1, 0xf6, 0x00, 0x48, 0x90, 0xd8, 0x3d, 0x75, 0xad, 0xe5,
-	0x7a, 0x32, 0xea, 0xa2, 0x47, 0x0f, 0xd7, 0x9f, 0xf4, 0xbc,
-	0x64, 0x2c, 0xc9, 0x81, 0x59, 0x11, 0x8e, 0xc6, 0x1e, 0x56,
-	0xb3, 0xfb, 0x23, 0x6b, 0xf5, 0xbd, 0x65, 0x2d, 0xc8, 0x80,
-	0x58, 0x10, 0x8f, 0xc7, 0x1f, 0x57, 0xb2, 0xfa, 0x22, 0x6a,
-	0x01, 0x49, 0x91, 0xd9, 0x3c, 0x74, 0xac, 0xe4, 0x7b, 0x33,
-	0xeb, 0xa3, 0x46, 0x0e, 0xd6, 0x9e, 0xf7, 0xbf, 0x67, 0x2f,
-	0xca, 0x82, 0x5a, 0x12, 0x8d, 0xc5, 0x1d, 0x55, 0xb0, 0xf8,
-	0x20, 0x68, 0x03, 0x4b, 0x93, 0xdb, 0x3e, 0x76, 0xae, 0xe6,
-	0x79, 0x31, 0xe9, 0xa1, 0x44, 0x0c, 0xd4, 0x9c, 0x02, 0x4a,
-	0x92, 0xda, 0x3f, 0x77, 0xaf, 0xe7, 0x78, 0x30, 0xe8, 0xa0,
-	0x45, 0x0d, 0xd5, 0x9d, 0xf6, 0xbe, 0x66, 0x2e, 0xcb, 0x83,
-	0x5b, 0x13, 0x8c, 0xc4, 0x1c, 0x54, 0xb1, 0xf9, 0x21, 0x69,
-	0xf3, 0xbb, 0x63, 0x2b, 0xce, 0x86, 0x5e, 0x16, 0x89, 0xc1,
-	0x19, 0x51, 0xb4, 0xfc, 0x24, 0x6c, 0x07, 0x4f, 0x97, 0xdf,
-	0x3a, 0x72, 0xaa, 0xe2, 0x7d, 0x35, 0xed, 0xa5, 0x40, 0x08,
-	0xd0, 0x98, 0x06, 0x4e, 0x96, 0xde, 0x3b, 0x73, 0xab, 0xe3,
-	0x7c, 0x34, 0xec, 0xa4, 0x41, 0x09, 0xd1, 0x99, 0xf2, 0xba,
-	0x62, 0x2a, 0xcf, 0x87, 0x5f, 0x17, 0x88, 0xc0, 0x18, 0x50,
-	0xb5, 0xfd, 0x25, 0x6d, 0x04, 0x4c, 0x94, 0xdc, 0x39, 0x71,
-	0xa9, 0xe1, 0x7e, 0x36, 0xee, 0xa6, 0x43, 0x0b, 0xd3, 0x9b,
-	0xf0, 0xb8, 0x60, 0x28, 0xcd, 0x85, 0x5d, 0x15, 0x8a, 0xc2,
-	0x1a, 0x52, 0xb7, 0xff, 0x27, 0x6f, 0xf1, 0xb9, 0x61, 0x29,
-	0xcc, 0x84, 0x5c, 0x14, 0x8b, 0xc3, 0x1b, 0x53, 0xb6, 0xfe,
-	0x26, 0x6e, 0x05, 0x4d, 0x95, 0xdd, 0x38, 0x70, 0xa8, 0xe0,
-	0x7f, 0x37, 0xef, 0xa7, 0x42, 0x0a, 0xd2, 0x9a, 0x00, 0x49,
-	0x92, 0xdb, 0x39, 0x70, 0xab, 0xe2, 0x72, 0x3b, 0xe0, 0xa9,
-	0x4b, 0x02, 0xd9, 0x90, 0xe4, 0xad, 0x76, 0x3f, 0xdd, 0x94,
-	0x4f, 0x06, 0x96, 0xdf, 0x04, 0x4d, 0xaf, 0xe6, 0x3d, 0x74,
-	0xd5, 0x9c, 0x47, 0x0e, 0xec, 0xa5, 0x7e, 0x37, 0xa7, 0xee,
-	0x35, 0x7c, 0x9e, 0xd7, 0x0c, 0x45, 0x31, 0x78, 0xa3, 0xea,
-	0x08, 0x41, 0x9a, 0xd3, 0x43, 0x0a, 0xd1, 0x98, 0x7a, 0x33,
-	0xe8, 0xa1, 0xb7, 0xfe, 0x25, 0x6c, 0x8e, 0xc7, 0x1c, 0x55,
-	0xc5, 0x8c, 0x57, 0x1e, 0xfc, 0xb5, 0x6e, 0x27, 0x53, 0x1a,
-	0xc1, 0x88, 0x6a, 0x23, 0xf8, 0xb1, 0x21, 0x68, 0xb3, 0xfa,
-	0x18, 0x51, 0x8a, 0xc3, 0x62, 0x2b, 0xf0, 0xb9, 0x5b, 0x12,
-	0xc9, 0x80, 0x10, 0x59, 0x82, 0xcb, 0x29, 0x60, 0xbb, 0xf2,
-	0x86, 0xcf, 0x14, 0x5d, 0xbf, 0xf6, 0x2d, 0x64, 0xf4, 0xbd,
-	0x66, 0x2f, 0xcd, 0x84, 0x5f, 0x16, 0x73, 0x3a, 0xe1, 0xa8,
-	0x4a, 0x03, 0xd8, 0x91, 0x01, 0x48, 0x93, 0xda, 0x38, 0x71,
-	0xaa, 0xe3, 0x97, 0xde, 0x05, 0x4c, 0xae, 0xe7, 0x3c, 0x75,
-	0xe5, 0xac, 0x77, 0x3e, 0xdc, 0x95, 0x4e, 0x07, 0xa6, 0xef,
-	0x34, 0x7d, 0x9f, 0xd6, 0x0d, 0x44, 0xd4, 0x9d, 0x46, 0x0f,
-	0xed, 0xa4, 0x7f, 0x36, 0x42, 0x0b, 0xd0, 0x99, 0x7b, 0x32,
-	0xe9, 0xa0, 0x30, 0x79, 0xa2, 0xeb, 0x09, 0x40, 0x9b, 0xd2,
-	0xc4, 0x8d, 0x56, 0x1f, 0xfd, 0xb4, 0x6f, 0x26, 0xb6, 0xff,
-	0x24, 0x6d, 0x8f, 0xc6, 0x1d, 0x54, 0x20, 0x69, 0xb2, 0xfb,
-	0x19, 0x50, 0x8b, 0xc2, 0x52, 0x1b, 0xc0, 0x89, 0x6b, 0x22,
-	0xf9, 0xb0, 0x11, 0x58, 0x83, 0xca, 0x28, 0x61, 0xba, 0xf3,
-	0x63, 0x2a, 0xf1, 0xb8, 0x5a, 0x13, 0xc8, 0x81, 0xf5, 0xbc,
-	0x67, 0x2e, 0xcc, 0x85, 0x5e, 0x17, 0x87, 0xce, 0x15, 0x5c,
-	0xbe, 0xf7, 0x2c, 0x65, 0x00, 0x4a, 0x94, 0xde, 0x35, 0x7f,
-	0xa1, 0xeb, 0x6a, 0x20, 0xfe, 0xb4, 0x5f, 0x15, 0xcb, 0x81,
-	0xd4, 0x9e, 0x40, 0x0a, 0xe1, 0xab, 0x75, 0x3f, 0xbe, 0xf4,
-	0x2a, 0x60, 0x8b, 0xc1, 0x1f, 0x55, 0xb5, 0xff, 0x21, 0x6b,
-	0x80, 0xca, 0x14, 0x5e, 0xdf, 0x95, 0x4b, 0x01, 0xea, 0xa0,
-	0x7e, 0x34, 0x61, 0x2b, 0xf5, 0xbf, 0x54, 0x1e, 0xc0, 0x8a,
-	0x0b, 0x41, 0x9f, 0xd5, 0x3e, 0x74, 0xaa, 0xe0, 0x77, 0x3d,
-	0xe3, 0xa9, 0x42, 0x08, 0xd6, 0x9c, 0x1d, 0x57, 0x89, 0xc3,
-	0x28, 0x62, 0xbc, 0xf6, 0xa3, 0xe9, 0x37, 0x7d, 0x96, 0xdc,
-	0x02, 0x48, 0xc9, 0x83, 0x5d, 0x17, 0xfc, 0xb6, 0x68, 0x22,
-	0xc2, 0x88, 0x56, 0x1c, 0xf7, 0xbd, 0x63, 0x29, 0xa8, 0xe2,
-	0x3c, 0x76, 0x9d, 0xd7, 0x09, 0x43, 0x16, 0x5c, 0x82, 0xc8,
-	0x23, 0x69, 0xb7, 0xfd, 0x7c, 0x36, 0xe8, 0xa2, 0x49, 0x03,
-	0xdd, 0x97, 0xee, 0xa4, 0x7a, 0x30, 0xdb, 0x91, 0x4f, 0x05,
-	0x84, 0xce, 0x10, 0x5a, 0xb1, 0xfb, 0x25, 0x6f, 0x3a, 0x70,
-	0xae, 0xe4, 0x0f, 0x45, 0x9b, 0xd1, 0x50, 0x1a, 0xc4, 0x8e,
-	0x65, 0x2f, 0xf1, 0xbb, 0x5b, 0x11, 0xcf, 0x85, 0x6e, 0x24,
-	0xfa, 0xb0, 0x31, 0x7b, 0xa5, 0xef, 0x04, 0x4e, 0x90, 0xda,
-	0x8f, 0xc5, 0x1b, 0x51, 0xba, 0xf0, 0x2e, 0x64, 0xe5, 0xaf,
-	0x71, 0x3b, 0xd0, 0x9a, 0x44, 0x0e, 0x99, 0xd3, 0x0d, 0x47,
-	0xac, 0xe6, 0x38, 0x72, 0xf3, 0xb9, 0x67, 0x2d, 0xc6, 0x8c,
-	0x52, 0x18, 0x4d, 0x07, 0xd9, 0x93, 0x78, 0x32, 0xec, 0xa6,
-	0x27, 0x6d, 0xb3, 0xf9, 0x12, 0x58, 0x86, 0xcc, 0x2c, 0x66,
-	0xb8, 0xf2, 0x19, 0x53, 0x8d, 0xc7, 0x46, 0x0c, 0xd2, 0x98,
-	0x73, 0x39, 0xe7, 0xad, 0xf8, 0xb2, 0x6c, 0x26, 0xcd, 0x87,
-	0x59, 0x13, 0x92, 0xd8, 0x06, 0x4c, 0xa7, 0xed, 0x33, 0x79,
-	0x00, 0x4b, 0x96, 0xdd, 0x31, 0x7a, 0xa7, 0xec, 0x62, 0x29,
-	0xf4, 0xbf, 0x53, 0x18, 0xc5, 0x8e, 0xc4, 0x8f, 0x52, 0x19,
-	0xf5, 0xbe, 0x63, 0x28, 0xa6, 0xed, 0x30, 0x7b, 0x97, 0xdc,
-	0x01, 0x4a, 0x95, 0xde, 0x03, 0x48, 0xa4, 0xef, 0x32, 0x79,
-	0xf7, 0xbc, 0x61, 0x2a, 0xc6, 0x8d, 0x50, 0x1b, 0x51, 0x1a,
-	0xc7, 0x8c, 0x60, 0x2b, 0xf6, 0xbd, 0x33, 0x78, 0xa5, 0xee,
-	0x02, 0x49, 0x94, 0xdf, 0x37, 0x7c, 0xa1, 0xea, 0x06, 0x4d,
-	0x90, 0xdb, 0x55, 0x1e, 0xc3, 0x88, 0x64, 0x2f, 0xf2, 0xb9,
-	0xf3, 0xb8, 0x65, 0x2e, 0xc2, 0x89, 0x54, 0x1f, 0x91, 0xda,
-	0x07, 0x4c, 0xa0, 0xeb, 0x36, 0x7d, 0xa2, 0xe9, 0x34, 0x7f,
-	0x93, 0xd8, 0x05, 0x4e, 0xc0, 0x8b, 0x56, 0x1d, 0xf1, 0xba,
-	0x67, 0x2c, 0x66, 0x2d, 0xf0, 0xbb, 0x57, 0x1c, 0xc1, 0x8a,
-	0x04, 0x4f, 0x92, 0xd9, 0x35, 0x7e, 0xa3, 0xe8, 0x6e, 0x25,
-	0xf8, 0xb3, 0x5f, 0x14, 0xc9, 0x82, 0x0c, 0x47, 0x9a, 0xd1,
-	0x3d, 0x76, 0xab, 0xe0, 0xaa, 0xe1, 0x3c, 0x77, 0x9b, 0xd0,
-	0x0d, 0x46, 0xc8, 0x83, 0x5e, 0x15, 0xf9, 0xb2, 0x6f, 0x24,
-	0xfb, 0xb0, 0x6d, 0x26, 0xca, 0x81, 0x5c, 0x17, 0x99, 0xd2,
-	0x0f, 0x44, 0xa8, 0xe3, 0x3e, 0x75, 0x3f, 0x74, 0xa9, 0xe2,
-	0x0e, 0x45, 0x98, 0xd3, 0x5d, 0x16, 0xcb, 0x80, 0x6c, 0x27,
-	0xfa, 0xb1, 0x59, 0x12, 0xcf, 0x84, 0x68, 0x23, 0xfe, 0xb5,
-	0x3b, 0x70, 0xad, 0xe6, 0x0a, 0x41, 0x9c, 0xd7, 0x9d, 0xd6,
-	0x0b, 0x40, 0xac, 0xe7, 0x3a, 0x71, 0xff, 0xb4, 0x69, 0x22,
-	0xce, 0x85, 0x58, 0x13, 0xcc, 0x87, 0x5a, 0x11, 0xfd, 0xb6,
-	0x6b, 0x20, 0xae, 0xe5, 0x38, 0x73, 0x9f, 0xd4, 0x09, 0x42,
-	0x08, 0x43, 0x9e, 0xd5, 0x39, 0x72, 0xaf, 0xe4, 0x6a, 0x21,
-	0xfc, 0xb7, 0x5b, 0x10, 0xcd, 0x86, 0x00, 0x4c, 0x98, 0xd4,
-	0x2d, 0x61, 0xb5, 0xf9, 0x5a, 0x16, 0xc2, 0x8e, 0x77, 0x3b,
-	0xef, 0xa3, 0xb4, 0xf8, 0x2c, 0x60, 0x99, 0xd5, 0x01, 0x4d,
-	0xee, 0xa2, 0x76, 0x3a, 0xc3, 0x8f, 0x5b, 0x17, 0x75, 0x39,
-	0xed, 0xa1, 0x58, 0x14, 0xc0, 0x8c, 0x2f, 0x63, 0xb7, 0xfb,
-	0x02, 0x4e, 0x9a, 0xd6, 0xc1, 0x8d, 0x59, 0x15, 0xec, 0xa0,
-	0x74, 0x38, 0x9b, 0xd7, 0x03, 0x4f, 0xb6, 0xfa, 0x2e, 0x62,
-	0xea, 0xa6, 0x72, 0x3e, 0xc7, 0x8b, 0x5f, 0x13, 0xb0, 0xfc,
-	0x28, 0x64, 0x9d, 0xd1, 0x05, 0x49, 0x5e, 0x12, 0xc6, 0x8a,
-	0x73, 0x3f, 0xeb, 0xa7, 0x04, 0x48, 0x9c, 0xd0, 0x29, 0x65,
-	0xb1, 0xfd, 0x9f, 0xd3, 0x07, 0x4b, 0xb2, 0xfe, 0x2a, 0x66,
-	0xc5, 0x89, 0x5d, 0x11, 0xe8, 0xa4, 0x70, 0x3c, 0x2b, 0x67,
-	0xb3, 0xff, 0x06, 0x4a, 0x9e, 0xd2, 0x71, 0x3d, 0xe9, 0xa5,
-	0x5c, 0x10, 0xc4, 0x88, 0xc9, 0x85, 0x51, 0x1d, 0xe4, 0xa8,
-	0x7c, 0x30, 0x93, 0xdf, 0x0b, 0x47, 0xbe, 0xf2, 0x26, 0x6a,
-	0x7d, 0x31, 0xe5, 0xa9, 0x50, 0x1c, 0xc8, 0x84, 0x27, 0x6b,
-	0xbf, 0xf3, 0x0a, 0x46, 0x92, 0xde, 0xbc, 0xf0, 0x24, 0x68,
-	0x91, 0xdd, 0x09, 0x45, 0xe6, 0xaa, 0x7e, 0x32, 0xcb, 0x87,
-	0x53, 0x1f, 0x08, 0x44, 0x90, 0xdc, 0x25, 0x69, 0xbd, 0xf1,
-	0x52, 0x1e, 0xca, 0x86, 0x7f, 0x33, 0xe7, 0xab, 0x23, 0x6f,
-	0xbb, 0xf7, 0x0e, 0x42, 0x96, 0xda, 0x79, 0x35, 0xe1, 0xad,
-	0x54, 0x18, 0xcc, 0x80, 0x97, 0xdb, 0x0f, 0x43, 0xba, 0xf6,
-	0x22, 0x6e, 0xcd, 0x81, 0x55, 0x19, 0xe0, 0xac, 0x78, 0x34,
-	0x56, 0x1a, 0xce, 0x82, 0x7b, 0x37, 0xe3, 0xaf, 0x0c, 0x40,
-	0x94, 0xd8, 0x21, 0x6d, 0xb9, 0xf5, 0xe2, 0xae, 0x7a, 0x36,
-	0xcf, 0x83, 0x57, 0x1b, 0xb8, 0xf4, 0x20, 0x6c, 0x95, 0xd9,
-	0x0d, 0x41, 0x00, 0x4d, 0x9a, 0xd7, 0x29, 0x64, 0xb3, 0xfe,
-	0x52, 0x1f, 0xc8, 0x85, 0x7b, 0x36, 0xe1, 0xac, 0xa4, 0xe9,
-	0x3e, 0x73, 0x8d, 0xc0, 0x17, 0x5a, 0xf6, 0xbb, 0x6c, 0x21,
-	0xdf, 0x92, 0x45, 0x08, 0x55, 0x18, 0xcf, 0x82, 0x7c, 0x31,
-	0xe6, 0xab, 0x07, 0x4a, 0x9d, 0xd0, 0x2e, 0x63, 0xb4, 0xf9,
-	0xf1, 0xbc, 0x6b, 0x26, 0xd8, 0x95, 0x42, 0x0f, 0xa3, 0xee,
-	0x39, 0x74, 0x8a, 0xc7, 0x10, 0x5d, 0xaa, 0xe7, 0x30, 0x7d,
-	0x83, 0xce, 0x19, 0x54, 0xf8, 0xb5, 0x62, 0x2f, 0xd1, 0x9c,
-	0x4b, 0x06, 0x0e, 0x43, 0x94, 0xd9, 0x27, 0x6a, 0xbd, 0xf0,
-	0x5c, 0x11, 0xc6, 0x8b, 0x75, 0x38, 0xef, 0xa2, 0xff, 0xb2,
-	0x65, 0x28, 0xd6, 0x9b, 0x4c, 0x01, 0xad, 0xe0, 0x37, 0x7a,
-	0x84, 0xc9, 0x1e, 0x53, 0x5b, 0x16, 0xc1, 0x8c, 0x72, 0x3f,
-	0xe8, 0xa5, 0x09, 0x44, 0x93, 0xde, 0x20, 0x6d, 0xba, 0xf7,
-	0x49, 0x04, 0xd3, 0x9e, 0x60, 0x2d, 0xfa, 0xb7, 0x1b, 0x56,
-	0x81, 0xcc, 0x32, 0x7f, 0xa8, 0xe5, 0xed, 0xa0, 0x77, 0x3a,
-	0xc4, 0x89, 0x5e, 0x13, 0xbf, 0xf2, 0x25, 0x68, 0x96, 0xdb,
-	0x0c, 0x41, 0x1c, 0x51, 0x86, 0xcb, 0x35, 0x78, 0xaf, 0xe2,
-	0x4e, 0x03, 0xd4, 0x99, 0x67, 0x2a, 0xfd, 0xb0, 0xb8, 0xf5,
-	0x22, 0x6f, 0x91, 0xdc, 0x0b, 0x46, 0xea, 0xa7, 0x70, 0x3d,
-	0xc3, 0x8e, 0x59, 0x14, 0xe3, 0xae, 0x79, 0x34, 0xca, 0x87,
-	0x50, 0x1d, 0xb1, 0xfc, 0x2b, 0x66, 0x98, 0xd5, 0x02, 0x4f,
-	0x47, 0x0a, 0xdd, 0x90, 0x6e, 0x23, 0xf4, 0xb9, 0x15, 0x58,
-	0x8f, 0xc2, 0x3c, 0x71, 0xa6, 0xeb, 0xb6, 0xfb, 0x2c, 0x61,
-	0x9f, 0xd2, 0x05, 0x48, 0xe4, 0xa9, 0x7e, 0x33, 0xcd, 0x80,
-	0x57, 0x1a, 0x12, 0x5f, 0x88, 0xc5, 0x3b, 0x76, 0xa1, 0xec,
-	0x40, 0x0d, 0xda, 0x97, 0x69, 0x24, 0xf3, 0xbe, 0x00, 0x4e,
-	0x9c, 0xd2, 0x25, 0x6b, 0xb9, 0xf7, 0x4a, 0x04, 0xd6, 0x98,
-	0x6f, 0x21, 0xf3, 0xbd, 0x94, 0xda, 0x08, 0x46, 0xb1, 0xff,
-	0x2d, 0x63, 0xde, 0x90, 0x42, 0x0c, 0xfb, 0xb5, 0x67, 0x29,
-	0x35, 0x7b, 0xa9, 0xe7, 0x10, 0x5e, 0x8c, 0xc2, 0x7f, 0x31,
-	0xe3, 0xad, 0x5a, 0x14, 0xc6, 0x88, 0xa1, 0xef, 0x3d, 0x73,
-	0x84, 0xca, 0x18, 0x56, 0xeb, 0xa5, 0x77, 0x39, 0xce, 0x80,
-	0x52, 0x1c, 0x6a, 0x24, 0xf6, 0xb8, 0x4f, 0x01, 0xd3, 0x9d,
-	0x20, 0x6e, 0xbc, 0xf2, 0x05, 0x4b, 0x99, 0xd7, 0xfe, 0xb0,
-	0x62, 0x2c, 0xdb, 0x95, 0x47, 0x09, 0xb4, 0xfa, 0x28, 0x66,
-	0x91, 0xdf, 0x0d, 0x43, 0x5f, 0x11, 0xc3, 0x8d, 0x7a, 0x34,
-	0xe6, 0xa8, 0x15, 0x5b, 0x89, 0xc7, 0x30, 0x7e, 0xac, 0xe2,
-	0xcb, 0x85, 0x57, 0x19, 0xee, 0xa0, 0x72, 0x3c, 0x81, 0xcf,
-	0x1d, 0x53, 0xa4, 0xea, 0x38, 0x76, 0xd4, 0x9a, 0x48, 0x06,
-	0xf1, 0xbf, 0x6d, 0x23, 0x9e, 0xd0, 0x02, 0x4c, 0xbb, 0xf5,
-	0x27, 0x69, 0x40, 0x0e, 0xdc, 0x92, 0x65, 0x2b, 0xf9, 0xb7,
-	0x0a, 0x44, 0x96, 0xd8, 0x2f, 0x61, 0xb3, 0xfd, 0xe1, 0xaf,
-	0x7d, 0x33, 0xc4, 0x8a, 0x58, 0x16, 0xab, 0xe5, 0x37, 0x79,
-	0x8e, 0xc0, 0x12, 0x5c, 0x75, 0x3b, 0xe9, 0xa7, 0x50, 0x1e,
-	0xcc, 0x82, 0x3f, 0x71, 0xa3, 0xed, 0x1a, 0x54, 0x86, 0xc8,
-	0xbe, 0xf0, 0x22, 0x6c, 0x9b, 0xd5, 0x07, 0x49, 0xf4, 0xba,
-	0x68, 0x26, 0xd1, 0x9f, 0x4d, 0x03, 0x2a, 0x64, 0xb6, 0xf8,
-	0x0f, 0x41, 0x93, 0xdd, 0x60, 0x2e, 0xfc, 0xb2, 0x45, 0x0b,
-	0xd9, 0x97, 0x8b, 0xc5, 0x17, 0x59, 0xae, 0xe0, 0x32, 0x7c,
-	0xc1, 0x8f, 0x5d, 0x13, 0xe4, 0xaa, 0x78, 0x36, 0x1f, 0x51,
-	0x83, 0xcd, 0x3a, 0x74, 0xa6, 0xe8, 0x55, 0x1b, 0xc9, 0x87,
-	0x70, 0x3e, 0xec, 0xa2, 0x00, 0x4f, 0x9e, 0xd1, 0x21, 0x6e,
-	0xbf, 0xf0, 0x42, 0x0d, 0xdc, 0x93, 0x63, 0x2c, 0xfd, 0xb2,
-	0x84, 0xcb, 0x1a, 0x55, 0xa5, 0xea, 0x3b, 0x74, 0xc6, 0x89,
-	0x58, 0x17, 0xe7, 0xa8, 0x79, 0x36, 0x15, 0x5a, 0x8b, 0xc4,
-	0x34, 0x7b, 0xaa, 0xe5, 0x57, 0x18, 0xc9, 0x86, 0x76, 0x39,
-	0xe8, 0xa7, 0x91, 0xde, 0x0f, 0x40, 0xb0, 0xff, 0x2e, 0x61,
-	0xd3, 0x9c, 0x4d, 0x02, 0xf2, 0xbd, 0x6c, 0x23, 0x2a, 0x65,
-	0xb4, 0xfb, 0x0b, 0x44, 0x95, 0xda, 0x68, 0x27, 0xf6, 0xb9,
-	0x49, 0x06, 0xd7, 0x98, 0xae, 0xe1, 0x30, 0x7f, 0x8f, 0xc0,
-	0x11, 0x5e, 0xec, 0xa3, 0x72, 0x3d, 0xcd, 0x82, 0x53, 0x1c,
-	0x3f, 0x70, 0xa1, 0xee, 0x1e, 0x51, 0x80, 0xcf, 0x7d, 0x32,
-	0xe3, 0xac, 0x5c, 0x13, 0xc2, 0x8d, 0xbb, 0xf4, 0x25, 0x6a,
-	0x9a, 0xd5, 0x04, 0x4b, 0xf9, 0xb6, 0x67, 0x28, 0xd8, 0x97,
-	0x46, 0x09, 0x54, 0x1b, 0xca, 0x85, 0x75, 0x3a, 0xeb, 0xa4,
-	0x16, 0x59, 0x88, 0xc7, 0x37, 0x78, 0xa9, 0xe6, 0xd0, 0x9f,
-	0x4e, 0x01, 0xf1, 0xbe, 0x6f, 0x20, 0x92, 0xdd, 0x0c, 0x43,
-	0xb3, 0xfc, 0x2d, 0x62, 0x41, 0x0e, 0xdf, 0x90, 0x60, 0x2f,
-	0xfe, 0xb1, 0x03, 0x4c, 0x9d, 0xd2, 0x22, 0x6d, 0xbc, 0xf3,
-	0xc5, 0x8a, 0x5b, 0x14, 0xe4, 0xab, 0x7a, 0x35, 0x87, 0xc8,
-	0x19, 0x56, 0xa6, 0xe9, 0x38, 0x77, 0x7e, 0x31, 0xe0, 0xaf,
-	0x5f, 0x10, 0xc1, 0x8e, 0x3c, 0x73, 0xa2, 0xed, 0x1d, 0x52,
-	0x83, 0xcc, 0xfa, 0xb5, 0x64, 0x2b, 0xdb, 0x94, 0x45, 0x0a,
-	0xb8, 0xf7, 0x26, 0x69, 0x99, 0xd6, 0x07, 0x48, 0x6b, 0x24,
-	0xf5, 0xba, 0x4a, 0x05, 0xd4, 0x9b, 0x29, 0x66, 0xb7, 0xf8,
-	0x08, 0x47, 0x96, 0xd9, 0xef, 0xa0, 0x71, 0x3e, 0xce, 0x81,
-	0x50, 0x1f, 0xad, 0xe2, 0x33, 0x7c, 0x8c, 0xc3, 0x12, 0x5d,
-	0x00, 0x50, 0xa0, 0xf0, 0x5d, 0x0d, 0xfd, 0xad, 0xba, 0xea,
-	0x1a, 0x4a, 0xe7, 0xb7, 0x47, 0x17, 0x69, 0x39, 0xc9, 0x99,
-	0x34, 0x64, 0x94, 0xc4, 0xd3, 0x83, 0x73, 0x23, 0x8e, 0xde,
-	0x2e, 0x7e, 0xd2, 0x82, 0x72, 0x22, 0x8f, 0xdf, 0x2f, 0x7f,
-	0x68, 0x38, 0xc8, 0x98, 0x35, 0x65, 0x95, 0xc5, 0xbb, 0xeb,
-	0x1b, 0x4b, 0xe6, 0xb6, 0x46, 0x16, 0x01, 0x51, 0xa1, 0xf1,
-	0x5c, 0x0c, 0xfc, 0xac, 0xb9, 0xe9, 0x19, 0x49, 0xe4, 0xb4,
-	0x44, 0x14, 0x03, 0x53, 0xa3, 0xf3, 0x5e, 0x0e, 0xfe, 0xae,
-	0xd0, 0x80, 0x70, 0x20, 0x8d, 0xdd, 0x2d, 0x7d, 0x6a, 0x3a,
-	0xca, 0x9a, 0x37, 0x67, 0x97, 0xc7, 0x6b, 0x3b, 0xcb, 0x9b,
-	0x36, 0x66, 0x96, 0xc6, 0xd1, 0x81, 0x71, 0x21, 0x8c, 0xdc,
-	0x2c, 0x7c, 0x02, 0x52, 0xa2, 0xf2, 0x5f, 0x0f, 0xff, 0xaf,
-	0xb8, 0xe8, 0x18, 0x48, 0xe5, 0xb5, 0x45, 0x15, 0x6f, 0x3f,
-	0xcf, 0x9f, 0x32, 0x62, 0x92, 0xc2, 0xd5, 0x85, 0x75, 0x25,
-	0x88, 0xd8, 0x28, 0x78, 0x06, 0x56, 0xa6, 0xf6, 0x5b, 0x0b,
-	0xfb, 0xab, 0xbc, 0xec, 0x1c, 0x4c, 0xe1, 0xb1, 0x41, 0x11,
-	0xbd, 0xed, 0x1d, 0x4d, 0xe0, 0xb0, 0x40, 0x10, 0x07, 0x57,
-	0xa7, 0xf7, 0x5a, 0x0a, 0xfa, 0xaa, 0xd4, 0x84, 0x74, 0x24,
-	0x89, 0xd9, 0x29, 0x79, 0x6e, 0x3e, 0xce, 0x9e, 0x33, 0x63,
-	0x93, 0xc3, 0xd6, 0x86, 0x76, 0x26, 0x8b, 0xdb, 0x2b, 0x7b,
-	0x6c, 0x3c, 0xcc, 0x9c, 0x31, 0x61, 0x91, 0xc1, 0xbf, 0xef,
-	0x1f, 0x4f, 0xe2, 0xb2, 0x42, 0x12, 0x05, 0x55, 0xa5, 0xf5,
-	0x58, 0x08, 0xf8, 0xa8, 0x04, 0x54, 0xa4, 0xf4, 0x59, 0x09,
-	0xf9, 0xa9, 0xbe, 0xee, 0x1e, 0x4e, 0xe3, 0xb3, 0x43, 0x13,
-	0x6d, 0x3d, 0xcd, 0x9d, 0x30, 0x60, 0x90, 0xc0, 0xd7, 0x87,
-	0x77, 0x27, 0x8a, 0xda, 0x2a, 0x7a, 0x00, 0x51, 0xa2, 0xf3,
-	0x59, 0x08, 0xfb, 0xaa, 0xb2, 0xe3, 0x10, 0x41, 0xeb, 0xba,
-	0x49, 0x18, 0x79, 0x28, 0xdb, 0x8a, 0x20, 0x71, 0x82, 0xd3,
-	0xcb, 0x9a, 0x69, 0x38, 0x92, 0xc3, 0x30, 0x61, 0xf2, 0xa3,
-	0x50, 0x01, 0xab, 0xfa, 0x09, 0x58, 0x40, 0x11, 0xe2, 0xb3,
-	0x19, 0x48, 0xbb, 0xea, 0x8b, 0xda, 0x29, 0x78, 0xd2, 0x83,
-	0x70, 0x21, 0x39, 0x68, 0x9b, 0xca, 0x60, 0x31, 0xc2, 0x93,
-	0xf9, 0xa8, 0x5b, 0x0a, 0xa0, 0xf1, 0x02, 0x53, 0x4b, 0x1a,
-	0xe9, 0xb8, 0x12, 0x43, 0xb0, 0xe1, 0x80, 0xd1, 0x22, 0x73,
-	0xd9, 0x88, 0x7b, 0x2a, 0x32, 0x63, 0x90, 0xc1, 0x6b, 0x3a,
-	0xc9, 0x98, 0x0b, 0x5a, 0xa9, 0xf8, 0x52, 0x03, 0xf0, 0xa1,
-	0xb9, 0xe8, 0x1b, 0x4a, 0xe0, 0xb1, 0x42, 0x13, 0x72, 0x23,
-	0xd0, 0x81, 0x2b, 0x7a, 0x89, 0xd8, 0xc0, 0x91, 0x62, 0x33,
-	0x99, 0xc8, 0x3b, 0x6a, 0xef, 0xbe, 0x4d, 0x1c, 0xb6, 0xe7,
-	0x14, 0x45, 0x5d, 0x0c, 0xff, 0xae, 0x04, 0x55, 0xa6, 0xf7,
-	0x96, 0xc7, 0x34, 0x65, 0xcf, 0x9e, 0x6d, 0x3c, 0x24, 0x75,
-	0x86, 0xd7, 0x7d, 0x2c, 0xdf, 0x8e, 0x1d, 0x4c, 0xbf, 0xee,
-	0x44, 0x15, 0xe6, 0xb7, 0xaf, 0xfe, 0x0d, 0x5c, 0xf6, 0xa7,
-	0x54, 0x05, 0x64, 0x35, 0xc6, 0x97, 0x3d, 0x6c, 0x9f, 0xce,
-	0xd6, 0x87, 0x74, 0x25, 0x8f, 0xde, 0x2d, 0x7c, 0x16, 0x47,
-	0xb4, 0xe5, 0x4f, 0x1e, 0xed, 0xbc, 0xa4, 0xf5, 0x06, 0x57,
-	0xfd, 0xac, 0x5f, 0x0e, 0x6f, 0x3e, 0xcd, 0x9c, 0x36, 0x67,
-	0x94, 0xc5, 0xdd, 0x8c, 0x7f, 0x2e, 0x84, 0xd5, 0x26, 0x77,
-	0xe4, 0xb5, 0x46, 0x17, 0xbd, 0xec, 0x1f, 0x4e, 0x56, 0x07,
-	0xf4, 0xa5, 0x0f, 0x5e, 0xad, 0xfc, 0x9d, 0xcc, 0x3f, 0x6e,
-	0xc4, 0x95, 0x66, 0x37, 0x2f, 0x7e, 0x8d, 0xdc, 0x76, 0x27,
-	0xd4, 0x85, 0x00, 0x52, 0xa4, 0xf6, 0x55, 0x07, 0xf1, 0xa3,
-	0xaa, 0xf8, 0x0e, 0x5c, 0xff, 0xad, 0x5b, 0x09, 0x49, 0x1b,
-	0xed, 0xbf, 0x1c, 0x4e, 0xb8, 0xea, 0xe3, 0xb1, 0x47, 0x15,
-	0xb6, 0xe4, 0x12, 0x40, 0x92, 0xc0, 0x36, 0x64, 0xc7, 0x95,
-	0x63, 0x31, 0x38, 0x6a, 0x9c, 0xce, 0x6d, 0x3f, 0xc9, 0x9b,
-	0xdb, 0x89, 0x7f, 0x2d, 0x8e, 0xdc, 0x2a, 0x78, 0x71, 0x23,
-	0xd5, 0x87, 0x24, 0x76, 0x80, 0xd2, 0x39, 0x6b, 0x9d, 0xcf,
-	0x6c, 0x3e, 0xc8, 0x9a, 0x93, 0xc1, 0x37, 0x65, 0xc6, 0x94,
-	0x62, 0x30, 0x70, 0x22, 0xd4, 0x86, 0x25, 0x77, 0x81, 0xd3,
-	0xda, 0x88, 0x7e, 0x2c, 0x8f, 0xdd, 0x2b, 0x79, 0xab, 0xf9,
-	0x0f, 0x5d, 0xfe, 0xac, 0x5a, 0x08, 0x01, 0x53, 0xa5, 0xf7,
-	0x54, 0x06, 0xf0, 0xa2, 0xe2, 0xb0, 0x46, 0x14, 0xb7, 0xe5,
-	0x13, 0x41, 0x48, 0x1a, 0xec, 0xbe, 0x1d, 0x4f, 0xb9, 0xeb,
-	0x72, 0x20, 0xd6, 0x84, 0x27, 0x75, 0x83, 0xd1, 0xd8, 0x8a,
-	0x7c, 0x2e, 0x8d, 0xdf, 0x29, 0x7b, 0x3b, 0x69, 0x9f, 0xcd,
-	0x6e, 0x3c, 0xca, 0x98, 0x91, 0xc3, 0x35, 0x67, 0xc4, 0x96,
-	0x60, 0x32, 0xe0, 0xb2, 0x44, 0x16, 0xb5, 0xe7, 0x11, 0x43,
-	0x4a, 0x18, 0xee, 0xbc, 0x1f, 0x4d, 0xbb, 0xe9, 0xa9, 0xfb,
-	0x0d, 0x5f, 0xfc, 0xae, 0x58, 0x0a, 0x03, 0x51, 0xa7, 0xf5,
-	0x56, 0x04, 0xf2, 0xa0, 0x4b, 0x19, 0xef, 0xbd, 0x1e, 0x4c,
-	0xba, 0xe8, 0xe1, 0xb3, 0x45, 0x17, 0xb4, 0xe6, 0x10, 0x42,
-	0x02, 0x50, 0xa6, 0xf4, 0x57, 0x05, 0xf3, 0xa1, 0xa8, 0xfa,
-	0x0c, 0x5e, 0xfd, 0xaf, 0x59, 0x0b, 0xd9, 0x8b, 0x7d, 0x2f,
-	0x8c, 0xde, 0x28, 0x7a, 0x73, 0x21, 0xd7, 0x85, 0x26, 0x74,
-	0x82, 0xd0, 0x90, 0xc2, 0x34, 0x66, 0xc5, 0x97, 0x61, 0x33,
-	0x3a, 0x68, 0x9e, 0xcc, 0x6f, 0x3d, 0xcb, 0x99, 0x00, 0x53,
-	0xa6, 0xf5, 0x51, 0x02, 0xf7, 0xa4, 0xa2, 0xf1, 0x04, 0x57,
-	0xf3, 0xa0, 0x55, 0x06, 0x59, 0x0a, 0xff, 0xac, 0x08, 0x5b,
-	0xae, 0xfd, 0xfb, 0xa8, 0x5d, 0x0e, 0xaa, 0xf9, 0x0c, 0x5f,
-	0xb2, 0xe1, 0x14, 0x47, 0xe3, 0xb0, 0x45, 0x16, 0x10, 0x43,
-	0xb6, 0xe5, 0x41, 0x12, 0xe7, 0xb4, 0xeb, 0xb8, 0x4d, 0x1e,
-	0xba, 0xe9, 0x1c, 0x4f, 0x49, 0x1a, 0xef, 0xbc, 0x18, 0x4b,
-	0xbe, 0xed, 0x79, 0x2a, 0xdf, 0x8c, 0x28, 0x7b, 0x8e, 0xdd,
-	0xdb, 0x88, 0x7d, 0x2e, 0x8a, 0xd9, 0x2c, 0x7f, 0x20, 0x73,
-	0x86, 0xd5, 0x71, 0x22, 0xd7, 0x84, 0x82, 0xd1, 0x24, 0x77,
-	0xd3, 0x80, 0x75, 0x26, 0xcb, 0x98, 0x6d, 0x3e, 0x9a, 0xc9,
-	0x3c, 0x6f, 0x69, 0x3a, 0xcf, 0x9c, 0x38, 0x6b, 0x9e, 0xcd,
-	0x92, 0xc1, 0x34, 0x67, 0xc3, 0x90, 0x65, 0x36, 0x30, 0x63,
-	0x96, 0xc5, 0x61, 0x32, 0xc7, 0x94, 0xf2, 0xa1, 0x54, 0x07,
-	0xa3, 0xf0, 0x05, 0x56, 0x50, 0x03, 0xf6, 0xa5, 0x01, 0x52,
-	0xa7, 0xf4, 0xab, 0xf8, 0x0d, 0x5e, 0xfa, 0xa9, 0x5c, 0x0f,
-	0x09, 0x5a, 0xaf, 0xfc, 0x58, 0x0b, 0xfe, 0xad, 0x40, 0x13,
-	0xe6, 0xb5, 0x11, 0x42, 0xb7, 0xe4, 0xe2, 0xb1, 0x44, 0x17,
-	0xb3, 0xe0, 0x15, 0x46, 0x19, 0x4a, 0xbf, 0xec, 0x48, 0x1b,
-	0xee, 0xbd, 0xbb, 0xe8, 0x1d, 0x4e, 0xea, 0xb9, 0x4c, 0x1f,
-	0x8b, 0xd8, 0x2d, 0x7e, 0xda, 0x89, 0x7c, 0x2f, 0x29, 0x7a,
-	0x8f, 0xdc, 0x78, 0x2b, 0xde, 0x8d, 0xd2, 0x81, 0x74, 0x27,
-	0x83, 0xd0, 0x25, 0x76, 0x70, 0x23, 0xd6, 0x85, 0x21, 0x72,
-	0x87, 0xd4, 0x39, 0x6a, 0x9f, 0xcc, 0x68, 0x3b, 0xce, 0x9d,
-	0x9b, 0xc8, 0x3d, 0x6e, 0xca, 0x99, 0x6c, 0x3f, 0x60, 0x33,
-	0xc6, 0x95, 0x31, 0x62, 0x97, 0xc4, 0xc2, 0x91, 0x64, 0x37,
-	0x93, 0xc0, 0x35, 0x66, 0x00, 0x54, 0xa8, 0xfc, 0x4d, 0x19,
-	0xe5, 0xb1, 0x9a, 0xce, 0x32, 0x66, 0xd7, 0x83, 0x7f, 0x2b,
-	0x29, 0x7d, 0x81, 0xd5, 0x64, 0x30, 0xcc, 0x98, 0xb3, 0xe7,
-	0x1b, 0x4f, 0xfe, 0xaa, 0x56, 0x02, 0x52, 0x06, 0xfa, 0xae,
-	0x1f, 0x4b, 0xb7, 0xe3, 0xc8, 0x9c, 0x60, 0x34, 0x85, 0xd1,
-	0x2d, 0x79, 0x7b, 0x2f, 0xd3, 0x87, 0x36, 0x62, 0x9e, 0xca,
-	0xe1, 0xb5, 0x49, 0x1d, 0xac, 0xf8, 0x04, 0x50, 0xa4, 0xf0,
-	0x0c, 0x58, 0xe9, 0xbd, 0x41, 0x15, 0x3e, 0x6a, 0x96, 0xc2,
-	0x73, 0x27, 0xdb, 0x8f, 0x8d, 0xd9, 0x25, 0x71, 0xc0, 0x94,
-	0x68, 0x3c, 0x17, 0x43, 0xbf, 0xeb, 0x5a, 0x0e, 0xf2, 0xa6,
-	0xf6, 0xa2, 0x5e, 0x0a, 0xbb, 0xef, 0x13, 0x47, 0x6c, 0x38,
-	0xc4, 0x90, 0x21, 0x75, 0x89, 0xdd, 0xdf, 0x8b, 0x77, 0x23,
-	0x92, 0xc6, 0x3a, 0x6e, 0x45, 0x11, 0xed, 0xb9, 0x08, 0x5c,
-	0xa0, 0xf4, 0x55, 0x01, 0xfd, 0xa9, 0x18, 0x4c, 0xb0, 0xe4,
-	0xcf, 0x9b, 0x67, 0x33, 0x82, 0xd6, 0x2a, 0x7e, 0x7c, 0x28,
-	0xd4, 0x80, 0x31, 0x65, 0x99, 0xcd, 0xe6, 0xb2, 0x4e, 0x1a,
-	0xab, 0xff, 0x03, 0x57, 0x07, 0x53, 0xaf, 0xfb, 0x4a, 0x1e,
-	0xe2, 0xb6, 0x9d, 0xc9, 0x35, 0x61, 0xd0, 0x84, 0x78, 0x2c,
-	0x2e, 0x7a, 0x86, 0xd2, 0x63, 0x37, 0xcb, 0x9f, 0xb4, 0xe0,
-	0x1c, 0x48, 0xf9, 0xad, 0x51, 0x05, 0xf1, 0xa5, 0x59, 0x0d,
-	0xbc, 0xe8, 0x14, 0x40, 0x6b, 0x3f, 0xc3, 0x97, 0x26, 0x72,
-	0x8e, 0xda, 0xd8, 0x8c, 0x70, 0x24, 0x95, 0xc1, 0x3d, 0x69,
-	0x42, 0x16, 0xea, 0xbe, 0x0f, 0x5b, 0xa7, 0xf3, 0xa3, 0xf7,
-	0x0b, 0x5f, 0xee, 0xba, 0x46, 0x12, 0x39, 0x6d, 0x91, 0xc5,
-	0x74, 0x20, 0xdc, 0x88, 0x8a, 0xde, 0x22, 0x76, 0xc7, 0x93,
-	0x6f, 0x3b, 0x10, 0x44, 0xb8, 0xec, 0x5d, 0x09, 0xf5, 0xa1,
-	0x00, 0x55, 0xaa, 0xff, 0x49, 0x1c, 0xe3, 0xb6, 0x92, 0xc7,
-	0x38, 0x6d, 0xdb, 0x8e, 0x71, 0x24, 0x39, 0x6c, 0x93, 0xc6,
-	0x70, 0x25, 0xda, 0x8f, 0xab, 0xfe, 0x01, 0x54, 0xe2, 0xb7,
-	0x48, 0x1d, 0x72, 0x27, 0xd8, 0x8d, 0x3b, 0x6e, 0x91, 0xc4,
-	0xe0, 0xb5, 0x4a, 0x1f, 0xa9, 0xfc, 0x03, 0x56, 0x4b, 0x1e,
-	0xe1, 0xb4, 0x02, 0x57, 0xa8, 0xfd, 0xd9, 0x8c, 0x73, 0x26,
-	0x90, 0xc5, 0x3a, 0x6f, 0xe4, 0xb1, 0x4e, 0x1b, 0xad, 0xf8,
-	0x07, 0x52, 0x76, 0x23, 0xdc, 0x89, 0x3f, 0x6a, 0x95, 0xc0,
-	0xdd, 0x88, 0x77, 0x22, 0x94, 0xc1, 0x3e, 0x6b, 0x4f, 0x1a,
-	0xe5, 0xb0, 0x06, 0x53, 0xac, 0xf9, 0x96, 0xc3, 0x3c, 0x69,
-	0xdf, 0x8a, 0x75, 0x20, 0x04, 0x51, 0xae, 0xfb, 0x4d, 0x18,
-	0xe7, 0xb2, 0xaf, 0xfa, 0x05, 0x50, 0xe6, 0xb3, 0x4c, 0x19,
-	0x3d, 0x68, 0x97, 0xc2, 0x74, 0x21, 0xde, 0x8b, 0xd5, 0x80,
-	0x7f, 0x2a, 0x9c, 0xc9, 0x36, 0x63, 0x47, 0x12, 0xed, 0xb8,
-	0x0e, 0x5b, 0xa4, 0xf1, 0xec, 0xb9, 0x46, 0x13, 0xa5, 0xf0,
-	0x0f, 0x5a, 0x7e, 0x2b, 0xd4, 0x81, 0x37, 0x62, 0x9d, 0xc8,
-	0xa7, 0xf2, 0x0d, 0x58, 0xee, 0xbb, 0x44, 0x11, 0x35, 0x60,
-	0x9f, 0xca, 0x7c, 0x29, 0xd6, 0x83, 0x9e, 0xcb, 0x34, 0x61,
-	0xd7, 0x82, 0x7d, 0x28, 0x0c, 0x59, 0xa6, 0xf3, 0x45, 0x10,
-	0xef, 0xba, 0x31, 0x64, 0x9b, 0xce, 0x78, 0x2d, 0xd2, 0x87,
-	0xa3, 0xf6, 0x09, 0x5c, 0xea, 0xbf, 0x40, 0x15, 0x08, 0x5d,
-	0xa2, 0xf7, 0x41, 0x14, 0xeb, 0xbe, 0x9a, 0xcf, 0x30, 0x65,
-	0xd3, 0x86, 0x79, 0x2c, 0x43, 0x16, 0xe9, 0xbc, 0x0a, 0x5f,
-	0xa0, 0xf5, 0xd1, 0x84, 0x7b, 0x2e, 0x98, 0xcd, 0x32, 0x67,
-	0x7a, 0x2f, 0xd0, 0x85, 0x33, 0x66, 0x99, 0xcc, 0xe8, 0xbd,
-	0x42, 0x17, 0xa1, 0xf4, 0x0b, 0x5e, 0x00, 0x56, 0xac, 0xfa,
-	0x45, 0x13, 0xe9, 0xbf, 0x8a, 0xdc, 0x26, 0x70, 0xcf, 0x99,
-	0x63, 0x35, 0x09, 0x5f, 0xa5, 0xf3, 0x4c, 0x1a, 0xe0, 0xb6,
-	0x83, 0xd5, 0x2f, 0x79, 0xc6, 0x90, 0x6a, 0x3c, 0x12, 0x44,
-	0xbe, 0xe8, 0x57, 0x01, 0xfb, 0xad, 0x98, 0xce, 0x34, 0x62,
-	0xdd, 0x8b, 0x71, 0x27, 0x1b, 0x4d, 0xb7, 0xe1, 0x5e, 0x08,
-	0xf2, 0xa4, 0x91, 0xc7, 0x3d, 0x6b, 0xd4, 0x82, 0x78, 0x2e,
-	0x24, 0x72, 0x88, 0xde, 0x61, 0x37, 0xcd, 0x9b, 0xae, 0xf8,
-	0x02, 0x54, 0xeb, 0xbd, 0x47, 0x11, 0x2d, 0x7b, 0x81, 0xd7,
-	0x68, 0x3e, 0xc4, 0x92, 0xa7, 0xf1, 0x0b, 0x5d, 0xe2, 0xb4,
-	0x4e, 0x18, 0x36, 0x60, 0x9a, 0xcc, 0x73, 0x25, 0xdf, 0x89,
-	0xbc, 0xea, 0x10, 0x46, 0xf9, 0xaf, 0x55, 0x03, 0x3f, 0x69,
-	0x93, 0xc5, 0x7a, 0x2c, 0xd6, 0x80, 0xb5, 0xe3, 0x19, 0x4f,
-	0xf0, 0xa6, 0x5c, 0x0a, 0x48, 0x1e, 0xe4, 0xb2, 0x0d, 0x5b,
-	0xa1, 0xf7, 0xc2, 0x94, 0x6e, 0x38, 0x87, 0xd1, 0x2b, 0x7d,
-	0x41, 0x17, 0xed, 0xbb, 0x04, 0x52, 0xa8, 0xfe, 0xcb, 0x9d,
-	0x67, 0x31, 0x8e, 0xd8, 0x22, 0x74, 0x5a, 0x0c, 0xf6, 0xa0,
-	0x1f, 0x49, 0xb3, 0xe5, 0xd0, 0x86, 0x7c, 0x2a, 0x95, 0xc3,
-	0x39, 0x6f, 0x53, 0x05, 0xff, 0xa9, 0x16, 0x40, 0xba, 0xec,
-	0xd9, 0x8f, 0x75, 0x23, 0x9c, 0xca, 0x30, 0x66, 0x6c, 0x3a,
-	0xc0, 0x96, 0x29, 0x7f, 0x85, 0xd3, 0xe6, 0xb0, 0x4a, 0x1c,
-	0xa3, 0xf5, 0x0f, 0x59, 0x65, 0x33, 0xc9, 0x9f, 0x20, 0x76,
-	0x8c, 0xda, 0xef, 0xb9, 0x43, 0x15, 0xaa, 0xfc, 0x06, 0x50,
-	0x7e, 0x28, 0xd2, 0x84, 0x3b, 0x6d, 0x97, 0xc1, 0xf4, 0xa2,
-	0x58, 0x0e, 0xb1, 0xe7, 0x1d, 0x4b, 0x77, 0x21, 0xdb, 0x8d,
-	0x32, 0x64, 0x9e, 0xc8, 0xfd, 0xab, 0x51, 0x07, 0xb8, 0xee,
-	0x14, 0x42, 0x00, 0x57, 0xae, 0xf9, 0x41, 0x16, 0xef, 0xb8,
-	0x82, 0xd5, 0x2c, 0x7b, 0xc3, 0x94, 0x6d, 0x3a, 0x19, 0x4e,
-	0xb7, 0xe0, 0x58, 0x0f, 0xf6, 0xa1, 0x9b, 0xcc, 0x35, 0x62,
-	0xda, 0x8d, 0x74, 0x23, 0x32, 0x65, 0x9c, 0xcb, 0x73, 0x24,
-	0xdd, 0x8a, 0xb0, 0xe7, 0x1e, 0x49, 0xf1, 0xa6, 0x5f, 0x08,
-	0x2b, 0x7c, 0x85, 0xd2, 0x6a, 0x3d, 0xc4, 0x93, 0xa9, 0xfe,
-	0x07, 0x50, 0xe8, 0xbf, 0x46, 0x11, 0x64, 0x33, 0xca, 0x9d,
-	0x25, 0x72, 0x8b, 0xdc, 0xe6, 0xb1, 0x48, 0x1f, 0xa7, 0xf0,
-	0x09, 0x5e, 0x7d, 0x2a, 0xd3, 0x84, 0x3c, 0x6b, 0x92, 0xc5,
-	0xff, 0xa8, 0x51, 0x06, 0xbe, 0xe9, 0x10, 0x47, 0x56, 0x01,
-	0xf8, 0xaf, 0x17, 0x40, 0xb9, 0xee, 0xd4, 0x83, 0x7a, 0x2d,
-	0x95, 0xc2, 0x3b, 0x6c, 0x4f, 0x18, 0xe1, 0xb6, 0x0e, 0x59,
-	0xa0, 0xf7, 0xcd, 0x9a, 0x63, 0x34, 0x8c, 0xdb, 0x22, 0x75,
-	0xc8, 0x9f, 0x66, 0x31, 0x89, 0xde, 0x27, 0x70, 0x4a, 0x1d,
-	0xe4, 0xb3, 0x0b, 0x5c, 0xa5, 0xf2, 0xd1, 0x86, 0x7f, 0x28,
-	0x90, 0xc7, 0x3e, 0x69, 0x53, 0x04, 0xfd, 0xaa, 0x12, 0x45,
-	0xbc, 0xeb, 0xfa, 0xad, 0x54, 0x03, 0xbb, 0xec, 0x15, 0x42,
-	0x78, 0x2f, 0xd6, 0x81, 0x39, 0x6e, 0x97, 0xc0, 0xe3, 0xb4,
-	0x4d, 0x1a, 0xa2, 0xf5, 0x0c, 0x5b, 0x61, 0x36, 0xcf, 0x98,
-	0x20, 0x77, 0x8e, 0xd9, 0xac, 0xfb, 0x02, 0x55, 0xed, 0xba,
-	0x43, 0x14, 0x2e, 0x79, 0x80, 0xd7, 0x6f, 0x38, 0xc1, 0x96,
-	0xb5, 0xe2, 0x1b, 0x4c, 0xf4, 0xa3, 0x5a, 0x0d, 0x37, 0x60,
-	0x99, 0xce, 0x76, 0x21, 0xd8, 0x8f, 0x9e, 0xc9, 0x30, 0x67,
-	0xdf, 0x88, 0x71, 0x26, 0x1c, 0x4b, 0xb2, 0xe5, 0x5d, 0x0a,
-	0xf3, 0xa4, 0x87, 0xd0, 0x29, 0x7e, 0xc6, 0x91, 0x68, 0x3f,
-	0x05, 0x52, 0xab, 0xfc, 0x44, 0x13, 0xea, 0xbd, 0x00, 0x58,
-	0xb0, 0xe8, 0x7d, 0x25, 0xcd, 0x95, 0xfa, 0xa2, 0x4a, 0x12,
-	0x87, 0xdf, 0x37, 0x6f, 0xe9, 0xb1, 0x59, 0x01, 0x94, 0xcc,
-	0x24, 0x7c, 0x13, 0x4b, 0xa3, 0xfb, 0x6e, 0x36, 0xde, 0x86,
-	0xcf, 0x97, 0x7f, 0x27, 0xb2, 0xea, 0x02, 0x5a, 0x35, 0x6d,
-	0x85, 0xdd, 0x48, 0x10, 0xf8, 0xa0, 0x26, 0x7e, 0x96, 0xce,
-	0x5b, 0x03, 0xeb, 0xb3, 0xdc, 0x84, 0x6c, 0x34, 0xa1, 0xf9,
-	0x11, 0x49, 0x83, 0xdb, 0x33, 0x6b, 0xfe, 0xa6, 0x4e, 0x16,
-	0x79, 0x21, 0xc9, 0x91, 0x04, 0x5c, 0xb4, 0xec, 0x6a, 0x32,
-	0xda, 0x82, 0x17, 0x4f, 0xa7, 0xff, 0x90, 0xc8, 0x20, 0x78,
-	0xed, 0xb5, 0x5d, 0x05, 0x4c, 0x14, 0xfc, 0xa4, 0x31, 0x69,
-	0x81, 0xd9, 0xb6, 0xee, 0x06, 0x5e, 0xcb, 0x93, 0x7b, 0x23,
-	0xa5, 0xfd, 0x15, 0x4d, 0xd8, 0x80, 0x68, 0x30, 0x5f, 0x07,
-	0xef, 0xb7, 0x22, 0x7a, 0x92, 0xca, 0x1b, 0x43, 0xab, 0xf3,
-	0x66, 0x3e, 0xd6, 0x8e, 0xe1, 0xb9, 0x51, 0x09, 0x9c, 0xc4,
-	0x2c, 0x74, 0xf2, 0xaa, 0x42, 0x1a, 0x8f, 0xd7, 0x3f, 0x67,
-	0x08, 0x50, 0xb8, 0xe0, 0x75, 0x2d, 0xc5, 0x9d, 0xd4, 0x8c,
-	0x64, 0x3c, 0xa9, 0xf1, 0x19, 0x41, 0x2e, 0x76, 0x9e, 0xc6,
-	0x53, 0x0b, 0xe3, 0xbb, 0x3d, 0x65, 0x8d, 0xd5, 0x40, 0x18,
-	0xf0, 0xa8, 0xc7, 0x9f, 0x77, 0x2f, 0xba, 0xe2, 0x0a, 0x52,
-	0x98, 0xc0, 0x28, 0x70, 0xe5, 0xbd, 0x55, 0x0d, 0x62, 0x3a,
-	0xd2, 0x8a, 0x1f, 0x47, 0xaf, 0xf7, 0x71, 0x29, 0xc1, 0x99,
-	0x0c, 0x54, 0xbc, 0xe4, 0x8b, 0xd3, 0x3b, 0x63, 0xf6, 0xae,
-	0x46, 0x1e, 0x57, 0x0f, 0xe7, 0xbf, 0x2a, 0x72, 0x9a, 0xc2,
-	0xad, 0xf5, 0x1d, 0x45, 0xd0, 0x88, 0x60, 0x38, 0xbe, 0xe6,
-	0x0e, 0x56, 0xc3, 0x9b, 0x73, 0x2b, 0x44, 0x1c, 0xf4, 0xac,
-	0x39, 0x61, 0x89, 0xd1, 0x00, 0x59, 0xb2, 0xeb, 0x79, 0x20,
-	0xcb, 0x92, 0xf2, 0xab, 0x40, 0x19, 0x8b, 0xd2, 0x39, 0x60,
-	0xf9, 0xa0, 0x4b, 0x12, 0x80, 0xd9, 0x32, 0x6b, 0x0b, 0x52,
-	0xb9, 0xe0, 0x72, 0x2b, 0xc0, 0x99, 0xef, 0xb6, 0x5d, 0x04,
-	0x96, 0xcf, 0x24, 0x7d, 0x1d, 0x44, 0xaf, 0xf6, 0x64, 0x3d,
-	0xd6, 0x8f, 0x16, 0x4f, 0xa4, 0xfd, 0x6f, 0x36, 0xdd, 0x84,
-	0xe4, 0xbd, 0x56, 0x0f, 0x9d, 0xc4, 0x2f, 0x76, 0xc3, 0x9a,
-	0x71, 0x28, 0xba, 0xe3, 0x08, 0x51, 0x31, 0x68, 0x83, 0xda,
-	0x48, 0x11, 0xfa, 0xa3, 0x3a, 0x63, 0x88, 0xd1, 0x43, 0x1a,
-	0xf1, 0xa8, 0xc8, 0x91, 0x7a, 0x23, 0xb1, 0xe8, 0x03, 0x5a,
-	0x2c, 0x75, 0x9e, 0xc7, 0x55, 0x0c, 0xe7, 0xbe, 0xde, 0x87,
-	0x6c, 0x35, 0xa7, 0xfe, 0x15, 0x4c, 0xd5, 0x8c, 0x67, 0x3e,
-	0xac, 0xf5, 0x1e, 0x47, 0x27, 0x7e, 0x95, 0xcc, 0x5e, 0x07,
-	0xec, 0xb5, 0x9b, 0xc2, 0x29, 0x70, 0xe2, 0xbb, 0x50, 0x09,
-	0x69, 0x30, 0xdb, 0x82, 0x10, 0x49, 0xa2, 0xfb, 0x62, 0x3b,
-	0xd0, 0x89, 0x1b, 0x42, 0xa9, 0xf0, 0x90, 0xc9, 0x22, 0x7b,
-	0xe9, 0xb0, 0x5b, 0x02, 0x74, 0x2d, 0xc6, 0x9f, 0x0d, 0x54,
-	0xbf, 0xe6, 0x86, 0xdf, 0x34, 0x6d, 0xff, 0xa6, 0x4d, 0x14,
-	0x8d, 0xd4, 0x3f, 0x66, 0xf4, 0xad, 0x46, 0x1f, 0x7f, 0x26,
-	0xcd, 0x94, 0x06, 0x5f, 0xb4, 0xed, 0x58, 0x01, 0xea, 0xb3,
-	0x21, 0x78, 0x93, 0xca, 0xaa, 0xf3, 0x18, 0x41, 0xd3, 0x8a,
-	0x61, 0x38, 0xa1, 0xf8, 0x13, 0x4a, 0xd8, 0x81, 0x6a, 0x33,
-	0x53, 0x0a, 0xe1, 0xb8, 0x2a, 0x73, 0x98, 0xc1, 0xb7, 0xee,
-	0x05, 0x5c, 0xce, 0x97, 0x7c, 0x25, 0x45, 0x1c, 0xf7, 0xae,
-	0x3c, 0x65, 0x8e, 0xd7, 0x4e, 0x17, 0xfc, 0xa5, 0x37, 0x6e,
-	0x85, 0xdc, 0xbc, 0xe5, 0x0e, 0x57, 0xc5, 0x9c, 0x77, 0x2e,
-	0x00, 0x5a, 0xb4, 0xee, 0x75, 0x2f, 0xc1, 0x9b, 0xea, 0xb0,
-	0x5e, 0x04, 0x9f, 0xc5, 0x2b, 0x71, 0xc9, 0x93, 0x7d, 0x27,
-	0xbc, 0xe6, 0x08, 0x52, 0x23, 0x79, 0x97, 0xcd, 0x56, 0x0c,
-	0xe2, 0xb8, 0x8f, 0xd5, 0x3b, 0x61, 0xfa, 0xa0, 0x4e, 0x14,
-	0x65, 0x3f, 0xd1, 0x8b, 0x10, 0x4a, 0xa4, 0xfe, 0x46, 0x1c,
-	0xf2, 0xa8, 0x33, 0x69, 0x87, 0xdd, 0xac, 0xf6, 0x18, 0x42,
-	0xd9, 0x83, 0x6d, 0x37, 0x03, 0x59, 0xb7, 0xed, 0x76, 0x2c,
-	0xc2, 0x98, 0xe9, 0xb3, 0x5d, 0x07, 0x9c, 0xc6, 0x28, 0x72,
-	0xca, 0x90, 0x7e, 0x24, 0xbf, 0xe5, 0x0b, 0x51, 0x20, 0x7a,
-	0x94, 0xce, 0x55, 0x0f, 0xe1, 0xbb, 0x8c, 0xd6, 0x38, 0x62,
-	0xf9, 0xa3, 0x4d, 0x17, 0x66, 0x3c, 0xd2, 0x88, 0x13, 0x49,
-	0xa7, 0xfd, 0x45, 0x1f, 0xf1, 0xab, 0x30, 0x6a, 0x84, 0xde,
-	0xaf, 0xf5, 0x1b, 0x41, 0xda, 0x80, 0x6e, 0x34, 0x06, 0x5c,
-	0xb2, 0xe8, 0x73, 0x29, 0xc7, 0x9d, 0xec, 0xb6, 0x58, 0x02,
-	0x99, 0xc3, 0x2d, 0x77, 0xcf, 0x95, 0x7b, 0x21, 0xba, 0xe0,
-	0x0e, 0x54, 0x25, 0x7f, 0x91, 0xcb, 0x50, 0x0a, 0xe4, 0xbe,
-	0x89, 0xd3, 0x3d, 0x67, 0xfc, 0xa6, 0x48, 0x12, 0x63, 0x39,
-	0xd7, 0x8d, 0x16, 0x4c, 0xa2, 0xf8, 0x40, 0x1a, 0xf4, 0xae,
-	0x35, 0x6f, 0x81, 0xdb, 0xaa, 0xf0, 0x1e, 0x44, 0xdf, 0x85,
-	0x6b, 0x31, 0x05, 0x5f, 0xb1, 0xeb, 0x70, 0x2a, 0xc4, 0x9e,
-	0xef, 0xb5, 0x5b, 0x01, 0x9a, 0xc0, 0x2e, 0x74, 0xcc, 0x96,
-	0x78, 0x22, 0xb9, 0xe3, 0x0d, 0x57, 0x26, 0x7c, 0x92, 0xc8,
-	0x53, 0x09, 0xe7, 0xbd, 0x8a, 0xd0, 0x3e, 0x64, 0xff, 0xa5,
-	0x4b, 0x11, 0x60, 0x3a, 0xd4, 0x8e, 0x15, 0x4f, 0xa1, 0xfb,
-	0x43, 0x19, 0xf7, 0xad, 0x36, 0x6c, 0x82, 0xd8, 0xa9, 0xf3,
-	0x1d, 0x47, 0xdc, 0x86, 0x68, 0x32, 0x00, 0x5b, 0xb6, 0xed,
-	0x71, 0x2a, 0xc7, 0x9c, 0xe2, 0xb9, 0x54, 0x0f, 0x93, 0xc8,
-	0x25, 0x7e, 0xd9, 0x82, 0x6f, 0x34, 0xa8, 0xf3, 0x1e, 0x45,
-	0x3b, 0x60, 0x8d, 0xd6, 0x4a, 0x11, 0xfc, 0xa7, 0xaf, 0xf4,
-	0x19, 0x42, 0xde, 0x85, 0x68, 0x33, 0x4d, 0x16, 0xfb, 0xa0,
-	0x3c, 0x67, 0x8a, 0xd1, 0x76, 0x2d, 0xc0, 0x9b, 0x07, 0x5c,
-	0xb1, 0xea, 0x94, 0xcf, 0x22, 0x79, 0xe5, 0xbe, 0x53, 0x08,
-	0x43, 0x18, 0xf5, 0xae, 0x32, 0x69, 0x84, 0xdf, 0xa1, 0xfa,
-	0x17, 0x4c, 0xd0, 0x8b, 0x66, 0x3d, 0x9a, 0xc1, 0x2c, 0x77,
-	0xeb, 0xb0, 0x5d, 0x06, 0x78, 0x23, 0xce, 0x95, 0x09, 0x52,
-	0xbf, 0xe4, 0xec, 0xb7, 0x5a, 0x01, 0x9d, 0xc6, 0x2b, 0x70,
-	0x0e, 0x55, 0xb8, 0xe3, 0x7f, 0x24, 0xc9, 0x92, 0x35, 0x6e,
-	0x83, 0xd8, 0x44, 0x1f, 0xf2, 0xa9, 0xd7, 0x8c, 0x61, 0x3a,
-	0xa6, 0xfd, 0x10, 0x4b, 0x86, 0xdd, 0x30, 0x6b, 0xf7, 0xac,
-	0x41, 0x1a, 0x64, 0x3f, 0xd2, 0x89, 0x15, 0x4e, 0xa3, 0xf8,
-	0x5f, 0x04, 0xe9, 0xb2, 0x2e, 0x75, 0x98, 0xc3, 0xbd, 0xe6,
-	0x0b, 0x50, 0xcc, 0x97, 0x7a, 0x21, 0x29, 0x72, 0x9f, 0xc4,
-	0x58, 0x03, 0xee, 0xb5, 0xcb, 0x90, 0x7d, 0x26, 0xba, 0xe1,
-	0x0c, 0x57, 0xf0, 0xab, 0x46, 0x1d, 0x81, 0xda, 0x37, 0x6c,
-	0x12, 0x49, 0xa4, 0xff, 0x63, 0x38, 0xd5, 0x8e, 0xc5, 0x9e,
-	0x73, 0x28, 0xb4, 0xef, 0x02, 0x59, 0x27, 0x7c, 0x91, 0xca,
-	0x56, 0x0d, 0xe0, 0xbb, 0x1c, 0x47, 0xaa, 0xf1, 0x6d, 0x36,
-	0xdb, 0x80, 0xfe, 0xa5, 0x48, 0x13, 0x8f, 0xd4, 0x39, 0x62,
-	0x6a, 0x31, 0xdc, 0x87, 0x1b, 0x40, 0xad, 0xf6, 0x88, 0xd3,
-	0x3e, 0x65, 0xf9, 0xa2, 0x4f, 0x14, 0xb3, 0xe8, 0x05, 0x5e,
-	0xc2, 0x99, 0x74, 0x2f, 0x51, 0x0a, 0xe7, 0xbc, 0x20, 0x7b,
-	0x96, 0xcd, 0x00, 0x5c, 0xb8, 0xe4, 0x6d, 0x31, 0xd5, 0x89,
-	0xda, 0x86, 0x62, 0x3e, 0xb7, 0xeb, 0x0f, 0x53, 0xa9, 0xf5,
-	0x11, 0x4d, 0xc4, 0x98, 0x7c, 0x20, 0x73, 0x2f, 0xcb, 0x97,
-	0x1e, 0x42, 0xa6, 0xfa, 0x4f, 0x13, 0xf7, 0xab, 0x22, 0x7e,
-	0x9a, 0xc6, 0x95, 0xc9, 0x2d, 0x71, 0xf8, 0xa4, 0x40, 0x1c,
-	0xe6, 0xba, 0x5e, 0x02, 0x8b, 0xd7, 0x33, 0x6f, 0x3c, 0x60,
-	0x84, 0xd8, 0x51, 0x0d, 0xe9, 0xb5, 0x9e, 0xc2, 0x26, 0x7a,
-	0xf3, 0xaf, 0x4b, 0x17, 0x44, 0x18, 0xfc, 0xa0, 0x29, 0x75,
-	0x91, 0xcd, 0x37, 0x6b, 0x8f, 0xd3, 0x5a, 0x06, 0xe2, 0xbe,
-	0xed, 0xb1, 0x55, 0x09, 0x80, 0xdc, 0x38, 0x64, 0xd1, 0x8d,
-	0x69, 0x35, 0xbc, 0xe0, 0x04, 0x58, 0x0b, 0x57, 0xb3, 0xef,
-	0x66, 0x3a, 0xde, 0x82, 0x78, 0x24, 0xc0, 0x9c, 0x15, 0x49,
-	0xad, 0xf1, 0xa2, 0xfe, 0x1a, 0x46, 0xcf, 0x93, 0x77, 0x2b,
-	0x21, 0x7d, 0x99, 0xc5, 0x4c, 0x10, 0xf4, 0xa8, 0xfb, 0xa7,
-	0x43, 0x1f, 0x96, 0xca, 0x2e, 0x72, 0x88, 0xd4, 0x30, 0x6c,
-	0xe5, 0xb9, 0x5d, 0x01, 0x52, 0x0e, 0xea, 0xb6, 0x3f, 0x63,
-	0x87, 0xdb, 0x6e, 0x32, 0xd6, 0x8a, 0x03, 0x5f, 0xbb, 0xe7,
-	0xb4, 0xe8, 0x0c, 0x50, 0xd9, 0x85, 0x61, 0x3d, 0xc7, 0x9b,
-	0x7f, 0x23, 0xaa, 0xf6, 0x12, 0x4e, 0x1d, 0x41, 0xa5, 0xf9,
-	0x70, 0x2c, 0xc8, 0x94, 0xbf, 0xe3, 0x07, 0x5b, 0xd2, 0x8e,
-	0x6a, 0x36, 0x65, 0x39, 0xdd, 0x81, 0x08, 0x54, 0xb0, 0xec,
-	0x16, 0x4a, 0xae, 0xf2, 0x7b, 0x27, 0xc3, 0x9f, 0xcc, 0x90,
-	0x74, 0x28, 0xa1, 0xfd, 0x19, 0x45, 0xf0, 0xac, 0x48, 0x14,
-	0x9d, 0xc1, 0x25, 0x79, 0x2a, 0x76, 0x92, 0xce, 0x47, 0x1b,
-	0xff, 0xa3, 0x59, 0x05, 0xe1, 0xbd, 0x34, 0x68, 0x8c, 0xd0,
-	0x83, 0xdf, 0x3b, 0x67, 0xee, 0xb2, 0x56, 0x0a, 0x00, 0x5d,
-	0xba, 0xe7, 0x69, 0x34, 0xd3, 0x8e, 0xd2, 0x8f, 0x68, 0x35,
-	0xbb, 0xe6, 0x01, 0x5c, 0xb9, 0xe4, 0x03, 0x5e, 0xd0, 0x8d,
-	0x6a, 0x37, 0x6b, 0x36, 0xd1, 0x8c, 0x02, 0x5f, 0xb8, 0xe5,
-	0x6f, 0x32, 0xd5, 0x88, 0x06, 0x5b, 0xbc, 0xe1, 0xbd, 0xe0,
-	0x07, 0x5a, 0xd4, 0x89, 0x6e, 0x33, 0xd6, 0x8b, 0x6c, 0x31,
-	0xbf, 0xe2, 0x05, 0x58, 0x04, 0x59, 0xbe, 0xe3, 0x6d, 0x30,
-	0xd7, 0x8a, 0xde, 0x83, 0x64, 0x39, 0xb7, 0xea, 0x0d, 0x50,
-	0x0c, 0x51, 0xb6, 0xeb, 0x65, 0x38, 0xdf, 0x82, 0x67, 0x3a,
-	0xdd, 0x80, 0x0e, 0x53, 0xb4, 0xe9, 0xb5, 0xe8, 0x0f, 0x52,
-	0xdc, 0x81, 0x66, 0x3b, 0xb1, 0xec, 0x0b, 0x56, 0xd8, 0x85,
-	0x62, 0x3f, 0x63, 0x3e, 0xd9, 0x84, 0x0a, 0x57, 0xb0, 0xed,
-	0x08, 0x55, 0xb2, 0xef, 0x61, 0x3c, 0xdb, 0x86, 0xda, 0x87,
-	0x60, 0x3d, 0xb3, 0xee, 0x09, 0x54, 0xa1, 0xfc, 0x1b, 0x46,
-	0xc8, 0x95, 0x72, 0x2f, 0x73, 0x2e, 0xc9, 0x94, 0x1a, 0x47,
-	0xa0, 0xfd, 0x18, 0x45, 0xa2, 0xff, 0x71, 0x2c, 0xcb, 0x96,
-	0xca, 0x97, 0x70, 0x2d, 0xa3, 0xfe, 0x19, 0x44, 0xce, 0x93,
-	0x74, 0x29, 0xa7, 0xfa, 0x1d, 0x40, 0x1c, 0x41, 0xa6, 0xfb,
-	0x75, 0x28, 0xcf, 0x92, 0x77, 0x2a, 0xcd, 0x90, 0x1e, 0x43,
-	0xa4, 0xf9, 0xa5, 0xf8, 0x1f, 0x42, 0xcc, 0x91, 0x76, 0x2b,
-	0x7f, 0x22, 0xc5, 0x98, 0x16, 0x4b, 0xac, 0xf1, 0xad, 0xf0,
-	0x17, 0x4a, 0xc4, 0x99, 0x7e, 0x23, 0xc6, 0x9b, 0x7c, 0x21,
-	0xaf, 0xf2, 0x15, 0x48, 0x14, 0x49, 0xae, 0xf3, 0x7d, 0x20,
-	0xc7, 0x9a, 0x10, 0x4d, 0xaa, 0xf7, 0x79, 0x24, 0xc3, 0x9e,
-	0xc2, 0x9f, 0x78, 0x25, 0xab, 0xf6, 0x11, 0x4c, 0xa9, 0xf4,
-	0x13, 0x4e, 0xc0, 0x9d, 0x7a, 0x27, 0x7b, 0x26, 0xc1, 0x9c,
-	0x12, 0x4f, 0xa8, 0xf5, 0x00, 0x5e, 0xbc, 0xe2, 0x65, 0x3b,
-	0xd9, 0x87, 0xca, 0x94, 0x76, 0x28, 0xaf, 0xf1, 0x13, 0x4d,
-	0x89, 0xd7, 0x35, 0x6b, 0xec, 0xb2, 0x50, 0x0e, 0x43, 0x1d,
-	0xff, 0xa1, 0x26, 0x78, 0x9a, 0xc4, 0x0f, 0x51, 0xb3, 0xed,
-	0x6a, 0x34, 0xd6, 0x88, 0xc5, 0x9b, 0x79, 0x27, 0xa0, 0xfe,
-	0x1c, 0x42, 0x86, 0xd8, 0x3a, 0x64, 0xe3, 0xbd, 0x5f, 0x01,
-	0x4c, 0x12, 0xf0, 0xae, 0x29, 0x77, 0x95, 0xcb, 0x1e, 0x40,
-	0xa2, 0xfc, 0x7b, 0x25, 0xc7, 0x99, 0xd4, 0x8a, 0x68, 0x36,
-	0xb1, 0xef, 0x0d, 0x53, 0x97, 0xc9, 0x2b, 0x75, 0xf2, 0xac,
-	0x4e, 0x10, 0x5d, 0x03, 0xe1, 0xbf, 0x38, 0x66, 0x84, 0xda,
-	0x11, 0x4f, 0xad, 0xf3, 0x74, 0x2a, 0xc8, 0x96, 0xdb, 0x85,
-	0x67, 0x39, 0xbe, 0xe0, 0x02, 0x5c, 0x98, 0xc6, 0x24, 0x7a,
-	0xfd, 0xa3, 0x41, 0x1f, 0x52, 0x0c, 0xee, 0xb0, 0x37, 0x69,
-	0x8b, 0xd5, 0x3c, 0x62, 0x80, 0xde, 0x59, 0x07, 0xe5, 0xbb,
-	0xf6, 0xa8, 0x4a, 0x14, 0x93, 0xcd, 0x2f, 0x71, 0xb5, 0xeb,
-	0x09, 0x57, 0xd0, 0x8e, 0x6c, 0x32, 0x7f, 0x21, 0xc3, 0x9d,
-	0x1a, 0x44, 0xa6, 0xf8, 0x33, 0x6d, 0x8f, 0xd1, 0x56, 0x08,
-	0xea, 0xb4, 0xf9, 0xa7, 0x45, 0x1b, 0x9c, 0xc2, 0x20, 0x7e,
-	0xba, 0xe4, 0x06, 0x58, 0xdf, 0x81, 0x63, 0x3d, 0x70, 0x2e,
-	0xcc, 0x92, 0x15, 0x4b, 0xa9, 0xf7, 0x22, 0x7c, 0x9e, 0xc0,
-	0x47, 0x19, 0xfb, 0xa5, 0xe8, 0xb6, 0x54, 0x0a, 0x8d, 0xd3,
-	0x31, 0x6f, 0xab, 0xf5, 0x17, 0x49, 0xce, 0x90, 0x72, 0x2c,
-	0x61, 0x3f, 0xdd, 0x83, 0x04, 0x5a, 0xb8, 0xe6, 0x2d, 0x73,
-	0x91, 0xcf, 0x48, 0x16, 0xf4, 0xaa, 0xe7, 0xb9, 0x5b, 0x05,
-	0x82, 0xdc, 0x3e, 0x60, 0xa4, 0xfa, 0x18, 0x46, 0xc1, 0x9f,
-	0x7d, 0x23, 0x6e, 0x30, 0xd2, 0x8c, 0x0b, 0x55, 0xb7, 0xe9,
-	0x00, 0x5f, 0xbe, 0xe1, 0x61, 0x3e, 0xdf, 0x80, 0xc2, 0x9d,
-	0x7c, 0x23, 0xa3, 0xfc, 0x1d, 0x42, 0x99, 0xc6, 0x27, 0x78,
-	0xf8, 0xa7, 0x46, 0x19, 0x5b, 0x04, 0xe5, 0xba, 0x3a, 0x65,
-	0x84, 0xdb, 0x2f, 0x70, 0x91, 0xce, 0x4e, 0x11, 0xf0, 0xaf,
-	0xed, 0xb2, 0x53, 0x0c, 0x8c, 0xd3, 0x32, 0x6d, 0xb6, 0xe9,
-	0x08, 0x57, 0xd7, 0x88, 0x69, 0x36, 0x74, 0x2b, 0xca, 0x95,
-	0x15, 0x4a, 0xab, 0xf4, 0x5e, 0x01, 0xe0, 0xbf, 0x3f, 0x60,
-	0x81, 0xde, 0x9c, 0xc3, 0x22, 0x7d, 0xfd, 0xa2, 0x43, 0x1c,
-	0xc7, 0x98, 0x79, 0x26, 0xa6, 0xf9, 0x18, 0x47, 0x05, 0x5a,
-	0xbb, 0xe4, 0x64, 0x3b, 0xda, 0x85, 0x71, 0x2e, 0xcf, 0x90,
-	0x10, 0x4f, 0xae, 0xf1, 0xb3, 0xec, 0x0d, 0x52, 0xd2, 0x8d,
-	0x6c, 0x33, 0xe8, 0xb7, 0x56, 0x09, 0x89, 0xd6, 0x37, 0x68,
-	0x2a, 0x75, 0x94, 0xcb, 0x4b, 0x14, 0xf5, 0xaa, 0xbc, 0xe3,
-	0x02, 0x5d, 0xdd, 0x82, 0x63, 0x3c, 0x7e, 0x21, 0xc0, 0x9f,
-	0x1f, 0x40, 0xa1, 0xfe, 0x25, 0x7a, 0x9b, 0xc4, 0x44, 0x1b,
-	0xfa, 0xa5, 0xe7, 0xb8, 0x59, 0x06, 0x86, 0xd9, 0x38, 0x67,
-	0x93, 0xcc, 0x2d, 0x72, 0xf2, 0xad, 0x4c, 0x13, 0x51, 0x0e,
-	0xef, 0xb0, 0x30, 0x6f, 0x8e, 0xd1, 0x0a, 0x55, 0xb4, 0xeb,
-	0x6b, 0x34, 0xd5, 0x8a, 0xc8, 0x97, 0x76, 0x29, 0xa9, 0xf6,
-	0x17, 0x48, 0xe2, 0xbd, 0x5c, 0x03, 0x83, 0xdc, 0x3d, 0x62,
-	0x20, 0x7f, 0x9e, 0xc1, 0x41, 0x1e, 0xff, 0xa0, 0x7b, 0x24,
-	0xc5, 0x9a, 0x1a, 0x45, 0xa4, 0xfb, 0xb9, 0xe6, 0x07, 0x58,
-	0xd8, 0x87, 0x66, 0x39, 0xcd, 0x92, 0x73, 0x2c, 0xac, 0xf3,
-	0x12, 0x4d, 0x0f, 0x50, 0xb1, 0xee, 0x6e, 0x31, 0xd0, 0x8f,
-	0x54, 0x0b, 0xea, 0xb5, 0x35, 0x6a, 0x8b, 0xd4, 0x96, 0xc9,
-	0x28, 0x77, 0xf7, 0xa8, 0x49, 0x16, 0x00, 0x60, 0xc0, 0xa0,
-	0x9d, 0xfd, 0x5d, 0x3d, 0x27, 0x47, 0xe7, 0x87, 0xba, 0xda,
-	0x7a, 0x1a, 0x4e, 0x2e, 0x8e, 0xee, 0xd3, 0xb3, 0x13, 0x73,
-	0x69, 0x09, 0xa9, 0xc9, 0xf4, 0x94, 0x34, 0x54, 0x9c, 0xfc,
-	0x5c, 0x3c, 0x01, 0x61, 0xc1, 0xa1, 0xbb, 0xdb, 0x7b, 0x1b,
-	0x26, 0x46, 0xe6, 0x86, 0xd2, 0xb2, 0x12, 0x72, 0x4f, 0x2f,
-	0x8f, 0xef, 0xf5, 0x95, 0x35, 0x55, 0x68, 0x08, 0xa8, 0xc8,
-	0x25, 0x45, 0xe5, 0x85, 0xb8, 0xd8, 0x78, 0x18, 0x02, 0x62,
-	0xc2, 0xa2, 0x9f, 0xff, 0x5f, 0x3f, 0x6b, 0x0b, 0xab, 0xcb,
-	0xf6, 0x96, 0x36, 0x56, 0x4c, 0x2c, 0x8c, 0xec, 0xd1, 0xb1,
-	0x11, 0x71, 0xb9, 0xd9, 0x79, 0x19, 0x24, 0x44, 0xe4, 0x84,
-	0x9e, 0xfe, 0x5e, 0x3e, 0x03, 0x63, 0xc3, 0xa3, 0xf7, 0x97,
-	0x37, 0x57, 0x6a, 0x0a, 0xaa, 0xca, 0xd0, 0xb0, 0x10, 0x70,
-	0x4d, 0x2d, 0x8d, 0xed, 0x4a, 0x2a, 0x8a, 0xea, 0xd7, 0xb7,
-	0x17, 0x77, 0x6d, 0x0d, 0xad, 0xcd, 0xf0, 0x90, 0x30, 0x50,
-	0x04, 0x64, 0xc4, 0xa4, 0x99, 0xf9, 0x59, 0x39, 0x23, 0x43,
-	0xe3, 0x83, 0xbe, 0xde, 0x7e, 0x1e, 0xd6, 0xb6, 0x16, 0x76,
-	0x4b, 0x2b, 0x8b, 0xeb, 0xf1, 0x91, 0x31, 0x51, 0x6c, 0x0c,
-	0xac, 0xcc, 0x98, 0xf8, 0x58, 0x38, 0x05, 0x65, 0xc5, 0xa5,
-	0xbf, 0xdf, 0x7f, 0x1f, 0x22, 0x42, 0xe2, 0x82, 0x6f, 0x0f,
-	0xaf, 0xcf, 0xf2, 0x92, 0x32, 0x52, 0x48, 0x28, 0x88, 0xe8,
-	0xd5, 0xb5, 0x15, 0x75, 0x21, 0x41, 0xe1, 0x81, 0xbc, 0xdc,
-	0x7c, 0x1c, 0x06, 0x66, 0xc6, 0xa6, 0x9b, 0xfb, 0x5b, 0x3b,
-	0xf3, 0x93, 0x33, 0x53, 0x6e, 0x0e, 0xae, 0xce, 0xd4, 0xb4,
-	0x14, 0x74, 0x49, 0x29, 0x89, 0xe9, 0xbd, 0xdd, 0x7d, 0x1d,
-	0x20, 0x40, 0xe0, 0x80, 0x9a, 0xfa, 0x5a, 0x3a, 0x07, 0x67,
-	0xc7, 0xa7, 0x00, 0x61, 0xc2, 0xa3, 0x99, 0xf8, 0x5b, 0x3a,
-	0x2f, 0x4e, 0xed, 0x8c, 0xb6, 0xd7, 0x74, 0x15, 0x5e, 0x3f,
-	0x9c, 0xfd, 0xc7, 0xa6, 0x05, 0x64, 0x71, 0x10, 0xb3, 0xd2,
-	0xe8, 0x89, 0x2a, 0x4b, 0xbc, 0xdd, 0x7e, 0x1f, 0x25, 0x44,
-	0xe7, 0x86, 0x93, 0xf2, 0x51, 0x30, 0x0a, 0x6b, 0xc8, 0xa9,
-	0xe2, 0x83, 0x20, 0x41, 0x7b, 0x1a, 0xb9, 0xd8, 0xcd, 0xac,
-	0x0f, 0x6e, 0x54, 0x35, 0x96, 0xf7, 0x65, 0x04, 0xa7, 0xc6,
-	0xfc, 0x9d, 0x3e, 0x5f, 0x4a, 0x2b, 0x88, 0xe9, 0xd3, 0xb2,
-	0x11, 0x70, 0x3b, 0x5a, 0xf9, 0x98, 0xa2, 0xc3, 0x60, 0x01,
-	0x14, 0x75, 0xd6, 0xb7, 0x8d, 0xec, 0x4f, 0x2e, 0xd9, 0xb8,
-	0x1b, 0x7a, 0x40, 0x21, 0x82, 0xe3, 0xf6, 0x97, 0x34, 0x55,
-	0x6f, 0x0e, 0xad, 0xcc, 0x87, 0xe6, 0x45, 0x24, 0x1e, 0x7f,
-	0xdc, 0xbd, 0xa8, 0xc9, 0x6a, 0x0b, 0x31, 0x50, 0xf3, 0x92,
-	0xca, 0xab, 0x08, 0x69, 0x53, 0x32, 0x91, 0xf0, 0xe5, 0x84,
-	0x27, 0x46, 0x7c, 0x1d, 0xbe, 0xdf, 0x94, 0xf5, 0x56, 0x37,
-	0x0d, 0x6c, 0xcf, 0xae, 0xbb, 0xda, 0x79, 0x18, 0x22, 0x43,
-	0xe0, 0x81, 0x76, 0x17, 0xb4, 0xd5, 0xef, 0x8e, 0x2d, 0x4c,
-	0x59, 0x38, 0x9b, 0xfa, 0xc0, 0xa1, 0x02, 0x63, 0x28, 0x49,
-	0xea, 0x8b, 0xb1, 0xd0, 0x73, 0x12, 0x07, 0x66, 0xc5, 0xa4,
-	0x9e, 0xff, 0x5c, 0x3d, 0xaf, 0xce, 0x6d, 0x0c, 0x36, 0x57,
-	0xf4, 0x95, 0x80, 0xe1, 0x42, 0x23, 0x19, 0x78, 0xdb, 0xba,
-	0xf1, 0x90, 0x33, 0x52, 0x68, 0x09, 0xaa, 0xcb, 0xde, 0xbf,
-	0x1c, 0x7d, 0x47, 0x26, 0x85, 0xe4, 0x13, 0x72, 0xd1, 0xb0,
-	0x8a, 0xeb, 0x48, 0x29, 0x3c, 0x5d, 0xfe, 0x9f, 0xa5, 0xc4,
-	0x67, 0x06, 0x4d, 0x2c, 0x8f, 0xee, 0xd4, 0xb5, 0x16, 0x77,
-	0x62, 0x03, 0xa0, 0xc1, 0xfb, 0x9a, 0x39, 0x58, 0x00, 0x62,
-	0xc4, 0xa6, 0x95, 0xf7, 0x51, 0x33, 0x37, 0x55, 0xf3, 0x91,
-	0xa2, 0xc0, 0x66, 0x04, 0x6e, 0x0c, 0xaa, 0xc8, 0xfb, 0x99,
-	0x3f, 0x5d, 0x59, 0x3b, 0x9d, 0xff, 0xcc, 0xae, 0x08, 0x6a,
-	0xdc, 0xbe, 0x18, 0x7a, 0x49, 0x2b, 0x8d, 0xef, 0xeb, 0x89,
-	0x2f, 0x4d, 0x7e, 0x1c, 0xba, 0xd8, 0xb2, 0xd0, 0x76, 0x14,
-	0x27, 0x45, 0xe3, 0x81, 0x85, 0xe7, 0x41, 0x23, 0x10, 0x72,
-	0xd4, 0xb6, 0xa5, 0xc7, 0x61, 0x03, 0x30, 0x52, 0xf4, 0x96,
-	0x92, 0xf0, 0x56, 0x34, 0x07, 0x65, 0xc3, 0xa1, 0xcb, 0xa9,
-	0x0f, 0x6d, 0x5e, 0x3c, 0x9a, 0xf8, 0xfc, 0x9e, 0x38, 0x5a,
-	0x69, 0x0b, 0xad, 0xcf, 0x79, 0x1b, 0xbd, 0xdf, 0xec, 0x8e,
-	0x28, 0x4a, 0x4e, 0x2c, 0x8a, 0xe8, 0xdb, 0xb9, 0x1f, 0x7d,
-	0x17, 0x75, 0xd3, 0xb1, 0x82, 0xe0, 0x46, 0x24, 0x20, 0x42,
-	0xe4, 0x86, 0xb5, 0xd7, 0x71, 0x13, 0x57, 0x35, 0x93, 0xf1,
-	0xc2, 0xa0, 0x06, 0x64, 0x60, 0x02, 0xa4, 0xc6, 0xf5, 0x97,
-	0x31, 0x53, 0x39, 0x5b, 0xfd, 0x9f, 0xac, 0xce, 0x68, 0x0a,
-	0x0e, 0x6c, 0xca, 0xa8, 0x9b, 0xf9, 0x5f, 0x3d, 0x8b, 0xe9,
-	0x4f, 0x2d, 0x1e, 0x7c, 0xda, 0xb8, 0xbc, 0xde, 0x78, 0x1a,
-	0x29, 0x4b, 0xed, 0x8f, 0xe5, 0x87, 0x21, 0x43, 0x70, 0x12,
-	0xb4, 0xd6, 0xd2, 0xb0, 0x16, 0x74, 0x47, 0x25, 0x83, 0xe1,
-	0xf2, 0x90, 0x36, 0x54, 0x67, 0x05, 0xa3, 0xc1, 0xc5, 0xa7,
-	0x01, 0x63, 0x50, 0x32, 0x94, 0xf6, 0x9c, 0xfe, 0x58, 0x3a,
-	0x09, 0x6b, 0xcd, 0xaf, 0xab, 0xc9, 0x6f, 0x0d, 0x3e, 0x5c,
-	0xfa, 0x98, 0x2e, 0x4c, 0xea, 0x88, 0xbb, 0xd9, 0x7f, 0x1d,
-	0x19, 0x7b, 0xdd, 0xbf, 0x8c, 0xee, 0x48, 0x2a, 0x40, 0x22,
-	0x84, 0xe6, 0xd5, 0xb7, 0x11, 0x73, 0x77, 0x15, 0xb3, 0xd1,
-	0xe2, 0x80, 0x26, 0x44, 0x00, 0x63, 0xc6, 0xa5, 0x91, 0xf2,
-	0x57, 0x34, 0x3f, 0x5c, 0xf9, 0x9a, 0xae, 0xcd, 0x68, 0x0b,
-	0x7e, 0x1d, 0xb8, 0xdb, 0xef, 0x8c, 0x29, 0x4a, 0x41, 0x22,
-	0x87, 0xe4, 0xd0, 0xb3, 0x16, 0x75, 0xfc, 0x9f, 0x3a, 0x59,
-	0x6d, 0x0e, 0xab, 0xc8, 0xc3, 0xa0, 0x05, 0x66, 0x52, 0x31,
-	0x94, 0xf7, 0x82, 0xe1, 0x44, 0x27, 0x13, 0x70, 0xd5, 0xb6,
-	0xbd, 0xde, 0x7b, 0x18, 0x2c, 0x4f, 0xea, 0x89, 0xe5, 0x86,
-	0x23, 0x40, 0x74, 0x17, 0xb2, 0xd1, 0xda, 0xb9, 0x1c, 0x7f,
-	0x4b, 0x28, 0x8d, 0xee, 0x9b, 0xf8, 0x5d, 0x3e, 0x0a, 0x69,
-	0xcc, 0xaf, 0xa4, 0xc7, 0x62, 0x01, 0x35, 0x56, 0xf3, 0x90,
-	0x19, 0x7a, 0xdf, 0xbc, 0x88, 0xeb, 0x4e, 0x2d, 0x26, 0x45,
-	0xe0, 0x83, 0xb7, 0xd4, 0x71, 0x12, 0x67, 0x04, 0xa1, 0xc2,
-	0xf6, 0x95, 0x30, 0x53, 0x58, 0x3b, 0x9e, 0xfd, 0xc9, 0xaa,
-	0x0f, 0x6c, 0xd7, 0xb4, 0x11, 0x72, 0x46, 0x25, 0x80, 0xe3,
-	0xe8, 0x8b, 0x2e, 0x4d, 0x79, 0x1a, 0xbf, 0xdc, 0xa9, 0xca,
-	0x6f, 0x0c, 0x38, 0x5b, 0xfe, 0x9d, 0x96, 0xf5, 0x50, 0x33,
-	0x07, 0x64, 0xc1, 0xa2, 0x2b, 0x48, 0xed, 0x8e, 0xba, 0xd9,
-	0x7c, 0x1f, 0x14, 0x77, 0xd2, 0xb1, 0x85, 0xe6, 0x43, 0x20,
-	0x55, 0x36, 0x93, 0xf0, 0xc4, 0xa7, 0x02, 0x61, 0x6a, 0x09,
-	0xac, 0xcf, 0xfb, 0x98, 0x3d, 0x5e, 0x32, 0x51, 0xf4, 0x97,
-	0xa3, 0xc0, 0x65, 0x06, 0x0d, 0x6e, 0xcb, 0xa8, 0x9c, 0xff,
-	0x5a, 0x39, 0x4c, 0x2f, 0x8a, 0xe9, 0xdd, 0xbe, 0x1b, 0x78,
-	0x73, 0x10, 0xb5, 0xd6, 0xe2, 0x81, 0x24, 0x47, 0xce, 0xad,
-	0x08, 0x6b, 0x5f, 0x3c, 0x99, 0xfa, 0xf1, 0x92, 0x37, 0x54,
-	0x60, 0x03, 0xa6, 0xc5, 0xb0, 0xd3, 0x76, 0x15, 0x21, 0x42,
-	0xe7, 0x84, 0x8f, 0xec, 0x49, 0x2a, 0x1e, 0x7d, 0xd8, 0xbb,
-	0x00, 0x64, 0xc8, 0xac, 0x8d, 0xe9, 0x45, 0x21, 0x07, 0x63,
-	0xcf, 0xab, 0x8a, 0xee, 0x42, 0x26, 0x0e, 0x6a, 0xc6, 0xa2,
-	0x83, 0xe7, 0x4b, 0x2f, 0x09, 0x6d, 0xc1, 0xa5, 0x84, 0xe0,
-	0x4c, 0x28, 0x1c, 0x78, 0xd4, 0xb0, 0x91, 0xf5, 0x59, 0x3d,
-	0x1b, 0x7f, 0xd3, 0xb7, 0x96, 0xf2, 0x5e, 0x3a, 0x12, 0x76,
-	0xda, 0xbe, 0x9f, 0xfb, 0x57, 0x33, 0x15, 0x71, 0xdd, 0xb9,
-	0x98, 0xfc, 0x50, 0x34, 0x38, 0x5c, 0xf0, 0x94, 0xb5, 0xd1,
-	0x7d, 0x19, 0x3f, 0x5b, 0xf7, 0x93, 0xb2, 0xd6, 0x7a, 0x1e,
-	0x36, 0x52, 0xfe, 0x9a, 0xbb, 0xdf, 0x73, 0x17, 0x31, 0x55,
-	0xf9, 0x9d, 0xbc, 0xd8, 0x74, 0x10, 0x24, 0x40, 0xec, 0x88,
-	0xa9, 0xcd, 0x61, 0x05, 0x23, 0x47, 0xeb, 0x8f, 0xae, 0xca,
-	0x66, 0x02, 0x2a, 0x4e, 0xe2, 0x86, 0xa7, 0xc3, 0x6f, 0x0b,
-	0x2d, 0x49, 0xe5, 0x81, 0xa0, 0xc4, 0x68, 0x0c, 0x70, 0x14,
-	0xb8, 0xdc, 0xfd, 0x99, 0x35, 0x51, 0x77, 0x13, 0xbf, 0xdb,
-	0xfa, 0x9e, 0x32, 0x56, 0x7e, 0x1a, 0xb6, 0xd2, 0xf3, 0x97,
-	0x3b, 0x5f, 0x79, 0x1d, 0xb1, 0xd5, 0xf4, 0x90, 0x3c, 0x58,
-	0x6c, 0x08, 0xa4, 0xc0, 0xe1, 0x85, 0x29, 0x4d, 0x6b, 0x0f,
-	0xa3, 0xc7, 0xe6, 0x82, 0x2e, 0x4a, 0x62, 0x06, 0xaa, 0xce,
-	0xef, 0x8b, 0x27, 0x43, 0x65, 0x01, 0xad, 0xc9, 0xe8, 0x8c,
-	0x20, 0x44, 0x48, 0x2c, 0x80, 0xe4, 0xc5, 0xa1, 0x0d, 0x69,
-	0x4f, 0x2b, 0x87, 0xe3, 0xc2, 0xa6, 0x0a, 0x6e, 0x46, 0x22,
-	0x8e, 0xea, 0xcb, 0xaf, 0x03, 0x67, 0x41, 0x25, 0x89, 0xed,
-	0xcc, 0xa8, 0x04, 0x60, 0x54, 0x30, 0x9c, 0xf8, 0xd9, 0xbd,
-	0x11, 0x75, 0x53, 0x37, 0x9b, 0xff, 0xde, 0xba, 0x16, 0x72,
-	0x5a, 0x3e, 0x92, 0xf6, 0xd7, 0xb3, 0x1f, 0x7b, 0x5d, 0x39,
-	0x95, 0xf1, 0xd0, 0xb4, 0x18, 0x7c, 0x00, 0x65, 0xca, 0xaf,
-	0x89, 0xec, 0x43, 0x26, 0x0f, 0x6a, 0xc5, 0xa0, 0x86, 0xe3,
-	0x4c, 0x29, 0x1e, 0x7b, 0xd4, 0xb1, 0x97, 0xf2, 0x5d, 0x38,
-	0x11, 0x74, 0xdb, 0xbe, 0x98, 0xfd, 0x52, 0x37, 0x3c, 0x59,
-	0xf6, 0x93, 0xb5, 0xd0, 0x7f, 0x1a, 0x33, 0x56, 0xf9, 0x9c,
-	0xba, 0xdf, 0x70, 0x15, 0x22, 0x47, 0xe8, 0x8d, 0xab, 0xce,
-	0x61, 0x04, 0x2d, 0x48, 0xe7, 0x82, 0xa4, 0xc1, 0x6e, 0x0b,
-	0x78, 0x1d, 0xb2, 0xd7, 0xf1, 0x94, 0x3b, 0x5e, 0x77, 0x12,
-	0xbd, 0xd8, 0xfe, 0x9b, 0x34, 0x51, 0x66, 0x03, 0xac, 0xc9,
-	0xef, 0x8a, 0x25, 0x40, 0x69, 0x0c, 0xa3, 0xc6, 0xe0, 0x85,
-	0x2a, 0x4f, 0x44, 0x21, 0x8e, 0xeb, 0xcd, 0xa8, 0x07, 0x62,
-	0x4b, 0x2e, 0x81, 0xe4, 0xc2, 0xa7, 0x08, 0x6d, 0x5a, 0x3f,
-	0x90, 0xf5, 0xd3, 0xb6, 0x19, 0x7c, 0x55, 0x30, 0x9f, 0xfa,
-	0xdc, 0xb9, 0x16, 0x73, 0xf0, 0x95, 0x3a, 0x5f, 0x79, 0x1c,
-	0xb3, 0xd6, 0xff, 0x9a, 0x35, 0x50, 0x76, 0x13, 0xbc, 0xd9,
-	0xee, 0x8b, 0x24, 0x41, 0x67, 0x02, 0xad, 0xc8, 0xe1, 0x84,
-	0x2b, 0x4e, 0x68, 0x0d, 0xa2, 0xc7, 0xcc, 0xa9, 0x06, 0x63,
-	0x45, 0x20, 0x8f, 0xea, 0xc3, 0xa6, 0x09, 0x6c, 0x4a, 0x2f,
-	0x80, 0xe5, 0xd2, 0xb7, 0x18, 0x7d, 0x5b, 0x3e, 0x91, 0xf4,
-	0xdd, 0xb8, 0x17, 0x72, 0x54, 0x31, 0x9e, 0xfb, 0x88, 0xed,
-	0x42, 0x27, 0x01, 0x64, 0xcb, 0xae, 0x87, 0xe2, 0x4d, 0x28,
-	0x0e, 0x6b, 0xc4, 0xa1, 0x96, 0xf3, 0x5c, 0x39, 0x1f, 0x7a,
-	0xd5, 0xb0, 0x99, 0xfc, 0x53, 0x36, 0x10, 0x75, 0xda, 0xbf,
-	0xb4, 0xd1, 0x7e, 0x1b, 0x3d, 0x58, 0xf7, 0x92, 0xbb, 0xde,
-	0x71, 0x14, 0x32, 0x57, 0xf8, 0x9d, 0xaa, 0xcf, 0x60, 0x05,
-	0x23, 0x46, 0xe9, 0x8c, 0xa5, 0xc0, 0x6f, 0x0a, 0x2c, 0x49,
-	0xe6, 0x83, 0x00, 0x66, 0xcc, 0xaa, 0x85, 0xe3, 0x49, 0x2f,
-	0x17, 0x71, 0xdb, 0xbd, 0x92, 0xf4, 0x5e, 0x38, 0x2e, 0x48,
-	0xe2, 0x84, 0xab, 0xcd, 0x67, 0x01, 0x39, 0x5f, 0xf5, 0x93,
-	0xbc, 0xda, 0x70, 0x16, 0x5c, 0x3a, 0x90, 0xf6, 0xd9, 0xbf,
-	0x15, 0x73, 0x4b, 0x2d, 0x87, 0xe1, 0xce, 0xa8, 0x02, 0x64,
-	0x72, 0x14, 0xbe, 0xd8, 0xf7, 0x91, 0x3b, 0x5d, 0x65, 0x03,
-	0xa9, 0xcf, 0xe0, 0x86, 0x2c, 0x4a, 0xb8, 0xde, 0x74, 0x12,
-	0x3d, 0x5b, 0xf1, 0x97, 0xaf, 0xc9, 0x63, 0x05, 0x2a, 0x4c,
-	0xe6, 0x80, 0x96, 0xf0, 0x5a, 0x3c, 0x13, 0x75, 0xdf, 0xb9,
-	0x81, 0xe7, 0x4d, 0x2b, 0x04, 0x62, 0xc8, 0xae, 0xe4, 0x82,
-	0x28, 0x4e, 0x61, 0x07, 0xad, 0xcb, 0xf3, 0x95, 0x3f, 0x59,
-	0x76, 0x10, 0xba, 0xdc, 0xca, 0xac, 0x06, 0x60, 0x4f, 0x29,
-	0x83, 0xe5, 0xdd, 0xbb, 0x11, 0x77, 0x58, 0x3e, 0x94, 0xf2,
-	0x6d, 0x0b, 0xa1, 0xc7, 0xe8, 0x8e, 0x24, 0x42, 0x7a, 0x1c,
-	0xb6, 0xd0, 0xff, 0x99, 0x33, 0x55, 0x43, 0x25, 0x8f, 0xe9,
-	0xc6, 0xa0, 0x0a, 0x6c, 0x54, 0x32, 0x98, 0xfe, 0xd1, 0xb7,
-	0x1d, 0x7b, 0x31, 0x57, 0xfd, 0x9b, 0xb4, 0xd2, 0x78, 0x1e,
-	0x26, 0x40, 0xea, 0x8c, 0xa3, 0xc5, 0x6f, 0x09, 0x1f, 0x79,
-	0xd3, 0xb5, 0x9a, 0xfc, 0x56, 0x30, 0x08, 0x6e, 0xc4, 0xa2,
-	0x8d, 0xeb, 0x41, 0x27, 0xd5, 0xb3, 0x19, 0x7f, 0x50, 0x36,
-	0x9c, 0xfa, 0xc2, 0xa4, 0x0e, 0x68, 0x47, 0x21, 0x8b, 0xed,
-	0xfb, 0x9d, 0x37, 0x51, 0x7e, 0x18, 0xb2, 0xd4, 0xec, 0x8a,
-	0x20, 0x46, 0x69, 0x0f, 0xa5, 0xc3, 0x89, 0xef, 0x45, 0x23,
-	0x0c, 0x6a, 0xc0, 0xa6, 0x9e, 0xf8, 0x52, 0x34, 0x1b, 0x7d,
-	0xd7, 0xb1, 0xa7, 0xc1, 0x6b, 0x0d, 0x22, 0x44, 0xee, 0x88,
-	0xb0, 0xd6, 0x7c, 0x1a, 0x35, 0x53, 0xf9, 0x9f, 0x00, 0x67,
-	0xce, 0xa9, 0x81, 0xe6, 0x4f, 0x28, 0x1f, 0x78, 0xd1, 0xb6,
-	0x9e, 0xf9, 0x50, 0x37, 0x3e, 0x59, 0xf0, 0x97, 0xbf, 0xd8,
-	0x71, 0x16, 0x21, 0x46, 0xef, 0x88, 0xa0, 0xc7, 0x6e, 0x09,
-	0x7c, 0x1b, 0xb2, 0xd5, 0xfd, 0x9a, 0x33, 0x54, 0x63, 0x04,
-	0xad, 0xca, 0xe2, 0x85, 0x2c, 0x4b, 0x42, 0x25, 0x8c, 0xeb,
-	0xc3, 0xa4, 0x0d, 0x6a, 0x5d, 0x3a, 0x93, 0xf4, 0xdc, 0xbb,
-	0x12, 0x75, 0xf8, 0x9f, 0x36, 0x51, 0x79, 0x1e, 0xb7, 0xd0,
-	0xe7, 0x80, 0x29, 0x4e, 0x66, 0x01, 0xa8, 0xcf, 0xc6, 0xa1,
-	0x08, 0x6f, 0x47, 0x20, 0x89, 0xee, 0xd9, 0xbe, 0x17, 0x70,
-	0x58, 0x3f, 0x96, 0xf1, 0x84, 0xe3, 0x4a, 0x2d, 0x05, 0x62,
-	0xcb, 0xac, 0x9b, 0xfc, 0x55, 0x32, 0x1a, 0x7d, 0xd4, 0xb3,
-	0xba, 0xdd, 0x74, 0x13, 0x3b, 0x5c, 0xf5, 0x92, 0xa5, 0xc2,
-	0x6b, 0x0c, 0x24, 0x43, 0xea, 0x8d, 0xed, 0x8a, 0x23, 0x44,
-	0x6c, 0x0b, 0xa2, 0xc5, 0xf2, 0x95, 0x3c, 0x5b, 0x73, 0x14,
-	0xbd, 0xda, 0xd3, 0xb4, 0x1d, 0x7a, 0x52, 0x35, 0x9c, 0xfb,
-	0xcc, 0xab, 0x02, 0x65, 0x4d, 0x2a, 0x83, 0xe4, 0x91, 0xf6,
-	0x5f, 0x38, 0x10, 0x77, 0xde, 0xb9, 0x8e, 0xe9, 0x40, 0x27,
-	0x0f, 0x68, 0xc1, 0xa6, 0xaf, 0xc8, 0x61, 0x06, 0x2e, 0x49,
-	0xe0, 0x87, 0xb0, 0xd7, 0x7e, 0x19, 0x31, 0x56, 0xff, 0x98,
-	0x15, 0x72, 0xdb, 0xbc, 0x94, 0xf3, 0x5a, 0x3d, 0x0a, 0x6d,
-	0xc4, 0xa3, 0x8b, 0xec, 0x45, 0x22, 0x2b, 0x4c, 0xe5, 0x82,
-	0xaa, 0xcd, 0x64, 0x03, 0x34, 0x53, 0xfa, 0x9d, 0xb5, 0xd2,
-	0x7b, 0x1c, 0x69, 0x0e, 0xa7, 0xc0, 0xe8, 0x8f, 0x26, 0x41,
-	0x76, 0x11, 0xb8, 0xdf, 0xf7, 0x90, 0x39, 0x5e, 0x57, 0x30,
-	0x99, 0xfe, 0xd6, 0xb1, 0x18, 0x7f, 0x48, 0x2f, 0x86, 0xe1,
-	0xc9, 0xae, 0x07, 0x60, 0x00, 0x68, 0xd0, 0xb8, 0xbd, 0xd5,
-	0x6d, 0x05, 0x67, 0x0f, 0xb7, 0xdf, 0xda, 0xb2, 0x0a, 0x62,
-	0xce, 0xa6, 0x1e, 0x76, 0x73, 0x1b, 0xa3, 0xcb, 0xa9, 0xc1,
-	0x79, 0x11, 0x14, 0x7c, 0xc4, 0xac, 0x81, 0xe9, 0x51, 0x39,
-	0x3c, 0x54, 0xec, 0x84, 0xe6, 0x8e, 0x36, 0x5e, 0x5b, 0x33,
-	0x8b, 0xe3, 0x4f, 0x27, 0x9f, 0xf7, 0xf2, 0x9a, 0x22, 0x4a,
-	0x28, 0x40, 0xf8, 0x90, 0x95, 0xfd, 0x45, 0x2d, 0x1f, 0x77,
-	0xcf, 0xa7, 0xa2, 0xca, 0x72, 0x1a, 0x78, 0x10, 0xa8, 0xc0,
-	0xc5, 0xad, 0x15, 0x7d, 0xd1, 0xb9, 0x01, 0x69, 0x6c, 0x04,
-	0xbc, 0xd4, 0xb6, 0xde, 0x66, 0x0e, 0x0b, 0x63, 0xdb, 0xb3,
-	0x9e, 0xf6, 0x4e, 0x26, 0x23, 0x4b, 0xf3, 0x9b, 0xf9, 0x91,
-	0x29, 0x41, 0x44, 0x2c, 0x94, 0xfc, 0x50, 0x38, 0x80, 0xe8,
-	0xed, 0x85, 0x3d, 0x55, 0x37, 0x5f, 0xe7, 0x8f, 0x8a, 0xe2,
-	0x5a, 0x32, 0x3e, 0x56, 0xee, 0x86, 0x83, 0xeb, 0x53, 0x3b,
-	0x59, 0x31, 0x89, 0xe1, 0xe4, 0x8c, 0x34, 0x5c, 0xf0, 0x98,
-	0x20, 0x48, 0x4d, 0x25, 0x9d, 0xf5, 0x97, 0xff, 0x47, 0x2f,
-	0x2a, 0x42, 0xfa, 0x92, 0xbf, 0xd7, 0x6f, 0x07, 0x02, 0x6a,
-	0xd2, 0xba, 0xd8, 0xb0, 0x08, 0x60, 0x65, 0x0d, 0xb5, 0xdd,
-	0x71, 0x19, 0xa1, 0xc9, 0xcc, 0xa4, 0x1c, 0x74, 0x16, 0x7e,
-	0xc6, 0xae, 0xab, 0xc3, 0x7b, 0x13, 0x21, 0x49, 0xf1, 0x99,
-	0x9c, 0xf4, 0x4c, 0x24, 0x46, 0x2e, 0x96, 0xfe, 0xfb, 0x93,
-	0x2b, 0x43, 0xef, 0x87, 0x3f, 0x57, 0x52, 0x3a, 0x82, 0xea,
-	0x88, 0xe0, 0x58, 0x30, 0x35, 0x5d, 0xe5, 0x8d, 0xa0, 0xc8,
-	0x70, 0x18, 0x1d, 0x75, 0xcd, 0xa5, 0xc7, 0xaf, 0x17, 0x7f,
-	0x7a, 0x12, 0xaa, 0xc2, 0x6e, 0x06, 0xbe, 0xd6, 0xd3, 0xbb,
-	0x03, 0x6b, 0x09, 0x61, 0xd9, 0xb1, 0xb4, 0xdc, 0x64, 0x0c,
-	0x00, 0x69, 0xd2, 0xbb, 0xb9, 0xd0, 0x6b, 0x02, 0x6f, 0x06,
-	0xbd, 0xd4, 0xd6, 0xbf, 0x04, 0x6d, 0xde, 0xb7, 0x0c, 0x65,
-	0x67, 0x0e, 0xb5, 0xdc, 0xb1, 0xd8, 0x63, 0x0a, 0x08, 0x61,
-	0xda, 0xb3, 0xa1, 0xc8, 0x73, 0x1a, 0x18, 0x71, 0xca, 0xa3,
-	0xce, 0xa7, 0x1c, 0x75, 0x77, 0x1e, 0xa5, 0xcc, 0x7f, 0x16,
-	0xad, 0xc4, 0xc6, 0xaf, 0x14, 0x7d, 0x10, 0x79, 0xc2, 0xab,
-	0xa9, 0xc0, 0x7b, 0x12, 0x5f, 0x36, 0x8d, 0xe4, 0xe6, 0x8f,
-	0x34, 0x5d, 0x30, 0x59, 0xe2, 0x8b, 0x89, 0xe0, 0x5b, 0x32,
-	0x81, 0xe8, 0x53, 0x3a, 0x38, 0x51, 0xea, 0x83, 0xee, 0x87,
-	0x3c, 0x55, 0x57, 0x3e, 0x85, 0xec, 0xfe, 0x97, 0x2c, 0x45,
-	0x47, 0x2e, 0x95, 0xfc, 0x91, 0xf8, 0x43, 0x2a, 0x28, 0x41,
-	0xfa, 0x93, 0x20, 0x49, 0xf2, 0x9b, 0x99, 0xf0, 0x4b, 0x22,
-	0x4f, 0x26, 0x9d, 0xf4, 0xf6, 0x9f, 0x24, 0x4d, 0xbe, 0xd7,
-	0x6c, 0x05, 0x07, 0x6e, 0xd5, 0xbc, 0xd1, 0xb8, 0x03, 0x6a,
-	0x68, 0x01, 0xba, 0xd3, 0x60, 0x09, 0xb2, 0xdb, 0xd9, 0xb0,
-	0x0b, 0x62, 0x0f, 0x66, 0xdd, 0xb4, 0xb6, 0xdf, 0x64, 0x0d,
-	0x1f, 0x76, 0xcd, 0xa4, 0xa6, 0xcf, 0x74, 0x1d, 0x70, 0x19,
-	0xa2, 0xcb, 0xc9, 0xa0, 0x1b, 0x72, 0xc1, 0xa8, 0x13, 0x7a,
-	0x78, 0x11, 0xaa, 0xc3, 0xae, 0xc7, 0x7c, 0x15, 0x17, 0x7e,
-	0xc5, 0xac, 0xe1, 0x88, 0x33, 0x5a, 0x58, 0x31, 0x8a, 0xe3,
-	0x8e, 0xe7, 0x5c, 0x35, 0x37, 0x5e, 0xe5, 0x8c, 0x3f, 0x56,
-	0xed, 0x84, 0x86, 0xef, 0x54, 0x3d, 0x50, 0x39, 0x82, 0xeb,
-	0xe9, 0x80, 0x3b, 0x52, 0x40, 0x29, 0x92, 0xfb, 0xf9, 0x90,
-	0x2b, 0x42, 0x2f, 0x46, 0xfd, 0x94, 0x96, 0xff, 0x44, 0x2d,
-	0x9e, 0xf7, 0x4c, 0x25, 0x27, 0x4e, 0xf5, 0x9c, 0xf1, 0x98,
-	0x23, 0x4a, 0x48, 0x21, 0x9a, 0xf3, 0x00, 0x6a, 0xd4, 0xbe,
-	0xb5, 0xdf, 0x61, 0x0b, 0x77, 0x1d, 0xa3, 0xc9, 0xc2, 0xa8,
-	0x16, 0x7c, 0xee, 0x84, 0x3a, 0x50, 0x5b, 0x31, 0x8f, 0xe5,
-	0x99, 0xf3, 0x4d, 0x27, 0x2c, 0x46, 0xf8, 0x92, 0xc1, 0xab,
-	0x15, 0x7f, 0x74, 0x1e, 0xa0, 0xca, 0xb6, 0xdc, 0x62, 0x08,
-	0x03, 0x69, 0xd7, 0xbd, 0x2f, 0x45, 0xfb, 0x91, 0x9a, 0xf0,
-	0x4e, 0x24, 0x58, 0x32, 0x8c, 0xe6, 0xed, 0x87, 0x39, 0x53,
-	0x9f, 0xf5, 0x4b, 0x21, 0x2a, 0x40, 0xfe, 0x94, 0xe8, 0x82,
-	0x3c, 0x56, 0x5d, 0x37, 0x89, 0xe3, 0x71, 0x1b, 0xa5, 0xcf,
-	0xc4, 0xae, 0x10, 0x7a, 0x06, 0x6c, 0xd2, 0xb8, 0xb3, 0xd9,
-	0x67, 0x0d, 0x5e, 0x34, 0x8a, 0xe0, 0xeb, 0x81, 0x3f, 0x55,
-	0x29, 0x43, 0xfd, 0x97, 0x9c, 0xf6, 0x48, 0x22, 0xb0, 0xda,
-	0x64, 0x0e, 0x05, 0x6f, 0xd1, 0xbb, 0xc7, 0xad, 0x13, 0x79,
-	0x72, 0x18, 0xa6, 0xcc, 0x23, 0x49, 0xf7, 0x9d, 0x96, 0xfc,
-	0x42, 0x28, 0x54, 0x3e, 0x80, 0xea, 0xe1, 0x8b, 0x35, 0x5f,
-	0xcd, 0xa7, 0x19, 0x73, 0x78, 0x12, 0xac, 0xc6, 0xba, 0xd0,
-	0x6e, 0x04, 0x0f, 0x65, 0xdb, 0xb1, 0xe2, 0x88, 0x36, 0x5c,
-	0x57, 0x3d, 0x83, 0xe9, 0x95, 0xff, 0x41, 0x2b, 0x20, 0x4a,
-	0xf4, 0x9e, 0x0c, 0x66, 0xd8, 0xb2, 0xb9, 0xd3, 0x6d, 0x07,
-	0x7b, 0x11, 0xaf, 0xc5, 0xce, 0xa4, 0x1a, 0x70, 0xbc, 0xd6,
-	0x68, 0x02, 0x09, 0x63, 0xdd, 0xb7, 0xcb, 0xa1, 0x1f, 0x75,
-	0x7e, 0x14, 0xaa, 0xc0, 0x52, 0x38, 0x86, 0xec, 0xe7, 0x8d,
-	0x33, 0x59, 0x25, 0x4f, 0xf1, 0x9b, 0x90, 0xfa, 0x44, 0x2e,
-	0x7d, 0x17, 0xa9, 0xc3, 0xc8, 0xa2, 0x1c, 0x76, 0x0a, 0x60,
-	0xde, 0xb4, 0xbf, 0xd5, 0x6b, 0x01, 0x93, 0xf9, 0x47, 0x2d,
-	0x26, 0x4c, 0xf2, 0x98, 0xe4, 0x8e, 0x30, 0x5a, 0x51, 0x3b,
-	0x85, 0xef, 0x00, 0x6b, 0xd6, 0xbd, 0xb1, 0xda, 0x67, 0x0c,
-	0x7f, 0x14, 0xa9, 0xc2, 0xce, 0xa5, 0x18, 0x73, 0xfe, 0x95,
-	0x28, 0x43, 0x4f, 0x24, 0x99, 0xf2, 0x81, 0xea, 0x57, 0x3c,
-	0x30, 0x5b, 0xe6, 0x8d, 0xe1, 0x8a, 0x37, 0x5c, 0x50, 0x3b,
-	0x86, 0xed, 0x9e, 0xf5, 0x48, 0x23, 0x2f, 0x44, 0xf9, 0x92,
-	0x1f, 0x74, 0xc9, 0xa2, 0xae, 0xc5, 0x78, 0x13, 0x60, 0x0b,
-	0xb6, 0xdd, 0xd1, 0xba, 0x07, 0x6c, 0xdf, 0xb4, 0x09, 0x62,
-	0x6e, 0x05, 0xb8, 0xd3, 0xa0, 0xcb, 0x76, 0x1d, 0x11, 0x7a,
-	0xc7, 0xac, 0x21, 0x4a, 0xf7, 0x9c, 0x90, 0xfb, 0x46, 0x2d,
-	0x5e, 0x35, 0x88, 0xe3, 0xef, 0x84, 0x39, 0x52, 0x3e, 0x55,
-	0xe8, 0x83, 0x8f, 0xe4, 0x59, 0x32, 0x41, 0x2a, 0x97, 0xfc,
-	0xf0, 0x9b, 0x26, 0x4d, 0xc0, 0xab, 0x16, 0x7d, 0x71, 0x1a,
-	0xa7, 0xcc, 0xbf, 0xd4, 0x69, 0x02, 0x0e, 0x65, 0xd8, 0xb3,
-	0xa3, 0xc8, 0x75, 0x1e, 0x12, 0x79, 0xc4, 0xaf, 0xdc, 0xb7,
-	0x0a, 0x61, 0x6d, 0x06, 0xbb, 0xd0, 0x5d, 0x36, 0x8b, 0xe0,
-	0xec, 0x87, 0x3a, 0x51, 0x22, 0x49, 0xf4, 0x9f, 0x93, 0xf8,
-	0x45, 0x2e, 0x42, 0x29, 0x94, 0xff, 0xf3, 0x98, 0x25, 0x4e,
-	0x3d, 0x56, 0xeb, 0x80, 0x8c, 0xe7, 0x5a, 0x31, 0xbc, 0xd7,
-	0x6a, 0x01, 0x0d, 0x66, 0xdb, 0xb0, 0xc3, 0xa8, 0x15, 0x7e,
-	0x72, 0x19, 0xa4, 0xcf, 0x7c, 0x17, 0xaa, 0xc1, 0xcd, 0xa6,
-	0x1b, 0x70, 0x03, 0x68, 0xd5, 0xbe, 0xb2, 0xd9, 0x64, 0x0f,
-	0x82, 0xe9, 0x54, 0x3f, 0x33, 0x58, 0xe5, 0x8e, 0xfd, 0x96,
-	0x2b, 0x40, 0x4c, 0x27, 0x9a, 0xf1, 0x9d, 0xf6, 0x4b, 0x20,
-	0x2c, 0x47, 0xfa, 0x91, 0xe2, 0x89, 0x34, 0x5f, 0x53, 0x38,
-	0x85, 0xee, 0x63, 0x08, 0xb5, 0xde, 0xd2, 0xb9, 0x04, 0x6f,
-	0x1c, 0x77, 0xca, 0xa1, 0xad, 0xc6, 0x7b, 0x10, 0x00, 0x6c,
-	0xd8, 0xb4, 0xad, 0xc1, 0x75, 0x19, 0x47, 0x2b, 0x9f, 0xf3,
-	0xea, 0x86, 0x32, 0x5e, 0x8e, 0xe2, 0x56, 0x3a, 0x23, 0x4f,
-	0xfb, 0x97, 0xc9, 0xa5, 0x11, 0x7d, 0x64, 0x08, 0xbc, 0xd0,
-	0x01, 0x6d, 0xd9, 0xb5, 0xac, 0xc0, 0x74, 0x18, 0x46, 0x2a,
-	0x9e, 0xf2, 0xeb, 0x87, 0x33, 0x5f, 0x8f, 0xe3, 0x57, 0x3b,
-	0x22, 0x4e, 0xfa, 0x96, 0xc8, 0xa4, 0x10, 0x7c, 0x65, 0x09,
-	0xbd, 0xd1, 0x02, 0x6e, 0xda, 0xb6, 0xaf, 0xc3, 0x77, 0x1b,
-	0x45, 0x29, 0x9d, 0xf1, 0xe8, 0x84, 0x30, 0x5c, 0x8c, 0xe0,
-	0x54, 0x38, 0x21, 0x4d, 0xf9, 0x95, 0xcb, 0xa7, 0x13, 0x7f,
-	0x66, 0x0a, 0xbe, 0xd2, 0x03, 0x6f, 0xdb, 0xb7, 0xae, 0xc2,
-	0x76, 0x1a, 0x44, 0x28, 0x9c, 0xf0, 0xe9, 0x85, 0x31, 0x5d,
-	0x8d, 0xe1, 0x55, 0x39, 0x20, 0x4c, 0xf8, 0x94, 0xca, 0xa6,
-	0x12, 0x7e, 0x67, 0x0b, 0xbf, 0xd3, 0x04, 0x68, 0xdc, 0xb0,
-	0xa9, 0xc5, 0x71, 0x1d, 0x43, 0x2f, 0x9b, 0xf7, 0xee, 0x82,
-	0x36, 0x5a, 0x8a, 0xe6, 0x52, 0x3e, 0x27, 0x4b, 0xff, 0x93,
-	0xcd, 0xa1, 0x15, 0x79, 0x60, 0x0c, 0xb8, 0xd4, 0x05, 0x69,
-	0xdd, 0xb1, 0xa8, 0xc4, 0x70, 0x1c, 0x42, 0x2e, 0x9a, 0xf6,
-	0xef, 0x83, 0x37, 0x5b, 0x8b, 0xe7, 0x53, 0x3f, 0x26, 0x4a,
-	0xfe, 0x92, 0xcc, 0xa0, 0x14, 0x78, 0x61, 0x0d, 0xb9, 0xd5,
-	0x06, 0x6a, 0xde, 0xb2, 0xab, 0xc7, 0x73, 0x1f, 0x41, 0x2d,
-	0x99, 0xf5, 0xec, 0x80, 0x34, 0x58, 0x88, 0xe4, 0x50, 0x3c,
-	0x25, 0x49, 0xfd, 0x91, 0xcf, 0xa3, 0x17, 0x7b, 0x62, 0x0e,
-	0xba, 0xd6, 0x07, 0x6b, 0xdf, 0xb3, 0xaa, 0xc6, 0x72, 0x1e,
-	0x40, 0x2c, 0x98, 0xf4, 0xed, 0x81, 0x35, 0x59, 0x89, 0xe5,
-	0x51, 0x3d, 0x24, 0x48, 0xfc, 0x90, 0xce, 0xa2, 0x16, 0x7a,
-	0x63, 0x0f, 0xbb, 0xd7, 0x00, 0x6d, 0xda, 0xb7, 0xa9, 0xc4,
-	0x73, 0x1e, 0x4f, 0x22, 0x95, 0xf8, 0xe6, 0x8b, 0x3c, 0x51,
-	0x9e, 0xf3, 0x44, 0x29, 0x37, 0x5a, 0xed, 0x80, 0xd1, 0xbc,
-	0x0b, 0x66, 0x78, 0x15, 0xa2, 0xcf, 0x21, 0x4c, 0xfb, 0x96,
-	0x88, 0xe5, 0x52, 0x3f, 0x6e, 0x03, 0xb4, 0xd9, 0xc7, 0xaa,
-	0x1d, 0x70, 0xbf, 0xd2, 0x65, 0x08, 0x16, 0x7b, 0xcc, 0xa1,
-	0xf0, 0x9d, 0x2a, 0x47, 0x59, 0x34, 0x83, 0xee, 0x42, 0x2f,
-	0x98, 0xf5, 0xeb, 0x86, 0x31, 0x5c, 0x0d, 0x60, 0xd7, 0xba,
-	0xa4, 0xc9, 0x7e, 0x13, 0xdc, 0xb1, 0x06, 0x6b, 0x75, 0x18,
-	0xaf, 0xc2, 0x93, 0xfe, 0x49, 0x24, 0x3a, 0x57, 0xe0, 0x8d,
-	0x63, 0x0e, 0xb9, 0xd4, 0xca, 0xa7, 0x10, 0x7d, 0x2c, 0x41,
-	0xf6, 0x9b, 0x85, 0xe8, 0x5f, 0x32, 0xfd, 0x90, 0x27, 0x4a,
-	0x54, 0x39, 0x8e, 0xe3, 0xb2, 0xdf, 0x68, 0x05, 0x1b, 0x76,
-	0xc1, 0xac, 0x84, 0xe9, 0x5e, 0x33, 0x2d, 0x40, 0xf7, 0x9a,
-	0xcb, 0xa6, 0x11, 0x7c, 0x62, 0x0f, 0xb8, 0xd5, 0x1a, 0x77,
-	0xc0, 0xad, 0xb3, 0xde, 0x69, 0x04, 0x55, 0x38, 0x8f, 0xe2,
-	0xfc, 0x91, 0x26, 0x4b, 0xa5, 0xc8, 0x7f, 0x12, 0x0c, 0x61,
-	0xd6, 0xbb, 0xea, 0x87, 0x30, 0x5d, 0x43, 0x2e, 0x99, 0xf4,
-	0x3b, 0x56, 0xe1, 0x8c, 0x92, 0xff, 0x48, 0x25, 0x74, 0x19,
-	0xae, 0xc3, 0xdd, 0xb0, 0x07, 0x6a, 0xc6, 0xab, 0x1c, 0x71,
-	0x6f, 0x02, 0xb5, 0xd8, 0x89, 0xe4, 0x53, 0x3e, 0x20, 0x4d,
-	0xfa, 0x97, 0x58, 0x35, 0x82, 0xef, 0xf1, 0x9c, 0x2b, 0x46,
-	0x17, 0x7a, 0xcd, 0xa0, 0xbe, 0xd3, 0x64, 0x09, 0xe7, 0x8a,
-	0x3d, 0x50, 0x4e, 0x23, 0x94, 0xf9, 0xa8, 0xc5, 0x72, 0x1f,
-	0x01, 0x6c, 0xdb, 0xb6, 0x79, 0x14, 0xa3, 0xce, 0xd0, 0xbd,
-	0x0a, 0x67, 0x36, 0x5b, 0xec, 0x81, 0x9f, 0xf2, 0x45, 0x28,
-	0x00, 0x6e, 0xdc, 0xb2, 0xa5, 0xcb, 0x79, 0x17, 0x57, 0x39,
-	0x8b, 0xe5, 0xf2, 0x9c, 0x2e, 0x40, 0xae, 0xc0, 0x72, 0x1c,
-	0x0b, 0x65, 0xd7, 0xb9, 0xf9, 0x97, 0x25, 0x4b, 0x5c, 0x32,
-	0x80, 0xee, 0x41, 0x2f, 0x9d, 0xf3, 0xe4, 0x8a, 0x38, 0x56,
-	0x16, 0x78, 0xca, 0xa4, 0xb3, 0xdd, 0x6f, 0x01, 0xef, 0x81,
-	0x33, 0x5d, 0x4a, 0x24, 0x96, 0xf8, 0xb8, 0xd6, 0x64, 0x0a,
-	0x1d, 0x73, 0xc1, 0xaf, 0x82, 0xec, 0x5e, 0x30, 0x27, 0x49,
-	0xfb, 0x95, 0xd5, 0xbb, 0x09, 0x67, 0x70, 0x1e, 0xac, 0xc2,
-	0x2c, 0x42, 0xf0, 0x9e, 0x89, 0xe7, 0x55, 0x3b, 0x7b, 0x15,
-	0xa7, 0xc9, 0xde, 0xb0, 0x02, 0x6c, 0xc3, 0xad, 0x1f, 0x71,
-	0x66, 0x08, 0xba, 0xd4, 0x94, 0xfa, 0x48, 0x26, 0x31, 0x5f,
-	0xed, 0x83, 0x6d, 0x03, 0xb1, 0xdf, 0xc8, 0xa6, 0x14, 0x7a,
-	0x3a, 0x54, 0xe6, 0x88, 0x9f, 0xf1, 0x43, 0x2d, 0x19, 0x77,
-	0xc5, 0xab, 0xbc, 0xd2, 0x60, 0x0e, 0x4e, 0x20, 0x92, 0xfc,
-	0xeb, 0x85, 0x37, 0x59, 0xb7, 0xd9, 0x6b, 0x05, 0x12, 0x7c,
-	0xce, 0xa0, 0xe0, 0x8e, 0x3c, 0x52, 0x45, 0x2b, 0x99, 0xf7,
-	0x58, 0x36, 0x84, 0xea, 0xfd, 0x93, 0x21, 0x4f, 0x0f, 0x61,
-	0xd3, 0xbd, 0xaa, 0xc4, 0x76, 0x18, 0xf6, 0x98, 0x2a, 0x44,
-	0x53, 0x3d, 0x8f, 0xe1, 0xa1, 0xcf, 0x7d, 0x13, 0x04, 0x6a,
-	0xd8, 0xb6, 0x9b, 0xf5, 0x47, 0x29, 0x3e, 0x50, 0xe2, 0x8c,
-	0xcc, 0xa2, 0x10, 0x7e, 0x69, 0x07, 0xb5, 0xdb, 0x35, 0x5b,
-	0xe9, 0x87, 0x90, 0xfe, 0x4c, 0x22, 0x62, 0x0c, 0xbe, 0xd0,
-	0xc7, 0xa9, 0x1b, 0x75, 0xda, 0xb4, 0x06, 0x68, 0x7f, 0x11,
-	0xa3, 0xcd, 0x8d, 0xe3, 0x51, 0x3f, 0x28, 0x46, 0xf4, 0x9a,
-	0x74, 0x1a, 0xa8, 0xc6, 0xd1, 0xbf, 0x0d, 0x63, 0x23, 0x4d,
-	0xff, 0x91, 0x86, 0xe8, 0x5a, 0x34, 0x00, 0x6f, 0xde, 0xb1,
-	0xa1, 0xce, 0x7f, 0x10, 0x5f, 0x30, 0x81, 0xee, 0xfe, 0x91,
-	0x20, 0x4f, 0xbe, 0xd1, 0x60, 0x0f, 0x1f, 0x70, 0xc1, 0xae,
-	0xe1, 0x8e, 0x3f, 0x50, 0x40, 0x2f, 0x9e, 0xf1, 0x61, 0x0e,
-	0xbf, 0xd0, 0xc0, 0xaf, 0x1e, 0x71, 0x3e, 0x51, 0xe0, 0x8f,
-	0x9f, 0xf0, 0x41, 0x2e, 0xdf, 0xb0, 0x01, 0x6e, 0x7e, 0x11,
-	0xa0, 0xcf, 0x80, 0xef, 0x5e, 0x31, 0x21, 0x4e, 0xff, 0x90,
-	0xc2, 0xad, 0x1c, 0x73, 0x63, 0x0c, 0xbd, 0xd2, 0x9d, 0xf2,
-	0x43, 0x2c, 0x3c, 0x53, 0xe2, 0x8d, 0x7c, 0x13, 0xa2, 0xcd,
-	0xdd, 0xb2, 0x03, 0x6c, 0x23, 0x4c, 0xfd, 0x92, 0x82, 0xed,
-	0x5c, 0x33, 0xa3, 0xcc, 0x7d, 0x12, 0x02, 0x6d, 0xdc, 0xb3,
-	0xfc, 0x93, 0x22, 0x4d, 0x5d, 0x32, 0x83, 0xec, 0x1d, 0x72,
-	0xc3, 0xac, 0xbc, 0xd3, 0x62, 0x0d, 0x42, 0x2d, 0x9c, 0xf3,
-	0xe3, 0x8c, 0x3d, 0x52, 0x99, 0xf6, 0x47, 0x28, 0x38, 0x57,
-	0xe6, 0x89, 0xc6, 0xa9, 0x18, 0x77, 0x67, 0x08, 0xb9, 0xd6,
-	0x27, 0x48, 0xf9, 0x96, 0x86, 0xe9, 0x58, 0x37, 0x78, 0x17,
-	0xa6, 0xc9, 0xd9, 0xb6, 0x07, 0x68, 0xf8, 0x97, 0x26, 0x49,
-	0x59, 0x36, 0x87, 0xe8, 0xa7, 0xc8, 0x79, 0x16, 0x06, 0x69,
-	0xd8, 0xb7, 0x46, 0x29, 0x98, 0xf7, 0xe7, 0x88, 0x39, 0x56,
-	0x19, 0x76, 0xc7, 0xa8, 0xb8, 0xd7, 0x66, 0x09, 0x5b, 0x34,
-	0x85, 0xea, 0xfa, 0x95, 0x24, 0x4b, 0x04, 0x6b, 0xda, 0xb5,
-	0xa5, 0xca, 0x7b, 0x14, 0xe5, 0x8a, 0x3b, 0x54, 0x44, 0x2b,
-	0x9a, 0xf5, 0xba, 0xd5, 0x64, 0x0b, 0x1b, 0x74, 0xc5, 0xaa,
-	0x3a, 0x55, 0xe4, 0x8b, 0x9b, 0xf4, 0x45, 0x2a, 0x65, 0x0a,
-	0xbb, 0xd4, 0xc4, 0xab, 0x1a, 0x75, 0x84, 0xeb, 0x5a, 0x35,
-	0x25, 0x4a, 0xfb, 0x94, 0xdb, 0xb4, 0x05, 0x6a, 0x7a, 0x15,
-	0xa4, 0xcb, 0x00, 0x70, 0xe0, 0x90, 0xdd, 0xad, 0x3d, 0x4d,
-	0xa7, 0xd7, 0x47, 0x37, 0x7a, 0x0a, 0x9a, 0xea, 0x53, 0x23,
-	0xb3, 0xc3, 0x8e, 0xfe, 0x6e, 0x1e, 0xf4, 0x84, 0x14, 0x64,
-	0x29, 0x59, 0xc9, 0xb9, 0xa6, 0xd6, 0x46, 0x36, 0x7b, 0x0b,
-	0x9b, 0xeb, 0x01, 0x71, 0xe1, 0x91, 0xdc, 0xac, 0x3c, 0x4c,
-	0xf5, 0x85, 0x15, 0x65, 0x28, 0x58, 0xc8, 0xb8, 0x52, 0x22,
-	0xb2, 0xc2, 0x8f, 0xff, 0x6f, 0x1f, 0x51, 0x21, 0xb1, 0xc1,
-	0x8c, 0xfc, 0x6c, 0x1c, 0xf6, 0x86, 0x16, 0x66, 0x2b, 0x5b,
-	0xcb, 0xbb, 0x02, 0x72, 0xe2, 0x92, 0xdf, 0xaf, 0x3f, 0x4f,
-	0xa5, 0xd5, 0x45, 0x35, 0x78, 0x08, 0x98, 0xe8, 0xf7, 0x87,
-	0x17, 0x67, 0x2a, 0x5a, 0xca, 0xba, 0x50, 0x20, 0xb0, 0xc0,
-	0x8d, 0xfd, 0x6d, 0x1d, 0xa4, 0xd4, 0x44, 0x34, 0x79, 0x09,
-	0x99, 0xe9, 0x03, 0x73, 0xe3, 0x93, 0xde, 0xae, 0x3e, 0x4e,
-	0xa2, 0xd2, 0x42, 0x32, 0x7f, 0x0f, 0x9f, 0xef, 0x05, 0x75,
-	0xe5, 0x95, 0xd8, 0xa8, 0x38, 0x48, 0xf1, 0x81, 0x11, 0x61,
-	0x2c, 0x5c, 0xcc, 0xbc, 0x56, 0x26, 0xb6, 0xc6, 0x8b, 0xfb,
-	0x6b, 0x1b, 0x04, 0x74, 0xe4, 0x94, 0xd9, 0xa9, 0x39, 0x49,
-	0xa3, 0xd3, 0x43, 0x33, 0x7e, 0x0e, 0x9e, 0xee, 0x57, 0x27,
-	0xb7, 0xc7, 0x8a, 0xfa, 0x6a, 0x1a, 0xf0, 0x80, 0x10, 0x60,
-	0x2d, 0x5d, 0xcd, 0xbd, 0xf3, 0x83, 0x13, 0x63, 0x2e, 0x5e,
-	0xce, 0xbe, 0x54, 0x24, 0xb4, 0xc4, 0x89, 0xf9, 0x69, 0x19,
-	0xa0, 0xd0, 0x40, 0x30, 0x7d, 0x0d, 0x9d, 0xed, 0x07, 0x77,
-	0xe7, 0x97, 0xda, 0xaa, 0x3a, 0x4a, 0x55, 0x25, 0xb5, 0xc5,
-	0x88, 0xf8, 0x68, 0x18, 0xf2, 0x82, 0x12, 0x62, 0x2f, 0x5f,
-	0xcf, 0xbf, 0x06, 0x76, 0xe6, 0x96, 0xdb, 0xab, 0x3b, 0x4b,
-	0xa1, 0xd1, 0x41, 0x31, 0x7c, 0x0c, 0x9c, 0xec, 0x00, 0x71,
-	0xe2, 0x93, 0xd9, 0xa8, 0x3b, 0x4a, 0xaf, 0xde, 0x4d, 0x3c,
-	0x76, 0x07, 0x94, 0xe5, 0x43, 0x32, 0xa1, 0xd0, 0x9a, 0xeb,
-	0x78, 0x09, 0xec, 0x9d, 0x0e, 0x7f, 0x35, 0x44, 0xd7, 0xa6,
-	0x86, 0xf7, 0x64, 0x15, 0x5f, 0x2e, 0xbd, 0xcc, 0x29, 0x58,
-	0xcb, 0xba, 0xf0, 0x81, 0x12, 0x63, 0xc5, 0xb4, 0x27, 0x56,
-	0x1c, 0x6d, 0xfe, 0x8f, 0x6a, 0x1b, 0x88, 0xf9, 0xb3, 0xc2,
-	0x51, 0x20, 0x11, 0x60, 0xf3, 0x82, 0xc8, 0xb9, 0x2a, 0x5b,
-	0xbe, 0xcf, 0x5c, 0x2d, 0x67, 0x16, 0x85, 0xf4, 0x52, 0x23,
-	0xb0, 0xc1, 0x8b, 0xfa, 0x69, 0x18, 0xfd, 0x8c, 0x1f, 0x6e,
-	0x24, 0x55, 0xc6, 0xb7, 0x97, 0xe6, 0x75, 0x04, 0x4e, 0x3f,
-	0xac, 0xdd, 0x38, 0x49, 0xda, 0xab, 0xe1, 0x90, 0x03, 0x72,
-	0xd4, 0xa5, 0x36, 0x47, 0x0d, 0x7c, 0xef, 0x9e, 0x7b, 0x0a,
-	0x99, 0xe8, 0xa2, 0xd3, 0x40, 0x31, 0x22, 0x53, 0xc0, 0xb1,
-	0xfb, 0x8a, 0x19, 0x68, 0x8d, 0xfc, 0x6f, 0x1e, 0x54, 0x25,
-	0xb6, 0xc7, 0x61, 0x10, 0x83, 0xf2, 0xb8, 0xc9, 0x5a, 0x2b,
-	0xce, 0xbf, 0x2c, 0x5d, 0x17, 0x66, 0xf5, 0x84, 0xa4, 0xd5,
-	0x46, 0x37, 0x7d, 0x0c, 0x9f, 0xee, 0x0b, 0x7a, 0xe9, 0x98,
-	0xd2, 0xa3, 0x30, 0x41, 0xe7, 0x96, 0x05, 0x74, 0x3e, 0x4f,
-	0xdc, 0xad, 0x48, 0x39, 0xaa, 0xdb, 0x91, 0xe0, 0x73, 0x02,
-	0x33, 0x42, 0xd1, 0xa0, 0xea, 0x9b, 0x08, 0x79, 0x9c, 0xed,
-	0x7e, 0x0f, 0x45, 0x34, 0xa7, 0xd6, 0x70, 0x01, 0x92, 0xe3,
-	0xa9, 0xd8, 0x4b, 0x3a, 0xdf, 0xae, 0x3d, 0x4c, 0x06, 0x77,
-	0xe4, 0x95, 0xb5, 0xc4, 0x57, 0x26, 0x6c, 0x1d, 0x8e, 0xff,
-	0x1a, 0x6b, 0xf8, 0x89, 0xc3, 0xb2, 0x21, 0x50, 0xf6, 0x87,
-	0x14, 0x65, 0x2f, 0x5e, 0xcd, 0xbc, 0x59, 0x28, 0xbb, 0xca,
-	0x80, 0xf1, 0x62, 0x13, 0x00, 0x72, 0xe4, 0x96, 0xd5, 0xa7,
-	0x31, 0x43, 0xb7, 0xc5, 0x53, 0x21, 0x62, 0x10, 0x86, 0xf4,
-	0x73, 0x01, 0x97, 0xe5, 0xa6, 0xd4, 0x42, 0x30, 0xc4, 0xb6,
-	0x20, 0x52, 0x11, 0x63, 0xf5, 0x87, 0xe6, 0x94, 0x02, 0x70,
-	0x33, 0x41, 0xd7, 0xa5, 0x51, 0x23, 0xb5, 0xc7, 0x84, 0xf6,
-	0x60, 0x12, 0x95, 0xe7, 0x71, 0x03, 0x40, 0x32, 0xa4, 0xd6,
-	0x22, 0x50, 0xc6, 0xb4, 0xf7, 0x85, 0x13, 0x61, 0xd1, 0xa3,
-	0x35, 0x47, 0x04, 0x76, 0xe0, 0x92, 0x66, 0x14, 0x82, 0xf0,
-	0xb3, 0xc1, 0x57, 0x25, 0xa2, 0xd0, 0x46, 0x34, 0x77, 0x05,
-	0x93, 0xe1, 0x15, 0x67, 0xf1, 0x83, 0xc0, 0xb2, 0x24, 0x56,
-	0x37, 0x45, 0xd3, 0xa1, 0xe2, 0x90, 0x06, 0x74, 0x80, 0xf2,
-	0x64, 0x16, 0x55, 0x27, 0xb1, 0xc3, 0x44, 0x36, 0xa0, 0xd2,
-	0x91, 0xe3, 0x75, 0x07, 0xf3, 0x81, 0x17, 0x65, 0x26, 0x54,
-	0xc2, 0xb0, 0xbf, 0xcd, 0x5b, 0x29, 0x6a, 0x18, 0x8e, 0xfc,
-	0x08, 0x7a, 0xec, 0x9e, 0xdd, 0xaf, 0x39, 0x4b, 0xcc, 0xbe,
-	0x28, 0x5a, 0x19, 0x6b, 0xfd, 0x8f, 0x7b, 0x09, 0x9f, 0xed,
-	0xae, 0xdc, 0x4a, 0x38, 0x59, 0x2b, 0xbd, 0xcf, 0x8c, 0xfe,
-	0x68, 0x1a, 0xee, 0x9c, 0x0a, 0x78, 0x3b, 0x49, 0xdf, 0xad,
-	0x2a, 0x58, 0xce, 0xbc, 0xff, 0x8d, 0x1b, 0x69, 0x9d, 0xef,
-	0x79, 0x0b, 0x48, 0x3a, 0xac, 0xde, 0x6e, 0x1c, 0x8a, 0xf8,
-	0xbb, 0xc9, 0x5f, 0x2d, 0xd9, 0xab, 0x3d, 0x4f, 0x0c, 0x7e,
-	0xe8, 0x9a, 0x1d, 0x6f, 0xf9, 0x8b, 0xc8, 0xba, 0x2c, 0x5e,
-	0xaa, 0xd8, 0x4e, 0x3c, 0x7f, 0x0d, 0x9b, 0xe9, 0x88, 0xfa,
-	0x6c, 0x1e, 0x5d, 0x2f, 0xb9, 0xcb, 0x3f, 0x4d, 0xdb, 0xa9,
-	0xea, 0x98, 0x0e, 0x7c, 0xfb, 0x89, 0x1f, 0x6d, 0x2e, 0x5c,
-	0xca, 0xb8, 0x4c, 0x3e, 0xa8, 0xda, 0x99, 0xeb, 0x7d, 0x0f,
-	0x00, 0x73, 0xe6, 0x95, 0xd1, 0xa2, 0x37, 0x44, 0xbf, 0xcc,
-	0x59, 0x2a, 0x6e, 0x1d, 0x88, 0xfb, 0x63, 0x10, 0x85, 0xf6,
-	0xb2, 0xc1, 0x54, 0x27, 0xdc, 0xaf, 0x3a, 0x49, 0x0d, 0x7e,
-	0xeb, 0x98, 0xc6, 0xb5, 0x20, 0x53, 0x17, 0x64, 0xf1, 0x82,
-	0x79, 0x0a, 0x9f, 0xec, 0xa8, 0xdb, 0x4e, 0x3d, 0xa5, 0xd6,
-	0x43, 0x30, 0x74, 0x07, 0x92, 0xe1, 0x1a, 0x69, 0xfc, 0x8f,
-	0xcb, 0xb8, 0x2d, 0x5e, 0x91, 0xe2, 0x77, 0x04, 0x40, 0x33,
-	0xa6, 0xd5, 0x2e, 0x5d, 0xc8, 0xbb, 0xff, 0x8c, 0x19, 0x6a,
-	0xf2, 0x81, 0x14, 0x67, 0x23, 0x50, 0xc5, 0xb6, 0x4d, 0x3e,
-	0xab, 0xd8, 0x9c, 0xef, 0x7a, 0x09, 0x57, 0x24, 0xb1, 0xc2,
-	0x86, 0xf5, 0x60, 0x13, 0xe8, 0x9b, 0x0e, 0x7d, 0x39, 0x4a,
-	0xdf, 0xac, 0x34, 0x47, 0xd2, 0xa1, 0xe5, 0x96, 0x03, 0x70,
-	0x8b, 0xf8, 0x6d, 0x1e, 0x5a, 0x29, 0xbc, 0xcf, 0x3f, 0x4c,
-	0xd9, 0xaa, 0xee, 0x9d, 0x08, 0x7b, 0x80, 0xf3, 0x66, 0x15,
-	0x51, 0x22, 0xb7, 0xc4, 0x5c, 0x2f, 0xba, 0xc9, 0x8d, 0xfe,
-	0x6b, 0x18, 0xe3, 0x90, 0x05, 0x76, 0x32, 0x41, 0xd4, 0xa7,
-	0xf9, 0x8a, 0x1f, 0x6c, 0x28, 0x5b, 0xce, 0xbd, 0x46, 0x35,
-	0xa0, 0xd3, 0x97, 0xe4, 0x71, 0x02, 0x9a, 0xe9, 0x7c, 0x0f,
-	0x4b, 0x38, 0xad, 0xde, 0x25, 0x56, 0xc3, 0xb0, 0xf4, 0x87,
-	0x12, 0x61, 0xae, 0xdd, 0x48, 0x3b, 0x7f, 0x0c, 0x99, 0xea,
-	0x11, 0x62, 0xf7, 0x84, 0xc0, 0xb3, 0x26, 0x55, 0xcd, 0xbe,
-	0x2b, 0x58, 0x1c, 0x6f, 0xfa, 0x89, 0x72, 0x01, 0x94, 0xe7,
-	0xa3, 0xd0, 0x45, 0x36, 0x68, 0x1b, 0x8e, 0xfd, 0xb9, 0xca,
-	0x5f, 0x2c, 0xd7, 0xa4, 0x31, 0x42, 0x06, 0x75, 0xe0, 0x93,
-	0x0b, 0x78, 0xed, 0x9e, 0xda, 0xa9, 0x3c, 0x4f, 0xb4, 0xc7,
-	0x52, 0x21, 0x65, 0x16, 0x83, 0xf0, 0x00, 0x74, 0xe8, 0x9c,
-	0xcd, 0xb9, 0x25, 0x51, 0x87, 0xf3, 0x6f, 0x1b, 0x4a, 0x3e,
-	0xa2, 0xd6, 0x13, 0x67, 0xfb, 0x8f, 0xde, 0xaa, 0x36, 0x42,
-	0x94, 0xe0, 0x7c, 0x08, 0x59, 0x2d, 0xb1, 0xc5, 0x26, 0x52,
-	0xce, 0xba, 0xeb, 0x9f, 0x03, 0x77, 0xa1, 0xd5, 0x49, 0x3d,
-	0x6c, 0x18, 0x84, 0xf0, 0x35, 0x41, 0xdd, 0xa9, 0xf8, 0x8c,
-	0x10, 0x64, 0xb2, 0xc6, 0x5a, 0x2e, 0x7f, 0x0b, 0x97, 0xe3,
-	0x4c, 0x38, 0xa4, 0xd0, 0x81, 0xf5, 0x69, 0x1d, 0xcb, 0xbf,
-	0x23, 0x57, 0x06, 0x72, 0xee, 0x9a, 0x5f, 0x2b, 0xb7, 0xc3,
-	0x92, 0xe6, 0x7a, 0x0e, 0xd8, 0xac, 0x30, 0x44, 0x15, 0x61,
-	0xfd, 0x89, 0x6a, 0x1e, 0x82, 0xf6, 0xa7, 0xd3, 0x4f, 0x3b,
-	0xed, 0x99, 0x05, 0x71, 0x20, 0x54, 0xc8, 0xbc, 0x79, 0x0d,
-	0x91, 0xe5, 0xb4, 0xc0, 0x5c, 0x28, 0xfe, 0x8a, 0x16, 0x62,
-	0x33, 0x47, 0xdb, 0xaf, 0x98, 0xec, 0x70, 0x04, 0x55, 0x21,
-	0xbd, 0xc9, 0x1f, 0x6b, 0xf7, 0x83, 0xd2, 0xa6, 0x3a, 0x4e,
-	0x8b, 0xff, 0x63, 0x17, 0x46, 0x32, 0xae, 0xda, 0x0c, 0x78,
-	0xe4, 0x90, 0xc1, 0xb5, 0x29, 0x5d, 0xbe, 0xca, 0x56, 0x22,
-	0x73, 0x07, 0x9b, 0xef, 0x39, 0x4d, 0xd1, 0xa5, 0xf4, 0x80,
-	0x1c, 0x68, 0xad, 0xd9, 0x45, 0x31, 0x60, 0x14, 0x88, 0xfc,
-	0x2a, 0x5e, 0xc2, 0xb6, 0xe7, 0x93, 0x0f, 0x7b, 0xd4, 0xa0,
-	0x3c, 0x48, 0x19, 0x6d, 0xf1, 0x85, 0x53, 0x27, 0xbb, 0xcf,
-	0x9e, 0xea, 0x76, 0x02, 0xc7, 0xb3, 0x2f, 0x5b, 0x0a, 0x7e,
-	0xe2, 0x96, 0x40, 0x34, 0xa8, 0xdc, 0x8d, 0xf9, 0x65, 0x11,
-	0xf2, 0x86, 0x1a, 0x6e, 0x3f, 0x4b, 0xd7, 0xa3, 0x75, 0x01,
-	0x9d, 0xe9, 0xb8, 0xcc, 0x50, 0x24, 0xe1, 0x95, 0x09, 0x7d,
-	0x2c, 0x58, 0xc4, 0xb0, 0x66, 0x12, 0x8e, 0xfa, 0xab, 0xdf,
-	0x43, 0x37, 0x00, 0x75, 0xea, 0x9f, 0xc9, 0xbc, 0x23, 0x56,
-	0x8f, 0xfa, 0x65, 0x10, 0x46, 0x33, 0xac, 0xd9, 0x03, 0x76,
-	0xe9, 0x9c, 0xca, 0xbf, 0x20, 0x55, 0x8c, 0xf9, 0x66, 0x13,
-	0x45, 0x30, 0xaf, 0xda, 0x06, 0x73, 0xec, 0x99, 0xcf, 0xba,
-	0x25, 0x50, 0x89, 0xfc, 0x63, 0x16, 0x40, 0x35, 0xaa, 0xdf,
-	0x05, 0x70, 0xef, 0x9a, 0xcc, 0xb9, 0x26, 0x53, 0x8a, 0xff,
-	0x60, 0x15, 0x43, 0x36, 0xa9, 0xdc, 0x0c, 0x79, 0xe6, 0x93,
-	0xc5, 0xb0, 0x2f, 0x5a, 0x83, 0xf6, 0x69, 0x1c, 0x4a, 0x3f,
-	0xa0, 0xd5, 0x0f, 0x7a, 0xe5, 0x90, 0xc6, 0xb3, 0x2c, 0x59,
-	0x80, 0xf5, 0x6a, 0x1f, 0x49, 0x3c, 0xa3, 0xd6, 0x0a, 0x7f,
-	0xe0, 0x95, 0xc3, 0xb6, 0x29, 0x5c, 0x85, 0xf0, 0x6f, 0x1a,
-	0x4c, 0x39, 0xa6, 0xd3, 0x09, 0x7c, 0xe3, 0x96, 0xc0, 0xb5,
-	0x2a, 0x5f, 0x86, 0xf3, 0x6c, 0x19, 0x4f, 0x3a, 0xa5, 0xd0,
-	0x18, 0x6d, 0xf2, 0x87, 0xd1, 0xa4, 0x3b, 0x4e, 0x97, 0xe2,
-	0x7d, 0x08, 0x5e, 0x2b, 0xb4, 0xc1, 0x1b, 0x6e, 0xf1, 0x84,
-	0xd2, 0xa7, 0x38, 0x4d, 0x94, 0xe1, 0x7e, 0x0b, 0x5d, 0x28,
-	0xb7, 0xc2, 0x1e, 0x6b, 0xf4, 0x81, 0xd7, 0xa2, 0x3d, 0x48,
-	0x91, 0xe4, 0x7b, 0x0e, 0x58, 0x2d, 0xb2, 0xc7, 0x1d, 0x68,
-	0xf7, 0x82, 0xd4, 0xa1, 0x3e, 0x4b, 0x92, 0xe7, 0x78, 0x0d,
-	0x5b, 0x2e, 0xb1, 0xc4, 0x14, 0x61, 0xfe, 0x8b, 0xdd, 0xa8,
-	0x37, 0x42, 0x9b, 0xee, 0x71, 0x04, 0x52, 0x27, 0xb8, 0xcd,
-	0x17, 0x62, 0xfd, 0x88, 0xde, 0xab, 0x34, 0x41, 0x98, 0xed,
-	0x72, 0x07, 0x51, 0x24, 0xbb, 0xce, 0x12, 0x67, 0xf8, 0x8d,
-	0xdb, 0xae, 0x31, 0x44, 0x9d, 0xe8, 0x77, 0x02, 0x54, 0x21,
-	0xbe, 0xcb, 0x11, 0x64, 0xfb, 0x8e, 0xd8, 0xad, 0x32, 0x47,
-	0x9e, 0xeb, 0x74, 0x01, 0x57, 0x22, 0xbd, 0xc8, 0x00, 0x76,
-	0xec, 0x9a, 0xc5, 0xb3, 0x29, 0x5f, 0x97, 0xe1, 0x7b, 0x0d,
-	0x52, 0x24, 0xbe, 0xc8, 0x33, 0x45, 0xdf, 0xa9, 0xf6, 0x80,
-	0x1a, 0x6c, 0xa4, 0xd2, 0x48, 0x3e, 0x61, 0x17, 0x8d, 0xfb,
-	0x66, 0x10, 0x8a, 0xfc, 0xa3, 0xd5, 0x4f, 0x39, 0xf1, 0x87,
-	0x1d, 0x6b, 0x34, 0x42, 0xd8, 0xae, 0x55, 0x23, 0xb9, 0xcf,
-	0x90, 0xe6, 0x7c, 0x0a, 0xc2, 0xb4, 0x2e, 0x58, 0x07, 0x71,
-	0xeb, 0x9d, 0xcc, 0xba, 0x20, 0x56, 0x09, 0x7f, 0xe5, 0x93,
-	0x5b, 0x2d, 0xb7, 0xc1, 0x9e, 0xe8, 0x72, 0x04, 0xff, 0x89,
-	0x13, 0x65, 0x3a, 0x4c, 0xd6, 0xa0, 0x68, 0x1e, 0x84, 0xf2,
-	0xad, 0xdb, 0x41, 0x37, 0xaa, 0xdc, 0x46, 0x30, 0x6f, 0x19,
-	0x83, 0xf5, 0x3d, 0x4b, 0xd1, 0xa7, 0xf8, 0x8e, 0x14, 0x62,
-	0x99, 0xef, 0x75, 0x03, 0x5c, 0x2a, 0xb0, 0xc6, 0x0e, 0x78,
-	0xe2, 0x94, 0xcb, 0xbd, 0x27, 0x51, 0x85, 0xf3, 0x69, 0x1f,
-	0x40, 0x36, 0xac, 0xda, 0x12, 0x64, 0xfe, 0x88, 0xd7, 0xa1,
-	0x3b, 0x4d, 0xb6, 0xc0, 0x5a, 0x2c, 0x73, 0x05, 0x9f, 0xe9,
-	0x21, 0x57, 0xcd, 0xbb, 0xe4, 0x92, 0x08, 0x7e, 0xe3, 0x95,
-	0x0f, 0x79, 0x26, 0x50, 0xca, 0xbc, 0x74, 0x02, 0x98, 0xee,
-	0xb1, 0xc7, 0x5d, 0x2b, 0xd0, 0xa6, 0x3c, 0x4a, 0x15, 0x63,
-	0xf9, 0x8f, 0x47, 0x31, 0xab, 0xdd, 0x82, 0xf4, 0x6e, 0x18,
-	0x49, 0x3f, 0xa5, 0xd3, 0x8c, 0xfa, 0x60, 0x16, 0xde, 0xa8,
-	0x32, 0x44, 0x1b, 0x6d, 0xf7, 0x81, 0x7a, 0x0c, 0x96, 0xe0,
-	0xbf, 0xc9, 0x53, 0x25, 0xed, 0x9b, 0x01, 0x77, 0x28, 0x5e,
-	0xc4, 0xb2, 0x2f, 0x59, 0xc3, 0xb5, 0xea, 0x9c, 0x06, 0x70,
-	0xb8, 0xce, 0x54, 0x22, 0x7d, 0x0b, 0x91, 0xe7, 0x1c, 0x6a,
-	0xf0, 0x86, 0xd9, 0xaf, 0x35, 0x43, 0x8b, 0xfd, 0x67, 0x11,
-	0x4e, 0x38, 0xa2, 0xd4, 0x00, 0x77, 0xee, 0x99, 0xc1, 0xb6,
-	0x2f, 0x58, 0x9f, 0xe8, 0x71, 0x06, 0x5e, 0x29, 0xb0, 0xc7,
-	0x23, 0x54, 0xcd, 0xba, 0xe2, 0x95, 0x0c, 0x7b, 0xbc, 0xcb,
-	0x52, 0x25, 0x7d, 0x0a, 0x93, 0xe4, 0x46, 0x31, 0xa8, 0xdf,
-	0x87, 0xf0, 0x69, 0x1e, 0xd9, 0xae, 0x37, 0x40, 0x18, 0x6f,
-	0xf6, 0x81, 0x65, 0x12, 0x8b, 0xfc, 0xa4, 0xd3, 0x4a, 0x3d,
-	0xfa, 0x8d, 0x14, 0x63, 0x3b, 0x4c, 0xd5, 0xa2, 0x8c, 0xfb,
-	0x62, 0x15, 0x4d, 0x3a, 0xa3, 0xd4, 0x13, 0x64, 0xfd, 0x8a,
-	0xd2, 0xa5, 0x3c, 0x4b, 0xaf, 0xd8, 0x41, 0x36, 0x6e, 0x19,
-	0x80, 0xf7, 0x30, 0x47, 0xde, 0xa9, 0xf1, 0x86, 0x1f, 0x68,
-	0xca, 0xbd, 0x24, 0x53, 0x0b, 0x7c, 0xe5, 0x92, 0x55, 0x22,
-	0xbb, 0xcc, 0x94, 0xe3, 0x7a, 0x0d, 0xe9, 0x9e, 0x07, 0x70,
-	0x28, 0x5f, 0xc6, 0xb1, 0x76, 0x01, 0x98, 0xef, 0xb7, 0xc0,
-	0x59, 0x2e, 0x05, 0x72, 0xeb, 0x9c, 0xc4, 0xb3, 0x2a, 0x5d,
-	0x9a, 0xed, 0x74, 0x03, 0x5b, 0x2c, 0xb5, 0xc2, 0x26, 0x51,
-	0xc8, 0xbf, 0xe7, 0x90, 0x09, 0x7e, 0xb9, 0xce, 0x57, 0x20,
-	0x78, 0x0f, 0x96, 0xe1, 0x43, 0x34, 0xad, 0xda, 0x82, 0xf5,
-	0x6c, 0x1b, 0xdc, 0xab, 0x32, 0x45, 0x1d, 0x6a, 0xf3, 0x84,
-	0x60, 0x17, 0x8e, 0xf9, 0xa1, 0xd6, 0x4f, 0x38, 0xff, 0x88,
-	0x11, 0x66, 0x3e, 0x49, 0xd0, 0xa7, 0x89, 0xfe, 0x67, 0x10,
-	0x48, 0x3f, 0xa6, 0xd1, 0x16, 0x61, 0xf8, 0x8f, 0xd7, 0xa0,
-	0x39, 0x4e, 0xaa, 0xdd, 0x44, 0x33, 0x6b, 0x1c, 0x85, 0xf2,
-	0x35, 0x42, 0xdb, 0xac, 0xf4, 0x83, 0x1a, 0x6d, 0xcf, 0xb8,
-	0x21, 0x56, 0x0e, 0x79, 0xe0, 0x97, 0x50, 0x27, 0xbe, 0xc9,
-	0x91, 0xe6, 0x7f, 0x08, 0xec, 0x9b, 0x02, 0x75, 0x2d, 0x5a,
-	0xc3, 0xb4, 0x73, 0x04, 0x9d, 0xea, 0xb2, 0xc5, 0x5c, 0x2b,
-	0x00, 0x78, 0xf0, 0x88, 0xfd, 0x85, 0x0d, 0x75, 0xe7, 0x9f,
-	0x17, 0x6f, 0x1a, 0x62, 0xea, 0x92, 0xd3, 0xab, 0x23, 0x5b,
-	0x2e, 0x56, 0xde, 0xa6, 0x34, 0x4c, 0xc4, 0xbc, 0xc9, 0xb1,
-	0x39, 0x41, 0xbb, 0xc3, 0x4b, 0x33, 0x46, 0x3e, 0xb6, 0xce,
-	0x5c, 0x24, 0xac, 0xd4, 0xa1, 0xd9, 0x51, 0x29, 0x68, 0x10,
-	0x98, 0xe0, 0x95, 0xed, 0x65, 0x1d, 0x8f, 0xf7, 0x7f, 0x07,
-	0x72, 0x0a, 0x82, 0xfa, 0x6b, 0x13, 0x9b, 0xe3, 0x96, 0xee,
-	0x66, 0x1e, 0x8c, 0xf4, 0x7c, 0x04, 0x71, 0x09, 0x81, 0xf9,
-	0xb8, 0xc0, 0x48, 0x30, 0x45, 0x3d, 0xb5, 0xcd, 0x5f, 0x27,
-	0xaf, 0xd7, 0xa2, 0xda, 0x52, 0x2a, 0xd0, 0xa8, 0x20, 0x58,
-	0x2d, 0x55, 0xdd, 0xa5, 0x37, 0x4f, 0xc7, 0xbf, 0xca, 0xb2,
-	0x3a, 0x42, 0x03, 0x7b, 0xf3, 0x8b, 0xfe, 0x86, 0x0e, 0x76,
-	0xe4, 0x9c, 0x14, 0x6c, 0x19, 0x61, 0xe9, 0x91, 0xd6, 0xae,
-	0x26, 0x5e, 0x2b, 0x53, 0xdb, 0xa3, 0x31, 0x49, 0xc1, 0xb9,
-	0xcc, 0xb4, 0x3c, 0x44, 0x05, 0x7d, 0xf5, 0x8d, 0xf8, 0x80,
-	0x08, 0x70, 0xe2, 0x9a, 0x12, 0x6a, 0x1f, 0x67, 0xef, 0x97,
-	0x6d, 0x15, 0x9d, 0xe5, 0x90, 0xe8, 0x60, 0x18, 0x8a, 0xf2,
-	0x7a, 0x02, 0x77, 0x0f, 0x87, 0xff, 0xbe, 0xc6, 0x4e, 0x36,
-	0x43, 0x3b, 0xb3, 0xcb, 0x59, 0x21, 0xa9, 0xd1, 0xa4, 0xdc,
-	0x54, 0x2c, 0xbd, 0xc5, 0x4d, 0x35, 0x40, 0x38, 0xb0, 0xc8,
-	0x5a, 0x22, 0xaa, 0xd2, 0xa7, 0xdf, 0x57, 0x2f, 0x6e, 0x16,
-	0x9e, 0xe6, 0x93, 0xeb, 0x63, 0x1b, 0x89, 0xf1, 0x79, 0x01,
-	0x74, 0x0c, 0x84, 0xfc, 0x06, 0x7e, 0xf6, 0x8e, 0xfb, 0x83,
-	0x0b, 0x73, 0xe1, 0x99, 0x11, 0x69, 0x1c, 0x64, 0xec, 0x94,
-	0xd5, 0xad, 0x25, 0x5d, 0x28, 0x50, 0xd8, 0xa0, 0x32, 0x4a,
-	0xc2, 0xba, 0xcf, 0xb7, 0x3f, 0x47, 0x00, 0x79, 0xf2, 0x8b,
-	0xf9, 0x80, 0x0b, 0x72, 0xef, 0x96, 0x1d, 0x64, 0x16, 0x6f,
-	0xe4, 0x9d, 0xc3, 0xba, 0x31, 0x48, 0x3a, 0x43, 0xc8, 0xb1,
-	0x2c, 0x55, 0xde, 0xa7, 0xd5, 0xac, 0x27, 0x5e, 0x9b, 0xe2,
-	0x69, 0x10, 0x62, 0x1b, 0x90, 0xe9, 0x74, 0x0d, 0x86, 0xff,
-	0x8d, 0xf4, 0x7f, 0x06, 0x58, 0x21, 0xaa, 0xd3, 0xa1, 0xd8,
-	0x53, 0x2a, 0xb7, 0xce, 0x45, 0x3c, 0x4e, 0x37, 0xbc, 0xc5,
-	0x2b, 0x52, 0xd9, 0xa0, 0xd2, 0xab, 0x20, 0x59, 0xc4, 0xbd,
-	0x36, 0x4f, 0x3d, 0x44, 0xcf, 0xb6, 0xe8, 0x91, 0x1a, 0x63,
-	0x11, 0x68, 0xe3, 0x9a, 0x07, 0x7e, 0xf5, 0x8c, 0xfe, 0x87,
-	0x0c, 0x75, 0xb0, 0xc9, 0x42, 0x3b, 0x49, 0x30, 0xbb, 0xc2,
-	0x5f, 0x26, 0xad, 0xd4, 0xa6, 0xdf, 0x54, 0x2d, 0x73, 0x0a,
-	0x81, 0xf8, 0x8a, 0xf3, 0x78, 0x01, 0x9c, 0xe5, 0x6e, 0x17,
-	0x65, 0x1c, 0x97, 0xee, 0x56, 0x2f, 0xa4, 0xdd, 0xaf, 0xd6,
-	0x5d, 0x24, 0xb9, 0xc0, 0x4b, 0x32, 0x40, 0x39, 0xb2, 0xcb,
-	0x95, 0xec, 0x67, 0x1e, 0x6c, 0x15, 0x9e, 0xe7, 0x7a, 0x03,
-	0x88, 0xf1, 0x83, 0xfa, 0x71, 0x08, 0xcd, 0xb4, 0x3f, 0x46,
-	0x34, 0x4d, 0xc6, 0xbf, 0x22, 0x5b, 0xd0, 0xa9, 0xdb, 0xa2,
-	0x29, 0x50, 0x0e, 0x77, 0xfc, 0x85, 0xf7, 0x8e, 0x05, 0x7c,
-	0xe1, 0x98, 0x13, 0x6a, 0x18, 0x61, 0xea, 0x93, 0x7d, 0x04,
-	0x8f, 0xf6, 0x84, 0xfd, 0x76, 0x0f, 0x92, 0xeb, 0x60, 0x19,
-	0x6b, 0x12, 0x99, 0xe0, 0xbe, 0xc7, 0x4c, 0x35, 0x47, 0x3e,
-	0xb5, 0xcc, 0x51, 0x28, 0xa3, 0xda, 0xa8, 0xd1, 0x5a, 0x23,
-	0xe6, 0x9f, 0x14, 0x6d, 0x1f, 0x66, 0xed, 0x94, 0x09, 0x70,
-	0xfb, 0x82, 0xf0, 0x89, 0x02, 0x7b, 0x25, 0x5c, 0xd7, 0xae,
-	0xdc, 0xa5, 0x2e, 0x57, 0xca, 0xb3, 0x38, 0x41, 0x33, 0x4a,
-	0xc1, 0xb8, 0x00, 0x7a, 0xf4, 0x8e, 0xf5, 0x8f, 0x01, 0x7b,
-	0xf7, 0x8d, 0x03, 0x79, 0x02, 0x78, 0xf6, 0x8c, 0xf3, 0x89,
-	0x07, 0x7d, 0x06, 0x7c, 0xf2, 0x88, 0x04, 0x7e, 0xf0, 0x8a,
-	0xf1, 0x8b, 0x05, 0x7f, 0xfb, 0x81, 0x0f, 0x75, 0x0e, 0x74,
-	0xfa, 0x80, 0x0c, 0x76, 0xf8, 0x82, 0xf9, 0x83, 0x0d, 0x77,
-	0x08, 0x72, 0xfc, 0x86, 0xfd, 0x87, 0x09, 0x73, 0xff, 0x85,
-	0x0b, 0x71, 0x0a, 0x70, 0xfe, 0x84, 0xeb, 0x91, 0x1f, 0x65,
-	0x1e, 0x64, 0xea, 0x90, 0x1c, 0x66, 0xe8, 0x92, 0xe9, 0x93,
-	0x1d, 0x67, 0x18, 0x62, 0xec, 0x96, 0xed, 0x97, 0x19, 0x63,
-	0xef, 0x95, 0x1b, 0x61, 0x1a, 0x60, 0xee, 0x94, 0x10, 0x6a,
-	0xe4, 0x9e, 0xe5, 0x9f, 0x11, 0x6b, 0xe7, 0x9d, 0x13, 0x69,
-	0x12, 0x68, 0xe6, 0x9c, 0xe3, 0x99, 0x17, 0x6d, 0x16, 0x6c,
-	0xe2, 0x98, 0x14, 0x6e, 0xe0, 0x9a, 0xe1, 0x9b, 0x15, 0x6f,
-	0xcb, 0xb1, 0x3f, 0x45, 0x3e, 0x44, 0xca, 0xb0, 0x3c, 0x46,
-	0xc8, 0xb2, 0xc9, 0xb3, 0x3d, 0x47, 0x38, 0x42, 0xcc, 0xb6,
-	0xcd, 0xb7, 0x39, 0x43, 0xcf, 0xb5, 0x3b, 0x41, 0x3a, 0x40,
-	0xce, 0xb4, 0x30, 0x4a, 0xc4, 0xbe, 0xc5, 0xbf, 0x31, 0x4b,
-	0xc7, 0xbd, 0x33, 0x49, 0x32, 0x48, 0xc6, 0xbc, 0xc3, 0xb9,
-	0x37, 0x4d, 0x36, 0x4c, 0xc2, 0xb8, 0x34, 0x4e, 0xc0, 0xba,
-	0xc1, 0xbb, 0x35, 0x4f, 0x20, 0x5a, 0xd4, 0xae, 0xd5, 0xaf,
-	0x21, 0x5b, 0xd7, 0xad, 0x23, 0x59, 0x22, 0x58, 0xd6, 0xac,
-	0xd3, 0xa9, 0x27, 0x5d, 0x26, 0x5c, 0xd2, 0xa8, 0x24, 0x5e,
-	0xd0, 0xaa, 0xd1, 0xab, 0x25, 0x5f, 0xdb, 0xa1, 0x2f, 0x55,
-	0x2e, 0x54, 0xda, 0xa0, 0x2c, 0x56, 0xd8, 0xa2, 0xd9, 0xa3,
-	0x2d, 0x57, 0x28, 0x52, 0xdc, 0xa6, 0xdd, 0xa7, 0x29, 0x53,
-	0xdf, 0xa5, 0x2b, 0x51, 0x2a, 0x50, 0xde, 0xa4, 0x00, 0x7b,
-	0xf6, 0x8d, 0xf1, 0x8a, 0x07, 0x7c, 0xff, 0x84, 0x09, 0x72,
-	0x0e, 0x75, 0xf8, 0x83, 0xe3, 0x98, 0x15, 0x6e, 0x12, 0x69,
-	0xe4, 0x9f, 0x1c, 0x67, 0xea, 0x91, 0xed, 0x96, 0x1b, 0x60,
-	0xdb, 0xa0, 0x2d, 0x56, 0x2a, 0x51, 0xdc, 0xa7, 0x24, 0x5f,
-	0xd2, 0xa9, 0xd5, 0xae, 0x23, 0x58, 0x38, 0x43, 0xce, 0xb5,
-	0xc9, 0xb2, 0x3f, 0x44, 0xc7, 0xbc, 0x31, 0x4a, 0x36, 0x4d,
-	0xc0, 0xbb, 0xab, 0xd0, 0x5d, 0x26, 0x5a, 0x21, 0xac, 0xd7,
-	0x54, 0x2f, 0xa2, 0xd9, 0xa5, 0xde, 0x53, 0x28, 0x48, 0x33,
-	0xbe, 0xc5, 0xb9, 0xc2, 0x4f, 0x34, 0xb7, 0xcc, 0x41, 0x3a,
-	0x46, 0x3d, 0xb0, 0xcb, 0x70, 0x0b, 0x86, 0xfd, 0x81, 0xfa,
-	0x77, 0x0c, 0x8f, 0xf4, 0x79, 0x02, 0x7e, 0x05, 0x88, 0xf3,
-	0x93, 0xe8, 0x65, 0x1e, 0x62, 0x19, 0x94, 0xef, 0x6c, 0x17,
-	0x9a, 0xe1, 0x9d, 0xe6, 0x6b, 0x10, 0x4b, 0x30, 0xbd, 0xc6,
-	0xba, 0xc1, 0x4c, 0x37, 0xb4, 0xcf, 0x42, 0x39, 0x45, 0x3e,
-	0xb3, 0xc8, 0xa8, 0xd3, 0x5e, 0x25, 0x59, 0x22, 0xaf, 0xd4,
-	0x57, 0x2c, 0xa1, 0xda, 0xa6, 0xdd, 0x50, 0x2b, 0x90, 0xeb,
-	0x66, 0x1d, 0x61, 0x1a, 0x97, 0xec, 0x6f, 0x14, 0x99, 0xe2,
-	0x9e, 0xe5, 0x68, 0x13, 0x73, 0x08, 0x85, 0xfe, 0x82, 0xf9,
-	0x74, 0x0f, 0x8c, 0xf7, 0x7a, 0x01, 0x7d, 0x06, 0x8b, 0xf0,
-	0xe0, 0x9b, 0x16, 0x6d, 0x11, 0x6a, 0xe7, 0x9c, 0x1f, 0x64,
-	0xe9, 0x92, 0xee, 0x95, 0x18, 0x63, 0x03, 0x78, 0xf5, 0x8e,
-	0xf2, 0x89, 0x04, 0x7f, 0xfc, 0x87, 0x0a, 0x71, 0x0d, 0x76,
-	0xfb, 0x80, 0x3b, 0x40, 0xcd, 0xb6, 0xca, 0xb1, 0x3c, 0x47,
-	0xc4, 0xbf, 0x32, 0x49, 0x35, 0x4e, 0xc3, 0xb8, 0xd8, 0xa3,
-	0x2e, 0x55, 0x29, 0x52, 0xdf, 0xa4, 0x27, 0x5c, 0xd1, 0xaa,
-	0xd6, 0xad, 0x20, 0x5b, 0x00, 0x7c, 0xf8, 0x84, 0xed, 0x91,
-	0x15, 0x69, 0xc7, 0xbb, 0x3f, 0x43, 0x2a, 0x56, 0xd2, 0xae,
-	0x93, 0xef, 0x6b, 0x17, 0x7e, 0x02, 0x86, 0xfa, 0x54, 0x28,
-	0xac, 0xd0, 0xb9, 0xc5, 0x41, 0x3d, 0x3b, 0x47, 0xc3, 0xbf,
-	0xd6, 0xaa, 0x2e, 0x52, 0xfc, 0x80, 0x04, 0x78, 0x11, 0x6d,
-	0xe9, 0x95, 0xa8, 0xd4, 0x50, 0x2c, 0x45, 0x39, 0xbd, 0xc1,
-	0x6f, 0x13, 0x97, 0xeb, 0x82, 0xfe, 0x7a, 0x06, 0x76, 0x0a,
-	0x8e, 0xf2, 0x9b, 0xe7, 0x63, 0x1f, 0xb1, 0xcd, 0x49, 0x35,
-	0x5c, 0x20, 0xa4, 0xd8, 0xe5, 0x99, 0x1d, 0x61, 0x08, 0x74,
-	0xf0, 0x8c, 0x22, 0x5e, 0xda, 0xa6, 0xcf, 0xb3, 0x37, 0x4b,
-	0x4d, 0x31, 0xb5, 0xc9, 0xa0, 0xdc, 0x58, 0x24, 0x8a, 0xf6,
-	0x72, 0x0e, 0x67, 0x1b, 0x9f, 0xe3, 0xde, 0xa2, 0x26, 0x5a,
-	0x33, 0x4f, 0xcb, 0xb7, 0x19, 0x65, 0xe1, 0x9d, 0xf4, 0x88,
-	0x0c, 0x70, 0xec, 0x90, 0x14, 0x68, 0x01, 0x7d, 0xf9, 0x85,
-	0x2b, 0x57, 0xd3, 0xaf, 0xc6, 0xba, 0x3e, 0x42, 0x7f, 0x03,
-	0x87, 0xfb, 0x92, 0xee, 0x6a, 0x16, 0xb8, 0xc4, 0x40, 0x3c,
-	0x55, 0x29, 0xad, 0xd1, 0xd7, 0xab, 0x2f, 0x53, 0x3a, 0x46,
-	0xc2, 0xbe, 0x10, 0x6c, 0xe8, 0x94, 0xfd, 0x81, 0x05, 0x79,
-	0x44, 0x38, 0xbc, 0xc0, 0xa9, 0xd5, 0x51, 0x2d, 0x83, 0xff,
-	0x7b, 0x07, 0x6e, 0x12, 0x96, 0xea, 0x9a, 0xe6, 0x62, 0x1e,
-	0x77, 0x0b, 0x8f, 0xf3, 0x5d, 0x21, 0xa5, 0xd9, 0xb0, 0xcc,
-	0x48, 0x34, 0x09, 0x75, 0xf1, 0x8d, 0xe4, 0x98, 0x1c, 0x60,
-	0xce, 0xb2, 0x36, 0x4a, 0x23, 0x5f, 0xdb, 0xa7, 0xa1, 0xdd,
-	0x59, 0x25, 0x4c, 0x30, 0xb4, 0xc8, 0x66, 0x1a, 0x9e, 0xe2,
-	0x8b, 0xf7, 0x73, 0x0f, 0x32, 0x4e, 0xca, 0xb6, 0xdf, 0xa3,
-	0x27, 0x5b, 0xf5, 0x89, 0x0d, 0x71, 0x18, 0x64, 0xe0, 0x9c,
-	0x00, 0x7d, 0xfa, 0x87, 0xe9, 0x94, 0x13, 0x6e, 0xcf, 0xb2,
-	0x35, 0x48, 0x26, 0x5b, 0xdc, 0xa1, 0x83, 0xfe, 0x79, 0x04,
-	0x6a, 0x17, 0x90, 0xed, 0x4c, 0x31, 0xb6, 0xcb, 0xa5, 0xd8,
-	0x5f, 0x22, 0x1b, 0x66, 0xe1, 0x9c, 0xf2, 0x8f, 0x08, 0x75,
-	0xd4, 0xa9, 0x2e, 0x53, 0x3d, 0x40, 0xc7, 0xba, 0x98, 0xe5,
-	0x62, 0x1f, 0x71, 0x0c, 0x8b, 0xf6, 0x57, 0x2a, 0xad, 0xd0,
-	0xbe, 0xc3, 0x44, 0x39, 0x36, 0x4b, 0xcc, 0xb1, 0xdf, 0xa2,
-	0x25, 0x58, 0xf9, 0x84, 0x03, 0x7e, 0x10, 0x6d, 0xea, 0x97,
-	0xb5, 0xc8, 0x4f, 0x32, 0x5c, 0x21, 0xa6, 0xdb, 0x7a, 0x07,
-	0x80, 0xfd, 0x93, 0xee, 0x69, 0x14, 0x2d, 0x50, 0xd7, 0xaa,
-	0xc4, 0xb9, 0x3e, 0x43, 0xe2, 0x9f, 0x18, 0x65, 0x0b, 0x76,
-	0xf1, 0x8c, 0xae, 0xd3, 0x54, 0x29, 0x47, 0x3a, 0xbd, 0xc0,
-	0x61, 0x1c, 0x9b, 0xe6, 0x88, 0xf5, 0x72, 0x0f, 0x6c, 0x11,
-	0x96, 0xeb, 0x85, 0xf8, 0x7f, 0x02, 0xa3, 0xde, 0x59, 0x24,
-	0x4a, 0x37, 0xb0, 0xcd, 0xef, 0x92, 0x15, 0x68, 0x06, 0x7b,
-	0xfc, 0x81, 0x20, 0x5d, 0xda, 0xa7, 0xc9, 0xb4, 0x33, 0x4e,
-	0x77, 0x0a, 0x8d, 0xf0, 0x9e, 0xe3, 0x64, 0x19, 0xb8, 0xc5,
-	0x42, 0x3f, 0x51, 0x2c, 0xab, 0xd6, 0xf4, 0x89, 0x0e, 0x73,
-	0x1d, 0x60, 0xe7, 0x9a, 0x3b, 0x46, 0xc1, 0xbc, 0xd2, 0xaf,
-	0x28, 0x55, 0x5a, 0x27, 0xa0, 0xdd, 0xb3, 0xce, 0x49, 0x34,
-	0x95, 0xe8, 0x6f, 0x12, 0x7c, 0x01, 0x86, 0xfb, 0xd9, 0xa4,
-	0x23, 0x5e, 0x30, 0x4d, 0xca, 0xb7, 0x16, 0x6b, 0xec, 0x91,
-	0xff, 0x82, 0x05, 0x78, 0x41, 0x3c, 0xbb, 0xc6, 0xa8, 0xd5,
-	0x52, 0x2f, 0x8e, 0xf3, 0x74, 0x09, 0x67, 0x1a, 0x9d, 0xe0,
-	0xc2, 0xbf, 0x38, 0x45, 0x2b, 0x56, 0xd1, 0xac, 0x0d, 0x70,
-	0xf7, 0x8a, 0xe4, 0x99, 0x1e, 0x63, 0x00, 0x7e, 0xfc, 0x82,
-	0xe5, 0x9b, 0x19, 0x67, 0xd7, 0xa9, 0x2b, 0x55, 0x32, 0x4c,
-	0xce, 0xb0, 0xb3, 0xcd, 0x4f, 0x31, 0x56, 0x28, 0xaa, 0xd4,
-	0x64, 0x1a, 0x98, 0xe6, 0x81, 0xff, 0x7d, 0x03, 0x7b, 0x05,
-	0x87, 0xf9, 0x9e, 0xe0, 0x62, 0x1c, 0xac, 0xd2, 0x50, 0x2e,
-	0x49, 0x37, 0xb5, 0xcb, 0xc8, 0xb6, 0x34, 0x4a, 0x2d, 0x53,
-	0xd1, 0xaf, 0x1f, 0x61, 0xe3, 0x9d, 0xfa, 0x84, 0x06, 0x78,
-	0xf6, 0x88, 0x0a, 0x74, 0x13, 0x6d, 0xef, 0x91, 0x21, 0x5f,
-	0xdd, 0xa3, 0xc4, 0xba, 0x38, 0x46, 0x45, 0x3b, 0xb9, 0xc7,
-	0xa0, 0xde, 0x5c, 0x22, 0x92, 0xec, 0x6e, 0x10, 0x77, 0x09,
-	0x8b, 0xf5, 0x8d, 0xf3, 0x71, 0x0f, 0x68, 0x16, 0x94, 0xea,
-	0x5a, 0x24, 0xa6, 0xd8, 0xbf, 0xc1, 0x43, 0x3d, 0x3e, 0x40,
-	0xc2, 0xbc, 0xdb, 0xa5, 0x27, 0x59, 0xe9, 0x97, 0x15, 0x6b,
-	0x0c, 0x72, 0xf0, 0x8e, 0xf1, 0x8f, 0x0d, 0x73, 0x14, 0x6a,
-	0xe8, 0x96, 0x26, 0x58, 0xda, 0xa4, 0xc3, 0xbd, 0x3f, 0x41,
-	0x42, 0x3c, 0xbe, 0xc0, 0xa7, 0xd9, 0x5b, 0x25, 0x95, 0xeb,
-	0x69, 0x17, 0x70, 0x0e, 0x8c, 0xf2, 0x8a, 0xf4, 0x76, 0x08,
-	0x6f, 0x11, 0x93, 0xed, 0x5d, 0x23, 0xa1, 0xdf, 0xb8, 0xc6,
-	0x44, 0x3a, 0x39, 0x47, 0xc5, 0xbb, 0xdc, 0xa2, 0x20, 0x5e,
-	0xee, 0x90, 0x12, 0x6c, 0x0b, 0x75, 0xf7, 0x89, 0x07, 0x79,
-	0xfb, 0x85, 0xe2, 0x9c, 0x1e, 0x60, 0xd0, 0xae, 0x2c, 0x52,
-	0x35, 0x4b, 0xc9, 0xb7, 0xb4, 0xca, 0x48, 0x36, 0x51, 0x2f,
-	0xad, 0xd3, 0x63, 0x1d, 0x9f, 0xe1, 0x86, 0xf8, 0x7a, 0x04,
-	0x7c, 0x02, 0x80, 0xfe, 0x99, 0xe7, 0x65, 0x1b, 0xab, 0xd5,
-	0x57, 0x29, 0x4e, 0x30, 0xb2, 0xcc, 0xcf, 0xb1, 0x33, 0x4d,
-	0x2a, 0x54, 0xd6, 0xa8, 0x18, 0x66, 0xe4, 0x9a, 0xfd, 0x83,
-	0x01, 0x7f, 0x00, 0x7f, 0xfe, 0x81, 0xe1, 0x9e, 0x1f, 0x60,
-	0xdf, 0xa0, 0x21, 0x5e, 0x3e, 0x41, 0xc0, 0xbf, 0xa3, 0xdc,
-	0x5d, 0x22, 0x42, 0x3d, 0xbc, 0xc3, 0x7c, 0x03, 0x82, 0xfd,
-	0x9d, 0xe2, 0x63, 0x1c, 0x5b, 0x24, 0xa5, 0xda, 0xba, 0xc5,
-	0x44, 0x3b, 0x84, 0xfb, 0x7a, 0x05, 0x65, 0x1a, 0x9b, 0xe4,
-	0xf8, 0x87, 0x06, 0x79, 0x19, 0x66, 0xe7, 0x98, 0x27, 0x58,
-	0xd9, 0xa6, 0xc6, 0xb9, 0x38, 0x47, 0xb6, 0xc9, 0x48, 0x37,
-	0x57, 0x28, 0xa9, 0xd6, 0x69, 0x16, 0x97, 0xe8, 0x88, 0xf7,
-	0x76, 0x09, 0x15, 0x6a, 0xeb, 0x94, 0xf4, 0x8b, 0x0a, 0x75,
-	0xca, 0xb5, 0x34, 0x4b, 0x2b, 0x54, 0xd5, 0xaa, 0xed, 0x92,
-	0x13, 0x6c, 0x0c, 0x73, 0xf2, 0x8d, 0x32, 0x4d, 0xcc, 0xb3,
-	0xd3, 0xac, 0x2d, 0x52, 0x4e, 0x31, 0xb0, 0xcf, 0xaf, 0xd0,
-	0x51, 0x2e, 0x91, 0xee, 0x6f, 0x10, 0x70, 0x0f, 0x8e, 0xf1,
-	0x71, 0x0e, 0x8f, 0xf0, 0x90, 0xef, 0x6e, 0x11, 0xae, 0xd1,
-	0x50, 0x2f, 0x4f, 0x30, 0xb1, 0xce, 0xd2, 0xad, 0x2c, 0x53,
-	0x33, 0x4c, 0xcd, 0xb2, 0x0d, 0x72, 0xf3, 0x8c, 0xec, 0x93,
-	0x12, 0x6d, 0x2a, 0x55, 0xd4, 0xab, 0xcb, 0xb4, 0x35, 0x4a,
-	0xf5, 0x8a, 0x0b, 0x74, 0x14, 0x6b, 0xea, 0x95, 0x89, 0xf6,
-	0x77, 0x08, 0x68, 0x17, 0x96, 0xe9, 0x56, 0x29, 0xa8, 0xd7,
-	0xb7, 0xc8, 0x49, 0x36, 0xc7, 0xb8, 0x39, 0x46, 0x26, 0x59,
-	0xd8, 0xa7, 0x18, 0x67, 0xe6, 0x99, 0xf9, 0x86, 0x07, 0x78,
-	0x64, 0x1b, 0x9a, 0xe5, 0x85, 0xfa, 0x7b, 0x04, 0xbb, 0xc4,
-	0x45, 0x3a, 0x5a, 0x25, 0xa4, 0xdb, 0x9c, 0xe3, 0x62, 0x1d,
-	0x7d, 0x02, 0x83, 0xfc, 0x43, 0x3c, 0xbd, 0xc2, 0xa2, 0xdd,
-	0x5c, 0x23, 0x3f, 0x40, 0xc1, 0xbe, 0xde, 0xa1, 0x20, 0x5f,
-	0xe0, 0x9f, 0x1e, 0x61, 0x01, 0x7e, 0xff, 0x80, 0x00, 0x80,
-	0x1d, 0x9d, 0x3a, 0xba, 0x27, 0xa7, 0x74, 0xf4, 0x69, 0xe9,
-	0x4e, 0xce, 0x53, 0xd3, 0xe8, 0x68, 0xf5, 0x75, 0xd2, 0x52,
-	0xcf, 0x4f, 0x9c, 0x1c, 0x81, 0x01, 0xa6, 0x26, 0xbb, 0x3b,
-	0xcd, 0x4d, 0xd0, 0x50, 0xf7, 0x77, 0xea, 0x6a, 0xb9, 0x39,
-	0xa4, 0x24, 0x83, 0x03, 0x9e, 0x1e, 0x25, 0xa5, 0x38, 0xb8,
-	0x1f, 0x9f, 0x02, 0x82, 0x51, 0xd1, 0x4c, 0xcc, 0x6b, 0xeb,
-	0x76, 0xf6, 0x87, 0x07, 0x9a, 0x1a, 0xbd, 0x3d, 0xa0, 0x20,
-	0xf3, 0x73, 0xee, 0x6e, 0xc9, 0x49, 0xd4, 0x54, 0x6f, 0xef,
-	0x72, 0xf2, 0x55, 0xd5, 0x48, 0xc8, 0x1b, 0x9b, 0x06, 0x86,
-	0x21, 0xa1, 0x3c, 0xbc, 0x4a, 0xca, 0x57, 0xd7, 0x70, 0xf0,
-	0x6d, 0xed, 0x3e, 0xbe, 0x23, 0xa3, 0x04, 0x84, 0x19, 0x99,
-	0xa2, 0x22, 0xbf, 0x3f, 0x98, 0x18, 0x85, 0x05, 0xd6, 0x56,
-	0xcb, 0x4b, 0xec, 0x6c, 0xf1, 0x71, 0x13, 0x93, 0x0e, 0x8e,
-	0x29, 0xa9, 0x34, 0xb4, 0x67, 0xe7, 0x7a, 0xfa, 0x5d, 0xdd,
-	0x40, 0xc0, 0xfb, 0x7b, 0xe6, 0x66, 0xc1, 0x41, 0xdc, 0x5c,
-	0x8f, 0x0f, 0x92, 0x12, 0xb5, 0x35, 0xa8, 0x28, 0xde, 0x5e,
-	0xc3, 0x43, 0xe4, 0x64, 0xf9, 0x79, 0xaa, 0x2a, 0xb7, 0x37,
-	0x90, 0x10, 0x8d, 0x0d, 0x36, 0xb6, 0x2b, 0xab, 0x0c, 0x8c,
-	0x11, 0x91, 0x42, 0xc2, 0x5f, 0xdf, 0x78, 0xf8, 0x65, 0xe5,
-	0x94, 0x14, 0x89, 0x09, 0xae, 0x2e, 0xb3, 0x33, 0xe0, 0x60,
-	0xfd, 0x7d, 0xda, 0x5a, 0xc7, 0x47, 0x7c, 0xfc, 0x61, 0xe1,
-	0x46, 0xc6, 0x5b, 0xdb, 0x08, 0x88, 0x15, 0x95, 0x32, 0xb2,
-	0x2f, 0xaf, 0x59, 0xd9, 0x44, 0xc4, 0x63, 0xe3, 0x7e, 0xfe,
-	0x2d, 0xad, 0x30, 0xb0, 0x17, 0x97, 0x0a, 0x8a, 0xb1, 0x31,
-	0xac, 0x2c, 0x8b, 0x0b, 0x96, 0x16, 0xc5, 0x45, 0xd8, 0x58,
-	0xff, 0x7f, 0xe2, 0x62, 0x00, 0x81, 0x1f, 0x9e, 0x3e, 0xbf,
-	0x21, 0xa0, 0x7c, 0xfd, 0x63, 0xe2, 0x42, 0xc3, 0x5d, 0xdc,
-	0xf8, 0x79, 0xe7, 0x66, 0xc6, 0x47, 0xd9, 0x58, 0x84, 0x05,
-	0x9b, 0x1a, 0xba, 0x3b, 0xa5, 0x24, 0xed, 0x6c, 0xf2, 0x73,
-	0xd3, 0x52, 0xcc, 0x4d, 0x91, 0x10, 0x8e, 0x0f, 0xaf, 0x2e,
-	0xb0, 0x31, 0x15, 0x94, 0x0a, 0x8b, 0x2b, 0xaa, 0x34, 0xb5,
-	0x69, 0xe8, 0x76, 0xf7, 0x57, 0xd6, 0x48, 0xc9, 0xc7, 0x46,
-	0xd8, 0x59, 0xf9, 0x78, 0xe6, 0x67, 0xbb, 0x3a, 0xa4, 0x25,
-	0x85, 0x04, 0x9a, 0x1b, 0x3f, 0xbe, 0x20, 0xa1, 0x01, 0x80,
-	0x1e, 0x9f, 0x43, 0xc2, 0x5c, 0xdd, 0x7d, 0xfc, 0x62, 0xe3,
-	0x2a, 0xab, 0x35, 0xb4, 0x14, 0x95, 0x0b, 0x8a, 0x56, 0xd7,
-	0x49, 0xc8, 0x68, 0xe9, 0x77, 0xf6, 0xd2, 0x53, 0xcd, 0x4c,
-	0xec, 0x6d, 0xf3, 0x72, 0xae, 0x2f, 0xb1, 0x30, 0x90, 0x11,
-	0x8f, 0x0e, 0x93, 0x12, 0x8c, 0x0d, 0xad, 0x2c, 0xb2, 0x33,
-	0xef, 0x6e, 0xf0, 0x71, 0xd1, 0x50, 0xce, 0x4f, 0x6b, 0xea,
-	0x74, 0xf5, 0x55, 0xd4, 0x4a, 0xcb, 0x17, 0x96, 0x08, 0x89,
-	0x29, 0xa8, 0x36, 0xb7, 0x7e, 0xff, 0x61, 0xe0, 0x40, 0xc1,
-	0x5f, 0xde, 0x02, 0x83, 0x1d, 0x9c, 0x3c, 0xbd, 0x23, 0xa2,
-	0x86, 0x07, 0x99, 0x18, 0xb8, 0x39, 0xa7, 0x26, 0xfa, 0x7b,
-	0xe5, 0x64, 0xc4, 0x45, 0xdb, 0x5a, 0x54, 0xd5, 0x4b, 0xca,
-	0x6a, 0xeb, 0x75, 0xf4, 0x28, 0xa9, 0x37, 0xb6, 0x16, 0x97,
-	0x09, 0x88, 0xac, 0x2d, 0xb3, 0x32, 0x92, 0x13, 0x8d, 0x0c,
-	0xd0, 0x51, 0xcf, 0x4e, 0xee, 0x6f, 0xf1, 0x70, 0xb9, 0x38,
-	0xa6, 0x27, 0x87, 0x06, 0x98, 0x19, 0xc5, 0x44, 0xda, 0x5b,
-	0xfb, 0x7a, 0xe4, 0x65, 0x41, 0xc0, 0x5e, 0xdf, 0x7f, 0xfe,
-	0x60, 0xe1, 0x3d, 0xbc, 0x22, 0xa3, 0x03, 0x82, 0x1c, 0x9d,
-	0x00, 0x82, 0x19, 0x9b, 0x32, 0xb0, 0x2b, 0xa9, 0x64, 0xe6,
-	0x7d, 0xff, 0x56, 0xd4, 0x4f, 0xcd, 0xc8, 0x4a, 0xd1, 0x53,
-	0xfa, 0x78, 0xe3, 0x61, 0xac, 0x2e, 0xb5, 0x37, 0x9e, 0x1c,
-	0x87, 0x05, 0x8d, 0x0f, 0x94, 0x16, 0xbf, 0x3d, 0xa6, 0x24,
-	0xe9, 0x6b, 0xf0, 0x72, 0xdb, 0x59, 0xc2, 0x40, 0x45, 0xc7,
-	0x5c, 0xde, 0x77, 0xf5, 0x6e, 0xec, 0x21, 0xa3, 0x38, 0xba,
-	0x13, 0x91, 0x0a, 0x88, 0x07, 0x85, 0x1e, 0x9c, 0x35, 0xb7,
-	0x2c, 0xae, 0x63, 0xe1, 0x7a, 0xf8, 0x51, 0xd3, 0x48, 0xca,
-	0xcf, 0x4d, 0xd6, 0x54, 0xfd, 0x7f, 0xe4, 0x66, 0xab, 0x29,
-	0xb2, 0x30, 0x99, 0x1b, 0x80, 0x02, 0x8a, 0x08, 0x93, 0x11,
-	0xb8, 0x3a, 0xa1, 0x23, 0xee, 0x6c, 0xf7, 0x75, 0xdc, 0x5e,
-	0xc5, 0x47, 0x42, 0xc0, 0x5b, 0xd9, 0x70, 0xf2, 0x69, 0xeb,
-	0x26, 0xa4, 0x3f, 0xbd, 0x14, 0x96, 0x0d, 0x8f, 0x0e, 0x8c,
-	0x17, 0x95, 0x3c, 0xbe, 0x25, 0xa7, 0x6a, 0xe8, 0x73, 0xf1,
-	0x58, 0xda, 0x41, 0xc3, 0xc6, 0x44, 0xdf, 0x5d, 0xf4, 0x76,
-	0xed, 0x6f, 0xa2, 0x20, 0xbb, 0x39, 0x90, 0x12, 0x89, 0x0b,
-	0x83, 0x01, 0x9a, 0x18, 0xb1, 0x33, 0xa8, 0x2a, 0xe7, 0x65,
-	0xfe, 0x7c, 0xd5, 0x57, 0xcc, 0x4e, 0x4b, 0xc9, 0x52, 0xd0,
-	0x79, 0xfb, 0x60, 0xe2, 0x2f, 0xad, 0x36, 0xb4, 0x1d, 0x9f,
-	0x04, 0x86, 0x09, 0x8b, 0x10, 0x92, 0x3b, 0xb9, 0x22, 0xa0,
-	0x6d, 0xef, 0x74, 0xf6, 0x5f, 0xdd, 0x46, 0xc4, 0xc1, 0x43,
-	0xd8, 0x5a, 0xf3, 0x71, 0xea, 0x68, 0xa5, 0x27, 0xbc, 0x3e,
-	0x97, 0x15, 0x8e, 0x0c, 0x84, 0x06, 0x9d, 0x1f, 0xb6, 0x34,
-	0xaf, 0x2d, 0xe0, 0x62, 0xf9, 0x7b, 0xd2, 0x50, 0xcb, 0x49,
-	0x4c, 0xce, 0x55, 0xd7, 0x7e, 0xfc, 0x67, 0xe5, 0x28, 0xaa,
-	0x31, 0xb3, 0x1a, 0x98, 0x03, 0x81, 0x00, 0x83, 0x1b, 0x98,
-	0x36, 0xb5, 0x2d, 0xae, 0x6c, 0xef, 0x77, 0xf4, 0x5a, 0xd9,
-	0x41, 0xc2, 0xd8, 0x5b, 0xc3, 0x40, 0xee, 0x6d, 0xf5, 0x76,
-	0xb4, 0x37, 0xaf, 0x2c, 0x82, 0x01, 0x99, 0x1a, 0xad, 0x2e,
-	0xb6, 0x35, 0x9b, 0x18, 0x80, 0x03, 0xc1, 0x42, 0xda, 0x59,
-	0xf7, 0x74, 0xec, 0x6f, 0x75, 0xf6, 0x6e, 0xed, 0x43, 0xc0,
-	0x58, 0xdb, 0x19, 0x9a, 0x02, 0x81, 0x2f, 0xac, 0x34, 0xb7,
-	0x47, 0xc4, 0x5c, 0xdf, 0x71, 0xf2, 0x6a, 0xe9, 0x2b, 0xa8,
-	0x30, 0xb3, 0x1d, 0x9e, 0x06, 0x85, 0x9f, 0x1c, 0x84, 0x07,
-	0xa9, 0x2a, 0xb2, 0x31, 0xf3, 0x70, 0xe8, 0x6b, 0xc5, 0x46,
-	0xde, 0x5d, 0xea, 0x69, 0xf1, 0x72, 0xdc, 0x5f, 0xc7, 0x44,
-	0x86, 0x05, 0x9d, 0x1e, 0xb0, 0x33, 0xab, 0x28, 0x32, 0xb1,
-	0x29, 0xaa, 0x04, 0x87, 0x1f, 0x9c, 0x5e, 0xdd, 0x45, 0xc6,
-	0x68, 0xeb, 0x73, 0xf0, 0x8e, 0x0d, 0x95, 0x16, 0xb8, 0x3b,
-	0xa3, 0x20, 0xe2, 0x61, 0xf9, 0x7a, 0xd4, 0x57, 0xcf, 0x4c,
-	0x56, 0xd5, 0x4d, 0xce, 0x60, 0xe3, 0x7b, 0xf8, 0x3a, 0xb9,
-	0x21, 0xa2, 0x0c, 0x8f, 0x17, 0x94, 0x23, 0xa0, 0x38, 0xbb,
-	0x15, 0x96, 0x0e, 0x8d, 0x4f, 0xcc, 0x54, 0xd7, 0x79, 0xfa,
-	0x62, 0xe1, 0xfb, 0x78, 0xe0, 0x63, 0xcd, 0x4e, 0xd6, 0x55,
-	0x97, 0x14, 0x8c, 0x0f, 0xa1, 0x22, 0xba, 0x39, 0xc9, 0x4a,
-	0xd2, 0x51, 0xff, 0x7c, 0xe4, 0x67, 0xa5, 0x26, 0xbe, 0x3d,
-	0x93, 0x10, 0x88, 0x0b, 0x11, 0x92, 0x0a, 0x89, 0x27, 0xa4,
-	0x3c, 0xbf, 0x7d, 0xfe, 0x66, 0xe5, 0x4b, 0xc8, 0x50, 0xd3,
-	0x64, 0xe7, 0x7f, 0xfc, 0x52, 0xd1, 0x49, 0xca, 0x08, 0x8b,
-	0x13, 0x90, 0x3e, 0xbd, 0x25, 0xa6, 0xbc, 0x3f, 0xa7, 0x24,
-	0x8a, 0x09, 0x91, 0x12, 0xd0, 0x53, 0xcb, 0x48, 0xe6, 0x65,
-	0xfd, 0x7e, 0x00, 0x84, 0x15, 0x91, 0x2a, 0xae, 0x3f, 0xbb,
-	0x54, 0xd0, 0x41, 0xc5, 0x7e, 0xfa, 0x6b, 0xef, 0xa8, 0x2c,
-	0xbd, 0x39, 0x82, 0x06, 0x97, 0x13, 0xfc, 0x78, 0xe9, 0x6d,
-	0xd6, 0x52, 0xc3, 0x47, 0x4d, 0xc9, 0x58, 0xdc, 0x67, 0xe3,
-	0x72, 0xf6, 0x19, 0x9d, 0x0c, 0x88, 0x33, 0xb7, 0x26, 0xa2,
-	0xe5, 0x61, 0xf0, 0x74, 0xcf, 0x4b, 0xda, 0x5e, 0xb1, 0x35,
-	0xa4, 0x20, 0x9b, 0x1f, 0x8e, 0x0a, 0x9a, 0x1e, 0x8f, 0x0b,
-	0xb0, 0x34, 0xa5, 0x21, 0xce, 0x4a, 0xdb, 0x5f, 0xe4, 0x60,
-	0xf1, 0x75, 0x32, 0xb6, 0x27, 0xa3, 0x18, 0x9c, 0x0d, 0x89,
-	0x66, 0xe2, 0x73, 0xf7, 0x4c, 0xc8, 0x59, 0xdd, 0xd7, 0x53,
-	0xc2, 0x46, 0xfd, 0x79, 0xe8, 0x6c, 0x83, 0x07, 0x96, 0x12,
-	0xa9, 0x2d, 0xbc, 0x38, 0x7f, 0xfb, 0x6a, 0xee, 0x55, 0xd1,
-	0x40, 0xc4, 0x2b, 0xaf, 0x3e, 0xba, 0x01, 0x85, 0x14, 0x90,
-	0x29, 0xad, 0x3c, 0xb8, 0x03, 0x87, 0x16, 0x92, 0x7d, 0xf9,
-	0x68, 0xec, 0x57, 0xd3, 0x42, 0xc6, 0x81, 0x05, 0x94, 0x10,
-	0xab, 0x2f, 0xbe, 0x3a, 0xd5, 0x51, 0xc0, 0x44, 0xff, 0x7b,
-	0xea, 0x6e, 0x64, 0xe0, 0x71, 0xf5, 0x4e, 0xca, 0x5b, 0xdf,
-	0x30, 0xb4, 0x25, 0xa1, 0x1a, 0x9e, 0x0f, 0x8b, 0xcc, 0x48,
-	0xd9, 0x5d, 0xe6, 0x62, 0xf3, 0x77, 0x98, 0x1c, 0x8d, 0x09,
-	0xb2, 0x36, 0xa7, 0x23, 0xb3, 0x37, 0xa6, 0x22, 0x99, 0x1d,
-	0x8c, 0x08, 0xe7, 0x63, 0xf2, 0x76, 0xcd, 0x49, 0xd8, 0x5c,
-	0x1b, 0x9f, 0x0e, 0x8a, 0x31, 0xb5, 0x24, 0xa0, 0x4f, 0xcb,
-	0x5a, 0xde, 0x65, 0xe1, 0x70, 0xf4, 0xfe, 0x7a, 0xeb, 0x6f,
-	0xd4, 0x50, 0xc1, 0x45, 0xaa, 0x2e, 0xbf, 0x3b, 0x80, 0x04,
-	0x95, 0x11, 0x56, 0xd2, 0x43, 0xc7, 0x7c, 0xf8, 0x69, 0xed,
-	0x02, 0x86, 0x17, 0x93, 0x28, 0xac, 0x3d, 0xb9, 0x00, 0x85,
-	0x17, 0x92, 0x2e, 0xab, 0x39, 0xbc, 0x5c, 0xd9, 0x4b, 0xce,
-	0x72, 0xf7, 0x65, 0xe0, 0xb8, 0x3d, 0xaf, 0x2a, 0x96, 0x13,
-	0x81, 0x04, 0xe4, 0x61, 0xf3, 0x76, 0xca, 0x4f, 0xdd, 0x58,
-	0x6d, 0xe8, 0x7a, 0xff, 0x43, 0xc6, 0x54, 0xd1, 0x31, 0xb4,
-	0x26, 0xa3, 0x1f, 0x9a, 0x08, 0x8d, 0xd5, 0x50, 0xc2, 0x47,
-	0xfb, 0x7e, 0xec, 0x69, 0x89, 0x0c, 0x9e, 0x1b, 0xa7, 0x22,
-	0xb0, 0x35, 0xda, 0x5f, 0xcd, 0x48, 0xf4, 0x71, 0xe3, 0x66,
-	0x86, 0x03, 0x91, 0x14, 0xa8, 0x2d, 0xbf, 0x3a, 0x62, 0xe7,
-	0x75, 0xf0, 0x4c, 0xc9, 0x5b, 0xde, 0x3e, 0xbb, 0x29, 0xac,
-	0x10, 0x95, 0x07, 0x82, 0xb7, 0x32, 0xa0, 0x25, 0x99, 0x1c,
-	0x8e, 0x0b, 0xeb, 0x6e, 0xfc, 0x79, 0xc5, 0x40, 0xd2, 0x57,
-	0x0f, 0x8a, 0x18, 0x9d, 0x21, 0xa4, 0x36, 0xb3, 0x53, 0xd6,
-	0x44, 0xc1, 0x7d, 0xf8, 0x6a, 0xef, 0xa9, 0x2c, 0xbe, 0x3b,
-	0x87, 0x02, 0x90, 0x15, 0xf5, 0x70, 0xe2, 0x67, 0xdb, 0x5e,
-	0xcc, 0x49, 0x11, 0x94, 0x06, 0x83, 0x3f, 0xba, 0x28, 0xad,
-	0x4d, 0xc8, 0x5a, 0xdf, 0x63, 0xe6, 0x74, 0xf1, 0xc4, 0x41,
-	0xd3, 0x56, 0xea, 0x6f, 0xfd, 0x78, 0x98, 0x1d, 0x8f, 0x0a,
-	0xb6, 0x33, 0xa1, 0x24, 0x7c, 0xf9, 0x6b, 0xee, 0x52, 0xd7,
-	0x45, 0xc0, 0x20, 0xa5, 0x37, 0xb2, 0x0e, 0x8b, 0x19, 0x9c,
-	0x73, 0xf6, 0x64, 0xe1, 0x5d, 0xd8, 0x4a, 0xcf, 0x2f, 0xaa,
-	0x38, 0xbd, 0x01, 0x84, 0x16, 0x93, 0xcb, 0x4e, 0xdc, 0x59,
-	0xe5, 0x60, 0xf2, 0x77, 0x97, 0x12, 0x80, 0x05, 0xb9, 0x3c,
-	0xae, 0x2b, 0x1e, 0x9b, 0x09, 0x8c, 0x30, 0xb5, 0x27, 0xa2,
-	0x42, 0xc7, 0x55, 0xd0, 0x6c, 0xe9, 0x7b, 0xfe, 0xa6, 0x23,
-	0xb1, 0x34, 0x88, 0x0d, 0x9f, 0x1a, 0xfa, 0x7f, 0xed, 0x68,
-	0xd4, 0x51, 0xc3, 0x46, 0x00, 0x86, 0x11, 0x97, 0x22, 0xa4,
-	0x33, 0xb5, 0x44, 0xc2, 0x55, 0xd3, 0x66, 0xe0, 0x77, 0xf1,
-	0x88, 0x0e, 0x99, 0x1f, 0xaa, 0x2c, 0xbb, 0x3d, 0xcc, 0x4a,
-	0xdd, 0x5b, 0xee, 0x68, 0xff, 0x79, 0x0d, 0x8b, 0x1c, 0x9a,
-	0x2f, 0xa9, 0x3e, 0xb8, 0x49, 0xcf, 0x58, 0xde, 0x6b, 0xed,
-	0x7a, 0xfc, 0x85, 0x03, 0x94, 0x12, 0xa7, 0x21, 0xb6, 0x30,
-	0xc1, 0x47, 0xd0, 0x56, 0xe3, 0x65, 0xf2, 0x74, 0x1a, 0x9c,
-	0x0b, 0x8d, 0x38, 0xbe, 0x29, 0xaf, 0x5e, 0xd8, 0x4f, 0xc9,
-	0x7c, 0xfa, 0x6d, 0xeb, 0x92, 0x14, 0x83, 0x05, 0xb0, 0x36,
-	0xa1, 0x27, 0xd6, 0x50, 0xc7, 0x41, 0xf4, 0x72, 0xe5, 0x63,
-	0x17, 0x91, 0x06, 0x80, 0x35, 0xb3, 0x24, 0xa2, 0x53, 0xd5,
-	0x42, 0xc4, 0x71, 0xf7, 0x60, 0xe6, 0x9f, 0x19, 0x8e, 0x08,
-	0xbd, 0x3b, 0xac, 0x2a, 0xdb, 0x5d, 0xca, 0x4c, 0xf9, 0x7f,
-	0xe8, 0x6e, 0x34, 0xb2, 0x25, 0xa3, 0x16, 0x90, 0x07, 0x81,
-	0x70, 0xf6, 0x61, 0xe7, 0x52, 0xd4, 0x43, 0xc5, 0xbc, 0x3a,
-	0xad, 0x2b, 0x9e, 0x18, 0x8f, 0x09, 0xf8, 0x7e, 0xe9, 0x6f,
-	0xda, 0x5c, 0xcb, 0x4d, 0x39, 0xbf, 0x28, 0xae, 0x1b, 0x9d,
-	0x0a, 0x8c, 0x7d, 0xfb, 0x6c, 0xea, 0x5f, 0xd9, 0x4e, 0xc8,
-	0xb1, 0x37, 0xa0, 0x26, 0x93, 0x15, 0x82, 0x04, 0xf5, 0x73,
-	0xe4, 0x62, 0xd7, 0x51, 0xc6, 0x40, 0x2e, 0xa8, 0x3f, 0xb9,
-	0x0c, 0x8a, 0x1d, 0x9b, 0x6a, 0xec, 0x7b, 0xfd, 0x48, 0xce,
-	0x59, 0xdf, 0xa6, 0x20, 0xb7, 0x31, 0x84, 0x02, 0x95, 0x13,
-	0xe2, 0x64, 0xf3, 0x75, 0xc0, 0x46, 0xd1, 0x57, 0x23, 0xa5,
-	0x32, 0xb4, 0x01, 0x87, 0x10, 0x96, 0x67, 0xe1, 0x76, 0xf0,
-	0x45, 0xc3, 0x54, 0xd2, 0xab, 0x2d, 0xba, 0x3c, 0x89, 0x0f,
-	0x98, 0x1e, 0xef, 0x69, 0xfe, 0x78, 0xcd, 0x4b, 0xdc, 0x5a,
-	0x00, 0x87, 0x13, 0x94, 0x26, 0xa1, 0x35, 0xb2, 0x4c, 0xcb,
-	0x5f, 0xd8, 0x6a, 0xed, 0x79, 0xfe, 0x98, 0x1f, 0x8b, 0x0c,
-	0xbe, 0x39, 0xad, 0x2a, 0xd4, 0x53, 0xc7, 0x40, 0xf2, 0x75,
-	0xe1, 0x66, 0x2d, 0xaa, 0x3e, 0xb9, 0x0b, 0x8c, 0x18, 0x9f,
-	0x61, 0xe6, 0x72, 0xf5, 0x47, 0xc0, 0x54, 0xd3, 0xb5, 0x32,
-	0xa6, 0x21, 0x93, 0x14, 0x80, 0x07, 0xf9, 0x7e, 0xea, 0x6d,
-	0xdf, 0x58, 0xcc, 0x4b, 0x5a, 0xdd, 0x49, 0xce, 0x7c, 0xfb,
-	0x6f, 0xe8, 0x16, 0x91, 0x05, 0x82, 0x30, 0xb7, 0x23, 0xa4,
-	0xc2, 0x45, 0xd1, 0x56, 0xe4, 0x63, 0xf7, 0x70, 0x8e, 0x09,
-	0x9d, 0x1a, 0xa8, 0x2f, 0xbb, 0x3c, 0x77, 0xf0, 0x64, 0xe3,
-	0x51, 0xd6, 0x42, 0xc5, 0x3b, 0xbc, 0x28, 0xaf, 0x1d, 0x9a,
-	0x0e, 0x89, 0xef, 0x68, 0xfc, 0x7b, 0xc9, 0x4e, 0xda, 0x5d,
-	0xa3, 0x24, 0xb0, 0x37, 0x85, 0x02, 0x96, 0x11, 0xb4, 0x33,
-	0xa7, 0x20, 0x92, 0x15, 0x81, 0x06, 0xf8, 0x7f, 0xeb, 0x6c,
-	0xde, 0x59, 0xcd, 0x4a, 0x2c, 0xab, 0x3f, 0xb8, 0x0a, 0x8d,
-	0x19, 0x9e, 0x60, 0xe7, 0x73, 0xf4, 0x46, 0xc1, 0x55, 0xd2,
-	0x99, 0x1e, 0x8a, 0x0d, 0xbf, 0x38, 0xac, 0x2b, 0xd5, 0x52,
-	0xc6, 0x41, 0xf3, 0x74, 0xe0, 0x67, 0x01, 0x86, 0x12, 0x95,
-	0x27, 0xa0, 0x34, 0xb3, 0x4d, 0xca, 0x5e, 0xd9, 0x6b, 0xec,
-	0x78, 0xff, 0xee, 0x69, 0xfd, 0x7a, 0xc8, 0x4f, 0xdb, 0x5c,
-	0xa2, 0x25, 0xb1, 0x36, 0x84, 0x03, 0x97, 0x10, 0x76, 0xf1,
-	0x65, 0xe2, 0x50, 0xd7, 0x43, 0xc4, 0x3a, 0xbd, 0x29, 0xae,
-	0x1c, 0x9b, 0x0f, 0x88, 0xc3, 0x44, 0xd0, 0x57, 0xe5, 0x62,
-	0xf6, 0x71, 0x8f, 0x08, 0x9c, 0x1b, 0xa9, 0x2e, 0xba, 0x3d,
-	0x5b, 0xdc, 0x48, 0xcf, 0x7d, 0xfa, 0x6e, 0xe9, 0x17, 0x90,
-	0x04, 0x83, 0x31, 0xb6, 0x22, 0xa5, 0x00, 0x88, 0x0d, 0x85,
-	0x1a, 0x92, 0x17, 0x9f, 0x34, 0xbc, 0x39, 0xb1, 0x2e, 0xa6,
-	0x23, 0xab, 0x68, 0xe0, 0x65, 0xed, 0x72, 0xfa, 0x7f, 0xf7,
-	0x5c, 0xd4, 0x51, 0xd9, 0x46, 0xce, 0x4b, 0xc3, 0xd0, 0x58,
-	0xdd, 0x55, 0xca, 0x42, 0xc7, 0x4f, 0xe4, 0x6c, 0xe9, 0x61,
-	0xfe, 0x76, 0xf3, 0x7b, 0xb8, 0x30, 0xb5, 0x3d, 0xa2, 0x2a,
-	0xaf, 0x27, 0x8c, 0x04, 0x81, 0x09, 0x96, 0x1e, 0x9b, 0x13,
-	0xbd, 0x35, 0xb0, 0x38, 0xa7, 0x2f, 0xaa, 0x22, 0x89, 0x01,
-	0x84, 0x0c, 0x93, 0x1b, 0x9e, 0x16, 0xd5, 0x5d, 0xd8, 0x50,
-	0xcf, 0x47, 0xc2, 0x4a, 0xe1, 0x69, 0xec, 0x64, 0xfb, 0x73,
-	0xf6, 0x7e, 0x6d, 0xe5, 0x60, 0xe8, 0x77, 0xff, 0x7a, 0xf2,
-	0x59, 0xd1, 0x54, 0xdc, 0x43, 0xcb, 0x4e, 0xc6, 0x05, 0x8d,
-	0x08, 0x80, 0x1f, 0x97, 0x12, 0x9a, 0x31, 0xb9, 0x3c, 0xb4,
-	0x2b, 0xa3, 0x26, 0xae, 0x67, 0xef, 0x6a, 0xe2, 0x7d, 0xf5,
-	0x70, 0xf8, 0x53, 0xdb, 0x5e, 0xd6, 0x49, 0xc1, 0x44, 0xcc,
-	0x0f, 0x87, 0x02, 0x8a, 0x15, 0x9d, 0x18, 0x90, 0x3b, 0xb3,
-	0x36, 0xbe, 0x21, 0xa9, 0x2c, 0xa4, 0xb7, 0x3f, 0xba, 0x32,
-	0xad, 0x25, 0xa0, 0x28, 0x83, 0x0b, 0x8e, 0x06, 0x99, 0x11,
-	0x94, 0x1c, 0xdf, 0x57, 0xd2, 0x5a, 0xc5, 0x4d, 0xc8, 0x40,
-	0xeb, 0x63, 0xe6, 0x6e, 0xf1, 0x79, 0xfc, 0x74, 0xda, 0x52,
-	0xd7, 0x5f, 0xc0, 0x48, 0xcd, 0x45, 0xee, 0x66, 0xe3, 0x6b,
-	0xf4, 0x7c, 0xf9, 0x71, 0xb2, 0x3a, 0xbf, 0x37, 0xa8, 0x20,
-	0xa5, 0x2d, 0x86, 0x0e, 0x8b, 0x03, 0x9c, 0x14, 0x91, 0x19,
-	0x0a, 0x82, 0x07, 0x8f, 0x10, 0x98, 0x1d, 0x95, 0x3e, 0xb6,
-	0x33, 0xbb, 0x24, 0xac, 0x29, 0xa1, 0x62, 0xea, 0x6f, 0xe7,
-	0x78, 0xf0, 0x75, 0xfd, 0x56, 0xde, 0x5b, 0xd3, 0x4c, 0xc4,
-	0x41, 0xc9, 0x00, 0x89, 0x0f, 0x86, 0x1e, 0x97, 0x11, 0x98,
-	0x3c, 0xb5, 0x33, 0xba, 0x22, 0xab, 0x2d, 0xa4, 0x78, 0xf1,
-	0x77, 0xfe, 0x66, 0xef, 0x69, 0xe0, 0x44, 0xcd, 0x4b, 0xc2,
-	0x5a, 0xd3, 0x55, 0xdc, 0xf0, 0x79, 0xff, 0x76, 0xee, 0x67,
-	0xe1, 0x68, 0xcc, 0x45, 0xc3, 0x4a, 0xd2, 0x5b, 0xdd, 0x54,
-	0x88, 0x01, 0x87, 0x0e, 0x96, 0x1f, 0x99, 0x10, 0xb4, 0x3d,
-	0xbb, 0x32, 0xaa, 0x23, 0xa5, 0x2c, 0xfd, 0x74, 0xf2, 0x7b,
-	0xe3, 0x6a, 0xec, 0x65, 0xc1, 0x48, 0xce, 0x47, 0xdf, 0x56,
-	0xd0, 0x59, 0x85, 0x0c, 0x8a, 0x03, 0x9b, 0x12, 0x94, 0x1d,
-	0xb9, 0x30, 0xb6, 0x3f, 0xa7, 0x2e, 0xa8, 0x21, 0x0d, 0x84,
-	0x02, 0x8b, 0x13, 0x9a, 0x1c, 0x95, 0x31, 0xb8, 0x3e, 0xb7,
-	0x2f, 0xa6, 0x20, 0xa9, 0x75, 0xfc, 0x7a, 0xf3, 0x6b, 0xe2,
-	0x64, 0xed, 0x49, 0xc0, 0x46, 0xcf, 0x57, 0xde, 0x58, 0xd1,
-	0xe7, 0x6e, 0xe8, 0x61, 0xf9, 0x70, 0xf6, 0x7f, 0xdb, 0x52,
-	0xd4, 0x5d, 0xc5, 0x4c, 0xca, 0x43, 0x9f, 0x16, 0x90, 0x19,
-	0x81, 0x08, 0x8e, 0x07, 0xa3, 0x2a, 0xac, 0x25, 0xbd, 0x34,
-	0xb2, 0x3b, 0x17, 0x9e, 0x18, 0x91, 0x09, 0x80, 0x06, 0x8f,
-	0x2b, 0xa2, 0x24, 0xad, 0x35, 0xbc, 0x3a, 0xb3, 0x6f, 0xe6,
-	0x60, 0xe9, 0x71, 0xf8, 0x7e, 0xf7, 0x53, 0xda, 0x5c, 0xd5,
-	0x4d, 0xc4, 0x42, 0xcb, 0x1a, 0x93, 0x15, 0x9c, 0x04, 0x8d,
-	0x0b, 0x82, 0x26, 0xaf, 0x29, 0xa0, 0x38, 0xb1, 0x37, 0xbe,
-	0x62, 0xeb, 0x6d, 0xe4, 0x7c, 0xf5, 0x73, 0xfa, 0x5e, 0xd7,
-	0x51, 0xd8, 0x40, 0xc9, 0x4f, 0xc6, 0xea, 0x63, 0xe5, 0x6c,
-	0xf4, 0x7d, 0xfb, 0x72, 0xd6, 0x5f, 0xd9, 0x50, 0xc8, 0x41,
-	0xc7, 0x4e, 0x92, 0x1b, 0x9d, 0x14, 0x8c, 0x05, 0x83, 0x0a,
-	0xae, 0x27, 0xa1, 0x28, 0xb0, 0x39, 0xbf, 0x36, 0x00, 0x8a,
-	0x09, 0x83, 0x12, 0x98, 0x1b, 0x91, 0x24, 0xae, 0x2d, 0xa7,
-	0x36, 0xbc, 0x3f, 0xb5, 0x48, 0xc2, 0x41, 0xcb, 0x5a, 0xd0,
-	0x53, 0xd9, 0x6c, 0xe6, 0x65, 0xef, 0x7e, 0xf4, 0x77, 0xfd,
-	0x90, 0x1a, 0x99, 0x13, 0x82, 0x08, 0x8b, 0x01, 0xb4, 0x3e,
-	0xbd, 0x37, 0xa6, 0x2c, 0xaf, 0x25, 0xd8, 0x52, 0xd1, 0x5b,
-	0xca, 0x40, 0xc3, 0x49, 0xfc, 0x76, 0xf5, 0x7f, 0xee, 0x64,
-	0xe7, 0x6d, 0x3d, 0xb7, 0x34, 0xbe, 0x2f, 0xa5, 0x26, 0xac,
-	0x19, 0x93, 0x10, 0x9a, 0x0b, 0x81, 0x02, 0x88, 0x75, 0xff,
-	0x7c, 0xf6, 0x67, 0xed, 0x6e, 0xe4, 0x51, 0xdb, 0x58, 0xd2,
-	0x43, 0xc9, 0x4a, 0xc0, 0xad, 0x27, 0xa4, 0x2e, 0xbf, 0x35,
-	0xb6, 0x3c, 0x89, 0x03, 0x80, 0x0a, 0x9b, 0x11, 0x92, 0x18,
-	0xe5, 0x6f, 0xec, 0x66, 0xf7, 0x7d, 0xfe, 0x74, 0xc1, 0x4b,
-	0xc8, 0x42, 0xd3, 0x59, 0xda, 0x50, 0x7a, 0xf0, 0x73, 0xf9,
-	0x68, 0xe2, 0x61, 0xeb, 0x5e, 0xd4, 0x57, 0xdd, 0x4c, 0xc6,
-	0x45, 0xcf, 0x32, 0xb8, 0x3b, 0xb1, 0x20, 0xaa, 0x29, 0xa3,
-	0x16, 0x9c, 0x1f, 0x95, 0x04, 0x8e, 0x0d, 0x87, 0xea, 0x60,
-	0xe3, 0x69, 0xf8, 0x72, 0xf1, 0x7b, 0xce, 0x44, 0xc7, 0x4d,
-	0xdc, 0x56, 0xd5, 0x5f, 0xa2, 0x28, 0xab, 0x21, 0xb0, 0x3a,
-	0xb9, 0x33, 0x86, 0x0c, 0x8f, 0x05, 0x94, 0x1e, 0x9d, 0x17,
-	0x47, 0xcd, 0x4e, 0xc4, 0x55, 0xdf, 0x5c, 0xd6, 0x63, 0xe9,
-	0x6a, 0xe0, 0x71, 0xfb, 0x78, 0xf2, 0x0f, 0x85, 0x06, 0x8c,
-	0x1d, 0x97, 0x14, 0x9e, 0x2b, 0xa1, 0x22, 0xa8, 0x39, 0xb3,
-	0x30, 0xba, 0xd7, 0x5d, 0xde, 0x54, 0xc5, 0x4f, 0xcc, 0x46,
-	0xf3, 0x79, 0xfa, 0x70, 0xe1, 0x6b, 0xe8, 0x62, 0x9f, 0x15,
-	0x96, 0x1c, 0x8d, 0x07, 0x84, 0x0e, 0xbb, 0x31, 0xb2, 0x38,
-	0xa9, 0x23, 0xa0, 0x2a, 0x00, 0x8b, 0x0b, 0x80, 0x16, 0x9d,
-	0x1d, 0x96, 0x2c, 0xa7, 0x27, 0xac, 0x3a, 0xb1, 0x31, 0xba,
-	0x58, 0xd3, 0x53, 0xd8, 0x4e, 0xc5, 0x45, 0xce, 0x74, 0xff,
-	0x7f, 0xf4, 0x62, 0xe9, 0x69, 0xe2, 0xb0, 0x3b, 0xbb, 0x30,
-	0xa6, 0x2d, 0xad, 0x26, 0x9c, 0x17, 0x97, 0x1c, 0x8a, 0x01,
-	0x81, 0x0a, 0xe8, 0x63, 0xe3, 0x68, 0xfe, 0x75, 0xf5, 0x7e,
-	0xc4, 0x4f, 0xcf, 0x44, 0xd2, 0x59, 0xd9, 0x52, 0x7d, 0xf6,
-	0x76, 0xfd, 0x6b, 0xe0, 0x60, 0xeb, 0x51, 0xda, 0x5a, 0xd1,
-	0x47, 0xcc, 0x4c, 0xc7, 0x25, 0xae, 0x2e, 0xa5, 0x33, 0xb8,
-	0x38, 0xb3, 0x09, 0x82, 0x02, 0x89, 0x1f, 0x94, 0x14, 0x9f,
-	0xcd, 0x46, 0xc6, 0x4d, 0xdb, 0x50, 0xd0, 0x5b, 0xe1, 0x6a,
-	0xea, 0x61, 0xf7, 0x7c, 0xfc, 0x77, 0x95, 0x1e, 0x9e, 0x15,
-	0x83, 0x08, 0x88, 0x03, 0xb9, 0x32, 0xb2, 0x39, 0xaf, 0x24,
-	0xa4, 0x2f, 0xfa, 0x71, 0xf1, 0x7a, 0xec, 0x67, 0xe7, 0x6c,
-	0xd6, 0x5d, 0xdd, 0x56, 0xc0, 0x4b, 0xcb, 0x40, 0xa2, 0x29,
-	0xa9, 0x22, 0xb4, 0x3f, 0xbf, 0x34, 0x8e, 0x05, 0x85, 0x0e,
-	0x98, 0x13, 0x93, 0x18, 0x4a, 0xc1, 0x41, 0xca, 0x5c, 0xd7,
-	0x57, 0xdc, 0x66, 0xed, 0x6d, 0xe6, 0x70, 0xfb, 0x7b, 0xf0,
-	0x12, 0x99, 0x19, 0x92, 0x04, 0x8f, 0x0f, 0x84, 0x3e, 0xb5,
-	0x35, 0xbe, 0x28, 0xa3, 0x23, 0xa8, 0x87, 0x0c, 0x8c, 0x07,
-	0x91, 0x1a, 0x9a, 0x11, 0xab, 0x20, 0xa0, 0x2b, 0xbd, 0x36,
-	0xb6, 0x3d, 0xdf, 0x54, 0xd4, 0x5f, 0xc9, 0x42, 0xc2, 0x49,
-	0xf3, 0x78, 0xf8, 0x73, 0xe5, 0x6e, 0xee, 0x65, 0x37, 0xbc,
-	0x3c, 0xb7, 0x21, 0xaa, 0x2a, 0xa1, 0x1b, 0x90, 0x10, 0x9b,
-	0x0d, 0x86, 0x06, 0x8d, 0x6f, 0xe4, 0x64, 0xef, 0x79, 0xf2,
-	0x72, 0xf9, 0x43, 0xc8, 0x48, 0xc3, 0x55, 0xde, 0x5e, 0xd5,
-	0x00, 0x8c, 0x05, 0x89, 0x0a, 0x86, 0x0f, 0x83, 0x14, 0x98,
-	0x11, 0x9d, 0x1e, 0x92, 0x1b, 0x97, 0x28, 0xa4, 0x2d, 0xa1,
-	0x22, 0xae, 0x27, 0xab, 0x3c, 0xb0, 0x39, 0xb5, 0x36, 0xba,
-	0x33, 0xbf, 0x50, 0xdc, 0x55, 0xd9, 0x5a, 0xd6, 0x5f, 0xd3,
-	0x44, 0xc8, 0x41, 0xcd, 0x4e, 0xc2, 0x4b, 0xc7, 0x78, 0xf4,
-	0x7d, 0xf1, 0x72, 0xfe, 0x77, 0xfb, 0x6c, 0xe0, 0x69, 0xe5,
-	0x66, 0xea, 0x63, 0xef, 0xa0, 0x2c, 0xa5, 0x29, 0xaa, 0x26,
-	0xaf, 0x23, 0xb4, 0x38, 0xb1, 0x3d, 0xbe, 0x32, 0xbb, 0x37,
-	0x88, 0x04, 0x8d, 0x01, 0x82, 0x0e, 0x87, 0x0b, 0x9c, 0x10,
-	0x99, 0x15, 0x96, 0x1a, 0x93, 0x1f, 0xf0, 0x7c, 0xf5, 0x79,
-	0xfa, 0x76, 0xff, 0x73, 0xe4, 0x68, 0xe1, 0x6d, 0xee, 0x62,
-	0xeb, 0x67, 0xd8, 0x54, 0xdd, 0x51, 0xd2, 0x5e, 0xd7, 0x5b,
-	0xcc, 0x40, 0xc9, 0x45, 0xc6, 0x4a, 0xc3, 0x4f, 0x5d, 0xd1,
-	0x58, 0xd4, 0x57, 0xdb, 0x52, 0xde, 0x49, 0xc5, 0x4c, 0xc0,
-	0x43, 0xcf, 0x46, 0xca, 0x75, 0xf9, 0x70, 0xfc, 0x7f, 0xf3,
-	0x7a, 0xf6, 0x61, 0xed, 0x64, 0xe8, 0x6b, 0xe7, 0x6e, 0xe2,
-	0x0d, 0x81, 0x08, 0x84, 0x07, 0x8b, 0x02, 0x8e, 0x19, 0x95,
-	0x1c, 0x90, 0x13, 0x9f, 0x16, 0x9a, 0x25, 0xa9, 0x20, 0xac,
-	0x2f, 0xa3, 0x2a, 0xa6, 0x31, 0xbd, 0x34, 0xb8, 0x3b, 0xb7,
-	0x3e, 0xb2, 0xfd, 0x71, 0xf8, 0x74, 0xf7, 0x7b, 0xf2, 0x7e,
-	0xe9, 0x65, 0xec, 0x60, 0xe3, 0x6f, 0xe6, 0x6a, 0xd5, 0x59,
-	0xd0, 0x5c, 0xdf, 0x53, 0xda, 0x56, 0xc1, 0x4d, 0xc4, 0x48,
-	0xcb, 0x47, 0xce, 0x42, 0xad, 0x21, 0xa8, 0x24, 0xa7, 0x2b,
-	0xa2, 0x2e, 0xb9, 0x35, 0xbc, 0x30, 0xb3, 0x3f, 0xb6, 0x3a,
-	0x85, 0x09, 0x80, 0x0c, 0x8f, 0x03, 0x8a, 0x06, 0x91, 0x1d,
-	0x94, 0x18, 0x9b, 0x17, 0x9e, 0x12, 0x00, 0x8d, 0x07, 0x8a,
-	0x0e, 0x83, 0x09, 0x84, 0x1c, 0x91, 0x1b, 0x96, 0x12, 0x9f,
-	0x15, 0x98, 0x38, 0xb5, 0x3f, 0xb2, 0x36, 0xbb, 0x31, 0xbc,
-	0x24, 0xa9, 0x23, 0xae, 0x2a, 0xa7, 0x2d, 0xa0, 0x70, 0xfd,
-	0x77, 0xfa, 0x7e, 0xf3, 0x79, 0xf4, 0x6c, 0xe1, 0x6b, 0xe6,
-	0x62, 0xef, 0x65, 0xe8, 0x48, 0xc5, 0x4f, 0xc2, 0x46, 0xcb,
-	0x41, 0xcc, 0x54, 0xd9, 0x53, 0xde, 0x5a, 0xd7, 0x5d, 0xd0,
-	0xe0, 0x6d, 0xe7, 0x6a, 0xee, 0x63, 0xe9, 0x64, 0xfc, 0x71,
-	0xfb, 0x76, 0xf2, 0x7f, 0xf5, 0x78, 0xd8, 0x55, 0xdf, 0x52,
-	0xd6, 0x5b, 0xd1, 0x5c, 0xc4, 0x49, 0xc3, 0x4e, 0xca, 0x47,
-	0xcd, 0x40, 0x90, 0x1d, 0x97, 0x1a, 0x9e, 0x13, 0x99, 0x14,
-	0x8c, 0x01, 0x8b, 0x06, 0x82, 0x0f, 0x85, 0x08, 0xa8, 0x25,
-	0xaf, 0x22, 0xa6, 0x2b, 0xa1, 0x2c, 0xb4, 0x39, 0xb3, 0x3e,
-	0xba, 0x37, 0xbd, 0x30, 0xdd, 0x50, 0xda, 0x57, 0xd3, 0x5e,
-	0xd4, 0x59, 0xc1, 0x4c, 0xc6, 0x4b, 0xcf, 0x42, 0xc8, 0x45,
-	0xe5, 0x68, 0xe2, 0x6f, 0xeb, 0x66, 0xec, 0x61, 0xf9, 0x74,
-	0xfe, 0x73, 0xf7, 0x7a, 0xf0, 0x7d, 0xad, 0x20, 0xaa, 0x27,
-	0xa3, 0x2e, 0xa4, 0x29, 0xb1, 0x3c, 0xb6, 0x3b, 0xbf, 0x32,
-	0xb8, 0x35, 0x95, 0x18, 0x92, 0x1f, 0x9b, 0x16, 0x9c, 0x11,
-	0x89, 0x04, 0x8e, 0x03, 0x87, 0x0a, 0x80, 0x0d, 0x3d, 0xb0,
-	0x3a, 0xb7, 0x33, 0xbe, 0x34, 0xb9, 0x21, 0xac, 0x26, 0xab,
-	0x2f, 0xa2, 0x28, 0xa5, 0x05, 0x88, 0x02, 0x8f, 0x0b, 0x86,
-	0x0c, 0x81, 0x19, 0x94, 0x1e, 0x93, 0x17, 0x9a, 0x10, 0x9d,
-	0x4d, 0xc0, 0x4a, 0xc7, 0x43, 0xce, 0x44, 0xc9, 0x51, 0xdc,
-	0x56, 0xdb, 0x5f, 0xd2, 0x58, 0xd5, 0x75, 0xf8, 0x72, 0xff,
-	0x7b, 0xf6, 0x7c, 0xf1, 0x69, 0xe4, 0x6e, 0xe3, 0x67, 0xea,
-	0x60, 0xed, 0x00, 0x8e, 0x01, 0x8f, 0x02, 0x8c, 0x03, 0x8d,
-	0x04, 0x8a, 0x05, 0x8b, 0x06, 0x88, 0x07, 0x89, 0x08, 0x86,
-	0x09, 0x87, 0x0a, 0x84, 0x0b, 0x85, 0x0c, 0x82, 0x0d, 0x83,
-	0x0e, 0x80, 0x0f, 0x81, 0x10, 0x9e, 0x11, 0x9f, 0x12, 0x9c,
-	0x13, 0x9d, 0x14, 0x9a, 0x15, 0x9b, 0x16, 0x98, 0x17, 0x99,
-	0x18, 0x96, 0x19, 0x97, 0x1a, 0x94, 0x1b, 0x95, 0x1c, 0x92,
-	0x1d, 0x93, 0x1e, 0x90, 0x1f, 0x91, 0x20, 0xae, 0x21, 0xaf,
-	0x22, 0xac, 0x23, 0xad, 0x24, 0xaa, 0x25, 0xab, 0x26, 0xa8,
-	0x27, 0xa9, 0x28, 0xa6, 0x29, 0xa7, 0x2a, 0xa4, 0x2b, 0xa5,
-	0x2c, 0xa2, 0x2d, 0xa3, 0x2e, 0xa0, 0x2f, 0xa1, 0x30, 0xbe,
-	0x31, 0xbf, 0x32, 0xbc, 0x33, 0xbd, 0x34, 0xba, 0x35, 0xbb,
-	0x36, 0xb8, 0x37, 0xb9, 0x38, 0xb6, 0x39, 0xb7, 0x3a, 0xb4,
-	0x3b, 0xb5, 0x3c, 0xb2, 0x3d, 0xb3, 0x3e, 0xb0, 0x3f, 0xb1,
-	0x40, 0xce, 0x41, 0xcf, 0x42, 0xcc, 0x43, 0xcd, 0x44, 0xca,
-	0x45, 0xcb, 0x46, 0xc8, 0x47, 0xc9, 0x48, 0xc6, 0x49, 0xc7,
-	0x4a, 0xc4, 0x4b, 0xc5, 0x4c, 0xc2, 0x4d, 0xc3, 0x4e, 0xc0,
-	0x4f, 0xc1, 0x50, 0xde, 0x51, 0xdf, 0x52, 0xdc, 0x53, 0xdd,
-	0x54, 0xda, 0x55, 0xdb, 0x56, 0xd8, 0x57, 0xd9, 0x58, 0xd6,
-	0x59, 0xd7, 0x5a, 0xd4, 0x5b, 0xd5, 0x5c, 0xd2, 0x5d, 0xd3,
-	0x5e, 0xd0, 0x5f, 0xd1, 0x60, 0xee, 0x61, 0xef, 0x62, 0xec,
-	0x63, 0xed, 0x64, 0xea, 0x65, 0xeb, 0x66, 0xe8, 0x67, 0xe9,
-	0x68, 0xe6, 0x69, 0xe7, 0x6a, 0xe4, 0x6b, 0xe5, 0x6c, 0xe2,
-	0x6d, 0xe3, 0x6e, 0xe0, 0x6f, 0xe1, 0x70, 0xfe, 0x71, 0xff,
-	0x72, 0xfc, 0x73, 0xfd, 0x74, 0xfa, 0x75, 0xfb, 0x76, 0xf8,
-	0x77, 0xf9, 0x78, 0xf6, 0x79, 0xf7, 0x7a, 0xf4, 0x7b, 0xf5,
-	0x7c, 0xf2, 0x7d, 0xf3, 0x7e, 0xf0, 0x7f, 0xf1, 0x00, 0x8f,
-	0x03, 0x8c, 0x06, 0x89, 0x05, 0x8a, 0x0c, 0x83, 0x0f, 0x80,
-	0x0a, 0x85, 0x09, 0x86, 0x18, 0x97, 0x1b, 0x94, 0x1e, 0x91,
-	0x1d, 0x92, 0x14, 0x9b, 0x17, 0x98, 0x12, 0x9d, 0x11, 0x9e,
-	0x30, 0xbf, 0x33, 0xbc, 0x36, 0xb9, 0x35, 0xba, 0x3c, 0xb3,
-	0x3f, 0xb0, 0x3a, 0xb5, 0x39, 0xb6, 0x28, 0xa7, 0x2b, 0xa4,
-	0x2e, 0xa1, 0x2d, 0xa2, 0x24, 0xab, 0x27, 0xa8, 0x22, 0xad,
-	0x21, 0xae, 0x60, 0xef, 0x63, 0xec, 0x66, 0xe9, 0x65, 0xea,
-	0x6c, 0xe3, 0x6f, 0xe0, 0x6a, 0xe5, 0x69, 0xe6, 0x78, 0xf7,
-	0x7b, 0xf4, 0x7e, 0xf1, 0x7d, 0xf2, 0x74, 0xfb, 0x77, 0xf8,
-	0x72, 0xfd, 0x71, 0xfe, 0x50, 0xdf, 0x53, 0xdc, 0x56, 0xd9,
-	0x55, 0xda, 0x5c, 0xd3, 0x5f, 0xd0, 0x5a, 0xd5, 0x59, 0xd6,
-	0x48, 0xc7, 0x4b, 0xc4, 0x4e, 0xc1, 0x4d, 0xc2, 0x44, 0xcb,
-	0x47, 0xc8, 0x42, 0xcd, 0x41, 0xce, 0xc0, 0x4f, 0xc3, 0x4c,
-	0xc6, 0x49, 0xc5, 0x4a, 0xcc, 0x43, 0xcf, 0x40, 0xca, 0x45,
-	0xc9, 0x46, 0xd8, 0x57, 0xdb, 0x54, 0xde, 0x51, 0xdd, 0x52,
-	0xd4, 0x5b, 0xd7, 0x58, 0xd2, 0x5d, 0xd1, 0x5e, 0xf0, 0x7f,
-	0xf3, 0x7c, 0xf6, 0x79, 0xf5, 0x7a, 0xfc, 0x73, 0xff, 0x70,
-	0xfa, 0x75, 0xf9, 0x76, 0xe8, 0x67, 0xeb, 0x64, 0xee, 0x61,
-	0xed, 0x62, 0xe4, 0x6b, 0xe7, 0x68, 0xe2, 0x6d, 0xe1, 0x6e,
-	0xa0, 0x2f, 0xa3, 0x2c, 0xa6, 0x29, 0xa5, 0x2a, 0xac, 0x23,
-	0xaf, 0x20, 0xaa, 0x25, 0xa9, 0x26, 0xb8, 0x37, 0xbb, 0x34,
-	0xbe, 0x31, 0xbd, 0x32, 0xb4, 0x3b, 0xb7, 0x38, 0xb2, 0x3d,
-	0xb1, 0x3e, 0x90, 0x1f, 0x93, 0x1c, 0x96, 0x19, 0x95, 0x1a,
-	0x9c, 0x13, 0x9f, 0x10, 0x9a, 0x15, 0x99, 0x16, 0x88, 0x07,
-	0x8b, 0x04, 0x8e, 0x01, 0x8d, 0x02, 0x84, 0x0b, 0x87, 0x08,
-	0x82, 0x0d, 0x81, 0x0e, 0x00, 0x90, 0x3d, 0xad, 0x7a, 0xea,
-	0x47, 0xd7, 0xf4, 0x64, 0xc9, 0x59, 0x8e, 0x1e, 0xb3, 0x23,
-	0xf5, 0x65, 0xc8, 0x58, 0x8f, 0x1f, 0xb2, 0x22, 0x01, 0x91,
-	0x3c, 0xac, 0x7b, 0xeb, 0x46, 0xd6, 0xf7, 0x67, 0xca, 0x5a,
-	0x8d, 0x1d, 0xb0, 0x20, 0x03, 0x93, 0x3e, 0xae, 0x79, 0xe9,
-	0x44, 0xd4, 0x02, 0x92, 0x3f, 0xaf, 0x78, 0xe8, 0x45, 0xd5,
-	0xf6, 0x66, 0xcb, 0x5b, 0x8c, 0x1c, 0xb1, 0x21, 0xf3, 0x63,
-	0xce, 0x5e, 0x89, 0x19, 0xb4, 0x24, 0x07, 0x97, 0x3a, 0xaa,
-	0x7d, 0xed, 0x40, 0xd0, 0x06, 0x96, 0x3b, 0xab, 0x7c, 0xec,
-	0x41, 0xd1, 0xf2, 0x62, 0xcf, 0x5f, 0x88, 0x18, 0xb5, 0x25,
-	0x04, 0x94, 0x39, 0xa9, 0x7e, 0xee, 0x43, 0xd3, 0xf0, 0x60,
-	0xcd, 0x5d, 0x8a, 0x1a, 0xb7, 0x27, 0xf1, 0x61, 0xcc, 0x5c,
-	0x8b, 0x1b, 0xb6, 0x26, 0x05, 0x95, 0x38, 0xa8, 0x7f, 0xef,
-	0x42, 0xd2, 0xfb, 0x6b, 0xc6, 0x56, 0x81, 0x11, 0xbc, 0x2c,
-	0x0f, 0x9f, 0x32, 0xa2, 0x75, 0xe5, 0x48, 0xd8, 0x0e, 0x9e,
-	0x33, 0xa3, 0x74, 0xe4, 0x49, 0xd9, 0xfa, 0x6a, 0xc7, 0x57,
-	0x80, 0x10, 0xbd, 0x2d, 0x0c, 0x9c, 0x31, 0xa1, 0x76, 0xe6,
-	0x4b, 0xdb, 0xf8, 0x68, 0xc5, 0x55, 0x82, 0x12, 0xbf, 0x2f,
-	0xf9, 0x69, 0xc4, 0x54, 0x83, 0x13, 0xbe, 0x2e, 0x0d, 0x9d,
-	0x30, 0xa0, 0x77, 0xe7, 0x4a, 0xda, 0x08, 0x98, 0x35, 0xa5,
-	0x72, 0xe2, 0x4f, 0xdf, 0xfc, 0x6c, 0xc1, 0x51, 0x86, 0x16,
-	0xbb, 0x2b, 0xfd, 0x6d, 0xc0, 0x50, 0x87, 0x17, 0xba, 0x2a,
-	0x09, 0x99, 0x34, 0xa4, 0x73, 0xe3, 0x4e, 0xde, 0xff, 0x6f,
-	0xc2, 0x52, 0x85, 0x15, 0xb8, 0x28, 0x0b, 0x9b, 0x36, 0xa6,
-	0x71, 0xe1, 0x4c, 0xdc, 0x0a, 0x9a, 0x37, 0xa7, 0x70, 0xe0,
-	0x4d, 0xdd, 0xfe, 0x6e, 0xc3, 0x53, 0x84, 0x14, 0xb9, 0x29,
-	0x00, 0x91, 0x3f, 0xae, 0x7e, 0xef, 0x41, 0xd0, 0xfc, 0x6d,
-	0xc3, 0x52, 0x82, 0x13, 0xbd, 0x2c, 0xe5, 0x74, 0xda, 0x4b,
-	0x9b, 0x0a, 0xa4, 0x35, 0x19, 0x88, 0x26, 0xb7, 0x67, 0xf6,
-	0x58, 0xc9, 0xd7, 0x46, 0xe8, 0x79, 0xa9, 0x38, 0x96, 0x07,
-	0x2b, 0xba, 0x14, 0x85, 0x55, 0xc4, 0x6a, 0xfb, 0x32, 0xa3,
-	0x0d, 0x9c, 0x4c, 0xdd, 0x73, 0xe2, 0xce, 0x5f, 0xf1, 0x60,
-	0xb0, 0x21, 0x8f, 0x1e, 0xb3, 0x22, 0x8c, 0x1d, 0xcd, 0x5c,
-	0xf2, 0x63, 0x4f, 0xde, 0x70, 0xe1, 0x31, 0xa0, 0x0e, 0x9f,
-	0x56, 0xc7, 0x69, 0xf8, 0x28, 0xb9, 0x17, 0x86, 0xaa, 0x3b,
-	0x95, 0x04, 0xd4, 0x45, 0xeb, 0x7a, 0x64, 0xf5, 0x5b, 0xca,
-	0x1a, 0x8b, 0x25, 0xb4, 0x98, 0x09, 0xa7, 0x36, 0xe6, 0x77,
-	0xd9, 0x48, 0x81, 0x10, 0xbe, 0x2f, 0xff, 0x6e, 0xc0, 0x51,
-	0x7d, 0xec, 0x42, 0xd3, 0x03, 0x92, 0x3c, 0xad, 0x7b, 0xea,
-	0x44, 0xd5, 0x05, 0x94, 0x3a, 0xab, 0x87, 0x16, 0xb8, 0x29,
-	0xf9, 0x68, 0xc6, 0x57, 0x9e, 0x0f, 0xa1, 0x30, 0xe0, 0x71,
-	0xdf, 0x4e, 0x62, 0xf3, 0x5d, 0xcc, 0x1c, 0x8d, 0x23, 0xb2,
-	0xac, 0x3d, 0x93, 0x02, 0xd2, 0x43, 0xed, 0x7c, 0x50, 0xc1,
-	0x6f, 0xfe, 0x2e, 0xbf, 0x11, 0x80, 0x49, 0xd8, 0x76, 0xe7,
-	0x37, 0xa6, 0x08, 0x99, 0xb5, 0x24, 0x8a, 0x1b, 0xcb, 0x5a,
-	0xf4, 0x65, 0xc8, 0x59, 0xf7, 0x66, 0xb6, 0x27, 0x89, 0x18,
-	0x34, 0xa5, 0x0b, 0x9a, 0x4a, 0xdb, 0x75, 0xe4, 0x2d, 0xbc,
-	0x12, 0x83, 0x53, 0xc2, 0x6c, 0xfd, 0xd1, 0x40, 0xee, 0x7f,
-	0xaf, 0x3e, 0x90, 0x01, 0x1f, 0x8e, 0x20, 0xb1, 0x61, 0xf0,
-	0x5e, 0xcf, 0xe3, 0x72, 0xdc, 0x4d, 0x9d, 0x0c, 0xa2, 0x33,
-	0xfa, 0x6b, 0xc5, 0x54, 0x84, 0x15, 0xbb, 0x2a, 0x06, 0x97,
-	0x39, 0xa8, 0x78, 0xe9, 0x47, 0xd6, 0x00, 0x92, 0x39, 0xab,
-	0x72, 0xe0, 0x4b, 0xd9, 0xe4, 0x76, 0xdd, 0x4f, 0x96, 0x04,
-	0xaf, 0x3d, 0xd5, 0x47, 0xec, 0x7e, 0xa7, 0x35, 0x9e, 0x0c,
-	0x31, 0xa3, 0x08, 0x9a, 0x43, 0xd1, 0x7a, 0xe8, 0xb7, 0x25,
-	0x8e, 0x1c, 0xc5, 0x57, 0xfc, 0x6e, 0x53, 0xc1, 0x6a, 0xf8,
-	0x21, 0xb3, 0x18, 0x8a, 0x62, 0xf0, 0x5b, 0xc9, 0x10, 0x82,
-	0x29, 0xbb, 0x86, 0x14, 0xbf, 0x2d, 0xf4, 0x66, 0xcd, 0x5f,
-	0x73, 0xe1, 0x4a, 0xd8, 0x01, 0x93, 0x38, 0xaa, 0x97, 0x05,
-	0xae, 0x3c, 0xe5, 0x77, 0xdc, 0x4e, 0xa6, 0x34, 0x9f, 0x0d,
-	0xd4, 0x46, 0xed, 0x7f, 0x42, 0xd0, 0x7b, 0xe9, 0x30, 0xa2,
-	0x09, 0x9b, 0xc4, 0x56, 0xfd, 0x6f, 0xb6, 0x24, 0x8f, 0x1d,
-	0x20, 0xb2, 0x19, 0x8b, 0x52, 0xc0, 0x6b, 0xf9, 0x11, 0x83,
-	0x28, 0xba, 0x63, 0xf1, 0x5a, 0xc8, 0xf5, 0x67, 0xcc, 0x5e,
-	0x87, 0x15, 0xbe, 0x2c, 0xe6, 0x74, 0xdf, 0x4d, 0x94, 0x06,
-	0xad, 0x3f, 0x02, 0x90, 0x3b, 0xa9, 0x70, 0xe2, 0x49, 0xdb,
-	0x33, 0xa1, 0x0a, 0x98, 0x41, 0xd3, 0x78, 0xea, 0xd7, 0x45,
-	0xee, 0x7c, 0xa5, 0x37, 0x9c, 0x0e, 0x51, 0xc3, 0x68, 0xfa,
-	0x23, 0xb1, 0x1a, 0x88, 0xb5, 0x27, 0x8c, 0x1e, 0xc7, 0x55,
-	0xfe, 0x6c, 0x84, 0x16, 0xbd, 0x2f, 0xf6, 0x64, 0xcf, 0x5d,
-	0x60, 0xf2, 0x59, 0xcb, 0x12, 0x80, 0x2b, 0xb9, 0x95, 0x07,
-	0xac, 0x3e, 0xe7, 0x75, 0xde, 0x4c, 0x71, 0xe3, 0x48, 0xda,
-	0x03, 0x91, 0x3a, 0xa8, 0x40, 0xd2, 0x79, 0xeb, 0x32, 0xa0,
-	0x0b, 0x99, 0xa4, 0x36, 0x9d, 0x0f, 0xd6, 0x44, 0xef, 0x7d,
-	0x22, 0xb0, 0x1b, 0x89, 0x50, 0xc2, 0x69, 0xfb, 0xc6, 0x54,
-	0xff, 0x6d, 0xb4, 0x26, 0x8d, 0x1f, 0xf7, 0x65, 0xce, 0x5c,
-	0x85, 0x17, 0xbc, 0x2e, 0x13, 0x81, 0x2a, 0xb8, 0x61, 0xf3,
-	0x58, 0xca, 0x00, 0x93, 0x3b, 0xa8, 0x76, 0xe5, 0x4d, 0xde,
-	0xec, 0x7f, 0xd7, 0x44, 0x9a, 0x09, 0xa1, 0x32, 0xc5, 0x56,
-	0xfe, 0x6d, 0xb3, 0x20, 0x88, 0x1b, 0x29, 0xba, 0x12, 0x81,
-	0x5f, 0xcc, 0x64, 0xf7, 0x97, 0x04, 0xac, 0x3f, 0xe1, 0x72,
-	0xda, 0x49, 0x7b, 0xe8, 0x40, 0xd3, 0x0d, 0x9e, 0x36, 0xa5,
-	0x52, 0xc1, 0x69, 0xfa, 0x24, 0xb7, 0x1f, 0x8c, 0xbe, 0x2d,
-	0x85, 0x16, 0xc8, 0x5b, 0xf3, 0x60, 0x33, 0xa0, 0x08, 0x9b,
-	0x45, 0xd6, 0x7e, 0xed, 0xdf, 0x4c, 0xe4, 0x77, 0xa9, 0x3a,
-	0x92, 0x01, 0xf6, 0x65, 0xcd, 0x5e, 0x80, 0x13, 0xbb, 0x28,
-	0x1a, 0x89, 0x21, 0xb2, 0x6c, 0xff, 0x57, 0xc4, 0xa4, 0x37,
-	0x9f, 0x0c, 0xd2, 0x41, 0xe9, 0x7a, 0x48, 0xdb, 0x73, 0xe0,
-	0x3e, 0xad, 0x05, 0x96, 0x61, 0xf2, 0x5a, 0xc9, 0x17, 0x84,
-	0x2c, 0xbf, 0x8d, 0x1e, 0xb6, 0x25, 0xfb, 0x68, 0xc0, 0x53,
-	0x66, 0xf5, 0x5d, 0xce, 0x10, 0x83, 0x2b, 0xb8, 0x8a, 0x19,
-	0xb1, 0x22, 0xfc, 0x6f, 0xc7, 0x54, 0xa3, 0x30, 0x98, 0x0b,
-	0xd5, 0x46, 0xee, 0x7d, 0x4f, 0xdc, 0x74, 0xe7, 0x39, 0xaa,
-	0x02, 0x91, 0xf1, 0x62, 0xca, 0x59, 0x87, 0x14, 0xbc, 0x2f,
-	0x1d, 0x8e, 0x26, 0xb5, 0x6b, 0xf8, 0x50, 0xc3, 0x34, 0xa7,
-	0x0f, 0x9c, 0x42, 0xd1, 0x79, 0xea, 0xd8, 0x4b, 0xe3, 0x70,
-	0xae, 0x3d, 0x95, 0x06, 0x55, 0xc6, 0x6e, 0xfd, 0x23, 0xb0,
-	0x18, 0x8b, 0xb9, 0x2a, 0x82, 0x11, 0xcf, 0x5c, 0xf4, 0x67,
-	0x90, 0x03, 0xab, 0x38, 0xe6, 0x75, 0xdd, 0x4e, 0x7c, 0xef,
-	0x47, 0xd4, 0x0a, 0x99, 0x31, 0xa2, 0xc2, 0x51, 0xf9, 0x6a,
-	0xb4, 0x27, 0x8f, 0x1c, 0x2e, 0xbd, 0x15, 0x86, 0x58, 0xcb,
-	0x63, 0xf0, 0x07, 0x94, 0x3c, 0xaf, 0x71, 0xe2, 0x4a, 0xd9,
-	0xeb, 0x78, 0xd0, 0x43, 0x9d, 0x0e, 0xa6, 0x35, 0x00, 0x94,
-	0x35, 0xa1, 0x6a, 0xfe, 0x5f, 0xcb, 0xd4, 0x40, 0xe1, 0x75,
-	0xbe, 0x2a, 0x8b, 0x1f, 0xb5, 0x21, 0x80, 0x14, 0xdf, 0x4b,
-	0xea, 0x7e, 0x61, 0xf5, 0x54, 0xc0, 0x0b, 0x9f, 0x3e, 0xaa,
-	0x77, 0xe3, 0x42, 0xd6, 0x1d, 0x89, 0x28, 0xbc, 0xa3, 0x37,
-	0x96, 0x02, 0xc9, 0x5d, 0xfc, 0x68, 0xc2, 0x56, 0xf7, 0x63,
-	0xa8, 0x3c, 0x9d, 0x09, 0x16, 0x82, 0x23, 0xb7, 0x7c, 0xe8,
-	0x49, 0xdd, 0xee, 0x7a, 0xdb, 0x4f, 0x84, 0x10, 0xb1, 0x25,
-	0x3a, 0xae, 0x0f, 0x9b, 0x50, 0xc4, 0x65, 0xf1, 0x5b, 0xcf,
-	0x6e, 0xfa, 0x31, 0xa5, 0x04, 0x90, 0x8f, 0x1b, 0xba, 0x2e,
-	0xe5, 0x71, 0xd0, 0x44, 0x99, 0x0d, 0xac, 0x38, 0xf3, 0x67,
-	0xc6, 0x52, 0x4d, 0xd9, 0x78, 0xec, 0x27, 0xb3, 0x12, 0x86,
-	0x2c, 0xb8, 0x19, 0x8d, 0x46, 0xd2, 0x73, 0xe7, 0xf8, 0x6c,
-	0xcd, 0x59, 0x92, 0x06, 0xa7, 0x33, 0xc1, 0x55, 0xf4, 0x60,
-	0xab, 0x3f, 0x9e, 0x0a, 0x15, 0x81, 0x20, 0xb4, 0x7f, 0xeb,
-	0x4a, 0xde, 0x74, 0xe0, 0x41, 0xd5, 0x1e, 0x8a, 0x2b, 0xbf,
-	0xa0, 0x34, 0x95, 0x01, 0xca, 0x5e, 0xff, 0x6b, 0xb6, 0x22,
-	0x83, 0x17, 0xdc, 0x48, 0xe9, 0x7d, 0x62, 0xf6, 0x57, 0xc3,
-	0x08, 0x9c, 0x3d, 0xa9, 0x03, 0x97, 0x36, 0xa2, 0x69, 0xfd,
-	0x5c, 0xc8, 0xd7, 0x43, 0xe2, 0x76, 0xbd, 0x29, 0x88, 0x1c,
-	0x2f, 0xbb, 0x1a, 0x8e, 0x45, 0xd1, 0x70, 0xe4, 0xfb, 0x6f,
-	0xce, 0x5a, 0x91, 0x05, 0xa4, 0x30, 0x9a, 0x0e, 0xaf, 0x3b,
-	0xf0, 0x64, 0xc5, 0x51, 0x4e, 0xda, 0x7b, 0xef, 0x24, 0xb0,
-	0x11, 0x85, 0x58, 0xcc, 0x6d, 0xf9, 0x32, 0xa6, 0x07, 0x93,
-	0x8c, 0x18, 0xb9, 0x2d, 0xe6, 0x72, 0xd3, 0x47, 0xed, 0x79,
-	0xd8, 0x4c, 0x87, 0x13, 0xb2, 0x26, 0x39, 0xad, 0x0c, 0x98,
-	0x53, 0xc7, 0x66, 0xf2, 0x00, 0x95, 0x37, 0xa2, 0x6e, 0xfb,
-	0x59, 0xcc, 0xdc, 0x49, 0xeb, 0x7e, 0xb2, 0x27, 0x85, 0x10,
-	0xa5, 0x30, 0x92, 0x07, 0xcb, 0x5e, 0xfc, 0x69, 0x79, 0xec,
-	0x4e, 0xdb, 0x17, 0x82, 0x20, 0xb5, 0x57, 0xc2, 0x60, 0xf5,
-	0x39, 0xac, 0x0e, 0x9b, 0x8b, 0x1e, 0xbc, 0x29, 0xe5, 0x70,
-	0xd2, 0x47, 0xf2, 0x67, 0xc5, 0x50, 0x9c, 0x09, 0xab, 0x3e,
-	0x2e, 0xbb, 0x19, 0x8c, 0x40, 0xd5, 0x77, 0xe2, 0xae, 0x3b,
-	0x99, 0x0c, 0xc0, 0x55, 0xf7, 0x62, 0x72, 0xe7, 0x45, 0xd0,
-	0x1c, 0x89, 0x2b, 0xbe, 0x0b, 0x9e, 0x3c, 0xa9, 0x65, 0xf0,
-	0x52, 0xc7, 0xd7, 0x42, 0xe0, 0x75, 0xb9, 0x2c, 0x8e, 0x1b,
-	0xf9, 0x6c, 0xce, 0x5b, 0x97, 0x02, 0xa0, 0x35, 0x25, 0xb0,
-	0x12, 0x87, 0x4b, 0xde, 0x7c, 0xe9, 0x5c, 0xc9, 0x6b, 0xfe,
-	0x32, 0xa7, 0x05, 0x90, 0x80, 0x15, 0xb7, 0x22, 0xee, 0x7b,
-	0xd9, 0x4c, 0x41, 0xd4, 0x76, 0xe3, 0x2f, 0xba, 0x18, 0x8d,
-	0x9d, 0x08, 0xaa, 0x3f, 0xf3, 0x66, 0xc4, 0x51, 0xe4, 0x71,
-	0xd3, 0x46, 0x8a, 0x1f, 0xbd, 0x28, 0x38, 0xad, 0x0f, 0x9a,
-	0x56, 0xc3, 0x61, 0xf4, 0x16, 0x83, 0x21, 0xb4, 0x78, 0xed,
-	0x4f, 0xda, 0xca, 0x5f, 0xfd, 0x68, 0xa4, 0x31, 0x93, 0x06,
-	0xb3, 0x26, 0x84, 0x11, 0xdd, 0x48, 0xea, 0x7f, 0x6f, 0xfa,
-	0x58, 0xcd, 0x01, 0x94, 0x36, 0xa3, 0xef, 0x7a, 0xd8, 0x4d,
-	0x81, 0x14, 0xb6, 0x23, 0x33, 0xa6, 0x04, 0x91, 0x5d, 0xc8,
-	0x6a, 0xff, 0x4a, 0xdf, 0x7d, 0xe8, 0x24, 0xb1, 0x13, 0x86,
-	0x96, 0x03, 0xa1, 0x34, 0xf8, 0x6d, 0xcf, 0x5a, 0xb8, 0x2d,
-	0x8f, 0x1a, 0xd6, 0x43, 0xe1, 0x74, 0x64, 0xf1, 0x53, 0xc6,
-	0x0a, 0x9f, 0x3d, 0xa8, 0x1d, 0x88, 0x2a, 0xbf, 0x73, 0xe6,
-	0x44, 0xd1, 0xc1, 0x54, 0xf6, 0x63, 0xaf, 0x3a, 0x98, 0x0d,
-	0x00, 0x96, 0x31, 0xa7, 0x62, 0xf4, 0x53, 0xc5, 0xc4, 0x52,
-	0xf5, 0x63, 0xa6, 0x30, 0x97, 0x01, 0x95, 0x03, 0xa4, 0x32,
-	0xf7, 0x61, 0xc6, 0x50, 0x51, 0xc7, 0x60, 0xf6, 0x33, 0xa5,
-	0x02, 0x94, 0x37, 0xa1, 0x06, 0x90, 0x55, 0xc3, 0x64, 0xf2,
-	0xf3, 0x65, 0xc2, 0x54, 0x91, 0x07, 0xa0, 0x36, 0xa2, 0x34,
-	0x93, 0x05, 0xc0, 0x56, 0xf1, 0x67, 0x66, 0xf0, 0x57, 0xc1,
-	0x04, 0x92, 0x35, 0xa3, 0x6e, 0xf8, 0x5f, 0xc9, 0x0c, 0x9a,
-	0x3d, 0xab, 0xaa, 0x3c, 0x9b, 0x0d, 0xc8, 0x5e, 0xf9, 0x6f,
-	0xfb, 0x6d, 0xca, 0x5c, 0x99, 0x0f, 0xa8, 0x3e, 0x3f, 0xa9,
-	0x0e, 0x98, 0x5d, 0xcb, 0x6c, 0xfa, 0x59, 0xcf, 0x68, 0xfe,
-	0x3b, 0xad, 0x0a, 0x9c, 0x9d, 0x0b, 0xac, 0x3a, 0xff, 0x69,
-	0xce, 0x58, 0xcc, 0x5a, 0xfd, 0x6b, 0xae, 0x38, 0x9f, 0x09,
-	0x08, 0x9e, 0x39, 0xaf, 0x6a, 0xfc, 0x5b, 0xcd, 0xdc, 0x4a,
-	0xed, 0x7b, 0xbe, 0x28, 0x8f, 0x19, 0x18, 0x8e, 0x29, 0xbf,
-	0x7a, 0xec, 0x4b, 0xdd, 0x49, 0xdf, 0x78, 0xee, 0x2b, 0xbd,
-	0x1a, 0x8c, 0x8d, 0x1b, 0xbc, 0x2a, 0xef, 0x79, 0xde, 0x48,
-	0xeb, 0x7d, 0xda, 0x4c, 0x89, 0x1f, 0xb8, 0x2e, 0x2f, 0xb9,
-	0x1e, 0x88, 0x4d, 0xdb, 0x7c, 0xea, 0x7e, 0xe8, 0x4f, 0xd9,
-	0x1c, 0x8a, 0x2d, 0xbb, 0xba, 0x2c, 0x8b, 0x1d, 0xd8, 0x4e,
-	0xe9, 0x7f, 0xb2, 0x24, 0x83, 0x15, 0xd0, 0x46, 0xe1, 0x77,
-	0x76, 0xe0, 0x47, 0xd1, 0x14, 0x82, 0x25, 0xb3, 0x27, 0xb1,
-	0x16, 0x80, 0x45, 0xd3, 0x74, 0xe2, 0xe3, 0x75, 0xd2, 0x44,
-	0x81, 0x17, 0xb0, 0x26, 0x85, 0x13, 0xb4, 0x22, 0xe7, 0x71,
-	0xd6, 0x40, 0x41, 0xd7, 0x70, 0xe6, 0x23, 0xb5, 0x12, 0x84,
-	0x10, 0x86, 0x21, 0xb7, 0x72, 0xe4, 0x43, 0xd5, 0xd4, 0x42,
-	0xe5, 0x73, 0xb6, 0x20, 0x87, 0x11, 0x00, 0x97, 0x33, 0xa4,
-	0x66, 0xf1, 0x55, 0xc2, 0xcc, 0x5b, 0xff, 0x68, 0xaa, 0x3d,
-	0x99, 0x0e, 0x85, 0x12, 0xb6, 0x21, 0xe3, 0x74, 0xd0, 0x47,
-	0x49, 0xde, 0x7a, 0xed, 0x2f, 0xb8, 0x1c, 0x8b, 0x17, 0x80,
-	0x24, 0xb3, 0x71, 0xe6, 0x42, 0xd5, 0xdb, 0x4c, 0xe8, 0x7f,
-	0xbd, 0x2a, 0x8e, 0x19, 0x92, 0x05, 0xa1, 0x36, 0xf4, 0x63,
-	0xc7, 0x50, 0x5e, 0xc9, 0x6d, 0xfa, 0x38, 0xaf, 0x0b, 0x9c,
-	0x2e, 0xb9, 0x1d, 0x8a, 0x48, 0xdf, 0x7b, 0xec, 0xe2, 0x75,
-	0xd1, 0x46, 0x84, 0x13, 0xb7, 0x20, 0xab, 0x3c, 0x98, 0x0f,
-	0xcd, 0x5a, 0xfe, 0x69, 0x67, 0xf0, 0x54, 0xc3, 0x01, 0x96,
-	0x32, 0xa5, 0x39, 0xae, 0x0a, 0x9d, 0x5f, 0xc8, 0x6c, 0xfb,
-	0xf5, 0x62, 0xc6, 0x51, 0x93, 0x04, 0xa0, 0x37, 0xbc, 0x2b,
-	0x8f, 0x18, 0xda, 0x4d, 0xe9, 0x7e, 0x70, 0xe7, 0x43, 0xd4,
-	0x16, 0x81, 0x25, 0xb2, 0x5c, 0xcb, 0x6f, 0xf8, 0x3a, 0xad,
-	0x09, 0x9e, 0x90, 0x07, 0xa3, 0x34, 0xf6, 0x61, 0xc5, 0x52,
-	0xd9, 0x4e, 0xea, 0x7d, 0xbf, 0x28, 0x8c, 0x1b, 0x15, 0x82,
-	0x26, 0xb1, 0x73, 0xe4, 0x40, 0xd7, 0x4b, 0xdc, 0x78, 0xef,
-	0x2d, 0xba, 0x1e, 0x89, 0x87, 0x10, 0xb4, 0x23, 0xe1, 0x76,
-	0xd2, 0x45, 0xce, 0x59, 0xfd, 0x6a, 0xa8, 0x3f, 0x9b, 0x0c,
-	0x02, 0x95, 0x31, 0xa6, 0x64, 0xf3, 0x57, 0xc0, 0x72, 0xe5,
-	0x41, 0xd6, 0x14, 0x83, 0x27, 0xb0, 0xbe, 0x29, 0x8d, 0x1a,
-	0xd8, 0x4f, 0xeb, 0x7c, 0xf7, 0x60, 0xc4, 0x53, 0x91, 0x06,
-	0xa2, 0x35, 0x3b, 0xac, 0x08, 0x9f, 0x5d, 0xca, 0x6e, 0xf9,
-	0x65, 0xf2, 0x56, 0xc1, 0x03, 0x94, 0x30, 0xa7, 0xa9, 0x3e,
-	0x9a, 0x0d, 0xcf, 0x58, 0xfc, 0x6b, 0xe0, 0x77, 0xd3, 0x44,
-	0x86, 0x11, 0xb5, 0x22, 0x2c, 0xbb, 0x1f, 0x88, 0x4a, 0xdd,
-	0x79, 0xee, 0x00, 0x98, 0x2d, 0xb5, 0x5a, 0xc2, 0x77, 0xef,
-	0xb4, 0x2c, 0x99, 0x01, 0xee, 0x76, 0xc3, 0x5b, 0x75, 0xed,
-	0x58, 0xc0, 0x2f, 0xb7, 0x02, 0x9a, 0xc1, 0x59, 0xec, 0x74,
-	0x9b, 0x03, 0xb6, 0x2e, 0xea, 0x72, 0xc7, 0x5f, 0xb0, 0x28,
-	0x9d, 0x05, 0x5e, 0xc6, 0x73, 0xeb, 0x04, 0x9c, 0x29, 0xb1,
-	0x9f, 0x07, 0xb2, 0x2a, 0xc5, 0x5d, 0xe8, 0x70, 0x2b, 0xb3,
-	0x06, 0x9e, 0x71, 0xe9, 0x5c, 0xc4, 0xc9, 0x51, 0xe4, 0x7c,
-	0x93, 0x0b, 0xbe, 0x26, 0x7d, 0xe5, 0x50, 0xc8, 0x27, 0xbf,
-	0x0a, 0x92, 0xbc, 0x24, 0x91, 0x09, 0xe6, 0x7e, 0xcb, 0x53,
-	0x08, 0x90, 0x25, 0xbd, 0x52, 0xca, 0x7f, 0xe7, 0x23, 0xbb,
-	0x0e, 0x96, 0x79, 0xe1, 0x54, 0xcc, 0x97, 0x0f, 0xba, 0x22,
-	0xcd, 0x55, 0xe0, 0x78, 0x56, 0xce, 0x7b, 0xe3, 0x0c, 0x94,
-	0x21, 0xb9, 0xe2, 0x7a, 0xcf, 0x57, 0xb8, 0x20, 0x95, 0x0d,
-	0x8f, 0x17, 0xa2, 0x3a, 0xd5, 0x4d, 0xf8, 0x60, 0x3b, 0xa3,
-	0x16, 0x8e, 0x61, 0xf9, 0x4c, 0xd4, 0xfa, 0x62, 0xd7, 0x4f,
-	0xa0, 0x38, 0x8d, 0x15, 0x4e, 0xd6, 0x63, 0xfb, 0x14, 0x8c,
-	0x39, 0xa1, 0x65, 0xfd, 0x48, 0xd0, 0x3f, 0xa7, 0x12, 0x8a,
-	0xd1, 0x49, 0xfc, 0x64, 0x8b, 0x13, 0xa6, 0x3e, 0x10, 0x88,
-	0x3d, 0xa5, 0x4a, 0xd2, 0x67, 0xff, 0xa4, 0x3c, 0x89, 0x11,
-	0xfe, 0x66, 0xd3, 0x4b, 0x46, 0xde, 0x6b, 0xf3, 0x1c, 0x84,
-	0x31, 0xa9, 0xf2, 0x6a, 0xdf, 0x47, 0xa8, 0x30, 0x85, 0x1d,
-	0x33, 0xab, 0x1e, 0x86, 0x69, 0xf1, 0x44, 0xdc, 0x87, 0x1f,
-	0xaa, 0x32, 0xdd, 0x45, 0xf0, 0x68, 0xac, 0x34, 0x81, 0x19,
-	0xf6, 0x6e, 0xdb, 0x43, 0x18, 0x80, 0x35, 0xad, 0x42, 0xda,
-	0x6f, 0xf7, 0xd9, 0x41, 0xf4, 0x6c, 0x83, 0x1b, 0xae, 0x36,
-	0x6d, 0xf5, 0x40, 0xd8, 0x37, 0xaf, 0x1a, 0x82, 0x00, 0x99,
-	0x2f, 0xb6, 0x5e, 0xc7, 0x71, 0xe8, 0xbc, 0x25, 0x93, 0x0a,
-	0xe2, 0x7b, 0xcd, 0x54, 0x65, 0xfc, 0x4a, 0xd3, 0x3b, 0xa2,
-	0x14, 0x8d, 0xd9, 0x40, 0xf6, 0x6f, 0x87, 0x1e, 0xa8, 0x31,
-	0xca, 0x53, 0xe5, 0x7c, 0x94, 0x0d, 0xbb, 0x22, 0x76, 0xef,
-	0x59, 0xc0, 0x28, 0xb1, 0x07, 0x9e, 0xaf, 0x36, 0x80, 0x19,
-	0xf1, 0x68, 0xde, 0x47, 0x13, 0x8a, 0x3c, 0xa5, 0x4d, 0xd4,
-	0x62, 0xfb, 0x89, 0x10, 0xa6, 0x3f, 0xd7, 0x4e, 0xf8, 0x61,
-	0x35, 0xac, 0x1a, 0x83, 0x6b, 0xf2, 0x44, 0xdd, 0xec, 0x75,
-	0xc3, 0x5a, 0xb2, 0x2b, 0x9d, 0x04, 0x50, 0xc9, 0x7f, 0xe6,
-	0x0e, 0x97, 0x21, 0xb8, 0x43, 0xda, 0x6c, 0xf5, 0x1d, 0x84,
-	0x32, 0xab, 0xff, 0x66, 0xd0, 0x49, 0xa1, 0x38, 0x8e, 0x17,
-	0x26, 0xbf, 0x09, 0x90, 0x78, 0xe1, 0x57, 0xce, 0x9a, 0x03,
-	0xb5, 0x2c, 0xc4, 0x5d, 0xeb, 0x72, 0x0f, 0x96, 0x20, 0xb9,
-	0x51, 0xc8, 0x7e, 0xe7, 0xb3, 0x2a, 0x9c, 0x05, 0xed, 0x74,
-	0xc2, 0x5b, 0x6a, 0xf3, 0x45, 0xdc, 0x34, 0xad, 0x1b, 0x82,
-	0xd6, 0x4f, 0xf9, 0x60, 0x88, 0x11, 0xa7, 0x3e, 0xc5, 0x5c,
-	0xea, 0x73, 0x9b, 0x02, 0xb4, 0x2d, 0x79, 0xe0, 0x56, 0xcf,
-	0x27, 0xbe, 0x08, 0x91, 0xa0, 0x39, 0x8f, 0x16, 0xfe, 0x67,
-	0xd1, 0x48, 0x1c, 0x85, 0x33, 0xaa, 0x42, 0xdb, 0x6d, 0xf4,
-	0x86, 0x1f, 0xa9, 0x30, 0xd8, 0x41, 0xf7, 0x6e, 0x3a, 0xa3,
-	0x15, 0x8c, 0x64, 0xfd, 0x4b, 0xd2, 0xe3, 0x7a, 0xcc, 0x55,
-	0xbd, 0x24, 0x92, 0x0b, 0x5f, 0xc6, 0x70, 0xe9, 0x01, 0x98,
-	0x2e, 0xb7, 0x4c, 0xd5, 0x63, 0xfa, 0x12, 0x8b, 0x3d, 0xa4,
-	0xf0, 0x69, 0xdf, 0x46, 0xae, 0x37, 0x81, 0x18, 0x29, 0xb0,
-	0x06, 0x9f, 0x77, 0xee, 0x58, 0xc1, 0x95, 0x0c, 0xba, 0x23,
-	0xcb, 0x52, 0xe4, 0x7d, 0x00, 0x9a, 0x29, 0xb3, 0x52, 0xc8,
-	0x7b, 0xe1, 0xa4, 0x3e, 0x8d, 0x17, 0xf6, 0x6c, 0xdf, 0x45,
-	0x55, 0xcf, 0x7c, 0xe6, 0x07, 0x9d, 0x2e, 0xb4, 0xf1, 0x6b,
-	0xd8, 0x42, 0xa3, 0x39, 0x8a, 0x10, 0xaa, 0x30, 0x83, 0x19,
-	0xf8, 0x62, 0xd1, 0x4b, 0x0e, 0x94, 0x27, 0xbd, 0x5c, 0xc6,
-	0x75, 0xef, 0xff, 0x65, 0xd6, 0x4c, 0xad, 0x37, 0x84, 0x1e,
-	0x5b, 0xc1, 0x72, 0xe8, 0x09, 0x93, 0x20, 0xba, 0x49, 0xd3,
-	0x60, 0xfa, 0x1b, 0x81, 0x32, 0xa8, 0xed, 0x77, 0xc4, 0x5e,
-	0xbf, 0x25, 0x96, 0x0c, 0x1c, 0x86, 0x35, 0xaf, 0x4e, 0xd4,
-	0x67, 0xfd, 0xb8, 0x22, 0x91, 0x0b, 0xea, 0x70, 0xc3, 0x59,
-	0xe3, 0x79, 0xca, 0x50, 0xb1, 0x2b, 0x98, 0x02, 0x47, 0xdd,
-	0x6e, 0xf4, 0x15, 0x8f, 0x3c, 0xa6, 0xb6, 0x2c, 0x9f, 0x05,
-	0xe4, 0x7e, 0xcd, 0x57, 0x12, 0x88, 0x3b, 0xa1, 0x40, 0xda,
-	0x69, 0xf3, 0x92, 0x08, 0xbb, 0x21, 0xc0, 0x5a, 0xe9, 0x73,
-	0x36, 0xac, 0x1f, 0x85, 0x64, 0xfe, 0x4d, 0xd7, 0xc7, 0x5d,
-	0xee, 0x74, 0x95, 0x0f, 0xbc, 0x26, 0x63, 0xf9, 0x4a, 0xd0,
-	0x31, 0xab, 0x18, 0x82, 0x38, 0xa2, 0x11, 0x8b, 0x6a, 0xf0,
-	0x43, 0xd9, 0x9c, 0x06, 0xb5, 0x2f, 0xce, 0x54, 0xe7, 0x7d,
-	0x6d, 0xf7, 0x44, 0xde, 0x3f, 0xa5, 0x16, 0x8c, 0xc9, 0x53,
-	0xe0, 0x7a, 0x9b, 0x01, 0xb2, 0x28, 0xdb, 0x41, 0xf2, 0x68,
-	0x89, 0x13, 0xa0, 0x3a, 0x7f, 0xe5, 0x56, 0xcc, 0x2d, 0xb7,
-	0x04, 0x9e, 0x8e, 0x14, 0xa7, 0x3d, 0xdc, 0x46, 0xf5, 0x6f,
-	0x2a, 0xb0, 0x03, 0x99, 0x78, 0xe2, 0x51, 0xcb, 0x71, 0xeb,
-	0x58, 0xc2, 0x23, 0xb9, 0x0a, 0x90, 0xd5, 0x4f, 0xfc, 0x66,
-	0x87, 0x1d, 0xae, 0x34, 0x24, 0xbe, 0x0d, 0x97, 0x76, 0xec,
-	0x5f, 0xc5, 0x80, 0x1a, 0xa9, 0x33, 0xd2, 0x48, 0xfb, 0x61,
-	0x00, 0x9b, 0x2b, 0xb0, 0x56, 0xcd, 0x7d, 0xe6, 0xac, 0x37,
-	0x87, 0x1c, 0xfa, 0x61, 0xd1, 0x4a, 0x45, 0xde, 0x6e, 0xf5,
-	0x13, 0x88, 0x38, 0xa3, 0xe9, 0x72, 0xc2, 0x59, 0xbf, 0x24,
-	0x94, 0x0f, 0x8a, 0x11, 0xa1, 0x3a, 0xdc, 0x47, 0xf7, 0x6c,
-	0x26, 0xbd, 0x0d, 0x96, 0x70, 0xeb, 0x5b, 0xc0, 0xcf, 0x54,
-	0xe4, 0x7f, 0x99, 0x02, 0xb2, 0x29, 0x63, 0xf8, 0x48, 0xd3,
-	0x35, 0xae, 0x1e, 0x85, 0x09, 0x92, 0x22, 0xb9, 0x5f, 0xc4,
-	0x74, 0xef, 0xa5, 0x3e, 0x8e, 0x15, 0xf3, 0x68, 0xd8, 0x43,
-	0x4c, 0xd7, 0x67, 0xfc, 0x1a, 0x81, 0x31, 0xaa, 0xe0, 0x7b,
-	0xcb, 0x50, 0xb6, 0x2d, 0x9d, 0x06, 0x83, 0x18, 0xa8, 0x33,
-	0xd5, 0x4e, 0xfe, 0x65, 0x2f, 0xb4, 0x04, 0x9f, 0x79, 0xe2,
-	0x52, 0xc9, 0xc6, 0x5d, 0xed, 0x76, 0x90, 0x0b, 0xbb, 0x20,
-	0x6a, 0xf1, 0x41, 0xda, 0x3c, 0xa7, 0x17, 0x8c, 0x12, 0x89,
-	0x39, 0xa2, 0x44, 0xdf, 0x6f, 0xf4, 0xbe, 0x25, 0x95, 0x0e,
-	0xe8, 0x73, 0xc3, 0x58, 0x57, 0xcc, 0x7c, 0xe7, 0x01, 0x9a,
-	0x2a, 0xb1, 0xfb, 0x60, 0xd0, 0x4b, 0xad, 0x36, 0x86, 0x1d,
-	0x98, 0x03, 0xb3, 0x28, 0xce, 0x55, 0xe5, 0x7e, 0x34, 0xaf,
-	0x1f, 0x84, 0x62, 0xf9, 0x49, 0xd2, 0xdd, 0x46, 0xf6, 0x6d,
-	0x8b, 0x10, 0xa0, 0x3b, 0x71, 0xea, 0x5a, 0xc1, 0x27, 0xbc,
-	0x0c, 0x97, 0x1b, 0x80, 0x30, 0xab, 0x4d, 0xd6, 0x66, 0xfd,
-	0xb7, 0x2c, 0x9c, 0x07, 0xe1, 0x7a, 0xca, 0x51, 0x5e, 0xc5,
-	0x75, 0xee, 0x08, 0x93, 0x23, 0xb8, 0xf2, 0x69, 0xd9, 0x42,
-	0xa4, 0x3f, 0x8f, 0x14, 0x91, 0x0a, 0xba, 0x21, 0xc7, 0x5c,
-	0xec, 0x77, 0x3d, 0xa6, 0x16, 0x8d, 0x6b, 0xf0, 0x40, 0xdb,
-	0xd4, 0x4f, 0xff, 0x64, 0x82, 0x19, 0xa9, 0x32, 0x78, 0xe3,
-	0x53, 0xc8, 0x2e, 0xb5, 0x05, 0x9e, 0x00, 0x9c, 0x25, 0xb9,
-	0x4a, 0xd6, 0x6f, 0xf3, 0x94, 0x08, 0xb1, 0x2d, 0xde, 0x42,
-	0xfb, 0x67, 0x35, 0xa9, 0x10, 0x8c, 0x7f, 0xe3, 0x5a, 0xc6,
-	0xa1, 0x3d, 0x84, 0x18, 0xeb, 0x77, 0xce, 0x52, 0x6a, 0xf6,
-	0x4f, 0xd3, 0x20, 0xbc, 0x05, 0x99, 0xfe, 0x62, 0xdb, 0x47,
-	0xb4, 0x28, 0x91, 0x0d, 0x5f, 0xc3, 0x7a, 0xe6, 0x15, 0x89,
-	0x30, 0xac, 0xcb, 0x57, 0xee, 0x72, 0x81, 0x1d, 0xa4, 0x38,
-	0xd4, 0x48, 0xf1, 0x6d, 0x9e, 0x02, 0xbb, 0x27, 0x40, 0xdc,
-	0x65, 0xf9, 0x0a, 0x96, 0x2f, 0xb3, 0xe1, 0x7d, 0xc4, 0x58,
-	0xab, 0x37, 0x8e, 0x12, 0x75, 0xe9, 0x50, 0xcc, 0x3f, 0xa3,
-	0x1a, 0x86, 0xbe, 0x22, 0x9b, 0x07, 0xf4, 0x68, 0xd1, 0x4d,
-	0x2a, 0xb6, 0x0f, 0x93, 0x60, 0xfc, 0x45, 0xd9, 0x8b, 0x17,
-	0xae, 0x32, 0xc1, 0x5d, 0xe4, 0x78, 0x1f, 0x83, 0x3a, 0xa6,
-	0x55, 0xc9, 0x70, 0xec, 0xb5, 0x29, 0x90, 0x0c, 0xff, 0x63,
-	0xda, 0x46, 0x21, 0xbd, 0x04, 0x98, 0x6b, 0xf7, 0x4e, 0xd2,
-	0x80, 0x1c, 0xa5, 0x39, 0xca, 0x56, 0xef, 0x73, 0x14, 0x88,
-	0x31, 0xad, 0x5e, 0xc2, 0x7b, 0xe7, 0xdf, 0x43, 0xfa, 0x66,
-	0x95, 0x09, 0xb0, 0x2c, 0x4b, 0xd7, 0x6e, 0xf2, 0x01, 0x9d,
-	0x24, 0xb8, 0xea, 0x76, 0xcf, 0x53, 0xa0, 0x3c, 0x85, 0x19,
-	0x7e, 0xe2, 0x5b, 0xc7, 0x34, 0xa8, 0x11, 0x8d, 0x61, 0xfd,
-	0x44, 0xd8, 0x2b, 0xb7, 0x0e, 0x92, 0xf5, 0x69, 0xd0, 0x4c,
-	0xbf, 0x23, 0x9a, 0x06, 0x54, 0xc8, 0x71, 0xed, 0x1e, 0x82,
-	0x3b, 0xa7, 0xc0, 0x5c, 0xe5, 0x79, 0x8a, 0x16, 0xaf, 0x33,
-	0x0b, 0x97, 0x2e, 0xb2, 0x41, 0xdd, 0x64, 0xf8, 0x9f, 0x03,
-	0xba, 0x26, 0xd5, 0x49, 0xf0, 0x6c, 0x3e, 0xa2, 0x1b, 0x87,
-	0x74, 0xe8, 0x51, 0xcd, 0xaa, 0x36, 0x8f, 0x13, 0xe0, 0x7c,
-	0xc5, 0x59, 0x00, 0x9d, 0x27, 0xba, 0x4e, 0xd3, 0x69, 0xf4,
-	0x9c, 0x01, 0xbb, 0x26, 0xd2, 0x4f, 0xf5, 0x68, 0x25, 0xb8,
-	0x02, 0x9f, 0x6b, 0xf6, 0x4c, 0xd1, 0xb9, 0x24, 0x9e, 0x03,
-	0xf7, 0x6a, 0xd0, 0x4d, 0x4a, 0xd7, 0x6d, 0xf0, 0x04, 0x99,
-	0x23, 0xbe, 0xd6, 0x4b, 0xf1, 0x6c, 0x98, 0x05, 0xbf, 0x22,
-	0x6f, 0xf2, 0x48, 0xd5, 0x21, 0xbc, 0x06, 0x9b, 0xf3, 0x6e,
-	0xd4, 0x49, 0xbd, 0x20, 0x9a, 0x07, 0x94, 0x09, 0xb3, 0x2e,
-	0xda, 0x47, 0xfd, 0x60, 0x08, 0x95, 0x2f, 0xb2, 0x46, 0xdb,
-	0x61, 0xfc, 0xb1, 0x2c, 0x96, 0x0b, 0xff, 0x62, 0xd8, 0x45,
-	0x2d, 0xb0, 0x0a, 0x97, 0x63, 0xfe, 0x44, 0xd9, 0xde, 0x43,
-	0xf9, 0x64, 0x90, 0x0d, 0xb7, 0x2a, 0x42, 0xdf, 0x65, 0xf8,
-	0x0c, 0x91, 0x2b, 0xb6, 0xfb, 0x66, 0xdc, 0x41, 0xb5, 0x28,
-	0x92, 0x0f, 0x67, 0xfa, 0x40, 0xdd, 0x29, 0xb4, 0x0e, 0x93,
-	0x35, 0xa8, 0x12, 0x8f, 0x7b, 0xe6, 0x5c, 0xc1, 0xa9, 0x34,
-	0x8e, 0x13, 0xe7, 0x7a, 0xc0, 0x5d, 0x10, 0x8d, 0x37, 0xaa,
-	0x5e, 0xc3, 0x79, 0xe4, 0x8c, 0x11, 0xab, 0x36, 0xc2, 0x5f,
-	0xe5, 0x78, 0x7f, 0xe2, 0x58, 0xc5, 0x31, 0xac, 0x16, 0x8b,
-	0xe3, 0x7e, 0xc4, 0x59, 0xad, 0x30, 0x8a, 0x17, 0x5a, 0xc7,
-	0x7d, 0xe0, 0x14, 0x89, 0x33, 0xae, 0xc6, 0x5b, 0xe1, 0x7c,
-	0x88, 0x15, 0xaf, 0x32, 0xa1, 0x3c, 0x86, 0x1b, 0xef, 0x72,
-	0xc8, 0x55, 0x3d, 0xa0, 0x1a, 0x87, 0x73, 0xee, 0x54, 0xc9,
-	0x84, 0x19, 0xa3, 0x3e, 0xca, 0x57, 0xed, 0x70, 0x18, 0x85,
-	0x3f, 0xa2, 0x56, 0xcb, 0x71, 0xec, 0xeb, 0x76, 0xcc, 0x51,
-	0xa5, 0x38, 0x82, 0x1f, 0x77, 0xea, 0x50, 0xcd, 0x39, 0xa4,
-	0x1e, 0x83, 0xce, 0x53, 0xe9, 0x74, 0x80, 0x1d, 0xa7, 0x3a,
-	0x52, 0xcf, 0x75, 0xe8, 0x1c, 0x81, 0x3b, 0xa6, 0x00, 0x9e,
-	0x21, 0xbf, 0x42, 0xdc, 0x63, 0xfd, 0x84, 0x1a, 0xa5, 0x3b,
-	0xc6, 0x58, 0xe7, 0x79, 0x15, 0x8b, 0x34, 0xaa, 0x57, 0xc9,
-	0x76, 0xe8, 0x91, 0x0f, 0xb0, 0x2e, 0xd3, 0x4d, 0xf2, 0x6c,
-	0x2a, 0xb4, 0x0b, 0x95, 0x68, 0xf6, 0x49, 0xd7, 0xae, 0x30,
-	0x8f, 0x11, 0xec, 0x72, 0xcd, 0x53, 0x3f, 0xa1, 0x1e, 0x80,
-	0x7d, 0xe3, 0x5c, 0xc2, 0xbb, 0x25, 0x9a, 0x04, 0xf9, 0x67,
-	0xd8, 0x46, 0x54, 0xca, 0x75, 0xeb, 0x16, 0x88, 0x37, 0xa9,
-	0xd0, 0x4e, 0xf1, 0x6f, 0x92, 0x0c, 0xb3, 0x2d, 0x41, 0xdf,
-	0x60, 0xfe, 0x03, 0x9d, 0x22, 0xbc, 0xc5, 0x5b, 0xe4, 0x7a,
-	0x87, 0x19, 0xa6, 0x38, 0x7e, 0xe0, 0x5f, 0xc1, 0x3c, 0xa2,
-	0x1d, 0x83, 0xfa, 0x64, 0xdb, 0x45, 0xb8, 0x26, 0x99, 0x07,
-	0x6b, 0xf5, 0x4a, 0xd4, 0x29, 0xb7, 0x08, 0x96, 0xef, 0x71,
-	0xce, 0x50, 0xad, 0x33, 0x8c, 0x12, 0xa8, 0x36, 0x89, 0x17,
-	0xea, 0x74, 0xcb, 0x55, 0x2c, 0xb2, 0x0d, 0x93, 0x6e, 0xf0,
-	0x4f, 0xd1, 0xbd, 0x23, 0x9c, 0x02, 0xff, 0x61, 0xde, 0x40,
-	0x39, 0xa7, 0x18, 0x86, 0x7b, 0xe5, 0x5a, 0xc4, 0x82, 0x1c,
-	0xa3, 0x3d, 0xc0, 0x5e, 0xe1, 0x7f, 0x06, 0x98, 0x27, 0xb9,
-	0x44, 0xda, 0x65, 0xfb, 0x97, 0x09, 0xb6, 0x28, 0xd5, 0x4b,
-	0xf4, 0x6a, 0x13, 0x8d, 0x32, 0xac, 0x51, 0xcf, 0x70, 0xee,
-	0xfc, 0x62, 0xdd, 0x43, 0xbe, 0x20, 0x9f, 0x01, 0x78, 0xe6,
-	0x59, 0xc7, 0x3a, 0xa4, 0x1b, 0x85, 0xe9, 0x77, 0xc8, 0x56,
-	0xab, 0x35, 0x8a, 0x14, 0x6d, 0xf3, 0x4c, 0xd2, 0x2f, 0xb1,
-	0x0e, 0x90, 0xd6, 0x48, 0xf7, 0x69, 0x94, 0x0a, 0xb5, 0x2b,
-	0x52, 0xcc, 0x73, 0xed, 0x10, 0x8e, 0x31, 0xaf, 0xc3, 0x5d,
-	0xe2, 0x7c, 0x81, 0x1f, 0xa0, 0x3e, 0x47, 0xd9, 0x66, 0xf8,
-	0x05, 0x9b, 0x24, 0xba, 0x00, 0x9f, 0x23, 0xbc, 0x46, 0xd9,
-	0x65, 0xfa, 0x8c, 0x13, 0xaf, 0x30, 0xca, 0x55, 0xe9, 0x76,
-	0x05, 0x9a, 0x26, 0xb9, 0x43, 0xdc, 0x60, 0xff, 0x89, 0x16,
-	0xaa, 0x35, 0xcf, 0x50, 0xec, 0x73, 0x0a, 0x95, 0x29, 0xb6,
-	0x4c, 0xd3, 0x6f, 0xf0, 0x86, 0x19, 0xa5, 0x3a, 0xc0, 0x5f,
-	0xe3, 0x7c, 0x0f, 0x90, 0x2c, 0xb3, 0x49, 0xd6, 0x6a, 0xf5,
-	0x83, 0x1c, 0xa0, 0x3f, 0xc5, 0x5a, 0xe6, 0x79, 0x14, 0x8b,
-	0x37, 0xa8, 0x52, 0xcd, 0x71, 0xee, 0x98, 0x07, 0xbb, 0x24,
-	0xde, 0x41, 0xfd, 0x62, 0x11, 0x8e, 0x32, 0xad, 0x57, 0xc8,
-	0x74, 0xeb, 0x9d, 0x02, 0xbe, 0x21, 0xdb, 0x44, 0xf8, 0x67,
-	0x1e, 0x81, 0x3d, 0xa2, 0x58, 0xc7, 0x7b, 0xe4, 0x92, 0x0d,
-	0xb1, 0x2e, 0xd4, 0x4b, 0xf7, 0x68, 0x1b, 0x84, 0x38, 0xa7,
-	0x5d, 0xc2, 0x7e, 0xe1, 0x97, 0x08, 0xb4, 0x2b, 0xd1, 0x4e,
-	0xf2, 0x6d, 0x28, 0xb7, 0x0b, 0x94, 0x6e, 0xf1, 0x4d, 0xd2,
-	0xa4, 0x3b, 0x87, 0x18, 0xe2, 0x7d, 0xc1, 0x5e, 0x2d, 0xb2,
-	0x0e, 0x91, 0x6b, 0xf4, 0x48, 0xd7, 0xa1, 0x3e, 0x82, 0x1d,
-	0xe7, 0x78, 0xc4, 0x5b, 0x22, 0xbd, 0x01, 0x9e, 0x64, 0xfb,
-	0x47, 0xd8, 0xae, 0x31, 0x8d, 0x12, 0xe8, 0x77, 0xcb, 0x54,
-	0x27, 0xb8, 0x04, 0x9b, 0x61, 0xfe, 0x42, 0xdd, 0xab, 0x34,
-	0x88, 0x17, 0xed, 0x72, 0xce, 0x51, 0x3c, 0xa3, 0x1f, 0x80,
-	0x7a, 0xe5, 0x59, 0xc6, 0xb0, 0x2f, 0x93, 0x0c, 0xf6, 0x69,
-	0xd5, 0x4a, 0x39, 0xa6, 0x1a, 0x85, 0x7f, 0xe0, 0x5c, 0xc3,
-	0xb5, 0x2a, 0x96, 0x09, 0xf3, 0x6c, 0xd0, 0x4f, 0x36, 0xa9,
-	0x15, 0x8a, 0x70, 0xef, 0x53, 0xcc, 0xba, 0x25, 0x99, 0x06,
-	0xfc, 0x63, 0xdf, 0x40, 0x33, 0xac, 0x10, 0x8f, 0x75, 0xea,
-	0x56, 0xc9, 0xbf, 0x20, 0x9c, 0x03, 0xf9, 0x66, 0xda, 0x45,
-	0x00, 0xa0, 0x5d, 0xfd, 0xba, 0x1a, 0xe7, 0x47, 0x69, 0xc9,
-	0x34, 0x94, 0xd3, 0x73, 0x8e, 0x2e, 0xd2, 0x72, 0x8f, 0x2f,
-	0x68, 0xc8, 0x35, 0x95, 0xbb, 0x1b, 0xe6, 0x46, 0x01, 0xa1,
-	0x5c, 0xfc, 0xb9, 0x19, 0xe4, 0x44, 0x03, 0xa3, 0x5e, 0xfe,
-	0xd0, 0x70, 0x8d, 0x2d, 0x6a, 0xca, 0x37, 0x97, 0x6b, 0xcb,
-	0x36, 0x96, 0xd1, 0x71, 0x8c, 0x2c, 0x02, 0xa2, 0x5f, 0xff,
-	0xb8, 0x18, 0xe5, 0x45, 0x6f, 0xcf, 0x32, 0x92, 0xd5, 0x75,
-	0x88, 0x28, 0x06, 0xa6, 0x5b, 0xfb, 0xbc, 0x1c, 0xe1, 0x41,
-	0xbd, 0x1d, 0xe0, 0x40, 0x07, 0xa7, 0x5a, 0xfa, 0xd4, 0x74,
-	0x89, 0x29, 0x6e, 0xce, 0x33, 0x93, 0xd6, 0x76, 0x8b, 0x2b,
-	0x6c, 0xcc, 0x31, 0x91, 0xbf, 0x1f, 0xe2, 0x42, 0x05, 0xa5,
-	0x58, 0xf8, 0x04, 0xa4, 0x59, 0xf9, 0xbe, 0x1e, 0xe3, 0x43,
-	0x6d, 0xcd, 0x30, 0x90, 0xd7, 0x77, 0x8a, 0x2a, 0xde, 0x7e,
-	0x83, 0x23, 0x64, 0xc4, 0x39, 0x99, 0xb7, 0x17, 0xea, 0x4a,
-	0x0d, 0xad, 0x50, 0xf0, 0x0c, 0xac, 0x51, 0xf1, 0xb6, 0x16,
-	0xeb, 0x4b, 0x65, 0xc5, 0x38, 0x98, 0xdf, 0x7f, 0x82, 0x22,
-	0x67, 0xc7, 0x3a, 0x9a, 0xdd, 0x7d, 0x80, 0x20, 0x0e, 0xae,
-	0x53, 0xf3, 0xb4, 0x14, 0xe9, 0x49, 0xb5, 0x15, 0xe8, 0x48,
-	0x0f, 0xaf, 0x52, 0xf2, 0xdc, 0x7c, 0x81, 0x21, 0x66, 0xc6,
-	0x3b, 0x9b, 0xb1, 0x11, 0xec, 0x4c, 0x0b, 0xab, 0x56, 0xf6,
-	0xd8, 0x78, 0x85, 0x25, 0x62, 0xc2, 0x3f, 0x9f, 0x63, 0xc3,
-	0x3e, 0x9e, 0xd9, 0x79, 0x84, 0x24, 0x0a, 0xaa, 0x57, 0xf7,
-	0xb0, 0x10, 0xed, 0x4d, 0x08, 0xa8, 0x55, 0xf5, 0xb2, 0x12,
-	0xef, 0x4f, 0x61, 0xc1, 0x3c, 0x9c, 0xdb, 0x7b, 0x86, 0x26,
-	0xda, 0x7a, 0x87, 0x27, 0x60, 0xc0, 0x3d, 0x9d, 0xb3, 0x13,
-	0xee, 0x4e, 0x09, 0xa9, 0x54, 0xf4, 0x00, 0xa1, 0x5f, 0xfe,
-	0xbe, 0x1f, 0xe1, 0x40, 0x61, 0xc0, 0x3e, 0x9f, 0xdf, 0x7e,
-	0x80, 0x21, 0xc2, 0x63, 0x9d, 0x3c, 0x7c, 0xdd, 0x23, 0x82,
-	0xa3, 0x02, 0xfc, 0x5d, 0x1d, 0xbc, 0x42, 0xe3, 0x99, 0x38,
-	0xc6, 0x67, 0x27, 0x86, 0x78, 0xd9, 0xf8, 0x59, 0xa7, 0x06,
-	0x46, 0xe7, 0x19, 0xb8, 0x5b, 0xfa, 0x04, 0xa5, 0xe5, 0x44,
-	0xba, 0x1b, 0x3a, 0x9b, 0x65, 0xc4, 0x84, 0x25, 0xdb, 0x7a,
-	0x2f, 0x8e, 0x70, 0xd1, 0x91, 0x30, 0xce, 0x6f, 0x4e, 0xef,
-	0x11, 0xb0, 0xf0, 0x51, 0xaf, 0x0e, 0xed, 0x4c, 0xb2, 0x13,
-	0x53, 0xf2, 0x0c, 0xad, 0x8c, 0x2d, 0xd3, 0x72, 0x32, 0x93,
-	0x6d, 0xcc, 0xb6, 0x17, 0xe9, 0x48, 0x08, 0xa9, 0x57, 0xf6,
-	0xd7, 0x76, 0x88, 0x29, 0x69, 0xc8, 0x36, 0x97, 0x74, 0xd5,
-	0x2b, 0x8a, 0xca, 0x6b, 0x95, 0x34, 0x15, 0xb4, 0x4a, 0xeb,
-	0xab, 0x0a, 0xf4, 0x55, 0x5e, 0xff, 0x01, 0xa0, 0xe0, 0x41,
-	0xbf, 0x1e, 0x3f, 0x9e, 0x60, 0xc1, 0x81, 0x20, 0xde, 0x7f,
-	0x9c, 0x3d, 0xc3, 0x62, 0x22, 0x83, 0x7d, 0xdc, 0xfd, 0x5c,
-	0xa2, 0x03, 0x43, 0xe2, 0x1c, 0xbd, 0xc7, 0x66, 0x98, 0x39,
-	0x79, 0xd8, 0x26, 0x87, 0xa6, 0x07, 0xf9, 0x58, 0x18, 0xb9,
-	0x47, 0xe6, 0x05, 0xa4, 0x5a, 0xfb, 0xbb, 0x1a, 0xe4, 0x45,
-	0x64, 0xc5, 0x3b, 0x9a, 0xda, 0x7b, 0x85, 0x24, 0x71, 0xd0,
-	0x2e, 0x8f, 0xcf, 0x6e, 0x90, 0x31, 0x10, 0xb1, 0x4f, 0xee,
-	0xae, 0x0f, 0xf1, 0x50, 0xb3, 0x12, 0xec, 0x4d, 0x0d, 0xac,
-	0x52, 0xf3, 0xd2, 0x73, 0x8d, 0x2c, 0x6c, 0xcd, 0x33, 0x92,
-	0xe8, 0x49, 0xb7, 0x16, 0x56, 0xf7, 0x09, 0xa8, 0x89, 0x28,
-	0xd6, 0x77, 0x37, 0x96, 0x68, 0xc9, 0x2a, 0x8b, 0x75, 0xd4,
-	0x94, 0x35, 0xcb, 0x6a, 0x4b, 0xea, 0x14, 0xb5, 0xf5, 0x54,
-	0xaa, 0x0b, 0x00, 0xa2, 0x59, 0xfb, 0xb2, 0x10, 0xeb, 0x49,
-	0x79, 0xdb, 0x20, 0x82, 0xcb, 0x69, 0x92, 0x30, 0xf2, 0x50,
-	0xab, 0x09, 0x40, 0xe2, 0x19, 0xbb, 0x8b, 0x29, 0xd2, 0x70,
-	0x39, 0x9b, 0x60, 0xc2, 0xf9, 0x5b, 0xa0, 0x02, 0x4b, 0xe9,
-	0x12, 0xb0, 0x80, 0x22, 0xd9, 0x7b, 0x32, 0x90, 0x6b, 0xc9,
-	0x0b, 0xa9, 0x52, 0xf0, 0xb9, 0x1b, 0xe0, 0x42, 0x72, 0xd0,
-	0x2b, 0x89, 0xc0, 0x62, 0x99, 0x3b, 0xef, 0x4d, 0xb6, 0x14,
-	0x5d, 0xff, 0x04, 0xa6, 0x96, 0x34, 0xcf, 0x6d, 0x24, 0x86,
-	0x7d, 0xdf, 0x1d, 0xbf, 0x44, 0xe6, 0xaf, 0x0d, 0xf6, 0x54,
-	0x64, 0xc6, 0x3d, 0x9f, 0xd6, 0x74, 0x8f, 0x2d, 0x16, 0xb4,
-	0x4f, 0xed, 0xa4, 0x06, 0xfd, 0x5f, 0x6f, 0xcd, 0x36, 0x94,
-	0xdd, 0x7f, 0x84, 0x26, 0xe4, 0x46, 0xbd, 0x1f, 0x56, 0xf4,
-	0x0f, 0xad, 0x9d, 0x3f, 0xc4, 0x66, 0x2f, 0x8d, 0x76, 0xd4,
-	0xc3, 0x61, 0x9a, 0x38, 0x71, 0xd3, 0x28, 0x8a, 0xba, 0x18,
-	0xe3, 0x41, 0x08, 0xaa, 0x51, 0xf3, 0x31, 0x93, 0x68, 0xca,
-	0x83, 0x21, 0xda, 0x78, 0x48, 0xea, 0x11, 0xb3, 0xfa, 0x58,
-	0xa3, 0x01, 0x3a, 0x98, 0x63, 0xc1, 0x88, 0x2a, 0xd1, 0x73,
-	0x43, 0xe1, 0x1a, 0xb8, 0xf1, 0x53, 0xa8, 0x0a, 0xc8, 0x6a,
-	0x91, 0x33, 0x7a, 0xd8, 0x23, 0x81, 0xb1, 0x13, 0xe8, 0x4a,
-	0x03, 0xa1, 0x5a, 0xf8, 0x2c, 0x8e, 0x75, 0xd7, 0x9e, 0x3c,
-	0xc7, 0x65, 0x55, 0xf7, 0x0c, 0xae, 0xe7, 0x45, 0xbe, 0x1c,
-	0xde, 0x7c, 0x87, 0x25, 0x6c, 0xce, 0x35, 0x97, 0xa7, 0x05,
-	0xfe, 0x5c, 0x15, 0xb7, 0x4c, 0xee, 0xd5, 0x77, 0x8c, 0x2e,
-	0x67, 0xc5, 0x3e, 0x9c, 0xac, 0x0e, 0xf5, 0x57, 0x1e, 0xbc,
-	0x47, 0xe5, 0x27, 0x85, 0x7e, 0xdc, 0x95, 0x37, 0xcc, 0x6e,
-	0x5e, 0xfc, 0x07, 0xa5, 0xec, 0x4e, 0xb5, 0x17, 0x00, 0xa3,
-	0x5b, 0xf8, 0xb6, 0x15, 0xed, 0x4e, 0x71, 0xd2, 0x2a, 0x89,
-	0xc7, 0x64, 0x9c, 0x3f, 0xe2, 0x41, 0xb9, 0x1a, 0x54, 0xf7,
-	0x0f, 0xac, 0x93, 0x30, 0xc8, 0x6b, 0x25, 0x86, 0x7e, 0xdd,
-	0xd9, 0x7a, 0x82, 0x21, 0x6f, 0xcc, 0x34, 0x97, 0xa8, 0x0b,
-	0xf3, 0x50, 0x1e, 0xbd, 0x45, 0xe6, 0x3b, 0x98, 0x60, 0xc3,
-	0x8d, 0x2e, 0xd6, 0x75, 0x4a, 0xe9, 0x11, 0xb2, 0xfc, 0x5f,
-	0xa7, 0x04, 0xaf, 0x0c, 0xf4, 0x57, 0x19, 0xba, 0x42, 0xe1,
-	0xde, 0x7d, 0x85, 0x26, 0x68, 0xcb, 0x33, 0x90, 0x4d, 0xee,
-	0x16, 0xb5, 0xfb, 0x58, 0xa0, 0x03, 0x3c, 0x9f, 0x67, 0xc4,
-	0x8a, 0x29, 0xd1, 0x72, 0x76, 0xd5, 0x2d, 0x8e, 0xc0, 0x63,
-	0x9b, 0x38, 0x07, 0xa4, 0x5c, 0xff, 0xb1, 0x12, 0xea, 0x49,
-	0x94, 0x37, 0xcf, 0x6c, 0x22, 0x81, 0x79, 0xda, 0xe5, 0x46,
-	0xbe, 0x1d, 0x53, 0xf0, 0x08, 0xab, 0x43, 0xe0, 0x18, 0xbb,
-	0xf5, 0x56, 0xae, 0x0d, 0x32, 0x91, 0x69, 0xca, 0x84, 0x27,
-	0xdf, 0x7c, 0xa1, 0x02, 0xfa, 0x59, 0x17, 0xb4, 0x4c, 0xef,
-	0xd0, 0x73, 0x8b, 0x28, 0x66, 0xc5, 0x3d, 0x9e, 0x9a, 0x39,
-	0xc1, 0x62, 0x2c, 0x8f, 0x77, 0xd4, 0xeb, 0x48, 0xb0, 0x13,
-	0x5d, 0xfe, 0x06, 0xa5, 0x78, 0xdb, 0x23, 0x80, 0xce, 0x6d,
-	0x95, 0x36, 0x09, 0xaa, 0x52, 0xf1, 0xbf, 0x1c, 0xe4, 0x47,
-	0xec, 0x4f, 0xb7, 0x14, 0x5a, 0xf9, 0x01, 0xa2, 0x9d, 0x3e,
-	0xc6, 0x65, 0x2b, 0x88, 0x70, 0xd3, 0x0e, 0xad, 0x55, 0xf6,
-	0xb8, 0x1b, 0xe3, 0x40, 0x7f, 0xdc, 0x24, 0x87, 0xc9, 0x6a,
-	0x92, 0x31, 0x35, 0x96, 0x6e, 0xcd, 0x83, 0x20, 0xd8, 0x7b,
-	0x44, 0xe7, 0x1f, 0xbc, 0xf2, 0x51, 0xa9, 0x0a, 0xd7, 0x74,
-	0x8c, 0x2f, 0x61, 0xc2, 0x3a, 0x99, 0xa6, 0x05, 0xfd, 0x5e,
-	0x10, 0xb3, 0x4b, 0xe8, 0x00, 0xa4, 0x55, 0xf1, 0xaa, 0x0e,
-	0xff, 0x5b, 0x49, 0xed, 0x1c, 0xb8, 0xe3, 0x47, 0xb6, 0x12,
-	0x92, 0x36, 0xc7, 0x63, 0x38, 0x9c, 0x6d, 0xc9, 0xdb, 0x7f,
-	0x8e, 0x2a, 0x71, 0xd5, 0x24, 0x80, 0x39, 0x9d, 0x6c, 0xc8,
-	0x93, 0x37, 0xc6, 0x62, 0x70, 0xd4, 0x25, 0x81, 0xda, 0x7e,
-	0x8f, 0x2b, 0xab, 0x0f, 0xfe, 0x5a, 0x01, 0xa5, 0x54, 0xf0,
-	0xe2, 0x46, 0xb7, 0x13, 0x48, 0xec, 0x1d, 0xb9, 0x72, 0xd6,
-	0x27, 0x83, 0xd8, 0x7c, 0x8d, 0x29, 0x3b, 0x9f, 0x6e, 0xca,
-	0x91, 0x35, 0xc4, 0x60, 0xe0, 0x44, 0xb5, 0x11, 0x4a, 0xee,
-	0x1f, 0xbb, 0xa9, 0x0d, 0xfc, 0x58, 0x03, 0xa7, 0x56, 0xf2,
-	0x4b, 0xef, 0x1e, 0xba, 0xe1, 0x45, 0xb4, 0x10, 0x02, 0xa6,
-	0x57, 0xf3, 0xa8, 0x0c, 0xfd, 0x59, 0xd9, 0x7d, 0x8c, 0x28,
-	0x73, 0xd7, 0x26, 0x82, 0x90, 0x34, 0xc5, 0x61, 0x3a, 0x9e,
-	0x6f, 0xcb, 0xe4, 0x40, 0xb1, 0x15, 0x4e, 0xea, 0x1b, 0xbf,
-	0xad, 0x09, 0xf8, 0x5c, 0x07, 0xa3, 0x52, 0xf6, 0x76, 0xd2,
-	0x23, 0x87, 0xdc, 0x78, 0x89, 0x2d, 0x3f, 0x9b, 0x6a, 0xce,
-	0x95, 0x31, 0xc0, 0x64, 0xdd, 0x79, 0x88, 0x2c, 0x77, 0xd3,
-	0x22, 0x86, 0x94, 0x30, 0xc1, 0x65, 0x3e, 0x9a, 0x6b, 0xcf,
-	0x4f, 0xeb, 0x1a, 0xbe, 0xe5, 0x41, 0xb0, 0x14, 0x06, 0xa2,
-	0x53, 0xf7, 0xac, 0x08, 0xf9, 0x5d, 0x96, 0x32, 0xc3, 0x67,
-	0x3c, 0x98, 0x69, 0xcd, 0xdf, 0x7b, 0x8a, 0x2e, 0x75, 0xd1,
-	0x20, 0x84, 0x04, 0xa0, 0x51, 0xf5, 0xae, 0x0a, 0xfb, 0x5f,
-	0x4d, 0xe9, 0x18, 0xbc, 0xe7, 0x43, 0xb2, 0x16, 0xaf, 0x0b,
-	0xfa, 0x5e, 0x05, 0xa1, 0x50, 0xf4, 0xe6, 0x42, 0xb3, 0x17,
-	0x4c, 0xe8, 0x19, 0xbd, 0x3d, 0x99, 0x68, 0xcc, 0x97, 0x33,
-	0xc2, 0x66, 0x74, 0xd0, 0x21, 0x85, 0xde, 0x7a, 0x8b, 0x2f,
-	0x00, 0xa5, 0x57, 0xf2, 0xae, 0x0b, 0xf9, 0x5c, 0x41, 0xe4,
-	0x16, 0xb3, 0xef, 0x4a, 0xb8, 0x1d, 0x82, 0x27, 0xd5, 0x70,
-	0x2c, 0x89, 0x7b, 0xde, 0xc3, 0x66, 0x94, 0x31, 0x6d, 0xc8,
-	0x3a, 0x9f, 0x19, 0xbc, 0x4e, 0xeb, 0xb7, 0x12, 0xe0, 0x45,
-	0x58, 0xfd, 0x0f, 0xaa, 0xf6, 0x53, 0xa1, 0x04, 0x9b, 0x3e,
-	0xcc, 0x69, 0x35, 0x90, 0x62, 0xc7, 0xda, 0x7f, 0x8d, 0x28,
-	0x74, 0xd1, 0x23, 0x86, 0x32, 0x97, 0x65, 0xc0, 0x9c, 0x39,
-	0xcb, 0x6e, 0x73, 0xd6, 0x24, 0x81, 0xdd, 0x78, 0x8a, 0x2f,
-	0xb0, 0x15, 0xe7, 0x42, 0x1e, 0xbb, 0x49, 0xec, 0xf1, 0x54,
-	0xa6, 0x03, 0x5f, 0xfa, 0x08, 0xad, 0x2b, 0x8e, 0x7c, 0xd9,
-	0x85, 0x20, 0xd2, 0x77, 0x6a, 0xcf, 0x3d, 0x98, 0xc4, 0x61,
-	0x93, 0x36, 0xa9, 0x0c, 0xfe, 0x5b, 0x07, 0xa2, 0x50, 0xf5,
-	0xe8, 0x4d, 0xbf, 0x1a, 0x46, 0xe3, 0x11, 0xb4, 0x64, 0xc1,
-	0x33, 0x96, 0xca, 0x6f, 0x9d, 0x38, 0x25, 0x80, 0x72, 0xd7,
-	0x8b, 0x2e, 0xdc, 0x79, 0xe6, 0x43, 0xb1, 0x14, 0x48, 0xed,
-	0x1f, 0xba, 0xa7, 0x02, 0xf0, 0x55, 0x09, 0xac, 0x5e, 0xfb,
-	0x7d, 0xd8, 0x2a, 0x8f, 0xd3, 0x76, 0x84, 0x21, 0x3c, 0x99,
-	0x6b, 0xce, 0x92, 0x37, 0xc5, 0x60, 0xff, 0x5a, 0xa8, 0x0d,
-	0x51, 0xf4, 0x06, 0xa3, 0xbe, 0x1b, 0xe9, 0x4c, 0x10, 0xb5,
-	0x47, 0xe2, 0x56, 0xf3, 0x01, 0xa4, 0xf8, 0x5d, 0xaf, 0x0a,
-	0x17, 0xb2, 0x40, 0xe5, 0xb9, 0x1c, 0xee, 0x4b, 0xd4, 0x71,
-	0x83, 0x26, 0x7a, 0xdf, 0x2d, 0x88, 0x95, 0x30, 0xc2, 0x67,
-	0x3b, 0x9e, 0x6c, 0xc9, 0x4f, 0xea, 0x18, 0xbd, 0xe1, 0x44,
-	0xb6, 0x13, 0x0e, 0xab, 0x59, 0xfc, 0xa0, 0x05, 0xf7, 0x52,
-	0xcd, 0x68, 0x9a, 0x3f, 0x63, 0xc6, 0x34, 0x91, 0x8c, 0x29,
-	0xdb, 0x7e, 0x22, 0x87, 0x75, 0xd0, 0x00, 0xa6, 0x51, 0xf7,
-	0xa2, 0x04, 0xf3, 0x55, 0x59, 0xff, 0x08, 0xae, 0xfb, 0x5d,
-	0xaa, 0x0c, 0xb2, 0x14, 0xe3, 0x45, 0x10, 0xb6, 0x41, 0xe7,
-	0xeb, 0x4d, 0xba, 0x1c, 0x49, 0xef, 0x18, 0xbe, 0x79, 0xdf,
-	0x28, 0x8e, 0xdb, 0x7d, 0x8a, 0x2c, 0x20, 0x86, 0x71, 0xd7,
-	0x82, 0x24, 0xd3, 0x75, 0xcb, 0x6d, 0x9a, 0x3c, 0x69, 0xcf,
-	0x38, 0x9e, 0x92, 0x34, 0xc3, 0x65, 0x30, 0x96, 0x61, 0xc7,
-	0xf2, 0x54, 0xa3, 0x05, 0x50, 0xf6, 0x01, 0xa7, 0xab, 0x0d,
-	0xfa, 0x5c, 0x09, 0xaf, 0x58, 0xfe, 0x40, 0xe6, 0x11, 0xb7,
-	0xe2, 0x44, 0xb3, 0x15, 0x19, 0xbf, 0x48, 0xee, 0xbb, 0x1d,
-	0xea, 0x4c, 0x8b, 0x2d, 0xda, 0x7c, 0x29, 0x8f, 0x78, 0xde,
-	0xd2, 0x74, 0x83, 0x25, 0x70, 0xd6, 0x21, 0x87, 0x39, 0x9f,
-	0x68, 0xce, 0x9b, 0x3d, 0xca, 0x6c, 0x60, 0xc6, 0x31, 0x97,
-	0xc2, 0x64, 0x93, 0x35, 0xf9, 0x5f, 0xa8, 0x0e, 0x5b, 0xfd,
-	0x0a, 0xac, 0xa0, 0x06, 0xf1, 0x57, 0x02, 0xa4, 0x53, 0xf5,
-	0x4b, 0xed, 0x1a, 0xbc, 0xe9, 0x4f, 0xb8, 0x1e, 0x12, 0xb4,
-	0x43, 0xe5, 0xb0, 0x16, 0xe1, 0x47, 0x80, 0x26, 0xd1, 0x77,
-	0x22, 0x84, 0x73, 0xd5, 0xd9, 0x7f, 0x88, 0x2e, 0x7b, 0xdd,
-	0x2a, 0x8c, 0x32, 0x94, 0x63, 0xc5, 0x90, 0x36, 0xc1, 0x67,
-	0x6b, 0xcd, 0x3a, 0x9c, 0xc9, 0x6f, 0x98, 0x3e, 0x0b, 0xad,
-	0x5a, 0xfc, 0xa9, 0x0f, 0xf8, 0x5e, 0x52, 0xf4, 0x03, 0xa5,
-	0xf0, 0x56, 0xa1, 0x07, 0xb9, 0x1f, 0xe8, 0x4e, 0x1b, 0xbd,
-	0x4a, 0xec, 0xe0, 0x46, 0xb1, 0x17, 0x42, 0xe4, 0x13, 0xb5,
-	0x72, 0xd4, 0x23, 0x85, 0xd0, 0x76, 0x81, 0x27, 0x2b, 0x8d,
-	0x7a, 0xdc, 0x89, 0x2f, 0xd8, 0x7e, 0xc0, 0x66, 0x91, 0x37,
-	0x62, 0xc4, 0x33, 0x95, 0x99, 0x3f, 0xc8, 0x6e, 0x3b, 0x9d,
-	0x6a, 0xcc, 0x00, 0xa7, 0x53, 0xf4, 0xa6, 0x01, 0xf5, 0x52,
-	0x51, 0xf6, 0x02, 0xa5, 0xf7, 0x50, 0xa4, 0x03, 0xa2, 0x05,
-	0xf1, 0x56, 0x04, 0xa3, 0x57, 0xf0, 0xf3, 0x54, 0xa0, 0x07,
-	0x55, 0xf2, 0x06, 0xa1, 0x59, 0xfe, 0x0a, 0xad, 0xff, 0x58,
-	0xac, 0x0b, 0x08, 0xaf, 0x5b, 0xfc, 0xae, 0x09, 0xfd, 0x5a,
-	0xfb, 0x5c, 0xa8, 0x0f, 0x5d, 0xfa, 0x0e, 0xa9, 0xaa, 0x0d,
-	0xf9, 0x5e, 0x0c, 0xab, 0x5f, 0xf8, 0xb2, 0x15, 0xe1, 0x46,
-	0x14, 0xb3, 0x47, 0xe0, 0xe3, 0x44, 0xb0, 0x17, 0x45, 0xe2,
-	0x16, 0xb1, 0x10, 0xb7, 0x43, 0xe4, 0xb6, 0x11, 0xe5, 0x42,
-	0x41, 0xe6, 0x12, 0xb5, 0xe7, 0x40, 0xb4, 0x13, 0xeb, 0x4c,
-	0xb8, 0x1f, 0x4d, 0xea, 0x1e, 0xb9, 0xba, 0x1d, 0xe9, 0x4e,
-	0x1c, 0xbb, 0x4f, 0xe8, 0x49, 0xee, 0x1a, 0xbd, 0xef, 0x48,
-	0xbc, 0x1b, 0x18, 0xbf, 0x4b, 0xec, 0xbe, 0x19, 0xed, 0x4a,
-	0x79, 0xde, 0x2a, 0x8d, 0xdf, 0x78, 0x8c, 0x2b, 0x28, 0x8f,
-	0x7b, 0xdc, 0x8e, 0x29, 0xdd, 0x7a, 0xdb, 0x7c, 0x88, 0x2f,
-	0x7d, 0xda, 0x2e, 0x89, 0x8a, 0x2d, 0xd9, 0x7e, 0x2c, 0x8b,
-	0x7f, 0xd8, 0x20, 0x87, 0x73, 0xd4, 0x86, 0x21, 0xd5, 0x72,
-	0x71, 0xd6, 0x22, 0x85, 0xd7, 0x70, 0x84, 0x23, 0x82, 0x25,
-	0xd1, 0x76, 0x24, 0x83, 0x77, 0xd0, 0xd3, 0x74, 0x80, 0x27,
-	0x75, 0xd2, 0x26, 0x81, 0xcb, 0x6c, 0x98, 0x3f, 0x6d, 0xca,
-	0x3e, 0x99, 0x9a, 0x3d, 0xc9, 0x6e, 0x3c, 0x9b, 0x6f, 0xc8,
-	0x69, 0xce, 0x3a, 0x9d, 0xcf, 0x68, 0x9c, 0x3b, 0x38, 0x9f,
-	0x6b, 0xcc, 0x9e, 0x39, 0xcd, 0x6a, 0x92, 0x35, 0xc1, 0x66,
-	0x34, 0x93, 0x67, 0xc0, 0xc3, 0x64, 0x90, 0x37, 0x65, 0xc2,
-	0x36, 0x91, 0x30, 0x97, 0x63, 0xc4, 0x96, 0x31, 0xc5, 0x62,
-	0x61, 0xc6, 0x32, 0x95, 0xc7, 0x60, 0x94, 0x33, 0x00, 0xa8,
-	0x4d, 0xe5, 0x9a, 0x32, 0xd7, 0x7f, 0x29, 0x81, 0x64, 0xcc,
-	0xb3, 0x1b, 0xfe, 0x56, 0x52, 0xfa, 0x1f, 0xb7, 0xc8, 0x60,
-	0x85, 0x2d, 0x7b, 0xd3, 0x36, 0x9e, 0xe1, 0x49, 0xac, 0x04,
-	0xa4, 0x0c, 0xe9, 0x41, 0x3e, 0x96, 0x73, 0xdb, 0x8d, 0x25,
-	0xc0, 0x68, 0x17, 0xbf, 0x5a, 0xf2, 0xf6, 0x5e, 0xbb, 0x13,
-	0x6c, 0xc4, 0x21, 0x89, 0xdf, 0x77, 0x92, 0x3a, 0x45, 0xed,
-	0x08, 0xa0, 0x55, 0xfd, 0x18, 0xb0, 0xcf, 0x67, 0x82, 0x2a,
-	0x7c, 0xd4, 0x31, 0x99, 0xe6, 0x4e, 0xab, 0x03, 0x07, 0xaf,
-	0x4a, 0xe2, 0x9d, 0x35, 0xd0, 0x78, 0x2e, 0x86, 0x63, 0xcb,
-	0xb4, 0x1c, 0xf9, 0x51, 0xf1, 0x59, 0xbc, 0x14, 0x6b, 0xc3,
-	0x26, 0x8e, 0xd8, 0x70, 0x95, 0x3d, 0x42, 0xea, 0x0f, 0xa7,
-	0xa3, 0x0b, 0xee, 0x46, 0x39, 0x91, 0x74, 0xdc, 0x8a, 0x22,
-	0xc7, 0x6f, 0x10, 0xb8, 0x5d, 0xf5, 0xaa, 0x02, 0xe7, 0x4f,
-	0x30, 0x98, 0x7d, 0xd5, 0x83, 0x2b, 0xce, 0x66, 0x19, 0xb1,
-	0x54, 0xfc, 0xf8, 0x50, 0xb5, 0x1d, 0x62, 0xca, 0x2f, 0x87,
-	0xd1, 0x79, 0x9c, 0x34, 0x4b, 0xe3, 0x06, 0xae, 0x0e, 0xa6,
-	0x43, 0xeb, 0x94, 0x3c, 0xd9, 0x71, 0x27, 0x8f, 0x6a, 0xc2,
-	0xbd, 0x15, 0xf0, 0x58, 0x5c, 0xf4, 0x11, 0xb9, 0xc6, 0x6e,
-	0x8b, 0x23, 0x75, 0xdd, 0x38, 0x90, 0xef, 0x47, 0xa2, 0x0a,
-	0xff, 0x57, 0xb2, 0x1a, 0x65, 0xcd, 0x28, 0x80, 0xd6, 0x7e,
-	0x9b, 0x33, 0x4c, 0xe4, 0x01, 0xa9, 0xad, 0x05, 0xe0, 0x48,
-	0x37, 0x9f, 0x7a, 0xd2, 0x84, 0x2c, 0xc9, 0x61, 0x1e, 0xb6,
-	0x53, 0xfb, 0x5b, 0xf3, 0x16, 0xbe, 0xc1, 0x69, 0x8c, 0x24,
-	0x72, 0xda, 0x3f, 0x97, 0xe8, 0x40, 0xa5, 0x0d, 0x09, 0xa1,
-	0x44, 0xec, 0x93, 0x3b, 0xde, 0x76, 0x20, 0x88, 0x6d, 0xc5,
-	0xba, 0x12, 0xf7, 0x5f, 0x00, 0xa9, 0x4f, 0xe6, 0x9e, 0x37,
-	0xd1, 0x78, 0x21, 0x88, 0x6e, 0xc7, 0xbf, 0x16, 0xf0, 0x59,
-	0x42, 0xeb, 0x0d, 0xa4, 0xdc, 0x75, 0x93, 0x3a, 0x63, 0xca,
-	0x2c, 0x85, 0xfd, 0x54, 0xb2, 0x1b, 0x84, 0x2d, 0xcb, 0x62,
-	0x1a, 0xb3, 0x55, 0xfc, 0xa5, 0x0c, 0xea, 0x43, 0x3b, 0x92,
-	0x74, 0xdd, 0xc6, 0x6f, 0x89, 0x20, 0x58, 0xf1, 0x17, 0xbe,
-	0xe7, 0x4e, 0xa8, 0x01, 0x79, 0xd0, 0x36, 0x9f, 0x15, 0xbc,
-	0x5a, 0xf3, 0x8b, 0x22, 0xc4, 0x6d, 0x34, 0x9d, 0x7b, 0xd2,
-	0xaa, 0x03, 0xe5, 0x4c, 0x57, 0xfe, 0x18, 0xb1, 0xc9, 0x60,
-	0x86, 0x2f, 0x76, 0xdf, 0x39, 0x90, 0xe8, 0x41, 0xa7, 0x0e,
-	0x91, 0x38, 0xde, 0x77, 0x0f, 0xa6, 0x40, 0xe9, 0xb0, 0x19,
-	0xff, 0x56, 0x2e, 0x87, 0x61, 0xc8, 0xd3, 0x7a, 0x9c, 0x35,
-	0x4d, 0xe4, 0x02, 0xab, 0xf2, 0x5b, 0xbd, 0x14, 0x6c, 0xc5,
-	0x23, 0x8a, 0x2a, 0x83, 0x65, 0xcc, 0xb4, 0x1d, 0xfb, 0x52,
-	0x0b, 0xa2, 0x44, 0xed, 0x95, 0x3c, 0xda, 0x73, 0x68, 0xc1,
-	0x27, 0x8e, 0xf6, 0x5f, 0xb9, 0x10, 0x49, 0xe0, 0x06, 0xaf,
-	0xd7, 0x7e, 0x98, 0x31, 0xae, 0x07, 0xe1, 0x48, 0x30, 0x99,
-	0x7f, 0xd6, 0x8f, 0x26, 0xc0, 0x69, 0x11, 0xb8, 0x5e, 0xf7,
-	0xec, 0x45, 0xa3, 0x0a, 0x72, 0xdb, 0x3d, 0x94, 0xcd, 0x64,
-	0x82, 0x2b, 0x53, 0xfa, 0x1c, 0xb5, 0x3f, 0x96, 0x70, 0xd9,
-	0xa1, 0x08, 0xee, 0x47, 0x1e, 0xb7, 0x51, 0xf8, 0x80, 0x29,
-	0xcf, 0x66, 0x7d, 0xd4, 0x32, 0x9b, 0xe3, 0x4a, 0xac, 0x05,
-	0x5c, 0xf5, 0x13, 0xba, 0xc2, 0x6b, 0x8d, 0x24, 0xbb, 0x12,
-	0xf4, 0x5d, 0x25, 0x8c, 0x6a, 0xc3, 0x9a, 0x33, 0xd5, 0x7c,
-	0x04, 0xad, 0x4b, 0xe2, 0xf9, 0x50, 0xb6, 0x1f, 0x67, 0xce,
-	0x28, 0x81, 0xd8, 0x71, 0x97, 0x3e, 0x46, 0xef, 0x09, 0xa0,
-	0x00, 0xaa, 0x49, 0xe3, 0x92, 0x38, 0xdb, 0x71, 0x39, 0x93,
-	0x70, 0xda, 0xab, 0x01, 0xe2, 0x48, 0x72, 0xd8, 0x3b, 0x91,
-	0xe0, 0x4a, 0xa9, 0x03, 0x4b, 0xe1, 0x02, 0xa8, 0xd9, 0x73,
-	0x90, 0x3a, 0xe4, 0x4e, 0xad, 0x07, 0x76, 0xdc, 0x3f, 0x95,
-	0xdd, 0x77, 0x94, 0x3e, 0x4f, 0xe5, 0x06, 0xac, 0x96, 0x3c,
-	0xdf, 0x75, 0x04, 0xae, 0x4d, 0xe7, 0xaf, 0x05, 0xe6, 0x4c,
-	0x3d, 0x97, 0x74, 0xde, 0xd5, 0x7f, 0x9c, 0x36, 0x47, 0xed,
-	0x0e, 0xa4, 0xec, 0x46, 0xa5, 0x0f, 0x7e, 0xd4, 0x37, 0x9d,
-	0xa7, 0x0d, 0xee, 0x44, 0x35, 0x9f, 0x7c, 0xd6, 0x9e, 0x34,
-	0xd7, 0x7d, 0x0c, 0xa6, 0x45, 0xef, 0x31, 0x9b, 0x78, 0xd2,
-	0xa3, 0x09, 0xea, 0x40, 0x08, 0xa2, 0x41, 0xeb, 0x9a, 0x30,
-	0xd3, 0x79, 0x43, 0xe9, 0x0a, 0xa0, 0xd1, 0x7b, 0x98, 0x32,
-	0x7a, 0xd0, 0x33, 0x99, 0xe8, 0x42, 0xa1, 0x0b, 0xb7, 0x1d,
-	0xfe, 0x54, 0x25, 0x8f, 0x6c, 0xc6, 0x8e, 0x24, 0xc7, 0x6d,
-	0x1c, 0xb6, 0x55, 0xff, 0xc5, 0x6f, 0x8c, 0x26, 0x57, 0xfd,
-	0x1e, 0xb4, 0xfc, 0x56, 0xb5, 0x1f, 0x6e, 0xc4, 0x27, 0x8d,
-	0x53, 0xf9, 0x1a, 0xb0, 0xc1, 0x6b, 0x88, 0x22, 0x6a, 0xc0,
-	0x23, 0x89, 0xf8, 0x52, 0xb1, 0x1b, 0x21, 0x8b, 0x68, 0xc2,
-	0xb3, 0x19, 0xfa, 0x50, 0x18, 0xb2, 0x51, 0xfb, 0x8a, 0x20,
-	0xc3, 0x69, 0x62, 0xc8, 0x2b, 0x81, 0xf0, 0x5a, 0xb9, 0x13,
-	0x5b, 0xf1, 0x12, 0xb8, 0xc9, 0x63, 0x80, 0x2a, 0x10, 0xba,
-	0x59, 0xf3, 0x82, 0x28, 0xcb, 0x61, 0x29, 0x83, 0x60, 0xca,
-	0xbb, 0x11, 0xf2, 0x58, 0x86, 0x2c, 0xcf, 0x65, 0x14, 0xbe,
-	0x5d, 0xf7, 0xbf, 0x15, 0xf6, 0x5c, 0x2d, 0x87, 0x64, 0xce,
-	0xf4, 0x5e, 0xbd, 0x17, 0x66, 0xcc, 0x2f, 0x85, 0xcd, 0x67,
-	0x84, 0x2e, 0x5f, 0xf5, 0x16, 0xbc, 0x00, 0xab, 0x4b, 0xe0,
-	0x96, 0x3d, 0xdd, 0x76, 0x31, 0x9a, 0x7a, 0xd1, 0xa7, 0x0c,
-	0xec, 0x47, 0x62, 0xc9, 0x29, 0x82, 0xf4, 0x5f, 0xbf, 0x14,
-	0x53, 0xf8, 0x18, 0xb3, 0xc5, 0x6e, 0x8e, 0x25, 0xc4, 0x6f,
-	0x8f, 0x24, 0x52, 0xf9, 0x19, 0xb2, 0xf5, 0x5e, 0xbe, 0x15,
-	0x63, 0xc8, 0x28, 0x83, 0xa6, 0x0d, 0xed, 0x46, 0x30, 0x9b,
-	0x7b, 0xd0, 0x97, 0x3c, 0xdc, 0x77, 0x01, 0xaa, 0x4a, 0xe1,
-	0x95, 0x3e, 0xde, 0x75, 0x03, 0xa8, 0x48, 0xe3, 0xa4, 0x0f,
-	0xef, 0x44, 0x32, 0x99, 0x79, 0xd2, 0xf7, 0x5c, 0xbc, 0x17,
-	0x61, 0xca, 0x2a, 0x81, 0xc6, 0x6d, 0x8d, 0x26, 0x50, 0xfb,
-	0x1b, 0xb0, 0x51, 0xfa, 0x1a, 0xb1, 0xc7, 0x6c, 0x8c, 0x27,
-	0x60, 0xcb, 0x2b, 0x80, 0xf6, 0x5d, 0xbd, 0x16, 0x33, 0x98,
-	0x78, 0xd3, 0xa5, 0x0e, 0xee, 0x45, 0x02, 0xa9, 0x49, 0xe2,
-	0x94, 0x3f, 0xdf, 0x74, 0x37, 0x9c, 0x7c, 0xd7, 0xa1, 0x0a,
-	0xea, 0x41, 0x06, 0xad, 0x4d, 0xe6, 0x90, 0x3b, 0xdb, 0x70,
-	0x55, 0xfe, 0x1e, 0xb5, 0xc3, 0x68, 0x88, 0x23, 0x64, 0xcf,
-	0x2f, 0x84, 0xf2, 0x59, 0xb9, 0x12, 0xf3, 0x58, 0xb8, 0x13,
-	0x65, 0xce, 0x2e, 0x85, 0xc2, 0x69, 0x89, 0x22, 0x54, 0xff,
-	0x1f, 0xb4, 0x91, 0x3a, 0xda, 0x71, 0x07, 0xac, 0x4c, 0xe7,
-	0xa0, 0x0b, 0xeb, 0x40, 0x36, 0x9d, 0x7d, 0xd6, 0xa2, 0x09,
-	0xe9, 0x42, 0x34, 0x9f, 0x7f, 0xd4, 0x93, 0x38, 0xd8, 0x73,
-	0x05, 0xae, 0x4e, 0xe5, 0xc0, 0x6b, 0x8b, 0x20, 0x56, 0xfd,
-	0x1d, 0xb6, 0xf1, 0x5a, 0xba, 0x11, 0x67, 0xcc, 0x2c, 0x87,
-	0x66, 0xcd, 0x2d, 0x86, 0xf0, 0x5b, 0xbb, 0x10, 0x57, 0xfc,
-	0x1c, 0xb7, 0xc1, 0x6a, 0x8a, 0x21, 0x04, 0xaf, 0x4f, 0xe4,
-	0x92, 0x39, 0xd9, 0x72, 0x35, 0x9e, 0x7e, 0xd5, 0xa3, 0x08,
-	0xe8, 0x43, 0x00, 0xac, 0x45, 0xe9, 0x8a, 0x26, 0xcf, 0x63,
-	0x09, 0xa5, 0x4c, 0xe0, 0x83, 0x2f, 0xc6, 0x6a, 0x12, 0xbe,
-	0x57, 0xfb, 0x98, 0x34, 0xdd, 0x71, 0x1b, 0xb7, 0x5e, 0xf2,
-	0x91, 0x3d, 0xd4, 0x78, 0x24, 0x88, 0x61, 0xcd, 0xae, 0x02,
-	0xeb, 0x47, 0x2d, 0x81, 0x68, 0xc4, 0xa7, 0x0b, 0xe2, 0x4e,
-	0x36, 0x9a, 0x73, 0xdf, 0xbc, 0x10, 0xf9, 0x55, 0x3f, 0x93,
-	0x7a, 0xd6, 0xb5, 0x19, 0xf0, 0x5c, 0x48, 0xe4, 0x0d, 0xa1,
-	0xc2, 0x6e, 0x87, 0x2b, 0x41, 0xed, 0x04, 0xa8, 0xcb, 0x67,
-	0x8e, 0x22, 0x5a, 0xf6, 0x1f, 0xb3, 0xd0, 0x7c, 0x95, 0x39,
-	0x53, 0xff, 0x16, 0xba, 0xd9, 0x75, 0x9c, 0x30, 0x6c, 0xc0,
-	0x29, 0x85, 0xe6, 0x4a, 0xa3, 0x0f, 0x65, 0xc9, 0x20, 0x8c,
-	0xef, 0x43, 0xaa, 0x06, 0x7e, 0xd2, 0x3b, 0x97, 0xf4, 0x58,
-	0xb1, 0x1d, 0x77, 0xdb, 0x32, 0x9e, 0xfd, 0x51, 0xb8, 0x14,
-	0x90, 0x3c, 0xd5, 0x79, 0x1a, 0xb6, 0x5f, 0xf3, 0x99, 0x35,
-	0xdc, 0x70, 0x13, 0xbf, 0x56, 0xfa, 0x82, 0x2e, 0xc7, 0x6b,
-	0x08, 0xa4, 0x4d, 0xe1, 0x8b, 0x27, 0xce, 0x62, 0x01, 0xad,
-	0x44, 0xe8, 0xb4, 0x18, 0xf1, 0x5d, 0x3e, 0x92, 0x7b, 0xd7,
-	0xbd, 0x11, 0xf8, 0x54, 0x37, 0x9b, 0x72, 0xde, 0xa6, 0x0a,
-	0xe3, 0x4f, 0x2c, 0x80, 0x69, 0xc5, 0xaf, 0x03, 0xea, 0x46,
-	0x25, 0x89, 0x60, 0xcc, 0xd8, 0x74, 0x9d, 0x31, 0x52, 0xfe,
-	0x17, 0xbb, 0xd1, 0x7d, 0x94, 0x38, 0x5b, 0xf7, 0x1e, 0xb2,
-	0xca, 0x66, 0x8f, 0x23, 0x40, 0xec, 0x05, 0xa9, 0xc3, 0x6f,
-	0x86, 0x2a, 0x49, 0xe5, 0x0c, 0xa0, 0xfc, 0x50, 0xb9, 0x15,
-	0x76, 0xda, 0x33, 0x9f, 0xf5, 0x59, 0xb0, 0x1c, 0x7f, 0xd3,
-	0x3a, 0x96, 0xee, 0x42, 0xab, 0x07, 0x64, 0xc8, 0x21, 0x8d,
-	0xe7, 0x4b, 0xa2, 0x0e, 0x6d, 0xc1, 0x28, 0x84, 0x00, 0xad,
-	0x47, 0xea, 0x8e, 0x23, 0xc9, 0x64, 0x01, 0xac, 0x46, 0xeb,
-	0x8f, 0x22, 0xc8, 0x65, 0x02, 0xaf, 0x45, 0xe8, 0x8c, 0x21,
-	0xcb, 0x66, 0x03, 0xae, 0x44, 0xe9, 0x8d, 0x20, 0xca, 0x67,
-	0x04, 0xa9, 0x43, 0xee, 0x8a, 0x27, 0xcd, 0x60, 0x05, 0xa8,
-	0x42, 0xef, 0x8b, 0x26, 0xcc, 0x61, 0x06, 0xab, 0x41, 0xec,
-	0x88, 0x25, 0xcf, 0x62, 0x07, 0xaa, 0x40, 0xed, 0x89, 0x24,
-	0xce, 0x63, 0x08, 0xa5, 0x4f, 0xe2, 0x86, 0x2b, 0xc1, 0x6c,
-	0x09, 0xa4, 0x4e, 0xe3, 0x87, 0x2a, 0xc0, 0x6d, 0x0a, 0xa7,
-	0x4d, 0xe0, 0x84, 0x29, 0xc3, 0x6e, 0x0b, 0xa6, 0x4c, 0xe1,
-	0x85, 0x28, 0xc2, 0x6f, 0x0c, 0xa1, 0x4b, 0xe6, 0x82, 0x2f,
-	0xc5, 0x68, 0x0d, 0xa0, 0x4a, 0xe7, 0x83, 0x2e, 0xc4, 0x69,
-	0x0e, 0xa3, 0x49, 0xe4, 0x80, 0x2d, 0xc7, 0x6a, 0x0f, 0xa2,
-	0x48, 0xe5, 0x81, 0x2c, 0xc6, 0x6b, 0x10, 0xbd, 0x57, 0xfa,
-	0x9e, 0x33, 0xd9, 0x74, 0x11, 0xbc, 0x56, 0xfb, 0x9f, 0x32,
-	0xd8, 0x75, 0x12, 0xbf, 0x55, 0xf8, 0x9c, 0x31, 0xdb, 0x76,
-	0x13, 0xbe, 0x54, 0xf9, 0x9d, 0x30, 0xda, 0x77, 0x14, 0xb9,
-	0x53, 0xfe, 0x9a, 0x37, 0xdd, 0x70, 0x15, 0xb8, 0x52, 0xff,
-	0x9b, 0x36, 0xdc, 0x71, 0x16, 0xbb, 0x51, 0xfc, 0x98, 0x35,
-	0xdf, 0x72, 0x17, 0xba, 0x50, 0xfd, 0x99, 0x34, 0xde, 0x73,
-	0x18, 0xb5, 0x5f, 0xf2, 0x96, 0x3b, 0xd1, 0x7c, 0x19, 0xb4,
-	0x5e, 0xf3, 0x97, 0x3a, 0xd0, 0x7d, 0x1a, 0xb7, 0x5d, 0xf0,
-	0x94, 0x39, 0xd3, 0x7e, 0x1b, 0xb6, 0x5c, 0xf1, 0x95, 0x38,
-	0xd2, 0x7f, 0x1c, 0xb1, 0x5b, 0xf6, 0x92, 0x3f, 0xd5, 0x78,
-	0x1d, 0xb0, 0x5a, 0xf7, 0x93, 0x3e, 0xd4, 0x79, 0x1e, 0xb3,
-	0x59, 0xf4, 0x90, 0x3d, 0xd7, 0x7a, 0x1f, 0xb2, 0x58, 0xf5,
-	0x91, 0x3c, 0xd6, 0x7b, 0x00, 0xae, 0x41, 0xef, 0x82, 0x2c,
-	0xc3, 0x6d, 0x19, 0xb7, 0x58, 0xf6, 0x9b, 0x35, 0xda, 0x74,
-	0x32, 0x9c, 0x73, 0xdd, 0xb0, 0x1e, 0xf1, 0x5f, 0x2b, 0x85,
-	0x6a, 0xc4, 0xa9, 0x07, 0xe8, 0x46, 0x64, 0xca, 0x25, 0x8b,
-	0xe6, 0x48, 0xa7, 0x09, 0x7d, 0xd3, 0x3c, 0x92, 0xff, 0x51,
-	0xbe, 0x10, 0x56, 0xf8, 0x17, 0xb9, 0xd4, 0x7a, 0x95, 0x3b,
-	0x4f, 0xe1, 0x0e, 0xa0, 0xcd, 0x63, 0x8c, 0x22, 0xc8, 0x66,
-	0x89, 0x27, 0x4a, 0xe4, 0x0b, 0xa5, 0xd1, 0x7f, 0x90, 0x3e,
-	0x53, 0xfd, 0x12, 0xbc, 0xfa, 0x54, 0xbb, 0x15, 0x78, 0xd6,
-	0x39, 0x97, 0xe3, 0x4d, 0xa2, 0x0c, 0x61, 0xcf, 0x20, 0x8e,
-	0xac, 0x02, 0xed, 0x43, 0x2e, 0x80, 0x6f, 0xc1, 0xb5, 0x1b,
-	0xf4, 0x5a, 0x37, 0x99, 0x76, 0xd8, 0x9e, 0x30, 0xdf, 0x71,
-	0x1c, 0xb2, 0x5d, 0xf3, 0x87, 0x29, 0xc6, 0x68, 0x05, 0xab,
-	0x44, 0xea, 0x8d, 0x23, 0xcc, 0x62, 0x0f, 0xa1, 0x4e, 0xe0,
-	0x94, 0x3a, 0xd5, 0x7b, 0x16, 0xb8, 0x57, 0xf9, 0xbf, 0x11,
-	0xfe, 0x50, 0x3d, 0x93, 0x7c, 0xd2, 0xa6, 0x08, 0xe7, 0x49,
-	0x24, 0x8a, 0x65, 0xcb, 0xe9, 0x47, 0xa8, 0x06, 0x6b, 0xc5,
-	0x2a, 0x84, 0xf0, 0x5e, 0xb1, 0x1f, 0x72, 0xdc, 0x33, 0x9d,
-	0xdb, 0x75, 0x9a, 0x34, 0x59, 0xf7, 0x18, 0xb6, 0xc2, 0x6c,
-	0x83, 0x2d, 0x40, 0xee, 0x01, 0xaf, 0x45, 0xeb, 0x04, 0xaa,
-	0xc7, 0x69, 0x86, 0x28, 0x5c, 0xf2, 0x1d, 0xb3, 0xde, 0x70,
-	0x9f, 0x31, 0x77, 0xd9, 0x36, 0x98, 0xf5, 0x5b, 0xb4, 0x1a,
-	0x6e, 0xc0, 0x2f, 0x81, 0xec, 0x42, 0xad, 0x03, 0x21, 0x8f,
-	0x60, 0xce, 0xa3, 0x0d, 0xe2, 0x4c, 0x38, 0x96, 0x79, 0xd7,
-	0xba, 0x14, 0xfb, 0x55, 0x13, 0xbd, 0x52, 0xfc, 0x91, 0x3f,
-	0xd0, 0x7e, 0x0a, 0xa4, 0x4b, 0xe5, 0x88, 0x26, 0xc9, 0x67,
-	0x00, 0xaf, 0x43, 0xec, 0x86, 0x29, 0xc5, 0x6a, 0x11, 0xbe,
-	0x52, 0xfd, 0x97, 0x38, 0xd4, 0x7b, 0x22, 0x8d, 0x61, 0xce,
-	0xa4, 0x0b, 0xe7, 0x48, 0x33, 0x9c, 0x70, 0xdf, 0xb5, 0x1a,
-	0xf6, 0x59, 0x44, 0xeb, 0x07, 0xa8, 0xc2, 0x6d, 0x81, 0x2e,
-	0x55, 0xfa, 0x16, 0xb9, 0xd3, 0x7c, 0x90, 0x3f, 0x66, 0xc9,
-	0x25, 0x8a, 0xe0, 0x4f, 0xa3, 0x0c, 0x77, 0xd8, 0x34, 0x9b,
-	0xf1, 0x5e, 0xb2, 0x1d, 0x88, 0x27, 0xcb, 0x64, 0x0e, 0xa1,
-	0x4d, 0xe2, 0x99, 0x36, 0xda, 0x75, 0x1f, 0xb0, 0x5c, 0xf3,
-	0xaa, 0x05, 0xe9, 0x46, 0x2c, 0x83, 0x6f, 0xc0, 0xbb, 0x14,
-	0xf8, 0x57, 0x3d, 0x92, 0x7e, 0xd1, 0xcc, 0x63, 0x8f, 0x20,
-	0x4a, 0xe5, 0x09, 0xa6, 0xdd, 0x72, 0x9e, 0x31, 0x5b, 0xf4,
-	0x18, 0xb7, 0xee, 0x41, 0xad, 0x02, 0x68, 0xc7, 0x2b, 0x84,
-	0xff, 0x50, 0xbc, 0x13, 0x79, 0xd6, 0x3a, 0x95, 0x0d, 0xa2,
-	0x4e, 0xe1, 0x8b, 0x24, 0xc8, 0x67, 0x1c, 0xb3, 0x5f, 0xf0,
-	0x9a, 0x35, 0xd9, 0x76, 0x2f, 0x80, 0x6c, 0xc3, 0xa9, 0x06,
-	0xea, 0x45, 0x3e, 0x91, 0x7d, 0xd2, 0xb8, 0x17, 0xfb, 0x54,
-	0x49, 0xe6, 0x0a, 0xa5, 0xcf, 0x60, 0x8c, 0x23, 0x58, 0xf7,
-	0x1b, 0xb4, 0xde, 0x71, 0x9d, 0x32, 0x6b, 0xc4, 0x28, 0x87,
-	0xed, 0x42, 0xae, 0x01, 0x7a, 0xd5, 0x39, 0x96, 0xfc, 0x53,
-	0xbf, 0x10, 0x85, 0x2a, 0xc6, 0x69, 0x03, 0xac, 0x40, 0xef,
-	0x94, 0x3b, 0xd7, 0x78, 0x12, 0xbd, 0x51, 0xfe, 0xa7, 0x08,
-	0xe4, 0x4b, 0x21, 0x8e, 0x62, 0xcd, 0xb6, 0x19, 0xf5, 0x5a,
-	0x30, 0x9f, 0x73, 0xdc, 0xc1, 0x6e, 0x82, 0x2d, 0x47, 0xe8,
-	0x04, 0xab, 0xd0, 0x7f, 0x93, 0x3c, 0x56, 0xf9, 0x15, 0xba,
-	0xe3, 0x4c, 0xa0, 0x0f, 0x65, 0xca, 0x26, 0x89, 0xf2, 0x5d,
-	0xb1, 0x1e, 0x74, 0xdb, 0x37, 0x98, 0x00, 0xb0, 0x7d, 0xcd,
-	0xfa, 0x4a, 0x87, 0x37, 0xe9, 0x59, 0x94, 0x24, 0x13, 0xa3,
-	0x6e, 0xde, 0xcf, 0x7f, 0xb2, 0x02, 0x35, 0x85, 0x48, 0xf8,
-	0x26, 0x96, 0x5b, 0xeb, 0xdc, 0x6c, 0xa1, 0x11, 0x83, 0x33,
-	0xfe, 0x4e, 0x79, 0xc9, 0x04, 0xb4, 0x6a, 0xda, 0x17, 0xa7,
-	0x90, 0x20, 0xed, 0x5d, 0x4c, 0xfc, 0x31, 0x81, 0xb6, 0x06,
-	0xcb, 0x7b, 0xa5, 0x15, 0xd8, 0x68, 0x5f, 0xef, 0x22, 0x92,
-	0x1b, 0xab, 0x66, 0xd6, 0xe1, 0x51, 0x9c, 0x2c, 0xf2, 0x42,
-	0x8f, 0x3f, 0x08, 0xb8, 0x75, 0xc5, 0xd4, 0x64, 0xa9, 0x19,
-	0x2e, 0x9e, 0x53, 0xe3, 0x3d, 0x8d, 0x40, 0xf0, 0xc7, 0x77,
-	0xba, 0x0a, 0x98, 0x28, 0xe5, 0x55, 0x62, 0xd2, 0x1f, 0xaf,
-	0x71, 0xc1, 0x0c, 0xbc, 0x8b, 0x3b, 0xf6, 0x46, 0x57, 0xe7,
-	0x2a, 0x9a, 0xad, 0x1d, 0xd0, 0x60, 0xbe, 0x0e, 0xc3, 0x73,
-	0x44, 0xf4, 0x39, 0x89, 0x36, 0x86, 0x4b, 0xfb, 0xcc, 0x7c,
-	0xb1, 0x01, 0xdf, 0x6f, 0xa2, 0x12, 0x25, 0x95, 0x58, 0xe8,
-	0xf9, 0x49, 0x84, 0x34, 0x03, 0xb3, 0x7e, 0xce, 0x10, 0xa0,
-	0x6d, 0xdd, 0xea, 0x5a, 0x97, 0x27, 0xb5, 0x05, 0xc8, 0x78,
-	0x4f, 0xff, 0x32, 0x82, 0x5c, 0xec, 0x21, 0x91, 0xa6, 0x16,
-	0xdb, 0x6b, 0x7a, 0xca, 0x07, 0xb7, 0x80, 0x30, 0xfd, 0x4d,
-	0x93, 0x23, 0xee, 0x5e, 0x69, 0xd9, 0x14, 0xa4, 0x2d, 0x9d,
-	0x50, 0xe0, 0xd7, 0x67, 0xaa, 0x1a, 0xc4, 0x74, 0xb9, 0x09,
-	0x3e, 0x8e, 0x43, 0xf3, 0xe2, 0x52, 0x9f, 0x2f, 0x18, 0xa8,
-	0x65, 0xd5, 0x0b, 0xbb, 0x76, 0xc6, 0xf1, 0x41, 0x8c, 0x3c,
-	0xae, 0x1e, 0xd3, 0x63, 0x54, 0xe4, 0x29, 0x99, 0x47, 0xf7,
-	0x3a, 0x8a, 0xbd, 0x0d, 0xc0, 0x70, 0x61, 0xd1, 0x1c, 0xac,
-	0x9b, 0x2b, 0xe6, 0x56, 0x88, 0x38, 0xf5, 0x45, 0x72, 0xc2,
-	0x0f, 0xbf, 0x00, 0xb1, 0x7f, 0xce, 0xfe, 0x4f, 0x81, 0x30,
-	0xe1, 0x50, 0x9e, 0x2f, 0x1f, 0xae, 0x60, 0xd1, 0xdf, 0x6e,
-	0xa0, 0x11, 0x21, 0x90, 0x5e, 0xef, 0x3e, 0x8f, 0x41, 0xf0,
-	0xc0, 0x71, 0xbf, 0x0e, 0xa3, 0x12, 0xdc, 0x6d, 0x5d, 0xec,
-	0x22, 0x93, 0x42, 0xf3, 0x3d, 0x8c, 0xbc, 0x0d, 0xc3, 0x72,
-	0x7c, 0xcd, 0x03, 0xb2, 0x82, 0x33, 0xfd, 0x4c, 0x9d, 0x2c,
-	0xe2, 0x53, 0x63, 0xd2, 0x1c, 0xad, 0x5b, 0xea, 0x24, 0x95,
-	0xa5, 0x14, 0xda, 0x6b, 0xba, 0x0b, 0xc5, 0x74, 0x44, 0xf5,
-	0x3b, 0x8a, 0x84, 0x35, 0xfb, 0x4a, 0x7a, 0xcb, 0x05, 0xb4,
-	0x65, 0xd4, 0x1a, 0xab, 0x9b, 0x2a, 0xe4, 0x55, 0xf8, 0x49,
-	0x87, 0x36, 0x06, 0xb7, 0x79, 0xc8, 0x19, 0xa8, 0x66, 0xd7,
-	0xe7, 0x56, 0x98, 0x29, 0x27, 0x96, 0x58, 0xe9, 0xd9, 0x68,
-	0xa6, 0x17, 0xc6, 0x77, 0xb9, 0x08, 0x38, 0x89, 0x47, 0xf6,
-	0xb6, 0x07, 0xc9, 0x78, 0x48, 0xf9, 0x37, 0x86, 0x57, 0xe6,
-	0x28, 0x99, 0xa9, 0x18, 0xd6, 0x67, 0x69, 0xd8, 0x16, 0xa7,
-	0x97, 0x26, 0xe8, 0x59, 0x88, 0x39, 0xf7, 0x46, 0x76, 0xc7,
-	0x09, 0xb8, 0x15, 0xa4, 0x6a, 0xdb, 0xeb, 0x5a, 0x94, 0x25,
-	0xf4, 0x45, 0x8b, 0x3a, 0x0a, 0xbb, 0x75, 0xc4, 0xca, 0x7b,
-	0xb5, 0x04, 0x34, 0x85, 0x4b, 0xfa, 0x2b, 0x9a, 0x54, 0xe5,
-	0xd5, 0x64, 0xaa, 0x1b, 0xed, 0x5c, 0x92, 0x23, 0x13, 0xa2,
-	0x6c, 0xdd, 0x0c, 0xbd, 0x73, 0xc2, 0xf2, 0x43, 0x8d, 0x3c,
-	0x32, 0x83, 0x4d, 0xfc, 0xcc, 0x7d, 0xb3, 0x02, 0xd3, 0x62,
-	0xac, 0x1d, 0x2d, 0x9c, 0x52, 0xe3, 0x4e, 0xff, 0x31, 0x80,
-	0xb0, 0x01, 0xcf, 0x7e, 0xaf, 0x1e, 0xd0, 0x61, 0x51, 0xe0,
-	0x2e, 0x9f, 0x91, 0x20, 0xee, 0x5f, 0x6f, 0xde, 0x10, 0xa1,
-	0x70, 0xc1, 0x0f, 0xbe, 0x8e, 0x3f, 0xf1, 0x40, 0x00, 0xb2,
-	0x79, 0xcb, 0xf2, 0x40, 0x8b, 0x39, 0xf9, 0x4b, 0x80, 0x32,
-	0x0b, 0xb9, 0x72, 0xc0, 0xef, 0x5d, 0x96, 0x24, 0x1d, 0xaf,
-	0x64, 0xd6, 0x16, 0xa4, 0x6f, 0xdd, 0xe4, 0x56, 0x9d, 0x2f,
-	0xc3, 0x71, 0xba, 0x08, 0x31, 0x83, 0x48, 0xfa, 0x3a, 0x88,
-	0x43, 0xf1, 0xc8, 0x7a, 0xb1, 0x03, 0x2c, 0x9e, 0x55, 0xe7,
-	0xde, 0x6c, 0xa7, 0x15, 0xd5, 0x67, 0xac, 0x1e, 0x27, 0x95,
-	0x5e, 0xec, 0x9b, 0x29, 0xe2, 0x50, 0x69, 0xdb, 0x10, 0xa2,
-	0x62, 0xd0, 0x1b, 0xa9, 0x90, 0x22, 0xe9, 0x5b, 0x74, 0xc6,
-	0x0d, 0xbf, 0x86, 0x34, 0xff, 0x4d, 0x8d, 0x3f, 0xf4, 0x46,
-	0x7f, 0xcd, 0x06, 0xb4, 0x58, 0xea, 0x21, 0x93, 0xaa, 0x18,
-	0xd3, 0x61, 0xa1, 0x13, 0xd8, 0x6a, 0x53, 0xe1, 0x2a, 0x98,
-	0xb7, 0x05, 0xce, 0x7c, 0x45, 0xf7, 0x3c, 0x8e, 0x4e, 0xfc,
-	0x37, 0x85, 0xbc, 0x0e, 0xc5, 0x77, 0x2b, 0x99, 0x52, 0xe0,
-	0xd9, 0x6b, 0xa0, 0x12, 0xd2, 0x60, 0xab, 0x19, 0x20, 0x92,
-	0x59, 0xeb, 0xc4, 0x76, 0xbd, 0x0f, 0x36, 0x84, 0x4f, 0xfd,
-	0x3d, 0x8f, 0x44, 0xf6, 0xcf, 0x7d, 0xb6, 0x04, 0xe8, 0x5a,
-	0x91, 0x23, 0x1a, 0xa8, 0x63, 0xd1, 0x11, 0xa3, 0x68, 0xda,
-	0xe3, 0x51, 0x9a, 0x28, 0x07, 0xb5, 0x7e, 0xcc, 0xf5, 0x47,
-	0x8c, 0x3e, 0xfe, 0x4c, 0x87, 0x35, 0x0c, 0xbe, 0x75, 0xc7,
-	0xb0, 0x02, 0xc9, 0x7b, 0x42, 0xf0, 0x3b, 0x89, 0x49, 0xfb,
-	0x30, 0x82, 0xbb, 0x09, 0xc2, 0x70, 0x5f, 0xed, 0x26, 0x94,
-	0xad, 0x1f, 0xd4, 0x66, 0xa6, 0x14, 0xdf, 0x6d, 0x54, 0xe6,
-	0x2d, 0x9f, 0x73, 0xc1, 0x0a, 0xb8, 0x81, 0x33, 0xf8, 0x4a,
-	0x8a, 0x38, 0xf3, 0x41, 0x78, 0xca, 0x01, 0xb3, 0x9c, 0x2e,
-	0xe5, 0x57, 0x6e, 0xdc, 0x17, 0xa5, 0x65, 0xd7, 0x1c, 0xae,
-	0x97, 0x25, 0xee, 0x5c, 0x00, 0xb3, 0x7b, 0xc8, 0xf6, 0x45,
-	0x8d, 0x3e, 0xf1, 0x42, 0x8a, 0x39, 0x07, 0xb4, 0x7c, 0xcf,
-	0xff, 0x4c, 0x84, 0x37, 0x09, 0xba, 0x72, 0xc1, 0x0e, 0xbd,
-	0x75, 0xc6, 0xf8, 0x4b, 0x83, 0x30, 0xe3, 0x50, 0x98, 0x2b,
-	0x15, 0xa6, 0x6e, 0xdd, 0x12, 0xa1, 0x69, 0xda, 0xe4, 0x57,
-	0x9f, 0x2c, 0x1c, 0xaf, 0x67, 0xd4, 0xea, 0x59, 0x91, 0x22,
-	0xed, 0x5e, 0x96, 0x25, 0x1b, 0xa8, 0x60, 0xd3, 0xdb, 0x68,
-	0xa0, 0x13, 0x2d, 0x9e, 0x56, 0xe5, 0x2a, 0x99, 0x51, 0xe2,
-	0xdc, 0x6f, 0xa7, 0x14, 0x24, 0x97, 0x5f, 0xec, 0xd2, 0x61,
-	0xa9, 0x1a, 0xd5, 0x66, 0xae, 0x1d, 0x23, 0x90, 0x58, 0xeb,
-	0x38, 0x8b, 0x43, 0xf0, 0xce, 0x7d, 0xb5, 0x06, 0xc9, 0x7a,
-	0xb2, 0x01, 0x3f, 0x8c, 0x44, 0xf7, 0xc7, 0x74, 0xbc, 0x0f,
-	0x31, 0x82, 0x4a, 0xf9, 0x36, 0x85, 0x4d, 0xfe, 0xc0, 0x73,
-	0xbb, 0x08, 0xab, 0x18, 0xd0, 0x63, 0x5d, 0xee, 0x26, 0x95,
-	0x5a, 0xe9, 0x21, 0x92, 0xac, 0x1f, 0xd7, 0x64, 0x54, 0xe7,
-	0x2f, 0x9c, 0xa2, 0x11, 0xd9, 0x6a, 0xa5, 0x16, 0xde, 0x6d,
-	0x53, 0xe0, 0x28, 0x9b, 0x48, 0xfb, 0x33, 0x80, 0xbe, 0x0d,
-	0xc5, 0x76, 0xb9, 0x0a, 0xc2, 0x71, 0x4f, 0xfc, 0x34, 0x87,
-	0xb7, 0x04, 0xcc, 0x7f, 0x41, 0xf2, 0x3a, 0x89, 0x46, 0xf5,
-	0x3d, 0x8e, 0xb0, 0x03, 0xcb, 0x78, 0x70, 0xc3, 0x0b, 0xb8,
-	0x86, 0x35, 0xfd, 0x4e, 0x81, 0x32, 0xfa, 0x49, 0x77, 0xc4,
-	0x0c, 0xbf, 0x8f, 0x3c, 0xf4, 0x47, 0x79, 0xca, 0x02, 0xb1,
-	0x7e, 0xcd, 0x05, 0xb6, 0x88, 0x3b, 0xf3, 0x40, 0x93, 0x20,
-	0xe8, 0x5b, 0x65, 0xd6, 0x1e, 0xad, 0x62, 0xd1, 0x19, 0xaa,
-	0x94, 0x27, 0xef, 0x5c, 0x6c, 0xdf, 0x17, 0xa4, 0x9a, 0x29,
-	0xe1, 0x52, 0x9d, 0x2e, 0xe6, 0x55, 0x6b, 0xd8, 0x10, 0xa3,
-	0x00, 0xb4, 0x75, 0xc1, 0xea, 0x5e, 0x9f, 0x2b, 0xc9, 0x7d,
-	0xbc, 0x08, 0x23, 0x97, 0x56, 0xe2, 0x8f, 0x3b, 0xfa, 0x4e,
-	0x65, 0xd1, 0x10, 0xa4, 0x46, 0xf2, 0x33, 0x87, 0xac, 0x18,
-	0xd9, 0x6d, 0x03, 0xb7, 0x76, 0xc2, 0xe9, 0x5d, 0x9c, 0x28,
-	0xca, 0x7e, 0xbf, 0x0b, 0x20, 0x94, 0x55, 0xe1, 0x8c, 0x38,
-	0xf9, 0x4d, 0x66, 0xd2, 0x13, 0xa7, 0x45, 0xf1, 0x30, 0x84,
-	0xaf, 0x1b, 0xda, 0x6e, 0x06, 0xb2, 0x73, 0xc7, 0xec, 0x58,
-	0x99, 0x2d, 0xcf, 0x7b, 0xba, 0x0e, 0x25, 0x91, 0x50, 0xe4,
-	0x89, 0x3d, 0xfc, 0x48, 0x63, 0xd7, 0x16, 0xa2, 0x40, 0xf4,
-	0x35, 0x81, 0xaa, 0x1e, 0xdf, 0x6b, 0x05, 0xb1, 0x70, 0xc4,
-	0xef, 0x5b, 0x9a, 0x2e, 0xcc, 0x78, 0xb9, 0x0d, 0x26, 0x92,
-	0x53, 0xe7, 0x8a, 0x3e, 0xff, 0x4b, 0x60, 0xd4, 0x15, 0xa1,
-	0x43, 0xf7, 0x36, 0x82, 0xa9, 0x1d, 0xdc, 0x68, 0x0c, 0xb8,
-	0x79, 0xcd, 0xe6, 0x52, 0x93, 0x27, 0xc5, 0x71, 0xb0, 0x04,
-	0x2f, 0x9b, 0x5a, 0xee, 0x83, 0x37, 0xf6, 0x42, 0x69, 0xdd,
-	0x1c, 0xa8, 0x4a, 0xfe, 0x3f, 0x8b, 0xa0, 0x14, 0xd5, 0x61,
-	0x0f, 0xbb, 0x7a, 0xce, 0xe5, 0x51, 0x90, 0x24, 0xc6, 0x72,
-	0xb3, 0x07, 0x2c, 0x98, 0x59, 0xed, 0x80, 0x34, 0xf5, 0x41,
-	0x6a, 0xde, 0x1f, 0xab, 0x49, 0xfd, 0x3c, 0x88, 0xa3, 0x17,
-	0xd6, 0x62, 0x0a, 0xbe, 0x7f, 0xcb, 0xe0, 0x54, 0x95, 0x21,
-	0xc3, 0x77, 0xb6, 0x02, 0x29, 0x9d, 0x5c, 0xe8, 0x85, 0x31,
-	0xf0, 0x44, 0x6f, 0xdb, 0x1a, 0xae, 0x4c, 0xf8, 0x39, 0x8d,
-	0xa6, 0x12, 0xd3, 0x67, 0x09, 0xbd, 0x7c, 0xc8, 0xe3, 0x57,
-	0x96, 0x22, 0xc0, 0x74, 0xb5, 0x01, 0x2a, 0x9e, 0x5f, 0xeb,
-	0x86, 0x32, 0xf3, 0x47, 0x6c, 0xd8, 0x19, 0xad, 0x4f, 0xfb,
-	0x3a, 0x8e, 0xa5, 0x11, 0xd0, 0x64, 0x00, 0xb5, 0x77, 0xc2,
-	0xee, 0x5b, 0x99, 0x2c, 0xc1, 0x74, 0xb6, 0x03, 0x2f, 0x9a,
-	0x58, 0xed, 0x9f, 0x2a, 0xe8, 0x5d, 0x71, 0xc4, 0x06, 0xb3,
-	0x5e, 0xeb, 0x29, 0x9c, 0xb0, 0x05, 0xc7, 0x72, 0x23, 0x96,
-	0x54, 0xe1, 0xcd, 0x78, 0xba, 0x0f, 0xe2, 0x57, 0x95, 0x20,
-	0x0c, 0xb9, 0x7b, 0xce, 0xbc, 0x09, 0xcb, 0x7e, 0x52, 0xe7,
-	0x25, 0x90, 0x7d, 0xc8, 0x0a, 0xbf, 0x93, 0x26, 0xe4, 0x51,
-	0x46, 0xf3, 0x31, 0x84, 0xa8, 0x1d, 0xdf, 0x6a, 0x87, 0x32,
-	0xf0, 0x45, 0x69, 0xdc, 0x1e, 0xab, 0xd9, 0x6c, 0xae, 0x1b,
-	0x37, 0x82, 0x40, 0xf5, 0x18, 0xad, 0x6f, 0xda, 0xf6, 0x43,
-	0x81, 0x34, 0x65, 0xd0, 0x12, 0xa7, 0x8b, 0x3e, 0xfc, 0x49,
-	0xa4, 0x11, 0xd3, 0x66, 0x4a, 0xff, 0x3d, 0x88, 0xfa, 0x4f,
-	0x8d, 0x38, 0x14, 0xa1, 0x63, 0xd6, 0x3b, 0x8e, 0x4c, 0xf9,
-	0xd5, 0x60, 0xa2, 0x17, 0x8c, 0x39, 0xfb, 0x4e, 0x62, 0xd7,
-	0x15, 0xa0, 0x4d, 0xf8, 0x3a, 0x8f, 0xa3, 0x16, 0xd4, 0x61,
-	0x13, 0xa6, 0x64, 0xd1, 0xfd, 0x48, 0x8a, 0x3f, 0xd2, 0x67,
-	0xa5, 0x10, 0x3c, 0x89, 0x4b, 0xfe, 0xaf, 0x1a, 0xd8, 0x6d,
-	0x41, 0xf4, 0x36, 0x83, 0x6e, 0xdb, 0x19, 0xac, 0x80, 0x35,
-	0xf7, 0x42, 0x30, 0x85, 0x47, 0xf2, 0xde, 0x6b, 0xa9, 0x1c,
-	0xf1, 0x44, 0x86, 0x33, 0x1f, 0xaa, 0x68, 0xdd, 0xca, 0x7f,
-	0xbd, 0x08, 0x24, 0x91, 0x53, 0xe6, 0x0b, 0xbe, 0x7c, 0xc9,
-	0xe5, 0x50, 0x92, 0x27, 0x55, 0xe0, 0x22, 0x97, 0xbb, 0x0e,
-	0xcc, 0x79, 0x94, 0x21, 0xe3, 0x56, 0x7a, 0xcf, 0x0d, 0xb8,
-	0xe9, 0x5c, 0x9e, 0x2b, 0x07, 0xb2, 0x70, 0xc5, 0x28, 0x9d,
-	0x5f, 0xea, 0xc6, 0x73, 0xb1, 0x04, 0x76, 0xc3, 0x01, 0xb4,
-	0x98, 0x2d, 0xef, 0x5a, 0xb7, 0x02, 0xc0, 0x75, 0x59, 0xec,
-	0x2e, 0x9b, 0x00, 0xb6, 0x71, 0xc7, 0xe2, 0x54, 0x93, 0x25,
-	0xd9, 0x6f, 0xa8, 0x1e, 0x3b, 0x8d, 0x4a, 0xfc, 0xaf, 0x19,
-	0xde, 0x68, 0x4d, 0xfb, 0x3c, 0x8a, 0x76, 0xc0, 0x07, 0xb1,
-	0x94, 0x22, 0xe5, 0x53, 0x43, 0xf5, 0x32, 0x84, 0xa1, 0x17,
-	0xd0, 0x66, 0x9a, 0x2c, 0xeb, 0x5d, 0x78, 0xce, 0x09, 0xbf,
-	0xec, 0x5a, 0x9d, 0x2b, 0x0e, 0xb8, 0x7f, 0xc9, 0x35, 0x83,
-	0x44, 0xf2, 0xd7, 0x61, 0xa6, 0x10, 0x86, 0x30, 0xf7, 0x41,
-	0x64, 0xd2, 0x15, 0xa3, 0x5f, 0xe9, 0x2e, 0x98, 0xbd, 0x0b,
-	0xcc, 0x7a, 0x29, 0x9f, 0x58, 0xee, 0xcb, 0x7d, 0xba, 0x0c,
-	0xf0, 0x46, 0x81, 0x37, 0x12, 0xa4, 0x63, 0xd5, 0xc5, 0x73,
-	0xb4, 0x02, 0x27, 0x91, 0x56, 0xe0, 0x1c, 0xaa, 0x6d, 0xdb,
-	0xfe, 0x48, 0x8f, 0x39, 0x6a, 0xdc, 0x1b, 0xad, 0x88, 0x3e,
-	0xf9, 0x4f, 0xb3, 0x05, 0xc2, 0x74, 0x51, 0xe7, 0x20, 0x96,
-	0x11, 0xa7, 0x60, 0xd6, 0xf3, 0x45, 0x82, 0x34, 0xc8, 0x7e,
-	0xb9, 0x0f, 0x2a, 0x9c, 0x5b, 0xed, 0xbe, 0x08, 0xcf, 0x79,
-	0x5c, 0xea, 0x2d, 0x9b, 0x67, 0xd1, 0x16, 0xa0, 0x85, 0x33,
-	0xf4, 0x42, 0x52, 0xe4, 0x23, 0x95, 0xb0, 0x06, 0xc1, 0x77,
-	0x8b, 0x3d, 0xfa, 0x4c, 0x69, 0xdf, 0x18, 0xae, 0xfd, 0x4b,
-	0x8c, 0x3a, 0x1f, 0xa9, 0x6e, 0xd8, 0x24, 0x92, 0x55, 0xe3,
-	0xc6, 0x70, 0xb7, 0x01, 0x97, 0x21, 0xe6, 0x50, 0x75, 0xc3,
-	0x04, 0xb2, 0x4e, 0xf8, 0x3f, 0x89, 0xac, 0x1a, 0xdd, 0x6b,
-	0x38, 0x8e, 0x49, 0xff, 0xda, 0x6c, 0xab, 0x1d, 0xe1, 0x57,
-	0x90, 0x26, 0x03, 0xb5, 0x72, 0xc4, 0xd4, 0x62, 0xa5, 0x13,
-	0x36, 0x80, 0x47, 0xf1, 0x0d, 0xbb, 0x7c, 0xca, 0xef, 0x59,
-	0x9e, 0x28, 0x7b, 0xcd, 0x0a, 0xbc, 0x99, 0x2f, 0xe8, 0x5e,
-	0xa2, 0x14, 0xd3, 0x65, 0x40, 0xf6, 0x31, 0x87, 0x00, 0xb7,
-	0x73, 0xc4, 0xe6, 0x51, 0x95, 0x22, 0xd1, 0x66, 0xa2, 0x15,
-	0x37, 0x80, 0x44, 0xf3, 0xbf, 0x08, 0xcc, 0x7b, 0x59, 0xee,
-	0x2a, 0x9d, 0x6e, 0xd9, 0x1d, 0xaa, 0x88, 0x3f, 0xfb, 0x4c,
-	0x63, 0xd4, 0x10, 0xa7, 0x85, 0x32, 0xf6, 0x41, 0xb2, 0x05,
-	0xc1, 0x76, 0x54, 0xe3, 0x27, 0x90, 0xdc, 0x6b, 0xaf, 0x18,
-	0x3a, 0x8d, 0x49, 0xfe, 0x0d, 0xba, 0x7e, 0xc9, 0xeb, 0x5c,
-	0x98, 0x2f, 0xc6, 0x71, 0xb5, 0x02, 0x20, 0x97, 0x53, 0xe4,
-	0x17, 0xa0, 0x64, 0xd3, 0xf1, 0x46, 0x82, 0x35, 0x79, 0xce,
-	0x0a, 0xbd, 0x9f, 0x28, 0xec, 0x5b, 0xa8, 0x1f, 0xdb, 0x6c,
-	0x4e, 0xf9, 0x3d, 0x8a, 0xa5, 0x12, 0xd6, 0x61, 0x43, 0xf4,
-	0x30, 0x87, 0x74, 0xc3, 0x07, 0xb0, 0x92, 0x25, 0xe1, 0x56,
-	0x1a, 0xad, 0x69, 0xde, 0xfc, 0x4b, 0x8f, 0x38, 0xcb, 0x7c,
-	0xb8, 0x0f, 0x2d, 0x9a, 0x5e, 0xe9, 0x91, 0x26, 0xe2, 0x55,
-	0x77, 0xc0, 0x04, 0xb3, 0x40, 0xf7, 0x33, 0x84, 0xa6, 0x11,
-	0xd5, 0x62, 0x2e, 0x99, 0x5d, 0xea, 0xc8, 0x7f, 0xbb, 0x0c,
-	0xff, 0x48, 0x8c, 0x3b, 0x19, 0xae, 0x6a, 0xdd, 0xf2, 0x45,
-	0x81, 0x36, 0x14, 0xa3, 0x67, 0xd0, 0x23, 0x94, 0x50, 0xe7,
-	0xc5, 0x72, 0xb6, 0x01, 0x4d, 0xfa, 0x3e, 0x89, 0xab, 0x1c,
-	0xd8, 0x6f, 0x9c, 0x2b, 0xef, 0x58, 0x7a, 0xcd, 0x09, 0xbe,
-	0x57, 0xe0, 0x24, 0x93, 0xb1, 0x06, 0xc2, 0x75, 0x86, 0x31,
-	0xf5, 0x42, 0x60, 0xd7, 0x13, 0xa4, 0xe8, 0x5f, 0x9b, 0x2c,
-	0x0e, 0xb9, 0x7d, 0xca, 0x39, 0x8e, 0x4a, 0xfd, 0xdf, 0x68,
-	0xac, 0x1b, 0x34, 0x83, 0x47, 0xf0, 0xd2, 0x65, 0xa1, 0x16,
-	0xe5, 0x52, 0x96, 0x21, 0x03, 0xb4, 0x70, 0xc7, 0x8b, 0x3c,
-	0xf8, 0x4f, 0x6d, 0xda, 0x1e, 0xa9, 0x5a, 0xed, 0x29, 0x9e,
-	0xbc, 0x0b, 0xcf, 0x78, 0x00, 0xb8, 0x6d, 0xd5, 0xda, 0x62,
-	0xb7, 0x0f, 0xa9, 0x11, 0xc4, 0x7c, 0x73, 0xcb, 0x1e, 0xa6,
-	0x4f, 0xf7, 0x22, 0x9a, 0x95, 0x2d, 0xf8, 0x40, 0xe6, 0x5e,
-	0x8b, 0x33, 0x3c, 0x84, 0x51, 0xe9, 0x9e, 0x26, 0xf3, 0x4b,
-	0x44, 0xfc, 0x29, 0x91, 0x37, 0x8f, 0x5a, 0xe2, 0xed, 0x55,
-	0x80, 0x38, 0xd1, 0x69, 0xbc, 0x04, 0x0b, 0xb3, 0x66, 0xde,
-	0x78, 0xc0, 0x15, 0xad, 0xa2, 0x1a, 0xcf, 0x77, 0x21, 0x99,
-	0x4c, 0xf4, 0xfb, 0x43, 0x96, 0x2e, 0x88, 0x30, 0xe5, 0x5d,
-	0x52, 0xea, 0x3f, 0x87, 0x6e, 0xd6, 0x03, 0xbb, 0xb4, 0x0c,
-	0xd9, 0x61, 0xc7, 0x7f, 0xaa, 0x12, 0x1d, 0xa5, 0x70, 0xc8,
-	0xbf, 0x07, 0xd2, 0x6a, 0x65, 0xdd, 0x08, 0xb0, 0x16, 0xae,
-	0x7b, 0xc3, 0xcc, 0x74, 0xa1, 0x19, 0xf0, 0x48, 0x9d, 0x25,
-	0x2a, 0x92, 0x47, 0xff, 0x59, 0xe1, 0x34, 0x8c, 0x83, 0x3b,
-	0xee, 0x56, 0x42, 0xfa, 0x2f, 0x97, 0x98, 0x20, 0xf5, 0x4d,
-	0xeb, 0x53, 0x86, 0x3e, 0x31, 0x89, 0x5c, 0xe4, 0x0d, 0xb5,
-	0x60, 0xd8, 0xd7, 0x6f, 0xba, 0x02, 0xa4, 0x1c, 0xc9, 0x71,
-	0x7e, 0xc6, 0x13, 0xab, 0xdc, 0x64, 0xb1, 0x09, 0x06, 0xbe,
-	0x6b, 0xd3, 0x75, 0xcd, 0x18, 0xa0, 0xaf, 0x17, 0xc2, 0x7a,
-	0x93, 0x2b, 0xfe, 0x46, 0x49, 0xf1, 0x24, 0x9c, 0x3a, 0x82,
-	0x57, 0xef, 0xe0, 0x58, 0x8d, 0x35, 0x63, 0xdb, 0x0e, 0xb6,
-	0xb9, 0x01, 0xd4, 0x6c, 0xca, 0x72, 0xa7, 0x1f, 0x10, 0xa8,
-	0x7d, 0xc5, 0x2c, 0x94, 0x41, 0xf9, 0xf6, 0x4e, 0x9b, 0x23,
-	0x85, 0x3d, 0xe8, 0x50, 0x5f, 0xe7, 0x32, 0x8a, 0xfd, 0x45,
-	0x90, 0x28, 0x27, 0x9f, 0x4a, 0xf2, 0x54, 0xec, 0x39, 0x81,
-	0x8e, 0x36, 0xe3, 0x5b, 0xb2, 0x0a, 0xdf, 0x67, 0x68, 0xd0,
-	0x05, 0xbd, 0x1b, 0xa3, 0x76, 0xce, 0xc1, 0x79, 0xac, 0x14,
-	0x00, 0xb9, 0x6f, 0xd6, 0xde, 0x67, 0xb1, 0x08, 0xa1, 0x18,
-	0xce, 0x77, 0x7f, 0xc6, 0x10, 0xa9, 0x5f, 0xe6, 0x30, 0x89,
-	0x81, 0x38, 0xee, 0x57, 0xfe, 0x47, 0x91, 0x28, 0x20, 0x99,
-	0x4f, 0xf6, 0xbe, 0x07, 0xd1, 0x68, 0x60, 0xd9, 0x0f, 0xb6,
-	0x1f, 0xa6, 0x70, 0xc9, 0xc1, 0x78, 0xae, 0x17, 0xe1, 0x58,
-	0x8e, 0x37, 0x3f, 0x86, 0x50, 0xe9, 0x40, 0xf9, 0x2f, 0x96,
-	0x9e, 0x27, 0xf1, 0x48, 0x61, 0xd8, 0x0e, 0xb7, 0xbf, 0x06,
-	0xd0, 0x69, 0xc0, 0x79, 0xaf, 0x16, 0x1e, 0xa7, 0x71, 0xc8,
-	0x3e, 0x87, 0x51, 0xe8, 0xe0, 0x59, 0x8f, 0x36, 0x9f, 0x26,
-	0xf0, 0x49, 0x41, 0xf8, 0x2e, 0x97, 0xdf, 0x66, 0xb0, 0x09,
-	0x01, 0xb8, 0x6e, 0xd7, 0x7e, 0xc7, 0x11, 0xa8, 0xa0, 0x19,
-	0xcf, 0x76, 0x80, 0x39, 0xef, 0x56, 0x5e, 0xe7, 0x31, 0x88,
-	0x21, 0x98, 0x4e, 0xf7, 0xff, 0x46, 0x90, 0x29, 0xc2, 0x7b,
-	0xad, 0x14, 0x1c, 0xa5, 0x73, 0xca, 0x63, 0xda, 0x0c, 0xb5,
-	0xbd, 0x04, 0xd2, 0x6b, 0x9d, 0x24, 0xf2, 0x4b, 0x43, 0xfa,
-	0x2c, 0x95, 0x3c, 0x85, 0x53, 0xea, 0xe2, 0x5b, 0x8d, 0x34,
-	0x7c, 0xc5, 0x13, 0xaa, 0xa2, 0x1b, 0xcd, 0x74, 0xdd, 0x64,
-	0xb2, 0x0b, 0x03, 0xba, 0x6c, 0xd5, 0x23, 0x9a, 0x4c, 0xf5,
-	0xfd, 0x44, 0x92, 0x2b, 0x82, 0x3b, 0xed, 0x54, 0x5c, 0xe5,
-	0x33, 0x8a, 0xa3, 0x1a, 0xcc, 0x75, 0x7d, 0xc4, 0x12, 0xab,
-	0x02, 0xbb, 0x6d, 0xd4, 0xdc, 0x65, 0xb3, 0x0a, 0xfc, 0x45,
-	0x93, 0x2a, 0x22, 0x9b, 0x4d, 0xf4, 0x5d, 0xe4, 0x32, 0x8b,
-	0x83, 0x3a, 0xec, 0x55, 0x1d, 0xa4, 0x72, 0xcb, 0xc3, 0x7a,
-	0xac, 0x15, 0xbc, 0x05, 0xd3, 0x6a, 0x62, 0xdb, 0x0d, 0xb4,
-	0x42, 0xfb, 0x2d, 0x94, 0x9c, 0x25, 0xf3, 0x4a, 0xe3, 0x5a,
-	0x8c, 0x35, 0x3d, 0x84, 0x52, 0xeb, 0x00, 0xba, 0x69, 0xd3,
-	0xd2, 0x68, 0xbb, 0x01, 0xb9, 0x03, 0xd0, 0x6a, 0x6b, 0xd1,
-	0x02, 0xb8, 0x6f, 0xd5, 0x06, 0xbc, 0xbd, 0x07, 0xd4, 0x6e,
-	0xd6, 0x6c, 0xbf, 0x05, 0x04, 0xbe, 0x6d, 0xd7, 0xde, 0x64,
-	0xb7, 0x0d, 0x0c, 0xb6, 0x65, 0xdf, 0x67, 0xdd, 0x0e, 0xb4,
-	0xb5, 0x0f, 0xdc, 0x66, 0xb1, 0x0b, 0xd8, 0x62, 0x63, 0xd9,
-	0x0a, 0xb0, 0x08, 0xb2, 0x61, 0xdb, 0xda, 0x60, 0xb3, 0x09,
-	0xa1, 0x1b, 0xc8, 0x72, 0x73, 0xc9, 0x1a, 0xa0, 0x18, 0xa2,
-	0x71, 0xcb, 0xca, 0x70, 0xa3, 0x19, 0xce, 0x74, 0xa7, 0x1d,
-	0x1c, 0xa6, 0x75, 0xcf, 0x77, 0xcd, 0x1e, 0xa4, 0xa5, 0x1f,
-	0xcc, 0x76, 0x7f, 0xc5, 0x16, 0xac, 0xad, 0x17, 0xc4, 0x7e,
-	0xc6, 0x7c, 0xaf, 0x15, 0x14, 0xae, 0x7d, 0xc7, 0x10, 0xaa,
-	0x79, 0xc3, 0xc2, 0x78, 0xab, 0x11, 0xa9, 0x13, 0xc0, 0x7a,
-	0x7b, 0xc1, 0x12, 0xa8, 0x5f, 0xe5, 0x36, 0x8c, 0x8d, 0x37,
-	0xe4, 0x5e, 0xe6, 0x5c, 0x8f, 0x35, 0x34, 0x8e, 0x5d, 0xe7,
-	0x30, 0x8a, 0x59, 0xe3, 0xe2, 0x58, 0x8b, 0x31, 0x89, 0x33,
-	0xe0, 0x5a, 0x5b, 0xe1, 0x32, 0x88, 0x81, 0x3b, 0xe8, 0x52,
-	0x53, 0xe9, 0x3a, 0x80, 0x38, 0x82, 0x51, 0xeb, 0xea, 0x50,
-	0x83, 0x39, 0xee, 0x54, 0x87, 0x3d, 0x3c, 0x86, 0x55, 0xef,
-	0x57, 0xed, 0x3e, 0x84, 0x85, 0x3f, 0xec, 0x56, 0xfe, 0x44,
-	0x97, 0x2d, 0x2c, 0x96, 0x45, 0xff, 0x47, 0xfd, 0x2e, 0x94,
-	0x95, 0x2f, 0xfc, 0x46, 0x91, 0x2b, 0xf8, 0x42, 0x43, 0xf9,
-	0x2a, 0x90, 0x28, 0x92, 0x41, 0xfb, 0xfa, 0x40, 0x93, 0x29,
-	0x20, 0x9a, 0x49, 0xf3, 0xf2, 0x48, 0x9b, 0x21, 0x99, 0x23,
-	0xf0, 0x4a, 0x4b, 0xf1, 0x22, 0x98, 0x4f, 0xf5, 0x26, 0x9c,
-	0x9d, 0x27, 0xf4, 0x4e, 0xf6, 0x4c, 0x9f, 0x25, 0x24, 0x9e,
-	0x4d, 0xf7, 0x00, 0xbb, 0x6b, 0xd0, 0xd6, 0x6d, 0xbd, 0x06,
-	0xb1, 0x0a, 0xda, 0x61, 0x67, 0xdc, 0x0c, 0xb7, 0x7f, 0xc4,
-	0x14, 0xaf, 0xa9, 0x12, 0xc2, 0x79, 0xce, 0x75, 0xa5, 0x1e,
-	0x18, 0xa3, 0x73, 0xc8, 0xfe, 0x45, 0x95, 0x2e, 0x28, 0x93,
-	0x43, 0xf8, 0x4f, 0xf4, 0x24, 0x9f, 0x99, 0x22, 0xf2, 0x49,
-	0x81, 0x3a, 0xea, 0x51, 0x57, 0xec, 0x3c, 0x87, 0x30, 0x8b,
-	0x5b, 0xe0, 0xe6, 0x5d, 0x8d, 0x36, 0xe1, 0x5a, 0x8a, 0x31,
-	0x37, 0x8c, 0x5c, 0xe7, 0x50, 0xeb, 0x3b, 0x80, 0x86, 0x3d,
-	0xed, 0x56, 0x9e, 0x25, 0xf5, 0x4e, 0x48, 0xf3, 0x23, 0x98,
-	0x2f, 0x94, 0x44, 0xff, 0xf9, 0x42, 0x92, 0x29, 0x1f, 0xa4,
-	0x74, 0xcf, 0xc9, 0x72, 0xa2, 0x19, 0xae, 0x15, 0xc5, 0x7e,
-	0x78, 0xc3, 0x13, 0xa8, 0x60, 0xdb, 0x0b, 0xb0, 0xb6, 0x0d,
-	0xdd, 0x66, 0xd1, 0x6a, 0xba, 0x01, 0x07, 0xbc, 0x6c, 0xd7,
-	0xdf, 0x64, 0xb4, 0x0f, 0x09, 0xb2, 0x62, 0xd9, 0x6e, 0xd5,
-	0x05, 0xbe, 0xb8, 0x03, 0xd3, 0x68, 0xa0, 0x1b, 0xcb, 0x70,
-	0x76, 0xcd, 0x1d, 0xa6, 0x11, 0xaa, 0x7a, 0xc1, 0xc7, 0x7c,
-	0xac, 0x17, 0x21, 0x9a, 0x4a, 0xf1, 0xf7, 0x4c, 0x9c, 0x27,
-	0x90, 0x2b, 0xfb, 0x40, 0x46, 0xfd, 0x2d, 0x96, 0x5e, 0xe5,
-	0x35, 0x8e, 0x88, 0x33, 0xe3, 0x58, 0xef, 0x54, 0x84, 0x3f,
-	0x39, 0x82, 0x52, 0xe9, 0x3e, 0x85, 0x55, 0xee, 0xe8, 0x53,
-	0x83, 0x38, 0x8f, 0x34, 0xe4, 0x5f, 0x59, 0xe2, 0x32, 0x89,
-	0x41, 0xfa, 0x2a, 0x91, 0x97, 0x2c, 0xfc, 0x47, 0xf0, 0x4b,
-	0x9b, 0x20, 0x26, 0x9d, 0x4d, 0xf6, 0xc0, 0x7b, 0xab, 0x10,
-	0x16, 0xad, 0x7d, 0xc6, 0x71, 0xca, 0x1a, 0xa1, 0xa7, 0x1c,
-	0xcc, 0x77, 0xbf, 0x04, 0xd4, 0x6f, 0x69, 0xd2, 0x02, 0xb9,
-	0x0e, 0xb5, 0x65, 0xde, 0xd8, 0x63, 0xb3, 0x08, 0x00, 0xbc,
-	0x65, 0xd9, 0xca, 0x76, 0xaf, 0x13, 0x89, 0x35, 0xec, 0x50,
-	0x43, 0xff, 0x26, 0x9a, 0x0f, 0xb3, 0x6a, 0xd6, 0xc5, 0x79,
-	0xa0, 0x1c, 0x86, 0x3a, 0xe3, 0x5f, 0x4c, 0xf0, 0x29, 0x95,
-	0x1e, 0xa2, 0x7b, 0xc7, 0xd4, 0x68, 0xb1, 0x0d, 0x97, 0x2b,
-	0xf2, 0x4e, 0x5d, 0xe1, 0x38, 0x84, 0x11, 0xad, 0x74, 0xc8,
-	0xdb, 0x67, 0xbe, 0x02, 0x98, 0x24, 0xfd, 0x41, 0x52, 0xee,
-	0x37, 0x8b, 0x3c, 0x80, 0x59, 0xe5, 0xf6, 0x4a, 0x93, 0x2f,
-	0xb5, 0x09, 0xd0, 0x6c, 0x7f, 0xc3, 0x1a, 0xa6, 0x33, 0x8f,
-	0x56, 0xea, 0xf9, 0x45, 0x9c, 0x20, 0xba, 0x06, 0xdf, 0x63,
-	0x70, 0xcc, 0x15, 0xa9, 0x22, 0x9e, 0x47, 0xfb, 0xe8, 0x54,
-	0x8d, 0x31, 0xab, 0x17, 0xce, 0x72, 0x61, 0xdd, 0x04, 0xb8,
-	0x2d, 0x91, 0x48, 0xf4, 0xe7, 0x5b, 0x82, 0x3e, 0xa4, 0x18,
-	0xc1, 0x7d, 0x6e, 0xd2, 0x0b, 0xb7, 0x78, 0xc4, 0x1d, 0xa1,
-	0xb2, 0x0e, 0xd7, 0x6b, 0xf1, 0x4d, 0x94, 0x28, 0x3b, 0x87,
-	0x5e, 0xe2, 0x77, 0xcb, 0x12, 0xae, 0xbd, 0x01, 0xd8, 0x64,
-	0xfe, 0x42, 0x9b, 0x27, 0x34, 0x88, 0x51, 0xed, 0x66, 0xda,
-	0x03, 0xbf, 0xac, 0x10, 0xc9, 0x75, 0xef, 0x53, 0x8a, 0x36,
-	0x25, 0x99, 0x40, 0xfc, 0x69, 0xd5, 0x0c, 0xb0, 0xa3, 0x1f,
-	0xc6, 0x7a, 0xe0, 0x5c, 0x85, 0x39, 0x2a, 0x96, 0x4f, 0xf3,
-	0x44, 0xf8, 0x21, 0x9d, 0x8e, 0x32, 0xeb, 0x57, 0xcd, 0x71,
-	0xa8, 0x14, 0x07, 0xbb, 0x62, 0xde, 0x4b, 0xf7, 0x2e, 0x92,
-	0x81, 0x3d, 0xe4, 0x58, 0xc2, 0x7e, 0xa7, 0x1b, 0x08, 0xb4,
-	0x6d, 0xd1, 0x5a, 0xe6, 0x3f, 0x83, 0x90, 0x2c, 0xf5, 0x49,
-	0xd3, 0x6f, 0xb6, 0x0a, 0x19, 0xa5, 0x7c, 0xc0, 0x55, 0xe9,
-	0x30, 0x8c, 0x9f, 0x23, 0xfa, 0x46, 0xdc, 0x60, 0xb9, 0x05,
-	0x16, 0xaa, 0x73, 0xcf, 0x00, 0xbd, 0x67, 0xda, 0xce, 0x73,
-	0xa9, 0x14, 0x81, 0x3c, 0xe6, 0x5b, 0x4f, 0xf2, 0x28, 0x95,
-	0x1f, 0xa2, 0x78, 0xc5, 0xd1, 0x6c, 0xb6, 0x0b, 0x9e, 0x23,
-	0xf9, 0x44, 0x50, 0xed, 0x37, 0x8a, 0x3e, 0x83, 0x59, 0xe4,
-	0xf0, 0x4d, 0x97, 0x2a, 0xbf, 0x02, 0xd8, 0x65, 0x71, 0xcc,
-	0x16, 0xab, 0x21, 0x9c, 0x46, 0xfb, 0xef, 0x52, 0x88, 0x35,
-	0xa0, 0x1d, 0xc7, 0x7a, 0x6e, 0xd3, 0x09, 0xb4, 0x7c, 0xc1,
-	0x1b, 0xa6, 0xb2, 0x0f, 0xd5, 0x68, 0xfd, 0x40, 0x9a, 0x27,
-	0x33, 0x8e, 0x54, 0xe9, 0x63, 0xde, 0x04, 0xb9, 0xad, 0x10,
-	0xca, 0x77, 0xe2, 0x5f, 0x85, 0x38, 0x2c, 0x91, 0x4b, 0xf6,
-	0x42, 0xff, 0x25, 0x98, 0x8c, 0x31, 0xeb, 0x56, 0xc3, 0x7e,
-	0xa4, 0x19, 0x0d, 0xb0, 0x6a, 0xd7, 0x5d, 0xe0, 0x3a, 0x87,
-	0x93, 0x2e, 0xf4, 0x49, 0xdc, 0x61, 0xbb, 0x06, 0x12, 0xaf,
-	0x75, 0xc8, 0xf8, 0x45, 0x9f, 0x22, 0x36, 0x8b, 0x51, 0xec,
-	0x79, 0xc4, 0x1e, 0xa3, 0xb7, 0x0a, 0xd0, 0x6d, 0xe7, 0x5a,
-	0x80, 0x3d, 0x29, 0x94, 0x4e, 0xf3, 0x66, 0xdb, 0x01, 0xbc,
-	0xa8, 0x15, 0xcf, 0x72, 0xc6, 0x7b, 0xa1, 0x1c, 0x08, 0xb5,
-	0x6f, 0xd2, 0x47, 0xfa, 0x20, 0x9d, 0x89, 0x34, 0xee, 0x53,
-	0xd9, 0x64, 0xbe, 0x03, 0x17, 0xaa, 0x70, 0xcd, 0x58, 0xe5,
-	0x3f, 0x82, 0x96, 0x2b, 0xf1, 0x4c, 0x84, 0x39, 0xe3, 0x5e,
-	0x4a, 0xf7, 0x2d, 0x90, 0x05, 0xb8, 0x62, 0xdf, 0xcb, 0x76,
-	0xac, 0x11, 0x9b, 0x26, 0xfc, 0x41, 0x55, 0xe8, 0x32, 0x8f,
-	0x1a, 0xa7, 0x7d, 0xc0, 0xd4, 0x69, 0xb3, 0x0e, 0xba, 0x07,
-	0xdd, 0x60, 0x74, 0xc9, 0x13, 0xae, 0x3b, 0x86, 0x5c, 0xe1,
-	0xf5, 0x48, 0x92, 0x2f, 0xa5, 0x18, 0xc2, 0x7f, 0x6b, 0xd6,
-	0x0c, 0xb1, 0x24, 0x99, 0x43, 0xfe, 0xea, 0x57, 0x8d, 0x30,
-	0x00, 0xbe, 0x61, 0xdf, 0xc2, 0x7c, 0xa3, 0x1d, 0x99, 0x27,
-	0xf8, 0x46, 0x5b, 0xe5, 0x3a, 0x84, 0x2f, 0x91, 0x4e, 0xf0,
-	0xed, 0x53, 0x8c, 0x32, 0xb6, 0x08, 0xd7, 0x69, 0x74, 0xca,
-	0x15, 0xab, 0x5e, 0xe0, 0x3f, 0x81, 0x9c, 0x22, 0xfd, 0x43,
-	0xc7, 0x79, 0xa6, 0x18, 0x05, 0xbb, 0x64, 0xda, 0x71, 0xcf,
-	0x10, 0xae, 0xb3, 0x0d, 0xd2, 0x6c, 0xe8, 0x56, 0x89, 0x37,
-	0x2a, 0x94, 0x4b, 0xf5, 0xbc, 0x02, 0xdd, 0x63, 0x7e, 0xc0,
-	0x1f, 0xa1, 0x25, 0x9b, 0x44, 0xfa, 0xe7, 0x59, 0x86, 0x38,
-	0x93, 0x2d, 0xf2, 0x4c, 0x51, 0xef, 0x30, 0x8e, 0x0a, 0xb4,
-	0x6b, 0xd5, 0xc8, 0x76, 0xa9, 0x17, 0xe2, 0x5c, 0x83, 0x3d,
-	0x20, 0x9e, 0x41, 0xff, 0x7b, 0xc5, 0x1a, 0xa4, 0xb9, 0x07,
-	0xd8, 0x66, 0xcd, 0x73, 0xac, 0x12, 0x0f, 0xb1, 0x6e, 0xd0,
-	0x54, 0xea, 0x35, 0x8b, 0x96, 0x28, 0xf7, 0x49, 0x65, 0xdb,
-	0x04, 0xba, 0xa7, 0x19, 0xc6, 0x78, 0xfc, 0x42, 0x9d, 0x23,
-	0x3e, 0x80, 0x5f, 0xe1, 0x4a, 0xf4, 0x2b, 0x95, 0x88, 0x36,
-	0xe9, 0x57, 0xd3, 0x6d, 0xb2, 0x0c, 0x11, 0xaf, 0x70, 0xce,
-	0x3b, 0x85, 0x5a, 0xe4, 0xf9, 0x47, 0x98, 0x26, 0xa2, 0x1c,
-	0xc3, 0x7d, 0x60, 0xde, 0x01, 0xbf, 0x14, 0xaa, 0x75, 0xcb,
-	0xd6, 0x68, 0xb7, 0x09, 0x8d, 0x33, 0xec, 0x52, 0x4f, 0xf1,
-	0x2e, 0x90, 0xd9, 0x67, 0xb8, 0x06, 0x1b, 0xa5, 0x7a, 0xc4,
-	0x40, 0xfe, 0x21, 0x9f, 0x82, 0x3c, 0xe3, 0x5d, 0xf6, 0x48,
-	0x97, 0x29, 0x34, 0x8a, 0x55, 0xeb, 0x6f, 0xd1, 0x0e, 0xb0,
-	0xad, 0x13, 0xcc, 0x72, 0x87, 0x39, 0xe6, 0x58, 0x45, 0xfb,
-	0x24, 0x9a, 0x1e, 0xa0, 0x7f, 0xc1, 0xdc, 0x62, 0xbd, 0x03,
-	0xa8, 0x16, 0xc9, 0x77, 0x6a, 0xd4, 0x0b, 0xb5, 0x31, 0x8f,
-	0x50, 0xee, 0xf3, 0x4d, 0x92, 0x2c, 0x00, 0xbf, 0x63, 0xdc,
-	0xc6, 0x79, 0xa5, 0x1a, 0x91, 0x2e, 0xf2, 0x4d, 0x57, 0xe8,
-	0x34, 0x8b, 0x3f, 0x80, 0x5c, 0xe3, 0xf9, 0x46, 0x9a, 0x25,
-	0xae, 0x11, 0xcd, 0x72, 0x68, 0xd7, 0x0b, 0xb4, 0x7e, 0xc1,
-	0x1d, 0xa2, 0xb8, 0x07, 0xdb, 0x64, 0xef, 0x50, 0x8c, 0x33,
-	0x29, 0x96, 0x4a, 0xf5, 0x41, 0xfe, 0x22, 0x9d, 0x87, 0x38,
-	0xe4, 0x5b, 0xd0, 0x6f, 0xb3, 0x0c, 0x16, 0xa9, 0x75, 0xca,
-	0xfc, 0x43, 0x9f, 0x20, 0x3a, 0x85, 0x59, 0xe6, 0x6d, 0xd2,
-	0x0e, 0xb1, 0xab, 0x14, 0xc8, 0x77, 0xc3, 0x7c, 0xa0, 0x1f,
-	0x05, 0xba, 0x66, 0xd9, 0x52, 0xed, 0x31, 0x8e, 0x94, 0x2b,
-	0xf7, 0x48, 0x82, 0x3d, 0xe1, 0x5e, 0x44, 0xfb, 0x27, 0x98,
-	0x13, 0xac, 0x70, 0xcf, 0xd5, 0x6a, 0xb6, 0x09, 0xbd, 0x02,
-	0xde, 0x61, 0x7b, 0xc4, 0x18, 0xa7, 0x2c, 0x93, 0x4f, 0xf0,
-	0xea, 0x55, 0x89, 0x36, 0xe5, 0x5a, 0x86, 0x39, 0x23, 0x9c,
-	0x40, 0xff, 0x74, 0xcb, 0x17, 0xa8, 0xb2, 0x0d, 0xd1, 0x6e,
-	0xda, 0x65, 0xb9, 0x06, 0x1c, 0xa3, 0x7f, 0xc0, 0x4b, 0xf4,
-	0x28, 0x97, 0x8d, 0x32, 0xee, 0x51, 0x9b, 0x24, 0xf8, 0x47,
-	0x5d, 0xe2, 0x3e, 0x81, 0x0a, 0xb5, 0x69, 0xd6, 0xcc, 0x73,
-	0xaf, 0x10, 0xa4, 0x1b, 0xc7, 0x78, 0x62, 0xdd, 0x01, 0xbe,
-	0x35, 0x8a, 0x56, 0xe9, 0xf3, 0x4c, 0x90, 0x2f, 0x19, 0xa6,
-	0x7a, 0xc5, 0xdf, 0x60, 0xbc, 0x03, 0x88, 0x37, 0xeb, 0x54,
-	0x4e, 0xf1, 0x2d, 0x92, 0x26, 0x99, 0x45, 0xfa, 0xe0, 0x5f,
-	0x83, 0x3c, 0xb7, 0x08, 0xd4, 0x6b, 0x71, 0xce, 0x12, 0xad,
-	0x67, 0xd8, 0x04, 0xbb, 0xa1, 0x1e, 0xc2, 0x7d, 0xf6, 0x49,
-	0x95, 0x2a, 0x30, 0x8f, 0x53, 0xec, 0x58, 0xe7, 0x3b, 0x84,
-	0x9e, 0x21, 0xfd, 0x42, 0xc9, 0x76, 0xaa, 0x15, 0x0f, 0xb0,
-	0x6c, 0xd3, 0x00, 0xc0, 0x9d, 0x5d, 0x27, 0xe7, 0xba, 0x7a,
-	0x4e, 0x8e, 0xd3, 0x13, 0x69, 0xa9, 0xf4, 0x34, 0x9c, 0x5c,
-	0x01, 0xc1, 0xbb, 0x7b, 0x26, 0xe6, 0xd2, 0x12, 0x4f, 0x8f,
-	0xf5, 0x35, 0x68, 0xa8, 0x25, 0xe5, 0xb8, 0x78, 0x02, 0xc2,
-	0x9f, 0x5f, 0x6b, 0xab, 0xf6, 0x36, 0x4c, 0x8c, 0xd1, 0x11,
-	0xb9, 0x79, 0x24, 0xe4, 0x9e, 0x5e, 0x03, 0xc3, 0xf7, 0x37,
-	0x6a, 0xaa, 0xd0, 0x10, 0x4d, 0x8d, 0x4a, 0x8a, 0xd7, 0x17,
-	0x6d, 0xad, 0xf0, 0x30, 0x04, 0xc4, 0x99, 0x59, 0x23, 0xe3,
-	0xbe, 0x7e, 0xd6, 0x16, 0x4b, 0x8b, 0xf1, 0x31, 0x6c, 0xac,
-	0x98, 0x58, 0x05, 0xc5, 0xbf, 0x7f, 0x22, 0xe2, 0x6f, 0xaf,
-	0xf2, 0x32, 0x48, 0x88, 0xd5, 0x15, 0x21, 0xe1, 0xbc, 0x7c,
-	0x06, 0xc6, 0x9b, 0x5b, 0xf3, 0x33, 0x6e, 0xae, 0xd4, 0x14,
-	0x49, 0x89, 0xbd, 0x7d, 0x20, 0xe0, 0x9a, 0x5a, 0x07, 0xc7,
-	0x94, 0x54, 0x09, 0xc9, 0xb3, 0x73, 0x2e, 0xee, 0xda, 0x1a,
-	0x47, 0x87, 0xfd, 0x3d, 0x60, 0xa0, 0x08, 0xc8, 0x95, 0x55,
-	0x2f, 0xef, 0xb2, 0x72, 0x46, 0x86, 0xdb, 0x1b, 0x61, 0xa1,
-	0xfc, 0x3c, 0xb1, 0x71, 0x2c, 0xec, 0x96, 0x56, 0x0b, 0xcb,
-	0xff, 0x3f, 0x62, 0xa2, 0xd8, 0x18, 0x45, 0x85, 0x2d, 0xed,
-	0xb0, 0x70, 0x0a, 0xca, 0x97, 0x57, 0x63, 0xa3, 0xfe, 0x3e,
-	0x44, 0x84, 0xd9, 0x19, 0xde, 0x1e, 0x43, 0x83, 0xf9, 0x39,
-	0x64, 0xa4, 0x90, 0x50, 0x0d, 0xcd, 0xb7, 0x77, 0x2a, 0xea,
-	0x42, 0x82, 0xdf, 0x1f, 0x65, 0xa5, 0xf8, 0x38, 0x0c, 0xcc,
-	0x91, 0x51, 0x2b, 0xeb, 0xb6, 0x76, 0xfb, 0x3b, 0x66, 0xa6,
-	0xdc, 0x1c, 0x41, 0x81, 0xb5, 0x75, 0x28, 0xe8, 0x92, 0x52,
-	0x0f, 0xcf, 0x67, 0xa7, 0xfa, 0x3a, 0x40, 0x80, 0xdd, 0x1d,
-	0x29, 0xe9, 0xb4, 0x74, 0x0e, 0xce, 0x93, 0x53, 0x00, 0xc1,
-	0x9f, 0x5e, 0x23, 0xe2, 0xbc, 0x7d, 0x46, 0x87, 0xd9, 0x18,
-	0x65, 0xa4, 0xfa, 0x3b, 0x8c, 0x4d, 0x13, 0xd2, 0xaf, 0x6e,
-	0x30, 0xf1, 0xca, 0x0b, 0x55, 0x94, 0xe9, 0x28, 0x76, 0xb7,
-	0x05, 0xc4, 0x9a, 0x5b, 0x26, 0xe7, 0xb9, 0x78, 0x43, 0x82,
-	0xdc, 0x1d, 0x60, 0xa1, 0xff, 0x3e, 0x89, 0x48, 0x16, 0xd7,
-	0xaa, 0x6b, 0x35, 0xf4, 0xcf, 0x0e, 0x50, 0x91, 0xec, 0x2d,
-	0x73, 0xb2, 0x0a, 0xcb, 0x95, 0x54, 0x29, 0xe8, 0xb6, 0x77,
-	0x4c, 0x8d, 0xd3, 0x12, 0x6f, 0xae, 0xf0, 0x31, 0x86, 0x47,
-	0x19, 0xd8, 0xa5, 0x64, 0x3a, 0xfb, 0xc0, 0x01, 0x5f, 0x9e,
-	0xe3, 0x22, 0x7c, 0xbd, 0x0f, 0xce, 0x90, 0x51, 0x2c, 0xed,
-	0xb3, 0x72, 0x49, 0x88, 0xd6, 0x17, 0x6a, 0xab, 0xf5, 0x34,
-	0x83, 0x42, 0x1c, 0xdd, 0xa0, 0x61, 0x3f, 0xfe, 0xc5, 0x04,
-	0x5a, 0x9b, 0xe6, 0x27, 0x79, 0xb8, 0x14, 0xd5, 0x8b, 0x4a,
-	0x37, 0xf6, 0xa8, 0x69, 0x52, 0x93, 0xcd, 0x0c, 0x71, 0xb0,
-	0xee, 0x2f, 0x98, 0x59, 0x07, 0xc6, 0xbb, 0x7a, 0x24, 0xe5,
-	0xde, 0x1f, 0x41, 0x80, 0xfd, 0x3c, 0x62, 0xa3, 0x11, 0xd0,
-	0x8e, 0x4f, 0x32, 0xf3, 0xad, 0x6c, 0x57, 0x96, 0xc8, 0x09,
-	0x74, 0xb5, 0xeb, 0x2a, 0x9d, 0x5c, 0x02, 0xc3, 0xbe, 0x7f,
-	0x21, 0xe0, 0xdb, 0x1a, 0x44, 0x85, 0xf8, 0x39, 0x67, 0xa6,
-	0x1e, 0xdf, 0x81, 0x40, 0x3d, 0xfc, 0xa2, 0x63, 0x58, 0x99,
-	0xc7, 0x06, 0x7b, 0xba, 0xe4, 0x25, 0x92, 0x53, 0x0d, 0xcc,
-	0xb1, 0x70, 0x2e, 0xef, 0xd4, 0x15, 0x4b, 0x8a, 0xf7, 0x36,
-	0x68, 0xa9, 0x1b, 0xda, 0x84, 0x45, 0x38, 0xf9, 0xa7, 0x66,
-	0x5d, 0x9c, 0xc2, 0x03, 0x7e, 0xbf, 0xe1, 0x20, 0x97, 0x56,
-	0x08, 0xc9, 0xb4, 0x75, 0x2b, 0xea, 0xd1, 0x10, 0x4e, 0x8f,
-	0xf2, 0x33, 0x6d, 0xac, 0x00, 0xc2, 0x99, 0x5b, 0x2f, 0xed,
-	0xb6, 0x74, 0x5e, 0x9c, 0xc7, 0x05, 0x71, 0xb3, 0xe8, 0x2a,
-	0xbc, 0x7e, 0x25, 0xe7, 0x93, 0x51, 0x0a, 0xc8, 0xe2, 0x20,
-	0x7b, 0xb9, 0xcd, 0x0f, 0x54, 0x96, 0x65, 0xa7, 0xfc, 0x3e,
-	0x4a, 0x88, 0xd3, 0x11, 0x3b, 0xf9, 0xa2, 0x60, 0x14, 0xd6,
-	0x8d, 0x4f, 0xd9, 0x1b, 0x40, 0x82, 0xf6, 0x34, 0x6f, 0xad,
-	0x87, 0x45, 0x1e, 0xdc, 0xa8, 0x6a, 0x31, 0xf3, 0xca, 0x08,
-	0x53, 0x91, 0xe5, 0x27, 0x7c, 0xbe, 0x94, 0x56, 0x0d, 0xcf,
-	0xbb, 0x79, 0x22, 0xe0, 0x76, 0xb4, 0xef, 0x2d, 0x59, 0x9b,
-	0xc0, 0x02, 0x28, 0xea, 0xb1, 0x73, 0x07, 0xc5, 0x9e, 0x5c,
-	0xaf, 0x6d, 0x36, 0xf4, 0x80, 0x42, 0x19, 0xdb, 0xf1, 0x33,
-	0x68, 0xaa, 0xde, 0x1c, 0x47, 0x85, 0x13, 0xd1, 0x8a, 0x48,
-	0x3c, 0xfe, 0xa5, 0x67, 0x4d, 0x8f, 0xd4, 0x16, 0x62, 0xa0,
-	0xfb, 0x39, 0x89, 0x4b, 0x10, 0xd2, 0xa6, 0x64, 0x3f, 0xfd,
-	0xd7, 0x15, 0x4e, 0x8c, 0xf8, 0x3a, 0x61, 0xa3, 0x35, 0xf7,
-	0xac, 0x6e, 0x1a, 0xd8, 0x83, 0x41, 0x6b, 0xa9, 0xf2, 0x30,
-	0x44, 0x86, 0xdd, 0x1f, 0xec, 0x2e, 0x75, 0xb7, 0xc3, 0x01,
-	0x5a, 0x98, 0xb2, 0x70, 0x2b, 0xe9, 0x9d, 0x5f, 0x04, 0xc6,
-	0x50, 0x92, 0xc9, 0x0b, 0x7f, 0xbd, 0xe6, 0x24, 0x0e, 0xcc,
-	0x97, 0x55, 0x21, 0xe3, 0xb8, 0x7a, 0x43, 0x81, 0xda, 0x18,
-	0x6c, 0xae, 0xf5, 0x37, 0x1d, 0xdf, 0x84, 0x46, 0x32, 0xf0,
-	0xab, 0x69, 0xff, 0x3d, 0x66, 0xa4, 0xd0, 0x12, 0x49, 0x8b,
-	0xa1, 0x63, 0x38, 0xfa, 0x8e, 0x4c, 0x17, 0xd5, 0x26, 0xe4,
-	0xbf, 0x7d, 0x09, 0xcb, 0x90, 0x52, 0x78, 0xba, 0xe1, 0x23,
-	0x57, 0x95, 0xce, 0x0c, 0x9a, 0x58, 0x03, 0xc1, 0xb5, 0x77,
-	0x2c, 0xee, 0xc4, 0x06, 0x5d, 0x9f, 0xeb, 0x29, 0x72, 0xb0,
-	0x00, 0xc3, 0x9b, 0x58, 0x2b, 0xe8, 0xb0, 0x73, 0x56, 0x95,
-	0xcd, 0x0e, 0x7d, 0xbe, 0xe6, 0x25, 0xac, 0x6f, 0x37, 0xf4,
-	0x87, 0x44, 0x1c, 0xdf, 0xfa, 0x39, 0x61, 0xa2, 0xd1, 0x12,
-	0x4a, 0x89, 0x45, 0x86, 0xde, 0x1d, 0x6e, 0xad, 0xf5, 0x36,
-	0x13, 0xd0, 0x88, 0x4b, 0x38, 0xfb, 0xa3, 0x60, 0xe9, 0x2a,
-	0x72, 0xb1, 0xc2, 0x01, 0x59, 0x9a, 0xbf, 0x7c, 0x24, 0xe7,
-	0x94, 0x57, 0x0f, 0xcc, 0x8a, 0x49, 0x11, 0xd2, 0xa1, 0x62,
-	0x3a, 0xf9, 0xdc, 0x1f, 0x47, 0x84, 0xf7, 0x34, 0x6c, 0xaf,
-	0x26, 0xe5, 0xbd, 0x7e, 0x0d, 0xce, 0x96, 0x55, 0x70, 0xb3,
-	0xeb, 0x28, 0x5b, 0x98, 0xc0, 0x03, 0xcf, 0x0c, 0x54, 0x97,
-	0xe4, 0x27, 0x7f, 0xbc, 0x99, 0x5a, 0x02, 0xc1, 0xb2, 0x71,
-	0x29, 0xea, 0x63, 0xa0, 0xf8, 0x3b, 0x48, 0x8b, 0xd3, 0x10,
-	0x35, 0xf6, 0xae, 0x6d, 0x1e, 0xdd, 0x85, 0x46, 0x09, 0xca,
-	0x92, 0x51, 0x22, 0xe1, 0xb9, 0x7a, 0x5f, 0x9c, 0xc4, 0x07,
-	0x74, 0xb7, 0xef, 0x2c, 0xa5, 0x66, 0x3e, 0xfd, 0x8e, 0x4d,
-	0x15, 0xd6, 0xf3, 0x30, 0x68, 0xab, 0xd8, 0x1b, 0x43, 0x80,
-	0x4c, 0x8f, 0xd7, 0x14, 0x67, 0xa4, 0xfc, 0x3f, 0x1a, 0xd9,
-	0x81, 0x42, 0x31, 0xf2, 0xaa, 0x69, 0xe0, 0x23, 0x7b, 0xb8,
-	0xcb, 0x08, 0x50, 0x93, 0xb6, 0x75, 0x2d, 0xee, 0x9d, 0x5e,
-	0x06, 0xc5, 0x83, 0x40, 0x18, 0xdb, 0xa8, 0x6b, 0x33, 0xf0,
-	0xd5, 0x16, 0x4e, 0x8d, 0xfe, 0x3d, 0x65, 0xa6, 0x2f, 0xec,
-	0xb4, 0x77, 0x04, 0xc7, 0x9f, 0x5c, 0x79, 0xba, 0xe2, 0x21,
-	0x52, 0x91, 0xc9, 0x0a, 0xc6, 0x05, 0x5d, 0x9e, 0xed, 0x2e,
-	0x76, 0xb5, 0x90, 0x53, 0x0b, 0xc8, 0xbb, 0x78, 0x20, 0xe3,
-	0x6a, 0xa9, 0xf1, 0x32, 0x41, 0x82, 0xda, 0x19, 0x3c, 0xff,
-	0xa7, 0x64, 0x17, 0xd4, 0x8c, 0x4f, 0x00, 0xc4, 0x95, 0x51,
-	0x37, 0xf3, 0xa2, 0x66, 0x6e, 0xaa, 0xfb, 0x3f, 0x59, 0x9d,
-	0xcc, 0x08, 0xdc, 0x18, 0x49, 0x8d, 0xeb, 0x2f, 0x7e, 0xba,
-	0xb2, 0x76, 0x27, 0xe3, 0x85, 0x41, 0x10, 0xd4, 0xa5, 0x61,
-	0x30, 0xf4, 0x92, 0x56, 0x07, 0xc3, 0xcb, 0x0f, 0x5e, 0x9a,
-	0xfc, 0x38, 0x69, 0xad, 0x79, 0xbd, 0xec, 0x28, 0x4e, 0x8a,
-	0xdb, 0x1f, 0x17, 0xd3, 0x82, 0x46, 0x20, 0xe4, 0xb5, 0x71,
-	0x57, 0x93, 0xc2, 0x06, 0x60, 0xa4, 0xf5, 0x31, 0x39, 0xfd,
-	0xac, 0x68, 0x0e, 0xca, 0x9b, 0x5f, 0x8b, 0x4f, 0x1e, 0xda,
-	0xbc, 0x78, 0x29, 0xed, 0xe5, 0x21, 0x70, 0xb4, 0xd2, 0x16,
-	0x47, 0x83, 0xf2, 0x36, 0x67, 0xa3, 0xc5, 0x01, 0x50, 0x94,
-	0x9c, 0x58, 0x09, 0xcd, 0xab, 0x6f, 0x3e, 0xfa, 0x2e, 0xea,
-	0xbb, 0x7f, 0x19, 0xdd, 0x8c, 0x48, 0x40, 0x84, 0xd5, 0x11,
-	0x77, 0xb3, 0xe2, 0x26, 0xae, 0x6a, 0x3b, 0xff, 0x99, 0x5d,
-	0x0c, 0xc8, 0xc0, 0x04, 0x55, 0x91, 0xf7, 0x33, 0x62, 0xa6,
-	0x72, 0xb6, 0xe7, 0x23, 0x45, 0x81, 0xd0, 0x14, 0x1c, 0xd8,
-	0x89, 0x4d, 0x2b, 0xef, 0xbe, 0x7a, 0x0b, 0xcf, 0x9e, 0x5a,
-	0x3c, 0xf8, 0xa9, 0x6d, 0x65, 0xa1, 0xf0, 0x34, 0x52, 0x96,
-	0xc7, 0x03, 0xd7, 0x13, 0x42, 0x86, 0xe0, 0x24, 0x75, 0xb1,
-	0xb9, 0x7d, 0x2c, 0xe8, 0x8e, 0x4a, 0x1b, 0xdf, 0xf9, 0x3d,
-	0x6c, 0xa8, 0xce, 0x0a, 0x5b, 0x9f, 0x97, 0x53, 0x02, 0xc6,
-	0xa0, 0x64, 0x35, 0xf1, 0x25, 0xe1, 0xb0, 0x74, 0x12, 0xd6,
-	0x87, 0x43, 0x4b, 0x8f, 0xde, 0x1a, 0x7c, 0xb8, 0xe9, 0x2d,
-	0x5c, 0x98, 0xc9, 0x0d, 0x6b, 0xaf, 0xfe, 0x3a, 0x32, 0xf6,
-	0xa7, 0x63, 0x05, 0xc1, 0x90, 0x54, 0x80, 0x44, 0x15, 0xd1,
-	0xb7, 0x73, 0x22, 0xe6, 0xee, 0x2a, 0x7b, 0xbf, 0xd9, 0x1d,
-	0x4c, 0x88, 0x00, 0xc5, 0x97, 0x52, 0x33, 0xf6, 0xa4, 0x61,
-	0x66, 0xa3, 0xf1, 0x34, 0x55, 0x90, 0xc2, 0x07, 0xcc, 0x09,
-	0x5b, 0x9e, 0xff, 0x3a, 0x68, 0xad, 0xaa, 0x6f, 0x3d, 0xf8,
-	0x99, 0x5c, 0x0e, 0xcb, 0x85, 0x40, 0x12, 0xd7, 0xb6, 0x73,
-	0x21, 0xe4, 0xe3, 0x26, 0x74, 0xb1, 0xd0, 0x15, 0x47, 0x82,
-	0x49, 0x8c, 0xde, 0x1b, 0x7a, 0xbf, 0xed, 0x28, 0x2f, 0xea,
-	0xb8, 0x7d, 0x1c, 0xd9, 0x8b, 0x4e, 0x17, 0xd2, 0x80, 0x45,
-	0x24, 0xe1, 0xb3, 0x76, 0x71, 0xb4, 0xe6, 0x23, 0x42, 0x87,
-	0xd5, 0x10, 0xdb, 0x1e, 0x4c, 0x89, 0xe8, 0x2d, 0x7f, 0xba,
-	0xbd, 0x78, 0x2a, 0xef, 0x8e, 0x4b, 0x19, 0xdc, 0x92, 0x57,
-	0x05, 0xc0, 0xa1, 0x64, 0x36, 0xf3, 0xf4, 0x31, 0x63, 0xa6,
-	0xc7, 0x02, 0x50, 0x95, 0x5e, 0x9b, 0xc9, 0x0c, 0x6d, 0xa8,
-	0xfa, 0x3f, 0x38, 0xfd, 0xaf, 0x6a, 0x0b, 0xce, 0x9c, 0x59,
-	0x2e, 0xeb, 0xb9, 0x7c, 0x1d, 0xd8, 0x8a, 0x4f, 0x48, 0x8d,
-	0xdf, 0x1a, 0x7b, 0xbe, 0xec, 0x29, 0xe2, 0x27, 0x75, 0xb0,
-	0xd1, 0x14, 0x46, 0x83, 0x84, 0x41, 0x13, 0xd6, 0xb7, 0x72,
-	0x20, 0xe5, 0xab, 0x6e, 0x3c, 0xf9, 0x98, 0x5d, 0x0f, 0xca,
-	0xcd, 0x08, 0x5a, 0x9f, 0xfe, 0x3b, 0x69, 0xac, 0x67, 0xa2,
-	0xf0, 0x35, 0x54, 0x91, 0xc3, 0x06, 0x01, 0xc4, 0x96, 0x53,
-	0x32, 0xf7, 0xa5, 0x60, 0x39, 0xfc, 0xae, 0x6b, 0x0a, 0xcf,
-	0x9d, 0x58, 0x5f, 0x9a, 0xc8, 0x0d, 0x6c, 0xa9, 0xfb, 0x3e,
-	0xf5, 0x30, 0x62, 0xa7, 0xc6, 0x03, 0x51, 0x94, 0x93, 0x56,
-	0x04, 0xc1, 0xa0, 0x65, 0x37, 0xf2, 0xbc, 0x79, 0x2b, 0xee,
-	0x8f, 0x4a, 0x18, 0xdd, 0xda, 0x1f, 0x4d, 0x88, 0xe9, 0x2c,
-	0x7e, 0xbb, 0x70, 0xb5, 0xe7, 0x22, 0x43, 0x86, 0xd4, 0x11,
-	0x16, 0xd3, 0x81, 0x44, 0x25, 0xe0, 0xb2, 0x77, 0x00, 0xc6,
-	0x91, 0x57, 0x3f, 0xf9, 0xae, 0x68, 0x7e, 0xb8, 0xef, 0x29,
-	0x41, 0x87, 0xd0, 0x16, 0xfc, 0x3a, 0x6d, 0xab, 0xc3, 0x05,
-	0x52, 0x94, 0x82, 0x44, 0x13, 0xd5, 0xbd, 0x7b, 0x2c, 0xea,
-	0xe5, 0x23, 0x74, 0xb2, 0xda, 0x1c, 0x4b, 0x8d, 0x9b, 0x5d,
-	0x0a, 0xcc, 0xa4, 0x62, 0x35, 0xf3, 0x19, 0xdf, 0x88, 0x4e,
-	0x26, 0xe0, 0xb7, 0x71, 0x67, 0xa1, 0xf6, 0x30, 0x58, 0x9e,
-	0xc9, 0x0f, 0xd7, 0x11, 0x46, 0x80, 0xe8, 0x2e, 0x79, 0xbf,
-	0xa9, 0x6f, 0x38, 0xfe, 0x96, 0x50, 0x07, 0xc1, 0x2b, 0xed,
-	0xba, 0x7c, 0x14, 0xd2, 0x85, 0x43, 0x55, 0x93, 0xc4, 0x02,
-	0x6a, 0xac, 0xfb, 0x3d, 0x32, 0xf4, 0xa3, 0x65, 0x0d, 0xcb,
-	0x9c, 0x5a, 0x4c, 0x8a, 0xdd, 0x1b, 0x73, 0xb5, 0xe2, 0x24,
-	0xce, 0x08, 0x5f, 0x99, 0xf1, 0x37, 0x60, 0xa6, 0xb0, 0x76,
-	0x21, 0xe7, 0x8f, 0x49, 0x1e, 0xd8, 0xb3, 0x75, 0x22, 0xe4,
-	0x8c, 0x4a, 0x1d, 0xdb, 0xcd, 0x0b, 0x5c, 0x9a, 0xf2, 0x34,
-	0x63, 0xa5, 0x4f, 0x89, 0xde, 0x18, 0x70, 0xb6, 0xe1, 0x27,
-	0x31, 0xf7, 0xa0, 0x66, 0x0e, 0xc8, 0x9f, 0x59, 0x56, 0x90,
-	0xc7, 0x01, 0x69, 0xaf, 0xf8, 0x3e, 0x28, 0xee, 0xb9, 0x7f,
-	0x17, 0xd1, 0x86, 0x40, 0xaa, 0x6c, 0x3b, 0xfd, 0x95, 0x53,
-	0x04, 0xc2, 0xd4, 0x12, 0x45, 0x83, 0xeb, 0x2d, 0x7a, 0xbc,
-	0x64, 0xa2, 0xf5, 0x33, 0x5b, 0x9d, 0xca, 0x0c, 0x1a, 0xdc,
-	0x8b, 0x4d, 0x25, 0xe3, 0xb4, 0x72, 0x98, 0x5e, 0x09, 0xcf,
-	0xa7, 0x61, 0x36, 0xf0, 0xe6, 0x20, 0x77, 0xb1, 0xd9, 0x1f,
-	0x48, 0x8e, 0x81, 0x47, 0x10, 0xd6, 0xbe, 0x78, 0x2f, 0xe9,
-	0xff, 0x39, 0x6e, 0xa8, 0xc0, 0x06, 0x51, 0x97, 0x7d, 0xbb,
-	0xec, 0x2a, 0x42, 0x84, 0xd3, 0x15, 0x03, 0xc5, 0x92, 0x54,
-	0x3c, 0xfa, 0xad, 0x6b, 0x00, 0xc7, 0x93, 0x54, 0x3b, 0xfc,
-	0xa8, 0x6f, 0x76, 0xb1, 0xe5, 0x22, 0x4d, 0x8a, 0xde, 0x19,
-	0xec, 0x2b, 0x7f, 0xb8, 0xd7, 0x10, 0x44, 0x83, 0x9a, 0x5d,
-	0x09, 0xce, 0xa1, 0x66, 0x32, 0xf5, 0xc5, 0x02, 0x56, 0x91,
-	0xfe, 0x39, 0x6d, 0xaa, 0xb3, 0x74, 0x20, 0xe7, 0x88, 0x4f,
-	0x1b, 0xdc, 0x29, 0xee, 0xba, 0x7d, 0x12, 0xd5, 0x81, 0x46,
-	0x5f, 0x98, 0xcc, 0x0b, 0x64, 0xa3, 0xf7, 0x30, 0x97, 0x50,
-	0x04, 0xc3, 0xac, 0x6b, 0x3f, 0xf8, 0xe1, 0x26, 0x72, 0xb5,
-	0xda, 0x1d, 0x49, 0x8e, 0x7b, 0xbc, 0xe8, 0x2f, 0x40, 0x87,
-	0xd3, 0x14, 0x0d, 0xca, 0x9e, 0x59, 0x36, 0xf1, 0xa5, 0x62,
-	0x52, 0x95, 0xc1, 0x06, 0x69, 0xae, 0xfa, 0x3d, 0x24, 0xe3,
-	0xb7, 0x70, 0x1f, 0xd8, 0x8c, 0x4b, 0xbe, 0x79, 0x2d, 0xea,
-	0x85, 0x42, 0x16, 0xd1, 0xc8, 0x0f, 0x5b, 0x9c, 0xf3, 0x34,
-	0x60, 0xa7, 0x33, 0xf4, 0xa0, 0x67, 0x08, 0xcf, 0x9b, 0x5c,
-	0x45, 0x82, 0xd6, 0x11, 0x7e, 0xb9, 0xed, 0x2a, 0xdf, 0x18,
-	0x4c, 0x8b, 0xe4, 0x23, 0x77, 0xb0, 0xa9, 0x6e, 0x3a, 0xfd,
-	0x92, 0x55, 0x01, 0xc6, 0xf6, 0x31, 0x65, 0xa2, 0xcd, 0x0a,
-	0x5e, 0x99, 0x80, 0x47, 0x13, 0xd4, 0xbb, 0x7c, 0x28, 0xef,
-	0x1a, 0xdd, 0x89, 0x4e, 0x21, 0xe6, 0xb2, 0x75, 0x6c, 0xab,
-	0xff, 0x38, 0x57, 0x90, 0xc4, 0x03, 0xa4, 0x63, 0x37, 0xf0,
-	0x9f, 0x58, 0x0c, 0xcb, 0xd2, 0x15, 0x41, 0x86, 0xe9, 0x2e,
-	0x7a, 0xbd, 0x48, 0x8f, 0xdb, 0x1c, 0x73, 0xb4, 0xe0, 0x27,
-	0x3e, 0xf9, 0xad, 0x6a, 0x05, 0xc2, 0x96, 0x51, 0x61, 0xa6,
-	0xf2, 0x35, 0x5a, 0x9d, 0xc9, 0x0e, 0x17, 0xd0, 0x84, 0x43,
-	0x2c, 0xeb, 0xbf, 0x78, 0x8d, 0x4a, 0x1e, 0xd9, 0xb6, 0x71,
-	0x25, 0xe2, 0xfb, 0x3c, 0x68, 0xaf, 0xc0, 0x07, 0x53, 0x94,
-	0x00, 0xc8, 0x8d, 0x45, 0x07, 0xcf, 0x8a, 0x42, 0x0e, 0xc6,
-	0x83, 0x4b, 0x09, 0xc1, 0x84, 0x4c, 0x1c, 0xd4, 0x91, 0x59,
-	0x1b, 0xd3, 0x96, 0x5e, 0x12, 0xda, 0x9f, 0x57, 0x15, 0xdd,
-	0x98, 0x50, 0x38, 0xf0, 0xb5, 0x7d, 0x3f, 0xf7, 0xb2, 0x7a,
-	0x36, 0xfe, 0xbb, 0x73, 0x31, 0xf9, 0xbc, 0x74, 0x24, 0xec,
-	0xa9, 0x61, 0x23, 0xeb, 0xae, 0x66, 0x2a, 0xe2, 0xa7, 0x6f,
-	0x2d, 0xe5, 0xa0, 0x68, 0x70, 0xb8, 0xfd, 0x35, 0x77, 0xbf,
-	0xfa, 0x32, 0x7e, 0xb6, 0xf3, 0x3b, 0x79, 0xb1, 0xf4, 0x3c,
-	0x6c, 0xa4, 0xe1, 0x29, 0x6b, 0xa3, 0xe6, 0x2e, 0x62, 0xaa,
-	0xef, 0x27, 0x65, 0xad, 0xe8, 0x20, 0x48, 0x80, 0xc5, 0x0d,
-	0x4f, 0x87, 0xc2, 0x0a, 0x46, 0x8e, 0xcb, 0x03, 0x41, 0x89,
-	0xcc, 0x04, 0x54, 0x9c, 0xd9, 0x11, 0x53, 0x9b, 0xde, 0x16,
-	0x5a, 0x92, 0xd7, 0x1f, 0x5d, 0x95, 0xd0, 0x18, 0xe0, 0x28,
-	0x6d, 0xa5, 0xe7, 0x2f, 0x6a, 0xa2, 0xee, 0x26, 0x63, 0xab,
-	0xe9, 0x21, 0x64, 0xac, 0xfc, 0x34, 0x71, 0xb9, 0xfb, 0x33,
-	0x76, 0xbe, 0xf2, 0x3a, 0x7f, 0xb7, 0xf5, 0x3d, 0x78, 0xb0,
-	0xd8, 0x10, 0x55, 0x9d, 0xdf, 0x17, 0x52, 0x9a, 0xd6, 0x1e,
-	0x5b, 0x93, 0xd1, 0x19, 0x5c, 0x94, 0xc4, 0x0c, 0x49, 0x81,
-	0xc3, 0x0b, 0x4e, 0x86, 0xca, 0x02, 0x47, 0x8f, 0xcd, 0x05,
-	0x40, 0x88, 0x90, 0x58, 0x1d, 0xd5, 0x97, 0x5f, 0x1a, 0xd2,
-	0x9e, 0x56, 0x13, 0xdb, 0x99, 0x51, 0x14, 0xdc, 0x8c, 0x44,
-	0x01, 0xc9, 0x8b, 0x43, 0x06, 0xce, 0x82, 0x4a, 0x0f, 0xc7,
-	0x85, 0x4d, 0x08, 0xc0, 0xa8, 0x60, 0x25, 0xed, 0xaf, 0x67,
-	0x22, 0xea, 0xa6, 0x6e, 0x2b, 0xe3, 0xa1, 0x69, 0x2c, 0xe4,
-	0xb4, 0x7c, 0x39, 0xf1, 0xb3, 0x7b, 0x3e, 0xf6, 0xba, 0x72,
-	0x37, 0xff, 0xbd, 0x75, 0x30, 0xf8, 0x00, 0xc9, 0x8f, 0x46,
-	0x03, 0xca, 0x8c, 0x45, 0x06, 0xcf, 0x89, 0x40, 0x05, 0xcc,
-	0x8a, 0x43, 0x0c, 0xc5, 0x83, 0x4a, 0x0f, 0xc6, 0x80, 0x49,
-	0x0a, 0xc3, 0x85, 0x4c, 0x09, 0xc0, 0x86, 0x4f, 0x18, 0xd1,
-	0x97, 0x5e, 0x1b, 0xd2, 0x94, 0x5d, 0x1e, 0xd7, 0x91, 0x58,
-	0x1d, 0xd4, 0x92, 0x5b, 0x14, 0xdd, 0x9b, 0x52, 0x17, 0xde,
-	0x98, 0x51, 0x12, 0xdb, 0x9d, 0x54, 0x11, 0xd8, 0x9e, 0x57,
-	0x30, 0xf9, 0xbf, 0x76, 0x33, 0xfa, 0xbc, 0x75, 0x36, 0xff,
-	0xb9, 0x70, 0x35, 0xfc, 0xba, 0x73, 0x3c, 0xf5, 0xb3, 0x7a,
-	0x3f, 0xf6, 0xb0, 0x79, 0x3a, 0xf3, 0xb5, 0x7c, 0x39, 0xf0,
-	0xb6, 0x7f, 0x28, 0xe1, 0xa7, 0x6e, 0x2b, 0xe2, 0xa4, 0x6d,
-	0x2e, 0xe7, 0xa1, 0x68, 0x2d, 0xe4, 0xa2, 0x6b, 0x24, 0xed,
-	0xab, 0x62, 0x27, 0xee, 0xa8, 0x61, 0x22, 0xeb, 0xad, 0x64,
-	0x21, 0xe8, 0xae, 0x67, 0x60, 0xa9, 0xef, 0x26, 0x63, 0xaa,
-	0xec, 0x25, 0x66, 0xaf, 0xe9, 0x20, 0x65, 0xac, 0xea, 0x23,
-	0x6c, 0xa5, 0xe3, 0x2a, 0x6f, 0xa6, 0xe0, 0x29, 0x6a, 0xa3,
-	0xe5, 0x2c, 0x69, 0xa0, 0xe6, 0x2f, 0x78, 0xb1, 0xf7, 0x3e,
-	0x7b, 0xb2, 0xf4, 0x3d, 0x7e, 0xb7, 0xf1, 0x38, 0x7d, 0xb4,
-	0xf2, 0x3b, 0x74, 0xbd, 0xfb, 0x32, 0x77, 0xbe, 0xf8, 0x31,
-	0x72, 0xbb, 0xfd, 0x34, 0x71, 0xb8, 0xfe, 0x37, 0x50, 0x99,
-	0xdf, 0x16, 0x53, 0x9a, 0xdc, 0x15, 0x56, 0x9f, 0xd9, 0x10,
-	0x55, 0x9c, 0xda, 0x13, 0x5c, 0x95, 0xd3, 0x1a, 0x5f, 0x96,
-	0xd0, 0x19, 0x5a, 0x93, 0xd5, 0x1c, 0x59, 0x90, 0xd6, 0x1f,
-	0x48, 0x81, 0xc7, 0x0e, 0x4b, 0x82, 0xc4, 0x0d, 0x4e, 0x87,
-	0xc1, 0x08, 0x4d, 0x84, 0xc2, 0x0b, 0x44, 0x8d, 0xcb, 0x02,
-	0x47, 0x8e, 0xc8, 0x01, 0x42, 0x8b, 0xcd, 0x04, 0x41, 0x88,
-	0xce, 0x07, 0x00, 0xca, 0x89, 0x43, 0x0f, 0xc5, 0x86, 0x4c,
-	0x1e, 0xd4, 0x97, 0x5d, 0x11, 0xdb, 0x98, 0x52, 0x3c, 0xf6,
-	0xb5, 0x7f, 0x33, 0xf9, 0xba, 0x70, 0x22, 0xe8, 0xab, 0x61,
-	0x2d, 0xe7, 0xa4, 0x6e, 0x78, 0xb2, 0xf1, 0x3b, 0x77, 0xbd,
-	0xfe, 0x34, 0x66, 0xac, 0xef, 0x25, 0x69, 0xa3, 0xe0, 0x2a,
-	0x44, 0x8e, 0xcd, 0x07, 0x4b, 0x81, 0xc2, 0x08, 0x5a, 0x90,
-	0xd3, 0x19, 0x55, 0x9f, 0xdc, 0x16, 0xf0, 0x3a, 0x79, 0xb3,
-	0xff, 0x35, 0x76, 0xbc, 0xee, 0x24, 0x67, 0xad, 0xe1, 0x2b,
-	0x68, 0xa2, 0xcc, 0x06, 0x45, 0x8f, 0xc3, 0x09, 0x4a, 0x80,
-	0xd2, 0x18, 0x5b, 0x91, 0xdd, 0x17, 0x54, 0x9e, 0x88, 0x42,
-	0x01, 0xcb, 0x87, 0x4d, 0x0e, 0xc4, 0x96, 0x5c, 0x1f, 0xd5,
-	0x99, 0x53, 0x10, 0xda, 0xb4, 0x7e, 0x3d, 0xf7, 0xbb, 0x71,
-	0x32, 0xf8, 0xaa, 0x60, 0x23, 0xe9, 0xa5, 0x6f, 0x2c, 0xe6,
-	0xfd, 0x37, 0x74, 0xbe, 0xf2, 0x38, 0x7b, 0xb1, 0xe3, 0x29,
-	0x6a, 0xa0, 0xec, 0x26, 0x65, 0xaf, 0xc1, 0x0b, 0x48, 0x82,
-	0xce, 0x04, 0x47, 0x8d, 0xdf, 0x15, 0x56, 0x9c, 0xd0, 0x1a,
-	0x59, 0x93, 0x85, 0x4f, 0x0c, 0xc6, 0x8a, 0x40, 0x03, 0xc9,
-	0x9b, 0x51, 0x12, 0xd8, 0x94, 0x5e, 0x1d, 0xd7, 0xb9, 0x73,
-	0x30, 0xfa, 0xb6, 0x7c, 0x3f, 0xf5, 0xa7, 0x6d, 0x2e, 0xe4,
-	0xa8, 0x62, 0x21, 0xeb, 0x0d, 0xc7, 0x84, 0x4e, 0x02, 0xc8,
-	0x8b, 0x41, 0x13, 0xd9, 0x9a, 0x50, 0x1c, 0xd6, 0x95, 0x5f,
-	0x31, 0xfb, 0xb8, 0x72, 0x3e, 0xf4, 0xb7, 0x7d, 0x2f, 0xe5,
-	0xa6, 0x6c, 0x20, 0xea, 0xa9, 0x63, 0x75, 0xbf, 0xfc, 0x36,
-	0x7a, 0xb0, 0xf3, 0x39, 0x6b, 0xa1, 0xe2, 0x28, 0x64, 0xae,
-	0xed, 0x27, 0x49, 0x83, 0xc0, 0x0a, 0x46, 0x8c, 0xcf, 0x05,
-	0x57, 0x9d, 0xde, 0x14, 0x58, 0x92, 0xd1, 0x1b, 0x00, 0xcb,
-	0x8b, 0x40, 0x0b, 0xc0, 0x80, 0x4b, 0x16, 0xdd, 0x9d, 0x56,
-	0x1d, 0xd6, 0x96, 0x5d, 0x2c, 0xe7, 0xa7, 0x6c, 0x27, 0xec,
-	0xac, 0x67, 0x3a, 0xf1, 0xb1, 0x7a, 0x31, 0xfa, 0xba, 0x71,
-	0x58, 0x93, 0xd3, 0x18, 0x53, 0x98, 0xd8, 0x13, 0x4e, 0x85,
-	0xc5, 0x0e, 0x45, 0x8e, 0xce, 0x05, 0x74, 0xbf, 0xff, 0x34,
-	0x7f, 0xb4, 0xf4, 0x3f, 0x62, 0xa9, 0xe9, 0x22, 0x69, 0xa2,
-	0xe2, 0x29, 0xb0, 0x7b, 0x3b, 0xf0, 0xbb, 0x70, 0x30, 0xfb,
-	0xa6, 0x6d, 0x2d, 0xe6, 0xad, 0x66, 0x26, 0xed, 0x9c, 0x57,
-	0x17, 0xdc, 0x97, 0x5c, 0x1c, 0xd7, 0x8a, 0x41, 0x01, 0xca,
-	0x81, 0x4a, 0x0a, 0xc1, 0xe8, 0x23, 0x63, 0xa8, 0xe3, 0x28,
-	0x68, 0xa3, 0xfe, 0x35, 0x75, 0xbe, 0xf5, 0x3e, 0x7e, 0xb5,
-	0xc4, 0x0f, 0x4f, 0x84, 0xcf, 0x04, 0x44, 0x8f, 0xd2, 0x19,
-	0x59, 0x92, 0xd9, 0x12, 0x52, 0x99, 0x7d, 0xb6, 0xf6, 0x3d,
-	0x76, 0xbd, 0xfd, 0x36, 0x6b, 0xa0, 0xe0, 0x2b, 0x60, 0xab,
-	0xeb, 0x20, 0x51, 0x9a, 0xda, 0x11, 0x5a, 0x91, 0xd1, 0x1a,
-	0x47, 0x8c, 0xcc, 0x07, 0x4c, 0x87, 0xc7, 0x0c, 0x25, 0xee,
-	0xae, 0x65, 0x2e, 0xe5, 0xa5, 0x6e, 0x33, 0xf8, 0xb8, 0x73,
-	0x38, 0xf3, 0xb3, 0x78, 0x09, 0xc2, 0x82, 0x49, 0x02, 0xc9,
-	0x89, 0x42, 0x1f, 0xd4, 0x94, 0x5f, 0x14, 0xdf, 0x9f, 0x54,
-	0xcd, 0x06, 0x46, 0x8d, 0xc6, 0x0d, 0x4d, 0x86, 0xdb, 0x10,
-	0x50, 0x9b, 0xd0, 0x1b, 0x5b, 0x90, 0xe1, 0x2a, 0x6a, 0xa1,
-	0xea, 0x21, 0x61, 0xaa, 0xf7, 0x3c, 0x7c, 0xb7, 0xfc, 0x37,
-	0x77, 0xbc, 0x95, 0x5e, 0x1e, 0xd5, 0x9e, 0x55, 0x15, 0xde,
-	0x83, 0x48, 0x08, 0xc3, 0x88, 0x43, 0x03, 0xc8, 0xb9, 0x72,
-	0x32, 0xf9, 0xb2, 0x79, 0x39, 0xf2, 0xaf, 0x64, 0x24, 0xef,
-	0xa4, 0x6f, 0x2f, 0xe4, 0x00, 0xcc, 0x85, 0x49, 0x17, 0xdb,
-	0x92, 0x5e, 0x2e, 0xe2, 0xab, 0x67, 0x39, 0xf5, 0xbc, 0x70,
-	0x5c, 0x90, 0xd9, 0x15, 0x4b, 0x87, 0xce, 0x02, 0x72, 0xbe,
-	0xf7, 0x3b, 0x65, 0xa9, 0xe0, 0x2c, 0xb8, 0x74, 0x3d, 0xf1,
-	0xaf, 0x63, 0x2a, 0xe6, 0x96, 0x5a, 0x13, 0xdf, 0x81, 0x4d,
-	0x04, 0xc8, 0xe4, 0x28, 0x61, 0xad, 0xf3, 0x3f, 0x76, 0xba,
-	0xca, 0x06, 0x4f, 0x83, 0xdd, 0x11, 0x58, 0x94, 0x6d, 0xa1,
-	0xe8, 0x24, 0x7a, 0xb6, 0xff, 0x33, 0x43, 0x8f, 0xc6, 0x0a,
-	0x54, 0x98, 0xd1, 0x1d, 0x31, 0xfd, 0xb4, 0x78, 0x26, 0xea,
-	0xa3, 0x6f, 0x1f, 0xd3, 0x9a, 0x56, 0x08, 0xc4, 0x8d, 0x41,
-	0xd5, 0x19, 0x50, 0x9c, 0xc2, 0x0e, 0x47, 0x8b, 0xfb, 0x37,
-	0x7e, 0xb2, 0xec, 0x20, 0x69, 0xa5, 0x89, 0x45, 0x0c, 0xc0,
-	0x9e, 0x52, 0x1b, 0xd7, 0xa7, 0x6b, 0x22, 0xee, 0xb0, 0x7c,
-	0x35, 0xf9, 0xda, 0x16, 0x5f, 0x93, 0xcd, 0x01, 0x48, 0x84,
-	0xf4, 0x38, 0x71, 0xbd, 0xe3, 0x2f, 0x66, 0xaa, 0x86, 0x4a,
-	0x03, 0xcf, 0x91, 0x5d, 0x14, 0xd8, 0xa8, 0x64, 0x2d, 0xe1,
-	0xbf, 0x73, 0x3a, 0xf6, 0x62, 0xae, 0xe7, 0x2b, 0x75, 0xb9,
-	0xf0, 0x3c, 0x4c, 0x80, 0xc9, 0x05, 0x5b, 0x97, 0xde, 0x12,
-	0x3e, 0xf2, 0xbb, 0x77, 0x29, 0xe5, 0xac, 0x60, 0x10, 0xdc,
-	0x95, 0x59, 0x07, 0xcb, 0x82, 0x4e, 0xb7, 0x7b, 0x32, 0xfe,
-	0xa0, 0x6c, 0x25, 0xe9, 0x99, 0x55, 0x1c, 0xd0, 0x8e, 0x42,
-	0x0b, 0xc7, 0xeb, 0x27, 0x6e, 0xa2, 0xfc, 0x30, 0x79, 0xb5,
-	0xc5, 0x09, 0x40, 0x8c, 0xd2, 0x1e, 0x57, 0x9b, 0x0f, 0xc3,
-	0x8a, 0x46, 0x18, 0xd4, 0x9d, 0x51, 0x21, 0xed, 0xa4, 0x68,
-	0x36, 0xfa, 0xb3, 0x7f, 0x53, 0x9f, 0xd6, 0x1a, 0x44, 0x88,
-	0xc1, 0x0d, 0x7d, 0xb1, 0xf8, 0x34, 0x6a, 0xa6, 0xef, 0x23,
-	0x00, 0xcd, 0x87, 0x4a, 0x13, 0xde, 0x94, 0x59, 0x26, 0xeb,
-	0xa1, 0x6c, 0x35, 0xf8, 0xb2, 0x7f, 0x4c, 0x81, 0xcb, 0x06,
-	0x5f, 0x92, 0xd8, 0x15, 0x6a, 0xa7, 0xed, 0x20, 0x79, 0xb4,
-	0xfe, 0x33, 0x98, 0x55, 0x1f, 0xd2, 0x8b, 0x46, 0x0c, 0xc1,
-	0xbe, 0x73, 0x39, 0xf4, 0xad, 0x60, 0x2a, 0xe7, 0xd4, 0x19,
-	0x53, 0x9e, 0xc7, 0x0a, 0x40, 0x8d, 0xf2, 0x3f, 0x75, 0xb8,
-	0xe1, 0x2c, 0x66, 0xab, 0x2d, 0xe0, 0xaa, 0x67, 0x3e, 0xf3,
-	0xb9, 0x74, 0x0b, 0xc6, 0x8c, 0x41, 0x18, 0xd5, 0x9f, 0x52,
-	0x61, 0xac, 0xe6, 0x2b, 0x72, 0xbf, 0xf5, 0x38, 0x47, 0x8a,
-	0xc0, 0x0d, 0x54, 0x99, 0xd3, 0x1e, 0xb5, 0x78, 0x32, 0xff,
-	0xa6, 0x6b, 0x21, 0xec, 0x93, 0x5e, 0x14, 0xd9, 0x80, 0x4d,
-	0x07, 0xca, 0xf9, 0x34, 0x7e, 0xb3, 0xea, 0x27, 0x6d, 0xa0,
-	0xdf, 0x12, 0x58, 0x95, 0xcc, 0x01, 0x4b, 0x86, 0x5a, 0x97,
-	0xdd, 0x10, 0x49, 0x84, 0xce, 0x03, 0x7c, 0xb1, 0xfb, 0x36,
-	0x6f, 0xa2, 0xe8, 0x25, 0x16, 0xdb, 0x91, 0x5c, 0x05, 0xc8,
-	0x82, 0x4f, 0x30, 0xfd, 0xb7, 0x7a, 0x23, 0xee, 0xa4, 0x69,
-	0xc2, 0x0f, 0x45, 0x88, 0xd1, 0x1c, 0x56, 0x9b, 0xe4, 0x29,
-	0x63, 0xae, 0xf7, 0x3a, 0x70, 0xbd, 0x8e, 0x43, 0x09, 0xc4,
-	0x9d, 0x50, 0x1a, 0xd7, 0xa8, 0x65, 0x2f, 0xe2, 0xbb, 0x76,
-	0x3c, 0xf1, 0x77, 0xba, 0xf0, 0x3d, 0x64, 0xa9, 0xe3, 0x2e,
-	0x51, 0x9c, 0xd6, 0x1b, 0x42, 0x8f, 0xc5, 0x08, 0x3b, 0xf6,
-	0xbc, 0x71, 0x28, 0xe5, 0xaf, 0x62, 0x1d, 0xd0, 0x9a, 0x57,
-	0x0e, 0xc3, 0x89, 0x44, 0xef, 0x22, 0x68, 0xa5, 0xfc, 0x31,
-	0x7b, 0xb6, 0xc9, 0x04, 0x4e, 0x83, 0xda, 0x17, 0x5d, 0x90,
-	0xa3, 0x6e, 0x24, 0xe9, 0xb0, 0x7d, 0x37, 0xfa, 0x85, 0x48,
-	0x02, 0xcf, 0x96, 0x5b, 0x11, 0xdc, 0x00, 0xce, 0x81, 0x4f,
-	0x1f, 0xd1, 0x9e, 0x50, 0x3e, 0xf0, 0xbf, 0x71, 0x21, 0xef,
-	0xa0, 0x6e, 0x7c, 0xb2, 0xfd, 0x33, 0x63, 0xad, 0xe2, 0x2c,
-	0x42, 0x8c, 0xc3, 0x0d, 0x5d, 0x93, 0xdc, 0x12, 0xf8, 0x36,
-	0x79, 0xb7, 0xe7, 0x29, 0x66, 0xa8, 0xc6, 0x08, 0x47, 0x89,
-	0xd9, 0x17, 0x58, 0x96, 0x84, 0x4a, 0x05, 0xcb, 0x9b, 0x55,
-	0x1a, 0xd4, 0xba, 0x74, 0x3b, 0xf5, 0xa5, 0x6b, 0x24, 0xea,
-	0xed, 0x23, 0x6c, 0xa2, 0xf2, 0x3c, 0x73, 0xbd, 0xd3, 0x1d,
-	0x52, 0x9c, 0xcc, 0x02, 0x4d, 0x83, 0x91, 0x5f, 0x10, 0xde,
-	0x8e, 0x40, 0x0f, 0xc1, 0xaf, 0x61, 0x2e, 0xe0, 0xb0, 0x7e,
-	0x31, 0xff, 0x15, 0xdb, 0x94, 0x5a, 0x0a, 0xc4, 0x8b, 0x45,
-	0x2b, 0xe5, 0xaa, 0x64, 0x34, 0xfa, 0xb5, 0x7b, 0x69, 0xa7,
-	0xe8, 0x26, 0x76, 0xb8, 0xf7, 0x39, 0x57, 0x99, 0xd6, 0x18,
-	0x48, 0x86, 0xc9, 0x07, 0xc7, 0x09, 0x46, 0x88, 0xd8, 0x16,
-	0x59, 0x97, 0xf9, 0x37, 0x78, 0xb6, 0xe6, 0x28, 0x67, 0xa9,
-	0xbb, 0x75, 0x3a, 0xf4, 0xa4, 0x6a, 0x25, 0xeb, 0x85, 0x4b,
-	0x04, 0xca, 0x9a, 0x54, 0x1b, 0xd5, 0x3f, 0xf1, 0xbe, 0x70,
-	0x20, 0xee, 0xa1, 0x6f, 0x01, 0xcf, 0x80, 0x4e, 0x1e, 0xd0,
-	0x9f, 0x51, 0x43, 0x8d, 0xc2, 0x0c, 0x5c, 0x92, 0xdd, 0x13,
-	0x7d, 0xb3, 0xfc, 0x32, 0x62, 0xac, 0xe3, 0x2d, 0x2a, 0xe4,
-	0xab, 0x65, 0x35, 0xfb, 0xb4, 0x7a, 0x14, 0xda, 0x95, 0x5b,
-	0x0b, 0xc5, 0x8a, 0x44, 0x56, 0x98, 0xd7, 0x19, 0x49, 0x87,
-	0xc8, 0x06, 0x68, 0xa6, 0xe9, 0x27, 0x77, 0xb9, 0xf6, 0x38,
-	0xd2, 0x1c, 0x53, 0x9d, 0xcd, 0x03, 0x4c, 0x82, 0xec, 0x22,
-	0x6d, 0xa3, 0xf3, 0x3d, 0x72, 0xbc, 0xae, 0x60, 0x2f, 0xe1,
-	0xb1, 0x7f, 0x30, 0xfe, 0x90, 0x5e, 0x11, 0xdf, 0x8f, 0x41,
-	0x0e, 0xc0, 0x00, 0xcf, 0x83, 0x4c, 0x1b, 0xd4, 0x98, 0x57,
-	0x36, 0xf9, 0xb5, 0x7a, 0x2d, 0xe2, 0xae, 0x61, 0x6c, 0xa3,
-	0xef, 0x20, 0x77, 0xb8, 0xf4, 0x3b, 0x5a, 0x95, 0xd9, 0x16,
-	0x41, 0x8e, 0xc2, 0x0d, 0xd8, 0x17, 0x5b, 0x94, 0xc3, 0x0c,
-	0x40, 0x8f, 0xee, 0x21, 0x6d, 0xa2, 0xf5, 0x3a, 0x76, 0xb9,
-	0xb4, 0x7b, 0x37, 0xf8, 0xaf, 0x60, 0x2c, 0xe3, 0x82, 0x4d,
-	0x01, 0xce, 0x99, 0x56, 0x1a, 0xd5, 0xad, 0x62, 0x2e, 0xe1,
-	0xb6, 0x79, 0x35, 0xfa, 0x9b, 0x54, 0x18, 0xd7, 0x80, 0x4f,
-	0x03, 0xcc, 0xc1, 0x0e, 0x42, 0x8d, 0xda, 0x15, 0x59, 0x96,
-	0xf7, 0x38, 0x74, 0xbb, 0xec, 0x23, 0x6f, 0xa0, 0x75, 0xba,
-	0xf6, 0x39, 0x6e, 0xa1, 0xed, 0x22, 0x43, 0x8c, 0xc0, 0x0f,
-	0x58, 0x97, 0xdb, 0x14, 0x19, 0xd6, 0x9a, 0x55, 0x02, 0xcd,
-	0x81, 0x4e, 0x2f, 0xe0, 0xac, 0x63, 0x34, 0xfb, 0xb7, 0x78,
-	0x47, 0x88, 0xc4, 0x0b, 0x5c, 0x93, 0xdf, 0x10, 0x71, 0xbe,
-	0xf2, 0x3d, 0x6a, 0xa5, 0xe9, 0x26, 0x2b, 0xe4, 0xa8, 0x67,
-	0x30, 0xff, 0xb3, 0x7c, 0x1d, 0xd2, 0x9e, 0x51, 0x06, 0xc9,
-	0x85, 0x4a, 0x9f, 0x50, 0x1c, 0xd3, 0x84, 0x4b, 0x07, 0xc8,
-	0xa9, 0x66, 0x2a, 0xe5, 0xb2, 0x7d, 0x31, 0xfe, 0xf3, 0x3c,
-	0x70, 0xbf, 0xe8, 0x27, 0x6b, 0xa4, 0xc5, 0x0a, 0x46, 0x89,
-	0xde, 0x11, 0x5d, 0x92, 0xea, 0x25, 0x69, 0xa6, 0xf1, 0x3e,
-	0x72, 0xbd, 0xdc, 0x13, 0x5f, 0x90, 0xc7, 0x08, 0x44, 0x8b,
-	0x86, 0x49, 0x05, 0xca, 0x9d, 0x52, 0x1e, 0xd1, 0xb0, 0x7f,
-	0x33, 0xfc, 0xab, 0x64, 0x28, 0xe7, 0x32, 0xfd, 0xb1, 0x7e,
-	0x29, 0xe6, 0xaa, 0x65, 0x04, 0xcb, 0x87, 0x48, 0x1f, 0xd0,
-	0x9c, 0x53, 0x5e, 0x91, 0xdd, 0x12, 0x45, 0x8a, 0xc6, 0x09,
-	0x68, 0xa7, 0xeb, 0x24, 0x73, 0xbc, 0xf0, 0x3f, 0x00, 0xd0,
-	0xbd, 0x6d, 0x67, 0xb7, 0xda, 0x0a, 0xce, 0x1e, 0x73, 0xa3,
-	0xa9, 0x79, 0x14, 0xc4, 0x81, 0x51, 0x3c, 0xec, 0xe6, 0x36,
-	0x5b, 0x8b, 0x4f, 0x9f, 0xf2, 0x22, 0x28, 0xf8, 0x95, 0x45,
-	0x1f, 0xcf, 0xa2, 0x72, 0x78, 0xa8, 0xc5, 0x15, 0xd1, 0x01,
-	0x6c, 0xbc, 0xb6, 0x66, 0x0b, 0xdb, 0x9e, 0x4e, 0x23, 0xf3,
-	0xf9, 0x29, 0x44, 0x94, 0x50, 0x80, 0xed, 0x3d, 0x37, 0xe7,
-	0x8a, 0x5a, 0x3e, 0xee, 0x83, 0x53, 0x59, 0x89, 0xe4, 0x34,
-	0xf0, 0x20, 0x4d, 0x9d, 0x97, 0x47, 0x2a, 0xfa, 0xbf, 0x6f,
-	0x02, 0xd2, 0xd8, 0x08, 0x65, 0xb5, 0x71, 0xa1, 0xcc, 0x1c,
-	0x16, 0xc6, 0xab, 0x7b, 0x21, 0xf1, 0x9c, 0x4c, 0x46, 0x96,
-	0xfb, 0x2b, 0xef, 0x3f, 0x52, 0x82, 0x88, 0x58, 0x35, 0xe5,
-	0xa0, 0x70, 0x1d, 0xcd, 0xc7, 0x17, 0x7a, 0xaa, 0x6e, 0xbe,
-	0xd3, 0x03, 0x09, 0xd9, 0xb4, 0x64, 0x7c, 0xac, 0xc1, 0x11,
-	0x1b, 0xcb, 0xa6, 0x76, 0xb2, 0x62, 0x0f, 0xdf, 0xd5, 0x05,
-	0x68, 0xb8, 0xfd, 0x2d, 0x40, 0x90, 0x9a, 0x4a, 0x27, 0xf7,
-	0x33, 0xe3, 0x8e, 0x5e, 0x54, 0x84, 0xe9, 0x39, 0x63, 0xb3,
-	0xde, 0x0e, 0x04, 0xd4, 0xb9, 0x69, 0xad, 0x7d, 0x10, 0xc0,
-	0xca, 0x1a, 0x77, 0xa7, 0xe2, 0x32, 0x5f, 0x8f, 0x85, 0x55,
-	0x38, 0xe8, 0x2c, 0xfc, 0x91, 0x41, 0x4b, 0x9b, 0xf6, 0x26,
-	0x42, 0x92, 0xff, 0x2f, 0x25, 0xf5, 0x98, 0x48, 0x8c, 0x5c,
-	0x31, 0xe1, 0xeb, 0x3b, 0x56, 0x86, 0xc3, 0x13, 0x7e, 0xae,
-	0xa4, 0x74, 0x19, 0xc9, 0x0d, 0xdd, 0xb0, 0x60, 0x6a, 0xba,
-	0xd7, 0x07, 0x5d, 0x8d, 0xe0, 0x30, 0x3a, 0xea, 0x87, 0x57,
-	0x93, 0x43, 0x2e, 0xfe, 0xf4, 0x24, 0x49, 0x99, 0xdc, 0x0c,
-	0x61, 0xb1, 0xbb, 0x6b, 0x06, 0xd6, 0x12, 0xc2, 0xaf, 0x7f,
-	0x75, 0xa5, 0xc8, 0x18, 0x00, 0xd1, 0xbf, 0x6e, 0x63, 0xb2,
-	0xdc, 0x0d, 0xc6, 0x17, 0x79, 0xa8, 0xa5, 0x74, 0x1a, 0xcb,
-	0x91, 0x40, 0x2e, 0xff, 0xf2, 0x23, 0x4d, 0x9c, 0x57, 0x86,
-	0xe8, 0x39, 0x34, 0xe5, 0x8b, 0x5a, 0x3f, 0xee, 0x80, 0x51,
-	0x5c, 0x8d, 0xe3, 0x32, 0xf9, 0x28, 0x46, 0x97, 0x9a, 0x4b,
-	0x25, 0xf4, 0xae, 0x7f, 0x11, 0xc0, 0xcd, 0x1c, 0x72, 0xa3,
-	0x68, 0xb9, 0xd7, 0x06, 0x0b, 0xda, 0xb4, 0x65, 0x7e, 0xaf,
-	0xc1, 0x10, 0x1d, 0xcc, 0xa2, 0x73, 0xb8, 0x69, 0x07, 0xd6,
-	0xdb, 0x0a, 0x64, 0xb5, 0xef, 0x3e, 0x50, 0x81, 0x8c, 0x5d,
-	0x33, 0xe2, 0x29, 0xf8, 0x96, 0x47, 0x4a, 0x9b, 0xf5, 0x24,
-	0x41, 0x90, 0xfe, 0x2f, 0x22, 0xf3, 0x9d, 0x4c, 0x87, 0x56,
-	0x38, 0xe9, 0xe4, 0x35, 0x5b, 0x8a, 0xd0, 0x01, 0x6f, 0xbe,
-	0xb3, 0x62, 0x0c, 0xdd, 0x16, 0xc7, 0xa9, 0x78, 0x75, 0xa4,
-	0xca, 0x1b, 0xfc, 0x2d, 0x43, 0x92, 0x9f, 0x4e, 0x20, 0xf1,
-	0x3a, 0xeb, 0x85, 0x54, 0x59, 0x88, 0xe6, 0x37, 0x6d, 0xbc,
-	0xd2, 0x03, 0x0e, 0xdf, 0xb1, 0x60, 0xab, 0x7a, 0x14, 0xc5,
-	0xc8, 0x19, 0x77, 0xa6, 0xc3, 0x12, 0x7c, 0xad, 0xa0, 0x71,
-	0x1f, 0xce, 0x05, 0xd4, 0xba, 0x6b, 0x66, 0xb7, 0xd9, 0x08,
-	0x52, 0x83, 0xed, 0x3c, 0x31, 0xe0, 0x8e, 0x5f, 0x94, 0x45,
-	0x2b, 0xfa, 0xf7, 0x26, 0x48, 0x99, 0x82, 0x53, 0x3d, 0xec,
-	0xe1, 0x30, 0x5e, 0x8f, 0x44, 0x95, 0xfb, 0x2a, 0x27, 0xf6,
-	0x98, 0x49, 0x13, 0xc2, 0xac, 0x7d, 0x70, 0xa1, 0xcf, 0x1e,
-	0xd5, 0x04, 0x6a, 0xbb, 0xb6, 0x67, 0x09, 0xd8, 0xbd, 0x6c,
-	0x02, 0xd3, 0xde, 0x0f, 0x61, 0xb0, 0x7b, 0xaa, 0xc4, 0x15,
-	0x18, 0xc9, 0xa7, 0x76, 0x2c, 0xfd, 0x93, 0x42, 0x4f, 0x9e,
-	0xf0, 0x21, 0xea, 0x3b, 0x55, 0x84, 0x89, 0x58, 0x36, 0xe7,
-	0x00, 0xd2, 0xb9, 0x6b, 0x6f, 0xbd, 0xd6, 0x04, 0xde, 0x0c,
-	0x67, 0xb5, 0xb1, 0x63, 0x08, 0xda, 0xa1, 0x73, 0x18, 0xca,
-	0xce, 0x1c, 0x77, 0xa5, 0x7f, 0xad, 0xc6, 0x14, 0x10, 0xc2,
-	0xa9, 0x7b, 0x5f, 0x8d, 0xe6, 0x34, 0x30, 0xe2, 0x89, 0x5b,
-	0x81, 0x53, 0x38, 0xea, 0xee, 0x3c, 0x57, 0x85, 0xfe, 0x2c,
-	0x47, 0x95, 0x91, 0x43, 0x28, 0xfa, 0x20, 0xf2, 0x99, 0x4b,
-	0x4f, 0x9d, 0xf6, 0x24, 0xbe, 0x6c, 0x07, 0xd5, 0xd1, 0x03,
-	0x68, 0xba, 0x60, 0xb2, 0xd9, 0x0b, 0x0f, 0xdd, 0xb6, 0x64,
-	0x1f, 0xcd, 0xa6, 0x74, 0x70, 0xa2, 0xc9, 0x1b, 0xc1, 0x13,
-	0x78, 0xaa, 0xae, 0x7c, 0x17, 0xc5, 0xe1, 0x33, 0x58, 0x8a,
-	0x8e, 0x5c, 0x37, 0xe5, 0x3f, 0xed, 0x86, 0x54, 0x50, 0x82,
-	0xe9, 0x3b, 0x40, 0x92, 0xf9, 0x2b, 0x2f, 0xfd, 0x96, 0x44,
-	0x9e, 0x4c, 0x27, 0xf5, 0xf1, 0x23, 0x48, 0x9a, 0x61, 0xb3,
-	0xd8, 0x0a, 0x0e, 0xdc, 0xb7, 0x65, 0xbf, 0x6d, 0x06, 0xd4,
-	0xd0, 0x02, 0x69, 0xbb, 0xc0, 0x12, 0x79, 0xab, 0xaf, 0x7d,
-	0x16, 0xc4, 0x1e, 0xcc, 0xa7, 0x75, 0x71, 0xa3, 0xc8, 0x1a,
-	0x3e, 0xec, 0x87, 0x55, 0x51, 0x83, 0xe8, 0x3a, 0xe0, 0x32,
-	0x59, 0x8b, 0x8f, 0x5d, 0x36, 0xe4, 0x9f, 0x4d, 0x26, 0xf4,
-	0xf0, 0x22, 0x49, 0x9b, 0x41, 0x93, 0xf8, 0x2a, 0x2e, 0xfc,
-	0x97, 0x45, 0xdf, 0x0d, 0x66, 0xb4, 0xb0, 0x62, 0x09, 0xdb,
-	0x01, 0xd3, 0xb8, 0x6a, 0x6e, 0xbc, 0xd7, 0x05, 0x7e, 0xac,
-	0xc7, 0x15, 0x11, 0xc3, 0xa8, 0x7a, 0xa0, 0x72, 0x19, 0xcb,
-	0xcf, 0x1d, 0x76, 0xa4, 0x80, 0x52, 0x39, 0xeb, 0xef, 0x3d,
-	0x56, 0x84, 0x5e, 0x8c, 0xe7, 0x35, 0x31, 0xe3, 0x88, 0x5a,
-	0x21, 0xf3, 0x98, 0x4a, 0x4e, 0x9c, 0xf7, 0x25, 0xff, 0x2d,
-	0x46, 0x94, 0x90, 0x42, 0x29, 0xfb, 0x00, 0xd3, 0xbb, 0x68,
-	0x6b, 0xb8, 0xd0, 0x03, 0xd6, 0x05, 0x6d, 0xbe, 0xbd, 0x6e,
-	0x06, 0xd5, 0xb1, 0x62, 0x0a, 0xd9, 0xda, 0x09, 0x61, 0xb2,
-	0x67, 0xb4, 0xdc, 0x0f, 0x0c, 0xdf, 0xb7, 0x64, 0x7f, 0xac,
-	0xc4, 0x17, 0x14, 0xc7, 0xaf, 0x7c, 0xa9, 0x7a, 0x12, 0xc1,
-	0xc2, 0x11, 0x79, 0xaa, 0xce, 0x1d, 0x75, 0xa6, 0xa5, 0x76,
-	0x1e, 0xcd, 0x18, 0xcb, 0xa3, 0x70, 0x73, 0xa0, 0xc8, 0x1b,
-	0xfe, 0x2d, 0x45, 0x96, 0x95, 0x46, 0x2e, 0xfd, 0x28, 0xfb,
-	0x93, 0x40, 0x43, 0x90, 0xf8, 0x2b, 0x4f, 0x9c, 0xf4, 0x27,
-	0x24, 0xf7, 0x9f, 0x4c, 0x99, 0x4a, 0x22, 0xf1, 0xf2, 0x21,
-	0x49, 0x9a, 0x81, 0x52, 0x3a, 0xe9, 0xea, 0x39, 0x51, 0x82,
-	0x57, 0x84, 0xec, 0x3f, 0x3c, 0xef, 0x87, 0x54, 0x30, 0xe3,
-	0x8b, 0x58, 0x5b, 0x88, 0xe0, 0x33, 0xe6, 0x35, 0x5d, 0x8e,
-	0x8d, 0x5e, 0x36, 0xe5, 0xe1, 0x32, 0x5a, 0x89, 0x8a, 0x59,
-	0x31, 0xe2, 0x37, 0xe4, 0x8c, 0x5f, 0x5c, 0x8f, 0xe7, 0x34,
-	0x50, 0x83, 0xeb, 0x38, 0x3b, 0xe8, 0x80, 0x53, 0x86, 0x55,
-	0x3d, 0xee, 0xed, 0x3e, 0x56, 0x85, 0x9e, 0x4d, 0x25, 0xf6,
-	0xf5, 0x26, 0x4e, 0x9d, 0x48, 0x9b, 0xf3, 0x20, 0x23, 0xf0,
-	0x98, 0x4b, 0x2f, 0xfc, 0x94, 0x47, 0x44, 0x97, 0xff, 0x2c,
-	0xf9, 0x2a, 0x42, 0x91, 0x92, 0x41, 0x29, 0xfa, 0x1f, 0xcc,
-	0xa4, 0x77, 0x74, 0xa7, 0xcf, 0x1c, 0xc9, 0x1a, 0x72, 0xa1,
-	0xa2, 0x71, 0x19, 0xca, 0xae, 0x7d, 0x15, 0xc6, 0xc5, 0x16,
-	0x7e, 0xad, 0x78, 0xab, 0xc3, 0x10, 0x13, 0xc0, 0xa8, 0x7b,
-	0x60, 0xb3, 0xdb, 0x08, 0x0b, 0xd8, 0xb0, 0x63, 0xb6, 0x65,
-	0x0d, 0xde, 0xdd, 0x0e, 0x66, 0xb5, 0xd1, 0x02, 0x6a, 0xb9,
-	0xba, 0x69, 0x01, 0xd2, 0x07, 0xd4, 0xbc, 0x6f, 0x6c, 0xbf,
-	0xd7, 0x04, 0x00, 0xd4, 0xb5, 0x61, 0x77, 0xa3, 0xc2, 0x16,
-	0xee, 0x3a, 0x5b, 0x8f, 0x99, 0x4d, 0x2c, 0xf8, 0xc1, 0x15,
-	0x74, 0xa0, 0xb6, 0x62, 0x03, 0xd7, 0x2f, 0xfb, 0x9a, 0x4e,
-	0x58, 0x8c, 0xed, 0x39, 0x9f, 0x4b, 0x2a, 0xfe, 0xe8, 0x3c,
-	0x5d, 0x89, 0x71, 0xa5, 0xc4, 0x10, 0x06, 0xd2, 0xb3, 0x67,
-	0x5e, 0x8a, 0xeb, 0x3f, 0x29, 0xfd, 0x9c, 0x48, 0xb0, 0x64,
-	0x05, 0xd1, 0xc7, 0x13, 0x72, 0xa6, 0x23, 0xf7, 0x96, 0x42,
-	0x54, 0x80, 0xe1, 0x35, 0xcd, 0x19, 0x78, 0xac, 0xba, 0x6e,
-	0x0f, 0xdb, 0xe2, 0x36, 0x57, 0x83, 0x95, 0x41, 0x20, 0xf4,
-	0x0c, 0xd8, 0xb9, 0x6d, 0x7b, 0xaf, 0xce, 0x1a, 0xbc, 0x68,
-	0x09, 0xdd, 0xcb, 0x1f, 0x7e, 0xaa, 0x52, 0x86, 0xe7, 0x33,
-	0x25, 0xf1, 0x90, 0x44, 0x7d, 0xa9, 0xc8, 0x1c, 0x0a, 0xde,
-	0xbf, 0x6b, 0x93, 0x47, 0x26, 0xf2, 0xe4, 0x30, 0x51, 0x85,
-	0x46, 0x92, 0xf3, 0x27, 0x31, 0xe5, 0x84, 0x50, 0xa8, 0x7c,
-	0x1d, 0xc9, 0xdf, 0x0b, 0x6a, 0xbe, 0x87, 0x53, 0x32, 0xe6,
-	0xf0, 0x24, 0x45, 0x91, 0x69, 0xbd, 0xdc, 0x08, 0x1e, 0xca,
-	0xab, 0x7f, 0xd9, 0x0d, 0x6c, 0xb8, 0xae, 0x7a, 0x1b, 0xcf,
-	0x37, 0xe3, 0x82, 0x56, 0x40, 0x94, 0xf5, 0x21, 0x18, 0xcc,
-	0xad, 0x79, 0x6f, 0xbb, 0xda, 0x0e, 0xf6, 0x22, 0x43, 0x97,
-	0x81, 0x55, 0x34, 0xe0, 0x65, 0xb1, 0xd0, 0x04, 0x12, 0xc6,
-	0xa7, 0x73, 0x8b, 0x5f, 0x3e, 0xea, 0xfc, 0x28, 0x49, 0x9d,
-	0xa4, 0x70, 0x11, 0xc5, 0xd3, 0x07, 0x66, 0xb2, 0x4a, 0x9e,
-	0xff, 0x2b, 0x3d, 0xe9, 0x88, 0x5c, 0xfa, 0x2e, 0x4f, 0x9b,
-	0x8d, 0x59, 0x38, 0xec, 0x14, 0xc0, 0xa1, 0x75, 0x63, 0xb7,
-	0xd6, 0x02, 0x3b, 0xef, 0x8e, 0x5a, 0x4c, 0x98, 0xf9, 0x2d,
-	0xd5, 0x01, 0x60, 0xb4, 0xa2, 0x76, 0x17, 0xc3, 0x00, 0xd5,
-	0xb7, 0x62, 0x73, 0xa6, 0xc4, 0x11, 0xe6, 0x33, 0x51, 0x84,
-	0x95, 0x40, 0x22, 0xf7, 0xd1, 0x04, 0x66, 0xb3, 0xa2, 0x77,
-	0x15, 0xc0, 0x37, 0xe2, 0x80, 0x55, 0x44, 0x91, 0xf3, 0x26,
-	0xbf, 0x6a, 0x08, 0xdd, 0xcc, 0x19, 0x7b, 0xae, 0x59, 0x8c,
-	0xee, 0x3b, 0x2a, 0xff, 0x9d, 0x48, 0x6e, 0xbb, 0xd9, 0x0c,
-	0x1d, 0xc8, 0xaa, 0x7f, 0x88, 0x5d, 0x3f, 0xea, 0xfb, 0x2e,
-	0x4c, 0x99, 0x63, 0xb6, 0xd4, 0x01, 0x10, 0xc5, 0xa7, 0x72,
-	0x85, 0x50, 0x32, 0xe7, 0xf6, 0x23, 0x41, 0x94, 0xb2, 0x67,
-	0x05, 0xd0, 0xc1, 0x14, 0x76, 0xa3, 0x54, 0x81, 0xe3, 0x36,
-	0x27, 0xf2, 0x90, 0x45, 0xdc, 0x09, 0x6b, 0xbe, 0xaf, 0x7a,
-	0x18, 0xcd, 0x3a, 0xef, 0x8d, 0x58, 0x49, 0x9c, 0xfe, 0x2b,
-	0x0d, 0xd8, 0xba, 0x6f, 0x7e, 0xab, 0xc9, 0x1c, 0xeb, 0x3e,
-	0x5c, 0x89, 0x98, 0x4d, 0x2f, 0xfa, 0xc6, 0x13, 0x71, 0xa4,
-	0xb5, 0x60, 0x02, 0xd7, 0x20, 0xf5, 0x97, 0x42, 0x53, 0x86,
-	0xe4, 0x31, 0x17, 0xc2, 0xa0, 0x75, 0x64, 0xb1, 0xd3, 0x06,
-	0xf1, 0x24, 0x46, 0x93, 0x82, 0x57, 0x35, 0xe0, 0x79, 0xac,
-	0xce, 0x1b, 0x0a, 0xdf, 0xbd, 0x68, 0x9f, 0x4a, 0x28, 0xfd,
-	0xec, 0x39, 0x5b, 0x8e, 0xa8, 0x7d, 0x1f, 0xca, 0xdb, 0x0e,
-	0x6c, 0xb9, 0x4e, 0x9b, 0xf9, 0x2c, 0x3d, 0xe8, 0x8a, 0x5f,
-	0xa5, 0x70, 0x12, 0xc7, 0xd6, 0x03, 0x61, 0xb4, 0x43, 0x96,
-	0xf4, 0x21, 0x30, 0xe5, 0x87, 0x52, 0x74, 0xa1, 0xc3, 0x16,
-	0x07, 0xd2, 0xb0, 0x65, 0x92, 0x47, 0x25, 0xf0, 0xe1, 0x34,
-	0x56, 0x83, 0x1a, 0xcf, 0xad, 0x78, 0x69, 0xbc, 0xde, 0x0b,
-	0xfc, 0x29, 0x4b, 0x9e, 0x8f, 0x5a, 0x38, 0xed, 0xcb, 0x1e,
-	0x7c, 0xa9, 0xb8, 0x6d, 0x0f, 0xda, 0x2d, 0xf8, 0x9a, 0x4f,
-	0x5e, 0x8b, 0xe9, 0x3c, 0x00, 0xd6, 0xb1, 0x67, 0x7f, 0xa9,
-	0xce, 0x18, 0xfe, 0x28, 0x4f, 0x99, 0x81, 0x57, 0x30, 0xe6,
-	0xe1, 0x37, 0x50, 0x86, 0x9e, 0x48, 0x2f, 0xf9, 0x1f, 0xc9,
-	0xae, 0x78, 0x60, 0xb6, 0xd1, 0x07, 0xdf, 0x09, 0x6e, 0xb8,
-	0xa0, 0x76, 0x11, 0xc7, 0x21, 0xf7, 0x90, 0x46, 0x5e, 0x88,
-	0xef, 0x39, 0x3e, 0xe8, 0x8f, 0x59, 0x41, 0x97, 0xf0, 0x26,
-	0xc0, 0x16, 0x71, 0xa7, 0xbf, 0x69, 0x0e, 0xd8, 0xa3, 0x75,
-	0x12, 0xc4, 0xdc, 0x0a, 0x6d, 0xbb, 0x5d, 0x8b, 0xec, 0x3a,
-	0x22, 0xf4, 0x93, 0x45, 0x42, 0x94, 0xf3, 0x25, 0x3d, 0xeb,
-	0x8c, 0x5a, 0xbc, 0x6a, 0x0d, 0xdb, 0xc3, 0x15, 0x72, 0xa4,
-	0x7c, 0xaa, 0xcd, 0x1b, 0x03, 0xd5, 0xb2, 0x64, 0x82, 0x54,
-	0x33, 0xe5, 0xfd, 0x2b, 0x4c, 0x9a, 0x9d, 0x4b, 0x2c, 0xfa,
-	0xe2, 0x34, 0x53, 0x85, 0x63, 0xb5, 0xd2, 0x04, 0x1c, 0xca,
-	0xad, 0x7b, 0x5b, 0x8d, 0xea, 0x3c, 0x24, 0xf2, 0x95, 0x43,
-	0xa5, 0x73, 0x14, 0xc2, 0xda, 0x0c, 0x6b, 0xbd, 0xba, 0x6c,
-	0x0b, 0xdd, 0xc5, 0x13, 0x74, 0xa2, 0x44, 0x92, 0xf5, 0x23,
-	0x3b, 0xed, 0x8a, 0x5c, 0x84, 0x52, 0x35, 0xe3, 0xfb, 0x2d,
-	0x4a, 0x9c, 0x7a, 0xac, 0xcb, 0x1d, 0x05, 0xd3, 0xb4, 0x62,
-	0x65, 0xb3, 0xd4, 0x02, 0x1a, 0xcc, 0xab, 0x7d, 0x9b, 0x4d,
-	0x2a, 0xfc, 0xe4, 0x32, 0x55, 0x83, 0xf8, 0x2e, 0x49, 0x9f,
-	0x87, 0x51, 0x36, 0xe0, 0x06, 0xd0, 0xb7, 0x61, 0x79, 0xaf,
-	0xc8, 0x1e, 0x19, 0xcf, 0xa8, 0x7e, 0x66, 0xb0, 0xd7, 0x01,
-	0xe7, 0x31, 0x56, 0x80, 0x98, 0x4e, 0x29, 0xff, 0x27, 0xf1,
-	0x96, 0x40, 0x58, 0x8e, 0xe9, 0x3f, 0xd9, 0x0f, 0x68, 0xbe,
-	0xa6, 0x70, 0x17, 0xc1, 0xc6, 0x10, 0x77, 0xa1, 0xb9, 0x6f,
-	0x08, 0xde, 0x38, 0xee, 0x89, 0x5f, 0x47, 0x91, 0xf6, 0x20,
-	0x00, 0xd7, 0xb3, 0x64, 0x7b, 0xac, 0xc8, 0x1f, 0xf6, 0x21,
-	0x45, 0x92, 0x8d, 0x5a, 0x3e, 0xe9, 0xf1, 0x26, 0x42, 0x95,
-	0x8a, 0x5d, 0x39, 0xee, 0x07, 0xd0, 0xb4, 0x63, 0x7c, 0xab,
-	0xcf, 0x18, 0xff, 0x28, 0x4c, 0x9b, 0x84, 0x53, 0x37, 0xe0,
-	0x09, 0xde, 0xba, 0x6d, 0x72, 0xa5, 0xc1, 0x16, 0x0e, 0xd9,
-	0xbd, 0x6a, 0x75, 0xa2, 0xc6, 0x11, 0xf8, 0x2f, 0x4b, 0x9c,
-	0x83, 0x54, 0x30, 0xe7, 0xe3, 0x34, 0x50, 0x87, 0x98, 0x4f,
-	0x2b, 0xfc, 0x15, 0xc2, 0xa6, 0x71, 0x6e, 0xb9, 0xdd, 0x0a,
-	0x12, 0xc5, 0xa1, 0x76, 0x69, 0xbe, 0xda, 0x0d, 0xe4, 0x33,
-	0x57, 0x80, 0x9f, 0x48, 0x2c, 0xfb, 0x1c, 0xcb, 0xaf, 0x78,
-	0x67, 0xb0, 0xd4, 0x03, 0xea, 0x3d, 0x59, 0x8e, 0x91, 0x46,
-	0x22, 0xf5, 0xed, 0x3a, 0x5e, 0x89, 0x96, 0x41, 0x25, 0xf2,
-	0x1b, 0xcc, 0xa8, 0x7f, 0x60, 0xb7, 0xd3, 0x04, 0xdb, 0x0c,
-	0x68, 0xbf, 0xa0, 0x77, 0x13, 0xc4, 0x2d, 0xfa, 0x9e, 0x49,
-	0x56, 0x81, 0xe5, 0x32, 0x2a, 0xfd, 0x99, 0x4e, 0x51, 0x86,
-	0xe2, 0x35, 0xdc, 0x0b, 0x6f, 0xb8, 0xa7, 0x70, 0x14, 0xc3,
-	0x24, 0xf3, 0x97, 0x40, 0x5f, 0x88, 0xec, 0x3b, 0xd2, 0x05,
-	0x61, 0xb6, 0xa9, 0x7e, 0x1a, 0xcd, 0xd5, 0x02, 0x66, 0xb1,
-	0xae, 0x79, 0x1d, 0xca, 0x23, 0xf4, 0x90, 0x47, 0x58, 0x8f,
-	0xeb, 0x3c, 0x38, 0xef, 0x8b, 0x5c, 0x43, 0x94, 0xf0, 0x27,
-	0xce, 0x19, 0x7d, 0xaa, 0xb5, 0x62, 0x06, 0xd1, 0xc9, 0x1e,
-	0x7a, 0xad, 0xb2, 0x65, 0x01, 0xd6, 0x3f, 0xe8, 0x8c, 0x5b,
-	0x44, 0x93, 0xf7, 0x20, 0xc7, 0x10, 0x74, 0xa3, 0xbc, 0x6b,
-	0x0f, 0xd8, 0x31, 0xe6, 0x82, 0x55, 0x4a, 0x9d, 0xf9, 0x2e,
-	0x36, 0xe1, 0x85, 0x52, 0x4d, 0x9a, 0xfe, 0x29, 0xc0, 0x17,
-	0x73, 0xa4, 0xbb, 0x6c, 0x08, 0xdf, 0x00, 0xd8, 0xad, 0x75,
-	0x47, 0x9f, 0xea, 0x32, 0x8e, 0x56, 0x23, 0xfb, 0xc9, 0x11,
-	0x64, 0xbc, 0x01, 0xd9, 0xac, 0x74, 0x46, 0x9e, 0xeb, 0x33,
-	0x8f, 0x57, 0x22, 0xfa, 0xc8, 0x10, 0x65, 0xbd, 0x02, 0xda,
-	0xaf, 0x77, 0x45, 0x9d, 0xe8, 0x30, 0x8c, 0x54, 0x21, 0xf9,
-	0xcb, 0x13, 0x66, 0xbe, 0x03, 0xdb, 0xae, 0x76, 0x44, 0x9c,
-	0xe9, 0x31, 0x8d, 0x55, 0x20, 0xf8, 0xca, 0x12, 0x67, 0xbf,
-	0x04, 0xdc, 0xa9, 0x71, 0x43, 0x9b, 0xee, 0x36, 0x8a, 0x52,
-	0x27, 0xff, 0xcd, 0x15, 0x60, 0xb8, 0x05, 0xdd, 0xa8, 0x70,
-	0x42, 0x9a, 0xef, 0x37, 0x8b, 0x53, 0x26, 0xfe, 0xcc, 0x14,
-	0x61, 0xb9, 0x06, 0xde, 0xab, 0x73, 0x41, 0x99, 0xec, 0x34,
-	0x88, 0x50, 0x25, 0xfd, 0xcf, 0x17, 0x62, 0xba, 0x07, 0xdf,
-	0xaa, 0x72, 0x40, 0x98, 0xed, 0x35, 0x89, 0x51, 0x24, 0xfc,
-	0xce, 0x16, 0x63, 0xbb, 0x08, 0xd0, 0xa5, 0x7d, 0x4f, 0x97,
-	0xe2, 0x3a, 0x86, 0x5e, 0x2b, 0xf3, 0xc1, 0x19, 0x6c, 0xb4,
-	0x09, 0xd1, 0xa4, 0x7c, 0x4e, 0x96, 0xe3, 0x3b, 0x87, 0x5f,
-	0x2a, 0xf2, 0xc0, 0x18, 0x6d, 0xb5, 0x0a, 0xd2, 0xa7, 0x7f,
-	0x4d, 0x95, 0xe0, 0x38, 0x84, 0x5c, 0x29, 0xf1, 0xc3, 0x1b,
-	0x6e, 0xb6, 0x0b, 0xd3, 0xa6, 0x7e, 0x4c, 0x94, 0xe1, 0x39,
-	0x85, 0x5d, 0x28, 0xf0, 0xc2, 0x1a, 0x6f, 0xb7, 0x0c, 0xd4,
-	0xa1, 0x79, 0x4b, 0x93, 0xe6, 0x3e, 0x82, 0x5a, 0x2f, 0xf7,
-	0xc5, 0x1d, 0x68, 0xb0, 0x0d, 0xd5, 0xa0, 0x78, 0x4a, 0x92,
-	0xe7, 0x3f, 0x83, 0x5b, 0x2e, 0xf6, 0xc4, 0x1c, 0x69, 0xb1,
-	0x0e, 0xd6, 0xa3, 0x7b, 0x49, 0x91, 0xe4, 0x3c, 0x80, 0x58,
-	0x2d, 0xf5, 0xc7, 0x1f, 0x6a, 0xb2, 0x0f, 0xd7, 0xa2, 0x7a,
-	0x48, 0x90, 0xe5, 0x3d, 0x81, 0x59, 0x2c, 0xf4, 0xc6, 0x1e,
-	0x6b, 0xb3, 0x00, 0xd9, 0xaf, 0x76, 0x43, 0x9a, 0xec, 0x35,
-	0x86, 0x5f, 0x29, 0xf0, 0xc5, 0x1c, 0x6a, 0xb3, 0x11, 0xc8,
-	0xbe, 0x67, 0x52, 0x8b, 0xfd, 0x24, 0x97, 0x4e, 0x38, 0xe1,
-	0xd4, 0x0d, 0x7b, 0xa2, 0x22, 0xfb, 0x8d, 0x54, 0x61, 0xb8,
-	0xce, 0x17, 0xa4, 0x7d, 0x0b, 0xd2, 0xe7, 0x3e, 0x48, 0x91,
-	0x33, 0xea, 0x9c, 0x45, 0x70, 0xa9, 0xdf, 0x06, 0xb5, 0x6c,
-	0x1a, 0xc3, 0xf6, 0x2f, 0x59, 0x80, 0x44, 0x9d, 0xeb, 0x32,
-	0x07, 0xde, 0xa8, 0x71, 0xc2, 0x1b, 0x6d, 0xb4, 0x81, 0x58,
-	0x2e, 0xf7, 0x55, 0x8c, 0xfa, 0x23, 0x16, 0xcf, 0xb9, 0x60,
-	0xd3, 0x0a, 0x7c, 0xa5, 0x90, 0x49, 0x3f, 0xe6, 0x66, 0xbf,
-	0xc9, 0x10, 0x25, 0xfc, 0x8a, 0x53, 0xe0, 0x39, 0x4f, 0x96,
-	0xa3, 0x7a, 0x0c, 0xd5, 0x77, 0xae, 0xd8, 0x01, 0x34, 0xed,
-	0x9b, 0x42, 0xf1, 0x28, 0x5e, 0x87, 0xb2, 0x6b, 0x1d, 0xc4,
-	0x88, 0x51, 0x27, 0xfe, 0xcb, 0x12, 0x64, 0xbd, 0x0e, 0xd7,
-	0xa1, 0x78, 0x4d, 0x94, 0xe2, 0x3b, 0x99, 0x40, 0x36, 0xef,
-	0xda, 0x03, 0x75, 0xac, 0x1f, 0xc6, 0xb0, 0x69, 0x5c, 0x85,
-	0xf3, 0x2a, 0xaa, 0x73, 0x05, 0xdc, 0xe9, 0x30, 0x46, 0x9f,
-	0x2c, 0xf5, 0x83, 0x5a, 0x6f, 0xb6, 0xc0, 0x19, 0xbb, 0x62,
-	0x14, 0xcd, 0xf8, 0x21, 0x57, 0x8e, 0x3d, 0xe4, 0x92, 0x4b,
-	0x7e, 0xa7, 0xd1, 0x08, 0xcc, 0x15, 0x63, 0xba, 0x8f, 0x56,
-	0x20, 0xf9, 0x4a, 0x93, 0xe5, 0x3c, 0x09, 0xd0, 0xa6, 0x7f,
-	0xdd, 0x04, 0x72, 0xab, 0x9e, 0x47, 0x31, 0xe8, 0x5b, 0x82,
-	0xf4, 0x2d, 0x18, 0xc1, 0xb7, 0x6e, 0xee, 0x37, 0x41, 0x98,
-	0xad, 0x74, 0x02, 0xdb, 0x68, 0xb1, 0xc7, 0x1e, 0x2b, 0xf2,
-	0x84, 0x5d, 0xff, 0x26, 0x50, 0x89, 0xbc, 0x65, 0x13, 0xca,
-	0x79, 0xa0, 0xd6, 0x0f, 0x3a, 0xe3, 0x95, 0x4c, 0x00, 0xda,
-	0xa9, 0x73, 0x4f, 0x95, 0xe6, 0x3c, 0x9e, 0x44, 0x37, 0xed,
-	0xd1, 0x0b, 0x78, 0xa2, 0x21, 0xfb, 0x88, 0x52, 0x6e, 0xb4,
-	0xc7, 0x1d, 0xbf, 0x65, 0x16, 0xcc, 0xf0, 0x2a, 0x59, 0x83,
-	0x42, 0x98, 0xeb, 0x31, 0x0d, 0xd7, 0xa4, 0x7e, 0xdc, 0x06,
-	0x75, 0xaf, 0x93, 0x49, 0x3a, 0xe0, 0x63, 0xb9, 0xca, 0x10,
-	0x2c, 0xf6, 0x85, 0x5f, 0xfd, 0x27, 0x54, 0x8e, 0xb2, 0x68,
-	0x1b, 0xc1, 0x84, 0x5e, 0x2d, 0xf7, 0xcb, 0x11, 0x62, 0xb8,
-	0x1a, 0xc0, 0xb3, 0x69, 0x55, 0x8f, 0xfc, 0x26, 0xa5, 0x7f,
-	0x0c, 0xd6, 0xea, 0x30, 0x43, 0x99, 0x3b, 0xe1, 0x92, 0x48,
-	0x74, 0xae, 0xdd, 0x07, 0xc6, 0x1c, 0x6f, 0xb5, 0x89, 0x53,
-	0x20, 0xfa, 0x58, 0x82, 0xf1, 0x2b, 0x17, 0xcd, 0xbe, 0x64,
-	0xe7, 0x3d, 0x4e, 0x94, 0xa8, 0x72, 0x01, 0xdb, 0x79, 0xa3,
-	0xd0, 0x0a, 0x36, 0xec, 0x9f, 0x45, 0x15, 0xcf, 0xbc, 0x66,
-	0x5a, 0x80, 0xf3, 0x29, 0x8b, 0x51, 0x22, 0xf8, 0xc4, 0x1e,
-	0x6d, 0xb7, 0x34, 0xee, 0x9d, 0x47, 0x7b, 0xa1, 0xd2, 0x08,
-	0xaa, 0x70, 0x03, 0xd9, 0xe5, 0x3f, 0x4c, 0x96, 0x57, 0x8d,
-	0xfe, 0x24, 0x18, 0xc2, 0xb1, 0x6b, 0xc9, 0x13, 0x60, 0xba,
-	0x86, 0x5c, 0x2f, 0xf5, 0x76, 0xac, 0xdf, 0x05, 0x39, 0xe3,
-	0x90, 0x4a, 0xe8, 0x32, 0x41, 0x9b, 0xa7, 0x7d, 0x0e, 0xd4,
-	0x91, 0x4b, 0x38, 0xe2, 0xde, 0x04, 0x77, 0xad, 0x0f, 0xd5,
-	0xa6, 0x7c, 0x40, 0x9a, 0xe9, 0x33, 0xb0, 0x6a, 0x19, 0xc3,
-	0xff, 0x25, 0x56, 0x8c, 0x2e, 0xf4, 0x87, 0x5d, 0x61, 0xbb,
-	0xc8, 0x12, 0xd3, 0x09, 0x7a, 0xa0, 0x9c, 0x46, 0x35, 0xef,
-	0x4d, 0x97, 0xe4, 0x3e, 0x02, 0xd8, 0xab, 0x71, 0xf2, 0x28,
-	0x5b, 0x81, 0xbd, 0x67, 0x14, 0xce, 0x6c, 0xb6, 0xc5, 0x1f,
-	0x23, 0xf9, 0x8a, 0x50, 0x00, 0xdb, 0xab, 0x70, 0x4b, 0x90,
-	0xe0, 0x3b, 0x96, 0x4d, 0x3d, 0xe6, 0xdd, 0x06, 0x76, 0xad,
-	0x31, 0xea, 0x9a, 0x41, 0x7a, 0xa1, 0xd1, 0x0a, 0xa7, 0x7c,
-	0x0c, 0xd7, 0xec, 0x37, 0x47, 0x9c, 0x62, 0xb9, 0xc9, 0x12,
-	0x29, 0xf2, 0x82, 0x59, 0xf4, 0x2f, 0x5f, 0x84, 0xbf, 0x64,
-	0x14, 0xcf, 0x53, 0x88, 0xf8, 0x23, 0x18, 0xc3, 0xb3, 0x68,
-	0xc5, 0x1e, 0x6e, 0xb5, 0x8e, 0x55, 0x25, 0xfe, 0xc4, 0x1f,
-	0x6f, 0xb4, 0x8f, 0x54, 0x24, 0xff, 0x52, 0x89, 0xf9, 0x22,
-	0x19, 0xc2, 0xb2, 0x69, 0xf5, 0x2e, 0x5e, 0x85, 0xbe, 0x65,
-	0x15, 0xce, 0x63, 0xb8, 0xc8, 0x13, 0x28, 0xf3, 0x83, 0x58,
-	0xa6, 0x7d, 0x0d, 0xd6, 0xed, 0x36, 0x46, 0x9d, 0x30, 0xeb,
-	0x9b, 0x40, 0x7b, 0xa0, 0xd0, 0x0b, 0x97, 0x4c, 0x3c, 0xe7,
-	0xdc, 0x07, 0x77, 0xac, 0x01, 0xda, 0xaa, 0x71, 0x4a, 0x91,
-	0xe1, 0x3a, 0x95, 0x4e, 0x3e, 0xe5, 0xde, 0x05, 0x75, 0xae,
-	0x03, 0xd8, 0xa8, 0x73, 0x48, 0x93, 0xe3, 0x38, 0xa4, 0x7f,
-	0x0f, 0xd4, 0xef, 0x34, 0x44, 0x9f, 0x32, 0xe9, 0x99, 0x42,
-	0x79, 0xa2, 0xd2, 0x09, 0xf7, 0x2c, 0x5c, 0x87, 0xbc, 0x67,
-	0x17, 0xcc, 0x61, 0xba, 0xca, 0x11, 0x2a, 0xf1, 0x81, 0x5a,
-	0xc6, 0x1d, 0x6d, 0xb6, 0x8d, 0x56, 0x26, 0xfd, 0x50, 0x8b,
-	0xfb, 0x20, 0x1b, 0xc0, 0xb0, 0x6b, 0x51, 0x8a, 0xfa, 0x21,
-	0x1a, 0xc1, 0xb1, 0x6a, 0xc7, 0x1c, 0x6c, 0xb7, 0x8c, 0x57,
-	0x27, 0xfc, 0x60, 0xbb, 0xcb, 0x10, 0x2b, 0xf0, 0x80, 0x5b,
-	0xf6, 0x2d, 0x5d, 0x86, 0xbd, 0x66, 0x16, 0xcd, 0x33, 0xe8,
-	0x98, 0x43, 0x78, 0xa3, 0xd3, 0x08, 0xa5, 0x7e, 0x0e, 0xd5,
-	0xee, 0x35, 0x45, 0x9e, 0x02, 0xd9, 0xa9, 0x72, 0x49, 0x92,
-	0xe2, 0x39, 0x94, 0x4f, 0x3f, 0xe4, 0xdf, 0x04, 0x74, 0xaf,
-	0x00, 0xdc, 0xa5, 0x79, 0x57, 0x8b, 0xf2, 0x2e, 0xae, 0x72,
-	0x0b, 0xd7, 0xf9, 0x25, 0x5c, 0x80, 0x41, 0x9d, 0xe4, 0x38,
-	0x16, 0xca, 0xb3, 0x6f, 0xef, 0x33, 0x4a, 0x96, 0xb8, 0x64,
-	0x1d, 0xc1, 0x82, 0x5e, 0x27, 0xfb, 0xd5, 0x09, 0x70, 0xac,
-	0x2c, 0xf0, 0x89, 0x55, 0x7b, 0xa7, 0xde, 0x02, 0xc3, 0x1f,
-	0x66, 0xba, 0x94, 0x48, 0x31, 0xed, 0x6d, 0xb1, 0xc8, 0x14,
-	0x3a, 0xe6, 0x9f, 0x43, 0x19, 0xc5, 0xbc, 0x60, 0x4e, 0x92,
-	0xeb, 0x37, 0xb7, 0x6b, 0x12, 0xce, 0xe0, 0x3c, 0x45, 0x99,
-	0x58, 0x84, 0xfd, 0x21, 0x0f, 0xd3, 0xaa, 0x76, 0xf6, 0x2a,
-	0x53, 0x8f, 0xa1, 0x7d, 0x04, 0xd8, 0x9b, 0x47, 0x3e, 0xe2,
-	0xcc, 0x10, 0x69, 0xb5, 0x35, 0xe9, 0x90, 0x4c, 0x62, 0xbe,
-	0xc7, 0x1b, 0xda, 0x06, 0x7f, 0xa3, 0x8d, 0x51, 0x28, 0xf4,
-	0x74, 0xa8, 0xd1, 0x0d, 0x23, 0xff, 0x86, 0x5a, 0x32, 0xee,
-	0x97, 0x4b, 0x65, 0xb9, 0xc0, 0x1c, 0x9c, 0x40, 0x39, 0xe5,
-	0xcb, 0x17, 0x6e, 0xb2, 0x73, 0xaf, 0xd6, 0x0a, 0x24, 0xf8,
-	0x81, 0x5d, 0xdd, 0x01, 0x78, 0xa4, 0x8a, 0x56, 0x2f, 0xf3,
-	0xb0, 0x6c, 0x15, 0xc9, 0xe7, 0x3b, 0x42, 0x9e, 0x1e, 0xc2,
-	0xbb, 0x67, 0x49, 0x95, 0xec, 0x30, 0xf1, 0x2d, 0x54, 0x88,
-	0xa6, 0x7a, 0x03, 0xdf, 0x5f, 0x83, 0xfa, 0x26, 0x08, 0xd4,
-	0xad, 0x71, 0x2b, 0xf7, 0x8e, 0x52, 0x7c, 0xa0, 0xd9, 0x05,
-	0x85, 0x59, 0x20, 0xfc, 0xd2, 0x0e, 0x77, 0xab, 0x6a, 0xb6,
-	0xcf, 0x13, 0x3d, 0xe1, 0x98, 0x44, 0xc4, 0x18, 0x61, 0xbd,
-	0x93, 0x4f, 0x36, 0xea, 0xa9, 0x75, 0x0c, 0xd0, 0xfe, 0x22,
-	0x5b, 0x87, 0x07, 0xdb, 0xa2, 0x7e, 0x50, 0x8c, 0xf5, 0x29,
-	0xe8, 0x34, 0x4d, 0x91, 0xbf, 0x63, 0x1a, 0xc6, 0x46, 0x9a,
-	0xe3, 0x3f, 0x11, 0xcd, 0xb4, 0x68, 0x00, 0xdd, 0xa7, 0x7a,
-	0x53, 0x8e, 0xf4, 0x29, 0xa6, 0x7b, 0x01, 0xdc, 0xf5, 0x28,
-	0x52, 0x8f, 0x51, 0x8c, 0xf6, 0x2b, 0x02, 0xdf, 0xa5, 0x78,
-	0xf7, 0x2a, 0x50, 0x8d, 0xa4, 0x79, 0x03, 0xde, 0xa2, 0x7f,
-	0x05, 0xd8, 0xf1, 0x2c, 0x56, 0x8b, 0x04, 0xd9, 0xa3, 0x7e,
-	0x57, 0x8a, 0xf0, 0x2d, 0xf3, 0x2e, 0x54, 0x89, 0xa0, 0x7d,
-	0x07, 0xda, 0x55, 0x88, 0xf2, 0x2f, 0x06, 0xdb, 0xa1, 0x7c,
-	0x59, 0x84, 0xfe, 0x23, 0x0a, 0xd7, 0xad, 0x70, 0xff, 0x22,
-	0x58, 0x85, 0xac, 0x71, 0x0b, 0xd6, 0x08, 0xd5, 0xaf, 0x72,
-	0x5b, 0x86, 0xfc, 0x21, 0xae, 0x73, 0x09, 0xd4, 0xfd, 0x20,
-	0x5a, 0x87, 0xfb, 0x26, 0x5c, 0x81, 0xa8, 0x75, 0x0f, 0xd2,
-	0x5d, 0x80, 0xfa, 0x27, 0x0e, 0xd3, 0xa9, 0x74, 0xaa, 0x77,
-	0x0d, 0xd0, 0xf9, 0x24, 0x5e, 0x83, 0x0c, 0xd1, 0xab, 0x76,
-	0x5f, 0x82, 0xf8, 0x25, 0xb2, 0x6f, 0x15, 0xc8, 0xe1, 0x3c,
-	0x46, 0x9b, 0x14, 0xc9, 0xb3, 0x6e, 0x47, 0x9a, 0xe0, 0x3d,
-	0xe3, 0x3e, 0x44, 0x99, 0xb0, 0x6d, 0x17, 0xca, 0x45, 0x98,
-	0xe2, 0x3f, 0x16, 0xcb, 0xb1, 0x6c, 0x10, 0xcd, 0xb7, 0x6a,
-	0x43, 0x9e, 0xe4, 0x39, 0xb6, 0x6b, 0x11, 0xcc, 0xe5, 0x38,
-	0x42, 0x9f, 0x41, 0x9c, 0xe6, 0x3b, 0x12, 0xcf, 0xb5, 0x68,
-	0xe7, 0x3a, 0x40, 0x9d, 0xb4, 0x69, 0x13, 0xce, 0xeb, 0x36,
-	0x4c, 0x91, 0xb8, 0x65, 0x1f, 0xc2, 0x4d, 0x90, 0xea, 0x37,
-	0x1e, 0xc3, 0xb9, 0x64, 0xba, 0x67, 0x1d, 0xc0, 0xe9, 0x34,
-	0x4e, 0x93, 0x1c, 0xc1, 0xbb, 0x66, 0x4f, 0x92, 0xe8, 0x35,
-	0x49, 0x94, 0xee, 0x33, 0x1a, 0xc7, 0xbd, 0x60, 0xef, 0x32,
-	0x48, 0x95, 0xbc, 0x61, 0x1b, 0xc6, 0x18, 0xc5, 0xbf, 0x62,
-	0x4b, 0x96, 0xec, 0x31, 0xbe, 0x63, 0x19, 0xc4, 0xed, 0x30,
-	0x4a, 0x97, 0x00, 0xde, 0xa1, 0x7f, 0x5f, 0x81, 0xfe, 0x20,
-	0xbe, 0x60, 0x1f, 0xc1, 0xe1, 0x3f, 0x40, 0x9e, 0x61, 0xbf,
-	0xc0, 0x1e, 0x3e, 0xe0, 0x9f, 0x41, 0xdf, 0x01, 0x7e, 0xa0,
-	0x80, 0x5e, 0x21, 0xff, 0xc2, 0x1c, 0x63, 0xbd, 0x9d, 0x43,
-	0x3c, 0xe2, 0x7c, 0xa2, 0xdd, 0x03, 0x23, 0xfd, 0x82, 0x5c,
-	0xa3, 0x7d, 0x02, 0xdc, 0xfc, 0x22, 0x5d, 0x83, 0x1d, 0xc3,
-	0xbc, 0x62, 0x42, 0x9c, 0xe3, 0x3d, 0x99, 0x47, 0x38, 0xe6,
-	0xc6, 0x18, 0x67, 0xb9, 0x27, 0xf9, 0x86, 0x58, 0x78, 0xa6,
-	0xd9, 0x07, 0xf8, 0x26, 0x59, 0x87, 0xa7, 0x79, 0x06, 0xd8,
-	0x46, 0x98, 0xe7, 0x39, 0x19, 0xc7, 0xb8, 0x66, 0x5b, 0x85,
-	0xfa, 0x24, 0x04, 0xda, 0xa5, 0x7b, 0xe5, 0x3b, 0x44, 0x9a,
-	0xba, 0x64, 0x1b, 0xc5, 0x3a, 0xe4, 0x9b, 0x45, 0x65, 0xbb,
-	0xc4, 0x1a, 0x84, 0x5a, 0x25, 0xfb, 0xdb, 0x05, 0x7a, 0xa4,
-	0x2f, 0xf1, 0x8e, 0x50, 0x70, 0xae, 0xd1, 0x0f, 0x91, 0x4f,
-	0x30, 0xee, 0xce, 0x10, 0x6f, 0xb1, 0x4e, 0x90, 0xef, 0x31,
-	0x11, 0xcf, 0xb0, 0x6e, 0xf0, 0x2e, 0x51, 0x8f, 0xaf, 0x71,
-	0x0e, 0xd0, 0xed, 0x33, 0x4c, 0x92, 0xb2, 0x6c, 0x13, 0xcd,
-	0x53, 0x8d, 0xf2, 0x2c, 0x0c, 0xd2, 0xad, 0x73, 0x8c, 0x52,
-	0x2d, 0xf3, 0xd3, 0x0d, 0x72, 0xac, 0x32, 0xec, 0x93, 0x4d,
-	0x6d, 0xb3, 0xcc, 0x12, 0xb6, 0x68, 0x17, 0xc9, 0xe9, 0x37,
-	0x48, 0x96, 0x08, 0xd6, 0xa9, 0x77, 0x57, 0x89, 0xf6, 0x28,
-	0xd7, 0x09, 0x76, 0xa8, 0x88, 0x56, 0x29, 0xf7, 0x69, 0xb7,
-	0xc8, 0x16, 0x36, 0xe8, 0x97, 0x49, 0x74, 0xaa, 0xd5, 0x0b,
-	0x2b, 0xf5, 0x8a, 0x54, 0xca, 0x14, 0x6b, 0xb5, 0x95, 0x4b,
-	0x34, 0xea, 0x15, 0xcb, 0xb4, 0x6a, 0x4a, 0x94, 0xeb, 0x35,
-	0xab, 0x75, 0x0a, 0xd4, 0xf4, 0x2a, 0x55, 0x8b, 0x00, 0xdf,
-	0xa3, 0x7c, 0x5b, 0x84, 0xf8, 0x27, 0xb6, 0x69, 0x15, 0xca,
-	0xed, 0x32, 0x4e, 0x91, 0x71, 0xae, 0xd2, 0x0d, 0x2a, 0xf5,
-	0x89, 0x56, 0xc7, 0x18, 0x64, 0xbb, 0x9c, 0x43, 0x3f, 0xe0,
-	0xe2, 0x3d, 0x41, 0x9e, 0xb9, 0x66, 0x1a, 0xc5, 0x54, 0x8b,
-	0xf7, 0x28, 0x0f, 0xd0, 0xac, 0x73, 0x93, 0x4c, 0x30, 0xef,
-	0xc8, 0x17, 0x6b, 0xb4, 0x25, 0xfa, 0x86, 0x59, 0x7e, 0xa1,
-	0xdd, 0x02, 0xd9, 0x06, 0x7a, 0xa5, 0x82, 0x5d, 0x21, 0xfe,
-	0x6f, 0xb0, 0xcc, 0x13, 0x34, 0xeb, 0x97, 0x48, 0xa8, 0x77,
-	0x0b, 0xd4, 0xf3, 0x2c, 0x50, 0x8f, 0x1e, 0xc1, 0xbd, 0x62,
-	0x45, 0x9a, 0xe6, 0x39, 0x3b, 0xe4, 0x98, 0x47, 0x60, 0xbf,
-	0xc3, 0x1c, 0x8d, 0x52, 0x2e, 0xf1, 0xd6, 0x09, 0x75, 0xaa,
-	0x4a, 0x95, 0xe9, 0x36, 0x11, 0xce, 0xb2, 0x6d, 0xfc, 0x23,
-	0x5f, 0x80, 0xa7, 0x78, 0x04, 0xdb, 0xaf, 0x70, 0x0c, 0xd3,
-	0xf4, 0x2b, 0x57, 0x88, 0x19, 0xc6, 0xba, 0x65, 0x42, 0x9d,
-	0xe1, 0x3e, 0xde, 0x01, 0x7d, 0xa2, 0x85, 0x5a, 0x26, 0xf9,
-	0x68, 0xb7, 0xcb, 0x14, 0x33, 0xec, 0x90, 0x4f, 0x4d, 0x92,
-	0xee, 0x31, 0x16, 0xc9, 0xb5, 0x6a, 0xfb, 0x24, 0x58, 0x87,
-	0xa0, 0x7f, 0x03, 0xdc, 0x3c, 0xe3, 0x9f, 0x40, 0x67, 0xb8,
-	0xc4, 0x1b, 0x8a, 0x55, 0x29, 0xf6, 0xd1, 0x0e, 0x72, 0xad,
-	0x76, 0xa9, 0xd5, 0x0a, 0x2d, 0xf2, 0x8e, 0x51, 0xc0, 0x1f,
-	0x63, 0xbc, 0x9b, 0x44, 0x38, 0xe7, 0x07, 0xd8, 0xa4, 0x7b,
-	0x5c, 0x83, 0xff, 0x20, 0xb1, 0x6e, 0x12, 0xcd, 0xea, 0x35,
-	0x49, 0x96, 0x94, 0x4b, 0x37, 0xe8, 0xcf, 0x10, 0x6c, 0xb3,
-	0x22, 0xfd, 0x81, 0x5e, 0x79, 0xa6, 0xda, 0x05, 0xe5, 0x3a,
-	0x46, 0x99, 0xbe, 0x61, 0x1d, 0xc2, 0x53, 0x8c, 0xf0, 0x2f,
-	0x08, 0xd7, 0xab, 0x74, 0x00, 0xe0, 0xdd, 0x3d, 0xa7, 0x47,
-	0x7a, 0x9a, 0x53, 0xb3, 0x8e, 0x6e, 0xf4, 0x14, 0x29, 0xc9,
-	0xa6, 0x46, 0x7b, 0x9b, 0x01, 0xe1, 0xdc, 0x3c, 0xf5, 0x15,
-	0x28, 0xc8, 0x52, 0xb2, 0x8f, 0x6f, 0x51, 0xb1, 0x8c, 0x6c,
-	0xf6, 0x16, 0x2b, 0xcb, 0x02, 0xe2, 0xdf, 0x3f, 0xa5, 0x45,
-	0x78, 0x98, 0xf7, 0x17, 0x2a, 0xca, 0x50, 0xb0, 0x8d, 0x6d,
-	0xa4, 0x44, 0x79, 0x99, 0x03, 0xe3, 0xde, 0x3e, 0xa2, 0x42,
-	0x7f, 0x9f, 0x05, 0xe5, 0xd8, 0x38, 0xf1, 0x11, 0x2c, 0xcc,
-	0x56, 0xb6, 0x8b, 0x6b, 0x04, 0xe4, 0xd9, 0x39, 0xa3, 0x43,
-	0x7e, 0x9e, 0x57, 0xb7, 0x8a, 0x6a, 0xf0, 0x10, 0x2d, 0xcd,
-	0xf3, 0x13, 0x2e, 0xce, 0x54, 0xb4, 0x89, 0x69, 0xa0, 0x40,
-	0x7d, 0x9d, 0x07, 0xe7, 0xda, 0x3a, 0x55, 0xb5, 0x88, 0x68,
-	0xf2, 0x12, 0x2f, 0xcf, 0x06, 0xe6, 0xdb, 0x3b, 0xa1, 0x41,
-	0x7c, 0x9c, 0x59, 0xb9, 0x84, 0x64, 0xfe, 0x1e, 0x23, 0xc3,
-	0x0a, 0xea, 0xd7, 0x37, 0xad, 0x4d, 0x70, 0x90, 0xff, 0x1f,
-	0x22, 0xc2, 0x58, 0xb8, 0x85, 0x65, 0xac, 0x4c, 0x71, 0x91,
-	0x0b, 0xeb, 0xd6, 0x36, 0x08, 0xe8, 0xd5, 0x35, 0xaf, 0x4f,
-	0x72, 0x92, 0x5b, 0xbb, 0x86, 0x66, 0xfc, 0x1c, 0x21, 0xc1,
-	0xae, 0x4e, 0x73, 0x93, 0x09, 0xe9, 0xd4, 0x34, 0xfd, 0x1d,
-	0x20, 0xc0, 0x5a, 0xba, 0x87, 0x67, 0xfb, 0x1b, 0x26, 0xc6,
-	0x5c, 0xbc, 0x81, 0x61, 0xa8, 0x48, 0x75, 0x95, 0x0f, 0xef,
-	0xd2, 0x32, 0x5d, 0xbd, 0x80, 0x60, 0xfa, 0x1a, 0x27, 0xc7,
-	0x0e, 0xee, 0xd3, 0x33, 0xa9, 0x49, 0x74, 0x94, 0xaa, 0x4a,
-	0x77, 0x97, 0x0d, 0xed, 0xd0, 0x30, 0xf9, 0x19, 0x24, 0xc4,
-	0x5e, 0xbe, 0x83, 0x63, 0x0c, 0xec, 0xd1, 0x31, 0xab, 0x4b,
-	0x76, 0x96, 0x5f, 0xbf, 0x82, 0x62, 0xf8, 0x18, 0x25, 0xc5,
-	0x00, 0xe1, 0xdf, 0x3e, 0xa3, 0x42, 0x7c, 0x9d, 0x5b, 0xba,
-	0x84, 0x65, 0xf8, 0x19, 0x27, 0xc6, 0xb6, 0x57, 0x69, 0x88,
-	0x15, 0xf4, 0xca, 0x2b, 0xed, 0x0c, 0x32, 0xd3, 0x4e, 0xaf,
-	0x91, 0x70, 0x71, 0x90, 0xae, 0x4f, 0xd2, 0x33, 0x0d, 0xec,
-	0x2a, 0xcb, 0xf5, 0x14, 0x89, 0x68, 0x56, 0xb7, 0xc7, 0x26,
-	0x18, 0xf9, 0x64, 0x85, 0xbb, 0x5a, 0x9c, 0x7d, 0x43, 0xa2,
-	0x3f, 0xde, 0xe0, 0x01, 0xe2, 0x03, 0x3d, 0xdc, 0x41, 0xa0,
-	0x9e, 0x7f, 0xb9, 0x58, 0x66, 0x87, 0x1a, 0xfb, 0xc5, 0x24,
-	0x54, 0xb5, 0x8b, 0x6a, 0xf7, 0x16, 0x28, 0xc9, 0x0f, 0xee,
-	0xd0, 0x31, 0xac, 0x4d, 0x73, 0x92, 0x93, 0x72, 0x4c, 0xad,
-	0x30, 0xd1, 0xef, 0x0e, 0xc8, 0x29, 0x17, 0xf6, 0x6b, 0x8a,
-	0xb4, 0x55, 0x25, 0xc4, 0xfa, 0x1b, 0x86, 0x67, 0x59, 0xb8,
-	0x7e, 0x9f, 0xa1, 0x40, 0xdd, 0x3c, 0x02, 0xe3, 0xd9, 0x38,
-	0x06, 0xe7, 0x7a, 0x9b, 0xa5, 0x44, 0x82, 0x63, 0x5d, 0xbc,
-	0x21, 0xc0, 0xfe, 0x1f, 0x6f, 0x8e, 0xb0, 0x51, 0xcc, 0x2d,
-	0x13, 0xf2, 0x34, 0xd5, 0xeb, 0x0a, 0x97, 0x76, 0x48, 0xa9,
-	0xa8, 0x49, 0x77, 0x96, 0x0b, 0xea, 0xd4, 0x35, 0xf3, 0x12,
-	0x2c, 0xcd, 0x50, 0xb1, 0x8f, 0x6e, 0x1e, 0xff, 0xc1, 0x20,
-	0xbd, 0x5c, 0x62, 0x83, 0x45, 0xa4, 0x9a, 0x7b, 0xe6, 0x07,
-	0x39, 0xd8, 0x3b, 0xda, 0xe4, 0x05, 0x98, 0x79, 0x47, 0xa6,
-	0x60, 0x81, 0xbf, 0x5e, 0xc3, 0x22, 0x1c, 0xfd, 0x8d, 0x6c,
-	0x52, 0xb3, 0x2e, 0xcf, 0xf1, 0x10, 0xd6, 0x37, 0x09, 0xe8,
-	0x75, 0x94, 0xaa, 0x4b, 0x4a, 0xab, 0x95, 0x74, 0xe9, 0x08,
-	0x36, 0xd7, 0x11, 0xf0, 0xce, 0x2f, 0xb2, 0x53, 0x6d, 0x8c,
-	0xfc, 0x1d, 0x23, 0xc2, 0x5f, 0xbe, 0x80, 0x61, 0xa7, 0x46,
-	0x78, 0x99, 0x04, 0xe5, 0xdb, 0x3a, 0x00, 0xe2, 0xd9, 0x3b,
-	0xaf, 0x4d, 0x76, 0x94, 0x43, 0xa1, 0x9a, 0x78, 0xec, 0x0e,
-	0x35, 0xd7, 0x86, 0x64, 0x5f, 0xbd, 0x29, 0xcb, 0xf0, 0x12,
-	0xc5, 0x27, 0x1c, 0xfe, 0x6a, 0x88, 0xb3, 0x51, 0x11, 0xf3,
-	0xc8, 0x2a, 0xbe, 0x5c, 0x67, 0x85, 0x52, 0xb0, 0x8b, 0x69,
-	0xfd, 0x1f, 0x24, 0xc6, 0x97, 0x75, 0x4e, 0xac, 0x38, 0xda,
-	0xe1, 0x03, 0xd4, 0x36, 0x0d, 0xef, 0x7b, 0x99, 0xa2, 0x40,
-	0x22, 0xc0, 0xfb, 0x19, 0x8d, 0x6f, 0x54, 0xb6, 0x61, 0x83,
-	0xb8, 0x5a, 0xce, 0x2c, 0x17, 0xf5, 0xa4, 0x46, 0x7d, 0x9f,
-	0x0b, 0xe9, 0xd2, 0x30, 0xe7, 0x05, 0x3e, 0xdc, 0x48, 0xaa,
-	0x91, 0x73, 0x33, 0xd1, 0xea, 0x08, 0x9c, 0x7e, 0x45, 0xa7,
-	0x70, 0x92, 0xa9, 0x4b, 0xdf, 0x3d, 0x06, 0xe4, 0xb5, 0x57,
-	0x6c, 0x8e, 0x1a, 0xf8, 0xc3, 0x21, 0xf6, 0x14, 0x2f, 0xcd,
-	0x59, 0xbb, 0x80, 0x62, 0x44, 0xa6, 0x9d, 0x7f, 0xeb, 0x09,
-	0x32, 0xd0, 0x07, 0xe5, 0xde, 0x3c, 0xa8, 0x4a, 0x71, 0x93,
-	0xc2, 0x20, 0x1b, 0xf9, 0x6d, 0x8f, 0xb4, 0x56, 0x81, 0x63,
-	0x58, 0xba, 0x2e, 0xcc, 0xf7, 0x15, 0x55, 0xb7, 0x8c, 0x6e,
-	0xfa, 0x18, 0x23, 0xc1, 0x16, 0xf4, 0xcf, 0x2d, 0xb9, 0x5b,
-	0x60, 0x82, 0xd3, 0x31, 0x0a, 0xe8, 0x7c, 0x9e, 0xa5, 0x47,
-	0x90, 0x72, 0x49, 0xab, 0x3f, 0xdd, 0xe6, 0x04, 0x66, 0x84,
-	0xbf, 0x5d, 0xc9, 0x2b, 0x10, 0xf2, 0x25, 0xc7, 0xfc, 0x1e,
-	0x8a, 0x68, 0x53, 0xb1, 0xe0, 0x02, 0x39, 0xdb, 0x4f, 0xad,
-	0x96, 0x74, 0xa3, 0x41, 0x7a, 0x98, 0x0c, 0xee, 0xd5, 0x37,
-	0x77, 0x95, 0xae, 0x4c, 0xd8, 0x3a, 0x01, 0xe3, 0x34, 0xd6,
-	0xed, 0x0f, 0x9b, 0x79, 0x42, 0xa0, 0xf1, 0x13, 0x28, 0xca,
-	0x5e, 0xbc, 0x87, 0x65, 0xb2, 0x50, 0x6b, 0x89, 0x1d, 0xff,
-	0xc4, 0x26, 0x00, 0xe3, 0xdb, 0x38, 0xab, 0x48, 0x70, 0x93,
-	0x4b, 0xa8, 0x90, 0x73, 0xe0, 0x03, 0x3b, 0xd8, 0x96, 0x75,
-	0x4d, 0xae, 0x3d, 0xde, 0xe6, 0x05, 0xdd, 0x3e, 0x06, 0xe5,
-	0x76, 0x95, 0xad, 0x4e, 0x31, 0xd2, 0xea, 0x09, 0x9a, 0x79,
-	0x41, 0xa2, 0x7a, 0x99, 0xa1, 0x42, 0xd1, 0x32, 0x0a, 0xe9,
-	0xa7, 0x44, 0x7c, 0x9f, 0x0c, 0xef, 0xd7, 0x34, 0xec, 0x0f,
-	0x37, 0xd4, 0x47, 0xa4, 0x9c, 0x7f, 0x62, 0x81, 0xb9, 0x5a,
-	0xc9, 0x2a, 0x12, 0xf1, 0x29, 0xca, 0xf2, 0x11, 0x82, 0x61,
-	0x59, 0xba, 0xf4, 0x17, 0x2f, 0xcc, 0x5f, 0xbc, 0x84, 0x67,
-	0xbf, 0x5c, 0x64, 0x87, 0x14, 0xf7, 0xcf, 0x2c, 0x53, 0xb0,
-	0x88, 0x6b, 0xf8, 0x1b, 0x23, 0xc0, 0x18, 0xfb, 0xc3, 0x20,
-	0xb3, 0x50, 0x68, 0x8b, 0xc5, 0x26, 0x1e, 0xfd, 0x6e, 0x8d,
-	0xb5, 0x56, 0x8e, 0x6d, 0x55, 0xb6, 0x25, 0xc6, 0xfe, 0x1d,
-	0xc4, 0x27, 0x1f, 0xfc, 0x6f, 0x8c, 0xb4, 0x57, 0x8f, 0x6c,
-	0x54, 0xb7, 0x24, 0xc7, 0xff, 0x1c, 0x52, 0xb1, 0x89, 0x6a,
-	0xf9, 0x1a, 0x22, 0xc1, 0x19, 0xfa, 0xc2, 0x21, 0xb2, 0x51,
-	0x69, 0x8a, 0xf5, 0x16, 0x2e, 0xcd, 0x5e, 0xbd, 0x85, 0x66,
-	0xbe, 0x5d, 0x65, 0x86, 0x15, 0xf6, 0xce, 0x2d, 0x63, 0x80,
-	0xb8, 0x5b, 0xc8, 0x2b, 0x13, 0xf0, 0x28, 0xcb, 0xf3, 0x10,
-	0x83, 0x60, 0x58, 0xbb, 0xa6, 0x45, 0x7d, 0x9e, 0x0d, 0xee,
-	0xd6, 0x35, 0xed, 0x0e, 0x36, 0xd5, 0x46, 0xa5, 0x9d, 0x7e,
-	0x30, 0xd3, 0xeb, 0x08, 0x9b, 0x78, 0x40, 0xa3, 0x7b, 0x98,
-	0xa0, 0x43, 0xd0, 0x33, 0x0b, 0xe8, 0x97, 0x74, 0x4c, 0xaf,
-	0x3c, 0xdf, 0xe7, 0x04, 0xdc, 0x3f, 0x07, 0xe4, 0x77, 0x94,
-	0xac, 0x4f, 0x01, 0xe2, 0xda, 0x39, 0xaa, 0x49, 0x71, 0x92,
-	0x4a, 0xa9, 0x91, 0x72, 0xe1, 0x02, 0x3a, 0xd9, 0x00, 0xe4,
-	0xd5, 0x31, 0xb7, 0x53, 0x62, 0x86, 0x73, 0x97, 0xa6, 0x42,
-	0xc4, 0x20, 0x11, 0xf5, 0xe6, 0x02, 0x33, 0xd7, 0x51, 0xb5,
-	0x84, 0x60, 0x95, 0x71, 0x40, 0xa4, 0x22, 0xc6, 0xf7, 0x13,
-	0xd1, 0x35, 0x04, 0xe0, 0x66, 0x82, 0xb3, 0x57, 0xa2, 0x46,
-	0x77, 0x93, 0x15, 0xf1, 0xc0, 0x24, 0x37, 0xd3, 0xe2, 0x06,
-	0x80, 0x64, 0x55, 0xb1, 0x44, 0xa0, 0x91, 0x75, 0xf3, 0x17,
-	0x26, 0xc2, 0xbf, 0x5b, 0x6a, 0x8e, 0x08, 0xec, 0xdd, 0x39,
-	0xcc, 0x28, 0x19, 0xfd, 0x7b, 0x9f, 0xae, 0x4a, 0x59, 0xbd,
-	0x8c, 0x68, 0xee, 0x0a, 0x3b, 0xdf, 0x2a, 0xce, 0xff, 0x1b,
-	0x9d, 0x79, 0x48, 0xac, 0x6e, 0x8a, 0xbb, 0x5f, 0xd9, 0x3d,
-	0x0c, 0xe8, 0x1d, 0xf9, 0xc8, 0x2c, 0xaa, 0x4e, 0x7f, 0x9b,
-	0x88, 0x6c, 0x5d, 0xb9, 0x3f, 0xdb, 0xea, 0x0e, 0xfb, 0x1f,
-	0x2e, 0xca, 0x4c, 0xa8, 0x99, 0x7d, 0x63, 0x87, 0xb6, 0x52,
-	0xd4, 0x30, 0x01, 0xe5, 0x10, 0xf4, 0xc5, 0x21, 0xa7, 0x43,
-	0x72, 0x96, 0x85, 0x61, 0x50, 0xb4, 0x32, 0xd6, 0xe7, 0x03,
-	0xf6, 0x12, 0x23, 0xc7, 0x41, 0xa5, 0x94, 0x70, 0xb2, 0x56,
-	0x67, 0x83, 0x05, 0xe1, 0xd0, 0x34, 0xc1, 0x25, 0x14, 0xf0,
-	0x76, 0x92, 0xa3, 0x47, 0x54, 0xb0, 0x81, 0x65, 0xe3, 0x07,
-	0x36, 0xd2, 0x27, 0xc3, 0xf2, 0x16, 0x90, 0x74, 0x45, 0xa1,
-	0xdc, 0x38, 0x09, 0xed, 0x6b, 0x8f, 0xbe, 0x5a, 0xaf, 0x4b,
-	0x7a, 0x9e, 0x18, 0xfc, 0xcd, 0x29, 0x3a, 0xde, 0xef, 0x0b,
-	0x8d, 0x69, 0x58, 0xbc, 0x49, 0xad, 0x9c, 0x78, 0xfe, 0x1a,
-	0x2b, 0xcf, 0x0d, 0xe9, 0xd8, 0x3c, 0xba, 0x5e, 0x6f, 0x8b,
-	0x7e, 0x9a, 0xab, 0x4f, 0xc9, 0x2d, 0x1c, 0xf8, 0xeb, 0x0f,
-	0x3e, 0xda, 0x5c, 0xb8, 0x89, 0x6d, 0x98, 0x7c, 0x4d, 0xa9,
-	0x2f, 0xcb, 0xfa, 0x1e, 0x00, 0xe5, 0xd7, 0x32, 0xb3, 0x56,
-	0x64, 0x81, 0x7b, 0x9e, 0xac, 0x49, 0xc8, 0x2d, 0x1f, 0xfa,
-	0xf6, 0x13, 0x21, 0xc4, 0x45, 0xa0, 0x92, 0x77, 0x8d, 0x68,
-	0x5a, 0xbf, 0x3e, 0xdb, 0xe9, 0x0c, 0xf1, 0x14, 0x26, 0xc3,
-	0x42, 0xa7, 0x95, 0x70, 0x8a, 0x6f, 0x5d, 0xb8, 0x39, 0xdc,
-	0xee, 0x0b, 0x07, 0xe2, 0xd0, 0x35, 0xb4, 0x51, 0x63, 0x86,
-	0x7c, 0x99, 0xab, 0x4e, 0xcf, 0x2a, 0x18, 0xfd, 0xff, 0x1a,
-	0x28, 0xcd, 0x4c, 0xa9, 0x9b, 0x7e, 0x84, 0x61, 0x53, 0xb6,
-	0x37, 0xd2, 0xe0, 0x05, 0x09, 0xec, 0xde, 0x3b, 0xba, 0x5f,
-	0x6d, 0x88, 0x72, 0x97, 0xa5, 0x40, 0xc1, 0x24, 0x16, 0xf3,
-	0x0e, 0xeb, 0xd9, 0x3c, 0xbd, 0x58, 0x6a, 0x8f, 0x75, 0x90,
-	0xa2, 0x47, 0xc6, 0x23, 0x11, 0xf4, 0xf8, 0x1d, 0x2f, 0xca,
-	0x4b, 0xae, 0x9c, 0x79, 0x83, 0x66, 0x54, 0xb1, 0x30, 0xd5,
-	0xe7, 0x02, 0xe3, 0x06, 0x34, 0xd1, 0x50, 0xb5, 0x87, 0x62,
-	0x98, 0x7d, 0x4f, 0xaa, 0x2b, 0xce, 0xfc, 0x19, 0x15, 0xf0,
-	0xc2, 0x27, 0xa6, 0x43, 0x71, 0x94, 0x6e, 0x8b, 0xb9, 0x5c,
-	0xdd, 0x38, 0x0a, 0xef, 0x12, 0xf7, 0xc5, 0x20, 0xa1, 0x44,
-	0x76, 0x93, 0x69, 0x8c, 0xbe, 0x5b, 0xda, 0x3f, 0x0d, 0xe8,
-	0xe4, 0x01, 0x33, 0xd6, 0x57, 0xb2, 0x80, 0x65, 0x9f, 0x7a,
-	0x48, 0xad, 0x2c, 0xc9, 0xfb, 0x1e, 0x1c, 0xf9, 0xcb, 0x2e,
-	0xaf, 0x4a, 0x78, 0x9d, 0x67, 0x82, 0xb0, 0x55, 0xd4, 0x31,
-	0x03, 0xe6, 0xea, 0x0f, 0x3d, 0xd8, 0x59, 0xbc, 0x8e, 0x6b,
-	0x91, 0x74, 0x46, 0xa3, 0x22, 0xc7, 0xf5, 0x10, 0xed, 0x08,
-	0x3a, 0xdf, 0x5e, 0xbb, 0x89, 0x6c, 0x96, 0x73, 0x41, 0xa4,
-	0x25, 0xc0, 0xf2, 0x17, 0x1b, 0xfe, 0xcc, 0x29, 0xa8, 0x4d,
-	0x7f, 0x9a, 0x60, 0x85, 0xb7, 0x52, 0xd3, 0x36, 0x04, 0xe1,
-	0x00, 0xe6, 0xd1, 0x37, 0xbf, 0x59, 0x6e, 0x88, 0x63, 0x85,
-	0xb2, 0x54, 0xdc, 0x3a, 0x0d, 0xeb, 0xc6, 0x20, 0x17, 0xf1,
-	0x79, 0x9f, 0xa8, 0x4e, 0xa5, 0x43, 0x74, 0x92, 0x1a, 0xfc,
-	0xcb, 0x2d, 0x91, 0x77, 0x40, 0xa6, 0x2e, 0xc8, 0xff, 0x19,
-	0xf2, 0x14, 0x23, 0xc5, 0x4d, 0xab, 0x9c, 0x7a, 0x57, 0xb1,
-	0x86, 0x60, 0xe8, 0x0e, 0x39, 0xdf, 0x34, 0xd2, 0xe5, 0x03,
-	0x8b, 0x6d, 0x5a, 0xbc, 0x3f, 0xd9, 0xee, 0x08, 0x80, 0x66,
-	0x51, 0xb7, 0x5c, 0xba, 0x8d, 0x6b, 0xe3, 0x05, 0x32, 0xd4,
-	0xf9, 0x1f, 0x28, 0xce, 0x46, 0xa0, 0x97, 0x71, 0x9a, 0x7c,
-	0x4b, 0xad, 0x25, 0xc3, 0xf4, 0x12, 0xae, 0x48, 0x7f, 0x99,
-	0x11, 0xf7, 0xc0, 0x26, 0xcd, 0x2b, 0x1c, 0xfa, 0x72, 0x94,
-	0xa3, 0x45, 0x68, 0x8e, 0xb9, 0x5f, 0xd7, 0x31, 0x06, 0xe0,
-	0x0b, 0xed, 0xda, 0x3c, 0xb4, 0x52, 0x65, 0x83, 0x7e, 0x98,
-	0xaf, 0x49, 0xc1, 0x27, 0x10, 0xf6, 0x1d, 0xfb, 0xcc, 0x2a,
-	0xa2, 0x44, 0x73, 0x95, 0xb8, 0x5e, 0x69, 0x8f, 0x07, 0xe1,
-	0xd6, 0x30, 0xdb, 0x3d, 0x0a, 0xec, 0x64, 0x82, 0xb5, 0x53,
-	0xef, 0x09, 0x3e, 0xd8, 0x50, 0xb6, 0x81, 0x67, 0x8c, 0x6a,
-	0x5d, 0xbb, 0x33, 0xd5, 0xe2, 0x04, 0x29, 0xcf, 0xf8, 0x1e,
-	0x96, 0x70, 0x47, 0xa1, 0x4a, 0xac, 0x9b, 0x7d, 0xf5, 0x13,
-	0x24, 0xc2, 0x41, 0xa7, 0x90, 0x76, 0xfe, 0x18, 0x2f, 0xc9,
-	0x22, 0xc4, 0xf3, 0x15, 0x9d, 0x7b, 0x4c, 0xaa, 0x87, 0x61,
-	0x56, 0xb0, 0x38, 0xde, 0xe9, 0x0f, 0xe4, 0x02, 0x35, 0xd3,
-	0x5b, 0xbd, 0x8a, 0x6c, 0xd0, 0x36, 0x01, 0xe7, 0x6f, 0x89,
-	0xbe, 0x58, 0xb3, 0x55, 0x62, 0x84, 0x0c, 0xea, 0xdd, 0x3b,
-	0x16, 0xf0, 0xc7, 0x21, 0xa9, 0x4f, 0x78, 0x9e, 0x75, 0x93,
-	0xa4, 0x42, 0xca, 0x2c, 0x1b, 0xfd, 0x00, 0xe7, 0xd3, 0x34,
-	0xbb, 0x5c, 0x68, 0x8f, 0x6b, 0x8c, 0xb8, 0x5f, 0xd0, 0x37,
-	0x03, 0xe4, 0xd6, 0x31, 0x05, 0xe2, 0x6d, 0x8a, 0xbe, 0x59,
-	0xbd, 0x5a, 0x6e, 0x89, 0x06, 0xe1, 0xd5, 0x32, 0xb1, 0x56,
-	0x62, 0x85, 0x0a, 0xed, 0xd9, 0x3e, 0xda, 0x3d, 0x09, 0xee,
-	0x61, 0x86, 0xb2, 0x55, 0x67, 0x80, 0xb4, 0x53, 0xdc, 0x3b,
-	0x0f, 0xe8, 0x0c, 0xeb, 0xdf, 0x38, 0xb7, 0x50, 0x64, 0x83,
-	0x7f, 0x98, 0xac, 0x4b, 0xc4, 0x23, 0x17, 0xf0, 0x14, 0xf3,
-	0xc7, 0x20, 0xaf, 0x48, 0x7c, 0x9b, 0xa9, 0x4e, 0x7a, 0x9d,
-	0x12, 0xf5, 0xc1, 0x26, 0xc2, 0x25, 0x11, 0xf6, 0x79, 0x9e,
-	0xaa, 0x4d, 0xce, 0x29, 0x1d, 0xfa, 0x75, 0x92, 0xa6, 0x41,
-	0xa5, 0x42, 0x76, 0x91, 0x1e, 0xf9, 0xcd, 0x2a, 0x18, 0xff,
-	0xcb, 0x2c, 0xa3, 0x44, 0x70, 0x97, 0x73, 0x94, 0xa0, 0x47,
-	0xc8, 0x2f, 0x1b, 0xfc, 0xfe, 0x19, 0x2d, 0xca, 0x45, 0xa2,
-	0x96, 0x71, 0x95, 0x72, 0x46, 0xa1, 0x2e, 0xc9, 0xfd, 0x1a,
-	0x28, 0xcf, 0xfb, 0x1c, 0x93, 0x74, 0x40, 0xa7, 0x43, 0xa4,
-	0x90, 0x77, 0xf8, 0x1f, 0x2b, 0xcc, 0x4f, 0xa8, 0x9c, 0x7b,
-	0xf4, 0x13, 0x27, 0xc0, 0x24, 0xc3, 0xf7, 0x10, 0x9f, 0x78,
-	0x4c, 0xab, 0x99, 0x7e, 0x4a, 0xad, 0x22, 0xc5, 0xf1, 0x16,
-	0xf2, 0x15, 0x21, 0xc6, 0x49, 0xae, 0x9a, 0x7d, 0x81, 0x66,
-	0x52, 0xb5, 0x3a, 0xdd, 0xe9, 0x0e, 0xea, 0x0d, 0x39, 0xde,
-	0x51, 0xb6, 0x82, 0x65, 0x57, 0xb0, 0x84, 0x63, 0xec, 0x0b,
-	0x3f, 0xd8, 0x3c, 0xdb, 0xef, 0x08, 0x87, 0x60, 0x54, 0xb3,
-	0x30, 0xd7, 0xe3, 0x04, 0x8b, 0x6c, 0x58, 0xbf, 0x5b, 0xbc,
-	0x88, 0x6f, 0xe0, 0x07, 0x33, 0xd4, 0xe6, 0x01, 0x35, 0xd2,
-	0x5d, 0xba, 0x8e, 0x69, 0x8d, 0x6a, 0x5e, 0xb9, 0x36, 0xd1,
-	0xe5, 0x02, 0x00, 0xe8, 0xcd, 0x25, 0x87, 0x6f, 0x4a, 0xa2,
-	0x13, 0xfb, 0xde, 0x36, 0x94, 0x7c, 0x59, 0xb1, 0x26, 0xce,
-	0xeb, 0x03, 0xa1, 0x49, 0x6c, 0x84, 0x35, 0xdd, 0xf8, 0x10,
-	0xb2, 0x5a, 0x7f, 0x97, 0x4c, 0xa4, 0x81, 0x69, 0xcb, 0x23,
-	0x06, 0xee, 0x5f, 0xb7, 0x92, 0x7a, 0xd8, 0x30, 0x15, 0xfd,
-	0x6a, 0x82, 0xa7, 0x4f, 0xed, 0x05, 0x20, 0xc8, 0x79, 0x91,
-	0xb4, 0x5c, 0xfe, 0x16, 0x33, 0xdb, 0x98, 0x70, 0x55, 0xbd,
-	0x1f, 0xf7, 0xd2, 0x3a, 0x8b, 0x63, 0x46, 0xae, 0x0c, 0xe4,
-	0xc1, 0x29, 0xbe, 0x56, 0x73, 0x9b, 0x39, 0xd1, 0xf4, 0x1c,
-	0xad, 0x45, 0x60, 0x88, 0x2a, 0xc2, 0xe7, 0x0f, 0xd4, 0x3c,
-	0x19, 0xf1, 0x53, 0xbb, 0x9e, 0x76, 0xc7, 0x2f, 0x0a, 0xe2,
-	0x40, 0xa8, 0x8d, 0x65, 0xf2, 0x1a, 0x3f, 0xd7, 0x75, 0x9d,
-	0xb8, 0x50, 0xe1, 0x09, 0x2c, 0xc4, 0x66, 0x8e, 0xab, 0x43,
-	0x2d, 0xc5, 0xe0, 0x08, 0xaa, 0x42, 0x67, 0x8f, 0x3e, 0xd6,
-	0xf3, 0x1b, 0xb9, 0x51, 0x74, 0x9c, 0x0b, 0xe3, 0xc6, 0x2e,
-	0x8c, 0x64, 0x41, 0xa9, 0x18, 0xf0, 0xd5, 0x3d, 0x9f, 0x77,
-	0x52, 0xba, 0x61, 0x89, 0xac, 0x44, 0xe6, 0x0e, 0x2b, 0xc3,
-	0x72, 0x9a, 0xbf, 0x57, 0xf5, 0x1d, 0x38, 0xd0, 0x47, 0xaf,
-	0x8a, 0x62, 0xc0, 0x28, 0x0d, 0xe5, 0x54, 0xbc, 0x99, 0x71,
-	0xd3, 0x3b, 0x1e, 0xf6, 0xb5, 0x5d, 0x78, 0x90, 0x32, 0xda,
-	0xff, 0x17, 0xa6, 0x4e, 0x6b, 0x83, 0x21, 0xc9, 0xec, 0x04,
-	0x93, 0x7b, 0x5e, 0xb6, 0x14, 0xfc, 0xd9, 0x31, 0x80, 0x68,
-	0x4d, 0xa5, 0x07, 0xef, 0xca, 0x22, 0xf9, 0x11, 0x34, 0xdc,
-	0x7e, 0x96, 0xb3, 0x5b, 0xea, 0x02, 0x27, 0xcf, 0x6d, 0x85,
-	0xa0, 0x48, 0xdf, 0x37, 0x12, 0xfa, 0x58, 0xb0, 0x95, 0x7d,
-	0xcc, 0x24, 0x01, 0xe9, 0x4b, 0xa3, 0x86, 0x6e, 0x00, 0xe9,
-	0xcf, 0x26, 0x83, 0x6a, 0x4c, 0xa5, 0x1b, 0xf2, 0xd4, 0x3d,
-	0x98, 0x71, 0x57, 0xbe, 0x36, 0xdf, 0xf9, 0x10, 0xb5, 0x5c,
-	0x7a, 0x93, 0x2d, 0xc4, 0xe2, 0x0b, 0xae, 0x47, 0x61, 0x88,
-	0x6c, 0x85, 0xa3, 0x4a, 0xef, 0x06, 0x20, 0xc9, 0x77, 0x9e,
-	0xb8, 0x51, 0xf4, 0x1d, 0x3b, 0xd2, 0x5a, 0xb3, 0x95, 0x7c,
-	0xd9, 0x30, 0x16, 0xff, 0x41, 0xa8, 0x8e, 0x67, 0xc2, 0x2b,
-	0x0d, 0xe4, 0xd8, 0x31, 0x17, 0xfe, 0x5b, 0xb2, 0x94, 0x7d,
-	0xc3, 0x2a, 0x0c, 0xe5, 0x40, 0xa9, 0x8f, 0x66, 0xee, 0x07,
-	0x21, 0xc8, 0x6d, 0x84, 0xa2, 0x4b, 0xf5, 0x1c, 0x3a, 0xd3,
-	0x76, 0x9f, 0xb9, 0x50, 0xb4, 0x5d, 0x7b, 0x92, 0x37, 0xde,
-	0xf8, 0x11, 0xaf, 0x46, 0x60, 0x89, 0x2c, 0xc5, 0xe3, 0x0a,
-	0x82, 0x6b, 0x4d, 0xa4, 0x01, 0xe8, 0xce, 0x27, 0x99, 0x70,
-	0x56, 0xbf, 0x1a, 0xf3, 0xd5, 0x3c, 0xad, 0x44, 0x62, 0x8b,
-	0x2e, 0xc7, 0xe1, 0x08, 0xb6, 0x5f, 0x79, 0x90, 0x35, 0xdc,
-	0xfa, 0x13, 0x9b, 0x72, 0x54, 0xbd, 0x18, 0xf1, 0xd7, 0x3e,
-	0x80, 0x69, 0x4f, 0xa6, 0x03, 0xea, 0xcc, 0x25, 0xc1, 0x28,
-	0x0e, 0xe7, 0x42, 0xab, 0x8d, 0x64, 0xda, 0x33, 0x15, 0xfc,
-	0x59, 0xb0, 0x96, 0x7f, 0xf7, 0x1e, 0x38, 0xd1, 0x74, 0x9d,
-	0xbb, 0x52, 0xec, 0x05, 0x23, 0xca, 0x6f, 0x86, 0xa0, 0x49,
-	0x75, 0x9c, 0xba, 0x53, 0xf6, 0x1f, 0x39, 0xd0, 0x6e, 0x87,
-	0xa1, 0x48, 0xed, 0x04, 0x22, 0xcb, 0x43, 0xaa, 0x8c, 0x65,
-	0xc0, 0x29, 0x0f, 0xe6, 0x58, 0xb1, 0x97, 0x7e, 0xdb, 0x32,
-	0x14, 0xfd, 0x19, 0xf0, 0xd6, 0x3f, 0x9a, 0x73, 0x55, 0xbc,
-	0x02, 0xeb, 0xcd, 0x24, 0x81, 0x68, 0x4e, 0xa7, 0x2f, 0xc6,
-	0xe0, 0x09, 0xac, 0x45, 0x63, 0x8a, 0x34, 0xdd, 0xfb, 0x12,
-	0xb7, 0x5e, 0x78, 0x91, 0x00, 0xea, 0xc9, 0x23, 0x8f, 0x65,
-	0x46, 0xac, 0x03, 0xe9, 0xca, 0x20, 0x8c, 0x66, 0x45, 0xaf,
-	0x06, 0xec, 0xcf, 0x25, 0x89, 0x63, 0x40, 0xaa, 0x05, 0xef,
-	0xcc, 0x26, 0x8a, 0x60, 0x43, 0xa9, 0x0c, 0xe6, 0xc5, 0x2f,
-	0x83, 0x69, 0x4a, 0xa0, 0x0f, 0xe5, 0xc6, 0x2c, 0x80, 0x6a,
-	0x49, 0xa3, 0x0a, 0xe0, 0xc3, 0x29, 0x85, 0x6f, 0x4c, 0xa6,
-	0x09, 0xe3, 0xc0, 0x2a, 0x86, 0x6c, 0x4f, 0xa5, 0x18, 0xf2,
-	0xd1, 0x3b, 0x97, 0x7d, 0x5e, 0xb4, 0x1b, 0xf1, 0xd2, 0x38,
-	0x94, 0x7e, 0x5d, 0xb7, 0x1e, 0xf4, 0xd7, 0x3d, 0x91, 0x7b,
-	0x58, 0xb2, 0x1d, 0xf7, 0xd4, 0x3e, 0x92, 0x78, 0x5b, 0xb1,
-	0x14, 0xfe, 0xdd, 0x37, 0x9b, 0x71, 0x52, 0xb8, 0x17, 0xfd,
-	0xde, 0x34, 0x98, 0x72, 0x51, 0xbb, 0x12, 0xf8, 0xdb, 0x31,
-	0x9d, 0x77, 0x54, 0xbe, 0x11, 0xfb, 0xd8, 0x32, 0x9e, 0x74,
-	0x57, 0xbd, 0x30, 0xda, 0xf9, 0x13, 0xbf, 0x55, 0x76, 0x9c,
-	0x33, 0xd9, 0xfa, 0x10, 0xbc, 0x56, 0x75, 0x9f, 0x36, 0xdc,
-	0xff, 0x15, 0xb9, 0x53, 0x70, 0x9a, 0x35, 0xdf, 0xfc, 0x16,
-	0xba, 0x50, 0x73, 0x99, 0x3c, 0xd6, 0xf5, 0x1f, 0xb3, 0x59,
-	0x7a, 0x90, 0x3f, 0xd5, 0xf6, 0x1c, 0xb0, 0x5a, 0x79, 0x93,
-	0x3a, 0xd0, 0xf3, 0x19, 0xb5, 0x5f, 0x7c, 0x96, 0x39, 0xd3,
-	0xf0, 0x1a, 0xb6, 0x5c, 0x7f, 0x95, 0x28, 0xc2, 0xe1, 0x0b,
-	0xa7, 0x4d, 0x6e, 0x84, 0x2b, 0xc1, 0xe2, 0x08, 0xa4, 0x4e,
-	0x6d, 0x87, 0x2e, 0xc4, 0xe7, 0x0d, 0xa1, 0x4b, 0x68, 0x82,
-	0x2d, 0xc7, 0xe4, 0x0e, 0xa2, 0x48, 0x6b, 0x81, 0x24, 0xce,
-	0xed, 0x07, 0xab, 0x41, 0x62, 0x88, 0x27, 0xcd, 0xee, 0x04,
-	0xa8, 0x42, 0x61, 0x8b, 0x22, 0xc8, 0xeb, 0x01, 0xad, 0x47,
-	0x64, 0x8e, 0x21, 0xcb, 0xe8, 0x02, 0xae, 0x44, 0x67, 0x8d,
-	0x00, 0xeb, 0xcb, 0x20, 0x8b, 0x60, 0x40, 0xab, 0x0b, 0xe0,
-	0xc0, 0x2b, 0x80, 0x6b, 0x4b, 0xa0, 0x16, 0xfd, 0xdd, 0x36,
-	0x9d, 0x76, 0x56, 0xbd, 0x1d, 0xf6, 0xd6, 0x3d, 0x96, 0x7d,
-	0x5d, 0xb6, 0x2c, 0xc7, 0xe7, 0x0c, 0xa7, 0x4c, 0x6c, 0x87,
-	0x27, 0xcc, 0xec, 0x07, 0xac, 0x47, 0x67, 0x8c, 0x3a, 0xd1,
-	0xf1, 0x1a, 0xb1, 0x5a, 0x7a, 0x91, 0x31, 0xda, 0xfa, 0x11,
-	0xba, 0x51, 0x71, 0x9a, 0x58, 0xb3, 0x93, 0x78, 0xd3, 0x38,
-	0x18, 0xf3, 0x53, 0xb8, 0x98, 0x73, 0xd8, 0x33, 0x13, 0xf8,
-	0x4e, 0xa5, 0x85, 0x6e, 0xc5, 0x2e, 0x0e, 0xe5, 0x45, 0xae,
-	0x8e, 0x65, 0xce, 0x25, 0x05, 0xee, 0x74, 0x9f, 0xbf, 0x54,
-	0xff, 0x14, 0x34, 0xdf, 0x7f, 0x94, 0xb4, 0x5f, 0xf4, 0x1f,
-	0x3f, 0xd4, 0x62, 0x89, 0xa9, 0x42, 0xe9, 0x02, 0x22, 0xc9,
-	0x69, 0x82, 0xa2, 0x49, 0xe2, 0x09, 0x29, 0xc2, 0xb0, 0x5b,
-	0x7b, 0x90, 0x3b, 0xd0, 0xf0, 0x1b, 0xbb, 0x50, 0x70, 0x9b,
-	0x30, 0xdb, 0xfb, 0x10, 0xa6, 0x4d, 0x6d, 0x86, 0x2d, 0xc6,
-	0xe6, 0x0d, 0xad, 0x46, 0x66, 0x8d, 0x26, 0xcd, 0xed, 0x06,
-	0x9c, 0x77, 0x57, 0xbc, 0x17, 0xfc, 0xdc, 0x37, 0x97, 0x7c,
-	0x5c, 0xb7, 0x1c, 0xf7, 0xd7, 0x3c, 0x8a, 0x61, 0x41, 0xaa,
-	0x01, 0xea, 0xca, 0x21, 0x81, 0x6a, 0x4a, 0xa1, 0x0a, 0xe1,
-	0xc1, 0x2a, 0xe8, 0x03, 0x23, 0xc8, 0x63, 0x88, 0xa8, 0x43,
-	0xe3, 0x08, 0x28, 0xc3, 0x68, 0x83, 0xa3, 0x48, 0xfe, 0x15,
-	0x35, 0xde, 0x75, 0x9e, 0xbe, 0x55, 0xf5, 0x1e, 0x3e, 0xd5,
-	0x7e, 0x95, 0xb5, 0x5e, 0xc4, 0x2f, 0x0f, 0xe4, 0x4f, 0xa4,
-	0x84, 0x6f, 0xcf, 0x24, 0x04, 0xef, 0x44, 0xaf, 0x8f, 0x64,
-	0xd2, 0x39, 0x19, 0xf2, 0x59, 0xb2, 0x92, 0x79, 0xd9, 0x32,
-	0x12, 0xf9, 0x52, 0xb9, 0x99, 0x72, 0x00, 0xec, 0xc5, 0x29,
-	0x97, 0x7b, 0x52, 0xbe, 0x33, 0xdf, 0xf6, 0x1a, 0xa4, 0x48,
-	0x61, 0x8d, 0x66, 0x8a, 0xa3, 0x4f, 0xf1, 0x1d, 0x34, 0xd8,
-	0x55, 0xb9, 0x90, 0x7c, 0xc2, 0x2e, 0x07, 0xeb, 0xcc, 0x20,
-	0x09, 0xe5, 0x5b, 0xb7, 0x9e, 0x72, 0xff, 0x13, 0x3a, 0xd6,
-	0x68, 0x84, 0xad, 0x41, 0xaa, 0x46, 0x6f, 0x83, 0x3d, 0xd1,
-	0xf8, 0x14, 0x99, 0x75, 0x5c, 0xb0, 0x0e, 0xe2, 0xcb, 0x27,
-	0x85, 0x69, 0x40, 0xac, 0x12, 0xfe, 0xd7, 0x3b, 0xb6, 0x5a,
-	0x73, 0x9f, 0x21, 0xcd, 0xe4, 0x08, 0xe3, 0x0f, 0x26, 0xca,
-	0x74, 0x98, 0xb1, 0x5d, 0xd0, 0x3c, 0x15, 0xf9, 0x47, 0xab,
-	0x82, 0x6e, 0x49, 0xa5, 0x8c, 0x60, 0xde, 0x32, 0x1b, 0xf7,
-	0x7a, 0x96, 0xbf, 0x53, 0xed, 0x01, 0x28, 0xc4, 0x2f, 0xc3,
-	0xea, 0x06, 0xb8, 0x54, 0x7d, 0x91, 0x1c, 0xf0, 0xd9, 0x35,
-	0x8b, 0x67, 0x4e, 0xa2, 0x17, 0xfb, 0xd2, 0x3e, 0x80, 0x6c,
-	0x45, 0xa9, 0x24, 0xc8, 0xe1, 0x0d, 0xb3, 0x5f, 0x76, 0x9a,
-	0x71, 0x9d, 0xb4, 0x58, 0xe6, 0x0a, 0x23, 0xcf, 0x42, 0xae,
-	0x87, 0x6b, 0xd5, 0x39, 0x10, 0xfc, 0xdb, 0x37, 0x1e, 0xf2,
-	0x4c, 0xa0, 0x89, 0x65, 0xe8, 0x04, 0x2d, 0xc1, 0x7f, 0x93,
-	0xba, 0x56, 0xbd, 0x51, 0x78, 0x94, 0x2a, 0xc6, 0xef, 0x03,
-	0x8e, 0x62, 0x4b, 0xa7, 0x19, 0xf5, 0xdc, 0x30, 0x92, 0x7e,
-	0x57, 0xbb, 0x05, 0xe9, 0xc0, 0x2c, 0xa1, 0x4d, 0x64, 0x88,
-	0x36, 0xda, 0xf3, 0x1f, 0xf4, 0x18, 0x31, 0xdd, 0x63, 0x8f,
-	0xa6, 0x4a, 0xc7, 0x2b, 0x02, 0xee, 0x50, 0xbc, 0x95, 0x79,
-	0x5e, 0xb2, 0x9b, 0x77, 0xc9, 0x25, 0x0c, 0xe0, 0x6d, 0x81,
-	0xa8, 0x44, 0xfa, 0x16, 0x3f, 0xd3, 0x38, 0xd4, 0xfd, 0x11,
-	0xaf, 0x43, 0x6a, 0x86, 0x0b, 0xe7, 0xce, 0x22, 0x9c, 0x70,
-	0x59, 0xb5, 0x00, 0xed, 0xc7, 0x2a, 0x93, 0x7e, 0x54, 0xb9,
-	0x3b, 0xd6, 0xfc, 0x11, 0xa8, 0x45, 0x6f, 0x82, 0x76, 0x9b,
-	0xb1, 0x5c, 0xe5, 0x08, 0x22, 0xcf, 0x4d, 0xa0, 0x8a, 0x67,
-	0xde, 0x33, 0x19, 0xf4, 0xec, 0x01, 0x2b, 0xc6, 0x7f, 0x92,
-	0xb8, 0x55, 0xd7, 0x3a, 0x10, 0xfd, 0x44, 0xa9, 0x83, 0x6e,
-	0x9a, 0x77, 0x5d, 0xb0, 0x09, 0xe4, 0xce, 0x23, 0xa1, 0x4c,
-	0x66, 0x8b, 0x32, 0xdf, 0xf5, 0x18, 0xc5, 0x28, 0x02, 0xef,
-	0x56, 0xbb, 0x91, 0x7c, 0xfe, 0x13, 0x39, 0xd4, 0x6d, 0x80,
-	0xaa, 0x47, 0xb3, 0x5e, 0x74, 0x99, 0x20, 0xcd, 0xe7, 0x0a,
-	0x88, 0x65, 0x4f, 0xa2, 0x1b, 0xf6, 0xdc, 0x31, 0x29, 0xc4,
-	0xee, 0x03, 0xba, 0x57, 0x7d, 0x90, 0x12, 0xff, 0xd5, 0x38,
-	0x81, 0x6c, 0x46, 0xab, 0x5f, 0xb2, 0x98, 0x75, 0xcc, 0x21,
-	0x0b, 0xe6, 0x64, 0x89, 0xa3, 0x4e, 0xf7, 0x1a, 0x30, 0xdd,
-	0x97, 0x7a, 0x50, 0xbd, 0x04, 0xe9, 0xc3, 0x2e, 0xac, 0x41,
-	0x6b, 0x86, 0x3f, 0xd2, 0xf8, 0x15, 0xe1, 0x0c, 0x26, 0xcb,
-	0x72, 0x9f, 0xb5, 0x58, 0xda, 0x37, 0x1d, 0xf0, 0x49, 0xa4,
-	0x8e, 0x63, 0x7b, 0x96, 0xbc, 0x51, 0xe8, 0x05, 0x2f, 0xc2,
-	0x40, 0xad, 0x87, 0x6a, 0xd3, 0x3e, 0x14, 0xf9, 0x0d, 0xe0,
-	0xca, 0x27, 0x9e, 0x73, 0x59, 0xb4, 0x36, 0xdb, 0xf1, 0x1c,
-	0xa5, 0x48, 0x62, 0x8f, 0x52, 0xbf, 0x95, 0x78, 0xc1, 0x2c,
-	0x06, 0xeb, 0x69, 0x84, 0xae, 0x43, 0xfa, 0x17, 0x3d, 0xd0,
-	0x24, 0xc9, 0xe3, 0x0e, 0xb7, 0x5a, 0x70, 0x9d, 0x1f, 0xf2,
-	0xd8, 0x35, 0x8c, 0x61, 0x4b, 0xa6, 0xbe, 0x53, 0x79, 0x94,
-	0x2d, 0xc0, 0xea, 0x07, 0x85, 0x68, 0x42, 0xaf, 0x16, 0xfb,
-	0xd1, 0x3c, 0xc8, 0x25, 0x0f, 0xe2, 0x5b, 0xb6, 0x9c, 0x71,
-	0xf3, 0x1e, 0x34, 0xd9, 0x60, 0x8d, 0xa7, 0x4a, 0x00, 0xee,
-	0xc1, 0x2f, 0x9f, 0x71, 0x5e, 0xb0, 0x23, 0xcd, 0xe2, 0x0c,
-	0xbc, 0x52, 0x7d, 0x93, 0x46, 0xa8, 0x87, 0x69, 0xd9, 0x37,
-	0x18, 0xf6, 0x65, 0x8b, 0xa4, 0x4a, 0xfa, 0x14, 0x3b, 0xd5,
-	0x8c, 0x62, 0x4d, 0xa3, 0x13, 0xfd, 0xd2, 0x3c, 0xaf, 0x41,
-	0x6e, 0x80, 0x30, 0xde, 0xf1, 0x1f, 0xca, 0x24, 0x0b, 0xe5,
-	0x55, 0xbb, 0x94, 0x7a, 0xe9, 0x07, 0x28, 0xc6, 0x76, 0x98,
-	0xb7, 0x59, 0x05, 0xeb, 0xc4, 0x2a, 0x9a, 0x74, 0x5b, 0xb5,
-	0x26, 0xc8, 0xe7, 0x09, 0xb9, 0x57, 0x78, 0x96, 0x43, 0xad,
-	0x82, 0x6c, 0xdc, 0x32, 0x1d, 0xf3, 0x60, 0x8e, 0xa1, 0x4f,
-	0xff, 0x11, 0x3e, 0xd0, 0x89, 0x67, 0x48, 0xa6, 0x16, 0xf8,
-	0xd7, 0x39, 0xaa, 0x44, 0x6b, 0x85, 0x35, 0xdb, 0xf4, 0x1a,
-	0xcf, 0x21, 0x0e, 0xe0, 0x50, 0xbe, 0x91, 0x7f, 0xec, 0x02,
-	0x2d, 0xc3, 0x73, 0x9d, 0xb2, 0x5c, 0x0a, 0xe4, 0xcb, 0x25,
-	0x95, 0x7b, 0x54, 0xba, 0x29, 0xc7, 0xe8, 0x06, 0xb6, 0x58,
-	0x77, 0x99, 0x4c, 0xa2, 0x8d, 0x63, 0xd3, 0x3d, 0x12, 0xfc,
-	0x6f, 0x81, 0xae, 0x40, 0xf0, 0x1e, 0x31, 0xdf, 0x86, 0x68,
-	0x47, 0xa9, 0x19, 0xf7, 0xd8, 0x36, 0xa5, 0x4b, 0x64, 0x8a,
-	0x3a, 0xd4, 0xfb, 0x15, 0xc0, 0x2e, 0x01, 0xef, 0x5f, 0xb1,
-	0x9e, 0x70, 0xe3, 0x0d, 0x22, 0xcc, 0x7c, 0x92, 0xbd, 0x53,
-	0x0f, 0xe1, 0xce, 0x20, 0x90, 0x7e, 0x51, 0xbf, 0x2c, 0xc2,
-	0xed, 0x03, 0xb3, 0x5d, 0x72, 0x9c, 0x49, 0xa7, 0x88, 0x66,
-	0xd6, 0x38, 0x17, 0xf9, 0x6a, 0x84, 0xab, 0x45, 0xf5, 0x1b,
-	0x34, 0xda, 0x83, 0x6d, 0x42, 0xac, 0x1c, 0xf2, 0xdd, 0x33,
-	0xa0, 0x4e, 0x61, 0x8f, 0x3f, 0xd1, 0xfe, 0x10, 0xc5, 0x2b,
-	0x04, 0xea, 0x5a, 0xb4, 0x9b, 0x75, 0xe6, 0x08, 0x27, 0xc9,
-	0x79, 0x97, 0xb8, 0x56, 0x00, 0xef, 0xc3, 0x2c, 0x9b, 0x74,
-	0x58, 0xb7, 0x2b, 0xc4, 0xe8, 0x07, 0xb0, 0x5f, 0x73, 0x9c,
-	0x56, 0xb9, 0x95, 0x7a, 0xcd, 0x22, 0x0e, 0xe1, 0x7d, 0x92,
-	0xbe, 0x51, 0xe6, 0x09, 0x25, 0xca, 0xac, 0x43, 0x6f, 0x80,
-	0x37, 0xd8, 0xf4, 0x1b, 0x87, 0x68, 0x44, 0xab, 0x1c, 0xf3,
-	0xdf, 0x30, 0xfa, 0x15, 0x39, 0xd6, 0x61, 0x8e, 0xa2, 0x4d,
-	0xd1, 0x3e, 0x12, 0xfd, 0x4a, 0xa5, 0x89, 0x66, 0x45, 0xaa,
-	0x86, 0x69, 0xde, 0x31, 0x1d, 0xf2, 0x6e, 0x81, 0xad, 0x42,
-	0xf5, 0x1a, 0x36, 0xd9, 0x13, 0xfc, 0xd0, 0x3f, 0x88, 0x67,
-	0x4b, 0xa4, 0x38, 0xd7, 0xfb, 0x14, 0xa3, 0x4c, 0x60, 0x8f,
-	0xe9, 0x06, 0x2a, 0xc5, 0x72, 0x9d, 0xb1, 0x5e, 0xc2, 0x2d,
-	0x01, 0xee, 0x59, 0xb6, 0x9a, 0x75, 0xbf, 0x50, 0x7c, 0x93,
-	0x24, 0xcb, 0xe7, 0x08, 0x94, 0x7b, 0x57, 0xb8, 0x0f, 0xe0,
-	0xcc, 0x23, 0x8a, 0x65, 0x49, 0xa6, 0x11, 0xfe, 0xd2, 0x3d,
-	0xa1, 0x4e, 0x62, 0x8d, 0x3a, 0xd5, 0xf9, 0x16, 0xdc, 0x33,
-	0x1f, 0xf0, 0x47, 0xa8, 0x84, 0x6b, 0xf7, 0x18, 0x34, 0xdb,
-	0x6c, 0x83, 0xaf, 0x40, 0x26, 0xc9, 0xe5, 0x0a, 0xbd, 0x52,
-	0x7e, 0x91, 0x0d, 0xe2, 0xce, 0x21, 0x96, 0x79, 0x55, 0xba,
-	0x70, 0x9f, 0xb3, 0x5c, 0xeb, 0x04, 0x28, 0xc7, 0x5b, 0xb4,
-	0x98, 0x77, 0xc0, 0x2f, 0x03, 0xec, 0xcf, 0x20, 0x0c, 0xe3,
-	0x54, 0xbb, 0x97, 0x78, 0xe4, 0x0b, 0x27, 0xc8, 0x7f, 0x90,
-	0xbc, 0x53, 0x99, 0x76, 0x5a, 0xb5, 0x02, 0xed, 0xc1, 0x2e,
-	0xb2, 0x5d, 0x71, 0x9e, 0x29, 0xc6, 0xea, 0x05, 0x63, 0x8c,
-	0xa0, 0x4f, 0xf8, 0x17, 0x3b, 0xd4, 0x48, 0xa7, 0x8b, 0x64,
-	0xd3, 0x3c, 0x10, 0xff, 0x35, 0xda, 0xf6, 0x19, 0xae, 0x41,
-	0x6d, 0x82, 0x1e, 0xf1, 0xdd, 0x32, 0x85, 0x6a, 0x46, 0xa9,
-	0x00, 0xf0, 0xfd, 0x0d, 0xe7, 0x17, 0x1a, 0xea, 0xd3, 0x23,
-	0x2e, 0xde, 0x34, 0xc4, 0xc9, 0x39, 0xbb, 0x4b, 0x46, 0xb6,
-	0x5c, 0xac, 0xa1, 0x51, 0x68, 0x98, 0x95, 0x65, 0x8f, 0x7f,
-	0x72, 0x82, 0x6b, 0x9b, 0x96, 0x66, 0x8c, 0x7c, 0x71, 0x81,
-	0xb8, 0x48, 0x45, 0xb5, 0x5f, 0xaf, 0xa2, 0x52, 0xd0, 0x20,
-	0x2d, 0xdd, 0x37, 0xc7, 0xca, 0x3a, 0x03, 0xf3, 0xfe, 0x0e,
-	0xe4, 0x14, 0x19, 0xe9, 0xd6, 0x26, 0x2b, 0xdb, 0x31, 0xc1,
-	0xcc, 0x3c, 0x05, 0xf5, 0xf8, 0x08, 0xe2, 0x12, 0x1f, 0xef,
-	0x6d, 0x9d, 0x90, 0x60, 0x8a, 0x7a, 0x77, 0x87, 0xbe, 0x4e,
-	0x43, 0xb3, 0x59, 0xa9, 0xa4, 0x54, 0xbd, 0x4d, 0x40, 0xb0,
-	0x5a, 0xaa, 0xa7, 0x57, 0x6e, 0x9e, 0x93, 0x63, 0x89, 0x79,
-	0x74, 0x84, 0x06, 0xf6, 0xfb, 0x0b, 0xe1, 0x11, 0x1c, 0xec,
-	0xd5, 0x25, 0x28, 0xd8, 0x32, 0xc2, 0xcf, 0x3f, 0xb1, 0x41,
-	0x4c, 0xbc, 0x56, 0xa6, 0xab, 0x5b, 0x62, 0x92, 0x9f, 0x6f,
-	0x85, 0x75, 0x78, 0x88, 0x0a, 0xfa, 0xf7, 0x07, 0xed, 0x1d,
-	0x10, 0xe0, 0xd9, 0x29, 0x24, 0xd4, 0x3e, 0xce, 0xc3, 0x33,
-	0xda, 0x2a, 0x27, 0xd7, 0x3d, 0xcd, 0xc0, 0x30, 0x09, 0xf9,
-	0xf4, 0x04, 0xee, 0x1e, 0x13, 0xe3, 0x61, 0x91, 0x9c, 0x6c,
-	0x86, 0x76, 0x7b, 0x8b, 0xb2, 0x42, 0x4f, 0xbf, 0x55, 0xa5,
-	0xa8, 0x58, 0x67, 0x97, 0x9a, 0x6a, 0x80, 0x70, 0x7d, 0x8d,
-	0xb4, 0x44, 0x49, 0xb9, 0x53, 0xa3, 0xae, 0x5e, 0xdc, 0x2c,
-	0x21, 0xd1, 0x3b, 0xcb, 0xc6, 0x36, 0x0f, 0xff, 0xf2, 0x02,
-	0xe8, 0x18, 0x15, 0xe5, 0x0c, 0xfc, 0xf1, 0x01, 0xeb, 0x1b,
-	0x16, 0xe6, 0xdf, 0x2f, 0x22, 0xd2, 0x38, 0xc8, 0xc5, 0x35,
-	0xb7, 0x47, 0x4a, 0xba, 0x50, 0xa0, 0xad, 0x5d, 0x64, 0x94,
-	0x99, 0x69, 0x83, 0x73, 0x7e, 0x8e, 0x00, 0xf1, 0xff, 0x0e,
-	0xe3, 0x12, 0x1c, 0xed, 0xdb, 0x2a, 0x24, 0xd5, 0x38, 0xc9,
-	0xc7, 0x36, 0xab, 0x5a, 0x54, 0xa5, 0x48, 0xb9, 0xb7, 0x46,
-	0x70, 0x81, 0x8f, 0x7e, 0x93, 0x62, 0x6c, 0x9d, 0x4b, 0xba,
-	0xb4, 0x45, 0xa8, 0x59, 0x57, 0xa6, 0x90, 0x61, 0x6f, 0x9e,
-	0x73, 0x82, 0x8c, 0x7d, 0xe0, 0x11, 0x1f, 0xee, 0x03, 0xf2,
-	0xfc, 0x0d, 0x3b, 0xca, 0xc4, 0x35, 0xd8, 0x29, 0x27, 0xd6,
-	0x96, 0x67, 0x69, 0x98, 0x75, 0x84, 0x8a, 0x7b, 0x4d, 0xbc,
-	0xb2, 0x43, 0xae, 0x5f, 0x51, 0xa0, 0x3d, 0xcc, 0xc2, 0x33,
-	0xde, 0x2f, 0x21, 0xd0, 0xe6, 0x17, 0x19, 0xe8, 0x05, 0xf4,
-	0xfa, 0x0b, 0xdd, 0x2c, 0x22, 0xd3, 0x3e, 0xcf, 0xc1, 0x30,
-	0x06, 0xf7, 0xf9, 0x08, 0xe5, 0x14, 0x1a, 0xeb, 0x76, 0x87,
-	0x89, 0x78, 0x95, 0x64, 0x6a, 0x9b, 0xad, 0x5c, 0x52, 0xa3,
-	0x4e, 0xbf, 0xb1, 0x40, 0x31, 0xc0, 0xce, 0x3f, 0xd2, 0x23,
-	0x2d, 0xdc, 0xea, 0x1b, 0x15, 0xe4, 0x09, 0xf8, 0xf6, 0x07,
-	0x9a, 0x6b, 0x65, 0x94, 0x79, 0x88, 0x86, 0x77, 0x41, 0xb0,
-	0xbe, 0x4f, 0xa2, 0x53, 0x5d, 0xac, 0x7a, 0x8b, 0x85, 0x74,
-	0x99, 0x68, 0x66, 0x97, 0xa1, 0x50, 0x5e, 0xaf, 0x42, 0xb3,
-	0xbd, 0x4c, 0xd1, 0x20, 0x2e, 0xdf, 0x32, 0xc3, 0xcd, 0x3c,
-	0x0a, 0xfb, 0xf5, 0x04, 0xe9, 0x18, 0x16, 0xe7, 0xa7, 0x56,
-	0x58, 0xa9, 0x44, 0xb5, 0xbb, 0x4a, 0x7c, 0x8d, 0x83, 0x72,
-	0x9f, 0x6e, 0x60, 0x91, 0x0c, 0xfd, 0xf3, 0x02, 0xef, 0x1e,
-	0x10, 0xe1, 0xd7, 0x26, 0x28, 0xd9, 0x34, 0xc5, 0xcb, 0x3a,
-	0xec, 0x1d, 0x13, 0xe2, 0x0f, 0xfe, 0xf0, 0x01, 0x37, 0xc6,
-	0xc8, 0x39, 0xd4, 0x25, 0x2b, 0xda, 0x47, 0xb6, 0xb8, 0x49,
-	0xa4, 0x55, 0x5b, 0xaa, 0x9c, 0x6d, 0x63, 0x92, 0x7f, 0x8e,
-	0x80, 0x71, 0x00, 0xf2, 0xf9, 0x0b, 0xef, 0x1d, 0x16, 0xe4,
-	0xc3, 0x31, 0x3a, 0xc8, 0x2c, 0xde, 0xd5, 0x27, 0x9b, 0x69,
-	0x62, 0x90, 0x74, 0x86, 0x8d, 0x7f, 0x58, 0xaa, 0xa1, 0x53,
-	0xb7, 0x45, 0x4e, 0xbc, 0x2b, 0xd9, 0xd2, 0x20, 0xc4, 0x36,
-	0x3d, 0xcf, 0xe8, 0x1a, 0x11, 0xe3, 0x07, 0xf5, 0xfe, 0x0c,
-	0xb0, 0x42, 0x49, 0xbb, 0x5f, 0xad, 0xa6, 0x54, 0x73, 0x81,
-	0x8a, 0x78, 0x9c, 0x6e, 0x65, 0x97, 0x56, 0xa4, 0xaf, 0x5d,
-	0xb9, 0x4b, 0x40, 0xb2, 0x95, 0x67, 0x6c, 0x9e, 0x7a, 0x88,
-	0x83, 0x71, 0xcd, 0x3f, 0x34, 0xc6, 0x22, 0xd0, 0xdb, 0x29,
-	0x0e, 0xfc, 0xf7, 0x05, 0xe1, 0x13, 0x18, 0xea, 0x7d, 0x8f,
-	0x84, 0x76, 0x92, 0x60, 0x6b, 0x99, 0xbe, 0x4c, 0x47, 0xb5,
-	0x51, 0xa3, 0xa8, 0x5a, 0xe6, 0x14, 0x1f, 0xed, 0x09, 0xfb,
-	0xf0, 0x02, 0x25, 0xd7, 0xdc, 0x2e, 0xca, 0x38, 0x33, 0xc1,
-	0xac, 0x5e, 0x55, 0xa7, 0x43, 0xb1, 0xba, 0x48, 0x6f, 0x9d,
-	0x96, 0x64, 0x80, 0x72, 0x79, 0x8b, 0x37, 0xc5, 0xce, 0x3c,
-	0xd8, 0x2a, 0x21, 0xd3, 0xf4, 0x06, 0x0d, 0xff, 0x1b, 0xe9,
-	0xe2, 0x10, 0x87, 0x75, 0x7e, 0x8c, 0x68, 0x9a, 0x91, 0x63,
-	0x44, 0xb6, 0xbd, 0x4f, 0xab, 0x59, 0x52, 0xa0, 0x1c, 0xee,
-	0xe5, 0x17, 0xf3, 0x01, 0x0a, 0xf8, 0xdf, 0x2d, 0x26, 0xd4,
-	0x30, 0xc2, 0xc9, 0x3b, 0xfa, 0x08, 0x03, 0xf1, 0x15, 0xe7,
-	0xec, 0x1e, 0x39, 0xcb, 0xc0, 0x32, 0xd6, 0x24, 0x2f, 0xdd,
-	0x61, 0x93, 0x98, 0x6a, 0x8e, 0x7c, 0x77, 0x85, 0xa2, 0x50,
-	0x5b, 0xa9, 0x4d, 0xbf, 0xb4, 0x46, 0xd1, 0x23, 0x28, 0xda,
-	0x3e, 0xcc, 0xc7, 0x35, 0x12, 0xe0, 0xeb, 0x19, 0xfd, 0x0f,
-	0x04, 0xf6, 0x4a, 0xb8, 0xb3, 0x41, 0xa5, 0x57, 0x5c, 0xae,
-	0x89, 0x7b, 0x70, 0x82, 0x66, 0x94, 0x9f, 0x6d, 0x00, 0xf3,
-	0xfb, 0x08, 0xeb, 0x18, 0x10, 0xe3, 0xcb, 0x38, 0x30, 0xc3,
-	0x20, 0xd3, 0xdb, 0x28, 0x8b, 0x78, 0x70, 0x83, 0x60, 0x93,
-	0x9b, 0x68, 0x40, 0xb3, 0xbb, 0x48, 0xab, 0x58, 0x50, 0xa3,
-	0x0b, 0xf8, 0xf0, 0x03, 0xe0, 0x13, 0x1b, 0xe8, 0xc0, 0x33,
-	0x3b, 0xc8, 0x2b, 0xd8, 0xd0, 0x23, 0x80, 0x73, 0x7b, 0x88,
-	0x6b, 0x98, 0x90, 0x63, 0x4b, 0xb8, 0xb0, 0x43, 0xa0, 0x53,
-	0x5b, 0xa8, 0x16, 0xe5, 0xed, 0x1e, 0xfd, 0x0e, 0x06, 0xf5,
-	0xdd, 0x2e, 0x26, 0xd5, 0x36, 0xc5, 0xcd, 0x3e, 0x9d, 0x6e,
-	0x66, 0x95, 0x76, 0x85, 0x8d, 0x7e, 0x56, 0xa5, 0xad, 0x5e,
-	0xbd, 0x4e, 0x46, 0xb5, 0x1d, 0xee, 0xe6, 0x15, 0xf6, 0x05,
-	0x0d, 0xfe, 0xd6, 0x25, 0x2d, 0xde, 0x3d, 0xce, 0xc6, 0x35,
-	0x96, 0x65, 0x6d, 0x9e, 0x7d, 0x8e, 0x86, 0x75, 0x5d, 0xae,
-	0xa6, 0x55, 0xb6, 0x45, 0x4d, 0xbe, 0x2c, 0xdf, 0xd7, 0x24,
-	0xc7, 0x34, 0x3c, 0xcf, 0xe7, 0x14, 0x1c, 0xef, 0x0c, 0xff,
-	0xf7, 0x04, 0xa7, 0x54, 0x5c, 0xaf, 0x4c, 0xbf, 0xb7, 0x44,
-	0x6c, 0x9f, 0x97, 0x64, 0x87, 0x74, 0x7c, 0x8f, 0x27, 0xd4,
-	0xdc, 0x2f, 0xcc, 0x3f, 0x37, 0xc4, 0xec, 0x1f, 0x17, 0xe4,
-	0x07, 0xf4, 0xfc, 0x0f, 0xac, 0x5f, 0x57, 0xa4, 0x47, 0xb4,
-	0xbc, 0x4f, 0x67, 0x94, 0x9c, 0x6f, 0x8c, 0x7f, 0x77, 0x84,
-	0x3a, 0xc9, 0xc1, 0x32, 0xd1, 0x22, 0x2a, 0xd9, 0xf1, 0x02,
-	0x0a, 0xf9, 0x1a, 0xe9, 0xe1, 0x12, 0xb1, 0x42, 0x4a, 0xb9,
-	0x5a, 0xa9, 0xa1, 0x52, 0x7a, 0x89, 0x81, 0x72, 0x91, 0x62,
-	0x6a, 0x99, 0x31, 0xc2, 0xca, 0x39, 0xda, 0x29, 0x21, 0xd2,
-	0xfa, 0x09, 0x01, 0xf2, 0x11, 0xe2, 0xea, 0x19, 0xba, 0x49,
-	0x41, 0xb2, 0x51, 0xa2, 0xaa, 0x59, 0x71, 0x82, 0x8a, 0x79,
-	0x9a, 0x69, 0x61, 0x92, 0x00, 0xf4, 0xf5, 0x01, 0xf7, 0x03,
-	0x02, 0xf6, 0xf3, 0x07, 0x06, 0xf2, 0x04, 0xf0, 0xf1, 0x05,
-	0xfb, 0x0f, 0x0e, 0xfa, 0x0c, 0xf8, 0xf9, 0x0d, 0x08, 0xfc,
-	0xfd, 0x09, 0xff, 0x0b, 0x0a, 0xfe, 0xeb, 0x1f, 0x1e, 0xea,
-	0x1c, 0xe8, 0xe9, 0x1d, 0x18, 0xec, 0xed, 0x19, 0xef, 0x1b,
-	0x1a, 0xee, 0x10, 0xe4, 0xe5, 0x11, 0xe7, 0x13, 0x12, 0xe6,
-	0xe3, 0x17, 0x16, 0xe2, 0x14, 0xe0, 0xe1, 0x15, 0xcb, 0x3f,
-	0x3e, 0xca, 0x3c, 0xc8, 0xc9, 0x3d, 0x38, 0xcc, 0xcd, 0x39,
-	0xcf, 0x3b, 0x3a, 0xce, 0x30, 0xc4, 0xc5, 0x31, 0xc7, 0x33,
-	0x32, 0xc6, 0xc3, 0x37, 0x36, 0xc2, 0x34, 0xc0, 0xc1, 0x35,
-	0x20, 0xd4, 0xd5, 0x21, 0xd7, 0x23, 0x22, 0xd6, 0xd3, 0x27,
-	0x26, 0xd2, 0x24, 0xd0, 0xd1, 0x25, 0xdb, 0x2f, 0x2e, 0xda,
-	0x2c, 0xd8, 0xd9, 0x2d, 0x28, 0xdc, 0xdd, 0x29, 0xdf, 0x2b,
-	0x2a, 0xde, 0x8b, 0x7f, 0x7e, 0x8a, 0x7c, 0x88, 0x89, 0x7d,
-	0x78, 0x8c, 0x8d, 0x79, 0x8f, 0x7b, 0x7a, 0x8e, 0x70, 0x84,
-	0x85, 0x71, 0x87, 0x73, 0x72, 0x86, 0x83, 0x77, 0x76, 0x82,
-	0x74, 0x80, 0x81, 0x75, 0x60, 0x94, 0x95, 0x61, 0x97, 0x63,
-	0x62, 0x96, 0x93, 0x67, 0x66, 0x92, 0x64, 0x90, 0x91, 0x65,
-	0x9b, 0x6f, 0x6e, 0x9a, 0x6c, 0x98, 0x99, 0x6d, 0x68, 0x9c,
-	0x9d, 0x69, 0x9f, 0x6b, 0x6a, 0x9e, 0x40, 0xb4, 0xb5, 0x41,
-	0xb7, 0x43, 0x42, 0xb6, 0xb3, 0x47, 0x46, 0xb2, 0x44, 0xb0,
-	0xb1, 0x45, 0xbb, 0x4f, 0x4e, 0xba, 0x4c, 0xb8, 0xb9, 0x4d,
-	0x48, 0xbc, 0xbd, 0x49, 0xbf, 0x4b, 0x4a, 0xbe, 0xab, 0x5f,
-	0x5e, 0xaa, 0x5c, 0xa8, 0xa9, 0x5d, 0x58, 0xac, 0xad, 0x59,
-	0xaf, 0x5b, 0x5a, 0xae, 0x50, 0xa4, 0xa5, 0x51, 0xa7, 0x53,
-	0x52, 0xa6, 0xa3, 0x57, 0x56, 0xa2, 0x54, 0xa0, 0xa1, 0x55,
-	0x00, 0xf5, 0xf7, 0x02, 0xf3, 0x06, 0x04, 0xf1, 0xfb, 0x0e,
-	0x0c, 0xf9, 0x08, 0xfd, 0xff, 0x0a, 0xeb, 0x1e, 0x1c, 0xe9,
-	0x18, 0xed, 0xef, 0x1a, 0x10, 0xe5, 0xe7, 0x12, 0xe3, 0x16,
-	0x14, 0xe1, 0xcb, 0x3e, 0x3c, 0xc9, 0x38, 0xcd, 0xcf, 0x3a,
-	0x30, 0xc5, 0xc7, 0x32, 0xc3, 0x36, 0x34, 0xc1, 0x20, 0xd5,
-	0xd7, 0x22, 0xd3, 0x26, 0x24, 0xd1, 0xdb, 0x2e, 0x2c, 0xd9,
-	0x28, 0xdd, 0xdf, 0x2a, 0x8b, 0x7e, 0x7c, 0x89, 0x78, 0x8d,
-	0x8f, 0x7a, 0x70, 0x85, 0x87, 0x72, 0x83, 0x76, 0x74, 0x81,
-	0x60, 0x95, 0x97, 0x62, 0x93, 0x66, 0x64, 0x91, 0x9b, 0x6e,
-	0x6c, 0x99, 0x68, 0x9d, 0x9f, 0x6a, 0x40, 0xb5, 0xb7, 0x42,
-	0xb3, 0x46, 0x44, 0xb1, 0xbb, 0x4e, 0x4c, 0xb9, 0x48, 0xbd,
-	0xbf, 0x4a, 0xab, 0x5e, 0x5c, 0xa9, 0x58, 0xad, 0xaf, 0x5a,
-	0x50, 0xa5, 0xa7, 0x52, 0xa3, 0x56, 0x54, 0xa1, 0x0b, 0xfe,
-	0xfc, 0x09, 0xf8, 0x0d, 0x0f, 0xfa, 0xf0, 0x05, 0x07, 0xf2,
-	0x03, 0xf6, 0xf4, 0x01, 0xe0, 0x15, 0x17, 0xe2, 0x13, 0xe6,
-	0xe4, 0x11, 0x1b, 0xee, 0xec, 0x19, 0xe8, 0x1d, 0x1f, 0xea,
-	0xc0, 0x35, 0x37, 0xc2, 0x33, 0xc6, 0xc4, 0x31, 0x3b, 0xce,
-	0xcc, 0x39, 0xc8, 0x3d, 0x3f, 0xca, 0x2b, 0xde, 0xdc, 0x29,
-	0xd8, 0x2d, 0x2f, 0xda, 0xd0, 0x25, 0x27, 0xd2, 0x23, 0xd6,
-	0xd4, 0x21, 0x80, 0x75, 0x77, 0x82, 0x73, 0x86, 0x84, 0x71,
-	0x7b, 0x8e, 0x8c, 0x79, 0x88, 0x7d, 0x7f, 0x8a, 0x6b, 0x9e,
-	0x9c, 0x69, 0x98, 0x6d, 0x6f, 0x9a, 0x90, 0x65, 0x67, 0x92,
-	0x63, 0x96, 0x94, 0x61, 0x4b, 0xbe, 0xbc, 0x49, 0xb8, 0x4d,
-	0x4f, 0xba, 0xb0, 0x45, 0x47, 0xb2, 0x43, 0xb6, 0xb4, 0x41,
-	0xa0, 0x55, 0x57, 0xa2, 0x53, 0xa6, 0xa4, 0x51, 0x5b, 0xae,
-	0xac, 0x59, 0xa8, 0x5d, 0x5f, 0xaa, 0x00, 0xf6, 0xf1, 0x07,
-	0xff, 0x09, 0x0e, 0xf8, 0xe3, 0x15, 0x12, 0xe4, 0x1c, 0xea,
-	0xed, 0x1b, 0xdb, 0x2d, 0x2a, 0xdc, 0x24, 0xd2, 0xd5, 0x23,
-	0x38, 0xce, 0xc9, 0x3f, 0xc7, 0x31, 0x36, 0xc0, 0xab, 0x5d,
-	0x5a, 0xac, 0x54, 0xa2, 0xa5, 0x53, 0x48, 0xbe, 0xb9, 0x4f,
-	0xb7, 0x41, 0x46, 0xb0, 0x70, 0x86, 0x81, 0x77, 0x8f, 0x79,
-	0x7e, 0x88, 0x93, 0x65, 0x62, 0x94, 0x6c, 0x9a, 0x9d, 0x6b,
-	0x4b, 0xbd, 0xba, 0x4c, 0xb4, 0x42, 0x45, 0xb3, 0xa8, 0x5e,
-	0x59, 0xaf, 0x57, 0xa1, 0xa6, 0x50, 0x90, 0x66, 0x61, 0x97,
-	0x6f, 0x99, 0x9e, 0x68, 0x73, 0x85, 0x82, 0x74, 0x8c, 0x7a,
-	0x7d, 0x8b, 0xe0, 0x16, 0x11, 0xe7, 0x1f, 0xe9, 0xee, 0x18,
-	0x03, 0xf5, 0xf2, 0x04, 0xfc, 0x0a, 0x0d, 0xfb, 0x3b, 0xcd,
-	0xca, 0x3c, 0xc4, 0x32, 0x35, 0xc3, 0xd8, 0x2e, 0x29, 0xdf,
-	0x27, 0xd1, 0xd6, 0x20, 0x96, 0x60, 0x67, 0x91, 0x69, 0x9f,
-	0x98, 0x6e, 0x75, 0x83, 0x84, 0x72, 0x8a, 0x7c, 0x7b, 0x8d,
-	0x4d, 0xbb, 0xbc, 0x4a, 0xb2, 0x44, 0x43, 0xb5, 0xae, 0x58,
-	0x5f, 0xa9, 0x51, 0xa7, 0xa0, 0x56, 0x3d, 0xcb, 0xcc, 0x3a,
-	0xc2, 0x34, 0x33, 0xc5, 0xde, 0x28, 0x2f, 0xd9, 0x21, 0xd7,
-	0xd0, 0x26, 0xe6, 0x10, 0x17, 0xe1, 0x19, 0xef, 0xe8, 0x1e,
-	0x05, 0xf3, 0xf4, 0x02, 0xfa, 0x0c, 0x0b, 0xfd, 0xdd, 0x2b,
-	0x2c, 0xda, 0x22, 0xd4, 0xd3, 0x25, 0x3e, 0xc8, 0xcf, 0x39,
-	0xc1, 0x37, 0x30, 0xc6, 0x06, 0xf0, 0xf7, 0x01, 0xf9, 0x0f,
-	0x08, 0xfe, 0xe5, 0x13, 0x14, 0xe2, 0x1a, 0xec, 0xeb, 0x1d,
-	0x76, 0x80, 0x87, 0x71, 0x89, 0x7f, 0x78, 0x8e, 0x95, 0x63,
-	0x64, 0x92, 0x6a, 0x9c, 0x9b, 0x6d, 0xad, 0x5b, 0x5c, 0xaa,
-	0x52, 0xa4, 0xa3, 0x55, 0x4e, 0xb8, 0xbf, 0x49, 0xb1, 0x47,
-	0x40, 0xb6, 0x00, 0xf7, 0xf3, 0x04, 0xfb, 0x0c, 0x08, 0xff,
-	0xeb, 0x1c, 0x18, 0xef, 0x10, 0xe7, 0xe3, 0x14, 0xcb, 0x3c,
-	0x38, 0xcf, 0x30, 0xc7, 0xc3, 0x34, 0x20, 0xd7, 0xd3, 0x24,
-	0xdb, 0x2c, 0x28, 0xdf, 0x8b, 0x7c, 0x78, 0x8f, 0x70, 0x87,
-	0x83, 0x74, 0x60, 0x97, 0x93, 0x64, 0x9b, 0x6c, 0x68, 0x9f,
-	0x40, 0xb7, 0xb3, 0x44, 0xbb, 0x4c, 0x48, 0xbf, 0xab, 0x5c,
-	0x58, 0xaf, 0x50, 0xa7, 0xa3, 0x54, 0x0b, 0xfc, 0xf8, 0x0f,
-	0xf0, 0x07, 0x03, 0xf4, 0xe0, 0x17, 0x13, 0xe4, 0x1b, 0xec,
-	0xe8, 0x1f, 0xc0, 0x37, 0x33, 0xc4, 0x3b, 0xcc, 0xc8, 0x3f,
-	0x2b, 0xdc, 0xd8, 0x2f, 0xd0, 0x27, 0x23, 0xd4, 0x80, 0x77,
-	0x73, 0x84, 0x7b, 0x8c, 0x88, 0x7f, 0x6b, 0x9c, 0x98, 0x6f,
-	0x90, 0x67, 0x63, 0x94, 0x4b, 0xbc, 0xb8, 0x4f, 0xb0, 0x47,
-	0x43, 0xb4, 0xa0, 0x57, 0x53, 0xa4, 0x5b, 0xac, 0xa8, 0x5f,
-	0x16, 0xe1, 0xe5, 0x12, 0xed, 0x1a, 0x1e, 0xe9, 0xfd, 0x0a,
-	0x0e, 0xf9, 0x06, 0xf1, 0xf5, 0x02, 0xdd, 0x2a, 0x2e, 0xd9,
-	0x26, 0xd1, 0xd5, 0x22, 0x36, 0xc1, 0xc5, 0x32, 0xcd, 0x3a,
-	0x3e, 0xc9, 0x9d, 0x6a, 0x6e, 0x99, 0x66, 0x91, 0x95, 0x62,
-	0x76, 0x81, 0x85, 0x72, 0x8d, 0x7a, 0x7e, 0x89, 0x56, 0xa1,
-	0xa5, 0x52, 0xad, 0x5a, 0x5e, 0xa9, 0xbd, 0x4a, 0x4e, 0xb9,
-	0x46, 0xb1, 0xb5, 0x42, 0x1d, 0xea, 0xee, 0x19, 0xe6, 0x11,
-	0x15, 0xe2, 0xf6, 0x01, 0x05, 0xf2, 0x0d, 0xfa, 0xfe, 0x09,
-	0xd6, 0x21, 0x25, 0xd2, 0x2d, 0xda, 0xde, 0x29, 0x3d, 0xca,
-	0xce, 0x39, 0xc6, 0x31, 0x35, 0xc2, 0x96, 0x61, 0x65, 0x92,
-	0x6d, 0x9a, 0x9e, 0x69, 0x7d, 0x8a, 0x8e, 0x79, 0x86, 0x71,
-	0x75, 0x82, 0x5d, 0xaa, 0xae, 0x59, 0xa6, 0x51, 0x55, 0xa2,
-	0xb6, 0x41, 0x45, 0xb2, 0x4d, 0xba, 0xbe, 0x49, 0x00, 0xf8,
-	0xed, 0x15, 0xc7, 0x3f, 0x2a, 0xd2, 0x93, 0x6b, 0x7e, 0x86,
-	0x54, 0xac, 0xb9, 0x41, 0x3b, 0xc3, 0xd6, 0x2e, 0xfc, 0x04,
-	0x11, 0xe9, 0xa8, 0x50, 0x45, 0xbd, 0x6f, 0x97, 0x82, 0x7a,
-	0x76, 0x8e, 0x9b, 0x63, 0xb1, 0x49, 0x5c, 0xa4, 0xe5, 0x1d,
-	0x08, 0xf0, 0x22, 0xda, 0xcf, 0x37, 0x4d, 0xb5, 0xa0, 0x58,
-	0x8a, 0x72, 0x67, 0x9f, 0xde, 0x26, 0x33, 0xcb, 0x19, 0xe1,
-	0xf4, 0x0c, 0xec, 0x14, 0x01, 0xf9, 0x2b, 0xd3, 0xc6, 0x3e,
-	0x7f, 0x87, 0x92, 0x6a, 0xb8, 0x40, 0x55, 0xad, 0xd7, 0x2f,
-	0x3a, 0xc2, 0x10, 0xe8, 0xfd, 0x05, 0x44, 0xbc, 0xa9, 0x51,
-	0x83, 0x7b, 0x6e, 0x96, 0x9a, 0x62, 0x77, 0x8f, 0x5d, 0xa5,
-	0xb0, 0x48, 0x09, 0xf1, 0xe4, 0x1c, 0xce, 0x36, 0x23, 0xdb,
-	0xa1, 0x59, 0x4c, 0xb4, 0x66, 0x9e, 0x8b, 0x73, 0x32, 0xca,
-	0xdf, 0x27, 0xf5, 0x0d, 0x18, 0xe0, 0xc5, 0x3d, 0x28, 0xd0,
-	0x02, 0xfa, 0xef, 0x17, 0x56, 0xae, 0xbb, 0x43, 0x91, 0x69,
-	0x7c, 0x84, 0xfe, 0x06, 0x13, 0xeb, 0x39, 0xc1, 0xd4, 0x2c,
-	0x6d, 0x95, 0x80, 0x78, 0xaa, 0x52, 0x47, 0xbf, 0xb3, 0x4b,
-	0x5e, 0xa6, 0x74, 0x8c, 0x99, 0x61, 0x20, 0xd8, 0xcd, 0x35,
-	0xe7, 0x1f, 0x0a, 0xf2, 0x88, 0x70, 0x65, 0x9d, 0x4f, 0xb7,
-	0xa2, 0x5a, 0x1b, 0xe3, 0xf6, 0x0e, 0xdc, 0x24, 0x31, 0xc9,
-	0x29, 0xd1, 0xc4, 0x3c, 0xee, 0x16, 0x03, 0xfb, 0xba, 0x42,
-	0x57, 0xaf, 0x7d, 0x85, 0x90, 0x68, 0x12, 0xea, 0xff, 0x07,
-	0xd5, 0x2d, 0x38, 0xc0, 0x81, 0x79, 0x6c, 0x94, 0x46, 0xbe,
-	0xab, 0x53, 0x5f, 0xa7, 0xb2, 0x4a, 0x98, 0x60, 0x75, 0x8d,
-	0xcc, 0x34, 0x21, 0xd9, 0x0b, 0xf3, 0xe6, 0x1e, 0x64, 0x9c,
-	0x89, 0x71, 0xa3, 0x5b, 0x4e, 0xb6, 0xf7, 0x0f, 0x1a, 0xe2,
-	0x30, 0xc8, 0xdd, 0x25, 0x00, 0xf9, 0xef, 0x16, 0xc3, 0x3a,
-	0x2c, 0xd5, 0x9b, 0x62, 0x74, 0x8d, 0x58, 0xa1, 0xb7, 0x4e,
-	0x2b, 0xd2, 0xc4, 0x3d, 0xe8, 0x11, 0x07, 0xfe, 0xb0, 0x49,
-	0x5f, 0xa6, 0x73, 0x8a, 0x9c, 0x65, 0x56, 0xaf, 0xb9, 0x40,
-	0x95, 0x6c, 0x7a, 0x83, 0xcd, 0x34, 0x22, 0xdb, 0x0e, 0xf7,
-	0xe1, 0x18, 0x7d, 0x84, 0x92, 0x6b, 0xbe, 0x47, 0x51, 0xa8,
-	0xe6, 0x1f, 0x09, 0xf0, 0x25, 0xdc, 0xca, 0x33, 0xac, 0x55,
-	0x43, 0xba, 0x6f, 0x96, 0x80, 0x79, 0x37, 0xce, 0xd8, 0x21,
-	0xf4, 0x0d, 0x1b, 0xe2, 0x87, 0x7e, 0x68, 0x91, 0x44, 0xbd,
-	0xab, 0x52, 0x1c, 0xe5, 0xf3, 0x0a, 0xdf, 0x26, 0x30, 0xc9,
-	0xfa, 0x03, 0x15, 0xec, 0x39, 0xc0, 0xd6, 0x2f, 0x61, 0x98,
-	0x8e, 0x77, 0xa2, 0x5b, 0x4d, 0xb4, 0xd1, 0x28, 0x3e, 0xc7,
-	0x12, 0xeb, 0xfd, 0x04, 0x4a, 0xb3, 0xa5, 0x5c, 0x89, 0x70,
-	0x66, 0x9f, 0x45, 0xbc, 0xaa, 0x53, 0x86, 0x7f, 0x69, 0x90,
-	0xde, 0x27, 0x31, 0xc8, 0x1d, 0xe4, 0xf2, 0x0b, 0x6e, 0x97,
-	0x81, 0x78, 0xad, 0x54, 0x42, 0xbb, 0xf5, 0x0c, 0x1a, 0xe3,
-	0x36, 0xcf, 0xd9, 0x20, 0x13, 0xea, 0xfc, 0x05, 0xd0, 0x29,
-	0x3f, 0xc6, 0x88, 0x71, 0x67, 0x9e, 0x4b, 0xb2, 0xa4, 0x5d,
-	0x38, 0xc1, 0xd7, 0x2e, 0xfb, 0x02, 0x14, 0xed, 0xa3, 0x5a,
-	0x4c, 0xb5, 0x60, 0x99, 0x8f, 0x76, 0xe9, 0x10, 0x06, 0xff,
-	0x2a, 0xd3, 0xc5, 0x3c, 0x72, 0x8b, 0x9d, 0x64, 0xb1, 0x48,
-	0x5e, 0xa7, 0xc2, 0x3b, 0x2d, 0xd4, 0x01, 0xf8, 0xee, 0x17,
-	0x59, 0xa0, 0xb6, 0x4f, 0x9a, 0x63, 0x75, 0x8c, 0xbf, 0x46,
-	0x50, 0xa9, 0x7c, 0x85, 0x93, 0x6a, 0x24, 0xdd, 0xcb, 0x32,
-	0xe7, 0x1e, 0x08, 0xf1, 0x94, 0x6d, 0x7b, 0x82, 0x57, 0xae,
-	0xb8, 0x41, 0x0f, 0xf6, 0xe0, 0x19, 0xcc, 0x35, 0x23, 0xda,
-	0x00, 0xfa, 0xe9, 0x13, 0xcf, 0x35, 0x26, 0xdc, 0x83, 0x79,
-	0x6a, 0x90, 0x4c, 0xb6, 0xa5, 0x5f, 0x1b, 0xe1, 0xf2, 0x08,
-	0xd4, 0x2e, 0x3d, 0xc7, 0x98, 0x62, 0x71, 0x8b, 0x57, 0xad,
-	0xbe, 0x44, 0x36, 0xcc, 0xdf, 0x25, 0xf9, 0x03, 0x10, 0xea,
-	0xb5, 0x4f, 0x5c, 0xa6, 0x7a, 0x80, 0x93, 0x69, 0x2d, 0xd7,
-	0xc4, 0x3e, 0xe2, 0x18, 0x0b, 0xf1, 0xae, 0x54, 0x47, 0xbd,
-	0x61, 0x9b, 0x88, 0x72, 0x6c, 0x96, 0x85, 0x7f, 0xa3, 0x59,
-	0x4a, 0xb0, 0xef, 0x15, 0x06, 0xfc, 0x20, 0xda, 0xc9, 0x33,
-	0x77, 0x8d, 0x9e, 0x64, 0xb8, 0x42, 0x51, 0xab, 0xf4, 0x0e,
-	0x1d, 0xe7, 0x3b, 0xc1, 0xd2, 0x28, 0x5a, 0xa0, 0xb3, 0x49,
-	0x95, 0x6f, 0x7c, 0x86, 0xd9, 0x23, 0x30, 0xca, 0x16, 0xec,
-	0xff, 0x05, 0x41, 0xbb, 0xa8, 0x52, 0x8e, 0x74, 0x67, 0x9d,
-	0xc2, 0x38, 0x2b, 0xd1, 0x0d, 0xf7, 0xe4, 0x1e, 0xd8, 0x22,
-	0x31, 0xcb, 0x17, 0xed, 0xfe, 0x04, 0x5b, 0xa1, 0xb2, 0x48,
-	0x94, 0x6e, 0x7d, 0x87, 0xc3, 0x39, 0x2a, 0xd0, 0x0c, 0xf6,
-	0xe5, 0x1f, 0x40, 0xba, 0xa9, 0x53, 0x8f, 0x75, 0x66, 0x9c,
-	0xee, 0x14, 0x07, 0xfd, 0x21, 0xdb, 0xc8, 0x32, 0x6d, 0x97,
-	0x84, 0x7e, 0xa2, 0x58, 0x4b, 0xb1, 0xf5, 0x0f, 0x1c, 0xe6,
-	0x3a, 0xc0, 0xd3, 0x29, 0x76, 0x8c, 0x9f, 0x65, 0xb9, 0x43,
-	0x50, 0xaa, 0xb4, 0x4e, 0x5d, 0xa7, 0x7b, 0x81, 0x92, 0x68,
-	0x37, 0xcd, 0xde, 0x24, 0xf8, 0x02, 0x11, 0xeb, 0xaf, 0x55,
-	0x46, 0xbc, 0x60, 0x9a, 0x89, 0x73, 0x2c, 0xd6, 0xc5, 0x3f,
-	0xe3, 0x19, 0x0a, 0xf0, 0x82, 0x78, 0x6b, 0x91, 0x4d, 0xb7,
-	0xa4, 0x5e, 0x01, 0xfb, 0xe8, 0x12, 0xce, 0x34, 0x27, 0xdd,
-	0x99, 0x63, 0x70, 0x8a, 0x56, 0xac, 0xbf, 0x45, 0x1a, 0xe0,
-	0xf3, 0x09, 0xd5, 0x2f, 0x3c, 0xc6, 0x00, 0xfb, 0xeb, 0x10,
-	0xcb, 0x30, 0x20, 0xdb, 0x8b, 0x70, 0x60, 0x9b, 0x40, 0xbb,
-	0xab, 0x50, 0x0b, 0xf0, 0xe0, 0x1b, 0xc0, 0x3b, 0x2b, 0xd0,
-	0x80, 0x7b, 0x6b, 0x90, 0x4b, 0xb0, 0xa0, 0x5b, 0x16, 0xed,
-	0xfd, 0x06, 0xdd, 0x26, 0x36, 0xcd, 0x9d, 0x66, 0x76, 0x8d,
-	0x56, 0xad, 0xbd, 0x46, 0x1d, 0xe6, 0xf6, 0x0d, 0xd6, 0x2d,
-	0x3d, 0xc6, 0x96, 0x6d, 0x7d, 0x86, 0x5d, 0xa6, 0xb6, 0x4d,
-	0x2c, 0xd7, 0xc7, 0x3c, 0xe7, 0x1c, 0x0c, 0xf7, 0xa7, 0x5c,
-	0x4c, 0xb7, 0x6c, 0x97, 0x87, 0x7c, 0x27, 0xdc, 0xcc, 0x37,
-	0xec, 0x17, 0x07, 0xfc, 0xac, 0x57, 0x47, 0xbc, 0x67, 0x9c,
-	0x8c, 0x77, 0x3a, 0xc1, 0xd1, 0x2a, 0xf1, 0x0a, 0x1a, 0xe1,
-	0xb1, 0x4a, 0x5a, 0xa1, 0x7a, 0x81, 0x91, 0x6a, 0x31, 0xca,
-	0xda, 0x21, 0xfa, 0x01, 0x11, 0xea, 0xba, 0x41, 0x51, 0xaa,
-	0x71, 0x8a, 0x9a, 0x61, 0x58, 0xa3, 0xb3, 0x48, 0x93, 0x68,
-	0x78, 0x83, 0xd3, 0x28, 0x38, 0xc3, 0x18, 0xe3, 0xf3, 0x08,
-	0x53, 0xa8, 0xb8, 0x43, 0x98, 0x63, 0x73, 0x88, 0xd8, 0x23,
-	0x33, 0xc8, 0x13, 0xe8, 0xf8, 0x03, 0x4e, 0xb5, 0xa5, 0x5e,
-	0x85, 0x7e, 0x6e, 0x95, 0xc5, 0x3e, 0x2e, 0xd5, 0x0e, 0xf5,
-	0xe5, 0x1e, 0x45, 0xbe, 0xae, 0x55, 0x8e, 0x75, 0x65, 0x9e,
-	0xce, 0x35, 0x25, 0xde, 0x05, 0xfe, 0xee, 0x15, 0x74, 0x8f,
-	0x9f, 0x64, 0xbf, 0x44, 0x54, 0xaf, 0xff, 0x04, 0x14, 0xef,
-	0x34, 0xcf, 0xdf, 0x24, 0x7f, 0x84, 0x94, 0x6f, 0xb4, 0x4f,
-	0x5f, 0xa4, 0xf4, 0x0f, 0x1f, 0xe4, 0x3f, 0xc4, 0xd4, 0x2f,
-	0x62, 0x99, 0x89, 0x72, 0xa9, 0x52, 0x42, 0xb9, 0xe9, 0x12,
-	0x02, 0xf9, 0x22, 0xd9, 0xc9, 0x32, 0x69, 0x92, 0x82, 0x79,
-	0xa2, 0x59, 0x49, 0xb2, 0xe2, 0x19, 0x09, 0xf2, 0x29, 0xd2,
-	0xc2, 0x39, 0x00, 0xfc, 0xe5, 0x19, 0xd7, 0x2b, 0x32, 0xce,
-	0xb3, 0x4f, 0x56, 0xaa, 0x64, 0x98, 0x81, 0x7d, 0x7b, 0x87,
-	0x9e, 0x62, 0xac, 0x50, 0x49, 0xb5, 0xc8, 0x34, 0x2d, 0xd1,
-	0x1f, 0xe3, 0xfa, 0x06, 0xf6, 0x0a, 0x13, 0xef, 0x21, 0xdd,
-	0xc4, 0x38, 0x45, 0xb9, 0xa0, 0x5c, 0x92, 0x6e, 0x77, 0x8b,
-	0x8d, 0x71, 0x68, 0x94, 0x5a, 0xa6, 0xbf, 0x43, 0x3e, 0xc2,
-	0xdb, 0x27, 0xe9, 0x15, 0x0c, 0xf0, 0xf1, 0x0d, 0x14, 0xe8,
-	0x26, 0xda, 0xc3, 0x3f, 0x42, 0xbe, 0xa7, 0x5b, 0x95, 0x69,
-	0x70, 0x8c, 0x8a, 0x76, 0x6f, 0x93, 0x5d, 0xa1, 0xb8, 0x44,
-	0x39, 0xc5, 0xdc, 0x20, 0xee, 0x12, 0x0b, 0xf7, 0x07, 0xfb,
-	0xe2, 0x1e, 0xd0, 0x2c, 0x35, 0xc9, 0xb4, 0x48, 0x51, 0xad,
-	0x63, 0x9f, 0x86, 0x7a, 0x7c, 0x80, 0x99, 0x65, 0xab, 0x57,
-	0x4e, 0xb2, 0xcf, 0x33, 0x2a, 0xd6, 0x18, 0xe4, 0xfd, 0x01,
-	0xff, 0x03, 0x1a, 0xe6, 0x28, 0xd4, 0xcd, 0x31, 0x4c, 0xb0,
-	0xa9, 0x55, 0x9b, 0x67, 0x7e, 0x82, 0x84, 0x78, 0x61, 0x9d,
-	0x53, 0xaf, 0xb6, 0x4a, 0x37, 0xcb, 0xd2, 0x2e, 0xe0, 0x1c,
-	0x05, 0xf9, 0x09, 0xf5, 0xec, 0x10, 0xde, 0x22, 0x3b, 0xc7,
-	0xba, 0x46, 0x5f, 0xa3, 0x6d, 0x91, 0x88, 0x74, 0x72, 0x8e,
-	0x97, 0x6b, 0xa5, 0x59, 0x40, 0xbc, 0xc1, 0x3d, 0x24, 0xd8,
-	0x16, 0xea, 0xf3, 0x0f, 0x0e, 0xf2, 0xeb, 0x17, 0xd9, 0x25,
-	0x3c, 0xc0, 0xbd, 0x41, 0x58, 0xa4, 0x6a, 0x96, 0x8f, 0x73,
-	0x75, 0x89, 0x90, 0x6c, 0xa2, 0x5e, 0x47, 0xbb, 0xc6, 0x3a,
-	0x23, 0xdf, 0x11, 0xed, 0xf4, 0x08, 0xf8, 0x04, 0x1d, 0xe1,
-	0x2f, 0xd3, 0xca, 0x36, 0x4b, 0xb7, 0xae, 0x52, 0x9c, 0x60,
-	0x79, 0x85, 0x83, 0x7f, 0x66, 0x9a, 0x54, 0xa8, 0xb1, 0x4d,
-	0x30, 0xcc, 0xd5, 0x29, 0xe7, 0x1b, 0x02, 0xfe, 0x00, 0xfd,
-	0xe7, 0x1a, 0xd3, 0x2e, 0x34, 0xc9, 0xbb, 0x46, 0x5c, 0xa1,
-	0x68, 0x95, 0x8f, 0x72, 0x6b, 0x96, 0x8c, 0x71, 0xb8, 0x45,
-	0x5f, 0xa2, 0xd0, 0x2d, 0x37, 0xca, 0x03, 0xfe, 0xe4, 0x19,
-	0xd6, 0x2b, 0x31, 0xcc, 0x05, 0xf8, 0xe2, 0x1f, 0x6d, 0x90,
-	0x8a, 0x77, 0xbe, 0x43, 0x59, 0xa4, 0xbd, 0x40, 0x5a, 0xa7,
-	0x6e, 0x93, 0x89, 0x74, 0x06, 0xfb, 0xe1, 0x1c, 0xd5, 0x28,
-	0x32, 0xcf, 0xb1, 0x4c, 0x56, 0xab, 0x62, 0x9f, 0x85, 0x78,
-	0x0a, 0xf7, 0xed, 0x10, 0xd9, 0x24, 0x3e, 0xc3, 0xda, 0x27,
-	0x3d, 0xc0, 0x09, 0xf4, 0xee, 0x13, 0x61, 0x9c, 0x86, 0x7b,
-	0xb2, 0x4f, 0x55, 0xa8, 0x67, 0x9a, 0x80, 0x7d, 0xb4, 0x49,
-	0x53, 0xae, 0xdc, 0x21, 0x3b, 0xc6, 0x0f, 0xf2, 0xe8, 0x15,
-	0x0c, 0xf1, 0xeb, 0x16, 0xdf, 0x22, 0x38, 0xc5, 0xb7, 0x4a,
-	0x50, 0xad, 0x64, 0x99, 0x83, 0x7e, 0x7f, 0x82, 0x98, 0x65,
-	0xac, 0x51, 0x4b, 0xb6, 0xc4, 0x39, 0x23, 0xde, 0x17, 0xea,
-	0xf0, 0x0d, 0x14, 0xe9, 0xf3, 0x0e, 0xc7, 0x3a, 0x20, 0xdd,
-	0xaf, 0x52, 0x48, 0xb5, 0x7c, 0x81, 0x9b, 0x66, 0xa9, 0x54,
-	0x4e, 0xb3, 0x7a, 0x87, 0x9d, 0x60, 0x12, 0xef, 0xf5, 0x08,
-	0xc1, 0x3c, 0x26, 0xdb, 0xc2, 0x3f, 0x25, 0xd8, 0x11, 0xec,
-	0xf6, 0x0b, 0x79, 0x84, 0x9e, 0x63, 0xaa, 0x57, 0x4d, 0xb0,
-	0xce, 0x33, 0x29, 0xd4, 0x1d, 0xe0, 0xfa, 0x07, 0x75, 0x88,
-	0x92, 0x6f, 0xa6, 0x5b, 0x41, 0xbc, 0xa5, 0x58, 0x42, 0xbf,
-	0x76, 0x8b, 0x91, 0x6c, 0x1e, 0xe3, 0xf9, 0x04, 0xcd, 0x30,
-	0x2a, 0xd7, 0x18, 0xe5, 0xff, 0x02, 0xcb, 0x36, 0x2c, 0xd1,
-	0xa3, 0x5e, 0x44, 0xb9, 0x70, 0x8d, 0x97, 0x6a, 0x73, 0x8e,
-	0x94, 0x69, 0xa0, 0x5d, 0x47, 0xba, 0xc8, 0x35, 0x2f, 0xd2,
-	0x1b, 0xe6, 0xfc, 0x01, 0x00, 0xfe, 0xe1, 0x1f, 0xdf, 0x21,
-	0x3e, 0xc0, 0xa3, 0x5d, 0x42, 0xbc, 0x7c, 0x82, 0x9d, 0x63,
-	0x5b, 0xa5, 0xba, 0x44, 0x84, 0x7a, 0x65, 0x9b, 0xf8, 0x06,
-	0x19, 0xe7, 0x27, 0xd9, 0xc6, 0x38, 0xb6, 0x48, 0x57, 0xa9,
-	0x69, 0x97, 0x88, 0x76, 0x15, 0xeb, 0xf4, 0x0a, 0xca, 0x34,
-	0x2b, 0xd5, 0xed, 0x13, 0x0c, 0xf2, 0x32, 0xcc, 0xd3, 0x2d,
-	0x4e, 0xb0, 0xaf, 0x51, 0x91, 0x6f, 0x70, 0x8e, 0x71, 0x8f,
-	0x90, 0x6e, 0xae, 0x50, 0x4f, 0xb1, 0xd2, 0x2c, 0x33, 0xcd,
-	0x0d, 0xf3, 0xec, 0x12, 0x2a, 0xd4, 0xcb, 0x35, 0xf5, 0x0b,
-	0x14, 0xea, 0x89, 0x77, 0x68, 0x96, 0x56, 0xa8, 0xb7, 0x49,
-	0xc7, 0x39, 0x26, 0xd8, 0x18, 0xe6, 0xf9, 0x07, 0x64, 0x9a,
-	0x85, 0x7b, 0xbb, 0x45, 0x5a, 0xa4, 0x9c, 0x62, 0x7d, 0x83,
-	0x43, 0xbd, 0xa2, 0x5c, 0x3f, 0xc1, 0xde, 0x20, 0xe0, 0x1e,
-	0x01, 0xff, 0xe2, 0x1c, 0x03, 0xfd, 0x3d, 0xc3, 0xdc, 0x22,
-	0x41, 0xbf, 0xa0, 0x5e, 0x9e, 0x60, 0x7f, 0x81, 0xb9, 0x47,
-	0x58, 0xa6, 0x66, 0x98, 0x87, 0x79, 0x1a, 0xe4, 0xfb, 0x05,
-	0xc5, 0x3b, 0x24, 0xda, 0x54, 0xaa, 0xb5, 0x4b, 0x8b, 0x75,
-	0x6a, 0x94, 0xf7, 0x09, 0x16, 0xe8, 0x28, 0xd6, 0xc9, 0x37,
-	0x0f, 0xf1, 0xee, 0x10, 0xd0, 0x2e, 0x31, 0xcf, 0xac, 0x52,
-	0x4d, 0xb3, 0x73, 0x8d, 0x92, 0x6c, 0x93, 0x6d, 0x72, 0x8c,
-	0x4c, 0xb2, 0xad, 0x53, 0x30, 0xce, 0xd1, 0x2f, 0xef, 0x11,
-	0x0e, 0xf0, 0xc8, 0x36, 0x29, 0xd7, 0x17, 0xe9, 0xf6, 0x08,
-	0x6b, 0x95, 0x8a, 0x74, 0xb4, 0x4a, 0x55, 0xab, 0x25, 0xdb,
-	0xc4, 0x3a, 0xfa, 0x04, 0x1b, 0xe5, 0x86, 0x78, 0x67, 0x99,
-	0x59, 0xa7, 0xb8, 0x46, 0x7e, 0x80, 0x9f, 0x61, 0xa1, 0x5f,
-	0x40, 0xbe, 0xdd, 0x23, 0x3c, 0xc2, 0x02, 0xfc, 0xe3, 0x1d,
-	0x00, 0xff, 0xe3, 0x1c, 0xdb, 0x24, 0x38, 0xc7, 0xab, 0x54,
-	0x48, 0xb7, 0x70, 0x8f, 0x93, 0x6c, 0x4b, 0xb4, 0xa8, 0x57,
-	0x90, 0x6f, 0x73, 0x8c, 0xe0, 0x1f, 0x03, 0xfc, 0x3b, 0xc4,
-	0xd8, 0x27, 0x96, 0x69, 0x75, 0x8a, 0x4d, 0xb2, 0xae, 0x51,
-	0x3d, 0xc2, 0xde, 0x21, 0xe6, 0x19, 0x05, 0xfa, 0xdd, 0x22,
-	0x3e, 0xc1, 0x06, 0xf9, 0xe5, 0x1a, 0x76, 0x89, 0x95, 0x6a,
-	0xad, 0x52, 0x4e, 0xb1, 0x31, 0xce, 0xd2, 0x2d, 0xea, 0x15,
-	0x09, 0xf6, 0x9a, 0x65, 0x79, 0x86, 0x41, 0xbe, 0xa2, 0x5d,
-	0x7a, 0x85, 0x99, 0x66, 0xa1, 0x5e, 0x42, 0xbd, 0xd1, 0x2e,
-	0x32, 0xcd, 0x0a, 0xf5, 0xe9, 0x16, 0xa7, 0x58, 0x44, 0xbb,
-	0x7c, 0x83, 0x9f, 0x60, 0x0c, 0xf3, 0xef, 0x10, 0xd7, 0x28,
-	0x34, 0xcb, 0xec, 0x13, 0x0f, 0xf0, 0x37, 0xc8, 0xd4, 0x2b,
-	0x47, 0xb8, 0xa4, 0x5b, 0x9c, 0x63, 0x7f, 0x80, 0x62, 0x9d,
-	0x81, 0x7e, 0xb9, 0x46, 0x5a, 0xa5, 0xc9, 0x36, 0x2a, 0xd5,
-	0x12, 0xed, 0xf1, 0x0e, 0x29, 0xd6, 0xca, 0x35, 0xf2, 0x0d,
-	0x11, 0xee, 0x82, 0x7d, 0x61, 0x9e, 0x59, 0xa6, 0xba, 0x45,
-	0xf4, 0x0b, 0x17, 0xe8, 0x2f, 0xd0, 0xcc, 0x33, 0x5f, 0xa0,
-	0xbc, 0x43, 0x84, 0x7b, 0x67, 0x98, 0xbf, 0x40, 0x5c, 0xa3,
-	0x64, 0x9b, 0x87, 0x78, 0x14, 0xeb, 0xf7, 0x08, 0xcf, 0x30,
-	0x2c, 0xd3, 0x53, 0xac, 0xb0, 0x4f, 0x88, 0x77, 0x6b, 0x94,
-	0xf8, 0x07, 0x1b, 0xe4, 0x23, 0xdc, 0xc0, 0x3f, 0x18, 0xe7,
-	0xfb, 0x04, 0xc3, 0x3c, 0x20, 0xdf, 0xb3, 0x4c, 0x50, 0xaf,
-	0x68, 0x97, 0x8b, 0x74, 0xc5, 0x3a, 0x26, 0xd9, 0x1e, 0xe1,
-	0xfd, 0x02, 0x6e, 0x91, 0x8d, 0x72, 0xb5, 0x4a, 0x56, 0xa9,
-	0x8e, 0x71, 0x6d, 0x92, 0x55, 0xaa, 0xb6, 0x49, 0x25, 0xda,
-	0xc6, 0x39, 0xfe, 0x01, 0x1d, 0xe2
-};
-
-unsigned char gf_inv_table_base[] = {
-	0x00, 0x01, 0x8e, 0xf4, 0x47, 0xa7, 0x7a, 0xba, 0xad, 0x9d,
-	0xdd, 0x98, 0x3d, 0xaa, 0x5d, 0x96, 0xd8, 0x72, 0xc0, 0x58,
-	0xe0, 0x3e, 0x4c, 0x66, 0x90, 0xde, 0x55, 0x80, 0xa0, 0x83,
-	0x4b, 0x2a, 0x6c, 0xed, 0x39, 0x51, 0x60, 0x56, 0x2c, 0x8a,
-	0x70, 0xd0, 0x1f, 0x4a, 0x26, 0x8b, 0x33, 0x6e, 0x48, 0x89,
-	0x6f, 0x2e, 0xa4, 0xc3, 0x40, 0x5e, 0x50, 0x22, 0xcf, 0xa9,
-	0xab, 0x0c, 0x15, 0xe1, 0x36, 0x5f, 0xf8, 0xd5, 0x92, 0x4e,
-	0xa6, 0x04, 0x30, 0x88, 0x2b, 0x1e, 0x16, 0x67, 0x45, 0x93,
-	0x38, 0x23, 0x68, 0x8c, 0x81, 0x1a, 0x25, 0x61, 0x13, 0xc1,
-	0xcb, 0x63, 0x97, 0x0e, 0x37, 0x41, 0x24, 0x57, 0xca, 0x5b,
-	0xb9, 0xc4, 0x17, 0x4d, 0x52, 0x8d, 0xef, 0xb3, 0x20, 0xec,
-	0x2f, 0x32, 0x28, 0xd1, 0x11, 0xd9, 0xe9, 0xfb, 0xda, 0x79,
-	0xdb, 0x77, 0x06, 0xbb, 0x84, 0xcd, 0xfe, 0xfc, 0x1b, 0x54,
-	0xa1, 0x1d, 0x7c, 0xcc, 0xe4, 0xb0, 0x49, 0x31, 0x27, 0x2d,
-	0x53, 0x69, 0x02, 0xf5, 0x18, 0xdf, 0x44, 0x4f, 0x9b, 0xbc,
-	0x0f, 0x5c, 0x0b, 0xdc, 0xbd, 0x94, 0xac, 0x09, 0xc7, 0xa2,
-	0x1c, 0x82, 0x9f, 0xc6, 0x34, 0xc2, 0x46, 0x05, 0xce, 0x3b,
-	0x0d, 0x3c, 0x9c, 0x08, 0xbe, 0xb7, 0x87, 0xe5, 0xee, 0x6b,
-	0xeb, 0xf2, 0xbf, 0xaf, 0xc5, 0x64, 0x07, 0x7b, 0x95, 0x9a,
-	0xae, 0xb6, 0x12, 0x59, 0xa5, 0x35, 0x65, 0xb8, 0xa3, 0x9e,
-	0xd2, 0xf7, 0x62, 0x5a, 0x85, 0x7d, 0xa8, 0x3a, 0x29, 0x71,
-	0xc8, 0xf6, 0xf9, 0x43, 0xd7, 0xd6, 0x10, 0x73, 0x76, 0x78,
-	0x99, 0x0a, 0x19, 0x91, 0x14, 0x3f, 0xe6, 0xf0, 0x86, 0xb1,
-	0xe2, 0xf1, 0xfa, 0x74, 0xf3, 0xb4, 0x6d, 0x21, 0xb2, 0x6a,
-	0xe3, 0xe7, 0xb5, 0xea, 0x03, 0x8f, 0xd3, 0xc9, 0x42, 0xd4,
-	0xe8, 0x75, 0x7f, 0xff, 0x7e, 0xfd
-};
-#endif // GF_LARGE_TABLES
-
-#endif //_EC_BASE_H_
diff --git a/src/erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c b/src/erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c
deleted file mode 100644
index 9cea61e..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/**********************************************************************
-  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-    * Neither the name of Intel Corporation nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**********************************************************************/
-#include <limits.h>
-#include "erasure_code.h"
-#include "types.h"
-
-void ec_init_tables(int k, int rows, unsigned char *a, unsigned char *g_tbls)
-{
-	int i, j;
-
-	for (i = 0; i < rows; i++) {
-		for (j = 0; j < k; j++) {
-			gf_vect_mul_init(*a++, g_tbls);
-			g_tbls += 32;
-		}
-	}
-}
-
-#if __WORDSIZE == 64 || _WIN64 || __x86_64__
-void ec_encode_data_sse(int len, int k, int rows, unsigned char *g_tbls, unsigned char **data,
-			unsigned char **coding)
-{
-
-	if (len < 16) {
-		ec_encode_data_base(len, k, rows, g_tbls, data, coding);
-		return;
-	}
-
-	while (rows >= 4) {
-		gf_4vect_dot_prod_sse(len, k, g_tbls, data, coding);
-		g_tbls += 4 * k * 32;
-		coding += 4;
-		rows -= 4;
-	}
-	switch (rows) {
-	case 3:
-		gf_3vect_dot_prod_sse(len, k, g_tbls, data, coding);
-		break;
-	case 2:
-		gf_2vect_dot_prod_sse(len, k, g_tbls, data, coding);
-		break;
-	case 1:
-		gf_vect_dot_prod_sse(len, k, g_tbls, data, *coding);
-		break;
-	case 0:
-		break;
-	}
-
-}
-
-void ec_encode_data_avx(int len, int k, int rows, unsigned char *g_tbls, unsigned char **data,
-			unsigned char **coding)
-{
-
-	if (len < 16) {
-		ec_encode_data_base(len, k, rows, g_tbls, data, coding);
-		return;
-	}
-
-	while (rows >= 4) {
-		gf_4vect_dot_prod_avx(len, k, g_tbls, data, coding);
-		g_tbls += 4 * k * 32;
-		coding += 4;
-		rows -= 4;
-	}
-	switch (rows) {
-	case 3:
-		gf_3vect_dot_prod_avx(len, k, g_tbls, data, coding);
-		break;
-	case 2:
-		gf_2vect_dot_prod_avx(len, k, g_tbls, data, coding);
-		break;
-	case 1:
-		gf_vect_dot_prod_avx(len, k, g_tbls, data, *coding);
-		break;
-	case 0:
-		break;
-	}
-
-}
-
-void ec_encode_data_avx2(int len, int k, int rows, unsigned char *g_tbls, unsigned char **data,
-			 unsigned char **coding)
-{
-
-	if (len < 32) {
-		ec_encode_data_base(len, k, rows, g_tbls, data, coding);
-		return;
-	}
-
-	while (rows >= 4) {
-		gf_4vect_dot_prod_avx2(len, k, g_tbls, data, coding);
-		g_tbls += 4 * k * 32;
-		coding += 4;
-		rows -= 4;
-	}
-	switch (rows) {
-	case 3:
-		gf_3vect_dot_prod_avx2(len, k, g_tbls, data, coding);
-		break;
-	case 2:
-		gf_2vect_dot_prod_avx2(len, k, g_tbls, data, coding);
-		break;
-	case 1:
-		gf_vect_dot_prod_avx2(len, k, g_tbls, data, *coding);
-		break;
-	case 0:
-		break;
-	}
-
-}
-
-#endif //__WORDSIZE == 64 || _WIN64 || __x86_64__
-
-struct slver {
-	UINT16 snum;
-	UINT8 ver;
-	UINT8 core;
-};
-
-// Version info
-struct slver ec_init_tables_slver_00010068;
-struct slver ec_init_tables_slver = { 0x0068, 0x01, 0x00 };
-
-struct slver ec_encode_data_sse_slver_00020069;
-struct slver ec_encode_data_sse_slver = { 0x0069, 0x02, 0x00 };
diff --git a/src/erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s b/src/erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s
deleted file mode 100644
index b565509..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s
+++ /dev/null
@@ -1,266 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-%ifidn __OUTPUT_FORMAT__, elf64
-%define WRT_OPT		wrt ..plt
-%else
-%define WRT_OPT
-%endif
-
-%ifidn __OUTPUT_FORMAT__, elf32
-
-[bits 32]
-
-%define def_wrd		dd
-%define wrd_sz  	dword
-%define arg1		esi
-
-%else
-
-%include "reg_sizes.asm"
-default rel
-[bits 64]
-
-%define def_wrd 	dq
-%define wrd_sz  	qword
-%define arg1		rsi
-
-extern ec_encode_data_sse
-extern ec_encode_data_avx
-extern ec_encode_data_avx2
-extern gf_vect_mul_sse
-extern gf_vect_mul_avx
-extern gf_vect_dot_prod_sse
-extern gf_vect_dot_prod_avx
-extern gf_vect_dot_prod_avx2
-%endif
-
-extern gf_vect_mul_base
-extern ec_encode_data_base
-extern gf_vect_dot_prod_base
-
-section .data
-;;; *_mbinit are initial values for *_dispatched; is updated on first call.
-;;; Therefore, *_dispatch_init is only executed on first call.
-
-ec_encode_data_dispatched:
-	def_wrd      ec_encode_data_mbinit
-
-gf_vect_mul_dispatched:
-	def_wrd      gf_vect_mul_mbinit
-
-gf_vect_dot_prod_dispatched:
-	def_wrd      gf_vect_dot_prod_mbinit
-
-section .text
-;;;;
-; ec_encode_data multibinary function
-;;;;
-global ec_encode_data:function
-ec_encode_data_mbinit:
-	call	ec_encode_data_dispatch_init
-
-ec_encode_data:
-	jmp	wrd_sz [ec_encode_data_dispatched]
-
-ec_encode_data_dispatch_init:
-	push    arg1
-%ifidn __OUTPUT_FORMAT__, elf32		;; 32-bit check
-	lea     arg1, [ec_encode_data_base]
-%else
-	push    rax
-	push    rbx
-	push    rcx
-	push    rdx
-	lea     arg1, [ec_encode_data_base WRT_OPT] ; Default
-
-	mov     eax, 1
-	cpuid
-	lea     rbx, [ec_encode_data_sse WRT_OPT]
-	test    ecx, FLAG_CPUID1_ECX_SSE4_1
-	cmovne  arg1, rbx
-
-	and	ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
-	cmp	ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
-	lea	rbx, [ec_encode_data_avx WRT_OPT]
-
-	jne	_done_ec_encode_data_init
-	mov	rsi, rbx
-
-	;; Try for AVX2
-	xor	ecx, ecx
-	mov	eax, 7
-	cpuid
-	test	ebx, FLAG_CPUID1_EBX_AVX2
-	lea     rbx, [ec_encode_data_avx2 WRT_OPT]
-	cmovne	rsi, rbx
-
-	;; Does it have xmm and ymm support
-	xor	ecx, ecx
-	xgetbv
-	and	eax, FLAG_XGETBV_EAX_XMM_YMM
-	cmp	eax, FLAG_XGETBV_EAX_XMM_YMM
-	je	_done_ec_encode_data_init
-	lea     rsi, [ec_encode_data_sse WRT_OPT]
-
-_done_ec_encode_data_init:
-	pop     rdx
-	pop     rcx
-	pop     rbx
-	pop     rax
-%endif			;; END 32-bit check
-	mov     [ec_encode_data_dispatched], arg1
-	pop     arg1
-	ret
-
-;;;;
-; gf_vect_mul multibinary function
-;;;;
-global gf_vect_mul:function
-gf_vect_mul_mbinit:
-	call    gf_vect_mul_dispatch_init
-
-gf_vect_mul:
-	jmp	wrd_sz [gf_vect_mul_dispatched]
-
-gf_vect_mul_dispatch_init:
-	push    arg1
-%ifidn __OUTPUT_FORMAT__, elf32		;; 32-bit check
-	lea     arg1, [gf_vect_mul_base]
-%else
-	push    rax
-	push    rbx
-	push    rcx
-	push    rdx
-	lea     arg1, [gf_vect_mul_base WRT_OPT] ; Default
-
-	mov     eax, 1
-	cpuid
-	test    ecx, FLAG_CPUID1_ECX_SSE4_2
-	lea     rbx, [gf_vect_mul_sse WRT_OPT]
-	je	_done_gf_vect_mul_dispatch_init
-	mov  	arg1, rbx
-
-	;; Try for AVX
-	and     ecx, (FLAG_CPUID1_ECX_OSXSAVE | FLAG_CPUID1_ECX_AVX)
-	cmp     ecx, (FLAG_CPUID1_ECX_OSXSAVE | FLAG_CPUID1_ECX_AVX)
-	jne     _done_gf_vect_mul_dispatch_init
-
-	;; Does it have xmm and ymm support
-	xor     ecx, ecx
-	xgetbv
-	and     eax, FLAG_XGETBV_EAX_XMM_YMM
-	cmp     eax, FLAG_XGETBV_EAX_XMM_YMM
-	jne     _done_gf_vect_mul_dispatch_init
-	lea     arg1, [gf_vect_mul_avx WRT_OPT]
-
-_done_gf_vect_mul_dispatch_init:
-	pop     rdx
-	pop     rcx
-	pop     rbx
-	pop     rax
-%endif			;; END 32-bit check
-	mov     [gf_vect_mul_dispatched], arg1
-	pop     arg1
-	ret
-
-
-;;;;
-; gf_vect_dot_prod multibinary function
-;;;;
-global gf_vect_dot_prod:function
-gf_vect_dot_prod_mbinit:
-	call    gf_vect_dot_prod_dispatch_init
-
-gf_vect_dot_prod:
-	jmp     wrd_sz [gf_vect_dot_prod_dispatched]
-
-gf_vect_dot_prod_dispatch_init:
-	push    arg1
-%ifidn __OUTPUT_FORMAT__, elf32         ;; 32-bit check
-	lea     arg1, [gf_vect_dot_prod_base]
-%else
-	push	rax
-	push	rbx
-	push	rcx
-	push	rdx
-	lea     arg1, [gf_vect_dot_prod_base WRT_OPT] ; Default
-
-	mov     eax, 1
-	cpuid
-	lea     rbx, [gf_vect_dot_prod_sse WRT_OPT]
-	test    ecx, FLAG_CPUID1_ECX_SSE4_1
-	cmovne  arg1, rbx
-
-	and	ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
-	cmp	ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
-	lea     rbx, [gf_vect_dot_prod_avx WRT_OPT]
-
-	jne     _done_gf_vect_dot_prod_init
-	mov	rsi, rbx
-
-	;; Try for AVX2
-	xor	ecx, ecx
-	mov	eax, 7
-	cpuid
-	test	ebx, FLAG_CPUID1_EBX_AVX2
-	lea     rbx, [gf_vect_dot_prod_avx2 WRT_OPT]
-	cmovne	rsi, rbx
-
-	;; Does it have xmm and ymm support
-	xor	ecx, ecx
-	xgetbv
-	and	eax, FLAG_XGETBV_EAX_XMM_YMM
-	cmp	eax, FLAG_XGETBV_EAX_XMM_YMM
-	je	_done_gf_vect_dot_prod_init
-	lea     rsi, [gf_vect_dot_prod_sse WRT_OPT]
-
-_done_gf_vect_dot_prod_init:
-	pop     rdx
-	pop     rcx
-	pop     rbx
-	pop     rax
-%endif			;; END 32-bit check
-	mov     [gf_vect_dot_prod_dispatched], arg1
-	pop	arg1
-	ret
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-
-;;;       func                  core, ver, snum
-slversion ec_encode_data,	00,   02,  0133
-slversion gf_vect_mul,		00,   02,  0134
-slversion gf_vect_dot_prod,	00,   01,  0138
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s
deleted file mode 100644
index 7f8b34b..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s
+++ /dev/null
@@ -1,234 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_2vect_dot_prod_avx(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r9
- %define tmp4  r12		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  3*16 + 3*8 	; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_reg	r12,  3*16 + 0*8
-	save_reg	r13,  3*16 + 1*8
-	save_reg	r14,  3*16 + 2*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	mov	r12,  [rsp + 3*16 + 0*8]
-	mov	r13,  [rsp + 3*16 + 1*8]
-	mov	r14,  [rsp + 3*16 + 2*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest1 arg4
-
-%define vec_i tmp2
-%define ptr   tmp3
-%define dest2 tmp4
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm8
-%define xgft1_lo  xmm7
-%define xgft1_hi  xmm6
-%define xgft2_lo  xmm5
-%define xgft2_hi  xmm4
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-
-align 16
-global gf_2vect_dot_prod_avx:function
-
-func(gf_2vect_dot_prod_avx)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest1, [dest1]
-
-.loop16
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect
-	mov	ptr, [src+vec_i]
-
-	vmovdqu	xgft1_lo, [tmp]		;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	vmovdqu	xgft1_hi, [tmp+16]	;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	vmovdqu	xgft2_hi, [tmp+vec*(32/PS)+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, PS
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_2vect_dot_prod_avx, 02,  03,  0191
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s
deleted file mode 100644
index ce9275f..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s
+++ /dev/null
@@ -1,246 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_2vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp.w r11d
- %define tmp.b r11b
- %define tmp2  r10
- %define tmp3  r9
- %define tmp4  r12		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define tmp    r11
- %define tmp.w  r11d
- %define tmp.b  r11b
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  3*16 + 3*8 	; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	vmovdqa	[rsp + 0*16], xmm6
-	vmovdqa	[rsp + 1*16], xmm7
-	vmovdqa	[rsp + 2*16], xmm8
-	save_reg	r12,  3*16 + 0*8
-	save_reg	r13,  3*16 + 1*8
-	save_reg	r14,  3*16 + 2*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	mov	r12,  [rsp + 3*16 + 0*8]
-	mov	r13,  [rsp + 3*16 + 1*8]
-	mov	r14,  [rsp + 3*16 + 2*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest1 arg4
-
-%define vec_i tmp2
-%define ptr   tmp3
-%define dest2 tmp4
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   ymm8
-%define xmask0fx  xmm8
-%define xgft1_lo  ymm7
-%define xgft1_hi  ymm6
-%define xgft2_lo  ymm5
-%define xgft2_hi  ymm4
-
-%define x0     ymm0
-%define xtmpa  ymm1
-%define xp1    ymm2
-%define xp2    ymm3
-
-align 16
-global gf_2vect_dot_prod_avx2:function
-
-func(gf_2vect_dot_prod_avx2)
-	FUNC_SAVE
-	sub	len, 32
-	jl	.return_fail
-	xor	pos, pos
-	mov	tmp.b, 0x0f
-	vpinsrb	xmask0fx, xmask0fx, tmp.w, 0
-	vpbroadcastb xmask0f, xmask0fx	;Construct mask 0x0f0f0f...
-
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest1, [dest1]
-
-.loop32
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect
-	mov	ptr, [src+vec_i]
-
-	vmovdqu	xgft1_lo, [tmp]		;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-					;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x11 ; swapped to hi | hi
-	vperm2i128 xgft1_lo, xgft1_lo, xgft1_lo, 0x00 ; swapped to lo | lo
-
-	vmovdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-						;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x11 ; swapped to hi | hi
-	vperm2i128 xgft2_lo, xgft2_lo, xgft2_lo, 0x00 ; swapped to lo | lo
-
-
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, PS
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-
-	add	pos, 32			;Loop on 32 bytes at a time
-	cmp	pos, len
-	jle	.loop32
-
-	lea	tmp, [len + 32]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop32		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                   core, ver, snum
-slversion gf_2vect_dot_prod_avx2, 04,  03,  0196
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s
deleted file mode 100644
index 2520f9f..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s
+++ /dev/null
@@ -1,236 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_2vect_dot_prod_sse(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r9
- %define tmp4  r12		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  3*16 + 3*8 	; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_reg	r12,  3*16 + 0*8
-	save_reg	r13,  3*16 + 1*8
-	save_reg	r14,  3*16 + 2*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	movdqa	xmm6, [rsp + 0*16]
-	movdqa	xmm7, [rsp + 1*16]
-	movdqa	xmm8, [rsp + 2*16]
-	mov	r12,  [rsp + 3*16 + 0*8]
-	mov	r13,  [rsp + 3*16 + 1*8]
-	mov	r14,  [rsp + 3*16 + 2*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest1 arg4
-
-%define vec_i tmp2
-%define ptr   tmp3
-%define dest2 tmp4
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR movdqu
- %define XSTR movdqu
-%else
-
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR movdqa
-  %define XSTR movdqa
- %else
-  %define XLDR movntdqa
-  %define XSTR movntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm8
-%define xgft1_lo  xmm7
-%define xgft1_hi  xmm6
-%define xgft2_lo  xmm5
-%define xgft2_hi  xmm4
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-
-align 16
-global gf_2vect_dot_prod_sse:function
-
-func(gf_2vect_dot_prod_sse)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest1, [dest1]
-
-.loop16
-	pxor	xp1, xp1
-	pxor	xp2, xp2
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect
-	mov	ptr, [src+vec_i]
-
-	movdqu	xgft1_lo, [tmp]		;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	movdqu	xgft1_hi, [tmp+16]	;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	movdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	movdqu	xgft2_hi, [tmp+vec*(32/PS)+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, PS
-
-	movdqa	xtmpa, x0		;Keep unshifted copy of src
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	xtmpa, xmask0f		;Mask low src nibble in bits 4-0
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp1, xgft1_hi		;xp1 += partial
-
-	pshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	pxor	xp2, xgft2_hi		;xp2 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_2vect_dot_prod_sse, 00,  02,  0062
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s
deleted file mode 100644
index 3c82160..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s
+++ /dev/null
@@ -1,258 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_3vect_dot_prod_avx(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  6*16 + 5*8 	; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_reg	r12,  6*16 + 0*8
-	save_reg	r13,  6*16 + 1*8
-	save_reg	r14,  6*16 + 2*8
-	save_reg	r15,  6*16 + 3*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	mov	r12,  [rsp + 6*16 + 0*8]
-	mov	r13,  [rsp + 6*16 + 1*8]
-	mov	r14,  [rsp + 6*16 + 2*8]
-	mov	r15,  [rsp + 6*16 + 3*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest1 arg4
-%define ptr   arg5
-%define vec_i tmp2
-%define dest2 tmp3
-%define dest3 tmp4
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm11
-%define xgft1_lo  xmm10
-%define xgft1_hi  xmm9
-%define xgft2_lo  xmm8
-%define xgft2_hi  xmm7
-%define xgft3_lo  xmm6
-%define xgft3_hi  xmm5
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-
-align 16
-global gf_3vect_dot_prod_avx:function
-func(gf_3vect_dot_prod_avx)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest3, [dest1+2*PS]
-	mov	dest1, [dest1]
-
-
-.loop16:
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-
-	vmovdqu	xgft1_lo, [tmp]		;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	vmovdqu	xgft1_hi, [tmp+16]	;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	vmovdqu	xgft2_hi, [tmp+vec*(32/PS)+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vec*(64/PS)]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	vmovdqu	xgft3_hi, [tmp+vec*(64/PS)+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-
-	add	tmp, 32
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[dest3+pos], xp3
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_3vect_dot_prod_avx, 02,  03,  0192
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s
deleted file mode 100644
index bff6e75..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s
+++ /dev/null
@@ -1,271 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_3vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp.w r11d
- %define tmp.b r11b
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp.w  r11d
- %define tmp.b  r11b
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  6*16 + 5*8 	; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	vmovdqa	[rsp + 0*16], xmm6
-	vmovdqa	[rsp + 1*16], xmm7
-	vmovdqa	[rsp + 2*16], xmm8
-	vmovdqa	[rsp + 3*16], xmm9
-	vmovdqa	[rsp + 4*16], xmm10
-	vmovdqa	[rsp + 5*16], xmm11
-	save_reg	r12,  6*16 + 0*8
-	save_reg	r13,  6*16 + 1*8
-	save_reg	r14,  6*16 + 2*8
-	save_reg	r15,  6*16 + 3*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	mov	r12,  [rsp + 6*16 + 0*8]
-	mov	r13,  [rsp + 6*16 + 1*8]
-	mov	r14,  [rsp + 6*16 + 2*8]
-	mov	r15,  [rsp + 6*16 + 3*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest1 arg4
-%define ptr   arg5
-%define vec_i tmp2
-%define dest2 tmp3
-%define dest3 tmp4
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   ymm11
-%define xmask0fx  xmm11
-%define xgft1_lo  ymm10
-%define xgft1_hi  ymm9
-%define xgft2_lo  ymm8
-%define xgft2_hi  ymm7
-%define xgft3_lo  ymm6
-%define xgft3_hi  ymm5
-
-%define x0     ymm0
-%define xtmpa  ymm1
-%define xp1    ymm2
-%define xp2    ymm3
-%define xp3    ymm4
-
-align 16
-global gf_3vect_dot_prod_avx2:function
-func(gf_3vect_dot_prod_avx2)
-	FUNC_SAVE
-	sub	len, 32
-	jl	.return_fail
-	xor	pos, pos
-	mov	tmp.b, 0x0f
-	vpinsrb	xmask0fx, xmask0fx, tmp.w, 0
-	vpbroadcastb xmask0f, xmask0fx	;Construct mask 0x0f0f0f...
-
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest3, [dest1+2*PS]
-	mov	dest1, [dest1]
-
-
-.loop32:
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-
-	vmovdqu	xgft1_lo, [tmp]		;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-					;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x11 ; swapped to hi | hi
-	vperm2i128 xgft1_lo, xgft1_lo, xgft1_lo, 0x00 ; swapped to lo | lo
-
-	vmovdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-						;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x11 ; swapped to hi | hi
-	vperm2i128 xgft2_lo, xgft2_lo, xgft2_lo, 0x00 ; swapped to lo | lo
-
-	vmovdqu	xgft3_lo, [tmp+vec*(64/PS)]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-						;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x11 ; swapped to hi | hi
-	vperm2i128 xgft3_lo, xgft3_lo, xgft3_lo, 0x00 ; swapped to lo | lo
-
-	add	tmp, 32
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[dest3+pos], xp3
-
-	add	pos, 32			;Loop on 32 bytes at a time
-	cmp	pos, len
-	jle	.loop32
-
-	lea	tmp, [len + 32]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop32		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                   core, ver, snum
-slversion gf_3vect_dot_prod_avx2, 04,  03,  0197
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s
deleted file mode 100644
index 0436c11..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s
+++ /dev/null
@@ -1,259 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_3vect_dot_prod_sse(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  6*16 + 5*8 	; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_reg	r12,  6*16 + 0*8
-	save_reg	r13,  6*16 + 1*8
-	save_reg	r14,  6*16 + 2*8
-	save_reg	r15,  6*16 + 3*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	movdqa	xmm6, [rsp + 0*16]
-	movdqa	xmm7, [rsp + 1*16]
-	movdqa	xmm8, [rsp + 2*16]
-	movdqa	xmm9, [rsp + 3*16]
-	movdqa	xmm10, [rsp + 4*16]
-	movdqa	xmm11, [rsp + 5*16]
-	mov	r12,  [rsp + 6*16 + 0*8]
-	mov	r13,  [rsp + 6*16 + 1*8]
-	mov	r14,  [rsp + 6*16 + 2*8]
-	mov	r15,  [rsp + 6*16 + 3*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest1 arg4
-%define ptr   arg5
-%define vec_i tmp2
-%define dest2 tmp3
-%define dest3 tmp4
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR movdqu
- %define XSTR movdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR movdqa
-  %define XSTR movdqa
- %else
-  %define XLDR movntdqa
-  %define XSTR movntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm11
-%define xgft1_lo  xmm10
-%define xgft1_hi  xmm9
-%define xgft2_lo  xmm8
-%define xgft2_hi  xmm7
-%define xgft3_lo  xmm6
-%define xgft3_hi  xmm5
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-
-align 16
-global gf_3vect_dot_prod_sse:function
-func(gf_3vect_dot_prod_sse)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest3, [dest1+2*PS]
-	mov	dest1, [dest1]
-
-
-.loop16:
-	pxor	xp1, xp1
-	pxor	xp2, xp2
-	pxor	xp3, xp3
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-
-	movdqu	xgft1_lo, [tmp]		;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	movdqu	xgft1_hi, [tmp+16]	;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	movdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	movdqu	xgft2_hi, [tmp+vec*(32/PS)+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	movdqu	xgft3_lo, [tmp+vec*(64/PS)]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	movdqu	xgft3_hi, [tmp+vec*(64/PS)+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-
-	add	tmp, 32
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	movdqa	xtmpa, x0		;Keep unshifted copy of src
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	xtmpa, xmask0f		;Mask low src nibble in bits 4-0
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp1, xgft1_hi		;xp1 += partial
-
-	pshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	pxor	xp2, xgft2_hi		;xp2 += partial
-
-	pshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	pxor	xp3, xgft3_hi		;xp3 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[dest3+pos], xp3
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_3vect_dot_prod_sse, 00,  03,  0063
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s
deleted file mode 100644
index c621d32..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s
+++ /dev/null
@@ -1,296 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_4vect_dot_prod_avx(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  9*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_xmm128	xmm12, 6*16
-	save_xmm128	xmm13, 7*16
-	save_xmm128	xmm14, 8*16
-	save_reg	r12,  9*16 + 0*8
-	save_reg	r13,  9*16 + 1*8
-	save_reg	r14,  9*16 + 2*8
-	save_reg	r15,  9*16 + 3*8
-	save_reg	rdi,  9*16 + 4*8
-	save_reg	rsi,  9*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	vmovdqa	xmm12, [rsp + 6*16]
-	vmovdqa	xmm13, [rsp + 7*16]
-	vmovdqa	xmm14, [rsp + 8*16]
-	mov	r12,  [rsp + 9*16 + 0*8]
-	mov	r13,  [rsp + 9*16 + 1*8]
-	mov	r14,  [rsp + 9*16 + 2*8]
-	mov	r15,  [rsp + 9*16 + 3*8]
-	mov	rdi,  [rsp + 9*16 + 4*8]
-	mov	rsi,  [rsp + 9*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest1  arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest2  tmp3
-%define dest3  tmp4
-%define dest4  tmp5
-%define vskip3 tmp6
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm14
-%define xgft1_lo  xmm13
-%define xgft1_hi  xmm12
-%define xgft2_lo  xmm11
-%define xgft2_hi  xmm10
-%define xgft3_lo  xmm9
-%define xgft3_hi  xmm8
-%define xgft4_lo  xmm7
-%define xgft4_hi  xmm6
-
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-%define xp4    xmm5
-
-align 16
-global gf_4vect_dot_prod_avx:function
-func(gf_4vect_dot_prod_avx)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest3, [dest1+2*PS]
-	mov	dest4, [dest1+3*PS]
-	mov	dest1, [dest1]
-
-
-.loop16:
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	vpxor	xp4, xp4
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-
-	vmovdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	vmovdqu	xgft1_hi, [tmp+16]		;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	vmovdqu	xgft2_hi, [tmp+vec*(32/PS)+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vec*(64/PS)]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	vmovdqu	xgft3_hi, [tmp+vec*(64/PS)+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	vmovdqu	xgft4_lo, [tmp+vskip3]		;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	vmovdqu	xgft4_hi, [tmp+vskip3+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, PS
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-	vpshufb	xgft4_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft4_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft4_hi, xgft4_lo	;GF add high and low partials
-	vpxor	xp4, xgft4_hi		;xp4 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[dest3+pos], xp3
-	XSTR	[dest4+pos], xp4
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_4vect_dot_prod_avx, 00,  02,  0064
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s
deleted file mode 100644
index 3f29c76..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s
+++ /dev/null
@@ -1,305 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_4vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp.w r11d
- %define tmp.b r11b
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp.w  r11d
- %define tmp.b  r11b
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  9*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	vmovdqa	[rsp + 0*16], xmm6
-	vmovdqa	[rsp + 1*16], xmm7
-	vmovdqa	[rsp + 2*16], xmm8
-	vmovdqa	[rsp + 3*16], xmm9
-	vmovdqa	[rsp + 4*16], xmm10
-	vmovdqa	[rsp + 5*16], xmm11
-	vmovdqa	[rsp + 6*16], xmm12
-	vmovdqa	[rsp + 7*16], xmm13
-	vmovdqa	[rsp + 8*16], xmm14
-	save_reg	r12,  9*16 + 0*8
-	save_reg	r13,  9*16 + 1*8
-	save_reg	r14,  9*16 + 2*8
-	save_reg	r15,  9*16 + 3*8
-	save_reg	rdi,  9*16 + 4*8
-	save_reg	rsi,  9*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	vmovdqa	xmm12, [rsp + 6*16]
-	vmovdqa	xmm13, [rsp + 7*16]
-	vmovdqa	xmm14, [rsp + 8*16]
-	mov	r12,  [rsp + 9*16 + 0*8]
-	mov	r13,  [rsp + 9*16 + 1*8]
-	mov	r14,  [rsp + 9*16 + 2*8]
-	mov	r15,  [rsp + 9*16 + 3*8]
-	mov	rdi,  [rsp + 9*16 + 4*8]
-	mov	rsi,  [rsp + 9*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest1  arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest2  tmp3
-%define dest3  tmp4
-%define dest4  tmp5
-%define vskip3 tmp6
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   ymm14
-%define xmask0fx  xmm14
-%define xgft1_lo  ymm13
-%define xgft1_hi  ymm12
-%define xgft2_lo  ymm11
-%define xgft2_hi  ymm10
-%define xgft3_lo  ymm9
-%define xgft3_hi  ymm8
-%define xgft4_lo  ymm7
-%define xgft4_hi  ymm6
-
-
-%define x0     ymm0
-%define xtmpa  ymm1
-%define xp1    ymm2
-%define xp2    ymm3
-%define xp3    ymm4
-%define xp4    ymm5
-
-align 16
-global gf_4vect_dot_prod_avx2:function
-func(gf_4vect_dot_prod_avx2)
-	FUNC_SAVE
-	sub	len, 32
-	jl	.return_fail
-	xor	pos, pos
-	mov	tmp.b, 0x0f
-	vpinsrb	xmask0fx, xmask0fx, tmp.w, 0
-	vpbroadcastb xmask0f, xmask0fx	;Construct mask 0x0f0f0f...
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest3, [dest1+2*PS]
-	mov	dest4, [dest1+3*PS]
-	mov	dest1, [dest1]
-
-
-.loop32:
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	vpxor	xp4, xp4
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	vec_i, PS
-
-	vpand	xgft4_lo, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-	vperm2i128 xtmpa, xgft4_lo, x0, 0x30 	;swap xtmpa from 1lo|2lo to 1lo|2hi
-	vperm2i128 x0, xgft4_lo, x0, 0x12	;swap x0 from    1hi|2hi to 1hi|2lo
-
-	vmovdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-						;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-						;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vec*(64/PS)]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-						;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	vmovdqu	xgft4_lo, [tmp+vskip3]		;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-						;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft4_hi, xgft4_lo, xgft4_lo, 0x01 ; swapped to hi | lo
-	add	tmp, 32
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-	vpshufb	xgft4_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft4_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft4_hi, xgft4_lo	;GF add high and low partials
-	vpxor	xp4, xgft4_hi		;xp4 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[dest3+pos], xp3
-	XSTR	[dest4+pos], xp4
-
-	add	pos, 32			;Loop on 32 bytes at a time
-	cmp	pos, len
-	jle	.loop32
-
-	lea	tmp, [len + 32]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-32
-	jmp	.loop32		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                   core, ver, snum
-slversion gf_4vect_dot_prod_avx2, 04,  03,  0064
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s
deleted file mode 100644
index 3626e42..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s
+++ /dev/null
@@ -1,296 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_4vect_dot_prod_sse(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  9*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_xmm128	xmm12, 6*16
-	save_xmm128	xmm13, 7*16
-	save_xmm128	xmm14, 8*16
-	save_reg	r12,  9*16 + 0*8
-	save_reg	r13,  9*16 + 1*8
-	save_reg	r14,  9*16 + 2*8
-	save_reg	r15,  9*16 + 3*8
-	save_reg	rdi,  9*16 + 4*8
-	save_reg	rsi,  9*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	movdqa	xmm6, [rsp + 0*16]
-	movdqa	xmm7, [rsp + 1*16]
-	movdqa	xmm8, [rsp + 2*16]
-	movdqa	xmm9, [rsp + 3*16]
-	movdqa	xmm10, [rsp + 4*16]
-	movdqa	xmm11, [rsp + 5*16]
-	movdqa	xmm12, [rsp + 6*16]
-	movdqa	xmm13, [rsp + 7*16]
-	movdqa	xmm14, [rsp + 8*16]
-	mov	r12,  [rsp + 9*16 + 0*8]
-	mov	r13,  [rsp + 9*16 + 1*8]
-	mov	r14,  [rsp + 9*16 + 2*8]
-	mov	r15,  [rsp + 9*16 + 3*8]
-	mov	rdi,  [rsp + 9*16 + 4*8]
-	mov	rsi,  [rsp + 9*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest1  arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest2  tmp3
-%define dest3  tmp4
-%define dest4  tmp5
-%define vskip3 tmp6
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR movdqu
- %define XSTR movdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR movdqa
-  %define XSTR movdqa
- %else
-  %define XLDR movntdqa
-  %define XSTR movntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm14
-%define xgft1_lo  xmm13
-%define xgft1_hi  xmm12
-%define xgft2_lo  xmm11
-%define xgft2_hi  xmm10
-%define xgft3_lo  xmm9
-%define xgft3_hi  xmm8
-%define xgft4_lo  xmm7
-%define xgft4_hi  xmm6
-
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-%define xp4    xmm5
-
-align 16
-global gf_4vect_dot_prod_sse:function
-func(gf_4vect_dot_prod_sse)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest2, [dest1+PS]
-	mov	dest3, [dest1+2*PS]
-	mov	dest4, [dest1+3*PS]
-	mov	dest1, [dest1]
-
-
-.loop16:
-	pxor	xp1, xp1
-	pxor	xp2, xp2
-	pxor	xp3, xp3
-	pxor	xp4, xp4
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-
-	movdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	movdqu	xgft1_hi, [tmp+16]		;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	movdqu	xgft2_lo, [tmp+vec*(32/PS)]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	movdqu	xgft2_hi, [tmp+vec*(32/PS)+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	movdqu	xgft3_lo, [tmp+vec*(64/PS)]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	movdqu	xgft3_hi, [tmp+vec*(64/PS)+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	movdqu	xgft4_lo, [tmp+vskip3]		;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	movdqu	xgft4_hi, [tmp+vskip3+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, PS
-
-	movdqa	xtmpa, x0		;Keep unshifted copy of src
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	xtmpa, xmask0f		;Mask low src nibble in bits 4-0
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp1, xgft1_hi		;xp1 += partial
-
-	pshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	pxor	xp2, xgft2_hi		;xp2 += partial
-
-	pshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	pxor	xp3, xgft3_hi		;xp3 += partial
-
-	pshufb	xgft4_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft4_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft4_hi, xgft4_lo	;GF add high and low partials
-	pxor	xp4, xgft4_hi		;xp4 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[dest3+pos], xp3
-	XSTR	[dest4+pos], xp4
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_4vect_dot_prod_sse, 00,  03,  0064
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s
deleted file mode 100644
index 8855a2f..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s
+++ /dev/null
@@ -1,311 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_5vect_dot_prod_avx(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  10*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_xmm128	xmm12, 6*16
-	save_xmm128	xmm13, 7*16
-	save_xmm128	xmm14, 8*16
-	save_xmm128	xmm15, 9*16
-	save_reg	r12,  10*16 + 0*8
-	save_reg	r13,  10*16 + 1*8
-	save_reg	r14,  10*16 + 2*8
-	save_reg	r15,  10*16 + 3*8
-	save_reg	rdi,  10*16 + 4*8
-	save_reg	rsi,  10*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	vmovdqa	xmm12, [rsp + 6*16]
-	vmovdqa	xmm13, [rsp + 7*16]
-	vmovdqa	xmm14, [rsp + 8*16]
-	vmovdqa	xmm15, [rsp + 9*16]
-	mov	r12,  [rsp + 10*16 + 0*8]
-	mov	r13,  [rsp + 10*16 + 1*8]
-	mov	r14,  [rsp + 10*16 + 2*8]
-	mov	r15,  [rsp + 10*16 + 3*8]
-	mov	rdi,  [rsp + 10*16 + 4*8]
-	mov	rsi,  [rsp + 10*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest   arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest1  tmp3
-%define dest2  tmp4
-%define vskip1 tmp5
-%define vskip3 tmp6
-%define pos    return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm15
-%define xgft1_lo  xmm14
-%define xgft1_hi  xmm13
-%define xgft2_lo  xmm12
-%define xgft2_hi  xmm11
-%define xgft3_lo  xmm10
-%define xgft3_hi  xmm9
-%define xgft4_lo  xmm8
-%define xgft4_hi  xmm7
-
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-%define xp4    xmm5
-%define xp5    xmm6
-
-align 16
-global gf_5vect_dot_prod_avx:function
-func(gf_5vect_dot_prod_avx)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	mov	vskip1, vec
-	imul	vskip1, 32
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest1, [dest]
-	mov	dest2, [dest+PS]
-
-
-.loop16:
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	vpxor	xp4, xp4
-	vpxor	xp5, xp5
-
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	vmovdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	vmovdqu	xgft1_hi, [tmp+16]		;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vskip1*1]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	vmovdqu	xgft2_hi, [tmp+vskip1*1+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vskip1*2]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	vmovdqu	xgft3_hi, [tmp+vskip1*2+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	vmovdqu	xgft4_lo, [tmp+vskip3]		;Load array Dx{00}, Dx{01}, ..., Dx{0f}
-	vmovdqu	xgft4_hi, [tmp+vskip3+16]	;     "     Dx{00}, Dx{10}, ..., Dx{f0}
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vmovdqu	xgft1_lo, [tmp+vskip1*4]	;Load array Ex{00}, Ex{01}, ..., Ex{0f}
-	vmovdqu	xgft1_hi, [tmp+vskip1*4+16]	;     "     Ex{00}, Ex{10}, ..., Ex{f0}
-	add	tmp, 32
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-	vpshufb	xgft4_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft4_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft4_hi, xgft4_lo	;GF add high and low partials
-	vpxor	xp4, xgft4_hi		;xp4 += partial
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp5, xgft1_hi		;xp5 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	mov	tmp, [dest+2*PS]
-	mov	ptr, [dest+3*PS]
-	mov	vec_i, [dest+4*PS]
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[tmp+pos], xp3
-	XSTR	[ptr+pos], xp4
-	XSTR	[vec_i+pos], xp5
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	FUNC_RESTORE
-	mov	return, 0
-	ret
-
-.return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_5vect_dot_prod_avx, 02,  03,  0194
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s
deleted file mode 100644
index e932053..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s
+++ /dev/null
@@ -1,323 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_5vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp.w r11d
- %define tmp.b r11b
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp.w  r11d
- %define tmp.b  r11b
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  10*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	vmovdqa	[rsp + 0*16], xmm6
-	vmovdqa	[rsp + 1*16], xmm7
-	vmovdqa	[rsp + 2*16], xmm8
-	vmovdqa	[rsp + 3*16], xmm9
-	vmovdqa	[rsp + 4*16], xmm10
-	vmovdqa	[rsp + 5*16], xmm11
-	vmovdqa	[rsp + 6*16], xmm12
-	vmovdqa	[rsp + 7*16], xmm13
-	vmovdqa	[rsp + 8*16], xmm14
-	vmovdqa	[rsp + 9*16], xmm15
-	save_reg	r12,  10*16 + 0*8
-	save_reg	r13,  10*16 + 1*8
-	save_reg	r14,  10*16 + 2*8
-	save_reg	r15,  10*16 + 3*8
-	save_reg	rdi,  10*16 + 4*8
-	save_reg	rsi,  10*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	vmovdqa	xmm12, [rsp + 6*16]
-	vmovdqa	xmm13, [rsp + 7*16]
-	vmovdqa	xmm14, [rsp + 8*16]
-	vmovdqa	xmm15, [rsp + 9*16]
-	mov	r12,  [rsp + 10*16 + 0*8]
-	mov	r13,  [rsp + 10*16 + 1*8]
-	mov	r14,  [rsp + 10*16 + 2*8]
-	mov	r15,  [rsp + 10*16 + 3*8]
-	mov	rdi,  [rsp + 10*16 + 4*8]
-	mov	rsi,  [rsp + 10*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest   arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest1  tmp3
-%define dest2  tmp4
-%define vskip1 tmp5
-%define vskip3 tmp6
-%define pos    return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   ymm15
-%define xmask0fx  xmm15
-%define xgft1_lo  ymm14
-%define xgft1_hi  ymm13
-%define xgft2_lo  ymm12
-%define xgft2_hi  ymm11
-%define xgft3_lo  ymm10
-%define xgft3_hi  ymm9
-%define xgft4_lo  ymm8
-%define xgft4_hi  ymm7
-
-
-%define x0     ymm0
-%define xtmpa  ymm1
-%define xp1    ymm2
-%define xp2    ymm3
-%define xp3    ymm4
-%define xp4    ymm5
-%define xp5    ymm6
-
-align 16
-global gf_5vect_dot_prod_avx2:function
-func(gf_5vect_dot_prod_avx2)
-	FUNC_SAVE
-	sub	len, 32
-	jl	.return_fail
-	xor	pos, pos
-	mov	tmp.b, 0x0f
-	vpinsrb	xmask0fx, xmask0fx, tmp.w, 0
-	vpbroadcastb xmask0f, xmask0fx	;Construct mask 0x0f0f0f...
-	mov	vskip1, vec
-	imul	vskip1, 32
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest1, [dest]
-	mov	dest2, [dest+PS]
-
-
-.loop32:
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	vpxor	xp4, xp4
-	vpxor	xp5, xp5
-
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	vec_i, PS
-
-	vpand	xgft4_lo, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-	vperm2i128 xtmpa, xgft4_lo, x0, 0x30 	;swap xtmpa from 1lo|2lo to 1lo|2hi
-	vperm2i128 x0, xgft4_lo, x0, 0x12	;swap x0 from    1hi|2hi to 1hi|2lo
-
-	vmovdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-						;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vskip1*1]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-						;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vskip1*2]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-						;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	vmovdqu	xgft4_lo, [tmp+vskip3]		;Load array Dx{00}, Dx{01}, ..., Dx{0f}
-						;     "     Dx{00}, Dx{10}, ..., Dx{f0}
-
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft4_hi, xgft4_lo, xgft4_lo, 0x01 ; swapped to hi | lo
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vmovdqu	xgft1_lo, [tmp+vskip1*4]	;Load array Ex{00}, Ex{01}, ..., Ex{0f}
-						;     "     Ex{00}, Ex{10}, ..., Ex{f0}
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x01 ; swapped to hi | lo
-	add	tmp, 32
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-	vpshufb	xgft4_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft4_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft4_hi, xgft4_lo	;GF add high and low partials
-	vpxor	xp4, xgft4_hi		;xp4 += partial
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp5, xgft1_hi		;xp5 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	mov	tmp, [dest+2*PS]
-	mov	ptr, [dest+3*PS]
-	mov	vec_i, [dest+4*PS]
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[tmp+pos], xp3
-	XSTR	[ptr+pos], xp4
-	XSTR	[vec_i+pos], xp5
-
-	add	pos, 32			;Loop on 32 bytes at a time
-	cmp	pos, len
-	jle	.loop32
-
-	lea	tmp, [len + 32]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop32		;Do one more overlap pass
-
-.return_pass:
-	FUNC_RESTORE
-	mov	return, 0
-	ret
-
-.return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_5vect_dot_prod_avx2, 04,  03,  0199
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s
deleted file mode 100644
index b33bab0..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s
+++ /dev/null
@@ -1,312 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_5vect_dot_prod_sse(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  10*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_xmm128	xmm12, 6*16
-	save_xmm128	xmm13, 7*16
-	save_xmm128	xmm14, 8*16
-	save_xmm128	xmm15, 9*16
-	save_reg	r12,  10*16 + 0*8
-	save_reg	r13,  10*16 + 1*8
-	save_reg	r14,  10*16 + 2*8
-	save_reg	r15,  10*16 + 3*8
-	save_reg	rdi,  10*16 + 4*8
-	save_reg	rsi,  10*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	movdqa	xmm6, [rsp + 0*16]
-	movdqa	xmm7, [rsp + 1*16]
-	movdqa	xmm8, [rsp + 2*16]
-	movdqa	xmm9, [rsp + 3*16]
-	movdqa	xmm10, [rsp + 4*16]
-	movdqa	xmm11, [rsp + 5*16]
-	movdqa	xmm12, [rsp + 6*16]
-	movdqa	xmm13, [rsp + 7*16]
-	movdqa	xmm14, [rsp + 8*16]
-	movdqa	xmm15, [rsp + 9*16]
-	mov	r12,  [rsp + 10*16 + 0*8]
-	mov	r13,  [rsp + 10*16 + 1*8]
-	mov	r14,  [rsp + 10*16 + 2*8]
-	mov	r15,  [rsp + 10*16 + 3*8]
-	mov	rdi,  [rsp + 10*16 + 4*8]
-	mov	rsi,  [rsp + 10*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest   arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest1  tmp3
-%define dest2  tmp4
-%define vskip1 tmp5
-%define vskip3 tmp6
-%define pos    return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR movdqu
- %define XSTR movdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR movdqa
-  %define XSTR movdqa
- %else
-  %define XLDR movntdqa
-  %define XSTR movntdq
- %endif
-%endif
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm15
-%define xgft1_lo  xmm14
-%define xgft1_hi  xmm13
-%define xgft2_lo  xmm12
-%define xgft2_hi  xmm11
-%define xgft3_lo  xmm10
-%define xgft3_hi  xmm9
-%define xgft4_lo  xmm8
-%define xgft4_hi  xmm7
-
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-%define xp4    xmm5
-%define xp5    xmm6
-
-align 16
-global gf_5vect_dot_prod_sse:function
-func(gf_5vect_dot_prod_sse)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	mov	vskip1, vec
-	imul	vskip1, 32
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest1, [dest]
-	mov	dest2, [dest+PS]
-
-
-.loop16:
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-	pxor	xp1, xp1
-	pxor	xp2, xp2
-	pxor	xp3, xp3
-	pxor	xp4, xp4
-	pxor	xp5, xp5
-
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	movdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	movdqu	xgft1_hi, [tmp+16]		;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	movdqu	xgft2_lo, [tmp+vskip1*1]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	movdqu	xgft2_hi, [tmp+vskip1*1+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	movdqu	xgft3_lo, [tmp+vskip1*2]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	movdqu	xgft3_hi, [tmp+vskip1*2+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	movdqu	xgft4_lo, [tmp+vskip3]		;Load array Dx{00}, Dx{01}, ..., Dx{0f}
-	movdqu	xgft4_hi, [tmp+vskip3+16]	;     "     Dx{00}, Dx{10}, ..., Dx{f0}
-
-	movdqa	xtmpa, x0		;Keep unshifted copy of src
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	xtmpa, xmask0f		;Mask low src nibble in bits 4-0
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp1, xgft1_hi		;xp1 += partial
-
-	pshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	pxor	xp2, xgft2_hi		;xp2 += partial
-
-	movdqu	xgft1_lo, [tmp+vskip1*4]	;Load array Ex{00}, Ex{01}, ..., Ex{0f}
-	movdqu	xgft1_hi, [tmp+vskip1*4+16]	;     "     Ex{00}, Ex{10}, ..., Ex{f0}
-	add	tmp, 32
-
-	pshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	pxor	xp3, xgft3_hi		;xp3 += partial
-
-	pshufb	xgft4_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft4_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft4_hi, xgft4_lo	;GF add high and low partials
-	pxor	xp4, xgft4_hi		;xp4 += partial
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp5, xgft1_hi		;xp5 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	mov	tmp, [dest+2*PS]
-	mov	ptr, [dest+3*PS]
-	mov	vec_i, [dest+4*PS]
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[tmp+pos], xp3
-	XSTR	[ptr+pos], xp4
-	XSTR	[vec_i+pos], xp5
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	FUNC_RESTORE
-	mov	return, 0
-	ret
-
-.return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_5vect_dot_prod_sse, 00,  03,  0065
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s
deleted file mode 100644
index 4e03e8e..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s
+++ /dev/null
@@ -1,323 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_6vect_dot_prod_avx(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  10*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_xmm128	xmm12, 6*16
-	save_xmm128	xmm13, 7*16
-	save_xmm128	xmm14, 8*16
-	save_xmm128	xmm15, 9*16
-	save_reg	r12,  10*16 + 0*8
-	save_reg	r13,  10*16 + 1*8
-	save_reg	r14,  10*16 + 2*8
-	save_reg	r15,  10*16 + 3*8
-	save_reg	rdi,  10*16 + 4*8
-	save_reg	rsi,  10*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	vmovdqa	xmm12, [rsp + 6*16]
-	vmovdqa	xmm13, [rsp + 7*16]
-	vmovdqa	xmm14, [rsp + 8*16]
-	vmovdqa	xmm15, [rsp + 9*16]
-	mov	r12,  [rsp + 10*16 + 0*8]
-	mov	r13,  [rsp + 10*16 + 1*8]
-	mov	r14,  [rsp + 10*16 + 2*8]
-	mov	r15,  [rsp + 10*16 + 3*8]
-	mov	rdi,  [rsp + 10*16 + 4*8]
-	mov	rsi,  [rsp + 10*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest   arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest1  tmp3
-%define dest2  tmp4
-%define vskip1 tmp5
-%define vskip3 tmp6
-%define pos    return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm15
-%define xgft1_lo  xmm14
-%define xgft1_hi  xmm13
-%define xgft2_lo  xmm12
-%define xgft2_hi  xmm11
-%define xgft3_lo  xmm10
-%define xgft3_hi  xmm9
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-%define xp4    xmm5
-%define xp5    xmm6
-%define xp6    xmm7
-
-align 16
-global gf_6vect_dot_prod_avx:function
-func(gf_6vect_dot_prod_avx)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	mov	vskip1, vec
-	imul	vskip1, 32
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest1, [dest]
-	mov	dest2, [dest+PS]
-
-
-.loop16:
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	vpxor	xp4, xp4
-	vpxor	xp5, xp5
-	vpxor	xp6, xp6
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	vmovdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	vmovdqu	xgft1_hi, [tmp+16]		;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vskip1*1]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	vmovdqu	xgft2_hi, [tmp+vskip1*1+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vskip1*2]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	vmovdqu	xgft3_hi, [tmp+vskip1*2+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	lea	ptr, [vskip1 + vskip1*4]	;ptr = vskip5
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-
-	vmovdqu	xgft1_lo, [tmp+vskip3]		;Load array Dx{00}, Dx{01}, ..., Dx{0f}
-	vmovdqu	xgft1_hi, [tmp+vskip3+16]	;     "     Dx{00}, Dx{10}, ..., Dx{f0}
-	vmovdqu	xgft2_lo, [tmp+vskip1*4]	;Load array Ex{00}, Ex{01}, ..., Ex{0f}
-	vmovdqu	xgft2_hi, [tmp+vskip1*4+16]	;     "     Ex{00}, Ex{10}, ..., Ex{f0}
-	vmovdqu	xgft3_lo, [tmp+ptr]		;Load array Fx{00}, Fx{01}, ..., Fx{0f}
-	vmovdqu	xgft3_hi, [tmp+ptr+16]		;     "     Fx{00}, Fx{10}, ..., Fx{f0}
-	add	tmp, 32
-
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp4, xgft1_hi		;xp4 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp5, xgft2_hi		;xp5 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp6, xgft3_hi		;xp6 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-
-	mov	tmp, [dest+2*PS]
-	mov	ptr, [dest+3*PS]
-	mov	vec_i, [dest+4*PS]
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[tmp+pos], xp3
-	mov	tmp, [dest+5*PS]
-	XSTR	[ptr+pos], xp4
-	XSTR	[vec_i+pos], xp5
-	XSTR	[tmp+pos], xp6
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	FUNC_RESTORE
-	mov	return, 0
-	ret
-
-.return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_6vect_dot_prod_avx, 02,  03,  0195
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s
deleted file mode 100644
index 7826fb2..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s
+++ /dev/null
@@ -1,334 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_6vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp.w r11d
- %define tmp.b r11b
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp.w  r11d
- %define tmp.b  r11b
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  10*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	vmovdqa	[rsp + 0*16], xmm6
-	vmovdqa	[rsp + 1*16], xmm7
-	vmovdqa	[rsp + 2*16], xmm8
-	vmovdqa	[rsp + 3*16], xmm9
-	vmovdqa	[rsp + 4*16], xmm10
-	vmovdqa	[rsp + 5*16], xmm11
-	vmovdqa	[rsp + 6*16], xmm12
-	vmovdqa	[rsp + 7*16], xmm13
-	vmovdqa	[rsp + 8*16], xmm14
-	vmovdqa	[rsp + 9*16], xmm15
-	save_reg	r12,  10*16 + 0*8
-	save_reg	r13,  10*16 + 1*8
-	save_reg	r14,  10*16 + 2*8
-	save_reg	r15,  10*16 + 3*8
-	save_reg	rdi,  10*16 + 4*8
-	save_reg	rsi,  10*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm8, [rsp + 2*16]
-	vmovdqa	xmm9, [rsp + 3*16]
-	vmovdqa	xmm10, [rsp + 4*16]
-	vmovdqa	xmm11, [rsp + 5*16]
-	vmovdqa	xmm12, [rsp + 6*16]
-	vmovdqa	xmm13, [rsp + 7*16]
-	vmovdqa	xmm14, [rsp + 8*16]
-	vmovdqa	xmm15, [rsp + 9*16]
-	mov	r12,  [rsp + 10*16 + 0*8]
-	mov	r13,  [rsp + 10*16 + 1*8]
-	mov	r14,  [rsp + 10*16 + 2*8]
-	mov	r15,  [rsp + 10*16 + 3*8]
-	mov	rdi,  [rsp + 10*16 + 4*8]
-	mov	rsi,  [rsp + 10*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest   arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest1  tmp3
-%define dest2  tmp4
-%define vskip1 tmp5
-%define vskip3 tmp6
-%define pos    return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   ymm15
-%define xmask0fx  xmm15
-%define xgft1_lo  ymm14
-%define xgft1_hi  ymm13
-%define xgft2_lo  ymm12
-%define xgft2_hi  ymm11
-%define xgft3_lo  ymm10
-%define xgft3_hi  ymm9
-%define x0     ymm0
-%define xtmpa  ymm1
-%define xp1    ymm2
-%define xp2    ymm3
-%define xp3    ymm4
-%define xp4    ymm5
-%define xp5    ymm6
-%define xp6    ymm7
-
-align 16
-global gf_6vect_dot_prod_avx2:function
-func(gf_6vect_dot_prod_avx2)
-	FUNC_SAVE
-	sub	len, 32
-	jl	.return_fail
-	xor	pos, pos
-	mov	tmp.b, 0x0f
-	vpinsrb	xmask0fx, xmask0fx, tmp.w, 0
-	vpbroadcastb xmask0f, xmask0fx	;Construct mask 0x0f0f0f...
-	mov	vskip1, vec
-	imul	vskip1, 32
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest1, [dest]
-	mov	dest2, [dest+PS]
-
-
-.loop32:
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-	vpxor	xp1, xp1
-	vpxor	xp2, xp2
-	vpxor	xp3, xp3
-	vpxor	xp4, xp4
-	vpxor	xp5, xp5
-	vpxor	xp6, xp6
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	vec_i, PS
-
-	vpand	xgft3_lo, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-	vperm2i128 xtmpa, xgft3_lo, x0, 0x30 	;swap xtmpa from 1lo|2lo to 1lo|2hi
-	vperm2i128 x0, xgft3_lo, x0, 0x12	;swap x0 from    1hi|2hi to 1hi|2lo
-
-	vmovdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-						;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	vmovdqu	xgft2_lo, [tmp+vskip1*1]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-						;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	vmovdqu	xgft3_lo, [tmp+vskip1*2]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-						;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	lea	ptr, [vskip1 + vskip1*4]	;ptr = vskip5
-
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x01 ; swapped to hi | lo
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp1, xgft1_hi		;xp1 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp2, xgft2_hi		;xp2 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp3, xgft3_hi		;xp3 += partial
-
-
-	vmovdqu	xgft1_lo, [tmp+vskip3]		;Load array Dx{00}, Dx{01}, ..., Dx{0f}
-						;     "     Dx{00}, Dx{10}, ..., Dx{f0}
-	vmovdqu	xgft2_lo, [tmp+vskip1*4]	;Load array Ex{00}, Ex{01}, ..., Ex{0f}
-						;     "     Ex{00}, Ex{10}, ..., Ex{f0}
-	vmovdqu	xgft3_lo, [tmp+ptr]		;Load array Fx{00}, Fx{01}, ..., Fx{0f}
-						;     "     Fx{00}, Fx{10}, ..., Fx{f0}
-	add	tmp, 32
-	vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x01 ; swapped to hi | lo
-	vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x01 ; swapped to hi | lo
-
-	vpshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	vpxor	xp4, xgft1_hi		;xp4 += partial
-
-	vpshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	vpxor	xp5, xgft2_hi		;xp5 += partial
-
-	vpshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	vpshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	vpxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	vpxor	xp6, xgft3_hi		;xp6 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-
-	mov	tmp, [dest+2*PS]
-	mov	ptr, [dest+3*PS]
-	mov	vec_i, [dest+4*PS]
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[tmp+pos], xp3
-	mov	tmp, [dest+5*PS]
-	XSTR	[ptr+pos], xp4
-	XSTR	[vec_i+pos], xp5
-	XSTR	[tmp+pos], xp6
-
-	add	pos, 32			;Loop on 32 bytes at a time
-	cmp	pos, len
-	jle	.loop32
-
-	lea	tmp, [len + 32]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop32		;Do one more overlap pass
-
-.return_pass:
-	FUNC_RESTORE
-	mov	return, 0
-	ret
-
-.return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                   core, ver, snum
-slversion gf_6vect_dot_prod_avx2, 04,  03,  019a
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s
deleted file mode 100644
index 23ef3d9..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s
+++ /dev/null
@@ -1,323 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_6vect_dot_prod_sse(len, vec, *g_tbls, **buffs, **dests);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r13		; must be saved and restored
- %define tmp4  r12		; must be saved and restored
- %define tmp5  r14		; must be saved and restored
- %define tmp6  r15		; must be saved and restored
- %define return rax
- %define PS 8
- %define LOG_PS 3
-
- %define func(x) x:
- %macro FUNC_SAVE 0
-	push	r12
-	push	r13
-	push	r14
-	push	r15
- %endmacro
- %macro FUNC_RESTORE 0
-	pop	r15
-	pop	r14
-	pop	r13
-	pop	r12
- %endmacro
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved, loaded and restored
- %define arg5   r15 		; must be saved and restored
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   r13		; must be saved and restored
- %define tmp4   r14		; must be saved and restored
- %define tmp5   rdi		; must be saved and restored
- %define tmp6   rsi		; must be saved and restored
- %define return rax
- %define PS     8
- %define LOG_PS 3
- %define stack_size  10*16 + 7*8		; must be an odd multiple of 8
- %define arg(x)      [rsp + stack_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm8, 2*16
-	save_xmm128	xmm9, 3*16
-	save_xmm128	xmm10, 4*16
-	save_xmm128	xmm11, 5*16
-	save_xmm128	xmm12, 6*16
-	save_xmm128	xmm13, 7*16
-	save_xmm128	xmm14, 8*16
-	save_xmm128	xmm15, 9*16
-	save_reg	r12,  10*16 + 0*8
-	save_reg	r13,  10*16 + 1*8
-	save_reg	r14,  10*16 + 2*8
-	save_reg	r15,  10*16 + 3*8
-	save_reg	rdi,  10*16 + 4*8
-	save_reg	rsi,  10*16 + 5*8
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	movdqa	xmm6, [rsp + 0*16]
-	movdqa	xmm7, [rsp + 1*16]
-	movdqa	xmm8, [rsp + 2*16]
-	movdqa	xmm9, [rsp + 3*16]
-	movdqa	xmm10, [rsp + 4*16]
-	movdqa	xmm11, [rsp + 5*16]
-	movdqa	xmm12, [rsp + 6*16]
-	movdqa	xmm13, [rsp + 7*16]
-	movdqa	xmm14, [rsp + 8*16]
-	movdqa	xmm15, [rsp + 9*16]
-	mov	r12,  [rsp + 10*16 + 0*8]
-	mov	r13,  [rsp + 10*16 + 1*8]
-	mov	r14,  [rsp + 10*16 + 2*8]
-	mov	r15,  [rsp + 10*16 + 3*8]
-	mov	rdi,  [rsp + 10*16 + 4*8]
-	mov	rsi,  [rsp + 10*16 + 5*8]
-	add	rsp, stack_size
- %endmacro
-%endif
-
-%define len    arg0
-%define vec    arg1
-%define mul_array arg2
-%define	src    arg3
-%define dest   arg4
-%define ptr    arg5
-%define vec_i  tmp2
-%define dest1  tmp3
-%define dest2  tmp4
-%define vskip1 tmp5
-%define vskip3 tmp6
-%define pos    return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR movdqu
- %define XSTR movdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR movdqa
-  %define XSTR movdqa
- %else
-  %define XLDR movntdqa
-  %define XSTR movntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f   xmm15
-%define xgft1_lo  xmm14
-%define xgft1_hi  xmm13
-%define xgft2_lo  xmm12
-%define xgft2_hi  xmm11
-%define xgft3_lo  xmm10
-%define xgft3_hi  xmm9
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp1    xmm2
-%define xp2    xmm3
-%define xp3    xmm4
-%define xp4    xmm5
-%define xp5    xmm6
-%define xp6    xmm7
-
-align 16
-global gf_6vect_dot_prod_sse:function
-func(gf_6vect_dot_prod_sse)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	mov	vskip1, vec
-	imul	vskip1, 32
-	mov	vskip3, vec
-	imul	vskip3, 96
-	sal	vec, LOG_PS		;vec *= PS. Make vec_i count by PS
-	mov	dest1, [dest]
-	mov	dest2, [dest+PS]
-
-
-.loop16:
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-	pxor	xp1, xp1
-	pxor	xp2, xp2
-	pxor	xp3, xp3
-	pxor	xp4, xp4
-	pxor	xp5, xp5
-	pxor	xp6, xp6
-
-.next_vect:
-	mov	ptr, [src+vec_i]
-	add	vec_i, PS
-	XLDR	x0, [ptr+pos]		;Get next source vector
-
-	movdqu	xgft1_lo, [tmp]			;Load array Ax{00}, Ax{01}, ..., Ax{0f}
-	movdqu	xgft1_hi, [tmp+16]		;     "     Ax{00}, Ax{10}, ..., Ax{f0}
-	movdqu	xgft2_lo, [tmp+vskip1*1]	;Load array Bx{00}, Bx{01}, ..., Bx{0f}
-	movdqu	xgft2_hi, [tmp+vskip1*1+16]	;     "     Bx{00}, Bx{10}, ..., Bx{f0}
-	movdqu	xgft3_lo, [tmp+vskip1*2]	;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	movdqu	xgft3_hi, [tmp+vskip1*2+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	lea	ptr, [vskip1 + vskip1*4]	;ptr = vskip5
-
-	movdqa	xtmpa, x0		;Keep unshifted copy of src
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	xtmpa, xmask0f		;Mask low src nibble in bits 4-0
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp1, xgft1_hi		;xp1 += partial
-
-	pshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	pxor	xp2, xgft2_hi		;xp2 += partial
-
-	pshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	pxor	xp3, xgft3_hi		;xp3 += partial
-
-
-	movdqu	xgft1_lo, [tmp+vskip3]		;Load array Dx{00}, Dx{01}, ..., Dx{0f}
-	movdqu	xgft1_hi, [tmp+vskip3+16]	;     "     Dx{00}, Dx{10}, ..., Dx{f0}
-	movdqu	xgft2_lo, [tmp+vskip1*4]	;Load array Ex{00}, Ex{01}, ..., Ex{0f}
-	movdqu	xgft2_hi, [tmp+vskip1*4+16]	;     "     Ex{00}, Ex{10}, ..., Ex{f0}
-	movdqu	xgft3_lo, [tmp+ptr]		;Load array Fx{00}, Fx{01}, ..., Fx{0f}
-	movdqu	xgft3_hi, [tmp+ptr+16]		;     "     Fx{00}, Fx{10}, ..., Fx{f0}
-	add	tmp, 32
-
-
-	pshufb	xgft1_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft1_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft1_hi, xgft1_lo	;GF add high and low partials
-	pxor	xp4, xgft1_hi		;xp4 += partial
-
-	pshufb	xgft2_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft2_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft2_hi, xgft2_lo	;GF add high and low partials
-	pxor	xp5, xgft2_hi		;xp5 += partial
-
-	pshufb	xgft3_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft3_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft3_hi, xgft3_lo	;GF add high and low partials
-	pxor	xp6, xgft3_hi		;xp6 += partial
-
-	cmp	vec_i, vec
-	jl	.next_vect
-
-
-	mov	tmp, [dest+2*PS]
-	mov	ptr, [dest+3*PS]
-	mov	vec_i, [dest+4*PS]
-
-	XSTR	[dest1+pos], xp1
-	XSTR	[dest2+pos], xp2
-	XSTR	[tmp+pos], xp3
-	mov	tmp, [dest+5*PS]
-	XSTR	[ptr+pos], xp4
-	XSTR	[vec_i+pos], xp5
-	XSTR	[tmp+pos], xp6
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	FUNC_RESTORE
-	mov	return, 0
-	ret
-
-.return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_6vect_dot_prod_sse, 00,  03,  0066
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s
deleted file mode 100644
index ddc3042..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s
+++ /dev/null
@@ -1,198 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_vect_dot_prod_avx(len, vec, *g_tbls, **buffs, *dest);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r9
- %define return rax
- %define PS 8
- %define func(x) x:
- %define FUNC_SAVE
- %define FUNC_RESTORE
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved and loaded
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   rdi 		; must be saved and loaded
- %define return rax
- %define PS 8
- %define frame_size 2*8
- %define arg(x)      [rsp + frame_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	rex_push_reg	r12
-	push_reg	rdi
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	pop	rdi
-	pop	r12
- %endmacro
-%endif
-
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest  arg4
-
-%define vec_i tmp2
-%define ptr   tmp3
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f  xmm5
-%define xgft_lo  xmm4
-%define xgft_hi  xmm3
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp     xmm2
-
-align 16
-global gf_vect_dot_prod_avx:function
-func(gf_vect_dot_prod_avx)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-
-.loop16:
-	vpxor	xp, xp
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i*PS]
-	vmovdqu	xgft_lo, [tmp]		;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	vmovdqu	xgft_hi, [tmp+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, 1
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft_hi, xgft_hi, x0	;Lookup mul table of high nibble
-	vpshufb	xgft_lo, xgft_lo, xtmpa	;Lookup mul table of low nibble
-	vpxor	xgft_hi, xgft_hi, xgft_lo ;GF add high and low partials
-	vpxor	xp, xp, xgft_hi		;xp += partial
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest+pos], xp
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-
-poly:
-mask0f:
-ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                 core, ver, snum
-slversion gf_vect_dot_prod_avx, 02,  03,  0061
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s
deleted file mode 100644
index 7eebd27..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s
+++ /dev/null
@@ -1,203 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, *dest);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
-
- %define tmp   r11
- %define tmp.w r11d
- %define tmp.b r11b
- %define tmp2  r10
- %define tmp3  r9
- %define return rax
- %define PS 8
- %define func(x) x:
- %define FUNC_SAVE
- %define FUNC_RESTORE
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved and loaded
- %define tmp    r11
- %define tmp.w  r11d
- %define tmp.b  r11b
- %define tmp2   r10
- %define tmp3   rdi 		; must be saved and loaded
- %define return rax
- %define PS 8
- %define frame_size 2*8
- %define arg(x)      [rsp + frame_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	rex_push_reg	r12
-	push_reg	rdi
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	pop	rdi
-	pop	r12
- %endmacro
-%endif
-
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest  arg4
-
-%define vec_i tmp2
-%define ptr   tmp3
-%define pos   return
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR vmovdqu
- %define XSTR vmovdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR vmovdqa
-  %define XSTR vmovdqa
- %else
-  %define XLDR vmovntdqa
-  %define XSTR vmovntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f  ymm3
-%define xmask0fx xmm3
-%define xgft_lo  ymm4
-%define xgft_hi  ymm5
-
-%define x0     ymm0
-%define xtmpa  ymm1
-%define xp     ymm2
-
-align 16
-global gf_vect_dot_prod_avx2:function
-func(gf_vect_dot_prod_avx2)
-	FUNC_SAVE
-	sub	len, 32
-	jl	.return_fail
-	xor	pos, pos
-	mov	tmp.b, 0x0f
-	vpinsrb	xmask0fx, xmask0fx, tmp.w, 0
-	vpbroadcastb xmask0f, xmask0fx	;Construct mask 0x0f0f0f...
-
-.loop32:
-	vpxor	xp, xp
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i*PS]
-
-	vmovdqu	xgft_lo, [tmp]		;Load array Cx{00}, Cx{01}, Cx{02}, ...
-					; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0}
-	vperm2i128 xgft_hi, xgft_lo, xgft_lo, 0x11 ; swapped to hi | hi
-	vperm2i128 xgft_lo, xgft_lo, xgft_lo, 0x00 ; swapped to lo | lo
-
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, 1
-
-	vpand	xtmpa, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-
-	vpshufb	xgft_hi, xgft_hi, x0	;Lookup mul table of high nibble
-	vpshufb	xgft_lo, xgft_lo, xtmpa	;Lookup mul table of low nibble
-	vpxor	xgft_hi, xgft_hi, xgft_lo ;GF add high and low partials
-	vpxor	xp, xp, xgft_hi		;xp += partial
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest+pos], xp
-	add	pos, 32			;Loop on 32 bytes at a time
-	cmp	pos, len
-	jle	.loop32
-
-	lea	tmp, [len + 32]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-32
-	jmp	.loop32		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                  core, ver, snum
-slversion gf_vect_dot_prod_avx2, 04,  03,  0190
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s
deleted file mode 100644
index fd51ee5..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s
+++ /dev/null
@@ -1,195 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_vect_dot_prod_sse(len, vec, *g_tbls, **buffs, *dest);
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
-
- %define tmp   r11
- %define tmp2  r10
- %define tmp3  r9
- %define return rax
- %define PS 8
- %define func(x) x:
- %define FUNC_SAVE
- %define FUNC_RESTORE
-%endif
-
-%ifidn __OUTPUT_FORMAT__, win64
- %define arg0   rcx
- %define arg1   rdx
- %define arg2   r8
- %define arg3   r9
-
- %define arg4   r12 		; must be saved and loaded
- %define tmp    r11
- %define tmp2   r10
- %define tmp3   rdi 		; must be saved and loaded
- %define return rax
- %define PS 8
- %define frame_size 2*8
- %define arg(x)      [rsp + frame_size + PS + PS*x]
-
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	rex_push_reg	r12
-	push_reg	rdi
-	end_prolog
-	mov	arg4, arg(4)
- %endmacro
-
- %macro FUNC_RESTORE 0
-	pop	rdi
-	pop	r12
- %endmacro
-%endif
-
-
-%define len   arg0
-%define vec   arg1
-%define mul_array arg2
-%define	src   arg3
-%define dest  arg4
-
-%define vec_i tmp2
-%define ptr   tmp3
-%define pos   return
-
-
-%ifndef EC_ALIGNED_ADDR
-;;; Use Un-aligned load/store
- %define XLDR movdqu
- %define XSTR movdqu
-%else
-;;; Use Non-temporal load/stor
- %ifdef NO_NT_LDST
-  %define XLDR movdqa
-  %define XSTR movdqa
- %else
-  %define XLDR movntdqa
-  %define XSTR movntdq
- %endif
-%endif
-
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f  xmm5
-%define xgft_lo  xmm4
-%define xgft_hi  xmm3
-
-%define x0     xmm0
-%define xtmpa  xmm1
-%define xp     xmm2
-
-align 16
-global gf_vect_dot_prod_sse:function
-func(gf_vect_dot_prod_sse)
-	FUNC_SAVE
-	sub	len, 16
-	jl	.return_fail
-	xor	pos, pos
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-
-.loop16:
-	pxor	xp, xp
-	mov	tmp, mul_array
-	xor	vec_i, vec_i
-
-.next_vect:
-	mov	ptr, [src+vec_i*PS]
-	movdqu	xgft_lo, [tmp]		;Load array Cx{00}, Cx{01}, ..., Cx{0f}
-	movdqu	xgft_hi, [tmp+16]	;     "     Cx{00}, Cx{10}, ..., Cx{f0}
-	XLDR	x0, [ptr+pos]		;Get next source vector
-	add	tmp, 32
-	add	vec_i, 1
-	movdqa	xtmpa, x0		;Keep unshifted copy of src
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	xtmpa, xmask0f		;Mask low src nibble in bits 4-0
-	pshufb	xgft_hi, x0		;Lookup mul table of high nibble
-	pshufb	xgft_lo, xtmpa		;Lookup mul table of low nibble
-	pxor	xgft_hi, xgft_lo	;GF add high and low partials
-	pxor	xp, xgft_hi		;xp += partial
-	cmp	vec_i, vec
-	jl	.next_vect
-
-	XSTR	[dest+pos], xp
-
-	add	pos, 16			;Loop on 16 bytes at a time
-	cmp	pos, len
-	jle	.loop16
-
-	lea	tmp, [len + 16]
-	cmp	pos, tmp
-	je	.return_pass
-
-	;; Tail len
-	mov	pos, len	;Overlapped offset length-16
-	jmp	.loop16		;Do one more overlap pass
-
-.return_pass:
-	mov	return, 0
-	FUNC_RESTORE
-	ret
-
-.return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:	ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func                 core, ver, snum
-slversion gf_vect_dot_prod_sse, 00,  03,  0060
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s
deleted file mode 100644
index b60a6eb..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s
+++ /dev/null
@@ -1,172 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_vect_mul_avx(len, mul_array, src, dest)
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
- %define tmp   r11
- %define return rax
- %define func(x) x:
- %define FUNC_SAVE
- %define FUNC_RESTORE
-
-%elifidn __OUTPUT_FORMAT__, win64
- %define arg0  rcx
- %define arg1  rdx
- %define arg2  r8
- %define arg3  r9
- %define return rax
- %define stack_size  5*16 + 8 	; must be an odd multiple of 8
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm13, 2*16
-	save_xmm128	xmm14, 3*16
-	save_xmm128	xmm15, 4*16
-	end_prolog
- %endmacro
-
- %macro FUNC_RESTORE 0
-	vmovdqa	xmm6, [rsp + 0*16]
-	vmovdqa	xmm7, [rsp + 1*16]
-	vmovdqa	xmm13, [rsp + 2*16]
-	vmovdqa	xmm14, [rsp + 3*16]
-	vmovdqa	xmm15, [rsp + 4*16]
-	add	rsp, stack_size
- %endmacro
-
-%endif
-
-
-%define len   arg0
-%define mul_array arg1
-%define	src   arg2
-%define dest  arg3
-%define pos   return
-
-
-;;; Use Non-temporal load/stor
-%ifdef NO_NT_LDST
- %define XLDR vmovdqa
- %define XSTR vmovdqa
-%else
- %define XLDR vmovntdqa
- %define XSTR vmovntdq
-%endif
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f  xmm15
-%define xgft_lo  xmm14
-%define xgft_hi  xmm13
-
-%define x0     xmm0
-%define xtmp1a xmm1
-%define xtmp1b xmm2
-%define xtmp1c xmm3
-%define x1     xmm4
-%define xtmp2a xmm5
-%define xtmp2b xmm6
-%define xtmp2c xmm7
-
-align 16
-global gf_vect_mul_avx:function
-func(gf_vect_mul_avx)
-	FUNC_SAVE
-	mov	pos, 0
-	vmovdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	vmovdqu	xgft_lo, [mul_array]	;Load array Cx{00}, Cx{01}, Cx{02}, ...
-	vmovdqu	xgft_hi, [mul_array+16]	; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0}
-
-loop32:
-	XLDR	x0, [src+pos]		;Get next source vector
-	XLDR	x1, [src+pos+16]	;Get next source vector + 16B ahead
-	add	pos, 32			;Loop on 16 bytes at a time
-	cmp	pos, len
-	vpand	xtmp1a, x0, xmask0f	;Mask low src nibble in bits 4-0
-	vpand	xtmp2a, x1, xmask0f
-	vpsraw	x0, x0, 4		;Shift to put high nibble into bits 4-0
-	vpsraw	x1, x1, 4
-	vpand	x0, x0, xmask0f		;Mask high src nibble in bits 4-0
-	vpand	x1, x1, xmask0f
-	vpshufb	xtmp1b, xgft_hi, x0	;Lookup mul table of high nibble
-	vpshufb	xtmp1c, xgft_lo, xtmp1a	;Lookup mul table of low nibble
-	vpshufb	xtmp2b, xgft_hi, x1	;Lookup mul table of high nibble
-	vpshufb	xtmp2c, xgft_lo, xtmp2a	;Lookup mul table of low nibble
-	vpxor	xtmp1b, xtmp1b, xtmp1c	;GF add high and low partials
-	vpxor	xtmp2b, xtmp2b, xtmp2c
-	XSTR	[dest+pos-32], xtmp1b	;Store result
-	XSTR	[dest+pos-16], xtmp2b	;Store +16B result
-	jl	loop32
-
-
-return_pass:
-	FUNC_RESTORE
-	sub	pos, len
-	ret
-
-return_fail:
-	FUNC_RESTORE
-	mov	return, 1
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-
-mask0f:
-ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func             core, ver, snum
-slversion gf_vect_mul_avx, 01,   02,  0036
diff --git a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s b/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s
deleted file mode 100644
index 3d5fb94..0000000
--- a/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s
+++ /dev/null
@@ -1,178 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;
-;;; gf_vect_mul_sse(len, mul_array, src, dest)
-;;;
-;;; Author: Gregory Tucker
-
-
-%ifidn __OUTPUT_FORMAT__, elf64
- %define arg0  rdi
- %define arg1  rsi
- %define arg2  rdx
- %define arg3  rcx
- %define arg4  r8
- %define arg5  r9
- %define tmp   r11
- %define return rax
- %define func(x) x:
- %define FUNC_SAVE
- %define FUNC_RESTORE
-
-%elifidn __OUTPUT_FORMAT__, win64
- %define arg0  rcx
- %define arg1  rdx
- %define arg2  r8
- %define arg3  r9
- %define return rax
- %define stack_size  5*16 + 8 	; must be an odd multiple of 8
- %define func(x) proc_frame x
- %macro FUNC_SAVE 0
-	alloc_stack	stack_size
-	save_xmm128	xmm6, 0*16
-	save_xmm128	xmm7, 1*16
-	save_xmm128	xmm13, 2*16
-	save_xmm128	xmm14, 3*16
-	save_xmm128	xmm15, 4*16
-	end_prolog
- %endmacro
-
- %macro FUNC_RESTORE 0
-	movdqa	xmm6, [rsp + 0*16]
-	movdqa	xmm7, [rsp + 1*16]
-	movdqa	xmm13, [rsp + 2*16]
-	movdqa	xmm14, [rsp + 3*16]
-	movdqa	xmm15, [rsp + 4*16]
-	add	rsp, stack_size
- %endmacro
-
-%endif
-
-
-%define len    arg0
-%define mul_array arg1
-%define	src    arg2
-%define dest   arg3
-%define pos    return
-
-
-;;; Use Non-temporal load/stor
-%ifdef NO_NT_LDST
- %define XLDR movdqa
- %define XSTR movdqa
-%else
- %define XLDR movntdqa
- %define XSTR movntdq
-%endif
-
-default rel
-
-[bits 64]
-section .text
-
-%define xmask0f  xmm15
-%define xgft_lo  xmm14
-%define xgft_hi  xmm13
-
-%define x0     xmm0
-%define xtmp1a xmm1
-%define xtmp1b xmm2
-%define xtmp1c xmm3
-%define x1     xmm4
-%define xtmp2a xmm5
-%define xtmp2b xmm6
-%define xtmp2c xmm7
-
-
-align 16
-global gf_vect_mul_sse:function
-func(gf_vect_mul_sse)
-	FUNC_SAVE
-	mov	pos, 0
-	movdqa	xmask0f, [mask0f]	;Load mask of lower nibble in each byte
-	movdqu	xgft_lo, [mul_array]	;Load array Cx{00}, Cx{01}, Cx{02}, ...
-	movdqu	xgft_hi, [mul_array+16]	; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0}
-
-loop32:
-	XLDR	x0, [src+pos]		;Get next source vector
-	XLDR	x1, [src+pos+16]	;Get next source vector + 16B ahead
-	movdqa	xtmp1b, xgft_hi		;Reload const array registers
-	movdqa	xtmp1c, xgft_lo
-	movdqa	xtmp2b, xgft_hi
-	movdqa	xtmp2c, xgft_lo
-	movdqa	xtmp1a, x0		;Keep unshifted copy of src
-	movdqa	xtmp2a, x1
-	psraw	x0, 4			;Shift to put high nibble into bits 4-0
-	psraw	x1, 4
-	pand	xtmp1a, xmask0f		;Mask low src nibble in bits 4-0
-	pand	xtmp2a, xmask0f
-	pand	x0, xmask0f		;Mask high src nibble in bits 4-0
-	pand	x1, xmask0f
-	pshufb	xtmp1b, x0		;Lookup mul table of high nibble
-	pshufb	xtmp1c, xtmp1a		;Lookup mul table of low nibble
-	pshufb	xtmp2b, x1
-	pshufb	xtmp2c, xtmp2a
-	pxor	xtmp1b, xtmp1c		;GF add high and low partials
-	pxor	xtmp2b, xtmp2c
-	XSTR	[dest+pos], xtmp1b 	;Store result
-	XSTR	[dest+pos+16], xtmp2b	;Store +16B result
-	add	pos, 32			;Loop on 32 bytes at at time
-	cmp	pos, len
-	jl	loop32
-
-
-return_pass:
-	sub	pos, len
-	FUNC_RESTORE
-	ret
-
-return_fail:
-	mov	return, 1
-	FUNC_RESTORE
-	ret
-
-endproc_frame
-
-section .data
-
-align 16
-mask0f:
-ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
-
-%macro slversion 4
-global %1_slver_%2%3%4
-global %1_slver
-%1_slver:
-%1_slver_%2%3%4:
-	dw 0x%4
-	db 0x%3, 0x%2
-%endmacro
-;;;       func        core, ver, snum
-slversion gf_vect_mul_sse, 00,   02,  0034
diff --git a/src/erasure-code/isa/isa-l/include/erasure_code.h b/src/erasure-code/isa/isa-l/include/erasure_code.h
deleted file mode 100644
index 0f3b6db..0000000
--- a/src/erasure-code/isa/isa-l/include/erasure_code.h
+++ /dev/null
@@ -1,659 +0,0 @@
-/**********************************************************************
-  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-    * Neither the name of Intel Corporation nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**********************************************************************/
-
-
-#ifndef _ERASURE_CODE_H_
-#define _ERASURE_CODE_H_
-
-/**
- *  @file erasure_code.h
- *  @brief Interface to functions supporting erasure code encode and decode.
- *
- *  This file defines the interface to optimized functions used in erasure
- *  codes.  Encode and decode of erasures in GF(2^8) are made by calculating the
- *  dot product of the symbols (bytes in GF(2^8)) across a set of buffers and a
- *  set of coefficients.  Values for the coefficients are determined by the type
- *  of erasure code.  Using a general dot product means that any sequence of
- *  coefficients may be used including erasure codes based on random
- *  coefficients.
- *  Multiple versions of dot product are supplied to calculate 1-6 output
- *  vectors in one pass.
- *  Base GF multiply and divide functions can be sped up by defining
- *  GF_LARGE_TABLES at the expense of memory size.
- *
- */
-
-#include "gf_vect_mul.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Initialize tables for fast Erasure Code encode and decode.
- *
- * Generates the expanded tables needed for fast encode or decode for erasure
- * codes on blocks of data.  32bytes is generated for each input coefficient.
- *
- * @param k      The number of vector sources or rows in the generator matrix
- *               for coding.
- * @param rows   The number of output vectors to concurrently encode/decode.
- * @param a      Pointer to sets of arrays of input coefficients used to encode
- *               or decode data.
- * @param gftbls Pointer to start of space for concatenated output tables
- *               generated from input coefficients.  Must be of size 32*k*rows.
- * @returns none
- */
-
-void ec_init_tables(int k, int rows, unsigned char* a, unsigned char* gftbls);
-
-/**
- * @brief Generate or decode erasure codes on blocks of data.
- *
- * Given a list of source data blocks, generate one or multiple blocks of
- * encoded data as specified by a matrix of GF(2^8) coefficients. When given a
- * suitable set of coefficients, this function will perform the fast generation
- * or decoding of Reed-Solomon type erasure codes.
- *
- * @requires SSE4.1
- * @param len    Length of each block of data (vector) of source or dest data.
- * @param k      The number of vector sources or rows in the generator matrix
- * 		 for coding.
- * @param rows   The number of output vectors to concurrently encode/decode.
- * @param gftbls Pointer to array of input tables generated from coding
- *               coefficients in ec_init_tables(). Must be of size 32*k*rows
- * @param data   Array of pointers to source input buffers.
- * @param coding Array of pointers to coded output buffers.
- * @returns none
- */
-
-void ec_encode_data_sse(int len, int k, int rows, unsigned char *gftbls, unsigned char **data, unsigned char **coding);
-
-
-/**
- * @brief Generate or decode erasure codes on blocks of data, runs appropriate version.
- *
- * Given a list of source data blocks, generate one or multiple blocks of
- * encoded data as specified by a matrix of GF(2^8) coefficients. When given a
- * suitable set of coefficients, this function will perform the fast generation
- * or decoding of Reed-Solomon type erasure codes.
- *
- * This function determines what instruction sets are enabled and
- * selects the appropriate version at runtime.
- *
- * @param len    Length of each block of data (vector) of source or dest data.
- * @param k      The number of vector sources or rows in the generator matrix
- * 		 for coding.
- * @param rows   The number of output vectors to concurrently encode/decode.
- * @param gftbls Pointer to array of input tables generated from coding
- * 		 coefficients in ec_init_tables(). Must be of size 32*k*rows
- * @param data   Array of pointers to source input buffers.
- * @param coding Array of pointers to coded output buffers.
- * @returns none
- */
-
-void ec_encode_data(int len, int k, int rows, unsigned char *gftbls, unsigned char **data, unsigned char **coding);
-
-
-/**
- * @brief Generate or decode erasure codes on blocks of data, runs baseline version.
- *
- * Given a list of source data blocks, generate one or multiple blocks of
- * encoded data as specified by a matrix of GF(2^8) coefficients.  When given a
- * suitable set of coefficients, this function will perform the fast generation
- * or decoding of Reed-Solomon type erasure codes.
- *
- * @param len    Length of each block of data (vector) of source or dest data.
- * @param srcs   The number of vector sources or rows in the generator matrix
- * 		 for coding.
- * @param dests  The number of output vectors to concurrently encode/decode.
- * @param v      Pointer to array of input tables generated from coding
- * 		 coefficients in ec_init_tables(). Must be of size 32*k*rows
- * @param src    Array of pointers to source input buffers.
- * @param dest   Array of pointers to coded output buffers.
- * @returns none
- */
-
-void ec_encode_data_base(int len, int srcs, int dests, unsigned char *v, unsigned char **src, unsigned char **dest);
-
-
-/**
- * @brief GF(2^8) vector dot product.
- *
- * Does a GF(2^8) dot product across each byte of the input array and a constant
- * set of coefficients to produce each byte of the output. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 32*vlen byte constant array based on the input coefficients.
- *
- * @requires SSE4.1
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 32*vlen byte array of pre-calculated constants based
- *               on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Pointer to destination data array.
- * @returns none
- */
-
-void gf_vect_dot_prod_sse(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char *dest);
-
-/**
- * @brief GF(2^8) vector dot product.
- *
- * Does a GF(2^8) dot product across each byte of the input array and a constant
- * set of coefficients to produce each byte of the output. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 32*vlen byte constant array based on the input coefficients.
- *
- * @requires AVX
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 32*vlen byte array of pre-calculated constants based
- *               on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Pointer to destination data array.
- * @returns none
- */
-
-void gf_vect_dot_prod_avx(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char *dest);
-
-/**
- * @brief GF(2^8) vector dot product.
- *
- * Does a GF(2^8) dot product across each byte of the input array and a constant
- * set of coefficients to produce each byte of the output. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 32*vlen byte constant array based on the input coefficients.
- *
- * @requires AVX2
- * @param len    Length of each vector in bytes. Must be >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 32*vlen byte array of pre-calculated constants based
- *               on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Pointer to destination data array.
- * @returns none
- */
-
-void gf_vect_dot_prod_avx2(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char *dest);
-
-/**
- * @brief GF(2^8) vector dot product with two outputs.
- *
- * Vector dot product optimized to calculate two ouputs at a time. Does two
- * GF(2^8) dot products across each byte of the input array and two constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 2*32*vlen byte constant array based on the two sets of input coefficients.
- *
- * @requires SSE4.1
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 2*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_2vect_dot_prod_sse(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with two outputs.
- *
- * Vector dot product optimized to calculate two ouputs at a time. Does two
- * GF(2^8) dot products across each byte of the input array and two constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 2*32*vlen byte constant array based on the two sets of input coefficients.
- *
- * @requires AVX
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 2*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_2vect_dot_prod_avx(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with two outputs.
- *
- * Vector dot product optimized to calculate two ouputs at a time. Does two
- * GF(2^8) dot products across each byte of the input array and two constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 2*32*vlen byte constant array based on the two sets of input coefficients.
- *
- * @requires AVX2
- * @param len    Length of each vector in bytes. Must be >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 2*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_2vect_dot_prod_avx2(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with three outputs.
- *
- * Vector dot product optimized to calculate three ouputs at a time. Does three
- * GF(2^8) dot products across each byte of the input array and three constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 3*32*vlen byte constant array based on the three sets of input coefficients.
- *
- * @requires SSE4.1
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 3*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_3vect_dot_prod_sse(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with three outputs.
- *
- * Vector dot product optimized to calculate three ouputs at a time. Does three
- * GF(2^8) dot products across each byte of the input array and three constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 3*32*vlen byte constant array based on the three sets of input coefficients.
- *
- * @requires AVX
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 3*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_3vect_dot_prod_avx(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with three outputs.
- *
- * Vector dot product optimized to calculate three ouputs at a time. Does three
- * GF(2^8) dot products across each byte of the input array and three constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 3*32*vlen byte constant array based on the three sets of input coefficients.
- *
- * @requires AVX2
- * @param len    Length of each vector in bytes. Must be >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 3*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_3vect_dot_prod_avx2(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with four outputs.
- *
- * Vector dot product optimized to calculate four ouputs at a time. Does four
- * GF(2^8) dot products across each byte of the input array and four constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 4*32*vlen byte constant array based on the four sets of input coefficients.
- *
- * @requires SSE4.1
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 4*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_4vect_dot_prod_sse(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with four outputs.
- *
- * Vector dot product optimized to calculate four ouputs at a time. Does four
- * GF(2^8) dot products across each byte of the input array and four constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 4*32*vlen byte constant array based on the four sets of input coefficients.
- *
- * @requires AVX
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 4*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_4vect_dot_prod_avx(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with four outputs.
- *
- * Vector dot product optimized to calculate four ouputs at a time. Does four
- * GF(2^8) dot products across each byte of the input array and four constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 4*32*vlen byte constant array based on the four sets of input coefficients.
- *
- * @requires AVX2
- * @param len    Length of each vector in bytes. Must be >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 4*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_4vect_dot_prod_avx2(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with five outputs.
- *
- * Vector dot product optimized to calculate five ouputs at a time. Does five
- * GF(2^8) dot products across each byte of the input array and five constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 5*32*vlen byte constant array based on the five sets of input coefficients.
- *
- * @requires SSE4.1
- * @param len    Length of each vector in bytes. Must >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 5*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_5vect_dot_prod_sse(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with five outputs.
- *
- * Vector dot product optimized to calculate five ouputs at a time. Does five
- * GF(2^8) dot products across each byte of the input array and five constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 5*32*vlen byte constant array based on the five sets of input coefficients.
- *
- * @requires AVX
- * @param len    Length of each vector in bytes. Must >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 5*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_5vect_dot_prod_avx(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with five outputs.
- *
- * Vector dot product optimized to calculate five ouputs at a time. Does five
- * GF(2^8) dot products across each byte of the input array and five constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 5*32*vlen byte constant array based on the five sets of input coefficients.
- *
- * @requires AVX2
- * @param len    Length of each vector in bytes. Must >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 5*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_5vect_dot_prod_avx2(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with six outputs.
- *
- * Vector dot product optimized to calculate six ouputs at a time. Does six
- * GF(2^8) dot products across each byte of the input array and six constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 6*32*vlen byte constant array based on the six sets of input coefficients.
- *
- * @requires SSE4.1
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 6*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_6vect_dot_prod_sse(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with six outputs.
- *
- * Vector dot product optimized to calculate six ouputs at a time. Does six
- * GF(2^8) dot products across each byte of the input array and six constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 6*32*vlen byte constant array based on the six sets of input coefficients.
- *
- * @requires AVX
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 6*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_6vect_dot_prod_avx(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product with six outputs.
- *
- * Vector dot product optimized to calculate six ouputs at a time. Does six
- * GF(2^8) dot products across each byte of the input array and six constant
- * sets of coefficients to produce each byte of the outputs. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 6*32*vlen byte constant array based on the six sets of input coefficients.
- *
- * @requires AVX2
- * @param len    Length of each vector in bytes. Must be >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 6*32*vlen byte array of pre-calculated constants
- *               based on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Array of pointers to destination data buffers.
- * @returns none
- */
-
-void gf_6vect_dot_prod_avx2(int len, int vlen, unsigned char *gftbls,
-			unsigned char **src, unsigned char **dest);
-
-/**
- * @brief GF(2^8) vector dot product, runs baseline version.
- *
- * Does a GF(2^8) dot product across each byte of the input array and a constant
- * set of coefficients to produce each byte of the output. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 32*vlen byte constant array based on the input coefficients.
- *
- * @param len    Length of each vector in bytes. Must be >= 16.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 32*vlen byte array of pre-calculated constants based
- *               on the array of input coefficients. Only elements 32*CONST*j + 1
- *               of this array are used, where j = (0, 1, 2...) and CONST is the
- *               number of elements in the array of input coefficients. The
- *               elements used correspond to the original input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Pointer to destination data array.
- * @returns none
- */
-
-void gf_vect_dot_prod_base(int len, int vlen, unsigned char *gftbls,
-                        unsigned char **src, unsigned char *dest);
-
-/**
- * @brief GF(2^8) vector dot product, runs appropriate version.
- *
- * Does a GF(2^8) dot product across each byte of the input array and a constant
- * set of coefficients to produce each byte of the output. Can be used for
- * erasure coding encode and decode. Function requires pre-calculation of a
- * 32*vlen byte constant array based on the input coefficients.
- *
- * This function determines what instruction sets are enabled and
- * selects the appropriate version at runtime.
- *
- * @param len    Length of each vector in bytes. Must be >= 32.
- * @param vlen   Number of vector sources.
- * @param gftbls Pointer to 32*vlen byte array of pre-calculated constants based
- *               on the array of input coefficients.
- * @param src    Array of pointers to source inputs.
- * @param dest   Pointer to destination data array.
- * @returns none
- */
-
-void gf_vect_dot_prod(int len, int vlen, unsigned char *gftbls,
-                        unsigned char **src, unsigned char *dest);
-
-/**********************************************************************
- * The remaining are lib support functions used in GF(2^8) operations.
- */
-
-/**
- * @brief Single element GF(2^8) multiply.
- *
- * @param a  Multiplicand a
- * @param b  Multiplicand b
- * @returns  Product of a and b in GF(2^8)
- */
-
-unsigned char gf_mul(unsigned char a, unsigned char b);
-
-/**
- * @brief Single element GF(2^8) inverse.
- *
- * @param a  Input element
- * @returns  Field element b such that a x b = {1}
- */
-
-unsigned char gf_inv(unsigned char a);
-
-/**
- * @brief Generate a matrix of coefficients to be used for encoding.
- *
- * Vandermonde matrix example of encoding coefficients where high portion of
- * matrix is identity matrix I and lower portion is constructed as 2^{i*(j-k+1)}
- * i:{0,k-1} j:{k,m-1}. Commonly used method for choosing coefficients in
- * erasure encoding but does not guarantee invertable for every sub matrix.  For
- * large k it is possible to find cases where the decode matrix chosen from
- * sources and parity not in erasure are not invertable. Users may want to
- * adjust for k > 5.
- *
- * @param a  [mxk] array to hold coefficients
- * @param m  number of rows in matrix corresponding to srcs + parity.
- * @param k  number of columns in matrix corresponding to srcs.
- * @returns  none
- */
-
-void gf_gen_rs_matrix(unsigned char *a, int m, int k);
-
-/**
- * @brief Generate a Cauchy matrix of coefficients to be used for encoding.
- *
- * Cauchy matrix example of encoding coefficients where high portion of matrix
- * is identity matrix I and lower portion is constructed as 1/(i + j) | i != j,
- * i:{0,k-1} j:{k,m-1}.  Any sub-matrix of a Cauchy matrix should be invertable.
- *
- * @param a  [mxk] array to hold coefficients
- * @param m  number of rows in matrix corresponding to srcs + parity.
- * @param k  number of columns in matrix corresponding to srcs.
- * @returns  none
- */
-
-void gf_gen_cauchy1_matrix(unsigned char *a, int m, int k);
-
-/**
- * @brief Invert a matrix in GF(2^8)
- *
- * @param in  input matrix
- * @param out output matrix such that [in] x [out] = [I] - identity matrix
- * @param n   size of matrix [nxn]
- * @returns 0 successful, other fail on singular input matrix
- */
-
-int gf_invert_matrix(unsigned char *in, unsigned char *out, const int n);
-
-/*************************************************************/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //_ERASURE_CODE_H_
diff --git a/src/erasure-code/isa/isa-l/include/gf_vect_mul.h b/src/erasure-code/isa/isa-l/include/gf_vect_mul.h
deleted file mode 100644
index ef19845..0000000
--- a/src/erasure-code/isa/isa-l/include/gf_vect_mul.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/**********************************************************************
-  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-    * Neither the name of Intel Corporation nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**********************************************************************/
-
-
-#ifndef _GF_VECT_MUL_H
-#define _GF_VECT_MUL_H
-
-/**
- *  @file gf_vect_mul.h
- *  @brief Interface to functions for vector (block) multiplication in GF(2^8).
- *
- *  This file defines the interface to routines used in fast RAID rebuild and
- *  erasure codes.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /**
- * @brief GF(2^8) vector multiply by constant.
- *
- * Does a GF(2^8) vector multiply b = Ca where a and b are arrays and C
- * is a single field element in GF(2^8). Can be used for RAID6 rebuild
- * and partial write functions. Function requires pre-calculation of a
- * 32-element constant array based on constant C. gftbl(C) = {C{00},
- * C{01}, C{02}, ... , C{0f} }, {C{00}, C{10}, C{20}, ... , C{f0} }. Len
- * and src must be aligned to 32B.
-
- * @requires SSE4.1
- * @param len   Length of vector in bytes. Must be aligned to 32B.
- * @param gftbl Pointer to 32-byte array of pre-calculated constants based on C.
- * @param src   Pointer to src data array. Must be aligned to 32B.
- * @param dest  Pointer to destination data array. Must be aligned to 32B.
- * @returns 0 pass, other fail
- */
-
-int gf_vect_mul_sse(int len, unsigned char *gftbl, void *src, void *dest);
-
-
- /**
- * @brief GF(2^8) vector multiply by constant.
- *
- * Does a GF(2^8) vector multiply b = Ca where a and b are arrays and C
- * is a single field element in GF(2^8). Can be used for RAID6 rebuild
- * and partial write functions. Function requires pre-calculation of a
- * 32-element constant array based on constant C. gftbl(C) = {C{00},
- * C{01}, C{02}, ... , C{0f} }, {C{00}, C{10}, C{20}, ... , C{f0} }. Len
- * and src must be aligned to 32B.
-
- * @requires AVX
- * @param len   Length of vector in bytes. Must be aligned to 32B.
- * @param gftbl Pointer to 32-byte array of pre-calculated constants based on C.
- * @param src   Pointer to src data array. Must be aligned to 32B.
- * @param dest  Pointer to destination data array. Must be aligned to 32B.
- * @returns 0 pass, other fail
- */
-
-int gf_vect_mul_avx(int len, unsigned char *gftbl, void *src, void *dest);
-
-
-/**
- * @brief GF(2^8) vector multiply by constant, runs appropriate version.
- *
- * Does a GF(2^8) vector multiply b = Ca where a and b are arrays and C
- * is a single field element in GF(2^8). Can be used for RAID6 rebuild
- * and partial write functions. Function requires pre-calculation of a
- * 32-element constant array based on constant C. gftbl(C) = {C{00},
- * C{01}, C{02}, ... , C{0f} }, {C{00}, C{10}, C{20}, ... , C{f0} }.
- * Len and src must be aligned to 32B.
- *
- * This function determines what instruction sets are enabled
- * and selects the appropriate version at runtime.
- *
- * @param len   Length of vector in bytes. Must be aligned to 32B.
- * @param gftbl Pointer to 32-byte array of pre-calculated constants based on C.
- * @param src   Pointer to src data array. Must be aligned to 32B.
- * @param dest  Pointer to destination data array. Must be aligned to 32B.
- * @returns 0 pass, other fail
- */
-
-int gf_vect_mul(int len, unsigned char *gftbl, void *src, void *dest);
-
-
-/**
- * @brief Initialize 32-byte constant array for GF(2^8) vector multiply
- *
- * Calculates array {C{00}, C{01}, C{02}, ... , C{0f} }, {C{00}, C{10},
- * C{20}, ... , C{f0} } as required by other fast vector multiply
- * functions.
- * @param c     Constant input.
- * @param gftbl Table output.
- */
-
-void gf_vect_mul_init(unsigned char c, unsigned char* gftbl);
-
-
-/**
- * @brief GF(2^8) vector multiply by constant, runs baseline version.
- *
- * Does a GF(2^8) vector multiply b = Ca where a and b are arrays and C
- * is a single field element in GF(2^8). Can be used for RAID6 rebuild
- * and partial write functions. Function requires pre-calculation of a
- * 32-element constant array based on constant C. gftbl(C) = {C{00},
- * C{01}, C{02}, ... , C{0f} }, {C{00}, C{10}, C{20}, ... , C{f0} }. Len
- * and src must be aligned to 32B.
- *
- * @param len   Length of vector in bytes. Must be aligned to 32B.
- * @param a 	Pointer to 32-byte array of pre-calculated constants based on C.
- * 		only use 2nd element is used.
- * @param src   Pointer to src data array. Must be aligned to 32B.
- * @param dest  Pointer to destination data array. Must be aligned to 32B.
- */
-
-void gf_vect_mul_base(int len, unsigned char *a, unsigned char *src,
-			unsigned char *dest);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //_GF_VECT_MUL_H
diff --git a/src/erasure-code/isa/isa-l/include/reg_sizes.asm b/src/erasure-code/isa/isa-l/include/reg_sizes.asm
deleted file mode 100644
index ed21252..0000000
--- a/src/erasure-code/isa/isa-l/include/reg_sizes.asm
+++ /dev/null
@@ -1,96 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-;
-;  Redistribution and use in source and binary forms, with or without
-;  modification, are permitted provided that the following conditions
-;  are met:
-;    * Redistributions of source code must retain the above copyright
-;      notice, this list of conditions and the following disclaimer.
-;    * Redistributions in binary form must reproduce the above copyright
-;      notice, this list of conditions and the following disclaimer in
-;      the documentation and/or other materials provided with the
-;      distribution.
-;    * Neither the name of Intel Corporation nor the names of its
-;      contributors may be used to endorse or promote products derived
-;      from this software without specific prior written permission.
-;
-;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-;  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-;  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-;  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-%define EFLAGS_HAS_CPUID        (1<<21)
-%define FLAG_CPUID1_ECX_CLMUL   (1<<1)
-%define FLAG_CPUID1_EDX_SSE2    (1<<26)
-%define FLAG_CPUID1_ECX_SSE3	(1)
-%define FLAG_CPUID1_ECX_SSE4_1  (1<<19)
-%define FLAG_CPUID1_ECX_SSE4_2  (1<<20)
-%define FLAG_CPUID1_ECX_POPCNT  (1<<23)
-%define FLAG_CPUID1_ECX_AESNI   (1<<25)
-%define FLAG_CPUID1_ECX_OSXSAVE (1<<27)
-%define FLAG_CPUID1_ECX_AVX     (1<<28)
-%define FLAG_CPUID1_EBX_AVX2    (1<<5)
-%define FLAG_XGETBV_EAX_XMM_YMM	0x6
-
-%define FLAG_CPUID1_EAX_AVOTON 0x000406d0
-
-; define d and w variants for registers
-
-%define	raxd	eax
-%define raxw	ax
-%define raxb	al
-
-%define	rbxd	ebx
-%define rbxw	bx
-%define rbxb	bl
-
-%define	rcxd	ecx
-%define rcxw	cx
-%define rcxb	cl
-
-%define	rdxd	edx
-%define rdxw	dx
-%define rdxb	dl
-
-%define	rsid	esi
-%define rsiw	si
-%define rsib	sil
-
-%define	rdid	edi
-%define rdiw	di
-%define rdib	dil
-
-%define	rbpd	ebp
-%define rbpw	bp
-%define rbpb	bpl
-
-%define ymm0x xmm0
-%define ymm1x xmm1
-%define ymm2x xmm2
-%define ymm3x xmm3
-%define ymm4x xmm4
-%define ymm5x xmm5
-%define ymm6x xmm6
-%define ymm7x xmm7
-%define ymm8x xmm8
-%define ymm9x xmm9
-%define ymm10x xmm10
-%define ymm11x xmm11
-%define ymm12x xmm12
-%define ymm13x xmm13
-%define ymm14x xmm14
-%define ymm15x xmm15
-
-%define DWORD(reg) reg %+ d
-%define WORD(reg)  reg %+ w
-%define BYTE(reg)  reg %+ b
-
-%define XWORD(reg) reg %+ x
diff --git a/src/erasure-code/isa/isa-l/include/types.h b/src/erasure-code/isa/isa-l/include/types.h
deleted file mode 100644
index 0feed47..0000000
--- a/src/erasure-code/isa/isa-l/include/types.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**********************************************************************
-  Copyright(c) 2011-2014 Intel Corporation All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-    * Neither the name of Intel Corporation nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**********************************************************************/
-
-
-/**
- *  @file  types.h
- *  @brief Defines standard width types.
- *
- */
-
-#ifndef __TYPES_H
-#define __TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __unix__
-#ifdef __MINGW32__
-# include <_mingw.h>
-#endif
-typedef unsigned __int64 UINT64;
-typedef          __int64  INT64;
-typedef unsigned __int32 UINT32;
-typedef unsigned __int16 UINT16;
-typedef unsigned char    UINT8;
-#else
-typedef unsigned long int  UINT64;
-typedef          long int   INT64;
-typedef unsigned int       UINT32;
-typedef unsigned short int UINT16;
-typedef unsigned char      UINT8;
-#endif
-
-
-#ifdef __unix__
-# define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
-# define __forceinline static inline
-#else
-# define DECLARE_ALIGNED(decl, alignval) __declspec(align(alignval)) decl
-# define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
-#endif
-
-#ifdef DEBUG
-# define DEBUG_PRINT(x) printf x
-#else
-# define DEBUG_PRINT(x) do {} while (0)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  //__TYPES_H
diff --git a/src/erasure-code/isa/xor_op.cc b/src/erasure-code/isa/xor_op.cc
deleted file mode 100644
index 358ce4a..0000000
--- a/src/erasure-code/isa/xor_op.cc
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *                                                                                                                                                                                                            * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>                                                                                                                                            *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-// -----------------------------------------------------------------------------
-#include "xor_op.h"
-#include <stdio.h>
-#include "arch/intel.h"
-// -----------------------------------------------------------------------------
-
-
-// -----------------------------------------------------------------------------
-
-void
-// -----------------------------------------------------------------------------
-byte_xor(unsigned char* cw, unsigned char* dw, unsigned char* ew)
-// -----------------------------------------------------------------------------
-{
-  while (cw < ew)
-    *dw++ ^= *cw++;
-}
-
-// -----------------------------------------------------------------------------
-
-void
-// -----------------------------------------------------------------------------
-vector_xor(vector_op_t* cw,
-           vector_op_t* dw,
-           vector_op_t* ew)
-// -----------------------------------------------------------------------------
-{
-  assert(is_aligned(cw, EC_ISA_VECTOR_OP_WORDSIZE));
-  assert(is_aligned(dw, EC_ISA_VECTOR_OP_WORDSIZE));
-  assert(is_aligned(ew, EC_ISA_VECTOR_OP_WORDSIZE));
-  while (cw < ew) {
-    *dw++ ^= *cw++;
-  }
-}
-
-
-// -----------------------------------------------------------------------------
-
-void
-// -----------------------------------------------------------------------------
-region_xor(unsigned char** src,
-           unsigned char* parity,
-           int src_size,
-           unsigned size)
-{
-  if (!size) {
-    // nothing to do
-    return;
-  }
-
-  if (!src_size) {
-    // nothing to do
-    return;
-  }
-
-  if (src_size == 1) {
-    // just copy source to parity
-    memcpy(parity, src[0], size);
-    return;
-  }
-
-  unsigned size_left = size;
-
-  // ----------------------------------------------------------
-  // region or vector XOR operations require aligned addresses
-  // ----------------------------------------------------------
-
-  bool src_aligned = true;
-  for (int i = 0; i < src_size; i++) {
-    src_aligned &= is_aligned(src[i], EC_ISA_VECTOR_OP_WORDSIZE);
-  }
-
-  if (src_aligned &&
-      is_aligned(parity, EC_ISA_VECTOR_OP_WORDSIZE)) {
-
-#ifdef __x86_64__
-    if (ceph_arch_intel_sse2) {
-      // -----------------------------
-      // use SSE2 region xor function
-      // -----------------------------
-      unsigned region_size =
-        (size / EC_ISA_VECTOR_SSE2_WORDSIZE) * EC_ISA_VECTOR_SSE2_WORDSIZE;
-
-      size_left -= region_size;
-      // 64-byte region xor
-      region_sse2_xor((char**) src, (char*) parity, src_size, region_size);
-    } else
-#endif
-    {
-      // --------------------------------------------
-      // use region xor based on vector xor operation
-      // --------------------------------------------
-      unsigned vector_words = size / EC_ISA_VECTOR_OP_WORDSIZE;
-      unsigned vector_size = vector_words * EC_ISA_VECTOR_OP_WORDSIZE;
-      memcpy(parity, src[0], vector_size);
-
-      size_left -= vector_size;
-      vector_op_t* p_vec = (vector_op_t*) parity;
-      for (int i = 1; i < src_size; i++) {
-        vector_op_t* s_vec = (vector_op_t*) src[i];
-        vector_op_t* e_vec = s_vec + vector_words;
-        vector_xor(s_vec, p_vec, e_vec);
-      }
-    }
-  }
-
-  if (size_left) {
-    // --------------------------------------------------
-    // xor the not aligned part with byte-wise region xor
-    // --------------------------------------------------
-    memcpy(parity + size - size_left, src[0] + size - size_left, size_left);
-    for (int i = 1; i < src_size; i++) {
-      byte_xor(src[i] + size - size_left, parity + size - size_left, src[i] + size);
-    }
-  }
-}
-
-// -----------------------------------------------------------------------------
-
-void
-// -----------------------------------------------------------------------------
-region_sse2_xor(char** src,
-                char* parity,
-                int src_size,
-                unsigned size)
-// -----------------------------------------------------------------------------
-{
-#ifdef __x86_64__
-  assert(!(size % EC_ISA_VECTOR_SSE2_WORDSIZE));
-  unsigned char* p;
-  int d, l;
-  unsigned i;
-  unsigned char* vbuf[256];
-
-  for (int v = 0; v < src_size; v++) {
-    vbuf[v] = (unsigned char*) src[v];
-  }
-
-  l = src_size;
-  p = (unsigned char*) parity;
-
-  for (i = 0; i < size; i += EC_ISA_VECTOR_SSE2_WORDSIZE) {
-    asm volatile("movdqa %0,%%xmm0" : : "m" (vbuf[0][i]));
-    asm volatile("movdqa %0,%%xmm1" : : "m" (vbuf[0][i + 16]));
-    asm volatile("movdqa %0,%%xmm2" : : "m" (vbuf[0][i + 32]));
-    asm volatile("movdqa %0,%%xmm3" : : "m" (vbuf[0][i + 48]));
-
-    for (d = 1; d < l; d++) {
-      asm volatile("movdqa %0,%%xmm4" : : "m" (vbuf[d][i]));
-      asm volatile("movdqa %0,%%xmm5" : : "m" (vbuf[d][i + 16]));
-      asm volatile("movdqa %0,%%xmm6" : : "m" (vbuf[d][i + 32]));
-      asm volatile("movdqa %0,%%xmm7" : : "m" (vbuf[d][i + 48]));
-      asm volatile("pxor %xmm4,%xmm0");
-      asm volatile("pxor %xmm5,%xmm1");
-      asm volatile("pxor %xmm6,%xmm2");
-      asm volatile("pxor %xmm7,%xmm3");
-    }
-    asm volatile("movntdq %%xmm0,%0" : "=m" (p[i]));
-    asm volatile("movntdq %%xmm1,%0" : "=m" (p[i + 16]));
-    asm volatile("movntdq %%xmm2,%0" : "=m" (p[i + 32]));
-    asm volatile("movntdq %%xmm3,%0" : "=m" (p[i + 48]));
-  }
-
-  asm volatile("sfence" : : : "memory");
-#endif // __x86_64__
-  return;
-}
diff --git a/src/erasure-code/isa/xor_op.h b/src/erasure-code/isa/xor_op.h
deleted file mode 100644
index 6a918d3..0000000
--- a/src/erasure-code/isa/xor_op.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *                                                                                                                                                                                                           \
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>                                                                                                                                           \
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef EC_ISA_XOR_OP_H
-#define EC_ISA_XOR_OP_H
-
-// -----------------------------------------------------------------------------
-#include <assert.h>
-#include <stdint.h>
-#include <string.h>
-// -----------------------------------------------------------------------------
-
-// -------------------------------------------------------------------------
-// declaration of 64/128-bit vector operations depending on availability
-// -------------------------------------------------------------------------
-// -------------------------------------------------------------------------
-
-#define EC_ISA_ADDRESS_ALIGNMENT 32
-#define EC_ISA_VECTOR_SSE2_WORDSIZE 64
-
-#if __GNUC__ > 4 || \
-  ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) ) ||\
-  (__clang__ == 1 )
-#ifdef EC_ISA_VECTOR_OP_DEBUG
-#pragma message "* using 128-bit vector operations in " __FILE__
-#endif
-
-// -------------------------------------------------------------------------
-// use 128-bit pointer
-// -------------------------------------------------------------------------
-typedef long vector_op_t __attribute__((vector_size(16)));
-#define EC_ISA_VECTOR_OP_WORDSIZE 16
-#else
-// -------------------------------------------------------------------------
-// use 64-bit pointer
-// -------------------------------------------------------------------------
-typedef unsigned long long vector_op_t;
-#define EC_ISA_VECTOR_OP_WORDSIZE 8
-#endif
-
-
-// -------------------------------------------------------------------------
-// check if a pointer is aligend to byte_count
-// -------------------------------------------------------------------------
-#define is_aligned(POINTER, BYTE_COUNT) \
-  (((uintptr_t)(const void *)(POINTER)) % (BYTE_COUNT) == 0)
-
-// -------------------------------------------------------------------------
-// compute byte-wise XOR of cw and dw block, ew contains the end address of cw
-// -------------------------------------------------------------------------
-void
-byte_xor(unsigned char* cw, unsigned char* dw, unsigned char* ew);
-
-// -------------------------------------------------------------------------
-// compute word-wise XOR of cw and dw block, ew contains the end address of cw
-// -------------------------------------------------------------------------
-void
-vector_xor(vector_op_t* cw, vector_op_t* dw, vector_op_t* ew);
-
-// -------------------------------------------------------------------------
-// compute region XOR like parity = src[0] ^ src[1] ... ^ src[src_size-]
-// -------------------------------------------------------------------------
-void
-region_xor(unsigned char** src, unsigned char* parity, int src_size, unsigned size);
-
-// -------------------------------------------------------------------------
-// compute region XOR like parity = src[0] ^ src[1] ... ^ src[src_size-]
-// using SSE2 64-byte operations
-// -------------------------------------------------------------------------
-void
-region_sse2_xor(char** src /* array of 64-byte aligned source pointer to xor */,
-                char* parity /* 64-byte aligned output pointer containing the parity */,
-                int src_size /* size of the source pointer array */,
-                unsigned size /* size of the region to xor */);
-
-
-#endif // EC_ISA_XOR_OP_H
diff --git a/src/erasure-code/jerasure/ErasureCodeJerasure.cc b/src/erasure-code/jerasure/ErasureCodeJerasure.cc
index 4cac0a5..06ccc58 100644
--- a/src/erasure-code/jerasure/ErasureCodeJerasure.cc
+++ b/src/erasure-code/jerasure/ErasureCodeJerasure.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,6 +14,8 @@
  * 
  */
 
+#include <errno.h>
+#include <algorithm>
 #include "common/debug.h"
 #include "ErasureCodeJerasure.h"
 #include "crush/CrushWrapper.h"
@@ -27,6 +28,7 @@ extern "C" {
 #include "liberation.h"
 }
 
+// FIXME(loic) this may be too conservative, check back with feedback from Andreas 
 #define LARGEST_VECTOR_WORDSIZE 16
 
 #define dout_subsys ceph_subsys_osd
@@ -60,68 +62,102 @@ void ErasureCodeJerasure::init(const map<string,string> &parameters)
   parameter = parameters.find("ruleset-failure-domain");
   if (parameter != parameters.end())
     ruleset_failure_domain = parameter->second;
-  ostringstream ss;
-  if (parse(parameters, &ss))
-    derr << ss.str() << dendl;
+  parse(parameters);
   prepare();
 }
 
-int ErasureCodeJerasure::parse(const map<std::string,std::string> &parameters,
-			       ostream *ss)
+unsigned int ErasureCodeJerasure::get_chunk_size(unsigned int object_size) const
 {
-  int err = ErasureCode::parse(parameters, ss);
-  err |= to_int("k", parameters, &k, DEFAULT_K, ss);
-  err |= to_int("m", parameters, &m, DEFAULT_M, ss);
-  err |= to_int("w", parameters, &w, DEFAULT_W, ss);
-  if (chunk_mapping.size() > 0 && (int)chunk_mapping.size() != k + m) {
-    *ss << "mapping " << parameters.find("mapping")->second
-	<< " maps " << chunk_mapping.size() << " chunks instead of"
-	<< " the expected " << k + m << " and will be ignored" << std::endl;
-    chunk_mapping.clear();
-    err = -EINVAL;
-  }
-  return err;
+  unsigned alignment = get_alignment();
+  unsigned tail = object_size % alignment;
+  unsigned padded_length = object_size + ( tail ?  ( alignment - tail ) : 0 );
+  assert(padded_length % k == 0);
+  return padded_length / k;
 }
 
-unsigned int ErasureCodeJerasure::get_chunk_size(unsigned int object_size) const
+int ErasureCodeJerasure::minimum_to_decode(const set<int> &want_to_read,
+                                           const set<int> &available_chunks,
+                                           set<int> *minimum) 
 {
-  unsigned alignment = get_alignment();
-  if (per_chunk_alignment) {
-    unsigned chunk_size = object_size / k;
-    if (object_size % k)
-      chunk_size++;
-    dout(20) << "get_chunk_size: chunk_size " << chunk_size
-	     << " must be modulo " << alignment << dendl; 
-    assert(alignment <= chunk_size);
-    unsigned modulo = chunk_size % alignment;
-    if (modulo) {
-      dout(10) << "get_chunk_size: " << chunk_size
-	       << " padded to " << chunk_size + alignment - modulo << dendl;
-      chunk_size += alignment - modulo;
-    }
-    return chunk_size;
+  if (includes(available_chunks.begin(), available_chunks.end(),
+	       want_to_read.begin(), want_to_read.end())) {
+    *minimum = want_to_read;
   } else {
-    unsigned tail = object_size % alignment;
-    unsigned padded_length = object_size + ( tail ?  ( alignment - tail ) : 0 );
-    assert(padded_length % k == 0);
-    return padded_length / k;
+    if (available_chunks.size() < (unsigned)k)
+      return -EIO;
+    set<int>::iterator i;
+    unsigned j;
+    for (i = available_chunks.begin(), j = 0; j < (unsigned)k; ++i, j++)
+      minimum->insert(*i);
   }
+  return 0;
 }
 
-int ErasureCodeJerasure::encode_chunks(const set<int> &want_to_encode,
-				       map<int, bufferlist> *encoded)
-{
+int ErasureCodeJerasure::minimum_to_decode_with_cost(const set<int> &want_to_read,
+                                                     const map<int, int> &available,
+                                                     set<int> *minimum)
+{
+  set <int> available_chunks;
+  for (map<int, int>::const_iterator i = available.begin();
+       i != available.end();
+       ++i)
+    available_chunks.insert(i->first);
+  return minimum_to_decode(want_to_read, available_chunks, minimum);
+}
+
+int ErasureCodeJerasure::encode(const set<int> &want_to_encode,
+                                const bufferlist &in,
+                                map<int, bufferlist> *encoded)
+{
+  unsigned blocksize = get_chunk_size(in.length());
+  unsigned padded_length = blocksize * k;
+  dout(10) << "encode adjusted buffer length from " << in.length()
+	   << " to " << padded_length << dendl;
+  assert(padded_length % k == 0);
+  bufferlist out(in);
+  if (padded_length - in.length() > 0) {
+    bufferptr pad(padded_length - in.length());
+    pad.zero();
+    out.push_back(pad);
+  }
+  unsigned coding_length = blocksize * m;
+  bufferptr coding(buffer::create_page_aligned(coding_length));
+  out.push_back(coding);
+  out.rebuild_page_aligned();
   char *chunks[k + m];
-  for (int i = 0; i < k + m; i++)
-    chunks[i] = (*encoded)[i].c_str();
-  jerasure_encode(&chunks[0], &chunks[k], (*encoded)[0].length());
+  for (int i = 0; i < k + m; i++) {
+    bufferlist &chunk = (*encoded)[i];
+    chunk.substr_of(out, i * blocksize, blocksize);
+    chunks[i] = chunk.c_str();
+  }
+  jerasure_encode(&chunks[0], &chunks[k], blocksize);
+  for (int i = 0; i < k + m; i++) {
+    if (want_to_encode.count(i) == 0)
+      encoded->erase(i);
+  }
   return 0;
 }
 
-int ErasureCodeJerasure::decode_chunks(const set<int> &want_to_read,
-				       const map<int, bufferlist> &chunks,
-				       map<int, bufferlist> *decoded)
+int ErasureCodeJerasure::decode(const set<int> &want_to_read,
+                                const map<int, bufferlist> &chunks,
+                                map<int, bufferlist> *decoded)
 {
+  vector<int> have;
+  have.reserve(chunks.size());
+  for (map<int, bufferlist>::const_iterator i = chunks.begin();
+       i != chunks.end();
+       ++i) {
+    have.push_back(i->first);
+  }
+  if (includes(
+	have.begin(), have.end(), want_to_read.begin(), want_to_read.end())) {
+    for (set<int>::iterator i = want_to_read.begin();
+	 i != want_to_read.end();
+	 ++i) {
+      (*decoded)[*i] = chunks.find(*i)->second;
+    }
+    return 0;
+  }
   unsigned blocksize = (*chunks.begin()).second.length();
   int erasures[k + m + 1];
   int erasures_count = 0;
@@ -131,6 +167,11 @@ int ErasureCodeJerasure::decode_chunks(const set<int> &want_to_read,
     if (chunks.find(i) == chunks.end()) {
       erasures[erasures_count] = i;
       erasures_count++;
+      bufferptr ptr(buffer::create_page_aligned(blocksize));
+      (*decoded)[i].push_front(ptr);
+    } else {
+      (*decoded)[i] = chunks.find(i)->second;
+      (*decoded)[i].rebuild_page_aligned();
     }
     if (i < k)
       data[i] = (*decoded)[i].c_str();
@@ -139,8 +180,33 @@ int ErasureCodeJerasure::decode_chunks(const set<int> &want_to_read,
   }
   erasures[erasures_count] = -1;
 
-  assert(erasures_count > 0);
-  return jerasure_decode(erasures, data, coding, blocksize);
+  if (erasures_count > 0)
+    return jerasure_decode(erasures, data, coding, blocksize);
+  else
+    return 0;
+}
+
+int ErasureCodeJerasure::to_int(const std::string &name,
+                                const map<std::string,std::string> &parameters,
+                                int default_value)
+{
+  if (parameters.find(name) == parameters.end() ||
+      parameters.find(name)->second.size() == 0) {
+    dout(10) << name << " defaults to " << default_value << dendl;
+    return default_value;
+  }
+  const std::string value = parameters.find(name)->second;
+  std::string p = value;
+  std::string err;
+  int r = strict_strtol(p.c_str(), 10, &err);
+  if (!err.empty()) {
+    derr << "could not convert " << name << "=" << value
+         << " to int because " << err
+         << ", set to default " << default_value << dendl;
+    return default_value;
+  }
+  dout(10) << name << " set to " << r << dendl;
+  return r;
 }
 
 bool ErasureCodeJerasure::is_prime(int value)
@@ -179,29 +245,23 @@ int ErasureCodeJerasureReedSolomonVandermonde::jerasure_decode(int *erasures,
 
 unsigned ErasureCodeJerasureReedSolomonVandermonde::get_alignment() const
 {
-  if (per_chunk_alignment) {
-    return w * LARGEST_VECTOR_WORDSIZE;
-  } else {
-    unsigned alignment = k*w*sizeof(int);
-    if ( ((w*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
-      alignment = k*w*LARGEST_VECTOR_WORDSIZE;
-    return alignment;
-  }
+  unsigned alignment = k*w*sizeof(int);
+  if ( ((w*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
+    alignment = k*w*LARGEST_VECTOR_WORDSIZE;
+  return alignment;
+
 }
 
-int ErasureCodeJerasureReedSolomonVandermonde::parse(const map<std::string,std::string> &parameters,
-						      ostream *ss)
+void ErasureCodeJerasureReedSolomonVandermonde::parse(const map<std::string,std::string> &parameters)
 {
-  int err = ErasureCodeJerasure::parse(parameters, ss);
+  k = to_int("k", parameters, DEFAULT_K);
+  m = to_int("m", parameters, DEFAULT_M);
+  w = to_int("w", parameters, DEFAULT_W);
   if (w != 8 && w != 16 && w != 32) {
-    *ss << "ReedSolomonVandermonde: w=" << w
-	<< " must be one of {8, 16, 32} : revert to DEFAULT_W " << std::endl;
-    w = DEFAULT_W;
-    err = -EINVAL;
+    derr << "ReedSolomonVandermonde: w=" << w
+	 << " must be one of {8, 16, 32} : revert to 8 " << dendl;
+    w = 8;
   }
-  err |= to_bool("jerasure-per-chunk-alignement", parameters,
-		 &per_chunk_alignment, false, ss);
-  return err;
 }
 
 void ErasureCodeJerasureReedSolomonVandermonde::prepare()
@@ -229,28 +289,22 @@ int ErasureCodeJerasureReedSolomonRAID6::jerasure_decode(int *erasures,
 
 unsigned ErasureCodeJerasureReedSolomonRAID6::get_alignment() const
 {
-  if (per_chunk_alignment) {
-    return w * LARGEST_VECTOR_WORDSIZE;
-  } else {
-    unsigned alignment = k*w*sizeof(int);
-    if ( ((w*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
-      alignment = k*w*LARGEST_VECTOR_WORDSIZE;
-    return alignment;
-  }
+  unsigned alignment = k*w*sizeof(int);
+  if ( ((w*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
+    alignment = k*w*LARGEST_VECTOR_WORDSIZE;
+  return alignment;
 }
 
-int ErasureCodeJerasureReedSolomonRAID6::parse(const map<std::string,std::string> &parameters,
-					       ostream *ss)
+void ErasureCodeJerasureReedSolomonRAID6::parse(const map<std::string,std::string> &parameters)
 {
-  int err = ErasureCodeJerasure::parse(parameters, ss);
+  k = to_int("k", parameters, DEFAULT_K);
   m = 2;
+  w = to_int("w", parameters, DEFAULT_W);
   if (w != 8 && w != 16 && w != 32) {
-    *ss << "ReedSolomonRAID6: w=" << w
-	<< " must be one of {8, 16, 32} : revert to 8 " << std::endl;
+    derr << "ReedSolomonRAID6: w=" << w
+	 << " must be one of {8, 16, 32} : revert to 8 " << dendl;
     w = 8;
-    err = -EINVAL;
   }
-  return err;
 }
 
 void ErasureCodeJerasureReedSolomonRAID6::prepare()
@@ -280,35 +334,18 @@ int ErasureCodeJerasureCauchy::jerasure_decode(int *erasures,
 
 unsigned ErasureCodeJerasureCauchy::get_alignment() const
 {
-  if (per_chunk_alignment) {
-    unsigned alignment = w * packetsize;
-    unsigned modulo = alignment % LARGEST_VECTOR_WORDSIZE;
-    if (modulo)
-      alignment += LARGEST_VECTOR_WORDSIZE - modulo;
-    return alignment;
-  } else {
-    unsigned alignment = k*w*packetsize*sizeof(int);
-    if ( ((w*packetsize*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
-      alignment = k*w*packetsize*LARGEST_VECTOR_WORDSIZE;
-    return alignment;
-  }  
+  unsigned alignment = k*w*packetsize*sizeof(int);
+  if ( ((w*packetsize*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
+    alignment = k*w*packetsize*LARGEST_VECTOR_WORDSIZE;
+  return alignment;
 }
 
-int ErasureCodeJerasureCauchy::parse(const map<std::string,std::string> &parameters,
-				     ostream *ss)
+void ErasureCodeJerasureCauchy::parse(const map<std::string,std::string> &parameters)
 {
-  int err = ErasureCodeJerasure::parse(parameters, ss);
-  if (w != 8 && w != 16 && w != 32) {
-    *ss << "Cauchy: w=" << w
-	<< " must be one of {8, 16, 32} : revert to " 
-        << DEFAULT_W << std::endl;
-    w = DEFAULT_W;
-    err = -EINVAL;
-  }
-  err |= to_int("packetsize", parameters, &packetsize, DEFAULT_PACKETSIZE, ss);
-  err |= to_bool("jerasure-per-chunk-alignement", parameters,
-		 &per_chunk_alignment, false, ss);
-  return err;
+  k = to_int("k", parameters, DEFAULT_K);
+  m = to_int("m", parameters, DEFAULT_M);
+  w = to_int("w", parameters, DEFAULT_W);
+  packetsize = to_int("packetsize", parameters, DEFAULT_PACKETSIZE);
 }
 
 void ErasureCodeJerasureCauchy::prepare_schedule(int *matrix)
@@ -373,74 +410,38 @@ unsigned ErasureCodeJerasureLiberation::get_alignment() const
   return alignment;
 }
 
-bool ErasureCodeJerasureLiberation::check_k(ostream *ss) const
+void ErasureCodeJerasureLiberation::parse(const map<std::string,std::string> &parameters)
 {
+  k = to_int("k", parameters, DEFAULT_K);
+  m = to_int("m", parameters, DEFAULT_M);
+  w = to_int("w", parameters, DEFAULT_W);
+  packetsize = to_int("packetsize", parameters, DEFAULT_PACKETSIZE);
+
+  bool error = false;
   if (k > w) {
-    *ss << "k=" << k << " must be less than or equal to w=" << w << std::endl;
-    return false;
-  } else {
-    return true;
+    derr << "k=" << k << " must be less than or equal to w=" << w << dendl;
+    error = true;
   }
-}
-
-bool ErasureCodeJerasureLiberation::check_w(ostream *ss) const
-{
   if (w <= 2 || !is_prime(w)) {
-    *ss <<  "w=" << w << " must be greater than two and be prime" << std::endl;
-    return false;
-  } else {
-    return true;
+    derr <<  "w=" << w << " must be greater than two and be prime" << dendl;
+    error = true;
   }
-}
-
-bool ErasureCodeJerasureLiberation::check_packetsize_set(ostream *ss) const
-{
   if (packetsize == 0) {
-    *ss << "packetsize=" << packetsize << " must be set" << std::endl;
-    return false;
-  } else {
-    return true;
+    derr << "packetsize=" << packetsize << " must be set" << dendl;
+    error = true;
   }
-}
-
-bool ErasureCodeJerasureLiberation::check_packetsize(ostream *ss) const
-{
   if ((packetsize%(sizeof(int))) != 0) {
-    *ss << "packetsize=" << packetsize
-	<< " must be a multiple of sizeof(int) = " << sizeof(int) << std::endl;
-    return false;
-  } else {
-    return true;
-  }
-}
-
-void ErasureCodeJerasureLiberation::revert_to_default(ostream *ss)
-{
-  *ss << "reverting to k=" << DEFAULT_K << ", w="
-      << DEFAULT_W << ", packetsize=" << DEFAULT_PACKETSIZE << std::endl;
-  k = DEFAULT_K;
-  w = DEFAULT_W;
-  packetsize = DEFAULT_PACKETSIZE;
-}
-
-int ErasureCodeJerasureLiberation::parse(const map<std::string,std::string> &parameters,
-					 ostream *ss)
-{
-  int err = ErasureCodeJerasure::parse(parameters, ss);
-  err |= to_int("packetsize", parameters, &packetsize, DEFAULT_PACKETSIZE, ss);
-
-  bool error = false;
-  if (!check_k(ss))
-    error = true;
-  if (!check_w(ss))
-    error = true;
-  if (!check_packetsize_set(ss) || !check_packetsize(ss))
+    derr << "packetsize=" << packetsize
+	 << " must be a multiple of sizeof(int) = " << sizeof(int) << dendl;
     error = true;
+  }
   if (error) {
-    revert_to_default(ss);
-    err = -EINVAL;
+    derr << "reverting to k=" << DEFAULT_K << ", w="
+	 << DEFAULT_W << ", packetsize=" << DEFAULT_PACKETSIZE << dendl;
+    k = DEFAULT_K;
+    w = DEFAULT_W;
+    packetsize = DEFAULT_PACKETSIZE;
   }
-  return err;
 }
 
 void ErasureCodeJerasureLiberation::prepare()
@@ -452,21 +453,6 @@ void ErasureCodeJerasureLiberation::prepare()
 // 
 // ErasureCodeJerasureBlaumRoth
 //
-bool ErasureCodeJerasureBlaumRoth::check_w(ostream *ss) const
-{
-  // back in Firefly, w = 7 was the default and produced useable 
-  // chunks. Tolerate this value for backward compatibility.
-  if (w == 7)
-    return true;
-  if (w <= 2 || !is_prime(w+1)) {
-    *ss <<  "w=" << w << " must be greater than two and "
-	<< "w+1 must be prime" << std::endl;
-    return false;
-  } else {
-    return true;
-  }
-}
-
 void ErasureCodeJerasureBlaumRoth::prepare()
 {
   bitmatrix = blaum_roth_coding_bitmatrix(k, w);
@@ -476,24 +462,28 @@ void ErasureCodeJerasureBlaumRoth::prepare()
 // 
 // ErasureCodeJerasureLiber8tion
 //
-int ErasureCodeJerasureLiber8tion::parse(const map<std::string,std::string> &parameters,
-					 ostream *ss)
+void ErasureCodeJerasureLiber8tion::parse(const map<std::string,std::string> &parameters)
 {
-  int err = ErasureCodeJerasure::parse(parameters, ss);
+  k = to_int("k", parameters, DEFAULT_K);
   m = DEFAULT_M;
   w = DEFAULT_W;
-  err |= to_int("packetsize", parameters, &packetsize, DEFAULT_PACKETSIZE, ss);
+  packetsize = to_int("packetsize", parameters, DEFAULT_PACKETSIZE);
 
   bool error = false;
-  if (!check_k(ss))
+  if (k > w) {
+    derr << "k=" << k << " must be less than or equal to w=" << w << dendl;
     error = true;
-  if (!check_packetsize_set(ss))
+  }
+  if (packetsize == 0) {
+    derr << "packetsize=" << packetsize << " must be set" << dendl;
     error = true;
+  }
   if (error) {
-    revert_to_default(ss);
-    err = -EINVAL;
+    derr << "reverting to k=" << DEFAULT_K << ", packetsize="
+	 << DEFAULT_PACKETSIZE << dendl;
+    k = DEFAULT_K;
+    packetsize = DEFAULT_PACKETSIZE;
   }
-  return err;
 }
 
 void ErasureCodeJerasureLiber8tion::prepare()
diff --git a/src/erasure-code/jerasure/ErasureCodeJerasure.h b/src/erasure-code/jerasure/ErasureCodeJerasure.h
index d40a03d..811bc3d 100644
--- a/src/erasure-code/jerasure/ErasureCodeJerasure.h
+++ b/src/erasure-code/jerasure/ErasureCodeJerasure.h
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
- * Copyright (C) 2013, 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
+ * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -18,36 +17,25 @@
 #ifndef CEPH_ERASURE_CODE_JERASURE_H
 #define CEPH_ERASURE_CODE_JERASURE_H
 
-#include "erasure-code/ErasureCode.h"
+#include "erasure-code/ErasureCodeInterface.h"
 
-class ErasureCodeJerasure : public ErasureCode {
+class ErasureCodeJerasure : public ErasureCodeInterface {
 public:
   int k;
-  int DEFAULT_K;
   int m;
-  int DEFAULT_M;
   int w;
-  int DEFAULT_W;
   const char *technique;
   string ruleset_root;
   string ruleset_failure_domain;
-  bool per_chunk_alignment;
 
   ErasureCodeJerasure(const char *_technique) :
-    DEFAULT_K(2),
-    DEFAULT_M(1),
-    DEFAULT_W(8),
     technique(_technique),
     ruleset_root("default"),
-    ruleset_failure_domain("host"),
-    per_chunk_alignment(false)
+    ruleset_failure_domain("host")
   {}
 
   virtual ~ErasureCodeJerasure() {}
   
-  virtual int parse(const map<std::string,std::string> &parameters,
-		    ostream *ss);
-
   virtual int create_ruleset(const string &name,
 			     CrushWrapper &crush,
 			     ostream *ss) const;
@@ -62,12 +50,21 @@ public:
 
   virtual unsigned int get_chunk_size(unsigned int object_size) const;
 
-  virtual int encode_chunks(const set<int> &want_to_encode,
-			    map<int, bufferlist> *encoded);
+  virtual int minimum_to_decode(const set<int> &want_to_read,
+                                const set<int> &available_chunks,
+                                set<int> *minimum);
+
+  virtual int minimum_to_decode_with_cost(const set<int> &want_to_read,
+                                          const map<int, int> &available,
+                                          set<int> *minimum);
+
+  virtual int encode(const set<int> &want_to_encode,
+                     const bufferlist &in,
+                     map<int, bufferlist> *encoded);
 
-  virtual int decode_chunks(const set<int> &want_to_read,
-			    const map<int, bufferlist> &chunks,
-			    map<int, bufferlist> *decoded);
+  virtual int decode(const set<int> &want_to_read,
+                     const map<int, bufferlist> &chunks,
+                     map<int, bufferlist> *decoded);
 
   void init(const map<std::string,std::string> &parameters);
   virtual void jerasure_encode(char **data,
@@ -78,22 +75,25 @@ public:
                                char **coding,
                                int blocksize) = 0;
   virtual unsigned get_alignment() const = 0;
+  virtual void parse(const map<std::string,std::string> &parameters) = 0;
   virtual void prepare() = 0;
+  static int to_int(const std::string &name,
+                    const map<std::string,std::string> &parameters,
+                    int default_value);
   static bool is_prime(int value);
 };
 
 class ErasureCodeJerasureReedSolomonVandermonde : public ErasureCodeJerasure {
 public:
+  static const int DEFAULT_K = 7;
+  static const int DEFAULT_M = 3;
+  static const int DEFAULT_W = 8;
   int *matrix;
 
   ErasureCodeJerasureReedSolomonVandermonde() :
     ErasureCodeJerasure("reed_sol_van"),
     matrix(0)
-  {
-    DEFAULT_K = 7;
-    DEFAULT_M = 3;
-    DEFAULT_W = 8;
-  }
+  { }
   virtual ~ErasureCodeJerasureReedSolomonVandermonde() {
     if (matrix)
       free(matrix);
@@ -107,22 +107,20 @@ public:
                                char **coding,
                                int blocksize);
   virtual unsigned get_alignment() const;
-  virtual int parse(const map<std::string,std::string> &parameters,
-		    ostream *ss);
+  virtual void parse(const map<std::string,std::string> &parameters);
   virtual void prepare();
 };
 
 class ErasureCodeJerasureReedSolomonRAID6 : public ErasureCodeJerasure {
 public:
+  static const int DEFAULT_K = 7;
+  static const int DEFAULT_W = 8;
   int *matrix;
 
   ErasureCodeJerasureReedSolomonRAID6() :
     ErasureCodeJerasure("reed_sol_r6_op"),
     matrix(0)
-  {
-    DEFAULT_K = 7;
-    DEFAULT_W = 8;
-  }
+  { }
   virtual ~ErasureCodeJerasureReedSolomonRAID6() {
     if (matrix)
       free(matrix);
@@ -136,13 +134,15 @@ public:
                                char **coding,
                                int blocksize);
   virtual unsigned get_alignment() const;
-  virtual int parse(const map<std::string,std::string> &parameters,
-		    ostream *ss);
+  virtual void parse(const map<std::string,std::string> &parameters);
   virtual void prepare();
 };
 
 class ErasureCodeJerasureCauchy : public ErasureCodeJerasure {
 public:
+  static const int DEFAULT_K = 7;
+  static const int DEFAULT_M = 3;
+  static const int DEFAULT_W = 8;
   static const int DEFAULT_PACKETSIZE = 2048;
   int *bitmatrix;
   int **schedule;
@@ -152,11 +152,7 @@ public:
     ErasureCodeJerasure(technique),
     bitmatrix(0),
     schedule(0)
-  {
-    DEFAULT_K = 7;
-    DEFAULT_M = 3;
-    DEFAULT_W = 8;
-  }
+  { }
   virtual ~ErasureCodeJerasureCauchy() {
     if (bitmatrix)
       free(bitmatrix);
@@ -172,8 +168,7 @@ public:
                                char **coding,
                                int blocksize);
   virtual unsigned get_alignment() const;
-  virtual int parse(const map<std::string,std::string> &parameters,
-		    ostream *ss);
+  virtual void parse(const map<std::string,std::string> &parameters);
   void prepare_schedule(int *matrix);
 };
 
@@ -197,6 +192,9 @@ public:
 
 class ErasureCodeJerasureLiberation : public ErasureCodeJerasure {
 public:
+  static const int DEFAULT_K = 2;
+  static const int DEFAULT_M = 2;
+  static const int DEFAULT_W = 7;
   static const int DEFAULT_PACKETSIZE = 2048;
   int *bitmatrix;
   int **schedule;
@@ -206,11 +204,7 @@ public:
     ErasureCodeJerasure(technique),
     bitmatrix(0),
     schedule(0)
-  {
-    DEFAULT_K = 2;
-    DEFAULT_M = 2;
-    DEFAULT_W = 7;
-  }
+  { }
   virtual ~ErasureCodeJerasureLiberation();
 
   virtual void jerasure_encode(char **data,
@@ -221,13 +215,7 @@ public:
                                char **coding,
                                int blocksize);
   virtual unsigned get_alignment() const;
-  virtual bool check_k(ostream *ss) const;
-  virtual bool check_w(ostream *ss) const;
-  virtual bool check_packetsize_set(ostream *ss) const;
-  virtual bool check_packetsize(ostream *ss) const;
-  virtual void revert_to_default(ostream *ss);
-  virtual int parse(const map<std::string,std::string> &parameters,
-		    ostream *ss);
+  virtual void parse(const map<std::string,std::string> &parameters);
   virtual void prepare();
 };
 
@@ -235,25 +223,22 @@ class ErasureCodeJerasureBlaumRoth : public ErasureCodeJerasureLiberation {
 public:
   ErasureCodeJerasureBlaumRoth() :
     ErasureCodeJerasureLiberation("blaum_roth")
-  {
-  }
+  {}
 
-  virtual bool check_w(ostream *ss) const;
   virtual void prepare();
 };
 
 class ErasureCodeJerasureLiber8tion : public ErasureCodeJerasureLiberation {
 public:
+  static const int DEFAULT_K = 2;
+  static const int DEFAULT_M = 2;
+  static const int DEFAULT_W = 8;
+
   ErasureCodeJerasureLiber8tion() :
     ErasureCodeJerasureLiberation("liber8tion")
-  {
-    DEFAULT_K = 2;
-    DEFAULT_M = 2;
-    DEFAULT_W = 8;
-  }
+  {}
 
-  virtual int parse(const map<std::string,std::string> &parameters,
-		    ostream *ss);
+  virtual void parse(const map<std::string,std::string> &parameters);
   virtual void prepare();
 };
 
diff --git a/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc b/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc
index e5f8b83..3d5d3e6 100644
--- a/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc
+++ b/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,7 +14,6 @@
  * 
  */
 
-#include "ceph_ver.h"
 #include "common/debug.h"
 #include "erasure-code/ErasureCodePlugin.h"
 #include "ErasureCodeJerasure.h"
@@ -72,17 +70,19 @@ extern gf_t *gfp_array[];
 extern int  gfp_is_composite[];
 }
 
-const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
   int w[] = { 4, 8, 16, 32 };
   for(int i = 0; i < 4; i++) {
-    int r = galois_init_default_field(w[i]);
-    if (r) {
-      derr << "failed to gf_init_easy(" << w[i] << ")" << dendl;
-      return -r;
+    if (gfp_array[w[i]] == NULL) {
+      gfp_array[w[i]] = (gf_t*)malloc(sizeof(gf_t));
+      assert(gfp_array[w[i]]);
+      gfp_is_composite[w[i]] = 0;
+      if (!gf_init_easy(gfp_array[w[i]], w[i])) {
+	derr << "failed to gf_init_easy(" << w[i] << ")" << dendl;
+	return -EINVAL;
+      }
     }
   }
   return instance.add(plugin_name, new ErasureCodePluginJerasure());
diff --git a/src/erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc b/src/erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
index 53c7026..6e2f16c 100644
--- a/src/erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
+++ b/src/erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,7 +14,6 @@
  * 
  */
 
-#include "ceph_ver.h"
 #include "common/debug.h"
 #include "arch/probe.h"
 #include "arch/intel.h"
@@ -30,44 +28,33 @@ static ostream& _prefix(std::ostream* _dout)
   return *_dout << "ErasureCodePluginSelectJerasure: ";
 }
 
-static string get_variant() {
-  ceph_arch_probe();
-    
-  if (ceph_arch_intel_pclmul &&
-      ceph_arch_intel_sse42 &&
-      ceph_arch_intel_sse41 &&
-      ceph_arch_intel_ssse3 &&
-      ceph_arch_intel_sse3 &&
-      ceph_arch_intel_sse2) {
-    return "sse4";
-  } else if (ceph_arch_intel_ssse3 &&
-	     ceph_arch_intel_sse3 &&
-	     ceph_arch_intel_sse2) {
-    return "sse3";
-  } else {
-    return "generic";
-  }
-}
-
 class ErasureCodePluginSelectJerasure : public ErasureCodePlugin {
 public:
-  virtual int factory(const map<string,string> &parameters,
+  virtual int factory(const map<std::string,std::string> &parameters,
 		      ErasureCodeInterfaceRef *erasure_code) {
     ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
     stringstream ss;
     int ret;
+    ceph_arch_probe();
     string name = "jerasure";
     if (parameters.count("jerasure-name"))
       name = parameters.find("jerasure-name")->second;
-    if (parameters.count("jerasure-variant")) {
-      dout(10) << "jerasure-variant " 
-	       << parameters.find("jerasure-variant")->second << dendl;
-      ret = instance.factory(name + "_" + parameters.find("jerasure-variant")->second,
-			     parameters, erasure_code, ss);
+    if (ceph_arch_intel_pclmul &&
+	ceph_arch_intel_sse42 &&
+	ceph_arch_intel_sse41 &&
+	ceph_arch_intel_ssse3 &&
+	ceph_arch_intel_sse3 &&
+	ceph_arch_intel_sse2) {
+      dout(10) << "SSE4 plugin" << dendl;
+      ret = instance.factory(name + "_sse4", parameters, erasure_code, ss);
+    } else if (ceph_arch_intel_ssse3 &&
+	       ceph_arch_intel_sse3 &&
+	       ceph_arch_intel_sse2) {
+      dout(10) << "SSE3 plugin" << dendl;
+      ret = instance.factory(name + "_sse3", parameters, erasure_code, ss);
     } else {
-      string variant = get_variant();
-      dout(10) << variant << " plugin" << dendl;
-      ret = instance.factory(name + "_" + variant, parameters, erasure_code, ss);
+      dout(10) << "generic plugin" << dendl;
+      ret = instance.factory(name + "_generic", parameters, erasure_code, ss);
     }
     if (ret)
       derr << ss.str() << dendl;
@@ -75,20 +62,8 @@ public:
   }
 };
 
-const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
-  string variant = get_variant();
-  ErasureCodePlugin *plugin;
-  stringstream ss;
-  int r = instance.load(plugin_name + string("_") + variant,
-			directory, &plugin, ss);
-  if (r) {
-    derr << ss.str() << dendl;
-    return r;
-  }
-  dout(10) << ss.str() << dendl;
   return instance.add(plugin_name, new ErasureCodePluginSelectJerasure());
 }
diff --git a/src/erasure-code/jerasure/Makefile.am b/src/erasure-code/jerasure/Makefile.am
index 86763af..e16fe07 100644
--- a/src/erasure-code/jerasure/Makefile.am
+++ b/src/erasure-code/jerasure/Makefile.am
@@ -13,7 +13,6 @@ noinst_HEADERS += \
   erasure-code/jerasure/ErasureCodeJerasure.h
 
 jerasure_sources = \
-  erasure-code/ErasureCode.cc \
   erasure-code/jerasure/jerasure/src/cauchy.c \
   erasure-code/jerasure/jerasure/src/galois.c \
   erasure-code/jerasure/jerasure/src/jerasure.c \
@@ -33,15 +32,13 @@ jerasure_sources = \
   erasure-code/jerasure/ErasureCodePluginJerasure.cc \
   erasure-code/jerasure/ErasureCodeJerasure.cc
 
-erasure-code/jerasure/ErasureCodePluginJerasure.cc: ./ceph_ver.h
-
 libec_jerasure_generic_la_SOURCES = ${jerasure_sources}
 libec_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}  \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 libec_jerasure_generic_la_CXXFLAGS= ${AM_CXXFLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 libec_jerasure_generic_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_generic_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0
 if LINUX
@@ -56,15 +53,15 @@ libec_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 libec_jerasure_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
 	${INTEL_SSE3_FLAGS} \
 	${INTEL_SSSE3_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 libec_jerasure_sse3_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_sse3_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0
 if LINUX
@@ -81,8 +78,8 @@ libec_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS}  \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
 	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 libec_jerasure_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSE_FLAGS} \
 	${INTEL_SSE2_FLAGS} \
@@ -90,8 +87,8 @@ libec_jerasure_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
 	${INTEL_SSSE3_FLAGS} \
 	${INTEL_SSE4_1_FLAGS} \
 	${INTEL_SSE4_2_FLAGS} \
-	-I$(srcdir)/erasure-code/jerasure/gf-complete/include \
-	-I$(srcdir)/erasure-code/jerasure/jerasure/include
+	-Ierasure-code/jerasure/gf-complete/include \
+	-Ierasure-code/jerasure/jerasure/include
 libec_jerasure_sse4_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_sse4_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0
 if LINUX
@@ -102,7 +99,7 @@ erasure_codelib_LTLIBRARIES += libec_jerasure_sse4.la
 
 libec_jerasure_la_SOURCES = \
 	erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc
-libec_jerasure_la_CFLAGS = ${AM_CFLAGS}
+libec_jerasure_la_CFLAGS = ${AM_CFLAGS} 
 libec_jerasure_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_jerasure_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_jerasure_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0
@@ -110,6 +107,4 @@ if LINUX
 libec_jerasure_la_LDFLAGS += -export-symbols-regex '.*__erasure_code_.*'
 endif
 
-erasure-code/jerasure/ErasureCodePluginSelectJerasure.cc: ./ceph_ver.h
-
 erasure_codelib_LTLIBRARIES += libec_jerasure.la
diff --git a/src/erasure-code/jerasure/jerasure/include/galois.h b/src/erasure-code/jerasure/jerasure/include/galois.h
index b57ef3c..d75be6a 100644
--- a/src/erasure-code/jerasure/jerasure/include/galois.h
+++ b/src/erasure-code/jerasure/jerasure/include/galois.h
@@ -45,7 +45,6 @@
 #include <stdlib.h>
 #include <gf_complete.h>
 
-extern int galois_init_default_field(int w);
 extern void galois_change_technique(gf_t *gf, int w);
 
 extern int galois_single_multiply(int a, int b, int w);
diff --git a/src/erasure-code/jerasure/jerasure/src/galois.c b/src/erasure-code/jerasure/jerasure/src/galois.c
index 95d72bc..398a649 100644
--- a/src/erasure-code/jerasure/jerasure/src/galois.c
+++ b/src/erasure-code/jerasure/jerasure/src/galois.c
@@ -47,7 +47,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
 
 #include "galois.h"
 
@@ -169,34 +168,24 @@ gf_t* galois_init_composite_field(int w,
   return gfp;
 }
 
-int galois_init_default_field(int w)
-{
-  if (gfp_array[w] == NULL) {
-    gfp_array[w] = (gf_t*)malloc(sizeof(gf_t));
-    if(gfp_array[w] == NULL)
-      return ENOMEM;
-    if (!gf_init_easy(gfp_array[w], w))
-      return EINVAL;
-  }
-  return 0;
-}
-
-static void galois_init(int w)
+static void galois_init_default_field(int w)
 {
   if (w <= 0 || w > 32) {
     fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w);
     exit(1);
   }
 
-  switch (galois_init_default_field(w)) {
-  case ENOMEM:
-    fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w);
-    exit(1);
-    break;
-  case EINVAL:
+  if (gfp_array[w] == NULL) {
+    gfp_array[w] = (gf_t*)malloc(sizeof(gf_t));
+    if (gfp_array[w] == NULL) {
+      fprintf(stderr, "ERROR -- cannot allocate memory for Galois field w=%d\n", w);
+      exit(1);
+    }
+  }
+
+  if (!gf_init_easy(gfp_array[w], w)) {
     fprintf(stderr, "ERROR -- cannot init default Galois field for w=%d\n", w);
     exit(1);
-    break;
   }
 }
 
@@ -254,7 +243,7 @@ int galois_single_multiply(int x, int y, int w)
   if (x == 0 || y == 0) return 0;
   
   if (gfp_array[w] == NULL) {
-    galois_init(w);
+    galois_init_default_field(w);
   }
 
   if (w <= 32) {
@@ -271,7 +260,7 @@ int galois_single_divide(int x, int y, int w)
   if (y == 0) return -1;
 
   if (gfp_array[w] == NULL) {
-    galois_init(w);
+    galois_init_default_field(w);
   }
 
   if (w <= 32) {
@@ -289,7 +278,7 @@ void galois_w08_region_multiply(char *region,      /* Region to multiply */
                                   int add)
 {
   if (gfp_array[8] == NULL) {
-    galois_init(8);
+    galois_init_default_field(8);
   }
   gfp_array[8]->multiply_region.w32(gfp_array[8], region, r2, multby, nbytes, add);
 }
@@ -301,7 +290,7 @@ void galois_w16_region_multiply(char *region,      /* Region to multiply */
                                   int add)
 {
   if (gfp_array[16] == NULL) {
-    galois_init(16);
+    galois_init_default_field(16);
   }
   gfp_array[16]->multiply_region.w32(gfp_array[16], region, r2, multby, nbytes, add);
 }
@@ -314,7 +303,7 @@ void galois_w32_region_multiply(char *region,      /* Region to multiply */
                                   int add)
 {
   if (gfp_array[32] == NULL) {
-    galois_init(32);
+    galois_init_default_field(32);
   }
   gfp_array[32]->multiply_region.w32(gfp_array[32], region, r2, multby, nbytes, add);
 }
@@ -322,7 +311,7 @@ void galois_w32_region_multiply(char *region,      /* Region to multiply */
 void galois_w8_region_xor(void *src, void *dest, int nbytes)
 {
   if (gfp_array[8] == NULL) {
-    galois_init(8);
+    galois_init_default_field(8);
   }
   gfp_array[8]->multiply_region.w32(gfp_array[32], src, dest, 1, nbytes, 1);
 }
@@ -330,7 +319,7 @@ void galois_w8_region_xor(void *src, void *dest, int nbytes)
 void galois_w16_region_xor(void *src, void *dest, int nbytes)
 {
   if (gfp_array[16] == NULL) {
-    galois_init(16);
+    galois_init_default_field(16);
   }
   gfp_array[16]->multiply_region.w32(gfp_array[16], src, dest, 1, nbytes, 1);
 }
@@ -338,7 +327,7 @@ void galois_w16_region_xor(void *src, void *dest, int nbytes)
 void galois_w32_region_xor(void *src, void *dest, int nbytes)
 {
   if (gfp_array[32] == NULL) {
-    galois_init(32);
+    galois_init_default_field(32);
   }
   gfp_array[32]->multiply_region.w32(gfp_array[32], src, dest, 1, nbytes, 1);
 }
diff --git a/src/erasure-code/lrc/ErasureCodeLrc.cc b/src/erasure-code/lrc/ErasureCodeLrc.cc
deleted file mode 100644
index dd16252..0000000
--- a/src/erasure-code/lrc/ErasureCodeLrc.cc
+++ /dev/null
@@ -1,838 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-#include <algorithm>
-
-#include "include/str_map.h"
-#include "common/debug.h"
-#include "crush/CrushWrapper.h"
-#include "osd/osd_types.h"
-#include "include/stringify.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#include "json_spirit/json_spirit_writer.h"
-
-#include "ErasureCodeLrc.h"
-
-// re-include our assert to clobber boost's
-#include "include/assert.h"
-
-#define dout_subsys ceph_subsys_osd
-#undef dout_prefix
-#define dout_prefix _prefix(_dout)
-
-static ostream& _prefix(std::ostream* _dout)
-{
-  return *_dout << "ErasureCodeLrc: ";
-}
-
-int ErasureCodeLrc::create_ruleset(const string &name,
-				   CrushWrapper &crush,
-				   ostream *ss) const
-{
-  if (crush.rule_exists(name)) {
-    *ss << "rule " << name << " exists";
-    return -EEXIST;
-  }
-  if (!crush.name_exists(ruleset_root)) {
-    *ss << "root item " << ruleset_root << " does not exist";
-    return -ENOENT;
-  }
-  int root = crush.get_item_id(ruleset_root);
-
-  int ruleset = 0;
-  int rno = 0;
-  for (rno = 0; rno < crush.get_max_rules(); rno++) {
-    if (!crush.rule_exists(rno) && !crush.ruleset_exists(rno))
-       break;
-  }
-  ruleset = rno;
-
-  int steps = 3 + ruleset_steps.size();
-  int min_rep = 3;
-  int max_rep = 30;
-  int ret;
-  ret = crush.add_rule(steps, ruleset, pg_pool_t::TYPE_ERASURE,
-		  min_rep, max_rep, rno);
-  assert(ret == rno);
-  int step = 0;
-
-  ret = crush.set_rule_step(rno, step++, CRUSH_RULE_SET_CHOOSELEAF_TRIES, 5, 0);
-  assert(ret == 0);
-  ret = crush.set_rule_step(rno, step++, CRUSH_RULE_TAKE, root, 0);
-  assert(ret == 0);
-  // [ [ "choose", "rack", 2 ],
-  //   [ "chooseleaf", "host", 5 ] ]
-  for (vector<Step>::const_iterator i = ruleset_steps.begin();
-       i != ruleset_steps.end();
-       ++i) {
-    int op = i->op == "chooseleaf" ?
-      CRUSH_RULE_CHOOSELEAF_INDEP : CRUSH_RULE_CHOOSE_INDEP;
-    int type = crush.get_type_id(i->type);
-    if (type < 0) {
-      *ss << "unknown crush type " << i->type;
-      return -EINVAL;
-    }
-    ret = crush.set_rule_step(rno, step++, op, i->n, type);
-    assert(ret == 0);
-  }
-  ret = crush.set_rule_step(rno, step++, CRUSH_RULE_EMIT, 0, 0);
-  assert(ret == 0);
-  crush.set_rule_name(rno, name);
-  return ruleset;
-}
-
-int ErasureCodeLrc::layers_description(const map<string,string> &parameters,
-				       json_spirit::mArray *description,
-				       ostream *ss) const
-{
-  if (parameters.count("layers") == 0) {
-    *ss << "could not find 'layers' in " << parameters << std::endl;
-    return ERROR_LRC_DESCRIPTION;
-  }
-  string str = parameters.find("layers")->second;
-  try {
-    json_spirit::mValue json;
-    json_spirit::read_or_throw(str, json);
-
-    if (json.type() != json_spirit::array_type) {
-      *ss << "layers='" << str
-	  << "' must be a JSON array but is of type "
-	  << json.type() << " instead" << std::endl;
-      return ERROR_LRC_ARRAY;
-    }
-    *description = json.get_array();
-  } catch (json_spirit::Error_position &e) {
-    *ss << "failed to parse layers='" << str << "'"
-	<< " at line " << e.line_ << ", column " << e.column_
-	<< " : " << e.reason_ << std::endl;
-    return ERROR_LRC_PARSE_JSON;
-  }
-  return 0;
-}
-
-int ErasureCodeLrc::layers_parse(string description_string,
-				 json_spirit::mArray description,
-				 ostream *ss)
-{
-  int position = 0;
-  for (vector<json_spirit::mValue>::iterator i = description.begin();
-       i != description.end();
-       ++i, position++) {
-    if (i->type() != json_spirit::array_type) {
-      stringstream json_string;
-      json_spirit::write(*i, json_string);
-      *ss << "each element of the array "
-	  << description_string << " must be a JSON array but "
-	  << json_string.str() << " at position " << position
-	  << " is of type " << i->type() << " instead" << std::endl;
-      return ERROR_LRC_ARRAY;
-    }
-    json_spirit::mArray layer_json = i->get_array();
-    map<string, string> parameters;
-    int index = 0;
-    for (vector<json_spirit::mValue>::iterator j = layer_json.begin();
-	 j != layer_json.end();
-	 ++j, ++index) {
-      if (index == 0) {
-	if (j->type() != json_spirit::str_type) {
-	  stringstream element;
-	  json_spirit::write(*j, element);
-	  *ss << "the first element of the entry "
-	      << element.str() << " (first is zero) "
-	      << position << " in " << description_string
-	      << " is of type " << (*j).type() << " instead of string" << std::endl;
-	  return ERROR_LRC_STR;
-	}
-	layers.push_back(Layer(j->get_str()));
-	Layer &layer = layers.back();
-	layer.chunks_map = j->get_str();
-      } else if(index == 1) {
-	Layer &layer = layers.back();
-	if (j->type() != json_spirit::str_type &&
-	    j->type() != json_spirit::obj_type) {
-	  stringstream element;
-	  json_spirit::write(*j, element);
-	  *ss << "the second element of the entry "
-	      << element.str() << " (first is zero) "
-	      << position << " in " << description_string
-	      << " is of type " << (*j).type() << " instead of string or object"
-	      << std::endl;
-	  return ERROR_LRC_CONFIG_OPTIONS;
-	}
-	if (j->type() == json_spirit::str_type) {
-	  int err = get_json_str_map(j->get_str(), *ss, &layer.parameters);
-	  if (err)
-	    return err;
-	} else if (j->type() == json_spirit::obj_type) {
-	  json_spirit::mObject o = j->get_obj();
-
-	  for (map<string, json_spirit::mValue>::iterator i = o.begin();
-	       i != o.end();
-	       ++i) {
-	    layer.parameters[i->first] = i->second.get_str();
-	  }
-	}
-      } else {
-	  // ignore trailing elements
-      }
-    }
-  }
-  return 0;
-}
-
-int ErasureCodeLrc::layers_init()
-{
-  ErasureCodePluginRegistry &registry = ErasureCodePluginRegistry::instance();
-  int err;
-  for (unsigned int i = 0; i < layers.size(); i++) {
-    Layer &layer = layers[i];
-    int position = 0;
-    for(std::string::iterator it = layer.chunks_map.begin();
-	it != layer.chunks_map.end();
-	++it) {
-      if (*it == 'D')
-	layer.data.push_back(position);
-      if (*it == 'c')
-	layer.coding.push_back(position);
-      if (*it == 'c' || *it == 'D')
-	layer.chunks_as_set.insert(position);
-      position++;
-    }
-    layer.chunks = layer.data;
-    layer.chunks.insert(layer.chunks.end(),
-			layer.coding.begin(), layer.coding.end());
-    if (layer.parameters.find("k") == layer.parameters.end())
-      layer.parameters["k"] = stringify(layer.data.size());
-    if (layer.parameters.find("m") == layer.parameters.end())
-      layer.parameters["m"] = stringify(layer.coding.size());
-    if (layer.parameters.find("plugin") == layer.parameters.end())
-      layer.parameters["plugin"] = "jerasure";
-    if (layer.parameters.find("technique") == layer.parameters.end())
-      layer.parameters["technique"] = "reed_sol_van";
-    if (layer.parameters.find("directory") == layer.parameters.end())
-      layer.parameters["directory"] = directory;
-    stringstream ss;
-    err = registry.factory(layer.parameters["plugin"],
-			   layer.parameters,
-			   &layer.erasure_code,
-			   ss);
-    if (err) {
-      derr << ss.str() << dendl;
-      return err;
-    }
-  }
-  return 0;
-}
-
-int ErasureCodeLrc::layers_sanity_checks(string description_string,
-					 ostream *ss) const
-{
-  int position = 0;
-
-  if (layers.size() < 1) {
-    *ss << "layers parameter has " << layers.size()
-	<< " which is less than the minimum of one. "
-	<< description_string << std::endl;
-    return ERROR_LRC_LAYERS_COUNT;
-  }
-  for (vector<Layer>::const_iterator layer = layers.begin();
-       layer != layers.end();
-       ++layer) {
-    if (chunk_count != layer->chunks_map.length()) {
-      *ss << "the first element of the array at position "
-	  << position << " (starting from zero) "
-	  << " is the string '" << layer->chunks_map
-	  << " found in the layers parameter "
-	  << description_string << ". It is expected to be "
-	  << chunk_count << " characters long but is "
-	  << layer->chunks_map.length() << " characters long instead "
-	  << std::endl;
-      return ERROR_LRC_MAPPING_SIZE;
-    }
-  }
-  return 0;
-}
-
-int ErasureCodeLrc::parse(const map<string,string> &parameters,
-			  ostream *ss)
-{
-  int r = ErasureCode::parse(parameters, ss);
-  if (r)
-    return r;
-
-  if (parameters.count("directory") != 0)
-    directory = parameters.find("directory")->second;
-
-  return parse_ruleset(parameters, ss);
-}
-
-int ErasureCodeLrc::parse_kml(map<string,string> &parameters,
-			      ostream *ss)
-{
-  int err = ErasureCode::parse(parameters, ss);
-  const int DEFAULT = -1;
-  int k, m, l;
-  err |= to_int("k", parameters, &k, DEFAULT, ss);
-  err |= to_int("m", parameters, &m, DEFAULT, ss);
-  err |= to_int("l", parameters, &l, DEFAULT, ss);
-
-  if (k == DEFAULT && m == DEFAULT && l == DEFAULT)
-    return 0;
-
-  if ((k != DEFAULT || m != DEFAULT || l != DEFAULT) &&
-      (k == DEFAULT || m == DEFAULT || l == DEFAULT)) {
-    *ss << "All of k, m, l must be set or none of them in "
-	<< parameters << std::endl;
-    return ERROR_LRC_ALL_OR_NOTHING;
-  }
-
-  const char *generated[] = { "mapping",
-			      "layers",
-			      "ruleset-steps" };
-
-  for (int i = 0; i < 3; i++) {
-    if (parameters.count(generated[i])) {
-      *ss << "The " << generated[i] << " parameter cannot be set "
-	  << "when k, m, l are set in " << parameters << std::endl;
-      return ERROR_LRC_GENERATED;
-    }
-  }
-
-  if ((k + m) % l) {
-    *ss << "k + m must be a multiple of l in "
-	<< parameters << std::endl;
-    return ERROR_LRC_K_M_MODULO;
-  }
-
-  int local_group_count = (k + m) / l;
-
-  if (k % local_group_count) {
-    *ss << "k must be a multiple of (k + m) / l in "
-	<< parameters << std::endl;
-    return ERROR_LRC_K_MODULO;
-  }
-
-  if (m % local_group_count) {
-    *ss << "m must be a multiple of (k + m) / l in "
-	<< parameters << std::endl;
-    return ERROR_LRC_M_MODULO;
-  }
-
-  string mapping;
-  for (int i = 0; i < local_group_count; i++) {
-    mapping += string(k / local_group_count, 'D') +
-      string(m / local_group_count, '_') + "_";
-  }
-  parameters["mapping"] = mapping;
-
-  string layers = "[ ";
-
-  // global layer
-  layers += " [ \"";
-  for (int i = 0; i < local_group_count; i++) {
-    layers += string(k / local_group_count, 'D') +
-      string(m / local_group_count, 'c') + "_";
-  }
-  layers += "\", \"\" ],";
-
-  // local layers
-  for (int i = 0; i < local_group_count; i++) {
-    layers += " [ \"";
-    for (int j = 0; j < local_group_count; j++) {
-      if (i == j)
-	layers += string(l, 'D') + "c";
-      else
-	layers += string(l + 1, '_');
-    }
-    layers += "\", \"\" ],";
-  }
-  parameters["layers"] = layers + "]";
-
-  map<string,string>::const_iterator parameter;
-  string ruleset_locality;
-  parameter = parameters.find("ruleset-locality");
-  if (parameter != parameters.end())
-    ruleset_locality = parameter->second;
-  string ruleset_failure_domain = "host";
-  parameter = parameters.find("ruleset-failure-domain");
-  if (parameter != parameters.end())
-    ruleset_failure_domain = parameter->second;
-
-  if (ruleset_locality != "") {
-    ruleset_steps.clear();
-    ruleset_steps.push_back(Step("choose", ruleset_locality,
-				 local_group_count));
-    ruleset_steps.push_back(Step("chooseleaf", ruleset_failure_domain,
-				 l + 1));
-  } else if (ruleset_failure_domain != "") {
-    ruleset_steps.clear();
-    ruleset_steps.push_back(Step("chooseleaf", ruleset_failure_domain, 0));
-  }
-
-  return 0;
-}
-
-int ErasureCodeLrc::parse_ruleset(const map<string,string> &parameters,
-				  ostream *ss)
-{
-  map<string,string>::const_iterator parameter;
-  parameter = parameters.find("ruleset-root");
-  if (parameter != parameters.end())
-    ruleset_root = parameter->second;
-
-  if (parameters.count("ruleset-steps") != 0) {
-    ruleset_steps.clear();
-    string str = parameters.find("ruleset-steps")->second;
-    json_spirit::mArray description;
-    try {
-      json_spirit::mValue json;
-      json_spirit::read_or_throw(str, json);
-
-      if (json.type() != json_spirit::array_type) {
-	*ss << "ruleset-steps='" << str
-	    << "' must be a JSON array but is of type "
-	    << json.type() << " instead" << std::endl;
-	return ERROR_LRC_ARRAY;
-      }
-      description = json.get_array();
-    } catch (json_spirit::Error_position &e) {
-      *ss << "failed to parse ruleset-steps='" << str << "'"
-	  << " at line " << e.line_ << ", column " << e.column_
-	  << " : " << e.reason_ << std::endl;
-      return ERROR_LRC_PARSE_JSON;
-    }
-
-    int position = 0;
-    for (vector<json_spirit::mValue>::iterator i = description.begin();
-	 i != description.end();
-	 ++i, position++) {
-      if (i->type() != json_spirit::array_type) {
-	stringstream json_string;
-	json_spirit::write(*i, json_string);
-	*ss << "element of the array "
-	    << str << " must be a JSON array but "
-	    << json_string.str() << " at position " << position
-	    << " is of type " << i->type() << " instead" << std::endl;
-	return ERROR_LRC_ARRAY;
-      }
-      int r = parse_ruleset_step(str, i->get_array(), ss);
-      if (r)
-	return r;
-    }
-  }
-  return 0;
-}
-
-int ErasureCodeLrc::parse_ruleset_step(string description_string,
-				       json_spirit::mArray description,
-				       ostream *ss)
-{
-  stringstream json_string;
-  json_spirit::write(description, json_string);
-  string op;
-  string type;
-  int n = 0;
-  int position = 0;
-  for (vector<json_spirit::mValue>::iterator i = description.begin();
-       i != description.end();
-       ++i, position++) {
-    if ((position == 0 || position == 1) &&
-	i->type() != json_spirit::str_type) {
-      *ss << "element " << position << " of the array "
-	  << json_string.str() << " found in " << description_string
-	  << " must be a JSON string but is of type "
-	  << i->type() << " instead" << std::endl;
-      return position == 0 ? ERROR_LRC_RULESET_OP : ERROR_LRC_RULESET_TYPE;
-    }
-    if (position == 2 && i->type() != json_spirit::int_type) {
-      *ss << "element " << position << " of the array "
-	  << json_string.str() << " found in " << description_string
-	  << " must be a JSON int but is of type "
-	  << i->type() << " instead" << std::endl;
-      return ERROR_LRC_RULESET_N;
-    }
-
-    if (position == 0)
-      op = i->get_str();
-    if (position == 1)
-      type = i->get_str();
-    if (position == 2)
-      n = i->get_int();
-  }
-  ruleset_steps.push_back(Step(op, type, n));
-  return 0;
-}
-
-int ErasureCodeLrc::init(const map<string,string> &parameters,
-			 ostream *ss)
-{
-  int r;
-
-  map<string,string> parameters_rw = parameters;
-  r = parse_kml(parameters_rw, ss);
-  if (r)
-    return r;
-
-  r = parse(parameters_rw, ss);
-  if (r)
-    return r;
-
-  json_spirit::mArray description;
-  r = layers_description(parameters_rw, &description, ss);
-  if (r)
-    return r;
-
-  string description_string = parameters_rw.find("layers")->second;
-
-  dout(10) << "init(" << description_string << ")" << dendl;
-
-  r = layers_parse(description_string, description, ss);
-  if (r)
-    return r;
-
-  r = layers_init();
-  if (r)
-    return r;
-
-  if (parameters_rw.count("mapping") == 0) {
-    *ss << "the 'mapping' parameter is missing from " << parameters_rw;
-    return ERROR_LRC_MAPPING;
-  }
-  string mapping = parameters_rw.find("mapping")->second;
-  data_chunk_count = 0;
-  for(std::string::iterator it = mapping.begin(); it != mapping.end(); ++it) {
-    if (*it == 'D')
-      data_chunk_count++;
-  }
-  chunk_count = mapping.length();
-
-  return layers_sanity_checks(description_string, ss);
-}
-
-set<int> ErasureCodeLrc::get_erasures(const set<int> &want,
-				      const set<int> &available) const
-{
-  set<int> result;
-  set_difference(want.begin(), want.end(),
-		 available.begin(), available.end(),
-		 inserter(result, result.end()));
-  return result;
-}
-
-unsigned int ErasureCodeLrc::get_chunk_size(unsigned int object_size) const
-{
-  return layers.front().erasure_code->get_chunk_size(object_size);
-}
-
-void p(const set<int> &s) { cerr << s; } // for gdb
-
-int ErasureCodeLrc::minimum_to_decode(const set<int> &want_to_read,
-				      const set<int> &available_chunks,
-				      set<int> *minimum)
-{
-  dout(20) << __func__ << " want_to_read " << want_to_read
-	   << " available_chunks " << available_chunks << dendl;
-  {
-    set<int> erasures_total;
-    set<int> erasures_not_recovered;
-    set<int> erasures_want;
-    for (unsigned int i = 0; i < get_chunk_count(); ++i) {
-      if (available_chunks.count(i) == 0) {
-	erasures_total.insert(i);
-	erasures_not_recovered.insert(i);
-	if (want_to_read.count(i) != 0)
-	  erasures_want.insert(i);
-      }
-    }
-
-    //
-    // Case 1:
-    //
-    // When no chunk is missing there is no need to read more than what
-    // is wanted.
-    //
-    if (erasures_want.empty()) {
-      *minimum = want_to_read;
-      dout(20) << __func__ << " minimum == want_to_read == "
-	       << want_to_read << dendl;
-      return 0;
-    }
-
-    //
-    // Case 2:
-    //
-    // Try to recover erasures with as few chunks as possible.
-    //
-    for (vector<Layer>::reverse_iterator i = layers.rbegin();
-	 i != layers.rend();
-	 ++i) {
-      //
-      // If this layer has no chunk that we want, skip it.
-      //
-      set<int> layer_want;
-      set_intersection(want_to_read.begin(), want_to_read.end(),
-		       i->chunks_as_set.begin(), i->chunks_as_set.end(),
-		       inserter(layer_want, layer_want.end()));
-      if (layer_want.empty())
-	continue;
-      //
-      // Are some of the chunks we want missing ?
-      //
-      set<int> layer_erasures;
-      set_intersection(layer_want.begin(), layer_want.end(),
-		       erasures_want.begin(), erasures_want.end(),
-		       inserter(layer_erasures, layer_erasures.end()));
-      set<int> layer_minimum;
-      if (layer_erasures.empty()) {
-	//
-	// The chunks we want are available, this is the minimum we need
-	// to read.
-	//
-	layer_minimum = layer_want;
-      } else {
-	set<int> erasures;
-	set_intersection(i->chunks_as_set.begin(), i->chunks_as_set.end(),
-			 erasures_not_recovered.begin(), erasures_not_recovered.end(),
-			 inserter(erasures, erasures.end()));
-
-	if (erasures.size() > i->erasure_code->get_coding_chunk_count()) {
-	  //
-	  // There are too many erasures for this layer to recover: skip
-	  // it and hope that an upper layer will be do better.
-	  //
-	  continue;
-	} else {
-	  //
-	  // Get all available chunks in that layer to recover the
-	  // missing one(s).
-	  //
-	  set_difference(i->chunks_as_set.begin(), i->chunks_as_set.end(),
-			 erasures_not_recovered.begin(), erasures_not_recovered.end(),
-			 inserter(layer_minimum, layer_minimum.end()));
-	  //
-	  // Chunks recovered by this layer are removed from the list of
-	  // erasures so that upper levels do not attempt to recover
-	  // them.
-	  //
-	  for (set<int>::const_iterator j = erasures.begin();
-	       j != erasures.end();
-	       ++j) {
-	    erasures_not_recovered.erase(*j);
-	    if (erasures_want.count(*j))
-	      erasures_want.erase(*j);
-	  }
-	}
-      }
-      minimum->insert(layer_minimum.begin(), layer_minimum.end());
-    }
-    if (erasures_want.empty()) {
-      minimum->insert(want_to_read.begin(), want_to_read.end());
-      for (set<int>::const_iterator i = erasures_total.begin();
-	   i != erasures_total.end();
-	   ++i) {
-	if (minimum->count(*i))
-	  minimum->erase(*i);
-      }
-      dout(20) << __func__ << " minimum = " << *minimum << dendl;
-      return 0;
-    }
-  }
-
-  {
-    //
-    // Case 3:
-    //
-    // The previous strategy failed to recover from all erasures.
-    //
-    // Try to recover as many chunks as possible, even from layers
-    // that do not contain chunks that we want, in the hope that it
-    // will help the upper layers.
-    //
-    set<int> erasures_total;
-    for (unsigned int i = 0; i < get_chunk_count(); ++i) {
-      if (available_chunks.count(i) == 0)
-	erasures_total.insert(i);
-    }
-
-    for (vector<Layer>::reverse_iterator i = layers.rbegin();
-	 i != layers.rend();
-	 ++i) {
-      set<int> layer_erasures;
-      set_intersection(i->chunks_as_set.begin(), i->chunks_as_set.end(),
-		       erasures_total.begin(), erasures_total.end(),
-		       inserter(layer_erasures, layer_erasures.end()));
-      //
-      // If this layer has no erasure, skip it
-      //
-      if (layer_erasures.empty())
-	continue;
-
-      if (layer_erasures.size() > 0 &&
-	  layer_erasures.size() <= i->erasure_code->get_coding_chunk_count()) {
-	//
-	// chunks recovered by this layer are removed from the list of
-	// erasures so that upper levels know they can rely on their
-	// availability
-	//
-	for (set<int>::const_iterator j = layer_erasures.begin();
-	     j != layer_erasures.end();
-	     ++j) {
-	  erasures_total.erase(*j);
-	}
-      }
-    }
-    if (erasures_total.empty()) {
-      //
-      // Do not try to be smart about what chunks are necessary to
-      // recover, use all available chunks.
-      //
-      *minimum = available_chunks;
-      dout(20) << __func__ << " minimum == available_chunks == "
-	       << available_chunks << dendl;
-      return 0;
-    }
-  }
-
-  derr << __func__ << " not enough chunks in " << available_chunks
-       << " to read " << want_to_read << dendl;
-  return -EIO;
-}
-
-int ErasureCodeLrc::encode_chunks(const set<int> &want_to_encode,
-				  map<int, bufferlist> *encoded)
-{
-  unsigned int top = layers.size();
-  for (vector<Layer>::reverse_iterator i = layers.rbegin();
-       i != layers.rend();
-       ++i) {
-    --top;
-    if (includes(i->chunks_as_set.begin(), i->chunks_as_set.end(),
-		 want_to_encode.begin(), want_to_encode.end()))
-      break;
-  }
-
-  for (unsigned int i = top; i < layers.size(); ++i) {
-    const Layer &layer = layers[i];
-    set<int> layer_want_to_encode;
-    map<int, bufferlist> layer_encoded;
-    int j = 0;
-    for (vector<int>::const_iterator c = layer.chunks.begin();
-	 c != layer.chunks.end();
-	 ++c) {
-      layer_encoded[j] = (*encoded)[*c];
-      if (want_to_encode.find(*c) != want_to_encode.end())
-	layer_want_to_encode.insert(j);
-      j++;
-    }
-    int err = layer.erasure_code->encode_chunks(layer_want_to_encode,
-						&layer_encoded);
-    if (err) {
-      derr << __func__ << " layer " << layer.chunks_map
-	   << " failed with " << err << " trying to encode "
-	   << layer_want_to_encode << dendl;
-      return err;
-    }
-  }
-  return 0;
-}
-
-int ErasureCodeLrc::decode_chunks(const set<int> &want_to_read,
-				  const map<int, bufferlist> &chunks,
-				  map<int, bufferlist> *decoded)
-{
-  set<int> available_chunks;
-  set<int> erasures;
-  for (unsigned int i = 0; i < get_chunk_count(); ++i) {
-    if (chunks.count(i) != 0)
-      available_chunks.insert(i);
-    else
-      erasures.insert(i);
-  }
-
-  set<int> want_to_read_erasures;
-
-  for (vector<Layer>::reverse_iterator layer = layers.rbegin();
-       layer != layers.rend();
-       ++layer) {
-    set<int> layer_erasures;
-    set_intersection(layer->chunks_as_set.begin(), layer->chunks_as_set.end(),
-		     erasures.begin(), erasures.end(),
-		     inserter(layer_erasures, layer_erasures.end()));
-
-    if (layer_erasures.size() >
-	layer->erasure_code->get_coding_chunk_count()) {
-      // skip because there are too many erasures for this layer to recover
-    } else if(layer_erasures.size() == 0) {
-      // skip because all chunks are already available
-    } else {
-      set<int> layer_want_to_read;
-      map<int, bufferlist> layer_chunks;
-      map<int, bufferlist> layer_decoded;
-      int j = 0;
-      for (vector<int>::const_iterator c = layer->chunks.begin();
-	   c != layer->chunks.end();
-	   ++c) {
-	//
-	// Pick chunks from *decoded* instead of *chunks* to re-use
-	// chunks recovered by previous layers. In other words
-	// *chunks* does not change but *decoded* gradually improves
-	// as more layers recover from erasures.
-	//
-	if (erasures.count(*c) == 0)
-	  layer_chunks[j] = (*decoded)[*c];
-	if (want_to_read.count(*c) != 0)
-	  layer_want_to_read.insert(j);
-	layer_decoded[j] = (*decoded)[*c];
-	++j;
-      }
-      int err = layer->erasure_code->decode_chunks(layer_want_to_read,
-						   layer_chunks,
-						   &layer_decoded);
-      if (err) {
-	derr << __func__ << " layer " << layer->chunks_map
-	     << " failed with " << err << " trying to decode "
-	     << layer_want_to_read << " with " << available_chunks << dendl;
-	return err;
-      }
-      j = 0;
-      for (vector<int>::const_iterator c = layer->chunks.begin();
-	   c != layer->chunks.end();
-	   ++c) {
-	(*decoded)[*c] = layer_decoded[j];
-	++j;
-	if (erasures.count(*c) != 0)
-	  erasures.erase(*c);
-      }
-      want_to_read_erasures.clear();
-      set_intersection(erasures.begin(), erasures.end(),
-		       want_to_read.begin(), want_to_read.end(),
-		       inserter(want_to_read_erasures, want_to_read_erasures.end()));
-      if (want_to_read_erasures.size() == 0)
-	break;
-    }
-  }
-
-  if (want_to_read_erasures.size() > 0) {
-    derr << __func__ << " want to read " << want_to_read
-	 << " with available_chunks = " << available_chunks
-	 << " end up being unable to read " << want_to_read_erasures << dendl;
-    return -EIO;
-  } else {
-    return 0;
-  }
-}
diff --git a/src/erasure-code/lrc/ErasureCodeLrc.h b/src/erasure-code/lrc/ErasureCodeLrc.h
deleted file mode 100644
index 333a2f2..0000000
--- a/src/erasure-code/lrc/ErasureCodeLrc.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef CEPH_ERASURE_CODE_LRC_H
-#define CEPH_ERASURE_CODE_LRC_H
-
-#include "include/err.h"
-#include "json_spirit/json_spirit.h"
-#include "erasure-code/ErasureCode.h"
-
-#define ERROR_LRC_ARRAY			-(MAX_ERRNO + 1)
-#define ERROR_LRC_OBJECT		-(MAX_ERRNO + 2)
-#define ERROR_LRC_INT			-(MAX_ERRNO + 3)
-#define ERROR_LRC_STR			-(MAX_ERRNO + 4)
-#define ERROR_LRC_PLUGIN		-(MAX_ERRNO + 5)
-#define ERROR_LRC_DESCRIPTION		-(MAX_ERRNO + 6)
-#define ERROR_LRC_PARSE_JSON		-(MAX_ERRNO + 7)
-#define ERROR_LRC_MAPPING		-(MAX_ERRNO + 8)
-#define ERROR_LRC_MAPPING_SIZE		-(MAX_ERRNO + 9)
-#define ERROR_LRC_FIRST_MAPPING		-(MAX_ERRNO + 10)
-#define ERROR_LRC_COUNT_CONSTRAINT	-(MAX_ERRNO + 11)
-#define ERROR_LRC_CONFIG_OPTIONS	-(MAX_ERRNO + 12)
-#define ERROR_LRC_LAYERS_COUNT		-(MAX_ERRNO + 13)
-#define ERROR_LRC_RULESET_OP		-(MAX_ERRNO + 14)
-#define ERROR_LRC_RULESET_TYPE		-(MAX_ERRNO + 15)
-#define ERROR_LRC_RULESET_N		-(MAX_ERRNO + 16)
-#define ERROR_LRC_ALL_OR_NOTHING	-(MAX_ERRNO + 17)
-#define ERROR_LRC_GENERATED		-(MAX_ERRNO + 18)
-#define ERROR_LRC_K_M_MODULO		-(MAX_ERRNO + 19)
-#define ERROR_LRC_K_MODULO		-(MAX_ERRNO + 20)
-#define ERROR_LRC_M_MODULO		-(MAX_ERRNO + 21)
-
-class ErasureCodeLrc : public ErasureCode {
-public:
-  struct Layer {
-    Layer(string _chunks_map) : chunks_map(_chunks_map) { }
-    ErasureCodeInterfaceRef erasure_code;
-    vector<int> data;
-    vector<int> coding;
-    vector<int> chunks;
-    set<int> chunks_as_set;
-    string chunks_map;
-    map<string,string> parameters;
-  };
-  vector<Layer> layers;
-  string directory;
-  unsigned int chunk_count;
-  unsigned int data_chunk_count;
-  string ruleset_root;
-  struct Step {
-    Step(string _op, string _type, int _n) :
-      op(_op),
-      type(_type),
-      n(_n) {}
-    string op;
-    string type;
-    int n;
-  };
-  vector<Step> ruleset_steps;
-
-  ErasureCodeLrc() :
-    chunk_count(0), data_chunk_count(0), ruleset_root("default")
-  {
-    ruleset_steps.push_back(Step("chooseleaf", "host", 0));
-  }
-
-  virtual ~ErasureCodeLrc() {}
-
-  set<int> get_erasures(const set<int> &need,
-			const set<int> &available) const;
-
-  virtual int minimum_to_decode(const set<int> &want_to_read,
-				const set<int> &available,
-				set<int> *minimum);
-
-  int layer_minimum_to_decode(const Layer &layer,
-			      const set<int> &want,
-			      const set<int> &available,
-			      set<int> *minimum) const;
-
-  virtual int create_ruleset(const string &name,
-			     CrushWrapper &crush,
-			     ostream *ss) const;
-
-  virtual unsigned int get_chunk_count() const {
-    return chunk_count;
-  }
-
-  virtual unsigned int get_data_chunk_count() const {
-    return data_chunk_count;
-  }
-
-  virtual unsigned int get_chunk_size(unsigned int object_size) const;
-
-  int layer_encode(const Layer &layer, vector<bufferlist> &chunks);
-
-  virtual int encode_chunks(const set<int> &want_to_encode,
-			    map<int, bufferlist> *encoded);
-
-  virtual int decode_chunks(const set<int> &want_to_read,
-			    const map<int, bufferlist> &chunks,
-			    map<int, bufferlist> *decoded);
-
-  int init(const map<string,string> &parameters, ostream *ss);
-
-  virtual int parse(const map<string,string> &parameters, ostream *ss);
-
-  int parse_kml(map<string,string> &parameters, ostream *ss);
-
-  int parse_ruleset(const map<string,string> &parameters, ostream *ss);
-
-  int parse_ruleset_step(string description_string,
-			 json_spirit::mArray description,
-			 ostream *ss);
-
-  int layers_description(const map<string,string> &parameters,
-			 json_spirit::mArray *description,
-			 ostream *ss) const;
-  int layers_parse(string description_string,
-		   json_spirit::mArray description,
-		   ostream *ss);
-  int layers_init();
-  int layers_sanity_checks(string description_string,
-			   ostream *ss) const;
-};
-
-#endif
diff --git a/src/erasure-code/lrc/ErasureCodePluginLrc.cc b/src/erasure-code/lrc/ErasureCodePluginLrc.cc
deleted file mode 100644
index dfb680a..0000000
--- a/src/erasure-code/lrc/ErasureCodePluginLrc.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include "ceph_ver.h"
-#include "common/debug.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#include "ErasureCodeLrc.h"
-
-// re-include our assert
-#include "include/assert.h"
-
-#define dout_subsys ceph_subsys_osd
-#undef dout_prefix
-#define dout_prefix _prefix(_dout)
-
-static ostream& _prefix(std::ostream* _dout)
-{
-  return *_dout << "ErasureCodePluginLrc: ";
-}
-
-class ErasureCodePluginLrc : public ErasureCodePlugin {
-public:
-  virtual int factory(const map<std::string,std::string> &parameters,
-		      ErasureCodeInterfaceRef *erasure_code) {
-    ErasureCodeLrc *interface;
-    interface = new ErasureCodeLrc();
-    stringstream ss;
-    assert(parameters.count("directory") != 0);
-    int r = interface->init(parameters, &ss);
-    if (r) {
-      derr << ss.str() << dendl;
-      delete interface;
-      return r;
-    }
-    *erasure_code = ErasureCodeInterfaceRef(interface);
-    return 0;
-  }
-};
-
-const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-int __erasure_code_init(char *plugin_name, char *directory)
-{
-  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
-  return instance.add(plugin_name, new ErasureCodePluginLrc());
-}
diff --git a/src/erasure-code/lrc/Makefile.am b/src/erasure-code/lrc/Makefile.am
deleted file mode 100644
index c6547a3..0000000
--- a/src/erasure-code/lrc/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-# lrc plugin
-noinst_HEADERS += \
-  erasure-code/lrc/ErasureCodeLrc.h
-
-lrc_sources = \
-  erasure-code/ErasureCode.cc \
-  erasure-code/lrc/ErasureCodePluginLrc.cc \
-  erasure-code/lrc/ErasureCodeLrc.cc
-
-erasure-code/lrc/ErasureCodePluginLrc.cc: ./ceph_ver.h
-
-libec_lrc_la_SOURCES = ${lrc_sources} common/str_map.cc
-libec_lrc_la_CFLAGS = ${AM_CFLAGS}
-libec_lrc_la_CXXFLAGS= ${AM_CXXFLAGS}
-libec_lrc_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(LIBJSON_SPIRIT)
-libec_lrc_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0
-if LINUX
-libec_lrc_la_LDFLAGS += -export-symbols-regex '.*__erasure_code_.*'
-endif
-
-erasure_codelib_LTLIBRARIES += libec_lrc.la
diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc
index edca694..ffdc540 100644
--- a/src/global/signal_handler.cc
+++ b/src/global/signal_handler.cc
@@ -84,27 +84,23 @@ static void handle_fatal_signal(int signum)
   dout_emergency(buf);
   pidfile_remove();
 
-  // avoid recursion back into logging code if that is where
-  // we got the SEGV.
-  if (!g_ceph_context->_log->is_inside_log_lock()) {
-    // TODO: don't use an ostringstream here. It could call malloc(), which we
-    // don't want inside a signal handler.
-    // Also fix the backtrace code not to allocate memory.
-    BackTrace bt(0);
-    ostringstream oss;
-    bt.print(oss);
-    dout_emergency(oss.str());
-
-    // dump to log.  this uses the heap extensively, but we're better
-    // off trying than not.
-    derr << buf << std::endl;
-    bt.print(*_dout);
-    *_dout << " NOTE: a copy of the executable, or `objdump -rdS <executable>` "
-	   << "is needed to interpret this.\n"
-	   << dendl;
-
-    g_ceph_context->_log->dump_recent();
-  }
+  // TODO: don't use an ostringstream here. It could call malloc(), which we
+  // don't want inside a signal handler.
+  // Also fix the backtrace code not to allocate memory.
+  BackTrace bt(0);
+  ostringstream oss;
+  bt.print(oss);
+  dout_emergency(oss.str());
+
+  // dump to log.  this uses the heap extensively, but we're better
+  // off trying than not.
+  derr << buf << std::endl;
+  bt.print(*_dout);
+  *_dout << " NOTE: a copy of the executable, or `objdump -rdS <executable>` "
+	 << "is needed to interpret this.\n"
+	 << dendl;
+
+  g_ceph_context->_log->dump_recent();
 
   reraise_fatal(signum);
 }
diff --git a/src/include/CompatSet.h b/src/include/CompatSet.h
index 03bf54d..b238830 100644
--- a/src/include/CompatSet.h
+++ b/src/include/CompatSet.h
@@ -26,7 +26,7 @@ struct CompatSet {
     string name;
 
     Feature(uint64_t _id, const char *_name) : id(_id), name(_name) {}
-    Feature(uint64_t _id, const string& _name) : id(_id), name(_name) {}
+    Feature(uint64_t _id, string& _name) : id(_id), name(_name) {}
   };
 
   struct FeatureSet {
@@ -47,14 +47,6 @@ struct CompatSet {
     bool contains(uint64_t f) const {
       return names.count(f);
     }
-    /**
-     * Getter instead of using name[] to be const safe
-     */
-    inline std::string get_name(uint64_t const f) const {
-      std::map<uint64_t, std::string>::const_iterator i = names.find(f);
-      assert(i != names.end());
-      return i->second;
-    }
     void remove(uint64_t f) {
       if (names.count(f)) {
 	names.erase(f);
@@ -110,13 +102,7 @@ struct CompatSet {
     }
   };
 
-  // These features have no impact on the read / write status
-  FeatureSet compat;
-  // If any of these features are missing, read is possible ( as long
-  // as no incompat feature is missing ) but it is not possible to write
-  FeatureSet ro_compat;
-  // If any of these features are missing, read or write is not possible
-  FeatureSet incompat;
+  FeatureSet compat, ro_compat, incompat;
 
   CompatSet(FeatureSet& _compat, FeatureSet& _ro_compat, FeatureSet& _incompat) :
     compat(_compat), ro_compat(_ro_compat), incompat(_incompat) {}
@@ -126,13 +112,13 @@ struct CompatSet {
 
   /* does this filesystem implementation have the
      features required to read the other? */
-  bool readable(CompatSet const& other) const {
+  bool readable(CompatSet& other) {
     return !((other.incompat.mask ^ incompat.mask) & other.incompat.mask);
   }
 
   /* does this filesystem implementation have the
      features required to write the other? */
-  bool writeable(CompatSet const& other) const {
+  bool writeable(CompatSet& other) {
     return readable(other) &&
       !((other.ro_compat.mask ^ ro_compat.mask) & other.ro_compat.mask);
   }
@@ -188,7 +174,7 @@ struct CompatSet {
   /* Merge features supported by other CompatSet into this one.
    * Return: true if some features were merged
    */
-  bool merge(CompatSet const & other) {
+  bool merge(CompatSet& other) {
     uint64_t other_compat =
       ((other.compat.mask ^ compat.mask) & other.compat.mask);
     uint64_t other_ro_compat =
@@ -200,13 +186,13 @@ struct CompatSet {
     for (int id = 1; id < 64; ++id) {
       uint64_t mask = (uint64_t)1 << id;
       if (mask & other_compat) {
-	compat.insert( Feature(id, other.compat.get_name(id)));
+	compat.insert( Feature(id, other.compat.names[id]));
       }
       if (mask & other_ro_compat) {
-	ro_compat.insert(Feature(id, other.ro_compat.get_name(id)));
+	ro_compat.insert(Feature(id, other.ro_compat.names[id]));
       }
       if (mask & other_incompat) {
-	incompat.insert( Feature(id, other.incompat.get_name(id)));
+	incompat.insert( Feature(id, other.incompat.names[id]));
       }
     }
     return true;
diff --git a/src/include/Context.h b/src/include/Context.h
index 88af79c..38af843 100644
--- a/src/include/Context.h
+++ b/src/include/Context.h
@@ -100,21 +100,21 @@ typedef ceph::shared_ptr<RunOnDelete> RunOnDeleteRef;
 /*
  * finish and destroy a list of Contexts
  */
-template<class A>
-inline void finish_contexts(CephContext *cct, std::list<A*>& finished, 
+inline void finish_contexts(CephContext *cct, std::list<Context*>& finished, 
                             int result = 0)
 {
   if (finished.empty())
     return;
 
-  list<A*> ls;
+  list<Context*> ls;
   ls.swap(finished); // swap out of place to avoid weird loops
 
   if (cct)
     mydout(cct, 10) << ls.size() << " contexts to finish with " << result << dendl;
-  typename std::list<A*>::iterator it;
-  for (it = ls.begin(); it != ls.end(); it++) {
-    A *c = *it;
+  for (std::list<Context*>::iterator it = ls.begin(); 
+       it != ls.end(); 
+       it++) {
+    Context *c = *it;
     if (cct)
       mydout(cct,10) << "---- " << c << dendl;
     c->complete(result);
@@ -148,110 +148,72 @@ public:
 };
 
 
-struct C_Lock : public Context {
-  Mutex *lock;
-  Context *fin;
-  C_Lock(Mutex *l, Context *c) : lock(l), fin(c) {}
-  ~C_Lock() {
-    delete fin;
-  }
-  void finish(int r) {
-    if (fin) {
-      lock->Lock();
-      fin->complete(r);
-      fin = NULL;
-      lock->Unlock();
-    }
-  }
-};
-
 /*
  * C_Contexts - set of Contexts
- *
- * ContextType must be an ancestor class of ContextInstanceType, or the same class.
- * ContextInstanceType must be default-constructable.
  */
-template <class ContextType, class ContextInstanceType>
-class C_ContextsBase : public ContextInstanceType {
+class C_Contexts : public Context {
 public:
   CephContext *cct;
-  std::list<ContextType*> contexts;
+  std::list<Context*> contexts;
 
-  C_ContextsBase(CephContext *cct_)
+  C_Contexts(CephContext *cct_)
     : cct(cct_)
   {
   }
 
-  void add(ContextType* c) {
+  void add(Context* c) {
     contexts.push_back(c);
   }
-  void take(std::list<ContextType*>& ls) {
+  void take(std::list<Context*>& ls) {
     contexts.splice(contexts.end(), ls);
   }
-  void complete(int r) {
-    // Neuter any ContextInstanceType custom complete(), because although
-    // I want to look like him, I don't actually want to run his code.
-    Context::complete(r);
-  }
   void finish(int r) {
     finish_contexts(cct, contexts, r);
   }
   bool empty() { return contexts.empty(); }
 
-  static ContextType *list_to_context(list<ContextType *> &cs) {
+  static Context *list_to_context(list<Context *> &cs) {
     if (cs.size() == 0) {
       return 0;
     } else if (cs.size() == 1) {
-      ContextType *c = cs.front();
+      Context *c = cs.front();
       cs.clear();
       return c;
     } else {
-      C_ContextsBase<ContextType, ContextInstanceType> *c(new C_ContextsBase<ContextType, ContextInstanceType>(0));
+      C_Contexts *c(new C_Contexts(0));
       c->take(cs);
       return c;
     }
   }
 };
 
-typedef C_ContextsBase<Context, Context> C_Contexts;
-
-
-// Forward declare GatherBuilder in order
-// to be able to friend it from Gather
-template <class ContextType, class GatherType>
-class C_GatherBuilderBase;
-
 
 /*
  * C_Gather
  *
- * ContextType must be an ancestor class of ContextInstanceType, or the same class.
- * ContextInstanceType must be default-constructable.
- *
  * BUG:? only reports error from last sub to have an error return
  */
-template <class ContextType, class ContextInstanceType>
-class C_GatherBase : public ContextType {
+class C_Gather : public Context {
 private:
   CephContext *cct;
   int result;
-  ContextType *onfinish;
+  Context *onfinish;
 #ifdef DEBUG_GATHER
-  std::set<ContextType*> waitfor;
+  std::set<Context*> waitfor;
 #endif
   int sub_created_count;
   int sub_existing_count;
-  mutable Mutex lock;
+  Mutex lock;
   bool activated;
 
-  void sub_finish(ContextType* sub, int r) {
+  void sub_finish(Context* sub, int r) {
     lock.Lock();
 #ifdef DEBUG_GATHER
     assert(waitfor.count(sub));
     waitfor.erase(sub);
 #endif
     --sub_existing_count;
-    mydout(cct,10) << "C_GatherBase " << this << ".sub_finish(r=" << r << ") " << sub
+    mydout(cct,10) << "C_Gather " << this << ".sub_finish(r=" << r << ") " << sub
 #ifdef DEBUG_GATHER
 		    << " (remaining " << waitfor << ")"
 #endif
@@ -274,17 +236,10 @@ private:
     delete this;
   }
 
-  class C_GatherSub : public ContextInstanceType {
-    C_GatherBase *gather;
+  class C_GatherSub : public Context {
+    C_Gather *gather;
   public:
-    C_GatherSub(C_GatherBase *g) : gather(g) {}
-    void complete(int r) {
-      // Cancel any customized complete() functionality
-      // from the Context subclass we're templated for,
-      // we only want to hit that in onfinish, not at each
-      // sub finish.  e.g. MDSInternalContext.
-      Context::complete(r);
-    }
+    C_GatherSub(C_Gather *g) : gather(g) {}
     void finish(int r) {
       gather->sub_finish(this, r);
       gather = 0;
@@ -295,19 +250,19 @@ private:
     }
   };
 
-public:
-  C_GatherBase(CephContext *cct_, ContextType *onfinish_)
+  C_Gather(CephContext *cct_, Context *onfinish_)
     : cct(cct_), result(0), onfinish(onfinish_),
       sub_created_count(0), sub_existing_count(0),
-      lock("C_GatherBase::lock", true, false), //disable lockdep
+      lock("C_Gather::lock", true, false), //disable lockdep
       activated(false)
   {
-    mydout(cct,10) << "C_GatherBase " << this << ".new" << dendl;
+    mydout(cct,10) << "C_Gather " << this << ".new" << dendl;
   }
-  ~C_GatherBase() {
-    mydout(cct,10) << "C_GatherBase " << this << ".delete" << dendl;
+public:
+  ~C_Gather() {
+    mydout(cct,10) << "C_Gather " << this << ".delete" << dendl;
   }
-  void set_finisher(ContextType *onfinish_) {
+  void set_finisher(Context *onfinish_) {
     Mutex::Locker l(lock);
     assert(!onfinish);
     onfinish = onfinish_;
@@ -323,31 +278,22 @@ public:
     lock.Unlock();
     delete_me();
   }
-  ContextType *new_sub() {
+  Context *new_sub() {
     Mutex::Locker l(lock);
     assert(activated == false);
     sub_created_count++;
     sub_existing_count++;
-    ContextType *s = new C_GatherSub(this);
+    Context *s = new C_GatherSub(this);
 #ifdef DEBUG_GATHER
     waitfor.insert(s);
 #endif
-    mydout(cct,10) << "C_GatherBase " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
+    mydout(cct,10) << "C_Gather " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
     return s;
   }
   void finish(int r) {
     assert(0);    // nobody should ever call me.
   }
-
-  inline int get_sub_existing_count() const {
-    Mutex::Locker l(lock);
-    return sub_existing_count;
-  }
-
-  inline int get_sub_created_count() const {
-    Mutex::Locker l(lock);
-    return sub_created_count;
-  }
+  friend class C_GatherBuilder;
 };
 
 /*
@@ -366,19 +312,18 @@ public:
  *
  * Note: Currently, subs must be manually freed by the caller (for some reason.)
  */
-template <class ContextType, class GatherType>
-class C_GatherBuilderBase
+class C_GatherBuilder
 {
 public:
-  C_GatherBuilderBase(CephContext *cct_)
+  C_GatherBuilder(CephContext *cct_)
     : cct(cct_), c_gather(NULL), finisher(NULL), activated(false)
   {
   }
-  C_GatherBuilderBase(CephContext *cct_, ContextType *finisher_)
+  C_GatherBuilder(CephContext *cct_, Context *finisher_)
     : cct(cct_), c_gather(NULL), finisher(finisher_), activated(false)
   {
   }
-  ~C_GatherBuilderBase() {
+  ~C_GatherBuilder() {
     if (c_gather) {
       assert(activated); // Don't forget to activate your C_Gather!
     }
@@ -386,9 +331,9 @@ public:
       delete finisher;
     }
   }
-  ContextType *new_sub() {
+  Context *new_sub() {
     if (!c_gather) {
-      c_gather = new GatherType(cct, finisher);
+      c_gather = new C_Gather(cct, finisher);
     }
     return c_gather->new_sub();
   }
@@ -399,12 +344,12 @@ public:
     activated = true;
     c_gather->activate();
   }
-  void set_finisher(ContextType *finisher_) {
+  void set_finisher(Context *finisher_) {
     finisher = finisher_;
     if (c_gather)
       c_gather->set_finisher(finisher);
   }
-  GatherType *get() const {
+  C_Gather *get() const {
     return c_gather;
   }
   bool has_subs() const {
@@ -414,25 +359,24 @@ public:
     assert(!activated);
     if (c_gather == NULL)
       return 0;
-    return c_gather->get_sub_created_count();
+    Mutex::Locker l(c_gather->lock); 
+    return c_gather->sub_created_count;
   }
   int num_subs_remaining() {
     assert(!activated);
     if (c_gather == NULL)
       return 0;
-    return c_gather->get_sub_existing_count();
+    Mutex::Locker l(c_gather->lock);
+    return c_gather->sub_existing_count;
   }
 
 private:
   CephContext *cct;
-  GatherType *c_gather;
-  ContextType *finisher;
+  C_Gather *c_gather;
+  Context *finisher;
   bool activated;
 };
 
-typedef C_GatherBase<Context, Context> C_Gather;
-typedef C_GatherBuilderBase<Context, C_Gather > C_GatherBuilder;
-
 #undef mydout
 
 #endif
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 7fa1e18..20cac9a 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -18,11 +18,6 @@ rados_include_DATA = \
 	$(srcdir)/include/crc32c.h \
 	$(srcdir)/include/memory.h
 
-radosstriper_includedir = $(includedir)/radosstriper
-radosstriper_include_DATA = \
-	$(srcdir)/include/radosstriper/libradosstriper.h \
-	$(srcdir)/include/radosstriper/libradosstriper.hpp
-
 noinst_HEADERS += \
 	include/Context.h \
 	include/CompatSet.h \
@@ -54,7 +49,6 @@ noinst_HEADERS += \
 	include/interval_set.h \
 	include/int_types.h \
 	include/ipaddr.h \
-	include/krbd.h \
 	include/linux_fiemap.h \
 	include/lru.h \
 	include/msgr.h \
@@ -70,6 +64,7 @@ noinst_HEADERS += \
 	include/triple.h \
 	include/types.h \
 	include/utime.h \
+	include/dlist.h \
 	include/elist.h \
 	include/uuid.h \
 	include/xlist.h \
@@ -81,8 +76,6 @@ noinst_HEADERS += \
 	include/rados/page.h \
 	include/rados/crc32c.h \
 	include/rados/buffer.h \
-	include/radosstriper/libradosstriper.h \
-	include/radosstriper/libradosstriper.hpp \
 	include/rbd/features.h \
 	include/rbd/librbd.h \
 	include/rbd/librbd.hpp\
diff --git a/src/include/assert.h b/src/include/assert.h
index ec0aa34..5ff41ba 100644
--- a/src/include/assert.h
+++ b/src/include/assert.h
@@ -68,8 +68,6 @@ struct FailedAssertion {
 extern void register_assert_context(CephContext *cct);
 extern void __ceph_assert_fail(const char *assertion, const char *file, int line, const char *function)
   __attribute__ ((__noreturn__));
-extern void __ceph_assertf_fail(const char *assertion, const char *file, int line, const char *function, const char* msg, ...)
-  __attribute__ ((__noreturn__));
 extern void __ceph_assert_warn(const char *assertion, const char *file, int line, const char *function);
 
 #define ceph_assert(expr)							\
@@ -140,9 +138,3 @@ using namespace ceph;
    ? __CEPH_ASSERT_VOID_CAST (0)					\
    : __ceph_assert_fail (__STRING(expr), __FILE__, __LINE__, __CEPH_ASSERT_FUNCTION))
 
-// Named by analogy with printf.  Along with an expression, takes a format
-// string and parameters which are printed if the assertion fails.
-#define assertf(expr, ...)                  \
-  ((expr)								\
-   ? __CEPH_ASSERT_VOID_CAST (0)					\
-   : __ceph_assertf_fail (__STRING(expr), __FILE__, __LINE__, __CEPH_ASSERT_FUNCTION, __VA_ARGS__))
diff --git a/src/include/buffer.h b/src/include/buffer.h
index 3cd0a7a..5491105 100644
--- a/src/include/buffer.h
+++ b/src/include/buffer.h
@@ -144,7 +144,6 @@ public:
   static raw* create_malloc(unsigned len);
   static raw* claim_malloc(unsigned len, char *buf);
   static raw* create_static(unsigned len, char *buf);
-  static raw* create_aligned(unsigned len, unsigned align);
   static raw* create_page_aligned(unsigned len);
   static raw* create_zero_copy(unsigned len, int fd, int64_t *offset);
 
@@ -178,15 +177,8 @@ public:
     bool at_buffer_head() const { return _off == 0; }
     bool at_buffer_tail() const;
 
-    bool is_aligned(unsigned align) const {
-      return ((long)c_str() & (align-1)) == 0;
-    }
-    bool is_page_aligned() const { return is_aligned(CEPH_PAGE_SIZE); }
-    bool is_n_align_sized(unsigned align) const
-    {
-      return (length() & (align-1)) == 0;
-    }
-    bool is_n_page_sized() const { return is_n_align_sized(CEPH_PAGE_SIZE); }
+    bool is_page_aligned() const { return ((long)c_str() & ~CEPH_PAGE_MASK) == 0; }
+    bool is_n_page_sized() const { return (length() & ~CEPH_PAGE_MASK) == 0; }
 
     // accessors
     raw *get_raw() const { return _raw; }
@@ -352,9 +344,7 @@ public:
     bool contents_equal(buffer::list& other);
 
     bool can_zero_copy() const;
-    bool is_aligned(unsigned align) const;
     bool is_page_aligned() const;
-    bool is_n_align_sized(unsigned align) const;
     bool is_n_page_sized() const;
 
     bool is_zero() const;
@@ -392,7 +382,6 @@ public:
     bool is_contiguous();
     void rebuild();
     void rebuild(ptr& nb);
-    void rebuild_aligned(unsigned align);
     void rebuild_page_aligned();
 
     // sort-of-like-assignment-op
@@ -440,7 +429,6 @@ public:
     void encode_base64(list& o);
     void decode_base64(list& o);
 
-    void write_stream(std::ostream &out) const;
     void hexdump(std::ostream &out) const;
     int read_file(const char *fn, std::string *error);
     ssize_t read_fd(int fd, size_t len);
diff --git a/src/include/ceph_features.h b/src/include/ceph_features.h
index 9b9ef5c..c3dfcab 100644
--- a/src/include/ceph_features.h
+++ b/src/include/ceph_features.h
@@ -52,7 +52,6 @@
 #define CEPH_FEATURE_OSD_PRIMARY_AFFINITY (1ULL<<41)  /* overlap w/ tunables3 */
 #define CEPH_FEATURE_MSGR_KEEPALIVE2   (1ULL<<42)
 #define CEPH_FEATURE_OSD_POOLRESEND    (1ULL<<43)
-#define CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 (1ULL<<44)
 #define CEPH_FEATURE_OSD_SET_ALLOC_HINT (1ULL<<45)
 
 /*
@@ -126,7 +125,6 @@ static inline unsigned long long ceph_sanitize_features(unsigned long long f) {
 	 CEPH_FEATURE_OSD_PRIMARY_AFFINITY |	\
 	 CEPH_FEATURE_MSGR_KEEPALIVE2 |	\
 	 CEPH_FEATURE_OSD_POOLRESEND |	\
-         CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 |   \
          CEPH_FEATURE_OSD_SET_ALLOC_HINT |   \
 	 0ULL)
 
diff --git a/src/include/cmp.h b/src/include/cmp.h
index 93365bf..92ecef4 100644
--- a/src/include/cmp.h
+++ b/src/include/cmp.h
@@ -5,28 +5,6 @@
  * macros to define comparison operators for classes with small numbers of members.
  */
 
-#define WRITE_EQ_OPERATORS_1(type, a)					\
-  inline bool operator==(const type &l, const type &r) {		\
-    return l.a == r.a;							\
-  }									\
-  inline bool operator!=(const type &l, const type &r) {		\
-    return l.a != r.a;							\
-  }
-
-#define WRITE_CMP_OPERATORS_1(type, a)					\
-  inline bool operator>(const type &l, const type &r) {			\
-    return l.a > r.a;							\
-  }									\
-  inline bool operator<(const type &l, const type &r) {			\
-    return l.a < r.a;							\
-  }									\
-  inline bool operator>=(const type &l, const type &r) {		\
-    return l.a >= r.a;							\
-  }									\
-  inline bool operator<=(const type &l, const type &r) {		\
-    return l.a <= r.a;							\
-  }
-
 #define WRITE_EQ_OPERATORS_2(type, a, b)				\
   inline bool operator==(const type &l, const type &r) {		\
     return l.a == r.a && l.b == r.b;					\
diff --git a/src/include/dlist.h b/src/include/dlist.h
new file mode 100644
index 0000000..09eb0bc
--- /dev/null
+++ b/src/include/dlist.h
@@ -0,0 +1,127 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef CEPH_DLIST_H
+#define CEPH_DLIST_H
+
+template<typename T>
+class dlist {
+public:
+  struct item {
+    T _item;
+    item *_prev, *_next;
+    
+    item(T i) : _item(i), _prev(this), _next(this) {}
+    ~item() { 
+      assert(!is_on_list());
+    }
+
+    // no copying!
+    item(const item& other);
+    const item& operator= (const item& right);
+
+    
+    bool empty() const { return _prev == this; }
+    bool is_on_list() const { return !empty(); }
+
+    bool remove_myself() {
+      if (_next == this) {
+	assert(_prev == this);
+	return false;
+      }
+      _next->_prev = _prev;
+      _prev->_next = _next;
+      _prev = _next = this;
+      return true;
+    }
+
+    void insert_after(item *other) {
+      assert(other->empty());
+      other->_prev = this;
+      other->_next = _next;
+      _next->_prev = other;
+      _next = other;
+    }
+    void insert_before(item *other) {
+      assert(other->empty());
+      other->_next = this;
+      other->_prev = _prev;
+      _prev->_next = other;
+      _prev = other;
+    }
+  };
+
+private:
+  item _head;
+
+public:
+  dlist(const dlist& other);
+  const dlist& operator=(const dlist& other);
+
+  dlist() : _head(NULL) {}
+  ~dlist() { 
+    assert(_head.empty());
+  }
+
+  bool empty() { 
+    return _head.empty();
+  }
+
+  void clear() {
+    while (!_head.empty())
+      remove(front());
+  }
+
+  void push_front(item *i) {
+    if (!i->empty()) 
+      i->remove_myself();
+    _head.insert_after(i);
+  }
+  void push_back(item *i) {
+    if (!i->empty()) 
+      i->remove_myself();
+    _head.insert_before(i);
+  }
+
+  T front() { return (T)_head._next->_item; }
+  T back() { return (T)_head._prev->_item; }
+
+  void pop_front() {
+    assert(!empty());
+    _head._next->remove_myself();
+  }
+  void pop_back() {
+    assert(!empty());
+    _head._prev->remove_myself();
+  }
+
+  class iterator {
+  private:
+    item *cur;
+  public:
+    iterator(item *i = 0) : cur(i) {}
+    T operator*() { return (T)cur->_item; }
+    iterator& operator++() {
+      assert(cur);
+      cur = cur->_next;
+      return *this;
+    }
+    bool end() { return cur->_item == 0; }
+  };
+
+  iterator begin() { return iterator(_head._next); }
+};
+
+
+#endif
diff --git a/src/include/encoding.h b/src/include/encoding.h
index d19b60e..434d158 100644
--- a/src/include/encoding.h
+++ b/src/include/encoding.h
@@ -372,7 +372,7 @@ inline void encode(const std::list<T>& ls, bufferlist& bl)
     en = n;
     bl.copy_in(pos, sizeof(en), (char*)&en);
   } else {
-    __u32 n = (__u32)(ls.size());    // FIXME: this is slow on a list.
+    __u32 n = ls.size();    // FIXME: this is slow on a list.
     encode(n, bl);
     for (typename std::list<T>::const_iterator p = ls.begin(); p != ls.end(); ++p)
       encode(*p, bl);
@@ -407,7 +407,7 @@ inline void encode(const std::list<ceph::shared_ptr<T> >& ls, bufferlist& bl)
     en = n;
     bl.copy_in(pos, sizeof(en), (char*)&en);
   } else {
-    __u32 n = (__u32)(ls.size());    // FIXME: this is slow on a list.
+    __u32 n = ls.size();    // FIXME: this is slow on a list.
     encode(n, bl);
     for (typename std::list<ceph::shared_ptr<T> >::const_iterator p = ls.begin(); p != ls.end(); ++p)
       encode(**p, bl);
@@ -430,7 +430,7 @@ inline void decode(std::list<ceph::shared_ptr<T> >& ls, bufferlist::iterator& p)
 template<class T>
 inline void encode(const std::set<T>& s, bufferlist& bl)
 {
-  __u32 n = (__u32)(s.size());
+  __u32 n = s.size();
   encode(n, bl);
   for (typename std::set<T>::const_iterator p = s.begin(); p != s.end(); ++p)
     encode(*p, bl);
@@ -471,7 +471,7 @@ inline void decode(std::vector<T*>& v, bufferlist::iterator& p)
 template<class T>
 inline void encode(const std::vector<T>& v, bufferlist& bl, uint64_t features)
 {
-  __u32 n = (__u32)(v.size());
+  __u32 n = v.size();
   encode(n, bl);
   for (typename std::vector<T>::const_iterator p = v.begin(); p != v.end(); ++p)
     encode(*p, bl, features);
@@ -479,7 +479,7 @@ inline void encode(const std::vector<T>& v, bufferlist& bl, uint64_t features)
 template<class T>
 inline void encode(const std::vector<T>& v, bufferlist& bl)
 {
-  __u32 n = (__u32)(v.size());
+  __u32 n = v.size();
   encode(n, bl);
   for (typename std::vector<T>::const_iterator p = v.begin(); p != v.end(); ++p)
     encode(*p, bl);
@@ -512,7 +512,7 @@ inline void decode_nohead(int len, std::vector<T>& v, bufferlist::iterator& p)
 template<class T>
 inline void encode(const std::vector<ceph::shared_ptr<T> >& v, bufferlist& bl)
 {
-  __u32 n = (__u32)(v.size());
+  __u32 n = v.size();
   encode(n, bl);
   for (typename std::vector<ceph::shared_ptr<T> >::const_iterator p = v.begin(); p != v.end(); ++p)
     if (*p)
@@ -561,7 +561,7 @@ inline void decode(std::map<T,U*>& m, bufferlist::iterator& p)
 template<class T, class U>
 inline void encode(const std::map<T,U>& m, bufferlist& bl)
 {
-  __u32 n = (__u32)(m.size());
+  __u32 n = m.size();
   encode(n, bl);
   for (typename std::map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
     encode(p->first, bl);
@@ -571,7 +571,7 @@ inline void encode(const std::map<T,U>& m, bufferlist& bl)
 template<class T, class U>
 inline void encode(const std::map<T,U>& m, bufferlist& bl, uint64_t features)
 {
-  __u32 n = (__u32)(m.size());
+  __u32 n = m.size();
   encode(n, bl);
   for (typename std::map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
     encode(p->first, bl, features);
@@ -632,7 +632,7 @@ inline void decode_nohead(int n, std::map<T,U>& m, bufferlist::iterator& p)
 template<class T, class U>
 inline void encode(const std::multimap<T,U>& m, bufferlist& bl)
 {
-  __u32 n = (__u32)(m.size());
+  __u32 n = m.size();
   encode(n, bl);
   for (typename std::multimap<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
     encode(p->first, bl);
@@ -657,7 +657,7 @@ inline void decode(std::multimap<T,U>& m, bufferlist::iterator& p)
 template<class T, class U>
 inline void encode(const unordered_map<T,U>& m, bufferlist& bl)
 {
-  __u32 n = (__u32)(m.size());
+  __u32 n = m.size();
   encode(n, bl);
   for (typename unordered_map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
     encode(p->first, bl);
@@ -681,7 +681,7 @@ inline void decode(unordered_map<T,U>& m, bufferlist::iterator& p)
 template<class T>
 inline void encode(const ceph::unordered_set<T>& m, bufferlist& bl)
 {
-  __u32 n = (__u32)(m.size());
+  __u32 n = m.size();
   encode(n, bl);
   for (typename ceph::unordered_set<T>::const_iterator p = m.begin(); p != m.end(); ++p)
     encode(*p, bl);
diff --git a/src/include/frag.h b/src/include/frag.h
index 569d182..f98765a 100644
--- a/src/include/frag.h
+++ b/src/include/frag.h
@@ -452,6 +452,24 @@ public:
     return true;
   }
 
+  // verify that we describe a legal partition of the namespace.
+  void verify() const {
+    std::map<frag_t,int32_t> copy;
+    std::list<frag_t> q;
+    q.push_back(frag_t());
+    
+    while (1) {
+      frag_t cur = q.front();
+      q.pop_front();
+      int b = get_split(cur);
+      if (!b) continue;
+      copy[cur] = b;
+      cur.split(b, q);
+    }
+    
+    assert(copy == _splits);	
+  }
+  
   // encoding
   void encode(bufferlist& bl) const {
     ::encode(_splits, bl);
@@ -496,12 +514,33 @@ inline std::ostream& operator<<(std::ostream& out, const fragtree_t& ft)
 {
   out << "fragtree_t(";
   
-  for (std::map<frag_t,int32_t>::const_iterator p = ft._splits.begin();
-       p != ft._splits.end();
-       p++) {
-    if (p != ft._splits.begin())
-      out << " ";
-    out << p->first << "^" << p->second;
+  if (0) {
+    std::list<frag_t> q;
+    q.push_back(frag_t());
+    while (!q.empty()) {
+      frag_t t = q.front();
+      q.pop_front();
+      int nb = ft.get_split(t);
+      if (nb) {
+	if (t.bits()) out << ' ';
+	out << t << '%' << nb;
+	t.split(nb, q);   // queue up children
+      }
+    }
+  }
+  if (0) {
+    std::list<frag_t> leaves;
+    ft.get_leaves(leaves);
+    out << leaves;
+  }
+  if (1) {
+    for (std::map<frag_t,int32_t>::const_iterator p = ft._splits.begin();
+	 p != ft._splits.end();
+	 p++) {
+      if (p != ft._splits.begin())
+	out << " ";
+      out << p->first << "^" << p->second;
+    }
   }
   return out << ")";
 }
diff --git a/src/include/int_types.h b/src/include/int_types.h
index ec71b64..98220e9 100644
--- a/src/include/int_types.h
+++ b/src/include/int_types.h
@@ -3,6 +3,10 @@
 
 #include "acconfig.h"
 
+#ifdef HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
+
 /*
  * Get 64b integers either from inttypes.h or glib.h
  */
@@ -23,14 +27,6 @@
 #endif
 
 /*
- * Include types.h after stdint.h to accomodate for older distributions
- *
- */
-#ifdef HAVE_LINUX_TYPES_H
-#include <linux/types.h>
-#endif
-
-/*
  * Emergency replacements for PRI*64 modifiers. Some systems have
  * an inttypes.h that doesn't define all the PRI[doxu]64 macros.
  */
diff --git a/src/include/krbd.h b/src/include/krbd.h
deleted file mode 100644
index 702a76d..0000000
--- a/src/include/krbd.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Inktank Storage, Inc.
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_KRBD_H
-#define CEPH_KRBD_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct krbd_ctx;
-struct CephContext;
-
-int krbd_create_from_context(struct CephContext *cct, struct krbd_ctx **pctx);
-void krbd_destroy(struct krbd_ctx *ctx);
-
-int krbd_map(struct krbd_ctx *ctx, const char *pool, const char *image,
-             const char *snap, const char *options, char **pdevnode);
-
-int krbd_unmap(struct krbd_ctx *ctx, const char *devnode);
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-
-namespace ceph {
-  class Formatter;
-}
-
-int krbd_showmapped(struct krbd_ctx *ctx, Formatter *f);
-
-#endif /* __cplusplus */
-
-#endif /* CEPH_KRBD_H */
diff --git a/src/include/linux_fiemap.h b/src/include/linux_fiemap.h
index 36046b5..1811048 100644
--- a/src/include/linux_fiemap.h
+++ b/src/include/linux_fiemap.h
@@ -10,6 +10,8 @@
 #ifndef _LINUX_FIEMAP_H
 #define _LINUX_FIEMAP_H
 
+#include "include/int_types.h"
+
 #if defined(__linux__)
 #include <linux/types.h>
 #elif defined(__FreeBSD_)
diff --git a/src/include/lru.h b/src/include/lru.h
index 6a94274..bb3c551 100644
--- a/src/include/lru.h
+++ b/src/include/lru.h
@@ -150,7 +150,6 @@ class LRU {
     lru_top.clear();
     lru_bot.clear();
     lru_pintail.clear();
-    lru_num = 0;
   }
 
   // insert at top of lru
@@ -315,16 +314,14 @@ class LRU {
 };
 
 
-inline void LRUObject::lru_pin() {
-  if (lru && !lru_pinned) {
-    lru->lru_num_pinned++;
-    lru->lru_adjust();
-  }
+inline void LRUObject::lru_pin() 
+{
   lru_pinned = true;
+  if (lru) lru->lru_num_pinned++;
 }
-
 inline void LRUObject::lru_unpin() {
-  if (lru && lru_pinned) {
+  lru_pinned = false;
+  if (lru) {
     lru->lru_num_pinned--;
 
     // move from pintail -> bot
@@ -332,9 +329,7 @@ inline void LRUObject::lru_unpin() {
       lru->lru_pintail.remove(this);
       lru->lru_bot.insert_tail(this);
     }
-    lru->lru_adjust();
   }
-  lru_pinned = false;
 }
 
 #endif
diff --git a/src/include/object.h b/src/include/object.h
index b2a4e85..d9fc275 100644
--- a/src/include/object.h
+++ b/src/include/object.h
@@ -30,6 +30,9 @@ using namespace std;
 #include "ceph_hash.h"
 #include "cmp.h"
 
+/// Maximum supported object name length for Ceph, in bytes.
+#define MAX_CEPH_OBJECT_NAME_LEN 4096
+
 struct object_t {
   string name;
 
diff --git a/src/include/rados.h b/src/include/rados.h
index 1ce5c25..ba3d374 100644
--- a/src/include/rados.h
+++ b/src/include/rados.h
@@ -334,25 +334,6 @@ static inline int ceph_osd_op_mode_cache(int op)
 {
 	return op & CEPH_OSD_OP_MODE_CACHE;
 }
-static inline int ceph_osd_op_uses_extent(int op)
-{
-	switch(op) {
-	case CEPH_OSD_OP_READ:
-	case CEPH_OSD_OP_MAPEXT:
-	case CEPH_OSD_OP_MASKTRUNC:
-	case CEPH_OSD_OP_SPARSE_READ:
-	case CEPH_OSD_OP_SYNC_READ:
-	case CEPH_OSD_OP_WRITE:
-	case CEPH_OSD_OP_WRITEFULL:
-	case CEPH_OSD_OP_TRUNCATE:
-	case CEPH_OSD_OP_ZERO:
-	case CEPH_OSD_OP_APPEND:
-	case CEPH_OSD_OP_TRIMTRUNC:
-		return true;
-	default:
-		return false;
-	}
-}
 
 /*
  * note that the following tmap stuff is also defined in the ceph librados.h
@@ -395,8 +376,6 @@ enum {
 						 */
 	CEPH_OSD_FLAG_ENFORCE_SNAPC    =0x100000,  /* use snapc provided even if
 						      pool uses pool snaps */
-	CEPH_OSD_FLAG_REDIRECTED   = 0x200000,  /* op has been redirected */
-	CEPH_OSD_FLAG_KNOWN_REDIR = 0x400000,  /* redirect bit is authoritative */
 };
 
 enum {
diff --git a/src/include/rados/buffer.h b/src/include/rados/buffer.h
index 3cd0a7a..5491105 100644
--- a/src/include/rados/buffer.h
+++ b/src/include/rados/buffer.h
@@ -144,7 +144,6 @@ public:
   static raw* create_malloc(unsigned len);
   static raw* claim_malloc(unsigned len, char *buf);
   static raw* create_static(unsigned len, char *buf);
-  static raw* create_aligned(unsigned len, unsigned align);
   static raw* create_page_aligned(unsigned len);
   static raw* create_zero_copy(unsigned len, int fd, int64_t *offset);
 
@@ -178,15 +177,8 @@ public:
     bool at_buffer_head() const { return _off == 0; }
     bool at_buffer_tail() const;
 
-    bool is_aligned(unsigned align) const {
-      return ((long)c_str() & (align-1)) == 0;
-    }
-    bool is_page_aligned() const { return is_aligned(CEPH_PAGE_SIZE); }
-    bool is_n_align_sized(unsigned align) const
-    {
-      return (length() & (align-1)) == 0;
-    }
-    bool is_n_page_sized() const { return is_n_align_sized(CEPH_PAGE_SIZE); }
+    bool is_page_aligned() const { return ((long)c_str() & ~CEPH_PAGE_MASK) == 0; }
+    bool is_n_page_sized() const { return (length() & ~CEPH_PAGE_MASK) == 0; }
 
     // accessors
     raw *get_raw() const { return _raw; }
@@ -352,9 +344,7 @@ public:
     bool contents_equal(buffer::list& other);
 
     bool can_zero_copy() const;
-    bool is_aligned(unsigned align) const;
     bool is_page_aligned() const;
-    bool is_n_align_sized(unsigned align) const;
     bool is_n_page_sized() const;
 
     bool is_zero() const;
@@ -392,7 +382,6 @@ public:
     bool is_contiguous();
     void rebuild();
     void rebuild(ptr& nb);
-    void rebuild_aligned(unsigned align);
     void rebuild_page_aligned();
 
     // sort-of-like-assignment-op
@@ -440,7 +429,6 @@ public:
     void encode_base64(list& o);
     void decode_base64(list& o);
 
-    void write_stream(std::ostream &out) const;
     void hexdump(std::ostream &out) const;
     int read_file(const char *fn, std::string *error);
     ssize_t read_fd(int fd, size_t len);
diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h
index 3c90ca4..3e68292 100644
--- a/src/include/rados/librados.h
+++ b/src/include/rados/librados.h
@@ -1713,15 +1713,6 @@ int rados_aio_stat(rados_ioctx_t io, const char *o,
 		   rados_completion_t completion,
 		   uint64_t *psize, time_t *pmtime);
 
-/**
- * Cancel async operation
- *
- * @param io ioctx
- * @param completion completion handle
- * @returns 0 on success, negative error code on failure
- */
-int rados_aio_cancel(rados_ioctx_t io, rados_completion_t completion);
-
 /** @} Asynchronous I/O */
 
 /**
@@ -1885,9 +1876,7 @@ void rados_write_op_set_flags(rados_write_op_t write_op, int flags);
 void rados_write_op_assert_exists(rados_write_op_t write_op);
 
 /**
- * Ensure that given xattr satisfies comparison.
- * If the comparison is not satisfied, the return code of the
- * operation will be -ECANCELED
+ * Ensure that given xattr satisfies comparison
  * @param write_op operation to add this action to
  * @param name name of the xattr to look up
  * @param comparison_operator currently undocumented, look for
@@ -2070,10 +2059,10 @@ void rados_write_op_set_alloc_hint(rados_write_op_t write_op,
 /**
  * Perform a write operation synchronously
  * @param write_op operation to perform
- * @param io the ioctx that the object is in
- * @param oid the object id
- * @param mtime the time to set the mtime to, NULL for the current time
- * @param flags flags to apply to the entire operation (LIBRADOS_OPERATION_*)
+ * @io the ioctx that the object is in
+ * @oid the object id
+ * @mtime the time to set the mtime to, NULL for the current time
+ * @flags flags to apply to the entire operation (LIBRADOS_OPERATION_*)
  */
 int rados_write_op_operate(rados_write_op_t write_op,
 			   rados_ioctx_t io,
@@ -2083,11 +2072,11 @@ int rados_write_op_operate(rados_write_op_t write_op,
 /**
  * Perform a write operation asynchronously
  * @param write_op operation to perform
- * @param io the ioctx that the object is in
+ * @io the ioctx that the object is in
  * @param completion what to do when operation has been attempted
- * @param oid the object id
- * @param mtime the time to set the mtime to, NULL for the current time
- * @param flags flags to apply to the entire operation (LIBRADOS_OPERATION_*)
+ * @oid the object id
+ * @mtime the time to set the mtime to, NULL for the current time
+ * @flags flags to apply to the entire operation (LIBRADOS_OPERATION_*)
  */
 int rados_aio_write_op_operate(rados_write_op_t write_op,
                                rados_ioctx_t io,
@@ -2127,8 +2116,6 @@ void rados_read_op_assert_exists(rados_read_op_t read_op);
 
 /**
  * Ensure that the an xattr satisfies a comparison
- * If the comparison is not satisfied, the return code of the
- * operation will be -ECANCELED
  * @param read_op operation to add this action to
  * @param name name of the xattr to look up
  * @param comparison_operator currently undocumented, look for
diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp
index e6e40b2..e7aeb4f 100644
--- a/src/include/rados/librados.hpp
+++ b/src/include/rados/librados.hpp
@@ -14,11 +14,6 @@
 #include "librados.h"
 #include "rados_types.hpp"
 
-namespace libradosstriper
-{
-  class RadosStriper;
-}
-
 namespace librados
 {
   using ceph::bufferlist;
@@ -782,14 +777,6 @@ namespace librados
 
     int aio_stat(const std::string& oid, AioCompletion *c, uint64_t *psize, time_t *pmtime);
 
-    /**
-     * Cancel aio operation
-     *
-     * @param c completion handle
-     * @returns 0 on success, negative error code on failure
-     */
-    int aio_cancel(AioCompletion *c);
-
     int aio_exec(const std::string& oid, AioCompletion *c, const char *cls, const char *method,
 	         bufferlist& inbl, bufferlist *outbl);
 
@@ -873,7 +860,6 @@ namespace librados
     IoCtx(IoCtxImpl *io_ctx_impl_);
 
     friend class Rados; // Only Rados can use our private constructor to create IoCtxes.
-    friend class libradosstriper::RadosStriper; // Striper needs to see our IoCtxImpl
     friend class ObjectWriteOperation;  // copy_from needs to see our IoCtxImpl
 
     IoCtxImpl *io_ctx_impl;
@@ -949,7 +935,7 @@ namespace librados
     static AioCompletion *aio_create_completion();
     static AioCompletion *aio_create_completion(void *cb_arg, callback_t cb_complete,
 						callback_t cb_safe);
-    
+
     friend std::ostream& operator<<(std::ostream &oss, const Rados& r);
   private:
     // We don't allow assignment or copying
diff --git a/src/include/radosstriper/libradosstriper.h b/src/include/radosstriper/libradosstriper.h
deleted file mode 100644
index 972d210..0000000
--- a/src/include/radosstriper/libradosstriper.h
+++ /dev/null
@@ -1,574 +0,0 @@
-#ifndef CEPH_LIBRADOSSTRIPER_H
-#define CEPH_LIBRADOSSTRIPER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <string.h>
-
-#include "../rados/librados.h"
-
-#define LIBRADOSSTRIPER_VER_MAJOR 0
-#define LIBRADOSSTRIPER_VER_MINOR 0
-#define LIBRADOSSTRIPER_VER_EXTRA 0
-
-#define LIBRADOSSTRIPER_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra)
-
-#define LIBRADOSSTRIPER_VERSION_CODE LIBRADOSSTRIPER_VERSION(LIBRADOSSTRIPER_VER_MAJOR, LIBRADOSSTRIPER_VER_MINOR, LIBRADOSSTRIPER_VER_EXTRA)
-
-/**
- * @typedef rados_striper_t
- *
- * A handle for interacting with striped objects in a RADOS cluster.
- */
-typedef void *rados_striper_t;
-
-/**
- * @defgroup libradosstriper_h_init Setup and Teardown
- * These are the first and last functions to that should be called
- * when using libradosstriper.
- *
- * @{
- */
-
-/**
- * Creates a rados striper using the given io context
- * Striper has initially default object layout.
- * See rados_striper_set_object_layout_*() to change this
- *
- * @param ioctx the rados context to use
- * @param striper where to store the rados striper
- * @returns 0 on success, negative error code on failure
- */
-  int rados_striper_create(rados_ioctx_t ioctx,
-                           rados_striper_t *striper);
-
-/**
- * Destroys a rados striper
- *
- * @param striper the striper to destroy
- */
-void rados_striper_destroy(rados_striper_t striper);
-
-/**
- * Sets the object layout's stripe unit of a rados striper for future objects.
- * This layout will be used when new objects are created (by writing to them)
- * Already existing objects will be opened with their own layout.
- *
- * @param striper the targetted striper
- * @param stiper_unit the stripe_unit value of the new object layout
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_set_object_layout_stripe_unit(rados_striper_t striper,
-                                                unsigned int stripe_unit);
-
-/**
- * Sets the object layout's stripe count of a rados striper for future objects.
- * This layout will be used when new objects are created (by writing to them)
- * Already existing objects will be opened with their own layout.
- *
- * @param striper the targetted striper
- * @param stripe_count the stripe_count value of the new object layout
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_set_object_layout_stripe_count(rados_striper_t striper,
-                                                 unsigned int stripe_count);
-
-/**
- * Sets the object layout's object_size of a rados striper for future objects.
- * This layout will be used when new objects are created (by writing to them)
- * Already existing objects will be opened with their own layout.
- *
- * @param striper the targetted striper
- * @param object_size the object_size value of the new object layout
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_set_object_layout_object_size(rados_striper_t striper,
-                                                unsigned int object_size);
-
-/** @} init */
-
-/**
- * @defgroup libradosstriper_h_synch_io Synchronous I/O
- * Writes are striped to several rados objects which are then
- * replicated to a number of OSDs based on the configuration
- * of the pool they are in. These write functions block
- * until data is in memory on all replicas of the object they're
- * writing to - they are equivalent to doing the corresponding
- * asynchronous write, and the calling
- * rados_striper_ioctx_wait_for_complete().
- *
- * @{
- */
-
-/**
- * Synchronously write data to a striped object at the specified offset
- *
- * @param striper the striper in which the write will occur
- * @param soid the name of the striped object
- * @param buf data to write
- * @param len length of the data, in bytes
- * @param off byte offset in the object to begin writing at
- * @returns 0 on success, negative error code on failure
- * failure
- */
-int rados_striper_write(rados_striper_t striper,
-                        const char *soid,
-                        const char *buf,
-                        size_t len,
-                        uint64_t off);
-
-/**
- * Synchronously write an entire striped object
- *
- * The striped object is filled with the provided data. If the striped object exists,
- * it is truncated and then written.
- *
- * @param striper the striper in which the write will occur
- * @param soid the name of the striped object
- * @param buf data to write
- * @param len length of the data, in bytes
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_write_full(rados_striper_t striper,
-                             const char *soid,
-                             const char *buf,
-                             size_t len);
-
-/**
- * Append data to an object
- *
- * @param striper the striper in which the write will occur
- * @param soid the name of the striped object
- * @param buf the data to append
- * @param len length of buf (in bytes)
- * @returns 0 on success, negative error code on failure
- * failure
- */
-int rados_striper_append(rados_striper_t striper,
-                         const char *soid,
-                         const char *buf,
-                         size_t len);
-
-/**
- * Synchronously read data from a striped object at the specified offset
- *
- * @param striper the striper in which the read will occur
- * @param soid the name of the striped object
- * @param buf where to store the results
- * @param len the number of bytes to read
- * @param off the offset to start reading from in the object
- * @returns number of bytes read on success, negative error code on
- * failure
- */
-int rados_striper_read(rados_striper_t striper,
-                       const char *soid,
-                       char *buf,
-                       size_t len,
-                       uint64_t off);
-
-/**
- * Synchronously removes a striped object
- *
- * @note There is no atomicity of the deletion and the striped
- * object may be left incomplete if an error is returned (metadata
- * all present, but some stripes missing)
- * However, there is a atomicity of the metadata deletion and
- * the deletion can not happen if any I/O is ongoing (it
- * will return EBUSY). Identically, no I/O will be able to start
- * during deletion (same EBUSY return code)
- * @param striper the striper in which the remove will occur
- * @param soid the name of the striped object
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_remove(rados_striper_t striper,
-                         const char* soid);
-
-/**
- * Resize an object
- *
- * If this enlarges the object, the new area is logically filled with
- * zeroes. If this shrinks the object, the excess data is removed.
- *
- * @note the truncation is not fully atomic. The metadata part is,
- * so the behavior will be atomic from user point of view when
- * the object size is reduced. However, in case of failure, old data
- * may stay around, hidden. They may reappear if the object size is
- * later grown, instead of the expected 0s. When growing the
- * object and in case of failure, the new 0 data may not be
- * fully created. This can lead to ENOENT errors when
- * writing/reading the missing parts.
- * @note the truncation can not happen if any I/O is ongoing (it
- * will return EBUSY). Identically, no I/O will be able to start
- * during truncation (same EBUSY return code)
- * @param striper the striper in which the truncation will occur
- * @param soid the name of the striped object
- * @param size the new size of the object in bytes
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_trunc(rados_ioctx_t io, const char *soid, uint64_t size);
-
-/** @} Synchronous I/O */
-
-/**
- * @defgroup libradosstriper_h_xattrs Xattrs
- * Extended attributes are stored as extended attributes on the
- * first rados regular object of the striped object.
- * Thus, they have the same limitations as the underlying
- * rados extended attributes.
- *
- * @{
- */
-
-/**
- * Get the value of an extended attribute on a striped object.
- *
- * @param striper the striper in which the getxattr will occur
- * @param o name of the striped object
- * @param name which extended attribute to read
- * @param buf where to store the result
- * @param len size of buf in bytes
- * @returns length of xattr value on success, negative error code on failure
- */
-int rados_striper_getxattr(rados_striper_t striper,
-                           const char *oid,
-                           const char *name,
-                           char *buf,
-                           size_t len);
-
-/**
- * Set an extended attribute on a striped object.
- *
- * @param striper the striper in which the setxattr will occur
- * @param o name of the object
- * @param name which extended attribute to set
- * @param buf what to store in the xattr
- * @param len the number of bytes in buf
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_setxattr(rados_striper_t striper,
-                           const char *oid,
-                           const char *name,
-                           const char *buf,
-                           size_t len);
-
-/**
- * Delete an extended attribute from a striped object.
- *
- * @param striper the striper in which the rmxattr will occur
- * @param o the name of the object
- * @param name which xattr to delete
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_rmxattr(rados_striper_t striper,
-                          const char *oid,
-                          const char *name);
-
-/**
- * Start iterating over xattrs on a striped object.
- *
- * @post iter is a valid iterator
- *
- * @param striper the striper in which the getxattrs will occur
- * @param oid name of the object
- * @param iter where to store the iterator
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_getxattrs(rados_striper_t striper,
-                            const char *oid,
-                            rados_xattrs_iter_t *iter);
-
-/**
- * Get the next xattr on the striped object
- *
- * @pre iter is a valid iterator
- *
- * @post name is the NULL-terminated name of the next xattr, and val
- * contains the value of the xattr, which is of length len. If the end
- * of the list has been reached, name and val are NULL, and len is 0.
- *
- * @param iter iterator to advance
- * @param name where to store the name of the next xattr
- * @param val where to store the value of the next xattr
- * @param len the number of bytes in val
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_getxattrs_next(rados_xattrs_iter_t iter,
-                                 const char **name,
-                                 const char **val,
-                                 size_t *len);
-
-/**
- * Close the xattr iterator.
- *
- * iter should not be used after this is called.
- *
- * @param iter the iterator to close
- */
-void rados_striper_getxattrs_end(rados_xattrs_iter_t iter);
-
-/** @} Xattrs */
-
-/**
- * Synchronously get object stats (size/mtime)
- *
- * @param striper the striper in which the stat will occur
- * @param soid the id of the striped object
- * @param psize where to store object size
- * @param pmtime where to store modification time
- * @returns 0 on success, negative error code on failure
- */
-int rados_striper_stat(rados_striper_t striper,
-                       const char* soid,
-                       uint64_t *psize,
-                       time_t *pmtime);
-
-/**
- * @defgroup libradosstriper_h_asynch_io Asynchronous I/O
- * Read and write to objects without blocking.
- *
- * @{
- */
-
-/**
- * @typedef rados_striper_multi_completion_t
- * Represents the state of a set of asynchronous operations
- * it contains the aggregated return value once the operations complete
- * and can be used to block until all operations are complete and/or safe.
- */
-typedef void *rados_striper_multi_completion_t;
-
-/**
- * Constructs a multi completion to use with asynchronous operations
- *
- * The complete and safe callbacks correspond to operations being
- * acked and committed, respectively. The callbacks are called in
- * order of receipt, so the safe callback may be triggered before the
- * complete callback, and vice versa. This is affected by journalling
- * on the OSDs.
- *
- * @note Read operations only get a complete callback.
- * @note BUG: this should check for ENOMEM instead of throwing an exception
- *
- * @param cb_arg application-defined data passed to the callback functions
- * @param cb_complete the function to be called when the operation is
- * in memory on all relpicas
- * @param cb_safe the function to be called when the operation is on
- * stable storage on all replicas
- * @param pc where to store the completion
- * @returns 0
- */
-int rados_striper_multi_aio_create_completion(void *cb_arg,
-                                              rados_callback_t cb_complete,
-                                              rados_callback_t cb_safe,
-                                              rados_striper_multi_completion_t *pc);
-
-/**
- * Block until all operation complete
- *
- * This means data is in memory on all replicas.
- *
- * @param c operations to wait for
- * @returns 0
- */
-void rados_striper_multi_aio_wait_for_complete(rados_striper_multi_completion_t c);
-
-/**
- * Block until all operation are safe
- *
- * This means data is on stable storage on all replicas.
- *
- * @param c operations to wait for
- * @returns 0
- */
-void rados_striper_multi_aio_wait_for_safe(rados_striper_multi_completion_t c);
-
-/**
- * Has a multi asynchronous operation completed?
- *
- * @warning This does not imply that the complete callback has
- * finished
- *
- * @param c async operations to inspect
- * @returns whether c is complete
- */
-int rados_striper_multi_aio_is_complete(rados_striper_multi_completion_t c);
-
-/**
- * Is a multi asynchronous operation safe?
- *
- * @warning This does not imply that the safe callback has
- * finished
- *
- * @param c async operations to inspect
- * @returns whether c is safe
- */
-int rados_striper_multi_aio_is_safe(rados_striper_multi_completion_t c);
-
-/**
- * Block until all operations complete and callback completes
- *
- * This means data is in memory on all replicas and can be read.
- *
- * @param c operations to wait for
- * @returns 0
- */
-void rados_striper_multi_aio_wait_for_complete_and_cb(rados_striper_multi_completion_t c);
-
-/**
- * Block until all operations are safe and callback has completed
- *
- * This means data is on stable storage on all replicas.
- *
- * @param c operations to wait for
- * @returns 0
- */
-void rados_striper_multi_aio_wait_for_safe_and_cb(rados_striper_multi_completion_t c);
-
-/**
- * Has a multi asynchronous operation and callback completed
- *
- * @param c async operations to inspect
- * @returns whether c is complete
- */
-int rados_striper_multi_aio_is_complete_and_cb(rados_striper_multi_completion_t c);
-
-/**
- * Is a multi asynchronous operation safe and has the callback completed
- *
- * @param c async operations to inspect
- * @returns whether c is safe
- */
-int rados_striper_multi_aio_is_safe_and_cb(rados_striper_multi_completion_t c);
-
-/**
- * Get the return value of a multi asychronous operation
- *
- * The return value is set when all operations are complete or safe,
- * whichever comes first.
- *
- * @pre The operation is safe or complete
- *
- * @note BUG: complete callback may never be called when the safe
- * message is received before the complete message
- *
- * @param c async operations to inspect
- * @returns aggregated return value of the operations
- */
-int rados_striper_multi_aio_get_return_value(rados_striper_multi_completion_t c);
-
-/**
- * Release a multi asynchrnous IO completion
- *
- * Call this when you no longer need the completion. It may not be
- * freed immediately if the operation is not acked and committed.
- *
- * @param c multi completion to release
- */
-void rados_striper_multi_aio_release(rados_striper_multi_completion_t c);
-
-/**
- * Asynchronously write data to a striped object at the specified offset
- *
- * The return value of the completion will be 0 on success, negative
- * error code on failure.
- *
- * @param striper the striper in which the write will occur
- * @param soid the name of the striped object
- * @param completion what to do when the write is safe and complete
- * @param buf data to write
- * @param len length of the data, in bytes
- * @param off byte offset in the object to begin writing at
- * @returns 0 on success, negative error code on
- * failure
- */
-int rados_striper_aio_write(rados_striper_t striper,
-                            const char *soid,
-                            rados_completion_t completion,
-                            const char *buf,
-                            size_t len,
-                            uint64_t off);
-
-/**
- * Asynchronously appends data to a striped object
- *
- * The return value of the completion will be 0 on success, negative
- * error code on failure.
- *
- * @param striper the striper in which the write will occur
- * @param soid the name of the striped object
- * @param completion what to do when the write is safe and complete
- * @param buf data to write
- * @param len length of the data, in bytes
- * @returns 0 on success, negative error code on
- * failure
- */
-int rados_striper_aio_append(rados_striper_t striper,
-                             const char *soid,
-                             rados_completion_t completion,
-                             const char *buf,
-                             size_t len);
-
-/**
- * Asynchronously fills and object with the provided data.
- * If the object exists, it is truncated and then written.
- *
- * The return value of the completion will be 0 on success, negative
- * error code on failure.
- *
- * @param striper the striper in which the write will occur
- * @param soid the name of the striped object
- * @param completion what to do when the write is safe and complete
- * @param buf data to write
- * @param len length of the data, in bytes
- * @returns 0 on success, negative error code on
- * failure
- */
-int rados_striper_aio_write_full(rados_striper_t striper,
-                                 const char *soid,
-                                 rados_completion_t completion,
-                                 const char *buf,
-                                 size_t len);
-
-/**
- * Asynchronously read data from a striped object at the specified offset
- *
- * The return value of the completion will be number of bytes read on
- * success, negative error code on failure.
- *
- * @param striper the striper in which the read will occur
- * @param soid the name of the striped object
- * @param completion what to do when the read is safe and complete
- * @param buf where to store the results
- * @param len the number of bytes to read
- * @param off the offset to start reading from in the object
- * @returns 0 on success, negative error code on
- * failure
- */
-int rados_striper_aio_read(rados_striper_t striper,
-                           const char *soid,
-                           rados_completion_t completion,
-                           char *buf,
-                           const size_t len,
-                           uint64_t off);
-
-/**
- * Block until all pending writes in a striper are safe
- *
- * This is not equivalent to calling rados_striper_multi_aio_wait_for_safe() on all
- * write completions, since this waits for the associated callbacks to
- * complete as well.
- *
- * @param striper the striper in which the flush will occur
- * @returns 0 on success, negative error code on failure
-*/
-void rados_striper_aio_flush(rados_striper_t striper);
-
-/** @} Asynchronous I/O */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/include/radosstriper/libradosstriper.hpp b/src/include/radosstriper/libradosstriper.hpp
deleted file mode 100644
index 2da201c..0000000
--- a/src/include/radosstriper/libradosstriper.hpp
+++ /dev/null
@@ -1,224 +0,0 @@
-#ifndef __LIBRADOSSTRIPER_HPP
-#define __LIBRADOSSTRIPER_HPP
-
-#include <string.h>
-#include <string>
-#include <map>
-#include "../rados/buffer.h"
-#include "../rados/librados.hpp"
-
-#include "libradosstriper.h"
-
-namespace libradosstriper
-{
-  struct RadosStriperImpl;
-  struct MultiAioCompletionImpl;
-
-  /*
-   * Completion object for multiple asynchronous IO
-   * It allows to internally handle several "requests"
-   */
-  struct MultiAioCompletion {
-    MultiAioCompletion(MultiAioCompletionImpl *pc_) : pc(pc_) {}
-    ~MultiAioCompletion();
-    int set_complete_callback(void *cb_arg, librados::callback_t cb);
-    int set_safe_callback(void *cb_arg, librados::callback_t cb);
-    void wait_for_complete();
-    void wait_for_safe();
-    void wait_for_complete_and_cb();
-    void wait_for_safe_and_cb();
-    bool is_complete();
-    bool is_safe();
-    bool is_complete_and_cb();
-    bool is_safe_and_cb();
-    int get_return_value();
-    void release();
-    MultiAioCompletionImpl *pc;
-  };
-
-  /* RadosStriper : This class allows to perform read/writes on striped objects
-   *
-   * Typical use (error checking omitted):
-   *
-   * RadosStriper rs;
-   * RadosStriper.striper_create("my_cluster", rs);
-   * bufferlist bl;
-   * ... put data in bl ...
-   * rs.write(object_name, bl, len, offset);
-   * bufferlist bl2;
-   * rs.read(object_name, &bl2, len, offset);
-   * ...
-   */
-  class RadosStriper
-  {
-  public:
-
-    /*
-     * constructor
-     */
-    RadosStriper();
-
-    /*
-     * builds the C counter part of a RadosStriper
-     */
-    static void to_rados_striper_t(RadosStriper &striper,
-                                   rados_striper_t *s);
-
-    /*
-     * copy constructor
-     */
-    RadosStriper(const RadosStriper& rs);
-
-    /*
-     * operator=
-     */
-    RadosStriper& operator=(const RadosStriper& rs);
-
-    /*
-     * destructor
-     * Internally calling close() if an object is currently opened
-     */
-    ~RadosStriper();
-
-    /*
-     * create method
-     */
-    static int striper_create(librados::IoCtx& ioctx,
-                              RadosStriper *striper);
-
-    /*
-     * set object layout's stripe unit
-     * This layout will be used when new objects are created (by writing to them)
-     * Already existing objects will be opened with their own layout.
-     */
-    int set_object_layout_stripe_unit(unsigned int stripe_unit);
-
-    /*
-     * set object layout's stripe count
-     * This layout will be used when new objects are created (by writing to them)
-     * Already existing objects will be opened with their own layout.
-     */
-    int set_object_layout_stripe_count(unsigned int stripe_count);
-
-    /*
-     * set object layout's object size
-     * This layout will be used when new objects are created (by writing to them)
-     * Already existing objects will be opened with their own layout.
-     */
-    int set_object_layout_object_size(unsigned int object_size);
-
-    /**
-     * Get the value of an extended attribute on a striped object
-     */
-    int getxattr(const std::string& oid, const char *name, ceph::bufferlist& bl);
-
-    /**
-     * Set the value of an extended attribute on a striped object
-     */
-    int setxattr(const std::string& oid, const char *name, ceph::bufferlist& bl);
-
-    /**
-     * Delete an extended attribute from a striped object
-     */
-    int rmxattr(const std::string& oid, const char *name);
-
-    /**
-     * Start iterating over xattrs on a striped object.
-     */
-    int getxattrs(const std::string& oid,
-                  std::map<std::string, ceph::bufferlist>& attrset); 
-    
-    /**
-     * synchronously write to the striped object at the specified offset.
-     * NOTE: this call steals the contents of @param bl.
-     */
-    int write(const std::string& soid, const ceph::bufferlist& bl, size_t len, uint64_t off);
-
-    /**
-     * synchronously fill the striped object with the specified data
-     * NOTE: this call steals the contents of @param bl.
-     */
-    int write_full(const std::string& soid, const ceph::bufferlist& bl);
-
-    /**
-     * synchronously append data to the striped object
-     * NOTE: this call steals the contents of @param bl.
-     */
-    int append(const std::string& soid, const ceph::bufferlist& bl, size_t len);
-
-    /**
-     * asynchronously write to the striped object at the specified offset.
-     * NOTE: this call steals the contents of @param bl.
-     */
-    int aio_write(const std::string& soid, librados::AioCompletion *c, const ceph::bufferlist& bl, size_t len, uint64_t off);
-
-    /**
-     * asynchronously fill the striped object with the specified data
-     * NOTE: this call steals the contents of @param bl.
-     */
-    int aio_write_full(const std::string& soid, librados::AioCompletion *c, const ceph::bufferlist& bl);
-
-    /**
-     * asynchronously append data to the striped object
-     * NOTE: this call steals the contents of @param bl.
-     */
-    int aio_append(const std::string& soid, librados::AioCompletion *c, const ceph::bufferlist& bl, size_t len);
-
-    /**
-     * synchronously read from the striped object at the specified offset.
-     */
-    int read(const std::string& soid, ceph::bufferlist* pbl, size_t len, uint64_t off);
-
-    /**
-     * asynchronously read from the striped object at the specified offset.
-     */
-    int aio_read(const std::string& soid, librados::AioCompletion *c, ceph::bufferlist *pbl, size_t len, uint64_t off);
-
-    /**
-     * synchronously get striped object stats (size/mtime)
-     */
-    int stat(const std::string& soid, uint64_t *psize, time_t *pmtime);
-
-    /**
-     * deletes a striped object.
-     * There is no atomicity of the deletion and the striped
-     * object may be left incomplete if an error is returned (metadata
-     * all present, but some stripes missing)
-     * However, there is a atomicity of the metadata deletion and
-     * the deletion can not happen if any I/O is ongoing (it
-     * will return EBUSY). Identically, no I/O will be able to start
-     * during deletion (same EBUSY return code)
-     */
-    int remove(const std::string& soid);
-
-    /**
-     * Resizes a striped object
-     * the truncation can not happen if any I/O is ongoing (it
-     * will return EBUSY). Identically, no I/O will be able to start
-     * during truncation (same EBUSY return code)
-     */
-    int trunc(const std::string& oid, uint64_t size);
-
-    /**
-     * Wait for all currently pending aio writes to be safe.
-     *
-     * @returns 0 on success, negative error code on failure
-     */
-    int aio_flush();
-
-    /**
-     * creation of multi aio completion objects
-     */
-    static MultiAioCompletion *multi_aio_create_completion();
-    static MultiAioCompletion *multi_aio_create_completion(void *cb_arg,
-                                                           librados::callback_t cb_complete,
-                                                           librados::callback_t cb_safe);
-
-  private:
-    RadosStriperImpl *rados_striper_impl;
-
-  };
-
-}
-
-#endif
diff --git a/src/include/rbd/librbd.h b/src/include/rbd/librbd.h
index a9a3318..1e87af9 100644
--- a/src/include/rbd/librbd.h
+++ b/src/include/rbd/librbd.h
@@ -6,7 +6,7 @@
  * Copyright (C) 2011 New Dream Network
  *
  * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
+ * modify it under the terms of the GNU General Public
  * License version 2.1, as published by the Free Software
  * Foundation.	See file COPYING.
  *
diff --git a/src/include/rbd/librbd.hpp b/src/include/rbd/librbd.hpp
index f85e090..caf61a6 100644
--- a/src/include/rbd/librbd.hpp
+++ b/src/include/rbd/librbd.hpp
@@ -6,7 +6,7 @@
  * Copyright (C) 2011 New Dream Network
  *
  * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
+ * modify it under the terms of the GNU General Public
  * License version 2.1, as published by the Free Software
  * Foundation.	See file COPYING.
  *
@@ -60,9 +60,6 @@ public:
   RBD();
   ~RBD();
 
-  // This must be dynamically allocated with new, and
-  // must be released with release().
-  // Do not use delete.
   struct AioCompletion {
     void *pc;
     AioCompletion(void *cb_arg, callback_t complete_cb);
diff --git a/src/include/str_map.h b/src/include/str_map.h
index c2a8778..eabe8d2 100644
--- a/src/include/str_map.h
+++ b/src/include/str_map.h
@@ -31,107 +31,29 @@
  * string, integer etc. ), -EINVAL is returned and **ss** is set to
  * a human readable error message.
  *
- * If **str** is no valid JSON and if **fallback_to_plain** is set to true
- * (default: true) it is assumed to be a string containing white space
- * separated key=value pairs. A white space is either space, tab or newline.
- * Function **get_str_map** will be leveraged to parse the plain-text
- * key/value pairs.
+ * If **str** is no valid JSON, it is assumed to be a string
+ * containing white space separated key=value pairs. A white space is
+ * either space, tab or newline. The value is optional, in which case
+ * it defaults to an empty string. For example:
  * 
- * @param [in] str JSON or plain text key/value pairs
- * @param [out] ss human readable message on error
- * @param [out] str_map key/value pairs read from str
- * @param [in] fallback_to_plain attempt parsing as plain-text if json fails
- * @return **0** on success or a -EINVAL on error.
- */
-extern int get_json_str_map(
-    const std::string &str,
-    std::ostream &ss,
-    std::map<std::string,std::string> *str_map,
-    bool fallback_to_plain = true);
-
-/**
- * Parse **str** and set **str_map** with the key/value pairs read from
- * it.  The format of **str** is a number of custom key[=value] pairs in
- * plain text format.
- *
- * The string will be parsed taking **delims** as field delimiters for
- * key/values.  The value is optional resulting in an empty string when
- * not provided.  For example, using white space as delimiters:
- *
- *     insert your own=political/ideological    statement=here 
+ *     insert your own=political    statement=here 
  *
  * will be parsed into:
  *
  *     { "insert": "", 
  *       "your": "", 
- *       "own": "political/ideological",
- *       "statement": "here" }
- *
- * Alternative delimiters may be provided.  For instance, specifying
- * "white space and slash", for the above statement, would be parsed
- * into:
- *
- *     { "insert": "",
- *       "your": "",
- *       "own": "political",
- *       "ideological": "",
+ *       "own": "policital",
  *       "statement": "here" }
  *
- * See how adding '/' to the delimiters field will spawn a new key without
- * a set value.
- *
- * Always returns 0, as there is no condition for failure.
- *
- * @param [in] str plain text key/value pairs
- * @param [out] str_map key/value pairs parsed from str
- * @param [in] delim field delimiters to be used for parsing str
- * @return **0**
- */
-extern int get_str_map(
-    const std::string &str,
-    const char *delims,
-    std::map<std::string,std::string> *str_map);
-
-extern int get_str_map(
-    const std::string &str,
-    std::map<std::string,std::string> *str_map);
-
-/**
- * Returns the value of **key** in **str_map** if available.
- *
- * If **key** is not available in **str_map**, and if **def_val** is
- * not-NULL then returns **def_val**. Otherwise checks if the value of
- * **key** is an empty string and if so will return **key**.
- * If the map contains **key**, the function returns the value of **key**.
- *
- * @param[in] str_map Map to obtain **key** from
- * @param[in] key The key to search for in the map
- * @param[in] def_val The value to return in case **key** is not present
- */
-extern std::string get_str_map_value(
-    const std::map<std::string,std::string> &str_map,
-    const std::string &key,
-    const std::string *def_val = NULL);
-
-/**
- * Returns the value of **key** in **str_map** if available.
+ * Returns 0 on success.
  *
- * If **key** is available in **str_map** returns the value of **key**.
- *
- * If **key** is not available in **str_map**, and if **def_key**
- * is not-NULL and available in **str_map**, then returns the value
- * of **def_key**.
- *
- * Otherwise returns an empty string.
- *
- * @param[in] str_map Map to obtain **key** or **def_key** from
- * @param[in] key Key to obtain the value of from **str_map**
- * @param[in] def_key Key to fallback to if **key** is not present
- *                    in **str_map**
+ * @param [in] str JSON or plain text key/value pairs
+ * @param [out] ss human readable message on error
+ * @param [out] str_map key/value pairs read from str
+ * @return **0** on success or a -EINVAL on error.
  */
-extern std::string get_str_map_key(
-    const std::map<std::string,std::string> &str_map,
-    const std::string &key,
-    const std::string *fallback_key = NULL);
+extern int get_str_map(const std::string &str,
+		       std::ostream &ss,
+		       std::map<std::string,std::string> *str_map);
 
 #endif
diff --git a/src/include/stringify.h b/src/include/stringify.h
index 9de3396..76e7853 100644
--- a/src/include/stringify.h
+++ b/src/include/stringify.h
@@ -6,7 +6,7 @@
 
 template<typename T>
 inline std::string stringify(const T& a) {
-  std::ostringstream ss;
+  std::stringstream ss;
   ss << a;
   return ss.str();
 }
diff --git a/src/include/types.h b/src/include/types.h
index ea80a55..ffb0202 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -443,29 +443,7 @@ inline ostream& operator<<(ostream &oss, health_status_t status) {
       break;
   }
   return oss;
-}
-#endif
-
-struct shard_id_t {
-  uint8_t id;
-
-  shard_id_t() : id(0) {}
-  explicit shard_id_t(uint8_t _id) : id(_id) {}
-
-  operator uint8_t() const { return id; }
-
-  const static shard_id_t NO_SHARD;
-
-  void encode(bufferlist &bl) const {
-    ::encode(id, bl);
-  }
-  void decode(bufferlist::iterator &bl) {
-    ::decode(id, bl);
-  }
 };
-WRITE_CLASS_ENCODER(shard_id_t)
-WRITE_EQ_OPERATORS_1(shard_id_t, id)
-WRITE_CMP_OPERATORS_1(shard_id_t, id)
-ostream &operator<<(ostream &lhs, const shard_id_t &rhs);
+#endif
 
 #endif
diff --git a/src/include/utime.h b/src/include/utime.h
index 70c48b5..3108ecd 100644
--- a/src/include/utime.h
+++ b/src/include/utime.h
@@ -33,6 +33,8 @@ public:
     __u32 tv_sec, tv_nsec;
   } tv;
 
+  friend class Clock;
+ 
  public:
   bool is_zero() const {
     return (tv.tv_sec == 0) && (tv.tv_nsec == 0);
diff --git a/src/include/xlist.h b/src/include/xlist.h
index 53aa3ab..5384561 100644
--- a/src/include/xlist.h
+++ b/src/include/xlist.h
@@ -61,11 +61,8 @@ private:
   int _size;
 
 public:
-  xlist(const xlist& other) {
-    _front = other._front;
-    _back = other._back;
-    _size = other._size;
-  }
+  xlist(const xlist& other);
+  const xlist& operator=(const xlist& other);
 
   xlist() : _front(0), _back(0), _size(0) {}
   ~xlist() { 
@@ -164,24 +161,6 @@ public:
 
   iterator begin() { return iterator(_front); }
   iterator end() { return iterator(NULL); }
-
-  class const_iterator {
-  private:
-    item *cur;
-  public:
-    const_iterator(item *i = 0) : cur(i) {}
-    const T operator*() { return static_cast<const T>(cur->_item); }
-    const_iterator& operator++() {
-      assert(cur);
-      assert(cur->_list);
-      cur = cur->_next;
-      return *this;
-    }
-    bool end() const { return cur == 0; }
-  };
-
-  const_iterator begin() const { return const_iterator(_front); }
-  const_iterator end() const { return const_iterator(NULL); }
 };
 
 
diff --git a/src/init-ceph.in b/src/init-ceph.in
index 0ed77ab..7276830 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -14,7 +14,7 @@
 
 . /lib/lsb/init-functions
 
-# if we start up as ./init-ceph, assume everything else is in the
+# if we start up as ./mkcephfs, assume everything else is in the
 # current directory too.
 if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
     BINDIR=.
@@ -362,11 +362,7 @@ for name in $what; do
 		    get_conf osd_weight "" "osd crush initial weight"
 		    defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ print sprintf("%.2f",$2/1073741824) }')"
 		    get_conf osd_keyring "$osd_data/keyring" "keyring"
-		    do_cmd_okfail "timeout 30 $BINDIR/ceph -c $conf --name=osd.$id --keyring=$osd_keyring osd crush create-or-move -- $id ${osd_weight:-${defaultweight:-1}} $osd_location"
-		    if [ "$ERR" != "0" ]; then
-			EXIT_STATUS=$ERR
-			continue
-		    fi
+		    do_cmd "timeout 30 $BINDIR/ceph -c $conf --name=osd.$id --keyring=$osd_keyring osd crush create-or-move -- $id ${osd_weight:-${defaultweight:-1}} $osd_location"
 		fi
 	    fi
 
@@ -380,7 +376,6 @@ for name in $what; do
 	    do_cmd_okfail "$cmd" $runarg
 	    if [ "$ERR" != "0" ]; then
 		EXIT_STATUS=$ERR
-		continue
 	    fi
 
 	    if [ "$type" = "mon" ]; then
@@ -388,7 +383,7 @@ for name in $what; do
 		# for the mon data and admin socket.  if so, run
 		# ceph-create-keys.  this is the case for (normal)
 		# chef and ceph-deploy clusters, which is who needs
-		# these keys.  it's also true for legacy installs
+		# these keys.  it's also true for default installs
 		# via mkcephfs, which is fine too; there is no harm
 		# in creating these keys.
 		get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
diff --git a/src/init-radosgw.sysv b/src/init-radosgw.sysv
index dd3dbb0..06d41f6 100644
--- a/src/init-radosgw.sysv
+++ b/src/init-radosgw.sysv
@@ -85,7 +85,7 @@ case "$1" in
             fi
 
             if [ $SYSTEMD -eq 1 ]; then
-                systemd-run -r bash -c "ulimit -n 32768; $RADOSGW -n $name"
+                systemd-run -r sudo -u "$user" bash -c "ulimit -n 32768; $RADOSGW -n $name"
             else
                 #start-stop-daemon --start -u $user -x $RADOSGW -- -n $name
                 daemon --user="$user" "ulimit -n 32768; $RADOSGW -n $name"
diff --git a/src/init-rbdmap b/src/init-rbdmap
index a4e9863..a6f47b3 100755
--- a/src/init-rbdmap
+++ b/src/init-rbdmap
@@ -18,7 +18,7 @@
 # Description:       Ceph RBD Mapping
 ### END INIT INFO
 
-DESC="RBD Mapping:"
+DESC="RBD Mapping"
 RBDMAPFILE="/etc/ceph/rbdmap"
 
 . /lib/lsb/init-functions
@@ -29,7 +29,9 @@ do_map() {
 		exit 0
 	fi
 
+	log_daemon_msg "Starting $DESC"
 	# Read /etc/rbdtab to create non-existant mapping
+	newrbd=
 	RET=0
 	while read DEV PARAMS; do
 		case "$DEV" in
@@ -42,10 +44,6 @@ do_map() {
 			DEV=rbd/$DEV
 			;;
 		esac
-		log_action_begin_msg "${DESC} '${DEV}'"
-		newrbd=""
-		MAP_RV=""
-		RET_OP=0
 		OIFS=$IFS
 		IFS=','
 		for PARAM in ${PARAMS[@]}; do
@@ -53,76 +51,39 @@ do_map() {
 		done
 		IFS=$OIFS
 		if [ ! -b /dev/rbd/$DEV ]; then
-			MAP_RV=$(rbd map $DEV $CMDPARAMS 2>&1)
-			if [ $? -eq 0 ]; then
-			    newrbd="yes"
-			else
-			    RET=$((${RET}+$?))
-			    RET_OP=1
-			fi
-		fi
-		log_action_end_msg ${RET_OP} "${MAP_RV}"
-
-		if [ "$newrbd" ]; then
-			## Mount new rbd
-			MNT_RV=""
-			mount --fake /dev/rbd/$DEV >>/dev/null 2>&1 \
-			&& MNT_RV=$(mount -v /dev/rbd/$DEV 2>&1)
-			[ -n "${MNT_RV}" ] && log_action_msg "mount: ${MNT_RV}"
-
-			## post-mapping
-			if [ -x "/etc/ceph/rbd.d/${DEV}" ]; then
-			    log_action_msg "RBD Running post-map hook '/etc/ceph/rbd.d/${DEV}'"
-			    /etc/ceph/rbd.d/${DEV} map "/dev/rbd/${DEV}"
-			fi
+			log_progress_msg $DEV
+			rbd map $DEV $CMDPARAMS
+			[ $? -ne "0" ] && RET=1
+			newrbd="yes"
 		fi
 	done < $RBDMAPFILE
-	exit ${RET}
+	log_end_msg $RET
 
+	# Mount new rbd
+	if [ "$newrbd" ]; then
+                log_action_begin_msg "Mounting all filesystems"
+		mount -a
+		log_action_end_msg $?
+	fi
 }
 
 do_unmap() {
+	log_daemon_msg "Stopping $DESC"
 	RET=0
-	## Unmount and unmap all rbd devices
+	# Recursive umount that depends /dev/rbd*
+	MNTDEP=$(findmnt --mtab | awk '$2 ~ /^\/dev\/rbd[0-9]*$/ {print $1}' | sort -r)
+	for MNT in $MNTDEP; do
+		umount $MNT
+	done 
+	# Unmap all rbd device
 	if ls /dev/rbd[0-9]* >/dev/null 2>&1; then
 		for DEV in /dev/rbd[0-9]*; do
-			## pre-unmapping
-			for L in $(find /dev/rbd -type l); do
-			    LL="${L##/dev/rbd/}"
-			    if [ "$(readlink -f $L)" = "${DEV}" ] \
-			    && [ -x "/etc/ceph/rbd.d/${LL}" ]; then
-			        log_action_msg "RBD pre-unmap:  '${DEV}' hook '/etc/ceph/rbd.d/${LL}'"
-			        /etc/ceph/rbd.d/${LL} unmap "$L"
-			        break
-			    fi
-			done
-
-			log_action_begin_msg "RBD un-mapping: '${DEV}'"
-			UMNT_RV=""
-			UMAP_RV=""
-			RET_OP=0
-			MNT=$(findmnt --mtab --source ${DEV} --noheadings | awk '{print $1'})
-			if [ -n "${MNT}" ]; then
-			    log_action_cont_msg "un-mounting '${MNT}'"
-			    UMNT_RV=$(umount "${MNT}" 2>&1)
-			fi
-			if mountpoint -q "${MNT}"; then
-			    ## Un-mounting failed.
-			    RET_OP=1
-			    RET=$((${RET}+1))
-			else
-			    ## Un-mapping.
-			    UMAP_RV=$(rbd unmap $DEV 2>&1)
-			    if [ $? -ne 0 ]; then
-			        RET=$((${RET}+$?))
-			        RET_OP=1
-			    fi
-			fi
-			log_action_end_msg ${RET_OP} "${UMAP_RV}"
-			[ -n "${UMNT_RV}" ] && log_action_msg "${UMNT_RV}"
+			log_progress_msg $DEV
+			rbd unmap $DEV
+			[ $? -ne "0" ] && RET=1
 		done
 	fi
-	exit ${RET}
+	log_end_msg $RET
 }
 
 
@@ -153,3 +114,5 @@ case "$1" in
 	exit 1
 	;;
 esac
+
+exit 0
diff --git a/src/java/Makefile.in b/src/java/Makefile.in
index 5c355e5..013bb6c 100644
--- a/src/java/Makefile.in
+++ b/src/java/Makefile.in
@@ -51,7 +51,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
 	$(top_srcdir)/m4/ax_c_pretty_func.m4 \
 	$(top_srcdir)/m4/ax_c_var_func.m4 \
 	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
-	$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
 	$(top_srcdir)/m4/ax_cxx_static_cast.m4 \
 	$(top_srcdir)/m4/ax_intel.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -111,7 +110,6 @@ AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@
 CC = @CC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
@@ -144,7 +142,6 @@ FGREP = @FGREP@
 GCOV_PREFIX_STRIP = @GCOV_PREFIX_STRIP@
 GIT_CHECK = @GIT_CHECK@
 GREP = @GREP@
-HAVE_CXX11 = @HAVE_CXX11@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -169,8 +166,6 @@ LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
 LIBEDIT_LIBS = @LIBEDIT_LIBS@
 LIBFUSE = @LIBFUSE@
 LIBOBJS = @LIBOBJS@
-LIBROCKSDB_CFLAGS = @LIBROCKSDB_CFLAGS@
-LIBROCKSDB_LIBS = @LIBROCKSDB_LIBS@
 LIBS = @LIBS@
 LIBTCMALLOC = @LIBTCMALLOC@
 LIBTOOL = @LIBTOOL@
@@ -179,8 +174,6 @@ LIBZFS_LIBS = @LIBZFS_LIBS@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LTTNG_GEN_TP_CHECK = @LTTNG_GEN_TP_CHECK@
-LTTNG_GEN_TP_PROG = @LTTNG_GEN_TP_PROG@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
diff --git a/src/java/native/libcephfs_jni.cc b/src/java/native/libcephfs_jni.cc
index 99ab3f4..a96b20d 100644
--- a/src/java/native/libcephfs_jni.cc
+++ b/src/java/native/libcephfs_jni.cc
@@ -1775,6 +1775,7 @@ JNIEXPORT jint JNICALL Java_com_ceph_fs_CephMount_native_1ceph_1fstat
 {
 	struct ceph_mount_info *cmount = get_ceph_mount(j_mntp);
 	CephContext *cct = ceph_get_mount_context(cmount);
+	long long time;
 	struct stat st;
 	int ret;
 
@@ -1792,7 +1793,22 @@ JNIEXPORT jint JNICALL Java_com_ceph_fs_CephMount_native_1ceph_1fstat
 		return ret;
 	}
 
-	fill_cephstat(env, j_cephstat, &st);
+	env->SetIntField(j_cephstat, cephstat_mode_fid, st.st_mode);
+	env->SetIntField(j_cephstat, cephstat_uid_fid, st.st_uid);
+	env->SetIntField(j_cephstat, cephstat_gid_fid, st.st_gid);
+	env->SetLongField(j_cephstat, cephstat_size_fid, st.st_size);
+	env->SetLongField(j_cephstat, cephstat_blksize_fid, st.st_blksize);
+	env->SetLongField(j_cephstat, cephstat_blocks_fid, st.st_blocks);
+
+	time = st.st_mtim.tv_sec;
+	time *= 1000;
+	time += st.st_mtim.tv_nsec / 1000;
+	env->SetLongField(j_cephstat, cephstat_m_time_fid, time);
+
+	time = st.st_atim.tv_sec;
+	time *= 1000;
+	time += st.st_atim.tv_nsec / 1000;
+	env->SetLongField(j_cephstat, cephstat_a_time_fid, time);
 
 	return ret;
 }
diff --git a/src/json_spirit/Makefile.am b/src/json_spirit/Makefile.am
index f14228c..9b82ec4 100644
--- a/src/json_spirit/Makefile.am
+++ b/src/json_spirit/Makefile.am
@@ -1,7 +1,6 @@
 libjson_spirit_la_SOURCES = \
 	json_spirit/json_spirit_reader.cpp \
 	json_spirit/json_spirit_writer.cpp
-libjson_spirit_la_LIBADD = $(BOOST_THREAD_LIBS)
 noinst_LTLIBRARIES += libjson_spirit.la
 
 noinst_HEADERS += \
diff --git a/src/key_value_store/cls_kvs.cc b/src/key_value_store/cls_kvs.cc
index 841f56f..7aa2685 100644
--- a/src/key_value_store/cls_kvs.cc
+++ b/src/key_value_store/cls_kvs.cc
@@ -73,7 +73,7 @@ static int get_idata_from_key(cls_method_context_t hctx, const string &key,
   }
 
   CLS_LOG(20, "idata is %s", idata.str().c_str());
-  return r;
+  return 0;
 }
 
 
@@ -380,6 +380,8 @@ static int omap_insert(cls_method_context_t hctx,
     }
   }
 
+  r = 0;
+
   bufferlist old_size;
   r = cls_cxx_getxattr(hctx, "size", &old_size);
   if (r < 0) {
diff --git a/src/key_value_store/key_value_structure.h b/src/key_value_store/key_value_structure.h
index e5f16d2..ec02791 100644
--- a/src/key_value_store/key_value_structure.h
+++ b/src/key_value_store/key_value_structure.h
@@ -57,7 +57,7 @@ public:
   virtual int suicide() = 0;
 
   ////////////////DESTRUCTOR/////////////////
-  virtual ~KeyValueStructure() {}
+  virtual ~KeyValueStructure() {};
 
   ////////////////UPDATERS///////////////////
 
diff --git a/src/key_value_store/kv_flat_btree_async.cc b/src/key_value_store/kv_flat_btree_async.cc
index 03f274e..709d880 100644
--- a/src/key_value_store/kv_flat_btree_async.cc
+++ b/src/key_value_store/kv_flat_btree_async.cc
@@ -1475,6 +1475,7 @@ int KvFlatBtreeAsync::set_op(const string &key, const bufferlist &val,
 	return err;
       }
       return set_op(key, val, update_on_existing, idata);
+      break;
     }
     default:
       if (verbose) cerr << "\t" << client_name << ": writing obj failed with "
diff --git a/src/krbd.cc b/src/krbd.cc
deleted file mode 100644
index 04f4004..0000000
--- a/src/krbd.cc
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Inktank Storage, Inc.
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <iostream>
-#include <map>
-#include <poll.h>
-#include <sstream>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "auth/KeyRing.h"
-#include "common/errno.h"
-#include "common/Formatter.h"
-#include "common/module.h"
-#include "common/run_cmd.h"
-#include "common/safe_io.h"
-#include "common/secret.h"
-#include "common/TextTable.h"
-#include "include/assert.h"
-#include "include/stringify.h"
-#include "mon/MonMap.h"
-
-#include <blkid/blkid.h>
-#include <libudev.h>
-
-using namespace std;
-
-struct krbd_ctx {
-  CephContext *cct;
-  struct udev *udev;
-};
-
-static string get_kernel_rbd_name(const char *id)
-{
-  return string("/dev/rbd") + id;
-}
-
-static int sysfs_write_rbd(const char *which, const string& buf)
-{
-  const string s = string("/sys/bus/rbd/") + which;
-  const string t = s + "_single_major";
-  int fd;
-  int r;
-
-  /*
-   * 'add' and 'add_single_major' interfaces are identical, but if rbd
-   * kernel module is new enough and is configured to use single-major
-   * scheme, 'add' is disabled in order to prevent old userspace from
-   * doing weird things at unmap time.
-   *
-   * Same goes for 'remove' vs 'remove_single_major'.
-   */
-  fd = open(t.c_str(), O_WRONLY);
-  if (fd < 0) {
-    if (errno == ENOENT) {
-      fd = open(s.c_str(), O_WRONLY);
-      if (fd < 0)
-        return -errno;
-    } else {
-      return -errno;
-    }
-  }
-
-  r = safe_write(fd, buf.c_str(), buf.size());
-
-  close(fd);
-  return r;
-}
-
-static int sysfs_write_rbd_add(const string& buf)
-{
-  return sysfs_write_rbd("add", buf);
-}
-
-static int sysfs_write_rbd_remove(const string& buf)
-{
-  return sysfs_write_rbd("remove", buf);
-}
-
-static int should_match_minor(void)
-{
-  /*
-   * 'minor' attribute was added as part of single_major merge, which
-   * exposed the 'single_major' parameter.  'minor' is always present,
-   * regardless of whether single-major scheme is turned on or not.
-   */
-  return access("/sys/module/rbd/parameters/single_major", F_OK) == 0;
-}
-
-/*
- * options can be NULL
- */
-static int build_map_buf(CephContext *cct, const char *pool, const char *image,
-                         const char *snap, const char *options, string *pbuf)
-{
-  ostringstream oss;
-  int r;
-
-  MonMap monmap;
-  r = monmap.build_initial(cct, cerr);
-  if (r < 0)
-    return r;
-
-  for (map<string, entity_addr_t>::const_iterator it = monmap.mon_addr.begin();
-       it != monmap.mon_addr.end();
-       ++it) {
-    if (it != monmap.mon_addr.begin())
-      oss << ",";
-    oss << it->second.addr;
-  }
-
-  oss << " name=" << cct->_conf->name.get_id();
-
-  KeyRing keyring;
-  r = keyring.from_ceph_context(cct);
-  if (r == -ENOENT && !(cct->_conf->keyfile.length() ||
-                        cct->_conf->key.length()))
-    r = 0;
-  if (r < 0) {
-    cerr << "rbd: failed to get secret" << std::endl;
-    return r;
-  }
-
-  CryptoKey secret;
-  string key_name = string("client.") + cct->_conf->name.get_id();
-  if (keyring.get_secret(cct->_conf->name, secret)) {
-    string secret_str;
-    secret.encode_base64(secret_str);
-
-    r = set_kernel_secret(secret_str.c_str(), key_name.c_str());
-    if (r >= 0) {
-      if (r == 0)
-        cerr << "rbd: warning: secret has length 0" << std::endl;
-      oss << ",key=" << key_name;
-    } else if (r == -ENODEV || r == -ENOSYS) {
-      // running against older kernel; fall back to secret= in options
-      oss << ",secret=" << secret_str;
-    } else {
-      cerr << "rbd: failed to add secret '" << key_name << "' to kernel"
-           << std::endl;
-      return r;
-    }
-  } else if (is_kernel_secret(key_name.c_str())) {
-    oss << ",key=" << key_name;
-  }
-
-  if (options && strcmp(options, "") != 0)
-    oss << "," << options;
-
-  oss << " " << pool << " " << image << " " << snap;
-
-  *pbuf = oss.str();
-  return 0;
-}
-
-static int wait_for_udev_add(struct udev_monitor *mon, const char *pool,
-                             const char *image, const char *snap,
-                             string *pname)
-{
-  struct udev_device *bus_dev = NULL;
-
-  /*
-   * Catch /sys/devices/rbd/<id>/ and wait for the corresponding
-   * block device to show up.  This is necessary because rbd devices
-   * and block devices aren't linked together in our sysfs layout.
-   */
-  for (;;) {
-    struct pollfd fds[1];
-    struct udev_device *dev;
-
-    fds[0].fd = udev_monitor_get_fd(mon);
-    fds[0].events = POLLIN;
-    if (poll(fds, 1, -1) < 0)
-      return -errno;
-
-    dev = udev_monitor_receive_device(mon);
-    if (!dev)
-      continue;
-
-    if (strcmp(udev_device_get_action(dev), "add") != 0)
-      goto next;
-
-    if (!bus_dev) {
-      if (strcmp(udev_device_get_subsystem(dev), "rbd") == 0) {
-        const char *this_pool = udev_device_get_sysattr_value(dev, "pool");
-        const char *this_image = udev_device_get_sysattr_value(dev, "name");
-        const char *this_snap = udev_device_get_sysattr_value(dev,
-                                                              "current_snap");
-
-        if (strcmp(this_pool, pool) == 0 &&
-            strcmp(this_image, image) == 0 &&
-            strcmp(this_snap, snap) == 0) {
-          bus_dev = dev;
-          continue;
-        }
-      }
-    } else {
-      if (strcmp(udev_device_get_subsystem(dev), "block") == 0) {
-        const char *major = udev_device_get_sysattr_value(bus_dev, "major");
-        const char *minor = udev_device_get_sysattr_value(bus_dev, "minor");
-        const char *this_major = udev_device_get_property_value(dev, "MAJOR");
-        const char *this_minor = udev_device_get_property_value(dev, "MINOR");
-
-        assert(!minor ^ should_match_minor());
-
-        if (strcmp(this_major, major) == 0 &&
-            (!minor || strcmp(this_minor, minor) == 0)) {
-          string name = get_kernel_rbd_name(udev_device_get_sysname(bus_dev));
-
-          assert(strcmp(udev_device_get_devnode(dev), name.c_str()) == 0);
-          *pname = name;
-
-          udev_device_unref(dev);
-          udev_device_unref(bus_dev);
-          break;
-        }
-      }
-    }
-
-  next:
-    udev_device_unref(dev);
-  }
-
-  return 0;
-}
-
-static int do_map(struct udev *udev, const char *pool, const char *image,
-                  const char *snap, const string& buf, string *pname)
-{
-  struct udev_monitor *mon;
-  int r;
-
-  mon = udev_monitor_new_from_netlink(udev, "udev");
-  if (!mon)
-    return -ENOMEM;
-
-  r = udev_monitor_filter_add_match_subsystem_devtype(mon, "rbd", NULL);
-  if (r < 0)
-    goto out_mon;
-
-  r = udev_monitor_filter_add_match_subsystem_devtype(mon, "block", "disk");
-  if (r < 0)
-    goto out_mon;
-
-  r = udev_monitor_enable_receiving(mon);
-  if (r < 0)
-    goto out_mon;
-
-  r = sysfs_write_rbd_add(buf);
-  if (r < 0) {
-    cerr << "rbd: sysfs write failed" << std::endl;
-    goto out_mon;
-  }
-
-  r = wait_for_udev_add(mon, pool, image, snap, pname);
-  if (r < 0) {
-    cerr << "rbd: wait failed" << std::endl;
-    goto out_mon;
-  }
-
-out_mon:
-  udev_monitor_unref(mon);
-  return r;
-}
-
-/*
- * snap and options can be NULL
- */
-static int map_image(struct krbd_ctx *ctx, const char *pool, const char *image,
-                     const char *snap, const char *options, string *pname)
-{
-  string buf;
-  int r;
-
-  if (!snap)
-    snap = "-";
-
-  r = build_map_buf(ctx->cct, pool, image, snap, options, &buf);
-  if (r < 0)
-    return r;
-
-  /*
-   * Modprobe rbd kernel module.  If it supports single-major device
-   * number allocation scheme, make sure it's turned on.
-   */
-  if (access("/sys/bus/rbd", F_OK) != 0) {
-    const char *module_options = NULL;
-    if (module_has_param("rbd", "single_major"))
-      module_options = "single_major=Y";
-
-    r = module_load("rbd", module_options);
-    if (r) {
-      cerr << "rbd: failed to load rbd kernel module (" << r << ")"
-           << std::endl;
-      /*
-       * Ignore the error: modprobe failing doesn't necessarily prevent
-       * from working.
-       */
-    }
-  }
-
-  return do_map(ctx->udev, pool, image, snap, buf, pname);
-}
-
-static int devno_to_krbd_id(struct udev *udev, dev_t devno, string *pid)
-{
-  struct udev_enumerate *enm;
-  struct udev_list_entry *l;
-  struct udev_device *dev;
-  int r;
-
-  enm = udev_enumerate_new(udev);
-  if (!enm)
-    return -ENOMEM;
-
-  r = udev_enumerate_add_match_subsystem(enm, "rbd");
-  if (r < 0)
-    goto out_enm;
-
-  r = udev_enumerate_add_match_sysattr(enm, "major",
-                                       stringify(major(devno)).c_str());
-  if (r < 0)
-    goto out_enm;
-
-  if (should_match_minor()) {
-    r = udev_enumerate_add_match_sysattr(enm, "minor",
-                                         stringify(minor(devno)).c_str());
-    if (r < 0)
-      goto out_enm;
-  }
-
-  r = udev_enumerate_scan_devices(enm);
-  if (r < 0)
-    goto out_enm;
-
-  l = udev_enumerate_get_list_entry(enm);
-  if (!l) {
-    r = -ENOENT;
-    goto out_enm;
-  }
-
-  /* make sure there is only one match */
-  assert(!udev_list_entry_get_next(l));
-
-  dev = udev_device_new_from_syspath(udev, udev_list_entry_get_name(l));
-  if (!dev) {
-    r = -ENOMEM;
-    goto out_enm;
-  }
-
-  *pid = udev_device_get_sysname(dev);
-
-  udev_device_unref(dev);
-out_enm:
-  udev_enumerate_unref(enm);
-  return r;
-}
-
-static int wait_for_udev_remove(struct udev_monitor *mon, dev_t devno)
-{
-  for (;;) {
-    struct pollfd fds[1];
-    struct udev_device *dev;
-
-    fds[0].fd = udev_monitor_get_fd(mon);
-    fds[0].events = POLLIN;
-    if (poll(fds, 1, -1) < 0)
-      return -errno;
-
-    dev = udev_monitor_receive_device(mon);
-    if (!dev)
-      continue;
-
-    if (strcmp(udev_device_get_action(dev), "remove") == 0 &&
-        udev_device_get_devnum(dev) == devno) {
-      udev_device_unref(dev);
-      break;
-    }
-
-    udev_device_unref(dev);
-  }
-
-  return 0;
-}
-
-static int do_unmap(struct udev *udev, dev_t devno, const string& id)
-{
-  struct udev_monitor *mon;
-  int r;
-
-  mon = udev_monitor_new_from_netlink(udev, "udev");
-  if (!mon)
-    return -ENOMEM;
-
-  r = udev_monitor_filter_add_match_subsystem_devtype(mon, "block", "disk");
-  if (r < 0)
-    goto out_mon;
-
-  r = udev_monitor_enable_receiving(mon);
-  if (r < 0)
-    goto out_mon;
-
-  /*
-   * On final device close(), kernel sends a block change event, in
-   * response to which udev apparently runs blkid on the device.  This
-   * makes unmap fail with EBUSY, if issued right after final close().
-   * Try to circumvent this with a retry before turning to udev.
-   */
-  for (int tries = 0; ; tries++) {
-    r = sysfs_write_rbd_remove(id);
-    if (r >= 0) {
-      break;
-    } else if (r == -EBUSY && tries < 2) {
-      if (!tries) {
-        usleep(250 * 1000);
-      } else {
-        /*
-         * libudev does not provide the "wait until the queue is empty"
-         * API or the sufficient amount of primitives to build it from.
-         */
-        string err = run_cmd("udevadm", "settle", "--timeout", "10", "--quiet",
-                             NULL);
-        if (!err.empty())
-          cerr << "rbd: " << err << std::endl;
-      }
-    } else {
-      cerr << "rbd: sysfs write failed" << std::endl;
-      goto out_mon;
-    }
-  }
-
-  r = wait_for_udev_remove(mon, devno);
-  if (r < 0) {
-    cerr << "rbd: wait failed" << std::endl;
-    goto out_mon;
-  }
-
-out_mon:
-  udev_monitor_unref(mon);
-  return r;
-}
-
-static int unmap_image(struct krbd_ctx *ctx, const char *devnode)
-{
-  struct stat sb;
-  dev_t wholedevno;
-  string id;
-  int r;
-
-  if (stat(devnode, &sb) < 0 || !S_ISBLK(sb.st_mode)) {
-    cerr << "rbd: '" << devnode << "' is not a block device" << std::endl;
-    return -EINVAL;
-  }
-
-  r = blkid_devno_to_wholedisk(sb.st_rdev, NULL, 0, &wholedevno);
-  if (r < 0) {
-    cerr << "rbd: couldn't compute wholedevno: " << cpp_strerror(r)
-         << std::endl;
-    /*
-     * Ignore the error: we are given whole disks most of the time, and
-     * if it turns out this is a partition we will fail later anyway.
-     */
-    wholedevno = sb.st_rdev;
-  }
-
-  r = devno_to_krbd_id(ctx->udev, wholedevno, &id);
-  if (r < 0) {
-    if (r == -ENOENT) {
-      cerr << "rbd: '" << devnode << "' is not an rbd device" << std::endl;
-      r = -EINVAL;
-    }
-    return r;
-  }
-
-  return do_unmap(ctx->udev, wholedevno, id);
-}
-
-static void dump_one_image(Formatter *f, TextTable *tbl,
-                           const char *id, const char *pool,
-                           const char *image, const char *snap)
-{
-  assert(id && pool && image && snap);
-
-  string kname = get_kernel_rbd_name(id);
-
-  if (f) {
-    f->open_object_section(id);
-    f->dump_string("pool", pool);
-    f->dump_string("name", image);
-    f->dump_string("snap", snap);
-    f->dump_string("device", kname);
-    f->close_section();
-  } else {
-    *tbl << id << pool << image << snap << kname << TextTable::endrow;
-  }
-}
-
-static int do_dump(struct udev *udev, Formatter *f, TextTable *tbl)
-{
-  struct udev_enumerate *enm;
-  struct udev_list_entry *l;
-  bool have_output = false;
-  int r;
-
-  enm = udev_enumerate_new(udev);
-  if (!enm)
-    return -ENOMEM;
-
-  r = udev_enumerate_add_match_subsystem(enm, "rbd");
-  if (r < 0)
-    goto out_enm;
-
-  r = udev_enumerate_scan_devices(enm);
-  if (r < 0)
-    goto out_enm;
-
-  udev_list_entry_foreach(l, udev_enumerate_get_list_entry(enm)) {
-    struct udev_device *dev;
-
-    dev = udev_device_new_from_syspath(udev, udev_list_entry_get_name(l));
-    if (!dev) {
-      r = -ENOMEM;
-      goto out_enm;
-    }
-
-    dump_one_image(f, tbl, udev_device_get_sysname(dev),
-                   udev_device_get_sysattr_value(dev, "pool"),
-                   udev_device_get_sysattr_value(dev, "name"),
-                   udev_device_get_sysattr_value(dev, "current_snap"));
-
-    have_output = true;
-    udev_device_unref(dev);
-  }
-
-  r = have_output;
-out_enm:
-  udev_enumerate_unref(enm);
-  return r;
-}
-
-int dump_images(struct krbd_ctx *ctx, Formatter *f)
-{
-  TextTable tbl;
-  int r;
-
-  if (f) {
-    f->open_object_section("devices");
-  } else {
-    tbl.define_column("id", TextTable::LEFT, TextTable::LEFT);
-    tbl.define_column("pool", TextTable::LEFT, TextTable::LEFT);
-    tbl.define_column("image", TextTable::LEFT, TextTable::LEFT);
-    tbl.define_column("snap", TextTable::LEFT, TextTable::LEFT);
-    tbl.define_column("device", TextTable::LEFT, TextTable::LEFT);
-  }
-
-  r = do_dump(ctx->udev, f, &tbl);
-
-  if (f) {
-    f->close_section();
-    f->flush(cout);
-  } else {
-    if (r > 0)
-      cout << tbl;
-  }
-
-  return r;
-}
-
-extern "C" int krbd_create_from_context(struct CephContext *cct,
-                                        struct krbd_ctx **pctx)
-{
-  struct krbd_ctx *ctx = new struct krbd_ctx();
-
-  ctx->cct = cct;
-  ctx->udev = udev_new();
-  if (!ctx->udev) {
-    delete ctx;
-    return -ENOMEM;
-  }
-
-  *pctx = ctx;
-  return 0;
-}
-
-extern "C" void krbd_destroy(struct krbd_ctx *ctx)
-{
-  if (!ctx)
-    return;
-
-  udev_unref(ctx->udev);
-
-  delete ctx;
-}
-
-extern "C" int krbd_map(struct krbd_ctx *ctx, const char *pool,
-                        const char *image, const char *snap,
-                        const char *options, char **pdevnode)
-{
-  string name;
-  char *devnode;
-  int r;
-
-  r = map_image(ctx, pool, image, snap, options, &name);
-  if (r < 0)
-    return r;
-
-  devnode = strdup(name.c_str());
-  if (!devnode)
-    return -ENOMEM;
-
-  *pdevnode = devnode;
-  return r;
-}
-
-extern "C" int krbd_unmap(struct krbd_ctx *ctx, const char *devnode)
-{
-  return unmap_image(ctx, devnode);
-}
-
-int krbd_showmapped(struct krbd_ctx *ctx, Formatter *f)
-{
-  return dump_images(ctx, f);
-}
diff --git a/src/libcephfs.cc b/src/libcephfs.cc
index 9fd0509..88e86ba 100644
--- a/src/libcephfs.cc
+++ b/src/libcephfs.cc
@@ -1183,9 +1183,9 @@ extern "C" int ceph_ll_lookup_inode(
   if (r) {
     return r;
   }
-
-  assert(inode != NULL);
-  assert(*inode != NULL);
+  if (inode) {
+    assert(*inode != NULL);
+  }
 
   // Request the parent inode, so that we can look up the name
   Inode *parent;
diff --git a/src/librados/AioCompletionImpl.h b/src/librados/AioCompletionImpl.h
index efcd596..fd8ea48 100644
--- a/src/librados/AioCompletionImpl.h
+++ b/src/librados/AioCompletionImpl.h
@@ -33,7 +33,6 @@ struct librados::AioCompletionImpl {
   bool released;
   bool ack, safe;
   version_t objver;
-  ceph_tid_t tid;
 
   rados_callback_t callback_complete, callback_safe;
   void *callback_complete_arg, *callback_safe_arg;
@@ -50,7 +49,6 @@ struct librados::AioCompletionImpl {
   AioCompletionImpl() : lock("AioCompletionImpl lock", false, false),
 			ref(1), rval(0), released(false), ack(false), safe(false),
 			objver(0),
-                        tid(0),
 			callback_complete(0),
 			callback_safe(0),
 			callback_complete_arg(0),
diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc
index 210575b..6fc22ad 100644
--- a/src/librados/IoCtxImpl.cc
+++ b/src/librados/IoCtxImpl.cc
@@ -66,11 +66,13 @@ int librados::IoCtxImpl::set_snap_write_context(snapid_t seq, vector<snapid_t>&
 
 uint32_t librados::IoCtxImpl::get_object_hash_position(const std::string& oid)
 {
+  Mutex::Locker l(*lock);
   return objecter->get_object_hash_position(poolid, oid, oloc.nspace);
 }
 
 uint32_t librados::IoCtxImpl::get_object_pg_hash_position(const std::string& oid)
 {
+  Mutex::Locker l(*lock);
   return objecter->get_object_pg_hash_position(poolid, oid, oloc.nspace);
 }
 
@@ -156,7 +158,9 @@ int librados::IoCtxImpl::snap_create(const char *snapName)
   Cond cond;
   bool done;
   Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &reply);
+  lock->Lock();
   reply = objecter->create_pool_snap(poolid, sName, onfinish);
+  lock->Unlock();
 
   if (reply < 0) {
     delete onfinish;
@@ -178,7 +182,9 @@ int librados::IoCtxImpl::selfmanaged_snap_create(uint64_t *psnapid)
   bool done;
   Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &reply);
   snapid_t snapid;
+  lock->Lock();
   reply = objecter->allocate_selfmanaged_snap(poolid, &snapid, onfinish);
+  lock->Unlock();
 
   if (reply < 0) {
     delete onfinish;
@@ -202,7 +208,9 @@ int librados::IoCtxImpl::snap_remove(const char *snapName)
   Cond cond;
   bool done;
   Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &reply);
+  lock->Lock();
   reply = objecter->delete_pool_snap(poolid, sName, onfinish);
+  lock->Unlock();
 
   if (reply < 0) {
     delete onfinish; 
@@ -230,9 +238,11 @@ int librados::IoCtxImpl::selfmanaged_snap_rollback_object(const object_t& oid,
   ::ObjectOperation op;
   prepare_assert_ops(&op);
   op.rollback(snapid);
+  lock->Lock();
   objecter->mutate(oid, oloc,
 	           op, snapc, ut, 0,
 	           onack, NULL, NULL);
+  lock->Unlock();
 
   mylock.Lock();
   while (!done) cond.Wait(mylock);
@@ -242,13 +252,26 @@ int librados::IoCtxImpl::selfmanaged_snap_rollback_object(const object_t& oid,
 
 int librados::IoCtxImpl::rollback(const object_t& oid, const char *snapName)
 {
-  snapid_t snap;
+  string sName(snapName);
 
-  int r = objecter->pool_snap_by_name(poolid, snapName, &snap);
-  if (r < 0) {
-    return r;
+  lock->Lock();
+  snapid_t snap;
+  const map<int64_t, pg_pool_t>& pools = objecter->osdmap->get_pools();
+  const pg_pool_t& pg_pool = pools.find(poolid)->second;
+  map<snapid_t, pool_snap_info_t>::const_iterator p;
+  for (p = pg_pool.snaps.begin();
+       p != pg_pool.snaps.end();
+       ++p) {
+    if (p->second.name == snapName) {
+      snap = p->first;
+      break;
+    }
   }
-  string sName(snapName);
+  if (p == pg_pool.snaps.end()) {
+    lock->Unlock();
+    return -ENOENT;
+  }
+  lock->Unlock();
 
   return selfmanaged_snap_rollback_object(oid, snapc, snap);
 }
@@ -260,8 +283,10 @@ int librados::IoCtxImpl::selfmanaged_snap_remove(uint64_t snapid)
   Mutex mylock("IoCtxImpl::selfmanaged_snap_remove::mylock");
   Cond cond;
   bool done;
+  lock->Lock();
   objecter->delete_selfmanaged_snap(poolid, snapid_t(snapid),
 				    new C_SafeCond(&mylock, &cond, &done, &reply));
+  lock->Unlock();
 
   mylock.Lock();
   while (!done) cond.Wait(mylock);
@@ -276,9 +301,11 @@ int librados::IoCtxImpl::pool_change_auid(unsigned long long auid)
   Mutex mylock("IoCtxImpl::pool_change_auid::mylock");
   Cond cond;
   bool done;
+  lock->Lock();
   objecter->change_pool_auid(poolid,
 			     new C_SafeCond(&mylock, &cond, &done, &reply),
 			     auid);
+  lock->Unlock();
 
   mylock.Lock();
   while (!done) cond.Wait(mylock);
@@ -289,6 +316,7 @@ int librados::IoCtxImpl::pool_change_auid(unsigned long long auid)
 int librados::IoCtxImpl::pool_change_auid_async(unsigned long long auid,
 						  PoolAsyncCompletionImpl *c)
 {
+  Mutex::Locker l(*lock);
   objecter->change_pool_auid(poolid,
 			     new C_PoolAsync_Safe(c),
 			     auid);
@@ -297,33 +325,49 @@ int librados::IoCtxImpl::pool_change_auid_async(unsigned long long auid,
 
 int librados::IoCtxImpl::snap_list(vector<uint64_t> *snaps)
 {
-  return objecter->pool_snap_list(poolid, snaps);
+  Mutex::Locker l(*lock);
+  const pg_pool_t *pi = objecter->osdmap->get_pg_pool(poolid);
+  for (map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.begin();
+       p != pi->snaps.end();
+       ++p)
+    snaps->push_back(p->first);
+  return 0;
 }
 
 int librados::IoCtxImpl::snap_lookup(const char *name, uint64_t *snapid)
 {
-  return objecter->pool_snap_by_name(poolid, name, (snapid_t *)snapid);
+  Mutex::Locker l(*lock);
+  const pg_pool_t *pi = objecter->osdmap->get_pg_pool(poolid);
+  for (map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.begin();
+       p != pi->snaps.end();
+       ++p) {
+    if (p->second.name == name) {
+      *snapid = p->first;
+      return 0;
+    }
+  }
+  return -ENOENT;
 }
 
 int librados::IoCtxImpl::snap_get_name(uint64_t snapid, std::string *s)
 {
-  pool_snap_info_t info;
-  int ret = objecter->pool_snap_get_info(poolid, snapid, &info);
-  if (ret < 0) {
-    return ret;
-  }
-  *s = info.name.c_str();
+  Mutex::Locker l(*lock);
+  const pg_pool_t *pi = objecter->osdmap->get_pg_pool(poolid);
+  map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.find(snapid);
+  if (p == pi->snaps.end())
+    return -ENOENT;
+  *s = p->second.name.c_str();
   return 0;
 }
 
 int librados::IoCtxImpl::snap_get_stamp(uint64_t snapid, time_t *t)
 {
-  pool_snap_info_t info;
-  int ret = objecter->pool_snap_get_info(poolid, snapid, &info);
-  if (ret < 0) {
-    return ret;
-  }
-  *t = info.stamp.sec();
+  Mutex::Locker l(*lock);
+  const pg_pool_t *pi = objecter->osdmap->get_pg_pool(poolid);
+  map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.find(snapid);
+  if (p == pi->snaps.end())
+    return -ENOENT;
+  *t = p->second.stamp.sec();
   return 0;
 }
 
@@ -344,7 +388,9 @@ int librados::IoCtxImpl::list(Objecter::ListContext *context, int max_entries)
   context->max_entries = max_entries;
   context->nspace = oloc.nspace;
 
+  lock->Lock();
   objecter->list_objects(context, new C_SafeCond(&mylock, &cond, &done, &r));
+  lock->Unlock();
 
   mylock.Lock();
   while(!done)
@@ -357,6 +403,7 @@ int librados::IoCtxImpl::list(Objecter::ListContext *context, int max_entries)
 uint32_t librados::IoCtxImpl::list_seek(Objecter::ListContext *context,
 					uint32_t pos)
 {
+  Mutex::Locker l(*lock);
   context->list.clear();
   return objecter->list_objects_seek(context, pos);
 }
@@ -476,7 +523,9 @@ int librados::IoCtxImpl::operate(const object_t& oid, ::ObjectOperation *o,
   Objecter::Op *objecter_op = objecter->prepare_mutate_op(oid, oloc,
 	                                                  *o, snapc, ut, flags,
 	                                                  NULL, oncommit, &ver);
+  lock->Lock();
   objecter->op_submit(objecter_op);
+  lock->Unlock();
 
   mylock.Lock();
   while (!done)
@@ -511,7 +560,9 @@ int librados::IoCtxImpl::operate_read(const object_t& oid,
   Objecter::Op *objecter_op = objecter->prepare_read_op(oid, oloc,
 	                                      *o, snap_seq, pbl, flags,
 	                                      onack, &ver);
+  lock->Lock();
   objecter->op_submit(objecter_op);
+  lock->Unlock();
 
   mylock.Lock();
   while (!done)
@@ -539,7 +590,8 @@ int librados::IoCtxImpl::aio_operate_read(const object_t &oid,
   Objecter::Op *objecter_op = objecter->prepare_read_op(oid, oloc,
 		 *o, snap_seq, pbl, flags,
 		 onack, &c->objver);
-  c->tid = objecter->op_submit(objecter_op);
+  Mutex::Locker l(*lock);
+  objecter->op_submit(objecter_op);
   return 0;
 }
 
@@ -558,8 +610,9 @@ int librados::IoCtxImpl::aio_operate(const object_t& oid,
   c->io = this;
   queue_aio_write(c);
 
-  c->tid = objecter->mutate(oid, oloc, *o, snap_context, ut, flags, onack, oncommit,
-		            &c->objver);
+  Mutex::Locker l(*lock);
+  objecter->mutate(oid, oloc, *o, snap_context, ut, flags, onack, oncommit,
+		   &c->objver);
 
   return 0;
 }
@@ -577,7 +630,8 @@ int librados::IoCtxImpl::aio_read(const object_t oid, AioCompletionImpl *c,
   c->io = this;
   c->blp = pbl;
 
-  c->tid = objecter->read(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->read(oid, oloc,
 		 off, len, snapid, pbl, 0,
 		 onack, &c->objver);
   return 0;
@@ -598,7 +652,8 @@ int librados::IoCtxImpl::aio_read(const object_t oid, AioCompletionImpl *c,
   c->bl.push_back(buffer::create_static(len, buf));
   c->blp = &c->bl;
 
-  c->tid = objecter->read(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->read(oid, oloc,
 		 off, len, snapid, &c->bl, 0,
 		 onack, &c->objver);
 
@@ -633,7 +688,8 @@ int librados::IoCtxImpl::aio_sparse_read(const object_t oid,
 
   onack->m_ops.sparse_read(off, len, m, data_bl, NULL);
 
-  c->tid = objecter->read(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->read(oid, oloc,
 		 onack->m_ops, snap_seq, NULL, 0,
 		 onack, &c->objver);
   return 0;
@@ -656,7 +712,8 @@ int librados::IoCtxImpl::aio_write(const object_t &oid, AioCompletionImpl *c,
   Context *onack = new C_aio_Ack(c);
   Context *onsafe = new C_aio_Safe(c);
 
-  c->tid = objecter->write(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->write(oid, oloc,
 		  off, len, snapc, bl, ut, 0,
 		  onack, onsafe, &c->objver);
 
@@ -678,7 +735,8 @@ int librados::IoCtxImpl::aio_append(const object_t &oid, AioCompletionImpl *c,
   Context *onack = new C_aio_Ack(c);
   Context *onsafe = new C_aio_Safe(c);
 
-  c->tid = objecter->append(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->append(oid, oloc,
 		   len, snapc, bl, ut, 0,
 		   onack, onsafe, &c->objver);
 
@@ -701,7 +759,8 @@ int librados::IoCtxImpl::aio_write_full(const object_t &oid,
   Context *onack = new C_aio_Ack(c);
   Context *onsafe = new C_aio_Safe(c);
 
-  c->tid = objecter->write_full(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->write_full(oid, oloc,
 		       snapc, bl, ut, 0,
 		       onack, onsafe, &c->objver);
 
@@ -722,7 +781,8 @@ int librados::IoCtxImpl::aio_remove(const object_t &oid, AioCompletionImpl *c)
   Context *onack = new C_aio_Ack(c);
   Context *onsafe = new C_aio_Safe(c);
 
-  c->tid = objecter->remove(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->remove(oid, oloc,
 		   snapc, ut, 0,
 		   onack, onsafe, &c->objver);
 
@@ -736,19 +796,14 @@ int librados::IoCtxImpl::aio_stat(const object_t& oid, AioCompletionImpl *c,
   c->io = this;
   C_aio_stat_Ack *onack = new C_aio_stat_Ack(c, pmtime);
 
-  c->tid = objecter->stat(oid, oloc,
+  Mutex::Locker l(*lock);
+  objecter->stat(oid, oloc,
 		 snap_seq, psize, &onack->mtime, 0,
 		 onack, &c->objver);
 
   return 0;
 }
 
-int librados::IoCtxImpl::aio_cancel(AioCompletionImpl *c)
-{
-  return objecter->op_cancel(c->tid, -ECANCELED);
-}
-
-
 int librados::IoCtxImpl::hit_set_list(uint32_t hash, AioCompletionImpl *c,
 			      std::list< std::pair<time_t, time_t> > *pls)
 {
@@ -756,10 +811,11 @@ int librados::IoCtxImpl::hit_set_list(uint32_t hash, AioCompletionImpl *c,
   c->is_read = true;
   c->io = this;
 
+  Mutex::Locker l(*lock);
   ::ObjectOperation rd;
   rd.hit_set_ls(pls, NULL);
   object_locator_t oloc(poolid);
-  c->tid = objecter->pg_read(hash, oloc, rd, NULL, 0, onack, NULL, NULL);
+  objecter->pg_read(hash, oloc, rd, NULL, 0, onack, NULL);
   return 0;
 }
 
@@ -771,10 +827,11 @@ int librados::IoCtxImpl::hit_set_get(uint32_t hash, AioCompletionImpl *c,
   c->is_read = true;
   c->io = this;
 
+  Mutex::Locker l(*lock);
   ::ObjectOperation rd;
   rd.hit_set_get(utime_t(stamp, 0), pbl, 0);
   object_locator_t oloc(poolid);
-  c->tid = objecter->pg_read(hash, oloc, rd, NULL, 0, onack, NULL, NULL);
+  objecter->pg_read(hash, oloc, rd, NULL, 0, onack, NULL);
   return 0;
 }
 
@@ -845,10 +902,11 @@ int librados::IoCtxImpl::aio_exec(const object_t& oid, AioCompletionImpl *c,
   c->is_read = true;
   c->io = this;
 
+  Mutex::Locker l(*lock);
   ::ObjectOperation rd;
   prepare_assert_ops(&rd);
   rd.call(cls, method, inbl);
-  c->tid = objecter->read(oid, oloc, rd, snap_seq, outbl, 0, onack, &c->objver);
+  objecter->read(oid, oloc, rd, snap_seq, outbl, 0, onack, &c->objver);
 
   return 0;
 }
@@ -886,9 +944,11 @@ int librados::IoCtxImpl::mapext(const object_t& oid,
   int r;
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
+  lock->Lock();
   objecter->mapext(oid, oloc,
 		   off, len, snap_seq, &bl, 0,
 		   onack);
+  lock->Unlock();
 
   mylock.Lock();
   while (!done)
@@ -1013,9 +1073,8 @@ int librados::IoCtxImpl::watch(const object_t& oid, uint64_t ver,
 
   lock->Lock();
 
-  WatchNotifyInfo *wc = new WatchNotifyInfo(this, oid);
-  wc->watch_ctx = ctx;
-  client->register_watch_notify_callback(wc, cookie);
+  WatchContext *wc = new WatchContext(this, oid, ctx);
+  client->register_watcher(wc, cookie);
   prepare_assert_ops(&wr);
   wr.watch(*cookie, ver, 1);
   bufferlist bl;
@@ -1034,7 +1093,7 @@ int librados::IoCtxImpl::watch(const object_t& oid, uint64_t ver,
 
   if (r < 0) {
     lock->Lock();
-    client->unregister_watch_notify_callback(*cookie); // destroys wc
+    client->unregister_watcher(*cookie);
     lock->Unlock();
   }
 
@@ -1052,6 +1111,7 @@ int librados::IoCtxImpl::_notify_ack(
   prepare_assert_ops(&rd);
   rd.notify_ack(notify_id, ver, cookie);
   objecter->read(oid, oloc, rd, snap_seq, (bufferlist*)NULL, 0, 0, 0);
+
   return 0;
 }
 
@@ -1067,7 +1127,7 @@ int librados::IoCtxImpl::unwatch(const object_t& oid, uint64_t cookie)
   version_t ver;
   lock->Lock();
 
-  client->unregister_watch_notify_callback(cookie);
+  client->unregister_watcher(cookie);
 
   ::ObjectOperation wr;
   prepare_assert_ops(&wr);
@@ -1089,60 +1149,52 @@ int librados::IoCtxImpl::notify(const object_t& oid, uint64_t ver, bufferlist& b
 {
   bufferlist inbl, outbl;
 
-  // Construct WatchNotifyInfo
-  Cond cond_all;
+  Mutex mylock("IoCtxImpl::notify::mylock");
   Mutex mylock_all("IoCtxImpl::notify::mylock_all");
-  bool done_all = false;
-  int r_notify = 0;
-  WatchNotifyInfo *wc = new WatchNotifyInfo(this, oid);
-  wc->notify_done = &done_all;
-  wc->notify_lock = &mylock_all;
-  wc->notify_cond = &cond_all;
-  wc->notify_rval = &r_notify;
+  Cond cond, cond_all;
+  bool done, done_all;
+  int r;
+  Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
+  version_t objver;
+  uint64_t cookie;
+  C_NotifyComplete *ctx = new C_NotifyComplete(&mylock_all, &cond_all, &done_all);
 
-  lock->Lock();
+  ::ObjectOperation rd;
+  prepare_assert_ops(&rd);
 
-  // Acquire cookie
-  uint64_t cookie;
-  client->register_watch_notify_callback(wc, &cookie);
+  lock->Lock();
+  WatchContext *wc = new WatchContext(this, oid, ctx);
+  client->register_watcher(wc, &cookie);
   uint32_t prot_ver = 1;
   uint32_t timeout = notify_timeout;
   ::encode(prot_ver, inbl);
   ::encode(timeout, inbl);
   ::encode(bl, inbl);
-
-  // Construct RADOS op
-  ::ObjectOperation rd;
-  prepare_assert_ops(&rd);
   rd.notify(cookie, ver, inbl);
-
-  // Issue RADOS op
-  C_SaferCond onack;
-  version_t objver;
   wc->linger_id = objecter->linger_read(oid, oloc, rd, snap_seq, inbl, NULL, 0,
-					&onack, &objver);
+					onack, &objver);
   lock->Unlock();
 
-  ldout(client->cct, 10) << __func__ << " issued linger op " << wc->linger_id << dendl;
-  int r_issue = onack.wait();
-  ldout(client->cct, 10) << __func__ << " linger op " << wc->linger_id << " acked (" << r_issue << ")" << dendl;
+  mylock.Lock();
+  while (!done)
+    cond.Wait(mylock);
+  mylock.Unlock();
 
-  if (r_issue == 0) {
-  ldout(client->cct, 10) << __func__ << "waiting for watch_notify message for linger op " << wc->linger_id << dendl;
-    mylock_all.Lock();
+  mylock_all.Lock();
+  if (r == 0) {
     while (!done_all)
       cond_all.Wait(mylock_all);
-    mylock_all.Unlock();
   }
-  ldout(client->cct, 10) << __func__ << " completed notify (linger op " << wc->linger_id << "), unregistering" << dendl;
+  mylock_all.Unlock();
 
   lock->Lock();
-  client->unregister_watch_notify_callback(cookie);   // destroys wc
+  client->unregister_watcher(cookie);
   lock->Unlock();
 
   set_sync_op_version(objver);
+  delete ctx;
 
-  return r_issue == 0 ? r_notify : r_issue;
+  return r;
 }
 
 int librados::IoCtxImpl::set_alloc_hint(const object_t& oid,
@@ -1258,3 +1310,51 @@ void librados::IoCtxImpl::C_aio_Safe::finish(int r)
   c->put_unlock();
 }
 
+///////////////////////// C_NotifyComplete /////////////////////////////
+
+librados::IoCtxImpl::C_NotifyComplete::C_NotifyComplete(Mutex *_l,
+							Cond *_c,
+							bool *_d)
+  : lock(_l), cond(_c), done(_d)
+{
+  *done = false;
+}
+
+void librados::IoCtxImpl::C_NotifyComplete::notify(uint8_t opcode,
+						   uint64_t ver,
+						   bufferlist& bl)
+{
+  lock->Lock();
+  *done = true;
+  cond->Signal();
+  lock->Unlock();
+}
+
+/////////////////////////// WatchContext ///////////////////////////////
+
+librados::WatchContext::WatchContext(IoCtxImpl *io_ctx_impl_,
+				     const object_t& _oc,
+				     librados::WatchCtx *_ctx)
+  : io_ctx_impl(io_ctx_impl_), oid(_oc), ctx(_ctx), linger_id(0), cookie(0)
+{
+  io_ctx_impl->get();
+}
+
+librados::WatchContext::~WatchContext()
+{
+  io_ctx_impl->put();
+}
+
+void librados::WatchContext::notify(Mutex *client_lock,
+                                    uint8_t opcode,
+				    uint64_t ver,
+				    uint64_t notify_id,
+				    bufferlist& payload)
+{
+  ctx->notify(opcode, ver, payload);
+  if (opcode != WATCH_NOTIFY_COMPLETE) {
+    client_lock->Lock();
+    io_ctx_impl->_notify_ack(oid, notify_id, ver, cookie);
+    client_lock->Unlock();
+  }
+}
diff --git a/src/librados/IoCtxImpl.h b/src/librados/IoCtxImpl.h
index 4d79e7b..528022f 100644
--- a/src/librados/IoCtxImpl.h
+++ b/src/librados/IoCtxImpl.h
@@ -185,7 +185,6 @@ struct librados::IoCtxImpl {
   int aio_exec(const object_t& oid, AioCompletionImpl *c, const char *cls,
 	       const char *method, bufferlist& inbl, bufferlist *outbl);
   int aio_stat(const object_t& oid, AioCompletionImpl *c, uint64_t *psize, time_t *pmtime);
-  int aio_cancel(AioCompletionImpl *c);
 
   int pool_change_auid(unsigned long long auid);
   int pool_change_auid_async(unsigned long long auid, PoolAsyncCompletionImpl *c);
@@ -212,51 +211,30 @@ struct librados::IoCtxImpl {
   void set_assert_src_version(const object_t& oid, uint64_t ver);
   void set_notify_timeout(uint32_t timeout);
 
+  struct C_NotifyComplete : public librados::WatchCtx {
+    Mutex *lock;
+    Cond *cond;
+    bool *done;
+
+    C_NotifyComplete(Mutex *_l, Cond *_c, bool *_d);
+    void notify(uint8_t opcode, uint64_t ver, bufferlist& bl);
+  };
 };
 
 namespace librados {
-
-  /**
-   * watch/notify info
-   *
-   * Capture state about a watch or an in-progress notify
-   */
-struct WatchNotifyInfo : public RefCountedWaitObject {
-  IoCtxImpl *io_ctx_impl;  // parent
-  const object_t oid;      // the object
-  uint64_t linger_id;      // we use this to unlinger when we are done
-  uint64_t cookie;         // callback cookie
-
-  // watcher
-  librados::WatchCtx *watch_ctx;
-
-  // notify that we initiated
-  Mutex *notify_lock;
-  Cond *notify_cond;
-  bool *notify_done;
-  int *notify_rval;
-
-  WatchNotifyInfo(IoCtxImpl *io_ctx_impl_,
-		  const object_t& _oc)
-    : io_ctx_impl(io_ctx_impl_),
-      oid(_oc),
-      linger_id(0),
-      cookie(0),
-      watch_ctx(NULL),
-      notify_lock(NULL),
-      notify_cond(NULL),
-      notify_done(NULL),
-      notify_rval(NULL) {
-    io_ctx_impl->get();
-  }
-
-  ~WatchNotifyInfo() {
-    io_ctx_impl->put();
-  }
-
+struct WatchContext : public RefCountedWaitObject {
+  IoCtxImpl *io_ctx_impl;
+  const object_t oid;
+  librados::WatchCtx *ctx;
+  uint64_t linger_id;
+  uint64_t cookie;
+
+  WatchContext(IoCtxImpl *io_ctx_impl_,
+	       const object_t& _oc,
+	       librados::WatchCtx *_ctx);
+  ~WatchContext();
   void notify(Mutex *lock, uint8_t opcode, uint64_t ver, uint64_t notify_id,
-	      bufferlist& payload,
-	      int return_code);
+	      bufferlist& payload);
 };
 }
 #endif
diff --git a/src/librados/Makefile.am b/src/librados/Makefile.am
index 75a1683..23e9167 100644
--- a/src/librados/Makefile.am
+++ b/src/librados/Makefile.am
@@ -2,17 +2,12 @@ librados_la_SOURCES = \
 	librados/librados.cc \
 	librados/RadosClient.cc \
 	librados/IoCtxImpl.cc \
-	librados/snap_set_diff.cc \
-	librados/RadosXattrIter.cc
+	librados/snap_set_diff.cc
 
 # We need this to avoid basename conflicts with the librados build tests in test/Makefile.am
 librados_la_CXXFLAGS = ${AM_CXXFLAGS}
 
 LIBRADOS_DEPS += libcls_lock_client.la $(LIBOSDC) $(LIBCOMMON)
-if WITH_LTTNG
-LIBRADOS_DEPS += $(LIBRADOS_TP)
-endif
-
 librados_la_LIBADD = $(LIBRADOS_DEPS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
 librados_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0
 if LINUX
@@ -25,5 +20,4 @@ noinst_HEADERS += \
 	librados/AioCompletionImpl.h \
 	librados/IoCtxImpl.h \
 	librados/PoolAsyncCompletionImpl.h \
-	librados/RadosClient.h \
-	librados/RadosXattrIter.h
+	librados/RadosClient.h
diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc
index 6aeba57..9330e65 100644
--- a/src/librados/RadosClient.cc
+++ b/src/librados/RadosClient.cc
@@ -74,87 +74,100 @@ librados::RadosClient::RadosClient(CephContext *cct_)
     messenger(NULL),
     instance_id(0),
     objecter(NULL),
+    osdmap_epoch(0),
+    pool_cache_epoch(0),
     lock("librados::RadosClient::lock"),
+    pool_cache_rwl("librados::RadosClient::pool_cache_rwl"),
     timer(cct, lock),
     refcnt(1),
     log_last_version(0), log_cb(NULL), log_cb_arg(NULL),
     finisher(cct),
-    max_watch_notify_cookie(0)
+    max_watch_cookie(0)
 {
 }
 
 int64_t librados::RadosClient::lookup_pool(const char *name)
 {
+  pool_cache_rwl.get_read();
+  if (pool_cache_epoch && pool_cache_epoch == osdmap_epoch) {
+    map<string, int64_t>::iterator iter = pool_cache.find(name);
+    if (iter != pool_cache.end()) {
+      uint64_t val = iter->second;
+      pool_cache_rwl.unlock();
+      return val;
+    }
+  }
+
+  pool_cache_rwl.unlock();
+
+  lock.Lock();
+
   int r = wait_for_osdmap();
   if (r < 0) {
+    lock.Unlock();
     return r;
   }
+  int64_t ret = osdmap.lookup_pg_pool_name(name);
+  pool_cache_rwl.get_write();
+  lock.Unlock();
+  if (ret < 0) {
+    pool_cache_rwl.unlock();
+    return -ENOENT;
+  }
 
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  int64_t ret = osdmap->lookup_pg_pool_name(name);
-  objecter->put_osdmap_read();
+  if (pool_cache_epoch != osdmap_epoch) {
+    pool_cache.clear();
+    pool_cache_epoch = osdmap_epoch;
+  }
+  pool_cache[name] = ret;
+  pool_cache_rwl.unlock();
   return ret;
 }
 
 bool librados::RadosClient::pool_requires_alignment(int64_t pool_id)
 {
-  int r = wait_for_osdmap();
-  if (r < 0) {
-    return r;
-  }
-
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  bool ret = osdmap->have_pg_pool(pool_id) &&
-    osdmap->get_pg_pool(pool_id)->requires_aligned_append();
-  objecter->put_osdmap_read();
-  return ret;
+  Mutex::Locker l(lock);
+  return osdmap.have_pg_pool(pool_id) &&
+    osdmap.get_pg_pool(pool_id)->requires_aligned_append();
 }
 
 uint64_t librados::RadosClient::pool_required_alignment(int64_t pool_id)
 {
-  int r = wait_for_osdmap();
-  if (r < 0) {
-    return r;
-  }
+  Mutex::Locker l(lock);
+  return osdmap.have_pg_pool(pool_id) ?
+    osdmap.get_pg_pool(pool_id)->required_alignment() : 0;
+}
 
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  uint64_t ret = osdmap->have_pg_pool(pool_id) ?
-    osdmap->get_pg_pool(pool_id)->required_alignment() : 0;
-  objecter->put_osdmap_read();
-  return ret;
+const char *librados::RadosClient::get_pool_name(int64_t pool_id)
+{
+  Mutex::Locker l(lock);
+  return osdmap.get_pool_name(pool_id);
 }
 
 int librados::RadosClient::pool_get_auid(uint64_t pool_id, unsigned long long *auid)
 {
+  Mutex::Locker l(lock);
   int r = wait_for_osdmap();
   if (r < 0)
     return r;
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  const pg_pool_t *pg = osdmap->get_pg_pool(pool_id);
-  if (!pg) {
-    r = -ENOENT;
-  } else {
-    r = 0;
-    *auid = pg->auid;
-  }
-  objecter->put_osdmap_read();
-  return r;
+  const pg_pool_t *pg = osdmap.get_pg_pool(pool_id);
+  if (!pg)
+    return -ENOENT;
+  *auid = pg->auid;
+  return 0;
 }
 
 int librados::RadosClient::pool_get_name(uint64_t pool_id, std::string *s)
 {
+  Mutex::Locker l(lock);
   int r = wait_for_osdmap();
   if (r < 0)
     return r;
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  if (!osdmap->have_pg_pool(pool_id)) {
-    r = -ENOENT;
-  } else {
-    r = 0;
-    *s = osdmap->get_pool_name(pool_id);
-  }
-  objecter->put_osdmap_read();
-  return r;
+  const char *str = osdmap.get_pool_name(pool_id);
+  if (!str)
+    return -ENOENT;
+  *s = str;
+  return 0;
 }
 
 int librados::RadosClient::get_fsid(std::string *s)
@@ -223,7 +236,7 @@ int librados::RadosClient::connect()
   ldout(cct, 1) << "starting objecter" << dendl;
 
   err = -ENOMEM;
-  objecter = new Objecter(cct, messenger, &monclient,
+  objecter = new Objecter(cct, messenger, &monclient, &osdmap, lock, timer,
 			  cct->_conf->rados_mon_op_timeout,
 			  cct->_conf->rados_osd_op_timeout);
   if (!objecter)
@@ -232,9 +245,7 @@ int librados::RadosClient::connect()
 
   monclient.set_messenger(messenger);
 
-  objecter->init();
-  messenger->add_dispatcher_tail(objecter);
-  messenger->add_dispatcher_tail(this);
+  messenger->add_dispatcher_head(this);
 
   messenger->start();
 
@@ -256,12 +267,13 @@ int librados::RadosClient::connect()
   }
   messenger->set_myname(entity_name_t::CLIENT(monclient.get_global_id()));
 
-  objecter->set_client_incarnation(0);
-  objecter->start();
+  objecter->init_unlocked();
   lock.Lock();
 
   timer.init();
 
+  objecter->set_client_incarnation(0);
+  objecter->init_locked();
   monclient.renew_subs();
 
   finisher.start();
@@ -291,16 +303,17 @@ void librados::RadosClient::shutdown()
     finisher.stop();
   }
   bool need_objecter = false;
-  if (objecter && objecter->initialized.read()) {
+  if (objecter && state == CONNECTED) {
     need_objecter = true;
+    objecter->shutdown_locked();
   }
   state = DISCONNECTED;
   instance_id = 0;
   timer.shutdown();   // will drop+retake lock
   lock.Unlock();
-  if (need_objecter)
-    objecter->shutdown();
   monclient.shutdown();
+  if (need_objecter)
+    objecter->shutdown_unlocked();
   if (messenger) {
     messenger->shutdown();
     messenger->wait();
@@ -326,17 +339,8 @@ librados::RadosClient::~RadosClient()
 int librados::RadosClient::create_ioctx(const char *name, IoCtxImpl **io)
 {
   int64_t poolid = lookup_pool(name);
-  if (poolid < 0) {
-    // Make sure we have the latest map
-    int r = wait_for_latest_osdmap();
-    if (r < 0)
-      return r;
-
-    poolid = lookup_pool(name);
-    if (poolid < 0) {
-      return (int)poolid;
-    }
-  }
+  if (poolid < 0)
+    return (int)poolid;
 
   *io = new librados::IoCtxImpl(this, objecter, &lock, poolid, name,
 				CEPH_NOSNAP);
@@ -345,6 +349,7 @@ int librados::RadosClient::create_ioctx(const char *name, IoCtxImpl **io)
 
 bool librados::RadosClient::ms_dispatch(Message *m)
 {
+  Mutex::Locker l(lock);
   bool ret;
 
   if (state == DISCONNECTED) {
@@ -359,15 +364,21 @@ bool librados::RadosClient::ms_dispatch(Message *m)
 
 void librados::RadosClient::ms_handle_connect(Connection *con)
 {
+  Mutex::Locker l(lock);
+  objecter->ms_handle_connect(con);
 }
 
 bool librados::RadosClient::ms_handle_reset(Connection *con)
 {
+  Mutex::Locker l(lock);
+  objecter->ms_handle_reset(con);
   return false;
 }
 
 void librados::RadosClient::ms_handle_remote_reset(Connection *con)
 {
+  Mutex::Locker l(lock);
+  objecter->ms_handle_remote_reset(con);
 }
 
 
@@ -375,18 +386,37 @@ bool librados::RadosClient::_dispatch(Message *m)
 {
   switch (m->get_type()) {
   // OSD
+  case CEPH_MSG_OSD_OPREPLY:
+    objecter->handle_osd_op_reply(static_cast<MOSDOpReply*>(m));
+    break;
   case CEPH_MSG_OSD_MAP:
-    lock.Lock();
+    objecter->handle_osd_map(static_cast<MOSDMap*>(m));
+    pool_cache_rwl.get_write();
+    osdmap_epoch = osdmap.get_epoch();
+    pool_cache_rwl.unlock();
     cond.Signal();
-    lock.Unlock();
-    m->put();
+    break;
+  case MSG_GETPOOLSTATSREPLY:
+    objecter->handle_get_pool_stats_reply(static_cast<MGetPoolStatsReply*>(m));
     break;
 
   case CEPH_MSG_MDS_MAP:
     break;
 
+  case CEPH_MSG_STATFS_REPLY:
+    objecter->handle_fs_stats_reply(static_cast<MStatfsReply*>(m));
+    break;
+
+  case CEPH_MSG_POOLOP_REPLY:
+    objecter->handle_pool_op_reply(static_cast<MPoolOpReply*>(m));
+    break;
+
+  case MSG_COMMAND_REPLY:
+    objecter->handle_command_reply(static_cast<MCommandReply*>(m));
+    break;
+
   case CEPH_MSG_WATCH_NOTIFY:
-    handle_watch_notify(static_cast<MWatchNotify *>(m));
+    watch_notify(static_cast<MWatchNotify *>(m));
     break;
 
   case MSG_LOG:
@@ -400,60 +430,45 @@ bool librados::RadosClient::_dispatch(Message *m)
   return true;
 }
 
-
 int librados::RadosClient::wait_for_osdmap()
 {
-  assert(!lock.is_locked_by_me());
+  assert(lock.is_locked());
 
-  if (objecter == NULL) {
-    return -ENOTCONN;
-  }
+  utime_t timeout;
+  if (cct->_conf->rados_mon_op_timeout > 0)
+    timeout.set_from_double(cct->_conf->rados_mon_op_timeout);
 
-  bool need_map = false;
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  if (osdmap->get_epoch() == 0) {
-    need_map = true;
-  }
-  objecter->put_osdmap_read();
-
-  if (need_map) {
-    Mutex::Locker l(lock);
-
-    utime_t timeout;
-    if (cct->_conf->rados_mon_op_timeout > 0)
-      timeout.set_from_double(cct->_conf->rados_mon_op_timeout);
-
-    const OSDMap *osdmap = objecter->get_osdmap_read();
-    if (osdmap->get_epoch() == 0) {
-      ldout(cct, 10) << __func__ << " waiting" << dendl;
-      utime_t start = ceph_clock_now(cct);
-      while (osdmap->get_epoch() == 0) {
-        objecter->put_osdmap_read();
-        cond.WaitInterval(cct, lock, timeout);
-        utime_t elapsed = ceph_clock_now(cct) - start;
-        if (!timeout.is_zero() && elapsed > timeout) {
-          lderr(cct) << "timed out waiting for first osdmap from monitors" << dendl;
-          return -ETIMEDOUT;
-        }
-        osdmap = objecter->get_osdmap_read();
-      }
-      ldout(cct, 10) << __func__ << " done waiting" << dendl;
+  if (osdmap.get_epoch() == 0) {
+    ldout(cct, 10) << __func__ << " waiting" << dendl;
+    utime_t start = ceph_clock_now(cct);
+
+    while (osdmap.get_epoch() == 0) {
+      cond.WaitInterval(cct, lock, timeout);
+
+      utime_t elapsed = ceph_clock_now(cct) - start;
+      if (!timeout.is_zero() && elapsed > timeout)
+	break;
+    }
+
+    ldout(cct, 10) << __func__ << " done waiting" << dendl;
+
+    if (osdmap.get_epoch() == 0) {
+      lderr(cct) << "timed out waiting for first osdmap from monitors" << dendl;
+      return -ETIMEDOUT;
     }
-    objecter->put_osdmap_read();
-    return 0;
-  } else {
-    return 0;
   }
+  return 0;
 }
 
-
 int librados::RadosClient::wait_for_latest_osdmap()
 {
   Mutex mylock("RadosClient::wait_for_latest_osdmap");
   Cond cond;
   bool done;
 
+  lock.Lock();
   objecter->wait_for_latest_osdmap(new C_SafeCond(&mylock, &cond, &done));
+  lock.Unlock();
 
   mylock.Lock();
   while (!done)
@@ -465,15 +480,14 @@ int librados::RadosClient::wait_for_latest_osdmap()
 
 int librados::RadosClient::pool_list(std::list<std::string>& v)
 {
+  Mutex::Locker l(lock);
   int r = wait_for_osdmap();
   if (r < 0)
     return r;
-  const OSDMap *osdmap = objecter->get_osdmap_read();
-  for (map<int64_t,pg_pool_t>::const_iterator p = osdmap->get_pools().begin();
-       p != osdmap->get_pools().end();
+  for (map<int64_t,pg_pool_t>::const_iterator p = osdmap.get_pools().begin();
+       p != osdmap.get_pools().end();
        ++p)
-    v.push_back(osdmap->get_pool_name(p->first));
-  objecter->put_osdmap_read();
+    v.push_back(osdmap.get_pool_name(p->first));
   return 0;
 }
 
@@ -485,8 +499,10 @@ int librados::RadosClient::get_pool_stats(std::list<string>& pools,
   bool done;
   int ret = 0;
 
+  lock.Lock();
   objecter->get_pool_stats(pools, &result, new C_SafeCond(&mylock, &cond, &done,
 							  &ret));
+  lock.Unlock();
 
   mylock.Lock();
   while (!done)
@@ -530,17 +546,15 @@ bool librados::RadosClient::put() {
 int librados::RadosClient::pool_create(string& name, unsigned long long auid,
 				       __u8 crush_rule)
 {
-  int r = wait_for_osdmap();
-  if (r < 0) {
-    return r;
-  }
+  int reply;
 
   Mutex mylock ("RadosClient::pool_create::mylock");
-  int reply;
   Cond cond;
   bool done;
   Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &reply);
+  lock.Lock();
   reply = objecter->create_pool(name, onfinish, auid, crush_rule);
+  lock.Unlock();
 
   if (reply < 0) {
     delete onfinish;
@@ -557,12 +571,9 @@ int librados::RadosClient::pool_create_async(string& name, PoolAsyncCompletionIm
 					     unsigned long long auid,
 					     __u8 crush_rule)
 {
-  int r = wait_for_osdmap();
-  if (r < 0)
-    return r;
-
+  Mutex::Locker l(lock);
   Context *onfinish = new C_PoolAsync_Safe(c);
-  r = objecter->create_pool(name, onfinish, auid, crush_rule);
+  int r = objecter->create_pool(name, onfinish, auid, crush_rule);
   if (r < 0) {
     delete onfinish;
   }
@@ -571,17 +582,25 @@ int librados::RadosClient::pool_create_async(string& name, PoolAsyncCompletionIm
 
 int librados::RadosClient::pool_delete(const char *name)
 {
+  lock.Lock();
   int r = wait_for_osdmap();
   if (r < 0) {
+    lock.Unlock();
     return r;
   }
+  int tmp_pool_id = osdmap.lookup_pg_pool_name(name);
+  if (tmp_pool_id < 0) {
+    lock.Unlock();
+    return -ENOENT;
+  }
 
   Mutex mylock("RadosClient::pool_delete::mylock");
   Cond cond;
   bool done;
   int ret;
   Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &ret);
-  ret = objecter->delete_pool(name, onfinish);
+  ret = objecter->delete_pool(tmp_pool_id, onfinish);
+  lock.Unlock();
 
   if (ret < 0) {
     delete onfinish;
@@ -596,121 +615,84 @@ int librados::RadosClient::pool_delete(const char *name)
 
 int librados::RadosClient::pool_delete_async(const char *name, PoolAsyncCompletionImpl *c)
 {
+  Mutex::Locker l(lock);
   int r = wait_for_osdmap();
   if (r < 0)
     return r;
+  int tmp_pool_id = osdmap.lookup_pg_pool_name(name);
+  if (tmp_pool_id < 0)
+    return -ENOENT;
 
   Context *onfinish = new C_PoolAsync_Safe(c);
-  r = objecter->delete_pool(name, onfinish);
+  r = objecter->delete_pool(tmp_pool_id, onfinish);
   if (r < 0) {
     delete onfinish;
   }
   return r;
 }
 
-void librados::RadosClient::blacklist_self(bool set) {
-  Mutex::Locker l(lock);
-  objecter->blacklist_self(set);
-}
-
-
-// -----------
-// watch/notify
-
-void librados::RadosClient::register_watch_notify_callback(
-  WatchNotifyInfo *wc,
-  uint64_t *cookie)
+void librados::RadosClient::register_watcher(WatchContext *wc, uint64_t *cookie)
 {
-  assert(lock.is_locked_by_me());
-  wc->cookie = *cookie = ++max_watch_notify_cookie;
-  ldout(cct,10) << __func__ << " cookie " << wc->cookie << dendl;
-  watch_notify_info[wc->cookie] = wc;
+  assert(lock.is_locked());
+  wc->cookie = *cookie = ++max_watch_cookie;
+  watchers[wc->cookie] = wc;
 }
 
-void librados::RadosClient::unregister_watch_notify_callback(uint64_t cookie)
+void librados::RadosClient::unregister_watcher(uint64_t cookie)
 {
-  ldout(cct,10) << __func__ << " cookie " << cookie << dendl;
-  assert(lock.is_locked_by_me());
-  map<uint64_t, WatchNotifyInfo *>::iterator iter =
-    watch_notify_info.find(cookie);
-  if (iter != watch_notify_info.end()) {
-    WatchNotifyInfo *ctx = iter->second;
+  assert(lock.is_locked());
+  map<uint64_t, WatchContext *>::iterator iter = watchers.find(cookie);
+  if (iter != watchers.end()) {
+    WatchContext *ctx = iter->second;
     if (ctx->linger_id)
       objecter->unregister_linger(ctx->linger_id);
 
-    watch_notify_info.erase(iter);
+    watchers.erase(iter);
     lock.Unlock();
-    ldout(cct, 10) << __func__ << " dropping reference, waiting ctx="
-		   << (void *)ctx << dendl;
+    ldout(cct, 10) << "unregister_watcher, dropping reference, waiting ctx=" << (void *)ctx << dendl;
     ctx->put_wait();
-    ldout(cct, 10) << __func__ << " done ctx=" << (void *)ctx << dendl;
+    ldout(cct, 10) << "unregister_watcher, done ctx=" << (void *)ctx << dendl;
     lock.Lock();
   }
 }
 
-struct C_DoWatchNotify : public Context {
-  librados::RadosClient *rados;
-  MWatchNotify *m;
-  C_DoWatchNotify(librados::RadosClient *r, MWatchNotify *m) : rados(r), m(m) {}
-  void finish(int r) {
-    rados->do_watch_notify(m);
-  }
-};
-
-void librados::RadosClient::handle_watch_notify(MWatchNotify *m)
-{
+void librados::RadosClient::blacklist_self(bool set) {
   Mutex::Locker l(lock);
+  objecter->blacklist_self(set);
+}
 
-  if (watch_notify_info.count(m->cookie)) {
-    ldout(cct,10) << __func__ << " queueing async " << *m << dendl;
-    // deliver this async via a finisher thread
-    finisher.queue(new C_DoWatchNotify(this, m));
-  } else {
-    // drop it on the floor
-    ldout(cct,10) << __func__ << " cookie " << m->cookie << " unknown" << dendl;
-    m->put();
+class C_WatchNotify : public Context {
+  librados::WatchContext *ctx;
+  Mutex *client_lock;
+  uint8_t opcode;
+  uint64_t ver;
+  uint64_t notify_id;
+  bufferlist bl;
+
+public:
+  C_WatchNotify(librados::WatchContext *_ctx, Mutex *_client_lock,
+                uint8_t _o, uint64_t _v, uint64_t _n, bufferlist& _bl) : 
+                ctx(_ctx), client_lock(_client_lock), opcode(_o), ver(_v), notify_id(_n), bl(_bl) {}
+
+  void finish(int r) {
+    ctx->notify(client_lock, opcode, ver, notify_id, bl);
+    ctx->put();
   }
-}
+};
 
-void librados::RadosClient::do_watch_notify(MWatchNotify *m)
+void librados::RadosClient::watch_notify(MWatchNotify *m)
 {
-  Mutex::Locker l(lock);
-  map<uint64_t, WatchNotifyInfo *>::iterator iter =
-    watch_notify_info.find(m->cookie);
-  if (iter != watch_notify_info.end()) {
-    WatchNotifyInfo *wc = iter->second;
+  assert(lock.is_locked());
+  map<uint64_t, WatchContext *>::iterator iter = watchers.find(m->cookie);
+  if (iter != watchers.end()) {
+    WatchContext *wc = iter->second;
     assert(wc);
-    if (wc->notify_lock) {
-      // we sent a notify and it completed (or failed)
-      ldout(cct,10) << __func__ << " completed notify " << *m << dendl;
-      wc->notify_lock->Lock();
-      *wc->notify_done = true;
-      *wc->notify_rval = m->return_code;
-      wc->notify_cond->Signal();
-      wc->notify_lock->Unlock();
-    } else {
-      // we are watcher and got a notify
-      ldout(cct,10) << __func__ << " got notify " << *m << dendl;
-      wc->get();
-
-      // trigger the callback
-      lock.Unlock();
-      wc->watch_ctx->notify(m->opcode, m->ver, m->bl);
-      lock.Lock();
-
-      // send ACK back to the OSD
-      wc->io_ctx_impl->_notify_ack(wc->oid, m->notify_id, m->ver, m->cookie);
-
-      ldout(cct,10) << __func__ << " notify done" << dendl;
-      wc->put();
-    }
-  } else {
-    ldout(cct, 4) << __func__ << " unknown cookie " << m->cookie << dendl;
+    wc->get();
+    finisher.queue(new C_WatchNotify(wc, &lock, m->opcode, m->ver, m->notify_id, m->bl));
   }
   m->put();
 }
 
-
 int librados::RadosClient::mon_command(const vector<string>& cmd,
 				       const bufferlist &inbl,
 				       bufferlist *outbl, string *outs)
@@ -860,7 +842,6 @@ int librados::RadosClient::monitor_log(const string& level, rados_log_callback_t
 
 void librados::RadosClient::handle_log(MLog *m)
 {
-  Mutex::Locker l(lock);
   ldout(cct, 10) << __func__ << " version " << m->version << dendl;
 
   if (log_last_version < m->version) {
@@ -870,10 +851,10 @@ void librados::RadosClient::handle_log(MLog *m)
       for (std::deque<LogEntry>::iterator it = m->entries.begin(); it != m->entries.end(); ++it) {
 	LogEntry e = *it;
 	ostringstream ss;
-	ss << e.stamp << " " << e.who.name << " " << e.prio << " " << e.msg;
+	ss << e.stamp << " " << e.who.name << " " << e.type << " " << e.msg;
 	string line = ss.str();
 	string who = stringify(e.who);
-	string level = stringify(e.prio);
+	string level = stringify(e.type);
 	struct timespec stamp;
 	e.stamp.to_timespec(&stamp);
 
diff --git a/src/librados/RadosClient.h b/src/librados/RadosClient.h
old mode 100755
new mode 100644
index 9a394b3..e608ced
--- a/src/librados/RadosClient.h
+++ b/src/librados/RadosClient.h
@@ -22,6 +22,7 @@
 #include "include/rados/librados.hpp"
 #include "mon/MonClient.h"
 #include "msg/Dispatcher.h"
+#include "osd/OSDMap.h"
 
 #include "IoCtxImpl.h"
 
@@ -46,6 +47,7 @@ private:
     CONNECTED,
   } state;
 
+  OSDMap osdmap;
   MonClient monclient;
   SimpleMessenger *messenger;
 
@@ -61,7 +63,13 @@ private:
 
   Objecter *objecter;
 
+  map<string, int64_t> pool_cache;
+
+  epoch_t osdmap_epoch;
+  epoch_t pool_cache_epoch;
+
   Mutex lock;
+  RWLock pool_cache_rwl;
   Cond cond;
   SafeTimer timer;
   int refcnt;
@@ -90,6 +98,7 @@ public:
 
   int get_fsid(std::string *s);
   int64_t lookup_pool(const char *name);
+  const char *get_pool_name(int64_t pool_id);
   bool pool_requires_alignment(int64_t pool_id);
   uint64_t pool_required_alignment(int64_t pool_id);
   int pool_get_auid(uint64_t pool_id, unsigned long long *auid);
@@ -107,15 +116,12 @@ public:
   int pool_delete_async(const char *name, PoolAsyncCompletionImpl *c);
 
   // watch/notify
-  uint64_t max_watch_notify_cookie;
-  map<uint64_t, librados::WatchNotifyInfo *> watch_notify_info;
-
-  void register_watch_notify_callback(librados::WatchNotifyInfo *wc,
-				      uint64_t *cookie);
-  void unregister_watch_notify_callback(uint64_t cookie);
-  void handle_watch_notify(MWatchNotify *m);
-  void do_watch_notify(MWatchNotify *m);
+  uint64_t max_watch_cookie;
+  map<uint64_t, librados::WatchContext *> watchers;
 
+  void register_watcher(librados::WatchContext *wc, uint64_t *cookie);
+  void unregister_watcher(uint64_t cookie);
+  void watch_notify(MWatchNotify *m);
   int mon_command(const vector<string>& cmd, const bufferlist &inbl,
 	          bufferlist *outbl, string *outs);
   int mon_command(int rank,
diff --git a/src/librados/RadosXattrIter.cc b/src/librados/RadosXattrIter.cc
deleted file mode 100644
index c0f23f6..0000000
--- a/src/librados/RadosXattrIter.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "RadosXattrIter.h"
-
-librados::RadosXattrsIter::RadosXattrsIter()
-  : val(NULL)
-{
-  i = attrset.end();
-}
-
-librados::RadosXattrsIter::~RadosXattrsIter()
-{
-  free(val);
-  val = NULL;
-}
diff --git a/src/librados/RadosXattrIter.h b/src/librados/RadosXattrIter.h
deleted file mode 100644
index 35c8704..0000000
--- a/src/librados/RadosXattrIter.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_LIBRADOS_XATTRITER_H
-#define CEPH_LIBRADOS_XATTRITER_H
-
-#include <string>
-#include <map>
-
-#include "include/buffer.h"
-
-namespace librados {
-
-  /**
-   * iterator object used in implementation of the extrenal
-   * attributes part of the C interface of librados
-   */
-  struct RadosXattrsIter {
-    RadosXattrsIter();
-    ~RadosXattrsIter();
-    std::map<std::string, bufferlist> attrset;
-    std::map<std::string, bufferlist>::iterator i;
-    char *val;
-  };
-};
-
-#endif
diff --git a/src/librados/librados.cc b/src/librados/librados.cc
index 45bde1a..26b94bd 100644
--- a/src/librados/librados.cc
+++ b/src/librados/librados.cc
@@ -27,7 +27,6 @@
 #include "librados/IoCtxImpl.h"
 #include "librados/PoolAsyncCompletionImpl.h"
 #include "librados/RadosClient.h"
-#include "librados/RadosXattrIter.h"
 #include <cls/lock/cls_lock_client.h>
 
 #include <string>
@@ -37,10 +36,6 @@
 #include <list>
 #include <stdexcept>
 
-#ifdef WITH_LTTNG
-#include "tracing/librados.h"
-#endif
-
 using std::string;
 using std::map;
 using std::set;
@@ -1386,10 +1381,6 @@ int librados::IoCtx::aio_stat(const std::string& oid, librados::AioCompletion *c
   return io_ctx_impl->aio_stat(oid, c->pc, psize, pmtime);
 }
 
-int librados::IoCtx::aio_cancel(librados::AioCompletion *c)
-{
-  return io_ctx_impl->aio_cancel(c->pc);
-}
 
 int librados::IoCtx::watch(const string& oid, uint64_t ver, uint64_t *cookie,
 			   librados::WatchCtx *ctx)
@@ -1835,14 +1826,11 @@ int rados_create_common(rados_t *pcluster,
 
 extern "C" int rados_create(rados_t *pcluster, const char * const id)
 {
-  tracepoint(librados, rados_create_enter, id);
   CephInitParameters iparams(CEPH_ENTITY_TYPE_CLIENT);
   if (id) {
     iparams.name.set(CEPH_ENTITY_TYPE_CLIENT, id);
   }
-  int retval = rados_create_common(pcluster, "ceph", &iparams);
-  tracepoint(librados, rados_create_exit, retval, *pcluster);
-  return retval;
+  return rados_create_common(pcluster, "ceph", &iparams);
 }
 
 // as above, but 
@@ -1854,17 +1842,12 @@ extern "C" int rados_create(rados_t *pcluster, const char * const id)
 extern "C" int rados_create2(rados_t *pcluster, const char *const clustername,
 			     const char * const name, uint64_t flags)
 {
-  tracepoint(librados, rados_create2_enter, clustername, name, flags);
   // client is assumed, but from_str will override
   CephInitParameters iparams(CEPH_ENTITY_TYPE_CLIENT);
-  if (!name || !iparams.name.from_str(name)) {
-    tracepoint(librados, rados_create2_exit, -EINVAL, *pcluster);
+  if (!name || !iparams.name.from_str(name)) 
     return -EINVAL;
-  }
 
-  int retval = rados_create_common(pcluster, clustername, &iparams);
-  tracepoint(librados, rados_create2_exit, retval, *pcluster);
-  return retval;
+  return rados_create_common(pcluster, clustername, &iparams);
 }
 
 /* This function is intended for use by Ceph daemons. These daemons have
@@ -1873,105 +1856,75 @@ extern "C" int rados_create2(rados_t *pcluster, const char *const clustername,
  */
 extern "C" int rados_create_with_context(rados_t *pcluster, rados_config_t cct_)
 {
-  tracepoint(librados, rados_create_with_context_enter, cct_);
   CephContext *cct = (CephContext *)cct_;
   librados::RadosClient *radosp = new librados::RadosClient(cct);
   *pcluster = (void *)radosp;
-  int retval = 0;
-  tracepoint(librados, rados_create_with_context_exit, retval, *pcluster);
-  return retval;
+  return 0;
 }
 
 extern "C" rados_config_t rados_cct(rados_t cluster)
 {
-  tracepoint(librados, rados_cct_enter, cluster);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
-  rados_config_t retval = (rados_config_t)client->cct;
-  tracepoint(librados, rados_cct_exit, retval);
-  return retval;
+  return (rados_config_t)client->cct;
 }
 
 extern "C" int rados_connect(rados_t cluster)
 {
-  tracepoint(librados, rados_connect_enter, cluster);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
-  int retval = client->connect();
-  tracepoint(librados, rados_connect_exit, retval);
-  return retval;
+  return client->connect();
 }
 
 extern "C" void rados_shutdown(rados_t cluster)
 {
-  tracepoint(librados, rados_shutdown_enter, cluster);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   radosp->shutdown();
   delete radosp;
-  tracepoint(librados, rados_shutdown_exit);
 }
 
 extern "C" uint64_t rados_get_instance_id(rados_t cluster)
 {
-  tracepoint(librados, rados_get_instance_id_enter, cluster);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
-  uint64_t retval = client->get_instance_id();
-  tracepoint(librados, rados_get_instance_id_exit, retval);
-  return retval;
+  return client->get_instance_id();
 }
 
 extern "C" void rados_version(int *major, int *minor, int *extra)
 {
-  tracepoint(librados, rados_version_enter, major, minor, extra);
   if (major)
     *major = LIBRADOS_VER_MAJOR;
   if (minor)
     *minor = LIBRADOS_VER_MINOR;
   if (extra)
     *extra = LIBRADOS_VER_EXTRA;
-  tracepoint(librados, rados_version_exit, LIBRADOS_VER_MAJOR, LIBRADOS_VER_MINOR, LIBRADOS_VER_EXTRA);
 }
 
 
 // -- config --
 extern "C" int rados_conf_read_file(rados_t cluster, const char *path_list)
 {
-  tracepoint(librados, rados_conf_read_file_enter, cluster, path_list);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
   std::deque<std::string> parse_errors;
   int ret = conf->parse_config_files(path_list, &parse_errors, NULL, 0);
-  if (ret) {
-    tracepoint(librados, rados_conf_read_file_exit, ret);
+  if (ret)
     return ret;
-  }
   conf->parse_env(); // environment variables override
 
   conf->apply_changes(NULL);
   complain_about_parse_errors(client->cct, &parse_errors);
-  int retval = 0;
-  tracepoint(librados, rados_conf_read_file_exit, retval);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_conf_parse_argv(rados_t cluster, int argc, const char **argv)
 {
-  tracepoint(librados, rados_conf_parse_argv_enter, cluster, argc);
-  int i;
-  for(i = 0; i < argc; i++) {
-    tracepoint(librados, rados_conf_parse_argv_arg, argv[i]);
-  }
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
   vector<const char*> args;
   argv_to_vec(argc, argv, args);
   int ret = conf->parse_argv(args);
-  if (ret) {
-    tracepoint(librados, rados_conf_parse_argv_exit, ret);
+  if (ret)
     return ret;
-  }
   conf->apply_changes(NULL);
-  int retval = 0;
-  tracepoint(librados, rados_conf_parse_argv_exit, retval);
-  return retval;
+  return 0;
 }
 
 // like above, but return the remainder of argv to contain remaining
@@ -1983,73 +1936,53 @@ extern "C" int rados_conf_parse_argv_remainder(rados_t cluster, int argc,
 					       const char **argv,
 					       const char **remargv)
 {
-  tracepoint(librados, rados_conf_parse_argv_remainder_enter, cluster, argc);
-  unsigned int i;
-  for(i = 0; i < (unsigned int) argc; i++) {
-    tracepoint(librados, rados_conf_parse_argv_remainder_arg, argv[i]);
-  }
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
   vector<const char*> args;
   for (int i=0; i<argc; i++)
     args.push_back(argv[i]);
   int ret = conf->parse_argv(args);
-  if (ret) {
-    tracepoint(librados, rados_conf_parse_argv_remainder_exit, ret);
+  if (ret)
     return ret;
-  }
   conf->apply_changes(NULL);
   assert(args.size() <= (unsigned int)argc);
+  unsigned int i;
   for (i = 0; i < (unsigned int)argc; ++i) {
     if (i < args.size())
       remargv[i] = args[i];
     else
       remargv[i] = (const char *)NULL;
-    tracepoint(librados, rados_conf_parse_argv_remainder_remarg, remargv[i]);
   }
-  int retval = 0;
-  tracepoint(librados, rados_conf_parse_argv_remainder_exit, retval);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_conf_parse_env(rados_t cluster, const char *env)
 {
-  tracepoint(librados, rados_conf_parse_env_enter, cluster, env);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
   vector<const char*> args;
   env_to_vec(args, env);
   int ret = conf->parse_argv(args);
-  if (ret) {
-    tracepoint(librados, rados_conf_parse_env_exit, ret);
+  if (ret)
     return ret;
-  }
   conf->apply_changes(NULL);
-  int retval = 0;
-  tracepoint(librados, rados_conf_parse_env_exit, retval);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_conf_set(rados_t cluster, const char *option, const char *value)
 {
-  tracepoint(librados, rados_conf_set_enter, cluster, option, value);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
   int ret = conf->set_val(option, value);
-  if (ret) {
-    tracepoint(librados, rados_conf_set_exit, ret);
+  if (ret)
     return ret;
-  }
   conf->apply_changes(NULL);
-  int retval = 0;
-  tracepoint(librados, rados_conf_set_exit, retval);
-  return retval;
+  return 0;
 }
 
 /* cluster info */
 extern "C" int rados_cluster_stat(rados_t cluster, rados_cluster_stat_t *result)
 {
-  tracepoint(librados, rados_cluster_stat_enter, cluster);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
 
   ceph_statfs stats;
@@ -2058,92 +1991,65 @@ extern "C" int rados_cluster_stat(rados_t cluster, rados_cluster_stat_t *result)
   result->kb_used = stats.kb_used;
   result->kb_avail = stats.kb_avail;
   result->num_objects = stats.num_objects;
-  tracepoint(librados, rados_cluster_stat_exit, r, result->kb, result->kb_used, result->kb_avail, result->num_objects);
   return r;
 }
 
 extern "C" int rados_conf_get(rados_t cluster, const char *option, char *buf, size_t len)
 {
-  tracepoint(librados, rados_conf_get_enter, cluster, option, len);
   char *tmp = buf;
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
-  int retval = conf->get_val(option, &tmp, len);
-  tracepoint(librados, rados_conf_get_exit, retval, retval ? "" : option);
-  return retval;
+  return conf->get_val(option, &tmp, len);
 }
 
 extern "C" int64_t rados_pool_lookup(rados_t cluster, const char *name)
 {
-  tracepoint(librados, rados_pool_lookup_enter, cluster, name);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
-  int64_t retval = radosp->lookup_pool(name);
-  tracepoint(librados, rados_pool_lookup_exit, retval);
-  return retval;
+  return radosp->lookup_pool(name);
 }
 
 extern "C" int rados_pool_reverse_lookup(rados_t cluster, int64_t id,
 					 char *buf, size_t maxlen)
 {
-  tracepoint(librados, rados_pool_reverse_lookup_enter, cluster, id, maxlen);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   std::string name;
   int r = radosp->pool_get_name(id, &name);
-  if (r < 0) {
-    tracepoint(librados, rados_pool_reverse_lookup_exit, r, "");
+  if (r < 0)
     return r;
-  }
-  if (name.length() >= maxlen) {
-    tracepoint(librados, rados_pool_reverse_lookup_exit, -ERANGE, "");
+  if (name.length() >= maxlen)
     return -ERANGE;
-  }
   strcpy(buf, name.c_str());
-  int retval = name.length();
-  tracepoint(librados, rados_pool_reverse_lookup_exit, retval, buf);
-  return retval;
+  return name.length();
 }
 
 extern "C" int rados_cluster_fsid(rados_t cluster, char *buf,
 				  size_t maxlen)
 {
-  tracepoint(librados, rados_cluster_fsid_enter, cluster, maxlen);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   std::string fsid;
   radosp->get_fsid(&fsid);
-  if (fsid.length() >= maxlen) {
-    tracepoint(librados, rados_cluster_fsid_exit, -ERANGE, "");
+  if (fsid.length() >= maxlen)
     return -ERANGE;
-  }
   strcpy(buf, fsid.c_str());
-  int retval = fsid.length();
-  tracepoint(librados, rados_cluster_fsid_exit, retval, buf);
-  return retval;
+  return fsid.length();
 }
 
 extern "C" int rados_wait_for_latest_osdmap(rados_t cluster)
 {
-  tracepoint(librados, rados_wait_for_latest_osdmap_enter, cluster);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
-  int retval = radosp->wait_for_latest_osdmap();
-  tracepoint(librados, rados_wait_for_latest_osdmap_exit, retval);
-  return retval;
+  return radosp->wait_for_latest_osdmap();
 }
 
 extern "C" int rados_pool_list(rados_t cluster, char *buf, size_t len)
 {
-  tracepoint(librados, rados_pool_list_enter, cluster, len);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   std::list<std::string> pools;
   int r = client->pool_list(pools);
-  if (r < 0) {
-    tracepoint(librados, rados_pool_list_exit, r);
+  if (r < 0)
     return r;
-  }
 
-  if (len > 0 && !buf) {
-    tracepoint(librados, rados_pool_list_exit, -EINVAL);
+  if (len > 0 && !buf)
     return -EINVAL;
-  }
 
   char *b = buf;
   if (b)
@@ -2155,9 +2061,7 @@ extern "C" int rados_pool_list(rados_t cluster, char *buf, size_t len)
     int rl = i->length() + 1;
     if (len < (unsigned)rl)
       break;
-    const char* pool = i->c_str();
-    tracepoint(librados, rados_pool_list_pool, pool);
-    strncat(b, pool, rl);
+    strncat(b, i->c_str(), rl);
     needed += rl;
     len -= rl;
     b += rl;
@@ -2166,9 +2070,7 @@ extern "C" int rados_pool_list(rados_t cluster, char *buf, size_t len)
     int rl = i->length() + 1;
     needed += rl;
   }
-  int retval = needed + 1;
-  tracepoint(librados, rados_pool_list_exit, retval);
-  return retval;
+  return needed + 1;
 }
 
 static void do_out_buffer(bufferlist& outbl, char **outbuf, size_t *outbuflen)
@@ -2202,20 +2104,16 @@ static void do_out_buffer(string& outbl, char **outbuf, size_t *outbuflen)
 extern "C" int rados_ping_monitor(rados_t cluster, const char *mon_id,
                                   char **outstr, size_t *outstrlen)
 {
-  tracepoint(librados, rados_ping_monitor_enter, cluster, mon_id);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   string str;
 
-  if (!mon_id) {
-    tracepoint(librados, rados_ping_monitor_exit, -EINVAL, NULL, NULL);
+  if (!mon_id)
     return -EINVAL;
-  }
 
   int ret = client->ping_monitor(mon_id, &str);
   if (ret == 0 && !str.empty() && outstr && outstrlen) {
     do_out_buffer(str, outstr, outstrlen);
   }
-  tracepoint(librados, rados_ping_monitor_exit, ret, ret < 0 ? NULL : outstr, ret < 0 ? NULL : outstrlen);
   return ret;
 }
 
@@ -2225,24 +2123,20 @@ extern "C" int rados_mon_command(rados_t cluster, const char **cmd,
 				 char **outbuf, size_t *outbuflen,
 				 char **outs, size_t *outslen)
 {
-  tracepoint(librados, rados_mon_command_enter, cluster, cmdlen, inbuf, inbuflen);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   bufferlist inbl;
   bufferlist outbl;
   string outstring;
   vector<string> cmdvec;
 
-  for (size_t i = 0; i < cmdlen; i++) {
-    tracepoint(librados, rados_mon_command_cmd, cmd[i]);
+  for (size_t i = 0; i < cmdlen; i++)
     cmdvec.push_back(cmd[i]);
-  }
 
   inbl.append(inbuf, inbuflen);
   int ret = client->mon_command(cmdvec, inbl, &outbl, &outstring);
 
   do_out_buffer(outbl, outbuf, outbuflen);
   do_out_buffer(outstring, outs, outslen);
-  tracepoint(librados, rados_mon_command_exit, ret, outbuf, outbuflen, outs, outslen);
   return ret;
 }
 
@@ -2253,7 +2147,6 @@ extern "C" int rados_mon_command_target(rados_t cluster, const char *name,
 					char **outbuf, size_t *outbuflen,
 					char **outs, size_t *outslen)
 {
-  tracepoint(librados, rados_mon_command_target_enter, cluster, name, cmdlen, inbuf, inbuflen);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   bufferlist inbl;
   bufferlist outbl;
@@ -2271,10 +2164,8 @@ extern "C" int rados_mon_command_target(rados_t cluster, const char *name,
     rank = -1;
   }
 
-  for (size_t i = 0; i < cmdlen; i++) {
-    tracepoint(librados, rados_mon_command_target_cmd, cmd[i]);
+  for (size_t i = 0; i < cmdlen; i++)
     cmdvec.push_back(cmd[i]);
-  }
 
   inbl.append(inbuf, inbuflen);
   int ret;
@@ -2285,7 +2176,6 @@ extern "C" int rados_mon_command_target(rados_t cluster, const char *name,
 
   do_out_buffer(outbl, outbuf, outbuflen);
   do_out_buffer(outstring, outs, outslen);
-  tracepoint(librados, rados_mon_command_target_exit, ret, outbuf, outbuflen, outs, outslen);
   return ret;
 }
 
@@ -2295,24 +2185,20 @@ extern "C" int rados_osd_command(rados_t cluster, int osdid, const char **cmd,
 				 char **outbuf, size_t *outbuflen,
 				 char **outs, size_t *outslen)
 {
-  tracepoint(librados, rados_osd_command_enter, cluster, osdid, cmdlen, inbuf, inbuflen);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   bufferlist inbl;
   bufferlist outbl;
   string outstring;
   vector<string> cmdvec;
 
-  for (size_t i = 0; i < cmdlen; i++) {
-    tracepoint(librados, rados_osd_command_cmd, cmd[i]);
+  for (size_t i = 0; i < cmdlen; i++)
     cmdvec.push_back(cmd[i]);
-  }
 
   inbl.append(inbuf, inbuflen);
   int ret = client->osd_command(osdid, cmdvec, inbl, &outbl, &outstring);
 
   do_out_buffer(outbl, outbuf, outbuflen);
   do_out_buffer(outstring, outs, outslen);
-  tracepoint(librados, rados_osd_command_exit, ret, outbuf, outbuflen, outs, outslen);
   return ret;
 }
 
@@ -2324,7 +2210,6 @@ extern "C" int rados_pg_command(rados_t cluster, const char *pgstr,
 				char **outbuf, size_t *outbuflen,
 				char **outs, size_t *outslen)
 {
-  tracepoint(librados, rados_pg_command_enter, cluster, pgstr, cmdlen, inbuf, inbuflen);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   bufferlist inbl;
   bufferlist outbl;
@@ -2332,10 +2217,8 @@ extern "C" int rados_pg_command(rados_t cluster, const char *pgstr,
   pg_t pgid;
   vector<string> cmdvec;
 
-  for (size_t i = 0; i < cmdlen; i++) {
-    tracepoint(librados, rados_pg_command_cmd, cmd[i]);
+  for (size_t i = 0; i < cmdlen; i++)
     cmdvec.push_back(cmd[i]);
-  }
 
   inbl.append(inbuf, inbuflen);
   if (!pgid.parse(pgstr))
@@ -2345,68 +2228,52 @@ extern "C" int rados_pg_command(rados_t cluster, const char *pgstr,
 
   do_out_buffer(outbl, outbuf, outbuflen);
   do_out_buffer(outstring, outs, outslen);
-  tracepoint(librados, rados_pg_command_exit, ret, outbuf, outbuflen, outs, outslen);
   return ret;
 }
 
 extern "C" void rados_buffer_free(char *buf)
 {
-  tracepoint(librados, rados_buffer_free_enter, buf);
   if (buf)
     free(buf);
-  tracepoint(librados, rados_buffer_free_exit);
 }
 
 extern "C" int rados_monitor_log(rados_t cluster, const char *level, rados_log_callback_t cb, void *arg)
 {
-  tracepoint(librados, rados_monitor_log_enter, cluster, level, cb, arg);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
-  int retval = client->monitor_log(level, cb, arg);
-  tracepoint(librados, rados_monitor_log_exit, retval);
-  return retval;
+  return client->monitor_log(level, cb, arg);
 }
 
 
 extern "C" int rados_ioctx_create(rados_t cluster, const char *name, rados_ioctx_t *io)
 {
-  tracepoint(librados, rados_ioctx_create_enter, cluster, name);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   librados::IoCtxImpl *ctx;
 
   int r = client->create_ioctx(name, &ctx);
-  if (r < 0) {
-    tracepoint(librados, rados_ioctx_create_exit, r, NULL);
+  if (r < 0)
     return r;
-  }
 
   *io = ctx;
   ctx->get();
-  int retval = 0;
-  tracepoint(librados, rados_ioctx_create_exit, retval, ctx);
-  return retval;
+  return 0;
 }
 
 extern "C" void rados_ioctx_destroy(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_ioctx_destroy_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   ctx->put();
-  tracepoint(librados, rados_ioctx_destroy_exit);
 }
 
 extern "C" int rados_ioctx_pool_stat(rados_ioctx_t io, struct rados_pool_stat_t *stats)
 {
-  tracepoint(librados, rados_ioctx_pool_stat_enter, io);
   librados::IoCtxImpl *io_ctx_impl = (librados::IoCtxImpl *)io;
   list<string> ls;
   ls.push_back(io_ctx_impl->pool_name);
   map<string, ::pool_stat_t> rawresult;
 
   int err = io_ctx_impl->client->get_pool_stats(ls, rawresult);
-  if (err) {
-    tracepoint(librados, rados_ioctx_pool_stat_exit, err, stats);
+  if (err)
     return err;
-  }
 
   ::pool_stat_t& r = rawresult[io_ctx_impl->pool_name];
   stats->num_kb = SHIFT_ROUND_UP(r.stats.sum.num_bytes, 10);
@@ -2416,120 +2283,88 @@ extern "C" int rados_ioctx_pool_stat(rados_ioctx_t io, struct rados_pool_stat_t
   stats->num_object_copies = r.stats.sum.num_object_copies;
   stats->num_objects_missing_on_primary = r.stats.sum.num_objects_missing_on_primary;
   stats->num_objects_unfound = r.stats.sum.num_objects_unfound;
-  stats->num_objects_degraded =
-    r.stats.sum.num_objects_degraded +
-    r.stats.sum.num_objects_misplaced; // FIXME: this is imprecise
+  stats->num_objects_degraded = r.stats.sum.num_objects_degraded;
   stats->num_rd = r.stats.sum.num_rd;
   stats->num_rd_kb = r.stats.sum.num_rd_kb;
   stats->num_wr = r.stats.sum.num_wr;
   stats->num_wr_kb = r.stats.sum.num_wr_kb;
-  int retval = 0;
-  tracepoint(librados, rados_ioctx_pool_stat_exit, retval, stats);
-  return retval;
+  return 0;
 }
 
 extern "C" rados_config_t rados_ioctx_cct(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_ioctx_cct_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  rados_config_t retval = (rados_config_t)ctx->client->cct;
-  tracepoint(librados, rados_ioctx_cct_exit, retval);
-  return retval;
+  return (rados_config_t)ctx->client->cct;
 }
 
 extern "C" void rados_ioctx_snap_set_read(rados_ioctx_t io, rados_snap_t seq)
 {
-  tracepoint(librados, rados_ioctx_snap_set_read_enter, io, seq);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   ctx->set_snap_read((snapid_t)seq);
-  tracepoint(librados, rados_ioctx_snap_set_read_exit);
 }
 
 extern "C" int rados_ioctx_selfmanaged_snap_set_write_ctx(rados_ioctx_t io,
 	    rados_snap_t seq, rados_snap_t *snaps, int num_snaps)
 {
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_set_write_ctx_enter, io, seq, snaps, num_snaps);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   vector<snapid_t> snv;
   snv.resize(num_snaps);
-  for (int i=0; i<num_snaps; i++) {
+  for (int i=0; i<num_snaps; i++)
     snv[i] = (snapid_t)snaps[i];
-  }
-  int retval = ctx->set_snap_write_context((snapid_t)seq, snv);
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_set_write_ctx_exit, retval);
-  return retval;
+  return ctx->set_snap_write_context((snapid_t)seq, snv);
 }
 
 extern "C" int rados_write(rados_ioctx_t io, const char *o, const char *buf, size_t len, uint64_t off)
 {
-  tracepoint(librados, rados_write_enter, io, o, buf, len, off);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->write(oid, bl, len, off);
-  tracepoint(librados, rados_write_exit, retval);
-  return retval;
+  return ctx->write(oid, bl, len, off);
 }
 
 extern "C" int rados_append(rados_ioctx_t io, const char *o, const char *buf, size_t len)
 {
-  tracepoint(librados, rados_append_enter, io, o, buf, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->append(oid, bl, len);
-  tracepoint(librados, rados_append_exit, retval);
-  return retval;
+  return ctx->append(oid, bl, len);
 }
 
 extern "C" int rados_write_full(rados_ioctx_t io, const char *o, const char *buf, size_t len)
 {
-  tracepoint(librados, rados_write_full_enter, io, o, buf, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->write_full(oid, bl);
-  tracepoint(librados, rados_write_full_exit, retval);
-  return retval;
+  return ctx->write_full(oid, bl);
 }
 
 extern "C" int rados_clone_range(rados_ioctx_t io, const char *dst, uint64_t dst_off,
                                  const char *src, uint64_t src_off, size_t len)
 {
-  tracepoint(librados, rados_clone_range_enter, io, dst, dst_off, src, src_off, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t dst_oid(dst), src_oid(src);
-  int retval = ctx->clone_range(dst_oid, dst_off, src_oid, src_off, len);
-  tracepoint(librados, rados_clone_range_exit, retval);
-  return retval;
+  return ctx->clone_range(dst_oid, dst_off, src_oid, src_off, len);
 }
 
 extern "C" int rados_trunc(rados_ioctx_t io, const char *o, uint64_t size)
 {
-  tracepoint(librados, rados_trunc_enter, io, o, size);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->trunc(oid, size);
-  tracepoint(librados, rados_trunc_exit, retval);
-  return retval;
+  return ctx->trunc(oid, size);
 }
 
 extern "C" int rados_remove(rados_ioctx_t io, const char *o)
 {
-  tracepoint(librados, rados_remove_enter, io, o);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->remove(oid);
-  tracepoint(librados, rados_remove_exit, retval);
-  return retval;
+  return ctx->remove(oid);
 }
 
 extern "C" int rados_read(rados_ioctx_t io, const char *o, char *buf, size_t len, uint64_t off)
 {
-  tracepoint(librados, rados_read_enter, io, o, buf, len, off);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   int ret;
   object_t oid(o);
@@ -2540,198 +2375,141 @@ extern "C" int rados_read(rados_ioctx_t io, const char *o, char *buf, size_t len
 
   ret = ctx->read(oid, bl, len, off);
   if (ret >= 0) {
-    if (bl.length() > len) {
-      tracepoint(librados, rados_read_exit, -ERANGE, NULL);
+    if (bl.length() > len)
       return -ERANGE;
-    }
     if (bl.c_str() != buf)
       bl.copy(0, bl.length(), buf);
     ret = bl.length();    // hrm :/
   }
 
-  tracepoint(librados, rados_read_exit, ret, buf);
   return ret;
 }
 
 extern "C" uint64_t rados_get_last_version(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_get_last_version_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  uint64_t retval = ctx->last_version();
-  tracepoint(librados, rados_get_last_version_exit, retval);
-  return retval;
+  return ctx->last_version();
 }
 
 extern "C" int rados_pool_create(rados_t cluster, const char *name)
 {
-  tracepoint(librados, rados_pool_create_enter, cluster, name);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   string sname(name);
-  int retval = radosp->pool_create(sname);
-  tracepoint(librados, rados_pool_create_exit, retval);
-  return retval;
+  return radosp->pool_create(sname);
 }
 
 extern "C" int rados_pool_create_with_auid(rados_t cluster, const char *name,
 					   uint64_t auid)
 {
-  tracepoint(librados, rados_pool_create_with_auid_enter, cluster, name, auid);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   string sname(name);
-  int retval = radosp->pool_create(sname, auid);
-  tracepoint(librados, rados_pool_create_with_auid_exit, retval);
-  return retval;
+  return radosp->pool_create(sname, auid);
 }
 
 extern "C" int rados_pool_create_with_crush_rule(rados_t cluster, const char *name,
 						 __u8 crush_rule_num)
 {
-  tracepoint(librados, rados_pool_create_with_crush_rule_enter, cluster, name, crush_rule_num);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   string sname(name);
-  int retval = radosp->pool_create(sname, 0, crush_rule_num);
-  tracepoint(librados, rados_pool_create_with_crush_rule_exit, retval);
-  return retval;
+  return radosp->pool_create(sname, 0, crush_rule_num);
 }
 
 extern "C" int rados_pool_create_with_all(rados_t cluster, const char *name,
 					  uint64_t auid, __u8 crush_rule_num)
 {
-  tracepoint(librados, rados_pool_create_with_all_enter, cluster, name, auid, crush_rule_num);
   librados::RadosClient *radosp = (librados::RadosClient *)cluster;
   string sname(name);
-  int retval = radosp->pool_create(sname, auid, crush_rule_num);
-  tracepoint(librados, rados_pool_create_with_all_exit, retval);
-  return retval;
+  return radosp->pool_create(sname, auid, crush_rule_num);
 }
 
 extern "C" int rados_pool_delete(rados_t cluster, const char *pool_name)
 {
-  tracepoint(librados, rados_pool_delete_enter, cluster, pool_name);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
-  int retval = client->pool_delete(pool_name);
-  tracepoint(librados, rados_pool_delete_exit, retval);
-  return retval;
+  return client->pool_delete(pool_name);
 }
 
 extern "C" int rados_ioctx_pool_set_auid(rados_ioctx_t io, uint64_t auid)
 {
-  tracepoint(librados, rados_ioctx_pool_set_auid_enter, io, auid);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->pool_change_auid(auid);
-  tracepoint(librados, rados_ioctx_pool_set_auid_exit, retval);
-  return retval;
+  return ctx->pool_change_auid(auid);
 }
 
 extern "C" int rados_ioctx_pool_get_auid(rados_ioctx_t io, uint64_t *auid)
 {
-  tracepoint(librados, rados_ioctx_pool_get_auid_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->client->pool_get_auid(ctx->get_id(), (unsigned long long *)auid);
-  tracepoint(librados, rados_ioctx_pool_get_auid_exit, retval, *auid);
-  return retval;
+  return ctx->client->pool_get_auid(ctx->get_id(), (unsigned long long *)auid);
 }
 
 extern "C" int rados_ioctx_pool_requires_alignment(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_ioctx_pool_requires_alignment_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->client->pool_requires_alignment(ctx->get_id());
-  tracepoint(librados, rados_ioctx_pool_requires_alignment_exit, retval);
-  return retval;
+  return ctx->client->pool_requires_alignment(ctx->get_id());
 }
 
 extern "C" uint64_t rados_ioctx_pool_required_alignment(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_ioctx_pool_required_alignment_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  uint64_t retval = ctx->client->pool_required_alignment(ctx->get_id());
-  tracepoint(librados, rados_ioctx_pool_required_alignment_exit, retval);
-  return retval;
+  return ctx->client->pool_required_alignment(ctx->get_id());
 }
 
 extern "C" void rados_ioctx_locator_set_key(rados_ioctx_t io, const char *key)
 {
-  tracepoint(librados, rados_ioctx_locator_set_key_enter, io, key);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   if (key)
     ctx->oloc.key = key;
   else
     ctx->oloc.key = "";
-  tracepoint(librados, rados_ioctx_locator_set_key_exit);
 }
 
 extern "C" void rados_ioctx_set_namespace(rados_ioctx_t io, const char *nspace)
 {
-  tracepoint(librados, rados_ioctx_set_namespace_enter, io, nspace);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   if (nspace)
     ctx->oloc.nspace = nspace;
   else
     ctx->oloc.nspace = "";
-  tracepoint(librados, rados_ioctx_set_namespace_exit);
 }
 
 extern "C" rados_t rados_ioctx_get_cluster(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_ioctx_get_cluster_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  rados_t retval = (rados_t)ctx->client;
-  tracepoint(librados, rados_ioctx_get_cluster_exit, retval);
-  return retval;
+  return (rados_t)ctx->client;
 }
 
 extern "C" int64_t rados_ioctx_get_id(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_ioctx_get_id_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int64_t retval = ctx->get_id();
-  tracepoint(librados, rados_ioctx_get_id_exit, retval);
-  return retval;
+  return ctx->get_id();
 }
 
 extern "C" int rados_ioctx_get_pool_name(rados_ioctx_t io, char *s, unsigned maxlen)
 {
-  tracepoint(librados, rados_ioctx_get_pool_name_enter, io, maxlen);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  if (ctx->pool_name.length() >= maxlen) {
-    tracepoint(librados, rados_ioctx_get_pool_name_exit, -ERANGE, "");
+  if (ctx->pool_name.length() >= maxlen)
     return -ERANGE;
-  }
   strcpy(s, ctx->pool_name.c_str());
-  int retval = ctx->pool_name.length();
-  tracepoint(librados, rados_ioctx_get_pool_name_exit, retval, s);
-  return retval;
+  return ctx->pool_name.length();
 }
 
 // snaps
 
 extern "C" int rados_ioctx_snap_create(rados_ioctx_t io, const char *snapname)
 {
-  tracepoint(librados, rados_ioctx_snap_create_enter, io, snapname);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->snap_create(snapname);
-  tracepoint(librados, rados_ioctx_snap_create_exit, retval);
-  return retval;
+  return ctx->snap_create(snapname);
 }
 
 extern "C" int rados_ioctx_snap_remove(rados_ioctx_t io, const char *snapname)
 {
-  tracepoint(librados, rados_ioctx_snap_remove_enter, io, snapname);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->snap_remove(snapname);
-  tracepoint(librados, rados_ioctx_snap_remove_exit, retval);
-  return retval;
+  return ctx->snap_remove(snapname);
 }
 
 extern "C" int rados_ioctx_snap_rollback(rados_ioctx_t io, const char *oid,
 			      const char *snapname)
 {
-  tracepoint(librados, rados_ioctx_snap_rollback_enter, io, oid, snapname);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->rollback(oid, snapname);
-  tracepoint(librados, rados_ioctx_snap_rollback_exit, retval);
-  return retval;
+  return ctx->rollback(oid, snapname);
 }
 
 // Deprecated name kept for backward compatibility
@@ -2744,157 +2522,132 @@ extern "C" int rados_rollback(rados_ioctx_t io, const char *oid,
 extern "C" int rados_ioctx_selfmanaged_snap_create(rados_ioctx_t io,
 					     uint64_t *snapid)
 {
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_create_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->selfmanaged_snap_create(snapid);
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_create_exit, retval, *snapid);
-  return retval;
+  return ctx->selfmanaged_snap_create(snapid);
 }
 
 extern "C" int rados_ioctx_selfmanaged_snap_remove(rados_ioctx_t io,
 					     uint64_t snapid)
 {
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_remove_enter, io, snapid);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->selfmanaged_snap_remove(snapid);
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_remove_exit, retval);
-  return retval;
+  return ctx->selfmanaged_snap_remove(snapid);
 }
 
 extern "C" int rados_ioctx_selfmanaged_snap_rollback(rados_ioctx_t io,
 						     const char *oid,
 						     uint64_t snapid)
 {
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_rollback_enter, io, oid, snapid);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->selfmanaged_snap_rollback_object(oid, ctx->snapc, snapid);
-  tracepoint(librados, rados_ioctx_selfmanaged_snap_rollback_exit, retval);
-  return retval;
+  return ctx->selfmanaged_snap_rollback_object(oid, ctx->snapc, snapid);
 }
 
 extern "C" int rados_ioctx_snap_list(rados_ioctx_t io, rados_snap_t *snaps,
 				    int maxlen)
 {
-  tracepoint(librados, rados_ioctx_snap_list_enter, io, maxlen);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   vector<uint64_t> snapvec;
   int r = ctx->snap_list(&snapvec);
-  if (r < 0) {
-    tracepoint(librados, rados_ioctx_snap_list_exit, r, snaps, 0);
+  if (r < 0)
     return r;
-  }
   if ((int)snapvec.size() <= maxlen) {
-    for (unsigned i=0; i<snapvec.size(); i++) {
+    for (unsigned i=0; i<snapvec.size(); i++)
       snaps[i] = snapvec[i];
-    }
-    int retval = snapvec.size();
-    tracepoint(librados, rados_ioctx_snap_list_exit, retval, snaps, retval);
-    return retval;
+    return snapvec.size();
   }
-  int retval = -ERANGE;
-  tracepoint(librados, rados_ioctx_snap_list_exit, retval, snaps, 0);
-  return retval;
+  return -ERANGE;
 }
 
 extern "C" int rados_ioctx_snap_lookup(rados_ioctx_t io, const char *name,
 				      rados_snap_t *id)
 {
-  tracepoint(librados, rados_ioctx_snap_lookup_enter, io, name);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->snap_lookup(name, (uint64_t *)id);
-  tracepoint(librados, rados_ioctx_snap_lookup_exit, retval, *id);
-  return retval;
+  return ctx->snap_lookup(name, (uint64_t *)id);
 }
 
 extern "C" int rados_ioctx_snap_get_name(rados_ioctx_t io, rados_snap_t id,
 					char *name, int maxlen)
 {
-  tracepoint(librados, rados_ioctx_snap_get_name_enter, io, id, maxlen);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   std::string sname;
   int r = ctx->snap_get_name(id, &sname);
-  if (r < 0) {
-    tracepoint(librados, rados_ioctx_snap_get_name_exit, r, "");
+  if (r < 0)
     return r;
-  }
-  if ((int)sname.length() >= maxlen) {
-    int retval = -ERANGE;
-    tracepoint(librados, rados_ioctx_snap_get_name_exit, retval, "");
-    return retval;
-  }
+  if ((int)sname.length() >= maxlen)
+    return -ERANGE;
   strncpy(name, sname.c_str(), maxlen);
-  int retval = 0;
-  tracepoint(librados, rados_ioctx_snap_get_name_exit, retval, name);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_ioctx_snap_get_stamp(rados_ioctx_t io, rados_snap_t id, time_t *t)
 {
-  tracepoint(librados, rados_ioctx_snap_get_stamp_enter, io, id);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->snap_get_stamp(id, t);
-  tracepoint(librados, rados_ioctx_snap_get_stamp_exit, retval, *t);
-  return retval;
+  return ctx->snap_get_stamp(id, t);
 }
 
 extern "C" int rados_getxattr(rados_ioctx_t io, const char *o, const char *name,
 			      char *buf, size_t len)
 {
-  tracepoint(librados, rados_getxattr_enter, io, o, name, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   int ret;
   object_t oid(o);
   bufferlist bl;
   ret = ctx->getxattr(oid, name, bl);
   if (ret >= 0) {
-    if (bl.length() > len) {
-      tracepoint(librados, rados_getxattr_exit, -ERANGE, buf, 0);
+    if (bl.length() > len)
       return -ERANGE;
-    }
     bl.copy(0, bl.length(), buf);
     ret = bl.length();
   }
 
-  tracepoint(librados, rados_getxattr_exit, ret, buf, ret);
   return ret;
 }
 
+class RadosXattrsIter {
+public:
+  RadosXattrsIter()
+    : val(NULL)
+  {
+    i = attrset.end();
+  }
+  ~RadosXattrsIter()
+  {
+    free(val);
+    val = NULL;
+  }
+  std::map<std::string, bufferlist> attrset;
+  std::map<std::string, bufferlist>::iterator i;
+  char *val;
+};
+
 extern "C" int rados_getxattrs(rados_ioctx_t io, const char *oid,
 			       rados_xattrs_iter_t *iter)
 {
-  tracepoint(librados, rados_getxattrs_enter, io, oid);
-  librados::RadosXattrsIter *it = new librados::RadosXattrsIter();
-  if (!it) {
-    tracepoint(librados, rados_getxattrs_exit, -ENOMEM, NULL);
+  RadosXattrsIter *it = new RadosXattrsIter();
+  if (!it)
     return -ENOMEM;
-  }
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t obj(oid);
   int ret = ctx->getxattrs(obj, it->attrset);
   if (ret) {
     delete it;
-    tracepoint(librados, rados_getxattrs_exit, ret, NULL);
     return ret;
   }
   it->i = it->attrset.begin();
 
-  librados::RadosXattrsIter **iret = (librados::RadosXattrsIter**)iter;
+  RadosXattrsIter **iret = (RadosXattrsIter**)iter;
   *iret = it;
   *iter = it;
-  tracepoint(librados, rados_getxattrs_exit, 0, *iter);
   return 0;
 }
 
 extern "C" int rados_getxattrs_next(rados_xattrs_iter_t iter,
 				    const char **name, const char **val, size_t *len)
 {
-  tracepoint(librados, rados_getxattrs_next_enter, iter);
-  librados::RadosXattrsIter *it = static_cast<librados::RadosXattrsIter*>(iter);
+  RadosXattrsIter *it = static_cast<RadosXattrsIter*>(iter);
   if (it->i == it->attrset.end()) {
     *name = NULL;
     *val = NULL;
     *len = 0;
-    tracepoint(librados, rados_getxattrs_next_exit, 0, NULL, NULL, 0);
     return 0;
   }
   free(it->val);
@@ -2903,117 +2656,86 @@ extern "C" int rados_getxattrs_next(rados_xattrs_iter_t iter,
   bufferlist &bl(it->i->second);
   size_t bl_len = bl.length();
   it->val = (char*)malloc(bl_len);
-  if (!it->val) {
-    tracepoint(librados, rados_getxattrs_next_exit, -ENOMEM, *name, NULL, 0);
+  if (!it->val)
     return -ENOMEM;
-  }
   memcpy(it->val, bl.c_str(), bl_len);
   *val = it->val;
   *len = bl_len;
   ++it->i;
-  tracepoint(librados, rados_getxattrs_next_exit, 0, *name, *val, *len);
   return 0;
 }
 
 extern "C" void rados_getxattrs_end(rados_xattrs_iter_t iter)
 {
-  tracepoint(librados, rados_getxattrs_end_enter, iter);
-  librados::RadosXattrsIter *it = static_cast<librados::RadosXattrsIter*>(iter);
+  RadosXattrsIter *it = static_cast<RadosXattrsIter*>(iter);
   delete it;
-  tracepoint(librados, rados_getxattrs_end_exit);
 }
 
 extern "C" int rados_setxattr(rados_ioctx_t io, const char *o, const char *name, const char *buf, size_t len)
 {
-  tracepoint(librados, rados_setxattr_enter, io, o, name, buf, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->setxattr(oid, name, bl);
-  tracepoint(librados, rados_setxattr_exit, retval);
-  return retval;
+  return ctx->setxattr(oid, name, bl);
 }
 
 extern "C" int rados_rmxattr(rados_ioctx_t io, const char *o, const char *name)
 {
-  tracepoint(librados, rados_rmxattr_enter, io, o, name);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->rmxattr(oid, name);
-  tracepoint(librados, rados_rmxattr_exit, retval);
-  return retval;
+  return ctx->rmxattr(oid, name);
 }
 
 extern "C" int rados_stat(rados_ioctx_t io, const char *o, uint64_t *psize, time_t *pmtime)
 {
-  tracepoint(librados, rados_stat_enter, io, o);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->stat(oid, psize, pmtime);
-  tracepoint(librados, rados_stat_exit, retval, psize, pmtime);
-  return retval;
+  return ctx->stat(oid, psize, pmtime);
 }
 
 extern "C" int rados_tmap_update(rados_ioctx_t io, const char *o, const char *cmdbuf, size_t cmdbuflen)
 {
-  tracepoint(librados, rados_tmap_update_enter, io, o, cmdbuf, cmdbuflen);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist cmdbl;
   cmdbl.append(cmdbuf, cmdbuflen);
-  int retval = ctx->tmap_update(oid, cmdbl);
-  tracepoint(librados, rados_tmap_update_exit, retval);
-  return retval;
+  return ctx->tmap_update(oid, cmdbl);
 }
 
 extern "C" int rados_tmap_put(rados_ioctx_t io, const char *o, const char *buf, size_t buflen)
 {
-  tracepoint(librados, rados_tmap_put_enter, io, o, buf, buflen);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, buflen);
-  int retval = ctx->tmap_put(oid, bl);
-  tracepoint(librados, rados_tmap_put_exit, retval);
-  return retval;
+  return ctx->tmap_put(oid, bl);
 }
 
 extern "C" int rados_tmap_get(rados_ioctx_t io, const char *o, char *buf, size_t buflen)
 {
-  tracepoint(librados, rados_tmap_get_enter, io, o, buflen);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   int r = ctx->tmap_get(oid, bl);
-  if (r < 0) {
-    tracepoint(librados, rados_tmap_get_exit, r, buf, 0);
+  if (r < 0)
     return r;
-  }
-  if (bl.length() > buflen) {
-    tracepoint(librados, rados_tmap_get_exit, -ERANGE, buf, 0);
+  if (bl.length() > buflen)
     return -ERANGE;
-  }
   bl.copy(0, bl.length(), buf);
-  int retval = bl.length();
-  tracepoint(librados, rados_tmap_get_exit, retval, buf, retval);
-  return retval;
+  return bl.length();
 }
 
 extern "C" int rados_tmap_to_omap(rados_ioctx_t io, const char *o, bool nullok)
 {
-  tracepoint(librados, rados_tmap_to_omap_enter, io, o, nullok);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->tmap_to_omap(oid, nullok);
-  tracepoint(librados, rados_tmap_to_omap_exit, retval);
-  return retval;
+  return ctx->tmap_to_omap(oid, nullok);
 }
 
 extern "C" int rados_exec(rados_ioctx_t io, const char *o, const char *cls, const char *method,
                          const char *inbuf, size_t in_len, char *buf, size_t out_len)
 {
-  tracepoint(librados, rados_exec_enter, io, o, cls, method, inbuf, in_len, out_len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist inbl, outbl;
@@ -3022,15 +2744,12 @@ extern "C" int rados_exec(rados_ioctx_t io, const char *o, const char *cls, cons
   ret = ctx->exec(oid, cls, method, inbl, outbl);
   if (ret >= 0) {
     if (outbl.length()) {
-      if (outbl.length() > out_len) {
-	tracepoint(librados, rados_exec_exit, -ERANGE, buf, 0);
+      if (outbl.length() > out_len)
 	return -ERANGE;
-      }
       outbl.copy(0, outbl.length(), buf);
       ret = outbl.length();   // hrm :/
     }
   }
-  tracepoint(librados, rados_exec_exit, ret, buf, ret);
   return ret;
 }
 
@@ -3038,49 +2757,38 @@ extern "C" int rados_exec(rados_ioctx_t io, const char *o, const char *cls, cons
 
 extern "C" int rados_objects_list_open(rados_ioctx_t io, rados_list_ctx_t *listh)
 {
-  tracepoint(librados, rados_objects_list_open_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   Objecter::ListContext *h = new Objecter::ListContext;
   h->pool_id = ctx->poolid;
   h->pool_snap_seq = ctx->snap_seq;
   h->nspace = ctx->oloc.nspace;
   *listh = (void *)new librados::ObjListCtx(ctx, h);
-  int retval = 0;
-  tracepoint(librados, rados_objects_list_open_exit, retval, *listh);
-  return retval;
+  return 0;
 }
 
 extern "C" void rados_objects_list_close(rados_list_ctx_t h)
 {
-  tracepoint(librados, rados_objects_list_close_enter, h);
   librados::ObjListCtx *lh = (librados::ObjListCtx *)h;
   delete lh;
-  tracepoint(librados, rados_objects_list_close_exit);
 }
 
 extern "C" uint32_t rados_objects_list_seek(rados_list_ctx_t listctx,
 					    uint32_t pos)
 {
-  tracepoint(librados, rados_objects_list_seek_enter, listctx, pos);
   librados::ObjListCtx *lh = (librados::ObjListCtx *)listctx;
   uint32_t r = lh->ctx->list_seek(lh->lc, pos);
-  tracepoint(librados, rados_objects_list_seek_exit, r);
   return r;
 }
 
 extern "C" uint32_t rados_objects_list_get_pg_hash_position(
   rados_list_ctx_t listctx)
 {
-  tracepoint(librados, rados_objects_list_get_pg_hash_position_enter, listctx);
   librados::ObjListCtx *lh = (librados::ObjListCtx *)listctx;
-  uint32_t retval = lh->lc->get_pg_hash_position();
-  tracepoint(librados, rados_objects_list_get_pg_hash_position_exit, retval);
-  return retval;
+  return lh->lc->get_pg_hash_position();
 }
 
 extern "C" int rados_objects_list_next(rados_list_ctx_t listctx, const char **entry, const char **key)
 {
-  tracepoint(librados, rados_objects_list_next_enter, listctx);
   librados::ObjListCtx *lh = (librados::ObjListCtx *)listctx;
   Objecter::ListContext *h = lh->lc;
 
@@ -3091,14 +2799,10 @@ extern "C" int rados_objects_list_next(rados_list_ctx_t listctx, const char **en
 
   if (h->list.empty()) {
     int ret = lh->ctx->list(lh->lc, RADOS_LIST_MAX_ENTRIES);
-    if (ret < 0) {
-      tracepoint(librados, rados_objects_list_next_exit, ret, NULL, NULL);
+    if (ret < 0)
       return ret;
-    }
-    if (h->list.empty()) {
-      tracepoint(librados, rados_objects_list_next_exit, -ENOENT, NULL, NULL);
+    if (h->list.empty())
       return -ENOENT;
-    }
   }
 
   *entry = h->list.front().first.name.c_str();
@@ -3109,9 +2813,7 @@ extern "C" int rados_objects_list_next(rados_list_ctx_t listctx, const char **en
     else
       *key = NULL;
   }
-  int retval = 0;
-  tracepoint(librados, rados_objects_list_next_exit, 0, *entry, key);
-  return retval;
+  return 0;
 }
 
 
@@ -3124,212 +2826,148 @@ extern "C" int rados_aio_create_completion(void *cb_arg,
 					   rados_callback_t cb_safe,
 					   rados_completion_t *pc)
 {
-  tracepoint(librados, rados_aio_create_completion_enter, cb_arg, cb_complete, cb_safe);
   librados::AioCompletionImpl *c = new librados::AioCompletionImpl;
   if (cb_complete)
     c->set_complete_callback(cb_arg, cb_complete);
   if (cb_safe)
     c->set_safe_callback(cb_arg, cb_safe);
   *pc = c;
-  int retval = 0;
-  tracepoint(librados, rados_aio_create_completion_exit, retval, *pc);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_aio_wait_for_complete(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_wait_for_complete_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->wait_for_complete();
-  tracepoint(librados, rados_aio_wait_for_complete_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->wait_for_complete();
 }
 
 extern "C" int rados_aio_wait_for_safe(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_wait_for_safe_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->wait_for_safe();
-  tracepoint(librados, rados_aio_wait_for_safe_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->wait_for_safe();
 }
 
 extern "C" int rados_aio_is_complete(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_is_complete_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->is_complete();
-  tracepoint(librados, rados_aio_is_complete_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->is_complete();
 }
 
 extern "C" int rados_aio_is_safe(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_is_safe_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->is_safe();
-  tracepoint(librados, rados_aio_is_safe_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->is_safe();
 }
 
 extern "C" int rados_aio_wait_for_complete_and_cb(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_wait_for_complete_and_cb_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->wait_for_complete_and_cb();
-  tracepoint(librados, rados_aio_wait_for_complete_and_cb_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->wait_for_complete_and_cb();
 }
 
 extern "C" int rados_aio_wait_for_safe_and_cb(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_wait_for_safe_and_cb_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->wait_for_safe_and_cb();
-  tracepoint(librados, rados_aio_wait_for_safe_and_cb_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->wait_for_safe_and_cb();
 }
 
 extern "C" int rados_aio_is_complete_and_cb(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_is_complete_and_cb_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->is_complete_and_cb();
-  tracepoint(librados, rados_aio_is_complete_and_cb_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->is_complete_and_cb();
 }
 
 extern "C" int rados_aio_is_safe_and_cb(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_is_safe_and_cb_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->is_safe_and_cb();
-  tracepoint(librados, rados_aio_is_safe_and_cb_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->is_safe_and_cb();
 }
 
 extern "C" int rados_aio_get_return_value(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_get_return_value_enter, c);
-  int retval = ((librados::AioCompletionImpl*)c)->get_return_value();
-  tracepoint(librados, rados_aio_get_return_value_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->get_return_value();
 }
 
 extern "C" uint64_t rados_aio_get_version(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_get_version_enter, c);
-  uint64_t retval = ((librados::AioCompletionImpl*)c)->get_version();
-  tracepoint(librados, rados_aio_get_version_exit, retval);
-  return retval;
+  return ((librados::AioCompletionImpl*)c)->get_version();
 }
 
 extern "C" void rados_aio_release(rados_completion_t c)
 {
-  tracepoint(librados, rados_aio_release_enter, c);
   ((librados::AioCompletionImpl*)c)->put();
-  tracepoint(librados, rados_aio_release_exit);
 }
 
 extern "C" int rados_aio_read(rados_ioctx_t io, const char *o,
 			       rados_completion_t completion,
 			       char *buf, size_t len, uint64_t off)
 {
-  tracepoint(librados, rados_aio_read_enter, io, o, completion, len, off);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->aio_read(oid, (librados::AioCompletionImpl*)completion,
+  return ctx->aio_read(oid, (librados::AioCompletionImpl*)completion,
 		       buf, len, off, ctx->snap_seq);
-  tracepoint(librados, rados_aio_read_exit, retval);
-  return retval;
 }
 
 extern "C" int rados_aio_write(rados_ioctx_t io, const char *o,
 				rados_completion_t completion,
 				const char *buf, size_t len, uint64_t off)
 {
-  tracepoint(librados, rados_aio_write_enter, io, o, completion, buf, len, off);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->aio_write(oid, (librados::AioCompletionImpl*)completion,
+  return ctx->aio_write(oid, (librados::AioCompletionImpl*)completion,
 			bl, len, off);
-  tracepoint(librados, rados_aio_write_exit, retval);
-  return retval;
 }
 
 extern "C" int rados_aio_append(rados_ioctx_t io, const char *o,
 				rados_completion_t completion,
 				const char *buf, size_t len)
 {
-  tracepoint(librados, rados_aio_append_enter, io, o, completion, buf, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->aio_append(oid, (librados::AioCompletionImpl*)completion,
+  return ctx->aio_append(oid, (librados::AioCompletionImpl*)completion,
 			 bl, len);
-  tracepoint(librados, rados_aio_append_exit, retval);
-  return retval;
 }
 
 extern "C" int rados_aio_write_full(rados_ioctx_t io, const char *o,
 				    rados_completion_t completion,
 				    const char *buf, size_t len)
 {
-  tracepoint(librados, rados_aio_write_full_enter, io, o, completion, buf, len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
   bl.append(buf, len);
-  int retval = ctx->aio_write_full(oid, (librados::AioCompletionImpl*)completion, bl);
-  tracepoint(librados, rados_aio_write_full_exit, retval);
-  return retval;
+  return ctx->aio_write_full(oid, (librados::AioCompletionImpl*)completion, bl);
 }
 
 extern "C" int rados_aio_remove(rados_ioctx_t io, const char *o,
 				rados_completion_t completion)
 {
-  tracepoint(librados, rados_aio_remove_enter, io, o, completion);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->aio_remove(oid, (librados::AioCompletionImpl*)completion);
-  tracepoint(librados, rados_aio_remove_exit, retval);
-  return retval;
+  return ctx->aio_remove(oid, (librados::AioCompletionImpl*)completion);
 }
 
 extern "C" int rados_aio_flush_async(rados_ioctx_t io,
 				     rados_completion_t completion)
 {
-  tracepoint(librados, rados_aio_flush_async_enter, io, completion);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   ctx->flush_aio_writes_async((librados::AioCompletionImpl*)completion);
-  int retval = 0;
-  tracepoint(librados, rados_aio_flush_async_exit, retval);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_aio_flush(rados_ioctx_t io)
 {
-  tracepoint(librados, rados_aio_flush_enter, io);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   ctx->flush_aio_writes();
-  int retval = 0;
-  tracepoint(librados, rados_aio_flush_exit, retval);
-  return retval;
+  return 0;
 }
 
 extern "C" int rados_aio_stat(rados_ioctx_t io, const char *o, 
 			      rados_completion_t completion,
 			      uint64_t *psize, time_t *pmtime)
 {
-  tracepoint(librados, rados_aio_stat_enter, io, o, completion);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->aio_stat(oid, (librados::AioCompletionImpl*)completion,
+  return ctx->aio_stat(oid, (librados::AioCompletionImpl*)completion, 
 		       psize, pmtime);
-  tracepoint(librados, rados_aio_stat_exit, retval);
-  return retval;
 }
 
-extern "C" int rados_aio_cancel(rados_ioctx_t io, rados_completion_t completion)
-{
-  librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  return ctx->aio_cancel((librados::AioCompletionImpl*)completion);
-}
 
 struct C_WatchCB : public librados::WatchCtx {
   rados_watchcb_t wcb;
@@ -3343,30 +2981,23 @@ struct C_WatchCB : public librados::WatchCtx {
 int rados_watch(rados_ioctx_t io, const char *o, uint64_t ver, uint64_t *handle,
                 rados_watchcb_t watchcb, void *arg)
 {
-  tracepoint(librados, rados_watch_enter, io, o, ver, watchcb, arg);
   uint64_t *cookie = handle;
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   C_WatchCB *wc = new C_WatchCB(watchcb, arg);
-  int retval = ctx->watch(oid, ver, cookie, wc);
-  tracepoint(librados, rados_watch_exit, retval, *handle);
-  return retval;
+  return ctx->watch(oid, ver, cookie, wc);
 }
 
 int rados_unwatch(rados_ioctx_t io, const char *o, uint64_t handle)
 {
-  tracepoint(librados, rados_unwatch_enter, io, o, handle);
   uint64_t cookie = handle;
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->unwatch(oid, cookie);
-  tracepoint(librados, rados_unwatch_exit, retval);
-  return retval;
+  return ctx->unwatch(oid, cookie);
 }
 
 int rados_notify(rados_ioctx_t io, const char *o, uint64_t ver, const char *buf, int buf_len)
 {
-  tracepoint(librados, rados_notify_enter, io, o, ver, buf, buf_len);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
   bufferlist bl;
@@ -3375,21 +3006,16 @@ int rados_notify(rados_ioctx_t io, const char *o, uint64_t ver, const char *buf,
     memcpy(p.c_str(), buf, buf_len);
     bl.push_back(p);
   }
-  int retval = ctx->notify(oid, ver, bl);
-  tracepoint(librados, rados_notify_exit, retval);
-  return retval;
+  return ctx->notify(oid, ver, bl);
 }
 
 extern "C" int rados_set_alloc_hint(rados_ioctx_t io, const char *o,
                                     uint64_t expected_object_size,
                                     uint64_t expected_write_size)
 {
-  tracepoint(librados, rados_set_alloc_hint_enter, io, o, expected_object_size, expected_write_size);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   object_t oid(o);
-  int retval = ctx->set_alloc_hint(oid, expected_object_size, expected_write_size);
-  tracepoint(librados, rados_set_alloc_hint_exit, retval);
-  return retval;
+  return ctx->set_alloc_hint(oid, expected_object_size, expected_write_size);
 }
 
 extern "C" int rados_lock_exclusive(rados_ioctx_t io, const char * o,
@@ -3397,13 +3023,10 @@ extern "C" int rados_lock_exclusive(rados_ioctx_t io, const char * o,
 			  const char * desc, struct timeval * duration,
 			  uint8_t flags)
 {
-  tracepoint(librados, rados_lock_exclusive_enter, io, o, name, cookie, desc, duration, flags);
   librados::IoCtx ctx;
   librados::IoCtx::from_rados_ioctx_t(io, ctx);
 
-  int retval = ctx.lock_exclusive(o, name, cookie, desc, duration, flags);
-  tracepoint(librados, rados_lock_exclusive_exit, retval);
-  return retval;
+  return ctx.lock_exclusive(o, name, cookie, desc, duration, flags);
 }
 
 extern "C" int rados_lock_shared(rados_ioctx_t io, const char * o,
@@ -3411,24 +3034,19 @@ extern "C" int rados_lock_shared(rados_ioctx_t io, const char * o,
 			  const char * tag, const char * desc,
 			  struct timeval * duration, uint8_t flags)
 {
-  tracepoint(librados, rados_lock_shared_enter, io, o, name, cookie, tag, desc, duration, flags);
   librados::IoCtx ctx;
   librados::IoCtx::from_rados_ioctx_t(io, ctx);
 
-  int retval = ctx.lock_shared(o, name, cookie, tag, desc, duration, flags);
-  tracepoint(librados, rados_lock_shared_exit, retval);
-  return retval;
+  return ctx.lock_shared(o, name, cookie, tag, desc, duration, flags);
 }
 extern "C" int rados_unlock(rados_ioctx_t io, const char *o, const char *name,
 			    const char *cookie)
 {
-  tracepoint(librados, rados_unlock_enter, io, o, name, cookie);
   librados::IoCtx ctx;
   librados::IoCtx::from_rados_ioctx_t(io, ctx);
 
-  int retval = ctx.unlock(o, name, cookie);
-  tracepoint(librados, rados_unlock_exit, retval);
-  return retval;
+  return ctx.unlock(o, name, cookie);
+
 }
 
 extern "C" ssize_t rados_list_lockers(rados_ioctx_t io, const char *o,
@@ -3438,7 +3056,6 @@ extern "C" ssize_t rados_list_lockers(rados_ioctx_t io, const char *o,
 				      char *cookies, size_t *cookies_len,
 				      char *addrs, size_t *addrs_len)
 {
-  tracepoint(librados, rados_list_lockers_enter, io, o, name, *tag_len, *clients_len, *cookies_len, *addrs_len);
   librados::IoCtx ctx;
   librados::IoCtx::from_rados_ioctx_t(io, ctx);
   std::string name_str = name;
@@ -3447,10 +3064,8 @@ extern "C" ssize_t rados_list_lockers(rados_ioctx_t io, const char *o,
   int tmp_exclusive;
   std::list<librados::locker_t> lockers;
   int r = ctx.list_lockers(oid, name_str, &tmp_exclusive, &tag_str, &lockers);
-  if (r < 0) {
-    tracepoint(librados, rados_list_lockers_exit, r, *exclusive, "", *tag_len, *clients_len, *cookies_len, *addrs_len);
+  if (r < 0)
 	  return r;
-  }
 
   size_t clients_total = 0;
   size_t cookies_total = 0;
@@ -3470,10 +3085,8 @@ extern "C" ssize_t rados_list_lockers(rados_ioctx_t io, const char *o,
   *cookies_len = cookies_total;
   *addrs_len = addrs_total;
   *tag_len = tag_str.length() + 1;
-  if (too_short) {
-    tracepoint(librados, rados_list_lockers_exit, -ERANGE, *exclusive, "", *tag_len, *clients_len, *cookies_len, *addrs_len);
+  if (too_short)
     return -ERANGE;
-  }
 
   strcpy(tag, tag_str.c_str());
   char *clients_p = clients;
@@ -3481,11 +3094,10 @@ extern "C" ssize_t rados_list_lockers(rados_ioctx_t io, const char *o,
   char *addrs_p = addrs;
   for (it = lockers.begin(); it != lockers.end(); ++it) {
     strcpy(clients_p, it->client.c_str());
-    strcpy(cookies_p, it->cookie.c_str());
-    strcpy(addrs_p, it->address.c_str());
-    tracepoint(librados, rados_list_lockers_locker, clients_p, cookies_p, addrs_p);
     clients_p += it->client.length() + 1;
+    strcpy(cookies_p, it->cookie.c_str());
     cookies_p += it->cookie.length() + 1;
+    strcpy(addrs_p, it->address.c_str());
     addrs_p += it->address.length() + 1;
   }
   if (tmp_exclusive)
@@ -3493,51 +3105,37 @@ extern "C" ssize_t rados_list_lockers(rados_ioctx_t io, const char *o,
   else
     *exclusive = 0;
 
-  int retval = lockers.size();
-  tracepoint(librados, rados_list_lockers_exit, retval, *exclusive, tag, *tag_len, *clients_len, *cookies_len, *addrs_len);
-  return retval;
+  return lockers.size();
 }
 
 extern "C" int rados_break_lock(rados_ioctx_t io, const char *o,
 				const char *name, const char *client,
 				const char *cookie)
 {
-  tracepoint(librados, rados_break_lock_enter, io, o, name, client, cookie);
   librados::IoCtx ctx;
   librados::IoCtx::from_rados_ioctx_t(io, ctx);
 
-  int retval = ctx.break_lock(o, name, client, cookie);
-  tracepoint(librados, rados_break_lock_exit, retval);
-  return retval;
+  return ctx.break_lock(o, name, client, cookie);
 }
 
 extern "C" rados_write_op_t rados_create_write_op()
 {
-  tracepoint(librados, rados_create_write_op_enter);
-  rados_write_op_t retval = new (std::nothrow)::ObjectOperation;
-  tracepoint(librados, rados_create_write_op_exit, retval);
-  return retval;
+  return new (std::nothrow)::ObjectOperation;
 }
 
 extern "C" void rados_release_write_op(rados_write_op_t write_op)
 {
-  tracepoint(librados, rados_release_write_op_enter, write_op);
   delete (::ObjectOperation*)write_op;
-  tracepoint(librados, rados_release_write_op_exit);
 }
 
 extern "C" void rados_write_op_set_flags(rados_write_op_t write_op, int flags)
 {
-  tracepoint(librados, rados_write_op_set_flags_enter, write_op, flags);
   set_op_flags((::ObjectOperation *)write_op, flags);
-  tracepoint(librados, rados_write_op_set_flags_exit);
 }
 
 extern "C" void rados_write_op_assert_exists(rados_write_op_t write_op)
 {
-  tracepoint(librados, rados_write_op_assert_exists_enter, write_op);
   ((::ObjectOperation *)write_op)->stat(NULL, (utime_t *)NULL, NULL);
-  tracepoint(librados, rados_write_op_assert_exists_exit);
 }
 
 extern "C" void rados_write_op_cmpxattr(rados_write_op_t write_op,
@@ -3546,14 +3144,12 @@ extern "C" void rados_write_op_cmpxattr(rados_write_op_t write_op,
 				       const char *value,
 				       size_t value_len)
 {
-  tracepoint(librados, rados_write_op_cmpxattr_enter, write_op, name, comparison_operator, value, value_len);
   bufferlist bl;
   bl.append(value, value_len);
   ((::ObjectOperation *)write_op)->cmpxattr(name,
 					    comparison_operator,
 					    CEPH_OSD_CMPXATTR_MODE_STRING,
 					    bl);
-  tracepoint(librados, rados_write_op_cmpxattr_exit);
 }
 
 static void rados_c_omap_cmp(ObjectOperation *op,
@@ -3577,10 +3173,8 @@ extern "C" void rados_write_op_omap_cmp(rados_write_op_t write_op,
 					size_t val_len,
 					int *prval)
 {
-  tracepoint(librados, rados_write_op_omap_cmp_enter, write_op, key, comparison_operator, val, val_len, prval);
   rados_c_omap_cmp((::ObjectOperation *)write_op, key, comparison_operator,
 		   val, val_len, prval);
-  tracepoint(librados, rados_write_op_omap_cmp_exit);
 }
 
 extern "C" void rados_write_op_setxattr(rados_write_op_t write_op,
@@ -3588,34 +3182,28 @@ extern "C" void rados_write_op_setxattr(rados_write_op_t write_op,
 				       const char *value,
 				       size_t value_len)
 {
-  tracepoint(librados, rados_write_op_setxattr_enter, write_op, name, value, value_len);
   bufferlist bl;
   bl.append(value, value_len);
   ((::ObjectOperation *)write_op)->setxattr(name, bl);
-  tracepoint(librados, rados_write_op_setxattr_exit);
 }
 
 extern "C" void rados_write_op_rmxattr(rados_write_op_t write_op,
                                        const char *name)
 {
-  tracepoint(librados, rados_write_op_rmxattr_enter, write_op, name);
   bufferlist bl;
   ((::ObjectOperation *)write_op)->rmxattr(name);
-  tracepoint(librados, rados_write_op_rmxattr_exit);
 }
 
 extern "C" void rados_write_op_create(rados_write_op_t write_op,
                                       int exclusive,
 				      const char* category)
 {
-  tracepoint(librados, rados_write_op_create_enter, write_op, exclusive, category);
   ::ObjectOperation *oo = (::ObjectOperation *) write_op;
   if(category) {
     oo->create(exclusive, category);
   } else {
     oo->create(!!exclusive);
   }
-  tracepoint(librados, rados_write_op_create_exit);
 }
 
 extern "C" void rados_write_op_write(rados_write_op_t write_op,
@@ -3623,57 +3211,45 @@ extern "C" void rados_write_op_write(rados_write_op_t write_op,
 				     size_t len,
                                      uint64_t offset)
 {
-  tracepoint(librados, rados_write_op_write_enter, write_op, buffer, len, offset);
   bufferlist bl;
   bl.append(buffer,len);
   ((::ObjectOperation *)write_op)->write(offset, bl);
-  tracepoint(librados, rados_write_op_write_exit);
 }
 
 extern "C" void rados_write_op_write_full(rados_write_op_t write_op,
 				          const char *buffer,
 				          size_t len)
 {
-  tracepoint(librados, rados_write_op_write_full_enter, write_op, buffer, len);
   bufferlist bl;
   bl.append(buffer,len);
   ((::ObjectOperation *)write_op)->write_full(bl);
-  tracepoint(librados, rados_write_op_write_full_exit);
 }
 
 extern "C" void rados_write_op_append(rados_write_op_t write_op,
 				      const char *buffer,
 				      size_t len)
 {
-  tracepoint(librados, rados_write_op_append_enter, write_op, buffer, len);
   bufferlist bl;
   bl.append(buffer,len);
   ((::ObjectOperation *)write_op)->append(bl);
-  tracepoint(librados, rados_write_op_append_exit);
 }
 
 extern "C" void rados_write_op_remove(rados_write_op_t write_op)
 {
-  tracepoint(librados, rados_write_op_remove_enter, write_op);
   ((::ObjectOperation *)write_op)->remove();
-  tracepoint(librados, rados_write_op_remove_exit);
 }
 
 extern "C" void rados_write_op_truncate(rados_write_op_t write_op,
 				        uint64_t offset)
 {
-  tracepoint(librados, rados_write_op_truncate_enter, write_op, offset);
   ((::ObjectOperation *)write_op)->truncate(offset);
-  tracepoint(librados, rados_write_op_truncate_exit);
 }
 
 extern "C" void rados_write_op_zero(rados_write_op_t write_op,
 				    uint64_t offset,
 				    uint64_t len)
 {
-  tracepoint(librados, rados_write_op_zero_enter, write_op, offset, len);
   ((::ObjectOperation *)write_op)->zero(offset, len);
-  tracepoint(librados, rados_write_op_zero_exit);
 }
 
 extern "C" void rados_write_op_exec(rados_write_op_t write_op,
@@ -3683,11 +3259,9 @@ extern "C" void rados_write_op_exec(rados_write_op_t write_op,
 				    size_t in_len,
 				    int *prval)
 {
-  tracepoint(librados, rados_write_op_exec_enter, write_op, cls, method, in_buf, in_len, prval);
   bufferlist inbl;
   inbl.append(in_buf, in_len);
   ((::ObjectOperation *)write_op)->call(cls, method, inbl, NULL, NULL, prval);
-  tracepoint(librados, rados_write_op_exec_exit);
 }
 
 extern "C" void rados_write_op_omap_set(rados_write_op_t write_op,
@@ -3696,46 +3270,34 @@ extern "C" void rados_write_op_omap_set(rados_write_op_t write_op,
 					const size_t *lens,
 					size_t num)
 {
-  tracepoint(librados, rados_write_op_omap_set_enter, write_op, num);
   std::map<std::string, bufferlist> entries;
   for (size_t i = 0; i < num; ++i) {
-    tracepoint(librados, rados_write_op_omap_set_entry, keys[i], vals[i], lens[i]);
     bufferlist bl(lens[i]);
     bl.append(vals[i], lens[i]);
     entries[keys[i]] = bl;
   }
   ((::ObjectOperation *)write_op)->omap_set(entries);
-  tracepoint(librados, rados_write_op_omap_set_exit);
 }
 
 extern "C" void rados_write_op_omap_rm_keys(rados_write_op_t write_op,
 					    char const* const* keys,
 					    size_t keys_len)
 {
-  tracepoint(librados, rados_write_op_omap_rm_keys_enter, write_op, keys_len);
-  for(size_t i = 0; i < keys_len; i++) {
-    tracepoint(librados, rados_write_op_omap_rm_keys_entry, keys[i]);
-  }
   std::set<std::string> to_remove(keys, keys + keys_len);
   ((::ObjectOperation *)write_op)->omap_rm_keys(to_remove);
-  tracepoint(librados, rados_write_op_omap_rm_keys_exit);
 }
 
 extern "C" void rados_write_op_omap_clear(rados_write_op_t write_op)
 {
-  tracepoint(librados, rados_write_op_omap_clear_enter, write_op);
   ((::ObjectOperation *)write_op)->omap_clear();
-  tracepoint(librados, rados_write_op_omap_clear_exit);
 }
 
 extern "C" void rados_write_op_set_alloc_hint(rados_write_op_t write_op,
                                             uint64_t expected_object_size,
                                             uint64_t expected_write_size)
 {
-  tracepoint(librados, rados_write_op_set_alloc_hint_enter, write_op, expected_object_size, expected_write_size);
   ((::ObjectOperation *)write_op)->set_alloc_hint(expected_object_size,
                                                   expected_write_size);
-  tracepoint(librados, rados_write_op_set_alloc_hint_exit);
 }
 
 extern "C" int rados_write_op_operate(rados_write_op_t write_op,
@@ -3744,13 +3306,10 @@ extern "C" int rados_write_op_operate(rados_write_op_t write_op,
 				      time_t *mtime,
 				      int flags)
 {
-  tracepoint(librados, rados_write_op_operate_enter, write_op, io, oid, mtime, flags);
   object_t obj(oid);
   ::ObjectOperation *oo = (::ObjectOperation *) write_op;
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->operate(obj, oo, mtime, flags);
-  tracepoint(librados, rados_write_op_operate_exit, retval);
-  return retval;
+  return ctx->operate(obj, oo, mtime, flags);
 }
 
 extern "C" int rados_aio_write_op_operate(rados_write_op_t write_op,
@@ -3760,43 +3319,31 @@ extern "C" int rados_aio_write_op_operate(rados_write_op_t write_op,
 					  time_t *mtime,
 					  int flags)
 {
-  tracepoint(librados, rados_aio_write_op_operate_enter, write_op, io, completion, oid, mtime, flags);
   object_t obj(oid);
   ::ObjectOperation *oo = (::ObjectOperation *) write_op;
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   librados::AioCompletionImpl *c = (librados::AioCompletionImpl*)completion;
-  int retval = ctx->aio_operate(obj, oo, c, ctx->snapc, flags);
-  tracepoint(librados, rados_aio_write_op_operate_exit, retval);
-  return retval;
+  return ctx->aio_operate(obj, oo, c, ctx->snapc, flags);
 }
 
 extern "C" rados_read_op_t rados_create_read_op()
 {
-  tracepoint(librados, rados_create_read_op_enter);
-  rados_read_op_t retval = new (std::nothrow)::ObjectOperation;
-  tracepoint(librados, rados_create_read_op_exit, retval);
-  return retval;
+  return new (std::nothrow)::ObjectOperation;
 }
 
 extern "C" void rados_release_read_op(rados_read_op_t read_op)
 {
-  tracepoint(librados, rados_release_read_op_enter, read_op);
   delete (::ObjectOperation *)read_op;
-  tracepoint(librados, rados_release_read_op_exit);
 }
 
 extern "C" void rados_read_op_set_flags(rados_read_op_t read_op, int flags)
 {
-  tracepoint(librados, rados_read_op_set_flags_enter, read_op, flags);
   set_op_flags((::ObjectOperation *)read_op, flags);
-  tracepoint(librados, rados_read_op_set_flags_exit);
 }
 
 extern "C" void rados_read_op_assert_exists(rados_read_op_t read_op)
 {
-  tracepoint(librados, rados_read_op_assert_exists_enter, read_op);
   ((::ObjectOperation *)read_op)->stat(NULL, (utime_t *)NULL, NULL);
-  tracepoint(librados, rados_read_op_assert_exists_exit);
 }
 
 extern "C" void rados_read_op_cmpxattr(rados_read_op_t read_op,
@@ -3805,14 +3352,12 @@ extern "C" void rados_read_op_cmpxattr(rados_read_op_t read_op,
 				       const char *value,
 				       size_t value_len)
 {
-  tracepoint(librados, rados_read_op_cmpxattr_enter, read_op, name, comparison_operator, value, value_len);
   bufferlist bl;
   bl.append(value, value_len);
   ((::ObjectOperation *)read_op)->cmpxattr(name,
 					   comparison_operator,
 					   CEPH_OSD_CMPXATTR_MODE_STRING,
 					   bl);
-  tracepoint(librados, rados_read_op_cmpxattr_exit);
 }
 
 extern "C" void rados_read_op_omap_cmp(rados_read_op_t read_op,
@@ -3822,10 +3367,8 @@ extern "C" void rados_read_op_omap_cmp(rados_read_op_t read_op,
 				       size_t val_len,
 				       int *prval)
 {
-  tracepoint(librados, rados_read_op_omap_cmp_enter, read_op, key, comparison_operator, val, val_len, prval);
   rados_c_omap_cmp((::ObjectOperation *)read_op, key, comparison_operator,
 		   val, val_len, prval);
-  tracepoint(librados, rados_read_op_omap_cmp_exit);
 }
 
 extern "C" void rados_read_op_stat(rados_read_op_t read_op,
@@ -3833,9 +3376,7 @@ extern "C" void rados_read_op_stat(rados_read_op_t read_op,
 				   time_t *pmtime,
 				   int *prval)
 {
-  tracepoint(librados, rados_read_op_stat_enter, read_op, psize, pmtime, prval);
   ((::ObjectOperation *)read_op)->stat(psize, pmtime, prval);
-  tracepoint(librados, rados_read_op_stat_exit);
 }
 
 class C_bl_to_buf : public Context {
@@ -3872,11 +3413,9 @@ extern "C" void rados_read_op_read(rados_read_op_t read_op,
 				   size_t *bytes_read,
 				   int *prval)
 {
-  tracepoint(librados, rados_read_op_read_enter, read_op, offset, len, buf, bytes_read, prval);
   C_bl_to_buf *ctx = new C_bl_to_buf(buf, len, bytes_read, prval);
   ctx->out_bl.push_back(buffer::create_static(len, buf));
   ((::ObjectOperation *)read_op)->read(offset, len, &ctx->out_bl, prval, ctx);
-  tracepoint(librados, rados_read_op_read_exit);
 }
 
 class C_out_buffer : public Context {
@@ -3902,13 +3441,11 @@ extern "C" void rados_read_op_exec(rados_read_op_t read_op,
 				   size_t *out_len,
 				   int *prval)
 {
-  tracepoint(librados, rados_read_op_exec_enter, read_op, cls, method, in_buf, in_len, out_buf, out_len, prval);
   bufferlist inbl;
   inbl.append(in_buf, in_len);
   C_out_buffer *ctx = new C_out_buffer(out_buf, out_len);
   ((::ObjectOperation *)read_op)->call(cls, method, inbl, &ctx->out_bl, ctx,
 				       prval);
-  tracepoint(librados, rados_read_op_exec_exit);
 }
 
 extern "C" void rados_read_op_exec_user_buf(rados_read_op_t read_op,
@@ -3921,13 +3458,11 @@ extern "C" void rados_read_op_exec_user_buf(rados_read_op_t read_op,
 					    size_t *used_len,
 					    int *prval)
 {
-  tracepoint(librados, rados_read_op_exec_user_buf_enter, read_op, cls, method, in_buf, in_len, out_buf, out_len, used_len, prval);
   C_bl_to_buf *ctx = new C_bl_to_buf(out_buf, out_len, used_len, prval);
   bufferlist inbl;
   inbl.append(in_buf, in_len);
   ((::ObjectOperation *)read_op)->call(cls, method, inbl, &ctx->out_bl, ctx,
 				       prval);
-  tracepoint(librados, rados_read_op_exec_user_buf_exit);
 }
 
 struct RadosOmapIter {
@@ -3945,9 +3480,9 @@ public:
 };
 
 class C_XattrsIter : public Context {
-  librados::RadosXattrsIter *iter;
+  RadosXattrsIter *iter;
 public:
-  C_XattrsIter(librados::RadosXattrsIter *iter) : iter(iter) {}
+  C_XattrsIter(RadosXattrsIter *iter) : iter(iter) {}
   void finish(int r) {
     iter->i = iter->attrset.begin();
   }
@@ -3957,12 +3492,10 @@ extern "C" void rados_read_op_getxattrs(rados_read_op_t read_op,
 					rados_xattrs_iter_t *iter,
 					int *prval)
 {
-  tracepoint(librados, rados_read_op_getxattrs_enter, read_op, prval);
-  librados::RadosXattrsIter *xattrs_iter = new librados::RadosXattrsIter;
+  RadosXattrsIter *xattrs_iter = new RadosXattrsIter;
   ((::ObjectOperation *)read_op)->getxattrs(&xattrs_iter->attrset, prval);
   ((::ObjectOperation *)read_op)->add_handler(new C_XattrsIter(xattrs_iter));
   *iter = xattrs_iter;
-  tracepoint(librados, rados_read_op_getxattrs_exit, *iter);
 }
 
 extern "C" void rados_read_op_omap_get_vals(rados_read_op_t read_op,
@@ -3972,7 +3505,6 @@ extern "C" void rados_read_op_omap_get_vals(rados_read_op_t read_op,
 					    rados_omap_iter_t *iter,
 					    int *prval)
 {
-  tracepoint(librados, rados_read_op_omap_get_vals_enter, read_op, start_after, filter_prefix, max_return, prval);
   RadosOmapIter *omap_iter = new RadosOmapIter;
   const char *start = start_after ? start_after : "";
   const char *filter = filter_prefix ? filter_prefix : "";
@@ -3983,7 +3515,6 @@ extern "C" void rados_read_op_omap_get_vals(rados_read_op_t read_op,
 						prval);
   ((::ObjectOperation *)read_op)->add_handler(new C_OmapIter(omap_iter));
   *iter = omap_iter;
-  tracepoint(librados, rados_read_op_omap_get_vals_exit, *iter);
 }
 
 struct C_OmapKeysIter : public Context {
@@ -4006,14 +3537,12 @@ extern "C" void rados_read_op_omap_get_keys(rados_read_op_t read_op,
 					    rados_omap_iter_t *iter,
 					    int *prval)
 {
-  tracepoint(librados, rados_read_op_omap_get_keys_enter, read_op, start_after, max_return, prval);
   RadosOmapIter *omap_iter = new RadosOmapIter;
   C_OmapKeysIter *ctx = new C_OmapKeysIter(omap_iter);
   ((::ObjectOperation *)read_op)->omap_get_keys(start_after ? start_after : "",
 						max_return, &ctx->keys, prval);
   ((::ObjectOperation *)read_op)->add_handler(ctx);
   *iter = omap_iter;
-  tracepoint(librados, rados_read_op_omap_get_keys_exit, *iter);
 }
 
 extern "C" void rados_read_op_omap_get_vals_by_keys(rados_read_op_t read_op,
@@ -4022,7 +3551,6 @@ extern "C" void rados_read_op_omap_get_vals_by_keys(rados_read_op_t read_op,
 						    rados_omap_iter_t *iter,
 						    int *prval)
 {
-  tracepoint(librados, rados_read_op_omap_get_vals_by_keys_enter, read_op, keys, keys_len, iter, prval);
   std::set<std::string> to_get(keys, keys + keys_len);
 
   RadosOmapIter *omap_iter = new RadosOmapIter;
@@ -4031,7 +3559,6 @@ extern "C" void rados_read_op_omap_get_vals_by_keys(rados_read_op_t read_op,
 							prval);
   ((::ObjectOperation *)read_op)->add_handler(new C_OmapIter(omap_iter));
   *iter = omap_iter;
-  tracepoint(librados, rados_read_op_omap_get_vals_by_keys_exit, *iter);
 }
 
 extern "C" int rados_omap_get_next(rados_omap_iter_t iter,
@@ -4039,15 +3566,12 @@ extern "C" int rados_omap_get_next(rados_omap_iter_t iter,
 				   char **val,
 				   size_t *len)
 {
-  tracepoint(librados, rados_omap_get_next_enter, iter);
   RadosOmapIter *it = (RadosOmapIter *)iter;
   if (it->i == it->values.end()) {
     *key = NULL;
     *val = NULL;
     *len = 0;
-    int retval = 0;
-    tracepoint(librados, rados_omap_get_next_exit, retval, key, val, len);
-    return retval;
+    return 0;
   }
   if (key)
     *key = (char*)it->i->first.c_str();
@@ -4056,17 +3580,13 @@ extern "C" int rados_omap_get_next(rados_omap_iter_t iter,
   if (len)
     *len = it->i->second.length();
   ++it->i;
-  int retval = 0;
-  tracepoint(librados, rados_omap_get_next_exit, retval, key, val, len);
-  return retval;
+  return 0;
 }
 
 extern "C" void rados_omap_get_end(rados_omap_iter_t iter)
 {
-  tracepoint(librados, rados_omap_get_end_enter, iter);
   RadosOmapIter *it = (RadosOmapIter *)iter;
   delete it;
-  tracepoint(librados, rados_omap_get_end_exit);
 }
 
 extern "C" int rados_read_op_operate(rados_read_op_t read_op,
@@ -4074,12 +3594,9 @@ extern "C" int rados_read_op_operate(rados_read_op_t read_op,
 				     const char *oid,
 				     int flags)
 {
-  tracepoint(librados, rados_read_op_operate_enter, read_op, io, oid, flags);
   object_t obj(oid);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
-  int retval = ctx->operate_read(obj, (::ObjectOperation *)read_op, NULL, flags);
-  tracepoint(librados, rados_read_op_operate_exit, retval);
-  return retval;
+  return ctx->operate_read(obj, (::ObjectOperation *)read_op, NULL, flags);
 }
 
 extern "C" int rados_aio_read_op_operate(rados_read_op_t read_op,
@@ -4088,12 +3605,9 @@ extern "C" int rados_aio_read_op_operate(rados_read_op_t read_op,
 					 const char *oid,
 					 int flags)
 {
-  tracepoint(librados, rados_aio_read_op_operate_enter, read_op, io, completion, oid, flags);
   object_t obj(oid);
   librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
   librados::AioCompletionImpl *c = (librados::AioCompletionImpl*)completion;
-  int retval = ctx->aio_operate_read(obj, (::ObjectOperation *)read_op,
+  return ctx->aio_operate_read(obj, (::ObjectOperation *)read_op,
 			       c, flags, NULL);
-  tracepoint(librados, rados_aio_read_op_operate_exit, retval);
-  return retval;
 }
diff --git a/src/libradosstriper/Makefile.am b/src/libradosstriper/Makefile.am
deleted file mode 100644
index e88f594..0000000
--- a/src/libradosstriper/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-libradosstriper_la_SOURCES = \
-	libradosstriper/libradosstriper.cc \
-	libradosstriper/RadosStriperImpl.cc \
-	libradosstriper/MultiAioCompletionImpl.cc
-
-# We need this to avoid basename conflicts with the libradosstriper build tests in test/Makefile.am
-libradosstriper_la_CXXFLAGS = ${AM_CXXFLAGS}
-
-LIBRADOSSTRIPER_DEPS = $(LIBRADOS)
-libradosstriper_la_LIBADD = $(LIBRADOSSTRIPER_DEPS)
-libradosstriper_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0
-if LINUX
-libradosstriper_la_LDFLAGS += -export-symbols-regex '^radosstriper_.*'
-endif
-lib_LTLIBRARIES += libradosstriper.la
-
-noinst_HEADERS += \
-	libradosstriper/RadosStriperImpl.h \
-	libradosstriper/MultiAioCompletionImpl.h
diff --git a/src/libradosstriper/MultiAioCompletionImpl.cc b/src/libradosstriper/MultiAioCompletionImpl.cc
deleted file mode 100644
index 2701829..0000000
--- a/src/libradosstriper/MultiAioCompletionImpl.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "common/dout.h"
-
-#include "libradosstriper/MultiAioCompletionImpl.h"
-
-void libradosstriper::MultiAioCompletionImpl::complete_request(ssize_t r)
-{
-  lock.Lock();
-  if (rval >= 0) {
-    if (r < 0 && r != -EEXIST)
-      rval = r;
-    else if (r > 0)
-      rval += r;
-  }
-  assert(pending_complete);
-  int count = --pending_complete;
-  if (!count && !building) {
-    complete();
-  }
-  put_unlock();
-}
-
-void libradosstriper::MultiAioCompletionImpl::safe_request(ssize_t r)
-{
-  lock.Lock();
-  if (rval >= 0) {
-    if (r < 0 && r != -EEXIST)
-      rval = r;
-  }
-  assert(pending_safe);
-  int count = --pending_safe;
-  if (!count && !building) {
-    safe();
-  }
-  put_unlock();
-}
-
-void libradosstriper::MultiAioCompletionImpl::finish_adding_requests()
-{
-  lock.Lock();
-  assert(building);
-  building = false;
-  if (!pending_complete)
-    complete();
-  if (!pending_safe)
-    safe();
-  lock.Unlock();
-}
diff --git a/src/libradosstriper/MultiAioCompletionImpl.h b/src/libradosstriper/MultiAioCompletionImpl.h
deleted file mode 100644
index 6ad8ed0..0000000
--- a/src/libradosstriper/MultiAioCompletionImpl.h
+++ /dev/null
@@ -1,181 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_LIBRADOSSTRIPERSTRIPER_MULTIAIOCOMPLETIONIMPL_H
-#define CEPH_LIBRADOSSTRIPERSTRIPER_MULTIAIOCOMPLETIONIMPL_H
-
-#include "common/Cond.h"
-#include "common/Mutex.h"
-
-#include "include/radosstriper/libradosstriper.hpp"
-
-struct libradosstriper::MultiAioCompletionImpl {
-
-  Mutex lock;
-  Cond cond;
-  int ref, rval;
-  bool released;
-  int pending_complete, pending_safe;
-  rados_callback_t callback_complete, callback_safe;
-  void *callback_complete_arg, *callback_safe_arg;
-  bool building;       ///< true if we are still building this completion
-  bufferlist bl;       /// only used for read case in C api of rados striper
-  std::list<bufferlist*> bllist; /// keep temporary buffer lists used for destriping
-
-  MultiAioCompletionImpl() : lock("MultiAioCompletionImpl lock", false, false),
-    ref(1), rval(0), released(false),
-    pending_complete(0), pending_safe(0),
-    callback_complete(0), callback_safe(0),
-    callback_complete_arg(0), callback_safe_arg(0),
-    building(true) {};
-
-  ~MultiAioCompletionImpl() {
-    // deallocate temporary buffer lists
-    for (std::list<bufferlist*>::iterator it = bllist.begin();
-	 it != bllist.end();
-	 it++) {
-      delete *it;
-    }
-    bllist.clear();
-  }
-
-  int set_complete_callback(void *cb_arg, rados_callback_t cb) {
-    lock.Lock();
-    callback_complete = cb;
-    callback_complete_arg = cb_arg;
-    lock.Unlock();
-    return 0;
-  }
-  int set_safe_callback(void *cb_arg, rados_callback_t cb) {
-    lock.Lock();
-    callback_safe = cb;
-    callback_safe_arg = cb_arg;
-    lock.Unlock();
-    return 0;
-  }
-  int wait_for_complete() {
-    lock.Lock();
-    while (pending_complete)
-      cond.Wait(lock);
-    lock.Unlock();
-    return 0;
-  }
-  int wait_for_safe() {
-    lock.Lock();
-    while (pending_safe)
-      cond.Wait(lock);
-    lock.Unlock();
-    return 0;
-  }
-  bool is_complete() {
-    lock.Lock();
-    int r = pending_complete;
-    lock.Unlock();
-    return 0 == r;
-  }
-  bool is_safe() {
-    lock.Lock();
-    int r = pending_safe;
-    lock.Unlock();
-    return r == 0;
-  }
-  void wait_for_complete_and_cb() {
-    lock.Lock();
-    while (pending_complete || callback_complete)
-      cond.Wait(lock);
-    lock.Unlock();
-  }
-  void wait_for_safe_and_cb() {
-    lock.Lock();
-    while (pending_safe || callback_safe)
-      cond.Wait(lock);
-    lock.Unlock();
-  }
-  bool is_complete_and_cb() {
-    lock.Lock();
-    bool r = ((0 == pending_complete) && !callback_complete);
-    lock.Unlock();
-    return r;
-  }
-  bool is_safe_and_cb() {
-    lock.Lock();
-    int r = ((0 == pending_safe) && !callback_safe);
-    lock.Unlock();
-    return r;
-  }
-  int get_return_value() {
-    lock.Lock();
-    int r = rval;
-    lock.Unlock();
-    return r;
-  }
-  void release() {
-    lock.Lock();
-    assert(!released);
-    released = true;
-    put_unlock();
-  }
-  void get() {
-    lock.Lock();
-    _get();
-    lock.Unlock();
-  }
-  void _get() {
-    assert(lock.is_locked());
-    assert(ref > 0);
-    ++ref;
-  }
-  void put() {
-    lock.Lock();
-    put_unlock();
-  }
-  void put_unlock() {
-    assert(ref > 0);
-    int n = --ref;
-    lock.Unlock();
-    if (!n)
-      delete this;
-  }
-  void add_request() {
-    lock.Lock();
-    pending_complete++;
-    _get();
-    pending_safe++;
-    _get();
-    lock.Unlock();
-  }
-  void complete() {
-    assert(lock.is_locked());
-    if (callback_complete) {
-      callback_complete(this, callback_complete_arg);
-      callback_complete = 0;
-    }
-    cond.Signal();
-  }
-  void safe() {
-    assert(lock.is_locked());
-    if (callback_safe) {
-      callback_safe(this, callback_safe_arg);
-      callback_safe = 0;
-    }
-    cond.Signal();
-  };
-
-  void complete_request(ssize_t r);
-  void safe_request(ssize_t r);
-  void finish_adding_requests();
-
-};
-
-#endif // CEPH_LIBRADOSSTRIPERSTRIPER_MULTIAIOCOMPLETIONIMPL_H
diff --git a/src/libradosstriper/RadosStriperImpl.cc b/src/libradosstriper/RadosStriperImpl.cc
deleted file mode 100644
index 2460999..0000000
--- a/src/libradosstriper/RadosStriperImpl.cc
+++ /dev/null
@@ -1,1060 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "libradosstriper/RadosStriperImpl.h"
-
-#include <errno.h>
-
-#include <sstream>
-#include <iomanip>
-#include <algorithm>
-
-#include "include/types.h"
-#include "include/uuid.h"
-#include "include/ceph_fs.h"
-#include "common/dout.h"
-#include "common/strtol.h"
-#include "osdc/Striper.h"
-#include "libradosstriper/MultiAioCompletionImpl.h"
-#include "librados/AioCompletionImpl.h"
-#include <cls/lock/cls_lock_client.h>
-
-/*
- * This file contents the actual implementation of the rados striped objects interface.
- *
- * Striped objects are stored in rados in a set of regular rados objects, after their
- * content has been striped using the osdc/Striper interface.
- *
- * The external attributes of the striped object are mapped to the attributes of the
- * first underlying object. This first object has a set of extra external attributes
- * storing the layout of the striped object for future read back. These attributes are :
- *  - striper.layout.object_size : the size of rados objects used.
- *                                 Must be a multiple of striper.layout.stripe_unit
- *  - striper.layout.stripe_unit : the size of a stripe unit
- *  - striper.layout.stripe_count : the number of stripes used
- *  - striper.size : total striped object size
- *
- * In general operations on striped objects are not atomic.
- * However, a certain number of safety guards have been put to make the interface closer
- * to atomicity :
- *  - each data operation takes a shared lock on the first rados object for the
- *    whole time of the operation
- *  - the remove and trunc operations take an exclusive lock on the first rados object
- *    for the whole time of the operation
- * This makes sure that no removal/truncation of a striped object occurs while
- * data operations are happening and vice versa. It thus makes sure that the layout
- * of a striped object does not change during data operation, which is essential for
- * data consistency.
- *
- * Still the writing to a striped object is not atomic. This means in particular that
- * the size of an object may not be in sync with its content at all times.
- * As the size is always garanteed to be updated first and in an atomic way, and as
- * sparse striped objects are supported (see below), what will typically happen is
- * that a reader that comes too soon after a write will read 0s instead of the actual
- * data.
- *
- * Note that remove handles the pieces of the striped object in reverse order,
- * so that the head object is removed last, making the completion of the deletion atomic.
- *
- * Striped objects can be sparse, typically in case data was written at the end of the
- * striped object only. In such a case, some rados objects constituing the striped object
- * may be missing. Other can be partial (only the beginning will have data)
- * When dealing with such sparse striped files, missing objects are detected and
- * considered as full of 0s. They are however not created until real data is written
- * to them.
- *
- * There are a number of missing features/improvements that could be implemented.
- * Here are some ideas :
- *    - asynchronous stat and deletion
- *    - improvement of the synchronous deletion to launch asynchrously
- *      the deletion of the rados objects
- *    - make the truncation asynchronous in aio_write_full
- *    - implementation of missing entry points (compared to rados)
- *      In particular : clone_range, sparse_read, exec, aio_flush_async, tmaps, omaps, ...
- *
- */
-
-#define dout_subsys ceph_subsys_rados
-#undef dout_prefix
-#define dout_prefix *_dout << "libradosstriper: "
-
-/// size of xattr buffer
-#define XATTR_BUFFER_SIZE 32
-
-/// names of the different xattr entries
-#define XATTR_LAYOUT_STRIPE_UNIT "striper.layout.stripe_unit"
-#define XATTR_LAYOUT_STRIPE_COUNT "striper.layout.stripe_count"
-#define XATTR_LAYOUT_OBJECT_SIZE "striper.layout.object_size"
-#define XATTR_SIZE "striper.size"
-#define LOCK_PREFIX "lock."
-
-/// name of the lock used on objects to ensure layout stability during IO
-#define RADOS_LOCK_NAME "striper.lock"
-
-/// format of the extension of rados objects created for a given striped object
-#define RADOS_OBJECT_EXTENSION_FORMAT ".%016llx"
-
-/// default object layout (external declaration)
-extern ceph_file_layout g_default_file_layout;
-
-///////////////////////// CompletionData /////////////////////////////
-
-libradosstriper::RadosStriperImpl::CompletionData::CompletionData
-(libradosstriper::RadosStriperImpl* striper,
- const std::string& soid,
- const std::string& lockCookie,
- librados::AioCompletionImpl *userCompletion) :
-  m_striper(striper), m_soid(soid), m_lockCookie(lockCookie), m_ack(0) {
-  m_striper->get();
-  if (userCompletion) m_ack = new librados::IoCtxImpl::C_aio_Ack(userCompletion);
-}
-
-libradosstriper::RadosStriperImpl::CompletionData::~CompletionData() {
-  if (m_ack) delete m_ack;
-  m_striper->put();
-}
-
-void libradosstriper::RadosStriperImpl::CompletionData::complete(int r) {
-  if (m_ack) m_ack->finish(r);
-}
-
-libradosstriper::RadosStriperImpl::ReadCompletionData::ReadCompletionData
-(libradosstriper::RadosStriperImpl* striper,
- const std::string& soid,
- const std::string& lockCookie,
- librados::AioCompletionImpl *userCompletion,
- bufferlist* bl,
- std::vector<ObjectExtent>* extents,
- std::vector<bufferlist>* resultbl) :
-  CompletionData(striper, soid, lockCookie, userCompletion),
-  m_bl(bl), m_extents(extents), m_resultbl(resultbl) {}
-
-libradosstriper::RadosStriperImpl::ReadCompletionData::~ReadCompletionData() {
-  delete m_extents;
-  delete m_resultbl;
-}
-
-void libradosstriper::RadosStriperImpl::ReadCompletionData::complete(int r) {
-  // gather data into final buffer
-  Striper::StripedReadResult readResult;
-  vector<bufferlist>::iterator bit = m_resultbl->begin();
-  for (vector<ObjectExtent>::iterator eit = m_extents->begin();
-       eit != m_extents->end();
-       ++eit, ++bit) {
-    readResult.add_partial_result(m_striper->cct(), *bit, eit->buffer_extents);
-  }
-  m_bl->clear();
-  readResult.assemble_result(m_striper->cct(), *m_bl, true);
-  // call parent's completion method
-  CompletionData::complete(r?r:m_bl->length());
-}
-
-libradosstriper::RadosStriperImpl::WriteCompletionData::WriteCompletionData
-(libradosstriper::RadosStriperImpl* striper,
- const std::string& soid,
- const std::string& lockCookie,
- librados::AioCompletionImpl *userCompletion) :
-  CompletionData(striper, soid, lockCookie, userCompletion), m_safe(0) {
-  if (userCompletion) m_safe = new librados::IoCtxImpl::C_aio_Safe(userCompletion);
-}
-
-libradosstriper::RadosStriperImpl::WriteCompletionData::~WriteCompletionData() {
-  if (m_safe) delete m_safe;
-}
-
-void libradosstriper::RadosStriperImpl::WriteCompletionData::safe(int r) {
-  if (m_safe) m_safe->finish(r);
-}
-
-///////////////////////// RadosExclusiveLock /////////////////////////////
-
-libradosstriper::RadosStriperImpl::RadosExclusiveLock::RadosExclusiveLock(librados::IoCtx* ioCtx,
-									  const std::string& oid) :
-  m_ioCtx(ioCtx), m_oid(oid)
-{
-  librados::ObjectWriteOperation op;
-  op.assert_exists();
-  m_lockCookie = RadosStriperImpl::getUUID();
-  utime_t dur = utime_t();
-  rados::cls::lock::lock(&op, RADOS_LOCK_NAME, LOCK_EXCLUSIVE, m_lockCookie, "", "", dur, 0);
-  int rc = m_ioCtx->operate(oid, &op);
-  if (rc) throw ErrorCode(rc);
-}
-
-libradosstriper::RadosStriperImpl::RadosExclusiveLock::~RadosExclusiveLock() {
-  m_ioCtx->unlock(m_oid, RADOS_LOCK_NAME, m_lockCookie);
-}
-
-///////////////////////// constructor /////////////////////////////
-
-libradosstriper::RadosStriperImpl::RadosStriperImpl(librados::IoCtx& ioctx, librados::IoCtxImpl *ioctx_impl) :
-  m_refCnt(0), m_radosCluster(ioctx), m_ioCtx(ioctx), m_ioCtxImpl(ioctx_impl),
-  m_layout(g_default_file_layout) {}
-
-///////////////////////// layout /////////////////////////////
-
-int libradosstriper::RadosStriperImpl::setObjectLayoutStripeUnit
-(unsigned int stripe_unit)
-{
-  /* stripe unit must be non-zero, 64k increment */
-  if (!stripe_unit || (stripe_unit & (CEPH_MIN_STRIPE_UNIT-1)))
-    return -EINVAL;
-  m_layout.fl_stripe_unit = stripe_unit;
-  return 0;
-}
-
-int libradosstriper::RadosStriperImpl::setObjectLayoutStripeCount
-(unsigned int stripe_count)
-{
-  /* stripe count must be non-zero */
-  if (!stripe_count)
-    return -EINVAL;
-  m_layout.fl_stripe_count = stripe_count;
-  return 0;
-}
-
-int libradosstriper::RadosStriperImpl::setObjectLayoutObjectSize
-(unsigned int object_size)
-{
-  /* object size must be non-zero, 64k increment */
-  if (!object_size || (object_size & (CEPH_MIN_STRIPE_UNIT-1)))
-    return -EINVAL;
-  /* object size must be a multiple of stripe unit */
-  if (object_size < m_layout.fl_stripe_unit ||
-      object_size % m_layout.fl_stripe_unit)
-    return -EINVAL;
-  m_layout.fl_object_size = object_size;
-  return 0;
-}
-
-///////////////////////// xattrs /////////////////////////////
-
-int libradosstriper::RadosStriperImpl::getxattr(const object_t& soid,
-                                                const char *name,
-                                                bufferlist& bl)
-{
-  std::string firstObjOid = getObjectId(soid, 0);
-  return m_ioCtx.getxattr(firstObjOid, name, bl);
-}
-
-int libradosstriper::RadosStriperImpl::setxattr(const object_t& soid,
-                                                const char *name,
-                                                bufferlist& bl)
-{
-  std::string firstObjOid = getObjectId(soid, 0);
-  return m_ioCtx.setxattr(firstObjOid, name, bl);
-}
-
-int libradosstriper::RadosStriperImpl::getxattrs(const object_t& soid,
-                                                 map<string, bufferlist>& attrset)
-{
-  std::string firstObjOid = getObjectId(soid, 0);
-  int rc = m_ioCtx.getxattrs(firstObjOid, attrset);
-  if (rc) return rc;
-  // cleanup internal attributes dedicated to striping and locking
-  attrset.erase(XATTR_LAYOUT_STRIPE_UNIT);
-  attrset.erase(XATTR_LAYOUT_STRIPE_COUNT);
-  attrset.erase(XATTR_LAYOUT_OBJECT_SIZE);
-  attrset.erase(XATTR_SIZE);
-  attrset.erase(std::string(LOCK_PREFIX) + RADOS_LOCK_NAME);
-  return rc;
-}
-
-int libradosstriper::RadosStriperImpl::rmxattr(const object_t& soid,
-                                               const char *name)
-{
-  std::string firstObjOid = getObjectId(soid, 0);
-  return m_ioCtx.rmxattr(firstObjOid, name);
-}
-
-///////////////////////// io /////////////////////////////
-
-int libradosstriper::RadosStriperImpl::write(const std::string& soid,
-					     const bufferlist& bl,
-					     size_t len,
-					     uint64_t off) 
-{
-  // open the object. This will create it if needed, retrieve its layout
-  // and size and take a shared lock on it
-  ceph_file_layout layout;
-  std::string lockCookie;
-  int rc = createAndOpenStripedObject(soid, &layout, len+off, &lockCookie, true);
-  if (rc) return rc;
-  return write_in_open_object(soid, layout, lockCookie, bl, len, off);
-}
-
-int libradosstriper::RadosStriperImpl::append(const std::string& soid,
-					      const bufferlist& bl,
-					      size_t len) 
-{
-  // open the object. This will create it if needed, retrieve its layout
-  // and size and take a shared lock on it
-  ceph_file_layout layout;
-  uint64_t size = len;
-  std::string lockCookie;
-  int rc = openStripedObjectForWrite(soid, &layout, &size, &lockCookie, false);
-  if (rc) return rc;
-  return write_in_open_object(soid, layout, lockCookie, bl, len, size);
-}
-
-int libradosstriper::RadosStriperImpl::write_full(const std::string& soid,
-						  const bufferlist& bl) 
-{
-  int rc = trunc(soid, 0);
-  if (rc) return rc;
-  return write(soid, bl, bl.length(), 0);
-}
-
-int libradosstriper::RadosStriperImpl::read(const std::string& soid,
-					    bufferlist* bl,
-					    size_t len,
-					    uint64_t off)
-{
-  // create a completion object
-  librados::AioCompletionImpl c;
-  // call asynchronous method
-  int rc = aio_read(soid, &c, bl, len, off);
-  // and wait for completion
-  if (!rc) {
-    // wait for completion
-    c.wait_for_complete_and_cb();
-    // return result
-    rc = c.get_return_value();
-  }
-  return rc;
-}
-
-///////////////////////// asynchronous io /////////////////////////////
-
-int libradosstriper::RadosStriperImpl::aio_write(const std::string& soid,
-						 librados::AioCompletionImpl *c,
-						 const bufferlist& bl,
-						 size_t len,
-						 uint64_t off)
-{
-  ceph_file_layout layout;
-  std::string lockCookie;
-  int rc = createAndOpenStripedObject(soid, &layout, len+off, &lockCookie, true);
-  if (rc) return rc;
-  return aio_write_in_open_object(soid, c, layout, lockCookie, bl, len, off);
-}
-
-int libradosstriper::RadosStriperImpl::aio_append(const std::string& soid,
-						  librados::AioCompletionImpl *c,
-						  const bufferlist& bl,
-						  size_t len)
-{
-  ceph_file_layout layout;
-  uint64_t size = len;
-  std::string lockCookie;
-  int rc = openStripedObjectForWrite(soid, &layout, &size, &lockCookie, false);
-  if (rc) return rc;
-  // create a completion object
-  return aio_write_in_open_object(soid, c, layout, lockCookie, bl, len, size);
-}
-
-int libradosstriper::RadosStriperImpl::aio_write_full(const std::string& soid,
-						      librados::AioCompletionImpl *c,
-						      const bufferlist& bl)
-{
-  int rc = trunc(soid, 0);
-  if (rc) return rc;
-  return aio_write(soid, c, bl, bl.length(), 0);
-}
-
-static void striper_read_aio_req_complete(rados_striper_multi_completion_t c, void *arg)
-{
-  libradosstriper::RadosStriperImpl::ReadCompletionData *cdata =
-    reinterpret_cast<libradosstriper::RadosStriperImpl::ReadCompletionData*>(arg);
-  cdata->m_striper->unlockObject(cdata->m_soid, cdata->m_lockCookie);
-  libradosstriper::MultiAioCompletionImpl *comp =
-    reinterpret_cast<libradosstriper::MultiAioCompletionImpl*>(c);
-  cdata->complete(comp->rval);
-  delete cdata;
-  comp->ref--;
-}
-
-static void rados_req_read_safe(rados_completion_t c, void *arg)
-{
-  libradosstriper::RadosStriperImpl::RadosReadCompletionData *data =
-    reinterpret_cast<libradosstriper::RadosStriperImpl::RadosReadCompletionData*>(arg);
-  int rc = rados_aio_get_return_value(c);
-  // ENOENT means that we are dealing with a sparse file. This is fine,
-  // data (0s) will be created on the fly by the rados_req_read_complete method
-  if (rc == -ENOENT) rc = 0;
-  librados::AioCompletion *comp = reinterpret_cast<librados::AioCompletion*>(c);
-  libradosstriper::MultiAioCompletionImpl *multiAioComp = data->m_multiAioCompl;
-  if (0 == comp->pc->ack) delete data;
-  multiAioComp->safe_request(rc);
-}
-
-static void rados_req_read_complete(rados_completion_t c, void *arg)
-{
-  libradosstriper::RadosStriperImpl::RadosReadCompletionData *data =
-    reinterpret_cast<libradosstriper::RadosStriperImpl::RadosReadCompletionData*>(arg);
-  int rc = rados_aio_get_return_value(c);
-  // We need to handle the case of sparse files here
-  if (rc == -ENOENT) {
-    // the object did not exist at all. This can happen for sparse files.
-    // we consider we've read 0 bytes and it will fall into next case
-    rc = 0;
-  }
-  if (rc >= 0 && (((uint64_t)rc) < data->m_expectedBytes)) {
-    // only partial data were present in the object (or the object did not
-    // even exist if we've gone through previous case).
-    // This is typical of sparse file and we need to complete with 0s.
-    unsigned int lenOfZeros = data->m_expectedBytes-rc;
-    unsigned int existingDataToZero = min(data->m_bl->length()-rc, lenOfZeros);
-    if (existingDataToZero > 0) {
-      data->m_bl->zero(rc, existingDataToZero);
-    }
-    if (lenOfZeros > existingDataToZero) {
-      ceph::bufferptr zeros(ceph::buffer::create(lenOfZeros-existingDataToZero));
-      zeros.zero();
-      data->m_bl->push_back(zeros);
-    }
-    rc = data->m_expectedBytes;
-  }
-  librados::AioCompletion *comp = reinterpret_cast<librados::AioCompletion*>(c);
-  libradosstriper::MultiAioCompletionImpl * multiAioComp = data->m_multiAioCompl;
-  if (0 == comp->pc->safe) delete data;
-  multiAioComp->complete_request(rc);
-}
-
-int libradosstriper::RadosStriperImpl::aio_read(const std::string& soid,
-						librados::AioCompletionImpl *c,
-						bufferlist* bl,
-						size_t len,
-						uint64_t off)
-{
-  // open the object. This will retrieve its layout and size
-  // and take a shared lock on it
-  ceph_file_layout layout;
-  uint64_t size;
-  std::string lockCookie;
-  int rc = openStripedObjectForRead(soid, &layout, &size, &lockCookie);
-  if (rc) return rc;
-  // find out the actual number of bytes we can read
-  uint64_t read_len;
-  if (off >= size) {
-    // nothing to read ! We are done.
-    read_len = 0;
-  } else {
-    read_len = min(len, (size_t)(size-off));
-  }
-  // get list of extents to be read from
-  vector<ObjectExtent> *extents = new vector<ObjectExtent>();
-  if (read_len > 0) {
-    std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT;
-    Striper::file_to_extents(cct(), format.c_str(), &layout, off, read_len, 0, *extents);
-  }
-  
-  // create a completion object and transfer ownership of extents and resultbl
-  vector<bufferlist> *resultbl = new vector<bufferlist>(extents->size());
-  c->is_read = true;
-  c->io = m_ioCtxImpl;
-  ReadCompletionData *cdata = new ReadCompletionData(this, soid, lockCookie, c,
-						     bl, extents, resultbl);
-  libradosstriper::MultiAioCompletionImpl *nc = new libradosstriper::MultiAioCompletionImpl;
-  nc->set_complete_callback(cdata, striper_read_aio_req_complete);
-  // go through the extents
-  int r = 0, i = 0;
-  for (vector<ObjectExtent>::iterator p = extents->begin(); p != extents->end(); ++p) {
-    // create a buffer list describing where to place data read from current extend
-    bufferlist *oid_bl = &((*resultbl)[i++]);
-    for (vector<pair<uint64_t,uint64_t> >::iterator q = p->buffer_extents.begin();
-        q != p->buffer_extents.end();
-        ++q) {
-      bufferlist buffer_bl;
-      buffer_bl.substr_of(*bl, q->first, q->second);
-      oid_bl->append(buffer_bl);
-    }
-    // read all extends of a given object in one go
-    nc->add_request();
-    RadosReadCompletionData *data = new RadosReadCompletionData(nc, p->length, oid_bl);
-    librados::AioCompletion *rados_completion =
-      m_radosCluster.aio_create_completion(data, rados_req_read_complete, rados_req_read_safe);
-    r = m_ioCtx.aio_read(p->oid.name, rados_completion, oid_bl, p->length, p->offset);
-    rados_completion->release();
-    if (r < 0)
-      break;
-  }
-  nc->finish_adding_requests();
-  return r;
-}
-
-int libradosstriper::RadosStriperImpl::aio_read(const std::string& soid,
-						librados::AioCompletionImpl *c,
-						char* buf,
-						size_t len,
-						uint64_t off)
-{
-  // create a buffer list and store it inside the completion object
-  c->bl.clear();
-  c->bl.push_back(buffer::create_static(len, buf));
-  // call the bufferlist version of this method
-  return aio_read(soid, c, &c->bl, len, off);
-}
-
-int libradosstriper::RadosStriperImpl::aio_flush() 
-{
-  // pass to the rados level
-  return m_ioCtx.aio_flush();
-}
-
-///////////////////////// stat and deletion /////////////////////////////
-
-int libradosstriper::RadosStriperImpl::stat(const std::string& soid, uint64_t *psize, time_t *pmtime)
-{
-  // get pmtime as the pmtime of the first object
-  std::string firstObjOid = getObjectId(soid, 0);
-  uint64_t obj_size;
-  int rc = m_ioCtx.stat(firstObjOid, &obj_size, pmtime);
-  if (rc < 0) return rc;
-  // get the pmsize from the first object attributes
-  bufferlist bl;
-  rc = getxattr(soid, XATTR_SIZE, bl);
-  if (rc < 0) return rc;
-  std::string err;
-  // this intermediate string allows to add a null terminator before calling strtol
-  std::string strsize(bl.c_str(), bl.length());
-  *psize = strict_strtol(strsize.c_str(), 10, &err);
-  if (!err.empty()) {
-    lderr(cct()) << XATTR_SIZE << " : " << err << dendl;
-    return -EINVAL;
-  }
-  return 0;
-}
-
-int libradosstriper::RadosStriperImpl::remove(const std::string& soid)
-{
-  std::string firstObjOid = getObjectId(soid, 0);
-  try {
-    // lock the object in exclusive mode. Will be released when leaving the scope
-    RadosExclusiveLock lock(&m_ioCtx, firstObjOid);
-    // check size and get number of rados objects to delete
-    uint64_t nb_objects = 0;
-    bufferlist bl2;
-    int rc = getxattr(soid, XATTR_SIZE, bl2);
-    if (rc < 0) {
-      // no object size (or not able to get it)
-      // try to find the number of object "by hand"
-      uint64_t psize;
-      time_t pmtime;
-      while (!m_ioCtx.stat(getObjectId(soid, nb_objects), &psize, &pmtime)) {
-        nb_objects++;
-      }
-    } else {
-      // count total number of rados objects in the striped object
-      std::string err;
-      // this intermediate string allows to add a null terminator before calling strtol
-      std::string strsize(bl2.c_str(), bl2.length());
-      uint64_t size = strict_strtol(strsize.c_str(), 10, &err);
-      if (!err.empty()) {
-        lderr(cct()) << XATTR_SIZE << " : " << err << dendl;
-        
-        return -EINVAL;
-      }
-      uint64_t object_size = m_layout.fl_object_size;
-      uint64_t su = m_layout.fl_stripe_unit;
-      uint64_t stripe_count = m_layout.fl_stripe_count;
-      uint64_t nb_complete_sets = size / (object_size*stripe_count);
-      uint64_t remaining_data = size % (object_size*stripe_count);
-      uint64_t remaining_stripe_units = (remaining_data + su -1) / su;
-      uint64_t remaining_objects = std::min(remaining_stripe_units, stripe_count);
-      nb_objects = nb_complete_sets * stripe_count + remaining_objects;
-    }
-    // delete rados objects in reverse order
-    int rcr = 0;
-    for (int i = nb_objects-1; i >= 0; i--) {
-      rcr = m_ioCtx.remove(getObjectId(soid, i));
-      if (rcr < 0 and -ENOENT != rcr) {
-        lderr(cct()) << "RadosStriperImpl::remove : deletion incomplete for " << soid
-  		   << ", as " << getObjectId(soid, i) << " could not be deleted (rc=" << rc << ")"
-  		   << dendl;
-        break;
-      }
-    }
-    // return
-    return rcr;
-  } catch (ErrorCode &e) {
-    // errror caught when trying to take the exclusive lock
-    return e.m_code;
-  }
-}
-
-int libradosstriper::RadosStriperImpl::trunc(const std::string& soid, uint64_t size)
-{
-  // lock the object in exclusive mode. Will be released when leaving the scope
-  std::string firstObjOid = getObjectId(soid, 0);
-  try {
-    RadosExclusiveLock lock(&m_ioCtx, firstObjOid);
-  } catch (ErrorCode &e) {
-    return e.m_code;
-  }
-  // load layout and size
-  ceph_file_layout layout;
-  uint64_t original_size;
-  int rc = internal_get_layout_and_size(firstObjOid, &layout, &original_size);
-  if (rc) return rc;
-  if (size < original_size) {
-    rc = truncate(soid, original_size, size, layout);
-  } else if (size > original_size) {
-    rc = grow(soid, original_size, size, layout);
-  }
-  return rc;
-}
-
-///////////////////////// private helpers /////////////////////////////
-
-std::string libradosstriper::RadosStriperImpl::getObjectId(const object_t& soid,
-                                                           long long unsigned objectno)
-{
-  std::ostringstream s;
-  s << soid << '.' << std::setfill ('0') << std::setw(16) << std::hex << objectno;
-  return s.str();
-}
-
-int libradosstriper::RadosStriperImpl::closeForWrite(const std::string& soid,
-						     const std::string& lockCookie)
-{
-  // unlock the shared lock on the first rados object
-  unlockObject(soid, lockCookie);
-  return 0;
-}
-
-void libradosstriper::RadosStriperImpl::unlockObject(const std::string& soid,
-						     const std::string& lockCookie)
-{
-  // unlock the shared lock on the first rados object
-  std::string firstObjOid = getObjectId(soid, 0);
-  m_ioCtx.unlock(firstObjOid, RADOS_LOCK_NAME, lockCookie);
-}
-
-static void striper_write_req_complete(rados_striper_multi_completion_t c, void *arg)
-{
-  libradosstriper::RadosStriperImpl::WriteCompletionData *cdata =
-    reinterpret_cast<libradosstriper::RadosStriperImpl::WriteCompletionData*>(arg);
-  cdata->m_striper->closeForWrite(cdata->m_soid, cdata->m_lockCookie);
-}
-
-int libradosstriper::RadosStriperImpl::write_in_open_object(const std::string& soid,
-							    const ceph_file_layout& layout,
-							    const std::string& lockCookie,
-							    const bufferlist& bl,
-							    size_t len,
-							    uint64_t off) {
-  // create a completion object
-  WriteCompletionData *cdata = new WriteCompletionData(this, soid, lockCookie);
-  libradosstriper::MultiAioCompletionImpl *c = new libradosstriper::MultiAioCompletionImpl;
-  c->set_complete_callback(cdata, striper_write_req_complete);
-  // call the asynchronous API
-  int rc = internal_aio_write(soid, c, bl, len, off, layout);
-  if (!rc) {
-    // wait for completion and safety of data
-    c->wait_for_complete_and_cb();
-    c->wait_for_safe_and_cb();
-    // return result
-    rc = c->get_return_value();
-  }
-  delete cdata;
-  c->release();
-  return rc;
-}
-
-static void striper_write_aio_req_complete(rados_striper_multi_completion_t c, void *arg)
-{
-  libradosstriper::RadosStriperImpl::WriteCompletionData *cdata =
-    reinterpret_cast<libradosstriper::RadosStriperImpl::WriteCompletionData*>(arg);
-  cdata->m_striper->closeForWrite(cdata->m_soid, cdata->m_lockCookie);
-  libradosstriper::MultiAioCompletionImpl *comp =
-    reinterpret_cast<libradosstriper::MultiAioCompletionImpl*>(c);
-  cdata->complete(comp->rval);
-  if (0 == comp->pending_safe) {
-    delete cdata;
-    comp->ref--;
-  }
-}
-
-static void striper_write_aio_req_safe(rados_striper_multi_completion_t c, void *arg)
-{
-  libradosstriper::RadosStriperImpl::WriteCompletionData *cdata =
-    reinterpret_cast<libradosstriper::RadosStriperImpl::WriteCompletionData*>(arg);
-  libradosstriper::MultiAioCompletionImpl *comp =
-    reinterpret_cast<libradosstriper::MultiAioCompletionImpl*>(c);
-  cdata->safe(comp->rval);
-  if (0 == comp->pending_complete) {
-    delete cdata;
-    comp->ref--;
-  }
-}
-
-int libradosstriper::RadosStriperImpl::aio_write_in_open_object(const std::string& soid,
-								librados::AioCompletionImpl *c,
-								const ceph_file_layout& layout,
-								const std::string& lockCookie,
-								const bufferlist& bl,
-								size_t len,
-								uint64_t off) {
-  // create a completion object
-  m_ioCtxImpl->get();
-  WriteCompletionData *cdata = new WriteCompletionData(this, soid, lockCookie, c);
-  c->io = m_ioCtxImpl;
-  libradosstriper::MultiAioCompletionImpl *nc = new libradosstriper::MultiAioCompletionImpl;
-  nc->set_complete_callback(cdata, striper_write_aio_req_complete);
-  nc->set_safe_callback(cdata, striper_write_aio_req_safe);
-  // internal asynchronous API
-  return internal_aio_write(soid, nc, bl, len, off, layout);
-}
-
-static void rados_req_write_safe(rados_completion_t c, void *arg)
-{
-  libradosstriper::MultiAioCompletionImpl *comp =
-    reinterpret_cast<libradosstriper::MultiAioCompletionImpl*>(arg);
-  comp->safe_request(rados_aio_get_return_value(c));
-}
-
-static void rados_req_write_complete(rados_completion_t c, void *arg)
-{
-  libradosstriper::MultiAioCompletionImpl *comp =
-    reinterpret_cast<libradosstriper::MultiAioCompletionImpl*>(arg);
-  comp->complete_request(rados_aio_get_return_value(c));
-}
-
-int
-libradosstriper::RadosStriperImpl::internal_aio_write(const std::string& soid,
-						      libradosstriper::MultiAioCompletionImpl *c,
-						      const bufferlist& bl,
-						      size_t len,
-						      uint64_t off,
-						      const ceph_file_layout& layout)
-{
-  // get list of extents to be written to
-  vector<ObjectExtent> extents;
-  std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT;
-  Striper::file_to_extents(cct(), format.c_str(), &layout, off, len, 0, extents);
-  // go through the extents
-  int r = 0;
-  for (vector<ObjectExtent>::iterator p = extents.begin(); p != extents.end(); ++p) {
-    // assemble pieces of a given object into a single buffer list
-    bufferlist oid_bl;
-    for (vector<pair<uint64_t,uint64_t> >::iterator q = p->buffer_extents.begin();
-	 q != p->buffer_extents.end();
-	 ++q) {
-      bufferlist buffer_bl;
-      buffer_bl.substr_of(bl, q->first, q->second);
-      oid_bl.append(buffer_bl);
-    }    
-    // and write the object
-    c->add_request();
-    librados::AioCompletion *rados_completion =
-      m_radosCluster.aio_create_completion(c, rados_req_write_complete, rados_req_write_safe);
-    r = m_ioCtx.aio_write(p->oid.name, rados_completion, oid_bl, p->length, p->offset);
-    rados_completion->release();
-    if (r < 0) 
-      break;
-  }    
-  c->finish_adding_requests();
-  return r;
-}
-
-int libradosstriper::RadosStriperImpl::extract_uint32_attr
-(std::map<std::string, bufferlist> &attrs,
- const std::string& key,
- ceph_le32 *value)
-{
-  std::map<std::string, bufferlist>::iterator attrsIt = attrs.find(key);
-  if (attrsIt != attrs.end()) {
-    // this intermediate string allows to add a null terminator before calling strtol
-    std::string strvalue(attrsIt->second.c_str(), attrsIt->second.length());
-    std::string err;   
-    *value = strict_strtol(strvalue.c_str(), 10, &err);
-    if (!err.empty()) {
-      lderr(cct()) << key << " : " << err << dendl;
-      return -EINVAL;
-    }
-  } else {
-    return -ENOENT;
-  }
-  return 0;
-}
-
-int libradosstriper::RadosStriperImpl::extract_sizet_attr
-(std::map<std::string, bufferlist> &attrs,
- const std::string& key,
- size_t *value)
-{
-  std::map<std::string, bufferlist>::iterator attrsIt = attrs.find(key);
-  if (attrsIt != attrs.end()) {
-    // this intermediate string allows to add a null terminator before calling strtol
-    std::string strvalue(attrsIt->second.c_str(), attrsIt->second.length());
-    std::string err;   
-    *value = strict_strtoll(strvalue.c_str(), 10, &err);
-    if (!err.empty()) {
-      lderr(cct()) << key << " : " << err << dendl;
-      return -EINVAL;
-    }
-  } else {
-    return -ENOENT;
-  }
-  return 0;
-}
-
-int libradosstriper::RadosStriperImpl::internal_get_layout_and_size(const std::string& oid,
-								    ceph_file_layout *layout,
-								    uint64_t *size) 
-{
-  // get external attributes of the first rados object
-  std::map<std::string, bufferlist> attrs;
-  int rc = m_ioCtx.getxattrs(oid, attrs);
-  if (rc) return rc;
-  // deal with stripe_unit
-  rc = extract_uint32_attr(attrs, XATTR_LAYOUT_STRIPE_UNIT, &layout->fl_stripe_unit);
-  if (rc) return rc;
-  // deal with stripe_count
-  rc = extract_uint32_attr(attrs, XATTR_LAYOUT_STRIPE_COUNT, &layout->fl_stripe_count);
-  if (rc) return rc;
-  // deal with object_size
-  rc = extract_uint32_attr(attrs, XATTR_LAYOUT_OBJECT_SIZE, &layout->fl_object_size);
-  if (rc) return rc;
-  // deal with size
-  size_t ssize;
-  rc = extract_sizet_attr(attrs, XATTR_SIZE, &ssize);
-  *size = ssize;
-  return rc;
-}
-
-int libradosstriper::RadosStriperImpl::openStripedObjectForRead(const std::string& soid,
-								ceph_file_layout *layout,
-								uint64_t *size,
-								std::string *lockCookie)
-{
-  // take a lock the first rados object, if it exists and gets its size
-  // check, lock and size reading must be atomic and are thus done within a single operation
-  librados::ObjectWriteOperation op;
-  op.assert_exists();
-  *lockCookie = getUUID();
-  utime_t dur = utime_t();
-  rados::cls::lock::lock(&op, RADOS_LOCK_NAME, LOCK_SHARED, *lockCookie, "Tag", "", dur, 0);
-  std::string firstObjOid = getObjectId(soid, 0);
-  int rc = m_ioCtx.operate(firstObjOid, &op);
-  if (rc) {
-    // error case (including -ENOENT)
-    return rc;
-  }
-  rc = internal_get_layout_and_size(firstObjOid, layout, size);
-  if (rc) {
-    m_ioCtx.unlock(firstObjOid, RADOS_LOCK_NAME, *lockCookie);
-    lderr(cct()) << "RadosStriperImpl::openStripedObjectForRead : "
-		 << "could not load layout and size for "
-		 << soid << " : rc = " << rc << dendl;
-  }
-  return rc;
-}
-
-int libradosstriper::RadosStriperImpl::openStripedObjectForWrite(const std::string& soid,
-								 ceph_file_layout *layout,
-								 uint64_t *size,
-								 std::string *lockCookie,
-								 bool isFileSizeAbsolute)
-{
-  // take a lock the first rados object, if it exists
-  // check and lock must be atomic and are thus done within a single operation
-  librados::ObjectWriteOperation op;
-  op.assert_exists();
-  *lockCookie = getUUID();
-  utime_t dur = utime_t();
-  rados::cls::lock::lock(&op, RADOS_LOCK_NAME, LOCK_SHARED, *lockCookie, "Tag", "", dur, 0);
-  std::string firstObjOid = getObjectId(soid, 0);
-  int rc = m_ioCtx.operate(firstObjOid, &op);
-  if (rc) {
-    if (rc == -ENOENT) {
-      // object does not exist, delegate to createEmptyStripedObject
-      int rc = createAndOpenStripedObject(soid, layout, *size, lockCookie, isFileSizeAbsolute);
-      // return original size
-      *size = 0;
-      return rc; 
-    } else {
-      return rc;
-    }
-  }
-  // all fine
-  uint64_t curSize;
-  rc = internal_get_layout_and_size(firstObjOid, layout, &curSize);
-  if (rc) {
-    m_ioCtx.unlock(firstObjOid, RADOS_LOCK_NAME, *lockCookie);
-    lderr(cct()) << "RadosStriperImpl::openStripedObjectForWrite : "
-		   << "could not load layout and size for "
-		   << soid << " : rc = " << rc << dendl;
-    return rc;
-  }
-  // atomically update object size, only if smaller than current one
-  if (!isFileSizeAbsolute)
-    *size += curSize;
-  librados::ObjectWriteOperation writeOp;
-  writeOp.cmpxattr(XATTR_SIZE, LIBRADOS_CMPXATTR_OP_GT, *size);
-  std::ostringstream oss;
-  oss << *size;
-  bufferlist bl;
-  bl.append(oss.str());
-  writeOp.setxattr(XATTR_SIZE, bl);
-  rc = m_ioCtx.operate(firstObjOid, &writeOp);
-  // return current size
-  *size = curSize;
-  // handle case where objectsize is already bigger than size
-  if (-ECANCELED == rc) 
-    rc = 0;
-  if (rc) {
-    m_ioCtx.unlock(firstObjOid, RADOS_LOCK_NAME, *lockCookie);
-    lderr(cct()) << "RadosStriperImpl::openStripedObjectForWrite : "
-		   << "could not set new size for "
-		   << soid << " : rc = " << rc << dendl;
-  }
-  return rc;
-}
-
-int libradosstriper::RadosStriperImpl::createAndOpenStripedObject(const std::string& soid,
-								  ceph_file_layout *layout,
-								  uint64_t size,
-								  std::string *lockCookie,
-								  bool isFileSizeAbsolute)
-{
-  // build atomic write operation
-  librados::ObjectWriteOperation writeOp;
-  writeOp.create(true);
-  // object_size
-  std::ostringstream oss_object_size;
-  oss_object_size << m_layout.fl_object_size;
-  bufferlist bl_object_size;
-  bl_object_size.append(oss_object_size.str());
-  writeOp.setxattr(XATTR_LAYOUT_OBJECT_SIZE, bl_object_size);
-  // stripe unit
-  std::ostringstream oss_stripe_unit;
-  oss_stripe_unit << m_layout.fl_stripe_unit;
-  bufferlist bl_stripe_unit;
-  bl_stripe_unit.append(oss_stripe_unit.str());
-  writeOp.setxattr(XATTR_LAYOUT_STRIPE_UNIT, bl_stripe_unit);
-  // stripe count
-  std::ostringstream oss_stripe_count;
-  oss_stripe_count << m_layout.fl_stripe_count;
-  bufferlist bl_stripe_count;
-  bl_stripe_count.append(oss_stripe_count.str());
-  writeOp.setxattr(XATTR_LAYOUT_STRIPE_COUNT, bl_stripe_count);
-  // size
-  std::ostringstream oss_size;
-  oss_size << (isFileSizeAbsolute?size:0);
-  bufferlist bl_size;
-  bl_size.append(oss_size.str());
-  writeOp.setxattr(XATTR_SIZE, bl_size);
-  // effectively change attributes
-  std::string firstObjOid = getObjectId(soid, 0);
-  int rc = m_ioCtx.operate(firstObjOid, &writeOp);
-  // in case of error (but no EEXIST which would mean the object existed), return
-  if (rc && -EEXIST != rc) return rc;
-  // Otherwise open the object
-  uint64_t fileSize = size;
-  return openStripedObjectForWrite(soid, layout, &fileSize, lockCookie, isFileSizeAbsolute);
-}
-
-int libradosstriper::RadosStriperImpl::truncate(const std::string& soid,
-						uint64_t original_size,
-						uint64_t size,
-						ceph_file_layout &layout) 
-{
-  // handle the underlying rados objects. 3 cases here :
-  //  -- the objects belonging to object sets entirely located
-  //     before the truncation are unchanged
-  //  -- the objects belonging to the object set where the
-  //     truncation took place are truncated or removed
-  //  -- the objects belonging to object sets entirely located
-  //     after the truncation are removed
-  // Note that we do it backward and that we change the size in
-  // the external attributes only at the end. This make sure that
-  // no rados object stays behind if we remove the striped object
-  // after a truncation has failed
-  uint64_t trunc_objectsetno = size / layout.fl_object_size / layout.fl_stripe_count;
-  uint64_t last_objectsetno = original_size / layout.fl_object_size / layout.fl_stripe_count;
-  bool exists = false;
-  for (int64_t objectno = (last_objectsetno+1) * layout.fl_stripe_count-1;
-       objectno >= (int64_t)((trunc_objectsetno + 1) * layout.fl_stripe_count);
-       objectno--) {
-    // if no object existed so far, check object existence
-    if (!exists) {
-      uint64_t nb_full_object_set = objectno / layout.fl_stripe_count;
-      uint64_t object_index_in_set = objectno % layout.fl_stripe_count;
-      uint64_t set_start_off = nb_full_object_set * layout.fl_object_size * layout.fl_stripe_count;
-      uint64_t object_start_off = set_start_off + object_index_in_set * layout.fl_stripe_unit;
-      exists = (original_size > object_start_off);
-    }
-    if (exists) {
-      // remove
-      int rc = m_ioCtx.remove(getObjectId(soid, objectno));
-      // in case the object did not exist, it means we had a sparse file, all is fine
-      if (rc && rc != -ENOENT) return rc;
-    }
-  }
-  for (int64_t objectno = ((trunc_objectsetno + 1) * layout.fl_stripe_count) -1;
-       objectno >= (int64_t)(trunc_objectsetno * layout.fl_stripe_count);
-       objectno--) {
-    // if no object existed so far, check object existence
-    if (!exists) {
-      uint64_t object_start_off = ((objectno / layout.fl_stripe_count) * layout.fl_object_size) +
-	((objectno % layout.fl_stripe_count) * layout.fl_stripe_unit);
-      exists = (original_size > object_start_off);
-    }
-    if (exists) {
-      // truncate
-      uint64_t new_object_size = Striper::object_truncate_size(cct(), &layout, objectno, size);
-      int rc;
-      if (new_object_size > 0 or 0 == objectno) {
-	rc = m_ioCtx.trunc(getObjectId(soid, objectno), new_object_size);
-      } else {
-	rc = m_ioCtx.remove(getObjectId(soid, objectno));
-      }
-      // in case the object did not exist, it means we had a sparse file, all is fine
-      if (rc && rc != -ENOENT) return rc;
-    }
-  }
-  // all went fine, change size in the external attributes
-  std::ostringstream oss;
-  oss << size;
-  bufferlist bl;
-  bl.append(oss.str());
-  int rc = m_ioCtx.setxattr(getObjectId(soid, 0), XATTR_SIZE, bl);
-  return rc;
-}  
-
-int libradosstriper::RadosStriperImpl::grow(const std::string& soid,
-					    uint64_t original_size,
-					    uint64_t size,
-					    ceph_file_layout &layout) 
-{
-  // handle the underlying rados objects. As we support sparse objects,
-  // we only have to change the size in the external attributes
-  std::ostringstream oss;
-  oss << size;
-  bufferlist bl;
-  bl.append(oss.str());
-  int rc = m_ioCtx.setxattr(getObjectId(soid, 0), XATTR_SIZE, bl);
-  return rc;
-}  
-
-std::string libradosstriper::RadosStriperImpl::getUUID()
-{
-  struct uuid_d uuid;
-  uuid.generate_random();
-  char suuid[37];
-  uuid.print(suuid);
-  return std::string(suuid);
-}
diff --git a/src/libradosstriper/RadosStriperImpl.h b/src/libradosstriper/RadosStriperImpl.h
deleted file mode 100644
index 7f51895..0000000
--- a/src/libradosstriper/RadosStriperImpl.h
+++ /dev/null
@@ -1,319 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_LIBRADOSSTRIPER_RADOSSTRIPERIMPL_H
-#define CEPH_LIBRADOSSTRIPER_RADOSSTRIPERIMPL_H
-
-#include <string>
-
-#include "include/atomic.h"
-
-#include "include/rados/librados.h"
-#include "include/rados/librados.hpp"
-#include "include/radosstriper/libradosstriper.h"
-#include "include/radosstriper/libradosstriper.hpp"
-
-#include "librados/IoCtxImpl.h"
-
-struct libradosstriper::RadosStriperImpl {
-
-  /**
-   * struct handling the data needed to pass to the call back
-   * function in asynchronous operations
-   */
-  struct CompletionData {
-    /// striper to be used to handle the write completion
-    libradosstriper::RadosStriperImpl *m_striper;
-    /// striped object concerned by the write operation
-    std::string m_soid;
-    /// shared lock to be released at completion
-    std::string m_lockCookie;
-    /// completion handler
-    librados::IoCtxImpl::C_aio_Ack *m_ack;
-    /// constructor
-    CompletionData(libradosstriper::RadosStriperImpl * striper,
-		   const std::string& soid,
-		   const std::string& lockCookie,
-		   librados::AioCompletionImpl *userCompletion = 0);
-    /// destructor
-    virtual ~CompletionData();
-    /// complete method
-    void complete(int r);
-  };
-
-  /**
-   * struct handling the data needed to pass to the call back
-   * function in asynchronous read operations
-   */
-  struct ReadCompletionData : CompletionData {
-    /// bufferlist containing final result
-    bufferlist* m_bl;
-    /// extents that will be read
-    std::vector<ObjectExtent>* m_extents;
-    /// intermediate results
-    std::vector<bufferlist>* m_resultbl;
-    /// constructor
-    ReadCompletionData(libradosstriper::RadosStriperImpl * striper,
-		       const std::string& soid,
-		       const std::string& lockCookie,
-		       librados::AioCompletionImpl *userCompletion,
-		       bufferlist* bl,
-		       std::vector<ObjectExtent>* extents,
-		       std::vector<bufferlist>* resultbl);
-    /// destructor
-    virtual ~ReadCompletionData();
-    /// complete method
-    void complete(int r);
-  };
-
-  /**
-   * struct handling the data needed to pass to the call back
-   * function in asynchronous write operations
-   */
-  struct WriteCompletionData : CompletionData {
-    /// safe completion handler
-    librados::IoCtxImpl::C_aio_Safe *m_safe;
-    /// constructor
-    WriteCompletionData(libradosstriper::RadosStriperImpl * striper,
-			const std::string& soid,
-			const std::string& lockCookie,
-			librados::AioCompletionImpl *userCompletion = 0);
-    /// destructor
-    virtual ~WriteCompletionData();
-    /// safe method
-    void safe(int r);
-  };
-
-  /**
-   * struct handling the data needed to pass to the call back
-   * function in asynchronous read operations of a Rados File
-   */
-  struct RadosReadCompletionData {
-    /// constructor
-    RadosReadCompletionData(MultiAioCompletionImpl *multiAioCompl,
-			    uint64_t expectedBytes,
-			    bufferlist *bl) :
-      m_multiAioCompl(multiAioCompl), m_expectedBytes(expectedBytes), m_bl(bl) {};
-    /// the multi asynch io completion object to be used
-    MultiAioCompletionImpl *m_multiAioCompl;
-    /// the expected number of bytes
-    uint64_t m_expectedBytes;
-    /// the bufferlist object where data have been written
-    bufferlist *m_bl;
-  };
-
-  /**
-   * exception wrapper around an error code
-   */
-  struct ErrorCode {
-    ErrorCode(int error) : m_code(error) {};
-    int m_code;
-  };
-    
-  /**
-   * Helper struct to handle simple locks on objects
-   */
-  struct RadosExclusiveLock {
-    /// striper to be used to handle the locking
-    librados::IoCtx* m_ioCtx;
-    /// object to be locked
-    const std::string& m_oid;
-    /// name of the lock
-    std::string m_lockCookie;
-    /// constructor : takes the lock
-    RadosExclusiveLock(librados::IoCtx* ioCtx, const std::string &oid);
-    /// destructor : releases the lock
-    ~RadosExclusiveLock();
-  };
-
-  /*
-   * Constructor
-   * @param cluster_name name of the cluster, can be NULL
-   * @param client_name has 2 meanings depending on cluster_name
-   *          - if cluster_name is null : this is the client id
-   *          - else : this is the full client name in format type.id
-   */
-  RadosStriperImpl(librados::IoCtx& ioctx, librados::IoCtxImpl *ioctx_impl);
-  /// Destructor
-  ~RadosStriperImpl() {};
-
-  // configuration
-  int setObjectLayoutStripeUnit(unsigned int stripe_unit);
-  int setObjectLayoutStripeCount(unsigned int stripe_count);
-  int setObjectLayoutObjectSize(unsigned int object_size);
-
-  // xattrs
-  int getxattr(const object_t& soid, const char *name, bufferlist& bl);
-  int setxattr(const object_t& soid, const char *name, bufferlist& bl);
-  int getxattrs(const object_t& soid, map<string, bufferlist>& attrset);
-  int rmxattr(const object_t& soid, const char *name);
-  
-  // io
-  int write(const std::string& soid, const bufferlist& bl, size_t len, uint64_t off);
-  int append(const std::string& soid, const bufferlist& bl, size_t len);
-  int write_full(const std::string& soid, const bufferlist& bl);
-  int read(const std::string& soid, bufferlist* pbl, size_t len, uint64_t off);
-
-  // asynchronous io
-  int aio_write(const std::string& soid, librados::AioCompletionImpl *c,
-		const bufferlist& bl, size_t len, uint64_t off);
-  int aio_append(const std::string& soid, librados::AioCompletionImpl *c,
-		 const bufferlist& bl, size_t len);
-  int aio_write_full(const std::string& soid, librados::AioCompletionImpl *c,
-		     const bufferlist& bl);
-  int aio_read(const std::string& soid, librados::AioCompletionImpl *c,
-	       bufferlist* pbl, size_t len, uint64_t off);
-  int aio_read(const std::string& soid, librados::AioCompletionImpl *c,
-	       char* buf, size_t len, uint64_t off);
-  int aio_flush();
-
-  // stat, deletion and truncation
-  int stat(const std::string& soid, uint64_t *psize, time_t *pmtime);
-  int remove(const std::string& soid);
-  int trunc(const std::string& soid, uint64_t size);
-
-  // reference counting
-  void get() {
-    m_refCnt.inc();
-  }
-  void put() {
-    if (m_refCnt.dec() == 0)
-      delete this;
-  }
-
-  // objectid manipulation
-  std::string getObjectId(const object_t& soid, long long unsigned objectno);
-
-  // opening and closing of striped objects
-  int closeForWrite(const std::string& soid,
-		    const std::string& lockCookie);
-  void unlockObject(const std::string& soid,
-		    const std::string& lockCookie);
-
-  // internal versions of IO method
-  int write_in_open_object(const std::string& soid,
-			   const ceph_file_layout& layout,
-			   const std::string& lockCookie,
-			   const bufferlist& bl,
-			   size_t len,
-			   uint64_t off);
-  int aio_write_in_open_object(const std::string& soid,
-			       librados::AioCompletionImpl *c,
-			       const ceph_file_layout& layout,
-			       const std::string& lockCookie,
-			       const bufferlist& bl,
-			       size_t len,
-			       uint64_t off);
-  int internal_aio_write(const std::string& soid,
-			 libradosstriper::MultiAioCompletionImpl *c,
-			 const bufferlist& bl,
-			 size_t len,
-			 uint64_t off,
-			 const ceph_file_layout& layout);
-
-  int extract_uint32_attr(std::map<std::string, bufferlist> &attrs,
-			  const std::string& key,
-			  ceph_le32 *value);
-
-  int extract_sizet_attr(std::map<std::string, bufferlist> &attrs,
-			 const std::string& key,
-			 size_t *value);
-
-  int internal_get_layout_and_size(const std::string& oid,
-				   ceph_file_layout *layout,
-				   uint64_t *size);
-
-  /**
-   * opens an existing striped object and takes a shared lock on it
-   * @return 0 if everything is ok and the lock was taken. -errcode otherwise
-   * In particulae, if the striped object does not exists, -ENOENT is returned
-   * In case the return code in not 0, no lock is taken
-   */
-  int openStripedObjectForRead(const std::string& soid,
-			       ceph_file_layout *layout,
-			       uint64_t *size,
-			       std::string *lockCookie);
-
-  /**
-   * opens an existing striped object, takes a shared lock on it
-   * and sets its size to the size it will have after the write.
-   * In case the striped object does not exists, it will create it by
-   * calling createOrOpenStripedObject.
-   * @param layout this is filled with the layout of the file 
-   * @param size new size of the file (together with isFileSizeAbsolute)
-   * In case of success, this is filled with the size of the file before the opening
-   * @param isFileSizeAbsolute if false, this means that the given size should
-   * be added to the current file size (append mode)
-   * @return 0 if everything is ok and the lock was taken. -errcode otherwise
-   * In case the return code in not 0, no lock is taken
-   */
-  int openStripedObjectForWrite(const std::string& soid,
-				ceph_file_layout *layout,
-				uint64_t *size,
-				std::string *lockCookie,
-				bool isFileSizeAbsolute);
-  /**
-   * creates an empty striped object with the given size and opens it calling
-   * openStripedObjectForWrite, which implies taking a shared lock on it
-   * Also deals with the cases where the object was created in the mean time
-   * @param isFileSizeAbsolute if false, this means that the given size should
-   * be added to the current file size (append mode). This of course only makes
-   * sense in case the striped object already exists
-   * @return 0 if everything is ok and the lock was taken. -errcode otherwise
-   * In case the return code in not 0, no lock is taken
-   */
-  int createAndOpenStripedObject(const std::string& soid,
-				 ceph_file_layout *layout,
-				 uint64_t size,
-				 std::string *lockCookie,
-				 bool isFileSizeAbsolute);
-
-  /**
-   * truncates an object. Should only be called with size < original_size
-   */
-  int truncate(const std::string& soid,
-	       uint64_t original_size,
-	       uint64_t size,
-	       ceph_file_layout &layout);
-
-  /**
-   * grows an object (adding 0s). Should only be called with size > original_size
-   */
-  int grow(const std::string& soid,
-	   uint64_t original_size,
-	   uint64_t size,
-	   ceph_file_layout &layout);
-  
-  /**
-   * creates a unique identifier
-   */
-  static std::string getUUID();
-  
-  CephContext *cct() {
-    return (CephContext*)m_radosCluster.cct();
-  }
-
-  // reference counting
-  atomic_t m_refCnt;
-
-  // Context
-  librados::Rados m_radosCluster;
-  librados::IoCtx m_ioCtx;
-  librados::IoCtxImpl *m_ioCtxImpl;
-
-  // Default layout
-  ceph_file_layout m_layout;
-};
-
-#endif
diff --git a/src/libradosstriper/libradosstriper.cc b/src/libradosstriper/libradosstriper.cc
deleted file mode 100644
index e02c8ca..0000000
--- a/src/libradosstriper/libradosstriper.cc
+++ /dev/null
@@ -1,613 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Sebastien Ponce <sebastien.ponce at cern.ch>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include <errno.h>
-
-#include "libradosstriper/RadosStriperImpl.h"
-#include "libradosstriper/MultiAioCompletionImpl.h"
-
-#include "include/types.h"
-
-#include "include/radosstriper/libradosstriper.h"
-#include "include/radosstriper/libradosstriper.hpp"
-#include "librados/RadosXattrIter.h"
-
-/*
- * This file implements the rados striper API.
- * There are 2 flavours of it :
- *   - the C API, found in include/rados/libradosstriper.h
- *   - the C++ API, found in include/rados/libradosstriper.hpp
- */
-
-///////////////////////////// C++ API //////////////////////////////
-
-libradosstriper::MultiAioCompletion::~MultiAioCompletion()
-{
-  delete pc;
-}
-
-int libradosstriper::MultiAioCompletion::set_complete_callback
-(void *cb_arg, rados_callback_t cb)
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->set_complete_callback(cb_arg, cb);
-}
-
-int libradosstriper::MultiAioCompletion::set_safe_callback
-(void *cb_arg, rados_callback_t cb)
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->set_safe_callback(cb_arg, cb);
-}
-
-void libradosstriper::MultiAioCompletion::wait_for_complete()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  c->wait_for_complete();
-}
-
-void libradosstriper::MultiAioCompletion::wait_for_safe()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  c->wait_for_safe();
-}
-
-bool libradosstriper::MultiAioCompletion::is_complete()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->is_complete();
-}
-
-bool libradosstriper::MultiAioCompletion::is_safe()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->is_safe();
-}
-
-void libradosstriper::MultiAioCompletion::wait_for_complete_and_cb()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  c->wait_for_complete_and_cb();
-}
-
-void libradosstriper::MultiAioCompletion::MultiAioCompletion::wait_for_safe_and_cb()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  c->wait_for_safe_and_cb();
-}
-
-bool libradosstriper::MultiAioCompletion::is_complete_and_cb()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->is_complete_and_cb();
-}
-
-bool libradosstriper::MultiAioCompletion::is_safe_and_cb()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->is_safe_and_cb();
-}
-
-int libradosstriper::MultiAioCompletion::get_return_value()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  return c->get_return_value();
-}
-
-void libradosstriper::MultiAioCompletion::release()
-{
-  MultiAioCompletionImpl *c = (MultiAioCompletionImpl *)pc;
-  c->release();
-  delete this;
-}
-
-libradosstriper::RadosStriper::RadosStriper() :
-  rados_striper_impl(0)
-{
-}
-
-void libradosstriper::RadosStriper::to_rados_striper_t(RadosStriper &striper, rados_striper_t *s)
-{
-  *s = (rados_striper_t)striper.rados_striper_impl;
-  striper.rados_striper_impl->get();
-}
-
-libradosstriper::RadosStriper::RadosStriper(const RadosStriper& rs)
-{
-  rados_striper_impl = rs.rados_striper_impl;
-  if (rados_striper_impl) {
-    rados_striper_impl->get();
-  }
-}
-
-libradosstriper::RadosStriper& libradosstriper::RadosStriper::operator=(const RadosStriper& rs)
-{
-  if (rados_striper_impl)
-    rados_striper_impl->put();
-  rados_striper_impl = rs.rados_striper_impl;
-  rados_striper_impl->get();
-  return *this;
-}
-
-libradosstriper::RadosStriper::~RadosStriper()
-{
-  if (rados_striper_impl)
-    rados_striper_impl->put();
-  rados_striper_impl = 0;
-}
-
-int libradosstriper::RadosStriper::striper_create(librados::IoCtx& ioctx,
-						  RadosStriper *striper)
-{
-  try {
-    striper->rados_striper_impl = new libradosstriper::RadosStriperImpl(ioctx, ioctx.io_ctx_impl);
-    striper->rados_striper_impl->get();
-  } catch (int rc) {
-    return rc;
-  }
-  return 0;
-}
-
-int libradosstriper::RadosStriper::set_object_layout_stripe_unit
-(unsigned int stripe_unit)
-{
-  return rados_striper_impl->setObjectLayoutStripeUnit(stripe_unit);
-}
-
-int libradosstriper::RadosStriper::set_object_layout_stripe_count
-(unsigned int stripe_count)
-{
-  return rados_striper_impl->setObjectLayoutStripeCount(stripe_count);
-}
-
-int libradosstriper::RadosStriper::set_object_layout_object_size
-(unsigned int object_size)
-{
-  return rados_striper_impl->setObjectLayoutObjectSize(object_size);
-}
-
-int libradosstriper::RadosStriper::getxattr(const std::string& oid, const char *name, bufferlist& bl)
-{
-  return rados_striper_impl->getxattr(oid, name, bl);
-}
-
-int libradosstriper::RadosStriper::setxattr(const std::string& oid, const char *name, bufferlist& bl)
-{
-  return rados_striper_impl->setxattr(oid, name, bl);
-}
-
-int libradosstriper::RadosStriper::rmxattr(const std::string& oid, const char *name)
-{
-  return rados_striper_impl->rmxattr(oid, name);
-}
-
-int libradosstriper::RadosStriper::getxattrs(const std::string& oid,
-					     std::map<std::string, bufferlist>& attrset)
-{
-  return rados_striper_impl->getxattrs(oid, attrset);
-}
-
-int libradosstriper::RadosStriper::write(const std::string& soid,
-					 const bufferlist& bl,
-					 size_t len,
-					 uint64_t off)
-{
-  return rados_striper_impl->write(soid, bl, len, off);
-}
-
-int libradosstriper::RadosStriper::write_full(const std::string& soid,
-					      const bufferlist& bl)
-{
-  return rados_striper_impl->write_full(soid, bl);
-}
-
-int libradosstriper::RadosStriper::append(const std::string& soid,
-					  const bufferlist& bl,
-					  size_t len)
-{
-  return rados_striper_impl->append(soid, bl, len);
-}
-
-int libradosstriper::RadosStriper::aio_write(const std::string& soid,
-					     librados::AioCompletion *c,
-					     const bufferlist& bl,
-					     size_t len,
-					     uint64_t off)
-{
-  return rados_striper_impl->aio_write(soid, c->pc, bl, len, off);
-}
-
-int libradosstriper::RadosStriper::aio_write_full(const std::string& soid,
-						  librados::AioCompletion *c,
-						  const bufferlist& bl)
-{
-  return rados_striper_impl->aio_write_full(soid, c->pc, bl);
-}
-
-int libradosstriper::RadosStriper::aio_append(const std::string& soid,
-					      librados::AioCompletion *c,
-					      const bufferlist& bl,
-					      size_t len)
-{
-  return rados_striper_impl->aio_append(soid, c->pc, bl, len);
-}
-
-int libradosstriper::RadosStriper::read(const std::string& soid,
-					bufferlist* bl,
-					size_t len,
-					uint64_t off)
-{
-  bl->clear();
-  bl->push_back(buffer::create(len));
-  return rados_striper_impl->read(soid, bl, len, off);
-}
-
-int libradosstriper::RadosStriper::aio_read(const std::string& soid,
-					    librados::AioCompletion *c,
-					    bufferlist* bl,
-					    size_t len,
-					    uint64_t off)
-{
-  bl->clear();
-  bl->push_back(buffer::create(len));
-  return rados_striper_impl->aio_read(soid, c->pc, bl, len, off);
-}
-
-int libradosstriper::RadosStriper::stat(const std::string& soid, uint64_t *psize, time_t *pmtime)
-{
-  return rados_striper_impl->stat(soid, psize, pmtime);
-}
-
-int libradosstriper::RadosStriper::remove(const std::string& soid)
-{
-  return rados_striper_impl->remove(soid);
-}
-
-int libradosstriper::RadosStriper::trunc(const std::string& soid, uint64_t size)
-{
-  return rados_striper_impl->trunc(soid, size);
-}
-
-int libradosstriper::RadosStriper::aio_flush()
-{
-  return rados_striper_impl->aio_flush();
-}
-
-libradosstriper::MultiAioCompletion* libradosstriper::RadosStriper::multi_aio_create_completion()
-{
-  MultiAioCompletionImpl *c = new MultiAioCompletionImpl;
-  return new MultiAioCompletion(c);
-}
-
-libradosstriper::MultiAioCompletion*
-libradosstriper::RadosStriper::multi_aio_create_completion(void *cb_arg,
-							   librados::callback_t cb_complete,
-							   librados::callback_t cb_safe)
-{
-  MultiAioCompletionImpl *c;
-  int r = rados_striper_multi_aio_create_completion(cb_arg, cb_complete, cb_safe, (void**)&c);
-  assert(r == 0);
-  return new MultiAioCompletion(c);
-}
-
-///////////////////////////// C API //////////////////////////////
-
-extern "C" int rados_striper_create(rados_ioctx_t ioctx,
-				    rados_striper_t *striper)
-{
-  librados::IoCtx ctx;
-  librados::IoCtx::from_rados_ioctx_t(ioctx, ctx);
-  libradosstriper::RadosStriper striperp;
-  int rc = libradosstriper::RadosStriper::striper_create(ctx, &striperp);
-  if (0 == rc)
-    libradosstriper::RadosStriper::to_rados_striper_t(striperp, striper);
-  return rc;
-}
-
-extern "C" void rados_striper_destroy(rados_striper_t striper)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  impl->put();
-}
-
-extern "C" int rados_striper_set_object_layout_stripe_unit(rados_striper_t striper,
-							   unsigned int stripe_unit)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->setObjectLayoutStripeUnit(stripe_unit);
-}
-
-extern "C" int rados_striper_set_object_layout_stripe_count(rados_striper_t striper,
-							    unsigned int stripe_count)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->setObjectLayoutStripeCount(stripe_count);
-}
-
-extern "C" int rados_striper_set_object_layout_object_size(rados_striper_t striper,
-							   unsigned int object_size)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->setObjectLayoutObjectSize(object_size);
-}
-
-extern "C" int rados_striper_write(rados_striper_t striper,
-				   const char *soid,
-				   const char *buf,
-				   size_t len,
-				   uint64_t off)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->write(soid, bl, len, off);
-}
-
-extern "C" int rados_striper_write_full(rados_striper_t striper,
-					const char *soid,
-					const char *buf,
-					size_t len)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->write_full(soid, bl);
-}
-
-
-extern "C" int rados_striper_append(rados_striper_t striper,
-				    const char *soid,
-				    const char *buf,
-				    size_t len)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->append(soid, bl, len);
-}
-
-extern "C" int rados_striper_read(rados_striper_t striper,
-				  const char *soid,
-				  char *buf,
-				  size_t len,
-				  uint64_t off)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bufferptr bp = buffer::create_static(len, buf);
-  bl.push_back(bp);
-  int ret = impl->read(soid, &bl, len, off);
-  if (ret >= 0) {
-    if (bl.length() > len)
-      return -ERANGE;
-    if (bl.c_str() != buf)
-      bl.copy(0, bl.length(), buf);
-    ret = bl.length();    // hrm :/
-  }
-  return ret;
-}
-
-extern "C" int rados_striper_remove(rados_striper_t striper, const char* soid)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->remove(soid);
-}
-
-extern "C" int rados_striper_trunc(rados_striper_t striper, const char* soid, uint64_t size)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->trunc(soid, size);
-}
-
-extern "C" int rados_striper_getxattr(rados_striper_t striper,
-				      const char *oid,
-				      const char *name,
-				      char *buf,
-				      size_t len)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  object_t obj(oid);
-  bufferlist bl;
-  int ret = impl->getxattr(oid, name, bl);
-  if (ret >= 0) {
-    if (bl.length() > len)
-      return -ERANGE;
-    bl.copy(0, bl.length(), buf);
-    ret = bl.length();
-  }
-  return ret;
-}
-
-extern "C" int rados_striper_setxattr(rados_striper_t striper,
-				      const char *oid,
-				      const char *name,
-				      const char *buf,
-				      size_t len)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  object_t obj(oid);
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->setxattr(obj, name, bl);
-}
-
-extern "C" int rados_striper_rmxattr(rados_striper_t striper,
-				     const char *oid,
-				     const char *name)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  object_t obj(oid);
-  return impl->rmxattr(obj, name);
-}
-
-extern "C" int rados_striper_getxattrs(rados_striper_t striper,
-				       const char *oid,
-				       rados_xattrs_iter_t *iter)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  object_t obj(oid);
-  librados::RadosXattrsIter *it = new librados::RadosXattrsIter();
-  if (!it)
-    return -ENOMEM;
-  int ret = impl->getxattrs(obj, it->attrset);
-  if (ret) {
-    delete it;
-    return ret;
-  }
-  it->i = it->attrset.begin();
-  librados::RadosXattrsIter **iret = (librados::RadosXattrsIter**)iter;
-  *iret = it;
-  *iter = it;
-  return 0;
-}
-
-extern "C" int rados_striper_getxattrs_next(rados_xattrs_iter_t iter,
-					    const char **name,
-					    const char **val,
-					    size_t *len)
-{
-  return rados_getxattrs_next(iter, name, val, len);
-}
-
-extern "C" void rados_striper_getxattrs_end(rados_xattrs_iter_t iter)
-{
-  return rados_getxattrs_end(iter);
-}
-
-extern "C" int rados_striper_stat(rados_striper_t striper,
-				  const char* soid,
-				  uint64_t *psize,
-				  time_t *pmtime)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->stat(soid, psize, pmtime);
-}
-
-extern "C" int rados_striper_multi_aio_create_completion(void *cb_arg,
-							 rados_callback_t cb_complete,
-							 rados_callback_t cb_safe,
-							 rados_striper_multi_completion_t *pc)
-{
-  libradosstriper::MultiAioCompletionImpl *c = new libradosstriper::MultiAioCompletionImpl;
-  if (cb_complete)
-    c->set_complete_callback(cb_arg, cb_complete);
-  if (cb_safe)
-    c->set_safe_callback(cb_arg, cb_safe);
-  *pc = c;
-  return 0;
-}
-
-extern "C" void rados_striper_multi_aio_wait_for_complete(rados_striper_multi_completion_t c)
-{
-  ((libradosstriper::MultiAioCompletionImpl*)c)->wait_for_complete();
-}
-
-extern "C" void rados_striper_multi_aio_wait_for_safe(rados_striper_multi_completion_t c)
-{
-  ((libradosstriper::MultiAioCompletionImpl*)c)->wait_for_safe();
-}
-
-extern "C" int rados_striper_multi_aio_is_complete(rados_striper_multi_completion_t c)
-{
-  return ((libradosstriper::MultiAioCompletionImpl*)c)->is_complete();
-}
-
-extern "C" int rados_striper_multi_aio_is_safe(rados_striper_multi_completion_t c)
-{
-  return ((libradosstriper::MultiAioCompletionImpl*)c)->is_safe();
-}
-
-extern "C" void rados_striper_multi_aio_wait_for_complete_and_cb(rados_striper_multi_completion_t c)
-{
-  ((libradosstriper::MultiAioCompletionImpl*)c)->wait_for_complete_and_cb();
-}
-
-extern "C" void rados_striper_multi_aio_wait_for_safe_and_cb(rados_striper_multi_completion_t c)
-{
-  ((libradosstriper::MultiAioCompletionImpl*)c)->wait_for_safe_and_cb();
-}
-
-extern "C" int rados_striper_multi_aio_is_complete_and_cb(rados_striper_multi_completion_t c)
-{
-  return ((libradosstriper::MultiAioCompletionImpl*)c)->is_complete_and_cb();
-}
-
-extern "C" int rados_striper_multi_aio_is_safe_and_cb(rados_striper_multi_completion_t c)
-{
-  return ((libradosstriper::MultiAioCompletionImpl*)c)->is_safe_and_cb();
-}
-
-extern "C" int rados_striper_multi_aio_get_return_value(rados_striper_multi_completion_t c)
-{
-  return ((libradosstriper::MultiAioCompletionImpl*)c)->get_return_value();
-}
-
-extern "C" void rados_striper_multi_aio_release(rados_striper_multi_completion_t c)
-{
-  ((libradosstriper::MultiAioCompletionImpl*)c)->put();
-}
-
-extern "C" int rados_striper_aio_write(rados_striper_t striper,
-				       const char* soid,
-				       rados_completion_t completion,
-				       const char *buf,
-				       size_t len,
-				       uint64_t off)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->aio_write(soid, (librados::AioCompletionImpl*)completion, bl, len, off);
-}
-
-extern "C" int rados_striper_aio_append(rados_striper_t striper,
-					const char* soid,
-					rados_completion_t completion,
-					const char *buf,
-					size_t len)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->aio_append(soid, (librados::AioCompletionImpl*)completion, bl, len);
-}
-
-extern "C" int rados_striper_aio_write_full(rados_striper_t striper,
-					    const char* soid,
-					    rados_completion_t completion,
-					    const char *buf,
-					    size_t len)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  bufferlist bl;
-  bl.append(buf, len);
-  return impl->aio_write_full(soid, (librados::AioCompletionImpl*)completion, bl);
-}
-
-extern "C" int rados_striper_aio_read(rados_striper_t striper,
-				      const char *soid,
-				      rados_completion_t completion,
-				      char *buf,
-				      size_t len,
-				      uint64_t off)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  return impl->aio_read(soid, (librados::AioCompletionImpl*)completion, buf, len, off);
-}
-
-extern "C" void rados_striper_aio_flush(rados_striper_t striper)
-{
-  libradosstriper::RadosStriperImpl *impl = (libradosstriper::RadosStriperImpl *)striper;
-  impl->aio_flush();
-}
diff --git a/src/librbd/AioCompletion.cc b/src/librbd/AioCompletion.cc
index 3ff1223..86b5b50 100644
--- a/src/librbd/AioCompletion.cc
+++ b/src/librbd/AioCompletion.cc
@@ -11,10 +11,6 @@
 
 #include "librbd/AioCompletion.h"
 
-#ifdef WITH_LTTNG
-#include "tracing/librbd.h"
-#endif
-
 #define dout_subsys ceph_subsys_rbd
 #undef dout_prefix
 #define dout_prefix *_dout << "librbd::AioCompletion: "
@@ -34,16 +30,6 @@ namespace librbd {
     lock.Unlock();
   }
 
-  int AioCompletion::wait_for_complete() {
-    tracepoint(librbd, aio_wait_for_complete_enter, this);
-    lock.Lock();
-    while (!done)
-      cond.Wait(lock);
-    lock.Unlock();
-    tracepoint(librbd, aio_wait_for_complete_exit, 0);
-    return 0;
-  }
-
   void AioCompletion::finalize(CephContext *cct, ssize_t rval)
   {
     ldout(cct, 20) << "AioCompletion::finalize() " << (void*)this << " rval " << rval << " read_buf " << (void*)read_buf
@@ -68,32 +54,6 @@ namespace librbd {
     }
   }
 
-  void AioCompletion::complete() {
-    tracepoint(librbd, aio_complete_enter, this, rval);
-    utime_t elapsed;
-    assert(lock.is_locked());
-    elapsed = ceph_clock_now(ictx->cct) - start_time;
-    switch (aio_type) {
-    case AIO_TYPE_READ:
-      ictx->perfcounter->tinc(l_librbd_aio_rd_latency, elapsed); break;
-    case AIO_TYPE_WRITE:
-      ictx->perfcounter->tinc(l_librbd_aio_wr_latency, elapsed); break;
-    case AIO_TYPE_DISCARD:
-      ictx->perfcounter->tinc(l_librbd_aio_discard_latency, elapsed); break;
-    case AIO_TYPE_FLUSH:
-      ictx->perfcounter->tinc(l_librbd_aio_flush_latency, elapsed); break;
-    default:
-      lderr(ictx->cct) << "completed invalid aio_type: " << aio_type << dendl;
-      break;
-    }
-    if (complete_cb) {
-      complete_cb(rbd_comp, complete_arg);
-    }
-    done = true;
-    cond.Signal();
-    tracepoint(librbd, aio_complete_exit);
-  }
-
   void AioCompletion::complete_request(CephContext *cct, ssize_t r)
   {
     ldout(cct, 20) << "AioCompletion::complete_request() "
@@ -115,26 +75,6 @@ namespace librbd {
     put_unlock();
   }
 
-  bool AioCompletion::is_complete() {
-    tracepoint(librbd, aio_is_complete_enter, this);
-    bool done;
-    {
-      Mutex::Locker l(lock);
-      done = this->done;
-    }
-    tracepoint(librbd, aio_is_complete_exit, done);
-    return done;
-  }
-
-  ssize_t AioCompletion::get_return_value() {
-    tracepoint(librbd, aio_get_return_value_enter, this);
-    lock.Lock();
-    ssize_t r = rval;
-    lock.Unlock();
-    tracepoint(librbd, aio_get_return_value_exit, r);
-    return r;
-  }
-
   void C_AioRead::finish(int r)
   {
     ldout(m_cct, 10) << "C_AioRead::finish() " << this << " r = " << r << dendl;
diff --git a/src/librbd/AioCompletion.h b/src/librbd/AioCompletion.h
index 58eec66..aaccefe 100644
--- a/src/librbd/AioCompletion.h
+++ b/src/librbd/AioCompletion.h
@@ -72,7 +72,13 @@ namespace librbd {
     ~AioCompletion() {
     }
 
-    int wait_for_complete();
+    int wait_for_complete() {
+      lock.Lock();
+      while (!done)
+	cond.Wait(lock);
+      lock.Unlock();
+      return 0;
+    }
 
     void add_request() {
       lock.Lock();
@@ -91,7 +97,29 @@ namespace librbd {
       start_time = ceph_clock_now(ictx->cct);
     }
 
-    void complete();
+    void complete() {
+      utime_t elapsed;
+      assert(lock.is_locked());
+      elapsed = ceph_clock_now(ictx->cct) - start_time;
+      switch (aio_type) {
+      case AIO_TYPE_READ:
+	ictx->perfcounter->tinc(l_librbd_aio_rd_latency, elapsed); break;
+      case AIO_TYPE_WRITE:
+	ictx->perfcounter->tinc(l_librbd_aio_wr_latency, elapsed); break;
+      case AIO_TYPE_DISCARD:
+	ictx->perfcounter->tinc(l_librbd_aio_discard_latency, elapsed); break;
+      case AIO_TYPE_FLUSH:
+	ictx->perfcounter->tinc(l_librbd_aio_flush_latency, elapsed); break;
+      default:
+	lderr(ictx->cct) << "completed invalid aio_type: " << aio_type << dendl;
+	break;
+      }
+      if (complete_cb) {
+	complete_cb(rbd_comp, complete_arg);
+      }
+      done = true;
+      cond.Signal();
+    }
 
     void set_complete_cb(void *cb_arg, callback_t cb) {
       complete_cb = cb;
@@ -100,9 +128,17 @@ namespace librbd {
 
     void complete_request(CephContext *cct, ssize_t r);
 
-    bool is_complete();
+    bool is_complete() {
+      Mutex::Locker l(lock);
+      return done;
+    }
 
-    ssize_t get_return_value();
+    ssize_t get_return_value() {
+      lock.Lock();
+      ssize_t r = rval;
+      lock.Unlock();
+      return r;
+    }
 
     void get() {
       lock.Lock();
diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc
index 77211d7..b5c2db6 100644
--- a/src/librbd/ImageCtx.cc
+++ b/src/librbd/ImageCtx.cc
@@ -261,10 +261,10 @@ namespace librbd {
 
   int ImageCtx::snap_set(string in_snap_name)
   {
-    snap_t in_snap_id = get_snap_id(in_snap_name);
-    if (in_snap_id != CEPH_NOSNAP) {
-      snap_id = in_snap_id;
+    map<string, SnapInfo>::iterator it = snaps_by_name.find(in_snap_name);
+    if (it != snaps_by_name.end()) {
       snap_name = in_snap_name;
+      snap_id = it->second.id;
       snap_exists = true;
       data_ctx.snap_set_read(snap_id);
       return 0;
@@ -282,40 +282,34 @@ namespace librbd {
 
   snap_t ImageCtx::get_snap_id(string in_snap_name) const
   {
-    map<string, snap_t>::const_iterator it =
-      snap_ids.find(in_snap_name);
-    if (it != snap_ids.end())
-      return it->second;
+    map<string, SnapInfo>::const_iterator it = snaps_by_name.find(in_snap_name);
+    if (it != snaps_by_name.end())
+      return it->second.id;
     return CEPH_NOSNAP;
   }
 
-  const SnapInfo* ImageCtx::get_snap_info(snap_t in_snap_id) const
+  int ImageCtx::get_snap_name(snapid_t in_snap_id, string *out_snap_name) const
   {
-    map<snap_t, SnapInfo>::const_iterator it =
-      snap_info.find(in_snap_id);
-    if (it != snap_info.end())
-      return &it->second;
-    return NULL;
-  }
+    map<string, SnapInfo>::const_iterator it;
 
-  int ImageCtx::get_snap_name(snap_t in_snap_id,
-			      string *out_snap_name) const
-  {
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info) {
-      *out_snap_name = info->name;
-      return 0;
+    for (it = snaps_by_name.begin(); it != snaps_by_name.end(); ++it) {
+      if (it->second.id == in_snap_id) {
+	*out_snap_name = it->first;
+	return 0;
+      }
     }
     return -ENOENT;
   }
 
-  int ImageCtx::get_parent_spec(snap_t in_snap_id,
-				parent_spec *out_pspec) const
+  int ImageCtx::get_parent_spec(snapid_t in_snap_id, parent_spec *out_pspec)
   {
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info) {
-      *out_pspec = info->parent.spec;
-      return 0;
+    map<string, SnapInfo>::iterator it;
+
+    for (it = snaps_by_name.begin(); it != snaps_by_name.end(); ++it) {
+      if (it->second.id == in_snap_id) {
+	*out_pspec = it->second.parent.spec;
+	return 0;
+      }
     }
     return -ENOENT;
   }
@@ -358,25 +352,24 @@ namespace librbd {
     return num_periods * stripe_count;
   }
 
-  int ImageCtx::is_snap_protected(snap_t in_snap_id,
-				  bool *is_protected) const
+  int ImageCtx::is_snap_protected(string in_snap_name, bool *is_protected) const
   {
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info) {
+    map<string, SnapInfo>::const_iterator it = snaps_by_name.find(in_snap_name);
+    if (it != snaps_by_name.end()) {
       *is_protected =
-	(info->protection_status == RBD_PROTECTION_STATUS_PROTECTED);
+	(it->second.protection_status == RBD_PROTECTION_STATUS_PROTECTED);
       return 0;
     }
     return -ENOENT;
   }
 
-  int ImageCtx::is_snap_unprotected(snap_t in_snap_id,
+  int ImageCtx::is_snap_unprotected(string in_snap_name,
 				    bool *is_unprotected) const
   {
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info) {
+    map<string, SnapInfo>::const_iterator it = snaps_by_name.find(in_snap_name);
+    if (it != snaps_by_name.end()) {
       *is_unprotected =
-	(info->protection_status == RBD_PROTECTION_STATUS_UNPROTECTED);
+	(it->second.protection_status == RBD_PROTECTION_STATUS_UNPROTECTED);
       return 0;
     }
     return -ENOENT;
@@ -388,9 +381,8 @@ namespace librbd {
 			  uint8_t protection_status)
   {
     snaps.push_back(id);
-    SnapInfo info(in_snap_name, in_size, features, parent, protection_status);
-    snap_info.insert(pair<snap_t, SnapInfo>(id, info));
-    snap_ids.insert(pair<string, snap_t>(in_snap_name, id));
+    SnapInfo info(id, in_size, features, parent, protection_status);
+    snaps_by_name.insert(pair<string, SnapInfo>(in_snap_name, info));
   }
 
   uint64_t ImageCtx::get_image_size(snap_t in_snap_id) const
@@ -398,12 +390,14 @@ namespace librbd {
     if (in_snap_id == CEPH_NOSNAP) {
       return size;
     }
-
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info) {
-      return info->size;
-    }
-    return 0;
+    string in_snap_name;
+    int r = get_snap_name(in_snap_id, &in_snap_name);
+    if (r < 0)
+      return 0;
+    map<string, SnapInfo>::const_iterator p = snaps_by_name.find(in_snap_name);
+    if (p == snaps_by_name.end())
+      return 0;
+    return p->second.size;
   }
 
   int ImageCtx::get_features(snap_t in_snap_id, uint64_t *out_features) const
@@ -412,56 +406,77 @@ namespace librbd {
       *out_features = features;
       return 0;
     }
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info) {
-      *out_features = info->features;
-      return 0;
-    }
-    return -ENOENT;
-  }
-
-  const parent_info* ImageCtx::get_parent_info(snap_t in_snap_id) const
-  {
-    if (in_snap_id == CEPH_NOSNAP)
-      return &parent_md;
-    const SnapInfo *info = get_snap_info(in_snap_id);
-    if (info)
-      return &info->parent;
-    return NULL;
+    string in_snap_name;
+    int r = get_snap_name(in_snap_id, &in_snap_name);
+    if (r < 0)
+      return r;
+    map<string, SnapInfo>::const_iterator p = snaps_by_name.find(in_snap_name);
+    if (p == snaps_by_name.end())
+      return -ENOENT;
+    *out_features = p->second.features;
+    return 0;
   }
 
   int64_t ImageCtx::get_parent_pool_id(snap_t in_snap_id) const
   {
-    const parent_info *info = get_parent_info(in_snap_id);
-    if (info)
-      return info->spec.pool_id;
-    return -1;
+    if (in_snap_id == CEPH_NOSNAP) {
+      return parent_md.spec.pool_id;
+    }
+    string in_snap_name;
+    int r = get_snap_name(in_snap_id, &in_snap_name);
+    if (r < 0)
+      return -1;
+    map<string, SnapInfo>::const_iterator p = snaps_by_name.find(in_snap_name);
+    if (p == snaps_by_name.end())
+      return -1;
+    return p->second.parent.spec.pool_id;
   }
 
   string ImageCtx::get_parent_image_id(snap_t in_snap_id) const
   {
-    const parent_info *info = get_parent_info(in_snap_id);
-    if (info)
-      return info->spec.image_id;
-    return "";
+    if (in_snap_id == CEPH_NOSNAP) {
+      return parent_md.spec.image_id;
+    }
+    string in_snap_name;
+    int r = get_snap_name(in_snap_id, &in_snap_name);
+    if (r < 0)
+      return "";
+    map<string, SnapInfo>::const_iterator p = snaps_by_name.find(in_snap_name);
+    if (p == snaps_by_name.end())
+      return "";
+    return p->second.parent.spec.image_id;
   }
 
   uint64_t ImageCtx::get_parent_snap_id(snap_t in_snap_id) const
   {
-    const parent_info *info = get_parent_info(in_snap_id);
-    if (info)
-      return info->spec.snap_id;
-    return CEPH_NOSNAP;
+    if (in_snap_id == CEPH_NOSNAP) {
+      return parent_md.spec.snap_id;
+    }
+    string in_snap_name;
+    int r = get_snap_name(in_snap_id, &in_snap_name);
+    if (r < 0)
+      return CEPH_NOSNAP;
+    map<string, SnapInfo>::const_iterator p = snaps_by_name.find(in_snap_name);
+    if (p == snaps_by_name.end())
+      return CEPH_NOSNAP;
+    return p->second.parent.spec.snap_id;
   }
 
   int ImageCtx::get_parent_overlap(snap_t in_snap_id, uint64_t *overlap) const
   {
-    const parent_info *info = get_parent_info(in_snap_id);
-    if (info) {
-      *overlap = info->overlap;
+    if (in_snap_id == CEPH_NOSNAP) {
+      *overlap = parent_md.overlap;
       return 0;
     }
-    return -ENOENT;
+    string in_snap_name;
+    int r = get_snap_name(in_snap_id, &in_snap_name);
+    if (r < 0)
+      return r;
+    map<string, SnapInfo>::const_iterator p = snaps_by_name.find(in_snap_name);
+    if (p == snaps_by_name.end())
+      return -ENOENT;
+    *overlap = p->second.parent.overlap;
+    return 0;
   }
 
   void ImageCtx::aio_read_from_cache(object_t o, bufferlist *bl, size_t len,
@@ -569,15 +584,10 @@ namespace librbd {
     object_cacher->release_set(object_set);
     cache_lock.Unlock();
     int r = flush_cache();
-    if (r == -EBLACKLISTED) {
-      Mutex::Locker l(cache_lock);
-      lderr(cct) << "Blacklisted during flush!  Purging cache..." << dendl;
-      object_cacher->purge_set(object_set);
-    } else if (r) {
+    if (r)
       lderr(cct) << "flush_cache returned " << r << dendl;
-    }
     cache_lock.Lock();
-    loff_t unclean = object_cacher->release_set(object_set);
+    bool unclean = object_cacher->release_set(object_set);
     cache_lock.Unlock();
     if (unclean) {
       lderr(cct) << "could not release all objects from cache: "
diff --git a/src/librbd/ImageCtx.h b/src/librbd/ImageCtx.h
index 2c56461..83ed044 100644
--- a/src/librbd/ImageCtx.h
+++ b/src/librbd/ImageCtx.h
@@ -38,8 +38,7 @@ namespace librbd {
     ::SnapContext snapc;
     std::vector<librados::snap_t> snaps; // this mirrors snapc.snaps, but is in
                                         // a format librados can understand
-    std::map<librados::snap_t, SnapInfo> snap_info;
-    std::map<std::string, librados::snap_t> snap_ids;
+    std::map<std::string, SnapInfo> snaps_by_name;
     uint64_t snap_id;
     bool snap_exists; // false if our snap_id was deleted
     // whether the image was opened read-only. cannot be changed after opening
@@ -107,15 +106,10 @@ namespace librbd {
     int snap_set(std::string in_snap_name);
     void snap_unset();
     librados::snap_t get_snap_id(std::string in_snap_name) const;
-    const SnapInfo* get_snap_info(librados::snap_t in_snap_id) const;
-    int get_snap_name(librados::snap_t in_snap_id,
-		      std::string *out_snap_name) const;
-    int get_parent_spec(librados::snap_t in_snap_id,
-			parent_spec *pspec) const;
-    int is_snap_protected(librados::snap_t in_snap_id,
-			  bool *is_protected) const;
-    int is_snap_unprotected(librados::snap_t in_snap_id,
-			    bool *is_unprotected) const;
+    int get_snap_name(snapid_t snap_id, std::string *out_snap_name) const;
+    int get_parent_spec(snapid_t snap_id, parent_spec *pspec);
+    int is_snap_protected(string in_snap_name, bool *is_protected) const;
+    int is_snap_unprotected(string in_snap_name, bool *is_unprotected) const;
 
     uint64_t get_current_size() const;
     uint64_t get_object_size() const;
@@ -131,7 +125,6 @@ namespace librbd {
     uint64_t get_image_size(librados::snap_t in_snap_id) const;
     int get_features(librados::snap_t in_snap_id,
 		     uint64_t *out_features) const;
-    const parent_info* get_parent_info(librados::snap_t in_snap_id) const;
     int64_t get_parent_pool_id(librados::snap_t in_snap_id) const;
     std::string get_parent_image_id(librados::snap_t in_snap_id) const;
     uint64_t get_parent_snap_id(librados::snap_t in_snap_id) const;
diff --git a/src/librbd/Makefile.am b/src/librbd/Makefile.am
index add7d8e..0a3600d 100644
--- a/src/librbd/Makefile.am
+++ b/src/librbd/Makefile.am
@@ -10,11 +10,6 @@ librbd_la_LIBADD = \
 	$(LIBRADOS) $(LIBOSDC) \
 	libcls_rbd_client.la libcls_lock_client.la \
 	$(PTHREAD_LIBS) $(EXTRALIBS)
-
-if WITH_LTTNG
-librbd_la_LIBADD += $(LIBRBD_TP)
-endif
-
 librbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0
 if LINUX
 librbd_la_LDFLAGS += -export-symbols-regex '^rbd_.*'
diff --git a/src/librbd/SnapInfo.h b/src/librbd/SnapInfo.h
index fd97353..44dd4cf 100644
--- a/src/librbd/SnapInfo.h
+++ b/src/librbd/SnapInfo.h
@@ -13,14 +13,14 @@
 namespace librbd {
 
   struct SnapInfo {
-    std::string name;
+    librados::snap_t id;
     uint64_t size;
     uint64_t features;
     parent_info parent;
     uint8_t protection_status;
-    SnapInfo(std::string _name, uint64_t _size, uint64_t _features,
+    SnapInfo(librados::snap_t _id, uint64_t _size, uint64_t _features,
 	     parent_info _parent, uint8_t _protection_status) :
-      name(_name), size(_size), features(_features), parent(_parent),
+      id(_id), size(_size), features(_features), parent(_parent),
       protection_status(_protection_status) {}
   };
 }
diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc
index 8b4ea9e..cc1c7e7 100644
--- a/src/librbd/internal.cc
+++ b/src/librbd/internal.cc
@@ -419,7 +419,12 @@ namespace librbd {
     for (std::list<string>::const_iterator it = pools.begin();
 	 it != pools.end(); ++it) {
       IoCtx ioctx;
-      rados.ioctx_create(it->c_str(), ioctx);
+      r = rados.ioctx_create(it->c_str(), ioctx);
+      if (r < 0) {
+        lderr(cct) << "Error accessing child image pool " << *it << dendl;
+        return r;
+      }
+
       set<string> image_ids;
       int r = cls_client::get_children(&ioctx, RBD_CHILDREN,
 				       parent_spec, image_ids);
@@ -475,16 +480,16 @@ namespace librbd {
 			      snapid_t oursnap_id)
   {
     if (pspec.pool_id != -1) {
-      map<snap_t, SnapInfo>::iterator it;
-      for (it = ictx->snap_info.begin();
-	   it != ictx->snap_info.end(); ++it) {
+      map<string, SnapInfo>::iterator it;
+      for (it = ictx->snaps_by_name.begin();
+	   it != ictx->snaps_by_name.end(); ++it) {
 	// skip our snap id (if checking base image, CEPH_NOSNAP won't match)
-	if (it->first == oursnap_id)
+	if (it->second.id == oursnap_id)
 	  continue;
 	if (it->second.parent.spec == pspec)
 	  break;
       }
-      if (it == ictx->snap_info.end())
+      if (it == ictx->snaps_by_name.end())
 	return -ENOENT;
     }
     return 0;
@@ -569,7 +574,7 @@ namespace librbd {
       return -ENOENT;
 
     bool is_protected;
-    r = ictx->is_snap_protected(snap_id, &is_protected);
+    r = ictx->is_snap_protected(snap_name, &is_protected);
     if (r < 0)
       return r;
 
@@ -612,7 +617,7 @@ namespace librbd {
       return -ENOENT;
 
     bool is_unprotected;
-    r = ictx->is_snap_unprotected(snap_id, &is_unprotected);
+    r = ictx->is_snap_unprotected(snap_name, &is_unprotected);
     if (r < 0)
       return r;
 
@@ -664,11 +669,6 @@ namespace librbd {
 					  ictx->header_oid,
 					  snap_id,
 					  RBD_PROTECTION_STATUS_UNPROTECTED);
-    if (r < 0) {
-      lderr(ictx->cct) << "snap_unprotect: error setting unprotected status"
-		       << dendl;
-      goto reprotect_and_return_err;
-    }
     notify_change(ictx->md_ctx, ictx->header_oid, NULL, ictx);
     return 0;
 
@@ -695,11 +695,8 @@ reprotect_and_return_err:
       return r;
 
     RWLock::RLocker l(ictx->snap_lock);
-    snap_t snap_id = ictx->get_snap_id(snap_name);
-    if (snap_id == CEPH_NOSNAP)
-      return -ENOENT;
     bool is_unprotected;
-    r = ictx->is_snap_unprotected(snap_id, &is_unprotected);
+    r = ictx->is_snap_unprotected(snap_name, &is_unprotected);
     // consider both PROTECTED or UNPROTECTING to be 'protected',
     // since in either state they can't be deleted
     *is_protected = !is_unprotected;
@@ -978,7 +975,7 @@ reprotect_and_return_err:
     p_imctx->snap_lock.get_read();
     p_imctx->get_features(p_imctx->snap_id, &p_features);
     size = p_imctx->get_image_size(p_imctx->snap_id);
-    p_imctx->is_snap_protected(p_imctx->snap_id, &snap_protected);
+    p_imctx->is_snap_protected(p_imctx->snap_name, &snap_protected);
     p_imctx->snap_lock.put_read();
     p_imctx->md_lock.put_read();
 
@@ -1030,7 +1027,7 @@ reprotect_and_return_err:
 
     if (r == 0) {
       p_imctx->snap_lock.get_read();
-      r = p_imctx->is_snap_protected(p_imctx->snap_id, &snap_protected);
+      r = p_imctx->is_snap_protected(p_imctx->snap_name, &snap_protected);
       p_imctx->snap_lock.put_read();
     }
     if (r < 0 || !snap_protected) {
@@ -1268,7 +1265,6 @@ reprotect_and_return_err:
     if (r < 0) {
       lderr(ictx->cct) << "error opening parent image: " << cpp_strerror(r)
 		       << dendl;
-      close_image(ictx->parent);
       ictx->parent = NULL;
       return r;
     }
@@ -1514,23 +1510,20 @@ reprotect_and_return_err:
     ldout(cct, 20) << "resize " << ictx << " " << ictx->size << " -> "
 		   << size << dendl;
 
-    if (ictx->read_only) {
+    if (ictx->read_only)
       return -EROFS;
-    }
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     RWLock::WLocker l(ictx->md_lock);
     if (size < ictx->size && ictx->object_cacher) {
       // need to invalidate since we're deleting objects, and
       // ObjectCacher doesn't track non-existent objects
       r = ictx->invalidate_cache();
-      if (r < 0) {
+      if (r < 0)
 	return r;
-      }
     }
     resize_helper(ictx, size, prog_ctx);
 
@@ -1550,11 +1543,11 @@ reprotect_and_return_err:
     bufferlist bl, bl2;
 
     RWLock::RLocker l(ictx->snap_lock);
-    for (map<snap_t, SnapInfo>::iterator it = ictx->snap_info.begin();
-	 it != ictx->snap_info.end(); ++it) {
+    for (map<string, SnapInfo>::iterator it = ictx->snaps_by_name.begin();
+	 it != ictx->snaps_by_name.end(); ++it) {
       snap_info_t info;
-      info.name = it->second.name;
-      info.id = it->first;
+      info.name = it->first;
+      info.id = it->second.id;
       info.size = it->second.size;
       snaps.push_back(info);
     }
@@ -1571,7 +1564,7 @@ reprotect_and_return_err:
       return r;
 
     RWLock::RLocker l(ictx->snap_lock);
-    return ictx->get_snap_id(snap_name) != CEPH_NOSNAP;
+    return ictx->snaps_by_name.count(snap_name);
   }
 
 
@@ -1794,8 +1787,7 @@ reprotect_and_return_err:
 	}
 
 	ictx->snaps.clear();
-	ictx->snap_info.clear();
-	ictx->snap_ids.clear();
+	ictx->snaps_by_name.clear();
 	for (size_t i = 0; i < new_snapc.snaps.size(); ++i) {
 	  uint64_t features = ictx->old_format ? 0 : snap_features[i];
 	  uint8_t protection_status = ictx->old_format ?
@@ -2680,9 +2672,8 @@ reprotect_and_return_err:
 
     uint64_t mylen = len;
     int r = clip_io(ictx, off, &mylen);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     Context *ctx = new C_SafeCond(&mylock, &cond, &done, &ret);
     AioCompletion *c = aio_create_completion_internal(ctx, rbd_ctx_cb);
@@ -2698,9 +2689,8 @@ reprotect_and_return_err:
       cond.Wait(mylock);
     mylock.Unlock();
 
-    if (ret < 0) {
+    if (ret < 0)
       return ret;
-    }
 
     elapsed = ceph_clock_now(ictx->cct) - start_time;
     ictx->perfcounter->tinc(l_librbd_wr_latency, elapsed);
@@ -2735,9 +2725,8 @@ reprotect_and_return_err:
       cond.Wait(mylock);
     mylock.Unlock();
 
-    if (ret < 0) {
+    if (ret < 0)
       return ret;
-    }
 
     elapsed = ceph_clock_now(ictx->cct) - start_time;
     ictx->perfcounter->inc(l_librbd_discard_latency, elapsed);
@@ -2853,9 +2842,8 @@ reprotect_and_return_err:
     ldout(cct, 20) << "aio_flush " << ictx << " completion " << c <<  dendl;
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     ictx->user_flushed();
 
@@ -2884,9 +2872,8 @@ reprotect_and_return_err:
     ldout(cct, 20) << "flush " << ictx << dendl;
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     ictx->user_flushed();
     r = _flush(ictx);
@@ -2917,13 +2904,11 @@ reprotect_and_return_err:
     ldout(cct, 20) << "invalidate_cache " << ictx << dendl;
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     RWLock::WLocker l(ictx->md_lock);
-    r = ictx->invalidate_cache();
-    return r;
+    return ictx->invalidate_cache();
   }
 
   int aio_write(ImageCtx *ictx, uint64_t off, size_t len, const char *buf,
@@ -2934,15 +2919,13 @@ reprotect_and_return_err:
 		   << len << " buf = " << (void*)buf << dendl;
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     uint64_t mylen = len;
     r = clip_io(ictx, off, &mylen);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     ictx->snap_lock.get_read();
     snapid_t snap_id = ictx->snap_id;
@@ -2953,9 +2936,8 @@ reprotect_and_return_err:
     ictx->parent_lock.put_read();
     ictx->snap_lock.put_read();
 
-    if (snap_id != CEPH_NOSNAP || ictx->read_only) {
+    if (snap_id != CEPH_NOSNAP || ictx->read_only)
       return -EROFS;
-    }
 
     ldout(cct, 20) << "  parent overlap " << overlap << dendl;
 
@@ -3018,14 +3000,12 @@ reprotect_and_return_err:
 		   << len << dendl;
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     r = clip_io(ictx, off, &len);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     // TODO: check for snap
     ictx->snap_lock.get_read();
@@ -3037,9 +3017,8 @@ reprotect_and_return_err:
     ictx->parent_lock.put_read();
     ictx->snap_lock.put_read();
 
-    if (snap_id != CEPH_NOSNAP || ictx->read_only) {
+    if (snap_id != CEPH_NOSNAP || ictx->read_only)
       return -EROFS;
-    }
 
     // map
     vector<ObjectExtent> extents;
@@ -3122,9 +3101,8 @@ reprotect_and_return_err:
     ldout(ictx->cct, 20) << "aio_read " << ictx << " completion " << c << " " << image_extents << dendl;
 
     int r = ictx_check(ictx);
-    if (r < 0) {
+    if (r < 0)
       return r;
-    }
 
     ictx->snap_lock.get_read();
     snap_t snap_id = ictx->snap_id;
@@ -3139,9 +3117,8 @@ reprotect_and_return_err:
 	 ++p) {
       uint64_t len = p->second;
       r = clip_io(ictx, p->first, &len);
-      if (r < 0) {
+      if (r < 0)
 	return r;
-      }
       if (len == 0)
 	continue;
 
diff --git a/src/librbd/librbd.cc b/src/librbd/librbd.cc
index cde6dd9..658f24b 100644
--- a/src/librbd/librbd.cc
+++ b/src/librbd/librbd.cc
@@ -6,7 +6,7 @@
  * Copyright (C) 2011 New Dream Network
  *
  * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
+ * modify it under the terms of the GNU General Public
  * License version 2.1, as published by the Free Software
  * Foundation.	See file COPYING.
  *
@@ -34,10 +34,6 @@
 #include <string>
 #include <vector>
 
-#ifdef WITH_LTTNG
-#include "tracing/librbd.h"
-#endif
-
 #define dout_subsys ceph_subsys_rbd
 #undef dout_prefix
 #define dout_prefix *_dout << "librbd: "
@@ -95,16 +91,12 @@ namespace librbd {
 		const char *snap_name)
   {
     ImageCtx *ictx = new ImageCtx(name, "", snap_name, io_ctx, false);
-    tracepoint(librbd, open_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str(), ictx->snap_name.c_str(), ictx->read_only);
 
     int r = librbd::open_image(ictx);
-    if (r < 0) {
-      tracepoint(librbd, open_image_exit, r);
+    if (r < 0)
       return r;
-    }
 
     image.ctx = (image_ctx_t) ictx;
-    tracepoint(librbd, open_image_exit, 0);
     return 0;
   }
 
@@ -112,45 +104,32 @@ namespace librbd {
 			  const char *snap_name)
   {
     ImageCtx *ictx = new ImageCtx(name, "", snap_name, io_ctx, true);
-    tracepoint(librbd, open_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str(), ictx->snap_name.c_str(), ictx->read_only);
 
     int r = librbd::open_image(ictx);
-    if (r < 0) {
-      tracepoint(librbd, open_image_exit, r);
+    if (r < 0)
       return r;
-    }
 
     image.ctx = (image_ctx_t) ictx;
-    tracepoint(librbd, open_image_exit, 0);
     return 0;
   }
 
   int RBD::create(IoCtx& io_ctx, const char *name, uint64_t size, int *order)
   {
-    tracepoint(librbd, create_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name, size, *order);
-    int r = librbd::create(io_ctx, name, size, order);
-    tracepoint(librbd, create_exit, r, *order);
-    return r;
+    return librbd::create(io_ctx, name, size, order);
   }
 
   int RBD::create2(IoCtx& io_ctx, const char *name, uint64_t size,
 		   uint64_t features, int *order)
   {
-    tracepoint(librbd, create2_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name, size, features, *order);
-    int r = librbd::create(io_ctx, name, size, false, features, order, 0, 0);
-    tracepoint(librbd, create2_exit, r, *order);
-    return r;
+    return librbd::create(io_ctx, name, size, false, features, order, 0, 0);
   }
 
   int RBD::create3(IoCtx& io_ctx, const char *name, uint64_t size,
 		   uint64_t features, int *order, uint64_t stripe_unit,
 		   uint64_t stripe_count)
   {
-    tracepoint(librbd, create3_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name, size, features, *order, stripe_unit, stripe_count);
-    int r = librbd::create(io_ctx, name, size, false, features, order,
+    return librbd::create(io_ctx, name, size, false, features, order,
 			  stripe_unit, stripe_count);
-    tracepoint(librbd, create3_exit, r, *order);
-    return r;
   }
 
   int RBD::clone(IoCtx& p_ioctx, const char *p_name, const char *p_snap_name,
@@ -171,19 +150,15 @@ namespace librbd {
 
   int RBD::remove(IoCtx& io_ctx, const char *name)
   {
-    tracepoint(librbd, remove_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name);
     librbd::NoOpProgressContext prog_ctx;
     int r = librbd::remove(io_ctx, name, prog_ctx);
-    tracepoint(librbd, remove_exit, r);
     return r;
   }
 
   int RBD::remove_with_progress(IoCtx& io_ctx, const char *name,
 				ProgressContext& pctx)
   {
-    tracepoint(librbd, remove_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name);
     int r = librbd::remove(io_ctx, name, pctx);
-    tracepoint(librbd, remove_exit, r);
     return r;
   }
 
@@ -195,9 +170,7 @@ namespace librbd {
 
   int RBD::rename(IoCtx& src_io_ctx, const char *srcname, const char *destname)
   {
-    tracepoint(librbd, rename_enter, src_io_ctx.get_pool_name().c_str(), src_io_ctx.get_id(), srcname, destname);
     int r = librbd::rename(src_io_ctx, srcname, destname);
-    tracepoint(librbd, rename_exit, r);
     return r;
   }
 
@@ -246,29 +219,21 @@ namespace librbd {
   {
     if (ctx) {
       ImageCtx *ictx = (ImageCtx *)ctx;
-      tracepoint(librbd, close_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str());
       close_image(ictx);
-      tracepoint(librbd, close_image_exit);
     }
   }
 
   int Image::resize(uint64_t size)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, resize_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, size);
     librbd::NoOpProgressContext prog_ctx;
-    int r = librbd::resize(ictx, size, prog_ctx);
-    tracepoint(librbd, resize_exit, r);
-    return r;
+    return librbd::resize(ictx, size, prog_ctx);
   }
 
   int Image::resize_with_progress(uint64_t size, librbd::ProgressContext& pctx)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, resize_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, size);
-    int r = librbd::resize(ictx, size, pctx);
-    tracepoint(librbd, resize_exit, r);
-    return r;
+    return librbd::resize(ictx, size, pctx);
   }
 
   int Image::stat(image_info_t& info, size_t infosize)
@@ -324,42 +289,30 @@ namespace librbd {
   int Image::copy(IoCtx& dest_io_ctx, const char *destname)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, copy_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, destname);
     librbd::NoOpProgressContext prog_ctx;
-    int r = librbd::copy(ictx, dest_io_ctx, destname, prog_ctx);
-    tracepoint(librbd, copy_exit, r);
-    return r;
+    return librbd::copy(ictx, dest_io_ctx, destname, prog_ctx);
   }
 
   int Image::copy2(Image& dest)
   {
     ImageCtx *srcctx = (ImageCtx *)ctx;
     ImageCtx *destctx = (ImageCtx *)dest.ctx;
-    tracepoint(librbd, copy2_enter, srcctx, srcctx->name.c_str(), srcctx->snap_name.c_str(), srcctx->read_only, destctx, destctx->name.c_str(), destctx->snap_name.c_str(), destctx->read_only);
     librbd::NoOpProgressContext prog_ctx;
-    int r = librbd::copy(srcctx, destctx, prog_ctx);
-    tracepoint(librbd, copy2_exit, r);
-    return r;
+    return librbd::copy(srcctx, destctx, prog_ctx);
   }
 
   int Image::copy_with_progress(IoCtx& dest_io_ctx, const char *destname,
 				librbd::ProgressContext &pctx)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, copy_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, destname);
-    int r = librbd::copy(ictx, dest_io_ctx, destname, pctx);
-    tracepoint(librbd, copy_exit, r);
-    return r;
+    return librbd::copy(ictx, dest_io_ctx, destname, pctx);
   }
 
   int Image::copy_with_progress2(Image& dest, librbd::ProgressContext &pctx)
   {
     ImageCtx *srcctx = (ImageCtx *)ctx;
     ImageCtx *destctx = (ImageCtx *)dest.ctx;
-    tracepoint(librbd, copy2_enter, srcctx, srcctx->name.c_str(), srcctx->snap_name.c_str(), srcctx->read_only, destctx, destctx->name.c_str(), destctx->snap_name.c_str(), destctx->read_only);
-    int r = librbd::copy(srcctx, destctx, pctx);
-    tracepoint(librbd, copy2_exit, r);
-    return r;
+    return librbd::copy(srcctx, destctx, pctx);
   }
 
   int Image::flatten()
@@ -477,12 +430,9 @@ namespace librbd {
   ssize_t Image::read(uint64_t ofs, size_t len, bufferlist& bl)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, read_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, ofs, len);
     bufferptr ptr(len);
     bl.push_back(ptr);
-    int r = librbd::read(ictx, ofs, len, bl.c_str());
-    tracepoint(librbd, read_exit, r);
-    return r;
+    return librbd::read(ictx, ofs, len, bl.c_str());
   }
 
   int64_t Image::read_iterate(uint64_t ofs, size_t len,
@@ -516,86 +466,58 @@ namespace librbd {
   ssize_t Image::write(uint64_t ofs, size_t len, bufferlist& bl)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, write_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, ofs, len, bl.length() < len ? NULL : bl.c_str());
-    if (bl.length() < len) {
-      tracepoint(librbd, write_exit, -EINVAL);
+    if (bl.length() < len)
       return -EINVAL;
-    }
-    int r = librbd::write(ictx, ofs, len, bl.c_str());
-    tracepoint(librbd, write_exit, r);
-    return r;
+    return librbd::write(ictx, ofs, len, bl.c_str());
   }
 
   int Image::discard(uint64_t ofs, uint64_t len)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, discard_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, ofs, len);
-    int r = librbd::discard(ictx, ofs, len);
-    tracepoint(librbd, discard_exit, r);
-    return r;
+    return librbd::discard(ictx, ofs, len);
   }
 
   int Image::aio_write(uint64_t off, size_t len, bufferlist& bl,
 		       RBD::AioCompletion *c)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, aio_write_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, bl.length() < len ? NULL : bl.c_str(), c->pc);
-    if (bl.length() < len) {
-      tracepoint(librbd, aio_write_exit, -EINVAL);
+    if (bl.length() < len)
       return -EINVAL;
-    }
-    int r = librbd::aio_write(ictx, off, len, bl.c_str(),
+    return librbd::aio_write(ictx, off, len, bl.c_str(),
 			     (librbd::AioCompletion *)c->pc);
-    tracepoint(librbd, aio_write_exit, r);
-    return r;
   }
 
   int Image::aio_discard(uint64_t off, uint64_t len, RBD::AioCompletion *c)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, aio_discard_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, c->pc);
-    int r = librbd::aio_discard(ictx, off, len, (librbd::AioCompletion *)c->pc);
-    tracepoint(librbd, aio_discard_exit, r);
-    return r;
+    return librbd::aio_discard(ictx, off, len, (librbd::AioCompletion *)c->pc);
   }
 
   int Image::aio_read(uint64_t off, size_t len, bufferlist& bl,
 		      RBD::AioCompletion *c)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, aio_read_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, bl.c_str(), c->pc);
     ldout(ictx->cct, 10) << "Image::aio_read() buf=" << (void *)bl.c_str() << "~"
 			 << (void *)(bl.c_str() + len - 1) << dendl;
-    int r = librbd::aio_read(ictx, off, len, NULL, &bl, (librbd::AioCompletion *)c->pc);
-    tracepoint(librbd, aio_read_exit, r);
-    return r;
+    return librbd::aio_read(ictx, off, len, NULL, &bl, (librbd::AioCompletion *)c->pc);
   }
 
   int Image::flush()
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, flush_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only);
-    int r = librbd::flush(ictx);
-    tracepoint(librbd, flush_exit, r);
-    return r;
+    return librbd::flush(ictx);
   }
 
   int Image::aio_flush(RBD::AioCompletion *c)
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, aio_flush_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, c->pc);
-    int r = librbd::aio_flush(ictx, (librbd::AioCompletion *)c->pc);
-    tracepoint(librbd, aio_flush_exit, r);
-    return r;
+    return librbd::aio_flush(ictx, (librbd::AioCompletion *)c->pc);
   }
 
   int Image::invalidate_cache()
   {
     ImageCtx *ictx = (ImageCtx *)ctx;
-    tracepoint(librbd, invalidate_cache_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only);
-    int r = librbd::invalidate_cache(ictx);
-    tracepoint(librbd, invalidate_cache_exit, r);
-    return r;
+    return librbd::invalidate_cache(ictx);
   }
 
 } // namespace librbd
@@ -633,9 +555,6 @@ extern "C" int rbd_list(rados_ioctx_t p, char *names, size_t *size)
     return -ERANGE;
   }
 
-  if (!names) 
-    return -EINVAL;
-
   for (int i = 0; i < (int)cpp_names.size(); i++) {
     strcpy(names, cpp_names[i].c_str());
     names += strlen(names) + 1;
@@ -647,10 +566,7 @@ extern "C" int rbd_create(rados_ioctx_t p, const char *name, uint64_t size, int
 {
   librados::IoCtx io_ctx;
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
-  tracepoint(librbd, create_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name, size, *order);
-  int r = librbd::create(io_ctx, name, size, order);
-  tracepoint(librbd, create_exit, r, *order);
-  return r;
+  return librbd::create(io_ctx, name, size, order);
 }
 
 extern "C" int rbd_create2(rados_ioctx_t p, const char *name,
@@ -659,10 +575,7 @@ extern "C" int rbd_create2(rados_ioctx_t p, const char *name,
 {
   librados::IoCtx io_ctx;
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
-  tracepoint(librbd, create2_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name, size, features, *order);
-  int r = librbd::create(io_ctx, name, size, false, features, order, 0, 0);
-  tracepoint(librbd, create2_exit, r, *order);
-  return r;
+  return librbd::create(io_ctx, name, size, false, features, order, 0, 0);
 }
 
 extern "C" int rbd_create3(rados_ioctx_t p, const char *name,
@@ -672,11 +585,8 @@ extern "C" int rbd_create3(rados_ioctx_t p, const char *name,
 {
   librados::IoCtx io_ctx;
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
-  tracepoint(librbd, create3_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name, size, features, *order, stripe_unit, stripe_count);
-  int r = librbd::create(io_ctx, name, size, false, features, order,
+  return librbd::create(io_ctx, name, size, false, features, order,
 			stripe_unit, stripe_count);
-  tracepoint(librbd, create3_exit, r, *order);
-  return r;
 }
 
 extern "C" int rbd_clone(rados_ioctx_t p_ioctx, const char *p_name,
@@ -706,11 +616,8 @@ extern "C" int rbd_remove(rados_ioctx_t p, const char *name)
 {
   librados::IoCtx io_ctx;
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
-  tracepoint(librbd, remove_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name);
   librbd::NoOpProgressContext prog_ctx;
-  int r = librbd::remove(io_ctx, name, prog_ctx);
-  tracepoint(librbd, remove_exit, r);
-  return r;
+  return librbd::remove(io_ctx, name, prog_ctx);
 }
 
 extern "C" int rbd_remove_with_progress(rados_ioctx_t p, const char *name,
@@ -718,11 +625,8 @@ extern "C" int rbd_remove_with_progress(rados_ioctx_t p, const char *name,
 {
   librados::IoCtx io_ctx;
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
-  tracepoint(librbd, remove_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id(), name);
   librbd::CProgressContext prog_ctx(cb, cbdata);
-  int r = librbd::remove(io_ctx, name, prog_ctx);
-  tracepoint(librbd, remove_exit, r);
-  return r;
+  return librbd::remove(io_ctx, name, prog_ctx);
 }
 
 extern "C" int rbd_copy(rbd_image_t image, rados_ioctx_t dest_p,
@@ -785,10 +689,7 @@ extern "C" int rbd_rename(rados_ioctx_t src_p, const char *srcname,
 {
   librados::IoCtx src_io_ctx;
   librados::IoCtx::from_rados_ioctx_t(src_p, src_io_ctx);
-  tracepoint(librbd, rename_enter, src_io_ctx.get_pool_name().c_str(), src_io_ctx.get_id(), srcname, destname);
-  int r = librbd::rename(src_io_ctx, srcname, destname);
-  tracepoint(librbd, rename_exit, r);
-  return r;
+  return librbd::rename(src_io_ctx, srcname, destname);
 }
 
 extern "C" int rbd_open(rados_ioctx_t p, const char *name, rbd_image_t *image,
@@ -798,11 +699,9 @@ extern "C" int rbd_open(rados_ioctx_t p, const char *name, rbd_image_t *image,
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
   librbd::ImageCtx *ictx = new librbd::ImageCtx(name, "", snap_name, io_ctx,
 						false);
-  tracepoint(librbd, open_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str(), ictx->snap_name.c_str(), ictx->read_only);
   int r = librbd::open_image(ictx);
   if (r >= 0)
     *image = (rbd_image_t)ictx;
-  tracepoint(librbd, open_image_exit, r);
   return r;
 }
 
@@ -813,42 +712,32 @@ extern "C" int rbd_open_read_only(rados_ioctx_t p, const char *name,
   librados::IoCtx::from_rados_ioctx_t(p, io_ctx);
   librbd::ImageCtx *ictx = new librbd::ImageCtx(name, "", snap_name, io_ctx,
 						true);
-  tracepoint(librbd, open_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str(), ictx->snap_name.c_str(), ictx->read_only);
   int r = librbd::open_image(ictx);
   if (r >= 0)
     *image = (rbd_image_t)ictx;
-  tracepoint(librbd, open_image_exit, r);
   return r;
 }
 
 extern "C" int rbd_close(rbd_image_t image)
 {
   librbd::ImageCtx *ctx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, close_image_enter, ctx, ctx->name.c_str(), ctx->id.c_str());
   librbd::close_image(ctx);
-  tracepoint(librbd, close_image_exit);
   return 0;
 }
 
 extern "C" int rbd_resize(rbd_image_t image, uint64_t size)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, resize_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, size);
   librbd::NoOpProgressContext prog_ctx;
-  int r = librbd::resize(ictx, size, prog_ctx);
-  tracepoint(librbd, resize_exit, r);
-  return r;
+  return librbd::resize(ictx, size, prog_ctx);
 }
 
 extern "C" int rbd_resize_with_progress(rbd_image_t image, uint64_t size,
 					librbd_progress_fn_t cb, void *cbdata)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, resize_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, size);
   librbd::CProgressContext prog_ctx(cb, cbdata);
-  int r = librbd::resize(ictx, size, prog_ctx);
-  tracepoint(librbd, resize_exit, r);
-  return r;
+  return librbd::resize(ictx, size, prog_ctx);
 }
 
 extern "C" int rbd_stat(rbd_image_t image, rbd_image_info_t *info,
@@ -907,25 +796,16 @@ extern "C" int rbd_get_parent_info(rbd_image_t image,
   if (r < 0)
     return r;
 
-  if (parent_pool_name) {
-    if (p_pool_name.length() + 1 > ppool_namelen)
-      return -ERANGE;
-
-    strcpy(parent_pool_name, p_pool_name.c_str());
-  }
-  if (parent_name) {
-    if (p_name.length() + 1 > pnamelen)
-      return -ERANGE;
-
-    strcpy(parent_name, p_name.c_str());
-  }
-  if (parent_snap_name) {
-    if (p_snap_name.length() + 1 > psnap_namelen)
-      return -ERANGE;
-
-    strcpy(parent_snap_name, p_snap_name.c_str());
+  // compare against input bufferlen, leaving room for \0
+  if (p_pool_name.length() + 1 > ppool_namelen ||
+      p_name.length() + 1 > pnamelen ||
+      p_snap_name.length() + 1 > psnap_namelen) {
+    return -ERANGE;
   }
 
+  strcpy(parent_pool_name, p_pool_name.c_str());
+  strcpy(parent_name, p_name.c_str());
+  strcpy(parent_snap_name, p_snap_name.c_str());
   return 0;
 }
 
@@ -1162,10 +1042,7 @@ extern "C" ssize_t rbd_read(rbd_image_t image, uint64_t ofs, size_t len,
 			    char *buf)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, read_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, ofs, len);
-  int r = librbd::read(ictx, ofs, len, buf);
-  tracepoint(librbd, read_exit, r);
-  return r;
+  return librbd::read(ictx, ofs, len, buf);
 }
 
 extern "C" int64_t rbd_read_iterate(rbd_image_t image, uint64_t ofs, size_t len,
@@ -1201,19 +1078,13 @@ extern "C" ssize_t rbd_write(rbd_image_t image, uint64_t ofs, size_t len,
 			     const char *buf)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, write_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, ofs, len, buf);
-  int r = librbd::write(ictx, ofs, len, buf);
-  tracepoint(librbd, write_exit, r);
-  return r;
+  return librbd::write(ictx, ofs, len, buf);
 }
 
 extern "C" int rbd_discard(rbd_image_t image, uint64_t ofs, uint64_t len)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, discard_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, ofs, len);
-  int r = librbd::discard(ictx, ofs, len);
-  tracepoint(librbd, discard_exit, r);
-  return r;
+  return librbd::discard(ictx, ofs, len);
 }
 
 extern "C" int rbd_aio_create_completion(void *cb_arg,
@@ -1231,11 +1102,8 @@ extern "C" int rbd_aio_write(rbd_image_t image, uint64_t off, size_t len,
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
   librbd::RBD::AioCompletion *comp = (librbd::RBD::AioCompletion *)c;
-  tracepoint(librbd, aio_write_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, buf, comp->pc);
-  int r = librbd::aio_write(ictx, off, len, buf,
+  return librbd::aio_write(ictx, off, len, buf,
 			   (librbd::AioCompletion *)comp->pc);
-  tracepoint(librbd, aio_write_exit, r);
-  return r;
 }
 
 extern "C" int rbd_aio_discard(rbd_image_t image, uint64_t off, uint64_t len,
@@ -1243,10 +1111,7 @@ extern "C" int rbd_aio_discard(rbd_image_t image, uint64_t off, uint64_t len,
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
   librbd::RBD::AioCompletion *comp = (librbd::RBD::AioCompletion *)c;
-  tracepoint(librbd, aio_discard_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, comp->pc);
-  int r = librbd::aio_discard(ictx, off, len, (librbd::AioCompletion *)comp->pc);
-  tracepoint(librbd, aio_discard_exit, r);
-  return r;
+  return librbd::aio_discard(ictx, off, len, (librbd::AioCompletion *)comp->pc);
 }
 
 extern "C" int rbd_aio_read(rbd_image_t image, uint64_t off, size_t len,
@@ -1254,39 +1119,27 @@ extern "C" int rbd_aio_read(rbd_image_t image, uint64_t off, size_t len,
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
   librbd::RBD::AioCompletion *comp = (librbd::RBD::AioCompletion *)c;
-  tracepoint(librbd, aio_read_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, buf, comp->pc);
-  int r = librbd::aio_read(ictx, off, len, buf, NULL,
+  return librbd::aio_read(ictx, off, len, buf, NULL,
 			  (librbd::AioCompletion *)comp->pc);
-  tracepoint(librbd, aio_read_exit, r);
-  return r;
 }
 
 extern "C" int rbd_flush(rbd_image_t image)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, flush_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only);
-  int r = librbd::flush(ictx);
-  tracepoint(librbd, flush_exit, r);
-  return r;
+  return librbd::flush(ictx);
 }
 
 extern "C" int rbd_aio_flush(rbd_image_t image, rbd_completion_t c)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
   librbd::RBD::AioCompletion *comp = (librbd::RBD::AioCompletion *)c;
-  tracepoint(librbd, aio_flush_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, comp->pc);
-  int r = librbd::aio_flush(ictx, (librbd::AioCompletion *)comp->pc);
-  tracepoint(librbd, aio_flush_exit, r);
-  return r;
+  return librbd::aio_flush(ictx, (librbd::AioCompletion *)comp->pc);
 }
 
 extern "C" int rbd_invalidate_cache(rbd_image_t image)
 {
   librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
-  tracepoint(librbd, invalidate_cache_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only);
-  int r = librbd::invalidate_cache(ictx);
-  tracepoint(librbd, invalidate_cache_exit, r);
-  return r;
+  return librbd::invalidate_cache(ictx);
 }
 
 extern "C" int rbd_aio_is_complete(rbd_completion_t c)
diff --git a/src/libs3/GNUmakefile b/src/libs3/GNUmakefile
index f387e30..7a74ec3 100644
--- a/src/libs3/GNUmakefile
+++ b/src/libs3/GNUmakefile
@@ -91,11 +91,6 @@ ifndef DESTDIR
     DESTDIR := /usr
 endif
 
-# --------------------------------------------------------------------------
-# Compiler CC handling
-ifndef CC
-    CC := gcc
-endif
 
 # --------------------------------------------------------------------------
 # Acquire configuration information for libraries that libs3 depends upon
@@ -210,18 +205,18 @@ uninstall:
 $(BUILD)/obj/%.o: src/%.c
 	$(QUIET_ECHO) $@: Compiling object
 	@ mkdir -p $(dir $(BUILD)/dep/$<)
-	@ $(CC) $(CFLAGS) -M -MG -MQ $@ -DCOMPILINGDEPENDENCIES \
+	@ gcc $(CFLAGS) -M -MG -MQ $@ -DCOMPILINGDEPENDENCIES \
         -o $(BUILD)/dep/$(<:%.c=%.d) -c $<
 	@ mkdir -p $(dir $@)
-	$(VERBOSE_SHOW) $(CC) $(CFLAGS) -o $@ -c $<
+	$(VERBOSE_SHOW) gcc $(CFLAGS) -o $@ -c $<
 
 $(BUILD)/obj/%.do: src/%.c
 	$(QUIET_ECHO) $@: Compiling dynamic object
 	@ mkdir -p $(dir $(BUILD)/dep/$<)
-	@ $(CC) $(CFLAGS) -M -MG -MQ $@ -DCOMPILINGDEPENDENCIES \
+	@ gcc $(CFLAGS) -M -MG -MQ $@ -DCOMPILINGDEPENDENCIES \
         -o $(BUILD)/dep/$(<:%.c=%.dd) -c $<
 	@ mkdir -p $(dir $@)
-	$(VERBOSE_SHOW) $(CC) $(CFLAGS) -fpic -fPIC -o $@ -c $< 
+	$(VERBOSE_SHOW) gcc $(CFLAGS) -fpic -fPIC -o $@ -c $< 
 
 
 # --------------------------------------------------------------------------
@@ -241,7 +236,7 @@ LIBS3_SOURCES := acl.c bucket.c error_parser.c general.c \
 $(LIBS3_SHARED): $(LIBS3_SOURCES:%.c=$(BUILD)/obj/%.do)
 	$(QUIET_ECHO) $@: Building shared library
 	@ mkdir -p $(dir $@)
-	$(VERBOSE_SHOW) $(CC) -shared -Wl,-soname,libs3.so.$(LIBS3_VER_MAJOR) \
+	$(VERBOSE_SHOW) gcc -shared -Wl,-soname,libs3.so.$(LIBS3_VER_MAJOR) \
         -o $@ $^ $(LDFLAGS)
 
 $(LIBS3_STATIC): $(LIBS3_SOURCES:%.c=$(BUILD)/obj/%.o)
@@ -259,7 +254,7 @@ s3: $(BUILD)/bin/s3
 $(BUILD)/bin/s3: $(BUILD)/obj/s3.o $(LIBS3_SHARED)
 	$(QUIET_ECHO) $@: Building executable
 	@ mkdir -p $(dir $@)
-	$(VERBOSE_SHOW) $(CC) -o $@ $^ $(LDFLAGS)
+	$(VERBOSE_SHOW) gcc -o $@ $^ $(LDFLAGS)
 
 
 # --------------------------------------------------------------------------
@@ -283,7 +278,7 @@ test: $(BUILD)/bin/testsimplexml
 $(BUILD)/bin/testsimplexml: $(BUILD)/obj/testsimplexml.o $(LIBS3_STATIC)
 	$(QUIET_ECHO) $@: Building executable
 	@ mkdir -p $(dir $@)
-	$(VERBOSE_SHOW) $(CC) -o $@ $^ $(LIBXML2_LIBS)
+	$(VERBOSE_SHOW) gcc -o $@ $^ $(LIBXML2_LIBS)
 
 
 # --------------------------------------------------------------------------
diff --git a/src/libs3/inc/util.h b/src/libs3/inc/util.h
index 94ed0e7..4138ca7 100644
--- a/src/libs3/inc/util.h
+++ b/src/libs3/inc/util.h
@@ -58,7 +58,7 @@
 // 255 is the maximum bucket length
 #define MAX_URI_SIZE \
     ((sizeof("https:///") - 1) + S3_MAX_HOSTNAME_SIZE + 255 + 1 +       \
-     MAX_URLENCODED_KEY_SIZE + (sizeof("?torrent") - 1) + 1)
+     MAX_URLENCODED_KEY_SIZE + (sizeof("?torrent" - 1)) + 1)
 
 // Maximum size of a canonicalized resource
 #define MAX_CANONICALIZED_RESOURCE_SIZE \
diff --git a/src/libs3/src/general.c b/src/libs3/src/general.c
index 867ae5d..fb30c37 100644
--- a/src/libs3/src/general.c
+++ b/src/libs3/src/general.c
@@ -43,7 +43,7 @@ S3Status S3_initialize(const char *userAgentInfo, int flags,
 }
 
 
-void S3_deinitialize(void)
+void S3_deinitialize()
 {
     if (--initializeCountG) {
         return;
diff --git a/src/libs3/src/request.c b/src/libs3/src/request.c
index 53bda41..b267a5e 100644
--- a/src/libs3/src/request.c
+++ b/src/libs3/src/request.c
@@ -1109,7 +1109,7 @@ S3Status request_api_initialize(const char *userAgentInfo, int flags,
 }
 
 
-void request_api_deinitialize(void)
+void request_api_deinitialize()
 {
     pthread_mutex_destroy(&requestStackMutexG);
 
diff --git a/src/libs3/src/s3.c b/src/libs3/src/s3.c
index 11f54af..65acc52 100644
--- a/src/libs3/src/s3.c
+++ b/src/libs3/src/s3.c
@@ -141,7 +141,7 @@ static char putenvBufG[256];
 
 // util ----------------------------------------------------------------------
 
-static void S3_init(void)
+static void S3_init()
 {
     S3Status status;
     const char *hostname = getenv("S3_HOSTNAME");
@@ -155,7 +155,7 @@ static void S3_init(void)
 }
 
 
-static void printError(void)
+static void printError()
 {
     if (statusG < S3StatusErrorAccessDenied) {
         fprintf(stderr, "\nERROR: %s\n", S3_get_status_name(statusG));
@@ -376,7 +376,7 @@ static int growbuffer_append(growbuffer **gb, const char *data, int dataLen)
             }
             buf->size = 0;
             buf->start = 0;
-            if (*gb && (*gb)->prev) {
+            if (*gb) {
                 buf->prev = (*gb)->prev;
                 buf->next = *gb;
                 (*gb)->prev->next = buf;
@@ -675,7 +675,7 @@ static int convert_simple_acl(char *aclXml, char *ownerId,
     return 1;
 }
 
-static int should_retry(void)
+static int should_retry()
 {
     if (retriesG--) {
         // Sleep before next retry; start out with a 1 second sleep
diff --git a/src/log/Log.cc b/src/log/Log.cc
index 046774d..37bb4ef 100644
--- a/src/log/Log.cc
+++ b/src/log/Log.cc
@@ -31,22 +31,18 @@ static void log_on_exit(void *p)
   Log *l = *(Log **)p;
   if (l)
     l->flush();
-  delete (Log **)p;// Delete allocated pointer (not Log object, the pointer only!)
 }
 
 Log::Log(SubsystemMap *s)
   : m_indirect_this(NULL),
     m_subs(s),
-    m_queue_mutex_holder(0),
-    m_flush_mutex_holder(0),
     m_new(), m_recent(),
     m_fd(-1),
     m_syslog_log(-2), m_syslog_crash(-2),
     m_stderr_log(1), m_stderr_crash(-1),
     m_stop(false),
     m_max_new(DEFAULT_MAX_NEW),
-    m_max_recent(DEFAULT_MAX_RECENT),
-    m_inject_segv(false)
+    m_max_recent(DEFAULT_MAX_RECENT)
 {
   int ret;
 
@@ -144,10 +140,6 @@ void Log::set_stderr_level(int log, int crash)
 void Log::submit_entry(Entry *e)
 {
   pthread_mutex_lock(&m_queue_mutex);
-  m_queue_mutex_holder = pthread_self();
-
-  if (m_inject_segv)
-    *(int *)(0) = 0xdead;
 
   // wait for flush to catch up
   while (m_new.m_len > m_max_new)
@@ -155,7 +147,6 @@ void Log::submit_entry(Entry *e)
 
   m_new.enqueue(e);
   pthread_cond_signal(&m_cond_flusher);
-  m_queue_mutex_holder = 0;
   pthread_mutex_unlock(&m_queue_mutex);
 }
 
@@ -179,13 +170,10 @@ Entry *Log::create_entry(int level, int subsys)
 void Log::flush()
 {
   pthread_mutex_lock(&m_flush_mutex);
-  m_flush_mutex_holder = pthread_self();
   pthread_mutex_lock(&m_queue_mutex);
-  m_queue_mutex_holder = pthread_self();
   EntryQueue t;
   t.swap(m_new);
   pthread_cond_broadcast(&m_cond_loggers);
-  m_queue_mutex_holder = 0;
   pthread_mutex_unlock(&m_queue_mutex);
   _flush(&t, &m_recent, false);
 
@@ -194,7 +182,6 @@ void Log::flush()
     delete m_recent.dequeue();
   }
 
-  m_flush_mutex_holder = 0;
   pthread_mutex_unlock(&m_flush_mutex);
 }
 
@@ -266,15 +253,10 @@ void Log::_log_message(const char *s, bool crash)
 void Log::dump_recent()
 {
   pthread_mutex_lock(&m_flush_mutex);
-  m_flush_mutex_holder = pthread_self();
 
   pthread_mutex_lock(&m_queue_mutex);
-  m_queue_mutex_holder = pthread_self();
-
   EntryQueue t;
   t.swap(m_new);
-
-  m_queue_mutex_holder = 0;
   pthread_mutex_unlock(&m_queue_mutex);
   _flush(&t, &m_recent, false);
 
@@ -304,7 +286,6 @@ void Log::dump_recent()
 
   _log_message("--- end dump of recent events ---", true);
 
-  m_flush_mutex_holder = 0;
   pthread_mutex_unlock(&m_flush_mutex);
 }
 
@@ -331,36 +312,20 @@ void Log::stop()
 void *Log::entry()
 {
   pthread_mutex_lock(&m_queue_mutex);
-  m_queue_mutex_holder = pthread_self();
   while (!m_stop) {
     if (!m_new.empty()) {
-      m_queue_mutex_holder = 0;
       pthread_mutex_unlock(&m_queue_mutex);
       flush();
       pthread_mutex_lock(&m_queue_mutex);
-      m_queue_mutex_holder = pthread_self();
       continue;
     }
 
     pthread_cond_wait(&m_cond_flusher, &m_queue_mutex);
   }
-  m_queue_mutex_holder = 0;
   pthread_mutex_unlock(&m_queue_mutex);
   flush();
   return NULL;
 }
 
-bool Log::is_inside_log_lock()
-{
-  return
-    pthread_self() == m_queue_mutex_holder ||
-    pthread_self() == m_flush_mutex_holder;
-}
-
-void Log::inject_segv()
-{
-  m_inject_segv = true;
-}
-
 } // ceph::log::
 } // ceph::
diff --git a/src/log/Log.h b/src/log/Log.h
index 04cadd7..b5e16fd 100644
--- a/src/log/Log.h
+++ b/src/log/Log.h
@@ -26,9 +26,6 @@ class Log : private Thread
   pthread_cond_t m_cond_loggers;
   pthread_cond_t m_cond_flusher;
 
-  pthread_t m_queue_mutex_holder;
-  pthread_t m_flush_mutex_holder;
-
   EntryQueue m_new;    ///< new entries
   EntryQueue m_recent; ///< recent (less new) entries we've already written at low detail
 
@@ -42,8 +39,6 @@ class Log : private Thread
 
   int m_max_new, m_max_recent;
 
-  bool m_inject_segv;
-
   void *entry();
 
   void _flush(EntryQueue *q, EntryQueue *requeue, bool crash);
@@ -73,12 +68,6 @@ public:
 
   void start();
   void stop();
-
-  /// true if the log lock is held by our thread
-  bool is_inside_log_lock();
-
-  /// induce a segv on the next log event
-  void inject_segv();
 };
 
 }
diff --git a/src/log/test.cc b/src/log/test.cc
index 6e4704b..85e9ebc 100644
--- a/src/log/test.cc
+++ b/src/log/test.cc
@@ -187,25 +187,3 @@ TEST(Log, ManyGather)
   log.flush();
   log.stop();
 }
-
-void do_segv()
-{
-  SubsystemMap subs;
-  subs.add(1, "foo", 20, 1);
-  Log log(&subs);
-  log.start();
-  log.set_log_file("/tmp/big");
-  log.reopen_log_file();
-
-  log.inject_segv();
-  Entry *e = new Entry(ceph_clock_now(NULL), pthread_self(), 10, 1);
-  log.submit_entry(e);  // this should segv
-
-  log.flush();
-  log.stop();
-}
-
-TEST(Log, InternalSegv)
-{
-  ASSERT_DEATH(do_segv(), ".*");
-}
diff --git a/src/mds/Anchor.cc b/src/mds/Anchor.cc
new file mode 100644
index 0000000..e24c5f1
--- /dev/null
+++ b/src/mds/Anchor.cc
@@ -0,0 +1,64 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#include "mds/Anchor.h"
+
+#include "common/Formatter.h"
+
+void Anchor::encode(bufferlist &bl) const
+{
+  ENCODE_START(2, 2, bl);
+  ::encode(ino, bl);
+  ::encode(dirino, bl);
+  ::encode(dn_hash, bl);
+  ::encode(nref, bl);
+  ::encode(updated, bl);
+  ENCODE_FINISH(bl);
+}
+
+void Anchor::decode(bufferlist::iterator &bl)
+{
+  DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
+  ::decode(ino, bl);
+  ::decode(dirino, bl);
+  ::decode(dn_hash, bl);
+  ::decode(nref, bl);
+  ::decode(updated, bl);
+  DECODE_FINISH(bl);
+}
+
+void Anchor::dump(Formatter *f) const
+{
+  f->dump_unsigned("ino", ino);
+  f->dump_unsigned("dirino", dirino);
+  f->dump_unsigned("dn_hash", dn_hash);
+  f->dump_unsigned("num_ref", nref);
+  f->dump_unsigned("updated", updated);
+}
+
+void Anchor::generate_test_instances(list<Anchor*>& ls)
+{
+  ls.push_back(new Anchor);
+  ls.push_back(new Anchor);
+  ls.back()->ino = 1;
+  ls.back()->dirino = 2;
+  ls.back()->dn_hash = 3;
+  ls.back()->nref = 4;
+  ls.back()->updated = 5;
+}
+
+ostream& operator<<(ostream& out, const Anchor &a)
+{
+  return out << "a(" << a.ino << " " << a.dirino << "/" << a.dn_hash << " " << a.nref << " v" << a.updated << ")";
+}
diff --git a/src/mds/Anchor.h b/src/mds/Anchor.h
new file mode 100644
index 0000000..e8a6a64
--- /dev/null
+++ b/src/mds/Anchor.h
@@ -0,0 +1,55 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef CEPH_ANCHOR_H
+#define CEPH_ANCHOR_H
+
+#include <string>
+using std::string;
+
+#include "include/types.h"
+#include "mdstypes.h"
+#include "include/buffer.h"
+
+
+// identifies a anchor table mutation
+
+namespace ceph {
+  class Formatter;
+}
+
+// anchor type
+
+class Anchor {
+public:
+  inodeno_t ino;      // anchored ino
+  inodeno_t dirino;
+  __u32     dn_hash;
+  int       nref;     // reference count
+  version_t updated;
+
+  Anchor() : dn_hash(0), nref(0), updated(0) {}
+  Anchor(inodeno_t i, inodeno_t di, __u32 hash, int nr, version_t u) :
+    ino(i), dirino(di), dn_hash(hash), nref(nr), updated(u) { }
+  
+  void encode(bufferlist &bl) const;
+  void decode(bufferlist::iterator &bl);
+  void dump(Formatter *f) const;
+  static void generate_test_instances(list<Anchor*>& ls);
+};
+WRITE_CLASS_ENCODER(Anchor)
+
+ostream& operator<<(ostream& out, const Anchor &a);
+
+#endif
diff --git a/src/mds/AnchorClient.cc b/src/mds/AnchorClient.cc
new file mode 100644
index 0000000..30cbfd3
--- /dev/null
+++ b/src/mds/AnchorClient.cc
@@ -0,0 +1,129 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#include "AnchorClient.h"
+#include "MDSMap.h"
+#include "LogSegment.h"
+#include "MDS.h"
+#include "msg/Messenger.h"
+
+#include "messages/MMDSTableRequest.h"
+
+#include "common/config.h"
+
+#define dout_subsys ceph_subsys_mds
+#undef dout_prefix
+#define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".anchorclient "
+
+
+
+// LOOKUPS
+/* This function DOES NOT put the passed message before returning */
+void AnchorClient::handle_query_result(class MMDSTableRequest *m)
+{
+  dout(10) << "handle_anchor_reply " << *m << dendl;
+
+  inodeno_t ino;
+  vector<Anchor> trace;
+
+  bufferlist::iterator p = m->bl.begin();
+  ::decode(ino, p);
+  ::decode(trace, p);
+
+  if (!pending_lookup.count(ino))
+    return;
+
+  list<_pending_lookup> ls;
+  ls.swap(pending_lookup[ino]);
+  pending_lookup.erase(ino);
+
+  for (list<_pending_lookup>::iterator q = ls.begin(); q != ls.end(); ++q) {
+    *q->trace = trace;
+    if (q->onfinish) {
+      q->onfinish->complete(0);
+    }
+  }
+}
+
+void AnchorClient::resend_queries()
+{
+  // resend any pending lookups.
+  for (map<inodeno_t, list<_pending_lookup> >::iterator p = pending_lookup.begin();
+       p != pending_lookup.end();
+       ++p) {
+    dout(10) << "resending lookup on " << p->first << dendl;
+    _lookup(p->first);
+  }
+}
+
+void AnchorClient::lookup(inodeno_t ino, vector<Anchor>& trace, Context *onfinish)
+{
+  _pending_lookup l;
+  l.onfinish = onfinish;
+  l.trace = &trace;
+
+  bool isnew = (pending_lookup.count(ino) == 0);
+  pending_lookup[ino].push_back(l);
+  if (isnew)
+    _lookup(ino);
+}
+
+void AnchorClient::_lookup(inodeno_t ino)
+{
+  int ts = mds->mdsmap->get_tableserver();
+  if (mds->mdsmap->get_state(ts) < MDSMap::STATE_REJOIN)
+    return;
+  MMDSTableRequest *req = new MMDSTableRequest(table, TABLESERVER_OP_QUERY, 0, 0);
+  ::encode(ino, req->bl);
+  mds->send_message_mds(req, ts);
+}
+
+
+// FRIENDLY PREPARE
+
+void AnchorClient::prepare_create(inodeno_t ino, vector<Anchor>& trace, 
+				  version_t *patid, Context *onfinish)
+{
+  dout(10) << "prepare_create " << ino << " " << trace << dendl;
+  bufferlist bl;
+  __u32 op = TABLE_OP_CREATE;
+  ::encode(op, bl);
+  ::encode(ino, bl);
+  ::encode(trace, bl);
+  _prepare(bl, patid, 0, onfinish);
+}
+
+void AnchorClient::prepare_destroy(inodeno_t ino, 
+				   version_t *patid, Context *onfinish)
+{
+  dout(10) << "prepare_destroy " << ino << dendl;
+  bufferlist bl;
+  __u32 op = TABLE_OP_DESTROY;
+  ::encode(op, bl);
+  ::encode(ino, bl);
+  _prepare(bl, patid, 0, onfinish);
+}
+
+
+void AnchorClient::prepare_update(inodeno_t ino, vector<Anchor>& trace, 
+				  version_t *patid, Context *onfinish)
+{
+  dout(10) << "prepare_update " << ino << " " << trace << dendl;
+  bufferlist bl;
+  __u32 op = TABLE_OP_UPDATE;
+  ::encode(op, bl);
+  ::encode(ino, bl);
+  ::encode(trace, bl);
+  _prepare(bl, patid, 0, onfinish);
+}
diff --git a/src/mds/AnchorClient.h b/src/mds/AnchorClient.h
new file mode 100644
index 0000000..049cbcb
--- /dev/null
+++ b/src/mds/AnchorClient.h
@@ -0,0 +1,46 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef CEPH_ANCHORCLIENT_H
+#define CEPH_ANCHORCLIENT_H
+
+#include "MDSTableClient.h"
+#include "Anchor.h"
+
+class Context;
+class MDS;
+class LogSegment;
+
+class AnchorClient : public MDSTableClient {
+  // lookups
+  struct _pending_lookup {
+    vector<Anchor> *trace;
+    Context *onfinish;
+  };
+  map<inodeno_t, list<_pending_lookup> > pending_lookup;
+
+public:
+  AnchorClient(MDS *m) : MDSTableClient(m, TABLE_ANCHOR) {}
+  
+  void handle_query_result(MMDSTableRequest *m);
+  void lookup(inodeno_t ino, vector<Anchor>& trace, Context *onfinish);
+  void _lookup(inodeno_t ino);
+  void resend_queries();
+
+  void prepare_create(inodeno_t ino, vector<Anchor>& trace, version_t *atid, Context *onfinish);
+  void prepare_destroy(inodeno_t ino, version_t *atid, Context *onfinish);
+  void prepare_update(inodeno_t ino, vector<Anchor>& trace, version_t *atid, Context *onfinish);
+};
+
+#endif
diff --git a/src/mds/AnchorServer.cc b/src/mds/AnchorServer.cc
new file mode 100644
index 0000000..6f37e53
--- /dev/null
+++ b/src/mds/AnchorServer.cc
@@ -0,0 +1,351 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#include "AnchorServer.h"
+#include "MDS.h"
+#include "msg/Messenger.h"
+#include "messages/MMDSTableRequest.h"
+
+#define dout_subsys ceph_subsys_mds
+#undef dout_prefix
+#define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".anchorserver "
+
+// table
+
+void AnchorServer::reset_state()
+{
+  anchor_map.clear();
+  pending_create.clear();
+  pending_destroy.clear();
+  pending_update.clear();
+  pending_for_mds.clear();
+}
+
+void AnchorServer::dump()
+{
+  dout(7) << "dump v " << version << dendl;
+  for (map<inodeno_t, Anchor>::iterator it = anchor_map.begin();
+       it != anchor_map.end();
+       ++it)
+    dout(15) << "dump " << it->second << dendl;
+}
+
+void AnchorServer::dump(Formatter *f) const
+{
+  f->open_array_section("anchor map");
+  for (map<inodeno_t, Anchor>::const_iterator i = anchor_map.begin();
+       i != anchor_map.end(); ++i) {
+    f->open_object_section("entry");
+    f->dump_int("ino", i->first);
+    f->open_object_section("Anchor");
+    i->second.dump(f);
+    f->close_section(); // Anchor
+    f->close_section(); // entry
+  }
+  f->close_section(); // anchor map
+}
+
+void AnchorServer::generate_test_instances(list<AnchorServer*>& ls)
+{
+  AnchorServer *sample = new AnchorServer();
+  sample->pending_create[0] = 0;
+  sample->pending_destroy[0] = 1;
+  sample->anchor_map[0] = Anchor();
+  ls.push_back(sample);
+}
+
+
+
+/*
+ * basic updates
+ * Returns true if it changed the anchor_map contents.
+ */
+
+bool AnchorServer::add(inodeno_t ino, inodeno_t dirino, __u32 dn_hash,
+                       bool replace)
+{
+  //dout(17) << "add " << ino << " dirfrag " << dirfrag << dendl;
+  
+  // parent should be there
+  assert(MDS_INO_IS_BASE(dirino) ||     // base case,
+         anchor_map.count(dirino));   // or have it
+  
+  if (anchor_map.count(ino) == 0) {
+    // new item
+    anchor_map[ino] = Anchor(ino, dirino, dn_hash, 0, version);
+    dout(7) << "add added " << anchor_map[ino] << dendl;
+  } else if (replace) {
+    anchor_map[ino].dirino = dirino;
+    anchor_map[ino].dn_hash = dn_hash;
+    dout(7) << "add had old Anchor, updated it to "
+            << anchor_map[ino] << dendl;
+  } else {
+    dout(7) << "add had " << anchor_map[ino] << dendl;
+    return false;
+  }
+  return true;
+}
+
+void AnchorServer::inc(inodeno_t ino, int ref)
+{
+  dout(7) << "inc " << ino << dendl;
+
+  assert(anchor_map.count(ino));
+
+  while (1) {
+    Anchor &anchor = anchor_map[ino];
+    anchor.nref += ref;
+    anchor.updated = version;
+      
+    dout(10) << "inc now " << anchor << dendl;
+    ino = anchor.dirino;
+    
+    if (ino == 0 || MDS_INO_IS_BASE(ino)) break;
+    if (anchor_map.count(ino) == 0) break;
+  }
+}
+
+void AnchorServer::dec(inodeno_t ino, int ref)
+{
+  dout(7) << "dec " << ino << dendl;
+  assert(anchor_map.count(ino));
+
+  while (true) {
+    Anchor &anchor = anchor_map[ino];
+    anchor.nref -= ref;
+    anchor.updated = version;
+
+    if (anchor.nref == 0) {
+      dout(10) << "dec removing " << anchor << dendl;
+      inodeno_t dirino = anchor.dirino;
+      anchor_map.erase(ino);
+      ino = dirino;
+    } else {
+      dout(10) << "dec now " << anchor << dendl;
+      ino = anchor.dirino;
+    }
+    
+    if (ino == 0) break;
+    if (anchor_map.count(ino) == 0) break;
+  }
+}
+
+
+// server
+
+void AnchorServer::_prepare(bufferlist &bl, uint64_t reqid, int bymds)
+{
+  bufferlist::iterator p = bl.begin();
+  __u32 what;
+  inodeno_t ino;
+  vector<Anchor> trace;
+  ::decode(what, p);
+  ::decode(ino, p);
+
+  switch (what) {
+  case TABLE_OP_CREATE:
+    ::decode(trace, p);
+    version++;
+
+    // make sure trace is in table
+    dout(25) << "trace.size=" << trace.size() << dendl;
+    for (unsigned i=0; i<trace.size(); i++) {
+      add(trace[i].ino, trace[i].dirino, trace[i].dn_hash, false);
+      dout(25) << trace[i] << dendl;
+    }
+    inc(ino);
+    pending_create[version] = ino;  // so we can undo
+    pending_ops[ino].push_back(pair<version_t, Context*>(version, NULL));
+    break;
+
+  case TABLE_OP_DESTROY:
+    version++;
+    pending_destroy[version] = ino;
+    pending_ops[ino].push_back(pair<version_t, Context*>(version, NULL));
+    break;
+    
+  case TABLE_OP_UPDATE:
+    ::decode(trace, p);
+    version++;
+    pending_update[version].first = ino;
+    pending_update[version].second = trace;
+    pending_ops[ino].push_back(pair<version_t, Context*>(version, NULL));
+    break;
+
+  default:
+    assert(0);
+  }
+  //dump();
+}
+
+bool AnchorServer::check_pending(version_t tid, MMDSTableRequest *req, list<Context *>& finished)
+{
+  inodeno_t ino;
+  if (pending_create.count(tid))
+    ino = pending_create[tid];
+  else if (pending_destroy.count(tid))
+    ino = pending_destroy[tid];
+  else if (pending_update.count(tid))
+    ino = pending_update[tid].first;
+  else
+    assert(0);
+
+  assert(pending_ops.count(ino));
+  list< pair<version_t, Context*> >& pending = pending_ops[ino];
+  list< pair<version_t, Context*> >::iterator p = pending.begin();
+  if (p->first == tid) {
+    assert(p->second == NULL);
+  } else {
+    while (p != pending.end()) {
+      if (p->first == tid)
+	break;
+      ++p;
+    }
+    assert(p != pending.end());
+    assert(p->second == NULL);
+    // not the earliest pending operation, wait if it's a commit
+    if (req) {
+      p->second = new C_MDS_RetryMessage(mds, req);
+      return false;
+    }
+  }
+
+  pending.erase(p);
+  if (pending.empty()) {
+    pending_ops.erase(ino);
+  } else {
+    for (p = pending.begin(); p != pending.end() && p->second; ++p) {
+      finished.push_back(p->second);
+      p->second = NULL;
+    }
+  }
+  return true;
+}
+
+bool AnchorServer::_commit(version_t tid, MMDSTableRequest *req)
+{
+  list<Context *> finished;
+  if (!check_pending(tid, req, finished))
+    return false;
+
+  if (pending_create.count(tid)) {
+    dout(7) << "commit " << tid << " create " << pending_create[tid] << dendl;
+    pending_create.erase(tid);
+  } 
+
+  else if (pending_destroy.count(tid)) {
+    inodeno_t ino = pending_destroy[tid];
+    dout(7) << "commit " << tid << " destroy " << ino << dendl;
+    
+    dec(ino);  // destroy
+    
+    pending_destroy.erase(tid);
+  }
+
+  else if (pending_update.count(tid)) {
+    inodeno_t ino = pending_update[tid].first;
+    vector<Anchor> &trace = pending_update[tid].second;
+    
+    if (anchor_map.count(ino)) {
+      dout(7) << "commit " << tid << " update " << ino << dendl;
+
+      int ref = anchor_map[ino].nref;
+      // remove old
+      dec(ino, ref);
+      
+      // add new
+      for (unsigned i=0; i<trace.size(); i++) 
+	add(trace[i].ino, trace[i].dirino, trace[i].dn_hash, true);
+      inc(ino, ref);
+    } else {
+      dout(7) << "commit " << tid << " update " << ino << " -- DNE" << dendl;
+    }
+    
+    pending_update.erase(tid);
+  }
+  else
+    assert(0);
+
+  // bump version.
+  version++;
+  //dump();
+
+  mds->queue_waiters(finished);
+  return true;
+}
+
+void AnchorServer::_rollback(version_t tid) 
+{
+  list<Context *> finished;
+  check_pending(tid, NULL, finished);
+
+  if (pending_create.count(tid)) {
+    inodeno_t ino = pending_create[tid];
+    dout(7) << "rollback " << tid << " create " << ino << dendl;
+    dec(ino);
+    pending_create.erase(tid);
+  } 
+
+  else if (pending_destroy.count(tid)) {
+    inodeno_t ino = pending_destroy[tid];
+    dout(7) << "rollback " << tid << " destroy " << ino << dendl;
+    pending_destroy.erase(tid);
+  }
+
+  else if (pending_update.count(tid)) {
+    inodeno_t ino = pending_update[tid].first;
+    dout(7) << "rollback " << tid << " update " << ino << dendl;
+    pending_update.erase(tid);
+  }
+  else
+    assert(0);
+
+  // bump version.
+  version++;
+  //dump();
+  mds->queue_waiters(finished);
+}
+
+/* This function DOES put the passed message before returning */
+void AnchorServer::handle_query(MMDSTableRequest *req)
+{
+  bufferlist::iterator p = req->bl.begin();
+  inodeno_t ino;
+  ::decode(ino, p);
+  dout(7) << "handle_lookup " << *req << " ino " << ino << dendl;
+
+  vector<Anchor> trace;
+  inodeno_t curino = ino;
+  while (true) {
+    assert(anchor_map.count(curino) == 1);
+    Anchor &anchor = anchor_map[curino];
+    
+    dout(10) << "handle_lookup  adding " << anchor << dendl;
+    trace.insert(trace.begin(), anchor);  // lame FIXME
+    
+    if (MDS_INO_IS_BASE(anchor.dirino))
+      break;
+    curino = anchor.dirino;
+  }
+
+  // reply
+  MMDSTableRequest *reply = new MMDSTableRequest(table, TABLESERVER_OP_QUERY_REPLY, req->reqid, version);
+  ::encode(ino, reply->bl);
+  ::encode(trace, reply->bl);
+  mds->send_message(reply, req->get_connection());
+
+  req->put();
+}
+
+
diff --git a/src/mds/AnchorServer.h b/src/mds/AnchorServer.h
new file mode 100644
index 0000000..d6f1d84
--- /dev/null
+++ b/src/mds/AnchorServer.h
@@ -0,0 +1,87 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef CEPH_ANCHORSERVER_H
+#define CEPH_ANCHORSERVER_H
+
+#include "MDSTableServer.h"
+#include "Anchor.h"
+
+class AnchorServer : public MDSTableServer {
+ public:
+  AnchorServer(MDS *mds) :
+    MDSTableServer(mds, TABLE_ANCHOR) {}
+
+  // table bits
+  map<inodeno_t, Anchor>  anchor_map;
+
+  // uncommitted operations
+  map<version_t, inodeno_t> pending_create;
+  map<version_t, inodeno_t> pending_destroy;
+  map<version_t, pair<inodeno_t, vector<Anchor> > > pending_update;
+  map<inodeno_t, list<pair<version_t, Context*> > > pending_ops;
+
+  void reset_state();
+  void encode_server_state(bufferlist& bl) const {
+    ENCODE_START(2, 2, bl);
+    ::encode(anchor_map, bl);
+    ::encode(pending_create, bl);
+    ::encode(pending_destroy, bl);
+    ::encode(pending_update, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode_server_state(bufferlist::iterator& p) {
+    DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, p);
+    ::decode(anchor_map, p);
+    ::decode(pending_create, p);
+    ::decode(pending_destroy, p);
+    ::decode(pending_update, p);
+    DECODE_FINISH(p);
+
+    map<version_t, inodeno_t> sort;
+    sort.insert(pending_create.begin(), pending_create.end());
+    sort.insert(pending_destroy.begin(), pending_destroy.end());
+    for (map<version_t, pair<inodeno_t, vector<Anchor> > >::iterator p = pending_update.begin();
+	 p != pending_update.end(); ++p)
+      sort[p->first] = p->second.first;
+    for (map<version_t, inodeno_t>::iterator p = sort.begin(); p != sort.end(); ++p)
+      pending_ops[p->second].push_back(pair<version_t, Context*>(p->first, NULL));
+  }
+
+  bool add(inodeno_t ino, inodeno_t dirino, __u32 dn_hash, bool replace);
+  void inc(inodeno_t ino, int ref=1);
+  void dec(inodeno_t ino, int ref=1);
+  bool check_pending(version_t tid, MMDSTableRequest *req, list<Context *>& finished);
+
+  void dump();
+  void dump(Formatter *f) const;
+  static void generate_test_instances(list<AnchorServer*>& ls);
+  // for the dencoder
+  AnchorServer() : MDSTableServer(NULL, TABLE_ANCHOR) {}
+  void encode(bufferlist& bl) const {
+    encode_server_state(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    decode_server_state(bl);
+  }
+
+  // server bits
+  void _prepare(bufferlist &bl, uint64_t reqid, int bymds);
+  bool _commit(version_t tid, MMDSTableRequest *req=NULL);
+  void _rollback(version_t tid);
+  void handle_query(MMDSTableRequest *m);
+};
+
+
+#endif
diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc
deleted file mode 100644
index 6f7d128..0000000
--- a/src/mds/Beacon.cc
+++ /dev/null
@@ -1,353 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2012 Red Hat
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-
-#include "common/dout.h"
-#include "common/HeartbeatMap.h"
-#include "include/stringify.h"
-
-#include "messages/MMDSBeacon.h"
-#include "mon/MonClient.h"
-#include "mds/MDLog.h"
-#include "mds/MDS.h"
-#include "mds/MDSMap.h"
-#include "mds/Locker.h"
-
-#include "Beacon.h"
-
-#define dout_subsys ceph_subsys_mds
-#undef dout_prefix
-#define dout_prefix *_dout << "mds.beacon." << name << ' '
-
-
-Beacon::Beacon(CephContext *cct_, MonClient *monc_, std::string name_) :
-  Dispatcher(cct_), lock("Beacon"), monc(monc_), timer(g_ceph_context, lock), name(name_)
-{
-  want_state = MDSMap::STATE_NULL;
-  last_send = 0;
-  last_seq = 0;
-  sender = NULL;
-  was_laggy = false;
-
-  standby_for_rank = MDSMap::MDS_NO_STANDBY_PREF;
-  epoch = 0;
-}
-
-
-Beacon::~Beacon()
-{
-}
-
-
-void Beacon::init(MDSMap const *mdsmap, MDSMap::DaemonState want_state_, int standby_rank_, std::string const & standby_name_)
-{
-  Mutex::Locker l(lock);
-  assert(mdsmap != NULL);
-
-  // Initialize copies of MDS state
-  want_state = want_state_;
-  _notify_mdsmap(mdsmap);
-  standby_for_rank = standby_rank_;
-  standby_for_name = standby_name_;
-
-  // Spawn threads and start messaging
-  timer.init();
-  _send();
-}
-
-
-void Beacon::shutdown()
-{
-  Mutex::Locker l(lock);
-  if (sender) {
-    timer.cancel_event(sender);
-    sender = NULL;
-  }
-  timer.shutdown();
-}
-
-
-bool Beacon::ms_dispatch(Message *m)
-{
-  if (m->get_type() == MSG_MDS_BEACON) {
-    if (m->get_connection()->get_peer_type() == CEPH_ENTITY_TYPE_MON) {
-      handle_mds_beacon(static_cast<MMDSBeacon*>(m));
-    }
-    return true;
-  }
-
-  return false;
-}
-
-
-/**
- * Update lagginess state based on response from remote MDSMonitor
- *
- * This function puts the passed message before returning
- */
-void Beacon::handle_mds_beacon(MMDSBeacon *m)
-{
-  Mutex::Locker l(lock);
-  assert(m != NULL);
-
-  version_t seq = m->get_seq();
-
-  // update lab
-  if (seq_stamp.count(seq)) {
-    assert(seq_stamp[seq] > last_acked_stamp);
-    last_acked_stamp = seq_stamp[seq];
-    utime_t now = ceph_clock_now(g_ceph_context);
-    utime_t rtt = now - last_acked_stamp;
-
-    dout(10) << "handle_mds_beacon " << ceph_mds_state_name(m->get_state())
-	     << " seq " << m->get_seq() 
-	     << " rtt " << rtt << dendl;
-
-    if (was_laggy && rtt < g_conf->mds_beacon_grace) {
-      dout(0) << "handle_mds_beacon no longer laggy" << dendl;
-      was_laggy = false;
-      laggy_until = now;
-    }
-
-    // clean up seq_stamp map
-    while (!seq_stamp.empty() &&
-	   seq_stamp.begin()->first <= seq)
-      seq_stamp.erase(seq_stamp.begin());
-  } else {
-    dout(10) << "handle_mds_beacon " << ceph_mds_state_name(m->get_state())
-	     << " seq " << m->get_seq() << " dne" << dendl;
-  }
-}
-
-
-void Beacon::send()
-{
-  Mutex::Locker l(lock);
-  _send();
-}
-
-
-/**
- * Call periodically, or when you have updated the desired state
- */
-void Beacon::_send()
-{
-  if (sender) {
-    timer.cancel_event(sender);
-  }
-  sender = new C_MDS_BeaconSender(this);
-  timer.add_event_after(g_conf->mds_beacon_interval, sender);
-
-  if (!cct->get_heartbeat_map()->is_healthy()) {
-    /* If anything isn't progressing, let avoid sending a beacon so that
-     * the MDS will consider us laggy */
-    dout(1) << __func__ << " skipping beacon, heartbeat map not healthy" << dendl;
-    return;
-  }
-
-  ++last_seq;
-  dout(10) << __func__ << " " << ceph_mds_state_name(want_state)
-	   << " seq " << last_seq
-	   << dendl;
-
-  seq_stamp[last_seq] = ceph_clock_now(g_ceph_context);
-  
-  MMDSBeacon *beacon = new MMDSBeacon(
-      monc->get_fsid(), monc->get_global_id(),
-      name,
-      epoch,
-      want_state,
-      last_seq);
-
-  beacon->set_standby_for_rank(standby_for_rank);
-  beacon->set_standby_for_name(standby_for_name);
-  beacon->set_health(health);
-  beacon->set_compat(compat);
-
-  monc->send_mon_message(beacon);
-}
-
-/**
- * Call this when there is a new MDSMap available
- */
-void Beacon::notify_mdsmap(MDSMap const *mdsmap)
-{
-  Mutex::Locker l(lock);
-  assert(mdsmap != NULL);
-
-  _notify_mdsmap(mdsmap);
-}
-
-void Beacon::_notify_mdsmap(MDSMap const *mdsmap)
-{
-  assert(mdsmap != NULL);
-
-  epoch = mdsmap->get_epoch();
-  compat = get_mdsmap_compat_set_default();
-  compat.merge(mdsmap->compat);
-}
-
-
-bool Beacon::is_laggy()
-{
-  Mutex::Locker l(lock);
-
-  if (last_acked_stamp == utime_t())
-    return false;
-
-  utime_t now = ceph_clock_now(g_ceph_context);
-  utime_t since = now - last_acked_stamp;
-  if (since > g_conf->mds_beacon_grace) {
-    dout(5) << "is_laggy " << since << " > " << g_conf->mds_beacon_grace
-	    << " since last acked beacon" << dendl;
-    was_laggy = true;
-    if (since > (g_conf->mds_beacon_grace*2) &&
-	now > last_mon_reconnect + g_conf->mds_beacon_interval) {
-      // maybe it's not us?
-      dout(5) << "initiating monitor reconnect; maybe we're not the slow one"
-              << dendl;
-      last_mon_reconnect = now;
-      monc->reopen_session();
-    }
-    return true;
-  }
-  return false;
-}
-
-utime_t Beacon::get_laggy_until() const
-{
-  Mutex::Locker l(lock);
-
-  return laggy_until;
-}
-
-void Beacon::notify_want_state(MDSMap::DaemonState const newstate)
-{
-  Mutex::Locker l(lock);
-
-  want_state = newstate;
-}
-
-
-/**
- * We are 'shown' an MDS briefly in order to update
- * some health metrics that we will send in the next
- * beacon.
- */
-void Beacon::notify_health(MDS const *mds)
-{
-  Mutex::Locker l(lock);
-
-  // I'm going to touch this MDS, so it must be locked
-  assert(mds->mds_lock.is_locked_by_me());
-
-  health.metrics.clear();
-
-  // Detect MDS_HEALTH_TRIM condition
-  // Arbitrary factor of 2, indicates MDS is not trimming promptly
-  {
-    if (mds->mdlog->get_num_segments() > (size_t)(g_conf->mds_log_max_segments * 2)) {
-      std::ostringstream oss;
-      oss << "Behind on trimming (" << mds->mdlog->get_num_segments()
-        << "/" << g_conf->mds_log_max_segments << ")";
-
-      MDSHealthMetric m(MDS_HEALTH_TRIM, HEALTH_WARN, oss.str());
-      m.metadata["num_segments"] = mds->mdlog->get_num_segments();
-      m.metadata["max_segments"] = g_conf->mds_log_max_segments;
-      health.metrics.push_back(m);
-    }
-  }
-
-  // Detect clients failing to respond to modifications to capabilities in
-  // CLIENT_CAPS messages.
-  {
-    std::list<client_t> late_clients;
-    mds->locker->get_late_revoking_clients(&late_clients);
-    std::list<MDSHealthMetric> late_cap_metrics;
-
-    for (std::list<client_t>::iterator i = late_clients.begin(); i != late_clients.end(); ++i) {
-
-      // client_t is equivalent to session.info.inst.name.num
-      // Construct an entity_name_t to lookup into SessionMap
-      entity_name_t ename(CEPH_ENTITY_TYPE_CLIENT, i->v);
-      Session const *s = mds->sessionmap.get_session(ename);
-      if (s == NULL) {
-        // Shouldn't happen, but not worth crashing if it does as this is
-        // just health-reporting code.
-        derr << "Client ID without session: " << i->v << dendl;
-        continue;
-      }
-
-      std::ostringstream oss;
-      oss << "Client " << s->get_human_name() << " failing to respond to capability release";
-      MDSHealthMetric m(MDS_HEALTH_CLIENT_LATE_RELEASE, HEALTH_WARN, oss.str());
-      m.metadata["client_id"] = stringify(i->v);
-      late_cap_metrics.push_back(m);
-    }
-
-    if (late_cap_metrics.size() <= (size_t)g_conf->mds_health_summarize_threshold) {
-      health.metrics.splice(health.metrics.end(), late_cap_metrics);
-    } else {
-      std::ostringstream oss;
-      oss << "Many clients (" << late_cap_metrics.size()
-          << ") failing to respond to capability release";
-      MDSHealthMetric m(MDS_HEALTH_CLIENT_LATE_RELEASE_MANY, HEALTH_WARN, oss.str());
-      m.metadata["client_count"] = late_cap_metrics.size();
-      health.metrics.push_back(m);
-      late_cap_metrics.clear();
-    }
-  }
-
-  // Detect clients failing to generate cap releases from CEPH_SESSION_RECALL_STATE
-  // messages. May be due to buggy client or resource-hogging application.
-  {
-    set<Session*> sessions;
-    mds->sessionmap.get_client_session_set(sessions);
-    utime_t cutoff = ceph_clock_now(g_ceph_context);
-    cutoff -= g_conf->mds_recall_state_timeout;
-
-    std::list<MDSHealthMetric> late_recall_metrics;
-    for (set<Session*>::iterator i = sessions.begin(); i != sessions.end(); ++i) {
-      Session *session = *i;
-      if (!session->recalled_at.is_zero()) {
-        dout(20) << "Session servicing RECALL " << session->info.inst
-          << ": " << session->recalled_at << " " << session->recall_release_count
-          << "/" << session->recall_count << dendl;
-        if (session->recalled_at < cutoff) {
-          dout(20) << "  exceeded timeout " << session->recalled_at << " vs. " << cutoff << dendl;
-          std::ostringstream oss;
-        oss << "Client " << session->get_human_name() << " failing to respond to cache pressure";
-          MDSHealthMetric m(MDS_HEALTH_CLIENT_RECALL, HEALTH_WARN, oss.str());
-          m.metadata["client_id"] = session->info.inst.name.num();
-          late_recall_metrics.push_back(m);
-        } else {
-          dout(20) << "  within timeout " << session->recalled_at << " vs. " << cutoff << dendl;
-        }
-      }
-    }
-
-    if (late_recall_metrics.size() <= (size_t)g_conf->mds_health_summarize_threshold) {
-      health.metrics.splice(health.metrics.end(), late_recall_metrics);
-    } else {
-      std::ostringstream oss;
-      oss << "Many clients (" << late_recall_metrics.size()
-          << ") failing to respond to cache pressure";
-      MDSHealthMetric m(MDS_HEALTH_CLIENT_RECALL_MANY, HEALTH_WARN, oss.str());
-      m.metadata["client_count"] = late_recall_metrics.size();
-      health.metrics.push_back(m);
-      late_recall_metrics.clear();
-    }
-  }
-}
-
diff --git a/src/mds/Beacon.h b/src/mds/Beacon.h
deleted file mode 100644
index 9148366..0000000
--- a/src/mds/Beacon.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2012 Red Hat
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-
-#ifndef BEACON_STATE_H
-#define BEACON_STATE_H
-
-#include "include/types.h"
-#include "include/Context.h"
-#include "common/Mutex.h"
-#include "msg/Dispatcher.h"
-#include "messages/MMDSBeacon.h"
-
-class MonClient;
-class MMDSBeacon;
-class Message;
-class MDS;
-
-
-/**
- * One of these per MDS.  Handle beacon logic in this separate class so
- * that a busy MDS holding its own lock does not hold up sending beacon
- * messages to the mon and cause false lagginess.
- *
- * So that we can continue to operate while the MDS is holding its own lock,
- * we keep copies of the data needed to generate beacon messages.  The MDS is
- * responsible for calling Beacon::notify_* when things change.
- */
-class Beacon : public Dispatcher
-{
-  //CephContext *cct;
-  mutable Mutex lock;
-  MonClient*    monc;
-  SafeTimer     timer;
-
-  // Items we duplicate from the MDS to have access under our own lock
-  std::string name;
-  version_t epoch;
-  CompatSet compat;
-  int standby_for_rank;
-  std::string standby_for_name;
-  MDSMap::DaemonState want_state;
-
-  // Internal beacon state
-  version_t last_send;
-  version_t last_seq;          // last seq sent to monitor
-  std::map<version_t,utime_t>  seq_stamp;    // seq # -> time sent
-  utime_t last_acked_stamp;  // last time we sent a beacon that got acked
-  utime_t last_mon_reconnect;
-  bool was_laggy;
-  utime_t laggy_until;
-
-  // Health status to be copied into each beacon message
-  MDSHealth health;
-
-  // Ticker
-  class C_MDS_BeaconSender : public Context {
-    Beacon *beacon;
-  public:
-    C_MDS_BeaconSender(Beacon *beacon_) : beacon(beacon_) {}
-    void finish(int r) {
-      assert(beacon->lock.is_locked_by_me());
-      beacon->sender = NULL;
-      beacon->_send();
-    }
-  } *sender;
-
-  void _notify_mdsmap(MDSMap const *mdsmap);
-  void _send();
-
-public:
-  Beacon(CephContext *cct_, MonClient *monc_, std::string name);
-  ~Beacon();
-
-  void init(MDSMap const *mdsmap, MDSMap::DaemonState want_state_, int standby_rank_, std::string const &standby_name_);
-  void shutdown();
-
-  bool ms_dispatch(Message *m); 
-  void ms_handle_connect(Connection *c) {}
-  bool ms_handle_reset(Connection *c) {return false;}
-  void ms_handle_remote_reset(Connection *c) {}
-
-  void notify_mdsmap(MDSMap const *mdsmap);
-  void notify_want_state(MDSMap::DaemonState const newstate);
-  void notify_health(MDS const *mds);
-
-  void set_standby_for(int rank_, std::string const &name_);
-
-  void handle_mds_beacon(MMDSBeacon *m);
-  void send();
-
-  bool is_laggy();
-  utime_t get_laggy_until() const;
-};
-
-#endif // BEACON_STATE_H
-
diff --git a/src/mds/CDentry.cc b/src/mds/CDentry.cc
index 4bcb9d3..0576658 100644
--- a/src/mds/CDentry.cc
+++ b/src/mds/CDentry.cc
@@ -17,6 +17,7 @@
 #include "CDentry.h"
 #include "CInode.h"
 #include "CDir.h"
+#include "Anchor.h"
 
 #include "MDS.h"
 #include "MDCache.h"
@@ -143,7 +144,7 @@ pair<int,int> CDentry::authority()
 }
 
 
-void CDentry::add_waiter(uint64_t tag, MDSInternalContextBase *c)
+void CDentry::add_waiter(uint64_t tag, Context *c)
 {
   // wait on the directory?
   if (tag & (WAIT_UNFREEZE|WAIT_SINGLEAUTH)) {
@@ -253,6 +254,20 @@ void CDentry::make_path(string& s, inodeno_t tobase)
 }
 */
 
+/** make_anchor_trace
+ * construct an anchor trace for this dentry, as if it were linked to *in.
+ */
+void CDentry::make_anchor_trace(vector<Anchor>& trace, CInode *in)
+{
+  // start with parent dir inode
+  dir->inode->make_anchor_trace(trace);
+
+  // add this inode (in my dirfrag) to the end
+  trace.push_back(Anchor(in->ino(), dir->ino(), get_hash(), 0, 0));
+  dout(10) << "make_anchor_trace added " << trace.back() << dendl;
+}
+
+
 /*
  * we only add ourselves to remote_parents when the linkage is
  * active (no longer projected).  if the passed dnl is projected,
@@ -404,6 +419,16 @@ bool CDentry::is_freezing()
   return dir->is_freezing();
 }
 
+
+void CDentry::adjust_nested_anchors(int by)
+{
+  nested_anchors += by;
+  dout(20) << "adjust_nested_anchors by " << by << " -> " << nested_anchors << dendl;
+  assert(nested_anchors >= 0);
+  dir->adjust_nested_anchors(by);
+}
+
+
 void CDentry::decode_replica(bufferlist::iterator& p, bool is_new)
 {
   __u32 nonce;
@@ -544,7 +569,7 @@ void CDentry::remove_client_lease(ClientLease *l, Locker *locker)
 
 void CDentry::_put()
 {
-  if (get_num_ref() <= ((int)is_dirty() + 1)) {
+  if (get_num_ref() <= (int)is_dirty() + 1) {
     CDentry::linkage_t *dnl = get_projected_linkage();
     if (dnl->is_primary()) {
       CInode *in = dnl->get_inode();
diff --git a/src/mds/CDentry.h b/src/mds/CDentry.h
index 0de626a..41ed83d 100644
--- a/src/mds/CDentry.h
+++ b/src/mds/CDentry.h
@@ -19,6 +19,7 @@
 
 #include <string>
 #include <set>
+using namespace std;
 
 #include "include/types.h"
 #include "include/buffer.h"
@@ -32,8 +33,11 @@
 
 class CInode;
 class CDir;
+struct MDRequest;
 
 class Message;
+class Anchor;
+
 class CDentry;
 class LogSegment;
 
@@ -86,12 +90,12 @@ public:
     case PIN_PURGING: return "purging";
     default: return generic_pin_name(p);
     }
-  }
+  };
 
   // -- wait --
   //static const int WAIT_LOCK_OFFSET = 8;
 
-  void add_waiter(uint64_t tag, MDSInternalContextBase *c);
+  void add_waiter(uint64_t tag, Context *c);
 
   static const unsigned EXPORT_NONCE = 1;
 
@@ -100,7 +104,7 @@ public:
   }
 
 public:
-  std::string name;
+  string name;
   __u32 hash;
   snapid_t first, last;
 
@@ -151,6 +155,8 @@ protected:
 #ifdef MDS_AUTHPIN_SET
   multiset<void*> auth_pin_set;
 #endif
+  int nested_anchors;
+
   friend class Migrator;
   friend class Locker;
   friend class MDCache;
@@ -168,27 +174,27 @@ public:
 
  public:
   // cons
-  CDentry(const std::string& n, __u32 h,
+  CDentry(const string& n, __u32 h,
 	  snapid_t f, snapid_t l) :
     name(n), hash(h),
     first(f), last(l),
     dir(0),
     version(0), projected_version(0),
     item_dirty(this),
-    auth_pins(0), nested_auth_pins(0),
+    auth_pins(0), nested_auth_pins(0), nested_anchors(0),
     lock(this, &lock_type),
     versionlock(this, &versionlock_type) {
     g_num_dn++;
     g_num_dna++;
   }
-  CDentry(const std::string& n, __u32 h, inodeno_t ino, unsigned char dt,
+  CDentry(const string& n, __u32 h, inodeno_t ino, unsigned char dt,
 	  snapid_t f, snapid_t l) :
     name(n), hash(h),
     first(f), last(l),
     dir(0),
     version(0), projected_version(0),
     item_dirty(this),
-    auth_pins(0), nested_auth_pins(0),
+    auth_pins(0), nested_auth_pins(0), nested_anchors(0),
     lock(this, &lock_type),
     versionlock(this, &versionlock_type) {
     g_num_dn++;
@@ -203,7 +209,7 @@ public:
 
 
   CDir *get_dir() const { return dir; }
-  const std::string& get_name() const { return name; }
+  const string& get_name() const { return name; }
 
   __u32 get_hash() const { return hash; }
 
@@ -225,7 +231,7 @@ public:
   void push_projected_linkage(CInode *inode); 
   linkage_t *pop_projected_linkage();
 
-  bool is_projected() { return !projected.empty(); }
+  bool is_projected() { return projected.size(); }
 
   linkage_t *get_projected_linkage() {
     if (!projected.empty())
@@ -265,6 +271,8 @@ public:
   int get_num_dir_auth_pins();
   int get_num_nested_auth_pins() { return nested_auth_pins; }
   
+  void adjust_nested_anchors(int by);
+
   // remote links
   void link_remote(linkage_t *dnl, CInode *in);
   void unlink_remote(linkage_t *dnl);
@@ -274,8 +282,9 @@ public:
   const CDentry& operator= (const CDentry& right);
 
   // misc
-  void make_path_string(std::string& s);
+  void make_path_string(string& s);
   void make_path(filepath& fp);
+  void make_anchor_trace(vector<class Anchor>& trace, CInode *in);
 
   // -- version --
   version_t get_version() { return version; }
diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc
index e5a1f51..a423ef7 100644
--- a/src/mds/CDir.cc
+++ b/src/mds/CDir.cc
@@ -42,32 +42,6 @@
 
 
 
-class CDirContext : public MDSInternalContextBase
-{
-protected:
-  CDir *dir;
-  MDS* get_mds() {return dir->cache->mds;}
-
-public:
-  CDirContext(CDir *d) : dir(d) {
-    assert(dir != NULL);
-  }
-};
-
-
-class CDirIOContext : public MDSIOContextBase
-{
-protected:
-  CDir *dir;
-  MDS* get_mds() {return dir->cache->mds;}
-
-public:
-  CDirIOContext(CDir *d) : dir(d) {
-    assert(dir != NULL);
-  }
-};
-
-
 // PINS
 //int cdir_pins[CDIR_NUM_PINS] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
 
@@ -111,6 +85,8 @@ ostream& operator<<(ostream& out, CDir& dir)
     out << " ap=" << dir.get_auth_pins() 
 	<< "+" << dir.get_dir_auth_pins()
 	<< "+" << dir.get_nested_auth_pins();
+  if (dir.get_nested_anchors())
+    out << " na=" << dir.get_nested_anchors();
 
   out << " state=" << dir.get_state();
   if (dir.state_test(CDir::STATE_COMPLETE)) out << "|complete";
@@ -224,6 +200,8 @@ CDir::CDir(CInode *in, frag_t fg, MDCache *mdcache, bool auth) :
   dir_auth_pins = 0;
   request_pins = 0;
 
+  nested_anchors = 0;
+  
   dir_rep = REP_NONE;
 }
 
@@ -551,6 +529,9 @@ void CDir::link_inode_work( CDentry *dn, CInode *in)
   if (in->auth_pins + in->nested_auth_pins)
     dn->adjust_nested_auth_pins(in->auth_pins + in->nested_auth_pins, in->auth_pins, NULL);
 
+  if (in->inode.anchored + in->nested_anchors)
+    dn->adjust_nested_anchors(in->nested_anchors + in->inode.anchored);
+
   // verify open snaprealm parent
   if (in->snaprealm)
     in->snaprealm->adjust_parent();
@@ -621,6 +602,9 @@ void CDir::unlink_inode_work( CDentry *dn )
     if (in->auth_pins + in->nested_auth_pins)
       dn->adjust_nested_auth_pins(0 - (in->auth_pins + in->nested_auth_pins), 0 - in->auth_pins, NULL);
     
+    if (in->inode.anchored + in->nested_anchors)
+      dn->adjust_nested_anchors(0 - (in->nested_anchors + in->inode.anchored));
+
     // detach inode
     in->remove_primary_parent(dn);
     dn->get_linkage()->inode = 0;
@@ -759,7 +743,8 @@ void CDir::steal_dentry(CDentry *dn)
       fnode.rstat.rbytes += pi->accounted_rstat.rbytes;
       fnode.rstat.rfiles += pi->accounted_rstat.rfiles;
       fnode.rstat.rsubdirs += pi->accounted_rstat.rsubdirs;
-      fnode.rstat.rsnaprealms += pi->accounted_rstat.rsnaprealms;
+      fnode.rstat.ranchors += pi->accounted_rstat.ranchors;
+      fnode.rstat.rsnaprealms += pi->accounted_rstat.ranchors;
       if (pi->accounted_rstat.rctime > fnode.rstat.rctime)
 	fnode.rstat.rctime = pi->accounted_rstat.rctime;
 
@@ -783,6 +768,7 @@ void CDir::steal_dentry(CDentry *dn)
     dn->dir->adjust_nested_auth_pins(-ap, -dap, NULL);
   }
 
+  nested_anchors += dn->nested_anchors;
   if (dn->is_dirty()) 
     num_dirty++;
 
@@ -805,7 +791,7 @@ void CDir::prepare_new_fragment(bool replay)
   }
 }
 
-void CDir::finish_old_fragment(list<MDSInternalContextBase*>& waiters, bool replay)
+void CDir::finish_old_fragment(list<Context*>& waiters, bool replay)
 {
   // take waiters _before_ unfreeze...
   if (!replay) {
@@ -856,11 +842,11 @@ void CDir::init_fragment_pins()
     get(PIN_SUBTREE);
 }
 
-void CDir::split(int bits, list<CDir*>& subs, list<MDSInternalContextBase*>& waiters, bool replay)
+void CDir::split(int bits, list<CDir*>& subs, list<Context*>& waiters, bool replay)
 {
   dout(10) << "split by " << bits << " bits on " << *this << dendl;
 
-  if (cache->mds->logger) cache->mds->logger->inc(l_mds_dir_split);
+  if (cache->mds->logger) cache->mds->logger->inc(l_mds_dir_sp);
 
   assert(replay || is_complete() || !is_auth());
 
@@ -871,17 +857,15 @@ void CDir::split(int bits, list<CDir*>& subs, list<MDSInternalContextBase*>& wai
   
   double fac = 1.0 / (double)(1 << bits);  // for scaling load vecs
 
-  version_t rstat_version = inode->get_projected_inode()->rstat.version;
-  version_t dirstat_version = inode->get_projected_inode()->dirstat.version;
-
+  dout(15) << "           rstat " << fnode.rstat << dendl;
+  dout(15) << " accounted_rstat " << fnode.accounted_rstat << dendl;
   nest_info_t rstatdiff;
+  rstatdiff.add_delta(fnode.accounted_rstat, fnode.rstat);
+  dout(15) << "           fragstat " << fnode.fragstat << dendl;
+  dout(15) << " accounted_fragstat " << fnode.accounted_fragstat << dendl;
   frag_info_t fragstatdiff;
-  if (fnode.accounted_rstat.version == rstat_version)
-    rstatdiff.add_delta(fnode.accounted_rstat, fnode.rstat);
-  if (fnode.accounted_fragstat.version == dirstat_version) {
-    bool touched_mtime;
-    fragstatdiff.add_delta(fnode.accounted_fragstat, fnode.fragstat, touched_mtime);
-  }
+  bool touched_mtime;
+  fragstatdiff.add_delta(fnode.accounted_fragstat, fnode.fragstat, touched_mtime);
   dout(10) << " rstatdiff " << rstatdiff << " fragstatdiff " << fragstatdiff << dendl;
 
   prepare_old_fragment(replay);
@@ -933,9 +917,9 @@ void CDir::split(int bits, list<CDir*>& subs, list<MDSInternalContextBase*>& wai
   // fix up new frag fragstats
   for (int i=0; i<n; i++) {
     CDir *f = subfrags[i];
-    f->fnode.rstat.version = rstat_version;
+    f->fnode.rstat.version = fnode.rstat.version;
     f->fnode.accounted_rstat = f->fnode.rstat;
-    f->fnode.fragstat.version = dirstat_version;
+    f->fnode.fragstat.version = fnode.fragstat.version;
     f->fnode.accounted_fragstat = f->fnode.fragstat;
     dout(10) << " rstat " << f->fnode.rstat << " fragstat " << f->fnode.fragstat
 	     << " on " << *f << dendl;
@@ -950,7 +934,7 @@ void CDir::split(int bits, list<CDir*>& subs, list<MDSInternalContextBase*>& wai
   finish_old_fragment(waiters, replay);
 }
 
-void CDir::merge(list<CDir*>& subs, list<MDSInternalContextBase*>& waiters, bool replay)
+void CDir::merge(list<CDir*>& subs, list<Context*>& waiters, bool replay)
 {
   dout(10) << "merge " << subs << dendl;
 
@@ -1100,7 +1084,7 @@ void CDir::assimilate_dirty_rstat_inodes_finish(MutationRef& mut, EMetaBlob *blo
  * WAITING
  */
 
-void CDir::add_dentry_waiter(const string& dname, snapid_t snapid, MDSInternalContextBase *c) 
+void CDir::add_dentry_waiter(const string& dname, snapid_t snapid, Context *c) 
 {
   if (waiting_on_dentry.empty())
     get(PIN_DNWAITER);
@@ -1111,14 +1095,14 @@ void CDir::add_dentry_waiter(const string& dname, snapid_t snapid, MDSInternalCo
 }
 
 void CDir::take_dentry_waiting(const string& dname, snapid_t first, snapid_t last,
-			       list<MDSInternalContextBase*>& ls)
+			       list<Context*>& ls)
 {
   if (waiting_on_dentry.empty())
     return;
   
   string_snap_t lb(dname, first);
   string_snap_t ub(dname, last);
-  map<string_snap_t, list<MDSInternalContextBase*> >::iterator p = waiting_on_dentry.lower_bound(lb);
+  map<string_snap_t, list<Context*> >::iterator p = waiting_on_dentry.lower_bound(lb);
   while (p != waiting_on_dentry.end() &&
 	 !(ub < p->first)) {
     dout(10) << "take_dentry_waiting dentry " << dname
@@ -1133,22 +1117,51 @@ void CDir::take_dentry_waiting(const string& dname, snapid_t first, snapid_t las
     put(PIN_DNWAITER);
 }
 
-void CDir::take_sub_waiting(list<MDSInternalContextBase*>& ls)
+void CDir::add_ino_waiter(inodeno_t ino, Context *c) 
+{
+  if (waiting_on_ino.empty())
+    get(PIN_INOWAITER);
+  waiting_on_ino[ino].push_back(c);
+  dout(10) << "add_ino_waiter ino " << ino << " " << c << " on " << *this << dendl;
+}
+
+void CDir::take_ino_waiting(inodeno_t ino, list<Context*>& ls)
+{
+  if (waiting_on_ino.empty()) return;
+  if (waiting_on_ino.count(ino) == 0) return;
+  dout(10) << "take_ino_waiting ino " << ino
+	   << " x " << waiting_on_ino[ino].size() 
+	   << " on " << *this << dendl;
+  ls.splice(ls.end(), waiting_on_ino[ino]);
+  waiting_on_ino.erase(ino);
+  if (waiting_on_ino.empty())
+    put(PIN_INOWAITER);
+}
+
+void CDir::take_sub_waiting(list<Context*>& ls)
 {
   dout(10) << "take_sub_waiting" << dendl;
   if (!waiting_on_dentry.empty()) {
-    for (map<string_snap_t, list<MDSInternalContextBase*> >::iterator p = waiting_on_dentry.begin(); 
+    for (map<string_snap_t, list<Context*> >::iterator p = waiting_on_dentry.begin(); 
 	 p != waiting_on_dentry.end();
 	 ++p) 
       ls.splice(ls.end(), p->second);
     waiting_on_dentry.clear();
     put(PIN_DNWAITER);
   }
+  if (!waiting_on_ino.empty()) {
+    for (map<inodeno_t, list<Context*> >::iterator p = waiting_on_ino.begin(); 
+	 p != waiting_on_ino.end();
+	 ++p) 
+      ls.splice(ls.end(), p->second);
+    waiting_on_ino.clear();
+    put(PIN_INOWAITER);
+  }
 }
 
 
 
-void CDir::add_waiter(uint64_t tag, MDSInternalContextBase *c) 
+void CDir::add_waiter(uint64_t tag, Context *c) 
 {
   // hierarchical?
 
@@ -1179,12 +1192,12 @@ void CDir::add_waiter(uint64_t tag, MDSInternalContextBase *c)
 
 
 /* NOTE: this checks dentry waiters too */
-void CDir::take_waiting(uint64_t mask, list<MDSInternalContextBase*>& ls)
+void CDir::take_waiting(uint64_t mask, list<Context*>& ls)
 {
   if ((mask & WAIT_DENTRY) && !waiting_on_dentry.empty()) {
     // take all dentry waiters
     while (!waiting_on_dentry.empty()) {
-      map<string_snap_t, list<MDSInternalContextBase*> >::iterator p = waiting_on_dentry.begin(); 
+      map<string_snap_t, list<Context*> >::iterator p = waiting_on_dentry.begin(); 
       dout(10) << "take_waiting dentry " << p->first.name
 	       << " snap " << p->first.snapid << " on " << *this << dendl;
       ls.splice(ls.end(), p->second);
@@ -1202,7 +1215,7 @@ void CDir::finish_waiting(uint64_t mask, int result)
 {
   dout(11) << "finish_waiting mask " << hex << mask << dec << " result " << result << " on " << *this << dendl;
 
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
   take_waiting(mask, finished);
   if (result < 0)
     finish_contexts(g_ceph_context, finished, result);
@@ -1289,10 +1302,11 @@ void CDir::mark_clean()
 }
 
 
-struct C_Dir_Dirty : public CDirContext {
+struct C_Dir_Dirty : public Context {
+  CDir *dir;
   version_t pv;
   LogSegment *ls;
-  C_Dir_Dirty(CDir *d, version_t p, LogSegment *l) : CDirContext(d), pv(p), ls(l) {}
+  C_Dir_Dirty(CDir *d, version_t p, LogSegment *l) : dir(d), pv(p), ls(l) {}
   void finish(int r) {
     dir->mark_dirty(pv, ls);
   }
@@ -1329,13 +1343,13 @@ void CDir::last_put()
 
 // -----------------------
 // FETCH
-void CDir::fetch(MDSInternalContextBase *c, bool ignore_authpinnability)
+void CDir::fetch(Context *c, bool ignore_authpinnability)
 {
   string want;
   return fetch(c, want, ignore_authpinnability);
 }
 
-void CDir::fetch(MDSInternalContextBase *c, const string& want_dn, bool ignore_authpinnability)
+void CDir::fetch(Context *c, const string& want_dn, bool ignore_authpinnability)
 {
   dout(10) << "fetch on " << *this << dendl;
   
@@ -1362,18 +1376,19 @@ void CDir::fetch(MDSInternalContextBase *c, const string& want_dn, bool ignore_a
   auth_pin(this);
   state_set(CDir::STATE_FETCHING);
 
-  if (cache->mds->logger) cache->mds->logger->inc(l_mds_dir_fetch);
+  if (cache->mds->logger) cache->mds->logger->inc(l_mds_dir_f);
 
   _omap_fetch(want_dn);
 }
 
-class C_IO_Dir_TMAP_Fetched : public CDirIOContext {
+class C_Dir_TMAP_Fetched : public Context {
  protected:
+  CDir *dir;
   string want_dn;
  public:
   bufferlist bl;
 
-  C_IO_Dir_TMAP_Fetched(CDir *d, const string& w) : CDirIOContext(d), want_dn(w) { }
+  C_Dir_TMAP_Fetched(CDir *d, const string& w) : dir(d), want_dn(w) { }
   void finish(int r) {
     dir->_tmap_fetched(bl, want_dn, r);
   }
@@ -1382,18 +1397,17 @@ class C_IO_Dir_TMAP_Fetched : public CDirIOContext {
 void CDir::_tmap_fetch(const string& want_dn)
 {
   // start by reading the first hunk of it
-  C_IO_Dir_TMAP_Fetched *fin = new C_IO_Dir_TMAP_Fetched(this, want_dn);
+  C_Dir_TMAP_Fetched *fin = new C_Dir_TMAP_Fetched(this, want_dn);
   object_t oid = get_ondisk_object();
   object_locator_t oloc(cache->mds->mdsmap->get_metadata_pool());
   ObjectOperation rd;
   rd.tmap_get(&fin->bl, NULL);
-  cache->mds->objecter->read(oid, oloc, rd, CEPH_NOSNAP, NULL, 0,
-			     new C_OnFinisher(fin, &cache->mds->finisher));
+  cache->mds->objecter->read(oid, oloc, rd, CEPH_NOSNAP, NULL, 0, fin);
 }
 
 void CDir::_tmap_fetched(bufferlist& bl, const string& want_dn, int r)
 {
-  LogChannelRef clog = cache->mds->clog;
+  LogClient &clog = cache->mds->clog;
   dout(10) << "_tmap_fetched " << bl.length()  << " bytes for " << *this
 	   << " want_dn=" << want_dn << dendl;
 
@@ -1412,7 +1426,7 @@ void CDir::_tmap_fetched(bufferlist& bl, const string& want_dn, int r)
     ::decode(omap, p);
 
     if (!p.end()) {
-      clog->warn() << "tmap buffer of dir " << dirfrag() << " has "
+      clog.warn() << "tmap buffer of dir " << dirfrag() << " has "
 		  << bl.length() - p.get_off() << " extra bytes\n";
     }
     bl.clear();
@@ -1421,15 +1435,16 @@ void CDir::_tmap_fetched(bufferlist& bl, const string& want_dn, int r)
   _omap_fetched(header, omap, want_dn, r);
 }
 
-class C_IO_Dir_OMAP_Fetched : public CDirIOContext {
+class C_Dir_OMAP_Fetched : public Context {
  protected:
+  CDir *dir;
   string want_dn;
  public:
   bufferlist hdrbl;
   map<string, bufferlist> omap;
   int ret1, ret2;
 
-  C_IO_Dir_OMAP_Fetched(CDir *d, const string& w) : CDirIOContext(d), want_dn(w) { }
+  C_Dir_OMAP_Fetched(CDir *d, const string& w) : dir(d), want_dn(w) { }
   void finish(int r) {
     if (r >= 0) r = ret1;
     if (r >= 0) r = ret2;
@@ -1439,20 +1454,19 @@ class C_IO_Dir_OMAP_Fetched : public CDirIOContext {
 
 void CDir::_omap_fetch(const string& want_dn)
 {
-  C_IO_Dir_OMAP_Fetched *fin = new C_IO_Dir_OMAP_Fetched(this, want_dn);
+  C_Dir_OMAP_Fetched *fin = new C_Dir_OMAP_Fetched(this, want_dn);
   object_t oid = get_ondisk_object();
   object_locator_t oloc(cache->mds->mdsmap->get_metadata_pool());
   ObjectOperation rd;
   rd.omap_get_header(&fin->hdrbl, &fin->ret1);
   rd.omap_get_vals("", "", (uint64_t)-1, &fin->omap, &fin->ret2);
-  cache->mds->objecter->read(oid, oloc, rd, CEPH_NOSNAP, NULL, 0,
-			     new C_OnFinisher(fin, &cache->mds->finisher));
+  cache->mds->objecter->read(oid, oloc, rd, CEPH_NOSNAP, NULL, 0, fin);
 }
 
 void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
 			 const string& want_dn, int r)
 {
-  LogChannelRef clog = cache->mds->clog;
+  LogClient &clog = cache->mds->clog;
   dout(10) << "_fetched header " << hdrbl.length() << " bytes "
 	   << omap.size() << " keys for " << *this
 	   << " want_dn=" << want_dn << dendl;
@@ -1469,7 +1483,7 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
     }
 
     dout(0) << "_fetched missing object for " << *this << dendl;
-    clog->error() << "dir " << dirfrag() << " object missing on disk; some files may be lost\n";
+    clog.error() << "dir " << dirfrag() << " object missing on disk; some files may be lost\n";
 
     log_mark_dirty();
 
@@ -1488,7 +1502,7 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
     bufferlist::iterator p = hdrbl.begin();
     ::decode(got_fnode, p);
     if (!p.end()) {
-      clog->warn() << "header buffer of dir " << dirfrag() << " has "
+      clog.warn() << "header buffer of dir " << dirfrag() << " has "
 		  << hdrbl.length() - p.get_off() << " extra bytes\n";
     }
   }
@@ -1602,9 +1616,20 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
     else if (type == 'I') {
       // inode
       
-      // Load inode data before looking up or constructing CInode
-      InodeStore inode_data;
-      inode_data.decode_bare(q);
+      // parse out inode
+      inode_t inode;
+      string symlink;
+      fragtree_t fragtree;
+      map<string, bufferptr> xattrs;
+      bufferlist snapbl;
+      map<snapid_t,old_inode_t> old_inodes;
+      ::decode(inode, q);
+      if (inode.is_symlink())
+        ::decode(symlink, q);
+      ::decode(fragtree, q);
+      ::decode(xattrs, q);
+      ::decode(snapbl, q);
+      ::decode(old_inodes, q);
       
       if (stale)
 	continue;
@@ -1624,27 +1649,30 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
 
       if (!dn || undef_inode) {
 	// add inode
-	CInode *in = cache->get_inode(inode_data.inode.ino, last);
+	CInode *in = cache->get_inode(inode.ino, last);
 	if (!in || undef_inode) {
 	  if (undef_inode && in)
 	    in->first = first;
 	  else
 	    in = new CInode(cache, true, first, last);
 	  
-	  in->inode = inode_data.inode;
+	  in->inode = inode;
 	  // symlink?
 	  if (in->is_symlink()) 
-	    in->symlink = inode_data.symlink;
+	    in->symlink = symlink;
 	  
-	  in->dirfragtree.swap(inode_data.dirfragtree);
-	  in->xattrs.swap(inode_data.xattrs);
-	  in->decode_snap_blob(inode_data.snap_blob);
-	  in->old_inodes.swap(inode_data.old_inodes);
+	  in->dirfragtree.swap(fragtree);
+	  in->xattrs.swap(xattrs);
+	  in->decode_snap_blob(snapbl);
+	  in->old_inodes.swap(old_inodes);
 	  if (snaps)
 	    in->purge_stale_snap_data(*snaps);
 
-	  if (!undef_inode) {
-	    cache->add_inode(in); // add
+	  if (undef_inode) {
+	    if (inode.anchored)
+	      dn->adjust_nested_anchors(1);
+	  } else {
+	    cache->add_inode( in ); // add
 	    dn = add_primary_dentry(dname, in, first, last); // link
 	  }
 	  dout(12) << "_fetched  got " << *dn << " " << *in << dendl;
@@ -1668,8 +1696,8 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
 	  string dirpath, inopath;
 	  this->inode->make_path_string(dirpath);
 	  in->make_path_string(inopath);
-	  clog->error() << "loaded dup inode " << inode_data.inode.ino
-	    << " [" << first << "," << last << "] v" << inode_data.inode.version
+	  clog.error() << "loaded dup inode " << inode.ino
+	    << " [" << first << "," << last << "] v" << inode.version
 	    << " at " << dirpath << "/" << dname
 	    << ", but inode " << in->vino() << " v" << in->inode.version
 	    << " already exists at " << inopath << "\n";
@@ -1747,7 +1775,7 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
  * @param want - min version i want committed
  * @param c - callback for completion
  */
-void CDir::commit(version_t want, MDSInternalContextBase *c, bool ignore_authpinnability, int op_prio)
+void CDir::commit(version_t want, Context *c, bool ignore_authpinnability, int op_prio)
 {
   dout(10) << "commit want " << want << " on " << *this << dendl;
   if (want == 0) want = get_version();
@@ -1761,7 +1789,7 @@ void CDir::commit(version_t want, MDSInternalContextBase *c, bool ignore_authpin
   // note: queue up a noop if necessary, so that we always
   // get an auth_pin.
   if (!c)
-    c = new C_MDSInternalNoop;
+    c = new C_NoopContext;
 
   // auth_pin on first waiter
   if (waiting_for_commit.empty())
@@ -1772,10 +1800,11 @@ void CDir::commit(version_t want, MDSInternalContextBase *c, bool ignore_authpin
   _commit(want, op_prio);
 }
 
-class C_IO_Dir_Committed : public CDirIOContext {
+class C_Dir_Committed : public Context {
+  CDir *dir;
   version_t version;
 public:
-  C_IO_Dir_Committed(CDir *d, version_t v) : CDirIOContext(d), version(v) { }
+  C_Dir_Committed(CDir *d, version_t v) : dir(d), version(v) { }
   void finish(int r) {
     assert(r == 0);
     dir->_committed(version);
@@ -1811,10 +1840,7 @@ void CDir::_omap_commit(int op_prio)
   set<string> to_remove;
   map<string, bufferlist> to_set;
 
-  C_GatherBuilder gather(g_ceph_context,
-			 new C_OnFinisher(new C_IO_Dir_Committed(this,
-								 get_version()),
-					  &cache->mds->finisher));
+  C_GatherBuilder gather(g_ceph_context, new C_Dir_Committed(this, get_version()));
 
   SnapContext snapc;
   object_t oid = get_ondisk_object();
@@ -1925,11 +1951,23 @@ void CDir::_encode_dentry(CDentry *dn, bufferlist& bl,
     
     // marker, name, inode, [symlink string]
     bl.append('I');         // inode
-
+    ::encode(in->inode, bl);
+    
+    if (in->is_symlink()) {
+      // include symlink destination!
+      dout(18) << "    including symlink ptr " << in->symlink << dendl;
+      ::encode(in->symlink, bl);
+    }
+    
+    ::encode(in->dirfragtree, bl);
+    ::encode(in->xattrs, bl);
+    bufferlist snapbl;
+    in->encode_snap_blob(snapbl);
+    ::encode(snapbl, bl);
+    
     if (in->is_multiversion() && snaps)
       in->purge_stale_snap_data(*snaps);
-
-    in->encode_bare(bl);
+    ::encode(in->old_inodes, bl);
   }
 }
 
@@ -1971,9 +2009,9 @@ void CDir::_commit(version_t want, int op_prio)
     state_set(STATE_COMMITTING);
   }
   
-  if (cache->mds->logger) cache->mds->logger->inc(l_mds_dir_commit);
+  if (cache->mds->logger) cache->mds->logger->inc(l_mds_dir_c);
 
-  _omap_commit(op_prio);
+   _omap_commit(op_prio);
 }
 
 
@@ -2049,9 +2087,9 @@ void CDir::_committed(version_t v)
   // finishers?
   bool were_waiters = !waiting_for_commit.empty();
   
-  map<version_t, list<MDSInternalContextBase*> >::iterator p = waiting_for_commit.begin();
+  map<version_t, list<Context*> >::iterator p = waiting_for_commit.begin();
   while (p != waiting_for_commit.end()) {
-    map<version_t, list<MDSInternalContextBase*> >::iterator n = p;
+    map<version_t, list<Context*> >::iterator n = p;
     ++n;
     if (p->first > committed_version) {
       dout(10) << " there are waiters for " << p->first << ", committing again" << dendl;
@@ -2257,7 +2295,7 @@ void CDir::set_dir_auth(pair<int,int> a)
 
   // newly single auth?
   if (was_ambiguous && dir_auth.second == CDIR_AUTH_UNKNOWN) {
-    list<MDSInternalContextBase*> ls;
+    list<Context*> ls;
     take_waiting(WAIT_SINGLEAUTH, ls);
     cache->mds->queue_waiters(ls);
   }
@@ -2351,6 +2389,15 @@ void CDir::adjust_nested_auth_pins(int inc, int dirinc, void *by)
   }
 }
 
+void CDir::adjust_nested_anchors(int by)
+{
+  assert(by);
+  nested_anchors += by;
+  dout(20) << "adjust_nested_anchors by " << by << " -> " << nested_anchors << dendl;
+  assert(nested_anchors >= 0);
+  inode->adjust_nested_anchors(by);
+}
+
 #ifdef MDS_VERIFY_FRAGSTAT
 void CDir::verify_fragstat()
 {
@@ -2502,9 +2549,9 @@ CDir *CDir::get_frozen_tree_root()
   }
 }
 
-class C_Dir_AuthUnpin : public CDirContext {
-  public:
-  C_Dir_AuthUnpin(CDir *d) : CDirContext(d) {}
+struct C_Dir_AuthUnpin : public Context {
+  CDir *dir;
+  C_Dir_AuthUnpin(CDir *d) : dir(d) {}
   void finish(int r) {
     dir->auth_unpin(dir->get_inode());
   }
diff --git a/src/mds/CDir.h b/src/mds/CDir.h
index 0e035d8..f5762e2 100644
--- a/src/mds/CDir.h
+++ b/src/mds/CDir.h
@@ -29,6 +29,7 @@
 #include <set>
 #include <map>
 #include <string>
+using namespace std;
 
 
 #include "CInode.h"
@@ -36,6 +37,7 @@
 class CDentry;
 class MDCache;
 class MDCluster;
+class Context;
 class bloom_filter;
 
 struct ObjectOperation;
@@ -169,7 +171,7 @@ public:
 
   fnode_t fnode;
   snapid_t first;
-  std::map<snapid_t,old_rstat_t> dirty_old_rstat;  // [value.first,key]
+  map<snapid_t,old_rstat_t> dirty_old_rstat;  // [value.first,key]
 
   // my inodes with dirty rstat data
   elist<CInode*> dirty_rstat_inodes;     
@@ -181,7 +183,7 @@ public:
 
 protected:
   version_t projected_version;
-  std::list<fnode_t*> projected_fnode;
+  list<fnode_t*> projected_fnode;
 
 public:
   elist<CDir*>::item item_dirty, item_new;
@@ -221,7 +223,7 @@ public:
   void mark_new(LogSegment *ls);
 
 public:
-  typedef std::map<dentry_key_t, CDentry*> map_t;
+  typedef map<dentry_key_t, CDentry*> map_t;
 protected:
 
   // contents of this directory
@@ -246,9 +248,11 @@ protected:
   int nested_auth_pins, dir_auth_pins;
   int request_pins;
 
+  int nested_anchors;
+
   // cache control  (defined for authority; hints for replicas)
   __s32      dir_rep;
-  std::set<__s32> dir_rep_by;      // if dir_rep == REP_LIST
+  set<__s32> dir_rep_by;      // if dir_rep == REP_LIST
 
   // popularity
   dirfrag_load_vec_t pop_me;
@@ -275,9 +279,9 @@ protected:
 
   friend class CDirDiscover;
   friend class CDirExport;
-  friend class C_IO_Dir_TMAP_Fetched;
-  friend class C_IO_Dir_OMAP_Fetched;
-  friend class C_IO_Dir_Committed;
+  friend class C_Dir_TMAP_Fetched;
+  friend class C_Dir_OMAP_Fetched;
+  friend class C_Dir_Committed;
 
   bloom_filter *bloom;
   /* If you set up the bloom filter, you must keep it accurate!
@@ -325,22 +329,22 @@ protected:
 
   // -- dentries and inodes --
  public:
-  CDentry* lookup_exact_snap(const std::string& dname, snapid_t last) {
+  CDentry* lookup_exact_snap(const string& dname, snapid_t last) {
     map_t::iterator p = items.find(dentry_key_t(last, dname.c_str()));
     if (p == items.end())
       return NULL;
     return p->second;
   }
-  CDentry* lookup(const std::string& n, snapid_t snap=CEPH_NOSNAP) {
+  CDentry* lookup(const string& n, snapid_t snap=CEPH_NOSNAP) {
     return lookup(n.c_str(), snap);
   }
   CDentry* lookup(const char *n, snapid_t snap=CEPH_NOSNAP);
 
-  CDentry* add_null_dentry(const std::string& dname, 
+  CDentry* add_null_dentry(const string& dname, 
 			   snapid_t first=2, snapid_t last=CEPH_NOSNAP);
-  CDentry* add_primary_dentry(const std::string& dname, CInode *in, 
+  CDentry* add_primary_dentry(const string& dname, CInode *in, 
 			      snapid_t first=2, snapid_t last=CEPH_NOSNAP);
-  CDentry* add_remote_dentry(const std::string& dname, inodeno_t ino, unsigned char d_type, 
+  CDentry* add_remote_dentry(const string& dname, inodeno_t ino, unsigned char d_type, 
 			     snapid_t first=2, snapid_t last=CEPH_NOSNAP);
   void remove_dentry( CDentry *dn );         // delete dentry
   void link_remote_inode( CDentry *dn, inodeno_t ino, unsigned char d_type);
@@ -350,22 +354,22 @@ protected:
   void try_remove_unlinked_dn(CDentry *dn);
 
   void add_to_bloom(CDentry *dn);
-  bool is_in_bloom(const std::string& name);
+  bool is_in_bloom(const string& name);
   bool has_bloom() { return (bloom ? true : false); }
   void remove_bloom();
 private:
   void link_inode_work( CDentry *dn, CInode *in );
   void unlink_inode_work( CDentry *dn );
   void remove_null_dentries();
-  void purge_stale_snap_data(const std::set<snapid_t>& snaps);
+  void purge_stale_snap_data(const set<snapid_t>& snaps);
 public:
   void touch_dentries_bottom();
-  bool try_trim_snap_dentry(CDentry *dn, const std::set<snapid_t>& snaps);
+  bool try_trim_snap_dentry(CDentry *dn, const set<snapid_t>& snaps);
 
 
 public:
-  void split(int bits, list<CDir*>& subs, list<MDSInternalContextBase*>& waiters, bool replay);
-  void merge(list<CDir*>& subs, list<MDSInternalContextBase*>& waiters, bool replay);
+  void split(int bits, list<CDir*>& subs, list<Context*>& waiters, bool replay);
+  void merge(list<CDir*>& subs, list<Context*>& waiters, bool replay);
 
   bool should_split() {
     return (int)get_frag_size() > g_conf->mds_bal_split_size;
@@ -378,7 +382,7 @@ private:
   void prepare_new_fragment(bool replay);
   void prepare_old_fragment(bool replay);
   void steal_dentry(CDentry *dn);  // from another dir.  used by merge/split.
-  void finish_old_fragment(list<MDSInternalContextBase*>& waiters, bool replay);
+  void finish_old_fragment(list<Context*>& waiters, bool replay);
   void init_fragment_pins();
 
 
@@ -414,9 +418,9 @@ private:
 
 
   // for giving to clients
-  void get_dist_spec(std::set<int>& ls, int auth) {
+  void get_dist_spec(set<int>& ls, int auth) {
     if (is_rep()) {
-      for (std::map<int,unsigned>::iterator p = replicas_begin();
+      for (map<int,unsigned>::iterator p = replicas_begin();
 	   p != replicas_end(); 
 	   ++p)
 	ls.insert(p->first);
@@ -430,7 +434,7 @@ private:
      */
     frag_t frag = get_frag();
     __s32 auth;
-    std::set<__s32> dist;
+    set<__s32> dist;
     
     auth = dir_auth.first;
     if (is_auth()) 
@@ -483,27 +487,25 @@ private:
   object_t get_ondisk_object() { 
     return file_object_t(ino(), frag);
   }
-  void fetch(MDSInternalContextBase *c, bool ignore_authpinnability=false);
-  void fetch(MDSInternalContextBase *c, const std::string& want_dn, bool ignore_authpinnability=false);
+  void fetch(Context *c, bool ignore_authpinnability=false);
+  void fetch(Context *c, const string& want_dn, bool ignore_authpinnability=false);
 protected:
-  void _omap_fetch(const std::string& want_dn);
-  void _omap_fetched(bufferlist& hdrbl, std::map<std::string, bufferlist>& omap,
-		     const std::string& want_dn, int r);
-  void _tmap_fetch(const std::string& want_dn);
-  void _tmap_fetched(bufferlist &bl, const std::string& want_dn, int r);
+  void _omap_fetch(const string& want_dn);
+  void _omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
+		     const string& want_dn, int r);
+  void _tmap_fetch(const string& want_dn);
+  void _tmap_fetched(bufferlist &bl, const string& want_dn, int r);
 
   // -- commit --
-  std::map<version_t, std::list<MDSInternalContextBase*> > waiting_for_commit;
+  map<version_t, list<Context*> > waiting_for_commit;
   void _commit(version_t want, int op_prio);
   void _omap_commit(int op_prio);
-  void _encode_dentry(CDentry *dn, bufferlist& bl, const std::set<snapid_t> *snaps);
+  void _encode_dentry(CDentry *dn, bufferlist& bl, const set<snapid_t> *snaps);
   void _committed(version_t v);
 public:
-#if 0  // unused?
   void wait_for_commit(Context *c, version_t v=0);
-#endif
   void commit_to(version_t want);
-  void commit(version_t want, MDSInternalContextBase *c,
+  void commit(version_t want, Context *c,
 	      bool ignore_authpinnability=false, int op_prio=-1);
 
   // -- dirtyness --
@@ -530,18 +532,26 @@ public:
     
   // -- waiters --
 protected:
-  std::map< string_snap_t, std::list<MDSInternalContextBase*> > waiting_on_dentry;
+  map< string_snap_t, list<Context*> > waiting_on_dentry;
+  map< inodeno_t, list<Context*> > waiting_on_ino;
 
 public:
-  bool is_waiting_for_dentry(const std::string& dname, snapid_t snap) {
+  bool is_waiting_for_dentry(const string& dname, snapid_t snap) {
     return waiting_on_dentry.count(string_snap_t(dname, snap));
   }
-  void add_dentry_waiter(const std::string& dentry, snapid_t snap, MDSInternalContextBase *c);
-  void take_dentry_waiting(const std::string& dentry, snapid_t first, snapid_t last, std::list<MDSInternalContextBase*>& ls);
-  void take_sub_waiting(std::list<MDSInternalContextBase*>& ls);  // dentry or ino
+  void add_dentry_waiter(const string& dentry, snapid_t snap, Context *c);
+  void take_dentry_waiting(const string& dentry, snapid_t first, snapid_t last, list<Context*>& ls);
+
+  bool is_waiting_for_ino(inodeno_t ino) {
+    return waiting_on_ino.count(ino);
+  }
+  void add_ino_waiter(inodeno_t ino, Context *c);
+  void take_ino_waiting(inodeno_t ino, list<Context*>& ls);
+
+  void take_sub_waiting(list<Context*>& ls);  // dentry or ino
 
-  void add_waiter(uint64_t mask, MDSInternalContextBase *c);
-  void take_waiting(uint64_t mask, std::list<MDSInternalContextBase*>& ls);  // may include dentry waiters
+  void add_waiter(uint64_t mask, Context *c);
+  void take_waiting(uint64_t mask, list<Context*>& ls);  // may include dentry waiters
   void finish_waiting(uint64_t mask, int result = 0);    // ditto
   
 
@@ -566,6 +576,9 @@ public:
   void adjust_nested_auth_pins(int inc, int dirinc, void *by);
   void verify_fragstat();
 
+  int get_nested_anchors() { return nested_anchors; }
+  void adjust_nested_anchors(int by);
+
   // -- freezing --
   bool freeze_tree();
   void _freeze_tree();
diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc
index 175cfc3..53a0f44 100644
--- a/src/mds/CInode.cc
+++ b/src/mds/CInode.cc
@@ -49,18 +49,6 @@
 #define dout_prefix *_dout << "mds." << mdcache->mds->get_nodeid() << ".cache.ino(" << inode.ino << ") "
 
 
-class CInodeIOContext : public MDSIOContextBase
-{
-protected:
-  CInode *in;
-  MDS *get_mds() {return in->mdcache->mds;}
-public:
-  CInodeIOContext(CInode *in_) : in(in_) {
-    assert(in != NULL);
-  }
-};
-
-
 boost::pool<> CInode::pool(sizeof(CInode));
 boost::pool<> Capability::pool(sizeof(Capability));
 
@@ -149,6 +137,12 @@ ostream& operator<<(ostream& out, CInode& in)
   if (pi->is_truncating())
     out << " truncating(" << pi->truncate_from << " to " << pi->truncate_size << ")";
 
+  // anchors
+  if (in.is_anchored())
+    out << " anc";
+  if (in.get_nested_anchors())
+    out << " na=" << in.get_nested_anchors();
+
   if (in.inode.is_dir()) {
     out << " " << in.inode.dirstat;
     if (g_conf->mds_debug_scatterstat && in.is_projected()) {
@@ -522,7 +516,7 @@ void CInode::force_dirfrags()
     list<frag_t> leaves;
     dirfragtree.get_leaves(leaves);
     for (list<frag_t>::iterator p = leaves.begin(); p != leaves.end(); ++p)
-      mdcache->get_force_dirfrag(dirfrag_t(ino(),*p), true);
+      mdcache->get_force_dirfrag(dirfrag_t(ino(),*p));
   }
 
   verify_dirfrags();
@@ -584,8 +578,8 @@ CDir *CInode::get_or_open_dirfrag(MDCache *mdcache, frag_t fg)
   CDir *dir = get_dirfrag(fg);
   if (!dir) {
     // create it.
-    assert(is_auth() || mdcache->mds->is_any_replay());
-    dir = new CDir(this, fg, mdcache, is_auth());
+    assert(is_auth());
+    dir = new CDir(this, fg, mdcache, true);
     add_dirfrag(dir);
   }
   return dir;
@@ -816,6 +810,14 @@ void CInode::make_path(filepath& fp)
     fp = filepath(ino());
 }
 
+void CInode::make_anchor_trace(vector<Anchor>& trace)
+{
+  if (get_projected_parent_dn())
+    get_projected_parent_dn()->make_anchor_trace(trace, this);
+  else 
+    assert(is_base());
+}
+
 void CInode::name_stray_dentry(string& dname)
 {
   char s[20];
@@ -823,6 +825,9 @@ void CInode::name_stray_dentry(string& dname)
   dname = s;
 }
 
+
+
+
 version_t CInode::pre_dirty()
 {
   version_t pv; 
@@ -897,24 +902,25 @@ void CInode::mark_clean()
 // per-inode storage
 // (currently for root inode only)
 
-struct C_IO_Inode_Stored : public CInodeIOContext {
+struct C_Inode_Stored : public Context {
+  CInode *in;
   version_t version;
   Context *fin;
-  C_IO_Inode_Stored(CInode *i, version_t v, Context *f) : CInodeIOContext(i), version(v), fin(f) {}
+  C_Inode_Stored(CInode *i, version_t v, Context *f) : in(i), version(v), fin(f) {}
   void finish(int r) {
     assert(r == 0);
     in->_stored(version, fin);
   }
 };
 
-object_t InodeStore::get_object_name(inodeno_t ino, frag_t fg, const char *suffix)
+object_t CInode::get_object_name(inodeno_t ino, frag_t fg, const char *suffix)
 {
   char n[60];
   snprintf(n, sizeof(n), "%llx.%08llx%s", (long long unsigned)ino, (long long unsigned)fg, suffix ? suffix : "");
   return object_t(n);
 }
 
-void CInode::store(MDSInternalContextBase *fin)
+void CInode::store(Context *fin)
 {
   dout(10) << "store " << get_version() << dendl;
   assert(is_base());
@@ -933,12 +939,8 @@ void CInode::store(MDSInternalContextBase *fin)
   object_t oid = CInode::get_object_name(ino(), frag_t(), ".inode");
   object_locator_t oloc(mdcache->mds->mdsmap->get_metadata_pool());
 
-  Context *newfin =
-    new C_OnFinisher(new C_IO_Inode_Stored(this, get_version(), fin),
-		     &mdcache->mds->finisher);
-  mdcache->mds->objecter->mutate(oid, oloc, m, snapc,
-				 ceph_clock_now(g_ceph_context), 0,
-				 NULL, newfin);
+  mdcache->mds->objecter->mutate(oid, oloc, m, snapc, ceph_clock_now(g_ceph_context), 0,
+				 NULL, new C_Inode_Stored(this, get_version(), fin) );
 }
 
 void CInode::_stored(version_t v, Context *fin)
@@ -950,21 +952,22 @@ void CInode::_stored(version_t v, Context *fin)
   fin->complete(0);
 }
 
-struct C_IO_Inode_Fetched : public CInodeIOContext {
+struct C_Inode_Fetched : public Context {
+  CInode *in;
   bufferlist bl, bl2;
   Context *fin;
-  C_IO_Inode_Fetched(CInode *i, Context *f) : CInodeIOContext(i), fin(f) {}
+  C_Inode_Fetched(CInode *i, Context *f) : in(i), fin(f) {}
   void finish(int r) {
     in->_fetched(bl, bl2, fin);
   }
 };
 
-void CInode::fetch(MDSInternalContextBase *fin)
+void CInode::fetch(Context *fin)
 {
   dout(10) << "fetch" << dendl;
 
-  C_IO_Inode_Fetched *c = new C_IO_Inode_Fetched(this, fin);
-  C_GatherBuilder gather(g_ceph_context, new C_OnFinisher(c, &mdcache->mds->finisher));
+  C_Inode_Fetched *c = new C_Inode_Fetched(this, fin);
+  C_GatherBuilder gather(g_ceph_context, c);
 
   object_t oid = CInode::get_object_name(ino(), frag_t(), "");
   object_locator_t oloc(mdcache->mds->mdsmap->get_metadata_pool());
@@ -1029,24 +1032,22 @@ void CInode::build_backtrace(int64_t pool, inode_backtrace_t& bt)
   }
 }
 
-struct C_IO_Inode_StoredBacktrace : public CInodeIOContext {
+struct C_Inode_StoredBacktrace : public Context {
+  CInode *in;
   version_t version;
   Context *fin;
-  C_IO_Inode_StoredBacktrace(CInode *i, version_t v, Context *f) : CInodeIOContext(i), version(v), fin(f) {}
+  C_Inode_StoredBacktrace(CInode *i, version_t v, Context *f) : in(i), version(v), fin(f) {}
   void finish(int r) {
     assert(r == 0);
     in->_stored_backtrace(version, fin);
   }
 };
 
-void CInode::store_backtrace(MDSInternalContextBase *fin, int op_prio)
+void CInode::store_backtrace(Context *fin)
 {
   dout(10) << "store_backtrace on " << *this << dendl;
   assert(is_dirty_parent());
 
-  if (op_prio < 0)
-    op_prio = CEPH_MSG_PRIO_DEFAULT;
-
   auth_pin(this);
 
   int64_t pool;
@@ -1061,16 +1062,13 @@ void CInode::store_backtrace(MDSInternalContextBase *fin, int op_prio)
   ::encode(bt, bl);
 
   ObjectOperation op;
-  op.priority = op_prio;
   op.create(false);
   op.setxattr("parent", bl);
 
   SnapContext snapc;
   object_t oid = get_object_name(ino(), frag_t(), "");
   object_locator_t oloc(pool);
-  Context *fin2 = new C_OnFinisher(
-    new C_IO_Inode_StoredBacktrace(this, inode.backtrace_version, fin),
-    &mdcache->mds->finisher);
+  Context *fin2 = new C_Inode_StoredBacktrace(this, inode.backtrace_version, fin);
 
   if (!state_test(STATE_DIRTYPOOL) || inode.old_pools.empty()) {
     mdcache->mds->objecter->mutate(oid, oloc, op, snapc, ceph_clock_now(g_ceph_context),
@@ -1090,7 +1088,6 @@ void CInode::store_backtrace(MDSInternalContextBase *fin, int op_prio)
       continue;
 
     ObjectOperation op;
-    op.priority = op_prio;
     op.create(false);
     op.setxattr("parent", bl);
 
@@ -1141,40 +1138,31 @@ void CInode::clear_dirty_parent()
 // ------------------
 // parent dir
 
-
-void InodeStore::encode_bare(bufferlist &bl) const
+void CInode::encode_store(bufferlist& bl)
 {
+  ENCODE_START(4, 4, bl);
   ::encode(inode, bl);
   if (is_symlink())
     ::encode(symlink, bl);
   ::encode(dirfragtree, bl);
   ::encode(xattrs, bl);
-  ::encode(snap_blob, bl);
+  bufferlist snapbl;
+  encode_snap_blob(snapbl);
+  ::encode(snapbl, bl);
   ::encode(old_inodes, bl);
-}
-
-void InodeStore::encode(bufferlist &bl) const
-{
-  ENCODE_START(4, 4, bl);
-  encode_bare(bl);
   ENCODE_FINISH(bl);
 }
 
-void CInode::encode_store(bufferlist& bl)
-{
-  encode_snap_blob(snap_blob);
-  InodeStore::encode(bl);
-  snap_blob.clear();
-}
-
-void InodeStore::decode_bare(bufferlist::iterator &bl, __u8 struct_v)
-{
+void CInode::decode_store(bufferlist::iterator& bl) {
+  DECODE_START_LEGACY_COMPAT_LEN(4, 4, 4, bl);
   ::decode(inode, bl);
   if (is_symlink())
     ::decode(symlink, bl);
   ::decode(dirfragtree, bl);
   ::decode(xattrs, bl);
-  ::decode(snap_blob, bl);
+  bufferlist snapbl;
+  ::decode(snapbl, bl);
+  decode_snap_blob(snapbl);
   ::decode(old_inodes, bl);
   if (struct_v == 2 && inode.is_dir()) {
     bool default_layout_exists;
@@ -1184,23 +1172,9 @@ void InodeStore::decode_bare(bufferlist::iterator &bl, __u8 struct_v)
       ::decode(inode.layout, bl); // but we only care about the layout portion
     }
   }
-}
-
-
-void InodeStore::decode(bufferlist::iterator &bl)
-{
-  DECODE_START_LEGACY_COMPAT_LEN(4, 4, 4, bl);
-  decode_bare(bl, struct_v);
   DECODE_FINISH(bl);
 }
 
-void CInode::decode_store(bufferlist::iterator& bl)
-{
-  InodeStore::decode(bl);
-  decode_snap_blob(snap_blob);
-  snap_blob.clear();
-}
-
 // ------------------
 // locking
 
@@ -1227,6 +1201,7 @@ void CInode::encode_lock_state(int type, bufferlist& bl)
     ::encode(inode.version, bl);
     ::encode(inode.ctime, bl);
     ::encode(inode.nlink, bl);
+    ::encode(inode.anchored, bl);
     break;
     
   case CEPH_LOCK_IDFT:
@@ -1403,6 +1378,12 @@ void CInode::decode_lock_state(int type, bufferlist& bl)
     ::decode(tm, p);
     if (inode.ctime < tm) inode.ctime = tm;
     ::decode(inode.nlink, p);
+    {
+      bool was_anchored = inode.anchored;
+      ::decode(inode.anchored, p);
+      if (parent && was_anchored != inode.anchored)
+	parent->adjust_nested_anchors((int)inode.anchored - (int)was_anchored);
+    }
     break;
 
   case CEPH_LOCK_IDFT:
@@ -1698,19 +1679,15 @@ void CInode::start_scatter(ScatterLock *lock)
   }
 }
 
-
-class C_Inode_FragUpdate : public MDSInternalContextBase {
-protected:
+struct C_Inode_FragUpdate : public Context {
   CInode *in;
   CDir *dir;
   MutationRef mut;
-  MDS *get_mds() {return in->mdcache->mds;}
+
+  C_Inode_FragUpdate(CInode *i, CDir *d, MutationRef& m) : in(i), dir(d), mut(m) {}
   void finish(int r) {
     in->_finish_frag_update(dir, mut);
   }    
-
-public:
-  C_Inode_FragUpdate(CInode *i, CDir *d, MutationRef& m) : in(i), dir(d), mut(m) {}
 };
 
 void CInode::finish_scatter_update(ScatterLock *lock, CDir *dir,
@@ -1797,7 +1774,7 @@ void CInode::_finish_frag_update(CDir *dir, MutationRef& mut)
 /* for more info on scatterlocks, see comments by Locker::scatter_writebehind */
 void CInode::finish_scatter_gather_update(int type)
 {
-  LogChannelRef clog = mdcache->mds->clog;
+  LogClient &clog = mdcache->mds->clog;
 
   dout(10) << "finish_scatter_gather_update " << type << " on " << *this << dendl;
   assert(is_auth());
@@ -1805,9 +1782,6 @@ void CInode::finish_scatter_gather_update(int type)
   switch (type) {
   case CEPH_LOCK_IFILE:
     {
-      fragtree_t tmpdft = dirfragtree;
-      struct frag_info_t dirstat;
-
       // adjust summation
       assert(is_auth());
       inode_t *pi = get_projected_inode();
@@ -1838,14 +1812,15 @@ void CInode::finish_scatter_gather_update(int type)
 
 	if (pf->fragstat.nfiles < 0 ||
 	    pf->fragstat.nsubdirs < 0) {
-	  clog->error() << "bad/negative dir size on "
+	  clog.error() << "bad/negative dir size on "
 	      << dir->dirfrag() << " " << pf->fragstat << "\n";
-	  assert(!"bad/negative fragstat" == g_conf->mds_verify_scatter);
 	  
 	  if (pf->fragstat.nfiles < 0)
 	    pf->fragstat.nfiles = 0;
 	  if (pf->fragstat.nsubdirs < 0)
 	    pf->fragstat.nsubdirs = 0;
+
+	  assert(!"bad/negative frag size" == g_conf->mds_verify_scatter);
 	}
 
 	if (update) {
@@ -1854,54 +1829,42 @@ void CInode::finish_scatter_gather_update(int type)
 	  dout(10) << fg << " updated accounted_fragstat " << pf->fragstat << " on " << *dir << dendl;
 	}
 
-	tmpdft.force_to_leaf(g_ceph_context, fg);
-	dirstat.add(pf->fragstat);
+	if (fg == frag_t()) { // i.e., we are the only frag
+	  if (pi->dirstat.size() != pf->fragstat.size()) {
+	    clog.error() << "unmatched fragstat size on single "
+	       << "dirfrag " << dir->dirfrag() << ", inode has " 
+	       << pi->dirstat << ", dirfrag has " << pf->fragstat << "\n";
+	    
+	    // trust the dirfrag for now
+	    version_t v = pi->dirstat.version;
+	    pi->dirstat = pf->fragstat;
+	    pi->dirstat.version = v;
+
+	    assert(!"unmatched fragstat size" == g_conf->mds_verify_scatter);
+	  }
+	}
       }
       if (touched_mtime)
 	pi->mtime = pi->ctime = pi->dirstat.mtime;
       dout(20) << " final dirstat " << pi->dirstat << dendl;
 
-      if (dirstat.nfiles != pi->dirstat.nfiles ||
-	  dirstat.nsubdirs != pi->dirstat.nsubdirs) {
-	bool all = true;
-	list<frag_t> ls;
-	tmpdft.get_leaves_under(frag_t(), ls);
-	for (list<frag_t>::iterator p = ls.begin(); p != ls.end(); ++p)
-	  if (!dirfrags.count(*p)) {
-	    all = false;
-	    break;
-	  }
-	if (all) {
-	  clog->error() << "unmatched fragstat on " << ino() << ", inode has "
-		       << pi->dirstat << ", dirfrags have " << dirstat << "\n";
-	  assert(!"unmatched fragstat" == g_conf->mds_verify_scatter);
-	  // trust the dirfrags for now
-	  version_t v = pi->dirstat.version;
-	  pi->dirstat = dirstat;
-	  pi->dirstat.version = v;
-	}
-      }
-
       if (pi->dirstat.nfiles < 0 ||
 	  pi->dirstat.nsubdirs < 0) {
-	clog->error() << "bad/negative fragstat on " << ino()
+	clog.error() << "bad/negative dir size on " << ino()
 	    << ", inode has " << pi->dirstat << "\n";
-	assert(!"bad/negative fragstat" == g_conf->mds_verify_scatter);
 
 	if (pi->dirstat.nfiles < 0)
 	  pi->dirstat.nfiles = 0;
 	if (pi->dirstat.nsubdirs < 0)
 	  pi->dirstat.nsubdirs = 0;
+
+	assert(!"bad/negative dir size" == g_conf->mds_verify_scatter);
       }
     }
     break;
 
   case CEPH_LOCK_INEST:
     {
-      fragtree_t tmpdft = dirfragtree;
-      nest_info_t rstat;
-      rstat.rsubdirs = 1;
-
       // adjust summation
       assert(is_auth());
       inode_t *pi = get_projected_inode();
@@ -1946,35 +1909,40 @@ void CInode::finish_scatter_gather_update(int type)
 	  pf->accounted_rstat = pf->rstat;
 	  dir->dirty_old_rstat.clear();
 	  pf->rstat.version = pf->accounted_rstat.version = pi->rstat.version;
-	  dir->check_rstats();
 	  dout(10) << fg << " updated accounted_rstat " << pf->rstat << " on " << *dir << dendl;
 	}
 
-	tmpdft.force_to_leaf(g_ceph_context, fg);
-	rstat.add(pf->rstat);
+	if (fg == frag_t()) { // i.e., we are the only frag
+	  if (pi->rstat.rbytes != pf->rstat.rbytes) { 
+	    clog.error() << "unmatched rstat rbytes on single dirfrag "
+		<< dir->dirfrag() << ", inode has " << pi->rstat
+		<< ", dirfrag has " << pf->rstat << "\n";
+	    
+	    // trust the dirfrag for now
+	    version_t v = pi->rstat.version;
+	    pi->rstat = pf->rstat;
+	    pi->rstat.version = v;
+	    
+	    assert(!"unmatched rstat rbytes" == g_conf->mds_verify_scatter);
+	  }
+	}
+	if (update)
+	  dir->check_rstats();
       }
       dout(20) << " final rstat " << pi->rstat << dendl;
 
-      if (rstat.rfiles != pi->rstat.rfiles ||
-	  rstat.rsubdirs != pi->rstat.rsubdirs ||
-	  rstat.rbytes != pi->rstat.rbytes) {
-	bool all = true;
-	list<frag_t> ls;
-	tmpdft.get_leaves_under(frag_t(), ls);
-	for (list<frag_t>::iterator p = ls.begin(); p != ls.end(); ++p)
-	  if (!dirfrags.count(*p)) {
-	    all = false;
-	    break;
-	  }
-	if (all) {
-	  clog->error() << "unmatched rstat on " << ino() << ", inode has "
-		       << pi->rstat << ", dirfrags have " << rstat << "\n";
-	  assert(!"unmatched rstat" == g_conf->mds_verify_scatter);
-	  // trust the dirfrag for now
-	  version_t v = pi->rstat.version;
-	  pi->rstat = rstat;
-	  pi->rstat.version = v;
-	}
+      //assert(pi->rstat.rfiles >= 0);
+      if (pi->rstat.rfiles < 0) {
+	clog.error() << "rfiles underflow " << pi->rstat.rfiles
+		     << " on " << *this << "\n";
+	pi->rstat.rfiles = 0;
+      }
+
+      //assert(pi->rstat.rsubdirs >= 0);
+      if (pi->rstat.rsubdirs < 0) {
+	clog.error() << "rsubdirs underflow " << pi->rstat.rsubdirs
+		     << " on " << *this << "\n";
+	pi->rstat.rsubdirs = 0;
       }
     }
     break;
@@ -2037,7 +2005,7 @@ bool CInode::is_freezing()
   return false;
 }
 
-void CInode::add_dir_waiter(frag_t fg, MDSInternalContextBase *c)
+void CInode::add_dir_waiter(frag_t fg, Context *c)
 {
   if (waiting_on_dir.empty())
     get(PIN_DIRWAITER);
@@ -2045,12 +2013,12 @@ void CInode::add_dir_waiter(frag_t fg, MDSInternalContextBase *c)
   dout(10) << "add_dir_waiter frag " << fg << " " << c << " on " << *this << dendl;
 }
 
-void CInode::take_dir_waiting(frag_t fg, list<MDSInternalContextBase*>& ls)
+void CInode::take_dir_waiting(frag_t fg, list<Context*>& ls)
 {
   if (waiting_on_dir.empty())
     return;
 
-  map<frag_t, list<MDSInternalContextBase*> >::iterator p = waiting_on_dir.find(fg);
+  map<frag_t, list<Context*> >::iterator p = waiting_on_dir.find(fg);
   if (p != waiting_on_dir.end()) {
     dout(10) << "take_dir_waiting frag " << fg << " on " << *this << dendl;
     ls.splice(ls.end(), p->second);
@@ -2061,7 +2029,7 @@ void CInode::take_dir_waiting(frag_t fg, list<MDSInternalContextBase*>& ls)
   }
 }
 
-void CInode::add_waiter(uint64_t tag, MDSInternalContextBase *c) 
+void CInode::add_waiter(uint64_t tag, Context *c) 
 {
   dout(10) << "add_waiter tag " << std::hex << tag << std::dec << " " << c
 	   << " !ambig " << !state_test(STATE_AMBIGUOUSAUTH)
@@ -2081,12 +2049,12 @@ void CInode::add_waiter(uint64_t tag, MDSInternalContextBase *c)
   MDSCacheObject::add_waiter(tag, c);
 }
 
-void CInode::take_waiting(uint64_t mask, list<MDSInternalContextBase*>& ls)
+void CInode::take_waiting(uint64_t mask, list<Context*>& ls)
 {
   if ((mask & WAIT_DIR) && !waiting_on_dir.empty()) {
     // take all dentry waiters
     while (!waiting_on_dir.empty()) {
-      map<frag_t, list<MDSInternalContextBase*> >::iterator p = waiting_on_dir.begin();
+      map<frag_t, list<Context*> >::iterator p = waiting_on_dir.begin();
       dout(10) << "take_waiting dirfrag " << p->first << " on " << *this << dendl;
       ls.splice(ls.end(), p->second);
       waiting_on_dir.erase(p);
@@ -2119,7 +2087,7 @@ bool CInode::freeze_inode(int auth_pin_allowance)
   return true;
 }
 
-void CInode::unfreeze_inode(list<MDSInternalContextBase*>& finished) 
+void CInode::unfreeze_inode(list<Context*>& finished) 
 {
   dout(10) << "unfreeze_inode" << dendl;
   if (state_test(STATE_FREEZING)) {
@@ -2135,7 +2103,7 @@ void CInode::unfreeze_inode(list<MDSInternalContextBase*>& finished)
 
 void CInode::unfreeze_inode()
 {
-    list<MDSInternalContextBase*> finished;
+    list<Context*> finished;
     unfreeze_inode(finished);
     mdcache->mds->queue_waiters(finished);
 }
@@ -2151,13 +2119,13 @@ void CInode::unfreeze_auth_pin()
   assert(state_test(CInode::STATE_FROZENAUTHPIN));
   state_clear(CInode::STATE_FROZENAUTHPIN);
   if (!state_test(STATE_FREEZING|STATE_FROZEN)) {
-    list<MDSInternalContextBase*> finished;
+    list<Context*> finished;
     take_waiting(WAIT_UNFREEZE, finished);
     mdcache->mds->queue_waiters(finished);
   }
 }
 
-void CInode::clear_ambiguous_auth(list<MDSInternalContextBase*>& finished)
+void CInode::clear_ambiguous_auth(list<Context*>& finished)
 {
   assert(state_test(CInode::STATE_AMBIGUOUSAUTH));
   state_clear(CInode::STATE_AMBIGUOUSAUTH);
@@ -2166,7 +2134,7 @@ void CInode::clear_ambiguous_auth(list<MDSInternalContextBase*>& finished)
 
 void CInode::clear_ambiguous_auth()
 {
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
   clear_ambiguous_auth(finished);
   mdcache->mds->queue_waiters(finished);
 }
@@ -2256,6 +2224,15 @@ void CInode::adjust_nested_auth_pins(int a, void *by)
     parent->adjust_nested_auth_pins(a, 0, by);
 }
 
+void CInode::adjust_nested_anchors(int by)
+{
+  assert(by);
+  nested_anchors += by;
+  dout(20) << "adjust_nested_anchors by " << by << " -> " << nested_anchors << dendl;
+  assert(nested_anchors >= 0);
+  if (parent)
+    parent->adjust_nested_anchors(by);
+}
 
 // authority
 
@@ -2406,7 +2383,7 @@ void CInode::encode_snap_blob(bufferlist &snapbl)
     dout(20) << "encode_snap_blob " << *snaprealm << dendl;
   }
 }
-void CInode::decode_snap_blob(bufferlist& snapbl)
+void CInode::decode_snap_blob(bufferlist& snapbl) 
 {
   if (snapbl.length()) {
     open_snaprealm();
@@ -2501,7 +2478,7 @@ void CInode::choose_lock_state(SimpleLock *lock, int allissued)
   if (is_auth()) {
     if (lock->is_xlocked()) {
       // do nothing here
-    } else if (lock->get_state() != LOCK_MIX) {
+    } else {
       if (issued & CEPH_CAP_GEXCL)
 	lock->set_state(LOCK_EXCL);
       else if (issued & CEPH_CAP_GWR)
@@ -2572,8 +2549,6 @@ void CInode::remove_client_cap(client_t client)
   Capability *cap = client_caps[client];
   
   cap->item_session_caps.remove_myself();
-  cap->item_revoking_caps.remove_myself();
-  cap->item_client_revoking_caps.remove_myself();
   containing_realm->remove_cap(client, cap);
   
   if (client == loner_cap)
@@ -2595,7 +2570,7 @@ void CInode::remove_client_cap(client_t client)
   bool fcntl_removed = fcntl_locks.remove_all_from(client);
   bool flock_removed = flock_locks.remove_all_from(client);
   if (fcntl_removed || flock_removed) {
-    list<MDSInternalContextBase*> waiters;
+    list<Context*> waiters;
     take_waiting(CInode::WAIT_FLOCK, waiters);
     mdcache->mds->queue_waiters(waiters);
   }
@@ -2959,13 +2934,11 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
 
   // xattr
   bufferlist xbl;
+  e.xattr_version = i->xattr_version;
   if (!had_latest_xattrs) {
     if (!pxattrs)
       pxattrs = pxattr ? get_projected_xattrs() : &xattrs;
     ::encode(*pxattrs, xbl);
-    e.xattr_version = i->xattr_version;
-  } else {
-    e.xattr_version = 0;
   }
   
   // do we have room?
@@ -3032,8 +3005,6 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
       e.cap.mseq = cap->get_mseq();
       e.cap.realm = realm->inode->ino();
     } else {
-      if (cap)
-	cap->clear_new();
       e.cap.cap_id = 0;
       e.cap.caps = 0;
       e.cap.seq = 0;
@@ -3067,7 +3038,6 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
     } else {
       dout(10) << "dropping xattrs version " << i->xattr_version << dendl;
       xbl.clear(); // no xattrs .. XXX what's this about?!?
-      e.xattr_version = 0;
     }
   }
 
@@ -3169,7 +3139,11 @@ void CInode::_encode_base(bufferlist& bl)
 void CInode::_decode_base(bufferlist::iterator& p)
 {
   ::decode(first, p);
+  bool was_anchored = inode.anchored;
   ::decode(inode, p);
+  if (parent && was_anchored != inode.anchored)
+    parent->adjust_nested_anchors((int)inode.anchored - (int)was_anchored);
+
   ::decode(symlink, p);
   ::decode(dirfragtree, p);
   ::decode(xattrs, p);
@@ -3244,7 +3218,7 @@ void CInode::_decode_locks_state(bufferlist::iterator& p, bool is_new)
   flocklock.decode_state(p, is_new);
   policylock.decode_state(p, is_new);
 }
-void CInode::_decode_locks_rejoin(bufferlist::iterator& p, list<MDSInternalContextBase*>& waiters,
+void CInode::_decode_locks_rejoin(bufferlist::iterator& p, list<Context*>& waiters,
 				  list<SimpleLock*>& eval_locks)
 {
   authlock.decode_state_rejoin(p, waiters);
@@ -3398,37 +3372,3 @@ void CInode::decode_import(bufferlist::iterator& p,
 
   DECODE_FINISH(p);
 }
-
-
-void InodeStore::dump(Formatter *f) const
-{
-  f->open_object_section("inode_store");
-  {
-    inode.dump(f);
-    f->dump_string("symlink", symlink);
-    // FIXME: dirfragtree: dump methods for fragtree_t
-    // FIXME: xattrs: JSON-safe versions of binary xattrs
-    f->open_array_section("old_inodes");
-    for (std::map<snapid_t, old_inode_t>::const_iterator i = old_inodes.begin(); i != old_inodes.end(); ++i) {
-      f->open_object_section("old_inode");
-      {
-        // The key is the last snapid, the first is in the old_inode_t
-        f->dump_int("last", i->first);
-        i->second.dump(f);
-      }
-      f->close_section();  // old_inode
-    }
-    f->close_section();  // old_inodes
-  }
-  f->close_section();  // inode_store
-}
-
-
-void InodeStore::generate_test_instances(list<InodeStore*> &ls)
-{
-  InodeStore *populated = new InodeStore;
-  populated->inode.ino = 0xdeadbeef;
-  populated->symlink = "rhubarb";
-  ls.push_back(populated);
-}
-
diff --git a/src/mds/CInode.h b/src/mds/CInode.h
index 2162820..cb1add3 100644
--- a/src/mds/CInode.h
+++ b/src/mds/CInode.h
@@ -18,6 +18,7 @@
 #define CEPH_CINODE_H
 
 #include "common/config.h"
+#include "include/dlist.h"
 #include "include/elist.h"
 #include "include/types.h"
 #include "include/lru.h"
@@ -33,9 +34,11 @@
 #include "SnapRealm.h"
 
 #include <list>
+#include <vector>
 #include <set>
 #include <map>
-//#include <iostream>
+#include <iostream>
+using namespace std;
 
 class Context;
 class CDentry;
@@ -60,44 +63,8 @@ struct cinode_lock_info_t {
 extern cinode_lock_info_t cinode_lock_info[];
 extern int num_cinode_locks;
 
-
-/**
- * Base class for CInode, containing the backing store data and
- * serialization methods.  This exists so that we can read and
- * handle CInodes from the backing store without hitting all
- * the business logic in CInode proper.
- */
-class InodeStore {
-public:
-  inode_t                    inode;        // the inode itself
-  std::string                symlink;      // symlink dest, if symlink
-  std::map<std::string, bufferptr> xattrs;
-  fragtree_t                 dirfragtree;  // dir frag tree, if any.  always consistent with our dirfrag map.
-  std::map<snapid_t, old_inode_t> old_inodes;   // key = last, value.first = first
-  bufferlist		     snap_blob;    // Encoded copy of SnapRealm, because we can't
-                                           // rehydrate it without full MDCache
-
-  /* Helpers */
-  bool is_file() const    { return inode.is_file(); }
-  bool is_symlink() const { return inode.is_symlink(); }
-  bool is_dir() const     { return inode.is_dir(); }
-  static object_t get_object_name(inodeno_t ino, frag_t fg, const char *suffix);
-
-  /* Full serialization for use in ".inode" root inode objects */
-  void encode(bufferlist &bl) const;
-  void decode(bufferlist::iterator &bl);
-
-  /* Serialization without ENCODE_START/FINISH blocks for use embedded in dentry */
-  void encode_bare(bufferlist &bl) const;
-  void decode_bare(bufferlist::iterator &bl, __u8 struct_v=4);
-
-  /* For use in debug and ceph-dencoder */
-  void dump(Formatter *f) const;
-  static void generate_test_instances(std::list<InodeStore*>& ls);
-};
-
 // cached inode wrapper
-class CInode : public MDSCacheObject, public InodeStore {
+class CInode : public MDSCacheObject {
   /*
    * This class uses a boost::pool to handle allocation. This is *not*
    * thread-safe, so don't do allocations from multiple threads!
@@ -124,6 +91,8 @@ public:
   static const int PIN_DIRFRAG =         -1; 
   static const int PIN_CAPS =             2;  // client caps
   static const int PIN_IMPORTING =       -4;  // importing
+  static const int PIN_ANCHORING =        5;
+  static const int PIN_UNANCHORING =      6;
   static const int PIN_OPENINGDIR =       7;
   static const int PIN_REMOTEPARENT =     8;
   static const int PIN_BATCHOPENJOURNAL = 9;
@@ -148,6 +117,8 @@ public:
     case PIN_DIRFRAG: return "dirfrag";
     case PIN_CAPS: return "caps";
     case PIN_IMPORTING: return "importing";
+    case PIN_ANCHORING: return "anchoring";
+    case PIN_UNANCHORING: return "unanchoring";
     case PIN_OPENINGDIR: return "openingdir";
     case PIN_REMOTEPARENT: return "remoteparent";
     case PIN_BATCHOPENJOURNAL: return "batchopenjournal";
@@ -172,6 +143,8 @@ public:
 
   // -- state --
   static const int STATE_EXPORTING =   (1<<2);   // on nonauth bystander.
+  static const int STATE_ANCHORING =   (1<<3);
+  static const int STATE_UNANCHORING = (1<<4);
   static const int STATE_OPENINGDIR =  (1<<5);
   static const int STATE_FREEZING =    (1<<7);
   static const int STATE_FROZEN =      (1<<8);
@@ -195,9 +168,11 @@ public:
 
   // -- waiters --
   static const uint64_t WAIT_DIR         = (1<<0);
-  static const uint64_t WAIT_FROZEN      = (1<<1);
-  static const uint64_t WAIT_TRUNC       = (1<<2);
-  static const uint64_t WAIT_FLOCK       = (1<<3);
+  static const uint64_t WAIT_ANCHORED    = (1<<1);
+  static const uint64_t WAIT_UNANCHORED  = (1<<2);
+  static const uint64_t WAIT_FROZEN      = (1<<3);
+  static const uint64_t WAIT_TRUNC       = (1<<4);
+  static const uint64_t WAIT_FLOCK       = (1<<5);
   
   static const uint64_t WAIT_ANY_MASK	= (uint64_t)(-1);
 
@@ -209,10 +184,17 @@ public:
  public:
   MDCache *mdcache;
 
+  // inode contents proper
+  inode_t          inode;        // the inode itself
+  string           symlink;      // symlink dest, if symlink
+  map<string, bufferptr> xattrs;
+  fragtree_t       dirfragtree;  // dir frag tree, if any.  always consistent with our dirfrag map.
   SnapRealm        *snaprealm;
+
   SnapRealm        *containing_realm;
   snapid_t          first, last;
-  std::set<snapid_t> dirty_old_rstats;
+  map<snapid_t, old_inode_t> old_inodes;  // key = last, value.first = first
+  set<snapid_t> dirty_old_rstats;
 
   bool is_multiversion() {
     return snaprealm ||  // other snaprealms will link to me
@@ -254,19 +236,19 @@ public:
 
   struct projected_inode_t {
     inode_t *inode;
-    std::map<std::string,bufferptr> *xattrs;
+    map<string,bufferptr> *xattrs;
     sr_t *snapnode;
 
     projected_inode_t()
       : inode(NULL), xattrs(NULL), snapnode(NULL) {}
     projected_inode_t(inode_t *in, sr_t *sn)
       : inode(in), xattrs(NULL), snapnode(sn) {}
-    projected_inode_t(inode_t *in, std::map<std::string, bufferptr> *xp = NULL, sr_t *sn = NULL)
+    projected_inode_t(inode_t *in, map<string, bufferptr> *xp = NULL, sr_t *sn = NULL)
       : inode(in), xattrs(xp), snapnode(sn) {}
   };
-  std::list<projected_inode_t*> projected_nodes;   // projected values (only defined while dirty)
+  list<projected_inode_t*> projected_nodes;   // projected values (only defined while dirty)
   
-  inode_t *project_inode(std::map<std::string,bufferptr> *px=0);
+  inode_t *project_inode(map<string,bufferptr> *px=0);
   void pop_and_dirty_projected_inode(LogSegment *ls);
 
   projected_inode_t *get_projected_node() {
@@ -294,7 +276,7 @@ public:
   }
   inode_t *get_previous_projected_inode() {
     assert(!projected_nodes.empty());
-    std::list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
+    list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
     ++p;
     if (p != projected_nodes.rend())
       return (*p)->inode;
@@ -302,17 +284,17 @@ public:
       return &inode;
   }
 
-  std::map<std::string,bufferptr> *get_projected_xattrs() {
-    for (std::list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
+  map<string,bufferptr> *get_projected_xattrs() {
+    for (list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
 	 p != projected_nodes.rend();
 	 ++p)
       if ((*p)->xattrs)
 	return (*p)->xattrs;
     return &xattrs;
   }
-  std::map<std::string,bufferptr> *get_previous_projected_xattrs() {
-      std::list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
-    for (++p;  // skip the most recent projected value
+  map<string,bufferptr> *get_previous_projected_xattrs() {
+    list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
+    for (p++;  // skip the most recent projected value
 	 p != projected_nodes.rend();
 	 ++p)
       if ((*p)->xattrs)
@@ -328,7 +310,7 @@ public:
       else
 	return NULL;
     } else {
-      for (std::list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
+      for (list<projected_inode_t*>::reverse_iterator p = projected_nodes.rbegin();
           p != projected_nodes.rend();
           ++p)
         if ((*p)->snapnode)
@@ -345,16 +327,16 @@ public:
   old_inode_t& cow_old_inode(snapid_t follows, bool cow_head);
   old_inode_t *pick_old_inode(snapid_t last);
   void pre_cow_old_inode();
-  void purge_stale_snap_data(const std::set<snapid_t>& snaps);
+  void purge_stale_snap_data(const set<snapid_t>& snaps);
 
   // -- cache infrastructure --
 private:
-  std::map<frag_t,CDir*> dirfrags; // cached dir fragments under this Inode
+  map<frag_t,CDir*> dirfrags; // cached dir fragments under this Inode
   int stickydir_ref;
 
 public:
-  __u32 hash_dentry_name(const std::string &dn);
-  frag_t pick_dirfrag(const std::string &dn);
+  __u32 hash_dentry_name(const string &dn);
+  frag_t pick_dirfrag(const string &dn);
   bool has_dirfrags() { return !dirfrags.empty(); }
   CDir* get_dirfrag(frag_t fg) {
     if (dirfrags.count(fg)) {
@@ -363,11 +345,11 @@ public:
     } else
       return NULL;
   }
-  bool get_dirfrags_under(frag_t fg, std::list<CDir*>& ls);
+  bool get_dirfrags_under(frag_t fg, list<CDir*>& ls);
   CDir* get_approx_dirfrag(frag_t fg);
-  void get_dirfrags(std::list<CDir*>& ls);
-  void get_nested_dirfrags(std::list<CDir*>& ls);
-  void get_subtree_dirfrags(std::list<CDir*>& ls);
+  void get_dirfrags(list<CDir*>& ls);
+  void get_nested_dirfrags(list<CDir*>& ls);
+  void get_subtree_dirfrags(list<CDir*>& ls);
   CDir *get_or_open_dirfrag(MDCache *mdcache, frag_t fg);
   CDir *add_dirfrag(CDir *dir);
   void close_dirfrag(frag_t fg);
@@ -384,22 +366,22 @@ public:
  protected:
   // parent dentries in cache
   CDentry         *parent;             // primary link
-  std::set<CDentry*>    remote_parents;     // if hard linked
+  set<CDentry*>    remote_parents;     // if hard linked
 
-  std::list<CDentry*>   projected_parent;   // for in-progress rename, (un)link, etc.
+  list<CDentry*>   projected_parent;   // for in-progress rename, (un)link, etc.
 
   pair<int,int> inode_auth;
 
   // -- distributed state --
 protected:
   // file capabilities
-  std::map<client_t, Capability*> client_caps;         // client -> caps
-  std::map<int32_t, int32_t>      mds_caps_wanted;     // [auth] mds -> caps wanted
+  map<client_t, Capability*> client_caps;         // client -> caps
+  map<int32_t, int32_t>      mds_caps_wanted;     // [auth] mds -> caps wanted
   int                   replica_caps_wanted; // [replica] what i've requested from auth
 
-  std::map<int, std::set<client_t> > client_snap_caps;     // [auth] [snap] dirty metadata we still need from the head
+  map<int, set<client_t> > client_snap_caps;     // [auth] [snap] dirty metadata we still need from the head
 public:
-  std::map<snapid_t, std::set<client_t> > client_need_snapflush;
+  map<snapid_t, set<client_t> > client_need_snapflush;
 
   void add_need_snapflush(CInode *snapin, snapid_t snapid, client_t client);
   void remove_need_snapflush(CInode *snapin, snapid_t snapid, client_t client);
@@ -414,7 +396,7 @@ protected:
     flock_locks.clear();
   }
 
-  // LogSegment lists i (may) belong to
+  // LogSegment dlists i (may) belong to
 public:
   elist<CInode*>::item item_dirty;
   elist<CInode*>::item item_caps;
@@ -434,6 +416,10 @@ public:
 #endif
   int auth_pin_freeze_allowance;
 
+private:
+  int nested_anchors;   // _NOT_ including me!
+
+ public:
   inode_load_vec_t pop;
 
   // friends
@@ -444,6 +430,7 @@ public:
   friend class CDir;
   friend class CInodeExport;
 
+ public:
   // ---------------------------
   CInode(MDCache *c, bool auth=true, snapid_t f=2, snapid_t l=CEPH_NOSNAP) : 
     mdcache(c),
@@ -461,6 +448,7 @@ public:
     item_dirty_dirfrag_dirfragtree(this), 
     auth_pins(0), nested_auth_pins(0),
     auth_pin_freeze_allowance(0),
+    nested_anchors(0),
     pop(ceph_clock_now(g_ceph_context)),
     versionlock(this, &versionlock_type),
     authlock(this, &authlock_type),
@@ -478,7 +466,7 @@ public:
     g_num_inoa++;
     state = 0;  
     if (auth) state_set(STATE_AUTH);
-  }
+  };
   ~CInode() {
     g_num_ino--;
     g_num_inos++;
@@ -488,6 +476,14 @@ public:
   
 
   // -- accessors --
+  bool is_file()    { return inode.is_file(); }
+  bool is_symlink() { return inode.is_symlink(); }
+  bool is_dir()     { return inode.is_dir(); }
+
+  bool is_anchored() { return inode.anchored; }
+  bool is_anchoring() { return state_test(STATE_ANCHORING); }
+  bool is_unanchoring() { return state_test(STATE_UNANCHORING); }
+  
   bool is_root() { return inode.ino == MDS_INO_ROOT; }
   bool is_stray() { return MDS_INO_IS_STRAY(inode.ino); }
   bool is_mdsdir() { return MDS_INO_IS_MDSDIR(inode.ino); }
@@ -504,7 +500,7 @@ public:
   void set_ambiguous_auth() {
     state_set(STATE_AMBIGUOUSAUTH);
   }
-  void clear_ambiguous_auth(std::list<MDSInternalContextBase*>& finished);
+  void clear_ambiguous_auth(list<Context*>& finished);
   void clear_ambiguous_auth();
 
   inodeno_t ino() const { return inode.ino; }
@@ -526,10 +522,15 @@ public:
 
   // -- misc -- 
   bool is_projected_ancestor_of(CInode *other);
-  void make_path_string(std::string& s, bool force=false, CDentry *use_parent=NULL);
-  void make_path_string_projected(std::string& s);  
+  void make_path_string(string& s, bool force=false, CDentry *use_parent=NULL);
+  void make_path_string_projected(string& s);  
   void make_path(filepath& s);
-  void name_stray_dentry(std::string& dname);
+  void make_anchor_trace(vector<class Anchor>& trace);
+  void name_stray_dentry(string& dname);
+
+
+  static object_t get_object_name(inodeno_t ino, frag_t fg, const char *suffix);
+
   
   // -- dirtyness --
   version_t get_version() { return inode.version; }
@@ -539,21 +540,19 @@ public:
   void mark_dirty(version_t projected_dirv, LogSegment *ls);
   void mark_clean();
 
-  void store(MDSInternalContextBase *fin);
+  void store(Context *fin);
   void _stored(version_t cv, Context *fin);
-  void fetch(MDSInternalContextBase *fin);
+  void fetch(Context *fin);
   void _fetched(bufferlist& bl, bufferlist& bl2, Context *fin);  
 
   void build_backtrace(int64_t pool, inode_backtrace_t& bt);
-  void store_backtrace(MDSInternalContextBase *fin, int op_prio=-1);
+  void store_backtrace(Context *fin);
   void _stored_backtrace(version_t v, Context *fin);
   void _mark_dirty_parent(LogSegment *ls, bool dirty_pool=false);
   void clear_dirty_parent();
   bool is_dirty_parent() { return state_test(STATE_DIRTYPARENT); }
   bool is_dirty_pool() { return state_test(STATE_DIRTYPOOL); }
 
-  void encode_snap_blob(bufferlist &bl);
-  void decode_snap_blob(bufferlist &bl);
   void encode_store(bufferlist& bl);
   void decode_store(bufferlist::iterator& bl);
 
@@ -581,15 +580,15 @@ public:
 
   // -- waiting --
 protected:
-  std::map<frag_t, std::list<MDSInternalContextBase*> > waiting_on_dir;
+  map<frag_t, list<Context*> > waiting_on_dir;
 public:
-  void add_dir_waiter(frag_t fg, MDSInternalContextBase *c);
-  void take_dir_waiting(frag_t fg, std::list<MDSInternalContextBase*>& ls);
+  void add_dir_waiter(frag_t fg, Context *c);
+  void take_dir_waiting(frag_t fg, list<Context*>& ls);
   bool is_waiting_for_dir(frag_t fg) {
     return waiting_on_dir.count(fg);
   }
-  void add_waiter(uint64_t tag, MDSInternalContextBase *c);
-  void take_waiting(uint64_t tag, std::list<MDSInternalContextBase*>& ls);
+  void add_waiter(uint64_t tag, Context *c);
+  void take_waiting(uint64_t tag, list<Context*>& ls);
 
   // -- encode/decode helpers --
   void _encode_base(bufferlist& bl);
@@ -599,8 +598,8 @@ public:
   void _encode_locks_state_for_replica(bufferlist& bl);
   void _encode_locks_state_for_rejoin(bufferlist& bl, int rep);
   void _decode_locks_state(bufferlist::iterator& p, bool is_new);
-  void _decode_locks_rejoin(bufferlist::iterator& p, std::list<MDSInternalContextBase*>& waiters,
-			    std::list<SimpleLock*>& eval_locks);
+  void _decode_locks_rejoin(bufferlist::iterator& p, list<Context*>& waiters,
+			    list<SimpleLock*>& eval_locks);
 
   // -- import/export --
   void encode_export(bufferlist& bl);
@@ -680,6 +679,8 @@ public:
   void open_snaprealm(bool no_split=false);
   void close_snaprealm(bool no_join=false);
   SnapRealm *find_snaprealm();
+  void encode_snap_blob(bufferlist &bl);
+  void decode_snap_blob(bufferlist &bl);
   void encode_snap(bufferlist& bl);
   void decode_snap(bufferlist::iterator& p);
 
@@ -710,7 +711,7 @@ public:
 
   int count_nonstale_caps() {
     int n = 0;
-    for (std::map<client_t,Capability*>::iterator it = client_caps.begin();
+    for (map<client_t,Capability*>::iterator it = client_caps.begin();
          it != client_caps.end();
          ++it) 
       if (!it->second->is_stale())
@@ -719,7 +720,7 @@ public:
   }
   bool multiple_nonstale_caps() {
     int n = 0;
-    for (std::map<client_t,Capability*>::iterator it = client_caps.begin();
+    for (map<client_t,Capability*>::iterator it = client_caps.begin();
          it != client_caps.end();
          ++it) 
       if (!it->second->is_stale()) {
@@ -733,9 +734,9 @@ public:
   bool is_any_caps() { return !client_caps.empty(); }
   bool is_any_nonstale_caps() { return count_nonstale_caps(); }
 
-  std::map<int32_t,int32_t>& get_mds_caps_wanted() { return mds_caps_wanted; }
+  map<int32_t,int32_t>& get_mds_caps_wanted() { return mds_caps_wanted; }
 
-  std::map<client_t,Capability*>& get_client_caps() { return client_caps; }
+  map<client_t,Capability*>& get_client_caps() { return client_caps; }
   Capability *get_client_cap(client_t client) {
     if (client_caps.count(client))
       return client_caps[client];
@@ -753,7 +754,7 @@ public:
 
   Capability *reconnect_cap(client_t client, ceph_mds_cap_reconnect& icr, Session *session);
   void clear_client_caps_after_export();
-  void export_client_caps(std::map<client_t,Capability::Export>& cl);
+  void export_client_caps(map<client_t,Capability::Export>& cl);
 
   // caps allowed
   int get_caps_liked();
@@ -785,6 +786,9 @@ public:
   void auth_pin(void *by);
   void auth_unpin(void *by);
 
+  void adjust_nested_anchors(int by);
+  int get_nested_anchors() { return nested_anchors; }
+
   // -- freeze --
   bool is_freezing_inode() { return state_test(STATE_FREEZING); }
   bool is_frozen_inode() { return state_test(STATE_FROZEN); }
@@ -796,7 +800,7 @@ public:
   /* Freeze the inode. auth_pin_allowance lets the caller account for any
    * auth_pins it is itself holding/responsible for. */
   bool freeze_inode(int auth_pin_allowance=0);
-  void unfreeze_inode(std::list<MDSInternalContextBase*>& finished);
+  void unfreeze_inode(list<Context*>& finished);
   void unfreeze_inode();
 
   void freeze_auth_pin();
diff --git a/src/mds/Capability.h b/src/mds/Capability.h
index 113a010..3d97648 100644
--- a/src/mds/Capability.h
+++ b/src/mds/Capability.h
@@ -115,8 +115,7 @@ private:
   __u32 _wanted;     // what the client wants (ideally)
 
   utime_t last_issue_stamp;
-  utime_t last_revoke_stamp;
-  unsigned num_revoke_warnings;
+
 
   // track in-flight caps --------------
   //  - add new caps to _pending
@@ -194,11 +193,6 @@ public:
 	_issued = caps | _pending;
       }
     }
-
-    if (_issued == _pending) {
-      item_revoking_caps.remove_myself();
-      item_client_revoking_caps.remove_myself();
-    }
     //check_rdcaps_list();
   }
   // we may get a release racing with revocations, which means our revokes will be ignored
@@ -232,8 +226,6 @@ public:
   
   xlist<Capability*>::item item_session_caps;
   xlist<Capability*>::item item_snaprealm_caps;
-  xlist<Capability*>::item item_revoking_caps;
-  xlist<Capability*>::item item_client_revoking_caps;
 
   Capability(CInode *i = NULL, uint64_t id = 0, client_t c = 0) : 
     inode(i), client(c),
@@ -246,8 +238,7 @@ public:
     suppress(0), state(0),
     client_follows(0), client_xattr_version(0),
     client_inline_version(0),
-    item_session_caps(this), item_snaprealm_caps(this),
-    item_revoking_caps(this), item_client_revoking_caps(this) {
+    item_session_caps(this), item_snaprealm_caps(this) {
     g_num_cap++;
     g_num_capa++;
   }
@@ -264,14 +255,9 @@ public:
 
   ceph_seq_t get_last_sent() { return last_sent; }
   utime_t get_last_issue_stamp() { return last_issue_stamp; }
-  utime_t get_last_revoke_stamp() { return last_revoke_stamp; }
 
   void set_last_issue() { last_issue = last_sent; }
   void set_last_issue_stamp(utime_t t) { last_issue_stamp = t; }
-  void set_last_revoke_stamp(utime_t t) { last_revoke_stamp = t; }
-  void reset_num_revoke_warnings() { num_revoke_warnings = 0; }
-  void inc_num_revoke_warnings() { ++num_revoke_warnings; }
-  unsigned get_num_revoke_warnings() { return num_revoke_warnings; }
 
   void set_cap_id(uint64_t i) { cap_id = i; }
   uint64_t get_cap_id() { return cap_id; }
@@ -290,7 +276,7 @@ public:
   void clear_new() { state &= ~STATE_NEW; }
 
   CInode *get_inode() { return inode; }
-  client_t get_client() const { return client; }
+  client_t get_client() { return client; }
 
   // caps this client wants to hold
   int wanted() { return _wanted; }
@@ -299,7 +285,7 @@ public:
     //check_rdcaps_list();
   }
 
-  void inc_last_seq() { last_sent++; }
+  void inc_last_seq() { last_sent++; };
   ceph_seq_t get_last_seq() { return last_sent; }
   ceph_seq_t get_last_issue() { return last_issue; }
 
diff --git a/src/tools/cephfs/Dumper.cc b/src/mds/Dumper.cc
similarity index 58%
rename from src/tools/cephfs/Dumper.cc
rename to src/mds/Dumper.cc
index fb9a43f..a1b393e 100644
--- a/src/tools/cephfs/Dumper.cc
+++ b/src/mds/Dumper.cc
@@ -20,13 +20,11 @@
 #include "common/entity_name.h"
 #include "common/errno.h"
 #include "common/safe_io.h"
+#include "mds/Dumper.h"
 #include "mds/mdstypes.h"
 #include "mds/LogEvent.h"
-#include "mds/JournalPointer.h"
 #include "osdc/Journaler.h"
 
-#include "Dumper.h"
-
 #define dout_subsys ceph_subsys_mds
 
 
@@ -39,25 +37,27 @@ int Dumper::init(int rank_)
     return r;
   }
 
-  JournalPointer jp(rank, mdsmap->get_metadata_pool());
-  int jp_load_result = jp.load(objecter);
-  if (jp_load_result != 0) {
-    std::cerr << "Error loading journal: " << cpp_strerror(jp_load_result) << std::endl;
-    return jp_load_result;
-  } else {
-    ino = jp.front;
-    return 0;
-  }
+  inodeno_t ino = MDS_INO_LOG_OFFSET + rank;
+  journaler = new Journaler(ino, mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC,
+                                       objecter, 0, 0, &timer);
+  return 0;
 }
 
 
-int Dumper::recover_journal(Journaler *journaler)
+int Dumper::recover_journal()
 {
-  C_SaferCond cond;
+  bool done = false;
+  Cond cond;
+  Mutex localLock("dump:recover_journal");
+  int r;
+
   lock.Lock();
-  journaler->recover(&cond);
+  journaler->recover(new C_SafeCond(&localLock, &cond, &done, &r));
   lock.Unlock();
-  int const r = cond.wait();
+  localLock.Lock();
+  while (!done)
+    cond.Wait(localLock);
+  localLock.Unlock();
 
   if (r < 0) { // Error
     derr << "error on recovery: " << cpp_strerror(r) << dendl;
@@ -71,29 +71,33 @@ int Dumper::recover_journal(Journaler *journaler)
 
 void Dumper::dump(const char *dump_file)
 {
+  bool done = false;
   int r = 0;
+  Cond cond;
+  Mutex localLock("dump:lock");
 
-  Journaler journaler(ino, mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC,
-                                       objecter, 0, 0, &timer, &finisher);
-  r = recover_journal(&journaler);
+  r = recover_journal();
   if (r) {
     return;
   }
-  uint64_t start = journaler.get_read_pos();
-  uint64_t end = journaler.get_write_pos();
+  uint64_t start = journaler->get_read_pos();
+  uint64_t end = journaler->get_write_pos();
   uint64_t len = end-start;
+  inodeno_t ino = MDS_INO_LOG_OFFSET + rank;
 
   cout << "journal is " << start << "~" << len << std::endl;
 
   Filer filer(objecter);
   bufferlist bl;
 
-  C_SaferCond cond;
   lock.Lock();
-  filer.read(ino, &journaler.get_layout(), CEPH_NOSNAP,
-             start, len, &bl, 0, &cond);
+  filer.read(ino, &journaler->get_layout(), CEPH_NOSNAP,
+             start, len, &bl, 0, new C_SafeCond(&localLock, &cond, &done));
   lock.Unlock();
-  r = cond.wait();
+  localLock.Lock();
+  while (!done)
+    cond.Wait(localLock);
+  localLock.Unlock();
 
   cout << "read " << bl.length() << " bytes at offset " << start << std::endl;
 
@@ -102,12 +106,10 @@ void Dumper::dump(const char *dump_file)
     // include an informative header
     char buf[200];
     memset(buf, 0, sizeof(buf));
-    sprintf(buf, "Ceph mds%d journal dump\n start offset %llu (0x%llx)\n       length %llu (0x%llx)\n    write_pos %llu (0x%llx)\n    format %llu\n%c",
+    sprintf(buf, "Ceph mds%d journal dump\n start offset %llu (0x%llx)\n       length %llu (0x%llx)\n%c",
 	    rank, 
 	    (unsigned long long)start, (unsigned long long)start,
 	    (unsigned long long)bl.length(), (unsigned long long)bl.length(),
-	    (unsigned long long)journaler.last_committed.write_pos, (unsigned long long)journaler.last_committed.write_pos,
-	    (unsigned long long)journaler.last_committed.stream_format,
 	    4);
     int r = safe_write(fd, buf, sizeof(buf));
     if (r)
@@ -130,7 +132,6 @@ void Dumper::dump(const char *dump_file)
 
 void Dumper::undump(const char *dump_file)
 {
-
   cout << "undump " << dump_file << std::endl;
   
   int fd = ::open(dump_file, O_RDONLY);
@@ -150,19 +151,18 @@ void Dumper::undump(const char *dump_file)
     return;
   }
 
-  long long unsigned start, len, write_pos, format;
+  long long unsigned start, len;
   sscanf(strstr(buf, "start offset"), "start offset %llu", &start);
   sscanf(strstr(buf, "length"), "length %llu", &len);
-  sscanf(strstr(buf, "write_pos"), "write_pos %llu", &write_pos);
-  sscanf(strstr(buf, "format"), "format %llu", &format);
 
   cout << "start " << start << " len " << len << std::endl;
   
+  inodeno_t ino = MDS_INO_LOG_OFFSET + rank;
+
   Journaler::Header h;
-  h.trimmed_pos = start;
+  h.trimmed_pos = start - (start % g_default_file_layout.fl_object_size);
   h.expire_pos = start;
-  h.write_pos = write_pos;
-  h.stream_format = format;
+  h.write_pos = start+len;
   h.magic = CEPH_FS_ONDISK_MAGIC;
 
   h.layout = g_default_file_layout;
@@ -179,59 +179,27 @@ void Dumper::undump(const char *dump_file)
   C_SaferCond header_cond;
   lock.Lock();
   objecter->write_full(oid, oloc, snapc, hbl, ceph_clock_now(g_ceph_context), 0, 
-		       NULL, &header_cond);
+		       NULL, 
+		       &header_cond);
   lock.Unlock();
-
-  r = header_cond.wait();
-  if (r != 0) {
-    derr << "Failed to write header: " << cpp_strerror(r) << dendl;
-    return;
-  }
-
-  Filer filer(objecter);
-
-  /* Erase any objects at the end of the region to which we shall write
-   * the new log data.  This is to avoid leaving trailing junk after
-   * the newly written data.  Any junk more than one object ahead
-   * will be taken care of during normal operation by Journaler's
-   * prezeroing behaviour */
-  {
-    uint32_t const object_size = h.layout.fl_object_size;
-    assert(object_size > 0);
-    uint64_t const last_obj = h.write_pos / object_size;
-    uint64_t const purge_count = 2;
-    C_SaferCond purge_cond;
-    cout << "Purging " << purge_count << " objects from " << last_obj << std::endl;
-    lock.Lock();
-    filer.purge_range(ino, &h.layout, snapc, last_obj, purge_count, ceph_clock_now(g_ceph_context), 0, &purge_cond);
-    lock.Unlock();
-    purge_cond.wait();
-  }
+  header_cond.wait();
   
-  // Stream from `fd` to `filer`
+  // read
+  Filer filer(objecter);
   uint64_t pos = start;
   uint64_t left = len;
   while (left > 0) {
-    // Read
     bufferlist j;
     lseek64(fd, pos, SEEK_SET);
     uint64_t l = MIN(left, 1024*1024);
     j.read_fd(fd, l);
-
-    // Write
     cout << " writing " << pos << "~" << l << std::endl;
-    C_SaferCond write_cond;
+    C_SaferCond body_cond;
     lock.Lock();
-    filer.write(ino, &h.layout, snapc, pos, l, j, ceph_clock_now(g_ceph_context), 0, NULL, &write_cond);
+    filer.write(ino, &h.layout, snapc, pos, l, j, ceph_clock_now(g_ceph_context), 0, NULL, &body_cond);
     lock.Unlock();
+    body_cond.wait();
 
-    r = write_cond.wait();
-    if (r != 0) {
-      derr << "Failed to write header: " << cpp_strerror(r) << dendl;
-      return;
-    }
-      
-    // Advance
     pos += l;
     left -= l;
   }
@@ -240,3 +208,62 @@ void Dumper::undump(const char *dump_file)
   cout << "done." << std::endl;
 }
 
+
+/**
+ * Write JSON-formatted log entries to standard out.
+ */
+void Dumper::dump_entries()
+{
+  Mutex localLock("dump_entries");
+  JSONFormatter jf(true);
+
+  int r = recover_journal();
+  if (r) {
+    return;
+  }
+
+  jf.open_array_section("log");
+  bool got_data = true;
+  lock.Lock();
+  // Until the journal is empty, pop an event or wait for one to
+  // be available.
+  dout(10) << "Journaler read/write/size: "
+      << journaler->get_read_pos() << "/" << journaler->get_write_pos()
+      << "/" << journaler->get_write_pos() - journaler->get_read_pos() << dendl;
+  while (journaler->get_read_pos() != journaler->get_write_pos()) {
+    bufferlist entry_bl;
+    got_data = journaler->try_read_entry(entry_bl);
+    dout(10) << "try_read_entry: " << got_data << dendl;
+    if (got_data) {
+      LogEvent *le = LogEvent::decode(entry_bl);
+      if (!le) {
+	dout(0) << "Error decoding LogEvent" << dendl;
+	break;
+      } else {
+	jf.open_object_section("log_event");
+	jf.dump_unsigned("type", le->get_type());
+	jf.dump_unsigned("start_off", le->get_start_off());
+	jf.dump_unsigned("stamp_sec", le->get_stamp().tv.tv_sec);
+	jf.dump_unsigned("stamp_nsec", le->get_stamp().tv.tv_nsec);
+	le->dump(&jf);
+	jf.close_section();
+	delete le;
+      }
+    } else {
+      bool done = false;
+      Cond cond;
+
+      journaler->wait_for_readable(new C_SafeCond(&localLock, &cond, &done));
+      lock.Unlock();
+      localLock.Lock();
+      while (!done)
+        cond.Wait(localLock);
+      localLock.Unlock();
+      lock.Lock();
+    }
+  }
+  lock.Unlock();
+  jf.close_section();
+  jf.flush(cout);
+  return;
+}
diff --git a/src/tools/cephfs/Dumper.h b/src/mds/Dumper.h
similarity index 85%
rename from src/tools/cephfs/Dumper.h
rename to src/mds/Dumper.h
index 1986eca..6218ef4 100644
--- a/src/tools/cephfs/Dumper.h
+++ b/src/mds/Dumper.h
@@ -15,9 +15,8 @@
 #define JOURNAL_DUMPER_H_
 
 
-#include "MDSUtility.h"
-
-class Journaler;
+#include "mds/MDSUtility.h"
+#include "osdc/Journaler.h"
 
 /**
  * This class lets you dump out an mds journal for troubleshooting or whatever.
@@ -29,19 +28,20 @@ class Journaler;
 
 class Dumper : public MDSUtility {
 private:
+  Journaler *journaler;
   int rank;
-  inodeno_t ino;
 
 public:
-  Dumper() : rank(-1), ino(-1)
+  Dumper() : journaler(NULL), rank(-1)
   {}
 
   void handle_mds_map(MMDSMap* m);
 
   int init(int rank);
-  int recover_journal(Journaler *journaler);
+  int recover_journal();
   void dump(const char *dumpfile);
   void undump(const char *dumpfile);
+  void dump_entries();
 };
 
 #endif /* JOURNAL_DUMPER_H_ */
diff --git a/src/mds/InoTable.cc b/src/mds/InoTable.cc
index 5185695..f0bf3bd 100644
--- a/src/mds/InoTable.cc
+++ b/src/mds/InoTable.cc
@@ -29,13 +29,13 @@ void InoTable::reset_state()
   free.clear();
   //#ifdef __LP64__
   uint64_t start = (uint64_t)(mds->get_nodeid()+1) << 40;
-  uint64_t len = (uint64_t)1 << 40;
+  uint64_t end = ((uint64_t)(mds->get_nodeid()+2) << 40) - 1;
   //#else
   //# warning this looks like a 32-bit system, using small inode numbers.
   //  uint64_t start = (uint64_t)(mds->get_nodeid()+1) << 25;
   //  uint64_t end = ((uint64_t)(mds->get_nodeid()+2) << 25) - 1;
   //#endif
-  free.insert(start, len);
+  free.insert(start, end);
 
   projected_free = free;
 }
@@ -104,7 +104,7 @@ void InoTable::replay_alloc_id(inodeno_t id)
     free.erase(id);
     projected_free.erase(id);
   } else {
-    mds->clog->error() << "journal replay alloc " << id
+    mds->clog.error() << "journal replay alloc " << id
       << " not in free " << free << "\n";
   }
   projected_version = ++version;
@@ -118,7 +118,7 @@ void InoTable::replay_alloc_ids(interval_set<inodeno_t>& ids)
     free.subtract(ids);
     projected_free.subtract(ids);
   } else {
-    mds->clog->error() << "journal replay alloc " << ids << ", only "
+    mds->clog.error() << "journal replay alloc " << ids << ", only "
 	<< is << " is in free " << free << "\n";
     free.subtract(is);
     projected_free.subtract(is);
@@ -147,8 +147,9 @@ void InoTable::skip_inos(inodeno_t i)
 {
   dout(10) << "skip_inos was " << free << dendl;
   inodeno_t first = free.range_start();
+  inodeno_t last = first + i;
   interval_set<inodeno_t> s;
-  s.insert(first, i);
+  s.insert(first, last);
   s.intersection_of(free);
   free.subtract(s);
   projected_free = free;
diff --git a/src/mds/JournalPointer.cc b/src/mds/JournalPointer.cc
deleted file mode 100644
index 0ceb758..0000000
--- a/src/mds/JournalPointer.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-
-#include "common/debug.h"
-#include "common/errno.h"
-#include "common/Cond.h"
-#include "osdc/Objecter.h"
-#include "mds/mdstypes.h"
-
-#include "mds/JournalPointer.h"
-
-
-#define dout_subsys ceph_subsys_journaler
-#undef dout_prefix
-#define dout_prefix *_dout << objecter->messenger->get_myname() << ".journalpointer "
-
-
-std::string JournalPointer::get_object_id() const
-{
-  inodeno_t const pointer_ino = MDS_INO_LOG_POINTER_OFFSET + node_id;
-  char buf[32];
-  snprintf(buf, sizeof(buf), "%llx.%08llx", (long long unsigned)pointer_ino, (long long unsigned)0);
-
-  return std::string(buf);
-}
-
-
-/**
- * Blocking read of JournalPointer for this MDS
- */
-int JournalPointer::load(Objecter *objecter)
-{
-  assert(objecter != NULL);
-
-  // Blocking read of data
-  std::string const object_id = get_object_id();
-  dout(4) << "Reading journal pointer '" << object_id << "'" << dendl;
-  bufferlist data;
-  C_SaferCond waiter;
-  objecter->read_full(object_t(object_id), object_locator_t(pool_id),
-      CEPH_NOSNAP, &data, 0, &waiter);
-  int r = waiter.wait();
-
-  // Construct JournalPointer result, null or decoded data
-  if (r == 0) {
-    bufferlist::iterator q = data.begin();
-    decode(q);
-  } else {
-    dout(1) << "Journal pointer '" << object_id << "' read failed: " << cpp_strerror(r) << dendl;
-  }
-  return r;
-}
-
-
-/**
- * Blocking write of JournalPointer for this MDS
- *
- * @return objecter write op status code
- */
-int JournalPointer::save(Objecter *objecter) const
-{
-  assert(objecter != NULL);
-  // It is not valid to persist a null pointer
-  assert(!is_null());
-
-  // Serialize JournalPointer object
-  bufferlist data;
-  encode(data);
-
-  // Write to RADOS and wait for durability
-  std::string const object_id = get_object_id();
-  dout(4) << "Writing pointer object '" << object_id << "': 0x"
-    << std::hex << front << ":0x" << back << std::dec << dendl;
-
-  C_SaferCond waiter;
-  objecter->write_full(object_t(object_id), object_locator_t(pool_id),
-      SnapContext(), data, ceph_clock_now(g_ceph_context), 0, NULL, &waiter);
-  int write_result = waiter.wait();
-  if (write_result < 0) {
-    derr << "Error writing pointer object '" << object_id << "': " << cpp_strerror(write_result) << dendl;
-  }
-  return write_result;
-}
-
-
-/**
- * Non-blocking variant of save() that assumes objecter lock already held by
- * caller
- */
-void JournalPointer::save(Objecter *objecter, Context *completion) const
-{
-  assert(objecter != NULL);
-
-  bufferlist data;
-  encode(data);
-
-  objecter->write_full(object_t(get_object_id()), object_locator_t(pool_id),
-      SnapContext(), data, ceph_clock_now(g_ceph_context), 0, NULL, completion);
-}
-
diff --git a/src/mds/JournalPointer.h b/src/mds/JournalPointer.h
deleted file mode 100644
index 559543b..0000000
--- a/src/mds/JournalPointer.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-
-#ifndef JOURNAL_POINTER_H
-#define JOURNAL_POINTER_H
-
-#include "include/encoding.h"
-#include "mdstypes.h"
-
-class Objecter;
-class Mutex;
-
-// This always lives in the same location for a given MDS
-// instance, it tells the daemon where to look for the journal.
-class JournalPointer {
-  // MDS rank
-  int node_id;
-  // Metadata pool ID
-  int64_t pool_id;
-
-  std::string get_object_id() const;
-
-  public:
-  // The currently active journal
-  inodeno_t front;
-  // The backup journal, if any (may be 0)
-  inodeno_t back;
-
-  void encode(bufferlist &bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(front, bl);
-    ::encode(back, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator &bl) {
-    DECODE_START(1, bl);
-    ::decode(front, bl);
-    ::decode(back, bl);
-    DECODE_FINISH(bl);
-  }
-
-  JournalPointer(int node_id_, int64_t pool_id_) : node_id(node_id_), pool_id(pool_id_),
-    front(0), back(0) {}
-
-  JournalPointer() : node_id(-1), pool_id(-1), front(0), back(0) {}
-
-  int load(Objecter *objecter);
-  int save(Objecter *objecter) const;
-  void save(Objecter *objecter, Context *completion) const;
-
-  bool is_null() const {
-    return front == 0 && back == 0;
-  }
-
-  void dump(Formatter *f) const {
-    f->open_object_section("journal_pointer");
-    {
-      f->dump_unsigned("front", front);
-      f->dump_unsigned("back", back);
-    }
-    f->close_section(); // journal_header
-  }
-
-  static void generate_test_instances(std::list<JournalPointer*> &ls)
-  {
-    ls.push_back(new JournalPointer());
-    ls.push_back(new JournalPointer());
-    ls.back()->front = 0xdeadbeef;
-    ls.back()->back = 0xfeedbead;
-  }
-};
-
-#endif // JOURNAL_POINTER_H
diff --git a/src/mds/LocalLock.h b/src/mds/LocalLock.h
index e12ab9a..c797ea7 100644
--- a/src/mds/LocalLock.h
+++ b/src/mds/LocalLock.h
@@ -32,7 +32,7 @@ public:
   }
 
   bool can_xlock_local() const {
-    return !is_wrlocked() && (get_xlock_by() == MutationRef());
+    return !is_wrlocked() && (get_xlock_by() == 0);
   }
 
   bool can_wrlock() const {
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 736a731..19907b3 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -20,7 +20,6 @@
 #include "CDir.h"
 #include "CDentry.h"
 #include "Mutation.h"
-#include "MDSContext.h"
 
 #include "MDLog.h"
 #include "MDSMap.h"
@@ -65,22 +64,6 @@ static ostream& _prefix(std::ostream *_dout, MDS *mds) {
   return *_dout << "mds." << mds->get_nodeid() << ".locker ";
 }
 
-
-class LockerContext : public MDSInternalContextBase {
-  protected:
-  Locker *locker;
-  MDS *get_mds()
-  {
-    return locker->mds;
-  }
-
-  public:
-  LockerContext(Locker *locker_) : locker(locker_) {
-    assert(locker != NULL);
-  }
-};
-
-
 /* This function DOES put the passed message before returning */
 void Locker::dispatch(Message *m)
 {
@@ -99,7 +82,6 @@ void Locker::dispatch(Message *m)
     // client sync
   case CEPH_MSG_CLIENT_CAPS:
     handle_client_caps(static_cast<MClientCaps*>(m));
-
     break;
   case CEPH_MSG_CLIENT_CAPRELEASE:
     handle_client_cap_release(static_cast<MClientCapRelease*>(m));
@@ -113,11 +95,6 @@ void Locker::dispatch(Message *m)
   }
 }
 
-void Locker::tick()
-{
-  scatter_tick();
-  caps_tick();
-}
 
 /*
  * locks vs rejoin
@@ -189,19 +166,6 @@ void Locker::include_snap_rdlocks_wlayout(set<SimpleLock*>& rdlocks, CInode *in,
   }
 }
 
-struct MarkEventOnDestruct {
-  MDRequestRef& mdr;
-  const char* message;
-  bool mark_event;
-  MarkEventOnDestruct(MDRequestRef& _mdr,
-                      const char *_message) : mdr(_mdr),
-                          message(_message),
-                          mark_event(true) {}
-  ~MarkEventOnDestruct() {
-    if (mark_event)
-      mdr->mark_event(message);
-  }
-};
 
 /* If this function returns false, the mdr has been placed
  * on the appropriate wait list */
@@ -220,18 +184,15 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
   }
   dout(10) << "acquire_locks " << *mdr << dendl;
 
-  MarkEventOnDestruct marker(mdr, "failed to acquire_locks");
-
   client_t client = mdr->get_client();
 
   set<SimpleLock*, SimpleLock::ptr_lt> sorted;  // sort everything we will lock
-  set<MDSCacheObject*> mustpin;            // items to authpin
+  set<SimpleLock*> mustpin = xlocks;            // items to authpin
 
   // xlocks
   for (set<SimpleLock*>::iterator p = xlocks.begin(); p != xlocks.end(); ++p) {
     dout(20) << " must xlock " << **p << " " << *(*p)->get_parent() << dendl;
     sorted.insert(*p);
-    mustpin.insert((*p)->get_parent());
 
     // augment xlock with a versionlock?
     if ((*p)->get_type() == CEPH_LOCK_DN) {
@@ -271,28 +232,26 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
 
   // wrlocks
   for (set<SimpleLock*>::iterator p = wrlocks.begin(); p != wrlocks.end(); ++p) {
-    MDSCacheObject *object = (*p)->get_parent();
-    dout(20) << " must wrlock " << **p << " " << *object << dendl;
+    dout(20) << " must wrlock " << **p << " " << *(*p)->get_parent() << dendl;
     sorted.insert(*p);
-    if (object->is_auth())
-      mustpin.insert(object);
-    else if (!object->is_auth() &&
+    if ((*p)->get_parent()->is_auth())
+      mustpin.insert(*p);
+    else if (!(*p)->get_parent()->is_auth() &&
 	     !(*p)->can_wrlock(client) &&  // we might have to request a scatter
 	     !mdr->is_slave()) {           // if we are slave (remote_wrlock), the master already authpinned
-      dout(15) << " will also auth_pin " << *object
+      dout(15) << " will also auth_pin " << *(*p)->get_parent()
 	       << " in case we need to request a scatter" << dendl;
-      mustpin.insert(object);
+      mustpin.insert(*p);
     }
   }
 
   // remote_wrlocks
   if (remote_wrlocks) {
     for (map<SimpleLock*,int>::iterator p = remote_wrlocks->begin(); p != remote_wrlocks->end(); ++p) {
-      MDSCacheObject *object = p->first->get_parent();
       dout(20) << " must remote_wrlock on mds." << p->second << " "
-	       << *p->first << " " << *object << dendl;
+	       << *p->first << " " << *(p->first)->get_parent() << dendl;
       sorted.insert(p->first);
-      mustpin.insert(object);
+      mustpin.insert(p->first);
     }
   }
 
@@ -300,16 +259,15 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
   for (set<SimpleLock*>::iterator p = rdlocks.begin();
 	 p != rdlocks.end();
        ++p) {
-    MDSCacheObject *object = (*p)->get_parent();
-    dout(20) << " must rdlock " << **p << " " << *object << dendl;
+    dout(20) << " must rdlock " << **p << " " << *(*p)->get_parent() << dendl;
     sorted.insert(*p);
-    if (object->is_auth())
-      mustpin.insert(object);
-    else if (!object->is_auth() &&
+    if ((*p)->get_parent()->is_auth())
+      mustpin.insert(*p);
+    else if (!(*p)->get_parent()->is_auth() &&
 	     !(*p)->can_rdlock(client)) {      // we might have to request an rdlock
-      dout(15) << " will also auth_pin " << *object
+      dout(15) << " will also auth_pin " << *(*p)->get_parent()
 	       << " in case we need to request a rdlock" << dendl;
-      mustpin.insert(object);
+      mustpin.insert(*p);
     }
   }
 
@@ -318,11 +276,10 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
   map<int, set<MDSCacheObject*> > mustpin_remote;  // mds -> (object set)
   
   // can i auth pin them all now?
-  marker.message = "failed to authpin local pins";
-  for (set<MDSCacheObject*>::iterator p = mustpin.begin();
+  for (set<SimpleLock*>::iterator p = mustpin.begin();
        p != mustpin.end();
        ++p) {
-    MDSCacheObject *object = *p;
+    MDSCacheObject *object = (*p)->get_parent();
 
     dout(10) << " must authpin " << *object << dendl;
 
@@ -358,10 +315,10 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
   }
 
   // ok, grab local auth pins
-  for (set<MDSCacheObject*>::iterator p = mustpin.begin();
+  for (set<SimpleLock*>::iterator p = mustpin.begin();
        p != mustpin.end();
        ++p) {
-    MDSCacheObject *object = *p;
+    MDSCacheObject *object = (*p)->get_parent();
     if (mdr->is_auth_pinned(object)) {
       dout(10) << " already auth_pinned " << *object << dendl;
     } else if (object->is_auth()) {
@@ -372,17 +329,6 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
 
   // request remote auth_pins
   if (!mustpin_remote.empty()) {
-    marker.message = "requesting remote authpins";
-    for (map<MDSCacheObject*,int>::iterator p = mdr->remote_auth_pins.begin();
-	 p != mdr->remote_auth_pins.end();
-	 ++p) {
-      if (mustpin.count(p->first)) {
-	assert(p->second == p->first->authority().first);
-	map<int, set<MDSCacheObject*> >::iterator q = mustpin_remote.find(p->second);
-	if (q != mustpin_remote.end())
-	  q->second.insert(p->first);
-      }
-    }
     for (map<int, set<MDSCacheObject*> >::iterator p = mustpin_remote.begin();
 	 p != mustpin_remote.end();
 	 ++p) {
@@ -507,20 +453,16 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
       cancel_locking(mdr.get(), &issue_set);
     }
     if (xlocks.count(*p)) {
-      marker.message = "failed to xlock, waiting";
       if (!xlock_start(*p, mdr)) 
 	goto out;
       dout(10) << " got xlock on " << **p << " " << *(*p)->get_parent() << dendl;
     } else if (need_wrlock || need_remote_wrlock) {
       if (need_remote_wrlock && !mdr->remote_wrlocks.count(*p)) {
-        marker.message = "waiting for remote wrlocks";
 	remote_wrlock_start(*p, (*remote_wrlocks)[*p], mdr);
 	goto out;
       }
       if (need_wrlock && !mdr->wrlocks.count(*p)) {
-        marker.message = "failed to wrlock, waiting";
 	if (need_remote_wrlock && !(*p)->can_wrlock(mdr->get_client())) {
-	  marker.message = "failed to wrlock, dropping remote wrlock and waiting";
 	  // can't take the wrlock because the scatter lock is gathering. need to
 	  // release the remote wrlock, so that the gathering process can finish.
 	  remote_wrlock_finish(*p, mdr->remote_wrlocks[*p], mdr.get());
@@ -532,7 +474,6 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
 	dout(10) << " got wrlock on " << **p << " " << *(*p)->get_parent() << dendl;
       }
     } else {
-      marker.message = "failed to rdlock, waiting";
       if (!rdlock_start(*p, mdr)) 
 	goto out;
       dout(10) << " got rdlock on " << **p << " " << *(*p)->get_parent() << dendl;
@@ -561,9 +502,7 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
   }
 
   mdr->done_locking = true;
-  mdr->set_mds_stamp(ceph_clock_now(NULL));
   result = true;
-  marker.message = "acquired locks";
 
  out:
   issue_caps_set(issue_set);
@@ -576,12 +515,10 @@ void Locker::set_xlocks_done(MutationImpl *mut, bool skip_dentry)
   for (set<SimpleLock*>::iterator p = mut->xlocks.begin();
        p != mut->xlocks.end();
        ++p) {
-    MDSCacheObject *object = (*p)->get_parent();
-    assert(object->is_auth());
     if (skip_dentry &&
 	((*p)->get_type() == CEPH_LOCK_DN || (*p)->get_type() == CEPH_LOCK_DVERSION))
       continue;
-    dout(10) << "set_xlocks_done on " << **p << " " << *object << dendl;
+    dout(10) << "set_xlocks_done on " << **p << " " << *(*p)->get_parent() << dendl;
     (*p)->set_xlock_done();
   }
 }
@@ -709,7 +646,7 @@ void Locker::drop_rdlocks(MutationImpl *mut, set<CInode*> *pneed_issue)
 
 // generics
 
-void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<MDSInternalContextBase*> *pfinishers)
+void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<Context*> *pfinishers)
 {
   dout(10) << "eval_gather " << *lock << " on " << *lock->get_parent() << dendl;
   assert(!lock->is_stable());
@@ -931,7 +868,7 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<M
 bool Locker::eval(CInode *in, int mask, bool caps_imported)
 {
   bool need_issue = caps_imported;
-  list<MDSInternalContextBase*> finishers;
+  list<Context*> finishers;
   
   dout(10) << "eval " << mask << " " << *in << dendl;
 
@@ -992,14 +929,12 @@ bool Locker::eval(CInode *in, int mask, bool caps_imported)
   return need_issue;
 }
 
-class C_Locker_Eval : public LockerContext {
+class C_Locker_Eval : public Context {
+  Locker *locker;
   MDSCacheObject *p;
   int mask;
 public:
-  C_Locker_Eval(Locker *l, MDSCacheObject *pp, int m) : LockerContext(l), p(pp), mask(m) {
-    // We are used as an MDSCacheObject waiter, so should
-    // only be invoked by someone already holding the big lock.
-    assert(locker->mds->mds_lock.is_locked_by_me());
+  C_Locker_Eval(Locker *l, MDSCacheObject *pp, int m) : locker(l), p(pp), mask(m) {
     p->get(MDSCacheObject::PIN_PTRWAITER);    
   }
   void finish(int r) {
@@ -1097,7 +1032,7 @@ void Locker::try_eval(SimpleLock *lock, bool *pneed_issue)
 void Locker::eval_cap_gather(CInode *in, set<CInode*> *issue_set)
 {
   bool need_issue = false;
-  list<MDSInternalContextBase*> finishers;
+  list<Context*> finishers;
 
   // kick locks now
   if (!in->filelock.is_stable())
@@ -1122,7 +1057,7 @@ void Locker::eval_cap_gather(CInode *in, set<CInode*> *issue_set)
 void Locker::eval_scatter_gathers(CInode *in)
 {
   bool need_issue = false;
-  list<MDSInternalContextBase*> finishers;
+  list<Context*> finishers;
 
   dout(10) << "eval_scatter_gathers " << *in << dendl;
 
@@ -1190,17 +1125,10 @@ bool Locker::_rdlock_kick(SimpleLock *lock, bool as_anon)
       return false;
     }
   }
-  if (lock->get_type() == CEPH_LOCK_IFILE) {
-    CInode *in = static_cast<CInode *>(lock->get_parent());
-    if (in->state_test(CInode::STATE_RECOVERING)) {
-      mds->mdcache->recovery_queue.prioritize(in);
-    }
-  }
-
   return false;
 }
 
-bool Locker::rdlock_try(SimpleLock *lock, client_t client, MDSInternalContextBase *con)
+bool Locker::rdlock_try(SimpleLock *lock, client_t client, Context *con)
 {
   dout(7) << "rdlock_try on " << *lock << " on " << *lock->get_parent() << dendl;  
 
@@ -1383,11 +1311,6 @@ bool Locker::wrlock_start(SimpleLock *lock, MDRequestRef& mut, bool nowait)
       return true;
     }
 
-    if (lock->get_type() == CEPH_LOCK_IFILE &&
-	in->state_test(CInode::STATE_RECOVERING)) {
-      mds->mdcache->recovery_queue.prioritize(in);
-    }
-
     if (!lock->is_stable())
       break;
 
@@ -1523,13 +1446,6 @@ bool Locker::xlock_start(SimpleLock *lock, MDRequestRef& mut)
 	return true;
       }
       
-      if (lock->get_type() == CEPH_LOCK_IFILE) {
-	CInode *in = static_cast<CInode*>(lock->get_parent());
-	if (in->state_test(CInode::STATE_RECOVERING)) {
-	  mds->mdcache->recovery_queue.prioritize(in);
-	}
-      }
-
       if (!lock->is_stable() && !(lock->get_state() == LOCK_XLOCKDONE &&
 				  lock->get_xlock_by_client() == client))
 	break;
@@ -1695,20 +1611,20 @@ version_t Locker::issue_file_data_version(CInode *in)
   return in->inode.file_data_version;
 }
 
-class C_Locker_FileUpdate_finish : public LockerContext {
+struct C_Locker_FileUpdate_finish : public Context {
+  Locker *locker;
   CInode *in;
   MutationRef mut;
   bool share;
   client_t client;
   Capability *cap;
   MClientCaps *ack;
-public:
   C_Locker_FileUpdate_finish(Locker *l, CInode *i, MutationRef& m,
-				bool e=false, client_t c=-1,
-				Capability *cp = 0,
-				MClientCaps *ac = 0)
-    : LockerContext(l), in(i), mut(m), share(e), client(c), cap(cp),
-      ack(ac) {
+                             bool e=false, client_t c=-1,
+			     Capability *cp = 0,
+			     MClientCaps *ac = 0) : 
+    locker(l), in(i), mut(m), share(e), client(c), cap(cp),
+    ack(ac) {
     in->get(CInode::PIN_PTRWAITER);
   }
   void finish(int r) {
@@ -1938,15 +1854,8 @@ bool Locker::issue_caps(CInode *in, Capability *only_cap)
 		<< " new pending " << ccap_string(after) << " was " << ccap_string(before) 
 		<< dendl;
 
-	int op = (before & ~after) ? CEPH_CAP_OP_REVOKE : CEPH_CAP_OP_GRANT;
-	if (op == CEPH_CAP_OP_REVOKE) {
-		revoking_caps.push_back(&cap->item_revoking_caps);
-		revoking_caps_by_client[cap->get_client()].push_back(&cap->item_client_revoking_caps);
-		cap->set_last_revoke_stamp(ceph_clock_now(g_ceph_context));
-		cap->reset_num_revoke_warnings();
-	}
-
-	MClientCaps *m = new MClientCaps(op, in->ino(),
+	MClientCaps *m = new MClientCaps((before & ~after) ? CEPH_CAP_OP_REVOKE:CEPH_CAP_OP_GRANT,
+					 in->ino(),
 					 in->find_snaprealm()->inode->ino(),
 					 cap->get_cap_id(), cap->get_last_seq(),
 					 after, wanted, 0,
@@ -2052,10 +1961,11 @@ void Locker::remove_stale_leases(Session *session)
 }
 
 
-class C_MDL_RequestInodeFileCaps : public LockerContext {
+class C_MDL_RequestInodeFileCaps : public Context {
+  Locker *locker;
   CInode *in;
 public:
-  C_MDL_RequestInodeFileCaps(Locker *l, CInode *i) : LockerContext(l), in(i) {
+  C_MDL_RequestInodeFileCaps(Locker *l, CInode *i) : locker(l), in(i) {
     in->get(CInode::PIN_PTRWAITER);
   }
   void finish(int r) {
@@ -2121,7 +2031,8 @@ void Locker::handle_inode_file_caps(MInodeFileCaps *m)
 }
 
 
-class C_MDL_CheckMaxSize : public LockerContext {
+class C_MDL_CheckMaxSize : public Context {
+  Locker *locker;
   CInode *in;
   bool update_size;
   uint64_t newsize;
@@ -2132,7 +2043,7 @@ class C_MDL_CheckMaxSize : public LockerContext {
 public:
   C_MDL_CheckMaxSize(Locker *l, CInode *i, bool _update_size, uint64_t _newsize,
                      bool _update_max, uint64_t _new_max_size, utime_t _mtime) :
-    LockerContext(l), in(i),
+    locker(l), in(i),
     update_size(_update_size), newsize(_newsize),
     update_max(_update_max), new_max_size(_new_max_size),
     mtime(_mtime)
@@ -2289,8 +2200,7 @@ bool Locker::check_inode_max_size(CInode *in, bool force_wrlock,
     metablob->add_dir_context(in->get_projected_parent_dn()->get_dir());
     mdcache->journal_dirty_inode(mut.get(), metablob, in);
   }
-  mds->mdlog->submit_entry(le,
-          new C_Locker_FileUpdate_finish(this, in, mut, true));
+  mds->mdlog->submit_entry(le, new C_Locker_FileUpdate_finish(this, in, mut, true));
   wrlock_force(&in->filelock, mut);  // wrlock for duration of journal
   mut->auth_pin(in);
 
@@ -2369,12 +2279,6 @@ void Locker::adjust_cap_wanted(Capability *cap, int wanted, int issue_seq)
       cur->item_open_file.remove_myself();
     }
   } else {
-    if (cur->state_test(CInode::STATE_RECOVERING) &&
-	(cap->wanted() & (CEPH_CAP_FILE_RD |
-			  CEPH_CAP_FILE_WR))) {
-      mds->mdcache->recovery_queue.prioritize(cur);
-    }
-
     if (!cur->item_open_file.is_on_list()) {
       dout(10) << " adding to open file list " << *cur << dendl;
       assert(cur->last == CEPH_NOSNAP);
@@ -2637,13 +2541,13 @@ void Locker::handle_client_caps(MClientCaps *m)
   m->put();
 }
 
-
-class C_Locker_RetryRequestCapRelease : public LockerContext {
+class C_Locker_RetryRequestCapRelease : public Context {
+  Locker *locker;
   client_t client;
   ceph_mds_request_release item;
 public:
   C_Locker_RetryRequestCapRelease(Locker *l, client_t c, const ceph_mds_request_release& it) :
-    LockerContext(l), client(c), item(it) { }
+    locker(l), client(c), item(it) { }
   void finish(int r) {
     string dname;
     MDRequestRef null_ref;
@@ -2729,13 +2633,14 @@ void Locker::process_request_cap_release(MDRequestRef& mdr, client_t client, con
     mdr->cap_releases[in->vino()] = cap->get_last_seq();
 }
 
-class C_Locker_RetryKickIssueCaps : public LockerContext {
+class C_Locker_RetryKickIssueCaps : public Context {
+  Locker *locker;
   CInode *in;
   client_t client;
   ceph_seq_t seq;
 public:
   C_Locker_RetryKickIssueCaps(Locker *l, CInode *i, client_t c, ceph_seq_t s) :
-    LockerContext(l), in(i), client(c), seq(s) {
+    locker(l), in(i), client(c), seq(s) {
     in->get(CInode::PIN_PTRWAITER);
   }
   void finish(int r) {
@@ -2859,10 +2764,9 @@ void Locker::_do_snap_update(CInode *in, snapid_t snap, int dirty, snapid_t foll
   mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY, 0, follows);
   mdcache->journal_dirty_inode(mut.get(), &le->metablob, in, follows);
 
-  mds->mdlog->submit_entry(le, new C_Locker_FileUpdate_finish(this, in, mut,
-								 false,
-								 client, NULL,
-								 ack));
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(new C_Locker_FileUpdate_finish(this, in, mut, false,
+							   client, NULL, ack));
 }
 
 /**
@@ -3101,10 +3005,9 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
   mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY, 0, follows);
   mdcache->journal_dirty_inode(mut.get(), &le->metablob, in, follows);
 
-  mds->mdlog->submit_entry(le, new C_Locker_FileUpdate_finish(this, in, mut,
-								 change_max,
-								 client, cap,
-								 ack));
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(new C_Locker_FileUpdate_finish(this, in, mut, change_max, 
+							   client, cap, ack));
   // only flush immediately if the lock is unstable, or unissued caps are wanted, or max_size is 
   // changing
   if (((dirty & (CEPH_CAP_FILE_EXCL|CEPH_CAP_FILE_WR)) && !in->filelock.is_stable()) ||
@@ -3129,20 +3032,14 @@ void Locker::handle_client_cap_release(MClientCapRelease *m)
     return;
   }
 
-  Session *session = static_cast<Session *>(m->get_connection()->get_priv());
-
-  for (vector<ceph_mds_cap_item>::iterator p = m->caps.begin(); p != m->caps.end(); ++p) {
+  for (vector<ceph_mds_cap_item>::iterator p = m->caps.begin(); p != m->caps.end(); ++p)
     _do_cap_release(client, inodeno_t((uint64_t)p->ino) , p->cap_id, p->migrate_seq, p->seq);
-  }
-
-  if (session) {
-    session->notify_cap_release(m->caps.size());
-  }
 
   m->put();
 }
 
-class C_Locker_RetryCapRelease : public LockerContext {
+class C_Locker_RetryCapRelease : public Context {
+  Locker *locker;
   client_t client;
   inodeno_t ino;
   uint64_t cap_id;
@@ -3151,7 +3048,7 @@ class C_Locker_RetryCapRelease : public LockerContext {
 public:
   C_Locker_RetryCapRelease(Locker *l, client_t c, inodeno_t i, uint64_t id,
 			   ceph_seq_t mseq, ceph_seq_t seq) :
-    LockerContext(l), client(c), ino(i), cap_id(id), migrate_seq(mseq), issue_seq(seq) {}
+    locker(l), client(c), ino(i), cap_id(id), migrate_seq(mseq), issue_seq(seq) {}
   void finish(int r) {
     locker->_do_cap_release(client, ino, cap_id, migrate_seq, issue_seq);
   }
@@ -3219,91 +3116,6 @@ void Locker::remove_client_cap(CInode *in, client_t client)
 }
 
 
-/**
- * Return true if any currently revoking caps exceed the
- * mds_revoke_cap_timeout threshold.
- */
-bool Locker::any_late_revoking_caps(xlist<Capability*> const &revoking) const
-{
-    xlist<Capability*>::const_iterator p = revoking.begin();
-    if (p.end()) {
-      // No revoking caps at the moment
-      return false;
-    } else {
-      utime_t now = ceph_clock_now(g_ceph_context);
-      utime_t age = now - (*p)->get_last_revoke_stamp();
-      if (age <= g_conf->mds_revoke_cap_timeout) {
-          return false;
-      } else {
-          return true;
-      }
-    }
-}
-
-
-void Locker::get_late_revoking_clients(std::list<client_t> *result) const
-{
-  if (!any_late_revoking_caps(revoking_caps)) {
-    // Fast path: no misbehaving clients, execute in O(1)
-    return;
-  }
-
-  // Slow path: execute in O(N_clients)
-  std::map<client_t, xlist<Capability*> >::const_iterator client_rc_iter;
-  for (client_rc_iter = revoking_caps_by_client.begin();
-       client_rc_iter != revoking_caps_by_client.end(); ++client_rc_iter) {
-    xlist<Capability*> const &client_rc = client_rc_iter->second;
-    bool any_late = any_late_revoking_caps(client_rc);
-    if (any_late) {
-        result->push_back(client_rc_iter->first);
-    }
-  }
-}
-
-// Hard-code instead of surfacing a config settings because this is
-// really a hack that should go away at some point when we have better
-// inspection tools for getting at detailed cap state (#7316)
-#define MAX_WARN_CAPS 100
-
-void Locker::caps_tick()
-{
-  utime_t now = ceph_clock_now(g_ceph_context);
-
-  dout(20) << __func__ << " " << revoking_caps.size() << " revoking caps" << dendl;
-
-  int i = 0;
-  for (xlist<Capability*>::iterator p = revoking_caps.begin(); !p.end(); ++p) {
-    Capability *cap = *p;
-
-    utime_t age = now - cap->get_last_revoke_stamp();
-    dout(20) << __func__ << " age = " << age << cap->get_client() << "." << cap->get_inode()->ino() << dendl;
-    if (age <= g_conf->mds_revoke_cap_timeout) {
-      dout(20) << __func__ << " age below timeout " << g_conf->mds_revoke_cap_timeout << dendl;
-      break;
-    } else {
-      ++i;
-      if (i > MAX_WARN_CAPS) {
-        dout(1) << __func__ << " more than " << MAX_WARN_CAPS << " caps are late"
-          << "revoking, ignoring subsequent caps" << dendl;
-        break;
-      }
-    }
-    // exponential backoff of warning intervals
-    if (age > g_conf->mds_revoke_cap_timeout * (1 << cap->get_num_revoke_warnings())) {
-      cap->inc_num_revoke_warnings();
-      stringstream ss;
-      ss << "client." << cap->get_client() << " isn't responding to mclientcaps(revoke), ino "
-	 << cap->get_inode()->ino() << " pending " << ccap_string(cap->pending())
-	 << " issued " << ccap_string(cap->issued()) << ", sent " << age << " seconds ago\n";
-      mds->clog->warn() << ss.str();
-      dout(20) << __func__ << " " << ss.str() << dendl;
-    } else {
-      dout(20) << __func__ << " silencing log message (backoff) for " << cap->get_client() << "." << cap->get_inode()->ino() << dendl;
-    }
-  }
-}
-
-
 void Locker::handle_client_lease(MClientLease *m)
 {
   dout(10) << "handle_client_lease " << *m << dendl;
@@ -4034,17 +3846,6 @@ Some notes on scatterlocks.
 
 */
 
-class C_Locker_ScatterWB : public LockerContext {
-  ScatterLock *lock;
-  MutationRef mut;
-public:
-  C_Locker_ScatterWB(Locker *l, ScatterLock *sl, MutationRef& m) :
-    LockerContext(l), lock(sl), mut(m) {}
-  void finish(int r) { 
-    locker->scatter_writebehind_finish(lock, mut); 
-  }
-};
-
 void Locker::scatter_writebehind(ScatterLock *lock)
 {
   CInode *in = static_cast<CInode*>(lock->get_parent());
@@ -4070,12 +3871,13 @@ void Locker::scatter_writebehind(ScatterLock *lock)
   EUpdate *le = new EUpdate(mds->mdlog, "scatter_writebehind");
   mds->mdlog->start_entry(le);
 
-  mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mut.get(), &le->metablob, in);
   
   in->finish_scatter_gather_update_accounted(lock->get_type(), mut, &le->metablob);
 
-  mds->mdlog->submit_entry(le, new C_Locker_ScatterWB(this, lock, mut));
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(new C_Locker_ScatterWB(this, lock, mut));
 }
 
 void Locker::scatter_writebehind_finish(ScatterLock *lock, MutationRef& mut)
@@ -4181,7 +3983,7 @@ void Locker::mark_updated_scatterlock(ScatterLock *lock)
  * we need to lock|scatter in order to push fnode changes into the
  * inode.dirstat.
  */
-void Locker::scatter_nudge(ScatterLock *lock, MDSInternalContextBase *c, bool forcelockchange)
+void Locker::scatter_nudge(ScatterLock *lock, Context *c, bool forcelockchange)
 {
   CInode *p = static_cast<CInode *>(lock->get_parent());
 
diff --git a/src/mds/Locker.h b/src/mds/Locker.h
index 6df00c4..17b3c47 100644
--- a/src/mds/Locker.h
+++ b/src/mds/Locker.h
@@ -43,15 +43,14 @@ class MLock;
 
 class MClientRequest;
 
+class Anchor;
 class Capability;
 class LogSegment;
 
 class SimpleLock;
 class ScatterLock;
 class LocalLock;
-
 class MDCache;
-typedef ceph::shared_ptr<MDRequestImpl> MDRequestRef;
 
 #include "SimpleLock.h"
 
@@ -68,7 +67,6 @@ private:
   void dispatch(Message *m);
   void handle_lock(MLock *m);
 
-  void tick();
 
   void nudge_log(SimpleLock *lock);
 
@@ -98,15 +96,27 @@ public:
   void drop_non_rdlocks(MutationImpl *mut, set<CInode*> *pneed_issue=0);
   void drop_rdlocks(MutationImpl *mut, set<CInode*> *pneed_issue=0);
 
-  void eval_gather(SimpleLock *lock, bool first=false, bool *need_issue=0, list<MDSInternalContextBase*> *pfinishers=0);
+  void eval_gather(SimpleLock *lock, bool first=false, bool *need_issue=0, list<Context*> *pfinishers=0);
   void eval(SimpleLock *lock, bool *need_issue);
-  void eval_any(SimpleLock *lock, bool *need_issue, list<MDSInternalContextBase*> *pfinishers=0, bool first=false) {
+  void eval_any(SimpleLock *lock, bool *need_issue, list<Context*> *pfinishers=0, bool first=false) {
     if (!lock->is_stable())
       eval_gather(lock, first, need_issue, pfinishers);
     else if (lock->get_parent()->is_auth())
       eval(lock, need_issue);
   }
 
+  class C_EvalScatterGathers : public Context {
+    Locker *locker;
+    CInode *in;
+  public:
+    C_EvalScatterGathers(Locker *l, CInode *i) : locker(l), in(i) {
+      in->get(CInode::PIN_PTRWAITER);    
+    }
+    void finish(int r) {
+      in->put(CInode::PIN_PTRWAITER);
+      locker->eval_scatter_gathers(in);
+    }
+  };
   void eval_scatter_gathers(CInode *in);
 
   void eval_cap_gather(CInode *in, set<CInode*> *issue_set=0);
@@ -116,7 +126,7 @@ public:
   void try_eval(SimpleLock *lock, bool *pneed_issue);
 
   bool _rdlock_kick(SimpleLock *lock, bool as_anon);
-  bool rdlock_try(SimpleLock *lock, client_t client, MDSInternalContextBase *c);
+  bool rdlock_try(SimpleLock *lock, client_t client, Context *c);
   bool rdlock_start(SimpleLock *lock, MDRequestRef& mut, bool as_anon=false);
   void rdlock_finish(SimpleLock *lock, MutationImpl *mut, bool *pneed_issue);
   bool can_rdlock_set(set<SimpleLock*>& locks);
@@ -141,7 +151,7 @@ public:
   // simple
 public:
   void try_simple_eval(SimpleLock *lock);
-  bool simple_rdlock_try(SimpleLock *lock, MDSInternalContextBase *con);
+  bool simple_rdlock_try(SimpleLock *lock, Context *con);
 protected:
   void simple_eval(SimpleLock *lock, bool *need_issue);
   void handle_simple_lock(SimpleLock *lock, MLock *m);
@@ -159,7 +169,7 @@ public:
   void scatter_eval(ScatterLock *lock, bool *need_issue);        // public for MDCache::adjust_subtree_auth()
 
   void scatter_tick();
-  void scatter_nudge(ScatterLock *lock, MDSInternalContextBase *c, bool forcelockchange=false);
+  void scatter_nudge(ScatterLock *lock, Context *c, bool forcelockchange=false);
 
 protected:
   void handle_scatter_lock(ScatterLock *lock, MLock *m);
@@ -169,7 +179,17 @@ protected:
   void scatter_tempsync(ScatterLock *lock, bool *need_issue=0);
 
   void scatter_writebehind(ScatterLock *lock);
-
+  class C_Locker_ScatterWB : public Context {
+    Locker *locker;
+    ScatterLock *lock;
+    MutationRef mut;
+  public:
+    C_Locker_ScatterWB(Locker *l, ScatterLock *sl, MutationRef& m) :
+      locker(l), lock(sl), mut(m) {}
+    void finish(int r) { 
+      locker->scatter_writebehind_finish(lock, mut); 
+    }
+  };
   void scatter_writebehind_finish(ScatterLock *lock, MutationRef& mut);
 
   xlist<ScatterLock*> updated_scatterlocks;
@@ -196,9 +216,6 @@ public:
 
   void remove_client_cap(CInode *in, client_t client);
 
-  void get_late_revoking_clients(std::list<client_t> *result) const;
-  bool any_late_revoking_caps(xlist<Capability*> const &revoking) const;
-
  protected:
   void adjust_cap_wanted(Capability *cap, int wanted, int issue_seq);
   void handle_client_caps(class MClientCaps *m);
@@ -209,12 +226,7 @@ public:
 		      MClientCaps *ack=0);
   void handle_client_cap_release(class MClientCapRelease *m);
   void _do_cap_release(client_t client, inodeno_t ino, uint64_t cap_id, ceph_seq_t mseq, ceph_seq_t seq);
-  void caps_tick();
 
-  // Maintain a global list to quickly find if any caps are late revoking
-  xlist<Capability*> revoking_caps;
-  // Maintain a per-client list to find clients responsible for late ones quickly
-  std::map<client_t, xlist<Capability*> > revoking_caps_by_client;
 
   // local
 public:
@@ -272,11 +284,8 @@ public:
 private:
   friend class C_MDL_CheckMaxSize;
   friend class C_MDL_RequestInodeFileCaps;
-  friend class C_Locker_FileUpdate_finish;
+  friend struct C_Locker_FileUpdate_finish;
   friend class C_Locker_RetryCapRelease;
-  friend class C_Locker_Eval;
-  friend class LockerContext;
-  friend class C_Locker_ScatterWB;
 
   
   // -- client leases --
diff --git a/src/mds/LogEvent.cc b/src/mds/LogEvent.cc
index 2928a61..16e7f80 100644
--- a/src/mds/LogEvent.cc
+++ b/src/mds/LogEvent.cc
@@ -36,14 +36,12 @@
 #include "events/ETableClient.h"
 #include "events/ETableServer.h"
 
-#include "events/ENoOp.h"
-
 
 LogEvent *LogEvent::decode(bufferlist& bl)
 {
   // parse type, length
   bufferlist::iterator p = bl.begin();
-  EventType type;
+  __u32 type;
   LogEvent *event = NULL;
   ::decode(type, p);
 
@@ -64,66 +62,7 @@ LogEvent *LogEvent::decode(bufferlist& bl)
   return event;
 }
 
-
-std::string LogEvent::get_type_str() const
-{
-  switch(_type) {
-  case EVENT_SUBTREEMAP: return "SUBTREEMAP";
-  case EVENT_SUBTREEMAP_TEST: return "SUBTREEMAP_TEST";
-  case EVENT_EXPORT: return "EXPORT";
-  case EVENT_IMPORTSTART: return "IMPORTSTART";
-  case EVENT_IMPORTFINISH: return "IMPORTFINISH";
-  case EVENT_FRAGMENT: return "FRAGMENT";
-  case EVENT_RESETJOURNAL: return "RESETJOURNAL";
-  case EVENT_SESSION: return "SESSION";
-  case EVENT_SESSIONS_OLD: return "SESSIONS_OLD";
-  case EVENT_SESSIONS: return "SESSIONS";
-  case EVENT_UPDATE: return "UPDATE";
-  case EVENT_SLAVEUPDATE: return "SLAVEUPDATE";
-  case EVENT_OPEN: return "OPEN";
-  case EVENT_COMMITTED: return "COMMITTED";
-  case EVENT_TABLECLIENT: return "TABLECLIENT";
-  case EVENT_TABLESERVER: return "TABLESERVER";
-  case EVENT_NOOP: return "NOOP";
-
-  default:
-    generic_dout(0) << "get_type_str: unknown type " << _type << dendl;
-    return "UNKNOWN";
-  }
-}
-
-
-/*
- * Resolve type string to type enum
- *
- * Return -1 if not found
- */
-LogEvent::EventType LogEvent::str_to_type(std::string const &str)
-{
-  std::map<std::string, EventType> types;
-  types["SUBTREEMAP"] = EVENT_SUBTREEMAP;
-  types["SUBTREEMAP_TEST"] = EVENT_SUBTREEMAP_TEST;
-  types["EXPORT"] = EVENT_EXPORT;
-  types["IMPORTSTART"] = EVENT_IMPORTSTART;
-  types["IMPORTFINISH"] = EVENT_IMPORTFINISH;
-  types["FRAGMENT"] = EVENT_FRAGMENT;
-  types["RESETJOURNAL"] = EVENT_RESETJOURNAL;
-  types["SESSION"] = EVENT_SESSION;
-  types["SESSIONS_OLD"] = EVENT_SESSIONS_OLD;
-  types["SESSIONS"] = EVENT_SESSIONS;
-  types["UPDATE"] = EVENT_UPDATE;
-  types["SLAVEUPDATE"] = EVENT_SLAVEUPDATE;
-  types["OPEN"] = EVENT_OPEN;
-  types["COMMITTED"] = EVENT_COMMITTED;
-  types["TABLECLIENT"] = EVENT_TABLECLIENT;
-  types["TABLESERVER"] = EVENT_TABLESERVER;
-  types["NOOP"] = EVENT_NOOP;
-
-  return types[str];
-}
-
-
-LogEvent *LogEvent::decode_event(bufferlist& bl, bufferlist::iterator& p, LogEvent::EventType type)
+LogEvent *LogEvent::decode_event(bufferlist& bl, bufferlist::iterator& p, __u32 type)
 {
   int length = bl.length() - p.get_off();
   generic_dout(15) << "decode_log_event type " << type << ", size " << length << dendl;
@@ -155,8 +94,6 @@ LogEvent *LogEvent::decode_event(bufferlist& bl, bufferlist::iterator& p, LogEve
   case EVENT_TABLECLIENT: le = new ETableClient; break;
   case EVENT_TABLESERVER: le = new ETableServer; break;
 
-  case EVENT_NOOP: le = new ENoOp; break;
-
   default:
     generic_dout(0) << "uh oh, unknown log event type " << type << " length " << length << dendl;
     return NULL;
diff --git a/src/mds/LogEvent.h b/src/mds/LogEvent.h
index 145c69a..e7e8a62 100644
--- a/src/mds/LogEvent.h
+++ b/src/mds/LogEvent.h
@@ -39,43 +39,39 @@
 #define EVENT_TABLESERVER  43
 
 #define EVENT_SUBTREEMAP_TEST   50
-#define EVENT_NOOP        51
 
 
+#include <string>
+using namespace std;
+
 #include "include/buffer.h"
 #include "include/Context.h"
 #include "include/utime.h"
 
 class MDS;
 class LogSegment;
-class EMetaBlob;
 
 // generic log event
 class LogEvent {
-public:
- typedef __u32 EventType;
-
-private:
-  EventType _type;
+ private:
+  __u32 _type;
   uint64_t _start_off;
-  static LogEvent *decode_event(bufferlist& bl, bufferlist::iterator& p, EventType type);
+  static LogEvent *decode_event(bufferlist& bl, bufferlist::iterator& p, __u32 type);
 
 protected:
   utime_t stamp;
 
   friend class MDLog;
 
-public:
+ public:
   LogSegment *_segment;
 
   LogEvent(int t)
     : _type(t), _start_off(0), _segment(0) { }
   virtual ~LogEvent() { }
 
-  string get_type_str() const;
-  static EventType str_to_type(std::string const &str);
-  EventType get_type() const { return _type; }
-  void set_type(EventType t) { _type = t; }
+  int get_type() const { return _type; }
+  void set_type(int t) { _type = t; }
 
   uint64_t get_start_off() const { return _start_off; }
   void set_start_off(uint64_t o) { _start_off = o; }
@@ -111,11 +107,7 @@ public:
    */
   virtual void replay(MDS *m) { assert(0); }
 
-  /**
-   * If the subclass embeds a MetaBlob, return it here so that
-   * tools can examine metablobs while traversing lists of LogEvent.
-   */
-  virtual EMetaBlob *get_metablob() { return NULL; }
+
 };
 
 inline ostream& operator<<(ostream& out, LogEvent& le) {
diff --git a/src/mds/LogSegment.h b/src/mds/LogSegment.h
index 035cc81..a2b8ace 100644
--- a/src/mds/LogSegment.h
+++ b/src/mds/LogSegment.h
@@ -15,6 +15,7 @@
 #ifndef CEPH_LOGSEGMENT_H
 #define CEPH_LOGSEGMENT_H
 
+#include "include/dlist.h"
 #include "include/elist.h"
 #include "include/interval_set.h"
 #include "include/Context.h"
@@ -22,7 +23,6 @@
 #include "CInode.h"
 #include "CDentry.h"
 #include "CDir.h"
-#include "MDSContext.h"
 
 #include "include/unordered_set.h"
 using ceph::unordered_set;
@@ -33,13 +33,11 @@ class CDentry;
 class MDS;
 struct MDSlaveUpdate;
 
-typedef uint64_t log_segment_seq_t;
-
 class LogSegment {
  public:
-  const log_segment_seq_t seq;
   uint64_t offset, end;
   int num_events;
+  uint64_t trimmable_at;
 
   // dirty items
   elist<CDir*>    dirty_dirfrags, new_dirfrags;
@@ -69,11 +67,11 @@ class LogSegment {
   map<int,version_t> tablev;
 
   // try to expire
-  void try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_prio);
+  void try_to_expire(MDS *mds, C_GatherBuilder &gather_bld, int op_prio);
 
   // cons
-  LogSegment(uint64_t _seq, loff_t off=-1) :
-    seq(_seq), offset(off), end(off), num_events(0),
+  LogSegment(loff_t off) :
+    offset(off), end(off), num_events(0), trimmable_at(0),
     dirty_dirfrags(member_offset(CDir, item_dirty)),
     new_dirfrags(member_offset(CDir, item_new)),
     dirty_inodes(member_offset(CInode, item_dirty)),
diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc
index 969a5cb..fbf24c9 100644
--- a/src/mds/MDBalancer.cc
+++ b/src/mds/MDBalancer.cc
@@ -111,9 +111,12 @@ void MDBalancer::tick()
 
 
 
-class C_Bal_SendHeartbeat : public MDSInternalContext {
+class C_Bal_SendHeartbeat : public Context {
 public:
-  C_Bal_SendHeartbeat(MDS *mds_) : MDSInternalContext(mds_) { }
+  MDS *mds;
+  C_Bal_SendHeartbeat(MDS *mds) {
+    this->mds = mds;
+  }
   virtual void finish(int f) {
     mds->balancer->send_heartbeat();
   }
@@ -548,7 +551,7 @@ void MDBalancer::prep_rebalance(int beat)
 	  if (maxim <= .001) continue;
 	  try_match(ex->second, maxex,
 		    im->first, maxim);
-	  if (maxex <= .001) break;
+	  if (maxex <= .001) break;;
 	}
       }
     }
@@ -640,12 +643,26 @@ void MDBalancer::try_rebalance()
 
   // do my exports!
   set<CDir*> already_exporting;
+  double total_sent = 0;
+  double total_goal = 0;
 
   for (map<int,double>::iterator it = my_targets.begin();
        it != my_targets.end();
        ++it) {
+
+      /*
+	double fac = 1.0;
+	if (false && total_goal > 0 && total_sent > 0) {
+	fac = total_goal / total_sent;
+	dout(0) << " total sent is " << total_sent << " / " << total_goal << " -> fac 1/ " << fac << dendl;
+	if (fac > 1.0) fac = 1.0;
+	}
+	fac = .9 - .4 * ((float)g_conf->num_mds / 128.0);  // hack magic fixme
+      */
+
     int target = (*it).first;
     double amount = (*it).second;
+    total_goal += amount;
 
     if (amount < MIN_OFFLOAD) continue;
     if (amount / target_load < .2) continue;
@@ -691,6 +708,7 @@ void MDBalancer::try_rebalance()
       }
     }
     if (amount-have < MIN_OFFLOAD) {
+      total_sent += have;
       continue;
     }
 
@@ -717,6 +735,7 @@ void MDBalancer::try_rebalance()
       }
     if (amount-have < MIN_OFFLOAD) {
       //fudge = amount-have;
+      total_sent += have;
       continue;
     }
 
@@ -735,6 +754,7 @@ void MDBalancer::try_rebalance()
 	break;
     }
     //fudge = amount - have;
+    total_sent += have;
 
     for (list<CDir*>::iterator it = exports.begin(); it != exports.end(); ++it) {
       dout(0) << "   - exporting "
diff --git a/src/mds/MDBalancer.h b/src/mds/MDBalancer.h
index dacbf3c..e73a088 100644
--- a/src/mds/MDBalancer.h
+++ b/src/mds/MDBalancer.h
@@ -31,6 +31,7 @@ class MDS;
 class Message;
 class MHeartbeat;
 class CInode;
+class Context;
 class CDir;
 
 class MDBalancer {
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index ea5bb36..6c52fbd 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -27,6 +27,7 @@
 #include "MDBalancer.h"
 #include "Migrator.h"
 
+#include "AnchorClient.h"
 #include "SnapClient.h"
 
 #include "MDSMap.h"
@@ -127,45 +128,7 @@ long g_num_caps = 0;
 set<int> SimpleLock::empty_gather_set;
 
 
-/**
- * All non-I/O contexts that require a reference
- * to an MDCache instance descend from this.
- */
-class MDCacheContext : public virtual MDSInternalContextBase {
-protected:
-  MDCache *mdcache;
-  virtual MDS *get_mds()
-  {
-    assert(mdcache != NULL);
-    return mdcache->mds;
-  }
-public:
-  MDCacheContext(MDCache *mdc_) : mdcache(mdc_) {}
-};
-
-
-/**
- * Only for contexts called back from an I/O completion
- *
- * Note: duplication of members wrt MDCacheContext, because
- * it'ls the lesser of two evils compared with introducing
- * yet another piece of (multiple) inheritance.
- */
-class MDCacheIOContext : public virtual MDSIOContextBase {
-protected:
-  MDCache *mdcache;
-  virtual MDS *get_mds()
-  {
-    assert(mdcache != NULL);
-    return mdcache->mds;
-  }
-public:
-  MDCacheIOContext(MDCache *mdc_) : mdcache(mdc_) {}
-};
-
-
 MDCache::MDCache(MDS *m) :
-  recovery_queue(m),
   delayed_eval_stray(member_offset(CDentry, item_stray))
 {
   mds = m;
@@ -220,14 +183,14 @@ MDCache::~MDCache()
 
 void MDCache::log_stat()
 {
-  mds->logger->set(l_mds_inode_max, g_conf->mds_cache_size);
-  mds->logger->set(l_mds_inodes, lru.lru_get_size());
-  mds->logger->set(l_mds_inodes_pinned, lru.lru_get_num_pinned());
-  mds->logger->set(l_mds_inodes_top, lru.lru_get_top());
-  mds->logger->set(l_mds_inodes_bottom, lru.lru_get_bot());
-  mds->logger->set(l_mds_inodes_pin_tail, lru.lru_get_pintail());
-  mds->logger->set(l_mds_inodes_with_caps, num_inodes_with_caps);
-  mds->logger->set(l_mds_caps, num_caps);
+  mds->logger->set(l_mds_imax, g_conf->mds_cache_size);
+  mds->logger->set(l_mds_i, lru.lru_get_size());
+  mds->logger->set(l_mds_ipin, lru.lru_get_num_pinned());
+  mds->logger->set(l_mds_itop, lru.lru_get_top());
+  mds->logger->set(l_mds_ibot, lru.lru_get_bot());
+  mds->logger->set(l_mds_iptail, lru.lru_get_pintail());
+  mds->logger->set(l_mds_icap, num_inodes_with_caps);
+  mds->logger->set(l_mds_cap, num_caps);
 }
 
 
@@ -371,7 +334,7 @@ CInode *MDCache::create_root_inode()
   return i;
 }
 
-void MDCache::create_empty_hierarchy(MDSGather *gather)
+void MDCache::create_empty_hierarchy(C_Gather *gather)
 {
   // create root dir
   CInode *root = create_root_inode();
@@ -396,7 +359,7 @@ void MDCache::create_empty_hierarchy(MDSGather *gather)
   root->store(gather->new_sub());
 }
 
-void MDCache::create_mydir_hierarchy(MDSGather *gather)
+void MDCache::create_mydir_hierarchy(C_Gather *gather)
 {
   // create mds dir
   char myname[10];
@@ -406,6 +369,8 @@ void MDCache::create_mydir_hierarchy(MDSGather *gather)
   CDir *mydir = my->get_or_open_dirfrag(this, frag_t());
   adjust_subtree_auth(mydir, mds->whoami);   
 
+  LogSegment *ls = mds->mdlog->get_current_segment();
+
   // stray dir
   for (int i = 0; i < NUM_STRAY; ++i) {
     CInode *stray = create_system_inode(MDS_INO_STRAY(mds->whoami, i), S_IFDIR);
@@ -421,8 +386,10 @@ void MDCache::create_mydir_hierarchy(MDSGather *gather)
     mydir->fnode.fragstat.nsubdirs++;
     // save them
     straydir->mark_complete();
-    straydir->mark_dirty(straydir->pre_dirty(), mds->mdlog->get_current_segment());
+    straydir->mark_dirty(straydir->pre_dirty(), ls);
     straydir->commit(0, gather->new_sub());
+    stray->_mark_dirty_parent(ls, true);
+    stray->store_backtrace(gather->new_sub());
   }
 
   CInode *journal = create_system_inode(MDS_INO_LOG_OFFSET + mds->whoami, S_IFREG);
@@ -442,25 +409,26 @@ void MDCache::create_mydir_hierarchy(MDSGather *gather)
 
 
   mydir->mark_complete();
-  mydir->mark_dirty(mydir->pre_dirty(), mds->mdlog->get_current_segment());
+  mydir->mark_dirty(mydir->pre_dirty(), ls);
   mydir->commit(0, gather->new_sub());
 
   myin->store(gather->new_sub());
 }
 
-struct C_MDC_CreateSystemFile : public MDCacheContext {
+struct C_MDC_CreateSystemFile : public Context {
+  MDCache *cache;
   MutationRef mut;
   CDentry *dn;
   version_t dpv;
-  MDSInternalContextBase *fin;
-  C_MDC_CreateSystemFile(MDCache *c, MutationRef& mu, CDentry *d, version_t v, MDSInternalContextBase *f) :
-    MDCacheContext(c), mut(mu), dn(d), dpv(v), fin(f) {}
+  Context *fin;
+  C_MDC_CreateSystemFile(MDCache *c, MutationRef& mu, CDentry *d, version_t v, Context *f) :
+    cache(c), mut(mu), dn(d), dpv(v), fin(f) {}
   void finish(int r) {
-    mdcache->_create_system_file_finish(mut, dn, dpv, fin);
+    cache->_create_system_file_finish(mut, dn, dpv, fin);
   }
 };
 
-void MDCache::_create_system_file(CDir *dir, const char *name, CInode *in, MDSInternalContextBase *fin)
+void MDCache::_create_system_file(CDir *dir, const char *name, CInode *in, Context *fin)
 {
   dout(10) << "_create_system_file " << name << " in " << *dir << dendl;
   CDentry *dn = dir->add_null_dentry(name);
@@ -505,11 +473,12 @@ void MDCache::_create_system_file(CDir *dir, const char *name, CInode *in, MDSIn
   if (mdir)
     le->metablob.add_new_dir(mdir); // dirty AND complete AND new
 
-  mds->mdlog->submit_entry(le, new C_MDC_CreateSystemFile(this, mut, dn, dpv, fin));
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(new C_MDC_CreateSystemFile(this, mut, dn, dpv, fin));
   mds->mdlog->flush();
 }
 
-void MDCache::_create_system_file_finish(MutationRef& mut, CDentry *dn, version_t dpv, MDSInternalContextBase *fin)
+void MDCache::_create_system_file_finish(MutationRef& mut, CDentry *dn, version_t dpv, Context *fin)
 {
   dout(10) << "_create_system_file_finish " << *dn << dendl;
   
@@ -539,9 +508,9 @@ void MDCache::_create_system_file_finish(MutationRef& mut, CDentry *dn, version_
 
 
 
-struct C_MDS_RetryOpenRoot : public MDSInternalContext {
+struct C_MDS_RetryOpenRoot : public Context {
   MDCache *cache;
-  C_MDS_RetryOpenRoot(MDCache *c) : MDSInternalContext(c->mds), cache(c) {}
+  C_MDS_RetryOpenRoot(MDCache *c) : cache(c) {}
   void finish(int r) {
     if (r < 0)
       cache->mds->suicide();
@@ -550,7 +519,7 @@ struct C_MDS_RetryOpenRoot : public MDSInternalContext {
   }
 };
 
-void MDCache::open_root_inode(MDSInternalContextBase *c)
+void MDCache::open_root_inode(Context *c)
 {
   if (mds->whoami == mds->mdsmap->get_root()) {
     CInode *in;
@@ -561,7 +530,7 @@ void MDCache::open_root_inode(MDSInternalContextBase *c)
   }
 }
 
-void MDCache::open_mydir_inode(MDSInternalContextBase *c)
+void MDCache::open_mydir_inode(Context *c)
 {
   CInode *in = create_system_inode(MDS_INO_MDSDIR(mds->whoami), S_IFDIR|0755);  // initially inaccurate!
   in->fetch(c);
@@ -677,7 +646,7 @@ void MDCache::populate_mydir()
   scan_stray_dir();
 }
 
-void MDCache::open_foreign_mdsdir(inodeno_t ino, MDSInternalContextBase *fin)
+void MDCache::open_foreign_mdsdir(inodeno_t ino, Context *fin)
 {
   discover_base_ino(ino, fin, ino & (MAX_MDS-1));
 }
@@ -832,11 +801,12 @@ void MDCache::try_subtree_merge(CDir *dir)
     try_subtree_merge_at(*p);
 }
 
-class C_MDC_SubtreeMergeWB : public MDCacheContext {
+class C_MDC_SubtreeMergeWB : public Context {
+  MDCache *mdcache;
   CInode *in;
   MutationRef mut;
 public:
-  C_MDC_SubtreeMergeWB(MDCache *mdc, CInode *i, MutationRef& m) : MDCacheContext(mdc), in(i), mut(m) {}
+  C_MDC_SubtreeMergeWB(MDCache *mdc, CInode *i, MutationRef& m) : mdcache(mdc), in(i), mut(m) {}
   void finish(int r) { 
     mdcache->subtree_merge_writebehind_finish(in, mut);
   }
@@ -911,7 +881,8 @@ void MDCache::try_subtree_merge_at(CDir *dir, bool do_eval)
       le->metablob.add_dir_context(in->get_parent_dn()->get_dir());
       journal_dirty_inode(mut.get(), &le->metablob, in);
       
-      mds->mdlog->submit_entry(le, new C_MDC_SubtreeMergeWB(this, in, mut));
+      mds->mdlog->submit_entry(le);
+      mds->mdlog->wait_for_safe(new C_MDC_SubtreeMergeWB(this, in, mut));
       mds->mdlog->flush();
     }
   } 
@@ -1843,6 +1814,9 @@ void MDCache::project_rstat_frag_to_inode(nest_info_t& rstat, nest_info_t& accou
     pi->rstat.add(delta);
     dout(20) << "        result [" << first << "," << last << "] " << pi->rstat << dendl;
 
+    if (pi->rstat.rbytes < 0 && pin->dirfragtree.is_leaf(frag_t()))
+      assert(!"negative rstat rbytes" == g_conf->mds_verify_scatter);
+
     last = first-1;
   }
 }
@@ -1891,9 +1865,9 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
 
   assert(mds->mdlog->entry_is_open());
 
-  // make sure stamp is set
-  if (mut->get_mds_stamp() == utime_t())
-    mut->set_mds_stamp(ceph_clock_now(g_ceph_context));
+  // declare now?
+  if (mut->now == utime_t())
+    mut->now = ceph_clock_now(g_ceph_context);
 
   if (in->is_base())
     return;
@@ -1944,10 +1918,10 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
       parent->resync_accounted_fragstat();
 
       if (do_parent_mtime) {
-	pf->fragstat.mtime = mut->get_op_stamp();
-	if (pf->fragstat.mtime > pf->rstat.rctime) {
+	pf->fragstat.mtime = mut->now;
+	if (mut->now > pf->rstat.rctime) {
 	  dout(10) << "predirty_journal_parents updating mtime on " << *parent << dendl;
-	  pf->rstat.rctime = pf->fragstat.mtime;
+	  pf->rstat.rctime = mut->now;
 	} else {
 	  dout(10) << "predirty_journal_parents updating mtime UNDERWATER on " << *parent << dendl;
 	}
@@ -2012,14 +1986,19 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
     // delay propagating until later?
     if (!stop && !first &&
 	g_conf->mds_dirstat_min_interval > 0) {
-      double since_last_prop = mut->get_mds_stamp() - pin->last_dirstat_prop;
-      if (since_last_prop < g_conf->mds_dirstat_min_interval) {
-	dout(10) << "predirty_journal_parents last prop " << since_last_prop
-		 << " < " << g_conf->mds_dirstat_min_interval
-		 << ", stopping" << dendl;
-	stop = true;
+      if (pin->last_dirstat_prop.sec() > 0) {
+	double since_last_prop = mut->now - pin->last_dirstat_prop;
+	if (since_last_prop < g_conf->mds_dirstat_min_interval) {
+	  dout(10) << "predirty_journal_parents last prop " << since_last_prop
+		   << " < " << g_conf->mds_dirstat_min_interval
+		   << ", stopping" << dendl;
+	  stop = true;
+	} else {
+	  dout(10) << "predirty_journal_parents last prop " << since_last_prop << " ago, continuing" << dendl;
+	}
       } else {
-	dout(10) << "predirty_journal_parents last prop " << since_last_prop << " ago, continuing" << dendl;
+	dout(10) << "predirty_journal_parents last prop never, stopping" << dendl;
+	stop = true;
       }
     }
 
@@ -2054,7 +2033,7 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
     assert(mut->wrlocks.count(&pin->nestlock) ||
 	   mut->is_slave());
     
-    pin->last_dirstat_prop = mut->get_mds_stamp();
+    pin->last_dirstat_prop = mut->now;
 
     // dirfrag -> diri
     mut->auth_pin(pin);
@@ -2081,7 +2060,7 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
 	if (pi->dirstat.size() < 0)
 	  assert(!"negative dirstat size" == g_conf->mds_verify_scatter);
 	if (pi->dirstat.size() != pf->fragstat.size()) {
-	  mds->clog->error() << "unmatched fragstat size on single dirfrag "
+	  mds->clog.error() << "unmatched fragstat size on single dirfrag "
 	     << parent->dirfrag() << ", inode has " << pi->dirstat
 	     << ", dirfrag has " << pf->fragstat << "\n";
 	  
@@ -2128,7 +2107,7 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
 
       if (parent->get_frag() == frag_t()) { // i.e., we are the only frag
 	if (pi->rstat.rbytes != pf->rstat.rbytes) { 
-	  mds->clog->error() << "unmatched rstat rbytes on single dirfrag "
+	  mds->clog.error() << "unmatched rstat rbytes on single dirfrag "
 	      << parent->dirfrag() << ", inode has " << pi->rstat
 	      << ", dirfrag has " << pf->rstat << "\n";
 	  
@@ -2178,11 +2157,12 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
  * remove them from the uncommitted_masters map (used during recovery
  * to commit|abort slaves).
  */
-struct C_MDC_CommittedMaster : public MDCacheContext {
+struct C_MDC_CommittedMaster : public Context {
+  MDCache *cache;
   metareqid_t reqid;
-  C_MDC_CommittedMaster(MDCache *s, metareqid_t r) : MDCacheContext(s), reqid(r) {}
+  C_MDC_CommittedMaster(MDCache *s, metareqid_t r) : cache(s), reqid(r) {}
   void finish(int r) {
-    mdcache->_logged_master_commit(reqid);
+    cache->_logged_master_commit(reqid);
   }
 };
 
@@ -2253,12 +2233,13 @@ void MDCache::finish_committed_masters()
  * masters when it reaches up:active (all other recovering nodes must
  * complete resolve before that happens).
  */
-struct C_MDC_SlaveCommit : public MDCacheContext {
+struct C_MDC_SlaveCommit : public Context {
+  MDCache *cache;
   int from;
   metareqid_t reqid;
-  C_MDC_SlaveCommit(MDCache *c, int f, metareqid_t r) : MDCacheContext(c), from(f), reqid(r) {}
+  C_MDC_SlaveCommit(MDCache *c, int f, metareqid_t r) : cache(c), from(f), reqid(r) {}
   void finish(int r) {
-    mdcache->_logged_slave_commit(from, reqid);
+    cache->_logged_slave_commit(from, reqid);
   }
 };
 
@@ -2307,7 +2288,7 @@ ESubtreeMap *MDCache::create_subtree_map()
   show_subtrees();
 
   ESubtreeMap *le = new ESubtreeMap();
-  mds->mdlog->_start_entry(le);
+  mds->mdlog->start_entry(le);
   
   CDir *mydir = 0;
   if (myin) {
@@ -2677,7 +2658,7 @@ void MDCache::handle_mds_failure(int who)
   for (ceph::unordered_map<metareqid_t, MDRequestRef>::iterator p = active_requests.begin();
        p != active_requests.end();
        ++p) {
-    MDRequestRef& mdr = p->second;
+    MDRequestRef& mdr = p->second;;
     // slave to the failed node?
     if (mdr->slave_to_mds == who) {
       if (mdr->slave_did_prepare()) {
@@ -2784,20 +2765,6 @@ void MDCache::handle_mds_failure(int who)
   kick_find_ino_peers(who);
   kick_open_ino_peers(who);
 
-  for (map<dirfrag_t,fragment_info_t>::iterator p = fragments.begin();
-       p != fragments.end(); ) {
-    dirfrag_t df = p->first;
-    fragment_info_t& info = p->second;
-    ++p;
-    if (info.is_fragmenting())
-      continue;
-    dout(10) << "cancelling fragment " << df << " bit " << info.bits << dendl;
-    list<CDir*> dirs;
-    info.dirs.swap(dirs);
-    fragments.erase(df);
-    fragment_unmark_unfreeze_dirs(dirs);
-  }
-
   show_subtrees();  
 }
 
@@ -2813,7 +2780,7 @@ void MDCache::handle_mds_recovery(int who)
   static const uint64_t i_mask = CInode::WAIT_ANY_MASK & ~CInode::WAIT_DIR;
   static const uint64_t d_mask = CDir::WAIT_ANY_MASK & ~CDir::WAIT_DENTRY;
 
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
 
   // wake up any waiters in their subtrees
   for (map<CDir*,set<CDir*> >::iterator p = subtrees.begin();
@@ -2969,10 +2936,8 @@ void MDCache::handle_resolve(MMDSResolve *m)
     return;
   }
 
-  bool survivor = false;
   // am i a surviving ambiguous importer?
   if (mds->is_clientreplay() || mds->is_active() || mds->is_stopping()) {
-    survivor = true;
     // check for any import success/failure (from this node)
     map<dirfrag_t, vector<dirfrag_t> >::iterator p = my_ambiguous_imports.begin();
     while (p != my_ambiguous_imports.end()) {
@@ -2991,7 +2956,7 @@ void MDCache::handle_resolve(MMDSResolve *m)
 	     q != m->subtrees.end();
 	     ++q) {
 	  // an ambiguous import won't race with a refragmentation; it's appropriate to force here.
-	  CDir *base = get_force_dirfrag(q->first, false);
+	  CDir *base = get_force_dirfrag(q->first);
 	  if (!base || !base->contains(dir)) 
 	    continue;  // base not dir or an ancestor of dir, clearly doesn't claim dir.
 
@@ -3029,7 +2994,7 @@ void MDCache::handle_resolve(MMDSResolve *m)
        pi != m->subtrees.end();
        ++pi) {
     dout(10) << "peer claims " << pi->first << " bounds " << pi->second << dendl;
-    CDir *dir = get_force_dirfrag(pi->first, !survivor);
+    CDir *dir = get_force_dirfrag(pi->first);
     if (!dir)
       continue;
     adjust_bounded_subtree_auth(dir, pi->second, from);
@@ -3087,7 +3052,7 @@ void MDCache::maybe_resolve_finish()
   finish_committed_masters();
   if (mds->is_resolve()) {
     trim_unlinked_inodes();
-    recalc_auth_bits(false);
+    recalc_auth_bits();
     mds->resolve_done();
   } else {
     maybe_send_pending_rejoins();
@@ -3128,8 +3093,8 @@ void MDCache::handle_resolve_ack(MMDSResolveAck *ack)
 
       // log commit
       mds->mdlog->start_submit_entry(new ESlaveUpdate(mds->mdlog, "unknown", p->first, from,
-						      ESlaveUpdate::OP_COMMIT, su->origop),
-				     new C_MDC_SlaveCommit(this, from, p->first));
+						      ESlaveUpdate::OP_COMMIT, su->origop));
+      mds->mdlog->wait_for_safe(new C_MDC_SlaveCommit(this, from, p->first));
       mds->mdlog->flush();
 
       finish_uncommitted_slave_update(p->first, from);
@@ -3273,7 +3238,6 @@ void MDCache::disambiguate_imports()
 {
   dout(10) << "disambiguate_imports" << dendl;
 
-  bool is_resolve = mds->is_resolve();
   // other nodes' ambiguous imports
   for (map<int, map<dirfrag_t, vector<dirfrag_t> > >::iterator p = other_ambiguous_imports.begin();
        p != other_ambiguous_imports.end();
@@ -3286,7 +3250,7 @@ void MDCache::disambiguate_imports()
 	 ++q) {
       dout(10) << " ambiguous import " << q->first << " bounds " << q->second << dendl;
       // an ambiguous import will not race with a refragmentation; it's appropriate to force here.
-      CDir *dir = get_force_dirfrag(q->first, is_resolve);
+      CDir *dir = get_force_dirfrag(q->first);
       if (!dir) continue;
       
       if (dir->is_ambiguous_auth() ||	// works for me_ambig or if i am a surviving bystander
@@ -3331,7 +3295,7 @@ void MDCache::disambiguate_imports()
   assert(my_ambiguous_imports.empty());
   mds->mdlog->flush();
 
-  if (is_resolve) {
+  if (mds->is_resolve()) {
     // verify all my subtrees are unambiguous!
     for (map<CDir*,set<CDir*> >::iterator p = subtrees.begin();
 	 p != subtrees.end();
@@ -3452,19 +3416,15 @@ void MDCache::trim_unlinked_inodes()
  * once subtree auth is disambiguated, we need to adjust all the 
  * auth and dirty bits in our cache before moving on.
  */
-void MDCache::recalc_auth_bits(bool replay)
+void MDCache::recalc_auth_bits()
 {
-  dout(7) << "recalc_auth_bits " << (replay ? "(replay)" : "") <<  dendl;
+  dout(7) << "recalc_auth_bits" << dendl;
 
   if (root) {
     root->inode_auth.first = mds->mdsmap->get_root();
-    bool auth = mds->whoami == root->inode_auth.first;
-    if (auth) {
-      root->state_set(CInode::STATE_AUTH);
-    } else {
+    if (mds->whoami != root->inode_auth.first) {
       root->state_clear(CInode::STATE_AUTH);
-      if (!replay)
-	root->state_set(CInode::STATE_REJOINING);
+      root->state_set(CInode::STATE_REJOINING);
     }
   }
 
@@ -3479,16 +3439,11 @@ void MDCache::recalc_auth_bits(bool replay)
   for (map<CDir*,set<CDir*> >::iterator p = subtrees.begin();
        p != subtrees.end();
        ++p) {
-    if (p->first->inode->is_mdsdir()) {
-      CInode *in = p->first->inode;
-      bool auth = in->ino() == MDS_INO_MDSDIR(mds->get_nodeid());
-      if (auth) {
-	in->state_set(CInode::STATE_AUTH);
-      } else {
-	in->state_clear(CInode::STATE_AUTH);
-	if (!replay)
-	  in->state_set(CInode::STATE_REJOINING);
-      }
+
+    CInode *inode = p->first->get_inode();
+    if (inode->is_mdsdir() && inode->ino() != MDS_INO_MDSDIR(mds->get_nodeid())) {
+      inode->state_clear(CInode::STATE_AUTH);
+      inode->state_set(CInode::STATE_REJOINING);
     }
 
     list<CDir*> dfq;  // dirfrag queue
@@ -3505,18 +3460,16 @@ void MDCache::recalc_auth_bits(bool replay)
       if (auth) {
 	dir->state_set(CDir::STATE_AUTH);
       } else {
-	dir->state_clear(CDir::STATE_AUTH);
-	if (!replay) {
-	  // close empty non-auth dirfrag
-	  if (!dir->is_subtree_root() && dir->get_num_any() == 0) {
-	    dir->inode->close_dirfrag(dir->get_frag());
-	    continue;
-	  }
-	  dir->state_set(CDir::STATE_REJOINING);
-	  dir->state_clear(CDir::STATE_COMPLETE);
-	  if (dir->is_dirty())
-	    dir->mark_clean();
+	// close empty non-auth dirfrag
+	if (!dir->is_subtree_root() && dir->get_num_any() == 0) {
+	  dir->inode->close_dirfrag(dir->get_frag());
+	  continue;
 	}
+	dir->state_set(CDir::STATE_REJOINING);
+	dir->state_clear(CDir::STATE_AUTH);
+	dir->state_clear(CDir::STATE_COMPLETE);
+	if (dir->is_dirty()) 
+	  dir->mark_clean();
       }
 
       // dentries in this dir
@@ -3526,38 +3479,34 @@ void MDCache::recalc_auth_bits(bool replay)
 	// dn
 	CDentry *dn = q->second;
 	CDentry::linkage_t *dnl = dn->get_linkage();
-	if (auth) {
+	if (auth)
 	  dn->state_set(CDentry::STATE_AUTH);
-	} else {
+	else {
+	  dn->state_set(CDentry::STATE_REJOINING);
 	  dn->state_clear(CDentry::STATE_AUTH);
-	  if (!replay) {
-	    dn->state_set(CDentry::STATE_REJOINING);
-	    if (dn->is_dirty())
-	      dn->mark_clean();
-	  }
+	  if (dn->is_dirty()) 
+	    dn->mark_clean();
 	}
 
 	if (dnl->is_primary()) {
 	  // inode
-	  CInode *in = dnl->get_inode();
-	  if (auth) {
-	    in->state_set(CInode::STATE_AUTH);
-	  } else {
-	    in->state_clear(CInode::STATE_AUTH);
-	    if (!replay) {
-	      in->state_set(CInode::STATE_REJOINING);
-	      if (in->is_dirty())
-		in->mark_clean();
-	      if (in->is_dirty_parent())
-		in->clear_dirty_parent();
-	      // avoid touching scatterlocks for our subtree roots!
-	      if (subtree_inodes.count(in) == 0)
-		in->clear_scatter_dirty();
-	    }
+	  if (auth) 
+	    dnl->get_inode()->state_set(CInode::STATE_AUTH);
+	  else {
+	    dnl->get_inode()->state_set(CInode::STATE_REJOINING);
+	    dnl->get_inode()->state_clear(CInode::STATE_AUTH);
+	    if (dnl->get_inode()->is_dirty())
+	      dnl->get_inode()->mark_clean();
+	    if (dnl->get_inode()->is_dirty_parent())
+	      dnl->get_inode()->clear_dirty_parent();
+	    // avoid touching scatterlocks for our subtree roots!
+	    if (subtree_inodes.count(dnl->get_inode()) == 0)
+	      dnl->get_inode()->clear_scatter_dirty();
 	  }
+
 	  // recurse?
-	  if (in->is_dir())
-	    in->get_nested_dirfrags(dfq);
+	  if (dnl->get_inode()->is_dir()) 
+	    dnl->get_inode()->get_nested_dirfrags(dfq);
 	}
       }
     }
@@ -3764,24 +3713,24 @@ void MDCache::rejoin_send_rejoins()
       if (mdr->is_slave())
 	continue;
       // auth pins
-      for (map<MDSCacheObject*,int>::iterator q = mdr->remote_auth_pins.begin();
+      for (set<MDSCacheObject*>::iterator q = mdr->remote_auth_pins.begin();
 	   q != mdr->remote_auth_pins.end();
 	   ++q) {
-	if (!q->first->is_auth()) {
-	  assert(q->second == q->first->authority().first);
-	  if (rejoins.count(q->second) == 0) continue;
-	  MMDSCacheRejoin *rejoin = rejoins[q->second];
+	if (!(*q)->is_auth()) {
+	  int who = (*q)->authority().first;
+	  if (rejoins.count(who) == 0) continue;
+	  MMDSCacheRejoin *rejoin = rejoins[who];
 	  
-	  dout(15) << " " << *mdr << " authpin on " << *q->first << dendl;
+	  dout(15) << " " << *mdr << " authpin on " << **q << dendl;
 	  MDSCacheObjectInfo i;
-	  q->first->set_object_info(i);
+	  (*q)->set_object_info(i);
 	  if (i.ino)
 	    rejoin->add_inode_authpin(vinodeno_t(i.ino, i.snapid), mdr->reqid, mdr->attempt);
 	  else
 	    rejoin->add_dentry_authpin(i.dirfrag, i.dname, i.snapid, mdr->reqid, mdr->attempt);
 
 	  if (mdr->has_more() && mdr->more()->is_remote_frozen_authpin &&
-	      mdr->more()->rename_inode == q->first)
+	      mdr->more()->rename_inode == (*q))
 	    rejoin->add_inode_frozen_authpin(vinodeno_t(i.ino, i.snapid),
 					     mdr->reqid, mdr->attempt);
 	}
@@ -3953,9 +3902,17 @@ void MDCache::handle_cache_rejoin(MMDSCacheRejoin *m)
   case MMDSCacheRejoin::OP_STRONG:
     handle_cache_rejoin_strong(m);
     break;
+
   case MMDSCacheRejoin::OP_ACK:
     handle_cache_rejoin_ack(m);
     break;
+  case MMDSCacheRejoin::OP_MISSING:
+    handle_cache_rejoin_missing(m);
+    break;
+
+  case MMDSCacheRejoin::OP_FULL:
+    handle_cache_rejoin_full(m);
+    break;
 
   default: 
     assert(0);
@@ -4089,10 +4046,8 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak)
 	dirs_to_share.insert(dir);
 	unsigned nonce = dir->add_replica(from);
 	dout(10) << " have " << p->frag << " -> " << fg << " " << *dir << dendl;
-	if (ack) {
+	if (ack)
 	  ack->add_strong_dirfrag(dir->dirfrag(), nonce, dir->dir_rep);
-	  ack->add_dirfrag_base(dir);
-	}
       }
     }
   }
@@ -4210,11 +4165,12 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak)
   }
 }
 
-class C_MDC_RejoinGatherFinish : public MDCacheContext {
+class C_MDC_RejoinGatherFinish : public Context {
+  MDCache *cache;
 public:
-  C_MDC_RejoinGatherFinish(MDCache *c) : MDCacheContext(c) {}
+  C_MDC_RejoinGatherFinish(MDCache *c) : cache(c) {}
   void finish(int r) {
-    mdcache->rejoin_gather_finish();
+    cache->rejoin_gather_finish();
   }
 };
 
@@ -4535,7 +4491,7 @@ void MDCache::handle_cache_rejoin_strong(MMDSCacheRejoin *strong)
 	  if (have_request(r->reqid))
 	    mdr = request_get(r->reqid);
 	  else
-	    mdr = request_start_slave(r->reqid, r->attempt, strong);
+	    mdr = request_start_slave(r->reqid, r->attempt, from);
 	  mdr->auth_pin(dn);
 	}
       }
@@ -4614,7 +4570,7 @@ void MDCache::handle_cache_rejoin_strong(MMDSCacheRejoin *strong)
     //  infer state from replica state:
     //   * go to MIX if they might have wrlocks
     //   * go to LOCK if they are LOCK (just bc identify_files_to_recover might start twiddling filelock)
-    in->filelock.infer_state_from_strong_rejoin(is.filelock, !in->is_dir());  // maybe also go to LOCK
+    in->filelock.infer_state_from_strong_rejoin(is.filelock, true);  // maybe also go to LOCK
     in->nestlock.infer_state_from_strong_rejoin(is.nestlock, false);
     in->dirfragtreelock.infer_state_from_strong_rejoin(is.dftlock, false);
 
@@ -4630,7 +4586,7 @@ void MDCache::handle_cache_rejoin_strong(MMDSCacheRejoin *strong)
 	if (have_request(r->reqid))
 	  mdr = request_get(r->reqid);
 	else
-	  mdr = request_start_slave(r->reqid, r->attempt, strong);
+	  mdr = request_start_slave(r->reqid, r->attempt, from);
 	if (strong->frozen_authpin_inodes.count(in->vino())) {
 	  assert(!in->get_num_auth_pins());
 	  mdr->freeze_auth_pin(in);
@@ -4718,14 +4674,17 @@ void MDCache::handle_cache_rejoin_ack(MMDSCacheRejoin *ack)
        ++p) {
     // we may have had incorrect dir fragmentation; refragment based
     // on what they auth tells us.
-    CDir *dir = get_dirfrag(p->first);
-    if (!dir) {
-      dir = get_force_dirfrag(p->first, false);
-      if (dir)
-	refragged_inodes.insert(dir->get_inode());
+    CInode *diri = get_inode(p->first.ino);
+    CDir *dir = NULL;
+    if (diri) {
+      dir = diri->get_dirfrag(p->first.frag);
+      if (!dir) {
+	dir = force_dir_fragment(diri, p->first.frag, false);
+	if (dir)
+	  refragged_inodes.insert(dir->get_inode());
+      }
     }
     if (!dir) {
-      CInode *diri = get_inode(p->first.ino);
       if (!diri) {
 	// barebones inode; the full inode loop below will clean up.
 	diri = new CInode(this, false);
@@ -4946,6 +4905,90 @@ void MDCache::handle_cache_rejoin_ack(MMDSCacheRejoin *ack)
   }
 }
 
+
+
+/* This functions DOES NOT put the passed message before returning */
+void MDCache::handle_cache_rejoin_missing(MMDSCacheRejoin *missing)
+{
+  dout(7) << "handle_cache_rejoin_missing from " << missing->get_source() << dendl;
+
+  MMDSCacheRejoin *full = new MMDSCacheRejoin(MMDSCacheRejoin::OP_FULL);
+
+  // dirs
+  for (map<dirfrag_t, MMDSCacheRejoin::dirfrag_strong>::iterator p = missing->strong_dirfrags.begin();
+       p != missing->strong_dirfrags.end();
+       ++p) {
+    // we may have had incorrect dir fragmentation; refragment based
+    // on what they auth tells us.
+    CDir *dir = get_force_dirfrag(p->first);
+    assert(dir);
+
+    dir->set_replica_nonce(p->second.nonce);
+    dir->state_clear(CDir::STATE_REJOINING);
+    dout(10) << " adjusted frag on " << *dir << dendl;
+  }
+
+  // inodes
+  for (set<vinodeno_t>::iterator p = missing->weak_inodes.begin();
+       p != missing->weak_inodes.end();
+       ++p) {
+    CInode *in = get_inode(*p);
+    if (!in) {
+      dout(10) << " don't have inode " << *p << dendl;
+      continue; // we must have trimmed it after the originalo rejoin
+    }
+    
+    dout(10) << " sending " << *in << dendl;
+    full->add_inode_base(in);
+  }
+
+  mds->send_message(full, missing->get_connection());
+}
+
+/* This function DOES NOT put the passed message before returning */
+void MDCache::handle_cache_rejoin_full(MMDSCacheRejoin *full)
+{
+  dout(7) << "handle_cache_rejoin_full from " << full->get_source() << dendl;
+  int from = full->get_source().num();
+  
+  // integrate full inodes
+  bufferlist::iterator p = full->inode_base.begin();
+  while (!p.end()) {
+    inodeno_t ino;
+    snapid_t last;
+    bufferlist basebl;
+    ::decode(ino, p);
+    ::decode(last, p);
+    ::decode(basebl, p);
+
+    CInode *in = get_inode(ino);
+    assert(in);
+    bufferlist::iterator pp = basebl.begin();
+    in->_decode_base(pp);
+
+    set<CInode*>::iterator q = rejoin_undef_inodes.find(in);
+    if (q != rejoin_undef_inodes.end()) {
+      CInode *in = *q;
+      in->state_clear(CInode::STATE_REJOINUNDEF);
+      dout(10) << " got full " << *in << dendl;
+      rejoin_undef_inodes.erase(q);
+    } else {
+      dout(10) << " had full " << *in << dendl;
+    }
+  }
+
+  // done?
+  assert(rejoin_gather.count(from));
+  rejoin_gather.erase(from);
+  if (rejoin_gather.empty()) {
+    rejoin_gather_finish();
+  } else {
+    dout(7) << "still need rejoin from (" << rejoin_gather << ")" << dendl;
+  }
+}
+
+
+
 /**
  * rejoin_trim_undef_inodes() -- remove REJOINUNDEF flagged inodes
  *
@@ -5023,18 +5066,20 @@ void MDCache::rejoin_gather_finish()
   rejoin_ack_gather.erase(mds->whoami);
 
   // did we already get our acks too?
+  // this happens when the rejoin_gather has to wait on a MISSING/FULL exchange.
   if (rejoin_ack_gather.empty()) {
     // finally, kickstart past snap parent opens
     open_snap_parents();
   }
 }
 
-class C_MDC_RejoinOpenInoFinish: public MDCacheContext {
+class C_MDC_RejoinOpenInoFinish: public Context {
+  MDCache *cache;
   inodeno_t ino;
 public:
-  C_MDC_RejoinOpenInoFinish(MDCache *c, inodeno_t i) : MDCacheContext(c), ino(i) {}
+  C_MDC_RejoinOpenInoFinish(MDCache *c, inodeno_t i) : cache(c), ino(i) {}
   void finish(int r) {
-    mdcache->rejoin_open_ino_finish(ino, r);
+    cache->rejoin_open_ino_finish(ino, r);
   }
 };
 
@@ -5071,16 +5116,17 @@ void MDCache::rejoin_open_ino_finish(inodeno_t ino, int ret)
   }
 }
 
-class C_MDC_RejoinSessionsOpened : public MDCacheContext {
+class C_MDC_RejoinSessionsOpened : public Context {
+  MDCache *cache;
 public:
   map<client_t,entity_inst_t> client_map;
   map<client_t,uint64_t> sseqmap;
 
   C_MDC_RejoinSessionsOpened(MDCache *c, map<client_t,entity_inst_t>& cm) :
-    MDCacheContext(c), client_map(cm) {}
+    cache(c), client_map(cm) {}
   void finish(int r) {
     assert(r == 0);
-    mdcache->rejoin_open_sessions_finish(client_map, sseqmap);
+    cache->rejoin_open_sessions_finish(client_map, sseqmap);
   }
 };
 
@@ -5396,8 +5442,8 @@ void MDCache::export_remaining_imported_caps()
   cap_imports.clear();
 
   if (warn_str.peek() != EOF) {
-    mds->clog->warn() << "failed to reconnect caps for missing inodes:" << "\n";
-    mds->clog->warn(warn_str);
+    mds->clog.warn() << "failed to reconnect caps for missing inodes:" << "\n";
+    mds->clog.warn(warn_str);
   }
 }
 
@@ -5493,8 +5539,9 @@ void MDCache::do_delayed_cap_imports()
 #endif
 }
 
-struct C_MDC_OpenSnapParents : public MDCacheContext {
-  C_MDC_OpenSnapParents(MDCache *c) : MDCacheContext(c) {}
+struct C_MDC_OpenSnapParents : public Context {
+  MDCache *mdcache;
+  C_MDC_OpenSnapParents(MDCache *c) : mdcache(c) {}
   void finish(int r) {
     mdcache->open_snap_parents();
   }
@@ -5505,7 +5552,7 @@ void MDCache::open_snap_parents()
   dout(10) << "open_snap_parents" << dendl;
   
   map<client_t,MClientSnap*> splits;
-  MDSGatherBuilder gather(g_ceph_context);
+  C_GatherBuilder gather(g_ceph_context);
 
   map<CInode*,map<client_t,set<inodeno_t> > >::iterator p = missing_snap_parents.begin();
   while (p != missing_snap_parents.end()) {
@@ -5561,8 +5608,8 @@ void MDCache::open_snap_parents()
 	     ++q)
 	  warn_str << "  client." << q->first << " snapid " << q->second << "\n";
       }
-      mds->clog->warn() << "open_snap_parents has:" << "\n";
-      mds->clog->warn(warn_str);
+      mds->clog.warn() << "open_snap_parents has:" << "\n";
+      mds->clog.warn(warn_str);
     }
     assert(rejoin_waiters.empty());
     assert(missing_snap_parents.empty());
@@ -5593,7 +5640,7 @@ bool MDCache::open_undef_inodes_dirfrags()
   if (fetch_queue.empty())
     return false;
 
-  MDSGatherBuilder gather(g_ceph_context, new C_MDC_RejoinGatherFinish(this));
+  C_GatherBuilder gather(g_ceph_context, new C_MDC_RejoinGatherFinish(this));
   for (set<CDir*>::iterator p = fetch_queue.begin();
        p != fetch_queue.end();
        ++p) {
@@ -5822,17 +5869,17 @@ void MDCache::reissue_all_caps()
 
 // ===============================================================================
 
-struct C_MDC_QueuedCow : public MDCacheContext {
+struct C_MDC_QueuedCow : public Context {
+  MDCache *mdcache;
   CInode *in;
   MutationRef mut;
   C_MDC_QueuedCow(MDCache *mdc, CInode *i, MutationRef& m) :
-    MDCacheContext(mdc), in(i), mut(m) {}
+    mdcache(mdc), in(i), mut(m) {}
   void finish(int r) {
     mdcache->_queued_file_recover_cow(in, mut);
   }
 };
 
-
 void MDCache::queue_file_recover(CInode *in)
 {
   dout(10) << "queue_file_recover " << *in << dendl;
@@ -5862,7 +5909,7 @@ void MDCache::queue_file_recover(CInode *in)
       CInode *cow_inode = 0;
       journal_cow_inode(mut, &le->metablob, in, snapid-1, &cow_inode);
       assert(cow_inode);
-      recovery_queue.enqueue(cow_inode);
+      _queue_file_recover(cow_inode);
       s.erase(*s.begin());
     }
     
@@ -5872,7 +5919,7 @@ void MDCache::queue_file_recover(CInode *in)
     mds->mdlog->flush();
   }
 
-  recovery_queue.enqueue(in);
+  _queue_file_recover(in);
 }
 
 void MDCache::_queued_file_recover_cow(CInode *in, MutationRef& mut)
@@ -5883,6 +5930,25 @@ void MDCache::_queued_file_recover_cow(CInode *in, MutationRef& mut)
   mut->cleanup();
 }
 
+void MDCache::_queue_file_recover(CInode *in)
+{
+  dout(15) << "_queue_file_recover " << *in << dendl;
+  assert(in->is_auth());
+  in->state_clear(CInode::STATE_NEEDSRECOVER);
+  if (!in->state_test(CInode::STATE_RECOVERING)) {
+    in->state_set(CInode::STATE_RECOVERING);
+    in->auth_pin(this);
+  }
+  file_recover_queue.insert(in);
+}
+
+void MDCache::unqueue_file_recover(CInode *in)
+{
+  dout(15) << "unqueue_file_recover " << *in << dendl;
+  in->state_clear(CInode::STATE_RECOVERING);
+  in->auth_unpin(this);
+  file_recover_queue.erase(in);
+}
 
 /*
  * called after recovery to recover file sizes for previously opened (for write)
@@ -5936,14 +6002,102 @@ void MDCache::start_files_to_recover(vector<CInode*>& recover_q, vector<CInode*>
   }
 }
 
+struct C_MDC_Recover : public Context {
+  MDCache *mdc;
+  CInode *in;
+  uint64_t size;
+  utime_t mtime;
+  C_MDC_Recover(MDCache *m, CInode *i) : mdc(m), in(i), size(0) {}
+  void finish(int r) {
+    mdc->_recovered(in, r, size, mtime);
+  }
+};
+
 void MDCache::do_file_recover()
 {
-  recovery_queue.advance();
+  dout(10) << "do_file_recover " << file_recover_queue.size() << " queued, "
+	   << file_recovering.size() << " recovering" << dendl;
+
+  while (file_recovering.size() < 5 &&
+	 !file_recover_queue.empty()) {
+    CInode *in = *file_recover_queue.begin();
+    file_recover_queue.erase(in);
+
+    inode_t *pi = in->get_projected_inode();
+
+    // blech
+    if (pi->client_ranges.size() && !pi->get_max_size()) {
+      mds->clog.warn() << "bad client_range " << pi->client_ranges
+	  << " on ino " << pi->ino << "\n";
+    }
+
+    if (pi->client_ranges.size() && pi->get_max_size()) {
+      dout(10) << "do_file_recover starting " << in->inode.size << " " << pi->client_ranges
+	       << " " << *in << dendl;
+      file_recovering.insert(in);
+      
+      C_MDC_Recover *fin = new C_MDC_Recover(this, in);
+      mds->filer->probe(in->inode.ino, &in->inode.layout, in->last,
+			pi->get_max_size(), &fin->size, &fin->mtime, false,
+			0, fin);    
+    } else {
+      dout(10) << "do_file_recover skipping " << in->inode.size
+	       << " " << *in << dendl;
+      in->state_clear(CInode::STATE_RECOVERING);
+      mds->locker->eval(in, CEPH_LOCK_IFILE);
+      in->auth_unpin(this);
+    }
+  }
+}
+
+void MDCache::_recovered(CInode *in, int r, uint64_t size, utime_t mtime)
+{
+  dout(10) << "_recovered r=" << r << " size=" << size << " mtime=" << mtime
+	   << " for " << *in << dendl;
+
+  if (r != 0) {
+    dout(0) << "recovery error! " << r << dendl;
+    if (r == -EBLACKLISTED) {
+      mds->suicide();
+      return;
+    }
+    assert(0 == "unexpected error from osd during recovery");
+  }
+
+  file_recovering.erase(in);
+  in->state_clear(CInode::STATE_RECOVERING);
+
+  if (!in->get_parent_dn() && !in->get_projected_parent_dn()) {
+    dout(10) << " inode has no parents, killing it off" << dendl;
+    in->auth_unpin(this);
+    remove_inode(in);
+  } else {
+    // journal
+    mds->locker->check_inode_max_size(in, true, true, size, false, 0, mtime);
+    mds->locker->eval(in, CEPH_LOCK_IFILE);
+    in->auth_unpin(this);
+  }
+
+  do_file_recover();
 }
 
+void MDCache::purge_prealloc_ino(inodeno_t ino, Context *fin)
+{
+  object_t oid = CInode::get_object_name(ino, frag_t(), "");
+  object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+
+  dout(10) << "purge_prealloc_ino " << ino << " oid " << oid << dendl;
+  SnapContext snapc;
+  mds->objecter->remove(oid, oloc, snapc, ceph_clock_now(g_ceph_context), 0, 0, fin);
+}  
+
+
+
+
 // ===============================================================================
 
 
+
 // ----------------------------
 // truncate
 
@@ -5961,14 +6115,15 @@ void MDCache::truncate_inode(CInode *in, LogSegment *ls)
   _truncate_inode(in, ls);
 }
 
-struct C_IO_MDC_TruncateFinish : public MDCacheIOContext {
+struct C_MDC_TruncateFinish : public Context {
+  MDCache *mdc;
   CInode *in;
   LogSegment *ls;
-  C_IO_MDC_TruncateFinish(MDCache *c, CInode *i, LogSegment *l) :
-    MDCacheIOContext(c), in(i), ls(l) {}
+  C_MDC_TruncateFinish(MDCache *c, CInode *i, LogSegment *l) :
+    mdc(c), in(i), ls(l) {}
   void finish(int r) {
     assert(r == 0 || r == -ENOENT);
-    mdcache->truncate_inode_finish(in, ls);
+    mdc->truncate_inode_finish(in, ls);
   }
 };
 
@@ -5999,20 +6154,18 @@ void MDCache::_truncate_inode(CInode *in, LogSegment *ls)
   }
   dout(10) << "_truncate_inode  snapc " << snapc << " on " << *in << dendl;
   mds->filer->truncate(in->inode.ino, &in->inode.layout, *snapc,
-		       pi->truncate_size, pi->truncate_from-pi->truncate_size,
-		       pi->truncate_seq, utime_t(), 0,
-		       0, new C_OnFinisher(new C_IO_MDC_TruncateFinish(this, in,
-								       ls),
-					   &mds->finisher));
+		       pi->truncate_size, pi->truncate_from-pi->truncate_size, pi->truncate_seq, utime_t(), 0,
+		       0, new C_MDC_TruncateFinish(this, in, ls));
 }
 
-struct C_MDC_TruncateLogged : public MDCacheContext {
+struct C_MDC_TruncateLogged : public Context {
+  MDCache *mdc;
   CInode *in;
   MutationRef mut;
   C_MDC_TruncateLogged(MDCache *m, CInode *i, MutationRef& mu) :
-    MDCacheContext(m), in(i), mut(mu) {}
+    mdc(m), in(i), mut(mu) {}
   void finish(int r) {
-    mdcache->truncate_inode_logged(in, mut);
+    mdc->truncate_inode_logged(in, mut);
   }
 };
 
@@ -6039,7 +6192,7 @@ void MDCache::truncate_inode_finish(CInode *in, LogSegment *ls)
   CDentry *dn = in->get_projected_parent_dn();
   le->metablob.add_dir_context(dn->get_dir());
   le->metablob.add_primary_dentry(dn, in, true);
-  le->metablob.add_truncate_finish(in->ino(), ls->seq);
+  le->metablob.add_truncate_finish(in->ino(), ls->offset);
 
   journal_dirty_inode(mut.get(), &le->metablob, in);
   mds->mdlog->submit_entry(le, new C_MDC_TruncateLogged(this, in, mut));
@@ -6059,7 +6212,7 @@ void MDCache::truncate_inode_logged(CInode *in, MutationRef& mut)
   in->put(CInode::PIN_TRUNCATING);
   in->auth_unpin(this);
 
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
   in->take_waiting(CInode::WAIT_TRUNC, waiters);
   mds->queue_waiters(waiters);
 }
@@ -6067,16 +6220,14 @@ void MDCache::truncate_inode_logged(CInode *in, MutationRef& mut)
 
 void MDCache::add_recovered_truncate(CInode *in, LogSegment *ls)
 {
-  dout(20) << "add_recovered_truncate " << *in << " in log segment "
-	   << ls->seq << "/" << ls->offset << dendl;
+  dout(20) << "add_recovered_truncate " << *in << " in " << ls << " offset " << ls->offset << dendl;
   ls->truncating_inodes.insert(in);
   in->get(CInode::PIN_TRUNCATING);
 }
 
 void MDCache::remove_recovered_truncate(CInode *in, LogSegment *ls)
 {
-  dout(20) << "remove_recovered_truncate " << *in << " in log segment "
-	   << ls->seq << "/" << ls->offset << dendl;
+  dout(20) << "remove_recovered_truncate " << *in << " in " << ls << " offset " << ls->offset << dendl;
   // if we have the logseg the truncate started in, it must be in our list.
   set<CInode*>::iterator p = ls->truncating_inodes.find(in);
   assert(p != ls->truncating_inodes.end());
@@ -6112,17 +6263,12 @@ void MDCache::start_recovered_truncates()
  * however, we may expire a replica whose authority is recovering.
  * 
  */
-bool MDCache::trim(int max, int count)
+bool MDCache::trim(int max) 
 {
   // trim LRU
-  if (count > 0) {
-    max = lru.lru_get_size() - count;
-    if (max <= 0)
-      max = 1;
-  } else if (max < 0) {
+  if (max < 0) {
     max = g_conf->mds_cache_size;
-    if (max <= 0)
-      return false;
+    if (!max) return false;
   }
   dout(7) << "trim max=" << max << "  cur=" << lru.lru_get_size() << dendl;
 
@@ -6142,7 +6288,7 @@ bool MDCache::trim(int max, int count)
   while (lru.lru_get_size() + unexpirable > (unsigned)max) {
     CDentry *dn = static_cast<CDentry*>(lru.lru_expire());
     if (!dn) break;
-    if ((is_standby_replay && dn->get_linkage()->inode &&
+    if ((is_standby_replay && dn->get_linkage() &&
         dn->get_linkage()->inode->item_open_file.is_on_list()) ||
 	trim_dentry(dn, expiremap)) {
       unexpirables.push_back(dn);
@@ -6289,7 +6435,7 @@ bool MDCache::trim_dentry(CDentry *dn, map<int, MCacheExpire*>& expiremap)
   if (dir->get_num_head_items() == 0 && dir->is_subtree_root())
     migrator->export_empty_import(dir);
   
-  if (mds->logger) mds->logger->inc(l_mds_inodes_expired);
+  if (mds->logger) mds->logger->inc(l_mds_iex);
   return false;
 }
 
@@ -6368,7 +6514,7 @@ bool MDCache::trim_inode(CDentry *dn, CInode *in, CDir *con, map<int, MCacheExpi
   // INODE
   if (in->is_auth()) {
     // eval stray after closing dirfrags
-    if (dn && !mds->is_standby_replay()) {
+    if (dn) {
       maybe_eval_stray(in);
       if (dn->get_num_ref() > 0)
 	return true;
@@ -6599,8 +6745,6 @@ bool MDCache::trim_non_auth_subtree(CDir *dir)
         dir->remove_dentry(dn);
       } else {
         dout(20) << "trim_non_auth_subtree(" << dir << ") keeping inode " << in << " with dentry " << dn <<dendl;
-	dn->state_clear(CDentry::STATE_AUTH);
-	in->state_clear(CInode::STATE_AUTH);
       }
     } else if (keep_dir && dnl->is_null()) { // keep null dentry for slave rollback
       dout(20) << "trim_non_auth_subtree(" << dir << ") keeping dentry " << dn <<dendl;
@@ -6611,7 +6755,6 @@ bool MDCache::trim_non_auth_subtree(CDir *dir)
       dir->remove_dentry(dn);
     }
   }
-  dir->state_clear(CDir::STATE_AUTH);
   /**
    * We've now checked all our children and deleted those that need it.
    * Now return to caller, and tell them if *we're* a keeper.
@@ -6687,40 +6830,6 @@ void MDCache::try_trim_non_auth_subtree(CDir *dir)
   show_subtrees();
 }
 
-void MDCache::standby_trim_segment(LogSegment *ls)
-{
-  ls->new_dirfrags.clear_list();
-  ls->open_files.clear_list();
-
-  while (!ls->dirty_dirfrags.empty()) {
-    CDir *dir = ls->dirty_dirfrags.front();
-    dir->mark_clean();
-  }
-  while (!ls->dirty_inodes.empty()) {
-    CInode *in = ls->dirty_inodes.front();
-    in->mark_clean();
-  }
-  while (!ls->dirty_dentries.empty()) {
-    CDentry *dn = ls->dirty_dentries.front();
-    dn->mark_clean();
-  }
-  while (!ls->dirty_parent_inodes.empty()) {
-    CInode *in = ls->dirty_parent_inodes.front();
-    in->clear_dirty_parent();
-  }
-  while (!ls->dirty_dirfrag_dir.empty()) {
-    CInode *in = ls->dirty_dirfrag_dir.front();
-    in->filelock.remove_dirty();
-  }
-  while (!ls->dirty_dirfrag_nest.empty()) {
-    CInode *in = ls->dirty_dirfrag_nest.front();
-    in->nestlock.remove_dirty();
-  }
-  while (!ls->dirty_dirfrag_dirfragtree.empty()) {
-    CInode *in = ls->dirty_dirfrag_dirfragtree.front();
-    in->dirfragtreelock.remove_dirty();
-  }
-}
 
 /* This function DOES put the passed message before returning */
 void MDCache::handle_cache_expire(MCacheExpire *m)
@@ -7053,11 +7162,12 @@ void MDCache::check_memory_usage()
 // =========================================================================================
 // shutdown
 
-class C_MDC_ShutdownCheck : public MDCacheContext {
+class C_MDC_ShutdownCheck : public Context {
+  MDCache *mdc;
 public:
-  C_MDC_ShutdownCheck(MDCache *m) : MDCacheContext(m) {}
+  C_MDC_ShutdownCheck(MDCache *m) : mdc(m) {}
   void finish(int) {
-    mdcache->shutdown_check();
+    mdc->shutdown_check();
   }
 };
 
@@ -7415,7 +7525,7 @@ void MDCache::dispatch(Message *m)
   }
 }
 
-MDSInternalContextBase *MDCache::_get_waiter(MDRequestRef& mdr, Message *req, MDSInternalContextBase *fin)
+Context *MDCache::_get_waiter(MDRequestRef& mdr, Message *req, Context *fin)
 {
   if (mdr) {
     dout(20) << "_get_waiter retryrequest" << dendl;
@@ -7428,7 +7538,7 @@ MDSInternalContextBase *MDCache::_get_waiter(MDRequestRef& mdr, Message *req, MD
   }
 }
 
-int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBase *fin,     // who
+int MDCache::path_traverse(MDRequestRef& mdr, Message *req, Context *fin,     // who
 			   const filepath& path,                   // what
                            vector<CDentry*> *pdnvec,         // result
 			   CInode **pin,
@@ -7447,7 +7557,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
 
   client_t client = (mdr && mdr->reqid.name.is_client()) ? mdr->reqid.name.num() : -1;
 
-  if (mds->logger) mds->logger->inc(l_mds_traverse);
+  if (mds->logger) mds->logger->inc(l_mds_t);
 
   dout(7) << "traverse: opening base ino " << path.get_ino() << " snap " << snapid << dendl;
   CInode *cur = get_inode(path.get_ino());
@@ -7520,7 +7630,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
 	dout(10) << "traverse: need dirfrag " << fg << ", doing discover from " << *cur << dendl;
 	discover_path(cur, snapid, path.postfixpath(depth), _get_waiter(mdr, req, fin),
 		      null_okay);
-	if (mds->logger) mds->logger->inc(l_mds_traverse_discover);
+	if (mds->logger) mds->logger->inc(l_mds_tdis);
         return 1;
       }
     }
@@ -7582,7 +7692,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
 	(dnl->is_null() || forward)) {
       dout(10) << "traverse: xlocked dentry at " << *dn << dendl;
       dn->lock.add_waiter(SimpleLock::WAIT_RD, _get_waiter(mdr, req, fin));
-      if (mds->logger) mds->logger->inc(l_mds_traverse_lock);
+      if (mds->logger) mds->logger->inc(l_mds_tlock);
       mds->mdlog->flush();
       return 1;
     }
@@ -7616,7 +7726,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
 	  assert(mdr);  // we shouldn't hit non-primary dentries doing a non-mdr traversal!
           open_remote_dentry(dn, true, _get_waiter(mdr, req, fin),
 			     (null_okay && depth == path.depth() - 1));
-	  if (mds->logger) mds->logger->inc(l_mds_traverse_remote_ino);
+	  if (mds->logger) mds->logger->inc(l_mds_trino);
           return 1;
         }        
       }
@@ -7704,7 +7814,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
         dout(7) << "traverse: incomplete dir contents for " << *cur << ", fetching" << dendl;
         touch_inode(cur);
         curdir->fetch(_get_waiter(mdr, req, fin), path[depth]);
-	if (mds->logger) mds->logger->inc(l_mds_traverse_dir_fetch);
+	if (mds->logger) mds->logger->inc(l_mds_tdirf);
         return 1;
       }
     } else {
@@ -7724,7 +7834,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
 	dout(7) << "traverse: discover from " << path[depth] << " from " << *curdir << dendl;
 	discover_path(curdir, snapid, path.postfixpath(depth), _get_waiter(mdr, req, fin),
 		      null_okay);
-	if (mds->logger) mds->logger->inc(l_mds_traverse_discover);
+	if (mds->logger) mds->logger->inc(l_mds_tdis);
         return 1;
       } 
       if (forward) {
@@ -7755,7 +7865,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
 	else
 	  mds->forward_message_mds(req, dauth.first);
 	
-	if (mds->logger) mds->logger->inc(l_mds_traverse_forward);
+	if (mds->logger) mds->logger->inc(l_mds_tfw);
 	assert(fin == NULL);
 	return 2;
       }    
@@ -7765,7 +7875,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa
   }
   
   // success.
-  if (mds->logger) mds->logger->inc(l_mds_traverse_hit);
+  if (mds->logger) mds->logger->inc(l_mds_thit);
   dout(10) << "path_traverse finish on snapid " << snapid << dendl;
   if (mdr) 
     assert(mdr->snapid == snapid);
@@ -7845,7 +7955,7 @@ CInode *MDCache::cache_traverse(const filepath& fp)
  * @param approxfg approximate fragment.
  * @param fin completion callback
  */
-void MDCache::open_remote_dirfrag(CInode *diri, frag_t approxfg, MDSInternalContextBase *fin) 
+void MDCache::open_remote_dirfrag(CInode *diri, frag_t approxfg, Context *fin) 
 {
   dout(10) << "open_remote_dir on " << *diri << dendl;
   
@@ -7896,39 +8006,208 @@ CInode *MDCache::get_dentry_inode(CDentry *dn, MDRequestRef& mdr, bool projected
     return in;
   } else {
     dout(10) << "get_dentry_inode on remote dn, opening inode for " << *dn << dendl;
-    open_remote_dentry(dn, projected, new C_MDS_RetryRequest(this, mdr));
+    open_remote_ino(dnl->remote_ino, new C_MDS_RetryRequest(this, mdr));
     return 0;
   }
 }
 
-struct C_MDC_OpenRemoteDentry : public MDCacheContext {
+class C_MDC_RetryOpenRemoteIno : public Context {
+  MDCache *mdcache;
+  inodeno_t ino;
+  bool want_xlocked;
+  Context *onfinish;
+public:
+  C_MDC_RetryOpenRemoteIno(MDCache *mdc, inodeno_t i, Context *c, bool wx) :
+    mdcache(mdc), ino(i), want_xlocked(wx), onfinish(c) {}
+  void finish(int r) {
+    if (mdcache->get_inode(ino)) {
+      onfinish->complete(0);
+    } else
+      mdcache->open_remote_ino(ino, onfinish, want_xlocked);
+  }
+};
+
+
+class C_MDC_OpenRemoteIno : public Context {
+  MDCache *mdcache;
+  inodeno_t ino;
+  inodeno_t hadino;
+  version_t hadv;
+  bool want_xlocked;
+  Context *onfinish;
+public:
+  vector<Anchor> anchortrace;
+
+  C_MDC_OpenRemoteIno(MDCache *mdc, inodeno_t i, bool wx, inodeno_t hi, version_t hv, Context *c) :
+    mdcache(mdc), ino(i), hadino(hi), hadv(hv), want_xlocked(wx), onfinish(c) {}
+  C_MDC_OpenRemoteIno(MDCache *mdc, inodeno_t i, bool wx, vector<Anchor>& at, Context *c) :
+    mdcache(mdc), ino(i), hadino(0), hadv(0), want_xlocked(wx), onfinish(c), anchortrace(at) {}
+
+  void finish(int r) {
+    assert(r == 0);
+    if (r == 0)
+      mdcache->open_remote_ino_2(ino, anchortrace, want_xlocked, hadino, hadv, onfinish);
+    else {
+      onfinish->complete(r);
+    }
+  }
+};
+
+void MDCache::open_remote_ino(inodeno_t ino, Context *onfinish, bool want_xlocked,
+			      inodeno_t hadino, version_t hadv)
+{
+  dout(7) << "open_remote_ino on " << ino << (want_xlocked ? " want_xlocked":"") << dendl;
+  
+  C_MDC_OpenRemoteIno *c = new C_MDC_OpenRemoteIno(this, ino, want_xlocked,
+						   hadino, hadv, onfinish);
+  mds->anchorclient->lookup(ino, c->anchortrace, c);
+}
+
+void MDCache::open_remote_ino_2(inodeno_t ino, vector<Anchor>& anchortrace, bool want_xlocked,
+				inodeno_t hadino, version_t hadv, Context *onfinish)
+{
+  dout(7) << "open_remote_ino_2 on " << ino
+	  << ", trace depth is " << anchortrace.size() << dendl;
+  
+  // find deepest cached inode in prefix
+  unsigned i = anchortrace.size();  // i := array index + 1
+  CInode *in = 0;
+  while (1) {
+    // inode?
+    dout(10) << " " << i << ": " << anchortrace[i-1] << dendl;
+    in = get_inode(anchortrace[i-1].ino);
+    if (in)
+      break;
+    i--;
+    if (!i) {
+      in = get_inode(anchortrace[i].dirino);
+      if (!in) {
+	dout(0) << "open_remote_ino_2 don't have dir inode " << anchortrace[i].dirino << dendl;
+	if (MDS_INO_IS_MDSDIR(anchortrace[i].dirino)) {
+	  open_foreign_mdsdir(anchortrace[i].dirino, onfinish);
+	  return;
+	}
+	assert(in);  // hrm!
+      }
+      break;
+    }
+  }
+  dout(10) << "deepest cached inode at " << i << " is " << *in << dendl;
+
+  if (in->ino() == ino) {
+    // success
+    dout(10) << "open_remote_ino_2 have " << *in << dendl;
+    onfinish->complete(0);
+    return;
+  } 
+
+  // open dirfrag beneath *in
+  frag_t frag = in->dirfragtree[anchortrace[i].dn_hash];
+
+  if (!in->dirfragtree.contains(frag)) {
+    dout(10) << "frag " << frag << " not valid, requerying anchortable" << dendl;
+    open_remote_ino(ino, onfinish, want_xlocked);
+    return;
+  }
+
+  CDir *dir = in->get_dirfrag(frag);
+
+  if (!dir && !in->is_auth()) {
+    dout(10) << "opening remote dirfrag " << frag << " under " << *in << dendl;
+    /* we re-query the anchortable just to avoid a fragtree update race */
+    open_remote_dirfrag(in, frag,
+			new C_MDC_RetryOpenRemoteIno(this, ino, onfinish, want_xlocked));
+    return;
+  }
+
+  if (!dir && in->is_auth()) {
+    if (in->is_frozen_dir()) {
+      dout(7) << "traverse: " << *in << " is frozen_dir, waiting" << dendl;
+      in->parent->dir->add_waiter(CDir::WAIT_UNFREEZE,
+				  new C_MDC_RetryOpenRemoteIno(this, ino, onfinish, want_xlocked));
+      return;
+    }
+    dir = in->get_or_open_dirfrag(this, frag);
+  }
+  assert(dir);
+
+  if (dir->is_auth()) {
+    if (dir->is_complete()) {
+      // make sure we didn't get to the same version anchor 2x in a row
+      if (hadv && hadino == anchortrace[i].ino && hadv == anchortrace[i].updated) {
+	dout(10) << "expected ino " << anchortrace[i].ino
+		 << " in complete dir " << *dir
+		 << ", got same anchor " << anchortrace[i] << " 2x in a row" << dendl;
+	onfinish->complete(-ENOENT);
+      } else {
+	// hrm.  requery anchor table.
+	dout(10) << "expected ino " << anchortrace[i].ino
+		 << " in complete dir " << *dir
+		 << ", requerying anchortable"
+		 << dendl;
+	open_remote_ino(ino, onfinish, want_xlocked,
+		        anchortrace[i].ino, anchortrace[i].updated);
+      }
+    } else {
+      dout(10) << "need ino " << anchortrace[i].ino
+	       << ", fetching incomplete dir " << *dir
+	       << dendl;
+      dir->fetch(new C_MDC_OpenRemoteIno(this, ino, want_xlocked, anchortrace, onfinish));
+    }
+  } else {
+    // hmm, discover.
+    dout(10) << "have remote dirfrag " << *dir << ", discovering " 
+	     << anchortrace[i].ino << dendl;
+    discover_ino(dir, anchortrace[i].ino,
+	         new C_MDC_RetryOpenRemoteIno(this, ino, onfinish, want_xlocked),
+		 (want_xlocked && i == anchortrace.size() - 1));
+  }
+}
+
+
+struct C_MDC_OpenRemoteDentry : public Context {
+  MDCache *mdc;
   CDentry *dn;
   inodeno_t ino;
-  MDSInternalContextBase *onfinish;
+  Context *onfinish;
   bool want_xlocked;
-  C_MDC_OpenRemoteDentry(MDCache *m, CDentry *d, inodeno_t i, MDSInternalContextBase *f, bool wx) :
-    MDCacheContext(m), dn(d), ino(i), onfinish(f), want_xlocked(wx) {}
+  int mode;
+  C_MDC_OpenRemoteDentry(MDCache *m, CDentry *d, inodeno_t i, Context *f,
+			 bool wx, int md) :
+    mdc(m), dn(d), ino(i), onfinish(f), want_xlocked(wx), mode(md) {}
   void finish(int r) {
-    mdcache->_open_remote_dentry_finish(dn, ino, onfinish, want_xlocked, r);
+    mdc->_open_remote_dentry_finish(dn, ino, onfinish, want_xlocked, mode, r);
   }
 };
 
-void MDCache::open_remote_dentry(CDentry *dn, bool projected, MDSInternalContextBase *fin, bool want_xlocked)
+void MDCache::open_remote_dentry(CDentry *dn, bool projected, Context *fin, bool want_xlocked)
 {
   dout(10) << "open_remote_dentry " << *dn << dendl;
   CDentry::linkage_t *dnl = projected ? dn->get_projected_linkage() : dn->get_linkage();
   inodeno_t ino = dnl->get_remote_ino();
-  uint64_t pool = dnl->get_remote_d_type() == DT_DIR ? mds->mdsmap->get_metadata_pool() : -1;
-  open_ino(ino, pool,
-      new C_MDC_OpenRemoteDentry(this, dn, ino, fin, want_xlocked), true, want_xlocked); // backtrace
+  int mode = g_conf->mds_open_remote_link_mode;
+  Context *fin2 =  new C_MDC_OpenRemoteDentry(this, dn, ino, fin, want_xlocked, mode);
+  if (mode == 0)
+    open_remote_ino(ino, fin2, want_xlocked); // anchor
+  else
+    open_ino(ino, -1, fin2, true, want_xlocked); // backtrace
 }
 
-void MDCache::_open_remote_dentry_finish(CDentry *dn, inodeno_t ino, MDSInternalContextBase *fin,
-					 bool want_xlocked, int r)
+void MDCache::_open_remote_dentry_finish(CDentry *dn, inodeno_t ino, Context *fin,
+					 bool want_xlocked, int mode, int r)
 {
   if (r < 0) {
+    if (mode == 0) {
       dout(0) << "open_remote_dentry_finish bad remote dentry " << *dn << dendl;
       dn->state_set(CDentry::STATE_BADREMOTEINO);
+    } else {
+      dout(7) << "open_remote_dentry_finish failed to open ino " << ino
+	      << " for " << *dn << ", retry using anchortable" << dendl;
+      assert(mode == 1);
+      Context *fin2 =  new C_MDC_OpenRemoteDentry(this, dn, ino, fin, want_xlocked, 0);
+      open_remote_ino(ino, fin2, want_xlocked);
+      return;
+    }
   }
   fin->complete(r < 0 ? r : 0);
 }
@@ -7953,33 +8232,36 @@ void MDCache::make_trace(vector<CDentry*>& trace, CInode *in)
 // -------------------------------------------------------------------------------
 // Open inode by inode number
 
-class C_IO_MDC_OpenInoBacktraceFetched : public MDCacheIOContext {
+class C_MDC_OpenInoBacktraceFetched : public Context {
+  MDCache *cache;
   inodeno_t ino;
   public:
   bufferlist bl;
-  C_IO_MDC_OpenInoBacktraceFetched(MDCache *c, inodeno_t i) :
-    MDCacheIOContext(c), ino(i) {}
+  C_MDC_OpenInoBacktraceFetched(MDCache *c, inodeno_t i) :
+    cache(c), ino(i) {}
   void finish(int r) {
-    mdcache->_open_ino_backtrace_fetched(ino, bl, r);
+    cache->_open_ino_backtrace_fetched(ino, bl, r);
   }
 };
 
-struct C_MDC_OpenInoTraverseDir : public MDCacheContext {
+struct C_MDC_OpenInoTraverseDir : public Context {
+  MDCache *cache;
   inodeno_t ino;
   public:
-  C_MDC_OpenInoTraverseDir(MDCache *c, inodeno_t i) : MDCacheContext(c), ino(i) {}
+  C_MDC_OpenInoTraverseDir(MDCache *c, inodeno_t i) : cache(c), ino(i) {}
   void finish(int r) {
-    assert(mdcache->opening_inodes.count(ino));
-    mdcache->_open_ino_traverse_dir(ino, mdcache->opening_inodes[ino], r);
+    assert(cache->opening_inodes.count(ino));
+    cache->_open_ino_traverse_dir(ino, cache->opening_inodes[ino], r);
   }
 };
 
-struct C_MDC_OpenInoParentOpened : public MDCacheContext {
+struct C_MDC_OpenInoParentOpened : public Context {
+  MDCache *cache;
   inodeno_t ino;
   public:
-  C_MDC_OpenInoParentOpened(MDCache *c, inodeno_t i) : MDCacheContext(c), ino(i) {}
+  C_MDC_OpenInoParentOpened(MDCache *c, inodeno_t i) : cache(c), ino(i) {}
   void finish(int r) {
-    mdcache->_open_ino_parent_opened(ino, r);
+    cache->_open_ino_parent_opened(ino, r);
   }
 };
 
@@ -8004,10 +8286,8 @@ void MDCache::_open_ino_backtrace_fetched(inodeno_t ino, bufferlist& bl, int err
       dout(10) << " old object in pool " << info.pool
 	       << ", retrying pool " << backtrace.pool << dendl;
       info.pool = backtrace.pool;
-      C_IO_MDC_OpenInoBacktraceFetched *fin =
-	new C_IO_MDC_OpenInoBacktraceFetched(this, ino);
-      fetch_backtrace(ino, info.pool, fin->bl,
-		      new C_OnFinisher(fin, &mds->finisher));
+      C_MDC_OpenInoBacktraceFetched *fin = new C_MDC_OpenInoBacktraceFetched(this, ino);
+      fetch_backtrace(ino, info.pool, fin->bl, fin);
       return;
     }
   } else if (err == -ENOENT) {
@@ -8016,10 +8296,8 @@ void MDCache::_open_ino_backtrace_fetched(inodeno_t ino, bufferlist& bl, int err
       dout(10) << " no object in pool " << info.pool
 	       << ", retrying pool " << meta_pool << dendl;
       info.pool = meta_pool;
-      C_IO_MDC_OpenInoBacktraceFetched *fin =
-	new C_IO_MDC_OpenInoBacktraceFetched(this, ino);
-      fetch_backtrace(ino, info.pool, fin->bl,
-		      new C_OnFinisher(fin, &mds->finisher));
+      C_MDC_OpenInoBacktraceFetched *fin = new C_MDC_OpenInoBacktraceFetched(this, ino);
+      fetch_backtrace(ino, info.pool, fin->bl, fin);
       return;
     }
   }
@@ -8073,7 +8351,7 @@ void MDCache::_open_ino_parent_opened(inodeno_t ino, int ret)
   }
 }
 
-MDSInternalContextBase* MDCache::_open_ino_get_waiter(inodeno_t ino, MMDSOpenIno *m)
+Context* MDCache::_open_ino_get_waiter(inodeno_t ino, MMDSOpenIno *m)
 {
   if (m)
     return new C_MDS_RetryMessage(mds, m);
@@ -8213,7 +8491,7 @@ void MDCache::open_ino_finish(inodeno_t ino, open_ino_info_t& info, int ret)
 {
   dout(10) << "open_ino_finish ino " << ino << " ret " << ret << dendl;
 
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
   waiters.swap(info.waiters);
   opening_inodes.erase(ino);
   finish_contexts(g_ceph_context, waiters, ret);
@@ -8243,10 +8521,8 @@ void MDCache::do_open_ino(inodeno_t ino, open_ino_info_t& info, int err)
     info.checking = mds->get_nodeid();
     info.checked.clear();
     info.checked.insert(mds->get_nodeid());
-    C_IO_MDC_OpenInoBacktraceFetched *fin =
-      new C_IO_MDC_OpenInoBacktraceFetched(this, ino);
-    fetch_backtrace(ino, info.pool, fin->bl,
-		    new C_OnFinisher(fin, &mds->finisher));
+    C_MDC_OpenInoBacktraceFetched *fin = new C_MDC_OpenInoBacktraceFetched(this, ino);
+    fetch_backtrace(ino, info.pool, fin->bl, fin);
   } else {
     assert(!info.ancestors.empty());
     info.checking = mds->get_nodeid();
@@ -8323,7 +8599,7 @@ void MDCache::handle_open_ino(MMDSOpenIno *m)
       return;
     reply = new MMDSOpenInoReply(m->get_tid(), ino, hint, ret);
   }
-  m->get_connection()->send_message(reply);
+  mds->messenger->send_message(reply, m->get_connection());
   m->put();
 }
 
@@ -8389,7 +8665,7 @@ void MDCache::kick_open_ino_peers(int who)
   }
 }
 
-void MDCache::open_ino(inodeno_t ino, int64_t pool, MDSInternalContextBase* fin,
+void MDCache::open_ino(inodeno_t ino, int64_t pool, Context* fin,
 		       bool want_replica, bool want_xlocked)
 {
   dout(10) << "open_ino " << ino << " pool " << pool << " want_replica "
@@ -8438,7 +8714,7 @@ void MDCache::open_ino(inodeno_t ino, int64_t pool, MDSInternalContextBase* fin,
   - traverse path
 
  */
-void MDCache::find_ino_peers(inodeno_t ino, MDSInternalContextBase *c, int hint)
+void MDCache::find_ino_peers(inodeno_t ino, Context *c, int hint)
 {
   dout(5) << "find_ino_peers " << ino << " hint " << hint << dendl;
   assert(!have_inode(ino));
@@ -8499,7 +8775,7 @@ void MDCache::handle_find_ino(MMDSFindIno *m)
     in->make_path(r->path);
     dout(10) << " have " << r->path << " " << *in << dendl;
   }
-  m->get_connection()->send_message(r);
+  mds->messenger->send_message(r, m->get_connection());
   m->put();
 }
 
@@ -8597,37 +8873,16 @@ MDRequestRef MDCache::request_start(MClientRequest *req)
   }
 
   // register new client request
-  MDRequestImpl::Params params;
-  params.reqid = req->get_reqid();
-  params.attempt = req->get_num_fwd();
-  params.client_req = req;
-  params.initiated = req->get_recv_stamp();
-  params.throttled = req->get_throttle_stamp();
-  params.all_read = req->get_recv_complete_stamp();
-  params.dispatched = req->get_dispatch_stamp();
-
-  MDRequestRef mdr =
-      mds->op_tracker.create_request<MDRequestImpl,MDRequestImpl::Params>(params);
-  active_requests[params.reqid] = mdr;
-  mdr->set_op_stamp(req->get_stamp());
+  MDRequestRef mdr(new MDRequestImpl(req->get_reqid(),
+                                     req->get_num_fwd(), req));
+  active_requests[req->get_reqid()] = mdr;
   dout(7) << "request_start " << *mdr << dendl;
   return mdr;
 }
 
-MDRequestRef MDCache::request_start_slave(metareqid_t ri, __u32 attempt, Message *m)
-{
-  int by = m->get_source().num();
-  MDRequestImpl::Params params;
-  params.reqid = ri;
-  params.attempt = attempt;
-  params.triggering_slave_req = m;
-  params.slave_to = by;
-  params.initiated = m->get_recv_stamp();
-  params.throttled = m->get_throttle_stamp();
-  params.all_read = m->get_recv_complete_stamp();
-  params.dispatched = m->get_dispatch_stamp();
-  MDRequestRef mdr =
-      mds->op_tracker.create_request<MDRequestImpl,MDRequestImpl::Params>(params);
+MDRequestRef MDCache::request_start_slave(metareqid_t ri, __u32 attempt, int by)
+{
+  MDRequestRef mdr(new MDRequestImpl(ri, attempt, by));
   assert(active_requests.count(mdr->reqid) == 0);
   active_requests[mdr->reqid] = mdr;
   dout(7) << "request_start_slave " << *mdr << " by mds." << by << dendl;
@@ -8636,13 +8891,10 @@ MDRequestRef MDCache::request_start_slave(metareqid_t ri, __u32 attempt, Message
 
 MDRequestRef MDCache::request_start_internal(int op)
 {
-  MDRequestImpl::Params params;
-  params.reqid.name = entity_name_t::MDS(mds->get_nodeid());
-  params.reqid.tid = mds->issue_tid();
-  params.initiated = ceph_clock_now(g_ceph_context);
-  params.internal_op = op;
-  MDRequestRef mdr =
-      mds->op_tracker.create_request<MDRequestImpl,MDRequestImpl::Params>(params);
+  MDRequestRef mdr(new MDRequestImpl);
+  mdr->reqid.name = entity_name_t::MDS(mds->get_nodeid());
+  mdr->reqid.tid = mds->issue_tid();
+  mdr->internal_op = op;
 
   assert(active_requests.count(mdr->reqid) == 0);
   active_requests[mdr->reqid] = mdr;
@@ -8661,15 +8913,12 @@ MDRequestRef MDCache::request_get(metareqid_t rid)
 void MDCache::request_finish(MDRequestRef& mdr)
 {
   dout(7) << "request_finish " << *mdr << dendl;
-  mdr->mark_event("finishing request");
 
   // slave finisher?
   if (mdr->has_more() && mdr->more()->slave_commit) {
     Context *fin = mdr->more()->slave_commit;
     mdr->more()->slave_commit = 0;
-    int ret = mdr->aborted ? -1 : 0;
-    mdr->aborted = false;
-    fin->complete(ret);   // this must re-call request_finish.
+    fin->complete(mdr->aborted ? -1 : 0);   // this must re-call request_finish.
     return; 
   }
 
@@ -8679,13 +8928,12 @@ void MDCache::request_finish(MDRequestRef& mdr)
 
 void MDCache::request_forward(MDRequestRef& mdr, int who, int port)
 {
-  mdr->mark_event("forwarding request");
   if (mdr->client_request->get_source().is_client()) {
     dout(7) << "request_forward " << *mdr << " to mds." << who << " req "
             << *mdr->client_request << dendl;
     mds->forward_message_mds(mdr->client_request, who);
     mdr->client_request = 0;
-    if (mds->logger) mds->logger->inc(l_mds_forward);
+    if (mds->logger) mds->logger->inc(l_mds_fw);
   } else {
     dout(7) << "request_forward drop " << *mdr << " req " << *mdr->client_request
             << " was from mds" << dendl;
@@ -8826,14 +9074,11 @@ void MDCache::request_cleanup(MDRequestRef& mdr)
 
   if (mds->logger)
     log_stat();
-
-  mdr->mark_event("cleaned up request");
 }
 
 void MDCache::request_kill(MDRequestRef& mdr)
 {
   mdr->killed = true;
-  mdr->mark_event("killing request");
   if (!mdr->committing) {
     dout(10) << "request_kill " << *mdr << dendl;
     request_cleanup(mdr);
@@ -8842,18 +9087,208 @@ void MDCache::request_kill(MDRequestRef& mdr)
   }
 }
 
+
+// --------------------------------------------------------------------
+// ANCHORS
+
+class C_MDC_AnchorPrepared : public Context {
+  MDCache *cache;
+  CInode *in;
+  bool add;
+public:
+  version_t atid;
+  C_MDC_AnchorPrepared(MDCache *c, CInode *i, bool a) : cache(c), in(i), add(a), atid(0) {}
+  void finish(int r) {
+    cache->_anchor_prepared(in, atid, add);
+  }
+};
+
+void MDCache::anchor_create_prep_locks(MDRequestRef& mdr, CInode *in,
+				       set<SimpleLock*>& rdlocks, set<SimpleLock*>& xlocks)
+{
+  dout(10) << "anchor_create_prep_locks " << *in << dendl;
+
+  if (in->is_anchored()) {
+    // caller may have already xlocked it.. if so, that will suffice!
+    if (xlocks.count(&in->linklock) == 0)
+      rdlocks.insert(&in->linklock);
+  } else {
+    xlocks.insert(&in->linklock);
+
+    // path components too!
+    CDentry *dn = in->get_projected_parent_dn();
+    while (dn) {
+      rdlocks.insert(&dn->lock);
+      dn = dn->get_dir()->get_inode()->get_parent_dn();
+    }
+  }
+}
+
+void MDCache::anchor_create(MDRequestRef& mdr, CInode *in, Context *onfinish)
+{
+  assert(in->is_auth());
+  dout(10) << "anchor_create " << *in << dendl;
+
+  // auth pin
+  if (!in->can_auth_pin() &&
+      !mdr->is_auth_pinned(in)) {
+    dout(7) << "anchor_create not authpinnable, waiting on " << *in << dendl;
+    in->add_waiter(CInode::WAIT_UNFREEZE, onfinish);
+    return;
+  }
+
+  // wait
+  in->add_waiter(CInode::WAIT_ANCHORED, onfinish);
+
+  // already anchoring?
+  if (in->state_test(CInode::STATE_ANCHORING)) {
+    dout(7) << "anchor_create already anchoring " << *in << dendl;
+    return;
+  }
+
+  dout(7) << "anchor_create " << *in << dendl;
+
+  // auth: do it
+  in->state_set(CInode::STATE_ANCHORING);
+  in->get(CInode::PIN_ANCHORING);
+  in->auth_pin(this);
+  
+  // make trace
+  vector<Anchor> trace;
+  in->make_anchor_trace(trace);
+  if (trace.empty()) {
+    assert(MDS_INO_IS_BASE(in->ino()));
+    trace.push_back(Anchor(in->ino(), in->ino(), 0, 0, 0));
+  }
+  
+  // do it
+  C_MDC_AnchorPrepared *fin = new C_MDC_AnchorPrepared(this, in, true);
+  mds->anchorclient->prepare_create(in->ino(), trace, &fin->atid, fin);
+}
+
+void MDCache::anchor_destroy(CInode *in, Context *onfinish)
+{
+  assert(in->is_auth());
+
+  // auth pin
+  if (!in->can_auth_pin()/* &&
+			    !mdr->is_auth_pinned(in)*/) {
+    dout(7) << "anchor_destroy not authpinnable, waiting on " << *in << dendl;
+    in->add_waiter(CInode::WAIT_UNFREEZE, onfinish);
+    return;
+  }
+
+  dout(7) << "anchor_destroy " << *in << dendl;
+
+  // wait
+  if (onfinish)
+    in->add_waiter(CInode::WAIT_UNANCHORED, onfinish);
+
+  // already anchoring?
+  if (in->state_test(CInode::STATE_UNANCHORING)) {
+    dout(7) << "anchor_destroy already unanchoring " << *in << dendl;
+    return;
+  }
+
+  // auth: do it
+  in->state_set(CInode::STATE_UNANCHORING);
+  in->get(CInode::PIN_UNANCHORING);
+  in->auth_pin(this);
+  
+  // do it
+  C_MDC_AnchorPrepared *fin = new C_MDC_AnchorPrepared(this, in, false);
+  mds->anchorclient->prepare_destroy(in->ino(), &fin->atid, fin);
+}
+
+class C_MDC_AnchorLogged : public Context {
+  MDCache *cache;
+  CInode *in;
+  version_t atid;
+  MutationRef mut;
+public:
+  C_MDC_AnchorLogged(MDCache *c, CInode *i, version_t t, MutationRef& m) :
+    cache(c), in(i), atid(t), mut(m) {}
+  void finish(int r) {
+    cache->_anchor_logged(in, atid, mut);
+  }
+};
+
+void MDCache::_anchor_prepared(CInode *in, version_t atid, bool add)
+{
+  dout(10) << "_anchor_prepared " << *in << " atid " << atid 
+	   << " " << (add ? "create":"destroy") << dendl;
+  assert(in->inode.anchored == !add);
+
+  // update the logged inode copy
+  inode_t *pi = in->project_inode();
+  if (add) {
+    pi->anchored = true;
+    pi->rstat.ranchors++;
+  } else {
+    pi->anchored = false;
+    pi->rstat.ranchors--;
+  }
+  pi->version = in->pre_dirty();
+
+  MutationRef mut(new MutationImpl);
+  mut->ls = mds->mdlog->get_current_segment();
+  EUpdate *le = new EUpdate(mds->mdlog, add ? "anchor_create":"anchor_destroy");
+  mds->mdlog->start_entry(le);
+  predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY);
+  journal_dirty_inode(mut.get(), &le->metablob, in);
+  le->metablob.add_table_transaction(TABLE_ANCHOR, atid);
+  mds->mdlog->submit_entry(le, new C_MDC_AnchorLogged(this, in, atid, mut));
+  mds->mdlog->flush();
+}
+
+
+void MDCache::_anchor_logged(CInode *in, version_t atid, MutationRef& mut)
+{
+  dout(10) << "_anchor_logged on " << *in << dendl;
+
+  // unpin
+  if (in->state_test(CInode::STATE_ANCHORING)) {
+    in->state_clear(CInode::STATE_ANCHORING);
+    in->put(CInode::PIN_ANCHORING);
+    if (in->parent)
+      in->parent->adjust_nested_anchors(1);
+  } else if (in->state_test(CInode::STATE_UNANCHORING)) {
+    in->state_clear(CInode::STATE_UNANCHORING);
+    in->put(CInode::PIN_UNANCHORING);
+    if (in->parent)
+      in->parent->adjust_nested_anchors(-1);
+  }
+  in->auth_unpin(this);
+  
+  // apply update to cache
+  in->pop_and_dirty_projected_inode(mut->ls);
+  mut->apply();
+  
+  // tell the anchortable we've committed
+  mds->anchorclient->commit(atid, mut->ls);
+
+  // drop locks and finish
+  mds->locker->drop_locks(mut.get());
+  mut->cleanup();
+
+  // trigger waiters
+  in->finish_waiting(CInode::WAIT_ANCHORED|CInode::WAIT_UNANCHORED, 0);
+}
+
+
 // -------------------------------------------------------------------------------
 // SNAPREALMS
 
-struct C_MDC_snaprealm_create_finish : public MDCacheContext {
+struct C_MDC_snaprealm_create_finish : public Context {
+  MDCache *cache;
   MDRequestRef mdr;
   MutationRef mut;
   CInode *in;
   C_MDC_snaprealm_create_finish(MDCache *c, MDRequestRef& m,
                                 MutationRef& mu, CInode *i) :
-    MDCacheContext(c), mdr(m), mut(mu), in(i) {}
+    cache(c), mdr(m), mut(mu), in(i) {}
   void finish(int r) {
-    mdcache->_snaprealm_create_finish(mdr, mut, in);
+    cache->_snaprealm_create_finish(mdr, mut, in);
   }
 };
 
@@ -8862,6 +9297,11 @@ void MDCache::snaprealm_create(MDRequestRef& mdr, CInode *in)
   dout(10) << "snaprealm_create " << *in << dendl;
   assert(!in->snaprealm);
 
+  if (!in->inode.anchored) {
+    mds->mdcache->anchor_create(mdr, in, new C_MDS_RetryRequest(mds->mdcache, mdr));
+    return;
+  }
+
   // allocate an id..
   if (!mdr->more()->stid) {
     mds->snapclient->prepare_create_realm(in->ino(), &mdr->more()->stid, &mdr->more()->snapidbl,
@@ -8892,10 +9332,7 @@ void MDCache::snaprealm_create(MDRequestRef& mdr, CInode *in)
   journal_cow_inode(mut, &le->metablob, in);
   le->metablob.add_primary_dentry(in->get_projected_parent_dn(), in, true);
 
-  mds->server->submit_mdlog_entry(le,
-                                  new C_MDC_snaprealm_create_finish(this, mdr,
-                                                                    mut, in),
-                                  mdr, __func__);
+  mds->mdlog->submit_entry(le, new C_MDC_snaprealm_create_finish(this, mdr, mut, in));
   mds->mdlog->flush();
 }
 
@@ -8999,11 +9436,12 @@ void MDCache::_snaprealm_create_finish(MDRequestRef& mdr, MutationRef& mut, CIno
 // -------------------------------------------------------------------------------
 // STRAYS
 
-struct C_MDC_RetryScanStray : public MDCacheContext {
+struct C_MDC_RetryScanStray : public Context {
+  MDCache *cache;
   dirfrag_t next;
-  C_MDC_RetryScanStray(MDCache *c,  dirfrag_t n) : MDCacheContext(c), next(n) { }
+  C_MDC_RetryScanStray(MDCache *c,  dirfrag_t n) : cache(c), next(n) { }
   void finish(int r) {
-    mdcache->scan_stray_dir(next);
+    cache->scan_stray_dir(next);
   }
 };
 
@@ -9035,9 +9473,10 @@ void MDCache::scan_stray_dir(dirfrag_t next)
   }
 }
 
-struct C_MDC_EvalStray : public MDCacheContext {
+struct C_MDC_EvalStray : public Context {
+  MDCache *mdcache;
   CDentry *dn;
-  C_MDC_EvalStray(MDCache *c, CDentry *d) : MDCacheContext(c), dn(d) {}
+  C_MDC_EvalStray(MDCache *c, CDentry *d) : mdcache(c), dn(d) {}
   void finish(int r) {
     mdcache->eval_stray(dn);
   }
@@ -9157,14 +9596,15 @@ void MDCache::fetch_backtrace(inodeno_t ino, int64_t pool, bufferlist& bl, Conte
   mds->objecter->getxattr(oid, object_locator_t(pool), "parent", CEPH_NOSNAP, &bl, 0, fin);
 }
 
-class C_IO_MDC_PurgeStrayPurged : public MDCacheIOContext {
+class C_MDC_PurgeStrayPurged : public Context {
+  MDCache *cache;
   CDentry *dn;
 public:
-  C_IO_MDC_PurgeStrayPurged(MDCache *c, CDentry *d) : 
-    MDCacheIOContext(c), dn(d) { }
+  C_MDC_PurgeStrayPurged(MDCache *c, CDentry *d) : 
+    cache(c), dn(d) { }
   void finish(int r) {
     assert(r == 0 || r == -ENOENT);
-    mdcache->_purge_stray_purged(dn, r);
+    cache->_purge_stray_purged(dn, r);
   }
 };
 
@@ -9175,6 +9615,12 @@ void MDCache::purge_stray(CDentry *dn)
   dout(10) << "purge_stray " << *dn << " " << *in << dendl;
   assert(!dn->is_replicated());
 
+  // anchored?
+  if (in->inode.anchored) {
+    anchor_destroy(in, new C_MDC_EvalStray(this, dn));
+    return;
+  }
+
   dn->state_set(CDentry::STATE_PURGING);
   dn->get(CDentry::PIN_PURGING);
   in->state_set(CInode::STATE_PURGING);
@@ -9190,9 +9636,7 @@ void MDCache::purge_stray(CDentry *dn)
   // dir.  on recovery, we'll need to re-eval all strays anyway.
   
   SnapContext nullsnapc;
-  C_GatherBuilder gather(
-    g_ceph_context,
-    new C_OnFinisher(new C_IO_MDC_PurgeStrayPurged(this, dn), &mds->finisher));
+  C_GatherBuilder gather(g_ceph_context, new C_MDC_PurgeStrayPurged(this, dn));
 
   if (in->is_dir()) {
     object_locator_t oloc(mds->mdsmap->get_metadata_pool());
@@ -9267,25 +9711,27 @@ void MDCache::purge_stray(CDentry *dn)
   gather.activate();
 }
 
-class C_MDC_PurgeStrayLogged : public MDCacheContext {
+class C_MDC_PurgeStrayLogged : public Context {
+  MDCache *cache;
   CDentry *dn;
   version_t pdv;
   LogSegment *ls;
 public:
   C_MDC_PurgeStrayLogged(MDCache *c, CDentry *d, version_t v, LogSegment *s) : 
-    MDCacheContext(c), dn(d), pdv(v), ls(s) { }
+    cache(c), dn(d), pdv(v), ls(s) { }
   void finish(int r) {
-    mdcache->_purge_stray_logged(dn, pdv, ls);
+    cache->_purge_stray_logged(dn, pdv, ls);
   }
 };
-class C_MDC_PurgeStrayLoggedTruncate : public MDCacheContext {
+class C_MDC_PurgeStrayLoggedTruncate : public Context {
+  MDCache *cache;
   CDentry *dn;
   LogSegment *ls;
 public:
   C_MDC_PurgeStrayLoggedTruncate(MDCache *c, CDentry *d, LogSegment *s) : 
-    MDCacheContext(c), dn(d), ls(s) { }
+    cache(c), dn(d), ls(s) { }
   void finish(int r) {
-    mdcache->_purge_stray_logged_truncate(dn, ls);
+    cache->_purge_stray_logged_truncate(dn, ls);
   }
 };
 
@@ -9449,14 +9895,14 @@ void MDCache::migrate_stray(CDentry *dn, int to)
 
 void MDCache::_send_discover(discover_info_t& d)
 {
-  MDiscover *dis = new MDiscover(d.ino, d.frag, d.snap, d.want_path,
-				 d.want_base_dir, d.want_xlocked);
+  MDiscover *dis = new MDiscover(d.ino, d.frag, d.snap,
+				 d.want_path, d.want_ino, d.want_base_dir, d.want_xlocked);
   dis->set_tid(d.tid);
   mds->send_message_mds(dis, d.mds);
 }
 
 void MDCache::discover_base_ino(inodeno_t want_ino,
-				MDSInternalContextBase *onfinish,
+				Context *onfinish,
 				int from) 
 {
   dout(7) << "discover_base_ino " << want_ino << " from mds." << from << dendl;
@@ -9471,7 +9917,7 @@ void MDCache::discover_base_ino(inodeno_t want_ino,
 
 void MDCache::discover_dir_frag(CInode *base,
 				frag_t approx_fg,
-				MDSInternalContextBase *onfinish,
+				Context *onfinish,
 				int from)
 {
   if (from < 0)
@@ -9493,22 +9939,23 @@ void MDCache::discover_dir_frag(CInode *base,
     base->add_dir_waiter(approx_fg, onfinish);
 }
 
-struct C_MDC_RetryDiscoverPath : public MDCacheContext {
+struct C_MDC_RetryDiscoverPath : public Context {
+  MDCache *mdc;
   CInode *base;
   snapid_t snapid;
   filepath path;
   int from;
   C_MDC_RetryDiscoverPath(MDCache *c, CInode *b, snapid_t s, filepath &p, int f) :
-    MDCacheContext(c), base(b), snapid(s), path(p), from(f)  {}
+    mdc(c), base(b), snapid(s), path(p), from(f)  {}
   void finish(int r) {
-    mdcache->discover_path(base, snapid, path, 0, from);
+    mdc->discover_path(base, snapid, path, 0, from);
   }
 };
 
 void MDCache::discover_path(CInode *base,
 			    snapid_t snap,
 			    filepath want_path,
-			    MDSInternalContextBase *onfinish,
+			    Context *onfinish,
 			    bool want_xlocked,
 			    int from)
 {
@@ -9526,7 +9973,7 @@ void MDCache::discover_path(CInode *base,
     base->add_waiter(CInode::WAIT_SINGLEAUTH, onfinish);
     return;
   } else if (from == mds->get_nodeid()) {
-    list<MDSInternalContextBase*> finished;
+    list<Context*> finished;
     base->take_waiting(CInode::WAIT_DIR, finished);
     mds->queue_waiters(finished);
     return;
@@ -9550,21 +9997,22 @@ void MDCache::discover_path(CInode *base,
     base->add_dir_waiter(fg, onfinish);
 }
 
-struct C_MDC_RetryDiscoverPath2 : public MDCacheContext {
+struct C_MDC_RetryDiscoverPath2 : public Context {
+  MDCache *mdc;
   CDir *base;
   snapid_t snapid;
   filepath path;
   C_MDC_RetryDiscoverPath2(MDCache *c, CDir *b, snapid_t s, filepath &p) :
-    MDCacheContext(c), base(b), snapid(s), path(p) {}
+    mdc(c), base(b), snapid(s), path(p) {}
   void finish(int r) {
-    mdcache->discover_path(base, snapid, path, 0);
+    mdc->discover_path(base, snapid, path, 0);
   }
 };
 
 void MDCache::discover_path(CDir *base,
 			    snapid_t snap,
 			    filepath want_path,
-			    MDSInternalContextBase *onfinish,
+			    Context *onfinish,
 			    bool want_xlocked)
 {
   int from = base->authority().first;
@@ -9580,7 +10028,7 @@ void MDCache::discover_path(CDir *base,
     base->add_waiter(CDir::WAIT_SINGLEAUTH, onfinish);
     return;
   } else if (from == mds->get_nodeid()) {
-    list<MDSInternalContextBase*> finished;
+    list<Context*> finished;
     base->take_sub_waiting(finished);
     mds->queue_waiters(finished);
     return;
@@ -9603,6 +10051,58 @@ void MDCache::discover_path(CDir *base,
     base->add_dentry_waiter(want_path[0], snap, onfinish);
 }
 
+struct C_MDC_RetryDiscoverIno : public Context {
+  MDCache *mdc;
+  CDir *base;
+  inodeno_t want_ino;
+  C_MDC_RetryDiscoverIno(MDCache *c, CDir *b, inodeno_t i) :
+    mdc(c), base(b), want_ino(i) {}
+  void finish(int r) {
+    mdc->discover_ino(base, want_ino, 0);
+  }
+};
+
+void MDCache::discover_ino(CDir *base,
+			   inodeno_t want_ino,
+			   Context *onfinish,
+			   bool want_xlocked)
+{
+  int from = base->authority().first;
+
+  dout(7) << "discover_ino " << base->dirfrag() << " " << want_ino << " from mds." << from
+	  << (want_xlocked ? " want_xlocked":"")
+	  << dendl;
+  
+  if (base->is_ambiguous_auth()) {
+    dout(10) << " waiting for single auth on " << *base << dendl;
+    if (!onfinish)
+      onfinish = new C_MDC_RetryDiscoverIno(this, base, want_ino);
+    base->add_waiter(CDir::WAIT_SINGLEAUTH, onfinish);
+    return;
+  } else if (from == mds->get_nodeid()) {
+    list<Context*> finished;
+    base->take_sub_waiting(finished);
+    mds->queue_waiters(finished);
+    return;
+  }
+
+  if (want_xlocked || !base->is_waiting_for_ino(want_ino) || !onfinish) {
+    discover_info_t& d = _create_discover(from);
+    d.ino = base->ino();
+    d.frag = base->get_frag();
+    d.want_ino = want_ino;
+    d.want_base_dir = false;
+    d.want_xlocked = want_xlocked;
+    _send_discover(d);
+  }
+
+  // register + wait
+  if (onfinish)
+    base->add_ino_waiter(want_ino, onfinish);
+}
+
+
+
 void MDCache::kick_discovers(int who)
 {
   for (map<ceph_tid_t,discover_info_t>::iterator p = discovers.begin();
@@ -9711,7 +10211,7 @@ void MDCache::handle_discover(MDiscover *dis)
       fg = cur->pick_dirfrag(dis->get_dentry(i));
     } else {
       // requester explicity specified the frag
-      assert(dis->wants_base_dir() || MDS_INO_IS_BASE(dis->get_base_ino()));
+      assert(dis->wants_base_dir() || dis->get_want_ino() || MDS_INO_IS_BASE(dis->get_base_ino()));
       fg = dis->get_base_dir_frag();
       if (!cur->dirfragtree.is_leaf(fg))
 	fg = cur->dirfragtree[fg.value()];
@@ -9801,6 +10301,18 @@ void MDCache::handle_discover(MDiscover *dis)
     CDentry *dn = 0;
     if (curdir->get_version() == 0) {
       // fetch newly opened dir
+    } else if  (dis->get_want_ino()) {
+      // lookup by ino
+      CInode *in = get_inode(dis->get_want_ino(), snapid);
+      if (in && in->is_auth() && in->get_parent_dn()->get_dir() == curdir) {
+	dn = in->get_parent_dn();
+	if (dn->state_test(CDentry::STATE_PURGING)) {
+	  // set error flag in reply
+	  dout(7) << "dentry " << *dn << " is purging, flagging error ino" << dendl;
+	  reply->set_flag_error_ino();
+	  break;
+	}
+      }
     } else if (dis->get_want().depth() > 0) {
       // lookup dentry
       dn = curdir->lookup(dis->get_dentry(i), snapid);
@@ -9824,6 +10336,15 @@ void MDCache::handle_discover(MDiscover *dis)
 	  break;
 	}
       }
+      
+      // don't have wanted ino in this dir?
+      if (dis->get_want_ino()) {
+	// set error flag in reply
+	dout(7) << "no ino " << dis->get_want_ino() << " in this dir, flagging error in "
+		<< *curdir << dendl;
+	reply->set_flag_error_ino();
+	break;
+      }
 
       // send null dentry
       dout(7) << "dentry " << dis->get_dentry(i) << " dne, returning null in "
@@ -9854,7 +10375,7 @@ void MDCache::handle_discover(MDiscover *dis)
     }
 
     // frozen inode?
-    if (dnl->is_primary() && dnl->get_inode()->is_frozen_inode()) {
+    if (dnl->is_primary() && dnl->get_inode()->is_frozen()) {
       if (tailitem && dis->wants_xlocked()) {
 	dout(7) << "handle_discover allowing discovery of frozen tail " << *dnl->get_inode() << dendl;
       } else if (reply->is_empty()) {
@@ -9911,8 +10432,10 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
     dout(7) << " flag error, dir" << dendl;
   if (m->is_flag_error_dn()) 
     dout(7) << " flag error, dentry = " << m->get_error_dentry() << dendl;
+  if (m->is_flag_error_ino()) 
+    dout(7) << " flag error, ino = " << m->get_wanted_ino() << dendl;
 
-  list<MDSInternalContextBase*> finished, error;
+  list<Context*> finished, error;
   int from = m->get_source().num();
 
   // starting point
@@ -9932,6 +10455,19 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
     }
   }
 
+  // discover ino error
+  if (p.end() && m->is_flag_error_ino()) {
+    assert(cur);
+    assert(cur->is_dir());
+    CDir *dir = cur->get_dirfrag(m->get_base_dir_frag());
+    if (dir) {
+      dout(7) << " flag_error on ino " << m->get_wanted_ino()
+	      << ", triggering ino" << dendl;
+      dir->take_ino_waiting(m->get_wanted_ino(), error);
+    } else
+      assert(0);
+  }
+
   // discover may start with an inode
   if (!p.end() && next == MDiscoverReply::INODE) {
     cur = add_replica_inode(p, NULL, finished);
@@ -10026,6 +10562,14 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
       } else
 	dout(7) << " doing nothing, have dir but nobody is waiting on dentry "
 		<< m->get_error_dentry() << dendl;
+    } else {
+      if (dir && m->get_wanted_ino() && dir->is_waiting_for_ino(m->get_wanted_ino())) {
+	if (dir->is_auth() || get_inode(m->get_wanted_ino()))
+	  dir->take_ino_waiting(m->get_wanted_ino(), finished);
+	else
+	  discover_ino(dir, m->get_wanted_ino(), 0, m->get_wanted_xlocked());
+      } else
+	dout(7) << " doing nothing, nobody is waiting for ino" << dendl;
     }
   }
 
@@ -10043,7 +10587,7 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
 // REPLICAS
 
 CDir *MDCache::add_replica_dir(bufferlist::iterator& p, CInode *diri, int from,
-			       list<MDSInternalContextBase*>& finished)
+			       list<Context*>& finished)
 {
   dirfrag_t df;
   ::decode(df, p);
@@ -10099,7 +10643,7 @@ CDir *MDCache::forge_replica_dir(CInode *diri, frag_t fg, int from)
   return dir;
 }
 
-CDentry *MDCache::add_replica_dentry(bufferlist::iterator& p, CDir *dir, list<MDSInternalContextBase*>& finished)
+CDentry *MDCache::add_replica_dentry(bufferlist::iterator& p, CDir *dir, list<Context*>& finished)
 {
   string name;
   snapid_t last;
@@ -10123,7 +10667,7 @@ CDentry *MDCache::add_replica_dentry(bufferlist::iterator& p, CDir *dir, list<MD
   return dn;
 }
 
-CInode *MDCache::add_replica_inode(bufferlist::iterator& p, CDentry *dn, list<MDSInternalContextBase*>& finished)
+CInode *MDCache::add_replica_inode(bufferlist::iterator& p, CDentry *dn, list<Context*>& finished)
 {
   inodeno_t ino;
   snapid_t last;
@@ -10151,6 +10695,8 @@ CInode *MDCache::add_replica_inode(bufferlist::iterator& p, CDentry *dn, list<MD
   if (dn) {
     if (!dn->get_linkage()->is_primary() || dn->get_linkage()->get_inode() != in)
       dout(10) << "add_replica_inode different linkage in dentry " << *dn << dendl;
+    
+    dn->get_dir()->take_ino_waiting(in->ino(), finished);
   }
   
   return in;
@@ -10169,7 +10715,7 @@ void MDCache::replicate_stray(CDentry *straydn, int who, bufferlist& bl)
    
 CDentry *MDCache::add_replica_stray(bufferlist &bl, int from)
 {
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
   bufferlist::iterator p = bl.begin();
 
   CInode *mdsin = add_replica_inode(p, NULL, finished);
@@ -10269,7 +10815,7 @@ void MDCache::handle_dir_update(MDirUpdate *m)
 
 // LINK
 
-void MDCache::send_dentry_link(CDentry *dn, MDRequestRef& mdr)
+void MDCache::send_dentry_link(CDentry *dn)
 {
   dout(7) << "send_dentry_link " << *dn << dendl;
 
@@ -10277,9 +10823,6 @@ void MDCache::send_dentry_link(CDentry *dn, MDRequestRef& mdr)
   for (map<int,unsigned>::iterator p = dn->replicas_begin();
        p != dn->replicas_end(); 
        ++p) {
-    // don't tell (rename) witnesses; they already know
-    if (mdr.get() && mdr->more()->witnessed.count(p->first))
-      continue;
     if (mds->mdsmap->get_state(p->first) < MDSMap::STATE_REJOIN ||
 	(mds->mdsmap->get_state(p->first) == MDSMap::STATE_REJOIN &&
 	 rejoin_gather.count(p->first)))
@@ -10324,7 +10867,7 @@ void MDCache::handle_dentry_link(MDentryLink *m)
   }
 
   bufferlist::iterator p = m->bl.begin();
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
   if (dn) {
     if (m->get_is_primary()) {
       // primary link.
@@ -10355,15 +10898,11 @@ void MDCache::send_dentry_unlink(CDentry *dn, CDentry *straydn, MDRequestRef& md
 {
   dout(10) << "send_dentry_unlink " << *dn << dendl;
   // share unlink news with replicas
-  map<int,unsigned> replicas;
-  replicas.insert(dn->replicas_begin(), dn->replicas_end());
-  if (straydn)
-    replicas.insert(straydn->replicas_begin(), straydn->replicas_end());
-  for (map<int,unsigned>::iterator it = replicas.begin();
-       it != replicas.end();
+  for (map<int,unsigned>::iterator it = dn->replicas_begin();
+       it != dn->replicas_end();
        ++it) {
     // don't tell (rmdir) witnesses; they already know
-    if (mdr.get() && mdr->more()->witnessed.count(it->first))
+    if (mdr && mdr->more()->witnessed.count(it->first))
       continue;
 
     if (mds->mdsmap->get_state(it->first) < MDSMap::STATE_REJOIN ||
@@ -10467,7 +11006,7 @@ void MDCache::handle_dentry_unlink(MDentryUnlink *m)
  */
 void MDCache::adjust_dir_fragments(CInode *diri, frag_t basefrag, int bits,
 				   list<CDir*>& resultfrags, 
-				   list<MDSInternalContextBase*>& waiters,
+				   list<Context*>& waiters,
 				   bool replay)
 {
   dout(10) << "adjust_dir_fragments " << basefrag << " " << bits 
@@ -10488,7 +11027,7 @@ CDir *MDCache::force_dir_fragment(CInode *diri, frag_t fg, bool replay)
   dout(10) << "force_dir_fragment " << fg << " on " << *diri << dendl;
 
   list<CDir*> src, result;
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
 
   // split a parent?
   frag_t parent = diri->dirfragtree.get_branch_or_leaf(fg);
@@ -10500,10 +11039,9 @@ CDir *MDCache::force_dir_fragment(CInode *diri, frag_t fg, bool replay)
       src.push_back(pdir);
       adjust_dir_fragments(diri, src, parent, split, result, waiters, replay);
       dir = diri->get_dirfrag(fg);
-      if (dir) {
-	dout(10) << "force_dir_fragment result " << *dir << dendl;
-	break;
-      }
+      if (dir)
+        dout(10) << "force_dir_fragment result " << *dir << dendl;
+      return dir;
     }
     if (parent == frag_t())
       break;
@@ -10512,20 +11050,16 @@ CDir *MDCache::force_dir_fragment(CInode *diri, frag_t fg, bool replay)
     dout(10) << " " << last << " parent is " << parent << dendl;
   }
 
-  if (!dir) {
-    // hoover up things under fg?
-    diri->get_dirfrags_under(fg, src);
-    if (src.empty()) {
-      dout(10) << "force_dir_fragment no frags under " << fg << dendl;
-    } else {
-      dout(10) << " will combine frags under " << fg << ": " << src << dendl;
-      adjust_dir_fragments(diri, src, fg, 0, result, waiters, replay);
-      dir = result.front();
-      dout(10) << "force_dir_fragment result " << *dir << dendl;
-    }
+  // hoover up things under fg?
+  diri->get_dirfrags_under(fg, src);
+  if (src.empty()) {
+    dout(10) << "force_dir_fragment no frags under " << fg << dendl;
+    return NULL;
   }
-  if (!replay)
-    mds->queue_waiters(waiters);
+  dout(10) << " will combine frags under " << fg << ": " << src << dendl;
+  adjust_dir_fragments(diri, src, fg, 0, result, waiters, replay);
+  dir = result.front();
+  dout(10) << "force_dir_fragment result " << *dir << dendl;
   return dir;
 }
 
@@ -10533,7 +11067,7 @@ void MDCache::adjust_dir_fragments(CInode *diri,
 				   list<CDir*>& srcfrags,
 				   frag_t basefrag, int bits,
 				   list<CDir*>& resultfrags, 
-				   list<MDSInternalContextBase*>& waiters,
+				   list<Context*>& waiters,
 				   bool replay)
 {
   dout(10) << "adjust_dir_fragments " << basefrag << " bits " << bits
@@ -10646,14 +11180,14 @@ void MDCache::adjust_dir_fragments(CInode *diri,
 }
 
 
-class C_MDC_FragmentFrozen : public MDSInternalContext {
+class C_MDC_FragmentFrozen : public Context {
   MDCache *mdcache;
-  MDRequestRef mdr;
+  dirfrag_t basedirfrag;
 public:
-  C_MDC_FragmentFrozen(MDCache *m, MDRequestRef& r) :
-    MDSInternalContext(m->mds), mdcache(m), mdr(r) {}
+  C_MDC_FragmentFrozen(MDCache *m, dirfrag_t df) :
+    mdcache(m), basedirfrag(df) {}
   virtual void finish(int r) {
-    mdcache->fragment_frozen(mdr, r);
+    mdcache->fragment_frozen(basedirfrag, r);
   }
 };
 
@@ -10705,19 +11239,18 @@ void MDCache::split_dir(CDir *dir, int bits)
   if (!can_fragment(diri, dirs))
     return;
 
-  MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_FRAGMENTDIR);
-  mdr->more()->fragment_base = dir->dirfrag();
-
   assert(fragments.count(dir->dirfrag()) == 0);
   fragment_info_t& info = fragments[dir->dirfrag()];
-  info.mdr = mdr;
   info.dirs.push_back(dir);
   info.bits = bits;
   info.last_cum_auth_pins_change = ceph_clock_now(g_ceph_context);
 
-  fragment_freeze_dirs(dirs);
+  C_GatherBuilder gather(g_ceph_context, new C_MDC_FragmentFrozen(this, dir->dirfrag()));
+  fragment_freeze_dirs(dirs, gather);
+  gather.activate();
+
   // initial mark+complete pass
-  fragment_mark_and_complete(mdr);
+  fragment_mark_and_complete(dirs);
 }
 
 void MDCache::merge_dir(CInode *diri, frag_t frag)
@@ -10742,23 +11275,23 @@ void MDCache::merge_dir(CInode *diri, frag_t frag)
   int bits = first->get_frag().bits() - frag.bits();
   dout(10) << " we are merginb by " << bits << " bits" << dendl;
 
-  dirfrag_t basedirfrag(diri->ino(), frag);
-  MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_FRAGMENTDIR);
-  mdr->more()->fragment_base = basedirfrag;
-
-  assert(fragments.count(basedirfrag) == 0);
-  fragment_info_t& info = fragments[basedirfrag];
-  info.mdr = mdr;
+  dirfrag_t df(diri->ino(), frag);
+  assert(fragments.count(df) == 0);
+  fragment_info_t& info = fragments[df];
   info.dirs = dirs;
   info.bits = -bits;
   info.last_cum_auth_pins_change = ceph_clock_now(g_ceph_context);
 
-  fragment_freeze_dirs(dirs);
+  C_GatherBuilder gather(g_ceph_context,
+			 new C_MDC_FragmentFrozen(this, dirfrag_t(diri->ino(), frag)));
+  fragment_freeze_dirs(dirs, gather);
+  gather.activate();
+
   // initial mark+complete pass
-  fragment_mark_and_complete(mdr);
+  fragment_mark_and_complete(dirs);
 }
 
-void MDCache::fragment_freeze_dirs(list<CDir*>& dirs)
+void MDCache::fragment_freeze_dirs(list<CDir*>& dirs, C_GatherBuilder &gather)
 {
   for (list<CDir*>::iterator p = dirs.begin(); p != dirs.end(); ++p) {
     CDir *dir = *p;
@@ -10766,36 +11299,29 @@ void MDCache::fragment_freeze_dirs(list<CDir*>& dirs)
     dir->state_set(CDir::STATE_FRAGMENTING);
     dir->freeze_dir();
     assert(dir->is_freezing_dir());
+    dir->add_waiter(CDir::WAIT_FROZEN, gather.new_sub());
   }
 }
 
-class C_MDC_FragmentMarking : public MDCacheContext {
-  MDRequestRef mdr;
+class C_MDC_FragmentMarking : public Context {
+  MDCache *mdcache;
+  list<CDir*> dirs;
 public:
-  C_MDC_FragmentMarking(MDCache *m, MDRequestRef& r) : MDCacheContext(m), mdr(r) {}
+  C_MDC_FragmentMarking(MDCache *m, list<CDir*>& d) : mdcache(m), dirs(d) {}
   virtual void finish(int r) {
-    mdcache->fragment_mark_and_complete(mdr);
+    mdcache->fragment_mark_and_complete(dirs);
   }
 };
 
-void MDCache::fragment_mark_and_complete(MDRequestRef& mdr)
+void MDCache::fragment_mark_and_complete(list<CDir*>& dirs)
 {
-  dirfrag_t basedirfrag = mdr->more()->fragment_base;
-  map<dirfrag_t,fragment_info_t>::iterator it = fragments.find(basedirfrag);
-  if (it == fragments.end() || it->second.mdr != mdr) {
-    dout(7) << "fragment_mark_and_complete " << basedirfrag << " must have aborted" << dendl;
-    request_finish(mdr);
-    return;
-  }
-
-  fragment_info_t& info = it->second;
-  CInode *diri = info.dirs.front()->get_inode();
-  dout(10) << "fragment_mark_and_complete " << info.dirs << " on " << *diri << dendl;
+  CInode *diri = dirs.front()->get_inode();
+  dout(10) << "fragment_mark_and_complete " << dirs << " on " << *diri << dendl;
 
-  MDSGatherBuilder gather(g_ceph_context);
+  C_GatherBuilder gather(g_ceph_context);
   
-  for (list<CDir*>::iterator p = info.dirs.begin();
-       p != info.dirs.end();
+  for (list<CDir*>::iterator p = dirs.begin();
+       p != dirs.end();
        ++p) {
     CDir *dir = *p;
 
@@ -10834,29 +11360,12 @@ void MDCache::fragment_mark_and_complete(MDRequestRef& mdr)
     }
   }
   if (gather.has_subs()) {
-    gather.set_finisher(new C_MDC_FragmentMarking(this, mdr));
+    gather.set_finisher(new C_MDC_FragmentMarking(this, dirs));
     gather.activate();
-    return;
-  }
-
-  for (list<CDir*>::iterator p = info.dirs.begin();
-       p != info.dirs.end();
-       ++p) {
-    CDir *dir = *p;
-    if (!dir->is_frozen_dir()) {
-      assert(dir->is_freezing_dir());
-      dir->add_waiter(CDir::WAIT_FROZEN, gather.new_sub());
-    }
-  }
-  if (gather.has_subs()) {
-    gather.set_finisher(new C_MDC_FragmentFrozen(this, mdr));
-    gather.activate();
-    // flush log so that request auth_pins are retired
-    mds->mdlog->flush();
-    return;
   }
 
-  fragment_frozen(mdr, 0);
+  // flush log so that request auth_pins are retired
+  mds->mdlog->flush();
 }
 
 void MDCache::fragment_unmark_unfreeze_dirs(list<CDir*>& dirs)
@@ -10866,22 +11375,19 @@ void MDCache::fragment_unmark_unfreeze_dirs(list<CDir*>& dirs)
     CDir *dir = *p;
     dout(10) << " frag " << *dir << dendl;
 
+    assert(dir->state_test(CDir::STATE_DNPINNEDFRAG));
+    dir->state_clear(CDir::STATE_DNPINNEDFRAG);
+
     assert(dir->state_test(CDir::STATE_FRAGMENTING));
     dir->state_clear(CDir::STATE_FRAGMENTING);
 
-    if (dir->state_test(CDir::STATE_DNPINNEDFRAG)) {
-      dir->state_clear(CDir::STATE_DNPINNEDFRAG);
-
-      for (CDir::map_t::iterator p = dir->items.begin();
-	  p != dir->items.end();
-	  ++p) {
-	CDentry *dn = p->second;
-	assert(dn->state_test(CDentry::STATE_FRAGMENTING));
-	dn->state_clear(CDentry::STATE_FRAGMENTING);
-	dn->put(CDentry::PIN_FRAGMENTING);
-      }
-    } else {
-      dir->auth_unpin(dir);
+    for (CDir::map_t::iterator p = dir->items.begin();
+	 p != dir->items.end();
+	 ++p) {
+      CDentry *dn = p->second;
+      assert(dn->state_test(CDentry::STATE_FRAGMENTING));
+      dn->state_clear(CDentry::STATE_FRAGMENTING);
+      dn->put(CDentry::PIN_FRAGMENTING);
     }
 
     dir->unfreeze_dir();
@@ -10896,7 +11402,7 @@ bool MDCache::fragment_are_all_frozen(CDir *dir)
        p != fragments.end() && p->first.ino == dir->ino();
        ++p) {
     if (p->first.frag.contains(dir->get_frag()))
-      return p->second.all_frozen;
+      return p->second.has_frozen;
   }
   assert(0);
   return false;
@@ -10929,7 +11435,7 @@ void MDCache::find_stale_fragment_freeze()
     dirfrag_t df = p->first;
     fragment_info_t& info = p->second;
     ++p;
-    if (info.all_frozen)
+    if (info.has_frozen)
       continue;
     CDir *dir;
     int total_auth_pins = 0;
@@ -10959,51 +11465,52 @@ void MDCache::find_stale_fragment_freeze()
 	(!dir->inode->is_root() && dir->get_parent_dir()->is_freezing())) {
       dout(10) << " cancel fragmenting " << df << " bit " << info.bits << dendl;
       list<CDir*> dirs;
-      info.dirs.swap(dirs);
+      dirs.swap(info.dirs);
       fragments.erase(df);
       fragment_unmark_unfreeze_dirs(dirs);
     }
   }
 }
 
-class C_MDC_FragmentPrep : public MDSInternalContext {
+class C_MDC_FragmentPrep : public Context {
   MDCache *mdcache;
   MDRequestRef mdr;
 public:
-  C_MDC_FragmentPrep(MDCache *m, MDRequestRef& r) : MDSInternalContext(m->mds), mdcache(m), mdr(r) {}
+  C_MDC_FragmentPrep(MDCache *m, MDRequestRef& r) : mdcache(m), mdr(r) {}
   virtual void finish(int r) {
     mdcache->_fragment_logged(mdr);
   }
 };
 
-class C_MDC_FragmentStore : public MDSInternalContext {
+class C_MDC_FragmentStore : public Context {
   MDCache *mdcache;
   MDRequestRef mdr;
 public:
-  C_MDC_FragmentStore(MDCache *m, MDRequestRef& r) : MDSInternalContext(m->mds), mdcache(m), mdr(r) {}
+  C_MDC_FragmentStore(MDCache *m, MDRequestRef& r) : mdcache(m), mdr(r) {}
   virtual void finish(int r) {
     mdcache->_fragment_stored(mdr);
   }
 };
 
-class C_MDC_FragmentCommit : public MDSInternalContext {
+class C_MDC_FragmentCommit : public Context {
   MDCache *mdcache;
   dirfrag_t basedirfrag;
   list<CDir*> resultfrags;
 public:
   C_MDC_FragmentCommit(MDCache *m, dirfrag_t df, list<CDir*>& l) :
-    MDSInternalContext(m->mds), mdcache(m), basedirfrag(df), resultfrags(l) {}
+    mdcache(m), basedirfrag(df), resultfrags(l) {}
   virtual void finish(int r) {
     mdcache->_fragment_committed(basedirfrag, resultfrags);
   }
 };
 
-class C_IO_MDC_FragmentFinish : public MDCacheIOContext {
+class C_MDC_FragmentFinish : public Context {
+  MDCache *mdcache;
   dirfrag_t basedirfrag;
   list<CDir*> resultfrags;
 public:
-  C_IO_MDC_FragmentFinish(MDCache *m, dirfrag_t f, list<CDir*>& l) :
-    MDCacheIOContext(m), basedirfrag(f) {
+  C_MDC_FragmentFinish(MDCache *m, dirfrag_t f, list<CDir*>& l) :
+    mdcache(m), basedirfrag(f) {
     resultfrags.swap(l);
   }
   virtual void finish(int r) {
@@ -11012,22 +11519,24 @@ public:
   }
 };
 
-void MDCache::fragment_frozen(MDRequestRef& mdr, int r)
+void MDCache::fragment_frozen(dirfrag_t basedirfrag, int r)
 {
-  dirfrag_t basedirfrag = mdr->more()->fragment_base;
   map<dirfrag_t,fragment_info_t>::iterator it = fragments.find(basedirfrag);
-  if (it == fragments.end() || it->second.mdr != mdr) {
+  if (r < 0) {
     dout(7) << "fragment_frozen " << basedirfrag << " must have aborted" << dendl;
-    request_finish(mdr);
+    assert(it == fragments.end());
     return;
   }
-
-  assert(r == 0);
+  assert(it != fragments.end());
   fragment_info_t& info = it->second;
+
   dout(10) << "fragment_frozen " << basedirfrag.frag << " by " << info.bits
 	   << " on " << info.dirs.front()->get_inode() << dendl;
 
-  info.all_frozen = true;
+  info.has_frozen = true;
+
+  MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_FRAGMENTDIR);
+  mdr->more()->fragment_base = basedirfrag;
   dispatch_fragment_dir(mdr);
 }
 
@@ -11035,12 +11544,7 @@ void MDCache::dispatch_fragment_dir(MDRequestRef& mdr)
 {
   dirfrag_t basedirfrag = mdr->more()->fragment_base;
   map<dirfrag_t,fragment_info_t>::iterator it = fragments.find(basedirfrag);
-  if (it == fragments.end() || it->second.mdr != mdr) {
-    dout(7) << "dispatch_fragment_dir " << basedirfrag << " must have aborted" << dendl;
-    request_finish(mdr);
-    return;
-  }
-
+  assert(it != fragments.end());
   fragment_info_t& info = it->second;
   CInode *diri = info.dirs.front()->get_inode();
 
@@ -11082,7 +11586,7 @@ void MDCache::dispatch_fragment_dir(MDRequestRef& mdr)
   }
 
   // refragment
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
   adjust_dir_fragments(diri, info.dirs, basedirfrag.frag, info.bits,
 		       info.resultfrags, waiters, false);
   if (g_conf->mds_debug_frag)
@@ -11129,8 +11633,7 @@ void MDCache::dispatch_fragment_dir(MDRequestRef& mdr)
   */
 
   add_uncommitted_fragment(basedirfrag, info.bits, le->orig_frags, mdr->ls);
-  mds->server->submit_mdlog_entry(le, new C_MDC_FragmentPrep(this, mdr),
-                                  mdr, __func__);
+  mds->mdlog->submit_entry(le, new C_MDC_FragmentPrep(this, mdr));
   mds->mdlog->flush();
 }
 
@@ -11151,7 +11654,7 @@ void MDCache::_fragment_logged(MDRequestRef& mdr)
   mdr->apply();  // mark scatterlock
 
   // store resulting frags
-  MDSGatherBuilder gather(g_ceph_context, new C_MDC_FragmentStore(this, mdr));
+  C_GatherBuilder gather(g_ceph_context, new C_MDC_FragmentStore(this, mdr));
 
   for (list<CDir*>::iterator p = info.resultfrags.begin();
        p != info.resultfrags.end();
@@ -11239,11 +11742,7 @@ void MDCache::_fragment_committed(dirfrag_t basedirfrag, list<CDir*>& resultfrag
   ufragment &uf = it->second;
 
   // remove old frags
-  C_GatherBuilder gather(
-    g_ceph_context,
-    new C_OnFinisher(
-      new C_IO_MDC_FragmentFinish(this, basedirfrag, resultfrags),
-      &mds->finisher));
+  C_GatherBuilder gather(g_ceph_context, new C_MDC_FragmentFinish(this, basedirfrag, resultfrags));
 
   SnapContext nullsnapc;
   object_locator_t oloc(mds->mdsmap->get_metadata_pool());
@@ -11314,7 +11813,7 @@ void MDCache::handle_fragment_notify(MMDSFragmentNotify *notify)
 */
 
     // refragment
-    list<MDSInternalContextBase*> waiters;
+    list<Context*> waiters;
     list<CDir*> resultfrags;
     adjust_dir_fragments(diri, base, bits, resultfrags, waiters, false);
     if (g_conf->mds_debug_frag)
@@ -11419,7 +11918,7 @@ void MDCache::rollback_uncommitted_fragments()
     list<CDir*> resultfrags;
     if (uf.old_frags.empty()) {
       // created by old format EFragment
-      list<MDSInternalContextBase*> waiters;
+      list<Context*> waiters;
       adjust_dir_fragments(diri, p->first.frag, -uf.bits, resultfrags, waiters, true);
     } else {
       bufferlist::iterator bp = uf.rollback.begin();
@@ -11718,7 +12217,7 @@ void MDCache::dump_cache(const char *fn)
 
 
 C_MDS_RetryRequest::C_MDS_RetryRequest(MDCache *c, MDRequestRef& r)
-  : MDSInternalContext(c->mds), cache(c), mdr(r)
+  : cache(c), mdr(r)
 {}
 
 void C_MDS_RetryRequest::finish(int r)
diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h
index 9f02b3b..c536d32 100644
--- a/src/mds/MDCache.h
+++ b/src/mds/MDCache.h
@@ -26,8 +26,6 @@
 #include "CDir.h"
 #include "include/Context.h"
 #include "events/EMetaBlob.h"
-#include "RecoveryQueue.h"
-#include "MDSContext.h"
 
 #include "messages/MClientRequest.h"
 #include "messages/MMDSSlaveRequest.h"
@@ -139,6 +137,7 @@ public:
     frag_t frag;
     snapid_t snap;
     filepath want_path;
+    inodeno_t want_ino;
     bool want_base_dir;
     bool want_xlocked;
 
@@ -158,15 +157,18 @@ public:
   }
 
   // waiters
-  map<int, map<inodeno_t, list<MDSInternalContextBase*> > > waiting_for_base_ino;
+  map<int, map<inodeno_t, list<Context*> > > waiting_for_base_ino;
 
-  void discover_base_ino(inodeno_t want_ino, MDSInternalContextBase *onfinish, int from=-1);
-  void discover_dir_frag(CInode *base, frag_t approx_fg, MDSInternalContextBase *onfinish,
+  void discover_base_ino(inodeno_t want_ino, Context *onfinish, int from=-1);
+  void discover_dir_frag(CInode *base, frag_t approx_fg, Context *onfinish,
 			 int from=-1);
-  void discover_path(CInode *base, snapid_t snap, filepath want_path, MDSInternalContextBase *onfinish,
+  void discover_path(CInode *base, snapid_t snap, filepath want_path, Context *onfinish,
 		     bool want_xlocked=false, int from=-1);
-  void discover_path(CDir *base, snapid_t snap, filepath want_path, MDSInternalContextBase *onfinish,
+  void discover_path(CDir *base, snapid_t snap, filepath want_path, Context *onfinish,
 		     bool want_xlocked=false);
+  void discover_ino(CDir *base, inodeno_t want_ino, Context *onfinish,
+		    bool want_xlocked=false);
+
   void kick_discovers(int who);  // after a failure.
 
 
@@ -244,7 +246,7 @@ public:
   int get_num_client_requests();
 
   MDRequestRef request_start(MClientRequest *req);
-  MDRequestRef request_start_slave(metareqid_t rid, __u32 attempt, Message *m);
+  MDRequestRef request_start_slave(metareqid_t rid, __u32 attempt, int by);
   MDRequestRef request_start_internal(int op);
   bool have_request(metareqid_t rid) {
     return active_requests.count(rid);
@@ -288,7 +290,7 @@ public:
     uncommitted_masters[reqid].slaves = slaves;
     uncommitted_masters[reqid].safe = safe;
   }
-  void wait_for_uncommitted_master(metareqid_t reqid, MDSInternalContextBase *c) {
+  void wait_for_uncommitted_master(metareqid_t reqid, Context *c) {
     uncommitted_masters[reqid].waiters.push_back(c);
   }
   void log_master_commit(metareqid_t reqid);
@@ -323,11 +325,11 @@ protected:
   struct umaster {
     set<int> slaves;
     LogSegment *ls;
-    list<MDSInternalContextBase*> waiters;
+    list<Context*> waiters;
     bool safe;
     bool committing;
     bool recovering;
-    umaster() : ls(NULL), safe(false), committing(false), recovering(false) {}
+    umaster() : committing(false), recovering(false) {}
   };
   map<metareqid_t, umaster>                 uncommitted_masters;         // master: req -> slave set
 
@@ -349,12 +351,12 @@ protected:
   void discard_delayed_resolve(int who);
   void maybe_resolve_finish();
   void disambiguate_imports();
+  void recalc_auth_bits();
   void trim_unlinked_inodes();
   void add_uncommitted_slave_update(metareqid_t reqid, int master, MDSlaveUpdate*);
   void finish_uncommitted_slave_update(metareqid_t reqid, int master);
   MDSlaveUpdate* get_uncommitted_slave_update(metareqid_t reqid, int master);
 public:
-  void recalc_auth_bits(bool replay);
   void remove_inode_recursive(CInode *in);
 
   bool is_ambiguous_slave_update(metareqid_t reqid, int master) {
@@ -429,7 +431,7 @@ protected:
 
   vector<CInode*> rejoin_recover_q, rejoin_check_q;
   list<SimpleLock*> rejoin_eval_locks;
-  list<MDSInternalContextBase*> rejoin_waiters;
+  list<Context*> rejoin_waiters;
 
   void rejoin_walk(CDir *dir, MMDSCacheRejoin *rejoin);
   void handle_cache_rejoin(MMDSCacheRejoin *m);
@@ -441,6 +443,9 @@ protected:
 				      set<vinodeno_t>& acked_inodes,
 				      set<SimpleLock *>& gather_locks);
   void handle_cache_rejoin_ack(MMDSCacheRejoin *m);
+  void handle_cache_rejoin_purge(MMDSCacheRejoin *m);
+  void handle_cache_rejoin_missing(MMDSCacheRejoin *m);
+  void handle_cache_rejoin_full(MMDSCacheRejoin *m);
   void rejoin_send_acks();
   void rejoin_trim_undef_inodes();
   void maybe_send_pending_rejoins() {
@@ -528,15 +533,25 @@ public:
   friend class MDBalancer;
 
 
-  // File size recovery
-private:
-  RecoveryQueue recovery_queue;
+  // file size recovery
+  set<CInode*> file_recover_queue;
+  set<CInode*> file_recovering;
+
+  void queue_file_recover(CInode *in);
+  void unqueue_file_recover(CInode *in);
+  void _queued_file_recover_cow(CInode *in, MutationRef& mut);
+  void _queue_file_recover(CInode *in);
   void identify_files_to_recover(vector<CInode*>& recover_q, vector<CInode*>& check_q);
   void start_files_to_recover(vector<CInode*>& recover_q, vector<CInode*>& check_q);
-public:
+
   void do_file_recover();
-  void queue_file_recover(CInode *in);
-  void _queued_file_recover_cow(CInode *in, MutationRef& mut);
+  void _recovered(CInode *in, int r, uint64_t size, utime_t mtime);
+
+  void purge_prealloc_ino(inodeno_t ino, Context *fin);
+
+
+
+ public:
 
   // subsystems
   Migrator *migrator;
@@ -557,7 +572,7 @@ public:
   size_t get_cache_size() { return lru.lru_get_size(); }
 
   // trimming
-  bool trim(int max=-1, int count=-1);   // trim cache
+  bool trim(int max = -1);   // trim cache
   bool trim_dentry(CDentry *dn, map<int, MCacheExpire*>& expiremap);
   void trim_dirfrag(CDir *dir, CDir *con,
 		    map<int, MCacheExpire*>& expiremap);
@@ -566,7 +581,6 @@ public:
   void send_expire_messages(map<int, MCacheExpire*>& expiremap);
   void trim_non_auth();      // trim out trimmable non-auth items
   bool trim_non_auth_subtree(CDir *directory);
-  void standby_trim_segment(LogSegment *ls);
   void try_trim_non_auth_subtree(CDir *dir);
   bool can_trim_non_auth_dirfrag(CDir *dir) {
     return my_ambiguous_imports.count((dir)->dirfrag()) == 0 &&
@@ -615,11 +629,11 @@ public:
     frag_t fg = in->pick_dirfrag(dn);
     return in->get_dirfrag(fg);
   }
-  CDir* get_force_dirfrag(dirfrag_t df, bool replay) {
+  CDir* get_force_dirfrag(dirfrag_t df) {
     CInode *diri = get_inode(df.ino);
     if (!diri)
       return NULL;
-    CDir *dir = force_dir_fragment(diri, df.frag, replay);
+    CDir *dir = force_dir_fragment(diri, df.frag);
     if (!dir)
       dir = diri->get_dirfrag(df.frag);
     return dir;
@@ -652,8 +666,7 @@ public:
   }
   void touch_dentry_bottom(CDentry *dn) {
     lru.lru_bottouch(dn);
-    if (dn->get_projected_linkage()->is_primary() &&
-	dn->get_dir()->inode->is_stray()) {
+    if (dn->get_projected_linkage()->is_primary()) {
       CInode *in = dn->get_projected_linkage()->get_inode();
       if (in->has_dirfrags()) {
 	list<CDir*> ls;
@@ -692,34 +705,34 @@ protected:
 
 private:
   bool opening_root, open;
-  list<MDSInternalContextBase*> waiting_for_open;
+  list<Context*> waiting_for_open;
 
 public:
   void init_layouts();
   CInode *create_system_inode(inodeno_t ino, int mode);
   CInode *create_root_inode();
 
-  void create_empty_hierarchy(MDSGather *gather);
-  void create_mydir_hierarchy(MDSGather *gather);
+  void create_empty_hierarchy(C_Gather *gather);
+  void create_mydir_hierarchy(C_Gather *gather);
 
   bool is_open() { return open; }
-  void wait_for_open(MDSInternalContextBase *c) {
+  void wait_for_open(Context *c) {
     waiting_for_open.push_back(c);
   }
 
-  void open_root_inode(MDSInternalContextBase *c);
+  void open_root_inode(Context *c);
   void open_root();
-  void open_mydir_inode(MDSInternalContextBase *c);
+  void open_mydir_inode(Context *c);
   void populate_mydir();
 
-  void _create_system_file(CDir *dir, const char *name, CInode *in, MDSInternalContextBase *fin);
+  void _create_system_file(CDir *dir, const char *name, CInode *in, Context *fin);
   void _create_system_file_finish(MutationRef& mut, CDentry *dn,
-                                  version_t dpv, MDSInternalContextBase *fin);
+                                  version_t dpv, Context *fin);
 
-  void open_foreign_mdsdir(inodeno_t ino, MDSInternalContextBase *c);
+  void open_foreign_mdsdir(inodeno_t ino, Context *c);
   CDentry *get_or_create_stray_dentry(CInode *in);
 
-  MDSInternalContextBase *_get_waiter(MDRequestRef& mdr, Message *req, MDSInternalContextBase *fin);
+  Context *_get_waiter(MDRequestRef& mdr, Message *req, Context *fin);
 
   /**
    * Find the given dentry (and whether it exists or not), its ancestors,
@@ -755,7 +768,7 @@ public:
    * If it returns 2 the request has been forwarded, and again the requester
    * should unwind itself and back out.
    */
-  int path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBase *fin, const filepath& path,
+  int path_traverse(MDRequestRef& mdr, Message *req, Context *fin, const filepath& path,
 		    vector<CDentry*> *pdnvec, CInode **pin, int onfail);
   bool path_is_mine(filepath& path);
   bool path_is_mine(string& p) {
@@ -765,18 +778,23 @@ public:
 
   CInode *cache_traverse(const filepath& path);
 
-  void open_remote_dirfrag(CInode *diri, frag_t fg, MDSInternalContextBase *fin);
+  void open_remote_dirfrag(CInode *diri, frag_t fg, Context *fin);
   CInode *get_dentry_inode(CDentry *dn, MDRequestRef& mdr, bool projected=false);
+  void open_remote_ino(inodeno_t ino, Context *fin, bool want_xlocked=false,
+		       inodeno_t hadino=0, version_t hadv=0);
+  void open_remote_ino_2(inodeno_t ino,
+			 vector<Anchor>& anchortrace, bool want_xlocked,
+			 inodeno_t hadino, version_t hadv, Context *onfinish);
 
   bool parallel_fetch(map<inodeno_t,filepath>& pathmap, set<inodeno_t>& missing);
   bool parallel_fetch_traverse_dir(inodeno_t ino, filepath& path, 
 				   set<CDir*>& fetch_queue, set<inodeno_t>& missing,
 				   C_GatherBuilder &gather_bld);
 
-  void open_remote_dentry(CDentry *dn, bool projected, MDSInternalContextBase *fin,
+  void open_remote_dentry(CDentry *dn, bool projected, Context *fin,
 			  bool want_xlocked=false);
-  void _open_remote_dentry_finish(CDentry *dn, inodeno_t ino, MDSInternalContextBase *fin,
-				  bool want_xlocked, int r);
+  void _open_remote_dentry_finish(CDentry *dn, inodeno_t ino, Context *fin,
+				  bool want_xlocked, int mode, int r);
 
   void make_trace(vector<CDentry*>& trace, CInode *in);
 
@@ -793,7 +811,7 @@ protected:
     bool want_xlocked;
     version_t tid;
     int64_t pool;
-    list<MDSInternalContextBase*> waiters;
+    list<Context*> waiters;
     open_ino_info_t() : checking(-1), auth_hint(-1),
       check_peers(true), fetch_backtrace(true), discover(false) {}
   };
@@ -804,7 +822,7 @@ protected:
   void _open_ino_parent_opened(inodeno_t ino, int ret);
   void _open_ino_traverse_dir(inodeno_t ino, open_ino_info_t& info, int err);
   void _open_ino_fetch_dir(inodeno_t ino, MMDSOpenIno *m, CDir *dir);
-  MDSInternalContextBase* _open_ino_get_waiter(inodeno_t ino, MMDSOpenIno *m);
+  Context* _open_ino_get_waiter(inodeno_t ino, MMDSOpenIno *m);
   int open_ino_traverse_dir(inodeno_t ino, MMDSOpenIno *m,
 			    vector<inode_backpointer_t>& ancestors,
 			    bool discover, bool want_xlocked, int *hint);
@@ -813,20 +831,20 @@ protected:
   void do_open_ino_peer(inodeno_t ino, open_ino_info_t& info);
   void handle_open_ino(MMDSOpenIno *m);
   void handle_open_ino_reply(MMDSOpenInoReply *m);
-  friend class C_IO_MDC_OpenInoBacktraceFetched;
+  friend class C_MDC_OpenInoBacktraceFetched;
   friend struct C_MDC_OpenInoTraverseDir;
   friend struct C_MDC_OpenInoParentOpened;
 
 public:
   void kick_open_ino_peers(int who);
-  void open_ino(inodeno_t ino, int64_t pool, MDSInternalContextBase *fin,
+  void open_ino(inodeno_t ino, int64_t pool, Context *fin,
 		bool want_replica=true, bool want_xlocked=false);
   
   // -- find_ino_peer --
   struct find_ino_peer_info_t {
     inodeno_t ino;
     ceph_tid_t tid;
-    MDSInternalContextBase *fin;
+    Context *fin;
     int hint;
     int checking;
     set<int> checked;
@@ -837,12 +855,24 @@ public:
   map<ceph_tid_t, find_ino_peer_info_t> find_ino_peer;
   ceph_tid_t find_ino_peer_last_tid;
 
-  void find_ino_peers(inodeno_t ino, MDSInternalContextBase *c, int hint=-1);
+  void find_ino_peers(inodeno_t ino, Context *c, int hint=-1);
   void _do_find_ino_peer(find_ino_peer_info_t& fip);
   void handle_find_ino(MMDSFindIno *m);
   void handle_find_ino_reply(MMDSFindInoReply *m);
   void kick_find_ino_peers(int who);
 
+  // -- anchors --
+public:
+  void anchor_create_prep_locks(MDRequestRef& mdr, CInode *in, set<SimpleLock*>& rdlocks,
+				set<SimpleLock*>& xlocks);
+  void anchor_create(MDRequestRef& mdr, CInode *in, Context *onfinish);
+  void anchor_destroy(CInode *in, Context *onfinish);
+protected:
+  void _anchor_prepared(CInode *in, version_t atid, bool add);
+  void _anchor_logged(CInode *in, version_t atid, MutationRef& mut);
+  friend class C_MDC_AnchorPrepared;
+  friend class C_MDC_AnchorLogged;
+
   // -- snaprealms --
 public:
   void snaprealm_create(MDRequestRef& mdr, CInode *in);
@@ -872,10 +902,10 @@ protected:
   void _purge_stray_logged(CDentry *dn, version_t pdv, LogSegment *ls);
   void _purge_stray_logged_truncate(CDentry *dn, LogSegment *ls);
   friend struct C_MDC_RetryScanStray;
-  friend class C_IO_MDC_FetchedBacktrace;
+  friend class C_MDC_FetchedBacktrace;
   friend class C_MDC_PurgeStrayLogged;
   friend class C_MDC_PurgeStrayLoggedTruncate;
-  friend class C_IO_MDC_PurgeStrayPurged;
+  friend class C_MDC_PurgeStrayPurged;
   void reintegrate_stray(CDentry *dn, CDentry *rlink);
   void migrate_stray(CDentry *dn, int dest);
 
@@ -907,17 +937,17 @@ public:
     in->encode_replica(to, bl);
   }
   
-  CDir* add_replica_dir(bufferlist::iterator& p, CInode *diri, int from, list<MDSInternalContextBase*>& finished);
+  CDir* add_replica_dir(bufferlist::iterator& p, CInode *diri, int from, list<Context*>& finished);
   CDir* forge_replica_dir(CInode *diri, frag_t fg, int from);
-  CDentry *add_replica_dentry(bufferlist::iterator& p, CDir *dir, list<MDSInternalContextBase*>& finished);
-  CInode *add_replica_inode(bufferlist::iterator& p, CDentry *dn, list<MDSInternalContextBase*>& finished);
+  CDentry *add_replica_dentry(bufferlist::iterator& p, CDir *dir, list<Context*>& finished);
+  CInode *add_replica_inode(bufferlist::iterator& p, CDentry *dn, list<Context*>& finished);
 
   void replicate_stray(CDentry *straydn, int who, bufferlist& bl);
   CDentry *add_replica_stray(bufferlist &bl, int from);
 
   // -- namespace --
 public:
-  void send_dentry_link(CDentry *dn, MDRequestRef& mdr);
+  void send_dentry_link(CDentry *dn);
   void send_dentry_unlink(CDentry *dn, CDentry *straydn, MDRequestRef& mdr);
 protected:
   void handle_dentry_link(MDentryLink *m);
@@ -930,7 +960,7 @@ private:
     int bits;
     bool committed;
     LogSegment *ls;
-    list<MDSInternalContextBase*> waiters;
+    list<Context*> waiters;
     list<frag_t> old_frags;
     bufferlist rollback;
     ufragment() : bits(0), committed(false), ls(NULL) {}
@@ -943,30 +973,29 @@ private:
     list<CDir*> resultfrags;
     MDRequestRef mdr;
     // for deadlock detection
-    bool all_frozen;
+    bool has_frozen;
     utime_t last_cum_auth_pins_change;
     int last_cum_auth_pins;
     int num_remote_waiters;	// number of remote authpin waiters
-    fragment_info_t() : all_frozen(false), last_cum_auth_pins(0), num_remote_waiters(0) {}
-    bool is_fragmenting() { return !resultfrags.empty(); }
+    fragment_info_t() : has_frozen(false), last_cum_auth_pins(0), num_remote_waiters(0) {}
   };
   map<dirfrag_t,fragment_info_t> fragments;
 
   void adjust_dir_fragments(CInode *diri, frag_t basefrag, int bits,
-			    list<CDir*>& frags, list<MDSInternalContextBase*>& waiters, bool replay);
+			    list<CDir*>& frags, list<Context*>& waiters, bool replay);
   void adjust_dir_fragments(CInode *diri,
 			    list<CDir*>& srcfrags,
 			    frag_t basefrag, int bits,
 			    list<CDir*>& resultfrags, 
-			    list<MDSInternalContextBase*>& waiters,
+			    list<Context*>& waiters,
 			    bool replay);
   CDir *force_dir_fragment(CInode *diri, frag_t fg, bool replay=true);
   void get_force_dirfrag_bound_set(vector<dirfrag_t>& dfs, set<CDir*>& bounds);
 
   bool can_fragment(CInode *diri, list<CDir*>& dirs);
-  void fragment_freeze_dirs(list<CDir*>& dirs);
-  void fragment_mark_and_complete(MDRequestRef& mdr);
-  void fragment_frozen(MDRequestRef& mdr, int r);
+  void fragment_freeze_dirs(list<CDir*>& dirs, C_GatherBuilder &gather);
+  void fragment_mark_and_complete(list<CDir*>& dirs);
+  void fragment_frozen(dirfrag_t basedirfrag, int r);
   void fragment_unmark_unfreeze_dirs(list<CDir*>& dirs);
   void dispatch_fragment_dir(MDRequestRef& mdr);
   void _fragment_logged(MDRequestRef& mdr);
@@ -980,7 +1009,7 @@ private:
   friend class C_MDC_FragmentPrep;
   friend class C_MDC_FragmentStore;
   friend class C_MDC_FragmentCommit;
-  friend class C_IO_MDC_FragmentFinish;
+  friend class C_MDC_FragmentFinish;
 
   void handle_fragment_notify(MMDSFragmentNotify *m);
 
@@ -989,7 +1018,7 @@ private:
   void finish_uncommitted_fragment(dirfrag_t basedirfrag, int op);
   void rollback_uncommitted_fragment(dirfrag_t basedirfrag, list<frag_t>& old_frags);
 public:
-  void wait_for_uncommitted_fragment(dirfrag_t dirfrag, MDSInternalContextBase *c) {
+  void wait_for_uncommitted_fragment(dirfrag_t dirfrag, Context *c) {
     assert(uncommitted_fragments.count(dirfrag));
     uncommitted_fragments[dirfrag].waiters.push_back(c);
   }
@@ -1031,7 +1060,7 @@ public:
 
 };
 
-class C_MDS_RetryRequest : public MDSInternalContext {
+class C_MDS_RetryRequest : public Context {
   MDCache *cache;
   MDRequestRef mdr;
  public:
diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc
index 0beb6d6..c224695 100644
--- a/src/mds/MDLog.cc
+++ b/src/mds/MDLog.cc
@@ -16,14 +16,11 @@
 #include "MDS.h"
 #include "MDCache.h"
 #include "LogEvent.h"
-#include "MDSContext.h"
 
 #include "osdc/Journaler.h"
-#include "mds/JournalPointer.h"
 
 #include "common/entity_name.h"
 #include "common/perf_counters.h"
-#include "common/Cond.h"
 
 #include "events/ESubtreeMap.h"
 
@@ -77,35 +74,34 @@ void MDLog::create_logger()
   g_ceph_context->get_perfcounters_collection()->add(logger);
 }
 
-class C_MDL_WriteError : public MDSIOContextBase {
-  protected:
-  MDLog *mdlog;
-  MDS *get_mds() {return mdlog->mds;}
-
-  void finish(int r) {
-    MDS *mds = get_mds();
+void MDLog::init_journaler()
+{
+  // inode
+  ino = MDS_INO_LOG_OFFSET + mds->get_nodeid();
+  
+  // log streamer
+  if (journaler) delete journaler;
+  journaler = new Journaler(ino, mds->mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter,
+			    logger, l_mdl_jlat,
+			    &mds->timer);
+  assert(journaler->is_readonly());
+  journaler->set_write_error_handler(new C_MDL_WriteError(this));
+}
 
-    if (r == -EBLACKLISTED) {
-      derr << "we have been blacklisted (fenced), respawning..." << dendl;
-      mds->respawn();
-    } else {
-      derr << "unhandled error " << cpp_strerror(r) << ", shutting down..." << dendl;
-      mds->suicide();
-    }
+void MDLog::handle_journaler_write_error(int r)
+{
+  if (r == -EBLACKLISTED) {
+    derr << "we have been blacklisted (fenced), respawning..." << dendl;
+    mds->respawn();
+  } else {
+    derr << "unhandled error " << cpp_strerror(r) << ", shutting down..." << dendl;
+    mds->suicide();
   }
+}
 
-  public:
-  C_MDL_WriteError(MDLog *m) : mdlog(m) {}
-};
-
-
-void MDLog::write_head(MDSInternalContextBase *c) 
+void MDLog::write_head(Context *c) 
 {
-  MDSIOContext *fin = NULL;
-  if (c != NULL) {
-    fin = new C_IO_Wrapper(mds, c);
-  }
-  journaler->write_head(fin);
+  journaler->write_head(c);
 }
 
 uint64_t MDLog::get_read_pos()
@@ -125,93 +121,27 @@ uint64_t MDLog::get_safe_pos()
 
 
 
-void MDLog::create(MDSInternalContextBase *c)
+void MDLog::create(Context *c)
 {
   dout(5) << "create empty log" << dendl;
-
-  C_GatherBuilder gather(g_ceph_context);
-  // This requires an OnFinisher wrapper because Journaler will call back the completion for write_head inside its own lock
-  // XXX but should maybe that be handled inside Journaler?
-  gather.set_finisher(new C_OnFinisher(new C_IO_Wrapper(mds, c), &(mds->finisher)));
-
-  // The inode of the default Journaler we will create
-  ino = MDS_INO_LOG_OFFSET + mds->get_nodeid();
-
-  // Instantiate Journaler and start async write to RADOS
-  assert(journaler == NULL);
-  journaler = new Journaler(ino, mds->mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter,
-			    logger, l_mdl_jlat,
-			    &mds->timer,
-                            &mds->finisher);
-  assert(journaler->is_readonly());
-  journaler->set_write_error_handler(new C_MDL_WriteError(this));
+  init_journaler();
   journaler->set_writeable();
-  journaler->create(&mds->mdcache->default_log_layout, g_conf->mds_journal_format);
-  journaler->write_head(gather.new_sub());
-
-  // Async write JournalPointer to RADOS
-  JournalPointer jp(mds->get_nodeid(), mds->mdsmap->get_metadata_pool());
-  jp.front = ino;
-  jp.back = 0;
-  jp.save(mds->objecter, gather.new_sub());
-
-  gather.activate();
+  journaler->create(&mds->mdcache->default_log_layout);
+  journaler->write_head(c);
 
   logger->set(l_mdl_expos, journaler->get_expire_pos());
   logger->set(l_mdl_wrpos, journaler->get_write_pos());
-
-  submit_thread.create();
 }
 
-void MDLog::open(MDSInternalContextBase *c)
+void MDLog::open(Context *c)
 {
   dout(5) << "open discovering log bounds" << dendl;
+  init_journaler();
+  journaler->recover(c);
 
-  recovery_thread.set_completion(c);
-  recovery_thread.create();
-  recovery_thread.detach();
-
-  submit_thread.create();
   // either append() or replay() will follow.
 }
 
-/**
- * Final part of reopen() procedure, after recovery_thread
- * has done its thing we call append()
- */
-class C_ReopenComplete : public MDSInternalContext {
-  MDLog *mdlog;
-  MDSInternalContextBase *on_complete;
-public:
-  C_ReopenComplete(MDLog *mdlog_, MDSInternalContextBase *on_complete_) : MDSInternalContext(mdlog->mds), mdlog(mdlog_), on_complete(on_complete_) {}
-  void finish(int r) {
-    mdlog->append();
-    on_complete->complete(r);
-  }
-};
-
-/**
- * Given that open() has been called in the past, go through the journal
- * recovery procedure again, potentially reformatting the journal if it
- * was in an old format.
- */
-void MDLog::reopen(MDSInternalContextBase *c)
-{
-  dout(5) << "reopen" << dendl;
-
-  // Because we will call append() at the completion of this, check that we have already
-  // read the whole journal.
-  assert(journaler != NULL);
-  assert(journaler->get_read_pos() == journaler->get_write_pos());
-
-  delete journaler;
-  journaler = NULL;
-
-  recovery_thread.set_completion(new C_ReopenComplete(this, c));
-  recovery_thread.create();
-  recovery_thread.detach();
-}
-
 void MDLog::append()
 {
   dout(5) << "append positioning at end and marking writeable" << dendl;
@@ -227,36 +157,16 @@ void MDLog::append()
 
 // -------------------------------------------------
 
-void MDLog::_start_entry(LogEvent *e)
+void MDLog::start_entry(LogEvent *e)
 {
-  assert(submit_mutex.is_locked_by_me());
-
   assert(cur_event == NULL);
   cur_event = e;
   e->set_start_off(get_write_pos());
-
-  event_seq++;
-
-  EMetaBlob *metablob = e->get_metablob();
-  if (metablob) {
-    metablob->event_seq = event_seq;
-    metablob->last_subtree_map = get_last_segment_seq();
-  }
-}
-
-void MDLog::cancel_entry(LogEvent *le)
-{
-  assert(le == cur_event);
-  cur_event = NULL;
-  delete le;
 }
 
-void MDLog::_submit_entry(LogEvent *le, MDSInternalContextBase *c)
+void MDLog::submit_entry(LogEvent *le, Context *c) 
 {
-  assert(submit_mutex.is_locked_by_me());
   assert(!mds->is_any_replay());
-  assert(!capped);
-
   assert(le == cur_event);
   cur_event = NULL;
 
@@ -270,36 +180,55 @@ void MDLog::_submit_entry(LogEvent *le, MDSInternalContextBase *c)
 
   // let the event register itself in the segment
   assert(!segments.empty());
-  LogSegment *ls = segments.rbegin()->second;
-  ls->num_events++;
-
-  le->_segment = ls;
+  le->_segment = segments.rbegin()->second;
+  le->_segment->num_events++;
   le->update_segment();
-  le->set_stamp(ceph_clock_now(g_ceph_context));
 
-  pending_events[ls->seq].push_back(PendingEvent(le, c));
+  le->set_stamp(ceph_clock_now(g_ceph_context));
+  
   num_events++;
+  assert(!capped);
+  
+  // encode it, with event type
+  {
+    bufferlist bl;
+    le->encode_with_header(bl);
+
+    dout(5) << "submit_entry " << journaler->get_write_pos() << "~" << bl.length()
+	    << " : " << *le << dendl;
+      
+    // journal it.
+    journaler->append_entry(bl);  // bl is destroyed.
+  }
+
+  le->_segment->end = journaler->get_write_pos();
 
   if (logger) {
     logger->inc(l_mdl_evadd);
     logger->set(l_mdl_ev, num_events);
+    logger->set(l_mdl_wrpos, journaler->get_write_pos());
   }
 
   unflushed++;
+
+  if (c)
+    journaler->wait_for_flush(c);
   
-  uint64_t period = journaler->get_layout_period();
   // start a new segment?
+  //  FIXME: should this go elsewhere?
+  uint64_t last_seg = get_last_segment_offset();
+  uint64_t period = journaler->get_layout_period();
+  // start a new segment if there are none or if we reach end of last segment
   if (le->get_type() == EVENT_SUBTREEMAP ||
       (le->get_type() == EVENT_IMPORTFINISH && mds->is_resolve())) {
     // avoid infinite loop when ESubtreeMap is very large.
-    // do not insert ESubtreeMap among EImportFinish events that finish
+    // don not insert ESubtreeMap among EImportFinish events that finish
     // disambiguate imports. Because the ESubtreeMap reflects the subtree
     // state when all EImportFinish events are replayed.
-  } else if (ls->end/period != ls->offset/period ||
-	     ls->num_events >= g_conf->mds_log_events_per_segment) {
-    dout(10) << "submit_entry also starting new segment: last = "
-	     << ls->seq  << "/" << ls->offset << ", event seq = " << event_seq << dendl;
-    _start_new_segment();
+  } else if (journaler->get_write_pos()/period != last_seg/period) {
+    dout(10) << "submit_entry also starting new segment: last = " << last_seg
+	     << ", cur pos = " << journaler->get_write_pos() << dendl;
+    start_new_segment();
   } else if (g_conf->mds_debug_subtrees &&
 	     le->get_type() != EVENT_SUBTREEMAP_TEST) {
     // debug: journal this every time to catch subtree replay bugs.
@@ -307,118 +236,28 @@ void MDLog::_submit_entry(LogEvent *le, MDSInternalContextBase *c)
     // LogSegment boundary on replay.
     LogEvent *sle = mds->mdcache->create_subtree_map();
     sle->set_type(EVENT_SUBTREEMAP_TEST);
-    _submit_entry(sle, NULL);
-  }
-}
-
-void MDLog::_submit_thread()
-{
-  dout(10) << "_submit_thread start" << dendl;
-
-  submit_mutex.Lock();
-
-  while (!stopping) {
-    map<uint64_t,list<PendingEvent> >::iterator it = pending_events.begin();
-    if (it == pending_events.end()) {
-      submit_cond.Wait(submit_mutex);
-      continue;
-    }
-
-    if (it->second.empty()) {
-      pending_events.erase(it);
-      continue;
-    }
-
-    PendingEvent data = it->second.front();
-    it->second.pop_front();
-
-    submit_mutex.Unlock();
-
-    if (data.le) {
-      LogEvent *le = data.le;
-      LogSegment *ls = le->_segment;
-      // encode it, with event type
-      bufferlist bl;
-      le->encode_with_header(bl);
-
-      uint64_t write_pos = journaler->get_write_pos();
-
-      le->set_start_off(write_pos);
-      if (le->get_type() == EVENT_SUBTREEMAP)
-	ls->offset = write_pos;
-
-      dout(5) << "_submit_thread " << write_pos << "~" << bl.length()
-	      << " : " << *le << dendl;
-
-      // journal it.
-      journaler->append_entry(bl);  // bl is destroyed.
-      ls->end = journaler->get_write_pos();
-
-      if (data.fin)
-	journaler->wait_for_flush(new C_IO_Wrapper(mds, data.fin));
-      if (data.flush)
-	journaler->flush();
-
-      if (logger)
-	logger->set(l_mdl_wrpos, ls->end);
-
-      delete le;
-    } else {
-      if (data.fin)
-	journaler->wait_for_flush(new C_IO_Wrapper(mds, data.fin));
-      if (data.flush)
-	journaler->flush();
-    }
-
-    submit_mutex.Lock();
-    if (data.flush)
-      unflushed = 0;
-    else if (data.le)
-      unflushed++;
+    submit_entry(sle);
   }
 
-  submit_mutex.Unlock();
+  delete le;
 }
 
-void MDLog::wait_for_safe(MDSInternalContextBase *c)
+void MDLog::wait_for_safe(Context *c)
 {
-  if (!g_conf->mds_log) {
+  if (g_conf->mds_log) {
+    // wait
+    journaler->wait_for_flush(c);
+  } else {
     // hack: bypass.
     c->complete(0);
-    return;
-  }
-
-  submit_mutex.Lock();
-
-  bool no_pending = true;
-  if (!pending_events.empty()) {
-    pending_events.rbegin()->second.push_back(PendingEvent(NULL, c));
-    no_pending = false;
-    submit_cond.Signal();
   }
-
-  submit_mutex.Unlock();
-
-  if (no_pending && c)
-    journaler->wait_for_flush(new C_IO_Wrapper(mds, c));
 }
 
 void MDLog::flush()
 {
-  submit_mutex.Lock();
-
-  bool do_flush = unflushed > 0;
-  unflushed = 0;
-  if (!pending_events.empty()) {
-    pending_events.rbegin()->second.push_back(PendingEvent(NULL, NULL, true));
-    do_flush = false;
-    submit_cond.Signal();
-  }
-
-  submit_mutex.Unlock();
-
-  if (do_flush)
+  if (unflushed)
     journaler->flush();
+  unflushed = 0;
 }
 
 void MDLog::cap()
@@ -427,41 +266,25 @@ void MDLog::cap()
   capped = true;
 }
 
-void MDLog::shutdown()
-{
-  dout(5) << "shutdown" << dendl;
-  if (!submit_thread.is_started())
-    return;
-
-  assert(mds->mds_lock.is_locked_by_me());
-  mds->mds_lock.Unlock();
-
-  submit_mutex.Lock();
-  stopping = true;
-  submit_cond.Signal();
-  submit_mutex.Unlock();
-
-  mds->mds_lock.Lock();
-}
-
 
 // -----------------------------
 // segments
 
-void MDLog::_start_new_segment()
+void MDLog::start_new_segment(Context *onsync)
 {
-  _prepare_new_segment();
-  _journal_segment_subtree_map(NULL);
+  prepare_new_segment();
+  journal_segment_subtree_map();
+  if (onsync) {
+    wait_for_safe(onsync);
+    flush();
+  }
 }
 
-void MDLog::_prepare_new_segment()
+void MDLog::prepare_new_segment()
 {
-  assert(submit_mutex.is_locked_by_me());
-
-  uint64_t seq = event_seq + 1;
-  dout(7) << __func__ << " seq " << seq << dendl;
+  dout(7) << __func__ << " at " << journaler->get_write_pos() << dendl;
 
-  segments[seq] = new LogSegment(seq);
+  segments[journaler->get_write_pos()] = new LogSegment(journaler->get_write_pos());
 
   logger->inc(l_mdl_segadd);
   logger->set(l_mdl_seg, segments.size());
@@ -472,14 +295,10 @@ void MDLog::_prepare_new_segment()
   mds->mdcache->advance_stray();
 }
 
-void MDLog::_journal_segment_subtree_map(MDSInternalContextBase *onsync)
+void MDLog::journal_segment_subtree_map()
 {
-  assert(submit_mutex.is_locked_by_me());
-
   dout(7) << __func__ << dendl;
-  ESubtreeMap *sle = mds->mdcache->create_subtree_map();
-  sle->event_seq = get_last_segment_seq();
-  _submit_entry(sle, onsync);
+  submit_entry(mds->mdcache->create_subtree_map());
 }
 
 void MDLog::trim(int m)
@@ -489,8 +308,6 @@ void MDLog::trim(int m)
   if (m >= 0)
     max_events = m;
 
-  submit_mutex.Lock();
-
   // trim!
   dout(10) << "trim " 
 	   << segments.size() << " / " << max_segments << " segments, " 
@@ -499,10 +316,8 @@ void MDLog::trim(int m)
 	   << ", " << expired_segments.size() << " (" << expired_events << ") expired"
 	   << dendl;
 
-  if (segments.empty()) {
-    submit_mutex.Unlock();
+  if (segments.empty())
     return;
-  }
 
   // hack: only trim for a few seconds at a time
   utime_t stop = ceph_clock_now(g_ceph_context);
@@ -531,54 +346,39 @@ void MDLog::trim(int m)
     assert(ls);
     ++p;
     
-    if (pending_events.count(ls->seq) ||
-	ls->end > journaler->get_write_safe_pos()) {
-      dout(5) << "trim segment " << ls->seq << "/" << ls->offset << ", not fully flushed yet, safe "
+    if (ls->end > journaler->get_write_safe_pos()) {
+      dout(5) << "trim segment " << ls->offset << ", not fully flushed yet, safe "
 	      << journaler->get_write_safe_pos() << " < end " << ls->end << dendl;
       break;
     }
     if (expiring_segments.count(ls)) {
-      dout(5) << "trim already expiring segment " << ls->seq << "/" << ls->offset
-	      << ", " << ls->num_events << " events" << dendl;
+      dout(5) << "trim already expiring segment " << ls->offset << ", " << ls->num_events << " events" << dendl;
     } else if (expired_segments.count(ls)) {
-      dout(5) << "trim already expired segment " << ls->seq << "/" << ls->offset
-	      << ", " << ls->num_events << " events" << dendl;
+      dout(5) << "trim already expired segment " << ls->offset << ", " << ls->num_events << " events" << dendl;
     } else {
-      assert(expiring_segments.count(ls) == 0);
-      expiring_segments.insert(ls);
-      expiring_events += ls->num_events;
-      submit_mutex.Unlock();
-
-      uint64_t last_seq = ls->seq;
       try_expire(ls, op_prio);
-
-      submit_mutex.Lock();
-      p = segments.lower_bound(last_seq + 1);
     }
   }
 
-  // discard expired segments and unlock submit_mutex
+  // discard expired segments
   _trim_expired_segments();
 }
 
 
 void MDLog::try_expire(LogSegment *ls, int op_prio)
 {
-  MDSGatherBuilder gather_bld(g_ceph_context);
+  C_GatherBuilder gather_bld(g_ceph_context);
   ls->try_to_expire(mds, gather_bld, op_prio);
-
   if (gather_bld.has_subs()) {
-    dout(5) << "try_expire expiring segment " << ls->seq << "/" << ls->offset << dendl;
+    assert(expiring_segments.count(ls) == 0);
+    expiring_segments.insert(ls);
+    expiring_events += ls->num_events;
+    dout(5) << "try_expire expiring segment " << ls->offset << dendl;
     gather_bld.set_finisher(new C_MaybeExpiredSegment(this, ls, op_prio));
     gather_bld.activate();
   } else {
-    dout(10) << "try_expire expired segment " << ls->seq << "/" << ls->offset << dendl;
-    submit_mutex.Lock();
-    assert(expiring_segments.count(ls));
-    expiring_segments.erase(ls);
-    expiring_events -= ls->num_events;
+    dout(10) << "try_expire expired segment " << ls->offset << dendl;
     _expired(ls);
-    submit_mutex.Unlock();
   }
   
   logger->set(l_mdl_segexg, expiring_segments.size());
@@ -587,27 +387,25 @@ void MDLog::try_expire(LogSegment *ls, int op_prio)
 
 void MDLog::_maybe_expired(LogSegment *ls, int op_prio)
 {
-  dout(10) << "_maybe_expired segment " << ls->seq << "/" << ls->offset
-	   << ", " << ls->num_events << " events" << dendl;
+  dout(10) << "_maybe_expired segment " << ls->offset << " " << ls->num_events << " events" << dendl;
+  assert(expiring_segments.count(ls));
+  expiring_segments.erase(ls);
+  expiring_events -= ls->num_events;
   try_expire(ls, op_prio);
 }
 
 void MDLog::_trim_expired_segments()
 {
-  assert(submit_mutex.is_locked_by_me());
-
   // trim expired segments?
   bool trimmed = false;
   while (!segments.empty()) {
     LogSegment *ls = segments.begin()->second;
     if (!expired_segments.count(ls)) {
-      dout(10) << "_trim_expired_segments waiting for " << ls->seq << "/" << ls->offset
-	       << " to expire" << dendl;
+      dout(10) << "_trim_expired_segments waiting for " << ls->offset << " to expire" << dendl;
       break;
     }
     
-    dout(10) << "_trim_expired_segments trimming expired "
-	     << ls->seq << "/" << ls->offset << dendl;
+    dout(10) << "_trim_expired_segments trimming expired " << ls->offset << dendl;
     expired_events -= ls->num_events;
     expired_segments.erase(ls);
     num_events -= ls->num_events;
@@ -620,27 +418,21 @@ void MDLog::_trim_expired_segments()
     logger->inc(l_mdl_segtrm);
     logger->inc(l_mdl_evtrm, ls->num_events);
     
-    segments.erase(ls->seq);
+    segments.erase(ls->offset);
     delete ls;
     trimmed = true;
   }
-
-  submit_mutex.Unlock();
-
+  
   if (trimmed)
     journaler->write_head(0);
 }
 
 void MDLog::_expired(LogSegment *ls)
 {
-  assert(submit_mutex.is_locked_by_me());
-
-  dout(5) << "_expired segment " << ls->seq << "/" << ls->offset
-	  << ", " << ls->num_events << " events" << dendl;
+  dout(5) << "_expired segment " << ls->offset << " " << ls->num_events << " events" << dendl;
 
   if (!capped && ls == peek_current_segment()) {
-    dout(5) << "_expired not expiring " << ls->seq << "/" << ls->offset
-	    << ", last one and !capped" << dendl;
+    dout(5) << "_expired not expiring " << ls->offset << ", last one and !capped" << dendl;
   } else {
     // expired.
     expired_segments.insert(ls);
@@ -658,7 +450,7 @@ void MDLog::_expired(LogSegment *ls)
 
 
 
-void MDLog::replay(MDSInternalContextBase *c)
+void MDLog::replay(Context *c)
 {
   assert(journaler->is_active());
   assert(journaler->is_readonly());
@@ -687,312 +479,21 @@ void MDLog::replay(MDSInternalContextBase *c)
   replay_thread.detach();
 }
 
-
-/**
- * Resolve the JournalPointer object to a journal file, and
- * instantiate a Journaler object.  This may re-write the journal
- * if the journal in RADOS appears to be in an old format.
- *
- * This is a separate thread because of the way it is initialized from inside
- * the mds lock, which is also the global objecter lock -- rather than split
- * it up into hard-to-read async operations linked up by contexts, 
- *
- * When this function completes, the `journaler` attribute will be set to
- * a Journaler instance using the latest available serialization format.
- */
-void MDLog::_recovery_thread(MDSInternalContextBase *completion)
-{
-  assert(journaler == NULL);
-  if (g_conf->mds_journal_format > JOURNAL_FORMAT_MAX) {
-      dout(0) << "Configuration value for mds_journal_format is out of bounds, max is "
-              << JOURNAL_FORMAT_MAX << dendl;
-      mds->suicide();
-  }
-
-  // First, read the pointer object.
-  // If the pointer object is not present, then create it with
-  // front = default ino and back = null
-  JournalPointer jp(mds->get_nodeid(), mds->mdsmap->get_metadata_pool());
-  int const read_result = jp.load(mds->objecter);
-  if (read_result == -ENOENT) {
-    inodeno_t const default_log_ino = MDS_INO_LOG_OFFSET + mds->get_nodeid();
-    jp.front = default_log_ino;
-    int write_result = jp.save(mds->objecter);
-    // Nothing graceful we can do for this
-    assert(write_result >= 0);
-  } else if (read_result != 0) {
-    // No graceful way of handling this: give up and leave it for support
-    // to work out why RADOS preventing access.
-    assert(0);
-  }
-
-  // If the back pointer is non-null, that means that a journal
-  // rewrite failed part way through.  Erase the back journal
-  // to clean up.
-  if (jp.back) {
-    if (mds->is_standby_replay()) {
-      dout(1) << "Journal " << jp.front << " is being rewritten, "
-        << "cannot replay in standby until an active MDS completes rewrite" << dendl;
-      completion->complete(-EAGAIN);
-      return;
-    }
-    dout(1) << "Erasing journal " << jp.back << dendl;
-    C_SaferCond erase_waiter;
-    Journaler back(jp.back, mds->mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC,
-        mds->objecter, logger, l_mdl_jlat, &mds->timer, &mds->finisher);
-
-    // Read all about this journal (header + extents)
-    C_SaferCond recover_wait;
-    back.recover(&recover_wait);
-    int recovery_result = recover_wait.wait();
-
-    // Journaler.recover succeeds if no journal objects are present: an error
-    // means something worse like a corrupt header, which we can't handle here.
-    assert(recovery_result == 0);
-    // We could read journal, so we can erase it.
-    back.erase(&erase_waiter);
-    int erase_result = erase_waiter.wait();
-
-    // If we are successful, or find no data, we can update the JournalPointer to
-    // reflect that the back journal is gone.
-    if (erase_result != 0 && erase_result != -ENOENT) {
-      derr << "Failed to erase journal " << jp.back << ": " << cpp_strerror(erase_result) << dendl;
-    } else {
-      dout(1) << "Successfully erased journal, updating journal pointer" << dendl;
-      jp.back = 0;
-      int write_result = jp.save(mds->objecter);
-      // Nothing graceful we can do for this
-      assert(write_result >= 0);
-    }
-  }
-
-  /* Read the header from the front journal */
-  Journaler *front_journal = new Journaler(jp.front, mds->mdsmap->get_metadata_pool(),
-      CEPH_FS_ONDISK_MAGIC, mds->objecter, logger, l_mdl_jlat, &mds->timer, &mds->finisher);
-  C_SaferCond recover_wait;
-  front_journal->recover(&recover_wait);
-  dout(4) << "Waiting for journal " << jp.front << " to recover..." << dendl;
-  int recovery_result = recover_wait.wait();
-  dout(4) << "Journal " << jp.front << " recovered." << dendl;
-
-  if (recovery_result != 0) {
-    derr << "Error recovering journal " << jp.front << ": " << cpp_strerror(recovery_result) << dendl;
-    mds->mds_lock.Lock();
-    completion->complete(recovery_result);
-    mds->mds_lock.Unlock();
-    return;
-  }
-
-  /* Check whether the front journal format is acceptable or needs re-write */
-  if (front_journal->get_stream_format() > JOURNAL_FORMAT_MAX) {
-    dout(0) << "Journal " << jp.front << " is in unknown format " << front_journal->get_stream_format()
-            << ", does this MDS daemon require upgrade?" << dendl;
-    mds->mds_lock.Lock();
-    completion->complete(-EINVAL);
-    mds->mds_lock.Unlock();
-  } else if (mds->is_standby_replay() || front_journal->get_stream_format() >= g_conf->mds_journal_format) {
-    /* The journal is of configured format, or we are in standbyreplay and will
-     * tolerate replaying old journals until we have to go active. Use front_journal as
-     * our journaler attribute and complete */
-    dout(4) << "Recovered journal " << jp.front << " in format " << front_journal->get_stream_format() << dendl;
-    journaler = front_journal;
-    journaler->set_write_error_handler(new C_MDL_WriteError(this));
-    mds->mds_lock.Lock();
-    completion->complete(0);
-    mds->mds_lock.Unlock();
-  } else {
-    /* Hand off to reformat routine, which will ultimately set the
-     * completion when it has done its thing */
-    dout(1) << "Journal " << jp.front << " has old format "
-      << front_journal->get_stream_format() << ", it will now be updated" << dendl;
-
-    _reformat_journal(jp, front_journal, completion);
-  }
-}
-
-/**
- * Blocking rewrite of the journal to a new file, followed by
- * swap of journal pointer to point to the new one.
- *
- * We write the new journal to the 'back' journal from the JournalPointer,
- * swapping pointers to make that one the front journal only when we have
- * safely completed.
- */
-void MDLog::_reformat_journal(JournalPointer const &jp_in, Journaler *old_journal, MDSInternalContextBase *completion)
-{
-  assert(!jp_in.is_null());
-  assert(completion != NULL);
-  assert(old_journal != NULL);
-
-  JournalPointer jp = jp_in;
-
-  /* Set JournalPointer.back to the location we will write the new journal */
-  inodeno_t primary_ino = MDS_INO_LOG_OFFSET + mds->get_nodeid();
-  inodeno_t secondary_ino = MDS_INO_LOG_BACKUP_OFFSET + mds->get_nodeid();
-  jp.back = (jp.front == primary_ino ? secondary_ino : primary_ino);
-  int write_result = jp.save(mds->objecter);
-  assert(write_result == 0);
-
-  /* Create the new Journaler file */
-  Journaler *new_journal = new Journaler(jp.back, mds->mdsmap->get_metadata_pool(),
-      CEPH_FS_ONDISK_MAGIC, mds->objecter, logger, l_mdl_jlat, &mds->timer, &mds->finisher);
-  dout(4) << "Writing new journal header " << jp.back << dendl;
-  ceph_file_layout new_layout = old_journal->get_layout();
-  new_journal->set_writeable();
-  new_journal->create(&new_layout, g_conf->mds_journal_format);
-
-  /* Write the new journal header to RADOS */
-  C_SaferCond write_head_wait;
-  new_journal->write_head(&write_head_wait);
-  write_head_wait.wait();
-
-  // Read in the old journal, and whenever we have readable events,
-  // write them to the new journal.
-  int r = 0;
-
-  // In old format journals before event_seq was introduced, the serialized
-  // offset of a SubtreeMap message in the log is used as the unique ID for
-  // a log segment.  Because we change serialization, this will end up changing
-  // for us, so we have to explicitly update the fields that point back to that
-  // log segment.
-  std::map<log_segment_seq_t, log_segment_seq_t> segment_pos_rewrite;
-
-  // The logic in here borrowed from replay_thread expects mds_lock to be held,
-  // e.g. between checking readable and doing wait_for_readable so that journaler
-  // state doesn't change in between.
-  uint32_t events_transcribed = 0;
-  while (1) {
-    while (!old_journal->is_readable() &&
-	   old_journal->get_read_pos() < old_journal->get_write_pos() &&
-	   !old_journal->get_error()) {
-
-      // Issue a journal prefetch
-      C_SaferCond readable_waiter;
-      old_journal->wait_for_readable(&readable_waiter);
-
-      // Wait for a journal prefetch to complete
-      readable_waiter.wait();
-    }
-    if (old_journal->get_error()) {
-      r = old_journal->get_error();
-      dout(0) << "_replay journaler got error " << r << ", aborting" << dendl;
-      break;
-    }
-
-    if (!old_journal->is_readable() &&
-	old_journal->get_read_pos() == old_journal->get_write_pos())
-      break;
-
-    // Read one serialized LogEvent
-    assert(old_journal->is_readable());
-    bufferlist bl;
-    uint64_t le_pos = old_journal->get_read_pos();
-    bool r = old_journal->try_read_entry(bl);
-    if (!r && old_journal->get_error())
-      continue;
-    assert(r);
-
-    // Update segment_pos_rewrite
-    LogEvent *le = LogEvent::decode(bl);
-    if (le) {
-      bool modified = false;
-
-      if (le->get_type() == EVENT_SUBTREEMAP ||
-          le->get_type() == EVENT_RESETJOURNAL) {
-        ESubtreeMap *sle = dynamic_cast<ESubtreeMap*>(le);
-        if (sle == NULL || sle->event_seq == 0) {
-          // A non-explicit event seq: the effective sequence number 
-          // of this segment is it's position in the old journal and
-          // the new effective sequence number will be its position
-          // in the new journal.
-          segment_pos_rewrite[le_pos] = new_journal->get_write_pos();
-          dout(20) << __func__ << " discovered segment seq mapping "
-            << le_pos << " -> " << new_journal->get_write_pos() << dendl;
-        }
-      } else {
-        event_seq++;
-      }
-
-      // Rewrite segment references if necessary
-      EMetaBlob *blob = le->get_metablob();
-      if (blob) {
-        modified = blob->rewrite_truncate_finish(mds, segment_pos_rewrite);
-      }
-
-      // Zero-out expire_pos in subtreemap because offsets have changed
-      // (expire_pos is just an optimization so it's safe to eliminate it)
-      if (le->get_type() == EVENT_SUBTREEMAP) {
-        dout(20) << __func__ << " zeroing expire_pos in subtreemap event at " << le_pos << dendl;
-        ESubtreeMap *sle = dynamic_cast<ESubtreeMap*>(le);
-        assert(sle != NULL);
-        sle->expire_pos = 0;
-        modified = true;
-      }
-
-      if (modified) {
-        bl.clear();
-        le->encode_with_header(bl);
-      }
-
-      delete le;
-    } else {
-      // Failure from LogEvent::decode, our job is to change the journal wrapper,
-      // not validate the contents, so pass it through.
-      dout(1) << __func__ << " transcribing un-decodable LogEvent at old position "
-        << old_journal->get_read_pos() << ", new position " << new_journal->get_write_pos()
-        << dendl;
-    }
-
-    // Write (buffered, synchronous) one serialized LogEvent
-    events_transcribed += 1;
-    new_journal->append_entry(bl);
+class C_MDL_Replay : public Context {
+  MDLog *mdlog;
+public:
+  C_MDL_Replay(MDLog *l) : mdlog(l) {}
+  void finish(int r) { 
+    mdlog->replay_cond.Signal();
   }
+};
 
-  dout(1) << "Transcribed " << events_transcribed << " events, flushing new journal" << dendl;
-  C_SaferCond flush_waiter;
-  new_journal->flush(&flush_waiter);
-  flush_waiter.wait();
-
-  // If failed to rewrite journal, leave the part written journal
-  // as garbage to be cleaned up next startup.
-  assert(r == 0);
-
-  /* Now that the new journal is safe, we can flip the pointers */
-  inodeno_t const tmp = jp.front;
-  jp.front = jp.back;
-  jp.back = tmp;
-  write_result = jp.save(mds->objecter);
-  assert(write_result == 0);
-
-  /* Delete the old journal to free space */
-  dout(1) << "New journal flushed, erasing old journal" << dendl;
-  C_SaferCond erase_waiter;
-  old_journal->erase(&erase_waiter);
-  int erase_result = erase_waiter.wait();
-  assert(erase_result == 0);
-  delete old_journal;
-
-  /* Update the pointer to reflect we're back in clean single journal state. */
-  jp.back = 0;
-  write_result = jp.save(mds->objecter);
-  assert(write_result == 0);
-
-  /* Reset the Journaler object to its default state */
-  dout(1) << "Journal rewrite complete, continuing with normal startup" << dendl;
-  journaler = new_journal;
-  journaler->set_readonly();
-  journaler->set_write_error_handler(new C_MDL_WriteError(this));
-
-  /* Trigger completion */
-  mds->mds_lock.Lock();
-  completion->complete(0);
-  mds->mds_lock.Unlock();
-}
 
 
 // i am a separate thread
 void MDLog::_replay_thread()
 {
+  mds->mds_lock.Lock();
   dout(10) << "_replay_thread start" << dendl;
 
   // loop
@@ -1002,9 +503,8 @@ void MDLog::_replay_thread()
     while (!journaler->is_readable() &&
 	   journaler->get_read_pos() < journaler->get_write_pos() &&
 	   !journaler->get_error()) {
-      C_SaferCond readable_waiter;
-      journaler->wait_for_readable(&readable_waiter);
-      readable_waiter.wait();
+      journaler->wait_for_readable(new C_MDL_Replay(this));
+      replay_cond.Wait(mds->mds_lock);
     }
     if (journaler->get_error()) {
       r = journaler->get_error();
@@ -1025,21 +525,22 @@ void MDLog::_replay_thread()
            * the MDS is going to either shut down or restart when
            * we return this error, doing it synchronously is fine
            * -- as long as we drop the main mds lock--. */
-          C_SaferCond reread_fin;
-          journaler->reread_head(&reread_fin);
-          int err = reread_fin.wait();
-          if (err) {
-            if (err == -ENOENT && mds->is_standby_replay()) {
-              r = -EAGAIN;
-              dout(1) << "Journal header went away while in standby replay, journal rewritten?"
-                      << dendl;
-              break;
-            } else {
-                dout(0) << "got error while reading head: " << cpp_strerror(err)
-                        << dendl;
-                mds->suicide();
-            }
+          Mutex mylock("MDLog::_replay_thread lock");
+          Cond cond;
+          bool done = false;
+          int err = 0;
+          journaler->reread_head(new C_SafeCond(&mylock, &cond, &done, &err));
+          mds->mds_lock.Unlock();
+	  mylock.Lock();
+          while (!done)
+            cond.Wait(mylock);
+	  mylock.Unlock();
+          if (err) { // well, crap
+            dout(0) << "got error while reading head: " << cpp_strerror(err)
+                    << dendl;
+            mds->suicide();
           }
+          mds->mds_lock.Lock();
 	  standby_trim_segments();
           if (journaler->get_read_pos() < journaler->get_expire_pos()) {
             dout(0) << "expire_pos is higher than read_pos, returning EAGAIN" << dendl;
@@ -1081,15 +582,8 @@ void MDLog::_replay_thread()
     // new segment?
     if (le->get_type() == EVENT_SUBTREEMAP ||
 	le->get_type() == EVENT_RESETJOURNAL) {
-      ESubtreeMap *sle = dynamic_cast<ESubtreeMap*>(le);
-      if (sle && sle->event_seq > 0)
-	event_seq = sle->event_seq;
-      else
-	event_seq = pos;
-      segments[event_seq] = new LogSegment(event_seq, pos);
+      segments[pos] = new LogSegment(pos);
       logger->set(l_mdl_seg, segments.size());
-    } else {
-      event_seq++;
     }
 
     // have we seen an import map yet?
@@ -1104,13 +598,15 @@ void MDLog::_replay_thread()
       le->_segment->end = journaler->get_read_pos();
       num_events++;
 
-      mds->mds_lock.Lock();
       le->replay(mds);
-      mds->mds_lock.Unlock();
     }
     delete le;
 
     logger->set(l_mdl_rdpos, pos);
+
+    // drop lock for a second, so other events/messages (e.g. beacon timer!) can go off
+    mds->mds_lock.Unlock();
+    mds->mds_lock.Lock();
   }
 
   // done!
@@ -1123,11 +619,10 @@ void MDLog::_replay_thread()
   }
 
   dout(10) << "_replay_thread kicking waiters" << dendl;
-  mds->mds_lock.Lock();
   finish_contexts(g_ceph_context, waitfor_replay, r);  
-  mds->mds_lock.Unlock();
 
   dout(10) << "_replay_thread finish" << dendl;
+  mds->mds_lock.Unlock();
 }
 
 void MDLog::standby_trim_segments()
@@ -1140,8 +635,16 @@ void MDLog::standby_trim_segments()
     LogSegment *seg = get_oldest_segment();
     if (seg->end > expire_pos)
       break;
-    dout(10) << " removing segment " << seg->seq << "/" << seg->offset << dendl;
-    mds->mdcache->standby_trim_segment(seg);
+    dout(10) << " removing segment " << seg->offset << dendl;
+    seg->dirty_dirfrags.clear_list();
+    seg->new_dirfrags.clear_list();
+    seg->dirty_inodes.clear_list();
+    seg->dirty_dentries.clear_list();
+    seg->open_files.clear_list();
+    seg->dirty_parent_inodes.clear_list();
+    seg->dirty_dirfrag_dir.clear_list();
+    seg->dirty_dirfrag_nest.clear_list();
+    seg->dirty_dirfrag_dirfragtree.clear_list();
     remove_oldest_segment();
     removed_segment = true;
   }
diff --git a/src/mds/MDLog.h b/src/mds/MDLog.h
index 2d00ed2..6e8e980 100644
--- a/src/mds/MDLog.h
+++ b/src/mds/MDLog.h
@@ -48,7 +48,6 @@ enum {
 #include <list>
 
 class Journaler;
-class JournalPointer;
 class LogEvent;
 class MDS;
 class LogSegment;
@@ -59,8 +58,6 @@ class PerfCounters;
 #include <map>
 using std::map;
 
-#include "common/Finisher.h"
-
 
 class MDLog {
 public:
@@ -72,8 +69,6 @@ protected:
 
   bool capped;
 
-  bool stopping;
-
   inodeno_t ino;
   Journaler *journaler;
 
@@ -81,6 +76,8 @@ protected:
 
 
   // -- replay --
+  Cond replay_cond;
+
   class ReplayThread : public Thread {
     MDLog *log;
   public:
@@ -95,62 +92,26 @@ protected:
   friend class ReplayThread;
   friend class C_MDL_Replay;
 
-  list<MDSInternalContextBase*> waitfor_replay;
+  list<Context*> waitfor_replay;
 
   void _replay();         // old way
   void _replay_thread();  // new way
 
-  // Journal recovery/rewrite logic
-  class RecoveryThread : public Thread {
-    MDLog *log;
-    MDSInternalContextBase *completion;
-  public:
-    void set_completion(MDSInternalContextBase *c) {completion = c;}
-    RecoveryThread(MDLog *l) : log(l), completion(NULL) {}
-    void* entry() {
-      log->_recovery_thread(completion);
-      return 0;
-    }
-  } recovery_thread;
-  void _recovery_thread(MDSInternalContextBase *completion);
-  void _reformat_journal(JournalPointer const &jp, Journaler *old_journal, MDSInternalContextBase *completion);
 
   // -- segments --
   map<uint64_t,LogSegment*> segments;
   set<LogSegment*> expiring_segments;
   set<LogSegment*> expired_segments;
-  uint64_t event_seq;
   int expiring_events;
   int expired_events;
 
-  struct PendingEvent {
-    LogEvent *le;
-    MDSInternalContextBase *fin;
-    bool flush;
-    PendingEvent(LogEvent *e, MDSInternalContextBase *c, bool f=false) : le(e), fin(c), flush(f) {}
-  };
-
-  map<uint64_t,list<PendingEvent> > pending_events; // log segment -> event list
-  Mutex submit_mutex;
-  Cond submit_cond;
-
-  void _submit_thread();
-  class SubmitThread : public Thread {
-    MDLog *log;
-  public:
-    SubmitThread(MDLog *l) : log(l) {}
-    void* entry() {
-      log->_submit_thread();
-      return 0;
-    }
-  } submit_thread;
-  friend class SubmitThread;
-
   // -- subtreemaps --
   friend class ESubtreeMap;
+  friend class C_MDS_WroteImportMap;
   friend class MDCache;
 
-  uint64_t get_last_segment_seq() {
+public:
+  uint64_t get_last_segment_offset() {
     assert(!segments.empty());
     return segments.rbegin()->first;
   }
@@ -163,6 +124,19 @@ protected:
     segments.erase(p);
   }
 
+
+private:
+  void init_journaler();
+
+  struct C_MDL_WriteError : public Context {
+    MDLog *mdlog;
+    C_MDL_WriteError(MDLog *m) : mdlog(m) {}
+    void finish(int r) {
+      mdlog->handle_journaler_write_error(r);
+    }
+  };
+  void handle_journaler_write_error(int r);
+ 
 public:
   void create_logger();
   
@@ -176,40 +150,19 @@ public:
 		  num_events(0), 
 		  unflushed(0),
 		  capped(false),
-		  stopping(false),
 		  journaler(0),
 		  logger(0),
 		  replay_thread(this),
 		  already_replayed(false),
-		  recovery_thread(this),
-		  event_seq(0), expiring_events(0), expired_events(0),
-		  submit_mutex("MDLog::submit_mutex"),
-		  submit_thread(this),
+		  expiring_events(0), expired_events(0),
 		  cur_event(NULL) { }		  
   ~MDLog();
 
 
-private:
   // -- segments --
-  void _start_new_segment();
-  void _prepare_new_segment();
-  void _journal_segment_subtree_map(MDSInternalContextBase *onsync);
-public:
-  void start_new_segment() {
-    Mutex::Locker l(submit_mutex);
-    _start_new_segment();
-  }
-  void prepare_new_segment() {
-    Mutex::Locker l(submit_mutex);
-    _prepare_new_segment();
-  }
-  void journal_segment_subtree_map(MDSInternalContextBase *onsync=NULL) {
-    submit_mutex.Lock();
-    _journal_segment_subtree_map(onsync);
-    submit_mutex.Unlock();
-    if (onsync)
-      flush();
-  }
+  void start_new_segment(Context *onsync=0);
+  void prepare_new_segment();
+  void journal_segment_subtree_map();
 
   LogSegment *peek_current_segment() {
     return segments.empty() ? NULL : segments.rbegin()->second;
@@ -220,9 +173,9 @@ public:
     return segments.rbegin()->second;
   }
 
-  LogSegment *get_segment(log_segment_seq_t seq) {
-    if (segments.count(seq))
-      return segments[seq];
+  LogSegment *get_segment(uint64_t off) {
+    if (segments.count(off))
+      return segments[off];
     return NULL;
   }
 
@@ -232,8 +185,8 @@ public:
 
   void flush_logger();
 
-  size_t get_num_events() const { return num_events; }
-  size_t get_num_segments() const { return segments.size(); }
+  size_t get_num_events() { return num_events; }
+  size_t get_num_segments() { return segments.size(); }  
 
   uint64_t get_read_pos();
   uint64_t get_write_pos();
@@ -244,45 +197,31 @@ public:
   bool is_capped() { return capped; }
   void cap();
 
-  void shutdown();
-
   // -- events --
 private:
   LogEvent *cur_event;
 public:
-  void _start_entry(LogEvent *e);
-  void start_entry(LogEvent *e) {
-    Mutex::Locker l(submit_mutex);
-    _start_entry(e);
-  }
-  void cancel_entry(LogEvent *e);
-  void _submit_entry(LogEvent *e, MDSInternalContextBase *c);
-  void submit_entry(LogEvent *e, MDSInternalContextBase *c = 0) {
-    Mutex::Locker l(submit_mutex);
-    _submit_entry(e, c);
-    submit_cond.Signal();
-  }
-  void start_submit_entry(LogEvent *e, MDSInternalContextBase *c = 0) {
-    Mutex::Locker l(submit_mutex);
-    _start_entry(e);
-    _submit_entry(e, c);
-    submit_cond.Signal();
+  void start_entry(LogEvent *e);
+  void submit_entry(LogEvent *e, Context *c = 0);
+  void start_submit_entry(LogEvent *e, Context *c = 0) {
+    start_entry(e);
+    submit_entry(e, c);
   }
   bool entry_is_open() { return cur_event != NULL; }
 
-  void wait_for_safe( MDSInternalContextBase *c );
+  void wait_for_safe( Context *c );
   void flush();
   bool is_flushed() {
     return unflushed == 0;
   }
 
 private:
-  class C_MaybeExpiredSegment : public MDSInternalContext {
+  class C_MaybeExpiredSegment : public Context {
     MDLog *mdlog;
     LogSegment *ls;
     int op_prio;
   public:
-    C_MaybeExpiredSegment(MDLog *mdl, LogSegment *s, int p) : MDSInternalContext(mdl->mds), mdlog(mdl), ls(s), op_prio(p) {}
+    C_MaybeExpiredSegment(MDLog *mdl, LogSegment *s, int p) : mdlog(mdl), ls(s), op_prio(p) {}
     void finish(int res) {
       mdlog->_maybe_expired(ls, op_prio);
     }
@@ -297,14 +236,13 @@ public:
   void trim(int max=-1);
 
 private:
-  void write_head(MDSInternalContextBase *onfinish);
+  void write_head(Context *onfinish);
 
 public:
-  void create(MDSInternalContextBase *onfinish);  // fresh, empty log! 
-  void open(MDSInternalContextBase *onopen);      // append() or replay() to follow!
-  void reopen(MDSInternalContextBase *onopen);
+  void create(Context *onfinish);  // fresh, empty log! 
+  void open(Context *onopen);      // append() or replay() to follow!
   void append();
-  void replay(MDSInternalContextBase *onfinish);
+  void replay(Context *onfinish);
 
   void standby_trim_segments();
 };
diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc
index 5661fb5..4509cea 100644
--- a/src/mds/MDS.cc
+++ b/src/mds/MDS.cc
@@ -23,9 +23,11 @@
 #include "common/ceph_argparse.h"
 #include "common/errno.h"
 
+
 #include "msg/Messenger.h"
 #include "mon/MonClient.h"
 
+#include "osd/OSDMap.h"
 #include "osdc/Objecter.h"
 #include "osdc/Filer.h"
 #include "osdc/Journaler.h"
@@ -40,13 +42,13 @@
 #include "MDBalancer.h"
 #include "Migrator.h"
 
+#include "AnchorServer.h"
+#include "AnchorClient.h"
 #include "SnapServer.h"
 #include "SnapClient.h"
 
 #include "InoTable.h"
 
-#include "common/HeartbeatMap.h"
-
 #include "common/perf_counters.h"
 
 #include "common/Timer.h"
@@ -58,6 +60,8 @@
 
 #include "messages/MGenericMessage.h"
 
+#include "messages/MOSDMap.h"
+
 #include "messages/MClientRequest.h"
 #include "messages/MClientRequestForward.h"
 
@@ -79,13 +83,12 @@
 #define dout_prefix *_dout << "mds." << whoami << '.' << incarnation << ' '
 
 
+
 // cons/des
 MDS::MDS(const std::string &n, Messenger *m, MonClient *mc) : 
   Dispatcher(m->cct),
   mds_lock("MDS::mds_lock"),
   timer(m->cct, mds_lock),
-  hb(NULL),
-  beacon(m->cct, mc, n),
   authorize_handler_cluster_registry(new AuthAuthorizeHandlerRegistry(m->cct,
 								      m->cct->_conf->auth_supported.length() ?
 								      m->cct->_conf->auth_supported :
@@ -97,33 +100,25 @@ MDS::MDS(const std::string &n, Messenger *m, MonClient *mc) :
   name(n),
   whoami(-1), incarnation(0),
   standby_for_rank(MDSMap::MDS_NO_STANDBY_PREF),
-  standby_type(MDSMap::STATE_NULL),
+  standby_type(0),
   standby_replaying(false),
   messenger(m),
   monc(mc),
-  log_client(m->cct, messenger, &mc->monmap, LogClient::NO_FLAGS),
-  op_tracker(cct, m->cct->_conf->mds_enable_op_tracker, 
-                     m->cct->_conf->osd_num_op_tracker_shard),
-  finisher(cct),
-  sessionmap(this),
-  progress_thread(this),
-  asok_hook(NULL)
-{
-
-  hb = cct->get_heartbeat_map()->add_worker("MDS");
+  clog(m->cct, messenger, &mc->monmap, LogClient::NO_FLAGS),
+  sessionmap(this) {
 
   orig_argc = 0;
   orig_argv = NULL;
 
   last_tid = 0;
 
-  clog = log_client.create_channel();
-
   monc->set_messenger(messenger);
 
   mdsmap = new MDSMap;
+  osdmap = new OSDMap;
 
-  objecter = new Objecter(m->cct, messenger, monc, 0, 0);
+  objecter = new Objecter(m->cct, messenger, monc, osdmap, mds_lock, timer,
+			  0, 0);
   objecter->unset_honor_osdmap_full();
 
   filer = new Filer(objecter);
@@ -135,6 +130,8 @@ MDS::MDS(const std::string &n, Messenger *m, MonClient *mc) :
   inotable = new InoTable(this);
   snapserver = new SnapServer(this);
   snapclient = new SnapClient(this);
+  anchorserver = new AnchorServer(this);
+  anchorclient = new AnchorClient(this);
 
   server = new Server(this);
   locker = new Locker(this, mdcache);
@@ -144,6 +141,11 @@ MDS::MDS(const std::string &n, Messenger *m, MonClient *mc) :
   // clients
   last_client_mdsmap_bcast = 0;
   
+  // beacon
+  beacon_last_seq = 0;
+  beacon_sender = 0;
+  was_laggy = false;
+
   // tick
   tick_event = 0;
 
@@ -153,10 +155,6 @@ MDS::MDS(const std::string &n, Messenger *m, MonClient *mc) :
 
   logger = 0;
   mlogger = 0;
-  op_tracker.set_complaint_and_threshold(m->cct->_conf->mds_op_complaint_time,
-                                         m->cct->_conf->mds_op_log_threshold);
-  op_tracker.set_history_size_and_duration(m->cct->_conf->mds_op_history_size,
-                                           m->cct->_conf->mds_op_history_duration);
 }
 
 MDS::~MDS() {
@@ -169,8 +167,11 @@ MDS::~MDS() {
   if (mdlog) { delete mdlog; mdlog = NULL; }
   if (balancer) { delete balancer; balancer = NULL; }
   if (inotable) { delete inotable; inotable = NULL; }
+  if (anchorserver) { delete anchorserver; anchorserver = NULL; }
   if (snapserver) { delete snapserver; snapserver = NULL; }
   if (snapclient) { delete snapclient; snapclient = NULL; }
+  if (anchorclient) { delete anchorclient; anchorclient = NULL; }
+  if (osdmap) { delete osdmap; osdmap = 0; }
   if (mdsmap) { delete mdsmap; mdsmap = 0; }
 
   if (server) { delete server; server = 0; }
@@ -192,167 +193,6 @@ MDS::~MDS() {
   
   if (messenger)
     delete messenger;
-
-  if (hb) {
-    cct->get_heartbeat_map()->remove_worker(hb);
-  }
-}
-
-class MDSSocketHook : public AdminSocketHook {
-  MDS *mds;
-public:
-  MDSSocketHook(MDS *m) : mds(m) {}
-  bool call(std::string command, cmdmap_t& cmdmap, std::string format,
-	    bufferlist& out) {
-    stringstream ss;
-    bool r = mds->asok_command(command, cmdmap, format, ss);
-    out.append(ss);
-    return r;
-  }
-};
-
-bool MDS::asok_command(string command, cmdmap_t& cmdmap, string format,
-		    ostream& ss)
-{
-  dout(1) << "asok_command: " << command << dendl;
-
-  Formatter *f = new_formatter(format);
-  if (!f)
-    f = new_formatter("json-pretty");
-  if (command == "status") {
-    f->open_object_section("status");
-    f->dump_stream("cluster_fsid") << monc->get_fsid();
-    f->dump_unsigned("whoami", whoami);
-    f->dump_string("state", ceph_mds_state_name(get_state()));
-    f->dump_unsigned("mdsmap_epoch", mdsmap->get_epoch());
-    f->close_section(); // status
-  } else if (command == "dump_ops_in_flight") {
-    op_tracker.dump_ops_in_flight(f);
-  } else if (command == "dump_historic_ops") {
-    op_tracker.dump_historic_ops(f);
-  } else if (command == "session ls") {
-    mds_lock.Lock();
-
-    heartbeat_reset();
-
-    // Dump sessions, decorated with recovery/replay status
-    f->open_array_section("sessions");
-    const ceph::unordered_map<entity_name_t, Session*> session_map = sessionmap.get_sessions();
-    for (ceph::unordered_map<entity_name_t,Session*>::const_iterator p = session_map.begin();
-         p != session_map.end();
-         ++p)  {
-      if (!p->first.is_client()) {
-        continue;
-      }
-
-      Session *s = p->second;
-
-      f->open_object_section("session");
-      f->dump_int("id", p->first.num());
-
-      f->dump_int("num_leases", s->leases.size());
-      f->dump_int("num_caps", s->caps.size());
-
-      f->dump_string("state", s->get_state_name());
-      f->dump_int("replay_requests", is_clientreplay() ? s->get_request_count() : 0);
-      f->dump_bool("reconnecting", server->waiting_for_reconnect(p->first.num()));
-      f->dump_stream("inst") << s->info.inst;
-      f->open_object_section("client_metadata");
-      for (map<string, string>::const_iterator i = s->info.client_metadata.begin();
-          i != s->info.client_metadata.end(); ++i) {
-        f->dump_string(i->first.c_str(), i->second);
-      }
-      f->close_section(); // client_metadata
-      f->close_section(); //session
-    }
-    f->close_section(); //sessions
-
-    mds_lock.Unlock();
-  } else if (command == "session evict") {
-    std::string client_id;
-    const bool got_arg = cmd_getval(g_ceph_context, cmdmap, "client_id", client_id);
-    assert(got_arg == true);
-
-    mds_lock.Lock();
-    Session *session = sessionmap.get_session(entity_name_t(CEPH_ENTITY_TYPE_CLIENT,
-							    strtol(client_id.c_str(), 0, 10)));
-    if (session) {
-      C_SaferCond on_safe;
-      server->kill_session(session, &on_safe);
-
-      mds_lock.Unlock();
-      on_safe.wait();
-    } else {
-      dout(15) << "session " << session << " not in sessionmap!" << dendl;
-      mds_lock.Unlock();
-    }
-  }
-  f->flush(ss);
-  delete f;
-  return true;
-}
-
-void MDS::set_up_admin_socket()
-{
-  int r;
-  AdminSocket *admin_socket = g_ceph_context->get_admin_socket();
-  asok_hook = new MDSSocketHook(this);
-  r = admin_socket->register_command("status", "status", asok_hook,
-				     "high-level status of MDS");
-  assert(0 == r);
-  r = admin_socket->register_command("dump_ops_in_flight",
-				     "dump_ops_in_flight", asok_hook,
-				     "show the ops currently in flight");
-  assert(0 == r);
-  r = admin_socket->register_command("dump_historic_ops", "dump_historic_ops",
-				     asok_hook,
-				     "show slowest recent ops");
-  assert(0 == r);
-  r = admin_socket->register_command("session evict",
-				     "session evict name=client_id,type=CephString",
-				     asok_hook,
-				     "Evict a CephFS client");
-  assert(0 == r);
-  r = admin_socket->register_command("session ls",
-				     "session ls",
-				     asok_hook,
-				     "Enumerate connected CephFS clients");
-  assert(0 == r);
-}
-
-void MDS::clean_up_admin_socket()
-{
-  AdminSocket *admin_socket = g_ceph_context->get_admin_socket();
-  admin_socket->unregister_command("status");
-  admin_socket->unregister_command("dump_ops_in_flight");
-  admin_socket->unregister_command("dump_historic_ops");
-  delete asok_hook;
-  asok_hook = NULL;
-}
-
-const char** MDS::get_tracked_conf_keys() const
-{
-  static const char* KEYS[] = {
-    "mds_op_complaint_time", "mds_op_log_threshold",
-    "mds_op_history_size", "mds_op_history_duration",
-    NULL
-  };
-  return KEYS;
-}
-
-void MDS::handle_conf_change(const struct md_config_t *conf,
-			     const std::set <std::string> &changed)
-{
-  if (changed.count("mds_op_complaint_time") ||
-      changed.count("mds_op_log_threshold")) {
-    op_tracker.set_complaint_and_threshold(conf->mds_op_complaint_time,
-                                           conf->mds_op_log_threshold);
-  }
-  if (changed.count("mds_op_history_size") ||
-      changed.count("mds_op_history_duration")) {
-    op_tracker.set_history_size_and_duration(conf->mds_op_history_size,
-                                             conf->mds_op_history_duration);
-  }
 }
 
 void MDS::create_logger()
@@ -361,41 +201,61 @@ void MDS::create_logger()
   {
     PerfCountersBuilder mds_plb(g_ceph_context, "mds", l_mds_first, l_mds_last);
 
-    mds_plb.add_u64_counter(l_mds_request, "request");
+    mds_plb.add_u64_counter(l_mds_req, "req"); // FIXME: nobody is actually setting this
     mds_plb.add_u64_counter(l_mds_reply, "reply");
-    mds_plb.add_time_avg(l_mds_reply_latency, "reply_latency");
-    mds_plb.add_u64_counter(l_mds_forward, "forward");
+    mds_plb.add_time_avg(l_mds_replyl, "replyl");
+    mds_plb.add_u64_counter(l_mds_fw, "fw");
     
-    mds_plb.add_u64_counter(l_mds_dir_fetch, "dir_fetch");
-    mds_plb.add_u64_counter(l_mds_dir_commit, "dir_commit");
-    mds_plb.add_u64_counter(l_mds_dir_split, "dir_split");
-
-    mds_plb.add_u64(l_mds_inode_max, "inode_max");
-    mds_plb.add_u64(l_mds_inodes, "inodes");
-    mds_plb.add_u64(l_mds_inodes_top, "inodes_top");
-    mds_plb.add_u64(l_mds_inodes_bottom, "inodes_bottom");
-    mds_plb.add_u64(l_mds_inodes_pin_tail, "inodes_pin_tail");  
-    mds_plb.add_u64(l_mds_inodes_pinned, "inodes_pinned");
-    mds_plb.add_u64_counter(l_mds_inodes_expired, "inodes_expired");
-    mds_plb.add_u64_counter(l_mds_inodes_with_caps, "inodes_with_caps");
-    mds_plb.add_u64_counter(l_mds_caps, "caps");
-    mds_plb.add_u64(l_mds_subtrees, "subtrees");
+    mds_plb.add_u64_counter(l_mds_dir_f, "dir_f");
+    mds_plb.add_u64_counter(l_mds_dir_c, "dir_c");
+    mds_plb.add_u64_counter(l_mds_dir_sp, "dir_sp");
+    mds_plb.add_u64_counter(l_mds_dir_ffc, "dir_ffc");
+    //mds_plb.add_u64_counter("mkdir");
+
+    /*
+    mds_plb.add_u64_counter("newin"); // new inodes (pre)loaded
+    mds_plb.add_u64_counter("newt");  // inodes first touched/used
+    mds_plb.add_u64_counter("outt");  // trimmed touched
+    mds_plb.add_u64_counter("outut"); // trimmed untouched (wasted effort)
+    mds_plb.add_fl_avg("oututl"); // avg trim latency for untouched
+
+    mds_plb.add_u64_counter("dirt1");
+    mds_plb.add_u64_counter("dirt2");
+    mds_plb.add_u64_counter("dirt3");
+    mds_plb.add_u64_counter("dirt4");
+    mds_plb.add_u64_counter("dirt5");
+    */
+
+    mds_plb.add_u64(l_mds_imax, "imax");
+    mds_plb.add_u64(l_mds_i, "i");
+    mds_plb.add_u64(l_mds_itop, "itop");
+    mds_plb.add_u64(l_mds_ibot, "ibot");
+    mds_plb.add_u64(l_mds_iptail, "iptail");  
+    mds_plb.add_u64(l_mds_ipin, "ipin");
+    mds_plb.add_u64_counter(l_mds_iex, "iex");
+    mds_plb.add_u64_counter(l_mds_icap, "icap");
+    mds_plb.add_u64_counter(l_mds_cap, "cap");
     
-    mds_plb.add_u64_counter(l_mds_traverse, "traverse"); 
-    mds_plb.add_u64_counter(l_mds_traverse_hit, "traverse_hit");
-    mds_plb.add_u64_counter(l_mds_traverse_forward, "traverse_forward");
-    mds_plb.add_u64_counter(l_mds_traverse_discover, "traverse_discover");
-    mds_plb.add_u64_counter(l_mds_traverse_dir_fetch, "traverse_dir_fetch");
-    mds_plb.add_u64_counter(l_mds_traverse_remote_ino, "traverse_remote_ino");
-    mds_plb.add_u64_counter(l_mds_traverse_lock, "traverse_lock");
+    mds_plb.add_u64_counter(l_mds_dis, "dis"); // FIXME: unused
+
+    mds_plb.add_u64_counter(l_mds_t, "t"); 
+    mds_plb.add_u64_counter(l_mds_thit, "thit");
+    mds_plb.add_u64_counter(l_mds_tfw, "tfw");
+    mds_plb.add_u64_counter(l_mds_tdis, "tdis");
+    mds_plb.add_u64_counter(l_mds_tdirf, "tdirf");
+    mds_plb.add_u64_counter(l_mds_trino, "trino");
+    mds_plb.add_u64_counter(l_mds_tlock, "tlock");
     
-    mds_plb.add_u64(l_mds_load_cent, "load_cent");
-    mds_plb.add_u64(l_mds_dispatch_queue_len, "q");
+    mds_plb.add_u64(l_mds_l, "l");
+    mds_plb.add_u64(l_mds_q, "q");
+    mds_plb.add_u64(l_mds_popanyd, "popanyd"); // FIXME: unused
+    mds_plb.add_u64(l_mds_popnest, "popnest");
     
-    mds_plb.add_u64_counter(l_mds_exported, "exported");
-    mds_plb.add_u64_counter(l_mds_exported_inodes, "exported_inodes");
-    mds_plb.add_u64_counter(l_mds_imported, "imported");
-    mds_plb.add_u64_counter(l_mds_imported_inodes, "imported_inodes");
+    mds_plb.add_u64(l_mds_sm, "sm");
+    mds_plb.add_u64_counter(l_mds_ex, "ex");
+    mds_plb.add_u64_counter(l_mds_iexp, "iexp");
+    mds_plb.add_u64_counter(l_mds_im, "im");
+    mds_plb.add_u64_counter(l_mds_iim, "iim");
     logger = mds_plb.create_perf_counters();
     g_ceph_context->get_perfcounters_collection()->add(logger);
   }
@@ -431,7 +291,7 @@ void MDS::create_logger()
 MDSTableClient *MDS::get_table_client(int t)
 {
   switch (t) {
-  case TABLE_ANCHOR: return NULL;
+  case TABLE_ANCHOR: return anchorclient;
   case TABLE_SNAP: return snapclient;
   default: assert(0);
   }
@@ -440,7 +300,7 @@ MDSTableClient *MDS::get_table_client(int t)
 MDSTableServer *MDS::get_table_server(int t)
 {
   switch (t) {
-  case TABLE_ANCHOR: return NULL;
+  case TABLE_ANCHOR: return anchorserver;
   case TABLE_SNAP: return snapserver;
   default: assert(0);
   }
@@ -456,7 +316,7 @@ MDSTableServer *MDS::get_table_server(int t)
 void MDS::send_message(Message *m, Connection *c)
 { 
   assert(c);
-  c->send_message(m);
+  messenger->send_message(m, c);
 }
 
 
@@ -555,7 +415,7 @@ void MDS::send_message_client_counted(Message *m, Session *session)
   dout(10) << "send_message_client_counted " << session->info.inst.name << " seq "
 	   << seq << " " << *m << dendl;
   if (session->connection) {
-    session->connection->send_message(m);
+    messenger->send_message(m, session->connection);
   } else {
     session->preopen_out_queue.push_back(m);
   }
@@ -564,14 +424,14 @@ void MDS::send_message_client_counted(Message *m, Session *session)
 void MDS::send_message_client(Message *m, Session *session)
 {
   dout(10) << "send_message_client " << session->info.inst << " " << *m << dendl;
-  if (session->connection) {
-    session->connection->send_message(m);
+ if (session->connection) {
+    messenger->send_message(m, session->connection);
   } else {
     session->preopen_out_queue.push_back(m);
   }
 }
 
-int MDS::init(MDSMap::DaemonState wanted_state)
+int MDS::init(int wanted_state)
 {
   dout(10) << sizeof(MDSCacheObject) << "\tMDSCacheObject" << dendl;
   dout(10) << sizeof(CInode) << "\tCInode" << dendl;
@@ -592,10 +452,6 @@ int MDS::init(MDSMap::DaemonState wanted_state)
   dout(10) << sizeof(Capability) << "\tCapability " << dendl;
   dout(10) << sizeof(xlist<void*>::item) << "\t xlist<>::item   *2=" << 2*sizeof(xlist<void*>::item) << dendl;
 
-  objecter->init();
-
-  messenger->add_dispatcher_tail(objecter);
-  messenger->add_dispatcher_tail(&beacon);
   messenger->add_dispatcher_tail(this);
 
   // get monmap
@@ -604,10 +460,8 @@ int MDS::init(MDSMap::DaemonState wanted_state)
   monc->set_want_keys(CEPH_ENTITY_TYPE_MON | CEPH_ENTITY_TYPE_OSD | CEPH_ENTITY_TYPE_MDS);
   monc->init();
 
-  finisher.start();
-
   // tell monc about log_client so it will know about mon session resets
-  monc->set_log_client(&log_client);
+  monc->set_log_client(&clog);
   
   int r = monc->authenticate();
   if (r < 0) {
@@ -620,7 +474,7 @@ int MDS::init(MDSMap::DaemonState wanted_state)
   while (monc->wait_auth_rotating(30.0) < 0) {
     derr << "unable to obtain rotating service keys; retrying" << dendl;
   }
-  objecter->start();
+  objecter->init_unlocked();
 
   mds_lock.Lock();
   if (want_state == CEPH_MDS_STATE_DNE) {
@@ -628,6 +482,8 @@ int MDS::init(MDSMap::DaemonState wanted_state)
     return 0;
   }
 
+  objecter->init_locked();
+
   monc->sub_want("mdsmap", 0, 0);
   monc->renew_subs();
 
@@ -637,32 +493,26 @@ int MDS::init(MDSMap::DaemonState wanted_state)
   while (true) {
     objecter->maybe_request_map();
     objecter->wait_for_osd_map();
-    const OSDMap *osdmap = objecter->get_osdmap_read();
-    uint64_t osd_features = osdmap->get_up_osd_features();
-    if (osd_features & CEPH_FEATURE_OSD_TMAP2OMAP) {
-      objecter->put_osdmap_read();
+    uint64_t osd_features = objecter->osdmap->get_up_osd_features();
+    if (osd_features & CEPH_FEATURE_OSD_TMAP2OMAP)
       break;
-    }
-    if (osdmap->get_num_up_osds() > 0) {
+    if (objecter->osdmap->get_num_up_osds() > 0) {
         derr << "*** one or more OSDs do not support TMAP2OMAP; upgrade OSDs before starting MDS (or downgrade MDS) ***" << dendl;
     } else {
-        derr << "*** no OSDs are up as of epoch " << osdmap->get_epoch() << ", waiting" << dendl;
+        derr << "*** no OSDs are up as of epoch " << objecter->osdmap->get_epoch() << ", waiting" << dendl;
     }
-    objecter->put_osdmap_read();
     sleep(10);
   }
 
   mds_lock.Lock();
-  if (want_state == MDSMap::STATE_DNE) {
+  if (want_state == CEPH_MDS_STATE_DNE) {
     suicide();  // we could do something more graceful here
   }
 
   timer.init();
 
-  if (wanted_state==MDSMap::STATE_BOOT && g_conf->mds_standby_replay) {
+  if (wanted_state==MDSMap::STATE_BOOT && g_conf->mds_standby_replay)
     wanted_state = MDSMap::STATE_STANDBY_REPLAY;
-  }
-
   // starting beacon.  this will induce an MDSMap from the monitor
   want_state = wanted_state;
   if (wanted_state==MDSMap::STATE_STANDBY_REPLAY ||
@@ -689,22 +539,17 @@ int MDS::init(MDSMap::DaemonState wanted_state)
       standby_for_rank = MDSMap::MDS_STANDBY_ANY;
     else
       standby_for_rank = MDSMap::MDS_STANDBY_NAME;
-  } else if (standby_type == MDSMap::STATE_NULL && !standby_for_name.empty())
+  } else if (!standby_type && !standby_for_name.empty())
     standby_for_rank = MDSMap::MDS_MATCHED_ACTIVE;
 
-  beacon.init(mdsmap, want_state, standby_for_rank, standby_for_name);
+  beacon_start();
   whoami = -1;
   messenger->set_myname(entity_name_t::MDS(whoami));
   
   // schedule tick
   reset_tick();
 
-  // Start handler for finished_queue
-  progress_thread.create();
-
   create_logger();
-  set_up_admin_socket();
-  g_conf->add_observer(this);
 
   mds_lock.Unlock();
 
@@ -723,20 +568,14 @@ void MDS::reset_tick()
 
 void MDS::tick()
 {
-  heartbeat_reset();
-
   tick_event = 0;
 
   // reschedule
   reset_tick();
 
-  if (beacon.is_laggy()) {
+  if (is_laggy()) {
     dout(5) << "tick bailing out since we seem laggy" << dendl;
     return;
-  } else {
-    // Wake up thread in case we use to be laggy and have waiting_for_nolaggy
-    // messages to progress.
-    progress_thread.signal();
   }
 
   // make sure mds log flushes, trims periodically
@@ -754,18 +593,18 @@ void MDS::tick()
   mds_load_t load = balancer->get_load(now);
   
   if (logger) {
-    req_rate = logger->get(l_mds_request);
+    req_rate = logger->get(l_mds_req);
     
-    logger->set(l_mds_load_cent, 100 * load.mds_load());
-    logger->set(l_mds_dispatch_queue_len, messenger->get_dispatch_queue_len());
-    logger->set(l_mds_subtrees, mdcache->num_subtrees());
+    logger->set(l_mds_l, 100 * load.mds_load());
+    logger->set(l_mds_q, messenger->get_dispatch_queue_len());
+    logger->set(l_mds_sm, mdcache->num_subtrees());
 
     mdcache->log_stat();
   }
 
   // ...
   if (is_clientreplay() || is_active() || is_stopping()) {
-    locker->tick();
+    locker->scatter_tick();
     server->find_idle_sessions();
   }
   
@@ -779,27 +618,111 @@ void MDS::tick()
     if (snapserver)
       snapserver->check_osd_map(false);
   }
+}
+
 
-  // Expose ourselves to Beacon to update health indicators
-  beacon.notify_health(this);
 
-  check_ops_in_flight();
+
+// -----------------------
+// beacons
+
+void MDS::beacon_start()
+{
+  beacon_send();         // send first beacon
 }
+  
 
-void MDS::check_ops_in_flight()
+
+void MDS::beacon_send()
 {
-  vector<string> warnings;
-  if (op_tracker.check_ops_in_flight(warnings)) {
-    for (vector<string>::iterator i = warnings.begin();
-        i != warnings.end();
-        ++i) {
-      clog->warn() << *i;
+  ++beacon_last_seq;
+  dout(10) << "beacon_send " << ceph_mds_state_name(want_state)
+	   << " seq " << beacon_last_seq
+	   << " (currently " << ceph_mds_state_name(state) << ")"
+	   << dendl;
+
+  beacon_seq_stamp[beacon_last_seq] = ceph_clock_now(g_ceph_context);
+  
+  MMDSBeacon *beacon = new MMDSBeacon(monc->get_fsid(), monc->get_global_id(), name, mdsmap->get_epoch(), 
+				      want_state, beacon_last_seq);
+  beacon->set_standby_for_rank(standby_for_rank);
+  beacon->set_standby_for_name(standby_for_name);
+
+  // include _my_ feature set
+  CompatSet mdsmap_compat(get_mdsmap_compat_set_default());
+  mdsmap_compat.merge(mdsmap->compat);
+  beacon->set_compat(mdsmap_compat);
+
+  monc->send_mon_message(beacon);
+
+  // schedule next sender
+  if (beacon_sender) timer.cancel_event(beacon_sender);
+  beacon_sender = new C_MDS_BeaconSender(this);
+  timer.add_event_after(g_conf->mds_beacon_interval, beacon_sender);
+}
+
+
+bool MDS::is_laggy()
+{
+  if (beacon_last_acked_stamp == utime_t())
+    return false;
+
+  utime_t now = ceph_clock_now(g_ceph_context);
+  utime_t since = now - beacon_last_acked_stamp;
+  if (since > g_conf->mds_beacon_grace) {
+    dout(5) << "is_laggy " << since << " > " << g_conf->mds_beacon_grace
+	    << " since last acked beacon" << dendl;
+    was_laggy = true;
+    if (since > (g_conf->mds_beacon_grace*2)) {
+      // maybe it's not us?
+      dout(5) << "initiating monitor reconnect; maybe we're not the slow one"
+              << dendl;
+      monc->reopen_session();
     }
+    return true;
   }
-  return;
+  return false;
 }
 
 
+/* This fuction puts the passed message before returning */
+void MDS::handle_mds_beacon(MMDSBeacon *m)
+{
+  version_t seq = m->get_seq();
+
+  // update lab
+  if (beacon_seq_stamp.count(seq)) {
+    assert(beacon_seq_stamp[seq] > beacon_last_acked_stamp);
+    beacon_last_acked_stamp = beacon_seq_stamp[seq];
+    utime_t now = ceph_clock_now(g_ceph_context);
+    utime_t rtt = now - beacon_last_acked_stamp;
+
+    dout(10) << "handle_mds_beacon " << ceph_mds_state_name(m->get_state())
+	     << " seq " << m->get_seq() 
+	     << " rtt " << rtt << dendl;
+
+    if (was_laggy && rtt < g_conf->mds_beacon_grace) {
+      dout(0) << "handle_mds_beacon no longer laggy" << dendl;
+      was_laggy = false;
+      laggy_until = now;
+    }
+
+    // clean up seq_stamp map
+    while (!beacon_seq_stamp.empty() &&
+	   beacon_seq_stamp.begin()->first <= seq)
+      beacon_seq_stamp.erase(beacon_seq_stamp.begin());
+  } else {
+    dout(10) << "handle_mds_beacon " << ceph_mds_state_name(m->get_state())
+	     << " seq " << m->get_seq() << " dne" << dendl;
+  }
+
+  m->put();
+}
+
+void MDS::request_osdmap(Context *c) {
+  objecter->wait_for_new_map(c, osdmap->get_epoch());
+}
+
 /* This function DOES put the passed message before returning*/
 void MDS::handle_command(MMonCommand *m)
 {
@@ -833,7 +756,7 @@ void MDS::handle_command(MMonCommand *m)
     Session *session = sessionmap.get_session(entity_name_t(CEPH_ENTITY_TYPE_CLIENT,
 							    strtol(m->cmd[2].c_str(), 0, 10)));
     if (session)
-      server->kill_session(session, NULL);
+      server->kill_session(session);
     else
       dout(15) << "session " << session << " not in sessionmap!" << dendl;
   } else if (m->cmd[0] == "issue_caps") {
@@ -901,17 +824,17 @@ void MDS::handle_command(MMonCommand *m)
   else if (m->cmd[0] == "cpu_profiler") {
     ostringstream ss;
     cpu_profiler_handle_command(m->cmd, ss);
-    clog->info() << ss.str();
+    clog.info() << ss.str();
   }
  else if (m->cmd[0] == "heap") {
    if (!ceph_using_tcmalloc())
-     clog->info() << "tcmalloc not enabled, can't use heap profiler commands\n";
+     clog.info() << "tcmalloc not enabled, can't use heap profiler commands\n";
    else {
      ostringstream ss;
      vector<std::string> cmdargs;
      cmdargs.insert(cmdargs.begin(), m->cmd.begin()+1, m->cmd.end());
      ceph_heap_profiler_handle_command(cmdargs, ss);
-     clog->info() << ss.str();
+     clog.info() << ss.str();
    }
  } else dout(0) << "unrecognized command! " << m->cmd << dendl;
   m->put();
@@ -943,7 +866,7 @@ void MDS::handle_mds_map(MMDSMap *m)
   // keep old map, for a moment
   MDSMap *oldmap = mdsmap;
   int oldwhoami = whoami;
-  MDSMap::DaemonState oldstate = state;
+  int oldstate = state;
   entity_addr_t addr;
 
   // decode and process
@@ -986,8 +909,7 @@ void MDS::handle_mds_map(MMDSMap *m)
     last_state = oldstate;
 
   if (state == MDSMap::STATE_STANDBY) {
-    state = MDSMap::STATE_STANDBY;
-    set_want_state(state);
+    want_state = state = MDSMap::STATE_STANDBY;
     dout(1) << "handle_mds_map standby" << dendl;
 
     if (standby_type) // we want to be in standby_replay or oneshot_replay!
@@ -995,9 +917,9 @@ void MDS::handle_mds_map(MMDSMap *m)
 
     goto out;
   } else if (state == MDSMap::STATE_STANDBY_REPLAY) {
-    if (standby_type != MDSMap::STATE_NULL && standby_type != MDSMap::STATE_STANDBY_REPLAY) {
-      set_want_state(standby_type);
-      beacon.send();
+    if (standby_type && standby_type != MDSMap::STATE_STANDBY_REPLAY) {
+      want_state = standby_type;
+      beacon_send();
       state = oldstate;
       goto out;
     }
@@ -1012,8 +934,7 @@ void MDS::handle_mds_map(MMDSMap *m)
     } else {
       if (want_state == MDSMap::STATE_STANDBY) {
         dout(10) << "dropped out of mdsmap, try to re-add myself" << dendl;
-        state = MDSMap::STATE_BOOT;
-        set_want_state(state);
+        want_state = state = MDSMap::STATE_BOOT;
         goto out;
       }
       if (want_state == MDSMap::STATE_BOOT) {
@@ -1068,7 +989,7 @@ void MDS::handle_mds_map(MMDSMap *m)
     dout(1) << "handle_mds_map state change "
 	    << ceph_mds_state_name(oldstate) << " --> "
 	    << ceph_mds_state_name(state) << dendl;
-    set_want_state(state);
+    want_state = state;
 
     if (oldstate == MDSMap::STATE_STANDBY_REPLAY) {
         dout(10) << "Monitor activated us! Deactivating replay loop" << dendl;
@@ -1201,9 +1122,9 @@ void MDS::handle_mds_map(MMDSMap *m)
     balancer->try_rebalance();
 
   {
-    map<epoch_t,list<MDSInternalContextBase*> >::iterator p = waiting_for_mdsmap.begin();
+    map<epoch_t,list<Context*> >::iterator p = waiting_for_mdsmap.begin();
     while (p != waiting_for_mdsmap.end() && p->first <= mdsmap->get_epoch()) {
-      list<MDSInternalContextBase*> ls;
+      list<Context*> ls;
       ls.swap(p->second);
       waiting_for_mdsmap.erase(p++);
       finish_contexts(g_ceph_context, ls);
@@ -1211,8 +1132,6 @@ void MDS::handle_mds_map(MMDSMap *m)
   }
 
  out:
-  beacon.notify_mdsmap(mdsmap);
-
   m->put();
   delete oldmap;
 }
@@ -1227,22 +1146,24 @@ void MDS::bcast_mds_map()
   for (set<Session*>::const_iterator p = clients.begin();
        p != clients.end();
        ++p) 
-    (*p)->connection->send_message(new MMDSMap(monc->get_fsid(), mdsmap));
+    messenger->send_message(new MMDSMap(monc->get_fsid(), mdsmap),
+			    (*p)->connection);
   last_client_mdsmap_bcast = mdsmap->get_epoch();
 }
 
 
-void MDS::request_state(MDSMap::DaemonState s)
+void MDS::request_state(int s)
 {
   dout(3) << "request_state " << ceph_mds_state_name(s) << dendl;
-  set_want_state(s);
-  beacon.send();
+  want_state = s;
+  beacon_send();
 }
 
 
-class C_MDS_CreateFinish : public MDSInternalContext {
+class C_MDS_CreateFinish : public Context {
+  MDS *mds;
 public:
-  C_MDS_CreateFinish(MDS *m) : MDSInternalContext(m) {}
+  C_MDS_CreateFinish(MDS *m) : mds(m) {}
   void finish(int r) { mds->creating_done(); }
 };
 
@@ -1250,7 +1171,7 @@ void MDS::boot_create()
 {
   dout(3) << "boot_create" << dendl;
 
-  MDSGatherBuilder fin(g_ceph_context, new C_MDS_CreateFinish(this));
+  C_GatherBuilder fin(g_ceph_context, new C_MDS_CreateFinish(this));
 
   mdcache->init_layouts();
 
@@ -1279,6 +1200,10 @@ void MDS::boot_create()
 
   // initialize tables
   if (mdsmap->get_tableserver() == whoami) {
+    dout(10) << "boot_create creating fresh anchortable" << dendl;
+    anchorserver->reset();
+    anchorserver->save(fin.new_sub());
+
     dout(10) << "boot_create creating fresh snaptable" << dendl;
     snapserver->reset();
     snapserver->save(fin.new_sub());
@@ -1287,7 +1212,8 @@ void MDS::boot_create()
   assert(g_conf->mds_kill_create_at != 1);
 
   // ok now journal it
-  mdlog->journal_segment_subtree_map(fin.new_sub());
+  mdlog->journal_segment_subtree_map();
+  mdlog->wait_for_safe(fin.new_sub());
   mdlog->flush();
 
   fin.activate();
@@ -1300,19 +1226,16 @@ void MDS::creating_done()
 }
 
 
-class C_MDS_BootStart : public MDSInternalContext {
-  MDS::BootStep nextstep;
+class C_MDS_BootStart : public Context {
+  MDS *mds;
+  int nextstep;
 public:
-  C_MDS_BootStart(MDS *m, MDS::BootStep n) : MDSInternalContext(m), nextstep(n) {}
-  void finish(int r) {
-    mds->boot_start(nextstep, r);
-  }
+  C_MDS_BootStart(MDS *m, int n) : mds(m), nextstep(n) {}
+  void finish(int r) { mds->boot_start(nextstep, r); }
 };
 
-
-void MDS::boot_start(BootStep step, int r)
+void MDS::boot_start(int step, int r)
 {
-  // Handle errors from previous step
   if (r < 0) {
     if (is_standby_replay() && (r == -EAGAIN)) {
       dout(0) << "boot_start encountered an error EAGAIN"
@@ -1325,65 +1248,73 @@ void MDS::boot_start(BootStep step, int r)
     }
   }
 
-  assert(is_starting() || is_any_replay());
-
-  switch(step) {
-    case MDS_BOOT_INITIAL:
-      {
-        mdcache->init_layouts();
-
-        MDSGatherBuilder gather(g_ceph_context,
-            new C_MDS_BootStart(this, MDS_BOOT_OPEN_ROOT));
-        dout(2) << "boot_start " << step << ": opening inotable" << dendl;
-        inotable->load(gather.new_sub());
+  switch (step) {
+  case 0:
+    mdcache->init_layouts();
+    step = 1;  // fall-thru.
 
-        dout(2) << "boot_start " << step << ": opening sessionmap" << dendl;
-        sessionmap.load(gather.new_sub());
+  case 1:
+    {
+      C_GatherBuilder gather(g_ceph_context, new C_MDS_BootStart(this, 2));
+      dout(2) << "boot_start " << step << ": opening inotable" << dendl;
+      inotable->load(gather.new_sub());
 
-        dout(2) << "boot_start " << step << ": opening mds log" << dendl;
-        mdlog->open(gather.new_sub());
+      dout(2) << "boot_start " << step << ": opening sessionmap" << dendl;
+      sessionmap.load(gather.new_sub());
 
-        if (mdsmap->get_tableserver() == whoami) {
-          dout(2) << "boot_start " << step << ": opening snap table" << dendl;
-          snapserver->load(gather.new_sub());
-        }
+      if (mdsmap->get_tableserver() == whoami) {
+	dout(2) << "boot_start " << step << ": opening anchor table" << dendl;
+	anchorserver->load(gather.new_sub());
 
-        gather.activate();
+	dout(2) << "boot_start " << step << ": opening snap table" << dendl;	
+	snapserver->load(gather.new_sub());
       }
-      break;
-    case MDS_BOOT_OPEN_ROOT:
-      {
-        dout(2) << "boot_start " << step << ": loading/discovering base inodes" << dendl;
+      
+      dout(2) << "boot_start " << step << ": opening mds log" << dendl;
+      mdlog->open(gather.new_sub());
+      gather.activate();
+    }
+    break;
 
-        MDSGatherBuilder gather(g_ceph_context,
-            new C_MDS_BootStart(this, MDS_BOOT_PREPARE_LOG));
+  case 2:
+    {
+      dout(2) << "boot_start " << step << ": loading/discovering base inodes" << dendl;
 
-        mdcache->open_mydir_inode(gather.new_sub());
+      C_GatherBuilder gather(g_ceph_context, new C_MDS_BootStart(this, 3));
 
-        if (is_starting() ||
-            whoami == mdsmap->get_root()) {  // load root inode off disk if we are auth
-          mdcache->open_root_inode(gather.new_sub());
-        } else {
-          // replay.  make up fake root inode to start with
-          mdcache->create_root_inode();
-        }
-        gather.activate();
-      }
-      break;
-    case MDS_BOOT_PREPARE_LOG:
-      if (is_any_replay()) {
-        dout(2) << "boot_start " << step << ": replaying mds log" << dendl;
-        mdlog->replay(new C_MDS_BootStart(this, MDS_BOOT_REPLAY_DONE));
+      mdcache->open_mydir_inode(gather.new_sub());
+
+      if (is_starting() ||
+	  whoami == mdsmap->get_root()) {  // load root inode off disk if we are auth
+	mdcache->open_root_inode(gather.new_sub());
       } else {
-        dout(2) << "boot_start " << step << ": positioning at end of old mds log" << dendl;
-        mdlog->append();
-        starting_done();
+	// replay.  make up fake root inode to start with
+	mdcache->create_root_inode();
       }
+      gather.activate();
+    }
+    break;
+
+  case 3:
+    if (is_any_replay()) {
+      dout(2) << "boot_start " << step << ": replaying mds log" << dendl;
+      mdlog->replay(new C_MDS_BootStart(this, 4));
       break;
-    case MDS_BOOT_REPLAY_DONE:
-      assert(is_any_replay());
+    } else {
+      dout(2) << "boot_start " << step << ": positioning at end of old mds log" << dendl;
+      mdlog->append();
+      step++;
+    }
+
+  case 4:
+    if (is_any_replay()) {
       replay_done();
       break;
+    }
+    step++;
+    
+    starting_done();
+    break;
   }
 }
 
@@ -1396,7 +1327,7 @@ void MDS::starting_done()
   mdcache->open_root();
 
   // start new segment
-  mdlog->start_new_segment();
+  mdlog->start_new_segment(0);
 }
 
 
@@ -1419,31 +1350,32 @@ void MDS::replay_start()
   if (is_standby_replay())
     standby_replaying = true;
   
-  standby_type = MDSMap::STATE_NULL;
+  standby_type = 0;
 
   calc_recovery_set();
 
-  // Check if we need to wait for a newer OSD map before starting
-  Context *fin = new C_OnFinisher(new C_IO_Wrapper(this, new C_MDS_BootStart(this, MDS_BOOT_INITIAL)), &finisher);
-  bool const ready = objecter->wait_for_map(
-      mdsmap->get_last_failure_osd_epoch(),
-      fin);
+  dout(1) << " need osdmap epoch " << mdsmap->get_last_failure_osd_epoch()
+	  <<", have " << osdmap->get_epoch()
+	  << dendl;
 
-  if (ready) {
-    delete fin;
+  // start?
+  if (osdmap->get_epoch() >= mdsmap->get_last_failure_osd_epoch()) {
     boot_start();
   } else {
     dout(1) << " waiting for osdmap " << mdsmap->get_last_failure_osd_epoch() 
 	    << " (which blacklists prior instance)" << dendl;
+    objecter->wait_for_new_map(new C_MDS_BootStart(this, 0),
+			       mdsmap->get_last_failure_osd_epoch());
   }
 }
 
 
-class MDS::C_MDS_StandbyReplayRestartFinish : public MDSIOContext {
+class MDS::C_MDS_StandbyReplayRestartFinish : public Context {
+  MDS *mds;
   uint64_t old_read_pos;
 public:
   C_MDS_StandbyReplayRestartFinish(MDS *mds_, uint64_t old_read_pos_) :
-    MDSIOContext(mds_), old_read_pos(old_read_pos_) {}
+    mds(mds_), old_read_pos(old_read_pos_) {}
   void finish(int r) {
     mds->_standby_replay_restart_finish(r, old_read_pos);
   }
@@ -1457,45 +1389,29 @@ void MDS::_standby_replay_restart_finish(int r, uint64_t old_read_pos)
 		  trying to reset everything in the cache, etc */
   } else {
     mdlog->standby_trim_segments();
-    boot_start(MDS_BOOT_PREPARE_LOG, r);
+    boot_start(3, r);
   }
 }
 
 inline void MDS::standby_replay_restart()
 {
-  dout(1) << "standby_replay_restart"
-	  << (standby_replaying ? " (as standby)":" (final takeover pass)")
-	  << dendl;
-  if (standby_replaying) {
-    /* Go around for another pass of replaying in standby */
-    mdlog->get_journaler()->reread_head_and_probe(
-      new C_MDS_StandbyReplayRestartFinish(
-        this,
-	mdlog->get_journaler()->get_read_pos()));
+  dout(1) << "standby_replay_restart" << (standby_replaying ? " (as standby)":" (final takeover pass)") << dendl;
+
+  if (!standby_replaying && osdmap->get_epoch() < mdsmap->get_last_failure_osd_epoch()) {
+    dout(1) << " waiting for osdmap " << mdsmap->get_last_failure_osd_epoch() 
+	    << " (which blacklists prior instance)" << dendl;
+    objecter->wait_for_new_map(new C_MDS_BootStart(this, 3),
+			       mdsmap->get_last_failure_osd_epoch());
   } else {
-    /* We are transitioning out of standby: wait for OSD map update
-       before making final pass */
-    Context *fin = new C_OnFinisher(new C_IO_Wrapper(this,
-          new C_MDS_BootStart(this, MDS_BOOT_PREPARE_LOG)),
-      &finisher);
-    bool const ready =
-      objecter->wait_for_map(mdsmap->get_last_failure_osd_epoch(), fin);
-    if (ready) {
-      delete fin;
-      mdlog->get_journaler()->reread_head_and_probe(
-        new C_MDS_StandbyReplayRestartFinish(
-          this,
-	  mdlog->get_journaler()->get_read_pos()));
-    } else {
-      dout(1) << " waiting for osdmap " << mdsmap->get_last_failure_osd_epoch() 
-              << " (which blacklists prior instance)" << dendl;
-    }
+    mdlog->get_journaler()->reread_head_and_probe(
+      new C_MDS_StandbyReplayRestartFinish(this, mdlog->get_journaler()->get_read_pos()));
   }
 }
 
-class MDS::C_MDS_StandbyReplayRestart : public MDSInternalContext {
+class MDS::C_MDS_StandbyReplayRestart : public Context {
+  MDS *mds;
 public:
-  C_MDS_StandbyReplayRestart(MDS *m) : MDSInternalContext(m) {}
+  C_MDS_StandbyReplayRestart(MDS *m) : mds(m) {}
   void finish(int r) {
     assert(!r);
     mds->standby_replay_restart();
@@ -1513,29 +1429,17 @@ void MDS::replay_done()
   }
 
   if (is_standby_replay()) {
-    // The replay was done in standby state, and we are still in that state
-    assert(standby_replaying);
     dout(10) << "setting replay timer" << dendl;
     timer.add_event_after(g_conf->mds_replay_interval,
                           new C_MDS_StandbyReplayRestart(this));
     return;
-  } else if (standby_replaying) {
-    // The replay was done in standby state, we have now _left_ that state
+  }
+
+  if (standby_replaying) {
     dout(10) << " last replay pass was as a standby; making final pass" << dendl;
     standby_replaying = false;
     standby_replay_restart();
     return;
-  } else {
-    // Replay is complete, journal read should be up to date
-    assert(mdlog->get_journaler()->get_read_pos() == mdlog->get_journaler()->get_write_pos());
-    assert(!is_standby_replay());
-
-    // Reformat and come back here
-    if (mdlog->get_journaler()->get_stream_format() < g_conf->mds_journal_format) {
-        dout(4) << "reformatting journal on standbyreplay->replay transition" << dendl;
-        mdlog->reopen(new C_MDS_BootStart(this, MDS_BOOT_REPLAY_DONE));
-        return;
-    }
   }
 
   dout(1) << "making mds journal writeable" << dendl;
@@ -1545,18 +1449,18 @@ void MDS::replay_done()
   if (g_conf->mds_wipe_sessions) {
     dout(1) << "wiping out client sessions" << dendl;
     sessionmap.wipe();
-    sessionmap.save(new C_MDSInternalNoop);
+    sessionmap.save(new C_NoopContext);
   }
   if (g_conf->mds_wipe_ino_prealloc) {
     dout(1) << "wiping out ino prealloc from sessions" << dendl;
     sessionmap.wipe_ino_prealloc();
-    sessionmap.save(new C_MDSInternalNoop);
+    sessionmap.save(new C_NoopContext);
   }
   if (g_conf->mds_skip_ino) {
     inodeno_t i = g_conf->mds_skip_ino;
     dout(1) << "skipping " << i << " inodes" << dendl;
     inotable->skip_inos(i);
-    inotable->save(new C_MDSInternalNoop);
+    inotable->save(new C_NoopContext);
   }
 
   if (mdsmap->get_num_in_mds() == 1 &&
@@ -1667,10 +1571,13 @@ void MDS::recovery_done(int oldstate)
   dout(1) << "recovery_done -- successful recovery!" << dendl;
   assert(is_clientreplay() || is_active());
   
-  // kick snaptable (resent AGREEs)
+  // kick anchortable (resent AGREEs)
   if (mdsmap->get_tableserver() == whoami) {
     set<int> active;
-    mdsmap->get_clientreplay_or_active_or_stopping_mds_set(active);
+    mdsmap->get_mds_set(active, MDSMap::STATE_CLIENTREPLAY);
+    mdsmap->get_mds_set(active, MDSMap::STATE_ACTIVE);
+    mdsmap->get_mds_set(active, MDSMap::STATE_STOPPING);
+    anchorserver->finish_recovery(active);
     snapserver->finish_recovery(active);
   }
 
@@ -1695,6 +1602,7 @@ void MDS::handle_mds_recovery(int who)
   mdcache->handle_mds_recovery(who);
 
   if (mdsmap->get_tableserver() == whoami) {
+    anchorserver->handle_mds_recovery(who);
     snapserver->handle_mds_recovery(who);
   }
 
@@ -1712,6 +1620,7 @@ void MDS::handle_mds_failure(int who)
 
   mdcache->handle_mds_failure(who);
 
+  anchorclient->handle_mds_failure(who);
   snapclient->handle_mds_failure(who);
 }
 
@@ -1748,17 +1657,16 @@ void MDS::handle_signal(int signum)
 void MDS::suicide()
 {
   assert(mds_lock.is_locked());
-  set_want_state(MDSMap::STATE_DNE); // whatever.
+  want_state = CEPH_MDS_STATE_DNE; // whatever.
 
   dout(1) << "suicide.  wanted " << ceph_mds_state_name(want_state)
 	  << ", now " << ceph_mds_state_name(state) << dendl;
 
-  mdlog->shutdown();
-
-  finisher.stop(); // no flushing
-
   // stop timers
-  beacon.shutdown();
+  if (beacon_sender) {
+    timer.cancel_event(beacon_sender);
+    beacon_sender = 0;
+  }
   if (tick_event) {
     timer.cancel_event(tick_event);
     tick_event = 0;
@@ -1767,30 +1675,16 @@ void MDS::suicide()
   //timer.join();
   timer.shutdown();
   
-  clean_up_admin_socket();
-
   // shut down cache
   mdcache->shutdown();
 
-  if (objecter->initialized.read())
-    objecter->shutdown();
+  if (objecter->initialized)
+    objecter->shutdown_locked();
 
   monc->shutdown();
 
-  op_tracker.on_shutdown();
-
-  progress_thread.shutdown();
-
   // shut down messenger
   messenger->shutdown();
-
-  // Workaround unclean shutdown: HeartbeatMap will assert if
-  // worker is not removed (as we do in ~MDS), but ~MDS is not
-  // always called after suicide.
-  if (hb) {
-    cct->get_heartbeat_map()->remove_worker(hb);
-    hb = NULL;
-  }
 }
 
 void MDS::respawn()
@@ -1840,9 +1734,6 @@ bool MDS::ms_dispatch(Message *m)
 {
   bool ret;
   mds_lock.Lock();
-
-  heartbeat_reset();
-
   if (want_state == CEPH_MDS_STATE_DNE) {
     dout(10) << " stopping, discarding " << *m << dendl;
     m->put();
@@ -1901,7 +1792,11 @@ bool MDS::handle_core_message(Message *m)
     ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_MON | CEPH_ENTITY_TYPE_MDS);
     handle_mds_map(static_cast<MMDSMap*>(m));
     break;
-
+  case MSG_MDS_BEACON:
+    ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_MON);
+    handle_mds_beacon(static_cast<MMDSBeacon*>(m));
+    break;
+    
     // misc
   case MSG_MON_COMMAND:
     ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_MON);
@@ -1909,8 +1804,13 @@ bool MDS::handle_core_message(Message *m)
     break;    
 
     // OSD
+  case CEPH_MSG_OSD_OPREPLY:
+    ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_OSD);
+    objecter->handle_osd_op_reply((class MOSDOpReply*)m);
+    break;
   case CEPH_MSG_OSD_MAP:
     ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_MON | CEPH_ENTITY_TYPE_OSD);
+    objecter->handle_osd_map((MOSDMap*)m);
     if (is_active() && snapserver)
       snapserver->check_osd_map(true);
     break;
@@ -2020,49 +1920,6 @@ bool MDS::is_stale_message(Message *m)
   return false;
 }
 
-/**
- * Advance finished_queue and waiting_for_nolaggy.
- *
- * Usually drain both queues, but may not drain waiting_for_nolaggy
- * if beacon is currently laggy.
- */
-void MDS::_advance_queues()
-{
-  assert(mds_lock.is_locked_by_me());
-
-  while (!finished_queue.empty()) {
-    dout(7) << "mds has " << finished_queue.size() << " queued contexts" << dendl;
-    dout(10) << finished_queue << dendl;
-    list<MDSInternalContextBase*> ls;
-    ls.swap(finished_queue);
-    while (!ls.empty()) {
-      dout(10) << " finish " << ls.front() << dendl;
-      ls.front()->complete(0);
-      ls.pop_front();
-
-      heartbeat_reset();
-    }
-  }
-
-  while (!waiting_for_nolaggy.empty()) {
-    // stop if we're laggy now!
-    if (beacon.is_laggy())
-      break;
-
-    Message *old = waiting_for_nolaggy.front();
-    waiting_for_nolaggy.pop_front();
-
-    if (is_stale_message(old)) {
-      old->put();
-    } else {
-      dout(7) << " processing laggy deferred " << *old << dendl;
-      handle_deferrable_message(old);
-    }
-
-    heartbeat_reset();
-  }
-}
-
 /* If this function returns true, it has put the message. If it returns false,
  * it has not put the message. */
 bool MDS::_dispatch(Message *m)
@@ -2074,7 +1931,7 @@ bool MDS::_dispatch(Message *m)
 
   // core
   if (!handle_core_message(m)) {
-    if (beacon.is_laggy()) {
+    if (is_laggy()) {
       dout(10) << " laggy, deferring " << *m << dendl;
       waiting_for_nolaggy.push_back(m);
     } else {
@@ -2090,12 +1947,41 @@ bool MDS::_dispatch(Message *m)
     return true;
 
   // finish any triggered contexts
-  _advance_queues();
+  while (!finished_queue.empty()) {
+    dout(7) << "mds has " << finished_queue.size() << " queued contexts" << dendl;
+    dout(10) << finished_queue << dendl;
+    list<Context*> ls;
+    ls.swap(finished_queue);
+    while (!ls.empty()) {
+      dout(10) << " finish " << ls.front() << dendl;
+      ls.front()->complete(0);
+      ls.pop_front();
+      
+      // give other threads (beacon!) a chance
+      mds_lock.Unlock();
+      mds_lock.Lock();
+    }
+  }
 
-  if (beacon.is_laggy()) {
-    // We've gone laggy during dispatch, don't do any
-    // more housekeeping
-    return true;
+  while (!waiting_for_nolaggy.empty()) {
+
+    // stop if we're laggy now!
+    if (is_laggy())
+      return true;
+
+    Message *old = waiting_for_nolaggy.front();
+    waiting_for_nolaggy.pop_front();
+
+    if (is_stale_message(old)) {
+      old->put();
+    } else {
+      dout(7) << " processing laggy deferred " << *old << dendl;
+      handle_deferrable_message(old);
+    }
+
+    // give other threads (beacon!) a chance
+    mds_lock.Unlock();
+    mds_lock.Lock();
   }
 
   // done with all client replayed requests?
@@ -2222,29 +2108,35 @@ bool MDS::_dispatch(Message *m)
 
 void MDS::ms_handle_connect(Connection *con) 
 {
+  Mutex::Locker l(mds_lock);
+  dout(5) << "ms_handle_connect on " << con->get_peer_addr() << dendl;
+  if (want_state == CEPH_MDS_STATE_DNE)
+    return;
+  objecter->ms_handle_connect(con);
 }
 
 bool MDS::ms_handle_reset(Connection *con) 
 {
-  if (con->get_peer_type() != CEPH_ENTITY_TYPE_CLIENT)
-    return false;
-
   Mutex::Locker l(mds_lock);
   dout(5) << "ms_handle_reset on " << con->get_peer_addr() << dendl;
   if (want_state == CEPH_MDS_STATE_DNE)
     return false;
 
-  Session *session = static_cast<Session *>(con->get_priv());
-  if (session) {
-    if (session->is_closed()) {
-      dout(3) << "ms_handle_reset closing connection for session " << session->info.inst << dendl;
-      con->mark_down();
-      con->set_priv(NULL);
-      sessionmap.remove_session(session);
+  if (con->get_peer_type() == CEPH_ENTITY_TYPE_OSD) {
+    objecter->ms_handle_reset(con);
+  } else if (con->get_peer_type() == CEPH_ENTITY_TYPE_CLIENT) {
+    Session *session = static_cast<Session *>(con->get_priv());
+    if (session) {
+      if (session->is_closed()) {
+	dout(3) << "ms_handle_reset closing connection for session " << session->info.inst << dendl;
+	messenger->mark_down(con);
+	con->set_priv(NULL);
+	sessionmap.remove_session(session);
+      }
+      session->put();
+    } else {
+      messenger->mark_down(con);
     }
-    session->put();
-  } else {
-    con->mark_down();
   }
   return false;
 }
@@ -2252,23 +2144,27 @@ bool MDS::ms_handle_reset(Connection *con)
 
 void MDS::ms_handle_remote_reset(Connection *con) 
 {
-  if (con->get_peer_type() != CEPH_ENTITY_TYPE_CLIENT)
-    return;
-
   Mutex::Locker l(mds_lock);
   dout(5) << "ms_handle_remote_reset on " << con->get_peer_addr() << dendl;
   if (want_state == CEPH_MDS_STATE_DNE)
     return;
+  switch (con->get_peer_type()) {
+  case CEPH_ENTITY_TYPE_OSD:
+    objecter->ms_handle_remote_reset(con);
+    break;
 
-  Session *session = static_cast<Session *>(con->get_priv());
-  if (session) {
-    if (session->is_closed()) {
-      dout(3) << "ms_handle_remote_reset closing connection for session " << session->info.inst << dendl;
-      con->mark_down();
-      con->set_priv(NULL);
-      sessionmap.remove_session(session);
+  case CEPH_ENTITY_TYPE_CLIENT:
+    Session *session = static_cast<Session *>(con->get_priv());
+    if (session) {
+      if (session->is_closed()) {
+	dout(3) << "ms_handle_remote_reset closing connection for session " << session->info.inst << dendl;
+	messenger->mark_down(con);
+	con->set_priv(NULL);
+	sessionmap.remove_session(session);
+      }
+      session->put();
     }
-    session->put();
+    break;
   }
 }
 
@@ -2343,7 +2239,7 @@ bool MDS::ms_verify_authorizer(Connection *con, int peer_type,
   }
 
   return true;  // we made a decision (see is_valid)
-}
+};
 
 
 void MDS::ms_handle_accept(Connection *con)
@@ -2358,67 +2254,10 @@ void MDS::ms_handle_accept(Connection *con)
 
       // send out any queued messages
       while (!s->preopen_out_queue.empty()) {
-	con->send_message(s->preopen_out_queue.front());
+	messenger->send_message(s->preopen_out_queue.front(), con);
 	s->preopen_out_queue.pop_front();
       }
     }
     s->put();
   }
 }
-
-void MDS::set_want_state(MDSMap::DaemonState newstate)
-{
-  if (want_state != newstate) {
-    dout(10) << __func__ << " "
-      << ceph_mds_state_name(want_state) << " -> "
-      << ceph_mds_state_name(newstate) << dendl;
-    want_state = newstate;
-    beacon.notify_want_state(newstate);
-  }
-}
-
-/**
- * Call this when you take mds_lock, or periodically if you're going to
- * hold the lock for a long time (e.g. iterating over clients/inodes)
- */
-void MDS::heartbeat_reset()
-{
-  assert(hb != NULL);
-  // NB not enabling suicide grace, because the mon takes care of killing us
-  // (by blacklisting us) when we fail to send beacons, and it's simpler to
-  // only have one way of dying.
-  cct->get_heartbeat_map()->reset_timeout(hb, g_conf->mds_beacon_grace, 0);
-}
-
-
-void *MDS::ProgressThread::entry()
-{
-  Mutex::Locker l(mds->mds_lock);
-  while (true) {
-    while (!stopping &&
-	   mds->finished_queue.empty() &&
-	   (mds->waiting_for_nolaggy.empty() || mds->beacon.is_laggy())) {
-      cond.Wait(mds->mds_lock);
-    }
-
-    if (stopping) {
-      break;
-    }
-
-    mds->_advance_queues();
-  }
-
-  return NULL;
-}
-
-
-void MDS::ProgressThread::shutdown()
-{
-  assert(mds->mds_lock.is_locked_by_me());
-
-  stopping = true;
-  cond.Signal();
-  mds->mds_lock.Unlock();
-  join();
-  mds->mds_lock.Lock();
-}
diff --git a/src/mds/MDS.h b/src/mds/MDS.h
index a51a5f9..1cd6096 100644
--- a/src/mds/MDS.h
+++ b/src/mds/MDS.h
@@ -29,49 +29,51 @@
 #include "common/Cond.h"
 #include "common/Timer.h"
 #include "common/LogClient.h"
-#include "common/TrackedOp.h"
-#include "common/Finisher.h"
 
 #include "MDSMap.h"
 
 #include "SessionMap.h"
-#include "Beacon.h"
 
 
-#define CEPH_MDS_PROTOCOL    24 /* cluster internal */
+#define CEPH_MDS_PROTOCOL    23 /* cluster internal */
+
 
 enum {
   l_mds_first = 2000,
-  l_mds_request,
+  l_mds_req,
   l_mds_reply,
-  l_mds_reply_latency,
-  l_mds_forward,
-  l_mds_dir_fetch,
-  l_mds_dir_commit,
-  l_mds_dir_split,
-  l_mds_inode_max,
-  l_mds_inodes,
-  l_mds_inodes_top,
-  l_mds_inodes_bottom,
-  l_mds_inodes_pin_tail,
-  l_mds_inodes_pinned,
-  l_mds_inodes_expired,
-  l_mds_inodes_with_caps,
-  l_mds_caps,
-  l_mds_subtrees,
-  l_mds_traverse,
-  l_mds_traverse_hit,
-  l_mds_traverse_forward,
-  l_mds_traverse_discover,
-  l_mds_traverse_dir_fetch,
-  l_mds_traverse_remote_ino,
-  l_mds_traverse_lock,
-  l_mds_load_cent,
-  l_mds_dispatch_queue_len,
-  l_mds_exported,
-  l_mds_exported_inodes,
-  l_mds_imported,
-  l_mds_imported_inodes,
+  l_mds_replyl,
+  l_mds_fw,
+  l_mds_dir_f,
+  l_mds_dir_c,
+  l_mds_dir_sp,
+  l_mds_dir_ffc,
+  l_mds_imax,
+  l_mds_i,
+  l_mds_itop,
+  l_mds_ibot,
+  l_mds_iptail,
+  l_mds_ipin,
+  l_mds_iex,
+  l_mds_icap,
+  l_mds_cap,
+  l_mds_dis,
+  l_mds_t,
+  l_mds_thit,
+  l_mds_tfw,
+  l_mds_tdis,
+  l_mds_tdirf,
+  l_mds_trino,
+  l_mds_tlock,
+  l_mds_l,
+  l_mds_q,
+  l_mds_popanyd,
+  l_mds_popnest,
+  l_mds_sm,
+  l_mds_ex,
+  l_mds_iexp,
+  l_mds_im,
+  l_mds_iim,
   l_mds_last,
 };
 
@@ -80,7 +82,6 @@ enum {
   l_mdc_last,
 };
 
-// memory utilization
 enum {
   l_mdm_first = 2500,
   l_mdm_ino,
@@ -104,13 +105,11 @@ enum {
 
 
 
-namespace ceph {
-  struct heartbeat_handle_d;
-}
 class filepath;
 
 class MonClient;
 
+class OSDMap;
 class Objecter;
 class Filer;
 
@@ -119,7 +118,6 @@ class Locker;
 class MDCache;
 class MDLog;
 class MDBalancer;
-class MDSInternalContextBase;
 
 class CInode;
 class CDir;
@@ -136,25 +134,19 @@ class MMDSBeacon;
 class InoTable;
 class SnapServer;
 class SnapClient;
+class AnchorServer;
+class AnchorClient;
 
 class MDSTableServer;
 class MDSTableClient;
 
 class AuthAuthorizeHandlerRegistry;
 
-class MDS : public Dispatcher, public md_config_obs_t {
+class MDS : public Dispatcher {
  public:
   Mutex        mds_lock;
   SafeTimer    timer;
 
- private:
-  ceph::heartbeat_handle_d *hb;  // Heartbeat for threads using mds_lock
-  void heartbeat_reset();
-  Beacon  beacon;
-  void set_want_state(MDSMap::DaemonState newstate);
- public:
-  utime_t get_laggy_until() {return beacon.get_laggy_until();}
-
   AuthAuthorizeHandlerRegistry *authorize_handler_cluster_registry;
   AuthAuthorizeHandlerRegistry *authorize_handler_service_registry;
 
@@ -163,17 +155,17 @@ class MDS : public Dispatcher, public md_config_obs_t {
   int incarnation;
 
   int standby_for_rank;
-  MDSMap::DaemonState standby_type;  // one of STANDBY_REPLAY, ONESHOT_REPLAY
+  int standby_type;
   string standby_for_name;
   bool standby_replaying;  // true if current replay pass is in standby-replay mode
 
   Messenger    *messenger;
   MonClient    *monc;
   MDSMap       *mdsmap;
+  OSDMap       *osdmap;
   Objecter     *objecter;
   Filer        *filer;       // for reading/writing to/from osds
-  LogClient    log_client;
-  LogChannelRef clog;
+  LogClient    clog;
 
   // sub systems
   Server       *server;
@@ -184,6 +176,9 @@ class MDS : public Dispatcher, public md_config_obs_t {
 
   InoTable     *inotable;
 
+  AnchorServer *anchorserver;
+  AnchorClient *anchorclient;
+
   SnapServer   *snapserver;
   SnapClient   *snapclient;
 
@@ -191,54 +186,51 @@ class MDS : public Dispatcher, public md_config_obs_t {
   MDSTableServer *get_table_server(int t);
 
   PerfCounters       *logger, *mlogger;
-  OpTracker    op_tracker;
-
-  Finisher finisher;
 
   int orig_argc;
   const char **orig_argv;
 
  protected:
   // -- MDS state --
-  MDSMap::DaemonState last_state;
-  MDSMap::DaemonState state;         // my confirmed state
-  MDSMap::DaemonState want_state;    // the state i want
+  int last_state;
+  int state;         // my confirmed state
+  int want_state;    // the state i want
 
-  list<MDSInternalContextBase*> waiting_for_active, waiting_for_replay, waiting_for_reconnect, waiting_for_resolve;
-  list<MDSInternalContextBase*> replay_queue;
-  map<int, list<MDSInternalContextBase*> > waiting_for_active_peer;
+  list<Context*> waiting_for_active, waiting_for_replay, waiting_for_reconnect, waiting_for_resolve;
+  list<Context*> replay_queue;
+  map<int, list<Context*> > waiting_for_active_peer;
   list<Message*> waiting_for_nolaggy;
-  map<epoch_t, list<MDSInternalContextBase*> > waiting_for_mdsmap;
+  map<epoch_t, list<Context*> > waiting_for_mdsmap;
 
   map<int,version_t> peer_mdsmap_epoch;
 
   ceph_tid_t last_tid;    // for mds-initiated requests (e.g. stray rename)
 
  public:
-  void wait_for_active(MDSInternalContextBase *c) { 
+  void wait_for_active(Context *c) { 
     waiting_for_active.push_back(c); 
   }
-  void wait_for_active_peer(int who, MDSInternalContextBase *c) { 
+  void wait_for_active_peer(int who, Context *c) { 
     waiting_for_active_peer[who].push_back(c);
   }
-  void wait_for_replay(MDSInternalContextBase *c) { 
+  void wait_for_replay(Context *c) { 
     waiting_for_replay.push_back(c); 
   }
-  void wait_for_reconnect(MDSInternalContextBase *c) {
+  void wait_for_reconnect(Context *c) {
     waiting_for_reconnect.push_back(c);
   }
-  void wait_for_resolve(MDSInternalContextBase *c) {
+  void wait_for_resolve(Context *c) {
     waiting_for_resolve.push_back(c);
   }
-  void wait_for_mdsmap(epoch_t e, MDSInternalContextBase *c) {
+  void wait_for_mdsmap(epoch_t e, Context *c) {
     waiting_for_mdsmap[e].push_back(c);
   }
-  void enqueue_replay(MDSInternalContextBase *c) {
+  void enqueue_replay(Context *c) {
     replay_queue.push_back(c);
   }
 
-  MDSMap::DaemonState get_state() { return state; } 
-  MDSMap::DaemonState get_want_state() { return want_state; } 
+  int get_state() { return state; } 
+  int get_want_state() { return want_state; } 
   bool is_creating() { return state == MDSMap::STATE_CREATING; }
   bool is_starting() { return state == MDSMap::STATE_STARTING; }
   bool is_standby()  { return state == MDSMap::STATE_STANDBY; }
@@ -257,24 +249,19 @@ class MDS : public Dispatcher, public md_config_obs_t {
 
   bool is_stopped()  { return mdsmap->is_stopped(whoami); }
 
-  void request_state(MDSMap::DaemonState s);
+  void request_state(int s);
 
   ceph_tid_t issue_tid() { return ++last_tid; }
     
 
   // -- waiters --
-private:
-  list<MDSInternalContextBase*> finished_queue;
-  void _advance_queues();
-public:
+  list<Context*> finished_queue;
 
-  void queue_waiter(MDSInternalContextBase *c) {
+  void queue_waiter(Context *c) {
     finished_queue.push_back(c);
-    progress_thread.signal();
   }
-  void queue_waiters(list<MDSInternalContextBase*>& ls) {
+  void queue_waiters(list<Context*>& ls) {
     finished_queue.splice( finished_queue.end(), ls );
-    progress_thread.signal();
   }
   bool queue_one_replay() {
     if (replay_queue.empty())
@@ -284,10 +271,31 @@ public:
     return true;
   }
   
+  // -- keepalive beacon --
+  version_t               beacon_last_seq;          // last seq sent to monitor
+  map<version_t,utime_t>  beacon_seq_stamp;         // seq # -> time sent
+  utime_t                 beacon_last_acked_stamp;  // last time we sent a beacon that got acked
+  bool was_laggy;
+  utime_t laggy_until;
+
+  bool is_laggy();
+  utime_t get_laggy_until() { return laggy_until; }
+
+  class C_MDS_BeaconSender : public Context {
+    MDS *mds;
+  public:
+    C_MDS_BeaconSender(MDS *m) : mds(m) {}
+    void finish(int r) {
+      mds->beacon_sender = 0;
+      mds->beacon_send();
+    }
+  } *beacon_sender;
+
   // tick and other timer fun
-  class C_MDS_Tick : public MDSInternalContext {
+  class C_MDS_Tick : public Context {
+    MDS *mds;
   public:
-    C_MDS_Tick(MDS *m) : MDSInternalContext(m) {}
+    C_MDS_Tick(MDS *m) : mds(m) {}
     void finish(int r) {
       mds->tick_event = 0;
       mds->tick();
@@ -324,19 +332,6 @@ public:
   bool ms_handle_reset(Connection *con);
   void ms_handle_remote_reset(Connection *con);
 
-private:
-  class ProgressThread : public Thread {
-    MDS *mds;
-    bool stopping;
-    Cond cond;
-  public:
-    ProgressThread(MDS *mds_) : mds(mds_), stopping(false) {}
-    void * entry(); 
-    void shutdown();
-    void signal() {cond.Signal();}
-  } progress_thread;
-  void _progress_thread();
-
  public:
   MDS(const std::string &n, Messenger *m, MonClient *mc);
   ~MDS();
@@ -345,9 +340,9 @@ private:
   void handle_signal(int signum);
 
   // who am i etc
-  int get_nodeid() const { return whoami; }
-  uint64_t get_metadata_pool() { return mdsmap->get_metadata_pool(); }
+  int get_nodeid() { return whoami; }
   MDSMap *get_mds_map() { return mdsmap; }
+  OSDMap *get_osd_map() { return osdmap; }
 
   void send_message_mds(Message *m, int mds);
   void forward_message_mds(Message *req, int mds);
@@ -365,43 +360,16 @@ private:
   }
 
   // start up, shutdown
-  int init(MDSMap::DaemonState wanted_state=MDSMap::STATE_BOOT);
-
-  // admin socket handling
-  friend class MDSSocketHook;
-  class MDSSocketHook *asok_hook;
-  bool asok_command(string command, cmdmap_t& cmdmap, string format,
-		    ostream& ss);
-  void set_up_admin_socket();
-  void clean_up_admin_socket();
-  void check_ops_in_flight(); // send off any slow ops to monitor
-    // config observer bits
-  virtual const char** get_tracked_conf_keys() const;
-  virtual void handle_conf_change(const struct md_config_t *conf,
-				  const std::set <std::string> &changed);
+  int init(int wanted_state=MDSMap::STATE_BOOT);
+
   void create_logger();
 
   void bcast_mds_map();  // to mounted clients
 
   void boot_create();             // i am new mds.
+  void boot_start(int step=0, int r=0);    // starting|replay
 
- private:
-  typedef enum {
-    // The MDSMap is available, configure default layouts and structures
-    MDS_BOOT_INITIAL = 0,
-    // We are ready to open some inodes
-    MDS_BOOT_OPEN_ROOT,
-    // We are ready to do a replay if needed
-    MDS_BOOT_PREPARE_LOG,
-    // Replay is complete
-    MDS_BOOT_REPLAY_DONE
-  } BootStep;
-
-  friend class C_MDS_BootStart;
-  friend class C_MDS_InternalBootStart;
-  void boot_start(BootStep step=MDS_BOOT_INITIAL, int r=0);    // starting|replay
   void calc_recovery_set();
- public:
 
   void replay_start();
   void creating_done();
@@ -436,6 +404,11 @@ private:
 
   void tick();
   
+  void beacon_start();
+  void beacon_send();
+  void handle_mds_beacon(MMDSBeacon *m);
+
+  void request_osdmap(Context *c);
 
   void inc_dispatch_depth() { ++dispatch_depth; }
   void dec_dispatch_depth() { --dispatch_depth; }
@@ -457,12 +430,14 @@ private:
 /* This expects to be given a reference which it is responsible for.
  * The finish function calls functions which
  * will put the Message exactly once.*/
-class C_MDS_RetryMessage : public MDSInternalContext {
+class C_MDS_RetryMessage : public Context {
   Message *m;
+  MDS *mds;
 public:
-  C_MDS_RetryMessage(MDS *mds, Message *m) : MDSInternalContext(mds) {
+  C_MDS_RetryMessage(MDS *mds, Message *m) {
     assert(m);
     this->m = m;
+    this->mds = mds;
   }
   virtual void finish(int r) {
     mds->inc_dispatch_depth();
diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc
deleted file mode 100644
index 47143f2..0000000
--- a/src/mds/MDSContext.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2012 Red Hat
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-
-#include "MDS.h"
-
-#include "MDSContext.h"
-
-#include "common/dout.h"
-#define dout_subsys ceph_subsys_mds
-
-
-void MDSInternalContextBase::complete(int r) {
-  MDS *mds = get_mds();
-
-  dout(10) << "MDSInternalContextBase::complete: " << typeid(*this).name() << dendl;
-  assert(mds != NULL);
-  assert(mds->mds_lock.is_locked_by_me());
-  MDSContext::complete(r);
-}
-
-
-MDS *MDSInternalContext::get_mds() {
-  return mds;
-}
-
-
-void MDSIOContextBase::complete(int r) {
-  MDS *mds = get_mds();
-
-  dout(10) << "MDSIOContextBase::complete: " << typeid(*this).name() << dendl;
-  assert(mds != NULL);
-  Mutex::Locker l(mds->mds_lock);
-  if (r == -EBLACKLISTED) {
-    derr << "MDSIOContextBase: blacklisted!  Restarting..." << dendl;
-    mds->respawn();
-  } else {
-    MDSContext::complete(r);
-  }
-}
-
-MDS *MDSIOContext::get_mds() {
-  return mds;
-}
-
-MDS *MDSInternalContextGather::get_mds()
-{
-  derr << "Forbidden call to MDSInternalContextGather::get_mds by " << typeid(*this).name() << dendl;
-  assert(0);
-}
-
diff --git a/src/mds/MDSContext.h b/src/mds/MDSContext.h
deleted file mode 100644
index 9da6674..0000000
--- a/src/mds/MDSContext.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2012 Red Hat
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-
-#ifndef MDS_CONTEXT_H
-#define MDS_CONTEXT_H
-
-#include "include/Context.h"
-
-class MDS;
-
-
-/**
- * Completion which has access to a reference to the global MDS instance.
- *
- * This class exists so that Context subclasses can provide the MDS pointer
- * from a pointer they already had, e.g. MDCache or Locker, rather than
- * necessarily having to carry around an extra MDS* pointer. 
- */
-class MDSContext : public Context
-{
-protected:
-  virtual MDS *get_mds() = 0;
-};
-
-
-/**
- * A context which must be called with the big MDS lock held.  Subclass
- * this with a get_mds implementation.
- */
-class MDSInternalContextBase : public MDSContext
-{
-public:
-    void complete(int r);
-};
-
-/**
- * General purpose, lets you pass in an MDS pointer.
- */
-class MDSInternalContext : public MDSInternalContextBase
-{
-protected:
-  MDS *mds;
-  virtual MDS* get_mds();
-
-public:
-  MDSInternalContext(MDS *mds_) : mds(mds_) {
-    assert(mds != NULL);
-  }
-};
-
-
-class MDSIOContextBase : public MDSContext
-{
-    void complete(int r);
-};
-
-/**
- * Completion for an I/O operation, takes big MDS lock
- * before executing finish function.
- */
-class MDSIOContext : public MDSIOContextBase
-{
-protected:
-  MDS *mds;
-  virtual MDS* get_mds();
-
-public:
-  MDSIOContext(MDS *mds_) : mds(mds_) {
-    assert(mds != NULL);
-  }
-};
-
-
-/**
- * No-op for callers expecting MDSInternalContextBase
- */
-class C_MDSInternalNoop : public MDSInternalContextBase
-{
-  virtual MDS* get_mds() {assert(0);}
-public:
-  void finish(int r) {}
-  void complete(int r) {}
-};
-
-
-/**
- * This class is used where you have an MDSInternalContextBase but
- * you sometimes want to call it back from an I/O completion.
- */
-class C_IO_Wrapper : public MDSIOContext
-{
-private:
-  MDSInternalContextBase *wrapped;
-public:
-  C_IO_Wrapper(MDS *mds_, MDSInternalContextBase *wrapped_) : MDSIOContext(mds_), wrapped(wrapped_) {
-    assert(wrapped != NULL);
-  }
-  virtual void finish(int r) {
-    wrapped->complete(r);
-  }
-};
-
-
-/**
- * Gather needs a default-constructable class
- */
-class MDSInternalContextGather : public MDSInternalContextBase
-{
-protected:
-  MDS *get_mds();
-};
-
-
-class MDSGather : public C_GatherBase<MDSInternalContextBase, MDSInternalContextGather>
-{
-public:
-  MDSGather(CephContext *cct, MDSInternalContextBase *onfinish) : C_GatherBase<MDSInternalContextBase, MDSInternalContextGather>(cct, onfinish) {}
-protected:
-  virtual MDS *get_mds() {return NULL;}
-};
-
-
-typedef C_GatherBuilderBase<MDSInternalContextBase, MDSGather> MDSGatherBuilder;
-
-
-#endif  // MDS_CONTEXT_H
-
diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc
index 54ebf16..c641358 100644
--- a/src/mds/MDSMap.cc
+++ b/src/mds/MDSMap.cc
@@ -31,7 +31,6 @@ CompatSet get_mdsmap_compat_set_all() {
   feature_incompat.insert(MDS_FEATURE_INCOMPAT_ENCODING);
   feature_incompat.insert(MDS_FEATURE_INCOMPAT_OMAPDIRFRAG);
   feature_incompat.insert(MDS_FEATURE_INCOMPAT_INLINE);
-  feature_incompat.insert(MDS_FEATURE_INCOMPAT_NOANCHOR);
 
   return CompatSet(feature_compat, feature_ro_compat, feature_incompat);
 }
@@ -46,7 +45,6 @@ CompatSet get_mdsmap_compat_set_default() {
   feature_incompat.insert(MDS_FEATURE_INCOMPAT_DIRINODE);
   feature_incompat.insert(MDS_FEATURE_INCOMPAT_ENCODING);
   feature_incompat.insert(MDS_FEATURE_INCOMPAT_OMAPDIRFRAG);
-  feature_incompat.insert(MDS_FEATURE_INCOMPAT_NOANCHOR);
 
   return CompatSet(feature_compat, feature_ro_compat, feature_incompat);
 }
@@ -144,8 +142,6 @@ void MDSMap::dump(Formatter *f) const
     f->dump_int("pool", *p);
   f->close_section();
   f->dump_int("metadata_pool", metadata_pool);
-  f->dump_bool("enabled", enabled);
-  f->dump_string("fs_name", fs_name);
 }
 
 void MDSMap::generate_test_instances(list<MDSMap*>& ls)
@@ -365,7 +361,7 @@ void MDSMap::mds_info_t::encode_versioned(bufferlist& bl, uint64_t features) con
   ::encode(name, bl);
   ::encode(rank, bl);
   ::encode(inc, bl);
-  ::encode((int32_t)state, bl);
+  ::encode(state, bl);
   ::encode(state_seq, bl);
   ::encode(addr, bl);
   ::encode(laggy_since, bl);
@@ -383,7 +379,7 @@ void MDSMap::mds_info_t::encode_unversioned(bufferlist& bl) const
   ::encode(name, bl);
   ::encode(rank, bl);
   ::encode(inc, bl);
-  ::encode((int32_t)state, bl);
+  ::encode(state, bl);
   ::encode(state_seq, bl);
   ::encode(addr, bl);
   ::encode(laggy_since, bl);
@@ -399,7 +395,7 @@ void MDSMap::mds_info_t::decode(bufferlist::iterator& bl)
   ::decode(name, bl);
   ::decode(rank, bl);
   ::decode(inc, bl);
-  ::decode((int32_t&)(state), bl);
+  ::decode(state, bl);
   ::decode(state_seq, bl);
   ::decode(addr, bl);
   ::decode(laggy_since, bl);
@@ -477,47 +473,44 @@ void MDSMap::encode(bufferlist& bl, uint64_t features) const
     ::encode(failed, bl);
     ::encode(stopped, bl);
     ::encode(last_failure_osd_epoch, bl);
-    return;
-  }
-
-  ENCODE_START(5, 4, bl);
-  ::encode(epoch, bl);
-  ::encode(flags, bl);
-  ::encode(last_failure, bl);
-  ::encode(root, bl);
-  ::encode(session_timeout, bl);
-  ::encode(session_autoclose, bl);
-  ::encode(max_file_size, bl);
-  ::encode(max_mds, bl);
-  ::encode(mds_info, bl, features);
-  ::encode(data_pools, bl);
-  ::encode(cas_pool, bl);
+  } else {// have MDS encoding feature!
+    ENCODE_START(4, 4, bl);
+    ::encode(epoch, bl);
+    ::encode(flags, bl);
+    ::encode(last_failure, bl);
+    ::encode(root, bl);
+    ::encode(session_timeout, bl);
+    ::encode(session_autoclose, bl);
+    ::encode(max_file_size, bl);
+    ::encode(max_mds, bl);
+    ::encode(mds_info, bl, features);
+    ::encode(data_pools, bl);
+    ::encode(cas_pool, bl);
 
-  // kclient ignores everything from here
-  __u16 ev = 8;
-  ::encode(ev, bl);
-  ::encode(compat, bl);
-  ::encode(metadata_pool, bl);
-  ::encode(created, bl);
-  ::encode(modified, bl);
-  ::encode(tableserver, bl);
-  ::encode(in, bl);
-  ::encode(inc, bl);
-  ::encode(up, bl);
-  ::encode(failed, bl);
-  ::encode(stopped, bl);
-  ::encode(last_failure_osd_epoch, bl);
-  ::encode(ever_allowed_snaps, bl);
-  ::encode(explicitly_allowed_snaps, bl);
-  ::encode(inline_data_enabled, bl);
-  ::encode(enabled, bl);
-  ::encode(fs_name, bl);
-  ENCODE_FINISH(bl);
+    // kclient ignores everything from here
+    __u16 ev = 7;
+    ::encode(ev, bl);
+    ::encode(compat, bl);
+    ::encode(metadata_pool, bl);
+    ::encode(created, bl);
+    ::encode(modified, bl);
+    ::encode(tableserver, bl);
+    ::encode(in, bl);
+    ::encode(inc, bl);
+    ::encode(up, bl);
+    ::encode(failed, bl);
+    ::encode(stopped, bl);
+    ::encode(last_failure_osd_epoch, bl);
+    ::encode(ever_allowed_snaps, bl);
+    ::encode(explicitly_allowed_snaps, bl);
+    ::encode(inline_data_enabled, bl);
+    ENCODE_FINISH(bl);
+  }
 }
 
 void MDSMap::decode(bufferlist::iterator& p)
 {
-  DECODE_START_LEGACY_COMPAT_LEN_16(5, 4, 4, p);
+  DECODE_START_LEGACY_COMPAT_LEN_16(4, 4, 4, p);
   ::decode(epoch, p);
   ::decode(flags, p);
   ::decode(last_failure, p);
@@ -577,21 +570,5 @@ void MDSMap::decode(bufferlist::iterator& p)
   }
   if (ev >= 7)
     ::decode(inline_data_enabled, p);
-
-  if (ev >= 8) {
-    assert(struct_v >= 5);
-    ::decode(enabled, p);
-    ::decode(fs_name, p);
-  } else {
-    if (epoch > 1) {
-      // If an MDS has ever been started, epoch will be greater than 1,
-      // assume filesystem is enabled.
-      enabled = true;
-    } else {
-      // Upgrading from a cluster that never used an MDS, switch off
-      // filesystem until it's explicitly enabled.
-      enabled = false;
-    }
-  }
   DECODE_FINISH(p);
 }
diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h
index 84ba4d4..8046a7c 100644
--- a/src/mds/MDSMap.h
+++ b/src/mds/MDSMap.h
@@ -25,6 +25,7 @@
 #include <set>
 #include <map>
 #include <string>
+using namespace std;
 
 #include "common/config.h"
 
@@ -68,49 +69,32 @@ extern CompatSet get_mdsmap_compat_set_base(); // pre v0.20
 #define MDS_FEATURE_INCOMPAT_ENCODING CompatSet::Feature(5, "mds uses versioned encoding")
 #define MDS_FEATURE_INCOMPAT_OMAPDIRFRAG CompatSet::Feature(6, "dirfrag is stored in omap")
 #define MDS_FEATURE_INCOMPAT_INLINE CompatSet::Feature(7, "mds uses inline data")
-#define MDS_FEATURE_INCOMPAT_NOANCHOR CompatSet::Feature(8, "no anchor table")
-
-#define MDS_FS_NAME_DEFAULT "cephfs"
 
 class MDSMap {
 public:
-  /* These states are the union of the set of possible states of an MDS daemon,
-   * and the set of possible states of an MDS rank */
-  typedef enum {
-    // States of an MDS daemon not currently holding a rank
-    // ====================================================
-    STATE_NULL     =   0,                                  // null value for fns returning this type.
-    STATE_BOOT     =   CEPH_MDS_STATE_BOOT,                // up, boot announcement.  destiny unknown.
-    STATE_STANDBY  =   CEPH_MDS_STATE_STANDBY,             // up, idle.  waiting for assignment by monitor.
-    STATE_STANDBY_REPLAY = CEPH_MDS_STATE_STANDBY_REPLAY,  // up, replaying active node, ready to take over.
-
-    // States of an MDS rank, and of any MDS daemon holding that rank
-    // ==============================================================
-    STATE_STOPPED  =   CEPH_MDS_STATE_STOPPED,        // down, once existed, but no subtrees. empty log.  may not be held by a daemon.
-    STATE_ONESHOT_REPLAY = CEPH_MDS_STATE_REPLAYONCE, // up, replaying active node journal to verify it, then shutting down
-
-    STATE_CREATING  =  CEPH_MDS_STATE_CREATING,       // up, creating MDS instance (new journal, idalloc..).
-    STATE_STARTING  =  CEPH_MDS_STATE_STARTING,       // up, starting prior stopped MDS instance.
-
-    STATE_REPLAY    =  CEPH_MDS_STATE_REPLAY,         // up, starting prior failed instance. scanning journal.
-    STATE_RESOLVE   =  CEPH_MDS_STATE_RESOLVE,        // up, disambiguating distributed operations (import, rename, etc.)
-    STATE_RECONNECT =  CEPH_MDS_STATE_RECONNECT,      // up, reconnect to clients
-    STATE_REJOIN    =  CEPH_MDS_STATE_REJOIN,         // up, replayed journal, rejoining distributed cache
-    STATE_CLIENTREPLAY = CEPH_MDS_STATE_CLIENTREPLAY, // up, active
-    STATE_ACTIVE =     CEPH_MDS_STATE_ACTIVE,         // up, active
-    STATE_STOPPING  =  CEPH_MDS_STATE_STOPPING,       // up, exporting metadata (-> standby or out)
-    STATE_DNE       =  CEPH_MDS_STATE_DNE             // down, rank does not exist
-
-    /*
-     * In addition to explicit states, an MDS rank implicitly in state:
-     *  - STOPPED if it is not currently associated with an MDS daemon gid but it
-     *    is in MDSMap::stopped
-     *  - FAILED if it is not currently associated with an MDS daemon gid but it
-     *    is in MDSMap::failed
-     *  - DNE if it is not currently associated with an MDS daemon gid and it is
-     *    missing from both MDSMap::failed and MDSMap::stopped
-     */
-  } DaemonState;
+  // mds states
+  /*
+  static const int STATE_DNE =        CEPH_MDS_STATE_DNE;  // down, never existed.
+  static const int STATE_DESTROYING = CEPH_MDS_STATE_DESTROYING;  // down, existing, semi-destroyed.
+  static const int STATE_FAILED =     CEPH_MDS_STATE_FAILED;  // down, active subtrees; needs to be recovered.
+  */
+  static const int STATE_STOPPED =    CEPH_MDS_STATE_STOPPED;  // down, once existed, but no subtrees. empty log.
+  static const int STATE_BOOT     =   CEPH_MDS_STATE_BOOT;  // up, boot announcement.  destiny unknown.
+
+  static const int STATE_STANDBY  =   CEPH_MDS_STATE_STANDBY;  // up, idle.  waiting for assignment by monitor.
+  static const int STATE_STANDBY_REPLAY = CEPH_MDS_STATE_STANDBY_REPLAY;  // up, replaying active node; ready to take over.
+  static const int STATE_ONESHOT_REPLAY = CEPH_MDS_STATE_REPLAYONCE; //up, replaying active node journal to verify it, then shutting down
+
+  static const int STATE_CREATING  =  CEPH_MDS_STATE_CREATING;  // up, creating MDS instance (new journal, idalloc..).
+  static const int STATE_STARTING  =  CEPH_MDS_STATE_STARTING;  // up, starting prior stopped MDS instance.
+
+  static const int STATE_REPLAY    =  CEPH_MDS_STATE_REPLAY;  // up, starting prior failed instance. scanning journal.
+  static const int STATE_RESOLVE   =  CEPH_MDS_STATE_RESOLVE;  // up, disambiguating distributed operations (import, rename, etc.)
+  static const int STATE_RECONNECT =  CEPH_MDS_STATE_RECONNECT;  // up, reconnect to clients
+  static const int STATE_REJOIN    =  CEPH_MDS_STATE_REJOIN; // up, replayed journal, rejoining distributed cache
+  static const int STATE_CLIENTREPLAY = CEPH_MDS_STATE_CLIENTREPLAY; // up, active
+  static const int STATE_ACTIVE =     CEPH_MDS_STATE_ACTIVE; // up, active
+  static const int STATE_STOPPING  =  CEPH_MDS_STATE_STOPPING; // up, exporting metadata (-> standby or out)
 
   // indicate startup standby preferences for MDS
   // of course, if they have a specific rank to follow, they just set that!
@@ -124,16 +108,16 @@ public:
 
   struct mds_info_t {
     uint64_t global_id;
-    std::string name;
+    string name;
     int32_t rank;
     int32_t inc;
-    MDSMap::DaemonState state;
+    int32_t state;
     version_t state_seq;
     entity_addr_t addr;
     utime_t laggy_since;
     int32_t standby_for_rank;
-    std::string standby_for_name;
-    std::set<int32_t> export_targets;
+    string standby_for_name;
+    set<int32_t> export_targets;
 
     mds_info_t() : global_id(0), rank(-1), inc(0), state(STATE_STANDBY), state_seq(0),
 		   standby_for_rank(MDS_NO_STANDBY_PREF) { }
@@ -159,22 +143,20 @@ public:
 protected:
   // base map
   epoch_t epoch;
-  bool enabled;
-  std::string fs_name;
   uint32_t flags;        // flags
   epoch_t last_failure;  // mds epoch of last failure
   epoch_t last_failure_osd_epoch; // osd epoch of last failure; any mds entering replay needs
                                   // at least this osdmap to ensure the blacklist propagates.
   utime_t created, modified;
 
-  int32_t tableserver;   // which MDS has snaptable
+  int32_t tableserver;   // which MDS has anchortable, snaptable
   int32_t root;          // which MDS has root directory
 
   __u32 session_timeout;
   __u32 session_autoclose;
   uint64_t max_file_size;
 
-  std::set<int64_t> data_pools;  // file data pools available to clients (via an ioctl).  first is the default.
+  set<int64_t> data_pools;  // file data pools available to clients (via an ioctl).  first is the default.
   int64_t cas_pool;            // where CAS objects go
   int64_t metadata_pool;       // where fs metadata objects go
   
@@ -190,11 +172,11 @@ protected:
 
   uint32_t max_mds; /* The maximum number of active MDSes. Also, the maximum rank. */
 
-  std::set<int32_t> in;              // currently defined cluster
-  std::map<int32_t,int32_t> inc;     // most recent incarnation.
-  std::set<int32_t> failed, stopped; // which roles are failed or stopped
-  std::map<int32_t,uint64_t> up;        // who is in those roles
-  std::map<uint64_t,mds_info_t> mds_info;
+  set<int32_t> in;              // currently defined cluster
+  map<int32_t,int32_t> inc;     // most recent incarnation.
+  set<int32_t> failed, stopped; // which roles are failed or stopped
+  map<int32_t,uint64_t> up;        // who is in those roles
+  map<uint64_t,mds_info_t> mds_info;
 
   bool ever_allowed_snaps; //< the cluster has ever allowed snap creation
   bool explicitly_allowed_snaps; //< the user has explicitly enabled snap creation
@@ -208,10 +190,7 @@ public:
 
 public:
   MDSMap() 
-    : epoch(0), enabled(false), fs_name(MDS_FS_NAME_DEFAULT),
-      flags(0), last_failure(0),
-      last_failure_osd_epoch(0),
-      tableserver(0), root(0),
+    : epoch(0), flags(0), last_failure(0), last_failure_osd_epoch(0), tableserver(0), root(0),
       session_timeout(0),
       session_autoclose(0),
       max_file_size(0),
@@ -247,8 +226,6 @@ public:
   epoch_t get_epoch() const { return epoch; }
   void inc_epoch() { epoch++; }
 
-  bool get_enabled() const { return enabled; }
-
   const utime_t& get_created() const { return created; }
   void set_created(utime_t ct) { modified = created = ct; }
   const utime_t& get_modified() const { return modified; }
@@ -263,7 +240,7 @@ public:
   int get_tableserver() const { return tableserver; }
   int get_root() const { return root; }
 
-  const std::set<int64_t> &get_data_pools() const { return data_pools; }
+  const set<int64_t> &get_data_pools() const { return data_pools; }
   int64_t get_first_data_pool() const { return *data_pools.begin(); }
   int64_t get_cas_pool() const { return cas_pool; }
   int64_t get_metadata_pool() const { return metadata_pool; }
@@ -271,11 +248,7 @@ public:
     return data_pools.count(poolid);
   }
 
-  bool pool_in_use(int64_t poolid) const {
-    return get_enabled() && (is_data_pool(poolid) || metadata_pool == poolid);
-  }
-
-  const std::map<uint64_t,mds_info_t>& get_mds_info() { return mds_info; }
+  const map<uint64_t,mds_info_t>& get_mds_info() { return mds_info; }
   const mds_info_t& get_mds_info_gid(uint64_t gid) {
     assert(mds_info.count(gid));
     return mds_info[gid];
@@ -284,8 +257,8 @@ public:
     assert(up.count(m) && mds_info.count(up[m]));
     return mds_info[up[m]];
   }
-  uint64_t find_mds_gid_by_name(const std::string& s) {
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+  uint64_t find_mds_gid_by_name(const string& s) {
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p) {
       if (p->second.name == s) {
@@ -307,7 +280,7 @@ public:
   }
   unsigned get_num_mds(int state) const {
     unsigned n = 0;
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p)
       if (p->second.state == state) ++n;
@@ -319,7 +292,7 @@ public:
     data_pools.insert(poolid);
   }
   int remove_data_pool(int64_t poolid) {
-    std::set<int64_t>::iterator p = data_pools.find(poolid);
+    set<int64_t>::iterator p = data_pools.find(poolid);
     if (p == data_pools.end())
       return -ENOENT;
     data_pools.erase(p);
@@ -327,45 +300,45 @@ public:
   }
 
   // sets
-  void get_mds_set(std::set<int>& s) {
+  void get_mds_set(set<int>& s) {
     s = in;
   }
-  void get_up_mds_set(std::set<int>& s) {
-    for (std::map<int32_t,uint64_t>::const_iterator p = up.begin();
+  void get_up_mds_set(set<int>& s) {
+    for (map<int32_t,uint64_t>::const_iterator p = up.begin();
 	 p != up.end();
 	 ++p)
       s.insert(p->first);
   }
-  void get_active_mds_set(std::set<int>& s) {
+  void get_active_mds_set(set<int>& s) {
     get_mds_set(s, MDSMap::STATE_ACTIVE);
   }
-  void get_failed_mds_set(std::set<int>& s) {
+  void get_failed_mds_set(set<int>& s) {
     s = failed;
   }
   int get_failed() {
     if (!failed.empty()) return *failed.begin();
     return -1;
   }
-  void get_stopped_mds_set(std::set<int>& s) {
+  void get_stopped_mds_set(set<int>& s) {
     s = stopped;
   }
-  void get_recovery_mds_set(std::set<int>& s) {
+  void get_recovery_mds_set(set<int>& s) {
     s = failed;
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p)
       if (p->second.state >= STATE_REPLAY && p->second.state <= STATE_STOPPING)
 	s.insert(p->second.rank);
   }
-  void get_clientreplay_or_active_or_stopping_mds_set(std::set<int>& s) {
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+  void get_clientreplay_or_active_or_stopping_mds_set(set<int>& s) {
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p)
       if (p->second.state >= STATE_CLIENTREPLAY && p->second.state <= STATE_STOPPING)
 	s.insert(p->second.rank);
   }
-  void get_mds_set(std::set<int>& s, DaemonState state) {
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+  void get_mds_set(set<int>& s, int state) {
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p)
       if (p->second.state == state)
@@ -375,14 +348,14 @@ public:
   int get_random_up_mds() {
     if (up.empty())
       return -1;
-    std::map<int32_t,uint64_t>::iterator p = up.begin();
+    map<int32_t,uint64_t>::iterator p = up.begin();
     for (int n = rand() % up.size(); n; n--)
       ++p;
     return p->first;
   }
 
-  const mds_info_t* find_by_name(const std::string& name) const {
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+  const mds_info_t* find_by_name(const string& name) const {
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p) {
       if (p->second.name == name)
@@ -391,10 +364,10 @@ public:
     return NULL;
   }
 
-  uint64_t find_standby_for(int mds, std::string& name) {
-    std::map<uint64_t, mds_info_t>::const_iterator generic_standby
+  uint64_t find_standby_for(int mds, string& name) {
+    map<uint64_t, mds_info_t>::const_iterator generic_standby
       = mds_info.end();
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p) {
       if ((p->second.state != MDSMap::STATE_STANDBY && p->second.state != MDSMap::STATE_STANDBY_REPLAY) ||
@@ -410,8 +383,8 @@ public:
       return generic_standby->first;
     return 0;
   }
-  uint64_t find_unused_for(int mds, std::string& name) {
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+  uint64_t find_unused_for(int mds, string& name) {
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p) {
       if (p->second.state != MDSMap::STATE_STANDBY ||
@@ -426,7 +399,7 @@ public:
     }
     return 0;
   }
-  uint64_t find_replacement_for(int mds, std::string& name) {
+  uint64_t find_replacement_for(int mds, string& name) {
     uint64_t standby = find_standby_for(mds, name);
     if (standby)
       return standby;
@@ -434,8 +407,8 @@ public:
       return find_unused_for(mds, name);
   }
 
-  void get_health(list<pair<health_status_t,std::string> >& summary,
-		  list<pair<health_status_t,std::string> > *detail) const;
+  void get_health(list<pair<health_status_t,string> >& summary,
+		  list<pair<health_status_t,string> > *detail) const;
 
   // mds states
   bool is_down(int m) const { return up.count(m) == 0; }
@@ -449,23 +422,16 @@ public:
   bool is_dne(int m) const      { return in.count(m) == 0; }
   bool is_dne_gid(uint64_t gid) const     { return mds_info.count(gid) == 0; }
 
-  /**
-   * Get MDS rank state if the rank is up, else STATE_NULL
-   */
-  DaemonState get_state(int m) const {
-    std::map<int32_t,uint64_t>::const_iterator u = up.find(m);
+  int get_state(int m) const {
+    map<int32_t,uint64_t>::const_iterator u = up.find(m);
     if (u == up.end())
-      return STATE_NULL;
+      return 0;
     return get_state_gid(u->second);
   }
-
-  /**
-   * Get MDS daemon status by GID
-   */
-  DaemonState get_state_gid(uint64_t gid) const {
-    std::map<uint64_t,mds_info_t>::const_iterator i = mds_info.find(gid);
+  int get_state_gid(uint64_t gid) const {
+    map<uint64_t,mds_info_t>::const_iterator i = mds_info.find(gid);
     if (i == mds_info.end())
-      return STATE_NULL;
+      return 0;
     return i->second.state;
   }
 
@@ -501,7 +467,7 @@ public:
   bool is_laggy_gid(uint64_t gid) const {
     if (!mds_info.count(gid))
       return false;
-    std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.find(gid);
+    map<uint64_t,mds_info_t>::const_iterator p = mds_info.find(gid);
     return p->second.laggy();
   }
 
@@ -513,7 +479,7 @@ public:
   bool is_degraded() const {   // degraded = some recovery in process.  fixes active membership and recovery_set.
     if (!failed.empty())
       return true;
-    for (std::map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
+    for (map<uint64_t,mds_info_t>::const_iterator p = mds_info.begin();
 	 p != mds_info.end();
 	 ++p)
       if (p->second.state >= STATE_REPLAY && p->second.state <= STATE_CLIENTREPLAY)
diff --git a/src/mds/MDSTable.cc b/src/mds/MDSTable.cc
index 323740f..967c9ee 100644
--- a/src/mds/MDSTable.cc
+++ b/src/mds/MDSTable.cc
@@ -22,8 +22,6 @@
 #include "include/types.h"
 
 #include "common/config.h"
-#include "common/Finisher.h"
-
 #include "include/assert.h"
 
 
@@ -32,28 +30,17 @@
 #define dout_prefix *_dout << "mds." << (mds ? mds->get_nodeid() : -1) << "." << table_name << ": "
 
 
-class MDSTableIOContext : public MDSIOContextBase
-{
-  protected:
-    MDSTable *ida;
-    MDS *get_mds() {return ida->mds;}
-  public:
-    MDSTableIOContext(MDSTable *ida_) : ida(ida_) {
-      assert(ida != NULL);
-    }
-};
-
-
-class C_IO_MT_Save : public MDSTableIOContext {
+class C_MT_Save : public Context {
+  MDSTable *ida;
   version_t version;
 public:
-  C_IO_MT_Save(MDSTable *i, version_t v) : MDSTableIOContext(i), version(v) {}
+  C_MT_Save(MDSTable *i, version_t v) : ida(i), version(v) {}
   void finish(int r) {
     ida->save_2(r, version);
   }
 };
 
-void MDSTable::save(MDSInternalContextBase *onfinish, version_t v)
+void MDSTable::save(Context *onfinish, version_t v)
 {
   if (v > 0 && v <= committing_version) {
     dout(10) << "save v " << version << " - already saving "
@@ -81,9 +68,7 @@ void MDSTable::save(MDSInternalContextBase *onfinish, version_t v)
   mds->objecter->write_full(oid, oloc,
 			    snapc,
 			    bl, ceph_clock_now(g_ceph_context), 0,
-			    NULL,
-			    new C_OnFinisher(new C_IO_MT_Save(this, version),
-					     &mds->finisher));
+			    NULL, new C_MT_Save(this, version));
 }
 
 void MDSTable::save_2(int r, version_t v)
@@ -100,7 +85,7 @@ void MDSTable::save_2(int r, version_t v)
   assert(r >= 0);
   committed_version = v;
   
-  list<MDSInternalContextBase*> ls;
+  list<Context*> ls;
   while (!waitfor_save.empty()) {
     if (waitfor_save.begin()->first > v) break;
     ls.splice(ls.end(), waitfor_save.begin()->second);
@@ -120,11 +105,12 @@ void MDSTable::reset()
 
 // -----------------------
 
-class C_IO_MT_Load : public MDSTableIOContext {
+class C_MT_Load : public Context {
 public:
+  MDSTable *ida;
   Context *onfinish;
   bufferlist bl;
-  C_IO_MT_Load(MDSTable *i, Context *o) : MDSTableIOContext(i), onfinish(o) {}
+  C_MT_Load(MDSTable *i, Context *o) : ida(i), onfinish(o) {}
   void finish(int r) {
     ida->load_2(r, bl, onfinish);
   }
@@ -140,18 +126,17 @@ object_t MDSTable::get_object_name()
   return object_t(n);
 }
 
-void MDSTable::load(MDSInternalContextBase *onfinish)
+void MDSTable::load(Context *onfinish)
 { 
   dout(10) << "load" << dendl;
 
   assert(is_undef());
   state = STATE_OPENING;
 
-  C_IO_MT_Load *c = new C_IO_MT_Load(this, onfinish);
+  C_MT_Load *c = new C_MT_Load(this, onfinish);
   object_t oid = get_object_name();
   object_locator_t oloc(mds->mdsmap->get_metadata_pool());
-  mds->objecter->read_full(oid, oloc, CEPH_NOSNAP, &c->bl, 0,
-			   new C_OnFinisher(c, &mds->finisher));
+  mds->objecter->read_full(oid, oloc, CEPH_NOSNAP, &c->bl, 0, c);
 }
 
 void MDSTable::load_2(int r, bufferlist& bl, Context *onfinish)
diff --git a/src/mds/MDSTable.h b/src/mds/MDSTable.h
index c68a615..edcb203 100644
--- a/src/mds/MDSTable.h
+++ b/src/mds/MDSTable.h
@@ -18,15 +18,14 @@
 #include "mdstypes.h"
 #include "mds_table_types.h"
 #include "include/buffer.h"
+#include "include/Context.h"
 
 class MDS;
-class Context;
-class MDSInternalContextBase;
 
 class MDSTable {
-public:
+ protected:
   MDS *mds;
-protected:
+
   const char *table_name;
   bool per_mds;
 
@@ -40,7 +39,7 @@ protected:
   
   version_t version, committing_version, committed_version, projected_version;
   
-  map<version_t, list<MDSInternalContextBase*> > waitfor_save;
+  map<version_t, list<Context*> > waitfor_save;
   
 public:
   MDSTable(MDS *m, const char *n, bool is_per_mds) :
@@ -67,14 +66,14 @@ public:
   bool is_opening() { return state == STATE_OPENING; }
 
   void reset();
-  void save(MDSInternalContextBase *onfinish=0, version_t need=0);
+  void save(Context *onfinish=0, version_t need=0);
   void save_2(int r, version_t v);
 
   void shutdown() {
     if (is_active()) save(0);
   }
 
-  void load(MDSInternalContextBase *onfinish);
+  void load(Context *onfinish);
   void load_2(int, bufferlist&, Context *onfinish);
 
   // child must overload these
diff --git a/src/mds/MDSTableClient.cc b/src/mds/MDSTableClient.cc
index 2ba4f49..cc3152f 100644
--- a/src/mds/MDSTableClient.cc
+++ b/src/mds/MDSTableClient.cc
@@ -16,7 +16,7 @@
 
 #include "MDSMap.h"
 
-#include "MDSContext.h"
+#include "include/Context.h"
 #include "msg/Messenger.h"
 
 #include "MDS.h"
@@ -35,17 +35,6 @@
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".tableclient(" << get_mdstable_name(table) << ") "
 
 
-class C_LoggedAck : public MDSInternalContext {
-  MDSTableClient *tc;
-  version_t tid;
-public:
-  C_LoggedAck(MDSTableClient *a, version_t t) : MDSInternalContext(a->mds), tc(a), tid(t) {}
-  void finish(int r) {
-    tc->_logged_ack(tid);
-  }
-};
-
-
 void MDSTableClient::handle_request(class MMDSTableRequest *m)
 {
   dout(10) << "handle_request " << *m << dendl;
@@ -65,7 +54,7 @@ void MDSTableClient::handle_request(class MMDSTableRequest *m)
 
       assert(g_conf->mds_kill_mdstable_at != 3);
 
-      MDSInternalContextBase *onfinish = pending_prepare[reqid].onfinish;
+      Context *onfinish = pending_prepare[reqid].onfinish;
       *pending_prepare[reqid].ptid = tid;
       if (pending_prepare[reqid].pbl)
 	*pending_prepare[reqid].pbl = m->bl;
@@ -149,7 +138,7 @@ void MDSTableClient::_logged_ack(version_t tid)
 }
 
 void MDSTableClient::_prepare(bufferlist& mutation, version_t *ptid, bufferlist *pbl,
-			      MDSInternalContextBase *onfinish)
+			      Context *onfinish)
 {
   if (last_reqid == ~0ULL) {
     dout(10) << "tableserver is not ready yet, waiting for request id" << dendl;
diff --git a/src/mds/MDSTableClient.h b/src/mds/MDSTableClient.h
index 064cc28..16b14c4 100644
--- a/src/mds/MDSTableClient.h
+++ b/src/mds/MDSTableClient.h
@@ -16,7 +16,7 @@
 #define CEPH_MDSTABLECLIENT_H
 
 #include "include/types.h"
-#include "MDSContext.h"
+#include "include/Context.h"
 #include "mds_table_types.h"
 
 class MDS;
@@ -34,13 +34,13 @@ protected:
 
   // prepares
   struct _pending_prepare {
-    MDSInternalContextBase *onfinish;
+    Context *onfinish;
     version_t *ptid;
     bufferlist *pbl; 
     bufferlist mutation;
 
     _pending_prepare() : onfinish(0), ptid(0), pbl(0) {}
-    _pending_prepare(MDSInternalContextBase *c, version_t *pt, bufferlist *pb, bufferlist& m) :
+    _pending_prepare(Context *c, version_t *pt, bufferlist *pb, bufferlist& m) :
       onfinish(c), ptid(pt), pbl(pb), mutation(m) {}
   };
 
@@ -50,11 +50,20 @@ protected:
 
   // pending commits
   map<version_t, LogSegment*> pending_commit;
-  map<version_t, list<MDSInternalContextBase*> > ack_waiters;
+  map<version_t, list<Context*> > ack_waiters;
 
   void handle_reply(class MMDSTableQuery *m);  
+
+  class C_LoggedAck : public Context {
+    MDSTableClient *tc;
+    version_t tid;
+  public:
+    C_LoggedAck(MDSTableClient *a, version_t t) : tc(a), tid(t) {}
+    void finish(int r) {
+      tc->_logged_ack(tid);
+    }
+  };
   void _logged_ack(version_t tid);
-  friend class C_LoggedAck;
 
 public:
   MDSTableClient(MDS *m, int tab) :
@@ -63,7 +72,7 @@ public:
 
   void handle_request(MMDSTableRequest *m);
 
-  void _prepare(bufferlist& mutation, version_t *ptid, bufferlist *pbl, MDSInternalContextBase *onfinish);
+  void _prepare(bufferlist& mutation, version_t *ptid, bufferlist *pbl, Context *onfinish);
   void commit(version_t tid, LogSegment *ls);
 
   void resend_commits();
@@ -76,7 +85,7 @@ public:
   bool has_committed(version_t tid) {
     return pending_commit.count(tid) == 0;
   }
-  void wait_for_ack(version_t tid, MDSInternalContextBase *c) {
+  void wait_for_ack(version_t tid, Context *c) {
     ack_waiters[tid].push_back(c);
   }
 
diff --git a/src/mds/MDSTableServer.cc b/src/mds/MDSTableServer.cc
index fc6221c..b775246 100644
--- a/src/mds/MDSTableServer.cc
+++ b/src/mds/MDSTableServer.cc
@@ -37,18 +37,6 @@ void MDSTableServer::handle_request(MMDSTableRequest *req)
   }
 }
 
-class C_Prepare : public MDSInternalContext {
-  MDSTableServer *server;
-  MMDSTableRequest *req;
-  version_t tid;
-public:
-
-  C_Prepare(MDSTableServer *s, MMDSTableRequest *r, version_t v) : MDSInternalContext(s->mds), server(s), req(r), tid(v) {}
-  void finish(int r) {
-    server->_prepare_logged(req, tid);
-  }
-};
-
 // prepare
 /* This function DOES put the passed message before returning */
 void MDSTableServer::handle_prepare(MMDSTableRequest *req)
@@ -81,15 +69,6 @@ void MDSTableServer::_prepare_logged(MMDSTableRequest *req, version_t tid)
   req->put();
 }
 
-class C_Commit : public MDSInternalContext {
-  MDSTableServer *server;
-  MMDSTableRequest *req;
-public:
-  C_Commit(MDSTableServer *s, MMDSTableRequest *r) : MDSInternalContext(s->mds), server(s), req(r) {}
-  void finish(int r) {
-    server->_commit_logged(req);
-  }
-};
 
 // commit
 /* This function DOES put the passed message before returning */
@@ -108,8 +87,8 @@ void MDSTableServer::handle_commit(MMDSTableRequest *req)
 
     _note_commit(tid);
     mds->mdlog->start_submit_entry(new ETableServer(table, TABLESERVER_OP_COMMIT, 0, -1, 
-						    tid, version),
-				   new C_Commit(this, req));
+						    tid, version));
+    mds->mdlog->wait_for_safe(new C_Commit(this, req));
   }
   else if (tid <= version) {
     dout(0) << "got commit for tid " << tid << " <= " << version 
diff --git a/src/mds/MDSTableServer.h b/src/mds/MDSTableServer.h
index 8d54693..223fc91 100644
--- a/src/mds/MDSTableServer.h
+++ b/src/mds/MDSTableServer.h
@@ -28,12 +28,26 @@ public:
 private:
   void handle_prepare(MMDSTableRequest *m);
   void _prepare_logged(MMDSTableRequest *m, version_t tid);
-  friend class C_Prepare;
+  struct C_Prepare : public Context {
+    MDSTableServer *server;
+    MMDSTableRequest *req;
+    version_t tid;
+    C_Prepare(MDSTableServer *s, MMDSTableRequest *r, version_t v) : server(s), req(r), tid(v) {}
+    void finish(int r) {
+      server->_prepare_logged(req, tid);
+    }
+  };
 
   void handle_commit(MMDSTableRequest *m);
   void _commit_logged(MMDSTableRequest *m);
-  friend class C_Commit;
-
+  struct C_Commit : public Context {
+    MDSTableServer *server;
+    MMDSTableRequest *req;
+    C_Commit(MDSTableServer *s, MMDSTableRequest *r) : server(s), req(r) {}
+    void finish(int r) {
+      server->_commit_logged(req);
+    }
+  };
 
   void handle_rollback(MMDSTableRequest *m);
 
diff --git a/src/tools/cephfs/MDSUtility.cc b/src/mds/MDSUtility.cc
similarity index 83%
rename from src/tools/cephfs/MDSUtility.cc
rename to src/mds/MDSUtility.cc
index dda9150..09be280 100644
--- a/src/tools/cephfs/MDSUtility.cc
+++ b/src/mds/MDSUtility.cc
@@ -11,7 +11,7 @@
  * Foundation.  See file COPYING.
  */
 
-#include "MDSUtility.h"
+#include "mds/MDSUtility.h"
 #include "mon/MonClient.h"
 
 #define dout_subsys ceph_subsys_mds
@@ -22,13 +22,13 @@ MDSUtility::MDSUtility() :
   objecter(NULL),
   lock("MDSUtility::lock"),
   timer(g_ceph_context, lock),
-  finisher(g_ceph_context, "MDSUtility"),
   waiting_for_mds_map(NULL)
 {
   monc = new MonClient(g_ceph_context);
   messenger = Messenger::create(g_ceph_context, entity_name_t::CLIENT(), "mds", getpid());
   mdsmap = new MDSMap();
-  objecter = new Objecter(g_ceph_context, messenger, monc, 0, 0);
+  osdmap = new OSDMap();
+  objecter = new Objecter(g_ceph_context, messenger, monc, osdmap, lock, timer, 0, 0);
 }
 
 
@@ -37,6 +37,7 @@ MDSUtility::~MDSUtility()
   delete objecter;
   delete monc;
   delete messenger;
+  delete osdmap;
   delete mdsmap;
   assert(waiting_for_mds_map == NULL);
 }
@@ -49,22 +50,12 @@ int MDSUtility::init()
   if (r < 0)
     return r;
 
+  messenger->add_dispatcher_head(this);
   messenger->start();
 
-  objecter->set_client_incarnation(0);
-  objecter->init();
-
-  // Connect dispatchers before starting objecter
-  messenger->add_dispatcher_tail(objecter);
-  messenger->add_dispatcher_tail(this);
-
   // Initialize MonClient
-  if (monc->build_initial_monmap() < 0) {
-    objecter->shutdown();
-    messenger->shutdown();
-    messenger->wait();
+  if (monc->build_initial_monmap() < 0)
     return -1;
-  }
 
   monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
   monc->set_messenger(messenger);
@@ -72,18 +63,18 @@ int MDSUtility::init()
   r = monc->authenticate();
   if (r < 0) {
     derr << "Authentication failed, did you specify an MDS ID with a valid keyring?" << dendl;
-    monc->shutdown();
-    objecter->shutdown();
-    messenger->shutdown();
-    messenger->wait();
     return r;
   }
 
   client_t whoami = monc->get_global_id();
   messenger->set_myname(entity_name_t::CLIENT(whoami.v));
 
-  // Start Objecter and wait for OSD map
-  objecter->start();
+  // Initialize Objecter and wait for OSD map
+  objecter->set_client_incarnation(0);
+  objecter->init_unlocked();
+  lock.Lock();
+  objecter->init_locked();
+  lock.Unlock();
   objecter->wait_for_osd_map();
   timer.init();
 
@@ -106,20 +97,17 @@ int MDSUtility::init()
   init_lock.Unlock();
   dout(4) << "Got MDS map " << mdsmap->get_epoch() << dendl;
 
-  finisher.start();
-
   return 0;
 }
 
 
 void MDSUtility::shutdown()
 {
-  finisher.stop();
-
   lock.Lock();
   timer.shutdown();
-  objecter->shutdown();
+  objecter->shutdown_locked();
   lock.Unlock();
+  objecter->shutdown_unlocked();
   monc->shutdown();
   messenger->shutdown();
   messenger->wait();
@@ -130,10 +118,14 @@ bool MDSUtility::ms_dispatch(Message *m)
 {
    Mutex::Locker locker(lock);
    switch (m->get_type()) {
-   case CEPH_MSG_MDS_MAP:
-     handle_mds_map((MMDSMap*)m);
+   case CEPH_MSG_OSD_OPREPLY:
+     objecter->handle_osd_op_reply((MOSDOpReply *)m);
      break;
    case CEPH_MSG_OSD_MAP:
+     objecter->handle_osd_map((MOSDMap*)m);
+     break;
+   case CEPH_MSG_MDS_MAP:
+     handle_mds_map((MMDSMap*)m);
      break;
    default:
      return false;
diff --git a/src/tools/cephfs/MDSUtility.h b/src/mds/MDSUtility.h
similarity index 96%
rename from src/tools/cephfs/MDSUtility.h
rename to src/mds/MDSUtility.h
index 1674ed0..d3f938e 100644
--- a/src/tools/cephfs/MDSUtility.h
+++ b/src/mds/MDSUtility.h
@@ -14,13 +14,13 @@
 #ifndef MDS_UTILITY_H_
 #define MDS_UTILITY_H_
 
+#include "osd/OSDMap.h"
 #include "osdc/Objecter.h"
 #include "mds/MDSMap.h"
 #include "messages/MMDSMap.h"
 #include "msg/Dispatcher.h"
 #include "msg/Messenger.h"
 #include "auth/Auth.h"
-#include "common/Finisher.h"
 
 /// MDS Utility
 /**
@@ -31,13 +31,13 @@
 class MDSUtility : public Dispatcher {
 protected:
   Objecter *objecter;
+  OSDMap *osdmap;
   MDSMap *mdsmap;
   Messenger *messenger;
   MonClient *monc;
 
   Mutex lock;
   SafeTimer timer;
-  Finisher finisher;
 
   Context *waiting_for_mds_map;
 
diff --git a/src/mds/Makefile.am b/src/mds/Makefile.am
index 71f76d5..4ee3500 100644
--- a/src/mds/Makefile.am
+++ b/src/mds/Makefile.am
@@ -1,14 +1,15 @@
 libmds_la_SOURCES = \
+	mds/Anchor.cc \
 	mds/Capability.cc \
+	mds/Dumper.cc \
+	mds/Resetter.cc \
 	mds/MDS.cc \
-	mds/Beacon.cc \
 	mds/flock.cc \
 	mds/locks.c \
 	mds/journal.cc \
 	mds/Server.cc \
 	mds/Mutation.cc \
 	mds/MDCache.cc \
-	mds/RecoveryQueue.cc \
 	mds/Locker.cc \
 	mds/Migrator.cc \
 	mds/MDBalancer.cc \
@@ -18,16 +19,16 @@ libmds_la_SOURCES = \
 	mds/LogEvent.cc \
 	mds/MDSTable.cc \
 	mds/InoTable.cc \
-	mds/JournalPointer.cc \
 	mds/MDSTableClient.cc \
 	mds/MDSTableServer.cc \
+	mds/AnchorServer.cc \
+	mds/AnchorClient.cc \
 	mds/SnapRealm.cc \
 	mds/SnapServer.cc \
 	mds/snap.cc \
 	mds/SessionMap.cc \
-	mds/MDSContext.cc \
 	mds/MDLog.cc \
-	common/TrackedOp.cc
+	mds/MDSUtility.cc
 libmds_la_LIBADD = $(LIBOSDC)
 noinst_LTLIBRARIES += libmds.la
 
@@ -36,29 +37,31 @@ noinst_HEADERS += \
 	mds/flock.h \
 	mds/locks.c \
 	mds/locks.h \
+	mds/Anchor.h \
+	mds/AnchorClient.h \
+	mds/AnchorServer.h \
 	mds/CDentry.h \
 	mds/CDir.h \
 	mds/CInode.h \
 	mds/Capability.h \
+	mds/Dumper.h \
 	mds/InoTable.h \
-	mds/JournalPointer.h \
 	mds/LocalLock.h \
 	mds/Locker.h \
 	mds/LogEvent.h \
 	mds/LogSegment.h \
 	mds/MDBalancer.h \
 	mds/MDCache.h \
-	mds/RecoveryQueue.h \
 	mds/MDLog.h \
 	mds/MDS.h \
-	mds/Beacon.h \
-	mds/MDSContext.h \
 	mds/MDSMap.h \
 	mds/MDSTable.h \
 	mds/MDSTableServer.h \
 	mds/MDSTableClient.h \
+	mds/MDSUtility.h \
 	mds/Mutation.h \
 	mds/Migrator.h \
+	mds/Resetter.h \
 	mds/ScatterLock.h \
 	mds/Server.h \
 	mds/SessionMap.h \
@@ -78,7 +81,6 @@ noinst_HEADERS += \
 	mds/events/EImportFinish.h \
 	mds/events/EImportStart.h \
 	mds/events/EMetaBlob.h \
-	mds/events/ENoOp.h \
 	mds/events/EOpen.h \
 	mds/events/EResetJournal.h \
 	mds/events/ESession.h \
diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc
index 81a7565..cde0f70 100644
--- a/src/mds/Migrator.cc
+++ b/src/mds/Migrator.cc
@@ -81,20 +81,6 @@
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".migrator "
 
-
-class MigratorContext : public MDSInternalContextBase {
-protected:
-  Migrator *mig;
-  MDS *get_mds() {
-    return mig->mds;
-  }
-public:
-  MigratorContext(Migrator *mig_) : mig(mig_) {
-    assert(mig != NULL);
-  }
-};
-
-
 /* This function DOES put the passed message before returning*/
 void Migrator::dispatch(Message *m)
 {
@@ -146,10 +132,11 @@ void Migrator::dispatch(Message *m)
 }
 
 
-class C_MDC_EmptyImport : public MigratorContext {
+class C_MDC_EmptyImport : public Context {
+  Migrator *mig;
   CDir *dir;
 public:
-  C_MDC_EmptyImport(Migrator *m, CDir *d) : MigratorContext(m), dir(d) {}
+  C_MDC_EmptyImport(Migrator *m, CDir *d) : mig(m), dir(d) {}
   void finish(int r) {
     mig->export_empty_import(dir);
   }
@@ -258,12 +245,14 @@ void Migrator::export_try_cancel(CDir *dir, bool notify_peer)
     dout(10) << "export state=locking : dropping locks and removing auth_pin" << dendl;
     it->second.state = EXPORT_CANCELLED;
     dir->auth_unpin(this);
+    dir->state_clear(CDir::STATE_EXPORTING);
     break;
   case EXPORT_DISCOVERING:
     dout(10) << "export state=discovering : canceling freeze and removing auth_pin" << dendl;
     it->second.state = EXPORT_CANCELLED;
     dir->unfreeze_tree();  // cancel the freeze
     dir->auth_unpin(this);
+    dir->state_clear(CDir::STATE_EXPORTING);
     if (notify_peer && mds->mdsmap->is_clientreplay_or_active_or_stopping(it->second.peer)) // tell them.
       mds->send_message_mds(new MExportDirCancel(dir->dirfrag(), it->second.tid), it->second.peer);
     break;
@@ -272,6 +261,7 @@ void Migrator::export_try_cancel(CDir *dir, bool notify_peer)
     dout(10) << "export state=freezing : canceling freeze" << dendl;
     it->second.state = EXPORT_CANCELLED;
     dir->unfreeze_tree();  // cancel the freeze
+    dir->state_clear(CDir::STATE_EXPORTING);
     if (notify_peer && mds->mdsmap->is_clientreplay_or_active_or_stopping(it->second.peer)) // tell them.
       mds->send_message_mds(new MExportDirCancel(dir->dirfrag(), it->second.tid), it->second.peer);
     break;
@@ -307,6 +297,7 @@ void Migrator::export_try_cancel(CDir *dir, bool notify_peer)
     dir->unfreeze_tree();
     cache->adjust_subtree_auth(dir, mds->get_nodeid());
     cache->try_subtree_merge(dir);  // NOTE: this may journal subtree_map as side effect
+    dir->state_clear(CDir::STATE_EXPORTING);
     if (notify_peer && mds->mdsmap->is_clientreplay_or_active_or_stopping(it->second.peer)) // tell them.
       mds->send_message_mds(new MExportDirCancel(dir->dirfrag(), it->second.tid), it->second.peer);
     break;
@@ -315,6 +306,7 @@ void Migrator::export_try_cancel(CDir *dir, bool notify_peer)
     dout(10) << "export state=exporting : reversing, and unfreezing" << dendl;
     it->second.state = EXPORT_CANCELLED;
     export_reverse(dir);
+    dir->state_clear(CDir::STATE_EXPORTING);
     break;
 
   case EXPORT_LOGGINGFINISH:
@@ -331,26 +323,23 @@ void Migrator::export_try_cancel(CDir *dir, bool notify_peer)
   if (it->second.state == EXPORT_CANCELLED) {
     // wake up any waiters
     mds->queue_waiters(it->second.waiting_for_finish);
-
-    MutationRef mut = it->second.mut;
-
-    export_state.erase(it);
-    dir->state_clear(CDir::STATE_EXPORTING);
-
-    // send pending import_maps?  (these need to go out when all exports have finished.)
-    cache->maybe_send_pending_resolves();
-
     // drop locks
     if (state == EXPORT_LOCKING || state == EXPORT_DISCOVERING) {
-      MDRequestRef mdr = ceph::static_pointer_cast<MDRequestImpl, MutationImpl>(mut);
+      MDRequestRef mdr = ceph::static_pointer_cast<MDRequestImpl,
+						   MutationImpl>(it->second.mut);
       assert(mdr);
       if (mdr->more()->waiting_on_slave.empty())
 	mds->mdcache->request_finish(mdr);
-    } else if (mut) {
+    } else if (it->second.mut) {
+      MutationRef& mut = it->second.mut;
       mds->locker->drop_locks(mut.get());
       mut->cleanup();
     }
 
+    export_state.erase(it);
+    // send pending import_maps?  (these need to go out when all exports have finished.)
+    cache->maybe_send_pending_resolves();
+
     cache->show_subtrees();
 
     maybe_do_queued_export();
@@ -674,17 +663,16 @@ void Migrator::maybe_do_queued_export()
 
 
 
-class C_MDC_ExportFreeze : public MigratorContext {
+class C_MDC_ExportFreeze : public Context {
+  Migrator *mig;
   CDir *ex;   // dir i'm exporting
-  uint64_t tid;
+
 public:
-  C_MDC_ExportFreeze(Migrator *m, CDir *e, uint64_t t) :
-	MigratorContext(m), ex(e), tid(t) {
-          assert(ex != NULL);
-        }
+  C_MDC_ExportFreeze(Migrator *m, CDir *e) :
+	mig(m), ex(e) {}
   virtual void finish(int r) {
     if (r >= 0)
-      mig->export_frozen(ex, tid);
+      mig->export_frozen(ex);
   }
 };
 
@@ -832,7 +820,7 @@ void Migrator::dispatch_export_dir(MDRequestRef& mdr)
   // start the freeze, but hold it up with an auth_pin.
   dir->freeze_tree();
   assert(dir->is_freezing_tree());
-  dir->add_waiter(CDir::WAIT_FROZEN, new C_MDC_ExportFreeze(this, dir, it->second.tid));
+  dir->add_waiter(CDir::WAIT_FROZEN, new C_MDC_ExportFreeze(this, dir));
 }
 
 /*
@@ -871,16 +859,15 @@ void Migrator::handle_export_discover_ack(MExportDirDiscoverAck *m)
   m->put();  // done
 }
 
-class C_M_ExportSessionsFlushed : public MigratorContext {
+class C_M_ExportSessionsFlushed : public Context {
+  Migrator *migrator;
   CDir *dir;
   uint64_t tid;
 public:
-  C_M_ExportSessionsFlushed(Migrator *m, CDir *d, uint64_t t)
-   : MigratorContext(m), dir(d), tid(t) {
-    assert(dir != NULL);
-  }
+  C_M_ExportSessionsFlushed(Migrator *m, CDir *d, uint64_t t) :
+    migrator(m), dir(d), tid(t) {}
   void finish(int r) {
-    mig->export_sessions_flushed(dir, tid);
+    migrator->export_sessions_flushed(dir, tid);
   }
 };
 
@@ -902,19 +889,15 @@ void Migrator::export_sessions_flushed(CDir *dir, uint64_t tid)
     export_go(dir);     // start export.
 }
 
-void Migrator::export_frozen(CDir *dir, uint64_t tid)
+void Migrator::export_frozen(CDir *dir)
 {
   dout(7) << "export_frozen on " << *dir << dendl;
+  assert(dir->is_frozen());
+  assert(dir->get_cum_auth_pins() == 0);
 
   map<CDir*,export_state_t>::iterator it = export_state.find(dir);
-  if (it == export_state.end() || it->second.tid != tid) {
-    dout(7) << "export must have aborted" << dendl;
-    return;
-  }
-
+  assert(it != export_state.end());
   assert(it->second.state == EXPORT_FREEZING);
-  assert(dir->is_frozen());
-  assert(dir->get_cum_auth_pins() == 0);
 
   CInode *diri = dir->get_inode();
 
@@ -1053,7 +1036,7 @@ void Migrator::export_frozen(CDir *dir, uint64_t tid)
   set<client_t> export_client_set;
   get_export_client_set(dir, export_client_set);
 
-  MDSGatherBuilder gather(g_ceph_context);
+  C_GatherBuilder gather(g_ceph_context);
   mds->server->flush_client_sessions(export_client_set, gather);
   if (gather.has_subs()) {
     it->second.warning_ack_waiting.insert(-1);
@@ -1168,16 +1151,15 @@ void Migrator::handle_export_prep_ack(MExportDirPrepAck *m)
 }
 
 
-class C_M_ExportGo : public MigratorContext {
+class C_M_ExportGo : public Context {
+  Migrator *migrator;
   CDir *dir;
   uint64_t tid;
 public:
   C_M_ExportGo(Migrator *m, CDir *d, uint64_t t) :
-    MigratorContext(m), dir(d), tid(t) {
-      assert(dir != NULL);
-    }
+    migrator(m), dir(d), tid(t) {}
   void finish(int r) {
-    mig->export_go_synced(dir, tid);
+    migrator->export_go_synced(dir, tid);
   }
 };
 
@@ -1241,8 +1223,8 @@ void Migrator::export_go_synced(CDir *dir, uint64_t tid)
   assert(g_conf->mds_kill_export_at != 8);
 
   // stats
-  if (mds->logger) mds->logger->inc(l_mds_exported);
-  if (mds->logger) mds->logger->inc(l_mds_exported_inodes, num_exported_inodes);
+  if (mds->logger) mds->logger->inc(l_mds_ex);
+  if (mds->logger) mds->logger->inc(l_mds_iexp, num_exported_inodes);
 
   cache->show_subtrees();
 }
@@ -1328,7 +1310,7 @@ void Migrator::finish_export_inode_caps(CInode *in, int peer,
 
 void Migrator::finish_export_inode(CInode *in, utime_t now, int peer,
 				   map<client_t,Capability::Import>& peer_imported,
-				   list<MDSInternalContextBase*>& finished)
+				   list<Context*>& finished)
 {
   dout(12) << "finish_export_inode " << *in << dendl;
 
@@ -1475,7 +1457,7 @@ int Migrator::encode_export_dir(bufferlist& exportbl,
 
 void Migrator::finish_export_dir(CDir *dir, utime_t now, int peer,
 				 map<inodeno_t,map<client_t,Capability::Import> >& peer_imported,
-				 list<MDSInternalContextBase*>& finished, int *num_dentries)
+				 list<Context*>& finished)
 {
   dout(10) << "finish_export_dir " << *dir << dendl;
 
@@ -1514,22 +1496,20 @@ void Migrator::finish_export_dir(CDir *dir, utime_t now, int peer,
       // subdirs?
       in->get_nested_dirfrags(subdirs);
     }
-
-    cache->touch_dentry_bottom(dn); // move dentry to tail of LRU
-    ++(*num_dentries);
   }
 
   // subdirs
   for (list<CDir*>::iterator it = subdirs.begin(); it != subdirs.end(); ++it) 
-    finish_export_dir(*it, now, peer, peer_imported, finished, num_dentries);
+    finish_export_dir(*it, now, peer, peer_imported, finished);
 }
 
-class C_MDS_ExportFinishLogged : public MigratorContext {
+class C_MDS_ExportFinishLogged : public Context {
+  Migrator *migrator;
   CDir *dir;
 public:
-  C_MDS_ExportFinishLogged(Migrator *m, CDir *d) : MigratorContext(m), dir(d) {}
+  C_MDS_ExportFinishLogged(Migrator *m, CDir *d) : migrator(m), dir(d) {}
   void finish(int r) {
-    mig->export_logged_finish(dir);
+    migrator->export_logged_finish(dir);
   }
 };
 
@@ -1582,7 +1562,8 @@ void Migrator::handle_export_ack(MExportDirAck *m)
   }
 
   // log export completion, then finish (unfreeze, trigger finish context, etc.)
-  mds->mdlog->submit_entry(le, new C_MDS_ExportFinishLogged(this, dir));
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(new C_MDS_ExportFinishLogged(this, dir));
   mds->mdlog->flush();
   assert (g_conf->mds_kill_export_at != 10);
   
@@ -1780,10 +1761,9 @@ void Migrator::export_finish(CDir *dir)
   assert(g_conf->mds_kill_export_at != 13);
   
   // finish export (adjust local cache state)
-  int num_dentries = 0;
-  C_ContextsBase<MDSInternalContextBase, MDSInternalContextGather> *fin = new C_ContextsBase<MDSInternalContextBase, MDSInternalContextGather>(g_ceph_context);
-  finish_export_dir(dir, ceph_clock_now(g_ceph_context), it->second.peer,
-		    it->second.peer_imported, fin->contexts, &num_dentries);
+  C_Contexts *fin = new C_Contexts(g_ceph_context);
+  finish_export_dir(dir, ceph_clock_now(g_ceph_context),
+		    it->second.peer, it->second.peer_imported, fin->contexts);
   dir->add_waiter(CDir::WAIT_UNFREEZE, fin);
 
   // unfreeze
@@ -1814,27 +1794,26 @@ void Migrator::export_finish(CDir *dir)
   // discard delayed expires
   cache->discard_delayed_expire(dir);
 
+  // remove from exporting list, clean up state
+  dir->state_clear(CDir::STATE_EXPORTING);
+
   // queue finishers
   mds->queue_waiters(it->second.waiting_for_finish);
 
-  MutationRef mut = it->second.mut;
-  // remove from exporting list, clean up state
+  // unpin path
+  MutationRef& mut = it->second.mut;
+  if (mut) {
+    mds->locker->drop_locks(mut.get());
+    mut->cleanup();
+  }
+
   export_state.erase(it);
-  dir->state_clear(CDir::STATE_EXPORTING);
 
   cache->show_subtrees();
   audit();
 
-  cache->trim(-1, num_dentries); // try trimming exported dentries
-
   // send pending import_maps?
   mds->mdcache->maybe_send_pending_resolves();
-
-  // drop locks, unpin path
-  if (mut) {
-    mds->locker->drop_locks(mut.get());
-    mut->cleanup();
-  }
   
   maybe_do_queued_export();
 }
@@ -1981,7 +1960,7 @@ void Migrator::handle_export_prep(MExportDirPrep *m)
 
   CDir *dir;
   CInode *diri;
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
 
   // assimilate root dir.
   map<dirfrag_t,import_state_t>::iterator it = import_state.find(m->get_dirfrag());
@@ -2171,7 +2150,8 @@ void Migrator::handle_export_prep(MExportDirPrep *m)
 
 
 
-class C_MDS_ImportDirLoggedStart : public MigratorContext {
+class C_MDS_ImportDirLoggedStart : public Context {
+  Migrator *migrator;
   dirfrag_t df;
   CDir *dir;
   int from;
@@ -2180,10 +2160,10 @@ public:
   map<client_t,uint64_t> sseqmap;
 
   C_MDS_ImportDirLoggedStart(Migrator *m, CDir *d, int f) :
-    MigratorContext(m), df(d->dirfrag()), dir(d), from(f) {
+    migrator(m), df(d->dirfrag()), dir(d), from(f) {
   }
   void finish(int r) {
-    mig->import_logged_start(df, dir, from, imported_client_map, sseqmap);
+    migrator->import_logged_start(df, dir, from, imported_client_map, sseqmap);
   }
 };
 
@@ -2245,15 +2225,11 @@ void Migrator::handle_export_dir(MExportDir *m)
   
   // include bounds in EImportStart
   set<CDir*> import_bounds;
-  for (vector<dirfrag_t>::iterator p = m->bounds.begin();
-       p != m->bounds.end();
-       ++p) {
-    CDir *bd = cache->get_dirfrag(*p);
-    assert(bd);
-    le->metablob.add_dir(bd, false);  // note that parent metadata is already in the event
-    import_bounds.insert(bd);
-  }
-  cache->verify_subtree_bounds(dir, import_bounds);
+  cache->get_subtree_bounds(dir, import_bounds);
+  for (set<CDir*>::iterator it = import_bounds.begin();
+       it != import_bounds.end();
+       ++it) 
+    le->metablob.add_dir(*it, false);  // note that parent metadata is already in the event
 
   // adjust popularity
   mds->balancer->add_import(dir, now);
@@ -2265,13 +2241,14 @@ void Migrator::handle_export_dir(MExportDir *m)
   assert (g_conf->mds_kill_import_at != 6);
 
   // log it
-  mds->mdlog->submit_entry(le, onlogged);
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(onlogged);
   mds->mdlog->flush();
 
   // some stats
   if (mds->logger) {
-    mds->logger->inc(l_mds_imported);
-    mds->logger->inc(l_mds_imported_inodes, num_imported_inodes);
+    mds->logger->inc(l_mds_im);
+    mds->logger->inc(l_mds_iim, num_imported_inodes);
   }
 
   m->put();
@@ -2344,7 +2321,6 @@ void Migrator::import_reverse(CDir *dir)
       !dir->get_inode()->has_subtree_root_dirfrag(mds->get_nodeid()))
     dir->get_inode()->clear_scatter_dirty();
 
-  int num_dentries = 0;
   // adjust auth bits.
   list<CDir*> q;
   q.push_back(dir);
@@ -2397,9 +2373,6 @@ void Migrator::import_reverse(CDir *dir)
 	  if (bounds.count(*p) == 0)
 	    q.push_back(*p);
       }
-
-      cache->touch_dentry_bottom(dn); // move dentry to tail of LRU
-      ++num_dentries;
     }
   }
 
@@ -2433,8 +2406,6 @@ void Migrator::import_reverse(CDir *dir)
 
   cache->try_subtree_merge(dir);  // NOTE: this may journal subtree map as side effect
 
-  cache->trim(-1, num_dentries); // try trimming dentries
-
   // bystanders?
   if (stat.bystanders.empty()) {
     dout(7) << "no bystanders, finishing reverse now" << dendl;
@@ -2489,7 +2460,7 @@ void Migrator::import_reverse_unfreeze(CDir *dir)
   assert(dir);
   dout(7) << "import_reverse_unfreeze " << *dir << dendl;
   dir->unfreeze_tree();
-  list<MDSInternalContextBase*> ls;
+  list<Context*> ls;
   mds->queue_waiters(ls);
   cache->discard_delayed_expire(dir);
   import_reverse_final(dir);
@@ -2501,19 +2472,15 @@ void Migrator::import_reverse_final(CDir *dir)
 
   // clean up
   map<dirfrag_t, import_state_t>::iterator it = import_state.find(dir->dirfrag());
-  assert(it != import_state.end());
-
-  MutationRef mut = it->second.mut;
+  if (it->second.mut) {
+    mds->locker->drop_locks(it->second.mut.get());
+    it->second.mut->cleanup();
+  }
   import_state.erase(it);
 
   // send pending import_maps?
   mds->mdcache->maybe_send_pending_resolves();
 
-  if (mut) {
-    mds->locker->drop_locks(mut.get());
-    mut->cleanup();
-  }
-
   cache->show_subtrees();
   //audit();  // this fails, bc we munge up the subtree map during handle_import_map (resolve phase)
 }
@@ -2653,11 +2620,10 @@ void Migrator::import_finish(CDir *dir, bool notify, bool last)
   MutationRef mut = it->second.mut;
   import_state.erase(it);
 
-  // adjust auth, with possible subtree merge.
-  cache->adjust_subtree_auth(dir, mds->get_nodeid());
-
   mds->mdlog->start_submit_entry(new EImportFinish(dir, true));
 
+  // adjust auth, with possible subtree merge.
+  cache->adjust_subtree_auth(dir, mds->get_nodeid());
   cache->try_subtree_merge(dir);   // NOTE: this may journal subtree_map as sideffect
 
   // process delayed expires
@@ -2858,10 +2824,10 @@ int Migrator::decode_import_dir(bufferlist::iterator& blp,
   // take all waiters on this dir
   // NOTE: a pass of imported data is guaranteed to get all of my waiters because
   // a replica's presense in my cache implies/forces it's presense in authority's.
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
   
   dir->take_waiting(CDir::WAIT_ANY_MASK, waiters);
-  for (list<MDSInternalContextBase*>::iterator it = waiters.begin();
+  for (list<Context*>::iterator it = waiters.begin();
        it != waiters.end();
        ++it) 
     import_root->add_waiter(CDir::WAIT_UNFREEZE, *it);  // UNFREEZE will get kicked both on success or failure
@@ -3003,7 +2969,8 @@ void Migrator::export_caps(CInode *in)
   mds->send_message_mds(ex, dest);
 }
 
-class C_M_LoggedImportCaps : public MigratorContext {
+class C_M_LoggedImportCaps : public Context {
+  Migrator *migrator;
   CInode *in;
   int from;
 public:
@@ -3011,9 +2978,9 @@ public:
   map<client_t,entity_inst_t> client_map;
   map<client_t,uint64_t> sseqmap;
 
-  C_M_LoggedImportCaps(Migrator *m, CInode *i, int f) : MigratorContext(m), in(i), from(f) {}
+  C_M_LoggedImportCaps(Migrator *m, CInode *i, int f) : migrator(m), in(i), from(f) {}
   void finish(int r) {
-    mig->logged_import_caps(in, from, peer_exports, client_map, sseqmap);
+    migrator->logged_import_caps(in, from, peer_exports, client_map, sseqmap);
   }  
 };
 
@@ -3042,7 +3009,9 @@ void Migrator::handle_export_caps(MExportCaps *ex)
   version_t pv = mds->server->prepare_force_open_sessions(finish->client_map, finish->sseqmap);
   
   ESessions *le = new ESessions(pv, ex->client_map);
-  mds->mdlog->start_submit_entry(le, finish);
+  mds->mdlog->start_entry(le);
+  mds->mdlog->submit_entry(le);
+  mds->mdlog->wait_for_safe(finish);
   mds->mdlog->flush();
 
   ex->put();
diff --git a/src/mds/Migrator.h b/src/mds/Migrator.h
index 01f3abc..0819c82 100644
--- a/src/mds/Migrator.h
+++ b/src/mds/Migrator.h
@@ -88,7 +88,7 @@ protected:
     set<int> warning_ack_waiting;
     set<int> notify_ack_waiting;
     map<inodeno_t,map<client_t,Capability::Import> > peer_imported;
-    list<MDSInternalContextBase*> waiting_for_finish;
+    list<Context*> waiting_for_finish;
     MutationRef mut;
     // for freeze tree deadlock detection
     utime_t last_cum_auth_pins_change;
@@ -246,7 +246,7 @@ public:
 				map<client_t,entity_inst_t>& exported_client_map);
   void finish_export_inode(CInode *in, utime_t now, int target,
 			   map<client_t,Capability::Import>& peer_imported,
-			   list<MDSInternalContextBase*>& finished);
+			   list<Context*>& finished);
   void finish_export_inode_caps(CInode *in, int target,
 			        map<client_t,Capability::Import>& peer_imported);
 
@@ -257,9 +257,9 @@ public:
 			utime_t now);
   void finish_export_dir(CDir *dir, utime_t now, int target,
 			 map<inodeno_t,map<client_t,Capability::Import> >& peer_imported,
-			 list<MDSInternalContextBase*>& finished, int *num_dentries);
+			 list<Context*>& finished);
 
-  void add_export_finish_waiter(CDir *dir, MDSInternalContextBase *c) {
+  void add_export_finish_waiter(CDir *dir, Context *c) {
     map<CDir*, export_state_t>::iterator it = export_state.find(dir);
     assert(it != export_state.end());
     it->second.waiting_for_finish.push_back(c);
@@ -270,7 +270,7 @@ public:
 
  protected:
   void handle_export_discover_ack(MExportDirDiscoverAck *m);
-  void export_frozen(CDir *dir, uint64_t tid);
+  void export_frozen(CDir *dir);
   void handle_export_prep_ack(MExportDirPrepAck *m);
   void export_sessions_flushed(CDir *dir, uint64_t tid);
   void export_go(CDir *dir);
@@ -287,7 +287,6 @@ public:
   friend class C_MDS_ExportFinishLogged;
   friend class C_M_ExportGo;
   friend class C_M_ExportSessionsFlushed;
-  friend class MigratorContext;
 
   // importer
   void handle_export_discover(MExportDirDiscover *m);
diff --git a/src/mds/Mutation.cc b/src/mds/Mutation.cc
index 2f8954c..ffeb066 100644
--- a/src/mds/Mutation.cc
+++ b/src/mds/Mutation.cc
@@ -197,9 +197,9 @@ bool MDRequestImpl::has_more()
   return _more;
 }
 
-bool MDRequestImpl::has_witnesses()
+bool MDRequestImpl::are_slaves()
 {
-  return _more && !_more->witnessed.empty();
+  return _more && !_more->slaves.empty();
 }
 
 bool MDRequestImpl::slave_did_prepare()
@@ -288,73 +288,3 @@ void MDRequestImpl::print(ostream &out)
   out << ")";
 }
 
-void MDRequestImpl::_dump(utime_t now, Formatter *f) const
-{
-  f->dump_string("flag_point", state_string());
-  f->dump_stream("reqid") << reqid;
-  {
-    if (client_request) {
-      f->dump_string("op_type", "client_request");
-      f->open_object_section("client_info");
-      f->dump_stream("client") << client_request->get_orig_source();
-      f->dump_int("tid", client_request->get_tid());
-      f->close_section(); // client_info
-    } else if (slave_request) {
-      assert(!slave_request->is_reply()); // replies go to an existing mdr
-      f->dump_string("op_type", "slave_request");
-      f->open_object_section("master_info");
-      f->dump_stream("master") << slave_request->get_orig_source();
-      f->close_section(); // master_info
-
-      f->open_object_section("request_info");
-      f->dump_int("attempt", slave_request->get_attempt());
-      f->dump_string("op_type",
-                     slave_request->get_opname(slave_request->get_op()));
-      f->dump_int("lock_type", slave_request->get_lock_type());
-      f->dump_stream("object_info") << slave_request->get_object_info();
-      f->dump_stream("srcdnpath") << slave_request->srcdnpath;
-      f->dump_stream("destdnpath") << slave_request->destdnpath;
-      f->dump_stream("witnesses") << slave_request->witnesses;
-      f->dump_bool("has_inode_export",
-                   slave_request->inode_export.length() != 0);
-      f->dump_int("inode_export_v", slave_request->inode_export_v);
-      f->dump_bool("has_srci_replica",
-                   slave_request->srci_replica.length() != 0);
-      f->dump_stream("op_stamp") << slave_request->op_stamp;
-      f->close_section(); // request_info
-    }
-    else { // internal request
-      assert(internal_op != -1);
-      f->dump_string("op_type", "internal_op");
-      f->dump_int("internal_op", internal_op);
-    }
-  }
-  {
-    f->open_array_section("events");
-    Mutex::Locker l(lock);
-    for (list<pair<utime_t, string> >::const_iterator i = events.begin();
-         i != events.end();
-         ++i) {
-      f->open_object_section("event");
-      f->dump_stream("time") << i->first;
-      f->dump_string("event", i->second);
-      f->close_section();
-    }
-    f->close_section(); // events
-  }
-}
-
-void MDRequestImpl::_dump_op_descriptor_unlocked(ostream& stream) const
-{
-  if (client_request) {
-    client_request->print(stream);
-  } else if (slave_request) {
-    slave_request->print(stream);
-  } else if (internal_op >= 0) {
-    stream << "internal op " << ceph_mds_op_name(internal_op) << ":" << reqid;
-  } else {
-    // drat, it's triggered by a slave request, but we don't have a message
-    // FIXME
-    stream << "rejoin:" << reqid;
-  }
-}
diff --git a/src/mds/Mutation.h b/src/mds/Mutation.h
index bcc1efe..dbfbe75 100644
--- a/src/mds/Mutation.h
+++ b/src/mds/Mutation.h
@@ -23,8 +23,6 @@
 #include "SimpleLock.h"
 #include "Capability.h"
 
-#include "common/TrackedOp.h"
-
 class LogSegment;
 class Capability;
 class CInode;
@@ -39,12 +37,8 @@ struct MutationImpl {
   metareqid_t reqid;
   __u32 attempt;      // which attempt for this request
   LogSegment *ls;  // the log segment i'm committing to
+  utime_t now;
 
-private:
-  utime_t mds_stamp; ///< mds-local timestamp (real time)
-  utime_t op_stamp;  ///< op timestamp (client provided)
-
-public:
   // flag mutation as slave
   int slave_to_mds;                // this is a slave request if >= 0.
 
@@ -54,7 +48,7 @@ public:
   set<CInode*> stickydirs;
 
   // auth pins
-  map<MDSCacheObject*,int> remote_auth_pins;
+  set< MDSCacheObject* > remote_auth_pins;
   set< MDSCacheObject* > auth_pins;
   
   // held locks
@@ -84,7 +78,6 @@ public:
   list<CInode*> dirty_cow_inodes;
   list<pair<CDentry*,version_t> > dirty_cow_dentries;
 
-  // keep our default values synced with MDRequestParam's
   MutationImpl()
     : attempt(0),
       ls(0),
@@ -118,21 +111,6 @@ public:
     return -1;
   }
 
-  void set_mds_stamp(utime_t t) {
-    mds_stamp = t;
-  }
-  utime_t get_mds_stamp() const {
-    return mds_stamp;
-  }
-  void set_op_stamp(utime_t t) {
-    op_stamp = t;
-  }
-  utime_t get_op_stamp() const {
-    if (op_stamp != utime_t())
-      return op_stamp;
-    return get_mds_stamp();
-  }
-
   // pin items in cache
   void pin(MDSCacheObject *o);
   void unpin(MDSCacheObject *o);
@@ -177,7 +155,7 @@ typedef ceph::shared_ptr<MutationImpl> MutationRef;
  * mostly information about locks held, so that we can drop them all
  * the request is finished or forwarded.  see request_*().
  */
-struct MDRequestImpl : public MutationImpl, public TrackedOp {
+struct MDRequestImpl : public MutationImpl {
   Session *session;
   elist<MDRequestImpl*>::item item_session_request;  // if not on list, op is aborted.
 
@@ -227,13 +205,12 @@ struct MDRequestImpl : public MutationImpl, public TrackedOp {
     // for rename/link/unlink
     set<int> witnessed;       // nodes who have journaled a RenamePrepare
     map<MDSCacheObject*,version_t> pvmap;
-
-    bool has_journaled_slaves;
-    bool slave_update_journaled;
     
     // for rename
     set<int> extra_witnesses; // replica list from srcdn auth (rename)
     int srcdn_auth_mds;
+    version_t src_reanchor_atid;  // src->dst
+    version_t dst_reanchor_atid;  // dst->stray
     bufferlist inode_import;
     version_t inode_import_v;
     CInode* rename_inode;
@@ -257,57 +234,68 @@ struct MDRequestImpl : public MutationImpl, public TrackedOp {
     Context *slave_commit;
     bufferlist rollback_bl;
 
-    list<MDSInternalContextBase*> waiting_for_finish;
+    list<Context*> waiting_for_finish;
 
     // export & fragment
     CDir* export_dir;
     dirfrag_t fragment_base;
 
     More() : 
-      has_journaled_slaves(false), slave_update_journaled(false),
-      srcdn_auth_mds(-1), inode_import_v(0), rename_inode(0),
-      is_freeze_authpin(false), is_ambiguous_auth(false),
+      srcdn_auth_mds(-1),
+      src_reanchor_atid(0), dst_reanchor_atid(0), inode_import_v(0),
+      rename_inode(0), is_freeze_authpin(false), is_ambiguous_auth(false),
       is_remote_frozen_authpin(false), is_inode_exporter(false),
       flock_was_waiting(false), stid(0), slave_commit(0), export_dir(NULL)  { }
   } *_more;
 
 
   // ---------------------------------------------------
-  struct Params {
-    metareqid_t reqid;
-    __u32 attempt;
-    MClientRequest *client_req;
-    class Message *triggering_slave_req;
-    int slave_to;
-    utime_t initiated;
-    utime_t throttled, all_read, dispatched;
-    int internal_op;
-    // keep these default values synced to MutationImpl's
-    Params() : attempt(0), client_req(NULL),
-        triggering_slave_req(NULL), slave_to(-1), internal_op(-1) {}
-  };
-  MDRequestImpl(const Params& params, OpTracker *tracker) :
-    MutationImpl(params.reqid, params.attempt, params.slave_to),
-    TrackedOp(tracker, params.initiated),
-    session(NULL), item_session_request(this),
-    client_request(params.client_req), straydn(NULL), snapid(CEPH_NOSNAP),
-    tracei(NULL), tracedn(NULL), alloc_ino(0), used_prealloc_ino(0), snap_caps(0),
-    did_early_reply(false), o_trunc(false), getattr_caps(0),
-    slave_request(NULL), internal_op(params.internal_op), retry(0),
-    waited_for_osdmap(false), _more(NULL) {
-    in[0] = in[1] = NULL;
-    if (!params.throttled.is_zero())
-      tracker->mark_event(this, "throttled", params.throttled);
-    if (!params.all_read.is_zero())
-      tracker->mark_event(this, "all_read", params.all_read);
-    if (!params.dispatched.is_zero())
-      tracker->mark_event(this, "dispatched", params.dispatched);
+  MDRequestImpl() :
+    session(0), item_session_request(this),
+    client_request(0), straydn(NULL), snapid(CEPH_NOSNAP), tracei(0), tracedn(0),
+    alloc_ino(0), used_prealloc_ino(0), snap_caps(0), did_early_reply(false),
+    o_trunc(false),
+    getattr_caps(0),
+    slave_request(0),
+    internal_op(-1),
+    retry(0),
+    waited_for_osdmap(false),
+    _more(0) {
+    in[0] = in[1] = 0; 
+  }
+  MDRequestImpl(metareqid_t ri, __u32 attempt, MClientRequest *req) :
+    MutationImpl(ri, attempt),
+    session(0), item_session_request(this),
+    client_request(req), straydn(NULL), snapid(CEPH_NOSNAP), tracei(0), tracedn(0),
+    alloc_ino(0), used_prealloc_ino(0), snap_caps(0), did_early_reply(false),
+    o_trunc(false),
+    getattr_caps(0),
+    slave_request(0),
+    internal_op(-1),
+    retry(0),
+    waited_for_osdmap(false),
+    _more(0) {
+    in[0] = in[1] = 0; 
+  }
+  MDRequestImpl(metareqid_t ri, __u32 attempt, int by) :
+    MutationImpl(ri, attempt, by),
+    session(0), item_session_request(this),
+    client_request(0), straydn(NULL), snapid(CEPH_NOSNAP), tracei(0), tracedn(0),
+    alloc_ino(0), used_prealloc_ino(0), snap_caps(0), did_early_reply(false),
+    o_trunc(false),
+    getattr_caps(0),
+    slave_request(0),
+    internal_op(-1),
+    retry(0),
+    waited_for_osdmap(false),
+    _more(0) {
+    in[0] = in[1] = 0; 
   }
   ~MDRequestImpl();
   
   More* more();
   bool has_more();
-  bool has_witnesses();
+  bool are_slaves();
   bool slave_did_prepare();
   bool did_ino_allocation();
   bool freeze_auth_pin(CInode *inode);
@@ -319,12 +307,6 @@ struct MDRequestImpl : public MutationImpl, public TrackedOp {
   void clear_ambiguous_auth();
 
   void print(ostream &out);
-
-  // TrackedOp stuff
-  typedef ceph::shared_ptr<MDRequestImpl> Ref;
-protected:
-  void _dump(utime_t now, Formatter *f) const;
-  void _dump_op_descriptor_unlocked(ostream& stream) const;
 };
 
 typedef ceph::shared_ptr<MDRequestImpl> MDRequestRef;
diff --git a/src/mds/RecoveryQueue.cc b/src/mds/RecoveryQueue.cc
deleted file mode 100644
index 7d10d7b..0000000
--- a/src/mds/RecoveryQueue.cc
+++ /dev/null
@@ -1,171 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-#include "CInode.h"
-#include "MDCache.h"
-#include "MDS.h"
-#include "Locker.h"
-#include "osdc/Filer.h"
-
-#include "RecoveryQueue.h"
-
-
-#define dout_subsys ceph_subsys_mds
-#undef dout_prefix
-#define dout_prefix *_dout << "mds." << mds->get_nodeid() << " RecoveryQueue::" << __func__ << " "
-
-class C_MDC_Recover : public MDSIOContextBase {
-protected:
-  RecoveryQueue *rq;
-  CInode *in;
-  void finish(int r) {
-    rq->_recovered(in, r, size, mtime);
-  }
-
-  MDS *get_mds() {
-    return rq->mds;
-  }
-
-public:
-  uint64_t size;
-  utime_t mtime;
-
-  C_MDC_Recover(RecoveryQueue *rq_, CInode *i) : rq(rq_), in(i), size(0) {
-    assert(rq != NULL);
-  }
-};
-
-
-/**
- * Progress the queue.  Call this after enqueuing something or on
- * completion of something.
- */
-void RecoveryQueue::advance()
-{
-  dout(10) << file_recover_queue.size() << " queued, "
-	   << file_recover_queue_front.size() << " prioritized, "
-	   << file_recovering.size() << " recovering" << dendl;
-
-  while (file_recovering.size() < g_conf->mds_max_file_recover) {
-    if (!file_recover_queue_front.empty()) {
-      CInode *in = *file_recover_queue_front.begin();
-      file_recover_queue_front.erase(file_recover_queue_front.begin());
-      file_recover_queue.erase(in);
-      _start(in);
-    } else if (!file_recover_queue.empty()) {
-      CInode *in = *file_recover_queue.begin();
-      file_recover_queue.erase(file_recover_queue.begin());
-      _start(in);
-    } else {
-      break;
-    }
-  }
-}
-
-void RecoveryQueue::_start(CInode *in)
-{
-  inode_t *pi = in->get_projected_inode();
-
-  // blech
-  if (pi->client_ranges.size() && !pi->get_max_size()) {
-    mds->clog->warn() << "bad client_range " << pi->client_ranges
-		      << " on ino " << pi->ino << "\n";
-  }
-
-  if (pi->client_ranges.size() && pi->get_max_size()) {
-    dout(10) << "starting " << in->inode.size << " " << pi->client_ranges
-	     << " " << *in << dendl;
-    file_recovering.insert(in);
-
-    C_MDC_Recover *fin = new C_MDC_Recover(this, in);
-    mds->filer->probe(in->inode.ino, &in->inode.layout, in->last,
-		      pi->get_max_size(), &fin->size, &fin->mtime, false,
-		      0, fin);
-  } else {
-    dout(10) << "skipping " << in->inode.size << " " << *in << dendl;
-    in->state_clear(CInode::STATE_RECOVERING);
-    mds->locker->eval(in, CEPH_LOCK_IFILE);
-    in->auth_unpin(this);
-  }
-}
-
-void RecoveryQueue::prioritize(CInode *in)
-{
-  if (file_recovering.count(in)) {
-    dout(10) << "already working on " << *in << dendl;
-    return;
-  }
-
-  if (file_recover_queue.count(in)) {
-    dout(20) << *in << dendl;
-    file_recover_queue_front.insert(in);
-    return;
-  }
-
-  dout(10) << "not queued " << *in << dendl;
-}
-
-
-/**
- * Given an authoritative inode which is in the cache,
- * enqueue it for recovery.
- */
-void RecoveryQueue::enqueue(CInode *in)
-{
-  dout(15) << "RecoveryQueue::enqueue " << *in << dendl;
-  assert(in->is_auth());
-
-  in->state_clear(CInode::STATE_NEEDSRECOVER);
-  if (!in->state_test(CInode::STATE_RECOVERING)) {
-    in->state_set(CInode::STATE_RECOVERING);
-    in->auth_pin(this);
-  }
-  file_recover_queue.insert(in);
-}
-
-
-/**
- * Call back on completion of Filer probe on an inode.
- */
-void RecoveryQueue::_recovered(CInode *in, int r, uint64_t size, utime_t mtime)
-{
-  dout(10) << "_recovered r=" << r << " size=" << size << " mtime=" << mtime
-	   << " for " << *in << dendl;
-
-  if (r != 0) {
-    dout(0) << "recovery error! " << r << dendl;
-    if (r == -EBLACKLISTED) {
-      mds->suicide();
-      return;
-    }
-    assert(0 == "unexpected error from osd during recovery");
-  }
-
-  file_recovering.erase(in);
-  in->state_clear(CInode::STATE_RECOVERING);
-
-  if (!in->get_parent_dn() && !in->get_projected_parent_dn()) {
-    dout(10) << " inode has no parents, killing it off" << dendl;
-    in->auth_unpin(this);
-    mds->mdcache->remove_inode(in);
-  } else {
-    // journal
-    mds->locker->check_inode_max_size(in, true, true, size, false, 0, mtime);
-    mds->locker->eval(in, CEPH_LOCK_IFILE);
-    in->auth_unpin(this);
-  }
-
-  advance();
-}
-
diff --git a/src/mds/RecoveryQueue.h b/src/mds/RecoveryQueue.h
deleted file mode 100644
index 18058f0..0000000
--- a/src/mds/RecoveryQueue.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-//class C_MDC_Recover;
-//
-#ifndef RECOVERY_QUEUE_H
-#define RECOVERY_QUEUE_H
-
-#include <set>
-
-class CInode;
-class MDS;
-
-class RecoveryQueue {
-public:
-  void enqueue(CInode *in);
-  void advance();
-  void prioritize(CInode *in);   ///< do this inode now/soon
-  RecoveryQueue(MDS *mds_) : mds(mds_) {}
-
-private:
-  void _start(CInode *in);  ///< start recovering this file
-
-  std::set<CInode*> file_recover_queue;   ///< the queue
-  std::set<CInode*> file_recover_queue_front;  ///< elevated priority items
-  std::set<CInode*> file_recovering;
-  void _recovered(CInode *in, int r, uint64_t size, utime_t mtime);
-  MDS *mds;
-
-  friend class C_MDC_Recover;
-};
-
-#endif // RECOVERY_QUEUE_H
diff --git a/src/tools/cephfs/Resetter.cc b/src/mds/Resetter.cc
similarity index 64%
rename from src/tools/cephfs/Resetter.cc
rename to src/mds/Resetter.cc
index 5fb8997..22839ec 100644
--- a/src/tools/cephfs/Resetter.cc
+++ b/src/mds/Resetter.cc
@@ -12,38 +12,38 @@
  * 
  */
 
-#include "common/errno.h"
+#include "mds/Resetter.h"
 #include "osdc/Journaler.h"
-#include "mds/JournalPointer.h"
-
 #include "mds/mdstypes.h"
 #include "mon/MonClient.h"
 #include "mds/events/EResetJournal.h"
 
-#include "Resetter.h"
 
+int Resetter::init(int rank)
+{
+  int r = MDSUtility::init();
+  if (r < 0) {
+    return r;
+  }
 
-void Resetter::reset(int rank)
+  inodeno_t ino = MDS_INO_LOG_OFFSET + rank;
+  journaler = new Journaler(ino,
+      mdsmap->get_metadata_pool(),
+      CEPH_FS_ONDISK_MAGIC,
+      objecter, 0, 0, &timer);
+
+  return 0;
+}
+
+void Resetter::reset()
 {
   Mutex mylock("Resetter::reset::lock");
   Cond cond;
   bool done;
   int r;
 
-  JournalPointer jp(rank, mdsmap->get_metadata_pool());
-  int jp_load_result = jp.load(objecter);
-  if (jp_load_result != 0) {
-    std::cerr << "Error loading journal: " << cpp_strerror(jp_load_result) << std::endl;
-    return;
-  }
-
-  Journaler journaler(jp.front,
-      mdsmap->get_metadata_pool(),
-      CEPH_FS_ONDISK_MAGIC,
-      objecter, 0, 0, &timer, &finisher);
-
   lock.Lock();
-  journaler.recover(new C_SafeCond(&mylock, &cond, &done, &r));
+  journaler->recover(new C_SafeCond(&mylock, &cond, &done, &r));
   lock.Unlock();
 
   mylock.Lock();
@@ -55,31 +55,33 @@ void Resetter::reset(int rank)
     if (r == -ENOENT) {
       cerr << "journal does not exist on-disk. Did you set a bad rank?"
 	   << std::endl;
+      shutdown();
       return;
     } else {
       cerr << "got error " << r << "from Journaler, failling" << std::endl;
+      shutdown();
       return;
     }
   }
 
   lock.Lock();
-  uint64_t old_start = journaler.get_read_pos();
-  uint64_t old_end = journaler.get_write_pos();
+  uint64_t old_start = journaler->get_read_pos();
+  uint64_t old_end = journaler->get_write_pos();
   uint64_t old_len = old_end - old_start;
   cout << "old journal was " << old_start << "~" << old_len << std::endl;
 
-  uint64_t new_start = ROUND_UP_TO(old_end+1, journaler.get_layout_period());
+  uint64_t new_start = ROUND_UP_TO(old_end+1, journaler->get_layout_period());
   cout << "new journal start will be " << new_start
        << " (" << (new_start - old_end) << " bytes past old end)" << std::endl;
 
-  journaler.set_read_pos(new_start);
-  journaler.set_write_pos(new_start);
-  journaler.set_expire_pos(new_start);
-  journaler.set_trimmed_pos(new_start);
-  journaler.set_writeable();
+  journaler->set_read_pos(new_start);
+  journaler->set_write_pos(new_start);
+  journaler->set_expire_pos(new_start);
+  journaler->set_trimmed_pos(new_start);
+  journaler->set_writeable();
 
   cout << "writing journal head" << std::endl;
-  journaler.write_head(new C_SafeCond(&mylock, &cond, &done, &r));
+  journaler->write_head(new C_SafeCond(&mylock, &cond, &done, &r));
   lock.Unlock();
 
   mylock.Lock();
@@ -96,8 +98,8 @@ void Resetter::reset(int rank)
   le->encode_with_header(bl);
   
   cout << "writing EResetJournal entry" << std::endl;
-  journaler.append_entry(bl);
-  journaler.flush(new C_SafeCond(&mylock, &cond, &done,&r));
+  journaler->append_entry(bl);
+  journaler->flush(new C_SafeCond(&mylock, &cond, &done,&r));
 
   lock.Unlock();
 
diff --git a/src/tools/cephfs/Resetter.h b/src/mds/Resetter.h
similarity index 83%
rename from src/tools/cephfs/Resetter.h
rename to src/mds/Resetter.h
index be10538..e967b24 100644
--- a/src/tools/cephfs/Resetter.h
+++ b/src/mds/Resetter.h
@@ -15,7 +15,8 @@
 #define JOURNAL_RESETTER_H_
 
 
-#include "MDSUtility.h"
+#include "osdc/Journaler.h"
+#include "mds/MDSUtility.h"
 
 /**
  * This class lets you reset an mds journal for troubleshooting or whatever.
@@ -24,11 +25,13 @@
  * of the file to dump to.
  */
 class Resetter : public MDSUtility {
-  int rank; 
 public:
-  Resetter() {}
+  Journaler *journaler;
 
-  void reset(int rank);
+  Resetter() : journaler(NULL) {}
+
+  int init(int rank);
+  void reset();
 };
 
 #endif /* JOURNAL_RESETTER_H_ */
diff --git a/src/mds/ScatterLock.h b/src/mds/ScatterLock.h
index c490b44..a85caa8 100644
--- a/src/mds/ScatterLock.h
+++ b/src/mds/ScatterLock.h
@@ -201,14 +201,6 @@ public:
     ::encode(s, bl);
   }
 
-  void decode_state_rejoin(bufferlist::iterator& p, list<MDSInternalContextBase*>& waiters) {
-    SimpleLock::decode_state_rejoin(p, waiters);
-    if (is_flushing()) {
-      set_dirty();
-      clear_flushing();
-    }
-  }
-
   bool remove_replica(int from, bool rejoin) {
     if (rejoin &&
 	(state == LOCK_MIX ||
diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index b35cb56..3a96f93 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -26,14 +26,13 @@
 #include "MDLog.h"
 #include "Migrator.h"
 #include "MDBalancer.h"
+#include "AnchorClient.h"
 #include "InoTable.h"
 #include "SnapClient.h"
 #include "Mutation.h"
 
 #include "msg/Messenger.h"
 
-#include "osdc/Objecter.h"
-
 #include "messages/MClientSession.h"
 #include "messages/MClientRequest.h"
 #include "messages/MClientReply.h"
@@ -73,30 +72,14 @@ using namespace std;
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".server "
 
-
-class ServerContext : public MDSInternalContextBase {
-  protected:
-  Server *server;
-  MDS *get_mds()
-  {
-    return server->mds;
-  }
-
-  public:
-  ServerContext(Server *s) : server(s) {
-    assert(server != NULL);
-  }
-};
-
-
 void Server::create_logger()
 {
   PerfCountersBuilder plb(g_ceph_context, "mds_server", l_mdss_first, l_mdss_last);
-  plb.add_u64_counter(l_mdss_handle_client_request,"handle_client_request");
-  plb.add_u64_counter(l_mdss_handle_slave_request, "handle_slave_request");
-  plb.add_u64_counter(l_mdss_handle_client_session, "handle_client_session");
-  plb.add_u64_counter(l_mdss_dispatch_client_request, "dispatch_client_request");
-  plb.add_u64_counter(l_mdss_dispatch_slave_request, "dispatch_server_request");
+  plb.add_u64_counter(l_mdss_hcreq,"hcreq"); // handle client req
+  plb.add_u64_counter(l_mdss_hsreq, "hsreq"); // slave
+  plb.add_u64_counter(l_mdss_hcsess, "hcsess");    // client session
+  plb.add_u64_counter(l_mdss_dcreq, "dcreq"); // dispatch client req
+  plb.add_u64_counter(l_mdss_dsreq, "dsreq"); // slave
   logger = plb.create_perf_counters();
   g_ceph_context->get_perfcounters_collection()->add(logger);
 }
@@ -158,25 +141,22 @@ void Server::dispatch(Message *m)
 // ----------------------------------------------------------
 // SESSION management
 
-class C_MDS_session_finish : public MDSInternalContext {
+class C_MDS_session_finish : public Context {
+  MDS *mds;
   Session *session;
   uint64_t state_seq;
   bool open;
   version_t cmapv;
   interval_set<inodeno_t> inos;
   version_t inotablev;
-  Context *fin;
 public:
-  C_MDS_session_finish(MDS *m, Session *se, uint64_t sseq, bool s, version_t mv, Context *fin_ = NULL) :
-    MDSInternalContext(m), session(se), state_seq(sseq), open(s), cmapv(mv), inotablev(0), fin(fin_) { }
-  C_MDS_session_finish(MDS *m, Session *se, uint64_t sseq, bool s, version_t mv, interval_set<inodeno_t>& i, version_t iv, Context *fin_ = NULL) :
-    MDSInternalContext(m), session(se), state_seq(sseq), open(s), cmapv(mv), inos(i), inotablev(iv), fin(fin_) { }
+  C_MDS_session_finish(MDS *m, Session *se, uint64_t sseq, bool s, version_t mv) :
+    mds(m), session(se), state_seq(sseq), open(s), cmapv(mv), inotablev(0) { }
+  C_MDS_session_finish(MDS *m, Session *se, uint64_t sseq, bool s, version_t mv, interval_set<inodeno_t>& i, version_t iv) :
+    mds(m), session(se), state_seq(sseq), open(s), cmapv(mv), inos(i), inotablev(iv) { }
   void finish(int r) {
     assert(r == 0);
     mds->server->_session_logged(session, state_seq, open, cmapv, inos, inotablev);
-    if (fin) {
-      fin->complete(r);
-    }
   }
 };
 
@@ -208,9 +188,6 @@ void Server::handle_client_session(MClientSession *m)
     return;
   }
 
-  if (logger)
-    logger->inc(l_mdss_handle_client_session);
-
   uint64_t sseq = 0;
   switch (m->get_op()) {
   case CEPH_SESSION_REQUEST_OPEN:
@@ -224,19 +201,10 @@ void Server::handle_client_session(MClientSession *m)
     }
     assert(session->is_closed() ||
 	   session->is_closing());
-
-    session->set_client_metadata(m->client_meta);
-    dout(20) << __func__ << " CEPH_SESSION_REQUEST_OPEN "
-      << session->info.client_metadata.size() << " metadata entries:" << dendl;
-    for (map<string, string>::iterator i = session->info.client_metadata.begin();
-        i != session->info.client_metadata.end(); ++i) {
-      dout(20) << "  " << i->first << ": " << i->second << dendl;
-    }
-
     sseq = mds->sessionmap.set_state(session, Session::STATE_OPENING);
     mds->sessionmap.touch_session(session);
     pv = ++mds->sessionmap.projected;
-    mdlog->start_submit_entry(new ESession(m->get_source_inst(), true, pv, m->client_meta),
+    mdlog->start_submit_entry(new ESession(m->get_source_inst(), true, pv),
 			      new C_MDS_session_finish(mds, session, sseq, true, pv));
     mdlog->flush();
     break;
@@ -250,7 +218,8 @@ void Server::handle_client_session(MClientSession *m)
 	mds->locker->resume_stale_caps(session);
 	mds->sessionmap.touch_session(session);
       }
-      m->get_connection()->send_message(new MClientSession(CEPH_SESSION_RENEWCAPS, m->get_seq()));
+      mds->messenger->send_message(new MClientSession(CEPH_SESSION_RENEWCAPS, m->get_seq()), 
+				   m->get_connection());
     } else {
       dout(10) << "ignoring renewcaps on non open|stale session (" << session->get_state_name() << ")" << dendl;
     }
@@ -284,7 +253,7 @@ void Server::handle_client_session(MClientSession *m)
 		<< ", BUGGY!" << dendl;
 	assert(0);
       }
-      journal_close_session(session, Session::STATE_CLOSING, NULL);
+      journal_close_session(session, Session::STATE_CLOSING);
     }
     break;
 
@@ -298,7 +267,7 @@ void Server::handle_client_session(MClientSession *m)
   m->put();
 }
 
-void Server::flush_client_sessions(set<client_t>& client_set, MDSGatherBuilder& gather)
+void Server::flush_client_sessions(set<client_t>& client_set, C_GatherBuilder& gather)
 {
   for (set<client_t>::iterator p = client_set.begin(); p != client_set.end(); ++p) {
     Session *session = mds->sessionmap.get_session(entity_name_t::CLIENT(p->v));
@@ -314,7 +283,7 @@ void Server::flush_client_sessions(set<client_t>& client_set, MDSGatherBuilder&
 
 void Server::finish_flush_session(Session *session, version_t seq)
 {
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
   session->finish_flush(seq, finished);
   mds->queue_waiters(finished);
 }
@@ -339,8 +308,7 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve
     assert(session->is_opening());
     mds->sessionmap.set_state(session, Session::STATE_OPEN);
     mds->sessionmap.touch_session(session);
-    assert(session->connection != NULL);
-    session->connection->send_message(new MClientSession(CEPH_SESSION_OPEN));
+    mds->messenger->send_message(new MClientSession(CEPH_SESSION_OPEN), session->connection);
   } else if (session->is_closing() ||
 	     session->is_killing()) {
     // kill any lingering capabilities, leases, requests
@@ -356,15 +324,6 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve
       dout(20) << " killing client lease of " << *dn << dendl;
       dn->remove_client_lease(r, mds->locker);
     }
-    if (client_reconnect_gather.count(session->info.get_client())) {
-      dout(20) << " removing client from reconnect set" << dendl;
-      client_reconnect_gather.erase(session->info.get_client());
-
-      if (client_reconnect_gather.empty()) {
-        dout(7) << " client " << session->info.inst << " was last reconnect, finishing" << dendl;
-        reconnect_gather_finish();
-      }
-    }
     
     if (session->is_closing()) {
       // mark con disposable.  if there is a fault, we will get a
@@ -373,11 +332,7 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve
       // ms_handle_remote_reset() and realize they had in fact closed.
       // do this *before* sending the message to avoid a possible
       // race.
-      if (session->connection != NULL) {;
-        // Conditional because terminate_sessions will indiscrimately
-        // put sessions in CLOSING whether they ever had a conn or not.
-        session->connection->mark_disposable();
-      }
+      mds->messenger->mark_disposable(session->connection.get());
 
       // reset session
       mds->send_message_client(new MClientSession(CEPH_SESSION_CLOSE), session);
@@ -385,9 +340,7 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve
       session->clear();
     } else if (session->is_killing()) {
       // destroy session, close connection
-      if (session->connection != NULL) {
-        session->connection->mark_down();
-      }
+      mds->messenger->mark_down(session->connection);
       mds->sessionmap.remove_session(session);
     } else {
       assert(0);
@@ -446,7 +399,7 @@ void Server::finish_force_open_sessions(map<client_t,entity_inst_t>& cm,
 	mds->sessionmap.touch_session(session);
 	Message *m = new MClientSession(CEPH_SESSION_OPEN);
 	if (session->connection)
-	  session->connection->send_message(m);
+	  messenger->send_message(m, session->connection);
 	else
 	  session->preopen_out_queue.push_back(m);
       }
@@ -460,12 +413,12 @@ void Server::finish_force_open_sessions(map<client_t,entity_inst_t>& cm,
   mds->sessionmap.version++;
 }
 
-class C_MDS_TerminatedSessions : public ServerContext {
+struct C_MDS_TerminatedSessions : public Context {
+  Server *server;
+  C_MDS_TerminatedSessions(Server *s) : server(s) {}
   void finish(int r) {
     server->terminating_sessions = false;
   }
-  public:
-  C_MDS_TerminatedSessions(Server *s) : ServerContext(s) {}
 };
 
 void Server::terminate_sessions()
@@ -483,7 +436,7 @@ void Server::terminate_sessions()
 	session->is_killing() ||
 	session->is_closed())
       continue;
-    journal_close_session(session, Session::STATE_CLOSING, NULL);
+    journal_close_session(session, Session::STATE_CLOSING);
   }
 
   mdlog->wait_for_safe(new C_MDS_TerminatedSessions(this));
@@ -492,7 +445,7 @@ void Server::terminate_sessions()
 
 void Server::find_idle_sessions()
 {
-  dout(10) << "find_idle_sessions.  laggy until " << mds->get_laggy_until() << dendl;
+  dout(10) << "find_idle_sessions.  laggy until " << mds->laggy_until << dendl;
   
   // timeout/stale
   //  (caps go stale, lease die)
@@ -522,8 +475,8 @@ void Server::find_idle_sessions()
   cutoff -= g_conf->mds_session_autoclose;
 
   // don't kick clients if we've been laggy
-  if (mds->get_laggy_until() > cutoff) {
-    dout(10) << " laggy_until " << mds->get_laggy_until() << " > cutoff " << cutoff
+  if (mds->laggy_until > cutoff) {
+    dout(10) << " laggy_until " << mds->laggy_until << " > cutoff " << cutoff
 	     << ", not kicking any clients to be safe" << dendl;
     return;
   }
@@ -545,38 +498,31 @@ void Server::find_idle_sessions()
     
     utime_t age = now;
     age -= session->last_cap_renew;
-    mds->clog->info() << "closing stale session " << session->info.inst
+    mds->clog.info() << "closing stale session " << session->info.inst
 	<< " after " << age << "\n";
     dout(10) << "autoclosing stale session " << session->info.inst << " last " << session->last_cap_renew << dendl;
-    kill_session(session, NULL);
+    kill_session(session);
   }
 }
 
-/*
- * XXX bump in the interface here, not using an MDSInternalContextBase here
- * because all the callers right now happen to use a SaferCond
- */
-void Server::kill_session(Session *session, Context *on_safe)
+void Server::kill_session(Session *session)
 {
   if ((session->is_opening() ||
        session->is_open() ||
        session->is_stale()) &&
       !session->is_importing()) {
     dout(10) << "kill_session " << session << dendl;
-    journal_close_session(session, Session::STATE_KILLING, on_safe);
+    journal_close_session(session, Session::STATE_KILLING);
   } else {
     dout(10) << "kill_session importing or already closing/killing " << session << dendl;
     assert(session->is_closing() || 
 	   session->is_closed() || 
 	   session->is_killing() ||
 	   session->is_importing());
-    if (on_safe) {
-      on_safe->complete(0);
-    }
   }
 }
 
-void Server::journal_close_session(Session *session, int state, Context *on_safe)
+void Server::journal_close_session(Session *session, int state)
 {
   uint64_t sseq = mds->sessionmap.set_state(session, state);
   version_t pv = ++mds->sessionmap.projected;
@@ -595,7 +541,7 @@ void Server::journal_close_session(Session *session, int state, Context *on_safe
     piv = 0;
 
   mdlog->start_submit_entry(new ESession(session->info.inst, false, pv, both, piv),
-			    new C_MDS_session_finish(mds, session, sseq, false, pv, both, piv, on_safe));
+			    new C_MDS_session_finish(mds, session, sseq, false, pv, both, piv));
   mdlog->flush();
 
   // clean up requests, too
@@ -649,28 +595,33 @@ void Server::handle_client_reconnect(MClientReconnect *m)
   if (!mds->is_reconnect()) {
     // XXX maybe in the future we can do better than this?
     dout(1) << " no longer in reconnect state, ignoring reconnect, sending close" << dendl;
-    mds->clog->info() << "denied reconnect attempt (mds is "
+    mds->clog.info() << "denied reconnect attempt (mds is "
        << ceph_mds_state_name(mds->get_state())
        << ") from " << m->get_source_inst()
        << " after " << delay << " (allowed interval " << g_conf->mds_reconnect_timeout << ")\n";
-    m->get_connection()->send_message(new MClientSession(CEPH_SESSION_CLOSE));
+    mds->messenger->send_message(new MClientSession(CEPH_SESSION_CLOSE), m->get_connection());
     m->put();
     return;
   }
 
+  // notify client of success with an OPEN
+  mds->messenger->send_message(new MClientSession(CEPH_SESSION_OPEN), m->get_connection());
+
   if (session->is_closed()) {
-    dout(1) << " session is closed, ignoring reconnect, sending close" << dendl;
-    mds->clog->info() << "denied reconnect attempt (mds is "
-	<< ceph_mds_state_name(mds->get_state())
-	<< ") from " << m->get_source_inst() << " (session is closed)\n";
-    m->get_connection()->send_message(new MClientSession(CEPH_SESSION_CLOSE));
-    m->put();
-    return;
+    dout(10) << " session is closed, will make best effort to reconnect " 
+	     << m->get_source_inst() << dendl;
+    mds->sessionmap.set_state(session, Session::STATE_OPENING);
+    version_t pv = ++mds->sessionmap.projected;
+    uint64_t sseq = session->get_state_seq();
+    mdlog->start_submit_entry(new ESession(session->info.inst, true, pv),
+			      new C_MDS_session_finish(mds, session, sseq, true, pv));
+    mdlog->flush();
+    mds->clog.debug() << "reconnect by new " << session->info.inst
+	<< " after " << delay << "\n";
+  } else {
+    mds->clog.debug() << "reconnect by " << session->info.inst
+	<< " after " << delay << "\n";
   }
-
-  // notify client of success with an OPEN
-  m->get_connection()->send_message(new MClientSession(CEPH_SESSION_OPEN));
-  mds->clog->debug() << "reconnect by " << session->info.inst << " after " << delay << "\n";
   
   // snaprealms
   for (vector<ceph_mds_snaprealm_reconnect>::iterator p = m->realms.begin();
@@ -758,7 +709,7 @@ void Server::reconnect_tick()
       Session *session = mds->sessionmap.get_session(entity_name_t::CLIENT(p->v));
       assert(session);
       dout(1) << "reconnect gave up on " << session->info.inst << dendl;
-      kill_session(session, NULL);
+      kill_session(session);
       failed_reconnects++;
     }
     client_reconnect_gather.clear();
@@ -790,12 +741,6 @@ void Server::recover_filelocks(CInode *in, bufferlist locks, int64_t client)
   }
 }
 
-
-/**
- * Call this when the MDCache is oversized, to send requests to the clients
- * to trim some caps, and consequently unpin some inodes in the MDCache so
- * that it can trim too.
- */
 void Server::recall_client_state(float ratio)
 {
   int max_caps_per_client = (int)(g_conf->mds_cache_size * .8);
@@ -821,22 +766,22 @@ void Server::recall_client_state(float ratio)
 	     << dendl;
 
     if (session->caps.size() > min_caps_per_client) {	
-      int newlim = MIN((int)(session->caps.size() * ratio), max_caps_per_client);
-      if (session->caps.size() > newlim) {
-          MClientSession *m = new MClientSession(CEPH_SESSION_RECALL_STATE);
-          m->head.max_caps = newlim;
-          mds->send_message_client(m, session);
-          session->notify_recall_sent(newlim);
-      }
+      int newlim = (int)(session->caps.size() * ratio);
+      if (newlim > max_caps_per_client)
+	newlim = max_caps_per_client;
+      MClientSession *m = new MClientSession(CEPH_SESSION_RECALL_STATE);
+      m->head.max_caps = newlim;
+      mds->send_message_client(m, session);
     }
   }
+ 
 }
 
 
 /*******
  * some generic stuff for finishing off requests
  */
-void Server::journal_and_reply(MDRequestRef& mdr, CInode *in, CDentry *dn, LogEvent *le, MDSInternalContextBase *fin)
+void Server::journal_and_reply(MDRequestRef& mdr, CInode *in, CDentry *dn, LogEvent *le, Context *fin)
 {
   dout(10) << "journal_and_reply tracei " << in << " tracedn " << dn << dendl;
 
@@ -852,7 +797,7 @@ void Server::journal_and_reply(MDRequestRef& mdr, CInode *in, CDentry *dn, LogEv
   early_reply(mdr, in, dn);
   
   mdr->committing = true;
-  submit_mdlog_entry(le, fin, mdr, __func__);
+  mdlog->submit_entry(le, fin);
   
   if (mdr->client_request && mdr->client_request->is_replay()) {
     if (mds->queue_one_replay()) {
@@ -867,37 +812,6 @@ void Server::journal_and_reply(MDRequestRef& mdr, CInode *in, CDentry *dn, LogEv
     mdlog->flush();
 }
 
-class C_MarkEvent : public MDSInternalContext
-{
-  Context *true_finisher;
-  MDRequestRef mdr;
-  string event_str;
-public:
-  C_MarkEvent(MDS *mds_, Context *f, MDRequestRef& _mdr,
-		 const char *evt)
-    : MDSInternalContext(mds_), true_finisher(f), mdr(_mdr),
-      event_str("journal_committed: ") {
-    event_str += evt;
-  }
-  virtual void finish(int r) {
-    mdr->mark_event(event_str);
-    true_finisher->complete(r);
-  }
-};
-
-
-void Server::submit_mdlog_entry(LogEvent *le, MDSInternalContextBase *fin, MDRequestRef& mdr,
-                                const char *event)
-{
-  if (mdr) {
-    string event_str("submit entry: ");
-    event_str += event;
-    mdr->mark_event(event_str);
-    mdlog->submit_entry(le, new C_MarkEvent(mds, fin, mdr, event));
-  } else
-    mdlog->submit_entry(le, fin);
-}
-
 /*
  * send generic response (just an error code), clean up mdr
  */
@@ -911,8 +825,8 @@ void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn)
   if (!g_conf->mds_early_reply)
     return;
 
-  if (mdr->has_more() && mdr->more()->has_journaled_slaves) {
-    dout(10) << "early_reply - there are journaled slaves, not allowed." << dendl;
+  if (mdr->are_slaves()) {
+    dout(10) << "early_reply - there are slaves, not allowed." << dendl;
     mds->mdlog->flush();
     return; 
   }
@@ -960,16 +874,14 @@ void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn)
   }
 
   reply->set_extra_bl(mdr->reply_extra_bl);
-  req->get_connection()->send_message(reply);
+  messenger->send_message(reply, req->get_connection());
 
   mdr->did_early_reply = true;
 
   mds->logger->inc(l_mds_reply);
   utime_t lat = ceph_clock_now(g_ceph_context) - mdr->client_request->get_recv_stamp();
-  mds->logger->tinc(l_mds_reply_latency, lat);
+  mds->logger->tinc(l_mds_replyl, lat);
   dout(20) << "lat " << lat << dendl;
-
-  mdr->mark_event("early_replied");
 }
 
 /*
@@ -986,8 +898,6 @@ void Server::reply_request(MDRequestRef& mdr, MClientReply *reply, CInode *trace
 	   << " (" << cpp_strerror(reply->get_result())
 	   << ") " << *req << dendl;
 
-  mdr->mark_event("replying");
-
   // note successful request in session map?
   if (req->may_write() && mdr->session && reply->get_result() == 0)
     mdr->session->add_completed_request(mdr->reqid.tid, mdr->alloc_ino);
@@ -1012,7 +922,7 @@ void Server::reply_request(MDRequestRef& mdr, MClientReply *reply, CInode *trace
 
     mds->logger->inc(l_mds_reply);
     utime_t lat = ceph_clock_now(g_ceph_context) - mdr->client_request->get_recv_stamp();
-    mds->logger->tinc(l_mds_reply_latency, lat);
+    mds->logger->tinc(l_mds_replyl, lat);
     dout(20) << "lat " << lat << dendl;
     
     if (tracei)
@@ -1047,7 +957,7 @@ void Server::reply_request(MDRequestRef& mdr, MClientReply *reply, CInode *trace
     }
 
     reply->set_mdsmap_epoch(mds->mdsmap->get_epoch());
-    client_con->send_message(reply);
+    messenger->send_message(reply, client_con);
   }
   
   // clean up request
@@ -1173,10 +1083,7 @@ void Server::handle_client_request(MClientRequest *req)
 {
   dout(4) << "handle_client_request " << *req << dendl;
 
-  if (mds->logger)
-    mds->logger->inc(l_mds_request);
-  if (logger)
-    logger->inc(l_mdss_handle_client_request);
+  if (logger) logger->inc(l_mdss_hcreq);
 
   if (!mdcache->is_open()) {
     dout(5) << "waiting for root" << dendl;
@@ -1223,7 +1130,7 @@ void Server::handle_client_request(MClientRequest *req)
 	::encode(created, extra);
 	reply->set_extra_bl(extra);
       }
-      req->get_connection()->send_message(reply);
+      mds->messenger->send_message(reply, req->get_connection());
 
       if (req->is_replay())
 	mds->queue_one_replay();
@@ -1269,7 +1176,7 @@ void Server::dispatch_client_request(MDRequestRef& mdr)
 {
   MClientRequest *req = mdr->client_request;
 
-  if (logger) logger->inc(l_mdss_dispatch_client_request);
+  if (logger) logger->inc(l_mdss_dcreq);
 
   dout(7) << "dispatch_client_request " << *req << dendl;
 
@@ -1391,7 +1298,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m)
   dout(4) << "handle_slave_request " << m->get_reqid() << " from " << m->get_source() << dendl;
   int from = m->get_source().num();
 
-  if (logger) logger->inc(l_mdss_handle_slave_request);
+  if (logger) logger->inc(l_mdss_hsreq);
 
   // reply?
   if (m->is_reply())
@@ -1449,8 +1356,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m)
       m->put();
       return;
     }
-    mdr = mdcache->request_start_slave(m->get_reqid(), m->get_attempt(), m);
-    mdr->set_op_stamp(m->op_stamp);
+    mdr = mdcache->request_start_slave(m->get_reqid(), m->get_attempt(), from);
   }
   assert(mdr->slave_request == 0);     // only one at a time, please!  
 
@@ -1583,7 +1489,7 @@ void Server::dispatch_slave_request(MDRequestRef& mdr)
     return;
   }
 
-  if (logger) logger->inc(l_mdss_dispatch_slave_request);
+  if (logger) logger->inc(l_mdss_dsreq);
 
   int op = mdr->slave_request->get_op();
   switch (op) {
@@ -1730,8 +1636,6 @@ void Server::handle_slave_auth_pin(MDRequestRef& mdr)
 	fail = true;
 	break;
       }
-      if (mdr->is_auth_pinned(*p))
-	continue;
       if (!mdr->can_auth_pin(*p)) {
 	if (mdr->slave_request->is_nonblock()) {
 	  dout(10) << " can't auth_pin (freezing?) " << **p << " nonblocking" << dendl;
@@ -1841,19 +1745,21 @@ void Server::handle_slave_auth_pin_ack(MDRequestRef& mdr, MMDSSlaveRequest *ack)
     assert(object);  // we pinned it
     dout(10) << " remote has pinned " << *object << dendl;
     if (!mdr->is_auth_pinned(object))
-      mdr->remote_auth_pins[object] = from;
+      mdr->remote_auth_pins.insert(object);
     if (*p == ack->get_authpin_freeze())
       mdr->set_remote_frozen_auth_pin(static_cast<CInode *>(object));
     pinned.insert(object);
   }
 
   // removed auth pins?
-  map<MDSCacheObject*,int>::iterator p = mdr->remote_auth_pins.begin();
+  set<MDSCacheObject*>::iterator p = mdr->remote_auth_pins.begin();
   while (p != mdr->remote_auth_pins.end()) {
-    MDSCacheObject* object = p->first;
-    if (p->second == from && pinned.count(object) == 0) {
-      dout(10) << " remote has unpinned " << *object << dendl;
-      mdr->remote_auth_pins.erase(p++);
+    if ((*p)->authority().first == from &&
+	pinned.count(*p) == 0) {
+      dout(10) << " remote has unpinned " << **p << dendl;
+      set<MDSCacheObject*>::iterator o = p;
+      ++p;
+      mdr->remote_auth_pins.erase(o);
     } else {
       ++p;
     }
@@ -2004,14 +1910,14 @@ CInode* Server::prepare_new_inode(MDRequestRef& mdr, CDir *dir, inodeno_t useino
 
   if (useino && useino != in->inode.ino) {
     dout(0) << "WARNING: client specified " << useino << " and i allocated " << in->inode.ino << dendl;
-    mds->clog->error() << mdr->client_request->get_source()
+    mds->clog.error() << mdr->client_request->get_source()
        << " specified ino " << useino
        << " but mds." << mds->whoami << " allocated " << in->inode.ino << "\n";
     //assert(0); // just for now.
   }
     
   int got = g_conf->mds_client_prealloc_inos - mdr->session->get_num_projected_prealloc_inos();
-  if (got > g_conf->mds_client_prealloc_inos / 2) {
+  if (got > 0) {
     mds->inotable->project_alloc_ids(mdr->prealloc_inos, got);
     assert(mdr->prealloc_inos.size());  // or else fix projected increment semantics
     mdr->session->pending_prealloc_inos.insert(mdr->prealloc_inos);
@@ -2053,7 +1959,7 @@ CInode* Server::prepare_new_inode(MDRequestRef& mdr, CDir *dir, inodeno_t useino
 
   in->inode.uid = mdr->client_request->get_caller_uid();
 
-  in->inode.ctime = in->inode.mtime = in->inode.atime = mdr->get_op_stamp();
+  in->inode.ctime = in->inode.mtime = in->inode.atime = mdr->now;   // now
 
   MClientRequest *req = mdr->client_request;
   if (req->get_data().length()) {
@@ -2147,10 +2053,11 @@ CDir *Server::traverse_to_auth_dir(MDRequestRef& mdr, vector<CDentry*> &trace, f
   return dir;
 }
 
-class C_MDS_TryFindInode : public ServerContext {
+class C_MDS_TryFindInode : public Context {
+  Server *server;
   MDRequestRef mdr;
 public:
-  C_MDS_TryFindInode(Server *s, MDRequestRef& r) : ServerContext(s), mdr(r) {}
+  C_MDS_TryFindInode(Server *s, MDRequestRef& r) : server(s), mdr(r) {}
   virtual void finish(int r) {
     if (r == -ESTALE) // :( find_ino_peers failed
       server->reply_request(mdr, r);
@@ -2185,7 +2092,7 @@ CInode* Server::rdlock_path_pin_ref(MDRequestRef& mdr, int n,
       reply_request(mdr, r, NULL, no_lookup ? NULL : mdr->dn[n][mdr->dn[n].size()-1]);
     } else if (r == -ESTALE) {
       dout(10) << "FAIL on ESTALE but attempting recovery" << dendl;
-      MDSInternalContextBase *c = new C_MDS_TryFindInode(this, mdr);
+      Context *c = new C_MDS_TryFindInode(this, mdr);
       mdcache->find_ino_peers(refpath.get_ino(), c);
     } else {
       dout(10) << "FAIL on error " << r << dendl;
@@ -2453,9 +2360,10 @@ void Server::handle_client_getattr(MDRequestRef& mdr, bool is_lookup)
 		is_lookup ? mdr->dn[0].back() : 0);
 }
 
-struct C_MDS_LookupIno2 : public ServerContext {
+struct C_MDS_LookupIno2 : public Context {
+  Server *server;
   MDRequestRef mdr;
-  C_MDS_LookupIno2(Server *s, MDRequestRef& r) : ServerContext(s), mdr(r) {}
+  C_MDS_LookupIno2(Server *s, MDRequestRef& r) : server(s), mdr(r) {}
   void finish(int r) {
     server->_lookup_ino_2(mdr, r);
   }
@@ -2672,15 +2580,16 @@ void Server::handle_client_open(MDRequestRef& mdr)
     mdlog->start_entry(le);
     le->add_clean_inode(cur);
     ls->open_files.push_back(&cur->item_open_file);
-    mdlog->submit_entry(le);
+    mds->mdlog->submit_entry(le);
   }
   
   // hit pop
+  mdr->now = ceph_clock_now(g_ceph_context);
   if (cmode == CEPH_FILE_MODE_RDWR ||
       cmode == CEPH_FILE_MODE_WR) 
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), cur, META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, cur, META_POP_IWR);
   else
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), cur, META_POP_IRD,
+    mds->balancer->hit_inode(mdr->now, cur, META_POP_IRD, 
 			     mdr->client_request->get_source().num());
 
   CDentry *dn = 0;
@@ -2692,14 +2601,15 @@ void Server::handle_client_open(MDRequestRef& mdr)
   reply_request(mdr, 0, cur, dn);
 }
 
-class C_MDS_openc_finish : public MDSInternalContext {
+class C_MDS_openc_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CDentry *dn;
   CInode *newi;
   snapid_t follows;
 public:
   C_MDS_openc_finish(MDS *m, MDRequestRef& r, CDentry *d, CInode *ni, snapid_t f) :
-    MDSInternalContext(m), mdr(r), dn(d), newi(ni), follows(f) {}
+    mds(m), mdr(r), dn(d), newi(ni), follows(f) {}
   void finish(int r) {
     assert(r == 0);
 
@@ -2714,10 +2624,9 @@ public:
 
     mds->locker->share_inode_max_size(newi);
 
-    MDRequestRef null_ref;
-    mds->mdcache->send_dentry_link(dn, null_ref);
+    mds->mdcache->send_dentry_link(dn);
 
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), newi, META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, newi, META_POP_IWR);
 
     MClientReply *reply = new MClientReply(mdr->client_request, 0);
     reply->set_extra_bl(mdr->reply_extra_bl);
@@ -2753,7 +2662,7 @@ void Server::handle_client_openc(MDRequestRef& mdr)
     if (r < 0 && r != -ENOENT) {
       if (r == -ESTALE) {
 	dout(10) << "FAIL on ESTALE but attempting recovery" << dendl;
-	MDSInternalContextBase *c = new C_MDS_TryFindInode(this, mdr);
+	Context *c = new C_MDS_TryFindInode(this, mdr);
 	mdcache->find_ino_peers(req->get_filepath().get_ino(), c);
       } else {
 	dout(10) << "FAIL on error " << r << dendl;
@@ -2828,6 +2737,8 @@ void Server::handle_client_openc(MDRequestRef& mdr)
   // created null dn.
     
   // create inode.
+  mdr->now = ceph_clock_now(g_ceph_context);
+
   SnapRealm *realm = diri->find_snaprealm();   // use directory's realm; inode isn't attached yet.
   snapid_t follows = realm->get_newest_seq();
 
@@ -2945,8 +2856,7 @@ void Server::handle_client_readdir(MDRequestRef& mdr)
   dir->verify_fragstat();
 #endif
 
-  utime_t now = ceph_clock_now(NULL);
-  mdr->set_mds_stamp(now);
+  mdr->now = ceph_clock_now(g_ceph_context);
 
   snapid_t snapid = mdr->snapid;
   dout(10) << "snapid " << snapid << dendl;
@@ -3030,7 +2940,7 @@ void Server::handle_client_readdir(MDRequestRef& mdr)
 
 	// already issued caps and leases, reply immediately.
 	if (dnbl.length() > 0) {
-	  mdcache->open_remote_dentry(dn, dnp, new C_MDSInternalNoop);
+	  mdcache->open_remote_dentry(dn, dnp, new C_NoopContext);
 	  dout(10) << " open remote dentry after caps were issued, stopping at "
 		   << dnbl.length() << " < " << bytes_left << dendl;
 	  break;
@@ -3054,7 +2964,7 @@ void Server::handle_client_readdir(MDRequestRef& mdr)
     // dentry
     dout(12) << "including    dn " << *dn << dendl;
     ::encode(dn->name, dnbl);
-    mds->locker->issue_client_lease(dn, client, dnbl, now, mdr->session);
+    mds->locker->issue_client_lease(dn, client, dnbl, mdr->now, mdr->session);
 
     // inode
     dout(12) << "including inode " << *in << dendl;
@@ -3112,14 +3022,15 @@ void Server::handle_client_readdir(MDRequestRef& mdr)
 /* 
  * finisher for basic inode updates
  */
-class C_MDS_inode_update_finish : public MDSInternalContext {
+class C_MDS_inode_update_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CInode *in;
   bool truncating_smaller, changed_ranges;
 public:
   C_MDS_inode_update_finish(MDS *m, MDRequestRef& r, CInode *i,
 			    bool sm=false, bool cr=false) :
-    MDSInternalContext(m), mdr(r), in(i), truncating_smaller(sm), changed_ranges(cr) { }
+    mds(m), mdr(r), in(i), truncating_smaller(sm), changed_ranges(cr) { }
   void finish(int r) {
     assert(r == 0);
 
@@ -3133,7 +3044,7 @@ public:
       mds->mdcache->truncate_inode(in, mdr->ls);
     }
 
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), in, META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, in, META_POP_IWR);   
 
     mds->server->reply_request(mdr, 0);
 
@@ -3157,7 +3068,7 @@ void Server::handle_client_file_setlock(MDRequestRef& mdr)
      it will redeliver this request at a later date, so drop the request.
    */
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks)) {
-    dout(10) << "handle_client_file_setlock could not get locks!" << dendl;
+    dout(0) << "handle_client_file_setlock could not get locks!" << dendl;
     return;
   }
 
@@ -3171,7 +3082,7 @@ void Server::handle_client_file_setlock(MDRequestRef& mdr)
   set_lock.type = req->head.args.filelock_change.type;
   bool will_wait = req->head.args.filelock_change.wait;
 
-  dout(10) << "handle_client_file_setlock: " << set_lock << dendl;
+  dout(0) << "handle_client_file_setlock: " << set_lock << dendl;
 
   ceph_lock_state_t *lock_state = NULL;
 
@@ -3192,10 +3103,10 @@ void Server::handle_client_file_setlock(MDRequestRef& mdr)
     return;
   }
 
-  dout(10) << " state prior to lock change: " << *lock_state << dendl;
+  dout(10) << " state prior to lock change: " << *lock_state << dendl;;
   if (CEPH_LOCK_UNLOCK == set_lock.type) {
     list<ceph_filelock> activated_locks;
-    list<MDSInternalContextBase*> waiters;
+    list<Context*> waiters;
     if (lock_state->is_waiting(set_lock)) {
       dout(10) << " unlock removing waiting lock " << set_lock << dendl;
       lock_state->remove_waiting(set_lock);
@@ -3249,7 +3160,7 @@ void Server::handle_client_file_readlock(MDRequestRef& mdr)
   */
   rdlocks.insert(&cur->flocklock);
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks)) {
-    dout(10) << "handle_client_file_readlock could not get locks!" << dendl;
+    dout(0) << "handle_client_file_readlock could not get locks!" << dendl;
     return;
   }
   
@@ -3274,8 +3185,8 @@ void Server::handle_client_file_readlock(MDRequestRef& mdr)
     break;
 
   default:
-    dout(10) << "got unknown lock type " << checking_lock.type
-	     << ", dropping request!" << dendl;
+    dout(0) << "got unknown lock type " << checking_lock.type
+	    << ", dropping request!" << dendl;
     return;
   }
   lock_state->look_for_lock(checking_lock);
@@ -3342,6 +3253,8 @@ void Server::handle_client_setattr(MDRequestRef& mdr)
 
   pi = cur->project_inode();
 
+  utime_t now = ceph_clock_now(g_ceph_context);
+
   if (mask & CEPH_SETATTR_MODE)
     pi->mode = (pi->mode & ~07777) | (req->head.args.setattr.mode & 07777);
   if (mask & CEPH_SETATTR_UID)
@@ -3363,7 +3276,7 @@ void Server::handle_client_setattr(MDRequestRef& mdr)
       pi->size = req->head.args.setattr.size;
       pi->rstat.rbytes = pi->size;
     }
-    pi->mtime = mdr->get_op_stamp();
+    pi->mtime = now;
 
     // adjust client's max_size?
     map<client_t,client_writeable_range_t> new_ranges;
@@ -3376,11 +3289,11 @@ void Server::handle_client_setattr(MDRequestRef& mdr)
   }
 
   pi->version = cur->pre_dirty();
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = now;
 
   // log + wait
   le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
   
   journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur,
@@ -3409,8 +3322,8 @@ void Server::do_open_truncate(MDRequestRef& mdr, int cmode)
 
   // prepare
   inode_t *pi = in->project_inode();
+  pi->mtime = pi->ctime = ceph_clock_now(g_ceph_context);
   pi->version = in->pre_dirty();
-  pi->mtime = pi->ctime = mdr->get_op_stamp();
 
   uint64_t old_size = MAX(pi->size, mdr->client_request->head.args.open.old_size);
   if (old_size > 0) {
@@ -3428,7 +3341,7 @@ void Server::do_open_truncate(MDRequestRef& mdr, int cmode)
   
   le->metablob.add_client_req(mdr->reqid, mdr->client_request->get_oldest_client_tid());
 
-  mdcache->predirty_journal_parents(mdr, &le->metablob, in, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->metablob, in, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, in);
   
   // make sure ino gets into the journal
@@ -3516,14 +3429,14 @@ void Server::handle_client_setlayout(MDRequestRef& mdr)
   // add the old pool to the inode
   pi->add_old_pool(old_pool);
   pi->version = cur->pre_dirty();
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = ceph_clock_now(g_ceph_context);
   
   // log + wait
   mdr->ls = mdlog->get_current_segment();
   EUpdate *le = new EUpdate(mdlog, "setlayout");
   mdlog->start_entry(le);
   le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
   
   journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur));
@@ -3599,7 +3512,7 @@ void Server::handle_client_setdirlayout(MDRequestRef& mdr)
   EUpdate *le = new EUpdate(mdlog, "setlayout");
   mdlog->start_entry(le);
   le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
 
   journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur));
@@ -3630,8 +3543,7 @@ struct keys_and_values
     qi::rule<Iterator, string()> key, value;
 };
 
-int Server::parse_layout_vxattr(string name, string value, const OSDMap *osdmap,
-				ceph_file_layout *layout)
+int Server::parse_layout_vxattr(string name, string value, ceph_file_layout *layout)
 {
   dout(20) << "parse_layout_vxattr name " << name << " value '" << value << "'" << dendl;
   try {
@@ -3648,7 +3560,7 @@ int Server::parse_layout_vxattr(string name, string value, const OSDMap *osdmap,
       if (begin != end)
 	return -EINVAL;
       for (map<string,string>::iterator q = m.begin(); q != m.end(); ++q) {
-	int r = parse_layout_vxattr(string("layout.") + q->first, q->second, osdmap, layout);
+	int r = parse_layout_vxattr(string("layout.") + q->first, q->second, layout);
 	if (r < 0)
 	  return r;
       }
@@ -3662,7 +3574,7 @@ int Server::parse_layout_vxattr(string name, string value, const OSDMap *osdmap,
       try {
 	layout->fl_pg_pool = boost::lexical_cast<unsigned>(value);
       } catch (boost::bad_lexical_cast const&) {
-	int64_t pool = osdmap->lookup_pg_pool_name(value);
+	int64_t pool = mds->osdmap->lookup_pg_pool_name(value);
 	if (pool < 0) {
 	  dout(10) << " unknown pool " << value << dendl;
 	  return -ENOENT;
@@ -3722,18 +3634,15 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur,
 	layout = mds->mdcache->default_file_layout;
 
       rest = name.substr(name.find("layout"));
-      const OSDMap *osdmap = mds->objecter->get_osdmap_read();
-      int r = parse_layout_vxattr(rest, value, osdmap, &layout);
-      mds->objecter->put_osdmap_read();
+      int r = parse_layout_vxattr(rest, value, &layout);
       if (r < 0) {
 	if (r == -ENOENT) {
 	  if (!mdr->waited_for_osdmap) {
-	    // make sure we have the latest map.
-	    // FIXME: we should get the client's osdmap epoch and just
-	    // make sure we have *that*.
+	    // send request to get latest map, but don't wait if
+	    // we don't get anything newer than what we have
 	    mdr->waited_for_osdmap = true;
-	    mds->objecter->wait_for_latest_osdmap(
-	      new C_OnFinisher(new C_IO_Wrapper(mds, new C_MDS_RetryRequest(mdcache, mdr)), &mds->finisher));
+	    mds->request_osdmap(
+		  new C_MDS_RetryRequest(mdcache, mdr));
 	    return;
 	  }
 	  r = -EINVAL;
@@ -3755,18 +3664,15 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur,
       }
       ceph_file_layout layout = cur->get_projected_inode()->layout;
       rest = name.substr(name.find("layout"));
-      const OSDMap *osdmap = mds->objecter->get_osdmap_read();
-      int r = parse_layout_vxattr(rest, value, osdmap, &layout);
-      mds->objecter->put_osdmap_read();
+      int r = parse_layout_vxattr(rest, value, &layout);
       if (r < 0) {
 	if (r == -ENOENT) {
 	  if (!mdr->waited_for_osdmap) {
-	    // make sure we have the latest map.
-	    // FIXME: we should get the client's osdmap epoch and just
-	    // make sure we have *that*.
+	    // send request to get latest map, but don't wait if
+	    // we don't get anything newer than what we have
 	    mdr->waited_for_osdmap = true;
-	    mds->objecter->wait_for_latest_osdmap(
-	      new C_OnFinisher(new C_IO_Wrapper(mds, new C_MDS_RetryRequest(mdcache, mdr)), &mds->finisher));
+	    mds->request_osdmap(
+		  new C_MDS_RetryRequest(mdcache, mdr));
 	    return;
 	  }
 	  r = -EINVAL;
@@ -3783,7 +3689,7 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur,
       old_pool = pi->layout.fl_pg_pool;
       pi->add_old_pool(old_pool);
       pi->layout = layout;
-      pi->ctime = mdr->get_op_stamp();
+      pi->ctime = ceph_clock_now(g_ceph_context);
     }
 
     pi->version = cur->pre_dirty();
@@ -3795,7 +3701,7 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur,
     EUpdate *le = new EUpdate(mdlog, "set vxattr layout");
     mdlog->start_entry(le);
     le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-    mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+    mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
     mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
 
     journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur));
@@ -3842,7 +3748,7 @@ void Server::handle_remove_vxattr(MDRequestRef& mdr, CInode *cur,
     EUpdate *le = new EUpdate(mdlog, "remove dir layout vxattr");
     mdlog->start_entry(le);
     le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-    mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+    mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
     mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
 
     journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur));
@@ -3852,13 +3758,14 @@ void Server::handle_remove_vxattr(MDRequestRef& mdr, CInode *cur,
   reply_request(mdr, -ENODATA);
 }
 
-class C_MDS_inode_xattr_update_finish : public MDSInternalContext {
+class C_MDS_inode_xattr_update_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CInode *in;
 public:
 
   C_MDS_inode_xattr_update_finish(MDS *m, MDRequestRef& r, CInode *i) :
-    MDSInternalContext(m), mdr(r), in(i) { }
+    mds(m), mdr(r), in(i) { }
   void finish(int r) {
     assert(r == 0);
 
@@ -3867,7 +3774,7 @@ public:
     
     mdr->apply();
 
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), in, META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, in, META_POP_IWR);   
 
     mds->server->reply_request(mdr, 0);
   }
@@ -3924,7 +3831,7 @@ void Server::handle_client_setxattr(MDRequestRef& mdr)
   map<string,bufferptr> *px = new map<string,bufferptr>;
   inode_t *pi = cur->project_inode(px);
   pi->version = cur->pre_dirty();
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = ceph_clock_now(g_ceph_context);
   pi->xattr_version++;
   px->erase(name);
   if (!(flags & CEPH_XATTR_REMOVE)) {
@@ -3938,7 +3845,7 @@ void Server::handle_client_setxattr(MDRequestRef& mdr)
   EUpdate *le = new EUpdate(mdlog, "setxattr");
   mdlog->start_entry(le);
   le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
 
   journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur));
@@ -3985,7 +3892,7 @@ void Server::handle_client_removexattr(MDRequestRef& mdr)
   map<string,bufferptr> *px = new map<string,bufferptr>;
   inode_t *pi = cur->project_inode(px);
   pi->version = cur->pre_dirty();
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = ceph_clock_now(g_ceph_context);
   pi->xattr_version++;
   px->erase(name);
 
@@ -3994,7 +3901,7 @@ void Server::handle_client_removexattr(MDRequestRef& mdr)
   EUpdate *le = new EUpdate(mdlog, "removexattr");
   mdlog->start_entry(le);
   le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid());
-  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur);
 
   journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur));
@@ -4009,14 +3916,15 @@ void Server::handle_client_removexattr(MDRequestRef& mdr)
 
 // MKNOD
 
-class C_MDS_mknod_finish : public MDSInternalContext {
+class C_MDS_mknod_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CDentry *dn;
   CInode *newi;
   snapid_t follows;
 public:
   C_MDS_mknod_finish(MDS *m, MDRequestRef& r, CDentry *d, CInode *ni, snapid_t f) :
-    MDSInternalContext(m), mdr(r), dn(d), newi(ni), follows(f) {}
+    mds(m), mdr(r), dn(d), newi(ni), follows(f) {}
   void finish(int r) {
     assert(r == 0);
 
@@ -4041,14 +3949,13 @@ public:
 
     mdr->apply();
 
-    MDRequestRef null_ref;
-    mds->mdcache->send_dentry_link(dn, null_ref);
+    mds->mdcache->send_dentry_link(dn);
 
     if (newi->inode.is_file())
       mds->locker->share_inode_max_size(newi);
 
     // hit pop
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), newi, META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, newi, META_POP_IWR);
 
     // reply
     MClientReply *reply = new MClientReply(mdr->client_request, 0);
@@ -4089,6 +3996,8 @@ void Server::handle_client_mknod(MDRequestRef& mdr)
 
   SnapRealm *realm = dn->get_dir()->inode->find_snaprealm();
   snapid_t follows = realm->get_newest_seq();
+  mdr->now = ceph_clock_now(g_ceph_context);
+
   CInode *newi = prepare_new_inode(mdr, dn->get_dir(), inodeno_t(req->head.ino),
 				   mode, &layout);
   assert(newi);
@@ -4168,6 +4077,7 @@ void Server::handle_client_mkdir(MDRequestRef& mdr)
   // new inode
   SnapRealm *realm = dn->get_dir()->inode->find_snaprealm();
   snapid_t follows = realm->get_newest_seq();
+  mdr->now = ceph_clock_now(g_ceph_context);
 
   unsigned mode = req->head.args.mkdir.mode;
   mode &= ~S_IFMT;
@@ -4242,6 +4152,7 @@ void Server::handle_client_symlink(MDRequestRef& mdr)
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
     return;
 
+  mdr->now = ceph_clock_now(g_ceph_context);
   snapid_t follows = dn->get_dir()->inode->find_snaprealm()->get_newest_seq();
 
   unsigned mode = S_IFLNK | 0777;
@@ -4307,12 +4218,39 @@ void Server::handle_client_link(MDRequestRef& mdr)
     reply_request(mdr, -EINVAL);
     return;
   }
-
+  
   xlocks.insert(&targeti->linklock);
 
+  // take any locks needed for anchor creation/verification
+  // NOTE: we do this on the master even if the anchor/link update may happen
+  // on the slave.  That means we may have out of date anchor state on our
+  // end.  That's fine:  either, we xlock when we don't need to (slow but
+  // not a problem), or we rdlock when we need to xlock, but then discover we
+  // need to xlock and on our next pass through we adjust the locks (this works
+  // as long as the linklock rdlock isn't the very last lock we take).
+  mds->mdcache->anchor_create_prep_locks(mdr, targeti, rdlocks, xlocks);
+
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
     return;
 
+  // pick mtime
+  if (mdr->now == utime_t())
+    mdr->now = ceph_clock_now(g_ceph_context);
+
+  // does the target need an anchor?
+  if (targeti->is_auth()) {
+    if (targeti->is_anchored()) {
+      dout(7) << "target anchored already (nlink=" << targeti->inode.nlink << "), sweet" << dendl;
+    } 
+    else {
+      dout(7) << "target needs anchor, nlink=" << targeti->inode.nlink << ", creating anchor" << dendl;
+      
+      mdcache->anchor_create(mdr, targeti,
+			     new C_MDS_RetryRequest(mdcache, mdr));
+      return;
+    }
+  }
+
   // go!
   assert(g_conf->mds_kill_link_at != 1);
 
@@ -4324,7 +4262,8 @@ void Server::handle_client_link(MDRequestRef& mdr)
 }
 
 
-class C_MDS_link_local_finish : public MDSInternalContext {
+class C_MDS_link_local_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CDentry *dn;
   CInode *targeti;
@@ -4333,7 +4272,7 @@ class C_MDS_link_local_finish : public MDSInternalContext {
 public:
   C_MDS_link_local_finish(MDS *m, MDRequestRef& r, CDentry *d, CInode *ti,
 			  version_t dnpv_, version_t tipv_) :
-    MDSInternalContext(m), mdr(r), dn(d), targeti(ti),
+    mds(m), mdr(r), dn(d), targeti(ti),
     dnpv(dnpv_), tipv(tipv_) { }
   void finish(int r) {
     assert(r == 0);
@@ -4355,7 +4294,7 @@ void Server::_link_local(MDRequestRef& mdr, CDentry *dn, CInode *targeti)
   // project inode update
   inode_t *pi = targeti->project_inode();
   pi->nlink++;
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = mdr->now;
   pi->version = tipv;
 
   snapid_t follows = dn->get_dir()->inode->find_snaprealm()->get_newest_seq();
@@ -4390,13 +4329,12 @@ void Server::_link_local_finish(MDRequestRef& mdr, CDentry *dn, CInode *targeti,
   targeti->pop_and_dirty_projected_inode(mdr->ls);
 
   mdr->apply();
-
-  MDRequestRef null_ref;
-  mds->mdcache->send_dentry_link(dn, null_ref);
+  
+  mds->mdcache->send_dentry_link(dn);
 
   // bump target popularity
-  mds->balancer->hit_inode(mdr->get_mds_stamp(), targeti, META_POP_IWR);
-  mds->balancer->hit_dir(mdr->get_mds_stamp(), dn->get_dir(), META_POP_IWR);
+  mds->balancer->hit_inode(mdr->now, targeti, META_POP_IWR);
+  mds->balancer->hit_dir(mdr->now, dn->get_dir(), META_POP_IWR);
 
   // reply
   MClientReply *reply = new MClientReply(mdr->client_request, 0);
@@ -4406,7 +4344,8 @@ void Server::_link_local_finish(MDRequestRef& mdr, CDentry *dn, CInode *targeti,
 
 // link / unlink remote
 
-class C_MDS_link_remote_finish : public MDSInternalContext {
+class C_MDS_link_remote_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   bool inc;
   CDentry *dn;
@@ -4414,7 +4353,7 @@ class C_MDS_link_remote_finish : public MDSInternalContext {
   version_t dpv;
 public:
   C_MDS_link_remote_finish(MDS *m, MDRequestRef& r, bool i, CDentry *d, CInode *ti) :
-    MDSInternalContext(m), mdr(r), inc(i), dn(d), targeti(ti),
+    mds(m), mdr(r), inc(i), dn(d), targeti(ti),
     dpv(d->get_projected_version()) {}
   void finish(int r) {
     assert(r == 0);
@@ -4446,7 +4385,7 @@ void Server::_link_remote(MDRequestRef& mdr, bool inc, CDentry *dn, CInode *targ
       op = MMDSSlaveRequest::OP_UNLINKPREP;
     MMDSSlaveRequest *req = new MMDSSlaveRequest(mdr->reqid, mdr->attempt, op);
     targeti->set_object_info(req->get_object_info());
-    req->op_stamp = mdr->get_op_stamp();
+    req->now = mdr->now;
     mds->send_message_mds(req, linkauth);
 
     assert(mdr->more()->waiting_on_slave.count(linkauth) == 0);
@@ -4457,8 +4396,6 @@ void Server::_link_remote(MDRequestRef& mdr, bool inc, CDentry *dn, CInode *targ
 
   assert(g_conf->mds_kill_link_at != 2);
 
-  mdr->set_mds_stamp(ceph_clock_now(NULL));
-
   // add to event
   mdr->ls = mdlog->get_current_segment();
   EUpdate *le = new EUpdate(mdlog, inc ? "link_remote":"unlink_remote");
@@ -4483,6 +4420,9 @@ void Server::_link_remote(MDRequestRef& mdr, bool inc, CDentry *dn, CInode *targ
     le->metablob.add_null_dentry(dn, true);
   }
 
+  if (mdr->more()->dst_reanchor_atid)
+    le->metablob.add_table_transaction(TABLE_ANCHOR, mdr->more()->dst_reanchor_atid);
+
   journal_and_reply(mdr, targeti, dn, le, new C_MDS_link_remote_finish(mds, mdr, inc, dn, targeti));
 }
 
@@ -4511,15 +4451,20 @@ void Server::_link_remote_finish(MDRequestRef& mdr, bool inc,
 
   mdr->apply();
 
-  MDRequestRef null_ref;
   if (inc)
-    mds->mdcache->send_dentry_link(dn, null_ref);
-  else
+    mds->mdcache->send_dentry_link(dn);
+  else {
+    MDRequestRef null_ref;
     mds->mdcache->send_dentry_unlink(dn, NULL, null_ref);
+  }
   
+  // commit anchor update?
+  if (mdr->more()->dst_reanchor_atid) 
+    mds->anchorclient->commit(mdr->more()->dst_reanchor_atid, mdr->ls);
+
   // bump target popularity
-  mds->balancer->hit_inode(mdr->get_mds_stamp(), targeti, META_POP_IWR);
-  mds->balancer->hit_dir(mdr->get_mds_stamp(), dn->get_dir(), META_POP_IWR);
+  mds->balancer->hit_inode(mdr->now, targeti, META_POP_IWR);
+  mds->balancer->hit_dir(mdr->now, dn->get_dir(), META_POP_IWR);
 
   // reply
   MClientReply *reply = new MClientReply(mdr->client_request, 0);
@@ -4533,24 +4478,26 @@ void Server::_link_remote_finish(MDRequestRef& mdr, bool inc,
 
 // remote linking/unlinking
 
-class C_MDS_SlaveLinkPrep : public ServerContext {
+class C_MDS_SlaveLinkPrep : public Context {
+  Server *server;
   MDRequestRef mdr;
   CInode *targeti;
 public:
   C_MDS_SlaveLinkPrep(Server *s, MDRequestRef& r, CInode *t) :
-    ServerContext(s), mdr(r), targeti(t) { }
+    server(s), mdr(r), targeti(t) { }
   void finish(int r) {
     assert(r == 0);
     server->_logged_slave_link(mdr, targeti);
   }
 };
 
-class C_MDS_SlaveLinkCommit : public ServerContext {
+class C_MDS_SlaveLinkCommit : public Context {
+  Server *server;
   MDRequestRef mdr;
   CInode *targeti;
 public:
   C_MDS_SlaveLinkCommit(Server *s, MDRequestRef& r, CInode *t) :
-    ServerContext(s), mdr(r), targeti(t) { }
+    server(s), mdr(r), targeti(t) { }
   void finish(int r) {
     server->_commit_slave_link(mdr, r, targeti);
   }
@@ -4572,11 +4519,28 @@ void Server::handle_slave_link_prep(MDRequestRef& mdr)
   CDentry::linkage_t *dnl = dn->get_linkage();
   assert(dnl->is_primary());
 
-  mdr->set_op_stamp(mdr->slave_request->op_stamp);
+  mdr->now = mdr->slave_request->now;
 
   mdr->auth_pin(targeti);
 
   //assert(0);  // test hack: make sure master can handle a slave that fails to prepare...
+
+  // anchor?
+  if (mdr->slave_request->get_op() == MMDSSlaveRequest::OP_LINKPREP) {
+    
+    // NOTE: the master took any locks needed for anchor creation/verification.
+
+    if (targeti->is_anchored()) {
+      dout(7) << "target anchored already (nlink=" << targeti->inode.nlink << "), sweet" << dendl;
+    } 
+    else {
+      dout(7) << "target needs anchor, nlink=" << targeti->inode.nlink << ", creating anchor" << dendl;
+      mdcache->anchor_create(mdr, targeti,
+			     new C_MDS_RetryRequest(mdcache, mdr));
+      return;
+    }
+  }
+
   assert(g_conf->mds_kill_link_at != 5);
 
   // journal it
@@ -4608,21 +4572,19 @@ void Server::handle_slave_link_prep(MDRequestRef& mdr)
   ::encode(rollback, le->rollback);
   mdr->more()->rollback_bl = le->rollback;
 
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = mdr->now;
   pi->version = targeti->pre_dirty();
 
   dout(10) << " projected inode " << pi << " v " << pi->version << dendl;
 
   // commit case
-  mdcache->predirty_journal_parents(mdr, &le->commit, dnl->get_inode(), 0, PREDIRTY_SHALLOW|PREDIRTY_PRIMARY);
+  mdcache->predirty_journal_parents(mdr, &le->commit, dnl->get_inode(), 0, PREDIRTY_SHALLOW|PREDIRTY_PRIMARY, 0);
   mdcache->journal_dirty_inode(mdr.get(), &le->commit, targeti);
 
   // set up commit waiter
   mdr->more()->slave_commit = new C_MDS_SlaveLinkCommit(this, mdr, targeti);
 
-  mdr->more()->slave_update_journaled = true;
-  submit_mdlog_entry(le, new C_MDS_SlaveLinkPrep(this, mdr, targeti),
-                     mdr, __func__);
+  mdlog->submit_entry(le, new C_MDS_SlaveLinkPrep(this, mdr, targeti));
   mdlog->flush();
 }
 
@@ -4638,7 +4600,7 @@ void Server::_logged_slave_link(MDRequestRef& mdr, CInode *targeti)
   mdr->apply();
 
   // hit pop
-  mds->balancer->hit_inode(mdr->get_mds_stamp(), targeti, META_POP_IWR);
+  mds->balancer->hit_inode(mdr->now, targeti, META_POP_IWR);
 
   // done.
   mdr->slave_request->put();
@@ -4656,9 +4618,10 @@ void Server::_logged_slave_link(MDRequestRef& mdr, CInode *targeti)
 }
 
 
-struct C_MDS_CommittedSlave : public ServerContext {
+struct C_MDS_CommittedSlave : public Context {
+  Server *server;
   MDRequestRef mdr;
-  C_MDS_CommittedSlave(Server *s, MDRequestRef& m) : ServerContext(s), mdr(m) {}
+  C_MDS_CommittedSlave(Server *s, MDRequestRef& m) : server(s), mdr(m) {}
   void finish(int r) {
     server->_committed_slave(mdr);
   }
@@ -4698,10 +4661,11 @@ void Server::_committed_slave(MDRequestRef& mdr)
   mds->mdcache->request_finish(mdr);
 }
 
-struct C_MDS_LoggedLinkRollback : public ServerContext {
+struct C_MDS_LoggedLinkRollback : public Context {
+  Server *server;
   MutationRef mut;
   MDRequestRef mdr;
-  C_MDS_LoggedLinkRollback(Server *s, MutationRef& m, MDRequestRef& r) : ServerContext(s), mut(m), mdr(r) {}
+  C_MDS_LoggedLinkRollback(Server *s, MutationRef& m, MDRequestRef& r) : server(s), mut(m), mdr(r) {}
   void finish(int r) {
     server->_link_rollback_finish(mut, mdr);
   }
@@ -4763,8 +4727,7 @@ void Server::do_link_rollback(bufferlist &rbl, int master, MDRequestRef& mdr)
   le->commit.add_dir(parent, true);
   le->commit.add_primary_dentry(in->get_projected_parent_dn(), 0, true);
   
-  submit_mdlog_entry(le, new C_MDS_LoggedLinkRollback(this, mut, mdr),
-                     mdr, __func__);
+  mdlog->submit_entry(le, new C_MDS_LoggedLinkRollback(this, mut, mdr));
   mdlog->flush();
 }
 
@@ -4799,8 +4762,6 @@ void Server::handle_slave_link_prep_ack(MDRequestRef& mdr, MMDSSlaveRequest *m)
   // witnessed!
   assert(mdr->more()->witnessed.count(from) == 0);
   mdr->more()->witnessed.insert(from);
-  assert(!m->is_not_journaled());
-  mdr->more()->has_journaled_slaves = true;
   
   // remove from waiting list
   assert(mdr->more()->waiting_on_slave.count(from));
@@ -4912,6 +4873,18 @@ void Server::handle_client_unlink(MDRequestRef& mdr)
     rdlocks.insert(&in->filelock);   // to verify it's empty
   mds->locker->include_snap_rdlocks(rdlocks, dnl->get_inode());
 
+  // if we unlink a snapped multiversion inode and are creating a
+  // remote link to it, it must be anchored.  this mirrors the logic
+  // in MDCache::journal_cow_dentry().
+  bool need_snap_dentry = 
+    dnl->is_primary() &&
+    in->is_multiversion() &&
+    in->find_snaprealm()->get_newest_seq() + 1 > dn->first;
+  if (need_snap_dentry) {
+    dout(10) << " i need to be anchored because i am multiversion and will get a remote cow dentry" << dendl;
+    mds->mdcache->anchor_create_prep_locks(mdr, in, rdlocks, xlocks);
+  }
+
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
     return;
 
@@ -4922,10 +4895,40 @@ void Server::handle_client_unlink(MDRequestRef& mdr)
   }
 
   // yay!
+  if (mdr->now == utime_t())
+    mdr->now = ceph_clock_now(g_ceph_context);
+
+  // NOTE: this is non-optimal.  we create an anchor at the old
+  // location, and then change it.  we can do better, but it's more
+  // complicated.  this is fine for now.
+  if (need_snap_dentry && !in->is_anchored()) {
+    mdcache->anchor_create(mdr, in, new C_MDS_RetryRequest(mdcache, mdr));
+    return;
+  }
+
+  // get stray dn ready?
+  if (dnl->is_primary()) {
+    if (!mdr->more()->dst_reanchor_atid && in->is_anchored()) {
+      dout(10) << "reanchoring to stray " << *dnl->get_inode() << dendl;
+      vector<Anchor> trace;
+      straydn->make_anchor_trace(trace, dnl->get_inode());
+      mds->anchorclient->prepare_update(dnl->get_inode()->ino(), trace, &mdr->more()->dst_reanchor_atid, 
+					new C_MDS_RetryRequest(mdcache, mdr));
+      return;
+    }
+  }
+
   if (in->is_dir() && in->has_subtree_root_dirfrag()) {
     // subtree root auths need to be witnesses
     set<int> witnesses;
-    in->list_replicas(witnesses);
+    list<CDir*> ls;
+    in->get_subtree_dirfrags(ls);
+    for (list<CDir*>::iterator p = ls.begin(); p != ls.end(); ++p) {
+      CDir *dir = *p;
+      int auth = dir->authority().first;
+      witnesses.insert(auth);
+      dout(10) << " need mds." << auth << " to witness for dirfrag " << *dir << dendl;      
+    } 
     dout(10) << " witnesses " << witnesses << ", have " << mdr->more()->witnessed << dendl;
 
     for (set<int>::iterator p = witnesses.begin();
@@ -4943,7 +4946,7 @@ void Server::handle_client_unlink(MDRequestRef& mdr)
     if (!mdr->more()->waiting_on_slave.empty())
       return;  // we're waiting for a witness.
   }
-
+  
   // ok!
   if (dnl->is_remote() && !dnl->get_inode()->is_auth()) 
     _link_remote(mdr, false, dn, dnl->get_inode());
@@ -4951,14 +4954,15 @@ void Server::handle_client_unlink(MDRequestRef& mdr)
     _unlink_local(mdr, dn, straydn);
 }
 
-class C_MDS_unlink_local_finish : public MDSInternalContext {
+class C_MDS_unlink_local_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CDentry *dn;
   CDentry *straydn;
   version_t dnpv;  // deleted dentry
 public:
   C_MDS_unlink_local_finish(MDS *m, MDRequestRef& r, CDentry *d, CDentry *sd) :
-    MDSInternalContext(m), mdr(r), dn(d), straydn(sd),
+    mds(m), mdr(r), dn(d), straydn(sd),
     dnpv(d->get_projected_version()) {}
   void finish(int r) {
     assert(r == 0);
@@ -5002,7 +5006,7 @@ void Server::_unlink_local(MDRequestRef& mdr, CDentry *dn, CDentry *straydn)
   inode_t *pi = in->project_inode();
   mdr->add_projected_inode(in); // do this _after_ my dn->pre_dirty().. we apply that one manually.
   pi->version = in->pre_dirty();
-  pi->ctime = mdr->get_op_stamp();
+  pi->ctime = mdr->now;
   pi->nlink--;
   if (pi->nlink == 0)
     in->state_set(CInode::STATE_ORPHAN);
@@ -5034,6 +5038,9 @@ void Server::_unlink_local(MDRequestRef& mdr, CDentry *dn, CDentry *straydn)
     le->metablob.renamed_dirino = in->ino();
   }
 
+  if (mdr->more()->dst_reanchor_atid)
+    le->metablob.add_table_transaction(TABLE_ANCHOR, mdr->more()->dst_reanchor_atid);
+
   dn->push_projected_linkage();
 
   if (in->is_dir()) {
@@ -5081,8 +5088,12 @@ void Server::_unlink_local_finish(MDRequestRef& mdr,
   if (straydn && straydnl->get_inode()->is_dir()) 
     mdcache->adjust_subtree_after_rename(straydnl->get_inode(), dn->get_dir(), true);
 
+  // commit anchor update?
+  if (mdr->more()->dst_reanchor_atid) 
+    mds->anchorclient->commit(mdr->more()->dst_reanchor_atid, mdr->ls);
+
   // bump pop
-  mds->balancer->hit_dir(mdr->get_mds_stamp(), dn->get_dir(), META_POP_IWR);
+  mds->balancer->hit_dir(mdr->now, dn->get_dir(), META_POP_IWR);
 
   // reply
   MClientReply *reply = new MClientReply(mdr->client_request, 0);
@@ -5110,7 +5121,7 @@ bool Server::_rmdir_prepare_witness(MDRequestRef& mdr, int who, CDentry *dn, CDe
 					       MMDSSlaveRequest::OP_RMDIRPREP);
   dn->make_path(req->srcdnpath);
   straydn->make_path(req->destdnpath);
-  req->op_stamp = mdr->get_op_stamp();
+  req->now = mdr->now;
   
   mdcache->replicate_stray(straydn, who, req->stray);
   
@@ -5121,20 +5132,22 @@ bool Server::_rmdir_prepare_witness(MDRequestRef& mdr, int who, CDentry *dn, CDe
   return true;
 }
 
-struct C_MDS_SlaveRmdirPrep : public ServerContext {
+struct C_MDS_SlaveRmdirPrep : public Context {
+  Server *server;
   MDRequestRef mdr;
   CDentry *dn, *straydn;
   C_MDS_SlaveRmdirPrep(Server *s, MDRequestRef& r, CDentry *d, CDentry *st)
-    : ServerContext(s), mdr(r), dn(d), straydn(st) {}
+    : server(s), mdr(r), dn(d), straydn(st) {}
   void finish(int r) {
     server->_logged_slave_rmdir(mdr, dn, straydn);
   }
 };
 
-struct C_MDS_SlaveRmdirCommit : public ServerContext {
+struct C_MDS_SlaveRmdirCommit : public Context {
+  Server *server;
   MDRequestRef mdr;
   C_MDS_SlaveRmdirCommit(Server *s, MDRequestRef& r)
-    : ServerContext(s), mdr(r) { }
+    : server(s), mdr(r) { }
   void finish(int r) {
     server->_commit_slave_rmdir(mdr, r);
   }
@@ -5161,7 +5174,7 @@ void Server::handle_slave_rmdir_prep(MDRequestRef& mdr)
   CDentry *straydn = mdr->straydn;
   dout(10) << " straydn " << *straydn << dendl;
   
-  mdr->set_op_stamp(mdr->slave_request->op_stamp);
+  mdr->now = mdr->slave_request->now;
 
   rmdir_rollback rollback;
   rollback.reqid = mdr->reqid;
@@ -5172,36 +5185,6 @@ void Server::handle_slave_rmdir_prep(MDRequestRef& mdr)
   ::encode(rollback, mdr->more()->rollback_bl);
   dout(20) << " rollback is " << mdr->more()->rollback_bl.length() << " bytes" << dendl;
 
-  // set up commit waiter
-  mdr->more()->slave_commit = new C_MDS_SlaveRmdirCommit(this, mdr);
-
-  if (!in->has_subtree_root_dirfrag(mds->get_nodeid())) {
-    dout(10) << " no auth subtree in " << *in << ", skipping journal" << dendl;
-    dn->get_dir()->unlink_inode(dn);
-    straydn->get_dir()->link_primary_inode(straydn, in);
-
-    assert(straydn->first >= in->first);
-    in->first = straydn->first;
-
-    mdcache->adjust_subtree_after_rename(in, dn->get_dir(), false);
-
-    MMDSSlaveRequest *reply = new MMDSSlaveRequest(mdr->reqid, mdr->attempt,
-						   MMDSSlaveRequest::OP_RMDIRPREPACK);
-    reply->mark_not_journaled();
-    mds->send_message_mds(reply, mdr->slave_to_mds);
-
-    // send caps to auth (if we're not already)
-    if (in->is_any_caps() && !in->state_test(CInode::STATE_EXPORTINGCAPS))
-      mdcache->migrator->export_caps(in);
-
-    mdcache->touch_dentry_bottom(straydn); // move stray to end of lru
-
-    mdr->slave_request->put();
-    mdr->slave_request = 0;
-    mdr->straydn = 0;
-    return;
-  }
-
   straydn->push_projected_linkage(in);
   dn->push_projected_linkage();
 
@@ -5219,9 +5202,10 @@ void Server::handle_slave_rmdir_prep(MDRequestRef& mdr)
 
   mds->mdcache->project_subtree_rename(in, dn->get_dir(), straydn->get_dir());
 
-  mdr->more()->slave_update_journaled = true;
-  submit_mdlog_entry(le, new C_MDS_SlaveRmdirPrep(this, mdr, dn, straydn),
-                     mdr, __func__);
+  // set up commit waiter
+  mdr->more()->slave_commit = new C_MDS_SlaveRmdirCommit(this, mdr);
+
+  mdlog->submit_entry(le, new C_MDS_SlaveRmdirPrep(this, mdr, dn, straydn));
   mdlog->flush();
 }
 
@@ -5261,8 +5245,6 @@ void Server::handle_slave_rmdir_prep_ack(MDRequestRef& mdr, MMDSSlaveRequest *ac
 
   mdr->more()->slaves.insert(from);
   mdr->more()->witnessed.insert(from);
-  if (!ack->is_not_journaled())
-    mdr->more()->has_journaled_slaves = true;
 
   // remove from waiting list
   assert(mdr->more()->waiting_on_slave.count(from));
@@ -5279,32 +5261,28 @@ void Server::_commit_slave_rmdir(MDRequestRef& mdr, int r)
   dout(10) << "_commit_slave_rmdir " << *mdr << " r=" << r << dendl;
   
   if (r == 0) {
+    // write a commit to the journal
+    ESlaveUpdate *le = new ESlaveUpdate(mdlog, "slave_rmdir_commit", mdr->reqid, mdr->slave_to_mds,
+					ESlaveUpdate::OP_COMMIT, ESlaveUpdate::RMDIR);
+    mdlog->start_entry(le);
     mdr->cleanup();
 
-    if (mdr->more()->slave_update_journaled) {
-      // write a commit to the journal
-      ESlaveUpdate *le = new ESlaveUpdate(mdlog, "slave_rmdir_commit", mdr->reqid,
-					  mdr->slave_to_mds, ESlaveUpdate::OP_COMMIT,
-					  ESlaveUpdate::RMDIR);
-      mdlog->start_entry(le);
-      submit_mdlog_entry(le, new C_MDS_CommittedSlave(this, mdr), mdr, __func__);
-      mdlog->flush();
-    } else {
-      _committed_slave(mdr);
-    }
+    mdlog->submit_entry(le, new C_MDS_CommittedSlave(this, mdr));
+    mdlog->flush();
   } else {
     // abort
     do_rmdir_rollback(mdr->more()->rollback_bl, mdr->slave_to_mds, mdr);
   }
 }
 
-struct C_MDS_LoggedRmdirRollback : public ServerContext {
+struct C_MDS_LoggedRmdirRollback : public Context {
+  Server *server;
   MDRequestRef mdr;
   metareqid_t reqid;
   CDentry *dn;
   CDentry *straydn;
   C_MDS_LoggedRmdirRollback(Server *s, MDRequestRef& m, metareqid_t mr, CDentry *d, CDentry *st)
-    : ServerContext(s), mdr(m), reqid(mr), dn(d), straydn(st) {}
+    : server(s), mdr(m), reqid(mr), dn(d), straydn(st) {}
   void finish(int r) {
     server->_rmdir_rollback_finish(mdr, reqid, dn, straydn);
   }
@@ -5339,19 +5317,6 @@ void Server::do_rmdir_rollback(bufferlist &rbl, int master, MDRequestRef& mdr)
   dout(10) << " straydn " << *dn << dendl;
   CInode *in = straydn->get_linkage()->get_inode();
 
-  if (mdr && !mdr->more()->slave_update_journaled) {
-    assert(!in->has_subtree_root_dirfrag(mds->get_nodeid()));
-
-    straydn->get_dir()->unlink_inode(straydn);
-    dn->get_dir()->link_primary_inode(dn, in);
-
-    mdcache->adjust_subtree_after_rename(in, straydn->get_dir(), false);
-
-    mds->mdcache->request_finish(mdr);
-    mds->mdcache->finish_rollback(rollback.reqid);
-    return;
-  }
-
   dn->push_projected_linkage(in);
   straydn->push_projected_linkage();
 
@@ -5368,10 +5333,7 @@ void Server::do_rmdir_rollback(bufferlist &rbl, int master, MDRequestRef& mdr)
 
   mdcache->project_subtree_rename(in, straydn->get_dir(), dn->get_dir());
 
-  submit_mdlog_entry(le,
-                     new C_MDS_LoggedRmdirRollback(this, mdr,rollback.reqid,
-                                                   dn, straydn),
-                     mdr, __func__);
+  mdlog->submit_entry(le, new C_MDS_LoggedRmdirRollback(this, mdr, rollback.reqid, dn, straydn));
   mdlog->flush();
 }
 
@@ -5462,7 +5424,8 @@ bool Server::_dir_is_nonempty(MDRequestRef& mdr, CInode *in)
 // ======================================================
 
 
-class C_MDS_rename_finish : public MDSInternalContext {
+class C_MDS_rename_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CDentry *srcdn;
   CDentry *destdn;
@@ -5470,7 +5433,7 @@ class C_MDS_rename_finish : public MDSInternalContext {
 public:
   C_MDS_rename_finish(MDS *m, MDRequestRef& r,
 		      CDentry *sdn, CDentry *ddn, CDentry *stdn) :
-    MDSInternalContext(m), mdr(r),
+    mds(m), mdr(r),
     srcdn(sdn), destdn(ddn), straydn(stdn) { }
   void finish(int r) {
     assert(r == 0);
@@ -5528,7 +5491,8 @@ void Server::handle_client_rename(MDRequestRef& mdr)
   if (r < 0) {
     if (r == -ESTALE) {
       dout(10) << "FAIL on ESTALE but attempting recovery" << dendl;
-      mdcache->find_ino_peers(srcpath.get_ino(), new C_MDS_TryFindInode(this, mdr));
+      Context *c = new C_MDS_TryFindInode(this, mdr);
+      mdcache->find_ino_peers(srcpath.get_ino(), c);
     } else {
       dout(10) << "FAIL on error " << r << dendl;
       reply_request(mdr, r);
@@ -5682,13 +5646,9 @@ void Server::handle_client_rename(MDRequestRef& mdr)
     srcdn->list_replicas(witnesses);
   else
     witnesses.insert(srcdn->authority().first);
-  if (srcdnl->is_remote() && !srci->is_auth())
-    witnesses.insert(srci->authority().first);
-  if (!destdnl->is_null()) {
-    destdn->list_replicas(witnesses);
-    if (destdnl->is_remote() && !oldin->is_auth())
-      witnesses.insert(oldin->authority().first);
-  }
+  destdn->list_replicas(witnesses);
+  if (destdnl->is_remote() && !oldin->is_auth())
+    witnesses.insert(oldin->authority().first);
   dout(10) << " witnesses " << witnesses << ", have " << mdr->more()->witnessed << dendl;
 
 
@@ -5760,6 +5720,9 @@ void Server::handle_client_rename(MDRequestRef& mdr)
   else
     rdlocks.insert(&srci->snaplock);
 
+  // take any locks needed for anchor creation/verification
+  mds->mdcache->anchor_create_prep_locks(mdr, srci, rdlocks, xlocks);
+
   CInode *auth_pin_freeze = !srcdn->is_auth() && srcdnl->is_primary() ? srci : NULL;
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks,
 				  &remote_wrlocks, auth_pin_freeze))
@@ -5810,6 +5773,49 @@ void Server::handle_client_rename(MDRequestRef& mdr)
     }
   }
 
+  // -- declare now --
+  if (mdr->now == utime_t())
+    mdr->now = ceph_clock_now(g_ceph_context);
+
+  // -- prepare anchor updates --
+  if (!linkmerge || srcdnl->is_primary()) {
+    C_GatherBuilder anchorgather(g_ceph_context);
+
+    if (srcdnl->is_primary() &&
+      (srcdnl->get_inode()->is_anchored() ||
+       (srcdnl->get_inode()->is_dir() && (srcdnl->get_inode()->inode.rstat.ranchors ||
+                                          srcdnl->get_inode()->nested_anchors ||
+                                          !mdcache->is_leaf_subtree(mdcache->get_projected_subtree_root(srcdn->get_dir()))))) &&
+      !mdr->more()->src_reanchor_atid) {
+      dout(10) << "reanchoring src->dst " << *srcdnl->get_inode() << dendl;
+      vector<Anchor> trace;
+      destdn->make_anchor_trace(trace, srcdnl->get_inode());
+      mds->anchorclient->prepare_update(srcdnl->get_inode()->ino(),
+					trace, &mdr->more()->src_reanchor_atid,
+					anchorgather.new_sub());
+    }
+    if (destdnl->is_primary() &&
+	destdnl->get_inode()->is_anchored() &&
+	!mdr->more()->dst_reanchor_atid) {
+      dout(10) << "reanchoring dst->stray " << *destdnl->get_inode() << dendl;
+
+      assert(straydn);
+      vector<Anchor> trace;
+      straydn->make_anchor_trace(trace, destdnl->get_inode());
+
+      mds->anchorclient->prepare_update(destdnl->get_inode()->ino(), trace,
+		  &mdr->more()->dst_reanchor_atid, anchorgather.new_sub());
+    }
+
+    if (anchorgather.has_subs())  {
+      anchorgather.set_finisher(new C_MDS_RetryRequest(mdcache, mdr));
+      anchorgather.activate();
+      return;  // waiting for anchor prepares
+    }
+
+    assert(g_conf->mds_kill_rename_at != 2);
+  }
+
   // -- prepare witnesses --
 
   // do srcdn auth last
@@ -5856,9 +5862,6 @@ void Server::handle_client_rename(MDRequestRef& mdr)
   if (!mdr->more()->slaves.empty() && srci->is_dir())
     assert(g_conf->mds_kill_rename_at != 4);
 
-  // -- declare now --
-  mdr->set_mds_stamp(ceph_clock_now(g_ceph_context));
-
   // -- prepare journal entry --
   mdr->ls = mdlog->get_current_segment();
   EUpdate *le = new EUpdate(mdlog, "rename");
@@ -5896,8 +5899,6 @@ void Server::_rename_finish(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn,
   // apply
   _rename_apply(mdr, srcdn, destdn, straydn);
 
-  mds->mdcache->send_dentry_link(destdn, mdr);
-
   CDentry::linkage_t *destdnl = destdn->get_linkage();
   CInode *in = destdnl->get_inode();
   bool need_eval = mdr->more()->cap_imports.count(in);
@@ -5908,10 +5909,16 @@ void Server::_rename_finish(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn,
   if (!mdr->more()->slaves.empty() && in->is_dir())
     assert(g_conf->mds_kill_rename_at != 6);
   
+  // commit anchor updates?
+  if (mdr->more()->src_reanchor_atid) 
+    mds->anchorclient->commit(mdr->more()->src_reanchor_atid, mdr->ls);
+  if (mdr->more()->dst_reanchor_atid) 
+    mds->anchorclient->commit(mdr->more()->dst_reanchor_atid, mdr->ls);
+
   // bump popularity
-  mds->balancer->hit_dir(mdr->get_mds_stamp(), srcdn->get_dir(), META_POP_IWR);
+  mds->balancer->hit_dir(mdr->now, srcdn->get_dir(), META_POP_IWR);
   if (destdnl->is_remote() && in->is_auth())
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), in, META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, in, META_POP_IWR);
 
   // did we import srci?  if so, explicitly ack that import that, before we unlock and reply.
 
@@ -5948,7 +5955,7 @@ bool Server::_rename_prepare_witness(MDRequestRef& mdr, int who, set<int> &witne
 					       MMDSSlaveRequest::OP_RENAMEPREP);
   srcdn->make_path(req->srcdnpath);
   destdn->make_path(req->destdnpath);
-  req->op_stamp = mdr->get_op_stamp();
+  req->now = mdr->now;
   
   if (straydn)
     mdcache->replicate_stray(straydn, who, req->stray);
@@ -6162,12 +6169,12 @@ void Server::_rename_prepare(MDRequestRef& mdr,
 
   if (!silent) {
     if (pi) {
-      pi->ctime = mdr->get_op_stamp();
+      pi->ctime = mdr->now;
       if (linkmerge)
 	pi->nlink--;
     }
     if (tpi) {
-      tpi->ctime = mdr->get_op_stamp();
+      tpi->ctime = mdr->now;
       tpi->nlink--;
       if (tpi->nlink == 0)
 	oldin->state_set(CInode::STATE_ORPHAN);
@@ -6305,6 +6312,12 @@ void Server::_rename_prepare(MDRequestRef& mdr,
   if (srcdnl->is_primary() && destdn->is_auth())
     srci->first = destdn->first;  
 
+  // anchor updates?
+  if (mdr->more()->src_reanchor_atid)
+    metablob->add_table_transaction(TABLE_ANCHOR, mdr->more()->src_reanchor_atid);
+  if (mdr->more()->dst_reanchor_atid)
+    metablob->add_table_transaction(TABLE_ANCHOR, mdr->more()->dst_reanchor_atid);
+
   if (oldin && oldin->is_dir())
     mdcache->project_subtree_rename(oldin, destdn->get_dir(), straydn->get_dir());
   if (srci->is_dir())
@@ -6337,9 +6350,6 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C
       destdn->get_dir()->unlink_inode(destdn);
 
       straydn->pop_projected_linkage();
-      if (mdr->is_slave() && !mdr->more()->slave_update_journaled)
-	assert(!straydn->is_projected()); // no other projected
-
       mdcache->touch_dentry_bottom(straydn);  // drop dn as quickly as possible.
 
       // nlink-- targeti
@@ -6371,8 +6381,6 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C
     if (!linkmerge) {
       // destdn
       destdnl = destdn->pop_projected_linkage();
-      if (mdr->is_slave() && !mdr->more()->slave_update_journaled)
-	assert(!destdn->is_projected()); // no other projected
 
       destdn->link_remote(destdnl, in);
       if (destdn->is_auth())
@@ -6390,8 +6398,6 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C
       destdn->get_dir()->unlink_inode(destdn);
     }
     destdnl = destdn->pop_projected_linkage();
-    if (mdr->is_slave() && !mdr->more()->slave_update_journaled)
-      assert(!destdn->is_projected()); // no other projected
 
     // srcdn inode import?
     if (!srcdn->is_auth() && destdn->is_auth()) {
@@ -6440,8 +6446,6 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C
   if (srcdn->is_auth())
     srcdn->mark_dirty(mdr->more()->pvmap[srcdn], mdr->ls);
   srcdn->pop_projected_linkage();
-  if (mdr->is_slave() && !mdr->more()->slave_update_journaled)
-    assert(!srcdn->is_projected()); // no other projected
   
   // apply remaining projected inodes (nested)
   mdr->apply();
@@ -6460,36 +6464,41 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C
 
 
 
+
+
 // ------------
 // SLAVE
 
-class C_MDS_SlaveRenamePrep : public ServerContext {
+class C_MDS_SlaveRenamePrep : public Context {
+  Server *server;
   MDRequestRef mdr;
   CDentry *srcdn, *destdn, *straydn;
 public:
   C_MDS_SlaveRenamePrep(Server *s, MDRequestRef& m, CDentry *sr, CDentry *de, CDentry *st) :
-    ServerContext(s), mdr(m), srcdn(sr), destdn(de), straydn(st) {}
+    server(s), mdr(m), srcdn(sr), destdn(de), straydn(st) {}
   void finish(int r) {
     server->_logged_slave_rename(mdr, srcdn, destdn, straydn);
   }
 };
 
-class C_MDS_SlaveRenameCommit : public ServerContext {
+class C_MDS_SlaveRenameCommit : public Context {
+  Server *server;
   MDRequestRef mdr;
   CDentry *srcdn, *destdn, *straydn;
 public:
   C_MDS_SlaveRenameCommit(Server *s, MDRequestRef& m, CDentry *sr, CDentry *de, CDentry *st) :
-    ServerContext(s), mdr(m), srcdn(sr), destdn(de), straydn(st) {}
+    server(s), mdr(m), srcdn(sr), destdn(de), straydn(st) {}
   void finish(int r) {
     server->_commit_slave_rename(mdr, r, srcdn, destdn, straydn);
   }
 };
 
-class C_MDS_SlaveRenameSessionsFlushed : public ServerContext {
+class C_MDS_SlaveRenameSessionsFlushed : public Context {
+  Server *server;
   MDRequestRef mdr;
 public:
   C_MDS_SlaveRenameSessionsFlushed(Server *s, MDRequestRef& r) :
-    ServerContext(s), mdr(r) {}
+    server(s), mdr(r) {}
   void finish(int r) {
     server->_slave_rename_sessions_flushed(mdr);
   }
@@ -6537,7 +6546,7 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr)
   if (destdnl->is_primary() && !linkmerge)
     assert(straydn);
 
-  mdr->set_op_stamp(mdr->slave_request->op_stamp);
+  mdr->now = mdr->slave_request->now;
   mdr->more()->srcdn_auth_mds = srcdn->authority().first;
 
   // set up commit waiter (early, to clean up any freezing etc we do)
@@ -6600,7 +6609,7 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr)
       set<client_t> export_client_set;
       mdcache->migrator->get_export_client_set(srcdnl->get_inode(), export_client_set);
 
-      MDSGatherBuilder gather(g_ceph_context);
+      C_GatherBuilder gather(g_ceph_context);
       flush_client_sessions(export_client_set, gather);
       if (gather.has_subs()) {
 	mdr->more()->waiting_on_slave.insert(-1);
@@ -6685,18 +6694,9 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr)
   
   bufferlist blah;  // inode import data... obviously not used if we're the slave
   _rename_prepare(mdr, &le->commit, &blah, srcdn, destdn, straydn);
-
-  if (le->commit.empty()) {
-    dout(10) << " empty metablob, skipping journal" << dendl;
-    mdlog->cancel_entry(le);
-    mdr->ls = NULL;
-    _logged_slave_rename(mdr, srcdn, destdn, straydn);
-  } else {
-    mdr->more()->slave_update_journaled = true;
-    submit_mdlog_entry(le, new C_MDS_SlaveRenamePrep(this, mdr, srcdn, destdn, straydn),
-		       mdr, __func__);
-    mdlog->flush();
-  }
+  
+  mdlog->submit_entry(le, new C_MDS_SlaveRenamePrep(this, mdr, srcdn, destdn, straydn));
+  mdlog->flush();
 }
 
 void Server::_logged_slave_rename(MDRequestRef& mdr,
@@ -6706,14 +6706,11 @@ void Server::_logged_slave_rename(MDRequestRef& mdr,
 
   // prepare ack
   MMDSSlaveRequest *reply = NULL;
-  if (!mdr->aborted) {
+  if (!mdr->aborted)
     reply= new MMDSSlaveRequest(mdr->reqid, mdr->attempt, MMDSSlaveRequest::OP_RENAMEPREPACK);
-    if (!mdr->more()->slave_update_journaled)
-      reply->mark_not_journaled();
-  }
 
   CDentry::linkage_t *srcdnl = srcdn->get_linkage();
-  CDentry::linkage_t *destdnl = NULL; 
+  CDentry::linkage_t *destdnl = destdn->get_linkage();
   //CDentry::linkage_t *straydnl = straydn ? straydn->get_linkage() : 0;
 
   // export srci?
@@ -6756,10 +6753,9 @@ void Server::_logged_slave_rename(MDRequestRef& mdr,
   destdnl = destdn->get_linkage();
 
   // bump popularity
-  mds->balancer->hit_dir(mdr->get_mds_stamp(), srcdn->get_dir(), META_POP_IWR);
+  mds->balancer->hit_dir(mdr->now, srcdn->get_dir(), META_POP_IWR);
   if (destdnl->get_inode() && destdnl->get_inode()->is_auth())
-    mds->balancer->hit_inode(mdr->get_mds_stamp(), destdnl->get_inode(),
-			     META_POP_IWR);
+    mds->balancer->hit_inode(mdr->now, destdnl->get_inode(), META_POP_IWR);
 
   // done.
   mdr->slave_request->put();
@@ -6782,8 +6778,14 @@ void Server::_commit_slave_rename(MDRequestRef& mdr, int r,
 
   CDentry::linkage_t *destdnl = destdn->get_linkage();
 
-  list<MDSInternalContextBase*> finished;
+  list<Context*> finished;
   if (r == 0) {
+    // write a commit to the journal
+    ESlaveUpdate *le = new ESlaveUpdate(mdlog, "slave_rename_commit", mdr->reqid, 
+					mdr->slave_to_mds, ESlaveUpdate::OP_COMMIT, 
+					ESlaveUpdate::RENAME);
+    mdlog->start_entry(le);
+
     // unfreeze+singleauth inode
     //  hmm, do i really need to delay this?
     if (mdr->more()->is_inode_exporter) {
@@ -6807,8 +6809,7 @@ void Server::_commit_slave_rename(MDRequestRef& mdr, int r,
       ::decode(peer_imported, bp);
 
       dout(10) << " finishing inode export on " << *destdnl->get_inode() << dendl;
-      mdcache->migrator->finish_export_inode(destdnl->get_inode(),
-					     mdr->get_mds_stamp(),
+      mdcache->migrator->finish_export_inode(destdnl->get_inode(), mdr->now,
 					     mdr->slave_to_mds, peer_imported, finished);
       mds->queue_waiters(finished);   // this includes SINGLEAUTH waiters.
 
@@ -6823,21 +6824,11 @@ void Server::_commit_slave_rename(MDRequestRef& mdr, int r,
       mdr->more()->is_ambiguous_auth = false;
     }
 
-
     mds->queue_waiters(finished);
     mdr->cleanup();
 
-    if (mdr->more()->slave_update_journaled) {
-      // write a commit to the journal
-      ESlaveUpdate *le = new ESlaveUpdate(mdlog, "slave_rename_commit", mdr->reqid,
-					  mdr->slave_to_mds, ESlaveUpdate::OP_COMMIT,
-					  ESlaveUpdate::RENAME);
-      mdlog->start_entry(le);
-      submit_mdlog_entry(le, new C_MDS_CommittedSlave(this, mdr), mdr, __func__);
-      mdlog->flush();
-    } else {
-      _committed_slave(mdr);
-    }
+    mdlog->submit_entry(le, new C_MDS_CommittedSlave(this, mdr));
+    mdlog->flush();
   } else {
 
     // abort
@@ -6881,13 +6872,16 @@ void _rollback_repair_dir(MutationRef& mut, CDir *dir, rename_rollback::drec &r,
 
   if (isdir) {
     pf->fragstat.nsubdirs += linkunlink;
+    pf->rstat.rsubdirs += linkunlink;
   } else {
     pf->fragstat.nfiles += linkunlink;
+    pf->rstat.rfiles += linkunlink;
   }    
   if (r.ino) {
     pf->rstat.rbytes += linkunlink * rstat.rbytes;
     pf->rstat.rfiles += linkunlink * rstat.rfiles;
     pf->rstat.rsubdirs += linkunlink * rstat.rsubdirs;
+    pf->rstat.ranchors += linkunlink * rstat.ranchors;
     pf->rstat.rsnaprealms += linkunlink * rstat.rsnaprealms;
   }
   if (pf->fragstat.mtime == ctime) {
@@ -6899,7 +6893,8 @@ void _rollback_repair_dir(MutationRef& mut, CDir *dir, rename_rollback::drec &r,
   mut->add_updated_lock(&dir->get_inode()->nestlock);
 }
 
-struct C_MDS_LoggedRenameRollback : public ServerContext {
+struct C_MDS_LoggedRenameRollback : public Context {
+  Server *server;
   MutationRef mut;
   MDRequestRef mdr;
   CDentry *srcdn;
@@ -6909,8 +6904,8 @@ struct C_MDS_LoggedRenameRollback : public ServerContext {
   bool finish_mdr;
   C_MDS_LoggedRenameRollback(Server *s, MutationRef& m, MDRequestRef& r,
 			     CDentry *sd, version_t pv, CDentry *dd,
-			     CDentry *st, bool f) :
-    ServerContext(s), mut(m), mdr(r), srcdn(sd), srcdnpv(pv), destdn(dd),
+			    CDentry *st, bool f) :
+    server(s), mut(m), mdr(r), srcdn(sd), srcdnpv(pv), destdn(dd),
     straydn(st), finish_mdr(f) {}
   void finish(int r) {
     server->_rename_rollback_finish(mut, mdr, srcdn, srcdnpv,
@@ -7097,12 +7092,6 @@ void Server::do_rename_rollback(bufferlist &rbl, int master, MDRequestRef& mdr,
       le->commit.add_remote_dentry(srcdn, true);
   }
 
-  if (!rollback.orig_src.ino && // remote linkage
-      in && in->authority().first == whoami) {
-    le->commit.add_dir_context(in->get_projected_parent_dir());
-    le->commit.add_primary_dentry(in->get_projected_parent_dn(), in, true);
-  }
-
   if (force_journal_dest) {
     assert(rollback.orig_dest.ino);
     le->commit.add_dir_context(destdir);
@@ -7111,7 +7100,7 @@ void Server::do_rename_rollback(bufferlist &rbl, int master, MDRequestRef& mdr,
 
   // slave: no need to journal straydn
 
-  if (target && target != in && target->authority().first == whoami) {
+  if (target && target->authority().first == whoami) {
     assert(rollback.orig_dest.remote_ino);
     le->commit.add_dir_context(target->get_projected_parent_dir());
     le->commit.add_primary_dentry(target->get_projected_parent_dn(), target, true);
@@ -7135,20 +7124,9 @@ void Server::do_rename_rollback(bufferlist &rbl, int master, MDRequestRef& mdr,
     mdcache->project_subtree_rename(in, destdir, srcdir);
   }
 
-  if (mdr && !mdr->more()->slave_update_journaled) {
-    assert(le->commit.empty());
-    mdlog->cancel_entry(le);
-    mut->ls = NULL;
-    _rename_rollback_finish(mut, mdr, srcdn, srcdnpv, destdn, straydn, finish_mdr);
-  } else {
-    assert(!le->commit.empty());
-    if (mdr)
-      mdr->more()->slave_update_journaled = false;
-    MDSInternalContextBase *fin = new C_MDS_LoggedRenameRollback(this, mut, mdr, srcdn, srcdnpv,
-						  destdn, straydn, finish_mdr);
-    submit_mdlog_entry(le, fin, mdr, __func__);
-    mdlog->flush();
-  }
+  mdlog->submit_entry(le, new C_MDS_LoggedRenameRollback(this, mut, mdr, srcdn, srcdnpv,
+							 destdn, straydn, finish_mdr));
+  mdlog->flush();
 }
 
 void Server::_rename_rollback_finish(MutationRef& mut, MDRequestRef& mdr, CDentry *srcdn,
@@ -7173,10 +7151,8 @@ void Server::_rename_rollback_finish(MutationRef& mut, MDRequestRef& mdr, CDentr
 
   mut->apply();
 
-  if (srcdn && srcdn->get_linkage()->is_primary()) {
+  if (srcdn) {
     CInode *in = srcdn->get_linkage()->get_inode();
-    if (srcdn->authority().first == mds->get_nodeid())
-      in->state_set(CInode::STATE_AUTH);
     // update subtree map?
     if (in && in->is_dir()) {
       assert(destdn);
@@ -7204,7 +7180,7 @@ void Server::_rename_rollback_finish(MutationRef& mut, MDRequestRef& mdr, CDentr
   }
 
   if (mdr) {
-    list<MDSInternalContextBase*> finished;
+    list<Context*> finished;
     if (mdr->more()->is_ambiguous_auth) {
       if (srcdn->is_auth())
 	mdr->more()->rename_inode->unfreeze_inode(finished);
@@ -7237,8 +7213,6 @@ void Server::handle_slave_rename_prep_ack(MDRequestRef& mdr, MMDSSlaveRequest *a
   assert(mdr->more()->witnessed.count(from) == 0);
   if (ack->witnesses.empty()) {
     mdr->more()->witnessed.insert(from);
-    if (!ack->is_not_journaled())
-      mdr->more()->has_journaled_slaves = true;
   } else {
     dout(10) << " extra witnesses (srcdn replicas) are " << ack->witnesses << dendl;
     mdr->more()->extra_witnesses.swap(ack->witnesses);
@@ -7362,12 +7336,13 @@ void Server::handle_client_lssnap(MDRequestRef& mdr)
 
 // MKSNAP
 
-struct C_MDS_mksnap_finish : public MDSInternalContext {
+struct C_MDS_mksnap_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CInode *diri;
   SnapInfo info;
   C_MDS_mksnap_finish(MDS *m, MDRequestRef& r, CInode *di, SnapInfo &i) :
-    MDSInternalContext(m), mdr(r), diri(di), info(i) {}
+    mds(m), mdr(r), diri(di), info(i) {}
   void finish(int r) {
     mds->server->_mksnap_finish(mdr, diri, info);
   }
@@ -7404,15 +7379,8 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
     reply_request(mdr, -EPERM);
     return;
   }
-  
-  const string &snapname = req->get_filepath().last_dentry();
 
-  if (mdr->client_request->get_caller_uid() < g_conf->mds_snap_min_uid || mdr->client_request->get_caller_uid() > g_conf->mds_snap_max_uid) {
-    dout(20) << "mksnap " << snapname << " on " << *diri << " denied to uid " << mdr->client_request->get_caller_uid() << dendl;
-    reply_request(mdr, -EPERM);
-    return;
-  }
-  
+  const string &snapname = req->get_filepath().last_dentry();
   dout(10) << "mksnap " << snapname << " on " << *diri << dendl;
 
   // lock snap
@@ -7422,6 +7390,9 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
   rdlocks.erase(&diri->snaplock);
   xlocks.insert(&diri->snaplock);
 
+  // we need to anchor... get these locks up front!
+  mds->mdcache->anchor_create_prep_locks(mdr, diri, rdlocks, xlocks);
+
   if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
     return;
 
@@ -7437,11 +7408,19 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
     return;
   }
 
+  if (mdr->now == utime_t())
+    mdr->now = ceph_clock_now(g_ceph_context);
+
+  // anchor
+  if (!diri->is_anchored()) {
+    mdcache->anchor_create(mdr, diri, new C_MDS_RetryRequest(mdcache, mdr));
+    return;
+  }
+
   // allocate a snapid
   if (!mdr->more()->stid) {
     // prepare an stid
-    mds->snapclient->prepare_create(diri->ino(), snapname,
-				    mdr->get_mds_stamp(),
+    mds->snapclient->prepare_create(diri->ino(), snapname, mdr->now, 
 				    &mdr->more()->stid, &mdr->more()->snapidbl,
 				    new C_MDS_RetryRequest(mds->mdcache, mdr));
     return;
@@ -7458,7 +7437,7 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
   info.ino = diri->ino();
   info.snapid = snapid;
   info.name = snapname;
-  info.stamp = mdr->get_op_stamp();
+  info.stamp = mdr->now;
 
   inode_t *pi = diri->project_inode();
   pi->ctime = info.stamp;
@@ -7481,8 +7460,7 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, diri);
 
   // journal the snaprealm changes
-  submit_mdlog_entry(le, new C_MDS_mksnap_finish(mds, mdr, diri, info),
-                     mdr, __func__);
+  mdlog->submit_entry(le, new C_MDS_mksnap_finish(mds, mdr, diri, info));
   mdlog->flush();
 }
 
@@ -7513,12 +7491,13 @@ void Server::_mksnap_finish(MDRequestRef& mdr, CInode *diri, SnapInfo &info)
 
 // RMSNAP
 
-struct C_MDS_rmsnap_finish : public MDSInternalContext {
+struct C_MDS_rmsnap_finish : public Context {
+  MDS *mds;
   MDRequestRef mdr;
   CInode *diri;
   snapid_t snapid;
   C_MDS_rmsnap_finish(MDS *m, MDRequestRef& r, CInode *di, snapid_t sn) :
-    MDSInternalContext(m), mdr(r), diri(di), snapid(sn) {}
+    mds(m), mdr(r), diri(di), snapid(sn) {}
   void finish(int r) {
     mds->server->_rmsnap_finish(mdr, diri, snapid);
   }
@@ -7544,13 +7523,6 @@ void Server::handle_client_rmsnap(MDRequestRef& mdr)
   }
 
   const string &snapname = req->get_filepath().last_dentry();
-
-  if (mdr->client_request->get_caller_uid() < g_conf->mds_snap_min_uid || mdr->client_request->get_caller_uid() > g_conf->mds_snap_max_uid) {
-    dout(20) << "rmsnap " << snapname << " on " << *diri << " denied to uid " << mdr->client_request->get_caller_uid() << dendl;
-    reply_request(mdr, -EPERM);
-    return;
-  }
-
   dout(10) << "rmsnap " << snapname << " on " << *diri << dendl;
 
   // does snap exist?
@@ -7588,8 +7560,8 @@ void Server::handle_client_rmsnap(MDRequestRef& mdr)
 
   // journal
   inode_t *pi = diri->project_inode();
+  pi->ctime = ceph_clock_now(g_ceph_context);
   pi->version = diri->pre_dirty();
-  pi->ctime = mdr->get_op_stamp();
   
   mdr->ls = mdlog->get_current_segment();
   EUpdate *le = new EUpdate(mdlog, "rmsnap");
@@ -7606,8 +7578,7 @@ void Server::handle_client_rmsnap(MDRequestRef& mdr)
   mdcache->predirty_journal_parents(mdr, &le->metablob, diri, 0, PREDIRTY_PRIMARY, false);
   mdcache->journal_dirty_inode(mdr.get(), &le->metablob, diri);
 
-  submit_mdlog_entry(le, new C_MDS_rmsnap_finish(mds, mdr, diri, snapid),
-                     mdr, __func__);
+  mdlog->submit_entry(le, new C_MDS_rmsnap_finish(mds, mdr, diri, snapid));
   mdlog->flush();
 }
 
@@ -7635,12 +7606,3 @@ void Server::_rmsnap_finish(MDRequestRef& mdr, CInode *diri, snapid_t snapid)
 }
 
 
-/**
- * Return true if server is in state RECONNECT and this
- * client has not yet reconnected.
- */
-bool Server::waiting_for_reconnect(client_t c) const
-{
-  return client_reconnect_gather.count(c) > 0;
-}
-
diff --git a/src/mds/Server.h b/src/mds/Server.h
index 11ac54e..95a5ae4 100644
--- a/src/mds/Server.h
+++ b/src/mds/Server.h
@@ -17,7 +17,6 @@
 
 #include "MDS.h"
 
-class OSDMap;
 class PerfCounters;
 class LogEvent;
 class EMetaBlob;
@@ -32,19 +31,16 @@ typedef ceph::shared_ptr<MDRequestImpl> MDRequestRef;
 
 enum {
   l_mdss_first = 1000,
-  l_mdss_handle_client_request,
-  l_mdss_handle_slave_request,
-  l_mdss_handle_client_session,
-  l_mdss_dispatch_client_request,
-  l_mdss_dispatch_slave_request,
+  l_mdss_hcreq,
+  l_mdss_hsreq,
+  l_mdss_hcsess,
+  l_mdss_dcreq,
+  l_mdss_dsreq,
   l_mdss_last,
 };
 
 class Server {
-public:
-  // XXX FIXME: can probably friend enough contexts to make this not need to be public
   MDS *mds;
-private:
   MDCache *mdcache;
   MDLog *mdlog;
   Messenger *messenger;
@@ -77,7 +73,6 @@ public:
   // -- sessions and recovery --
   utime_t  reconnect_start;
   set<client_t> client_reconnect_gather;  // clients i need a reconnect msg from.
-  bool waiting_for_reconnect(client_t c) const;
 
   Session *get_session(Message *m);
   void handle_client_session(class MClientSession *m);
@@ -88,12 +83,12 @@ public:
   void finish_force_open_sessions(map<client_t,entity_inst_t> &cm,
 				  map<client_t,uint64_t>& sseqmap,
 				  bool dec_import=true);
-  void flush_client_sessions(set<client_t>& client_set, MDSGatherBuilder& gather);
+  void flush_client_sessions(set<client_t>& client_set, C_GatherBuilder& gather);
   void finish_flush_session(Session *session, version_t seq);
   void terminate_sessions();
   void find_idle_sessions();
-  void kill_session(Session *session, Context *on_safe);
-  void journal_close_session(Session *session, int state, Context *on_safe);
+  void kill_session(Session *session);
+  void journal_close_session(Session *session, int state);
   void reconnect_clients();
   void handle_client_reconnect(class MClientReconnect *m);
   //void process_reconnect_cap(CInode *in, int from, ceph_mds_cap_reconnect& capinfo);
@@ -107,9 +102,7 @@ public:
   void handle_client_request(MClientRequest *m);
 
   void journal_and_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn,
-			 LogEvent *le, MDSInternalContextBase *fin);
-  void submit_mdlog_entry(LogEvent *le, MDSInternalContextBase *fin,
-                          MDRequestRef& mdr, const char *evt);
+			 LogEvent *le, Context *fin);
   void dispatch_client_request(MDRequestRef& mdr);
   void early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn);
   void reply_request(MDRequestRef& mdr, int r = 0, CInode *tracei = 0, CDentry *tracedn = 0);
@@ -166,8 +159,7 @@ public:
   void handle_client_setlayout(MDRequestRef& mdr);
   void handle_client_setdirlayout(MDRequestRef& mdr);
 
-  int parse_layout_vxattr(string name, string value, const OSDMap *osdmap,
-			  ceph_file_layout *layout);
+  int parse_layout_vxattr(string name, string value, ceph_file_layout *layout);
   void handle_set_vxattr(MDRequestRef& mdr, CInode *cur,
 			 ceph_file_layout *dir_layout,
 			 set<SimpleLock*> rdlocks,
diff --git a/src/mds/SessionMap.cc b/src/mds/SessionMap.cc
index 289e80a..1b27029 100644
--- a/src/mds/SessionMap.cc
+++ b/src/mds/SessionMap.cc
@@ -14,33 +14,18 @@
 
 #include "MDS.h"
 #include "MDCache.h"
-#include "Mutation.h"
 #include "SessionMap.h"
 #include "osdc/Filer.h"
 
 #include "common/config.h"
 #include "common/errno.h"
 #include "include/assert.h"
-#include "include/stringify.h"
 
 #define dout_subsys ceph_subsys_mds
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".sessionmap "
 
 
-class SessionMapIOContext : public MDSIOContextBase
-{
-  protected:
-    SessionMap *sessionmap;
-    MDS *get_mds() {return sessionmap->mds;}
-  public:
-    SessionMapIOContext(SessionMap *sessionmap_) : sessionmap(sessionmap_) {
-      assert(sessionmap != NULL);
-    }
-};
-
-
-
 void SessionMap::dump()
 {
   dout(10) << "dump" << dendl;
@@ -67,27 +52,27 @@ object_t SessionMap::get_object_name()
   return object_t(s);
 }
 
-class C_IO_SM_Load : public SessionMapIOContext {
+class C_SM_Load : public Context {
+  SessionMap *sessionmap;
 public:
   bufferlist bl;
-  C_IO_SM_Load(SessionMap *cm) : SessionMapIOContext(cm) {}
+  C_SM_Load(SessionMap *cm) : sessionmap(cm) {}
   void finish(int r) {
     sessionmap->_load_finish(r, bl);
   }
 };
 
-void SessionMap::load(MDSInternalContextBase *onload)
+void SessionMap::load(Context *onload)
 {
   dout(10) << "load" << dendl;
 
   if (onload)
     waiting_for_load.push_back(onload);
   
-  C_IO_SM_Load *c = new C_IO_SM_Load(this);
+  C_SM_Load *c = new C_SM_Load(this);
   object_t oid = get_object_name();
   object_locator_t oloc(mds->mdsmap->get_metadata_pool());
-  mds->objecter->read_full(oid, oloc, CEPH_NOSNAP, &c->bl, 0,
-			   new C_OnFinisher(c, &mds->finisher));
+  mds->objecter->read_full(oid, oloc, CEPH_NOSNAP, &c->bl, 0, c);
 }
 
 void SessionMap::_load_finish(int r, bufferlist &bl)
@@ -112,17 +97,18 @@ void SessionMap::_load_finish(int r, bufferlist &bl)
 // ----------------
 // SAVE
 
-class C_IO_SM_Save : public SessionMapIOContext {
+class C_SM_Save : public Context {
+  SessionMap *sessionmap;
   version_t version;
 public:
-  C_IO_SM_Save(SessionMap *cm, version_t v) : SessionMapIOContext(cm), version(v) {}
+  C_SM_Save(SessionMap *cm, version_t v) : sessionmap(cm), version(v) {}
   void finish(int r) {
     assert(r == 0);
     sessionmap->_save_finish(version);
   }
 };
 
-void SessionMap::save(MDSInternalContextBase *onsave, version_t needv)
+void SessionMap::save(Context *onsave, version_t needv)
 {
   dout(10) << "save needv " << needv << ", v " << version << dendl;
  
@@ -145,9 +131,7 @@ void SessionMap::save(MDSInternalContextBase *onsave, version_t needv)
   mds->objecter->write_full(oid, oloc,
 			    snapc,
 			    bl, ceph_clock_now(g_ceph_context), 0,
-			    NULL,
-			    new C_OnFinisher(new C_IO_SM_Save(this, version),
-					     &mds->finisher));
+			    NULL, new C_SM_Save(this, version));
 }
 
 void SessionMap::_save_finish(version_t v)
@@ -201,7 +185,7 @@ void SessionMap::decode(bufferlist::iterator& p)
       Session *s = get_or_add_session(inst);
       if (s->is_closed())
 	set_state(s, Session::STATE_OPEN);
-      s->decode(p);
+      s->info.decode(p);
     }
 
     DECODE_FINISH(p);
@@ -244,7 +228,6 @@ void SessionMap::dump(Formatter *f) const
     f->open_object_section("entity name");
     p->first.dump(f);
     f->close_section(); // entity name
-    f->dump_string("state", p->second->get_state_name());
     f->open_object_section("Session info");
     p->second->info.dump(f);
     f->close_section(); // Session info
@@ -284,139 +267,3 @@ void SessionMap::wipe_ino_prealloc()
   }
   projected = ++version;
 }
-
-/**
- * Calculate the length of the `requests` member list,
- * because elist does not have a size() method.
- *
- * O(N) runtime.  This would be const, but elist doesn't
- * have const iterators.
- */
-size_t Session::get_request_count()
-{
-  size_t result = 0;
-
-  elist<MDRequestImpl*>::iterator p = requests.begin(
-      member_offset(MDRequestImpl, item_session_request));
-  while (!p.end()) {
-    ++result;
-    ++p;
-  }
-
-  return result;
-}
-
-void SessionMap::add_session(Session *s)
-{
-  dout(10) << __func__ << " s=" << s << " name=" << s->info.inst.name << dendl;
-
-  assert(session_map.count(s->info.inst.name) == 0);
-  session_map[s->info.inst.name] = s;
-  if (by_state.count(s->state) == 0)
-    by_state[s->state] = new xlist<Session*>;
-  by_state[s->state]->push_back(&s->item_session_list);
-  s->get();
-}
-
-void SessionMap::remove_session(Session *s)
-{
-  dout(10) << __func__ << " s=" << s << " name=" << s->info.inst.name << dendl;
-
-  s->trim_completed_requests(0);
-  s->item_session_list.remove_myself();
-  session_map.erase(s->info.inst.name);
-  s->put();
-}
-
-void SessionMap::touch_session(Session *session)
-{
-  dout(10) << __func__ << " s=" << session << " name=" << session->info.inst.name << dendl;
-
-  // Move to the back of the session list for this state (should
-  // already be on a list courtesy of add_session and set_state)
-  assert(session->item_session_list.is_on_list());
-  if (by_state.count(session->state) == 0)
-    by_state[session->state] = new xlist<Session*>;
-  by_state[session->state]->push_back(&session->item_session_list);
-
-  session->last_cap_renew = ceph_clock_now(g_ceph_context);
-}
-
-/**
- * Capped in response to a CEPH_MSG_CLIENT_CAPRELEASE message,
- * with n_caps equal to the number of caps that were released
- * in the message.  Used to update state about how many caps a
- * client has released since it was last instructed to RECALL_STATE.
- */
-void Session::notify_cap_release(size_t n_caps)
-{
-  if (!recalled_at.is_zero()) {
-    recall_release_count += n_caps;
-    if (recall_release_count >= recall_count) {
-      recalled_at = utime_t();
-      recall_count = 0;
-      recall_release_count = 0;
-    }
-  }
-}
-
-/**
- * Called when a CEPH_MSG_CLIENT_SESSION->CEPH_SESSION_RECALL_STATE
- * message is sent to the client.  Update our recall-related state
- * in order to generate health metrics if the session doesn't see
- * a commensurate number of calls to ::notify_cap_release
- */
-void Session::notify_recall_sent(int const new_limit)
-{
-  if (recalled_at.is_zero()) {
-    // Entering recall phase, set up counters so we can later
-    // judge whether the client has respected the recall request
-    recalled_at = ceph_clock_now(g_ceph_context);
-    assert (new_limit < caps.size());  // Behaviour of Server::recall_client_state
-    recall_count = caps.size() - new_limit;
-    recall_release_count = 0;
-  }
-}
-
-void Session::set_client_metadata(map<string, string> const &meta)
-{
-  info.client_metadata = meta;
-
-  _update_human_name();
-}
-
-/**
- * Use client metadata to generate a somewhat-friendlier
- * name for the client than its session ID.
- *
- * This is *not* guaranteed to be unique, and any machine
- * consumers of session-related output should always use
- * the session ID as a primary capacity and use this only
- * as a presentation hint.
- */
-void Session::_update_human_name()
-{
-  if (info.client_metadata.count("hostname")) {
-    // Happy path, refer to clients by hostname
-    human_name = info.client_metadata["hostname"];
-    if (info.client_metadata.count("entity_id")) {
-      EntityName entity;
-      entity.set_id(info.client_metadata["entity_id"]);
-      if (!entity.has_default_id()) {
-        // When a non-default entity ID is set by the user, assume they
-        // would like to see it in references to the client
-        human_name += std::string(":") + entity.get_id();
-      }
-    }
-  } else {
-    // Fallback, refer to clients by ID e.g. client.4567
-    human_name = stringify(info.inst.name.num());
-  }
-}
-
-void Session::decode(bufferlist::iterator &p)
-{
-  info.decode(p);
-
-  _update_human_name();
-}
diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h
index b000c5e..ac7fd46 100644
--- a/src/mds/SessionMap.h
+++ b/src/mds/SessionMap.h
@@ -80,22 +80,7 @@ private:
   uint64_t state_seq;
   int importing_count;
   friend class SessionMap;
-
-  // Human (friendly) name is soft state generated from client metadata
-  void _update_human_name();
-  std::string human_name;
-
 public:
-
-  void decode(bufferlist::iterator &p);
-  void set_client_metadata(std::map<std::string, std::string> const &meta);
-  std::string get_human_name() const {return human_name;}
-
-  // Ephemeral state for tracking progress of capability recalls
-  utime_t recalled_at;  // When was I asked to SESSION_RECALL?
-  uint32_t recall_count;  // How many caps was I asked to SESSION_RECALL?
-  uint32_t recall_release_count;  // How many caps have I actually revoked?
-
   session_info_t info;                         ///< durable bits
 
   ConnectionRef connection;
@@ -104,13 +89,9 @@ public:
   list<Message*> preopen_out_queue;  ///< messages for client, queued before they connect
 
   elist<MDRequestImpl*> requests;
-  size_t get_request_count();
 
   interval_set<inodeno_t> pending_prealloc_inos; // journaling prealloc, will be added to prealloc_inos
 
-  void notify_cap_release(size_t n_caps);
-  void notify_recall_sent(int const new_limit);
-
   inodeno_t next_ino() {
     if (info.prealloc_inos.empty())
       return 0;
@@ -162,7 +143,7 @@ public:
   // -- caps --
 private:
   version_t cap_push_seq;        // cap push seq #
-  map<version_t, list<MDSInternalContextBase*> > waitfor_flush; // flush session messages
+  map<version_t, list<Context*> > waitfor_flush; // flush session messages
 public:
   xlist<Capability*> caps;     // inodes with caps; front=most recently used
   xlist<ClientLease*> leases;  // metadata leases to clients
@@ -172,11 +153,11 @@ public:
   version_t inc_push_seq() { return ++cap_push_seq; }
   version_t get_push_seq() const { return cap_push_seq; }
 
-  version_t wait_for_flush(MDSInternalContextBase* c) {
+  version_t wait_for_flush(Context* c) {
     waitfor_flush[get_push_seq()].push_back(c);
     return get_push_seq();
   }
-  void finish_flush(version_t seq, list<MDSInternalContextBase*>& ls) {
+  void finish_flush(version_t seq, list<Context*>& ls) {
     while (!waitfor_flush.empty()) {
       if (waitfor_flush.begin()->first > seq)
 	break;
@@ -221,7 +202,6 @@ public:
 
   Session() : 
     state(STATE_CLOSED), state_seq(0), importing_count(0),
-    recalled_at(), recall_count(0), recall_release_count(0),
     connection(NULL), item_session_list(this),
     requests(0),  // member_offset passed to front() manually
     cap_push_seq(0),
@@ -252,16 +232,15 @@ public:
 class MDS;
 
 class SessionMap {
-public:
-  MDS *mds;
 private:
+  MDS *mds;
   ceph::unordered_map<entity_name_t, Session*> session_map;
 public:
   map<int,xlist<Session*>* > by_state;
   
 public:  // i am lazy
   version_t version, projected, committing, committed;
-  map<version_t, list<MDSInternalContextBase*> > commit_waiters;
+  map<version_t, list<Context*> > commit_waiters;
 
 public:
   SessionMap(MDS *m) : mds(m), 
@@ -274,10 +253,6 @@ public:
     
   // sessions
   bool empty() { return session_map.empty(); }
-  const ceph::unordered_map<entity_name_t, Session*> &get_sessions() const
-  {
-    return session_map;
-  }
 
   bool is_any_state(int state) {
     map<int,xlist<Session*>* >::iterator p = by_state.find(state);
@@ -303,14 +278,6 @@ public:
       return session_map[w];
     return 0;
   }
-  const Session* get_session(entity_name_t w) const {
-    ceph::unordered_map<entity_name_t, Session*>::const_iterator p = session_map.find(w);
-    if (p == session_map.end()) {
-      return NULL;
-    } else {
-      return p->second;
-    }
-  }
   Session* get_or_add_session(const entity_inst_t& i) {
     Session *s;
     if (session_map.count(i.name)) {
@@ -322,10 +289,30 @@ public:
     }
     return s;
   }
-  void add_session(Session *s);
-  void remove_session(Session *s);
-  void touch_session(Session *session);
-
+  void add_session(Session *s) {
+    assert(session_map.count(s->info.inst.name) == 0);
+    session_map[s->info.inst.name] = s;
+    if (by_state.count(s->state) == 0)
+      by_state[s->state] = new xlist<Session*>;
+    by_state[s->state]->push_back(&s->item_session_list);
+    s->get();
+  }
+  void remove_session(Session *s) {
+    s->trim_completed_requests(0);
+    s->item_session_list.remove_myself();
+    session_map.erase(s->info.inst.name);
+    s->put();
+  }
+  void touch_session(Session *session) {
+    if (session->item_session_list.is_on_list()) {
+      if (by_state.count(session->state) == 0)
+	by_state[session->state] = new xlist<Session*>;
+      by_state[session->state]->push_back(&session->item_session_list);
+      session->last_cap_renew = ceph_clock_now(g_ceph_context);
+    } else {
+      assert(0);  // hrm, should happen?
+    }
+  }
   Session *get_oldest_session(int state) {
     if (by_state.count(state) == 0 || by_state[state]->empty())
       return 0;
@@ -350,8 +337,8 @@ public:
       if (p->second->info.inst.name.is_client())
 	s.insert(p->second->info.inst.name.num());
   }
-  void get_client_session_set(set<Session*>& s) const {
-    for (ceph::unordered_map<entity_name_t,Session*>::const_iterator p = session_map.begin();
+  void get_client_session_set(set<Session*>& s) {
+    for (ceph::unordered_map<entity_name_t,Session*>::iterator p = session_map.begin();
 	 p != session_map.end();
 	 ++p)
       if (p->second->info.inst.name.is_client())
@@ -394,7 +381,7 @@ public:
 
   // -- loading, saving --
   inodeno_t ino;
-  list<MDSInternalContextBase*> waiting_for_load;
+  list<Context*> waiting_for_load;
 
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& blp);
@@ -403,9 +390,9 @@ public:
 
   object_t get_object_name();
 
-  void load(MDSInternalContextBase *onload);
+  void load(Context *onload);
   void _load_finish(int r, bufferlist &bl);
-  void save(MDSInternalContextBase *onsave, version_t needv=0);
+  void save(Context *onsave, version_t needv=0);
   void _save_finish(version_t v);
  
 };
diff --git a/src/mds/SimpleLock.h b/src/mds/SimpleLock.h
index 06811975..cbaa996 100644
--- a/src/mds/SimpleLock.h
+++ b/src/mds/SimpleLock.h
@@ -16,8 +16,6 @@
 #ifndef CEPH_SIMPLELOCK_H
 #define CEPH_SIMPLELOCK_H
 
-#include "MDSContext.h"
-
 // -- lock types --
 // see CEPH_LOCK_*
 
@@ -199,6 +197,13 @@ private:
       _unstable = new unstable_bits_t;
     return _unstable;
   }
+  void clear_more() {
+    if (_unstable) {
+      assert(_unstable->empty());
+      delete _unstable;
+      _unstable = NULL;
+    }
+  }
   void try_clear_more() {
     if (_unstable && _unstable->empty()) {
       delete _unstable;
@@ -279,8 +284,8 @@ public:
   struct ptr_lt {
     bool operator()(const SimpleLock* l, const SimpleLock* r) const {
       // first sort by object type (dn < inode)
-      if (!(l->type->type > CEPH_LOCK_DN) && (r->type->type > CEPH_LOCK_DN)) return true;
-      if ((l->type->type > CEPH_LOCK_DN) == (r->type->type > CEPH_LOCK_DN)) {
+      if ((l->type->type>CEPH_LOCK_DN) <  (r->type->type>CEPH_LOCK_DN)) return true;
+      if ((l->type->type>CEPH_LOCK_DN) == (r->type->type>CEPH_LOCK_DN)) {
 	// then sort by object
 	if (l->parent->is_lt(r->parent)) return true;
 	if (l->parent == r->parent) {
@@ -301,10 +306,10 @@ public:
   void finish_waiters(uint64_t mask, int r=0) {
     parent->finish_waiting(mask << get_wait_shift(), r);
   }
-  void take_waiting(uint64_t mask, list<MDSInternalContextBase*>& ls) {
+  void take_waiting(uint64_t mask, list<Context*>& ls) {
     parent->take_waiting(mask << get_wait_shift(), ls);
   }
-  void add_waiter(uint64_t mask, MDSInternalContextBase *c) {
+  void add_waiter(uint64_t mask, Context *c) {
     parent->add_waiter(mask << get_wait_shift(), c);
   }
   bool is_waiter_for(uint64_t mask) const {
@@ -320,7 +325,7 @@ public:
     //assert(!is_stable() || gather_set.size() == 0);  // gather should be empty in stable states.
     return s;
   }
-  void set_state_rejoin(int s, list<MDSInternalContextBase*>& waiters) {
+  void set_state_rejoin(int s, list<Context*>& waiters) {
     if (!is_stable() && get_parent()->is_auth()) {
       state = s;
       get_parent()->auth_unpin(this);
@@ -474,7 +479,7 @@ public:
 
   // xlock
   void get_xlock(MutationRef who, client_t client) { 
-    assert(get_xlock_by() == MutationRef());
+    assert(get_xlock_by() == 0);
     assert(state == LOCK_XLOCK || is_locallock() ||
 	   state == LOCK_LOCK /* if we are a slave */);
     parent->get(MDSCacheObject::PIN_LOCK);
@@ -568,7 +573,7 @@ public:
     if (is_new)
       state = s;
   }
-  void decode_state_rejoin(bufferlist::iterator& p, list<MDSInternalContextBase*>& waiters) {
+  void decode_state_rejoin(bufferlist::iterator& p, list<Context*>& waiters) {
     __s16 s;
     ::decode(s, p);
     set_state_rejoin(s, waiters);
diff --git a/src/mds/SnapClient.h b/src/mds/SnapClient.h
index 3e8d6a2..fd52d2b 100644
--- a/src/mds/SnapClient.h
+++ b/src/mds/SnapClient.h
@@ -18,7 +18,7 @@
 #include "MDSTableClient.h"
 #include "snap.h"
 
-class MDSInternalContextBase;
+class Context;
 class MDS;
 class LogSegment;
 
@@ -30,7 +30,7 @@ public:
   void handle_query_result(MMDSTableRequest *m) {}
 
   void prepare_create(inodeno_t dirino, const string& name, utime_t stamp,
-		      version_t *pstid, bufferlist *pbl, MDSInternalContextBase *onfinish) {
+		      version_t *pstid, bufferlist *pbl, Context *onfinish) {
     bufferlist bl;
     __u32 op = TABLE_OP_CREATE;
     ::encode(op, bl);
@@ -40,7 +40,7 @@ public:
     _prepare(bl, pstid, pbl, onfinish);
   }
 
-  void prepare_create_realm(inodeno_t ino, version_t *pstid, bufferlist *pbl, MDSInternalContextBase *onfinish) {
+  void prepare_create_realm(inodeno_t ino, version_t *pstid, bufferlist *pbl, Context *onfinish) {
     bufferlist bl;
     __u32 op = TABLE_OP_CREATE;
     ::encode(op, bl);
@@ -48,7 +48,7 @@ public:
     _prepare(bl, pstid, pbl, onfinish);
   }
 
-  void prepare_destroy(inodeno_t ino, snapid_t snapid, version_t *pstid, bufferlist *pbl, MDSInternalContextBase *onfinish) {
+  void prepare_destroy(inodeno_t ino, snapid_t snapid, version_t *pstid, bufferlist *pbl, Context *onfinish) {
     bufferlist bl;
     __u32 op = TABLE_OP_DESTROY;
     ::encode(op, bl);
diff --git a/src/mds/SnapRealm.cc b/src/mds/SnapRealm.cc
index 1a19c48..a87b748 100644
--- a/src/mds/SnapRealm.cc
+++ b/src/mds/SnapRealm.cc
@@ -58,13 +58,15 @@ ostream& operator<<(ostream& out, const SnapRealm& realm)
 }
 
 
+
+
 void SnapRealm::add_open_past_parent(SnapRealm *parent)
 {
   open_past_parents[parent->inode->ino()] = parent;
   parent->inode->get(CInode::PIN_PASTSNAPPARENT);
 }
 
-bool SnapRealm::_open_parents(MDSInternalContextBase *finish, snapid_t first, snapid_t last)
+bool SnapRealm::_open_parents(Context *finish, snapid_t first, snapid_t last)
 {
   dout(10) << "open_parents [" << first << "," << last << "]" << dendl;
   if (open) 
@@ -89,7 +91,7 @@ bool SnapRealm::_open_parents(MDSInternalContextBase *finish, snapid_t first, sn
 	       << p->second.ino << dendl;
       CInode *parent = mdcache->get_inode(p->second.ino);
       if (!parent) {
-	mdcache->open_ino(p->second.ino, mdcache->mds->mdsmap->get_metadata_pool(), finish);
+	mdcache->open_remote_ino(p->second.ino, finish);
 	return false;
       }
       assert(parent->snaprealm);  // hmm!
diff --git a/src/mds/SnapRealm.h b/src/mds/SnapRealm.h
index 65e6521..d838132 100644
--- a/src/mds/SnapRealm.h
+++ b/src/mds/SnapRealm.h
@@ -21,7 +21,6 @@
 #include "include/elist.h"
 #include "common/snap_types.h"
 
-
 struct SnapRealm {
   // realm state
 
@@ -65,8 +64,8 @@ struct SnapRealm {
     return false;
   }
 
-  bool _open_parents(MDSInternalContextBase *retryorfinish, snapid_t first=1, snapid_t last=CEPH_NOSNAP);
-  bool open_parents(MDSInternalContextBase *retryorfinish) {
+  bool _open_parents(Context *retryorfinish, snapid_t first=1, snapid_t last=CEPH_NOSNAP);
+  bool open_parents(Context *retryorfinish) {
     if (!_open_parents(retryorfinish))
       return false;
     delete retryorfinish;
diff --git a/src/mds/SnapServer.cc b/src/mds/SnapServer.cc
index adbccd0..3d2b417 100644
--- a/src/mds/SnapServer.cc
+++ b/src/mds/SnapServer.cc
@@ -15,7 +15,6 @@
 #include "SnapServer.h"
 #include "MDS.h"
 #include "osd/OSDMap.h"
-#include "osdc/Objecter.h"
 #include "mon/MonClient.h"
 
 #include "include/types.h"
@@ -186,6 +185,30 @@ void SnapServer::_server_update(bufferlist& bl)
 
 void SnapServer::handle_query(MMDSTableRequest *req)
 {
+  /*  bufferlist::iterator p = req->bl.begin();
+  inodeno_t curino;
+  ::decode(curino, p);
+  dout(7) << "handle_lookup " << *req << " ino " << curino << dendl;
+
+  vector<Anchor> trace;
+  while (true) {
+    assert(anchor_map.count(curino) == 1);
+    Anchor &anchor = anchor_map[curino];
+    
+    dout(10) << "handle_lookup  adding " << anchor << dendl;
+    trace.insert(trace.begin(), anchor);  // lame FIXME
+    
+    if (anchor.dirino < MDS_INO_BASE) break;
+    curino = anchor.dirino;
+  }
+
+  // reply
+  MMDSTableRequest *reply = new MMDSTableRequest(table, TABLE_OP_QUERY_REPLY, req->reqid, version);
+  ::encode(curino, req->bl);
+  ::encode(trace, req->bl);
+  mds->send_message_mds(reply, req->get_source().num());
+
+  */
   req->put();
 }
 
@@ -202,12 +225,11 @@ void SnapServer::check_osd_map(bool force)
   map<int, vector<snapid_t> > all_purge;
   map<int, vector<snapid_t> > all_purged;
 
-  const OSDMap *osdmap = mds->objecter->get_osdmap_read();
   for (map<int, set<snapid_t> >::iterator p = need_to_purge.begin();
        p != need_to_purge.end();
        ++p) {
     int id = p->first;
-    const pg_pool_t *pi = osdmap->get_pg_pool(id);
+    const pg_pool_t *pi = mds->osdmap->get_pg_pool(id);
     for (set<snapid_t>::iterator q = p->second.begin();
 	 q != p->second.end();
 	 ++q) {
@@ -219,7 +241,6 @@ void SnapServer::check_osd_map(bool force)
       }
     }
   }
-  mds->objecter->put_osdmap_read();
 
   if (!all_purged.empty()) {
     // prepare to remove from need_to_purge list
diff --git a/src/mds/events/EExport.h b/src/mds/events/EExport.h
index 1cab674..082e14b 100644
--- a/src/mds/events/EExport.h
+++ b/src/mds/events/EExport.h
@@ -42,8 +42,6 @@ public:
     out << "EExport " << base << " " << metablob;
   }
 
-  EMetaBlob *get_metablob() { return &metablob; }
-
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
diff --git a/src/mds/events/EFragment.h b/src/mds/events/EFragment.h
index 56f5485..8869137 100644
--- a/src/mds/events/EFragment.h
+++ b/src/mds/events/EFragment.h
@@ -68,8 +68,6 @@ public:
       ::encode(*drb, rollback);
   }
 
-  EMetaBlob *get_metablob() { return &metablob; }
-
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
diff --git a/src/mds/events/EImportStart.h b/src/mds/events/EImportStart.h
index 17d0bdd..0f55190 100644
--- a/src/mds/events/EImportStart.h
+++ b/src/mds/events/EImportStart.h
@@ -43,8 +43,6 @@ protected:
   void print(ostream& out) const {
     out << "EImportStart " << base << " " << metablob;
   }
-
-  EMetaBlob *get_metablob() { return &metablob; }
   
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);
diff --git a/src/mds/events/EMetaBlob.h b/src/mds/events/EMetaBlob.h
index dd9c1cd..fb34697 100644
--- a/src/mds/events/EMetaBlob.h
+++ b/src/mds/events/EMetaBlob.h
@@ -20,7 +20,6 @@
 #include "../CInode.h"
 #include "../CDir.h"
 #include "../CDentry.h"
-#include "../LogSegment.h"
 
 #include "include/triple.h"
 #include "include/interval_set.h"
@@ -75,6 +74,8 @@ public:
     typedef map<snapid_t, old_inode_t> old_inodes_t;
     old_inodes_t old_inodes;
 
+    bufferlist _enc;
+
     fullbit(const fullbit& o);
     const fullbit& operator=(const fullbit& o);
 
@@ -83,16 +84,26 @@ public:
 	    const map<string,bufferptr> &xa, const string& sym,
 	    const bufferlist &sbl, __u8 st,
 	    const old_inodes_t *oi = NULL) :
-      dn(d), dnfirst(df), dnlast(dl), dnv(v), inode(i), xattrs(xa), state(st)
+      //dn(d), dnfirst(df), dnlast(dl), dnv(v), 
+      //inode(i), dirfragtree(dft), xattrs(xa), symlink(sym), snapbl(sbl), dirty(dr) 
+      _enc(1024)
     {
+      ::encode(d, _enc);
+      ::encode(df, _enc);
+      ::encode(dl, _enc);
+      ::encode(v, _enc);
+      ::encode(i, _enc);
+      ::encode(xa, _enc);
       if (i.is_symlink())
-	symlink = sym;
+	::encode(sym, _enc);
       if (i.is_dir()) {
-	dirfragtree = dft;
-	snapbl = sbl;
+	::encode(dft, _enc);
+	::encode(sbl, _enc);
       }
+      ::encode(st, _enc);
+      ::encode(oi ? true : false, _enc);
       if (oi)
-	old_inodes = *oi;
+	::encode(*oi, _enc);
     }
     fullbit(bufferlist::iterator &p) {
       decode(p);
@@ -142,8 +153,19 @@ public:
     unsigned char d_type;
     bool dirty;
 
+    bufferlist _enc;
+
     remotebit(const string& d, snapid_t df, snapid_t dl, version_t v, inodeno_t i, unsigned char dt, bool dr) : 
-      dn(d), dnfirst(df), dnlast(dl), dnv(v), ino(i), d_type(dt), dirty(dr) { }
+      //dn(d), dnfirst(df), dnlast(dl), dnv(v), ino(i), d_type(dt), dirty(dr) { }
+      _enc(256) {
+      ::encode(d, _enc);
+      ::encode(df, _enc);
+      ::encode(dl, _enc);
+      ::encode(v, _enc);
+      ::encode(i, _enc);
+      ::encode(dt, _enc);
+      ::encode(dr, _enc);
+    }
     remotebit(bufferlist::iterator &p) { decode(p); }
     remotebit(): dnfirst(0), dnlast(0), dnv(0), ino(0),
 	d_type('\0'), dirty(false) {}
@@ -169,8 +191,17 @@ public:
     version_t dnv;
     bool dirty;
 
+    bufferlist _enc;
+
     nullbit(const string& d, snapid_t df, snapid_t dl, version_t v, bool dr) : 
-      dn(d), dnfirst(df), dnlast(dl), dnv(v), dirty(dr) { }
+      //dn(d), dnfirst(df), dnlast(dl), dnv(v), dirty(dr) { }
+      _enc(128) {
+      ::encode(d, _enc);
+      ::encode(df, _enc);
+      ::encode(dl, _enc);
+      ::encode(v, _enc);
+      ::encode(dr, _enc);
+    }
     nullbit(bufferlist::iterator &p) { decode(p); }
     nullbit(): dnfirst(0), dnlast(0), dnv(0), dirty(false) {}
 
@@ -203,10 +234,10 @@ public:
 
   private:
     mutable bufferlist dnbl;
-    mutable bool dn_decoded;
-    mutable list<ceph::shared_ptr<fullbit> > dfull;
-    mutable list<remotebit> dremote;
-    mutable list<nullbit> dnull;
+    bool dn_decoded;
+    list<ceph::shared_ptr<fullbit> >   dfull;
+    list<remotebit> dremote;
+    list<nullbit>   dnull;
 
   public:
     dirlump() : state(0), nfull(0), nremote(0), nnull(0), dn_decoded(true) { }
@@ -222,13 +253,9 @@ public:
     bool is_dirty_dft() { return state & STATE_DIRTYDFT; }
     void mark_dirty_dft() { state |= STATE_DIRTYDFT; }
 
-    const list<ceph::shared_ptr<fullbit> > &get_dfull()   const { return dfull; }
-    const list<remotebit>                  &get_dremote() const { return dremote; }
-    const list<nullbit>                    &get_dnull()   const { return dnull; }
-
-    void add_dnull(nullbit const &n)                   { dnull.push_back(n); };
-    void add_dfull(ceph::shared_ptr<fullbit> const &p) { dfull.push_back(p); };
-    void add_dremote(remotebit const &r)               { dremote.push_back(r); };
+    list<ceph::shared_ptr<fullbit> >   &get_dfull()   { return dfull; }
+    list<remotebit> &get_dremote() { return dremote; }
+    list<nullbit>   &get_dnull()   { return dnull; }
 
     void print(dirfrag_t dirfrag, ostream& out) {
       out << "dirlump " << dirfrag << " v " << fnode.version
@@ -268,7 +295,7 @@ public:
       ::encode(dremote, dnbl);
       ::encode(dnull, dnbl);
     }
-    void _decode_bits() const { 
+    void _decode_bits() { 
       if (dn_decoded) return;
       bufferlist::iterator p = dnbl.begin();
       ::decode(dfull, p);
@@ -284,11 +311,12 @@ public:
   };
   WRITE_CLASS_ENCODER(dirlump)
 
+private:
   // my lumps.  preserve the order we added them in a list.
   list<dirfrag_t>         lump_order;
   map<dirfrag_t, dirlump> lump_map;
   list<ceph::shared_ptr<fullbit> > roots;
-public:
+
   list<pair<__u8,version_t> > table_tids;  // tableclient transactions
 
   inodeno_t opened_ino;
@@ -306,11 +334,9 @@ private:
 
   // inodes i've truncated
   list<inodeno_t> truncate_start;        // start truncate 
-  map<inodeno_t, log_segment_seq_t> truncate_finish;  // finished truncate (started in segment blah)
+  map<inodeno_t,uint64_t> truncate_finish;  // finished truncate (started in segment blah)
 
-public:
   vector<inodeno_t> destroyed_inodes;
-private:
 
   // idempotent op(s)
   list<pair<metareqid_t,uint64_t> > client_reqs;
@@ -318,16 +344,11 @@ private:
  public:
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
-  void get_inodes(std::set<inodeno_t> &inodes) const;
-  void get_paths(std::vector<std::string> &paths) const;
-  void get_dentries(std::map<dirfrag_t, std::set<std::string> > &dentries) const;
-  entity_name_t get_client_name() const {return client_name;}
-
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EMetaBlob*>& ls);
   // soft stateadd
   uint64_t last_subtree_map;
-  uint64_t event_seq;
+  uint64_t my_offset;
 
   // for replay, in certain cases
   //LogSegment *_segment;
@@ -375,8 +396,6 @@ private:
   void add_truncate_finish(inodeno_t ino, uint64_t segoff) {
     truncate_finish[ino] = segoff;
   }
-  
-  bool rewrite_truncate_finish(MDS const *mds, std::map<uint64_t, uint64_t> const &old_to_new);
 
   void add_destroyed_inode(inodeno_t ino) {
     destroyed_inodes.push_back(ino);
@@ -388,10 +407,10 @@ private:
   void add_null_dentry(dirlump& lump, CDentry *dn, bool dirty) {
     // add the dir
     lump.nnull++;
-    lump.add_dnull(nullbit(dn->get_name(), 
-			   dn->first, dn->last,
-			   dn->get_projected_version(), 
-			   dirty));
+    lump.get_dnull().push_back(nullbit(dn->get_name(), 
+				       dn->first, dn->last,
+				       dn->get_projected_version(), 
+				       dirty));
   }
 
   void add_remote_dentry(CDentry *dn, bool dirty) {
@@ -407,11 +426,11 @@ private:
       rdt = dn->get_projected_linkage()->get_remote_d_type();
     }
     lump.nremote++;
-    lump.add_dremote(remotebit(dn->get_name(), 
-			       dn->first, dn->last,
-                               dn->get_projected_version(), 
-                               rino, rdt,
-                               dirty));
+    lump.get_dremote().push_back(remotebit(dn->get_name(), 
+					   dn->first, dn->last,
+					   dn->get_projected_version(), 
+					   rino, rdt,
+					   dirty));
   }
 
   // return remote pointer to to-be-journaled inode
@@ -428,7 +447,7 @@ private:
       in = dn->get_projected_linkage()->get_inode();
 
     // make note of where this inode was last journaled
-    in->last_journaled = event_seq;
+    in->last_journaled = my_offset;
     //cout << "journaling " << in->inode.ino << " at " << my_offset << std::endl;
 
     inode_t *pi = in->get_projected_inode();
@@ -441,14 +460,14 @@ private:
       sr->encode(snapbl);
 
     lump.nfull++;
-    lump.add_dfull(ceph::shared_ptr<fullbit>(new fullbit(dn->get_name(), 
-                                                         dn->first, dn->last,
-                                                         dn->get_projected_version(), 
-                                                         *pi, in->dirfragtree,
-                                                         *in->get_projected_xattrs(),
-                                                         in->symlink, snapbl,
-                                                         state,
-                                                         &in->old_inodes)));
+    lump.get_dfull().push_back(ceph::shared_ptr<fullbit>(new fullbit(dn->get_name(), 
+									 dn->first, dn->last,
+									 dn->get_projected_version(), 
+									 *pi, in->dirfragtree,
+									 *in->get_projected_xattrs(),
+									 in->symlink, snapbl,
+									 state,
+									 &in->old_inodes)));
   }
 
   // convenience: primary or remote?  figure it out.
@@ -481,7 +500,7 @@ private:
 
   void add_root(bool dirty, CInode *in, inode_t *pi=0, fragtree_t *pdft=0, bufferlist *psnapbl=0,
 		    map<string,bufferptr> *px=0) {
-    in->last_journaled = event_seq;
+    in->last_journaled = my_offset;
     //cout << "journaling " << in->inode.ino << " at " << my_offset << std::endl;
 
     if (!pi) pi = in->get_projected_inode();
@@ -547,13 +566,6 @@ private:
   
   void add_dir_context(CDir *dir, int mode = TO_AUTH_SUBTREE_ROOT);
 
-  bool empty() {
-    return roots.empty() && lump_order.empty() && table_tids.empty() &&
-	   truncate_start.empty() && truncate_finish.empty() &&
-	   destroyed_inodes.empty() && client_reqs.empty() &&
-	   opened_ino == 0 && inotablev == 0 && sessionmapv == 0;
-  }
-
   void print(ostream& out) const {
     out << "[metablob";
     if (!lump_order.empty()) 
diff --git a/src/mds/events/ENoOp.h b/src/mds/events/ENoOp.h
deleted file mode 100644
index a66d540..0000000
--- a/src/mds/events/ENoOp.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-#ifndef CEPH_MDS_ENOOP_H
-#define CEPH_MDS_ENOOP_H
-
-#include "../LogEvent.h"
-
-class ENoOp : public LogEvent {
-  uint32_t pad_size;
-
-public:
-  ENoOp() : LogEvent(EVENT_NOOP), pad_size(0) { }
-  ENoOp(uint32_t size_) : LogEvent(EVENT_NOOP), pad_size(size_){ }
-
-  void encode(bufferlist& bl) const;
-  void decode(bufferlist::iterator& bl);
-  void dump(Formatter *f) const {}
-
-  void replay(MDS *mds);
-};
-
-#endif
diff --git a/src/mds/events/EOpen.h b/src/mds/events/EOpen.h
index 207b32b..1267cf0 100644
--- a/src/mds/events/EOpen.h
+++ b/src/mds/events/EOpen.h
@@ -31,8 +31,6 @@ public:
     out << "EOpen " << metablob << ", " << inos.size() << " open files";
   }
 
-  EMetaBlob *get_metablob() { return &metablob; }
-
   void add_clean_inode(CInode *in) {
     if (!in->is_base()) {
       metablob.add_dir_context(in->get_projected_parent_dn()->get_dir());
diff --git a/src/mds/events/ESession.h b/src/mds/events/ESession.h
index 3d55c83..95cd690 100644
--- a/src/mds/events/ESession.h
+++ b/src/mds/events/ESession.h
@@ -29,19 +29,14 @@ class ESession : public LogEvent {
   interval_set<inodeno_t> inos;
   version_t inotablev;
 
-  // Client metadata stored during open
-  std::map<std::string, std::string> client_metadata;
-
  public:
   ESession() : LogEvent(EVENT_SESSION), open(false) { }
-  ESession(const entity_inst_t& inst, bool o, version_t v,
-      const std::map<std::string, std::string> &cm) :
+  ESession(const entity_inst_t& inst, bool o, version_t v) :
     LogEvent(EVENT_SESSION),
     client_inst(inst),
     open(o),
     cmapv(v),
-    inotablev(0),
-    client_metadata(cm) {
+    inotablev(0) {
   }
   ESession(const entity_inst_t& inst, bool o, version_t v,
 	   const interval_set<inodeno_t>& i, version_t iv) :
@@ -66,8 +61,7 @@ class ESession : public LogEvent {
   }
   
   void update_segment();
-  void replay(MDS *mds);
-  entity_inst_t get_client_inst() const {return client_inst;}
+  void replay(MDS *mds);  
 };
 
 #endif
diff --git a/src/mds/events/ESlaveUpdate.h b/src/mds/events/ESlaveUpdate.h
index 9745139..b45351a 100644
--- a/src/mds/events/ESlaveUpdate.h
+++ b/src/mds/events/ESlaveUpdate.h
@@ -136,8 +136,6 @@ public:
     out << commit;
   }
 
-  EMetaBlob *get_metablob() { return &commit; }
-
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
diff --git a/src/mds/events/ESubtreeMap.h b/src/mds/events/ESubtreeMap.h
index 4dea7ec..32a4abe 100644
--- a/src/mds/events/ESubtreeMap.h
+++ b/src/mds/events/ESubtreeMap.h
@@ -24,9 +24,8 @@ public:
   map<dirfrag_t, vector<dirfrag_t> > subtrees;
   set<dirfrag_t> ambiguous_subtrees;
   uint64_t expire_pos;
-  uint64_t event_seq;
 
-  ESubtreeMap() : LogEvent(EVENT_SUBTREEMAP), expire_pos(0), event_seq(0) { }
+  ESubtreeMap() : LogEvent(EVENT_SUBTREEMAP), expire_pos(0) { }
   
   void print(ostream& out) const {
     out << "ESubtreeMap " << subtrees.size() << " subtrees " 
@@ -34,8 +33,6 @@ public:
 	<< metablob;
   }
 
-  EMetaBlob *get_metablob() { return &metablob; }
-
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
diff --git a/src/mds/events/EUpdate.h b/src/mds/events/EUpdate.h
index d3455e1..645386e 100644
--- a/src/mds/events/EUpdate.h
+++ b/src/mds/events/EUpdate.h
@@ -38,8 +38,6 @@ public:
     out << metablob;
   }
 
-  EMetaBlob *get_metablob() { return &metablob; }
-
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
@@ -47,7 +45,6 @@ public:
 
   void update_segment();
   void replay(MDS *mds);
-  EMetaBlob const *get_metablob() const {return &metablob;}
 };
 
 #endif
diff --git a/src/mds/flock.cc b/src/mds/flock.cc
index 7b58c3a..4e825c9 100644
--- a/src/mds/flock.cc
+++ b/src/mds/flock.cc
@@ -209,7 +209,8 @@ void ceph_lock_state_t::adjust_locks(list<multimap<uint64_t, ceph_filelock>::ite
 {
   dout(15) << "adjust_locks" << dendl;
   bool new_lock_to_end = (0 == new_lock.length);
-  uint64_t new_lock_start, new_lock_end;
+  uint64_t new_lock_start = new_lock.start;
+  uint64_t new_lock_end = new_lock.start + new_lock.length - 1;
   uint64_t old_lock_start, old_lock_end;
   __s64 old_lock_client = 0;
   ceph_filelock *old_lock;
diff --git a/src/mds/journal.cc b/src/mds/journal.cc
index 41e36ad..2b8bef0 100644
--- a/src/mds/journal.cc
+++ b/src/mds/journal.cc
@@ -20,7 +20,6 @@
 
 #include "events/EMetaBlob.h"
 #include "events/EResetJournal.h"
-#include "events/ENoOp.h"
 
 #include "events/EUpdate.h"
 #include "events/ESlaveUpdate.h"
@@ -63,11 +62,11 @@
 // -----------------------
 // LogSegment
 
-void LogSegment::try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_prio)
+void LogSegment::try_to_expire(MDS *mds, C_GatherBuilder &gather_bld, int op_prio)
 {
   set<CDir*> commit;
 
-  dout(6) << "LogSegment(" << seq << "/" << offset << ").try_to_expire" << dendl;
+  dout(6) << "LogSegment(" << offset << ").try_to_expire" << dendl;
 
   assert(g_conf->mds_kill_journal_expire_at != 1);
 
@@ -200,7 +199,7 @@ void LogSegment::try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_pr
     assert(in->is_auth());
     if (in->can_auth_pin()) {
       dout(15) << "try_to_expire waiting for storing backtrace on " << *in << dendl;
-      in->store_backtrace(gather_bld.new_sub(), op_prio);
+      in->store_backtrace(gather_bld.new_sub());
     } else {
       dout(15) << "try_to_expire waiting for unfreeze on " << *in << dendl;
       in->add_waiter(CInode::WAIT_UNFREEZE, gather_bld.new_sub());
@@ -242,7 +241,6 @@ void LogSegment::try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_pr
        p != pending_commit_tids.end();
        ++p) {
     MDSTableClient *client = mds->get_table_client(p->first);
-    assert(client);
     for (ceph::unordered_set<version_t>::iterator q = p->second.begin();
 	 q != p->second.end();
 	 ++q) {
@@ -258,7 +256,6 @@ void LogSegment::try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_pr
        p != tablev.end();
        ++p) {
     MDSTableServer *server = mds->get_table_server(p->first);
-    assert(server);
     if (p->second > server->get_committed_version()) {
       dout(10) << "try_to_expire waiting for " << get_mdstable_name(p->first) 
 	       << " to save, need " << p->second << dendl;
@@ -274,12 +271,15 @@ void LogSegment::try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_pr
     (*p)->add_waiter(CInode::WAIT_TRUNC, gather_bld.new_sub());
   }
   
+  // FIXME client requests...?
+  // audit handling of anchor transactions?
+
   if (gather_bld.has_subs()) {
-    dout(6) << "LogSegment(" << seq << "/" << offset << ").try_to_expire waiting" << dendl;
+    dout(6) << "LogSegment(" << offset << ").try_to_expire waiting" << dendl;
     mds->mdlog->flush();
   } else {
     assert(g_conf->mds_kill_journal_expire_at != 5);
-    dout(6) << "LogSegment(" << seq << "/" << offset << ").try_to_expire success" << dendl;
+    dout(6) << "LogSegment(" << offset << ").try_to_expire success" << dendl;
   }
 }
 
@@ -291,8 +291,10 @@ void LogSegment::try_to_expire(MDS *mds, MDSGatherBuilder &gather_bld, int op_pr
 // EMetaBlob
 
 EMetaBlob::EMetaBlob(MDLog *mdlog) : opened_ino(0), renamed_dirino(0),
-				     inotablev(0), sessionmapv(0), allocated_ino(0),
-				     last_subtree_map(0), event_seq(0)
+				     inotablev(0), sessionmapv(0),
+				     allocated_ino(0),
+				     last_subtree_map(mdlog ? mdlog->get_last_segment_offset() : 0),
+				     my_offset(mdlog ? mdlog->get_write_pos() : 0) //, _segment(0)
 { }
 
 void EMetaBlob::add_dir_context(CDir *dir, int mode)
@@ -313,11 +315,14 @@ void EMetaBlob::add_dir_context(CDir *dir, int mode)
       dout(20) << "EMetaBlob::add_dir_context(" << dir << ") have lump " << dir->dirfrag() << dendl;
       break;
     }
-
+      
     // stop at root/stray
     CInode *diri = dir->get_inode();
     CDentry *parent = diri->get_projected_parent_dn();
 
+    if (!parent)
+      break;
+
     if (mode == TO_AUTH_SUBTREE_ROOT) {
       // subtree root?
       if (dir->is_subtree_root() && !dir->state_test(CDir::STATE_EXPORTBOUND)) {
@@ -337,7 +342,7 @@ void EMetaBlob::add_dir_context(CDir *dir, int mode)
       }
       
       // was the inode journaled in this blob?
-      if (event_seq && diri->last_journaled == event_seq) {
+      if (my_offset && diri->last_journaled == my_offset) {
 	dout(20) << "EMetaBlob::add_dir_context(" << dir << ") already have diri this blob " << *diri << dendl;
 	break;
       }
@@ -351,9 +356,6 @@ void EMetaBlob::add_dir_context(CDir *dir, int mode)
       }
     }
 
-    if (!parent)
-      break;
-
     if (maybenot) {
       dout(25) << "EMetaBlob::add_dir_context(" << dir << ")      maybe " << *parent << dendl;
       maybe.push_front(parent);
@@ -376,6 +378,11 @@ void EMetaBlob::add_dir_context(CDir *dir, int mode)
 
 void EMetaBlob::update_segment(LogSegment *ls)
 {
+  // atids?
+  //for (list<version_t>::iterator p = atids.begin(); p != atids.end(); ++p)
+  //  ls->pending_commit_atids[*p] = ls;
+  // -> handled directly by AnchorClient
+
   // dirty inode mtimes
   // -> handled directly by Server.cc, replay()
 
@@ -398,24 +405,12 @@ void EMetaBlob::update_segment(LogSegment *ls)
 
 void EMetaBlob::fullbit::encode(bufferlist& bl) const {
   ENCODE_START(6, 5, bl);
-  ::encode(dn, bl);
-  ::encode(dnfirst, bl);
-  ::encode(dnlast, bl);
-  ::encode(dnv, bl);
-  ::encode(inode, bl);
-  ::encode(xattrs, bl);
-  if (inode.is_symlink())
-    ::encode(symlink, bl);
-  if (inode.is_dir()) {
-    ::encode(dirfragtree, bl);
-    ::encode(snapbl, bl);
-  }
-  ::encode(state, bl);
-  if (old_inodes.empty()) {
-    ::encode(false, bl);
+  if (!_enc.length()) {
+    fullbit copy(dn, dnfirst, dnlast, dnv, inode, dirfragtree, xattrs, symlink,
+		 snapbl, state, &old_inodes);
+    bl.append(copy._enc);
   } else {
-    ::encode(true, bl);
-    ::encode(old_inodes, bl);
+    bl.append(_enc);
   }
   ENCODE_FINISH(bl);
 }
@@ -463,6 +458,19 @@ void EMetaBlob::fullbit::decode(bufferlist::iterator &bl) {
 
 void EMetaBlob::fullbit::dump(Formatter *f) const
 {
+  if (_enc.length() && !dn.length()) {
+    /* if our bufferlist has data but our name is empty, we
+     * haven't initialized ourselves; do so in order to print members!
+     * We use const_cast here because the whole point is we aren't
+     * fully set up and this isn't changing who we "are", just our
+     * representation.
+     */
+    EMetaBlob::fullbit *me = const_cast<EMetaBlob::fullbit*>(this);
+    bufferlist encoded;
+    encode(encoded);
+    bufferlist::iterator p = encoded.begin();
+    me->decode(p);
+  }
   f->dump_string("dentry", dn);
   f->dump_stream("snapid.first") << dnfirst;
   f->dump_stream("snapid.last") << dnlast;
@@ -556,13 +564,12 @@ void EMetaBlob::fullbit::update_inode(MDS *mds, CInode *in)
 void EMetaBlob::remotebit::encode(bufferlist& bl) const
 {
   ENCODE_START(2, 2, bl);
-  ::encode(dn, bl);
-  ::encode(dnfirst, bl);
-  ::encode(dnlast, bl);
-  ::encode(dnv, bl);
-  ::encode(ino, bl);
-  ::encode(d_type, bl);
-  ::encode(dirty, bl);
+  if (!_enc.length()) {
+    remotebit copy(dn, dnfirst, dnlast, dnv, ino, d_type, dirty);
+    bl.append(copy._enc);
+  } else {
+    bl.append(_enc);
+  }
   ENCODE_FINISH(bl);
 }
 
@@ -581,6 +588,19 @@ void EMetaBlob::remotebit::decode(bufferlist::iterator &bl)
 
 void EMetaBlob::remotebit::dump(Formatter *f) const
 {
+  if (_enc.length() && !dn.length()) {
+    /* if our bufferlist has data but our name is empty, we
+     * haven't initialized ourselves; do so in order to print members!
+     * We use const_cast here because the whole point is we aren't
+     * fully set up and this isn't changing who we "are", just our
+     * representation.
+     */
+    EMetaBlob::remotebit *me = const_cast<EMetaBlob::remotebit*>(this);
+    bufferlist encoded;
+    encode(encoded);
+    bufferlist::iterator p = encoded.begin();
+    me->decode(p);
+  }
   f->dump_string("dentry", dn);
   f->dump_int("snapid.first", dnfirst);
   f->dump_int("snapid.last", dnlast);
@@ -622,11 +642,12 @@ generate_test_instances(list<EMetaBlob::remotebit*>& ls)
 void EMetaBlob::nullbit::encode(bufferlist& bl) const
 {
   ENCODE_START(2, 2, bl);
-  ::encode(dn, bl);
-  ::encode(dnfirst, bl);
-  ::encode(dnlast, bl);
-  ::encode(dnv, bl);
-  ::encode(dirty, bl);
+  if (!_enc.length()) {
+    nullbit copy(dn, dnfirst, dnlast, dnv, dirty);
+    bl.append(copy._enc);
+  } else {
+    bl.append(_enc);
+  }
   ENCODE_FINISH(bl);
 }
 
@@ -643,6 +664,19 @@ void EMetaBlob::nullbit::decode(bufferlist::iterator &bl)
 
 void EMetaBlob::nullbit::dump(Formatter *f) const
 {
+  if (_enc.length() && !dn.length()) {
+    /* if our bufferlist has data but our name is empty, we
+     * haven't initialized ourselves; do so in order to print members!
+     * We use const_cast here because the whole point is we aren't
+     * fully set up and this isn't changing who we "are", just our
+     * representation.
+     */
+    EMetaBlob::nullbit *me = const_cast<EMetaBlob::nullbit*>(this);
+    bufferlist encoded;
+    encode(encoded);
+    bufferlist::iterator p = encoded.begin();
+    me->decode(p);
+  }
   f->dump_string("dentry", dn);
   f->dump_int("snapid.first", dnfirst);
   f->dump_int("snapid.last", dnlast);
@@ -813,190 +847,6 @@ void EMetaBlob::decode(bufferlist::iterator &bl)
   DECODE_FINISH(bl);
 }
 
-
-/**
- * Get all inodes touched by this metablob.  Includes the 'bits' within
- * dirlumps, and the inodes of the dirs themselves.
- */
-void EMetaBlob::get_inodes(
-    std::set<inodeno_t> &inodes) const
-{
-  // For all dirlumps in this metablob
-  for (std::map<dirfrag_t, dirlump>::const_iterator i = lump_map.begin(); i != lump_map.end(); ++i) {
-    // Record inode of dirlump
-    inodeno_t const dir_ino = i->first.ino;
-    inodes.insert(dir_ino);
-
-    // Decode dirlump bits
-    dirlump const &dl = i->second;
-    dl._decode_bits();
-
-    // Record inodes of fullbits
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
-        iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
-      inodes.insert((*iter)->inode.ino);
-    }
-
-    // Record inodes of remotebits
-    list<remotebit> const &rb_list = dl.get_dremote();
-    for (list<remotebit>::const_iterator
-	iter = rb_list.begin(); iter != rb_list.end(); ++iter) {
-      inodes.insert(iter->ino);
-    }
-  }
-}
-
-
-/**
- * Get a map of dirfrag to set of dentries in that dirfrag which are
- * touched in this operation.
- */
-void EMetaBlob::get_dentries(std::map<dirfrag_t, std::set<std::string> > &dentries) const
-{
-  for (std::map<dirfrag_t, dirlump>::const_iterator i = lump_map.begin(); i != lump_map.end(); ++i) {
-    dirlump const &dl = i->second;
-    dirfrag_t const &df = i->first;
-
-    // Get all bits
-    dl._decode_bits();
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
-    list<nullbit> const &nb_list = dl.get_dnull();
-    list<remotebit> const &rb_list = dl.get_dremote();
-
-    // For all bits, store dentry
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
-        iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
-      dentries[df].insert((*iter)->dn);
-
-    }
-    for (list<nullbit>::const_iterator
-	iter = nb_list.begin(); iter != nb_list.end(); ++iter) {
-      dentries[df].insert(iter->dn);
-    }
-    for (list<remotebit>::const_iterator
-	iter = rb_list.begin(); iter != rb_list.end(); ++iter) {
-      dentries[df].insert(iter->dn);
-    }
-  }
-}
-
-
-
-/**
- * Calculate all paths that we can infer are touched by this metablob.  Only uses
- * information local to this metablob so it may only be the path within the
- * subtree.
- */
-void EMetaBlob::get_paths(
-    std::vector<std::string> &paths) const
-{
-  // Each dentry has a 'location' which is a 2-tuple of parent inode and dentry name
-  typedef std::pair<inodeno_t, std::string> Location;
-
-  // Whenever we see a dentry within a dirlump, we remember it as a child of
-  // the dirlump's inode
-  std::map<inodeno_t, std::list<std::string> > children;
-
-  // Whenever we see a location for an inode, remember it: this allows us to
-  // build a path given an inode
-  std::map<inodeno_t, Location> ino_locations;
-
-  // Special case: operations on root inode populate roots but not dirlumps
-  if (lump_map.empty() && !roots.empty()) {
-    paths.push_back("/");
-    return;
-  }
-
-  // First pass
-  // ==========
-  // Build a tiny local metadata cache for the path structure in this metablob
-  for (std::map<dirfrag_t, dirlump>::const_iterator i = lump_map.begin(); i != lump_map.end(); ++i) {
-    inodeno_t const dir_ino = i->first.ino;
-    dirlump const &dl = i->second;
-    dl._decode_bits();
-
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
-    list<nullbit> const &nb_list = dl.get_dnull();
-    list<remotebit> const &rb_list = dl.get_dremote();
-
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
-        iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
-      std::string const &dentry = (*iter)->dn;
-      children[dir_ino].push_back(dentry);
-      ino_locations[(*iter)->inode.ino] = Location(dir_ino, dentry);
-    }
-
-    for (list<nullbit>::const_iterator
-	iter = nb_list.begin(); iter != nb_list.end(); ++iter) {
-      std::string const &dentry = iter->dn;
-      children[dir_ino].push_back(dentry);
-    }
-
-    for (list<remotebit>::const_iterator
-	iter = rb_list.begin(); iter != rb_list.end(); ++iter) {
-      std::string const &dentry = iter->dn;
-      children[dir_ino].push_back(dentry);
-    }
-  }
-
-  std::vector<Location> leaf_locations;
-
-  // Second pass
-  // ===========
-  // Output paths for all childless nodes in the metablob
-  for (std::map<dirfrag_t, dirlump>::const_iterator i = lump_map.begin(); i != lump_map.end(); ++i) {
-    inodeno_t const dir_ino = i->first.ino;
-    dirlump const &dl = i->second;
-    dl._decode_bits();
-
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
-        iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
-      std::string const &dentry = (*iter)->dn;
-      children[dir_ino].push_back(dentry);
-      ino_locations[(*iter)->inode.ino] = Location(dir_ino, dentry);
-      if (children.find((*iter)->inode.ino) == children.end()) {
-        leaf_locations.push_back(Location(dir_ino, dentry));
-
-      }
-    }
-
-    list<nullbit> const &nb_list = dl.get_dnull();
-    for (list<nullbit>::const_iterator
-	iter = nb_list.begin(); iter != nb_list.end(); ++iter) {
-      std::string const &dentry = iter->dn;
-      leaf_locations.push_back(Location(dir_ino, dentry));
-    }
-
-    list<remotebit> const &rb_list = dl.get_dremote();
-    for (list<remotebit>::const_iterator
-	iter = rb_list.begin(); iter != rb_list.end(); ++iter) {
-      std::string const &dentry = iter->dn;
-      leaf_locations.push_back(Location(dir_ino, dentry));
-    }
-  }
-
-  // For all the leaf locations identified, generate paths
-  for (std::vector<Location>::iterator i = leaf_locations.begin(); i != leaf_locations.end(); ++i) {
-    Location const &loc = *i;
-    std::string path = loc.second;
-    inodeno_t ino = loc.first;
-    while(ino_locations.find(ino) != ino_locations.end()) {
-      Location const &loc = ino_locations[ino];
-      if (!path.empty()) {
-        path = loc.second + "/" + path;
-      } else {
-        path = loc.second + path;
-      }
-      ino = loc.first;
-    }
-
-    paths.push_back(path);
-  }
-}
-
-
 void EMetaBlob::dump(Formatter *f) const
 {
   f->open_array_section("lumps");
@@ -1042,7 +892,7 @@ void EMetaBlob::dump(Formatter *f) const
   f->close_section(); // renamed directory fragments
 
   f->dump_int("inotable version", inotablev);
-  f->dump_int("SessionMap version", sessionmapv);
+  f->dump_int("SesionMap version", sessionmapv);
   f->dump_int("allocated ino", allocated_ino);
   
   f->dump_stream("preallocated inos") << preallocated_inos;
@@ -1103,7 +953,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
     CInode *in = mds->mdcache->get_inode((*p)->inode.ino);
     bool isnew = in ? false:true;
     if (!in)
-      in = new CInode(mds->mdcache, false);
+      in = new CInode(mds->mdcache, true);
     (*p)->update_inode(mds, in);
 
     if (isnew)
@@ -1144,15 +994,13 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
     dirlump &lump = lump_map[*lp];
 
     // the dir 
-    CDir *dir = mds->mdcache->get_force_dirfrag(*lp, true);
+    CDir *dir = mds->mdcache->get_force_dirfrag(*lp);
     if (!dir) {
       // hmm.  do i have the inode?
       CInode *diri = mds->mdcache->get_inode((*lp).ino);
       if (!diri) {
-	if (MDS_INO_IS_MDSDIR(lp->ino)) {
-	  assert(MDS_INO_MDSDIR(mds->get_nodeid()) != lp->ino);
+	if (MDS_INO_IS_BASE(lp->ino)) {
 	  diri = mds->mdcache->create_system_inode(lp->ino, S_IFDIR|0755);
-	  diri->state_clear(CInode::STATE_AUTH);
 	  dout(10) << "EMetaBlob.replay created base " << *diri << dendl;
 	} else {
 	  dout(0) << "EMetaBlob.replay missing dir ino  " << (*lp).ino << dendl;
@@ -1164,17 +1012,13 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
       dir = diri->get_or_open_dirfrag(mds->mdcache, (*lp).frag);
 
       if (MDS_INO_IS_BASE(lp->ino))
-	mds->mdcache->adjust_subtree_auth(dir, CDIR_AUTH_UNDEF);
+	mds->mdcache->adjust_subtree_auth(dir, CDIR_AUTH_UNKNOWN);
 
       dout(10) << "EMetaBlob.replay added dir " << *dir << dendl;  
     }
     dir->set_version( lump.fnode.version );
     dir->fnode = lump.fnode;
 
-    if (lump.is_importing()) {
-      dir->state_set(CDir::STATE_AUTH);
-      dir->state_clear(CDir::STATE_COMPLETE);
-    }
     if (lump.is_dirty()) {
       dir->_mark_dirty(logseg);
 
@@ -1203,6 +1047,8 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
       dir->mark_new(logseg);
     if (lump.is_complete())
       dir->mark_complete();
+    else if (lump.is_importing())
+      dir->state_clear(CDir::STATE_COMPLETE);
     
     dout(10) << "EMetaBlob.replay updated dir " << *dir << dendl;  
 
@@ -1210,7 +1056,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
     lump._decode_bits();
 
     // full dentry+inode pairs
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator pp = lump.get_dfull().begin();
+    for (list<ceph::shared_ptr<fullbit> >::iterator pp = lump.get_dfull().begin();
 	 pp != lump.get_dfull().end();
 	 ++pp) {
       ceph::shared_ptr<fullbit> p = *pp;
@@ -1227,12 +1073,10 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	dn->first = p->dnfirst;
 	assert(dn->last == p->dnlast);
       }
-      if (lump.is_importing())
-	dn->state_set(CDentry::STATE_AUTH);
 
       CInode *in = mds->mdcache->get_inode(p->inode.ino, p->dnlast);
       if (!in) {
-	in = new CInode(mds->mdcache, dn->is_auth(), p->dnfirst, p->dnlast);
+	in = new CInode(mds->mdcache, true, p->dnfirst, p->dnlast);
 	p->update_inode(mds, in);
 	mds->mdcache->add_inode(in);
 	if (!dn->get_linkage()->is_null()) {
@@ -1242,15 +1086,18 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	    ss << "EMetaBlob.replay FIXME had dentry linked to wrong inode " << *dn
 	       << " " << *dn->get_linkage()->get_inode() << " should be " << p->inode.ino;
 	    dout(0) << ss.str() << dendl;
-	    mds->clog->warn(ss);
+	    mds->clog.warn(ss);
 	  }
 	  dir->unlink_inode(dn);
 	}
 	if (unlinked.count(in))
 	  linked.insert(in);
 	dir->link_primary_inode(dn, in);
+	if (p->is_dirty()) in->_mark_dirty(logseg);
 	dout(10) << "EMetaBlob.replay added " << *in << dendl;
       } else {
+	if (in->get_parent_dn() && in->inode.anchored != p->inode.anchored)
+	  in->get_parent_dn()->adjust_nested_anchors((int)p->inode.anchored - (int)in->inode.anchored);
 	p->update_inode(mds, in);
 	if (dn->get_linkage()->get_inode() != in && in->get_parent_dn()) {
 	  dout(10) << "EMetaBlob.replay unlinking " << *in << dendl;
@@ -1265,7 +1112,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	      ss << "EMetaBlob.replay FIXME had dentry linked to wrong inode " << *dn
 		 << " " << *dn->get_linkage()->get_inode() << " should be " << p->inode.ino;
 	      dout(0) << ss.str() << dendl;
-	      mds->clog->warn(ss);
+	      mds->clog.warn(ss);
 	    }
 	    dir->unlink_inode(dn);
 	  }
@@ -1276,22 +1123,17 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	} else {
 	  dout(10) << "EMetaBlob.replay for [" << p->dnfirst << "," << p->dnlast << "] had " << *in << dendl;
 	}
+	if (p->is_dirty()) in->_mark_dirty(logseg);
 	assert(in->first == p->dnfirst ||
 	       (in->is_multiversion() && in->first > p->dnfirst));
       }
-      if (p->is_dirty())
-	in->_mark_dirty(logseg);
       if (p->is_dirty_parent())
 	in->_mark_dirty_parent(logseg, p->is_dirty_pool());
-      if (dn->is_auth())
-	in->state_set(CInode::STATE_AUTH);
-      else
-	in->state_clear(CInode::STATE_AUTH);
       assert(g_conf->mds_kill_journal_replay_at != 2);
     }
 
     // remote dentries
-    for (list<remotebit>::const_iterator p = lump.get_dremote().begin();
+    for (list<remotebit>::iterator p = lump.get_dremote().begin();
 	 p != lump.get_dremote().end();
 	 ++p) {
       CDentry *dn = dir->lookup_exact_snap(p->dn, p->dnlast);
@@ -1319,12 +1161,10 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	dn->first = p->dnfirst;
 	assert(dn->last == p->dnlast);
       }
-      if (lump.is_importing())
-	dn->state_set(CDentry::STATE_AUTH);
     }
 
     // null dentries
-    for (list<nullbit>::const_iterator p = lump.get_dnull().begin();
+    for (list<nullbit>::iterator p = lump.get_dnull().begin();
 	 p != lump.get_dnull().end();
 	 ++p) {
       CDentry *dn = dir->lookup_exact_snap(p->dn, p->dnlast);
@@ -1353,8 +1193,6 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	assert(dn->last == p->dnlast);
       }
       olddir = dir;
-      if (lump.is_importing())
-	dn->state_set(CDentry::STATE_AUTH);
     }
   }
 
@@ -1380,11 +1218,9 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	for (list<frag_t>::iterator p = leaves.begin(); p != leaves.end(); ++p) {
 	  CDir *dir = renamed_diri->get_dirfrag(*p);
 	  assert(dir);
+	  // preserve subtree bound until slave commit
 	  if (dir->get_dir_auth() == CDIR_AUTH_UNDEF)
-	    // preserve subtree bound until slave commit
 	    slaveup->olddirs.insert(dir->inode);
-	  else
-	    dir->state_set(CDir::STATE_AUTH);
 	}
       }
 
@@ -1412,7 +1248,6 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 	}
 	dir = renamed_diri->get_or_open_dirfrag(mds->mdcache, *p);
 	dout(10) << " creating new rename import bound " << *dir << dendl;
-	dir->state_clear(CDir::STATE_AUTH);
 	mds->mdcache->adjust_subtree_auth(dir, CDIR_AUTH_UNDEF, false);
       }
     }
@@ -1446,8 +1281,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
     dout(10) << "EMetaBlob.replay noting " << get_mdstable_name(p->first)
 	     << " transaction " << p->second << dendl;
     MDSTableClient *client = mds->get_table_client(p->first);
-    if (client)
-      client->got_journaled_agree(p->second, logseg);
+    client->got_journaled_agree(p->second, logseg);
   }
 
   // opened ino?
@@ -1476,7 +1310,7 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 
       // [repair bad inotable updates]
       if (inotablev > mds->inotable->get_version()) {
-	mds->clog->error() << "journal replay inotablev mismatch "
+	mds->clog.error() << "journal replay inotablev mismatch "
 	    << mds->inotable->get_version() << " -> " << inotablev << "\n";
 	mds->inotable->force_replay_version(inotablev);
       }
@@ -1488,49 +1322,36 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
     if (mds->sessionmap.version >= sessionmapv) {
       dout(10) << "EMetaBlob.replay sessionmap v " << sessionmapv
 	       << " <= table " << mds->sessionmap.version << dendl;
-    } else if (mds->sessionmap.version + 2 >= sessionmapv) {
-      dout(10) << "EMetaBlob.replay sessionmap v " << sessionmapv
+    } else {
+      dout(10) << "EMetaBlob.replay sessionmap v" << sessionmapv
 	       << " -(1|2) == table " << mds->sessionmap.version
 	       << " prealloc " << preallocated_inos
 	       << " used " << used_preallocated_ino
 	       << dendl;
       Session *session = mds->sessionmap.get_session(client_name);
-      if (session) {
-	dout(20) << " (session prealloc " << session->info.prealloc_inos << ")" << dendl;
-	if (used_preallocated_ino) {
-	  if (session->info.prealloc_inos.empty()) {
-	    // HRM: badness in the journal
-	    mds->clog->warn() << " replayed op " << client_reqs << " on session for "
-			     << client_name << " with empty prealloc_inos\n";
-	  } else {
-	    inodeno_t next = session->next_ino();
-	    inodeno_t i = session->take_ino(used_preallocated_ino);
-	    if (next != i)
-	      mds->clog->warn() << " replayed op " << client_reqs << " used ino " << i
-			       << " but session next is " << next << "\n";
-	    assert(i == used_preallocated_ino);
-	    session->info.used_inos.clear();
-	  }
-	  mds->sessionmap.projected = ++mds->sessionmap.version;
-	}
-	if (!preallocated_inos.empty()) {
-	  session->info.prealloc_inos.insert(preallocated_inos);
-	  mds->sessionmap.projected = ++mds->sessionmap.version;
+      assert(session);
+      dout(20) << " (session prealloc " << session->info.prealloc_inos << ")" << dendl;
+      if (used_preallocated_ino) {
+	if (session->info.prealloc_inos.empty()) {
+	  // HRM: badness in the journal
+	  mds->clog.warn() << " replayed op " << client_reqs << " on session for " << client_name
+			   << " with empty prealloc_inos\n";
+	} else {
+	  inodeno_t next = session->next_ino();
+	  inodeno_t i = session->take_ino(used_preallocated_ino);
+	  if (next != i)
+	    mds->clog.warn() << " replayed op " << client_reqs << " used ino " << i
+			     << " but session next is " << next << "\n";
+	  assert(i == used_preallocated_ino);
+	  session->info.used_inos.clear();
 	}
-      } else {
-	dout(10) << "EMetaBlob.replay no session for " << client_name << dendl;
-	if (used_preallocated_ino)
-	  mds->sessionmap.projected = ++mds->sessionmap.version;
-	if (!preallocated_inos.empty())
-	  mds->sessionmap.projected = ++mds->sessionmap.version;
+	mds->sessionmap.projected = ++mds->sessionmap.version;
+      }
+      if (preallocated_inos.size()) {
+	session->info.prealloc_inos.insert(preallocated_inos);
+	mds->sessionmap.projected = ++mds->sessionmap.version;
       }
       assert(sessionmapv == mds->sessionmap.version);
-    } else {
-      mds->clog->error() << "journal replay sessionmap v " << sessionmapv
-			<< " -(1|2) > table " << mds->sessionmap.version << "\n";
-      assert(g_conf->mds_wipe_sessions);
-      mds->sessionmap.wipe();
-      mds->sessionmap.version = mds->sessionmap.projected = sessionmapv;
     }
   }
 
@@ -1615,7 +1436,6 @@ void ESession::replay(MDS *mds)
     if (open) {
       session = mds->sessionmap.get_or_add_session(client_inst);
       mds->sessionmap.set_state(session, Session::STATE_OPEN);
-      session->set_client_metadata(client_metadata);
       dout(10) << " opened session " << session->info.inst << dendl;
     } else {
       session = mds->sessionmap.get_session(client_inst.name);
@@ -1628,7 +1448,7 @@ void ESession::replay(MDS *mds)
 	  dout(10) << " reset session " << session->info.inst << " (they reconnected)" << dendl;
 	}
       } else {
-	mds->clog->error() << "replayed stray Session close event for " << client_inst
+	mds->clog.error() << "replayed stray Session close event for " << client_inst
 			  << " from time " << stamp << ", ignoring";
       }
     }
@@ -1652,20 +1472,19 @@ void ESession::replay(MDS *mds)
 
 void ESession::encode(bufferlist &bl) const
 {
-  ENCODE_START(4, 3, bl);
+  ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
   ::encode(client_inst, bl);
   ::encode(open, bl);
   ::encode(cmapv, bl);
   ::encode(inos, bl);
   ::encode(inotablev, bl);
-  ::encode(client_metadata, bl);
   ENCODE_FINISH(bl);
 }
 
 void ESession::decode(bufferlist::iterator &bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(4, 3, 3, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(3, 3, 3, bl);
   if (struct_v >= 2)
     ::decode(stamp, bl);
   ::decode(client_inst, bl);
@@ -1673,9 +1492,6 @@ void ESession::decode(bufferlist::iterator &bl)
   ::decode(cmapv, bl);
   ::decode(inos, bl);
   ::decode(inotablev, bl);
-  if (struct_v >= 4) {
-    ::decode(client_metadata, bl);
-  }
   DECODE_FINISH(bl);
 }
 
@@ -1686,12 +1502,6 @@ void ESession::dump(Formatter *f) const
   f->dump_int("client map version", cmapv);
   f->dump_stream("inos") << inos;
   f->dump_int("inotable version", inotablev);
-  f->open_object_section("client_metadata");
-  for (map<string, string>::const_iterator i = client_metadata.begin();
-      i != client_metadata.end(); ++i) {
-    f->dump_string(i->first.c_str(), i->second);
-  }
-  f->close_section();  // client_metadata
 }
 
 void ESession::generate_test_instances(list<ESession*>& ls)
@@ -1826,9 +1636,6 @@ void ETableServer::update_segment()
 void ETableServer::replay(MDS *mds)
 {
   MDSTableServer *server = mds->get_table_server(table);
-  if (!server)
-    return;
-
   if (server->get_version() >= version) {
     dout(10) << "ETableServer.replay " << get_mdstable_name(table)
 	     << " " << get_mdstableserver_opname(op)
@@ -1910,9 +1717,6 @@ void ETableClient::replay(MDS *mds)
 	   << " tid " << tid << dendl;
     
   MDSTableClient *client = mds->get_table_client(table);
-  if (!client)
-    return;
-
   assert(op == TABLESERVER_OP_ACK);
   client->got_journaled_ack(tid);
 }
@@ -2424,19 +2228,18 @@ void ESlaveUpdate::replay(MDS *mds)
 
 void ESubtreeMap::encode(bufferlist& bl) const
 {
-  ENCODE_START(6, 5, bl);
+  ENCODE_START(5, 5, bl);
   ::encode(stamp, bl);
   ::encode(metablob, bl);
   ::encode(subtrees, bl);
   ::encode(ambiguous_subtrees, bl);
   ::encode(expire_pos, bl);
-  ::encode(event_seq, bl);
   ENCODE_FINISH(bl);
 }
  
 void ESubtreeMap::decode(bufferlist::iterator &bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(6, 5, 5, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(5, 5, 5, bl);
   if (struct_v >= 2)
     ::decode(stamp, bl);
   ::decode(metablob, bl);
@@ -2445,8 +2248,6 @@ void ESubtreeMap::decode(bufferlist::iterator &bl)
     ::decode(ambiguous_subtrees, bl);
   if (struct_v >= 3)
     ::decode(expire_pos, bl);
-  if (struct_v >= 6)
-    ::decode(event_seq, bl);
   DECODE_FINISH(bl);
 }
 
@@ -2499,20 +2300,20 @@ void ESubtreeMap::replay(MDS *mds)
 	 ++p) {
       CDir *dir = mds->mdcache->get_dirfrag(p->first);
       if (!dir) {
-	mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			  << " subtree root " << p->first << " not in cache";
 	++errors;
 	continue;
       }
       
       if (!mds->mdcache->is_subtree(dir)) {
-	mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			  << " subtree root " << p->first << " not a subtree in cache";
 	++errors;
 	continue;
       }
       if (dir->get_dir_auth().first != mds->whoami) {
-	mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			  << " subtree root " << p->first
 			  << " is not mine in cache (it's " << dir->get_dir_auth() << ")";
 	++errors;
@@ -2520,20 +2321,20 @@ void ESubtreeMap::replay(MDS *mds)
       }
 
       for (vector<dirfrag_t>::iterator q = p->second.begin(); q != p->second.end(); ++q)
-	mds->mdcache->get_force_dirfrag(*q, true);
+	mds->mdcache->get_force_dirfrag(*q);
 
       set<CDir*> bounds;
       mds->mdcache->get_subtree_bounds(dir, bounds);
       for (vector<dirfrag_t>::iterator q = p->second.begin(); q != p->second.end(); ++q) {
 	CDir *b = mds->mdcache->get_dirfrag(*q);
 	if (!b) {
-	  mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	  mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			    << " subtree " << p->first << " bound " << *q << " not in cache";
 	++errors;
 	  continue;
 	}
 	if (bounds.count(b) == 0) {
-	  mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	  mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			    << " subtree " << p->first << " bound " << *q << " not a bound in cache";
 	++errors;
 	  continue;
@@ -2541,20 +2342,20 @@ void ESubtreeMap::replay(MDS *mds)
 	bounds.erase(b);
       }
       for (set<CDir*>::iterator q = bounds.begin(); q != bounds.end(); ++q) {
-	mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			  << " subtree " << p->first << " has extra bound in cache " << (*q)->dirfrag();
 	++errors;
       }
       
       if (ambiguous_subtrees.count(p->first)) {
 	if (!mds->mdcache->have_ambiguous_import(p->first)) {
-	  mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	  mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			    << " subtree " << p->first << " is ambiguous but is not in our cache";
 	  ++errors;
 	}
       } else {
 	if (mds->mdcache->have_ambiguous_import(p->first)) {
-	  mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	  mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			    << " subtree " << p->first << " is not ambiguous but is in our cache";
 	  ++errors;
 	}
@@ -2568,7 +2369,7 @@ void ESubtreeMap::replay(MDS *mds)
       if (dir->get_dir_auth().first != mds->whoami)
 	continue;
       if (subtrees.count(dir->dirfrag()) == 0) {
-	mds->clog->error() << " replayed ESubtreeMap at " << get_start_off()
+	mds->clog.error() << " replayed ESubtreeMap at " << get_start_off()
 			  << " does not include cache subtree " << dir->dirfrag();
 	++errors;
       }
@@ -2605,9 +2406,7 @@ void ESubtreeMap::replay(MDS *mds)
       mds->mdcache->adjust_bounded_subtree_auth(dir, p->second, mds->get_nodeid());
     }
   }
-
-  mds->mdcache->recalc_auth_bits(true);
-
+  
   mds->mdcache->show_subtrees();
 }
 
@@ -2621,7 +2420,7 @@ void EFragment::replay(MDS *mds)
   dout(10) << "EFragment.replay " << op_name(op) << " " << ino << " " << basefrag << " by " << bits << dendl;
 
   list<CDir*> resultfrags;
-  list<MDSInternalContextBase*> waiters;
+  list<Context*> waiters;
   list<frag_t> old_frags;
 
   // in may be NULL if it wasn't in our cache yet.  if it's a prepare
@@ -2825,20 +2624,7 @@ void EImportStart::replay(MDS *mds)
   // set auth partially to us so we don't trim it
   CDir *dir = mds->mdcache->get_dirfrag(base);
   assert(dir);
-
-  set<CDir*> realbounds;
-  for (vector<dirfrag_t>::iterator p = bounds.begin();
-       p != bounds.end();
-       ++p) {
-    CDir *bd = mds->mdcache->get_dirfrag(*p);
-    assert(bd);
-    if (!bd->is_subtree_root())
-      bd->state_clear(CDir::STATE_AUTH);
-    realbounds.insert(bd);
-  }
-
-  mds->mdcache->adjust_bounded_subtree_auth(dir, realbounds,
-					    pair<int,int>(mds->get_nodeid(), mds->get_nodeid()));
+  mds->mdcache->adjust_bounded_subtree_auth(dir, bounds, pair<int,int>(mds->get_nodeid(), mds->get_nodeid()));
 
   // open client sessions?
   if (mds->sessionmap.version >= cmapv) {
@@ -2996,76 +2782,6 @@ void EResetJournal::replay(MDS *mds)
   CDir *mydir = mds->mdcache->get_myin()->get_or_open_dirfrag(mds->mdcache, frag_t());
   mds->mdcache->adjust_subtree_auth(mydir, mds->whoami);   
 
-  mds->mdcache->recalc_auth_bits(true);
-
   mds->mdcache->show_subtrees();
 }
 
-
-void ENoOp::encode(bufferlist &bl) const
-{
-  ENCODE_START(2, 2, bl);
-  ::encode(pad_size, bl);
-  uint8_t const pad = 0xff;
-  for (unsigned int i = 0; i < pad_size; ++i) {
-    ::encode(pad, bl);
-  }
-  ENCODE_FINISH(bl);
-}
-
-
-void ENoOp::decode(bufferlist::iterator &bl)
-{
-  DECODE_START(2, bl);
-  ::decode(pad_size, bl);
-  if (bl.get_remaining() != pad_size) {
-    // This is spiritually an assertion, but expressing in a way that will let
-    // journal debug tools catch it and recognise a malformed entry.
-    throw buffer::end_of_buffer();
-  } else {
-    bl.advance(pad_size);
-  }
-  DECODE_FINISH(bl);
-}
-
-
-void ENoOp::replay(MDS *mds)
-{
-  dout(4) << "ENoOp::replay, " << pad_size << " bytes skipped in journal" << dendl;
-}
-
-/**
- * If re-formatting an old journal that used absolute log position
- * references as segment sequence numbers, use this function to update
- * it.
- *
- * @param mds
- * MDS instance, just used for logging
- * @param old_to_new
- * Map of old journal segment segment sequence numbers to new journal segment sequence numbers
- *
- * @return
- * True if the event was modified.
- */
-bool EMetaBlob::rewrite_truncate_finish(MDS const *mds,
-    std::map<log_segment_seq_t, log_segment_seq_t> const &old_to_new)
-{
-  bool modified = false;
-  map<inodeno_t, log_segment_seq_t> new_trunc_finish;
-  for (std::map<inodeno_t, log_segment_seq_t>::iterator i = truncate_finish.begin();
-      i != truncate_finish.end(); ++i) {
-    if (old_to_new.count(i->second)) {
-      dout(20) << __func__ << " applying segment seq mapping "
-        << i->second << " -> " << old_to_new.find(i->second)->second << dendl;
-      new_trunc_finish[i->first] = old_to_new.find(i->second)->second;
-      modified = true;
-    } else {
-      dout(20) << __func__ << " no segment seq mapping found for "
-        << i->second << dendl;
-      new_trunc_finish[i->first] = i->second;
-    }
-  }
-  truncate_finish = new_trunc_finish;
-
-  return modified;
-}
diff --git a/src/mds/mds_table_types.h b/src/mds/mds_table_types.h
index dbcd142..c08519a 100644
--- a/src/mds/mds_table_types.h
+++ b/src/mds/mds_table_types.h
@@ -55,7 +55,7 @@ inline const char *get_mdstableserver_opname(int op) {
   case TABLESERVER_OP_SERVER_READY: return "server_ready";
   default: assert(0); return 0;
   }
-}
+};
 
 enum {
   TABLE_OP_CREATE,
@@ -70,6 +70,6 @@ inline const char *get_mdstable_opname(int op) {
   case TABLE_OP_DESTROY: return "destroy";
   default: assert(0); return 0;
   }
-}
+};
 
 #endif
diff --git a/src/mds/mdstypes.cc b/src/mds/mdstypes.cc
index eb1ae77..113cce6 100644
--- a/src/mds/mdstypes.cc
+++ b/src/mds/mdstypes.cc
@@ -85,16 +85,12 @@ ostream& operator<<(ostream &out, const frag_info_t &f)
 
 void nest_info_t::encode(bufferlist &bl) const
 {
-  ENCODE_START(3, 2, bl);
+  ENCODE_START(2, 2, bl);
   ::encode(version, bl);
   ::encode(rbytes, bl);
   ::encode(rfiles, bl);
   ::encode(rsubdirs, bl);
-  {
-    // removed field
-    int64_t ranchors = 0;
-    ::encode(ranchors, bl);
-  }
+  ::encode(ranchors, bl);
   ::encode(rsnaprealms, bl);
   ::encode(rctime, bl);
   ENCODE_FINISH(bl);
@@ -102,15 +98,12 @@ void nest_info_t::encode(bufferlist &bl) const
 
 void nest_info_t::decode(bufferlist::iterator &bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
   ::decode(version, bl);
   ::decode(rbytes, bl);
   ::decode(rfiles, bl);
   ::decode(rsubdirs, bl);
-  {
-    int64_t ranchors;
-    ::decode(ranchors, bl);
-  }
+  ::decode(ranchors, bl);
   ::decode(rsnaprealms, bl);
   ::decode(rctime, bl);
   DECODE_FINISH(bl);
@@ -122,6 +115,7 @@ void nest_info_t::dump(Formatter *f) const
   f->dump_unsigned("rbytes", rbytes);
   f->dump_unsigned("rfiles", rfiles);
   f->dump_unsigned("rsubdirs", rsubdirs);
+  f->dump_unsigned("ranchors", ranchors);
   f->dump_unsigned("rsnaprealms", rsnaprealms);
   f->dump_stream("rctime") << rctime;
 }
@@ -134,6 +128,7 @@ void nest_info_t::generate_test_instances(list<nest_info_t*>& ls)
   ls.back()->rbytes = 2;
   ls.back()->rfiles = 3;
   ls.back()->rsubdirs = 4;
+  ls.back()->ranchors = 5;
   ls.back()->rsnaprealms = 6;
   ls.back()->rctime = utime_t(7, 8);
 }
@@ -147,6 +142,8 @@ ostream& operator<<(ostream &out, const nest_info_t &n)
     out << " rc" << n.rctime;
   if (n.rbytes)
     out << " b" << n.rbytes;
+  if (n.ranchors)
+    out << " a" << n.ranchors;
   if (n.rsnaprealms)
     out << " sr" << n.rsnaprealms;
   if (n.rfiles || n.rsubdirs)
@@ -218,11 +215,7 @@ void inode_t::encode(bufferlist &bl) const
   ::encode(gid, bl);
 
   ::encode(nlink, bl);
-  {
-    // removed field
-    bool anchored = 0;
-    ::encode(anchored, bl);
-  }
+  ::encode(anchored, bl);
 
   ::encode(dir_layout, bl);
   ::encode(layout, bl);
@@ -265,10 +258,7 @@ void inode_t::decode(bufferlist::iterator &p)
   ::decode(gid, p);
 
   ::decode(nlink, p);
-  {
-    bool anchored;
-    ::decode(anchored, p);
-  }
+  ::decode(anchored, p);
 
   if (struct_v >= 4)
     ::decode(dir_layout, p);
@@ -330,6 +320,7 @@ void inode_t::dump(Formatter *f) const
   f->dump_unsigned("uid", uid);
   f->dump_unsigned("gid", gid);
   f->dump_unsigned("nlink", nlink);
+  f->dump_unsigned("anchored", (int)anchored);
 
   f->open_object_section("dir_layout");
   ::dump(dir_layout, f);
@@ -551,18 +542,17 @@ void old_rstat_t::generate_test_instances(list<old_rstat_t*>& ls)
  */
 void session_info_t::encode(bufferlist& bl) const
 {
-  ENCODE_START(4, 3, bl);
+  ENCODE_START(3, 3, bl);
   ::encode(inst, bl);
   ::encode(completed_requests, bl);
   ::encode(prealloc_inos, bl);   // hacky, see below.
   ::encode(used_inos, bl);
-  ::encode(client_metadata, bl);
   ENCODE_FINISH(bl);
 }
 
 void session_info_t::decode(bufferlist::iterator& p)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(4, 2, 2, p);
+  DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, p);
   ::decode(inst, p);
   if (struct_v <= 2) {
     set<ceph_tid_t> s;
@@ -578,9 +568,6 @@ void session_info_t::decode(bufferlist::iterator& p)
   ::decode(used_inos, p);
   prealloc_inos.insert(used_inos);
   used_inos.clear();
-  if (struct_v >= 4) {
-    ::decode(client_metadata, p);
-  }
   DECODE_FINISH(p);
 }
 
@@ -620,11 +607,6 @@ void session_info_t::dump(Formatter *f) const
     f->close_section();
   }
   f->close_section();
-
-  for (map<string, string>::const_iterator i = client_metadata.begin();
-      i != client_metadata.end(); ++i) {
-    f->dump_string(i->first.c_str(), i->second);
-  }
 }
 
 void session_info_t::generate_test_instances(list<session_info_t*>& ls)
diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h
index d7c2665..184cf70 100644
--- a/src/mds/mdstypes.h
+++ b/src/mds/mdstypes.h
@@ -9,11 +9,12 @@
 #include <ostream>
 #include <set>
 #include <map>
+using namespace std;
 
 #include "common/config.h"
 #include "common/Clock.h"
 #include "common/DecayCounter.h"
-#include "MDSContext.h"
+#include "include/Context.h"
 
 #include "include/frag.h"
 #include "include/xlist.h"
@@ -25,7 +26,6 @@
 #include "include/assert.h"
 #include "include/hash_namespace.h"
 
-
 #define CEPH_FS_ONDISK_MAGIC "ceph fs volume v011"
 
 
@@ -37,6 +37,10 @@
 #define MDS_PORT_LOCKER  0x300
 #define MDS_PORT_MIGRATOR 0x400
 
+// FIXME: this should not be hardcoded
+#define MDS_DATA_POOL		0
+#define MDS_METADATA_POOL	1
+
 #define MAX_MDS                   0x100
 #define NUM_STRAY                 10
 
@@ -47,12 +51,8 @@
 #define MDS_INO_CEPH              2
 
 #define MDS_INO_MDSDIR_OFFSET     (1*MAX_MDS)
-#define MDS_INO_STRAY_OFFSET      (6*MAX_MDS)
-
-// Locations for journal data
 #define MDS_INO_LOG_OFFSET        (2*MAX_MDS)
-#define MDS_INO_LOG_BACKUP_OFFSET (3*MAX_MDS)
-#define MDS_INO_LOG_POINTER_OFFSET    (4*MAX_MDS)
+#define MDS_INO_STRAY_OFFSET      (6*MAX_MDS)
 
 #define MDS_INO_SYSTEM_BASE       ((6*MAX_MDS) + (MAX_MDS * NUM_STRAY))
 
@@ -161,7 +161,7 @@ inline bool operator==(const frag_info_t &l, const frag_info_t &r) {
   return memcmp(&l, &r, sizeof(l)) == 0;
 }
 
-std::ostream& operator<<(std::ostream &out, const frag_info_t &f);
+ostream& operator<<(ostream &out, const frag_info_t &f);
 
 
 struct nest_info_t : public scatter_info_t {
@@ -172,9 +172,11 @@ struct nest_info_t : public scatter_info_t {
   int64_t rsubdirs;
   int64_t rsize() const { return rfiles + rsubdirs; }
 
+  int64_t ranchors;  // for dirstat, includes inode's anchored flag.
   int64_t rsnaprealms;
 
-  nest_info_t() : rbytes(0), rfiles(0), rsubdirs(0), rsnaprealms(0) {}
+  nest_info_t() : rbytes(0), rfiles(0), rsubdirs(0),
+		  ranchors(0), rsnaprealms(0) {}
 
   void zero() {
     *this = nest_info_t();
@@ -189,6 +191,7 @@ struct nest_info_t : public scatter_info_t {
     rbytes += fac*other.rbytes;
     rfiles += fac*other.rfiles;
     rsubdirs += fac*other.rsubdirs;
+    ranchors += fac*other.ranchors;
     rsnaprealms += fac*other.rsnaprealms;
   }
 
@@ -199,6 +202,7 @@ struct nest_info_t : public scatter_info_t {
     rbytes += cur.rbytes - acc.rbytes;
     rfiles += cur.rfiles - acc.rfiles;
     rsubdirs += cur.rsubdirs - acc.rsubdirs;
+    ranchors += cur.ranchors - acc.ranchors;
     rsnaprealms += cur.rsnaprealms - acc.rsnaprealms;
   }
 
@@ -213,7 +217,7 @@ inline bool operator==(const nest_info_t &l, const nest_info_t &r) {
   return memcmp(&l, &r, sizeof(l)) == 0;
 }
 
-std::ostream& operator<<(std::ostream &out, const nest_info_t &n);
+ostream& operator<<(ostream &out, const nest_info_t &n);
 
 
 struct vinodeno_t {
@@ -258,7 +262,7 @@ CEPH_HASH_NAMESPACE_END
 
 
 
-inline std::ostream& operator<<(std::ostream &out, const vinodeno_t &vino) {
+inline ostream& operator<<(ostream &out, const vinodeno_t &vino) {
   out << vino.ino;
   if (vino.snapid == CEPH_NOSNAP)
     out << ".head";
@@ -295,7 +299,7 @@ inline void decode(client_writeable_range_t::byte_range_t& range, bufferlist::it
 
 WRITE_CLASS_ENCODER(client_writeable_range_t)
 
-std::ostream& operator<<(std::ostream& out, const client_writeable_range_t& r);
+ostream& operator<<(ostream& out, const client_writeable_range_t& r);
 
 inline bool operator==(const client_writeable_range_t& l,
 		       const client_writeable_range_t& r) {
@@ -322,6 +326,7 @@ struct inode_t {
 
   // nlink
   int32_t    nlink;  
+  bool       anchored;          // auth only?
 
   // file (data access)
   ceph_dir_layout  dir_layout;    // [dir only]
@@ -338,7 +343,7 @@ struct inode_t {
   bufferlist inline_data;
   version_t  inline_version;
 
-  std::map<client_t,client_writeable_range_t> client_ranges;  // client(s) can write to these ranges
+  map<client_t,client_writeable_range_t> client_ranges;  // client(s) can write to these ranges
 
   // dirfrag, recursive accountin
   frag_info_t dirstat;         // protected by my filelock
@@ -353,7 +358,8 @@ struct inode_t {
   version_t backtrace_version;
 
   inode_t() : ino(0), rdev(0),
-	      mode(0), uid(0), gid(0), nlink(0),
+	      mode(0), uid(0), gid(0),
+	      nlink(0), anchored(false),
 	      size(0), max_size_ever(0),
 	      truncate_seq(0), truncate_size(0), truncate_from(0),
 	      truncate_pending(0),
@@ -403,7 +409,7 @@ struct inode_t {
 
   uint64_t get_max_size() const {
     uint64_t max = 0;
-      for (std::map<client_t,client_writeable_range_t>::const_iterator p = client_ranges.begin();
+      for (map<client_t,client_writeable_range_t>::const_iterator p = client_ranges.begin();
 	   p != client_ranges.end();
 	   ++p)
 	if (p->second.range.last > max)
@@ -414,7 +420,7 @@ struct inode_t {
     if (new_max == 0) {
       client_ranges.clear();
     } else {
-      for (std::map<client_t,client_writeable_range_t>::iterator p = client_ranges.begin();
+      for (map<client_t,client_writeable_range_t>::iterator p = client_ranges.begin();
 	   p != client_ranges.end();
 	   ++p)
 	p->second.range.last = new_max;
@@ -422,7 +428,7 @@ struct inode_t {
   }
 
   void trim_client_ranges(snapid_t last) {
-    std::map<client_t, client_writeable_range_t>::iterator p = client_ranges.begin();
+    map<client_t, client_writeable_range_t>::iterator p = client_ranges.begin();
     while (p != client_ranges.end()) {
       if (p->second.follows >= last)
 	client_ranges.erase(p++);
@@ -457,7 +463,7 @@ WRITE_CLASS_ENCODER(inode_t)
 struct old_inode_t {
   snapid_t first;
   inode_t inode;
-  std::map<string,bufferptr> xattrs;
+  map<string,bufferptr> xattrs;
 
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator& bl);
@@ -480,7 +486,7 @@ struct fnode_t {
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<fnode_t*>& ls);
-  fnode_t() : version(0) {}
+  fnode_t() : version(0) {};
 };
 WRITE_CLASS_ENCODER(fnode_t)
 
@@ -496,7 +502,7 @@ struct old_rstat_t {
 };
 WRITE_CLASS_ENCODER(old_rstat_t)
 
-inline std::ostream& operator<<(std::ostream& out, const old_rstat_t& o) {
+inline ostream& operator<<(ostream& out, const old_rstat_t& o) {
   return out << "old_rstat(first " << o.first << " " << o.rstat << " " << o.accounted_rstat << ")";
 }
 
@@ -507,10 +513,9 @@ inline std::ostream& operator<<(std::ostream& out, const old_rstat_t& o) {
 
 struct session_info_t {
   entity_inst_t inst;
-  std::map<ceph_tid_t,inodeno_t> completed_requests;
+  map<ceph_tid_t,inodeno_t> completed_requests;
   interval_set<inodeno_t> prealloc_inos;   // preallocated, ready to use.
   interval_set<inodeno_t> used_inos;       // journaling use
-  std::map<std::string, std::string> client_metadata;
 
   client_t get_client() const { return client_t(inst.name.num()); }
 
@@ -577,7 +582,7 @@ struct dentry_key_t {
   }
 };
 
-inline std::ostream& operator<<(std::ostream& out, const dentry_key_t &k)
+inline ostream& operator<<(ostream& out, const dentry_key_t &k)
 {
   return out << "(" << k.name << "," << k.snapid << ")";
 }
@@ -615,7 +620,7 @@ inline bool operator<(const string_snap_t& l, const string_snap_t& r) {
   return c < 0 || (c == 0 && l.snapid < r.snapid);
 }
 
-inline std::ostream& operator<<(std::ostream& out, const string_snap_t &k)
+inline ostream& operator<<(ostream& out, const string_snap_t &k)
 {
   return out << "(" << k.name << "," << k.snapid << ")";
 }
@@ -658,7 +663,7 @@ struct metareqid_t {
 };
 WRITE_CLASS_ENCODER(metareqid_t)
 
-inline std::ostream& operator<<(std::ostream& out, const metareqid_t& r) {
+inline ostream& operator<<(ostream& out, const metareqid_t& r) {
   return out << r.name << ":" << r.tid;
 }
 
@@ -788,7 +793,7 @@ struct dirfrag_t {
 WRITE_CLASS_ENCODER(dirfrag_t)
 
 
-inline std::ostream& operator<<(std::ostream& out, const dirfrag_t df) {
+inline ostream& operator<<(ostream& out, const dirfrag_t df) {
   out << df.ino;
   if (!df.frag.is_root()) out << "." << df.frag;
   return out;
@@ -933,7 +938,7 @@ inline void decode(dirfrag_load_vec_t& c, const utime_t &t, bufferlist::iterator
   c.decode(t, p);
 }
 
-inline std::ostream& operator<<(std::ostream& out, dirfrag_load_vec_t& dl)
+inline ostream& operator<<(ostream& out, dirfrag_load_vec_t& dl)
 {
   // ugliness!
   utime_t now = ceph_clock_now(g_ceph_context);
@@ -985,7 +990,7 @@ inline void decode(mds_load_t &c, const utime_t &t, bufferlist::iterator &p) {
   c.decode(t, p);
 }
 
-inline std::ostream& operator<<( std::ostream& out, mds_load_t& load )
+inline ostream& operator<<( ostream& out, mds_load_t& load )
 {
   return out << "mdsload<" << load.auth << "/" << load.all
              << ", req " << load.req_rate 
@@ -1074,10 +1079,10 @@ struct mdsco_db_line_prefix {
   MDSCacheObject *object;
   mdsco_db_line_prefix(MDSCacheObject *o) : object(o) {}
 };
-std::ostream& operator<<(std::ostream& out, mdsco_db_line_prefix o);
+ostream& operator<<(ostream& out, mdsco_db_line_prefix o);
 
 // printer
-std::ostream& operator<<(std::ostream& out, MDSCacheObject &o);
+ostream& operator<<(ostream& out, MDSCacheObject &o);
 
 class MDSCacheObjectInfo {
 public:
@@ -1157,8 +1162,8 @@ class MDSCacheObject {
   virtual ~MDSCacheObject() {}
 
   // printing
-  virtual void print(std::ostream& out) = 0;
-  virtual std::ostream& print_db_line_prefix(std::ostream& out) { 
+  virtual void print(ostream& out) = 0;
+  virtual ostream& print_db_line_prefix(ostream& out) { 
     return out << "mdscacheobject(" << this << ") "; 
   }
   
@@ -1191,7 +1196,7 @@ class MDSCacheObject {
 protected:
   __s32      ref;       // reference count
 #ifdef MDS_REF_SET
-  std::map<int,int> ref_map;
+  map<int,int> ref_map;
 #endif
 
  public:
@@ -1208,7 +1213,7 @@ protected:
 #ifdef MDS_REF_SET
   int get_pin_totals() {
     int total = 0;
-    for(std::map<int,int>::iterator i = ref_map.begin(); i != ref_map.end(); ++i) {
+    for(map<int,int>::iterator i = ref_map.begin(); i != ref_map.end(); ++i) {
       total += i->second;
     }
     return total;
@@ -1265,9 +1270,9 @@ protected:
 #endif
   }
 
-  void print_pin_set(std::ostream& out) {
+  void print_pin_set(ostream& out) {
 #ifdef MDS_REF_SET
-    std::map<int, int>::iterator it = ref_map.begin();
+    map<int, int>::iterator it = ref_map.begin();
     while (it != ref_map.end()) {
       out << " " << pin_name(it->first) << "=" << it->second;
       ++it;
@@ -1294,7 +1299,7 @@ protected:
   // replication (across mds cluster)
  protected:
   unsigned		replica_nonce; // [replica] defined on replica
-  std::map<int,unsigned>	replica_map;   // [auth] mds -> nonce
+  map<int,unsigned>	replica_map;   // [auth] mds -> nonce
 
  public:
   bool is_replicated() { return !replica_map.empty(); }
@@ -1327,11 +1332,11 @@ protected:
       put(PIN_REPLICATED);
     replica_map.clear();
   }
-  std::map<int,unsigned>::iterator replicas_begin() { return replica_map.begin(); }
-  std::map<int,unsigned>::iterator replicas_end() { return replica_map.end(); }
-  const std::map<int,unsigned>& get_replicas() { return replica_map; }
-  void list_replicas(std::set<int>& ls) {
-    for (std::map<int,unsigned>::const_iterator p = replica_map.begin();
+  map<int,unsigned>::iterator replicas_begin() { return replica_map.begin(); }
+  map<int,unsigned>::iterator replicas_end() { return replica_map.end(); }
+  const map<int,unsigned>& get_replicas() { return replica_map; }
+  void list_replicas(set<int>& ls) {
+    for (map<int,unsigned>::const_iterator p = replica_map.begin();
 	 p != replica_map.end();
 	 ++p) 
       ls.insert(p->first);
@@ -1344,7 +1349,7 @@ protected:
   // ---------------------------------------------
   // waiting
  protected:
-  multimap<uint64_t, MDSInternalContextBase*>  waiting;
+  multimap<uint64_t, Context*>  waiting;
 
  public:
   bool is_waiter_for(uint64_t mask, uint64_t min=0) {
@@ -1353,7 +1358,7 @@ protected:
       while (min & (min-1))  // if more than one bit is set
 	min &= min-1;        //  clear LSB
     }
-    for (multimap<uint64_t,MDSInternalContextBase*>::iterator p = waiting.lower_bound(min);
+    for (multimap<uint64_t,Context*>::iterator p = waiting.lower_bound(min);
 	 p != waiting.end();
 	 ++p) {
       if (p->first & mask) return true;
@@ -1361,19 +1366,19 @@ protected:
     }
     return false;
   }
-  virtual void add_waiter(uint64_t mask, MDSInternalContextBase *c) {
+  virtual void add_waiter(uint64_t mask, Context *c) {
     if (waiting.empty())
       get(PIN_WAITER);
-    waiting.insert(pair<uint64_t,MDSInternalContextBase*>(mask, c));
+    waiting.insert(pair<uint64_t,Context*>(mask, c));
 //    pdout(10,g_conf->debug_mds) << (mdsco_db_line_prefix(this)) 
 //			       << "add_waiter " << hex << mask << dec << " " << c
 //			       << " on " << *this
 //			       << dendl;
     
   }
-  virtual void take_waiting(uint64_t mask, list<MDSInternalContextBase*>& ls) {
+  virtual void take_waiting(uint64_t mask, list<Context*>& ls) {
     if (waiting.empty()) return;
-    multimap<uint64_t,MDSInternalContextBase*>::iterator it = waiting.begin();
+    multimap<uint64_t,Context*>::iterator it = waiting.begin();
     while (it != waiting.end()) {
       if (it->first & mask) {
 	ls.push_back(it->second);
@@ -1395,7 +1400,7 @@ protected:
       put(PIN_WAITER);
   }
   void finish_waiting(uint64_t mask, int result = 0) {
-    list<MDSInternalContextBase*> finished;
+    list<Context*> finished;
     take_waiting(mask, finished);
     finish_contexts(g_ceph_context, finished, result);
   }
@@ -1409,7 +1414,7 @@ protected:
   virtual void encode_lock_state(int type, bufferlist& bl) { assert(0); }
   virtual void decode_lock_state(int type, bufferlist& bl) { assert(0); }
   virtual void finish_lock_waiters(int type, uint64_t mask, int r=0) { assert(0); }
-  virtual void add_lock_waiter(int type, uint64_t mask, MDSInternalContextBase *c) { assert(0); }
+  virtual void add_lock_waiter(int type, uint64_t mask, Context *c) { assert(0); }
   virtual bool is_lock_waiting(int type, uint64_t mask) { assert(0); return false; }
 
   virtual void clear_dirty_scattered(int type) { assert(0); }
@@ -1425,19 +1430,19 @@ protected:
 
 };
 
-inline std::ostream& operator<<(std::ostream& out, MDSCacheObject &o) {
+inline ostream& operator<<(ostream& out, MDSCacheObject &o) {
   o.print(out);
   return out;
 }
 
-inline std::ostream& operator<<(std::ostream& out, const MDSCacheObjectInfo &info) {
+inline ostream& operator<<(ostream& out, const MDSCacheObjectInfo &info) {
   if (info.ino) return out << info.ino << "." << info.snapid;
   if (info.dname.length()) return out << info.dirfrag << "/" << info.dname
 				      << " snap " << info.snapid;
   return out << info.dirfrag;
 }
 
-inline std::ostream& operator<<(std::ostream& out, mdsco_db_line_prefix o) {
+inline ostream& operator<<(ostream& out, mdsco_db_line_prefix o) {
   o.object->print_db_line_prefix(out);
   return out;
 }
diff --git a/src/mds/snap.h b/src/mds/snap.h
index 98e11a5..0216e62 100644
--- a/src/mds/snap.h
+++ b/src/mds/snap.h
@@ -48,6 +48,7 @@ struct SnapRealm;
 struct CapabilityGroup;
 class CInode;
 class MDCache;
+struct MDRequest;
 
 
 
@@ -88,6 +89,6 @@ struct sr_t {
   void dump(Formatter *f) const;
   static void generate_test_instances(list<sr_t*>& ls);
 };
-WRITE_CLASS_ENCODER(sr_t)
+WRITE_CLASS_ENCODER(sr_t);
 
 #endif
diff --git a/src/messages/MBackfillReserve.h b/src/messages/MBackfillReserve.h
index 0bce15e..d30e285 100644
--- a/src/messages/MBackfillReserve.h
+++ b/src/messages/MBackfillReserve.h
@@ -28,8 +28,8 @@ public:
     GRANT = 1,
     REJECT = 2,
   };
-  uint32_t type;
-  uint32_t priority;
+  int type;
+  unsigned priority;
 
   MBackfillReserve()
     : Message(MSG_OSD_BACKFILL_RESERVE, HEAD_VERSION, COMPAT_VERSION),
@@ -75,7 +75,7 @@ public:
     if (header.version >= 3)
       ::decode(pgid.shard, p);
     else
-      pgid.shard = shard_id_t::NO_SHARD;
+      pgid.shard = ghobject_t::no_shard();
 
   }
 
diff --git a/src/messages/MClientReply.h b/src/messages/MClientReply.h
index b381133..6507fa6 100644
--- a/src/messages/MClientReply.h
+++ b/src/messages/MClientReply.h
@@ -23,6 +23,9 @@
 #include "include/ceph_features.h"
 #include "common/errno.h"
 
+#include <vector>
+using namespace std;
+
 /***
  *
  * MClientReply - container message for MDS reply to a client's MClientRequest
diff --git a/src/messages/MClientRequest.h b/src/messages/MClientRequest.h
index 35dbb17..c436368 100644
--- a/src/messages/MClientRequest.h
+++ b/src/messages/MClientRequest.h
@@ -46,12 +46,8 @@
 // metadata ops.
 
 class MClientRequest : public Message {
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
-
 public:
   struct ceph_mds_request_head head;
-  utime_t stamp;
 
   struct Release {
     mutable ceph_mds_request_release item;
@@ -80,10 +76,8 @@ public:
 
  public:
   // cons
-  MClientRequest()
-    : Message(CEPH_MSG_CLIENT_REQUEST, HEAD_VERSION, COMPAT_VERSION) {}
-  MClientRequest(int op)
-    : Message(CEPH_MSG_CLIENT_REQUEST, HEAD_VERSION, COMPAT_VERSION) {
+  MClientRequest() : Message(CEPH_MSG_CLIENT_REQUEST) {}
+  MClientRequest(int op) : Message(CEPH_MSG_CLIENT_REQUEST) {
     memset(&head, 0, sizeof(head));
     head.op = op;
   }
@@ -116,7 +110,6 @@ public:
   }
 
   // normal fields
-  void set_stamp(utime_t t) { stamp = t; }
   void set_oldest_client_tid(ceph_tid_t t) { head.oldest_client_tid = t; }
   void inc_num_fwd() { head.num_fwd = head.num_fwd + 1; }
   void set_retry_attempt(int a) { head.num_retry = a; }
@@ -131,8 +124,7 @@ public:
   void set_replayed_op() {
     head.flags = head.flags | CEPH_MDS_FLAG_REPLAY;
   }
-
-  utime_t get_stamp() const { return stamp; }
+    
   ceph_tid_t get_oldest_client_tid() const { return head.oldest_client_tid; }
   int get_num_fwd() const { return head.num_fwd; }
   int get_retry_attempt() const { return head.num_retry; }
@@ -153,8 +145,6 @@ public:
     ::decode(path, p);
     ::decode(path2, p);
     ::decode_nohead(head.num_releases, releases, p);
-    if (header.version >= 2)
-      ::decode(stamp, p);
   }
 
   void encode_payload(uint64_t features) {
@@ -163,7 +153,6 @@ public:
     ::encode(path, payload);
     ::encode(path2, payload);
     ::encode_nohead(releases, payload);
-    ::encode(stamp, payload);
   }
 
   const char *get_type_name() const { return "creq"; }
@@ -201,8 +190,6 @@ public:
     out << " " << get_filepath();
     if (!get_filepath2().empty())
       out << " " << get_filepath2();
-    if (stamp != utime_t())
-      out << " " << stamp;
     if (head.num_retry)
       out << " RETRY=" << (int)head.num_retry;
     if (get_flags() & CEPH_MDS_FLAG_REPLAY)
diff --git a/src/messages/MClientSession.h b/src/messages/MClientSession.h
index 0924189..4b98a98 100644
--- a/src/messages/MClientSession.h
+++ b/src/messages/MClientSession.h
@@ -18,28 +18,24 @@
 #include "msg/Message.h"
 
 class MClientSession : public Message {
-  static const int HEAD_VERSION = 2;
-
 public:
   ceph_mds_session_head head;
 
-  std::map<std::string, std::string> client_meta;
-
   int get_op() const { return head.op; }
   version_t get_seq() const { return head.seq; }
   utime_t get_stamp() const { return utime_t(head.stamp); }
   int get_max_caps() const { return head.max_caps; }
   int get_max_leases() const { return head.max_leases; }
 
-  MClientSession() : Message(CEPH_MSG_CLIENT_SESSION, HEAD_VERSION) { }
+  MClientSession() : Message(CEPH_MSG_CLIENT_SESSION) { }
   MClientSession(int o, version_t s=0) : 
-    Message(CEPH_MSG_CLIENT_SESSION, HEAD_VERSION) {
+    Message(CEPH_MSG_CLIENT_SESSION) {
     memset(&head, 0, sizeof(head));
     head.op = o;
     head.seq = s;
   }
   MClientSession(int o, utime_t st) : 
-    Message(CEPH_MSG_CLIENT_SESSION, HEAD_VERSION) {
+    Message(CEPH_MSG_CLIENT_SESSION) {
     memset(&head, 0, sizeof(head));
     head.op = o;
     head.seq = 0;
@@ -62,21 +58,9 @@ public:
   void decode_payload() { 
     bufferlist::iterator p = payload.begin();
     ::decode(head, p);
-    if (header.version >= 2) {
-      ::decode(client_meta, p);
-    }
   }
   void encode_payload(uint64_t features) { 
     ::encode(head, payload);
-    if (client_meta.empty()) {
-      // If we're not trying to send any metadata (always the case if
-      // we are a server) then send older-format message to avoid upsetting
-      // old kernel clients.
-      header.version = 1;
-    } else {
-      ::encode(client_meta, payload);
-    }
-
   }
 };
 
diff --git a/src/messages/MDiscover.h b/src/messages/MDiscover.h
index aab6ccb..296825c 100644
--- a/src/messages/MDiscover.h
+++ b/src/messages/MDiscover.h
@@ -19,7 +19,9 @@
 #include "msg/Message.h"
 #include "include/filepath.h"
 
+#include <vector>
 #include <string>
+using namespace std;
 
 
 class MDiscover : public Message {
@@ -28,6 +30,7 @@ class MDiscover : public Message {
 
   snapid_t        snapid;
   filepath        want;   // ... [/]need/this/stuff
+  inodeno_t       want_ino;
 
   bool want_base_dir;
   bool want_xlocked;
@@ -38,7 +41,8 @@ class MDiscover : public Message {
   snapid_t  get_snapid() { return snapid; }
 
   filepath& get_want() { return want; }
-  const std::string& get_dentry(int n) { return want[n]; }
+  inodeno_t get_want_ino() { return want_ino; }
+  const string& get_dentry(int n) { return want[n]; }
 
   bool wants_base_dir() { return want_base_dir; }
   bool wants_xlocked() { return want_xlocked; }
@@ -50,6 +54,7 @@ class MDiscover : public Message {
 	    frag_t base_frag_,
 	    snapid_t s,
             filepath& want_path_,
+	    inodeno_t want_ino_,
             bool want_base_dir_ = true,
 	    bool discover_xlocks_ = false) :
     Message(MSG_MDS_DISCOVER),
@@ -57,6 +62,7 @@ class MDiscover : public Message {
     base_dir_frag(base_frag_),
     snapid(s),
     want(want_path_),
+    want_ino(want_ino_),
     want_base_dir(want_base_dir_),
     want_xlocked(discover_xlocks_) { }
 private:
@@ -66,7 +72,10 @@ public:
   const char *get_type_name() const { return "Dis"; }
   void print(ostream &out) const {
     out << "discover(" << header.tid << " " << base_ino << "." << base_dir_frag
-	<< " " << want << ")";
+	<< " " << want;
+    if (want_ino)
+      out << want_ino;
+    out << ")";
   }
 
   void decode_payload() {
@@ -75,6 +84,7 @@ public:
     ::decode(base_dir_frag, p);
     ::decode(snapid, p);
     ::decode(want, p);
+    ::decode(want_ino, p);
     ::decode(want_base_dir, p);
     ::decode(want_xlocked, p);
   }
@@ -83,6 +93,7 @@ public:
     ::encode(base_dir_frag, payload);
     ::encode(snapid, payload);
     ::encode(want, payload);
+    ::encode(want_ino, payload);
     ::encode(want_base_dir, payload);
     ::encode(want_xlocked, payload);
   }
diff --git a/src/messages/MDiscoverReply.h b/src/messages/MDiscoverReply.h
index 4c25278..361a517 100644
--- a/src/messages/MDiscoverReply.h
+++ b/src/messages/MDiscoverReply.h
@@ -19,7 +19,9 @@
 #include "msg/Message.h"
 #include "include/filepath.h"
 
+#include <vector>
 #include <string>
+using namespace std;
 
 
 
@@ -35,7 +37,7 @@
  * they are false if there is no returned data, ie the first group is empty.
  *
  * we also return errors:
- *   error_flag_dn(std::string) - the specified dentry dne
+ *   error_flag_dn(string) - the specified dentry dne
  *   error_flag_dir        - the last item wasn't a dir, so we couldn't continue.
  *
  * and sometimes,
@@ -72,12 +74,14 @@ class MDiscoverReply : public Message {
   frag_t base_dir_frag;  
   bool wanted_base_dir;
   bool wanted_xlocked;
+  inodeno_t wanted_ino;
   snapid_t wanted_snapid;
 
   // and the response
   bool flag_error_dn;
+  bool flag_error_ino;
   bool flag_error_dir;
-  std::string error_dentry;   // dentry that was not found (to trigger waiters on asker)
+  string error_dentry;   // dentry that was not found (to trigger waiters on asker)
   bool unsolicited;
 
   __s32 dir_auth_hint;
@@ -93,11 +97,13 @@ class MDiscoverReply : public Message {
   frag_t get_base_dir_frag() { return base_dir_frag; }
   bool get_wanted_base_dir() { return wanted_base_dir; }
   bool get_wanted_xlocked() { return wanted_xlocked; }
+  inodeno_t get_wanted_ino() { return wanted_ino; }
   snapid_t get_wanted_snapid() { return wanted_snapid; }
 
   bool is_flag_error_dn() { return flag_error_dn; }
+  bool is_flag_error_ino() { return flag_error_ino; }
   bool is_flag_error_dir() { return flag_error_dir; }
-  std::string& get_error_dentry() { return error_dentry; }
+  string& get_error_dentry() { return error_dentry; }
 
   int get_starts_with() { return starts_with; }
 
@@ -116,8 +122,10 @@ class MDiscoverReply : public Message {
     base_dir_frag(dis->get_base_dir_frag()),
     wanted_base_dir(dis->wants_base_dir()),
     wanted_xlocked(dis->wants_xlocked()),
+    wanted_ino(dis->get_want_ino()),
     wanted_snapid(dis->get_snapid()),
     flag_error_dn(false),
+    flag_error_ino(false),
     flag_error_dir(false),
     unsolicited(false),
     dir_auth_hint(CDIR_AUTH_UNKNOWN),
@@ -131,8 +139,10 @@ class MDiscoverReply : public Message {
     base_dir_frag(df.frag),
     wanted_base_dir(false),
     wanted_xlocked(false),
+    wanted_ino(inodeno_t()),
     wanted_snapid(CEPH_NOSNAP),
     flag_error_dn(false),
+    flag_error_ino(false),
     flag_error_dir(false),
     unsolicited(false),
     dir_auth_hint(CDIR_AUTH_UNKNOWN),
@@ -153,22 +163,26 @@ public:
   bool is_empty() {
     return trace.length() == 0 &&
       !flag_error_dn &&
+      !flag_error_ino &&
       !flag_error_dir &&
       dir_auth_hint == CDIR_AUTH_UNKNOWN;
   }
 
   //  void set_flag_forward() { flag_forward = true; }
-  void set_flag_error_dn(const std::string& dn) { 
+  void set_flag_error_dn(const string& dn) { 
     flag_error_dn = true; 
     error_dentry = dn; 
   }
+  void set_flag_error_ino() {
+    flag_error_ino = true;
+  }
   void set_flag_error_dir() { 
     flag_error_dir = true; 
   }
   void set_dir_auth_hint(int a) {
     dir_auth_hint = a;
   }
-  void set_error_dentry(const std::string& dn) {
+  void set_error_dentry(const string& dn) {
     error_dentry = dn;
   }
 
@@ -182,6 +196,7 @@ public:
     ::decode(wanted_xlocked, p);
     ::decode(wanted_snapid, p);
     ::decode(flag_error_dn, p);
+    ::decode(flag_error_ino, p);
     ::decode(flag_error_dir, p);
     ::decode(error_dentry, p);
     ::decode(dir_auth_hint, p);
@@ -189,6 +204,8 @@ public:
 
     ::decode(starts_with, p);
     ::decode(trace, p);
+    if (header.version >= 2)
+      ::decode(wanted_ino, p);
   }
   void encode_payload(uint64_t features) {
     ::encode(base_ino, payload);
@@ -197,6 +214,7 @@ public:
     ::encode(wanted_xlocked, payload);
     ::encode(wanted_snapid, payload);
     ::encode(flag_error_dn, payload);
+    ::encode(flag_error_ino, payload);
     ::encode(flag_error_dir, payload);
     ::encode(error_dentry, payload);
     ::encode(dir_auth_hint, payload);
@@ -204,7 +222,9 @@ public:
 
     ::encode(starts_with, payload);
     ::encode(trace, payload);
+    ::encode(wanted_ino, payload);
   }
+
 };
 
 #endif
diff --git a/src/messages/MExportDirNotify.h b/src/messages/MExportDirNotify.h
index bd5c233..745cf95 100644
--- a/src/messages/MExportDirNotify.h
+++ b/src/messages/MExportDirNotify.h
@@ -16,6 +16,8 @@
 #define CEPH_MEXPORTDIRNOTIFY_H
 
 #include "msg/Message.h"
+#include <string>
+using namespace std;
 
 class MExportDirNotify : public Message {
   dirfrag_t base;
diff --git a/src/messages/MExportDirNotifyAck.h b/src/messages/MExportDirNotifyAck.h
index aa24659..7b52c4f 100644
--- a/src/messages/MExportDirNotifyAck.h
+++ b/src/messages/MExportDirNotifyAck.h
@@ -16,6 +16,8 @@
 #define CEPH_MEXPORTDIRNOTIFYACK_H
 
 #include "msg/Message.h"
+#include <string>
+using namespace std;
 
 class MExportDirNotifyAck : public Message {
   dirfrag_t dirfrag;
diff --git a/src/messages/MLogAck.h b/src/messages/MLogAck.h
index 713cee0..8022e7c 100644
--- a/src/messages/MLogAck.h
+++ b/src/messages/MLogAck.h
@@ -21,8 +21,7 @@ class MLogAck : public Message {
 public:
   uuid_d fsid;
   version_t last;
-  std::string channel;
-
+  
   MLogAck() : Message(MSG_LOGACK) {}
   MLogAck(uuid_d& f, version_t l) : Message(MSG_LOGACK), fsid(f), last(l) {}
 private:
@@ -37,14 +36,11 @@ public:
   void encode_payload(uint64_t features) {
     ::encode(fsid, payload);
     ::encode(last, payload);
-    ::encode(channel, payload);
   }
   void decode_payload() {
     bufferlist::iterator p = payload.begin();
     ::decode(fsid, p);
     ::decode(last, p);
-    if (!p.end())
-      ::decode(channel, p);
   }
 };
 
diff --git a/src/messages/MMDSBeacon.h b/src/messages/MMDSBeacon.h
index af62e43..64d442b 100644
--- a/src/messages/MMDSBeacon.h
+++ b/src/messages/MMDSBeacon.h
@@ -23,123 +23,25 @@
 
 #include <uuid/uuid.h>
 
-
-
-/**
- * Unique ID for each type of metric we can send to the mon, so that if the mon
- * knows about the IDs then it can implement special behaviour for certain
- * messages.
- */
-enum mds_metric_t {
-  MDS_HEALTH_NULL = 0,
-  MDS_HEALTH_TRIM,
-  MDS_HEALTH_CLIENT_RECALL,
-  MDS_HEALTH_CLIENT_LATE_RELEASE,
-  MDS_HEALTH_CLIENT_RECALL_MANY,
-  MDS_HEALTH_CLIENT_LATE_RELEASE_MANY
-};
-
-/**
- * This structure is designed to allow some flexibility in how we emit health
- * complaints, such that:
- * - The mon doesn't have to have foreknowledge of all possible metrics: we can
- *   implement new messages in the MDS and have the mon pass them through to the user
- *   (enables us to do complex checks inside the MDS, and allows mon to be older version
- *   than MDS)
- * - The mon has enough information to perform reductions on some types of metric, for
- *   example complaints about the same client from multiple MDSs where we might want
- *   to reduce three "client X is stale on MDS y" metrics into one "client X is stale
- *   on 3 MDSs" message.
- */
-struct MDSHealthMetric
-{
-  mds_metric_t type;
-  health_status_t sev;
-  std::string message;
-  std::map<std::string, std::string> metadata;
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    assert(type != MDS_HEALTH_NULL);
-    ::encode((uint16_t)type, bl);
-    ::encode((uint8_t)sev, bl);
-    ::encode(message, bl);
-    ::encode(metadata, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode((uint16_t&)type, bl);
-    assert(type != MDS_HEALTH_NULL);
-    ::decode((uint8_t&)sev, bl);
-    ::decode(message, bl);
-    ::decode(metadata, bl);
-    DECODE_FINISH(bl);
-  }
-
-  bool operator==(MDSHealthMetric const &other) const
-  {
-    return (type == other.type && sev == other.sev && message == other.message);
-  }
-
-  MDSHealthMetric() : type(MDS_HEALTH_NULL), sev(HEALTH_OK) {}
-  MDSHealthMetric(mds_metric_t type_, health_status_t sev_, std::string const &message_)
-    : type(type_), sev(sev_), message(message_) {}
-};
-WRITE_CLASS_ENCODER(MDSHealthMetric)
-
-
-/**
- * Health metrics send by the MDS to the mon, so that the mon can generate
- * user friendly warnings about undesirable states.
- */
-struct MDSHealth
-{
-  std::list<MDSHealthMetric> metrics;
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(metrics, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(metrics, bl);
-    DECODE_FINISH(bl);
-  }
-
-  bool operator==(MDSHealth const &other) const
-  {
-    return metrics == other.metrics;
-  }
-};
-WRITE_CLASS_ENCODER(MDSHealth)
-
-
 class MMDSBeacon : public PaxosServiceMessage {
 
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 2;
+  static const int HEAD_VERSION = 2;
 
   uuid_d fsid;
   uint64_t global_id;
   string name;
 
-  MDSMap::DaemonState state;
+  __u32 state;
   version_t seq;
   __s32 standby_for_rank;
   string standby_for_name;
 
   CompatSet compat;
 
-  MDSHealth health;
-
  public:
-  MMDSBeacon() : PaxosServiceMessage(MSG_MDS_BEACON, 0, HEAD_VERSION, COMPAT_VERSION) { }
-  MMDSBeacon(const uuid_d &f, uint64_t g, string& n, epoch_t les, MDSMap::DaemonState st, version_t se) : 
-    PaxosServiceMessage(MSG_MDS_BEACON, les, HEAD_VERSION, COMPAT_VERSION),
+  MMDSBeacon() : PaxosServiceMessage(MSG_MDS_BEACON, 0, HEAD_VERSION) { }
+  MMDSBeacon(const uuid_d &f, uint64_t g, string& n, epoch_t les, int st, version_t se) : 
+    PaxosServiceMessage(MSG_MDS_BEACON, les, HEAD_VERSION), 
     fsid(f), global_id(g), name(n), state(st), seq(se),
     standby_for_rank(-1) {
   }
@@ -151,18 +53,15 @@ public:
   uint64_t get_global_id() { return global_id; }
   string& get_name() { return name; }
   epoch_t get_last_epoch_seen() { return version; }
-  MDSMap::DaemonState get_state() { return state; }
+  int get_state() { return state; }
   version_t get_seq() { return seq; }
   const char *get_type_name() const { return "mdsbeacon"; }
   int get_standby_for_rank() { return standby_for_rank; }
   const string& get_standby_for_name() { return standby_for_name; }
 
-  CompatSet const& get_compat() const { return compat; }
+  CompatSet& get_compat() { return compat; }
   void set_compat(const CompatSet& c) { compat = c; }
 
-  MDSHealth const& get_health() const { return health; }
-  void set_health(const MDSHealth &h) { health = h; }
-
   void set_standby_for_rank(int r) { standby_for_rank = r; }
   void set_standby_for_name(string& n) { standby_for_name = n; }
   void set_standby_for_name(const char* c) { standby_for_name.assign(c); }
@@ -176,29 +75,25 @@ public:
     paxos_encode();
     ::encode(fsid, payload);
     ::encode(global_id, payload);
-    ::encode((__u32)state, payload);
+    ::encode(state, payload);
     ::encode(seq, payload);
     ::encode(name, payload);
     ::encode(standby_for_rank, payload);
     ::encode(standby_for_name, payload);
     ::encode(compat, payload);
-    ::encode(health, payload);
   }
   void decode_payload() {
     bufferlist::iterator p = payload.begin();
     paxos_decode(p);
     ::decode(fsid, p);
     ::decode(global_id, p);
-    ::decode((__u32&)state, p);
+    ::decode(state, p);
     ::decode(seq, p);
     ::decode(name, p);
     ::decode(standby_for_rank, p);
     ::decode(standby_for_name, p);
     if (header.version >= 2)
       ::decode(compat, p);
-    if (header.version >= 3) {
-      ::decode(health, p);
-    }
   }
 };
 
diff --git a/src/messages/MMDSCacheRejoin.h b/src/messages/MMDSCacheRejoin.h
index 979fe9a..bbafe64 100644
--- a/src/messages/MMDSCacheRejoin.h
+++ b/src/messages/MMDSCacheRejoin.h
@@ -33,11 +33,15 @@ class MMDSCacheRejoin : public Message {
   static const int OP_WEAK    = 1;  // replica -> auth, i exist, + maybe open files.
   static const int OP_STRONG  = 2;  // replica -> auth, i exist, + open files and lock state.
   static const int OP_ACK     = 3;  // auth -> replica, here is your lock state.
+  static const int OP_MISSING = 5;  // auth -> replica, i am missing these items
+  static const int OP_FULL    = 6;  // replica -> auth, here is the full object.
   static const char *get_opname(int op) {
     switch (op) {
     case OP_WEAK: return "weak";
     case OP_STRONG: return "strong";
     case OP_ACK: return "ack";
+    case OP_MISSING: return "missing";
+    case OP_FULL: return "full";
     default: assert(0); return 0;
     }
   }
diff --git a/src/messages/MMDSFragmentNotify.h b/src/messages/MMDSFragmentNotify.h
index d95751e..46b8837 100644
--- a/src/messages/MMDSFragmentNotify.h
+++ b/src/messages/MMDSFragmentNotify.h
@@ -16,6 +16,8 @@
 #define CEPH_MMDSFRAGMENTNOTIFY_H
 
 #include "msg/Message.h"
+#include <string>
+using namespace std;
 
 class MMDSFragmentNotify : public Message {
   inodeno_t ino;
diff --git a/src/messages/MMDSSlaveRequest.h b/src/messages/MMDSSlaveRequest.h
index f64089e..15f095b 100644
--- a/src/messages/MMDSSlaveRequest.h
+++ b/src/messages/MMDSSlaveRequest.h
@@ -98,7 +98,6 @@ class MMDSSlaveRequest : public Message {
 
   static const unsigned FLAG_NONBLOCK	= 1;
   static const unsigned FLAG_WOULDBLOCK	= 2;
-  static const unsigned FLAG_NOTJOURNALED = 4;
 
   // for locking
   __u16 lock_type;  // lock object type
@@ -115,7 +114,7 @@ class MMDSSlaveRequest : public Message {
   bufferlist inode_export;
   version_t inode_export_v;
   bufferlist srci_replica;
-  utime_t op_stamp;
+  utime_t now;
 
   bufferlist stray;  // stray dir + dentry
 
@@ -134,8 +133,6 @@ public:
   bool is_nonblock() { return (flags & FLAG_NONBLOCK); }
   void mark_error_wouldblock() { flags |= FLAG_WOULDBLOCK; }
   bool is_error_wouldblock() { return (flags & FLAG_WOULDBLOCK); }
-  void mark_not_journaled() { flags |= FLAG_NOTJOURNALED; }
-  bool is_not_journaled() { return (flags & FLAG_NOTJOURNALED); }
 
   void set_lock_type(int t) { lock_type = t; }
 
@@ -161,7 +158,7 @@ public:
     ::encode(srcdnpath, payload);
     ::encode(destdnpath, payload);
     ::encode(witnesses, payload);
-    ::encode(op_stamp, payload);
+    ::encode(now, payload);
     ::encode(inode_export, payload);
     ::encode(inode_export_v, payload);
     ::encode(srci_replica, payload);
@@ -179,7 +176,7 @@ public:
     ::decode(srcdnpath, p);
     ::decode(destdnpath, p);
     ::decode(witnesses, p);
-    ::decode(op_stamp, p);
+    ::decode(now, p);
     ::decode(inode_export, p);
     ::decode(inode_export_v, p);
     ::decode(srci_replica, p);
diff --git a/src/messages/MMonElection.h b/src/messages/MMonElection.h
index a34feac..e3ccbf3 100644
--- a/src/messages/MMonElection.h
+++ b/src/messages/MMonElection.h
@@ -43,7 +43,7 @@ public:
   int32_t op;
   epoch_t epoch;
   bufferlist monmap_bl;
-  set<int32_t> quorum;
+  set<int> quorum;
   uint64_t quorum_features;
   bufferlist sharing_bl;
   /* the following were both used in the next branch for a while
diff --git a/src/messages/MOSDMarkMeDown.h b/src/messages/MOSDMarkMeDown.h
index 6f1133a..1a0475d 100644
--- a/src/messages/MOSDMarkMeDown.h
+++ b/src/messages/MOSDMarkMeDown.h
@@ -19,23 +19,20 @@
 
 class MOSDMarkMeDown : public PaxosServiceMessage {
 
-  static const int COMPAT_VERSION = 1;
-  static const int HEAD_VERSION = 2;
+  static const int HEAD_VERSION = 1;
 
  public:
   uuid_d fsid;
   entity_inst_t target_osd;
   epoch_t epoch;
-  bool request_ack;          // ack requested
+  bool ack;
 
   MOSDMarkMeDown()
-    : PaxosServiceMessage(MSG_OSD_MARK_ME_DOWN, 0,
-			  HEAD_VERSION, COMPAT_VERSION) { }
+    : PaxosServiceMessage(MSG_OSD_MARK_ME_DOWN, 0, HEAD_VERSION) { }
   MOSDMarkMeDown(const uuid_d &fs, const entity_inst_t& f,
-		 epoch_t e, bool request_ack)
-    : PaxosServiceMessage(MSG_OSD_MARK_ME_DOWN, e,
-			  HEAD_VERSION, COMPAT_VERSION),
-      fsid(fs), target_osd(f), epoch(e), request_ack(request_ack) {}
+		 epoch_t e, bool ack)
+    : PaxosServiceMessage(MSG_OSD_MARK_ME_DOWN, e, HEAD_VERSION),
+      fsid(fs), target_osd(f), epoch(e), ack(ack) {}
  private:
   ~MOSDMarkMeDown() {}
 
@@ -49,22 +46,20 @@ public:
     ::decode(fsid, p);
     ::decode(target_osd, p);
     ::decode(epoch, p);
-    ::decode(request_ack, p);
-    if (header.version < 2)
-      request_ack = true;    // assume true for older clients
+    ::decode(ack, p);
   }
   void encode_payload(uint64_t features) {
     paxos_encode();
     ::encode(fsid, payload);
     ::encode(target_osd, payload);
     ::encode(epoch, payload);
-    ::encode(request_ack, payload);
+    ::encode(ack, payload);
   }
 
-  const char *get_type_name() const { return "MOSDMarkMeDown"; }
+  const char *get_type_name() const { return "osd_mark_me_down"; }
   void print(ostream& out) const {
-    out << "MOSDMarkMeDown("
-	<< "request_ack=" << request_ack
+    out << "osd_mark_me_down("
+	<< "ack=" << ack
 	<< ", target_osd=" << target_osd
 	<< ", fsid=" << fsid
 	<< ")";
diff --git a/src/messages/MOSDOp.h b/src/messages/MOSDOp.h
index 581215f..ed0a669 100644
--- a/src/messages/MOSDOp.h
+++ b/src/messages/MOSDOp.h
@@ -58,15 +58,15 @@ public:
   friend class MOSDOpReply;
 
   // read
-  const snapid_t& get_snapid() { return snapid; }
-  void set_snapid(const snapid_t& s) { snapid = s; }
+  snapid_t get_snapid() { return snapid; }
+  void set_snapid(snapid_t s) { snapid = s; }
   // writ
-  const snapid_t& get_snap_seq() const { return snap_seq; }
+  snapid_t get_snap_seq() const { return snap_seq; }
   const vector<snapid_t> &get_snaps() const { return snaps; }
   void set_snaps(const vector<snapid_t>& i) {
     snaps = i;
   }
-  void set_snap_seq(const snapid_t& s) { snap_seq = s; }
+  void set_snap_seq(snapid_t s) { snap_seq = s; }
 
   osd_reqid_t get_reqid() const {
     return osd_reqid_t(get_orig_source(),
@@ -78,22 +78,22 @@ public:
   
   object_t& get_oid() { return oid; }
 
-  const pg_t&     get_pg() const { return pgid; }
+  pg_t     get_pg() const { return pgid; }
 
-  const object_locator_t& get_object_locator() const {
+  object_locator_t get_object_locator() const {
     return oloc;
   }
 
   epoch_t  get_map_epoch() { return osdmap_epoch; }
 
-  const eversion_t& get_version() { return reassert_version; }
+  eversion_t get_version() { return reassert_version; }
   
   utime_t get_mtime() { return mtime; }
 
   MOSDOp()
     : Message(CEPH_MSG_OSD_OP, HEAD_VERSION, COMPAT_VERSION) { }
   MOSDOp(int inc, long tid,
-         object_t& _oid, object_locator_t& _oloc, pg_t& _pgid, epoch_t _osdmap_epoch,
+         object_t& _oid, object_locator_t& _oloc, pg_t _pgid, epoch_t _osdmap_epoch,
 	 int _flags)
     : Message(CEPH_MSG_OSD_OP, HEAD_VERSION, COMPAT_VERSION),
       client_inc(inc),
diff --git a/src/messages/MOSDOpReply.h b/src/messages/MOSDOpReply.h
index b2d5155..91c50e7 100644
--- a/src/messages/MOSDOpReply.h
+++ b/src/messages/MOSDOpReply.h
@@ -48,16 +48,16 @@ class MOSDOpReply : public Message {
   request_redirect_t redirect;
 
 public:
-  const object_t& get_oid() const { return oid; }
-  const pg_t&     get_pg() const { return pgid; }
+  object_t get_oid() const { return oid; }
+  pg_t     get_pg() const { return pgid; }
   int      get_flags() const { return flags; }
 
   bool     is_ondisk() const { return get_flags() & CEPH_OSD_FLAG_ONDISK; }
   bool     is_onnvram() const { return get_flags() & CEPH_OSD_FLAG_ONNVRAM; }
   
   int get_result() const { return result; }
-  const eversion_t& get_replay_version() const { return replay_version; }
-  const version_t& get_user_version() const { return user_version; }
+  eversion_t get_replay_version() const { return replay_version; }
+  version_t get_user_version() const { return user_version; }
   
   void set_result(int r) { result = r; }
 
@@ -84,7 +84,7 @@ public:
   }
 
   /* Don't fill in replay_version for non-write ops */
-  void set_enoent_reply_versions(const eversion_t& v, const version_t& uv) {
+  void set_enoent_reply_versions(eversion_t v, version_t uv) {
     user_version = uv;
     bad_replay_version = v;
   }
@@ -126,13 +126,14 @@ public:
   MOSDOpReply()
     : Message(CEPH_MSG_OSD_OPREPLY, HEAD_VERSION, COMPAT_VERSION) { }
   MOSDOpReply(MOSDOp *req, int r, epoch_t e, int acktype, bool ignore_out_data)
-    : Message(CEPH_MSG_OSD_OPREPLY, HEAD_VERSION, COMPAT_VERSION),
-      oid(req->oid), pgid(req->pgid), ops(req->ops) {
-
+    : Message(CEPH_MSG_OSD_OPREPLY, HEAD_VERSION, COMPAT_VERSION) {
     set_tid(req->get_tid());
+    ops = req->ops;
     result = r;
     flags =
       (req->flags & ~(CEPH_OSD_FLAG_ONDISK|CEPH_OSD_FLAG_ONNVRAM|CEPH_OSD_FLAG_ACK)) | acktype;
+    oid = req->oid;
+    pgid = req->pgid;
     osdmap_epoch = e;
     user_version = 0;
     retry_attempt = req->get_retry_attempt();
diff --git a/src/messages/MOSDPGBackfill.h b/src/messages/MOSDPGBackfill.h
index d4b65e8..e9ec661 100644
--- a/src/messages/MOSDPGBackfill.h
+++ b/src/messages/MOSDPGBackfill.h
@@ -67,7 +67,7 @@ public:
     if (header.version >= 3)
       ::decode(pgid.shard, p);
     else
-      pgid.shard = shard_id_t::NO_SHARD;
+      pgid.shard = ghobject_t::no_shard();
   }
 
   virtual void encode_payload(uint64_t features) {
diff --git a/src/messages/MOSDPGLog.h b/src/messages/MOSDPGLog.h
index 741b141..44cd989 100644
--- a/src/messages/MOSDPGLog.h
+++ b/src/messages/MOSDPGLog.h
@@ -92,8 +92,8 @@ public:
       ::decode(to, p);
       ::decode(from, p);
     } else {
-      to = shard_id_t::NO_SHARD;
-      from = shard_id_t::NO_SHARD;
+      to = ghobject_t::NO_SHARD;
+      from = ghobject_t::NO_SHARD;
     }
   }
 };
diff --git a/src/messages/MOSDPGPull.h b/src/messages/MOSDPGPull.h
index 51ea56a..9107232 100644
--- a/src/messages/MOSDPGPull.h
+++ b/src/messages/MOSDPGPull.h
@@ -58,8 +58,8 @@ public:
       ::decode(pgid.shard, p);
       ::decode(from, p);
     } else {
-      pgid.shard = shard_id_t::NO_SHARD;
-      from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
+      pgid.shard = ghobject_t::NO_SHARD;
+      from = pg_shard_t(get_source().num(), ghobject_t::NO_SHARD);
     }
   }
 
diff --git a/src/messages/MOSDPGPush.h b/src/messages/MOSDPGPush.h
index 83bb184..46a8f1b 100644
--- a/src/messages/MOSDPGPush.h
+++ b/src/messages/MOSDPGPush.h
@@ -58,8 +58,8 @@ public:
       ::decode(pgid.shard, p);
       ::decode(from, p);
     } else {
-      pgid.shard = shard_id_t::NO_SHARD;
-      from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
+      pgid.shard = ghobject_t::NO_SHARD;
+      from = pg_shard_t(get_source().num(), ghobject_t::NO_SHARD);
     }
   }
 
diff --git a/src/messages/MOSDPGPushReply.h b/src/messages/MOSDPGPushReply.h
index 793709e..1875235 100644
--- a/src/messages/MOSDPGPushReply.h
+++ b/src/messages/MOSDPGPushReply.h
@@ -58,8 +58,8 @@ public:
       ::decode(pgid.shard, p);
       ::decode(from, p);
     } else {
-      pgid.shard = shard_id_t::NO_SHARD;
-      from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
+      pgid.shard = ghobject_t::NO_SHARD;
+      from = pg_shard_t(get_source().num(), ghobject_t::NO_SHARD);
     }
   }
 
diff --git a/src/messages/MOSDPGQuery.h b/src/messages/MOSDPGQuery.h
index 81a55c2..c2c6f69 100644
--- a/src/messages/MOSDPGQuery.h
+++ b/src/messages/MOSDPGQuery.h
@@ -78,7 +78,7 @@ public:
     ::decode(epoch, p);
     vector<pair<pg_t, pg_query_t> > _pg_list;
     ::decode(_pg_list, p);
-    vector<shard_id_t> _shard_list(_pg_list.size(), shard_id_t::NO_SHARD);
+    vector<shard_id_t> _shard_list(_pg_list.size(), ghobject_t::no_shard());
     if (header.version >= 3) {
       _shard_list.clear();
       ::decode(_shard_list, p);
diff --git a/src/messages/MOSDPGRemove.h b/src/messages/MOSDPGRemove.h
index ca021fd..b55b5d2 100644
--- a/src/messages/MOSDPGRemove.h
+++ b/src/messages/MOSDPGRemove.h
@@ -65,7 +65,7 @@ public:
     vector<pg_t> _pg_list;
     ::decode(_pg_list, p);
 
-    vector<shard_id_t> _shard_list(_pg_list.size(), shard_id_t::NO_SHARD);
+    vector<shard_id_t> _shard_list(_pg_list.size(), ghobject_t::no_shard());
     if (header.version >= 2) {
       _shard_list.clear();
       ::decode(_shard_list, p);
diff --git a/src/messages/MOSDPGScan.h b/src/messages/MOSDPGScan.h
index f5fe18e..2c0c1ad 100644
--- a/src/messages/MOSDPGScan.h
+++ b/src/messages/MOSDPGScan.h
@@ -63,8 +63,8 @@ public:
     } else {
       from = pg_shard_t(
 	get_source().num(),
-	shard_id_t::NO_SHARD);
-      pgid.shard = shard_id_t::NO_SHARD;
+	ghobject_t::NO_SHARD);
+      pgid.shard = ghobject_t::NO_SHARD;
     }
   }
 
diff --git a/src/messages/MOSDPGTemp.h b/src/messages/MOSDPGTemp.h
index 627ed71..fe5908ce 100644
--- a/src/messages/MOSDPGTemp.h
+++ b/src/messages/MOSDPGTemp.h
@@ -22,7 +22,7 @@
 class MOSDPGTemp : public PaxosServiceMessage {
  public:
   epoch_t map_epoch;
-  map<pg_t, vector<int32_t> > pg_temp;
+  map<pg_t, vector<int> > pg_temp;
 
   MOSDPGTemp(epoch_t e) : PaxosServiceMessage(MSG_OSD_PGTEMP, e), map_epoch(e) { }
   MOSDPGTemp() : PaxosServiceMessage(MSG_OSD_PGTEMP, 0) {}
diff --git a/src/messages/MOSDPGTrim.h b/src/messages/MOSDPGTrim.h
index 29c7444..12a0e7c 100644
--- a/src/messages/MOSDPGTrim.h
+++ b/src/messages/MOSDPGTrim.h
@@ -56,7 +56,7 @@ public:
     if (header.version >= 2)
       ::decode(pgid.shard, p);
     else
-      pgid.shard = shard_id_t::NO_SHARD;
+      pgid.shard = ghobject_t::no_shard();
   }
 };
 
diff --git a/src/messages/MOSDRepScrub.h b/src/messages/MOSDRepScrub.h
index 52a03b8..3f67021 100644
--- a/src/messages/MOSDRepScrub.h
+++ b/src/messages/MOSDRepScrub.h
@@ -112,7 +112,7 @@ public:
     if (header.version >= 5) {
       ::decode(pgid.shard, p);
     } else {
-      pgid.shard = shard_id_t::NO_SHARD;
+      pgid.shard = ghobject_t::no_shard();
     }
   }
 };
diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h
index 1918283..7b40c0a 100644
--- a/src/messages/MOSDSubOp.h
+++ b/src/messages/MOSDSubOp.h
@@ -171,8 +171,8 @@ public:
     } else {
       from = pg_shard_t(
 	get_source().num(),
-	shard_id_t::NO_SHARD);
-      pgid.shard = shard_id_t::NO_SHARD;
+	ghobject_t::NO_SHARD);
+      pgid.shard = ghobject_t::NO_SHARD;
     }
     if (header.version >= 10) {
       ::decode(updated_hit_set_history, p);
diff --git a/src/messages/MOSDSubOpReply.h b/src/messages/MOSDSubOpReply.h
index 7b441ae..270629f 100644
--- a/src/messages/MOSDSubOpReply.h
+++ b/src/messages/MOSDSubOpReply.h
@@ -81,8 +81,8 @@ public:
     } else {
       from = pg_shard_t(
 	get_source().num(),
-	shard_id_t::NO_SHARD);
-      pgid.shard = shard_id_t::NO_SHARD;
+	ghobject_t::NO_SHARD);
+      pgid.shard = ghobject_t::NO_SHARD;
     }
   }
   virtual void encode_payload(uint64_t features) {
diff --git a/src/messages/MPGStats.h b/src/messages/MPGStats.h
index 21ad1ed..8c40c4e 100644
--- a/src/messages/MPGStats.h
+++ b/src/messages/MPGStats.h
@@ -35,7 +35,7 @@ public:
   {}
 
 private:
-  ~MPGStats() {}
+  ~MPGStats() {};
 
 public:
   const char *get_type_name() const { return "pg_stats"; }
diff --git a/src/messages/MRecoveryReserve.h b/src/messages/MRecoveryReserve.h
index 29f1732..2a88bfd 100644
--- a/src/messages/MRecoveryReserve.h
+++ b/src/messages/MRecoveryReserve.h
@@ -69,7 +69,7 @@ public:
     if (header.version >= 2)
       ::decode(pgid.shard, p);
     else
-      pgid.shard = shard_id_t::NO_SHARD;
+      pgid.shard = ghobject_t::no_shard();
   }
 
   void encode_payload(uint64_t features) {
diff --git a/src/messages/MWatchNotify.h b/src/messages/MWatchNotify.h
index bc6bacb..66632f7 100644
--- a/src/messages/MWatchNotify.h
+++ b/src/messages/MWatchNotify.h
@@ -20,27 +20,16 @@
 
 
 class MWatchNotify : public Message {
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
-
  public:
-  uint64_t cookie;     ///< client unique id for this watch or notify
-  uint64_t ver;        ///< unused
-  uint64_t notify_id;  ///< osd unique id for a notify notification
-  uint8_t opcode;      ///< always WATCH_NOTIFY
-  bufferlist bl;       ///< notify payload (osd->client)
-  int32_t return_code; ///< notify result (osd->client)
+  uint64_t cookie;
+  uint64_t ver;
+  uint64_t notify_id;
+  uint8_t opcode;
+  bufferlist bl;
 
-  MWatchNotify()
-    : Message(CEPH_MSG_WATCH_NOTIFY, HEAD_VERSION, COMPAT_VERSION) { }
-  MWatchNotify(uint64_t c, uint64_t v, uint64_t i, uint8_t o, bufferlist b)
-    : Message(CEPH_MSG_WATCH_NOTIFY, HEAD_VERSION, COMPAT_VERSION),
-      cookie(c),
-      ver(v),
-      notify_id(i),
-      opcode(o),
-      bl(b),
-      return_code(0) { }
+  MWatchNotify() : Message(CEPH_MSG_WATCH_NOTIFY) { }
+  MWatchNotify(uint64_t c, uint64_t v, uint64_t i, uint8_t o, bufferlist b) : Message(CEPH_MSG_WATCH_NOTIFY),
+					cookie(c), ver(v), notify_id(i), opcode(o), bl(b) { }
 private:
   ~MWatchNotify() {}
 
@@ -55,10 +44,6 @@ public:
     ::decode(notify_id, p);
     if (msg_ver >= 1)
       ::decode(bl, p);
-    if (header.version >= 2)
-      ::decode(return_code, p);
-    else
-      return_code = 0;
   }
   void encode_payload(uint64_t features) {
     uint8_t msg_ver = 1;
@@ -68,12 +53,11 @@ public:
     ::encode(ver, payload);
     ::encode(notify_id, payload);
     ::encode(bl, payload);
-    ::encode(return_code, payload);
   }
 
   const char *get_type_name() const { return "watch-notify"; }
   void print(ostream& out) const {
-    out << "watch-notify(c=" << cookie << " v=" << ver << " i=" << notify_id << " opcode=" << (int)opcode << " r = " << return_code << ")";
+    out << "watch-notify(c=" << cookie << " v=" << ver << " i=" << notify_id << " opcode=" << (int)opcode << ")";
   }
 };
 
diff --git a/src/mkcephfs.in b/src/mkcephfs.in
new file mode 100644
index 0000000..2838568
--- /dev/null
+++ b/src/mkcephfs.in
@@ -0,0 +1,564 @@
+#!/bin/sh
+#
+# mkcephfs
+#
+# This tool is designed to be flexible.  There are two ways to go:
+#
+# The easy way does everything for you using ssh keys.  This does not
+# scale well for large clusters.
+#
+#  master$ mkcephfs -a -c /etc/ceph/ceph.conf
+#
+# Alternatively, you can use whatever file distribution and/or job
+# launching you want.
+#
+#  master$ mkdir /tmp/foo
+#  master$ mkcephfs -d /tmp/foo -c /etc/ceph/ceph.conf --prepare-monmap
+#
+#     ...copy/share /tmp/foo with all osd and mds nodes at /tmp/bar...
+#
+#  osd$ mkcephfs -d /tmp/bar --init-local-daemons osd
+#  mds$ mkcephfs -d /tmp/bar --init-local-daemons mds
+#
+#     ...gather contents of /tmp/bar's back into /tmp/foo...
+#
+#  master$ mkcephfs -d /tmp/foo --prepare-mon
+#
+#     ...distribute /tmp/foo to each monitor node...
+#
+#  mon$ mkcephfs -d /tmp/foo --init-local-daemons mon
+#  
+#  master$ cp /tmp/foo/keyring.admin /etc/ceph/keyring  # don't forget!
+#
+# In the degenerate case (one node), this is just
+#
+#  mkdir /tmp/foo
+#  mkcephfs -c ceph.conf -d /tmp/foo --prepare-monmap
+#  mkcephfs -d /tmp/foo --init-local-daemons mds
+#  mkcephfs -d /tmp/foo --init-local-daemons osd
+#  mkcephfs -d /tmp/foo --prepare-mon
+#  mkcephfs -d /tmp/foo --init-local-daemons mon
+#  cp /tmp/foo/keyring.admin /etc/ceph/keyring
+#
+# or simply
+#
+#  mkcephfs -a -c ceph.conf
+#
+
+set -e
+
+trap 'echo "\nWARNING: mkcephfs is now deprecated in favour of ceph-deploy. Please see: \n http://github.com/ceph/ceph-deploy"' EXIT
+
+# if we start up as ./mkcephfs, assume everything else is in the
+# current directory too.
+if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
+    BINDIR=.
+    LIBDIR=.
+    ETCDIR=.
+else
+    BINDIR=@bindir@
+    LIBDIR=@libdir@/ceph
+    ETCDIR=@sysconfdir@/ceph
+fi
+
+usage_exit() {
+    echo "usage: $0 -a -c ceph.conf [-k adminkeyring] [--mkfs]"
+    echo "   to generate a new ceph cluster on all nodes; for advanced usage see man page"
+    echo "   ** be careful, this WILL clobber old data; check your ceph.conf carefully **"
+    exit
+}
+
+. $LIBDIR/ceph_common.sh
+
+
+allhosts=0
+mkfs=0
+preparemonmap=0
+prepareosdfs=""
+initdaemon=""
+initdaemons=""
+preparemon=0
+
+numosd=
+useosdmap=
+usecrushmapsrc=
+usecrushmap=
+verbose=0
+adminkeyring=""
+conf=""
+dir=""
+moreargs=""
+auto_action=0
+manual_action=0
+nocopyconf=0
+
+while [ $# -ge 1 ]; do
+case $1 in
+    -v )
+	    verbose=1;
+	    ;;
+    --dir | -d)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    dir=$1
+	    ;;
+    --allhosts | -a)
+	    allhosts=1
+            auto_action=1
+	    ;;
+    --prepare-monmap)
+	    preparemonmap=1
+            manual_action=1
+	    ;;
+    --prepare-osdfs)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    prepareosdfs=$1
+            manual_action=1
+	    ;;
+    --init-daemon)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    initdaemon=$1
+            manual_action=1
+	    ;;
+    --init-local-daemons)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    initlocaldaemons=$1
+            manual_action=1
+	    ;;
+    --prepare-mon)
+	    preparemon=1
+            manual_action=1
+	    ;;
+    --mkbtrfs | --mkfs)
+	    mkfs=1
+	    ;;
+    --no-copy-conf)
+	    nocopyconf=1
+	    ;;
+    --conf | -c)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    conf=$1
+	    ;;
+    --numosd)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    numosd=$1
+	    moreargs="$moreargs --numosd $1"
+	    ;;
+    --osdmap)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    useosdmap=$1
+	    moreargs="$moreargs --osdmap $1"
+	    ;;
+    --crushmapsrc)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    usecrushmapsrc=$1
+	    moreargs="$moreargs --crushmapsrc $1"
+	    ;;
+    --crushmap)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    usecrushmap=$1
+	    moreargs="$moreargs --crushmap $1"
+	    ;;
+    -k)
+	    [ -z "$2" ] && usage_exit
+	    shift
+	    adminkeyring=$1
+	    ;;
+    *)
+	    echo unrecognized option \'$1\'
+	    usage_exit
+	    ;;
+esac
+shift
+done
+
+
+[ -z "$conf" ] && [ -n "$dir" ] && conf="$dir/conf"
+
+if [ $manual_action -eq 0 ]; then
+    if [ $auto_action -eq 0 ]; then
+        echo "You must specify an action. See man page."
+        usage_exit
+    fi
+elif [ $auto_action -eq 1 ]; then
+    echo "The -a option cannot be combined with other subcommands; see man page."
+    usage_exit
+fi
+
+### prepare-monmap ###
+
+if [ $preparemonmap -eq 1 ]; then
+    echo "preparing monmap in $dir/monmap"
+
+    # first, make a list of monitors
+    mons=`$CCONF -c $conf -l mon | egrep -v '^mon$' | sort`
+    args=""
+
+    type="mon"
+    for name in $mons; do
+	id=`echo $name | cut -c 4- | sed 's/^\\.//'`
+	get_conf addr "" "mon addr"
+	if [ -z "$addr" ]; then
+	    echo "$0: monitor $name has no address defined." 1>&2
+	    exit 1
+	fi
+	args=$args" --add $id $addr"
+    done
+
+    if [ -z "$args" ]; then
+	echo "$0: no monitors found in config, aborting." 1>&2
+	exit 1
+    fi
+
+    # build monmap
+    monmap="$dir/monmap"
+    echo $BINDIR/monmaptool --create --clobber $args --print $monmap || exit 1
+    $BINDIR/monmaptool --create --clobber $args --print $monmap || exit 1
+        
+    # copy conf
+    cp $conf $dir/conf
+
+    exit 0
+fi
+
+
+### init-daemon ###
+
+if [ -n "$initdaemon" ]; then
+    name=$initdaemon
+    type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
+    id=`echo $name | cut -c 4- | sed 's/^\\.//'`
+    name="$type.$id"
+    
+    # create /var/run/ceph (or wherever pid file and/or admin socket live)
+    get_conf pid_file "/var/run/ceph/$name.pid" "pid file"
+    rundir=`dirname $pid_file`
+    if [ "$rundir" != "." ] && [ ! -d "$rundir" ]; then
+	mkdir -p $rundir
+    fi
+    get_conf asok_file "/var/run/ceph/$name.asok" "admin socket"
+    rundir=`dirname $asok_file`
+    if [ "$rundir" != "." ] && [ ! -d "$rundir" ]; then
+	mkdir -p $rundir
+    fi
+
+    if [ $type = "osd" ]; then
+	$BINDIR/ceph-osd -c $conf --monmap $dir/monmap -i $id --mkfs --mkkey
+
+	get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"
+	get_conf osd_keyring "$osd_data/keyring" "keyring"
+	$BINDIR/ceph-authtool -p -n $name $osd_keyring > $dir/key.$name
+    fi
+    
+    if [ $type = "mds" ]; then
+	get_conf mds_data "/var/lib/ceph/mds/ceph-$id" "mds data"
+	get_conf mds_keyring "$mds_data/keyring" "keyring"
+	test -d $mds_data || mkdir -p $mds_data
+	echo "creating private key for $name keyring $mds_keyring"
+	$BINDIR/ceph-authtool --create-keyring --gen-key -n $name $mds_keyring
+	$BINDIR/ceph-authtool -p -n $name $mds_keyring > $dir/key.$name
+    fi
+
+    if [ $type = "mon" ]; then
+	get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
+	mkdir -p "$mon_data"
+	if ! find "$mon_data" -maxdepth 0 -empty | read foo; then
+	    echo "ERROR: $name mon_data directory $mon_data is not empty."
+	    echo "       Please make sure that it is empty before running mkcephfs."
+	    exit 1
+	fi
+	$BINDIR/ceph-mon -c $conf --mkfs -i $id --monmap $dir/monmap --osdmap $dir/osdmap -k $dir/keyring.mon
+    fi
+    
+    exit 0
+fi
+
+
+## init-local-daemons ##
+
+if [ -n "$initlocaldaemons" ]; then
+    get_name_list "$initlocaldaemons"
+    for name in $what; do
+	type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
+	id=`echo $name | cut -c 4- | sed 's/^\\.//'`
+	num=$id
+	name="$type.$id"
+
+	check_host || continue
+
+	$0 -d $dir --init-daemon $name	
+    done
+    exit 0
+fi
+
+
+### prepare-osdfs ###
+
+if [ -n "$prepareosdfs" ]; then
+    name=$prepareosdfs
+    type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
+    id=`echo $name | cut -c 4- | sed 's/^\\.//'`
+    name="$type.$id"
+
+    get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"
+    get_conf osd_journal "$osd_data/journal" "osd journal"
+    get_conf fs_path "$osd_data" "fs path"  # mount point defaults so osd data
+    get_conf fs_devs "" "devs"
+    get_conf fs_type "" "osd mkfs type"
+
+    if [ -z "$fs_devs" ]; then
+	# try to fallback to old keys
+        get_conf tmp_btrfs_devs "" "btrfs devs"
+        if [ -n "$tmp_btrfs_devs" ]; then
+            fs_devs="$tmp_btrfs_devs"
+        else
+            echo "no devs defined for $name"
+            exit 1
+        fi
+    fi
+    if [ -z "$fs_type" ]; then
+        # try to fallback to to old keys
+        get_conf tmp_devs "" "btrfs devs"
+        if [ -n "$tmp_devs" ]; then
+            fs_type="btrfs"
+        else
+            echo No filesystem type defined!
+            exit 1
+        fi
+    fi
+
+    first_dev=`echo $fs_devs | cut '-d ' -f 1`
+    get_conf fs_opt "" "osd mount options $fs_type"
+    if [ -z "$fs_opt" ]; then
+        if [ "$fs_type" = "btrfs" ]; then
+            #try to fallback to old keys
+            get_conf fs_opt "" "btrfs options"
+        fi
+        if [ -z "$fs_opt" ]; then
+	    if [ "$fs_type" = "xfs" ]; then
+		fs_opt="rw,noatime,inode64"
+	    else
+                #fallback to use at least rw,noatime
+		fs_opt="rw,noatime"
+	    fi
+        fi
+    fi
+    [ -n "$fs_opt" ] && fs_opt="-o $fs_opt"
+    get_conf osd_user "root" "user"
+    
+    if [ -n "$osd_journal" ] && echo "fs_devs" | grep -q -w "$osd_journal" ; then
+        echo "ERROR: osd journal device ($osd_journal) also used by devs ($fs_devs)"
+	exit 1
+    fi
+    
+    test -d $osd_data || mkdir -p $osd_data
+
+    if [ -n "$osd_journal" ]; then
+	test -d $osd_journal || mkdir -p `dirname $osd_journal`
+    fi
+
+    umount $fs_path || true
+    for f in $fs_devs ; do
+	umount $f || true
+    done
+
+    get_conf mkfs_opt "" "osd mkfs options $fs_type"
+    if [ "$fs_type" = "xfs" ] && [ -z "$mkfs_opt" ]; then
+        echo Xfs filesystem found add missing -f mkfs option!
+	mkfs_opt="-f"
+    fi
+    modprobe $fs_type || true
+    mkfs.$fs_type $mkfs_opt $fs_devs
+    mount -t $fs_type $fs_opt $first_dev $fs_path
+    chown $osd_user $fs_path
+    chmod +w $fs_path
+
+    exit 0
+fi
+
+
+
+### prepare-mon ###
+
+if [ $preparemon -eq 1 ]; then
+
+    if [ -n "$useosdmap" ]; then
+	echo "Using osdmap $useosdmap"
+	cp $useosdmap $dir/osdmap
+    else
+	echo "Building generic osdmap from $conf"
+	$BINDIR/osdmaptool --create-from-conf $dir/osdmap -c $conf
+    fi
+
+    # import crush map?
+    get_conf crushmapsrc "" "crush map src" mon global
+    if [ -n "$crushmapsrc" ]; then
+	echo Compiling crush map from $crushmapsrc to $dir/crushmap
+	$BINDIR/crushtool -c $crushmapsrc -o $dir/crushmap
+    fi
+    get_conf crushmap "$usecrushmap" "crush map" mon global
+    if [ -n "$crushmap" ]; then
+	echo Importing crush map from $crushmap
+	$BINDIR/osdmaptool --import-crush $crushmap $dir/osdmap
+    fi
+
+    # admin keyring
+    echo Generating admin key at $dir/keyring.admin
+    $BINDIR/ceph-authtool --create-keyring --gen-key -n client.admin $dir/keyring.admin
+
+    # mon keyring
+    echo Building initial monitor keyring
+    cp $dir/keyring.admin $dir/keyring.mon
+    $BINDIR/ceph-authtool -n client.admin --set-uid=0 \
+	--cap mon 'allow *' \
+	--cap osd 'allow *' \
+	--cap mds 'allow' \
+	$dir/keyring.mon
+
+    $BINDIR/ceph-authtool --gen-key -n mon. $dir/keyring.mon --cap mon 'allow *'
+
+    for k in $dir/key.*
+    do
+	kname=`echo $k | sed 's/.*key\.//'`
+	ktype=`echo $kname | cut -c 1-3`
+	kid=`echo $kname | cut -c 4- | sed 's/^\\.//'`
+	kname="$ktype.$kid"
+	secret=`cat $k`
+	if [ "$ktype" = "osd" ]; then
+	    $BINDIR/ceph-authtool -n $kname --add-key $secret $dir/keyring.mon \
+		--cap mon 'allow rwx' \
+		--cap osd 'allow *'
+	fi
+	if [ "$ktype" = "mds" ]; then
+	    $BINDIR/ceph-authtool -n $kname --add-key $secret $dir/keyring.mon \
+		--cap mon "allow rwx" \
+		--cap osd 'allow *' \
+		--cap mds 'allow'
+	fi
+    done
+
+    exit 0
+fi
+
+
+
+
+
+### do everything via ssh ###
+
+if [ $allhosts -eq 1 ]; then
+
+    verify_conf
+
+    # do it all
+    if [ -z "$dir" ]; then
+	dir=`mktemp -d -t mkcephfs.XXXXXXXXXX` || exit 1
+	echo "temp dir is $dir"
+	trap "rm -rf $dir ; exit" INT TERM EXIT
+    fi
+
+    $0 --prepare-monmap -d $dir -c $conf
+
+    # osd, mds
+    get_name_list "osd mds"
+    for name in $what; do
+	type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
+	id=`echo $name | cut -c 4- | sed 's/^\\.//'`
+	num=$id
+	name="$type.$id"
+
+	check_host || continue
+
+	if [ -n "$ssh" ]; then
+	    rdir=`mktemp -u /tmp/mkfs.ceph.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` || exit 1
+	    echo pushing conf and monmap to $host:$rdir
+	    do_cmd "mkdir -p $rdir"
+	    scp -q $dir/conf $host:$rdir
+	    scp -q $dir/monmap $host:$rdir
+
+	    if [ $nocopyconf -eq 0 ]; then
+		# also put conf at /etc/ceph/ceph.conf
+		scp -q $dir/conf $host:/etc/ceph/ceph.conf
+	    fi
+	else
+	    rdir=$dir
+
+	    if [ $nocopyconf -eq 0 ]; then
+		# also put conf at /etc/ceph/ceph.conf
+		cp $dir/conf /etc/ceph/ceph.conf
+	    fi
+	fi
+	
+	if [ $mkfs -eq 1 ] && [ "$type" = "osd" ]; then
+	    do_root_cmd "$0 -d $rdir --prepare-osdfs $name"
+	fi
+
+	do_root_cmd "$0 -d $rdir --init-daemon $name"
+
+	# collect the key
+	if [ -n "$ssh" ]; then
+	    echo collecting $name key
+	    scp -q $host:$rdir/key.$name $dir
+	    #cleanup no longer need rdir
+	    do_cmd "rm -r $rdir"
+	fi
+    done
+
+    # prepare monitors
+    $0 -d $dir --prepare-mon $moreargs
+    
+    # mons
+    get_name_list "mon"
+    for name in $what; do
+	type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
+	id=`echo $name | cut -c 4- | sed 's/^\\.//'`
+	num=$id
+	name="$type.$id"
+
+	check_host || continue
+	
+	if [ -n "$ssh" ]; then
+	    rdir=`mktemp -u /tmp/mkfs.ceph.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` || exit 1
+	    echo pushing everything to $host
+	    ssh $host mkdir -p $rdir
+	    scp -q $dir/* $host:$rdir
+
+	    if [ $nocopyconf -eq 0 ]; then
+		# also put conf at /etc/ceph/ceph.conf
+		scp -q $dir/conf $host:/etc/ceph/ceph.conf
+	    fi
+	else
+	    rdir=$dir
+
+	    if [ $nocopyconf -eq 0 ]; then
+	        # also put conf at /etc/ceph/ceph.conf
+		cp $dir/conf /etc/ceph/ceph.conf
+	    fi
+	fi
+	
+	do_root_cmd "$0 -d $rdir --init-daemon $name"
+
+	if [ -n "$ssh" ]; then
+	    #cleanup no longer need rdir
+	    do_cmd "rm -r $rdir"
+	fi
+    done
+
+    # admin keyring
+    if [ -z "$adminkeyring" ]; then
+	get_conf adminkeyring "/etc/ceph/keyring" "keyring" global
+    fi
+    echo "placing client.admin keyring in $adminkeyring"
+    cp $dir/keyring.admin $adminkeyring
+
+    exit 0
+fi
+
diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc
index 2050a44..359c2e1 100644
--- a/src/mon/AuthMonitor.cc
+++ b/src/mon/AuthMonitor.cc
@@ -23,16 +23,17 @@
 #include "messages/MAuthReply.h"
 #include "messages/MMonGlobalID.h"
 
+#include "include/str_list.h"
 #include "common/Timer.h"
-#include "common/config.h"
-#include "common/cmdparse.h"
 
 #include "auth/AuthServiceHandler.h"
 #include "auth/KeyRing.h"
 
 #include "osd/osd_types.h"
 
+#include "common/config.h"
 #include "include/assert.h"
+#include "common/cmdparse.h"
 #include "include/str_list.h"
 
 #define dout_subsys ceph_subsys_mon
@@ -189,8 +190,8 @@ void AuthMonitor::update_from_paxos(bool *need_bootstrap)
     mon->key_server.set_ver(keys_ver);
 
     if (keys_ver == 1 && mon->is_keyring_required()) {
-      MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-      t->erase("mkfs", "keyring");
+      MonitorDBStore::Transaction t;
+      t.erase("mkfs", "keyring");
       mon->store->apply_transaction(t);
     }
   }
@@ -227,7 +228,7 @@ void AuthMonitor::create_pending()
   dout(10) << "create_pending v " << (get_last_committed() + 1) << dendl;
 }
 
-void AuthMonitor::encode_pending(MonitorDBStore::TransactionRef t)
+void AuthMonitor::encode_pending(MonitorDBStore::Transaction *t)
 {
   dout(10) << __func__ << " v " << (get_last_committed() + 1) << dendl;
 
@@ -244,7 +245,7 @@ void AuthMonitor::encode_pending(MonitorDBStore::TransactionRef t)
   put_last_committed(t, version);
 }
 
-void AuthMonitor::encode_full(MonitorDBStore::TransactionRef t)
+void AuthMonitor::encode_full(MonitorDBStore::Transaction *t)
 {
   version_t version = mon->key_server.get_ver();
   // do not stash full version 0 as it will never be removed nor read
@@ -859,11 +860,6 @@ bool AuthMonitor::prepare_command(MMonCommand *m)
 	     !entity_name.empty()) {
     // auth get-or-create <name> [mon osdcapa osd osdcapb ...]
 
-    if (!valid_caps(caps_vec, &ss)) {
-      err = -EINVAL;
-      goto done;
-    }
-
     // do we have it?
     EntityAuth entity_auth;
     if (mon->key_server.get_auth(entity, entity_auth)) {
@@ -957,11 +953,6 @@ bool AuthMonitor::prepare_command(MMonCommand *m)
       goto done;
     }
 
-    if (!valid_caps(caps_vec, &ss)) {
-      err = -EINVAL;
-      goto done;
-    }
-
     map<string,bufferlist> newcaps;
     for (vector<string>::iterator it = caps_vec.begin();
 	 it != caps_vec.end(); it += 2)
diff --git a/src/mon/AuthMonitor.h b/src/mon/AuthMonitor.h
index d66de24..130616a 100644
--- a/src/mon/AuthMonitor.h
+++ b/src/mon/AuthMonitor.h
@@ -124,20 +124,6 @@ private:
     pending_auth.push_back(inc);
   }
 
-  /* validate mon caps ; don't care about caps for other services as
-   * we don't know how to validate them */
-  bool valid_caps(const vector<string>& caps, ostream *out) {
-    for (vector<string>::const_iterator p = caps.begin();
-         p != caps.end(); p += 2) {
-      if (!p->empty() && *p != "mon")
-        continue;
-      MonCap tmp;
-      if (!tmp.parse(*(p+1), out))
-        return false;
-    }
-    return true;
-  }
-
   void on_active();
   bool should_propose(double& delay);
   void create_initial();
@@ -147,8 +133,8 @@ private:
   void increase_max_global_id();
   uint64_t assign_global_id(MAuth *m, bool should_increase_max);
   // propose pending update to peers
-  void encode_pending(MonitorDBStore::TransactionRef t);
-  virtual void encode_full(MonitorDBStore::TransactionRef t);
+  void encode_pending(MonitorDBStore::Transaction *t);
+  virtual void encode_full(MonitorDBStore::Transaction *t);
   version_t get_trim_to();
 
   bool preprocess_query(PaxosServiceMessage *m);  // true if processed.
@@ -176,6 +162,6 @@ private:
 };
 
 
-WRITE_CLASS_ENCODER_FEATURES(AuthMonitor::Incremental)
+WRITE_CLASS_ENCODER_FEATURES(AuthMonitor::Incremental);
 
 #endif
diff --git a/src/mon/ConfigKeyService.cc b/src/mon/ConfigKeyService.cc
index 9b1eacb..d2e204d 100644
--- a/src/mon/ConfigKeyService.cc
+++ b/src/mon/ConfigKeyService.cc
@@ -48,9 +48,10 @@ int ConfigKeyService::store_get(string key, bufferlist &bl)
 void ConfigKeyService::store_put(string key, bufferlist &bl, Context *cb)
 {
   bufferlist proposal_bl;
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  t->put(STORE_PREFIX, key, bl);
-  t->encode(proposal_bl);
+  MonitorDBStore::Transaction t;
+  t.put(STORE_PREFIX, key, bl);
+  t.encode(proposal_bl);
+
   paxos->propose_new_value(proposal_bl, cb);
 }
 
diff --git a/src/mon/DataHealthService.cc b/src/mon/DataHealthService.cc
index ef1e0e5..a2bbb1f 100644
--- a/src/mon/DataHealthService.cc
+++ b/src/mon/DataHealthService.cc
@@ -94,7 +94,7 @@ void DataHealthService::get_health(
       health_detail = "low disk space";
     }
 
-    if (stats.store_stats.bytes_total >= g_conf->mon_data_size_warn) {
+    if (stats.store_stats.bytes_total >= g_conf->mon_leveldb_size_warn) {
       if (health_status > HEALTH_WARN)
         health_status = HEALTH_WARN;
       if (!health_detail.empty())
@@ -102,7 +102,7 @@ void DataHealthService::get_health(
       stringstream ss;
       ss << "store is getting too big! "
          << prettybyte_t(stats.store_stats.bytes_total)
-         << " >= " << prettybyte_t(g_conf->mon_data_size_warn);
+         << " >= " << prettybyte_t(g_conf->mon_leveldb_size_warn);
       health_detail.append(ss.str());
     }
 
@@ -221,7 +221,7 @@ void DataHealthService::service_tick()
   // already low available disk space.
   if (ours.fs_stats.avail_percent <= g_conf->mon_data_avail_warn) {
     if (ours.fs_stats.avail_percent != last_warned_percent)
-      mon->clog->warn()
+      mon->clog.warn()
 	<< "reached concerning levels of available space on local monitor storage"
 	<< " (" << ours.fs_stats.avail_percent << "% free)\n";
     last_warned_percent = ours.fs_stats.avail_percent;
diff --git a/src/mon/Elector.cc b/src/mon/Elector.cc
index 1ea2179..2ee10f7 100644
--- a/src/mon/Elector.cc
+++ b/src/mon/Elector.cc
@@ -52,8 +52,8 @@ void Elector::bump_epoch(epoch_t e)
   dout(10) << "bump_epoch " << epoch << " to " << e << dendl;
   assert(epoch <= e);
   epoch = e;
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  t->put(Monitor::MONITOR_NAME, "election_epoch", epoch);
+  MonitorDBStore::Transaction t;
+  t.put(Monitor::MONITOR_NAME, "election_epoch", epoch);
   mon->store->apply_transaction(t);
 
   mon->join_election();
@@ -365,7 +365,7 @@ void Elector::nak_old_peer(MMonElection *m)
 					   mon->monmap);
     reply->quorum_features = required_features;
     mon->features.encode(reply->sharing_bl);
-    m->get_connection()->send_message(reply);
+    mon->messenger->send_message(reply, m->get_connection());
   }
   m->put();
 }
@@ -429,9 +429,9 @@ void Elector::dispatch(Message *m)
 		<< ", taking it"
 		<< dendl;
 	mon->monmap->decode(em->monmap_bl);
-        MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-        t->put("monmap", mon->monmap->epoch, em->monmap_bl);
-        t->put("monmap", "last_committed", mon->monmap->epoch);
+        MonitorDBStore::Transaction t;
+        t.put("monmap", mon->monmap->epoch, em->monmap_bl);
+        t.put("monmap", "last_committed", mon->monmap->epoch);
         mon->store->apply_transaction(t);
 	//mon->monmon()->paxos->stash_latest(mon->monmap->epoch, em->monmap_bl);
 	cancel_timer();
diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc
index 05bb73f..cc98554 100644
--- a/src/mon/LogMonitor.cc
+++ b/src/mon/LogMonitor.cc
@@ -30,7 +30,6 @@
 #include "common/config.h"
 #include "include/assert.h"
 #include "include/str_list.h"
-#include "include/str_map.h"
 #include "include/compat.h"
 
 #define dout_subsys ceph_subsys_mon
@@ -85,7 +84,7 @@ void LogMonitor::create_initial()
   LogEntry e;
   memset(&e.who, 0, sizeof(e.who));
   e.stamp = ceph_clock_now(g_ceph_context);
-  e.prio = CLOG_INFO;
+  e.type = CLOG_INFO;
   std::stringstream ss;
   ss << "mkfs " << mon->monmap->get_fsid();
   e.msg = ss.str();
@@ -103,7 +102,7 @@ void LogMonitor::update_from_paxos(bool *need_bootstrap)
     return;
   assert(version >= summary.version);
 
-  map<string,bufferlist> channel_blog;
+  bufferlist blog;
 
   version_t latest_full = get_version_latest_full();
   dout(10) << __func__ << " latest full " << latest_full << dendl;
@@ -132,43 +131,17 @@ void LogMonitor::update_from_paxos(bool *need_bootstrap)
       le.decode(p);
       dout(7) << "update_from_paxos applying incremental log " << summary.version+1 <<  " " << le << dendl;
 
-      string channel = le.channel;
-      if (channel.empty()) // keep retrocompatibility
-        channel = CLOG_CHANNEL_CLUSTER;
-
-      if (channels.do_log_to_syslog(channel)) {
-        string level = channels.get_level(channel);
-        string facility = channels.get_facility(facility);
-        if (level.empty() || facility.empty()) {
-          derr << __func__ << " unable to log to syslog -- level or facility"
-               << " not defined (level: " << level << ", facility: "
-               << facility << ")" << dendl;
-          continue;
-        }
-        le.log_to_syslog(channels.get_level(channel),
-                         channels.get_facility(channel));
+      if (g_conf->mon_cluster_log_to_syslog) {
+	le.log_to_syslog(g_conf->mon_cluster_log_to_syslog_level,
+			 g_conf->mon_cluster_log_to_syslog_facility);
       }
-
-      string log_file = channels.get_log_file(channel);
-      dout(20) << __func__ << " logging for channel '" << channel
-               << "' to file '" << log_file << "'" << dendl;
-
-      if (!log_file.empty()) {
-        string log_file_level = channels.get_log_file_level(channel);
-        if (log_file_level.empty()) {
-          dout(1) << __func__ << " warning: log file level not defined for"
-                  << " channel '" << channel << "' yet a log file is --"
-                  << " will assume lowest level possible" << dendl;
-        }
-
-	int min = string_to_syslog_level(log_file_level);
-	int l = clog_type_to_syslog_level(le.prio);
+      if (g_conf->mon_cluster_log_file.length()) {
+	int min = string_to_syslog_level(g_conf->mon_cluster_log_file_level);
+	int l = clog_type_to_syslog_level(le.type);
 	if (l <= min) {
 	  stringstream ss;
 	  ss << le << "\n";
-          // init entry if DNE
-          bufferlist &blog = channel_blog[channel];
-          blog.append(ss.str());
+	  blog.append(ss.str());
 	}
       }
 
@@ -178,30 +151,17 @@ void LogMonitor::update_from_paxos(bool *need_bootstrap)
     summary.version++;
   }
 
-  dout(15) << __func__ << " logging for "
-           << channel_blog.size() << " channels" << dendl;
-  for(map<string,bufferlist>::iterator p = channel_blog.begin();
-      p != channel_blog.end(); ++p) {
-    if (!p->second.length()) {
-      dout(15) << __func__ << " channel '" << p->first
-               << "': nothing to log" << dendl;
-      continue;
-    }
-
-    dout(15) << __func__ << " channel '" << p->first
-             << "' logging " << p->second.length() << " bytes" << dendl;
-    string log_file = channels.get_log_file(p->first);
 
-    int fd = ::open(log_file.c_str(), O_WRONLY|O_APPEND|O_CREAT, 0600);
+  if (blog.length()) {
+    int fd = ::open(g_conf->mon_cluster_log_file.c_str(), O_WRONLY|O_APPEND|O_CREAT, 0600);
     if (fd < 0) {
       int err = -errno;
-      dout(1) << "unable to write to '" << log_file << "' for channel '"
-              << p->first << "': " << cpp_strerror(err) << dendl;
+      dout(1) << "unable to write to " << g_conf->mon_cluster_log_file << ": " << cpp_strerror(err) << dendl;
     } else {
-      int err = p->second.write_fd(fd);
+      int err = blog.write_fd(fd);
       if (err < 0) {
-	dout(1) << "error writing to '" << log_file << "' for channel '"
-                << p->first << ": " << cpp_strerror(err) << dendl;
+	dout(1) << "error writing to " << g_conf->mon_cluster_log_file
+		<< ": " << cpp_strerror(err) << dendl;
       }
       VOID_TEMP_FAILURE_RETRY(::close(fd));
     }
@@ -210,7 +170,7 @@ void LogMonitor::update_from_paxos(bool *need_bootstrap)
   check_subs();
 }
 
-void LogMonitor::store_do_append(MonitorDBStore::TransactionRef t,
+void LogMonitor::store_do_append(MonitorDBStore::Transaction *t,
     const string& key, bufferlist& bl)
 {
   bufferlist existing_bl;
@@ -228,7 +188,7 @@ void LogMonitor::create_pending()
   dout(10) << "create_pending v " << (get_last_committed() + 1) << dendl;
 }
 
-void LogMonitor::encode_pending(MonitorDBStore::TransactionRef t)
+void LogMonitor::encode_pending(MonitorDBStore::Transaction *t)
 {
   version_t version = get_last_committed() + 1;
   bufferlist bl;
@@ -243,7 +203,7 @@ void LogMonitor::encode_pending(MonitorDBStore::TransactionRef t)
   put_last_committed(t, version);
 }
 
-void LogMonitor::encode_full(MonitorDBStore::TransactionRef t)
+void LogMonitor::encode_full(MonitorDBStore::Transaction *t)
 {
   dout(10) << __func__ << " log v " << summary.version << dendl;
   assert(get_last_committed() == summary.version);
@@ -418,7 +378,7 @@ bool LogMonitor::prepare_command(MMonCommand *m)
     le.who = m->get_orig_source_inst();
     le.stamp = m->get_recv_stamp();
     le.seq = 0;
-    le.prio = CLOG_INFO;
+    le.type = CLOG_INFO;
     le.msg = str_join(logtext, " ");
     pending_summary.add(le);
     pending_log.insert(pair<utime_t,LogEntry>(le.stamp, le));
@@ -496,7 +456,7 @@ void LogMonitor::check_sub(Subscription *s)
 	  << " with " << mlog->entries.size() << " entries"
 	  << " (version " << mlog->version << ")" << dendl;
   
-  s->session->con->send_message(mlog);
+  mon->messenger->send_message(mlog, s->session->inst);
   if (s->onetime)
     mon->session_map.remove_sub(s);
   else
@@ -523,7 +483,7 @@ bool LogMonitor::_create_sub_summary(MLog *mlog, int level)
   list<LogEntry>::reverse_iterator it = summary.tail.rbegin();
   for (; it != summary.tail.rend(); ++it) {
     LogEntry e = *it;
-    if (e.prio < level)
+    if (e.type < level)
       continue;
 
     mlog->entries.push_back(e);
@@ -552,7 +512,7 @@ void LogMonitor::_create_sub_incremental(MLog *mlog, int level, version_t sv)
 	     << " to first_committed " << get_first_committed() << dendl;
     LogEntry le;
     le.stamp = ceph_clock_now(NULL);
-    le.prio = CLOG_WARN;
+    le.type = CLOG_WARN;
     ostringstream ss;
     ss << "skipped log messages from " << sv << " to " << get_first_committed();
     le.msg = ss.str();
@@ -573,9 +533,9 @@ void LogMonitor::_create_sub_incremental(MLog *mlog, int level, version_t sv)
       LogEntry le;
       le.decode(p);
 
-      if (le.prio < level) {
+      if (le.type < level) {
 	dout(20) << __func__ << " requested " << level 
-		 << " entry " << le.prio << dendl;
+		 << " entry " << le.type << dendl;
 	continue;
       }
 
@@ -588,93 +548,3 @@ void LogMonitor::_create_sub_incremental(MLog *mlog, int level, version_t sv)
 	   << mlog->entries.size() << " entries)" << dendl;
 }
 
-void LogMonitor::update_log_channels()
-{
-  ostringstream oss;
-
-  channels.clear();
-
-  int r = get_conf_str_map_helper(g_conf->mon_cluster_log_to_syslog,
-                                  oss, &channels.log_to_syslog,
-                                  CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'mon_cluster_log_to_syslog'" << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->mon_cluster_log_to_syslog_level,
-                              oss, &channels.syslog_level,
-                              CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'mon_cluster_log_to_syslog_level'"
-         << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->mon_cluster_log_to_syslog_facility,
-                              oss, &channels.syslog_facility,
-                              CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'mon_cluster_log_to_syslog_facility'"
-         << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->mon_cluster_log_file, oss,
-                              &channels.log_file,
-                              CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'mon_cluster_log_file'" << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->mon_cluster_log_file_level, oss,
-                              &channels.log_file_level,
-                              CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'mon_cluster_log_file_level'"
-         << dendl;
-    return;
-  }
-
-  channels.expand_channel_meta();
-}
-
-void LogMonitor::log_channel_info::expand_channel_meta(map<string,string> &m)
-{
-  generic_dout(20) << __func__ << " expand map: " << m << dendl;
-  for (map<string,string>::iterator p = m.begin(); p != m.end(); ++p) {
-    m[p->first] = expand_channel_meta(p->second, p->first);
-  }
-  generic_dout(20) << __func__ << " expanded map: " << m << dendl;
-}
-
-string LogMonitor::log_channel_info::expand_channel_meta(
-    const string &input,
-    const string &change_to)
-{
-  size_t pos = string::npos;
-  string s(input);
-  while ((pos = s.find(LOG_META_CHANNEL)) != string::npos) {
-    string tmp = s.substr(0, pos) + change_to;
-    if (pos+LOG_META_CHANNEL.length() < s.length())
-      tmp += s.substr(pos+LOG_META_CHANNEL.length());
-    s = tmp;
-  }
-  generic_dout(20) << __func__ << " from '" << input
-                   << "' to '" << s << "'" << dendl;
-
-  return s;
-}
-
-void LogMonitor::handle_conf_change(const struct md_config_t *conf,
-                                    const std::set<std::string> &changed)
-{
-  if (changed.count("mon_cluster_log_to_syslog") ||
-      changed.count("mon_cluster_log_to_syslog_level") ||
-      changed.count("mon_cluster_log_to_syslog_facility") ||
-      changed.count("mon_cluster_log_file") ||
-      changed.count("mon_cluster_log_file_level")) {
-    update_log_channels();
-  }
-}
diff --git a/src/mon/LogMonitor.h b/src/mon/LogMonitor.h
index cf87013..439ea4d 100644
--- a/src/mon/LogMonitor.h
+++ b/src/mon/LogMonitor.h
@@ -28,94 +28,17 @@ using namespace std;
 
 class MMonCommand;
 
-static const string LOG_META_CHANNEL = "$channel";
-
-class LogMonitor : public PaxosService,
-                   public md_config_obs_t {
+class LogMonitor : public PaxosService {
 private:
   multimap<utime_t,LogEntry> pending_log;
   LogSummary pending_summary, summary;
 
-  struct log_channel_info {
-
-    map<string,string> log_to_syslog;
-    map<string,string> syslog_level;
-    map<string,string> syslog_facility;
-    map<string,string> log_file;
-    map<string,string> expanded_log_file;
-    map<string,string> log_file_level;
-
-    void clear() {
-      log_to_syslog.clear();
-      syslog_level.clear();
-      syslog_facility.clear();
-      log_file.clear();
-      expanded_log_file.clear();
-      log_file_level.clear();
-    }
-
-    /** expands $channel meta variable on all maps *EXCEPT* log_file
-     *
-     * We won't expand the log_file map meta variables here because we
-     * intend to do that selectively during get_log_file()
-     */
-    void expand_channel_meta() {
-      expand_channel_meta(log_to_syslog);
-      expand_channel_meta(syslog_level);
-      expand_channel_meta(syslog_facility);
-      expand_channel_meta(log_file_level);
-    }
-    void expand_channel_meta(map<string,string> &m);
-    string expand_channel_meta(const string &input,
-                               const string &change_to);
-
-    bool do_log_to_syslog(const string &channel) {
-      return (get_str_map_key(log_to_syslog, channel,
-                              &CLOG_CHANNEL_DEFAULT) == "true");
-    }
-
-    string get_facility(const string &channel) {
-      return get_str_map_key(syslog_facility, channel,
-                             &CLOG_CHANNEL_DEFAULT);
-    }
-
-    string get_level(const string &channel) {
-      return get_str_map_key(syslog_level, channel,
-                             &CLOG_CHANNEL_DEFAULT);
-    }
-
-    string get_log_file(const string &channel) {
-      generic_dout(25) << __func__ << " for channel '"
-                       << channel << "'" << dendl;
-
-      if (expanded_log_file.count(channel) == 0) {
-        string fname = expand_channel_meta(
-            get_str_map_key(log_file, channel,
-              &CLOG_CHANNEL_DEFAULT),
-            channel);
-        expanded_log_file[channel] = fname;
-
-        generic_dout(20) << __func__ << " for channel '"
-                         << channel << "' expanded to '"
-                         << fname << "'" << dendl;
-      }
-      return expanded_log_file[channel];
-    }
-
-    string get_log_file_level(const string &channel) {
-      return get_str_map_key(log_file_level, channel,
-                             &CLOG_CHANNEL_DEFAULT);
-    }
-  } channels;
-
-  void update_log_channels();
-
   void create_initial();
   void update_from_paxos(bool *need_bootstrap);
   void create_pending();  // prepare a new pending
   // propose pending update to peers
-  void encode_pending(MonitorDBStore::TransactionRef t);
-  virtual void encode_full(MonitorDBStore::TransactionRef t);
+  void encode_pending(MonitorDBStore::Transaction *t);
+  virtual void encode_full(MonitorDBStore::Transaction *t);
   version_t get_trim_to();
   bool preprocess_query(PaxosServiceMessage *m);  // true if processed.
   bool prepare_update(PaxosServiceMessage *m);
@@ -151,18 +74,12 @@ private:
   bool _create_sub_summary(MLog *mlog, int level);
   void _create_sub_incremental(MLog *mlog, int level, version_t sv);
 
-  void store_do_append(MonitorDBStore::TransactionRef t,
+  void store_do_append(MonitorDBStore::Transaction *t,
 		       const string& key, bufferlist& bl);
 
  public:
   LogMonitor(Monitor *mn, Paxos *p, const string& service_name) 
     : PaxosService(mn, p, service_name) { }
-
-  void init() {
-    generic_dout(10) << "LogMonitor::init" << dendl;
-    g_conf->add_observer(this);
-    update_log_channels();
-  }
   
   void tick();  // check state, take actions
 
@@ -177,22 +94,6 @@ private:
    */
   int sub_name_to_id(const string& n);
 
-  void on_shutdown() {
-    g_conf->remove_observer(this);
-  }
-
-  const char **get_tracked_conf_keys() const {
-    static const char* KEYS[] = {
-      "mon_cluster_log_to_syslog",
-      "mon_cluster_log_to_syslog_level",
-      "mon_cluster_log_to_syslog_facility",
-      "mon_cluster_log_file",
-      "mon_cluster_log_file_level",
-      NULL
-    };
-    return KEYS;
-  }
-  void handle_conf_change(const struct md_config_t *conf,
-                          const std::set<std::string> &changed);
 };
+
 #endif
diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc
index fe6fe23..12755b7 100644
--- a/src/mon/MDSMonitor.cc
+++ b/src/mon/MDSMonitor.cc
@@ -13,7 +13,6 @@
  */
 
 #include <sstream>
-#include <boost/utility.hpp>
 
 #include "MDSMonitor.h"
 #include "Monitor.h"
@@ -22,18 +21,22 @@
 
 #include "common/strtol.h"
 #include "common/ceph_argparse.h"
-#include "common/perf_counters.h"
-#include "common/Timer.h"
-#include "common/config.h"
-#include "common/cmdparse.h"
 
 #include "messages/MMDSMap.h"
 #include "messages/MMDSBeacon.h"
 #include "messages/MMDSLoadTargets.h"
 #include "messages/MMonCommand.h"
+
 #include "messages/MGenericMessage.h"
 
+#include "common/perf_counters.h"
+#include "common/Timer.h"
+
+#include "common/config.h"
 #include "include/assert.h"
+
+#include "MonitorDBStore.h"
+#include "common/cmdparse.h"
 #include "include/str_list.h"
 
 #include "mds/mdstypes.h"
@@ -41,7 +44,7 @@
 #define dout_subsys ceph_subsys_mon
 #undef dout_prefix
 #define dout_prefix _prefix(_dout, mon, mdsmap)
-static ostream& _prefix(std::ostream *_dout, Monitor *mon, MDSMap const& mdsmap) {
+static ostream& _prefix(std::ostream *_dout, Monitor *mon, MDSMap& mdsmap) {
   return *_dout << "mon." << mon->name << "@" << mon->rank
 		<< "(" << mon->get_state_name()
 		<< ").mds e" << mdsmap.get_epoch() << " ";
@@ -58,10 +61,8 @@ void MDSMonitor::print_map(MDSMap &m, int dbl)
   *_dout << dendl;
 }
 
-void MDSMonitor::create_new_fs(MDSMap &m, const std::string &name, int metadata_pool, int data_pool)
+void MDSMonitor::create_new_fs(MDSMap &m, int metadata_pool, int data_pool)
 {
-  m.enabled = true;
-  m.fs_name = name;
   m.max_mds = g_conf->max_mds;
   m.created = ceph_clock_now(g_ceph_context);
   m.data_pools.insert(data_pool);
@@ -81,9 +82,7 @@ void MDSMonitor::create_new_fs(MDSMap &m, const std::string &name, int metadata_
 void MDSMonitor::create_initial()
 {
   dout(10) << "create_initial" << dendl;
-
-  // Initial state is a disable MDS map
-  assert(mdsmap.get_enabled() == false);
+  create_new_fs(pending_mdsmap, MDS_METADATA_POOL, MDS_DATA_POOL);
 }
 
 
@@ -121,7 +120,7 @@ void MDSMonitor::create_pending()
   dout(10) << "create_pending e" << pending_mdsmap.epoch << dendl;
 }
 
-void MDSMonitor::encode_pending(MonitorDBStore::TransactionRef t)
+void MDSMonitor::encode_pending(MonitorDBStore::Transaction *t)
 {
   dout(10) << "encode_pending e" << pending_mdsmap.epoch << dendl;
 
@@ -138,19 +137,6 @@ void MDSMonitor::encode_pending(MonitorDBStore::TransactionRef t)
   /* put everything in the transaction */
   put_version(t, pending_mdsmap.epoch, mdsmap_bl);
   put_last_committed(t, pending_mdsmap.epoch);
-
-  // Encode MDSHealth data
-  for (std::map<uint64_t, MDSHealth>::iterator i = pending_daemon_health.begin();
-      i != pending_daemon_health.end(); ++i) {
-    bufferlist bl;
-    i->second.encode(bl);
-    t->put(MDS_HEALTH_PREFIX, stringify(i->first), bl);
-  }
-  for (std::set<uint64_t>::iterator i = pending_daemon_health_rm.begin();
-      i != pending_daemon_health_rm.end(); ++i) {
-    t->erase(MDS_HEALTH_PREFIX, stringify(*i));
-  }
-  pending_daemon_health_rm.clear();
 }
 
 version_t MDSMonitor::get_trim_to()
@@ -215,7 +201,7 @@ void MDSMonitor::_note_beacon(MMDSBeacon *m)
 
 bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
 {
-  MDSMap::DaemonState state = m->get_state();
+  int state = m->get_state();
   uint64_t gid = m->get_global_id();
   version_t seq = m->get_seq();
   MDSMap::mds_info_t info;
@@ -319,14 +305,6 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
     return false;  // need to update map
   }
 
-  // Comparing known daemon health with m->get_health()
-  // and return false (i.e. require proposal) if they
-  // do not match, to update our stored
-  if (!(pending_daemon_health[gid] == m->get_health())) {
-    dout(20) << __func__ << " health metrics for gid " << gid << " were updated" << dendl;
-    return false;
-  }
-
  ignore:
   // note time and reply
   _note_beacon(m);
@@ -399,19 +377,9 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m)
   dout(12) << "prepare_beacon " << *m << " from " << m->get_orig_source_inst() << dendl;
   entity_addr_t addr = m->get_orig_source_inst().addr;
   uint64_t gid = m->get_global_id();
-  MDSMap::DaemonState state = m->get_state();
+  int state = m->get_state();
   version_t seq = m->get_seq();
 
-  // Ignore beacons if filesystem is disabled
-  if (!mdsmap.get_enabled()) {
-    dout(1) << "warning, MDS " << m->get_orig_source_inst() << " up but filesystem disabled" << dendl;
-    return false;
-  }
-
-  // Store health
-  dout(20) << __func__ << " got health from gid " << gid << " with " << m->get_health().metrics.size() << " metrics." << dendl;
-  pending_daemon_health[gid] = m->get_health();
-
   // boot?
   if (state == MDSMap::STATE_BOOT) {
     // zap previous instance of this name?
@@ -551,7 +519,7 @@ bool MDSMonitor::should_propose(double& delay)
 void MDSMonitor::_updated(MMDSBeacon *m)
 {
   dout(10) << "_updated " << m->get_orig_source() << " " << *m << dendl;
-  mon->clog->info() << m->get_orig_source_inst() << " "
+  mon->clog.info() << m->get_orig_source_inst() << " "
 	  << ceph_mds_state_name(m->get_state()) << "\n";
 
   if (m->get_state() == MDSMap::STATE_STOPPED) {
@@ -568,55 +536,13 @@ void MDSMonitor::on_active()
   update_logger();
 
   if (mon->is_leader())
-    mon->clog->info() << "mdsmap " << mdsmap << "\n";
+    mon->clog.info() << "mdsmap " << mdsmap << "\n";
 }
 
 void MDSMonitor::get_health(list<pair<health_status_t, string> >& summary,
 			    list<pair<health_status_t, string> > *detail) const
 {
   mdsmap.get_health(summary, detail);
-
-  // For each MDS GID...
-  for (std::map<uint64_t, MDSMap::mds_info_t>::const_iterator i = pending_mdsmap.mds_info.begin();
-      i != pending_mdsmap.mds_info.end(); ++i) {
-    // Decode MDSHealth
-    bufferlist bl;
-    mon->store->get(MDS_HEALTH_PREFIX, stringify(i->first), bl);
-    if (!bl.length()) {
-      derr << "Missing health data for MDS " << i->first << dendl;
-      continue;
-    }
-    MDSHealth health;
-    bufferlist::iterator bl_i = bl.begin();
-    health.decode(bl_i);
-
-    for (std::list<MDSHealthMetric>::iterator j = health.metrics.begin(); j != health.metrics.end(); ++j) {
-      int const rank = i->second.rank;
-      std::ostringstream message;
-      message << "mds" << rank << ": " << j->message;
-      summary.push_back(std::make_pair(j->sev, message.str()));
-
-      if (detail) {
-        // There is no way for us to clealy associate detail entries with summary entries (#7192), so
-        // we duplicate the summary message in the detail string and tag the metadata on.
-        std::ostringstream detail_message;
-        detail_message << message.str();
-        if (j->metadata.size()) {
-          detail_message << "(";
-          std::map<std::string, std::string>::iterator k = j->metadata.begin();
-          while (k != j->metadata.end()) {
-            detail_message << k->first << ": " << k->second;
-            if (boost::next(k) != j->metadata.end()) {
-              detail_message << ", ";
-            }
-            ++k;
-          }
-          detail_message << ")";
-        }
-        detail->push_back(std::make_pair(j->sev, detail_message.str()));
-      }
-    }
-  }
 }
 
 void MDSMonitor::dump_info(Formatter *f)
@@ -771,60 +697,6 @@ bool MDSMonitor::preprocess_command(MMonCommand *m)
 	ds << mdsmap.compat;
       }
       r = 0;
-  } else if (prefix == "fs ls") {
-    if (f) {
-      f->open_array_section("filesystems");
-      {
-        if (pending_mdsmap.get_enabled()) {
-          f->open_object_section("filesystem");
-          {
-            f->dump_string("name", pending_mdsmap.fs_name);
-            const string &md_pool_name = mon->osdmon()->osdmap.get_pool_name(pending_mdsmap.metadata_pool);
-            /* Output both the names and IDs of pools, for use by
-             * humans and machines respectively */
-            f->dump_string("metadata_pool", md_pool_name);
-            f->dump_int("metadata_pool_id", pending_mdsmap.metadata_pool);
-            f->open_array_section("data_pool_ids");
-            {
-              for (std::set<int64_t>::iterator dpi = pending_mdsmap.data_pools.begin();
-                   dpi != pending_mdsmap.data_pools.end(); ++dpi) {
-                f->dump_int("data_pool_id", *dpi);
-              }
-            }
-            f->close_section();
-
-            f->open_array_section("data_pools");
-            {
-                for (std::set<int64_t>::iterator dpi = pending_mdsmap.data_pools.begin();
-                   dpi != pending_mdsmap.data_pools.end(); ++dpi) {
-                  const string &pool_name = mon->osdmon()->osdmap.get_pool_name(*dpi);
-                  f->dump_string("data_pool", pool_name);
-                }
-            }
-
-            f->close_section();
-          }
-          f->close_section();
-        }
-      }
-      f->close_section();
-      f->flush(ds);
-    } else {
-      if (pending_mdsmap.get_enabled()) {
-        const string &md_pool_name = mon->osdmon()->osdmap.get_pool_name(pending_mdsmap.metadata_pool);
-        
-        ds << "name: " << pending_mdsmap.fs_name << ", metadata pool: " << md_pool_name << ", data pools: [";
-        for (std::set<int64_t>::iterator dpi = pending_mdsmap.data_pools.begin();
-           dpi != pending_mdsmap.data_pools.end(); ++dpi) {
-          const string &pool_name = mon->osdmon()->osdmap.get_pool_name(*dpi);
-          ds << pool_name << " ";
-        }
-        ds << "]" << std::endl;
-      } else {
-        ds << "No filesystems enabled" << std::endl;
-      }
-    }
-    r = 0;
   }
 
   if (r != -1) {
@@ -918,300 +790,22 @@ bool MDSMonitor::prepare_command(MMonCommand *m)
   }
 
   string prefix;
+
   cmd_getval(g_ceph_context, cmdmap, "prefix", prefix);
 
-  /* Refuse access if message not associated with a valid session */
   MonSession *session = m->get_session();
   if (!session) {
     mon->reply_command(m, -EACCES, "access denied", rdata, get_last_committed());
     return true;
   }
 
-  /* Execute filesystem add/remove, or pass through to filesystem_command */
-  bool const handled = management_command(prefix, cmdmap, ss, r);
-  if (!handled) {
-    if (!pending_mdsmap.get_enabled()) {
-      ss << "No filesystem configured: use `ceph fs new` to create a filesystem";
-      r = -ENOENT;
-    } else {
-      bool const completed = filesystem_command(m, prefix, cmdmap, ss, r);
-      if (!completed) {
-        // Do not reply, the message has been enqueued for retry
-        return false;
-      }
-    }
-  }
-
-  /* Compose response */
-  string rs;
-  getline(ss, rs);
-
-  if (r >= 0) {
-    // success.. delay reply
-    wait_for_finished_proposal(new Monitor::C_Command(mon, m, r, rs,
-					      get_last_committed() + 1));
-    return true;
-  } else {
-    // reply immediately
-    mon->reply_command(m, r, rs, rdata, get_last_committed());
-    return false;
-  }
-}
-
-
-/**
- * Return 0 if the pool is suitable for use with CephFS, or
- * in case of errors return a negative error code, and populate
- * the passed stringstream with an explanation.
- */
-int MDSMonitor::_check_pool(
-    const int64_t pool_id,
-    std::stringstream *ss) const
-{
-  assert(ss != NULL);
-
-  const pg_pool_t *pool = mon->osdmon()->osdmap.get_pg_pool(pool_id);
-  if (!pool) {
-    *ss << "pool id '" << pool_id << "' does not exist";
-    return -ENOENT;
-  }
-
-  const string& pool_name = mon->osdmon()->osdmap.get_pool_name(pool_id);
-
-  if (pool->is_erasure()) {
-    // EC pools are only acceptable with a cache tier overlay
-    if (!pool->has_tiers() || !pool->has_read_tier() || !pool->has_write_tier()) {
-      *ss << "pool '" << pool_name << "' (id '" << pool_id << "')"
-         << " is an erasure-code pool";
-      return -EINVAL;
-    }
-  }
-
-  if (pool->is_tier()) {
-    *ss << " pool '" << pool_name << "' (id '" << pool_id
-      << "') is already in use as a cache tier.";
-    return -EINVAL;
-  }
-
-  // Nothing special about this pool, so it is permissible
-  return 0;
-}
-
-
-/**
- * Handle a command for creating or removing a filesystem.
- *
- * @return true if such a command was found, else false to
- *         fall through and look for other types of command.
- */
-bool MDSMonitor::management_command(
-    std::string const &prefix,
-    map<string, cmd_vartype> &cmdmap,
-    std::stringstream &ss,
-    int &r)
-{
-  if (prefix == "mds newfs") {
-    /* Legacy `newfs` command, takes pool numbers instead of
-     * names, assumes fs name to be MDS_FS_NAME_DEFAULT, and
-     * can overwrite existing filesystem settings */
-    MDSMap newmap;
-    int64_t metadata, data;
-
-    if (!cmd_getval(g_ceph_context, cmdmap, "metadata", metadata)) {
-      ss << "error parsing 'metadata' value '"
-         << cmd_vartype_stringify(cmdmap["metadata"]) << "'";
-      r = -EINVAL;
-      return true;
-    }
-    if (!cmd_getval(g_ceph_context, cmdmap, "data", data)) {
-      ss << "error parsing 'data' value '"
-         << cmd_vartype_stringify(cmdmap["data"]) << "'";
-      r = -EINVAL;
-      return true;
-    }
- 
-    r = _check_pool(data, &ss);
-    if (r) {
-      return true;
-    }
-
-    r = _check_pool(metadata, &ss);
-    if (r) {
-      return true;
-    }
-
-    // be idempotent.. success if it already exists and matches
-    if (mdsmap.get_enabled() &&
-	mdsmap.get_metadata_pool() == metadata &&
-	mdsmap.get_first_data_pool() == data &&
-	mdsmap.fs_name == MDS_FS_NAME_DEFAULT) {
-      ss << "filesystem '" << MDS_FS_NAME_DEFAULT << "' already exists";
-      r = 0;
-      return true;
-    }
-
-    string sure;
-    cmd_getval(g_ceph_context, cmdmap, "sure", sure);
-    if (pending_mdsmap.get_enabled() && sure != "--yes-i-really-mean-it") {
-      ss << "this is DANGEROUS and will wipe out the mdsmap's fs, and may clobber data in the new pools you specify.  add --yes-i-really-mean-it if you do.";
-      r = -EPERM;
-
-      return true;
-    } else {
-      newmap.inc = pending_mdsmap.inc;
-      pending_mdsmap = newmap;
-      pending_mdsmap.epoch = mdsmap.epoch + 1;
-      create_new_fs(pending_mdsmap, MDS_FS_NAME_DEFAULT, metadata, data);
-      ss << "new fs with metadata pool " << metadata << " and data pool " << data;
-      r = 0;
-      return true;
-    }
-  } else if (prefix == "fs new") {
-    string metadata_name;
-    cmd_getval(g_ceph_context, cmdmap, "metadata", metadata_name);
-    int64_t metadata = mon->osdmon()->osdmap.lookup_pg_pool_name(metadata_name);
-    if (metadata < 0) {
-      r = -ENOENT;
-      ss << "pool '" << metadata_name << "' does not exist";
-      return true;
-    }
-
-    string data_name;
-    cmd_getval(g_ceph_context, cmdmap, "data", data_name);
-    int64_t data = mon->osdmon()->osdmap.lookup_pg_pool_name(data_name);
-    if (data < 0) {
-      r = -ENOENT;
-      ss << "pool '" << data_name << "' does not exist";
-      return true;
-    }
-   
-    string fs_name;
-    cmd_getval(g_ceph_context, cmdmap, "fs_name", fs_name);
-    if (fs_name.empty()) {
-        // Ensure fs name is not empty so that we can implement
-        // commmands that refer to FS by name in future.
-        ss << "Filesystem name may not be empty";
-        return -EINVAL;
-    }
-
-    if (pending_mdsmap.get_enabled()
-        && pending_mdsmap.fs_name == fs_name
-        && *(pending_mdsmap.data_pools.begin()) == data
-        && pending_mdsmap.metadata_pool == metadata) {
-      // Identical FS created already, this is a no-op
-      r = 0;
-      ss << "filesystem '" << fs_name << "' already exists";
-      return true;
-    }
-
-    if (pending_mdsmap.get_enabled()) {
-      /* We currently only support one filesystem, so cannot create a second */
-      ss << "A filesystem already exists, use `ceph fs rm` if you wish to delete it";
-      r = -EINVAL;
-    }
-
-    pg_pool_t const *data_pool = mon->osdmon()->osdmap.get_pg_pool(data);
-    assert(data_pool != NULL);  // Checked it existed above
-    pg_pool_t const *metadata_pool = mon->osdmon()->osdmap.get_pg_pool(metadata);
-    assert(metadata_pool != NULL);  // Checked it existed above
-
-    // Automatically set crash_replay_interval on data pool if it
-    // isn't already set.
-    if (data_pool->get_crash_replay_interval() == 0) {
-      r = mon->osdmon()->set_crash_replay_interval(data, g_conf->osd_default_data_pool_replay_window);
-      assert(r == 0);  // We just did get_pg_pool so it must exist and be settable
-      request_proposal(mon->osdmon());
-    }
-
-    r = _check_pool(data, &ss);
-    if (r) {
-      return true;
-    }
-
-    r = _check_pool(metadata, &ss);
-    if (r) {
-      return true;
-    }
-
-    // All checks passed, go ahead and create.
-    MDSMap newmap;
-    newmap.inc = pending_mdsmap.inc;
-    pending_mdsmap = newmap;
-    pending_mdsmap.epoch = mdsmap.epoch + 1;
-    pending_mdsmap.last_failure_osd_epoch = mdsmap.last_failure_osd_epoch;
-    create_new_fs(pending_mdsmap, fs_name, metadata, data);
-    ss << "new fs with metadata pool " << metadata << " and data pool " << data;
-    r = 0;
-    return true;
-  } else if (prefix == "fs rm") {
-    // Check caller has correctly named the FS to delete
-    // (redundant while there is only one FS, but command
-    //  syntax should apply to multi-FS future)
-    string fs_name;
-    cmd_getval(g_ceph_context, cmdmap, "fs_name", fs_name);
-    if (!pending_mdsmap.get_enabled() || fs_name != pending_mdsmap.fs_name) {
-        // Consider absence success to make deletes idempotent
-        ss << "filesystem '" << fs_name << "' does not exist";
-        r = 0;
-        return true;
-    }
-
-    // Check that no MDS daemons are active
-    if (!pending_mdsmap.up.empty()) {
-      ss << "all MDS daemons must be inactive before removing filesystem";
-      r = -EINVAL;
-      return true;
-    }
-
-    // Check for confirmation flag
-    string sure;
-    cmd_getval(g_ceph_context, cmdmap, "sure", sure);
-    if (sure != "--yes-i-really-mean-it") {
-      ss << "this is a DESTRUCTIVE operation and will make data in your filesystem permanently" \
-            "inaccessible.  Add --yes-i-really-mean-it if you are sure you wish to continue.";
-      r = -EPERM;
-      return true;
-    }
-
-    MDSMap newmap;
-    newmap.inc = pending_mdsmap.inc;
-    pending_mdsmap = newmap;
-    pending_mdsmap.epoch = mdsmap.epoch + 1;
-    assert(pending_mdsmap.get_enabled() == false);
-    pending_mdsmap.metadata_pool = -1;
-    pending_mdsmap.cas_pool = -1;
-    pending_mdsmap.created = ceph_clock_now(g_ceph_context);
-
-    r = 0;
-    return true;
-  } else {
-    return false;
-  }
-}
-
-
-/**
- * Handle a command that affects the filesystem (i.e. a filesystem
- * must exist for the command to act upon).
- *
- * @return true if the message is done with,
- *         else false (if it was enqueued for retry)
- */
-bool MDSMonitor::filesystem_command(
-    MMonCommand *m,
-    std::string const &prefix,
-    map<string, cmd_vartype> &cmdmap,
-    std::stringstream &ss,
-    int &r)
-{
   string whostr;
   cmd_getval(g_ceph_context, cmdmap, "who", whostr);
   if (prefix == "mds stop" ||
       prefix == "mds deactivate") {
     int who = parse_pos_long(whostr.c_str(), &ss);
-    if (who < 0) {
-      return true;
-    }
+    if (who < 0)
+      goto out;
     if (!pending_mdsmap.is_active(who)) {
       r = -EEXIST;
       ss << "mds." << who << " not active (" 
@@ -1236,9 +830,8 @@ bool MDSMonitor::filesystem_command(
   } else if (prefix == "mds set_max_mds") {
     // NOTE: see also "mds set max_mds", which can modify the same field.
     int64_t maxmds;
-    if (!cmd_getval(g_ceph_context, cmdmap, "maxmds", maxmds) || maxmds < 0) {
-      return true;
-    }
+    if (!cmd_getval(g_ceph_context, cmdmap, "maxmds", maxmds) || maxmds < 0)
+      goto out;
     pending_mdsmap.max_mds = maxmds;
     r = 0;
     ss << "max_mds = " << pending_mdsmap.max_mds;
@@ -1246,21 +839,19 @@ bool MDSMonitor::filesystem_command(
     string var;
     if (!cmd_getval(g_ceph_context, cmdmap, "var", var) || var.empty()) {
       ss << "Invalid variable";
-      return true;
+      goto out;
     }
     string val;
     string interr;
     int64_t n = 0;
-    if (!cmd_getval(g_ceph_context, cmdmap, "val", val)) {
-      return true;
-    }
+    if (!cmd_getval(g_ceph_context, cmdmap, "val", val))
+      goto out;
     // we got a string.  see if it contains an int.
     n = strict_strtoll(val.c_str(), 10, &interr);
     if (var == "max_mds") {
       // NOTE: see also "mds set_max_mds", which can modify the same field.
-      if (interr.length()) {
-	return true;
-      }
+      if (interr.length())
+	goto out;
       pending_mdsmap.max_mds = n;
     } else if (var == "inline_data") {
       if (val == "true" || val == "yes" || (!interr.length() && n == 1)) {
@@ -1269,7 +860,7 @@ bool MDSMonitor::filesystem_command(
 	    confirm != "--yes-i-really-mean-it") {
 	  ss << "inline data is new and experimental; you must specify --yes-i-really-mean-it";
 	  r = -EPERM;
-	  return true;
+	  goto out;
 	}
 	ss << "inline data enabled";
 	pending_mdsmap.set_inline_data_enabled(true);
@@ -1281,17 +872,17 @@ bool MDSMonitor::filesystem_command(
       } else {
 	ss << "value must be false|no|0 or true|yes|1";
 	r = -EINVAL;
-	return true;
+	goto out;
       }
     } else if (var == "max_file_size") {
       if (interr.length()) {
 	ss << var << " requires an integer value";
-	return true;
+	goto out;
       }
       if (n < CEPH_MIN_STRIPE_UNIT) {
 	r = -ERANGE;
 	ss << var << " must at least " << CEPH_MIN_STRIPE_UNIT;
-	return true;
+	goto out;
       }
       pending_mdsmap.max_file_size = n;
     } else if (var == "allow_new_snaps") {
@@ -1304,18 +895,18 @@ bool MDSMonitor::filesystem_command(
 	    confirm != "--yes-i-really-mean-it") {
 	  ss << "Snapshots are unstable and will probably break your FS! Set to --yes-i-really-mean-it if you are sure you want to enable them";
 	  r = -EPERM;
-	  return true;
+	  goto out;
 	}
 	pending_mdsmap.set_snaps_allowed();
 	ss << "enabled new snapshots";
       } else {
 	ss << "value must be true|yes|1 or false|no|0";
 	r = -EINVAL;
-	return true;
+	goto out;
       }
     } else {
       ss << "unknown variable " << var;
-      return true;
+      goto out;
     }
     r = 0;
   } else if (prefix == "mds setmap") {
@@ -1329,8 +920,9 @@ bool MDSMonitor::filesystem_command(
     if (pending_mdsmap.epoch == e) {
       map.epoch = pending_mdsmap.epoch;  // make sure epoch is correct
       pending_mdsmap = map;
-      ss << "set mds map";
-      r = 0;
+      string rs = "set mds map";
+      wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
+						get_last_committed() + 1));
       return true;
     } else {
       ss << "next mdsmap epoch " << pending_mdsmap.epoch << " != " << e;
@@ -1342,21 +934,24 @@ bool MDSMonitor::filesystem_command(
       ss << "error parsing 'gid' value '"
          << cmd_vartype_stringify(cmdmap["gid"]) << "'";
       r = -EINVAL;
-      return true;
+      goto out;
     }
-    int32_t state;
+    int64_t state;
     if (!cmd_getval(g_ceph_context, cmdmap, "state", state)) {
       ss << "error parsing 'state' string value '"
          << cmd_vartype_stringify(cmdmap["state"]) << "'";
       r = -EINVAL;
-      return true;
+      goto out;
     }
     if (!pending_mdsmap.is_dne_gid(gid)) {
       MDSMap::mds_info_t& info = pending_mdsmap.get_info_gid(gid);
-      info.state = MDSMap::DaemonState(state);
+      info.state = state;
       stringstream ss;
       ss << "set mds gid " << gid << " to state " << state << " " << ceph_mds_state_name(state);
-      r = 0;
+      string rs;
+      getline(ss, rs);
+      wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
+						get_last_committed() + 1));
       return true;
     }
 
@@ -1375,7 +970,7 @@ bool MDSMonitor::filesystem_command(
       ss << "error parsing 'gid' value '"
          << cmd_vartype_stringify(cmdmap["gid"]) << "'";
       r = -EINVAL;
-      return true;
+      goto out;
     }
     int state = pending_mdsmap.get_state_gid(gid);
     if (state == 0) {
@@ -1389,7 +984,10 @@ bool MDSMonitor::filesystem_command(
       pending_mdsmap.mds_info.erase(gid);
       stringstream ss;
       ss << "removed mds gid " << gid;
-      r = 0;
+      string rs;
+      getline(ss, rs);
+      wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
+						get_last_committed() + 1));
       return true;
     }
   } else if (prefix == "mds rmfailed") {
@@ -1398,12 +996,15 @@ bool MDSMonitor::filesystem_command(
       ss << "error parsing 'who' value '"
          << cmd_vartype_stringify(cmdmap["who"]) << "'";
       r = -EINVAL;
-      return true;
+      goto out;
     }
     pending_mdsmap.failed.erase(w);
     stringstream ss;
     ss << "removed failed mds." << w;
-    r = 0;
+    string rs;
+    getline(ss, rs);
+    wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
+					      get_last_committed() + 1));
     return true;
   } else if (prefix == "mds cluster_down") {
     if (pending_mdsmap.test_flag(CEPH_MDSMAP_DOWN)) {
@@ -1427,7 +1028,7 @@ bool MDSMonitor::filesystem_command(
       ss << "error parsing feature value '"
          << cmd_vartype_stringify(cmdmap["feature"]) << "'";
       r = -EINVAL;
-      return true;
+      goto out;
     }
     if (pending_mdsmap.compat.compat.contains(f)) {
       ss << "removing compat feature " << f;
@@ -1443,7 +1044,7 @@ bool MDSMonitor::filesystem_command(
       ss << "error parsing feature value '"
          << cmd_vartype_stringify(cmdmap["feature"]) << "'";
       r = -EINVAL;
-      return true;
+      goto out;
     }
     if (pending_mdsmap.compat.incompat.contains(f)) {
       ss << "removing incompat feature " << f;
@@ -1467,14 +1068,6 @@ bool MDSMonitor::filesystem_command(
 	ss << "pool '" << poolname << "' does not exist";
       }
     }
-    const pg_pool_t *p = mon->osdmon()->osdmap.get_pg_pool(poolid);
-    assert(p != NULL);
-    if (p->is_erasure()) {
-      // I'm sorry Dave, I'm afraid I can't do that
-      r = -EINVAL;
-      poolid = -1;
-      ss << "can't use pool '" << poolname << "' as it's an erasure-code pool";
-    }
     if (poolid >= 0) {
       pending_mdsmap.add_data_pool(poolid);
       ss << "added data pool " << poolid << " to mdsmap";
@@ -1508,11 +1101,55 @@ bool MDSMonitor::filesystem_command(
       if (r == 0)
 	ss << "removed data pool " << poolid << " from mdsmap";
     }
+  } else if (prefix == "mds newfs") {
+    MDSMap newmap;
+    int64_t metadata, data;
+    if (!cmd_getval(g_ceph_context, cmdmap, "metadata", metadata)) {
+      ss << "error parsing 'metadata' value '"
+         << cmd_vartype_stringify(cmdmap["metadata"]) << "'";
+      r = -EINVAL;
+      goto out;
+    }
+    if (!cmd_getval(g_ceph_context, cmdmap, "data", data)) {
+      ss << "error parsing 'data' value '"
+         << cmd_vartype_stringify(cmdmap["data"]) << "'";
+      r = -EINVAL;
+      goto out;
+    }
+    string sure;
+    cmd_getval(g_ceph_context, cmdmap, "sure", sure);
+    if (sure != "--yes-i-really-mean-it") {
+      ss << "this is DANGEROUS and will wipe out the mdsmap's fs, and may clobber data in the new pools you specify.  add --yes-i-really-mean-it if you do.";
+      r = -EPERM;
+    } else {
+      newmap.inc = pending_mdsmap.inc;
+      pending_mdsmap = newmap;
+      pending_mdsmap.epoch = mdsmap.epoch + 1;
+      create_new_fs(pending_mdsmap, metadata, data);
+      ss << "new fs with metadata pool " << metadata << " and data pool " << data;
+      string rs;
+      getline(ss, rs);
+      wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
+						get_last_committed() + 1));
+      return true;
+    }
   } else {
     ss << "unrecognized command";
   }
+ out:
+  string rs;
+  getline(ss, rs);
 
-  return true;
+  if (r >= 0) {
+    // success.. delay reply
+    wait_for_finished_proposal(new Monitor::C_Command(mon, m, r, rs,
+					      get_last_committed() + 1));
+    return true;
+  } else {
+    // reply immediately
+    mon->reply_command(m, r, rs, rdata, get_last_committed());
+    return false;
+  }
 }
 
 
@@ -1532,7 +1169,8 @@ void MDSMonitor::check_subs()
 void MDSMonitor::check_sub(Subscription *sub)
 {
   if (sub->next <= mdsmap.get_epoch()) {
-    sub->session->con->send_message(new MMDSMap(mon->monmap->fsid, &mdsmap));
+    mon->messenger->send_message(new MMDSMap(mon->monmap->fsid, &mdsmap),
+				 sub->session->inst);
     if (sub->onetime)
       mon->session_map.remove_sub(sub);
     else
@@ -1546,9 +1184,6 @@ void MDSMonitor::tick()
   // ...if i am an active leader
   if (!is_active()) return;
 
-  // Do nothing if the filesystem is disabled
-  if (!mdsmap.get_enabled()) return;
-
   dout(10) << mdsmap << dendl;
   
   bool do_propose = false;
@@ -1671,8 +1306,6 @@ void MDSMonitor::tick()
 	  propose_osdmap = true;
 	}
 	pending_mdsmap.mds_info.erase(gid);
-        pending_daemon_health.erase(gid);
-        pending_daemon_health_rm.insert(gid);
 	last_beacon.erase(gid);
 	do_propose = true;
       } else if (info.state == MDSMap::STATE_STANDBY_REPLAY) {
@@ -1680,8 +1313,6 @@ void MDSMonitor::tick()
 		 << " " << ceph_mds_state_name(info.state)
 		 << dendl;
 	pending_mdsmap.mds_info.erase(gid);
-        pending_daemon_health.erase(gid);
-        pending_daemon_health_rm.insert(gid);
 	last_beacon.erase(gid);
 	do_propose = true;
       } else {
@@ -1692,8 +1323,6 @@ void MDSMonitor::tick()
 		   << " " << ceph_mds_state_name(info.state)
 		   << " (laggy)" << dendl;
 	  pending_mdsmap.mds_info.erase(gid);
-          pending_daemon_health.erase(gid);
-          pending_daemon_health_rm.insert(gid);
 	  do_propose = true;
 	} else if (!info.laggy()) {
 	  dout(10) << " marking " << gid << " " << info.addr << " mds." << info.rank << "." << info.inc
@@ -1708,8 +1337,10 @@ void MDSMonitor::tick()
 
     if (propose_osdmap)
       request_proposal(mon->osdmon());
+
   }
 
+
   // have a standby take over?
   set<int> failed;
   pending_mdsmap.get_failed_mds_set(failed);
diff --git a/src/mon/MDSMonitor.h b/src/mon/MDSMonitor.h
index 305730f..901e93e 100644
--- a/src/mon/MDSMonitor.h
+++ b/src/mon/MDSMonitor.h
@@ -36,8 +36,6 @@ class MMDSGetMap;
 class MMonCommand;
 class MMDSLoadTargets;
 
-#define MDS_HEALTH_PREFIX "mds_health"
-
 class MDSMonitor : public PaxosService {
  public:
   // mds maps
@@ -65,7 +63,7 @@ class MDSMonitor : public PaxosService {
     }
   };
 
-  void create_new_fs(MDSMap &m, const std::string &name, int metadata_pool, int data_pool);
+  void create_new_fs(MDSMap &m, int metadata_pool, int data_pool);
 
   version_t get_trim_to();
 
@@ -73,9 +71,9 @@ class MDSMonitor : public PaxosService {
   void create_initial();
   void update_from_paxos(bool *need_bootstrap);
   void create_pending(); 
-  void encode_pending(MonitorDBStore::TransactionRef t);
+  void encode_pending(MonitorDBStore::Transaction *t);
   // we don't require full versions; don't encode any.
-  virtual void encode_full(MonitorDBStore::TransactionRef t) { }
+  virtual void encode_full(MonitorDBStore::Transaction *t) { }
 
   void update_logger();
 
@@ -101,17 +99,6 @@ class MDSMonitor : public PaxosService {
 
   bool preprocess_command(MMonCommand *m);
   bool prepare_command(MMonCommand *m);
-  bool management_command(
-      std::string const &prefix,
-      map<string, cmd_vartype> &cmdmap,
-      std::stringstream &ss,
-      int &r);
-  bool filesystem_command(
-      MMonCommand *m,
-      std::string const &prefix,
-      map<string, cmd_vartype> &cmdmap,
-      std::stringstream &ss,
-      int &r);
 
   // beacons
   struct beacon_info_t {
@@ -135,12 +122,6 @@ public:
   void check_subs();
   void check_sub(Subscription *sub);
 
-private:
-  // MDS daemon GID to latest health state from that GID
-  std::map<uint64_t, MDSHealth> pending_daemon_health;
-  std::set<uint64_t> pending_daemon_health_rm;
-
-  int _check_pool(const int64_t pool_id, std::stringstream *ss) const;
 };
 
 #endif
diff --git a/src/mon/MonCap.cc b/src/mon/MonCap.cc
index 84580b9..e8d3f7e 100644
--- a/src/mon/MonCap.cc
+++ b/src/mon/MonCap.cc
@@ -174,25 +174,6 @@ void MonCapGrant::expand_profile(entity_name_t name) const
     profile_grants.push_back(MonCapGrant("osd", MON_CAP_R));
     profile_grants.push_back(MonCapGrant("pg", MON_CAP_R));
   }
-
-  if (profile == "read-only") {
-    // grants READ-ONLY caps monitor-wide
-    // 'auth' requires MON_CAP_X even for RO, which we do not grant here.
-    profile_grants.push_back(mon_rwxa_t(MON_CAP_R));
-  }
-
-  if (profile == "read-write") {
-    // grants READ-WRITE caps monitor-wide
-    // 'auth' requires MON_CAP_X for all operations, which we do not grant.
-    profile_grants.push_back(mon_rwxa_t(MON_CAP_R | MON_CAP_W));
-  }
-
-  if (profile == "role-definer") {
-    // grants ALL caps to the auth subsystem, read-only on the
-    // monitor subsystem and nothing else.
-    profile_grants.push_back(MonCapGrant("mon", MON_CAP_R));
-    profile_grants.push_back(MonCapGrant("auth", MON_CAP_ALL));
-  }
 }
 
 mon_rwxa_t MonCapGrant::get_allowed(CephContext *cct,
diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc
index df1d38e..3a6dda4 100644
--- a/src/mon/MonClient.cc
+++ b/src/mon/MonClient.cc
@@ -131,11 +131,8 @@ int MonClient::get_monmap_privately()
   while (monmap.fsid.is_zero()) {
     cur_mon = _pick_random_mon();
     cur_con = messenger->get_connection(monmap.get_inst(cur_mon));
-    if (cur_con) {
-      ldout(cct, 10) << "querying mon." << cur_mon << " "
-		     << cur_con->get_peer_addr() << dendl;
-      cur_con->send_message(new MMonGetMap);
-    }
+    ldout(cct, 10) << "querying mon." << cur_mon << " " << cur_con->get_peer_addr() << dendl;
+    messenger->send_message(new MMonGetMap, cur_con);
 
     if (--attempt == 0)
       break;
@@ -144,17 +141,14 @@ int MonClient::get_monmap_privately()
     interval.set_from_double(cct->_conf->mon_client_hunt_interval);
     map_cond.WaitInterval(cct, monc_lock, interval);
 
-    if (monmap.fsid.is_zero() && cur_con) {
-      cur_con->mark_down();  // nope, clean that connection up
+    if (monmap.fsid.is_zero()) {
+      messenger->mark_down(cur_con);  // nope, clean that connection up
     }
   }
 
   if (temp_msgr) {
-    if (cur_con) {
-      cur_con->mark_down();
-      cur_con.reset(NULL);
-      cur_mon.clear();
-    }
+    messenger->mark_down(cur_con);
+    cur_con.reset(NULL);
     monc_lock.Unlock();
     messenger->shutdown();
     if (smessenger)
@@ -166,6 +160,7 @@ int MonClient::get_monmap_privately()
 
   hunting = true;  // reset this to true!
   cur_mon.clear();
+
   cur_con.reset(NULL);
 
   if (!monmap.fsid.is_zero())
@@ -227,7 +222,7 @@ int MonClient::ping_monitor(const string &mon_id, string *result_reply)
   ConnectionRef con = smsgr->get_connection(monmap.get_inst(mon_id));
   ldout(cct, 10) << __func__ << " ping mon." << mon_id
                  << " " << con->get_peer_addr() << dendl;
-  con->send_message(new MPing);
+  smsgr->send_message(new MPing, con);
 
   pinger->lock.Lock();
   int ret = pinger->wait_for_reply(cct->_conf->client_mount_timeout);
@@ -238,7 +233,7 @@ int MonClient::ping_monitor(const string &mon_id, string *result_reply)
   }
   pinger->lock.Unlock();
 
-  con->mark_down();
+  smsgr->mark_down(con);
   smsgr->shutdown();
   smsgr->wait();
   delete smsgr;
@@ -292,7 +287,6 @@ bool MonClient::ms_dispatch(Message *m)
   case MSG_LOGACK:
     if (log_client) {
       log_client->handle_log_ack(static_cast<MLogAck*>(m));
-      m->put();
       if (more_log_pending) {
 	send_log();
       }
@@ -398,7 +392,7 @@ int MonClient::init()
 
 void MonClient::shutdown()
 {
-  ldout(cct, 10) << __func__ << dendl;
+  ldout(cct, 10) << __func__ << "shutdown" << dendl;
   monc_lock.Lock();
   while (!version_requests.empty()) {
     version_requests.begin()->second->context->complete(-ECANCELED);
@@ -422,10 +416,8 @@ void MonClient::shutdown()
   monc_lock.Lock();
   timer.shutdown();
 
-  if (cur_con)
-    cur_con->mark_down();
+  messenger->mark_down(cur_con);
   cur_con.reset(NULL);
-  cur_mon.clear();
 
   monc_lock.Unlock();
 }
@@ -435,7 +427,7 @@ int MonClient::authenticate(double timeout)
   Mutex::Locker lock(monc_lock);
 
   if (state == MC_STATE_HAVE_SESSION) {
-    ldout(cct, 5) << "already authenticated" << dendl;
+    ldout(cct, 5) << "already authenticated" << dendl;;
     return 0;
   }
 
@@ -560,7 +552,7 @@ void MonClient::_send_mon_message(Message *m, bool force)
     assert(cur_con);
     ldout(cct, 10) << "_send_mon_message to mon." << cur_mon
 		   << " at " << cur_con->get_peer_addr() << dendl;
-    cur_con->send_message(m);
+    messenger->send_message(m, cur_con);
   } else {
     waiting_for_session.push_back(m);
   }
@@ -601,7 +593,7 @@ void MonClient::_reopen_session(int rank, string name)
   }
 
   if (cur_con) {
-    cur_con->mark_down();
+    messenger->mark_down(cur_con);
   }
   cur_con = messenger->get_connection(monmap.get_inst(cur_mon));
 	
@@ -638,7 +630,7 @@ void MonClient::_reopen_session(int rank, string name)
   // send an initial keepalive to ensure our timestamp is valid by the
   // time we are in an OPENED state (by sequencing this before
   // authentication).
-  cur_con->send_keepalive();
+  messenger->send_keepalive(cur_con.get());
 
   MAuth *m = new MAuth;
   m->protocol = 0;
@@ -707,7 +699,7 @@ void MonClient::tick()
     if (now > sub_renew_after)
       _renew_subs();
 
-    cur_con->send_keepalive();
+    messenger->send_keepalive(cur_con.get());
 
     if (state == MC_STATE_HAVE_SESSION) {
       send_log();
diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h
index d432680..bd9dd2e 100644
--- a/src/mon/MonCommands.h
+++ b/src/mon/MonCommands.h
@@ -167,8 +167,7 @@ COMMAND("auth import", "auth import: read keyring file from -i <file>", \
 COMMAND("auth add " \
 	"name=entity,type=CephString " \
 	"name=caps,type=CephString,n=N,req=false", \
-	"add auth info for <entity> from input file, or random key if no " \
-        "input is given, and/or any caps specified in the command",
+	"add auth info for <entity> from input file, or random key if no input given, and/or any caps specified in the command",
 	"auth", "rwx", "cli,rest")
 COMMAND("auth get-or-create-key " \
 	"name=entity,type=CephString " \
@@ -293,22 +292,8 @@ COMMAND("mds newfs " \
 	"name=metadata,type=CephInt,range=0 " \
 	"name=data,type=CephInt,range=0 " \
 	"name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
-	"make new filesystem using pools <metadata> and <data>", \
+	"make new filesystom using pools <metadata> and <data>", \
 	"mds", "rw", "cli,rest")
-COMMAND("fs new " \
-	"name=fs_name,type=CephString " \
-	"name=metadata,type=CephString " \
-	"name=data,type=CephString ", \
-	"make new filesystem using named pools <metadata> and <data>", \
-	"fs", "rw", "cli,rest")
-COMMAND("fs rm " \
-	"name=fs_name,type=CephString " \
-	"name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
-	"disable the named filesystem", \
-	"fs", "rw", "cli,rest")
-COMMAND("fs ls ", \
-	"list filesystems", \
-	"fs", "r", "cli,rest")
 /*
  * Monmap commands
  */
@@ -353,9 +338,6 @@ COMMAND("osd perf", \
         "osd", \
         "r", \
         "cli,rest")
-COMMAND("osd blocked-by", \
-	"print histogram of which OSDs are blocking their peers", \
-	"osd", "r", "cli,rest")
 COMMAND("osd getmaxosd", "show largest OSD id", "osd", "r", "cli,rest")
 COMMAND("osd find " \
 	"name=id,type=CephInt,range=0", \
@@ -448,11 +430,6 @@ COMMAND("osd crush reweight " \
 	"name=weight,type=CephFloat,range=0.0", \
 	"change <name>'s weight to <weight> in crush map", \
 	"osd", "rw", "cli,rest")
-COMMAND("osd crush reweight-subtree " \
-	"name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
-	"name=weight,type=CephFloat,range=0.0", \
-	"change all leaf items beneath <name> to <weight> in crush map", \
-	"osd", "rw", "cli,rest")
 COMMAND("osd crush tunables " \
 	"name=profile,type=CephChoices,strings=legacy|argonaut|bobtail|firefly|optimal|default", \
 	"set crush tunables values to <profile>", "osd", "rw", "cli,rest")
@@ -480,7 +457,7 @@ COMMAND("osd pause", "pause osd", "osd", "rw", "cli,rest")
 COMMAND("osd unpause", "unpause osd", "osd", "rw", "cli,rest")
 COMMAND("osd erasure-code-profile set " \
 	"name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
-	"name=profile,type=CephString,n=N,req=false", \
+	"name=profile,type=CephString,n=N,req=false,goodchars=[A-Za-z0-9-_.=]", \
 	"create erasure code profile <name> with [<key[=value]> ...] pairs. Add a --force at the end to override an existing profile (VERY DANGEROUS)", \
 	"osd", "rw", "cli,rest")
 COMMAND("osd erasure-code-profile get " \
@@ -560,9 +537,8 @@ COMMAND("osd pool create " \
 	"name=pg_num,type=CephInt,range=0 " \
 	"name=pgp_num,type=CephInt,range=0,req=false " \
         "name=pool_type,type=CephChoices,strings=replicated|erasure,req=false " \
-	"name=erasure_code_profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.] " \
-	"name=ruleset,type=CephString,req=false " \
-        "name=expected_num_objects,type=CephInt,req=false", \
+	"name=erasure_code_profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.=] " \
+	"name=ruleset,type=CephString,req=false,goodchars=[A-Za-z0-9-_.=]", \
 	"create pool", "osd", "rw", "cli,rest")
 COMMAND("osd pool delete " \
 	"name=pool,type=CephPoolname " \
@@ -576,11 +552,11 @@ COMMAND("osd pool rename " \
 	"rename <srcpool> to <destpool>", "osd", "rw", "cli,rest")
 COMMAND("osd pool get " \
 	"name=pool,type=CephPoolname " \
-	"name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|auid|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote", \
+	"name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|auid|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile", \
 	"get pool parameter <var>", "osd", "r", "cli,rest")
 COMMAND("osd pool set " \
 	"name=pool,type=CephPoolname " \
-	"name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hashpspool|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|debug_fake_ec_pool|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid|min_read_recency_for_promote " \
+	"name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hashpspool|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|debug_fake_ec_pool|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid " \
 	"name=val,type=CephString " \
 	"name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
 	"set pool parameter <var> to <val>", "osd", "rw", "cli,rest")
@@ -604,11 +580,6 @@ COMMAND("osd reweight-by-utilization " \
 	"name=oload,type=CephInt,range=100,req=false", \
 	"reweight OSDs by utilization [overload-percentage-for-consideration, default 120]", \
 	"osd", "rw", "cli,rest")
-COMMAND("osd reweight-by-pg " \
-	"name=oload,type=CephInt,range=100 " \
-	"name=pools,type=CephPoolname,n=N,req=false", \
-	"reweight OSDs by PG distribution [overload-percentage-for-consideration, default 120]", \
-	"osd", "rw", "cli,rest")
 COMMAND("osd thrash " \
 	"name=num_epochs,type=CephInt,range=0", \
 	"thrash OSDs for <num_epochs>", "osd", "rw", "cli,rest")
@@ -627,7 +598,7 @@ COMMAND("osd tier remove " \
 	"osd", "rw", "cli,rest")
 COMMAND("osd tier cache-mode " \
 	"name=pool,type=CephPoolname " \
-	"name=mode,type=CephChoices,strings=none|writeback|forward|readonly|readforward", \
+	"name=mode,type=CephChoices,strings=none|writeback|forward|readonly", \
 	"specify the caching mode for cache tier <pool>", "osd", "rw", "cli,rest")
 COMMAND("osd tier set-overlay " \
 	"name=pool,type=CephPoolname " \
diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc
index d511b40..cf48123 100644
--- a/src/mon/MonMap.cc
+++ b/src/mon/MonMap.cc
@@ -130,7 +130,7 @@ void MonMap::print(ostream& out) const
 
 void MonMap::dump(Formatter *f) const
 {
-  f->dump_unsigned("epoch", epoch);
+  f->dump_int("epoch", epoch);
   f->dump_stream("fsid") <<  fsid;
   f->dump_stream("modified") << last_changed;
   f->dump_stream("created") << created;
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 52df6f0..ad35e5e 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -65,7 +65,6 @@
 #include "include/color.h"
 #include "include/ceph_fs.h"
 #include "include/str_list.h"
-#include "include/str_map.h"
 
 #include "OSDMonitor.h"
 #include "MDSMonitor.h"
@@ -142,7 +141,7 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorDBStore *s,
   has_ever_joined(false),
   logger(NULL), cluster_logger(NULL), cluster_logger_registered(false),
   monmap(map),
-  log_client(cct_, messenger, monmap, LogClient::FLAG_MON),
+  clog(cct_, messenger, monmap, LogClient::FLAG_MON),
   key_server(cct, &keyring),
   auth_cluster_required(cct,
 			cct->_conf->auth_supported.length() ?
@@ -182,11 +181,6 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorDBStore *s,
 {
   rank = -1;
 
-  clog = log_client.create_channel(CLOG_CHANNEL_CLUSTER);
-  audit_clog = log_client.create_channel(CLOG_CHANNEL_AUDIT);
-
-  update_log_clients();
-
   paxos = new Paxos(this, "paxos");
 
   paxos_service[PAXOS_MDSMAP] = new MDSMonitor(this, paxos, "mdsmap");
@@ -249,6 +243,12 @@ Monitor::~Monitor()
 }
 
 
+enum {
+  l_mon_first = 456000,
+  l_mon_last,
+};
+
+
 class AdminHook : public AdminSocketHook {
   Monitor *mon;
 public:
@@ -269,45 +269,26 @@ void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format,
 
   boost::scoped_ptr<Formatter> f(new_formatter(format));
 
-  string args;
-  for (cmdmap_t::iterator p = cmdmap.begin();
-       p != cmdmap.end(); ++p) {
-    if (p->first == "prefix")
-      continue;
-    if (!args.empty())
-      args += ", ";
-    args += cmd_vartype_stringify(p->second);
-  }
-  args = "[" + args + "]";
- 
-  bool read_only = false;
-  if (command == "mon_status" || command == "quorum_status") {
-    read_only = true;
-  }
-
-  (read_only ? audit_clog->debug() : audit_clog->info())
-    << "from='admin socket' entity='admin socket' "
-    << "cmd='" << command << "' args=" << args << ": dispatch";
-
   if (command == "mon_status") {
     get_mon_status(f.get(), ss);
     if (f)
       f->flush(ss);
-  } else if (command == "quorum_status") {
+  } else if (command == "quorum_status")
     _quorum_status(f.get(), ss);
-  } else if (command == "sync_force") {
+  else if (command == "sync_force") {
     string validate;
     if ((!cmd_getval(g_ceph_context, cmdmap, "validate", validate)) ||
 	(validate != "--yes-i-really-mean-it")) {
       ss << "are you SURE? this will mean the monitor store will be erased "
             "the next time the monitor is restarted.  pass "
             "'--yes-i-really-mean-it' if you really do.";
-      goto abort;
+      return;
     }
     sync_force(f.get(), ss);
   } else if (command.find("add_bootstrap_peer_hint") == 0) {
-    if (!_add_bootstrap_peer_hint(command, cmdmap, ss))
-      goto abort;
+    _add_bootstrap_peer_hint(command, cmdmap, ss);
+  } else if (command.find("osdmonitor_prepare_command") == 0) {
+    _osdmonitor_prepare_command(cmdmap, ss);
   } else if (command == "quorum enter") {
     elector.start_participating();
     start_election();
@@ -316,22 +297,8 @@ void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format,
     start_election();
     elector.stop_participating();
     ss << "stopped responding to quorum, initiated new election";
-  } else {
+  } else
     assert(0 == "bad AdminSocket command binding");
-  }
-  (read_only ? audit_clog->debug() : audit_clog->info())
-    << "from='admin socket' "
-    << "entity='admin socket' "
-    << "cmd=" << command << " "
-    << "args=" << args << ": finished";
-  return;
-
-abort:
-  (read_only ? audit_clog->debug() : audit_clog->info())
-    << "from='admin socket' "
-    << "entity='admin socket' "
-    << "cmd=" << command << " "
-    << "args=" << args << ": aborted";
 }
 
 void Monitor::handle_signal(int signum)
@@ -350,7 +317,6 @@ CompatSet Monitor::get_supported_features()
   ceph_mon_feature_incompat.insert(CEPH_MON_FEATURE_INCOMPAT_SINGLE_PAXOS);
   ceph_mon_feature_incompat.insert(CEPH_MON_FEATURE_INCOMPAT_OSD_ERASURE_CODES);
   ceph_mon_feature_incompat.insert(CEPH_MON_FEATURE_INCOMPAT_OSDMAP_ENC);
-  ceph_mon_feature_incompat.insert(CEPH_MON_FEATURE_INCOMPAT_ERASURE_CODE_PLUGINS_V2);
   return CompatSet(ceph_mon_feature_compat, ceph_mon_feature_ro_compat,
 		   ceph_mon_feature_incompat);
 }
@@ -395,8 +361,8 @@ void Monitor::read_features_off_disk(MonitorDBStore *store, CompatSet *features)
 
     bufferlist bl;
     features->encode(bl);
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    t->put(MONITOR_NAME, COMPAT_SET_LOC, bl);
+    MonitorDBStore::Transaction t;
+    t.put(MONITOR_NAME, COMPAT_SET_LOC, bl);
     store->apply_transaction(t);
   } else {
     bufferlist::iterator it = featuresbl.begin();
@@ -413,143 +379,11 @@ void Monitor::read_features()
   dout(10) << "required_features " << required_features << dendl;
 }
 
-void Monitor::write_features(MonitorDBStore::TransactionRef t)
+void Monitor::write_features(MonitorDBStore::Transaction &t)
 {
   bufferlist bl;
   features.encode(bl);
-  t->put(MONITOR_NAME, COMPAT_SET_LOC, bl);
-}
-
-const char** Monitor::get_tracked_conf_keys() const
-{
-  static const char* KEYS[] = {
-    "mon_lease",
-    "mon_lease_renew_interval",
-    "mon_lease_ack_timeout",
-    // clog & admin clog
-    "clog_to_monitors",
-    "clog_to_syslog",
-    "clog_to_syslog_facility",
-    "clog_to_syslog_level",
-    NULL
-  };
-  return KEYS;
-}
-
-void Monitor::handle_conf_change(const struct md_config_t *conf,
-                                 const std::set<std::string> &changed)
-{
-  sanitize_options();
-
-  dout(10) << __func__ << " " << changed << dendl;
-
-  if (changed.count("clog_to_monitors") ||
-      changed.count("clog_to_syslog") ||
-      changed.count("clog_to_syslog_level") ||
-      changed.count("clog_to_syslog_facility")) {
-    update_log_clients();
-  }
-}
-
-void Monitor::update_log_client(
-    LogChannelRef lc, const string &name,
-    map<string,string> &log_to_monitors,
-    map<string,string> &log_to_syslog,
-    map<string,string> &log_channels,
-    map<string,string> &log_prios)
-{
-  bool to_monitors = (get_str_map_key(log_to_monitors, name,
-                                      &CLOG_CHANNEL_DEFAULT) == "true");
-  bool to_syslog = (get_str_map_key(log_to_syslog, name,
-                                    &CLOG_CHANNEL_DEFAULT) == "true");
-  string syslog_facility = get_str_map_key(log_channels, name,
-                                           &CLOG_CHANNEL_DEFAULT);
-  string prio = get_str_map_key(log_prios, name, &CLOG_CHANNEL_DEFAULT);
-
-  lc->set_log_to_monitors(to_monitors);
-  lc->set_log_to_syslog(to_syslog);
-  lc->set_syslog_facility(syslog_facility);
-  lc->set_log_channel(name);
-  lc->set_log_prio(prio);
-
-  dout(15) << __func__ << " " << name << "("
-           << " to_monitors: " << (to_monitors ? "true" : "false")
-           << " to_syslog: " << (to_syslog ? "true" : "false")
-           << " syslog_facility: " << syslog_facility
-           << " prio: " << prio << ")" << dendl;
-}
-
-void Monitor::update_log_clients()
-{
-  map<string,string> log_to_monitors;
-  map<string,string> log_to_syslog;
-  map<string,string> log_channel;
-  map<string,string> log_prio;
-  ostringstream oss;
-
-  int r = get_conf_str_map_helper(g_conf->clog_to_monitors, oss,
-                                  &log_to_monitors, CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'clog_to_monitors'" << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->clog_to_syslog, oss,
-                              &log_to_syslog, CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'clog_to_syslog'" << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->clog_to_syslog_facility, oss,
-                              &log_channel, CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'clog_to_syslog_facility'" << dendl;
-    return;
-  }
-
-  r = get_conf_str_map_helper(g_conf->clog_to_syslog_level, oss,
-                              &log_prio, CLOG_CHANNEL_DEFAULT);
-  if (r < 0) {
-    derr << __func__ << " error parsing 'clog_to_syslog_level'" << dendl;
-    return;
-  }
-
-  update_log_client(clog, CLOG_CHANNEL_CLUSTER,
-                    log_to_monitors, log_to_syslog,
-                    log_channel, log_prio);
-  update_log_client(audit_clog, CLOG_CHANNEL_AUDIT,
-                    log_to_monitors, log_to_syslog,
-                    log_channel, log_prio);
-}
-
-int Monitor::sanitize_options()
-{
-  int r = 0;
-
-  // mon_lease must be greater than mon_lease_renewal; otherwise we
-  // may incur in leases expiring before they are renewed.
-  if (g_conf->mon_lease <= g_conf->mon_lease_renew_interval) {
-    clog->error() << "mon_lease (" << g_conf->mon_lease
-                 << ") must be greater "
-                 << "than mon_lease_renew_interval ("
-                 << g_conf->mon_lease_renew_interval << ")";
-    r = -EINVAL;
-  }
-
-  // mon_lease_ack_timeout must be greater than mon_lease to make sure we've
-  // got time to renew the lease and get an ack for it. Having both options
-  // with the same value, for a given small vale, could mean timing out if
-  // the monitors happened to be overloaded -- or even under normal load for
-  // a small enough value.
-  if (g_conf->mon_lease_ack_timeout <= g_conf->mon_lease) {
-    clog->error() << "mon_lease_ack_timeout ("
-                 << g_conf->mon_lease_ack_timeout
-                 << ") must be greater than mon_lease ("
-                 << g_conf->mon_lease << ")";
-    r = -EINVAL;
-  }
-  return r;
+  t.put(MONITOR_NAME, COMPAT_SET_LOC, bl);
 }
 
 int Monitor::preinit()
@@ -557,24 +391,11 @@ int Monitor::preinit()
   lock.Lock();
 
   dout(1) << "preinit fsid " << monmap->fsid << dendl;
-
-  int r = sanitize_options();
-  if (r < 0) {
-    derr << "option sanitization failed!" << dendl;
-    return r;
-  }
-
+  
   assert(!logger);
   {
     PerfCountersBuilder pcb(g_ceph_context, "mon", l_mon_first, l_mon_last);
-    pcb.add_u64(l_mon_num_sessions, "num_sessions");
-    pcb.add_u64_counter(l_mon_session_add, "session_add");
-    pcb.add_u64_counter(l_mon_session_rm, "session_rm");
-    pcb.add_u64_counter(l_mon_session_trim, "session_trim");
-    pcb.add_u64_counter(l_mon_num_elections, "num_elections");
-    pcb.add_u64_counter(l_mon_election_call, "election_call");
-    pcb.add_u64_counter(l_mon_election_win, "election_win");
-    pcb.add_u64_counter(l_mon_election_lose, "election_lose");
+    // ...
     logger = pcb.create_perf_counters();
     cct->get_perfcounters_collection()->add(logger);
   }
@@ -588,9 +409,9 @@ int Monitor::preinit()
     pcb.add_u64(l_cluster_num_osd_up, "num_osd_up");
     pcb.add_u64(l_cluster_num_osd_in, "num_osd_in");
     pcb.add_u64(l_cluster_osd_epoch, "osd_epoch");
-    pcb.add_u64(l_cluster_osd_bytes, "osd_bytes");
-    pcb.add_u64(l_cluster_osd_bytes_used, "osd_bytes_used");
-    pcb.add_u64(l_cluster_osd_bytes_avail, "osd_bytes_avail");
+    pcb.add_u64(l_cluster_osd_kb, "osd_kb");
+    pcb.add_u64(l_cluster_osd_kb_used, "osd_kb_used");
+    pcb.add_u64(l_cluster_osd_kb_avail, "osd_kb_avail");
     pcb.add_u64(l_cluster_num_pool, "num_pool");
     pcb.add_u64(l_cluster_num_pg, "num_pg");
     pcb.add_u64(l_cluster_num_pg_active_clean, "num_pg_active_clean");
@@ -598,7 +419,6 @@ int Monitor::preinit()
     pcb.add_u64(l_cluster_num_pg_peering, "num_pg_peering");
     pcb.add_u64(l_cluster_num_object, "num_object");
     pcb.add_u64(l_cluster_num_object_degraded, "num_object_degraded");
-    pcb.add_u64(l_cluster_num_object_misplaced, "num_object_misplaced");
     pcb.add_u64(l_cluster_num_object_unfound, "num_object_unfound");
     pcb.add_u64(l_cluster_num_bytes, "num_bytes");
     pcb.add_u64(l_cluster_num_mds_up, "num_mds_up");
@@ -681,6 +501,8 @@ int Monitor::preinit()
   init_paxos();
   health_monitor->init();
 
+  int r;
+
   if (is_keyring_required()) {
     // we need to bootstrap authentication keys so we can form an
     // initial quorum.
@@ -723,6 +545,11 @@ int Monitor::preinit()
   r = admin_socket->register_command("mon_status", "mon_status", admin_hook,
 				     "show current monitor status");
   assert(r == 0);
+  if (g_conf->mon_advanced_debug_mode) {
+    r = admin_socket->register_command("osdmonitor_prepare_command", "osdmonitor_prepare_command", admin_hook,
+				       "call OSDMonitor::prepare_command");
+    assert(r == 0);
+  }
   r = admin_socket->register_command("quorum_status", "quorum_status",
 				     admin_hook, "show current quorum status");
   assert(r == 0);
@@ -750,9 +577,6 @@ int Monitor::preinit()
   assert(r == 0);
   lock.Lock();
 
-  // add ourselves as a conf observer
-  g_conf->add_observer(this);
-
   lock.Unlock();
   return 0;
 }
@@ -853,9 +677,7 @@ void Monitor::update_logger()
 void Monitor::shutdown()
 {
   dout(1) << "shutdown" << dendl;
-
   lock.Lock();
-  wait_for_paxos_write();
 
   state = STATE_SHUTDOWN;
 
@@ -870,19 +692,6 @@ void Monitor::shutdown()
   }
 
   elector.shutdown();
-  
-  // clean up
-  paxos->shutdown();
-  for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); ++p)
-    (*p)->shutdown();
-  health_monitor->shutdown();
-
-  finish_contexts(g_ceph_context, waitfor_quorum, -ECANCELED);
-  finish_contexts(g_ceph_context, maybe_wait_for_quorum, -ECANCELED);
-
-  timer.shutdown();
-
-  remove_all_sessions();
 
   if (logger) {
     cct->get_perfcounters_collection()->remove(logger);
@@ -895,8 +704,19 @@ void Monitor::shutdown()
     delete cluster_logger;
     cluster_logger = NULL;
   }
+  
+  // clean up
+  paxos->shutdown();
+  for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); ++p)
+    (*p)->shutdown();
+  health_monitor->shutdown();
 
-  log_client.shutdown();
+  finish_contexts(g_ceph_context, waitfor_quorum, -ECANCELED);
+  finish_contexts(g_ceph_context, maybe_wait_for_quorum, -ECANCELED);
+
+  timer.shutdown();
+
+  remove_all_sessions();
 
   // unlock before msgr shutdown...
   lock.Unlock();
@@ -904,21 +724,9 @@ void Monitor::shutdown()
   messenger->shutdown();  // last thing!  ceph_mon.cc will delete mon.
 }
 
-void Monitor::wait_for_paxos_write()
-{
-  if (paxos->is_writing() || paxos->is_writing_previous()) {
-    dout(10) << __func__ << " flushing pending write" << dendl;
-    lock.Unlock();
-    store->flush();
-    lock.Lock();
-    dout(10) << __func__ << " flushed pending write" << dendl;
-  }
-}
-
 void Monitor::bootstrap()
 {
   dout(10) << "bootstrap" << dendl;
-  wait_for_paxos_write();
 
   sync_reset_requester();
   unregister_cluster_logger();
@@ -985,13 +793,33 @@ void Monitor::bootstrap()
   }
 }
 
-bool Monitor::_add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss)
+void Monitor::_osdmonitor_prepare_command(cmdmap_t& cmdmap, ostream& ss)
+{
+  if (!is_leader()) {
+    ss << "mon must be a leader";
+    return;
+  }
+
+  string cmd;
+  cmd_getval(g_ceph_context, cmdmap, "prepare", cmd);
+  cmdmap["prefix"] = cmdmap["prepare"];
+  
+  OSDMonitor *monitor = osdmon();
+  MMonCommand *m = static_cast<MMonCommand *>((new MMonCommand())->get());
+  if (monitor->prepare_command_impl(m, cmdmap))
+    ss << "true";
+  else
+    ss << "false";
+  m->put();
+}
+
+void Monitor::_add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss)
 {
   string addrstr;
   if (!cmd_getval(g_ceph_context, cmdmap, "addr", addrstr)) {
     ss << "unable to parse address string value '"
          << cmd_vartype_stringify(cmdmap["addr"]) << "'";
-    return false;
+    return;
   }
   dout(10) << "_add_bootstrap_peer_hint '" << cmd << "' '"
            << addrstr << "'" << dendl;
@@ -1000,12 +828,12 @@ bool Monitor::_add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss
   const char *end = 0;
   if (!addr.parse(addrstr.c_str(), &end)) {
     ss << "failed to parse addr '" << addrstr << "'; syntax is 'add_bootstrap_peer_hint ip[:port]'";
-    return false;
+    return;
   }
 
   if (is_leader() || is_peon()) {
     ss << "mon already active; ignoring bootstrap hint";
-    return true;
+    return;
   }
 
   if (addr.get_port() == 0)
@@ -1013,7 +841,6 @@ bool Monitor::_add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss
 
   extra_probe_peers.insert(addr);
   ss << "adding peer " << addr << " to list: " << extra_probe_peers;
-  return true;
 }
 
 // called by bootstrap(), or on leader|peon -> electing
@@ -1021,6 +848,9 @@ void Monitor::_reset()
 {
   dout(10) << __func__ << dendl;
 
+  assert(state == STATE_ELECTING ||
+	 state == STATE_PROBING);
+
   cancel_probe_timeout();
   timecheck_finish();
 
@@ -1148,14 +978,14 @@ void Monitor::sync_start(entity_inst_t &other, bool full)
 
   if (sync_full) {
     // stash key state, and mark that we are syncing
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    sync_stash_critical_state(t);
-    t->put("mon_sync", "in_sync", 1);
+    MonitorDBStore::Transaction t;
+    sync_stash_critical_state(&t);
+    t.put("mon_sync", "in_sync", 1);
 
     sync_last_committed_floor = MAX(sync_last_committed_floor, paxos->get_version());
     dout(10) << __func__ << " marking sync in progress, storing sync_last_committed_floor "
 	     << sync_last_committed_floor << dendl;
-    t->put("mon_sync", "last_committed_floor", sync_last_committed_floor);
+    t.put("mon_sync", "last_committed_floor", sync_last_committed_floor);
 
     store->apply_transaction(t);
 
@@ -1186,7 +1016,7 @@ void Monitor::sync_start(entity_inst_t &other, bool full)
   messenger->send_message(m, sync_provider);
 }
 
-void Monitor::sync_stash_critical_state(MonitorDBStore::TransactionRef t)
+void Monitor::sync_stash_critical_state(MonitorDBStore::Transaction *t)
 {
   dout(10) << __func__ << dendl;
   bufferlist backup_monmap;
@@ -1212,14 +1042,13 @@ void Monitor::sync_finish(version_t last_committed)
 
   if (sync_full) {
     // finalize the paxos commits
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    paxos->read_and_prepare_transactions(tx, sync_start_version,
-					 last_committed);
-    tx->put(paxos->get_name(), "last_committed", last_committed);
+    MonitorDBStore::Transaction tx;
+    paxos->read_and_prepare_transactions(&tx, sync_start_version, last_committed);
+    tx.put(paxos->get_name(), "last_committed", last_committed);
 
     dout(30) << __func__ << " final tx dump:\n";
     JSONFormatter f(true);
-    tx->dump(&f);
+    tx.dump(&f);
     f.flush(*_dout);
     *_dout << dendl;
 
@@ -1228,10 +1057,10 @@ void Monitor::sync_finish(version_t last_committed)
 
   assert(g_conf->mon_sync_requester_kill_at != 8);
 
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  t->erase("mon_sync", "in_sync");
-  t->erase("mon_sync", "force_sync");
-  t->erase("mon_sync", "last_committed_floor");
+  MonitorDBStore::Transaction t;
+  t.erase("mon_sync", "in_sync");
+  t.erase("mon_sync", "force_sync");
+  t.erase("mon_sync", "last_committed_floor");
   store->apply_transaction(t);
 
   assert(g_conf->mon_sync_requester_kill_at != 9);
@@ -1284,7 +1113,7 @@ void Monitor::handle_sync(MMonSync *m)
 void Monitor::_sync_reply_no_cookie(MMonSync *m)
 {
   MMonSync *reply = new MMonSync(MMonSync::OP_NO_COOKIE, m->cookie);
-  m->get_connection()->send_message(reply);
+  messenger->send_message(reply, m->get_connection());
 }
 
 void Monitor::handle_sync_get_cookie(MMonSync *m)
@@ -1336,7 +1165,7 @@ void Monitor::handle_sync_get_cookie(MMonSync *m)
 
   MMonSync *reply = new MMonSync(MMonSync::OP_COOKIE, sp.cookie);
   reply->last_committed = sp.last_committed;
-  m->get_connection()->send_message(reply);
+  messenger->send_message(reply, m->get_connection());
 }
 
 void Monitor::handle_sync_get_chunk(MMonSync *m)
@@ -1364,17 +1193,16 @@ void Monitor::handle_sync_get_chunk(MMonSync *m)
   }
 
   MMonSync *reply = new MMonSync(MMonSync::OP_CHUNK, sp.cookie);
-  MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction tx;
 
   int left = g_conf->mon_sync_max_payload_size;
   while (sp.last_committed < paxos->get_version() && left > 0) {
     bufferlist bl;
     sp.last_committed++;
     store->get(paxos->get_name(), sp.last_committed, bl);
-    tx->put(paxos->get_name(), sp.last_committed, bl);
+    tx.put(paxos->get_name(), sp.last_committed, bl);
     left -= bl.length();
-    dout(20) << __func__ << " including paxos state " << sp.last_committed
-	     << dendl;
+    dout(20) << __func__ << " including paxos state " << sp.last_committed << dendl;
   }
   reply->last_committed = sp.last_committed;
 
@@ -1386,11 +1214,9 @@ void Monitor::handle_sync_get_chunk(MMonSync *m)
 
   if ((sp.full && sp.synchronizer->has_next_chunk()) ||
       sp.last_committed < paxos->get_version()) {
-    dout(10) << __func__ << " chunk, through version " << sp.last_committed
-	     << " key " << sp.last_key << dendl;
+    dout(10) << __func__ << " chunk, through version " << sp.last_committed << " key " << sp.last_key << dendl;
   } else {
-    dout(10) << __func__ << " last chunk, through version " << sp.last_committed
-	     << " key " << sp.last_key << dendl;
+    dout(10) << __func__ << " last chunk, through version " << sp.last_committed << " key " << sp.last_key << dendl;
     reply->op = MMonSync::OP_LAST_CHUNK;
 
     assert(g_conf->mon_sync_provider_kill_at != 3);
@@ -1399,9 +1225,9 @@ void Monitor::handle_sync_get_chunk(MMonSync *m)
     sync_providers.erase(sp.cookie);
   }
 
-  ::encode(*tx, reply->chunk_bl);
+  ::encode(tx, reply->chunk_bl);
 
-  m->get_connection()->send_message(reply);
+  messenger->send_message(reply, m->get_connection());
 }
 
 // requester
@@ -1455,12 +1281,12 @@ void Monitor::handle_sync_chunk(MMonSync *m)
   assert(state == STATE_SYNCHRONIZING);
   assert(g_conf->mon_sync_requester_kill_at != 5);
 
-  MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-  tx->append_from_encoded(m->chunk_bl);
+  MonitorDBStore::Transaction tx;
+  tx.append_from_encoded(m->chunk_bl);
 
   dout(30) << __func__ << " tx dump:\n";
   JSONFormatter f(true);
-  tx->dump(&f);
+  tx.dump(&f);
   f.flush(*_dout);
   *_dout << dendl;
 
@@ -1470,14 +1296,13 @@ void Monitor::handle_sync_chunk(MMonSync *m)
 
   if (!sync_full) {
     dout(10) << __func__ << " applying recent paxos transactions as we go" << dendl;
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    paxos->read_and_prepare_transactions(tx, paxos->get_version() + 1,
-					 m->last_committed);
-    tx->put(paxos->get_name(), "last_committed", m->last_committed);
+    MonitorDBStore::Transaction tx;
+    paxos->read_and_prepare_transactions(&tx, paxos->get_version() + 1, m->last_committed);
+    tx.put(paxos->get_name(), "last_committed", m->last_committed);
 
     dout(30) << __func__ << " tx dump:\n";
     JSONFormatter f(true);
-    tx->dump(&f);
+    tx.dump(&f);
     f.flush(*_dout);
     *_dout << dendl;
 
@@ -1583,6 +1408,8 @@ void Monitor::handle_probe(MMonProbe *m)
  */
 void Monitor::handle_probe_probe(MMonProbe *m)
 {
+  MMonProbe *r;
+
   dout(10) << "handle_probe_probe " << m->get_source_inst() << *m
 	   << " features " << m->get_connection()->get_features() << dendl;
   uint64_t missing = required_features & ~m->get_connection()->get_features();
@@ -1593,20 +1420,34 @@ void Monitor::handle_probe_probe(MMonProbe *m)
       MMonProbe *r = new MMonProbe(monmap->fsid, MMonProbe::OP_MISSING_FEATURES,
 				   name, has_ever_joined);
       m->required_features = required_features;
-      m->get_connection()->send_message(r);
+      messenger->send_message(r, m->get_connection());
     }
-    m->put();
-    return;
+    goto out;
   }
 
-  MMonProbe *r = new MMonProbe(monmap->fsid, MMonProbe::OP_REPLY,
-			       name, has_ever_joined);
+  if (!is_probing() && !is_synchronizing()) {
+    // If the probing mon is way ahead of us, we need to re-bootstrap.
+    // Normally we capture this case when we initially bootstrap, but
+    // it is possible we pass those checks (we overlap with
+    // quorum-to-be) but fail to join a quorum before it moves past
+    // us.  We need to be kicked back to bootstrap so we can
+    // synchonize, not keep calling elections.
+    if (paxos->get_version() + 1 < m->paxos_first_version) {
+      dout(1) << " peer " << m->get_source_addr() << " has first_committed "
+	      << "ahead of us, re-bootstrapping" << dendl;
+      bootstrap();
+      goto out;
+
+    }
+  }
+
+  r = new MMonProbe(monmap->fsid, MMonProbe::OP_REPLY, name, has_ever_joined);
   r->name = name;
   r->quorum = quorum;
   monmap->encode(r->monmap_bl, m->get_connection()->get_features());
   r->paxos_first_version = paxos->get_first_committed();
   r->paxos_last_version = paxos->get_version();
-  m->get_connection()->send_message(r);
+  messenger->send_message(r, m->get_connection());
 
   // did we discover a peer here?
   if (!monmap->contains(m->get_source_addr())) {
@@ -1615,6 +1456,7 @@ void Monitor::handle_probe_probe(MMonProbe *m)
     extra_probe_peers.insert(m->get_source_addr());
   }
 
+ out:
   m->put();
 }
 
@@ -1773,26 +1615,19 @@ void Monitor::handle_probe_reply(MMonProbe *m)
 void Monitor::join_election()
 {
   dout(10) << __func__ << dendl;
-  wait_for_paxos_write();
-  _reset();
   state = STATE_ELECTING;
-
-  logger->inc(l_mon_num_elections);
+  _reset();
 }
 
 void Monitor::start_election()
 {
   dout(10) << "start_election" << dendl;
-  wait_for_paxos_write();
-  _reset();
   state = STATE_ELECTING;
-
-  logger->inc(l_mon_num_elections);
-  logger->inc(l_mon_election_call);
+  _reset();
 
   cancel_probe_timeout();
 
-  clog->info() << "mon." << name << " calling new monitor election\n";
+  clog.info() << "mon." << name << " calling new monitor election\n";
   elector.call_election();
 }
 
@@ -1840,7 +1675,7 @@ void Monitor::win_election(epoch_t epoch, set<int>& active, uint64_t features,
   quorum_features = features;
   outside_quorum.clear();
 
-  clog->info() << "mon." << name << "@" << rank
+  clog.info() << "mon." << name << "@" << rank
 		<< " won leader election with quorum " << quorum << "\n";
 
   set_leader_supported_commands(cmdset, cmdsize);
@@ -1861,8 +1696,6 @@ void Monitor::win_election(epoch_t epoch, set<int>& active, uint64_t features,
   }
   health_monitor->start(epoch);
 
-  logger->inc(l_mon_election_win);
-
   finish_election();
   if (monmap->size() > 1 &&
       monmap->get_epoch() > 0)
@@ -1885,8 +1718,6 @@ void Monitor::lose_election(epoch_t epoch, set<int> &q, int l, uint64_t features
     (*p)->election_finished();
   health_monitor->start(epoch);
 
-  logger->inc(l_mon_election_win);
-
   finish_election();
 }
 
@@ -1919,15 +1750,13 @@ void Monitor::apply_quorum_to_compatset_features()
   if (quorum_features & CEPH_FEATURE_OSDMAP_ENC) {
     new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_OSDMAP_ENC);
   }
-  if (quorum_features & CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2) {
-    new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_ERASURE_CODE_PLUGINS_V2);
-  }
+
   if (new_features.compare(features) != 0) {
     CompatSet diff = features.unsupported(new_features);
     dout(1) << __func__ << " enabling new quorum features: " << diff << dendl;
     features = new_features;
 
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+    MonitorDBStore::Transaction t;
     write_features(t);
     store->apply_transaction(t);
 
@@ -1944,9 +1773,6 @@ void Monitor::apply_compatset_features_to_quorum_requirements()
   if (features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_OSDMAP_ENC)) {
     required_features |= CEPH_FEATURE_OSDMAP_ENC;
   }
-  if (features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_ERASURE_CODE_PLUGINS_V2)) {
-    required_features |= CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2;
-  }
   dout(10) << __func__ << " required_features " << required_features << dendl;
 }
 
@@ -1960,9 +1786,9 @@ void Monitor::sync_force(Formatter *f, ostream& ss)
     free_formatter = true;
   }
 
-  MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-  sync_stash_critical_state(tx);
-  tx->put("mon_sync", "force_sync", 1);
+  MonitorDBStore::Transaction tx;
+  sync_stash_critical_state(&tx);
+  tx.put("mon_sync", "force_sync", 1);
   store->apply_transaction(tx);
 
   f->open_object_section("sync_force");
@@ -2125,7 +1951,7 @@ void Monitor::get_health(string& status, bufferlist *detailbl, Formatter *f)
 
   if (f) {
     f->open_object_section("timechecks");
-    f->dump_unsigned("epoch", get_epoch());
+    f->dump_int("epoch", get_epoch());
     f->dump_int("round", timecheck_round);
     f->dump_stream("round_status")
       << ((timecheck_round%2) ? "on-going" : "finished");
@@ -2248,7 +2074,7 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f)
     ss << "     health " << health << "\n";
     ss << "     monmap " << *monmap << ", election epoch " << get_epoch()
        << ", quorum " << get_quorum() << " " << get_quorum_names() << "\n";
-    if (mdsmon()->mdsmap.get_enabled())
+    if (mdsmon()->mdsmap.get_epoch() > 1)
       ss << "     mdsmap " << mdsmon()->mdsmap << "\n";
     osdmon()->osdmap.print_summary(NULL, ss);
     pgmon()->pg_map.print_summary(NULL, &ss);
@@ -2296,9 +2122,9 @@ bool Monitor::_allowed_command(MonSession *s, string &module, string &prefix,
                                const map<string,string>& param_str_map,
                                const MonCommand *this_cmd) {
 
-  bool cmd_r = this_cmd->requires_perm('r');
-  bool cmd_w = this_cmd->requires_perm('w');
-  bool cmd_x = this_cmd->requires_perm('x');
+  bool cmd_r = (this_cmd->req_perms.find('r') != string::npos);
+  bool cmd_w = (this_cmd->req_perms.find('w') != string::npos);
+  bool cmd_x = (this_cmd->req_perms.find('x') != string::npos);
 
   bool capable = s->caps.is_capable(g_ceph_context, s->inst.name,
                                     module, prefix, param_str_map,
@@ -2450,40 +2276,17 @@ void Monitor::handle_command(MMonCommand *m)
     forward_request_leader(m);
     return;
   }
-  
-  /* what we perceive as being the service the command falls under */
-  string service(mon_cmd->module);
-
-  dout(25) << __func__ << " prefix='" << prefix
-           << "' module='" << module
-           << "' service='" << service << "'" << dendl;
-
-  bool cmd_is_rw =
-    (mon_cmd->requires_perm('w') || mon_cmd->requires_perm('x'));
-
   // validate user's permissions for requested command
   map<string,string> param_str_map;
   _generate_command_map(cmdmap, param_str_map);
-  if (!_allowed_command(session, service, prefix, cmdmap,
+  if (!_allowed_command(session, module, prefix, cmdmap,
                         param_str_map, mon_cmd)) {
     dout(1) << __func__ << " access denied" << dendl;
-    (cmd_is_rw ? audit_clog->info() : audit_clog->debug())
-      << "from='" << session->inst << "' "
-      << "entity='" << session->auth_handler->get_entity_name()
-      << "' cmd=" << m->cmd << ":  access denied";
     reply_command(m, -EACCES, "access denied", 0);
     return;
   }
 
-  (cmd_is_rw ? audit_clog->info() : audit_clog->debug())
-    << "from='" << session->inst << "' "
-    << "entity='"
-    << (session->auth_handler ?
-        stringify(session->auth_handler->get_entity_name())
-        : "forwarded-request")
-    << "' cmd=" << m->cmd << ": dispatch";
-
-  if (module == "mds" || module == "fs") {
+  if (module == "mds") {
     mdsmon()->dispatch(m);
     return;
   }
@@ -2529,7 +2332,6 @@ void Monitor::handle_command(MMonCommand *m)
   }
 
   if (prefix == "scrub") {
-    wait_for_paxos_write();
     if (is_leader()) {
       int r = scrub();
       reply_command(m, r, "", rdata, 0);
@@ -2802,12 +2604,9 @@ void Monitor::handle_forward(MForward *m)
     dout(0) << "forward from entity with insufficient caps! " 
 	    << session->caps << dendl;
   } else {
-    // see PaxosService::dispatch(); we rely on this being anon
-    // (c->msgr == NULL)
-    ConnectionRef c = messenger->create_anon_connection();
-    MonSession *s = new MonSession(m->msg->get_source_inst(),
-				   static_cast<Connection*>(c.get()));
-    c->set_priv(s->get());
+    Connection *c = new Connection(NULL);  // msgr must be null; see PaxosService::dispatch()
+    MonSession *s = new MonSession(m->msg->get_source_inst(), c);
+    c->set_priv(s);
     c->set_peer_addr(m->client.addr);
     c->set_peer_type(m->client.name.type());
     c->set_features(m->con_features);
@@ -2843,7 +2642,6 @@ void Monitor::handle_forward(MForward *m)
     dout(10) << " mesg " << req << " from " << m->get_source_addr() << dendl;
 
     _ms_dispatch(req);
-    s->put();
   }
   session->put();
   m->put();
@@ -2884,9 +2682,10 @@ void Monitor::send_reply(PaxosServiceMessage *req, Message *reply)
     dout(15) << "send_reply routing reply to " << req->get_connection()->get_peer_addr()
 	     << " via " << session->proxy_con->get_peer_addr()
 	     << " for request " << *req << dendl;
-    session->proxy_con->send_message(new MRoute(session->proxy_tid, reply));
+    messenger->send_message(new MRoute(session->proxy_tid, reply),
+			    session->proxy_con);    
   } else {
-    session->con->send_message(reply);
+    messenger->send_message(reply, session->con);
   }
   session->put();
 }
@@ -2903,7 +2702,8 @@ void Monitor::no_reply(PaxosServiceMessage *req)
       dout(10) << "no_reply to " << req->get_source_inst()
 	       << " via " << session->proxy_con->get_peer_addr()
 	       << " for request " << *req << dendl;
-      session->proxy_con->send_message(new MRoute(session->proxy_tid, NULL));
+      messenger->send_message(new MRoute(session->proxy_tid, NULL),
+			      session->proxy_con);
     } else {
       dout(10) << "no_reply no quorum nullroute feature for " << req->get_source_inst()
 	       << " via " << session->proxy_con->get_peer_addr()
@@ -2939,7 +2739,7 @@ void Monitor::handle_route(MRoute *m)
       // reset payload, in case encoding is dependent on target features
       if (m->msg) {
 	m->msg->clear_payload();
-	rr->con->send_message(m->msg);
+	messenger->send_message(m->msg, rr->con);
 	m->msg = NULL;
       }
       routed_requests.erase(m->session_mon_tid);
@@ -2951,7 +2751,7 @@ void Monitor::handle_route(MRoute *m)
   } else {
     dout(10) << " not a routed request, trying to send anyway" << dendl;
     if (m->msg) {
-      messenger->send_message(m->msg, m->dest);
+      messenger->lazy_send_message(m->msg, m->dest);
       m->msg = NULL;
     }
   }
@@ -3009,8 +2809,6 @@ void Monitor::remove_session(MonSession *s)
   }
   s->con->set_priv(NULL);
   session_map.remove_session(s);
-  logger->set(l_mon_num_sessions, session_map.get_size());
-  logger->inc(l_mon_session_rm);
 }
 
 void Monitor::remove_all_sessions()
@@ -3018,9 +2816,7 @@ void Monitor::remove_all_sessions()
   while (!session_map.sessions.empty()) {
     MonSession *s = session_map.sessions.front();
     remove_session(s);
-    logger->inc(l_mon_session_rm);
   }
-  logger->set(l_mon_num_sessions, session_map.get_size());
 }
 
 void Monitor::send_command(const entity_inst_t& inst,
@@ -3056,16 +2852,18 @@ void Monitor::waitlist_or_zap_client(Message *m)
     maybe_wait_for_quorum.push_back(new C_RetryMessage(this, m));
   } else {
     dout(5) << "discarding message " << *m << " and sending client elsewhere" << dendl;
-    con->mark_down();
+    messenger->mark_down(con);
     m->put();
   }
 }
 
-void Monitor::_ms_dispatch(Message *m)
+bool Monitor::_ms_dispatch(Message *m)
 {
+  bool ret = true;
+
   if (is_shutdown()) {
     m->put();
-    return;
+    return true;
   }
 
   ConnectionRef connection = m->get_connection();
@@ -3105,12 +2903,12 @@ void Monitor::_ms_dispatch(Message *m)
       dout(1) << __func__ << " dropping stray message " << *m
 	      << " from " << m->get_source_inst() << dendl;
       m->put();
-      return;
+      return true;
     }
 
     if (!exited_quorum.is_zero() && !src_is_mon) {
       waitlist_or_zap_client(m);
-      return;
+      return true;
     }
 
     dout(10) << "do not have session, making new one" << dendl;
@@ -3118,9 +2916,6 @@ void Monitor::_ms_dispatch(Message *m)
     m->get_connection()->set_priv(s->get());
     dout(10) << "ms_dispatch new session " << s << " for " << s->inst << dendl;
 
-    logger->set(l_mon_num_sessions, session_map.get_size());
-    logger->inc(l_mon_session_add);
-
     if (!src_is_mon) {
       dout(10) << "setting timeout on session" << dendl;
       // set an initial timeout here, so we will trim this session even if they don't
@@ -3149,57 +2944,59 @@ void Monitor::_ms_dispatch(Message *m)
 
   if (is_synchronizing() && !src_is_mon) {
     waitlist_or_zap_client(m);
-    return;
+    return true;
   }
 
-  dispatch(s, m, src_is_mon);
+  ret = dispatch(s, m, src_is_mon);
 
   if (s) {
     s->put();
   }
 
-  return;
+  return ret;
 }
 
-void Monitor::dispatch(MonSession *s, Message *m, const bool src_is_mon)
+bool Monitor::dispatch(MonSession *s, Message *m, const bool src_is_mon)
 {
+  bool ret = true;
+
   assert(m != NULL);
 
-  /* deal with all messages that do not necessarily need caps */
-  bool dealt_with = true;
   switch (m->get_type()) {
-    // auth
-    case MSG_MON_GLOBAL_ID:
-    case CEPH_MSG_AUTH:
-      /* no need to check caps here */
-      paxos_service[PAXOS_AUTH]->dispatch((PaxosServiceMessage*)m);
-      break;
 
-    case CEPH_MSG_PING:
-      handle_ping(static_cast<MPing*>(m));
+    case MSG_ROUTE:
+      handle_route(static_cast<MRoute*>(m));
       break;
 
-    /* MMonGetMap may be used by clients to obtain a monmap *before*
-     * authenticating with the monitor.  We need to handle these without
-     * checking caps because, even on a cluster without cephx, we only set
-     * session caps *after* the auth handshake.  A good example of this
-     * is when a client calls MonClient::get_monmap_privately(), which does
-     * not authenticate when obtaining a monmap.
-     */
+    // misc
     case CEPH_MSG_MON_GET_MAP:
       handle_mon_get_map(static_cast<MMonGetMap*>(m));
       break;
 
-    default:
-      dealt_with = false;
+    case CEPH_MSG_MON_GET_VERSION:
+      handle_get_version(static_cast<MMonGetVersion*>(m));
       break;
-  }
-  if (dealt_with)
-    return;
 
-  /* deal with all messages which caps should be checked somewhere else */
-  dealt_with = true;
-  switch (m->get_type()) {
+    case MSG_MON_COMMAND:
+      handle_command(static_cast<MMonCommand*>(m));
+      break;
+
+    case CEPH_MSG_MON_SUBSCRIBE:
+      /* FIXME: check what's being subscribed, filter accordingly */
+      handle_subscribe(static_cast<MMonSubscribe*>(m));
+      break;
+
+    case MSG_MON_PROBE:
+      handle_probe(static_cast<MMonProbe*>(m));
+      break;
+
+    // Sync (i.e., the new slurp, but on steroids)
+    case MSG_MON_SYNC:
+      handle_sync(static_cast<MMonSync*>(m));
+      break;
+    case MSG_MON_SCRUB:
+      handle_scrub(static_cast<MMonScrub*>(m));
+      break;
 
     // OSDs
     case MSG_OSD_MARK_ME_DOWN:
@@ -3207,6 +3004,9 @@ void Monitor::dispatch(MonSession *s, Message *m, const bool src_is_mon)
     case MSG_OSD_BOOT:
     case MSG_OSD_ALIVE:
     case MSG_OSD_PGTEMP:
+      paxos_service[PAXOS_OSDMAP]->dispatch((PaxosServiceMessage*)m);
+      break;
+
     case MSG_REMOVE_SNAPS:
       paxos_service[PAXOS_OSDMAP]->dispatch((PaxosServiceMessage*)m);
       break;
@@ -3217,6 +3017,12 @@ void Monitor::dispatch(MonSession *s, Message *m, const bool src_is_mon)
       paxos_service[PAXOS_MDSMAP]->dispatch((PaxosServiceMessage*)m);
       break;
 
+    // auth
+    case MSG_MON_GLOBAL_ID:
+    case CEPH_MSG_AUTH:
+      /* no need to check caps here */
+      paxos_service[PAXOS_AUTH]->dispatch((PaxosServiceMessage*)m);
+      break;
 
     // pg
     case CEPH_MSG_STATFS:
@@ -3234,80 +3040,8 @@ void Monitor::dispatch(MonSession *s, Message *m, const bool src_is_mon)
       paxos_service[PAXOS_LOG]->dispatch((PaxosServiceMessage*)m);
       break;
 
-    // handle_command() does its own caps checking
-    case MSG_MON_COMMAND:
-      handle_command(static_cast<MMonCommand*>(m));
-      break;
-
-    default:
-      dealt_with = false;
-      break;
-  }
-  if (dealt_with)
-    return;
-
-  /* messages we, the Monitor class, need to deal with
-   * but may be sent by clients. */
-
-  if (!s->is_capable("mon", MON_CAP_R)) {
-    dout(5) << __func__ << " " << m->get_source_inst()
-            << " not enough caps for " << *m << " -- dropping"
-            << dendl;
-    goto drop;
-  }
-
-  dealt_with = true;
-  switch (m->get_type()) {
-
-    // misc
-    case CEPH_MSG_MON_GET_VERSION:
-      handle_get_version(static_cast<MMonGetVersion*>(m));
-      break;
-
-    case CEPH_MSG_MON_SUBSCRIBE:
-      /* FIXME: check what's being subscribed, filter accordingly */
-      handle_subscribe(static_cast<MMonSubscribe*>(m));
-      break;
-
-    default:
-      dealt_with = false;
-      break;
-  }
-  if (dealt_with)
-    return;
-
-  if (!src_is_mon) {
-    dout(1) << __func__ << " unexpected monitor message from"
-            << " non-monitor entity " << m->get_source_inst()
-            << " " << *m << " -- dropping" << dendl;
-    goto drop;
-  }
-
-  /* messages that should only be sent by another monitor */
-  dealt_with = true;
-  switch (m->get_type()) {
-
-    case MSG_ROUTE:
-      handle_route(static_cast<MRoute*>(m));
-      break;
-
-    case MSG_MON_PROBE:
-      handle_probe(static_cast<MMonProbe*>(m));
-      break;
-
-    // Sync (i.e., the new slurp, but on steroids)
-    case MSG_MON_SYNC:
-      handle_sync(static_cast<MMonSync*>(m));
-      break;
-    case MSG_MON_SCRUB:
-      handle_scrub(static_cast<MMonScrub*>(m));
-      break;
-
-    /* log acks are sent from a monitor we sent the MLog to, and are
-       never sent by clients to us. */
     case MSG_LOGACK:
-      log_client.handle_log_ack((MLogAck*)m);
-      m->put();
+      clog.handle_log_ack((MLogAck*)m);
       break;
 
     // monmap
@@ -3379,18 +3113,15 @@ void Monitor::dispatch(MonSession *s, Message *m, const bool src_is_mon)
       health_monitor->dispatch(static_cast<MMonHealth *>(m));
       break;
 
-    default:
-      dealt_with = false;
+    case CEPH_MSG_PING:
+      handle_ping(static_cast<MPing*>(m));
       break;
+
+    default:
+      ret = false;
   }
-  if (!dealt_with) {
-    dout(1) << "dropping unexpected " << *m << dendl;
-    goto drop;
-  }
-  return;
 
-drop:
-  m->put();
+  return ret;
 }
 
 void Monitor::handle_ping(MPing *m)
@@ -3703,9 +3434,9 @@ void Monitor::handle_timecheck_leader(MTimeCheck *m)
   ostringstream ss;
   health_status_t status = timecheck_status(ss, skew_bound, latency);
   if (status == HEALTH_ERR)
-    clog->error() << other << " " << ss.str() << "\n";
+    clog.error() << other << " " << ss.str() << "\n";
   else if (status == HEALTH_WARN)
-    clog->warn() << other << " " << ss.str() << "\n";
+    clog.warn() << other << " " << ss.str() << "\n";
 
   dout(10) << __func__ << " from " << other << " ts " << m->timestamp
 	   << " delta " << delta << " skew_bound " << skew_bound
@@ -3766,7 +3497,7 @@ void Monitor::handle_timecheck_peon(MTimeCheck *m)
   reply->round = m->round;
   dout(10) << __func__ << " send " << *m
            << " to " << m->get_source_inst() << dendl;
-  m->get_connection()->send_message(reply);
+  messenger->send_message(reply, m->get_connection());
 }
 
 void Monitor::handle_timecheck(MTimeCheck *m)
@@ -3839,7 +3570,8 @@ void Monitor::handle_subscribe(MMonSubscribe *m)
   // ???
 
   if (reply)
-    m->get_connection()->send_message(new MMonSubscribeAck(monmap->get_fsid(), (int)g_conf->mon_subscribe_interval));
+    messenger->send_message(new MMonSubscribeAck(monmap->get_fsid(), (int)g_conf->mon_subscribe_interval),
+			    m->get_source_inst());
 
   s->put();
   m->put();
@@ -3878,14 +3610,11 @@ void Monitor::handle_get_version(MMonGetVersion *m)
       svc->wait_for_readable(new C_RetryMessage(this, m));
       goto out;
     }
-
     MMonGetVersionReply *reply = new MMonGetVersionReply();
     reply->handle = m->handle;
     reply->version = svc->get_last_committed();
     reply->oldest_version = svc->get_first_committed();
-    reply->set_tid(m->get_tid());
-
-    m->get_connection()->send_message(reply);
+    messenger->send_message(reply, m->get_source_inst());
   }
 
   m->put();
@@ -3953,7 +3682,7 @@ void Monitor::send_latest_monmap(Connection *con)
 {
   bufferlist bl;
   monmap->encode(bl, con->get_features());
-  con->send_message(new MMonMap(bl));
+  messenger->send_message(new MMonMap(bl), con);
 }
 
 void Monitor::handle_mon_get_map(MMonGetMap *m)
@@ -3974,12 +3703,12 @@ int Monitor::scrub()
   assert(is_leader());
 
   if ((get_quorum_features() & CEPH_FEATURE_MON_SCRUB) == 0) {
-    clog->warn() << "scrub not supported by entire quorum\n";
+    clog.warn() << "scrub not supported by entire quorum\n";
     return -EOPNOTSUPP;
   }
 
   if (!scrub_result.empty()) {
-    clog->info() << "scrub already in progress\n";
+    clog.info() << "scrub already in progress\n";
     return -EBUSY;
   }
 
@@ -4016,7 +3745,7 @@ void Monitor::handle_scrub(MMonScrub *m)
 	break;
       MMonScrub *reply = new MMonScrub(MMonScrub::OP_RESULT, m->version);
       _scrub(&reply->result);
-      m->get_connection()->send_message(reply);
+      messenger->send_message(reply, m->get_connection());
     }
     break;
 
@@ -4074,13 +3803,13 @@ void Monitor::scrub_finish()
       continue;
     if (p->second != mine) {
       ++errors;
-      clog->error() << "scrub mismatch" << "\n";
-      clog->error() << " mon." << rank << " " << mine << "\n";
-      clog->error() << " mon." << p->first << " " << p->second << "\n";
+      clog.error() << "scrub mismatch" << "\n";
+      clog.error() << " mon." << rank << " " << mine << "\n";
+      clog.error() << " mon." << p->first << " " << p->second << "\n";
     }
   }
   if (!errors)
-    clog->info() << "scrub ok on " << quorum << ": " << mine << "\n";
+    clog.info() << "scrub ok on " << quorum << ": " << mine << "\n";
 
   scrub_reset();
 }
@@ -4124,10 +3853,6 @@ void Monitor::tick()
   // trim sessions
   utime_t now = ceph_clock_now(g_ceph_context);
   xlist<MonSession*>::iterator p = session_map.sessions.begin();
-
-  bool out_for_too_long = (!exited_quorum.is_zero()
-      && now > (exited_quorum + 2*g_conf->mon_lease));
-
   while (!p.end()) {
     MonSession *s = *p;
     ++p;
@@ -4139,17 +3864,17 @@ void Monitor::tick()
     if (!s->until.is_zero() && s->until < now) {
       dout(10) << " trimming session " << s->con << " " << s->inst
 	       << " (until " << s->until << " < now " << now << ")" << dendl;
-    } else if (out_for_too_long) {
-      // boot the client Session because we've taken too long getting back in
-      dout(10) << " trimming session " << s->con << " " << s->inst
-        << " because we've been out of quorum too long" << dendl;
-    } else {
-      continue;
+      messenger->mark_down(s->con);
+      remove_session(s);
+    } else if (!exited_quorum.is_zero()) {
+      if (now > (exited_quorum + 2 * g_conf->mon_lease)) {
+        // boot the client Session because we've taken too long getting back in
+        dout(10) << " trimming session " << s->con << " " << s->inst
+		 << " because we've been out of quorum too long" << dendl;
+        messenger->mark_down(s->con);
+        remove_session(s);
+      }
     }
-
-    s->con->mark_down();
-    remove_session(s);
-    logger->inc(l_mon_session_trim);
   }
 
   sync_trim_providers();
@@ -4160,17 +3885,17 @@ void Monitor::tick()
 
   if (is_leader() && paxos->is_active() && fingerprint.is_zero()) {
     // this is only necessary on upgraded clusters.
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    prepare_new_fingerprint(t);
+    MonitorDBStore::Transaction t;
+    prepare_new_fingerprint(&t);
     bufferlist tbl;
-    t->encode(tbl);
+    t.encode(tbl);
     paxos->propose_new_value(tbl, new C_NoopContext);
   }
 
   new_tick();
 }
 
-void Monitor::prepare_new_fingerprint(MonitorDBStore::TransactionRef t)
+void Monitor::prepare_new_fingerprint(MonitorDBStore::Transaction *t)
 {
   uuid_d nf;
   nf.generate_random();
@@ -4215,13 +3940,13 @@ int Monitor::check_fsid()
 
 int Monitor::write_fsid()
 {
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
   int r = write_fsid(t);
   store->apply_transaction(t);
   return r;
 }
 
-int Monitor::write_fsid(MonitorDBStore::TransactionRef t)
+int Monitor::write_fsid(MonitorDBStore::Transaction &t)
 {
   ostringstream ss;
   ss << monmap->get_fsid() << "\n";
@@ -4230,7 +3955,7 @@ int Monitor::write_fsid(MonitorDBStore::TransactionRef t)
   bufferlist b;
   b.append(us);
 
-  t->put(MONITOR_NAME, "cluster_uuid", b);
+  t.put(MONITOR_NAME, "cluster_uuid", b);
   return 0;
 }
 
@@ -4240,7 +3965,7 @@ int Monitor::write_fsid(MonitorDBStore::TransactionRef t)
  */
 int Monitor::mkfs(bufferlist& osdmapbl)
 {
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
 
   // verify cluster fsid
   int r = check_fsid();
@@ -4250,7 +3975,7 @@ int Monitor::mkfs(bufferlist& osdmapbl)
   bufferlist magicbl;
   magicbl.append(CEPH_MON_ONDISK_MAGIC);
   magicbl.append("\n");
-  t->put(MONITOR_NAME, "magic", magicbl);
+  t.put(MONITOR_NAME, "magic", magicbl);
 
 
   features = get_supported_features();
@@ -4260,7 +3985,7 @@ int Monitor::mkfs(bufferlist& osdmapbl)
   bufferlist monmapbl;
   monmap->encode(monmapbl, CEPH_FEATURES_ALL);
   monmap->set_epoch(0);     // must be 0 to avoid confusing first MonmapMonitor::update_from_paxos()
-  t->put("mkfs", "monmap", monmapbl);
+  t.put("mkfs", "monmap", monmapbl);
 
   if (osdmapbl.length()) {
     // make sure it's a valid osdmap
@@ -4272,7 +3997,7 @@ int Monitor::mkfs(bufferlist& osdmapbl)
       derr << "error decoding provided osdmap: " << e.what() << dendl;
       return -EINVAL;
     }
-    t->put("mkfs", "osdmap", osdmapbl);
+    t.put("mkfs", "osdmap", osdmapbl);
   }
 
   if (is_keyring_required()) {
@@ -4310,7 +4035,7 @@ int Monitor::mkfs(bufferlist& osdmapbl)
 
     bufferlist keyringbl;
     keyring.encode_plaintext(keyringbl);
-    t->put("mkfs", "keyring", keyringbl);
+    t.put("mkfs", "keyring", keyringbl);
   }
   write_fsid(t);
   store->apply_transaction(t);
@@ -4457,13 +4182,13 @@ bool Monitor::ms_verify_authorizer(Connection *con, int peer_type,
     isvalid = true;
   }
   return true;
-}
+};
 
 #undef dout_prefix
 #define dout_prefix *_dout
 
 void Monitor::StoreConverter::_convert_finish_features(
-    MonitorDBStore::TransactionRef t)
+    MonitorDBStore::Transaction &t)
 {
   dout(20) << __func__ << dendl;
 
@@ -4487,7 +4212,7 @@ void Monitor::StoreConverter::_convert_finish_features(
   features.encode(features_bl);
 
   dout(20) << __func__ << " new features " << features << dendl;
-  t->put(MONITOR_NAME, COMPAT_SET_LOC, features_bl);
+  t.put(MONITOR_NAME, COMPAT_SET_LOC, features_bl);
 }
 
 
@@ -4582,11 +4307,11 @@ void Monitor::StoreConverter::_convert_monitor()
   assert(store->exists_bl_ss("feature_set"));
   assert(store->exists_bl_ss("election_epoch"));
 
-  MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction tx;
 
   if (store->exists_bl_ss("joined")) {
     version_t joined = store->get_int("joined");
-    tx->put(MONITOR_NAME, "joined", joined);
+    tx.put(MONITOR_NAME, "joined", joined);
   }
 
   vector<string> keys;
@@ -4602,12 +4327,12 @@ void Monitor::StoreConverter::_convert_monitor()
     bufferlist bl;
     int r = store->get_bl_ss(bl, (*it).c_str(), 0);
     assert(r > 0);
-    tx->put(MONITOR_NAME, *it, bl);
+    tx.put(MONITOR_NAME, *it, bl);
   }
   version_t election_epoch = store->get_int("election_epoch");
-  tx->put(MONITOR_NAME, "election_epoch", election_epoch);
+  tx.put(MONITOR_NAME, "election_epoch", election_epoch);
 
-  assert(!tx->empty());
+  assert(!tx.empty());
   db->apply_transaction(tx);
   dout(10) << __func__ << " finished" << dendl;
 }
@@ -4652,9 +4377,9 @@ void Monitor::StoreConverter::_convert_machines(string machine)
     dout(20) << __func__ << " " << machine
 	     << " ver " << ver << " bl " << bl.length() << dendl;
 
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    tx->put(machine, ver, bl);
-    tx->put(machine, "last_committed", ver);
+    MonitorDBStore::Transaction tx;
+    tx.put(machine, ver, bl);
+    tx.put(machine, "last_committed", ver);
 
     if (has_gv && store->exists_bl_sn(machine_gv.c_str(), ver)) {
       stringstream s;
@@ -4665,7 +4390,7 @@ void Monitor::StoreConverter::_convert_machines(string machine)
       dout(20) << __func__ << " " << machine
 	       << " ver " << ver << " -> " << gv << dendl;
 
-      MonitorDBStore::TransactionRef paxos_tx(new MonitorDBStore::Transaction);
+      MonitorDBStore::Transaction paxos_tx;
 
       if (gvs.count(gv) == 0) {
         gvs.insert(gv);
@@ -4697,16 +4422,16 @@ void Monitor::StoreConverter::_convert_machines(string machine)
         bufferlist paxos_bl;
         int r = db->get("paxos", gv, paxos_bl);
         assert(r >= 0);
-        paxos_tx->append_from_encoded(paxos_bl);
+        paxos_tx.append_from_encoded(paxos_bl);
       }
       gv_map[gv].insert(make_pair(machine,ver));
 
       bufferlist tx_bl;
-      tx->encode(tx_bl);
-      paxos_tx->append_from_encoded(tx_bl);
+      tx.encode(tx_bl);
+      paxos_tx.append_from_encoded(tx_bl);
       bufferlist paxos_bl;
-      paxos_tx->encode(paxos_bl);
-      tx->put("paxos", gv, paxos_bl);
+      paxos_tx.encode(paxos_bl);
+      tx.put("paxos", gv, paxos_bl);
     }
     db->apply_transaction(tx);
   }
@@ -4715,10 +4440,10 @@ void Monitor::StoreConverter::_convert_machines(string machine)
   dout(20) << __func__ << " lc " << lc << " last_committed " << last_committed << dendl;
   assert(lc == last_committed);
 
-  MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-  tx->put(machine, "first_committed", first_committed);
-  tx->put(machine, "last_committed", last_committed);
-  tx->put(machine, "conversion_first", first_committed);
+  MonitorDBStore::Transaction tx;
+  tx.put(machine, "first_committed", first_committed);
+  tx.put(machine, "last_committed", last_committed);
+  tx.put(machine, "conversion_first", first_committed);
 
   if (store->exists_bl_ss(machine.c_str(), "latest")) {
     bufferlist latest_bl_raw;
@@ -4730,7 +4455,7 @@ void Monitor::StoreConverter::_convert_machines(string machine)
       goto out;
     }
 
-    tx->put(machine, "latest", latest_bl_raw);
+    tx.put(machine, "latest", latest_bl_raw);
 
     bufferlist::iterator lbl_it = latest_bl_raw.begin();
     bufferlist latest_bl;
@@ -4741,10 +4466,10 @@ void Monitor::StoreConverter::_convert_machines(string machine)
     dout(20) << __func__ << " machine " << machine
 	     << " latest ver " << latest_ver << dendl;
 
-    tx->put(machine, "full_latest", latest_ver);
+    tx.put(machine, "full_latest", latest_ver);
     stringstream os;
     os << "full_" << latest_ver;
-    tx->put(machine, os.str(), latest_bl);
+    tx.put(machine, os.str(), latest_bl);
   }
 out:
   db->apply_transaction(tx);
@@ -4774,8 +4499,8 @@ void Monitor::StoreConverter::_convert_osdmap_full()
              << " bl " << bl.length() << " bytes" << dendl;
 
     string full_key = "full_" + stringify(ver);
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    tx->put("osdmap", full_key, bl);
+    MonitorDBStore::Transaction tx;
+    tx.put("osdmap", full_key, bl);
     db->apply_transaction(tx);
   }
   dout(10) << __func__ << " found " << err << " conversion errors!" << dendl;
@@ -4808,18 +4533,18 @@ void Monitor::StoreConverter::_convert_paxos()
 
   // erase all paxos versions between [first, last_gv[, with first being the
   // first gv in the map.
-  MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction tx;
   set<version_t>::iterator it = gvs.begin();
   dout(1) << __func__ << " first gv " << (*it)
 	  << " last gv " << last_gv << dendl;
   for (; it != gvs.end() && (*it < last_gv); ++it) {
-    tx->erase("paxos", *it);
+    tx.erase("paxos", *it);
   }
-  tx->put("paxos", "first_committed", last_gv);
-  tx->put("paxos", "last_committed", highest_gv);
-  tx->put("paxos", "accepted_pn", highest_accepted_pn);
-  tx->put("paxos", "last_pn", highest_last_pn);
-  tx->put("paxos", "conversion_first", last_gv);
+  tx.put("paxos", "first_committed", last_gv);
+  tx.put("paxos", "last_committed", highest_gv);
+  tx.put("paxos", "accepted_pn", highest_accepted_pn);
+  tx.put("paxos", "last_pn", highest_last_pn);
+  tx.put("paxos", "conversion_first", last_gv);
   db->apply_transaction(tx);
 
   dout(10) << __func__ << " finished" << dendl;
diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h
index 91c524a..42e148e 100644
--- a/src/mon/Monitor.h
+++ b/src/mon/Monitor.h
@@ -52,7 +52,6 @@
 
 #include <memory>
 #include "include/memory.h"
-#include "include/str_map.h"
 #include <errno.h>
 
 
@@ -67,9 +66,9 @@ enum {
   l_cluster_num_osd_up,
   l_cluster_num_osd_in,
   l_cluster_osd_epoch,
-  l_cluster_osd_bytes,
-  l_cluster_osd_bytes_used,
-  l_cluster_osd_bytes_avail,
+  l_cluster_osd_kb,
+  l_cluster_osd_kb_used,
+  l_cluster_osd_kb_avail,
   l_cluster_num_pool,
   l_cluster_num_pg,
   l_cluster_num_pg_active_clean,
@@ -77,7 +76,6 @@ enum {
   l_cluster_num_pg_peering,
   l_cluster_num_object,
   l_cluster_num_object_degraded,
-  l_cluster_num_object_misplaced,
   l_cluster_num_object_unfound,
   l_cluster_num_bytes,
   l_cluster_num_mds_up,
@@ -87,19 +85,6 @@ enum {
   l_cluster_last,
 };
 
-enum {
-  l_mon_first = 456000,
-  l_mon_num_sessions,
-  l_mon_session_add,
-  l_mon_session_rm,
-  l_mon_session_trim,
-  l_mon_num_elections,
-  l_mon_election_call,
-  l_mon_election_win,
-  l_mon_election_lose,
-  l_mon_last,
-};
-
 class QuorumService;
 class PaxosService;
 
@@ -121,8 +106,7 @@ struct MonCommand;
 
 #define COMPAT_SET_LOC "feature_set"
 
-class Monitor : public Dispatcher,
-                public md_config_obs_t {
+class Monitor : public Dispatcher {
 public:
   // me
   string name;
@@ -148,9 +132,7 @@ public:
 
   set<entity_addr_t> extra_probe_peers;
 
-  LogClient log_client;
-  LogChannelRef clog;
-  LogChannelRef audit_clog;
+  LogClient clog;
   KeyRing keyring;
   KeyServer key_server;
 
@@ -209,7 +191,7 @@ public:
 
   const utime_t &get_leader_since() const;
 
-  void prepare_new_fingerprint(MonitorDBStore::TransactionRef t);
+  void prepare_new_fingerprint(MonitorDBStore::Transaction *t);
 
   // -- elector --
 private:
@@ -376,7 +358,7 @@ private:
    * We store a few things on the side that we don't want to get clobbered by sync.  This
    * includes the latest monmap and a lower bound on last_committed.
    */
-  void sync_stash_critical_state(MonitorDBStore::TransactionRef tx);
+  void sync_stash_critical_state(MonitorDBStore::Transaction *tx);
 
   /**
    * reset the sync timeout
@@ -557,7 +539,6 @@ public:
 
 private:
   void _reset();   ///< called from bootstrap, start_, or join_election
-  void wait_for_paxos_write();
 public:
   void bootstrap();
   void join_election();
@@ -648,7 +629,8 @@ public:
                         const MonCommand *this_cmd);
   void get_mon_status(Formatter *f, ostream& ss);
   void _quorum_status(Formatter *f, ostream& ss);
-  bool _add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss);
+  void _osdmonitor_prepare_command(cmdmap_t& cmdmap, ostream& ss);
+  void _add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss);
   void handle_command(class MMonCommand *m);
   void handle_route(MRoute *m);
 
@@ -727,31 +709,8 @@ public:
     C_Command(Monitor *_mm, MMonCommand *_m, int r, string s, bufferlist rd, version_t v) :
       mon(_mm), m(_m), rc(r), rs(s), rdata(rd), version(v){}
     void finish(int r) {
-      if (r >= 0) {
-        ostringstream ss;
-        if (!m->get_connection()) {
-          ss << "connection dropped for command ";
-        } else {
-          MonSession *s = m->get_session();
-
-          // if client drops we may not have a session to draw information from.
-          if (s) {
-            ss << "from='" << s->inst << "' "
-              << "entity='";
-            if (s->auth_handler)
-              ss << s->auth_handler->get_entity_name();
-            else
-              ss << "forwarded-request";
-            ss << "' ";
-          } else {
-            ss << "session dropped for command ";
-          }
-        }
-        ss << "cmd='" << m->cmd << "': finished";
-
-        mon->audit_clog->info() << ss.str();
+      if (r >= 0)
 	mon->reply_command(m, rc, rs, rdata, version);
-      }
       else if (r == -ECANCELED)
 	m->put();
       else if (r == -EAGAIN)
@@ -779,15 +738,15 @@ public:
 
   //ms_dispatch handles a lot of logic and we want to reuse it
   //on forwarded messages, so we create a non-locking version for this class
-  void _ms_dispatch(Message *m);
+  bool _ms_dispatch(Message *m);
   bool ms_dispatch(Message *m) {
     lock.Lock();
-    _ms_dispatch(m);
+    bool ret = _ms_dispatch(m);
     lock.Unlock();
-    return true;
+    return ret;
   }
   // dissociate message handling from session and connection logic
-  void dispatch(MonSession *s, Message *m, const bool src_is_mon);
+  bool dispatch(MonSession *s, Message *m, const bool src_is_mon);
   //mon_caps is used for un-connected messages from monitors
   MonCap * mon_caps;
   bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new);
@@ -806,7 +765,7 @@ public:
   /// read the ondisk features into the CompatSet pointed to by read_features
   static void read_features_off_disk(MonitorDBStore *store, CompatSet *read_features);
   void read_features();
-  void write_features(MonitorDBStore::TransactionRef t);
+  void write_features(MonitorDBStore::Transaction &t);
 
  public:
   Monitor(CephContext *cct_, string nm, MonitorDBStore *s,
@@ -815,18 +774,6 @@ public:
 
   static int check_features(MonitorDBStore *store);
 
-  // config observer
-  virtual const char** get_tracked_conf_keys() const;
-  virtual void handle_conf_change(const struct md_config_t *conf,
-                                  const std::set<std::string> &changed);
-
-  void update_log_client(LogChannelRef lc, const string &name,
-                         map<string,string> &log_to_monitors,
-                         map<string,string> &log_to_syslog,
-                         map<string,string> &log_channels,
-                         map<string,string> &log_prios);
-  void update_log_clients();
-  int sanitize_options();
   int preinit();
   int init();
   void init_paxos();
@@ -851,7 +798,7 @@ public:
    * @return 0 on success, or negative error code
    */
   int write_fsid();
-  int write_fsid(MonitorDBStore::TransactionRef t);
+  int write_fsid(MonitorDBStore::Transaction &t);
 
   void do_admin_command(std::string command, cmdmap_t& cmdmap,
 			std::string format, ostream& ss);
@@ -919,15 +866,15 @@ public:
     }
 
     void _mark_convert_start() {
-      MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-      tx->put("mon_convert", "on_going", 1);
+      MonitorDBStore::Transaction tx;
+      tx.put("mon_convert", "on_going", 1);
       db->apply_transaction(tx);
     }
 
-    void _convert_finish_features(MonitorDBStore::TransactionRef t);
+    void _convert_finish_features(MonitorDBStore::Transaction &t);
     void _mark_convert_finish() {
-      MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-      tx->erase("mon_convert", "on_going");
+      MonitorDBStore::Transaction tx;
+      tx.erase("mon_convert", "on_going");
       _convert_finish_features(tx);
       db->apply_transaction(tx);
     }
@@ -956,7 +903,6 @@ public:
 #define CEPH_MON_FEATURE_INCOMPAT_SINGLE_PAXOS CompatSet::Feature (3, "single paxos with k/v store (v0.\?)")
 #define CEPH_MON_FEATURE_INCOMPAT_OSD_ERASURE_CODES CompatSet::Feature(4, "support erasure code pools")
 #define CEPH_MON_FEATURE_INCOMPAT_OSDMAP_ENC CompatSet::Feature(5, "new-style osdmap encoding")
-#define CEPH_MON_FEATURE_INCOMPAT_ERASURE_CODE_PLUGINS_V2 CompatSet::Feature(6, "support isa/lrc erasure code")
 // make sure you add your feature to Monitor::get_supported_features
 
 long parse_pos_long(const char *s, ostream *pss = NULL);
@@ -1013,54 +959,7 @@ struct MonCommand {
     ::decode_array_nohead(*cmds, *size, bl);
     DECODE_FINISH(bl);
   }
-
-  bool requires_perm(char p) const {
-    return (req_perms.find(p) != string::npos); 
-  }
 };
-WRITE_CLASS_ENCODER(MonCommand)
-
-// Having this here is less than optimal, but we needed to keep it
-// somewhere as to avoid code duplication, as it will be needed both
-// on the Monitor class and the LogMonitor class.
-//
-// We are attempting to avoid code duplication in the event that
-// changing how the mechanisms currently work will lead to unnecessary
-// issues, resulting from the need of changing this function in multiple
-// places.
-//
-// This function is just a helper to perform a task that should not be
-// needed anywhere else besides the two functions that shall call it.
-//
-// This function's only purpose is to check whether a given map has only
-// ONE key with an empty value (which would mean that 'get_str_map()' read
-// a map in the form of 'VALUE', without any KEY/VALUE pairs) and, in such
-// event, to assign said 'VALUE' to a given 'def_key', such that we end up
-// with a map of the form "m = { 'def_key' : 'VALUE' }" instead of the
-// original "m = { 'VALUE' : '' }".
-static inline int get_conf_str_map_helper(
-    const string &str,
-    ostringstream &oss,
-    map<string,string> *m,
-    const string &def_key)
-{
-  int r = get_str_map(str, m);
-
-  if (r < 0) {
-    generic_derr << __func__ << " error: " << oss.str() << dendl;
-    return r;
-  }
-
-  if (r >= 0 && m->size() == 1) {
-    map<string,string>::iterator p = m->begin();
-    if (p->second.empty()) {
-      string s = p->first;
-      m->erase(s);
-      (*m)[def_key] = s;
-    }
-  }
-  return r;
-}
-
+WRITE_CLASS_ENCODER(MonCommand);
 
 #endif
diff --git a/src/mon/MonitorDBStore.h b/src/mon/MonitorDBStore.h
index a0c82b7..1576db7 100644
--- a/src/mon/MonitorDBStore.h
+++ b/src/mon/MonitorDBStore.h
@@ -21,22 +21,18 @@
 #include <boost/scoped_ptr.hpp>
 #include <sstream>
 #include "os/KeyValueDB.h"
+#include "os/LevelDBStore.h"
 
 #include "include/assert.h"
 #include "common/Formatter.h"
-#include "common/Finisher.h"
 #include "common/errno.h"
 
 class MonitorDBStore
 {
-  boost::scoped_ptr<KeyValueDB> db;
+  boost::scoped_ptr<LevelDBStore> db;
   bool do_dump;
   int dump_fd;
 
-  Finisher io_work;
-
-  bool is_open;
-
  public:
 
   struct Op {
@@ -89,8 +85,6 @@ class MonitorDBStore
     }
   };
 
-  struct Transaction;
-  typedef ceph::shared_ptr<Transaction> TransactionRef;
   struct Transaction {
     list<Op> ops;
     uint64_t bytes, keys;
@@ -170,16 +164,16 @@ class MonitorDBStore
       ls.back()->compact_range("prefix4", "from", "to");
     }
 
-    void append(TransactionRef other) {
-      ops.splice(ops.end(), other->ops);
-      keys += other->keys;
-      bytes += other->bytes;
+    void append(Transaction& other) {
+      ops.splice(ops.end(), other.ops);
+      keys += other.keys;
+      bytes += other.bytes;
     }
 
     void append_from_encoded(bufferlist& bl) {
-      TransactionRef other(new Transaction);
+      Transaction other;
       bufferlist::iterator it = bl.begin();
-      other->decode(it);
+      other.decode(it);
       append(other);
     }
 
@@ -251,19 +245,17 @@ class MonitorDBStore
     }
   };
 
-  int apply_transaction(MonitorDBStore::TransactionRef t) {
+  int apply_transaction(const MonitorDBStore::Transaction& t) {
     KeyValueDB::Transaction dbt = db->get_transaction();
 
     if (do_dump) {
       bufferlist bl;
-      t->encode(bl);
+      t.encode(bl);
       bl.write_fd(dump_fd);
     }
 
     list<pair<string, pair<string,string> > > compact;
-    for (list<Op>::const_iterator it = t->ops.begin();
-	 it != t->ops.end();
-	 ++it) {
+    for (list<Op>::const_iterator it = t.ops.begin(); it != t.ops.end(); ++it) {
       const Op& op = *it;
       switch (op.type) {
       case Transaction::OP_PUT:
@@ -295,38 +287,6 @@ class MonitorDBStore
     return r;
   }
 
-  struct C_DoTransaction : public Context {
-    MonitorDBStore *store;
-    MonitorDBStore::TransactionRef t;
-    Context *oncommit;
-    C_DoTransaction(MonitorDBStore *s, MonitorDBStore::TransactionRef t,
-		    Context *f)
-      : store(s), t(t), oncommit(f)
-    {}
-    void finish(int r) {
-      int ret = store->apply_transaction(t);
-      oncommit->complete(ret);
-    }
-  };
-
-  /**
-   * queue transaction
-   *
-   * Queue a transaction to commit asynchronously.  Trigger a context
-   * on completion (without any locks held).
-   */
-  void queue_transaction(MonitorDBStore::TransactionRef t,
-			 Context *oncommit) {
-    io_work.queue(new C_DoTransaction(this, t, oncommit));
-  }
-
-  /**
-   * block and flush all io activity
-   */
-  void flush() {
-    io_work.wait_for_empty();
-  }
-
   class StoreIteratorImpl {
   protected:
     bool done;
@@ -336,26 +296,26 @@ class MonitorDBStore
     StoreIteratorImpl() : done(false) { }
     virtual ~StoreIteratorImpl() { }
 
-    bool add_chunk_entry(TransactionRef tx,
+    bool add_chunk_entry(Transaction &tx,
 			 string &prefix,
 			 string &key,
 			 bufferlist &value,
 			 uint64_t max) {
-      TransactionRef tmp(new Transaction);
+      Transaction tmp;
       bufferlist tmp_bl;
-      tmp->put(prefix, key, value);
-      tmp->encode(tmp_bl);
+      tmp.put(prefix, key, value);
+      tmp.encode(tmp_bl);
 
       bufferlist tx_bl;
-      tx->encode(tx_bl);
+      tx.encode(tx_bl);
 
       size_t len = tx_bl.length() + tmp_bl.length();
 
-      if (!tx->empty() && (len > max)) {
+      if (!tx.empty() && (len > max)) {
 	return false;
       }
 
-      tx->append(tmp);
+      tx.append(tmp);
       last_key.first = prefix;
       last_key.second = key;
 
@@ -378,11 +338,11 @@ class MonitorDBStore
     }
     pair<string,string> get_last_key() {
       return last_key;
-    }
+    };
     virtual bool has_next_chunk() {
       return !done && _is_valid();
     }
-    virtual void get_chunk_tx(TransactionRef tx, uint64_t max) = 0;
+    virtual void get_chunk_tx(Transaction &tx, uint64_t max) = 0;
     virtual pair<string,string> get_next_key() = 0;
   };
   typedef ceph::shared_ptr<StoreIteratorImpl> Synchronizer;
@@ -410,7 +370,7 @@ class MonitorDBStore
      *			    differ from the one passed on to the function)
      * @param last_key[out] Last key in the chunk
      */
-    virtual void get_chunk_tx(TransactionRef tx, uint64_t max) {
+    virtual void get_chunk_tx(Transaction &tx, uint64_t max) {
       assert(done == false);
       assert(iter->valid() == true);
 
@@ -549,30 +509,34 @@ class MonitorDBStore
     db->submit_transaction_sync(dbt);
   }
 
-  int open(ostream &out) {
+  void init_options() {
     db->init();
-    int r = db->open(out);
-    if (r < 0)
-      return r;
-    io_work.start();
-    is_open = true;
-    return 0;
+    if (g_conf->mon_leveldb_write_buffer_size)
+      db->options.write_buffer_size = g_conf->mon_leveldb_write_buffer_size;
+    if (g_conf->mon_leveldb_cache_size)
+      db->options.cache_size = g_conf->mon_leveldb_cache_size;
+    if (g_conf->mon_leveldb_block_size)
+      db->options.block_size = g_conf->mon_leveldb_block_size;
+    if (g_conf->mon_leveldb_bloom_size)
+      db->options.bloom_size = g_conf->mon_leveldb_bloom_size;
+    if (g_conf->mon_leveldb_compression)
+      db->options.compression_enabled = g_conf->mon_leveldb_compression;
+    if (g_conf->mon_leveldb_max_open_files)
+      db->options.max_open_files = g_conf->mon_leveldb_max_open_files;
+    if (g_conf->mon_leveldb_paranoid)
+      db->options.paranoid_checks = g_conf->mon_leveldb_paranoid;
+    if (g_conf->mon_leveldb_log.length())
+      db->options.log_file = g_conf->mon_leveldb_log;
   }
 
-  int create_and_open(ostream &out) {
-    db->init();
-    int r = db->create_and_open(out);
-    if (r < 0)
-      return r;
-    io_work.start();
-    is_open = true;
-    return 0;
+  int open(ostream &out) {
+    init_options();
+    return db->open(out);
   }
 
-  void close() {
-    // there should be no work queued!
-    io_work.stop();
-    is_open = false;
+  int create_and_open(ostream &out) {
+    init_options();
+    return db->create_and_open(out);
   }
 
   void compact() {
@@ -587,12 +551,8 @@ class MonitorDBStore
     return db->get_estimated_size(extras);
   }
 
-  MonitorDBStore(const string& path)
-    : db(0),
-      do_dump(false),
-      dump_fd(-1),
-      io_work(g_ceph_context, "monstore"),
-      is_open(false) {
+  MonitorDBStore(const string& path) :
+    db(0), do_dump(false), dump_fd(-1) {
     string::const_reverse_iterator rit;
     int pos = 0;
     for (rit = path.rbegin(); rit != path.rend(); ++rit, ++pos) {
@@ -603,14 +563,11 @@ class MonitorDBStore
     os << path.substr(0, path.size() - pos) << "/store.db";
     string full_path = os.str();
 
-    KeyValueDB *db_ptr = KeyValueDB::create(g_ceph_context,
-					    g_conf->mon_keyvaluedb,
-					    full_path);
+    LevelDBStore *db_ptr = new LevelDBStore(g_ceph_context, full_path);
     if (!db_ptr) {
-      derr << __func__ << " error initializing "
-	   << g_conf->mon_keyvaluedb << " db back storage in "
-	   << full_path << dendl;
-      assert(0 != "MonitorDBStore: error initializing keyvaluedb back storage");
+      derr << __func__ << " error initializing level db back storage in "
+		<< full_path << dendl;
+      assert(0 != "MonitorDBStore: error initializing level db back storage");
     }
     db.reset(db_ptr);
 
@@ -626,15 +583,18 @@ class MonitorDBStore
       }
     }
   }
+  MonitorDBStore(LevelDBStore *db_ptr) :
+    db(0), do_dump(false), dump_fd(-1) {
+    db.reset(db_ptr);
+  }
   ~MonitorDBStore() {
-    assert(!is_open);
     if (do_dump)
       ::close(dump_fd);
   }
 
 };
 
-WRITE_CLASS_ENCODER(MonitorDBStore::Op)
-WRITE_CLASS_ENCODER(MonitorDBStore::Transaction)
+WRITE_CLASS_ENCODER(MonitorDBStore::Op);
+WRITE_CLASS_ENCODER(MonitorDBStore::Transaction);
 
 #endif /* CEPH_MONITOR_DB_STORE_H */
diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc
index d01fb82..3890704 100644
--- a/src/mon/MonmapMonitor.cc
+++ b/src/mon/MonmapMonitor.cc
@@ -72,8 +72,8 @@ void MonmapMonitor::update_from_paxos(bool *need_bootstrap)
   mon->monmap->decode(monmap_bl);
 
   if (mon->store->exists("mkfs", "monmap")) {
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    t->erase("mkfs", "monmap");
+    MonitorDBStore::Transaction t;
+    t.erase("mkfs", "monmap");
     mon->store->apply_transaction(t);
   }
 }
@@ -86,7 +86,7 @@ void MonmapMonitor::create_pending()
   dout(10) << "create_pending monmap epoch " << pending_map.epoch << dendl;
 }
 
-void MonmapMonitor::encode_pending(MonitorDBStore::TransactionRef t)
+void MonmapMonitor::encode_pending(MonitorDBStore::Transaction *t)
 {
   dout(10) << "encode_pending epoch " << pending_map.epoch << dendl;
 
@@ -116,14 +116,14 @@ void MonmapMonitor::on_active()
        single-threaded process and, truth be told, no one else relies on this
        thing besides us.
      */
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    t->put(Monitor::MONITOR_NAME, "joined", 1);
+    MonitorDBStore::Transaction t;
+    t.put(Monitor::MONITOR_NAME, "joined", 1);
     mon->store->apply_transaction(t);
     mon->has_ever_joined = true;
   }
 
   if (mon->is_leader())
-    mon->clog->info() << "monmap " << *mon->monmap << "\n";
+    mon->clog.info() << "monmap " << *mon->monmap << "\n";
 }
 
 bool MonmapMonitor::preprocess_query(PaxosServiceMessage *m)
diff --git a/src/mon/MonmapMonitor.h b/src/mon/MonmapMonitor.h
index 22b51ad..198489d 100644
--- a/src/mon/MonmapMonitor.h
+++ b/src/mon/MonmapMonitor.h
@@ -50,9 +50,9 @@ class MonmapMonitor : public PaxosService {
 
   void create_pending();
 
-  void encode_pending(MonitorDBStore::TransactionRef t);
+  void encode_pending(MonitorDBStore::Transaction *t);
   // we always encode the full map; we have no use for full versions
-  virtual void encode_full(MonitorDBStore::TransactionRef t) { }
+  virtual void encode_full(MonitorDBStore::Transaction *t) { }
 
   void on_active();
 
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 04902bb..5f54f94 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -5,7 +5,6 @@
  *
  * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -175,8 +174,8 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
     // state, and we shouldn't want to work around it without knowing what
     // exactly happened.
     assert(latest_full > 0);
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    put_version_latest_full(t, latest_full);
+    MonitorDBStore::Transaction t;
+    put_version_latest_full(&t, latest_full);
     mon->store->apply_transaction(t);
     dout(10) << __func__ << " updated the on-disk full map version to "
              << latest_full << dendl;
@@ -191,7 +190,7 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
   }
 
   // walk through incrementals
-  MonitorDBStore::TransactionRef t;
+  MonitorDBStore::Transaction *t = NULL;
   size_t tx_size = 0;
   while (version > osdmap.epoch) {
     bufferlist inc_bl;
@@ -204,8 +203,8 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
     err = osdmap.apply_incremental(inc);
     assert(err == 0);
 
-    if (!t)
-      t.reset(new MonitorDBStore::Transaction);
+    if (t == NULL)
+      t = new MonitorDBStore::Transaction;
 
     // Write out the full map for all past epochs.  Encode the full
     // map with the same features as the incremental.  If we don't
@@ -231,14 +230,16 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
     }
 
     if (tx_size > g_conf->mon_sync_max_payload_size*2) {
-      mon->store->apply_transaction(t);
-      t = MonitorDBStore::TransactionRef();
+      mon->store->apply_transaction(*t);
+      delete t;
+      t = NULL;
       tx_size = 0;
     }
   }
 
-  if (t) {
-    mon->store->apply_transaction(t);
+  if (t != NULL) {
+    mon->store->apply_transaction(*t);
+    delete t;
   }
 
   for (int o = 0; o < osdmap.get_max_osd(); o++) {
@@ -402,7 +403,7 @@ void OSDMonitor::on_active()
   }
 
   if (mon->is_leader())
-    mon->clog->info() << "osdmap " << osdmap << "\n"; 
+    mon->clog.info() << "osdmap " << osdmap << "\n"; 
 
   if (!mon->is_leader()) {
     list<MOSDFailure*> ls;
@@ -442,8 +443,7 @@ void OSDMonitor::update_logger()
  * The osds that will get a lower weight are those with with a utilization
  * percentage 'oload' percent greater than the average utilization.
  */
-int OSDMonitor::reweight_by_utilization(int oload, std::string& out_str,
-					bool by_pg, const set<int64_t> *pools)
+int OSDMonitor::reweight_by_utilization(int oload, std::string& out_str)
 {
   if (oload <= 100) {
     ostringstream oss;
@@ -452,96 +452,48 @@ int OSDMonitor::reweight_by_utilization(int oload, std::string& out_str,
       "times <input-percentage>. For example, an argument of 200 would "
       "reweight OSDs which are twice as utilized as the average OSD.\n";
     out_str = oss.str();
+    dout(0) << "reweight_by_utilization: " << out_str << dendl;
     return -EINVAL;
   }
 
-  const PGMap &pgm = mon->pgmon()->pg_map;
-  vector<int> pgs_by_osd(osdmap.get_max_osd());
-  unsigned num_pg_copies = 0;
-
   // Avoid putting a small number (or 0) in the denominator when calculating
   // average_util
-  double average_util;
-  if (by_pg) {
-    // by pg mapping
-    double weight_sum = 0.0;      // sum up the crush weights
-    int num_osds = 0;
-    for (ceph::unordered_map<pg_t,pg_stat_t>::const_iterator p =
-	   pgm.pg_stat.begin();
-	 p != pgm.pg_stat.end();
-	 ++p) {
-      if (pools && pools->count(p->first.pool()) == 0)
-	continue;
-      for (vector<int>::const_iterator q = p->second.acting.begin();
-	   q != p->second.acting.end();
-	   ++q) {
-	if (*q >= (int)pgs_by_osd.size())
-	  pgs_by_osd.resize(*q);
-	if (pgs_by_osd[*q] == 0) {
-	  weight_sum += osdmap.crush->get_item_weightf(*q);
-	  ++num_osds;
-	}
-	++pgs_by_osd[*q];
-	++num_pg_copies;
-      }
-    }
-
-    if (!num_osds || (num_pg_copies / num_osds < g_conf->mon_reweight_min_pgs_per_osd)) {
-      ostringstream oss;
-      oss << "Refusing to reweight: we only have " << num_pg_copies
-	  << " PGs across " << num_osds << " osds!\n";
-      out_str = oss.str();
-      return -EDOM;
-    }
-
-    average_util = (double)num_pg_copies / weight_sum;
-  } else {
-    // by osd utilization
-    int num_osd = MIN(1, pgm.osd_stat.size());
-    if ((uint64_t)pgm.osd_sum.kb * 1024 / num_osd
-	< g_conf->mon_reweight_min_bytes_per_osd) {
-      ostringstream oss;
-      oss << "Refusing to reweight: we only have " << pgm.osd_sum.kb
-	  << " kb across all osds!\n";
-      out_str = oss.str();
-      return -EDOM;
-    }
-    if ((uint64_t)pgm.osd_sum.kb_used * 1024 / num_osd
-	< g_conf->mon_reweight_min_bytes_per_osd) {
-      ostringstream oss;
-      oss << "Refusing to reweight: we only have " << pgm.osd_sum.kb_used
-	  << " kb used across all osds!\n";
-      out_str = oss.str();
-      return -EDOM;
-    }
-
-    average_util = (double)pgm.osd_sum.kb_used / (double)pgm.osd_sum.kb;
+  const PGMap &pgm = mon->pgmon()->pg_map;
+  if (pgm.osd_sum.kb < 1024) {
+    ostringstream oss;
+    oss << "Refusing to reweight: we only have " << pgm.osd_sum << " kb "
+      "across all osds!\n";
+    out_str = oss.str();
+    dout(0) << "reweight_by_utilization: " << out_str << dendl;
+    return -EDOM;
   }
 
-  // adjust down only if we are above the threshold
-  double overload_util = average_util * (double)oload / 100.0;
+  if (pgm.osd_sum.kb_used < 5 * 1024) {
+    ostringstream oss;
+    oss << "Refusing to reweight: we only have " << pgm.osd_sum << " kb "
+      "used across all osds!\n";
+    out_str = oss.str();
+    dout(0) << "reweight_by_utilization: " << out_str << dendl;
+    return -EDOM;
+  }
 
-  // but aggressively adjust weights up whenever possible.
-  double underload_util = average_util;
+  float average_util = pgm.osd_sum.kb_used;
+  average_util /= pgm.osd_sum.kb;
+  float overload_util = average_util * oload / 100.0;
 
   ostringstream oss;
   char buf[128];
-  snprintf(buf, sizeof(buf), "average %04f, overload %04f. ",
+  snprintf(buf, sizeof(buf), "average_util: %04f, overload_util: %04f. ",
 	   average_util, overload_util);
   oss << buf;
   std::string sep;
-  oss << "reweighted: ";
+  oss << "overloaded osds: ";
   bool changed = false;
-  for (ceph::unordered_map<int,osd_stat_t>::const_iterator p =
-	 pgm.osd_stat.begin();
+  for (ceph::unordered_map<int,osd_stat_t>::const_iterator p = pgm.osd_stat.begin();
        p != pgm.osd_stat.end();
        ++p) {
-    float util;
-    if (by_pg) {
-      util = pgs_by_osd[p->first] / osdmap.crush->get_item_weightf(p->first);
-    } else {
-      util = (double)p->second.kb_used / (double)p->second.kb;
-    }
+    float util = p->second.kb_used;
+    util /= p->second.kb;
     if (util >= overload_util) {
       sep = ", ";
       // Assign a lower weight to overloaded OSDs. The current weight
@@ -551,35 +503,18 @@ int OSDMonitor::reweight_by_utilization(int oload, std::string& out_str,
       unsigned new_weight = (unsigned)((average_util / util) * (float)weight);
       pending_inc.new_weight[p->first] = new_weight;
       char buf[128];
-      snprintf(buf, sizeof(buf), "osd.%d [%04f -> %04f]", p->first,
+      snprintf(buf, sizeof(buf), "%d [%04f -> %04f]", p->first,
 	       (float)weight / (float)0x10000,
 	       (float)new_weight / (float)0x10000);
       oss << buf << sep;
       changed = true;
     }
-    if (util <= underload_util) {
-      // assign a higher weight.. if we can.
-      unsigned weight = osdmap.get_weight(p->first);
-      unsigned new_weight = (unsigned)((average_util / util) * (float)weight);
-      if (new_weight > 0x10000)
-	new_weight = 0x10000;
-      if (new_weight > weight) {
-	sep = ", ";
-	pending_inc.new_weight[p->first] = new_weight;
-	char buf[128];
-	snprintf(buf, sizeof(buf), "osd.%d [%04f -> %04f]", p->first,
-		 (float)weight / (float)0x10000,
-		 (float)new_weight / (float)0x10000);
-	oss << buf << sep;
-	changed = true;
-      }
-    }
   }
   if (sep.empty()) {
     oss << "(none)";
   }
   out_str = oss.str();
-  dout(10) << "reweight_by_utilization: finished with " << out_str << dendl;
+  dout(0) << "reweight_by_utilization: finished with " << out_str << dendl;
   return changed;
 }
 
@@ -601,7 +536,7 @@ void OSDMonitor::create_pending()
  * @note receiving a transaction in this function gives a fair amount of
  * freedom to the service implementation if it does need it. It shouldn't.
  */
-void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
+void OSDMonitor::encode_pending(MonitorDBStore::Transaction *t)
 {
   dout(10) << "encode_pending e " << pending_inc.epoch
 	   << dendl;
@@ -700,7 +635,7 @@ void OSDMonitor::share_map_with_random_osd()
   dout(10) << "committed, telling random " << s->inst << " all about it" << dendl;
   // whatev, they'll request more if they need it
   MOSDMap *m = build_incremental(osdmap.get_epoch() - 1, osdmap.get_epoch());
-  s->con->send_message(m);
+  mon->messenger->send_message(m, s->inst);
 }
 
 version_t OSDMonitor::get_trim_to()
@@ -727,8 +662,7 @@ version_t OSDMonitor::get_trim_to()
   return 0;
 }
 
-void OSDMonitor::encode_trim_extra(MonitorDBStore::TransactionRef tx,
-				   version_t first)
+void OSDMonitor::encode_trim_extra(MonitorDBStore::Transaction *tx, version_t first)
 {
   dout(10) << __func__ << " including full map for e " << first << dendl;
   bufferlist bl;
@@ -931,7 +865,7 @@ public:
 	m->fsid,
 	m->get_target(),
 	m->get_epoch(),
-	false));   // ACK itself does not request an ack
+	m->ack));
   }
   ~C_AckMarkedDown() {
     m->put();
@@ -968,10 +902,8 @@ bool OSDMonitor::preprocess_mark_me_down(MOSDMarkMeDown *m)
   return false;
 
  reply:
-  if (m->request_ack) {
-    Context *c(new C_AckMarkedDown(this, m));
-    c->complete(0);
-  }
+  Context *c(new C_AckMarkedDown(this, m));
+  c->complete(0);
   return true;
 }
 
@@ -982,10 +914,9 @@ bool OSDMonitor::prepare_mark_me_down(MOSDMarkMeDown *m)
   assert(osdmap.is_up(target_osd));
   assert(osdmap.get_addr(target_osd) == m->get_target().addr);
 
-  mon->clog->info() << "osd." << target_osd << " marked itself down\n";
+  mon->clog.info() << "osd." << target_osd << " marked itself down\n";
   pending_inc.new_state[target_osd] = CEPH_OSD_UP;
-  if (m->request_ack)
-    wait_for_finished_proposal(new C_AckMarkedDown(this, m));
+  wait_for_finished_proposal(new C_AckMarkedDown(this, m));
   return true;
 }
 
@@ -995,13 +926,8 @@ bool OSDMonitor::can_mark_down(int i)
     dout(5) << "can_mark_down NODOWN flag set, will not mark osd." << i << " down" << dendl;
     return false;
   }
-  int num_osds = osdmap.get_num_osds();
-  if (num_osds == 0) {
-    dout(5) << "can_mark_down no osds" << dendl;
-    return false;
-  }
   int up = osdmap.get_num_up_osds() - pending_inc.get_net_marked_down(&osdmap);
-  float up_ratio = (float)up / (float)num_osds;
+  float up_ratio = (float)up / (float)osdmap.get_num_osds();
   if (up_ratio < g_conf->mon_osd_min_up_ratio) {
     dout(5) << "can_mark_down current up_ratio " << up_ratio << " < min "
 	    << g_conf->mon_osd_min_up_ratio
@@ -1030,13 +956,8 @@ bool OSDMonitor::can_mark_out(int i)
     dout(5) << "can_mark_out NOOUT flag set, will not mark osds out" << dendl;
     return false;
   }
-  int num_osds = osdmap.get_num_osds();
-  if (num_osds == 0) {
-    dout(5) << "can_mark_out no osds" << dendl;
-    return false;
-  }
   int in = osdmap.get_num_in_osds() - pending_inc.get_net_marked_out(&osdmap);
-  float in_ratio = (float)in / (float)num_osds;
+  float in_ratio = (float)in / (float)osdmap.get_num_osds();
   if (in_ratio < g_conf->mon_osd_min_in_ratio) {
     if (i >= 0)
       dout(5) << "can_mark_down current in_ratio " << in_ratio << " < min "
@@ -1128,7 +1049,7 @@ bool OSDMonitor::check_failure(utime_t now, int target_osd, failure_info_t& fi)
     dout(1) << " we have enough reports/reporters to mark osd." << target_osd << " down" << dendl;
     pending_inc.new_state[target_osd] = CEPH_OSD_UP;
 
-    mon->clog->info() << osdmap.get_inst(target_osd) << " failed ("
+    mon->clog.info() << osdmap.get_inst(target_osd) << " failed ("
 		     << fi.num_reports << " reports from " << (int)fi.reporters.size() << " peers after "
 		     << failed_for << " >= grace " << grace << ")\n";
     return true;
@@ -1152,7 +1073,7 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m)
   
   if (m->if_osd_failed()) {
     // add a report
-    mon->clog->debug() << m->get_target() << " reported failed by "
+    mon->clog.debug() << m->get_target() << " reported failed by "
 		      << m->get_orig_source_inst() << "\n";
     failure_info_t& fi = failure_info[target_osd];
     MOSDFailure *old = fi.add_report(reporter, failed_since, m);
@@ -1164,7 +1085,7 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m)
     return check_failure(now, target_osd, fi);
   } else {
     // remove the report
-    mon->clog->debug() << m->get_target() << " failure report canceled by "
+    mon->clog.debug() << m->get_target() << " failure report canceled by "
 		      << m->get_orig_source_inst() << "\n";
     if (failure_info.count(target_osd)) {
       failure_info_t& fi = failure_info[target_osd];
@@ -1260,16 +1181,7 @@ bool OSDMonitor::preprocess_boot(MOSDBoot *m)
   if ((osdmap.get_features(CEPH_ENTITY_TYPE_OSD, NULL) &
        CEPH_FEATURE_OSD_ERASURE_CODES) &&
       !(m->get_connection()->get_features() & CEPH_FEATURE_OSD_ERASURE_CODES)) {
-    dout(0) << __func__ << " osdmap requires erasure code but osd at "
-            << m->get_orig_source_inst()
-            << " doesn't announce support -- ignore" << dendl;
-    goto ignore;
-  }
-
-  if ((osdmap.get_features(CEPH_ENTITY_TYPE_OSD, NULL) &
-       CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2) &&
-      !(m->get_connection()->get_features() & CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2)) {
-    dout(0) << __func__ << " osdmap requires erasure code plugins v2 but osd at "
+    dout(0) << __func__ << " osdmap requires Erasure Codes but osd at "
             << m->get_orig_source_inst()
             << " doesn't announce support -- ignore" << dendl;
     goto ignore;
@@ -1370,10 +1282,7 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m)
 	(g_conf->mon_osd_auto_mark_new_in && (oldstate & CEPH_OSD_NEW)) ||
 	(g_conf->mon_osd_auto_mark_in)) {
       if (can_mark_in(from)) {
-	if (osdmap.osd_xinfo[from].old_weight > 0)
-	  pending_inc.new_weight[from] = osdmap.osd_xinfo[from].old_weight;
-	else
-	  pending_inc.new_weight[from] = CEPH_OSD_IN;
+	pending_inc.new_weight[from] = CEPH_OSD_IN;
       } else {
 	dout(7) << "prepare_boot NOIN set, will not mark in " << m->get_orig_source_addr() << dendl;
       }
@@ -1455,7 +1364,7 @@ void OSDMonitor::_booted(MOSDBoot *m, bool logit)
 	  << " w " << m->sb.weight << " from " << m->sb.current_epoch << dendl;
 
   if (logit) {
-    mon->clog->info() << m->get_orig_source_inst() << " boot\n";
+    mon->clog.info() << m->get_orig_source_inst() << " boot\n";
   }
 
   send_latest(m, m->sb.current_epoch+1);
@@ -1506,7 +1415,7 @@ bool OSDMonitor::prepare_alive(MOSDAlive *m)
   int from = m->get_orig_source().num();
 
   if (0) {  // we probably don't care much about these
-    mon->clog->debug() << m->get_orig_source_inst() << " alive\n";
+    mon->clog.debug() << m->get_orig_source_inst() << " alive\n";
   }
 
   dout(7) << "prepare_alive want up_thru " << m->want << " have " << m->version
@@ -1550,7 +1459,7 @@ bool OSDMonitor::preprocess_pgtemp(MOSDPGTemp *m)
     goto ignore;
   }
 
-  for (map<pg_t,vector<int32_t> >::iterator p = m->pg_temp.begin(); p != m->pg_temp.end(); ++p) {
+  for (map<pg_t,vector<int> >::iterator p = m->pg_temp.begin(); p != m->pg_temp.end(); ++p) {
     dout(20) << " " << p->first
 	     << (osdmap.pg_temp->count(p->first) ? (*osdmap.pg_temp)[p->first] : empty)
              << " -> " << p->second << dendl;
@@ -1602,7 +1511,7 @@ bool OSDMonitor::prepare_pgtemp(MOSDPGTemp *m)
 {
   int from = m->get_orig_source().num();
   dout(7) << "prepare_pgtemp e" << m->map_epoch << " from " << m->get_orig_source_inst() << dendl;
-  for (map<pg_t,vector<int32_t> >::iterator p = m->pg_temp.begin(); p != m->pg_temp.end(); ++p) {
+  for (map<pg_t,vector<int> >::iterator p = m->pg_temp.begin(); p != m->pg_temp.end(); ++p) {
     uint64_t pool = p->first.pool();
     if (pending_inc.old_pools.count(pool)) {
       dout(10) << __func__ << " ignore " << p->first << " -> " << p->second
@@ -1885,7 +1794,8 @@ void OSDMonitor::check_sub(Subscription *sub)
     if (sub->next >= 1)
       send_incremental(sub->next, sub->session->inst, sub->incremental_onetime);
     else
-      sub->session->con->send_message(build_latest_full());
+      mon->messenger->send_message(build_latest_full(),
+				   sub->session->inst);
     if (sub->onetime)
       mon->session_map.remove_sub(sub);
     else
@@ -1971,14 +1881,9 @@ void OSDMonitor::tick()
 	    pending_inc.new_state[o] = 0;
 	  pending_inc.new_state[o] |= CEPH_OSD_AUTOOUT;
 
-	  // remember previous weight
-	  if (pending_inc.new_xinfo.count(o) == 0)
-	    pending_inc.new_xinfo[o] = osdmap.osd_xinfo[o];
-	  pending_inc.new_xinfo[o].old_weight = osdmap.osd_weight[o];
-
 	  do_propose = true;
 	
-	  mon->clog->info() << "osd." << o << " out (down for " << down << ")\n";
+	  mon->clog.info() << "osd." << o << " out (down for " << down << ")\n";
 	} else
 	  continue;
       }
@@ -2067,7 +1972,7 @@ void OSDMonitor::handle_osd_timeouts(const utime_t &now,
     } else if (can_mark_down(i)) {
       utime_t diff = now - t->second;
       if (diff > timeo) {
-	mon->clog->info() << "osd." << i << " marked down after no pg stats for " << diff << "seconds\n";
+	mon->clog.info() << "osd." << i << " marked down after no pg stats for " << diff << "seconds\n";
 	derr << "no osd or pg stats from osd." << i << " since " << t->second << ", " << diff
 	     << " seconds ago.  marking down" << dendl;
 	pending_inc.new_state[i] = CEPH_OSD_UP;
@@ -2273,35 +2178,12 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
     else
       rdata.append(ds);
   }
-  else if (prefix == "osd perf") {
-    const PGMap &pgm = mon->pgmon()->pg_map;
-    if (f) {
-      f->open_object_section("osdstats");
-      pgm.dump_osd_perf_stats(f.get());
-      f->close_section();
-      f->flush(ds);
-    } else {
-      pgm.print_osd_perf_stats(&ds);
-    }
-    rdata.append(ds);
-  }
-  else if (prefix == "osd blocked-by") {
-    const PGMap &pgm = mon->pgmon()->pg_map;
-    if (f) {
-      f->open_object_section("osd_blocked_by");
-      pgm.dump_osd_blocked_by_stats(f.get());
-      f->close_section();
-      f->flush(ds);
-    } else {
-      pgm.print_osd_blocked_by_stats(&ds);
-    }
-    rdata.append(ds);
-  }
   else if (prefix == "osd dump" ||
 	   prefix == "osd tree" ||
 	   prefix == "osd ls" ||
 	   prefix == "osd getmap" ||
-	   prefix == "osd getcrushmap") {
+	   prefix == "osd getcrushmap" ||
+	   prefix == "osd perf") {
     string val;
 
     epoch_t epoch = 0;
@@ -2374,13 +2256,24 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
     } else if (prefix == "osd getcrushmap") {
       p->crush->encode(rdata);
       ss << "got crush map from osdmap epoch " << p->get_epoch();
+    } else if (prefix == "osd perf") {
+      const PGMap &pgm = mon->pgmon()->pg_map;
+      if (f) {
+	f->open_object_section("osdstats");
+	pgm.dump_osd_perf_stats(f.get());
+	f->close_section();
+	f->flush(ds);
+      } else {
+	pgm.print_osd_perf_stats(&ds);
+      }
+      rdata.append(ds);
     }
     if (p != &osdmap)
       delete p;
   } else if (prefix == "osd getmaxosd") {
     if (f) {
       f->open_object_section("getmaxosd");
-      f->dump_unsigned("epoch", osdmap.get_epoch());
+      f->dump_int("epoch", osdmap.get_epoch());
       f->dump_int("max_osd", osdmap.get_max_osd());
       f->close_section();
       f->flush(rdata);
@@ -2404,8 +2297,6 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
     string format;
     cmd_getval(g_ceph_context, cmdmap, "format", format, string("json-pretty"));
     boost::scoped_ptr<Formatter> f(new_formatter(format));
-    if (!f)
-      f.reset(new_formatter("json-pretty"));
 
     f->open_object_section("osd_location");
     f->dump_int("osd", osd);
@@ -2433,8 +2324,6 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
     string format;
     cmd_getval(g_ceph_context, cmdmap, "format", format, string("json-pretty"));
     boost::scoped_ptr<Formatter> f(new_formatter(format));
-    if (!f)
-      f.reset(new_formatter("json-pretty"));
     f->open_object_section("osd_metadata");
     r = dump_osd_metadata(osd, f.get(), &ss);
     if (r < 0)
@@ -2468,21 +2357,15 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
       fullobjname = oid.name;
     if (f) {
       f->open_object_section("osd_map");
-      f->dump_unsigned("epoch", osdmap.get_epoch());
+      f->dump_int("epoch", osdmap.get_epoch());
       f->dump_string("pool", poolstr);
       f->dump_int("pool_id", pool);
       f->dump_stream("objname") << fullobjname;
       f->dump_stream("raw_pgid") << pgid;
       f->dump_stream("pgid") << mpgid;
-      f->open_array_section("up");
-      for (vector<int>::iterator p = up.begin(); p != up.end(); ++p)
-        f->dump_int("osd", *p);
-      f->close_section();
+      f->dump_stream("up") << up;
       f->dump_int("up_primary", up_p);
-      f->open_array_section("acting");
-      for (vector<int>::iterator p = acting.begin(); p != acting.end(); ++p)
-        f->dump_int("osd", *p);
-      f->close_section();
+      f->dump_stream("acting") << acting;
       f->dump_int("acting_primary", acting_p);
       f->close_section(); // osd_map
       f->flush(rdata);
@@ -2671,8 +2554,6 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
         f->dump_unsigned("cache_min_evict_age", p->cache_min_evict_age);
       } else if (var == "erasure_code_profile") {
        f->dump_string("erasure_code_profile", p->erasure_code_profile);
-      } else if (var == "min_read_recency_for_promote") {
-	f->dump_int("min_read_recency_for_promote", p->min_read_recency_for_promote);
       }
 
       f->close_section();
@@ -2722,8 +2603,6 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
         ss << "cache_min_evict_age: " << p->cache_min_evict_age;
       } else if (var == "erasure_code_profile") {
        ss << "erasure_code_profile: " << p->erasure_code_profile;
-      } else if (var == "min_read_recency_for_promote") {
-	ss << "min_read_recency_for_promote: " << p->min_read_recency_for_promote;
       }
 
       rdata.append(ss);
@@ -2898,13 +2777,13 @@ stats_out:
       osdmap.crush->dump_rules(f.get());
       f->close_section();
     } else {
-      int ruleno = osdmap.crush->get_rule_id(name);
-      if (ruleno < 0) {
+      int ruleset = osdmap.crush->get_rule_id(name);
+      if (ruleset < 0) {
 	ss << "unknown crush ruleset '" << name << "'";
-	r = ruleno;
+	r = ruleset;
 	goto reply;
       }
-      osdmap.crush->dump_rule(ruleno, f.get());
+      osdmap.crush->dump_rule(ruleset, f.get());
     }
     ostringstream rs;
     f->flush(rs);
@@ -2945,7 +2824,7 @@ stats_out:
       f->open_array_section("erasure-code-profiles");
     for(map<string,map<string,string> >::const_iterator i = profiles.begin();
 	i != profiles.end();
-	++i) {
+	i++) {
       if (f)
         f->dump_string("profile", i->first.c_str());
       else
@@ -2971,7 +2850,7 @@ stats_out:
       f->open_object_section("profile");
     for (map<string,string>::const_iterator i = profile.begin();
 	 i != profile.end();
-	 ++i) {
+	 i++) {
       if (f)
         f->dump_string(i->first.c_str(), i->second.c_str());
       else
@@ -3018,7 +2897,7 @@ bool OSDMonitor::update_pools_status()
     pool_stat_t& stats = mon->pgmon()->pg_map.pg_pool_sum[it->first];
     object_stat_sum_t& sum = stats.stats.sum;
     const pg_pool_t &pool = it->second;
-    const string& pool_name = osdmap.get_pool_name(it->first);
+    const char *pool_name = osdmap.get_pool_name(it->first);
 
     bool pool_is_full =
       (pool.quota_max_bytes > 0 && (uint64_t)sum.num_bytes >= pool.quota_max_bytes) ||
@@ -3028,7 +2907,7 @@ bool OSDMonitor::update_pools_status()
       if (pool_is_full)
         continue;
 
-      mon->clog->info() << "pool '" << pool_name
+      mon->clog.info() << "pool '" << pool_name
                        << "' no longer full; removing FULL flag";
 
       update_pool_flags(it->first, pool.get_flags() & ~pg_pool_t::FLAG_FULL);
@@ -3039,12 +2918,12 @@ bool OSDMonitor::update_pools_status()
 
       if (pool.quota_max_bytes > 0 &&
           (uint64_t)sum.num_bytes >= pool.quota_max_bytes) {
-        mon->clog->warn() << "pool '" << pool_name << "' is full"
+        mon->clog.warn() << "pool '" << pool_name << "' is full"
                          << " (reached quota's max_bytes: "
                          << si_t(pool.quota_max_bytes) << ")";
       } else if (pool.quota_max_objects > 0 &&
 		 (uint64_t)sum.num_objects >= pool.quota_max_objects) {
-        mon->clog->warn() << "pool '" << pool_name << "' is full"
+        mon->clog.warn() << "pool '" << pool_name << "' is full"
                          << " (reached quota's max_objects: "
                          << pool.quota_max_objects << ")";
       } else {
@@ -3069,7 +2948,7 @@ void OSDMonitor::get_pools_health(
     pool_stat_t& stats = mon->pgmon()->pg_map.pg_pool_sum[it->first];
     object_stat_sum_t& sum = stats.stats.sum;
     const pg_pool_t &pool = it->second;
-    const string& pool_name = osdmap.get_pool_name(it->first);
+    const char *pool_name = osdmap.get_pool_name(it->first);
 
     if (pool.get_flags() & pg_pool_t::FLAG_FULL) {
       // uncomment these asserts if/when we update the FULL flag on pg_stat update
@@ -3155,12 +3034,12 @@ int OSDMonitor::prepare_new_pool(MPoolOp *m)
     return prepare_new_pool(m->name, m->auid, m->crush_rule, ruleset_name,
 			    0, 0,
                             erasure_code_profile,
-			    pg_pool_t::TYPE_REPLICATED, 0, ss);
+			    pg_pool_t::TYPE_REPLICATED, ss);
   else
     return prepare_new_pool(m->name, session->auid, m->crush_rule, ruleset_name,
 			    0, 0,
                             erasure_code_profile,
-			    pg_pool_t::TYPE_REPLICATED, 0, ss);
+			    pg_pool_t::TYPE_REPLICATED, ss);
 }
 
 int OSDMonitor::crush_ruleset_create_erasure(const string &name,
@@ -3185,7 +3064,7 @@ int OSDMonitor::crush_ruleset_create_erasure(const string &name,
     ErasureCodeInterfaceRef erasure_code;
     int err = get_erasure_code(profile, &erasure_code, ss);
     if (err) {
-      ss << "failed to load plugin using profile " << profile << std::endl;
+      ss << "failed to load plugin using profile " << profile;
       return err;
     }
 
@@ -3213,7 +3092,7 @@ int OSDMonitor::get_erasure_code(const string &erasure_code_profile,
   if (plugin == profile.end()) {
     ss << "cannot determine the erasure code plugin"
        << " because there is no 'plugin' entry in the erasure_code_profile "
-       << profile << std::endl;
+       << profile;
     return -EINVAL;
   }
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
@@ -3308,37 +3187,28 @@ int OSDMonitor::parse_erasure_code_profile(const vector<string> &erasure_code_pr
 					   map<string,string> *erasure_code_profile_map,
 					   stringstream &ss)
 {
-  int r = get_json_str_map(g_conf->osd_pool_default_erasure_code_profile,
-		           ss,
-		           erasure_code_profile_map);
+  int r = get_str_map(g_conf->osd_pool_default_erasure_code_profile,
+		      ss,
+		      erasure_code_profile_map);
   if (r)
     return r;
-  assert((*erasure_code_profile_map).count("plugin"));
-  string default_plugin = (*erasure_code_profile_map)["plugin"];
-  map<string,string> user_map;
+  (*erasure_code_profile_map)["directory"] =
+    g_conf->osd_pool_default_erasure_code_directory;
+
   for (vector<string>::const_iterator i = erasure_code_profile.begin();
        i != erasure_code_profile.end();
        ++i) {
     size_t equal = i->find('=');
-    if (equal == string::npos) {
-      user_map[*i] = string();
+    if (equal == string::npos)
       (*erasure_code_profile_map)[*i] = string();
-    } else {
+    else {
       const string key = i->substr(0, equal);
       equal++;
       const string value = i->substr(equal);
-      user_map[key] = value;
       (*erasure_code_profile_map)[key] = value;
     }
   }
 
-  if (user_map.count("plugin") && user_map["plugin"] != default_plugin)
-    (*erasure_code_profile_map) = user_map;
-
-  if ((*erasure_code_profile_map).count("directory") == 0)
-    (*erasure_code_profile_map)["directory"] =
-      g_conf->osd_pool_default_erasure_code_directory;
-
   return 0;
 }
 
@@ -3419,7 +3289,27 @@ int OSDMonitor::prepare_pool_crush_ruleset(const unsigned pool_type,
 	    return *crush_ruleset;
 	  }
 	} else {
-	  return get_crush_ruleset(ruleset_name, crush_ruleset, ss);
+	  int ret;
+	  ret = osdmap.crush->get_rule_id(ruleset_name);
+	  if (ret != -ENOENT) {
+	    // found it, use it
+	    *crush_ruleset = ret;
+	  } else {
+	    CrushWrapper newcrush;
+	    _get_pending_crush(newcrush);
+
+	    ret = newcrush.get_rule_id(ruleset_name);
+	    if (ret != -ENOENT) {
+	      // found it, wait for it to be proposed
+	      dout(20) << "prepare_pool_crush_ruleset: ruleset "
+		   << ruleset_name << " is pending, try again" << dendl;
+	      return -EAGAIN;
+	    } else {
+	      //Cannot find it , return error
+	      ss << "Specified ruleset " << ruleset_name << " doesn't exist";
+	      return ret;
+	    }
+	  }
 	}
       }
       break;
@@ -3458,35 +3348,6 @@ int OSDMonitor::prepare_pool_crush_ruleset(const unsigned pool_type,
 
   return 0;
 }
-
-int OSDMonitor::get_crush_ruleset(const string &ruleset_name,
-				  int *crush_ruleset,
-				  stringstream &ss)
-{
-  int ret;
-  ret = osdmap.crush->get_rule_id(ruleset_name);
-  if (ret != -ENOENT) {
-    // found it, use it
-    *crush_ruleset = ret;
-  } else {
-    CrushWrapper newcrush;
-    _get_pending_crush(newcrush);
-
-    ret = newcrush.get_rule_id(ruleset_name);
-    if (ret != -ENOENT) {
-      // found it, wait for it to be proposed
-      dout(20) << __func__ << ": ruleset " << ruleset_name
-	       << " try again" << dendl;
-      return -EAGAIN;
-    } else {
-      //Cannot find it , return error
-      ss << "specified ruleset " << ruleset_name << " doesn't exist";
-      return ret;
-    }
-  }
-  return 0;
-}
-
 /**
  * @param name The name of the new pool
  * @param auid The auid of the pool owner. Can be -1
@@ -3496,7 +3357,6 @@ int OSDMonitor::get_crush_ruleset(const string &ruleset_name,
  * @param pgp_num The pgp_num to use. If set to 0, will use the system default
  * @param erasure_code_profile The profile name in OSDMap to be used for erasure code
  * @param pool_type TYPE_ERASURE, TYPE_REP or TYPE_RAID4
- * @param expected_num_objects expected number of objects on the pool
  * @param ss human readable error message, if any.
  *
  * @return 0 on success, negative errno on failure.
@@ -3507,7 +3367,6 @@ int OSDMonitor::prepare_new_pool(string& name, uint64_t auid,
                                  unsigned pg_num, unsigned pgp_num,
 				 const string &erasure_code_profile,
                                  const unsigned pool_type,
-                                 const uint64_t expected_num_objects,
 				 stringstream &ss)
 {
   int r;
@@ -3544,7 +3403,6 @@ int OSDMonitor::prepare_new_pool(string& name, uint64_t auid,
   pi->size = size;
   pi->min_size = min_size;
   pi->crush_ruleset = crush_ruleset;
-  pi->expected_num_objects = expected_num_objects;
   pi->object_hash = CEPH_STR_HASH_RJENKINS;
   pi->set_pg_num(pg_num ? pg_num : g_conf->osd_pool_default_pg_num);
   pi->set_pgp_num(pgp_num ? pgp_num : g_conf->osd_pool_default_pgp_num);
@@ -3607,35 +3465,6 @@ int OSDMonitor::parse_osd_id(const char *s, stringstream *pss)
   return id;
 }
 
-
-/**
- * Special setter for crash_replay_interval on a pool.  Equivalent to
- * using prepare_command_pool_set, but in a form convenient for use
- * from MDSMonitor rather than from an administrative command.
- */
-int OSDMonitor::set_crash_replay_interval(const int64_t pool_id, const uint32_t cri)
-{
-  pg_pool_t p;
-  if (pending_inc.new_pools.count(pool_id)) {
-    p = pending_inc.new_pools[pool_id];
-  } else {
-    const pg_pool_t *p_ptr = osdmap.get_pg_pool(pool_id);
-    if (p_ptr == NULL) {
-      return -ENOENT;
-    } else {
-      p = *p_ptr;
-    }
-  }
-
-  dout(10) << "Set pool " << pool_id << " crash_replay_interval=" << cri << dendl;
-  p.crash_replay_interval = cri;
-  p.last_change = pending_inc.epoch;
-  pending_inc.new_pools[pool_id] = p;
-
-  return 0;
-}
-
-
 int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
                                          stringstream& ss)
 {
@@ -3890,12 +3719,6 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
       return -EINVAL;
     }
     p.cache_min_evict_age = n;
-  } else if (var == "min_read_recency_for_promote") {
-    if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
-      return -EINVAL;
-    }
-    p.min_read_recency_for_promote = n;
   } else {
     ss << "unrecognized variable '" << var << "'";
     return -EINVAL;
@@ -4320,81 +4143,45 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
     } while (false);
 
   } else if (prefix == "osd crush reweight") {
-    // osd crush reweight <name> <weight>
-    CrushWrapper newcrush;
-    _get_pending_crush(newcrush);
+    do {
+      // osd crush reweight <name> <weight>
+      CrushWrapper newcrush;
+      _get_pending_crush(newcrush);
 
-    string name;
-    cmd_getval(g_ceph_context, cmdmap, "name", name);
-    if (!newcrush.name_exists(name)) {
-      err = -ENOENT;
-      ss << "device '" << name << "' does not appear in the crush map";
-      goto reply;
-    }
+      string name;
+      cmd_getval(g_ceph_context, cmdmap, "name", name);
+      if (!newcrush.name_exists(name)) {
+	err = -ENOENT;
+	ss << "device '" << name << "' does not appear in the crush map";
+	break;
+      }
 
-    int id = newcrush.get_item_id(name);
-    if (id < 0) {
-      ss << "device '" << name << "' is not a leaf in the crush map";
-      err = -EINVAL;
-      goto reply;
-    }
-    double w;
-    if (!cmd_getval(g_ceph_context, cmdmap, "weight", w)) {
-      ss << "unable to parse weight value '"
-	 << cmd_vartype_stringify(cmdmap["weight"]) << "'";
-      err = -EINVAL;
-      goto reply;
-    }
+      int id = newcrush.get_item_id(name);
+      if (id < 0) {
+	ss << "device '" << name << "' is not a leaf in the crush map";
+	break;
+      }
+      double w;
+      if (!cmd_getval(g_ceph_context, cmdmap, "weight", w)) {
+        ss << "unable to parse weight value '"
+           << cmd_vartype_stringify(cmdmap["weight"]) << "'";
+        err = -EINVAL;
+        break;
+      }
 
-    err = newcrush.adjust_item_weightf(g_ceph_context, id, w);
-    if (err < 0)
-      goto reply;
-    pending_inc.crush.clear();
-    newcrush.encode(pending_inc.crush);
-    ss << "reweighted item id " << id << " name '" << name << "' to " << w
-       << " in crush map";
-    getline(ss, rs);
-    wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
+      err = newcrush.adjust_item_weightf(g_ceph_context, id, w);
+      if (err >= 0) {
+	pending_inc.crush.clear();
+	newcrush.encode(pending_inc.crush);
+	ss << "reweighted item id " << id << " name '" << name << "' to " << w
+	   << " in crush map";
+	getline(ss, rs);
+	wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
 						  get_last_committed() + 1));
-    return true;
-  } else if (prefix == "osd crush reweight-subtree") {
-    // osd crush reweight <name> <weight>
-    CrushWrapper newcrush;
-    _get_pending_crush(newcrush);
-
-    string name;
-    cmd_getval(g_ceph_context, cmdmap, "name", name);
-    if (!newcrush.name_exists(name)) {
-      err = -ENOENT;
-      ss << "device '" << name << "' does not appear in the crush map";
-      goto reply;
-    }
-
-    int id = newcrush.get_item_id(name);
-    if (id >= 0) {
-      ss << "device '" << name << "' is not a subtree in the crush map";
-      err = -EINVAL;
-      goto reply;
-    }
-    double w;
-    if (!cmd_getval(g_ceph_context, cmdmap, "weight", w)) {
-      ss << "unable to parse weight value '"
-	 << cmd_vartype_stringify(cmdmap["weight"]) << "'";
-      err = -EINVAL;
-      goto reply;
-    }
+	return true;
+      }
+    } while (false);
 
-    err = newcrush.adjust_subtree_weightf(g_ceph_context, id, w);
-    if (err < 0)
-      goto reply;
-    pending_inc.crush.clear();
-    newcrush.encode(pending_inc.crush);
-    ss << "reweighted subtree id " << id << " name '" << name << "' to " << w
-       << " in crush map";
-    getline(ss, rs);
-    wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
-					      get_last_committed() + 1));
-    return true;
   } else if (prefix == "osd crush tunables") {
     CrushWrapper newcrush;
     _get_pending_crush(newcrush);
@@ -4441,9 +4228,7 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
       mode = "firstn";
 
     if (osdmap.crush->rule_exists(name)) {
-      // The name is uniquely associated to a ruleid and the ruleset it contains
-      // From the user point of view, the ruleset is more meaningfull.
-      ss << "ruleset " << name << " already exists";
+      ss << "rule " << name << " already exists";
       err = 0;
       goto reply;
     }
@@ -4452,15 +4237,13 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
     _get_pending_crush(newcrush);
 
     if (newcrush.rule_exists(name)) {
-      // The name is uniquely associated to a ruleid and the ruleset it contains
-      // From the user point of view, the ruleset is more meaningfull.
-      ss << "ruleset " << name << " already exists";
+      ss << "rule " << name << " already exists";
       err = 0;
     } else {
-      int ruleno = newcrush.add_simple_ruleset(name, root, type, mode,
-					       pg_pool_t::TYPE_REPLICATED, &ss);
-      if (ruleno < 0) {
-	err = ruleno;
+      int rule = newcrush.add_simple_ruleset(name, root, type, mode,
+					     pg_pool_t::TYPE_REPLICATED, &ss);
+      if (rule < 0) {
+	err = rule;
 	goto reply;
       }
 
@@ -4519,13 +4302,6 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
     err = parse_erasure_code_profile(profile, &profile_map, ss);
     if (err)
       goto reply;
-    if (profile_map.find("plugin") == profile_map.end()) {
-      ss << "erasure-code-profile " << profile_map
-	 << " must contain a plugin entry" << std::endl;
-      err = -EINVAL;
-      goto reply;
-    }
-    string plugin = profile_map["plugin"];
 
     if (osdmap.has_erasure_code_profile(name)) {
       if (osdmap.get_erasure_code_profile(name) == profile_map) {
@@ -4543,13 +4319,6 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
       dout(20) << "erasure code profile " << name << " try again" << dendl;
       goto wait;
     } else {
-      if (plugin == "isa" || plugin == "lrc") {
-	err = check_cluster_features(CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2, ss);
-	if (err == -EAGAIN)
-	  goto wait;
-	if (err)
-	  goto reply;
-      }
       dout(20) << "erasure code profile " << name << " set" << dendl;
       pending_inc.set_erasure_code_profile(name, profile_map);
     }
@@ -4641,7 +4410,7 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
       // complexity now.
       int ruleset = newcrush.get_rule_mask_ruleset(ruleno);
       if (osdmap.crush_ruleset_in_use(ruleset)) {
-	ss << "crush ruleset " << name << " " << ruleset << " is in use";
+	ss << "crush rule " << name << " ruleset " << ruleset << " is in use";
 	err = -EBUSY;
 	goto reply;
       }
@@ -4675,23 +4444,6 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
       goto reply;
     }
 
-    // Don't allow shrinking OSD number as this will cause data loss
-    // and may cause kernel crashes.
-    // Note: setmaxosd sets the maximum OSD number and not the number of OSDs
-    if (newmax < osdmap.get_max_osd()) {
-      // Check if the OSDs exist between current max and new value.
-      // If there are any OSDs exist, then don't allow shrinking number
-      // of OSDs.
-      for (int i = newmax; i <= osdmap.get_max_osd(); i++) {
-        if (osdmap.exists(i)) {
-          err = -EBUSY;
-          ss << "cannot shrink max_osd to " << newmax
-             << " because osd." << i << " (and possibly others) still in use";
-          goto reply;
-        }
-      }
-    }
-
     pending_inc.new_max_osd = newmax;
     ss << "set new max_osd = " << pending_inc.new_max_osd;
     getline(ss, rs);
@@ -5275,7 +5027,6 @@ done:
       goto reply;
     }
 
-    bool implicit_ruleset_creation = false;
     string ruleset_name;
     cmd_getval(g_ceph_context, cmdmap, "ruleset", ruleset_name);
     string erasure_code_profile;
@@ -5304,7 +5055,6 @@ done:
 	}
       }
       if (ruleset_name == "") {
-	implicit_ruleset_creation = true;
 	if (erasure_code_profile == "default") {
 	  ruleset_name = "erasure-code";
 	} else {
@@ -5318,30 +5068,11 @@ done:
       ruleset_name = erasure_code_profile;
     }
 
-    if (!implicit_ruleset_creation && ruleset_name != "") {
-      int ruleset;
-      err = get_crush_ruleset(ruleset_name, &ruleset, ss);
-      if (err == -EAGAIN) {
-	wait_for_finished_proposal(new C_RetryMessage(this, m));
-	return true;
-      }
-      if (err)
-	goto reply;
-    }
-
-    int64_t expected_num_objects;
-    cmd_getval(g_ceph_context, cmdmap, "expected_num_objects", expected_num_objects, int64_t(0));
-    if (expected_num_objects < 0) {
-      ss << "'expected_num_objects' must be non-negative";
-      err = -EINVAL;
-      goto reply;
-    }
     err = prepare_new_pool(poolstr, 0, // auid=0 for admin created pool
 			   -1, // default crush rule
 			   ruleset_name,
 			   pg_num, pgp_num,
 			   erasure_code_profile, pool_type,
-                           (uint64_t)expected_num_objects,
 			   ss);
     if (err < 0) {
       switch(err) {
@@ -5470,11 +5201,18 @@ done:
     assert(p);
     const pg_pool_t *tp = osdmap.get_pg_pool(tierpool_id);
     assert(tp);
-
-    if (!_check_become_tier(tierpool_id, tp, pool_id, p, &err, &ss)) {
+    if (p->tiers.count(tierpool_id)) {
+      assert(tp->tier_of == pool_id);
+      err = 0;
+      ss << "pool '" << tierpoolstr << "' is now (or already was) a tier of '" << poolstr << "'";
+      goto reply;
+    }
+    if (tp->is_tier()) {
+      ss << "tier pool '" << tierpoolstr << "' is already a tier of '"
+	 << osdmap.get_pool_name(tp->tier_of) << "'";
+      err = -EINVAL;
       goto reply;
     }
-
     // make sure new tier is empty
     string force_nonempty;
     cmd_getval(g_ceph_context, cmdmap, "force_nonempty", force_nonempty);
@@ -5521,11 +5259,6 @@ done:
     assert(p);
     const pg_pool_t *tp = osdmap.get_pg_pool(tierpool_id);
     assert(tp);
-
-    if (!_check_remove_tier(pool_id, p, &err, &ss)) {
-      goto reply;
-    }
-
     if (p->tiers.count(tierpool_id) == 0) {
       ss << "pool '" << tierpoolstr << "' is now (or already was) not a tier of '" << poolstr << "'";
       err = 0;
@@ -5600,11 +5333,6 @@ done:
       err = -EINVAL;
       goto reply;
     }
-
-    if (!_check_remove_tier(pool_id, p, &err, &ss)) {
-      goto reply;
-    }
-
     // go
     pg_pool_t *np = pending_inc.get_new_pool(pool_id, p);
     np->read_tier = overlaypool_id;
@@ -5630,11 +5358,6 @@ done:
       ss << "there is now (or already was) no overlay for '" << poolstr << "'";
       goto reply;
     }
-
-    if (!_check_remove_tier(pool_id, p, &err, &ss)) {
-      goto reply;
-    }
-
     // go
     pg_pool_t *np = pending_inc.get_new_pool(pool_id, p);
     np->clear_read_tier();
@@ -5690,14 +5413,12 @@ done:
      *  forward:    Forward all reads and writes to base pool
      *  writeback:  Cache writes, promote reads from base pool
      *  readonly:   Forward writes to base pool
-     *  readforward: Writes are in writeback mode, Reads and in forward mode
      *
      * Hence, these are the allowed transitions:
      *
      *  none -> any
-     *  forward -> readforward || writeback || any IF num_objects_dirty == 0
-     *  readforward -> forward || writeback || any IF num_objects_dirty == 0
-     *  writeback -> readforward || forward
+     *  forward -> writeback || any IF num_objects_dirty == 0
+     *  writeback -> forward
      *  readonly -> any
      */
 
@@ -5706,25 +5427,17 @@ done:
     // whatever mode is on the pending state.
 
     if (p->cache_mode == pg_pool_t::CACHEMODE_WRITEBACK &&
-        (mode != pg_pool_t::CACHEMODE_FORWARD &&
-	  mode != pg_pool_t::CACHEMODE_READFORWARD)) {
+        mode != pg_pool_t::CACHEMODE_FORWARD) {
       ss << "unable to set cache-mode '" << pg_pool_t::get_cache_mode_name(mode)
          << "' on a '" << pg_pool_t::get_cache_mode_name(p->cache_mode)
          << "' pool; only '"
          << pg_pool_t::get_cache_mode_name(pg_pool_t::CACHEMODE_FORWARD)
-	 << "','"
-         << pg_pool_t::get_cache_mode_name(pg_pool_t::CACHEMODE_READFORWARD)
         << "' allowed.";
       err = -EINVAL;
       goto reply;
     }
-    if ((p->cache_mode == pg_pool_t::CACHEMODE_READFORWARD &&
-        (mode != pg_pool_t::CACHEMODE_WRITEBACK &&
-	  mode != pg_pool_t::CACHEMODE_FORWARD)) ||
-
-        (p->cache_mode == pg_pool_t::CACHEMODE_FORWARD &&
-        (mode != pg_pool_t::CACHEMODE_WRITEBACK &&
-	  mode != pg_pool_t::CACHEMODE_READFORWARD))) {
+    if (p->cache_mode == pg_pool_t::CACHEMODE_FORWARD &&
+               mode != pg_pool_t::CACHEMODE_WRITEBACK) {
 
       const pool_stat_t& tier_stats =
         mon->pgmon()->pg_map.get_pg_pool_sum_stat(pool_id);
@@ -5737,6 +5450,7 @@ done:
         goto reply;
       }
     }
+
     // go
     pg_pool_t *np = pending_inc.get_new_pool(pool_id, p);
     np->cache_mode = mode;
@@ -5774,11 +5488,18 @@ done:
     assert(p);
     const pg_pool_t *tp = osdmap.get_pg_pool(tierpool_id);
     assert(tp);
-
-    if (!_check_become_tier(tierpool_id, tp, pool_id, p, &err, &ss)) {
+    if (p->tiers.count(tierpool_id)) {
+      assert(tp->tier_of == pool_id);
+      err = 0;
+      ss << "pool '" << tierpoolstr << "' is now (or already was) a tier of '" << poolstr << "'";
+      goto reply;
+    }
+    if (tp->is_tier()) {
+      ss << "tier pool '" << tierpoolstr << "' is already a tier of '"
+	 << osdmap.get_pool_name(tp->tier_of) << "'";
+      err = -EINVAL;
       goto reply;
     }
-
     int64_t size = 0;
     if (!cmd_getval(g_ceph_context, cmdmap, "size", size)) {
       ss << "unable to parse 'size' value '"
@@ -5830,7 +5551,6 @@ done:
     ntp->cache_mode = mode;
     ntp->hit_set_count = g_conf->osd_tier_default_cache_hit_set_count;
     ntp->hit_set_period = g_conf->osd_tier_default_cache_hit_set_period;
-    ntp->min_read_recency_for_promote = g_conf->osd_tier_default_cache_min_read_recency_for_promote;
     ntp->hit_set_params = hsp;
     ntp->target_max_bytes = size;
     ss << "pool '" << tierpoolstr << "' is now (or already was) a cache tier of '" << poolstr << "'";
@@ -5884,42 +5604,14 @@ done:
     int64_t oload;
     cmd_getval(g_ceph_context, cmdmap, "oload", oload, int64_t(120));
     string out_str;
-    err = reweight_by_utilization(oload, out_str, false, NULL);
+    err = reweight_by_utilization(oload, out_str);
     if (err < 0) {
       ss << "FAILED reweight-by-utilization: " << out_str;
-    } else if (err == 0) {
-      ss << "no change: " << out_str;
-    } else {
-      ss << "SUCCESSFUL reweight-by-utilization: " << out_str;
-      getline(ss, rs);
-      wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
-						get_last_committed() + 1));
-      return true;
-    }
-  } else if (prefix == "osd reweight-by-pg") {
-    int64_t oload;
-    cmd_getval(g_ceph_context, cmdmap, "oload", oload, int64_t(120));
-    set<int64_t> pools;
-    vector<string> poolnamevec;
-    cmd_getval(g_ceph_context, cmdmap, "pools", poolnamevec);
-    for (unsigned j = 0; j < poolnamevec.size(); j++) {
-      int64_t pool = osdmap.lookup_pg_pool_name(poolnamevec[j]);
-      if (pool < 0) {
-	ss << "pool '" << poolnamevec[j] << "' does not exist";
-	err = -ENOENT;
-	goto reply;
-      }
-      pools.insert(pool);
     }
-    string out_str;
-    err = reweight_by_utilization(oload, out_str, true,
-				  pools.size() ? &pools : NULL);
-    if (err < 0) {
-      ss << "FAILED reweight-by-pg: " << out_str;
-    } else if (err == 0) {
+    else if (err == 0) {
       ss << "no change: " << out_str;
     } else {
-      ss << "SUCCESSFUL reweight-by-pg: " << out_str;
+      ss << "SUCCESSFUL reweight-by-utilization: " << out_str;
       getline(ss, rs);
       wait_for_finished_proposal(new Monitor::C_Command(mon, m, 0, rs,
 						get_last_committed() + 1));
@@ -6196,14 +5888,7 @@ bool OSDMonitor::prepare_pool_op_create(MPoolOp *m)
 int OSDMonitor::_check_remove_pool(int64_t pool, const pg_pool_t *p,
 				   ostream *ss)
 {
-  const string& poolstr = osdmap.get_pool_name(pool);
-
-  // If the Pool is in use by CephFS, refuse to delete it
-  MDSMap const &pending_mdsmap = mon->mdsmon()->pending_mdsmap;
-  if (pending_mdsmap.pool_in_use(pool)) {
-    *ss << "pool '" << poolstr << "' is in use by CephFS";
-    return -EBUSY;
-  }
+  string poolstr = osdmap.get_pool_name(pool);
 
   if (p->tier_of >= 0) {
     *ss << "pool '" << poolstr << "' is a tier of '"
@@ -6213,7 +5898,9 @@ int OSDMonitor::_check_remove_pool(int64_t pool, const pg_pool_t *p,
   if (!p->tiers.empty()) {
     *ss << "pool '" << poolstr << "' has tiers";
     for(std::set<uint64_t>::iterator i = p->tiers.begin(); i != p->tiers.end(); ++i) {
-      *ss << " " << osdmap.get_pool_name(*i);
+      const char *name = osdmap.get_pool_name(*i);
+      assert(name != NULL);
+      *ss << " " << name;
     }
     return -EBUSY;
   }
@@ -6221,75 +5908,6 @@ int OSDMonitor::_check_remove_pool(int64_t pool, const pg_pool_t *p,
   return 0;
 }
 
-/**
- * Check if it is safe to add a tier to a base pool
- *
- * @return
- * True if the operation should proceed, false if we should abort here
- * (abort doesn't necessarily mean error, could be idempotency)
- */
-bool OSDMonitor::_check_become_tier(
-    const int64_t tier_pool_id, const pg_pool_t *tier_pool,
-    const int64_t base_pool_id, const pg_pool_t *base_pool,
-    int *err,
-    ostream *ss) const
-{
-  const std::string &tier_pool_name = osdmap.get_pool_name(tier_pool_id);
-  const std::string &base_pool_name = osdmap.get_pool_name(base_pool_id);
-
-  const MDSMap &pending_mdsmap = mon->mdsmon()->pending_mdsmap;
-  if (pending_mdsmap.pool_in_use(tier_pool_id)) {
-    *ss << "pool '" << tier_pool_name << "' is in use by CephFS";
-    *err = -EBUSY;
-    return false;
-  }
-
-  if (base_pool->tiers.count(tier_pool_id)) {
-    assert(tier_pool->tier_of == base_pool_id);
-    *err = 0;
-    *ss << "pool '" << tier_pool_name << "' is now (or already was) a tier of '"
-      << base_pool_name << "'";
-    return false;
-  }
-
-  if (tier_pool->is_tier()) {
-    *ss << "tier pool '" << tier_pool_name << "' is already a tier of '"
-       << osdmap.get_pool_name(tier_pool->tier_of) << "'";
-    *err = -EINVAL;
-    return false;
-  }
-
-  *err = 0;
-  return true;
-}
-
-
-/**
- * Check if it is safe to remove a tier from this base pool
- *
- * @return
- * True if the operation should proceed, false if we should abort here
- * (abort doesn't necessarily mean error, could be idempotency)
- */
-bool OSDMonitor::_check_remove_tier(
-    const int64_t base_pool_id, const pg_pool_t *base_pool,
-    int *err, ostream *ss) const
-{
-  const std::string &base_pool_name = osdmap.get_pool_name(base_pool_id);
-
-  // If the pool is in use by CephFS, then refuse to remove its
-  // tier
-  const MDSMap &pending_mdsmap = mon->mdsmon()->pending_mdsmap;
-  if (pending_mdsmap.pool_in_use(base_pool_id)) {
-    *ss << "pool '" << base_pool_name << "' is in use by CephFS via its tier";
-    *err = -EBUSY;
-    return false;
-  }
-
-  *err = 0;
-  return true;
-}
-
 int OSDMonitor::_prepare_remove_pool(int64_t pool, ostream *ss)
 {
   dout(10) << "_prepare_remove_pool " << pool << dendl;
@@ -6326,7 +5944,7 @@ int OSDMonitor::_prepare_remove_pool(int64_t pool, ostream *ss)
       pending_inc.new_pg_temp[p->first].clear();
     }
   }
-  for (map<pg_t,int32_t>::iterator p = osdmap.primary_temp->begin();
+  for (map<pg_t,int>::iterator p = osdmap.primary_temp->begin();
       p != osdmap.primary_temp->end();
       ++p) {
     if (p->first.pool() == (uint64_t)pool) {
diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h
index 27a4edd..fbce5fe 100644
--- a/src/mon/OSDMonitor.h
+++ b/src/mon/OSDMonitor.h
@@ -158,7 +158,7 @@ public:
 private:
   void update_from_paxos(bool *need_bootstrap);
   void create_pending();  // prepare a new pending
-  void encode_pending(MonitorDBStore::TransactionRef t);
+  void encode_pending(MonitorDBStore::Transaction *t);
   void on_active();
   void on_shutdown();
 
@@ -166,7 +166,7 @@ private:
    * we haven't delegated full version stashing to paxosservice for some time
    * now, making this function useless in current context.
    */
-  virtual void encode_full(MonitorDBStore::TransactionRef t) { }
+  virtual void encode_full(MonitorDBStore::Transaction *t) { }
   /**
    * do not let paxosservice periodically stash full osdmaps, or we will break our
    * locally-managed full maps.  (update_from_paxos loads the latest and writes them
@@ -182,7 +182,7 @@ private:
    * This ensures that anyone post-sync will have enough to rebuild their
    * full osdmaps.
    */
-  void encode_trim_extra(MonitorDBStore::TransactionRef tx, version_t first);
+  void encode_trim_extra(MonitorDBStore::Transaction *tx, version_t first);
 
   void update_msgr_features();
   int check_cluster_features(uint64_t features, stringstream &ss);
@@ -219,8 +219,7 @@ private:
   void send_incremental(PaxosServiceMessage *m, epoch_t first);
   void send_incremental(epoch_t first, entity_inst_t& dest, bool onetime);
 
-  int reweight_by_utilization(int oload, std::string& out_str, bool by_pg,
-			      const set<int64_t> *pools);
+  int reweight_by_utilization(int oload, std::string& out_str);
 
   bool check_source(PaxosServiceMessage *m, uuid_d fsid);
  
@@ -245,14 +244,6 @@ private:
   bool prepare_pgtemp(class MOSDPGTemp *m);
 
   int _check_remove_pool(int64_t pool, const pg_pool_t *pi, ostream *ss);
-  bool _check_become_tier(
-      int64_t tier_pool_id, const pg_pool_t *tier_pool,
-      int64_t base_pool_id, const pg_pool_t *base_pool,
-      int *err, ostream *ss) const;
-  bool _check_remove_tier(
-      int64_t base_pool_id, const pg_pool_t *base_pool,
-      int *err, ostream *ss) const;
-
   int _prepare_remove_pool(int64_t pool, ostream *ss);
   int _prepare_rename_pool(int64_t pool, string newname);
 
@@ -265,9 +256,6 @@ private:
 				   const string &profile,
 				   int *ruleset,
 				   stringstream &ss);
-  int get_crush_ruleset(const string &ruleset_name,
-			int *crush_ruleset,
-			stringstream &ss);
   int get_erasure_code(const string &erasure_code_profile,
 		       ErasureCodeInterfaceRef *erasure_code,
 		       stringstream &ss) const;
@@ -296,7 +284,6 @@ private:
                        unsigned pg_num, unsigned pgp_num,
 		       const string &erasure_code_profile,
                        const unsigned pool_type,
-                       const uint64_t expected_num_objects,
 		       stringstream &ss);
   int prepare_new_pool(MPoolOp *m);
 
@@ -385,7 +372,6 @@ private:
   bool prepare_command(MMonCommand *m);
   bool prepare_command_impl(MMonCommand *m, map<string,cmd_vartype> &cmdmap);
 
-  int set_crash_replay_interval(const int64_t pool_id, const uint32_t cri);
   int prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
                                stringstream& ss);
 
diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc
index b7a0a4e..59b6a03 100644
--- a/src/mon/PGMap.cc
+++ b/src/mon/PGMap.cc
@@ -379,17 +379,31 @@ void PGMap::update_pg(pg_t pgid, bufferlist& bl)
 {
   bufferlist::iterator p = bl.begin();
   ceph::unordered_map<pg_t,pg_stat_t>::iterator s = pg_stat.find(pgid);
-  if (s != pg_stat.end())
+  epoch_t old_lec = 0;
+  if (s != pg_stat.end()) {
+    old_lec = s->second.get_effective_last_epoch_clean();
     stat_pg_sub(pgid, s->second);
+  }
   pg_stat_t& r = pg_stat[pgid];
   ::decode(r, p);
   stat_pg_add(pgid, r);
+
+  epoch_t lec = r.get_effective_last_epoch_clean();
+  if (min_last_epoch_clean &&
+      (lec < min_last_epoch_clean ||  // we did
+       (lec > min_last_epoch_clean && // we might
+	old_lec == min_last_epoch_clean)
+       ))
+    min_last_epoch_clean = 0;
 }
 
 void PGMap::remove_pg(pg_t pgid)
 {
   ceph::unordered_map<pg_t,pg_stat_t>::iterator s = pg_stat.find(pgid);
   if (s != pg_stat.end()) {
+    if (min_last_epoch_clean &&
+	s->second.get_effective_last_epoch_clean() == min_last_epoch_clean)
+      min_last_epoch_clean = 0;
     stat_pg_sub(pgid, s->second);
     pg_stat.erase(s);
   }
@@ -399,14 +413,33 @@ void PGMap::update_osd(int osd, bufferlist& bl)
 {
   bufferlist::iterator p = bl.begin();
   ceph::unordered_map<int32_t,osd_stat_t>::iterator o = osd_stat.find(osd);
-  if (o != osd_stat.end())
+  epoch_t old_lec = 0;
+  if (o != osd_stat.end()) {
+    ceph::unordered_map<int32_t,epoch_t>::iterator i = osd_epochs.find(osd);
+    if (i != osd_epochs.end())
+      old_lec = i->second;
     stat_osd_sub(o->second);
+  }
   osd_stat_t& r = osd_stat[osd];
   ::decode(r, p);
   stat_osd_add(r);
 
   // adjust [near]full status
   register_nearfull_status(osd, r);
+
+  // epoch?
+  if (!p.end()) {
+    epoch_t e;
+    ::decode(e, p);
+
+    if (e < min_last_epoch_clean ||
+	(e > min_last_epoch_clean &&
+	 old_lec == min_last_epoch_clean))
+      min_last_epoch_clean = 0;
+  } else {
+    // WARNING: we are not refreshing min_last_epoch_clean!  must be old store
+    // or old mon running.
+  }
 }
 
 void PGMap::remove_osd(int osd)
@@ -433,11 +466,6 @@ void PGMap::stat_pg_add(const pg_t &pgid, const pg_stat_t &s)
     if (s.acting_primary >= 0)
       creating_pgs_by_osd[s.acting_primary].insert(pgid);
   }
-  for (vector<int>::const_iterator p = s.blocked_by.begin();
-       p != s.blocked_by.end();
-       ++p) {
-    ++blocked_by_sum[*p];
-  }
 }
 
 void PGMap::stat_pg_sub(const pg_t &pgid, const pg_stat_t &s)
@@ -460,16 +488,6 @@ void PGMap::stat_pg_sub(const pg_t &pgid, const pg_stat_t &s)
         creating_pgs_by_osd.erase(s.acting_primary);
     }
   }
-
-  for (vector<int>::const_iterator p = s.blocked_by.begin();
-       p != s.blocked_by.end();
-       ++p) {
-    ceph::unordered_map<int,int>::iterator q = blocked_by_sum.find(*p);
-    assert(q != blocked_by_sum.end());
-    --q->second;
-    if (q->second == 0)
-      blocked_by_sum.erase(q);
-  }
 }
 
 void PGMap::stat_osd_add(const osd_stat_t &s)
@@ -677,7 +695,7 @@ void PGMap::dump_osd_stats(Formatter *f) const
 void PGMap::dump_pg_stats_plain(ostream& ss,
 				const ceph::unordered_map<pg_t, pg_stat_t>& pg_stats) const
 {
-  ss << "pg_stat\tobjects\tmip\tdegr\tmisp\tunf\tbytes\tlog\tdisklog\tstate\tstate_stamp\tv\treported\tup\tup_primary\tacting\tacting_primary\tlast_scrub\tscrub_stamp\tlast_deep_scrub\tdeep_scrub_stamp" << std::endl;
+  ss << "pg_stat\tobjects\tmip\tdegr\tunf\tbytes\tlog\tdisklog\tstate\tstate_stamp\tv\treported\tup\tup_primary\tacting\tacting_primary\tlast_scrub\tscrub_stamp\tlast_deep_scrub\tdeep_scrub_stamp" << std::endl;
   for (ceph::unordered_map<pg_t, pg_stat_t>::const_iterator i = pg_stats.begin();
        i != pg_stats.end(); ++i) {
     const pg_stat_t &st(i->second);
@@ -686,7 +704,6 @@ void PGMap::dump_pg_stats_plain(ostream& ss,
       //<< "\t" << st.num_object_copies
        << "\t" << st.stats.sum.num_objects_missing_on_primary
        << "\t" << st.stats.sum.num_objects_degraded
-       << "\t" << st.stats.sum.num_objects_misplaced
        << "\t" << st.stats.sum.num_objects_unfound
        << "\t" << st.stats.sum.num_bytes
        << "\t" << st.log_size
@@ -771,16 +788,6 @@ void PGMap::get_stuck_stats(PGMap::StuckPG type, utime_t cutoff,
 	continue;
       val = i->second.last_clean;
       break;
-    case STUCK_DEGRADED:
-      if ((i->second.state & PG_STATE_DEGRADED) == 0)
-	continue;
-      val = i->second.last_undegraded;
-      break;
-    case STUCK_UNDERSIZED:
-      if ((i->second.state & PG_STATE_UNDERSIZED) == 0)
-	continue;
-      val = i->second.last_fullsized;
-      break;
     case STUCK_STALE:
       if ((i->second.state & PG_STATE_STALE) == 0)
 	continue;
@@ -840,7 +847,7 @@ void PGMap::dump_osd_perf_stats(Formatter *f) const
 void PGMap::print_osd_perf_stats(std::ostream *ss) const
 {
   TextTable tab;
-  tab.define_column("osd", TextTable::LEFT, TextTable::RIGHT);
+  tab.define_column("osdid", TextTable::LEFT, TextTable::RIGHT);
   tab.define_column("fs_commit_latency(ms)", TextTable::LEFT, TextTable::RIGHT);
   tab.define_column("fs_apply_latency(ms)", TextTable::LEFT, TextTable::RIGHT);
   for (ceph::unordered_map<int32_t, osd_stat_t>::const_iterator i = osd_stat.begin();
@@ -854,34 +861,6 @@ void PGMap::print_osd_perf_stats(std::ostream *ss) const
   (*ss) << tab;
 }
 
-void PGMap::dump_osd_blocked_by_stats(Formatter *f) const
-{
-  f->open_array_section("osd_blocked_by_infos");
-  for (ceph::unordered_map<int,int>::const_iterator i = blocked_by_sum.begin();
-       i != blocked_by_sum.end();
-       ++i) {
-    f->open_object_section("osd");
-    f->dump_int("id", i->first);
-    f->dump_int("num_blocked", i->second);
-    f->close_section();
-  }
-  f->close_section();
-}
-void PGMap::print_osd_blocked_by_stats(std::ostream *ss) const
-{
-  TextTable tab;
-  tab.define_column("osd", TextTable::LEFT, TextTable::RIGHT);
-  tab.define_column("num_blocked", TextTable::LEFT, TextTable::RIGHT);
-  for (ceph::unordered_map<int,int>::const_iterator i = blocked_by_sum.begin();
-       i != blocked_by_sum.end();
-       ++i) {
-    tab << i->first;
-    tab << i->second;
-    tab << TextTable::endrow;
-  }
-  (*ss) << tab;
-}
-
 void PGMap::recovery_summary(Formatter *f, ostream *out,
                              const pool_stat_t& delta_sum) const
 {
@@ -901,23 +880,6 @@ void PGMap::recovery_summary(Formatter *f, ostream *out,
     }
     first = false;
   }
-  if (delta_sum.stats.sum.num_objects_misplaced) {
-    double pc = (double)delta_sum.stats.sum.num_objects_misplaced /
-      (double)delta_sum.stats.sum.num_object_copies * (double)100.0;
-    char b[20];
-    snprintf(b, sizeof(b), "%.3lf", pc);
-    if (f) {
-      f->dump_unsigned("misplaced_objects", delta_sum.stats.sum.num_objects_misplaced);
-      f->dump_unsigned("misplaced_total", delta_sum.stats.sum.num_object_copies);
-      f->dump_string("misplaced_ratio", b);
-    } else {
-      if (!first)
-	*out << "; ";
-      *out << delta_sum.stats.sum.num_objects_misplaced
-	   << "/" << delta_sum.stats.sum.num_object_copies << " objects misplaced (" << b << "%)";
-    }
-    first = false;
-  }
   if (delta_sum.stats.sum.num_objects_unfound) {
     double pc = (double)delta_sum.stats.sum.num_objects_unfound /
       (double)delta_sum.stats.sum.num_objects * (double)100.0;
@@ -933,6 +895,7 @@ void PGMap::recovery_summary(Formatter *f, ostream *out,
       *out << delta_sum.stats.sum.num_objects_unfound
 	   << "/" << delta_sum.stats.sum.num_objects << " unfound (" << b << "%)";
     }
+    first = false;
   }
 }
 
diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h
index 7b4eb6e..99ce521 100644
--- a/src/mon/PGMap.h
+++ b/src/mon/PGMap.h
@@ -84,20 +84,6 @@ public:
       // 0 the stats for the osd
       osd_stat_updates[osd] = osd_stat_t();
     }
-    void stat_osd_down_up(int32_t osd, PGMap& pg_map) {
-      // 0 the op_queue_age_hist for this osd
-      map<int32_t,osd_stat_t>::iterator p = osd_stat_updates.find(osd);
-      if (p != osd_stat_updates.end()) {
-	p->second.op_queue_age_hist.clear();
-	return;
-      }
-      ceph::unordered_map<int32_t,osd_stat_t>::iterator q =
-	pg_map.osd_stat.find(osd);
-      if (q != pg_map.osd_stat.end()) {
-	osd_stat_t& t = osd_stat_updates[osd] = q->second;
-	t.op_queue_age_hist.clear();
-      }
-    }
     void rm_stat(int32_t osd) {
       osd_stat_rm.insert(osd);
       osd_epochs.erase(osd);
@@ -120,7 +106,6 @@ public:
   pool_stat_t pg_sum;
   osd_stat_t osd_sum;
   mutable epoch_t min_last_epoch_clean;
-  ceph::unordered_map<int,int> blocked_by_sum;
 
   utime_t stamp;
 
@@ -186,8 +171,6 @@ public:
   enum StuckPG {
     STUCK_INACTIVE,
     STUCK_UNCLEAN,
-    STUCK_UNDERSIZED,
-    STUCK_DEGRADED,
     STUCK_STALE,
     STUCK_NONE
   };
@@ -280,9 +263,6 @@ public:
   void dump_osd_perf_stats(Formatter *f) const;
   void print_osd_perf_stats(std::ostream *ss) const;
 
-  void dump_osd_blocked_by_stats(Formatter *f) const;
-  void print_osd_blocked_by_stats(std::ostream *ss) const;
-
   void recovery_summary(Formatter *f, ostream *out,
                         const pool_stat_t& delta_sum) const;
   void overall_recovery_summary(Formatter *f, ostream *out) const;
diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc
index d95288c..364ad20 100644
--- a/src/mon/PGMonitor.cc
+++ b/src/mon/PGMonitor.cc
@@ -80,18 +80,16 @@ void PGMonitor::on_active()
   update_logger();
 
   if (mon->is_leader())
-    mon->clog->info() << "pgmap " << pg_map << "\n";
+    mon->clog.info() << "pgmap " << pg_map << "\n";
 }
 
 void PGMonitor::update_logger()
 {
   dout(10) << "update_logger" << dendl;
 
-  mon->cluster_logger->set(l_cluster_osd_bytes, pg_map.osd_sum.kb * 1024ull);
-  mon->cluster_logger->set(l_cluster_osd_bytes_used,
-			   pg_map.osd_sum.kb_used * 1024ull);
-  mon->cluster_logger->set(l_cluster_osd_bytes_avail,
-			   pg_map.osd_sum.kb_avail * 1024ull);
+  mon->cluster_logger->set(l_cluster_osd_kb, pg_map.osd_sum.kb);
+  mon->cluster_logger->set(l_cluster_osd_kb_used, pg_map.osd_sum.kb_used);
+  mon->cluster_logger->set(l_cluster_osd_kb_avail, pg_map.osd_sum.kb_avail);
 
   mon->cluster_logger->set(l_cluster_num_pool, pg_map.pg_pool_sum.size());
   mon->cluster_logger->set(l_cluster_num_pg, pg_map.pg_stat.size());
@@ -114,7 +112,6 @@ void PGMonitor::update_logger()
 
   mon->cluster_logger->set(l_cluster_num_object, pg_map.pg_sum.stats.sum.num_objects);
   mon->cluster_logger->set(l_cluster_num_object_degraded, pg_map.pg_sum.stats.sum.num_objects_degraded);
-  mon->cluster_logger->set(l_cluster_num_object_misplaced, pg_map.pg_sum.stats.sum.num_objects_misplaced);
   mon->cluster_logger->set(l_cluster_num_object_unfound, pg_map.pg_sum.stats.sum.num_objects_unfound);
   mon->cluster_logger->set(l_cluster_num_bytes, pg_map.pg_sum.stats.sum.num_bytes);
 }
@@ -486,7 +483,7 @@ void PGMonitor::apply_pgmap_delta(bufferlist& bl)
 }
 
 
-void PGMonitor::encode_pending(MonitorDBStore::TransactionRef t)
+void PGMonitor::encode_pending(MonitorDBStore::Transaction *t)
 {
   version_t version = pending_inc.version;
   dout(10) << __func__ << " v " << version << dendl;
@@ -548,6 +545,7 @@ void PGMonitor::encode_pending(MonitorDBStore::TransactionRef t)
       ::encode(p->first, dirty);
       bufferlist bl;
       ::encode(p->second, bl, features);
+      ::encode(pending_inc.get_osd_epochs().find(p->first)->second, bl);
       t->put(prefix, stringify(p->first), bl);
     }
     for (set<int32_t>::const_iterator p =
@@ -913,11 +911,6 @@ void PGMonitor::check_osd_map(epoch_t epoch)
         if (report != last_osd_report.end()) {
           last_osd_report.erase(report);
         }
-
-	// clear out osd_stat slow request histogram
-	dout(20) << __func__ << " clearing osd." << p->first
-		 << " request histogram" << dendl;
-	pending_inc.stat_osd_down_up(p->first, pg_map);
       }
 
       if (p->second & CEPH_OSD_EXISTS) {
@@ -976,17 +969,11 @@ void PGMonitor::register_pg(pg_pool_t& pool, pg_t pgid, epoch_t epoch, bool new_
       }
     }
   }
- 
-  pg_stat_t &stats = pending_inc.pg_stat_updates[pgid];
-  stats.state = PG_STATE_CREATING;
-  stats.created = epoch;
-  stats.parent = parent;
-  stats.parent_split_bits = split_bits;
-
-  utime_t now = ceph_clock_now(g_ceph_context);
-  stats.last_scrub_stamp = now;
-  stats.last_deep_scrub_stamp = now;
-  stats.last_clean_scrub_stamp = now;
+  
+  pending_inc.pg_stat_updates[pgid].state = PG_STATE_CREATING;
+  pending_inc.pg_stat_updates[pgid].created = epoch;
+  pending_inc.pg_stat_updates[pgid].parent = parent;
+  pending_inc.pg_stat_updates[pgid].parent_split_bits = split_bits;
 
   if (split_bits == 0) {
     dout(10) << "register_new_pgs  will create " << pgid << dendl;
@@ -1177,7 +1164,7 @@ void PGMonitor::send_pg_creates(int osd, Connection *con)
   }
 
   if (con) {
-    con->send_message(m);
+    mon->messenger->send_message(m, con);
   } else {
     assert(mon->osdmon()->osdmap.is_up(osd));
     mon->messenger->send_message(m, mon->osdmon()->osdmap.get_inst(osd));
@@ -1240,9 +1227,9 @@ void PGMonitor::dump_object_stat_sum(TextTable &tbl, Formatter *f,
     if (verbose) {
       f->dump_int("dirty", sum.num_objects_dirty);
       f->dump_int("rd", sum.num_rd);
-      f->dump_int("rd_bytes", sum.num_rd_kb * 1024ull);
+      f->dump_int("rd_kb", sum.num_rd_kb);
       f->dump_int("wr", sum.num_wr);
-      f->dump_int("wr_bytes", sum.num_wr_kb * 1024ull);
+      f->dump_int("wr_kb", sum.num_wr_kb);
     }
   } else {
     tbl << stringify(si_t(sum.num_bytes));
@@ -1264,19 +1251,14 @@ int64_t PGMonitor::get_rule_avail(OSDMap& osdmap, int ruleno)
   int r = osdmap.crush->get_rule_weight_osd_map(ruleno, &wm);
   if (r < 0)
     return r;
-  if(wm.empty())
+  if(wm.size() == 0)
     return 0;
   int64_t min = -1;
   for (map<int,float>::iterator p = wm.begin(); p != wm.end(); ++p) {
-    ceph::unordered_map<int32_t,osd_stat_t>::const_iterator osd_info = pg_map.osd_stat.find(p->first);
-    if (osd_info != pg_map.osd_stat.end()) {
-      int64_t proj = (float)((osd_info->second).kb_avail * 1024ull) /
-        (double)p->second;
-      if (min < 0 || proj < min)
-        min = proj;
-    } else {
-      dout(0) << "Cannot get stat of OSD " << p->first << dendl;
-    }
+    int64_t proj = (float)(pg_map.osd_stat[p->first].kb_avail * 1024ull) /
+      (double)p->second;
+    if (min < 0 || proj < min)
+      min = proj;
   }
   return min;
 }
@@ -1310,7 +1292,7 @@ void PGMonitor::dump_pool_stats(stringstream &ss, Formatter *f, bool verbose)
     int64_t pool_id = p->first;
     if ((pool_id < 0) || (pg_map.pg_pool_sum.count(pool_id) == 0))
       continue;
-    const string& pool_name = osdmap.get_pool_name(pool_id);
+    string pool_name = osdmap.get_pool_name(pool_id);
     pool_stat_t &stat = pg_map.pg_pool_sum[pool_id];
 
     const pg_pool_t *pool = osdmap.get_pg_pool(pool_id);
@@ -1400,9 +1382,9 @@ void PGMonitor::dump_fs_stats(stringstream &ss, Formatter *f, bool verbose)
 {
   if (f) {
     f->open_object_section("stats");
-    f->dump_int("total_bytes", pg_map.osd_sum.kb * 1024ull);
-    f->dump_int("total_used_bytes", pg_map.osd_sum.kb_used * 1024ull);
-    f->dump_int("total_avail_bytes", pg_map.osd_sum.kb_avail * 1024ull);
+    f->dump_int("total_space", pg_map.osd_sum.kb);
+    f->dump_int("total_used", pg_map.osd_sum.kb_used);
+    f->dump_int("total_avail", pg_map.osd_sum.kb_avail);
     if (verbose) {
       f->dump_int("total_objects", pg_map.pg_sum.stats.sum.num_objects);
     }
@@ -1587,7 +1569,7 @@ bool PGMonitor::preprocess_command(MMonCommand *m)
     mon->osdmon()->osdmap.pg_to_up_acting_osds(pgid, up, acting);
     if (f) {
       f->open_object_section("pg_map");
-      f->dump_unsigned("epoch", mon->osdmon()->osdmap.get_epoch());
+      f->dump_stream("epoch") << mon->osdmon()->osdmap.get_epoch();
       f->dump_stream("raw_pgid") << pgid;
       f->dump_stream("pgid") << mpgid;
 
@@ -1796,14 +1778,6 @@ static void note_stuck_detail(enum PGMap::StuckPG what,
       since = p->second.last_clean;
       whatname = "unclean";
       break;
-    case PGMap::STUCK_DEGRADED:
-      since = p->second.last_undegraded;
-      whatname = "degraded";
-      break;
-    case PGMap::STUCK_UNDERSIZED:
-      since = p->second.last_fullsized;
-      whatname = "undersized";
-      break;
     case PGMap::STUCK_STALE:
       since = p->second.last_unstale;
       whatname = "stale";
@@ -1855,8 +1829,6 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
       note["stale"] += p->second;
     if (p->first & PG_STATE_DOWN)
       note["down"] += p->second;
-    if (p->first & PG_STATE_UNDERSIZED)
-      note["undersized"] += p->second;
     if (p->first & PG_STATE_DEGRADED)
       note["degraded"] += p->second;
     if (p->first & PG_STATE_INCONSISTENT)
@@ -1901,22 +1873,6 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
   }
   stuck_pgs.clear();
 
-  pg_map.get_stuck_stats(PGMap::STUCK_UNDERSIZED, cutoff, stuck_pgs);
-  if (!stuck_pgs.empty()) {
-    note["stuck undersized"] = stuck_pgs.size();
-    if (detail)
-      note_stuck_detail(PGMap::STUCK_UNDERSIZED, stuck_pgs, detail);
-  }
-  stuck_pgs.clear();
-
-  pg_map.get_stuck_stats(PGMap::STUCK_DEGRADED, cutoff, stuck_pgs);
-  if (!stuck_pgs.empty()) {
-    note["stuck degraded"] = stuck_pgs.size();
-    if (detail)
-      note_stuck_detail(PGMap::STUCK_DEGRADED, stuck_pgs, detail);
-  }
-  stuck_pgs.clear();
-
   pg_map.get_stuck_stats(PGMap::STUCK_STALE, cutoff, stuck_pgs);
   if (!stuck_pgs.empty()) {
     note["stuck stale"] = stuck_pgs.size();
@@ -1936,7 +1892,6 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
 	   ++p) {
 	if ((p->second.state & (PG_STATE_STALE |
 			       PG_STATE_DOWN |
-			       PG_STATE_UNDERSIZED |
 			       PG_STATE_DEGRADED |
 			       PG_STATE_INCONSISTENT |
 			       PG_STATE_PEERING |
@@ -2016,7 +1971,7 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
 	!pg_map.pg_pool_sum.count(p->first))
       continue;
     bool nearfull = false;
-    const string& name = mon->osdmon()->osdmap.get_pool_name(p->first);
+    const char *name = mon->osdmon()->osdmap.get_pool_name(p->first);
     const pool_stat_t& st = pg_map.get_pg_pool_sum_stat(p->first);
     uint64_t ratio = p->second.cache_target_full_ratio_micro +
       ((1000000 - p->second.cache_target_full_ratio_micro) *
@@ -2146,10 +2101,6 @@ int PGMonitor::dump_stuck_pg_stats(stringstream &ds,
     stuck_type = PGMap::STUCK_INACTIVE;
   else if (type == "unclean")
     stuck_type = PGMap::STUCK_UNCLEAN;
-  else if (type == "undersized")
-    stuck_type = PGMap::STUCK_UNDERSIZED;
-  else if (type == "degraded")
-    stuck_type = PGMap::STUCK_DEGRADED;
   else if (type == "stale")
     stuck_type = PGMap::STUCK_STALE;
   else {
diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h
index 97a9ac1..f007378 100644
--- a/src/mon/PGMonitor.h
+++ b/src/mon/PGMonitor.h
@@ -69,7 +69,7 @@ private:
   version_t get_trim_to();
   void update_logger();
 
-  void encode_pending(MonitorDBStore::TransactionRef t);
+  void encode_pending(MonitorDBStore::Transaction *t);
   void read_pgmap_meta();
   void read_pgmap_full();
   void apply_pgmap_delta(bufferlist& bl);
@@ -180,7 +180,7 @@ public:
   bool should_stash_full() {
     return false;  // never
   }
-  virtual void encode_full(MonitorDBStore::TransactionRef t) {
+  virtual void encode_full(MonitorDBStore::Transaction *t) {
     assert(0 == "unimplemented encode_full");
   }
 
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index ef745ff..2e41eb8 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -43,8 +43,7 @@ MonitorDBStore *Paxos::get_store()
   return mon->store;
 }
 
-void Paxos::read_and_prepare_transactions(MonitorDBStore::TransactionRef tx,
-					  version_t first, version_t last)
+void Paxos::read_and_prepare_transactions(MonitorDBStore::Transaction *tx, version_t first, version_t last)
 {
   dout(10) << __func__ << " first " << first << " last " << last << dendl;
   for (version_t v = first; v <= last; ++v) {
@@ -53,7 +52,7 @@ void Paxos::read_and_prepare_transactions(MonitorDBStore::TransactionRef tx,
     int err = get_store()->get(get_name(), v, bl);
     assert(err == 0);
     assert(bl.length());
-    decode_append_transaction(tx, bl);
+    decode_append_transaction(*tx, bl);
   }
   dout(15) << __func__ << " total versions " << (last-first) << dendl;
 }
@@ -225,18 +224,18 @@ void Paxos::handle_collect(MMonPaxos *collect)
     dout(10) << "accepting pn " << accepted_pn << " from " 
 	     << accepted_pn_from << dendl;
   
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-    t->put(get_name(), "accepted_pn", accepted_pn);
+    MonitorDBStore::Transaction t;
+    t.put(get_name(), "accepted_pn", accepted_pn);
 
     dout(30) << __func__ << " transaction dump:\n";
     JSONFormatter f(true);
-    t->dump(&f);
+    t.dump(&f);
     f.flush(*_dout);
     *_dout << dendl;
 
     logger->inc(l_paxos_collect);
-    logger->inc(l_paxos_collect_keys, t->get_keys());
-    logger->inc(l_paxos_collect_bytes, t->get_bytes());
+    logger->inc(l_paxos_collect_keys, t.get_keys());
+    logger->inc(l_paxos_collect_bytes, t.get_bytes());
     utime_t start = ceph_clock_now(NULL);
 
     get_store()->apply_transaction(t);
@@ -283,7 +282,7 @@ void Paxos::handle_collect(MMonPaxos *collect)
   }
 
   // send reply
-  collect->get_connection()->send_message(last);
+  mon->messenger->send_message(last, collect->get_source_inst());
   collect->put();
 }
 
@@ -340,7 +339,7 @@ void Paxos::share_state(MMonPaxos *m, version_t peer_first_committed,
  */
 bool Paxos::store_state(MMonPaxos *m)
 {
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
   map<version_t,bufferlist>::iterator start = m->values.begin();
   bool changed = false;
 
@@ -373,14 +372,14 @@ bool Paxos::store_state(MMonPaxos *m)
   } else {
     dout(10) << "store_state [" << start->first << ".." 
 	     << last_committed << "]" << dendl;
-    t->put(get_name(), "last_committed", last_committed);
+    t.put(get_name(), "last_committed", last_committed);
 
     // we should apply the state here -- decode every single bufferlist in the
     // map and append the transactions to 't'.
     map<version_t,bufferlist>::iterator it;
     for (it = start; it != end; ++it) {
       // write the bufferlist as the version's value
-      t->put(get_name(), it->first, it->second);
+      t.put(get_name(), it->first, it->second);
       // decode the bufferlist and append it to the transaction we will shortly
       // apply.
       decode_append_transaction(t, it->second);
@@ -395,16 +394,16 @@ bool Paxos::store_state(MMonPaxos *m)
       uncommitted_value.clear();
     }
   }
-  if (!t->empty()) {
+  if (!t.empty()) {
     dout(30) << __func__ << " transaction dump:\n";
     JSONFormatter f(true);
-    t->dump(&f);
+    t.dump(&f);
     f.flush(*_dout);
     *_dout << dendl;
 
     logger->inc(l_paxos_store_state);
-    logger->inc(l_paxos_store_state_bytes, t->get_bytes());
-    logger->inc(l_paxos_store_state_keys, t->get_keys());
+    logger->inc(l_paxos_store_state_bytes, t.get_bytes());
+    logger->inc(l_paxos_store_state_keys, t.get_keys());
     utime_t start = ceph_clock_now(NULL);
 
     get_store()->apply_transaction(t);
@@ -427,14 +426,14 @@ bool Paxos::store_state(MMonPaxos *m)
 void Paxos::remove_legacy_versions()
 {
   if (get_store()->exists(get_name(), "conversion_first")) {
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+    MonitorDBStore::Transaction t;
     version_t v = get_store()->get(get_name(), "conversion_first");
     dout(10) << __func__ << " removing pre-conversion paxos states from " << v
 	     << " until " << first_committed << dendl;
     for (; v < first_committed; ++v) {
-      t->erase(get_name(), v);
+      t.erase(get_name(), v);
     }
-    t->erase(get_name(), "conversion_first");
+    t.erase(get_name(), "conversion_first");
     get_store()->apply_transaction(t);
   }
 }
@@ -465,7 +464,7 @@ void Paxos::handle_last(MMonPaxos *last)
   peer_first_committed[from] = last->first_committed;
   peer_last_committed[from] = last->last_committed;
 
-  if (last->first_committed > last_committed+1) {
+  if (last->first_committed > last_committed + 1) {
     dout(5) << __func__
             << " mon." << from
 	    << " lowest version is too high for our last committed"
@@ -487,7 +486,7 @@ void Paxos::handle_last(MMonPaxos *last)
   for (map<int,version_t>::iterator p = peer_last_committed.begin();
        p != peer_last_committed.end();
        ++p) {
-    if (p->second < first_committed && first_committed > 1) {
+    if (p->second + 1 < first_committed && first_committed > 1) {
       dout(5) << __func__
 	      << " peon " << p->first
 	      << " last_committed (" << p->second
@@ -619,41 +618,41 @@ void Paxos::begin(bufferlist& v)
   new_value = v;
 
   if (last_committed == 0) {
-    MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+    MonitorDBStore::Transaction t;
     // initial base case; set first_committed too
-    t->put(get_name(), "first_committed", 1);
+    t.put(get_name(), "first_committed", 1);
     decode_append_transaction(t, new_value);
 
     bufferlist tx_bl;
-    t->encode(tx_bl);
+    t.encode(tx_bl);
 
     new_value = tx_bl;
   }
 
   // store the proposed value in the store. IF it is accepted, we will then
   // have to decode it into a transaction and apply it.
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  t->put(get_name(), last_committed+1, new_value);
+  MonitorDBStore::Transaction t;
+  t.put(get_name(), last_committed+1, new_value);
 
   // note which pn this pending value is for.
-  t->put(get_name(), "pending_v", last_committed + 1);
-  t->put(get_name(), "pending_pn", accepted_pn);
+  t.put(get_name(), "pending_v", last_committed + 1);
+  t.put(get_name(), "pending_pn", accepted_pn);
 
   dout(30) << __func__ << " transaction dump:\n";
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(*_dout);
-  MonitorDBStore::TransactionRef debug_tx(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction debug_tx;
   bufferlist::iterator new_value_it = new_value.begin();
-  debug_tx->decode(new_value_it);
-  debug_tx->dump(&f);
+  debug_tx.decode(new_value_it);
+  debug_tx.dump(&f);
   *_dout << "\nbl dump:\n";
   f.flush(*_dout);
   *_dout << dendl;
 
   logger->inc(l_paxos_begin);
-  logger->inc(l_paxos_begin_keys, t->get_keys());
-  logger->inc(l_paxos_begin_bytes, t->get_bytes());
+  logger->inc(l_paxos_begin_keys, t.get_keys());
+  logger->inc(l_paxos_begin_bytes, t.get_bytes());
   utime_t start = ceph_clock_now(NULL);
 
   get_store()->apply_transaction(t);
@@ -665,7 +664,16 @@ void Paxos::begin(bufferlist& v)
 
   if (mon->get_quorum().size() == 1) {
     // we're alone, take it easy
-    commit_start();
+    commit();
+    if (do_refresh()) {
+      assert(is_updating());  // we can't be updating-previous with quorum of 1
+      commit_proposal();
+      finish_round();
+      finish_contexts(g_ceph_context, waiting_for_active);
+      finish_contexts(g_ceph_context, waiting_for_commit);
+      finish_contexts(g_ceph_context, waiting_for_readable);
+      finish_contexts(g_ceph_context, waiting_for_writeable);
+    }
     return;
   }
 
@@ -717,20 +725,20 @@ void Paxos::handle_begin(MMonPaxos *begin)
   dout(10) << "accepting value for " << v << " pn " << accepted_pn << dendl;
   // store the accepted value onto our store. We will have to decode it and
   // apply its transaction once we receive permission to commit.
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  t->put(get_name(), v, begin->values[v]);
+  MonitorDBStore::Transaction t;
+  t.put(get_name(), v, begin->values[v]);
 
   // note which pn this pending value is for.
-  t->put(get_name(), "pending_v", v);
-  t->put(get_name(), "pending_pn", accepted_pn);
+  t.put(get_name(), "pending_v", v);
+  t.put(get_name(), "pending_pn", accepted_pn);
 
   dout(30) << __func__ << " transaction dump:\n";
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(*_dout);
   *_dout << dendl;
 
-  logger->inc(l_paxos_begin_bytes, t->get_bytes());
+  logger->inc(l_paxos_begin_bytes, t.get_bytes());
   utime_t start = ceph_clock_now(NULL);
 
   get_store()->apply_transaction(t);
@@ -745,7 +753,7 @@ void Paxos::handle_begin(MMonPaxos *begin)
 				    ceph_clock_now(g_ceph_context));
   accept->pn = accepted_pn;
   accept->last_committed = last_committed;
-  begin->get_connection()->send_message(accept);
+  mon->messenger->send_message(accept, begin->get_source_inst());
   
   begin->put();
 }
@@ -784,7 +792,28 @@ void Paxos::handle_accept(MMonPaxos *accept)
   if (accepted == mon->get_quorum()) {
     // yay, commit!
     dout(10) << " got majority, committing, done with update" << dendl;
-    commit_start();
+    commit();
+    if (!do_refresh())
+      goto out;
+    if (is_updating())
+      commit_proposal();
+    finish_contexts(g_ceph_context, waiting_for_commit);
+
+    // cancel timeout event
+    mon->timer.cancel_event(accept_timeout_event);
+    accept_timeout_event = 0;
+
+    // yay!
+    extend_lease();
+
+    assert(g_conf->paxos_kill_at != 10);
+
+    finish_round();
+
+    // wake people up
+    finish_contexts(g_ceph_context, waiting_for_active);
+    finish_contexts(g_ceph_context, waiting_for_readable);
+    finish_contexts(g_ceph_context, waiting_for_writeable);
   }
 
  out:
@@ -796,32 +825,28 @@ void Paxos::accept_timeout()
   dout(1) << "accept timeout, calling fresh election" << dendl;
   accept_timeout_event = 0;
   assert(mon->is_leader());
-  assert(is_updating() || is_updating_previous() || is_writing() ||
-	 is_writing_previous());
+  assert(is_updating() || is_updating_previous());
   logger->inc(l_paxos_accept_timeout);
   mon->bootstrap();
 }
 
-struct C_Committed : public Context {
-  Paxos *paxos;
-  C_Committed(Paxos *p) : paxos(p) {}
-  void finish(int r) {
-    assert(r >= 0);
-    Mutex::Locker l(paxos->mon->lock);
-    paxos->commit_finish();
-  }
-};
-
-void Paxos::commit_start()
+void Paxos::commit()
 {
-  dout(10) << __func__ << " " << (last_committed+1) << dendl;
+  dout(10) << "commit " << last_committed+1 << dendl;
+
+  // cancel lease - it was for the old value.
+  //  (this would only happen if message layer lost the 'begin', but
+  //   leader still got a majority and committed with out us.)
+  lease_expire = utime_t();  // cancel lease
 
   assert(g_conf->paxos_kill_at != 7);
 
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
 
   // commit locally
-  t->put(get_name(), "last_committed", last_committed + 1);
+  last_committed++;
+  last_commit_time = ceph_clock_now(g_ceph_context);
+  t.put(get_name(), "last_committed", last_committed);
 
   // decode the value and apply its transaction to the store.
   // this value can now be read from last_committed.
@@ -829,41 +854,22 @@ void Paxos::commit_start()
 
   dout(30) << __func__ << " transaction dump:\n";
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(*_dout);
   *_dout << dendl;
 
   logger->inc(l_paxos_commit);
-  logger->inc(l_paxos_commit_keys, t->get_keys());
-  logger->inc(l_paxos_commit_bytes, t->get_bytes());
-  commit_start_stamp = ceph_clock_now(NULL);
-
-  get_store()->queue_transaction(t, new C_Committed(this));
+  logger->inc(l_paxos_commit_keys, t.get_keys());
+  logger->inc(l_paxos_commit_bytes, t.get_bytes());
+  utime_t start = ceph_clock_now(NULL);
 
-  if (is_updating_previous())
-    state = STATE_WRITING_PREVIOUS;
-  else if (is_updating())
-    state = STATE_WRITING;
-  else
-    assert(0);
-}
+  get_store()->apply_transaction(t);
 
-void Paxos::commit_finish()
-{
-  dout(20) << __func__ << " " << (last_committed+1) << dendl;
   utime_t end = ceph_clock_now(NULL);
-  logger->tinc(l_paxos_commit_latency, end - commit_start_stamp);
+  logger->tinc(l_paxos_commit_latency, end - start);
 
   assert(g_conf->paxos_kill_at != 8);
 
-  // cancel lease - it was for the old value.
-  //  (this would only happen if message layer lost the 'begin', but
-  //   leader still got a majority and committed with out us.)
-  lease_expire = utime_t();  // cancel lease
-
-  last_committed++;
-  last_commit_time = ceph_clock_now(NULL);
-
   // refresh first_committed; this txn may have trimmed.
   first_committed = get_store()->get(get_name(), "first_committed");
 
@@ -891,34 +897,6 @@ void Paxos::commit_finish()
   new_value.clear();
 
   remove_legacy_versions();
-
-  // WRITING -> REFRESH
-  // among other things, this lets do_refresh() -> mon->bootstrap() know
-  // it doesn't need to flush the store queue
-  assert(is_writing() || is_writing_previous());
-  state = STATE_REFRESH;
-
-  if (do_refresh()) {
-    commit_proposal();
-
-    finish_contexts(g_ceph_context, waiting_for_commit);
-
-    if (mon->get_quorum().size() > 1) {
-      // cancel timeout event
-      mon->timer.cancel_event(accept_timeout_event);
-      accept_timeout_event = 0;
-      extend_lease();
-    }
-
-    assert(g_conf->paxos_kill_at != 10);
-
-    finish_round();
-
-    // wake (other) people up
-    finish_contexts(g_ceph_context, waiting_for_active);
-    finish_contexts(g_ceph_context, waiting_for_readable);
-    finish_contexts(g_ceph_context, waiting_for_writeable);
-  }
 }
 
 
@@ -995,7 +973,7 @@ void Paxos::warn_on_future_time(utime_t t, entity_name_t from)
       utime_t warn_diff = now - last_clock_drift_warn;
       if (warn_diff >
 	  pow(g_conf->mon_clock_drift_warn_backoff, clock_drift_warned)) {
-	mon->clog->warn() << "message from " << from << " was stamped " << diff
+	mon->clog.warn() << "message from " << from << " was stamped " << diff
 			 << "s in the future, clocks not synchronized";
 	last_clock_drift_warn = ceph_clock_now(g_ceph_context);
 	++clock_drift_warned;
@@ -1031,22 +1009,16 @@ void Paxos::commit_proposal()
 {
   dout(10) << __func__ << dendl;
   assert(mon->is_leader());
-  assert(is_refresh());
-
-  if (proposals.empty()) {
-    return;  // must have been updating previous
-  }
+  assert(!proposals.empty());
+  assert(is_updating());
 
   C_Proposal *proposal = static_cast<C_Proposal*>(proposals.front());
-  if (proposal->proposed) {
-    dout(10) << __func__ << " proposal " << proposal << " took "
-	     << (ceph_clock_now(NULL) - proposal->proposal_time)
-	     << " to finish" << dendl;
-    proposals.pop_front();
-    proposal->complete(0);
-  } else {
-    // must have been updating previous.
-  }
+  assert(proposal->proposed);
+  dout(10) << __func__ << " proposal " << proposal << " took "
+	   << (ceph_clock_now(NULL) - proposal->proposal_time)
+	   << " to finish" << dendl;
+  proposals.pop_front();
+  proposal->complete(0);
 }
 
 void Paxos::finish_round()
@@ -1104,7 +1076,7 @@ void Paxos::handle_lease(MMonPaxos *lease)
   ack->last_committed = last_committed;
   ack->first_committed = first_committed;
   ack->lease_timestamp = ceph_clock_now(g_ceph_context);
-  lease->get_connection()->send_message(ack);
+  mon->messenger->send_message(ack, lease->get_source_inst());
 
   // (re)set timeout event.
   reset_lease_timeout();
@@ -1201,26 +1173,26 @@ void Paxos::trim()
 
   dout(10) << "trim to " << end << " (was " << first_committed << ")" << dendl;
 
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
 
   for (version_t v = first_committed; v < end; ++v) {
     dout(10) << "trim " << v << dendl;
-    t->erase(get_name(), v);
+    t.erase(get_name(), v);
   }
-  t->put(get_name(), "first_committed", end);
+  t.put(get_name(), "first_committed", end);
   if (g_conf->mon_compact_on_trim) {
     dout(10) << " compacting trimmed range" << dendl;
-    t->compact_range(get_name(), stringify(first_committed - 1), stringify(end));
+    t.compact_range(get_name(), stringify(first_committed - 1), stringify(end));
   }
 
   dout(30) << __func__ << " transaction dump:\n";
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(*_dout);
   *_dout << dendl;
 
   bufferlist bl;
-  t->encode(bl);
+  t.encode(bl);
 
   trimming = true;
   queue_proposal(bl, new C_Trimmed(this));
@@ -1241,12 +1213,12 @@ version_t Paxos::get_new_proposal_number(version_t gt)
   last_pn += (version_t)mon->rank;
 
   // write
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  t->put(get_name(), "last_pn", last_pn);
+  MonitorDBStore::Transaction t;
+  t.put(get_name(), "last_pn", last_pn);
 
   dout(30) << __func__ << " transaction dump:\n";
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(*_dout);
   *_dout << dendl;
 
@@ -1345,13 +1317,6 @@ void Paxos::restart()
   cancel_events();
   new_value.clear();
 
-  if (is_writing() || is_writing_previous()) {
-    dout(10) << __func__ << " flushing" << dendl;
-    mon->lock.Unlock();
-    mon->store->flush();
-    mon->lock.Lock();
-    dout(10) << __func__ << " flushed" << dendl;
-  }
   state = STATE_RECOVERING;
 
   finish_contexts(g_ceph_context, proposals, -EAGAIN);
@@ -1424,22 +1389,17 @@ void Paxos::dispatch(PaxosServiceMessage *m)
 
 bool Paxos::is_readable(version_t v)
 {
-  bool ret;
-  if (v > last_committed)
-    ret = false;
-  else
-    ret =
-      (mon->is_peon() || mon->is_leader()) &&
-      (is_active() || is_updating() || is_writing()) &&
-      last_committed > 0 &&           // must have a value
-      (mon->get_quorum().size() == 1 ||  // alone, or
-       is_lease_valid()); // have lease
-  dout(5) << __func__ << " = " << (int)ret
-	  << " - now=" << ceph_clock_now(g_ceph_context)
+  dout(5) << "is_readable now=" << ceph_clock_now(g_ceph_context)
 	  << " lease_expire=" << lease_expire
-	  << " has v" << v << " lc " << last_committed
-	  << dendl;
-  return ret;
+	  << " has v" << v << " lc " << last_committed << dendl;
+  if (v > last_committed)
+    return false;
+  return 
+    (mon->is_peon() || mon->is_leader()) &&
+    (is_active() || is_updating()) &&
+    last_committed > 0 &&           // must have a value
+    (mon->get_quorum().size() == 1 ||  // alone, or
+     is_lease_valid()); // have lease
 }
 
 bool Paxos::read(version_t v, bufferlist &bl)
diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h
index dcba458..b1ecedc 100644
--- a/src/mon/Paxos.h
+++ b/src/mon/Paxos.h
@@ -223,17 +223,6 @@ public:
      * Leader proposing an old value
      */
     STATE_UPDATING_PREVIOUS,
-    /*
-     * Leader/Peon is writing a new commit.  readable, but not
-     * writeable.
-     */
-    STATE_WRITING,
-    /*
-     * Leader/Peon is writing a new commit from a previous round.
-     */
-    STATE_WRITING_PREVIOUS,
-    // leader: refresh following a commit
-    STATE_REFRESH,
   };
 
   /**
@@ -255,12 +244,6 @@ public:
       return "updating";
     case STATE_UPDATING_PREVIOUS:
       return "updating-previous";
-    case STATE_WRITING:
-      return "writing";
-    case STATE_WRITING_PREVIOUS:
-      return "writing-previous";
-    case STATE_REFRESH:
-      return "refresh";
     default:
       return "UNKNOWN";
     }
@@ -301,15 +284,6 @@ public:
    */
   bool is_updating_previous() const { return state == STATE_UPDATING_PREVIOUS; }
 
-  /// @return 'true' if we are writing an update to disk
-  bool is_writing() const { return state == STATE_WRITING; }
-
-  /// @return 'true' if we are writing an update-previous to disk
-  bool is_writing_previous() const { return state == STATE_WRITING_PREVIOUS; }
-
-  /// @return 'true' if we are refreshing an update just committed
-  bool is_refresh() const { return state == STATE_REFRESH; }
-
 private:
   /**
    * @defgroup Paxos_h_recovery_vars Common recovery-related member variables
@@ -346,7 +320,7 @@ private:
   /**
    * Last committed value's time.
    *
-   * When the commit finished.
+   * When the commit happened.
    */
   utime_t last_commit_time;
   /**
@@ -896,10 +870,6 @@ private:
    * @}
    */
 
-
-  utime_t commit_start_stamp;
-  friend struct C_Committed;
-
   /**
    * Commit a value throughout the system.
    *
@@ -913,8 +883,7 @@ private:
    * @post Value locally stored
    * @post Quorum members instructed to commit the new value.
    */
-  void commit_start();
-  void commit_finish();   ///< finish a commit after txn becomes durable
+  void commit();
   /**
    * Commit the new value to stable storage as being the latest available
    * version.
@@ -1102,8 +1071,7 @@ public:
 
   void dispatch(PaxosServiceMessage *m);
 
-  void read_and_prepare_transactions(MonitorDBStore::TransactionRef tx,
-				     version_t from, version_t last);
+  void read_and_prepare_transactions(MonitorDBStore::Transaction *tx, version_t from, version_t last);
 
   void init();
 
@@ -1191,12 +1159,12 @@ public:
    * @param t The transaction to which we will append the operations
    * @param bl A bufferlist containing an encoded transaction
    */
-  static void decode_append_transaction(MonitorDBStore::TransactionRef t,
-					bufferlist& bl) {
-    MonitorDBStore::TransactionRef vt(new MonitorDBStore::Transaction);
+  static void decode_append_transaction(MonitorDBStore::Transaction& t,
+				 bufferlist& bl) {
+    MonitorDBStore::Transaction vt;
     bufferlist::iterator it = bl.begin();
-    vt->decode(it);
-    t->append(vt);
+    vt.decode(it);
+    t.append(vt);
   }
 
   /**
@@ -1385,11 +1353,11 @@ inline ostream& operator<<(ostream& out, Paxos::C_Proposal& p)
   out << " " << proposed
       << " queued " << (ceph_clock_now(NULL) - p.proposal_time)
       << " tx dump:\n";
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
   bufferlist::iterator p_it = p.bl.begin();
-  t->decode(p_it);
+  t.decode(p_it);
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(out);
   return out;
 }
diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc
index 9225720..1b21689 100644
--- a/src/mon/PaxosService.cc
+++ b/src/mon/PaxosService.cc
@@ -53,8 +53,7 @@ bool PaxosService::dispatch(PaxosServiceMessage *m)
   // make sure the client is still connected.  note that a proxied
   // connection will be disconnected with a null message; don't drop
   // those.  also ignore loopback (e.g., log) messages.
-  if (m->get_connection() &&
-      !m->get_connection()->is_connected() &&
+  if (!m->get_connection()->is_connected() &&
       m->get_connection() != mon->con_self &&
       m->get_connection()->get_messenger() != NULL) {
     dout(10) << " discarding message from disconnected client "
@@ -141,11 +140,11 @@ void PaxosService::remove_legacy_versions()
   dout(10) << __func__ << " conversion_first " << cf
 	   << " first committed " << fc << dendl;
 
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
   if (cf < fc) {
-    trim(t, cf, fc);
+    trim(&t, cf, fc);
   }
-  t->erase(get_service_name(), "conversion_first");
+  t.erase(get_service_name(), "conversion_first");
   mon->store->apply_transaction(t);
 }
 
@@ -188,26 +187,26 @@ void PaxosService::propose_pending()
    *	   to encode whatever is pending on the implementation class into a
    *	   bufferlist, so we can then propose that as a value through Paxos.
    */
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+  MonitorDBStore::Transaction t;
   bufferlist bl;
 
   if (should_stash_full())
-    encode_full(t);
+    encode_full(&t);
 
-  encode_pending(t);
+  encode_pending(&t);
   have_pending = false;
 
   if (format_version > 0) {
-    t->put(get_service_name(), "format_version", format_version);
+    t.put(get_service_name(), "format_version", format_version);
   }
 
   dout(30) << __func__ << " transaction dump:\n";
   JSONFormatter f(true);
-  t->dump(&f);
+  t.dump(&f);
   f.flush(*_dout);
   *_dout << dendl;
 
-  t->encode(bl);
+  t.encode(bl);
 
   // apply to paxos
   proposing = true;
@@ -351,19 +350,19 @@ void PaxosService::maybe_trim()
   }
 
   dout(10) << __func__ << " trimming to " << trim_to << ", " << to_remove << " states" << dendl;
-  MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
-  trim(t, get_first_committed(), trim_to);
-  put_first_committed(t, trim_to);
+  MonitorDBStore::Transaction t;
+  trim(&t, get_first_committed(), trim_to);
+  put_first_committed(&t, trim_to);
 
   // let the service add any extra stuff
-  encode_trim_extra(t, trim_to);
+  encode_trim_extra(&t, trim_to);
 
   bufferlist bl;
-  t->encode(bl);
+  t.encode(bl);
   paxos->propose_new_value(bl, NULL);
 }
 
-void PaxosService::trim(MonitorDBStore::TransactionRef t,
+void PaxosService::trim(MonitorDBStore::Transaction *t,
 			version_t from, version_t to)
 {
   dout(10) << __func__ << " from " << from << " to " << to << dendl;
diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h
index e6c5a02..5321beb 100644
--- a/src/mon/PaxosService.h
+++ b/src/mon/PaxosService.h
@@ -380,7 +380,7 @@ public:
    *
    * @param t The transaction to hold all changes.
    */
-  virtual void encode_pending(MonitorDBStore::TransactionRef t) = 0;
+  virtual void encode_pending(MonitorDBStore::Transaction *t) = 0;
 
   /**
    * Discard the pending state
@@ -549,7 +549,7 @@ public:
   bool is_active() {
     return
       !is_proposing() &&
-      (paxos->is_active() || paxos->is_updating() || paxos->is_writing());
+      (paxos->is_active() || paxos->is_updating());
   }
 
   /**
@@ -580,7 +580,7 @@ public:
    *
    *  - we are not proposing a new version;
    *  - we are ready to be written to -- i.e., we have a pending value.
-   *  - paxos is (active or updating or writing or refresh)
+   *  - paxos is (active or updating)
    *
    * @returns true if writeable; false otherwise
    */
@@ -588,7 +588,7 @@ public:
     return
       !is_proposing() &&
       is_write_ready() &&
-      (paxos->is_active() || paxos->is_updating() || paxos->is_writing());
+      (paxos->is_active() || paxos->is_updating());
   }
 
   /**
@@ -680,7 +680,7 @@ public:
    * @param from the lower limit of the interval to be trimmed
    * @param to the upper limit of the interval to be trimmed (not including)
    */
-  void trim(MonitorDBStore::TransactionRef t, version_t from, version_t to);
+  void trim(MonitorDBStore::Transaction *t, version_t from, version_t to);
 
   /**
    * encode service-specific extra bits into trim transaction
@@ -688,8 +688,7 @@ public:
    * @param tx transaction
    * @param first new first_committed value
    */
-  virtual void encode_trim_extra(MonitorDBStore::TransactionRef tx,
-				 version_t first) {}
+  virtual void encode_trim_extra(MonitorDBStore::Transaction *tx, version_t first) {}
 
   /**
    * Get the version we should trim to.
@@ -723,7 +722,7 @@ public:
    *
    * @param t Transaction on which the full version shall be encoded.
    */
-  virtual void encode_full(MonitorDBStore::TransactionRef t) = 0;
+  virtual void encode_full(MonitorDBStore::Transaction *t) = 0;
 
   /**
    * @}
@@ -748,7 +747,7 @@ public:
    *					   purposes
    * @{
    */
-  void put_first_committed(MonitorDBStore::TransactionRef t, version_t ver) {
+  void put_first_committed(MonitorDBStore::Transaction *t, version_t ver) {
     t->put(get_service_name(), first_committed_name, ver);
   }
   /**
@@ -757,7 +756,7 @@ public:
    * @param t A transaction to which we add this put operation
    * @param ver The last committed version number being put
    */
-  void put_last_committed(MonitorDBStore::TransactionRef t, version_t ver) {
+  void put_last_committed(MonitorDBStore::Transaction *t, version_t ver) {
     t->put(get_service_name(), last_committed_name, ver);
 
     /* We only need to do this once, and that is when we are about to make our
@@ -776,7 +775,7 @@ public:
    * @param ver The version to which we will add the value
    * @param bl A bufferlist containing the version's value
    */
-  void put_version(MonitorDBStore::TransactionRef t, version_t ver,
+  void put_version(MonitorDBStore::Transaction *t, version_t ver,
 		   bufferlist& bl) {
     t->put(get_service_name(), ver, bl);
   }
@@ -788,7 +787,7 @@ public:
    * @param ver A version number
    * @param bl A bufferlist containing the version's value
    */
-  void put_version_full(MonitorDBStore::TransactionRef t,
+  void put_version_full(MonitorDBStore::Transaction *t,
 			version_t ver, bufferlist& bl) {
     string key = mon->store->combine_strings(full_prefix_name, ver);
     t->put(get_service_name(), key, bl);
@@ -800,7 +799,7 @@ public:
    * @param t The transaction to which we will add this put operation
    * @param ver A version number
    */
-  void put_version_latest_full(MonitorDBStore::TransactionRef t, version_t ver) {
+  void put_version_latest_full(MonitorDBStore::Transaction *t, version_t ver) {
     string key = mon->store->combine_strings(full_prefix_name, full_latest_name);
     t->put(get_service_name(), key, ver);
   }
@@ -811,8 +810,7 @@ public:
    * @param key The key to which we will add the value
    * @param bl A bufferlist containing the value
    */
-  void put_value(MonitorDBStore::TransactionRef t,
-		 const string& key, bufferlist& bl) {
+  void put_value(MonitorDBStore::Transaction *t, const string& key, bufferlist& bl) {
     t->put(get_service_name(), key, bl);
   }
 
diff --git a/src/mon/Session.h b/src/mon/Session.h
index e794d6f..a5f67d9 100644
--- a/src/mon/Session.h
+++ b/src/mon/Session.h
@@ -34,7 +34,7 @@ struct Subscription {
   bool incremental_onetime;  // has CEPH_FEATURE_INCSUBOSDMAP
   
   Subscription(MonSession *s, const string& t) : session(s), type(t), type_item(this),
-						 next(0), onetime(false), incremental_onetime(false) {}
+						 next(0), onetime(false), incremental_onetime(false) {};
 };
 
 struct MonSession : public RefCountedObject {
@@ -48,6 +48,7 @@ struct MonSession : public RefCountedObject {
   MonCap caps;
   uint64_t auid;
   uint64_t global_id;
+  uint64_t notified_global_id;
 
   map<string, Subscription*> sub_map;
 
@@ -59,7 +60,7 @@ struct MonSession : public RefCountedObject {
   MonSession(const entity_inst_t& i, Connection *c) :
     con(c), inst(i), closed(false), item(this),
     auid(0),
-    global_id(0), auth_handler(NULL),
+    global_id(0), notified_global_id(0), auth_handler(NULL),
     proxy_con(NULL), proxy_tid(0) {
     time_established = ceph_clock_now(g_ceph_context);
   }
@@ -95,10 +96,6 @@ struct MonSessionMap {
     }
   }
 
-  unsigned get_size() const {
-    return sessions.size();
-  }
-
   void remove_session(MonSession *s) {
     assert(!s->closed);
     for (map<string,Subscription*>::iterator p = s->sub_map.begin(); p != s->sub_map.end(); ++p) {
diff --git a/src/mon/mon_types.h b/src/mon/mon_types.h
index c3a3997..cc68ffb 100644
--- a/src/mon/mon_types.h
+++ b/src/mon/mon_types.h
@@ -85,7 +85,7 @@ struct LevelDBStoreStats {
     DECODE_FINISH(p);
   }
 };
-WRITE_CLASS_ENCODER(LevelDBStoreStats)
+WRITE_CLASS_ENCODER(LevelDBStoreStats);
 
 // data stats
 
@@ -141,7 +141,7 @@ struct DataStats {
     DECODE_FINISH(p);
   }
 };
-WRITE_CLASS_ENCODER(DataStats)
+WRITE_CLASS_ENCODER(DataStats);
 
 struct ScrubResult {
   map<string,uint32_t> prefix_crc;  ///< prefix -> crc
@@ -180,7 +180,7 @@ struct ScrubResult {
     ls.back()->prefix_keys["bar"] = 456;
   }
 };
-WRITE_CLASS_ENCODER(ScrubResult)
+WRITE_CLASS_ENCODER(ScrubResult);
 
 static inline ostream& operator<<(ostream& out, const ScrubResult& r) {
   return out << "ScrubResult(keys " << r.prefix_keys << " crc " << r.prefix_crc << ")";
diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c
index 5c8bf95..563cd07 100644
--- a/src/mount/mount.ceph.c
+++ b/src/mount/mount.ceph.c
@@ -6,7 +6,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#include "common/module.h"
 #include "common/secret.h"
 #include "include/addr_parsing.h"
 
@@ -65,10 +64,8 @@ static char *mount_resolve_src(const char *orig_str)
 	}
 
 	src = resolve_addrs(buf);
-	if (!src) {
-		free(buf);
+	if (!src)
 		return NULL;
-	}
 
 	len = strlen(src);
 	pos = safe_cat(&src, &len, len, ":");
@@ -156,7 +153,6 @@ static char *parse_options(const char *data, int *filesys_flags)
 		} else if (strncmp(data, "secretfile", 10) == 0) {
 			if (!value || !*value) {
 				printf("keyword secretfile found, but no secret file specified\n");
-				free(saw_name);
 				return NULL;
 			}
 
@@ -189,8 +185,9 @@ static char *parse_options(const char *data, int *filesys_flags)
 			}
 
 			/* take a copy of the name, to be used for
-			   naming the keys that we add to kernel; */
-			free(saw_name);
+			   naming the keys that we add to kernel;
+			   ignore memleak as mount.ceph is
+			   short-lived */
 			saw_name = strdup(value);
 			if (!saw_name) {
 				printf("out of memory.\n");
@@ -231,7 +228,6 @@ static char *parse_options(const char *data, int *filesys_flags)
 		char secret_option[MAX_SECRET_OPTION_LEN];
 		ret = get_secret_option(saw_secret, name, secret_option, sizeof(secret_option));
 		if (ret < 0) {
-			free(saw_name);
 			return NULL;
 		} else {
 			if (pos) {
@@ -241,7 +237,6 @@ static char *parse_options(const char *data, int *filesys_flags)
 		}
 	}
 
-	free(saw_name);
 	if (!out)
 		return strdup(EMPTY_STRING);
 	return out;
@@ -295,13 +290,28 @@ static int parse_arguments(int argc, char *const *const argv,
 
 /* modprobe failing doesn't necessarily prevent from working, so this
    returns void */
-static void modprobe(void)
-{
-	int r;
-
-	r = module_load("ceph", NULL);
-	if (r)
-		printf("failed to load ceph kernel module (%d)\n", r);
+static void modprobe(void) {
+	int status;
+	status = system("/sbin/modprobe ceph");
+	if (status < 0) {
+		char error_buf[80];
+		fprintf(stderr, "mount.ceph: cannot run modprobe: %s\n",
+				strerror_r(errno, error_buf, sizeof(error_buf)));
+	} else if (WIFEXITED(status)) {
+		status = WEXITSTATUS(status);
+		if (status != 0) {
+			fprintf(stderr,
+				"mount.ceph: modprobe failed, exit status %d\n",
+				status);
+		}
+	} else if (WIFSIGNALED(status)) {
+		fprintf(stderr,
+			"mount.ceph: modprobe failed with signal %d\n",
+			WTERMSIG(status));
+	} else {
+		fprintf(stderr, "mount.ceph: weird status from modprobe: %d\n",
+			status);
+	}
 }
 
 static void usage(const char *prog_name)
diff --git a/src/msg/Accepter.cc b/src/msg/Accepter.cc
index 029a037..718d478 100644
--- a/src/msg/Accepter.cc
+++ b/src/msg/Accepter.cc
@@ -152,6 +152,9 @@ int Accepter::rebind(const set<int>& avoid_ports)
 {
   ldout(msgr->cct,1) << "accepter.rebind avoid " << avoid_ports << dendl;
   
+  // invalidate our previously learned address.
+  msgr->unlearn_addr();
+
   entity_addr_t addr = msgr->get_myaddr();
   set<int> new_avoid = avoid_ports;
   new_avoid.insert(addr.get_port());
diff --git a/src/msg/Connection.h b/src/msg/Connection.h
deleted file mode 100644
index fb99e77..0000000
--- a/src/msg/Connection.h
+++ /dev/null
@@ -1,183 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_CONNECTION_H
-#define CEPH_CONNECTION_H
-
-#include <stdlib.h>
-#include <ostream>
-
-#include <boost/intrusive_ptr.hpp>
-// Because intusive_ptr clobbers our assert...
-#include "include/assert.h"
-
-#include "include/types.h"
-#include "include/buffer.h"
-
-#include "common/RefCountedObj.h"
-
-#include "common/debug.h"
-#include "common/config.h"
-
-
-// ======================================================
-
-// abstract Connection, for keeping per-connection state
-
-class Message;
-class Messenger;
-
-struct Connection : public RefCountedObject {
-  Mutex lock;
-  Messenger *msgr;
-  RefCountedObject *priv;
-  int peer_type;
-  entity_addr_t peer_addr;
-  utime_t last_keepalive_ack;
-private:
-  uint64_t features;
-public:
-  bool failed; // true if we are a lossy connection that has failed.
-
-  int rx_buffers_version;
-  map<ceph_tid_t,pair<bufferlist,int> > rx_buffers;
-
-  friend class boost::intrusive_ptr<Connection>;
-  friend class PipeConnection;
-
-public:
-  Connection(CephContext *cct, Messenger *m)
-    // we are managed exlusively by ConnectionRef; make it so you can
-    //   ConnectionRef foo = new Connection;
-    : RefCountedObject(cct, 0),
-      lock("Connection::lock"),
-      msgr(m),
-      priv(NULL),
-      peer_type(-1),
-      features(0),
-      failed(false),
-      rx_buffers_version(0) {
-  }
-
-  virtual ~Connection() {
-    //generic_dout(0) << "~Connection " << this << dendl;
-    if (priv) {
-      //generic_dout(0) << "~Connection " << this << " dropping priv " << priv << dendl;
-      priv->put();
-    }
-  }
-
-  void set_priv(RefCountedObject *o) {
-    Mutex::Locker l(lock);
-    if (priv)
-      priv->put();
-    priv = o;
-  }
-
-  RefCountedObject *get_priv() {
-    Mutex::Locker l(lock);
-    if (priv)
-      return priv->get();
-    return NULL;
-  }
-
-  virtual bool is_connected() = 0;
-
-  Messenger *get_messenger() {
-    return msgr;
-  }
-
-  /**
-   * Queue the given Message to send out on the given Connection.
-   * Success in this function does not guarantee Message delivery, only
-   * success in queueing the Message. Other guarantees may be provided based
-   * on the Connection policy.
-   *
-   * @param m The Message to send. The Messenger consumes a single reference
-   * when you pass it in.
-   * @param con The Connection to send the Message out on.
-   *
-   * @return 0 on success, or -errno on failure.
-   */
-  virtual int send_message(Message *m) = 0;
-  /**
-   * Send a "keepalive" ping along the given Connection, if it's working.
-   * If the underlying connection has broken, this function does nothing.
-   *
-   * @return 0, or implementation-defined error numbers.
-   */
-  virtual void send_keepalive() = 0;
-  /**
-   * Mark down the given Connection.
-   *
-   * This will cause us to discard its outgoing queue, and if reset
-   * detection is enabled in the policy and the endpoint tries to
-   * reconnect they will discard their queue when we inform them of
-   * the session reset.
-   *
-   * It does not generate any notifications to the Dispatcher.
-   */
-  virtual void mark_down() = 0;
-
-  /**
-   * Mark a Connection as "disposable", setting it to lossy
-   * (regardless of initial Policy).  This does not immediately close
-   * the Connection once Messages have been delivered, so as long as
-   * there are no errors you can continue to receive responses; but it
-   * will not attempt to reconnect for message delivery or preserve
-   * your old delivery semantics, either.
-   *
-   * TODO: There's some odd stuff going on in our SimpleMessenger
-   * implementation during connect that looks unused; is there
-   * more of a contract that that's enforcing?
-   */
-  virtual void mark_disposable() = 0;
-
-
-  int get_peer_type() { return peer_type; }
-  void set_peer_type(int t) { peer_type = t; }
-
-  bool peer_is_mon() { return peer_type == CEPH_ENTITY_TYPE_MON; }
-  bool peer_is_mds() { return peer_type == CEPH_ENTITY_TYPE_MDS; }
-  bool peer_is_osd() { return peer_type == CEPH_ENTITY_TYPE_OSD; }
-  bool peer_is_client() { return peer_type == CEPH_ENTITY_TYPE_CLIENT; }
-
-  const entity_addr_t& get_peer_addr() { return peer_addr; }
-  void set_peer_addr(const entity_addr_t& a) { peer_addr = a; }
-
-  uint64_t get_features() const { return features; }
-  bool has_feature(uint64_t f) const { return features & f; }
-  void set_features(uint64_t f) { features = f; }
-  void set_feature(uint64_t f) { features |= f; }
-
-  void post_rx_buffer(ceph_tid_t tid, bufferlist& bl) {
-    Mutex::Locker l(lock);
-    ++rx_buffers_version;
-    rx_buffers[tid] = pair<bufferlist,int>(bl, rx_buffers_version);
-  }
-
-  void revoke_rx_buffer(ceph_tid_t tid) {
-    Mutex::Locker l(lock);
-    rx_buffers.erase(tid);
-  }
-
-  utime_t get_last_keepalive_ack() const {
-    return last_keepalive_ack;
-  }
-};
-
-typedef boost::intrusive_ptr<Connection> ConnectionRef;
-
-
-#endif /* CEPH_CONNECTION_H */
diff --git a/src/msg/DispatchQueue.cc b/src/msg/DispatchQueue.cc
index 12c4846..8a79ce0 100644
--- a/src/msg/DispatchQueue.cc
+++ b/src/msg/DispatchQueue.cc
@@ -36,107 +36,35 @@ double DispatchQueue::get_max_age(utime_t now) {
     return (now - marrival.begin()->first);
 }
 
-uint64_t DispatchQueue::pre_dispatch(Message *m)
-{
-  ldout(cct,1) << "<== " << m->get_source_inst()
-	       << " " << m->get_seq()
-	       << " ==== " << *m
-	       << " ==== " << m->get_payload().length()
-	       << "+" << m->get_middle().length()
-	       << "+" << m->get_data().length()
-	       << " (" << m->get_footer().front_crc << " "
-	       << m->get_footer().middle_crc
-	       << " " << m->get_footer().data_crc << ")"
-	       << " " << m << " con " << m->get_connection()
-	       << dendl;
-  uint64_t msize = m->get_dispatch_throttle_size();
-  m->set_dispatch_throttle_size(0); // clear it out, in case we requeue this message.
-  return msize;
-}
-
-void DispatchQueue::post_dispatch(Message *m, uint64_t msize)
-{
-  msgr->dispatch_throttle_release(msize);
-  ldout(cct,20) << "done calling dispatch on " << m << dendl;
-}
-
-bool DispatchQueue::can_fast_dispatch(Message *m)
-{
-  return msgr->ms_can_fast_dispatch(m);
-}
-
-void DispatchQueue::fast_dispatch(Message *m)
-{
-  uint64_t msize = pre_dispatch(m);
-  msgr->ms_fast_dispatch(m);
-  post_dispatch(m, msize);
-}
-
-void DispatchQueue::fast_preprocess(Message *m)
-{
-  msgr->ms_fast_preprocess(m);
-}
-
 void DispatchQueue::enqueue(Message *m, int priority, uint64_t id)
 {
-
   Mutex::Locker l(lock);
   ldout(cct,20) << "queue " << m << " prio " << priority << dendl;
   add_arrival(m);
   if (priority >= CEPH_MSG_PRIO_LOW) {
     mqueue.enqueue_strict(
-        id, priority, QueueItem(m));
+      id, priority, QueueItem(m));
   } else {
     mqueue.enqueue(
-        id, priority, m->get_cost(), QueueItem(m));
+      id, priority, m->get_cost(), QueueItem(m));
   }
   cond.Signal();
 }
 
 void DispatchQueue::local_delivery(Message *m, int priority)
 {
+  Mutex::Locker l(lock);
   m->set_connection(msgr->local_connection.get());
   m->set_recv_stamp(ceph_clock_now(msgr->cct));
-  Mutex::Locker l(local_delivery_lock);
-  if (local_messages.empty())
-    local_delivery_cond.Signal();
-  local_messages.push_back(make_pair(m, priority));
-  return;
-}
-
-void DispatchQueue::run_local_delivery()
-{
-  local_delivery_lock.Lock();
-  while (true) {
-    if (stop_local_delivery)
-      break;
-    if (local_messages.empty()) {
-      local_delivery_cond.Wait(local_delivery_lock);
-      continue;
-    }
-    pair<Message *, int> mp = local_messages.front();
-    local_messages.pop_front();
-    local_delivery_lock.Unlock();
-    Message *m = mp.first;
-    int priority = mp.second;
-    fast_preprocess(m);
-    if (can_fast_dispatch(m)) {
-      fast_dispatch(m);
-    } else {
-      Mutex::Locker l(lock);
-      add_arrival(m);
-      if (priority >= CEPH_MSG_PRIO_LOW) {
-        mqueue.enqueue_strict(
-            0, priority, QueueItem(m));
-      } else {
-        mqueue.enqueue(
-            0, priority, m->get_cost(), QueueItem(m));
-      }
-      cond.Signal();
-    }
-    local_delivery_lock.Lock();
+  add_arrival(m);
+  if (priority >= CEPH_MSG_PRIO_LOW) {
+    mqueue.enqueue_strict(
+      0, priority, QueueItem(m));
+  } else {
+    mqueue.enqueue(
+      0, priority, m->get_cost(), QueueItem(m));
   }
-  local_delivery_lock.Unlock();
+  cond.Signal();
 }
 
 /*
@@ -181,9 +109,23 @@ void DispatchQueue::entry()
 	  ldout(cct,10) << " stop flag set, discarding " << m << " " << *m << dendl;
 	  m->put();
 	} else {
-	  uint64_t msize = pre_dispatch(m);
+	  uint64_t msize = m->get_dispatch_throttle_size();
+	  m->set_dispatch_throttle_size(0);  // clear it out, in case we requeue this message.
+
+	  ldout(cct,1) << "<== " << m->get_source_inst()
+		       << " " << m->get_seq()
+		       << " ==== " << *m
+		       << " ==== " << m->get_payload().length() << "+" << m->get_middle().length()
+		       << "+" << m->get_data().length()
+		       << " (" << m->get_footer().front_crc << " " << m->get_footer().middle_crc
+		       << " " << m->get_footer().data_crc << ")"
+		       << " " << m << " con " << m->get_connection()
+		       << dendl;
 	  msgr->ms_deliver_dispatch(m);
-	  post_dispatch(m, msize);
+
+	  msgr->dispatch_throttle_release(msize);
+
+	  ldout(cct,20) << "done calling dispatch on " << m << dendl;
 	}
       }
 
@@ -218,23 +160,15 @@ void DispatchQueue::start()
   assert(!stop);
   assert(!dispatch_thread.is_started());
   dispatch_thread.create();
-  local_delivery_thread.create();
 }
 
 void DispatchQueue::wait()
 {
-  local_delivery_thread.join();
   dispatch_thread.join();
 }
 
 void DispatchQueue::shutdown()
 {
-  // stop my local delivery thread
-  local_delivery_lock.Lock();
-  stop_local_delivery = true;
-  local_delivery_cond.Signal();
-  local_delivery_lock.Unlock();
-
   // stop my dispatch thread
   lock.Lock();
   stop = true;
diff --git a/src/msg/DispatchQueue.h b/src/msg/DispatchQueue.h
index 5fe17dc..dffd65c 100644
--- a/src/msg/DispatchQueue.h
+++ b/src/msg/DispatchQueue.h
@@ -106,27 +106,9 @@ class DispatchQueue {
     }
   } dispatch_thread;
 
-  Mutex local_delivery_lock;
-  Cond local_delivery_cond;
-  bool stop_local_delivery;
-  list<pair<Message *, int> > local_messages;
-  class LocalDeliveryThread : public Thread {
-    DispatchQueue *dq;
-  public:
-    LocalDeliveryThread(DispatchQueue *dq) : dq(dq) {}
-    void *entry() {
-      dq->run_local_delivery();
-      return 0;
-    }
-  } local_delivery_thread;
-
-  uint64_t pre_dispatch(Message *m);
-  void post_dispatch(Message *m, uint64_t msize);
-
   public:
   bool stop;
   void local_delivery(Message *m, int priority);
-  void run_local_delivery();
 
   double get_max_age(utime_t now);
 
@@ -176,9 +158,6 @@ class DispatchQueue {
     cond.Signal();
   }
 
-  bool can_fast_dispatch(Message *m);
-  void fast_dispatch(Message *m);
-  void fast_preprocess(Message *m);
   void enqueue(Message *m, int priority, uint64_t id);
   void discard_queue(uint64_t id);
   uint64_t get_id() {
@@ -198,9 +177,6 @@ class DispatchQueue {
 	     cct->_conf->ms_pq_min_cost),
       next_pipe_id(1),
       dispatch_thread(this),
-      local_delivery_lock("SimpleMessenger::DispatchQueue::local_delivery_lock"),
-      stop_local_delivery(false),
-      local_delivery_thread(this),
       stop(false)
     {}
 };
diff --git a/src/msg/Dispatcher.h b/src/msg/Dispatcher.h
index 523c016..9f837cd 100644
--- a/src/msg/Dispatcher.h
+++ b/src/msg/Dispatcher.h
@@ -30,110 +30,31 @@ public:
   }
   virtual ~Dispatcher() { }
 
-  /**
-   * The Messenger calls this function to query if you are capable
-   * of "fast dispatch"ing a message. Indicating that you can fast
-   * dispatch it requires that you:
-   * 1) Handle the Message quickly and without taking long-term contended
-   * locks. (This function is likely to be called in-line with message
-   * receipt.)
-   * 2) Be able to accept the Message even if you have not yet received
-   * an ms_handle_accept() notification for the Connection it is associated
-   * with, and even if you *have* called mark_down() or received an
-   * ms_handle_reset() (or similar) call on the Connection. You will
-   * not receive more than one dead "message" (and should generally be
-   * prepared for that circumstance anyway, since the normal dispatch can begin,
-   * then trigger Connection failure before it's percolated through your system).
-   * We provide ms_handle_fast_[connect|accept] calls if you need them, under
-   * similar speed and state constraints as fast_dispatch itself.
-   * 3) Be able to make a determination on fast_dispatch without relying
-   * on particular system state -- the ms_can_fast_dispatch() call might
-   * be called multiple times on a single message; the state might change between
-   * calling ms_can_fast_dispatch and ms_fast_dispatch; etc.
-   *
-   * @param m The message we want to fast dispatch.
-   * @returns True if the message can be fast dispatched; false otherwise.
-   */
-  virtual bool ms_can_fast_dispatch(Message *m) const { return false;}
-  /**
-   * This function determines if a dispatcher is included in the
-   * list of fast-dispatch capable Dispatchers.
-   * @returns True if the Dispatcher can handle any messages via
-   * fast dispatch; false otherwise.
-   */
-  virtual bool ms_can_fast_dispatch_any() const { return false; }
-  /**
-   * Perform a "fast dispatch" on a given message. See
-   * ms_can_fast_dispatch() for the requirements.
-   *
-   * @param m The Message to fast dispatch.
-   */
-  virtual void ms_fast_dispatch(Message *m) { assert(0); }
-  /**
-   * Let the Dispatcher preview a Message before it is dispatched. This
-   * function is called on *every* Message, prior to the fast/regular dispatch
-   * decision point, but it is only used on fast-dispatch capable systems. An
-   * implementation of ms_fast_preprocess must be essentially lock-free in the
-   * same way as the ms_fast_dispatch function is (in particular, ms_fast_preprocess
-   * may be called while the Messenger holds internal locks that prevent progress from
-   * other threads, so any locks it takes must be at the very bottom of the hierarchy).
-   * Messages are delivered in receipt order within a single Connection, but there are
-   * no guarantees across Connections. This makes it useful for some limited
-   * coordination between Messages which can be fast_dispatch'ed and those which must
-   * go through normal dispatch.
-   *
-   * @param m A message which has been received
-   */
-  virtual void ms_fast_preprocess(Message *m) {}
-  /**
-   * The Messenger calls this function to deliver a single message.
-   *
-   * @param m The message being delivered. You (the Dispatcher)
-   * are given a single reference count on it.
-   */
+  // how i receive messages
   virtual bool ms_dispatch(Message *m) = 0;
 
   /**
-   * This function will be called whenever a Connection is newly-created
-   * or reconnects in the Messenger.
-   *
-   * @param con The new Connection which has been established. You are not
-   * granted a reference to it -- take one if you need one!
-   */
-  virtual void ms_handle_connect(Connection *con) {}
-
-  /**
-   * This function will be called synchronously whenever a Connection is
-   * newly-created or reconnects in the Messenger, if you support fast
-   * dispatch. It is guaranteed to be called before any messages are
-   * dispatched.
+   * This function will be called whenever a new Connection is made to the
+   * Messenger.
    *
    * @param con The new Connection which has been established. You are not
    * granted a reference to it -- take one if you need one!
    */
-  virtual void ms_handle_fast_connect(Connection *con) {}
+  virtual void ms_handle_connect(Connection *con) { };
 
   /**
    * Callback indicating we have accepted an incoming connection.
    *
    * @param con The (new or existing) Connection associated with the session
    */
-  virtual void ms_handle_accept(Connection *con) {}
-
-  /**
-   * Callback indicating we have accepted an incoming connection, if you
-   * support fast dispatch. It is guaranteed to be called before any messages
-   * are dispatched.
-   *
-   * @param con The (new or existing) Connection associated with the session
-   */
-  virtual void ms_handle_fast_accept(Connection *con) {}
+  virtual void ms_handle_accept(Connection *con) { };
 
   /*
    * this indicates that the ordered+reliable delivery semantics have 
    * been violated.  Messages may have been lost due to a fault
    * in the network connection.
-   * Only called on lossy Connections.
+   * Only called on lossy Connections or those you've
+   * designated mark_down_on_empty().
    *
    * @param con The Connection which broke. You are not granted
    * a reference to it.
@@ -168,7 +89,7 @@ public:
    *
    * @return True if this function call properly filled in *a, false otherwise.
    */
-  virtual bool ms_get_authorizer(int dest_type, AuthAuthorizer **a, bool force_new) { return false; }
+  virtual bool ms_get_authorizer(int dest_type, AuthAuthorizer **a, bool force_new) { return false; };
   /**
    * Verify the authorizer for a new incoming Connection.
    *
@@ -185,7 +106,7 @@ public:
    */
   virtual bool ms_verify_authorizer(Connection *con, int peer_type,
 				    int protocol, bufferlist& authorizer, bufferlist& authorizer_reply,
-				    bool& isvalid, CryptoKey& session_key) { return false; }
+				    bool& isvalid, CryptoKey& session_key) { return false; };
   /**
    * @} //Authentication
    */
diff --git a/src/msg/Makefile.am b/src/msg/Makefile.am
index e4a9410..a849a1c 100644
--- a/src/msg/Makefile.am
+++ b/src/msg/Makefile.am
@@ -4,21 +4,17 @@ libmsg_la_SOURCES = \
 	msg/Message.cc \
 	msg/Messenger.cc \
 	msg/Pipe.cc \
-	msg/PipeConnection.cc \
 	msg/SimpleMessenger.cc \
 	msg/msg_types.cc
 
 noinst_HEADERS += \
 	msg/Accepter.h \
-	msg/Connection.h \
 	msg/DispatchQueue.h \
 	msg/Dispatcher.h \
 	msg/Message.h \
 	msg/Messenger.h \
 	msg/Pipe.h \
-	msg/PipeConnection.h \
 	msg/SimpleMessenger.h \
-	msg/SimplePolicyMessenger.h \
 	msg/msg_types.h
 
 noinst_LTLIBRARIES += libmsg.la
diff --git a/src/msg/Message.cc b/src/msg/Message.cc
index 42d4e94..6ecce71 100644
--- a/src/msg/Message.cc
+++ b/src/msg/Message.cc
@@ -687,8 +687,6 @@ Message *decode_message(CephContext *cct, ceph_msg_header& header, ceph_msg_foot
     return 0;
   }
 
-  m->set_cct(cct);
-
   // m->header.version, if non-zero, should be populated with the
   // newest version of the encoding the code supports.  If set, check
   // it against compat_version.
@@ -705,7 +703,7 @@ Message *decode_message(CephContext *cct, ceph_msg_header& header, ceph_msg_foot
     m->put();
     return 0;
   }
-
+  
   m->set_header(header);
   m->set_footer(footer);
   m->set_payload(front);
@@ -720,7 +718,7 @@ Message *decode_message(CephContext *cct, ceph_msg_header& header, ceph_msg_foot
       lderr(cct) << "failed to decode message of type " << type
 		 << " v" << header.version
 		 << ": " << e.what() << dendl;
-      ldout(cct, cct->_conf->ms_dump_corrupt_message_level) << "dump: \n";
+      ldout(cct, 30) << "dump: \n";
       m->get_payload().hexdump(*_dout);
       *_dout << dendl;
       if (cct->_conf->ms_die_on_bad_msg)
diff --git a/src/msg/Message.h b/src/msg/Message.h
index cb47058..a69944f 100644
--- a/src/msg/Message.h
+++ b/src/msg/Message.h
@@ -19,7 +19,6 @@
 #include <ostream>
 
 #include <boost/intrusive_ptr.hpp>
-#include <boost/intrusive/list.hpp>
 // Because intusive_ptr clobbers our assert...
 #include "include/assert.h"
 
@@ -29,7 +28,6 @@
 #include "msg_types.h"
 
 #include "common/RefCountedObj.h"
-#include "msg/Connection.h"
 
 #include "common/debug.h"
 #include "common/config.h"
@@ -165,8 +163,146 @@
 #define MSG_MON_HEALTH            0x601
 
 
+
+
 // ======================================================
 
+// abstract Connection, for keeping per-connection state
+
+class Messenger;
+
+struct Connection : private RefCountedObject {
+  Mutex lock;
+  Messenger *msgr;
+  RefCountedObject *priv;
+  int peer_type;
+  entity_addr_t peer_addr;
+  utime_t last_keepalive_ack;
+private:
+  uint64_t features;
+public:
+  RefCountedObject *pipe;
+  bool failed;              /// true if we are a lossy connection that has failed.
+
+  int rx_buffers_version;
+  map<ceph_tid_t,pair<bufferlist,int> > rx_buffers;
+
+  friend class boost::intrusive_ptr<Connection>;
+
+public:
+  Connection(Messenger *m)
+    : lock("Connection::lock"),
+      msgr(m),
+      priv(NULL),
+      peer_type(-1),
+      features(0),
+      pipe(NULL),
+      failed(false),
+      rx_buffers_version(0) {
+    // we are managed exlusively by ConnectionRef; make it so you can
+    //   ConnectionRef foo = new Connection;
+    nref.set(0);
+  }
+  ~Connection() {
+    //generic_dout(0) << "~Connection " << this << dendl;
+    if (priv) {
+      //generic_dout(0) << "~Connection " << this << " dropping priv " << priv << dendl;
+      priv->put();
+    }
+    if (pipe)
+      pipe->put();
+  }
+
+  void set_priv(RefCountedObject *o) {
+    Mutex::Locker l(lock);
+    if (priv)
+      priv->put();
+    priv = o;
+  }
+  RefCountedObject *get_priv() {
+    Mutex::Locker l(lock);
+    if (priv)
+      return priv->get();
+    return NULL;
+  }
+
+  RefCountedObject *get_pipe() {
+    Mutex::Locker l(lock);
+    if (pipe)
+      return pipe->get();
+    return NULL;
+  }
+  bool try_get_pipe(RefCountedObject **p) {
+    Mutex::Locker l(lock);
+    if (failed) {
+      *p = NULL;
+    } else {
+      if (pipe)
+	*p = pipe->get();
+      else
+	*p = NULL;
+    }
+    return !failed;
+  }
+  bool clear_pipe(RefCountedObject *old_p) {
+    if (old_p == pipe) {
+      Mutex::Locker l(lock);
+      pipe->put();
+      pipe = NULL;
+      failed = true;
+      return true;
+    }
+    return false;
+  }
+  void reset_pipe(RefCountedObject *p) {
+    Mutex::Locker l(lock);
+    if (pipe)
+      pipe->put();
+    pipe = p->get();
+  }
+  bool is_connected() {
+    Mutex::Locker l(lock);
+    return pipe != NULL;
+  }
+
+  Messenger *get_messenger() {
+    return msgr;
+  }
+
+  int get_peer_type() { return peer_type; }
+  void set_peer_type(int t) { peer_type = t; }
+  
+  bool peer_is_mon() { return peer_type == CEPH_ENTITY_TYPE_MON; }
+  bool peer_is_mds() { return peer_type == CEPH_ENTITY_TYPE_MDS; }
+  bool peer_is_osd() { return peer_type == CEPH_ENTITY_TYPE_OSD; }
+  bool peer_is_client() { return peer_type == CEPH_ENTITY_TYPE_CLIENT; }
+
+  const entity_addr_t& get_peer_addr() { return peer_addr; }
+  void set_peer_addr(const entity_addr_t& a) { peer_addr = a; }
+
+  uint64_t get_features() const { return features; }
+  bool has_feature(uint64_t f) const { return features & f; }
+  void set_features(uint64_t f) { features = f; }
+  void set_feature(uint64_t f) { features |= f; }
+
+  void post_rx_buffer(ceph_tid_t tid, bufferlist& bl) {
+    Mutex::Locker l(lock);
+    ++rx_buffers_version;
+    rx_buffers[tid] = pair<bufferlist,int>(bl, rx_buffers_version);
+  }
+  void revoke_rx_buffer(ceph_tid_t tid) {
+    Mutex::Locker l(lock);
+    rx_buffers.erase(tid);
+  }
+
+  utime_t get_last_keepalive_ack() const {
+    return last_keepalive_ack;
+  }
+};
+typedef boost::intrusive_ptr<Connection> ConnectionRef;
+
+
+
 // abstract Message class
 
 class Message : public RefCountedObject {
@@ -176,7 +312,7 @@ protected:
   bufferlist       payload;  // "front" unaligned blob
   bufferlist       middle;   // "middle" unaligned blob
   bufferlist       data;     // data payload (page-alignment will be preserved where possible)
-
+  
   /* recv_stamp is set when the Messenger starts reading the
    * Message off the wire */
   utime_t recv_stamp;
@@ -190,23 +326,6 @@ protected:
 
   ConnectionRef connection;
 
-  uint32_t magic;
-
-public:
-  class CompletionHook : public Context {
-  protected:
-    Message *m;
-    friend class Message;
-  public:
-    CompletionHook(Message *_m) : m(_m) {}
-    virtual void set_message(Message *_m) { m = _m; }
-    virtual void finish(int r) = 0;
-    virtual ~CompletionHook() {}
-  };
-
-protected:
-  CompletionHook* completion_hook; // owned by Messenger
-
   // release our size in bytes back to this throttler when our payload
   // is adjusted or when we are destroyed.
   Throttle *byte_throttler;
@@ -226,18 +345,14 @@ protected:
 public:
   Message()
     : connection(NULL),
-      magic(0),
-      completion_hook(NULL),
       byte_throttler(NULL),
       msg_throttler(NULL),
       dispatch_throttle_size(0) {
     memset(&header, 0, sizeof(header));
     memset(&footer, 0, sizeof(footer));
-  }
+  };
   Message(int t, int version=1, int compat_version=0)
     : connection(NULL),
-      magic(0),
-      completion_hook(NULL),
       byte_throttler(NULL),
       msg_throttler(NULL),
       dispatch_throttle_size(0) {
@@ -255,27 +370,23 @@ public:
   }
 
 protected:
-  virtual ~Message() {
+  virtual ~Message() { 
+    assert(nref.read() == 0);
     if (byte_throttler)
       byte_throttler->put(payload.length() + middle.length() + data.length());
     if (msg_throttler)
       msg_throttler->put();
-    /* call completion hooks (if any) */
-    if (completion_hook)
-      completion_hook->complete(0);
   }
 public:
-  inline const ConnectionRef& get_connection() { return connection; }
+  const ConnectionRef& get_connection() { return connection; }
   void set_connection(const ConnectionRef& c) {
     connection = c;
   }
-  CompletionHook* get_completion_hook() { return completion_hook; }
-  void set_completion_hook(CompletionHook *hook) { completion_hook = hook; }
   void set_byte_throttler(Throttle *t) { byte_throttler = t; }
   Throttle *get_byte_throttler() { return byte_throttler; }
   void set_message_throttler(Throttle *t) { msg_throttler = t; }
   Throttle *get_message_throttler() { return msg_throttler; }
-
+ 
   void set_dispatch_throttle_size(uint64_t s) { dispatch_throttle_size = s; }
   uint64_t get_dispatch_throttle_size() { return dispatch_throttle_size; }
 
@@ -284,9 +395,6 @@ public:
   void set_footer(const ceph_msg_footer &e) { footer = e; }
   ceph_msg_footer &get_footer() { return footer; }
 
-  uint32_t get_magic() { return magic; }
-  void set_magic(int _magic) { magic = _magic; }
-
   /*
    * If you use get_[data, middle, payload] you shouldn't
    * use it to change those bufferlists unless you KNOW
@@ -411,7 +519,7 @@ public:
   virtual void encode_payload(uint64_t features) = 0;
   virtual const char *get_type_name() const = 0;
   virtual void print(ostream& out) const {
-    out << get_type_name() << " magic: " << magic;
+    out << get_type_name();
   }
 
   virtual void dump(Formatter *f) const;
diff --git a/src/msg/Messenger.h b/src/msg/Messenger.h
index 89d5f04..42feaf2 100644
--- a/src/msg/Messenger.h
+++ b/src/msg/Messenger.h
@@ -39,7 +39,6 @@ class Timer;
 class Messenger {
 private:
   list<Dispatcher*> dispatchers;
-  list <Dispatcher*> fast_dispatchers;
 
 protected:
   /// the "name" of the local daemon. eg client.99
@@ -149,11 +148,6 @@ public:
                            uint64_t nonce);
 
   /**
-   * create a anonymous Connection instance
-   */
-  virtual Connection *create_anon_connection() = 0;
-
-  /**
    * @defgroup Accessors
    * @{
    */
@@ -307,8 +301,6 @@ public:
   void add_dispatcher_head(Dispatcher *d) { 
     bool first = dispatchers.empty();
     dispatchers.push_front(d);
-    if (d->ms_can_fast_dispatch_any())
-      fast_dispatchers.push_front(d);
     if (first)
       ready();
   }
@@ -322,8 +314,6 @@ public:
   void add_dispatcher_tail(Dispatcher *d) { 
     bool first = dispatchers.empty();
     dispatchers.push_back(d);
-    if (d->ms_can_fast_dispatch_any())
-      fast_dispatchers.push_back(d);
     if (first)
       ready();
   }
@@ -404,6 +394,51 @@ public:
    * @return 0 on success, or -errno on failure.
    */
   virtual int send_message(Message *m, const entity_inst_t& dest) = 0;
+  /**
+   * Queue the given Message to send out on the given Connection.
+   * Success in this function does not guarantee Message delivery, only
+   * success in queueing the Message. Other guarantees may be provided based
+   * on the Connection policy.
+   *
+   * @param m The Message to send. The Messenger consumes a single reference
+   * when you pass it in.
+   * @param con The Connection to send the Message out on.
+   *
+   * @return 0 on success, or -errno on failure.
+   */
+  virtual int send_message(Message *m, Connection *con) = 0;
+  int send_message(Message *m, const ConnectionRef& con) {
+    return send_message(m, con.get());
+  }
+  /**
+   * Lazily queue the given Message for the given entity. Unlike with
+   * send_message(), lazy_send_message() will not establish a
+   * Connection if none exists, re-establish the connection if it
+   * has broken, or queue the Message if the connection is broken.
+   *
+   * @param m The Message to send. The Messenger consumes a single reference
+   * when you pass it in.
+   * @param dest The entity to send the Message to.
+   *
+   * DEPRECATED: please do not use this interface for any new code;
+   * use the Connection* variant.
+   *
+   * @return 0.
+   */
+  virtual int lazy_send_message(Message *m, const entity_inst_t& dest) = 0;
+  /**
+   * Lazily queue the given Message for the given Connection. Unlike with
+   * send_message(), lazy_send_message() does not necessarily re-establish
+   * the connection if it has broken, or even queue the Message if the
+   * connection is broken.
+   *
+   * @param m The Message to send. The Messenger consumes a single reference
+   * when you pass it in.
+   * @param dest The entity to send the Message to.
+   *
+   * @return 0.
+   */
+  virtual int lazy_send_message(Message *m, Connection *con) = 0;
 
   /**
    * @} // Messaging
@@ -426,6 +461,23 @@ public:
    */
   virtual ConnectionRef get_loopback_connection() = 0;
   /**
+   * Send a "keepalive" ping to the given dest, if it has a working Connection.
+   * If the Messenger doesn't already have a Connection, or if the underlying
+   * connection has broken, this function does nothing.
+   *
+   * @param dest The entity to send the keepalive to.
+   * @return 0, or implementation-defined error numbers.
+   */
+  virtual int send_keepalive(const entity_inst_t& dest) = 0;
+  /**
+   * Send a "keepalive" ping along the given Connection, if it's working.
+   * If the underlying connection has broken, this function does nothing.
+   *
+   * @param dest The entity to send the keepalive to.
+   * @return 0, or implementation-defined error numbers.
+   */
+  virtual int send_keepalive(Connection *con) = 0;
+  /**
    * Mark down a Connection to a remote.
    *
    * This will cause us to discard our outgoing queue for them, and if
@@ -444,6 +496,24 @@ public:
    */
   virtual void mark_down(const entity_addr_t& a) = 0;
   /**
+   * Mark down the given Connection.
+   *
+   * This will cause us to discard its outgoing queue, and if reset
+   * detection is enabled in the policy and the endpoint tries to
+   * reconnect they will discard their queue when we inform them of
+   * the session reset.
+   *
+   * If the Connection* is NULL, this is a no-op.
+   *
+   * It does not generate any notifications to the Dispatcher.
+   *
+   * @param con The Connection to mark down.
+   */
+  virtual void mark_down(Connection *con) = 0;
+  void mark_down(const ConnectionRef& con) {
+    mark_down(con.get());
+  }
+  /**
    * Mark all the existing Connections down. This is equivalent
    * to iterating over all Connections and calling mark_down()
    * on each.
@@ -452,6 +522,35 @@ public:
    */
   virtual void mark_down_all() = 0;
   /**
+   * Unlike mark_down, this function will try and deliver
+   * all messages before ending the connection, and it will use
+   * the Pipe's existing semantics to do so. Once the Messages
+   * all been sent out the Connection will be closed and
+   * generate an ms_handle_reset notification to the
+   * Dispatcher.
+   * This function means that you will get standard delivery to endpoints,
+   * and then the Connection will be cleaned up.
+   *
+   * @param con The Connection to mark down.
+   */
+  virtual void mark_down_on_empty(Connection *con) = 0;
+  /**
+   * Mark a Connection as "disposable", setting it to lossy
+   * (regardless of initial Policy). Unlike mark_down_on_empty()
+   * this does not immediately close the Connection once
+   * Messages have been delivered, so as long as there are no errors you can
+   * continue to receive responses; but it will not attempt
+   * to reconnect for message delivery or preserve your old
+   * delivery semantics, either.
+   *
+   * TODO: There's some odd stuff going on in our SimpleMessenger
+   * implementation during connect that looks unused; is there
+   * more of a contract that that's enforcing?
+   *
+   * @param con The Connection to mark as disposable.
+   */
+  virtual void mark_disposable(Connection *con) = 0;
+  /**
    * @} // Connection Management
    */
 protected:
@@ -473,50 +572,6 @@ protected:
    */
 public:
   /**
-   * Determine whether a message can be fast-dispatched. We will
-   * query each Dispatcher in sequence to determine if they are
-   * capable of handling a particular message via "fast dispatch".
-   *
-   * @param m The Message we are testing.
-   */
-  bool ms_can_fast_dispatch(Message *m) {
-    for (list<Dispatcher*>::iterator p = fast_dispatchers.begin();
-	 p != fast_dispatchers.end();
-	 ++p) {
-      if ((*p)->ms_can_fast_dispatch(m))
-	return true;
-    }
-    return false;
-  }
-
-  /**
-   * Deliver a single Message via "fast dispatch".
-   *
-   * @param m The Message we are fast dispatching. We take ownership
-   * of one reference to it.
-   */
-  void ms_fast_dispatch(Message *m) {
-    for (list<Dispatcher*>::iterator p = fast_dispatchers.begin();
-	 p != fast_dispatchers.end();
-	 ++p) {
-      if ((*p)->ms_can_fast_dispatch(m)) {
-	(*p)->ms_fast_dispatch(m);
-	return;
-      }
-    }
-    assert(0);
-  }
-  /**
-   *
-   */
-  void ms_fast_preprocess(Message *m) {
-    for (list<Dispatcher*>::iterator p = fast_dispatchers.begin();
-	 p != fast_dispatchers.end();
-	 ++p) {
-      (*p)->ms_fast_preprocess(m);
-    }
-  }
-  /**
    *  Deliver a single Message. Send it to each Dispatcher
    *  in sequence until one of them handles it.
    *  If none of our Dispatchers can handle it, assert(0).
@@ -539,8 +594,7 @@ public:
   }
   /**
    * Notify each Dispatcher of a new Connection. Call
-   * this function whenever a new Connection is initiated or
-   * reconnects.
+   * this function whenever a new Connection is initiated.
    *
    * @param con Pointer to the new Connection.
    */
@@ -552,20 +606,6 @@ public:
   }
 
   /**
-   * Notify each fast Dispatcher of a new Connection. Call
-   * this function whenever a new Connection is initiated or
-   * reconnects.
-   *
-   * @param con Pointer to the new Connection.
-   */
-  void ms_deliver_handle_fast_connect(Connection *con) {
-    for (list<Dispatcher*>::iterator p = fast_dispatchers.begin();
-         p != fast_dispatchers.end();
-         ++p)
-      (*p)->ms_handle_fast_connect(con);
-  }
-
-  /**
    * Notify each Dispatcher of a new incomming Connection. Call
    * this function whenever a new Connection is accepted.
    *
@@ -579,19 +619,6 @@ public:
   }
 
   /**
-   * Notify each fast Dispatcher of a new incoming Connection. Call
-   * this function whenever a new Connection is accepted.
-   *
-   * @param con Pointer to the new Connection.
-   */
-  void ms_deliver_handle_fast_accept(Connection *con) {
-    for (list<Dispatcher*>::iterator p = fast_dispatchers.begin();
-         p != fast_dispatchers.end();
-         ++p)
-      (*p)->ms_handle_fast_accept(con);
-  }
-
-  /**
    * Notify each Dispatcher of a Connection which may have lost
    * Messages. Call this function whenever you detect that a lossy Connection
    * has been disconnected.
diff --git a/src/msg/Pipe.cc b/src/msg/Pipe.cc
index 9dc5c34..54ce679 100644
--- a/src/msg/Pipe.cc
+++ b/src/msg/Pipe.cc
@@ -72,10 +72,8 @@ ostream& Pipe::_pipe_prefix(std::ostream *_dout) {
  * Pipe
  */
 
-Pipe::Pipe(SimpleMessenger *r, int st, PipeConnection *con)
-  : RefCountedObject(r->cct),
-    reader_thread(this),
-    writer_thread(this),
+Pipe::Pipe(SimpleMessenger *r, int st, Connection *con)
+  : reader_thread(this), writer_thread(this),
     delay_thread(NULL),
     msgr(r),
     conn_id(r->dispatch_queue.get_id()),
@@ -85,18 +83,18 @@ Pipe::Pipe(SimpleMessenger *r, int st, PipeConnection *con)
     state(st),
     connection_state(NULL),
     reader_running(false), reader_needs_join(false),
-    reader_dispatching(false),
     writer_running(false),
     in_q(&(r->dispatch_queue)),
     send_keepalive(false),
     send_keepalive_ack(false),
+    close_on_empty(false),
     connect_seq(0), peer_global_seq(0),
     out_seq(0), in_seq(0), in_seq_acked(0) {
   if (con) {
     connection_state = con;
     connection_state->reset_pipe(this);
   } else {
-    connection_state = new PipeConnection(msgr->cct, msgr);
+    connection_state = new Connection(msgr);
     connection_state->pipe = get();
   }
 
@@ -129,6 +127,11 @@ void Pipe::handle_ack(uint64_t seq)
 				<< seq << " >= " << m->get_seq() << " on " << m << " " << *m << dendl;
     m->put();
   }
+
+  if (sent.empty() && close_on_empty) {
+    lsubdout(msgr->cct, ms, 10) << "reader got last ack, queue empty, closing" << dendl;
+    stop();
+  }
 }
 
 void Pipe::start_reader()
@@ -188,8 +191,11 @@ void Pipe::DelayedDelivery::flush()
 {
   lgeneric_subdout(pipe->msgr->cct, ms, 20) << pipe->_pipe_prefix(_dout) << "DelayedDelivery::flush" << dendl;
   Mutex::Locker l(delay_lock);
-  flush_count = delay_queue.size();
-  delay_cond.Signal();
+  while (!delay_queue.empty()) {
+    Message *m = delay_queue.front().second;
+    delay_queue.pop_front();
+    pipe->in_q->enqueue(m, m->get_priority(), pipe->conn_id);
+  }
 }
 
 void *Pipe::DelayedDelivery::entry()
@@ -206,51 +212,20 @@ void *Pipe::DelayedDelivery::entry()
     utime_t release = delay_queue.front().first;
     Message *m = delay_queue.front().second;
     string delay_msg_type = pipe->msgr->cct->_conf->ms_inject_delay_msg_type;
-    if (!flush_count &&
-        (release > ceph_clock_now(pipe->msgr->cct) &&
-         (delay_msg_type.empty() || m->get_type_name() == delay_msg_type))) {
+    if (release > ceph_clock_now(pipe->msgr->cct) &&
+	(delay_msg_type.empty() || m->get_type_name() == delay_msg_type)) {
       lgeneric_subdout(pipe->msgr->cct, ms, 10) << pipe->_pipe_prefix(_dout) << "DelayedDelivery::entry sleeping on delay_cond until " << release << dendl;
       delay_cond.WaitUntil(delay_lock, release);
       continue;
     }
     lgeneric_subdout(pipe->msgr->cct, ms, 10) << pipe->_pipe_prefix(_dout) << "DelayedDelivery::entry dequeuing message " << m << " for delivery, past " << release << dendl;
     delay_queue.pop_front();
-    if (flush_count > 0) {
-      --flush_count;
-      active_flush = true;
-    }
-    if (pipe->in_q->can_fast_dispatch(m)) {
-      if (!stop_fast_dispatching_flag) {
-        delay_dispatching = true;
-        delay_lock.Unlock();
-        pipe->in_q->fast_dispatch(m);
-        delay_lock.Lock();
-        delay_dispatching = false;
-        if (stop_fast_dispatching_flag) {
-          // we need to let the stopping thread proceed
-          delay_cond.Signal();
-          delay_lock.Unlock();
-          delay_lock.Lock();
-        }
-      }
-    } else {
-      pipe->in_q->enqueue(m, m->get_priority(), pipe->conn_id);
-    }
-    active_flush = false;
+    pipe->in_q->enqueue(m, m->get_priority(), pipe->conn_id);
   }
   lgeneric_subdout(pipe->msgr->cct, ms, 20) << pipe->_pipe_prefix(_dout) << "DelayedDelivery::entry stop" << dendl;
   return NULL;
 }
 
-void Pipe::DelayedDelivery::stop_fast_dispatching() {
-  Mutex::Locker l(delay_lock);
-  stop_fast_dispatching_flag = true;
-  // we can't block if we're the delay thread; see Pipe::stop_and_wait()
-  while (delay_dispatching && !am_self())
-    delay_cond.Wait(delay_lock);
-}
-
-
 int Pipe::accept()
 {
   ldout(msgr->cct,10) << "accept" << dendl;
@@ -631,7 +606,7 @@ int Pipe::accept()
     if (existing->connection_state->clear_pipe(existing))
       msgr->dispatch_queue.queue_reset(existing->connection_state.get());
   } else {
-    // queue a reset on the new connection, which we're dumping for the old
+    // queue a reset on the old connection
     msgr->dispatch_queue.queue_reset(connection_state.get());
 
     // drop my Connection, and take a ref to the existing one. do not
@@ -642,12 +617,9 @@ int Pipe::accept()
     // make existing Connection reference us
     connection_state->reset_pipe(this);
 
-    if (existing->delay_thread) {
-      existing->delay_thread->steal_for_pipe(this);
-      delay_thread = existing->delay_thread;
-      existing->delay_thread = NULL;
-      delay_thread->flush();
-    }
+    // flush/queue any existing delayed messages
+    if (existing->delay_thread)
+      existing->delay_thread->flush();
 
     // steal incoming queue
     uint64_t replaced_conn_id = conn_id;
@@ -668,7 +640,6 @@ int Pipe::accept()
          ++p)
       out_q[p->first].splice(out_q[p->first].begin(), p->second);
   }
-  existing->stop_and_wait();
   existing->pipe_lock.Unlock();
 
  open:
@@ -701,7 +672,6 @@ int Pipe::accept()
 
   // notify
   msgr->dispatch_queue.queue_accept(connection_state.get());
-  msgr->ms_deliver_handle_fast_accept(connection_state.get());
 
   // ok!
   if (msgr->dispatch_queue.stop)
@@ -881,7 +851,7 @@ int Pipe::connect()
     goto fail;
   }
   if (memcmp(banner, CEPH_BANNER, strlen(CEPH_BANNER))) {
-    ldout(msgr->cct,0) << "connect protocol error (bad banner) on peer " << peer_addr << dendl;
+    ldout(msgr->cct,0) << "connect protocol error (bad banner) on peer " << paddr << dendl;
     goto fail;
   }
 
@@ -952,7 +922,7 @@ int Pipe::connect()
 
     ceph_msg_connect connect;
     connect.features = policy.features_supported;
-    connect.host_type = msgr->get_myinst().name.type();
+    connect.host_type = msgr->my_type;
     connect.global_seq = gseq;
     connect.connect_seq = cseq;
     connect.protocol_version = msgr->get_proto_version(peer_type, true);
@@ -1147,7 +1117,6 @@ int Pipe::connect()
       }
 
       msgr->dispatch_queue.queue_connect(connection_state.get());
-      msgr->ms_deliver_handle_fast_connect(connection_state.get());
       
       if (!reader_running) {
 	ldout(msgr->cct,20) << "connect starting reader" << dendl;
@@ -1417,25 +1386,6 @@ void Pipe::stop()
   shutdown_socket();
 }
 
-void Pipe::stop_and_wait()
-{
-  if (state != STATE_CLOSED)
-    stop();
-  
-  // HACK: we work around an annoying deadlock here.  If the fast
-  // dispatch method calls mark_down() on itself, it can block here
-  // waiting for the reader_dispatching flag to clear... which will
-  // clearly never happen.  Avoid the situation by skipping the wait
-  // if we are marking our *own* connect down. Do the same for the
-  // delayed dispatch thread.
-  if (delay_thread) {
-    delay_thread->stop_fast_dispatching();
-  }
-  while (reader_running &&
-	 reader_dispatching &&
-	 !reader_thread.am_self())
-    cond.Wait(pipe_lock);
-}
 
 /* read msgs from socket.
  * also, server.
@@ -1574,30 +1524,19 @@ void Pipe::reader()
       ldout(msgr->cct,10) << "reader got message "
 	       << m->get_seq() << " " << m << " " << *m
 	       << dendl;
-      in_q->fast_preprocess(m);
 
       if (delay_thread) {
-        utime_t release;
-        if (rand() % 10000 < msgr->cct->_conf->ms_inject_delay_probability * 10000.0) {
-          release = m->get_recv_stamp();
-          release += msgr->cct->_conf->ms_inject_delay_max * (double)(rand() % 10000) / 10000.0;
-          lsubdout(msgr->cct, ms, 1) << "queue_received will delay until " << release << " on " << m << " " << *m << dendl;
-        }
-        delay_thread->queue(release, m);
+	utime_t release;
+	if (rand() % 10000 < msgr->cct->_conf->ms_inject_delay_probability * 10000.0) {
+	  release = m->get_recv_stamp();
+	  release += msgr->cct->_conf->ms_inject_delay_max * (double)(rand() % 10000) / 10000.0;
+	  lsubdout(msgr->cct, ms, 1) << "queue_received will delay until " << release << " on " << m << " " << *m << dendl;
+	}
+	delay_thread->queue(release, m);
       } else {
-        if (in_q->can_fast_dispatch(m)) {
-	  reader_dispatching = true;
-          pipe_lock.Unlock();
-          in_q->fast_dispatch(m);
-          pipe_lock.Lock();
-	  reader_dispatching = false;
-	  if (state == STATE_CLOSED) // there might be somebody waiting
-	    cond.Signal();
-        } else {
-          in_q->enqueue(m, m->get_priority(), conn_id);
-        }
+	in_q->enqueue(m, m->get_priority(), conn_id);
       }
-    }
+    } 
     
     else if (tag == CEPH_MSGR_TAG_CLOSE) {
       ldout(msgr->cct,20) << "reader got CLOSE" << dendl;
@@ -1719,7 +1658,7 @@ void Pipe::writer()
       Message *m = _get_next_outgoing();
       if (m) {
 	m->set_seq(++out_seq);
-	if (!policy.lossy) {
+	if (!policy.lossy || close_on_empty) {
 	  // put on sent list
 	  sent.push_back(m); 
 	  m->get();
@@ -1780,6 +1719,12 @@ void Pipe::writer()
       continue;
     }
     
+    if (sent.empty() && close_on_empty) {
+      ldout(msgr->cct,10) << "writer out and sent queues empty, closing" << dendl;
+      stop();
+      continue;
+    }
+
     // wait
     ldout(msgr->cct,20) << "writer sleeping" << dendl;
     cond.Wait(pipe_lock);
@@ -1798,9 +1743,6 @@ void Pipe::unlock_maybe_reap()
   if (!reader_running && !writer_running) {
     shutdown_socket();
     pipe_lock.Unlock();
-    if (delay_thread && delay_thread->is_flushing()) {
-      delay_thread->wait_for_flush();
-    }
     msgr->queue_reap(this);
   } else {
     pipe_lock.Unlock();
diff --git a/src/msg/Pipe.h b/src/msg/Pipe.h
index 5496b5c..468a6a5 100644
--- a/src/msg/Pipe.h
+++ b/src/msg/Pipe.h
@@ -20,7 +20,6 @@
 #include "msg_types.h"
 #include "Messenger.h"
 #include "auth/AuthSessionHandler.h"
-#include "PipeConnection.h"
 
 
 class SimpleMessenger;
@@ -76,20 +75,13 @@ class DispatchQueue;
       std::deque< pair<utime_t,Message*> > delay_queue;
       Mutex delay_lock;
       Cond delay_cond;
-      int flush_count;
-      bool active_flush;
       bool stop_delayed_delivery;
-      bool delay_dispatching; // we are in fast dispatch now
-      bool stop_fast_dispatching_flag; // we need to stop fast dispatching
 
     public:
       DelayedDelivery(Pipe *p)
 	: pipe(p),
-	  delay_lock("Pipe::DelayedDelivery::delay_lock"), flush_count(0),
-	  active_flush(false),
-	  stop_delayed_delivery(false),
-	  delay_dispatching(false),
-	  stop_fast_dispatching_flag(false) { }
+	  delay_lock("Pipe::DelayedDelivery::delay_lock"),
+	  stop_delayed_delivery(false) { }
       ~DelayedDelivery() {
 	discard();
       }
@@ -101,45 +93,23 @@ class DispatchQueue;
       }
       void discard();
       void flush();
-      bool is_flushing() {
-        Mutex::Locker l(delay_lock);
-        return flush_count > 0 || active_flush;
-      }
-      void wait_for_flush() {
-        Mutex::Locker l(delay_lock);
-        while (flush_count > 0 || active_flush)
-          delay_cond.Wait(delay_lock);
-      }
       void stop() {
 	delay_lock.Lock();
 	stop_delayed_delivery = true;
 	delay_cond.Signal();
 	delay_lock.Unlock();
       }
-      void steal_for_pipe(Pipe *new_owner) {
-        Mutex::Locker l(delay_lock);
-        pipe = new_owner;
-      }
-      /**
-       * We need to stop fast dispatching before we need to stop putting
-       * normal messages into the DispatchQueue.
-       */
-      void stop_fast_dispatching();
     } *delay_thread;
     friend class DelayedDelivery;
 
   public:
-    Pipe(SimpleMessenger *r, int st, PipeConnection *con);
+    Pipe(SimpleMessenger *r, int st, Connection *con);
     ~Pipe();
 
     SimpleMessenger *msgr;
     uint64_t conn_id;
     ostream& _pipe_prefix(std::ostream *_dout);
 
-    Pipe* get() {
-      return static_cast<Pipe*>(RefCountedObject::get());
-    }
-
     enum {
       STATE_ACCEPTING,
       STATE_CONNECTING,
@@ -182,12 +152,11 @@ class DispatchQueue;
 
   protected:
     friend class SimpleMessenger;
-    PipeConnectionRef connection_state;
+    ConnectionRef connection_state;
 
     utime_t backoff;         // backoff time
 
     bool reader_running, reader_needs_join;
-    bool reader_dispatching; /// reader thread is dispatching without pipe_lock
     bool writer_running;
 
     map<int, list<Message*> > out_q;  // priority queue for outbound msgs
@@ -198,6 +167,7 @@ class DispatchQueue;
     bool send_keepalive_ack;
     utime_t keepalive_ack_stamp;
     bool halt_delivery; //if a pipe's queue is destroyed, stop adding to it
+    bool close_on_empty;
     
     __u32 connect_seq, peer_global_seq;
     uint64_t out_seq;
@@ -271,11 +241,7 @@ class DispatchQueue;
     void register_pipe();
     void unregister_pipe();
     void join();
-    /// stop a Pipe by closing its socket and setting it to STATE_CLOSED
     void stop();
-    /// stop() a Pipe if not already done, and wait for it to finish any
-    /// fast_dispatch in progress.
-    void stop_and_wait();
 
     void _send(Message *m) {
       assert(pipe_lock.is_locked());
diff --git a/src/msg/PipeConnection.cc b/src/msg/PipeConnection.cc
deleted file mode 100644
index 695b226..0000000
--- a/src/msg/PipeConnection.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "Message.h"
-#include "Pipe.h"
-#include "SimpleMessenger.h"
-#include "PipeConnection.h"
-
-PipeConnection::~PipeConnection()
-{
-  if (pipe) {
-    pipe->put();
-    pipe = NULL;
-  }
-}
-
-Pipe* PipeConnection::get_pipe()
-{
-  Mutex::Locker l(lock);
-  if (pipe)
-    return pipe->get();
-  return NULL;
-}
-
-bool PipeConnection::try_get_pipe(Pipe **p)
-{
-  Mutex::Locker l(lock);
-  if (failed) {
-    *p = NULL;
-  } else {
-    if (pipe)
-      *p = pipe->get();
-    else
-      *p = NULL;
-  }
-  return !failed;
-}
-
-bool PipeConnection::clear_pipe(Pipe *old_p)
-{
-  Mutex::Locker l(lock);
-  if (old_p == pipe) {
-    pipe->put();
-    pipe = NULL;
-    failed = true;
-    return true;
-  }
-  return false;
-}
-
-void PipeConnection::reset_pipe(Pipe *p)
-{
-  Mutex::Locker l(lock);
-  if (pipe)
-    pipe->put();
-  pipe = p->get();
-}
-
-int PipeConnection::send_message(Message *m)
-{
-  assert(msgr);
-  return static_cast<SimpleMessenger*>(msgr)->send_message(m, this);
-}
-
-void PipeConnection::send_keepalive()
-{
-  static_cast<SimpleMessenger*>(msgr)->send_keepalive(this);
-}
-
-void PipeConnection::mark_down()
-{
-  if (msgr)
-    static_cast<SimpleMessenger*>(msgr)->mark_down(this);
-}
-
-void PipeConnection::mark_disposable()
-{
-  if (msgr)
-    static_cast<SimpleMessenger*>(msgr)->mark_disposable(this);
-}
diff --git a/src/msg/PipeConnection.h b/src/msg/PipeConnection.h
deleted file mode 100644
index c27a63c..0000000
--- a/src/msg/PipeConnection.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Red Hat
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef CEPH_MSG_PIPECONNECTION_H
-#define CEPH_MSG_PIPECONNECTION_H
-
-#include "Connection.h"
-class Pipe;
-
-struct PipeConnection : public Connection {
-  Pipe* pipe;
-
-  friend class boost::intrusive_ptr<PipeConnection>;
-  friend class Pipe;
-
-public:
-
-  PipeConnection(CephContext *cct, Messenger *m)
-    : Connection(cct, m),
-      pipe(NULL) { }
-
-  ~PipeConnection();
-
-  Pipe* get_pipe();
-
-  bool try_get_pipe(Pipe** p);
-
-  bool clear_pipe(Pipe* old_p);
-
-  void reset_pipe(Pipe* p);
-
-  bool is_connected() {
-    Mutex::Locker l(lock);
-    return pipe != NULL;
-  }
-
-  int send_message(Message *m);
-  void send_keepalive();
-  void mark_down();
-  void mark_disposable();
-
-}; /* PipeConnection */
-
-typedef boost::intrusive_ptr<PipeConnection> PipeConnectionRef;
-
-#endif
diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc
index cf6bc73..ce7f1fd 100644
--- a/src/msg/SimpleMessenger.cc
+++ b/src/msg/SimpleMessenger.cc
@@ -39,19 +39,20 @@ static ostream& _prefix(std::ostream *_dout, SimpleMessenger *msgr) {
 
 SimpleMessenger::SimpleMessenger(CephContext *cct, entity_name_t name,
 				 string mname, uint64_t _nonce)
-  : SimplePolicyMessenger(cct, name,mname, _nonce),
+  : Messenger(cct, name),
     accepter(this, _nonce),
     dispatch_queue(cct, this),
     reaper_thread(this),
+    my_type(name.type()),
     nonce(_nonce),
     lock("SimpleMessenger::lock"), need_addr(true), did_bind(false),
     global_seq(0),
     cluster_protocol(0),
-    dispatch_throttler(cct, string("msgr_dispatch_throttler-") + mname,
-		       cct->_conf->ms_dispatch_throttle_bytes),
+    policy_lock("SimpleMessenger::policy_lock"),
+    dispatch_throttler(cct, string("msgr_dispatch_throttler-") + mname, cct->_conf->ms_dispatch_throttle_bytes),
     reaper_started(false), reaper_stop(false),
     timeout(0),
-    local_connection(new PipeConnection(cct, this))
+    local_connection(new Connection(this))
 {
   ceph_spin_init(&global_seq_lock);
   init_local_connection();
@@ -65,7 +66,7 @@ SimpleMessenger::~SimpleMessenger()
 {
   assert(!did_bind); // either we didn't bind or we shut down the Accepter
   assert(rank_pipe.empty()); // we don't have any running Pipes.
-  assert(!reaper_started); // the reaper thread is stopped
+  assert(reaper_stop && !reaper_started); // the reaper thread is stopped
 }
 
 void SimpleMessenger::ready()
@@ -91,21 +92,22 @@ int SimpleMessenger::shutdown()
   return 0;
 }
 
-int SimpleMessenger::_send_message(Message *m, const entity_inst_t& dest)
+int SimpleMessenger::_send_message(Message *m, const entity_inst_t& dest,
+                                   bool lazy)
 {
   // set envelope
   m->get_header().src = get_myname();
 
   if (!m->get_priority()) m->set_priority(get_default_send_priority());
  
-  ldout(cct,1) <<"--> " << dest.name << " "
+  ldout(cct,1) << (lazy ? "lazy " : "") <<"--> " << dest.name << " "
           << dest.addr << " -- " << *m
     	  << " -- ?+" << m->get_data().length()
 	  << " " << m 
 	  << dendl;
 
   if (dest.addr == entity_addr_t()) {
-    ldout(cct,0) << "send_message message " << *m
+    ldout(cct,0) << (lazy ? "lazy_" : "") << "send_message message " << *m
                  << " with empty dest " << dest.addr << dendl;
     m->put();
     return -EINVAL;
@@ -114,26 +116,27 @@ int SimpleMessenger::_send_message(Message *m, const entity_inst_t& dest)
   lock.Lock();
   Pipe *pipe = _lookup_pipe(dest.addr);
   submit_message(m, (pipe ? pipe->connection_state.get() : NULL),
-                 dest.addr, dest.name.type(), true);
+                 dest.addr, dest.name.type(), lazy);
   lock.Unlock();
   return 0;
 }
 
-int SimpleMessenger::_send_message(Message *m, Connection *con)
+int SimpleMessenger::_send_message(Message *m, Connection *con, bool lazy)
 {
   //set envelope
   m->get_header().src = get_myname();
 
   if (!m->get_priority()) m->set_priority(get_default_send_priority());
 
-  ldout(cct,1) << "--> " << con->get_peer_addr()
+  ldout(cct,1) << (lazy ? "lazy " : "") << "--> " << con->get_peer_addr()
       << " -- " << *m
       << " -- ?+" << m->get_data().length()
       << " " << m << " con " << con
       << dendl;
 
-  submit_message(m, static_cast<PipeConnection*>(con),
-		 con->get_peer_addr(), con->get_peer_type(), false);
+  lock.Lock();
+  submit_message(m, con, con->get_peer_addr(), con->get_peer_type(), lazy);
+  lock.Unlock();
   return 0;
 }
 
@@ -153,8 +156,6 @@ void SimpleMessenger::set_addr_unknowns(entity_addr_t &addr)
 
 int SimpleMessenger::get_proto_version(int peer_type, bool connect)
 {
-  int my_type = my_inst.name.type();
-
   // set reply protocol version
   if (peer_type == my_type) {
     // internal
@@ -205,9 +206,7 @@ void SimpleMessenger::reaper_entry()
   ldout(cct,10) << "reaper_entry start" << dendl;
   lock.Lock();
   while (!reaper_stop) {
-    reaper();  // may drop and retake the lock
-    if (reaper_stop)
-      break;
+    reaper();
     reaper_cond.Wait(lock);
   }
   lock.Unlock();
@@ -225,8 +224,7 @@ void SimpleMessenger::reaper()
   while (!pipe_reap_queue.empty()) {
     Pipe *p = pipe_reap_queue.front();
     pipe_reap_queue.pop_front();
-    ldout(cct,10) << "reaper reaping pipe " << p << " " <<
-      p->get_peer_addr() << dendl;
+    ldout(cct,10) << "reaper reaping pipe " << p << " " << p->get_peer_addr() << dendl;
     p->pipe_lock.Lock();
     p->discard_out_queue();
     if (p->connection_state) {
@@ -240,14 +238,7 @@ void SimpleMessenger::reaper()
     p->unregister_pipe();
     assert(pipes.count(p));
     pipes.erase(p);
-
-    // drop msgr lock while joining thread; the delay through could be
-    // trying to fast dispatch, preventing it from joining without
-    // blocking and deadlocking.
-    lock.Unlock();
     p->join();
-    lock.Lock();
-
     if (p->sd >= 0)
       ::close(p->sd);
     ldout(cct,10) << "reaper reaped pipe " << p << " " << p->get_peer_addr() << dendl;
@@ -302,7 +293,7 @@ int SimpleMessenger::start()
   ldout(cct,1) << "messenger.start" << dendl;
 
   // register at least one entity, first!
-  assert(my_inst.name.type() >= 0);
+  assert(my_type >= 0);
 
   assert(!started);
   started = true;
@@ -338,7 +329,7 @@ Pipe *SimpleMessenger::add_accept_pipe(int sd)
  */
 Pipe *SimpleMessenger::connect_rank(const entity_addr_t& addr,
 				    int type,
-				    PipeConnection *con,
+				    Connection *con,
 				    Message *first)
 {
   assert(lock.is_locked());
@@ -347,8 +338,7 @@ Pipe *SimpleMessenger::connect_rank(const entity_addr_t& addr,
   ldout(cct,10) << "connect_rank to " << addr << ", creating pipe and registering" << dendl;
   
   // create pipe
-  Pipe *pipe = new Pipe(this, Pipe::STATE_CONNECTING,
-			static_cast<PipeConnection*>(con));
+  Pipe *pipe = new Pipe(this, Pipe::STATE_CONNECTING, con);
   pipe->pipe_lock.Lock();
   pipe->set_peer_type(type);
   pipe->set_peer_addr(addr);
@@ -409,10 +399,10 @@ ConnectionRef SimpleMessenger::get_loopback_connection()
   return local_connection;
 }
 
-void SimpleMessenger::submit_message(Message *m, PipeConnection *con,
-				     const entity_addr_t& dest_addr, int dest_type,
-				     bool already_locked)
+void SimpleMessenger::submit_message(Message *m, Connection *con,
+				     const entity_addr_t& dest_addr, int dest_type, bool lazy)
 {
+
   if (cct->_conf->ms_dump_on_send) {
     m->encode(-1, true);
     ldout(cct, 0) << "submit_message " << *m << "\n";
@@ -428,16 +418,15 @@ void SimpleMessenger::submit_message(Message *m, PipeConnection *con,
   // existing connection?
   if (con) {
     Pipe *pipe = NULL;
-    bool ok = static_cast<PipeConnection*>(con)->try_get_pipe(&pipe);
+    bool ok = con->try_get_pipe((RefCountedObject**)&pipe);
     if (!ok) {
       ldout(cct,0) << "submit_message " << *m << " remote, " << dest_addr
 		   << ", failed lossy con, dropping message " << m << dendl;
       m->put();
       return;
     }
-    while (pipe && ok) {
-      // we loop in case of a racing reconnect, either from us or them
-      pipe->pipe_lock.Lock(); // can't use a Locker because of the Pipe ref
+    if (pipe) {
+      pipe->pipe_lock.Lock();
       if (pipe->state != Pipe::STATE_CLOSED) {
 	ldout(cct,20) << "submit_message " << *m << " remote, " << dest_addr << ", have pipe." << dendl;
 	pipe->_send(m);
@@ -445,20 +434,12 @@ void SimpleMessenger::submit_message(Message *m, PipeConnection *con,
 	pipe->put();
 	return;
       }
-      Pipe *current_pipe;
-      ok = con->try_get_pipe(&current_pipe);
       pipe->pipe_lock.Unlock();
-      if (current_pipe == pipe) {
-	ldout(cct,20) << "submit_message " << *m << " remote, " << dest_addr
-		      << ", had pipe " << pipe << ", but it closed." << dendl;
-	pipe->put();
-	current_pipe->put();
-	m->put();
-	return;
-      } else {
-	pipe->put();
-	pipe = current_pipe;
-      }
+      pipe->put();
+      ldout(cct,20) << "submit_message " << *m << " remote, " << dest_addr
+		    << ", had pipe " << pipe << ", but it closed." << dendl;
+      m->put();
+      return;
     }
   }
 
@@ -476,25 +457,49 @@ void SimpleMessenger::submit_message(Message *m, PipeConnection *con,
     ldout(cct,20) << "submit_message " << *m << " remote, " << dest_addr << ", lossy server for target type "
 		  << ceph_entity_type_name(dest_type) << ", no session, dropping." << dendl;
     m->put();
+  } else if (lazy) {
+    ldout(cct,20) << "submit_message " << *m << " remote, " << dest_addr << ", lazy, dropping." << dendl;
+    m->put();
   } else {
     ldout(cct,20) << "submit_message " << *m << " remote, " << dest_addr << ", new pipe." << dendl;
-    if (!already_locked) {
-      /** We couldn't handle the Message without reference to global data, so
-       *  grab the lock and do it again. If we got here, we know it's a non-lossy
-       *  Connection, so we can use our existing pointer without doing another lookup. */
-      Mutex::Locker l(lock);
-      submit_message(m, con, dest_addr, dest_type, true);
-    } else {
-      connect_rank(dest_addr, dest_type, static_cast<PipeConnection*>(con), m);
+    connect_rank(dest_addr, dest_type, con, m);
+  }
+}
+
+int SimpleMessenger::send_keepalive(const entity_inst_t& dest)
+{
+  const entity_addr_t dest_addr = dest.addr;
+  entity_addr_t dest_proc_addr = dest_addr;
+  int ret = 0;
+
+  lock.Lock();
+  {
+    // local?
+    if (my_inst.addr != dest_addr) {
+      // remote.
+      Pipe *pipe = _lookup_pipe(dest_proc_addr);
+      if (pipe) {
+        // connected?
+	pipe->pipe_lock.Lock();
+	ldout(cct,20) << "send_keepalive remote, " << dest_addr << ", have pipe." << dendl;
+	pipe->_send_keepalive();
+	pipe->pipe_lock.Unlock();
+      } else {
+        ret = -EINVAL;
+      }
+      if (!pipe) {
+	ldout(cct,20) << "send_keepalive no pipe for " << dest_addr << ", doing nothing." << dendl;
+      }
     }
   }
+  lock.Unlock();
+  return ret;
 }
 
 int SimpleMessenger::send_keepalive(Connection *con)
 {
   int ret = 0;
-  Pipe *pipe = static_cast<Pipe *>(
-    static_cast<PipeConnection*>(con)->get_pipe());
+  Pipe *pipe = static_cast<Pipe *>(con->get_pipe());
   if (pipe) {
     ldout(cct,20) << "send_keepalive con " << con << ", have pipe." << dendl;
     assert(pipe->msgr == this);
@@ -554,7 +559,7 @@ void SimpleMessenger::wait()
       Pipe *p = rank_pipe.begin()->second;
       p->unregister_pipe();
       p->pipe_lock.Lock();
-      p->stop_and_wait();
+      p->stop();
       p->pipe_lock.Unlock();
     }
 
@@ -570,6 +575,7 @@ void SimpleMessenger::wait()
   ldout(cct,10) << "wait: done." << dendl;
   ldout(cct,1) << "shutdown complete." << dendl;
   started = false;
+  my_type = -1;
 }
 
 
@@ -581,8 +587,8 @@ void SimpleMessenger::mark_down_all()
     Pipe *p = *q;
     ldout(cct,5) << "mark_down_all accepting_pipe " << p << dendl;
     p->pipe_lock.Lock();
-    p->stop_and_wait();
-    PipeConnectionRef con = p->connection_state;
+    p->stop();
+    ConnectionRef con = p->connection_state;
     if (con && con->clear_pipe(p))
       dispatch_queue.queue_reset(con.get());
     p->pipe_lock.Unlock();
@@ -596,8 +602,8 @@ void SimpleMessenger::mark_down_all()
     rank_pipe.erase(it);
     p->unregister_pipe();
     p->pipe_lock.Lock();
-    p->stop_and_wait();
-    PipeConnectionRef con = p->connection_state;
+    p->stop();
+    ConnectionRef con = p->connection_state;
     if (con && con->clear_pipe(p))
       dispatch_queue.queue_reset(con.get());
     p->pipe_lock.Unlock();
@@ -613,12 +619,12 @@ void SimpleMessenger::mark_down(const entity_addr_t& addr)
     ldout(cct,1) << "mark_down " << addr << " -- " << p << dendl;
     p->unregister_pipe();
     p->pipe_lock.Lock();
-    p->stop_and_wait();
+    p->stop();
     if (p->connection_state) {
       // generate a reset event for the caller in this case, even
       // though they asked for it, since this is the addr-based (and
       // not Connection* based) interface
-      PipeConnectionRef con = p->connection_state;
+      ConnectionRef con = p->connection_state;
       if (con && con->clear_pipe(p))
 	dispatch_queue.queue_reset(con.get());
     }
@@ -634,13 +640,13 @@ void SimpleMessenger::mark_down(Connection *con)
   if (con == NULL)
     return;
   lock.Lock();
-  Pipe *p = static_cast<Pipe *>(static_cast<PipeConnection*>(con)->get_pipe());
+  Pipe *p = static_cast<Pipe *>(con->get_pipe());
   if (p) {
     ldout(cct,1) << "mark_down " << con << " -- " << p << dendl;
     assert(p->msgr == this);
     p->unregister_pipe();
     p->pipe_lock.Lock();
-    p->stop_and_wait();
+    p->stop();
     if (p->connection_state) {
       // do not generate a reset event for the caller in this case,
       // since they asked for it.
@@ -654,10 +660,33 @@ void SimpleMessenger::mark_down(Connection *con)
   lock.Unlock();
 }
 
+void SimpleMessenger::mark_down_on_empty(Connection *con)
+{
+  lock.Lock();
+  Pipe *p = static_cast<Pipe *>(con->get_pipe());
+  if (p) {
+    assert(p->msgr == this);
+    p->pipe_lock.Lock();
+    p->unregister_pipe();
+    if (p->out_q.empty()) {
+      ldout(cct,1) << "mark_down_on_empty " << con << " -- " << p << " closing (queue is empty)" << dendl;
+      p->stop();
+    } else {
+      ldout(cct,1) << "mark_down_on_empty " << con << " -- " << p << " marking (queue is not empty)" << dendl;
+      p->close_on_empty = true;
+    }
+    p->pipe_lock.Unlock();
+    p->put();
+  } else {
+    ldout(cct,1) << "mark_down_on_empty " << con << " -- pipe dne" << dendl;
+  }
+  lock.Unlock();
+}
+
 void SimpleMessenger::mark_disposable(Connection *con)
 {
   lock.Lock();
-  Pipe *p = static_cast<Pipe *>(static_cast<PipeConnection*>(con)->get_pipe());
+  Pipe *p = static_cast<Pipe *>(con->get_pipe());
   if (p) {
     ldout(cct,1) << "mark_disposable " << con << " -- " << p << dendl;
     assert(p->msgr == this);
@@ -694,9 +723,15 @@ void SimpleMessenger::learned_addr(const entity_addr_t &peer_addr_for_me)
   lock.Unlock();
 }
 
+void SimpleMessenger::unlearn_addr()
+{
+  lock.Lock();
+  need_addr = true;
+  lock.Unlock();
+}
+
 void SimpleMessenger::init_local_connection()
 {
   local_connection->peer_addr = my_inst.addr;
-  local_connection->peer_type = my_inst.name.type();
-  ms_deliver_handle_fast_connect(local_connection.get());
+  local_connection->peer_type = my_type;
 }
diff --git a/src/msg/SimpleMessenger.h b/src/msg/SimpleMessenger.h
index 006b60b..e6e1fb1 100644
--- a/src/msg/SimpleMessenger.h
+++ b/src/msg/SimpleMessenger.h
@@ -30,7 +30,7 @@ using namespace std;
 #include "common/Thread.h"
 #include "common/Throttle.h"
 
-#include "SimplePolicyMessenger.h"
+#include "Messenger.h"
 #include "Message.h"
 #include "include/assert.h"
 #include "DispatchQueue.h"
@@ -69,7 +69,7 @@ using namespace std;
  *               IncomingQueue::lock
  */
 
-class SimpleMessenger : public SimplePolicyMessenger {
+class SimpleMessenger : public Messenger {
   // First we have the public Messenger interface implementation...
 public:
   /**
@@ -112,6 +112,27 @@ public:
     cluster_protocol = p;
   }
 
+  void set_default_policy(Policy p) {
+    Mutex::Locker l(policy_lock);
+    default_policy = p;
+  }
+
+  void set_policy(int type, Policy p) {
+    Mutex::Locker l(policy_lock);
+    policy_map[type] = p;
+  }
+
+  void set_policy_throttlers(int type, Throttle *byte_throttle, Throttle *msg_throttle) {
+    Mutex::Locker l(policy_lock);
+    if (policy_map.count(type)) {
+      policy_map[type].throttler_bytes = byte_throttle;
+      policy_map[type].throttler_messages = msg_throttle;
+    } else {
+      default_policy.throttler_bytes = byte_throttle;
+      default_policy.throttler_messages = msg_throttle;
+    }
+  }
+
   int bind(const entity_addr_t& bind_addr);
   int rebind(const set<int>& avoid_ports);
 
@@ -132,13 +153,20 @@ public:
    * @{
    */
   virtual int send_message(Message *m, const entity_inst_t& dest) {
-    return _send_message(m, dest);
+    return _send_message(m, dest, false);
+  }
+
+  virtual int send_message(Message *m, Connection *con) {
+    return _send_message(m, con, false);
   }
 
-  int send_message(Message *m, Connection *con) {
-    return _send_message(m, con);
+  virtual int lazy_send_message(Message *m, const entity_inst_t& dest) {
+    return _send_message(m, dest, true);
   }
 
+  virtual int lazy_send_message(Message *m, Connection *con) {
+    return _send_message(m, con, true);
+  }
   /** @} // Messaging */
 
   /**
@@ -147,10 +175,12 @@ public:
    */
   virtual ConnectionRef get_connection(const entity_inst_t& dest);
   virtual ConnectionRef get_loopback_connection();
-  int send_keepalive(Connection *con);
+  virtual int send_keepalive(const entity_inst_t& addr);
+  virtual int send_keepalive(Connection *con);
   virtual void mark_down(const entity_addr_t& addr);
-  void mark_down(Connection *con);
-  void mark_disposable(Connection *con);
+  virtual void mark_down(Connection *con);
+  virtual void mark_down_on_empty(Connection *con);
+  virtual void mark_disposable(Connection *con);
   virtual void mark_down_all();
   /** @} // Connection Management */
 protected:
@@ -182,10 +212,6 @@ public:
    */
   Pipe *add_accept_pipe(int sd);
 
-  Connection *create_anon_connection() {
-    return new PipeConnection(cct, NULL);
-  }
-
 private:
 
   /**
@@ -224,18 +250,17 @@ private:
    * @return a pointer to the newly-created Pipe. Caller does not own a
    * reference; take one if you need it.
    */
-  Pipe *connect_rank(const entity_addr_t& addr, int type, PipeConnection *con,
-		     Message *first);
+  Pipe *connect_rank(const entity_addr_t& addr, int type, Connection *con, Message *first);
   /**
    * Send a message, lazily or not.
-   * This just glues send_message together and passes
+   * This just glues [lazy_]send_message together and passes
    * the input on to submit_message.
    */
-  int _send_message(Message *m, const entity_inst_t& dest);
+  int _send_message(Message *m, const entity_inst_t& dest, bool lazy);
   /**
    * Same as above, but for the Connection-based variants.
    */
-  int _send_message(Message *m, Connection *con);
+  int _send_message(Message *m, Connection *con, bool lazy);
   /**
    * Queue up a Message for delivery to the entity specified
    * by addr and dest_type.
@@ -246,15 +271,11 @@ private:
    * @param con The existing Connection to use, or NULL if you don't know of one.
    * @param addr The address to send the Message to.
    * @param dest_type The peer type of the address we're sending to
+   * @param lazy If true, do not establish or fix a Connection to send the Message;
    * just drop silently under failure.
-   * @param already_locked If false, submit_message() will acquire the
-   * SimpleMessenger lock before accessing shared data structures; otherwise
-   * it will assume the lock is held. NOTE: if you are making a request
-   * without locking, you MUST have filled in the con with a valid pointer.
    */
-  void submit_message(Message *m, PipeConnection *con,
-		      const entity_addr_t& addr, int dest_type,
-		      bool already_locked);
+  void submit_message(Message *m, Connection *con,
+                      const entity_addr_t& addr, int dest_type, bool lazy);
   /**
    * Look through the pipes in the pipe_reap_queue and tear them down.
    */
@@ -264,6 +285,8 @@ private:
    */
 
   // SimpleMessenger stuff
+  /// the peer type of our endpoint
+  int my_type;
   /// approximately unique ID set by the Constructor for use in entity_addr_t
   uint64_t nonce;
   /// overall lock used for SimpleMessenger data structures
@@ -308,6 +331,13 @@ private:
   /// internal cluster protocol version, if any, for talking to entities of the same type.
   int cluster_protocol;
 
+  /// lock protecting policy
+  Mutex policy_lock;
+  /// the default Policy we use for Pipes
+  Policy default_policy;
+  /// map specifying different Policies for specific peer types
+  map<int, Policy> policy_map; // entity_name_t::type -> Policy
+
   /// Throttle preventing us from building up a big backlog waiting for dispatch
   Throttle dispatch_throttler;
 
@@ -386,6 +416,31 @@ public:
   void learned_addr(const entity_addr_t& peer_addr_for_me);
 
   /**
+   * Tell the SimpleMessenger its address is no longer known
+   *
+   * This happens when we rebind to a new port.
+   */
+  void unlearn_addr();
+
+  /**
+   * Get the Policy associated with a type of peer.
+   * @param t The peer type to get the default policy for.
+   *
+   * @return A const Policy reference.
+   */
+  Policy get_policy(int t) {
+    Mutex::Locker l(policy_lock);
+    if (policy_map.count(t))
+      return policy_map[t];
+    else
+      return default_policy;
+  }
+  Policy get_default_policy() {
+    Mutex::Locker l(policy_lock);
+    return default_policy;
+  }
+
+  /**
    * Release memory accounting back to the dispatch throttler.
    *
    * @param msize The amount of memory to release.
@@ -414,4 +469,4 @@ public:
    */
 } ;
 
-#endif /* CEPH_SIMPLEMESSENGER_H */
+#endif
diff --git a/src/msg/SimplePolicyMessenger.h b/src/msg/SimplePolicyMessenger.h
deleted file mode 100644
index b283dca..0000000
--- a/src/msg/SimplePolicyMessenger.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
- * Portions Copyright (C) 2013 CohortFS, LLC
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef SIMPLE_POLICY_MESSENGER_H
-#define SIMPLE_POLICY_MESSENGER_H
-
-#include "Messenger.h"
-
-class SimplePolicyMessenger : public Messenger
-{
-private:
-  /// lock protecting policy
-  Mutex policy_lock;
-  /// the default Policy we use for Pipes
-  Policy default_policy;
-  /// map specifying different Policies for specific peer types
-  map<int, Policy> policy_map; // entity_name_t::type -> Policy
-
-public:
-
-  SimplePolicyMessenger(CephContext *cct, entity_name_t name,
-			string mname, uint64_t _nonce)
-    : Messenger(cct, name),
-      policy_lock("SimplePolicyMessenger::policy_lock")
-    {
-    }
-
-    /**
-   * Get the Policy associated with a type of peer.
-   * @param t The peer type to get the default policy for.
-   *
-   * @return A const Policy reference.
-   */
-  virtual Policy get_policy(int t) {
-    Mutex::Locker l(policy_lock);
-    map<int, Policy>::iterator iter =
-      policy_map.find(t);
-    if (iter != policy_map.end())
-      return iter->second;
-    else
-      return default_policy;
-  }
-
-  virtual Policy get_default_policy() {
-    Mutex::Locker l(policy_lock);
-    return default_policy;
-  }
-
-  /**
-   * Set a policy which is applied to all peers who do not have a type-specific
-   * Policy.
-   * This is an init-time function and cannot be called after calling
-   * start() or bind().
-   *
-   * @param p The Policy to apply.
-   */
-  virtual void set_default_policy(Policy p) {
-    Mutex::Locker l(policy_lock);
-    default_policy = p;
-  }
-  /**
-   * Set a policy which is applied to all peers of the given type.
-   * This is an init-time function and cannot be called after calling
-   * start() or bind().
-   *
-   * @param type The peer type this policy applies to.
-   * @param p The policy to apply.
-   */
-  virtual void set_policy(int type, Policy p) {
-    Mutex::Locker l(policy_lock);
-    policy_map[type] = p;
-  }
-
-  /**
-   * Set a Throttler which is applied to all Messages from the given
-   * type of peer.
-   * This is an init-time function and cannot be called after calling
-   * start() or bind().
-   *
-   * @param type The peer type this Throttler will apply to.
-   * @param t The Throttler to apply. SimpleMessenger does not take
-   * ownership of this pointer, but you must not destroy it before
-   * you destroy SimpleMessenger.
-   */
-  void set_policy_throttlers(int type,
-			     Throttle *byte_throttle,
-			     Throttle *msg_throttle) {
-    Mutex::Locker l(policy_lock);
-    map<int, Policy>::iterator iter =
-      policy_map.find(type);
-    if (iter != policy_map.end()) {
-      iter->second.throttler_bytes = byte_throttle;
-      iter->second.throttler_messages = msg_throttle;
-    } else {
-      default_policy.throttler_bytes = byte_throttle;
-      default_policy.throttler_messages = msg_throttle;
-    }
-  }
-
-}; /* SimplePolicyMessenger */
-
-#endif /* SIMPLE_POLICY_MESSENGER_H */
diff --git a/src/msg/msg_types.h b/src/msg/msg_types.h
index 9c0f266..5d86b3a 100644
--- a/src/msg/msg_types.h
+++ b/src/msg/msg_types.h
@@ -26,6 +26,13 @@ namespace ceph {
   class Formatter;
 }
 
+inline bool operator==(const sockaddr_in& a, const sockaddr_in& b) {
+  return strncmp((const char*)&a, (const char*)&b, sizeof(a)) == 0;
+}
+inline bool operator!=(const sockaddr_in& a, const sockaddr_in& b) {
+  return strncmp((const char*)&a, (const char*)&b, sizeof(a)) != 0;
+}
+
 extern ostream& operator<<(ostream& out, const sockaddr_storage &ss);
 
 class entity_name_t {
diff --git a/src/ocf/Makefile.in b/src/ocf/Makefile.in
index d8b1358..4f243be 100644
--- a/src/ocf/Makefile.in
+++ b/src/ocf/Makefile.in
@@ -48,7 +48,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
 	$(top_srcdir)/m4/ax_c_pretty_func.m4 \
 	$(top_srcdir)/m4/ax_c_var_func.m4 \
 	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
-	$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
 	$(top_srcdir)/m4/ax_cxx_static_cast.m4 \
 	$(top_srcdir)/m4/ax_intel.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -108,7 +107,6 @@ AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@
 CC = @CC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
@@ -141,7 +139,6 @@ FGREP = @FGREP@
 GCOV_PREFIX_STRIP = @GCOV_PREFIX_STRIP@
 GIT_CHECK = @GIT_CHECK@
 GREP = @GREP@
-HAVE_CXX11 = @HAVE_CXX11@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -166,8 +163,6 @@ LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
 LIBEDIT_LIBS = @LIBEDIT_LIBS@
 LIBFUSE = @LIBFUSE@
 LIBOBJS = @LIBOBJS@
-LIBROCKSDB_CFLAGS = @LIBROCKSDB_CFLAGS@
-LIBROCKSDB_LIBS = @LIBROCKSDB_LIBS@
 LIBS = @LIBS@
 LIBTCMALLOC = @LIBTCMALLOC@
 LIBTOOL = @LIBTOOL@
@@ -176,8 +171,6 @@ LIBZFS_LIBS = @LIBZFS_LIBS@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LTTNG_GEN_TP_CHECK = @LTTNG_GEN_TP_CHECK@
-LTTNG_GEN_TP_PROG = @LTTNG_GEN_TP_PROG@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
diff --git a/src/os/BtrfsFileStoreBackend.cc b/src/os/BtrfsFileStoreBackend.cc
index 356084b..bb11a45 100644
--- a/src/os/BtrfsFileStoreBackend.cc
+++ b/src/os/BtrfsFileStoreBackend.cc
@@ -70,7 +70,8 @@ int BtrfsFileStoreBackend::detect_features()
   if (m_filestore_btrfs_clone_range) {
     int fd = ::openat(get_basedir_fd(), "clone_range_test", O_CREAT|O_WRONLY, 0600);
     if (fd >= 0) {
-      if (::unlinkat(get_basedir_fd(), "clone_range_test", 0) < 0) {
+      ::unlinkat(get_basedir_fd(), "clone_range_test", 0);
+      if (fd < 0) {
 	r = -errno;
 	dout(0) << "detect_feature: failed to unlink test file for CLONE_RANGE ioctl: "
 		<< cpp_strerror(r) << dendl;
diff --git a/src/os/BtrfsFileStoreBackend.h b/src/os/BtrfsFileStoreBackend.h
index 9bc878f..f63a2a8 100644
--- a/src/os/BtrfsFileStoreBackend.h
+++ b/src/os/BtrfsFileStoreBackend.h
@@ -30,10 +30,7 @@ private:
   bool m_filestore_btrfs_snap;
 public:
   BtrfsFileStoreBackend(FileStore *fs);
-  ~BtrfsFileStoreBackend() {}
-  const char *get_name() {
-    return "btrfs";
-  }
+  ~BtrfsFileStoreBackend() {};
   int detect_features();
   bool can_checkpoint();
   int create_current();
diff --git a/src/os/CollectionIndex.h b/src/os/CollectionIndex.h
index cf808c3..529db01 100644
--- a/src/os/CollectionIndex.h
+++ b/src/os/CollectionIndex.h
@@ -21,7 +21,6 @@
 
 #include "osd/osd_types.h"
 #include "include/object.h"
-#include "common/RWLock.h"
 
 /**
  * CollectionIndex provides an interface for manipulating indexed collections
@@ -44,14 +43,14 @@ protected:
     /// Returned path
     string full_path;
     /// Ref to parent Index
-    CollectionIndex* parent_ref;
+    ceph::shared_ptr<CollectionIndex> parent_ref;
     /// coll_t for parent Index
     coll_t parent_coll;
 
     /// Normal Constructor
     Path(
       string path,                              ///< [in] Path to return.
-      CollectionIndex* ref)  
+      ceph::weak_ptr<CollectionIndex> ref)  ///< [in] weak_ptr to parent.
       : full_path(path), parent_ref(ref), parent_coll(parent_ref->coll()) {}
 
     /// Debugging Constructor
@@ -67,14 +66,11 @@ protected:
     coll_t coll() const { return parent_coll; }
 
     /// Getter for parent
-    CollectionIndex* get_index() const {
+    ceph::shared_ptr<CollectionIndex> get_index() const {
       return parent_ref;
     }
   };
  public:
-
-  string access_lock_name;
-  RWLock access_lock;
   /// Type of returned paths
   typedef ceph::shared_ptr<Path> IndexedPath;
 
@@ -98,6 +94,12 @@ protected:
    */
   virtual coll_t coll() const = 0;
 
+  /** 
+   * For setting the internal weak_ptr to a shared_ptr to this.
+   *
+   * @see IndexManager
+   */
+  virtual void set_ref(ceph::shared_ptr<CollectionIndex> ref) = 0;
 
   /** 
    * Initializes the index.
@@ -159,7 +161,7 @@ protected:
   virtual int split(
     uint32_t match,                             //< [in] value to match
     uint32_t bits,                              //< [in] bits to check
-    CollectionIndex* dest  //< [in] destination index
+    ceph::shared_ptr<CollectionIndex> dest  //< [in] destination index
     ) { assert(0); return 0; }
 
 
@@ -181,22 +183,6 @@ protected:
   /// Call prior to removing directory
   virtual int prep_delete() { return 0; }
 
-  CollectionIndex(coll_t collection):
-    access_lock_name ("CollectionIndex::access_lock::" + collection.to_str()), 
-    access_lock(access_lock_name.c_str()) {}
-
-  /*
-   * Pre-hash the collection, this collection should map to a PG folder.
-   *
-   * @param pg_num            - pg number of the pool this collection belongs to.
-   * @param expected_num_objs - expected number of objects in this collection.
-   * @Return 0 on success, an error code otherwise.
-   */
-  virtual int pre_hash_collection(
-      uint32_t pg_num,            ///< [in] pg number of the pool this collection belongs to
-      uint64_t expected_num_objs  ///< [in] expected number of objects this collection has
-      ) { assert(0); return 0; }
-
   /// Virtual destructor
   virtual ~CollectionIndex() {}
 };
diff --git a/src/os/DBObjectMap.cc b/src/os/DBObjectMap.cc
index c5a5b69..5d2a2e6 100644
--- a/src/os/DBObjectMap.cc
+++ b/src/os/DBObjectMap.cc
@@ -157,7 +157,7 @@ string DBObjectMap::ghobject_key(const ghobject_t &oid)
   snprintf(t, end - t, ".%.*X", (int)(sizeof(oid.hobj.hash)*2), oid.hobj.hash);
 
   if (oid.generation != ghobject_t::NO_GEN ||
-      oid.shard_id != shard_id_t::NO_SHARD) {
+      oid.shard_id != ghobject_t::NO_SHARD) {
     t += snprintf(t, end - t, ".%llx", (long long unsigned)oid.generation);
     t += snprintf(t, end - t, ".%x", (int)oid.shard_id);
   }
@@ -319,13 +319,10 @@ int DBObjectMap::DBObjectMapIteratorImpl::init()
 ObjectMap::ObjectMapIterator DBObjectMap::get_iterator(
   const ghobject_t &oid)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return ObjectMapIterator(new EmptyIteratorImpl());
-  DBObjectMapIterator iter = _get_iterator(header);
-  iter->hlock.swap(hl);
-  return iter;
+  return _get_iterator(header);
 }
 
 int DBObjectMap::DBObjectMapIteratorImpl::seek_to_first()
@@ -510,8 +507,7 @@ int DBObjectMap::set_keys(const ghobject_t &oid,
 			  const SequencerPosition *spos)
 {
   KeyValueDB::Transaction t = db->get_transaction();
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_create_map_header(hl, oid, t);
+  Header header = lookup_create_map_header(oid, t);
   if (!header)
     return -EINVAL;
   if (check_spos(oid, header, spos))
@@ -527,8 +523,7 @@ int DBObjectMap::set_header(const ghobject_t &oid,
 			    const SequencerPosition *spos)
 {
   KeyValueDB::Transaction t = db->get_transaction();
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_create_map_header(hl, oid, t);
+  Header header = lookup_create_map_header(oid, t);
   if (!header)
     return -EINVAL;
   if (check_spos(oid, header, spos))
@@ -548,8 +543,7 @@ void DBObjectMap::_set_header(Header header, const bufferlist &bl,
 int DBObjectMap::get_header(const ghobject_t &oid,
 			    bufferlist *bl)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header) {
     return 0;
   }
@@ -584,13 +578,12 @@ int DBObjectMap::clear(const ghobject_t &oid,
 		       const SequencerPosition *spos)
 {
   KeyValueDB::Transaction t = db->get_transaction();
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   if (check_spos(oid, header, spos))
     return 0;
-  remove_map_header(hl, oid, header, t);
+  remove_map_header(oid, header, t);
   assert(header->num_children > 0);
   header->num_children--;
   int r = _clear(header, t);
@@ -705,8 +698,7 @@ int DBObjectMap::rm_keys(const ghobject_t &oid,
 			 const set<string> &to_clear,
 			 const SequencerPosition *spos)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   KeyValueDB::Transaction t = db->get_transaction();
@@ -770,7 +762,7 @@ int DBObjectMap::rm_keys(const ghobject_t &oid,
     parent->num_children--;
     _clear(parent, t);
     header->parent = 0;
-    set_map_header(hl, oid, *header, t);
+    set_map_header(oid, *header, t);
     t->rmkeys_by_prefix(complete_prefix(header));
   }
   return db->submit_transaction(t);
@@ -780,8 +772,7 @@ int DBObjectMap::clear_keys_header(const ghobject_t &oid,
 				   const SequencerPosition *spos)
 {
   KeyValueDB::Transaction t = db->get_transaction();
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   if (check_spos(oid, header, spos))
@@ -798,7 +789,7 @@ int DBObjectMap::clear_keys_header(const ghobject_t &oid,
     return iter->status();
 
   // remove current header
-  remove_map_header(hl, oid, header, t);
+  remove_map_header(oid, header, t);
   assert(header->num_children > 0);
   header->num_children--;
   int r = _clear(header, t);
@@ -807,7 +798,7 @@ int DBObjectMap::clear_keys_header(const ghobject_t &oid,
 
   // create new header
   Header newheader = generate_new_header(oid, Header());
-  set_map_header(hl, oid, *newheader, t);
+  set_map_header(oid, *newheader, t);
   if (!attrs.empty())
     t->set(xattr_prefix(newheader), attrs);
   return db->submit_transaction(t);
@@ -817,8 +808,7 @@ int DBObjectMap::get(const ghobject_t &oid,
 		     bufferlist *_header,
 		     map<string, bufferlist> *out)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   _get_header(header, _header);
@@ -834,8 +824,7 @@ int DBObjectMap::get(const ghobject_t &oid,
 int DBObjectMap::get_keys(const ghobject_t &oid,
 			  set<string> *keys)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   ObjectMapIterator iter = get_iterator(oid);
@@ -873,8 +862,7 @@ int DBObjectMap::get_values(const ghobject_t &oid,
 			    const set<string> &keys,
 			    map<string, bufferlist> *out)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   return scan(header, keys, 0, out);
@@ -884,8 +872,7 @@ int DBObjectMap::check_keys(const ghobject_t &oid,
 			    const set<string> &keys,
 			    set<string> *out)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   return scan(header, keys, out, 0);
@@ -895,8 +882,7 @@ int DBObjectMap::get_xattrs(const ghobject_t &oid,
 			    const set<string> &to_get,
 			    map<string, bufferlist> *out)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   return db->get(xattr_prefix(header), to_get, out);
@@ -905,8 +891,7 @@ int DBObjectMap::get_xattrs(const ghobject_t &oid,
 int DBObjectMap::get_all_xattrs(const ghobject_t &oid,
 				set<string> *out)
 {
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   KeyValueDB::Iterator iter = db->get_iterator(xattr_prefix(header));
@@ -922,8 +907,7 @@ int DBObjectMap::set_xattrs(const ghobject_t &oid,
 			    const SequencerPosition *spos)
 {
   KeyValueDB::Transaction t = db->get_transaction();
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_create_map_header(hl, oid, t);
+  Header header = lookup_create_map_header(oid, t);
   if (!header)
     return -EINVAL;
   if (check_spos(oid, header, spos))
@@ -937,8 +921,7 @@ int DBObjectMap::remove_xattrs(const ghobject_t &oid,
 			       const SequencerPosition *spos)
 {
   KeyValueDB::Transaction t = db->get_transaction();
-  MapHeaderLock hl(this, oid);
-  Header header = lookup_map_header(hl, oid);
+  Header header = lookup_map_header(oid);
   if (!header)
     return -ENOENT;
   if (check_spos(oid, header, spos))
@@ -954,22 +937,11 @@ int DBObjectMap::clone(const ghobject_t &oid,
   if (oid == target)
     return 0;
 
-  MapHeaderLock _l1(this, MIN(oid, target));
-  MapHeaderLock _l2(this, MAX(oid, target));
-  MapHeaderLock *lsource, *ltarget;
-  if (oid > target) {
-    lsource = &_l2;
-    ltarget= &_l1;
-  } else {
-    lsource = &_l1;
-    ltarget= &_l2;
-  }
-
   KeyValueDB::Transaction t = db->get_transaction();
   {
-    Header destination = lookup_map_header(*ltarget, target);
+    Header destination = lookup_map_header(target);
     if (destination) {
-      remove_map_header(*ltarget, target, destination, t);
+      remove_map_header(target, destination, t);
       if (check_spos(target, destination, spos))
 	return 0;
       destination->num_children--;
@@ -977,7 +949,7 @@ int DBObjectMap::clone(const ghobject_t &oid,
     }
   }
 
-  Header parent = lookup_map_header(*lsource, oid);
+  Header parent = lookup_map_header(oid);
   if (!parent)
     return db->submit_transaction(t);
 
@@ -988,8 +960,8 @@ int DBObjectMap::clone(const ghobject_t &oid,
 
   parent->num_children = 2;
   set_header(parent, t);
-  set_map_header(*lsource, oid, *source, t);
-  set_map_header(*ltarget, target, *destination, t);
+  set_map_header(oid, *source, t);
+  set_map_header(target, *destination, t);
 
   map<string, bufferlist> to_set;
   KeyValueDB::Iterator xattr_iter = db->get_iterator(xattr_prefix(parent));
@@ -1114,13 +1086,12 @@ int DBObjectMap::sync(const ghobject_t *oid,
   write_state(t);
   if (oid) {
     assert(spos);
-    MapHeaderLock hl(this, *oid);
-    Header header = lookup_map_header(hl, *oid);
+    Header header = lookup_map_header(*oid);
     if (header) {
       dout(10) << "oid: " << *oid << " setting spos to "
 	       << *spos << dendl;
       header->spos = *spos;
-      set_map_header(hl, *oid, *header, t);
+      set_map_header(*oid, *header, t);
     }
   }
   return db->submit_transaction_sync(t);
@@ -1138,41 +1109,23 @@ int DBObjectMap::write_state(KeyValueDB::Transaction _t) {
 }
 
 
-DBObjectMap::Header DBObjectMap::_lookup_map_header(
-  const MapHeaderLock &l,
-  const ghobject_t &oid)
+DBObjectMap::Header DBObjectMap::_lookup_map_header(const ghobject_t &oid)
 {
-  assert(l.get_locked() == oid);
-
-  _Header *header = new _Header();
-  {
-    Mutex::Locker l(cache_lock);
-    if (caches.lookup(oid, header)) {
-      assert(!in_use.count(header->seq));
-      in_use.insert(header->seq);
-      return Header(header, RemoveOnDelete(this));
-    }
-  }
+  while (map_header_in_use.count(oid))
+    header_cond.Wait(header_lock);
 
   map<string, bufferlist> out;
   set<string> to_get;
   to_get.insert(map_header_key(oid));
   int r = db->get(HOBJECT_TO_SEQ, to_get, &out);
-  if (r < 0 || out.empty()) {
-    delete header;
+  if (r < 0)
     return Header();
-  }
-
-  Header ret(header, RemoveOnDelete(this));
+  if (out.empty())
+    return Header();
+  
+  Header ret(new _Header(), RemoveMapHeaderOnDelete(this, oid));
   bufferlist::iterator iter = out.begin()->second.begin();
   ret->decode(iter);
-  {
-    Mutex::Locker l(cache_lock);
-    caches.add(oid, *ret);
-  }
-
-  assert(!in_use.count(header->seq));
-  in_use.insert(header->seq);
   return ret;
 }
 
@@ -1226,15 +1179,14 @@ DBObjectMap::Header DBObjectMap::lookup_parent(Header input)
 }
 
 DBObjectMap::Header DBObjectMap::lookup_create_map_header(
-  const MapHeaderLock &hl,
   const ghobject_t &oid,
   KeyValueDB::Transaction t)
 {
   Mutex::Locker l(header_lock);
-  Header header = _lookup_map_header(hl, oid);
+  Header header = _lookup_map_header(oid);
   if (!header) {
     header = _generate_new_header(oid, Header());
-    set_map_header(hl, oid, *header, t);
+    set_map_header(oid, *header, t);
   }
   return header;
 }
@@ -1259,40 +1211,26 @@ void DBObjectMap::set_header(Header header, KeyValueDB::Transaction t)
   t->set(sys_prefix(header), to_write);
 }
 
-void DBObjectMap::remove_map_header(
-  const MapHeaderLock &l,
-  const ghobject_t &oid,
-  Header header,
-  KeyValueDB::Transaction t)
+void DBObjectMap::remove_map_header(const ghobject_t &oid,
+				    Header header,
+				    KeyValueDB::Transaction t)
 {
-  assert(l.get_locked() == oid);
   dout(20) << "remove_map_header: removing " << header->seq
 	   << " oid " << oid << dendl;
   set<string> to_remove;
   to_remove.insert(map_header_key(oid));
   t->rmkeys(HOBJECT_TO_SEQ, to_remove);
-  {
-    Mutex::Locker l(cache_lock);
-    caches.clear(oid);
-  }
 }
 
-void DBObjectMap::set_map_header(
-  const MapHeaderLock &l,
-  const ghobject_t &oid, _Header header,
-  KeyValueDB::Transaction t)
+void DBObjectMap::set_map_header(const ghobject_t &oid, _Header header,
+				 KeyValueDB::Transaction t)
 {
-  assert(l.get_locked() == oid);
   dout(20) << "set_map_header: setting " << header.seq
 	   << " oid " << oid << " parent seq "
 	   << header.parent << dendl;
   map<string, bufferlist> to_set;
   header.encode(to_set[map_header_key(oid)]);
   t->set(HOBJECT_TO_SEQ, to_set);
-  {
-    Mutex::Locker l(cache_lock);
-    caches.add(oid, header);
-  }
 }
 
 bool DBObjectMap::check_spos(const ghobject_t &oid,
diff --git a/src/os/DBObjectMap.h b/src/os/DBObjectMap.h
index f20c6e8..a71c369 100644
--- a/src/os/DBObjectMap.h
+++ b/src/os/DBObjectMap.h
@@ -16,8 +16,6 @@
 #include "osd/osd_types.h"
 #include "common/Mutex.h"
 #include "common/Cond.h"
-#include "common/simple_cache.hpp"
-#include <boost/optional.hpp>
 
 /**
  * DBObjectMap: Implements ObjectMap in terms of KeyValueDB
@@ -70,52 +68,8 @@ public:
   set<uint64_t> in_use;
   set<ghobject_t> map_header_in_use;
 
-  /**
-   * Takes the map_header_in_use entry in constructor, releases in
-   * destructor
-   */
-  class MapHeaderLock {
-    DBObjectMap *db;
-    boost::optional<ghobject_t> locked;
-
-    MapHeaderLock(const MapHeaderLock &);
-    MapHeaderLock &operator=(const MapHeaderLock &);
-  public:
-    MapHeaderLock(DBObjectMap *db) : db(db) {}
-    MapHeaderLock(DBObjectMap *db, const ghobject_t &oid) : db(db), locked(oid) {
-      Mutex::Locker l(db->header_lock);
-      while (db->map_header_in_use.count(*locked))
-	db->map_header_cond.Wait(db->header_lock);
-      db->map_header_in_use.insert(*locked);
-    }
-
-    const ghobject_t &get_locked() const {
-      assert(locked);
-      return *locked;
-    }
-
-    void swap(MapHeaderLock &o) {
-      assert(db == o.db);
-
-      // centos6's boost optional doesn't seem to have swap :(
-      boost::optional<ghobject_t> _locked = o.locked;
-      o.locked = locked;
-      locked = _locked;
-    }
-
-    ~MapHeaderLock() {
-      if (locked) {
-	Mutex::Locker l(db->header_lock);
-	assert(db->map_header_in_use.count(*locked));
-	db->map_header_cond.Signal();
-	db->map_header_in_use.erase(*locked);
-      }
-    }
-  };
-
-  DBObjectMap(KeyValueDB *db) : db(db), header_lock("DBOBjectMap"),
-                                cache_lock("DBObjectMap::CacheLock"),
-                                caches(g_conf->filestore_omap_header_cache_size)
+  DBObjectMap(KeyValueDB *db) : db(db),
+				header_lock("DBOBjectMap")
     {}
 
   int set_keys(
@@ -327,8 +281,6 @@ public:
 private:
   /// Implicit lock on Header->seq
   typedef ceph::shared_ptr<_Header> Header;
-  Mutex cache_lock;
-  SimpleLRU<ghobject_t, _Header> caches;
 
   string map_header_key(const ghobject_t &oid);
   string header_key(uint64_t seq);
@@ -360,8 +312,6 @@ private:
   public:
     DBObjectMap *map;
 
-    /// NOTE: implicit lock hlock->get_locked() when returned out of the class
-    MapHeaderLock hlock;
     /// NOTE: implicit lock on header->seq AND for all ancestors
     Header header;
 
@@ -380,7 +330,7 @@ private:
     bool invalid;
 
     DBObjectMapIteratorImpl(DBObjectMap *map, Header header) :
-      map(map), hlock(map), header(header), r(0), ready(false), invalid(true) {}
+      map(map), header(header), r(0), ready(false), invalid(true) {}
     int seek_to_first();
     int seek_to_last();
     int upper_bound(const string &after);
@@ -424,17 +374,13 @@ private:
   void set_header(Header input, KeyValueDB::Transaction t);
 
   /// Remove leaf node corresponding to oid in c
-  void remove_map_header(
-    const MapHeaderLock &l,
-    const ghobject_t &oid,
-    Header header,
-    KeyValueDB::Transaction t);
+  void remove_map_header(const ghobject_t &oid,
+			 Header header,
+			 KeyValueDB::Transaction t);
 
   /// Set leaf node for c and oid to the value of header
-  void set_map_header(
-    const MapHeaderLock &l,
-    const ghobject_t &oid, _Header header,
-    KeyValueDB::Transaction t);
+  void set_map_header(const ghobject_t &oid, _Header header,
+		      KeyValueDB::Transaction t);
 
   /// Set leaf node for c and oid to the value of header
   bool check_spos(const ghobject_t &oid,
@@ -442,10 +388,8 @@ private:
 		  const SequencerPosition *spos);
 
   /// Lookup or create header for c oid
-  Header lookup_create_map_header(
-    const MapHeaderLock &l,
-    const ghobject_t &oid,
-    KeyValueDB::Transaction t);
+  Header lookup_create_map_header(const ghobject_t &oid,
+				  KeyValueDB::Transaction t);
 
   /**
    * Generate new header for c oid with new seq number
@@ -459,14 +403,10 @@ private:
   }
 
   /// Lookup leaf header for c oid
-  Header _lookup_map_header(
-    const MapHeaderLock &l,
-    const ghobject_t &oid);
-  Header lookup_map_header(
-    const MapHeaderLock &l2,
-    const ghobject_t &oid) {
+  Header _lookup_map_header(const ghobject_t &oid);
+  Header lookup_map_header(const ghobject_t &oid) {
     Mutex::Locker l(header_lock);
-    return _lookup_map_header(l2, oid);
+    return _lookup_map_header(oid);
   }
 
   /// Lookup header node for input
@@ -507,8 +447,25 @@ private:
 		   KeyValueDB::Transaction t);
 
   /** 
-   * Removes header seq lock and possibly object lock
-   * once Header is out of scope
+   * Removes map header lock once Header is out of scope
+   * @see lookup_map_header
+   */
+  class RemoveMapHeaderOnDelete {
+  public:
+    DBObjectMap *db;
+    ghobject_t oid;
+    RemoveMapHeaderOnDelete(DBObjectMap *db, const ghobject_t &oid) :
+      db(db), oid(oid) {}
+    void operator() (_Header *header) {
+      Mutex::Locker l(db->header_lock);
+      db->map_header_in_use.erase(oid);
+      db->map_header_cond.Signal();
+      delete header;
+    }
+  };
+
+  /** 
+   * Removes header seq lock once Header is out of scope
    * @see lookup_parent
    * @see generate_new_header
    */
@@ -519,7 +476,6 @@ private:
       db(db) {}
     void operator() (_Header *header) {
       Mutex::Locker l(db->header_lock);
-      assert(db->in_use.count(header->seq));
       db->in_use.erase(header->seq);
       db->header_cond.Signal();
       delete header;
diff --git a/src/os/FDCache.h b/src/os/FDCache.h
index 9e77873..ba11e12 100644
--- a/src/os/FDCache.h
+++ b/src/os/FDCache.h
@@ -23,7 +23,6 @@
 #include "common/Cond.h"
 #include "common/shared_cache.hpp"
 #include "include/compat.h"
-#include "include/intarith.h"
 
 /**
  * FD Cache
@@ -50,42 +49,32 @@ public:
   };
 
 private:
+  SharedLRU<ghobject_t, FD> registry;
   CephContext *cct;
-  const int registry_shards;
-  SharedLRU<ghobject_t, FD> *registry;
 
 public:
-  FDCache(CephContext *cct) : cct(cct),
-  registry_shards(cct->_conf->filestore_fd_cache_shards) {
+  FDCache(CephContext *cct) : cct(cct) {
     assert(cct);
     cct->_conf->add_observer(this);
-    registry = new SharedLRU<ghobject_t, FD>[registry_shards];
-    for (int i = 0; i < registry_shards; ++i) {
-      registry[i].set_cct(cct);
-      registry[i].set_size(
-          MAX((cct->_conf->filestore_fd_cache_size / registry_shards), 1));
-    }
+    registry.set_size(cct->_conf->filestore_fd_cache_size);
   }
   ~FDCache() {
     cct->_conf->remove_observer(this);
-    delete[] registry;
   }
   typedef ceph::shared_ptr<FD> FDRef;
 
   FDRef lookup(const ghobject_t &hoid) {
-    int registry_id = hoid.hobj.hash % registry_shards;
-    return registry[registry_id].lookup(hoid);
+    return registry.lookup(hoid);
   }
 
-  FDRef add(const ghobject_t &hoid, int fd, bool *existed) {
-    int registry_id = hoid.hobj.hash % registry_shards;
-    return registry[registry_id].add(hoid, new FD(fd), existed);
+  FDRef add(const ghobject_t &hoid, int fd) {
+    return registry.add(hoid, new FD(fd));
   }
 
   /// clear cached fd for hoid, subsequent lookups will get an empty FD
   void clear(const ghobject_t &hoid) {
-    int registry_id = hoid.hobj.hash % registry_shards;
-    registry[registry_id].purge(hoid);
+    registry.clear(hoid);
+    assert(!registry.lookup(hoid));
   }
 
   /// md_config_obs_t
@@ -99,9 +88,7 @@ public:
   void handle_conf_change(const md_config_t *conf,
 			  const std::set<std::string> &changed) {
     if (changed.count("filestore_fd_cache_size")) {
-      for (int i = 0; i < registry_shards; ++i)
-        registry[i].set_size(
-              MAX((conf->filestore_fd_cache_size / registry_shards), 1));
+      registry.set_size(conf->filestore_fd_cache_size);
     }
   }
 
diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc
index d6ddc7f..5eab7b5 100644
--- a/src/os/FileJournal.cc
+++ b/src/os/FileJournal.cc
@@ -1367,7 +1367,7 @@ void FileJournal::write_finish_thread_entry()
 	aio_info *ai = (aio_info *)event[i].obj;
 	if (event[i].res != ai->len) {
 	  derr << "aio to " << ai->off << "~" << ai->len
-	       << " got " << cpp_strerror(event[i].res) << dendl;
+	       << " wrote " << event[i].res << dendl;
 	  assert(0 == "unexpected aio error");
 	}
 	dout(10) << "write_finish_thread_entry aio " << ai->off
diff --git a/src/os/FileJournal.h b/src/os/FileJournal.h
index 1920401..dbb1181 100644
--- a/src/os/FileJournal.h
+++ b/src/os/FileJournal.h
@@ -221,6 +221,7 @@ private:
 
   off64_t max_size;
   size_t block_size;
+  bool is_bdev;
   bool directio, aio, force_aio;
   bool must_write_header;
   off64_t write_pos;      // byte where the next entry to be written will go
@@ -361,7 +362,7 @@ private:
     fn(f),
     zero_buf(NULL),
     max_size(0), block_size(0),
-    directio(dio), aio(ai), force_aio(faio),
+    is_bdev(false), directio(dio), aio(ai), force_aio(faio),
     must_write_header(false),
     write_pos(0), read_pos(0),
 #ifdef HAVE_LIBAIO
@@ -405,7 +406,7 @@ private:
   void commit_start(uint64_t seq);
   void committed_thru(uint64_t seq);
   bool should_commit_now() {
-    return full_state != FULL_NOTFULL && !write_stop;
+    return full_state != FULL_NOTFULL;
   }
 
   void set_wait_on_full(bool b) { wait_on_full = b; }
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 1bb4de9..1b3dd5e 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -68,7 +68,7 @@
 #include "common/fd.h"
 #include "HashIndex.h"
 #include "DBObjectMap.h"
-#include "KeyValueDB.h"
+#include "LevelDBStore.h"
 
 #include "common/ceph_crypto.h"
 using ceph::crypto::SHA1;
@@ -77,10 +77,6 @@ using ceph::crypto::SHA1;
 
 #include "common/config.h"
 
-#ifdef WITH_LTTNG
-#include "tracing/objectstore.h"
-#endif
-
 #define dout_subsys ceph_subsys_filestore
 #undef dout_prefix
 #define dout_prefix *_dout << "filestore(" << basedir << ") "
@@ -151,7 +147,9 @@ int FileStore::get_cdir(coll_t cid, char *s, int len)
 
 int FileStore::get_index(coll_t cid, Index *index)
 {
-  int r = index_manager.get_index(cid, basedir, index);
+  char path[PATH_MAX];
+  get_cdir(cid, path, sizeof(path));
+  int r = index_manager.get_index(cid, path, index);
   assert(!m_filestore_fail_eio || r != -EIO);
   return r;
 }
@@ -165,14 +163,15 @@ int FileStore::init_index(coll_t cid)
   return r;
 }
 
-int FileStore::lfn_find(const ghobject_t& oid, const Index& index, IndexedPath *path)
+int FileStore::lfn_find(coll_t cid, const ghobject_t& oid, IndexedPath *path)
 {
-  IndexedPath path2;
-  if (!path)
-    path = &path2;
+  Index index; 
   int r, exist;
-  assert(NULL != index.index);
-  r = (index.index)->lookup(oid, path, &exist);
+  r = get_index(cid, &index);
+  if (r < 0)
+    return r;
+
+  r = index->lookup(oid, path, &exist);
   if (r < 0) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return r;
@@ -184,8 +183,9 @@ int FileStore::lfn_find(const ghobject_t& oid, const Index& index, IndexedPath *
 
 int FileStore::lfn_truncate(coll_t cid, const ghobject_t& oid, off_t length)
 {
+  IndexedPath path;
   FDRef fd;
-  int r = lfn_open(cid, oid, false, &fd);
+  int r = lfn_open(cid, oid, false, &fd, &path);
   if (r < 0)
     return r;
   r = ::ftruncate(**fd, length);
@@ -202,15 +202,7 @@ int FileStore::lfn_truncate(coll_t cid, const ghobject_t& oid, off_t length)
 int FileStore::lfn_stat(coll_t cid, const ghobject_t& oid, struct stat *buf)
 {
   IndexedPath path;
-  Index index;
-  int r = get_index(cid, &index);
-  if (r < 0)
-    return r;
-
-  assert(NULL != index.index);
-  RWLock::RLocker l((index.index)->access_lock);
-
-  r = lfn_find(oid, index, &path);
+  int r = lfn_find(cid, oid, &path);
   if (r < 0)
     return r;
   r = ::stat(path->path(), buf);
@@ -223,107 +215,92 @@ int FileStore::lfn_open(coll_t cid,
 			const ghobject_t& oid,
 			bool create,
 			FDRef *outfd,
-                        Index *index)
+			IndexedPath *path,
+			Index *index) 
 {
   assert(get_allow_sharded_objects() ||
-	 ( oid.shard_id == shard_id_t::NO_SHARD &&
+	 ( oid.shard_id == ghobject_t::NO_SHARD &&
 	   oid.generation == ghobject_t::NO_GEN ));
   assert(outfd);
-  int r = 0;
-  bool need_lock = true;
   int flags = O_RDWR;
-
   if (create)
     flags |= O_CREAT;
-
   Index index2;
   if (!index) {
     index = &index2;
   }
-  if (!((*index).index)) {
+  int r = 0;
+  if (!(*index)) {
     r = get_index(cid, index);
-  } else {
-    need_lock = false;
   }
 
   int fd, exist;
-  assert(NULL != (*index).index);
-  if (need_lock) {
-    ((*index).index)->access_lock.get_write();
-  }
   if (!replaying) {
+    Mutex::Locker l(fdcache_lock);
     *outfd = fdcache.lookup(oid);
-    if (*outfd) {
-      if (need_lock) {
-        ((*index).index)->access_lock.put_write();
-      }
+    if (*outfd)
       return 0;
-    }
-  }
-
-
-  IndexedPath path2;
-  IndexedPath *path = &path2;
-  if (r < 0) {
-    derr << "error getting collection index for " << cid
-      << ": " << cpp_strerror(-r) << dendl;
-    goto fail;
-  }
-  r = (*index)->lookup(oid, path, &exist);
-  if (r < 0) {
-    derr << "could not find " << oid << " in index: "
-      << cpp_strerror(-r) << dendl;
-    goto fail;
   }
 
-  r = ::open((*path)->path(), flags, 0644);
-  if (r < 0) {
-    r = -errno;
-    dout(10) << "error opening file " << (*path)->path() << " with flags="
-      << flags << ": " << cpp_strerror(-r) << dendl;
-    goto fail;
-  }
-  fd = r;
-  if (create && (!exist)) {
-    r = (*index)->created(oid, (*path)->path());
+  {
+    IndexedPath path2;
+    if (!path)
+      path = &path2;
     if (r < 0) {
-      VOID_TEMP_FAILURE_RETRY(::close(fd));
-      derr << "error creating " << oid << " (" << (*path)->path()
-          << ") in index: " << cpp_strerror(-r) << dendl;
+      derr << "error getting collection index for " << cid
+	   << ": " << cpp_strerror(-r) << dendl;
       goto fail;
     }
-    r = chain_fsetxattr(fd, XATTR_SPILL_OUT_NAME,
-                        XATTR_NO_SPILL_OUT, sizeof(XATTR_NO_SPILL_OUT));
+    r = (*index)->lookup(oid, path, &exist);
     if (r < 0) {
-      VOID_TEMP_FAILURE_RETRY(::close(fd));
-      derr << "error setting spillout xattr for oid " << oid << " (" << (*path)->path()
-                     << "):" << cpp_strerror(-r) << dendl;
+      derr << "could not find " << oid << " in index: "
+	   << cpp_strerror(-r) << dendl;
       goto fail;
     }
+
+    r = ::open((*path)->path(), flags, 0644);
+    if (r < 0) {
+      r = -errno;
+      dout(10) << "error opening file " << (*path)->path() << " with flags="
+	       << flags << ": " << cpp_strerror(-r) << dendl;
+      goto fail;
+    }
+    fd = r;
+
+    if (create && (!exist)) {
+      r = (*index)->created(oid, (*path)->path());
+      if (r < 0) {
+	VOID_TEMP_FAILURE_RETRY(::close(fd));
+	derr << "error creating " << oid << " (" << (*path)->path()
+	     << ") in index: " << cpp_strerror(-r) << dendl;
+	goto fail;
+      }
+      r = chain_fsetxattr(fd, XATTR_SPILL_OUT_NAME,
+                          XATTR_NO_SPILL_OUT, sizeof(XATTR_NO_SPILL_OUT));
+      if (r < 0) {
+        VOID_TEMP_FAILURE_RETRY(::close(fd));
+        derr << "error setting spillout xattr for oid " << oid << " (" << (*path)->path()
+                       << "):" << cpp_strerror(-r) << dendl;
+        goto fail;
+      }
+    }
   }
 
   if (!replaying) {
-    bool existed;
-    *outfd = fdcache.add(oid, fd, &existed);
-    if (existed) {
-      TEMP_FAILURE_RETRY(::close(fd));
+    Mutex::Locker l(fdcache_lock);
+    *outfd = fdcache.lookup(oid);
+    if (*outfd) {
+      VOID_TEMP_FAILURE_RETRY(::close(fd));
+      return 0;
+    } else {
+      *outfd = fdcache.add(oid, fd);
     }
   } else {
     *outfd = FDRef(new FDCache::FD(fd));
   }
-
-  if (need_lock) {
-    ((*index).index)->access_lock.put_write();
-  }
-
   return 0;
 
  fail:
-
-  if (need_lock) {
-    ((*index).index)->access_lock.put_write();
-  }
-
   assert(!m_filestore_fail_eio || r != -EIO);
   return r;
 }
@@ -338,7 +315,6 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob
   IndexedPath path_new, path_old;
   int exist;
   int r;
-  bool index_same = false;
   if (c < newcid) {
     r = get_index(newcid, &index_new);
     if (r < 0)
@@ -351,7 +327,6 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob
     if (r < 0)
       return r;
     index_new = index_old;
-    index_same = true;
   } else {
     r = get_index(c, &index_old);
     if (r < 0)
@@ -361,73 +336,33 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob
       return r;
   }
 
-  assert(NULL != index_old.index);
-  assert(NULL != index_new.index);
-
-  if (!index_same) {
-
-    RWLock::RLocker l1((index_old.index)->access_lock);
-
-    r = index_old->lookup(o, &path_old, &exist);
-    if (r < 0) {
-      assert(!m_filestore_fail_eio || r != -EIO);
-      return r;
-    }
-    if (!exist)
-      return -ENOENT;
-  
-    RWLock::WLocker l2((index_new.index)->access_lock);
-
-    r = index_new->lookup(newoid, &path_new, &exist);
-    if (r < 0) {
-      assert(!m_filestore_fail_eio || r != -EIO);
-      return r;
-    }
-    if (exist)
-      return -EEXIST;
-
-    dout(25) << "lfn_link path_old: " << path_old << dendl;
-    dout(25) << "lfn_link path_new: " << path_new << dendl;
-    r = ::link(path_old->path(), path_new->path());
-    if (r < 0)
-      return -errno;
-
-    r = index_new->created(newoid, path_new->path());
-    if (r < 0) {
-      assert(!m_filestore_fail_eio || r != -EIO);
-      return r;
-    }
-  } else {
-    RWLock::WLocker l1((index_old.index)->access_lock);
-
-    r = index_old->lookup(o, &path_old, &exist);
-    if (r < 0) {
-      assert(!m_filestore_fail_eio || r != -EIO);
-      return r;
-    }
-    if (!exist)
-      return -ENOENT;
+  r = index_old->lookup(o, &path_old, &exist);
+  if (r < 0) {
+    assert(!m_filestore_fail_eio || r != -EIO);
+    return r;
+  }
+  if (!exist)
+    return -ENOENT;
 
-    r = index_new->lookup(newoid, &path_new, &exist);
-    if (r < 0) {
-      assert(!m_filestore_fail_eio || r != -EIO);
-      return r;
-    }
-    if (exist)
-      return -EEXIST;
+  r = index_new->lookup(newoid, &path_new, &exist);
+  if (r < 0) {
+    assert(!m_filestore_fail_eio || r != -EIO);
+    return r;
+  }
+  if (exist)
+    return -EEXIST;
 
-    dout(25) << "lfn_link path_old: " << path_old << dendl;
-    dout(25) << "lfn_link path_new: " << path_new << dendl;
-    r = ::link(path_old->path(), path_new->path());
-    if (r < 0)
-      return -errno;
+  dout(25) << "lfn_link path_old: " << path_old << dendl;
+  dout(25) << "lfn_link path_new: " << path_new << dendl;
+  r = ::link(path_old->path(), path_new->path());
+  if (r < 0)
+    return -errno;
 
-    r = index_new->created(newoid, path_new->path());
-    if (r < 0) {
-      assert(!m_filestore_fail_eio || r != -EIO);
-      return r;
-    }
-  }    
+  r = index_new->created(newoid, path_new->path());
+  if (r < 0) {
+    assert(!m_filestore_fail_eio || r != -EIO);
+    return r;
+  }
   return 0;
 }
 
@@ -439,10 +374,7 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
   int r = get_index(cid, &index);
   if (r < 0)
     return r;
-
-  assert(NULL != index.index);
-  RWLock::WLocker l((index.index)->access_lock);
-
+  Mutex::Locker l(fdcache_lock);
   {
     IndexedPath path;
     int exist;
@@ -457,16 +389,11 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
       r = ::stat(path->path(), &st);
       if (r < 0) {
 	r = -errno;
-	if (r == -ENOENT) {
-	  wbthrottle.clear_object(o); // should be only non-cache ref
-	  fdcache.clear(o);
-	} else {
-	  assert(!m_filestore_fail_eio || r != -EIO);
-	}
+	assert(!m_filestore_fail_eio || r != -EIO);
 	return r;
-      } else if (st.st_nlink == 1) {
-	force_clear_omap = true;
       }
+      if (st.st_nlink == 1)
+	force_clear_omap = true;
     }
     if (force_clear_omap) {
       dout(20) << __func__ << ": clearing omap on " << o
@@ -492,15 +419,14 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
   return index->unlink(o);
 }
 
-FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbits_t flags, const char *name, bool do_update) :
+FileStore::FileStore(const std::string &base, const std::string &jdev, const char *name, bool do_update) :
   JournalingObjectStore(base),
   internal_name(name),
   basedir(base), journalpath(jdev),
-  generic_flags(flags),
   blk_size(0),
   fsid_fd(-1), op_fd(-1),
   basedir_fd(-1), current_fd(-1),
-  backend(NULL),
+  generic_backend(NULL), backend(NULL),
   index_manager(do_update),
   ondisk_finisher(g_ceph_context),
   lock("FileStore::lock"),
@@ -508,6 +434,7 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit
   sync_entry_timeo_lock("sync_entry_timeo_lock"),
   timer(g_ceph_context, sync_entry_timeo_lock),
   stop(false), sync_thread(this),
+  fdcache_lock("fdcache_lock"),
   fdcache(g_ceph_context),
   wbthrottle(g_ceph_context),
   default_osr("default"),
@@ -543,7 +470,7 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit
   m_filestore_sloppy_crc(g_conf->filestore_sloppy_crc),
   m_filestore_sloppy_crc_block_size(g_conf->filestore_sloppy_crc_block_size),
   m_filestore_max_alloc_hint_size(g_conf->filestore_max_alloc_hint_size),
-  m_fs_type(0),
+  m_fs_type(FS_TYPE_NONE),
   m_filestore_max_inline_xattr_size(0),
   m_filestore_max_inline_xattrs(0)
 {
@@ -593,6 +520,9 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit
   g_ceph_context->get_perfcounters_collection()->add(logger);
   g_ceph_context->_conf->add_observer(this);
 
+  generic_backend = new GenericFileStoreBackend(this);
+  backend = generic_backend;
+
   superblock.compat_features = get_fs_initial_compat_set();
 }
 
@@ -601,6 +531,8 @@ FileStore::~FileStore()
   g_ceph_context->_conf->remove_observer(this);
   g_ceph_context->get_perfcounters_collection()->remove(logger);
 
+  delete generic_backend;
+
   if (journal)
     journal->logger = NULL;
   delete logger;
@@ -624,14 +556,6 @@ bool parse_attrname(char **name)
   return false;
 }
 
-void FileStore::collect_metadata(map<string,string> *pm)
-{
-  (*pm)["filestore_backend"] = backend->get_name();
-  ostringstream ss;
-  ss << "0x" << std::hex << m_fs_type << std::dec;
-  (*pm)["filestore_f_type"] = ss.str();
-}
-
 int FileStore::statfs(struct statfs *buf)
 {
   if (::statfs(basedir.c_str(), buf) < 0) {
@@ -668,58 +592,6 @@ int FileStore::dump_journal(ostream& out)
   return r;
 }
 
-FileStoreBackend *FileStoreBackend::create(long f_type, FileStore *fs)
-{
-  switch (f_type) {
-#if defined(__linux__)
-  case BTRFS_SUPER_MAGIC:
-    return new BtrfsFileStoreBackend(fs);
-# ifdef HAVE_LIBXFS
-  case XFS_SUPER_MAGIC:
-    return new XfsFileStoreBackend(fs);
-# endif
-#endif
-#ifdef HAVE_LIBZFS
-  case ZFS_SUPER_MAGIC:
-    return new ZFSFileStoreBackend(fs);
-#endif
-  default:
-    return new GenericFileStoreBackend(fs);
-  }
-}
-
-void FileStore::create_backend(long f_type)
-{
-  m_fs_type = f_type;
-
-  assert(backend == NULL);
-  backend = FileStoreBackend::create(f_type, this);
-
-  dout(0) << "backend " << backend->get_name()
-	  << " (magic 0x" << std::hex << f_type << std::dec << ")"
-	  << dendl;
-
-  switch (f_type) {
-#if defined(__linux__)
-  case BTRFS_SUPER_MAGIC:
-    wbthrottle.set_fs(WBThrottle::BTRFS);
-    break;
-
-  case XFS_SUPER_MAGIC:
-    // wbthrottle is constructed with fs(WBThrottle::XFS)
-    if (m_filestore_replica_fadvise) {
-      dout(1) << " disabling 'filestore replica fadvise' due to known issues with fadvise(DONTNEED) on xfs" << dendl;
-      g_conf->set_val("filestore_replica_fadvise", "false");
-      g_conf->apply_changes(NULL);
-      assert(m_filestore_replica_fadvise == false);
-    }
-    break;
-#endif
-  }
-
-  set_xattr_limits_via_conf();
-}
-
 int FileStore::mkfs()
 {
   int ret = 0;
@@ -797,8 +669,6 @@ int FileStore::mkfs()
     goto close_fsid_fd;
   }
 
-  // superblock
-  superblock.omap_backend = g_conf->filestore_omap_backend;
   ret = write_superblock();
   if (ret < 0) {
     derr << "mkfs: write_superblock() failed: "
@@ -815,7 +685,19 @@ int FileStore::mkfs()
     goto close_fsid_fd;
   }
 
-  create_backend(basefs.f_type);
+  if (basefs.f_type == BTRFS_SUPER_MAGIC) {
+#if defined(__linux__)
+    backend = new BtrfsFileStoreBackend(this);
+#endif
+  } else if (basefs.f_type == XFS_SUPER_MAGIC) {
+#ifdef HAVE_LIBXFS
+    backend = new XfsFileStoreBackend(this);
+#endif
+  } else if (basefs.f_type == ZFS_SUPER_MAGIC) {
+#ifdef HAVE_LIBZFS
+    backend = new ZFSFileStoreBackend(this);
+#endif
+  }
 
   ret = backend->create_current();
   if (ret < 0) {
@@ -858,13 +740,21 @@ int FileStore::mkfs()
     }
     VOID_TEMP_FAILURE_RETRY(::close(fd));  
   }
-  ret = KeyValueDB::test_init(superblock.omap_backend, omap_dir);
-  if (ret < 0) {
-    derr << "mkfs failed to create " << g_conf->filestore_omap_backend << dendl;
-    ret = -1;
-    goto close_fsid_fd;
+
+  {
+    leveldb::Options options;
+    options.create_if_missing = true;
+    leveldb::DB *db;
+    leveldb::Status status = leveldb::DB::Open(options, omap_dir, &db);
+    if (status.ok()) {
+      delete db;
+      dout(1) << "leveldb db exists/created" << dendl;
+    } else {
+      derr << "mkfs failed to create leveldb: " << status.ToString() << dendl;
+      ret = -1;
+      goto close_fsid_fd;
+    }
   }
-  dout(1) << g_conf->filestore_omap_backend << " db exists/created" << dendl;
 
   // journal?
   ret = mkjournal();
@@ -879,8 +769,10 @@ int FileStore::mkfs()
   fsid_fd = -1;
  close_basedir_fd:
   VOID_TEMP_FAILURE_RETRY(::close(basedir_fd));
-  delete backend;
-  backend = NULL;
+  if (backend != generic_backend) {
+    delete backend;
+    backend = generic_backend;
+  }
   return ret;
 }
 
@@ -987,7 +879,40 @@ int FileStore::_detect_fs()
 
   blk_size = st.f_bsize;
 
-  create_backend(st.f_type);
+  m_fs_type = FS_TYPE_OTHER;
+  if (st.f_type == BTRFS_SUPER_MAGIC) {
+#if defined(__linux__)
+    dout(0) << "mount detected btrfs" << dendl;
+    backend = new BtrfsFileStoreBackend(this);
+    m_fs_type = FS_TYPE_BTRFS;
+
+    wbthrottle.set_fs(WBThrottle::BTRFS);
+#endif
+  } else if (st.f_type == XFS_SUPER_MAGIC) {
+#ifdef HAVE_LIBXFS
+    dout(0) << "mount detected xfs (libxfs)" << dendl;
+    backend = new XfsFileStoreBackend(this);
+#else
+    dout(0) << "mount detected xfs" << dendl;
+#endif
+    m_fs_type = FS_TYPE_XFS;
+
+    // wbthrottle is constructed with fs(WBThrottle::XFS)
+    if (m_filestore_replica_fadvise) {
+      dout(1) << " disabling 'filestore replica fadvise' due to known issues with fadvise(DONTNEED) on xfs" << dendl;
+      g_conf->set_val("filestore_replica_fadvise", "false");
+      g_conf->apply_changes(NULL);
+      assert(m_filestore_replica_fadvise == false);
+    }
+  } else if (st.f_type == ZFS_SUPER_MAGIC) {
+#ifdef HAVE_LIBZFS
+    dout(0) << "mount detected zfs (libzfs)" << dendl;
+    backend = new ZFSFileStoreBackend(this);
+    m_fs_type = FS_TYPE_ZFS;
+#endif
+  }
+
+  set_xattr_limits_via_conf();
 
   r = backend->detect_features();
   if (r < 0) {
@@ -1197,7 +1122,7 @@ int FileStore::write_op_seq(int fd, uint64_t seq)
   return ret;
 }
 
-int FileStore::mount()
+int FileStore::mount() 
 {
   int ret;
   char buf[PATH_MAX];
@@ -1425,28 +1350,41 @@ int FileStore::mount()
     ::unlink(nosnapfn);
   }
 
-  if (!(generic_flags & SKIP_MOUNT_OMAP)) {
-    KeyValueDB * omap_store = KeyValueDB::create(g_ceph_context,
-						 superblock.omap_backend,
-						 omap_dir);
-    if (omap_store == NULL)
-    {
-      derr << "Error creating " << superblock.omap_backend << dendl;
-      ret = -1;
-      goto close_current_fd;
-    }
+  {
+    LevelDBStore *omap_store = new LevelDBStore(g_ceph_context, omap_dir);
 
     omap_store->init();
+    if (g_conf->osd_leveldb_write_buffer_size)
+      omap_store->options.write_buffer_size = g_conf->osd_leveldb_write_buffer_size;
+    if (g_conf->osd_leveldb_cache_size)
+      omap_store->options.cache_size = g_conf->osd_leveldb_cache_size;
+    if (g_conf->osd_leveldb_block_size)
+      omap_store->options.block_size = g_conf->osd_leveldb_block_size;
+    if (g_conf->osd_leveldb_bloom_size)
+      omap_store->options.bloom_size = g_conf->osd_leveldb_bloom_size;
+    if (g_conf->osd_leveldb_compression)
+      omap_store->options.compression_enabled = g_conf->osd_leveldb_compression;
+    if (g_conf->osd_leveldb_paranoid)
+      omap_store->options.paranoid_checks = g_conf->osd_leveldb_paranoid;
+    if (g_conf->osd_leveldb_max_open_files)
+      omap_store->options.max_open_files = g_conf->osd_leveldb_max_open_files;
+    if (g_conf->osd_leveldb_log.length())
+      omap_store->options.log_file = g_conf->osd_leveldb_log;
 
     stringstream err;
     if (omap_store->create_and_open(err)) {
       delete omap_store;
-      derr << "Error initializing " << superblock.omap_backend
-	   << " : " << err.str() << dendl;
+      derr << "Error initializing leveldb: " << err.str() << dendl;
       ret = -1;
       goto close_current_fd;
     }
 
+    if (g_conf->osd_compact_leveldb_on_mount) {
+      derr << "Compacting store..." << dendl;
+      omap_store->compact();
+      derr << "...finished compacting store" << dendl;
+    }
+
     DBObjectMap *dbomap = new DBObjectMap(omap_store);
     ret = dbomap->init(do_update);
     if (ret < 0) {
@@ -1457,7 +1395,7 @@ int FileStore::mount()
     stringstream err2;
 
     if (g_conf->filestore_debug_omap_check && !dbomap->check(err2)) {
-      derr << err2.str() << dendl;
+      derr << err2.str() << dendl;;
       delete dbomap;
       ret = -EINVAL;
       goto close_current_fd;
@@ -1490,8 +1428,6 @@ int FileStore::mount()
     }
     if (m_filestore_journal_writeahead)
       journal->set_wait_on_full(true);
-  } else {
-    dout(0) << "mount: no journal" << dendl;
   }
 
   ret = _sanity_check_fs();
@@ -1519,9 +1455,6 @@ int FileStore::mount()
 	     << " with error: " << ret << dendl;
 	goto close_current_fd;
       }
-      assert(NULL != index.index);
-      RWLock::WLocker l((index.index)->access_lock);
-
       index->cleanup();
     }
   }
@@ -1529,32 +1462,30 @@ int FileStore::mount()
   wbthrottle.start();
   sync_thread.create();
 
-  if (!(generic_flags & SKIP_JOURNAL_REPLAY)) {
-    ret = journal_replay(initial_op_seq);
-    if (ret < 0) {
-      derr << "mount failed to open journal " << journalpath << ": " << cpp_strerror(ret) << dendl;
-      if (ret == -ENOTTY) {
-        derr << "maybe journal is not pointing to a block device and its size "
-	     << "wasn't configured?" << dendl;
-      }
+  ret = journal_replay(initial_op_seq);
+  if (ret < 0) {
+    derr << "mount failed to open journal " << journalpath << ": " << cpp_strerror(ret) << dendl;
+    if (ret == -ENOTTY) {
+      derr << "maybe journal is not pointing to a block device and its size "
+	   << "wasn't configured?" << dendl;
+    }
 
-      // stop sync thread
-      lock.Lock();
-      stop = true;
-      sync_cond.Signal();
-      lock.Unlock();
-      sync_thread.join();
+    // stop sync thread
+    lock.Lock();
+    stop = true;
+    sync_cond.Signal();
+    lock.Unlock();
+    sync_thread.join();
 
-      wbthrottle.stop();
+    wbthrottle.stop();
 
-      goto close_current_fd;
-    }
+    goto close_current_fd;
   }
 
   {
     stringstream err2;
     if (g_conf->filestore_debug_omap_check && !object_map->check(err2)) {
-      derr << err2.str() << dendl;
+      derr << err2.str() << dendl;;
       ret = -EINVAL;
       goto close_current_fd;
     }
@@ -1589,7 +1520,8 @@ int FileStore::umount()
 {
   dout(5) << "umount " << basedir << dendl;
   
-  do_force_sync();
+
+  start_sync();
 
   lock.Lock();
   stop = true;
@@ -1600,8 +1532,6 @@ int FileStore::umount()
   op_tp.stop();
 
   journal_stop();
-  if (!(generic_flags & SKIP_JOURNAL_REPLAY))
-    journal_write_close();
 
   op_finisher.stop();
   ondisk_finisher.stop();
@@ -1623,10 +1553,12 @@ int FileStore::umount()
     basedir_fd = -1;
   }
 
-  force_sync = false;
+  if (backend != generic_backend) {
+    delete backend;
+    backend = generic_backend;
+  }
 
-  delete backend;
-  backend = NULL;
+  force_sync = false;
 
   object_map.reset();
 
@@ -1640,6 +1572,21 @@ int FileStore::umount()
 }
 
 
+int FileStore::get_max_object_name_length()
+{
+  lock.Lock();
+  int ret = pathconf(basedir.c_str(), _PC_NAME_MAX);
+  if (ret < 0) {
+    int err = errno;
+    lock.Unlock();
+    if (err == 0)
+      return -EDOM;
+    return -err;
+  }
+  lock.Unlock();
+  return ret;
+}
+
 
 
 /// -----------------------------
@@ -1834,11 +1781,6 @@ int FileStore::queue_transactions(Sequencer *posr, list<Transaction*> &tls,
     dout(5) << "queue_transactions new " << *osr << "/" << osr->parent << dendl;
   }
 
-  // used to include osr information in tracepoints during transaction apply
-  for (list<ObjectStore::Transaction*>::iterator i = tls.begin(); i != tls.end(); ++i) {
-    (*i)->set_osr(osr);
-  }
-
   if (journal && journal->is_writeable() && !m_filestore_journal_trailing) {
     Op *o = build_op(tls, onreadable, onreadable_sync, osd_op);
     op_queue_reserve_throttle(o, handle);
@@ -1871,26 +1813,6 @@ int FileStore::queue_transactions(Sequencer *posr, list<Transaction*> &tls,
     return 0;
   }
 
-  if (!journal) {
-    Op *o = build_op(tls, onreadable, onreadable_sync, osd_op);
-    dout(5) << __func__ << " (no journal) " << o << " " << tls << dendl;
-
-    op_queue_reserve_throttle(o, handle);
-
-    uint64_t op_num = submit_manager.op_submit_start();
-    o->op = op_num;
-
-    if (m_filestore_do_dump)
-      dump_transactions(o->tls, o->op, osr);
-
-    queue_op(osr, o);
-
-    if (ondisk)
-      apply_manager.add_waiter(op_num, ondisk);
-    submit_manager.op_submit_finish(op_num);
-    return 0;
-  }
-
   uint64_t op = submit_manager.op_submit_start();
   dout(5) << "queue_transactions (trailing journal) " << op << " " << tls << dendl;
 
@@ -1944,8 +1866,16 @@ int FileStore::_do_transactions(
   ThreadPool::TPHandle *handle)
 {
   int r = 0;
-  int trans_num = 0;
 
+  uint64_t bytes = 0, ops = 0;
+  for (list<Transaction*>::iterator p = tls.begin();
+       p != tls.end();
+       ++p) {
+    bytes += (*p)->get_num_bytes();
+    ops += (*p)->get_num_ops();
+  }
+
+  int trans_num = 0;
   for (list<Transaction*>::iterator p = tls.begin();
        p != tls.end();
        ++p, trans_num++) {
@@ -2217,10 +2147,6 @@ unsigned FileStore::_do_transaction(
 {
   dout(10) << "_do_transaction on " << &t << dendl;
 
-#ifdef WITH_LTTNG
-  const char *osr_name = t.get_osr() ? static_cast<OpSequencer*>(t.get_osr())->get_name().c_str() : "<NULL>";
-#endif
-
   Transaction::iterator i = t.begin();
   
   SequencerPosition spos(op_seq, trans_num, 0);
@@ -2228,7 +2154,7 @@ unsigned FileStore::_do_transaction(
     if (handle)
       handle->reset_tp_timeout();
 
-    int op = i.decode_op();
+    int op = i.get_op();
     int r = 0;
 
     _inject_failure();
@@ -2238,85 +2164,74 @@ unsigned FileStore::_do_transaction(
       break;
     case Transaction::OP_TOUCH:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, touch_enter, osr_name);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _touch(cid, oid);
-        tracepoint(objectstore, touch_exit, r);
       }
       break;
       
     case Transaction::OP_WRITE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	bool replica = i.get_replica();
 	bufferlist bl;
-	i.decode_bl(bl);
-        tracepoint(objectstore, write_enter, osr_name, off, len);
+	i.get_bl(bl);
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _write(cid, oid, off, len, bl, replica);
-        tracepoint(objectstore, write_exit, r);
       }
       break;
       
     case Transaction::OP_ZERO:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
-        tracepoint(objectstore, zero_enter, osr_name, off, len);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _zero(cid, oid, off, len);
-        tracepoint(objectstore, zero_exit, r);
       }
       break;
       
     case Transaction::OP_TRIMCACHE:
       {
-	i.decode_cid();
-	i.decode_oid();
-	i.decode_length();
-	i.decode_length();
+	i.get_cid();
+	i.get_oid();
+	i.get_length();
+	i.get_length();
 	// deprecated, no-op
       }
       break;
       
     case Transaction::OP_TRUNCATE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-        tracepoint(objectstore, truncate_enter, osr_name, off);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _truncate(cid, oid, off);
-        tracepoint(objectstore, truncate_exit, r);
       }
       break;
       
     case Transaction::OP_REMOVE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, remove_enter, osr_name);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _remove(cid, oid, spos);
-        tracepoint(objectstore, remove_exit, r);
       }
       break;
       
     case Transaction::OP_SETATTR:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	string name = i.get_attrname();
 	bufferlist bl;
-	i.decode_bl(bl);
-        tracepoint(objectstore, setattr_enter, osr_name);
+	i.get_bl(bl);
 	if (_check_replay_guard(cid, oid, spos) > 0) {
 	  map<string, bufferptr> to_set;
 	  to_set[name] = bufferptr(bl.c_str(), bl.length());
@@ -2325,20 +2240,17 @@ unsigned FileStore::_do_transaction(
 	    dout(0) << " ENOSPC on setxattr on " << cid << "/" << oid
 		    << " name " << name << " size " << bl.length() << dendl;
 	}
-        tracepoint(objectstore, setattr_exit, r);
       }
       break;
       
     case Transaction::OP_SETATTRS:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	map<string, bufferptr> aset;
-	i.decode_attrset(aset);
-        tracepoint(objectstore, setattrs_enter, osr_name);
+	i.get_attrset(aset);
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _setattrs(cid, oid, aset, spos);
-        tracepoint(objectstore, setattrs_exit, r);
   	if (r == -ENOSPC)
 	  dout(0) << " ENOSPC on setxattrs on " << cid << "/" << oid << dendl;
       }
@@ -2346,284 +2258,216 @@ unsigned FileStore::_do_transaction(
 
     case Transaction::OP_RMATTR:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	string name = i.decode_attrname();
-        tracepoint(objectstore, rmattr_enter, osr_name);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	string name = i.get_attrname();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _rmattr(cid, oid, name.c_str(), spos);
-        tracepoint(objectstore, rmattr_exit, r);
       }
       break;
 
     case Transaction::OP_RMATTRS:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, rmattrs_enter, osr_name);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _rmattrs(cid, oid, spos);
-        tracepoint(objectstore, rmattrs_exit, r);
       }
       break;
       
     case Transaction::OP_CLONE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-        tracepoint(objectstore, clone_enter, osr_name);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
 	r = _clone(cid, oid, noid, spos);
-        tracepoint(objectstore, clone_exit, r);
       }
       break;
 
     case Transaction::OP_CLONERANGE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
-        tracepoint(objectstore, clone_range_enter, osr_name, len);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
+ 	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	r = _clone_range(cid, oid, noid, off, len, off, spos);
-        tracepoint(objectstore, clone_range_exit, r);
       }
       break;
 
     case Transaction::OP_CLONERANGE2:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-	uint64_t srcoff = i.decode_length();
-	uint64_t len = i.decode_length();
-	uint64_t dstoff = i.decode_length();
-        tracepoint(objectstore, clone_range2_enter, osr_name, len);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
+ 	uint64_t srcoff = i.get_length();
+	uint64_t len = i.get_length();
+ 	uint64_t dstoff = i.get_length();
 	r = _clone_range(cid, oid, noid, srcoff, len, dstoff, spos);
-        tracepoint(objectstore, clone_range2_exit, r);
       }
       break;
 
     case Transaction::OP_MKCOLL:
       {
-	coll_t cid = i.decode_cid();
-        tracepoint(objectstore, mkcoll_enter, osr_name);
+	coll_t cid = i.get_cid();
 	if (_check_replay_guard(cid, spos) > 0)
 	  r = _create_collection(cid, spos);
-        tracepoint(objectstore, mkcoll_exit, r);
-      }
-      break;
-
-    case Transaction::OP_COLL_HINT:
-      {
-        coll_t cid = i.decode_cid();
-        uint32_t type = i.decode_u32();
-        bufferlist hint;
-        i.decode_bl(hint);
-        bufferlist::iterator hiter = hint.begin();
-        if (type == Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS) {
-          uint32_t pg_num;
-          uint64_t num_objs;
-          ::decode(pg_num, hiter);
-          ::decode(num_objs, hiter);
-          if (_check_replay_guard(cid, spos) > 0) {
-            r = _collection_hint_expected_num_objs(cid, pg_num, num_objs, spos);
-          }
-        } else {
-          // Ignore the hint
-          dout(10) << "Unrecognized collection hint type: " << type << dendl;
-        }
       }
       break;
 
     case Transaction::OP_RMCOLL:
       {
-	coll_t cid = i.decode_cid();
-        tracepoint(objectstore, rmcoll_enter, osr_name);
+	coll_t cid = i.get_cid();
 	if (_check_replay_guard(cid, spos) > 0)
 	  r = _destroy_collection(cid);
-        tracepoint(objectstore, rmcoll_exit, r);
       }
       break;
 
     case Transaction::OP_COLL_ADD:
       {
-	coll_t ncid = i.decode_cid();
-	coll_t ocid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, coll_add_enter);
+	coll_t ncid = i.get_cid();
+	coll_t ocid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _collection_add(ncid, ocid, oid, spos);
-        tracepoint(objectstore, coll_add_exit, r);
       }
       break;
 
     case Transaction::OP_COLL_REMOVE:
        {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, coll_remove_enter, osr_name);
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	if (_check_replay_guard(cid, oid, spos) > 0)
 	  r = _remove(cid, oid, spos);
-        tracepoint(objectstore, coll_remove_exit, r);
        }
       break;
 
     case Transaction::OP_COLL_MOVE:
       {
 	// WARNING: this is deprecated and buggy; only here to replay old journals.
-	coll_t ocid = i.decode_cid();
-	coll_t ncid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, coll_move_enter);
+	coll_t ocid = i.get_cid();
+	coll_t ncid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _collection_add(ocid, ncid, oid, spos);
 	if (r == 0 &&
 	    (_check_replay_guard(ocid, oid, spos) > 0))
 	  r = _remove(ocid, oid, spos);
-        tracepoint(objectstore, coll_move_exit, r);
       }
       break;
 
     case Transaction::OP_COLL_MOVE_RENAME:
       {
-	coll_t oldcid = i.decode_cid();
-	ghobject_t oldoid = i.decode_oid();
-	coll_t newcid = i.decode_cid();
-	ghobject_t newoid = i.decode_oid();
-        tracepoint(objectstore, coll_move_rename_enter);
+	coll_t oldcid = i.get_cid();
+	ghobject_t oldoid = i.get_oid();
+	coll_t newcid = i.get_cid();
+	ghobject_t newoid = i.get_oid();
 	r = _collection_move_rename(oldcid, oldoid, newcid, newoid, spos);
-        tracepoint(objectstore, coll_move_rename_exit, r);
       }
       break;
 
     case Transaction::OP_COLL_SETATTR:
       {
-	coll_t cid = i.decode_cid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	string name = i.get_attrname();
 	bufferlist bl;
-	i.decode_bl(bl);
-        tracepoint(objectstore, coll_setattr_enter, osr_name);
+	i.get_bl(bl);
 	if (_check_replay_guard(cid, spos) > 0)
 	  r = _collection_setattr(cid, name.c_str(), bl.c_str(), bl.length());
-        tracepoint(objectstore, coll_setattr_exit, r);
       }
       break;
 
     case Transaction::OP_COLL_RMATTR:
       {
-	coll_t cid = i.decode_cid();
-	string name = i.decode_attrname();
-        tracepoint(objectstore, coll_rmattr_enter, osr_name);
+	coll_t cid = i.get_cid();
+	string name = i.get_attrname();
 	if (_check_replay_guard(cid, spos) > 0)
 	  r = _collection_rmattr(cid, name.c_str());
-        tracepoint(objectstore, coll_rmattr_exit, r);
       }
       break;
 
     case Transaction::OP_STARTSYNC:
-      tracepoint(objectstore, startsync_enter, osr_name);
       _start_sync();
-      tracepoint(objectstore, startsync_exit);
       break;
 
     case Transaction::OP_COLL_RENAME:
       {
-	coll_t cid(i.decode_cid());
-	coll_t ncid(i.decode_cid());
-        tracepoint(objectstore, coll_rename_enter, osr_name);
+	coll_t cid(i.get_cid());
+	coll_t ncid(i.get_cid());
 	r = _collection_rename(cid, ncid, spos);
-        tracepoint(objectstore, coll_rename_exit, r);
       }
       break;
 
     case Transaction::OP_OMAP_CLEAR:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
-        tracepoint(objectstore, omap_clear_enter, osr_name);
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	r = _omap_clear(cid, oid, spos);
-        tracepoint(objectstore, omap_clear_exit, r);
       }
       break;
     case Transaction::OP_OMAP_SETKEYS:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	map<string, bufferlist> aset;
-	i.decode_attrset(aset);
-        tracepoint(objectstore, omap_setkeys_enter, osr_name);
+	i.get_attrset(aset);
 	r = _omap_setkeys(cid, oid, aset, spos);
-        tracepoint(objectstore, omap_setkeys_exit, r);
       }
       break;
     case Transaction::OP_OMAP_RMKEYS:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	set<string> keys;
-	i.decode_keyset(keys);
-        tracepoint(objectstore, omap_rmkeys_enter, osr_name);
+	i.get_keyset(keys);
 	r = _omap_rmkeys(cid, oid, keys, spos);
-        tracepoint(objectstore, omap_rmkeys_exit, r);
       }
       break;
     case Transaction::OP_OMAP_RMKEYRANGE:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	string first, last;
-	first = i.decode_key();
-	last = i.decode_key();
-        tracepoint(objectstore, omap_rmkeyrange_enter, osr_name);
+	first = i.get_key();
+	last = i.get_key();
 	r = _omap_rmkeyrange(cid, oid, first, last, spos);
-        tracepoint(objectstore, omap_rmkeyrange_exit, r);
       }
       break;
     case Transaction::OP_OMAP_SETHEADER:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	bufferlist bl;
-	i.decode_bl(bl);
-        tracepoint(objectstore, omap_setheader_enter, osr_name);
+	i.get_bl(bl);
 	r = _omap_setheader(cid, oid, bl, spos);
-        tracepoint(objectstore, omap_setheader_exit, r);
       }
       break;
     case Transaction::OP_SPLIT_COLLECTION:
       {
-	coll_t cid(i.decode_cid());
-	uint32_t bits(i.decode_u32());
-	uint32_t rem(i.decode_u32());
-	coll_t dest(i.decode_cid());
-        tracepoint(objectstore, split_coll_enter, osr_name);
+	coll_t cid(i.get_cid());
+	uint32_t bits(i.get_u32());
+	uint32_t rem(i.get_u32());
+	coll_t dest(i.get_cid());
 	r = _split_collection_create(cid, bits, rem, dest, spos);
-        tracepoint(objectstore, split_coll_exit, r);
       }
       break;
     case Transaction::OP_SPLIT_COLLECTION2:
       {
-	coll_t cid(i.decode_cid());
-	uint32_t bits(i.decode_u32());
-	uint32_t rem(i.decode_u32());
-	coll_t dest(i.decode_cid());
-        tracepoint(objectstore, split_coll2_enter, osr_name);
+	coll_t cid(i.get_cid());
+	uint32_t bits(i.get_u32());
+	uint32_t rem(i.get_u32());
+	coll_t dest(i.get_cid());
 	r = _split_collection(cid, bits, rem, dest, spos);
-        tracepoint(objectstore, split_coll2_exit, r);
       }
       break;
 
     case Transaction::OP_SETALLOCHINT:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        uint64_t expected_object_size = i.decode_length();
-        uint64_t expected_write_size = i.decode_length();
-        tracepoint(objectstore, setallochint_enter, osr_name);
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        uint64_t expected_object_size = i.get_length();
+        uint64_t expected_write_size = i.get_length();
         if (_check_replay_guard(cid, oid, spos) > 0)
           r = _set_alloc_hint(cid, oid, expected_object_size,
                               expected_write_size);
-        tracepoint(objectstore, setallochint_exit, r);
       }
       break;
 
@@ -2733,17 +2577,16 @@ unsigned FileStore::_do_transaction(
 
 bool FileStore::exists(coll_t cid, const ghobject_t& oid)
 {
-  tracepoint(objectstore, exists_enter, cid.c_str());
   struct stat st;
-  bool retval = stat(cid, oid, &st) == 0;
-  tracepoint(objectstore, exists_exit, retval);
-  return retval;
+  if (stat(cid, oid, &st) == 0)
+    return true;
+  else 
+    return false;
 }
   
 int FileStore::stat(
   coll_t cid, const ghobject_t& oid, struct stat *st, bool allow_eio)
 {
-  tracepoint(objectstore, stat_enter, cid.c_str());
   int r = lfn_stat(cid, oid, st);
   assert(allow_eio || !m_filestore_fail_eio || r != -EIO);
   if (r < 0) {
@@ -2758,7 +2601,6 @@ int FileStore::stat(
       debug_mdata_eio(oid)) {
     return -EIO;
   } else {
-    tracepoint(objectstore, stat_exit, r);
     return r;
   }
 }
@@ -2772,7 +2614,6 @@ int FileStore::read(
   bool allow_eio)
 {
   int got;
-  tracepoint(objectstore, read_enter, cid.c_str(), offset, len);
 
   dout(15) << "read " << cid << "/" << oid << " " << offset << "~" << len << dendl;
 
@@ -2821,7 +2662,6 @@ int FileStore::read(
       debug_data_eio(oid)) {
     return -EIO;
   } else {
-    tracepoint(objectstore, read_exit, got);
     return got;
   }
 }
@@ -2830,8 +2670,6 @@ int FileStore::fiemap(coll_t cid, const ghobject_t& oid,
                     uint64_t offset, size_t len,
                     bufferlist& bl)
 {
-  tracepoint(objectstore, fiemap_enter, cid.c_str(), offset, len);
-
   if (!backend->has_fiemap() || len <= (size_t)m_filestore_fiemap_threshold) {
     map<uint64_t, uint64_t> m;
     m[offset] = len;
@@ -2904,7 +2742,6 @@ done:
 
   dout(10) << "fiemap " << cid << "/" << oid << " " << offset << "~" << len << " = " << r << " num_extents=" << exomap.size() << " " << exomap << dendl;
   assert(!m_filestore_fail_eio || r != -EIO);
-  tracepoint(objectstore, fiemap_exit, r);
   return r;
 }
 
@@ -3056,20 +2893,18 @@ int FileStore::_clone(coll_t cid, const ghobject_t& oldoid, const ghobject_t& ne
   FDRef o, n;
   {
     Index index;
-    r = lfn_open(cid, oldoid, false, &o, &index);
+    IndexedPath from, to;
+    r = lfn_open(cid, oldoid, false, &o, &from, &index);
     if (r < 0) {
       goto out2;
     }
-    assert(NULL != (index.index));
-    RWLock::WLocker l((index.index)->access_lock);
-
-    r = lfn_open(cid, newoid, true, &n, &index);
+    r = lfn_open(cid, newoid, true, &n, &to, &index);
     if (r < 0) {
       goto out;
     }
     r = ::ftruncate(**n, 0);
     if (r < 0) {
-      goto out3;
+      goto out;
     }
     struct stat st;
     ::fstat(**o, &st);
@@ -3078,11 +2913,6 @@ int FileStore::_clone(coll_t cid, const ghobject_t& oldoid, const ghobject_t& ne
       r = -errno;
       goto out3;
     }
-    r = ::ftruncate(**n, st.st_size);
-    if (r < 0) {
-      goto out3;
-    }
-
     dout(20) << "objectmap clone" << dendl;
     r = object_map->clone(oldoid, newoid, &spos);
     if (r < 0 && r != -ENOENT)
@@ -3092,7 +2922,7 @@ int FileStore::_clone(coll_t cid, const ghobject_t& oldoid, const ghobject_t& ne
   {
     char buf[2];
     map<string, bufferptr> aset;
-    r = _fgetattrs(**o, aset);
+    r = _fgetattrs(**o, aset, false);
     if (r < 0)
       goto out3;
 
@@ -3131,125 +2961,6 @@ int FileStore::_do_clone_range(int from, int to, uint64_t srcoff, uint64_t len,
   return backend->clone_range(from, to, srcoff, len, dstoff);
 }
 
-int FileStore::_do_sparse_copy_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff)
-{
-  dout(20) << __func__ << " " << srcoff << "~" << len << " to " << dstoff << dendl;
-  int r = 0;
-  struct fiemap *fiemap = NULL;
-
-  // fiemap doesn't allow zero length
-  if (len == 0)
-    return 0;
-
-  r = backend->do_fiemap(from, srcoff, len, &fiemap);
-  if (r < 0) {
-    derr << "do_fiemap failed:" << srcoff << "~" << len << " = " << r << dendl;
-    return r;
-  }
-
-  // No need to copy
-  if (fiemap->fm_mapped_extents == 0)
-    return r;
-
-  int buflen = 4096*32;
-  char buf[buflen];
-  struct fiemap_extent *extent = &fiemap->fm_extents[0];
-
-  /* start where we were asked to start */
-  if (extent->fe_logical < srcoff) {
-    extent->fe_length -= srcoff - extent->fe_logical;
-    extent->fe_logical = srcoff;
-  }
-
-  uint64_t i = 0;
-
-  while (i < fiemap->fm_mapped_extents) {
-    struct fiemap_extent *next = extent + 1;
-
-    dout(10) << __func__ << " fm_mapped_extents=" << fiemap->fm_mapped_extents
-             << " fe_logical=" << extent->fe_logical << " fe_length="
-             << extent->fe_length << dendl;
-
-    /* try to merge extents */
-    while ((i < fiemap->fm_mapped_extents - 1) &&
-           (extent->fe_logical + extent->fe_length == next->fe_logical)) {
-        next->fe_length += extent->fe_length;
-        next->fe_logical = extent->fe_logical;
-        extent = next;
-        next = extent + 1;
-        i++;
-    }
-
-    if (extent->fe_logical + extent->fe_length > srcoff + len)
-      extent->fe_length = srcoff + len - extent->fe_logical;
-
-    int64_t actual;
-
-    actual = ::lseek64(from, extent->fe_logical, SEEK_SET);
-    if (actual != (int64_t)extent->fe_logical) {
-      r = errno;
-      derr << "lseek64 to " << srcoff << " got " << cpp_strerror(r) << dendl;
-      return r;
-    }
-    actual = ::lseek64(to, extent->fe_logical - srcoff + dstoff, SEEK_SET);
-    if (actual != (int64_t)(extent->fe_logical - srcoff + dstoff)) {
-      r = errno;
-      derr << "lseek64 to " << dstoff << " got " << cpp_strerror(r) << dendl;
-      return r;
-    }
-
-    loff_t pos = 0;
-    loff_t end = extent->fe_length;
-    while (pos < end) {
-      int l = MIN(end-pos, buflen);
-      r = ::read(from, buf, l);
-      dout(25) << "  read from " << pos << "~" << l << " got " << r << dendl;
-      if (r < 0) {
-        if (errno == EINTR) {
-          continue;
-        } else {
-          r = -errno;
-          derr << __func__ << ": read error at " << pos << "~" << len
-              << ", " << cpp_strerror(r) << dendl;
-          break;
-        }
-      }
-      if (r == 0) {
-        r = -ERANGE;
-        derr << __func__ << " got short read result at " << pos
-             << " of fd " << from << " len " << len << dendl;
-        break;
-      }
-      int op = 0;
-      while (op < r) {
-        int r2 = safe_write(to, buf+op, r-op);
-        dout(25) << " write to " << to << " len " << (r-op)
-                 << " got " << r2 << dendl;
-        if (r2 < 0) {
-          r = r2;
-          derr << __func__ << ": write error at " << pos << "~"
-               << r-op << ", " << cpp_strerror(r) << dendl;
-          break;
-        }
-        op += (r-op);
-      }
-      if (r < 0)
-        break;
-      pos += r;
-    }
-    i++;
-    extent++;
-  }
-
-  if (r >= 0 && m_filestore_sloppy_crc) {
-    int rc = backend->_crc_update_clone_range(from, to, srcoff, len, dstoff);
-    assert(rc >= 0);
-  }
-
-  dout(20) << __func__ << " " << srcoff << "~" << len << " to " << dstoff << " = " << r << dendl;
-  return r;
-}
-
 int FileStore::_do_copy_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff)
 {
   dout(20) << "_do_copy_range " << srcoff << "~" << len << " to " << dstoff << dendl;
@@ -3268,7 +2979,7 @@ int FileStore::_do_copy_range(int from, int to, uint64_t srcoff, uint64_t len, u
     derr << "lseek64 to " << dstoff << " got " << cpp_strerror(r) << dendl;
     return r;
   }
-
+  
   loff_t pos = srcoff;
   loff_t end = srcoff + len;
   int buflen = 4096*32;
@@ -3533,7 +3244,7 @@ void FileStore::sync_entry()
       dout(10) << "sync_entry more waiters, committing again" << dendl;
       goto again;
     }
-    if (!stop && journal && journal->should_commit_now()) {
+    if (journal && journal->should_commit_now()) {
       dout(10) << "sync_entry journal says we should commit again (probably is/was full)" << dendl;
       goto again;
     }
@@ -3552,9 +3263,8 @@ void FileStore::_start_sync()
   }
 }
 
-void FileStore::do_force_sync()
+void FileStore::start_sync()
 {
-  dout(10) << __func__ << dendl;
   Mutex::Locker l(lock);
   force_sync = true;
   sync_cond.Signal();
@@ -3684,7 +3394,7 @@ int FileStore::_fgetattr(int fd, const char *name, bufferptr& bp)
   return l;
 }
 
-int FileStore::_fgetattrs(int fd, map<string,bufferptr>& aset)
+int FileStore::_fgetattrs(int fd, map<string,bufferptr>& aset, bool user_only)
 {
   // get attr list
   char names1[100];
@@ -3718,9 +3428,17 @@ int FileStore::_fgetattrs(int fd, map<string,bufferptr>& aset)
   while (name < end) {
     char *attrname = name;
     if (parse_attrname(&name)) {
-      if (*name) {
+      char *set_name = name;
+      bool can_get = true;
+      if (user_only) {
+	if (*set_name =='_')
+	  set_name++;
+	else
+	  can_get = false;
+      }
+      if (*set_name && can_get) {
         dout(20) << "fgetattrs " << fd << " getting '" << name << "'" << dendl;
-        int r = _fgetattr(fd, attrname, aset[name]);
+        int r = _fgetattr(fd, attrname, aset[set_name]);
         if (r < 0)
 	  return r;
       }
@@ -3795,7 +3513,6 @@ bool FileStore::debug_mdata_eio(const ghobject_t &oid) {
 
 int FileStore::getattr(coll_t cid, const ghobject_t& oid, const char *name, bufferptr &bp)
 {
-  tracepoint(objectstore, getattr_enter, cid.c_str());
   dout(15) << "getattr " << cid << "/" << oid << " '" << name << "'" << dendl;
   FDRef fd;
   int r = lfn_open(cid, oid, false, &fd);
@@ -3836,14 +3553,12 @@ int FileStore::getattr(coll_t cid, const ghobject_t& oid, const char *name, buff
       debug_mdata_eio(oid)) {
     return -EIO;
   } else {
-    tracepoint(objectstore, getattr_exit, r);
     return r;
   }
 }
 
-int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset)
+int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset, bool user_only)
 {
-  tracepoint(objectstore, getattrs_enter, cid.c_str());
   set<string> omap_attrs;
   map<string, bufferlist> omap_aset;
   Index index;
@@ -3861,7 +3576,7 @@ int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>
   if (r >= 0 && !strncmp(buf, XATTR_NO_SPILL_OUT, sizeof(XATTR_NO_SPILL_OUT)))
     spill_out = false;
 
-  r = _fgetattrs(**fd, aset);
+  r = _fgetattrs(**fd, aset, user_only);
   if (r < 0) {
     goto out;
   }
@@ -3877,26 +3592,33 @@ int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>
     dout(10) << __func__ << " could not get index r = " << r << dendl;
     goto out;
   }
-  {
-    r = object_map->get_all_xattrs(oid, &omap_attrs);
-    if (r < 0 && r != -ENOENT) {
-      dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl;
-      goto out;
-    }
+  r = object_map->get_all_xattrs(oid, &omap_attrs);
+  if (r < 0 && r != -ENOENT) {
+    dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl;
+    goto out;
+  }
 
-    r = object_map->get_xattrs(oid, omap_attrs, &omap_aset);
-    if (r < 0 && r != -ENOENT) {
-      dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl;
-      goto out;
-    }
-    if (r == -ENOENT)
-      r = 0;
+  r = object_map->get_xattrs(oid, omap_attrs, &omap_aset);
+  if (r < 0 && r != -ENOENT) {
+    dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl;
+    goto out;
   }
+  if (r == -ENOENT)
+    r = 0;
   assert(omap_attrs.size() == omap_aset.size());
   for (map<string, bufferlist>::iterator i = omap_aset.begin();
 	 i != omap_aset.end();
 	 ++i) {
-    string key(i->first);
+    string key;
+    if (user_only) {
+	if (i->first[0] != '_')
+	  continue;
+	if (i->first == "_")
+	  continue;
+	key = i->first.substr(1, i->first.size());
+    } else {
+	key = i->first;
+    }
     aset.insert(make_pair(key,
 			    bufferptr(i->second.c_str(), i->second.length())));
   }
@@ -3908,7 +3630,6 @@ int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>
       debug_mdata_eio(oid)) {
     return -EIO;
   } else {
-    tracepoint(objectstore, getattrs_exit, r);
     return r;
   }
 }
@@ -3922,7 +3643,6 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr
   map<string, bufferptr> inline_to_set;
   FDRef fd;
   int spill_out = -1;
-  bool incomplete_inline = false;
 
   int r = lfn_open(cid, oid, false, &fd);
   if (r < 0) {
@@ -3936,12 +3656,10 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr
   else
     spill_out = 1;
 
-  r = _fgetattrs(**fd, inline_set);
-  incomplete_inline = (r == -E2BIG);
+  r = _fgetattrs(**fd, inline_set, false);
   assert(!m_filestore_fail_eio || r != -EIO);
-  dout(15) << "setattrs " << cid << "/" << oid
-    	   << (incomplete_inline ? " (incomplete_inline, forcing omap)" : "")
-	   << dendl;
+  dout(15) << "setattrs " << cid << "/" << oid << dendl;
+  r = 0;
 
   for (map<string,bufferptr>::iterator p = aset.begin();
        p != aset.end();
@@ -3949,12 +3667,6 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr
     char n[CHAIN_XATTR_MAX_NAME_LEN];
     get_attrname(p->first.c_str(), n, CHAIN_XATTR_MAX_NAME_LEN);
 
-    if (incomplete_inline) {
-      chain_fremovexattr(**fd, n); // ignore any error
-      omap_set[p->first].push_back(p->second);
-      continue;
-    }
-
     if (p->second.length() > m_filestore_max_inline_xattr_size) {
 	if (inline_set.count(p->first)) {
 	  inline_set.erase(p->first);
@@ -3968,6 +3680,12 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr
 
     if (!inline_set.count(p->first) &&
 	  inline_set.size() >= m_filestore_max_inline_xattrs) {
+	if (inline_set.count(p->first)) {
+	  inline_set.erase(p->first);
+	  r = chain_fremovexattr(**fd, n);
+	  if (r < 0)
+	    goto out_close;
+	}
 	omap_set[p->first].push_back(p->second);
 	continue;
     }
@@ -4080,7 +3798,7 @@ int FileStore::_rmattrs(coll_t cid, const ghobject_t& oid,
     spill_out = false;
   }
 
-  r = _fgetattrs(**fd, aset);
+  r = _fgetattrs(**fd, aset, false);
   if (r >= 0) {
     for (map<string,bufferptr>::iterator p = aset.begin(); p != aset.end(); ++p) {
       char n[CHAIN_XATTR_MAX_NAME_LEN];
@@ -4101,23 +3819,22 @@ int FileStore::_rmattrs(coll_t cid, const ghobject_t& oid,
     dout(10) << __func__ << " could not get index r = " << r << dendl;
     goto out_close;
   }
-  {
-    r = object_map->get_all_xattrs(oid, &omap_attrs);
-    if (r < 0 && r != -ENOENT) {
-      dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl;
-      assert(!m_filestore_fail_eio || r != -EIO);
-      goto out_close;
-    }
-    r = object_map->remove_xattrs(oid, omap_attrs, &spos);
-    if (r < 0 && r != -ENOENT) {
-      dout(10) << __func__ << " could not remove omap_attrs r = " << r << dendl;
-      goto out_close;
-    }
-    if (r == -ENOENT)
-      r = 0;
-    chain_fsetxattr(**fd, XATTR_SPILL_OUT_NAME, XATTR_NO_SPILL_OUT,
-		  sizeof(XATTR_NO_SPILL_OUT));
+  r = object_map->get_all_xattrs(oid, &omap_attrs);
+  if (r < 0 && r != -ENOENT) {
+    dout(10) << __func__ << " could not get omap_attrs r = " << r << dendl;
+    assert(!m_filestore_fail_eio || r != -EIO);
+    goto out_close;
+  }
+  r = object_map->remove_xattrs(oid, omap_attrs, &spos);
+  if (r < 0 && r != -ENOENT) {
+    dout(10) << __func__ << " could not remove omap_attrs r = " << r << dendl;
+    goto out_close;
   }
+  if (r == -ENOENT)
+    r = 0;
+
+  chain_fsetxattr(**fd, XATTR_SPILL_OUT_NAME, XATTR_NO_SPILL_OUT,
+		  sizeof(XATTR_NO_SPILL_OUT));
 
  out_close:
   lfn_close(fd);
@@ -4186,7 +3903,7 @@ int FileStore::collection_getattrs(coll_t cid, map<string,bufferptr>& aset)
     r = -errno;
     goto out;
   }
-  r = _fgetattrs(fd, aset);
+  r = _fgetattrs(fd, aset, true);
   VOID_TEMP_FAILURE_RETRY(::close(fd));
  out:
   dout(10) << "collection_getattrs " << fn << " = " << r << dendl;
@@ -4276,6 +3993,7 @@ int FileStore::_collection_remove_recursive(const coll_t &cid,
 
   vector<ghobject_t> objects;
   ghobject_t max;
+  r = 0;
   while (!max.is_max()) {
     r = collection_list_partial(cid, max, 200, 300, 0, &objects, &max);
     if (r < 0)
@@ -4351,10 +4069,6 @@ int FileStore::collection_version_current(coll_t c, uint32_t *version)
   int r = get_index(c, &index);
   if (r < 0)
     return r;
-
-  assert(NULL != index.index);
-  RWLock::RLocker l((index.index)->access_lock);
-
   *version = index->collection_version();
   if (*version == target_version)
     return 1;
@@ -4364,7 +4078,6 @@ int FileStore::collection_version_current(coll_t c, uint32_t *version)
 
 int FileStore::list_collections(vector<coll_t>& ls) 
 {
-  tracepoint(objectstore, list_collections_enter);
   dout(10) << "list_collections" << dendl;
 
   char fn[PATH_MAX];
@@ -4421,13 +4134,11 @@ int FileStore::list_collections(vector<coll_t>& ls)
 
   ::closedir(dir);
   assert(!m_filestore_fail_eio || r != -EIO);
-  tracepoint(objectstore, list_collections_exit, r);
   return r;
 }
 
 int FileStore::collection_stat(coll_t c, struct stat *st) 
 {
-  tracepoint(objectstore, collection_stat_enter, c.c_str());
   char fn[PATH_MAX];
   get_cdir(c, fn, sizeof(fn));
   dout(15) << "collection_stat " << fn << dendl;
@@ -4436,31 +4147,22 @@ int FileStore::collection_stat(coll_t c, struct stat *st)
     r = -errno;
   dout(10) << "collection_stat " << fn << " = " << r << dendl;
   assert(!m_filestore_fail_eio || r != -EIO);
-  tracepoint(objectstore, collection_stat_exit, r);
   return r;
 }
 
 bool FileStore::collection_exists(coll_t c) 
 {
-  tracepoint(objectstore, collection_exists_enter, c.c_str());
   struct stat st;
-  bool ret = collection_stat(c, &st) == 0;
-  tracepoint(objectstore, collection_exists_exit, ret);
-  return ret;
+  return collection_stat(c, &st) == 0;
 }
 
 bool FileStore::collection_empty(coll_t c) 
 {  
-  tracepoint(objectstore, collection_empty_enter, c.c_str());
   dout(15) << "collection_empty " << c << dendl;
   Index index;
   int r = get_index(c, &index);
   if (r < 0)
     return false;
-
-  assert(NULL != index.index);
-  RWLock::RLocker l((index.index)->access_lock);
-
   vector<ghobject_t> ls;
   collection_list_handle_t handle;
   r = index->collection_list_partial(ghobject_t(), 1, 1, 0, &ls, NULL);
@@ -4468,15 +4170,12 @@ bool FileStore::collection_empty(coll_t c)
     assert(!m_filestore_fail_eio || r != -EIO);
     return false;
   }
-  bool ret = ls.empty();
-  tracepoint(objectstore, collection_empty_exit, ret);
-  return ret;
+  return ls.empty();
 }
 
 int FileStore::collection_list_range(coll_t c, ghobject_t start, ghobject_t end,
                                      snapid_t seq, vector<ghobject_t> *ls)
 {
-  tracepoint(objectstore, collection_list_range_enter, c.c_str());
   bool done = false;
   ghobject_t next = start;
 
@@ -4505,7 +4204,6 @@ int FileStore::collection_list_range(coll_t c, ghobject_t start, ghobject_t end,
     }
   }
 
-  tracepoint(objectstore, collection_list_range_exit, 0);
   return 0;
 }
 
@@ -4513,16 +4211,11 @@ int FileStore::collection_list_partial(coll_t c, ghobject_t start,
 				       int min, int max, snapid_t seq,
 				       vector<ghobject_t> *ls, ghobject_t *next)
 {
-  tracepoint(objectstore, collection_list_partial_enter, c.c_str());
   dout(10) << "collection_list_partial: " << c << dendl;
   Index index;
   int r = get_index(c, &index);
   if (r < 0)
     return r;
-
-  assert(NULL != index.index);
-  RWLock::RLocker l((index.index)->access_lock);
-
   r = index->collection_list_partial(start,
 				     min, max, seq,
 				     ls, next);
@@ -4532,24 +4225,17 @@ int FileStore::collection_list_partial(coll_t c, ghobject_t start,
   }
   if (ls)
     dout(20) << "objects: " << *ls << dendl;
-  tracepoint(objectstore, collection_list_partial_exit, 0);
   return 0;
 }
 
 int FileStore::collection_list(coll_t c, vector<ghobject_t>& ls)
 {  
-  tracepoint(objectstore, collection_list_enter, c.c_str());
   Index index;
   int r = get_index(c, &index);
   if (r < 0)
     return r;
-
-  assert(NULL != index.index);
-  RWLock::RLocker l((index.index)->access_lock);
-
   r = index->collection_list(&ls);
   assert(!m_filestore_fail_eio || r != -EIO);
-  tracepoint(objectstore, collection_list_exit, r);
   return r;
 }
 
@@ -4557,25 +4243,16 @@ int FileStore::omap_get(coll_t c, const ghobject_t &hoid,
 			bufferlist *header,
 			map<string, bufferlist> *out)
 {
-  tracepoint(objectstore, omap_get_enter, c.c_str());
   dout(15) << __func__ << " " << c << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(c, &index);
+  IndexedPath path;
+  int r = lfn_find(c, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->get(hoid, header, out);
   if (r < 0 && r != -ENOENT) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return r;
   }
-  tracepoint(objectstore, omap_get_exit, 0);
   return 0;
 }
 
@@ -4585,49 +4262,31 @@ int FileStore::omap_get_header(
   bufferlist *bl,
   bool allow_eio)
 {
-  tracepoint(objectstore, omap_get_header_enter, c.c_str());
   dout(15) << __func__ << " " << c << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(c, &index);
+  IndexedPath path;
+  int r = lfn_find(c, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->get_header(hoid, bl);
   if (r < 0 && r != -ENOENT) {
     assert(allow_eio || !m_filestore_fail_eio || r != -EIO);
     return r;
   }
-  tracepoint(objectstore, omap_get_header_exit, 0);
   return 0;
 }
 
 int FileStore::omap_get_keys(coll_t c, const ghobject_t &hoid, set<string> *keys)
 {
-  tracepoint(objectstore, omap_get_keys_enter, c.c_str());
   dout(15) << __func__ << " " << c << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(c, &index);
+  IndexedPath path;
+  int r = lfn_find(c, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->get_keys(hoid, keys);
   if (r < 0 && r != -ENOENT) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return r;
   }
-  tracepoint(objectstore, omap_get_keys_exit, 0);
   return 0;
 }
 
@@ -4635,25 +4294,16 @@ int FileStore::omap_get_values(coll_t c, const ghobject_t &hoid,
 			       const set<string> &keys,
 			       map<string, bufferlist> *out)
 {
-  tracepoint(objectstore, omap_get_values_enter, c.c_str());
   dout(15) << __func__ << " " << c << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(c, &index);
+  IndexedPath path;
+  int r = lfn_find(c, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->get_values(hoid, keys, out);
   if (r < 0 && r != -ENOENT) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return r;
   }
-  tracepoint(objectstore, omap_get_values_exit, 0);
   return 0;
 }
 
@@ -4661,76 +4311,30 @@ int FileStore::omap_check_keys(coll_t c, const ghobject_t &hoid,
 			       const set<string> &keys,
 			       set<string> *out)
 {
-  tracepoint(objectstore, omap_check_keys_enter, c.c_str());
   dout(15) << __func__ << " " << c << "/" << hoid << dendl;
-
-  Index index;
-  int r = get_index(c, &index);
+  IndexedPath path;
+  int r = lfn_find(c, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->check_keys(hoid, keys, out);
   if (r < 0 && r != -ENOENT) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return r;
   }
-  tracepoint(objectstore, omap_check_keys_exit, 0);
   return 0;
 }
 
 ObjectMap::ObjectMapIterator FileStore::get_omap_iterator(coll_t c,
 							  const ghobject_t &hoid)
 {
-  tracepoint(objectstore, get_omap_iterator, c.c_str());
   dout(15) << __func__ << " " << c << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(c, &index);
+  IndexedPath path;
+  int r = lfn_find(c, hoid, &path);
   if (r < 0)
-    return ObjectMap::ObjectMapIterator(); 
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return ObjectMap::ObjectMapIterator();
-  }
+    return ObjectMap::ObjectMapIterator();
   return object_map->get_iterator(hoid);
 }
 
-int FileStore::_collection_hint_expected_num_objs(coll_t c, uint32_t pg_num,
-    uint64_t expected_num_objs,
-    const SequencerPosition &spos)
-{
-  dout(15) << __func__ << " collection: " << c << " pg number: "
-     << pg_num << " expected number of objects: " << expected_num_objs << dendl;
-
-  if (!collection_empty(c) && !replaying) {
-    dout(0) << "Failed to give an expected number of objects hint to collection : "
-      << c << ", only empty collection can take such type of hint. " << dendl;
-    return 0;
-  }
-
-  int ret;
-  Index index;
-  ret = get_index(c, &index);
-  if (ret < 0)
-    return ret;
-  // Pre-hash the collection
-  ret = index->pre_hash_collection(pg_num, expected_num_objs);
-  dout(10) << "pre_hash_collection " << c << " = " << ret << dendl;
-  if (ret < 0)
-    return ret;
-  _set_replay_guard(c, spos);
-
-  return 0;
-}
-
 int FileStore::_create_collection(
   coll_t c,
   const SequencerPosition &spos)
@@ -4777,9 +4381,6 @@ int FileStore::_destroy_collection(coll_t c)
     int r = get_index(c, &from);
     if (r < 0)
       return r;
-    assert(NULL != from.index);
-    RWLock::WLocker l((from.index)->access_lock);
-
     r = from->prep_delete();
     if (r < 0)
       return r;
@@ -4949,17 +4550,10 @@ void FileStore::_inject_failure()
 int FileStore::_omap_clear(coll_t cid, const ghobject_t &hoid,
 			   const SequencerPosition &spos) {
   dout(15) << __func__ << " " << cid << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(cid, &index);
+  IndexedPath path;
+  int r = lfn_find(cid, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->clear_keys_header(hoid, &spos);
   if (r < 0 && r != -ENOENT)
     return r;
@@ -4970,17 +4564,10 @@ int FileStore::_omap_setkeys(coll_t cid, const ghobject_t &hoid,
 			     const map<string, bufferlist> &aset,
 			     const SequencerPosition &spos) {
   dout(15) << __func__ << " " << cid << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(cid, &index);
+  IndexedPath path;
+  int r = lfn_find(cid, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   return object_map->set_keys(hoid, aset, &spos);
 }
 
@@ -4988,17 +4575,10 @@ int FileStore::_omap_rmkeys(coll_t cid, const ghobject_t &hoid,
 			    const set<string> &keys,
 			    const SequencerPosition &spos) {
   dout(15) << __func__ << " " << cid << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(cid, &index);
+  IndexedPath path;
+  int r = lfn_find(cid, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   r = object_map->rm_keys(hoid, keys, &spos);
   if (r < 0 && r != -ENOENT)
     return r;
@@ -5027,17 +4607,10 @@ int FileStore::_omap_setheader(coll_t cid, const ghobject_t &hoid,
 			       const SequencerPosition &spos)
 {
   dout(15) << __func__ << " " << cid << "/" << hoid << dendl;
-  Index index;
-  int r = get_index(cid, &index);
+  IndexedPath path;
+  int r = lfn_find(cid, hoid, &path);
   if (r < 0)
     return r;
-  {
-    assert(NULL != index.index);
-    RWLock::RLocker l((index.index)->access_lock);
-    r = lfn_find(hoid, index);
-    if (r < 0)
-      return r;
-  }
   return object_map->set_header(hoid, bl, &spos);
 }
 
@@ -5082,15 +4655,8 @@ int FileStore::_split_collection(coll_t cid,
     if (!r)
       r = get_index(dest, &to);
 
-    if (!r) {
-      assert(NULL != from.index);
-      RWLock::WLocker l1((from.index)->access_lock);
-
-      assert(NULL != to.index);
-      RWLock::WLocker l2((to.index)->access_lock);
-      
-      r = from->split(rem, bits, to.index);
-    }
+    if (!r)
+      r = from->split(rem, bits, to);
 
     _close_replay_guard(cid, spos);
     _close_replay_guard(dest, spos);
@@ -5170,15 +4736,8 @@ int FileStore::_split_collection_create(coll_t cid,
   if (!r) 
     r = get_index(dest, &to);
 
-  if (!r) {
-    assert(NULL != from.index);
-    RWLock::WLocker l1((from.index)->access_lock);
-
-    assert(NULL != to.index);
-    RWLock::WLocker l2((to.index)->access_lock);
- 
-    r = from->split(rem, bits, to.index);
-  }
+  if (!r) 
+    r = from->split(rem, bits, to);
 
   _close_replay_guard(cid, spos);
   _close_replay_guard(dest, spos);
@@ -5335,30 +4894,33 @@ void FileStore::set_xattr_limits_via_conf()
   uint32_t fs_xattr_size;
   uint32_t fs_xattrs;
 
-  switch (m_fs_type) {
-#if defined(__linux__)
-  case XFS_SUPER_MAGIC:
-    fs_xattr_size = g_conf->filestore_max_inline_xattr_size_xfs;
-    fs_xattrs = g_conf->filestore_max_inline_xattrs_xfs;
-    break;
-  case BTRFS_SUPER_MAGIC:
-    fs_xattr_size = g_conf->filestore_max_inline_xattr_size_btrfs;
-    fs_xattrs = g_conf->filestore_max_inline_xattrs_btrfs;
-    break;
-#endif
-  default:
-    fs_xattr_size = g_conf->filestore_max_inline_xattr_size_other;
-    fs_xattrs = g_conf->filestore_max_inline_xattrs_other;
-    break;
+  assert(m_fs_type != FS_TYPE_NONE);
+
+  switch(m_fs_type) {
+    case FS_TYPE_XFS:
+      fs_xattr_size = g_conf->filestore_max_inline_xattr_size_xfs;
+      fs_xattrs = g_conf->filestore_max_inline_xattrs_xfs;
+      break;
+    case FS_TYPE_BTRFS:
+      fs_xattr_size = g_conf->filestore_max_inline_xattr_size_btrfs;
+      fs_xattrs = g_conf->filestore_max_inline_xattrs_btrfs;
+      break;
+    case FS_TYPE_ZFS:
+    case FS_TYPE_OTHER:
+      fs_xattr_size = g_conf->filestore_max_inline_xattr_size_other;
+      fs_xattrs = g_conf->filestore_max_inline_xattrs_other;
+      break;
+    default:
+      assert(!"Unknown fs type");
   }
 
-  // Use override value if set
+  //Use override value if set
   if (g_conf->filestore_max_inline_xattr_size)
     m_filestore_max_inline_xattr_size = g_conf->filestore_max_inline_xattr_size;
   else
     m_filestore_max_inline_xattr_size = fs_xattr_size;
 
-  // Use override value if set
+  //Use override value if set
   if (g_conf->filestore_max_inline_xattrs)
     m_filestore_max_inline_xattrs = g_conf->filestore_max_inline_xattrs;
   else
@@ -5369,20 +4931,15 @@ void FileStore::set_xattr_limits_via_conf()
 
 void FSSuperblock::encode(bufferlist &bl) const
 {
-  ENCODE_START(2, 1, bl);
+  ENCODE_START(1, 1, bl);
   compat_features.encode(bl);
-  ::encode(omap_backend, bl);
   ENCODE_FINISH(bl);
 }
 
 void FSSuperblock::decode(bufferlist::iterator &bl)
 {
-  DECODE_START(2, bl);
+  DECODE_START(1, bl);
   compat_features.decode(bl);
-  if (struct_v >= 2)
-    ::decode(omap_backend, bl);
-  else
-    omap_backend = "leveldb";
   DECODE_FINISH(bl);
 }
 
@@ -5390,7 +4947,6 @@ void FSSuperblock::dump(Formatter *f) const
 {
   f->open_object_section("compat");
   compat_features.dump(f);
-  f->dump_string("omap_backend", omap_backend);
   f->close_section();
 }
 
@@ -5405,6 +4961,4 @@ void FSSuperblock::generate_test_instances(list<FSSuperblock*>& o)
   z.compat_features = CompatSet(feature_compat, feature_ro_compat,
                                 feature_incompat);
   o.push_back(new FSSuperblock(z));
-  z.omap_backend = "rocksdb";
-  o.push_back(new FSSuperblock(z));
 }
diff --git a/src/os/FileStore.h b/src/os/FileStore.h
index f6ed7bb..3fcd89a 100644
--- a/src/os/FileStore.h
+++ b/src/os/FileStore.h
@@ -57,12 +57,21 @@ static const __SWORD_TYPE BTRFS_SUPER_MAGIC(0x9123683E);
 # ifndef XFS_SUPER_MAGIC
 static const __SWORD_TYPE XFS_SUPER_MAGIC(0x58465342);
 # endif
+#endif
+
 #ifndef ZFS_SUPER_MAGIC
 static const __SWORD_TYPE ZFS_SUPER_MAGIC(0x2fc12fc1);
 #endif
-#endif
 
 
+enum fs_types {
+  FS_TYPE_NONE = 0,
+  FS_TYPE_XFS,
+  FS_TYPE_BTRFS,
+  FS_TYPE_ZFS,
+  FS_TYPE_OTHER
+};
+
 class FileStoreBackend;
 
 #define CEPH_FS_FEATURE_INCOMPAT_SHARDS CompatSet::Feature(1, "sharded objects")
@@ -70,7 +79,6 @@ class FileStoreBackend;
 class FSSuperblock {
 public:
   CompatSet compat_features;
-  string omap_backend;
 
   FSSuperblock() { }
 
@@ -83,8 +91,7 @@ WRITE_CLASS_ENCODER(FSSuperblock)
 
 inline ostream& operator<<(ostream& out, const FSSuperblock& sb)
 {
-  return out << "sb(" << sb.compat_features << "): "
-             << sb.omap_backend;
+  return out << "sb(" << sb.compat_features << ")";
 }
 
 class FileStore : public JournalingObjectStore,
@@ -119,7 +126,6 @@ public:
 private:
   string internal_name;         ///< internal name, used to name the perfcounter instance
   string basedir, journalpath;
-  osflagbits_t generic_flags;
   std::string current_fn;
   std::string current_op_seq_fn;
   std::string omap_dir;
@@ -129,10 +135,9 @@ private:
 
   int fsid_fd, op_fd, basedir_fd, current_fd;
 
+  FileStoreBackend *generic_backend;
   FileStoreBackend *backend;
 
-  void create_backend(long f_type);
-
   deque<uint64_t> snaps;
 
   // Indexed Collections
@@ -322,6 +327,7 @@ private:
 
   friend ostream& operator<<(ostream& out, const OpSequencer& s);
 
+  Mutex fdcache_lock;
   FDCache fdcache;
   WBThrottle wbthrottle;
 
@@ -383,8 +389,7 @@ private:
   PerfCounters *logger;
 
 public:
-  int lfn_find(const ghobject_t& oid, const Index& index, 
-                                  IndexedPath *path = NULL);
+  int lfn_find(coll_t cid, const ghobject_t& oid, IndexedPath *path);
   int lfn_truncate(coll_t cid, const ghobject_t& oid, off_t length);
   int lfn_stat(coll_t cid, const ghobject_t& oid, struct stat *buf);
   int lfn_open(
@@ -392,17 +397,15 @@ public:
     const ghobject_t& oid,
     bool create,
     FDRef *outfd,
+    IndexedPath *path = 0,
     Index *index = 0);
-
   void lfn_close(FDRef fd);
   int lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghobject_t& newoid) ;
   int lfn_unlink(coll_t cid, const ghobject_t& o, const SequencerPosition &spos,
 		 bool force_clear_omap=false);
 
 public:
-  FileStore(const std::string &base, const std::string &jdev,
-    osflagbits_t flags = 0,
-    const char *internal_name = "filestore", bool update_to=false);
+  FileStore(const std::string &base, const std::string &jdev, const char *internal_name = "filestore", bool update_to=false);
   ~FileStore();
 
   int _detect_fs();
@@ -415,15 +418,7 @@ public:
   int write_op_seq(int, uint64_t seq);
   int mount();
   int umount();
-  unsigned get_max_object_name_length() {
-    // not safe for all file systems, btw!  use the tunable to limit this.
-    return 4096;
-  }
-  unsigned get_max_attr_name_length() {
-    // xattr limit is 128; leave room for our prefixes (user.ceph._),
-    // some margin, and cap at 100
-    return 100;
-  }
+  int get_max_object_name_length();
   int mkfs();
   int mkjournal();
 
@@ -443,8 +438,6 @@ public:
    */
   bool get_allow_sharded_objects();
 
-  void collect_metadata(map<string,string> *pm);
-
   int statfs(struct statfs *buf);
 
   int _do_transactions(
@@ -536,17 +529,16 @@ public:
 		   uint64_t srcoff, uint64_t len, uint64_t dstoff,
 		   const SequencerPosition& spos);
   int _do_clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff);
-  int _do_sparse_copy_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff);
   int _do_copy_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff);
   int _remove(coll_t cid, const ghobject_t& oid, const SequencerPosition &spos);
 
   int _fgetattr(int fd, const char *name, bufferptr& bp);
-  int _fgetattrs(int fd, map<string,bufferptr>& aset);
+  int _fgetattrs(int fd, map<string,bufferptr>& aset, bool user_only);
   int _fsetattrs(int fd, map<string, bufferptr> &aset);
 
   void _start_sync();
 
-  void do_force_sync();
+  void start_sync();
   void start_sync(Context *onsafe);
   void sync();
   void _flush_op_queue();
@@ -574,7 +566,7 @@ public:
 
   // attrs
   int getattr(coll_t cid, const ghobject_t& oid, const char *name, bufferptr &bp);
-  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset);
+  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset, bool user_only = false);
 
   int _setattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset,
 		const SequencerPosition &spos);
@@ -626,19 +618,6 @@ public:
   int _create_collection(coll_t c);
   int _create_collection(coll_t c, const SequencerPosition &spos);
   int _destroy_collection(coll_t c);
-  /**
-   * Give an expected number of objects hint to the collection.
-   *
-   * @param c                 - collection id.
-   * @param pg_num            - pg number of the pool this collection belongs to
-   * @param expected_num_objs - expected number of objects in this collection
-   * @param spos              - sequence position
-   *
-   * @Return 0 on success, an error code otherwise
-   */
-  int _collection_hint_expected_num_objs(coll_t c, uint32_t pg_num,
-      uint64_t expected_num_objs,
-      const SequencerPosition &spos);
   int _collection_add(coll_t c, coll_t ocid, const ghobject_t& oid,
 		      const SequencerPosition& spos);
   int _collection_move_rename(coll_t oldcid, const ghobject_t& oldoid,
@@ -702,7 +681,7 @@ private:
   bool m_filestore_sloppy_crc;
   int m_filestore_sloppy_crc_block_size;
   uint64_t m_filestore_max_alloc_hint_size;
-  long m_fs_type;
+  enum fs_types m_fs_type;
 
   //Determined xattr handling based on fs type
   void set_xattr_limits_via_conf();
@@ -730,7 +709,6 @@ private:
   int read_superblock();
 
   friend class FileStoreBackend;
-  friend class TestFileStore;
 };
 
 ostream& operator<<(ostream& out, const FileStore::OpSequencer& s);
@@ -760,23 +738,14 @@ protected:
     return filestore->current_fn;
   }
   int _copy_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) {
-    if (has_fiemap()) {
-      return filestore->_do_sparse_copy_range(from, to, srcoff, len, dstoff);
-    } else {
-      return filestore->_do_copy_range(from, to, srcoff, len, dstoff);
-    }
+    return filestore->_do_copy_range(from, to, srcoff, len, dstoff);
   }
   int get_crc_block_size() {
     return filestore->m_filestore_sloppy_crc_block_size;
   }
-
 public:
   FileStoreBackend(FileStore *fs) : filestore(fs) {}
-  virtual ~FileStoreBackend() {}
-
-  static FileStoreBackend *create(long f_type, FileStore *fs);
-
-  virtual const char *get_name() = 0;
+  virtual ~FileStoreBackend() {};
   virtual int detect_features() = 0;
   virtual int create_current() = 0;
   virtual bool can_checkpoint() = 0;
diff --git a/src/os/FlatIndex.cc b/src/os/FlatIndex.cc
index 6dcb52e..2f1a1d1 100644
--- a/src/os/FlatIndex.cc
+++ b/src/os/FlatIndex.cc
@@ -18,6 +18,7 @@
 #endif
 
 #include "FlatIndex.h"
+#include "CollectionIndex.h"
 #include "common/ceph_crypto.h"
 #include "osd/osd_types.h"
 #include <errno.h>
@@ -48,6 +49,9 @@ using ceph::crypto::SHA1;
 
 #define FILENAME_PREFIX_LEN (FILENAME_SHORT_LEN - FILENAME_HASH_LEN - (sizeof(FILENAME_COOKIE) - 1) - FILENAME_EXTRA)
 
+void FlatIndex::set_ref(ceph::shared_ptr<CollectionIndex> ref) {
+  self_ref = ref;
+}
 
 int FlatIndex::cleanup() {
   return 0;
@@ -352,7 +356,7 @@ int FlatIndex::lookup(const ghobject_t &hoid, IndexedPath *path, int *exist) {
 	      sizeof(long_fn), exist, &is_lfn);
   if (r < 0)
     return r;
-  *path = IndexedPath(new Path(string(short_fn), this));
+  *path = IndexedPath(new Path(string(short_fn), self_ref));
   return 0;
 }
 
diff --git a/src/os/FlatIndex.h b/src/os/FlatIndex.h
index 0509df4..e55bd14 100644
--- a/src/os/FlatIndex.h
+++ b/src/os/FlatIndex.h
@@ -29,13 +29,12 @@
  * This class should only be used for converting old filestores.
  */
 class FlatIndex : public CollectionIndex {
+  ceph::weak_ptr<CollectionIndex> self_ref;
   string base_path;
   coll_t collection;
 public:
-  FlatIndex(coll_t collection, string base_path) : 
-              CollectionIndex(collection),
-              base_path(base_path),
-	      collection(collection) {}
+  FlatIndex(coll_t collection, string base_path) : base_path(base_path),
+						   collection(collection) {}
 
   /// @see CollectionIndex
   uint32_t collection_version() { return FLAT_INDEX_TAG; }
@@ -43,6 +42,9 @@ public:
   coll_t coll() const { return collection; }
 
   /// @see CollectionIndex
+  void set_ref(ceph::shared_ptr<CollectionIndex> ref);
+
+  /// @see CollectionIndex
   int cleanup();
 
   /// @see CollectionIndex
diff --git a/src/os/GenericFileStoreBackend.h b/src/os/GenericFileStoreBackend.h
index fec56ce..374e193 100644
--- a/src/os/GenericFileStoreBackend.h
+++ b/src/os/GenericFileStoreBackend.h
@@ -26,14 +26,11 @@ private:
   bool m_filestore_fsync_flushes_journal_data;
 public:
   GenericFileStoreBackend(FileStore *fs);
-  virtual ~GenericFileStoreBackend() {}
+  virtual ~GenericFileStoreBackend() {};
 
-  virtual const char *get_name() {
-    return "generic";
-  }
   virtual int detect_features();
   virtual int create_current();
-  virtual bool can_checkpoint() { return false; }
+  virtual bool can_checkpoint() { return false; };
   virtual int list_checkpoints(list<string>& ls) { return 0; }
   virtual int create_checkpoint(const string& name, uint64_t *cid) { return -EOPNOTSUPP; }
   virtual int sync_checkpoint(uint64_t id) { return -EOPNOTSUPP; }
diff --git a/src/os/GenericObjectMap.cc b/src/os/GenericObjectMap.cc
index f6ba11e..011c83b 100644
--- a/src/os/GenericObjectMap.cc
+++ b/src/os/GenericObjectMap.cc
@@ -121,7 +121,10 @@ string GenericObjectMap::header_key(const coll_t &cid, const ghobject_t &oid)
   full_name.append(GHOBJECT_KEY_SEP_S);
 
   t = buf;
-  t += snprintf(t, end - t, "%lld", (long long)oid.hobj.pool);
+  if (oid.hobj.pool == -1)
+    t += snprintf(t, end - t, "none");
+  else
+    t += snprintf(t, end - t, "%llx", (long long unsigned)oid.hobj.pool);
   full_name += string(buf);
   full_name.append(GHOBJECT_KEY_SEP_S);
 
@@ -142,7 +145,7 @@ string GenericObjectMap::header_key(const coll_t &cid, const ghobject_t &oid)
   full_name += string(buf);
 
   if (oid.generation != ghobject_t::NO_GEN) {
-    assert(oid.shard_id != shard_id_t::NO_SHARD);
+    assert(oid.shard_id != ghobject_t::NO_SHARD);
     full_name.append(GHOBJECT_KEY_SEP_S);
 
     t = buf;
@@ -172,7 +175,7 @@ bool GenericObjectMap::parse_header_key(const string &long_name,
   snapid_t snap;
   uint64_t pool;
   gen_t generation = ghobject_t::NO_GEN;
-  shard_id_t shard_id = shard_id_t::NO_SHARD;
+  shard_t shard_id = ghobject_t::NO_SHARD;
 
   string::const_iterator current = long_name.begin();
   string::const_iterator end;
@@ -246,7 +249,7 @@ bool GenericObjectMap::parse_header_key(const string &long_name,
       return false;
     shardstring = string(current, end);
 
-    shard_id = (shard_id_t)strtoul(shardstring.c_str(), NULL, 16);
+    shard_id = (shard_t)strtoul(shardstring.c_str(), NULL, 16);
   }
 
   if (out) {
@@ -1025,7 +1028,7 @@ void GenericObjectMap::remove_header(const coll_t &cid,
 }
 
 void GenericObjectMap::set_header(const coll_t &cid, const ghobject_t &oid,
-                                  _Header &header, KeyValueDB::Transaction t)
+                                  _Header header, KeyValueDB::Transaction t)
 {
   dout(20) << __func__ << " setting " << header.seq
            << " cid " << cid << " oid " << oid << " parent seq "
diff --git a/src/os/GenericObjectMap.h b/src/os/GenericObjectMap.h
index b254795..3c5e3cb 100644
--- a/src/os/GenericObjectMap.h
+++ b/src/os/GenericObjectMap.h
@@ -129,9 +129,6 @@ class GenericObjectMap {
   int submit_transaction(KeyValueDB::Transaction t) {
     return db->submit_transaction(t);
   }
-  int submit_transaction_sync(KeyValueDB::Transaction t) {
-    return db->submit_transaction_sync(t);
-  }
 
   /// persistent state for store @see generate_header
   struct State {
@@ -220,7 +217,7 @@ class GenericObjectMap {
     KeyValueDB::Transaction t);
 
   /// Set leaf node for c and oid to the value of header
-  void set_header(const coll_t &cid, const ghobject_t &oid, _Header &header,
+  void set_header(const coll_t &cid, const ghobject_t &oid, _Header header,
     KeyValueDB::Transaction t);
 
   // Move all modify member function to "protect", in order to indicate these
diff --git a/src/os/HashIndex.cc b/src/os/HashIndex.cc
index ca0b591..35cb49b 100644
--- a/src/os/HashIndex.cc
+++ b/src/os/HashIndex.cc
@@ -228,12 +228,12 @@ int HashIndex::col_split_level(
 int HashIndex::_split(
   uint32_t match,
   uint32_t bits,
-  CollectionIndex* dest) {
+  ceph::shared_ptr<CollectionIndex> dest) {
   assert(collection_version() == dest->collection_version());
   unsigned mkdirred = 0;
   return col_split_level(
     *this,
-    *static_cast<HashIndex*>(dest),
+    *static_cast<HashIndex*>(dest.get()),
     vector<string>(),
     bits,
     match,
@@ -344,152 +344,6 @@ int HashIndex::prep_delete() {
   return recursive_remove(vector<string>());
 }
 
-int HashIndex::_pre_hash_collection(uint32_t pg_num, uint64_t expected_num_objs) {
-  int ret;
-  vector<string> path;
-  subdir_info_s root_info;
-  // Make sure there is neither objects nor sub-folders
-  // in this collection
-  ret = get_info(path, &root_info);
-  if (ret < 0)
-    return ret;
-
-  // Do the folder splitting first
-  ret = pre_split_folder(pg_num, expected_num_objs);
-  if (ret < 0)
-    return ret;
-  // Initialize the folder info starting from root
-  return init_split_folder(path, 0);
-}
-
-int HashIndex::pre_split_folder(uint32_t pg_num, uint64_t expected_num_objs)
-{
-  // If folder merging is enabled (by setting the threshold positive),
-  // no need to split
-  if (merge_threshold > 0)
-    return 0;
-  const coll_t c = coll();
-  // Do not split if the expected number of objects in this collection is zero (by default)
-  if (expected_num_objs == 0)
-    return 0;
-
-  // Calculate the number of leaf folders (which actually store files)
-  // need to be created
-  const uint64_t objs_per_folder = (uint64_t)(abs(merge_threshold)) * (uint64_t)split_multiplier * 16;
-  uint64_t leavies = expected_num_objs / objs_per_folder ;
-  // No need to split
-  if (leavies == 0 || expected_num_objs == objs_per_folder)
-    return 0;
-
-  spg_t spgid;
-  if (!c.is_pg_prefix(spgid))
-    return -EINVAL;
-  const ps_t ps = spgid.pgid.ps();
-
-  // the most significant bits of pg_num
-  const int pg_num_bits = calc_num_bits(pg_num - 1);
-  ps_t tmp_id = ps;
-  // calculate the number of levels we only create one sub folder
-  int num = pg_num_bits / 4;
-  // pg num's hex value is like 1xxx,xxxx,xxxx but not 1111,1111,1111,
-  // so that splitting starts at level 3
-  if (pg_num_bits % 4 == 0 && pg_num < ((uint32_t)1 << pg_num_bits)) {
-    --num;
-  }
-
-  int ret;
-  // Start with creation that only has one subfolder
-  vector<string> paths;
-  int dump_num = num;
-  while (num-- > 0) {
-    ps_t v = tmp_id & 0x0000000f;
-    paths.push_back(to_hex(v));
-    ret = create_path(paths);
-    if (ret < 0 && ret != -EEXIST)
-      return ret;
-    tmp_id = tmp_id >> 4;
-  }
-
-  // Starting from here, we can split by creating multiple subfolders
-  const int left_bits = pg_num_bits - dump_num * 4;
-  // this variable denotes how many bits (for this level) that can be
-  // used for sub folder splitting
-  int split_bits = 4 - left_bits;
-  // the below logic is inspired by rados.h#ceph_stable_mod,
-  // it basically determines how many sub-folders should we
-  // create for splitting
-  if (((1 << (pg_num_bits - 1)) | ps) >= pg_num) {
-    ++split_bits;
-  }
-  const uint32_t subs = (1 << split_bits);
-  // Calculate how many levels we create starting from here
-  int level  = 0;
-  leavies /= subs;
-  while (leavies > 1) {
-    ++level;
-    leavies = leavies >> 4;
-  }
-  for (uint32_t i = 0; i < subs; ++i) {
-    int v = tmp_id | (i << ((4 - split_bits) % 4));
-    paths.push_back(to_hex(v));
-    ret = create_path(paths);
-    if (ret < 0 && ret != -EEXIST)
-      return ret;
-    ret = recursive_create_path(paths, level);
-    if (ret < 0)
-      return ret;
-    paths.pop_back();
-  }
-  return 0;
-}
-
-int HashIndex::init_split_folder(vector<string> &path, uint32_t hash_level)
-{
-  // Get the number of sub directories for the current path
-  set<string> subdirs;
-  int ret = list_subdirs(path, &subdirs);
-  if (ret < 0)
-    return ret;
-  subdir_info_s info;
-  info.subdirs = subdirs.size();
-  info.hash_level = hash_level;
-  ret = set_info(path, info);
-  if (ret < 0)
-    return ret;
-  ret = fsync_dir(path);
-  if (ret < 0)
-    return ret;
-
-  // Do the same for subdirs
-  set<string>::const_iterator iter;
-  for (iter = subdirs.begin(); iter != subdirs.end(); ++iter) {
-    path.push_back(*iter);
-    ret = init_split_folder(path, hash_level + 1);
-    if (ret < 0)
-      return ret;
-    path.pop_back();
-  }
-  return 0;
-}
-
-int HashIndex::recursive_create_path(vector<string>& path, int level)
-{
-  if (level == 0)
-    return 0;
-  int ret;
-  for (int i = 0; i < 16; ++i) {
-    path.push_back(to_hex(i));
-    ret = create_path(path);
-    if (ret < 0 && ret != -EEXIST)
-      return ret;
-    ret = recursive_create_path(path, level - 1);
-    if (ret < 0)
-      return ret;
-    path.pop_back();
-  }
-  return 0;
-}
-
 int HashIndex::recursive_remove(const vector<string> &path) {
   set<string> subdirs;
   int r = list_subdirs(path, &subdirs);
diff --git a/src/os/HashIndex.h b/src/os/HashIndex.h
index dad8ce3..4bf5c31 100644
--- a/src/os/HashIndex.h
+++ b/src/os/HashIndex.h
@@ -156,9 +156,9 @@ public:
   int _split(
     uint32_t match,
     uint32_t bits,
-    CollectionIndex* dest
+    ceph::shared_ptr<CollectionIndex> dest
     );
-
+	
 protected:
   int _init();
 
@@ -181,16 +181,6 @@ protected:
   int _collection_list(
     vector<ghobject_t> *ls
     );
-
-  /**
-   * Pre-hash the collection to create folders according to the expected number
-   * of objects in this collection.
-   */
-  int _pre_hash_collection(
-      uint32_t pg_num,
-      uint64_t expected_num_objs
-      );
-
   int _collection_list_partial(
     const ghobject_t &start,
     int min_count,
@@ -277,14 +267,6 @@ private:
     vector<string> *path   ///< [out] Path components for hoid.
     );
 
-  /// Pre-hash and split folders to avoid runtime splitting
-  /// according to the given expected object number.
-  int pre_split_folder(uint32_t pg_num, uint64_t expected_num_objs);
-
-  /// Initialize the folder (dir info) with the given hash
-  /// level and number of its subdirs.
-  int init_split_folder(vector<string> &path, uint32_t hash_level);
-
   /// do collection split for path
   static int col_split_level(
     HashIndex &from,            ///< [in] from index
@@ -334,25 +316,6 @@ private:
       *bits = path.size() * 4;
   }
 
-  /// Calculate the number of bits.
-  static int calc_num_bits(uint64_t n) {
-    int ret = 0;
-    while (n > 0) {
-      n = n >> 1;
-      ret++;
-    }
-    return ret;
-  }
-
-  /// Convert a number to hex string (upper case).
-  static string to_hex(int n) {
-    assert(n >= 0 && n < 16);
-    char c = (n <= 9 ? ('0' + n) : ('A' + n - 10));
-    string str;
-    str.append(1, c);
-    return str;
-  }
-
   /// Get path contents by hash
   int get_path_contents_by_hash(
     const vector<string> &path,            /// [in] Path to list
@@ -372,10 +335,6 @@ private:
     ghobject_t *next,            /// [in,out] List objects >= *next
     vector<ghobject_t> *out      /// [out] Listed objects
     ); ///< @return Error Code, 0 on success
-
-  /// Create the given levels of sub directories from the given root.
-  /// The contents of *path* is not changed after calling this function.
-  int recursive_create_path(vector<string>& path, int level);
 };
 
 #endif
diff --git a/src/os/IndexManager.cc b/src/os/IndexManager.cc
index ba9ec1f..e8a3785 100644
--- a/src/os/IndexManager.cc
+++ b/src/os/IndexManager.cc
@@ -61,18 +61,13 @@ static int get_version(const char *path, uint32_t *version) {
   return 0;
 }
 
-IndexManager::~IndexManager() {
-
-  for (map<coll_t, CollectionIndex* > ::iterator it = col_indices.begin(); 
-       it != col_indices.end(); ++it) {
-
-    delete it->second;
-    it->second = NULL;
-  }
-  col_indices.clear();
+void IndexManager::put_index(coll_t c) {
+  Mutex::Locker l(lock);
+  assert(col_indices.count(c));
+  col_indices.erase(c);
+  cond.Signal();
 }
 
-
 int IndexManager::init_index(coll_t c, const char *path, uint32_t version) {
   Mutex::Locker l(lock);
   int r = set_version(path, version);
@@ -85,7 +80,7 @@ int IndexManager::init_index(coll_t c, const char *path, uint32_t version) {
   return index.init();
 }
 
-int IndexManager::build_index(coll_t c, const char *path, CollectionIndex **index) {
+int IndexManager::build_index(coll_t c, const char *path, Index *index) {
   if (upgrade) {
     // Need to check the collection generation
     int r;
@@ -96,15 +91,17 @@ int IndexManager::build_index(coll_t c, const char *path, CollectionIndex **inde
 
     switch (version) {
     case CollectionIndex::FLAT_INDEX_TAG: {
-      *index = new FlatIndex(c, path);
+      *index = Index(new FlatIndex(c, path),
+		     RemoveOnDelete(c, this));
       return 0;
     }
     case CollectionIndex::HASH_INDEX_TAG: // fall through
     case CollectionIndex::HASH_INDEX_TAG_2: // fall through
     case CollectionIndex::HOBJECT_WITH_POOL: {
       // Must be a HashIndex
-      *index = new HashIndex(c, path, g_conf->filestore_merge_threshold,
-				   g_conf->filestore_split_multiple, version);
+      *index = Index(new HashIndex(c, path, g_conf->filestore_merge_threshold,
+				   g_conf->filestore_split_multiple, version), 
+		     RemoveOnDelete(c, this));
       return 0;
     }
     default: assert(0);
@@ -112,29 +109,28 @@ int IndexManager::build_index(coll_t c, const char *path, CollectionIndex **inde
 
   } else {
     // No need to check
-    *index = new HashIndex(c, path, g_conf->filestore_merge_threshold,
+    *index = Index(new HashIndex(c, path, g_conf->filestore_merge_threshold,
 				 g_conf->filestore_split_multiple,
 				 CollectionIndex::HOBJECT_WITH_POOL,
-				 g_conf->filestore_index_retry_probability);
+				 g_conf->filestore_index_retry_probability),
+		   RemoveOnDelete(c, this));
     return 0;
   }
 }
 
-int IndexManager::get_index(coll_t c, const string& baseDir, Index *index) {
-
+int IndexManager::get_index(coll_t c, const char *path, Index *index) {
   Mutex::Locker l(lock);
-  map<coll_t, CollectionIndex* > ::iterator it = col_indices.find(c);
-  if (it == col_indices.end()) {
-    char path[PATH_MAX];
-    snprintf(path, sizeof(path), "%s/current/%s", baseDir.c_str(), c.to_str().c_str());
-    CollectionIndex* colIndex = NULL;
-    int r = build_index(c, path, &colIndex);
-    if (r < 0)
-      return r;
-    col_indices[c] = colIndex;
-    index->index = colIndex;
-  } else {
-    index->index = it->second;
+  while (1) {
+    if (!col_indices.count(c)) {
+      int r = build_index(c, path, index);
+      if (r < 0)
+	return r;
+      (*index)->set_ref(*index);
+      col_indices[c] = (*index);
+      break;
+    } else {
+      cond.Wait(lock);
+    }
   }
   return 0;
 }
diff --git a/src/os/IndexManager.h b/src/os/IndexManager.h
index 7837fb7..2aa7c66 100644
--- a/src/os/IndexManager.h
+++ b/src/os/IndexManager.h
@@ -28,17 +28,7 @@
 
 
 /// Public type for Index
-struct Index {
-  CollectionIndex *index;
-
-  Index() : index(NULL) {}
-  Index(CollectionIndex* index) : index(index) {}
-
-  CollectionIndex *operator->() { return index; }
-  CollectionIndex &operator*() { return *index; }
-};
-
-
+typedef ceph::shared_ptr<CollectionIndex> Index;
 /**
  * Encapsulates mutual exclusion for CollectionIndexes.
  *
@@ -47,12 +37,39 @@ struct Index {
  * that path) may result in the path becoming invalid.  Thus, during
  * the lifetime of a CollectionIndex object and any paths returned
  * by it, no other concurrent accesses may be allowed.
- * This is enforced by using CollectionIndex::access_lock
+ *
+ * This is enforced using shared_ptr.  A shared_ptr<CollectionIndex>
+ * is returned from get_index.  Any paths generated using that object
+ * carry a reference to the parrent index.  Once all
+ * shared_ptr<CollectionIndex> references have expired, the destructor
+ * removes the weak_ptr from col_indices and wakes waiters.
  */
 class IndexManager {
   Mutex lock; ///< Lock for Index Manager
+  Cond cond;  ///< Cond for waiters on col_indices
   bool upgrade;
-  map<coll_t, CollectionIndex* > col_indices;
+
+  /// Currently in use CollectionIndices
+  map<coll_t,ceph::weak_ptr<CollectionIndex> > col_indices;
+
+  /// Cleans up state for c @see RemoveOnDelete
+  void put_index(
+    coll_t c ///< Put the index for c
+    );
+
+  /// Callback for shared_ptr release @see get_index
+  class RemoveOnDelete {
+  public:
+    coll_t c;
+    IndexManager *manager;
+    RemoveOnDelete(coll_t c, IndexManager *manager) : 
+      c(c), manager(manager) {}
+
+    void operator()(CollectionIndex *index) {
+      manager->put_index(c);
+      delete index;
+    }
+  };
 
   /**
    * Index factory
@@ -65,14 +82,12 @@ class IndexManager {
    * @param [out] index Index for c
    * @return error code
    */
-  int build_index(coll_t c, const char *path, CollectionIndex **index);
+  int build_index(coll_t c, const char *path, Index *index);
 public:
   /// Constructor
   IndexManager(bool upgrade) : lock("IndexManager lock"),
 			       upgrade(upgrade) {}
 
-  ~IndexManager();
-
   /**
    * Reserve and return index for c
    *
@@ -81,7 +96,7 @@ public:
    * @param [out] index Index for c
    * @return error code
    */
-  int get_index(coll_t c, const string& baseDir, Index *index);
+  int get_index(coll_t c, const char *path, Index *index);
 
   /**
    * Initialize index for collection c at path
diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc
index 518d54e..7616fe2 100644
--- a/src/os/JournalingObjectStore.cc
+++ b/src/os/JournalingObjectStore.cc
@@ -21,11 +21,6 @@ void JournalingObjectStore::journal_stop()
 {
   dout(10) << "journal_stop" << dendl;
   finisher.stop();
-}
-
-// A journal_replay() makes journal writeable, this closes that out.
-void JournalingObjectStore::journal_write_close()
-{
   if (journal) {
     journal->close();
     delete journal;
@@ -48,10 +43,8 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
   uint64_t op_seq = fs_op_seq;
   apply_manager.init_seq(fs_op_seq);
 
-  if (!journal) {
-    submit_manager.set_op_seq(op_seq);
+  if (!journal)
     return 0;
-  }
 
   int err = journal->open(op_seq);
   if (err < 0) {
diff --git a/src/os/JournalingObjectStore.h b/src/os/JournalingObjectStore.h
index 6a09c61..fb7f0ec 100644
--- a/src/os/JournalingObjectStore.h
+++ b/src/os/JournalingObjectStore.h
@@ -111,7 +111,6 @@ protected:
 protected:
   void journal_start();
   void journal_stop();
-  void journal_write_close();
   int journal_replay(uint64_t fs_op_seq);
 
   void _op_journal_transactions(list<ObjectStore::Transaction*>& tls, uint64_t op,
diff --git a/src/os/KeyValueDB.cc b/src/os/KeyValueDB.cc
deleted file mode 100644
index e739329..0000000
--- a/src/os/KeyValueDB.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#include "KeyValueDB.h"
-#include "LevelDBStore.h"
-#ifdef HAVE_LIBROCKSDB
-#include "RocksDBStore.h"
-#endif
-
-KeyValueDB *KeyValueDB::create(CephContext *cct, const string& type,
-			       const string& dir)
-{
-  if (type == "leveldb") {
-    return new LevelDBStore(cct, dir);
-  }
-#ifdef HAVE_KINETIC
-  if (kv_type == KV_TYPE_KINETIC) {
-    store = new KineticStore(g_ceph_context);
-  }
-#endif
-#ifdef HAVE_LIBROCKSDB
-  if (type == "rocksdb") {
-    return new RocksDBStore(cct, dir);
-  }
-#endif
-  return NULL;
-}
-
-int KeyValueDB::test_init(const string& type, const string& dir)
-{
-  if (type == "leveldb"){
-    return LevelDBStore::_test_init(dir);
-  }
-#ifdef HAVE_KINETIC
-  if (kv_type == KV_TYPE_KINETIC) {
-    return 0;
-  }
-#endif
-#ifdef HAVE_LIBROCKSDB
-  if (type == "rocksdb"){
-    return RocksDBStore::_test_init(dir);
-  }
-#endif
-  return -EINVAL;
-}
diff --git a/src/os/KeyValueDB.h b/src/os/KeyValueDB.h
index 0ac512f..c581aa5 100644
--- a/src/os/KeyValueDB.h
+++ b/src/os/KeyValueDB.h
@@ -60,16 +60,10 @@ public:
       const string &prefix ///< [in] Prefix by which to remove keys
       ) = 0;
 
-    virtual ~TransactionImpl() {}
+    virtual ~TransactionImpl() {};
   };
   typedef ceph::shared_ptr< TransactionImpl > Transaction;
 
-  /// create a new instance
-  static KeyValueDB *create(CephContext *cct, const string& type,
-			    const string& dir);
-
-  /// test whether we can successfully initialize; may have side effects (e.g., create)
-  static int test_init(const string& type, const string& dir);
   virtual int init() = 0;
   virtual int open(ostream &out) = 0;
   virtual int create_and_open(ostream &out) = 0;
@@ -179,18 +173,6 @@ public:
 
   virtual ~KeyValueDB() {}
 
-  /// compact the underlying store
-  virtual void compact() {}
-
-  /// compact db for all keys with a given prefix
-  virtual void compact_prefix(const string& prefix) {}
-  /// compact db for all keys with a given prefix, async
-  virtual void compact_prefix_async(const string& prefix) {}
-  virtual void compact_range(const string& prefix,
-			     const string& start, const string& end) {}
-  virtual void compact_range_async(const string& prefix,
-				   const string& start, const string& end) {}
-
 protected:
   virtual WholeSpaceIterator _get_iterator() = 0;
   virtual WholeSpaceIterator _get_snapshot_iterator() = 0;
diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc
index 732a96c..17c0c3b 100644
--- a/src/os/KeyValueStore.cc
+++ b/src/os/KeyValueStore.cc
@@ -48,10 +48,7 @@
 #include "common/safe_io.h"
 #include "common/perf_counters.h"
 #include "common/sync_filesystem.h"
-
-#ifdef HAVE_KINETIC
-#include "KineticStore.h"
-#endif
+#include "LevelDBStore.h"
 
 #include "common/ceph_crypto.h"
 using ceph::crypto::SHA1;
@@ -70,24 +67,6 @@ const string KeyValueStore::OBJECT_OMAP_HEADER_KEY = "__OBJOMAP_HEADER__KEY_";
 const string KeyValueStore::COLLECTION = "__COLLECTION__";
 const string KeyValueStore::COLLECTION_ATTR = "__COLL_ATTR__";
 
-
-//Initial features in new superblock.
-static CompatSet get_kv_initial_compat_set() {
-  CompatSet::FeatureSet ceph_osd_feature_compat;
-  CompatSet::FeatureSet ceph_osd_feature_ro_compat;
-  CompatSet::FeatureSet ceph_osd_feature_incompat;
-  return CompatSet(ceph_osd_feature_compat, ceph_osd_feature_ro_compat,
-		   ceph_osd_feature_incompat);
-}
-
-//Features are added here that this KeyValueStore supports.
-static CompatSet get_kv_supported_compat_set() {
-  CompatSet compat =  get_kv_initial_compat_set();
-  //Any features here can be set in code, but not in initial superblock
-  return compat;
-}
-
-
 // ============== StripObjectMap Implementation =================
 
 int StripObjectMap::save_strip_header(StripObjectHeaderRef strip_header,
@@ -446,7 +425,7 @@ int KeyValueStore::BufferTransaction::submit_transaction()
     }
   }
 
-  r = store->backend->submit_transaction_sync(t);
+  r = store->backend->submit_transaction(t);
   for (list<Context*>::iterator it = finishes.begin(); it != finishes.end(); ++it) {
     (*it)->complete(r);
   }
@@ -495,6 +474,7 @@ KeyValueStore::KeyValueStore(const std::string &base,
   internal_name(name),
   basedir(base),
   fsid_fd(-1), current_fd(-1),
+  kv_type(KV_TYPE_NONE),
   backend(NULL),
   ondisk_finisher(g_ceph_context),
   lock("KeyValueStore::lock"),
@@ -506,11 +486,9 @@ KeyValueStore::KeyValueStore(const std::string &base,
         g_conf->keyvaluestore_op_threads, "keyvaluestore_op_threads"),
   op_wq(this, g_conf->keyvaluestore_op_thread_timeout,
         g_conf->keyvaluestore_op_thread_suicide_timeout, &op_tp),
-  perf_logger(NULL),
+  logger(NULL),
   m_keyvaluestore_queue_max_ops(g_conf->keyvaluestore_queue_max_ops),
   m_keyvaluestore_queue_max_bytes(g_conf->keyvaluestore_queue_max_bytes),
-  m_keyvaluestore_strip_size(g_conf->keyvaluestore_default_strip_size),
-  m_keyvaluestore_max_expected_write_size(g_conf->keyvaluestore_max_expected_write_size),
   do_update(do_update)
 {
   ostringstream oss;
@@ -521,8 +499,8 @@ KeyValueStore::KeyValueStore(const std::string &base,
   sss << basedir << "/current/commit_op_seq";
   current_op_seq_fn = sss.str();
 
-  // initialize perf_logger
-  PerfCountersBuilder plb(g_ceph_context, internal_name, l_os_commit_len, l_os_last);
+  // initialize logger
+  PerfCountersBuilder plb(g_ceph_context, internal_name, l_os_commit_lat, l_os_last);
 
   plb.add_u64(l_os_oq_max_ops, "op_queue_max_ops");
   plb.add_u64(l_os_oq_ops, "op_queue_ops");
@@ -530,24 +508,21 @@ KeyValueStore::KeyValueStore(const std::string &base,
   plb.add_u64(l_os_oq_max_bytes, "op_queue_max_bytes");
   plb.add_u64(l_os_oq_bytes, "op_queue_bytes");
   plb.add_u64_counter(l_os_bytes, "bytes");
-  plb.add_time_avg(l_os_commit_lat, "commit_latency");
   plb.add_time_avg(l_os_apply_lat, "apply_latency");
   plb.add_time_avg(l_os_queue_lat, "queue_transaction_latency_avg");
 
-  perf_logger = plb.create_perf_counters();
+  logger = plb.create_perf_counters();
 
-  g_ceph_context->get_perfcounters_collection()->add(perf_logger);
+  g_ceph_context->get_perfcounters_collection()->add(logger);
   g_ceph_context->_conf->add_observer(this);
-
-  superblock.compat_features = get_kv_initial_compat_set();
 }
 
 KeyValueStore::~KeyValueStore()
 {
   g_ceph_context->_conf->remove_observer(this);
-  g_ceph_context->get_perfcounters_collection()->remove(perf_logger);
+  g_ceph_context->get_perfcounters_collection()->remove(logger);
 
-  delete perf_logger;
+  delete logger;
 }
 
 int KeyValueStore::statfs(struct statfs *buf)
@@ -634,26 +609,34 @@ int KeyValueStore::mkfs()
     goto close_fsid_fd;
   }
 
-  // superblock
-  superblock.backend = g_conf->keyvaluestore_backend;
-  ret = write_superblock();
-  if (ret < 0) {
-    derr << "KeyValueStore::mkfs write_superblock() failed: "
-	 << cpp_strerror(ret) << dendl;
+  if (_detect_backend()) {
+    derr << "KeyValueStore::mkfs error in _detect_backend" << dendl;
+    ret = -1;
     goto close_fsid_fd;
   }
 
   {
-    ret = KeyValueDB::test_init(superblock.backend, current_fn.c_str());
-    if(ret < 0)
-    {
-      derr << __func__  << " failed to create backend type "
-	   << g_conf->keyvaluestore_backend << "." << dendl;
+    KeyValueDB *store;
+    if (kv_type == KV_TYPE_LEVELDB) {
+      store = new LevelDBStore(g_ceph_context, current_fn);
+    } else {
+      derr << "KeyValueStore::mkfs error: unknown backend type" << kv_type << dendl;
       ret = -1;
       goto close_fsid_fd;
+    }
 
+    store->init();
+    stringstream err;
+    if (store->create_and_open(err)) {
+      derr << "KeyValueStore::mkfs failed to create keyvaluestore backend: "
+           << err.str() << dendl;
+      ret = -1;
+      delete store;
+      goto close_fsid_fd;
+    } else {
+      delete store;
+      dout(1) << "keyvaluestore backend exists/created" << dendl;
     }
-    dout(1) << g_conf->keyvaluestore_backend << " backend exists/created" << dendl;
   }
 
   dout(1) << "mkfs done in " << basedir << dendl;
@@ -721,36 +704,6 @@ bool KeyValueStore::test_mount_in_use()
   return inuse;
 }
 
-int KeyValueStore::write_superblock()
-{
-  bufferlist bl;
-  ::encode(superblock, bl);
-  return safe_write_file(basedir.c_str(), "superblock",
-      bl.c_str(), bl.length());
-}
-
-int KeyValueStore::read_superblock()
-{
-  bufferptr bp(PATH_MAX);
-  int ret = safe_read_file(basedir.c_str(), "superblock",
-      bp.c_str(), bp.length());
-  if (ret < 0) {
-    if (ret == -ENOENT) {
-      // If the file doesn't exist write initial CompatSet
-      return write_superblock();
-    }
-    return ret;
-  }
-
-  bufferlist bl;
-  bl.push_back(bp);
-  bufferlist::iterator i = bl.begin();
-  ::decode(superblock, i);
-  return 0;
-}
-
-
-
 int KeyValueStore::update_version_stamp()
 {
   return write_version_stamp();
@@ -789,7 +742,6 @@ int KeyValueStore::mount()
 {
   int ret;
   char buf[PATH_MAX];
-  CompatSet supported_compat_set = get_kv_supported_compat_set();
 
   dout(5) << "basedir " << basedir << dendl;
 
@@ -846,21 +798,6 @@ int KeyValueStore::mount()
       goto close_fsid_fd;
     }
   }
-  
-  superblock.backend = g_conf->keyvaluestore_backend;
-  ret = read_superblock();
-  if (ret < 0) {
-    ret = -EINVAL;
-    goto close_fsid_fd;
-  }
-
-  // Check if this KeyValueStore supports all the necessary features to mount
-  if (supported_compat_set.compare(superblock.compat_features) == -1) {
-    derr << "KeyValueStore::mount : Incompatible features set "
-	   << superblock.compat_features << dendl;
-    ret = -EINVAL;
-    goto close_fsid_fd;
-  }
 
   current_fd = ::open(current_fn.c_str(), O_RDONLY);
   if (current_fd < 0) {
@@ -872,26 +809,28 @@ int KeyValueStore::mount()
 
   assert(current_fd >= 0);
 
+  if (_detect_backend()) {
+    derr << "KeyValueStore::mount error in _detect_backend" << dendl;
+    ret = -1;
+    goto close_current_fd;
+  }
+
   {
-    if (superblock.backend.empty())
-      superblock.backend = g_conf->keyvaluestore_backend;
-    KeyValueDB *store = KeyValueDB::create(g_ceph_context,
-					   superblock.backend,
-					   current_fn.c_str());
-    if(!store)
-    {
-      derr << "KeyValueStore::mount backend type "
-	   << superblock.backend << " error" << dendl;
+    KeyValueDB *store;
+    if (kv_type == KV_TYPE_LEVELDB) {
+      store = new LevelDBStore(g_ceph_context, current_fn);
+    } else {
+      derr << "KeyValueStore::mount error: unknown backend type" << kv_type
+           << dendl;
       ret = -1;
-      goto close_fsid_fd;
-
+      goto close_current_fd;
     }
 
     store->init();
     stringstream err;
     if (store->open(err)) {
-      derr << "KeyValueStore::mount Error initializing keyvaluestore backend "
-           << superblock.backend << ": " << err.str() << dendl;
+      derr << "KeyValueStore::mount Error initializing keyvaluestore backend: "
+           << err.str() << dendl;
       ret = -1;
       delete store;
       goto close_current_fd;
@@ -907,13 +846,12 @@ int KeyValueStore::mount()
     stringstream err2;
 
     if (g_conf->keyvaluestore_debug_check_backend && !dbomap->check(err2)) {
-      derr << err2.str() << dendl;
+      derr << err2.str() << dendl;;
       delete dbomap;
       ret = -EINVAL;
       goto close_current_fd;
     }
 
-    default_strip_size = m_keyvaluestore_strip_size;
     backend.reset(dbomap);
   }
 
@@ -957,6 +895,21 @@ int KeyValueStore::umount()
   return 0;
 }
 
+int KeyValueStore::get_max_object_name_length()
+{
+  lock.Lock();
+  int ret = pathconf(basedir.c_str(), _PC_NAME_MAX);
+  if (ret < 0) {
+    int err = errno;
+    lock.Unlock();
+    if (err == 0)
+      return -EDOM;
+    return -err;
+  }
+  lock.Unlock();
+  return ret;
+}
+
 int KeyValueStore::queue_transactions(Sequencer *posr, list<Transaction*> &tls,
                                       TrackedOpRef osd_op,
                                       ThreadPool::TPHandle *handle)
@@ -1025,8 +978,8 @@ void KeyValueStore::queue_op(OpSequencer *osr, Op *o)
 
   osr->queue(o);
 
-  perf_logger->inc(l_os_ops);
-  perf_logger->inc(l_os_bytes, o->bytes);
+  logger->inc(l_os_ops);
+  logger->inc(l_os_bytes, o->bytes);
 
   dout(5) << "queue_op " << o << " seq " << o->op << " " << *osr << " "
           << o->bytes << " bytes" << "   (queue has " << op_queue_len
@@ -1039,8 +992,8 @@ void KeyValueStore::op_queue_reserve_throttle(Op *o, ThreadPool::TPHandle *handl
   uint64_t max_ops = m_keyvaluestore_queue_max_ops;
   uint64_t max_bytes = m_keyvaluestore_queue_max_bytes;
 
-  perf_logger->set(l_os_oq_max_ops, max_ops);
-  perf_logger->set(l_os_oq_max_bytes, max_bytes);
+  logger->set(l_os_oq_max_ops, max_ops);
+  logger->set(l_os_oq_max_bytes, max_bytes);
 
   utime_t start = ceph_clock_now(g_ceph_context);
   {
@@ -1062,10 +1015,10 @@ void KeyValueStore::op_queue_reserve_throttle(Op *o, ThreadPool::TPHandle *handl
     op_queue_bytes += o->bytes;
   }
   utime_t end = ceph_clock_now(g_ceph_context);
-  perf_logger->tinc(l_os_queue_lat, end - start);
+  logger->tinc(l_os_queue_lat, end - start);
 
-  perf_logger->set(l_os_oq_ops, op_queue_len);
-  perf_logger->set(l_os_oq_bytes, op_queue_bytes);
+  logger->set(l_os_oq_ops, op_queue_len);
+  logger->set(l_os_oq_bytes, op_queue_bytes);
 }
 
 void KeyValueStore::op_queue_release_throttle(Op *o)
@@ -1077,8 +1030,8 @@ void KeyValueStore::op_queue_release_throttle(Op *o)
     op_throttle_cond.Signal();
   }
 
-  perf_logger->set(l_os_oq_ops, op_queue_len);
-  perf_logger->set(l_os_oq_bytes, op_queue_bytes);
+  logger->set(l_os_oq_ops, op_queue_len);
+  logger->set(l_os_oq_bytes, op_queue_bytes);
 }
 
 void KeyValueStore::_do_op(OpSequencer *osr, ThreadPool::TPHandle &handle)
@@ -1113,8 +1066,7 @@ void KeyValueStore::_finish_op(OpSequencer *osr)
 
   utime_t lat = ceph_clock_now(g_ceph_context);
   lat -= o->start;
-  perf_logger->tinc(l_os_commit_lat, lat);
-  perf_logger->tinc(l_os_apply_lat, lat);
+  logger->tinc(l_os_apply_lat, lat);
 
   if (o->onreadable_sync) {
     o->onreadable_sync->complete(0);
@@ -1178,7 +1130,7 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
     if (handle)
       handle->reset_tp_timeout();
 
-    int op = i.decode_op();
+    int op = i.get_op();
     int r = 0;
 
     switch (op) {
@@ -1187,69 +1139,69 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
 
     case Transaction::OP_TOUCH:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         r = _touch(cid, oid, t);
       }
       break;
 
     case Transaction::OP_WRITE:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        uint64_t off = i.decode_length();
-        uint64_t len = i.decode_length();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        uint64_t off = i.get_length();
+        uint64_t len = i.get_length();
         bool replica = i.get_replica();
         bufferlist bl;
-        i.decode_bl(bl);
+        i.get_bl(bl);
         r = _write(cid, oid, off, len, bl, t, replica);
       }
       break;
 
     case Transaction::OP_ZERO:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        uint64_t off = i.decode_length();
-        uint64_t len = i.decode_length();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        uint64_t off = i.get_length();
+        uint64_t len = i.get_length();
         r = _zero(cid, oid, off, len, t);
       }
       break;
 
     case Transaction::OP_TRIMCACHE:
       {
-        i.decode_cid();
-        i.decode_oid();
-        i.decode_length();
-        i.decode_length();
+        i.get_cid();
+        i.get_oid();
+        i.get_length();
+        i.get_length();
         // deprecated, no-op
       }
       break;
 
     case Transaction::OP_TRUNCATE:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        uint64_t off = i.decode_length();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        uint64_t off = i.get_length();
         r = _truncate(cid, oid, off, t);
       }
       break;
 
     case Transaction::OP_REMOVE:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         r = _remove(cid, oid, t);
       }
       break;
 
     case Transaction::OP_SETATTR:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        string name = i.decode_attrname();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        string name = i.get_attrname();
         bufferlist bl;
-        i.decode_bl(bl);
+        i.get_bl(bl);
         map<string, bufferptr> to_set;
         to_set[name] = bufferptr(bl.c_str(), bl.length());
         r = _setattrs(cid, oid, to_set, t);
@@ -1261,10 +1213,10 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
 
     case Transaction::OP_SETATTRS:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         map<string, bufferptr> aset;
-        i.decode_attrset(aset);
+        i.get_attrset(aset);
         r = _setattrs(cid, oid, aset, t);
         if (r == -ENOSPC)
           dout(0) << " ENOSPC on setxattrs on " << cid << "/" << oid << dendl;
@@ -1273,100 +1225,80 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
 
     case Transaction::OP_RMATTR:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        string name = i.decode_attrname();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        string name = i.get_attrname();
         r = _rmattr(cid, oid, name.c_str(), t);
       }
       break;
 
     case Transaction::OP_RMATTRS:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         r = _rmattrs(cid, oid, t);
       }
       break;
 
     case Transaction::OP_CLONE:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        ghobject_t noid = i.decode_oid();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        ghobject_t noid = i.get_oid();
         r = _clone(cid, oid, noid, t);
       }
       break;
 
     case Transaction::OP_CLONERANGE:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        ghobject_t noid = i.decode_oid();
-        uint64_t off = i.decode_length();
-        uint64_t len = i.decode_length();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        ghobject_t noid = i.get_oid();
+        uint64_t off = i.get_length();
+        uint64_t len = i.get_length();
         r = _clone_range(cid, oid, noid, off, len, off, t);
       }
       break;
 
     case Transaction::OP_CLONERANGE2:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        ghobject_t noid = i.decode_oid();
-        uint64_t srcoff = i.decode_length();
-        uint64_t len = i.decode_length();
-        uint64_t dstoff = i.decode_length();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        ghobject_t noid = i.get_oid();
+        uint64_t srcoff = i.get_length();
+        uint64_t len = i.get_length();
+        uint64_t dstoff = i.get_length();
         r = _clone_range(cid, oid, noid, srcoff, len, dstoff, t);
       }
       break;
 
     case Transaction::OP_MKCOLL:
       {
-        coll_t cid = i.decode_cid();
+        coll_t cid = i.get_cid();
         r = _create_collection(cid, t);
       }
       break;
 
-    case Transaction::OP_COLL_HINT:
-      {
-        coll_t cid = i.decode_cid();
-        uint32_t type = i.decode_u32();
-        bufferlist hint;
-        i.decode_bl(hint);
-        bufferlist::iterator hiter = hint.begin();
-        if (type == Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS) {
-          uint32_t pg_num;
-          uint64_t num_objs;
-          ::decode(pg_num, hiter);
-          ::decode(num_objs, hiter);
-          r = _collection_hint_expected_num_objs(cid, pg_num, num_objs);
-        } else {
-          // Ignore the hint
-          dout(10) << "Unrecognized collection hint type: " << type << dendl;
-        }
-      }
-      break;
-
     case Transaction::OP_RMCOLL:
       {
-        coll_t cid = i.decode_cid();
+        coll_t cid = i.get_cid();
         r = _destroy_collection(cid, t);
       }
       break;
 
     case Transaction::OP_COLL_ADD:
       {
-        coll_t ncid = i.decode_cid();
-        coll_t ocid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t ncid = i.get_cid();
+        coll_t ocid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         r = _collection_add(ncid, ocid, oid, t);
       }
       break;
 
     case Transaction::OP_COLL_REMOVE:
        {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         r = _remove(cid, oid, t);
        }
       break;
@@ -1374,37 +1306,37 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
     case Transaction::OP_COLL_MOVE:
       {
         // WARNING: this is deprecated and buggy; only here to replay old journals.
-        coll_t ocid = i.decode_cid();
-        coll_t ncid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
+        coll_t ocid = i.get_cid();
+        coll_t ncid = i.get_cid();
+        ghobject_t oid = i.get_oid();
         r = _collection_move_rename(ocid, oid, ncid, oid, t);
       }
       break;
 
     case Transaction::OP_COLL_MOVE_RENAME:
       {
-        coll_t oldcid = i.decode_cid();
-        ghobject_t oldoid = i.decode_oid();
-        coll_t newcid = i.decode_cid();
-        ghobject_t newoid = i.decode_oid();
+        coll_t oldcid = i.get_cid();
+        ghobject_t oldoid = i.get_oid();
+        coll_t newcid = i.get_cid();
+        ghobject_t newoid = i.get_oid();
         r = _collection_move_rename(oldcid, oldoid, newcid, newoid, t);
       }
       break;
 
     case Transaction::OP_COLL_SETATTR:
       {
-        coll_t cid = i.decode_cid();
-        string name = i.decode_attrname();
+        coll_t cid = i.get_cid();
+        string name = i.get_attrname();
         bufferlist bl;
-        i.decode_bl(bl);
+        i.get_bl(bl);
         r = _collection_setattr(cid, name.c_str(), bl.c_str(), bl.length(), t);
       }
       break;
 
     case Transaction::OP_COLL_RMATTR:
       {
-        coll_t cid = i.decode_cid();
-        string name = i.decode_attrname();
+        coll_t cid = i.get_cid();
+        string name = i.get_attrname();
         r = _collection_rmattr(cid, name.c_str(), t);
       }
       break;
@@ -1417,83 +1349,82 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
 
     case Transaction::OP_COLL_RENAME:
       {
-        coll_t cid(i.decode_cid());
-        coll_t ncid(i.decode_cid());
+        coll_t cid(i.get_cid());
+        coll_t ncid(i.get_cid());
         r = _collection_rename(cid, ncid, t);
       }
       break;
 
     case Transaction::OP_OMAP_CLEAR:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
         r = _omap_clear(cid, oid, t);
       }
       break;
     case Transaction::OP_OMAP_SETKEYS:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
         map<string, bufferlist> aset;
-        i.decode_attrset(aset);
+        i.get_attrset(aset);
         r = _omap_setkeys(cid, oid, aset, t);
       }
       break;
     case Transaction::OP_OMAP_RMKEYS:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
         set<string> keys;
-        i.decode_keyset(keys);
+        i.get_keyset(keys);
         r = _omap_rmkeys(cid, oid, keys, t);
       }
       break;
     case Transaction::OP_OMAP_RMKEYRANGE:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
         string first, last;
-        first = i.decode_key();
-        last = i.decode_key();
+        first = i.get_key();
+        last = i.get_key();
         r = _omap_rmkeyrange(cid, oid, first, last, t);
       }
       break;
     case Transaction::OP_OMAP_SETHEADER:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
         bufferlist bl;
-        i.decode_bl(bl);
+        i.get_bl(bl);
         r = _omap_setheader(cid, oid, bl, t);
       }
       break;
     case Transaction::OP_SPLIT_COLLECTION:
       {
-        coll_t cid(i.decode_cid());
-        uint32_t bits(i.decode_u32());
-        uint32_t rem(i.decode_u32());
-        coll_t dest(i.decode_cid());
+        coll_t cid(i.get_cid());
+        uint32_t bits(i.get_u32());
+        uint32_t rem(i.get_u32());
+        coll_t dest(i.get_cid());
         r = _split_collection_create(cid, bits, rem, dest, t);
       }
       break;
     case Transaction::OP_SPLIT_COLLECTION2:
       {
-        coll_t cid(i.decode_cid());
-        uint32_t bits(i.decode_u32());
-        uint32_t rem(i.decode_u32());
-        coll_t dest(i.decode_cid());
+        coll_t cid(i.get_cid());
+        uint32_t bits(i.get_u32());
+        uint32_t rem(i.get_u32());
+        coll_t dest(i.get_cid());
         r = _split_collection(cid, bits, rem, dest, t);
       }
       break;
 
     case Transaction::OP_SETALLOCHINT:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
-        uint64_t expected_object_size = i.decode_length();
-        uint64_t expected_write_size = i.decode_length();
-        r = _set_alloc_hint(cid, oid, expected_object_size,
-                            expected_write_size, t);
+        // TODO: can kvstore make use of the hint?
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
+        (void)i.get_length();  // discard result
+        (void)i.get_length();  // discard result
       }
       break;
 
@@ -2067,7 +1998,7 @@ int KeyValueStore::getattr(coll_t cid, const ghobject_t& oid, const char *name,
 }
 
 int KeyValueStore::getattrs(coll_t cid, const ghobject_t& oid,
-                           map<string,bufferptr>& aset)
+                           map<string,bufferptr>& aset, bool user_only)
 {
   int r;
   map<string, bufferlist> attr_aset;
@@ -2084,7 +2015,15 @@ int KeyValueStore::getattrs(coll_t cid, const ghobject_t& oid,
   for (map<string, bufferlist>::iterator i = attr_aset.begin();
        i != attr_aset.end(); ++i) {
     string key;
-    key = i->first;
+    if (user_only) {
+      if (i->first[0] != '_')
+        continue;
+      if (i->first == "_")
+        continue;
+      key = i->first.substr(1, i->first.size());
+    } else {
+      key = i->first;
+    }
     aset.insert(make_pair(key,
                 bufferptr(i->second.c_str(), i->second.length())));
   }
@@ -3049,54 +2988,11 @@ int KeyValueStore::_split_collection(coll_t cid, uint32_t bits, uint32_t rem,
   return 0;
 }
 
-int KeyValueStore::_set_alloc_hint(coll_t cid, const ghobject_t& oid,
-                                   uint64_t expected_object_size,
-                                   uint64_t expected_write_size,
-                                   BufferTransaction &t)
-{
-  dout(15) << __func__ << " " << cid << "/" << oid << " object_size "
-           << expected_object_size << " write_size "
-           << expected_write_size << dendl;
-
-  int r = 0;
-  StripObjectMap::StripObjectHeaderRef header;
-
-  r = t.lookup_cached_header(cid, oid, &header, false);
-  if (r < 0) {
-    dout(10) << __func__ << " " << cid << "/" << oid
-             << " failed to get header: r = " << r << dendl;
-    return r;
-  }
-
-  bool blank = true;
-  for (vector<char>::iterator it = header->bits.begin();
-       it != header->bits.end(); ++it) {
-    if (*it) {
-      blank = false;
-      break;
-    }
-  }
-
-  // Now only consider to change "strip_size" when the object is blank,
-  // because set_alloc_hint is expected to be very lightweight<O(1)>
-  if (blank) {
-    // header->strip_size = MIN(expected_write_size, m_keyvaluestore_max_expected_write_size);
-    // dout(20) << __func__ << " hint " << header->strip_size << " success" << dendl;
-  }
-
-  dout(10) << __func__ << "" << cid << "/" << oid << " object_size "
-           << expected_object_size << " write_size "
-           << expected_write_size << " = " << r << dendl;
-
-  return r;
-}
-
 const char** KeyValueStore::get_tracked_conf_keys() const
 {
   static const char* KEYS[] = {
     "keyvaluestore_queue_max_ops",
     "keyvaluestore_queue_max_bytes",
-    "keyvaluestore_strip_size",
     NULL
   };
   return KEYS;
@@ -3106,59 +3002,12 @@ void KeyValueStore::handle_conf_change(const struct md_config_t *conf,
                                        const std::set <std::string> &changed)
 {
   if (changed.count("keyvaluestore_queue_max_ops") ||
-      changed.count("keyvaluestore_queue_max_bytes") ||
-      changed.count("keyvaluestore_max_expected_write_size")) {
+      changed.count("keyvaluestore_queue_max_bytes")) {
     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;
-  }
-  if (changed.count("keyvaluestore_default_strip_size")) {
-    m_keyvaluestore_strip_size = conf->keyvaluestore_default_strip_size;
-    default_strip_size = m_keyvaluestore_strip_size;
   }
 }
 
 void KeyValueStore::dump_transactions(list<ObjectStore::Transaction*>& ls, uint64_t seq, OpSequencer *osr)
 {
 }
-
-
-// -- KVSuperblock --
-
-void KVSuperblock::encode(bufferlist &bl) const
-{
-  ENCODE_START(1, 1, bl);
-  compat_features.encode(bl);
-  ::encode(backend, bl);
-  ENCODE_FINISH(bl);
-}
-
-void KVSuperblock::decode(bufferlist::iterator &bl)
-{
-  DECODE_START(1, bl);
-  compat_features.decode(bl);
-  ::decode(backend, bl);
-  DECODE_FINISH(bl);
-}
-
-void KVSuperblock::dump(Formatter *f) const
-{
-  f->open_object_section("compat");
-  compat_features.dump(f);
-  f->dump_string("backend", backend);
-  f->close_section();
-}
-
-void KVSuperblock::generate_test_instances(list<KVSuperblock*>& o)
-{
-  KVSuperblock z;
-  o.push_back(new KVSuperblock(z));
-  CompatSet::FeatureSet feature_compat;
-  CompatSet::FeatureSet feature_ro_compat;
-  CompatSet::FeatureSet feature_incompat;
-  z.compat_features = CompatSet(feature_compat, feature_ro_compat,
-                                feature_incompat);
-  o.push_back(new KVSuperblock(z));
-  z.backend = "rocksdb";
-  o.push_back(new KVSuperblock(z));
-}
diff --git a/src/os/KeyValueStore.h b/src/os/KeyValueStore.h
index da3aadf..bc36103 100644
--- a/src/os/KeyValueStore.h
+++ b/src/os/KeyValueStore.h
@@ -41,6 +41,13 @@ using namespace std;
 
 #include "include/uuid.h"
 
+enum kvstore_types {
+    KV_TYPE_NONE = 0,
+    KV_TYPE_LEVELDB,
+    KV_TYPE_OTHER
+};
+
+
 static uint64_t default_strip_size = 1024;
 
 class StripObjectMap: public GenericObjectMap {
@@ -137,55 +144,12 @@ class StripObjectMap: public GenericObjectMap {
 };
 
 
-class KVSuperblock {
-public:
-  CompatSet compat_features;
-  string backend;
-
-  KVSuperblock() { }
-
-  void encode(bufferlist &bl) const;
-  void decode(bufferlist::iterator &bl);
-  void dump(Formatter *f) const;
-  static void generate_test_instances(list<KVSuperblock*>& o);
-};
-WRITE_CLASS_ENCODER(KVSuperblock)
-
-
-inline ostream& operator<<(ostream& out, const KVSuperblock& sb)
-{
-  return out << "sb(" << sb.compat_features << " " << sb.backend << ")";
-}
-
-
 class KeyValueStore : public ObjectStore,
                       public md_config_obs_t {
  public:
-  struct KVPerfTracker {
-    PerfCounters::avg_tracker<uint64_t> os_commit_latency;
-    PerfCounters::avg_tracker<uint64_t> os_apply_latency;
-
-    objectstore_perf_stat_t get_cur_stats() const {
-      objectstore_perf_stat_t ret;
-      ret.filestore_commit_latency = os_commit_latency.avg();
-      ret.filestore_apply_latency = os_apply_latency.avg();
-      return ret;
-    }
-
-    void update_from_perfcounters(PerfCounters &logger) {
-      os_commit_latency.consume_next(
-        logger.get_tavg_ms(
-          l_os_commit_lat));
-      os_apply_latency.consume_next(
-        logger.get_tavg_ms(
-          l_os_apply_lat));
-    }
-
-  } perf_tracker;
-
   objectstore_perf_stat_t get_cur_stats() {
-    perf_tracker.update_from_perfcounters(*perf_logger);
-    return perf_tracker.get_cur_stats();
+    objectstore_perf_stat_t ret;
+    return ret;
   }
 
   static const uint32_t target_version = 1;
@@ -199,6 +163,8 @@ class KeyValueStore : public ObjectStore,
 
   int fsid_fd, current_fd;
 
+  enum kvstore_types kv_type;
+
   deque<uint64_t> snaps;
 
   // ObjectMap
@@ -468,7 +434,7 @@ class KeyValueStore : public ObjectStore,
   void op_queue_release_throttle(Op *o);
   void _finish_op(OpSequencer *osr);
 
-  PerfCounters *perf_logger;
+  PerfCounters *logger;
 
  public:
 
@@ -477,6 +443,7 @@ class KeyValueStore : public ObjectStore,
                 bool update_to=false);
   ~KeyValueStore();
 
+  int _detect_backend() { kv_type = KV_TYPE_LEVELDB; return 0; }
   bool test_mount_in_use();
   int version_stamp_is_valid(uint32_t *version);
   int update_version_stamp();
@@ -491,12 +458,7 @@ class KeyValueStore : public ObjectStore,
   int write_version_stamp();
   int mount();
   int umount();
-  unsigned get_max_object_name_length() {
-    return 4096;  // no real limit for leveldb
-  }
-  unsigned get_max_attr_name_length() {
-    return 256;  // arbitrary; there is no real limit internally
-  }
+  int get_max_object_name_length();
   int mkfs();
   int mkjournal() {return 0;}
 
@@ -562,10 +524,7 @@ class KeyValueStore : public ObjectStore,
                    const ghobject_t& newoid, uint64_t srcoff,
                    uint64_t len, uint64_t dstoff, BufferTransaction &t);
   int _remove(coll_t cid, const ghobject_t& oid, BufferTransaction &t);
-  int _set_alloc_hint(coll_t cid, const ghobject_t& oid,
-                      uint64_t expected_object_size,
-                      uint64_t expected_write_size,
-                      BufferTransaction &t);
+
 
   void start_sync() {}
   void sync() {}
@@ -578,7 +537,8 @@ class KeyValueStore : public ObjectStore,
   // attrs
   int getattr(coll_t cid, const ghobject_t& oid, const char *name,
               bufferptr &bp);
-  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset);
+  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset,
+               bool user_only = false);
 
   int _setattrs(coll_t cid, const ghobject_t& oid,
                 map<string, bufferptr>& aset, BufferTransaction &t);
@@ -597,8 +557,6 @@ class KeyValueStore : public ObjectStore,
                            BufferTransaction &t);
 
   // collections
-  int _collection_hint_expected_num_objs(coll_t cid, uint32_t pg_num,
-      uint64_t num_objs) const { return 0; }
   int _create_collection(coll_t c, BufferTransaction &t);
   int _destroy_collection(coll_t c, BufferTransaction &t);
   int _collection_add(coll_t c, coll_t ocid, const ghobject_t& oid,
@@ -670,10 +628,10 @@ class KeyValueStore : public ObjectStore,
   std::string m_osd_rollback_to_cluster_snap;
   int m_keyvaluestore_queue_max_ops;
   int m_keyvaluestore_queue_max_bytes;
-  int m_keyvaluestore_strip_size;
-  uint64_t m_keyvaluestore_max_expected_write_size;
+
   int do_update;
 
+
   static const string OBJECT_STRIP_PREFIX;
   static const string OBJECT_XATTR;
   static const string OBJECT_OMAP;
@@ -682,25 +640,6 @@ class KeyValueStore : public ObjectStore,
   static const string COLLECTION;
   static const string COLLECTION_ATTR;
   static const uint32_t COLLECTION_VERSION = 1;
-
-  KVSuperblock superblock;
-  /**
-   * write_superblock()
-   *
-   * Write superblock to persisent storage
-   *
-   * return value: 0 on success, otherwise negative errno
-   */
-  int write_superblock();
-
-  /**
-   * read_superblock()
-   *
-   * Fill in KeyValueStore::superblock by reading persistent storage
-   *
-   * return value: 0 on success, otherwise negative errno
-   */
-  int read_superblock();
 };
 
 WRITE_CLASS_ENCODER(StripObjectMap::StripObjectHeader)
diff --git a/src/os/KineticStore.cc b/src/os/KineticStore.cc
deleted file mode 100644
index ba77376..0000000
--- a/src/os/KineticStore.cc
+++ /dev/null
@@ -1,309 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-#include "KineticStore.h"
-#include "common/ceph_crypto.h"
-
-#include <set>
-#include <map>
-#include <string>
-#include "include/memory.h"
-#include <errno.h>
-using std::string;
-#include "common/perf_counters.h"
-
-#define dout_subsys ceph_subsys_keyvaluestore
-
-int KineticStore::init()
-{
-  // init defaults.  caller can override these if they want
-  // prior to calling open.
-  host = cct->_conf->kinetic_host;
-  port = cct->_conf->kinetic_port;
-  user_id = cct->_conf->kinetic_user_id;
-  hmac_key = cct->_conf->kinetic_hmac_key;
-  use_ssl = cct->_conf->kinetic_use_ssl;
-  return 0;
-}
-
-int KineticStore::do_open(ostream &out, bool create_if_missing)
-{
-  kinetic::KineticConnectionFactory conn_factory =
-    kinetic::NewKineticConnectionFactory();
-  kinetic::ConnectionOptions options;
-  options.host = host;
-  options.port = port;
-  options.user_id = user_id;
-  options.hmac_key = hmac_key;
-  options.use_ssl = use_ssl;
-  kinetic::Status status = conn_factory.NewThreadsafeBlockingConnection(options, kinetic_conn, 10);
-  if (!status.ok()) {
-    derr << "Unable to connect to kinetic store " << host << ":" << port
-	 << " : " << status.ToString() << dendl;
-    return -EINVAL;
-  }
-
-  PerfCountersBuilder plb(g_ceph_context, "kinetic", l_kinetic_first, l_kinetic_last);
-  plb.add_u64_counter(l_kinetic_gets, "kinetic_get");
-  plb.add_u64_counter(l_kinetic_txns, "kinetic_transaction");
-  logger = plb.create_perf_counters();
-  cct->get_perfcounters_collection()->add(logger);
-  return 0;
-}
-
-KineticStore::KineticStore(CephContext *c) :
-  cct(c),
-  logger(NULL)
-{
-  host = c->_conf->kinetic_host;
-  port = c->_conf->kinetic_port;
-  user_id = c->_conf->kinetic_user_id;
-  hmac_key = c->_conf->kinetic_hmac_key;
-  use_ssl = c->_conf->kinetic_use_ssl;
-}
-
-KineticStore::~KineticStore()
-{
-  close();
-  delete logger;
-}
-
-void KineticStore::close()
-{
-  kinetic_conn.reset();
-  if (logger)
-    cct->get_perfcounters_collection()->remove(logger);
-}
-
-int KineticStore::submit_transaction(KeyValueDB::Transaction t)
-{
-  KineticTransactionImpl * _t =
-    static_cast<KineticTransactionImpl *>(t.get());
-
-  dout(20) << "kinetic submit_transaction" << dendl;
-
-  for (vector<KineticOp>::iterator it = _t->ops.begin();
-       it != _t->ops.end(); ++it) {
-    kinetic::KineticStatus status(kinetic::StatusCode::OK, "");
-    if (it->type == KINETIC_OP_WRITE) {
-      string data(it->data.c_str(), it->data.length());
-      kinetic::KineticRecord record(data, "", "",
-				    com::seagate::kinetic::client::proto::Message_Algorithm_SHA1);
-      dout(30) << "kinetic before put of " << it->key << " (" << data.length() << " bytes)" << dendl;
-      status = kinetic_conn->Put(it->key, "", kinetic::WriteMode::IGNORE_VERSION,
-				 record);
-      dout(30) << "kinetic after put of " << it->key << dendl;
-    } else {
-      assert(it->type == KINETIC_OP_DELETE);
-      dout(30) << "kinetic before delete" << dendl;
-      status = kinetic_conn->Delete(it->key, "",
-				    kinetic::WriteMode::IGNORE_VERSION);
-      dout(30) << "kinetic after delete" << dendl;
-    }
-    if (!status.ok()) {
-      derr << "kinetic error submitting transaction: "
-	   << status.message() << dendl;
-      return -1;
-    }
-  }
-
-  logger->inc(l_kinetic_txns);
-  return 0;
-}
-
-int KineticStore::submit_transaction_sync(KeyValueDB::Transaction t)
-{
-  return submit_transaction(t);
-}
-
-void KineticStore::KineticTransactionImpl::set(
-  const string &prefix,
-  const string &k,
-  const bufferlist &to_set_bl)
-{
-  string key = combine_strings(prefix, k);
-  dout(30) << "kinetic set key " << key << dendl;
-  ops.push_back(KineticOp(KINETIC_OP_WRITE, key, to_set_bl));
-}
-
-void KineticStore::KineticTransactionImpl::rmkey(const string &prefix,
-					         const string &k)
-{
-  string key = combine_strings(prefix, k);
-  dout(30) << "kinetic rm key " << key << dendl;
-  ops.push_back(KineticOp(KINETIC_OP_DELETE, key));
-}
-
-void KineticStore::KineticTransactionImpl::rmkeys_by_prefix(const string &prefix)
-{
-  dout(20) << "kinetic rmkeys_by_prefix " << prefix << dendl;
-  KeyValueDB::Iterator it = db->get_iterator(prefix);
-  for (it->seek_to_first();
-       it->valid();
-       it->next()) {
-    string key = combine_strings(prefix, it->key());
-    ops.push_back(KineticOp(KINETIC_OP_DELETE, key));
-    dout(30) << "kinetic rm key by prefix: " << key << dendl;
-  }
-}
-
-int KineticStore::get(
-    const string &prefix,
-    const std::set<string> &keys,
-    std::map<string, bufferlist> *out)
-{
-  dout(30) << "kinetic get prefix: " << prefix << " keys: " << keys << dendl;
-  for (std::set<string>::const_iterator i = keys.begin();
-       i != keys.end();
-       ++i) {
-    unique_ptr<kinetic::KineticRecord> record;
-    string key = combine_strings(prefix, *i);
-    dout(30) << "before get key " << key << dendl;
-    kinetic::KineticStatus status = kinetic_conn->Get(key, record);
-    if (!status.ok())
-      break;
-    dout(30) << "kinetic get got key: " << key << dendl;
-    out->insert(make_pair(key, to_bufferlist(*record.get())));
-  }
-  logger->inc(l_kinetic_gets);
-  return 0;
-}
-
-string KineticStore::combine_strings(const string &prefix, const string &value)
-{
-  string out = prefix;
-  out.push_back(1);
-  out.append(value);
-  return out;
-}
-
-bufferlist KineticStore::to_bufferlist(const kinetic::KineticRecord &record)
-{
-  bufferlist bl;
-  bl.append(*(record.value()));
-  return bl;
-}
-
-int KineticStore::split_key(string in_prefix, string *prefix, string *key)
-{
-  size_t prefix_len = in_prefix.find('\1');
-  if (prefix_len >= in_prefix.size())
-    return -EINVAL;
-
-  if (prefix)
-    *prefix = string(in_prefix, 0, prefix_len);
-  if (key)
-    *key= string(in_prefix, prefix_len + 1);
-  return 0;
-}
-
-KineticStore::KineticWholeSpaceIteratorImpl::KineticWholeSpaceIteratorImpl(kinetic::BlockingKineticConnection *conn) : kinetic_conn(conn),
-   kinetic_status(kinetic::StatusCode::OK, "")
-{
-  dout(30) << "kinetic iterator constructor()" << dendl;
-  const static string last_key = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF";
-  kinetic::KeyRangeIterator it =
-    kinetic_conn->IterateKeyRange("", true, last_key, true, 1024);
-  while (it != kinetic::KeyRangeEnd()) {
-    try {
-      keys.insert(*it);
-      dout(30) << "kinetic iterator added " << *it << dendl;
-    } catch (std::runtime_error &e) {
-      kinetic_status = kinetic::KineticStatus(kinetic::StatusCode::CLIENT_INTERNAL_ERROR, e.what());
-      return;
-    }
-    ++it;
-  }
-  keys_iter = keys.begin();
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::seek_to_first(const string &prefix)
-{
-  dout(30) << "kinetic iterator seek_to_first(prefix): " << prefix << dendl;
-  keys_iter = keys.lower_bound(prefix);
-  return 0;
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::seek_to_last()
-{
-  dout(30) << "kinetic iterator seek_to_last()" << dendl;
-  keys_iter = keys.end();
-  if (keys.begin() != keys_iter)
-    --keys_iter;
-  return 0;
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::seek_to_last(const string &prefix)
-{
-  dout(30) << "kinetic iterator seek_to_last(prefix): " << prefix << dendl;
-  keys_iter = keys.upper_bound(prefix + "\2");
-  if (keys.begin() == keys_iter) {
-    keys_iter = keys.end();
-  } else {
-    --keys_iter;
-  }
-  return 0;
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::upper_bound(const string &prefix, const string &after) {
-  dout(30) << "kinetic iterator upper_bound()" << dendl;
-  string bound = combine_strings(prefix, after);
-  keys_iter = keys.upper_bound(bound);
-  return 0;
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::lower_bound(const string &prefix, const string &to) {
-  dout(30) << "kinetic iterator lower_bound()" << dendl;
-  string bound = combine_strings(prefix, to);
-  keys_iter = keys.lower_bound(bound);
-  return 0;
-}
-
-bool KineticStore::KineticWholeSpaceIteratorImpl::valid() {
-  dout(30) << "kinetic iterator valid()" << dendl;
-  return keys_iter != keys.end();
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::next() {
-  dout(30) << "kinetic iterator next()" << dendl;
-  if (keys_iter != keys.end()) {
-      ++keys_iter;
-      return 0;
-  }
-  return -1;
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::prev() {
-  dout(30) << "kinetic iterator prev()" << dendl;
-  if (keys_iter != keys.begin()) {
-      --keys_iter;
-      return 0;
-  }
-  keys_iter = keys.end();
-  return -1;
-}
-
-string KineticStore::KineticWholeSpaceIteratorImpl::key() {
-  dout(30) << "kinetic iterator key()" << dendl;
-  string out_key;
-  split_key(*keys_iter, NULL, &out_key);
-  return out_key;
-}
-
-pair<string,string> KineticStore::KineticWholeSpaceIteratorImpl::raw_key() {
-  dout(30) << "kinetic iterator raw_key()" << dendl;
-  string prefix, key;
-  split_key(*keys_iter, &prefix, &key);
-  return make_pair(prefix, key);
-}
-
-bufferlist KineticStore::KineticWholeSpaceIteratorImpl::value() {
-  dout(30) << "kinetic iterator value()" << dendl;
-  unique_ptr<kinetic::KineticRecord> record;
-  kinetic_status = kinetic_conn->Get(*keys_iter, record);
-  return to_bufferlist(*record.get());
-}
-
-int KineticStore::KineticWholeSpaceIteratorImpl::status() {
-  dout(30) << "kinetic iterator status()" << dendl;
-  return kinetic_status.ok() ? 0 : -1;
-}
diff --git a/src/os/KineticStore.h b/src/os/KineticStore.h
deleted file mode 100644
index 57b8a49..0000000
--- a/src/os/KineticStore.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-#ifndef KINETIC_STORE_H
-#define KINETIC_STORE_H
-
-#include "include/types.h"
-#include "include/buffer.h"
-#include "KeyValueDB.h"
-#include <set>
-#include <map>
-#include <string>
-#include "include/memory.h"
-#include <kinetic/kinetic.h>
-
-#include <errno.h>
-#include "common/errno.h"
-#include "common/dout.h"
-#include "include/assert.h"
-#include "common/Formatter.h"
-
-#include "common/ceph_context.h"
-
-class PerfCounters;
-
-enum {
-  l_kinetic_first = 34400,
-  l_kinetic_gets,
-  l_kinetic_txns,
-  l_kinetic_last,
-};
-
-/**
- * Uses Kinetic to implement the KeyValueDB interface
- */
-class KineticStore : public KeyValueDB {
-  CephContext *cct;
-  PerfCounters *logger;
-  string host;
-  int port;
-  int user_id;
-  string hmac_key;
-  bool use_ssl;
-  std::unique_ptr<kinetic::BlockingKineticConnection> kinetic_conn;
-
-  int do_open(ostream &out, bool create_if_missing);
-
-public:
-  KineticStore(CephContext *c);
-  ~KineticStore();
-
-  int init();
-
-  /// Opens underlying db
-  int open(ostream &out) {
-    return do_open(out, false);
-  }
-  /// Creates underlying db if missing and opens it
-  int create_and_open(ostream &out) {
-    return do_open(out, true);
-  }
-
-  void close();
-
-  enum KineticOpType {
-    KINETIC_OP_WRITE,
-    KINETIC_OP_DELETE,
-  };
-
-  struct KineticOp {
-    KineticOpType type;
-    std::string key;
-    bufferlist data;
-    KineticOp(KineticOpType type, const string &key) : type(type), key(key) {}
-    KineticOp(KineticOpType type, const string &key, const bufferlist &data)
-      : type(type), key(key), data(data) {}
-  };
-
-  class KineticTransactionImpl : public KeyValueDB::TransactionImpl {
-  public:
-    vector<KineticOp> ops;
-    KineticStore *db;
-
-    KineticTransactionImpl(KineticStore *db) : db(db) {}
-    void set(
-      const string &prefix,
-      const string &k,
-      const bufferlist &bl);
-    void rmkey(
-      const string &prefix,
-      const string &k);
-    void rmkeys_by_prefix(
-      const string &prefix
-      );
-  };
-
-  KeyValueDB::Transaction get_transaction() {
-    return ceph::shared_ptr< KineticTransactionImpl >(
-      new KineticTransactionImpl(this));
-  }
-
-  int submit_transaction(KeyValueDB::Transaction t);
-  int submit_transaction_sync(KeyValueDB::Transaction t);
-  int get(
-    const string &prefix,
-    const std::set<string> &key,
-    std::map<string, bufferlist> *out
-    );
-
-  class KineticWholeSpaceIteratorImpl :
-    public KeyValueDB::WholeSpaceIteratorImpl {
-    std::set<std::string> keys;
-    std::set<std::string>::iterator keys_iter;
-    kinetic::BlockingKineticConnection *kinetic_conn;
-    kinetic::KineticStatus kinetic_status;
-  public:
-    KineticWholeSpaceIteratorImpl(kinetic::BlockingKineticConnection *conn);
-    virtual ~KineticWholeSpaceIteratorImpl() { }
-
-    int seek_to_first() {
-      return seek_to_first("");
-    }
-    int seek_to_first(const string &prefix);
-    int seek_to_last();
-    int seek_to_last(const string &prefix);
-    int upper_bound(const string &prefix, const string &after);
-    int lower_bound(const string &prefix, const string &to);
-    bool valid();
-    int next();
-    int prev();
-    string key();
-    pair<string,string> raw_key();
-    bufferlist value();
-    int status();
-  };
-
-  /// Utility
-  static string combine_strings(const string &prefix, const string &value);
-  static int split_key(string in_prefix, string *prefix, string *key);
-  static bufferlist to_bufferlist(const kinetic::KineticRecord &record);
-  virtual uint64_t get_estimated_size(map<string,uint64_t> &extra) {
-    // not used by the osd
-    return 0;
-  }
-
-
-protected:
-  WholeSpaceIterator _get_iterator() {
-    return ceph::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
-								new KineticWholeSpaceIteratorImpl(kinetic_conn.get()));
-  }
-
-  // TODO: remove snapshots from interface
-  WholeSpaceIterator _get_snapshot_iterator() {
-    return _get_iterator();
-  }
-
-};
-
-#endif
diff --git a/src/os/LFNIndex.cc b/src/os/LFNIndex.cc
index c480e6e..e017f83 100644
--- a/src/os/LFNIndex.cc
+++ b/src/os/LFNIndex.cc
@@ -74,6 +74,10 @@ struct FDCloser {
 
 /* Public methods */
 
+void LFNIndex::set_ref(ceph::shared_ptr<CollectionIndex> ref)
+{
+  self_ref = ref;
+}
 
 int LFNIndex::init()
 {
@@ -138,7 +142,7 @@ int LFNIndex::lookup(const ghobject_t &oid,
   } else {
     *exist = 1;
   }
-  *out_path = IndexedPath(new Path(full_path, this));
+  *out_path = IndexedPath(new Path(full_path, self_ref));
   r = 0;
   );
 }
@@ -148,11 +152,6 @@ int LFNIndex::collection_list(vector<ghobject_t> *ls)
   return _collection_list(ls);
 }
 
-int LFNIndex::pre_hash_collection(uint32_t pg_num, uint64_t expected_num_objs)
-{
-  return _pre_hash_collection(pg_num, expected_num_objs);
-}
-
 
 int LFNIndex::collection_list_partial(const ghobject_t &start,
 				      int min_count,
@@ -674,7 +673,7 @@ string LFNIndex::lfn_generate_object_name(const ghobject_t &oid)
   full_name += string(buf);
 
   if (oid.generation != ghobject_t::NO_GEN ||
-      oid.shard_id != shard_id_t::NO_SHARD) {
+      oid.shard_id != ghobject_t::NO_SHARD) {
     full_name.append("_");
 
     t = buf;
@@ -1131,7 +1130,7 @@ bool LFNIndex::lfn_parse_object_name(const string &long_name, ghobject_t *out)
   snapid_t snap;
   uint64_t pool;
   gen_t generation = ghobject_t::NO_GEN;
-  shard_id_t shard_id = shard_id_t::NO_SHARD;
+  shard_t shard_id = ghobject_t::NO_SHARD;
 
   if (index_version == HASH_INDEX_TAG)
     return lfn_parse_object_name_keyless(long_name, out);
@@ -1208,7 +1207,7 @@ bool LFNIndex::lfn_parse_object_name(const string &long_name, ghobject_t *out)
       return false;
     shardstring = string(current, end);
 
-    shard_id = (shard_id_t)strtoul(shardstring.c_str(), NULL, 16);
+    shard_id = (shard_t)strtoul(shardstring.c_str(), NULL, 16);
   }
 
   if (snap_str == "head")
diff --git a/src/os/LFNIndex.h b/src/os/LFNIndex.h
index 5cd3523..646e726 100644
--- a/src/os/LFNIndex.h
+++ b/src/os/LFNIndex.h
@@ -98,6 +98,8 @@ class LFNIndex : public CollectionIndex {
 
   /// Path to Index base.
   const string base_path;
+  /// For reference counting the collection @see Path
+  ceph::weak_ptr<CollectionIndex> self_ref;
 
 protected:
   const uint32_t index_version;
@@ -131,8 +133,7 @@ public:
     const char *base_path, ///< [in] path to Index root
     uint32_t index_version,
     double _error_injection_probability=0)
-    : CollectionIndex(collection), 
-      base_path(base_path),
+    : base_path(base_path),
       index_version(index_version),
       error_injection_enabled(false),
       error_injection_on(_error_injection_probability != 0),
@@ -155,6 +156,9 @@ public:
   virtual ~LFNIndex() {}
 
   /// @see CollectionIndex
+  void set_ref(ceph::shared_ptr<CollectionIndex> ref);
+
+  /// @see CollectionIndex
   int init();
 
   /// @see CollectionIndex
@@ -183,12 +187,6 @@ public:
     vector<ghobject_t> *ls
     );
 
-  /// @see CollectionIndex;
-  int pre_hash_collection(
-      uint32_t pg_num,
-      uint64_t expected_num_objs
-      );
-
   /// @see CollectionIndex
   int collection_list_partial(
     const ghobject_t &start,
@@ -202,14 +200,14 @@ public:
   virtual int _split(
     uint32_t match,                             //< [in] value to match
     uint32_t bits,                              //< [in] bits to check
-    CollectionIndex* dest                       //< [in] destination index
+    ceph::shared_ptr<CollectionIndex> dest  //< [in] destination index
     ) = 0;
   
   /// @see CollectionIndex
   int split(
     uint32_t match,
     uint32_t bits,
-    CollectionIndex* dest
+    ceph::shared_ptr<CollectionIndex> dest
     ) {
     WRAP_RETRY(
       r = _split(match, bits, dest);
@@ -258,13 +256,6 @@ protected:
     vector<ghobject_t> *ls ///< [out] Listed objects.
     ) = 0;
 
-  /// Pre-hash the collection with the given pg number and
-  /// expected number of objects in the collection.
-  virtual int _pre_hash_collection(
-      uint32_t pg_num,
-      uint64_t expected_num_objs
-      ) = 0;
-
   /// @see CollectionIndex
   virtual int _collection_list_partial(
     const ghobject_t &start,
diff --git a/src/os/LevelDBStore.cc b/src/os/LevelDBStore.cc
index 818396a..326862f 100644
--- a/src/os/LevelDBStore.cc
+++ b/src/os/LevelDBStore.cc
@@ -92,16 +92,6 @@ int LevelDBStore::do_open(ostream &out, bool create_if_missing)
   return 0;
 }
 
-int LevelDBStore::_test_init(const string& dir)
-{
-  leveldb::Options options;
-  options.create_if_missing = true;
-  leveldb::DB *db;
-  leveldb::Status status = leveldb::DB::Open(options, dir, &db);
-  delete db;
-  return status.ok() ? 0 : -EIO;
-}
-
 LevelDBStore::~LevelDBStore()
 {
   close();
diff --git a/src/os/LevelDBStore.h b/src/os/LevelDBStore.h
index 4617c5c..26e7bbe 100644
--- a/src/os/LevelDBStore.h
+++ b/src/os/LevelDBStore.h
@@ -85,24 +85,21 @@ public:
   /// compact the underlying leveldb store
   void compact();
 
-  /// compact db for all keys with a given prefix
+  /// compact leveldb for all keys with a given prefix
   void compact_prefix(const string& prefix) {
     compact_range(prefix, past_prefix(prefix));
   }
   void compact_prefix_async(const string& prefix) {
     compact_range_async(prefix, past_prefix(prefix));
   }
-  void compact_range(const string& prefix,
-		     const string& start, const string& end) {
+
+  void compact_range(const string& prefix, const string& start, const string& end) {
     compact_range(combine_strings(prefix, start), combine_strings(prefix, end));
   }
-  void compact_range_async(const string& prefix,
-			   const string& start, const string& end) {
-    compact_range_async(combine_strings(prefix, start),
-			combine_strings(prefix, end));
+  void compact_range_async(const string& prefix, const string& start, const string& end) {
+    compact_range_async(combine_strings(prefix, start), combine_strings(prefix, end));
   }
 
-
   /**
    * options_t: Holds options which are minimally interpreted
    * on initialization and then passed through to LevelDB.
@@ -157,7 +154,6 @@ public:
 
   ~LevelDBStore();
 
-  static int _test_init(const string& dir);
   int init();
 
   /// Opens underlying db
@@ -341,10 +337,7 @@ public:
       // happen when those files are being updated, data is being shuffled
       // and files get removed, in which case there's not much of a problem
       // as we'll get to them next time around.
-      if (err == -ENOENT) {
-	continue;
-      }
-      if (err < 0) {
+      if ((err < 0) && (err != -ENOENT)) {
         lderr(cct) << __func__ << " error obtaining stats for " << fpath
                    << ": " << cpp_strerror(err) << dendl;
         goto err;
diff --git a/src/os/Makefile.am b/src/os/Makefile.am
index d12adba..63a1846 100644
--- a/src/os/Makefile.am
+++ b/src/os/Makefile.am
@@ -17,11 +17,9 @@ libos_la_SOURCES = \
 	os/LevelDBStore.cc \
 	os/LFNIndex.cc \
 	os/MemStore.cc \
-	os/KeyValueDB.cc \
 	os/KeyValueStore.cc \
 	os/ObjectStore.cc \
 	os/WBThrottle.cc \
-        os/KeyValueDB.cc \
 	common/TrackedOp.cc
 
 if LINUX
@@ -38,10 +36,6 @@ endif
 
 libos_la_CXXFLAGS = ${AM_CXXFLAGS}
 libos_la_LIBADD = $(LIBOS_TYPES)
-if WITH_LTTNG
-libos_la_LIBADD += $(LIBOS_TP)
-endif
-
 noinst_LTLIBRARIES += libos.la
 
 noinst_HEADERS += \
@@ -72,20 +66,6 @@ noinst_HEADERS += \
 	os/XfsFileStoreBackend.h \
 	os/ZFSFileStoreBackend.h
 
-if WITH_SLIBROCKSDB
-libos_rocksdb_la_SOURCES = os/RocksDBStore.cc
-libos_rocksdb_la_CXXFLAGS = ${AM_CXXFLAGS} ${LIBROCKSDB_CFLAGS} -std=gnu++11 -I rocksdb/include
-libos_rocksdb_la_LIBADD = rocksdb/librocksdb.la
-noinst_LTLIBRARIES += libos_rocksdb.la
-noinst_HEADERS += os/RocksDBStore.h
-endif
-if WITH_DLIBROCKSDB
-libos_rocksdb_la_SOURCES = os/RocksDBStore.cc
-libos_rocksdb_la_CXXFLAGS = ${AM_CXXFLAGS} ${LIBROCKSDB_CFLAGS} -std=gnu++11
-libos_rocksdb_la_LIBADD = -lrocksdb
-noinst_LTLIBRARIES += libos_rocksdb.la
-noinst_HEADERS += os/RocksDBStore.h
-endif
 if WITH_LIBZFS
 libos_zfs_a_SOURCES = os/ZFS.cc
 libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
@@ -93,9 +73,3 @@ noinst_LIBRARIES += libos_zfs.a
 noinst_HEADERS += os/ZFS.h
 endif
 
-if WITH_KINETIC
-libos_la_SOURCES += os/KineticStore.cc
-libos_la_CXXFLAGS += -std=gnu++11
-libos_la_LIBADD += -lkinetic_client -lprotobuf -lglog -lgflags libcrypto.a
-noinst_HEADERS += os/KineticStore.h
-endif
diff --git a/src/os/MemStore.cc b/src/os/MemStore.cc
index 6743916..952866a 100644
--- a/src/os/MemStore.cc
+++ b/src/os/MemStore.cc
@@ -358,7 +358,7 @@ int MemStore::getattr(coll_t cid, const ghobject_t& oid,
 }
 
 int MemStore::getattrs(coll_t cid, const ghobject_t& oid,
-		       map<string,bufferptr>& aset)
+		       map<string,bufferptr>& aset, bool user_only)
 {
   dout(10) << __func__ << " " << cid << " " << oid << dendl;
   CollectionRef c = get_collection(cid);
@@ -369,7 +369,17 @@ int MemStore::getattrs(coll_t cid, const ghobject_t& oid,
   ObjectRef o = c->get_object(oid);
   if (!o)
     return -ENOENT;
-  aset = o->xattr;
+  if (user_only) {
+    for (map<string,bufferptr>::iterator p = o->xattr.begin();
+	 p != o->xattr.end();
+	 ++p) {
+      if (p->first.length() > 1 && p->first[0] == '_') {
+	aset[p->first.substr(1)] = p->second;
+      }
+    }
+  } else {
+    aset = o->xattr;
+  }
   return 0;
 }
 
@@ -675,7 +685,7 @@ void MemStore::_do_transaction(Transaction& t)
   int pos = 0;
 
   while (i.have_op()) {
-    int op = i.decode_op();
+    int op = i.get_op();
     int r = 0;
 
     switch (op) {
@@ -683,69 +693,69 @@ void MemStore::_do_transaction(Transaction& t)
       break;
     case Transaction::OP_TOUCH:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _touch(cid, oid);
       }
       break;
       
     case Transaction::OP_WRITE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	bool replica = i.get_replica();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	r = _write(cid, oid, off, len, bl, replica);
       }
       break;
       
     case Transaction::OP_ZERO:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	r = _zero(cid, oid, off, len);
       }
       break;
       
     case Transaction::OP_TRIMCACHE:
       {
-	i.decode_cid();
-	i.decode_oid();
-	i.decode_length();
-	i.decode_length();
+	i.get_cid();
+	i.get_oid();
+	i.get_length();
+	i.get_length();
 	// deprecated, no-op
       }
       break;
       
     case Transaction::OP_TRUNCATE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
 	r = _truncate(cid, oid, off);
       }
       break;
       
     case Transaction::OP_REMOVE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _remove(cid, oid);
       }
       break;
       
     case Transaction::OP_SETATTR:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	string name = i.get_attrname();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	map<string, bufferptr> to_set;
 	to_set[name] = bufferptr(bl.c_str(), bl.length());
 	r = _setattrs(cid, oid, to_set);
@@ -754,110 +764,90 @@ void MemStore::_do_transaction(Transaction& t)
       
     case Transaction::OP_SETATTRS:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	map<string, bufferptr> aset;
-	i.decode_attrset(aset);
+	i.get_attrset(aset);
 	r = _setattrs(cid, oid, aset);
       }
       break;
 
     case Transaction::OP_RMATTR:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	string name = i.get_attrname();
 	r = _rmattr(cid, oid, name.c_str());
       }
       break;
 
     case Transaction::OP_RMATTRS:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _rmattrs(cid, oid);
       }
       break;
       
     case Transaction::OP_CLONE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
 	r = _clone(cid, oid, noid);
       }
       break;
 
     case Transaction::OP_CLONERANGE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
+ 	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	r = _clone_range(cid, oid, noid, off, len, off);
       }
       break;
 
     case Transaction::OP_CLONERANGE2:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-	uint64_t srcoff = i.decode_length();
-	uint64_t len = i.decode_length();
-	uint64_t dstoff = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
+ 	uint64_t srcoff = i.get_length();
+	uint64_t len = i.get_length();
+ 	uint64_t dstoff = i.get_length();
 	r = _clone_range(cid, oid, noid, srcoff, len, dstoff);
       }
       break;
 
     case Transaction::OP_MKCOLL:
       {
-	coll_t cid = i.decode_cid();
+	coll_t cid = i.get_cid();
 	r = _create_collection(cid);
       }
       break;
 
-    case Transaction::OP_COLL_HINT:
-      {
-        coll_t cid = i.decode_cid();
-        uint32_t type = i.decode_u32();
-        bufferlist hint;
-        i.decode_bl(hint);
-        bufferlist::iterator hiter = hint.begin();
-        if (type == Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS) {
-          uint32_t pg_num;
-          uint64_t num_objs;
-          ::decode(pg_num, hiter);
-          ::decode(num_objs, hiter);
-          r = _collection_hint_expected_num_objs(cid, pg_num, num_objs);
-        } else {
-          // Ignore the hint
-          dout(10) << "Unrecognized collection hint type: " << type << dendl;
-        }
-      }
-      break;
-
     case Transaction::OP_RMCOLL:
       {
-	coll_t cid = i.decode_cid();
+	coll_t cid = i.get_cid();
 	r = _destroy_collection(cid);
       }
       break;
 
     case Transaction::OP_COLL_ADD:
       {
-	coll_t ncid = i.decode_cid();
-	coll_t ocid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t ncid = i.get_cid();
+	coll_t ocid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _collection_add(ncid, ocid, oid);
       }
       break;
 
     case Transaction::OP_COLL_REMOVE:
        {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	r = _remove(cid, oid);
        }
       break;
@@ -868,81 +858,81 @@ void MemStore::_do_transaction(Transaction& t)
 
     case Transaction::OP_COLL_MOVE_RENAME:
       {
-	coll_t oldcid = i.decode_cid();
-	ghobject_t oldoid = i.decode_oid();
-	coll_t newcid = i.decode_cid();
-	ghobject_t newoid = i.decode_oid();
+	coll_t oldcid = i.get_cid();
+	ghobject_t oldoid = i.get_oid();
+	coll_t newcid = i.get_cid();
+	ghobject_t newoid = i.get_oid();
 	r = _collection_move_rename(oldcid, oldoid, newcid, newoid);
       }
       break;
 
     case Transaction::OP_COLL_SETATTR:
       {
-	coll_t cid = i.decode_cid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	string name = i.get_attrname();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	r = _collection_setattr(cid, name.c_str(), bl.c_str(), bl.length());
       }
       break;
 
     case Transaction::OP_COLL_RMATTR:
       {
-	coll_t cid = i.decode_cid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	string name = i.get_attrname();
 	r = _collection_rmattr(cid, name.c_str());
       }
       break;
 
     case Transaction::OP_COLL_RENAME:
       {
-	coll_t cid(i.decode_cid());
-	coll_t ncid(i.decode_cid());
+	coll_t cid(i.get_cid());
+	coll_t ncid(i.get_cid());
 	r = _collection_rename(cid, ncid);
       }
       break;
 
     case Transaction::OP_OMAP_CLEAR:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	r = _omap_clear(cid, oid);
       }
       break;
     case Transaction::OP_OMAP_SETKEYS:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	map<string, bufferlist> aset;
-	i.decode_attrset(aset);
+	i.get_attrset(aset);
 	r = _omap_setkeys(cid, oid, aset);
       }
       break;
     case Transaction::OP_OMAP_RMKEYS:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	set<string> keys;
-	i.decode_keyset(keys);
+	i.get_keyset(keys);
 	r = _omap_rmkeys(cid, oid, keys);
       }
       break;
     case Transaction::OP_OMAP_RMKEYRANGE:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	string first, last;
-	first = i.decode_key();
-	last = i.decode_key();
+	first = i.get_key();
+	last = i.get_key();
 	r = _omap_rmkeyrange(cid, oid, first, last);
       }
       break;
     case Transaction::OP_OMAP_SETHEADER:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	r = _omap_setheader(cid, oid, bl);
       }
       break;
@@ -951,20 +941,20 @@ void MemStore::_do_transaction(Transaction& t)
       break;
     case Transaction::OP_SPLIT_COLLECTION2:
       {
-	coll_t cid(i.decode_cid());
-	uint32_t bits(i.decode_u32());
-	uint32_t rem(i.decode_u32());
-	coll_t dest(i.decode_cid());
+	coll_t cid(i.get_cid());
+	uint32_t bits(i.get_u32());
+	uint32_t rem(i.get_u32());
+	coll_t dest(i.get_cid());
 	r = _split_collection(cid, bits, rem, dest);
       }
       break;
 
     case Transaction::OP_SETALLOCHINT:
       {
-        coll_t cid(i.decode_cid());
-        ghobject_t oid = i.decode_oid();
-        i.decode_length(); // uint64_t expected_object_size
-        i.decode_length(); // uint64_t expected_write_size
+        coll_t cid(i.get_cid());
+        ghobject_t oid = i.get_oid();
+        (void)i.get_length();  // discard result
+        (void)i.get_length();  // discard result
       }
       break;
 
@@ -1215,7 +1205,6 @@ int MemStore::_clone(coll_t cid, const ghobject_t& oldoid,
   no->data = oo->data;
   no->omap_header = oo->omap_header;
   no->omap = oo->omap;
-  no->xattr = oo->xattr;
   return 0;
 }
 
@@ -1372,8 +1361,8 @@ int MemStore::_collection_add(coll_t cid, coll_t ocid, const ghobject_t& oid)
   CollectionRef oc = get_collection(ocid);
   if (!oc)
     return -ENOENT;
-  RWLock::WLocker l1(MIN(&(*c), &(*oc))->lock);
-  RWLock::WLocker l2(MAX(&(*c), &(*oc))->lock);
+  RWLock::WLocker l1(MIN(c, oc)->lock);
+  RWLock::WLocker l2(MAX(c, oc)->lock);
 
   if (c->object_hash.count(oid))
     return -EEXIST;
@@ -1396,37 +1385,19 @@ int MemStore::_collection_move_rename(coll_t oldcid, const ghobject_t& oldoid,
   CollectionRef oc = get_collection(oldcid);
   if (!oc)
     return -ENOENT;
+  RWLock::WLocker l1(MIN(c, oc)->lock);
+  RWLock::WLocker l2(MAX(c, oc)->lock);
 
-  // note: c and oc may be the same
-  if (&(*c) == &(*oc)) {
-    c->lock.get_write();
-  } else if (&(*c) < &(*oc)) {
-    c->lock.get_write();
-    oc->lock.get_write();
-  } else if (&(*c) > &(*oc)) {
-    oc->lock.get_write();
-    c->lock.get_write();
-  }
-
-  int r = -EEXIST;
   if (c->object_hash.count(oid))
-    goto out;
-  r = -ENOENT;
+    return -EEXIST;
   if (oc->object_hash.count(oldoid) == 0)
-    goto out;
-  {
-    ObjectRef o = oc->object_hash[oldoid];
-    c->object_map[oid] = o;
-    c->object_hash[oid] = o;
-    oc->object_map.erase(oldoid);
-    oc->object_hash.erase(oldoid);
-  }
-  r = 0;
- out:
-  c->lock.put_write();
-  if (&(*c) != &(*oc))
-    oc->lock.put_write();
-  return r;
+    return -ENOENT;
+  ObjectRef o = oc->object_hash[oldoid];
+  c->object_map[oid] = o;
+  c->object_hash[oid] = o;
+  oc->object_map.erase(oldoid);
+  oc->object_hash.erase(oldoid);
+  return 0; 
 }
 
 int MemStore::_collection_setattr(coll_t cid, const char *name,
@@ -1496,8 +1467,8 @@ int MemStore::_split_collection(coll_t cid, uint32_t bits, uint32_t match,
   CollectionRef dc = get_collection(dest);
   if (!dc)
     return -ENOENT;
-  RWLock::WLocker l1(MIN(&(*sc), &(*dc))->lock);
-  RWLock::WLocker l2(MAX(&(*sc), &(*dc))->lock);
+  RWLock::WLocker l1(MIN(sc, dc)->lock);
+  RWLock::WLocker l2(MAX(sc, dc)->lock);
 
   map<ghobject_t,ObjectRef>::iterator p = sc->object_map.begin();
   while (p != sc->object_map.end()) {
diff --git a/src/os/MemStore.h b/src/os/MemStore.h
index dbdc7f7..c33dd04 100644
--- a/src/os/MemStore.h
+++ b/src/os/MemStore.h
@@ -207,8 +207,6 @@ private:
 		       const string& first, const string& last);
   int _omap_setheader(coll_t cid, const ghobject_t &oid, const bufferlist &bl);
 
-  int _collection_hint_expected_num_objs(coll_t cid, uint32_t pg_num,
-      uint64_t num_objs) const { return 0; }
   int _create_collection(coll_t c);
   int _destroy_collection(coll_t c);
   int _collection_add(coll_t cid, coll_t ocid, const ghobject_t& oid);
@@ -251,12 +249,9 @@ public:
   int mount();
   int umount();
 
-  unsigned get_max_object_name_length() {
+  int get_max_object_name_length() {
     return 4096;
   }
-  unsigned get_max_attr_name_length() {
-    return 256;  // arbitrary; there is no real limit internally
-  }
 
   int mkfs();
   int mkjournal() {
@@ -286,7 +281,7 @@ public:
     bool allow_eio = false);
   int fiemap(coll_t cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
   int getattr(coll_t cid, const ghobject_t& oid, const char *name, bufferptr& value);
-  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset);
+  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset, bool user_only = false);
 
   int list_collections(vector<coll_t>& ls);
   bool collection_exists(coll_t c);
diff --git a/src/os/ObjectStore.cc b/src/os/ObjectStore.cc
index f9f6e11..afa90b1 100644
--- a/src/os/ObjectStore.cc
+++ b/src/os/ObjectStore.cc
@@ -24,11 +24,10 @@
 ObjectStore *ObjectStore::create(CephContext *cct,
 				 const string& type,
 				 const string& data,
-				 const string& journal,
-			         osflagbits_t flags)
+				 const string& journal)
 {
   if (type == "filestore") {
-    return new FileStore(data, journal, flags);
+    return new FileStore(data, journal);
   }
   if (type == "memstore") {
     return new MemStore(cct, data);
@@ -113,7 +112,6 @@ int ObjectStore::queue_transactions(
 			    onreadable_sync, op);
 }
 
-
 int ObjectStore::collection_list(coll_t c, vector<hobject_t>& o)
 {
   vector<ghobject_t> go;
diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h
index 20f925b..a5f5fcb 100644
--- a/src/os/ObjectStore.h
+++ b/src/os/ObjectStore.h
@@ -80,11 +80,6 @@ static inline void encode(const map<string,bufferptr> *attrset, bufferlist &bl)
   ::encode(*attrset, bl);
 }
 
-// Flag bits
-typedef uint32_t osflagbits_t;
-const int SKIP_JOURNAL_REPLAY = 1 << 0;
-const int SKIP_MOUNT_OMAP = 1 << 1;
-
 class ObjectStore {
 protected:
   string path;
@@ -98,13 +93,11 @@ public:
    * @param type type of store. This is a string from the configuration file.
    * @param data path (or other descriptor) for data
    * @param journal path (or other descriptor) for journal (optional)
-   * @param flags which filestores should check if applicable
    */
   static ObjectStore *create(CephContext *cct,
 			     const string& type,
 			     const string& data,
-			     const string& journal,
-			     osflagbits_t flag = 0);
+			     const string& journal);
 
   Logger *logger;
 
@@ -375,12 +368,6 @@ public:
       OP_COLL_MOVE_RENAME = 38,   // oldcid, oldoid, newcid, newoid
 
       OP_SETALLOCHINT = 39,  // cid, oid, object_size, write_size
-      OP_COLL_HINT = 40, // cid, type, bl
-    };
-
-    // Transaction hint type
-    enum {
-      COLL_HINT_EXPECTED_NUM_OBJECTS = 1,
     };
 
   private:
@@ -393,7 +380,6 @@ public:
     bool use_pool_override;
     bool replica;
     bool tolerate_collection_add_enoent;
-    void *osr; // NULL on replay
 
     list<Context *> on_applied;
     list<Context *> on_commit;
@@ -536,14 +522,6 @@ public:
       return ops;
     }
 
-    void set_osr(void *s) {
-      osr = s;
-    }
-
-    void *get_osr() {
-      return osr;
-    }
-
     /**
      * iterator
      *
@@ -585,16 +563,16 @@ public:
        * stream. There is no checking that the encoded data is of the
        * correct type.
        */
-      int decode_op() {
+      int get_op() {
 	__u32 op;
 	::decode(op, p);
 	return op;
       }
-      void decode_bl(bufferlist& bl) {
+      void get_bl(bufferlist& bl) {
 	::decode(bl, p);
       }
       /// Get an oid, recognize various legacy forms and update them.
-      ghobject_t decode_oid() {
+      ghobject_t get_oid() {
 	ghobject_t oid;
 	if (sobject_encoding) {
 	  sobject_t soid;
@@ -602,7 +580,7 @@ public:
 	  oid.hobj.snap = soid.snap;
 	  oid.hobj.oid = soid.oid;
 	  oid.generation = ghobject_t::NO_GEN;
-	  oid.shard_id = shard_id_t::NO_SHARD;
+	  oid.shard_id = ghobject_t::NO_SHARD;
 	} else {
 	  ::decode(oid, p);
 	  if (use_pool_override && pool_override != -1 &&
@@ -612,36 +590,36 @@ public:
 	}
 	return oid;
       }
-      coll_t decode_cid() {
+      coll_t get_cid() {
 	coll_t c;
 	::decode(c, p);
 	return c;
       }
-      uint64_t decode_length() {
+      uint64_t get_length() {
 	uint64_t len;
 	::decode(len, p);
 	return len;
       }
-      string decode_attrname() {
+      string get_attrname() {
 	string s;
 	::decode(s, p);
 	return s;
       }
-      string decode_key() {
+      string get_key() {
 	string s;
 	::decode(s, p);
 	return s;
       }
-      void decode_attrset(map<string,bufferptr>& aset) {
+      void get_attrset(map<string,bufferptr>& aset) {
 	::decode(aset, p);
       }
-      void decode_attrset(map<string,bufferlist>& aset) {
+      void get_attrset(map<string,bufferlist>& aset) {
 	::decode(aset, p);
       }
-      void decode_keyset(set<string> &keys) {
+      void get_keyset(set<string> &keys) {
 	::decode(keys, p);
       }
-      uint32_t decode_u32() {
+      uint32_t get_u32() {
 	uint32_t bits;
 	::decode(bits, p);
 	return bits;
@@ -845,24 +823,6 @@ public:
       ::encode(cid, tbl);
       ops++;
     }
-
-    /**
-     * Give the collection a hint.
-     *
-     * @param cid  - collection id.
-     * @param type - hint type.
-     * @param hint - the hint payload, which contains the customized
-     *               data along with the hint type.
-     */
-     void collection_hint(coll_t cid, uint32_t type, const bufferlist& hint) {
-       __u32 op = OP_COLL_HINT;
-       ::encode(op, tbl);
-       ::encode(cid, tbl);
-       ::encode(type, tbl);
-       ::encode(hint, tbl);
-       ops++;
-     }
-
     /// remove the collection, the collection must be empty
     void remove_collection(coll_t cid) {
       __u32 op = OP_RMCOLL;
@@ -1067,13 +1027,13 @@ public:
       ops(0), pad_unused_bytes(0), largest_data_len(0), largest_data_off(0), largest_data_off_in_tbl(0),
       sobject_encoding(false), pool_override(-1), use_pool_override(false),
       replica(false),
-      tolerate_collection_add_enoent(false), osr(NULL) {}
+      tolerate_collection_add_enoent(false) {}
 
     Transaction(bufferlist::iterator &dp) :
       ops(0), pad_unused_bytes(0), largest_data_len(0), largest_data_off(0), largest_data_off_in_tbl(0),
       sobject_encoding(false), pool_override(-1), use_pool_override(false),
       replica(false),
-      tolerate_collection_add_enoent(false), osr(NULL) {
+      tolerate_collection_add_enoent(false) {
       decode(dp);
     }
 
@@ -1081,7 +1041,7 @@ public:
       ops(0), pad_unused_bytes(0), largest_data_len(0), largest_data_off(0), largest_data_off_in_tbl(0),
       sobject_encoding(false), pool_override(-1), use_pool_override(false),
       replica(false),
-      tolerate_collection_add_enoent(false), osr(NULL) {
+      tolerate_collection_add_enoent(false) {
       bufferlist::iterator dp = nbl.begin();
       decode(dp);
     }
@@ -1232,8 +1192,7 @@ public:
   virtual bool test_mount_in_use() = 0;
   virtual int mount() = 0;
   virtual int umount() = 0;
-  virtual unsigned get_max_object_name_length() = 0;
-  virtual unsigned get_max_attr_name_length() = 0;
+  virtual int get_max_object_name_length() = 0;
   virtual int mkfs() = 0;  // wipe
   virtual int mkjournal() = 0; // journal only
   virtual void set_allow_sharded_objects() = 0;
@@ -1241,8 +1200,6 @@ public:
 
   virtual int statfs(struct statfs *buf) = 0;
 
-  virtual void collect_metadata(map<string,string> *pm) { }
-
   /**
    * get the most recent "on-disk format version" supported
    */
@@ -1396,7 +1353,7 @@ public:
   }
   int getattr(
     coll_t cid, const ghobject_t& oid,
-    const string& name, bufferlist& value) {
+    const string name, bufferlist& value) {
     bufferptr bp;
     int r = getattr(cid, oid, name.c_str(), bp);
     value.push_back(bp);
@@ -1409,9 +1366,10 @@ public:
    * @param cid collection for object
    * @param oid oid of object
    * @param aset place to put output result.
+   * @param user_only true -> only user attributes are return else all attributes are returned
    * @returns 0 on success, negative error code on failure.
    */
-  virtual int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset) = 0;
+  virtual int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr>& aset, bool user_only = false) = 0;
 
   /**
    * getattrs -- get all of the xattrs of an object
@@ -1419,11 +1377,12 @@ public:
    * @param cid collection for object
    * @param oid oid of object
    * @param aset place to put output result.
+   * @param user_only true -> only user attributes are return else all attributes are returned
    * @returns 0 on success, negative error code on failure.
    */
-  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferlist>& aset) {
+  int getattrs(coll_t cid, const ghobject_t& oid, map<string,bufferlist>& aset, bool user_only = false) {
     map<string,bufferptr> bmap;
-    int r = getattrs(cid, oid, bmap);
+    int r = getattrs(cid, oid, bmap, user_only);
     for (map<string,bufferptr>::iterator i = bmap.begin();
 	i != bmap.end();
 	++i) {
diff --git a/src/os/RocksDBStore.cc b/src/os/RocksDBStore.cc
deleted file mode 100644
index 8b1b6db..0000000
--- a/src/os/RocksDBStore.cc
+++ /dev/null
@@ -1,512 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#include <set>
-#include <map>
-#include <string>
-#include <tr1/memory>
-#include <errno.h>
-
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/write_batch.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/cache.h"
-#include "rocksdb/filter_policy.h"
-
-using std::string;
-#include "common/perf_counters.h"
-#include "KeyValueDB.h"
-#include "RocksDBStore.h"
-
-
-int RocksDBStore::init()
-{
-  options.write_buffer_size = g_conf->rocksdb_write_buffer_size;
-  options.cache_size = g_conf->rocksdb_cache_size;
-  options.block_size = g_conf->rocksdb_block_size;
-  options.bloom_size = g_conf->rocksdb_bloom_size;
-  options.compression_type = g_conf->rocksdb_compression;
-  options.paranoid_checks = g_conf->rocksdb_paranoid;
-  options.max_open_files = g_conf->rocksdb_max_open_files;
-  options.log_file = g_conf->rocksdb_log;
-  options.write_buffer_num = g_conf->rocksdb_write_buffer_num;
-  options.max_background_compactions = g_conf->rocksdb_background_compactions;
-  options.max_background_flushes = g_conf->rocksdb_background_flushes;
-  options.target_file_size_base = g_conf->rocksdb_target_file_size_base;
-  options.level0_file_num_compaction_trigger = g_conf->rocksdb_level0_file_num_compaction_trigger;
-  options.level0_slowdown_writes_trigger = g_conf->rocksdb_level0_slowdown_writes_trigger;
-  options.level0_stop_writes_trigger = g_conf->rocksdb_level0_stop_writes_trigger;
-  options.disableDataSync = g_conf->rocksdb_disableDataSync;
-  options.num_levels = g_conf->rocksdb_num_levels;
-  options.disableWAL = g_conf->rocksdb_disableWAL;
-  options.wal_dir = g_conf->rocksdb_wal_dir;
-  options.info_log_level = g_conf->rocksdb_info_log_level;
-  return 0;
-}
-
-int RocksDBStore::do_open(ostream &out, bool create_if_missing)
-{
-  rocksdb::Options ldoptions;
-
-  if (options.write_buffer_size)
-    ldoptions.write_buffer_size = options.write_buffer_size;
-  if (options.write_buffer_num)
-    ldoptions.max_write_buffer_number = options.write_buffer_num;
-  if (options.max_background_compactions)
-    ldoptions.max_background_compactions = options.max_background_compactions;
-  if (options.max_background_flushes)
-    ldoptions.max_background_flushes = options.max_background_flushes;
-  if (options.target_file_size_base)
-    ldoptions.target_file_size_base = options.target_file_size_base;
-  if (options.max_open_files)
-    ldoptions.max_open_files = options.max_open_files;
-  if (options.cache_size) {
-    ldoptions.block_cache = rocksdb::NewLRUCache(options.cache_size);
-  }
-  if (options.block_size)
-    ldoptions.block_size = options.block_size;
-  if (options.bloom_size) {
-    const rocksdb::FilterPolicy *_filterpolicy =
-	rocksdb::NewBloomFilterPolicy(options.bloom_size);
-    ldoptions.filter_policy = _filterpolicy;
-    filterpolicy = _filterpolicy;
-  }
-  if (options.compression_type.length() == 0)
-    ldoptions.compression = rocksdb::kNoCompression;
-  else if(options.compression_type == "snappy")
-    ldoptions.compression = rocksdb::kSnappyCompression;
-  else if(options.compression_type == "zlib")
-    ldoptions.compression = rocksdb::kZlibCompression;
-  else if(options.compression_type == "bzip2")
-    ldoptions.compression = rocksdb::kBZip2Compression;
-  else
-    ldoptions.compression = rocksdb::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.create_if_missing = create_if_missing;
-  if (options.log_file.length()) {
-    rocksdb::Env *env = rocksdb::Env::Default();
-    env->NewLogger(options.log_file, &ldoptions.info_log);
-    ldoptions.info_log->SetInfoLogLevel((rocksdb::InfoLogLevel)get_info_log_level(options.info_log_level));
-  } else {
-    ldoptions.info_log_level = (rocksdb::InfoLogLevel)get_info_log_level(options.info_log_level);
-  }
-  if(options.disableDataSync)
-    ldoptions.disableDataSync = options.disableDataSync;
-  if(options.num_levels)
-    ldoptions.num_levels = options.num_levels;
-  if(options.level0_file_num_compaction_trigger)
-    ldoptions.level0_file_num_compaction_trigger = options.level0_file_num_compaction_trigger;
-  if(options.level0_slowdown_writes_trigger)
-    ldoptions.level0_slowdown_writes_trigger = options.level0_slowdown_writes_trigger;
-  if(options.level0_stop_writes_trigger)
-    ldoptions.level0_stop_writes_trigger = options.level0_stop_writes_trigger;
-  if(options.wal_dir.length())
-    ldoptions.wal_dir = options.wal_dir;
-
-
-  //rocksdb::DB *_db;
-  rocksdb::Status status = rocksdb::DB::Open(ldoptions, path, &db);
-  if (!status.ok()) {
-    out << status.ToString() << std::endl;
-    return -EINVAL;
-  }
-  //db.reset(_db);
-
-  if (g_conf->rocksdb_compact_on_mount) {
-    derr << "Compacting rocksdb store..." << dendl;
-    compact();
-    derr << "Finished compacting rocksdb store" << dendl;
-  }
-
-
-  PerfCountersBuilder plb(g_ceph_context, "rocksdb", l_rocksdb_first, l_rocksdb_last);
-  plb.add_u64_counter(l_rocksdb_gets, "rocksdb_get");
-  plb.add_u64_counter(l_rocksdb_txns, "rocksdb_transaction");
-  plb.add_u64_counter(l_rocksdb_compact, "rocksdb_compact");
-  plb.add_u64_counter(l_rocksdb_compact_range, "rocksdb_compact_range");
-  plb.add_u64_counter(l_rocksdb_compact_queue_merge, "rocksdb_compact_queue_merge");
-  plb.add_u64(l_rocksdb_compact_queue_len, "rocksdb_compact_queue_len");
-  logger = plb.create_perf_counters();
-  cct->get_perfcounters_collection()->add(logger);
-  return 0;
-}
-
-int RocksDBStore::_test_init(const string& dir)
-{
-  rocksdb::Options options;
-  options.create_if_missing = true;
-  rocksdb::DB *db;
-  rocksdb::Status status = rocksdb::DB::Open(options, dir, &db);
-  delete db;
-  return status.ok() ? 0 : -EIO;
-}
-
-RocksDBStore::~RocksDBStore()
-{
-  close();
-  delete logger;
-
-  // Ensure db is destroyed before dependent db_cache and filterpolicy
-  delete db;
-}
-
-void RocksDBStore::close()
-{
-  // stop compaction thread
-  compact_queue_lock.Lock();
-  if (compact_thread.is_started()) {
-    compact_queue_stop = true;
-    compact_queue_cond.Signal();
-    compact_queue_lock.Unlock();
-    compact_thread.join();
-  } else {
-    compact_queue_lock.Unlock();
-  }
-
-  if (logger)
-    cct->get_perfcounters_collection()->remove(logger);
-}
-
-int RocksDBStore::submit_transaction(KeyValueDB::Transaction t)
-{
-  RocksDBTransactionImpl * _t =
-    static_cast<RocksDBTransactionImpl *>(t.get());
-  rocksdb::WriteOptions woptions;
-  woptions.disableWAL = options.disableWAL;
-  rocksdb::Status s = db->Write(woptions, _t->bat);
-  logger->inc(l_rocksdb_txns);
-  return s.ok() ? 0 : -1;
-}
-
-int RocksDBStore::submit_transaction_sync(KeyValueDB::Transaction t)
-{
-  RocksDBTransactionImpl * _t =
-    static_cast<RocksDBTransactionImpl *>(t.get());
-  rocksdb::WriteOptions woptions;
-  woptions.sync = true;
-  woptions.disableWAL = options.disableWAL;
-  rocksdb::Status s = db->Write(woptions, _t->bat);
-  logger->inc(l_rocksdb_txns);
-  return s.ok() ? 0 : -1;
-}
-int RocksDBStore::get_info_log_level(string info_log_level)
-{
-  if (info_log_level == "debug") {
-    return 0;
-  } else if (info_log_level == "info") {
-    return 1;
-  } else if (info_log_level == "warn") {
-    return 2;
-  } else if (info_log_level == "error") {
-    return 3;
-  } else if (info_log_level == "fatal") {
-    return 4;
-  } else {
-    return 1;
-  }
-}
-
-RocksDBStore::RocksDBTransactionImpl::RocksDBTransactionImpl(RocksDBStore *_db)
-{
-  db = _db;
-  bat = new rocksdb::WriteBatch();
-}
-RocksDBStore::RocksDBTransactionImpl::~RocksDBTransactionImpl()
-{
-  delete bat;
-}
-void RocksDBStore::RocksDBTransactionImpl::set(
-  const string &prefix,
-  const string &k,
-  const bufferlist &to_set_bl)
-{
-  buffers.push_back(to_set_bl);
-  buffers.rbegin()->rebuild();
-  bufferlist &bl = *(buffers.rbegin());
-  string key = combine_strings(prefix, k);
-  keys.push_back(key);
-  bat->Delete(rocksdb::Slice(*(keys.rbegin())));
-  bat->Put(rocksdb::Slice(*(keys.rbegin())),
-	  rocksdb::Slice(bl.c_str(), bl.length()));
-}
-
-void RocksDBStore::RocksDBTransactionImpl::rmkey(const string &prefix,
-					         const string &k)
-{
-  string key = combine_strings(prefix, k);
-  keys.push_back(key);
-  bat->Delete(rocksdb::Slice(*(keys.rbegin())));
-}
-
-void RocksDBStore::RocksDBTransactionImpl::rmkeys_by_prefix(const string &prefix)
-{
-  KeyValueDB::Iterator it = db->get_iterator(prefix);
-  for (it->seek_to_first();
-       it->valid();
-       it->next()) {
-    string key = combine_strings(prefix, it->key());
-    keys.push_back(key);
-    bat->Delete(*(keys.rbegin()));
-  }
-}
-
-int RocksDBStore::get(
-    const string &prefix,
-    const std::set<string> &keys,
-    std::map<string, bufferlist> *out)
-{
-  KeyValueDB::Iterator it = get_iterator(prefix);
-  for (std::set<string>::const_iterator i = keys.begin();
-       i != keys.end();
-       ++i) {
-    it->lower_bound(*i);
-    if (it->valid() && it->key() == *i) {
-      out->insert(make_pair(*i, it->value()));
-    } else if (!it->valid())
-      break;
-  }
-  logger->inc(l_rocksdb_gets);
-  return 0;
-}
-
-string RocksDBStore::combine_strings(const string &prefix, const string &value)
-{
-  string out = prefix;
-  out.push_back(0);
-  out.append(value);
-  return out;
-}
-
-bufferlist RocksDBStore::to_bufferlist(rocksdb::Slice in)
-{
-  bufferlist bl;
-  bl.append(bufferptr(in.data(), in.size()));
-  return bl;
-}
-
-int RocksDBStore::split_key(rocksdb::Slice in, string *prefix, string *key)
-{
-  string in_prefix = in.ToString();
-  size_t prefix_len = in_prefix.find('\0');
-  if (prefix_len >= in_prefix.size())
-    return -EINVAL;
-
-  if (prefix)
-    *prefix = string(in_prefix, 0, prefix_len);
-  if (key)
-    *key= string(in_prefix, prefix_len + 1);
-  return 0;
-}
-
-void RocksDBStore::compact()
-{
-  logger->inc(l_rocksdb_compact);
-  db->CompactRange(NULL, NULL);
-}
-
-
-void RocksDBStore::compact_thread_entry()
-{
-  compact_queue_lock.Lock();
-  while (!compact_queue_stop) {
-    while (!compact_queue.empty()) {
-      pair<string,string> range = compact_queue.front();
-      compact_queue.pop_front();
-      logger->set(l_rocksdb_compact_queue_len, compact_queue.size());
-      compact_queue_lock.Unlock();
-      logger->inc(l_rocksdb_compact_range);
-      compact_range(range.first, range.second);
-      compact_queue_lock.Lock();
-      continue;
-    }
-    compact_queue_cond.Wait(compact_queue_lock);
-  }
-  compact_queue_lock.Unlock();
-}
-
-void RocksDBStore::compact_range_async(const string& start, const string& end)
-{
-  Mutex::Locker l(compact_queue_lock);
-
-  // try to merge adjacent ranges.  this is O(n), but the queue should
-  // be short.  note that we do not cover all overlap cases and merge
-  // opportunities here, but we capture the ones we currently need.
-  list< pair<string,string> >::iterator p = compact_queue.begin();
-  while (p != compact_queue.end()) {
-    if (p->first == start && p->second == end) {
-      // dup; no-op
-      return;
-    }
-    if (p->first <= end && p->first > start) {
-      // merge with existing range to the right
-      compact_queue.push_back(make_pair(start, p->second));
-      compact_queue.erase(p);
-      logger->inc(l_rocksdb_compact_queue_merge);
-      break;
-    }
-    if (p->second >= start && p->second < end) {
-      // merge with existing range to the left
-      compact_queue.push_back(make_pair(p->first, end));
-      compact_queue.erase(p);
-      logger->inc(l_rocksdb_compact_queue_merge);
-      break;
-    }
-    ++p;
-  }
-  if (p == compact_queue.end()) {
-    // no merge, new entry.
-    compact_queue.push_back(make_pair(start, end));
-    logger->set(l_rocksdb_compact_queue_len, compact_queue.size());
-  }
-  compact_queue_cond.Signal();
-  if (!compact_thread.is_started()) {
-    compact_thread.create();
-  }
-}
-bool RocksDBStore::check_omap_dir(string &omap_dir)
-{
-  rocksdb::Options options;
-  options.create_if_missing = true;
-  rocksdb::DB *db;
-  rocksdb::Status status = rocksdb::DB::Open(options, omap_dir, &db);
-  delete db;
-  return status.ok();
-}
-void RocksDBStore::compact_range(const string& start, const string& end)
-{
-    rocksdb::Slice cstart(start);
-    rocksdb::Slice cend(end);
-    db->CompactRange(&cstart, &cend);
-}
-RocksDBStore::RocksDBWholeSpaceIteratorImpl::~RocksDBWholeSpaceIteratorImpl()
-{
-  delete dbiter;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::seek_to_first()
-{
-  dbiter->SeekToFirst();
-  return dbiter->status().ok() ? 0 : -1;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::seek_to_first(const string &prefix)
-{
-  rocksdb::Slice slice_prefix(prefix);
-  dbiter->Seek(slice_prefix);
-  return dbiter->status().ok() ? 0 : -1;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::seek_to_last()
-{
-  dbiter->SeekToLast();
-  return dbiter->status().ok() ? 0 : -1;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::seek_to_last(const string &prefix)
-{
-  string limit = past_prefix(prefix);
-  rocksdb::Slice slice_limit(limit);
-  dbiter->Seek(slice_limit);
-
-  if (!dbiter->Valid()) {
-    dbiter->SeekToLast();
-  } else {
-    dbiter->Prev();
-  }
-  return dbiter->status().ok() ? 0 : -1;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::upper_bound(const string &prefix, const string &after)
-{
-  lower_bound(prefix, after);
-  if (valid()) {
-  pair<string,string> key = raw_key();
-    if (key.first == prefix && key.second == after)
-      next();
-  }
-  return dbiter->status().ok() ? 0 : -1;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::lower_bound(const string &prefix, const string &to)
-{
-  string bound = combine_strings(prefix, to);
-  rocksdb::Slice slice_bound(bound);
-  dbiter->Seek(slice_bound);
-  return dbiter->status().ok() ? 0 : -1;
-}
-bool RocksDBStore::RocksDBWholeSpaceIteratorImpl::valid()
-{
-  return dbiter->Valid();
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::next()
-{
-  if (valid())
-  dbiter->Next();
-  return dbiter->status().ok() ? 0 : -1;
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::prev()
-{
-  if (valid())
-    dbiter->Prev();
-    return dbiter->status().ok() ? 0 : -1;
-}
-string RocksDBStore::RocksDBWholeSpaceIteratorImpl::key()
-{
-  string out_key;
-  split_key(dbiter->key(), 0, &out_key);
-  return out_key;
-}
-pair<string,string> RocksDBStore::RocksDBWholeSpaceIteratorImpl::raw_key()
-{
-  string prefix, key;
-  split_key(dbiter->key(), &prefix, &key);
-  return make_pair(prefix, key);
-}
-bufferlist RocksDBStore::RocksDBWholeSpaceIteratorImpl::value()
-{
-  return to_bufferlist(dbiter->value());
-}
-int RocksDBStore::RocksDBWholeSpaceIteratorImpl::status()
-{
-  return dbiter->status().ok() ? 0 : -1;
-}
-
-bool RocksDBStore::in_prefix(const string &prefix, rocksdb::Slice key)
-{
-  return (key.compare(rocksdb::Slice(past_prefix(prefix))) < 0) &&
-    (key.compare(rocksdb::Slice(prefix)) > 0);
-}
-string RocksDBStore::past_prefix(const string &prefix)
-{
-  string limit = prefix;
-  limit.push_back(1);
-  return limit;
-}
-
-
-RocksDBStore::WholeSpaceIterator RocksDBStore::_get_iterator()
-{
-  return std::tr1::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
-    new RocksDBWholeSpaceIteratorImpl(
-      db->NewIterator(rocksdb::ReadOptions())
-    )
-  );
-}
-
-RocksDBStore::WholeSpaceIterator RocksDBStore::_get_snapshot_iterator()
-{
-  const rocksdb::Snapshot *snapshot;
-  rocksdb::ReadOptions options;
-
-  snapshot = db->GetSnapshot();
-  options.snapshot = snapshot;
-
-  return std::tr1::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
-    new RocksDBSnapshotIteratorImpl(db, snapshot,
-      db->NewIterator(options))
-  );
-}
-
-RocksDBStore::RocksDBSnapshotIteratorImpl::~RocksDBSnapshotIteratorImpl()
-{
-  db->ReleaseSnapshot(snapshot);
-}
diff --git a/src/os/RocksDBStore.h b/src/os/RocksDBStore.h
deleted file mode 100644
index 5c3160f..0000000
--- a/src/os/RocksDBStore.h
+++ /dev/null
@@ -1,333 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-#ifndef ROCKS_DB_STORE_H
-#define ROCKS_DB_STORE_H
-
-#include "include/types.h"
-#include "include/buffer.h"
-#include "KeyValueDB.h"
-#include <set>
-#include <map>
-#include <string>
-#include <tr1/memory>
-#include <boost/scoped_ptr.hpp>
-
-#include <errno.h>
-#include "common/errno.h"
-#include "common/dout.h"
-#include "include/assert.h"
-#include "common/Formatter.h"
-
-#include "common/ceph_context.h"
-
-class PerfCounters;
-
-enum {
-  l_rocksdb_first = 34300,
-  l_rocksdb_gets,
-  l_rocksdb_txns,
-  l_rocksdb_compact,
-  l_rocksdb_compact_range,
-  l_rocksdb_compact_queue_merge,
-  l_rocksdb_compact_queue_len,
-  l_rocksdb_last,
-};
-
-namespace rocksdb{
-  class DB;
-  class Cache;
-  class FilterPolicy;
-  class Snapshot;
-  class Slice;
-  class WriteBatch;
-  class Iterator;
-}
-
-/**
- * Uses RocksDB to implement the KeyValueDB interface
- */
-class RocksDBStore : public KeyValueDB {
-  CephContext *cct;
-  PerfCounters *logger;
-  string path;
-  const rocksdb::FilterPolicy *filterpolicy;
-  rocksdb::DB *db;
-
-  int do_open(ostream &out, bool create_if_missing);
-
-  // manage async compactions
-  Mutex compact_queue_lock;
-  Cond compact_queue_cond;
-  list< pair<string,string> > compact_queue;
-  bool compact_queue_stop;
-  class CompactThread : public Thread {
-    RocksDBStore *db;
-  public:
-    CompactThread(RocksDBStore *d) : db(d) {}
-    void *entry() {
-      db->compact_thread_entry();
-      return NULL;
-    }
-    friend class RocksDBStore;
-  } compact_thread;
-
-  void compact_thread_entry();
-
-  void compact_range(const string& start, const string& end);
-  void compact_range_async(const string& start, const string& end);
-
-public:
-  /// compact the underlying rocksdb store
-  void compact();
-
-  static int _test_init(const string& dir);
-  int init();
-  /// compact rocksdb for all keys with a given prefix
-  void compact_prefix(const string& prefix) {
-    compact_range(prefix, past_prefix(prefix));
-  }
-  void compact_prefix_async(const string& prefix) {
-    compact_range_async(prefix, past_prefix(prefix));
-  }
-
-  void compact_range(const string& prefix, const string& start, const string& end) {
-    compact_range(combine_strings(prefix, start), combine_strings(prefix, end));
-  }
-  void compact_range_async(const string& prefix, const string& start, const string& end) {
-    compact_range_async(combine_strings(prefix, start), combine_strings(prefix, end));
-  }
-  int get_info_log_level(string info_log_level);
-
-  /**
-   * options_t: Holds options which are minimally interpreted
-   * on initialization and then passed through to RocksDB.
-   * We transform a couple of these into actual RocksDB
-   * structures, but the rest are simply passed through unchanged. See
-   * rocksdb/options.h for more precise details on each.
-   *
-   * Set them after constructing the RocksDBStore, but before calling
-   * open() or create_and_open().
-   */
-  struct options_t {
-    uint64_t write_buffer_size; /// in-memory write buffer size
-    uint64_t write_buffer_num; /// in-memory write buffer number
-    uint64_t target_file_size_base; /// Target file size for compaction
-    int max_background_compactions; /// Maximum number of concurrent background compaction jobs
-    int max_background_flushes; /// Maximum number of concurrent background memtable flushea jobs
-    int max_open_files; /// maximum number of files RocksDB can open at once
-    uint64_t cache_size; /// size of extra decompressed cache to use
-    uint64_t block_size; /// user data per block
-    int bloom_size; /// number of bits per entry to put in a bloom filter
-    string compression_type; /// whether to use libsnappy compression or not
-
-    // don't change these ones. No, seriously
-    int block_restart_interval;
-    bool error_if_exists;
-    bool paranoid_checks;
-    uint64_t level0_file_num_compaction_trigger;
-    uint64_t level0_slowdown_writes_trigger;
-    uint64_t level0_stop_writes_trigger;
-    bool disableDataSync;
-    bool disableWAL;
-    int num_levels;
-
-    string log_file;
-    string wal_dir;
-    string info_log_level;
-
-    options_t() :
-      write_buffer_size(0), //< 0 means default
-      max_open_files(0), //< 0 means default
-      cache_size(0), //< 0 means no cache (default)
-      block_size(0), //< 0 means default
-      bloom_size(0), //< 0 means no bloom filter (default)
-      compression_type("none"), //< set to false for no compression
-      block_restart_interval(0), //< 0 means default
-      error_if_exists(false), //< set to true if you want to check nonexistence
-      paranoid_checks(false), //< set to true if you want paranoid checks
-      level0_file_num_compaction_trigger(0),
-      level0_slowdown_writes_trigger(0),
-      level0_stop_writes_trigger(0),
-      disableDataSync(false),
-      disableWAL(false),
-      num_levels(0),
-      info_log_level("info")
-    {}
-  } options;
-
-  RocksDBStore(CephContext *c, const string &path) :
-    cct(c),
-    logger(NULL),
-    path(path),
-    compact_queue_lock("RocksDBStore::compact_thread_lock"),
-    compact_queue_stop(false),
-    compact_thread(this),
-    options()
-  {}
-
-  ~RocksDBStore();
-
-  static bool check_omap_dir(string &omap_dir);
-  /// Opens underlying db
-  int open(ostream &out) {
-    return do_open(out, false);
-  }
-  /// Creates underlying db if missing and opens it
-  int create_and_open(ostream &out) {
-    return do_open(out, true);
-  }
-
-  void close();
-
-  class RocksDBTransactionImpl : public KeyValueDB::TransactionImpl {
-  public:
-    rocksdb::WriteBatch *bat;
-    list<bufferlist> buffers;
-    list<string> keys;
-    RocksDBStore *db;
-
-    RocksDBTransactionImpl(RocksDBStore *_db);
-    ~RocksDBTransactionImpl();
-    void set(
-      const string &prefix,
-      const string &k,
-      const bufferlist &bl);
-    void rmkey(
-      const string &prefix,
-      const string &k);
-    void rmkeys_by_prefix(
-      const string &prefix
-      );
-  };
-
-  KeyValueDB::Transaction get_transaction() {
-    return std::tr1::shared_ptr< RocksDBTransactionImpl >(
-      new RocksDBTransactionImpl(this));
-  }
-
-  int submit_transaction(KeyValueDB::Transaction t);
-  int submit_transaction_sync(KeyValueDB::Transaction t);
-  int get(
-    const string &prefix,
-    const std::set<string> &key,
-    std::map<string, bufferlist> *out
-    );
-
-  class RocksDBWholeSpaceIteratorImpl :
-    public KeyValueDB::WholeSpaceIteratorImpl {
-  protected:
-    rocksdb::Iterator *dbiter;
-  public:
-    RocksDBWholeSpaceIteratorImpl(rocksdb::Iterator *iter) :
-      dbiter(iter) { }
-    //virtual ~RocksDBWholeSpaceIteratorImpl() { }
-    ~RocksDBWholeSpaceIteratorImpl();
-
-    int seek_to_first();
-    int seek_to_first(const string &prefix);
-    int seek_to_last();
-    int seek_to_last(const string &prefix);
-    int upper_bound(const string &prefix, const string &after);
-    int lower_bound(const string &prefix, const string &to);
-    bool valid();
-    int next();
-    int prev();
-    string key();
-    pair<string,string> raw_key();
-    bufferlist value();
-    int status();
-  };
-
-  class RocksDBSnapshotIteratorImpl : public RocksDBWholeSpaceIteratorImpl {
-    rocksdb::DB *db;
-    const rocksdb::Snapshot *snapshot;
-  public:
-    RocksDBSnapshotIteratorImpl(rocksdb::DB *db, const rocksdb::Snapshot *s,
-				rocksdb::Iterator *iter) :
-      RocksDBWholeSpaceIteratorImpl(iter), db(db), snapshot(s) { }
-
-    ~RocksDBSnapshotIteratorImpl();
-  };
-
-  /// Utility
-  static string combine_strings(const string &prefix, const string &value);
-  static int split_key(rocksdb::Slice in, string *prefix, string *key);
-  static bufferlist to_bufferlist(rocksdb::Slice in);
-  static bool in_prefix(const string &prefix, rocksdb::Slice key);
-  static string past_prefix(const string &prefix);
-
-  virtual uint64_t get_estimated_size(map<string,uint64_t> &extra) {
-    DIR *store_dir = opendir(path.c_str());
-    if (!store_dir) {
-      lderr(cct) << __func__ << " something happened opening the store: "
-                 << cpp_strerror(errno) << dendl;
-      return 0;
-    }
-
-    uint64_t total_size = 0;
-    uint64_t sst_size = 0;
-    uint64_t log_size = 0;
-    uint64_t misc_size = 0;
-
-    struct dirent *entry = NULL;
-    while ((entry = readdir(store_dir)) != NULL) {
-      string n(entry->d_name);
-
-      if (n == "." || n == "..")
-        continue;
-
-      string fpath = path + '/' + n;
-      struct stat s;
-      int err = stat(fpath.c_str(), &s);
-      if (err < 0)
-	err = -errno;
-      // we may race against rocksdb while reading files; this should only
-      // happen when those files are being updated, data is being shuffled
-      // and files get removed, in which case there's not much of a problem
-      // as we'll get to them next time around.
-      if (err == -ENOENT) {
-	continue;
-      }
-      if (err < 0) {
-        lderr(cct) << __func__ << " error obtaining stats for " << fpath
-                   << ": " << cpp_strerror(err) << dendl;
-        goto err;
-      }
-
-      size_t pos = n.find_last_of('.');
-      if (pos == string::npos) {
-        misc_size += s.st_size;
-        continue;
-      }
-
-      string ext = n.substr(pos+1);
-      if (ext == "sst") {
-        sst_size += s.st_size;
-      } else if (ext == "log") {
-        log_size += s.st_size;
-      } else {
-        misc_size += s.st_size;
-      }
-    }
-
-    total_size = sst_size + log_size + misc_size;
-
-    extra["sst"] = sst_size;
-    extra["log"] = log_size;
-    extra["misc"] = misc_size;
-    extra["total"] = total_size;
-
-err:
-    closedir(store_dir);
-    return total_size;
-  }
-
-
-protected:
-  WholeSpaceIterator _get_iterator();
-
-  WholeSpaceIterator _get_snapshot_iterator();
-
-};
-
-#endif
diff --git a/src/os/Transaction.cc b/src/os/Transaction.cc
index 8168798..cdfdf0e 100644
--- a/src/os/Transaction.cc
+++ b/src/os/Transaction.cc
@@ -11,7 +11,7 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
   int op_num = 0;
   bool stop_looping = false;
   while (i.have_op() && !stop_looping) {
-    int op = i.decode_op();
+    int op = i.get_op();
     f->open_object_section("op");
     f->dump_int("op_num", op_num);
 
@@ -21,8 +21,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       break;
     case Transaction::OP_TOUCH:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	f->dump_string("op_name", "touch");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -31,12 +31,12 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_WRITE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	f->dump_string("op_name", "write");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -48,10 +48,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_ZERO:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	f->dump_string("op_name", "zero");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -62,10 +62,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_TRIMCACHE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	f->dump_string("op_name", "trim_cache");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -76,9 +76,9 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_TRUNCATE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	uint64_t off = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	uint64_t off = i.get_length();
 	f->dump_string("op_name", "truncate");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -88,8 +88,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_REMOVE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	f->dump_string("op_name", "remove");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -98,11 +98,11 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_SETATTR:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	string name = i.get_attrname();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	f->dump_string("op_name", "setattr");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -113,10 +113,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_SETATTRS:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	map<string, bufferptr> aset;
-	i.decode_attrset(aset);
+	i.get_attrset(aset);
 	f->dump_string("op_name", "setattrs");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -131,9 +131,9 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_RMATTR:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	string name = i.get_attrname();
 	f->dump_string("op_name", "rmattr");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -143,8 +143,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_RMATTRS:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	f->dump_string("op_name", "rmattrs");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -153,9 +153,9 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
       
     case Transaction::OP_CLONE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
 	f->dump_string("op_name", "clone");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("src_oid") << oid;
@@ -165,11 +165,11 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_CLONERANGE:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-	uint64_t off = i.decode_length();
-	uint64_t len = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
+ 	uint64_t off = i.get_length();
+	uint64_t len = i.get_length();
 	f->dump_string("op_name", "clonerange");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("src_oid") << oid;
@@ -181,12 +181,12 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_CLONERANGE2:
       {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
-	ghobject_t noid = i.decode_oid();
-	uint64_t srcoff = i.decode_length();
-	uint64_t len = i.decode_length();
-	uint64_t dstoff = i.decode_length();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
+	ghobject_t noid = i.get_oid();
+ 	uint64_t srcoff = i.get_length();
+	uint64_t len = i.get_length();
+ 	uint64_t dstoff = i.get_length();
 	f->dump_string("op_name", "clonerange2");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("src_oid") << oid;
@@ -199,36 +199,15 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_MKCOLL:
       {
-	coll_t cid = i.decode_cid();
+	coll_t cid = i.get_cid();
 	f->dump_string("op_name", "mkcoll");
 	f->dump_stream("collection") << cid;
       }
       break;
 
-    case Transaction::OP_COLL_HINT:
-      {
-        coll_t cid = i.decode_cid();
-        uint32_t type = i.decode_u32();
-        f->dump_string("op_name", "coll_hint");
-        f->dump_stream("collection") << cid;
-        f->dump_unsigned("type", type);
-        bufferlist hint;
-        i.decode_bl(hint);
-        bufferlist::iterator hiter = hint.begin();
-        if (type == Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS) {
-          uint32_t pg_num;
-          uint64_t num_objs;
-          ::decode(pg_num, hiter);
-          ::decode(num_objs, hiter);
-          f->dump_unsigned("pg_num", pg_num);
-          f->dump_unsigned("expected_num_objects", num_objs);
-        }
-      }
-      break;
-
     case Transaction::OP_RMCOLL:
       {
-	coll_t cid = i.decode_cid();
+	coll_t cid = i.get_cid();
 	f->dump_string("op_name", "rmcoll");
 	f->dump_stream("collection") << cid;
       }
@@ -236,9 +215,9 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_ADD:
       {
-	coll_t ncid = i.decode_cid();
-	coll_t ocid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t ncid = i.get_cid();
+	coll_t ocid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	f->dump_string("op_name", "collection_add");
 	f->dump_stream("src_collection") << ocid;
 	f->dump_stream("dst_collection") << ncid;
@@ -248,8 +227,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_REMOVE:
        {
-	coll_t cid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t cid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	f->dump_string("op_name", "collection_remove");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -258,9 +237,9 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_MOVE:
        {
-	coll_t ocid = i.decode_cid();
-	coll_t ncid = i.decode_cid();
-	ghobject_t oid = i.decode_oid();
+	coll_t ocid = i.get_cid();
+	coll_t ncid = i.get_cid();
+	ghobject_t oid = i.get_oid();
 	f->open_object_section("collection_move");
 	f->dump_stream("src_collection") << ocid;
 	f->dump_stream("dst_collection") << ncid;
@@ -272,10 +251,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_SETATTR:
       {
-	coll_t cid = i.decode_cid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	string name = i.get_attrname();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	f->dump_string("op_name", "collection_setattr");
 	f->dump_stream("collection") << cid;
 	f->dump_string("name", name);
@@ -285,8 +264,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_RMATTR:
       {
-	coll_t cid = i.decode_cid();
-	string name = i.decode_attrname();
+	coll_t cid = i.get_cid();
+	string name = i.get_attrname();
 	f->dump_string("op_name", "collection_rmattr");
 	f->dump_stream("collection") << cid;
 	f->dump_string("name", name);
@@ -299,8 +278,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_RENAME:
       {
-	coll_t cid(i.decode_cid());
-	coll_t ncid(i.decode_cid());
+	coll_t cid(i.get_cid());
+	coll_t ncid(i.get_cid());
 	f->dump_string("op_name", "collection_rename");
 	f->dump_stream("src_collection") << cid;
 	f->dump_stream("dst_collection") << ncid;
@@ -309,8 +288,8 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_OMAP_CLEAR:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	f->dump_string("op_name", "omap_clear");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -319,10 +298,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_OMAP_SETKEYS:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	map<string, bufferlist> aset;
-	i.decode_attrset(aset);
+	i.get_attrset(aset);
 	f->dump_string("op_name", "omap_setkeys");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -337,10 +316,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_OMAP_RMKEYS:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	set<string> keys;
-	i.decode_keyset(keys);
+	i.get_keyset(keys);
 	f->dump_string("op_name", "omap_rmkeys");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -349,10 +328,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_OMAP_SETHEADER:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	bufferlist bl;
-	i.decode_bl(bl);
+	i.get_bl(bl);
 	f->dump_string("op_name", "omap_setheader");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -362,10 +341,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_SPLIT_COLLECTION:
       {
-	coll_t cid(i.decode_cid());
-	uint32_t bits(i.decode_u32());
-	uint32_t rem(i.decode_u32());
-	coll_t dest(i.decode_cid());
+	coll_t cid(i.get_cid());
+	uint32_t bits(i.get_u32());
+	uint32_t rem(i.get_u32());
+	coll_t dest(i.get_cid());
 	f->dump_string("op_name", "op_split_collection_create");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("bits") << bits;
@@ -376,10 +355,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_SPLIT_COLLECTION2:
       {
-	coll_t cid(i.decode_cid());
-	uint32_t bits(i.decode_u32());
-	uint32_t rem(i.decode_u32());
-	coll_t dest(i.decode_cid());
+	coll_t cid(i.get_cid());
+	uint32_t bits(i.get_u32());
+	uint32_t rem(i.get_u32());
+	coll_t dest(i.get_cid());
 	f->dump_string("op_name", "op_split_collection");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("bits") << bits;
@@ -390,11 +369,11 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_OMAP_RMKEYRANGE:
       {
-	coll_t cid(i.decode_cid());
-	ghobject_t oid = i.decode_oid();
+	coll_t cid(i.get_cid());
+	ghobject_t oid = i.get_oid();
 	string first, last;
-	first = i.decode_key();
-	last = i.decode_key();
+	first = i.get_key();
+	last = i.get_key();
 	f->dump_string("op_name", "op_omap_rmkeyrange");
 	f->dump_stream("collection") << cid;
 	f->dump_stream("oid") << oid;
@@ -405,10 +384,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_COLL_MOVE_RENAME:
       {
-	coll_t old_cid(i.decode_cid());
-	ghobject_t old_oid = i.decode_oid();
-	coll_t new_cid(i.decode_cid());
-	ghobject_t new_oid = i.decode_oid();
+	coll_t old_cid(i.get_cid());
+	ghobject_t old_oid = i.get_oid();
+	coll_t new_cid(i.get_cid());
+	ghobject_t new_oid = i.get_oid();
 	f->dump_string("op_name", "op_coll_move_rename");
 	f->dump_stream("old_collection") << old_cid;
 	f->dump_stream("old_oid") << old_oid;
@@ -419,10 +398,10 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
 
     case Transaction::OP_SETALLOCHINT:
       {
-        coll_t cid = i.decode_cid();
-        ghobject_t oid = i.decode_oid();
-        uint64_t expected_object_size = i.decode_length();
-        uint64_t expected_write_size = i.decode_length();
+        coll_t cid = i.get_cid();
+        ghobject_t oid = i.get_oid();
+        uint64_t expected_object_size = i.get_length();
+        uint64_t expected_write_size = i.get_length();
         f->dump_string("op_name", "op_setallochint");
         f->dump_stream("collection") << cid;
         f->dump_stream("oid") << oid;
diff --git a/src/os/WBThrottle.cc b/src/os/WBThrottle.cc
index 7d0bcf6..0354ceb 100644
--- a/src/os/WBThrottle.cc
+++ b/src/os/WBThrottle.cc
@@ -242,10 +242,7 @@ void WBThrottle::clear_object(const ghobject_t &hoid)
     return;
 
   cur_ios -= i->second.first.ios;
-  logger->dec(l_wbthrottle_ios_dirtied, i->second.first.ios);
   cur_size -= i->second.first.size;
-  logger->dec(l_wbthrottle_bytes_dirtied, i->second.first.size);
-  logger->dec(l_wbthrottle_inodes_dirtied);
 
   pending_wbs.erase(i);
   remove_object(hoid);
diff --git a/src/os/XfsFileStoreBackend.cc b/src/os/XfsFileStoreBackend.cc
index bff9402..e4d4aad 100644
--- a/src/os/XfsFileStoreBackend.cc
+++ b/src/os/XfsFileStoreBackend.cc
@@ -47,17 +47,18 @@ int XfsFileStoreBackend::set_extsize(int fd, unsigned int val)
   if (fstat(fd, &sb) < 0) {
     ret = -errno;
     dout(0) << "set_extsize: fstat: " << cpp_strerror(ret) << dendl;
-    return ret;
+    goto out;
   }
   if (!S_ISREG(sb.st_mode)) {
+    ret = -EINVAL;
     dout(0) << "set_extsize: invalid target file type" << dendl;
-    return -EINVAL;
+    goto out;
   }
 
   if (ioctl(fd, XFS_IOC_FSGETXATTR, &fsx) < 0) {
     ret = -errno;
     dout(0) << "set_extsize: FSGETXATTR: " << cpp_strerror(ret) << dendl;
-    return ret;
+    goto out;
   }
 
   // already set?
@@ -74,10 +75,12 @@ int XfsFileStoreBackend::set_extsize(int fd, unsigned int val)
   if (ioctl(fd, XFS_IOC_FSSETXATTR, &fsx) < 0) {
     ret = -errno;
     dout(0) << "set_extsize: FSSETXATTR: " << cpp_strerror(ret) << dendl;
-    return ret;
+    goto out;
   }
+  ret = 0;
 
-  return 0;
+out:
+  return ret;
 }
 
 int XfsFileStoreBackend::detect_features()
diff --git a/src/os/XfsFileStoreBackend.h b/src/os/XfsFileStoreBackend.h
index 282fc1c..cb19bf7 100644
--- a/src/os/XfsFileStoreBackend.h
+++ b/src/os/XfsFileStoreBackend.h
@@ -25,10 +25,7 @@ private:
   int set_extsize(int fd, unsigned int val);
 public:
   XfsFileStoreBackend(FileStore *fs);
-  ~XfsFileStoreBackend() {}
-  const char *get_name() {
-    return "xfs";
-  }
+  ~XfsFileStoreBackend() {};
   int detect_features();
   int set_alloc_hint(int fd, uint64_t hint);
 };
diff --git a/src/os/chain_xattr.cc b/src/os/chain_xattr.cc
index 5c80c57..c020c9d 100644
--- a/src/os/chain_xattr.cc
+++ b/src/os/chain_xattr.cc
@@ -252,15 +252,13 @@ int chain_setxattr(const char *fn, const char *name, const void *val, size_t siz
     i++;
   } while (size);
 
-  if (ret >= 0 ) {
-    int r;
-    do {
-      get_raw_xattr_name(name, i, raw_name, sizeof(raw_name));
-      r = sys_removexattr(fn, raw_name);
-      if (r < 0 && r != -ENODATA)
-	ret = r;
-      i++;
-    } while (r != -ENODATA);
+  /* if we're exactly at a chunk size, remove the next one (if wasn't removed
+     before) */
+  if (ret >= 0 && chunk_size == CHAIN_XATTR_MAX_BLOCK_LEN) {
+    get_raw_xattr_name(name, i, raw_name, sizeof(raw_name));
+    int r = sys_removexattr(fn, raw_name);
+    if (r < 0 && r != -ENODATA)
+      ret = r;
   }
   
   return ret;
@@ -288,15 +286,13 @@ int chain_fsetxattr(int fd, const char *name, const void *val, size_t size)
     i++;
   } while (size);
 
-  if (ret >= 0) {
-    int r;
-    do {
-      get_raw_xattr_name(name, i, raw_name, sizeof(raw_name));
-      r = sys_fremovexattr(fd, raw_name);
-      if (r < 0 && r != -ENODATA)
-	ret = r;
-      i++;
-    } while (r != -ENODATA);
+  /* if we're exactly at a chunk size, remove the next one (if wasn't removed
+     before) */
+  if (ret >= 0 && chunk_size == CHAIN_XATTR_MAX_BLOCK_LEN) {
+    get_raw_xattr_name(name, i, raw_name, sizeof(raw_name));
+    int r = sys_fremovexattr(fd, raw_name);
+    if (r < 0 && r != -ENODATA)
+      ret = r;
   }
   
   return ret;
diff --git a/src/osd/ClassHandler.cc b/src/osd/ClassHandler.cc
index 188f721..b1afe1e 100644
--- a/src/osd/ClassHandler.cc
+++ b/src/osd/ClassHandler.cc
@@ -3,7 +3,6 @@
 #include "msg/Message.h"
 #include "osd/OSD.h"
 #include "ClassHandler.h"
-#include "common/errno.h"
 
 #include <dlfcn.h>
 
@@ -108,12 +107,8 @@ int ClassHandler::_load_class(ClassData *cls)
 
     struct stat st;
     int r = ::stat(fname, &st);
-    if (r < 0) {
-      r = -errno;
-      dout(0) << __func__ << " could not stat class " << fname
-	      << ": " << cpp_strerror(r) << dendl;
-      return r;
-    }
+    if (r < 0)
+      return -errno;
 
     cls->handle = dlopen(fname, RTLD_NOW);
     if (!cls->handle) {
diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc
index 1497f7e..39e3429 100644
--- a/src/osd/ECBackend.cc
+++ b/src/osd/ECBackend.cc
@@ -470,7 +470,6 @@ void ECBackend::continue_recovery_op(
       assert(!op.recovery_progress.data_complete);
       set<int> want(op.missing_on_shards.begin(), op.missing_on_shards.end());
       set<pg_shard_t> to_read;
-      uint64_t recovery_max_chunk = get_recovery_chunk_size();
       int r = get_min_avail_to_read_shards(
 	op.hoid, want, true, &to_read);
       if (r != 0) {
@@ -482,15 +481,16 @@ void ECBackend::continue_recovery_op(
 	recovery_ops.erase(op.hoid);
 	return;
       }
+      assert(r == 0);
       m->read(
 	this,
 	op.hoid,
 	op.recovery_progress.data_recovered_to,
-	recovery_max_chunk,
+	get_recovery_chunk_size(),
 	to_read,
 	op.recovery_progress.first);
       op.extent_requested = make_pair(op.recovery_progress.data_recovered_to,
-				      recovery_max_chunk);
+				      get_recovery_chunk_size());
       dout(10) << __func__ << ": IDLE return " << op << dendl;
       return;
     }
@@ -500,7 +500,7 @@ void ECBackend::continue_recovery_op(
       assert(op.returned_data.size());
       op.state = RecoveryOp::WRITING;
       ObjectRecoveryProgress after_progress = op.recovery_progress;
-      after_progress.data_recovered_to += op.extent_requested.second;
+      after_progress.data_recovered_to += get_recovery_chunk_size();
       after_progress.first = false;
       if (after_progress.data_recovered_to >= op.obc->obs.oi.size) {
 	after_progress.data_recovered_to =
@@ -1092,11 +1092,11 @@ void ECBackend::filter_read_op(
   }
 
   if (op.in_progress.empty()) {
-    get_parent()->schedule_recovery_work(
+    get_parent()->schedule_work(
       get_parent()->bless_gencontext(
 	new FinishReadOp(this, op.tid)));
   }
-}
+};
 
 void ECBackend::check_recovery_sources(const OSDMapRef osdmap)
 {
@@ -1245,10 +1245,18 @@ void ECBackend::submit_transaction(
   for (set<hobject_t>::iterator i = need_hinfos.begin();
        i != need_hinfos.end();
        ++i) {
+    ECUtil::HashInfoRef ref = get_hash_info(*i);
+    if (!ref) {
+      derr << __func__ << ": get_hash_info(" << *i << ")"
+	   << " returned a null pointer and there is no "
+	   << " way to recover from such an error in this "
+	   << " context" << dendl;
+      assert(0);
+    }
     op->unstable_hash_infos.insert(
       make_pair(
 	*i,
-	get_hash_info(*i)));
+	ref));
   }
 
   for (vector<pg_log_entry_t>::iterator i = op->log_entries.begin();
@@ -1350,8 +1358,8 @@ int ECBackend::get_min_avail_to_read_shards(
   for (set<int>::iterator i = need.begin();
        i != need.end();
        ++i) {
-    assert(shards.count(shard_id_t(*i)));
-    to_read->insert(shards[shard_id_t(*i)]);
+    assert(shards.count(*i));
+    to_read->insert(shards[*i]);
   }
   return 0;
 }
@@ -1456,9 +1464,9 @@ ECUtil::HashInfoRef ECBackend::get_hash_info(
       if (r >= 0) {
 	bufferlist::iterator bp = bl.begin();
 	::decode(hinfo, bp);
-	assert(hinfo.get_total_chunk_size() == (uint64_t)st.st_size);
+	assert(hinfo.get_total_chunk_size() == (unsigned)st.st_size);
       } else {
-	assert(0 == "missing hash attr");
+	return ECUtil::HashInfoRef();
       }
     }
     ref = unstable_hashinfo_registry.lookup_or_create(hoid, hinfo);
@@ -1656,11 +1664,9 @@ void ECBackend::objects_read_async(
       sinfo.offset_len_to_stripe_bounds(i->first));
   }
 
-  const vector<int> &chunk_mapping = ec_impl->get_chunk_mapping();
   set<int> want_to_read;
   for (int i = 0; i < (int)ec_impl->get_data_chunk_count(); ++i) {
-    int chunk = (int)chunk_mapping.size() > i ? chunk_mapping[i] : i;
-    want_to_read.insert(chunk);
+    want_to_read.insert(i);
   }
   set<pg_shard_t> shards;
   int r = get_min_avail_to_read_shards(
@@ -1756,31 +1762,37 @@ void ECBackend::be_deep_scrub(
       break;
   }
 
-  ECUtil::HashInfoRef hinfo = get_hash_info(poid);
   if (r == -EIO) {
     dout(0) << "_scan_list  " << poid << " got "
 	    << r << " on read, read_error" << dendl;
     o.read_error = true;
   }
 
-  if (hinfo->get_chunk_hash(get_parent()->whoami_shard().shard) != h.digest()) {
-    dout(0) << "_scan_list  " << poid << " got incorrect hash on read" << dendl;
+  ECUtil::HashInfoRef hinfo = get_hash_info(poid);
+  if (!hinfo) {
+    dout(0) << "_scan_list  " << poid << " could not retrieve hash info" << dendl;
     o.read_error = true;
-  }
+    o.digest_present = false;
+  } else {
+    if (hinfo->get_chunk_hash(get_parent()->whoami_shard().shard) != h.digest()) {
+      dout(0) << "_scan_list  " << poid << " got incorrect hash on read" << dendl;
+      o.read_error = true;
+    }
 
-  if (hinfo->get_total_chunk_size() != pos) {
-    dout(0) << "_scan_list  " << poid << " got incorrect size on read" << dendl;
-    o.read_error = true;
-  }
+    if (hinfo->get_total_chunk_size() != pos) {
+      dout(0) << "_scan_list  " << poid << " got incorrect size on read" << dendl;
+      o.read_error = true;
+    }
 
-  /* We checked above that we match our own stored hash.  We cannot
-   * send a hash of the actual object, so instead we simply send
-   * our locally stored hash of shard 0 on the assumption that if
-   * we match our chunk hash and our recollection of the hash for
-   * chunk 0 matches that of our peers, there is likely no corruption.
-   */
-  o.digest = hinfo->get_chunk_hash(0);
-  o.digest_present = true;
+    /* We checked above that we match our own stored hash.  We cannot
+     * send a hash of the actual object, so instead we simply send
+     * our locally stored hash of shard 0 on the assumption that if
+     * we match our chunk hash and our recollection of the hash for
+     * chunk 0 matches that of our peers, there is likely no corruption.
+     */
+    o.digest = hinfo->get_chunk_hash(0);
+    o.digest_present = true;
+  }
 
   o.omap_digest = 0;
   o.omap_digest_present = true;
diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h
index f6199ff..28bcf8a 100644
--- a/src/osd/ECBackend.h
+++ b/src/osd/ECBackend.h
@@ -149,8 +149,10 @@ public:
 private:
   friend struct ECRecoveryHandle;
   uint64_t get_recovery_chunk_size() const {
-    return ROUND_UP_TO(cct->_conf->osd_recovery_max_chunk,
-			sinfo.get_stripe_width());
+    uint64_t max = cct->_conf->osd_recovery_max_chunk;
+    max -= max % sinfo.get_stripe_width();
+    max += sinfo.get_stripe_width();
+    return max;
   }
 
   /**
@@ -389,7 +391,7 @@ public:
     ErasureCodeInterfaceRef ec_impl;
   public:
     ECRecPred(ErasureCodeInterfaceRef ec_impl) : ec_impl(ec_impl) {
-      for (unsigned i = 0; i < ec_impl->get_chunk_count(); ++i) {
+      for (unsigned i = 0; i < ec_impl->get_data_chunk_count(); ++i) {
 	want.insert(i);
       }
     }
diff --git a/src/osd/ECMsgTypes.cc b/src/osd/ECMsgTypes.cc
index 282355f..ba02d83 100644
--- a/src/osd/ECMsgTypes.cc
+++ b/src/osd/ECMsgTypes.cc
@@ -78,8 +78,8 @@ void ECSubWrite::dump(Formatter *f) const
   f->dump_stream("at_version") << at_version;
   f->dump_stream("trim_to") << trim_to;
   f->dump_stream("trim_rollback_to") << trim_rollback_to;
-  f->dump_bool("has_updated_hit_set_history",
-      static_cast<bool>(updated_hit_set_history));
+  f->dump_stream("has_updated_hit_set_history")
+    << static_cast<bool>(updated_hit_set_history);
 }
 
 void ECSubWrite::generate_test_instances(list<ECSubWrite*> &o)
@@ -137,8 +137,8 @@ void ECSubWriteReply::dump(Formatter *f) const
 {
   f->dump_unsigned("tid", tid);
   f->dump_stream("last_complete") << last_complete;
-  f->dump_bool("committed", committed);
-  f->dump_bool("applied", applied);
+  f->dump_stream("committed") << committed;
+  f->dump_stream("applied") << applied;
 }
 
 void ECSubWriteReply::generate_test_instances(list<ECSubWriteReply*>& o)
@@ -224,14 +224,14 @@ void ECSubRead::generate_test_instances(list<ECSubRead*>& o)
   hobject_t hoid1(sobject_t("asdf", 1));
   hobject_t hoid2(sobject_t("asdf2", CEPH_NOSNAP));
   o.push_back(new ECSubRead());
-  o.back()->from = pg_shard_t(2, shard_id_t(255));
+  o.back()->from = pg_shard_t(2, 255);
   o.back()->tid = 1;
   o.back()->to_read[hoid1].push_back(make_pair(100, 200));
   o.back()->to_read[hoid1].push_back(make_pair(400, 600));
   o.back()->to_read[hoid2].push_back(make_pair(400, 600));
   o.back()->attrs_to_read.insert(hoid1);
   o.push_back(new ECSubRead());
-  o.back()->from = pg_shard_t(2, shard_id_t(255));
+  o.back()->from = pg_shard_t(2, 255);
   o.back()->tid = 300;
   o.back()->to_read[hoid1].push_back(make_pair(300, 200));
   o.back()->to_read[hoid2].push_back(make_pair(400, 600));
@@ -338,7 +338,7 @@ void ECSubReadReply::generate_test_instances(list<ECSubReadReply*>& o)
   bufferlist bl2;
   bl2.append_zero(200);
   o.push_back(new ECSubReadReply());
-  o.back()->from = pg_shard_t(2, shard_id_t(255));
+  o.back()->from = pg_shard_t(2, 255);
   o.back()->tid = 1;
   o.back()->buffers_read[hoid1].push_back(make_pair(20, bl));
   o.back()->buffers_read[hoid1].push_back(make_pair(2000, bl2));
@@ -346,7 +346,7 @@ void ECSubReadReply::generate_test_instances(list<ECSubReadReply*>& o)
   o.back()->attrs_read[hoid1]["foo"] = bl;
   o.back()->attrs_read[hoid1]["_"] = bl2;
   o.push_back(new ECSubReadReply());
-  o.back()->from = pg_shard_t(2, shard_id_t(255));
+  o.back()->from = pg_shard_t(2, 255);
   o.back()->tid = 300;
   o.back()->buffers_read[hoid2].push_back(make_pair(0, bl2));
   o.back()->attrs_read[hoid2]["foo"] = bl;
diff --git a/src/osd/ECUtil.h b/src/osd/ECUtil.h
index 08b7f87..52d79aa 100644
--- a/src/osd/ECUtil.h
+++ b/src/osd/ECUtil.h
@@ -58,9 +58,9 @@ public:
     return offset - (offset % stripe_width);
   }
   uint64_t logical_to_next_stripe_offset(uint64_t offset) const {
-    return ((offset % stripe_width) ?
-      (offset - (offset % stripe_width) + stripe_width) :
-      offset);
+    return offset % stripe_width ?
+      offset - (offset % stripe_width) + stripe_width :
+      offset;
   }
   uint64_t aligned_logical_offset_to_chunk_offset(uint64_t offset) const {
     assert(offset % stripe_width == 0);
@@ -149,6 +149,6 @@ typedef ceph::shared_ptr<HashInfo> HashInfoRef;
 bool is_hinfo_key_string(const string &key);
 const string &get_hinfo_key();
 
-}
+};
 WRITE_CLASS_ENCODER(ECUtil::HashInfo)
 #endif
diff --git a/src/osd/HitSet.h b/src/osd/HitSet.h
index b1f49c0..476678e 100644
--- a/src/osd/HitSet.h
+++ b/src/osd/HitSet.h
@@ -167,8 +167,8 @@ public:
 private:
   void reset_to_type(impl_type_t type);
 };
-WRITE_CLASS_ENCODER(HitSet)
-WRITE_CLASS_ENCODER(HitSet::Params)
+WRITE_CLASS_ENCODER(HitSet);
+WRITE_CLASS_ENCODER(HitSet::Params);
 
 typedef boost::shared_ptr<HitSet> HitSetRef;
 
diff --git a/src/osd/Makefile.am b/src/osd/Makefile.am
index 2338f18..75e4877 100644
--- a/src/osd/Makefile.am
+++ b/src/osd/Makefile.am
@@ -23,12 +23,8 @@ libosd_la_SOURCES = \
 	common/TrackedOp.cc \
 	osd/SnapMapper.cc \
 	objclass/class_api.cc
-
 libosd_la_CXXFLAGS = ${AM_CXXFLAGS}
 libosd_la_LIBADD = $(LIBOSDC) $(LIBOS) $(LIBOSD_TYPES) $(LIBOS_TYPES)
-if WITH_LTTNG
-libosd_la_LIBADD += $(LIBOSD_TP)
-endif
 noinst_LTLIBRARIES += libosd.la
 
 noinst_HEADERS += \
@@ -54,6 +50,3 @@ noinst_HEADERS += \
 	osd/Watch.h \
 	osd/osd_types.h
 
-if WITH_KINETIC
-libosd_la_CXXFLAGS += -std=gnu++11
-endif
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 322cf5c..77ed17a 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -133,18 +133,14 @@
 #include "include/assert.h"
 #include "common/config.h"
 
-#ifdef WITH_LTTNG
-#include "tracing/osd.h"
-#endif
-
-static coll_t META_COLL("meta");
-
 #define dout_subsys ceph_subsys_osd
 #undef dout_prefix
-#define dout_prefix _prefix(_dout, whoami, get_osdmap_epoch())
+#define dout_prefix _prefix(_dout, whoami, get_osdmap())
 
-static ostream& _prefix(std::ostream* _dout, int whoami, epoch_t epoch) {
-  return *_dout << "osd." << whoami << " " << epoch << " ";
+static ostream& _prefix(std::ostream* _dout, int whoami, OSDMapRef osdmap) {
+  return *_dout << "osd." << whoami << " "
+		<< (osdmap ? osdmap->get_epoch():0)
+		<< " ";
 }
 
 //Initial features in new superblock.
@@ -163,7 +159,6 @@ CompatSet OSD::get_osd_initial_compat_set() {
   ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEVELDBINFO);
   ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEVELDBLOG);
   ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SNAPMAPPER);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_HINTS);
   return CompatSet(ceph_osd_feature_compat, ceph_osd_feature_ro_compat,
 		   ceph_osd_feature_incompat);
 }
@@ -179,8 +174,7 @@ CompatSet OSD::get_osd_compat_set() {
 OSDService::OSDService(OSD *osd) :
   osd(osd),
   cct(osd->cct),
-  whoami(osd->whoami), store(osd->store),
-  log_client(osd->log_client), clog(osd->clog),
+  whoami(osd->whoami), store(osd->store), clog(osd->clog),
   pg_recovery_stats(osd->pg_recovery_stats),
   infos_oid(OSD::make_infos_oid()),
   cluster_messenger(osd->cluster_messenger),
@@ -188,21 +182,19 @@ OSDService::OSDService(OSD *osd) :
   logger(osd->logger),
   recoverystate_perf(osd->recoverystate_perf),
   monc(osd->monc),
-  op_wq(osd->op_shardedwq),
+  op_wq(osd->op_wq),
   peering_wq(osd->peering_wq),
   recovery_wq(osd->recovery_wq),
   snap_trim_wq(osd->snap_trim_wq),
   scrub_wq(osd->scrub_wq),
   scrub_finalize_wq(osd->scrub_finalize_wq),
   rep_scrub_wq(osd->rep_scrub_wq),
-  recovery_gen_wq("recovery_gen_wq", cct->_conf->osd_recovery_thread_timeout,
-		  &osd->recovery_tp),
-  op_gen_wq("op_gen_wq", cct->_conf->osd_recovery_thread_timeout, &osd->osd_tp),
+  push_wq("push_wq", cct->_conf->osd_recovery_thread_timeout, &osd->recovery_tp),
+  gen_wq("gen_wq", cct->_conf->osd_recovery_thread_timeout, &osd->recovery_tp),
   class_handler(osd->class_handler),
   pg_epoch_lock("OSDService::pg_epoch_lock"),
   publish_lock("OSDService::publish_lock"),
   pre_publish_lock("OSDService::pre_publish_lock"),
-  peer_map_epoch_lock("OSDService::peer_map_epoch_lock"),
   sched_scrub_lock("OSDService::sched_scrub_lock"), scrubs_pending(0),
   scrubs_active(0),
   agent_lock("OSD::agent_lock"),
@@ -213,8 +205,12 @@ OSDService::OSDService(OSD *osd) :
   agent_stop_flag(false),
   agent_timer_lock("OSD::agent_timer_lock"),
   agent_timer(osd->client_messenger->cct, agent_timer_lock),
-  objecter(new Objecter(osd->client_messenger->cct, osd->objecter_messenger, osd->monc, 0, 0)),
+  objecter_lock("OSD::objecter_lock"),
+  objecter_timer(osd->client_messenger->cct, objecter_lock),
+  objecter(new Objecter(osd->client_messenger->cct, osd->objecter_messenger, osd->monc, &objecter_osdmap,
+			objecter_lock, objecter_timer, 0, 0)),
   objecter_finisher(osd->client_messenger->cct),
+  objecter_dispatcher(this),
   watch_lock("OSD::watch_lock"),
   watch_timer(osd->client_messenger->cct, watch_lock),
   next_notif_id(0),
@@ -223,31 +219,24 @@ OSDService::OSDService(OSD *osd) :
   last_tid(0),
   tid_lock("OSDService::tid_lock"),
   reserver_finisher(cct),
-  local_reserver(&reserver_finisher, cct->_conf->osd_max_backfills,
-		 cct->_conf->osd_min_recovery_priority),
-  remote_reserver(&reserver_finisher, cct->_conf->osd_max_backfills,
-		  cct->_conf->osd_min_recovery_priority),
+  local_reserver(&reserver_finisher, cct->_conf->osd_max_backfills),
+  remote_reserver(&reserver_finisher, cct->_conf->osd_max_backfills),
   pg_temp_lock("OSDService::pg_temp_lock"),
   map_cache_lock("OSDService::map_lock"),
-  map_cache(cct, cct->_conf->osd_map_cache_size),
+  map_cache(cct->_conf->osd_map_cache_size),
   map_bl_cache(cct->_conf->osd_map_cache_size),
   map_bl_inc_cache(cct->_conf->osd_map_cache_size),
   in_progress_split_lock("OSDService::in_progress_split_lock"),
-  stat_lock("OSD::stat_lock"),
   full_status_lock("OSDService::full_status_lock"),
   cur_state(NONE),
   last_msg(0),
   cur_ratio(0),
-  epoch_lock("OSDService::epoch_lock"),
-  boot_epoch(0), up_epoch(0), bind_epoch(0),
   is_stopping_lock("OSDService::is_stopping_lock"),
   state(NOT_STOPPING)
 #ifdef PG_DEBUG_REFS
   , pgid_lock("OSDService::pgid_lock")
 #endif
-{
-  objecter->init();
-}
+{}
 
 OSDService::~OSDService()
 {
@@ -447,7 +436,12 @@ void OSDService::shutdown()
     watch_timer.shutdown();
   }
 
-  objecter->shutdown();
+  {
+    Mutex::Locker l(objecter_lock);
+    objecter_timer.shutdown();
+    objecter->shutdown_locked();
+  }
+  objecter->shutdown_unlocked();
   objecter_finisher.stop();
 
   {
@@ -461,9 +455,14 @@ void OSDService::shutdown()
 void OSDService::init()
 {
   reserver_finisher.start();
-  objecter_finisher.start();
-  objecter->set_client_incarnation(0);
-  objecter->start();
+  {
+    objecter_finisher.start();
+    objecter->init_unlocked();
+    Mutex::Locker l(objecter_lock);
+    objecter_timer.init();
+    objecter->set_client_incarnation(0);
+    objecter->init_locked();
+  }
   watch_timer.init();
   agent_timer.init();
 
@@ -563,873 +562,156 @@ void OSDService::agent_stop()
   agent_thread.join();
 }
 
-// -------------------------------------
 
-float OSDService::get_full_ratio()
-{
-  float full_ratio = cct->_conf->osd_failsafe_full_ratio;
-  if (full_ratio > 1.0) full_ratio /= 100.0;
-  return full_ratio;
-}
+#undef dout_prefix
+#define dout_prefix *_dout
 
-float OSDService::get_nearfull_ratio()
+int OSD::convert_collection(ObjectStore *store, coll_t cid)
 {
-  float nearfull_ratio = cct->_conf->osd_failsafe_nearfull_ratio;
-  if (nearfull_ratio > 1.0) nearfull_ratio /= 100.0;
-  return nearfull_ratio;
-}
+  coll_t tmp0("convertfs_temp");
+  coll_t tmp1("convertfs_temp1");
+  vector<ghobject_t> objects;
 
-void OSDService::check_nearfull_warning(const osd_stat_t &osd_stat)
-{
-  Mutex::Locker l(full_status_lock);
-  enum s_names new_state;
+  map<string, bufferptr> aset;
+  int r = store->collection_getattrs(cid, aset);
+  if (r < 0)
+    return r;
 
-  time_t now = ceph_clock_gettime(NULL);
+  {
+    ObjectStore::Transaction t;
+    t.create_collection(tmp0);
+    for (map<string, bufferptr>::iterator i = aset.begin();
+	 i != aset.end();
+	 ++i) {
+      bufferlist val;
+      val.push_back(i->second);
+      t.collection_setattr(tmp0, i->first, val);
+    }
+    store->apply_transaction(t);
+  }
 
-  // We base ratio on kb_avail rather than kb_used because they can
-  // differ significantly e.g. on btrfs volumes with a large number of
-  // chunks reserved for metadata, and for our purposes (avoiding
-  // completely filling the disk) it's far more important to know how
-  // much space is available to use than how much we've already used.
-  float ratio = ((float)(osd_stat.kb - osd_stat.kb_avail)) / ((float)osd_stat.kb);
-  float nearfull_ratio = get_nearfull_ratio();
-  float full_ratio = get_full_ratio();
-  cur_ratio = ratio;
+  ghobject_t next;
+  while (!next.is_max()) {
+    objects.clear();
+    ghobject_t start = next;
+    r = store->collection_list_partial(cid, start,
+				       200, 300, 0,
+				       &objects, &next);
+    if (r < 0)
+      return r;
 
-  if (full_ratio > 0 && ratio > full_ratio) {
-    new_state = FULL;
-  } else if (nearfull_ratio > 0 && ratio > nearfull_ratio) {
-    new_state = NEAR;
-  } else {
-    cur_state = NONE;
-    return;
+    ObjectStore::Transaction t;
+    for (vector<ghobject_t>::iterator i = objects.begin();
+	 i != objects.end();
+	 ++i) {
+      t.collection_add(tmp0, cid, *i);
+    }
+    store->apply_transaction(t);
   }
 
-  if (cur_state != new_state) {
-    cur_state = new_state;
-  } else if (now - last_msg < cct->_conf->osd_op_complaint_time) {
-    return;
+  {
+    ObjectStore::Transaction t;
+    t.collection_rename(cid, tmp1);
+    t.collection_rename(tmp0, cid);
+    store->apply_transaction(t);
   }
-  last_msg = now;
-  if (cur_state == FULL)
-    clog->error() << "OSD full dropping all updates " << (int)(ratio * 100) << "% full";
-  else
-    clog->warn() << "OSD near full (" << (int)(ratio * 100) << "%)";
-}
-
-bool OSDService::check_failsafe_full()
-{
-  Mutex::Locker l(full_status_lock);
-  if (cur_state == FULL)
-    return true;
-  return false;
-}
 
-bool OSDService::too_full_for_backfill(double *_ratio, double *_max_ratio)
-{
-  Mutex::Locker l(full_status_lock);
-  double max_ratio;
-  max_ratio = cct->_conf->osd_backfill_full_ratio;
-  if (_ratio)
-    *_ratio = cur_ratio;
-  if (_max_ratio)
-    *_max_ratio = max_ratio;
-  return cur_ratio >= max_ratio;
+  recursive_remove_collection(store, tmp1);
+  store->sync_and_flush();
+  store->sync();
+  return 0;
 }
 
-void OSDService::update_osd_stat(vector<int>& hb_peers)
+int OSD::do_convertfs(ObjectStore *store)
 {
-  Mutex::Locker lock(stat_lock);
-
-  // fill in osd stats too
-  struct statfs stbuf;
-  osd->store->statfs(&stbuf);
-
-  uint64_t bytes = stbuf.f_blocks * stbuf.f_bsize;
-  uint64_t used = (stbuf.f_blocks - stbuf.f_bfree) * stbuf.f_bsize;
-  uint64_t avail = stbuf.f_bavail * stbuf.f_bsize;
-
-  osd_stat.kb = bytes >> 10;
-  osd_stat.kb_used = used >> 10;
-  osd_stat.kb_avail = avail >> 10;
-
-  osd->logger->set(l_osd_stat_bytes, bytes);
-  osd->logger->set(l_osd_stat_bytes_used, used);
-  osd->logger->set(l_osd_stat_bytes_avail, avail);
-
-  osd_stat.hb_in.swap(hb_peers);
-  osd_stat.hb_out.clear();
-
-  check_nearfull_warning(osd_stat);
-
-  osd->op_tracker.get_age_ms_histogram(&osd_stat.op_queue_age_hist);
+  int r = store->mount();
+  if (r < 0)
+    return r;
 
-  dout(20) << "update_osd_stat " << osd_stat << dendl;
-}
+  uint32_t version;
+  r = store->version_stamp_is_valid(&version);
+  if (r < 0)
+    return r;
+  if (r == 1)
+    return store->umount();
 
-void OSDService::send_message_osd_cluster(int peer, Message *m, epoch_t from_epoch)
-{
-  OSDMapRef next_map = get_nextmap_reserved();
-  // service map is always newer/newest
-  assert(from_epoch <= next_map->get_epoch());
+  derr << "ObjectStore is old at version " << version << ".  Updating..."  << dendl;
 
-  if (next_map->is_down(peer) ||
-      next_map->get_info(peer).up_from > from_epoch) {
-    m->put();
-    release_map(next_map);
-    return;
+  derr << "Removing tmp pgs" << dendl;
+  vector<coll_t> collections;
+  r = store->list_collections(collections);
+  if (r < 0)
+    return r;
+  for (vector<coll_t>::iterator i = collections.begin();
+       i != collections.end();
+       ++i) {
+    spg_t pgid;
+    if (i->is_temp(pgid))
+      recursive_remove_collection(store, *i);
+    else if (i->to_str() == "convertfs_temp" ||
+	     i->to_str() == "convertfs_temp1")
+      recursive_remove_collection(store, *i);
   }
-  const entity_inst_t& peer_inst = next_map->get_cluster_inst(peer);
-  Connection *peer_con = osd->cluster_messenger->get_connection(peer_inst).get();
-  share_map_peer(peer, peer_con, next_map);
-  peer_con->send_message(m);
-  release_map(next_map);
-}
-
-ConnectionRef OSDService::get_con_osd_cluster(int peer, epoch_t from_epoch)
-{
-  OSDMapRef next_map = get_nextmap_reserved();
-  // service map is always newer/newest
-  assert(from_epoch <= next_map->get_epoch());
+  store->flush();
 
-  if (next_map->is_down(peer) ||
-      next_map->get_info(peer).up_from > from_epoch) {
-    release_map(next_map);
-    return NULL;
-  }
-  ConnectionRef con = osd->cluster_messenger->get_connection(next_map->get_cluster_inst(peer));
-  release_map(next_map);
-  return con;
-}
 
-pair<ConnectionRef,ConnectionRef> OSDService::get_con_osd_hb(int peer, epoch_t from_epoch)
-{
-  OSDMapRef next_map = get_nextmap_reserved();
-  // service map is always newer/newest
-  assert(from_epoch <= next_map->get_epoch());
+  derr << "Getting collections" << dendl;
 
-  pair<ConnectionRef,ConnectionRef> ret;
-  if (next_map->is_down(peer) ||
-      next_map->get_info(peer).up_from > from_epoch) {
-    release_map(next_map);
-    return ret;
+  derr << collections.size() << " to process." << dendl;
+  collections.clear();
+  r = store->list_collections(collections);
+  if (r < 0)
+    return r;
+  int processed = 0;
+  for (vector<coll_t>::iterator i = collections.begin();
+       i != collections.end();
+       ++i, ++processed) {
+    derr << processed << "/" << collections.size() << " processed" << dendl;
+    uint32_t collection_version;
+    r = store->collection_version_current(*i, &collection_version);
+    if (r < 0) {
+      return r;
+    } else if (r == 1) {
+      derr << "Collection " << *i << " is up to date" << dendl;
+    } else {
+      derr << "Updating collection " << *i << " current version is " 
+	   << collection_version << dendl;
+      r = convert_collection(store, *i);
+      if (r < 0)
+	return r;
+      derr << "collection " << *i << " updated" << dendl;
+    }
   }
-  ret.first = osd->hbclient_messenger->get_connection(next_map->get_hb_back_inst(peer));
-  if (next_map->get_hb_front_addr(peer) != entity_addr_t())
-    ret.second = osd->hbclient_messenger->get_connection(next_map->get_hb_front_inst(peer));
-  release_map(next_map);
-  return ret;
-}
-
-
-void OSDService::queue_want_pg_temp(pg_t pgid, vector<int>& want)
-{
-  Mutex::Locker l(pg_temp_lock);
-  pg_temp_wanted[pgid] = want;
+  derr << "All collections up to date, updating version stamp..." << dendl;
+  r = store->update_version_stamp();
+  if (r < 0)
+    return r;
+  store->sync_and_flush();
+  store->sync();
+  derr << "Version stamp updated, done with upgrade!" << dendl;
+  return store->umount();
 }
 
-void OSDService::send_pg_temp()
+int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
+	      uuid_d fsid, int whoami)
 {
-  Mutex::Locker l(pg_temp_lock);
-  if (pg_temp_wanted.empty())
-    return;
-  dout(10) << "send_pg_temp " << pg_temp_wanted << dendl;
-  MOSDPGTemp *m = new MOSDPGTemp(osdmap->get_epoch());
-  m->pg_temp = pg_temp_wanted;
-  monc->send_mon_message(m);
-}
+  int ret;
 
+  try {
+    // if we are fed a uuid for this osd, use it.
+    store->set_fsid(cct->_conf->osd_uuid);
 
-// --------------------------------------
-// dispatch
+    ret = store->mkfs();
+    if (ret) {
+      derr << "OSD::mkfs: ObjectStore::mkfs failed with error " << ret << dendl;
+      goto free_store;
+    }
 
-epoch_t OSDService::get_peer_epoch(int peer)
-{
-  Mutex::Locker l(peer_map_epoch_lock);
-  map<int,epoch_t>::iterator p = peer_map_epoch.find(peer);
-  if (p == peer_map_epoch.end())
-    return 0;
-  return p->second;
-}
-
-epoch_t OSDService::note_peer_epoch(int peer, epoch_t e)
-{
-  Mutex::Locker l(peer_map_epoch_lock);
-  map<int,epoch_t>::iterator p = peer_map_epoch.find(peer);
-  if (p != peer_map_epoch.end()) {
-    if (p->second < e) {
-      dout(10) << "note_peer_epoch osd." << peer << " has " << e << dendl;
-      p->second = e;
-    } else {
-      dout(30) << "note_peer_epoch osd." << peer << " has " << p->second << " >= " << e << dendl;
-    }
-    return p->second;
-  } else {
-    dout(10) << "note_peer_epoch osd." << peer << " now has " << e << dendl;
-    peer_map_epoch[peer] = e;
-    return e;
-  }
-}
- 
-void OSDService::forget_peer_epoch(int peer, epoch_t as_of)
-{
-  Mutex::Locker l(peer_map_epoch_lock);
-  map<int,epoch_t>::iterator p = peer_map_epoch.find(peer);
-  if (p != peer_map_epoch.end()) {
-    if (p->second <= as_of) {
-      dout(10) << "forget_peer_epoch osd." << peer << " as_of " << as_of
-	       << " had " << p->second << dendl;
-      peer_map_epoch.erase(p);
-    } else {
-      dout(10) << "forget_peer_epoch osd." << peer << " as_of " << as_of
-	       << " has " << p->second << " - not forgetting" << dendl;
-    }
-  }
-}
-
-bool OSDService::should_share_map(entity_name_t name, Connection *con,
-                                  epoch_t epoch, OSDMapRef& osdmap,
-                                  const epoch_t *sent_epoch_p)
-{
-  bool should_send = false;
-  dout(20) << "should_share_map "
-           << name << " " << con->get_peer_addr()
-           << " " << epoch << dendl;
-
-  // does client have old map?
-  if (name.is_client()) {
-    bool message_sendmap = epoch < osdmap->get_epoch();
-    if (message_sendmap && sent_epoch_p) {
-      dout(20) << "client session last_sent_epoch: "
-               << *sent_epoch_p
-               << " versus osdmap epoch " << osdmap->get_epoch() << dendl;
-      if (*sent_epoch_p < osdmap->get_epoch()) {
-        should_send = true;
-      } // else we don't need to send it out again
-    }
-  }
-
-  if (con->get_messenger() == osd->cluster_messenger &&
-      con != osd->cluster_messenger->get_loopback_connection() &&
-      osdmap->is_up(name.num()) &&
-      (osdmap->get_cluster_addr(name.num()) == con->get_peer_addr() ||
-       osdmap->get_hb_back_addr(name.num()) == con->get_peer_addr())) {
-    // remember
-    epoch_t has = MAX(get_peer_epoch(name.num()), epoch);
-
-    // share?
-    if (has < osdmap->get_epoch()) {
-      dout(10) << name << " " << con->get_peer_addr()
-               << " has old map " << epoch << " < "
-               << osdmap->get_epoch() << dendl;
-      should_send = true;
-    }
-  }
-
-  return should_send;
-}
-
-void OSDService::share_map(
-    entity_name_t name,
-    Connection *con,
-    epoch_t epoch,
-    OSDMapRef& osdmap,
-    epoch_t *sent_epoch_p)
-{
-  dout(20) << "share_map "
-	   << name << " " << con->get_peer_addr()
-	   << " " << epoch << dendl;
-
-  if ((!osd->is_active()) && (!osd->is_stopping())) {
-    /*It is safe not to proceed as OSD is not in healthy state*/
-    return;
-  }
-
-  bool want_shared = should_share_map(name, con, epoch,
-                                      osdmap, sent_epoch_p);
-
-  if (want_shared){
-    if (name.is_client()) {
-      dout(10) << name << " has old map " << epoch
-          << " < " << osdmap->get_epoch() << dendl;
-      // we know the Session is valid or we wouldn't be sending
-      if (sent_epoch_p) {
-	*sent_epoch_p = osdmap->get_epoch();
-      }
-      send_incremental_map(epoch, con, osdmap);
-    } else if (con->get_messenger() == osd->cluster_messenger &&
-        osdmap->is_up(name.num()) &&
-        (osdmap->get_cluster_addr(name.num()) == con->get_peer_addr() ||
-            osdmap->get_hb_back_addr(name.num()) == con->get_peer_addr())) {
-      dout(10) << name << " " << con->get_peer_addr()
-	               << " has old map " << epoch << " < "
-	               << osdmap->get_epoch() << dendl;
-      note_peer_epoch(name.num(), osdmap->get_epoch());
-      send_incremental_map(epoch, con, osdmap);
-    }
-  }
-}
-
-
-void OSDService::share_map_peer(int peer, Connection *con, OSDMapRef map)
-{
-  if (!map)
-    map = get_osdmap();
-
-  // send map?
-  epoch_t pe = get_peer_epoch(peer);
-  if (pe) {
-    if (pe < map->get_epoch()) {
-      send_incremental_map(pe, con, map);
-      note_peer_epoch(peer, map->get_epoch());
-    } else
-      dout(20) << "share_map_peer " << con << " already has epoch " << pe << dendl;
-  } else {
-    dout(20) << "share_map_peer " << con << " don't know epoch, doing nothing" << dendl;
-    // no idea about peer's epoch.
-    // ??? send recent ???
-    // do nothing.
-  }
-}
-
-
-bool OSDService::inc_scrubs_pending()
-{
-  bool result = false;
-
-  sched_scrub_lock.Lock();
-  if (scrubs_pending + scrubs_active < cct->_conf->osd_max_scrubs) {
-    dout(20) << "inc_scrubs_pending " << scrubs_pending << " -> " << (scrubs_pending+1)
-	     << " (max " << cct->_conf->osd_max_scrubs << ", active " << scrubs_active << ")" << dendl;
-    result = true;
-    ++scrubs_pending;
-  } else {
-    dout(20) << "inc_scrubs_pending " << scrubs_pending << " + " << scrubs_active << " active >= max " << cct->_conf->osd_max_scrubs << dendl;
-  }
-  sched_scrub_lock.Unlock();
-
-  return result;
-}
-
-void OSDService::dec_scrubs_pending()
-{
-  sched_scrub_lock.Lock();
-  dout(20) << "dec_scrubs_pending " << scrubs_pending << " -> " << (scrubs_pending-1)
-	   << " (max " << cct->_conf->osd_max_scrubs << ", active " << scrubs_active << ")" << dendl;
-  --scrubs_pending;
-  assert(scrubs_pending >= 0);
-  sched_scrub_lock.Unlock();
-}
-
-void OSDService::inc_scrubs_active(bool reserved)
-{
-  sched_scrub_lock.Lock();
-  ++(scrubs_active);
-  if (reserved) {
-    --(scrubs_pending);
-    dout(20) << "inc_scrubs_active " << (scrubs_active-1) << " -> " << scrubs_active
-	     << " (max " << cct->_conf->osd_max_scrubs
-	     << ", pending " << (scrubs_pending+1) << " -> " << scrubs_pending << ")" << dendl;
-    assert(scrubs_pending >= 0);
-  } else {
-    dout(20) << "inc_scrubs_active " << (scrubs_active-1) << " -> " << scrubs_active
-	     << " (max " << cct->_conf->osd_max_scrubs
-	     << ", pending " << scrubs_pending << ")" << dendl;
-  }
-  sched_scrub_lock.Unlock();
-}
-
-void OSDService::dec_scrubs_active()
-{
-  sched_scrub_lock.Lock();
-  dout(20) << "dec_scrubs_active " << scrubs_active << " -> " << (scrubs_active-1)
-	   << " (max " << cct->_conf->osd_max_scrubs << ", pending " << scrubs_pending << ")" << dendl;
-  --scrubs_active;
-  sched_scrub_lock.Unlock();
-}
-
-void OSDService::retrieve_epochs(epoch_t *_boot_epoch, epoch_t *_up_epoch,
-                                 epoch_t *_bind_epoch) const
-{
-  Mutex::Locker l(epoch_lock);
-  if (_boot_epoch)
-    *_boot_epoch = boot_epoch;
-  if (_up_epoch)
-    *_up_epoch = up_epoch;
-  if (_bind_epoch)
-    *_bind_epoch = bind_epoch;
-}
-
-void OSDService::set_epochs(const epoch_t *_boot_epoch, const epoch_t *_up_epoch,
-                            const epoch_t *_bind_epoch)
-{
-  Mutex::Locker l(epoch_lock);
-  if (_boot_epoch) {
-    assert(*_boot_epoch == 0 || *_boot_epoch >= boot_epoch);
-    boot_epoch = *_boot_epoch;
-  }
-  if (_up_epoch) {
-    assert(*_up_epoch == 0 || *_up_epoch >= up_epoch);
-    up_epoch = *_up_epoch;
-  }
-  if (_bind_epoch) {
-    assert(*_bind_epoch == 0 || *_bind_epoch >= bind_epoch);
-    bind_epoch = *_bind_epoch;
-  }
-}
-
-bool OSDService::prepare_to_stop()
-{
-  Mutex::Locker l(is_stopping_lock);
-  if (state != NOT_STOPPING)
-    return false;
-
-  OSDMapRef osdmap = get_osdmap();
-  if (osdmap && osdmap->is_up(whoami)) {
-    dout(0) << __func__ << " telling mon we are shutting down" << dendl;
-    state = PREPARING_TO_STOP;
-    monc->send_mon_message(new MOSDMarkMeDown(monc->get_fsid(),
-					      osdmap->get_inst(whoami),
-					      osdmap->get_epoch(),
-					      true  // request ack
-					      ));
-    utime_t now = ceph_clock_now(cct);
-    utime_t timeout;
-    timeout.set_from_double(now + cct->_conf->osd_mon_shutdown_timeout);
-    while ((ceph_clock_now(cct) < timeout) &&
-	   (state != STOPPING)) {
-      is_stopping_cond.WaitUntil(is_stopping_lock, timeout);
-    }
-  }
-  dout(0) << __func__ << " starting shutdown" << dendl;
-  state = STOPPING;
-  return true;
-}
-
-void OSDService::got_stop_ack()
-{
-  Mutex::Locker l(is_stopping_lock);
-  if (state == PREPARING_TO_STOP) {
-    dout(0) << __func__ << " starting shutdown" << dendl;
-    state = STOPPING;
-    is_stopping_cond.Signal();
-  } else {
-    dout(10) << __func__ << " ignoring msg" << dendl;
-  }
-}
-
-
-MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to,
-                                               OSDSuperblock& sblock)
-{
-  MOSDMap *m = new MOSDMap(monc->get_fsid());
-  m->oldest_map = sblock.oldest_map;
-  m->newest_map = sblock.newest_map;
-  
-  for (epoch_t e = to; e > since; e--) {
-    bufferlist bl;
-    if (e > m->oldest_map && get_inc_map_bl(e, bl)) {
-      m->incremental_maps[e].claim(bl);
-    } else if (get_map_bl(e, bl)) {
-      m->maps[e].claim(bl);
-      break;
-    } else {
-      derr << "since " << since << " to " << to
-	   << " oldest " << m->oldest_map << " newest " << m->newest_map
-	   << dendl;
-      m->put();
-      m = NULL;
-      break;
-    }
-  }
-  return m;
-}
-
-void OSDService::send_map(MOSDMap *m, Connection *con)
-{
-  con->send_message(m);
-}
-
-void OSDService::send_incremental_map(epoch_t since, Connection *con,
-                                      OSDMapRef& osdmap)
-{
-  epoch_t to = osdmap->get_epoch();
-  dout(10) << "send_incremental_map " << since << " -> " << to
-           << " to " << con << " " << con->get_peer_addr() << dendl;
-
-  MOSDMap *m = NULL;
-  while (!m) {
-    OSDSuperblock sblock(get_superblock());
-    if (since < sblock.oldest_map) {
-      // just send latest full map
-      MOSDMap *m = new MOSDMap(monc->get_fsid());
-      m->oldest_map = sblock.oldest_map;
-      m->newest_map = sblock.newest_map;
-      get_map_bl(to, m->maps[to]);
-      send_map(m, con);
-      return;
-    }
-    
-    if (to > since && (int64_t)(to - since) > cct->_conf->osd_map_share_max_epochs) {
-      dout(10) << "  " << (to - since) << " > max " << cct->_conf->osd_map_share_max_epochs
-	       << ", only sending most recent" << dendl;
-      since = to - cct->_conf->osd_map_share_max_epochs;
-    }
-    
-    if (to - since > (epoch_t)cct->_conf->osd_map_message_max)
-      to = since + cct->_conf->osd_map_message_max;
-    m = build_incremental_map_msg(since, to, sblock);
-  }
-  send_map(m, con);
-}
-
-bool OSDService::_get_map_bl(epoch_t e, bufferlist& bl)
-{
-  bool found = map_bl_cache.lookup(e, &bl);
-  if (found)
-    return true;
-  found = store->read(
-    META_COLL, OSD::get_osdmap_pobject_name(e), 0, 0, bl) >= 0;
-  if (found)
-    _add_map_bl(e, bl);
-  return found;
-}
-
-bool OSDService::get_inc_map_bl(epoch_t e, bufferlist& bl)
-{
-  Mutex::Locker l(map_cache_lock);
-  bool found = map_bl_inc_cache.lookup(e, &bl);
-  if (found)
-    return true;
-  found = store->read(
-    META_COLL, OSD::get_inc_osdmap_pobject_name(e), 0, 0, bl) >= 0;
-  if (found)
-    _add_map_inc_bl(e, bl);
-  return found;
-}
-
-void OSDService::_add_map_bl(epoch_t e, bufferlist& bl)
-{
-  dout(10) << "add_map_bl " << e << " " << bl.length() << " bytes" << dendl;
-  map_bl_cache.add(e, bl);
-}
-
-void OSDService::_add_map_inc_bl(epoch_t e, bufferlist& bl)
-{
-  dout(10) << "add_map_inc_bl " << e << " " << bl.length() << " bytes" << dendl;
-  map_bl_inc_cache.add(e, bl);
-}
-
-void OSDService::pin_map_inc_bl(epoch_t e, bufferlist &bl)
-{
-  Mutex::Locker l(map_cache_lock);
-  map_bl_inc_cache.pin(e, bl);
-}
-
-void OSDService::pin_map_bl(epoch_t e, bufferlist &bl)
-{
-  Mutex::Locker l(map_cache_lock);
-  map_bl_cache.pin(e, bl);
-}
-
-void OSDService::clear_map_bl_cache_pins(epoch_t e)
-{
-  Mutex::Locker l(map_cache_lock);
-  map_bl_inc_cache.clear_pinned(e);
-  map_bl_cache.clear_pinned(e);
-}
-
-OSDMapRef OSDService::_add_map(OSDMap *o)
-{
-  epoch_t e = o->get_epoch();
-
-  if (cct->_conf->osd_map_dedup) {
-    // Dedup against an existing map at a nearby epoch
-    OSDMapRef for_dedup = map_cache.lower_bound(e);
-    if (for_dedup) {
-      OSDMap::dedup(for_dedup.get(), o);
-    }
-  }
-  bool existed;
-  OSDMapRef l = map_cache.add(e, o, &existed);
-  if (existed) {
-    delete o;
-  }
-  return l;
-}
-
-OSDMapRef OSDService::try_get_map(epoch_t epoch)
-{
-  Mutex::Locker l(map_cache_lock);
-  OSDMapRef retval = map_cache.lookup(epoch);
-  if (retval) {
-    dout(30) << "get_map " << epoch << " -cached" << dendl;
-    return retval;
-  }
-
-  OSDMap *map = new OSDMap;
-  if (epoch > 0) {
-    dout(20) << "get_map " << epoch << " - loading and decoding " << map << dendl;
-    bufferlist bl;
-    if (!_get_map_bl(epoch, bl)) {
-      delete map;
-      return OSDMapRef();
-    }
-    map->decode(bl);
-  } else {
-    dout(20) << "get_map " << epoch << " - return initial " << map << dendl;
-  }
-  return _add_map(map);
-}
-
-bool OSDService::queue_for_recovery(PG *pg)
-{
-  bool b = recovery_wq.queue(pg);
-  if (b)
-    dout(10) << "queue_for_recovery queued " << *pg << dendl;
-  else
-    dout(10) << "queue_for_recovery already queued " << *pg << dendl;
-  return b;
-}
-
-
-// ops
-
-
-void OSDService::reply_op_error(OpRequestRef op, int err)
-{
-  reply_op_error(op, err, eversion_t(), 0);
-}
-
-void OSDService::reply_op_error(OpRequestRef op, int err, eversion_t v,
-                                version_t uv)
-{
-  MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
-  assert(m->get_header().type == CEPH_MSG_OSD_OP);
-  int flags;
-  flags = m->get_flags() & (CEPH_OSD_FLAG_ACK|CEPH_OSD_FLAG_ONDISK);
-
-  MOSDOpReply *reply = new MOSDOpReply(m, err, osdmap->get_epoch(), flags,
-				       true);
-  reply->set_reply_versions(v, uv);
-  m->get_connection()->send_message(reply);
-}
-
-void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op)
-{
-  MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
-  assert(m->get_header().type == CEPH_MSG_OSD_OP);
-
-  assert(m->get_map_epoch() >= pg->info.history.same_primary_since);
-
-  if (pg->is_ec_pg()) {
-    /**
-       * OSD recomputes op target based on current OSDMap. With an EC pg, we
-       * can get this result:
-       * 1) client at map 512 sends an op to osd 3, pg_t 3.9 based on mapping
-       *    [CRUSH_ITEM_NONE, 2, 3]/3
-       * 2) OSD 3 at map 513 remaps op to osd 3, spg_t 3.9s0 based on mapping
-       *    [3, 2, 3]/3
-       * 3) PG 3.9s0 dequeues the op at epoch 512 and notices that it isn't primary
-       *    -- misdirected op
-       * 4) client resends and this time PG 3.9s0 having caught up to 513 gets
-       *    it and fulfils it
-       *
-       * We can't compute the op target based on the sending map epoch due to
-       * splitting.  The simplest thing is to detect such cases here and drop
-       * them without an error (the client will resend anyway).
-       */
-    OSDMapRef opmap = try_get_map(m->get_map_epoch());
-    if (!opmap) {
-      dout(7) << __func__ << ": " << *pg << " no longer have map for "
-	      << m->get_map_epoch() << ", dropping" << dendl;
-      return;
-    }
-    pg_t _pgid = m->get_pg();
-    spg_t pgid;
-    if ((m->get_flags() & CEPH_OSD_FLAG_PGOP) == 0)
-      _pgid = opmap->raw_pg_to_pg(_pgid);
-    if (opmap->get_primary_shard(_pgid, &pgid) &&
-	pgid.shard != pg->info.pgid.shard) {
-      dout(7) << __func__ << ": " << *pg << " primary changed since "
-	      << m->get_map_epoch() << ", dropping" << dendl;
-      return;
-    }
-  }
-
-  dout(7) << *pg << " misdirected op in " << m->get_map_epoch() << dendl;
-  clog->warn() << m->get_source_inst() << " misdirected " << m->get_reqid()
-	      << " pg " << m->get_pg()
-	      << " to osd." << whoami
-	      << " not " << pg->acting
-	      << " in e" << m->get_map_epoch() << "/" << osdmap->get_epoch() << "\n";
-  reply_op_error(op, -ENXIO);
-}
-
-
-void OSDService::dequeue_pg(PG *pg, list<OpRequestRef> *dequeued)
-{
-  osd->op_shardedwq.dequeue(pg, dequeued);
-}
-
-void OSDService::queue_for_peering(PG *pg)
-{
-  peering_wq.queue(pg);
-}
-
-
-// ====================================================================
-// OSD
-
-#undef dout_prefix
-#define dout_prefix *_dout
-
-int OSD::convert_collection(ObjectStore *store, coll_t cid)
-{
-  coll_t tmp0("convertfs_temp");
-  coll_t tmp1("convertfs_temp1");
-  vector<ghobject_t> objects;
-
-  map<string, bufferptr> aset;
-  int r = store->collection_getattrs(cid, aset);
-  if (r < 0)
-    return r;
-
-  {
-    ObjectStore::Transaction t;
-    t.create_collection(tmp0);
-    for (map<string, bufferptr>::iterator i = aset.begin();
-	 i != aset.end();
-	 ++i) {
-      bufferlist val;
-      val.push_back(i->second);
-      t.collection_setattr(tmp0, i->first, val);
-    }
-    store->apply_transaction(t);
-  }
-
-  ghobject_t next;
-  while (!next.is_max()) {
-    objects.clear();
-    ghobject_t start = next;
-    r = store->collection_list_partial(cid, start,
-				       200, 300, 0,
-				       &objects, &next);
-    if (r < 0)
-      return r;
-
-    ObjectStore::Transaction t;
-    for (vector<ghobject_t>::iterator i = objects.begin();
-	 i != objects.end();
-	 ++i) {
-      t.collection_add(tmp0, cid, *i);
-    }
-    store->apply_transaction(t);
-  }
-
-  {
-    ObjectStore::Transaction t;
-    t.collection_rename(cid, tmp1);
-    t.collection_rename(tmp0, cid);
-    store->apply_transaction(t);
-  }
-
-  recursive_remove_collection(store, tmp1);
-  store->sync_and_flush();
-  store->sync();
-  return 0;
-}
-
-int OSD::do_convertfs(ObjectStore *store)
-{
-  int r = store->mount();
-  if (r < 0)
-    return r;
-
-  uint32_t version;
-  r = store->version_stamp_is_valid(&version);
-  if (r < 0)
-    return r;
-  if (r == 1)
-    return store->umount();
-
-  derr << "ObjectStore is old at version " << version << ".  Updating..."  << dendl;
-
-  derr << "Removing tmp pgs" << dendl;
-  vector<coll_t> collections;
-  r = store->list_collections(collections);
-  if (r < 0)
-    return r;
-  for (vector<coll_t>::iterator i = collections.begin();
-       i != collections.end();
-       ++i) {
-    spg_t pgid;
-    if (i->is_temp(pgid))
-      recursive_remove_collection(store, *i);
-    else if (i->to_str() == "convertfs_temp" ||
-	     i->to_str() == "convertfs_temp1")
-      recursive_remove_collection(store, *i);
-  }
-  store->flush();
-
-
-  derr << "Getting collections" << dendl;
-
-  derr << collections.size() << " to process." << dendl;
-  collections.clear();
-  r = store->list_collections(collections);
-  if (r < 0)
-    return r;
-  int processed = 0;
-  for (vector<coll_t>::iterator i = collections.begin();
-       i != collections.end();
-       ++i, ++processed) {
-    derr << processed << "/" << collections.size() << " processed" << dendl;
-    uint32_t collection_version;
-    r = store->collection_version_current(*i, &collection_version);
-    if (r < 0) {
-      return r;
-    } else if (r == 1) {
-      derr << "Collection " << *i << " is up to date" << dendl;
-    } else {
-      derr << "Updating collection " << *i << " current version is " 
-	   << collection_version << dendl;
-      r = convert_collection(store, *i);
-      if (r < 0)
-	return r;
-      derr << "collection " << *i << " updated" << dendl;
-    }
-  }
-  derr << "All collections up to date, updating version stamp..." << dendl;
-  r = store->update_version_stamp();
-  if (r < 0)
-    return r;
-  store->sync_and_flush();
-  store->sync();
-  derr << "Version stamp updated, done with upgrade!" << dendl;
-  return store->umount();
-}
-
-int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
-	      uuid_d fsid, int whoami)
-{
-  int ret;
-
-  try {
-    // if we are fed a uuid for this osd, use it.
-    store->set_fsid(cct->_conf->osd_uuid);
-
-    ret = store->mkfs();
-    if (ret) {
-      derr << "OSD::mkfs: ObjectStore::mkfs failed with error " << ret << dendl;
-      goto free_store;
-    }
-
-    ret = store->mount();
-    if (ret) {
-      derr << "OSD::mkfs: couldn't mount ObjectStore: error " << ret << dendl;
-      goto free_store;
-    }
+    ret = store->mount();
+    if (ret) {
+      derr << "OSD::mkfs: couldn't mount ObjectStore: error " << ret << dendl;
+      goto free_store;
+    }
 
     // age?
     if (cct->_conf->osd_age_time != 0) {
@@ -1446,7 +728,7 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
 
     OSDSuperblock sb;
     bufferlist sbbl;
-    ret = store->read(META_COLL, OSD_SUPERBLOCK_POBJECT, 0, 0, sbbl);
+    ret = store->read(coll_t::META_COLL, OSD_SUPERBLOCK_POBJECT, 0, 0, sbbl);
     if (ret >= 0) {
       dout(0) << " have superblock" << dendl;
       if (whoami != sb.whoami) {
@@ -1483,7 +765,7 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
 	object_t oid("disk_bw_test");
 	for (int i=0; i<1000; i++) {
 	  ObjectStore::Transaction *t = new ObjectStore::Transaction;
-	  t->write(META_COLL, hobject_t(sobject_t(oid, 0)), i*bl.length(), bl.length(), bl);
+	  t->write(coll_t::META_COLL, hobject_t(sobject_t(oid, 0)), i*bl.length(), bl.length(), bl);
 	  store->queue_transaction_and_cleanup(NULL, t);
 	}
 	store->sync();
@@ -1491,7 +773,7 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
 	end -= start;
 	dout(0) << "measured " << (1000.0 / (double)end) << " mb/sec" << dendl;
 	ObjectStore::Transaction tr;
-	tr.remove(META_COLL, hobject_t(sobject_t(oid, 0)));
+	tr.remove(coll_t::META_COLL, hobject_t(sobject_t(oid, 0)));
 	ret = store->apply_transaction(tr);
 	if (ret) {
 	  derr << "OSD::mkfs: error while benchmarking: apply_transaction returned "
@@ -1507,8 +789,8 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
       ::encode(sb, bl);
 
       ObjectStore::Transaction t;
-      t.create_collection(META_COLL);
-      t.write(META_COLL, OSD_SUPERBLOCK_POBJECT, 0, bl.length(), bl);
+      t.create_collection(coll_t::META_COLL);
+      t.write(coll_t::META_COLL, OSD_SUPERBLOCK_POBJECT, 0, bl.length(), bl);
       ret = store->apply_transaction(t);
       if (ret) {
 	derr << "OSD::mkfs: error while writing OSD_SUPERBLOCK_POBJECT: "
@@ -1605,7 +887,7 @@ int OSD::peek_meta(ObjectStore *store, std::string& magic,
 
 
 #undef dout_prefix
-#define dout_prefix _prefix(_dout, whoami, get_osdmap_epoch())
+#define dout_prefix _prefix(_dout, whoami, osdmap)
 
 // cons/des
 
@@ -1635,39 +917,33 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
   logger(NULL),
   recoverystate_perf(NULL),
   store(store_),
-  log_client(cct, client_messenger, &mc->monmap, LogClient::NO_FLAGS),
-  clog(log_client.create_channel()),
+  clog(cct, client_messenger, &mc->monmap, LogClient::NO_FLAGS),
   whoami(id),
   dev_path(dev), journal_path(jdev),
   dispatch_running(false),
   asok_hook(NULL),
   osd_compat(get_osd_compat_set()),
-  state(STATE_INITIALIZING),
-  osd_tp(cct, "OSD::osd_tp", cct->_conf->osd_op_threads, "osd_op_threads"),
-  osd_op_tp(cct, "OSD::osd_op_tp", 
-    cct->_conf->osd_op_num_threads_per_shard * cct->_conf->osd_op_num_shards),
+  state(STATE_INITIALIZING), boot_epoch(0), up_epoch(0), bind_epoch(0),
+  op_tp(cct, "OSD::op_tp", cct->_conf->osd_op_threads, "osd_op_threads"),
   recovery_tp(cct, "OSD::recovery_tp", cct->_conf->osd_recovery_threads, "osd_recovery_threads"),
   disk_tp(cct, "OSD::disk_tp", cct->_conf->osd_disk_threads, "osd_disk_threads"),
   command_tp(cct, "OSD::command_tp", 1),
   paused_recovery(false),
-  session_waiting_lock("OSD::session_waiting_lock"),
   heartbeat_lock("OSD::heartbeat_lock"),
-  heartbeat_stop(false), heartbeat_update_lock("OSD::heartbeat_update_lock"),
-  heartbeat_need_update(true), heartbeat_epoch(0),
+  heartbeat_stop(false), heartbeat_need_update(true), heartbeat_epoch(0),
   hbclient_messenger(hb_clientm),
   hb_front_server_messenger(hb_front_serverm),
   hb_back_server_messenger(hb_back_serverm),
   heartbeat_thread(this),
   heartbeat_dispatcher(this),
+  stat_lock("OSD::stat_lock"),
   finished_lock("OSD::finished_lock"),
-  op_tracker(cct, cct->_conf->osd_enable_op_tracker, 
-                  cct->_conf->osd_num_op_tracker_shard),
+  op_tracker(cct, cct->_conf->osd_enable_op_tracker),
   test_ops_hook(NULL),
-  op_shardedwq(cct->_conf->osd_op_num_shards, this, 
-    cct->_conf->osd_op_thread_timeout, &osd_op_tp),
-  peering_wq(this, cct->_conf->osd_op_thread_timeout, &osd_tp),
+  op_wq(this, cct->_conf->osd_op_thread_timeout, &op_tp),
+  peering_wq(this, cct->_conf->osd_op_thread_timeout, &op_tp),
   map_lock("OSD::map_lock"),
-  pg_map_lock("OSD::pg_map_lock"),
+  peer_map_epoch_lock("OSD::peer_map_epoch_lock"),
   debug_drop_pg_create_probability(cct->_conf->osd_debug_drop_pg_create_probability),
   debug_drop_pg_create_duration(cct->_conf->osd_debug_drop_pg_create_duration),
   debug_drop_pg_create_left(-1),
@@ -1683,7 +959,7 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
   replay_queue_lock("OSD::replay_queue_lock"),
   snap_trim_wq(this, cct->_conf->osd_snap_trim_thread_timeout, &disk_tp),
   scrub_wq(this, cct->_conf->osd_scrub_thread_timeout, &disk_tp),
-  scrub_finalize_wq(cct->_conf->osd_scrub_finalize_thread_timeout, &osd_tp),
+  scrub_finalize_wq(cct->_conf->osd_scrub_finalize_thread_timeout, &op_tp),
   rep_scrub_wq(this, cct->_conf->osd_scrub_thread_timeout, &disk_tp),
   remove_wq(store, cct->_conf->osd_remove_thread_timeout, &disk_tp),
   next_removal_seq(0),
@@ -1760,13 +1036,12 @@ bool OSD::asok_command(string command, cmdmap_t& cmdmap, string format,
     f->dump_stream("cluster_fsid") << superblock.cluster_fsid;
     f->dump_stream("osd_fsid") << superblock.osd_fsid;
     f->dump_unsigned("whoami", superblock.whoami);
-    f->dump_string("state", get_state_name(get_state()));
+    f->dump_string("state", get_state_name(state));
     f->dump_unsigned("oldest_map", superblock.oldest_map);
     f->dump_unsigned("newest_map", superblock.newest_map);
-    {
-      RWLock::RLocker l(pg_map_lock);
-      f->dump_unsigned("num_pgs", pg_map.size());
-    }
+    osd_lock.Lock();
+    f->dump_unsigned("num_pgs", pg_map.size());
+    osd_lock.Unlock();
     f->close_section();
   } else if (command == "flush_journal") {
     store->sync_and_flush();
@@ -1776,7 +1051,7 @@ bool OSD::asok_command(string command, cmdmap_t& cmdmap, string format,
     op_tracker.dump_historic_ops(f);
   } else if (command == "dump_op_pq_state") {
     f->open_object_section("pq");
-    op_shardedwq.dump(f);
+    op_wq.dump(f);
     f->close_section();
   } else if (command == "dump_blacklist") {
     list<pair<entity_addr_t,utime_t> > bl;
@@ -1796,22 +1071,20 @@ bool OSD::asok_command(string command, cmdmap_t& cmdmap, string format,
     f->close_section(); //blacklist
   } else if (command == "dump_watchers") {
     list<obj_watch_item_t> watchers;
+    osd_lock.Lock();
     // scan pg's
-    {
-      Mutex::Locker l(osd_lock);
-      RWLock::RLocker l2(pg_map_lock);
-      for (ceph::unordered_map<spg_t,PG*>::iterator it = pg_map.begin();
-          it != pg_map.end();
-          ++it) {
-
-        list<obj_watch_item_t> pg_watchers;
-        PG *pg = it->second;
-        pg->lock();
-        pg->get_watchers(pg_watchers);
-        pg->unlock();
-        watchers.splice(watchers.end(), pg_watchers);
-      }
+    for (ceph::unordered_map<spg_t,PG*>::iterator it = pg_map.begin();
+	 it != pg_map.end();
+	 ++it) {
+
+      list<obj_watch_item_t> pg_watchers;
+      PG *pg = it->second;
+      pg->lock();
+      pg->get_watchers(pg_watchers);
+      pg->unlock();
+      watchers.splice(watchers.end(), pg_watchers);
     }
+    osd_lock.Unlock();
 
     f->open_array_section("watchers");
     for (list<obj_watch_item_t>::iterator it = watchers.begin();
@@ -1837,15 +1110,6 @@ bool OSD::asok_command(string command, cmdmap_t& cmdmap, string format,
     }
 
     f->close_section(); //watches
-  } else if (command == "dump_reservations") {
-    f->open_object_section("reservations");
-    f->open_object_section("local_reservations");
-    service.local_reserver.dump(f);
-    f->close_section();
-    f->open_object_section("remote_reservations");
-    service.remote_reserver.dump(f);
-    f->close_section();
-    f->close_section();
   } else {
     assert(0 == "broken asok registration");
   }
@@ -1943,20 +1207,20 @@ int OSD::init()
   }
 
   // make sure info object exists
-  if (!store->exists(META_COLL, service.infos_oid)) {
-    dout(10) << "init creating/touching infos object" << dendl;
+  if (!store->exists(coll_t::META_COLL, service.infos_oid)) {
+    dout(10) << "init creating/touching snapmapper object" << dendl;
     ObjectStore::Transaction t;
-    t.touch(META_COLL, service.infos_oid);
+    t.touch(coll_t::META_COLL, service.infos_oid);
     r = store->apply_transaction(t);
     if (r < 0)
       goto out;
   }
 
   // make sure snap mapper object exists
-  if (!store->exists(META_COLL, OSD::make_snapmapper_oid())) {
-    dout(10) << "init creating/touching snapmapper object" << dendl;
+  if (!store->exists(coll_t::META_COLL, OSD::make_snapmapper_oid())) {
+    dout(10) << "init creating/touching infos object" << dendl;
     ObjectStore::Transaction t;
-    t.touch(META_COLL, OSD::make_snapmapper_oid());
+    t.touch(coll_t::META_COLL, OSD::make_snapmapper_oid());
     r = store->apply_transaction(t);
     if (r < 0)
       goto out;
@@ -1983,10 +1247,7 @@ int OSD::init()
 
   create_recoverystate_perf();
 
-  {
-    epoch_t bind_epoch = osdmap->get_epoch();
-    service.set_epochs(NULL, NULL, &bind_epoch);
-  }
+  bind_epoch = osdmap->get_epoch();
 
   // load up pgs (as they previously existed)
   load_pgs();
@@ -1994,7 +1255,7 @@ int OSD::init()
   dout(2) << "superblock: i am osd." << superblock.whoami << dendl;
 
   create_logger();
-
+    
   // i'm ready!
   client_messenger->add_dispatcher_head(this);
   cluster_messenger->add_dispatcher_head(this);
@@ -2003,7 +1264,7 @@ int OSD::init()
   hb_front_server_messenger->add_dispatcher_head(&heartbeat_dispatcher);
   hb_back_server_messenger->add_dispatcher_head(&heartbeat_dispatcher);
 
-  objecter_messenger->add_dispatcher_head(service.objecter);
+  objecter_messenger->add_dispatcher_head(&service.objecter_dispatcher);
 
   monc->set_want_keys(CEPH_ENTITY_TYPE_MON | CEPH_ENTITY_TYPE_OSD);
   r = monc->init();
@@ -2011,10 +1272,9 @@ int OSD::init()
     goto out;
 
   // tell monc about log_client so it will know about mon session resets
-  monc->set_log_client(&log_client);
+  monc->set_log_client(&clog);
 
-  osd_tp.start();
-  osd_op_tp.start();
+  op_tp.start();
   recovery_tp.start();
   disk_tp.start();
   command_tp.start();
@@ -2056,7 +1316,7 @@ int OSD::init()
   peering_wq.drain();
 
   dout(0) << "done with init, starting boot process" << dendl;
-  set_state(STATE_BOOTING);
+  state = STATE_BOOTING;
   start_boot();
 
   return 0;
@@ -2102,10 +1362,6 @@ void OSD::final_init()
 				     "show clients which have active watches,"
 				     " and on which objects");
   assert(r == 0);
-  r = admin_socket->register_command("dump_reservations", "dump_reservations",
-				     asok_hook,
-				     "show recovery reservations");
-  assert(r == 0);
 
   test_ops_hook = new TestOpsSocketHook(&(this->service), this->store);
   // Note: pools are CephString instead of CephPoolname because
@@ -2322,8 +1578,7 @@ void OSD::suicide(int exitcode)
   g_lockdep = 0;
 
   derr << " pausing thread pools" << dendl;
-  osd_tp.pause();
-  osd_op_tp.pause();
+  op_tp.pause();
   disk_tp.pause();
   recovery_tp.pause();
   command_tp.pause();
@@ -2349,7 +1604,9 @@ int OSD::shutdown()
   }
   derr << "shutdown" << dendl;
 
-  set_state(STATE_STOPPING);
+  heartbeat_lock.Lock();
+  state = STATE_STOPPING;
+  heartbeat_lock.Unlock();
 
   // Debugging
   cct->_conf->set_val("debug_osd", "100");
@@ -2360,24 +1617,19 @@ int OSD::shutdown()
 
   service.start_shutdown();
 
-  clear_waiting_sessions();
-
   // Shutdown PGs
-  {
-    RWLock::RLocker l(pg_map_lock);
-    for (ceph::unordered_map<spg_t, PG*>::iterator p = pg_map.begin();
-        p != pg_map.end();
-        ++p) {
-      dout(20) << " kicking pg " << p->first << dendl;
-      p->second->lock();
-      p->second->on_shutdown();
-      p->second->unlock();
-      p->second->osr->flush();
-    }
+  for (ceph::unordered_map<spg_t, PG*>::iterator p = pg_map.begin();
+       p != pg_map.end();
+       ++p) {
+    dout(20) << " kicking pg " << p->first << dendl;
+    p->second->lock();
+    p->second->on_shutdown();
+    p->second->unlock();
+    p->second->osr->flush();
   }
   
   // finish ops
-  op_shardedwq.drain(); // should already be empty except for lagard PGs
+  op_wq.drain(); // should already be empty except for lagard PGs
   {
     Mutex::Locker l(finished_lock);
     finished.clear(); // zap waiters (bleh, this is messy)
@@ -2391,7 +1643,6 @@ int OSD::shutdown()
   cct->get_admin_socket()->unregister_command("dump_op_pq_state");
   cct->get_admin_socket()->unregister_command("dump_blacklist");
   cct->get_admin_socket()->unregister_command("dump_watchers");
-  cct->get_admin_socket()->unregister_command("dump_reservations");
   delete asok_hook;
   asok_hook = NULL;
 
@@ -2417,16 +1668,12 @@ int OSD::shutdown()
   recovery_tp.stop();
   dout(10) << "recovery tp stopped" << dendl;
 
-  osd_tp.drain();
+  op_tp.drain();
   peering_wq.clear();
   scrub_finalize_wq.clear();
-  osd_tp.stop();
+  op_tp.stop();
   dout(10) << "osd tp stopped" << dendl;
 
-  osd_op_tp.drain();
-  osd_op_tp.stop();
-  dout(10) << "op sharded tp stopped" << dendl;
-
   command_tp.drain();
   command_tp.stop();
   dout(10) << "command tp stopped" << dendl;
@@ -2446,7 +1693,7 @@ int OSD::shutdown()
 
   // note unmount epoch
   dout(10) << "noting clean unmount in epoch " << osdmap->get_epoch() << dendl;
-  superblock.mounted = service.get_boot_epoch();
+  superblock.mounted = boot_epoch;
   superblock.clean_thru = osdmap->get_epoch();
   ObjectStore::Transaction t;
   write_superblock(t);
@@ -2473,23 +1720,20 @@ int OSD::shutdown()
 #ifdef PG_DEBUG_REFS
   service.dump_live_pgids();
 #endif
-  {
-    RWLock::RLocker l(pg_map_lock);
-    for (ceph::unordered_map<spg_t, PG*>::iterator p = pg_map.begin();
-        p != pg_map.end();
-        ++p) {
-      dout(20) << " kicking pg " << p->first << dendl;
-      p->second->lock();
-      if (p->second->ref.read() != 1) {
-        derr << "pgid " << p->first << " has ref count of "
-            << p->second->ref.read() << dendl;
-        assert(0);
-      }
-      p->second->unlock();
-      p->second->put("PGMap");
+  for (ceph::unordered_map<spg_t, PG*>::iterator p = pg_map.begin();
+       p != pg_map.end();
+       ++p) {
+    dout(20) << " kicking pg " << p->first << dendl;
+    p->second->lock();
+    if (p->second->ref.read() != 1) {
+      derr << "pgid " << p->first << " has ref count of "
+	   << p->second->ref.read() << dendl;
+      assert(0);
     }
-    pg_map.clear();
+    p->second->unlock();
+    p->second->put("PGMap");
   }
+  pg_map.clear();
 #ifdef PG_DEBUG_REFS
   service.dump_live_pgids();
 #endif
@@ -2524,13 +1768,13 @@ void OSD::write_superblock(ObjectStore::Transaction& t)
 
   bufferlist bl;
   ::encode(superblock, bl);
-  t.write(META_COLL, OSD_SUPERBLOCK_POBJECT, 0, bl.length(), bl);
+  t.write(coll_t::META_COLL, OSD_SUPERBLOCK_POBJECT, 0, bl.length(), bl);
 }
 
 int OSD::read_superblock()
 {
   bufferlist bl;
-  int r = store->read(META_COLL, OSD_SUPERBLOCK_POBJECT, 0, 0, bl);
+  int r = store->read(coll_t::META_COLL, OSD_SUPERBLOCK_POBJECT, 0, 0, bl);
   if (r < 0)
     return r;
 
@@ -2614,13 +1858,13 @@ PG *OSD::_open_lock_pg(
   assert(osd_lock.is_locked());
 
   PG* pg = _make_pg(createmap, pgid);
-  {
-    RWLock::WLocker l(pg_map_lock);
-    pg->lock(no_lockdep_check);
-    pg_map[pgid] = pg;
-    pg->get("PGMap");  // because it's in pg_map
-    service.pg_add_epoch(pg->info.pgid, createmap->get_epoch());
-  }
+
+  pg_map[pgid] = pg;
+
+  service.pg_add_epoch(pg->info.pgid, createmap->get_epoch());
+
+  pg->lock(no_lockdep_check);
+  pg->get("PGMap");  // because it's in pg_map
   return pg;
 }
 
@@ -2651,7 +1895,6 @@ void OSD::add_newly_split_pg(PG *pg, PG::RecoveryCtx *rctx)
   pg->get("PGMap");  // For pg_map
   pg_map[pg->info.pgid] = pg;
   service.pg_add_epoch(pg->info.pgid, pg->get_osdmap()->get_epoch());
-
   dout(10) << "Adding newly split pg " << *pg << dendl;
   vector<int> up, acting;
   pg->get_osdmap()->pg_to_up_acting_osds(pg->info.pgid.pgid, up, acting);
@@ -2672,6 +1915,7 @@ void OSD::add_newly_split_pg(PG *pg, PG::RecoveryCtx *rctx)
     }
     peering_wait_for_split.erase(to_wake);
   }
+  wake_pg_waiters(pg->info.pgid);
   if (!service.get_osdmap()->have_pg_pool(pg->info.pgid.pool()))
     _remove_pg(pg);
 }
@@ -2769,45 +2013,16 @@ PG *OSD::_create_lock_pg(
   return pg;
 }
 
-PG *OSD::get_pg_or_queue_for_pg(const spg_t& pgid, OpRequestRef& op)
-{
-  Session *session = static_cast<Session*>(
-    op->get_req()->get_connection()->get_priv());
-  assert(session);
-  // get_pg_or_queue_for_pg is only called from the fast_dispatch path where
-  // the session_dispatch_lock must already be held.
-  assert(session->session_dispatch_lock.is_locked());
-  RWLock::RLocker l(pg_map_lock);
-
-  ceph::unordered_map<spg_t, PG*>::iterator i = pg_map.find(pgid);
-  if (i == pg_map.end())
-    session->waiting_for_pg[pgid];
-
-  map<spg_t, list<OpRequestRef> >::iterator wlistiter =
-    session->waiting_for_pg.find(pgid);
-
-  PG *out = NULL;
-  if (wlistiter == session->waiting_for_pg.end()) {
-    out = i->second;
-  } else {
-    wlistiter->second.push_back(op);
-    register_session_waiting_on_pg(session, pgid);
-  }
-  session->put();
-  return out;
-}
 
 bool OSD::_have_pg(spg_t pgid)
 {
   assert(osd_lock.is_locked());
-  RWLock::RLocker l(pg_map_lock);
   return pg_map.count(pgid);
 }
 
 PG *OSD::_lookup_lock_pg(spg_t pgid)
 {
   assert(osd_lock.is_locked());
-  RWLock::RLocker l(pg_map_lock);
   if (!pg_map.count(pgid))
     return NULL;
   PG *pg = pg_map[pgid];
@@ -2819,7 +2034,6 @@ PG *OSD::_lookup_lock_pg(spg_t pgid)
 PG *OSD::_lookup_pg(spg_t pgid)
 {
   assert(osd_lock.is_locked());
-  RWLock::RLocker l(pg_map_lock);
   if (!pg_map.count(pgid))
     return NULL;
   PG *pg = pg_map[pgid];
@@ -2839,10 +2053,7 @@ void OSD::load_pgs()
 {
   assert(osd_lock.is_locked());
   dout(0) << "load_pgs" << dendl;
-  {
-    RWLock::RLocker l(pg_map_lock);
-    assert(pg_map.empty());
-  }
+  assert(pg_map.empty());
 
   vector<coll_t> ls;
   int r = store->list_collections(ls);
@@ -2910,7 +2121,6 @@ void OSD::load_pgs()
     epoch_t map_epoch = PG::peek_map_epoch(store, coll_t(pgid), service.infos_oid, &bl);
 
     PG *pg = _open_lock_pg(map_epoch == 0 ? osdmap : service.get_map(map_epoch), pgid);
-    // there can be no waiters here, so we don't call wake_pg_waiters
 
     // read pg state, log
     pg->read_state(store, bl);
@@ -2971,10 +2181,7 @@ void OSD::load_pgs()
     dout(10) << "load_pgs loaded " << *pg << " " << pg->pg_log.get_log() << dendl;
     pg->unlock();
   }
-  {
-    RWLock::RLocker l(pg_map_lock);
-    dout(0) << "load_pgs opened " << pg_map.size() << " pgs" << dendl;
-  }
+  dout(0) << "load_pgs opened " << pg_map.size() << " pgs" << dendl;
   
   build_past_intervals_parallel();
 }
@@ -3004,28 +2211,25 @@ void OSD::build_past_intervals_parallel()
   // calculate untion of map range
   epoch_t end_epoch = superblock.oldest_map;
   epoch_t cur_epoch = superblock.newest_map;
-  {
-    RWLock::RLocker l(pg_map_lock);
-    for (ceph::unordered_map<spg_t, PG*>::iterator i = pg_map.begin();
-        i != pg_map.end();
-        ++i) {
-      PG *pg = i->second;
+  for (ceph::unordered_map<spg_t, PG*>::iterator i = pg_map.begin();
+       i != pg_map.end();
+       ++i) {
+    PG *pg = i->second;
 
-      epoch_t start, end;
-      if (!pg->_calc_past_interval_range(&start, &end))
-        continue;
+    epoch_t start, end;
+    if (!pg->_calc_past_interval_range(&start, &end))
+      continue;
 
-      dout(10) << pg->info.pgid << " needs " << start << "-" << end << dendl;
-      pistate& p = pis[pg];
-      p.start = start;
-      p.end = end;
-      p.same_interval_since = 0;
+    dout(10) << pg->info.pgid << " needs " << start << "-" << end << dendl;
+    pistate& p = pis[pg];
+    p.start = start;
+    p.end = end;
+    p.same_interval_since = 0;
 
-      if (start < cur_epoch)
-        cur_epoch = start;
-      if (end > end_epoch)
-        end_epoch = end;
-    }
+    if (start < cur_epoch)
+      cur_epoch = start;
+    if (end > end_epoch)
+      end_epoch = end;
   }
   if (pis.empty()) {
     dout(10) << __func__ << " nothing to build" << dendl;
@@ -3078,6 +2282,7 @@ void OSD::build_past_intervals_parallel()
 	p.same_interval_since,
 	pg->info.history.last_epoch_clean,
 	cur_map, last_map,
+	pg->info.pgid.pool(),
 	pg->info.pgid.pgid,
 	&pg->past_intervals,
 	&debug);
@@ -3193,21 +2398,8 @@ void OSD::handle_pg_peering_evt(
     PG::RecoveryCtx rctx = create_context();
     switch (result) {
     case RES_NONE: {
-      const pg_pool_t* pp = osdmap->get_pg_pool(pgid.pool());
-      coll_t cid(pgid);
-
       // ok, create the pg locally using provided Info and History
-      rctx.transaction->create_collection(cid);
-
-      // Give a hint to the PG collection
-      bufferlist hint;
-      uint32_t pg_num = pp->get_pg_num();
-      uint64_t expected_num_objects_pg = pp->expected_num_objects / pg_num;
-      ::encode(pg_num, hint);
-      ::encode(expected_num_objects_pg, hint);
-      uint32_t hint_type = ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS;
-      rctx.transaction->collection_hint(cid, hint_type, hint);
-
+      rctx.transaction->create_collection(coll_t(pgid));
       PG *pg = _create_lock_pg(
 	get_map(epoch),
 	pgid, create, false, result == RES_SELF,
@@ -3222,87 +2414,77 @@ void OSD::handle_pg_peering_evt(
 
       dout(10) << *pg << " is new" << dendl;
 
+      // kick any waiters
+      wake_pg_waiters(pg->info.pgid);
+      
       pg->queue_peering_event(evt);
       pg->unlock();
-      wake_pg_waiters(pg, pgid);
       return;
     }
     case RES_SELF: {
       old_pg_state->lock();
-      OSDMapRef old_osd_map = old_pg_state->get_osdmap();
-      int old_role = old_pg_state->role;
-      vector<int> old_up = old_pg_state->up;
-      int old_up_primary = old_pg_state->up_primary.osd;
-      vector<int> old_acting = old_pg_state->acting;
-      int old_primary = old_pg_state->primary.osd;
-      pg_history_t old_history = old_pg_state->info.history;
-      pg_interval_map_t old_past_intervals = old_pg_state->past_intervals;
-      old_pg_state->unlock();
       PG *pg = _create_lock_pg(
-	old_osd_map,
+	old_pg_state->get_osdmap(),
 	resurrected,
 	false,
 	false,
 	true,
-	old_role,
-	old_up,
-	old_up_primary,
-	old_acting,
-	old_primary,
-	old_history,
-	old_past_intervals,
+	old_pg_state->role,
+	old_pg_state->up,
+	old_pg_state->up_primary.osd,
+	old_pg_state->acting,
+	old_pg_state->primary.osd,
+	old_pg_state->info.history,
+	old_pg_state->past_intervals,
 	*rctx.transaction);
+      old_pg_state->unlock();
       pg->handle_create(&rctx);
       pg->write_if_dirty(*rctx.transaction);
       dispatch_context(rctx, pg, osdmap);
 
       dout(10) << *pg << " is new (resurrected)" << dendl;
 
+      // kick any waiters
+      wake_pg_waiters(pg->info.pgid);
+
       pg->queue_peering_event(evt);
       pg->unlock();
-      wake_pg_waiters(pg, resurrected);
       return;
     }
     case RES_PARENT: {
       assert(old_pg_state);
       old_pg_state->lock();
-      OSDMapRef old_osd_map = old_pg_state->get_osdmap();
-      int old_role = old_pg_state->role;
-      vector<int> old_up = old_pg_state->up;
-      int old_up_primary = old_pg_state->up_primary.osd;
-      vector<int> old_acting = old_pg_state->acting;
-      int old_primary = old_pg_state->primary.osd;
-      pg_history_t old_history = old_pg_state->info.history;
-      pg_interval_map_t old_past_intervals = old_pg_state->past_intervals;
-      old_pg_state->unlock();
       PG *parent = _create_lock_pg(
-	old_osd_map,
+	old_pg_state->get_osdmap(),
 	resurrected,
 	false,
 	false,
 	true,
-	old_role,
-	old_up,
-	old_up_primary,
-	old_acting,
-	old_primary,
-	old_history,
-	old_past_intervals,
+	old_pg_state->role,
+	old_pg_state->up,
+	old_pg_state->up_primary.osd,
+	old_pg_state->acting,
+	old_pg_state->primary.osd,
+	old_pg_state->info.history,
+	old_pg_state->past_intervals,
 	*rctx.transaction
 	);
+      old_pg_state->unlock();
       parent->handle_create(&rctx);
       parent->write_if_dirty(*rctx.transaction);
       dispatch_context(rctx, parent, osdmap);
 
       dout(10) << *parent << " is new" << dendl;
 
+      // kick any waiters
+      wake_pg_waiters(parent->info.pgid);
+
       assert(service.splitting(pgid));
       peering_wait_for_split[pgid].push_back(evt);
 
       //parent->queue_peering_event(evt);
       parent->queue_null(osdmap->get_epoch(), osdmap->get_epoch());
       parent->unlock();
-      wake_pg_waiters(parent, resurrected);
       return;
     }
     }
@@ -3348,7 +2530,7 @@ void OSD::calc_priors_during(
 	    pset.insert(
 	      pg_shard_t(
 		acting[i],
-		osdmap->pg_is_ec(pgid.pgid) ? shard_id_t(i) : shard_id_t::NO_SHARD));
+		osdmap->pg_is_ec(pgid.pgid) ? shard_id_t(i) : ghobject_t::NO_SHARD));
 	  }
 	  up++;
 	}
@@ -3362,7 +2544,7 @@ void OSD::calc_priors_during(
 	  pset.insert(
 	    pg_shard_t(
 	      acting[i],
-	      osdmap->pg_is_ec(pgid.pgid) ? shard_id_t(i) : shard_id_t::NO_SHARD));
+	      osdmap->pg_is_ec(pgid.pgid) ? i : ghobject_t::NO_SHARD));
 	}
       }
     }
@@ -3448,26 +2630,129 @@ bool OSD::project_pg_history(spg_t pgid, pg_history_t& h, epoch_t from,
       h.same_primary_since = e;
     }
 
-    if (h.same_interval_since >= e && h.same_up_since >= e && h.same_primary_since >= e)
-      break;
+    if (h.same_interval_since >= e && h.same_up_since >= e && h.same_primary_since >= e)
+      break;
+  }
+
+  // base case: these floors should be the creation epoch if we didn't
+  // find any changes.
+  if (e == h.epoch_created) {
+    if (!h.same_interval_since)
+      h.same_interval_since = e;
+    if (!h.same_up_since)
+      h.same_up_since = e;
+    if (!h.same_primary_since)
+      h.same_primary_since = e;
+  }
+
+  dout(15) << "project_pg_history end " << h << dendl;
+  return true;
+}
+
+// -------------------------------------
+
+float OSDService::get_full_ratio()
+{
+  float full_ratio = cct->_conf->osd_failsafe_full_ratio;
+  if (full_ratio > 1.0) full_ratio /= 100.0;
+  return full_ratio;
+}
+
+float OSDService::get_nearfull_ratio()
+{
+  float nearfull_ratio = cct->_conf->osd_failsafe_nearfull_ratio;
+  if (nearfull_ratio > 1.0) nearfull_ratio /= 100.0;
+  return nearfull_ratio;
+}
+
+void OSDService::check_nearfull_warning(const osd_stat_t &osd_stat)
+{
+  Mutex::Locker l(full_status_lock);
+  enum s_names new_state;
+
+  time_t now = ceph_clock_gettime(NULL);
+
+  // We base ratio on kb_avail rather than kb_used because they can
+  // differ significantly e.g. on btrfs volumes with a large number of
+  // chunks reserved for metadata, and for our purposes (avoiding
+  // completely filling the disk) it's far more important to know how
+  // much space is available to use than how much we've already used.
+  float ratio = ((float)(osd_stat.kb - osd_stat.kb_avail)) / ((float)osd_stat.kb);
+  float nearfull_ratio = get_nearfull_ratio();
+  float full_ratio = get_full_ratio();
+  cur_ratio = ratio;
+
+  if (full_ratio > 0 && ratio > full_ratio) {
+    new_state = FULL;
+  } else if (nearfull_ratio > 0 && ratio > nearfull_ratio) {
+    new_state = NEAR;
+  } else {
+    cur_state = NONE;
+    return;
   }
 
-  // base case: these floors should be the creation epoch if we didn't
-  // find any changes.
-  if (e == h.epoch_created) {
-    if (!h.same_interval_since)
-      h.same_interval_since = e;
-    if (!h.same_up_since)
-      h.same_up_since = e;
-    if (!h.same_primary_since)
-      h.same_primary_since = e;
+  if (cur_state != new_state) {
+    cur_state = new_state;
+  } else if (now - last_msg < cct->_conf->osd_op_complaint_time) {
+    return;
   }
+  last_msg = now;
+  if (cur_state == FULL)
+    clog.error() << "OSD full dropping all updates " << (int)(ratio * 100) << "% full";
+  else
+    clog.warn() << "OSD near full (" << (int)(ratio * 100) << "%)";
+}
 
-  dout(15) << "project_pg_history end " << h << dendl;
-  return true;
+bool OSDService::check_failsafe_full()
+{
+  Mutex::Locker l(full_status_lock);
+  if (cur_state == FULL)
+    return true;
+  return false;
+}
+
+bool OSDService::too_full_for_backfill(double *_ratio, double *_max_ratio)
+{
+  Mutex::Locker l(full_status_lock);
+  double max_ratio;
+  max_ratio = cct->_conf->osd_backfill_full_ratio;
+  if (_ratio)
+    *_ratio = cur_ratio;
+  if (_max_ratio)
+    *_max_ratio = max_ratio;
+  return cur_ratio >= max_ratio;
 }
 
 
+void OSD::update_osd_stat()
+{
+  // fill in osd stats too
+  struct statfs stbuf;
+  store->statfs(&stbuf);
+
+  uint64_t bytes = stbuf.f_blocks * stbuf.f_bsize;
+  uint64_t used = (stbuf.f_blocks - stbuf.f_bfree) * stbuf.f_bsize;
+  uint64_t avail = stbuf.f_bavail * stbuf.f_bsize;
+
+  osd_stat.kb = bytes >> 10;
+  osd_stat.kb_used = used >> 10;
+  osd_stat.kb_avail = avail >> 10;
+
+  logger->set(l_osd_stat_bytes, bytes);
+  logger->set(l_osd_stat_bytes_used, used);
+  logger->set(l_osd_stat_bytes_avail, avail);
+
+  osd_stat.hb_in.clear();
+  for (map<int,HeartbeatInfo>::iterator p = heartbeat_peers.begin(); p != heartbeat_peers.end(); ++p)
+    osd_stat.hb_in.push_back(p->first);
+  osd_stat.hb_out.clear();
+
+  service.check_nearfull_warning(osd_stat);
+
+  op_tracker.get_age_ms_histogram(&osd_stat.op_queue_age_hist);
+
+  dout(20) << "update_osd_stat " << osd_stat << dendl;
+}
 
 void OSD::_add_heartbeat_peer(int p)
 {
@@ -3484,7 +2769,7 @@ void OSD::_add_heartbeat_peer(int p)
     hi->peer = p;
     HeartbeatSession *s = new HeartbeatSession(p);
     hi->con_back = cons.first.get();
-    hi->con_back->set_priv(s->get());
+    hi->con_back->set_priv(s);
     if (cons.second) {
       hi->con_front = cons.second.get();
       hi->con_front->set_priv(s->get());
@@ -3498,7 +2783,6 @@ void OSD::_add_heartbeat_peer(int p)
 	       << " " << hi->con_back->get_peer_addr()
 	       << dendl;
     }
-    s->put();
   } else {
     hi = &i->second;
   }
@@ -3513,19 +2797,20 @@ void OSD::_remove_heartbeat_peer(int n)
 	   << " " << q->second.con_back->get_peer_addr()
 	   << " " << (q->second.con_front ? q->second.con_front->get_peer_addr() : entity_addr_t())
 	   << dendl;
-  q->second.con_back->mark_down();
+  hbclient_messenger->mark_down(q->second.con_back);
   if (q->second.con_front) {
-    q->second.con_front->mark_down();
+    hbclient_messenger->mark_down(q->second.con_front);
   }
   heartbeat_peers.erase(q);
 }
 
 void OSD::need_heartbeat_peer_update()
 {
+  Mutex::Locker l(heartbeat_lock);
   if (is_stopping())
     return;
   dout(20) << "need_heartbeat_peer_update" << dendl;
-  heartbeat_set_peers_need_update();
+  heartbeat_need_update = true;
 }
 
 void OSD::maybe_update_heartbeat_peers()
@@ -3536,12 +2821,12 @@ void OSD::maybe_update_heartbeat_peers()
     utime_t now = ceph_clock_now(cct);
     if (last_heartbeat_resample == utime_t()) {
       last_heartbeat_resample = now;
-      heartbeat_set_peers_need_update();
-    } else if (!heartbeat_peers_need_update()) {
+      heartbeat_need_update = true;
+    } else if (!heartbeat_need_update) {
       utime_t dur = now - last_heartbeat_resample;
       if (dur > cct->_conf->osd_heartbeat_grace) {
 	dout(10) << "maybe_update_heartbeat_peers forcing update after " << dur << " seconds" << dendl;
-	heartbeat_set_peers_need_update();
+	heartbeat_need_update = true;
 	last_heartbeat_resample = now;
 	reset_heartbeat_peers();   // we want *new* peers!
       }
@@ -3549,7 +2834,7 @@ void OSD::maybe_update_heartbeat_peers()
   }
 
   Mutex::Locker l(heartbeat_lock);
-  if (!heartbeat_peers_need_update())
+  if (!heartbeat_need_update)
     return;
   heartbeat_need_update = false;
 
@@ -3559,7 +2844,6 @@ void OSD::maybe_update_heartbeat_peers()
 
   // build heartbeat from set
   if (is_active()) {
-    RWLock::RLocker l(pg_map_lock);
     for (ceph::unordered_map<spg_t, PG*>::iterator i = pg_map.begin();
 	 i != pg_map.end();
 	 ++i) {
@@ -3644,9 +2928,9 @@ void OSD::reset_heartbeat_peers()
   Mutex::Locker l(heartbeat_lock);
   while (!heartbeat_peers.empty()) {
     HeartbeatInfo& hi = heartbeat_peers.begin()->second;
-    hi.con_back->mark_down();
+    hbclient_messenger->mark_down(hi.con_back);
     if (hi.con_front) {
-      hi.con_front->mark_down();
+      hbclient_messenger->mark_down(hi.con_front);
     }
     heartbeat_peers.erase(heartbeat_peers.begin());
   }
@@ -3708,14 +2992,14 @@ void OSD::handle_osd_ping(MOSDPing *m)
 				curmap->get_epoch(),
 				MOSDPing::PING_REPLY,
 				m->stamp);
-      m->get_connection()->send_message(r);
+      m->get_connection()->get_messenger()->send_message(r, m->get_connection());
 
       if (curmap->is_up(from)) {
-	service.note_peer_epoch(from, m->map_epoch);
+	note_peer_epoch(from, m->map_epoch);
 	if (is_active()) {
 	  ConnectionRef con = service.get_con_osd_cluster(from, curmap->get_epoch());
 	  if (con) {
-	    service.share_map_peer(from, con.get());
+	    _share_map_outgoing(from, con.get());
 	  }
 	}
       } else if (!curmap->exists(from) ||
@@ -3725,7 +3009,7 @@ void OSD::handle_osd_ping(MOSDPing *m)
 				  curmap->get_epoch(),
 				  MOSDPing::YOU_DIED,
 				  m->stamp);
-	m->get_connection()->send_message(r);
+	m->get_connection()->get_messenger()->send_message(r, m->get_connection());
       }
     }
     break;
@@ -3758,11 +3042,11 @@ void OSD::handle_osd_ping(MOSDPing *m)
 
       if (m->map_epoch &&
 	  curmap->is_up(from)) {
-	service.note_peer_epoch(from, m->map_epoch);
+	note_peer_epoch(from, m->map_epoch);
 	if (is_active()) {
 	  ConnectionRef con = service.get_con_osd_cluster(from, curmap->get_epoch());
 	  if (con) {
-	    service.share_map_peer(from, con.get());
+	    _share_map_outgoing(from, con.get());
 	  }
 	}
       }
@@ -3868,14 +3152,12 @@ void OSD::heartbeat()
   dout(30) << "heartbeat checking stats" << dendl;
 
   // refresh stats?
-  vector<int> hb_peers;
-  for (map<int,HeartbeatInfo>::iterator p = heartbeat_peers.begin();
-       p != heartbeat_peers.end();
-       ++p)
-    hb_peers.push_back(p->first);
-  service.update_osd_stat(hb_peers);
+  {
+    Mutex::Locker lock(stat_lock);
+    update_osd_stat();
+  }
 
-  dout(5) << "heartbeat: " << service.get_osd_stat() << dendl;
+  dout(5) << "heartbeat: " << osd_stat << dendl;
 
   utime_t now = ceph_clock_now(cct);
 
@@ -3888,16 +3170,17 @@ void OSD::heartbeat()
     if (i->second.first_tx == utime_t())
       i->second.first_tx = now;
     dout(30) << "heartbeat sending ping to osd." << peer << dendl;
-    i->second.con_back->send_message(new MOSDPing(monc->get_fsid(),
-					  service.get_osdmap()->get_epoch(),
-					  MOSDPing::PING,
-					  now));
-
+    hbclient_messenger->send_message(new MOSDPing(monc->get_fsid(),
+						  service.get_osdmap()->get_epoch(),
+						  MOSDPing::PING,
+						  now),
+				     i->second.con_back);
     if (i->second.con_front)
-      i->second.con_front->send_message(new MOSDPing(monc->get_fsid(),
-					     service.get_osdmap()->get_epoch(),
-						     MOSDPing::PING,
-						     now));
+      hbclient_messenger->send_message(new MOSDPing(monc->get_fsid(),
+						    service.get_osdmap()->get_epoch(),
+						    MOSDPing::PING,
+						    now),
+				       i->second.con_front);
   }
 
   dout(30) << "heartbeat check" << dendl;
@@ -3936,11 +3219,11 @@ bool OSD::heartbeat_reset(Connection *con)
       dout(10) << "heartbeat_reset failed hb con " << con << " for osd." << p->second.peer
 	       << ", reopening" << dendl;
       if (con != p->second.con_back) {
-	p->second.con_back->mark_down();
+	hbclient_messenger->mark_down(p->second.con_back);
       }
       p->second.con_back.reset(NULL);
       if (p->second.con_front && con != p->second.con_front) {
-	p->second.con_front->mark_down();
+	hbclient_messenger->mark_down(p->second.con_front);
       }
       p->second.con_front.reset(NULL);
       pair<ConnectionRef,ConnectionRef> newcon = service.get_con_osd_hb(p->second.peer, p->second.epoch);
@@ -4009,7 +3292,7 @@ void OSD::tick()
   if (is_waiting_for_healthy()) {
     if (_is_healthy()) {
       dout(1) << "healthy again, booting" << dendl;
-      set_state(STATE_BOOTING);
+      state = STATE_BOOTING;
       start_boot();
     }
   }
@@ -4047,7 +3330,7 @@ void OSD::check_ops_in_flight()
     for (vector<string>::iterator i = warnings.begin();
         i != warnings.end();
         ++i) {
-      clog->warn() << *i;
+      clog.warn() << *i;
     }
   }
   return;
@@ -4080,7 +3363,7 @@ void TestOpsSocketHook::test_ops(OSDService *service, ObjectStore *store,
     string poolstr;
 
     cmd_getval(service->cct, cmdmap, "pool", poolstr);
-    pool = curmap->lookup_pg_pool_name(poolstr);
+    pool = curmap->const_lookup_pg_pool_name(poolstr.c_str());
     //If we can't find it by name then maybe id specified
     if (pool < 0 && isdigit(poolstr[0]))
       pool = atoll(poolstr.c_str());
@@ -4107,7 +3390,7 @@ void TestOpsSocketHook::test_ops(OSDService *service, ObjectStore *store,
       ss << "Must not call on ec pool";
       return;
     }
-    spg_t pgid = spg_t(curmap->raw_pg_to_pg(rawpg), shard_id_t::NO_SHARD);
+    spg_t pgid = spg_t(curmap->raw_pg_to_pg(rawpg), ghobject_t::no_shard());
 
     hobject_t obj(object_t(objname), string(""), CEPH_NOSNAP, rawpg.ps(), pool, nspace);
     ObjectStore::Transaction t;
@@ -4336,48 +3619,11 @@ void OSD::ms_handle_connect(Connection *con)
       send_pg_stats(ceph_clock_now(cct));
 
       monc->sub_want("osd_pg_creates", 0, CEPH_SUBSCRIBE_ONETIME);
-      monc->sub_want("osdmap", osdmap->get_epoch(), CEPH_SUBSCRIBE_ONETIME);
       monc->renew_subs();
     }
   }
 }
 
-void OSD::ms_handle_fast_connect(Connection *con)
-{
-  if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
-    Session *s = static_cast<Session*>(con->get_priv());
-    if (!s) {
-      s = new Session(cct);
-      con->set_priv(s->get());
-      s->con = con;
-      dout(10) << " new session (outgoing) " << s << " con=" << s->con
-          << " addr=" << s->con->get_peer_addr() << dendl;
-      // we don't connect to clients
-      assert(con->get_peer_type() == CEPH_ENTITY_TYPE_OSD);
-      s->entity_name.set_type(CEPH_ENTITY_TYPE_OSD);
-    }
-    s->put();
-  }
-}
-
-void OSD::ms_handle_fast_accept(Connection *con)
-{
-  if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
-    Session *s = static_cast<Session*>(con->get_priv());
-    if (!s) {
-      s = new Session(cct);
-      con->set_priv(s->get());
-      s->con = con;
-      dout(10) << "new session (incoming)" << s << " con=" << con
-          << " addr=" << con->get_peer_addr()
-          << " must have raced with connect" << dendl;
-      assert(con->get_peer_type() == CEPH_ENTITY_TYPE_OSD);
-      s->entity_name.set_type(CEPH_ENTITY_TYPE_OSD);
-    }
-    s->put();
-  }
-}
-
 bool OSD::ms_handle_reset(Connection *con)
 {
   OSD::Session *session = (OSD::Session *)con->get_priv();
@@ -4386,7 +3632,6 @@ bool OSD::ms_handle_reset(Connection *con)
     return false;
   session->wstate.reset();
   session->con.reset(NULL);  // break con <-> session ref cycle
-  session_handle_reset(session);
   session->put();
   return true;
 }
@@ -4447,7 +3692,7 @@ void OSD::_maybe_boot(epoch_t oldest, epoch_t newest)
 void OSD::start_waiting_for_healthy()
 {
   dout(1) << "start_waiting_for_healthy" << dendl;
-  set_state(STATE_WAITING_FOR_HEALTHY);
+  state = STATE_WAITING_FOR_HEALTHY;
   last_heartbeat_resample = utime_t();
 }
 
@@ -4483,55 +3728,31 @@ void OSD::_send_boot()
 {
   dout(10) << "_send_boot" << dendl;
   entity_addr_t cluster_addr = cluster_messenger->get_myaddr();
-  Connection *local_connection = cluster_messenger->get_loopback_connection().get();
   if (cluster_addr.is_blank_ip()) {
     int port = cluster_addr.get_port();
     cluster_addr = client_messenger->get_myaddr();
     cluster_addr.set_port(port);
     cluster_messenger->set_addr_unknowns(cluster_addr);
     dout(10) << " assuming cluster_addr ip matches client_addr" << dendl;
-  } else {
-    Session *s = static_cast<Session*>(local_connection->get_priv());
-    if (s)
-      s->put();
-    else
-      cluster_messenger->ms_deliver_handle_fast_connect(local_connection);
   }
-
   entity_addr_t hb_back_addr = hb_back_server_messenger->get_myaddr();
-  local_connection = hb_back_server_messenger->get_loopback_connection().get();
   if (hb_back_addr.is_blank_ip()) {
     int port = hb_back_addr.get_port();
     hb_back_addr = cluster_addr;
     hb_back_addr.set_port(port);
     hb_back_server_messenger->set_addr_unknowns(hb_back_addr);
     dout(10) << " assuming hb_back_addr ip matches cluster_addr" << dendl;
-  } else {
-    Session *s = static_cast<Session*>(local_connection->get_priv());
-    if (s)
-      s->put();
-    else
-      hb_back_server_messenger->ms_deliver_handle_fast_connect(local_connection);
   }
-
   entity_addr_t hb_front_addr = hb_front_server_messenger->get_myaddr();
-  local_connection = hb_front_server_messenger->get_loopback_connection().get();
   if (hb_front_addr.is_blank_ip()) {
     int port = hb_front_addr.get_port();
     hb_front_addr = client_messenger->get_myaddr();
     hb_front_addr.set_port(port);
     hb_front_server_messenger->set_addr_unknowns(hb_front_addr);
     dout(10) << " assuming hb_front_addr ip matches client_addr" << dendl;
-  } else {
-    Session *s = static_cast<Session*>(local_connection->get_priv());
-    if (s)
-      s->put();
-    else
-      hb_front_server_messenger->ms_deliver_handle_fast_connect(local_connection);
   }
 
-  MOSDBoot *mboot = new MOSDBoot(superblock, service.get_boot_epoch(),
-                                 hb_back_addr, hb_front_addr, cluster_addr);
+  MOSDBoot *mboot = new MOSDBoot(superblock, boot_epoch, hb_back_addr, hb_front_addr, cluster_addr);
   dout(10) << " client_addr " << client_messenger->get_myaddr()
 	   << ", cluster_addr " << cluster_addr
 	   << ", hb_back_addr " << hb_back_addr
@@ -4600,10 +3821,6 @@ void OSD::_collect_metadata(map<string,string> *pm)
   (*pm)["hb_front_addr"] = stringify(hb_front_server_messenger->get_myaddr());
   (*pm)["hb_back_addr"] = stringify(hb_back_server_messenger->get_myaddr());
 
-  // backend
-  (*pm)["osd_objectstore"] = g_conf->osd_objectstore;
-  store->collect_metadata(pm);
-
   // kernel info
   struct utsname u;
   int r = uname(&u);
@@ -4700,6 +3917,73 @@ void OSD::send_alive()
   }
 }
 
+void OSDService::send_message_osd_cluster(int peer, Message *m, epoch_t from_epoch)
+{
+  Mutex::Locker l(pre_publish_lock);
+
+  // service map is always newer/newest
+  assert(from_epoch <= next_osdmap->get_epoch());
+
+  if (next_osdmap->is_down(peer) ||
+      next_osdmap->get_info(peer).up_from > from_epoch) {
+    m->put();
+    return;
+  }
+  const entity_inst_t& peer_inst = next_osdmap->get_cluster_inst(peer);
+  Connection *peer_con = osd->cluster_messenger->get_connection(peer_inst).get();
+  osd->_share_map_outgoing(peer, peer_con, next_osdmap);
+  osd->cluster_messenger->send_message(m, peer_inst);
+}
+
+ConnectionRef OSDService::get_con_osd_cluster(int peer, epoch_t from_epoch)
+{
+  Mutex::Locker l(pre_publish_lock);
+
+  // service map is always newer/newest
+  assert(from_epoch <= next_osdmap->get_epoch());
+
+  if (next_osdmap->is_down(peer) ||
+      next_osdmap->get_info(peer).up_from > from_epoch) {
+    return NULL;
+  }
+  return osd->cluster_messenger->get_connection(next_osdmap->get_cluster_inst(peer));
+}
+
+pair<ConnectionRef,ConnectionRef> OSDService::get_con_osd_hb(int peer, epoch_t from_epoch)
+{
+  Mutex::Locker l(pre_publish_lock);
+
+  // service map is always newer/newest
+  assert(from_epoch <= next_osdmap->get_epoch());
+
+  pair<ConnectionRef,ConnectionRef> ret;
+  if (next_osdmap->is_down(peer) ||
+      next_osdmap->get_info(peer).up_from > from_epoch) {
+    return ret;
+  }
+  ret.first = osd->hbclient_messenger->get_connection(next_osdmap->get_hb_back_inst(peer));
+  if (next_osdmap->get_hb_front_addr(peer) != entity_addr_t())
+    ret.second = osd->hbclient_messenger->get_connection(next_osdmap->get_hb_front_inst(peer));
+  return ret;
+}
+
+void OSDService::queue_want_pg_temp(pg_t pgid, vector<int>& want)
+{
+  Mutex::Locker l(pg_temp_lock);
+  pg_temp_wanted[pgid] = want;
+}
+
+void OSDService::send_pg_temp()
+{
+  Mutex::Locker l(pg_temp_lock);
+  if (pg_temp_wanted.empty())
+    return;
+  dout(10) << "send_pg_temp " << pg_temp_wanted << dendl;
+  MOSDPGTemp *m = new MOSDPGTemp(osdmap->get_epoch());
+  m->pg_temp = pg_temp_wanted;
+  monc->send_mon_message(m);
+}
+
 void OSD::send_failures()
 {
   assert(osd_lock.is_locked());
@@ -4733,7 +4017,9 @@ void OSD::send_pg_stats(const utime_t &now)
 
   dout(20) << "send_pg_stats" << dendl;
 
-  osd_stat_t cur_stat = service.get_osd_stat();
+  stat_lock.Lock();
+  osd_stat_t cur_stat = osd_stat;
+  stat_lock.Unlock();
 
   cur_stat.fs_perf_stat = store->get_cur_stats();
    
@@ -4871,7 +4157,7 @@ void OSD::handle_command(MCommand *m)
   ConnectionRef con = m->get_connection();
   Session *session = static_cast<Session *>(con->get_priv());
   if (!session) {
-    con->send_message(new MCommandReply(m, -EPERM));
+    client_messenger->send_message(new MCommandReply(m, -EPERM), con);
     m->put();
     return;
   }
@@ -4880,7 +4166,7 @@ void OSD::handle_command(MCommand *m)
   session->put();
 
   if (!caps.allow_all() || m->get_source().is_mon()) {
-    con->send_message(new MCommandReply(m, -EPERM));
+    client_messenger->send_message(new MCommandReply(m, -EPERM), con);
     m->put();
     return;
   }
@@ -5080,7 +4366,7 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
 
 	  // send them the latest diff to ensure they realize the mapping
 	  // has changed.
-	  service.send_incremental_map(osdmap->get_epoch() - 1, con, osdmap);
+	  send_incremental_map(osdmap->get_epoch() - 1, con);
 
 	  // do not reply; they will get newer maps and realize they
 	  // need to resend.
@@ -5136,11 +4422,6 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
       // However, to avoid the osd from getting hung on this and having
       // timers being triggered, we are going to limit the count assuming
       // a configurable throughput and duration.
-      // NOTE: max_count is the total amount of bytes that we believe we
-      //       will be able to write during 'duration' for the given
-      //       throughput.  The block size hardly impacts this unless it's
-      //       way too big.  Given we already check how big the block size
-      //       is, it's safe to assume everything will check out.
       int64_t max_count =
         g_conf->osd_bench_large_size_max_throughput * duration;
       if (count > max_count) {
@@ -5174,9 +4455,9 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
       object_t oid(nm);
       hobject_t soid(sobject_t(oid, 0));
       ObjectStore::Transaction *t = new ObjectStore::Transaction;
-      t->write(META_COLL, soid, 0, bsize, bl);
+      t->write(coll_t::META_COLL, soid, 0, bsize, bl);
       store->queue_transaction_and_cleanup(NULL, t);
-      cleanupt->remove(META_COLL, soid);
+      cleanupt->remove(coll_t::META_COLL, soid);
     }
     store->sync_and_flush();
     utime_t end = ceph_clock_now(cct);
@@ -5228,7 +4509,6 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
     }
 
     std::set <spg_t> keys;
-    RWLock::RLocker l(pg_map_lock);
     for (ceph::unordered_map<spg_t, PG*>::const_iterator pg_map_e = pg_map.begin();
 	 pg_map_e != pg_map.end(); ++pg_map_e) {
       keys.insert(pg_map_e->first);
@@ -5317,18 +4597,136 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
   rs = ss.str();
   odata.append(ds);
   dout(0) << "do_command r=" << r << " " << rs << dendl;
-  clog->info() << rs << "\n";
+  clog.info() << rs << "\n";
   if (con) {
     MCommandReply *reply = new MCommandReply(r, rs);
     reply->set_tid(tid);
     reply->set_data(odata);
-    con->send_message(reply);
+    client_messenger->send_message(reply, con);
   }
   return;
 }
 
 
 
+// --------------------------------------
+// dispatch
+
+epoch_t OSD::get_peer_epoch(int peer)
+{
+  Mutex::Locker l(peer_map_epoch_lock);
+  map<int,epoch_t>::iterator p = peer_map_epoch.find(peer);
+  if (p == peer_map_epoch.end())
+    return 0;
+  return p->second;
+}
+
+epoch_t OSD::note_peer_epoch(int peer, epoch_t e)
+{
+  Mutex::Locker l(peer_map_epoch_lock);
+  map<int,epoch_t>::iterator p = peer_map_epoch.find(peer);
+  if (p != peer_map_epoch.end()) {
+    if (p->second < e) {
+      dout(10) << "note_peer_epoch osd." << peer << " has " << e << dendl;
+      p->second = e;
+    } else {
+      dout(30) << "note_peer_epoch osd." << peer << " has " << p->second << " >= " << e << dendl;
+    }
+    return p->second;
+  } else {
+    dout(10) << "note_peer_epoch osd." << peer << " now has " << e << dendl;
+    peer_map_epoch[peer] = e;
+    return e;
+  }
+}
+ 
+void OSD::forget_peer_epoch(int peer, epoch_t as_of) 
+{
+  Mutex::Locker l(peer_map_epoch_lock);
+  map<int,epoch_t>::iterator p = peer_map_epoch.find(peer);
+  if (p != peer_map_epoch.end()) {
+    if (p->second <= as_of) {
+      dout(10) << "forget_peer_epoch osd." << peer << " as_of " << as_of
+	       << " had " << p->second << dendl;
+      peer_map_epoch.erase(p);
+    } else {
+      dout(10) << "forget_peer_epoch osd." << peer << " as_of " << as_of
+	       << " has " << p->second << " - not forgetting" << dendl;
+    }
+  }
+}
+
+
+bool OSD::_share_map_incoming(entity_name_t name, Connection *con, epoch_t epoch, Session* session)
+{
+  bool shared = false;
+  dout(20) << "_share_map_incoming " << name << " " << con->get_peer_addr() << " " << epoch << dendl;
+  //assert(osd_lock.is_locked());
+
+  assert(is_active());
+
+  // does client have old map?
+  if (name.is_client()) {
+    bool sendmap = epoch < osdmap->get_epoch();
+    if (sendmap && session) {
+      if (session->last_sent_epoch < osdmap->get_epoch()) {
+	session->last_sent_epoch = osdmap->get_epoch();
+      } else {
+	sendmap = false; //we don't need to send it out again
+	dout(15) << name << " already sent incremental to update from epoch "<< epoch << dendl;
+      }
+    }
+    if (sendmap) {
+      dout(10) << name << " has old map " << epoch << " < " << osdmap->get_epoch() << dendl;
+      send_incremental_map(epoch, con);
+      shared = true;
+    }
+  }
+
+  // does peer have old map?
+  if (con->get_messenger() == cluster_messenger &&
+      osdmap->is_up(name.num()) &&
+      (osdmap->get_cluster_addr(name.num()) == con->get_peer_addr() ||
+       osdmap->get_hb_back_addr(name.num()) == con->get_peer_addr())) {
+    // remember
+    epoch_t has = note_peer_epoch(name.num(), epoch);
+
+    // share?
+    if (has < osdmap->get_epoch()) {
+      dout(10) << name << " " << con->get_peer_addr() << " has old map " << epoch << " < " << osdmap->get_epoch() << dendl;
+      note_peer_epoch(name.num(), osdmap->get_epoch());
+      send_incremental_map(epoch, con);
+      shared = true;
+    }
+  }
+
+  if (session)
+    session->put();
+  return shared;
+}
+
+
+void OSD::_share_map_outgoing(int peer, Connection *con, OSDMapRef map)
+{
+  if (!map)
+    map = service.get_osdmap();
+
+  // send map?
+  epoch_t pe = get_peer_epoch(peer);
+  if (pe) {
+    if (pe < map->get_epoch()) {
+      send_incremental_map(pe, con);
+      note_peer_epoch(peer, map->get_epoch());
+    } else
+      dout(20) << "_share_map_outgoing " << con << " already has epoch " << pe << dendl;
+  } else {
+    dout(20) << "_share_map_outgoing " << con << " don't know epoch, doing nothing" << dendl;
+    // no idea about peer's epoch.
+    // ??? send recent ???
+    // do nothing.
+  }
+}
+
 
 bool OSD::heartbeat_dispatch(Message *m)
 {
@@ -5347,7 +4745,7 @@ bool OSD::heartbeat_dispatch(Message *m)
   case CEPH_MSG_OSD_MAP:
     {
       ConnectionRef self = cluster_messenger->get_loopback_connection();
-      self->send_message(m);
+      cluster_messenger->send_message(m, self);
     }
     break;
 
@@ -5359,6 +4757,37 @@ bool OSD::heartbeat_dispatch(Message *m)
   return true;
 }
 
+bool OSDService::ObjecterDispatcher::ms_dispatch(Message *m)
+{
+  Mutex::Locker l(osd->objecter_lock);
+  osd->objecter->dispatch(m);
+  return true;
+}
+
+bool OSDService::ObjecterDispatcher::ms_handle_reset(Connection *con)
+{
+  Mutex::Locker l(osd->objecter_lock);
+  osd->objecter->ms_handle_reset(con);
+  return true;
+}
+
+void OSDService::ObjecterDispatcher::ms_handle_connect(Connection *con)
+{
+  Mutex::Locker l(osd->objecter_lock);
+  return osd->objecter->ms_handle_connect(con);
+}
+
+bool OSDService::ObjecterDispatcher::ms_get_authorizer(int dest_type,
+						       AuthAuthorizer **authorizer,
+						       bool force_new)
+{
+  if (dest_type == CEPH_ENTITY_TYPE_MON)
+    return true;
+  *authorizer = osd->monc->auth->build_authorizer(dest_type);
+  return *authorizer != NULL;
+}
+
+
 bool OSD::ms_dispatch(Message *m)
 {
   if (m->get_type() == MSG_OSD_MARK_ME_DOWN) {
@@ -5394,141 +4823,6 @@ bool OSD::ms_dispatch(Message *m)
   return true;
 }
 
-void OSD::dispatch_session_waiting(Session *session, OSDMapRef osdmap)
-{
-  assert(session->session_dispatch_lock.is_locked());
-  assert(session->osdmap == osdmap);
-  for (list<OpRequestRef>::iterator i = session->waiting_on_map.begin();
-       i != session->waiting_on_map.end() && dispatch_op_fast(*i, osdmap);
-       session->waiting_on_map.erase(i++));
-
-  if (session->waiting_on_map.empty()) {
-    clear_session_waiting_on_map(session);
-  } else {
-    register_session_waiting_on_map(session);
-  }
-}
-
-
-void OSD::update_waiting_for_pg(Session *session, OSDMapRef newmap)
-{
-  assert(session->session_dispatch_lock.is_locked());
-  if (!session->osdmap) {
-    session->osdmap = newmap;
-    return;
-  }
-
-  if (newmap->get_epoch() == session->osdmap->get_epoch())
-    return;
-
-  assert(newmap->get_epoch() > session->osdmap->get_epoch());
-
-  map<spg_t, list<OpRequestRef> > from;
-  from.swap(session->waiting_for_pg);
-
-  for (map<spg_t, list<OpRequestRef> >::iterator i = from.begin();
-       i != from.end();
-       from.erase(i++)) {
-    set<spg_t> children;
-    if (!newmap->have_pg_pool(i->first.pool())) {
-      // drop this wait list on the ground
-      i->second.clear();
-    } else {
-      assert(session->osdmap->have_pg_pool(i->first.pool()));
-      if (i->first.is_split(
-	    session->osdmap->get_pg_num(i->first.pool()),
-	    newmap->get_pg_num(i->first.pool()),
-	    &children)) {
-	for (set<spg_t>::iterator child = children.begin();
-	     child != children.end();
-	     ++child) {
-	  unsigned split_bits = child->get_split_bits(
-	    newmap->get_pg_num(child->pool()));
-	  list<OpRequestRef> child_ops;
-	  OSD::split_list(&i->second, &child_ops, child->ps(), split_bits);
-	  if (!child_ops.empty()) {
-	    session->waiting_for_pg[*child].swap(child_ops);
-	    register_session_waiting_on_pg(session, *child);
-	  }
-	}
-      }
-    }
-    if (i->second.empty()) {
-      clear_session_waiting_on_pg(session, i->first);
-    } else {
-      session->waiting_for_pg[i->first].swap(i->second);
-    }
-  }
-
-  session->osdmap = newmap;
-}
-
-void OSD::session_notify_pg_create(
-  Session *session, OSDMapRef osdmap, spg_t pgid)
-{
-  assert(session->session_dispatch_lock.is_locked());
-  update_waiting_for_pg(session, osdmap);
-  map<spg_t, list<OpRequestRef> >::iterator i =
-    session->waiting_for_pg.find(pgid);
-  if (i != session->waiting_for_pg.end()) {
-    session->waiting_on_map.splice(
-      session->waiting_on_map.begin(),
-      i->second);
-    session->waiting_for_pg.erase(i);
-  }
-  clear_session_waiting_on_pg(session, pgid);
-}
-
-void OSD::session_notify_pg_cleared(
-  Session *session, OSDMapRef osdmap, spg_t pgid)
-{
-  assert(session->session_dispatch_lock.is_locked());
-  update_waiting_for_pg(session, osdmap);
-  session->waiting_for_pg.erase(pgid);
-  clear_session_waiting_on_pg(session, pgid);
-}
-
-void OSD::ms_fast_dispatch(Message *m)
-{
-  if (service.is_stopping()) {
-    m->put();
-    return;
-  }
-  OpRequestRef op = op_tracker.create_request<OpRequest>(m);
-  {
-#ifdef WITH_LTTNG
-    osd_reqid_t reqid = op->get_reqid();
-#endif
-    tracepoint(osd, ms_fast_dispatch, reqid.name._type,
-        reqid.name._num, reqid.tid, reqid.inc);
-  }
-  OSDMapRef nextmap = service.get_nextmap_reserved();
-  Session *session = static_cast<Session*>(m->get_connection()->get_priv());
-  assert(session);
-  {
-    Mutex::Locker l(session->session_dispatch_lock);
-    update_waiting_for_pg(session, nextmap);
-    session->waiting_on_map.push_back(op);
-    dispatch_session_waiting(session, nextmap);
-  }
-  session->put();
-  service.release_map(nextmap);
-}
-
-void OSD::ms_fast_preprocess(Message *m)
-{
-  if (m->get_connection()->get_peer_type() == CEPH_ENTITY_TYPE_OSD) {
-    if (m->get_type() == CEPH_MSG_OSD_MAP) {
-      MOSDMap *mm = static_cast<MOSDMap*>(m);
-      Session *s = static_cast<Session*>(m->get_connection()->get_priv());
-      s->received_map_lock.Lock();
-      s->received_map_epoch = mm->get_last();
-      s->received_map_lock.Unlock();
-      s->put();
-    }
-  }
-}
-
 bool OSD::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new)
 {
   dout(10) << "OSD::ms_get_authorizer type=" << ceph_entity_type_name(dest_type) << dendl;
@@ -5582,7 +4876,7 @@ bool OSD::ms_verify_authorizer(Connection *con, int peer_type,
   if (isvalid) {
     Session *s = static_cast<Session *>(con->get_priv());
     if (!s) {
-      s = new Session(cct);
+      s = new Session;
       con->set_priv(s->get());
       s->con = con;
       dout(10) << " new session " << s << " con=" << s->con << " addr=" << s->con->get_peer_addr() << dendl;
@@ -5611,7 +4905,8 @@ bool OSD::ms_verify_authorizer(Connection *con, int peer_type,
     s->put();
   }
   return true;
-}
+};
+
 
 void OSD::do_waiters()
 {
@@ -5630,54 +4925,6 @@ void OSD::do_waiters()
   dout(10) << "do_waiters -- finish" << dendl;
 }
 
-template<typename T, int MSGTYPE>
-epoch_t replica_op_required_epoch(OpRequestRef op)
-{
-  T *m = static_cast<T *>(op->get_req());
-  assert(m->get_header().type == MSGTYPE);
-  return m->map_epoch;
-}
-
-epoch_t op_required_epoch(OpRequestRef op)
-{
-  switch (op->get_req()->get_type()) {
-  case CEPH_MSG_OSD_OP: {
-    MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
-    return m->get_map_epoch();
-  }
-  case MSG_OSD_SUBOP:
-    return replica_op_required_epoch<MOSDSubOp, MSG_OSD_SUBOP>(op);
-  case MSG_OSD_SUBOPREPLY:
-    return replica_op_required_epoch<MOSDSubOpReply, MSG_OSD_SUBOPREPLY>(
-      op);
-  case MSG_OSD_PG_PUSH:
-    return replica_op_required_epoch<MOSDPGPush, MSG_OSD_PG_PUSH>(
-      op);
-  case MSG_OSD_PG_PULL:
-    return replica_op_required_epoch<MOSDPGPull, MSG_OSD_PG_PULL>(
-      op);
-  case MSG_OSD_PG_PUSH_REPLY:
-    return replica_op_required_epoch<MOSDPGPushReply, MSG_OSD_PG_PUSH_REPLY>(
-      op);
-  case MSG_OSD_PG_SCAN:
-    return replica_op_required_epoch<MOSDPGScan, MSG_OSD_PG_SCAN>(op);
-  case MSG_OSD_PG_BACKFILL:
-    return replica_op_required_epoch<MOSDPGBackfill, MSG_OSD_PG_BACKFILL>(
-      op);
-  case MSG_OSD_EC_WRITE:
-    return replica_op_required_epoch<MOSDECSubOpWrite, MSG_OSD_EC_WRITE>(op);
-  case MSG_OSD_EC_WRITE_REPLY:
-    return replica_op_required_epoch<MOSDECSubOpWriteReply, MSG_OSD_EC_WRITE_REPLY>(op);
-  case MSG_OSD_EC_READ:
-    return replica_op_required_epoch<MOSDECSubOpRead, MSG_OSD_EC_READ>(op);
-  case MSG_OSD_EC_READ_REPLY:
-    return replica_op_required_epoch<MOSDECSubOpReadReply, MSG_OSD_EC_READ_REPLY>(op);
-  default:
-    assert(0);
-    return 0;
-  }
-}
-
 void OSD::dispatch_op(OpRequestRef op)
 {
   switch (op->get_req()->get_type()) {
@@ -5708,6 +4955,12 @@ void OSD::dispatch_op(OpRequestRef op)
     assert(0 ==
 	   "received MOSDPGMissing; this message is supposed to be unused!?!");
     break;
+  case MSG_OSD_PG_SCAN:
+    handle_pg_scan(op);
+    break;
+  case MSG_OSD_PG_BACKFILL:
+    handle_pg_backfill(op);
+    break;
 
   case MSG_OSD_BACKFILL_RESERVE:
     handle_pg_backfill_reserve(op);
@@ -5715,79 +4968,48 @@ void OSD::dispatch_op(OpRequestRef op)
   case MSG_OSD_RECOVERY_RESERVE:
     handle_pg_recovery_reserve(op);
     break;
-  }
-}
-
-bool OSD::dispatch_op_fast(OpRequestRef& op, OSDMapRef& osdmap)
-{
-  if (is_stopping()) {
-    // we're shutting down, so drop the op
-    return true;
-  }
-
-  epoch_t msg_epoch(op_required_epoch(op));
-  if (msg_epoch > osdmap->get_epoch()) {
-    Session *s = static_cast<Session*>(op->get_req()->
-				       get_connection()->get_priv());
-    s->received_map_lock.Lock();
-    epoch_t received_epoch = s->received_map_epoch;
-    s->received_map_lock.Unlock();
-    if (received_epoch < msg_epoch) {
-      osdmap_subscribe(msg_epoch, false);
-    }
-    s->put();
-    return false;
-  }
 
-  switch(op->get_req()->get_type()) {
-  // client ops
+    // client ops
   case CEPH_MSG_OSD_OP:
-    handle_op(op, osdmap);
+    handle_op(op);
     break;
+
     // for replication etc.
   case MSG_OSD_SUBOP:
-    handle_replica_op<MOSDSubOp, MSG_OSD_SUBOP>(op, osdmap);
+    handle_replica_op<MOSDSubOp, MSG_OSD_SUBOP>(op);
     break;
   case MSG_OSD_SUBOPREPLY:
-    handle_replica_op<MOSDSubOpReply, MSG_OSD_SUBOPREPLY>(op, osdmap);
+    handle_replica_op<MOSDSubOpReply, MSG_OSD_SUBOPREPLY>(op);
     break;
   case MSG_OSD_PG_PUSH:
-    handle_replica_op<MOSDPGPush, MSG_OSD_PG_PUSH>(op, osdmap);
+    handle_replica_op<MOSDPGPush, MSG_OSD_PG_PUSH>(op);
     break;
   case MSG_OSD_PG_PULL:
-    handle_replica_op<MOSDPGPull, MSG_OSD_PG_PULL>(op, osdmap);
+    handle_replica_op<MOSDPGPull, MSG_OSD_PG_PULL>(op);
     break;
   case MSG_OSD_PG_PUSH_REPLY:
-    handle_replica_op<MOSDPGPushReply, MSG_OSD_PG_PUSH_REPLY>(op, osdmap);
-    break;
-  case MSG_OSD_PG_SCAN:
-    handle_replica_op<MOSDPGScan, MSG_OSD_PG_SCAN>(op, osdmap);
-    break;
-  case MSG_OSD_PG_BACKFILL:
-    handle_replica_op<MOSDPGBackfill, MSG_OSD_PG_BACKFILL>(op, osdmap);
+    handle_replica_op<MOSDPGPushReply, MSG_OSD_PG_PUSH_REPLY>(op);
     break;
   case MSG_OSD_EC_WRITE:
-    handle_replica_op<MOSDECSubOpWrite, MSG_OSD_EC_WRITE>(op, osdmap);
+    handle_replica_op<MOSDECSubOpWrite, MSG_OSD_EC_WRITE>(op);
     break;
   case MSG_OSD_EC_WRITE_REPLY:
-    handle_replica_op<MOSDECSubOpWriteReply, MSG_OSD_EC_WRITE_REPLY>(op, osdmap);
+    handle_replica_op<MOSDECSubOpWriteReply, MSG_OSD_EC_WRITE_REPLY>(op);
     break;
   case MSG_OSD_EC_READ:
-    handle_replica_op<MOSDECSubOpRead, MSG_OSD_EC_READ>(op, osdmap);
+    handle_replica_op<MOSDECSubOpRead, MSG_OSD_EC_READ>(op);
     break;
   case MSG_OSD_EC_READ_REPLY:
-    handle_replica_op<MOSDECSubOpReadReply, MSG_OSD_EC_READ_REPLY>(op, osdmap);
+    handle_replica_op<MOSDECSubOpReadReply, MSG_OSD_EC_READ_REPLY>(op);
     break;
-  default:
-    assert(0);
   }
-  return true;
 }
 
 void OSD::_dispatch(Message *m)
 {
   assert(osd_lock.is_locked());
   dout(20) << "_dispatch " << m << " " << *m << dendl;
+  Session *session = NULL;
 
   logger->set(l_osd_buf, buffer::get_total_alloc());
 
@@ -5807,6 +5029,19 @@ void OSD::_dispatch(Message *m)
     break;
 
     // osd
+  case CEPH_MSG_SHUTDOWN:
+    session = static_cast<Session *>(m->get_connection()->get_priv());
+    if (!session ||
+	session->entity_name.is_mon() ||
+	session->entity_name.is_osd())
+      shutdown();
+    else dout(0) << "shutdown message from connection with insufficient privs!"
+		 << m->get_connection() << dendl;
+    m->put();
+    if (session)
+      session->put();
+    break;
+
   case MSG_PGSTATSACK:
     handle_pg_stats_ack(static_cast<MPGStatsAck*>(m));
     break;
@@ -5830,7 +5065,7 @@ void OSD::_dispatch(Message *m)
 
   default:
     {
-      OpRequestRef op = op_tracker.create_request<OpRequest, Message*>(m);
+      OpRequestRef op = op_tracker.create_request<OpRequest>(m);
       op->mark_event("waiting_for_osdmap");
       // no map?  starting up?
       if (!osdmap) {
@@ -5865,7 +5100,6 @@ void OSD::handle_scrub(MOSDScrub *m)
     return;
   }
 
-  RWLock::RLocker l(pg_map_lock);
   if (m->scrub_pgs.empty()) {
     for (ceph::unordered_map<spg_t, PG*>::iterator p = pg_map.begin();
 	 p != pg_map.end();
@@ -5931,69 +5165,159 @@ bool OSD::scrub_should_schedule()
 	     << " = no, load too high" << dendl;
     return false;
   }
-
-  dout(20) << "scrub_should_schedule loadavg " << loadavgs[0]
-	   << " < max " << cct->_conf->osd_scrub_load_threshold
-	   << " = yes" << dendl;
-  return loadavgs[0] < cct->_conf->osd_scrub_load_threshold;
+
+  dout(20) << "scrub_should_schedule loadavg " << loadavgs[0]
+	   << " < max " << cct->_conf->osd_scrub_load_threshold
+	   << " = yes" << dendl;
+  return loadavgs[0] < cct->_conf->osd_scrub_load_threshold;
+}
+
+void OSD::sched_scrub()
+{
+  assert(osd_lock.is_locked());
+
+  bool load_is_low = scrub_should_schedule();
+
+  dout(20) << "sched_scrub load_is_low=" << (int)load_is_low << dendl;
+
+  utime_t now = ceph_clock_now(cct);
+  
+  //dout(20) << " " << last_scrub_pg << dendl;
+
+  pair<utime_t, spg_t> pos;
+  if (service.first_scrub_stamp(&pos)) {
+    do {
+      utime_t t = pos.first;
+      spg_t pgid = pos.second;
+      dout(30) << "sched_scrub examine " << pgid << " at " << t << dendl;
+
+      utime_t diff = now - t;
+      if ((double)diff < cct->_conf->osd_scrub_min_interval) {
+	dout(10) << "sched_scrub " << pgid << " at " << t
+		 << ": " << (double)diff << " < min (" << cct->_conf->osd_scrub_min_interval << " seconds)" << dendl;
+	break;
+      }
+      if ((double)diff < cct->_conf->osd_scrub_max_interval && !load_is_low) {
+	// save ourselves some effort
+	dout(10) << "sched_scrub " << pgid << " high load at " << t
+		 << ": " << (double)diff << " < max (" << cct->_conf->osd_scrub_max_interval << " seconds)" << dendl;
+	break;
+      }
+
+      PG *pg = _lookup_lock_pg(pgid);
+      if (pg) {
+	if (pg->get_pgbackend()->scrub_supported() && pg->is_active() &&
+	    (load_is_low ||
+	     (double)diff >= cct->_conf->osd_scrub_max_interval ||
+	     pg->scrubber.must_scrub)) {
+	  dout(10) << "sched_scrub scrubbing " << pgid << " at " << t
+		   << (pg->scrubber.must_scrub ? ", explicitly requested" :
+		   ( (double)diff >= cct->_conf->osd_scrub_max_interval ? ", diff >= max" : ""))
+		   << dendl;
+	  if (pg->sched_scrub()) {
+	    pg->unlock();
+	    break;
+	  }
+	}
+	pg->unlock();
+      }
+    } while  (service.next_scrub_stamp(pos, &pos));
+  }    
+  dout(20) << "sched_scrub done" << dendl;
+}
+
+bool OSDService::inc_scrubs_pending()
+{
+  bool result = false;
+
+  sched_scrub_lock.Lock();
+  if (scrubs_pending + scrubs_active < cct->_conf->osd_max_scrubs) {
+    dout(20) << "inc_scrubs_pending " << scrubs_pending << " -> " << (scrubs_pending+1)
+	     << " (max " << cct->_conf->osd_max_scrubs << ", active " << scrubs_active << ")" << dendl;
+    result = true;
+    ++scrubs_pending;
+  } else {
+    dout(20) << "inc_scrubs_pending " << scrubs_pending << " + " << scrubs_active << " active >= max " << cct->_conf->osd_max_scrubs << dendl;
+  }
+  sched_scrub_lock.Unlock();
+
+  return result;
+}
+
+void OSDService::dec_scrubs_pending()
+{
+  sched_scrub_lock.Lock();
+  dout(20) << "dec_scrubs_pending " << scrubs_pending << " -> " << (scrubs_pending-1)
+	   << " (max " << cct->_conf->osd_max_scrubs << ", active " << scrubs_active << ")" << dendl;
+  --scrubs_pending;
+  assert(scrubs_pending >= 0);
+  sched_scrub_lock.Unlock();
+}
+
+void OSDService::inc_scrubs_active(bool reserved)
+{
+  sched_scrub_lock.Lock();
+  ++(scrubs_active);
+  if (reserved) {
+    --(scrubs_pending);
+    dout(20) << "inc_scrubs_active " << (scrubs_active-1) << " -> " << scrubs_active
+	     << " (max " << cct->_conf->osd_max_scrubs
+	     << ", pending " << (scrubs_pending+1) << " -> " << scrubs_pending << ")" << dendl;
+    assert(scrubs_pending >= 0);
+  } else {
+    dout(20) << "inc_scrubs_active " << (scrubs_active-1) << " -> " << scrubs_active
+	     << " (max " << cct->_conf->osd_max_scrubs
+	     << ", pending " << scrubs_pending << ")" << dendl;
+  }
+  sched_scrub_lock.Unlock();
+}
+
+void OSDService::dec_scrubs_active()
+{
+  sched_scrub_lock.Lock();
+  dout(20) << "dec_scrubs_active " << scrubs_active << " -> " << (scrubs_active-1)
+	   << " (max " << cct->_conf->osd_max_scrubs << ", pending " << scrubs_pending << ")" << dendl;
+  --scrubs_active;
+  sched_scrub_lock.Unlock();
+}
+
+bool OSDService::prepare_to_stop()
+{
+  Mutex::Locker l(is_stopping_lock);
+  if (state != NOT_STOPPING)
+    return false;
+
+  OSDMapRef osdmap = get_osdmap();
+  if (osdmap && osdmap->is_up(whoami)) {
+    dout(0) << __func__ << " telling mon we are shutting down" << dendl;
+    state = PREPARING_TO_STOP;
+    monc->send_mon_message(new MOSDMarkMeDown(monc->get_fsid(),
+					      osdmap->get_inst(whoami),
+					      osdmap->get_epoch(),
+					      false
+					      ));
+    utime_t now = ceph_clock_now(cct);
+    utime_t timeout;
+    timeout.set_from_double(now + cct->_conf->osd_mon_shutdown_timeout);
+    while ((ceph_clock_now(cct) < timeout) &&
+	   (state != STOPPING)) {
+      is_stopping_cond.WaitUntil(is_stopping_lock, timeout);
+    }
+  }
+  dout(0) << __func__ << " starting shutdown" << dendl;
+  state = STOPPING;
+  return true;
 }
 
-void OSD::sched_scrub()
+void OSDService::got_stop_ack()
 {
-  assert(osd_lock.is_locked());
-
-  bool load_is_low = scrub_should_schedule();
-
-  dout(20) << "sched_scrub load_is_low=" << (int)load_is_low << dendl;
-
-  utime_t now = ceph_clock_now(cct);
-  
-  //dout(20) << " " << last_scrub_pg << dendl;
-
-  pair<utime_t, spg_t> pos;
-  if (service.first_scrub_stamp(&pos)) {
-    do {
-      utime_t t = pos.first;
-      spg_t pgid = pos.second;
-      dout(30) << "sched_scrub examine " << pgid << " at " << t << dendl;
-
-      utime_t diff = now - t;
-      if ((double)diff < cct->_conf->osd_scrub_min_interval) {
-	dout(10) << "sched_scrub " << pgid << " at " << t
-		 << ": " << (double)diff << " < min (" << cct->_conf->osd_scrub_min_interval << " seconds)" << dendl;
-	break;
-      }
-      if ((double)diff < cct->_conf->osd_scrub_max_interval && !load_is_low) {
-	// save ourselves some effort
-	dout(10) << "sched_scrub " << pgid << " high load at " << t
-		 << ": " << (double)diff << " < max (" << cct->_conf->osd_scrub_max_interval << " seconds)" << dendl;
-	break;
-      }
-
-      PG *pg = _lookup_lock_pg(pgid);
-      if (pg) {
-	if (pg->get_pgbackend()->scrub_supported() && pg->is_active() &&
-	    (load_is_low ||
-	     (double)diff >= cct->_conf->osd_scrub_max_interval ||
-	     pg->scrubber.must_scrub)) {
-	  dout(10) << "sched_scrub scrubbing " << pgid << " at " << t
-		   << (pg->scrubber.must_scrub ? ", explicitly requested" :
-		   ( (double)diff >= cct->_conf->osd_scrub_max_interval ? ", diff >= max" : ""))
-		   << dendl;
-	  if (pg->sched_scrub()) {
-	    pg->unlock();
-	    break;
-	  }
-	}
-	pg->unlock();
-      }
-    } while  (service.next_scrub_stamp(pos, &pos));
-  }    
-  dout(20) << "sched_scrub done" << dendl;
+  Mutex::Locker l(is_stopping_lock);
+  dout(0) << __func__ << " starting shutdown" << dendl;
+  state = STOPPING;
+  is_stopping_cond.Signal();
 }
 
 
-
 // =====================================================
 // MAP
 
@@ -6024,9 +5348,9 @@ void OSD::note_down_osd(int peer)
   failure_pending.erase(peer);
   map<int,HeartbeatInfo>::iterator p = heartbeat_peers.find(peer);
   if (p != heartbeat_peers.end()) {
-    p->second.con_back->mark_down();
+    hbclient_messenger->mark_down(p->second.con_back);
     if (p->second.con_front) {
-      p->second.con_front->mark_down();
+      hbclient_messenger->mark_down(p->second.con_front);
     }
     heartbeat_peers.erase(p);
   }
@@ -6035,7 +5359,7 @@ void OSD::note_down_osd(int peer)
 
 void OSD::note_up_osd(int peer)
 {
-  service.forget_peer_epoch(peer, osdmap->get_epoch() - 1);
+  forget_peer_epoch(peer, osdmap->get_epoch() - 1);
 }
 
 struct C_OnMapApply : public Context {
@@ -6083,8 +5407,6 @@ void OSD::handle_osd_map(MOSDMap *m)
   Session *session = static_cast<Session *>(m->get_connection()->get_priv());
   if (session && !(session->entity_name.is_mon() || session->entity_name.is_osd())) {
     //not enough perms!
-    dout(10) << "got osd map from Session " << session
-             << " which we can't take maps from (not a mon or osd)" << dendl;
     m->put();
     session->put();
     return;
@@ -6093,7 +5415,11 @@ void OSD::handle_osd_map(MOSDMap *m)
     session->put();
 
   // share with the objecter
-  service.objecter->handle_osd_map(m);
+  {
+    Mutex::Locker l(service.objecter_lock);
+    m->get();
+    service.objecter->handle_osd_map(m);
+  }
 
   epoch_t first = m->get_first();
   epoch_t last = m->get_last();
@@ -6156,11 +5482,11 @@ void OSD::handle_osd_map(MOSDMap *m)
       o->decode(bl);
       if (o->test_flag(CEPH_OSDMAP_FULL))
 	last_marked_full = e;
+      pinned_maps.push_back(add_map(o));
 
       hobject_t fulloid = get_osdmap_pobject_name(e);
-      t.write(META_COLL, fulloid, 0, bl.length(), bl);
+      t.write(coll_t::META_COLL, fulloid, 0, bl.length(), bl);
       pin_map_bl(e, bl);
-      pinned_maps.push_back(add_map(o));
       continue;
     }
 
@@ -6169,7 +5495,7 @@ void OSD::handle_osd_map(MOSDMap *m)
       dout(10) << "handle_osd_map  got inc map for epoch " << e << dendl;
       bufferlist& bl = p->second;
       hobject_t oid = get_inc_osdmap_pobject_name(e);
-      t.write(META_COLL, oid, 0, bl.length(), bl);
+      t.write(coll_t::META_COLL, oid, 0, bl.length(), bl);
       pin_map_inc_bl(e, bl);
 
       OSDMap *o = new OSDMap;
@@ -6190,14 +5516,14 @@ void OSD::handle_osd_map(MOSDMap *m)
 
       if (o->test_flag(CEPH_OSDMAP_FULL))
 	last_marked_full = e;
+      pinned_maps.push_back(add_map(o));
 
       bufferlist fbl;
       o->encode(fbl);
 
       hobject_t fulloid = get_osdmap_pobject_name(e);
-      t.write(META_COLL, fulloid, 0, fbl.length(), fbl);
+      t.write(coll_t::META_COLL, fulloid, 0, fbl.length(), fbl);
       pin_map_bl(e, fbl);
-      pinned_maps.push_back(add_map(o));
       continue;
     }
 
@@ -6211,8 +5537,8 @@ void OSD::handle_osd_map(MOSDMap *m)
 	  service.map_cache.cached_key_lower_bound()));
     for (epoch_t e = superblock.oldest_map; e < min; ++e) {
       dout(20) << " removing old osdmap epoch " << e << dendl;
-      t.remove(META_COLL, get_osdmap_pobject_name(e));
-      t.remove(META_COLL, get_inc_osdmap_pobject_name(e));
+      t.remove(coll_t::META_COLL, get_osdmap_pobject_name(e));
+      t.remove(coll_t::META_COLL, get_inc_osdmap_pobject_name(e));
       superblock.oldest_map = e+1;
       num++;
       if (num >= cct->_conf->osd_target_transaction_size &&
@@ -6243,17 +5569,12 @@ void OSD::handle_osd_map(MOSDMap *m)
     service.pre_publish_map(newmap);
 
     // kill connections to newly down osds
-    bool waited_for_reservations = false;
     set<int> old;
     osdmap->get_all_osds(old);
     for (set<int>::iterator p = old.begin(); p != old.end(); ++p) {
       if (*p != whoami &&
 	  osdmap->have_inst(*p) &&                        // in old map
 	  (!newmap->exists(*p) || !newmap->is_up(*p))) {  // but not the new one
-        if (!waited_for_reservations) {
-          service.await_reserved_maps();
-          waited_for_reservations = true;
-        }
 	note_down_osd(*p);
       }
     }
@@ -6265,14 +5586,13 @@ void OSD::handle_osd_map(MOSDMap *m)
     had_map_since = ceph_clock_now(cct);
   }
 
-  epoch_t _bind_epoch = service.get_bind_epoch();
   if (osdmap->is_up(whoami) &&
       osdmap->get_addr(whoami) == client_messenger->get_myaddr() &&
-      _bind_epoch < osdmap->get_up_from(whoami)) {
+      bind_epoch < osdmap->get_up_from(whoami)) {
 
     if (is_booting()) {
       dout(1) << "state: booting -> active" << dendl;
-      set_state(STATE_ACTIVE);
+      state = STATE_ACTIVE;
 
       // set incarnation so that osd_reqid_t's we generate for our
       // objecter requests are unique across restarts.
@@ -6283,7 +5603,7 @@ void OSD::handle_osd_map(MOSDMap *m)
   bool do_shutdown = false;
   bool do_restart = false;
   if (osdmap->get_epoch() > 0 &&
-      is_active()) {
+      state == STATE_ACTIVE) {
     if (!osdmap->exists(whoami)) {
       dout(0) << "map says i do not exist.  shutting down." << dendl;
       do_shutdown = true;   // don't call shutdown() while we have everything paused
@@ -6297,33 +5617,32 @@ void OSD::handle_osd_map(MOSDMap *m)
 	if (service.is_preparing_to_stop() || service.is_stopping()) {
 	  service.got_stop_ack();
 	} else {
-	  clog->warn() << "map e" << osdmap->get_epoch()
+	  clog.warn() << "map e" << osdmap->get_epoch()
 		      << " wrongly marked me down";
 	}
       }
       else if (!osdmap->get_addr(whoami).probably_equals(client_messenger->get_myaddr()))
-	clog->error() << "map e" << osdmap->get_epoch()
+	clog.error() << "map e" << osdmap->get_epoch()
 		    << " had wrong client addr (" << osdmap->get_addr(whoami)
 		     << " != my " << client_messenger->get_myaddr() << ")";
       else if (!osdmap->get_cluster_addr(whoami).probably_equals(cluster_messenger->get_myaddr()))
-	clog->error() << "map e" << osdmap->get_epoch()
+	clog.error() << "map e" << osdmap->get_epoch()
 		    << " had wrong cluster addr (" << osdmap->get_cluster_addr(whoami)
 		     << " != my " << cluster_messenger->get_myaddr() << ")";
       else if (!osdmap->get_hb_back_addr(whoami).probably_equals(hb_back_server_messenger->get_myaddr()))
-	clog->error() << "map e" << osdmap->get_epoch()
+	clog.error() << "map e" << osdmap->get_epoch()
 		    << " had wrong hb back addr (" << osdmap->get_hb_back_addr(whoami)
 		     << " != my " << hb_back_server_messenger->get_myaddr() << ")";
       else if (osdmap->get_hb_front_addr(whoami) != entity_addr_t() &&
                !osdmap->get_hb_front_addr(whoami).probably_equals(hb_front_server_messenger->get_myaddr()))
-	clog->error() << "map e" << osdmap->get_epoch()
+	clog.error() << "map e" << osdmap->get_epoch()
 		    << " had wrong hb front addr (" << osdmap->get_hb_front_addr(whoami)
 		     << " != my " << hb_front_server_messenger->get_myaddr() << ")";
       
       if (!service.is_stopping()) {
-        epoch_t up_epoch = 0;
-        epoch_t bind_epoch = osdmap->get_epoch();
-        service.set_epochs(NULL,&up_epoch, &bind_epoch);
+	up_epoch = 0;
 	do_restart = true;
+	bind_epoch = osdmap->get_epoch();
 
 	start_waiting_for_healthy();
 
@@ -6353,7 +5672,6 @@ void OSD::handle_osd_map(MOSDMap *m)
 
 
   // note in the superblock that we were clean thru the prior epoch
-  epoch_t boot_epoch = service.get_boot_epoch();
   if (boot_epoch && boot_epoch >= superblock.mounted) {
     superblock.mounted = boot_epoch;
     superblock.clean_thru = osdmap->get_epoch();
@@ -6540,11 +5858,9 @@ void OSD::advance_map(ObjectStore::Transaction& t, C_Contexts *tfin)
   assert(osd_lock.is_locked());
 
   dout(7) << "advance_map epoch " << osdmap->get_epoch()
+          << "  " << pg_map.size() << " pgs"
           << dendl;
 
-  epoch_t up_epoch;
-  epoch_t boot_epoch;
-  service.retrieve_epochs(&boot_epoch, &up_epoch, NULL);
   if (!up_epoch &&
       osdmap->is_up(whoami) &&
       osdmap->get_inst(whoami) == client_messenger->get_myinst()) {
@@ -6554,7 +5870,6 @@ void OSD::advance_map(ObjectStore::Transaction& t, C_Contexts *tfin)
       boot_epoch = osdmap->get_epoch();
       dout(10) << "boot_epoch is " << boot_epoch << dendl;
     }
-    service.set_epochs(&boot_epoch, &up_epoch, NULL);
   }
 
   // scan pg creations
@@ -6578,6 +5893,22 @@ void OSD::advance_map(ObjectStore::Transaction& t, C_Contexts *tfin)
       p->second.acting.swap(acting);  // keep the latest
     }
   }
+
+  // scan pgs with waiters
+  map<spg_t, list<OpRequestRef> >::iterator p = waiting_for_pg.begin();
+  while (p != waiting_for_pg.end()) {
+    spg_t pgid = p->first;
+
+    if (osdmap->osd_is_valid_op_target(pgid.pgid, whoami)) {
+      ++p;  // still me
+    } else {
+      dout(10) << " discarding waiting ops for " << pgid << dendl;
+      while (!p->second.empty()) {
+	p->second.pop_front();
+      }
+      waiting_for_pg.erase(p++);
+    }
+  }
 }
 
 void OSD::consume_map()
@@ -6589,35 +5920,31 @@ void OSD::consume_map()
   list<PGRef> to_remove;
 
   // scan pg's
-  {
-    RWLock::RLocker l(pg_map_lock);
-    for (ceph::unordered_map<spg_t,PG*>::iterator it = pg_map.begin();
-        it != pg_map.end();
-        ++it) {
-      PG *pg = it->second;
-      pg->lock();
-      if (pg->is_primary())
-        num_pg_primary++;
-      else if (pg->is_replica())
-        num_pg_replica++;
-      else
-        num_pg_stray++;
-
-      if (!osdmap->have_pg_pool(pg->info.pgid.pool())) {
-        //pool is deleted!
-        to_remove.push_back(PGRef(pg));
-      } else {
-        service.init_splits_between(it->first, service.get_osdmap(), osdmap);
-      }
+  for (ceph::unordered_map<spg_t,PG*>::iterator it = pg_map.begin();
+       it != pg_map.end();
+       ++it) {
+    PG *pg = it->second;
+    pg->lock();
+    if (pg->is_primary())
+      num_pg_primary++;
+    else if (pg->is_replica())
+      num_pg_replica++;
+    else
+      num_pg_stray++;
 
-      pg->unlock();
+    if (!osdmap->have_pg_pool(pg->info.pgid.pool())) {
+      //pool is deleted!
+      to_remove.push_back(PGRef(pg));
+    } else {
+      service.init_splits_between(it->first, service.get_osdmap(), osdmap);
     }
+
+    pg->unlock();
   }
 
   for (list<PGRef>::iterator i = to_remove.begin();
        i != to_remove.end();
        to_remove.erase(i++)) {
-    RWLock::WLocker locker(pg_map_lock);
     (*i)->lock();
     _remove_pg(&**i);
     (*i)->unlock();
@@ -6627,50 +5954,19 @@ void OSD::consume_map()
   service.expand_pg_num(service.get_osdmap(), osdmap);
 
   service.pre_publish_map(osdmap);
-  service.await_reserved_maps();
   service.publish_map(osdmap);
 
-  dispatch_sessions_waiting_on_map();
-
-  // remove any PGs which we no longer host from the session waiting_for_pg lists
-  set<spg_t> pgs_to_check;
-  get_pgs_with_waiting_sessions(&pgs_to_check);
-  for (set<spg_t>::iterator p = pgs_to_check.begin();
-       p != pgs_to_check.end();
-       ++p) {
-    vector<int> acting;
-    int nrep = osdmap->pg_to_acting_osds(p->pgid, acting);
-    int role = osdmap->calc_pg_role(whoami, acting, nrep);
-
-    if (role < 0) {
-      set<Session*> concerned_sessions;
-      get_sessions_possibly_interested_in_pg(*p, &concerned_sessions);
-      for (set<Session*>::iterator i = concerned_sessions.begin();
-	   i != concerned_sessions.end();
-	   ++i) {
-	{
-	  Mutex::Locker l((*i)->session_dispatch_lock);
-	  session_notify_pg_cleared(*i, osdmap, *p);
-	}
-	(*i)->put();
-      }
-    }
-  }
-
   // scan pg's
-  {
-    RWLock::RLocker l(pg_map_lock);
-    for (ceph::unordered_map<spg_t,PG*>::iterator it = pg_map.begin();
-        it != pg_map.end();
-        ++it) {
-      PG *pg = it->second;
-      pg->lock();
-      pg->queue_null(osdmap->get_epoch(), osdmap->get_epoch());
-      pg->unlock();
-    }
-
-    logger->set(l_osd_pg, pg_map.size());
+  for (ceph::unordered_map<spg_t,PG*>::iterator it = pg_map.begin();
+       it != pg_map.end();
+       ++it) {
+    PG *pg = it->second;
+    pg->lock();
+    pg->queue_null(osdmap->get_epoch(), osdmap->get_epoch());
+    pg->unlock();
   }
+  
+  logger->set(l_osd_pg, pg_map.size());
   logger->set(l_osd_pg_primary, num_pg_primary);
   logger->set(l_osd_pg_replica, num_pg_replica);
   logger->set(l_osd_pg_stray, num_pg_stray);
@@ -6682,6 +5978,8 @@ void OSD::activate_map()
 
   dout(7) << "activate_map version " << osdmap->get_epoch() << dendl;
 
+  wake_all_pg_waiters();   // the pg mapping may have shifted
+
   if (osdmap->test_flag(CEPH_OSDMAP_FULL)) {
     dout(10) << " osdmap flagged full, doing onetime osdmap subscribe" << dendl;
     osdmap_subscribe(osdmap->get_epoch() + 1, true);
@@ -6708,11 +6006,168 @@ void OSD::activate_map()
   take_waiters(waiting_for_osdmap);
 }
 
+
+MOSDMap *OSD::build_incremental_map_msg(epoch_t since, epoch_t to)
+{
+  MOSDMap *m = new MOSDMap(monc->get_fsid());
+  m->oldest_map = superblock.oldest_map;
+  m->newest_map = superblock.newest_map;
+  
+  for (epoch_t e = to; e > since; e--) {
+    bufferlist bl;
+    if (e > m->oldest_map && get_inc_map_bl(e, bl)) {
+      m->incremental_maps[e].claim(bl);
+    } else if (get_map_bl(e, bl)) {
+      m->maps[e].claim(bl);
+      break;
+    } else {
+      derr << "since " << since << " to " << to
+	   << " oldest " << m->oldest_map << " newest " << m->newest_map
+	   << dendl;
+      assert(0 == "missing an osdmap on disk");  // we should have all maps.
+    }
+  }
+  return m;
+}
+
+void OSD::send_map(MOSDMap *m, Connection *con)
+{
+  Messenger *msgr = client_messenger;
+  if (entity_name_t::TYPE_OSD == con->get_peer_type())
+    msgr = cluster_messenger;
+  msgr->send_message(m, con);
+}
+
+void OSD::send_incremental_map(epoch_t since, Connection *con)
+{
+  epoch_t to = osdmap->get_epoch();
+  dout(10) << "send_incremental_map " << since << " -> " << to
+           << " to " << con << " " << con->get_peer_addr() << dendl;
+
+  if (since < superblock.oldest_map) {
+    // just send latest full map
+    MOSDMap *m = new MOSDMap(monc->get_fsid());
+    m->oldest_map = superblock.oldest_map;
+    m->newest_map = superblock.newest_map;
+    get_map_bl(to, m->maps[to]);
+    send_map(m, con);
+    return;
+  }
+
+  if (to > since && (int64_t)(to - since) > cct->_conf->osd_map_share_max_epochs) {
+    dout(10) << "  " << (to - since) << " > max " << cct->_conf->osd_map_share_max_epochs
+	     << ", only sending most recent" << dendl;
+    since = to - cct->_conf->osd_map_share_max_epochs;
+  }
+
+  while (since < to) {
+    if (to - since > (epoch_t)cct->_conf->osd_map_message_max)
+      to = since + cct->_conf->osd_map_message_max;
+    MOSDMap *m = build_incremental_map_msg(since, to);
+    send_map(m, con);
+    since = to;
+  }
+}
+
+bool OSDService::_get_map_bl(epoch_t e, bufferlist& bl)
+{
+  bool found = map_bl_cache.lookup(e, &bl);
+  if (found)
+    return true;
+  found = store->read(
+    coll_t::META_COLL, OSD::get_osdmap_pobject_name(e), 0, 0, bl) >= 0;
+  if (found)
+    _add_map_bl(e, bl);
+  return found;
+}
+
+bool OSDService::get_inc_map_bl(epoch_t e, bufferlist& bl)
+{
+  Mutex::Locker l(map_cache_lock);
+  bool found = map_bl_inc_cache.lookup(e, &bl);
+  if (found)
+    return true;
+  found = store->read(
+    coll_t::META_COLL, OSD::get_inc_osdmap_pobject_name(e), 0, 0, bl) >= 0;
+  if (found)
+    _add_map_inc_bl(e, bl);
+  return found;
+}
+
+void OSDService::_add_map_bl(epoch_t e, bufferlist& bl)
+{
+  dout(10) << "add_map_bl " << e << " " << bl.length() << " bytes" << dendl;
+  map_bl_cache.add(e, bl);
+}
+
+void OSDService::_add_map_inc_bl(epoch_t e, bufferlist& bl)
+{
+  dout(10) << "add_map_inc_bl " << e << " " << bl.length() << " bytes" << dendl;
+  map_bl_inc_cache.add(e, bl);
+}
+
+void OSDService::pin_map_inc_bl(epoch_t e, bufferlist &bl)
+{
+  Mutex::Locker l(map_cache_lock);
+  map_bl_inc_cache.pin(e, bl);
+}
+
+void OSDService::pin_map_bl(epoch_t e, bufferlist &bl)
+{
+  Mutex::Locker l(map_cache_lock);
+  map_bl_cache.pin(e, bl);
+}
+
+void OSDService::clear_map_bl_cache_pins(epoch_t e)
+{
+  Mutex::Locker l(map_cache_lock);
+  map_bl_inc_cache.clear_pinned(e);
+  map_bl_cache.clear_pinned(e);
+}
+
+OSDMapRef OSDService::_add_map(OSDMap *o)
+{
+  epoch_t e = o->get_epoch();
+
+  if (cct->_conf->osd_map_dedup) {
+    // Dedup against an existing map at a nearby epoch
+    OSDMapRef for_dedup = map_cache.lower_bound(e);
+    if (for_dedup) {
+      OSDMap::dedup(for_dedup.get(), o);
+    }
+  }
+  OSDMapRef l = map_cache.add(e, o);
+  return l;
+}
+
+OSDMapRef OSDService::try_get_map(epoch_t epoch)
+{
+  Mutex::Locker l(map_cache_lock);
+  OSDMapRef retval = map_cache.lookup(epoch);
+  if (retval) {
+    dout(30) << "get_map " << epoch << " -cached" << dendl;
+    return retval;
+  }
+
+  OSDMap *map = new OSDMap;
+  if (epoch > 0) {
+    dout(20) << "get_map " << epoch << " - loading and decoding " << map << dendl;
+    bufferlist bl;
+    if (!_get_map_bl(epoch, bl)) {
+      delete map;
+      return OSDMapRef();
+    }
+    map->decode(bl);
+  } else {
+    dout(20) << "get_map " << epoch << " - return initial " << map << dendl;
+  }
+  return _add_map(map);
+}
+
 bool OSD::require_mon_peer(Message *m)
 {
   if (!m->get_connection()->peer_is_mon()) {
-    dout(0) << "require_mon_peer received from non-mon "
-	    << m->get_connection()->get_peer_addr()
+    dout(0) << "require_mon_peer received from non-mon " << m->get_connection()->get_peer_addr()
 	    << " " << *m << dendl;
     m->put();
     return false;
@@ -6723,8 +6178,7 @@ bool OSD::require_mon_peer(Message *m)
 bool OSD::require_osd_peer(OpRequestRef& op)
 {
   if (!op->get_req()->get_connection()->peer_is_osd()) {
-    dout(0) << "require_osd_peer received from non-osd "
-	    << op->get_req()->get_connection()->get_peer_addr()
+    dout(0) << "require_osd_peer received from non-osd " << op->get_req()->get_connection()->get_peer_addr()
 	    << " " << *op->get_req() << dendl;
     return false;
   }
@@ -6733,7 +6187,6 @@ bool OSD::require_osd_peer(OpRequestRef& op)
 
 bool OSD::require_self_aliveness(OpRequestRef& op, epoch_t epoch)
 {
-  epoch_t up_epoch = service.get_up_epoch();
   if (epoch < up_epoch) {
     dout(7) << "from pre-up epoch " << epoch << " < " << up_epoch << dendl;
     return false;
@@ -6747,12 +6200,11 @@ bool OSD::require_self_aliveness(OpRequestRef& op, epoch_t epoch)
   return true;
 }
 
-bool OSD::require_same_peer_instance(OpRequestRef& op, OSDMapRef& map,
-				     bool is_fast_dispatch)
+bool OSD::require_same_peer_instance(OpRequestRef& op, OSDMapRef& map)
 {
   Message *m = op->get_req();
   int from = m->get_source().num();
-  
+
   if (!map->have_inst(from) ||
       (map->get_cluster_addr(from) != m->get_source_inst().addr)) {
     dout(5) << "from dead osd." << from << ", marking down, "
@@ -6761,15 +6213,10 @@ bool OSD::require_same_peer_instance(OpRequestRef& op, OSDMapRef& map,
 				map->get_cluster_addr(from) : entity_addr_t())
 	    << dendl;
     ConnectionRef con = m->get_connection();
-    con->mark_down();
+    cluster_messenger->mark_down(con.get());
     Session *s = static_cast<Session*>(con->get_priv());
     if (s) {
-      if (!is_fast_dispatch)
-	s->session_dispatch_lock.Lock();
-      clear_session_waiting_on_map(s);
       con->set_priv(NULL);   // break ref <-> session cycle, if any
-      if (!is_fast_dispatch)
-	s->session_dispatch_lock.Unlock();
       s->put();
     }
     return false;
@@ -6777,24 +6224,34 @@ bool OSD::require_same_peer_instance(OpRequestRef& op, OSDMapRef& map,
   return true;
 }
 
-
+bool OSD::require_up_osd_peer(OpRequestRef& op, OSDMapRef& map,
+                              epoch_t their_epoch)
+{
+  if (!require_self_aliveness(op, their_epoch)) {
+    return false;
+  } else if (!require_osd_peer(op)) {
+    return false;
+  } else if (map->get_epoch() >= their_epoch &&
+	     !require_same_peer_instance(op, map)) {
+    return false;
+  }
+  return true;
+}
+
 /*
  * require that we have same (or newer) map, and that
  * the source is the pg primary.
  */
-bool OSD::require_same_or_newer_map(OpRequestRef& op, epoch_t epoch,
-				    bool is_fast_dispatch)
+bool OSD::require_same_or_newer_map(OpRequestRef& op, epoch_t epoch)
 {
   Message *m = op->get_req();
-  dout(15) << "require_same_or_newer_map " << epoch
-	   << " (i am " << osdmap->get_epoch() << ") " << m << dendl;
+  dout(15) << "require_same_or_newer_map " << epoch << " (i am " << osdmap->get_epoch() << ") " << m << dendl;
 
   assert(osd_lock.is_locked());
 
   // do they have a newer map?
   if (epoch > osdmap->get_epoch()) {
-    dout(7) << "waiting for newer map epoch " << epoch
-	    << " > my " << osdmap->get_epoch() << " with " << m << dendl;
+    dout(7) << "waiting for newer map epoch " << epoch << " > my " << osdmap->get_epoch() << " with " << m << dendl;
     wait_for_new_map(op);
     return false;
   }
@@ -6805,7 +6262,7 @@ bool OSD::require_same_or_newer_map(OpRequestRef& op, epoch_t epoch,
 
   // ok, our map is same or newer.. do they still exist?
   if (m->get_connection()->get_messenger() == cluster_messenger &&
-      !require_same_peer_instance(op, osdmap, is_fast_dispatch)) {
+      !require_same_peer_instance(op, osdmap)) {
     return false;
   }
 
@@ -6922,8 +6379,7 @@ void OSD::handle_pg_create(OpRequestRef op)
   }
   op->get_req()->put();
 
-  if (!require_same_or_newer_map(op, m->epoch, false))
-    return;
+  if (!require_same_or_newer_map(op, m->epoch)) return;
 
   op->mark_started();
 
@@ -7020,20 +6476,8 @@ void OSD::handle_pg_create(OpRequestRef op)
 
     PG *pg = NULL;
     if (can_create_pg(pgid)) {
-      const pg_pool_t* pp = osdmap->get_pg_pool(pgid.pool());
       pg_interval_map_t pi;
-      coll_t cid(pgid);
-      rctx.transaction->create_collection(cid);
-
-      // Give a hint to the PG collection
-      bufferlist hint;
-      uint32_t pg_num = pp->get_pg_num();
-      uint64_t expected_num_objects_pg = pp->expected_num_objects / pg_num;
-      ::encode(pg_num, hint);
-      ::encode(expected_num_objects_pg, hint);
-      uint32_t hint_type = ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS;
-      rctx.transaction->collection_hint(cid, hint_type, hint);
-
+      rctx.transaction->create_collection(coll_t(pgid));
       pg = _create_lock_pg(
 	osdmap, pgid, true, false, false,
 	0, creating_pgs[pgid].acting, whoami,
@@ -7042,12 +6486,12 @@ void OSD::handle_pg_create(OpRequestRef op)
 	*rctx.transaction);
       pg->info.last_epoch_started = pg->info.history.last_epoch_started;
       creating_pgs.erase(pgid);
+      wake_pg_waiters(pg->info.pgid);
       pg->handle_create(&rctx);
       pg->write_if_dirty(*rctx.transaction);
       pg->publish_stats_to_osd();
       pg->unlock();
       num_created++;
-      wake_pg_waiters(pg, pgid);
     }
     dispatch_context(rctx, pg, osdmap);
   }
@@ -7099,19 +6543,17 @@ bool OSD::compat_must_dispatch_immediately(PG *pg)
     tmpacting = pg->actingbackfill;
   } else {
     for (unsigned i = 0; i < pg->acting.size(); ++i) {
-      if (pg->acting[i] == CRUSH_ITEM_NONE)
-	continue;
       tmpacting.insert(
 	pg_shard_t(
 	  pg->acting[i],
-	  pg->pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD));
+	  pg->pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
     }
   }
 
   for (set<pg_shard_t>::iterator i = tmpacting.begin();
        i != tmpacting.end();
        ++i) {
-    if (i->osd == whoami || i->osd == CRUSH_ITEM_NONE)
+    if (i->osd == whoami)
       continue;
     ConnectionRef conn =
       service.get_con_osd_cluster(i->osd, pg->get_osdmap()->get_epoch());
@@ -7164,26 +6606,21 @@ void OSD::do_notifies(
 	 notify_list.begin();
        it != notify_list.end();
        ++it) {
-    if (!curmap->is_up(it->first)) {
-      dout(20) << __func__ << " skipping down osd." << it->first << dendl;
+    if (!curmap->is_up(it->first))
       continue;
-    }
     ConnectionRef con = service.get_con_osd_cluster(
       it->first, curmap->get_epoch());
-    if (!con) {
-      dout(20) << __func__ << " skipping osd." << it->first
-	       << " (NULL con)" << dendl;
+    if (!con)
       continue;
-    }
-    service.share_map_peer(it->first, con.get(), curmap);
+    _share_map_outgoing(it->first, con.get(), curmap);
     if (con->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
-      dout(7) << __func__ << " osd " << it->first
+      dout(7) << "do_notify osd " << it->first
 	      << " on " << it->second.size() << " PGs" << dendl;
       MOSDPGNotify *m = new MOSDPGNotify(curmap->get_epoch(),
 					 it->second);
-      con->send_message(m);
+      cluster_messenger->send_message(m, con.get());
     } else {
-      dout(7) << __func__ << " osd " << it->first
+      dout(7) << "do_notify osd " << it->first
 	      << " sending separate messages" << dendl;
       for (vector<pair<pg_notify_t, pg_interval_map_t> >::iterator i =
 	     it->second.begin();
@@ -7193,7 +6630,7 @@ void OSD::do_notifies(
 	list[0] = *i;
 	MOSDPGNotify *m = new MOSDPGNotify(i->first.epoch_sent,
 					   list);
-	con->send_message(m);
+	cluster_messenger->send_message(m, con.get());
       }
     }
   }
@@ -7209,34 +6646,29 @@ void OSD::do_queries(map<int, map<spg_t,pg_query_t> >& query_map,
   for (map<int, map<spg_t,pg_query_t> >::iterator pit = query_map.begin();
        pit != query_map.end();
        ++pit) {
-    if (!curmap->is_up(pit->first)) {
-      dout(20) << __func__ << " skipping down osd." << pit->first << dendl;
+    if (!curmap->is_up(pit->first))
       continue;
-    }
     int who = pit->first;
     ConnectionRef con = service.get_con_osd_cluster(who, curmap->get_epoch());
-    if (!con) {
-      dout(20) << __func__ << " skipping osd." << who
-	       << " (NULL con)" << dendl;
+    if (!con)
       continue;
-    }
-    service.share_map_peer(who, con.get(), curmap);
+    _share_map_outgoing(who, con.get(), curmap);
     if (con->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
-      dout(7) << __func__ << " querying osd." << who
+      dout(7) << "do_queries querying osd." << who
 	      << " on " << pit->second.size() << " PGs" << dendl;
       MOSDPGQuery *m = new MOSDPGQuery(curmap->get_epoch(), pit->second);
-      con->send_message(m);
+      cluster_messenger->send_message(m, con.get());
     } else {
-      dout(7) << __func__ << " querying osd." << who
-	      << " sending seperate messages on " << pit->second.size()
-	      << " PGs" << dendl;
+      dout(7) << "do_queries querying osd." << who
+	      << " sending saperate messages "
+	      << " on " << pit->second.size() << " PGs" << dendl;
       for (map<spg_t, pg_query_t>::iterator i = pit->second.begin();
 	   i != pit->second.end();
 	   ++i) {
 	map<spg_t, pg_query_t> to_send;
 	to_send.insert(*i);
 	MOSDPGQuery *m = new MOSDPGQuery(i->second.epoch_sent, to_send);
-	con->send_message(m);
+	cluster_messenger->send_message(m, con.get());
       }
     }
   }
@@ -7252,28 +6684,23 @@ void OSD::do_infos(map<int,
 	 info_map.begin();
        p != info_map.end();
        ++p) { 
-    if (!curmap->is_up(p->first)) {
-      dout(20) << __func__ << " skipping down osd." << p->first << dendl;
+    if (!curmap->is_up(p->first))
       continue;
-    }
     for (vector<pair<pg_notify_t,pg_interval_map_t> >::iterator i = p->second.begin();
 	 i != p->second.end();
 	 ++i) {
-      dout(20) << __func__ << " sending info " << i->first.info
+      dout(20) << "Sending info " << i->first.info
 	       << " to shard " << p->first << dendl;
     }
     ConnectionRef con = service.get_con_osd_cluster(
       p->first, curmap->get_epoch());
-    if (!con) {
-      dout(20) << __func__ << " skipping osd." << p->first
-	       << " (NULL con)" << dendl;
+    if (!con)
       continue;
-    }
-    service.share_map_peer(p->first, con.get(), curmap);
+    _share_map_outgoing(p->first, con.get(), curmap);
     if (con->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
       MOSDPGInfo *m = new MOSDPGInfo(curmap->get_epoch());
       m->pg_list = p->second;
-      con->send_message(m);
+      cluster_messenger->send_message(m, con.get());
     } else {
       for (vector<pair<pg_notify_t, pg_interval_map_t> >::iterator i =
 	     p->second.begin();
@@ -7283,7 +6710,7 @@ void OSD::do_infos(map<int,
 	to_send[0] = *i;
 	MOSDPGInfo *m = new MOSDPGInfo(i->first.epoch_sent);
 	m->pg_list = to_send;
-	con->send_message(m);
+	cluster_messenger->send_message(m, con.get());
       }
     }
   }
@@ -7307,8 +6734,7 @@ void OSD::handle_pg_notify(OpRequestRef op)
   if (!require_osd_peer(op))
     return;
 
-  if (!require_same_or_newer_map(op, m->get_epoch(), false))
-    return;
+  if (!require_same_or_newer_map(op, m->get_epoch())) return;
 
   op->mark_started();
 
@@ -7344,8 +6770,7 @@ void OSD::handle_pg_log(OpRequestRef op)
     return;
 
   int from = m->get_source().num();
-  if (!require_same_or_newer_map(op, m->get_epoch(), false))
-    return;
+  if (!require_same_or_newer_map(op, m->get_epoch())) return;
 
   if (m->info.pgid.preferred() >= 0) {
     dout(10) << "ignoring localized pg " << m->info.pgid << dendl;
@@ -7374,8 +6799,7 @@ void OSD::handle_pg_info(OpRequestRef op)
     return;
 
   int from = m->get_source().num();
-  if (!require_same_or_newer_map(op, m->get_epoch(), false))
-    return;
+  if (!require_same_or_newer_map(op, m->get_epoch())) return;
 
   op->mark_started();
 
@@ -7412,8 +6836,7 @@ void OSD::handle_pg_trim(OpRequestRef op)
     return;
 
   int from = m->get_source().num();
-  if (!require_same_or_newer_map(op, m->epoch, false))
-    return;
+  if (!require_same_or_newer_map(op, m->epoch)) return;
 
   if (m->pgid.preferred() >= 0) {
     dout(10) << "ignoring localized pg " << m->pgid << dendl;
@@ -7459,6 +6882,62 @@ void OSD::handle_pg_trim(OpRequestRef op)
   }
 }
 
+void OSD::handle_pg_scan(OpRequestRef op)
+{
+  MOSDPGScan *m = static_cast<MOSDPGScan*>(op->get_req());
+  assert(m->get_header().type == MSG_OSD_PG_SCAN);
+  dout(10) << "handle_pg_scan " << *m << " from " << m->get_source() << dendl;
+  
+  if (!require_osd_peer(op))
+    return;
+  if (!require_same_or_newer_map(op, m->query_epoch))
+    return;
+
+  if (m->pgid.preferred() >= 0) {
+    dout(10) << "ignoring localized pg " << m->pgid << dendl;
+    return;
+  }
+
+  PG *pg;
+  
+  if (!_have_pg(m->pgid)) {
+    return;
+  }
+
+  pg = _lookup_pg(m->pgid);
+  assert(pg);
+
+  enqueue_op(pg, op);
+}
+
+void OSD::handle_pg_backfill(OpRequestRef op)
+{
+  MOSDPGBackfill *m = static_cast<MOSDPGBackfill*>(op->get_req());
+  assert(m->get_header().type == MSG_OSD_PG_BACKFILL);
+  dout(10) << "handle_pg_backfill " << *m << " from " << m->get_source() << dendl;
+  
+  if (!require_osd_peer(op))
+    return;
+  if (!require_same_or_newer_map(op, m->query_epoch))
+    return;
+
+  if (m->pgid.preferred() >= 0) {
+    dout(10) << "ignoring localized pg " << m->pgid << dendl;
+    return;
+  }
+
+  PG *pg;
+  
+  if (!_have_pg(m->pgid)) {
+    return;
+  }
+
+  pg = _lookup_pg(m->pgid);
+  assert(pg);
+
+  enqueue_op(pg, op);
+}
+
 void OSD::handle_pg_backfill_reserve(OpRequestRef op)
 {
   MBackfillReserve *m = static_cast<MBackfillReserve*>(op->get_req());
@@ -7466,7 +6945,7 @@ void OSD::handle_pg_backfill_reserve(OpRequestRef op)
 
   if (!require_osd_peer(op))
     return;
-  if (!require_same_or_newer_map(op, m->query_epoch, false))
+  if (!require_same_or_newer_map(op, m->query_epoch))
     return;
 
   PG::CephPeeringEvtRef evt;
@@ -7515,7 +6994,7 @@ void OSD::handle_pg_recovery_reserve(OpRequestRef op)
 
   if (!require_osd_peer(op))
     return;
-  if (!require_same_or_newer_map(op, m->query_epoch, false))
+  if (!require_same_or_newer_map(op, m->query_epoch))
     return;
 
   PG::CephPeeringEvtRef evt;
@@ -7575,8 +7054,7 @@ void OSD::handle_pg_query(OpRequestRef op)
   dout(7) << "handle_pg_query from " << m->get_source() << " epoch " << m->get_epoch() << dendl;
   int from = m->get_source().num();
   
-  if (!require_same_or_newer_map(op, m->get_epoch(), false))
-    return;
+  if (!require_same_or_newer_map(op, m->get_epoch())) return;
 
   op->mark_started();
 
@@ -7602,17 +7080,14 @@ void OSD::handle_pg_query(OpRequestRef op)
       continue;
     }
 
-    {
-      RWLock::RLocker l(pg_map_lock);
-      if (pg_map.count(pgid)) {
-        PG *pg = 0;
-        pg = _lookup_lock_pg_with_map_lock_held(pgid);
-        pg->queue_query(
-            it->second.epoch_sent, it->second.epoch_sent,
-            pg_shard_t(from, it->second.from), it->second);
-        pg->unlock();
-        continue;
-      }
+    if (pg_map.count(pgid)) {
+      PG *pg = 0;
+      pg = _lookup_lock_pg(pgid);
+      pg->queue_query(
+	it->second.epoch_sent, it->second.epoch_sent,
+	pg_shard_t(from, it->second.from), it->second);
+      pg->unlock();
+      continue;
     }
 
     if (!osdmap->have_pg_pool(pgid.pool()))
@@ -7653,8 +7128,8 @@ void OSD::handle_pg_query(OpRequestRef op)
 	  it->second.from, it->second.to,
 	  osdmap->get_epoch(), empty,
 	  it->second.epoch_sent);
-	service.share_map_peer(from, con.get(), osdmap);
-	con->send_message(mlog);
+	_share_map_outgoing(from, con.get(), osdmap);
+	cluster_messenger->send_message(mlog, con.get());
       }
     } else {
       notify_list[from].push_back(
@@ -7683,8 +7158,7 @@ void OSD::handle_pg_remove(OpRequestRef op)
   dout(7) << "handle_pg_remove from " << m->get_source() << " on "
 	  << m->pg_list.size() << " pgs" << dendl;
   
-  if (!require_same_or_newer_map(op, m->get_epoch(), false))
-    return;
+  if (!require_same_or_newer_map(op, m->get_epoch())) return;
   
   op->mark_started();
 
@@ -7697,13 +7171,12 @@ void OSD::handle_pg_remove(OpRequestRef op)
       continue;
     }
     
-    RWLock::WLocker l(pg_map_lock);
     if (pg_map.count(pgid) == 0) {
       dout(10) << " don't have pg " << pgid << dendl;
       continue;
     }
     dout(5) << "queue_pg_for_deletion: " << pgid << dendl;
-    PG *pg = _lookup_lock_pg_with_map_lock_held(pgid);
+    PG *pg = _lookup_lock_pg(pgid);
     pg_history_t history = pg->info.history;
     int up_primary, acting_primary;
     vector<int> up, acting;
@@ -7784,23 +7257,34 @@ void OSD::check_replay_queue()
 
   for (list< pair<spg_t,utime_t> >::iterator p = pgids.begin(); p != pgids.end(); ++p) {
     spg_t pgid = p->first;
-    pg_map_lock.get_read();
     if (pg_map.count(pgid)) {
       PG *pg = _lookup_lock_pg_with_map_lock_held(pgid);
-      pg_map_lock.unlock();
       dout(10) << "check_replay_queue " << *pg << dendl;
       if (pg->is_active() &&
-          pg->is_replay() &&
-          pg->is_primary() &&
-          pg->replay_until == p->second) {
-        pg->replay_queued_ops();
+	  pg->is_replay() &&
+	  pg->is_primary() &&
+	  pg->replay_until == p->second) {
+	pg->replay_queued_ops();
       }
       pg->unlock();
     } else {
-      pg_map_lock.unlock();
       dout(10) << "check_replay_queue pgid " << pgid << " (not found)" << dendl;
     }
   }
+  
+  // wake up _all_ pg waiters; raw pg -> actual pg mapping may have shifted
+  wake_all_pg_waiters();
+}
+
+
+bool OSDService::queue_for_recovery(PG *pg)
+{
+  bool b = recovery_wq.queue(pg);
+  if (b)
+    dout(10) << "queue_for_recovery queued " << *pg << dendl;
+  else
+    dout(10) << "queue_for_recovery already queued " << *pg << dendl;
+  return b;
 }
 
 bool OSD::_recover_now()
@@ -7851,7 +7335,6 @@ void OSD::do_recovery(PG *pg, ThreadPool::TPHandle &handle)
 #endif
     
     PG::RecoveryCtx rctx = create_context();
-    rctx.handle = &handle;
 
     int started;
     bool more = pg->start_recovery_ops(max, &rctx, handle, &started);
@@ -7938,59 +7421,77 @@ void OSD::finish_recovery_op(PG *pg, const hobject_t& soid, bool dequeue)
 // =========================================================
 // OPS
 
-class C_SendMap : public GenContext<ThreadPool::TPHandle&> {
-  OSD *osd;
-  entity_name_t name;
-  ConnectionRef con;
-  OSDMapRef osdmap;
-  epoch_t map_epoch;
+void OSDService::reply_op_error(OpRequestRef op, int err)
+{
+  reply_op_error(op, err, eversion_t(), 0);
+}
 
-public:
-  C_SendMap(OSD *osd, entity_name_t n, const ConnectionRef& con,
-            OSDMapRef& osdmap, epoch_t map_epoch) :
-    osd(osd), name(n), con(con), osdmap(osdmap), map_epoch(map_epoch) {
-  }
-
-  void finish(ThreadPool::TPHandle& tp) {
-    OSD::Session *session = static_cast<OSD::Session *>(
-        con->get_priv());
-    if (session) {
-      session->sent_epoch_lock.Lock();
-    }
-    osd->service.share_map(
-	name,
-        con.get(),
-        map_epoch,
-        osdmap,
-        session ? &session->last_sent_epoch : NULL);
-    if (session) {
-      session->sent_epoch_lock.Unlock();
-      session->put();
-    }
-  }
-};
+void OSDService::reply_op_error(OpRequestRef op, int err, eversion_t v,
+                                version_t uv)
+{
+  MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
+  assert(m->get_header().type == CEPH_MSG_OSD_OP);
+  int flags;
+  flags = m->get_flags() & (CEPH_OSD_FLAG_ACK|CEPH_OSD_FLAG_ONDISK);
 
-struct send_map_on_destruct {
-  OSD *osd;
-  entity_name_t name;
-  ConnectionRef con;
-  OSDMapRef osdmap;
-  epoch_t map_epoch;
-  bool should_send;
-  send_map_on_destruct(OSD *osd, Message *m,
-                       OSDMapRef& osdmap, epoch_t map_epoch)
-    : osd(osd), name(m->get_source()), con(m->get_connection()),
-      osdmap(osdmap), map_epoch(map_epoch),
-      should_send(true) { }
-  ~send_map_on_destruct() {
-    if (!should_send)
+  MOSDOpReply *reply = new MOSDOpReply(m, err, osdmap->get_epoch(), flags,
+				       true);
+  reply->set_reply_versions(v, uv);
+  m->get_connection()->get_messenger()->send_message(reply, m->get_connection());
+}
+
+void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op)
+{
+  MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
+  assert(m->get_header().type == CEPH_MSG_OSD_OP);
+
+  assert(m->get_map_epoch() >= pg->info.history.same_primary_since);
+
+  if (pg->is_ec_pg()) {
+    /**
+       * OSD recomputes op target based on current OSDMap. With an EC pg, we
+       * can get this result:
+       * 1) client at map 512 sends an op to osd 3, pg_t 3.9 based on mapping
+       *    [CRUSH_ITEM_NONE, 2, 3]/3
+       * 2) OSD 3 at map 513 remaps op to osd 3, spg_t 3.9s0 based on mapping
+       *    [3, 2, 3]/3
+       * 3) PG 3.9s0 dequeues the op at epoch 512 and notices that it isn't primary
+       *    -- misdirected op
+       * 4) client resends and this time PG 3.9s0 having caught up to 513 gets
+       *    it and fulfils it
+       *
+       * We can't compute the op target based on the sending map epoch due to
+       * splitting.  The simplest thing is to detect such cases here and drop
+       * them without an error (the client will resend anyway).
+       */
+    OSDMapRef opmap = try_get_map(m->get_map_epoch());
+    if (!opmap) {
+      dout(7) << __func__ << ": " << *pg << " no longer have map for "
+	      << m->get_map_epoch() << ", dropping" << dendl;
+      return;
+    }
+    pg_t _pgid = m->get_pg();
+    spg_t pgid;
+    if ((m->get_flags() & CEPH_OSD_FLAG_PGOP) == 0)
+      _pgid = opmap->raw_pg_to_pg(_pgid);
+    if (opmap->get_primary_shard(_pgid, &pgid) &&
+	pgid.shard != pg->info.pgid.shard) {
+      dout(7) << __func__ << ": " << *pg << " primary changed since "
+	      << m->get_map_epoch() << ", dropping" << dendl;
       return;
-    osd->service.op_gen_wq.queue(new C_SendMap(osd, name, con,
-					       osdmap, map_epoch));
+    }
   }
-};
 
-void OSD::handle_op(OpRequestRef& op, OSDMapRef& osdmap)
+  dout(7) << *pg << " misdirected op in " << m->get_map_epoch() << dendl;
+  clog.warn() << m->get_source_inst() << " misdirected " << m->get_reqid()
+	      << " pg " << m->get_pg()
+	      << " to osd." << whoami
+	      << " not " << pg->acting
+	      << " in e" << m->get_map_epoch() << "/" << osdmap->get_epoch() << "\n";
+  reply_op_error(op, -ENXIO);
+}
+
+void OSD::handle_op(OpRequestRef op)
 {
   MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
   assert(m->get_header().type == CEPH_MSG_OSD_OP);
@@ -8002,12 +7503,14 @@ void OSD::handle_op(OpRequestRef& op, OSDMapRef& osdmap)
   // we don't need encoded payload anymore
   m->clear_payload();
 
+  // require same or newer map
+  if (!require_same_or_newer_map(op, m->get_map_epoch()))
+    return;
+
   // object name too long?
-  unsigned max_name_len = MIN(g_conf->osd_max_object_name_len,
-			      store->get_max_object_name_length());
-  if (m->get_oid().name.size() > max_name_len) {
+  if (m->get_oid().name.size() > MAX_CEPH_OBJECT_NAME_LEN) {
     dout(4) << "handle_op '" << m->get_oid().name << "' is longer than "
-	    << max_name_len << " bytes" << dendl;
+	    << MAX_CEPH_OBJECT_NAME_LEN << " bytes!" << dendl;
     service.reply_op_error(op, -ENAMETOOLONG);
     return;
   }
@@ -8018,21 +7521,9 @@ void OSD::handle_op(OpRequestRef& op, OSDMapRef& osdmap)
     service.reply_op_error(op, -EBLACKLISTED);
     return;
   }
-
-  // set up a map send if the Op gets blocked for some reason
-  send_map_on_destruct share_map(this, m, osdmap, m->get_map_epoch());
-  Session *client_session =
-      static_cast<Session*>(m->get_connection()->get_priv());
-  if (client_session) {
-    client_session->sent_epoch_lock.Lock();
-  }
-  share_map.should_send = service.should_share_map(
-      m->get_source(), m->get_connection().get(), m->get_map_epoch(),
-      osdmap, &client_session->last_sent_epoch);
-  if (client_session) {
-    client_session->sent_epoch_lock.Unlock();
-    client_session->put();
-  }
+  // share our map with sender, if they're old
+  _share_map_incoming(m->get_source(), m->get_connection().get(), m->get_map_epoch(),
+		      static_cast<Session *>(m->get_connection()->get_priv()));
 
   if (op->rmw_flags == 0) {
     int r = init_op_flags(op);
@@ -8078,7 +7569,6 @@ void OSD::handle_op(OpRequestRef& op, OSDMapRef& osdmap)
       return;
     }
   }
-
   // calc actual pgid
   pg_t _pgid = m->get_pg();
   int64_t pool = _pgid.pool();
@@ -8092,104 +7582,92 @@ void OSD::handle_op(OpRequestRef& op, OSDMapRef& osdmap)
     return;
   }
 
-  OSDMapRef send_map = service.try_get_map(m->get_map_epoch());
-  // check send epoch
-  if (!send_map) {
+  // get and lock *pg.
+  PG *pg = _have_pg(pgid) ? _lookup_pg(pgid) : NULL;
+  if (!pg) {
+    dout(7) << "hit non-existent pg " << pgid << dendl;
 
-    dout(7) << "don't have sender's osdmap; assuming it was valid and that client will resend" << dendl;
-    return;
-  }
-  if (!send_map->have_pg_pool(pgid.pool())) {
-    dout(7) << "dropping request; pool did not exist" << dendl;
-    clog->warn() << m->get_source_inst() << " invalid " << m->get_reqid()
-		      << " pg " << m->get_pg()
-		      << " to osd." << whoami
-		      << " in e" << osdmap->get_epoch()
-		      << ", client e" << m->get_map_epoch()
-		      << " when pool " << m->get_pg().pool() << " did not exist"
-		      << "\n";
-    return;
-  } else if (send_map->get_pg_acting_role(pgid.pgid, whoami) < 0) {
-    dout(7) << "we are invalid target" << dendl;
-    clog->warn() << m->get_source_inst() << " misdirected " << m->get_reqid()
-		      << " pg " << m->get_pg()
-		      << " to osd." << whoami
-		      << " in e" << osdmap->get_epoch()
-		      << ", client e" << m->get_map_epoch()
-		      << " pg " << pgid
-		      << " features " << m->get_connection()->get_features()
-		      << "\n";
-    service.reply_op_error(op, -ENXIO);
-    return;
-  }
+    if (osdmap->osd_is_valid_op_target(pgid.pgid, whoami)) {
+      dout(7) << "we are valid target for op, waiting" << dendl;
+      waiting_for_pg[pgid].push_back(op);
+      op->mark_delayed("waiting for pg to exist locally");
+      return;
+    }
 
-  // check against current map too
-  if (!osdmap->have_pg_pool(pgid.pool()) ||
-      osdmap->get_pg_acting_role(pgid.pgid, whoami) < 0) {
-    dout(7) << "dropping; no longer have PG (or pool); client will retarget" << dendl;
+    // okay, we aren't valid now; check send epoch
+    if (m->get_map_epoch() < superblock.oldest_map) {
+      dout(7) << "don't have sender's osdmap; assuming it was valid and that client will resend" << dendl;
+      return;
+    }
+    OSDMapRef send_map = get_map(m->get_map_epoch());
+
+    if (send_map->osd_is_valid_op_target(pgid.pgid, whoami)) {
+      dout(7) << "dropping request; client will resend when they get new map" << dendl;
+    } else if (!send_map->have_pg_pool(pgid.pool())) {
+      dout(7) << "dropping request; pool did not exist" << dendl;
+      clog.warn() << m->get_source_inst() << " invalid " << m->get_reqid()
+		  << " pg " << m->get_pg()
+		  << " to osd." << whoami
+		  << " in e" << osdmap->get_epoch()
+		  << ", client e" << m->get_map_epoch()
+		  << " when pool " << m->get_pg().pool() << " did not exist"
+		  << "\n";
+    } else {
+      dout(7) << "we are invalid target" << dendl;
+      clog.warn() << m->get_source_inst() << " misdirected " << m->get_reqid()
+		  << " pg " << m->get_pg()
+		  << " to osd." << whoami
+		  << " in e" << osdmap->get_epoch()
+		  << ", client e" << m->get_map_epoch()
+		  << " pg " << pgid
+		  << " features " << m->get_connection()->get_features()
+		  << "\n";
+      service.reply_op_error(op, -ENXIO);
+    }
     return;
   }
 
-  PG *pg = get_pg_or_queue_for_pg(pgid, op);
-  if (pg) {
-    op->send_map_update = share_map.should_send;
-    op->sent_epoch = m->get_map_epoch();
-    enqueue_op(pg, op);
-    share_map.should_send = false;
-  }
+  enqueue_op(pg, op);
 }
 
 template<typename T, int MSGTYPE>
-void OSD::handle_replica_op(OpRequestRef& op, OSDMapRef& osdmap)
+void OSD::handle_replica_op(OpRequestRef op)
 {
   T *m = static_cast<T *>(op->get_req());
   assert(m->get_header().type == MSGTYPE);
 
   dout(10) << __func__ << " " << *m << " epoch " << m->map_epoch << dendl;
-  epoch_t up_epoch = service.get_up_epoch();
   if (m->map_epoch < up_epoch) {
     dout(3) << "replica op from before up" << dendl;
     return;
   }
 
-  if (!require_self_aliveness(op, m->map_epoch))
-    return;
-  if (!require_osd_peer(op))
-    return;
-  if (osdmap->get_epoch() >= m->map_epoch &&
-      !require_same_peer_instance(op, osdmap, true))
+  if (!require_up_osd_peer(op, osdmap, m->map_epoch))
     return;
 
   // must be a rep op.
   assert(m->get_source().is_osd());
   
+  // require same or newer map
+  if (!require_same_or_newer_map(op, m->map_epoch))
+    return;
+
   // share our map with sender, if they're old
-  bool should_share_map = false;
-  Session *peer_session =
-      static_cast<Session*>(m->get_connection()->get_priv());
-  if (peer_session) {
-    peer_session->sent_epoch_lock.Lock();
-  }
-  should_share_map = service.should_share_map(
-      m->get_source(), m->get_connection().get(), m->map_epoch,
-      osdmap,
-      peer_session ? &peer_session->last_sent_epoch : NULL);
-  if (peer_session) {
-    peer_session->sent_epoch_lock.Unlock();
-    peer_session->put();
-  }
-
-  PG *pg = get_pg_or_queue_for_pg(m->pgid, op);
-  if (pg) {
-    op->send_map_update = should_share_map;
-    op->sent_epoch = m->map_epoch;
-    enqueue_op(pg, op);
-  } else if (should_share_map) {
-    C_SendMap *send_map = new C_SendMap(this, m->get_source(),
-					m->get_connection(),
-                                        osdmap, m->map_epoch);
-    service.op_gen_wq.queue(send_map);
+  _share_map_incoming(m->get_source(), m->get_connection().get(), m->map_epoch,
+		      static_cast<Session*>(m->get_connection()->get_priv()));
+
+  // make sure we have the pg
+  const spg_t pgid = m->pgid;
+  if (service.splitting(pgid)) {
+    waiting_for_pg[pgid].push_back(op);
+    return;
+  }
+
+  PG *pg = _have_pg(pgid) ? _lookup_pg(pgid) : NULL;
+  if (!pg) {
+    return;
   }
+  enqueue_op(pg, op);
 }
 
 bool OSD::op_is_discardable(MOSDOp *op)
@@ -8204,7 +7682,10 @@ bool OSD::op_is_discardable(MOSDOp *op)
   return false;
 }
 
-void OSD::enqueue_op(PG *pg, OpRequestRef& op)
+/*
+ * enqueue called with osd_lock held
+ */
+void OSD::enqueue_op(PG *pg, OpRequestRef op)
 {
   utime_t latency = ceph_clock_now(cct) - op->get_req()->get_recv_stamp();
   dout(15) << "enqueue_op " << op << " prio " << op->get_req()->get_priority()
@@ -8214,55 +7695,69 @@ void OSD::enqueue_op(PG *pg, OpRequestRef& op)
   pg->queue_op(op);
 }
 
-void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb ) {
-
-  uint32_t shard_index = thread_index % num_shards;
+void OSD::OpWQ::_enqueue(pair<PGRef, OpRequestRef> item)
+{
+  unsigned priority = item.second->get_req()->get_priority();
+  unsigned cost = item.second->get_req()->get_cost();
+  if (priority >= CEPH_MSG_PRIO_LOW)
+    pqueue.enqueue_strict(
+      item.second->get_req()->get_source_inst(),
+      priority, item);
+  else
+    pqueue.enqueue(item.second->get_req()->get_source_inst(),
+      priority, cost, item);
+  osd->logger->set(l_osd_opq, pqueue.length());
+}
 
-  ShardData* sdata = shard_list[shard_index];
-  assert(NULL != sdata);
-  sdata->sdata_op_ordering_lock.Lock();
-  if (sdata->pqueue.empty()) {
-    sdata->sdata_op_ordering_lock.Unlock();
-    osd->cct->get_heartbeat_map()->reset_timeout(hb, 4, 0);
-    sdata->sdata_lock.Lock();
-    sdata->sdata_cond.WaitInterval(osd->cct, sdata->sdata_lock, utime_t(2, 0));
-    sdata->sdata_lock.Unlock();
-    sdata->sdata_op_ordering_lock.Lock();
-    if(sdata->pqueue.empty()) {
-      sdata->sdata_op_ordering_lock.Unlock();
-      return;
-    }
+void OSD::OpWQ::_enqueue_front(pair<PGRef, OpRequestRef> item)
+{
+  Mutex::Locker l(qlock);
+  if (pg_for_processing.count(&*(item.first))) {
+    pg_for_processing[&*(item.first)].push_front(item.second);
+    item.second = pg_for_processing[&*(item.first)].back();
+    pg_for_processing[&*(item.first)].pop_back();
   }
-  pair<PGRef, OpRequestRef> item = sdata->pqueue.dequeue();
-  sdata->pg_for_processing[&*(item.first)].push_back(item.second);
-  sdata->sdata_op_ordering_lock.Unlock();
-  ThreadPool::TPHandle tp_handle(osd->cct, hb, timeout_interval, 
-    suicide_interval);
+  unsigned priority = item.second->get_req()->get_priority();
+  unsigned cost = item.second->get_req()->get_cost();
+  if (priority >= CEPH_MSG_PRIO_LOW)
+    pqueue.enqueue_strict_front(
+      item.second->get_req()->get_source_inst(),
+      priority, item);
+  else
+    pqueue.enqueue_front(item.second->get_req()->get_source_inst(),
+      priority, cost, item);
+  osd->logger->set(l_osd_opq, pqueue.length());
+}
 
-  (item.first)->lock_suspend_timeout(tp_handle);
+PGRef OSD::OpWQ::_dequeue()
+{
+  assert(!pqueue.empty());
+  PGRef pg;
+  {
+    Mutex::Locker l(qlock);
+    pair<PGRef, OpRequestRef> ret = pqueue.dequeue();
+    pg = ret.first;
+    pg_for_processing[&*pg].push_back(ret.second);
+  }
+  osd->logger->set(l_osd_opq, pqueue.length());
+  return pg;
+}
 
+void OSD::OpWQ::_process(PGRef pg, ThreadPool::TPHandle &handle)
+{
+  pg->lock_suspend_timeout(handle);
   OpRequestRef op;
   {
-    Mutex::Locker l(sdata->sdata_op_ordering_lock);
-    if (!sdata->pg_for_processing.count(&*(item.first))) {
-      (item.first)->unlock();
+    Mutex::Locker l(qlock);
+    if (!pg_for_processing.count(&*pg)) {
+      pg->unlock();
       return;
     }
-    assert(sdata->pg_for_processing[&*(item.first)].size());
-    op = sdata->pg_for_processing[&*(item.first)].front();
-    sdata->pg_for_processing[&*(item.first)].pop_front();
-    if (!(sdata->pg_for_processing[&*(item.first)].size()))
-      sdata->pg_for_processing.erase(&*(item.first));
-  }  
-
-  // osd:opwq_process marks the point at which an operation has been dequeued
-  // and will begin to be handled by a worker thread.
-  {
-#ifdef WITH_LTTNG
-    osd_reqid_t reqid = op->get_reqid();
-#endif
-    tracepoint(osd, opwq_process_start, reqid.name._type,
-        reqid.name._num, reqid.tid, reqid.inc);
+    assert(pg_for_processing[&*pg].size());
+    op = pg_for_processing[&*pg].front();
+    pg_for_processing[&*pg].pop_front();
+    if (!(pg_for_processing[&*pg].size()))
+      pg_for_processing.erase(&*pg);
   }
 
   lgeneric_subdout(osd->cct, osd, 30) << "dequeue status: ";
@@ -8274,72 +7769,16 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb )
   delete f;
   *_dout << dendl;
 
-  osd->dequeue_op(item.first, op, tp_handle);
-
-  {
-#ifdef WITH_LTTNG
-    osd_reqid_t reqid = op->get_reqid();
-#endif
-    tracepoint(osd, opwq_process_finish, reqid.name._type,
-        reqid.name._num, reqid.tid, reqid.inc);
-  }
-
-  (item.first)->unlock();
-}
-
-void OSD::ShardedOpWQ::_enqueue(pair<PGRef, OpRequestRef> item) {
-
-  uint32_t shard_index = (((item.first)->get_pgid().ps())% shard_list.size());
-
-  ShardData* sdata = shard_list[shard_index];
-  assert (NULL != sdata);
-  unsigned priority = item.second->get_req()->get_priority();
-  unsigned cost = item.second->get_req()->get_cost();
-  sdata->sdata_op_ordering_lock.Lock();
- 
-  if (priority >= CEPH_MSG_PRIO_LOW)
-    sdata->pqueue.enqueue_strict(
-      item.second->get_req()->get_source_inst(), priority, item);
-  else
-    sdata->pqueue.enqueue(item.second->get_req()->get_source_inst(),
-      priority, cost, item);
-  sdata->sdata_op_ordering_lock.Unlock();
-
-  sdata->sdata_lock.Lock();
-  sdata->sdata_cond.SignalOne();
-  sdata->sdata_lock.Unlock();
-
+  osd->dequeue_op(pg, op, handle);
+  pg->unlock();
 }
 
-void OSD::ShardedOpWQ::_enqueue_front(pair<PGRef, OpRequestRef> item) {
-
-  uint32_t shard_index = (((item.first)->get_pgid().ps())% shard_list.size());
-
-  ShardData* sdata = shard_list[shard_index];
-  assert (NULL != sdata);
-  sdata->sdata_op_ordering_lock.Lock();
-  if (sdata->pg_for_processing.count(&*(item.first))) {
-    sdata->pg_for_processing[&*(item.first)].push_front(item.second);
-    item.second = sdata->pg_for_processing[&*(item.first)].back();
-    sdata->pg_for_processing[&*(item.first)].pop_back();
-  }
-  unsigned priority = item.second->get_req()->get_priority();
-  unsigned cost = item.second->get_req()->get_cost();
-  if (priority >= CEPH_MSG_PRIO_LOW)
-    sdata->pqueue.enqueue_strict_front(
-      item.second->get_req()->get_source_inst(),priority, item);
-  else
-    sdata->pqueue.enqueue_front(item.second->get_req()->get_source_inst(),
-      priority, cost, item);
-
-  sdata->sdata_op_ordering_lock.Unlock();
-  sdata->sdata_lock.Lock();
-  sdata->sdata_cond.SignalOne();
-  sdata->sdata_lock.Unlock();
 
+void OSDService::dequeue_pg(PG *pg, list<OpRequestRef> *dequeued)
+{
+  osd->op_wq.dequeue(pg, dequeued);
 }
 
-
 /*
  * NOTE: dequeue called in worker thread, with pg lock
  */
@@ -8355,26 +7794,6 @@ void OSD::dequeue_op(
 	   << " latency " << latency
 	   << " " << *(op->get_req())
 	   << " pg " << *pg << dendl;
-
-  // share our map with sender, if they're old
-  if (op->send_map_update) {
-    Message *m = op->get_req();
-    Session *session = static_cast<Session *>(m->get_connection()->get_priv());
-    if (session) {
-      session->sent_epoch_lock.Lock();
-    }
-    service.share_map(
-        m->get_source(),
-        m->get_connection().get(),
-        op->sent_epoch,
-        osdmap,
-        session ? &session->last_sent_epoch : NULL);
-    if (session) {
-      session->sent_epoch_lock.Unlock();
-      session->put();
-    }
-  }
-
   if (pg->deleting)
     return;
 
@@ -8387,6 +7806,11 @@ void OSD::dequeue_op(
 }
 
 
+void OSDService::queue_for_peering(PG *pg)
+{
+  peering_wq.queue(pg);
+}
+
 struct C_CompleteSplits : public Context {
   OSD *osd;
   set<boost::intrusive_ptr<PG> > pgs;
@@ -8401,21 +7825,14 @@ struct C_CompleteSplits : public Context {
     for (set<boost::intrusive_ptr<PG> >::iterator i = pgs.begin();
 	 i != pgs.end();
 	 ++i) {
-      osd->pg_map_lock.get_write();
       (*i)->lock();
       osd->add_newly_split_pg(&**i, &rctx);
-      if (!((*i)->deleting)) {
-        to_complete.insert((*i)->info.pgid);
-        osd->service.complete_split(to_complete);
-      }
-      osd->pg_map_lock.put_write();
       osd->dispatch_context_transaction(rctx, &**i);
+      if (!((*i)->deleting))
 	to_complete.insert((*i)->info.pgid);
       (*i)->unlock();
-      osd->wake_pg_waiters(&**i, (*i)->info.pgid);
-      to_complete.clear();
     }
-
+    osd->service.complete_split(to_complete);
     osd->dispatch_context(rctx, 0, osd->service.get_osdmap());
   }
 };
@@ -8429,7 +7846,6 @@ void OSD::process_peering_events(
   epoch_t same_interval_since = 0;
   OSDMapRef curmap = service.get_osdmap();
   PG::RecoveryCtx rctx = create_context();
-  rctx.handle = &handle;
   for (list<PG*>::const_iterator i = pgs.begin();
        i != pgs.end();
        ++i) {
@@ -8442,7 +7858,9 @@ void OSD::process_peering_events(
       continue;
     }
     if (!advance_pg(curmap->get_epoch(), pg, handle, &rctx, &split_pgs)) {
-      pg->queue_null(curmap->get_epoch(), curmap->get_epoch());
+      // we need to requeue the PG explicitly since we didn't actually
+      // handle an event
+      peering_wq.queue(pg);
     } else if (!pg->peering_queue.empty()) {
       PG::CephPeeringEvtRef evt = pg->peering_queue.front();
       pg->peering_queue.pop_front();
@@ -8459,7 +7877,6 @@ void OSD::process_peering_events(
     if (compat_must_dispatch_immediately(pg)) {
       dispatch_context(rctx, pg, curmap, &handle);
       rctx = create_context();
-      rctx.handle = &handle;
     } else {
       dispatch_context_transaction(rctx, pg, &handle);
     }
@@ -8479,7 +7896,6 @@ const char** OSD::get_tracked_conf_keys() const
 {
   static const char* KEYS[] = {
     "osd_max_backfills",
-    "osd_min_recovery_priority",
     "osd_op_complaint_time", "osd_op_log_threshold",
     "osd_op_history_size", "osd_op_history_duration",
     "osd_map_cache_size",
@@ -8499,10 +7915,6 @@ void OSD::handle_conf_change(const struct md_config_t *conf,
     service.local_reserver.set_max(cct->_conf->osd_max_backfills);
     service.remote_reserver.set_max(cct->_conf->osd_max_backfills);
   }
-  if (changed.count("osd_min_recovery_priority")) {
-    service.local_reserver.set_min_priority(cct->_conf->osd_min_recovery_priority);
-    service.remote_reserver.set_min_priority(cct->_conf->osd_min_recovery_priority);
-  }
   if (changed.count("osd_op_complaint_time") ||
       changed.count("osd_op_log_threshold")) {
     op_tracker.set_complaint_and_threshold(cct->_conf->osd_op_complaint_time,
@@ -8517,11 +7929,6 @@ void OSD::handle_conf_change(const struct md_config_t *conf,
       changed.count("osd_disk_thread_ioprio_priority")) {
     set_disk_tp_priority();
   }
-  if (changed.count("osd_map_cache_size")) {
-    service.map_cache.set_size(cct->_conf->osd_map_cache_size);
-    service.map_bl_cache.set_size(cct->_conf->osd_map_cache_size);
-    service.map_bl_inc_cache.set_size(cct->_conf->osd_map_cache_size);
-  }
 
   check_config();
 }
@@ -8530,12 +7937,12 @@ void OSD::check_config()
 {
   // some sanity checks
   if (g_conf->osd_map_cache_size <= g_conf->osd_map_max_advance + 2) {
-    clog->warn() << "osd_map_cache_size (" << g_conf->osd_map_cache_size << ")"
+    clog.warn() << "osd_map_cache_size (" << g_conf->osd_map_cache_size << ")"
 		<< " is not > osd_map_max_advance ("
 		<< g_conf->osd_map_max_advance << ")";
   }
   if (g_conf->osd_map_cache_size <= (int)g_conf->osd_pg_epoch_persisted_max_stale + 2) {
-    clog->warn() << "osd_map_cache_size (" << g_conf->osd_map_cache_size << ")"
+    clog.warn() << "osd_map_cache_size (" << g_conf->osd_map_cache_size << ")"
 		<< " is not > osd_pg_epoch_persisted_max_stale ("
 		<< g_conf->osd_pg_epoch_persisted_max_stale << ")";
   }
@@ -8559,7 +7966,7 @@ void OSD::set_disk_tp_priority()
 
 // --------------------------------
 
-int OSD::init_op_flags(OpRequestRef& op)
+int OSD::init_op_flags(OpRequestRef op)
 {
   MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
   vector<OSDOp>::iterator iter;
diff --git a/src/osd/OSD.h b/src/osd/OSD.h
index 426a2b1..9d03e4d 100644
--- a/src/osd/OSD.h
+++ b/src/osd/OSD.h
@@ -53,7 +53,6 @@ using namespace std;
 #include "common/simple_cache.hpp"
 #include "common/sharedptr_registry.hpp"
 #include "common/PrioritizedQueue.h"
-#include "messages/MOSDOp.h"
 
 #define CEPH_OSD_PROTOCOL    10 /* cluster internal */
 
@@ -312,8 +311,7 @@ public:
   SharedPtrRegistry<spg_t, DeletingState> deleting_pgs;
   const int whoami;
   ObjectStore *&store;
-  LogClient &log_client;
-  LogChannelRef clog;
+  LogClient &clog;
   PGRecoveryStats &pg_recovery_stats;
   hobject_t infos_oid;
 private:
@@ -323,15 +321,15 @@ public:
   PerfCounters *&logger;
   PerfCounters *&recoverystate_perf;
   MonClient   *&monc;
-  ShardedThreadPool::ShardedWQ < pair <PGRef, OpRequestRef> > &op_wq;
+  ThreadPool::WorkQueueVal<pair<PGRef, OpRequestRef>, PGRef> &op_wq;
   ThreadPool::BatchWorkQueue<PG> &peering_wq;
   ThreadPool::WorkQueue<PG> &recovery_wq;
   ThreadPool::WorkQueue<PG> &snap_trim_wq;
   ThreadPool::WorkQueue<PG> &scrub_wq;
   ThreadPool::WorkQueue<PG> &scrub_finalize_wq;
   ThreadPool::WorkQueue<MOSDRepScrub> &rep_scrub_wq;
-  GenContextWQ recovery_gen_wq;
-  GenContextWQ op_gen_wq;
+  GenContextWQ push_wq;
+  GenContextWQ gen_wq;
   ClassHandler  *&class_handler;
 
   void dequeue_pg(PG *pg, list<OpRequestRef> *dequeued);
@@ -391,10 +389,6 @@ public:
     Mutex::Locker l(publish_lock);
     return osdmap;
   }
-  epoch_t get_osdmap_epoch() {
-    Mutex::Locker l(publish_lock);
-    return osdmap ? osdmap->get_epoch() : 0;
-  }
   void publish_map(OSDMapRef map) {
     Mutex::Locker l(publish_lock);
     osdmap = map;
@@ -415,86 +409,27 @@ public:
    * working from old maps.
    */
   OSDMapRef next_osdmap;
-  Cond pre_publish_cond;
   void pre_publish_map(OSDMapRef map) {
     Mutex::Locker l(pre_publish_lock);
     next_osdmap = map;
   }
 
   void activate_map();
-  /// map epochs reserved below
-  map<epoch_t, unsigned> map_reservations;
-
-  /// gets ref to next_osdmap and registers the epoch as reserved
-  OSDMapRef get_nextmap_reserved() {
-    Mutex::Locker l(pre_publish_lock);
-    if (!next_osdmap)
-      return OSDMapRef();
-    epoch_t e = next_osdmap->get_epoch();
-    map<epoch_t, unsigned>::iterator i =
-      map_reservations.insert(make_pair(e, 0)).first;
-    i->second++;
-    return next_osdmap;
-  }
-  /// releases reservation on map
-  void release_map(OSDMapRef osdmap) {
-    Mutex::Locker l(pre_publish_lock);
-    map<epoch_t, unsigned>::iterator i =
-      map_reservations.find(osdmap->get_epoch());
-    assert(i != map_reservations.end());
-    assert(i->second > 0);
-    if (--(i->second) == 0) {
-      map_reservations.erase(i);
-    }
-    pre_publish_cond.Signal();
-  }
-  /// blocks until there are no reserved maps prior to next_osdmap
-  void await_reserved_maps() {
-    Mutex::Locker l(pre_publish_lock);
-    assert(next_osdmap);
-    while (true) {
-      map<epoch_t, unsigned>::iterator i = map_reservations.begin();
-      if (i == map_reservations.end() || i->first >= next_osdmap->get_epoch()) {
-	break;
-      } else {
-	pre_publish_cond.Wait(pre_publish_lock);
-      }
-    }
-  }
-
-private:
-  Mutex peer_map_epoch_lock;
-  map<int, epoch_t> peer_map_epoch;
-public:
-  epoch_t get_peer_epoch(int p);
-  epoch_t note_peer_epoch(int p, epoch_t e);
-  void forget_peer_epoch(int p, epoch_t e);
-
-  void send_map(class MOSDMap *m, Connection *con);
-  void send_incremental_map(epoch_t since, Connection *con, OSDMapRef& osdmap);
-  MOSDMap *build_incremental_map_msg(epoch_t from, epoch_t to,
-                                       OSDSuperblock& superblock);
-  bool should_share_map(entity_name_t name, Connection *con, epoch_t epoch,
-                        OSDMapRef& osdmap, const epoch_t *sent_epoch_p);
-  void share_map(entity_name_t name, Connection *con, epoch_t epoch,
-                 OSDMapRef& osdmap, epoch_t *sent_epoch_p);
-  void share_map_peer(int peer, Connection *con,
-                      OSDMapRef map = OSDMapRef());
 
   ConnectionRef get_con_osd_cluster(int peer, epoch_t from_epoch);
   pair<ConnectionRef,ConnectionRef> get_con_osd_hb(int peer, epoch_t from_epoch);  // (back, front)
   void send_message_osd_cluster(int peer, Message *m, epoch_t from_epoch);
   void send_message_osd_cluster(Message *m, Connection *con) {
-    con->send_message(m);
+    cluster_messenger->send_message(m, con);
   }
   void send_message_osd_cluster(Message *m, const ConnectionRef& con) {
-    con->send_message(m);
+    cluster_messenger->send_message(m, con.get());
   }
   void send_message_osd_client(Message *m, Connection *con) {
-    con->send_message(m);
+    client_messenger->send_message(m, con);
   }
   void send_message_osd_client(Message *m, const ConnectionRef& con) {
-    con->send_message(m);
+    client_messenger->send_message(m, con.get());
   }
   entity_name_t get_cluster_msgr_name() {
     return cluster_messenger->get_myname();
@@ -650,8 +585,23 @@ public:
 
 
   // -- Objecter, for teiring reads/writes from/to other OSDs --
+  Mutex objecter_lock;
+  SafeTimer objecter_timer;
+  OSDMap objecter_osdmap;
   Objecter *objecter;
   Finisher objecter_finisher;
+  struct ObjecterDispatcher : public Dispatcher {
+    OSDService *osd;
+    bool ms_dispatch(Message *m);
+    bool ms_handle_reset(Connection *con);
+    void ms_handle_remote_reset(Connection *con) {}
+    void ms_handle_connect(Connection *con);
+    bool ms_get_authorizer(int dest_type,
+			   AuthAuthorizer **authorizer,
+			   bool force_new);
+    ObjecterDispatcher(OSDService *o) : Dispatcher(cct), osd(o) {}
+  } objecter_dispatcher;
+  friend struct ObjecterDispatcher;
 
 
   // -- Watch --
@@ -680,6 +630,11 @@ public:
   }
 
   // -- backfill_reservation --
+  enum {
+    BACKFILL_LOW = 0,   // backfill non-degraded PGs
+    BACKFILL_HIGH = 1,	// backfill degraded PGs
+    RECOVERY = AsyncReserver<spg_t>::MAX_PRIORITY  // log based recovery
+  };
   Finisher reserver_finisher;
   AsyncReserver<spg_t> local_reserver;
   AsyncReserver<spg_t> remote_reserver;
@@ -775,16 +730,6 @@ public:
 			 spg_t pgid);
   void init_splits_between(spg_t pgid, OSDMapRef frommap, OSDMapRef tomap);
 
-  // -- stats --
-  Mutex stat_lock;
-  osd_stat_t osd_stat;
-
-  void update_osd_stat(vector<int>& hb_peers);
-  osd_stat_t get_osd_stat() {
-    Mutex::Locker l(stat_lock);
-    return osd_stat;
-  }
-
   // -- OSD Full Status --
   Mutex full_status_lock;
   enum s_names { NONE, NEAR, FULL } cur_state;
@@ -796,39 +741,6 @@ public:
   bool check_failsafe_full();
   bool too_full_for_backfill(double *ratio, double *max_ratio);
 
-  // -- epochs --
-private:
-  mutable Mutex epoch_lock; // protects access to boot_epoch, up_epoch, bind_epoch
-  epoch_t boot_epoch;  // _first_ epoch we were marked up (after this process started)
-  epoch_t up_epoch;    // _most_recent_ epoch we were marked up
-  epoch_t bind_epoch;  // epoch we last did a bind to new ip:ports
-public:
-  /**
-   * Retrieve the boot_, up_, and bind_ epochs the OSD has set. The params
-   * can be NULL if you don't care about them.
-   */
-  void retrieve_epochs(epoch_t *_boot_epoch, epoch_t *_up_epoch,
-                       epoch_t *_bind_epoch) const;
-  /**
-   * Set the boot, up, and bind epochs. Any NULL params will not be set.
-   */
-  void set_epochs(const epoch_t *_boot_epoch, const epoch_t *_up_epoch,
-                  const epoch_t *_bind_epoch);
-  epoch_t get_boot_epoch() const {
-    epoch_t ret;
-    retrieve_epochs(&ret, NULL, NULL);
-    return ret;
-  }
-  epoch_t get_up_epoch() const {
-    epoch_t ret;
-    retrieve_epochs(NULL, &ret, NULL);
-    return ret;
-  }
-  epoch_t get_bind_epoch() const {
-    epoch_t ret;
-    retrieve_epochs(NULL, NULL, &ret);
-    return ret;
-  }
 
   // -- stopping --
   Mutex is_stopping_lock;
@@ -925,8 +837,7 @@ protected:
   PerfCounters      *recoverystate_perf;
   ObjectStore *store;
 
-  LogClient log_client;
-  LogChannelRef clog;
+  LogClient clog;
 
   int whoami;
   std::string dev_path, journal_path;
@@ -948,7 +859,6 @@ protected:
   void tick();
   void _dispatch(Message *m);
   void dispatch_op(OpRequestRef op);
-  bool dispatch_op_fast(OpRequestRef& op, OSDMapRef& osdmap);
 
   void check_osdmap_features(ObjectStore *store);
 
@@ -1050,35 +960,21 @@ public:
   }
 
 private:
-  atomic_t state;
+  int state;
+  epoch_t boot_epoch;  // _first_ epoch we were marked up (after this process started)
+  epoch_t up_epoch;    // _most_recent_ epoch we were marked up
+  epoch_t bind_epoch;  // epoch we last did a bind to new ip:ports
 
 public:
-  int get_state() {
-    return state.read();
-  }
-  void set_state(int s) {
-    state.set(s);
-  }
-  bool is_initializing() {
-    return get_state() == STATE_INITIALIZING;
-  }
-  bool is_booting() {
-    return get_state() == STATE_BOOTING;
-  }
-  bool is_active() {
-    return get_state() == STATE_ACTIVE;
-  }
-  bool is_stopping() {
-    return get_state() == STATE_STOPPING;
-  }
-  bool is_waiting_for_healthy() {
-    return get_state() == STATE_WAITING_FOR_HEALTHY;
-  }
+  bool is_initializing() { return state == STATE_INITIALIZING; }
+  bool is_booting() { return state == STATE_BOOTING; }
+  bool is_active() { return state == STATE_ACTIVE; }
+  bool is_stopping() { return state == STATE_STOPPING; }
+  bool is_waiting_for_healthy() { return state == STATE_WAITING_FOR_HEALTHY; }
 
 private:
 
-  ThreadPool osd_tp;
-  ShardedThreadPool osd_op_tp;
+  ThreadPool op_tp;
   ThreadPool recovery_tp;
   ThreadPool disk_tp;
   ThreadPool command_tp;
@@ -1089,197 +985,16 @@ private:
 
   // -- sessions --
 public:
-
-
-  static bool split_request(OpRequestRef op, unsigned match, unsigned bits) {
-    unsigned mask = ~((~0)<<bits);
-    switch (op->get_req()->get_type()) {
-    case CEPH_MSG_OSD_OP:
-      return (static_cast<MOSDOp*>(
-		op->get_req())->get_pg().m_seed & mask) == match;
-    }
-    return false;
-  }
-
-  static void split_list(
-    list<OpRequestRef> *from,
-    list<OpRequestRef> *to,
-    unsigned match,
-    unsigned bits) {
-    for (list<OpRequestRef>::iterator i = from->begin();
-	 i != from->end();
-      ) {
-      if (split_request(*i, match, bits)) {
-	to->push_back(*i);
-	from->erase(i++);
-      } else {
-	++i;
-      }
-    }
-  }
-
   struct Session : public RefCountedObject {
     EntityName entity_name;
     OSDCap caps;
     int64_t auid;
+    epoch_t last_sent_epoch;
     ConnectionRef con;
     WatchConState wstate;
 
-    Mutex session_dispatch_lock;
-    list<OpRequestRef> waiting_on_map;
-
-    OSDMapRef osdmap;  /// Map as of which waiting_for_pg is current
-    map<spg_t, list<OpRequestRef> > waiting_for_pg;
-
-    Mutex sent_epoch_lock;
-    epoch_t last_sent_epoch;
-    Mutex received_map_lock;
-    epoch_t received_map_epoch; // largest epoch seen in MOSDMap from here
-
-    Session(CephContext *cct) :
-      RefCountedObject(cct),
-      auid(-1), con(0),
-      session_dispatch_lock("Session::session_dispatch_lock"),
-      sent_epoch_lock("Session::sent_epoch_lock"), last_sent_epoch(0),
-      received_map_lock("Session::received_map_lock"), received_map_epoch(0)
-    {}
-
-
+    Session() : auid(-1), last_sent_epoch(0), con(0) {}
   };
-  void update_waiting_for_pg(Session *session, OSDMapRef osdmap);
-  void session_notify_pg_create(Session *session, OSDMapRef osdmap, spg_t pgid);
-  void session_notify_pg_cleared(Session *session, OSDMapRef osdmap, spg_t pgid);
-  void dispatch_session_waiting(Session *session, OSDMapRef osdmap);
-
-  Mutex session_waiting_lock;
-  set<Session*> session_waiting_for_map;
-  map<spg_t, set<Session*> > session_waiting_for_pg;
-
-  void clear_waiting_sessions() {
-    Mutex::Locker l(session_waiting_lock);
-    for (map<spg_t, set<Session*> >::iterator i =
-	   session_waiting_for_pg.begin();
-	 i != session_waiting_for_pg.end();
-	 ++i) {
-      for (set<Session*>::iterator j = i->second.begin();
-	   j != i->second.end();
-	   ++j) {
-	(*j)->put();
-      }
-    }
-    session_waiting_for_pg.clear();
-
-    for (set<Session*>::iterator i = session_waiting_for_map.begin();
-	 i != session_waiting_for_map.end();
-	 ++i) {
-      (*i)->put();
-    }
-    session_waiting_for_map.clear();
-  }
-
-  /// Caller assumes refs for included Sessions
-  void get_sessions_waiting_for_map(set<Session*> *out) {
-    Mutex::Locker l(session_waiting_lock);
-    out->swap(session_waiting_for_map);
-  }
-  void register_session_waiting_on_map(Session *session) {
-    Mutex::Locker l(session_waiting_lock);
-    if (session_waiting_for_map.count(session) == 0) {
-      session->get();
-      session_waiting_for_map.insert(session);
-    }
-  }
-  void clear_session_waiting_on_map(Session *session) {
-    Mutex::Locker l(session_waiting_lock);
-    set<Session*>::iterator i = session_waiting_for_map.find(session);
-    if (i != session_waiting_for_map.end()) {
-      (*i)->put();
-      session_waiting_for_map.erase(i);
-    }
-  }
-  void dispatch_sessions_waiting_on_map() {
-    set<Session*> sessions_to_check;
-    get_sessions_waiting_for_map(&sessions_to_check);
-    for (set<Session*>::iterator i = sessions_to_check.begin();
-	 i != sessions_to_check.end();
-	 sessions_to_check.erase(i++)) {
-      (*i)->session_dispatch_lock.Lock();
-      update_waiting_for_pg(*i, osdmap);
-      dispatch_session_waiting(*i, osdmap);
-      (*i)->session_dispatch_lock.Unlock();
-      (*i)->put();
-    }
-  }
-  void clear_session_waiting_on_pg(Session *session, spg_t pgid) {
-    Mutex::Locker l(session_waiting_lock);
-    map<spg_t, set<Session*> >::iterator i = session_waiting_for_pg.find(pgid);
-    if (i == session_waiting_for_pg.end()) {
-      return;
-    }
-    set<Session*>::iterator j = i->second.find(session);
-    if (j != i->second.end()) {
-      (*j)->put();
-      i->second.erase(j);
-    }
-    if (i->second.empty()) {
-      session_waiting_for_pg.erase(i);
-    }
-  }
-  void session_handle_reset(Session *session) {
-    Mutex::Locker l(session->session_dispatch_lock);
-    clear_session_waiting_on_map(session);
-    vector<spg_t> pgs_to_clear;
-    pgs_to_clear.reserve(session->waiting_for_pg.size());
-    for (map<spg_t, list<OpRequestRef> >::iterator i =
-	   session->waiting_for_pg.begin();
-	 i != session->waiting_for_pg.end();
-	 ++i) {
-      pgs_to_clear.push_back(i->first);
-    }
-    for (vector<spg_t>::iterator i = pgs_to_clear.begin();
-	 i != pgs_to_clear.end();
-	 ++i) {
-      clear_session_waiting_on_pg(session, *i);
-    }
-  }
-  void register_session_waiting_on_pg(Session *session, spg_t pgid) {
-    Mutex::Locker l(session_waiting_lock);
-    set<Session*> &s = session_waiting_for_pg[pgid];
-    set<Session*>::iterator i = s.find(session);
-    if (i == s.end()) {
-      session->get();
-      s.insert(session);
-    }
-  }
-  void get_sessions_possibly_interested_in_pg(
-    spg_t pgid, set<Session*> *sessions) {
-    Mutex::Locker l(session_waiting_lock);
-    while (1) {
-      map<spg_t, set<Session*> >::iterator i = session_waiting_for_pg.find(pgid);
-      if (i != session_waiting_for_pg.end()) {
-	sessions->insert(i->second.begin(), i->second.end());
-      }
-      if (pgid.pgid.ps() == 0) {
-	break;
-      } else {
-	pgid = pgid.get_parent();
-      }
-    }
-    for (set<Session*>::iterator i = sessions->begin();
-	 i != sessions->end();
-	 ++i) {
-      (*i)->get();
-    }
-  }
-  void get_pgs_with_waiting_sessions(set<spg_t> *pgs) {
-    Mutex::Locker l(session_waiting_lock);
-    for (map<spg_t, set<Session*> >::iterator i =
-	   session_waiting_for_pg.begin();
-	 i != session_waiting_for_pg.end();
-	 ++i) {
-      pgs->insert(i->first);
-    }
-  }
 
 private:
   /**
@@ -1334,7 +1049,6 @@ private:
   map<int, int> debug_heartbeat_drops_remaining;
   Cond heartbeat_cond;
   bool heartbeat_stop;
-  Mutex heartbeat_update_lock; // orders under heartbeat_lock
   bool heartbeat_need_update;   ///< true if we need to refresh our heartbeat peers
   epoch_t heartbeat_epoch;      ///< last epoch we updated our heartbeat peers
   map<int,HeartbeatInfo> heartbeat_peers;  ///< map of osd id to HeartbeatInfo
@@ -1349,14 +1063,6 @@ private:
   bool heartbeat_reset(Connection *con);
   void maybe_update_heartbeat_peers();
   void reset_heartbeat_peers();
-  bool heartbeat_peers_need_update() {
-    Mutex::Locker l(heartbeat_update_lock);
-    return heartbeat_need_update;
-  }
-  void heartbeat_set_peers_need_update() {
-    Mutex::Locker l(heartbeat_update_lock);
-    heartbeat_need_update = true;
-  }
   void heartbeat();
   void heartbeat_check();
   void heartbeat_entry();
@@ -1384,7 +1090,7 @@ public:
     HeartbeatDispatcher(OSD *o) : Dispatcher(cct), osd(o) {}
     bool ms_dispatch(Message *m) {
       return osd->heartbeat_dispatch(m);
-    }
+    };
     bool ms_handle_reset(Connection *con) {
       return osd->heartbeat_reset(con);
     }
@@ -1398,6 +1104,12 @@ public:
   } heartbeat_dispatcher;
 
 private:
+  // -- stats --
+  Mutex stat_lock;
+  osd_stat_t osd_stat;
+
+  void update_osd_stat();
+  
   // -- waiters --
   list<OpRequestRef> finished;
   Mutex finished_lock;
@@ -1429,124 +1141,67 @@ private:
 
   // -- op queue --
 
- 
-  class ShardedOpWQ: public ShardedThreadPool::ShardedWQ < pair <PGRef, OpRequestRef> > {
-
-    struct ShardData {
-      Mutex sdata_lock;
-      Cond sdata_cond;
-      Mutex sdata_op_ordering_lock;
-      map<PG*, list<OpRequestRef> > pg_for_processing;
-      PrioritizedQueue< pair<PGRef, OpRequestRef>, entity_inst_t> pqueue;
-      ShardData(string lock_name, string ordering_lock, uint64_t max_tok_per_prio, uint64_t min_cost):
-          sdata_lock(lock_name.c_str()),
-          sdata_op_ordering_lock(ordering_lock.c_str()),
-          pqueue(max_tok_per_prio, min_cost) {}
-    };
-
-    vector<ShardData*> shard_list;
+  struct OpWQ: public ThreadPool::WorkQueueVal<pair<PGRef, OpRequestRef>,
+					       PGRef > {
+    Mutex qlock;
+    map<PG*, list<OpRequestRef> > pg_for_processing;
     OSD *osd;
-    uint32_t num_shards;
-
-    public:
-      ShardedOpWQ(uint32_t pnum_shards, OSD *o, time_t ti, ShardedThreadPool* tp):
-        ShardedThreadPool::ShardedWQ < pair <PGRef, OpRequestRef> >(ti, ti*10, tp),
-        osd(o), num_shards(pnum_shards) {
-        for(uint32_t i = 0; i < num_shards; i++) {
-          char lock_name[32] = {0};
-          snprintf(lock_name, sizeof(lock_name), "%s.%d", "OSD:ShardedOpWQ:", i);
-          char order_lock[32] = {0};
-          snprintf(order_lock, sizeof(order_lock), "%s.%d", "OSD:ShardedOpWQ:order:", i);
-          ShardData* one_shard = new ShardData(lock_name, order_lock, 
-            osd->cct->_conf->osd_op_pq_max_tokens_per_priority, 
-            osd->cct->_conf->osd_op_pq_min_cost);
-          shard_list.push_back(one_shard);
-        }
-      }
-
-      ~ShardedOpWQ() {
-
-        while(!shard_list.empty()) {
-          delete shard_list.back();
-          shard_list.pop_back();
-        }
-      }
-
-      void _process(uint32_t thread_index, heartbeat_handle_d *hb);
-      void _enqueue(pair <PGRef, OpRequestRef> item);
-      void _enqueue_front(pair <PGRef, OpRequestRef> item);
-      
-      void return_waiting_threads() {
-        for(uint32_t i = 0; i < num_shards; i++) {
-          ShardData* sdata = shard_list[i];
-          assert (NULL != sdata); 
-          sdata->sdata_lock.Lock();
-          sdata->sdata_cond.Signal();
-          sdata->sdata_lock.Unlock();
-        }
-      
-      }
+    PrioritizedQueue<pair<PGRef, OpRequestRef>, entity_inst_t > pqueue;
+    OpWQ(OSD *o, time_t ti, ThreadPool *tp)
+      : ThreadPool::WorkQueueVal<pair<PGRef, OpRequestRef>, PGRef >(
+	"OSD::OpWQ", ti, ti*10, tp),
+	qlock("OpWQ::qlock"),
+	osd(o),
+	pqueue(o->cct->_conf->osd_op_pq_max_tokens_per_priority,
+	       o->cct->_conf->osd_op_pq_min_cost)
+    {}
 
-      void dump(Formatter *f) {
-        for(uint32_t i = 0; i < num_shards; i++) {
-          ShardData* sdata = shard_list[i];
-          assert (NULL != sdata);
-          sdata->sdata_op_ordering_lock.Lock();
-          sdata->pqueue.dump(f);
-          sdata->sdata_op_ordering_lock.Unlock();
-        }
-      }
+    void dump(Formatter *f) {
+      lock();
+      pqueue.dump(f);
+      unlock();
+    }
 
-      struct Pred {
-        PG *pg;
-        Pred(PG *pg) : pg(pg) {}
-        bool operator()(const pair<PGRef, OpRequestRef> &op) {
-          return op.first == pg;
-        }
-      };
-
-      void dequeue(PG *pg, list<OpRequestRef> *dequeued = 0) {
-        ShardData* sdata = NULL;
-        assert(pg != NULL);
-        uint32_t shard_index = pg->get_pgid().ps()% shard_list.size();
-        sdata = shard_list[shard_index];
-        assert(sdata != NULL);
-        if (!dequeued) {
-          sdata->sdata_op_ordering_lock.Lock();
-          sdata->pqueue.remove_by_filter(Pred(pg));
-          sdata->pg_for_processing.erase(pg);
-          sdata->sdata_op_ordering_lock.Unlock();
-        } else {
-          list<pair<PGRef, OpRequestRef> > _dequeued;
-          sdata->sdata_op_ordering_lock.Lock();
-          sdata->pqueue.remove_by_filter(Pred(pg), &_dequeued);
-          for (list<pair<PGRef, OpRequestRef> >::iterator i = _dequeued.begin();
-            i != _dequeued.end(); ++i) {
-            dequeued->push_back(i->second);
-          }
-	  if (sdata->pg_for_processing.count(pg)) {
-	    dequeued->splice(
-	      dequeued->begin(),
-	      sdata->pg_for_processing[pg]);
-	    sdata->pg_for_processing.erase(pg);
-	  }
-          sdata->sdata_op_ordering_lock.Unlock();          
-        }
+    void _enqueue_front(pair<PGRef, OpRequestRef> item);
+    void _enqueue(pair<PGRef, OpRequestRef> item);
+    PGRef _dequeue();
 
+    struct Pred {
+      PG *pg;
+      Pred(PG *pg) : pg(pg) {}
+      bool operator()(const pair<PGRef, OpRequestRef> &op) {
+	return op.first == pg;
       }
- 
-      bool is_shard_empty(uint32_t thread_index) {
-        uint32_t shard_index = thread_index % num_shards; 
-        ShardData* sdata = shard_list[shard_index];
-        assert(NULL != sdata);
-        Mutex::Locker l(sdata->sdata_op_ordering_lock);
-        return sdata->pqueue.empty();
+    };
+    void dequeue(PG *pg, list<OpRequestRef> *dequeued = 0) {
+      lock();
+      if (!dequeued) {
+	pqueue.remove_by_filter(Pred(pg));
+	pg_for_processing.erase(pg);
+      } else {
+	list<pair<PGRef, OpRequestRef> > _dequeued;
+	pqueue.remove_by_filter(Pred(pg), &_dequeued);
+	for (list<pair<PGRef, OpRequestRef> >::iterator i = _dequeued.begin();
+	     i != _dequeued.end();
+	     ++i) {
+	  dequeued->push_back(i->second);
+	}
+	if (pg_for_processing.count(pg)) {
+	  dequeued->splice(
+	    dequeued->begin(),
+	    pg_for_processing[pg]);
+	  pg_for_processing.erase(pg);
+	}
       }
+      unlock();
+    }
+    bool _empty() {
+      return pqueue.empty();
+    }
+    void _process(PGRef pg, ThreadPool::TPHandle &handle);
+  } op_wq;
 
-  } op_shardedwq;
-
-
-  void enqueue_op(PG *pg, OpRequestRef& op);
+  void enqueue_op(PG *pg, OpRequestRef op);
   void dequeue_op(
     PGRef pg, OpRequestRef op,
     ThreadPool::TPHandle &handle);
@@ -1618,15 +1273,21 @@ private:
   OSDMapRef get_osdmap() {
     return osdmap;
   }
-  epoch_t get_osdmap_epoch() {
-    return osdmap ? osdmap->get_epoch() : 0;
-  }
-
   utime_t         had_map_since;
   RWLock          map_lock;
   list<OpRequestRef>  waiting_for_osdmap;
 
-  friend struct send_map_on_destruct;
+  Mutex peer_map_epoch_lock;
+  map<int, epoch_t> peer_map_epoch;
+  
+  epoch_t get_peer_epoch(int p);
+  epoch_t note_peer_epoch(int p, epoch_t e);
+  void forget_peer_epoch(int p, epoch_t e);
+
+  bool _share_map_incoming(entity_name_t name, Connection *con, epoch_t epoch,
+			   Session *session = 0);
+  void _share_map_outgoing(int peer, Connection *con,
+			   OSDMapRef map = OSDMapRef());
 
   void wait_for_new_map(OpRequestRef op);
   void handle_osd_map(class MOSDMap *m);
@@ -1665,18 +1326,23 @@ private:
   void pin_map_inc_bl(epoch_t e, bufferlist &bl) {
     return service.pin_map_inc_bl(e, bl);
   }
+  bool get_inc_map_bl(epoch_t e, bufferlist& bl) {
+    return service.get_inc_map_bl(e, bl);
+  }
+
+  MOSDMap *build_incremental_map_msg(epoch_t from, epoch_t to);
+  void send_incremental_map(epoch_t since, Connection *con);
+  void send_map(MOSDMap *m, Connection *con);
 
 protected:
   // -- placement groups --
-  RWLock pg_map_lock; // this lock orders *above* individual PG _locks
-  ceph::unordered_map<spg_t, PG*> pg_map; // protected by pg_map lock
-
+  ceph::unordered_map<spg_t, PG*> pg_map;
+  map<spg_t, list<OpRequestRef> > waiting_for_pg;
   map<spg_t, list<PG::CephPeeringEvtRef> > peering_wait_for_split;
   PGRecoveryStats pg_recovery_stats;
 
   PGPool _get_pool(int id, OSDMapRef createmap);
 
-  PG *get_pg_or_queue_for_pg(const spg_t& pgid, OpRequestRef& op);
   bool  _have_pg(spg_t pgid);
   PG   *_lookup_lock_pg_with_map_lock_held(spg_t pgid);
   PG   *_lookup_lock_pg(spg_t pgid);
@@ -1691,11 +1357,6 @@ protected:
   };
   res_result _try_resurrect_pg(
     OSDMapRef curmap, spg_t pgid, spg_t *resurrected, PGRef *old_pg_state);
-
-  /**
-   * After unlocking the pg, the user must ensure that wake_pg_waiters
-   * is called.
-   */
   PG   *_create_lock_pg(
     OSDMapRef createmap,
     spg_t pgid,
@@ -1738,23 +1399,20 @@ protected:
     int lastactingprimary
     ); ///< @return false if there was a map gap between from and now
 
-  void wake_pg_waiters(PG* pg, spg_t pgid) {
-    assert(osd_lock.is_locked());
-    // Need write lock on pg_map_lock
-    set<Session*> concerned_sessions;
-    get_sessions_possibly_interested_in_pg(pgid, &concerned_sessions);
-
-    for (set<Session*>::iterator i = concerned_sessions.begin();
-	 i != concerned_sessions.end();
-	 ++i) {
-      {
-	Mutex::Locker l((*i)->session_dispatch_lock);
-	session_notify_pg_create(*i, osdmap, pgid);
-	dispatch_session_waiting(*i, osdmap);
-      }
-      (*i)->put();
+  void wake_pg_waiters(spg_t pgid) {
+    if (waiting_for_pg.count(pgid)) {
+      take_waiters_front(waiting_for_pg[pgid]);
+      waiting_for_pg.erase(pgid);
     }
   }
+  void wake_all_pg_waiters() {
+    for (map<spg_t, list<OpRequestRef> >::iterator p = waiting_for_pg.begin();
+	 p != waiting_for_pg.end();
+	 ++p)
+      take_waiters_front(p->second);
+    waiting_for_pg.clear();
+  }
+
 
   // -- pg creation --
   struct create_pg_info {
@@ -1907,11 +1565,11 @@ protected:
    * address as in the given map.
    * @pre op was sent by an OSD using the cluster messenger
    */
-  bool require_same_peer_instance(OpRequestRef& op, OSDMapRef& map,
-				  bool is_fast_dispatch);
+  bool require_same_peer_instance(OpRequestRef& op, OSDMapRef& map);
+  bool require_up_osd_peer(OpRequestRef& Op, OSDMapRef& map,
+                           epoch_t their_epoch);
 
-  bool require_same_or_newer_map(OpRequestRef& op, epoch_t e,
-				 bool is_fast_dispatch);
+  bool require_same_or_newer_map(OpRequestRef& op, epoch_t e);
 
   void handle_pg_query(OpRequestRef op);
   void handle_pg_notify(OpRequestRef op);
@@ -1919,6 +1577,9 @@ protected:
   void handle_pg_info(OpRequestRef op);
   void handle_pg_trim(OpRequestRef op);
 
+  void handle_pg_scan(OpRequestRef op);
+
+  void handle_pg_backfill(OpRequestRef op);
   void handle_pg_backfill_reserve(OpRequestRef op);
   void handle_pg_recovery_reserve(OpRequestRef op);
 
@@ -2272,36 +1933,12 @@ protected:
   }
 
  private:
-  bool ms_can_fast_dispatch_any() const { return true; }
-  bool ms_can_fast_dispatch(Message *m) const {
-    switch (m->get_type()) {
-    case CEPH_MSG_OSD_OP:
-    case MSG_OSD_SUBOP:
-    case MSG_OSD_SUBOPREPLY:
-    case MSG_OSD_PG_PUSH:
-    case MSG_OSD_PG_PULL:
-    case MSG_OSD_PG_PUSH_REPLY:
-    case MSG_OSD_PG_SCAN:
-    case MSG_OSD_PG_BACKFILL:
-    case MSG_OSD_EC_WRITE:
-    case MSG_OSD_EC_WRITE_REPLY:
-    case MSG_OSD_EC_READ:
-    case MSG_OSD_EC_READ_REPLY:
-      return true;
-    default:
-      return false;
-    }
-  }
-  void ms_fast_dispatch(Message *m);
-  void ms_fast_preprocess(Message *m);
   bool ms_dispatch(Message *m);
   bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new);
   bool ms_verify_authorizer(Connection *con, int peer_type,
 			    int protocol, bufferlist& authorizer, bufferlist& authorizer_reply,
 			    bool& isvalid, CryptoKey& session_key);
   void ms_handle_connect(Connection *con);
-  void ms_handle_fast_connect(Connection *con);
-  void ms_handle_fast_accept(Connection *con);
   bool ms_handle_reset(Connection *con);
   void ms_handle_remote_reset(Connection *con) {}
 
@@ -2359,10 +1996,10 @@ public:
   void handle_rep_scrub(MOSDRepScrub *m);
   void handle_scrub(struct MOSDScrub *m);
   void handle_osd_ping(class MOSDPing *m);
-  void handle_op(OpRequestRef& op, OSDMapRef& osdmap);
+  void handle_op(OpRequestRef op);
 
   template <typename T, int MSGTYPE>
-  void handle_replica_op(OpRequestRef& op, OSDMapRef& osdmap);
+  void handle_replica_op(OpRequestRef op);
 
   /// check if we can throw out op from a disconnected client
   static bool op_is_discardable(class MOSDOp *m);
@@ -2370,7 +2007,7 @@ public:
 public:
   void force_remount();
 
-  int init_op_flags(OpRequestRef& op);
+  int init_op_flags(OpRequestRef op);
 
   OSDService service;
   friend class OSDService;
diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc
index 1014a81..645a6f7 100644
--- a/src/osd/OSDMap.cc
+++ b/src/osd/OSDMap.cc
@@ -95,24 +95,22 @@ void osd_xinfo_t::dump(Formatter *f) const
   f->dump_float("laggy_probability", laggy_probability);
   f->dump_int("laggy_interval", laggy_interval);
   f->dump_int("features", features);
-  f->dump_unsigned("old_weight", old_weight);
 }
 
 void osd_xinfo_t::encode(bufferlist& bl) const
 {
-  ENCODE_START(3, 1, bl);
+  ENCODE_START(2, 1, bl);
   ::encode(down_stamp, bl);
   __u32 lp = laggy_probability * 0xfffffffful;
   ::encode(lp, bl);
   ::encode(laggy_interval, bl);
   ::encode(features, bl);
-  ::encode(old_weight, bl);
   ENCODE_FINISH(bl);
 }
 
 void osd_xinfo_t::decode(bufferlist::iterator& bl)
 {
-  DECODE_START(3, bl);
+  DECODE_START(1, bl);
   ::decode(down_stamp, bl);
   __u32 lp;
   ::decode(lp, bl);
@@ -122,10 +120,6 @@ void osd_xinfo_t::decode(bufferlist::iterator& bl)
     ::decode(features, bl);
   else
     features = 0;
-  if (struct_v >= 3)
-    ::decode(old_weight, bl);
-  else
-    old_weight = 0;
   DECODE_FINISH(bl);
 }
 
@@ -136,15 +130,13 @@ void osd_xinfo_t::generate_test_instances(list<osd_xinfo_t*>& o)
   o.back()->down_stamp = utime_t(2, 3);
   o.back()->laggy_probability = .123;
   o.back()->laggy_interval = 123456;
-  o.back()->old_weight = 0x7fff;
 }
 
 ostream& operator<<(ostream& out, const osd_xinfo_t& xi)
 {
   return out << "down_stamp " << xi.down_stamp
 	     << " laggy_probability " << xi.laggy_probability
-	     << " laggy_interval " << xi.laggy_interval
-	     << " old_weight " << xi.old_weight;
+	     << " laggy_interval " << xi.laggy_interval;
 }
 
 // ----------------------------------
@@ -698,7 +690,7 @@ void OSDMap::Incremental::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("new_pg_temp");
-  for (map<pg_t,vector<int32_t> >::const_iterator p = new_pg_temp.begin();
+  for (map<pg_t,vector<int> >::const_iterator p = new_pg_temp.begin();
        p != new_pg_temp.end();
        ++p) {
     f->open_object_section("pg");
@@ -712,7 +704,7 @@ void OSDMap::Incremental::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("primary_temp");
-  for (map<pg_t, int32_t>::const_iterator p = new_primary_temp.begin();
+  for (map<pg_t, int>::const_iterator p = new_primary_temp.begin();
       p != new_primary_temp.end();
       ++p) {
     f->dump_stream("pgid") << p->first;
@@ -789,7 +781,7 @@ void OSDMap::Incremental::dump(Formatter *f) const
   f->open_array_section("old_erasure_code_profiles");
   for (vector<string>::const_iterator p = old_erasure_code_profiles.begin();
        p != old_erasure_code_profiles.end();
-       ++p) {
+       p++) {
     f->dump_string("old", p->c_str());
   }
   f->close_section();
@@ -993,17 +985,6 @@ uint64_t OSDMap::get_features(int entity_type, uint64_t *pmask) const
 	features |= CEPH_FEATURE_CRUSH_TUNABLES3;
     }
   }
-  if (entity_type == CEPH_ENTITY_TYPE_OSD) {
-    for (map<string,map<string,string> >::const_iterator p = erasure_code_profiles.begin();
-	 p != erasure_code_profiles.end();
-	 p++) {
-      const map<string,string> &profile = p->second;
-      map<string,string>::const_iterator plugin = profile.find("plugin");
-      if (plugin != profile.end() && (plugin->second == "isa" ||
-				      plugin->second == "lrc"))
-	features |= CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2;
-    }
-  }
   mask |= CEPH_FEATURE_OSDHASHPSPOOL | CEPH_FEATURE_OSD_CACHEPOOL;
   if (entity_type != CEPH_ENTITY_TYPE_CLIENT)
     mask |= CEPH_FEATURE_OSD_ERASURE_CODES;
@@ -1109,7 +1090,7 @@ void OSDMap::remove_redundant_temporaries(CephContext *cct, const OSDMap& osdmap
 {
   ldout(cct, 10) << "remove_redundant_temporaries" << dendl;
 
-  for (map<pg_t,vector<int32_t> >::iterator p = osdmap.pg_temp->begin();
+  for (map<pg_t,vector<int> >::iterator p = osdmap.pg_temp->begin();
        p != osdmap.pg_temp->end();
        ++p) {
     if (pending_inc->new_pg_temp.count(p->first) == 0) {
@@ -1126,7 +1107,7 @@ void OSDMap::remove_redundant_temporaries(CephContext *cct, const OSDMap& osdmap
     OSDMap templess;
     templess.deepish_copy_from(osdmap);
     templess.primary_temp->clear();
-    for (map<pg_t,int32_t>::iterator p = osdmap.primary_temp->begin();
+    for (map<pg_t,int>::iterator p = osdmap.primary_temp->begin();
         p != osdmap.primary_temp->end();
         ++p) {
       if (pending_inc->new_primary_temp.count(p->first) == 0) {
@@ -1152,11 +1133,11 @@ void OSDMap::remove_down_temps(CephContext *cct,
   tmpmap.deepish_copy_from(osdmap);
   tmpmap.apply_incremental(*pending_inc);
 
-  for (map<pg_t,vector<int32_t> >::iterator p = tmpmap.pg_temp->begin();
+  for (map<pg_t,vector<int> >::iterator p = tmpmap.pg_temp->begin();
        p != tmpmap.pg_temp->end();
        ++p) {
     unsigned num_up = 0;
-    for (vector<int32_t>::iterator i = p->second.begin();
+    for (vector<int>::iterator i = p->second.begin();
 	 i != p->second.end();
 	 ++i) {
       if (!tmpmap.is_down(*i))
@@ -1165,7 +1146,7 @@ void OSDMap::remove_down_temps(CephContext *cct,
     if (num_up == 0)
       pending_inc->new_pg_temp[p->first].clear();
   }
-  for (map<pg_t,int32_t>::iterator p = tmpmap.primary_temp->begin();
+  for (map<pg_t,int>::iterator p = tmpmap.primary_temp->begin();
       p != tmpmap.primary_temp->end();
       ++p) {
     if (tmpmap.is_down(p->second))
@@ -1229,12 +1210,9 @@ int OSDMap::apply_incremental(const Incremental &inc)
        ++i) {
     set_weight(i->first, i->second);
 
-    // if we are marking in, clear the AUTOOUT and NEW bits, and clear
-    // xinfo old_weight.
-    if (i->second) {
+    // if we are marking in, clear the AUTOOUT and NEW bits.
+    if (i->second)
       osd_state[i->first] &= ~(CEPH_OSD_AUTOOUT | CEPH_OSD_NEW);
-      osd_xinfo[i->first].old_weight = 0;
-    }
   }
 
   for (map<int32_t,uint32_t>::const_iterator i = inc.new_primary_affinity.begin();
@@ -1247,13 +1225,13 @@ int OSDMap::apply_incremental(const Incremental &inc)
   for (map<string,map<string,string> >::const_iterator i =
 	 inc.new_erasure_code_profiles.begin();
        i != inc.new_erasure_code_profiles.end();
-       ++i) {
+       i++) {
     set_erasure_code_profile(i->first, i->second);
   }
   
   for (vector<string>::const_iterator i = inc.old_erasure_code_profiles.begin();
        i != inc.old_erasure_code_profiles.end();
-       ++i)
+       i++)
     erasure_code_profiles.erase(*i);
   
   // up/down
@@ -1324,7 +1302,7 @@ int OSDMap::apply_incremental(const Incremental &inc)
       (*pg_temp)[p->first] = p->second;
   }
 
-  for (map<pg_t,int32_t>::const_iterator p = inc.new_primary_temp.begin();
+  for (map<pg_t,int>::const_iterator p = inc.new_primary_temp.begin();
       p != inc.new_primary_temp.end();
       ++p) {
     if (p->second == -1)
@@ -1538,7 +1516,7 @@ void OSDMap::_get_temp_osds(const pg_pool_t& pool, pg_t pg,
                             vector<int> *temp_pg, int *temp_primary) const
 {
   pg = pool.raw_pg_to_pg(pg);
-  map<pg_t,vector<int32_t> >::const_iterator p = pg_temp->find(pg);
+  map<pg_t,vector<int> >::const_iterator p = pg_temp->find(pg);
   temp_pg->clear();
   if (p != pg_temp->end()) {
     for (unsigned i=0; i<p->second.size(); i++) {
@@ -1553,7 +1531,7 @@ void OSDMap::_get_temp_osds(const pg_pool_t& pool, pg_t pg,
       }
     }
   }
-  map<pg_t,int32_t>::const_iterator pp = primary_temp->find(pg);
+  map<pg_t,int>::const_iterator pp = primary_temp->find(pg);
   *temp_primary = -1;
   if (pp != primary_temp->end()) {
     *temp_primary = pp->second;
@@ -1595,7 +1573,7 @@ void OSDMap::pg_to_raw_up(pg_t pg, vector<int> *up, int *primary) const
   _apply_primary_affinity(pps, *pool, up, primary);
 }
   
-void OSDMap::_pg_to_up_acting_osds(const pg_t& pg, vector<int> *up, int *up_primary,
+void OSDMap::_pg_to_up_acting_osds(pg_t pg, vector<int> *up, int *up_primary,
                                    vector<int> *acting, int *acting_primary) const
 {
   const pg_pool_t *pool = get_pg_pool(pg.pool());
@@ -2066,11 +2044,11 @@ void OSDMap::dump_erasure_code_profiles(const map<string,map<string,string> > &p
   f->open_object_section("erasure_code_profiles");
   for (map<string,map<string,string> >::const_iterator i = profiles.begin();
        i != profiles.end();
-       ++i) {
+       i++) {
     f->open_object_section(i->first.c_str());
     for (map<string,string>::const_iterator j = i->second.begin();
 	 j != i->second.end();
-	 ++j) {
+	 j++) {
       f->dump_string(j->first.c_str(), j->second.c_str());
     }
     f->close_section();
@@ -2151,7 +2129,7 @@ void OSDMap::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("pg_temp");
-  for (map<pg_t,vector<int32_t> >::const_iterator p = pg_temp->begin();
+  for (map<pg_t,vector<int> >::const_iterator p = pg_temp->begin();
        p != pg_temp->end();
        ++p) {
     f->open_object_section("osds");
@@ -2165,7 +2143,7 @@ void OSDMap::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("primary_temp");
-  for (map<pg_t, int32_t>::const_iterator p = primary_temp->begin();
+  for (map<pg_t, int>::const_iterator p = primary_temp->begin();
       p != primary_temp->end();
       ++p) {
     f->dump_stream("pgid") << p->first;
@@ -2300,12 +2278,12 @@ void OSDMap::print(ostream& out) const
   }
   out << std::endl;
 
-  for (map<pg_t,vector<int32_t> >::const_iterator p = pg_temp->begin();
+  for (map<pg_t,vector<int> >::const_iterator p = pg_temp->begin();
        p != pg_temp->end();
        ++p)
     out << "pg_temp " << p->first << " " << p->second << "\n";
 
-  for (map<pg_t,int32_t>::const_iterator p = primary_temp->begin();
+  for (map<pg_t,int>::const_iterator p = primary_temp->begin();
       p != primary_temp->end();
       ++p)
     out << "primary_temp " << p->first << " " << p->second << "\n";
@@ -2544,6 +2522,8 @@ int OSDMap::build_simple(CephContext *cct, epoch_t e, uuid_d &fsid,
     pgp_bits = pg_bits;
 
   vector<string> pool_names;
+  pool_names.push_back("data");
+  pool_names.push_back("metadata");
   pool_names.push_back("rbd");
 
   stringstream ss;
@@ -2572,6 +2552,8 @@ int OSDMap::build_simple(CephContext *cct, epoch_t e, uuid_d &fsid,
     pools[pool].set_pg_num(poolbase << pg_bits);
     pools[pool].set_pgp_num(poolbase << pgp_bits);
     pools[pool].last_change = epoch;
+    if (*p == "data")
+      pools[pool].crash_replay_interval = cct->_conf->osd_default_data_pool_replay_window;
     pool_name[pool] = *p;
     name_pool[*p] = pool;
   }
@@ -2598,7 +2580,7 @@ int OSDMap::get_erasure_code_profile_default(CephContext *cct,
 					     map<string,string> &profile_map,
 					     ostream *ss)
 {
-  int r = get_json_str_map(cct->_conf->osd_pool_default_erasure_code_profile,
+  int r = get_str_map(cct->_conf->osd_pool_default_erasure_code_profile,
 		      *ss,
 		      &profile_map);
   profile_map["directory"] =
diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h
index aafadb6..b3b7ab6 100644
--- a/src/osd/OSDMap.h
+++ b/src/osd/OSDMap.h
@@ -93,10 +93,9 @@ struct osd_xinfo_t {
   float laggy_probability; ///< encoded as __u32: 0 = definitely not laggy, 0xffffffff definitely laggy
   __u32 laggy_interval;    ///< average interval between being marked laggy and recovering
   uint64_t features;       ///< features supported by this osd we should know about
-  __u32 old_weight;        ///< weight prior to being auto marked out
 
   osd_xinfo_t() : laggy_probability(0), laggy_interval(0),
-                  features(0), old_weight(0) {}
+                  features(0) {}
 
   void dump(Formatter *f) const;
   void encode(bufferlist& bl) const;
@@ -140,7 +139,7 @@ public:
     map<int32_t,uint8_t> new_state;             // XORed onto previous state.
     map<int32_t,uint32_t> new_weight;
     map<pg_t,vector<int32_t> > new_pg_temp;     // [] to remove
-    map<pg_t, int32_t> new_primary_temp;            // [-1] to remove
+    map<pg_t, int> new_primary_temp;            // [-1] to remove
     map<int32_t,uint32_t> new_primary_affinity;
     map<int32_t,epoch_t> new_up_thru;
     map<int32_t,pair<epoch_t,epoch_t> > new_last_clean_interval;
@@ -222,8 +221,8 @@ private:
 
   vector<__u32>   osd_weight;   // 16.16 fixed point, 0x10000 = "in", 0 = "out"
   vector<osd_info_t> osd_info;
-  ceph::shared_ptr< map<pg_t,vector<int32_t> > > pg_temp;  // temp pg mapping (e.g. while we rebuild)
-  ceph::shared_ptr< map<pg_t,int32_t > > primary_temp;  // temp primary mapping (e.g. while we rebuild)
+  ceph::shared_ptr< map<pg_t,vector<int> > > pg_temp;  // temp pg mapping (e.g. while we rebuild)
+  ceph::shared_ptr< map<pg_t,int > > primary_temp;  // temp primary mapping (e.g. while we rebuild)
   ceph::shared_ptr< vector<__u32> > osd_primary_affinity; ///< 16.16 fixed point, 0x10000 = baseline
 
   map<int64_t,pg_pool_t> pools;
@@ -253,8 +252,8 @@ private:
 	     flags(0),
 	     num_osd(0), max_osd(0),
 	     osd_addrs(new addrs_s),
-	     pg_temp(new map<pg_t,vector<int32_t> >),
-	     primary_temp(new map<pg_t,int32_t>),
+	     pg_temp(new map<pg_t,vector<int> >),
+	     primary_temp(new map<pg_t,int>),
 	     osd_uuid(new vector<uuid_d>),
 	     cluster_snapshot_epoch(0),
 	     new_blacklist_entries(false),
@@ -272,8 +271,8 @@ public:
 
   void deepish_copy_from(const OSDMap& o) {
     *this = o;
-    primary_temp.reset(new map<pg_t,int32_t>(*o.primary_temp));
-    pg_temp.reset(new map<pg_t,vector<int32_t> >(*o.pg_temp));
+    primary_temp.reset(new map<pg_t,int>(*o.primary_temp));
+    pg_temp.reset(new map<pg_t,vector<int> >(*o.pg_temp));
     osd_uuid.reset(new vector<uuid_d>(*o.osd_uuid));
 
     // NOTE: this still references shared entity_addr_t's.
@@ -397,6 +396,9 @@ public:
     else
       return i->second;
   }
+  map<string,string> &get_erasure_code_profile(const string &name) {
+    return erasure_code_profiles[name];
+  }
   const map<string,map<string,string> > &get_erasure_code_profiles() const {
     return erasure_code_profiles;
   }
@@ -620,7 +622,7 @@ private:
   /**
    *  map to up and acting. Fills in whatever fields are non-NULL.
    */
-  void _pg_to_up_acting_osds(const pg_t& pg, vector<int> *up, int *up_primary,
+  void _pg_to_up_acting_osds(pg_t pg, vector<int> *up, int *up_primary,
                              vector<int> *acting, int *acting_primary) const;
 
 public:
@@ -632,7 +634,7 @@ public:
    */
   int pg_to_osds(pg_t pg, vector<int> *raw, int *primary) const;
   /// map a pg to its acting set. @return acting set size
-  int pg_to_acting_osds(const pg_t& pg, vector<int> *acting,
+  int pg_to_acting_osds(pg_t pg, vector<int> *acting,
                         int *acting_primary) const {
     _pg_to_up_acting_osds(pg, NULL, NULL, acting, acting_primary);
     return acting->size();
@@ -667,7 +669,7 @@ public:
     assert(i != pools.end());
     return i->second.ec_pool();
   }
-  bool get_primary_shard(const pg_t& pgid, spg_t *out) const {
+  bool get_primary_shard(pg_t pgid, spg_t *out) const {
     map<int64_t, pg_pool_t>::const_iterator i = get_pools().find(pgid.pool());
     if (i == get_pools().end()) {
       return false;
@@ -676,9 +678,9 @@ public:
     vector<int> acting;
     pg_to_acting_osds(pgid, &acting, &primary);
     if (i->second.ec_pool()) {
-      for (uint8_t i = 0; i < acting.size(); ++i) {
+      for (shard_id_t i = 0; i < acting.size(); ++i) {
 	if (acting[i] == primary) {
-	  *out = spg_t(pgid, shard_id_t(i));
+	  *out = spg_t(pgid, i);
 	  return true;
 	}
       }
@@ -689,11 +691,14 @@ public:
     return false;
   }
 
-  int64_t lookup_pg_pool_name(const string& name) const {
-    map<string,int64_t>::const_iterator p = name_pool.find(name);
-    if (p == name_pool.end())
-      return -ENOENT;
-    return p->second;
+  int64_t lookup_pg_pool_name(const string& name) {
+    if (name_pool.count(name))
+      return name_pool[name];
+    return -ENOENT;
+  }
+
+  int64_t const_lookup_pg_pool_name(const char *name) const {
+    return const_cast<OSDMap *>(this)->lookup_pg_pool_name(name);
   }
 
   int64_t get_pool_max() const {
@@ -702,10 +707,11 @@ public:
   const map<int64_t,pg_pool_t>& get_pools() const {
     return pools;
   }
-  const string& get_pool_name(int64_t p) const {
+  const char *get_pool_name(int64_t p) const {
     map<int64_t, string>::const_iterator i = pool_name.find(p);
-    assert(i != pool_name.end());
-    return i->second;
+    if (i != pool_name.end())
+      return i->second.c_str();
+    return 0;
   }
   bool have_pg_pool(int64_t p) const {
     return pools.count(p);
@@ -765,12 +771,24 @@ public:
     return calc_pg_rank(osd, group, nrep);
   }
   /* role is -1 (stray), 0 (primary), 1 (replica) */
-  int get_pg_acting_role(const pg_t& pg, int osd) const {
+  int get_pg_acting_role(pg_t pg, int osd) const {
     vector<int> group;
     int nrep = pg_to_acting_osds(pg, group);
     return calc_pg_role(osd, group, nrep);
   }
 
+  bool osd_is_valid_op_target(pg_t pg, int osd) const {
+    int primary;
+    vector<int> group;
+    int nrep = pg_to_acting_osds(pg, &group, &primary);
+    if (osd == primary)
+      return true;
+    if (pg_is_ec(pg))
+      return false;
+
+    return calc_pg_role(osd, group, nrep) >= 0;
+  }
+
 
   /*
    * handy helpers to build simple maps...
diff --git a/src/osd/OpRequest.cc b/src/osd/OpRequest.cc
index 5de80f3..bfa819d 100644
--- a/src/osd/OpRequest.cc
+++ b/src/osd/OpRequest.cc
@@ -12,29 +12,16 @@
 #include "include/assert.h"
 #include "osd/osd_types.h"
 
-#ifdef WITH_LTTNG
-#include "tracing/oprequest.h"
-#endif
 
 
 OpRequest::OpRequest(Message *req, OpTracker *tracker) :
-  TrackedOp(tracker, req->get_recv_stamp()),
-  rmw_flags(0), request(req),
-  hit_flag_points(0), latest_flag_point(0),
-  send_map_update(false), sent_epoch(0) {
+  TrackedOp(req, tracker),
+  rmw_flags(0),
+  hit_flag_points(0), latest_flag_point(0) {
   if (req->get_priority() < tracker->cct->_conf->osd_client_op_priority) {
     // don't warn as quickly for low priority ops
     warn_interval_multiplier = tracker->cct->_conf->osd_recovery_op_warn_multiple;
   }
-  if (req->get_type() == CEPH_MSG_OSD_OP) {
-    reqid = static_cast<MOSDOp*>(req)->get_reqid();
-  } else if (req->get_type() == MSG_OSD_SUBOP) {
-    reqid = static_cast<MOSDSubOp*>(req)->reqid;
-  }
-  tracker->mark_event(this, "header_read", request->get_recv_stamp());
-  tracker->mark_event(this, "throttled", request->get_throttle_stamp());
-  tracker->mark_event(this, "all_read", request->get_recv_complete_stamp());
-  tracker->mark_event(this, "dispatched", request->get_dispatch_stamp());
 }
 
 void OpRequest::_dump(utime_t now, Formatter *f) const
@@ -51,7 +38,6 @@ void OpRequest::_dump(utime_t now, Formatter *f) const
   }
   {
     f->open_array_section("events");
-    Mutex::Locker l(lock);
     for (list<pair<utime_t, string> >::const_iterator i = events.begin();
 	 i != events.end();
 	 ++i) {
@@ -64,14 +50,13 @@ void OpRequest::_dump(utime_t now, Formatter *f) const
   }
 }
 
-void OpRequest::_dump_op_descriptor_unlocked(ostream& stream) const
+void OpRequest::init_from_message()
 {
-  get_req()->print(stream);
-}
-
-void OpRequest::_unregistered() {
-  request->clear_data();
-  request->clear_payload();
+  if (request->get_type() == CEPH_MSG_OSD_OP) {
+    reqid = static_cast<MOSDOp*>(request)->get_reqid();
+  } else if (request->get_type() == MSG_OSD_SUBOP) {
+    reqid = static_cast<MOSDSubOp*>(request)->reqid;
+  }
 }
 
 bool OpRequest::check_rmw(int flag) {
@@ -93,33 +78,9 @@ bool OpRequest::need_class_read_cap() {
 bool OpRequest::need_class_write_cap() {
   return check_rmw(CEPH_OSD_RMW_FLAG_CLASS_WRITE);
 }
-
-void OpRequest::set_rmw_flags(int flags) {
-#ifdef WITH_LTTNG
-  int old_rmw_flags = rmw_flags;
-#endif
-  rmw_flags |= flags;
-  tracepoint(oprequest, set_rmw_flags, reqid.name._type,
-	     reqid.name._num, reqid.tid, reqid.inc,
-	     flags, old_rmw_flags, rmw_flags);
-}
-
-void OpRequest::set_read() { set_rmw_flags(CEPH_OSD_RMW_FLAG_READ); }
-void OpRequest::set_write() { set_rmw_flags(CEPH_OSD_RMW_FLAG_WRITE); }
-void OpRequest::set_class_read() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CLASS_READ); }
-void OpRequest::set_class_write() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CLASS_WRITE); }
-void OpRequest::set_pg_op() { set_rmw_flags(CEPH_OSD_RMW_FLAG_PGOP); }
-void OpRequest::set_cache() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CACHE); }
-
-void OpRequest::mark_flag_point(uint8_t flag, string s) {
-#ifdef WITH_LTTNG
-  uint8_t old_flags = hit_flag_points;
-#endif
-  mark_event(s);
-  current = s;
-  hit_flag_points |= flag;
-  latest_flag_point = flag;
-  tracepoint(oprequest, mark_flag_point, reqid.name._type,
-	     reqid.name._num, reqid.tid, reqid.inc, rmw_flags,
-	     flag, s.c_str(), old_flags, hit_flag_points);
-}
+void OpRequest::set_read() { rmw_flags |= CEPH_OSD_RMW_FLAG_READ; }
+void OpRequest::set_write() { rmw_flags |= CEPH_OSD_RMW_FLAG_WRITE; }
+void OpRequest::set_class_read() { rmw_flags |= CEPH_OSD_RMW_FLAG_CLASS_READ; }
+void OpRequest::set_class_write() { rmw_flags |= CEPH_OSD_RMW_FLAG_CLASS_WRITE; }
+void OpRequest::set_pg_op() { rmw_flags |= CEPH_OSD_RMW_FLAG_PGOP; }
+void OpRequest::set_cache() { rmw_flags |= CEPH_OSD_RMW_FLAG_CACHE; }
diff --git a/src/osd/OpRequest.h b/src/osd/OpRequest.h
index b80fc3c..b074bee 100644
--- a/src/osd/OpRequest.h
+++ b/src/osd/OpRequest.h
@@ -79,7 +79,6 @@ struct OpRequest : public TrackedOp {
   }
 
 private:
-  Message *request; /// the logical request we are tracking
   osd_reqid_t reqid;
   uint8_t hit_flag_points;
   uint8_t latest_flag_point;
@@ -93,17 +92,7 @@ private:
 
   OpRequest(Message *req, OpTracker *tracker);
 
-protected:
-  void _dump_op_descriptor_unlocked(ostream& stream) const;
-  void _unregistered();
-
 public:
-  ~OpRequest() {
-    request->put();
-  }
-  bool send_map_update;
-  epoch_t sent_epoch;
-  Message *get_req() const { return request; }
   bool been_queued_for_pg() { return hit_flag_points & flag_queued_for_pg; }
   bool been_reached_pg() { return hit_flag_points & flag_reached_pg; }
   bool been_delayed() { return hit_flag_points & flag_delayed; }
@@ -131,22 +120,40 @@ public:
   }
 
   void mark_queued_for_pg() {
-    mark_flag_point(flag_queued_for_pg, "queued_for_pg");
+    mark_event("queued_for_pg");
+    current = "queued for pg";
+    hit_flag_points |= flag_queued_for_pg;
+    latest_flag_point = flag_queued_for_pg;
   }
   void mark_reached_pg() {
-    mark_flag_point(flag_reached_pg, "reached_pg");
+    mark_event("reached_pg");
+    current = "reached pg";
+    hit_flag_points |= flag_reached_pg;
+    latest_flag_point = flag_reached_pg;
   }
   void mark_delayed(string s) {
-    mark_flag_point(flag_delayed, s);
+    mark_event(s);
+    current = s;
+    hit_flag_points |= flag_delayed;
+    latest_flag_point = flag_delayed;
   }
   void mark_started() {
-    mark_flag_point(flag_started, "started");
+    mark_event("started");
+    current = "started";
+    hit_flag_points |= flag_started;
+    latest_flag_point = flag_started;
   }
   void mark_sub_op_sent(string s) {
-    mark_flag_point(flag_sub_op_sent, s);
+    mark_event(s);
+    current = s;
+    hit_flag_points |= flag_sub_op_sent;
+    latest_flag_point = flag_sub_op_sent;
   }
   void mark_commit_sent() {
-    mark_flag_point(flag_commit_sent, "commit_sent");
+    mark_event("commit_sent");
+    current = "commit sent";
+    hit_flag_points |= flag_commit_sent;
+    latest_flag_point = flag_commit_sent;
   }
 
   utime_t get_dequeued_time() const {
@@ -160,11 +167,9 @@ public:
     return reqid;
   }
 
-  typedef ceph::shared_ptr<OpRequest> Ref;
+  void init_from_message();
 
-private:
-  void set_rmw_flags(int flags);
-  void mark_flag_point(uint8_t flag, string s);
+  typedef ceph::shared_ptr<OpRequest> Ref;
 };
 
 typedef OpRequest::Ref OpRequestRef;
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index eedc26b..ebc2020 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -42,18 +42,11 @@
 #include "messages/MOSDSubOpReply.h"
 #include "common/BackTrace.h"
 
-#ifdef WITH_LTTNG
-#include "tracing/pg.h"
-#endif
-
 #include <sstream>
 
 #define dout_subsys ceph_subsys_osd
 #undef dout_prefix
 #define dout_prefix _prefix(_dout, this)
-
-static coll_t META_COLL("meta");
-
 template <class T>
 static ostream& _prefix(std::ostream *_dout, T *t)
 {
@@ -202,7 +195,6 @@ PG::PG(OSDService *o, OSDMapRef curmap,
   scrub_after_recovery(false),
   active_pushes(0),
   recovery_state(this),
-  pg_id(p),
   peer_features((uint64_t)-1)
 {
 #ifdef PG_DEBUG_REFS
@@ -402,7 +394,7 @@ bool PG::search_for_missing(
 {
   unsigned num_unfound_before = missing_loc.num_unfound();
   bool found_missing = missing_loc.add_source_info(
-    from, oinfo, omissing, ctx->handle);
+    from, oinfo, omissing);
   if (found_missing && num_unfound_before != missing_loc.num_unfound())
     publish_stats_to_osd();
   if (found_missing &&
@@ -442,19 +434,15 @@ bool PG::MissingLoc::readable_with_acting(
 bool PG::MissingLoc::add_source_info(
   pg_shard_t fromosd,
   const pg_info_t &oinfo,
-  const pg_missing_t &omissing,
-  ThreadPool::TPHandle* handle)
+  const pg_missing_t &omissing)
 {
-  bool found_missing = false;
+  bool found_missing = false;;
   // found items?
   for (map<hobject_t,pg_missing_t::item>::const_iterator p = needs_recovery_map.begin();
        p != needs_recovery_map.end();
        ++p) {
     const hobject_t &soid(p->first);
     eversion_t need = p->second.need;
-    if (handle) {
-      handle->reset_tp_timeout();
-    }
     if (oinfo.last_update < need) {
       dout(10) << "search_for_missing " << soid << " " << need
 	       << " also missing on osd." << fromosd
@@ -689,6 +677,7 @@ void PG::generate_past_intervals()
       info.history.last_epoch_clean,
       cur_map,
       last_map,
+      pgid.pool(),
       pgid,
       &past_intervals,
       &debug);
@@ -972,33 +961,33 @@ void PG::calc_ec_acting(
       ++i) {
     all_info_by_shard[i->first.shard].insert(i->first);
   }
-  for (uint8_t i = 0; i < want.size(); ++i) {
+  for (shard_id_t i = 0; i < want.size(); ++i) {
     ss << "For position " << (unsigned)i << ": ";
     if (up.size() > (unsigned)i && up[i] != CRUSH_ITEM_NONE &&
-	!all_info.find(pg_shard_t(up[i], shard_id_t(i)))->second.is_incomplete() &&
-	all_info.find(pg_shard_t(up[i], shard_id_t(i)))->second.last_update >=
+	!all_info.find(pg_shard_t(up[i], i))->second.is_incomplete() &&
+	all_info.find(pg_shard_t(up[i], i))->second.last_update >=
 	auth_log_shard->second.log_tail) {
-      ss << " selecting up[i]: " << pg_shard_t(up[i], shard_id_t(i)) << std::endl;
+      ss << " selecting up[i]: " << pg_shard_t(up[i], i) << std::endl;
       want[i] = up[i];
       ++usable;
       continue;
     }
     if (up.size() > (unsigned)i && up[i] != CRUSH_ITEM_NONE) {
-      ss << " backfilling up[i]: " << pg_shard_t(up[i], shard_id_t(i))
+      ss << " backfilling up[i]: " << pg_shard_t(up[i], i)
 	 << " and ";
-      backfill->insert(pg_shard_t(up[i], shard_id_t(i)));
+      backfill->insert(pg_shard_t(up[i], i));
     }
 
     if (acting.size() > (unsigned)i && acting[i] != CRUSH_ITEM_NONE &&
-	!all_info.find(pg_shard_t(acting[i], shard_id_t(i)))->second.is_incomplete() &&
-	all_info.find(pg_shard_t(acting[i], shard_id_t(i)))->second.last_update >=
+	!all_info.find(pg_shard_t(acting[i], i))->second.is_incomplete() &&
+	all_info.find(pg_shard_t(acting[i], i))->second.last_update >=
 	auth_log_shard->second.log_tail) {
-      ss << " selecting acting[i]: " << pg_shard_t(acting[i], shard_id_t(i)) << std::endl;
+      ss << " selecting acting[i]: " << pg_shard_t(acting[i], i) << std::endl;
       want[i] = acting[i];
       ++usable;
     } else {
-      for (set<pg_shard_t>::iterator j = all_info_by_shard[shard_id_t(i)].begin();
-	   j != all_info_by_shard[shard_id_t(i)].end();
+      for (set<pg_shard_t>::iterator j = all_info_by_shard[i].begin();
+	   j != all_info_by_shard[i].end();
 	   ++j) {
 	assert(j->shard == i);
 	if (!all_info.find(*j)->second.is_incomplete() &&
@@ -1016,11 +1005,11 @@ void PG::calc_ec_acting(
   }
 
   bool found_primary = false;
-  for (uint8_t i = 0; i < want.size(); ++i) {
+  for (shard_id_t i = 0; i < want.size(); ++i) {
     if (want[i] != CRUSH_ITEM_NONE) {
-      acting_backfill->insert(pg_shard_t(want[i], shard_id_t(i)));
+      acting_backfill->insert(pg_shard_t(want[i], i));
       if (!found_primary) {
-	*want_primary = pg_shard_t(want[i], shard_id_t(i));
+	*want_primary = pg_shard_t(want[i], i);
 	found_primary = true;
       }
     }
@@ -1082,7 +1071,7 @@ void PG::calc_replicated_acting(
   for (vector<int>::const_iterator i = up.begin();
        i != up.end();
        ++i) {
-    pg_shard_t up_cand = pg_shard_t(*i, shard_id_t::NO_SHARD);
+    pg_shard_t up_cand = pg_shard_t(*i, ghobject_t::no_shard());
     if (up_cand == primary->first)
       continue;
     const pg_info_t &cur_info = all_info.find(up_cand)->second;
@@ -1118,7 +1107,7 @@ void PG::calc_replicated_acting(
   for (vector<int>::const_iterator i = acting.begin();
        i != acting.end();
        ++i) {
-    pg_shard_t acting_cand(*i, shard_id_t::NO_SHARD);
+    pg_shard_t acting_cand(*i, ghobject_t::no_shard());
     if (usable >= size)
       break;
 
@@ -1311,7 +1300,7 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id)
       have.insert(
 	pg_shard_t(
 	  want[i],
-	  pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD));
+	  pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
   }
   if (!(*recoverable_predicate)(have)) {
     want_acting.clear();
@@ -1396,7 +1385,7 @@ void PG::build_might_have_unfound()
     std::vector<int>::const_iterator a = interval.acting.begin();
     std::vector<int>::const_iterator a_end = interval.acting.end();
     for (; a != a_end; ++a, ++i) {
-      pg_shard_t shard(*a, pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD);
+      pg_shard_t shard(*a, pool.info.ec_pool() ? i : ghobject_t::NO_SHARD);
       if (*a != CRUSH_ITEM_NONE && shard != pg_whoami)
 	might_have_unfound.insert(shard);
     }
@@ -1553,7 +1542,7 @@ void PG::activate(ObjectStore::Transaction& t,
 	 * behind.
 	 */
 	// backfill
-	osd->clog->info() << info.pgid << " restarting backfill on osd." << peer
+	osd->clog.info() << info.pgid << " restarting backfill on osd." << peer
 			 << " from (" << pi.log_tail << "," << pi.last_update << "] " << pi.last_backfill
 			 << " to " << info.last_update;
 
@@ -1636,7 +1625,7 @@ void PG::activate(ObjectStore::Transaction& t,
     // past intervals.
     might_have_unfound.clear();
     if (needs_recovery()) {
-      missing_loc.add_source_info(pg_whoami, info, pg_log.get_missing(), ctx->handle);
+      missing_loc.add_source_info(pg_whoami, info, pg_log.get_missing());
       for (set<pg_shard_t>::iterator i = actingbackfill.begin();
 	   i != actingbackfill.end();
 	   ++i) {
@@ -1647,8 +1636,7 @@ void PG::activate(ObjectStore::Transaction& t,
 	missing_loc.add_source_info(
 	  *i,
 	  peer_info[*i],
-	  peer_missing[*i],
-          ctx->handle);
+	  peer_missing[*i]);
       }
       for (map<pg_shard_t, pg_missing_t>::iterator i = peer_missing.begin();
 	   i != peer_missing.end();
@@ -1665,7 +1653,6 @@ void PG::activate(ObjectStore::Transaction& t,
 
       build_might_have_unfound();
 
-      state_set(PG_STATE_DEGRADED);
       dout(10) << "activate - starting recovery" << dendl;
       osd->queue_for_recovery(this);
       if (have_unfound())
@@ -1673,14 +1660,13 @@ void PG::activate(ObjectStore::Transaction& t,
     }
 
     // degraded?
-    if (get_osdmap()->get_pg_size(info.pgid.pgid) > actingset.size()) {
+    if (get_osdmap()->get_pg_size(info.pgid.pgid) > acting.size())
       state_set(PG_STATE_DEGRADED);
-      state_set(PG_STATE_UNDERSIZED);
-    }
+
   }
 }
 
-bool PG::op_has_sufficient_caps(OpRequestRef& op)
+bool PG::op_has_sufficient_caps(OpRequestRef op)
 {
   // only check MOSDOp
   if (op->get_req()->get_type() != CEPH_MSG_OSD_OP)
@@ -1725,7 +1711,7 @@ void PG::take_op_map_waiters()
   for (list<OpRequestRef>::iterator i = waiting_for_map.begin();
        i != waiting_for_map.end();
        ) {
-    if (op_must_wait_for_map(get_osdmap_with_maplock()->get_epoch(), *i)) {
+    if (op_must_wait_for_map(get_osdmap_with_maplock(), *i)) {
       break;
     } else {
       osd->op_wq.queue(make_pair(PGRef(this), *i));
@@ -1734,7 +1720,7 @@ void PG::take_op_map_waiters()
   }
 }
 
-void PG::queue_op(OpRequestRef& op)
+void PG::queue_op(OpRequestRef op)
 {
   Mutex::Locker l(map_lock);
   if (!waiting_for_map.empty()) {
@@ -1742,19 +1728,11 @@ void PG::queue_op(OpRequestRef& op)
     waiting_for_map.push_back(op);
     return;
   }
-  if (op_must_wait_for_map(get_osdmap_with_maplock()->get_epoch(), op)) {
+  if (op_must_wait_for_map(get_osdmap_with_maplock(), op)) {
     waiting_for_map.push_back(op);
     return;
   }
   osd->op_wq.queue(make_pair(PGRef(this), op));
-  {
-    // after queue() to include any locking costs
-#ifdef WITH_LTTNG
-    osd_reqid_t reqid = op->get_reqid();
-#endif
-    tracepoint(pg, queue_op, reqid.name._type,
-        reqid.name._num, reqid.tid, reqid.inc, op->rmw_flags);
-  }
 }
 
 void PG::replay_queued_ops()
@@ -1895,7 +1873,7 @@ void PG::mark_clean()
 {
   // only mark CLEAN if we have the desired number of replicas AND we
   // are not remapped.
-  if (actingset.size() == get_osdmap()->get_pg_size(info.pgid.pgid) &&
+  if (acting.size() == get_osdmap()->get_pg_size(info.pgid.pgid) &&
       up == acting)
     state_set(PG_STATE_CLEAN);
 
@@ -1911,31 +1889,6 @@ void PG::mark_clean()
   dirty_info = true;
 }
 
-unsigned PG::get_recovery_priority()
-{
-  // a higher value -> a higher priority
-  return OSD_RECOVERY_PRIORITY_MAX;
-}
-
-unsigned PG::get_backfill_priority()
-{
-  // a higher value -> a higher priority
-
-  // undersized: 200 + num missing replicas
-  if (is_undersized()) {
-    assert(pool.info.size > actingset.size());
-    return 200 + (pool.info.size - actingset.size());
-  }
-
-  // degraded: baseline degraded
-  if (is_degraded()) {
-    return 200;
-  }
-
-  // baseline
-  return 1;
-}
-
 void PG::finish_recovery(list<Context*>& tfin)
 {
   dout(10) << "finish_recovery" << dendl;
@@ -2010,6 +1963,24 @@ void PG::finish_recovery_op(const hobject_t& soid, bool dequeue)
   osd->osd->finish_recovery_op(this, soid, dequeue);
 }
 
+static void split_list(
+  list<OpRequestRef> *from,
+  list<OpRequestRef> *to,
+  unsigned match,
+  unsigned bits)
+{
+  for (list<OpRequestRef>::iterator i = from->begin();
+       i != from->end();
+    ) {
+    if (PG::split_request(*i, match, bits)) {
+      to->push_back(*i);
+      from->erase(i++);
+    } else {
+      ++i;
+    }
+  }
+}
+
 static void split_replay_queue(
   map<eversion_t, OpRequestRef> *from,
   map<eversion_t, OpRequestRef> *to,
@@ -2019,7 +1990,7 @@ static void split_replay_queue(
   for (map<eversion_t, OpRequestRef>::iterator i = from->begin();
        i != from->end();
        ) {
-    if (OSD::split_request(i->second, match, bits)) {
+    if (PG::split_request(i->second, match, bits)) {
       to->insert(*i);
       from->erase(i++);
     } else {
@@ -2039,12 +2010,10 @@ void PG::split_ops(PG *child, unsigned split_bits) {
   split_replay_queue(&replay_queue, &(child->replay_queue), match, split_bits);
 
   osd->dequeue_pg(this, &waiting_for_active);
-  OSD::split_list(
-    &waiting_for_active, &(child->waiting_for_active), match, split_bits);
+  split_list(&waiting_for_active, &(child->waiting_for_active), match, split_bits);
   {
     Mutex::Locker l(map_lock); // to avoid a race with the osd dispatch
-    OSD::split_list(
-      &waiting_for_map, &(child->waiting_for_map), match, split_bits);
+    split_list(&waiting_for_map, &(child->waiting_for_map), match, split_bits);
   }
 }
 
@@ -2249,31 +2218,29 @@ void PG::_update_calc_stats()
   info.stats.ondisk_log_start = pg_log.get_tail();
 
   // calc copies, degraded
-  unsigned target = get_osdmap()->get_pg_size(info.pgid.pgid);
-  info.stats.stats.calc_copies(MAX(target, actingbackfill.size()));
+  unsigned target = MAX(
+    get_osdmap()->get_pg_size(info.pgid.pgid), actingbackfill.size());
+  info.stats.stats.calc_copies(target);
   info.stats.stats.sum.num_objects_degraded = 0;
-  info.stats.stats.sum.num_objects_misplaced = 0;
-  if ((is_degraded() || is_undersized() || !is_clean()) && is_active()) {
+  if ((is_degraded() || !is_clean()) && is_active()) {
     // NOTE: we only generate copies, degraded, unfound values for
     // the summation, not individual stat categories.
     uint64_t num_objects = info.stats.stats.sum.num_objects;
 
-    // a degraded objects has fewer replicas or EC shards than the
-    // pool specifies
     uint64_t degraded = 0;
 
-    // if acting is smaller than desired, add in those missing replicas
-    if (acting.size() < target)
-      degraded += (target - acting.size()) * num_objects;
+    // if the actingbackfill set is smaller than we want, add in those missing replicas
+    if (actingbackfill.size() < target)
+      degraded += (target - actingbackfill.size()) * num_objects;
 
     // missing on primary
     info.stats.stats.sum.num_objects_missing_on_primary =
       pg_log.get_missing().num_missing();
     degraded += pg_log.get_missing().num_missing();
 
-    assert(!acting.empty());
-    for (set<pg_shard_t>::iterator i = actingset.begin();
-	 i != actingset.end();
+    assert(!actingbackfill.empty());
+    for (set<pg_shard_t>::iterator i = actingbackfill.begin();
+	 i != actingbackfill.end();
 	 ++i) {
       if (*i == pg_whoami) continue;
       assert(peer_missing.count(*i));
@@ -2286,58 +2253,6 @@ void PG::_update_calc_stats()
     }
     info.stats.stats.sum.num_objects_degraded = degraded;
     info.stats.stats.sum.num_objects_unfound = get_num_unfound();
-
-    // a misplaced object is not stored on the correct OSD
-    uint64_t misplaced = 0;
-    unsigned i = 0;
-    unsigned in_place = 0;
-    for (vector<int>::iterator p = up.begin(); p != up.end(); ++p, ++i) {
-      pg_shard_t s(*p,
-		   pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD);
-      if (actingset.count(s)) {
-	++in_place;
-      } else {
-	// not where it should be
-	misplaced += num_objects;
-	if (actingbackfill.count(s)) {
-	  // ...but partially backfilled
-	  misplaced -= peer_info[s].stats.stats.sum.num_objects;
-	  dout(20) << __func__ << " osd." << *p << " misplaced "
-		   << num_objects << " but partially backfilled "
-		   << peer_info[s].stats.stats.sum.num_objects
-		   << dendl;
-	} else {
-	  dout(20) << __func__ << " osd." << *p << " misplaced "
-		   << num_objects << " but partially backfilled "
-		   << dendl;
-	}
-      }
-    }
-    // count extra replicas in acting but not in up as misplaced
-    if (in_place < actingset.size())
-      misplaced += (actingset.size() - in_place) * num_objects;
-    info.stats.stats.sum.num_objects_misplaced = misplaced;
-  }
-}
-
-void PG::_update_blocked_by()
-{
-  // set a max on the number of blocking peers we report. if we go
-  // over, report a random subset.  keep the result sorted.
-  unsigned keep = MIN(blocked_by.size(), g_conf->osd_max_pg_blocked_by);
-  unsigned skip = blocked_by.size() - keep;
-  info.stats.blocked_by.clear();
-  info.stats.blocked_by.resize(keep);
-  unsigned pos = 0;
-  for (set<int>::iterator p = blocked_by.begin();
-       p != blocked_by.end() && keep > 0;
-       ++p) {
-    if (skip > 0 && (rand() % (skip + keep) < skip)) {
-      --skip;
-    } else {
-      info.stats.blocked_by[pos++] = *p;
-      --keep;
-    }
   }
 }
 
@@ -2368,13 +2283,8 @@ void PG::publish_stats_to_osd()
     if (info.stats.state & PG_STATE_ACTIVE)
       info.stats.last_active = now;
     info.stats.last_unstale = now;
-    if ((info.stats.state & PG_STATE_DEGRADED) == 0)
-      info.stats.last_undegraded = now;
-    if ((info.stats.state & PG_STATE_UNDERSIZED) == 0)
-      info.stats.last_fullsized = now;
 
     _update_calc_stats();
-    _update_blocked_by();
 
     pg_stats_publish_valid = true;
     pg_stats_publish = info.stats;
@@ -2418,9 +2328,9 @@ void PG::clear_publish_stats()
  */
 void PG::init(
   int role,
-  const vector<int>& newup, int new_up_primary,
-  const vector<int>& newacting, int new_acting_primary,
-  const pg_history_t& history,
+  vector<int>& newup, int new_up_primary,
+  vector<int>& newacting, int new_acting_primary,
+  pg_history_t& history,
   pg_interval_map_t& pi,
   bool backfill,
   ObjectStore::Transaction *t)
@@ -2635,7 +2545,7 @@ int PG::_write_info(ObjectStore::Transaction& t, epoch_t epoch,
     //dout(20) << "write_info bigbl " << bigbl.length() << dendl;
   }
 
-  t.omap_setkeys(META_COLL, infos_oid, v);
+  t.omap_setkeys(coll_t::META_COLL, infos_oid, v);
 
   return 0;
 }
@@ -2679,7 +2589,7 @@ epoch_t PG::peek_map_epoch(ObjectStore *store, coll_t coll, hobject_t &infos_oid
     set<string> keys;
     keys.insert(get_epoch_key(pgid));
     map<string,bufferlist> values;
-    store->omap_get_values(META_COLL, infos_oid, keys, &values);
+    store->omap_get_values(coll_t::META_COLL, infos_oid, keys, &values);
     assert(values.size() == 1);
     tmpbl = values[ek];
     bufferlist::iterator p = tmpbl.begin();
@@ -2785,7 +2695,7 @@ void PG::append_log(
   }
 
   dout(10) << "append_log  adding " << keys.size() << " keys" << dendl;
-  t.omap_setkeys(META_COLL, log_oid, keys);
+  t.omap_setkeys(coll_t::META_COLL, log_oid, keys);
 
   pg_log.trim(&handler, trim_to, info);
 
@@ -2823,7 +2733,7 @@ std::string PG::get_corrupt_pg_log_name() const
 }
 
 int PG::read_info(
-  ObjectStore *store, const coll_t &coll, bufferlist &bl,
+  ObjectStore *store, const coll_t coll, bufferlist &bl,
   pg_info_t &info, map<epoch_t,pg_interval_t> &past_intervals,
   hobject_t &biginfo_oid, hobject_t &infos_oid,
   interval_set<snapid_t>  &snap_collections, __u8 &struct_v)
@@ -2844,7 +2754,7 @@ int PG::read_info(
     ::decode(struct_v, p);
   } else {
     if (struct_v < 6) {
-      int r = store->read(META_COLL, biginfo_oid, 0, 0, lbl);
+      int r = store->read(coll_t::META_COLL, biginfo_oid, 0, 0, lbl);
       if (r < 0)
         return r;
       p = lbl.begin();
@@ -2857,7 +2767,7 @@ int PG::read_info(
       keys.insert(k);
       keys.insert(bk);
       map<string,bufferlist> values;
-      store->omap_get_values(META_COLL, infos_oid, keys, &values);
+      store->omap_get_values(coll_t::META_COLL, infos_oid, keys, &values);
       assert(values.size() == 2);
       lbl = values[k];
       p = lbl.begin();
@@ -2909,7 +2819,7 @@ void PG::read_state(ObjectStore *store, bufferlist &bl)
     assert(!r);
   }
   if (oss.str().length())
-    osd->clog->error() << oss;
+    osd->clog.error() << oss;
 
   // log any weirdness
   log_weirdness();
@@ -2918,12 +2828,12 @@ void PG::read_state(ObjectStore *store, bufferlist &bl)
 void PG::log_weirdness()
 {
   if (pg_log.get_tail() != info.log_tail)
-    osd->clog->error() << info.pgid
+    osd->clog.error() << info.pgid
 		      << " info mismatch, log.tail " << pg_log.get_tail()
 		      << " != info.log_tail " << info.log_tail
 		      << "\n";
   if (pg_log.get_head() != info.last_update)
-    osd->clog->error() << info.pgid
+    osd->clog.error() << info.pgid
 		      << " info mismatch, log.head " << pg_log.get_head()
 		      << " != info.last_update " << info.last_update
 		      << "\n";
@@ -2931,7 +2841,7 @@ void PG::log_weirdness()
   if (!pg_log.get_log().empty()) {
     // sloppy check
     if ((pg_log.get_log().log.begin()->version <= pg_log.get_tail()))
-      osd->clog->error() << info.pgid
+      osd->clog.error() << info.pgid
 			<< " log bound mismatch, info (" << pg_log.get_tail() << ","
 			<< pg_log.get_head() << "]"
 			<< " actual ["
@@ -2941,7 +2851,7 @@ void PG::log_weirdness()
   }
   
   if (pg_log.get_log().caller_ops.size() > pg_log.get_log().log.size()) {
-    osd->clog->error() << info.pgid
+    osd->clog.error() << info.pgid
 		      << " caller_ops.size " << pg_log.get_log().caller_ops.size()
 		      << " > log size " << pg_log.get_log().log.size()
 		      << "\n";
@@ -3166,16 +3076,43 @@ void PG::sub_op_scrub_map(OpRequestRef op)
   dout(10) << " got " << m->from << " scrub map" << dendl;
   bufferlist::iterator p = m->get_data().begin();
 
-  scrubber.received_maps[m->from].decode(p, info.pgid.pool());
-  dout(10) << "map version is "
+  if (scrubber.is_chunky) { // chunky scrub
+    scrubber.received_maps[m->from].decode(p, info.pgid.pool());
+    dout(10) << "map version is "
 	     << scrubber.received_maps[m->from].valid_through
 	     << dendl;
+  } else {               // classic scrub
+    if (scrubber.received_maps.count(m->from)) {
+      ScrubMap incoming;
+      incoming.decode(p, info.pgid.pool());
+      dout(10) << "from replica " << m->from << dendl;
+      dout(10) << "map version is " << incoming.valid_through << dendl;
+      scrubber.received_maps[m->from].merge_incr(incoming);
+    } else {
+      scrubber.received_maps[m->from].decode(p, info.pgid.pool());
+    }
+  }
 
   --scrubber.waiting_on;
   scrubber.waiting_on_whom.erase(m->from);
 
   if (scrubber.waiting_on == 0) {
-    osd->scrub_wq.queue(this);
+    if (scrubber.is_chunky) { // chunky scrub
+      osd->scrub_wq.queue(this);
+    } else {                  // classic scrub
+      if (scrubber.finalizing) { // incremental lists received
+        osd->scrub_finalize_wq.queue(this);
+      } else {                // initial lists received
+        scrubber.block_writes = true;
+        if (last_update_applied == info.last_update) {
+          scrubber.finalizing = true;
+          scrub_gather_replica_maps();
+          ++scrubber.waiting_on;
+          scrubber.waiting_on_whom.insert(pg_whoami);
+          osd->scrub_wq.queue(this);
+        }
+      }
+    }
   }
 }
 
@@ -3375,7 +3312,7 @@ void PG::_scan_rollback_obs(
        i != rollback_obs.end();
        ++i) {
     if (i->generation < trimmed_to.version) {
-      osd->clog->error() << "osd." << osd->whoami
+      osd->clog.error() << "osd." << osd->whoami
 			<< " pg " << info.pgid
 			<< " found obsolete rollback obj "
 			<< *i << " generation < trimmed_to "
@@ -3435,7 +3372,7 @@ void PG::_scan_snaps(ScrubMap &smap)
 		 << dendl;
 	    assert(0);
 	  }
-	  osd->clog->error() << "osd." << osd->whoami
+	  osd->clog.error() << "osd." << osd->whoami
 			    << " found snap mapper error on pg "
 			    << info.pgid
 			    << " oid " << hoid << " snaps in mapper: "
@@ -3443,7 +3380,7 @@ void PG::_scan_snaps(ScrubMap &smap)
 			    << oi_snaps
 			    << "...repaired";
 	} else {
-	  osd->clog->error() << "osd." << osd->whoami
+	  osd->clog.error() << "osd." << osd->whoami
 			    << " found snap mapper error on pg "
 			    << info.pgid
 			    << " oid " << hoid << " snaps missing in mapper"
@@ -3605,6 +3542,19 @@ void PG::repair_object(
 
 /* replica_scrub
  *
+ * Classic behavior:
+ *
+ * If msg->scrub_from is not set, replica_scrub calls build_scrubmap to
+ * build a complete map (with the pg lock dropped).
+ *
+ * If msg->scrub_from is set, replica_scrub sets scrubber.finalizing.
+ * Similarly to scrub, if last_update_applied is behind info.last_update
+ * replica_scrub returns to be requeued by sub_op_modify_applied.
+ * replica_scrub then builds an incremental scrub map with the 
+ * pg lock held.
+ *
+ * Chunky behavior:
+ *
  * Wait for last_update_applied to match msg->scrub_to as above. Wait
  * for pushes to complete in case of recent recovery. Build a single
  * scrubmap of objects that are in the range [msg->start, msg->end).
@@ -3617,32 +3567,62 @@ void PG::replica_scrub(
   dout(7) << "replica_scrub" << dendl;
 
   if (msg->map_epoch < info.history.same_interval_since) {
-    dout(10) << "replica_scrub discarding old replica_scrub from "
-	     << msg->map_epoch << " < " << info.history.same_interval_since 
-	     << dendl;
+    if (scrubber.finalizing) {
+      dout(10) << "scrub  pg changed, aborting" << dendl;
+      scrubber.finalizing = 0;
+    } else {
+      dout(10) << "replica_scrub discarding old replica_scrub from "
+	       << msg->map_epoch << " < " << info.history.same_interval_since 
+	       << dendl;
+    }
     return;
   }
 
   ScrubMap map;
 
-  assert(msg->chunky);
-  if (last_update_applied < msg->scrub_to) {
-    dout(10) << "waiting for last_update_applied to catch up" << dendl;
-    scrubber.active_rep_scrub = msg;
-    msg->get();
-    return;
-  }
+  if (msg->chunky) { // chunky scrub
+    if (last_update_applied < msg->scrub_to) {
+      dout(10) << "waiting for last_update_applied to catch up" << dendl;
+      scrubber.active_rep_scrub = msg;
+      msg->get();
+      return;
+    }
 
-  if (active_pushes > 0) {
-    dout(10) << "waiting for active pushes to finish" << dendl;
-    scrubber.active_rep_scrub = msg;
-    msg->get();
-    return;
-  }
+    if (active_pushes > 0) {
+      dout(10) << "waiting for active pushes to finish" << dendl;
+      scrubber.active_rep_scrub = msg;
+      msg->get();
+      return;
+    }
 
-  build_scrub_map_chunk(
-    map, msg->start, msg->end, msg->deep,
-    handle);
+    build_scrub_map_chunk(
+      map, msg->start, msg->end, msg->deep,
+      handle);
+
+  } else {
+    if (msg->scrub_from > eversion_t()) {
+      if (scrubber.finalizing) {
+        assert(last_update_applied == info.last_update);
+        assert(last_update_applied == msg->scrub_to);
+      } else {
+        scrubber.finalizing = 1;
+        if (last_update_applied != msg->scrub_to) {
+          scrubber.active_rep_scrub = msg;
+          msg->get();
+          return;
+        }
+      }
+      build_inc_scrub_map(map, msg->scrub_from, handle);
+      scrubber.finalizing = 0;
+    } else {
+      build_scrub_map(map, handle);
+    }
+
+    if (msg->map_epoch < info.history.same_interval_since) {
+      dout(10) << "scrub  pg changed, aborting" << dendl;
+      return;
+    }
+  }
 
   vector<OSDOp> scrub(1);
   scrub[0].op.op = CEPH_OSD_OP_SCRUB_MAP;
@@ -3703,6 +3683,7 @@ void PG::scrub(ThreadPool::TPHandle &handle)
   // when we're starting a scrub, we need to determine which type of scrub to do
   if (!scrubber.active) {
     OSDMapRef curmap = osd->get_osdmap();
+    scrubber.is_chunky = true;
     assert(backfill_targets.empty());
     for (unsigned i=0; i<acting.size(); i++) {
       if (acting[i] == pg_whoami.osd)
@@ -3716,22 +3697,165 @@ void PG::scrub(ThreadPool::TPHandle &handle)
         dout(20) << "OSD " << acting[i]
                  << " does not support chunky scrubs, falling back to classic"
                  << dendl;
-        assert(0 == "Running incompatible OSD");
+        scrubber.is_chunky = false;
         break;
       }
     }
 
-    scrubber.deep = state_test(PG_STATE_DEEP_SCRUB);
+    if (scrubber.is_chunky) {
+      scrubber.deep = state_test(PG_STATE_DEEP_SCRUB);
+    } else {
+      state_clear(PG_STATE_DEEP_SCRUB);
+    }
 
-    dout(10) << "starting a new chunky scrub" << dendl;
+    dout(10) << "starting a new " << (scrubber.is_chunky ? "chunky" : "classic") << " scrub" << dendl;
   }
 
-  chunky_scrub(handle);
+  if (scrubber.is_chunky) {
+    chunky_scrub(handle);
+  } else {
+    classic_scrub(handle);
+  }
 
   unlock();
 }
 
 /*
+ * Classic scrub is a two stage scrub: an initial scrub with writes enabled
+ * followed by a finalize with writes blocked.
+ *
+ * A request is sent out to all replicas for initial scrub maps. Once they reply
+ * (sub_op_scrub_map) writes are blocked for all objects in the PG.
+ *
+ * Finalize: Primaries and replicas wait for all writes in the log to be applied
+ * (op_applied), then builds an incremental scrub of all the changes since the
+ * beginning of the scrub.
+ *
+ * Once the primary has received all maps, it compares them and performs
+ * repairs.
+ *
+ * The initial stage of the scrub is handled by scrub_wq and the final stage by
+ * scrub_finalize_wq.
+ *
+ * Relevant variables:
+ *
+ * scrubber.waiting_on (int)
+ * scrubber.waiting_on_whom
+ *    Number of people who still need to build an initial/incremental scrub map.
+ *    This is decremented in sub_op_scrub_map.
+ *
+ * last_update_applied
+ *    The last update that's hit the disk. In the finalize stage, we block
+ *    writes and wait for all writes to flush by checking:
+ *
+ *      last_update_appied == info.last_update
+ *
+ *    This is checked in op_applied.
+ *
+ *  scrubber.block_writes
+ *    Flag to determine if writes are blocked.
+ *
+ *  finalizing scrub
+ *    Flag set when we're in the finalize stage.
+ *
+ */
+void PG::classic_scrub(ThreadPool::TPHandle &handle)
+{
+  assert(pool.info.type == pg_pool_t::TYPE_REPLICATED);
+  if (!scrubber.active) {
+    dout(10) << "scrub start" << dendl;
+    scrubber.active = true;
+    scrubber.classic = true;
+
+    publish_stats_to_osd();
+    scrubber.received_maps.clear();
+    scrubber.epoch_start = info.history.same_interval_since;
+
+    osd->inc_scrubs_active(scrubber.reserved);
+    if (scrubber.reserved) {
+      scrubber.reserved = false;
+      scrubber.reserved_peers.clear();
+    }
+
+    /* scrubber.waiting_on == 0 iff all replicas have sent the requested maps and
+     * the primary has done a final scrub (which in turn can only happen if
+     * last_update_applied == info.last_update)
+     */
+    scrubber.waiting_on = acting.size();
+    scrubber.waiting_on_whom.insert(
+      actingbackfill.begin(), actingbackfill.end());
+    scrubber.waiting_on_whom.erase(pg_whoami);
+
+    // request maps from replicas
+    for (set<pg_shard_t>::iterator i = actingbackfill.begin();
+	 i != actingbackfill.end();
+	 ++i) {
+      if (*i == pg_whoami) continue;
+      _request_scrub_map_classic(*i, eversion_t());
+    }
+
+    // Unlocks and relocks...
+    scrubber.primary_scrubmap = ScrubMap();
+    build_scrub_map(scrubber.primary_scrubmap, handle);
+
+    if (scrubber.epoch_start != info.history.same_interval_since) {
+      dout(10) << "scrub  pg changed, aborting" << dendl;
+      scrub_clear_state();
+      scrub_unreserve_replicas();
+      return;
+    }
+
+    --scrubber.waiting_on;
+    scrubber.waiting_on_whom.erase(pg_whoami);
+
+    if (scrubber.waiting_on == 0) {
+      // the replicas have completed their scrub map, so lock out writes
+      scrubber.block_writes = true;
+    } else {
+      dout(10) << "wait for replicas to build initial scrub map" << dendl;
+      return;
+    }
+
+    if (last_update_applied != info.last_update) {
+      dout(10) << "wait for cleanup" << dendl;
+      return;
+    }
+
+    // fall through if last_update_applied == info.last_update and scrubber.waiting_on == 0
+
+    // request incrementals from replicas
+    scrub_gather_replica_maps();
+    ++scrubber.waiting_on;
+    scrubber.waiting_on_whom.insert(pg_whoami);
+  }
+    
+  dout(10) << "clean up scrub" << dendl;
+  assert(last_update_applied == info.last_update);
+
+  scrubber.finalizing = true;
+
+  if (scrubber.epoch_start != info.history.same_interval_since) {
+    dout(10) << "scrub  pg changed, aborting" << dendl;
+    scrub_clear_state();
+    scrub_unreserve_replicas();
+    return;
+  }
+  
+  if (scrubber.primary_scrubmap.valid_through != pg_log.get_head()) {
+    ScrubMap incr;
+    build_inc_scrub_map(incr, scrubber.primary_scrubmap.valid_through, handle);
+    scrubber.primary_scrubmap.merge_incr(incr);
+  }
+  
+  --scrubber.waiting_on;
+  scrubber.waiting_on_whom.erase(pg_whoami);
+  if (scrubber.waiting_on == 0) {
+    assert(last_update_applied == info.last_update);
+    osd->scrub_finalize_wq.queue(this);
+  }
+}
+
+/*
  * Chunky scrub scrubs objects one chunk at a time with writes blocked for that
  * chunk.
  *
@@ -4106,7 +4230,7 @@ void PG::scrub_compare_maps()
     dout(2) << ss.str() << dendl;
 
     if (!authoritative.empty() || !scrubber.inconsistent_snapcolls.empty()) {
-      osd->clog->error(ss);
+      osd->clog.error(ss);
     }
 
     for (map<hobject_t, pg_shard_t>::iterator i = authoritative.begin();
@@ -4156,7 +4280,7 @@ void PG::scrub_process_inconsistent()
        << scrubber.missing.size() << " missing, "
        << scrubber.inconsistent.size() << " inconsistent objects\n";
     dout(2) << ss.str() << dendl;
-    osd->clog->error(ss);
+    osd->clog.error(ss);
     if (repair) {
       state_clear(PG_STATE_CLEAN);
       for (map<hobject_t, pair<ScrubMap::object, pg_shard_t> >::iterator i =
@@ -4252,9 +4376,9 @@ void PG::scrub_finish()
       oss << ", " << scrubber.fixed << " fixed";
     oss << "\n";
     if (total_errors)
-      osd->clog->error(oss);
+      osd->clog.error(oss);
     else
-      osd->clog->info(oss);
+      osd->clog.info(oss);
   }
 
   // finish up
@@ -4421,7 +4545,7 @@ void PG::fulfill_log(
     dout(10) << " sending info+missing+log since " << query.since
 	     << dendl;
     if (query.since != eversion_t() && query.since < pg_log.get_tail()) {
-      osd->clog->error() << info.pgid << " got broken pg_query_t::LOG since " << query.since
+      osd->clog.error() << info.pgid << " got broken pg_query_t::LOG since " << query.since
 			<< " when my log.tail is " << pg_log.get_tail()
 			<< ", sending full log instead\n";
       mlog->log = pg_log.get_log();           // primary should not have requested this!!
@@ -4438,7 +4562,7 @@ void PG::fulfill_log(
   ConnectionRef con = osd->get_con_osd_cluster(
     from.osd, get_osdmap()->get_epoch());
   if (con) {
-    osd->share_map_peer(from.osd, con.get(), get_osdmap());
+    osd->osd->_share_map_outgoing(from.osd, con.get(), get_osdmap());
     osd->send_message_osd_cluster(mlog, con.get());
   } else {
     mlog->put();
@@ -4525,27 +4649,24 @@ bool PG::may_need_replay(const OSDMapRef osdmap) const
   return crashed;
 }
 
-bool PG::should_restart_peering(
+bool PG::is_split(OSDMapRef lastmap, OSDMapRef nextmap)
+{
+  return info.pgid.is_split(
+    lastmap->get_pg_num(pool.id),
+    nextmap->get_pg_num(pool.id),
+    0);
+}
+
+bool PG::acting_up_affected(
   int newupprimary,
   int newactingprimary,
-  const vector<int>& newup,
-  const vector<int>& newacting,
-  OSDMapRef lastmap,
-  OSDMapRef osdmap)
-{
-  if (pg_interval_t::is_new_interval(
-	primary.osd,
-	newactingprimary,
-	acting,
-	newacting,
-	up_primary.osd,
-	newupprimary,
-	up,
-	newup,
-	osdmap,
-	lastmap,
-	info.pgid.pgid)) {
-    dout(20) << "new interval newup " << newup
+  const vector<int>& newup, const vector<int>& newacting)
+{
+  if (newupprimary != up_primary.osd ||
+      newactingprimary != primary.osd ||
+      acting != newacting ||
+      up != newup) {
+    dout(20) << "acting_up_affected newup " << newup
 	     << " newacting " << newacting << dendl;
     return true;
   } else {
@@ -4680,7 +4801,6 @@ void PG::start_peering_interval(
     dout(10) << " no lastmap" << dendl;
     dirty_info = true;
     dirty_big_info = true;
-    info.history.same_interval_since = osdmap->get_epoch();
   } else {
     std::stringstream debug;
     bool new_interval = pg_interval_t::check_new_interval(
@@ -4694,6 +4814,7 @@ void PG::start_peering_interval(
       info.history.last_epoch_clean,
       osdmap,
       lastmap,
+      info.pgid.pool(),
       info.pgid.pgid,
       &past_intervals,
       &debug);
@@ -4703,11 +4824,17 @@ void PG::start_peering_interval(
       dout(10) << " noting past " << past_intervals.rbegin()->second << dendl;
       dirty_info = true;
       dirty_big_info = true;
-      info.history.same_interval_since = osdmap->get_epoch();
     }
   }
 
   if (old_up_primary != up_primary ||
+      old_acting_primary != primary ||
+      oldacting != acting ||
+      oldup != up ||
+      is_split(lastmap, osdmap)) {
+    info.history.same_interval_since = osdmap->get_epoch();
+  }
+  if (old_up_primary != up_primary ||
       oldup != up) {
     info.history.same_up_since = osdmap->get_epoch();
   }
@@ -4913,7 +5040,7 @@ ostream& operator<<(ostream& out, const PG& pg)
   return out;
 }
 
-bool PG::can_discard_op(OpRequestRef& op)
+bool PG::can_discard_op(OpRequestRef op)
 {
   MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
   if (OSD::op_is_discardable(m)) {
@@ -4963,7 +5090,7 @@ bool PG::can_discard_op(OpRequestRef& op)
 }
 
 template<typename T, int MSGTYPE>
-bool PG::can_discard_replica_op(OpRequestRef& op)
+bool PG::can_discard_replica_op(OpRequestRef op)
 {
   T *m = static_cast<T *>(op->get_req());
   assert(m->get_header().type == MSGTYPE);
@@ -5014,7 +5141,7 @@ bool PG::can_discard_backfill(OpRequestRef op)
 
 }
 
-bool PG::can_discard_request(OpRequestRef& op)
+bool PG::can_discard_request(OpRequestRef op)
 {
   switch (op->get_req()->get_type()) {
   case CEPH_MSG_OSD_OP:
@@ -5047,67 +5174,77 @@ bool PG::can_discard_request(OpRequestRef& op)
   return true;
 }
 
-bool PG::op_must_wait_for_map(epoch_t cur_epoch, OpRequestRef& op)
+bool PG::split_request(OpRequestRef op, unsigned match, unsigned bits)
+{
+  unsigned mask = ~((~0)<<bits);
+  switch (op->get_req()->get_type()) {
+  case CEPH_MSG_OSD_OP:
+    return (static_cast<MOSDOp*>(op->get_req())->get_pg().m_seed & mask) == match;
+  }
+  return false;
+}
+
+bool PG::op_must_wait_for_map(OSDMapRef curmap, OpRequestRef op)
 {
   switch (op->get_req()->get_type()) {
   case CEPH_MSG_OSD_OP:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDOp*>(op->get_req())->get_map_epoch());
 
   case MSG_OSD_SUBOP:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDSubOp*>(op->get_req())->map_epoch);
 
   case MSG_OSD_SUBOPREPLY:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDSubOpReply*>(op->get_req())->map_epoch);
 
   case MSG_OSD_PG_SCAN:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDPGScan*>(op->get_req())->map_epoch);
 
   case MSG_OSD_PG_BACKFILL:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDPGBackfill*>(op->get_req())->map_epoch);
 
   case MSG_OSD_PG_PUSH:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDPGPush*>(op->get_req())->map_epoch);
 
   case MSG_OSD_PG_PULL:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDPGPull*>(op->get_req())->map_epoch);
 
   case MSG_OSD_PG_PUSH_REPLY:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDPGPushReply*>(op->get_req())->map_epoch);
 
   case MSG_OSD_EC_WRITE:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDECSubOpWrite*>(op->get_req())->map_epoch);
 
   case MSG_OSD_EC_WRITE_REPLY:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDECSubOpWriteReply*>(op->get_req())->map_epoch);
 
   case MSG_OSD_EC_READ:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDECSubOpRead*>(op->get_req())->map_epoch);
 
   case MSG_OSD_EC_READ_REPLY:
     return !have_same_or_newer_map(
-      cur_epoch,
+      curmap,
       static_cast<MOSDECSubOpReadReply*>(op->get_req())->map_epoch);
   }
   assert(0);
@@ -5344,14 +5481,13 @@ boost::statechart::result PG::RecoveryState::Started::react(const AdvMap& advmap
 {
   dout(10) << "Started advmap" << dendl;
   PG *pg = context< RecoveryMachine >().pg;
-  if (pg->should_restart_peering(
+  if (pg->acting_up_affected(
 	advmap.up_primary,
 	advmap.acting_primary,
 	advmap.newup,
-	advmap.newacting,
-	advmap.lastmap,
-	advmap.osdmap)) {
-    dout(10) << "should_restart_peering, transitioning to Reset" << dendl;
+	advmap.newacting) ||
+      pg->is_split(advmap.lastmap, advmap.osdmap)) {
+    dout(10) << "up or acting affected, transitioning to Reset" << dendl;
     post_event(advmap);
     return transit< Reset >();
   }
@@ -5413,14 +5549,13 @@ boost::statechart::result PG::RecoveryState::Reset::react(const AdvMap& advmap)
   // _before_ we are active.
   pg->generate_past_intervals();
 
-  if (pg->should_restart_peering(
+  if (pg->acting_up_affected(
 	advmap.up_primary,
 	advmap.acting_primary,
 	advmap.newup,
-	advmap.newacting,
-	advmap.lastmap,
-	advmap.osdmap)) {
-    dout(10) << "should restart peering, calling start_peering_interval again"
+	advmap.newacting) ||
+      pg->is_split(advmap.lastmap, advmap.osdmap)) {
+    dout(10) << "up or acting affected, calling start_peering_interval again"
 	     << dendl;
     pg->start_peering_interval(
       advmap.lastmap,
@@ -5713,12 +5848,13 @@ PG::RecoveryState::WaitRemoteBackfillReserved::react(const RemoteBackfillReserve
       backfill_osd_it->osd, pg->get_osdmap()->get_epoch());
     if (con) {
       if (con->has_feature(CEPH_FEATURE_BACKFILL_RESERVATION)) {
+        unsigned priority = pg->is_degraded() ? OSDService::BACKFILL_HIGH
+	  : OSDService::BACKFILL_LOW;
         pg->osd->send_message_osd_cluster(
           new MBackfillReserve(
 	  MBackfillReserve::REQUEST,
 	  spg_t(pg->info.pgid.pgid, backfill_osd_it->shard),
-	  pg->get_osdmap()->get_epoch(),
-	  pg->get_backfill_priority()),
+	  pg->get_osdmap()->get_epoch(), priority),
 	con.get());
       } else {
         post_event(RemoteBackfillReserved());
@@ -5787,8 +5923,8 @@ PG::RecoveryState::WaitLocalBackfillReserved::WaitLocalBackfillReserved(my_conte
     pg->info.pgid,
     new QueuePeeringEvt<LocalBackfillReserved>(
       pg, pg->get_osdmap()->get_epoch(),
-      LocalBackfillReserved()),
-    pg->get_backfill_priority());
+      LocalBackfillReserved()), pg->is_degraded() ? OSDService::BACKFILL_HIGH
+	 : OSDService::BACKFILL_LOW);
 }
 
 void PG::RecoveryState::WaitLocalBackfillReserved::exit()
@@ -5855,8 +5991,7 @@ PG::RecoveryState::RepWaitRecoveryReserved::RepWaitRecoveryReserved(my_context c
     pg->info.pgid,
     new QueuePeeringEvt<RemoteRecoveryReserved>(
       pg, pg->get_osdmap()->get_epoch(),
-      RemoteRecoveryReserved()),
-    pg->get_recovery_priority());
+      RemoteRecoveryReserved()), OSDService::RECOVERY);
 }
 
 boost::statechart::result
@@ -6016,8 +6151,7 @@ PG::RecoveryState::WaitLocalRecoveryReserved::WaitLocalRecoveryReserved(my_conte
     pg->info.pgid,
     new QueuePeeringEvt<LocalRecoveryReserved>(
       pg, pg->get_osdmap()->get_epoch(),
-      LocalRecoveryReserved()),
-    pg->get_recovery_priority());
+      LocalRecoveryReserved()), OSDService::RECOVERY);
 }
 
 void PG::RecoveryState::WaitLocalRecoveryReserved::exit()
@@ -6151,10 +6285,8 @@ PG::RecoveryState::Recovered::Recovered(my_context ctx)
   PG *pg = context< RecoveryMachine >().pg;
   pg->osd->local_reserver.cancel_reservation(pg->info.pgid);
 
-  assert(!pg->needs_recovery());
-
   // if we finished backfill, all acting are active; recheck if
-  // DEGRADED | UNDERSIZED is appropriate.
+  // DEGRADED is appropriate.
   assert(!pg->actingbackfill.empty());
   if (pg->get_osdmap()->get_pg_size(pg->info.pgid.pgid) <=
       pg->actingbackfill.size())
@@ -6164,6 +6296,8 @@ PG::RecoveryState::Recovered::Recovered(my_context ctx)
   if (pg->acting != pg->up && !pg->choose_acting(auth_log_shard))
     assert(pg->want_acting.size());
 
+  assert(!pg->needs_recovery());
+
   if (context< Active >().all_replicas_activated)
     post_event(GoClean());
 }
@@ -6266,11 +6400,13 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
     pg->dirty_big_info = true;
   }
 
-  for (size_t i = 0; i < pg->want_acting.size(); i++) {
-    int osd = pg->want_acting[i];
-    if (!advmap.osdmap->is_up(osd)) {
-      pg_shard_t osd_with_shard(osd, shard_id_t(i));
-      assert(pg->is_acting(osd_with_shard) || pg->is_up(osd_with_shard));
+  for (vector<int>::iterator p = pg->want_acting.begin();
+       p != pg->want_acting.end(); ++p) {
+    if (!advmap.osdmap->is_up(*p)) {
+      assert((std::find(pg->acting.begin(), pg->acting.end(), *p) !=
+	      pg->acting.end()) ||
+	     (std::find(pg->up.begin(), pg->up.end(), *p) !=
+	      pg->up.end()));
     }
   }
 
@@ -6278,17 +6414,10 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
    * this does not matter) */
   if (advmap.lastmap->get_pg_size(pg->info.pgid.pgid) !=
       pg->get_osdmap()->get_pg_size(pg->info.pgid.pgid)) {
-    if (pg->get_osdmap()->get_pg_size(pg->info.pgid.pgid) <= pg->actingset.size()) {
-      pg->state_clear(PG_STATE_UNDERSIZED);
-      if (pg->needs_recovery()) {
-	pg->state_set(PG_STATE_DEGRADED);
-      } else {
-	pg->state_clear(PG_STATE_DEGRADED);
-      }
-    } else {
-      pg->state_set(PG_STATE_UNDERSIZED);
+    if (pg->get_osdmap()->get_pg_size(pg->info.pgid.pgid) <= pg->acting.size())
+      pg->state_clear(PG_STATE_DEGRADED);
+    else
       pg->state_set(PG_STATE_DEGRADED);
-    }
     pg->publish_stats_to_osd(); // degraded may have changed
   }
 
@@ -6320,11 +6449,11 @@ boost::statechart::result PG::RecoveryState::Active::react(const ActMap&)
   if (unfound > 0 &&
       pg->all_unfound_are_queried_or_lost(pg->get_osdmap())) {
     if (pg->cct->_conf->osd_auto_mark_unfound_lost) {
-      pg->osd->clog->error() << pg->info.pgid << " has " << unfound
+      pg->osd->clog.error() << pg->info.pgid << " has " << unfound
 			    << " objects unfound and apparently lost, would automatically marking lost but NOT IMPLEMENTED\n";
       //pg->mark_all_unfound_lost(*context< RecoveryMachine >().get_cur_transaction());
     } else
-      pg->osd->clog->error() << pg->info.pgid << " has " << unfound << " objects unfound and apparently lost\n";
+      pg->osd->clog.error() << pg->info.pgid << " has " << unfound << " objects unfound and apparently lost\n";
   }
 
   if (!pg->snap_trimq.empty() &&
@@ -6446,6 +6575,7 @@ boost::statechart::result PG::RecoveryState::Active::react(const QueryState& q)
     q.f->dump_stream("scrubber.epoch_start") << pg->scrubber.epoch_start;
     q.f->dump_int("scrubber.active", pg->scrubber.active);
     q.f->dump_int("scrubber.block_writes", pg->scrubber.block_writes);
+    q.f->dump_int("scrubber.finalizing", pg->scrubber.finalizing);
     q.f->dump_int("scrubber.waiting_on", pg->scrubber.waiting_on);
     {
       q.f->open_array_section("scrubber.waiting_on_whom");
@@ -6491,7 +6621,6 @@ void PG::RecoveryState::Active::exit()
   pg->backfill_reserved = false;
   pg->backfill_reserving = false;
   pg->state_clear(PG_STATE_DEGRADED);
-  pg->state_clear(PG_STATE_UNDERSIZED);
   pg->state_clear(PG_STATE_BACKFILL_TOOFULL);
   pg->state_clear(PG_STATE_BACKFILL_WAIT);
   pg->state_clear(PG_STATE_RECOVERY_WAIT);
@@ -6577,9 +6706,12 @@ boost::statechart::result PG::RecoveryState::ReplicaActive::react(const MQuery&
 
 boost::statechart::result PG::RecoveryState::ReplicaActive::react(const QueryState& q)
 {
+  PG *pg = context< RecoveryMachine >().pg;
+
   q.f->open_object_section("state");
   q.f->dump_string("name", state_name);
   q.f->dump_stream("enter_time") << enter_time;
+  q.f->dump_int("scrubber.finalizing", pg->scrubber.finalizing);
   q.f->close_section();
   return forward_event();
 }
@@ -6717,11 +6849,11 @@ PG::RecoveryState::GetInfo::GetInfo(my_context ctx)
   pg->generate_past_intervals();
   auto_ptr<PriorSet> &prior_set = context< Peering >().prior_set;
 
-  assert(pg->blocked_by.empty());
-
   if (!prior_set.get())
     pg->build_prior(prior_set);
 
+  pg->publish_stats_to_osd();
+
   pg->reset_peer_features();
   get_infos();
   if (peer_info_requested.empty() && !prior_set->pg_down) {
@@ -6734,7 +6866,6 @@ void PG::RecoveryState::GetInfo::get_infos()
   PG *pg = context< RecoveryMachine >().pg;
   auto_ptr<PriorSet> &prior_set = context< Peering >().prior_set;
 
-  pg->blocked_by.clear();
   for (set<pg_shard_t>::const_iterator it = prior_set->probe.begin();
        it != prior_set->probe.end();
        ++it) {
@@ -6748,7 +6879,6 @@ void PG::RecoveryState::GetInfo::get_infos()
     }
     if (peer_info_requested.count(peer)) {
       dout(10) << " already requested info from osd." << peer << dendl;
-      pg->blocked_by.insert(peer.osd);
     } else if (!pg->get_osdmap()->is_up(peer.osd)) {
       dout(10) << " not querying info from down osd." << peer << dendl;
     } else {
@@ -6759,23 +6889,17 @@ void PG::RecoveryState::GetInfo::get_infos()
 			 pg->info.history,
 			 pg->get_osdmap()->get_epoch()));
       peer_info_requested.insert(peer);
-      pg->blocked_by.insert(peer.osd);
     }
   }
-
-  pg->publish_stats_to_osd();
 }
 
 boost::statechart::result PG::RecoveryState::GetInfo::react(const MNotifyRec& infoevt) 
 {
-  PG *pg = context< RecoveryMachine >().pg;
-
   set<pg_shard_t>::iterator p = peer_info_requested.find(infoevt.from);
-  if (p != peer_info_requested.end()) {
+  if (p != peer_info_requested.end())
     peer_info_requested.erase(p);
-    pg->blocked_by.erase(infoevt.from.osd);
-  }
 
+  PG *pg = context< RecoveryMachine >().pg;
   epoch_t old_start = pg->info.history.last_epoch_started;
   if (pg->proc_replica_info(infoevt.from, infoevt.notify.info)) {
     // we got something new ...
@@ -6834,7 +6958,7 @@ boost::statechart::result PG::RecoveryState::GetInfo::react(const MNotifyRec& in
 	    int o = interval.acting[i];
 	    if (o == CRUSH_ITEM_NONE)
 	      continue;
-	    pg_shard_t so(o, pg->pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD);
+	    pg_shard_t so(o, pg->pool.info.ec_pool() ? i : ghobject_t::NO_SHARD);
 	    if (!osdmap->exists(o) || osdmap->get_info(o).lost_at > interval.first)
 	      continue;  // dne or lost
 	    if (osdmap->is_up(o)) {
@@ -6898,7 +7022,6 @@ void PG::RecoveryState::GetInfo::exit()
   PG *pg = context< RecoveryMachine >().pg;
   utime_t dur = ceph_clock_now(pg->cct) - enter_time;
   pg->osd->recoverystate_perf->tinc(rs_getinfo_latency, dur);
-  pg->blocked_by.clear();
 }
 
 /*------GetLog------------*/
@@ -6958,10 +7081,6 @@ PG::RecoveryState::GetLog::GetLog(my_context ctx)
       auth_log_shard.shard, pg->pg_whoami.shard,
       request_log_from, pg->info.history,
       pg->get_osdmap()->get_epoch()));
-
-  assert(pg->blocked_by.empty());
-  pg->blocked_by.insert(auth_log_shard.osd);
-  pg->publish_stats_to_osd();
 }
 
 boost::statechart::result PG::RecoveryState::GetLog::react(const AdvMap& advmap)
@@ -7028,8 +7147,6 @@ void PG::RecoveryState::GetLog::exit()
   PG *pg = context< RecoveryMachine >().pg;
   utime_t dur = ceph_clock_now(pg->cct) - enter_time;
   pg->osd->recoverystate_perf->tinc(rs_getlog_latency, dur);
-  pg->blocked_by.clear();
-  pg->publish_stats_to_osd();
 }
 
 /*------WaitActingChange--------*/
@@ -7102,10 +7219,6 @@ PG::RecoveryState::Incomplete::Incomplete(my_context ctx)
 
   pg->state_clear(PG_STATE_PEERING);
   pg->state_set(PG_STATE_INCOMPLETE);
-
-  auto_ptr<PriorSet> &prior_set = context< Peering >().prior_set;
-  assert(pg->blocked_by.empty());
-  pg->blocked_by.insert(prior_set->down.begin(), prior_set->down.end());
   pg->publish_stats_to_osd();
 }
 
@@ -7146,8 +7259,6 @@ void PG::RecoveryState::Incomplete::exit()
   pg->state_clear(PG_STATE_INCOMPLETE);
   utime_t dur = ceph_clock_now(pg->cct) - enter_time;
   pg->osd->recoverystate_perf->tinc(rs_incomplete_latency, dur);
-
-  pg->blocked_by.clear();
 }
 
 /*------GetMissing--------*/
@@ -7214,7 +7325,6 @@ PG::RecoveryState::GetMissing::GetMissing(my_context ctx)
 	  pg->info.history, pg->get_osdmap()->get_epoch()));
     }
     peer_missing_requested.insert(*i);
-    pg->blocked_by.insert(i->osd);
   }
 
   if (peer_missing_requested.empty()) {
@@ -7226,8 +7336,6 @@ PG::RecoveryState::GetMissing::GetMissing(my_context ctx)
 
     // all good!
     post_event(Activate(pg->get_osdmap()->get_epoch()));
-  } else {
-    pg->publish_stats_to_osd();
   }
 }
 
@@ -7250,7 +7358,7 @@ boost::statechart::result PG::RecoveryState::GetMissing::react(const MLogRec& lo
     }
   }
   return discard_event();
-}
+};
 
 boost::statechart::result PG::RecoveryState::GetMissing::react(const QueryState& q)
 {
@@ -7284,8 +7392,6 @@ void PG::RecoveryState::GetMissing::exit()
   PG *pg = context< RecoveryMachine >().pg;
   utime_t dur = ceph_clock_now(pg->cct) - enter_time;
   pg->osd->recoverystate_perf->tinc(rs_getmissing_latency, dur);
-  pg->blocked_by.clear();
-  pg->publish_stats_to_osd();
 }
 
 /*------WaitUpThru--------*/
@@ -7416,13 +7522,13 @@ PG::PriorSet::PriorSet(bool ec_pool,
   // sending them any new info/logs/whatever.
   for (unsigned i=0; i<acting.size(); i++) {
     if (acting[i] != CRUSH_ITEM_NONE)
-      probe.insert(pg_shard_t(acting[i], ec_pool ? shard_id_t(i) : shard_id_t::NO_SHARD));
+      probe.insert(pg_shard_t(acting[i], ec_pool ? i : ghobject_t::NO_SHARD));
   }
   // It may be possible to exlude the up nodes, but let's keep them in
   // there for now.
   for (unsigned i=0; i<up.size(); i++) {
     if (up[i] != CRUSH_ITEM_NONE)
-      probe.insert(pg_shard_t(up[i], ec_pool ? shard_id_t(i) : shard_id_t::NO_SHARD));
+      probe.insert(pg_shard_t(up[i], ec_pool ? i : ghobject_t::NO_SHARD));
   }
 
   for (map<epoch_t,pg_interval_t>::const_reverse_iterator p = past_intervals.rbegin();
@@ -7451,7 +7557,7 @@ PG::PriorSet::PriorSet(bool ec_pool,
       int o = interval.acting[i];
       if (o == CRUSH_ITEM_NONE)
 	continue;
-      pg_shard_t so(o, ec_pool ? shard_id_t(i) : shard_id_t::NO_SHARD);
+      pg_shard_t so(o, ec_pool ? i : ghobject_t::NO_SHARD);
 
       const osd_info_t *pinfo = 0;
       if (osdmap.exists(o))
diff --git a/src/osd/PG.h b/src/osd/PG.h
index 70dafae..e319477 100644
--- a/src/osd/PG.h
+++ b/src/osd/PG.h
@@ -170,8 +170,11 @@ struct PGPool {
   interval_set<snapid_t> cached_removed_snaps;      // current removed_snaps set
   interval_set<snapid_t> newly_removed_snaps;  // newly removed in the last epoch
 
-  PGPool(int64_t i, const string& _name, uint64_t au)
-    : id(i), name(_name), auid(au) { }
+  PGPool(int64_t i, const char *_name, uint64_t au) :
+    id(i), auid(au) {
+    if (_name)
+      name = _name;
+  }
 
   void update(OSDMapRef map);
 };
@@ -204,7 +207,7 @@ protected:
   OSDMapRef last_persisted_osdmap_ref;
   PGPool pool;
 
-  void queue_op(OpRequestRef& op);
+  void queue_op(OpRequestRef op);
   void take_op_map_waiters();
 
   void update_osdmap_ref(OSDMapRef newmap) {
@@ -350,7 +353,7 @@ public:
       return ret;
     }
 
-    const map<hobject_t, pg_missing_t::item> &get_all_missing() const {
+    const map<hobject_t, pg_missing_t::item> &get_all_missing() {
       return needs_recovery_map;
     }
 
@@ -393,8 +396,7 @@ public:
     bool add_source_info(
       pg_shard_t source,           ///< [in] source
       const pg_info_t &oinfo,      ///< [in] info
-      const pg_missing_t &omissing, ///< [in] (optional) missing
-      ThreadPool::TPHandle* handle  ///< [in] ThreadPool handle
+      const pg_missing_t &omissing ///< [in] (optional) missing
       ); ///< @return whether a new object location was discovered
 
     /// Uses osdmap to update structures for now down sources
@@ -475,8 +477,6 @@ public:
   eversion_t  min_last_complete_ondisk;  // up: min over last_complete_ondisk, peer_last_complete_ondisk
   eversion_t  pg_trim_to;
 
-  set<int> blocked_by; ///< osds we are blocked by (for pg stats)
-
   // [primary only] content recovery state
  protected:
   struct PriorSet {
@@ -520,7 +520,6 @@ public:
     C_Contexts *on_applied;
     C_Contexts *on_safe;
     ObjectStore::Transaction *transaction;
-    ThreadPool::TPHandle* handle;
     RecoveryCtx(map<int, map<spg_t, pg_query_t> > *query_map,
 		map<int,
 		    vector<pair<pg_notify_t, pg_interval_map_t> > > *info_map,
@@ -533,8 +532,7 @@ public:
 	notify_list(notify_list),
 	on_applied(on_applied),
 	on_safe(on_safe),
-	transaction(transaction),
-        handle(NULL) {}
+	transaction(transaction) {}
 
     RecoveryCtx(BufferedRecoveryMessages &buf, RecoveryCtx &rctx)
       : query_map(&(buf.query_map)),
@@ -542,8 +540,7 @@ public:
 	notify_list(&(buf.notify_list)),
 	on_applied(rctx.on_applied),
 	on_safe(rctx.on_safe),
-	transaction(rctx.transaction),
-        handle(NULL) {}
+	transaction(rctx.transaction) {}
 
     void accept_buffered_messages(BufferedRecoveryMessages &m) {
       assert(query_map);
@@ -586,7 +583,7 @@ public:
     const char *get_state_name() { return state_name; }
     NamedState(CephContext *cct_, const char *state_name_)
       : state_name(state_name_),
-        enter_time(ceph_clock_now(cct_)) {}
+        enter_time(ceph_clock_now(cct_)) {};
     virtual ~NamedState() {}
   };
 
@@ -752,7 +749,6 @@ protected:
   ceph::shared_ptr<ObjectStore::Sequencer> osr;
 
   void _update_calc_stats();
-  void _update_blocked_by();
   void publish_stats_to_osd();
   void clear_publish_stats();
 
@@ -781,11 +777,6 @@ public:
   bool needs_recovery() const;
   bool needs_backfill() const;
 
-  /// get log recovery reservation priority
-  unsigned get_recovery_priority();
-  /// get backfill reservation priority
-  unsigned get_backfill_priority();
-
   void mark_clean();  ///< mark an active pg clean
 
   bool _calc_past_interval_range(epoch_t *start, epoch_t *end);
@@ -1023,7 +1014,8 @@ public:
       waiting_on(0), shallow_errors(0), deep_errors(0), fixed(0),
       active_rep_scrub(0),
       must_scrub(false), must_deep_scrub(false), must_repair(false),
-      state(INACTIVE),
+      classic(false),
+      finalizing(false), is_chunky(false), state(INACTIVE),
       deep(false)
     {
     }
@@ -1058,7 +1050,12 @@ public:
     // Map from object with errors to good peer
     map<hobject_t, pair<ScrubMap::object, pg_shard_t> > authoritative;
 
+    // classic scrub
+    bool classic;
+    bool finalizing;
+
     // chunky scrub
+    bool is_chunky;
     hobject_t start, end;
     eversion_t subset_last_update;
 
@@ -1115,6 +1112,9 @@ public:
       if (!block_writes)
 	return false;
 
+      if (!is_chunky)
+	return true;
+
       if (soid >= start && soid < end)
 	return true;
 
@@ -1123,6 +1123,8 @@ public:
 
     // clear all state
     void reset() {
+      classic = false;
+      finalizing = false;
       block_writes = false;
       active = false;
       queue_snap_trim = false;
@@ -1206,7 +1208,7 @@ public:
     const hobject_t &hoid,
     const map<string, bufferptr> &attrs,
     pg_shard_t osd,
-    ostream &out) { return false; }
+    ostream &out) { return false; };
   void clear_scrub_reserved();
   void scrub_reserve_replicas();
   void scrub_unreserve_replicas();
@@ -1993,11 +1995,10 @@ public:
   // Prevent copying
   PG(const PG& rhs);
   PG& operator=(const PG& rhs);
-  const spg_t pg_id;
   uint64_t peer_features;
 
  public:
-  const spg_t&      get_pgid() const { return pg_id; }
+  spg_t      get_pgid() const { return info.pgid; }
   int        get_nrep() const { return acting.size(); }
 
   void reset_peer_features() { peer_features = (uint64_t)-1; }
@@ -2011,30 +2012,30 @@ public:
     int new_acting_primary) {
     actingset.clear();
     acting = newacting;
-    for (uint8_t i = 0; i < acting.size(); ++i) {
+    for (shard_id_t i = 0; i < acting.size(); ++i) {
       if (acting[i] != CRUSH_ITEM_NONE)
 	actingset.insert(
 	  pg_shard_t(
 	    acting[i],
-	    pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD));
+	    pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
     }
     up = newup;
     if (!pool.info.ec_pool()) {
-      up_primary = pg_shard_t(new_up_primary, shard_id_t::NO_SHARD);
-      primary = pg_shard_t(new_acting_primary, shard_id_t::NO_SHARD);
+      up_primary = pg_shard_t(new_up_primary, ghobject_t::no_shard());
+      primary = pg_shard_t(new_acting_primary, ghobject_t::no_shard());
       return;
     }
     up_primary = pg_shard_t();
     primary = pg_shard_t();
-    for (uint8_t i = 0; i < up.size(); ++i) {
+    for (shard_id_t i = 0; i < up.size(); ++i) {
       if (up[i] == new_up_primary) {
-	up_primary = pg_shard_t(up[i], shard_id_t(i));
+	up_primary = pg_shard_t(up[i], i);
 	break;
       }
     }
-    for (uint8_t i = 0; i < acting.size(); ++i) {
+    for (shard_id_t i = 0; i < acting.size(); ++i) {
       if (acting[i] == new_acting_primary) {
-	primary = pg_shard_t(acting[i], shard_id_t(i));
+	primary = pg_shard_t(acting[i], i);
 	break;
       }
     }
@@ -2066,7 +2067,6 @@ public:
   bool       is_replay() const { return state_test(PG_STATE_REPLAY); }
   bool       is_clean() const { return state_test(PG_STATE_CLEAN); }
   bool       is_degraded() const { return state_test(PG_STATE_DEGRADED); }
-  bool       is_undersized() const { return state_test(PG_STATE_UNDERSIZED); }
 
   bool       is_scrubbing() const { return state_test(PG_STATE_SCRUBBING); }
 
@@ -2074,11 +2074,11 @@ public:
 
   void init(
     int role,
-    const vector<int>& up,
+    vector<int>& up,
     int up_primary,
-    const vector<int>& acting,
+    vector<int>& acting,
     int acting_primary,
-    const pg_history_t& history,
+    pg_history_t& history,
     pg_interval_map_t& pim,
     bool backfill,
     ObjectStore::Transaction *t);
@@ -2118,7 +2118,7 @@ public:
 
   std::string get_corrupt_pg_log_name() const;
   static int read_info(
-    ObjectStore *store, const coll_t &coll,
+    ObjectStore *store, const coll_t coll,
     bufferlist &bl, pg_info_t &info, map<epoch_t,pg_interval_t> &past_intervals,
     hobject_t &biginfo_oid, hobject_t &infos_oid,
     interval_set<snapid_t>  &snap_collections, __u8 &);
@@ -2160,38 +2160,36 @@ public:
   void fulfill_info(pg_shard_t from, const pg_query_t &query,
 		    pair<pg_shard_t, pg_info_t> &notify_info);
   void fulfill_log(pg_shard_t from, const pg_query_t &query, epoch_t query_epoch);
-
-  bool should_restart_peering(
-    int newupprimary,
-    int newactingprimary,
-    const vector<int>& newup,
-    const vector<int>& newacting,
-    OSDMapRef lastmap,
-    OSDMapRef osdmap);
+  bool is_split(OSDMapRef lastmap, OSDMapRef nextmap);
+  bool acting_up_affected(
+    int newupprimary, int newactingprimary,
+    const vector<int>& newup, const vector<int>& newacting);
 
   // OpRequest queueing
-  bool can_discard_op(OpRequestRef& op);
+  bool can_discard_op(OpRequestRef op);
   bool can_discard_scan(OpRequestRef op);
   bool can_discard_backfill(OpRequestRef op);
-  bool can_discard_request(OpRequestRef& op);
+  bool can_discard_request(OpRequestRef op);
 
   template<typename T, int MSGTYPE>
-  bool can_discard_replica_op(OpRequestRef& op);
+  bool can_discard_replica_op(OpRequestRef op);
 
-  static bool op_must_wait_for_map(epoch_t cur_epoch, OpRequestRef& op);
+  static bool op_must_wait_for_map(OSDMapRef curmap, OpRequestRef op);
+
+  static bool split_request(OpRequestRef op, unsigned match, unsigned bits);
 
   bool old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch);
   bool old_peering_evt(CephPeeringEvtRef evt) {
     return old_peering_msg(evt->get_epoch_sent(), evt->get_epoch_requested());
   }
-  static bool have_same_or_newer_map(epoch_t cur_epoch, epoch_t e) {
-    return e <= cur_epoch;
+  static bool have_same_or_newer_map(OSDMapRef osdmap, epoch_t e) {
+    return e <= osdmap->get_epoch();
   }
   bool have_same_or_newer_map(epoch_t e) {
     return e <= get_osdmap()->get_epoch();
   }
 
-  bool op_has_sufficient_caps(OpRequestRef& op);
+  bool op_has_sufficient_caps(OpRequestRef op);
 
 
   // recovery bits
@@ -2217,11 +2215,11 @@ public:
 
   // abstract bits
   virtual void do_request(
-    OpRequestRef& op,
+    OpRequestRef op,
     ThreadPool::TPHandle &handle
   ) = 0;
 
-  virtual void do_op(OpRequestRef& op) = 0;
+  virtual void do_op(OpRequestRef op) = 0;
   virtual void do_sub_op(OpRequestRef op) = 0;
   virtual void do_sub_op_reply(OpRequestRef op) = 0;
   virtual void do_scan(
diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc
index ad78d1f..57faadd 100644
--- a/src/osd/PGBackend.cc
+++ b/src/osd/PGBackend.cc
@@ -208,6 +208,7 @@ void PGBackend::rollback_setattrs(
   map<string, boost::optional<bufferlist> > &old_attrs,
   ObjectStore::Transaction *t) {
   map<string, bufferlist> to_set;
+  set<string> to_remove;
   assert(!hoid.is_temp());
   for (map<string, boost::optional<bufferlist> >::iterator i = old_attrs.begin();
        i != old_attrs.end();
@@ -513,7 +514,7 @@ void PGBackend::be_compare_scrubmaps(
   map<hobject_t, pg_shard_t> &authoritative,
   map<hobject_t, set<pg_shard_t> > &invalid_snapcolls,
   int &shallow_errors, int &deep_errors,
-  const spg_t& pgid,
+  const spg_t pgid,
   const vector<int> &acting,
   ostream &errorstream)
 {
diff --git a/src/osd/PGBackend.h b/src/osd/PGBackend.h
index 59efef1..4070752 100644
--- a/src/osd/PGBackend.h
+++ b/src/osd/PGBackend.h
@@ -22,6 +22,7 @@
 #include "PGLog.h"
 #include "osd_types.h"
 #include "common/WorkQueue.h"
+#include "osd_types.h"
 #include "include/Context.h"
 #include "os/ObjectStore.h"
 #include "common/LogClient.h"
@@ -190,7 +191,7 @@
      virtual void update_stats(
        const pg_stat_t &stat) = 0;
 
-     virtual void schedule_recovery_work(
+     virtual void schedule_work(
        GenContext<ThreadPool::TPHandle&> *c) = 0;
 
      virtual pg_shard_t whoami_shard() const = 0;
@@ -598,7 +599,7 @@
      map<hobject_t, pg_shard_t> &authoritative,
      map<hobject_t, set<pg_shard_t> > &invalid_snapcolls,
      int &shallow_errors, int &deep_errors,
-     const spg_t& pgid,
+     const spg_t pgid,
      const vector<int> &acting,
      ostream &errorstream);
    virtual uint64_t be_get_ondisk_size(
@@ -631,14 +632,14 @@ struct PG_SendMessageOnConn: public Context {
   }
 };
 
-struct PG_RecoveryQueueAsync : public Context {
+struct PG_QueueAsync : public Context {
   PGBackend::Listener *pg;
   GenContext<ThreadPool::TPHandle&> *c;
-  PG_RecoveryQueueAsync(
+  PG_QueueAsync(
     PGBackend::Listener *pg,
     GenContext<ThreadPool::TPHandle&> *c) : pg(pg), c(c) {}
   void finish(int) {
-    pg->schedule_recovery_work(c);
+    pg->schedule_work(c);
   }
 };
 
diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc
index 60390a2..3f61346 100644
--- a/src/osd/PGLog.cc
+++ b/src/osd/PGLog.cc
@@ -22,8 +22,6 @@
 
 #define dout_subsys ceph_subsys_osd
 
-static coll_t META_COLL("meta");
-
 //////////////////// PGLog::IndexedLog ////////////////////
 
 void PGLog::IndexedLog::advance_rollback_info_trimmed_to(
@@ -155,8 +153,8 @@ void PGLog::clear_info_log(
   keys_to_remove.insert(PG::get_biginfo_key(pgid));
   keys_to_remove.insert(PG::get_info_key(pgid));
 
-  t->remove(META_COLL, log_oid);
-  t->omap_rmkeys(META_COLL, infos_oid, keys_to_remove);
+  t->remove(coll_t::META_COLL, log_oid);
+  t->omap_rmkeys(coll_t::META_COLL, infos_oid, keys_to_remove);
 }
 
 void PGLog::trim(
@@ -799,8 +797,8 @@ void PGLog::_write_log(
   }
   ::encode(log.can_rollback_to, keys["can_rollback_to"]);
 
-  t.omap_rmkeys(META_COLL, log_oid, to_remove);
-  t.omap_setkeys(META_COLL, log_oid, keys);
+  t.omap_rmkeys(coll_t::META_COLL, log_oid, to_remove);
+  t.omap_setkeys(coll_t::META_COLL, log_oid, keys);
 }
 
 bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid,
@@ -815,7 +813,7 @@ bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid,
 
   // legacy?
   struct stat st;
-  int r = store->stat(META_COLL, log_oid, &st);
+  int r = store->stat(coll_t::META_COLL, log_oid, &st);
   assert(r == 0);
   if (st.st_size > 0) {
     read_log_old(store, coll, log_oid, info, divergent_priors, log, missing, oss, log_keys_debug);
@@ -824,7 +822,7 @@ bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid,
     log.tail = info.log_tail;
     // will get overridden below if it had been recorded
     log.can_rollback_to = info.last_update;
-    ObjectMap::ObjectMapIterator p = store->get_omap_iterator(META_COLL, log_oid);
+    ObjectMap::ObjectMapIterator p = store->get_omap_iterator(coll_t::META_COLL, log_oid);
     if (p) for (p->seek_to_first(); p->valid() ; p->next()) {
       bufferlist bl = p->value();//Copy bufferlist before creating iterator
       bufferlist::iterator bp = bl.begin();
@@ -961,7 +959,7 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
   if (ondisklog_head > 0) {
     // read
     bufferlist bl;
-    store->read(META_COLL, log_oid, ondisklog_tail, ondisklog_length, bl);
+    store->read(coll_t::META_COLL, log_oid, ondisklog_tail, ondisklog_length, bl);
     if (bl.length() < ondisklog_length) {
       std::ostringstream oss;
       oss << "read_log got " << bl.length() << " bytes, expected "
diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h
index 1b78c3e..1744cc8 100644
--- a/src/osd/PGLog.h
+++ b/src/osd/PGLog.h
@@ -148,7 +148,7 @@ struct PGLog {
       rollback_info_trimmed_to_riter = log.rbegin();
       while (rollback_info_trimmed_to_riter != log.rend() &&
 	     rollback_info_trimmed_to_riter->version > rollback_info_trimmed_to)
-	++rollback_info_trimmed_to_riter;
+	rollback_info_trimmed_to_riter++;
     }
 
     void index(pg_log_entry_t& e) {
diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc
index 5e07976..4430b39 100644
--- a/src/osd/ReplicatedBackend.cc
+++ b/src/osd/ReplicatedBackend.cc
@@ -255,14 +255,14 @@ void ReplicatedBackend::objects_read_async(
     int _r = store->read(coll, hoid, i->first.first,
 			 i->first.second, *(i->second.first));
     if (i->second.second) {
-      get_parent()->schedule_recovery_work(
+      get_parent()->schedule_work(
 	get_parent()->bless_gencontext(
 	  new AsyncReadCallback(_r, i->second.second)));
     }
     if (_r < 0)
       r = _r;
   }
-  get_parent()->schedule_recovery_work(
+  get_parent()->schedule_work(
     get_parent()->bless_gencontext(
       new AsyncReadCallback(r, on_complete)));
 }
@@ -330,7 +330,7 @@ public:
     version_t former_version) {
     t->collection_move_rename(
       coll, hoid, coll,
-      ghobject_t(hoid, former_version, shard_id_t::NO_SHARD));
+      ghobject_t(hoid, former_version, ghobject_t::NO_SHARD));
   }
   void setattrs(
     const hobject_t &hoid,
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index b90f1c0..e149abf 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -58,10 +58,6 @@
 #include "json_spirit/json_spirit_reader.h"
 #include "include/assert.h"  // json_spirit clobbers it
 
-#ifdef WITH_LTTNG
-#include "tracing/osd.h"
-#endif
-
 #define dout_subsys ceph_subsys_osd
 #define DOUT_PREFIX_ARGS this, osd->whoami, get_osdmap()
 #undef dout_prefix
@@ -87,31 +83,22 @@ PGLSFilter::~PGLSFilter()
 
 static void log_subop_stats(
   PerfCounters *logger,
-  OpRequestRef op, int subop)
+  OpRequestRef op, int tag_inb, int tag_lat)
 {
   utime_t now = ceph_clock_now(g_ceph_context);
   utime_t latency = now;
   latency -= op->get_req()->get_recv_stamp();
 
+  uint64_t inb = op->get_req()->get_data().length();
 
   logger->inc(l_osd_sop);
+
+  logger->inc(l_osd_sop_inb, inb);
   logger->tinc(l_osd_sop_lat, latency);
-  logger->inc(subop);
-
-  if (subop != l_osd_sop_pull) {
-    uint64_t inb = op->get_req()->get_data().length();
-    logger->inc(l_osd_sop_inb, inb);
-    if (subop == l_osd_sop_w) {
-      logger->inc(l_osd_sop_w_inb, inb);
-      logger->tinc(l_osd_sop_w_lat, latency);
-    } else if (subop == l_osd_sop_push) {
-      logger->inc(l_osd_sop_push_inb, inb);
-      logger->tinc(l_osd_sop_push_lat, latency);
-    } else
-      assert("no support subop" == 0);
-  } else {
-    logger->tinc(l_osd_sop_pull_lat, latency);
-  }
+
+  if (tag_inb)
+    logger->inc(tag_inb, inb);
+  logger->tinc(tag_lat, latency);
 }
 
 struct OnReadComplete : public Context {
@@ -346,10 +333,10 @@ void ReplicatedPG::begin_peer_recover(
   peer_missing[peer].revise_have(soid, eversion_t());
 }
 
-void ReplicatedPG::schedule_recovery_work(
+void ReplicatedPG::schedule_work(
   GenContext<ThreadPool::TPHandle&> *c)
 {
-  osd->recovery_gen_wq.queue(c);
+  osd->gen_wq.queue(c);
 }
 
 void ReplicatedPG::send_message_osd_cluster(
@@ -490,8 +477,7 @@ bool ReplicatedPG::maybe_await_blocked_snapset(
   OpRequestRef op)
 {
   ObjectContextRef obc;
-  obc = object_contexts.lookup(hoid.get_head());
-  if (obc) {
+  if (obc = object_contexts.lookup(hoid.get_head())) {
     if (obc->is_blocked()) {
       wait_for_blocked_object(obc->obs.oi.soid, op);
       return true;
@@ -499,8 +485,7 @@ bool ReplicatedPG::maybe_await_blocked_snapset(
       return false;
     }
   }
-  obc = object_contexts.lookup(hoid.get_snapdir());
-  if (obc) {
+  if (obc = object_contexts.lookup(hoid.get_snapdir())) {
     if (obc->is_blocked()) {
       wait_for_blocked_object(obc->obs.oi.soid, op);
       return true;
@@ -1004,7 +989,6 @@ void ReplicatedPG::do_pg_op(OpRequestRef op)
 	  }
 	  if (is_unreadable_object(oid)) {
 	    wait_for_unreadable_object(oid, op);
-	    delete filter;
 	    return;
 	  }
 	  result = osd->store->read(coll, oid, 0, 0, osd_op.outdata);
@@ -1032,6 +1016,12 @@ void ReplicatedPG::do_pg_op(OpRequestRef op)
 
 void ReplicatedPG::calc_trim_to()
 {
+  if (is_scrubbing() && scrubber.classic) {
+    dout(10) << "calc_trim_to no trim during classic scrub" << dendl;
+    pg_trim_to = eversion_t();
+    return;
+  }
+
   size_t target = cct->_conf->osd_min_pg_log_entries;
   if (is_degraded() ||
       state_test(PG_STATE_RECOVERING |
@@ -1089,14 +1079,14 @@ void ReplicatedPG::get_src_oloc(const object_t& oid, const object_locator_t& olo
 }
 
 void ReplicatedPG::do_request(
-  OpRequestRef& op,
+  OpRequestRef op,
   ThreadPool::TPHandle &handle)
 {
   if (!op_has_sufficient_caps(op)) {
     osd->reply_op_error(op, -EPERM);
     return;
   }
-  assert(!op_must_wait_for_map(get_osdmap()->get_epoch(), op));
+  assert(!op_must_wait_for_map(get_osdmap(), op));
   if (can_discard_request(op)) {
     return;
   }
@@ -1205,7 +1195,7 @@ bool ReplicatedPG::check_src_targ(const hobject_t& soid, const hobject_t& toid)
  * pg lock will be held (if multithreaded)
  * osd_lock NOT held.
  */
-void ReplicatedPG::do_op(OpRequestRef& op)
+void ReplicatedPG::do_op(OpRequestRef op)
 {
   MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
   assert(m->get_header().type == CEPH_MSG_OSD_OP);
@@ -1363,10 +1353,7 @@ void ReplicatedPG::do_op(OpRequestRef& op)
     }
   }
 
-  bool in_hit_set = false;
   if (hit_set) {
-    if (missing_oid != hobject_t() && hit_set->contains(missing_oid))
-      in_hit_set = true;
     hit_set->insert(oid);
     if (hit_set->is_full() ||
 	hit_set_start_stamp + pool.info.hit_set_period <= m->get_recv_stamp()) {
@@ -1379,7 +1366,7 @@ void ReplicatedPG::do_op(OpRequestRef& op)
   }
 
   if ((m->get_flags() & CEPH_OSD_FLAG_IGNORE_CACHE) == 0 &&
-      maybe_handle_cache(op, write_ordered, obc, r, missing_oid, false, in_hit_set))
+      maybe_handle_cache(op, write_ordered, obc, r, missing_oid, false))
     return;
 
   if (r) {
@@ -1392,7 +1379,7 @@ void ReplicatedPG::do_op(OpRequestRef& op)
   if (m->get_object_locator() != oloc) {
     dout(10) << " provided locator " << m->get_object_locator() 
 	     << " != object's " << obc->obs.oi.soid << dendl;
-    osd->clog->warn() << "bad locator " << m->get_object_locator() 
+    osd->clog.warn() << "bad locator " << m->get_object_locator() 
 		     << " on object " << oloc
 		     << " op " << *m << "\n";
   }
@@ -1574,8 +1561,7 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
 				      bool write_ordered,
 				      ObjectContextRef obc,
                                       int r, const hobject_t& missing_oid,
-				      bool must_promote,
-				      bool in_hit_set)
+				      bool must_promote)
 {
   if (obc)
     dout(25) << __func__ << " " << obc->obs.oi << " "
@@ -1620,43 +1606,7 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
     if (!must_promote && can_skip_promote(op, obc)) {
       return false;
     }
-    if (op->may_write() || write_ordered || must_promote || !hit_set) {
-      promote_object(op, obc, missing_oid);
-    } else {
-      switch (pool.info.min_read_recency_for_promote) {
-      case 0:
-        promote_object(op, obc, missing_oid);
-        break;
-      case 1:
-        // Check if in the current hit set
-        if (in_hit_set) {
-          promote_object(op, obc, missing_oid);
-        } else {
-          do_cache_redirect(op, obc);
-        }
-        break;
-      default:
-        if (in_hit_set) {
-          promote_object(op, obc, missing_oid);
-        } else {
-          // Check if in other hit sets
-          map<time_t,HitSetRef>::iterator itor;
-          bool in_other_hit_sets = false;
-          for (itor = agent_state->hit_set_map.begin(); itor != agent_state->hit_set_map.end(); ++itor) {
-            if (itor->second->contains(missing_oid)) {
-              in_other_hit_sets = true;
-              break;
-            }
-          }
-          if (in_other_hit_sets) {
-            promote_object(op, obc, missing_oid);
-          } else {
-            do_cache_redirect(op, obc);
-          }
-        }
-        break;
-      }
-    }
+    promote_object(op, obc, missing_oid);
     return true;
 
   case pg_pool_t::CACHEMODE_FORWARD:
@@ -1686,33 +1636,6 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
     // crap, there was a failure of some kind
     return false;
 
-  case pg_pool_t::CACHEMODE_READFORWARD:
-    if (obc.get() && obc->obs.exists) {
-      return false;
-    }
-
-    // Do writeback to the cache tier for writes
-    if (op->may_write() || write_ordered) {
-      if (agent_state &&
-	  agent_state->evict_mode == TierAgentState::EVICT_MODE_FULL) {
-	dout(20) << __func__ << " cache pool full, waiting" << dendl;
-	waiting_for_cache_not_full.push_back(op);
-	return true;
-      }
-      if (!must_promote && can_skip_promote(op, obc)) {
-	return false;
-      }
-      promote_object(op, obc, missing_oid);
-      return true;
-    }
-
-    // If it is a read, we can read, we need to forward it
-    if (must_promote)
-      promote_object(op, obc, missing_oid);
-    else
-      do_cache_redirect(op, obc);
-    return true;
-
   default:
     assert(0 == "unrecognized cache_mode");
   }
@@ -1743,7 +1666,7 @@ void ReplicatedPG::do_cache_redirect(OpRequestRef op, ObjectContextRef obc)
   reply->set_redirect(redir);
   dout(10) << "sending redirect to pool " << pool.info.tier_of << " for op "
 	   << op << dendl;
-  m->get_connection()->send_message(reply);
+  m->get_connection()->get_messenger()->send_message(reply, m->get_connection());
   return;
 }
 
@@ -1856,24 +1779,8 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
     p->second->ondisk_read_lock();
   }
 
-  {
-#ifdef WITH_LTTNG
-    osd_reqid_t reqid = ctx->op->get_reqid();
-#endif
-    tracepoint(osd, prepare_tx_enter, reqid.name._type,
-        reqid.name._num, reqid.tid, reqid.inc);
-  }
-
   int result = prepare_transaction(ctx);
 
-  {
-#ifdef WITH_LTTNG
-    osd_reqid_t reqid = ctx->op->get_reqid();
-#endif
-    tracepoint(osd, prepare_tx_exit, reqid.name._type,
-        reqid.name._num, reqid.tid, reqid.inc);
-  }
-
   if (op->may_read()) {
     dout(10) << " dropping ondisk_read_lock" << dendl;
     obc->ondisk_read_unlock();
@@ -1951,7 +1858,7 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
     } else {
       dout(20) << " op order client." << n << " tid " << t << " last was " << p->second << dendl;
       if (p->second > t) {
-	derr << "bad op order, already applied " << p->second << " > this " << t << dendl;
+	derr << "bad op order, already applied " << p->second << " > this " << t << dendl;;
 	assert(0 == "out of order op");
       }
       p->second = t;
@@ -2016,10 +1923,9 @@ void ReplicatedPG::log_op_stats(OpContext *ctx)
     osd->logger->inc(l_osd_op_rw);
     osd->logger->inc(l_osd_op_rw_inb, inb);
     osd->logger->inc(l_osd_op_rw_outb, outb);
+    osd->logger->tinc(l_osd_op_rw_rlat, rlatency);
     osd->logger->tinc(l_osd_op_rw_lat, latency);
     osd->logger->tinc(l_osd_op_rw_process_lat, process_latency);
-    if (rlatency != utime_t())
-      osd->logger->tinc(l_osd_op_rw_rlat, rlatency);
   } else if (op->may_read()) {
     osd->logger->inc(l_osd_op_r);
     osd->logger->inc(l_osd_op_r_outb, outb);
@@ -2028,10 +1934,9 @@ void ReplicatedPG::log_op_stats(OpContext *ctx)
   } else if (op->may_write() || op->may_cache()) {
     osd->logger->inc(l_osd_op_w);
     osd->logger->inc(l_osd_op_w_inb, inb);
+    osd->logger->tinc(l_osd_op_w_rlat, rlatency);
     osd->logger->tinc(l_osd_op_w_lat, latency);
     osd->logger->tinc(l_osd_op_w_process_lat, process_latency);
-    if (rlatency != utime_t())
-      osd->logger->tinc(l_osd_op_w_rlat, rlatency);
   } else
     assert(0);
 
@@ -2266,7 +2171,7 @@ void ReplicatedBackend::_do_pull_response(OpRequestRef op)
 	m->get_priority());
     c->to_continue.swap(to_continue);
     t->register_on_complete(
-      new PG_RecoveryQueueAsync(
+      new PG_QueueAsync(
 	get_parent(),
 	get_parent()->bless_gencontext(c)));
   }
@@ -3030,30 +2935,6 @@ struct FillInExtent : public Context {
   }
 };
 
-template<typename V>
-static string list_keys(const map<string, V>& m) {
-  string s;
-  for (typename map<string, V>::const_iterator itr = m.begin(); itr != m.end(); ++itr) {
-    if (!s.empty()) {
-      s.push_back(',');
-    }
-    s.append(itr->first);
-  }
-  return s;
-}
-
-template<typename T>
-static string list_entries(const T& m) {
-  string s;
-  for (typename T::const_iterator itr = m.begin(); itr != m.end(); ++itr) {
-    if (!s.empty()) {
-      s.push_back(',');
-    }
-    s.append(*itr);
-  }
-  return s;
-}
-
 int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 {
   int result = 0;
@@ -3071,13 +2952,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
   for (vector<OSDOp>::iterator p = ops.begin(); p != ops.end(); ++p, ctx->current_osd_subop_num++) {
     OSDOp& osd_op = *p;
     ceph_osd_op& op = osd_op.op;
-
-    // TODO: check endianness (__le32 vs uint32_t, etc.)
-    // The fields in ceph_osd_op are little-endian (according to the definition in rados.h),
-    // but the code in this function seems to treat them as native-endian.  What should the
-    // tracepoints do?
-    tracepoint(osd, do_osd_op_pre, soid.oid.name.c_str(), soid.snap.val, op.op, ceph_osd_op_name(op.op), op.flags);
-
+ 
     dout(10) << "do_osd_op  " << osd_op << dendl;
 
     bufferlist::iterator bp = osd_op.indata.begin();
@@ -3110,9 +2985,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     }
 
     // munge -1 truncate to 0 truncate
-    if (ceph_osd_op_uses_extent(op.op) &&
-        op.extent.truncate_seq == 1 &&
-        op.extent.truncate_size == (-1ULL)) {
+    if (op.extent.truncate_seq == 1 && op.extent.truncate_size == (-1ULL)) {
       op.extent.truncate_size = 0;
       op.extent.truncate_seq = 0;
     }
@@ -3148,7 +3021,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	__u32 seq = oi.truncate_seq;
 	uint64_t size = oi.size;
-	tracepoint(osd, do_osd_op_pre_read, soid.oid.name.c_str(), soid.snap.val, size, seq, op.extent.offset, op.extent.length, op.extent.truncate_size, op.extent.truncate_seq);
 	bool trimmed_read = false;
 	// are we beyond truncate_size?
 	if ( (seq < op.extent.truncate_seq) &&
@@ -3199,7 +3071,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
     /* map extents */
     case CEPH_OSD_OP_MAPEXT:
-      tracepoint(osd, do_osd_op_pre_mapext, soid.oid.name.c_str(), soid.snap.val, op.extent.offset, op.extent.length);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -3220,7 +3091,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
     /* map extents */
     case CEPH_OSD_OP_SPARSE_READ:
-      tracepoint(osd, do_osd_op_pre_sparse_read, soid.oid.name.c_str(), soid.snap.val, oi.size, oi.truncate_seq, op.extent.offset, op.extent.length, op.extent.truncate_size, op.extent.truncate_seq);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -3255,7 +3125,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	    r = pgbackend->objects_read_sync(
 	      soid, last, len, &t);
 	    if (!t.is_zero()) {
-	      osd->clog->error() << coll << " " << soid << " sparse-read found data in hole "
+	      osd->clog.error() << coll << " " << soid << " sparse-read found data in hole "
 				<< last << "~" << len << "\n";
 	    }
 	  }
@@ -3283,7 +3153,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	    r = pgbackend->objects_read_sync(
 	      soid, last, len, &t);
 	    if (!t.is_zero()) {
-	      osd->clog->error() << coll << " " << soid << " sparse-read found data in hole "
+	      osd->clog.error() << coll << " " << soid << " sparse-read found data in hole "
 				<< last << "~" << len << "\n";
 	    }
 	  }
@@ -3320,10 +3190,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	  osd_op.indata.hexdump(*_dout);
 	  *_dout << dendl;
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_call, soid.oid.name.c_str(), soid.snap.val, "???", "???");
 	  break;
 	}
-	tracepoint(osd, do_osd_op_pre_call, soid.oid.name.c_str(), soid.snap.val, cname.c_str(), mname.c_str());
 
 	ClassHandler::ClassData *cls;
 	result = osd->class_handler->open_class(cname, &cls);
@@ -3369,8 +3237,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_STAT:
       // note: stat does not require RD
       {
-	tracepoint(osd, do_osd_op_pre_stat, soid.oid.name.c_str(), soid.snap.val);
-
 	if (obs.exists && !oi.is_whiteout()) {
 	  ::encode(oi.size, osd_op.outdata);
 	  ::encode(oi.mtime, osd_op.outdata);
@@ -3387,7 +3253,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_ISDIRTY:
       ++ctx->num_read;
       {
-	tracepoint(osd, do_osd_op_pre_isdirty, soid.oid.name.c_str(), soid.snap.val);
 	bool is_dirty = obs.oi.is_dirty();
 	::encode(is_dirty, osd_op.outdata);
 	ctx->delta_stats.num_rd++;
@@ -3398,7 +3263,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_UNDIRTY:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_undirty, soid.oid.name.c_str(), soid.snap.val);
 	if (oi.is_dirty()) {
 	  ctx->undirty = true;  // see make_writeable()
 	  ctx->modify = true;
@@ -3411,7 +3275,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_CACHE_TRY_FLUSH:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_try_flush, soid.oid.name.c_str(), soid.snap.val);
 	if (ctx->lock_to_release != OpContext::NONE) {
 	  dout(10) << "cache-try-flush without SKIPRWLOCKS flag set" << dendl;
 	  result = -EINVAL;
@@ -3438,7 +3301,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_CACHE_FLUSH:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_cache_flush, soid.oid.name.c_str(), soid.snap.val);
 	if (ctx->lock_to_release == OpContext::NONE) {
 	  dout(10) << "cache-flush with SKIPRWLOCKS flag set" << dendl;
 	  result = -EINVAL;
@@ -3474,7 +3336,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_CACHE_EVICT:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_cache_evict, soid.oid.name.c_str(), soid.snap.val);
 	if (pool.info.cache_mode == pg_pool_t::CACHEMODE_NONE) {
 	  result = -EINVAL;
 	  break;
@@ -3507,7 +3368,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	string aname;
 	bp.copy(op.xattr.name_len, aname);
-	tracepoint(osd, do_osd_op_pre_getxattr, soid.oid.name.c_str(), soid.snap.val, aname.c_str());
 	string name = "_" + aname;
 	int r = getattr_maybe_cache(
 	  ctx->obc,
@@ -3526,7 +3386,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
    case CEPH_OSD_OP_GETXATTRS:
       ++ctx->num_read;
       {
-	tracepoint(osd, do_osd_op_pre_getxattrs, soid.oid.name.c_str(), soid.snap.val);
 	map<string, bufferlist> out;
 	result = getattrs_maybe_cache(
 	  ctx->obc,
@@ -3547,7 +3406,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	string aname;
 	bp.copy(op.xattr.name_len, aname);
-	tracepoint(osd, do_osd_op_pre_cmpxattr, soid.oid.name.c_str(), soid.snap.val, aname.c_str());
 	string name = "_" + aname;
 	name[op.xattr.name_len + 1] = 0;
 	
@@ -3619,7 +3477,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       ++ctx->num_read;
       {
 	uint64_t ver = op.watch.ver;
-	tracepoint(osd, do_osd_op_pre_assert_ver, soid.oid.name.c_str(), soid.snap.val, ver);
 	if (!ver)
 	  result = -EINVAL;
         else if (ver < oi.user_version)
@@ -3632,7 +3489,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_LIST_WATCHERS:
       ++ctx->num_read;
       {
-	tracepoint(osd, do_osd_op_pre_list_watchers, soid.oid.name.c_str(), soid.snap.val);
         obj_list_watch_response_t resp;
 
         map<pair<uint64_t, entity_name_t>, watch_info_t>::const_iterator oi_iter;
@@ -3659,7 +3515,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_LIST_SNAPS:
       ++ctx->num_read;
       {
-	tracepoint(osd, do_osd_op_pre_list_snaps, soid.oid.name.c_str(), soid.snap.val);
         obj_list_snap_response_t resp;
 
         if (!ssc) {
@@ -3691,7 +3546,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
           map<snapid_t, interval_set<uint64_t> >::const_iterator coi;
           coi = ssc->snapset.clone_overlap.find(ci.cloneid);
           if (coi == ssc->snapset.clone_overlap.end()) {
-            osd->clog->error() << "osd." << osd->whoami << ": inconsistent clone_overlap found for oid "
+            osd->clog.error() << "osd." << osd->whoami << ": inconsistent clone_overlap found for oid "
 			      << soid << " clone " << *clone_iter;
             result = -EINVAL;
             break;
@@ -3706,7 +3561,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
           map<snapid_t, uint64_t>::const_iterator si;
           si = ssc->snapset.clone_size.find(ci.cloneid);
           if (si == ssc->snapset.clone_size.end()) {
-            osd->clog->error() << "osd." << osd->whoami << ": inconsistent clone_size found for oid "
+            osd->clog.error() << "osd." << osd->whoami << ": inconsistent clone_size found for oid "
 			      << soid << " clone " << *clone_iter;
             result = -EINVAL;
             break;
@@ -3739,7 +3594,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       ++ctx->num_read;
       {
 	uint64_t ver = op.assert_ver.ver;
-	tracepoint(osd, do_osd_op_pre_assert_src_version, soid.oid.name.c_str(), soid.snap.val, ver);
 	if (!ver)
 	  result = -EINVAL;
         else if (ver < src_obc->obs.oi.user_version)
@@ -3752,7 +3606,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
    case CEPH_OSD_OP_NOTIFY:
       ++ctx->num_read;
       {
-	uint32_t ver; // obsolete
+	uint32_t ver;
 	uint32_t timeout;
         bufferlist bl;
 
@@ -3763,7 +3617,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	} catch (const buffer::error &e) {
 	  timeout = 0;
 	}
-	tracepoint(osd, do_osd_op_pre_notify, soid.oid.name.c_str(), soid.snap.val, timeout);
 	if (!timeout)
 	  timeout = cct->_conf->osd_default_notify_timeout;
 
@@ -3783,11 +3636,9 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	  uint64_t watch_cookie = 0;
 	  ::decode(notify_id, bp);
 	  ::decode(watch_cookie, bp);
-	  tracepoint(osd, do_osd_op_pre_notify_ack, soid.oid.name.c_str(), soid.snap.val, notify_id, watch_cookie, "Y");
 	  OpContext::NotifyAck ack(notify_id, watch_cookie);
 	  ctx->notify_acks.push_back(ack);
 	} catch (const buffer::error &e) {
-	  tracepoint(osd, do_osd_op_pre_notify_ack, soid.oid.name.c_str(), soid.snap.val, op.watch.cookie, 0, "N");
 	  OpContext::NotifyAck ack(
 	    // op.watch.cookie is actually the notify_id for historical reasons
 	    op.watch.cookie
@@ -3800,7 +3651,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_SETALLOCHINT:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_setallochint, soid.oid.name.c_str(), soid.snap.val, op.alloc_hint.expected_object_size, op.alloc_hint.expected_write_size);
         if (!(get_min_peer_features() & CEPH_FEATURE_OSD_SET_ALLOC_HINT)) { 
           result = -EOPNOTSUPP;
           break;
@@ -3826,8 +3676,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_WRITE:
       ++ctx->num_write;
       { // write
-        __u32 seq = oi.truncate_seq;
-	tracepoint(osd, do_osd_op_pre_write, soid.oid.name.c_str(), soid.snap.val, oi.size, seq, op.extent.offset, op.extent.length, op.extent.truncate_size, op.extent.truncate_seq);
 	if (op.extent.length != osd_op.indata.length()) {
 	  result = -EINVAL;
 	  break;
@@ -3851,6 +3699,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	  }
 	}
 
+        __u32 seq = oi.truncate_seq;
         if (seq && (seq > op.extent.truncate_seq) &&
             (op.extent.offset + op.extent.length > oi.size)) {
 	  // old write, arrived after trimtrunc
@@ -3901,8 +3750,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_WRITEFULL:
       ++ctx->num_write;
       { // write full object
-	tracepoint(osd, do_osd_op_pre_writefull, soid.oid.name.c_str(), soid.snap.val, oi.size, op.extent.offset, op.extent.length);
-
 	if (op.extent.length != osd_op.indata.length()) {
 	  result = -EINVAL;
 	  break;
@@ -3964,12 +3811,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
     case CEPH_OSD_OP_ROLLBACK :
       ++ctx->num_write;
-      tracepoint(osd, do_osd_op_pre_rollback, soid.oid.name.c_str(), soid.snap.val);
       result = _rollback_to(ctx, op);
       break;
 
     case CEPH_OSD_OP_ZERO:
-      tracepoint(osd, do_osd_op_pre_zero, soid.oid.name.c_str(), soid.snap.val, op.extent.offset, op.extent.length);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -3995,7 +3840,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_CREATE:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_create, soid.oid.name.c_str(), soid.snap.val);
         int flags = le32_to_cpu(op.flags);
 	if (obs.exists && !oi.is_whiteout() &&
 	    (flags & CEPH_OSD_OP_FLAG_EXCL)) {
@@ -4038,7 +3882,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       // falling through
 
     case CEPH_OSD_OP_TRUNCATE:
-      tracepoint(osd, do_osd_op_pre_truncate, soid.oid.name.c_str(), soid.snap.val, oi.size, oi.truncate_seq, op.extent.offset, op.extent.length, op.extent.truncate_size, op.extent.truncate_seq);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -4088,7 +3931,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     
     case CEPH_OSD_OP_DELETE:
       ++ctx->num_write;
-      tracepoint(osd, do_osd_op_pre_delete, soid.oid.name.c_str(), soid.snap.val);
       if (ctx->obc->obs.oi.watchers.size()) {
 	// Cannot delete an object with watchers
 	result = -EBUSY;
@@ -4098,7 +3940,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_CLONERANGE:
-      tracepoint(osd, do_osd_op_pre_clonerange, soid.oid.name.c_str(), soid.snap.val, op.clonerange.offset, op.clonerange.length, op.clonerange.src_offset);
       ctx->mod_desc.mark_unrollbackable();
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
@@ -4132,7 +3973,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_WATCH:
       ++ctx->num_write;
       {
-	tracepoint(osd, do_osd_op_pre_watch, soid.oid.name.c_str(), soid.snap.val, op.watch.cookie, op.watch.flag);
 	if (!obs.exists) {
 	  result = -ENOENT;
 	  break;
@@ -4183,16 +4023,9 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	if (cct->_conf->osd_max_attr_size > 0 &&
 	    op.xattr.value_len > cct->_conf->osd_max_attr_size) {
-	  tracepoint(osd, do_osd_op_pre_setxattr, soid.oid.name.c_str(), soid.snap.val, "???");
 	  result = -EFBIG;
 	  break;
 	}
-	unsigned max_name_len = MIN(osd->store->get_max_attr_name_length(),
-				    cct->_conf->osd_max_attr_name_len);
-	if (op.xattr.name_len > max_name_len) {
-	  result = -ENAMETOOLONG;
-	  break;
-	}
 	if (!obs.exists) {
 	  ctx->mod_desc.create();
 	  t->touch(soid);
@@ -4201,7 +4034,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	string aname;
 	bp.copy(op.xattr.name_len, aname);
-	tracepoint(osd, do_osd_op_pre_setxattr, soid.oid.name.c_str(), soid.snap.val, aname.c_str());
 	string name = "_" + aname;
 	if (pool.info.require_rollback()) {
 	  map<string, boost::optional<bufferlist> > to_set;
@@ -4228,7 +4060,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	string aname;
 	bp.copy(op.xattr.name_len, aname);
-	tracepoint(osd, do_osd_op_pre_rmxattr, soid.oid.name.c_str(), soid.snap.val, aname.c_str());
 	string name = "_" + aname;
 	if (pool.info.require_rollback()) {
 	  map<string, boost::optional<bufferlist> > to_set;
@@ -4252,7 +4083,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       // -- fancy writers --
     case CEPH_OSD_OP_APPEND:
       {
-	tracepoint(osd, do_osd_op_pre_append, soid.oid.name.c_str(), soid.snap.val, oi.size, oi.truncate_seq, op.extent.offset, op.extent.length, op.extent.truncate_size, op.extent.truncate_seq);
 	// just do it inline; this works because we are happy to execute
 	// fancy op on replicas as well.
 	vector<OSDOp> nops(1);
@@ -4268,14 +4098,12 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_STARTSYNC:
-      tracepoint(osd, do_osd_op_pre_startsync, soid.oid.name.c_str(), soid.snap.val);
       t->nop();
       break;
 
 
       // -- trivial map --
     case CEPH_OSD_OP_TMAPGET:
-      tracepoint(osd, do_osd_op_pre_tmapget, soid.oid.name.c_str(), soid.snap.val);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -4293,7 +4121,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_TMAPPUT:
-      tracepoint(osd, do_osd_op_pre_tmapput, soid.oid.name.c_str(), soid.snap.val);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -4352,7 +4179,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_TMAPUP:
-      tracepoint(osd, do_osd_op_pre_tmapup, soid.oid.name.c_str(), soid.snap.val);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -4363,7 +4189,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
     case CEPH_OSD_OP_TMAP2OMAP:
       ++ctx->num_write;
-      tracepoint(osd, do_osd_op_pre_tmap2omap, soid.oid.name.c_str(), soid.snap.val);
       result = do_tmap2omap(ctx, op.tmap2omap.flags);
       break;
 
@@ -4379,10 +4204,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_omapgetkeys, soid.oid.name.c_str(), soid.snap.val, "???", 0);
 	  goto fail;
 	}
-	tracepoint(osd, do_osd_op_pre_omapgetkeys, soid.oid.name.c_str(), soid.snap.val, start_after.c_str(), max_return);
 	set<string> out_set;
 
 	if (!pool.info.require_rollback()) {
@@ -4416,10 +4239,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_omapgetvals, soid.oid.name.c_str(), soid.snap.val, "???", 0, "???");
 	  goto fail;
 	}
-	tracepoint(osd, do_osd_op_pre_omapgetvals, soid.oid.name.c_str(), soid.snap.val, start_after.c_str(), max_return, filter_prefix.c_str());
 	map<string, bufferlist> out_set;
 
 	if (!pool.info.require_rollback()) {
@@ -4447,7 +4268,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_OMAPGETHEADER:
-      tracepoint(osd, do_osd_op_pre_omapgetheader, soid.oid.name.c_str(), soid.snap.val);
       if (pool.info.require_rollback()) {
 	// return empty header
 	break;
@@ -4469,10 +4289,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_omapgetvalsbykeys, soid.oid.name.c_str(), soid.snap.val, "???");
 	  goto fail;
 	}
-	tracepoint(osd, do_osd_op_pre_omapgetvalsbykeys, soid.oid.name.c_str(), soid.snap.val, list_entries(keys_to_get).c_str());
 	map<string, bufferlist> out;
 	if (!pool.info.require_rollback()) {
 	  osd->store->omap_get_values(coll, soid, keys_to_get, &out);
@@ -4488,7 +4306,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	if (!obs.exists || oi.is_whiteout()) {
 	  result = -ENOENT;
-	  tracepoint(osd, do_osd_op_pre_omap_cmp, soid.oid.name.c_str(), soid.snap.val, "???");
 	  break;
 	}
 	map<string, pair<bufferlist, int> > assertions;
@@ -4497,10 +4314,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_omap_cmp, soid.oid.name.c_str(), soid.snap.val, "???");
 	  goto fail;
 	}
-	tracepoint(osd, do_osd_op_pre_omap_cmp, soid.oid.name.c_str(), soid.snap.val, list_keys(assertions).c_str());
 	
 	map<string, bufferlist> out;
 
@@ -4560,7 +4375,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_OMAPSETVALS:
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
-	tracepoint(osd, do_osd_op_pre_omapsetvals, soid.oid.name.c_str(), soid.snap.val, "???");
 	break;
       }
       ctx->mod_desc.mark_unrollbackable();
@@ -4577,10 +4391,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_omapsetvals, soid.oid.name.c_str(), soid.snap.val, "???");
 	  goto fail;
 	}
-	tracepoint(osd, do_osd_op_pre_omapsetvals, soid.oid.name.c_str(), soid.snap.val, list_keys(to_set).c_str());
 	dout(20) << "setting vals: " << dendl;
 	for (map<string, bufferlist>::iterator i = to_set.begin();
 	     i != to_set.end();
@@ -4594,7 +4406,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_OMAPSETHEADER:
-      tracepoint(osd, do_osd_op_pre_omapsetheader, soid.oid.name.c_str(), soid.snap.val);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -4614,7 +4425,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     case CEPH_OSD_OP_OMAPCLEAR:
-      tracepoint(osd, do_osd_op_pre_omapclear, soid.oid.name.c_str(), soid.snap.val);
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
 	break;
@@ -4636,7 +4446,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
     case CEPH_OSD_OP_OMAPRMKEYS:
       if (pool.info.require_rollback()) {
 	result = -EOPNOTSUPP;
-	tracepoint(osd, do_osd_op_pre_omaprmkeys, soid.oid.name.c_str(), soid.snap.val, "???");
 	break;
       }
       ctx->mod_desc.mark_unrollbackable();
@@ -4644,7 +4453,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       {
 	if (!obs.exists || oi.is_whiteout()) {
 	  result = -ENOENT;
-	  tracepoint(osd, do_osd_op_pre_omaprmkeys, soid.oid.name.c_str(), soid.snap.val, "???");
 	  break;
 	}
 	t->touch(soid);
@@ -4654,10 +4462,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd, do_osd_op_pre_omaprmkeys, soid.oid.name.c_str(), soid.snap.val, "???");
 	  goto fail;
 	}
-	tracepoint(osd, do_osd_op_pre_omaprmkeys, soid.oid.name.c_str(), soid.snap.val, list_entries(to_rm).c_str());
 	t->omap_rmkeys(soid, to_rm);
 	ctx->delta_stats.num_wr++;
       }
@@ -4666,7 +4472,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
     case CEPH_OSD_OP_COPY_GET_CLASSIC:
       ++ctx->num_read;
-      tracepoint(osd, do_osd_op_pre_copy_get_classic, soid.oid.name.c_str(), soid.snap.val);
       result = fill_in_copy_get(ctx, bp, osd_op, ctx->obc, true);
       if (result == -EINVAL)
 	goto fail;
@@ -4674,7 +4479,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
     case CEPH_OSD_OP_COPY_GET:
       ++ctx->num_read;
-      tracepoint(osd, do_osd_op_pre_copy_get, soid.oid.name.c_str(), soid.snap.val);
       result = fill_in_copy_get(ctx, bp, osd_op, ctx->obc, false);
       if (result == -EINVAL)
 	goto fail;
@@ -4693,30 +4497,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 	}
 	catch (buffer::error& e) {
 	  result = -EINVAL;
-	  tracepoint(osd,
-		     do_osd_op_pre_copy_from,
-		     soid.oid.name.c_str(),
-		     soid.snap.val,
-		     "???",
-		     0,
-		     "???",
-		     "???",
-		     0,
-		     src_snapid,
-		     src_version);
 	  goto fail;
 	}
-	tracepoint(osd,
-		   do_osd_op_pre_copy_from,
-		   soid.oid.name.c_str(),
-		   soid.snap.val,
-		   src_name.name.c_str(),
-		   src_oloc.pool,
-		   src_oloc.key.c_str(),
-		   src_oloc.nspace.c_str(),
-		   src_oloc.hash,
-		   src_snapid,
-		   src_version);
 	if (!ctx->copy_cb) {
 	  // start
 	  pg_t raw_pg;
@@ -4745,16 +4527,16 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
       break;
 
     default:
-      tracepoint(osd, do_osd_op_pre_unknown, soid.oid.name.c_str(), soid.snap.val, op.op, ceph_osd_op_name(op.op));
       dout(1) << "unrecognized osd op " << op.op
 	      << " " << ceph_osd_op_name(op.op)
 	      << dendl;
       result = -EOPNOTSUPP;
     }
 
+    ctx->bytes_read += osd_op.outdata.length();
+
   fail:
     osd_op.rval = result;
-    tracepoint(osd, do_osd_op_post, soid.oid.name.c_str(), soid.snap.val, op.op, ceph_osd_op_name(op.op), op.flags, result);
     if (result < 0 && (op.flags & CEPH_OSD_OP_FLAG_FAILOK))
       result = 0;
 
@@ -5014,7 +4796,7 @@ void ReplicatedPG::make_writeable(OpContext *ctx)
   // clone?
   assert(soid.snap == CEPH_NOSNAP);
   dout(20) << "make_writeable " << soid << " snapset=" << ctx->snapset
-	   << "  snapc=" << snapc << dendl;
+	   << "  snapc=" << snapc << dendl;;
   
   bool was_dirty = ctx->obc->obs.oi.is_dirty();
   if (ctx->new_obs.exists) {
@@ -5193,9 +4975,8 @@ void ReplicatedPG::add_interval_usage(interval_set<uint64_t>& s, object_stat_sum
 void ReplicatedPG::do_osd_op_effects(OpContext *ctx)
 {
   ConnectionRef conn(ctx->op->get_req()->get_connection());
-  boost::intrusive_ptr<OSD::Session> session((OSD::Session *)conn->get_priv());
-  if (!session.get())
-    return;
+  boost::intrusive_ptr<OSD::Session> session(
+    (OSD::Session *)conn->get_priv());
   session->put();  // get_priv() takes a ref, and so does the intrusive_ptr
   entity_name_t entity = ctx->reqid.name;
 
@@ -5353,7 +5134,6 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc
   dout(20) << __func__ << " " << soid << " " << ctx
 	   << " op " << pg_log_entry_t::get_op_name(log_op_type)
 	   << dendl;
-  utime_t now = ceph_clock_now(cct);
 
   // snapset
   bufferlist bss;
@@ -5413,7 +5193,6 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc
       ctx->snapset_obc->obs.oi.version = ctx->at_version;
       ctx->snapset_obc->obs.oi.last_reqid = ctx->reqid;
       ctx->snapset_obc->obs.oi.mtime = ctx->mtime;
-      ctx->snapset_obc->obs.oi.local_mtime = now;
 
       bufferlist bv(sizeof(ctx->new_obs.oi));
       ::encode(ctx->snapset_obc->obs.oi, bv);
@@ -5454,7 +5233,6 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc
     if (ctx->mtime != utime_t()) {
       ctx->new_obs.oi.mtime = ctx->mtime;
       dout(10) << " set mtime to " << ctx->new_obs.oi.mtime << dendl;
-      ctx->new_obs.oi.local_mtime = now;
     } else {
       dout(10) << " mtime unchanged at " << ctx->new_obs.oi.mtime << dendl;
     }
@@ -5536,7 +5314,7 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc
 					       ctx->obs->oi.category);
   }
 
-  if (scrubber.active) {
+  if (scrubber.active && scrubber.is_chunky) {
     assert(soid < scrubber.start || soid >= scrubber.end);
     if (soid < scrubber.start)
       scrub_cstat.add(ctx->delta_stats, ctx->obs->oi.category);
@@ -5547,10 +5325,6 @@ void ReplicatedPG::complete_read_ctx(int result, OpContext *ctx)
 {
   MOSDOp *m = static_cast<MOSDOp*>(ctx->op->get_req());
   assert(ctx->async_reads_complete());
-
-  for (vector<OSDOp>::iterator p = ctx->ops.begin(); p != ctx->ops.end(); ++p) {
-    ctx->bytes_read += p->outdata.length();
-  }
   ctx->reply->claim_op_out_data(ctx->ops);
   ctx->reply->get_header().data_off = ctx->data_off;
 
@@ -5568,7 +5342,6 @@ void ReplicatedPG::complete_read_ctx(int result, OpContext *ctx)
     reply->set_enoent_reply_versions(info.last_update, info.last_user_version);
   }
 
-  reply->set_result(result);
   reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK);
   osd->send_message_osd_client(reply, m->get_connection());
   close_op_ctx(ctx, 0);
@@ -5809,10 +5582,12 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
     assert(cop->src.snap == CEPH_NOSNAP);
     ObjectOperation op;
     op.list_snaps(&cop->results.snapset, NULL);
+    osd->objecter_lock.Lock();
     ceph_tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
 				    CEPH_SNAPDIR, NULL,
 				    flags, gather.new_sub(), NULL);
     cop->objecter_tid2 = tid;
+    osd->objecter_lock.Unlock();
   }
 
   ObjectOperation op;
@@ -5835,6 +5610,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
   gather.set_finisher(new C_OnFinisher(fin,
 				       &osd->objecter_finisher));
 
+  osd->objecter_lock.Lock();
   ceph_tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
 				  cop->src.snap, NULL,
 				  flags,
@@ -5844,6 +5620,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
   fin->tid = tid;
   cop->objecter_tid = tid;
   gather.activate();
+  osd->objecter_lock.Unlock();
 }
 
 void ReplicatedPG::process_copy_chunk(hobject_t oid, ceph_tid_t tid, int r)
@@ -6145,7 +5922,6 @@ void ReplicatedPG::finish_promote(int r, OpRequestRef op,
   if (r == -ENOENT &&
       soid.snap == CEPH_NOSNAP &&
       (pool.info.cache_mode == pg_pool_t::CACHEMODE_WRITEBACK ||
-       pool.info.cache_mode == pg_pool_t::CACHEMODE_READFORWARD ||
        pool.info.cache_mode == pg_pool_t::CACHEMODE_READONLY)) {
     dout(10) << __func__ << " whiteout " << soid << dendl;
     whiteout = true;
@@ -6259,6 +6035,7 @@ void ReplicatedPG::cancel_copy(CopyOpRef cop, bool requeue)
 
   // cancel objecter op, if we can
   if (cop->objecter_tid) {
+    Mutex::Locker l(osd->objecter_lock);
     osd->objecter->op_cancel(cop->objecter_tid, -ECANCELED);
     cop->objecter_tid = 0;
     if (cop->objecter_tid2) {
@@ -6471,6 +6248,7 @@ int ReplicatedPG::start_flush(
   if (dsnapc.seq > 0 && dsnapc.seq < snapc.seq) {
     ObjectOperation o;
     o.remove();
+    osd->objecter_lock.Lock();
     osd->objecter->mutate(
       soid.oid,
       base_oloc,
@@ -6482,11 +6260,13 @@ int ReplicatedPG::start_flush(
        CEPH_OSD_FLAG_ENFORCE_SNAPC),
       NULL,
       NULL /* no callback, we'll rely on the ordering w.r.t the next op */);
+    osd->objecter_lock.Unlock();
   }
 
   if (dsnapc2.seq > dsnapc.seq && dsnapc2.seq < snapc.seq) {
     ObjectOperation o;
     o.remove();
+    osd->objecter_lock.Lock();
     osd->objecter->mutate(
       soid.oid,
       base_oloc,
@@ -6498,6 +6278,7 @@ int ReplicatedPG::start_flush(
        CEPH_OSD_FLAG_ENFORCE_SNAPC),
       NULL,
       NULL /* no callback, we'll rely on the ordering w.r.t the next op */);
+    osd->objecter_lock.Unlock();
   }
 
   FlushOpRef fop(new FlushOp);
@@ -6521,15 +6302,16 @@ int ReplicatedPG::start_flush(
   }
   C_Flush *fin = new C_Flush(this, soid, get_last_peering_reset());
 
+  osd->objecter_lock.Lock();
   ceph_tid_t tid = osd->objecter->mutate(
     soid.oid, base_oloc, o, snapc, oi.mtime,
     CEPH_OSD_FLAG_IGNORE_OVERLAY | CEPH_OSD_FLAG_ENFORCE_SNAPC,
     NULL,
     new C_OnFinisher(fin,
 		     &osd->objecter_finisher));
-  /* we're under the pg lock and fin->finish() is grabbing that */
   fin->tid = tid;
   fop->objecter_tid = tid;
+  osd->objecter_lock.Unlock();
 
   flush_ops[soid] = fop;
   return -EINPROGRESS;
@@ -6672,6 +6454,7 @@ void ReplicatedPG::cancel_flush(FlushOpRef fop, bool requeue)
   dout(10) << __func__ << " " << fop->obc->obs.oi.soid << " tid "
 	   << fop->objecter_tid << dendl;
   if (fop->objecter_tid) {
+    Mutex::Locker l(osd->objecter_lock);
     osd->objecter->op_cancel(fop->objecter_tid, -ECANCELED);
     fop->objecter_tid = 0;
   }
@@ -6768,21 +6551,27 @@ void ReplicatedPG::repop_all_committed(RepGather *repop)
 
 void ReplicatedPG::op_applied(const eversion_t &applied_version)
 {
-  dout(10) << "op_applied version " << applied_version << dendl;
+  dout(10) << "op_applied on primary on version " << applied_version << dendl;
   if (applied_version == eversion_t())
     return;
   assert(applied_version > last_update_applied);
   assert(applied_version <= info.last_update);
   last_update_applied = applied_version;
   if (is_primary()) {
-    if (scrubber.active) {
+    if (scrubber.active && scrubber.is_chunky) {
       if (last_update_applied == scrubber.subset_last_update) {
         osd->scrub_wq.queue(this);
       }
-    } else {
-      assert(!scrubber.block_writes);
+    } else if (last_update_applied == info.last_update && scrubber.block_writes) {
+      dout(10) << "requeueing scrub for cleanup" << dendl;
+      scrubber.finalizing = true;
+      scrub_gather_replica_maps();
+      ++scrubber.waiting_on;
+      scrubber.waiting_on_whom.insert(pg_whoami);
+      osd->scrub_wq.queue(this);
     }
   } else {
+    dout(10) << "op_applied on replica on version " << applied_version << dendl;
     if (scrubber.active_rep_scrub) {
       if (last_update_applied == scrubber.active_rep_scrub->scrub_to) {
 	osd->rep_scrub_wq.queue(scrubber.active_rep_scrub);
@@ -6819,10 +6608,7 @@ void ReplicatedPG::eval_repop(RepGather *repop)
     // ondisk?
     if (repop->all_committed) {
 
-      if (!repop->log_op_stat) {
-        log_op_stats(repop->ctx);
-        repop->log_op_stat = true;
-      }
+      log_op_stats(repop->ctx);
       publish_stats_to_osd();
 
       // send dup commits, in order
@@ -6910,6 +6696,8 @@ void ReplicatedPG::eval_repop(RepGather *repop)
   if (repop->all_applied && repop->all_committed) {
     repop->rep_done = true;
 
+    release_op_ctx_locks(repop->ctx);
+
     calc_min_last_complete_ondisk();
 
     // kick snap_trimmer if necessary
@@ -7379,6 +7167,7 @@ ObjectContextRef ReplicatedPG::get_object_context(const hobject_t& soid,
     obc->ssc = get_snapset_context(
       soid, true,
       soid.has_snapset() ? attrs : 0);
+    register_snapset_context(obc->ssc);
 
     populate_obc_watchers(obc);
 
@@ -7947,7 +7736,8 @@ void ReplicatedBackend::sub_op_modify_commit(RepModifyRef rm)
   get_parent()->send_message_osd_cluster(
     rm->ackerosd, commit, get_osdmap()->get_epoch());
   
-  log_subop_stats(get_parent()->get_logger(), rm->op, l_osd_sop_w);
+  log_subop_stats(get_parent()->get_logger(), rm->op,
+		  l_osd_sop_w_inb, l_osd_sop_w_lat);
 }
 
 
@@ -8623,7 +8413,7 @@ struct C_OnPushCommit : public Context {
   C_OnPushCommit(ReplicatedPG *pg, OpRequestRef op) : pg(pg), op(op) {}
   void finish(int) {
     op->mark_event("committed");
-    log_subop_stats(pg->osd->logger, op, l_osd_sop_push);
+    log_subop_stats(pg->osd->logger, op, l_osd_push_inb, l_osd_sop_push_lat);
   }
 };
 
@@ -9012,7 +8802,7 @@ void ReplicatedBackend::sub_op_pull(OpRequestRef op)
     m->from,
     reply);
 
-  log_subop_stats(get_parent()->get_logger(), op, l_osd_sop_pull);
+  log_subop_stats(get_parent()->get_logger(), op, 0, l_osd_sop_pull_lat);
 }
 
 void ReplicatedBackend::handle_pull(pg_shard_t peer, PullOp &op, PushOp *reply)
@@ -9215,7 +9005,7 @@ void ReplicatedBackend::sub_op_push(OpRequestRef op)
 	  op->get_req()->get_priority());
       c->to_continue.swap(to_continue);
       t->register_on_complete(
-	new PG_RecoveryQueueAsync(
+	new PG_QueueAsync(
 	  get_parent(),
 	  get_parent()->bless_gencontext(c)));
     }
@@ -9950,7 +9740,7 @@ bool ReplicatedPG::start_recovery_ops(
 
   if (missing.num_missing() > 0) {
     // this shouldn't happen!
-    osd->clog->error() << info.pgid << " recovery ending with " << missing.num_missing()
+    osd->clog.error() << info.pgid << " recovery ending with " << missing.num_missing()
 		      << ": " << missing.missing << "\n";
     return work_in_progress;
   }
@@ -9958,7 +9748,7 @@ bool ReplicatedPG::start_recovery_ops(
   if (needs_recovery()) {
     // this shouldn't happen!
     // We already checked num_missing() so we must have missing replicas
-    osd->clog->error() << info.pgid << " recovery ending with missing replicas\n";
+    osd->clog.error() << info.pgid << " recovery ending with missing replicas\n";
     return work_in_progress;
   }
 
@@ -10186,9 +9976,9 @@ int ReplicatedPG::prep_object_replica_pushes(
       }
     }
     if (uhoh)
-      osd->clog->error() << info.pgid << " missing primary copy of " << soid << ", unfound\n";
+      osd->clog.error() << info.pgid << " missing primary copy of " << soid << ", unfound\n";
     else
-      osd->clog->error() << info.pgid << " missing primary copy of " << soid
+      osd->clog.error() << info.pgid << " missing primary copy of " << soid
 			<< ", will try copies on " << missing_loc.get_locations(soid)
 			<< "\n";
     return 0;
@@ -11096,10 +10886,8 @@ void ReplicatedPG::hit_set_persist()
   info.hit_set.current_info.end = now;
   dout(20) << __func__ << " archive " << oid << dendl;
 
-  if (agent_state) {
+  if (agent_state)
     agent_state->add_hit_set(info.hit_set.current_info.begin, hit_set);
-    hit_set_in_memory_trim();
-  }
 
   // hold a ref until it is flushed to disk
   hit_set_flushing[info.hit_set.current_info.begin] = hit_set;
@@ -11170,7 +10958,6 @@ void ReplicatedPG::hit_set_persist()
   ctx->delta_stats.num_objects++;
   ctx->delta_stats.num_objects_hit_set_archive++;
   ctx->delta_stats.num_bytes += bl.length();
-  ctx->delta_stats.num_bytes_hit_set_archive += bl.length();
 
   bufferlist bss;
   ::encode(ctx->new_snapset, bss);
@@ -11236,6 +11023,8 @@ void ReplicatedPG::hit_set_trim(RepGather *repop, unsigned max)
       repop->ctx->op_t->remove(oid);
       repop->ctx->log.back().mod_desc.mark_unrollbackable();
     }
+    if (agent_state)
+      agent_state->remove_oldest_hit_set();
     updated_hit_set_hist.history.pop_front();
 
     ObjectContextRef obc = get_object_context(oid, false);
@@ -11243,20 +11032,6 @@ void ReplicatedPG::hit_set_trim(RepGather *repop, unsigned max)
     --repop->ctx->delta_stats.num_objects;
     --repop->ctx->delta_stats.num_objects_hit_set_archive;
     repop->ctx->delta_stats.num_bytes -= obc->obs.oi.size;
-    repop->ctx->delta_stats.num_bytes_hit_set_archive -= obc->obs.oi.size;
-  }
-}
-
-void ReplicatedPG::hit_set_in_memory_trim()
-{
-  unsigned max = pool.info.hit_set_count;
-  unsigned max_in_memory = pool.info.min_read_recency_for_promote > 0 ? pool.info.min_read_recency_for_promote - 1 : 0;
-
-  if (max_in_memory > max) {
-    max_in_memory = max;
-  }
-  while (agent_state->hit_set_map.size() > max_in_memory) {
-    agent_state->remove_oldest_hit_set();
   }
 }
 
@@ -11293,7 +11068,7 @@ void ReplicatedPG::agent_setup()
   }
 
   if (info.stats.stats_invalid) {
-    osd->clog->warn() << "pg " << info.pgid << " has invalid (post-split) stats; must scrub before tier agent can activate";
+    osd->clog.warn() << "pg " << info.pgid << " has invalid (post-split) stats; must scrub before tier agent can activate";
   }
 
   agent_choose_mode();
@@ -11395,11 +11170,6 @@ bool ReplicatedPG::agent_work(int start_max)
       osd->logger->inc(l_osd_agent_skip);
       continue;
     }
-    if (obc->is_request_pending()) {
-      dout(20) << __func__ << " skip (request pending) " << obc->obs.oi << dendl;
-      osd->logger->inc(l_osd_agent_skip);
-      continue;
-    }
 
     // be careful flushing omap to an EC pool.
     if (base_pool->is_erasure() &&
@@ -11457,9 +11227,6 @@ bool ReplicatedPG::agent_work(int start_max)
   else
     agent_state->position = next;
 
-  // Discard old in memory HitSets
-  hit_set_in_memory_trim();
-
   if (need_delay) {
     assert(agent_state->delaying == false);
     agent_delay();
@@ -11474,6 +11241,7 @@ bool ReplicatedPG::agent_work(int start_max)
 void ReplicatedPG::agent_load_hit_sets()
 {
   if (agent_state->evict_mode == TierAgentState::EVICT_MODE_IDLE) {
+    agent_state->discard_hit_sets();
     return;
   }
 
@@ -11544,13 +11312,7 @@ bool ReplicatedPG::agent_maybe_flush(ObjectContextRef& obc)
   }
 
   utime_t now = ceph_clock_now(NULL);
-  utime_t ob_local_mtime;
-  if (obc->obs.oi.local_mtime != utime_t()) {
-    ob_local_mtime = obc->obs.oi.local_mtime;
-  } else {
-    ob_local_mtime = obc->obs.oi.mtime;
-  }
-  if (ob_local_mtime + utime_t(pool.info.cache_min_flush_age, 0) > now) {
+  if (obc->obs.oi.mtime + utime_t(pool.info.cache_min_flush_age, 0) > now) {
     dout(20) << __func__ << " skip (too young) " << obc->obs.oi << dendl;
     osd->logger->inc(l_osd_agent_skip);
     return false;
@@ -11594,10 +11356,6 @@ bool ReplicatedPG::agent_maybe_evict(ObjectContextRef& obc)
     dout(20) << __func__ << " skip (watchers) " << obc->obs.oi << dendl;
     return false;
   }
-  if (obc->is_blocked()) {
-    dout(20) << __func__ << " skip (blocked) " << obc->obs.oi << dendl;
-    return false;
-  }
 
   if (soid.snap == CEPH_NOSNAP) {
     int result = _verify_no_head_clones(soid, obc->ssc->snapset);
@@ -11614,13 +11372,8 @@ bool ReplicatedPG::agent_maybe_evict(ObjectContextRef& obc)
     agent_estimate_atime_temp(soid, &atime, NULL /*FIXME &temp*/);
 
     uint64_t atime_upper = 0, atime_lower = 0;
-    if (atime < 0 && obc->obs.oi.mtime != utime_t()) {
-      if (obc->obs.oi.local_mtime != utime_t()) {
-        atime = ceph_clock_now(NULL).sec() - obc->obs.oi.local_mtime;
-      } else {
-        atime = ceph_clock_now(NULL).sec() - obc->obs.oi.mtime;
-      }
-    }
+    if (atime < 0 && obc->obs.oi.mtime != utime_t())
+      atime = ceph_clock_now(NULL).sec() - obc->obs.oi.mtime;
     if (atime < 0)
       atime = pool.info.hit_set_period * pool.info.hit_set_count; // "infinite"
     if (atime >= 0) {
@@ -11717,6 +11470,8 @@ void ReplicatedPG::agent_choose_mode(bool restart)
   uint64_t divisor = pool.info.get_pg_num_divisor(info.pgid.pgid);
   assert(divisor > 0);
 
+  uint64_t num_user_objects = info.stats.stats.sum.num_objects;
+
   // adjust (effective) user objects down based on the number
   // of HitSet objects, which should not count toward our total since
   // they cannot be flushed.
@@ -11728,16 +11483,12 @@ void ReplicatedPG::agent_choose_mode(bool restart)
   if (base_pool->is_erasure())
     unflushable += info.stats.stats.sum.num_objects_omap;
 
-  uint64_t num_user_objects = info.stats.stats.sum.num_objects;
+
   if (num_user_objects > unflushable)
     num_user_objects -= unflushable;
   else
     num_user_objects = 0;
 
-  uint64_t num_user_bytes = info.stats.stats.sum.num_bytes;
-  uint64_t unflushable_bytes = info.stats.stats.sum.num_bytes_hit_set_archive;
-  num_user_bytes -= unflushable_bytes;
-
   // also reduce the num_dirty by num_objects_omap
   int64_t num_dirty = info.stats.stats.sum.num_objects_dirty;
   if (base_pool->is_erasure()) {
@@ -11758,7 +11509,6 @@ void ReplicatedPG::agent_choose_mode(bool restart)
 	   << " num_objects_omap: " << info.stats.stats.sum.num_objects_omap
 	   << " num_dirty: " << num_dirty
 	   << " num_user_objects: " << num_user_objects
-	   << " num_user_bytes: " << num_user_bytes
 	   << " pool.info.target_max_bytes: " << pool.info.target_max_bytes
 	   << " pool.info.target_max_objects: " << pool.info.target_max_objects
 	   << dendl;
@@ -11766,8 +11516,9 @@ void ReplicatedPG::agent_choose_mode(bool restart)
   // get dirty, full ratios
   uint64_t dirty_micro = 0;
   uint64_t full_micro = 0;
-  if (pool.info.target_max_bytes && num_user_objects > 0) {
-    uint64_t avg_size = num_user_bytes / num_user_objects;
+  if (pool.info.target_max_bytes && info.stats.stats.sum.num_objects > 0) {
+    uint64_t avg_size = info.stats.stats.sum.num_bytes /
+      info.stats.stats.sum.num_objects;
     dirty_micro =
       num_dirty * avg_size * 1000000 /
       MAX(pool.info.target_max_bytes / divisor, 1);
@@ -11980,7 +11731,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
     if (soid.snap == CEPH_SNAPDIR ||
 	soid.snap == CEPH_NOSNAP) {
       if (p->second.attrs.count(SS_ATTR) == 0) {
-	osd->clog->error() << mode << " " << info.pgid << " " << soid
+	osd->clog.error() << mode << " " << info.pgid << " " << soid
 			  << " no '" << SS_ATTR << "' attr";
         ++scrubber.shallow_errors;
 	continue;
@@ -11993,7 +11744,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
       // did we finish the last oid?
       if (head != hobject_t() &&
 	  !pool.info.allow_incomplete_clones()) {
-	osd->clog->error() << mode << " " << info.pgid << " " << head
+	osd->clog.error() << mode << " " << info.pgid << " " << head
 			  << " missing clones";
         ++scrubber.shallow_errors;
       }
@@ -12011,7 +11762,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
 
     // basic checks.
     if (p->second.attrs.count(OI_ATTR) == 0) {
-      osd->clog->error() << mode << " " << info.pgid << " " << soid
+      osd->clog.error() << mode << " " << info.pgid << " " << soid
 			<< " no '" << OI_ATTR << "' attr";
       ++scrubber.shallow_errors;
       continue;
@@ -12021,10 +11772,10 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
     object_info_t oi(bv);
 
     if (pgbackend->be_get_ondisk_size(oi.size) != p->second.size) {
-      osd->clog->error() << mode << " " << info.pgid << " " << soid
+      osd->clog.error() << mode << " " << info.pgid << " " << soid
 			<< " on disk size (" << p->second.size
 			<< ") does not match object info size ("
-			<< oi.size << ") adjusted for ondisk to ("
+			<< oi.size << ") ajusted for ondisk to ("
 			<< pgbackend->be_get_ondisk_size(oi.size)
 			<< ")";
       ++scrubber.shallow_errors;
@@ -12037,8 +11788,6 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
     } else {
       stat.num_bytes += oi.size;
     }
-    if (soid.nspace == cct->_conf->osd_hit_set_namespace)
-      stat.num_bytes_hit_set_archive += oi.size;
 
     if (!soid.is_snapdir()) {
       if (oi.is_dirty())
@@ -12075,19 +11824,19 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
       }
     }
     if (!next_clone.is_min() && next_clone != soid) {
-      osd->clog->error() << mode << " " << info.pgid << " " << soid
+      osd->clog.error() << mode << " " << info.pgid << " " << soid
 			<< " expected clone " << next_clone;
       ++scrubber.shallow_errors;
     }
 
     if (soid.snap == CEPH_NOSNAP || soid.snap == CEPH_SNAPDIR) {
       if (soid.snap == CEPH_NOSNAP && !snapset.head_exists) {
-	osd->clog->error() << mode << " " << info.pgid << " " << soid
+	osd->clog.error() << mode << " " << info.pgid << " " << soid
 			  << " snapset.head_exists=false, but head exists";
         ++scrubber.shallow_errors;
       }
       if (soid.snap == CEPH_SNAPDIR && snapset.head_exists) {
-	osd->clog->error() << mode << " " << info.pgid << " " << soid
+	osd->clog.error() << mode << " " << info.pgid << " " << soid
 			  << " snapset.head_exists=true, but snapdir exists";
         ++scrubber.shallow_errors;
       }
@@ -12102,7 +11851,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
       stat.num_object_clones++;
       
       if (head == hobject_t()) {
-	osd->clog->error() << mode << " " << info.pgid << " " << soid
+	osd->clog.error() << mode << " " << info.pgid << " " << soid
 			  << " found clone without head";
 	++scrubber.shallow_errors;
 	continue;
@@ -12113,7 +11862,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
       }
 
       if (oi.size != snapset.clone_size[*curclone]) {
-	osd->clog->error() << mode << " " << info.pgid << " " << soid
+	osd->clog.error() << mode << " " << info.pgid << " " << soid
 			  << " size " << oi.size << " != clone_size "
 			  << snapset.clone_size[*curclone];
 	++scrubber.shallow_errors;
@@ -12144,7 +11893,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
 
   if (!next_clone.is_min() &&
       !pool.info.allow_incomplete_clones()) {
-    osd->clog->error() << mode << " " << info.pgid
+    osd->clog.error() << mode << " " << info.pgid
 		      << " expected clone " << next_clone;
     ++scrubber.shallow_errors;
   }
@@ -12177,8 +11926,7 @@ void ReplicatedPG::_scrub_finish()
 	   << scrub_cstat.sum.num_objects_dirty << "/" << info.stats.stats.sum.num_objects_dirty << " dirty, "
 	   << scrub_cstat.sum.num_objects_omap << "/" << info.stats.stats.sum.num_objects_omap << " omap, "
 	   << scrub_cstat.sum.num_objects_hit_set_archive << "/" << info.stats.stats.sum.num_objects_hit_set_archive << " hit_set_archive, "
-	   << scrub_cstat.sum.num_bytes << "/" << info.stats.stats.sum.num_bytes << " bytes,"
-	   << scrub_cstat.sum.num_bytes_hit_set_archive << "/" << info.stats.stats.sum.num_bytes_hit_set_archive << " hit_set_archive bytes."
+	   << scrub_cstat.sum.num_bytes << "/" << info.stats.stats.sum.num_bytes << " bytes."
 	   << dendl;
 
   if (scrub_cstat.sum.num_objects != info.stats.stats.sum.num_objects ||
@@ -12189,11 +11937,9 @@ void ReplicatedPG::_scrub_finish()
        !info.stats.omap_stats_invalid) ||
       (scrub_cstat.sum.num_objects_hit_set_archive != info.stats.stats.sum.num_objects_hit_set_archive &&
        !info.stats.hitset_stats_invalid) ||
-      (scrub_cstat.sum.num_bytes_hit_set_archive != info.stats.stats.sum.num_bytes_hit_set_archive &&
-       !info.stats.hitset_bytes_stats_invalid) ||
       scrub_cstat.sum.num_whiteouts != info.stats.stats.sum.num_whiteouts ||
       scrub_cstat.sum.num_bytes != info.stats.stats.sum.num_bytes) {
-    osd->clog->error() << info.pgid << " " << mode
+    osd->clog.error() << info.pgid << " " << mode
 		      << " stat mismatch, got "
 		      << scrub_cstat.sum.num_objects << "/" << info.stats.stats.sum.num_objects << " objects, "
 		      << scrub_cstat.sum.num_object_clones << "/" << info.stats.stats.sum.num_object_clones << " clones, "
@@ -12201,8 +11947,7 @@ void ReplicatedPG::_scrub_finish()
 		      << scrub_cstat.sum.num_objects_omap << "/" << info.stats.stats.sum.num_objects_omap << " omap, "
 		      << scrub_cstat.sum.num_objects_hit_set_archive << "/" << info.stats.stats.sum.num_objects_hit_set_archive << " hit_set_archive, "
 		      << scrub_cstat.sum.num_whiteouts << "/" << info.stats.stats.sum.num_whiteouts << " whiteouts, "
-		      << scrub_cstat.sum.num_bytes << "/" << info.stats.stats.sum.num_bytes << " bytes,"
-		      << scrub_cstat.sum.num_bytes_hit_set_archive << "/" << info.stats.stats.sum.num_bytes_hit_set_archive << " hit_set_archive bytes.\n";
+		      << scrub_cstat.sum.num_bytes << "/" << info.stats.stats.sum.num_bytes << " bytes.\n";
     ++scrubber.shallow_errors;
 
     if (repair) {
@@ -12211,7 +11956,6 @@ void ReplicatedPG::_scrub_finish()
       info.stats.dirty_stats_invalid = false;
       info.stats.omap_stats_invalid = false;
       info.stats.hitset_stats_invalid = false;
-      info.stats.hitset_bytes_stats_invalid = false;
       publish_stats_to_osd();
       share_pg_info();
     }
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h
index c4490f3..dc8ee62 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -191,7 +191,7 @@ public:
 
   public:
     /// Provide the final size of the copied object to the CopyCallback
-    virtual ~CopyCallback() {}
+    virtual ~CopyCallback() {};
   };
 
   friend class CopyFromCallback;
@@ -389,7 +389,7 @@ public:
     info.stats = stat;
   }
 
-  void schedule_recovery_work(
+  void schedule_work(
     GenContext<ThreadPool::TPHandle&> *c);
 
   pg_shard_t whoami_shard() const {
@@ -417,7 +417,7 @@ public:
 
   ceph_tid_t get_tid() { return osd->get_tid(); }
 
-  LogClientTemp clog_error() { return osd->clog->error(); }
+  LogClientTemp clog_error() { return osd->clog.error(); }
 
   /*
    * Capture all object state associated with an in-progress read or write.
@@ -619,7 +619,6 @@ public:
     bool queue_snap_trimmer;
 
     Context *on_applied;
-    bool log_op_stat;
     
     RepGather(OpContext *c, ObjectContextRef pi, ceph_tid_t rt,
 	      eversion_t lc) :
@@ -633,8 +632,7 @@ public:
       sent_disk(false),
       pg_local_last_complete(lc),
       queue_snap_trimmer(false),
-      on_applied(NULL),
-      log_op_stat(false) { }
+      on_applied(NULL) { }
 
     RepGather *get() {
       nref++;
@@ -802,7 +800,6 @@ protected:
   void hit_set_persist();   ///< persist hit info
   bool hit_set_apply_log(); ///< apply log entries to update in-memory HitSet
   void hit_set_trim(RepGather *repop, unsigned max); ///< discard old HitSets
-  void hit_set_in_memory_trim();                     ///< discard old in memory HitSets
 
   hobject_t get_hit_set_current_object(utime_t stamp);
   hobject_t get_hit_set_archive_object(utime_t start, utime_t end);
@@ -810,8 +807,8 @@ protected:
   // agent
   boost::scoped_ptr<TierAgentState> agent_state;
 
-  friend struct C_AgentFlushStartStop;
-  friend struct C_HitSetFlushing;
+  friend class C_AgentFlushStartStop;
+  friend class C_HitSetFlushing;
 
   void agent_setup();       ///< initialize agent state
   bool agent_work(int max); ///< entry point to do some agent work
@@ -1057,8 +1054,7 @@ protected:
 				 bool write_ordered,
 				 ObjectContextRef obc, int r,
 				 const hobject_t& missing_oid,
-				 bool must_promote,
-				 bool in_hit_set = false);
+				 bool must_promote);
   /**
    * This helper function tells the client to redirect their request elsewhere.
    */
@@ -1276,9 +1272,9 @@ public:
 		 bufferlist& odata);
 
   void do_request(
-    OpRequestRef& op,
+    OpRequestRef op,
     ThreadPool::TPHandle &handle);
-  void do_op(OpRequestRef& op);
+  void do_op(OpRequestRef op);
   bool pg_op_must_wait(MOSDOp *op);
   void do_pg_op(OpRequestRef op);
   void do_sub_op(OpRequestRef op);
diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc
index ea25b4e..870fdd0 100644
--- a/src/osd/SnapMapper.cc
+++ b/src/osd/SnapMapper.cc
@@ -14,10 +14,6 @@
 
 #include "SnapMapper.h"
 
-#define dout_subsys ceph_subsys_osd
-#undef dout_prefix
-#define dout_prefix *_dout << "snap_mapper."
-
 using std::string;
 
 const string SnapMapper::MAPPING_PREFIX = "MAP_";
@@ -69,7 +65,7 @@ struct Mapping {
     DECODE_FINISH(bl);
   }
 };
-WRITE_CLASS_ENCODER(Mapping)
+WRITE_CLASS_ENCODER(Mapping);
 
 string SnapMapper::get_prefix(snapid_t snap)
 {
@@ -149,10 +145,7 @@ int SnapMapper::get_snaps(
   if (out) {
     bufferlist::iterator bp = got.begin()->second.begin();
     ::decode(*out, bp);
-    dout(20) << __func__ << " " << oid << " " << out->snaps << dendl;
     assert(!out->snaps.empty());
-  } else {
-    dout(20) << __func__ << " " << oid << " (out == NULL)" << dendl;
   }
   return 0;
 }
@@ -186,9 +179,6 @@ int SnapMapper::update_snaps(
   const set<snapid_t> *old_snaps_check,
   MapCacher::Transaction<std::string, bufferlist> *t)
 {
-  dout(20) << __func__ << " " << oid << " " << new_snaps
-	   << " was " << (old_snaps_check ? *old_snaps_check : set<snapid_t>())
-	   << dendl;
   assert(check(oid));
   if (new_snaps.empty())
     return remove_oid(oid, t);
@@ -217,10 +207,9 @@ int SnapMapper::update_snaps(
 
 void SnapMapper::add_oid(
   const hobject_t &oid,
-  const set<snapid_t>& snaps,
+  set<snapid_t> snaps,
   MapCacher::Transaction<std::string, bufferlist> *t)
 {
-  dout(20) << __func__ << " " << oid << " " << snaps << dendl;
   assert(check(oid));
   {
     object_snaps out;
@@ -278,7 +267,6 @@ int SnapMapper::remove_oid(
   const hobject_t &oid,
   MapCacher::Transaction<std::string, bufferlist> *t)
 {
-  dout(20) << __func__ << " " << oid << dendl;
   assert(check(oid));
   return _remove_oid(oid, t);
 }
diff --git a/src/osd/SnapMapper.h b/src/osd/SnapMapper.h
index deb6868..5565e17 100644
--- a/src/osd/SnapMapper.h
+++ b/src/osd/SnapMapper.h
@@ -151,7 +151,7 @@ private:
 
 public:
   static string make_shard_prefix(shard_id_t shard) {
-    if (shard == shard_id_t::NO_SHARD)
+    if (shard == ghobject_t::NO_SHARD)
       return string();
     char buf[20];
     int r = snprintf(buf, sizeof(buf), ".%x", (int)shard);
@@ -206,7 +206,7 @@ public:
   /// Add mapping for oid, must not already be mapped
   void add_oid(
     const hobject_t &oid,       ///< [in] oid to add
-    const std::set<snapid_t>& new_snaps, ///< [in] snaps
+    std::set<snapid_t> new_snaps, ///< [in] snaps
     MapCacher::Transaction<std::string, bufferlist> *t ///< [out] transaction
     );
 
diff --git a/src/osd/Watch.cc b/src/osd/Watch.cc
index 7137cd8..4ef4bd1 100644
--- a/src/osd/Watch.cc
+++ b/src/osd/Watch.cc
@@ -39,7 +39,6 @@ Notify::Notify(
     in_progress_watchers(num_watchers),
     complete(false),
     discarded(false),
-    timed_out(false),
     payload(payload),
     timeout(timeout),
     cookie(cookie),
@@ -98,8 +97,7 @@ void Notify::do_timeout()
     return;
   }
 
-  in_progress_watchers = 0; // we give up
-  timed_out = true;         // we will send the client and error code
+  in_progress_watchers = 0; // we give up TODO: we should return an error code
   maybe_complete_notify();
   assert(complete);
   set<WatchRef> _watchers;
@@ -172,8 +170,6 @@ void Notify::maybe_complete_notify()
   if (!in_progress_watchers) {
     MWatchNotify *reply(new MWatchNotify(cookie, version, notify_id,
 					 WATCH_NOTIFY, payload));
-    if (timed_out)
-      reply->return_code = -ETIMEDOUT;
     osd->send_message_osd_client(reply, client.get());
     unregister_cb();
     complete = true;
@@ -285,7 +281,7 @@ Watch::~Watch() {
   assert(!conn);
 }
 
-bool Watch::connected() { return !!conn; }
+bool Watch::connected() { return conn; }
 
 Context *Watch::get_delayed_cb()
 {
@@ -323,14 +319,12 @@ void Watch::connect(ConnectionRef con)
   dout(10) << "connecting" << dendl;
   conn = con;
   OSD::Session* sessionref(static_cast<OSD::Session*>(con->get_priv()));
-  if (sessionref) {
-    sessionref->wstate.addWatch(self.lock());
-    sessionref->put();
-    for (map<uint64_t, NotifyRef>::iterator i = in_progress_notifies.begin();
-	 i != in_progress_notifies.end();
-	 ++i) {
-      send_notify(i->second);
-    }
+  sessionref->wstate.addWatch(self.lock());
+  sessionref->put();
+  for (map<uint64_t, NotifyRef>::iterator i = in_progress_notifies.begin();
+       i != in_progress_notifies.end();
+       ++i) {
+    send_notify(i->second);
   }
   unregister_cb();
 }
@@ -363,10 +357,8 @@ void Watch::discard_state()
   discarded = true;
   if (conn) {
     OSD::Session* sessionref(static_cast<OSD::Session*>(conn->get_priv()));
-    if (sessionref) {
-      sessionref->wstate.removeWatch(self.lock());
-      sessionref->put();
-    }
+    sessionref->wstate.removeWatch(self.lock());
+    sessionref->put();
     conn = ConnectionRef();
   }
   obc = ObjectContextRef();
diff --git a/src/osd/Watch.h b/src/osd/Watch.h
index 152ea95..91a4574 100644
--- a/src/osd/Watch.h
+++ b/src/osd/Watch.h
@@ -58,7 +58,6 @@ class Notify {
   unsigned in_progress_watchers;
   bool complete;
   bool discarded;
-  bool timed_out;  ///< true if the notify timed out
   set<WatchRef> watchers;
 
   bufferlist payload;
diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc
index ed06c4f..d08e9b7 100644
--- a/src/osd/osd_types.cc
+++ b/src/osd/osd_types.cc
@@ -48,8 +48,6 @@ const char *ceph_osd_flag_name(unsigned flag)
   case CEPH_OSD_FLAG_FLUSH: return "flush";
   case CEPH_OSD_FLAG_MAP_SNAP_CLONE: return "map_snap_clone";
   case CEPH_OSD_FLAG_ENFORCE_SNAPC: return "enforce_snapc";
-  case CEPH_OSD_FLAG_REDIRECTED: return "redirected";
-  case CEPH_OSD_FLAG_KNOWN_REDIR: return "known_if_redirected";
   default: return "???";
   }
 }
@@ -88,7 +86,7 @@ ostream &operator<<(ostream &lhs, const pg_shard_t &rhs)
 {
   if (rhs.is_undefined())
     return lhs << "?";
-  if (rhs.shard == shard_id_t::NO_SHARD)
+  if (rhs.shard == ghobject_t::NO_SHARD)
     return lhs << rhs.osd;
   return lhs << rhs.osd << '(' << (unsigned)(rhs.shard) << ')';
 }
@@ -356,7 +354,7 @@ bool pg_t::parse(const char *s)
 bool spg_t::parse(const char *s)
 {
   pgid.set_preferred(-1);
-  shard = shard_id_t::NO_SHARD;
+  shard = ghobject_t::NO_SHARD;
   uint64_t ppool;
   uint32_t pseed;
   int32_t pref;
@@ -381,7 +379,7 @@ bool spg_t::parse(const char *s)
   if (p) {
     r = sscanf(p, "s%d", &pshard);
     if (r == 1) {
-      shard = shard_id_t(pshard);
+      shard = pshard;
     } else {
       return false;
     }
@@ -500,6 +498,8 @@ ostream& operator<<(ostream& out, const pg_t &pg)
 
 // -- coll_t --
 
+const coll_t coll_t::META_COLL("meta");
+
 bool coll_t::is_temp(spg_t& pgid) const
 {
   const char *cstr(str.c_str());
@@ -667,8 +667,6 @@ std::string pg_state_string(int state)
     oss << "replay+";
   if (state & PG_STATE_SPLITTING)
     oss << "splitting+";
-  if (state & PG_STATE_UNDERSIZED)
-    oss << "undersized+";
   if (state & PG_STATE_DEGRADED)
     oss << "degraded+";
   if (state & PG_STATE_REMAPPED)
@@ -809,9 +807,7 @@ void pg_pool_t::dump(Formatter *f) const
   f->close_section(); // hit_set_params
   f->dump_unsigned("hit_set_period", hit_set_period);
   f->dump_unsigned("hit_set_count", hit_set_count);
-  f->dump_unsigned("min_read_recency_for_promote", min_read_recency_for_promote);
   f->dump_unsigned("stripe_width", get_stripe_width());
-  f->dump_unsigned("expected_num_objects", expected_num_objects);
 }
 
 
@@ -1062,56 +1058,8 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const
     return;
   }
 
-  if ((features & CEPH_FEATURE_OSD_POOLRESEND) == 0) {
-    // we simply added last_force_op_resend here, which is a fully
-    // backward compatible change.  however, encoding the same map
-    // differently between monitors triggers scrub noise (even though
-    // they are decodable without the feature), so let's be pendantic
-    // about it.
-    ENCODE_START(14, 5, bl);
-    ::encode(type, bl);
-    ::encode(size, bl);
-    ::encode(crush_ruleset, bl);
-    ::encode(object_hash, bl);
-    ::encode(pg_num, bl);
-    ::encode(pgp_num, bl);
-    __u32 lpg_num = 0, lpgp_num = 0;  // tell old code that there are no localized pgs.
-    ::encode(lpg_num, bl);
-    ::encode(lpgp_num, bl);
-    ::encode(last_change, bl);
-    ::encode(snap_seq, bl);
-    ::encode(snap_epoch, bl);
-    ::encode(snaps, bl, features);
-    ::encode(removed_snaps, bl);
-    ::encode(auid, bl);
-    ::encode(flags, bl);
-    ::encode(crash_replay_interval, bl);
-    ::encode(min_size, bl);
-    ::encode(quota_max_bytes, bl);
-    ::encode(quota_max_objects, bl);
-    ::encode(tiers, bl);
-    ::encode(tier_of, bl);
-    __u8 c = cache_mode;
-    ::encode(c, bl);
-    ::encode(read_tier, bl);
-    ::encode(write_tier, bl);
-    ::encode(properties, bl);
-    ::encode(hit_set_params, bl);
-    ::encode(hit_set_period, bl);
-    ::encode(hit_set_count, bl);
-    ::encode(stripe_width, bl);
-    ::encode(target_max_bytes, bl);
-    ::encode(target_max_objects, bl);
-    ::encode(cache_target_dirty_ratio_micro, bl);
-    ::encode(cache_target_full_ratio_micro, bl);
-    ::encode(cache_min_flush_age, bl);
-    ::encode(cache_min_evict_age, bl);
-    ::encode(erasure_code_profile, bl);
-    ENCODE_FINISH(bl);
-    return;
-  }
-
-  ENCODE_START(17, 5, bl);
+  __u8 encode_compat = 5;
+  ENCODE_START(15, encode_compat, bl);
   ::encode(type, bl);
   ::encode(size, bl);
   ::encode(crush_ruleset, bl);
@@ -1151,14 +1099,12 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const
   ::encode(cache_min_evict_age, bl);
   ::encode(erasure_code_profile, bl);
   ::encode(last_force_op_resend, bl);
-  ::encode(min_read_recency_for_promote, bl);
-  ::encode(expected_num_objects, bl);
   ENCODE_FINISH(bl);
 }
 
 void pg_pool_t::decode(bufferlist::iterator& bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(17, 5, 5, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(15, 5, 5, bl);
   ::decode(type, bl);
   ::decode(size, bl);
   ::decode(crush_ruleset, bl);
@@ -1260,16 +1206,6 @@ void pg_pool_t::decode(bufferlist::iterator& bl)
   } else {
     last_force_op_resend = 0;
   }
-  if (struct_v >= 16) {
-    ::decode(min_read_recency_for_promote, bl);
-  } else {
-    min_read_recency_for_promote = 1;
-  }
-  if (struct_v >= 17) {
-    ::decode(expected_num_objects, bl);
-  } else {
-    expected_num_objects = 0;
-  }
   DECODE_FINISH(bl);
   calc_pg_masks();
 }
@@ -1315,7 +1251,6 @@ void pg_pool_t::generate_test_instances(list<pg_pool_t*>& o)
   a.hit_set_params = HitSet::Params(new BloomHitSet::Params);
   a.hit_set_period = 3600;
   a.hit_set_count = 8;
-  a.min_read_recency_for_promote = 1;
   a.set_stripe_width(12345);
   a.target_max_bytes = 1238132132;
   a.target_max_objects = 1232132;
@@ -1324,7 +1259,6 @@ void pg_pool_t::generate_test_instances(list<pg_pool_t*>& o)
   a.cache_min_flush_age = 231;
   a.cache_min_evict_age = 2321;
   a.erasure_code_profile = "profile in osdmap";
-  a.expected_num_objects = 123456;
   o.push_back(new pg_pool_t(a));
 }
 
@@ -1369,11 +1303,7 @@ ostream& operator<<(ostream& out, const pg_pool_t& p)
 	<< " " << p.hit_set_period << "s"
 	<< " x" << p.hit_set_count;
   }
-  if (p.min_read_recency_for_promote)
-    out << " min_read_recency_for_promote " << p.min_read_recency_for_promote;
   out << " stripe_width " << p.get_stripe_width();
-  if (p.expected_num_objects)
-    out << " expected_num_objects " << p.expected_num_objects;
   return out;
 }
 
@@ -1388,7 +1318,6 @@ void object_stat_sum_t::dump(Formatter *f) const
   f->dump_int("num_object_copies", num_object_copies);
   f->dump_int("num_objects_missing_on_primary", num_objects_missing_on_primary);
   f->dump_int("num_objects_degraded", num_objects_degraded);
-  f->dump_int("num_objects_misplaced", num_objects_misplaced);
   f->dump_int("num_objects_unfound", num_objects_unfound);
   f->dump_int("num_objects_dirty", num_objects_dirty);
   f->dump_int("num_whiteouts", num_whiteouts);
@@ -1404,12 +1333,11 @@ void object_stat_sum_t::dump(Formatter *f) const
   f->dump_int("num_keys_recovered", num_keys_recovered);
   f->dump_int("num_objects_omap", num_objects_omap);
   f->dump_int("num_objects_hit_set_archive", num_objects_hit_set_archive);
-  f->dump_int("num_bytes_hit_set_archive", num_bytes_hit_set_archive);
 }
 
 void object_stat_sum_t::encode(bufferlist& bl) const
 {
-  ENCODE_START(11, 3, bl);
+  ENCODE_START(9, 3, bl);
   ::encode(num_bytes, bl);
   ::encode(num_objects, bl);
   ::encode(num_object_clones, bl);
@@ -1431,14 +1359,12 @@ void object_stat_sum_t::encode(bufferlist& bl) const
   ::encode(num_whiteouts, bl);
   ::encode(num_objects_omap, bl);
   ::encode(num_objects_hit_set_archive, bl);
-  ::encode(num_objects_misplaced, bl);
-  ::encode(num_bytes_hit_set_archive, bl);
   ENCODE_FINISH(bl);
 }
 
 void object_stat_sum_t::decode(bufferlist::iterator& bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(11, 3, 3, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(9, 3, 3, bl);
   ::decode(num_bytes, bl);
   if (struct_v < 3) {
     uint64_t num_kb;
@@ -1492,22 +1418,13 @@ void object_stat_sum_t::decode(bufferlist::iterator& bl)
   } else {
     num_objects_hit_set_archive = 0;
   }
-  if (struct_v >= 10) {
-    ::decode(num_objects_misplaced, bl);
-  } else {
-    num_objects_misplaced = 0;
-  }
-  if (struct_v >= 11) {
-    ::decode(num_bytes_hit_set_archive, bl);
-  } else {
-    num_bytes_hit_set_archive = 0;
-  }
   DECODE_FINISH(bl);
 }
 
 void object_stat_sum_t::generate_test_instances(list<object_stat_sum_t*>& o)
 {
   object_stat_sum_t a;
+  o.push_back(new object_stat_sum_t(a));
 
   a.num_bytes = 1;
   a.num_objects = 3;
@@ -1526,9 +1443,6 @@ void object_stat_sum_t::generate_test_instances(list<object_stat_sum_t*>& o)
   a.num_scrub_errors = a.num_deep_scrub_errors + a.num_shallow_scrub_errors;
   a.num_objects_dirty = 21;
   a.num_whiteouts = 22;
-  a.num_objects_misplaced = 1232;
-  a.num_objects_hit_set_archive = 2;
-  a.num_bytes_hit_set_archive = 27;
   o.push_back(new object_stat_sum_t(a));
 }
 
@@ -1540,7 +1454,6 @@ void object_stat_sum_t::add(const object_stat_sum_t& o)
   num_object_copies += o.num_object_copies;
   num_objects_missing_on_primary += o.num_objects_missing_on_primary;
   num_objects_degraded += o.num_objects_degraded;
-  num_objects_misplaced += o.num_objects_misplaced;
   num_rd += o.num_rd;
   num_rd_kb += o.num_rd_kb;
   num_wr += o.num_wr;
@@ -1556,7 +1469,6 @@ void object_stat_sum_t::add(const object_stat_sum_t& o)
   num_whiteouts += o.num_whiteouts;
   num_objects_omap += o.num_objects_omap;
   num_objects_hit_set_archive += o.num_objects_hit_set_archive;
-  num_bytes_hit_set_archive += o.num_bytes_hit_set_archive;
 }
 
 void object_stat_sum_t::sub(const object_stat_sum_t& o)
@@ -1567,7 +1479,6 @@ void object_stat_sum_t::sub(const object_stat_sum_t& o)
   num_object_copies -= o.num_object_copies;
   num_objects_missing_on_primary -= o.num_objects_missing_on_primary;
   num_objects_degraded -= o.num_objects_degraded;
-  num_objects_misplaced -= o.num_objects_misplaced;
   num_rd -= o.num_rd;
   num_rd_kb -= o.num_rd_kb;
   num_wr -= o.num_wr;
@@ -1583,7 +1494,6 @@ void object_stat_sum_t::sub(const object_stat_sum_t& o)
   num_whiteouts -= o.num_whiteouts;
   num_objects_omap -= o.num_objects_omap;
   num_objects_hit_set_archive -= o.num_objects_hit_set_archive;
-  num_bytes_hit_set_archive -= o.num_bytes_hit_set_archive;
 }
 
 
@@ -1648,8 +1558,6 @@ void pg_stat_t::dump(Formatter *f) const
   f->dump_stream("last_clean") << last_clean;
   f->dump_stream("last_became_active") << last_became_active;
   f->dump_stream("last_unstale") << last_unstale;
-  f->dump_stream("last_undegraded") << last_undegraded;
-  f->dump_stream("last_fullsized") << last_fullsized;
   f->dump_unsigned("mapping_epoch", mapping_epoch);
   f->dump_stream("log_start") << log_start;
   f->dump_stream("ondisk_log_start") << ondisk_log_start;
@@ -1667,16 +1575,11 @@ void pg_stat_t::dump(Formatter *f) const
   f->dump_stream("stats_invalid") << stats_invalid;
   stats.dump(f);
   f->open_array_section("up");
-  for (vector<int32_t>::const_iterator p = up.begin(); p != up.end(); ++p)
+  for (vector<int>::const_iterator p = up.begin(); p != up.end(); ++p)
     f->dump_int("osd", *p);
   f->close_section();
   f->open_array_section("acting");
-  for (vector<int32_t>::const_iterator p = acting.begin(); p != acting.end(); ++p)
-    f->dump_int("osd", *p);
-  f->close_section();
-  f->open_array_section("blocked_by");
-  for (vector<int32_t>::const_iterator p = blocked_by.begin();
-       p != blocked_by.end(); ++p)
+  for (vector<int>::const_iterator p = acting.begin(); p != acting.end(); ++p)
     f->dump_int("osd", *p);
   f->close_section();
   f->dump_int("up_primary", up_primary);
@@ -1687,11 +1590,11 @@ void pg_stat_t::dump_brief(Formatter *f) const
 {
   f->dump_string("state", pg_state_string(state));
   f->open_array_section("up");
-  for (vector<int32_t>::const_iterator p = up.begin(); p != up.end(); ++p)
+  for (vector<int>::const_iterator p = up.begin(); p != up.end(); ++p)
     f->dump_int("osd", *p);
   f->close_section();
   f->open_array_section("acting");
-  for (vector<int32_t>::const_iterator p = acting.begin(); p != acting.end(); ++p)
+  for (vector<int>::const_iterator p = acting.begin(); p != acting.end(); ++p)
     f->dump_int("osd", *p);
   f->close_section();
   f->dump_int("up_primary", up_primary);
@@ -1700,7 +1603,7 @@ void pg_stat_t::dump_brief(Formatter *f) const
 
 void pg_stat_t::encode(bufferlist &bl) const
 {
-  ENCODE_START(20, 8, bl);
+  ENCODE_START(17, 8, bl);
   ::encode(version, bl);
   ::encode(reported_seq, bl);
   ::encode(reported_epoch, bl);
@@ -1734,16 +1637,12 @@ void pg_stat_t::encode(bufferlist &bl) const
   ::encode(acting_primary, bl);
   ::encode(omap_stats_invalid, bl);
   ::encode(hitset_stats_invalid, bl);
-  ::encode(blocked_by, bl);
-  ::encode(last_undegraded, bl);
-  ::encode(last_fullsized, bl);
-  ::encode(hitset_bytes_stats_invalid, bl);
   ENCODE_FINISH(bl);
 }
 
 void pg_stat_t::decode(bufferlist::iterator &bl)
 {
-  DECODE_START_LEGACY_COMPAT_LEN(20, 8, 8, bl);
+  DECODE_START_LEGACY_COMPAT_LEN(17, 8, 8, bl);
   ::decode(version, bl);
   ::decode(reported_seq, bl);
   ::decode(reported_epoch, bl);
@@ -1851,25 +1750,6 @@ void pg_stat_t::decode(bufferlist::iterator &bl)
     // encoder may not have supported num_objects_hit_set_archive accounting.
     hitset_stats_invalid = true;
   }
-  if (struct_v >= 18) {
-    ::decode(blocked_by, bl);
-  } else {
-    blocked_by.clear();
-  }
-  if (struct_v >= 19) {
-    ::decode(last_undegraded, bl);
-    ::decode(last_fullsized, bl);
-  } else {
-    last_undegraded = utime_t();
-    last_fullsized = utime_t();
-  }
-  if (struct_v >= 20) {
-    ::decode(hitset_bytes_stats_invalid, bl);
-  } else {
-    // if we are decoding an old encoding of this object, then the
-    // encoder may not have supported num_bytes_hit_set_archive accounting.
-    hitset_bytes_stats_invalid = true;
-  }
   DECODE_FINISH(bl);
 }
 
@@ -1888,8 +1768,6 @@ void pg_stat_t::generate_test_instances(list<pg_stat_t*>& o)
   a.last_active = utime_t(1002, 3);
   a.last_clean = utime_t(1002, 4);
   a.last_unstale = utime_t(1002, 5);
-  a.last_undegraded = utime_t(1002, 7);
-  a.last_fullsized = utime_t(1002, 8);
   a.log_start = eversion_t(1, 4);
   a.ondisk_log_start = eversion_t(1, 5);
   a.created = 6;
@@ -1916,8 +1794,6 @@ void pg_stat_t::generate_test_instances(list<pg_stat_t*>& o)
   a.up_primary = 124;
   a.acting.push_back(124);
   a.acting_primary = 124;
-  a.blocked_by.push_back(155);
-  a.blocked_by.push_back(156);
   o.push_back(new pg_stat_t(a));
 }
 
@@ -2137,7 +2013,7 @@ void pg_info_t::decode(bufferlist::iterator &bl)
   if (struct_v >= 30)
     ::decode(pgid.shard, bl);
   else
-    pgid.shard = shard_id_t::NO_SHARD;
+    pgid.shard = ghobject_t::no_shard();
   DECODE_FINISH(bl);
 }
 
@@ -2176,7 +2052,7 @@ void pg_info_t::generate_test_instances(list<pg_info_t*>& o)
   list<pg_history_t*> h;
   pg_history_t::generate_test_instances(h);
   o.back()->history = *h.back();
-  o.back()->pgid = spg_t(pg_t(1, 2, -1), shard_id_t::NO_SHARD);
+  o.back()->pgid = spg_t(pg_t(1, 2, -1), ghobject_t::no_shard());
   o.back()->last_update = eversion_t(3, 4);
   o.back()->last_complete = eversion_t(5, 6);
   o.back()->last_user_version = 2;
@@ -2216,8 +2092,8 @@ void pg_notify_t::decode(bufferlist::iterator &bl)
     ::decode(to, bl);
     ::decode(from, bl);
   } else {
-    to = shard_id_t::NO_SHARD;
-    from = shard_id_t::NO_SHARD;
+    to = ghobject_t::NO_SHARD;
+    from = ghobject_t::NO_SHARD;
   }
   DECODE_FINISH(bl);
 }
@@ -2237,8 +2113,8 @@ void pg_notify_t::dump(Formatter *f) const
 
 void pg_notify_t::generate_test_instances(list<pg_notify_t*>& o)
 {
-  o.push_back(new pg_notify_t(shard_id_t(3), shard_id_t::NO_SHARD, 1, 1, pg_info_t()));
-  o.push_back(new pg_notify_t(shard_id_t(0), shard_id_t(0), 3, 10, pg_info_t()));
+  o.push_back(new pg_notify_t(3, ghobject_t::NO_SHARD, 1 ,1 , pg_info_t()));
+  o.push_back(new pg_notify_t(0, 0, 3, 10, pg_info_t()));
 }
 
 ostream &operator<<(ostream &lhs, const pg_notify_t &notify)
@@ -2246,8 +2122,8 @@ ostream &operator<<(ostream &lhs, const pg_notify_t &notify)
   lhs << "(query_epoch:" << notify.query_epoch
       << ", epoch_sent:" << notify.epoch_sent
       << ", info:" << notify.info;
-  if (notify.from != shard_id_t::NO_SHARD ||
-      notify.to != shard_id_t::NO_SHARD)
+  if (notify.from != ghobject_t::NO_SHARD ||
+      notify.to != ghobject_t::NO_SHARD)
     lhs << " " << (unsigned)notify.from
 	<< "->" << (unsigned)notify.to;
   return lhs << ")";
@@ -2303,9 +2179,9 @@ void pg_interval_t::dump(Formatter *f) const
   f->open_array_section("acting");
   for (vector<int>::const_iterator p = acting.begin(); p != acting.end(); ++p)
     f->dump_int("osd", *p);
+  f->close_section();
   f->dump_int("primary", primary);
   f->dump_int("up_primary", up_primary);
-  f->close_section();
 }
 
 void pg_interval_t::generate_test_instances(list<pg_interval_t*>& o)
@@ -2320,56 +2196,6 @@ void pg_interval_t::generate_test_instances(list<pg_interval_t*>& o)
   o.back()->maybe_went_rw = true;
 }
 
-bool pg_interval_t::is_new_interval(
-  int old_acting_primary,
-  int new_acting_primary,
-  const vector<int> &old_acting,
-  const vector<int> &new_acting,
-  int old_up_primary,
-  int new_up_primary,
-  const vector<int> &old_up,
-  const vector<int> &new_up,
-  int old_min_size,
-  int new_min_size,
-  unsigned old_pg_num,
-  unsigned new_pg_num,
-  pg_t pgid) {
-  return old_acting_primary != new_acting_primary ||
-    new_acting != old_acting ||
-    old_up_primary != new_up_primary ||
-    new_up != old_up ||
-    old_min_size != new_min_size ||
-    pgid.is_split(old_pg_num, new_pg_num, 0);
-}
-
-bool pg_interval_t::is_new_interval(
-  int old_acting_primary,
-  int new_acting_primary,
-  const vector<int> &old_acting,
-  const vector<int> &new_acting,
-  int old_up_primary,
-  int new_up_primary,
-  const vector<int> &old_up,
-  const vector<int> &new_up,
-  OSDMapRef osdmap,
-  OSDMapRef lastmap,
-  pg_t pgid) {
-  return !(lastmap->get_pools().count(pgid.pool())) ||
-    is_new_interval(old_acting_primary,
-		    new_acting_primary,
-		    old_acting,
-		    new_acting,
-		    old_up_primary,
-		    new_up_primary,
-		    old_up,
-		    new_up,
-		    lastmap->get_pools().find(pgid.pool())->second.min_size,
-		    osdmap->get_pools().find(pgid.pool())->second.min_size,
-		    lastmap->get_pg_num(pgid.pool()),
-		    osdmap->get_pg_num(pgid.pool()),
-		    pgid);
-}
-
 bool pg_interval_t::check_new_interval(
   int old_acting_primary,
   int new_acting_primary,
@@ -2383,6 +2209,7 @@ bool pg_interval_t::check_new_interval(
   epoch_t last_epoch_clean,
   OSDMapRef osdmap,
   OSDMapRef lastmap,
+  int64_t pool_id,
   pg_t pgid,
   map<epoch_t, pg_interval_t> *past_intervals,
   std::ostream *out)
@@ -2391,18 +2218,15 @@ bool pg_interval_t::check_new_interval(
   //  NOTE: a change in the up set primary triggers an interval
   //  change, even though the interval members in the pg_interval_t
   //  do not change.
-  if (is_new_interval(
-	old_acting_primary,
-	new_acting_primary,
-	old_acting,
-	new_acting,
-	old_up_primary,
-	new_up_primary,
-	old_up,
-	new_up,
-	osdmap,
-	lastmap,
-	pgid)) {
+  if (old_acting_primary != new_acting_primary ||
+      new_acting != old_acting ||
+      old_up_primary != new_up_primary ||
+      new_up != old_up ||
+      (!(lastmap->get_pools().count(pool_id))) ||
+      (lastmap->get_pools().find(pool_id)->second.min_size !=
+       osdmap->get_pools().find(pool_id)->second.min_size)  ||
+      pgid.is_split(lastmap->get_pg_num(pgid.pool()),
+        osdmap->get_pg_num(pgid.pool()), 0)) {
     pg_interval_t& i = (*past_intervals)[same_interval_since];
     i.first = same_interval_since;
     i.last = osdmap->get_epoch() - 1;
@@ -2515,8 +2339,8 @@ void pg_query_t::decode(bufferlist::iterator &bl) {
       ::decode(to, bl);
       ::decode(from, bl);
     } else {
-      to = shard_id_t::NO_SHARD;
-      from = shard_id_t::NO_SHARD;
+      to = ghobject_t::NO_SHARD;
+      from = ghobject_t::NO_SHARD;
     }
     DECODE_FINISH(bl);
   } catch (...) {
@@ -2543,12 +2367,12 @@ void pg_query_t::generate_test_instances(list<pg_query_t*>& o)
   o.push_back(new pg_query_t());
   list<pg_history_t*> h;
   pg_history_t::generate_test_instances(h);
-  o.push_back(new pg_query_t(pg_query_t::INFO, shard_id_t(1), shard_id_t(2), *h.back(), 4));
-  o.push_back(new pg_query_t(pg_query_t::MISSING, shard_id_t(2), shard_id_t(3), *h.back(), 4));
-  o.push_back(new pg_query_t(pg_query_t::LOG, shard_id_t(0), shard_id_t(0),
+  o.push_back(new pg_query_t(pg_query_t::INFO, 1, 2, *h.back(), 4));
+  o.push_back(new pg_query_t(pg_query_t::MISSING, 2, 3, *h.back(), 4));
+  o.push_back(new pg_query_t(pg_query_t::LOG, 0, 0,
 			     eversion_t(4, 5), *h.back(), 4));
   o.push_back(new pg_query_t(pg_query_t::FULLLOG,
-			     shard_id_t::NO_SHARD, shard_id_t::NO_SHARD,
+			     ghobject_t::NO_SHARD, ghobject_t::NO_SHARD,
 			     *h.back(), 5));
 }
 
@@ -2806,7 +2630,7 @@ void pg_log_entry_t::dump(Formatter *f) const
   f->dump_string("op", get_op_name());
   f->dump_stream("object") << soid;
   f->dump_stream("version") << version;
-  f->dump_stream("prior_version") << prior_version;
+  f->dump_stream("prior_version") << version;
   f->dump_stream("reqid") << reqid;
   f->dump_stream("mtime") << mtime;
   if (snaps.length() > 0) {
@@ -2904,7 +2728,7 @@ void pg_log_t::decode(bufferlist::iterator &bl, int64_t pool)
 void pg_log_t::dump(Formatter *f) const
 {
   f->dump_stream("head") << head;
-  f->dump_stream("tail") << tail;
+  f->dump_stream("tail") << head;
   f->open_array_section("log");
   for (list<pg_log_entry_t>::const_iterator p = log.begin(); p != log.end(); ++p) {
     f->open_object_section("entry");
@@ -3789,7 +3613,6 @@ void object_info_t::copy_user_bits(const object_info_t& other)
   // these bits are copied from head->clone.
   size = other.size;
   mtime = other.mtime;
-  local_mtime = other.local_mtime;
   last_reqid = other.last_reqid;
   truncate_seq = other.truncate_seq;
   truncate_size = other.truncate_size;
@@ -3821,7 +3644,7 @@ void object_info_t::encode(bufferlist& bl) const
        ++i) {
     old_watchers.insert(make_pair(i->first.second, i->second));
   }
-  ENCODE_START(14, 8, bl);
+  ENCODE_START(13, 8, bl);
   ::encode(soid, bl);
   ::encode(myoloc, bl);	//Retained for compatibility
   ::encode(category, bl);
@@ -3846,7 +3669,6 @@ void object_info_t::encode(bufferlist& bl) const
   ::encode(watchers, bl);
   __u32 _flags = flags;
   ::encode(_flags, bl);
-  ::encode(local_mtime, bl);
   ENCODE_FINISH(bl);
 }
 
@@ -3925,11 +3747,6 @@ void object_info_t::decode(bufferlist::iterator& bl)
     ::decode(_flags, bl);
     flags = (flag_t)_flags;
   }
-  if (struct_v >= 14) {
-    ::decode(local_mtime, bl);
-  } else {
-    local_mtime = utime_t();
-  }
   DECODE_FINISH(bl);
 }
 
@@ -3945,7 +3762,6 @@ void object_info_t::dump(Formatter *f) const
   f->dump_unsigned("user_version", user_version);
   f->dump_unsigned("size", size);
   f->dump_stream("mtime") << mtime;
-  f->dump_stream("local_mtime") << local_mtime;
   f->dump_unsigned("lost", (int)is_lost());
   f->dump_unsigned("flags", (int)flags);
   f->dump_stream("wrlock_by") << wrlock_by;
diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
index 988cebe..8e9cf6f 100644
--- a/src/osd/osd_types.h
+++ b/src/osd/osd_types.h
@@ -54,15 +54,12 @@
 #define CEPH_OSD_FEATURE_INCOMPAT_LEVELDBLOG CompatSet::Feature(9, "leveldblog")
 #define CEPH_OSD_FEATURE_INCOMPAT_SNAPMAPPER CompatSet::Feature(10, "snapmapper")
 #define CEPH_OSD_FEATURE_INCOMPAT_SHARDS CompatSet::Feature(11, "sharded objects")
-#define CEPH_OSD_FEATURE_INCOMPAT_HINTS CompatSet::Feature(12, "transaction hints")
-
-
-/// max recovery priority for MBackfillReserve
-#define OSD_RECOVERY_PRIORITY_MAX 255u
 
 
 typedef hobject_t collection_list_handle_t;
 
+typedef uint8_t shard_id_t;
+
 /// convert a single CPEH_OSD_FLAG_* to a string
 const char *ceph_osd_flag_name(unsigned flag);
 
@@ -70,13 +67,13 @@ const char *ceph_osd_flag_name(unsigned flag);
 string ceph_osd_flag_string(unsigned flags);
 
 struct pg_shard_t {
-  int32_t osd;
+  int osd;
   shard_id_t shard;
-  pg_shard_t() : osd(-1), shard(shard_id_t::NO_SHARD) {}
-  explicit pg_shard_t(int osd) : osd(osd), shard(shard_id_t::NO_SHARD) {}
+  pg_shard_t() : osd(-1), shard(ghobject_t::NO_SHARD) {}
+  explicit pg_shard_t(int osd) : osd(osd), shard(ghobject_t::NO_SHARD) {}
   pg_shard_t(int osd, shard_id_t shard) : osd(osd), shard(shard) {}
   static pg_shard_t undefined_shard() {
-    return pg_shard_t(-1, shard_id_t::NO_SHARD);
+    return pg_shard_t(-1, ghobject_t::NO_SHARD);
   }
   bool is_undefined() const {
     return osd == -1;
@@ -398,9 +395,9 @@ CEPH_HASH_NAMESPACE_END
 struct spg_t {
   pg_t pgid;
   shard_id_t shard;
-  spg_t() : shard(shard_id_t::NO_SHARD) {}
+  spg_t() : shard(ghobject_t::NO_SHARD) {}
   spg_t(pg_t pgid, shard_id_t shard) : pgid(pgid), shard(shard) {}
-  explicit spg_t(pg_t pgid) : pgid(pgid), shard(shard_id_t::NO_SHARD) {}
+  explicit spg_t(pg_t pgid) : pgid(pgid), shard(ghobject_t::NO_SHARD) {}
   unsigned get_split_bits(unsigned pg_num) const {
     return pgid.get_split_bits(pg_num);
   }
@@ -432,7 +429,7 @@ struct spg_t {
     return is_split;
   }
   bool is_no_shard() const {
-    return shard == shard_id_t::NO_SHARD;
+    return shard == ghobject_t::NO_SHARD;
   }
   void encode(bufferlist &bl) const {
     ENCODE_START(1, 1, bl);
@@ -468,6 +465,8 @@ ostream& operator<<(ostream& out, const spg_t &pg);
 
 class coll_t {
 public:
+  const static coll_t META_COLL;
+
   coll_t()
     : str("meta")
   { }
@@ -638,7 +637,7 @@ inline bool operator>(const eversion_t& l, const eversion_t& r) {
 inline bool operator>=(const eversion_t& l, const eversion_t& r) {
   return (l.epoch == r.epoch) ? (l.version >= r.version):(l.epoch >= r.epoch);
 }
-inline ostream& operator<<(ostream& out, const eversion_t& e) {
+inline ostream& operator<<(ostream& out, const eversion_t e) {
   return out << e.epoch << "'" << e.version;
 }
 
@@ -748,7 +747,7 @@ inline ostream& operator<<(ostream& out, const osd_stat_t& s) {
 #define PG_STATE_SPLITTING    (1<<7)  // i am splitting
 #define PG_STATE_SCRUBBING    (1<<8)  // scrubbing
 #define PG_STATE_SCRUBQ       (1<<9)  // queued for scrub
-#define PG_STATE_DEGRADED     (1<<10) // pg contains objects with reduced redundancy
+#define PG_STATE_DEGRADED     (1<<10) // pg membership not complete
 #define PG_STATE_INCONSISTENT (1<<11) // pg replicas are inconsistent (but shouldn't be)
 #define PG_STATE_PEERING      (1<<12) // pg is (re)peering
 #define PG_STATE_REPAIR       (1<<13) // pg should repair on next scrub
@@ -761,7 +760,6 @@ inline ostream& operator<<(ostream& out, const osd_stat_t& s) {
 #define PG_STATE_BACKFILL  (1<<20) // [active] backfilling pg content
 #define PG_STATE_BACKFILL_TOOFULL (1<<21) // backfill can't proceed: too full
 #define PG_STATE_RECOVERY_WAIT (1<<22) // waiting for recovery reservations
-#define PG_STATE_UNDERSIZED    (1<<23) // pg acting < pool size
 
 std::string pg_state_string(int state);
 
@@ -848,7 +846,6 @@ struct pg_pool_t {
     CACHEMODE_WRITEBACK = 1,             ///< write to cache, flush later
     CACHEMODE_FORWARD = 2,               ///< forward if not in cache
     CACHEMODE_READONLY = 3,              ///< handle reads, forward writes [not strongly consistent]
-    CACHEMODE_READFORWARD = 4            ///< forward reads, write to cache flush later
   } cache_mode_t;
   static const char *get_cache_mode_name(cache_mode_t m) {
     switch (m) {
@@ -856,7 +853,6 @@ struct pg_pool_t {
     case CACHEMODE_WRITEBACK: return "writeback";
     case CACHEMODE_FORWARD: return "forward";
     case CACHEMODE_READONLY: return "readonly";
-    case CACHEMODE_READFORWARD: return "readforward";
     default: return "unknown";
     }
   }
@@ -869,8 +865,6 @@ struct pg_pool_t {
       return CACHEMODE_FORWARD;
     if (s == "readonly")
       return CACHEMODE_READONLY;
-    if (s == "readforward")
-      return CACHEMODE_READFORWARD;
     return (cache_mode_t)-1;
   }
   const char *get_cache_mode_name() const {
@@ -883,7 +877,6 @@ struct pg_pool_t {
     case CACHEMODE_READONLY:
       return false;
     case CACHEMODE_WRITEBACK:
-    case CACHEMODE_READFORWARD:
       return true;
     default:
       assert(0 == "implement me");
@@ -973,13 +966,9 @@ public:
   HitSet::Params hit_set_params; ///< The HitSet params to use on this pool
   uint32_t hit_set_period;      ///< periodicity of HitSet segments (seconds)
   uint32_t hit_set_count;       ///< number of periods to retain
-  uint32_t min_read_recency_for_promote;   ///< minimum number of HitSet to check before promote
 
   uint32_t stripe_width;        ///< erasure coded stripe size in bytes
 
-  uint64_t expected_num_objects; ///< expected number of objects on this pool, a value of 0 indicates
-                                 ///< user does not specify any expected value
-
   pg_pool_t()
     : flags(0), type(0), size(0), min_size(0),
       crush_ruleset(0), object_hash(0),
@@ -1001,9 +990,7 @@ public:
       hit_set_params(),
       hit_set_period(0),
       hit_set_count(0),
-      min_read_recency_for_promote(0),
-      stripe_width(0),
-      expected_num_objects(0)
+      stripe_width(0)
   { }
 
   void dump(Formatter *f) const;
@@ -1169,7 +1156,6 @@ struct object_stat_sum_t {
   int64_t num_object_copies;  // num_objects * num_replicas
   int64_t num_objects_missing_on_primary;
   int64_t num_objects_degraded;
-  int64_t num_objects_misplaced;
   int64_t num_objects_unfound;
   int64_t num_rd, num_rd_kb;
   int64_t num_wr, num_wr_kb;
@@ -1183,14 +1169,11 @@ struct object_stat_sum_t {
   int64_t num_whiteouts;
   int64_t num_objects_omap;
   int64_t num_objects_hit_set_archive;
-  int64_t num_bytes_hit_set_archive;
 
   object_stat_sum_t()
     : num_bytes(0),
       num_objects(0), num_object_clones(0), num_object_copies(0),
-      num_objects_missing_on_primary(0), num_objects_degraded(0),
-      num_objects_misplaced(0),
-      num_objects_unfound(0),
+      num_objects_missing_on_primary(0), num_objects_degraded(0), num_objects_unfound(0),
       num_rd(0), num_rd_kb(0), num_wr(0), num_wr_kb(0),
       num_scrub_errors(0), num_shallow_scrub_errors(0),
       num_deep_scrub_errors(0),
@@ -1200,8 +1183,7 @@ struct object_stat_sum_t {
       num_objects_dirty(0),
       num_whiteouts(0),
       num_objects_omap(0),
-      num_objects_hit_set_archive(0),
-      num_bytes_hit_set_archive(0)
+      num_objects_hit_set_archive(0)
   {}
 
   void floor(int64_t f) {
@@ -1212,7 +1194,6 @@ struct object_stat_sum_t {
     FLOOR(num_object_copies);
     FLOOR(num_objects_missing_on_primary);
     FLOOR(num_objects_degraded);
-    FLOOR(num_objects_misplaced);
     FLOOR(num_objects_unfound);
     FLOOR(num_rd);
     FLOOR(num_rd_kb);
@@ -1228,7 +1209,6 @@ struct object_stat_sum_t {
     FLOOR(num_whiteouts);
     FLOOR(num_objects_omap);
     FLOOR(num_objects_hit_set_archive);
-    FLOOR(num_bytes_hit_set_archive);
 #undef FLOOR
   }
 
@@ -1247,7 +1227,6 @@ struct object_stat_sum_t {
     SPLIT(num_object_copies);
     SPLIT(num_objects_missing_on_primary);
     SPLIT(num_objects_degraded);
-    SPLIT(num_objects_misplaced);
     SPLIT(num_objects_unfound);
     SPLIT(num_rd);
     SPLIT(num_rd_kb);
@@ -1263,7 +1242,6 @@ struct object_stat_sum_t {
     SPLIT(num_whiteouts);
     SPLIT(num_objects_omap);
     SPLIT(num_objects_hit_set_archive);
-    SPLIT(num_bytes_hit_set_archive);
 #undef SPLIT
   }
 
@@ -1365,8 +1343,6 @@ struct pg_stat_t {
   utime_t last_active;  // state & PG_STATE_ACTIVE
   utime_t last_clean;   // state & PG_STATE_CLEAN
   utime_t last_unstale; // (state & PG_STATE_STALE) == 0
-  utime_t last_undegraded; // (state & PG_STATE_DEGRADED) == 0
-  utime_t last_fullsized; // (state & PG_STATE_UNDERSIZED) == 0
 
   eversion_t log_start;         // (log_start,version]
   eversion_t ondisk_log_start;  // there may be more on disk
@@ -1388,11 +1364,9 @@ struct pg_stat_t {
   int64_t log_size;
   int64_t ondisk_log_size;    // >= active_log_size
 
-  vector<int32_t> up, acting;
+  vector<int> up, acting;
   epoch_t mapping_epoch;
 
-  vector<int32_t> blocked_by;  ///< osds on which the pg is blocked
-
   utime_t last_became_active;
 
   /// true if num_objects_dirty is not accurate (because it was not
@@ -1400,11 +1374,10 @@ struct pg_stat_t {
   bool dirty_stats_invalid;
   bool omap_stats_invalid;
   bool hitset_stats_invalid;
-  bool hitset_bytes_stats_invalid;
 
   /// up, acting primaries
-  int32_t up_primary;
-  int32_t acting_primary;
+  int up_primary;
+  int acting_primary;
 
   pg_stat_t()
     : reported_seq(0),
@@ -1418,7 +1391,6 @@ struct pg_stat_t {
       dirty_stats_invalid(false),
       omap_stats_invalid(false),
       hitset_stats_invalid(false),
-      hitset_bytes_stats_invalid(false),
       up_primary(-1),
       acting_primary(-1)
   { }
@@ -1728,8 +1700,8 @@ struct pg_notify_t {
   shard_id_t to;
   shard_id_t from;
   pg_notify_t() :
-    query_epoch(0), epoch_sent(0), to(shard_id_t::NO_SHARD),
-    from(shard_id_t::NO_SHARD) {}
+    query_epoch(0), epoch_sent(0), to(ghobject_t::no_shard()),
+    from(ghobject_t::no_shard()) {}
   pg_notify_t(
     shard_id_t to,
     shard_id_t from,
@@ -1755,11 +1727,11 @@ ostream &operator<<(ostream &lhs, const pg_notify_t &notify);
  */
 class OSDMap;
 struct pg_interval_t {
-  vector<int32_t> up, acting;
+  vector<int> up, acting;
   epoch_t first, last;
   bool maybe_went_rw;
-  int32_t primary;
-  int32_t up_primary;
+  int primary;
+  int up_primary;
 
   pg_interval_t()
     : first(0), last(0),
@@ -1774,48 +1746,12 @@ struct pg_interval_t {
   static void generate_test_instances(list<pg_interval_t*>& o);
 
   /**
-   * Determines whether there is an interval change
-   */
-  static bool is_new_interval(
-    int old_acting_primary,
-    int new_acting_primary,
-    const vector<int> &old_acting,
-    const vector<int> &new_acting,
-    int old_up_primary,
-    int new_up_primary,
-    const vector<int> &old_up,
-    const vector<int> &new_up,
-    int old_min_size,
-    int new_min_size,
-    unsigned old_pg_num,
-    unsigned new_pg_num,
-    pg_t pgid
-    );
-
-  /**
-   * Determines whether there is an interval change
-   */
-  static bool is_new_interval(
-    int old_acting_primary,                     ///< [in] primary as of lastmap
-    int new_acting_primary,                     ///< [in] primary as of lastmap
-    const vector<int> &old_acting,              ///< [in] acting as of lastmap
-    const vector<int> &new_acting,              ///< [in] acting as of osdmap
-    int old_up_primary,                         ///< [in] up primary of lastmap
-    int new_up_primary,                         ///< [in] up primary of osdmap
-    const vector<int> &old_up,                  ///< [in] up as of lastmap
-    const vector<int> &new_up,                  ///< [in] up as of osdmap
-    ceph::shared_ptr<const OSDMap> osdmap,  ///< [in] current map
-    ceph::shared_ptr<const OSDMap> lastmap, ///< [in] last map
-    pg_t pgid                                   ///< [in] pgid for pg
-    );
-
-  /**
    * Integrates a new map into *past_intervals, returns true
    * if an interval was closed out.
    */
   static bool check_new_interval(
     int old_acting_primary,                     ///< [in] primary as of lastmap
-    int new_acting_primary,                     ///< [in] primary as of osdmap
+    int new_acting_primary,                     ///< [in] primary as of lastmap
     const vector<int> &old_acting,              ///< [in] acting as of lastmap
     const vector<int> &new_acting,              ///< [in] acting as of osdmap
     int old_up_primary,                         ///< [in] up primary of lastmap
@@ -1826,6 +1762,7 @@ struct pg_interval_t {
     epoch_t last_epoch_clean,                   ///< [in] current
     ceph::shared_ptr<const OSDMap> osdmap,  ///< [in] current map
     ceph::shared_ptr<const OSDMap> lastmap, ///< [in] last map
+    int64_t poolid,                             ///< [in] pool for pg
     pg_t pgid,                                  ///< [in] pgid for pg
     map<epoch_t, pg_interval_t> *past_intervals,///< [out] intervals
     ostream *out = 0                            ///< [out] debug ostream
@@ -1867,8 +1804,8 @@ struct pg_query_t {
   shard_id_t to;
   shard_id_t from;
 
-  pg_query_t() : type(-1), epoch_sent(0), to(shard_id_t::NO_SHARD),
-		 from(shard_id_t::NO_SHARD) {}
+  pg_query_t() : type(-1), epoch_sent(0), to(ghobject_t::NO_SHARD),
+		 from(ghobject_t::NO_SHARD) {}
   pg_query_t(
     int t,
     shard_id_t to,
@@ -2677,7 +2614,6 @@ struct object_info_t {
 
   uint64_t size;
   utime_t mtime;
-  utime_t local_mtime; // local mtime
 
   // note: these are currently encoded into a total 16 bits; see
   // encode()/decode() for the weirdness.
@@ -2996,9 +2932,6 @@ public:
       *requeue_snaptrimmer = true;
     }
   }
-  bool is_request_pending() {
-    return (rwstate.count > 0);
-  }
 
   ObjectContext()
     : ssc(NULL),
diff --git a/src/osdc/Blinker.h b/src/osdc/Blinker.h
new file mode 100644
index 0000000..48526c6
--- /dev/null
+++ b/src/osdc/Blinker.h
@@ -0,0 +1,92 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage at newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef CEPH_BLINKER_H
+#define CEPH_BLINKER_H
+
+class Blinker {
+
+ public:
+
+  class Op {
+    int op;
+    static const int LOOKUP = 1;
+    static const int INSERT = 2;
+    static const int REMOVE = 3;
+    static const int CLEAR = 4;
+    Op(int o) : op(o) {}
+  };
+  
+  class OpLookup : public Op {
+  public:
+    bufferptr key;
+    OpLookup(bufferptr& k) : Op(Op::LOOKUP), key(k) {}
+  };
+
+  class OpInsert : public Op {
+    bufferptr key;
+    bufferlist val;
+    OpInsert(bufferptr& k, bufferlist& v) : Op(Op::INSERT), key(k), val(v) {}
+  };
+
+  class OpRemove : public Op {
+  public:
+    bufferptr key;
+    OpRemove(bufferptr& k) : Op(Op::REMOVE), key(k) {}
+  };
+
+  class OpClear : public Op {
+  public:
+    OpClear() : Op(Op::CLEAR) {}
+  };
+
+
+
+private:
+  Objecter *objecter;
+
+  // in-flight operations.
+
+
+  // cache information about tree structure.
+  
+
+
+public:
+  // public interface
+
+  // simple accessors
+  void lookup(inode_t& inode, bufferptr& key, bufferlist *pval, Context *onfinish);
+
+  // simple modifiers
+  void insert(inode_t& inode, bufferptr& key, bufferlist& val, Context *onack, Context *onsafe);
+  void remove(inode_t& inode, bufferptr& key, Context *onack, Context *onsafe);
+  void clear(inode_t& inode, Context *onack, Context *onsafe);
+
+  // these are dangerous: the table may be large.
+  void listkeys(inode_t& inode, list<bufferptr>* pkeys, Context *onfinish);
+  void listvals(inode_t& inode, list<bufferptr>* pkeys, list<bufferlist>* pvals, Context *onfinish);
+
+  // fetch *at least* key, but also anything else that is convenient. 
+  // include lexical bounds for which this is a complete result.
+  //  (if *start and *end are empty, it's the entire table)
+  void prefetch(inode_t& inode, bufferptr& key, 
+		list<bufferptr>* pkeys, list<bufferlist>* pvals, 
+		bufferptr *start, bufferptr *end,
+		Context *onfinish);
+
+  
+};
+
+#endif
diff --git a/src/osdc/Filer.cc b/src/osdc/Filer.cc
index 84392de..8f94a97 100644
--- a/src/osdc/Filer.cc
+++ b/src/osdc/Filer.cc
@@ -45,20 +45,11 @@ public:
       assert(size == 0);
     }
 
-    bool probe_complete;
-    {
-      probe->lock.Lock();
-      if (r != 0) {
-        probe->err = r;
-      }
+    // TODO: handle this error.
+    if (r != 0)
+      probe->err = r;
 
-      probe_complete = filer->_probed(probe, oid, size, mtime);
-      assert(!probe->lock.is_locked_by_me());
-    }
-    if (probe_complete) {
-      probe->onfinish->complete(probe->err);
-      delete probe;
-    }
+    filer->_probed(probe, oid, size, mtime);
   }  
 };
 
@@ -96,21 +87,13 @@ int Filer::probe(inodeno_t ino,
     probe->probing_off -= probe->probing_len;
   }
   
-  probe->lock.Lock();
   _probe(probe);
-  assert(!probe->lock.is_locked_by_me());
-
   return 0;
 }
 
 
-/**
- * probe->lock must be initially locked, this function will release it
- */
 void Filer::_probe(Probe *probe)
 {
-  assert(probe->lock.is_locked_by_me());
-
   ldout(cct, 10) << "_probe " << hex << probe->ino << dec 
 	   << " " << probe->probing_off << "~" << probe->probing_len 
 	   << dendl;
@@ -121,33 +104,19 @@ void Filer::_probe(Probe *probe)
   Striper::file_to_extents(cct, probe->ino, &probe->layout,
 			   probe->probing_off, probe->probing_len, 0, probe->probing);
   
-  std::vector<ObjectExtent> stat_extents;
   for (vector<ObjectExtent>::iterator p = probe->probing.begin();
        p != probe->probing.end();
        ++p) {
     ldout(cct, 10) << "_probe  probing " << p->oid << dendl;
+    C_Probe *c = new C_Probe(this, probe, p->oid);
+    objecter->stat(p->oid, p->oloc, probe->snapid, &c->size, &c->mtime, 
+		   probe->flags | CEPH_OSD_FLAG_RWORDERED, c);
     probe->ops.insert(p->oid);
-    stat_extents.push_back(*p);
-  }
-
-  probe->lock.Unlock();
-  for (std::vector<ObjectExtent>::iterator i = stat_extents.begin();
-      i != stat_extents.end(); ++i) {
-    C_Probe *c = new C_Probe(this, probe, i->oid);
-    objecter->stat(i->oid, i->oloc, probe->snapid, &c->size, &c->mtime, 
-                   probe->flags | CEPH_OSD_FLAG_RWORDERED, c);
   }
 }
 
-/**
- * probe->lock must be initially held, and will be released by this function.
- *
- * @return true if probe is complete and Probe object may be freed.
- */
-bool Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, utime_t mtime)
+void Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, utime_t mtime)
 {
-  assert(probe->lock.is_locked_by_me());
-
   ldout(cct, 10) << "_probed " << probe->ino << " object " << oid
 	   << " has size " << size << " mtime " << mtime << dendl;
 
@@ -158,14 +127,13 @@ bool Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, utime_t mt
   assert(probe->ops.count(oid));
   probe->ops.erase(oid);
 
-  if (!probe->ops.empty()) {
-    probe->lock.Unlock();
-    return false;  // waiting for more!
-  }
+  if (!probe->ops.empty()) 
+    return;  // waiting for more!
 
   if (probe->err) { // we hit an error, propagate back up
-    probe->lock.Unlock();
-    return true;
+    probe->onfinish->complete(probe->err);
+    delete probe;
+    return;
   }
 
   // analyze!
@@ -238,23 +206,23 @@ bool Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, utime_t mt
       probe->probing_off -= period;
     }
     _probe(probe);
-    assert(!probe->lock.is_locked_by_me());
-    return false;
-  } else if (probe->pmtime) {
+    return;
+  }
+
+  if (probe->pmtime) {
     ldout(cct, 10) << "_probed found mtime " << probe->max_mtime << dendl;
     *probe->pmtime = probe->max_mtime;
   }
 
-  // done!
-  probe->lock.Unlock();
-  return true;
+  // done!  finish and clean up.
+  probe->onfinish->complete(probe->err);
+  delete probe;
 }
 
 
 // -----------------------
 
 struct PurgeRange {
-  Mutex lock;
   inodeno_t ino;
   ceph_file_layout layout;
   SnapContext snapc;
@@ -263,11 +231,6 @@ struct PurgeRange {
   int flags;
   Context *oncommit;
   int uncommitted;
-  PurgeRange(inodeno_t i, ceph_file_layout& l, const SnapContext& sc,
-	     uint64_t fo, uint64_t no, utime_t t, int fl, Context *fin) :
-	  lock("Filer::PurgeRange"), ino(i), layout(l), snapc(sc),
-	  first(fo), num(no), mtime(t), flags(fl), oncommit(fin),
-	  uncommitted(0) {}
 };
 
 int Filer::purge_range(inodeno_t ino,
@@ -283,15 +246,22 @@ int Filer::purge_range(inodeno_t ino,
   // single object?  easy!
   if (num_obj == 1) {
     object_t oid = file_object_t(ino, first_obj);
-    const OSDMap *osdmap = objecter->get_osdmap_read();
-    object_locator_t oloc = osdmap->file_to_object_locator(*layout);
-    objecter->put_osdmap_read();
+    object_locator_t oloc = objecter->osdmap->file_to_object_locator(*layout);
     objecter->remove(oid, oloc, snapc, mtime, flags, NULL, oncommit);
     return 0;
   }
 
-  PurgeRange *pr = new PurgeRange(ino, *layout, snapc, first_obj,
-				  num_obj, mtime, flags, oncommit);
+  // lots!  let's do this in pieces.
+  PurgeRange *pr = new PurgeRange;
+  pr->ino = ino;
+  pr->layout = *layout;
+  pr->snapc = snapc;
+  pr->first = first_obj;
+  pr->num = num_obj;
+  pr->mtime = mtime;
+  pr->flags = flags;
+  pr->oncommit = oncommit;
+  pr->uncommitted = 0;
 
   _do_purge_range(pr, 0);
   return 0;
@@ -308,40 +278,27 @@ struct C_PurgeRange : public Context {
 
 void Filer::_do_purge_range(PurgeRange *pr, int fin)
 {
-  pr->lock.Lock();
   pr->uncommitted -= fin;
   ldout(cct, 10) << "_do_purge_range " << pr->ino << " objects " << pr->first << "~" << pr->num
 	   << " uncommitted " << pr->uncommitted << dendl;
 
   if (pr->num == 0 && pr->uncommitted == 0) {
     pr->oncommit->complete(0);
-    pr->lock.Unlock();
     delete pr;
     return;
   }
 
-  std::vector<object_t> remove_oids;
-
   int max = 10 - pr->uncommitted;
   while (pr->num > 0 && max > 0) {
-    remove_oids.push_back(file_object_t(pr->ino, pr->first));
+    object_t oid = file_object_t(pr->ino, pr->first);
+    object_locator_t oloc = objecter->osdmap->file_to_object_locator(pr->layout);
+    objecter->remove(oid, oloc, pr->snapc, pr->mtime, pr->flags,
+		     NULL, new C_PurgeRange(this, pr));
     pr->uncommitted++;
     pr->first++;
     pr->num--;
     max--;
   }
-  pr->lock.Unlock();
-
-  // Issue objecter ops outside pr->lock to avoid lock dependency loop
-  for (std::vector<object_t>::iterator i = remove_oids.begin();
-      i != remove_oids.end(); ++i) {
-    const object_t oid = *i;
-    const OSDMap *osdmap = objecter->get_osdmap_read();
-    const object_locator_t oloc = osdmap->file_to_object_locator(pr->layout);
-    objecter->put_osdmap_read();
-    objecter->remove(oid, oloc, pr->snapc, pr->mtime, pr->flags,
-		     NULL, new C_PurgeRange(this, pr));
-  }
 }
 
 
diff --git a/src/osdc/Filer.h b/src/osdc/Filer.h
index 1164d95..607dc7b 100644
--- a/src/osdc/Filer.h
+++ b/src/osdc/Filer.h
@@ -46,7 +46,6 @@ class Filer {
   
   // probes
   struct Probe {
-    Mutex lock;
     inodeno_t ino;
     ceph_file_layout layout;
     snapid_t snapid;
@@ -73,7 +72,7 @@ class Filer {
 
     Probe(inodeno_t i, ceph_file_layout &l, snapid_t sn,
 	  uint64_t f, uint64_t *e, utime_t *m, int fl, bool fw, Context *c) : 
-      lock("Filer::Probe"), ino(i), layout(l), snapid(sn),
+      ino(i), layout(l), snapid(sn),
       psize(e), pmtime(m), flags(fl), fwd(fw), onfinish(c),
       probing_off(f), probing_len(0),
       err(0), found_size(false) {}
@@ -82,7 +81,7 @@ class Filer {
   class C_Probe;
 
   void _probe(Probe *p);
-  bool _probed(Probe *p, const object_t& oid, uint64_t size, utime_t mtime);
+  void _probed(Probe *p, const object_t& oid, uint64_t size, utime_t mtime);
 
  public:
   Filer(const Filer& other);
diff --git a/src/osdc/Journaler.cc b/src/osdc/Journaler.cc
index b16809e..ba4ca8d 100644
--- a/src/osdc/Journaler.cc
+++ b/src/osdc/Journaler.cc
@@ -19,7 +19,6 @@
 #include "osdc/Journaler.h"
 #include "common/errno.h"
 #include "include/assert.h"
-#include "common/Finisher.h"
 
 #define dout_subsys ceph_subsys_journaler
 #undef dout_prefix
@@ -28,46 +27,30 @@
 
 void Journaler::set_readonly()
 {
-  Mutex::Locker l(lock);
-
   ldout(cct, 1) << "set_readonly" << dendl;
   readonly = true;
 }
 
 void Journaler::set_writeable()
 {
-  Mutex::Locker l(lock);
-
   ldout(cct, 1) << "set_writeable" << dendl;
   readonly = false;
 }
 
-void Journaler::create(ceph_file_layout *l, stream_format_t const sf)
+void Journaler::create(ceph_file_layout *l)
 {
-  Mutex::Locker lk(lock);
-
   assert(!readonly);
+  ldout(cct, 1) << "create blank journal" << dendl;
   state = STATE_ACTIVE;
 
-  stream_format = sf;
-  journal_stream.set_format(sf);
-  _set_layout(l);
+  set_layout(l);
 
   prezeroing_pos = prezero_pos = write_pos = flush_pos = safe_pos =
     read_pos = requested_pos = received_pos =
     expire_pos = trimming_pos = trimmed_pos = layout.fl_stripe_count * layout.fl_object_size;
-
-  ldout(cct, 1) << "created blank journal at inode 0x" << std::hex << ino << std::dec
-    << ", format=" << stream_format << dendl;
-}
-
-void Journaler::set_layout(ceph_file_layout const *l)
-{
-    Mutex::Locker lk(lock);
-    _set_layout(l);
 }
 
-void Journaler::_set_layout(ceph_file_layout const *l)
+void Journaler::set_layout(ceph_file_layout *l)
 {
   layout = *l;
 
@@ -91,7 +74,6 @@ ostream& operator<<(ostream& out, Journaler::Header &h)
   return out << "loghead(trim " << h.trimmed_pos
 	     << ", expire " << h.expire_pos
 	     << ", write " << h.write_pos
-	     << ", stream_format " << (int)(h.stream_format)
 	     << ")";
 }
 
@@ -128,10 +110,10 @@ public:
 
 class Journaler::C_ReProbe : public Context {
   Journaler *ls;
-  C_OnFinisher *onfinish;
+  Context *onfinish;
 public:
   uint64_t end;
-  C_ReProbe(Journaler *l, C_OnFinisher *onfinish_) :
+  C_ReProbe(Journaler *l, Context *onfinish_) :
     ls(l), onfinish(onfinish_), end(0) {}
   void finish(int r) {
     ls->_finish_reprobe(r, end, onfinish);
@@ -140,8 +122,6 @@ public:
 
 void Journaler::recover(Context *onread) 
 {
-  Mutex::Locker l(lock);
-
   ldout(cct, 1) << "recover start" << dendl;
   assert(state != STATE_ACTIVE);
   assert(readonly);
@@ -157,23 +137,16 @@ void Journaler::recover(Context *onread)
   ldout(cct, 1) << "read_head" << dendl;
   state = STATE_READHEAD;
   C_ReadHead *fin = new C_ReadHead(this);
-  _read_head(fin, &fin->bl);
+  read_head(fin, &fin->bl);
 }
 
-void Journaler::_read_head(Context *on_finish, bufferlist *bl)
+void Journaler::read_head(Context *on_finish, bufferlist *bl)
 {
-  assert(lock.is_locked_by_me());
   assert(state == STATE_READHEAD || state == STATE_REREADHEAD);
 
   object_t oid = file_object_t(ino, 0);
   object_locator_t oloc(pg_pool);
-  objecter->read_full(oid, oloc, CEPH_NOSNAP, bl, 0, wrap_finisher(on_finish));
-}
-
-void Journaler::reread_head(Context *onfinish)
-{
-  Mutex::Locker l(lock);
-  _reread_head(wrap_finisher(onfinish));
+  objecter->read_full(oid, oloc, CEPH_NOSNAP, bl, 0, on_finish);
 }
 
 /**
@@ -184,20 +157,18 @@ void Journaler::reread_head(Context *onfinish)
  * Also, don't call this until the Journaler has finished its recovery and has
  * gone STATE_ACTIVE!
  */
-void Journaler::_reread_head(Context *onfinish)
+void Journaler::reread_head(Context *onfinish)
 {
   ldout(cct, 10) << "reread_head" << dendl;
   assert(state == STATE_ACTIVE);
 
   state = STATE_REREADHEAD;
   C_RereadHead *fin = new C_RereadHead(this, onfinish);
-  _read_head(fin, &fin->bl);
+  read_head(fin, &fin->bl);
 }
 
 void Journaler::_finish_reread_head(int r, bufferlist& bl, Context *finish)
 {
-  Mutex::Locker l(lock);
-
   //read on-disk header into
   assert(bl.length() || r < 0 );
 
@@ -215,8 +186,6 @@ void Journaler::_finish_reread_head(int r, bufferlist& bl, Context *finish)
 
 void Journaler::_finish_read_head(int r, bufferlist& bl)
 {
-  Mutex::Locker l(lock);
-
   assert(state == STATE_READHEAD);
 
   if (r!=0) {
@@ -242,17 +211,9 @@ void Journaler::_finish_read_head(int r, bufferlist& bl)
   bufferlist::iterator p = bl.begin();
   ::decode(h, p);
 
-  bool corrupt = false;
   if (h.magic != magic) {
     ldout(cct, 0) << "on disk magic '" << h.magic << "' != my magic '"
 	    << magic << "'" << dendl;
-    corrupt = true;
-  } else if (h.write_pos < h.expire_pos || h.expire_pos < h.trimmed_pos) {
-    ldout(cct, 0) << "Corrupt header (bad offsets): " << h << dendl;
-    corrupt = true;
-  }
-
-  if (corrupt) {
     list<Context*> ls;
     ls.swap(waitfor_recover);
     finish_contexts(cct, ls, -EINVAL);
@@ -264,41 +225,35 @@ void Journaler::_finish_read_head(int r, bufferlist& bl)
   trimmed_pos = trimming_pos = h.trimmed_pos;
 
   init_headers(h);
-  _set_layout(&h.layout);
-  stream_format = h.stream_format;
-  journal_stream.set_format(h.stream_format);
+  set_layout(&h.layout);
 
   ldout(cct, 1) << "_finish_read_head " << h << ".  probing for end of log (from " << write_pos << ")..." << dendl;
   C_ProbeEnd *fin = new C_ProbeEnd(this);
   state = STATE_PROBING;
-  _probe(fin, &fin->end);
+  probe(fin, &fin->end);
 }
 
-void Journaler::_probe(Context *finish, uint64_t *end)
+void Journaler::probe(Context *finish, uint64_t *end)
 {
-  assert(lock.is_locked_by_me());
   ldout(cct, 1) << "probing for end of the log" << dendl;
   assert(state == STATE_PROBING || state == STATE_REPROBING);
   // probe the log
   filer.probe(ino, &layout, CEPH_NOSNAP,
-	      write_pos, end, 0, true, 0, wrap_finisher(finish));
+	      write_pos, end, 0, true, 0, finish);
 }
 
-void Journaler::_reprobe(C_OnFinisher *finish)
+void Journaler::reprobe(Context *finish)
 {
   ldout(cct, 10) << "reprobe" << dendl;
   assert(state == STATE_ACTIVE);
 
   state = STATE_REPROBING;
   C_ReProbe *fin = new C_ReProbe(this, finish);
-  _probe(fin, &fin->end);
+  probe(fin, &fin->end);
 }
 
 
-void Journaler::_finish_reprobe(int r, uint64_t new_end, C_OnFinisher *onfinish)
-{
-  Mutex::Locker l(lock);
-
+void Journaler::_finish_reprobe(int r, uint64_t new_end, Context *onfinish) {
   assert(new_end >= write_pos || r < 0);
   ldout(cct, 1) << "_finish_reprobe new_end = " << new_end 
 	  << " (header had " << write_pos << ")."
@@ -310,8 +265,6 @@ void Journaler::_finish_reprobe(int r, uint64_t new_end, C_OnFinisher *onfinish)
 
 void Journaler::_finish_probe_end(int r, uint64_t end)
 {
-  Mutex::Locker l(lock);
-
   assert(state == STATE_PROBING);
   if (r < 0) { // error in probing
     goto out;
@@ -343,9 +296,9 @@ out:
 class Journaler::C_RereadHeadProbe : public Context
 {
   Journaler *ls;
-  C_OnFinisher *final_finish;
+  Context *final_finish;
 public:
-  C_RereadHeadProbe(Journaler *l, C_OnFinisher *finish) :
+  C_RereadHeadProbe(Journaler *l, Context *finish) :
     ls(l), final_finish(finish) {}
   void finish(int r) {
     ls->_finish_reread_head_and_probe(r, final_finish);
@@ -354,19 +307,14 @@ public:
 
 void Journaler::reread_head_and_probe(Context *onfinish)
 {
-  Mutex::Locker l(lock);
-
   assert(state == STATE_ACTIVE);
-  _reread_head(new C_RereadHeadProbe(this, wrap_finisher(onfinish)));
+  reread_head(new C_RereadHeadProbe(this, onfinish));
 }
 
-void Journaler::_finish_reread_head_and_probe(int r, C_OnFinisher *onfinish)
+void Journaler::_finish_reread_head_and_probe(int r, Context *onfinish)
 {
-  // Expect to be called back from finish_reread_head, which already takes lock
-  assert(lock.is_locked_by_me());
-
   assert(!r); //if we get an error, we're boned
-  _reprobe(onfinish);
+  reprobe(onfinish);
 }
 
 
@@ -376,8 +324,8 @@ class Journaler::C_WriteHead : public Context {
 public:
   Journaler *ls;
   Header h;
-  C_OnFinisher *oncommit;
-  C_WriteHead(Journaler *l, Header& h_, C_OnFinisher *c) : ls(l), h(h_), oncommit(c) {}
+  Context *oncommit;
+  C_WriteHead(Journaler *l, Header& h_, Context *c) : ls(l), h(h_), oncommit(c) {}
   void finish(int r) {
     ls->_finish_write_head(r, h, oncommit);
   }
@@ -385,26 +333,14 @@ public:
 
 void Journaler::write_head(Context *oncommit)
 {
-  Mutex::Locker l(lock);
-  _write_head(oncommit);
-}
-
-
-void Journaler::_write_head(Context *oncommit)
-{
   assert(!readonly);
   assert(state == STATE_ACTIVE);
   last_written.trimmed_pos = trimmed_pos;
   last_written.expire_pos = expire_pos;
   last_written.unused_field = expire_pos;
   last_written.write_pos = safe_pos;
-  last_written.stream_format = stream_format;
   ldout(cct, 10) << "write_head " << last_written << dendl;
   
-  // Avoid persisting bad pointers in case of bugs
-  assert(last_written.write_pos >= last_written.expire_pos);
-  assert(last_written.expire_pos >= last_written.trimmed_pos);
-
   last_wrote_head = ceph_clock_now(cct);
 
   bufferlist bl;
@@ -415,13 +351,11 @@ void Journaler::_write_head(Context *oncommit)
   object_locator_t oloc(pg_pool);
   objecter->write_full(oid, oloc, snapc, bl, ceph_clock_now(cct), 0, 
 		       NULL, 
-		       wrap_finisher(new C_WriteHead(this, last_written, wrap_finisher(oncommit))));
+		       new C_WriteHead(this, last_written, oncommit));
 }
 
-void Journaler::_finish_write_head(int r, Header &wrote, C_OnFinisher *oncommit)
+void Journaler::_finish_write_head(int r, Header &wrote, Context *oncommit)
 {
-  Mutex::Locker l(lock);
-
   if (r < 0) {
     lderr(cct) << "_finish_write_head got " << cpp_strerror(r) << dendl;
     handle_write_error(r);
@@ -434,7 +368,7 @@ void Journaler::_finish_write_head(int r, Header &wrote, C_OnFinisher *oncommit)
     oncommit->complete(r);
   }
 
-  _trim();  // trim?
+  trim();  // trim?
 }
 
 
@@ -453,9 +387,7 @@ public:
 
 void Journaler::_finish_flush(int r, uint64_t start, utime_t stamp)
 {
-  Mutex::Locker l(lock);
   assert(!readonly);
-
   if (r < 0) {
     lderr(cct) << "_finish_flush got " << cpp_strerror(r) << dendl;
     handle_write_error(r);
@@ -497,11 +429,8 @@ void Journaler::_finish_flush(int r, uint64_t start, utime_t stamp)
 }
 
 
-
 uint64_t Journaler::append_entry(bufferlist& bl)
 {
-  Mutex::Locker l(lock);
-
   assert(!readonly);
   uint32_t s = bl.length();
 
@@ -528,11 +457,12 @@ uint64_t Journaler::append_entry(bufferlist& bl)
     }
   }
 	
+  ldout(cct, 10) << "append_entry len " << bl.length() << " to " << write_pos << "~" << (bl.length() + sizeof(uint32_t)) << dendl;
   
   // append
-  size_t wrote = journal_stream.write(bl, &write_buf, write_pos);
-  ldout(cct, 10) << "append_entry len " << s << " to " << write_pos << "~" << wrote << dendl;
-  write_pos += wrote;
+  ::encode(s, write_buf);
+  write_buf.claim_append(bl);
+  write_pos += sizeof(s) + s;
 
   // flush previous object?
   uint64_t su = get_layout_period();
@@ -607,7 +537,7 @@ void Journaler::_do_flush(unsigned amount)
   filer.write(ino, &layout, snapc,
 	      flush_pos, len, write_bl, ceph_clock_now(cct),
 	      0,
-	      NULL, wrap_finisher(onsafe));
+	      NULL, onsafe);
 
   flush_pos += len;
   assert(write_buf.length() == write_pos - flush_pos);
@@ -619,13 +549,8 @@ void Journaler::_do_flush(unsigned amount)
 }
 
 
-void Journaler::wait_for_flush(Context *onsafe)
-{
-  Mutex::Locker l(lock);
-  _wait_for_flush(onsafe);
-}
 
-void Journaler::_wait_for_flush(Context *onsafe)
+void Journaler::wait_for_flush(Context *onsafe)
 {
   assert(!readonly);
   
@@ -635,25 +560,19 @@ void Journaler::_wait_for_flush(Context *onsafe)
     ldout(cct, 10) << "flush nothing to flush, (prezeroing/prezero)/write/flush/safe pointers at " 
 	     << "(" << prezeroing_pos << "/" << prezero_pos << ")/" << write_pos << "/" << flush_pos << "/" << safe_pos << dendl;
     if (onsafe) {
-      finisher->queue(onsafe, 0);
+      onsafe->complete(0);
+      onsafe = 0;
     }
     return;
   }
 
   // queue waiter
-  if (onsafe) {
-    waitfor_safe[write_pos].push_back(wrap_finisher(onsafe));
-  }
+  if (onsafe) 
+    waitfor_safe[write_pos].push_back(onsafe);
 }  
 
 void Journaler::flush(Context *onsafe)
 {
-  Mutex::Locker l(lock);
-  _flush(wrap_finisher(onsafe));
-}
-
-void Journaler::_flush(C_OnFinisher *onsafe)
-{
   assert(!readonly);
 
   if (write_pos == flush_pos) {
@@ -664,25 +583,29 @@ void Journaler::_flush(C_OnFinisher *onsafe)
       onsafe->complete(0);
     }
   } else {
-    // maybe buffer
-    if (write_buf.length() < cct->_conf->journaler_batch_max) {
-      // delay!  schedule an event.
-      ldout(cct, 20) << "flush delaying flush" << dendl;
-      if (delay_flush_event) {
-        timer->cancel_event(delay_flush_event);
+    if (1) {
+      // maybe buffer
+      if (write_buf.length() < cct->_conf->journaler_batch_max) {
+	// delay!  schedule an event.
+	ldout(cct, 20) << "flush delaying flush" << dendl;
+	if (delay_flush_event)
+	  timer->cancel_event(delay_flush_event);
+	delay_flush_event = new C_DelayFlush(this);
+	timer->add_event_after(cct->_conf->journaler_batch_interval, delay_flush_event);	
+      } else {
+	ldout(cct, 20) << "flush not delaying flush" << dendl;
+	_do_flush();
       }
-      delay_flush_event = new C_DelayFlush(this);
-      timer->add_event_after(cct->_conf->journaler_batch_interval, delay_flush_event);	
     } else {
-      ldout(cct, 20) << "flush not delaying flush" << dendl;
+      // always flush
       _do_flush();
     }
-    _wait_for_flush(onsafe);
+    wait_for_flush(onsafe);
   }
 
   // write head?
   if (last_wrote_head.sec() + cct->_conf->journaler_write_head_interval < ceph_clock_now(cct).sec()) {
-    _write_head();
+    write_head();
   }
 }
 
@@ -694,7 +617,7 @@ struct C_Journaler_Prezero : public Context {
   uint64_t from, len;
   C_Journaler_Prezero(Journaler *j, uint64_t f, uint64_t l) : journaler(j), from(f), len(l) {}
   void finish(int r) {
-    journaler->_finish_prezero(r, from, len);
+    journaler->_prezeroed(r, from, len);
   }
 };
 
@@ -729,19 +652,14 @@ void Journaler::_issue_prezero()
       ldout(cct, 10) << "_issue_prezero zeroing " << prezeroing_pos << "~" << len << " (partial period)" << dendl;
     }
     SnapContext snapc;
-    Context *c = wrap_finisher(new C_Journaler_Prezero(this, prezeroing_pos, len));
+    Context *c = new C_Journaler_Prezero(this, prezeroing_pos, len);
     filer.zero(ino, &layout, snapc, prezeroing_pos, len, ceph_clock_now(cct), 0, NULL, c);
     prezeroing_pos += len;
   }
 }
 
-// Lock cycle because we get called out of objecter callback (holding
-// objecter read lock), but there are also cases where we take the journaler
-// lock before calling into objecter to do I/O.
-void Journaler::_finish_prezero(int r, uint64_t start, uint64_t len)
+void Journaler::_prezeroed(int r, uint64_t start, uint64_t len)
 {
-  Mutex::Locker l(lock);
-
   ldout(cct, 10) << "_prezeroed to " << start << "~" << len
 	   << ", prezeroing/prezero was " << prezeroing_pos << "/" << prezero_pos
 	   << ", pending " << pending_zero
@@ -795,21 +713,18 @@ class Journaler::C_RetryRead : public Context {
 public:
   C_RetryRead(Journaler *l) : ls(l) {}
   void finish(int r) {
-    // Should only be called from waitfor_safe i.e. already inside lock
-    assert(ls->lock.is_locked_by_me());
+    // kickstart.
     ls->_prefetch();
   }  
 };
 
 void Journaler::_finish_read(int r, uint64_t offset, bufferlist& bl)
 {
-  Mutex::Locker l(lock);
-
   if (r < 0) {
     ldout(cct, 0) << "_finish_read got error " << r << dendl;
     error = r;
     if (on_readable) {
-      C_OnFinisher *f = on_readable;
+      Context *f = on_readable;
       on_readable = 0;
       f->complete(r);
     }
@@ -856,7 +771,7 @@ void Journaler::_assimilate_prefetch()
     // readable!
     ldout(cct, 10) << "_finish_read now readable (or at journal end)" << dendl;
     if (on_readable) {
-      C_OnFinisher *f = on_readable;
+      Context *f = on_readable;
       on_readable = 0;
       f->complete(0);
     }
@@ -874,9 +789,8 @@ void Journaler::_issue_read(uint64_t len)
   if (requested_pos == safe_pos) {
     ldout(cct, 10) << "_issue_read requested_pos = safe_pos = " << safe_pos << ", waiting" << dendl;
     assert(write_pos > requested_pos);
-    if (flush_pos == safe_pos) {
-      _flush(NULL);
-    }
+    if (flush_pos == safe_pos)
+      flush();
     assert(flush_pos > safe_pos);
     waitfor_safe[flush_pos].push_back(new C_RetryRead(this));
     return;
@@ -905,7 +819,7 @@ void Journaler::_issue_read(uint64_t len)
     if (l > len)
       l = len;
     C_Read *c = new C_Read(this, requested_pos);
-    filer.read(ino, &layout, CEPH_NOSNAP, requested_pos, l, &c->bl, 0, wrap_finisher(c));
+    filer.read(ino, &layout, CEPH_NOSNAP, requested_pos, l, &c->bl, 0, c);
     requested_pos += l;
     len -= l;
   }
@@ -944,7 +858,6 @@ void Journaler::_prefetch()
   }
 }
 
-
 /*
  * _is_readable() - return true if next entry is ready.
  */
@@ -954,14 +867,20 @@ bool Journaler::_is_readable()
   if (read_pos == write_pos)
     return false;
 
-  // Check if the retrieve bytestream has enough for an entry
-  uint64_t need;
-  if (journal_stream.readable(read_buf, &need)) {
-    return true;
-  }
+  // have enough for entry size?
+  uint32_t s = 0;
+  bufferlist::iterator p = read_buf.begin();
+  if (read_buf.length() >= sizeof(s))
+    ::decode(s, p);
+
+  // entry and payload?
+  if (read_buf.length() >= sizeof(s) &&
+      read_buf.length() >= sizeof(s) + s) 
+    return true;  // yep, next entry is ready.
 
   ldout (cct, 10) << "_is_readable read_buf.length() == " << read_buf.length()
-		  << ", but need " << need << " for next entry; fetch_len is " << fetch_len << dendl;
+		  << ", but need " << s + sizeof(s)
+		  << " for next entry; fetch_len is " << fetch_len << dendl;
 
   // partial fragment at the end?
   if (received_pos == write_pos) {
@@ -980,9 +899,11 @@ bool Journaler::_is_readable()
     return false;
   }
 
+  uint64_t need = sizeof(s) + s;
   if (need > fetch_len) {
-    temp_fetch_len = need;
-    ldout(cct, 10) << "_is_readable noting temp_fetch_len " << temp_fetch_len << dendl;
+    temp_fetch_len = sizeof(s) + s;
+    ldout(cct, 10) << "_is_readable noting temp_fetch_len " << temp_fetch_len
+	     << " for len " << s << " entry" << dendl;
   }
 
   ldout(cct, 10) << "_is_readable: not readable, returning false" << dendl;
@@ -994,55 +915,11 @@ bool Journaler::_is_readable()
  */
 bool Journaler::is_readable() 
 {
-  Mutex::Locker l(lock);
-
   bool r = _is_readable();
   _prefetch();
   return r;
 }
 
-class Journaler::C_EraseFinish : public Context {
-  Journaler *journaler;
-  C_OnFinisher *completion;
-  public:
-  C_EraseFinish(Journaler *j, C_OnFinisher *c) : journaler(j), completion(c) {}
-  void finish(int r) {
-    journaler->_finish_erase(r, completion);
-  }
-};
-
-/**
- * Entirely erase the journal, including header.  For use when you
- * have already made a copy of the journal somewhere else.
- */
-void Journaler::erase(Context *completion)
-{
-  Mutex::Locker l(lock);
-
-  // Async delete the journal data
-  uint64_t first = trimmed_pos / get_layout_period();
-  uint64_t num = (write_pos - trimmed_pos) / get_layout_period() + 2;
-  filer.purge_range(ino, &layout, SnapContext(), first, num, ceph_clock_now(cct), 0,
-      wrap_finisher(new C_EraseFinish(this, wrap_finisher(completion))));
-
-  // We will not start the operation to delete the header until _finish_erase has
-  // seen the data deletion succeed: otherwise if there was an error deleting data
-  // we might prematurely delete the header thereby lose our reference to the data.
-}
-
-void Journaler::_finish_erase(int data_result, C_OnFinisher *completion)
-{
-  Mutex::Locker l(lock);
-
-  if (data_result == 0) {
-    // Async delete the journal header
-    filer.purge_range(ino, &layout, SnapContext(), 0, 1, ceph_clock_now(cct), 0,
-        wrap_finisher(completion));
-  } else {
-    lderr(cct) << "Failed to delete journal " << ino << " data: " << cpp_strerror(data_result) << dendl;
-    completion->complete(data_result);
-  }
-}
 
 /* try_read_entry(bl)
  *  read entry into bl if it's ready.
@@ -1050,23 +927,32 @@ void Journaler::_finish_erase(int data_result, C_OnFinisher *completion)
  */
 bool Journaler::try_read_entry(bufferlist& bl)
 {
-  Mutex::Locker l(lock);
-
-  if (!_is_readable()) {  // this may start a read.
+  if (!is_readable()) {  // this may start a read. 
     ldout(cct, 10) << "try_read_entry at " << read_pos << " not readable" << dendl;
     return false;
   }
-
-  uint64_t start_ptr;
-  size_t consumed = journal_stream.read(read_buf, &bl, &start_ptr);
-  if (stream_format >= JOURNAL_FORMAT_RESILIENT) {
-    assert(start_ptr == read_pos);
+  
+  uint32_t s;
+  {
+    bufferlist::iterator p = read_buf.begin();
+    ::decode(s, p);
   }
+  assert(read_buf.length() >= sizeof(s) + s);
+  
+  ldout(cct, 10) << "try_read_entry at " << read_pos << " reading " 
+	   << read_pos << "~" << (sizeof(s)+s) << " (have " << read_buf.length() << ")" << dendl;
 
-  ldout(cct, 10) << "try_read_entry at " << read_pos << " read " 
-	   << read_pos << "~" << consumed << " (have " << read_buf.length() << ")" << dendl;
+  if (s == 0) {
+    ldout(cct, 0) << "try_read_entry got 0 len entry at offset " << read_pos << dendl;
+    error = -EINVAL;
+    return false;
+  }
 
-  read_pos += consumed;
+  // do it
+  assert(bl.length() == 0);
+  read_buf.splice(0, sizeof(s));
+  read_buf.splice(0, s, &bl);
+  read_pos += sizeof(s) + s;
 
   // prefetch?
   _prefetch();
@@ -1075,16 +961,10 @@ bool Journaler::try_read_entry(bufferlist& bl)
 
 void Journaler::wait_for_readable(Context *onreadable)
 {
-  Mutex::Locker l(lock);
-
+  ldout(cct, 10) << "wait_for_readable at " << read_pos << " onreadable " << onreadable << dendl;
+  assert(!_is_readable());
   assert(on_readable == 0);
-  if (!_is_readable()) {
-    ldout(cct, 10) << "wait_for_readable at " << read_pos << " onreadable " << onreadable << dendl;
-    on_readable = wrap_finisher(onreadable);
-  } else {
-    // race with OSD reply
-    finisher->queue(onreadable, 0);
-  }
+  on_readable = onreadable;
 }
 
 
@@ -1099,18 +979,12 @@ class Journaler::C_Trim : public Context {
 public:
   C_Trim(Journaler *l, int64_t t) : ls(l), to(t) {}
   void finish(int r) {
-    ls->_finish_trim(r, to);
+    ls->_trim_finish(r, to);
   }
 };
 
 void Journaler::trim()
 {
-  Mutex::Locker l(lock);
-  _trim();
-}
-
-void Journaler::_trim()
-{
   assert(!readonly);
   uint64_t period = get_layout_period();
   uint64_t trim_to = last_committed.expire_pos;
@@ -1144,21 +1018,19 @@ void Journaler::_trim()
   uint64_t num = (trim_to - trimming_pos) / period;
   SnapContext snapc;
   filer.purge_range(ino, &layout, snapc, first, num, ceph_clock_now(cct), 0, 
-		    wrap_finisher(new C_Trim(this, trim_to)));
+		    new C_Trim(this, trim_to));
   trimming_pos = trim_to;  
 }
 
-void Journaler::_finish_trim(int r, uint64_t to)
+void Journaler::_trim_finish(int r, uint64_t to)
 {
-  Mutex::Locker l(lock);
-
   assert(!readonly);
-  ldout(cct, 10) << "_finish_trim trimmed_pos was " << trimmed_pos
+  ldout(cct, 10) << "_trim_finish trimmed_pos was " << trimmed_pos
 	   << ", trimmed/trimming/expire now "
 	   << to << "/" << trimming_pos << "/" << expire_pos
 	   << dendl;
   if (r < 0 && r != -ENOENT) {
-    lderr(cct) << "_finish_trim got " << cpp_strerror(r) << dendl;
+    lderr(cct) << "_trim_finish got " << cpp_strerror(r) << dendl;
     handle_write_error(r);
     return;
   }
@@ -1168,6 +1040,13 @@ void Journaler::_finish_trim(int r, uint64_t to)
   assert(to <= trimming_pos);
   assert(to > trimmed_pos);
   trimmed_pos = to;
+
+  // finishers?
+  while (!waitfor_trim.empty() &&
+	 waitfor_trim.begin()->first <= trimmed_pos) {
+    finish_contexts(cct, waitfor_trim.begin()->second, 0);
+    waitfor_trim.erase(waitfor_trim.begin());
+  }
 }
 
 void Journaler::handle_write_error(int r)
@@ -1182,163 +1061,4 @@ void Journaler::handle_write_error(int r)
 }
 
 
-/**
- * Test whether the 'read_buf' byte stream has enough data to read
- * an entry
- *
- * sets 'next_envelope_size' to the number of bytes needed to advance (enough
- * to get the next header if header was unavailable, or enough to get the whole
- * next entry if the header was available but the body wasn't).
- */
-bool JournalStream::readable(bufferlist &read_buf, uint64_t *need) const
-{
-  assert(need != NULL);
-
-  uint32_t entry_size = 0;
-  uint64_t entry_sentinel = 0;
-  bufferlist::iterator p = read_buf.begin();
-
-  // Do we have enough data to decode an entry prefix?
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    *need = sizeof(entry_size) + sizeof(entry_sentinel);
-  } else {
-    *need = sizeof(entry_size);
-  }
-  if (read_buf.length() >= *need) {
-    if (format >= JOURNAL_FORMAT_RESILIENT) {
-      ::decode(entry_sentinel, p);
-      if (entry_sentinel != sentinel) {
-        throw buffer::malformed_input("Invalid sentinel"); 
-      }
-    }
-
-    ::decode(entry_size, p);
-  } else {
-    return false;
-  }
-
-  // Do we have enough data to decode an entry prefix, payload and suffix?
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    *need = JOURNAL_ENVELOPE_RESILIENT + entry_size;
-  } else {
-    *need = JOURNAL_ENVELOPE_LEGACY + entry_size;
-  }
-  if (read_buf.length() >= *need) {
-    return true;  // No more bytes needed
-  }
-
-  return false;
-}
-
-
-/**
- * Consume one entry from a journal byte stream 'from', splicing a
- * serialized LogEvent blob into 'entry'.
- *
- * 'entry' must be non null and point to an empty bufferlist.
- *
- * 'from' must contain sufficient valid data (i.e. readable is true).
- *
- * 'start_ptr' will be set to the entry's start pointer, if the collection
- * format provides it.  It may not be null.
- *
- * @returns The number of bytes consumed from the `from` byte stream.  Note
- *          that this is not equal to the length of `entry`, which contains
- *          the inner serialized LogEvent and not the envelope.
- */
-size_t JournalStream::read(bufferlist &from, bufferlist *entry, uint64_t *start_ptr)
-{
-  assert(start_ptr != NULL);
-  assert(entry != NULL);
-  assert(entry->length() == 0);
-
-  uint32_t entry_size = 0;
-
-  // Consume envelope prefix: entry_size and entry_sentinel
-  bufferlist::iterator from_ptr = from.begin();
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    uint64_t entry_sentinel = 0;
-    ::decode(entry_sentinel, from_ptr);
-    // Assertion instead of clean check because of precondition of this
-    // fn is that readable() already passed
-    assert(entry_sentinel == sentinel);
-  }
-  ::decode(entry_size, from_ptr);
-  assert(entry_size != 0);
-
-  // Read out the payload
-  from_ptr.copy(entry_size, *entry);
-
-  // Consume the envelope suffix (start_ptr)
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    ::decode(*start_ptr, from_ptr);
-  } else {
-    *start_ptr = 0;
-  }
-
-  // Trim the input buffer to discard the bytes we have consumed
-  from.splice(0, from_ptr.get_off());
-
-  return from_ptr.get_off();
-}
-
-
-/**
- * Append one entry
- */
-size_t JournalStream::write(bufferlist &entry, bufferlist *to, uint64_t const &start_ptr)
-{
-  assert(to != NULL);
-
-  uint32_t const entry_size = entry.length();
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    ::encode(sentinel, *to);
-  }
-  ::encode(entry_size, *to);
-  to->claim_append(entry);
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    ::encode(start_ptr, *to);
-  }
-
-  if (format >= JOURNAL_FORMAT_RESILIENT) {
-    return JOURNAL_ENVELOPE_RESILIENT + entry_size;
-  } else {
-    return JOURNAL_ENVELOPE_LEGACY + entry_size;
-  }
-}
-
-/**
- * set write error callback
- *
- * Set a callback/context to trigger if we get a write error from
- * the objecter.  This may be from an explicit request (e.g., flush)
- * or something async the journaler did on its own (e.g., journal
- * header update).
- *
- * It is only used once; if the caller continues to use the
- * Journaler and wants to hear about errors, it needs to reset the
- * error_handler.
- *
- * @param c callback/context to trigger on error
- */
-void Journaler::set_write_error_handler(Context *c) {
-  Mutex::Locker l(lock);
-  assert(!on_write_error);
-  on_write_error = wrap_finisher(c);
-}
-
-
-/**
- * Wrap a context in a C_OnFinisher, if it is non-NULL
- *
- * Utility function to avoid lots of error-prone and verbose
- * NULL checking on contexts passed in.
- */
-C_OnFinisher *Journaler::wrap_finisher(Context *c)
-{
-  if (c != NULL) {
-    return new C_OnFinisher(c, finisher);
-  } else {
-    return NULL;
-  }
-}
+// eof.
diff --git a/src/osdc/Journaler.h b/src/osdc/Journaler.h
index d642609..e3a5713 100644
--- a/src/osdc/Journaler.h
+++ b/src/osdc/Journaler.h
@@ -59,98 +59,44 @@
 class CephContext;
 class Context;
 class PerfCounters;
-class Finisher;
-class C_OnFinisher;
-
-typedef __u8 stream_format_t;
-
-// Legacy envelope is leading uint32_t size
-enum StreamFormat {
-    JOURNAL_FORMAT_LEGACY = 0,
-    JOURNAL_FORMAT_RESILIENT = 1,
-    // Insert new formats here, before COUNT
-    JOURNAL_FORMAT_COUNT
-};
-
-// Highest journal format version that we support
-#define JOURNAL_FORMAT_MAX (JOURNAL_FORMAT_COUNT - 1)
-
-// Legacy envelope is leading uint32_t size
-#define JOURNAL_ENVELOPE_LEGACY (sizeof(uint32_t))
-
-// Resilient envelope is leading uint64_t sentinel, uint32_t size, trailing uint64_t start_ptr
-#define JOURNAL_ENVELOPE_RESILIENT (sizeof(uint32_t) + sizeof(uint64_t) + sizeof(uint64_t))
-
-/**
- * Represents a collection of entries serialized in a byte stream.
- *
- * Each entry consists of:
- *  - a blob (used by the next level up as a serialized LogEvent)
- *  - a uint64_t (used by the next level up as a pointer to the start of the entry
- *    in the collection bytestream)
- */
-class JournalStream
-{
-  stream_format_t format;
-
-  public:
-  JournalStream(stream_format_t format_) : format(format_) {}
-
-  void set_format(stream_format_t format_) {format = format_;}
-
-  bool readable(bufferlist &bl, uint64_t *need) const;
-  size_t read(bufferlist &from, bufferlist *to, uint64_t *start_ptr);
-  size_t write(bufferlist &entry, bufferlist *to, uint64_t const &start_ptr);
-
-  // A magic number for the start of journal entries, so that we can
-  // identify them in damaged journals.
-  static const uint64_t sentinel = 0x3141592653589793;
-};
-
 
 class Journaler {
 public:
+  CephContext *cct;
   // this goes at the head of the log "file".
-  class Header {
-    public:
+  struct Header {
     uint64_t trimmed_pos;
     uint64_t expire_pos;
     uint64_t unused_field;
     uint64_t write_pos;
     string magic;
-    ceph_file_layout layout; //< The mapping from byte stream offsets to RADOS objects
-    stream_format_t stream_format; //< The encoding of LogEvents within the journal byte stream
+    ceph_file_layout layout;
 
     Header(const char *m="") :
-      trimmed_pos(0), expire_pos(0), unused_field(0), write_pos(0), magic(m), stream_format(-1) {
+      trimmed_pos(0), expire_pos(0), unused_field(0), write_pos(0),
+      magic(m) {
       memset(&layout, 0, sizeof(layout));
     }
 
     void encode(bufferlist &bl) const {
-      ENCODE_START(2, 2, bl);
+      __u8 struct_v = 1;
+      ::encode(struct_v, bl);
       ::encode(magic, bl);
       ::encode(trimmed_pos, bl);
       ::encode(expire_pos, bl);
       ::encode(unused_field, bl);
       ::encode(write_pos, bl);
       ::encode(layout, bl);
-      ::encode(stream_format, bl);
-      ENCODE_FINISH(bl);
     }
     void decode(bufferlist::iterator &bl) {
-      DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
+      __u8 struct_v;
+      ::decode(struct_v, bl);
       ::decode(magic, bl);
       ::decode(trimmed_pos, bl);
       ::decode(expire_pos, bl);
       ::decode(unused_field, bl);
       ::decode(write_pos, bl);
       ::decode(layout, bl);
-      if (struct_v > 1) {
-        ::decode(stream_format, bl);
-      } else {
-        stream_format = JOURNAL_FORMAT_LEGACY;
-      }
-      DECODE_FINISH(bl);
     }
 
     void dump(Formatter *f) const {
@@ -160,7 +106,6 @@ public:
 	f->dump_unsigned("write_pos", write_pos);
 	f->dump_unsigned("expire_pos", expire_pos);
 	f->dump_unsigned("trimmed_pos", trimmed_pos);
-	f->dump_unsigned("stream_format", stream_format);
 	f->open_object_section("layout");
 	{
 	  f->dump_unsigned("stripe_unit", layout.fl_stripe_unit);
@@ -178,38 +123,22 @@ public:
     static void generate_test_instances(list<Header*> &ls)
     {
       ls.push_back(new Header());
-
       ls.push_back(new Header());
       ls.back()->trimmed_pos = 1;
       ls.back()->expire_pos = 2;
       ls.back()->unused_field = 3;
       ls.back()->write_pos = 4;
       ls.back()->magic = "magique";
-
-      ls.push_back(new Header());
-      ls.back()->stream_format = JOURNAL_FORMAT_RESILIENT;
     }
-  };
+  } last_written, last_committed;
   WRITE_CLASS_ENCODER(Header)
 
-  uint32_t get_stream_format() const {
-    return stream_format;
-  }
-
-  Header last_committed;
-
 private:
   // me
-  CephContext *cct;
-  Mutex lock;
-  Finisher *finisher;
-  Header last_written;
   inodeno_t ino;
   int64_t pg_pool;
   bool readonly;
   ceph_file_layout layout;
-  uint32_t stream_format;
-  JournalStream journal_stream;
 
   const char *magic;
   Objecter *objecter;
@@ -220,28 +149,16 @@ private:
 
   SafeTimer *timer;
 
-  class C_DelayFlush;
-  friend class C_DelayFlush;
-
   class C_DelayFlush : public Context {
     Journaler *journaler;
-    public:
+  public:
     C_DelayFlush(Journaler *j) : journaler(j) {}
     void finish(int r) {
-      journaler->_do_delayed_flush();
+      journaler->delay_flush_event = 0;
+      journaler->_do_flush();
     }
   } *delay_flush_event;
 
-  /*
-   * Do a flush as a result of a C_DelayFlush context.
-   */
-  void _do_delayed_flush()
-  {
-    assert(delay_flush_event != NULL);
-    Mutex::Locker l(lock);
-    delay_flush_event = NULL;
-    _do_flush();
-  }
 
   // my state
   static const int STATE_UNDEF = 0;
@@ -254,27 +171,20 @@ private:
   int state;
   int error;
 
-  void _write_head(Context *oncommit=NULL);
-  void _wait_for_flush(Context *onsafe);
-  void _trim();
-
   // header
   utime_t last_wrote_head;
-  void _finish_write_head(int r, Header &wrote, C_OnFinisher *oncommit);
+  void _finish_write_head(int r, Header &wrote, Context *oncommit);
   class C_WriteHead;
   friend class C_WriteHead;
 
-  void _reread_head(Context *onfinish);
-  void _set_layout(ceph_file_layout const *l);
   list<Context*> waitfor_recover;
-  void _read_head(Context *on_finish, bufferlist *bl);
+  void read_head(Context *on_finish, bufferlist *bl);
   void _finish_read_head(int r, bufferlist& bl);
   void _finish_reread_head(int r, bufferlist& bl, Context *finish);
-  void _probe(Context *finish, uint64_t *end);
+  void probe(Context *finish, uint64_t *end);
   void _finish_probe_end(int r, uint64_t end);
-  void _reprobe(C_OnFinisher *onfinish);
-  void _finish_reprobe(int r, uint64_t end, C_OnFinisher *onfinish);
-  void _finish_reread_head_and_probe(int r, C_OnFinisher *onfinish);
+  void _finish_reprobe(int r, uint64_t end, Context *onfinish);
+  void _finish_reread_head_and_probe(int r, Context *onfinish);
   class C_ReadHead;
   friend class C_ReadHead;
   class C_ProbeEnd;
@@ -286,6 +196,8 @@ private:
   class C_RereadHeadProbe;
   friend class C_RereadHeadProbe;
 
+
+
   // writer
   uint64_t prezeroing_pos;
   uint64_t prezero_pos;     // we zero journal space ahead of write_pos to avoid problems with tail probing
@@ -299,7 +211,6 @@ private:
   std::set<uint64_t> pending_safe;
   std::map<uint64_t, std::list<Context*> > waitfor_safe; // when safe through given offset
 
-  void _flush(C_OnFinisher *onsafe);
   void _do_flush(unsigned amount=0);
   void _finish_flush(int r, uint64_t start, utime_t stamp);
   class C_Flush;
@@ -317,11 +228,11 @@ private:
   uint64_t temp_fetch_len;
 
   // for wait_for_readable()
-  C_OnFinisher    *on_readable;
-  C_OnFinisher    *on_write_error;
+  Context    *on_readable;
+
+  Context    *on_write_error;
 
   void _finish_read(int r, uint64_t offset, bufferlist &bl); // read completion callback
-  void _finish_retry_read(int r);
   void _assimilate_prefetch();
   void _issue_read(uint64_t len);  // read some more
   void _prefetch();             // maybe read ahead
@@ -334,13 +245,14 @@ private:
   uint64_t expire_pos;    // what we're allowed to trim to
   uint64_t trimming_pos;      // what we've requested to trim through
   uint64_t trimmed_pos;   // what has been trimmed
+  map<uint64_t, list<Context*> > waitfor_trim;
 
-  void _finish_trim(int r, uint64_t to);
+  void _trim_finish(int r, uint64_t to);
   class C_Trim;
   friend class C_Trim;
 
   void _issue_prezero();
-  void _finish_prezero(int r, uint64_t from, uint64_t len);
+  void _prezeroed(int r, uint64_t from, uint64_t len);
   friend struct C_Journaler_Prezero;
 
   // only init_headers when following or first reading off-disk
@@ -360,22 +272,10 @@ private:
    */
   void handle_write_error(int r);
 
-  bool _is_readable();
-
-  void _finish_erase(int data_result, C_OnFinisher *completion);
-  class C_EraseFinish;
-  friend class C_EraseFinish;
-
-  C_OnFinisher *wrap_finisher(Context *c);
-
 public:
-  Journaler(inodeno_t ino_, int64_t pool, const char *mag, Objecter *obj, PerfCounters *l, int lkey, SafeTimer *tim, Finisher *f) : 
-    last_committed(mag),
-    cct(obj->cct), lock("Journaler"), finisher(f),
-    last_written(mag),
-    ino(ino_), pg_pool(pool), readonly(true),
-    stream_format(-1), journal_stream(-1),
-    magic(mag),
+  Journaler(inodeno_t ino_, int64_t pool, const char *mag, Objecter *obj, PerfCounters *l, int lkey, SafeTimer *tim) : 
+    cct(obj->cct), last_written(mag), last_committed(mag),
+    ino(ino_), pg_pool(pool), readonly(true), magic(mag),
     objecter(obj), filer(objecter), logger(l), logger_key_lat(lkey),
     timer(tim), delay_flush_event(0),
     state(STATE_UNDEF), error(0),
@@ -384,22 +284,15 @@ public:
     read_pos(0), requested_pos(0), received_pos(0),
     fetch_len(0), temp_fetch_len(0),
     on_readable(0), on_write_error(NULL),
-    expire_pos(0), trimming_pos(0), trimmed_pos(0)
+    expire_pos(0), trimming_pos(0), trimmed_pos(0) 
   {
     memset(&layout, 0, sizeof(layout));
   }
 
-  /* reset
-   *  NOTE: we assume the caller knows/has ensured that any objects 
-   * in our sequence do not exist.. e.g. after a MKFS.  this is _not_
-   * an "erase" method.
-   */
   void reset() {
-    Mutex::Locker l(lock);
     assert(state == STATE_ACTIVE);
-
     readonly = true;
-    delay_flush_event = NULL;
+    delay_flush_event = 0;
     state = STATE_UNDEF;
     error = 0;
     prezeroing_pos = 0;
@@ -418,68 +311,89 @@ public:
     waiting_for_zero = false;
   }
 
-  // Asynchronous operations
-  // =======================
-  void erase(Context *completion);
-  void create(ceph_file_layout *layout, stream_format_t const sf);
+  // me
+  //void open(Context *onopen);
+  //void claim(Context *onclaim, msg_addr_t from);
+
+  /* reset 
+   *  NOTE: we assume the caller knows/has ensured that any objects 
+   * in our sequence do not exist.. e.g. after a MKFS.  this is _not_
+   * an "erase" method.
+   */
+  void create(ceph_file_layout *layout);
   void recover(Context *onfinish);
   void reread_head(Context *onfinish);
+  void reprobe(Context *onfinish);
   void reread_head_and_probe(Context *onfinish);
   void write_head(Context *onsave=0);
-  void wait_for_flush(Context *onsafe = 0);
-  void flush(Context *onsafe = 0);
-  void wait_for_readable(Context *onfinish);
 
-  // Synchronous setters
-  // ===================
-  void set_layout(ceph_file_layout const *l);
+  void set_layout(ceph_file_layout *l);
+
   void set_readonly();
   void set_writeable();
-  void set_write_pos(int64_t p) { 
-    Mutex::Locker l(lock);
-    prezeroing_pos = prezero_pos = write_pos = flush_pos = safe_pos = p;
-  }
+  bool is_readonly() { return readonly; }
+
+  bool is_active() { return state == STATE_ACTIVE; }
+  int get_error() { return error; }
+
+  uint64_t get_write_pos() const { return write_pos; }
+  uint64_t get_write_safe_pos() const { return safe_pos; }
+  uint64_t get_read_pos() const { return read_pos; }
+  uint64_t get_expire_pos() const { return expire_pos; }
+  uint64_t get_trimmed_pos() const { return trimmed_pos; }
+
+  uint64_t get_layout_period() const { return (uint64_t)layout.fl_stripe_count * (uint64_t)layout.fl_object_size; }
+  ceph_file_layout& get_layout() { return layout; }
+
+  // write
+  uint64_t append_entry(bufferlist& bl);
+  void wait_for_flush(Context *onsafe = 0);
+  void flush(Context *onsafe = 0);
+
+  // read
   void set_read_pos(int64_t p) { 
-    Mutex::Locker l(lock);
     assert(requested_pos == received_pos);  // we can't cope w/ in-progress read right now.
     read_pos = requested_pos = received_pos = p;
     read_buf.clear();
   }
-  uint64_t append_entry(bufferlist& bl);
-  void set_expire_pos(int64_t ep) {
-      Mutex::Locker l(lock);
-      expire_pos = ep;
+
+  bool _is_readable();
+  bool is_readable();
+  bool try_read_entry(bufferlist& bl);
+  void wait_for_readable(Context *onfinish);
+  
+  void set_write_pos(int64_t p) { 
+    prezeroing_pos = prezero_pos = write_pos = flush_pos = safe_pos = p;
   }
-  void set_trimmed_pos(int64_t p) {
-      Mutex::Locker l(lock);
-      trimming_pos = trimmed_pos = p;
+
+  /**
+   * set write error callback
+   *
+   * Set a callback/context to trigger if we get a write error from
+   * the objecter.  This may be from an explicit request (e.g., flush)
+   * or something async the journaler did on its own (e.g., journal
+   * header update).
+   *
+   * It is only used once; if the caller continues to use the
+   * Journaler and wants to hear about errors, it needs to reset the
+   * error_handler.
+   *
+   * @param c callback/context to trigger on error
+   */
+  void set_write_error_handler(Context *c) {
+    assert(!on_write_error);
+    on_write_error = c;
   }
 
+  // trim
+  void set_expire_pos(int64_t ep) { expire_pos = ep; }
+  void set_trimmed_pos(int64_t p) { trimming_pos = trimmed_pos = p; }
+
   void trim();
   void trim_tail() {
-    Mutex::Locker l(lock);
-
     assert(!readonly);
     _issue_prezero();
   }
-
-  void set_write_error_handler(Context *c);
-
-  // Synchronous getters
-  // ===================
-  // TODO: need some locks on reads for true safety
-  uint64_t get_layout_period() const { return (uint64_t)layout.fl_stripe_count * (uint64_t)layout.fl_object_size; }
-  ceph_file_layout& get_layout() { return layout; }
-  bool is_active() { return state == STATE_ACTIVE; }
-  int get_error() { return error; }
-  bool is_readonly() { return readonly; }
-  bool is_readable();
-  bool try_read_entry(bufferlist& bl);
-  uint64_t get_write_pos() const { return write_pos; }
-  uint64_t get_write_safe_pos() const { return safe_pos; }
-  uint64_t get_read_pos() const { return read_pos; }
-  uint64_t get_expire_pos() const { return expire_pos; }
-  uint64_t get_trimmed_pos() const { return trimmed_pos; }
 };
 WRITE_CLASS_ENCODER(Journaler::Header)
 
diff --git a/src/osdc/Makefile.am b/src/osdc/Makefile.am
index 3ba446b..3a8a216 100644
--- a/src/osdc/Makefile.am
+++ b/src/osdc/Makefile.am
@@ -7,6 +7,7 @@ libosdc_la_SOURCES = \
 noinst_LTLIBRARIES += libosdc.la
 
 noinst_HEADERS += \
+	osdc/Blinker.h \
 	osdc/Filer.h \
 	osdc/Journaler.h \
 	osdc/ObjectCacher.h \
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc
index 8455fb6..58fc6e5 100644
--- a/src/osdc/ObjectCacher.cc
+++ b/src/osdc/ObjectCacher.cc
@@ -213,6 +213,7 @@ int ObjectCacher::Object::map_read(OSDRead *rd,
 	  ldout(oc->cct, 20) << "map_read miss " << left << " left, " << *n << dendl;
 	}
         cur += left;
+        left = 0;
         assert(cur == (loff_t)ex_it->offset + (loff_t)ex_it->length);
         break;  // no more.
       }
@@ -530,7 +531,7 @@ ObjectCacher::~ObjectCacher()
   assert(bh_lru_rest.lru_get_size() == 0);
   assert(bh_lru_dirty.lru_get_size() == 0);
   assert(ob_lru.lru_get_size() == 0);
-  assert(dirty_or_tx_bh.empty());
+  assert(dirty_bh.empty());
 }
 
 void ObjectCacher::perf_start()
@@ -709,6 +710,9 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid,
       }
     }
 
+    ls.splice(ls.end(), waitfor_read);
+    waitfor_read.clear();
+
     // apply to bh's!
     loff_t opos = start;
     while (true) {
@@ -1110,13 +1114,26 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish,
       for (map<loff_t, BufferHead*>::iterator bh_it = missing.begin();
            bh_it != missing.end();
            ++bh_it) {
-        bh_read(bh_it->second);
-        if (success && onfinish) {
-          ldout(cct, 10) << "readx missed, waiting on " << *bh_it->second 
-                   << " off " << bh_it->first << dendl;
-	  bh_it->second->waitfor_read[bh_it->first].push_back( new C_RetryRead(this, rd, oset, onfinish) );
+        loff_t clean = get_stat_clean() + get_stat_rx() +
+                       bh_it->second->length();
+        if (get_stat_rx() > 0 && static_cast<uint64_t>(clean) > max_size) {
+          // cache is full -- wait for rx's to complete
+          ldout(cct, 10) << "readx missed, waiting on cache to free "
+                         << (clean - max_size) << " bytes" << dendl;
+          if (success) {
+            waitfor_read.push_back(new C_RetryRead(this, rd, oset, onfinish));
+          }
+          bh_remove(o, bh_it->second);
+          delete bh_it->second;
+        } else {
+          bh_read(bh_it->second);
+          if (success && onfinish) {
+            ldout(cct, 10) << "readx missed, waiting on " << *bh_it->second 
+                     << " off " << bh_it->first << dendl;
+	    bh_it->second->waitfor_read[bh_it->first].push_back( new C_RetryRead(this, rd, oset, onfinish) );
+          }
+          bytes_not_in_cache += bh_it->second->length();
         }
-        bytes_not_in_cache += bh_it->second->length();
 	success = false;
       }
 
@@ -1396,7 +1413,7 @@ int ObjectCacher::_wait_for_write(OSDWrite *wr, uint64_t len, ObjectSet *oset, M
   } else {
     // write-thru!  flush what we just wrote.
     Cond cond;
-    bool done = false;
+    bool done;
     Context *fin = block_writes_upfront ?
       new C_Cond(&cond, &done, &ret) : onfreespace;
     assert(fin);
@@ -1613,31 +1630,22 @@ bool ObjectCacher::flush_set(ObjectSet *oset, Context *onfinish)
 
   // we'll need to wait for all objects to flush!
   C_GatherBuilder gather(cct);
-  set<Object*> waitfor_commit;
-
-  set<BufferHead*>::iterator next, it;
-  next = it = dirty_or_tx_bh.begin();
-  while (it != dirty_or_tx_bh.end()) {
-    ++next;
-    BufferHead *bh = *it;
-    waitfor_commit.insert(bh->ob);
 
-    if (bh->is_dirty())
-      bh_write(bh);
-
-    it = next;
-  }
-
-  for (set<Object*>::iterator i = waitfor_commit.begin();
-       i != waitfor_commit.end(); ++i) {
+  for (xlist<Object*>::iterator i = oset->objects.begin();
+       !i.end(); ++i) {
     Object *ob = *i;
 
-    // we'll need to gather...
-    ldout(cct, 10) << "flush_set " << oset << " will wait for ack tid "
-             << ob->last_write_tid
-             << " on " << *ob
-             << dendl;
-    ob->waitfor_commit[ob->last_write_tid].push_back(gather.new_sub());
+    if (ob->dirty_or_tx == 0)
+      continue;
+
+    if (!flush(ob, 0, 0)) {
+      // we'll need to gather...
+      ldout(cct, 10) << "flush_set " << oset << " will wait for ack tid " 
+               << ob->last_write_tid 
+               << " on " << *ob
+               << dendl;
+      ob->waitfor_commit[ob->last_write_tid].push_back(gather.new_sub());
+    }
   }
 
   return _flush_set_finish(&gather, onfinish);
@@ -2006,28 +2014,17 @@ void ObjectCacher::bh_stat_sub(BufferHead *bh)
 void ObjectCacher::bh_set_state(BufferHead *bh, int s)
 {
   assert(lock.is_locked());
-  int state = bh->get_state();
   // move between lru lists?
-  if (s == BufferHead::STATE_DIRTY && state != BufferHead::STATE_DIRTY) {
+  if (s == BufferHead::STATE_DIRTY && bh->get_state() != BufferHead::STATE_DIRTY) {
     bh_lru_rest.lru_remove(bh);
     bh_lru_dirty.lru_insert_top(bh);
-  } else if (s != BufferHead::STATE_DIRTY && state == BufferHead::STATE_DIRTY) {
+    dirty_bh.insert(bh);
+  }
+  if (s != BufferHead::STATE_DIRTY && bh->get_state() == BufferHead::STATE_DIRTY) {
     bh_lru_dirty.lru_remove(bh);
     bh_lru_rest.lru_insert_top(bh);
+    dirty_bh.erase(bh);
   }
-
-  if ((s == BufferHead::STATE_TX ||
-       s == BufferHead::STATE_DIRTY) &&
-      state != BufferHead::STATE_TX &&
-      state != BufferHead::STATE_DIRTY) {
-    dirty_or_tx_bh.insert(bh);
-  } else if ((state == BufferHead::STATE_TX ||
-	      state == BufferHead::STATE_DIRTY) &&
-	     s != BufferHead::STATE_TX &&
-	     s != BufferHead::STATE_DIRTY) {
-    dirty_or_tx_bh.erase(bh);
-  }
-
   if (s != BufferHead::STATE_ERROR && bh->get_state() == BufferHead::STATE_ERROR) {
     bh->error = 0;
   }
@@ -2045,14 +2042,10 @@ void ObjectCacher::bh_add(Object *ob, BufferHead *bh)
   ob->add_bh(bh);
   if (bh->is_dirty()) {
     bh_lru_dirty.lru_insert_top(bh);
-    dirty_or_tx_bh.insert(bh);
+    dirty_bh.insert(bh);
   } else {
     bh_lru_rest.lru_insert_top(bh);
   }
-
-  if (bh->is_tx()) {
-    dirty_or_tx_bh.insert(bh);
-  }
   bh_stat_add(bh);
 }
 
@@ -2063,14 +2056,10 @@ void ObjectCacher::bh_remove(Object *ob, BufferHead *bh)
   ob->remove_bh(bh);
   if (bh->is_dirty()) {
     bh_lru_dirty.lru_remove(bh);
-    dirty_or_tx_bh.erase(bh);
+    dirty_bh.erase(bh);
   } else {
     bh_lru_rest.lru_remove(bh);
   }
-
-  if (bh->is_tx()) {
-    dirty_or_tx_bh.erase(bh);
-  }
   bh_stat_sub(bh);
 }
 
diff --git a/src/osdc/ObjectCacher.h b/src/osdc/ObjectCacher.h
index ca16138..5b93998 100644
--- a/src/osdc/ObjectCacher.h
+++ b/src/osdc/ObjectCacher.h
@@ -340,10 +340,11 @@ class ObjectCacher {
   void *flush_set_callback_arg;
 
   vector<ceph::unordered_map<sobject_t, Object*> > objects; // indexed by pool_id
+  list<Context*> waitfor_read;
 
   ceph_tid_t last_read_tid;
 
-  set<BufferHead*>    dirty_or_tx_bh;
+  set<BufferHead*>    dirty_bh;
   LRU   bh_lru_dirty, bh_lru_rest;
   LRU   ob_lru;
 
@@ -415,17 +416,17 @@ class ObjectCacher {
     bh_set_state(bh2, bh1->get_state());
   }
   
-  void mark_missing(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_MISSING); }
-  void mark_clean(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_CLEAN); }
-  void mark_zero(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_ZERO); }
-  void mark_rx(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_RX); }
-  void mark_tx(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_TX); }
-  void mark_error(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_ERROR); }
+  void mark_missing(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_MISSING); };
+  void mark_clean(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_CLEAN); };
+  void mark_zero(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_ZERO); };
+  void mark_rx(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_RX); };
+  void mark_tx(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_TX); };
+  void mark_error(BufferHead *bh) { bh_set_state(bh, BufferHead::STATE_ERROR); };
   void mark_dirty(BufferHead *bh) { 
     bh_set_state(bh, BufferHead::STATE_DIRTY); 
     bh_lru_dirty.lru_touch(bh);
     //bh->set_dirty_stamp(ceph_clock_now(g_ceph_context));
-  }
+  };
 
   void bh_add(Object *ob, BufferHead *bh);
   void bh_remove(Object *ob, BufferHead *bh);
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index e9d0ade..57954a5 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -136,14 +136,6 @@ static const char *config_keys[] = {
   NULL
 };
 
-Mutex *Objecter::OSDSession::get_lock(object_t& oid)
-{
-#define HASH_PRIME 1021
-  uint32_t h = ceph_str_hash_linux(oid.name.c_str(), oid.name.size()) % HASH_PRIME;
-
-  return completion_locks[h % num_locks];
-}
-
 const char** Objecter::get_tracked_conf_keys() const
 {
   return config_keys;
@@ -168,12 +160,9 @@ void Objecter::handle_conf_change(const struct md_config_t *conf,
 
 // messages ------------------------------
 
-/*
- * initialize only internal data structures, don't initiate cluster interaction
- */
-void Objecter::init()
+void Objecter::init_unlocked()
 {
-  assert(!initialized.read());
+  assert(!initialized);
 
   if (!logger) {
     PerfCountersBuilder pcb(cct, "objecter", l_osdc_first, l_osdc_last);
@@ -259,42 +248,29 @@ void Objecter::init()
 					   "objecter_requests",
 					   m_request_state_hook,
 					   "show in-progress osd requests");
-
-  /* Don't warn on EEXIST, happens if multiple ceph clients
-   * are instantiated from one process */
-  if (ret < 0 && ret != -EEXIST) {
+  if (ret < 0) {
     lderr(cct) << "error registering admin socket command: "
 	       << cpp_strerror(ret) << dendl;
   }
-
-  timer_lock.Lock();
-  timer.init();
-  timer_lock.Unlock();
-
-  initialized.set(1);
 }
 
-/*
- * ok, cluster interaction can happen
- */
-void Objecter::start()
+void Objecter::init_locked()
 {
-  RWLock::RLocker rl(rwlock);
+  assert(client_lock.is_locked());
+  assert(!initialized);
 
   schedule_tick();
-  if (osdmap->get_epoch() == 0) {
-    int r = _maybe_request_map();
-    assert (r == 0 || osdmap->get_epoch() > 0);
-  }
+  if (osdmap->get_epoch() == 0)
+    maybe_request_map();
+
+  initialized = true;
 }
 
-void Objecter::shutdown()
+void Objecter::shutdown_locked() 
 {
-  assert(initialized.read());
-
-  rwlock.get_write();
-
-  initialized.set(0);
+  assert(client_lock.is_locked());
+  assert(initialized);
+  initialized = false;
 
   map<int,OSDSession*>::iterator p;
   while (!osd_sessions.empty()) {
@@ -302,85 +278,14 @@ void Objecter::shutdown()
     close_session(p->second);
   }
 
-  while(!check_latest_map_lingers.empty()) {
-    map<uint64_t, LingerOp*>::iterator i = check_latest_map_lingers.begin();
-    i->second->put();
-    check_latest_map_lingers.erase(i->first);
-  }
-
-  while(!check_latest_map_ops.empty()) {
-    map<ceph_tid_t, Op*>::iterator i = check_latest_map_ops.begin();
-    i->second->put();
-    check_latest_map_ops.erase(i->first);
-  }
-
-  while(!check_latest_map_commands.empty()) {
-    map<ceph_tid_t, CommandOp*>::iterator i = check_latest_map_commands.begin();
-    i->second->put();
-    check_latest_map_commands.erase(i->first);
-  }
-
-  while(!poolstat_ops.empty()) {
-    map<ceph_tid_t,PoolStatOp*>::iterator i = poolstat_ops.begin();
-    delete i->second;
-    poolstat_ops.erase(i->first);
-  }
-
-  while(!statfs_ops.empty()) {
-    map<ceph_tid_t, StatfsOp*>::iterator i = statfs_ops.begin();
-    delete i->second;
-    statfs_ops.erase(i->first);
-  }
-
-  while(!pool_ops.empty()) {
-    map<ceph_tid_t, PoolOp*>::iterator i = pool_ops.begin();
-    delete i->second;
-    pool_ops.erase(i->first);
-  }
-
-  ldout(cct, 20) << __func__ << " clearing up homeless session..." << dendl;
-  while(!homeless_session->linger_ops.empty()) {
-    std::map<uint64_t, LingerOp*>::iterator i = homeless_session->linger_ops.begin();
-    ldout(cct, 10) << " linger_op " << i->first << dendl;
-    LingerOp *lop = i->second;
-    {
-      RWLock::WLocker wl(homeless_session->lock);
-      _session_linger_op_remove(homeless_session, lop);
-    }
-    linger_ops.erase(lop->linger_id);
-    lop->put();
-  }
-
-  while(!homeless_session->ops.empty()) {
-    std::map<ceph_tid_t, Op*>::iterator i = homeless_session->ops.begin();
-    ldout(cct, 10) << " op " << i->first << dendl;
-    Op *op = i->second;
-    {
-      RWLock::WLocker wl(homeless_session->lock);
-      _session_op_remove(homeless_session, op);
-    }
-    op->put();
-  }
-
-  while(!homeless_session->command_ops.empty()) {
-    std::map<ceph_tid_t, CommandOp*>::iterator i = homeless_session->command_ops.begin();
-    ldout(cct, 10) << " command_op " << i->first << dendl;
-    CommandOp *cop = i->second;
-    {
-      RWLock::WLocker wl(homeless_session->lock);
-      _session_command_op_remove(homeless_session, cop);
-    }
-    cop->put();
-  }
-
   if (tick_event) {
-    Mutex::Locker l(timer_lock);
-    if (timer.cancel_event(tick_event)) {
-      ldout(cct, 10) <<  " successfully canceled tick" << dendl;
-      tick_event = NULL;
-    }
+    timer.cancel_event(tick_event);
+    tick_event = NULL;
   }
+}
 
+void Objecter::shutdown_unlocked()
+{
   if (m_request_state_hook) {
     AdminSocket* admin_socket = cct->get_admin_socket();
     admin_socket->unregister_command("objecter_requests");
@@ -393,28 +298,13 @@ void Objecter::shutdown()
     delete logger;
     logger = NULL;
   }
-
-  // Let go of Objecter write lock so timer thread can shutdown
-  rwlock.unlock();
-
-  {
-    Mutex::Locker l(timer_lock);
-    timer.shutdown();
-  }
-
-  assert(tick_event == NULL);
 }
 
-void Objecter::_send_linger(LingerOp *info)
+void Objecter::send_linger(LingerOp *info)
 {
-  assert(rwlock.is_wlocked());
-
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
-
   ldout(cct, 15) << "send_linger " << info->linger_id << dendl;
   vector<OSDOp> opv = info->ops; // need to pass a copy to ops
-  Context *onack = (!info->registered && info->on_reg_ack) ?
-    new C_Linger_Ack(this, info) : NULL;
+  Context *onack = (!info->registered && info->on_reg_ack) ? new C_Linger_Ack(this, info) : NULL;
   Context *oncommit = new C_Linger_Commit(this, info);
   Op *o = new Op(info->target.base_oid, info->target.base_oloc,
 		 opv, info->target.flags | CEPH_OSD_FLAG_READ,
@@ -424,26 +314,38 @@ void Objecter::_send_linger(LingerOp *info)
   o->snapc = info->snapc;
   o->mtime = info->mtime;
 
-  o->target = info->target;
-  o->tid = last_tid.inc();
-
   // do not resend this; we will send a new op to reregister
   o->should_resend = false;
 
+  if (info->session) {
+    int r = recalc_op_target(o);
+    if (r == RECALC_OP_TARGET_POOL_DNE) {
+      _send_linger_map_check(info);
+    }
+  }
+
   if (info->register_tid) {
     // repeat send.  cancel old registeration op, if any.
-    info->session->lock.get_write();
-    if (info->session->ops.count(info->register_tid)) {
-      Op *o = info->session->ops[info->register_tid];
-      _op_cancel_map_check(o);
-      _cancel_linger_op(o);
+    if (ops.count(info->register_tid)) {
+      Op *o = ops[info->register_tid];
+      op_cancel_map_check(o);
+      cancel_linger_op(o);
     }
-    info->session->lock.unlock();
-
-    info->register_tid = _op_submit(o, lc);
+    info->register_tid = _op_submit(o);
   } else {
     // first send
-    info->register_tid = _op_submit_with_budget(o, lc);
+    // populate info->pgid and info->acting so we
+    // don't resend the linger op on the next osdmap update
+    recalc_linger_op_target(info);
+    info->register_tid = op_submit(o);
+  }
+
+  OSDSession *s = o->session;
+  if (info->session != s) {
+    info->session_item.remove_myself();
+    info->session = s;
+    if (info->session)
+      s->linger_ops.push_back(&info->session_item);
   }
 
   logger->inc(l_osdc_linger_send);
@@ -473,28 +375,13 @@ void Objecter::_linger_commit(LingerOp *info, int r)
 
 void Objecter::unregister_linger(uint64_t linger_id)
 {
-  RWLock::WLocker wl(rwlock);
-  _unregister_linger(linger_id);
-}
-
-void Objecter::_unregister_linger(uint64_t linger_id)
-{
-  assert(rwlock.is_wlocked());
-  ldout(cct, 20) << __func__ << " linger_id=" << linger_id << dendl;
-
   map<uint64_t, LingerOp*>::iterator iter = linger_ops.find(linger_id);
   if (iter != linger_ops.end()) {
     LingerOp *info = iter->second;
-    OSDSession *s = info->session;
-    s->lock.get_write();
-    _session_linger_op_remove(s, info);
-    s->lock.unlock();
-
+    info->session_item.remove_myself();
     linger_ops.erase(iter);
-    info->canceled = true;
     info->put();
-
-    logger->dec(l_osdc_linger_active);
+    logger->set(l_osdc_linger_active, linger_ops.size());
   }
 }
 
@@ -520,9 +407,13 @@ ceph_tid_t Objecter::linger_mutate(const object_t& oid, const object_locator_t&
   info->on_reg_ack = onack;
   info->on_reg_commit = oncommit;
 
-  RWLock::WLocker wl(rwlock);
-  _linger_submit(info);
-  logger->inc(l_osdc_linger_active);
+  info->linger_id = ++max_linger_id;
+  linger_ops[info->linger_id] = info;
+
+  logger->set(l_osdc_linger_active, linger_ops.size());
+
+  send_linger(info);
+
   return info->linger_id;
 }
 
@@ -538,107 +429,69 @@ ceph_tid_t Objecter::linger_read(const object_t& oid, const object_locator_t& ol
   if (info->target.base_oloc.key == oid)
     info->target.base_oloc.key.clear();
   info->snap = snap;
-  info->target.flags = flags | CEPH_OSD_FLAG_READ;
+  info->target.flags = flags;
   info->ops = op.ops;
   info->inbl = inbl;
   info->poutbl = poutbl;
   info->pobjver = objver;
   info->on_reg_commit = onfinish;
 
-  RWLock::WLocker wl(rwlock);
-  _linger_submit(info);
-  logger->inc(l_osdc_linger_active);
-  return info->linger_id;
-}
-
-void Objecter::_linger_submit(LingerOp *info)
-{
-  assert(rwlock.is_wlocked());
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
-
-  // Acquire linger ID
   info->linger_id = ++max_linger_id;
-  ldout(cct, 10) << __func__ << " info " << info
-		 << " linger_id " << info->linger_id << dendl;
   linger_ops[info->linger_id] = info;
 
-  // Populate Op::target
-  OSDSession *s = NULL;
-  _calc_target(&info->target);
+  logger->set(l_osdc_linger_active, linger_ops.size());
 
-  // Create LingerOp<->OSDSession relation
-  int r = _get_session(info->target.osd, &s, lc);
-  assert(r == 0);
-  s->lock.get_write();
-  _session_linger_op_assign(s, info);
-  s->lock.unlock();
-  put_session(s);
+  send_linger(info);
 
-  _send_linger(info);
+  return info->linger_id;
 }
 
-bool Objecter::ms_dispatch(Message *m)
+void Objecter::dispatch(Message *m)
 {
-  ldout(cct, 10) << __func__ << " " << cct << " " << *m << dendl;
-  if (!initialized.read())
-    return false;
-
   switch (m->get_type()) {
-    // these we exlusively handle
   case CEPH_MSG_OSD_OPREPLY:
     handle_osd_op_reply(static_cast<MOSDOpReply*>(m));
-    return true;
-
-  case MSG_COMMAND_REPLY:
-    handle_command_reply(static_cast<MCommandReply*>(m));
-    return true;
+    break;
+    
+  case CEPH_MSG_OSD_MAP:
+    handle_osd_map(static_cast<MOSDMap*>(m));
+    break;
 
   case MSG_GETPOOLSTATSREPLY:
     handle_get_pool_stats_reply(static_cast<MGetPoolStatsReply*>(m));
-    return true;
-
-  case CEPH_MSG_POOLOP_REPLY:
-    handle_pool_op_reply(static_cast<MPoolOpReply*>(m));
-    return true;
+    break;
 
   case CEPH_MSG_STATFS_REPLY:
     handle_fs_stats_reply(static_cast<MStatfsReply*>(m));
-    return true;
+    break;
 
-    // these we give others a chance to inspect
+  case CEPH_MSG_POOLOP_REPLY:
+    handle_pool_op_reply(static_cast<MPoolOpReply*>(m));
+    break;
 
-    // MDS, OSD
-  case CEPH_MSG_OSD_MAP:
-    handle_osd_map(static_cast<MOSDMap*>(m));
-    return false;
+  case MSG_COMMAND_REPLY:
+    handle_command_reply(static_cast<MCommandReply*>(m));
+    break;
+
+  default:
+    ldout(cct, 0) << "don't know message type " << m->get_type() << dendl;
+    assert(0);
   }
-  return false;
 }
 
-void Objecter::_scan_requests(OSDSession *s,
-                             bool force_resend,
+void Objecter::scan_requests(bool force_resend,
 			     bool force_resend_writes,
 			     map<ceph_tid_t, Op*>& need_resend,
 			     list<LingerOp*>& need_resend_linger,
 			     map<ceph_tid_t, CommandOp*>& need_resend_command)
 {
-  assert(rwlock.is_wlocked());
-
-  list<uint64_t> unregister_lingers;
-
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
-
-  s->lock.get_write();
-
   // check for changed linger mappings (_before_ regular ops)
-  map<ceph_tid_t,LingerOp*>::iterator lp = s->linger_ops.begin();
-  while (lp != s->linger_ops.end()) {
+  map<ceph_tid_t,LingerOp*>::iterator lp = linger_ops.begin();
+  while (lp != linger_ops.end()) {
     LingerOp *op = lp->second;
-    assert(op->session == s);
     ++lp;   // check_linger_pool_dne() may touch linger_ops; prevent iterator invalidation
     ldout(cct, 10) << " checking linger op " << op->linger_id << dendl;
-    bool unregister;
-    int r = _recalc_linger_op_target(op, lc);
+    int r = recalc_linger_op_target(op);
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
       if (!force_resend && !force_resend_writes)
@@ -646,25 +499,21 @@ void Objecter::_scan_requests(OSDSession *s,
       // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
       need_resend_linger.push_back(op);
-      _linger_cancel_map_check(op);
+      linger_cancel_map_check(op);
       break;
     case RECALC_OP_TARGET_POOL_DNE:
-      _check_linger_pool_dne(op, &unregister);
-      if (unregister) {
-        ldout(cct, 10) << " need to unregister linger op " << op->linger_id << dendl;
-        unregister_lingers.push_back(op->linger_id);
-      }
+      check_linger_pool_dne(op);
       break;
     }
   }
 
   // check for changed request mappings
-  map<ceph_tid_t,Op*>::iterator p = s->ops.begin();
-  while (p != s->ops.end()) {
+  map<ceph_tid_t,Op*>::iterator p = ops.begin();
+  while (p != ops.end()) {
     Op *op = p->second;
     ++p;   // check_op_pool_dne() may touch ops; prevent iterator invalidation
     ldout(cct, 10) << " checking op " << op->tid << dendl;
-    int r = _calc_target(&op->target);
+    int r = recalc_op_target(op);
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
       if (!force_resend &&
@@ -672,25 +521,22 @@ void Objecter::_scan_requests(OSDSession *s,
 	break;
       // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
-      if (op->session) {
-	_session_op_remove(op->session, op);
-      }
       need_resend[op->tid] = op;
-      _op_cancel_map_check(op);
+      op_cancel_map_check(op);
       break;
     case RECALC_OP_TARGET_POOL_DNE:
-      _check_op_pool_dne(op, true);
+      check_op_pool_dne(op);
       break;
     }
   }
 
   // commands
-  map<ceph_tid_t,CommandOp*>::iterator cp = s->command_ops.begin();
-  while (cp != s->command_ops.end()) {
+  map<ceph_tid_t,CommandOp*>::iterator cp = command_ops.begin();
+  while (cp != command_ops.end()) {
     CommandOp *c = cp->second;
     ++cp;
     ldout(cct, 10) << " checking command " << c->tid << dendl;
-    int r = _calc_command_target(c);
+    int r = recalc_command_target(c);
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
       // resend if skipped map; otherwise do nothing.
@@ -699,37 +545,26 @@ void Objecter::_scan_requests(OSDSession *s,
       // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
       need_resend_command[c->tid] = c;
-      if (c->session) {
-        _session_command_op_remove(c->session, c);
-      }
-      _command_cancel_map_check(c);
+      command_cancel_map_check(c);
       break;
     case RECALC_OP_TARGET_POOL_DNE:
     case RECALC_OP_TARGET_OSD_DNE:
     case RECALC_OP_TARGET_OSD_DOWN:
-      _check_command_map_dne(c);
+      check_command_map_dne(c);
       break;
     }     
   }
-
-  s->lock.unlock();
-
-  for (list<uint64_t>::iterator iter = unregister_lingers.begin(); iter != unregister_lingers.end(); ++iter) {
-    _unregister_linger(*iter);
-  }
 }
 
 void Objecter::handle_osd_map(MOSDMap *m)
 {
-  assert(initialized.read());
-
-  RWLock::WLocker wl(rwlock);
-
+  assert(client_lock.is_locked());
+  assert(initialized);
   assert(osdmap); 
 
   if (m->fsid != monc->get_fsid()) {
-    ldout(cct, 0) << "handle_osd_map fsid " << m->fsid
-		  << " != " << monc->get_fsid() << dendl;
+    ldout(cct, 0) << "handle_osd_map fsid " << m->fsid << " != " << monc->get_fsid() << dendl;
+    m->put();
     return;
   }
 
@@ -745,7 +580,8 @@ void Objecter::handle_osd_map(MOSDMap *m)
     ldout(cct, 3) << "handle_osd_map ignoring epochs [" 
             << m->get_first() << "," << m->get_last() 
             << "] <= " << osdmap->get_epoch() << dendl;
-  } else {
+  } 
+  else {
     ldout(cct, 3) << "handle_osd_map got epochs [" 
             << m->get_first() << "," << m->get_last() 
             << "] > " << osdmap->get_epoch()
@@ -760,8 +596,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
  
 	if (osdmap->get_epoch() == e-1 &&
 	    m->incremental_maps.count(e)) {
-	  ldout(cct, 3) << "handle_osd_map decoding incremental epoch " << e
-			<< dendl;
+	  ldout(cct, 3) << "handle_osd_map decoding incremental epoch " << e << dendl;
 	  OSDMap::Incremental inc(m->incremental_maps[e]);
 	  osdmap->apply_incremental(inc);
 	  logger->inc(l_osdc_map_inc);
@@ -773,14 +608,11 @@ void Objecter::handle_osd_map(MOSDMap *m)
 	}
 	else {
 	  if (e && e > m->get_oldest()) {
-	    ldout(cct, 3) << "handle_osd_map requesting missing epoch "
-			  << osdmap->get_epoch()+1 << dendl;
-	    int r = _maybe_request_map();
-            assert(r == 0);
+	    ldout(cct, 3) << "handle_osd_map requesting missing epoch " << osdmap->get_epoch()+1 << dendl;
+	    maybe_request_map();
 	    break;
 	  }
-	  ldout(cct, 3) << "handle_osd_map missing epoch "
-			<< osdmap->get_epoch()+1
+	  ldout(cct, 3) << "handle_osd_map missing epoch " << osdmap->get_epoch()+1
 			<< ", jumping to " << m->get_oldest() << dendl;
 	  e = m->get_oldest() - 1;
 	  skipped_map = true;
@@ -789,21 +621,18 @@ void Objecter::handle_osd_map(MOSDMap *m)
 	logger->set(l_osdc_map_epoch, osdmap->get_epoch());
 
 	was_full = was_full || osdmap_full_flag();
-	_scan_requests(homeless_session, skipped_map, was_full,
-		       need_resend, need_resend_linger,
-		       need_resend_command);
+	scan_requests(skipped_map, was_full, need_resend, need_resend_linger,
+		      need_resend_command);
 
 	// osd addr changes?
 	for (map<int,OSDSession*>::iterator p = osd_sessions.begin();
 	     p != osd_sessions.end(); ) {
 	  OSDSession *s = p->second;
-	  _scan_requests(s, skipped_map, was_full,
-			 need_resend, need_resend_linger,
-			 need_resend_command);
 	  ++p;
-	  if (!osdmap->is_up(s->osd) ||
-	      (s->con &&
-	       s->con->get_peer_addr() != osdmap->get_inst(s->osd).addr)) {
+	  if (osdmap->is_up(s->osd)) {
+	    if (s->con && s->con->get_peer_addr() != osdmap->get_inst(s->osd).addr)
+	      close_session(s);
+	  } else {
 	    close_session(s);
 	  }
 	}
@@ -814,22 +643,13 @@ void Objecter::handle_osd_map(MOSDMap *m)
     } else {
       // first map.  we want the full thing.
       if (m->maps.count(m->get_last())) {
-        for (map<int,OSDSession*>::iterator p = osd_sessions.begin();
-	     p != osd_sessions.end(); ++p) {
-	  OSDSession *s = p->second;
-	  _scan_requests(s, false, false, need_resend, need_resend_linger,
-			 need_resend_command);
-        }
-	ldout(cct, 3) << "handle_osd_map decoding full epoch "
-		      << m->get_last() << dendl;
+	ldout(cct, 3) << "handle_osd_map decoding full epoch " << m->get_last() << dendl;
 	osdmap->decode(m->maps[m->get_last()]);
 
-	_scan_requests(homeless_session, false, false,
-		       need_resend, need_resend_linger,
-		       need_resend_command);
+	scan_requests(false, false, need_resend, need_resend_linger,
+		      need_resend_command);
       } else {
-	ldout(cct, 3) << "handle_osd_map hmm, i want a full map, requesting"
-		      << dendl;
+	ldout(cct, 3) << "handle_osd_map hmm, i want a full map, requesting" << dendl;
 	monc->sub_want("osdmap", 0, CEPH_SUBSCRIBE_ONETIME);
 	monc->renew_subs();
       }
@@ -840,68 +660,36 @@ void Objecter::handle_osd_map(MOSDMap *m)
   bool pausewr = osdmap->test_flag(CEPH_OSDMAP_PAUSEWR) || osdmap_full_flag();
 
   // was/is paused?
-  if (was_pauserd || was_pausewr || pauserd || pausewr) {
-    int r = _maybe_request_map();
-    assert(r == 0);
-  }
-
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
+  if (was_pauserd || was_pausewr || pauserd || pausewr)
+    maybe_request_map();
 
   // resend requests
-  for (map<ceph_tid_t, Op*>::iterator p = need_resend.begin();
-       p != need_resend.end(); ++p) {
+  for (map<ceph_tid_t, Op*>::iterator p = need_resend.begin(); p != need_resend.end(); ++p) {
     Op *op = p->second;
-    OSDSession *s = op->session;
-    bool mapped_session = false;
-    if (!s) {
-      int r = _map_session(&op->target, &s, lc);
-      assert(r == 0);
-      mapped_session = true;
-    } else {
-      get_session(s);
-    }
-    s->lock.get_write();
-    if (mapped_session) {
-      _session_op_assign(s, op);
-    }
     if (op->should_resend) {
-      if (!op->session->is_homeless() && !op->target.paused) {
+      if (op->session && !op->target.paused) {
 	logger->inc(l_osdc_op_resend);
-	_send_op(op);
+	send_op(op);
       }
     } else {
-      _cancel_linger_op(op);
+      cancel_linger_op(op);
     }
-    s->lock.unlock();
-    put_session(s);
   }
-  for (list<LingerOp*>::iterator p = need_resend_linger.begin();
-       p != need_resend_linger.end(); ++p) {
+  for (list<LingerOp*>::iterator p = need_resend_linger.begin(); p != need_resend_linger.end(); ++p) {
     LingerOp *op = *p;
-    if (!op->session) {
-      _calc_target(&op->target);
-      OSDSession *s = NULL;
-      int const r = _get_session(op->target.osd, &s, lc);
-      assert(r == 0);
-      assert(s != NULL);
-      op->session = s;
-      put_session(s);
-    }
-    if (!op->session->is_homeless()) {
+    if (op->session) {
       logger->inc(l_osdc_linger_resend);
-      _send_linger(op);
+      send_linger(op);
     }
   }
-  for (map<ceph_tid_t,CommandOp*>::iterator p = need_resend_command.begin();
-       p != need_resend_command.end(); ++p) {
+  for (map<ceph_tid_t,CommandOp*>::iterator p = need_resend_command.begin(); p != need_resend_command.end(); ++p) {
     CommandOp *c = p->second;
-    _assign_command_session(c);
-    if (c->session && !c->session->is_homeless()) {
+    if (c->session) {
       _send_command(c);
     }
   }
 
-  _dump_active();
+  dump_active();
   
   // finish any Contexts that were waiting on a map update
   map<epoch_t,list< pair< Context*, int > > >::iterator p =
@@ -916,12 +704,12 @@ void Objecter::handle_osd_map(MOSDMap *m)
     waiting_for_map.erase(p++);
   }
 
+  m->put();
+
   monc->sub_got("osdmap", osdmap->get_epoch());
 
-  if (!waiting_for_map.empty()) {
-    int r = _maybe_request_map();
-    assert(r == 0);
-  }
+  if (!waiting_for_map.empty())
+    maybe_request_map();
 }
 
 // op pool check
@@ -934,7 +722,7 @@ void Objecter::C_Op_Map_Latest::finish(int r)
   lgeneric_subdout(objecter->cct, objecter, 10) << "op_map_latest r=" << r << " tid=" << tid
 						<< " latest " << latest << dendl;
 
-  RWLock::WLocker wl(objecter->rwlock);
+  Mutex::Locker l(objecter->client_lock);
 
   map<ceph_tid_t, Op*>::iterator iter =
     objecter->check_latest_map_ops.find(tid);
@@ -951,68 +739,11 @@ void Objecter::C_Op_Map_Latest::finish(int r)
   if (op->map_dne_bound == 0)
     op->map_dne_bound = latest;
 
-  objecter->_check_op_pool_dne(op, false);
-
-  op->put();
-}
-
-int Objecter::pool_snap_by_name(int64_t poolid, const char *snap_name, snapid_t *snap)
-{
-  RWLock::RLocker rl(rwlock);
-
-  const map<int64_t, pg_pool_t>& pools = osdmap->get_pools();
-  map<int64_t, pg_pool_t>::const_iterator iter = pools.find(poolid);
-  if (iter == pools.end()) {
-    return -ENOENT;
-  }
-  const pg_pool_t& pg_pool = iter->second;
-  map<snapid_t, pool_snap_info_t>::const_iterator p;
-  for (p = pg_pool.snaps.begin();
-       p != pg_pool.snaps.end();
-       ++p) {
-    if (p->second.name == snap_name) {
-      *snap = p->first;
-      return 0;
-    }
-  }
-  return -ENOENT;
-}
-
-int Objecter::pool_snap_get_info(int64_t poolid, snapid_t snap, pool_snap_info_t *info)
-{
-  RWLock::RLocker rl(rwlock);
-
-  const map<int64_t, pg_pool_t>& pools = osdmap->get_pools();
-  map<int64_t, pg_pool_t>::const_iterator iter = pools.find(poolid);
-  if (iter == pools.end()) {
-    return -ENOENT;
-  }
-  const pg_pool_t& pg_pool = iter->second;
-  map<snapid_t,pool_snap_info_t>::const_iterator p = pg_pool.snaps.find(snap);
-  if (p == pg_pool.snaps.end())
-    return -ENOENT;
-  *info = p->second;
-
-  return 0;
-}
-
-int Objecter::pool_snap_list(int64_t poolid, vector<uint64_t> *snaps)
-{
-  RWLock::RLocker rl(rwlock);
-
-  const pg_pool_t *pi = osdmap->get_pg_pool(poolid);
-  for (map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.begin();
-       p != pi->snaps.end();
-       ++p) {
-    snaps->push_back(p->first);
-  }
-  return 0;
+  objecter->check_op_pool_dne(op);
 }
 
-void Objecter::_check_op_pool_dne(Op *op, bool session_locked)
+void Objecter::check_op_pool_dne(Op *op)
 {
-  assert(rwlock.is_wlocked());
-
   ldout(cct, 10) << "check_op_pool_dne tid " << op->tid
 		 << " current " << osdmap->get_epoch()
 		 << " map_dne_bound " << op->map_dne_bound
@@ -1029,17 +760,9 @@ void Objecter::_check_op_pool_dne(Op *op, bool session_locked)
       if (op->oncommit) {
 	op->oncommit->complete(-ENOENT);
       }
-
-      OSDSession *s = op->session;
-      assert(s != NULL);
-
-      if (!session_locked) {
-        s->lock.get_write();
-      }
-      _finish_op(op);
-      if (!session_locked) {
-        s->lock.unlock();
-      }
+      op->session_item.remove_myself();
+      ops.erase(op->tid);
+      delete op;
     }
   } else {
     _send_op_map_check(op);
@@ -1048,24 +771,21 @@ void Objecter::_check_op_pool_dne(Op *op, bool session_locked)
 
 void Objecter::_send_op_map_check(Op *op)
 {
-  assert(rwlock.is_wlocked());
+  assert(client_lock.is_locked());
   // ask the monitor
   if (check_latest_map_ops.count(op->tid) == 0) {
-    op->get();
     check_latest_map_ops[op->tid] = op;
     C_Op_Map_Latest *c = new C_Op_Map_Latest(this, op->tid);
     monc->get_version("osdmap", &c->latest, NULL, c);
   }
 }
 
-void Objecter::_op_cancel_map_check(Op *op)
+void Objecter::op_cancel_map_check(Op *op)
 {
-  assert(rwlock.is_wlocked());
+  assert(client_lock.is_locked());
   map<ceph_tid_t, Op*>::iterator iter =
     check_latest_map_ops.find(op->tid);
   if (iter != check_latest_map_ops.end()) {
-    Op *op = iter->second;
-    op->put();
     check_latest_map_ops.erase(iter);
   }
 }
@@ -1079,7 +799,7 @@ void Objecter::C_Linger_Map_Latest::finish(int r)
     return;
   }
 
-  RWLock::WLocker wl(objecter->rwlock);
+  Mutex::Locker l(objecter->client_lock);
 
   map<uint64_t, LingerOp*>::iterator iter =
     objecter->check_latest_map_lingers.find(linger_id);
@@ -1089,27 +809,17 @@ void Objecter::C_Linger_Map_Latest::finish(int r)
 
   LingerOp *op = iter->second;
   objecter->check_latest_map_lingers.erase(iter);
+  op->put();
 
   if (op->map_dne_bound == 0)
     op->map_dne_bound = latest;
 
-  bool unregister;
-  objecter->_check_linger_pool_dne(op, &unregister);
-
-  if (unregister) {
-    objecter->_unregister_linger(op->linger_id);
-  }
-
-  op->put();
+  objecter->check_linger_pool_dne(op);
 }
 
-void Objecter::_check_linger_pool_dne(LingerOp *op, bool *need_unregister)
+void Objecter::check_linger_pool_dne(LingerOp *op)
 {
-  assert(rwlock.is_wlocked());
-
-  *need_unregister = false;
-
-  ldout(cct, 10) << "_check_linger_pool_dne linger_id " << op->linger_id
+  ldout(cct, 10) << "check_linger_pool_dne linger_id " << op->linger_id
 		 << " current " << osdmap->get_epoch()
 		 << " map_dne_bound " << op->map_dne_bound
 		 << dendl;
@@ -1121,7 +831,7 @@ void Objecter::_check_linger_pool_dne(LingerOp *op, bool *need_unregister)
       if (op->on_reg_commit) {
 	op->on_reg_commit->complete(-ENOENT);
       }
-      *need_unregister = true;
+      unregister_linger(op->linger_id);
     }
   } else {
     _send_linger_map_check(op);
@@ -1139,10 +849,8 @@ void Objecter::_send_linger_map_check(LingerOp *op)
   }
 }
 
-void Objecter::_linger_cancel_map_check(LingerOp *op)
+void Objecter::linger_cancel_map_check(LingerOp *op)
 {
-  assert(rwlock.is_wlocked());
-
   map<uint64_t, LingerOp*>::iterator iter =
     check_latest_map_lingers.find(op->linger_id);
   if (iter != check_latest_map_lingers.end()) {
@@ -1161,7 +869,7 @@ void Objecter::C_Command_Map_Latest::finish(int r)
     return;
   }
 
-  RWLock::WLocker wl(objecter->rwlock);
+  Mutex::Locker l(objecter->client_lock);
 
   map<uint64_t, CommandOp*>::iterator iter =
     objecter->check_latest_map_commands.find(tid);
@@ -1171,20 +879,17 @@ void Objecter::C_Command_Map_Latest::finish(int r)
 
   CommandOp *c = iter->second;
   objecter->check_latest_map_commands.erase(iter);
+  c->put();
 
   if (c->map_dne_bound == 0)
     c->map_dne_bound = latest;
 
-  objecter->_check_command_map_dne(c);
-
-  c->put();
+  objecter->check_command_map_dne(c);
 }
 
-void Objecter::_check_command_map_dne(CommandOp *c)
+void Objecter::check_command_map_dne(CommandOp *c)
 {
-  assert(rwlock.is_wlocked());
-
-  ldout(cct, 10) << "_check_command_map_dne tid " << c->tid
+  ldout(cct, 10) << "check_command_map_dne tid " << c->tid
 		 << " current " << osdmap->get_epoch()
 		 << " map_dne_bound " << c->map_dne_bound
 		 << dendl;
@@ -1199,8 +904,6 @@ void Objecter::_check_command_map_dne(CommandOp *c)
 
 void Objecter::_send_command_map_check(CommandOp *c)
 {
-  assert(rwlock.is_wlocked());
-
   // ask the monitor
   if (check_latest_map_commands.count(c->tid) == 0) {
     c->get();
@@ -1210,10 +913,8 @@ void Objecter::_send_command_map_check(CommandOp *c)
   }
 }
 
-void Objecter::_command_cancel_map_check(CommandOp *c)
+void Objecter::command_cancel_map_check(CommandOp *c)
 {
-  assert(rwlock.is_wlocked());
-
   map<uint64_t, CommandOp*>::iterator iter =
     check_latest_map_commands.find(c->tid);
   if (iter != check_latest_map_commands.end()) {
@@ -1224,69 +925,26 @@ void Objecter::_command_cancel_map_check(CommandOp *c)
 }
 
 
-/**
- * Look up OSDSession by OSD id.
- *
- * @returns 0 on success, or -EAGAIN if the lock context requires promotion to write.
- */
-int Objecter::_get_session(int osd, OSDSession **session, RWLock::Context& lc)
-{
-  assert(rwlock.is_locked());
-
-  if (osd < 0) {
-    *session = homeless_session;
-    ldout(cct, 20) << __func__ << " osd=" << osd << " returning homeless" << dendl;
-    return 0;
-  }
 
+Objecter::OSDSession *Objecter::get_session(int osd)
+{
   map<int,OSDSession*>::iterator p = osd_sessions.find(osd);
-  if (p != osd_sessions.end()) {
-    OSDSession *s = p->second;
-    s->get();
-    *session = s;
-    ldout(cct, 20) << __func__ << " s=" << s << " osd=" << osd << " " << s->get_nref() << dendl;
-    return 0;
-  }
-  if (!lc.is_wlocked()) {
-    return -EAGAIN;
-  }
-  OSDSession *s = new OSDSession(cct, osd);
+  if (p != osd_sessions.end())
+    return p->second;
+  OSDSession *s = new OSDSession(osd);
   osd_sessions[osd] = s;
   s->con = messenger->get_connection(osdmap->get_inst(osd));
   logger->inc(l_osdc_osd_session_open);
   logger->inc(l_osdc_osd_sessions, osd_sessions.size());
-  s->get();
-  *session = s;
-  ldout(cct, 20) << __func__ << " s=" << s << " osd=" << osd << " " << s->get_nref() << dendl;
-  return 0;
-}
-
-void Objecter::put_session(Objecter::OSDSession *s)
-{
-  if (s && !s->is_homeless()) {
-    ldout(cct, 20) << __func__ << " s=" << s << " osd=" << s->osd << " " << s->get_nref() << dendl;
-    s->put();
-  }
-}
-
-void Objecter::get_session(Objecter::OSDSession *s)
-{
-  assert(s != NULL);
-
-  if (!s->is_homeless()) {
-    ldout(cct, 20) << __func__ << " s=" << s << " osd=" << s->osd << " " << s->get_nref() << dendl;
-    s->get();
-  }
+  return s;
 }
 
-void Objecter::_reopen_session(OSDSession *s)
+void Objecter::reopen_session(OSDSession *s)
 {
-  assert(s->lock.is_locked());
-
   entity_inst_t inst = osdmap->get_inst(s->osd);
   ldout(cct, 10) << "reopen_session osd." << s->osd << " session, addr now " << inst << dendl;
   if (s->con) {
-    s->con->mark_down();
+    messenger->mark_down(s->con);
     logger->inc(l_osdc_osd_session_close);
   }
   s->con = messenger->get_connection(inst);
@@ -1296,79 +954,29 @@ void Objecter::_reopen_session(OSDSession *s)
 
 void Objecter::close_session(OSDSession *s)
 {
-  assert(rwlock.is_wlocked());
-
   ldout(cct, 10) << "close_session for osd." << s->osd << dendl;
   if (s->con) {
-    s->con->mark_down();
+    messenger->mark_down(s->con);
     logger->inc(l_osdc_osd_session_close);
   }
-  s->lock.get_write();
-
-  std::list<LingerOp*> homeless_lingers;
-  std::list<CommandOp*> homeless_commands;
-  std::list<Op*> homeless_ops;
-
-  while(!s->linger_ops.empty()) {
-    std::map<uint64_t, LingerOp*>::iterator i = s->linger_ops.begin();
-    ldout(cct, 10) << " linger_op " << i->first << dendl;
-    homeless_lingers.push_back(i->second);
-    _session_linger_op_remove(s, i->second);
-  }
-
-  while(!s->ops.empty()) {
-    std::map<ceph_tid_t, Op*>::iterator i = s->ops.begin();
-    ldout(cct, 10) << " op " << i->first << dendl;
-    homeless_ops.push_back(i->second);
-    _session_op_remove(s, i->second);
-  }
-
-  while(!s->command_ops.empty()) {
-    std::map<ceph_tid_t, CommandOp*>::iterator i = s->command_ops.begin();
-    ldout(cct, 10) << " command_op " << i->first << dendl;
-    homeless_commands.push_back(i->second);
-    _session_command_op_remove(s, i->second);
-  }
-
+  s->ops.clear();
+  s->linger_ops.clear();
+  s->command_ops.clear();
   osd_sessions.erase(s->osd);
-  s->lock.unlock();
-  put_session(s);
-
-  // Assign any leftover ops to the homeless session
-  {
-    RWLock::WLocker wl(homeless_session->lock);
-    for (std::list<LingerOp*>::iterator i = homeless_lingers.begin();
-         i != homeless_lingers.end(); ++i) {
-      _session_linger_op_assign(homeless_session, *i);
-    }
-    for (std::list<Op*>::iterator i = homeless_ops.begin();
-         i != homeless_ops.end(); ++i) {
-      _session_op_assign(homeless_session, *i);
-    }
-    for (std::list<CommandOp*>::iterator i = homeless_commands.begin();
-         i != homeless_commands.end(); ++i) {
-      _session_command_op_assign(homeless_session, *i);
-    }
-  }
+  delete s;
 
   logger->set(l_osdc_osd_sessions, osd_sessions.size());
 }
 
 void Objecter::wait_for_osd_map()
 {
-  rwlock.get_write();
-  if (osdmap->get_epoch()) {
-    rwlock.put_write();
-    return;
-  }
-
+  if (osdmap->get_epoch()) return;
   Mutex lock("");
   Cond cond;
   bool done;
   lock.Lock();
   C_SafeCond *context = new C_SafeCond(&lock, &cond, &done, NULL);
   waiting_for_map[0].push_back(pair<Context*, int>(context, 0));
-  rwlock.put_write();
   while (!done)
     cond.Wait(lock);
   lock.Unlock();
@@ -1381,9 +989,9 @@ struct C_Objecter_GetVersion : public Context {
   C_Objecter_GetVersion(Objecter *o, Context *c)
     : objecter(o), oldest(0), newest(0), fin(c) {}
   void finish(int r) {
-    if (r >= 0) {
-      objecter->get_latest_version(oldest, newest, fin);
-    } else if (r == -EAGAIN) { // try again as instructed
+    if (r >= 0)
+      objecter->_get_latest_version(oldest, newest, fin);
+    else if (r == -EAGAIN) { // try again as instructed
       objecter->wait_for_latest_osdmap(fin);
     } else {
       // it doesn't return any other error codes!
@@ -1399,15 +1007,8 @@ void Objecter::wait_for_latest_osdmap(Context *fin)
   monc->get_version("osdmap", &c->newest, &c->oldest, c);
 }
 
-void Objecter::get_latest_version(epoch_t oldest, epoch_t newest, Context *fin)
-{
-  RWLock::WLocker wl(rwlock);
-  _get_latest_version(oldest, newest, fin);
-}
-
 void Objecter::_get_latest_version(epoch_t oldest, epoch_t newest, Context *fin)
 {
-  assert(rwlock.is_wlocked());
   if (osdmap->get_epoch() >= newest) {
   ldout(cct, 10) << __func__ << " latest " << newest << ", have it" << dendl;
     if (fin)
@@ -1416,104 +1017,67 @@ void Objecter::_get_latest_version(epoch_t oldest, epoch_t newest, Context *fin)
   }
 
   ldout(cct, 10) << __func__ << " latest " << newest << ", waiting" << dendl;
-  _wait_for_new_map(fin, newest, 0);
+  wait_for_new_map(fin, newest, 0);
 }
 
 void Objecter::maybe_request_map()
 {
-  RWLock::RLocker rl(rwlock);
-  int r;
-  do {
-    r = _maybe_request_map();
-  } while (r == -EAGAIN);
-}
-
-int Objecter::_maybe_request_map()
-{
-  assert(rwlock.is_locked());
   int flag = 0;
   if (osdmap_full_flag()) {
-    ldout(cct, 10) << "_maybe_request_map subscribing (continuous) to next osd map (FULL flag is set)" << dendl;
+    ldout(cct, 10) << "maybe_request_map subscribing (continuous) to next osd map (FULL flag is set)" << dendl;
   } else {
-    ldout(cct, 10) << "_maybe_request_map subscribing (onetime) to next osd map" << dendl;
+    ldout(cct, 10) << "maybe_request_map subscribing (onetime) to next osd map" << dendl;
     flag = CEPH_SUBSCRIBE_ONETIME;
   }
   epoch_t epoch = osdmap->get_epoch() ? osdmap->get_epoch()+1 : 0;
-  if (monc->sub_want("osdmap", epoch, flag)) {
+  if (monc->sub_want("osdmap", epoch, flag))
     monc->renew_subs();
-  }
-  return 0;
 }
 
-void Objecter::_wait_for_new_map(Context *c, epoch_t epoch, int err)
+void Objecter::wait_for_new_map(Context *c, epoch_t epoch, int err)
 {
-  assert(rwlock.is_wlocked());
   waiting_for_map[epoch].push_back(pair<Context *, int>(c, err));
-  int r = _maybe_request_map();
-  assert(r == 0);
-}
-
-bool Objecter::wait_for_map(epoch_t epoch, Context *c, int err)
-{
-  RWLock::WLocker wl(rwlock);
-  if (osdmap->get_epoch() >= epoch) {
-    return true;
-  }
-  _wait_for_new_map(c, epoch, err);
-  return false;
+  maybe_request_map();
 }
 
 void Objecter::kick_requests(OSDSession *session)
 {
   ldout(cct, 10) << "kick_requests for osd." << session->osd << dendl;
 
-  map<uint64_t, LingerOp *> lresend;
-  RWLock::WLocker wl(rwlock);
-
-  session->lock.get_write();
-  _kick_requests(session, lresend);
-  session->lock.unlock();
-
-  _linger_ops_resend(lresend);
-}
-
-void Objecter::_kick_requests(OSDSession *session, map<uint64_t, LingerOp *>& lresend)
-{
-  assert(rwlock.is_locked());
-
   // resend ops
   map<ceph_tid_t,Op*> resend;  // resend in tid order
-  for (map<ceph_tid_t, Op*>::iterator p = session->ops.begin(); p != session->ops.end();) {
-    Op *op = p->second;
+  for (xlist<Op*>::iterator p = session->ops.begin(); !p.end();) {
+    Op *op = *p;
     ++p;
     logger->inc(l_osdc_op_resend);
     if (op->should_resend) {
       if (!op->target.paused)
 	resend[op->tid] = op;
     } else {
-      _cancel_linger_op(op);
+      cancel_linger_op(op);
     }
   }
-
   while (!resend.empty()) {
-    _send_op(resend.begin()->second);
+    send_op(resend.begin()->second);
     resend.erase(resend.begin());
   }
 
   // resend lingers
-  for (map<ceph_tid_t, LingerOp*>::iterator j = session->linger_ops.begin(); j != session->linger_ops.end(); ++j) {
-    LingerOp *op = j->second;
-    op->get();
+  map<uint64_t, LingerOp*> lresend;  // resend in order
+  for (xlist<LingerOp*>::iterator j = session->linger_ops.begin(); !j.end(); ++j) {
     logger->inc(l_osdc_linger_resend);
-    assert(lresend.count(j->first) == 0);
-    lresend[j->first] = op;
+    lresend[(*j)->linger_id] = *j;
+  }
+  while (!lresend.empty()) {
+    send_linger(lresend.begin()->second);
+    lresend.erase(lresend.begin());
   }
 
   // resend commands
   map<uint64_t,CommandOp*> cresend;  // resend in order
-  for (map<ceph_tid_t, CommandOp*>::iterator k = session->command_ops.begin(); k != session->command_ops.end(); ++k) {
+  for (xlist<CommandOp*>::iterator k = session->command_ops.begin(); !k.end(); ++k) {
     logger->inc(l_osdc_command_resend);
-    cresend[k->first] = k->second;
+    cresend[(*k)->tid] = *k;
   }
   while (!cresend.empty()) {
     _send_command(cresend.begin()->second);
@@ -1521,23 +1085,8 @@ void Objecter::_kick_requests(OSDSession *session, map<uint64_t, LingerOp *>& lr
   }
 }
 
-void Objecter::_linger_ops_resend(map<uint64_t, LingerOp *>& lresend)
-{
-  assert(rwlock.is_locked());
-
-  while (!lresend.empty()) {
-    LingerOp *op = lresend.begin()->second;
-    if (!op->canceled) {
-      _send_linger(op);
-    }
-    op->put();
-    lresend.erase(lresend.begin());
-  }
-}
-
 void Objecter::schedule_tick()
 {
-  Mutex::Locker l(timer_lock);
   assert(tick_event == NULL);
   tick_event = new C_Tick(this);
   timer.add_event_after(cct->_conf->objecter_tick_interval, tick_event);
@@ -1545,101 +1094,85 @@ void Objecter::schedule_tick()
 
 void Objecter::tick()
 {
-  RWLock::RLocker rl(rwlock);
-
   ldout(cct, 10) << "tick" << dendl;
+  assert(client_lock.is_locked());
+  assert(initialized);
 
   // we are only called by C_Tick
   assert(tick_event);
   tick_event = NULL;
 
-  if (!initialized.read()) {
-    // we raced with shutdown
-    ldout(cct, 10) << __func__ << " raced with shutdown" << dendl;
-    return;
-  }
-
   set<OSDSession*> toping;
 
-  int r = 0;
-
   // look for laggy requests
   utime_t cutoff = ceph_clock_now(cct);
   cutoff -= cct->_conf->objecter_timeout;  // timeout
 
-  unsigned laggy_ops;
-
-  do {
-    laggy_ops = 0;
-    for (map<int,OSDSession*>::iterator siter = osd_sessions.begin(); siter != osd_sessions.end(); ++siter) {
-      OSDSession *s = siter->second;
-      RWLock::RLocker l(s->lock);
-      for (map<ceph_tid_t,Op*>::iterator p = s->ops.begin();
-           p != s->ops.end();
-           ++p) {
-        Op *op = p->second;
-        assert(op->session);
-        if (op->stamp < cutoff) {
-          ldout(cct, 2) << " tid " << p->first << " on osd." << op->session->osd << " is laggy" << dendl;
-          toping.insert(op->session);
-          ++laggy_ops;
-        }
-      }
-      for (map<uint64_t,LingerOp*>::iterator p = s->linger_ops.begin();
-           p != s->linger_ops.end();
-           ++p) {
-        LingerOp *op = p->second;
-        assert(op->session);
-        ldout(cct, 10) << " pinging osd that serves lingering tid " << p->first << " (osd." << op->session->osd << ")" << dendl;
-        toping.insert(op->session);
-      }
-      for (map<uint64_t,CommandOp*>::iterator p = s->command_ops.begin();
-           p != s->command_ops.end();
-           ++p) {
-        CommandOp *op = p->second;
-        assert(op->session);
-        ldout(cct, 10) << " pinging osd that serves command tid " << p->first << " (osd." << op->session->osd << ")" << dendl;
-        toping.insert(op->session);
-      }
+  unsigned laggy_ops = 0;
+  for (map<ceph_tid_t,Op*>::iterator p = ops.begin();
+       p != ops.end();
+       ++p) {
+    Op *op = p->second;
+    if (op->session && op->stamp < cutoff) {
+      ldout(cct, 2) << " tid " << p->first << " on osd." << op->session->osd << " is laggy" << dendl;
+      toping.insert(op->session);
+      ++laggy_ops;
     }
-    if (num_homeless_ops.read() || !toping.empty()) {
-      r = _maybe_request_map();
-      if (r == -EAGAIN) {
-        toping.clear();
-      }
+  }
+  for (map<uint64_t,LingerOp*>::iterator p = linger_ops.begin();
+       p != linger_ops.end();
+       ++p) {
+    LingerOp *op = p->second;
+    if (op->session) {
+      ldout(cct, 10) << " pinging osd that serves lingering tid " << p->first << " (osd." << op->session->osd << ")" << dendl;
+      toping.insert(op->session);
+    } else {
+      ldout(cct, 10) << " lingering tid " << p->first << " does not have session" << dendl;
     }
-  } while (r == -EAGAIN);
-
+  }
+  for (map<uint64_t,CommandOp*>::iterator p = command_ops.begin();
+       p != command_ops.end();
+       ++p) {
+    CommandOp *op = p->second;
+    if (op->session) {
+      ldout(cct, 10) << " pinging osd that serves command tid " << p->first << " (osd." << op->session->osd << ")" << dendl;
+      toping.insert(op->session);
+    } else {
+      ldout(cct, 10) << " command tid " << p->first << " does not have session" << dendl;
+    }
+  }
   logger->set(l_osdc_op_laggy, laggy_ops);
   logger->set(l_osdc_osd_laggy, toping.size());
 
+  if (num_homeless_ops || !toping.empty())
+    maybe_request_map();
+
   if (!toping.empty()) {
     // send a ping to these osds, to ensure we detect any session resets
     // (osd reply message policy is lossy)
-    for (set<OSDSession*>::const_iterator i = toping.begin();
+    for (set<OSDSession*>::iterator i = toping.begin();
 	 i != toping.end();
 	 ++i) {
-      (*i)->con->send_message(new MPing);
+      messenger->send_message(new MPing, (*i)->con);
     }
   }
-
+    
   // reschedule
   schedule_tick();
 }
 
 void Objecter::resend_mon_ops()
 {
-  RWLock::WLocker wl(rwlock);
-
+  assert(client_lock.is_locked());
   ldout(cct, 10) << "resend_mon_ops" << dendl;
 
   for (map<ceph_tid_t,PoolStatOp*>::iterator p = poolstat_ops.begin(); p!=poolstat_ops.end(); ++p) {
-    _poolstat_submit(p->second);
+    poolstat_submit(p->second);
     logger->inc(l_osdc_poolstat_resend);
   }
 
   for (map<ceph_tid_t,StatfsOp*>::iterator p = statfs_ops.begin(); p!=statfs_ops.end(); ++p) {
-    _fs_stats_submit(p->second);
+    fs_stats_submit(p->second);
     logger->inc(l_osdc_statfs_resend);
   }
 
@@ -1676,96 +1209,68 @@ void Objecter::resend_mon_ops()
 
 class C_CancelOp : public Context
 {
-  ceph_tid_t tid;
+  Objecter::Op *op;
   Objecter *objecter;
 public:
-  C_CancelOp(ceph_tid_t t, Objecter *objecter) : tid(t), objecter(objecter) {}
+  C_CancelOp(Objecter::Op *op, Objecter *objecter) : op(op),
+						     objecter(objecter) {}
   void finish(int r) {
-    objecter->op_cancel(tid, -ETIMEDOUT);
+    // note that objecter lock == timer lock, and is already held
+    objecter->op_cancel(op->tid, -ETIMEDOUT);
   }
 };
 
-ceph_tid_t Objecter::op_submit(Op *op, int *ctx_budget)
-{
-  RWLock::RLocker rl(rwlock);
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForRead);
-  return _op_submit_with_budget(op, lc, ctx_budget);
-}
-
-ceph_tid_t Objecter::_op_submit_with_budget(Op *op, RWLock::Context& lc, int *ctx_budget)
+ceph_tid_t Objecter::op_submit(Op *op)
 {
-  assert(initialized.read());
+  assert(client_lock.is_locked());
+  assert(initialized);
 
   assert(op->ops.size() == op->out_bl.size());
   assert(op->ops.size() == op->out_rval.size());
   assert(op->ops.size() == op->out_handler.size());
 
-  // throttle.  before we look at any state, because
-  // take_op_budget() may drop our lock while it blocks.
-  if (!op->ctx_budgeted || (ctx_budget && (*ctx_budget == -1))) {
-    int op_budget = _take_op_budget(op);
-    // take and pass out the budget for the first OP
-    // in the context session
-    if (ctx_budget && (*ctx_budget == -1)) {
-      *ctx_budget = op_budget;
-    }
-  }
-
-  ceph_tid_t tid = _op_submit(op, lc);
-
   if (osd_timeout > 0) {
-    Mutex::Locker l(timer_lock);
-    op->ontimeout = new C_CancelOp(tid, this);
+    op->ontimeout = new C_CancelOp(op, this);
     timer.add_event_after(osd_timeout, op->ontimeout);
   }
 
-  return tid;
+  // throttle.  before we look at any state, because
+  // take_op_budget() may drop our lock while it blocks.
+  take_op_budget(op);
+
+  return _op_submit(op);
 }
 
-ceph_tid_t Objecter::_op_submit(Op *op, RWLock::Context& lc)
+ceph_tid_t Objecter::_op_submit(Op *op)
 {
-  assert(rwlock.is_locked());
-
-  ldout(cct, 10) << __func__ << " op " << op << dendl;
-
-  // pick target
-  assert(op->session == NULL);
-  OSDSession *s = NULL;
-
-  bool const check_for_latest_map = _calc_target(&op->target) == RECALC_OP_TARGET_POOL_DNE;
-
-  // Try to get a session, including a retry if we need to take write lock
-  int r = _get_session(op->target.osd, &s, lc);
-  if (r == -EAGAIN) {
-    assert(s == NULL);
-    lc.promote();
-    r = _get_session(op->target.osd, &s, lc);
-  }
-  assert(r == 0);
-  assert(s);  // may be homeless
-
-  // We may need to take wlock if we will need to _set_op_map_check later.
-  if (check_for_latest_map && !lc.is_wlocked()) {
-    lc.promote();
+  // pick tid if we haven't got one yet
+  if (op->tid == ceph_tid_t(0)) {
+    ceph_tid_t mytid = ++last_tid;
+    op->tid = mytid;
   }
+  assert(client_inc >= 0);
 
-  inflight_ops.inc();
+  // pick target
+  num_homeless_ops++;  // initially; recalc_op_target() will decrement if it finds a target
+  int r = recalc_op_target(op);
+  bool check_for_latest_map = (r == RECALC_OP_TARGET_POOL_DNE);
 
   // add to gather set(s)
   if (op->onack) {
-    num_unacked.inc();
+    ++num_unacked;
   } else {
     ldout(cct, 20) << " note: not requesting ack" << dendl;
   }
   if (op->oncommit) {
-    num_uncommitted.inc();
+    ++num_uncommitted;
   } else {
     ldout(cct, 20) << " note: not requesting commit" << dendl;
   }
+  ops[op->tid] = op;
 
-  logger->inc(l_osdc_op_active);
-  logger->inc(l_osdc_op);
+  logger->set(l_osdc_op_active, ops.size());
 
+  logger->inc(l_osdc_op);
   if ((op->target.flags & (CEPH_OSD_FLAG_READ|CEPH_OSD_FLAG_WRITE)) == (CEPH_OSD_FLAG_READ|CEPH_OSD_FLAG_WRITE))
     logger->inc(l_osdc_op_rmw);
   else if (op->target.flags & CEPH_OSD_FLAG_WRITE)
@@ -1809,86 +1314,61 @@ ceph_tid_t Objecter::_op_submit(Op *op, RWLock::Context& lc)
   }
 
   // send?
-  ldout(cct, 10) << "_op_submit oid " << op->target.base_oid
+  ldout(cct, 10) << "op_submit oid " << op->target.base_oid
            << " " << op->target.base_oloc << " " << op->target.target_oloc
 	   << " " << op->ops << " tid " << op->tid
-           << " osd." << (!s->is_homeless() ? s->osd : -1)
+           << " osd." << (op->session ? op->session->osd : -1)
            << dendl;
 
   assert(op->target.flags & (CEPH_OSD_FLAG_READ|CEPH_OSD_FLAG_WRITE));
 
-  bool need_send = false;
-
   if ((op->target.flags & CEPH_OSD_FLAG_WRITE) &&
       osdmap->test_flag(CEPH_OSDMAP_PAUSEWR)) {
-    ldout(cct, 10) << " paused modify " << op << " tid " << last_tid.read() << dendl;
+    ldout(cct, 10) << " paused modify " << op << " tid " << last_tid << dendl;
     op->target.paused = true;
-    _maybe_request_map();
+    maybe_request_map();
   } else if ((op->target.flags & CEPH_OSD_FLAG_READ) &&
 	     osdmap->test_flag(CEPH_OSDMAP_PAUSERD)) {
-    ldout(cct, 10) << " paused read " << op << " tid " << last_tid.read() << dendl;
+    ldout(cct, 10) << " paused read " << op << " tid " << last_tid << dendl;
     op->target.paused = true;
-    _maybe_request_map();
+    maybe_request_map();
   } else if ((op->target.flags & CEPH_OSD_FLAG_WRITE) && osdmap_full_flag()) {
-    ldout(cct, 0) << " FULL, paused modify " << op << " tid " << last_tid.read() << dendl;
+    ldout(cct, 0) << " FULL, paused modify " << op << " tid " << last_tid << dendl;
     op->target.paused = true;
-    _maybe_request_map();
-  } else if (!s->is_homeless()) {
-    need_send = true;
+    maybe_request_map();
+  } else if (op->session) {
+    send_op(op);
   } else {
-    _maybe_request_map();
-  }
-
-  MOSDOp *m = NULL;
-  if (need_send) {
-    m = _prepare_osd_op(op);
+    maybe_request_map();
   }
 
-  s->lock.get_write();
-  if (op->tid == 0)
-    op->tid = last_tid.inc();
-  _session_op_assign(s, op);
-
-  if (need_send) {
-    _send_op(op, m);
-  }
-
-  // Last chance to touch Op here, after giving up session lock it can be
-  // freed at any time by response handler.
-  ceph_tid_t tid = op->tid;
   if (check_for_latest_map) {
     _send_op_map_check(op);
   }
-  op = NULL;
 
-  s->lock.unlock();
-  put_session(s);
-
-  ldout(cct, 5) << num_unacked.read() << " unacked, " << num_uncommitted.read() << " uncommitted" << dendl;
-
-  return tid;
+  ldout(cct, 5) << num_unacked << " unacked, " << num_uncommitted << " uncommitted" << dendl;
+  
+  return op->tid;
 }
 
-int Objecter::op_cancel(OSDSession *s, ceph_tid_t tid, int r)
+int Objecter::op_cancel(ceph_tid_t tid, int r)
 {
-  assert(initialized.read());
-
-  s->lock.get_write();
+  assert(client_lock.is_locked());
+  assert(initialized);
 
-  map<ceph_tid_t, Op*>::iterator p = s->ops.find(tid);
-  if (p == s->ops.end()) {
+  map<ceph_tid_t, Op*>::iterator p = ops.find(tid);
+  if (p == ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
   }
 
-  if (s->con) {
-    ldout(cct, 20) << " revoking rx buffer for " << tid
-		   << " on " << s->con << dendl;
-    s->con->revoke_rx_buffer(tid);
-  }
-
   ldout(cct, 10) << __func__ << " tid " << tid << dendl;
   Op *op = p->second;
+  if (op->con) {
+    ldout(cct, 20) << " revoking rx buffer for " << tid
+		   << " on " << op->con << dendl;
+    op->con->revoke_rx_buffer(tid);
+  }
   if (op->onack) {
     op->onack->complete(r);
     op->onack = NULL;
@@ -1897,58 +1377,11 @@ int Objecter::op_cancel(OSDSession *s, ceph_tid_t tid, int r)
     op->oncommit->complete(r);
     op->oncommit = NULL;
   }
-  _op_cancel_map_check(op);
-  _finish_op(op);
-  s->lock.unlock();
-
+  op_cancel_map_check(op);
+  finish_op(op);
   return 0;
 }
 
-int Objecter::op_cancel(ceph_tid_t tid, int r)
-{
-  int ret = 0;
-
-  rwlock.get_write();
-
-start:
-
-  for (map<int, OSDSession *>::iterator siter = osd_sessions.begin(); siter != osd_sessions.end(); ++siter) {
-    OSDSession *s = siter->second;
-    s->lock.get_read();
-    if (s->ops.find(tid) != s->ops.end()) {
-      s->lock.unlock();
-      ret = op_cancel(s, tid, r);
-      if (ret == -ENOENT) {
-        /* oh no! raced, maybe tid moved to another session, restarting */
-        goto start;
-      }
-      rwlock.unlock();
-      return ret;
-    }
-    s->lock.unlock();
-  }
-
-  // Handle case where the op is in homeless session
-  homeless_session->lock.get_read();
-  if (homeless_session->ops.find(tid) != homeless_session->ops.end()) {
-    homeless_session->lock.unlock();
-    ret = op_cancel(homeless_session, tid, r);
-    if (ret == -ENOENT) {
-      /* oh no! raced, maybe tid moved to another session, restarting */
-      goto start;
-    } else {
-      rwlock.unlock();
-      return ret;
-    }
-  } else {
-    homeless_session->lock.unlock();
-  }
-
-  rwlock.unlock();
-
-  return ret;
-}
-
 bool Objecter::is_pg_changed(
   int oldprimary,
   const vector<int>& oldacting,
@@ -2006,10 +1439,8 @@ int64_t Objecter::get_object_pg_hash_position(int64_t pool, const string& key,
   return p->raw_hash_to_pg(p->hash_key(key, ns));
 }
 
-int Objecter::_calc_target(op_target_t *t, bool any_change)
+int Objecter::calc_target(op_target_t *t, bool any_change)
 {
-  assert(rwlock.is_locked());
-
   bool is_read = t->flags & CEPH_OSD_FLAG_READ;
   bool is_write = t->flags & CEPH_OSD_FLAG_WRITE;
 
@@ -2049,34 +1480,12 @@ int Objecter::_calc_target(op_target_t *t, bool any_change)
   } else {
     int ret = osdmap->object_locator_to_pg(t->target_oid, t->target_oloc,
 					   pgid);
-    if (ret == -ENOENT) {
-      t->osd = -1;
+    if (ret == -ENOENT)
       return RECALC_OP_TARGET_POOL_DNE;
-    }
-  }
-
-  int min_size = pi->min_size;
-  unsigned pg_num = pi->get_pg_num();
-  int up_primary, acting_primary;
-  vector<int> up, acting;
-  osdmap->pg_to_up_acting_osds(pgid, &up, &up_primary,
-			       &acting, &acting_primary);
-  if (any_change && pg_interval_t::is_new_interval(
-          t->acting_primary,
-	  acting_primary,
-	  t->acting,
-	  acting,
-	  t->up_primary,
-	  up_primary,
-	  t->up,
-	  up,
-	  t->min_size,
-	  min_size,
-	  t->pg_num,
-	  pg_num,
-	  pi->raw_pg_to_pg(pgid))) {
-    force_resend = true;
   }
+  int primary;
+  vector<int> acting;
+  osdmap->pg_to_acting_osds(pgid, &acting, &primary);
 
   bool need_resend = false;
 
@@ -2088,20 +1497,15 @@ int Objecter::_calc_target(op_target_t *t, bool any_change)
 
   if (t->pgid != pgid ||
       is_pg_changed(
-	t->acting_primary, t->acting, acting_primary, acting,
-	t->used_replica || any_change) ||
+	t->primary, t->acting, primary, acting, t->used_replica || any_change) ||
       force_resend) {
     t->pgid = pgid;
     t->acting = acting;
-    t->acting_primary = acting_primary;
-    t->up_primary = up_primary;
-    t->up = up;
-    t->min_size = min_size;
-    t->pg_num = pg_num;
-    ldout(cct, 10) << __func__ << " "
-		   << " pgid " << pgid << " acting " << acting << dendl;
+    t->primary = primary;
+    ldout(cct, 10) << __func__ << " pgid " << pgid
+		   << " acting " << acting << dendl;
     t->used_replica = false;
-    if (acting_primary == -1) {
+    if (primary == -1) {
       t->osd = -1;
     } else {
       int osd;
@@ -2117,7 +1521,7 @@ int Objecter::_calc_target(op_target_t *t, bool any_change)
 	// look for a local replica.  prefer the primary if the
 	// distance is the same.
 	int best = -1;
-	int best_locality = 0;
+	int best_locality;
 	for (unsigned i = 0; i < acting.size(); ++i) {
 	  int locality = osdmap->crush->get_common_ancestor_distance(
 		 cct, acting[i], crush_location);
@@ -2131,197 +1535,66 @@ int Objecter::_calc_target(op_target_t *t, bool any_change)
 	    best = i;
 	    best_locality = locality;
 	    if (i)
-	      t->used_replica = true;
-	  }
-	}
-	assert(best >= 0);
-	osd = acting[best];
-      } else {
-	osd = acting_primary;
-      }
-      t->osd = osd;
-    }
-    need_resend = true;
-  }
-  if (need_resend) {
-    return RECALC_OP_TARGET_NEED_RESEND;
-  }
-  return RECALC_OP_TARGET_NO_ACTION;
-}
-
-int Objecter::_map_session(op_target_t *target, OSDSession **s,
-			   RWLock::Context& lc)
-{
-  int r = _calc_target(target);
-  if (r < 0) {
-    return r;
-  }
-  return _get_session(target->osd, s, lc);
-}
-
-void Objecter::_session_op_assign(OSDSession *to, Op *op)
-{
-  assert(to->lock.is_locked());
-  assert(op->session == NULL);
-  assert(op->tid);
-
-  get_session(to);
-  op->session = to;
-  to->ops[op->tid] = op;
-
-  if (to->is_homeless()) {
-    num_homeless_ops.inc();
-  }
-
-  ldout(cct, 15) << __func__ << " " << to->osd << " " << op->tid << dendl;
-}
-
-void Objecter::_session_op_remove(OSDSession *from, Op *op)
-{
-  assert(op->session == from);
-  assert(from->lock.is_locked());
-
-  if (from->is_homeless()) {
-    num_homeless_ops.dec();
-  }
-
-  from->ops.erase(op->tid);
-  put_session(from);
-  op->session = NULL;
-
-  ldout(cct, 15) << __func__ << " " << from->osd << " " << op->tid << dendl;
-}
-
-void Objecter::_session_linger_op_assign(OSDSession *to, LingerOp *op)
-{
-  assert(to->lock.is_wlocked());
-  assert(op->session == NULL);
-
-  if (to->is_homeless()) {
-    num_homeless_ops.inc();
-  }
-
-  get_session(to);
-  op->session = to;
-  to->linger_ops[op->linger_id] = op;
-
-  ldout(cct, 15) << __func__ << " " << to->osd << " " << op->linger_id << dendl;
-}
-
-void Objecter::_session_linger_op_remove(OSDSession *from, LingerOp *op)
-{
-  assert(from == op->session);
-  assert(from->lock.is_locked());
-
-  if (from->is_homeless()) {
-    num_homeless_ops.dec();
-  }
-
-  from->linger_ops.erase(op->linger_id);
-  put_session(from);
-  op->session = NULL;
-
-  ldout(cct, 15) << __func__ << " " << from->osd << " " << op->linger_id << dendl;
-}
-
-void Objecter::_session_command_op_remove(OSDSession *from, CommandOp *op)
-{
-  assert(from == op->session);
-  assert(from->lock.is_locked());
-
-  if (from->is_homeless()) {
-    num_homeless_ops.dec();
+	      t->used_replica = true;
+	  }
+	}
+	assert(best >= 0);
+	osd = acting[best];
+      } else {
+	osd = primary;
+      }
+      t->osd = osd;
+    }
+    need_resend = true;
   }
-
-  from->command_ops.erase(op->tid);
-  put_session(from);
-  op->session = NULL;
-
-  ldout(cct, 15) << __func__ << " " << from->osd << " " << op->tid << dendl;
-}
-
-void Objecter::_session_command_op_assign(OSDSession *to, CommandOp *op)
-{
-  assert(to->lock.is_locked());
-  assert(op->session == NULL);
-  assert(op->tid);
-
-  if (to->is_homeless()) {
-    num_homeless_ops.inc();
+  if (need_resend) {
+    return RECALC_OP_TARGET_NEED_RESEND;
   }
-
-  get_session(to);
-  op->session = to;
-  to->command_ops[op->tid] = op;
-
-  ldout(cct, 15) << __func__ << " " << to->osd << " " << op->tid << dendl;
+  return RECALC_OP_TARGET_NO_ACTION;
 }
 
-int Objecter::_get_osd_session(int osd, RWLock::Context& lc, OSDSession **psession)
+int Objecter::recalc_op_target(Op *op)
 {
-  int r;
-  do {
-    r = _get_session(osd, psession, lc);
-    if (r == -EAGAIN) {
-      assert(!lc.is_wlocked());
-
-      if (!_promote_lock_check_race(lc)) {
-        return r;
-      }
+  int r = calc_target(&op->target);
+  if (r == RECALC_OP_TARGET_NEED_RESEND) {
+    OSDSession *s = NULL;
+    if (op->target.osd >= 0)
+      s = get_session(op->target.osd);
+    if (op->session != s) {
+      if (!op->session)
+	num_homeless_ops--;
+      op->session_item.remove_myself();
+      op->session = s;
+      if (s)
+	s->ops.push_back(&op->session_item);
+      else
+	num_homeless_ops++;
     }
-  } while (r == -EAGAIN);
-  assert(r == 0);
-
-  return 0;
-}
-
-int Objecter::_get_op_target_session(Op *op, RWLock::Context& lc, OSDSession **psession)
-{
-  return _get_osd_session(op->target.osd, lc, psession);
-}
-
-bool Objecter::_promote_lock_check_race(RWLock::Context& lc)
-{
-  epoch_t epoch = osdmap->get_epoch();
-  lc.promote();
-  return (epoch == osdmap->get_epoch());
+  }
+  return r;
 }
 
-int Objecter::_recalc_linger_op_target(LingerOp *linger_op, RWLock::Context& lc)
+bool Objecter::recalc_linger_op_target(LingerOp *linger_op)
 {
-  assert(rwlock.is_wlocked());
-
-  int r = _calc_target(&linger_op->target, true);
+  int r = calc_target(&linger_op->target, true);
   if (r == RECALC_OP_TARGET_NEED_RESEND) {
     ldout(cct, 10) << "recalc_linger_op_target tid " << linger_op->linger_id
 		   << " pgid " << linger_op->target.pgid
 		   << " acting " << linger_op->target.acting << dendl;
     
-    OSDSession *s;
-    r = _get_osd_session(linger_op->target.osd, lc, &s);
-    if (r < 0) {
-      // We have no session for the new destination for the op, so leave it
-      // in this session to be handled again next time we scan requests
-      return r;
-    }
-
+    OSDSession *s = linger_op->target.osd != -1 ?
+      get_session(linger_op->target.osd) : NULL;
     if (linger_op->session != s) {
-      // NB locking two sessions (s and linger_op->session) at the same time here
-      // is only safe because we are the only one that takes two, and we are
-      // holding rwlock for write.  Disable lockdep because it doesn't know that.
-      s->lock.get_write(false);
-      _session_linger_op_remove(linger_op->session, linger_op);
-      _session_linger_op_assign(s, linger_op);
-      s->lock.unlock(false);
+      linger_op->session_item.remove_myself();
+      linger_op->session = s;
+      if (s)
+	s->linger_ops.push_back(&linger_op->session_item);
     }
-
-    put_session(s);
-    return RECALC_OP_TARGET_NEED_RESEND;
   }
   return r;
 }
 
-void Objecter::_cancel_linger_op(Op *op)
+void Objecter::cancel_linger_op(Op *op)
 {
   ldout(cct, 15) << "cancel_op " << op->tid << dendl;
 
@@ -2329,65 +1602,60 @@ void Objecter::_cancel_linger_op(Op *op)
   delete op->onack;
   delete op->oncommit;
 
-  _finish_op(op);
+  finish_op(op);
 }
 
-void Objecter::_finish_op(Op *op)
+void Objecter::finish_op(Op *op)
 {
   ldout(cct, 15) << "finish_op " << op->tid << dendl;
 
-  assert(op->session->lock.is_wlocked());
-
-  if (!op->ctx_budgeted && op->budgeted)
+  op->session_item.remove_myself();
+  if (op->budgeted)
     put_op_budget(op);
 
-  if (op->ontimeout) {
-    Mutex::Locker l(timer_lock);
-    timer.cancel_event(op->ontimeout);
-  }
-
-  _session_op_remove(op->session, op);
-
-  logger->dec(l_osdc_op_active);
-
-  assert(check_latest_map_ops.find(op->tid) == check_latest_map_ops.end());
-
-  inflight_ops.dec();
+  ops.erase(op->tid);
+  logger->set(l_osdc_op_active, ops.size());
 
-  op->put();
-}
-
-void Objecter::finish_op(OSDSession *session, ceph_tid_t tid)
-{
-  ldout(cct, 15) << "finish_op " << tid << dendl;
-  RWLock::RLocker rl(rwlock);
-  
-  RWLock::WLocker wl(session->lock);
-
-  map<ceph_tid_t, Op *>::iterator iter = session->ops.find(tid);
-  if (iter == session->ops.end())
-    return;
+  // our reply may have raced with pool deletion resulting in a map
+  // check in flight.
+  op_cancel_map_check(op);
 
-  Op *op = iter->second;
+  if (op->ontimeout)
+    timer.cancel_event(op->ontimeout);
 
-  _finish_op(op);
+  delete op;
 }
 
-MOSDOp *Objecter::_prepare_osd_op(Op *op)
+void Objecter::send_op(Op *op)
 {
-  assert(rwlock.is_locked());
+  ldout(cct, 15) << "send_op " << op->tid << " to osd." << op->session->osd << dendl;
 
   int flags = op->target.flags;
-  flags |= CEPH_OSD_FLAG_KNOWN_REDIR;
   if (op->oncommit)
     flags |= CEPH_OSD_FLAG_ONDISK;
   if (op->onack)
     flags |= CEPH_OSD_FLAG_ACK;
 
+  assert(op->session->con);
+
+  // preallocated rx buffer?
+  if (op->con) {
+    ldout(cct, 20) << " revoking rx buffer for " << op->tid << " on " << op->con << dendl;
+    op->con->revoke_rx_buffer(op->tid);
+  }
+  if (op->outbl &&
+      op->ontimeout == NULL &&  // only post rx_buffer if no timeout; see #9582
+      op->outbl->length()) {
+    ldout(cct, 20) << " posting rx buffer for " << op->tid << " on " << op->session->con << dendl;
+    op->con = op->session->con;
+    op->con->post_rx_buffer(op->tid, *op->outbl);
+  }
+
   op->target.paused = false;
+  op->incarnation = op->session->incarnation;
   op->stamp = ceph_clock_now(cct);
 
-  MOSDOp *m = new MOSDOp(client_inc.read(), op->tid, 
+  MOSDOp *m = new MOSDOp(client_inc, op->tid, 
 			 op->target.target_oid, op->target.target_oloc,
 			 op->target.pgid,
 			 osdmap->get_epoch(),
@@ -2412,42 +1680,7 @@ MOSDOp *Objecter::_prepare_osd_op(Op *op)
   logger->inc(l_osdc_op_send);
   logger->inc(l_osdc_op_send_bytes, m->get_data().length());
 
-  return m;
-}
-
-void Objecter::_send_op(Op *op, MOSDOp *m)
-{
-  assert(rwlock.is_locked());
-  assert(op->session->lock.is_locked());
-
-  if (!m) {
-    assert(op->tid > 0);
-    m = _prepare_osd_op(op);
-  }
-
-  ldout(cct, 15) << "_send_op " << op->tid << " to osd." << op->session->osd << dendl;
-
-  ConnectionRef con = op->session->con;
-  assert(con);
-
-  // preallocated rx buffer?
-  if (op->con) {
-    ldout(cct, 20) << " revoking rx buffer for " << op->tid << " on " << op->con << dendl;
-    op->con->revoke_rx_buffer(op->tid);
-  }
-  if (op->outbl &&
-      op->ontimeout == NULL &&  // only post rx_buffer if no timeout; see #9582
-      op->outbl->length()) {
-    ldout(cct, 20) << " posting rx buffer for " << op->tid << " on " << con << dendl;
-    op->con = con;
-    op->con->post_rx_buffer(op->tid, *op->outbl);
-  }
-
-  op->incarnation = op->session->incarnation;
-
-  m->set_tid(op->tid);
-
-  op->session->con->send_message(m);
+  messenger->send_message(m, op->session->con);
 }
 
 int Objecter::calc_op_budget(Op *op)
@@ -2470,73 +1703,45 @@ int Objecter::calc_op_budget(Op *op)
   return op_budget;
 }
 
-void Objecter::_throttle_op(Op *op, int op_budget)
+void Objecter::throttle_op(Op *op, int op_budget)
 {
-  assert(rwlock.is_locked());
-
-  bool locked_for_write = rwlock.is_wlocked();
-
   if (!op_budget)
     op_budget = calc_op_budget(op);
   if (!op_throttle_bytes.get_or_fail(op_budget)) { //couldn't take right now
-    rwlock.unlock();
+    client_lock.Unlock();
     op_throttle_bytes.get(op_budget);
-    rwlock.get(locked_for_write);
+    client_lock.Lock();
   }
   if (!op_throttle_ops.get_or_fail(1)) { //couldn't take right now
-    rwlock.unlock();
+    client_lock.Unlock();
     op_throttle_ops.get(1);
-    rwlock.get(locked_for_write);
+    client_lock.Lock();
   }
 }
 
 void Objecter::unregister_op(Op *op)
 {
-  op->session->lock.get_write();
-  op->session->ops.erase(op->tid);
-  op->session->lock.unlock();
-  put_session(op->session);
-  op->session = NULL;
-
-  inflight_ops.dec();
+  if (op->onack)
+    num_unacked--;
+  if (op->oncommit)
+    num_uncommitted--;
+  ops.erase(op->tid);
 }
 
 /* This function DOES put the passed message before returning */
 void Objecter::handle_osd_op_reply(MOSDOpReply *m)
 {
-  assert(initialized.read());
+  assert(client_lock.is_locked());
+  assert(initialized);
   ldout(cct, 10) << "in handle_osd_op_reply" << dendl;
 
   // get pio
   ceph_tid_t tid = m->get_tid();
 
-  int osd_num = (int)m->get_source().num();
-
-  RWLock::RLocker l(rwlock);
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForRead);
-
-  map<int, OSDSession *>::iterator siter = osd_sessions.find(osd_num);
-  if (siter == osd_sessions.end()) {
-    ldout(cct, 7) << "handle_osd_op_reply " << tid
-		  << (m->is_ondisk() ? " ondisk":(m->is_onnvram() ?
-						  " onnvram":" ack"))
-		  << " ... unknown osd" << dendl;
-    m->put();
-    return;
-  }
-
-  OSDSession *s = siter->second;
-  get_session(s);
-
-  s->lock.get_write();
-
-  map<ceph_tid_t, Op *>::iterator iter = s->ops.find(tid);
-  if (iter == s->ops.end()) {
+  if (ops.count(tid) == 0) {
     ldout(cct, 7) << "handle_osd_op_reply " << tid
 	    << (m->is_ondisk() ? " ondisk":(m->is_onnvram() ? " onnvram":" ack"))
 	    << " ... stray" << dendl;
-    s->lock.unlock();
-    put_session(s);
     m->put();
     return;
   }
@@ -2547,7 +1752,7 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
 		<< " in " << m->get_pg()
 		<< " attempt " << m->get_retry_attempt()
 		<< dendl;
-  Op *op = iter->second;
+  Op *op = ops[tid];
 
   if (m->get_retry_attempt() >= 0) {
     if (m->get_retry_attempt() != (op->attempts - 1)) {
@@ -2556,8 +1761,6 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
 		    << "; last attempt " << (op->attempts - 1) << " sent to "
 		    << op->session->con->get_peer_addr() << dendl;
       m->put();
-      s->lock.unlock();
-      put_session(s);
       return;
     }
   } else {
@@ -2573,42 +1776,22 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
 
   if (m->is_redirect_reply()) {
     ldout(cct, 5) << " got redirect reply; redirecting" << dendl;
-    if (op->onack)
-      num_unacked.dec();
-    if (op->oncommit)
-      num_uncommitted.dec();
-    _session_op_remove(s, op);
-    s->lock.unlock();
-    put_session(s);
-
-    // FIXME: two redirects could race and reorder
-
-    op->tid = 0;
+    unregister_op(op);
     m->get_redirect().combine_with_locator(op->target.target_oloc,
 					   op->target.target_oid.name);
-    op->target.flags |= CEPH_OSD_FLAG_REDIRECTED;
-    _op_submit(op, lc);
+    _op_submit(op);
     m->put();
     return;
   }
 
   if (rc == -EAGAIN) {
     ldout(cct, 7) << " got -EAGAIN, resubmitting" << dendl;
-
-    // new tid
-    s->ops.erase(op->tid);
-    op->tid = last_tid.inc();
-
-    _send_op(op);
-    s->lock.unlock();
-    put_session(s);
+    unregister_op(op);
+    _op_submit(op);
     m->put();
     return;
   }
 
-  l.unlock();
-  lc.set_state(RWLock::Context::Untaken);
-
   if (op->objver)
     *op->objver = m->get_user_version();
   if (op->reply_epoch)
@@ -2653,14 +1836,14 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
     op->replay_version = m->get_replay_version();
     onack = op->onack;
     op->onack = 0;  // only do callback once
-    num_unacked.dec();
+    num_unacked--;
     logger->inc(l_osdc_op_ack);
   }
   if (op->oncommit && (m->is_ondisk() || rc)) {
     ldout(cct, 15) << "handle_osd_op_reply safe" << dendl;
     oncommit = op->oncommit;
     op->oncommit = 0;
-    num_uncommitted.dec();
+    num_uncommitted--;
     logger->inc(l_osdc_op_commit);
   }
 
@@ -2672,22 +1855,13 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
     op->outbl = 0;
   }
 
-  /* get it before we call _finish_op() */
-  Mutex *completion_lock = (op->target.base_oid.name.size() ? s->get_lock(op->target.base_oid) : NULL);
-
   // done with this tid?
   if (!op->onack && !op->oncommit) {
     ldout(cct, 15) << "handle_osd_op_reply completed tid " << tid << dendl;
-    _finish_op(op);
-  }
-
-  ldout(cct, 5) << num_unacked.read() << " unacked, " << num_uncommitted.read() << " uncommitted" << dendl;
-
-  // serialize completions
-  if (completion_lock) {
-    completion_lock->Lock();
+    finish_op(op);
   }
-  s->lock.unlock();
+  
+  ldout(cct, 5) << num_unacked << " unacked, " << num_uncommitted << " uncommitted" << dendl;
 
   // do callbacks
   if (onack) {
@@ -2696,19 +1870,15 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
   if (oncommit) {
     oncommit->complete(rc);
   }
-  if (completion_lock) {
-    completion_lock->Unlock();
-  }
 
   m->put();
-  put_session(s);
 }
 
 
 uint32_t Objecter::list_objects_seek(ListContext *list_context,
 				     uint32_t pos)
 {
-  RWLock::RLocker rl(rwlock);
+  assert(client_lock.is_locked());
   pg_t actual = osdmap->raw_pg_to_pg(pg_t(pos, list_context->pool_id));
   ldout(cct, 10) << "list_objects_seek " << list_context
 		 << " pos " << pos << " -> " << actual << dendl;
@@ -2722,6 +1892,7 @@ uint32_t Objecter::list_objects_seek(ListContext *list_context,
 
 void Objecter::list_objects(ListContext *list_context, Context *onfinish)
 {
+  assert(client_lock.is_locked());
   ldout(cct, 10) << "list_objects" << dendl;
   ldout(cct, 20) << " pool_id " << list_context->pool_id
 	   << " pool_snap_seq " << list_context->pool_snap_seq
@@ -2744,18 +1915,12 @@ void Objecter::list_objects(ListContext *list_context, Context *onfinish)
     }
   }
   if (list_context->at_end_of_pool) {
-    // release the listing context's budget once all
-    // OPs (in the session) are finished
-    put_list_context_budget(list_context);
-
     onfinish->complete(0);
     return;
   }
 
-  rwlock.get_read();
   const pg_pool_t *pool = osdmap->get_pg_pool(list_context->pool_id);
   int pg_num = pool->get_pg_num();
-  rwlock.unlock();
 
   if (list_context->starting_pg_num == 0) {     // there can't be zero pgs!
     list_context->starting_pg_num = pg_num;
@@ -2777,9 +1942,8 @@ void Objecter::list_objects(ListContext *list_context, Context *onfinish)
   list_context->bl.clear();
   C_List *onack = new C_List(list_context, onfinish, this);
   object_locator_t oloc(list_context->pool_id, list_context->nspace);
-
   pg_read(list_context->current_pg, oloc, op,
-	  &list_context->bl, 0, onack, &onack->epoch, &list_context->ctx_budget);
+	  &list_context->bl, 0, onack, &onack->epoch);
 }
 
 void Objecter::_list_reply(ListContext *list_context, int r,
@@ -2825,9 +1989,6 @@ void Objecter::_list_reply(ListContext *list_context, int r,
   }
   if (!list_context->list.empty()) {
     ldout(cct, 20) << " returning results so far" << dendl;
-    // release the listing context's budget once all
-    // OPs (in the session) are finished
-    put_list_context_budget(list_context);
     final_finish->complete(0);
     return;
   }
@@ -2836,20 +1997,12 @@ void Objecter::_list_reply(ListContext *list_context, int r,
   list_objects(list_context, final_finish);
 }
 
-void Objecter::put_list_context_budget(ListContext *list_context) {
-    if (list_context->ctx_budget >= 0) {
-      ldout(cct, 10) << " release listing context's budget " << list_context->ctx_budget << dendl;
-      put_op_budget_bytes(list_context->ctx_budget);
-      list_context->ctx_budget = -1;
-    }
-  }
 
 
 //snapshots
 
 int Objecter::create_pool_snap(int64_t pool, string& snap_name, Context *onfinish)
 {
-  RWLock::WLocker wl(rwlock);
   ldout(cct, 10) << "create_pool_snap; pool: " << pool << "; snap: " << snap_name << dendl;
 
   const pg_pool_t *p = osdmap->get_pg_pool(pool);
@@ -2861,7 +2014,7 @@ int Objecter::create_pool_snap(int64_t pool, string& snap_name, Context *onfinis
   PoolOp *op = new PoolOp;
   if (!op)
     return -ENOMEM;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pool = pool;
   op->name = snap_name;
   op->onfinish = onfinish;
@@ -2890,11 +2043,10 @@ struct C_SelfmanagedSnap : public Context {
 int Objecter::allocate_selfmanaged_snap(int64_t pool, snapid_t *psnapid,
 					Context *onfinish)
 {
-  RWLock::WLocker wl(rwlock);
   ldout(cct, 10) << "allocate_selfmanaged_snap; pool: " << pool << dendl;
   PoolOp *op = new PoolOp;
   if (!op) return -ENOMEM;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pool = pool;
   C_SelfmanagedSnap *fin = new C_SelfmanagedSnap(psnapid, onfinish);
   op->onfinish = fin;
@@ -2908,7 +2060,6 @@ int Objecter::allocate_selfmanaged_snap(int64_t pool, snapid_t *psnapid,
 
 int Objecter::delete_pool_snap(int64_t pool, string& snap_name, Context *onfinish)
 {
-  RWLock::WLocker wl(rwlock);
   ldout(cct, 10) << "delete_pool_snap; pool: " << pool << "; snap: " << snap_name << dendl;
 
   const pg_pool_t *p = osdmap->get_pg_pool(pool);
@@ -2920,7 +2071,7 @@ int Objecter::delete_pool_snap(int64_t pool, string& snap_name, Context *onfinis
   PoolOp *op = new PoolOp;
   if (!op)
     return -ENOMEM;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pool = pool;
   op->name = snap_name;
   op->onfinish = onfinish;
@@ -2933,14 +2084,12 @@ int Objecter::delete_pool_snap(int64_t pool, string& snap_name, Context *onfinis
 }
 
 int Objecter::delete_selfmanaged_snap(int64_t pool, snapid_t snap,
-				      Context *onfinish)
-{
-  RWLock::WLocker wl(rwlock);
+				      Context *onfinish) {
   ldout(cct, 10) << "delete_selfmanaged_snap; pool: " << pool << "; snap: " 
 	   << snap << dendl;
   PoolOp *op = new PoolOp;
   if (!op) return -ENOMEM;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pool = pool;
   op->onfinish = onfinish;
   op->pool_op = POOL_OP_DELETE_UNMANAGED_SNAP;
@@ -2955,7 +2104,6 @@ int Objecter::delete_selfmanaged_snap(int64_t pool, snapid_t snap,
 int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid,
 			  int crush_rule)
 {
-  RWLock::WLocker wl(rwlock);
   ldout(cct, 10) << "create_pool name=" << name << dendl;
 
   if (osdmap->lookup_pg_pool_name(name.c_str()) >= 0)
@@ -2964,7 +2112,7 @@ int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid,
   PoolOp *op = new PoolOp;
   if (!op)
     return -ENOMEM;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pool = 0;
   op->name = name;
   op->onfinish = onfinish;
@@ -2980,39 +2128,23 @@ int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid,
 
 int Objecter::delete_pool(int64_t pool, Context *onfinish)
 {
-  RWLock::WLocker wl(rwlock);
   ldout(cct, 10) << "delete_pool " << pool << dendl;
 
   if (!osdmap->have_pg_pool(pool))
     return -ENOENT;
 
-  _do_delete_pool(pool, onfinish);
-  return 0;
-}
-
-int Objecter::delete_pool(const string &pool_name, Context *onfinish)
-{
-  RWLock::WLocker wl(rwlock);
-  ldout(cct, 10) << "delete_pool " << pool_name << dendl;
-
-  int64_t pool = osdmap->lookup_pg_pool_name(pool_name);
-  if (pool < 0)
-    return pool;
-
-  _do_delete_pool(pool, onfinish);
-  return 0;
-}
-
-void Objecter::_do_delete_pool(int64_t pool, Context *onfinish)
-{
   PoolOp *op = new PoolOp;
-  op->tid = last_tid.inc();
+  if (!op) return -ENOMEM;
+  op->tid = ++last_tid;
   op->pool = pool;
   op->name = "delete";
   op->onfinish = onfinish;
   op->pool_op = POOL_OP_DELETE;
   pool_ops[op->tid] = op;
+
   pool_op_submit(op);
+
+  return 0;
 }
 
 /**
@@ -3023,11 +2155,10 @@ void Objecter::_do_delete_pool(int64_t pool, Context *onfinish)
  */
 int Objecter::change_pool_auid(int64_t pool, Context *onfinish, uint64_t auid)
 {
-  RWLock::WLocker wl(rwlock);
   ldout(cct, 10) << "change_pool_auid " << pool << " to " << auid << dendl;
   PoolOp *op = new PoolOp;
   if (!op) return -ENOMEM;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pool = pool;
   op->name = "change_pool_auid";
   op->onfinish = onfinish;
@@ -3049,15 +2180,14 @@ public:
   C_CancelPoolOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
 						       objecter(objecter) {}
   void finish(int r) {
+    // note that objecter lock == timer lock, and is already held
     objecter->pool_op_cancel(tid, -ETIMEDOUT);
   }
 };
 
 void Objecter::pool_op_submit(PoolOp *op)
 {
-  assert(rwlock.is_locked());
   if (mon_timeout > 0) {
-    Mutex::Locker l(timer_lock);
     op->ontimeout = new C_CancelPoolOp(op->tid, this);
     timer.add_event_after(mon_timeout, op->ontimeout);
   }
@@ -3066,8 +2196,6 @@ void Objecter::pool_op_submit(PoolOp *op)
 
 void Objecter::_pool_op_submit(PoolOp *op)
 {
-  assert(rwlock.is_wlocked());
-
   ldout(cct, 10) << "pool_op_submit " << op->tid << dendl;
   MPoolOp *m = new MPoolOp(monc->get_fsid(), op->tid, op->pool,
 			   op->name, op->pool_op,
@@ -3089,54 +2217,37 @@ void Objecter::_pool_op_submit(PoolOp *op)
  */
 void Objecter::handle_pool_op_reply(MPoolOpReply *m)
 {
-  assert(initialized.read());
-
-  rwlock.get_read();
-
+  assert(client_lock.is_locked());
+  assert(initialized);
   ldout(cct, 10) << "handle_pool_op_reply " << *m << dendl;
   ceph_tid_t tid = m->get_tid();
-  map<ceph_tid_t, PoolOp *>::iterator iter = pool_ops.find(tid);
-  if (iter != pool_ops.end()) {
-    PoolOp *op = iter->second;
+  if (pool_ops.count(tid)) {
+    PoolOp *op = pool_ops[tid];
     ldout(cct, 10) << "have request " << tid << " at " << op << " Op: " << ceph_pool_op_name(op->pool_op) << dendl;
     if (op->blp)
       op->blp->claim(m->response_data);
     if (m->version > last_seen_osdmap_version)
       last_seen_osdmap_version = m->version;
     if (osdmap->get_epoch() < m->epoch) {
-      rwlock.unlock();
-      rwlock.get_write();
-      if (osdmap->get_epoch() < m->epoch) {
-        ldout(cct, 20) << "waiting for client to reach epoch " << m->epoch << " before calling back" << dendl;
-        _wait_for_new_map(op->onfinish, m->epoch, m->replyCode);
-      }
+      ldout(cct, 20) << "waiting for client to reach epoch " << m->epoch << " before calling back" << dendl;
+      wait_for_new_map(op->onfinish, m->epoch, m->replyCode);
     }
     else {
       op->onfinish->complete(m->replyCode);
     }
     op->onfinish = NULL;
-    if (!rwlock.is_wlocked()) {
-      rwlock.unlock();
-      rwlock.get_write();
-    }
-    iter = pool_ops.find(tid);
-    if (iter != pool_ops.end()) {
-      _finish_pool_op(op);
-    }
+    finish_pool_op(op);
   } else {
     ldout(cct, 10) << "unknown request " << tid << dendl;
   }
-  rwlock.unlock();
-
   ldout(cct, 10) << "done" << dendl;
   m->put();
 }
 
 int Objecter::pool_op_cancel(ceph_tid_t tid, int r)
 {
-  assert(initialized.read());
-
-  RWLock::WLocker wl(rwlock);
+  assert(client_lock.is_locked());
+  assert(initialized);
 
   map<ceph_tid_t, PoolOp*>::iterator it = pool_ops.find(tid);
   if (it == pool_ops.end()) {
@@ -3149,21 +2260,17 @@ int Objecter::pool_op_cancel(ceph_tid_t tid, int r)
   PoolOp *op = it->second;
   if (op->onfinish)
     op->onfinish->complete(r);
-
-  _finish_pool_op(op);
+  finish_pool_op(op);
   return 0;
 }
 
-void Objecter::_finish_pool_op(PoolOp *op)
+void Objecter::finish_pool_op(PoolOp *op)
 {
-  assert(rwlock.is_wlocked());
   pool_ops.erase(op->tid);
   logger->set(l_osdc_poolop_active, pool_ops.size());
 
-  if (op->ontimeout) {
-    Mutex::Locker l(timer_lock);
+  if (op->ontimeout)
     timer.cancel_event(op->ontimeout);
-  }
 
   delete op;
 }
@@ -3189,29 +2296,25 @@ void Objecter::get_pool_stats(list<string>& pools, map<string,pool_stat_t> *resu
   ldout(cct, 10) << "get_pool_stats " << pools << dendl;
 
   PoolStatOp *op = new PoolStatOp;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->pools = pools;
   op->pool_stats = result;
   op->onfinish = onfinish;
   op->ontimeout = NULL;
   if (mon_timeout > 0) {
-    Mutex::Locker l(timer_lock);
     op->ontimeout = new C_CancelPoolStatOp(op->tid, this);
     timer.add_event_after(mon_timeout, op->ontimeout);
   }
-
-  RWLock::WLocker wl(rwlock);
-
   poolstat_ops[op->tid] = op;
 
   logger->set(l_osdc_poolstat_active, poolstat_ops.size());
 
-  _poolstat_submit(op);
+  poolstat_submit(op);
 }
 
-void Objecter::_poolstat_submit(PoolStatOp *op)
+void Objecter::poolstat_submit(PoolStatOp *op)
 {
-  ldout(cct, 10) << "_poolstat_submit " << op->tid << dendl;
+  ldout(cct, 10) << "poolstat_submit " << op->tid << dendl;
   monc->send_mon_message(new MGetPoolStats(monc->get_fsid(), op->tid, op->pools, last_seen_pgmap_version));
   op->last_submit = ceph_clock_now(cct);
 
@@ -3220,21 +2323,19 @@ void Objecter::_poolstat_submit(PoolStatOp *op)
 
 void Objecter::handle_get_pool_stats_reply(MGetPoolStatsReply *m)
 {
-  assert(initialized.read());
+  assert(client_lock.is_locked());
+  assert(initialized);
   ldout(cct, 10) << "handle_get_pool_stats_reply " << *m << dendl;
   ceph_tid_t tid = m->get_tid();
 
-  RWLock::WLocker wl(rwlock);
-  map<ceph_tid_t, PoolStatOp *>::iterator iter = poolstat_ops.find(tid);
-  if (iter != poolstat_ops.end()) {
+  if (poolstat_ops.count(tid)) {
     PoolStatOp *op = poolstat_ops[tid];
     ldout(cct, 10) << "have request " << tid << " at " << op << dendl;
     *op->pool_stats = m->pool_stats;
-    if (m->version > last_seen_pgmap_version) {
+    if (m->version > last_seen_pgmap_version)
       last_seen_pgmap_version = m->version;
-    }
     op->onfinish->complete(0);
-    _finish_pool_stat_op(op);
+    finish_pool_stat_op(op);
   } else {
     ldout(cct, 10) << "unknown request " << tid << dendl;
   } 
@@ -3244,9 +2345,8 @@ void Objecter::handle_get_pool_stats_reply(MGetPoolStatsReply *m)
 
 int Objecter::pool_stat_op_cancel(ceph_tid_t tid, int r)
 {
-  assert(initialized.read());
-
-  RWLock::WLocker wl(rwlock);
+  assert(client_lock.is_locked());
+  assert(initialized);
 
   map<ceph_tid_t, PoolStatOp*>::iterator it = poolstat_ops.find(tid);
   if (it == poolstat_ops.end()) {
@@ -3259,21 +2359,17 @@ int Objecter::pool_stat_op_cancel(ceph_tid_t tid, int r)
   PoolStatOp *op = it->second;
   if (op->onfinish)
     op->onfinish->complete(r);
-  _finish_pool_stat_op(op);
+  finish_pool_stat_op(op);
   return 0;
 }
 
-void Objecter::_finish_pool_stat_op(PoolStatOp *op)
+void Objecter::finish_pool_stat_op(PoolStatOp *op)
 {
-  assert(rwlock.is_wlocked());
-
   poolstat_ops.erase(op->tid);
   logger->set(l_osdc_poolstat_active, poolstat_ops.size());
 
-  if (op->ontimeout) {
-    Mutex::Locker l(timer_lock);
+  if (op->ontimeout)
     timer.cancel_event(op->ontimeout);
-  }
 
   delete op;
 }
@@ -3286,6 +2382,7 @@ public:
   C_CancelStatfsOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
 							 objecter(objecter) {}
   void finish(int r) {
+    // note that objecter lock == timer lock, and is already held
     objecter->statfs_op_cancel(tid, -ETIMEDOUT);
   }
 };
@@ -3293,15 +2390,13 @@ public:
 void Objecter::get_fs_stats(ceph_statfs& result, Context *onfinish)
 {
   ldout(cct, 10) << "get_fs_stats" << dendl;
-  RWLock::WLocker l(rwlock);
 
   StatfsOp *op = new StatfsOp;
-  op->tid = last_tid.inc();
+  op->tid = ++last_tid;
   op->stats = &result;
   op->onfinish = onfinish;
   op->ontimeout = NULL;
   if (mon_timeout > 0) {
-    Mutex::Locker l(timer_lock);
     op->ontimeout = new C_CancelStatfsOp(op->tid, this);
     timer.add_event_after(mon_timeout, op->ontimeout);
   }
@@ -3309,13 +2404,11 @@ void Objecter::get_fs_stats(ceph_statfs& result, Context *onfinish)
 
   logger->set(l_osdc_statfs_active, statfs_ops.size());
 
-  _fs_stats_submit(op);
+  fs_stats_submit(op);
 }
 
-void Objecter::_fs_stats_submit(StatfsOp *op)
+void Objecter::fs_stats_submit(StatfsOp *op)
 {
-  assert(rwlock.is_wlocked());
-
   ldout(cct, 10) << "fs_stats_submit" << op->tid << dendl;
   monc->send_mon_message(new MStatfs(monc->get_fsid(), op->tid, last_seen_pgmap_version));
   op->last_submit = ceph_clock_now(cct);
@@ -3325,10 +2418,8 @@ void Objecter::_fs_stats_submit(StatfsOp *op)
 
 void Objecter::handle_fs_stats_reply(MStatfsReply *m)
 {
-  assert(initialized.read());
-
-  RWLock::WLocker wl(rwlock);
-
+  assert(client_lock.is_locked());
+  assert(initialized);
   ldout(cct, 10) << "handle_fs_stats_reply " << *m << dendl;
   ceph_tid_t tid = m->get_tid();
 
@@ -3339,19 +2430,18 @@ void Objecter::handle_fs_stats_reply(MStatfsReply *m)
     if (m->h.version > last_seen_pgmap_version)
       last_seen_pgmap_version = m->h.version;
     op->onfinish->complete(0);
-    _finish_statfs_op(op);
+    finish_statfs_op(op);
   } else {
     ldout(cct, 10) << "unknown request " << tid << dendl;
   }
-  m->put();
   ldout(cct, 10) << "done" << dendl;
+  m->put();
 }
 
 int Objecter::statfs_op_cancel(ceph_tid_t tid, int r)
 {
-  assert(initialized.read());
-
-  RWLock::WLocker wl(rwlock);
+  assert(client_lock.is_locked());
+  assert(initialized);
 
   map<ceph_tid_t, StatfsOp*>::iterator it = statfs_ops.find(tid);
   if (it == statfs_ops.end()) {
@@ -3364,21 +2454,17 @@ int Objecter::statfs_op_cancel(ceph_tid_t tid, int r)
   StatfsOp *op = it->second;
   if (op->onfinish)
     op->onfinish->complete(r);
-  _finish_statfs_op(op);
+  finish_statfs_op(op);
   return 0;
 }
 
-void Objecter::_finish_statfs_op(StatfsOp *op)
+void Objecter::finish_statfs_op(StatfsOp *op)
 {
-  assert(rwlock.is_wlocked());
-
   statfs_ops.erase(op->tid);
   logger->set(l_osdc_statfs_active, statfs_ops.size());
 
-  if (op->ontimeout) {
-    Mutex::Locker l(timer_lock);
+  if (op->ontimeout)
     timer.cancel_event(op->ontimeout);
-  }
 
   delete op;
 }
@@ -3419,43 +2505,28 @@ void Objecter::_sg_read_finish(vector<ObjectExtent>& extents, vector<bufferlist>
 void Objecter::ms_handle_connect(Connection *con)
 {
   ldout(cct, 10) << "ms_handle_connect " << con << dendl;
-  if (!initialized.read())
-    return;
-
   if (con->get_peer_type() == CEPH_ENTITY_TYPE_MON)
     resend_mon_ops();
 }
 
-bool Objecter::ms_handle_reset(Connection *con)
+void Objecter::ms_handle_reset(Connection *con)
 {
-  if (!initialized.read())
-    return false;
   if (con->get_peer_type() == CEPH_ENTITY_TYPE_OSD) {
     //
     int osd = osdmap->identify_osd(con->get_peer_addr());
     if (osd >= 0) {
       ldout(cct, 1) << "ms_handle_reset on osd." << osd << dendl;
-      rwlock.get_write();
       map<int,OSDSession*>::iterator p = osd_sessions.find(osd);
       if (p != osd_sessions.end()) {
 	OSDSession *session = p->second;
-        map<uint64_t, LingerOp *> lresend;
-        session->lock.get_write();
-	_reopen_session(session);
-	_kick_requests(session, lresend);
-        session->lock.unlock();
-        _linger_ops_resend(lresend);
-        rwlock.unlock();
+	reopen_session(session);
+	kick_requests(session);
 	maybe_request_map();
-      } else {
-        rwlock.unlock();
       }
     } else {
       ldout(cct, 10) << "ms_handle_reset on unknown osd addr " << con->get_peer_addr() << dendl;
     }
-    return true;
   }
-  return false;
 }
 
 void Objecter::ms_handle_remote_reset(Connection *con)
@@ -3466,18 +2537,6 @@ void Objecter::ms_handle_remote_reset(Connection *con)
   ms_handle_reset(con);
 }
 
-bool Objecter::ms_get_authorizer(int dest_type,
-				 AuthAuthorizer **authorizer,
-				 bool force_new)
-{
-  if (!initialized.read())
-    return false;
-  if (dest_type == CEPH_ENTITY_TYPE_MON)
-    return true;
-  *authorizer = monc->auth->build_authorizer(dest_type);
-  return *authorizer != NULL;
-}
-
 
 void Objecter::op_target_t::dump(Formatter *f) const
 {
@@ -3492,9 +2551,10 @@ void Objecter::op_target_t::dump(Formatter *f) const
   f->dump_int("precalc_pgid", (int)precalc_pgid);
 }
 
-void Objecter::_dump_active(OSDSession *s)
+void Objecter::dump_active()
 {
-  for (map<ceph_tid_t,Op*>::iterator p = s->ops.begin(); p != s->ops.end(); ++p) {
+  ldout(cct, 20) << "dump_active .. " << num_homeless_ops << " homeless" << dendl;
+  for (map<ceph_tid_t,Op*>::iterator p = ops.begin(); p != ops.end(); ++p) {
     Op *op = p->second;
     ldout(cct, 20) << op->tid << "\t" << op->target.pgid
 		   << "\tosd." << (op->session ? op->session->osd : -1)
@@ -3503,27 +2563,10 @@ void Objecter::_dump_active(OSDSession *s)
   }
 }
 
-void Objecter::_dump_active()
-{
-  ldout(cct, 20) << "dump_active .. " << num_homeless_ops.read() << " homeless" << dendl;
-  for (map<int, OSDSession *>::iterator siter = osd_sessions.begin(); siter != osd_sessions.end(); ++siter) {
-    OSDSession *s = siter->second;
-    s->lock.get_read();
-    _dump_active(s);
-    s->lock.unlock();
-  }
-  _dump_active(homeless_session);
-}
-
-void Objecter::dump_active()
+void Objecter::dump_requests(Formatter *fmt) const
 {
-  rwlock.get_read();
-  _dump_active();
-  rwlock.unlock();
-}
+  assert(client_lock.is_locked());
 
-void Objecter::dump_requests(Formatter *fmt)
-{
   fmt->open_object_section("requests");
   dump_ops(fmt);
   dump_linger_ops(fmt);
@@ -3534,10 +2577,11 @@ void Objecter::dump_requests(Formatter *fmt)
   fmt->close_section(); // requests object
 }
 
-void Objecter::_dump_ops(const OSDSession *s, Formatter *fmt)
+void Objecter::dump_ops(Formatter *fmt) const
 {
-  for (map<ceph_tid_t,Op*>::const_iterator p = s->ops.begin();
-       p != s->ops.end();
+  fmt->open_array_section("ops");
+  for (map<ceph_tid_t,Op*>::const_iterator p = ops.begin();
+       p != ops.end();
        ++p) {
     Op *op = p->second;
     fmt->open_object_section("op");
@@ -3559,27 +2603,14 @@ void Objecter::_dump_ops(const OSDSession *s, Formatter *fmt)
 
     fmt->close_section(); // op object
   }
-}
-
-void Objecter::dump_ops(Formatter *fmt)
-{
-  fmt->open_array_section("ops");
-  rwlock.get_read();
-  for (map<int, OSDSession *>::const_iterator siter = osd_sessions.begin(); siter != osd_sessions.end(); ++siter) {
-    OSDSession *s = siter->second;
-    s->lock.get_read();
-    _dump_ops(s, fmt);
-    s->lock.unlock();
-  }
-  rwlock.unlock();
-  _dump_ops(homeless_session, fmt);
   fmt->close_section(); // ops array
 }
 
-void Objecter::_dump_linger_ops(const OSDSession *s, Formatter *fmt)
+void Objecter::dump_linger_ops(Formatter *fmt) const
 {
-  for (map<uint64_t, LingerOp*>::const_iterator p = s->linger_ops.begin();
-       p != s->linger_ops.end();
+  fmt->open_array_section("linger_ops");
+  for (map<uint64_t, LingerOp*>::const_iterator p = linger_ops.begin();
+       p != linger_ops.end();
        ++p) {
     LingerOp *op = p->second;
     fmt->open_object_section("linger_op");
@@ -3589,27 +2620,14 @@ void Objecter::_dump_linger_ops(const OSDSession *s, Formatter *fmt)
     fmt->dump_stream("registered") << op->registered;
     fmt->close_section(); // linger_op object
   }
-}
-
-void Objecter::dump_linger_ops(Formatter *fmt)
-{
-  fmt->open_array_section("linger_ops");
-  rwlock.get_read();
-  for (map<int, OSDSession *>::const_iterator siter = osd_sessions.begin(); siter != osd_sessions.end(); ++siter) {
-    OSDSession *s = siter->second;
-    s->lock.get_read();
-    _dump_linger_ops(s, fmt);
-    s->lock.unlock();
-  }
-  rwlock.unlock();
-  _dump_linger_ops(homeless_session, fmt);
   fmt->close_section(); // linger_ops array
 }
 
-void Objecter::_dump_command_ops(const OSDSession *s, Formatter *fmt)
+void Objecter::dump_command_ops(Formatter *fmt) const
 {
-  for (map<uint64_t, CommandOp*>::const_iterator p = s->command_ops.begin();
-       p != s->command_ops.end();
+  fmt->open_array_section("command_ops");
+  for (map<uint64_t, CommandOp*>::const_iterator p = command_ops.begin();
+       p != command_ops.end();
        ++p) {
     CommandOp *op = p->second;
     fmt->open_object_section("command_op");
@@ -3625,20 +2643,6 @@ void Objecter::_dump_command_ops(const OSDSession *s, Formatter *fmt)
       fmt->dump_stream("target_pg") << op->target_pg;
     fmt->close_section(); // command_op object
   }
-}
-
-void Objecter::dump_command_ops(Formatter *fmt)
-{
-  fmt->open_array_section("command_ops");
-  rwlock.get_read();
-  for (map<int, OSDSession *>::const_iterator siter = osd_sessions.begin(); siter != osd_sessions.end(); ++siter) {
-    OSDSession *s = siter->second;
-    s->lock.get_read();
-    _dump_command_ops(s, fmt);
-    s->lock.unlock();
-  }
-  rwlock.unlock();
-  _dump_command_ops(homeless_session, fmt);
   fmt->close_section(); // command_ops array
 }
 
@@ -3713,8 +2717,9 @@ bool Objecter::RequestStateHook::call(std::string command, cmdmap_t& cmdmap,
   Formatter *f = new_formatter(format);
   if (!f)
     f = new_formatter("json-pretty");
-  RWLock::RLocker rl(m_objecter->rwlock);
+  m_objecter->client_lock.Lock();
   m_objecter->dump_requests(f);
+  m_objecter->client_lock.Unlock();
   f->flush(out);
   delete f;
   return true;
@@ -3744,25 +2749,10 @@ void Objecter::blacklist_self(bool set)
 
 void Objecter::handle_command_reply(MCommandReply *m)
 {
-  int osd_num = (int)m->get_source().num();
-
-  RWLock::WLocker wl(rwlock);
-
-  map<int, OSDSession *>::iterator siter = osd_sessions.find(osd_num);
-  if (siter == osd_sessions.end()) {
-    ldout(cct, 10) << "handle_command_reply tid " << m->get_tid() << " osd not found" << dendl;
-    m->put();
-    return;
-  }
-
-  OSDSession *s = siter->second;
-
-  s->lock.get_read();
-  map<ceph_tid_t,CommandOp*>::iterator p = s->command_ops.find(m->get_tid());
-  if (p == s->command_ops.end()) {
+  map<ceph_tid_t,CommandOp*>::iterator p = command_ops.find(m->get_tid());
+  if (p == command_ops.end()) {
     ldout(cct, 10) << "handle_command_reply tid " << m->get_tid() << " not found" << dendl;
     m->put();
-    s->lock.unlock();
     return;
   }
 
@@ -3772,78 +2762,56 @@ void Objecter::handle_command_reply(MCommandReply *m)
     ldout(cct, 10) << "handle_command_reply tid " << m->get_tid() << " got reply from wrong connection "
 		   << m->get_connection() << " " << m->get_source_inst() << dendl;
     m->put();
-    s->lock.unlock();
     return;
   }
   if (c->poutbl)
     c->poutbl->claim(m->get_data());
-
-  s->lock.unlock();
-
-
   _finish_command(c, m->r, m->rs);
   m->put();
 }
 
 class C_CancelCommandOp : public Context
 {
-  Objecter::OSDSession *s;
   ceph_tid_t tid;
   Objecter *objecter;
 public:
-  C_CancelCommandOp(Objecter::OSDSession *s, ceph_tid_t tid, Objecter *objecter) : s(s), tid(tid),
-						     objecter(objecter) {}
+  C_CancelCommandOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
+						          objecter(objecter) {}
   void finish(int r) {
-    objecter->command_op_cancel(s, tid, -ETIMEDOUT);
+    // note that objecter lock == timer lock, and is already held
+    objecter->command_op_cancel(tid, -ETIMEDOUT);
   }
 };
 
-int Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
+int Objecter::_submit_command(CommandOp *c, ceph_tid_t *ptid)
 {
-  RWLock::WLocker wl(rwlock);
-
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
-
-  ceph_tid_t tid = last_tid.inc();
+  ceph_tid_t tid = ++last_tid;
   ldout(cct, 10) << "_submit_command " << tid << " " << c->cmd << dendl;
   c->tid = tid;
-
-  {
-   RWLock::WLocker hs_wl(homeless_session->lock);
-  _session_command_op_assign(homeless_session, c);
-  }
-
-  (void)_calc_command_target(c);
-  _assign_command_session(c);
   if (osd_timeout > 0) {
-    Mutex::Locker l(timer_lock);
-    c->ontimeout = new C_CancelCommandOp(c->session, tid, this);
+    c->ontimeout = new C_CancelCommandOp(tid, this);
     timer.add_event_after(osd_timeout, c->ontimeout);
   }
+  command_ops[tid] = c;
+  num_homeless_ops++;
+  (void)recalc_command_target(c);
 
-  if (!c->session->is_homeless()) {
+  if (c->session)
     _send_command(c);
-  } else {
-    int r = _maybe_request_map();
-    assert(r != -EAGAIN); /* because rwlock is already write-locked */
-  }
+  else
+    maybe_request_map();
   if (c->map_check_error)
     _send_command_map_check(c);
   *ptid = tid;
 
-  logger->inc(l_osdc_command_active);
-
+  logger->set(l_osdc_command_active, command_ops.size());
   return 0;
 }
 
-int Objecter::_calc_command_target(CommandOp *c)
+int Objecter::recalc_command_target(CommandOp *c)
 {
-  assert(rwlock.is_wlocked());
-
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
-
+  OSDSession *s = NULL;
   c->map_check_error = 0;
-
   if (c->target_osd >= 0) {
     if (!osdmap->exists(c->target_osd)) {
       c->map_check_error = -ENOENT;
@@ -3855,58 +2823,36 @@ int Objecter::_calc_command_target(CommandOp *c)
       c->map_check_error_str = "osd down";
       return RECALC_OP_TARGET_OSD_DOWN;
     }
-    c->osd = c->target_osd;
+    s = get_session(c->target_osd);
   } else {
     if (!osdmap->have_pg_pool(c->target_pg.pool())) {
       c->map_check_error = -ENOENT;
       c->map_check_error_str = "pool dne";
       return RECALC_OP_TARGET_POOL_DNE;
     }
+    int primary;
     vector<int> acting;
-    osdmap->pg_to_acting_osds(c->target_pg, &acting, &c->osd);
+    osdmap->pg_to_acting_osds(c->target_pg, &acting, &primary);
+    if (primary != -1)
+      s = get_session(primary);
   }
-
-  OSDSession *s;
-  int r = _get_session(c->osd, &s, lc);
-  assert(r != -EAGAIN); /* shouldn't happen as we're holding the write lock */
-
   if (c->session != s) {
-    put_session(s);
+    ldout(cct, 10) << "recalc_command_target " << c->tid << " now " << c->session << dendl;
+    if (s) {
+      if (!c->session)
+	num_homeless_ops--;
+      c->session = s;
+      s->command_ops.push_back(&c->session_item);
+    } else {
+      c->session = NULL;
+      num_homeless_ops++;
+    }
     return RECALC_OP_TARGET_NEED_RESEND;
   }
-
-  put_session(s);
-
-  ldout(cct, 20) << "_recalc_command_target " << c->tid << " no change, " << c->session << dendl;
-
+  ldout(cct, 20) << "recalc_command_target " << c->tid << " no change, " << c->session << dendl;
   return RECALC_OP_TARGET_NO_ACTION;
 }
 
-void Objecter::_assign_command_session(CommandOp *c)
-{
-  assert(rwlock.is_wlocked());
-
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
-
-  OSDSession *s;
-  int r = _get_session(c->osd, &s, lc);
-  assert(r != -EAGAIN); /* shouldn't happen as we're holding the write lock */
-
-  if (c->session != s) {
-    if (c->session) {
-      OSDSession *cs = c->session;
-      cs->lock.get_write();
-      _session_command_op_remove(c->session, c);
-      cs->lock.unlock();
-    }
-    s->lock.get_write();
-    _session_command_op_assign(s, c);
-    s->lock.unlock();
-  }
-
-  put_session(s);
-}
-
 void Objecter::_send_command(CommandOp *c)
 {
   ldout(cct, 10) << "_send_command " << c->tid << dendl;
@@ -3916,18 +2862,17 @@ void Objecter::_send_command(CommandOp *c)
   m->cmd = c->cmd;
   m->set_data(c->inbl);
   m->set_tid(c->tid);
-  c->session->con->send_message(m);
+  messenger->send_message(m, c->session->con);
   logger->inc(l_osdc_command_send);
 }
 
-int Objecter::command_op_cancel(OSDSession *s, ceph_tid_t tid, int r)
+int Objecter::command_op_cancel(ceph_tid_t tid, int r)
 {
-  assert(initialized.read());
+  assert(client_lock.is_locked());
+  assert(initialized);
 
-  RWLock::WLocker wl(rwlock);
-
-  map<ceph_tid_t, CommandOp*>::iterator it = s->command_ops.find(tid);
-  if (it == s->command_ops.end()) {
+  map<ceph_tid_t, CommandOp*>::iterator it = command_ops.find(tid);
+  if (it == command_ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
   }
@@ -3935,70 +2880,23 @@ int Objecter::command_op_cancel(OSDSession *s, ceph_tid_t tid, int r)
   ldout(cct, 10) << __func__ << " tid " << tid << dendl;
 
   CommandOp *op = it->second;
-  _command_cancel_map_check(op);
+  command_cancel_map_check(op);
   _finish_command(op, -ETIMEDOUT, "");
   return 0;
 }
 
 void Objecter::_finish_command(CommandOp *c, int r, string rs)
 {
-  assert(rwlock.is_wlocked());
-
   ldout(cct, 10) << "_finish_command " << c->tid << " = " << r << " " << rs << dendl;
+  c->session_item.remove_myself();
   if (c->prs)
     *c->prs = rs;
   if (c->onfinish)
     c->onfinish->complete(r);
-
-  if (c->ontimeout) {
-    Mutex::Locker l(timer_lock);
+  command_ops.erase(c->tid);
+  if (c->ontimeout)
     timer.cancel_event(c->ontimeout);
-  }
-
-  OSDSession *s = c->session;
-  s->lock.get_write();
-  _session_command_op_remove(c->session, c);
-  s->lock.unlock();
-
   c->put();
 
-  logger->dec(l_osdc_command_active);
-}
-
-Objecter::OSDSession::~OSDSession()
-{
-  // Caller is responsible for re-assigning or
-  // destroying any ops that were assigned to us
-  assert(ops.empty());
-  assert(linger_ops.empty());
-  assert(command_ops.empty());
-
-  for (int i = 0; i < num_locks; i++) {
-    delete completion_locks[i];
-  }
-  delete[] completion_locks;
-}
-
-Objecter::~Objecter()
-{
-  delete osdmap;
-
-  assert(homeless_session->get_nref() == 1);
-  assert(num_homeless_ops.read() == 0);
-  homeless_session->put();
-
-  assert(osd_sessions.empty());
-  assert(poolstat_ops.empty());
-  assert(statfs_ops.empty());
-  assert(pool_ops.empty());
-  assert(waiting_for_map.empty());
-  assert(linger_ops.empty());
-  assert(check_latest_map_lingers.empty());
-  assert(check_latest_map_ops.empty());
-  assert(check_latest_map_commands.empty());
-
-  assert(!tick_event);
-  assert(!m_request_state_hook);
-  assert(!logger);
+  logger->set(l_osdc_command_active, command_ops.size());
 }
-
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h
index 8bf1350..2ede888 100644
--- a/src/osdc/Objecter.h
+++ b/src/osdc/Objecter.h
@@ -17,13 +17,13 @@
 
 #include "include/types.h"
 #include "include/buffer.h"
+#include "include/xlist.h"
 
 #include "osd/OSDMap.h"
 #include "messages/MOSDOp.h"
 
 #include "common/admin_socket.h"
 #include "common/Timer.h"
-#include "common/RWLock.h"
 #include "include/rados/rados_types.h"
 #include "include/rados/rados_types.hpp"
 
@@ -996,7 +996,7 @@ struct ObjectOperation {
 // ----------------
 
 
-class Objecter : public md_config_obs_t, public Dispatcher {
+class Objecter : public md_config_obs_t {
 public:
   // config observer bits
   virtual const char** get_tracked_conf_keys() const;
@@ -1006,22 +1006,19 @@ public:
 public:
   Messenger *messenger;
   MonClient *monc;
-private:
   OSDMap    *osdmap;
-public:
   CephContext *cct;
   std::multimap<string,string> crush_location;
 
-  atomic_t initialized;
+  bool initialized;
 
 private:
-  atomic64_t last_tid;
-  atomic_t inflight_ops;
-  atomic_t client_inc;
+  ceph_tid_t last_tid;
+  int client_inc;
   uint64_t max_linger_id;
-  atomic_t num_unacked;
-  atomic_t num_uncommitted;
-  atomic_t global_op_flags; // flags which are applied to each IO op
+  int num_unacked;
+  int num_uncommitted;
+  int global_op_flags; // flags which are applied to each IO op
   bool keep_balanced_budget;
   bool honor_osdmap_full;
 
@@ -1029,14 +1026,11 @@ public:
   void maybe_request_map();
 private:
 
-  int _maybe_request_map();
-
   version_t last_seen_osdmap_version;
   version_t last_seen_pgmap_version;
 
-  RWLock rwlock;
-  Mutex timer_lock;
-  SafeTimer timer;
+  Mutex &client_lock;
+  SafeTimer &timer;
 
   PerfCounters *logger;
   
@@ -1078,12 +1072,8 @@ public:
     pg_t base_pgid;      ///< explciti pg target, if any
 
     pg_t pgid;           ///< last pg we mapped to
-    unsigned pg_num;     ///< last pg_num we mapped to
-    vector<int> up;      ///< set of up osds for last pg we mapped to
-    vector<int> acting;  ///< set of acting osds for last pg we mapped to
-    int up_primary;      ///< primary for last pg we mapped to based on the up set
-    int acting_primary;  ///< primary for last pg we mapped to based on the acting set
-    int min_size;        ///< the min size of the pool when were were last mapped
+    vector<int> acting;  ///< acting for last pg we mapped to
+    int primary;         ///< primary for last pg we mapped to
 
     bool used_replica;
     bool paused;
@@ -1095,10 +1085,7 @@ public:
 	base_oid(oid),
 	base_oloc(oloc),
 	precalc_pgid(false),
-	pg_num(0),
-	up_primary(-1),
-	acting_primary(-1),
-	min_size(-1),
+	primary(-1),
 	used_replica(false),
 	paused(false),
 	osd(-1)
@@ -1107,8 +1094,9 @@ public:
     void dump(Formatter *f) const;
   };
 
-  struct Op : public RefCountedObject {
+  struct Op {
     OSDSession *session;
+    xlist<Op*>::item session_item;
     int incarnation;
 
     op_target_t target;
@@ -1145,14 +1133,9 @@ public:
     /// true if we should resend this message on failure
     bool should_resend;
 
-    /// true if the throttle budget is get/put on a series of OPs, instead of
-    /// per OP basis, when this flag is set, the budget is acquired before sending
-    /// the very first OP of the series and released upon receiving the last OP reply.
-    bool ctx_budgeted;
-
     Op(const object_t& o, const object_locator_t& ol, vector<OSDOp>& op,
        int f, Context *ac, Context *co, version_t *ov) :
-      session(NULL), incarnation(0),
+      session(NULL), session_item(this), incarnation(0),
       target(o, ol, f),
       con(NULL),
       snapid(CEPH_NOSNAP),
@@ -1163,8 +1146,7 @@ public:
       objver(ov), reply_epoch(NULL),
       map_dne_bound(0),
       budgeted(false),
-      should_resend(true),
-      ctx_budgeted(false) {
+      should_resend(true) {
       ops.swap(op);
       
       /* initialize out_* to match op vector */
@@ -1180,18 +1162,16 @@ public:
       if (target.base_oloc.key == o)
 	target.base_oloc.key.clear();
     }
-
-    bool operator<(const Op& other) const {
-      return tid < other.tid;
-    }
-
-  private:
     ~Op() {
       while (!out_handler.empty()) {
 	delete out_handler.back();
 	out_handler.pop_back();
       }
     }
+
+    bool operator<(const Op& other) const {
+      return tid < other.tid;
+    }
   };
 
   struct C_Op_Map_Latest : public Context {
@@ -1269,24 +1249,11 @@ public:
 
     bufferlist extra_info;
 
-    // The budget associated with this context, once it is set (>= 0),
-    // the budget is not get/released on OP basis, instead the budget
-    // is acquired before sending the first OP and released upon receiving
-    // the last op reply.
-    int ctx_budget;
-
     ListContext() : current_pg(0), current_pg_epoch(0), starting_pg_num(0),
 		    at_end_of_pool(false),
 		    at_end_of_pg(false),
 		    pool_id(0),
-		    pool_snap_seq(0),
-                    max_entries(0),
-                    nspace(),
-                    bl(),
-                    list(),
-                    filter(),
-                    extra_info(),
-                    ctx_budget(-1) {}
+		    pool_snap_seq(0), max_entries(0) {}
 
     bool at_end() const {
       return at_end_of_pool;
@@ -1349,6 +1316,7 @@ public:
 
   // -- osd commands --
   struct CommandOp : public RefCountedObject {
+    xlist<CommandOp*>::item session_item;
     OSDSession *session;
     ceph_tid_t tid;
     vector<string> cmd;
@@ -1357,7 +1325,6 @@ public:
     string *prs;
     int target_osd;
     pg_t target_pg;
-    int osd; /* calculated osd for sending request */
     epoch_t map_dne_bound;
     int map_check_error;           // error to return if map check fails
     const char *map_check_error_str;
@@ -1365,19 +1332,18 @@ public:
     utime_t last_submit;
 
     CommandOp()
-      : session(NULL),
-	tid(0), poutbl(NULL), prs(NULL), target_osd(-1), osd(-1),
+      : session_item(this), session(NULL),
+	tid(0), poutbl(NULL), prs(NULL), target_osd(-1),
 	map_dne_bound(0),
 	map_check_error(0),
 	map_check_error_str(NULL),
 	onfinish(NULL), ontimeout(NULL) {}
   };
 
-  int submit_command(CommandOp *c, ceph_tid_t *ptid);
-  int _calc_command_target(CommandOp *c);
-  void _assign_command_session(CommandOp *c);
+  int _submit_command(CommandOp *c, ceph_tid_t *ptid);
+  int recalc_command_target(CommandOp *c);
   void _send_command(CommandOp *c);
-  int command_op_cancel(OSDSession *s, ceph_tid_t tid, int r);
+  int command_op_cancel(ceph_tid_t tid, int r);
   void _finish_command(CommandOp *c, int r, string rs);
   void handle_command_reply(MCommandReply *m);
 
@@ -1399,10 +1365,10 @@ public:
     version_t *pobjver;
 
     bool registered;
-    bool canceled;
     Context *on_reg_ack, *on_reg_commit;
 
     OSDSession *session;
+    xlist<LingerOp*>::item session_item;
 
     ceph_tid_t register_tid;
     epoch_t map_dne_bound;
@@ -1412,9 +1378,8 @@ public:
 		 snap(CEPH_NOSNAP),
 		 poutbl(NULL), pobjver(NULL),
 		 registered(false),
-		 canceled(false),
 		 on_reg_ack(NULL), on_reg_commit(NULL),
-		 session(NULL),
+		 session(NULL), session_item(this),
 		 register_tid(0),
 		 map_dne_bound(0) {}
 
@@ -1463,51 +1428,28 @@ public:
   };
 
   // -- osd sessions --
-  struct OSDSession : public RefCountedObject {
-    RWLock lock;
-    Mutex **completion_locks;
-
-    // pending ops
-    map<ceph_tid_t,Op*>            ops;
-    map<uint64_t, LingerOp*>  linger_ops;
-    map<ceph_tid_t,CommandOp*>     command_ops;
-
+  struct OSDSession {
+    xlist<Op*> ops;
+    xlist<LingerOp*> linger_ops;
+    xlist<CommandOp*> command_ops;
     int osd;
     int incarnation;
-    int num_locks;
     ConnectionRef con;
 
-    OSDSession(CephContext *cct, int o) :
-      lock("OSDSession"),
-      osd(o),
-      incarnation(0),
-      con(NULL)
-    {
-      num_locks = cct->_conf->objecter_completion_locks_per_session;
-      completion_locks = new Mutex *[num_locks];
-      for (int i = 0; i < num_locks; i++) {
-        completion_locks[i] = new Mutex("OSDSession::completion_lock");
-      }
-    }
-
-    ~OSDSession();
-
-    bool is_homeless() { return (osd == -1); }
-
-    Mutex *get_lock(object_t& oid);
+    OSDSession(int o) : osd(o), incarnation(0), con(NULL) {}
   };
   map<int,OSDSession*> osd_sessions;
 
 
  private:
+  // pending ops
+  map<ceph_tid_t,Op*>       ops;
+  int                       num_homeless_ops;
   map<uint64_t, LingerOp*>  linger_ops;
-
   map<ceph_tid_t,PoolStatOp*>    poolstat_ops;
   map<ceph_tid_t,StatfsOp*>      statfs_ops;
   map<ceph_tid_t,PoolOp*>        pool_ops;
-  atomic_t                  num_homeless_ops;
-
-  OSDSession *homeless_session;
+  map<ceph_tid_t,CommandOp*>     command_ops;
 
   // ops waiting for an osdmap with a new pool or confirmation that
   // the pool does not exist (may be expanded to other uses later)
@@ -1519,11 +1461,9 @@ public:
 
   double mon_timeout, osd_timeout;
 
-  MOSDOp *_prepare_osd_op(Op *op);
-  void _send_op(Op *op, MOSDOp *m = NULL);
-  void _cancel_linger_op(Op *op);
-  void finish_op(OSDSession *session, ceph_tid_t tid);
-  void _finish_op(Op *op);
+  void send_op(Op *op);
+  void cancel_linger_op(Op *op);
+  void finish_op(Op *op);
   static bool is_pg_changed(
     int oldprimary,
     const vector<int>& oldacting,
@@ -1538,47 +1478,30 @@ public:
     RECALC_OP_TARGET_OSD_DOWN,
   };
   bool osdmap_full_flag() const;
-
   bool target_should_be_paused(op_target_t *op);
-  int _calc_target(op_target_t *t, bool any_change=false);
-  int _map_session(op_target_t *op, OSDSession **s,
-		   RWLock::Context& lc);
-
-  void _session_op_assign(OSDSession *s, Op *op);
-  void _session_op_remove(OSDSession *s, Op *op);
-  void _session_linger_op_assign(OSDSession *to, LingerOp *op);
-  void _session_linger_op_remove(OSDSession *from, LingerOp *op);
-  void _session_command_op_assign(OSDSession *to, CommandOp *op);
-  void _session_command_op_remove(OSDSession *from, CommandOp *op);
-
-  int _get_osd_session(int osd, RWLock::Context& lc, OSDSession **psession);
-  int _assign_op_target_session(Op *op, RWLock::Context& lc, bool src_session_locked, bool dst_session_locked);
-  int _get_op_target_session(Op *op, RWLock::Context& lc, OSDSession **psession);
-  int _recalc_linger_op_target(LingerOp *op, RWLock::Context& lc);
-
-  void _linger_submit(LingerOp *info);
-  void _send_linger(LingerOp *info);
+
+  int calc_target(op_target_t *t, bool any_change=false);
+  int recalc_op_target(Op *op);
+  bool recalc_linger_op_target(LingerOp *op);
+
+  void send_linger(LingerOp *info);
   void _linger_ack(LingerOp *info, int r);
   void _linger_commit(LingerOp *info, int r);
 
-  void _check_op_pool_dne(Op *op, bool session_locked);
+  void check_op_pool_dne(Op *op);
   void _send_op_map_check(Op *op);
-  void _op_cancel_map_check(Op *op);
-  void _check_linger_pool_dne(LingerOp *op, bool *need_unregister);
+  void op_cancel_map_check(Op *op);
+  void check_linger_pool_dne(LingerOp *op);
   void _send_linger_map_check(LingerOp *op);
-  void _linger_cancel_map_check(LingerOp *op);
-  void _check_command_map_dne(CommandOp *op);
+  void linger_cancel_map_check(LingerOp *op);
+  void check_command_map_dne(CommandOp *op);
   void _send_command_map_check(CommandOp *op);
-  void _command_cancel_map_check(CommandOp *op);
+  void command_cancel_map_check(CommandOp *op);
 
   void kick_requests(OSDSession *session);
-  void _kick_requests(OSDSession *session, map<uint64_t, LingerOp *>& lresend);
-  void _linger_ops_resend(map<uint64_t, LingerOp *>& lresend);
 
-  int _get_session(int osd, OSDSession **session, RWLock::Context& lc);
-  void put_session(OSDSession *s);
-  void get_session(OSDSession *s);
-  void _reopen_session(OSDSession *session);
+  OSDSession *get_session(int osd);
+  void reopen_session(OSDSession *session);
   void close_session(OSDSession *session);
   
   void _list_reply(ListContext *list_context, int r, Context *final_finish,
@@ -1593,40 +1516,30 @@ public:
    * If throttle_op needs to throttle it will unlock client_lock.
    */
   int calc_op_budget(Op *op);
-  void _throttle_op(Op *op, int op_size=0);
-  int _take_op_budget(Op *op) {
-    assert(rwlock.is_locked());
+  void throttle_op(Op *op, int op_size=0);
+  void take_op_budget(Op *op) {
     int op_budget = calc_op_budget(op);
     if (keep_balanced_budget) {
-      _throttle_op(op, op_budget);
+      throttle_op(op, op_budget);
     } else {
       op_throttle_bytes.take(op_budget);
       op_throttle_ops.take(1);
     }
     op->budgeted = true;
-    return op_budget;
-  }
-  void put_op_budget_bytes(int op_budget) {
-    assert(op_budget >= 0);
-    op_throttle_bytes.put(op_budget);
-    op_throttle_ops.put(1);
   }
   void put_op_budget(Op *op) {
     assert(op->budgeted);
     int op_budget = calc_op_budget(op);
-    put_op_budget_bytes(op_budget);
+    op_throttle_bytes.put(op_budget);
+    op_throttle_ops.put(1);
   }
-  void put_list_context_budget(ListContext *list_context);
   Throttle op_throttle_bytes, op_throttle_ops;
 
  public:
   Objecter(CephContext *cct_, Messenger *m, MonClient *mc,
-	   double mon_timeout,
+	   OSDMap *om, Mutex& l, SafeTimer& t, double mon_timeout,
 	   double osd_timeout) :
-    Dispatcher(cct),
-    messenger(m), monc(mc),
-    osdmap(new OSDMap),
-    cct(cct_),
+    messenger(m), monc(mc), osdmap(om), cct(cct_),
     initialized(false),
     last_tid(0), client_inc(-1), max_linger_id(0),
     num_unacked(0), num_uncommitted(0),
@@ -1634,32 +1547,26 @@ public:
     keep_balanced_budget(false), honor_osdmap_full(true),
     last_seen_osdmap_version(0),
     last_seen_pgmap_version(0),
-    rwlock("Objecter::rwlock"),
-    timer_lock("Objecter::timer_lock"),
-    timer(cct, timer_lock, false),
+    client_lock(l), timer(t),
     logger(NULL), tick_event(NULL),
     m_request_state_hook(NULL),
     num_homeless_ops(0),
-    homeless_session(new OSDSession(cct, -1)),
     mon_timeout(mon_timeout),
     osd_timeout(osd_timeout),
     op_throttle_bytes(cct, "objecter_bytes", cct->_conf->objecter_inflight_op_bytes),
     op_throttle_ops(cct, "objecter_ops", cct->_conf->objecter_inflight_ops)
   { }
-  ~Objecter();
-
-  void init();
-  void start();
-  void shutdown();
-
-  const OSDMap *get_osdmap_read() {
-    rwlock.get_read();
-    return osdmap;
-  }
-  void put_osdmap_read() {
-    rwlock.put_read();
+  ~Objecter() {
+    assert(!tick_event);
+    assert(!m_request_state_hook);
+    assert(!logger);
   }
 
+  void init_unlocked();
+  void init_locked();
+  void shutdown_locked();
+  void shutdown_unlocked();
+
   /**
    * Tell the objecter to throttle outgoing ops according to its
    * budget (in _conf). If you do this, ops can block, in
@@ -1673,8 +1580,7 @@ public:
   void set_honor_osdmap_full() { honor_osdmap_full = true; }
   void unset_honor_osdmap_full() { honor_osdmap_full = false; }
 
-  void _scan_requests(OSDSession *s,
-                     bool force_resend,
+  void scan_requests(bool force_resend,
 		     bool force_resend_writes,
 		     map<ceph_tid_t, Op*>& need_resend,
 		     list<LingerOp*>& need_resend_linger,
@@ -1685,85 +1591,50 @@ public:
 
   // messages
  public:
-  bool ms_dispatch(Message *m);
-  bool ms_can_fast_dispatch_any() const {
-    return false;
-  }
-  bool ms_can_fast_dispatch(Message *m) const {
-    switch (m->get_type()) {
-    case CEPH_MSG_OSD_OPREPLY:
-      /* sadly, we need to solve a deadlock before reenabling.
-       * See tracker issue #9462 */
-      return false;
-    default:
-      return false;
-    }
-  }
-  void ms_fast_dispatch(Message *m) {
-    ms_dispatch(m);
-  }
-
+  void dispatch(Message *m);
   void handle_osd_op_reply(class MOSDOpReply *m);
   void handle_osd_map(class MOSDMap *m);
   void wait_for_osd_map();
 
-  int pool_snap_by_name(int64_t poolid, const char *snap_name, snapid_t *snap);
-  int pool_snap_get_info(int64_t poolid, snapid_t snap, pool_snap_info_t *info);
-  int pool_snap_list(int64_t poolid, vector<uint64_t> *snaps);
 private:
-  bool _promote_lock_check_race(RWLock::Context& lc);
-
   // low-level
-  ceph_tid_t _op_submit(Op *op, RWLock::Context& lc);
-  ceph_tid_t _op_submit_with_budget(Op *op, RWLock::Context& lc, int *ctx_budget = NULL);
+  ceph_tid_t _op_submit(Op *op);
   inline void unregister_op(Op *op);
 
   // public interface
 public:
-  ceph_tid_t op_submit(Op *op, int *ctx_budget = NULL);
+  ceph_tid_t op_submit(Op *op);
   bool is_active() {
-    return !((!inflight_ops.read()) && linger_ops.empty() && poolstat_ops.empty() && statfs_ops.empty());
+    return !(ops.empty() && linger_ops.empty() && poolstat_ops.empty() && statfs_ops.empty());
   }
 
   /**
    * Output in-flight requests
    */
-  void _dump_active(OSDSession *s);
-  void _dump_active();
   void dump_active();
-  void dump_requests(Formatter *fmt);
-  void _dump_ops(const OSDSession *s, Formatter *fmt);
-  void dump_ops(Formatter *fmt);
-  void _dump_linger_ops(const OSDSession *s, Formatter *fmt);
-  void dump_linger_ops(Formatter *fmt);
-  void _dump_command_ops(const OSDSession *s, Formatter *fmt);
-  void dump_command_ops(Formatter *fmt);
+  void dump_requests(Formatter *fmt) const;
+  void dump_ops(Formatter *fmt) const;
+  void dump_linger_ops(Formatter *fmt) const;
+  void dump_command_ops(Formatter *fmt) const;
   void dump_pool_ops(Formatter *fmt) const;
   void dump_pool_stat_ops(Formatter *fmt) const;
   void dump_statfs_ops(Formatter *fmt) const;
 
-  int get_client_incarnation() const { return client_inc.read(); }
-  void set_client_incarnation(int inc) { client_inc.set(inc); }
+  int get_client_incarnation() const { return client_inc; }
+  void set_client_incarnation(int inc) { client_inc = inc; }
 
-  /// wait for epoch; true if we already have it
-  bool wait_for_map(epoch_t epoch, Context *c, int err=0);
-  void _wait_for_new_map(Context *c, epoch_t epoch, int err=0);
+  void wait_for_new_map(Context *c, epoch_t epoch, int err=0);
   void wait_for_latest_osdmap(Context *fin);
-  void get_latest_version(epoch_t oldest, epoch_t neweset, Context *fin);
   void _get_latest_version(epoch_t oldest, epoch_t neweset, Context *fin);
 
   /** Get the current set of global op flags */
-  int get_global_op_flags() { return global_op_flags.read(); }
-  /** Add a flag to the global op flags, not really atomic operation */
-  void add_global_op_flags(int flag) { global_op_flags.set(global_op_flags.read() | flag); } 
-  /** Clear the passed flags from the global op flag set, not really atomic operation */
-  void clear_global_op_flag(int flags) { global_op_flags.set(global_op_flags.read() & ~flags); }
+  int get_global_op_flags() { return global_op_flags; }
+  /** Add a flag to the global op flags */
+  void add_global_op_flags(int flag) { global_op_flags |= flag; }
+  /** Clear the passed flags from the global op flag set */
+  void clear_global_op_flag(int flags) { global_op_flags &= ~flags; }
 
   /// cancel an in-progress request with the given return code
-private:
-  int op_cancel(OSDSession *s, ceph_tid_t tid, int r);
-  friend class C_CancelOp;
-public:
   int op_cancel(ceph_tid_t tid, int r);
 
   // commands
@@ -1778,7 +1649,7 @@ public:
     c->prs = prs;
     c->onfinish = onfinish;
     c->target_osd = osd;
-    return submit_command(c, ptid);
+    return _submit_command(c, ptid);
   }
   int pg_command(pg_t pgid, vector<string>& cmd,
 		 const bufferlist& inbl, ceph_tid_t *ptid,
@@ -1790,7 +1661,7 @@ public:
     c->prs = prs;
     c->onfinish = onfinish;
     c->target_pg = pgid;
-    return submit_command(c, ptid);
+    return _submit_command(c, ptid);
   }
 
   // mid-level helpers
@@ -1798,7 +1669,7 @@ public:
 	       ObjectOperation& op,
 	       const SnapContext& snapc, utime_t mtime, int flags,
 	       Context *onack, Context *oncommit, version_t *objver = NULL) {
-    Op *o = new Op(oid, oloc, op.ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, op.ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->priority = op.priority;
     o->mtime = mtime;
     o->snapc = snapc;
@@ -1816,7 +1687,7 @@ public:
 	     ObjectOperation& op,
 	     snapid_t snapid, bufferlist *pbl, int flags,
 	     Context *onack, version_t *objver = NULL) {
-    Op *o = new Op(oid, oloc, op.ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, onack, NULL, objver);
+    Op *o = new Op(oid, oloc, op.ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, onack, NULL, objver);
     o->priority = op.priority;
     o->snapid = snapid;
     o->outbl = pbl;
@@ -1836,10 +1707,9 @@ public:
 		ObjectOperation& op,
 		bufferlist *pbl, int flags,
 		Context *onack,
-		epoch_t *reply_epoch,
-                int *ctx_budget) {
+		epoch_t *reply_epoch) {
     Op *o = new Op(object_t(), oloc,
-		   op.ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ,
+		   op.ops, flags | global_op_flags | CEPH_OSD_FLAG_READ,
 		   onack, NULL, NULL);
     o->target.precalc_pgid = true;
     o->target.base_pgid = pg_t(hash, oloc.pool);
@@ -1850,11 +1720,7 @@ public:
     o->out_handler.swap(op.out_handler);
     o->out_rval.swap(op.out_rval);
     o->reply_epoch = reply_epoch;
-    if (ctx_budget) {
-      // budget is tracked by listing context
-      o->ctx_budgeted = true;
-    }
-    return op_submit(o, ctx_budget);
+    return op_submit(o);
   }
   ceph_tid_t linger_mutate(const object_t& oid, const object_locator_t& oloc,
 		      ObjectOperation& op,
@@ -1868,7 +1734,6 @@ public:
 		    Context *onack,
 		    version_t *objver);
   void unregister_linger(uint64_t linger_id);
-  void _unregister_linger(uint64_t linger_id);
 
   /**
    * set up initial ops in the op vector, and allocate a final op slot.
@@ -1906,7 +1771,7 @@ public:
     int i = init_ops(ops, 1, extra_ops);
     ops[i].op.op = CEPH_OSD_OP_STAT;
     C_Stat *fin = new C_Stat(psize, pmtime, onfinish);
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, fin, 0, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, fin, 0, objver);
     o->snapid = snap;
     o->outbl = &fin->bl;
     return op_submit(o);
@@ -1923,7 +1788,7 @@ public:
     ops[i].op.extent.length = len;
     ops[i].op.extent.truncate_size = 0;
     ops[i].op.extent.truncate_seq = 0;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
     o->snapid = snap;
     o->outbl = pbl;
     return op_submit(o);
@@ -1941,7 +1806,7 @@ public:
     ops[i].op.extent.length = len;
     ops[i].op.extent.truncate_size = trunc_size;
     ops[i].op.extent.truncate_seq = trunc_seq;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
     o->snapid = snap;
     o->outbl = pbl;
     return op_submit(o);
@@ -1957,7 +1822,7 @@ public:
     ops[i].op.extent.length = len;
     ops[i].op.extent.truncate_size = 0;
     ops[i].op.extent.truncate_seq = 0;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
     o->snapid = snap;
     o->outbl = pbl;
     return op_submit(o);
@@ -1973,7 +1838,7 @@ public:
     ops[i].op.xattr.value_len = 0;
     if (name)
       ops[i].indata.append(name);
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, onfinish, 0, objver);
     o->snapid = snap;
     o->outbl = pbl;
     return op_submit(o);
@@ -1987,7 +1852,7 @@ public:
     int i = init_ops(ops, 1, extra_ops);
     ops[i].op.op = CEPH_OSD_OP_GETXATTRS;
     C_GetAttrs *fin = new C_GetAttrs(attrset, onfinish);
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, fin, 0, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_READ, fin, 0, objver);
     o->snapid = snap;
     o->outbl = &fin->bl;
     return op_submit(o);
@@ -1997,7 +1862,7 @@ public:
 		  snapid_t snap, bufferlist *pbl, int flags,
 		  Context *onfinish,
 	          version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
-    return read(oid, oloc, 0, 0, snap, pbl, flags | global_op_flags.read() | CEPH_OSD_FLAG_READ, onfinish, objver);
+    return read(oid, oloc, 0, 0, snap, pbl, flags | global_op_flags | CEPH_OSD_FLAG_READ, onfinish, objver);
   }
 
      
@@ -2007,7 +1872,7 @@ public:
 		const SnapContext& snapc, int flags,
 	        Context *onack, Context *oncommit,
 	        version_t *objver = NULL) {
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2025,7 +1890,7 @@ public:
     ops[i].op.extent.truncate_size = 0;
     ops[i].op.extent.truncate_seq = 0;
     ops[i].indata = bl;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2043,7 +1908,7 @@ public:
     ops[i].op.extent.truncate_size = 0;
     ops[i].op.extent.truncate_seq = 0;
     ops[i].indata = bl;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2062,7 +1927,7 @@ public:
     ops[i].op.extent.truncate_size = trunc_size;
     ops[i].op.extent.truncate_seq = trunc_seq;
     ops[i].indata = bl;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2077,7 +1942,7 @@ public:
     ops[i].op.extent.offset = 0;
     ops[i].op.extent.length = bl.length();
     ops[i].indata = bl;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2094,7 +1959,7 @@ public:
     ops[i].op.extent.offset = trunc_size;
     ops[i].op.extent.truncate_size = trunc_size;
     ops[i].op.extent.truncate_seq = trunc_seq;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2108,7 +1973,7 @@ public:
     ops[i].op.op = CEPH_OSD_OP_ZERO;
     ops[i].op.extent.offset = off;
     ops[i].op.extent.length = len;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2135,7 +2000,7 @@ public:
     int i = init_ops(ops, 1, extra_ops);
     ops[i].op.op = CEPH_OSD_OP_CREATE;
     ops[i].op.flags = create_flags;
-    Op *o = new Op(oid, oloc, ops, global_flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, global_flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2147,7 +2012,7 @@ public:
     vector<OSDOp> ops;
     int i = init_ops(ops, 1, extra_ops);
     ops[i].op.op = CEPH_OSD_OP_DELETE;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2159,7 +2024,7 @@ public:
     vector<OSDOp> ops;
     int i = init_ops(ops, 1, extra_ops);
     ops[i].op.op = op;
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->snapc = snapc;
     return op_submit(o);
   }
@@ -2176,7 +2041,7 @@ public:
     if (name)
       ops[i].indata.append(name);
     ops[i].indata.append(bl);
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2193,7 +2058,7 @@ public:
     ops[i].op.xattr.value_len = 0;
     if (name)
       ops[i].indata.append(name);
-    Op *o = new Op(oid, oloc, ops, flags | global_op_flags.read() | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
+    Op *o = new Op(oid, oloc, ops, flags | global_op_flags | CEPH_OSD_FLAG_WRITE, onack, oncommit, objver);
     o->mtime = mtime;
     o->snapc = snapc;
     return op_submit(o);
@@ -2207,8 +2072,6 @@ public:
 private:
   void pool_op_submit(PoolOp *op);
   void _pool_op_submit(PoolOp *op);
-  void _finish_pool_op(PoolOp *op);
-  void _do_delete_pool(int64_t pool, Context *onfinish);
 public:
   int create_pool_snap(int64_t pool, string& snapName, Context *onfinish);
   int allocate_selfmanaged_snap(int64_t pool, snapid_t *psnapid, Context *onfinish);
@@ -2218,32 +2081,32 @@ public:
   int create_pool(string& name, Context *onfinish, uint64_t auid=0,
 		  int crush_rule=-1);
   int delete_pool(int64_t pool, Context *onfinish);
-  int delete_pool(const string& name, Context *onfinish);
   int change_pool_auid(int64_t pool, Context *onfinish, uint64_t auid);
 
   void handle_pool_op_reply(MPoolOpReply *m);
   int pool_op_cancel(ceph_tid_t tid, int r);
+  void finish_pool_op(PoolOp *op);
 
   // --------------------------
   // pool stats
 private:
-  void _poolstat_submit(PoolStatOp *op);
+  void poolstat_submit(PoolStatOp *op);
 public:
   void handle_get_pool_stats_reply(MGetPoolStatsReply *m);
   void get_pool_stats(list<string>& pools, map<string,pool_stat_t> *result,
 		      Context *onfinish);
   int pool_stat_op_cancel(ceph_tid_t tid, int r);
-  void _finish_pool_stat_op(PoolStatOp *op);
+  void finish_pool_stat_op(PoolStatOp *op);
 
   // ---------------------------
   // df stats
 private:
-  void _fs_stats_submit(StatfsOp *op);
+  void fs_stats_submit(StatfsOp *op);
 public:
   void handle_fs_stats_reply(MStatfsReply *m);
   void get_fs_stats(struct ceph_statfs& result, Context *onfinish);
   int statfs_op_cancel(ceph_tid_t tid, int r);
-  void _finish_statfs_op(StatfsOp *op);
+  void finish_statfs_op(StatfsOp *op);
 
   // ---------------------------
   // some scatter/gather hackery
@@ -2322,12 +2185,8 @@ public:
   }
 
   void ms_handle_connect(Connection *con);
-  bool ms_handle_reset(Connection *con);
+  void ms_handle_reset(Connection *con);
   void ms_handle_remote_reset(Connection *con);
-  bool ms_get_authorizer(int dest_type,
-			 AuthAuthorizer **authorizer,
-			 bool force_new);
-
   void blacklist_self(bool set);
 };
 
diff --git a/src/osdc/Striper.cc b/src/osdc/Striper.cc
index d99518a..bde3284 100644
--- a/src/osdc/Striper.cc
+++ b/src/osdc/Striper.cc
@@ -27,7 +27,7 @@
 
 
 void Striper::file_to_extents(CephContext *cct, const char *object_format,
-			    const ceph_file_layout *layout,
+			    ceph_file_layout *layout,
 			    uint64_t offset, uint64_t len, uint64_t trunc_size,
 			    vector<ObjectExtent>& extents,
 			    uint64_t buffer_offset)
@@ -39,7 +39,7 @@ void Striper::file_to_extents(CephContext *cct, const char *object_format,
 }
 
 void Striper::file_to_extents(CephContext *cct, const char *object_format,
-			      const ceph_file_layout *layout,
+			      ceph_file_layout *layout,
 			      uint64_t offset, uint64_t len, uint64_t trunc_size,
 			      map<object_t,vector<ObjectExtent> >& object_extents,
 			      uint64_t buffer_offset)
@@ -177,7 +177,7 @@ void Striper::extent_to_file(CephContext *cct, ceph_file_layout *layout,
   }
 }
 
-uint64_t Striper::object_truncate_size(CephContext *cct, const ceph_file_layout *layout,
+uint64_t Striper::object_truncate_size(CephContext *cct, ceph_file_layout *layout,
 				       uint64_t objectno, uint64_t trunc_size)
 {
   uint64_t obj_trunc_size;
diff --git a/src/osdc/Striper.h b/src/osdc/Striper.h
index cc5c0ed..bd61fc8 100644
--- a/src/osdc/Striper.h
+++ b/src/osdc/Striper.h
@@ -29,19 +29,19 @@ class CephContext;
      * ranges in objects on (primary) osds)
      */
     static void file_to_extents(CephContext *cct, const char *object_format,
-				const ceph_file_layout *layout,
+				ceph_file_layout *layout,
 				uint64_t offset, uint64_t len, uint64_t trunc_size,
 				map<object_t, vector<ObjectExtent> >& extents,
 				uint64_t buffer_offset=0);
 
     static void file_to_extents(CephContext *cct, const char *object_format,
-				const ceph_file_layout *layout,
+				ceph_file_layout *layout,
 				uint64_t offset, uint64_t len, uint64_t trunc_size,
 				vector<ObjectExtent>& extents,
 				uint64_t buffer_offset=0);
 
     static void file_to_extents(CephContext *cct, inodeno_t ino,
-				const ceph_file_layout *layout,
+				ceph_file_layout *layout,
 				uint64_t offset, uint64_t len, uint64_t trunc_size,
 				vector<ObjectExtent>& extents) {
       // generate prefix/format
@@ -61,7 +61,7 @@ class CephContext;
 			       uint64_t objectno, uint64_t off, uint64_t len,
 			       vector<pair<uint64_t, uint64_t> >& extents);
 
-    static uint64_t object_truncate_size(CephContext *cct, const ceph_file_layout *layout,
+    static uint64_t object_truncate_size(CephContext *cct, ceph_file_layout *layout,
 					 uint64_t objectno, uint64_t trunc_size);
 
     /*
diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py
index 9873061..8f2eb8f 100644
--- a/src/pybind/ceph_argparse.py
+++ b/src/pybind/ceph_argparse.py
@@ -829,7 +829,7 @@ def validate(args, signature, partial=False):
                 break
 
             # out of arguments for a required param?
-            # Either return (if partial validation) or raise
+            # Either return (if partial validation) or raise 
             if not myarg and desc.req:
                 if desc.N and desc.numseen < 1:
                     # wanted N, didn't even get 1
@@ -1013,7 +1013,7 @@ def find_cmd_target(childargs):
 
     return 'mon', ''
 
-def send_command(cluster, target=('mon', ''), cmd=None, inbuf='', timeout=0,
+def send_command(cluster, target=('mon', ''), cmd=None, inbuf='', timeout=0, 
                  verbose=False):
     """
     Send a command to a daemon using librados's
diff --git a/src/pybind/ceph_rest_api.py b/src/pybind/ceph_rest_api.py
index 77adbe7..d940db6 100755
--- a/src/pybind/ceph_rest_api.py
+++ b/src/pybind/ceph_rest_api.py
@@ -361,7 +361,7 @@ def handler(catchall_path=None, fmt=None, target=None):
     Main endpoint handler; generic for every endpoint, including catchall.
     Handles the catchall, anything with <.fmt>, anything with embedded
     <target>.  Partial match or ?help cause the HTML-table
-    "show_human_help" output.
+    "show_human_help" output.  
     '''
 
     ep = catchall_path or flask.request.endpoint
diff --git a/src/pybind/cephfs.py b/src/pybind/cephfs.py
index 60849ae..13a8262 100644
--- a/src/pybind/cephfs.py
+++ b/src/pybind/cephfs.py
@@ -167,7 +167,7 @@ class LibCephFS(object):
 
     def shutdown(self):
         """
-        Unmount and destroy the ceph mount handle.
+        Unmount and destroy the ceph mount handle. 
         """
         if self.state != "shutdown":
             self.libcephfs.ceph_shutdown(self.cluster)
diff --git a/src/pybind/rados.py b/src/pybind/rados.py
index 93e5040..ec68919 100644
--- a/src/pybind/rados.py
+++ b/src/pybind/rados.py
@@ -144,6 +144,7 @@ class RadosThread(threading.Thread):
 POLL_TIME_INCR = 0.5
 
 def run_in_thread(target, args, timeout=0):
+    import sys
     interrupt = False
 
     countdown = timeout
@@ -159,7 +160,7 @@ def run_in_thread(target, args, timeout=0):
         # poll for thread exit
         while t.is_alive():
             t.join(POLL_TIME_INCR)
-            if timeout and t.is_alive():
+            if timeout:
                 countdown = countdown - POLL_TIME_INCR
                 if countdown <= 0:
                     raise KeyboardInterrupt
@@ -181,7 +182,7 @@ def run_in_thread(target, args, timeout=0):
 class Rados(object):
     """librados python wrapper"""
     def require_state(self, *args):
-        """
+        """ 
         Checks if the Rados object is in a special state
 
         :raises: RadosStateError
@@ -245,7 +246,8 @@ Rados object in state %s." % (self.state))
 
     def shutdown(self):
         """
-        Disconnects from the cluster.
+        Disconnects from the cluster.  Call this explicitly when a
+        Rados.connect()ed object is no longer used.
         """
         if (self.__dict__.has_key("state") and self.state != "shutdown"):
             run_in_thread(self.librados.rados_shutdown, (self.cluster,))
@@ -259,13 +261,10 @@ Rados object in state %s." % (self.state))
         self.shutdown()
         return False
 
-    def __del__(self):
-        self.shutdown()
-
     def version(self):
         """
         Get the version number of the ``librados`` C library.
-
+    
         :returns: a tuple of ``(major, minor, extra)`` components of the
                   librados version
         """
@@ -409,7 +408,7 @@ Rados object in state %s." % (self.state))
 
     def connect(self, timeout=0):
         """
-        Connect to the cluster.
+        Connect to the cluster.  Use shutdown() to release resources.
         """
         self.require_state("configuring")
         ret = run_in_thread(self.librados.rados_connect, (self.cluster,),
@@ -421,14 +420,14 @@ Rados object in state %s." % (self.state))
     def get_cluster_stats(self):
         """
         Read usage info about the cluster
-
+        
         This tells you total space, space used, space available, and number
         of objects. These are not updated immediately when data is written,
         they are eventually consistent.
 
         :returns: dict - contains the following keys:
 
-            - ``kb`` (int) - total space
+            - ``kb`` (int) - total space 
 
             - ``kb_used`` (int) - space used
 
@@ -520,7 +519,7 @@ Rados object in state %s." % (self.state))
         The pool is removed from the cluster immediately,
         but the actual data is deleted in the background.
 
-        :param pool_name: name of the pool to delete
+        :param pool_name: name of the pool to delete 
         :type pool_name: str
 
         :raises: :class:`TypeError`, :class:`Error`
@@ -535,7 +534,7 @@ Rados object in state %s." % (self.state))
 
     def list_pools(self):
         """
-        Gets a list of pool names.
+        Gets a list of pool names. 
 
         :returns: list - of pool names.
         """
@@ -572,13 +571,13 @@ Rados object in state %s." % (self.state))
         Create an io context
 
         The io context allows you to perform operations within a particular
-        pool.
+        pool. 
 
-        :param ioctx_name: name of the pool
+        :param ioctx_name: name of the pool 
         :type ioctx_name: str
 
         :raises: :class:`TypeError`, :class:`Error`
-        :returns: Ioctx - Rados Ioctx object
+        :returns: Ioctx - Rados Ioctx object 
         """
         self.require_state("connected")
         if not isinstance(ioctx_name, str):
@@ -595,6 +594,7 @@ Rados object in state %s." % (self.state))
         mon_command[_target](cmd, inbuf, outbuf, outbuflen, outs, outslen)
         returns (int ret, string outbuf, string outs)
         """
+        import sys
         self.require_state("connected")
         outbufp = pointer(pointer(c_char()))
         outbuflen = c_long()
@@ -632,6 +632,7 @@ Rados object in state %s." % (self.state))
         osd_command(osdid, cmd, inbuf, outbuf, outbuflen, outs, outslen)
         returns (int ret, string outbuf, string outs)
         """
+        import sys
         self.require_state("connected")
         outbufp = pointer(pointer(c_char()))
         outbuflen = c_long()
@@ -661,6 +662,7 @@ Rados object in state %s." % (self.state))
         pg_command(pgid, cmd, inbuf, outbuf, outbuflen, outs, outslen)
         returns (int ret, string outbuf, string outs)
         """
+        import sys
         self.require_state("connected")
         outbufp = pointer(pointer(c_char()))
         outbuflen = c_long()
@@ -778,7 +780,7 @@ ioctx '%s'" % self.ioctx.name)
         """
         Get the next Snapshot
 
-        :raises: :class:`Error`, StopIteration
+        :raises: :class:`Error`, StopIteration 
         :returns: Snap - next snapshot
         """
         if (self.cur_snap >= self.max_snap):
@@ -868,8 +870,8 @@ class Completion(object):
                              (self.rados_comp,))
 
     def __del__(self):
-        """
-        Release a completion
+        """ 
+        Release a completion 
 
         Call this when you no longer need the completion. It may not be
         freed immediately if the operation is not acked and committed.
@@ -903,8 +905,8 @@ class Ioctx(object):
         self.close()
 
     def __aio_safe_cb(self, completion, _):
-        """
-        Callback to onsafe() for asynchronous operations
+        """ 
+        Callback to onsafe() for asynchronous operations 
         """
         cb = None
         with self.lock:
@@ -914,8 +916,8 @@ class Ioctx(object):
         return 0
 
     def __aio_complete_cb(self, completion, _):
-        """
-        Callback to oncomplete() for asynchronous operations
+        """ 
+        Callback to oncomplete() for asynchronous operations 
         """
         cb = None
         with self.lock:
@@ -936,7 +938,7 @@ class Ioctx(object):
         :type onsafe: completion
 
         :raises: :class:`Error`
-        :returns: completion object
+        :returns: completion object 
         """
         completion = c_void_p(0)
         complete_cb = None
@@ -979,7 +981,7 @@ class Ioctx(object):
         :type onsafe: completion
 
         :raises: :class:`Error`
-        :returns: completion object
+        :returns: completion object 
         """
         completion = self.__get_completion(oncomplete, onsafe)
         ret = run_in_thread(self.librados.rados_aio_write,
@@ -1011,7 +1013,7 @@ class Ioctx(object):
         :type onsafe: completion
 
         :raises: :class:`Error`
-        :returns: completion object
+        :returns: completion object 
         """
         completion = self.__get_completion(oncomplete, onsafe)
         ret = run_in_thread(self.librados.rados_aio_write_full,
@@ -1042,7 +1044,7 @@ class Ioctx(object):
         :type onsafe: completion
 
         :raises: :class:`Error`
-        :returns: completion object
+        :returns: completion object 
         """
         completion = self.__get_completion(oncomplete, onsafe)
         ret = run_in_thread(self.librados.rados_aio_append,
@@ -1205,7 +1207,7 @@ class Ioctx(object):
 
         :raises: :class:`TypeError`
         :raises: :class:`LogicError`
-        :returns: int - 0 on success
+        :returns: int - number of bytes written 
         """
         self.require_ioctx_open()
         if not isinstance(key, str):
@@ -1270,7 +1272,7 @@ returned %d, but should return zero on success." % (self.name, ret))
 
         :raises: :class:`TypeError`
         :raises: :class:`LogicError`
-        :returns: int - 0 on success
+        :returns: int - number of bytes written
         """
         self.require_ioctx_open()
         if not isinstance(key, str):
@@ -1297,7 +1299,7 @@ returned %d, but should return zero on success." % (self.name, ret))
         :param key: name of the object
         :type key: str
         :param length: the number of bytes to read (default=8192)
-        :type length: int
+        :type length: int 
         :param offset: byte offset in the object to begin reading at
         :type offset: int
 
@@ -1404,7 +1406,7 @@ returned %d, but should return zero on success." % (self.name, ret))
         :raises: :class:`Error`
         :returns: int - 0 on success, otherwise raises error
         """
-
+        
         self.require_ioctx_open()
         if not isinstance(key, str):
             raise TypeError('key must be a string')
@@ -1417,7 +1419,7 @@ returned %d, but should return zero on success." % (self.name, ret))
     def stat(self, key):
         """
         Get object stats (size/mtime)
-
+        
         :param key: the name of the object to get stats from
         :type key: str
 
@@ -1441,7 +1443,7 @@ returned %d, but should return zero on success." % (self.name, ret))
     def get_xattr(self, key, xattr_name):
         """
         Get the value of an extended attribute on an object.
-
+        
         :param key: the name of the object to get xattr from
         :type key: str
         :param xattr_name: which extended attribute to read
@@ -1471,7 +1473,7 @@ returned %d, but should return zero on success." % (self.name, ret))
     def get_xattrs(self, oid):
         """
         Start iterating over xattrs on an object.
-
+        
         :param oid: the name of the object to get xattrs from
         :type key: str
 
@@ -1492,7 +1494,7 @@ returned %d, but should return zero on success." % (self.name, ret))
     def set_xattr(self, key, xattr_name, xattr_value):
         """
         Set an extended attribute on an object.
-
+        
         :param key: the name of the object to set xattr to
         :type key: str
         :param xattr_name: which extended attribute to set
@@ -1521,7 +1523,7 @@ returned %d, but should return zero on success." % (self.name, ret))
     def rm_xattr(self, key, xattr_name):
         """
         Removes an extended attribute on from an object.
-
+        
         :param key: the name of the object to remove xattr from
         :type key: str
         :param xattr_name: which extended attribute to remove
@@ -1544,7 +1546,7 @@ returned %d, but should return zero on success." % (self.name, ret))
         return True
 
     def list_objects(self):
-        """
+        """ 
         Get ObjectIterator on rados.Ioctx object.
 
         :returns: ObjectIterator
@@ -1553,7 +1555,7 @@ returned %d, but should return zero on success." % (self.name, ret))
         return ObjectIterator(self)
 
     def list_snaps(self):
-        """
+        """ 
         Get SnapIterator on rados.Ioctx object.
 
         :returns: SnapIterator
@@ -1711,7 +1713,7 @@ MONITOR_LEVELS = [
    "debug",
    "info",
    "warn", "warning",
-   "err", "error",
+   "err", "error", 
    "sec",
    ]
 
diff --git a/src/pybind/rbd.py b/src/pybind/rbd.py
index a3512ad..ab093ce 100644
--- a/src/pybind/rbd.py
+++ b/src/pybind/rbd.py
@@ -456,7 +456,7 @@ class Image(object):
             pool = create_string_buffer(size)
             name = create_string_buffer(size)
             snapname = create_string_buffer(size)
-            ret = self.librbd.rbd_get_parent_info(self.image, pool, len(pool),
+            ret = self.librbd.rbd_get_parent_info(self.image, pool, len(pool), 
                 name, len(name), snapname, len(snapname))
             if ret == -errno.ERANGE:
                 size *= 2
diff --git a/src/rbd.cc b/src/rbd.cc
index 661af01..f8c4307 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -11,14 +11,16 @@
 #include "include/int_types.h"
 
 #include "mon/MonClient.h"
+#include "mon/MonMap.h"
 #include "common/config.h"
 
+#include "auth/KeyRing.h"
 #include "common/errno.h"
 #include "common/ceph_argparse.h"
 #include "common/strtol.h"
 #include "global/global_init.h"
 #include "common/safe_io.h"
-#include "include/krbd.h"
+#include "common/secret.h"
 #include "include/stringify.h"
 #include "include/rados/librados.hpp"
 #include "include/rbd/librbd.hpp"
@@ -29,8 +31,8 @@
 #include "include/compat.h"
 #include "common/blkdev.h"
 
-#include <boost/scope_exit.hpp>
 #include <boost/scoped_ptr.hpp>
+#include <dirent.h>
 #include <errno.h>
 #include <iostream>
 #include <memory>
@@ -46,7 +48,6 @@
 #include "include/util.h"
 
 #include "common/Formatter.h"
-#include "common/Throttle.h"
 
 #if defined(__linux__)
 #include <linux/fs.h>
@@ -56,6 +57,8 @@
 #include <sys/param.h>
 #endif
 
+#include <blkid/blkid.h>
+
 #define MAX_SECRET_LEN 1000
 #define MAX_POOL_NAME_SIZE 128
 
@@ -64,6 +67,7 @@
 static string dir_oid = RBD_DIRECTORY;
 static string dir_info_oid = RBD_INFO;
 
+bool udevadm_settle = true;
 bool progress = true;
 bool resize_allow_shrink = false;
 
@@ -149,6 +153,7 @@ void usage()
 "  --shared <tag>                     take a shared (rather than exclusive) lock\n"
 "  --format <output-format>           output format (default: plain, json, xml)\n"
 "  --pretty-format                    make json or xml output more readable\n"
+"  --no-settle                        do not wait for udevadm to settle on map/unmap\n"
 "  --no-progress                      do not show progress for long-running commands\n"
 "  -o, --options <map-options>        options to use when mapping an image\n"
 "  --read-only                        set device readonly when mapping image\n"
@@ -481,7 +486,7 @@ static int do_show_info(const char *imgname, librbd::Image& image,
   string parent_pool, parent_name, parent_snapname;
   uint8_t old_format;
   uint64_t overlap, features;
-  bool snap_protected = false;
+  bool snap_protected;
   int r;
 
   r = image.stat(info, sizeof(info));
@@ -926,7 +931,7 @@ static int do_bench_write(librbd::Image& image, uint64_t io_size,
 
   printf("  SEC       OPS   OPS/SEC   BYTES/SEC\n");
   uint64_t off;
-  for (off = 0; off < io_bytes; ) {
+  for (off = 0; off < io_bytes; off += io_size) {
     b.wait_for(io_threads - 1);
     i = 0;
     while (i < io_threads && off < io_bytes &&
@@ -984,125 +989,92 @@ struct ExportContext {
   {}
 };
 
-class AioExportContext : public Context
+static int export_read_cb(uint64_t ofs, size_t len, const char *buf, void *arg)
 {
-public:
-  AioExportContext(SimpleThrottle &simple_throttle, librbd::Image &image,
-                   uint64_t offset, uint64_t length, int fd)
-    : m_aio_completion(
-        new librbd::RBD::AioCompletion(this, &AioExportContext::aio_callback)),
-      m_throttle(simple_throttle),
-      m_offset(offset),
-      m_fd(fd)
-  {
-    m_throttle.start_op();
-    int r = image.aio_read(offset, length, m_bufferlist, m_aio_completion);
-    if (r < 0) {
-      cerr << "rbd: error requesting read from source image" << std::endl;
-      m_throttle.end_op(r);
-    }
-  }
-
-  virtual ~AioExportContext()
-  {
-    m_aio_completion->release();
-  }
-
-  virtual void finish(int r)
-  {
-    BOOST_SCOPE_EXIT((&m_throttle) (&r))
-    {
-      m_throttle.end_op(r);
-    } BOOST_SCOPE_EXIT_END
-
-    if (r < 0) {
-      cerr << "rbd: error reading from source image at offset "
-           << m_offset << ": " << cpp_strerror(r) << std::endl;
-      return;
-    }
-
-    assert(m_bufferlist.length() == static_cast<size_t>(r));
-    if (m_fd != STDOUT_FILENO) {
-      if (m_bufferlist.is_zero()) {
-        return;
-      }
+  ssize_t ret;
+  ExportContext *ec = static_cast<ExportContext *>(arg);
+  int fd = ec->fd;
+  static char *localbuf = NULL;
+  static size_t maplen = 0;
+
+  if (fd == 1) {
+    if (!buf) {
+      // can't seek stdout; need actual data to write
+      if (maplen < len) {
+	// never mapped, or need to map larger
+	int r;
+	if (localbuf != NULL){
+	  if ((r = munmap(localbuf, len)) < 0) {
+	    cerr << "rbd: error " << r << "munmap'ing buffer" << std::endl;
+	    return errno;
+	  }
+	}
 
-      r = lseek64(m_fd, m_offset, SEEK_SET);
-      if (static_cast<uint64_t>(r) != m_offset) {
-        cerr << "rbd: error seeking destination image to offset "
-             << m_offset << std::endl;
-        r = -errno;
-        return;
+	maplen = len;
+	localbuf = (char *)mmap(NULL, maplen, PROT_READ,
+			        MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+	if (localbuf == MAP_FAILED) {
+	  cerr << "rbd: MAP_FAILED mmap'ing buffer for zero writes"
+	       << std::endl;
+	  return -ENOMEM;
+	}
       }
+      ret = write(fd, localbuf, len);
+    } else {
+      ret = write(fd, buf, len);
     }
-
-    r = m_bufferlist.write_fd(m_fd);
-    if (r < 0) {
-      cerr << "rbd: error writing to destination image at offset "
-           << m_offset << std::endl;
+  } else {		// not stdout
+    if (!buf || buf_is_zero(buf, len)) {
+      /* a hole */
+      return 0;
     }
+
+    ret = lseek64(fd, ofs, SEEK_SET);
+    if (ret < 0)
+      return -errno;
+    ret = write(fd, buf, len);
+    ec->pc.update_progress(ofs, ec->totalsize);
   }
 
-  static void aio_callback(librbd::completion_t completion, void *arg)
-  {
-    librbd::RBD::AioCompletion *aio_completion =
-      reinterpret_cast<librbd::RBD::AioCompletion*>(completion);
-    AioExportContext *export_context = reinterpret_cast<AioExportContext*>(arg);
-    export_context->complete(aio_completion->get_return_value());
-  }
-
-private:
-  librbd::RBD::AioCompletion *m_aio_completion;
-  SimpleThrottle &m_throttle;
-  bufferlist m_bufferlist;
-  uint64_t m_offset;
-  int m_fd;
-};
+  if (ret < 0)
+    return -errno;
+
+  return 0;
+}
 
 static int do_export(librbd::Image& image, const char *path)
 {
+  int64_t r;
   librbd::image_info_t info;
-  int64_t r = image.stat(info, sizeof(info));
+  int fd;
+
+  r = image.stat(info, sizeof(info));
   if (r < 0)
     return r;
 
-  int fd;
-  int max_concurrent_ops;
-  bool to_stdout = (strcmp(path, "-") == 0);
-  if (to_stdout) {
-    fd = STDOUT_FILENO;
-    max_concurrent_ops = 1;
-  } else {
-    max_concurrent_ops = max(g_conf->rbd_concurrent_management_ops, 1);
+  if (strcmp(path, "-") == 0)
+    fd = 1;
+  else
     fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0644);
-    if (fd < 0) {
-      return -errno;
-    }
-  }
-
-  MyProgressContext pc("Exporting image");
+  if (fd < 0)
+    return -errno;
 
-  SimpleThrottle throttle(max_concurrent_ops, false);
-  uint64_t period = image.get_stripe_count() * (1ull << info.order);
-  for (uint64_t offset = 0; offset < info.size; offset += period) {
-    uint64_t length = min(period, info.size - offset);
-    new AioExportContext(throttle, image, offset, length, fd);
-    pc.update_progress(offset, info.size);
-  }
+  ExportContext ec(&image, fd, info.size);
+  r = image.read_iterate2(0, info.size, export_read_cb, (void *)&ec);
+  if (r < 0)
+    goto out;
 
-  r = throttle.wait_for_ret();
-  if (!to_stdout) {
-    if (r >= 0) {
-      r = ftruncate(fd, info.size);
-    }
-    close(fd);
-  }
+  if (fd != 1)
+    r = ftruncate(fd, info.size);
+  if (r < 0)
+    goto out;
 
-  if (r < 0) {
-    pc.fail();
-  } else {
-    pc.finish();
-  }
+ out:
+  close(fd);
+  if (r < 0)
+    ec.pc.fail();
+  else
+    ec.pc.finish();
   return r;
 }
 
@@ -1298,8 +1270,8 @@ static void update_snap_name(char *imgname, char **snap)
     *snap = s;
 }
 
-static void set_pool_image_name(const char *orig_img, char **new_pool, 
-				char **new_img, char **snap)
+static void set_pool_image_name(const char *orig_pool, const char *orig_img,
+                                char **new_pool, char **new_img, char **snap)
 {
   const char *sep;
 
@@ -1323,53 +1295,6 @@ done_img:
   update_snap_name(*new_img, snap);
 }
 
-class AioImportContext : public Context
-{
-public:
-  AioImportContext(SimpleThrottle &simple_throttle, librbd::Image &image,
-                   bufferlist &bl, uint64_t offset)
-    : m_throttle(simple_throttle),
-      m_aio_completion(
-        new librbd::RBD::AioCompletion(this, &AioImportContext::aio_callback)),
-      m_offset(offset)
-  {
-    m_throttle.start_op();
-
-    int r = image.aio_write(m_offset, bl.length(), bl, m_aio_completion);
-    if (r < 0) {
-      cerr << "rbd: error requesting write to destination image" << std::endl;
-      m_throttle.end_op(r);
-    }
-  }
-
-  virtual ~AioImportContext()
-  {
-    m_aio_completion->release();
-  }
-
-  virtual void finish(int r)
-  {
-    if (r < 0) {
-      cerr << "rbd: error writing to destination image at offset "
-           << m_offset << ": " << cpp_strerror(r) << std::endl;
-    }
-    m_throttle.end_op(r);
-  }
-
-  static void aio_callback(librbd::completion_t completion, void *arg)
-  {
-    librbd::RBD::AioCompletion *aio_completion =
-      reinterpret_cast<librbd::RBD::AioCompletion*>(completion);
-    AioImportContext *import_context = reinterpret_cast<AioImportContext*>(arg);
-    import_context->complete(aio_completion->get_return_value());
-  }
-
-private:
-  SimpleThrottle &m_throttle;
-  librbd::RBD::AioCompletion *m_aio_completion;
-  uint64_t m_offset;
-};
-
 static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx,
 		     const char *imgname, int *order, const char *path,
 		     int format, uint64_t features, uint64_t size)
@@ -1393,15 +1318,11 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx,
   size_t blklen = 0;		// amount accumulated from reads to fill blk
   librbd::Image image;
 
-  boost::scoped_ptr<SimpleThrottle> throttle;
   bool from_stdin = !strcmp(path, "-");
   if (from_stdin) {
-    throttle.reset(new SimpleThrottle(1, false));
     fd = 0;
     size = 1ULL << *order;
   } else {
-    throttle.reset(new SimpleThrottle(
-      max(g_conf->rbd_concurrent_management_ops, 1), false));
     if ((fd = open(path, O_RDONLY)) < 0) {
       r = -errno;
       cerr << "rbd: error opening " << path << std::endl;
@@ -1469,9 +1390,13 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx,
     // write as much as we got; perhaps less than imgblklen
     // but skip writing zeros to create sparse images
     if (!bl.is_zero()) {
-      new AioImportContext(*throttle, image, bl, image_pos);
+      r = image.write(image_pos, blklen, bl);
+      if (r < 0) {
+	cerr << "rbd: error writing to image position " << image_pos
+	     << std::endl;
+	goto done;
+      }
     }
-
     // done with whole block, whether written or not
     image_pos += blklen;
     // if read had returned 0, we're at EOF and should quit
@@ -1480,11 +1405,6 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx,
     blklen = 0;
     reqlen = imgblklen;
   }
-  r = throttle->wait_for_ret();
-  if (r < 0) {
-    goto done;
-  }
-
   if (from_stdin) {
     r = image.resize(image_pos);
     if (r < 0) {
@@ -1736,17 +1656,58 @@ static int do_watch(librados::IoCtx& pp, const char *imgname)
   return 0;
 }
 
-static int do_kernel_map(const char *poolname, const char *imgname,
+static int do_kernel_add(const char *poolname, const char *imgname,
 			 const char *snapname)
 {
-  struct krbd_ctx *krbd;
+  MonMap monmap;
+  int r = monmap.build_initial(g_ceph_context, cerr);
+  if (r < 0)
+    return r;
+
+  map<string, entity_addr_t>::const_iterator it = monmap.mon_addr.begin();
   ostringstream oss;
-  char *devnode;
-  int r;
+  for (size_t i = 0; i < monmap.mon_addr.size(); ++i, ++it) {
+    oss << it->second.addr;
+    if (i + 1 < monmap.mon_addr.size())
+      oss << ",";
+  }
 
-  r = krbd_create_from_context(g_ceph_context, &krbd);
-  if (r < 0)
+  const char *user = g_conf->name.get_id().c_str();
+  oss << " name=" << user;
+
+  char key_name[strlen(user) + strlen("client.") + 1];
+  snprintf(key_name, sizeof(key_name), "client.%s", user);
+
+  KeyRing keyring;
+  r = keyring.from_ceph_context(g_ceph_context);
+  if (r == -ENOENT && !(g_conf->keyfile.length() ||
+			g_conf->key.length()))
+    r = 0;
+  if (r < 0) {
+    cerr << "rbd: failed to get secret: " << cpp_strerror(r) << std::endl;
     return r;
+  }
+  CryptoKey secret;
+  if (keyring.get_secret(g_conf->name, secret)) {
+    string secret_str;
+    secret.encode_base64(secret_str);
+
+    r = set_kernel_secret(secret_str.c_str(), key_name);
+    if (r >= 0) {
+      if (r == 0)
+	cerr << "rbd: warning: secret has length 0" << std::endl;
+      oss << ",key=" << key_name;
+    } else if (r == -ENODEV || r == -ENOSYS) {
+      /* running against older kernel; fall back to secret= in options */
+      oss << ",secret=" << secret_str;
+    } else {
+      cerr << "rbd: failed to add ceph secret key '" << key_name
+	   << "' to kernel: " << cpp_strerror(r) << std::endl;
+      return r;
+    }
+  } else if (is_kernel_secret(key_name)) {
+    oss << ",key=" << key_name;
+  }
 
   for (map<string, string>::const_iterator it = map_options.begin();
        it != map_options.end();
@@ -1757,50 +1718,371 @@ static int do_kernel_map(const char *poolname, const char *imgname,
     if (it->first == "rw" && it->second == "rw")
       continue;
 
-    if (it != map_options.begin())
-      oss << ",";
-    oss << it->second;
+    oss << "," << it->second;
   }
 
-  r = krbd_map(krbd, poolname, imgname, snapname, oss.str().c_str(), &devnode);
-  if (r < 0)
-    goto out;
+  oss << " " << poolname << " " << imgname;
+
+  if (snapname) {
+    oss << " " << snapname;
+  }
+
+  // modprobe the rbd module if /sys/bus/rbd doesn't exist
+  struct stat sb;
+  if ((stat("/sys/bus/rbd", &sb) < 0) || (!S_ISDIR(sb.st_mode))) {
+    // turn on single-major device number allocation scheme if the
+    // kernel supports it
+    const char *cmd = "/sbin/modprobe rbd";
+    r = system("/sbin/modinfo -F parm rbd | /bin/grep -q ^single_major:");
+    if (r == 0) {
+      cmd = "/sbin/modprobe rbd single_major=Y";
+    } else if (r < 0) {
+      cerr << "rbd: error executing modinfo as shell command!" << std::endl;
+    }
+
+    r = system(cmd);
+    if (r) {
+      if (r < 0)
+        cerr << "rbd: error executing modprobe as shell command!" << std::endl;
+      else
+        cerr << "rbd: modprobe rbd failed! (" << r << ")" <<std::endl;
+      return r;
+    }
+  }
 
-  cout << devnode << std::endl;
+  // 'add' interface is deprecated, use 'add_single_major' if it's
+  // available
+  //
+  // ('add' and 'add_single_major' interfaces are identical, except
+  // that if rbd kernel module is new enough and is configured to use
+  // single-major scheme, 'add' is disabled in order to prevent old
+  // userspace from doing weird things at unmap time)
+  int fd = open("/sys/bus/rbd/add_single_major", O_WRONLY);
+  if (fd < 0) {
+    if (errno == ENOENT) {
+      fd = open("/sys/bus/rbd/add", O_WRONLY);
+      if (fd < 0) {
+        r = -errno;
+        if (r == -ENOENT) {
+          cerr << "rbd: /sys/bus/rbd/add does not exist!" << std::endl
+               << "Did you run 'modprobe rbd' or is your rbd module too old?"
+               << std::endl;
+        }
+        return r;
+      }
+    } else {
+      return -errno;
+    }
+  }
+
+  string add = oss.str();
+  r = safe_write(fd, add.c_str(), add.size());
+  close(fd);
+
+  // let udevadm do its job before we return
+  if (udevadm_settle) {
+    int r = system("/sbin/udevadm settle");
+    if (r) {
+      if (r < 0)
+        cerr << "rbd: error executing udevadm as shell command!" << std::endl;
+      else
+        cerr << "rbd: '/sbin/udevadm settle' failed! (" << r << ")" <<std::endl;
+      return r;
+    }
+  }
 
-  free(devnode);
-out:
-  krbd_destroy(krbd);
   return r;
 }
 
+static int read_file(const char *filename, char *buf, size_t bufsize)
+{
+    int fd = open(filename, O_RDONLY);
+    if (fd < 0)
+      return -errno;
+
+    int r = safe_read(fd, buf, bufsize);
+    if (r < 0) {
+      cerr << "rbd: could not read " << filename << ": "
+	   << cpp_strerror(-r) << std::endl;
+      close(fd);
+      return r;
+    }
+
+    char *end = buf;
+    while (end < buf + bufsize && *end && *end != '\n') {
+      end++;
+    }
+    *end = '\0';
+
+    close(fd);
+    return r;
+}
+
+void do_closedir(DIR *dp)
+{
+  if (dp)
+    closedir(dp);
+}
+
 static int do_kernel_showmapped(Formatter *f)
 {
-  struct krbd_ctx *krbd;
   int r;
+  bool have_output = false;
+  TextTable tbl;
 
-  r = krbd_create_from_context(g_ceph_context, &krbd);
-  if (r < 0)
+  const char *devices_path = "/sys/bus/rbd/devices";
+  ceph::shared_ptr<DIR> device_dir(opendir(devices_path), do_closedir);
+  if (!device_dir.get()) {
+    r = -errno;
+    cerr << "rbd: could not open " << devices_path << ": "
+	 << cpp_strerror(-r) << std::endl;
     return r;
+  }
 
-  r = krbd_showmapped(krbd, f);
+  struct dirent *dent;
+  dent = readdir(device_dir.get());
+  if (!dent) {
+    r = -errno;
+    cerr << "rbd: error reading " << devices_path << ": "
+	 << cpp_strerror(-r) << std::endl;
+    return r;
+  }
 
-  krbd_destroy(krbd);
-  return r;
+  if (f) {
+    f->open_object_section("devices");
+  } else {
+    tbl.define_column("id", TextTable::LEFT, TextTable::LEFT);
+    tbl.define_column("pool", TextTable::LEFT, TextTable::LEFT);
+    tbl.define_column("image", TextTable::LEFT, TextTable::LEFT);
+    tbl.define_column("snap", TextTable::LEFT, TextTable::LEFT);
+    tbl.define_column("device", TextTable::LEFT, TextTable::LEFT);
+  }
+
+  do {
+    if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
+      continue;
+
+    char fn[PATH_MAX];
+
+    char dev[PATH_MAX];
+    snprintf(dev, sizeof(dev), "/dev/rbd%s", dent->d_name);
+
+    char name[RBD_MAX_IMAGE_NAME_SIZE];
+    snprintf(fn, sizeof(fn), "%s/%s/name", devices_path, dent->d_name);
+    r = read_file(fn, name, sizeof(name));
+    if (r < 0) {
+      cerr << "rbd: could not read name from " << fn << ": "
+	   << cpp_strerror(-r) << std::endl;
+      continue;
+    }
+
+    char pool[4096];
+    snprintf(fn, sizeof(fn), "%s/%s/pool", devices_path, dent->d_name);
+    r = read_file(fn, pool, sizeof(pool));
+    if (r < 0) {
+      cerr << "rbd: could not read name from " << fn << ": "
+	   << cpp_strerror(-r) << std::endl;
+      continue;
+    }
+
+    char snap[4096];
+    snprintf(fn, sizeof(fn), "%s/%s/current_snap", devices_path, dent->d_name);
+    r = read_file(fn, snap, sizeof(snap));
+    if (r < 0) {
+      cerr << "rbd: could not read name from " << fn << ": "
+	   << cpp_strerror(-r) << std::endl;
+      continue;
+    }
+
+    if (f) {
+      f->open_object_section(dent->d_name);
+      f->dump_string("pool", pool);
+      f->dump_string("name", name);
+      f->dump_string("snap", snap);
+      f->dump_string("device", dev);
+      f->close_section();
+    } else {
+      tbl << dent->d_name << pool << name << snap << dev << TextTable::endrow;
+    }
+    have_output = true;
+
+  } while ((dent = readdir(device_dir.get())));
+
+  if (f) {
+    f->close_section();
+    f->flush(cout);
+  } else {
+    if (have_output)
+      cout << tbl;
+  }
+
+  return 0;
 }
 
-static int do_kernel_unmap(const char *dev)
+static int get_rbd_seq(dev_t devno, string &seq)
 {
-  struct krbd_ctx *krbd;
-  int r;
+  // convert devno, which might be a partition major:minor pair, into
+  // a whole disk major:minor pair
+  dev_t wholediskno;
+  int r = blkid_devno_to_wholedisk(devno, NULL, 0, &wholediskno);
+  if (r) {
+    cerr << "rbd: could not compute wholediskno: " << r << std::endl;
+    // ignore the error: devno == wholediskno most of the time, and if
+    // it turns out it's not we will fail with -ENOENT later anyway
+    wholediskno = devno;
+  }
+
+  const char *devices_path = "/sys/bus/rbd/devices";
+  DIR *device_dir = opendir(devices_path);
+  if (!device_dir) {
+    r = -errno;
+    cerr << "rbd: could not open " << devices_path << ": " << cpp_strerror(-r)
+	 << std::endl;
+    return r;
+  }
+
+  struct dirent *dent;
+  dent = readdir(device_dir);
+  if (!dent) {
+    r = -errno;
+    cerr << "Error reading " << devices_path << ": " << cpp_strerror(-r)
+	 << std::endl;
+    closedir(device_dir);
+    return r;
+  }
+
+  int match_minor = -1;
+  do {
+    char fn[strlen(devices_path) + strlen(dent->d_name) + strlen("//major") + 1];
+    char buf[32];
+
+    if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
+      continue;
+
+    snprintf(fn, sizeof(fn), "%s/%s/major", devices_path, dent->d_name);
+    r = read_file(fn, buf, sizeof(buf));
+    if (r < 0) {
+      cerr << "rbd: could not read major number from " << fn << ": "
+	   << cpp_strerror(-r) << std::endl;
+      continue;
+    }
+    string err;
+    int cur_major = strict_strtol(buf, 10, &err);
+    if (!err.empty()) {
+      cerr << err << std::endl;
+      cerr << "rbd: could not parse major number read from " << fn << ": "
+           << cpp_strerror(-r) << std::endl;
+      continue;
+    }
+    if (cur_major != (int)major(wholediskno))
+      continue;
+
+    if (match_minor == -1) {
+      // matching minors in addition to majors is not necessary unless
+      // single-major scheme is turned on, but, if the kernel supports
+      // it, do it anyway (blkid stuff above ensures that we always have
+      // the correct minor to match with)
+      struct stat sbuf;
+      snprintf(fn, sizeof(fn), "%s/%s/minor", devices_path, dent->d_name);
+      match_minor = (stat(fn, &sbuf) == 0);
+    }
 
-  r = krbd_create_from_context(g_ceph_context, &krbd);
+    if (match_minor == 1) {
+      snprintf(fn, sizeof(fn), "%s/%s/minor", devices_path, dent->d_name);
+      r = read_file(fn, buf, sizeof(buf));
+      if (r < 0) {
+        cerr << "rbd: could not read minor number from " << fn << ": "
+             << cpp_strerror(-r) << std::endl;
+        continue;
+      }
+      int cur_minor = strict_strtol(buf, 10, &err);
+      if (!err.empty()) {
+        cerr << err << std::endl;
+        cerr << "rbd: could not parse minor number read from " << fn << ": "
+             << cpp_strerror(-r) << std::endl;
+        continue;
+      }
+      if (cur_minor != (int)minor(wholediskno))
+        continue;
+    } else {
+      assert(match_minor == 0);
+    }
+
+    seq = string(dent->d_name);
+    closedir(device_dir);
+    return 0;
+  } while ((dent = readdir(device_dir)));
+
+  closedir(device_dir);
+  return -ENOENT;
+}
+
+static int do_kernel_rm(const char *dev)
+{
+  struct stat sbuf;
+  if (stat(dev, &sbuf) || !S_ISBLK(sbuf.st_mode)) {
+    cerr << "rbd: " << dev << " is not a block device" << std::endl;
+    return -EINVAL;
+  }
+
+  string seq_num;
+  int r = get_rbd_seq(sbuf.st_rdev, seq_num);
+  if (r == -ENOENT) {
+    cerr << "rbd: " << dev << " is not an rbd device" << std::endl;
+    return -EINVAL;
+  }
   if (r < 0)
     return r;
 
-  r = krbd_unmap(krbd, dev);
+  // let udevadm do its job *before* we try to unmap
+  if (udevadm_settle) {
+    int r = system("/sbin/udevadm settle");
+    if (r) {
+      if (r < 0)
+        cerr << "rbd: error executing udevadm as shell command!" << std::endl;
+      else
+        cerr << "rbd: '/sbin/udevadm settle' failed! (" << r << ")" <<std::endl;
+      // ignore the error, though.
+    }
+  }
+
+  // see comment in do_kernel_add(), same goes for 'remove' vs
+  // 'remove_single_major'
+  int fd = open("/sys/bus/rbd/remove_single_major", O_WRONLY);
+  if (fd < 0) {
+    if (errno == ENOENT) {
+      fd = open("/sys/bus/rbd/remove", O_WRONLY);
+      if (fd < 0)
+        return -errno;
+    } else {
+      return -errno;
+    }
+  }
+
+  r = safe_write(fd, seq_num.c_str(), seq_num.size());
+  if (r < 0) {
+    cerr << "rbd: failed to remove rbd device" << ": " << cpp_strerror(-r)
+	 << std::endl;
+    close(fd);
+    return r;
+  }
+
+  r = close(fd);
+
+  // let udevadm finish, if present
+  if (udevadm_settle){
+    int r = system("/sbin/udevadm settle");
+    if (r) {
+      if (r < 0)
+        cerr << "rbd: error executing udevadm as shell command!" << std::endl;
+      else
+        cerr << "rbd: '/sbin/udevadm settle' failed! (" << r << ")" <<std::endl;
+      return r;
+    }
+  }
 
-  krbd_destroy(krbd);
+  if (r < 0)
+    r = -errno;
   return r;
 }
 
@@ -1810,7 +2092,9 @@ static string map_option_uuid_cb(const char *value_char)
   if (!u.parse(value_char))
     return "";
 
-  return stringify(u);
+  ostringstream oss;
+  oss << u;
+  return oss.str();
 }
 
 static string map_option_ip_cb(const char *value_char)
@@ -1822,7 +2106,9 @@ static string map_option_ip_cb(const char *value_char)
     return "";
   }
 
-  return stringify(a.addr);
+  ostringstream oss;
+  oss << a.addr;
+  return oss.str();
 }
 
 static string map_option_int_cb(const char *value_char)
@@ -1832,7 +2118,9 @@ static string map_option_int_cb(const char *value_char)
   if (!err.empty() || d < 0)
     return "";
 
-  return stringify(d);
+  ostringstream oss;
+  oss << d;
+  return oss.str();
 }
 
 static void put_map_option(const string key, string val)
@@ -2057,8 +2345,7 @@ int main(int argc, const char **argv)
   const char *poolname = NULL;
   uint64_t size = 0;  // in bytes
   int order = 0;
-  bool format_specified = false,
-    output_format_specified = false;
+  bool format_specified = false, output_format_specified = false;
   int format = 1;
   uint64_t features = RBD_FEATURE_LAYERING;
   const char *imgname = NULL, *snapname = NULL, *destname = NULL,
@@ -2072,7 +2359,7 @@ int main(int argc, const char **argv)
   long long bench_io_size = 4096, bench_io_threads = 16, bench_bytes = 1 << 30;
   string bench_pattern = "seq";
 
-  std::string val, parse_err;
+  std::string val;
   std::ostringstream err;
   long long sizell = 0;
   std::vector<const char*>::iterator i;
@@ -2088,15 +2375,13 @@ int main(int argc, const char **argv)
     } else if (ceph_argparse_flag(args, i, "--new-format", (char*)NULL)) {
       format = 2;
       format_specified = true;
-    } else if (ceph_argparse_witharg(args, i, &val, "--image-format",
+    } else if (ceph_argparse_withint(args, i, &format, &err, "--image-format",
 				     (char*)NULL)) {
-      format = strict_strtol(val.c_str(), 10, &parse_err);
-      if (!parse_err.empty()) {
-	cerr << "rbd: error parsing --image-format: " << parse_err << std::endl;
+      if (!err.str().empty()) {
+	cerr << "rbd: " << err.str() << std::endl;
 	return EXIT_FAILURE;
       }
       format_specified = true;
-      g_conf->set_val_or_die("rbd_default_format", val.c_str());
     } else if (ceph_argparse_witharg(args, i, &val, "-p", "--pool", (char*)NULL)) {
       poolname = strdup(val.c_str());
     } else if (ceph_argparse_witharg(args, i, &val, "--dest-pool", (char*)NULL)) {
@@ -2128,17 +2413,10 @@ int main(int argc, const char **argv)
 	return EXIT_FAILURE;
       }
     } else if (ceph_argparse_withlonglong(args, i, &bench_io_size, &err, "--io-size", (char*)NULL)) {
-      if (!err.str().empty()) {
-	cerr << "rbd: " << err.str() << std::endl;
-	return EXIT_FAILURE;
-      }
-      if (bench_io_size == 0) {
-	cerr << "rbd: io-size must be > 0" << std::endl;
-	return EXIT_FAILURE;
-      }
     } else if (ceph_argparse_withlonglong(args, i, &bench_io_threads, &err, "--io-threads", (char*)NULL)) {
     } else if (ceph_argparse_withlonglong(args, i, &bench_bytes, &err, "--io-total", (char*)NULL)) {
     } else if (ceph_argparse_witharg(args, i, &bench_pattern, &err, "--io-pattern", (char*)NULL)) {
+    } else if (ceph_argparse_withlonglong(args, i, &stripe_count, &err, "--stripe-count", (char*)NULL)) {
     } else if (ceph_argparse_witharg(args, i, &val, "--path", (char*)NULL)) {
       path = strdup(val.c_str());
     } else if (ceph_argparse_witharg(args, i, &val, "--dest", (char*)NULL)) {
@@ -2148,7 +2426,7 @@ int main(int argc, const char **argv)
     } else if (ceph_argparse_witharg(args, i, &val, "--shared", (char *)NULL)) {
       lock_tag = strdup(val.c_str());
     } else if (ceph_argparse_flag(args, i, "--no-settle", (char *)NULL)) {
-      cerr << "rbd: --no-settle is deprecated" << std::endl;
+      udevadm_settle = false;
     } else if (ceph_argparse_witharg(args, i, &val, "-o", "--options", (char*)NULL)) {
       char *map_options = strdup(val.c_str());
       if (parse_map_options(map_options)) {
@@ -2163,9 +2441,9 @@ int main(int argc, const char **argv)
     } else if (ceph_argparse_flag(args, i , "--allow-shrink", (char *)NULL)) {
       resize_allow_shrink = true;
     } else if (ceph_argparse_witharg(args, i, &val, "--format", (char *) NULL)) {
-      long long ret = strict_strtoll(val.c_str(), 10, &parse_err);
-      if (parse_err.empty()) {
-	g_conf->set_val_or_die("rbd_default_format", val.c_str());
+      std::string err;
+      long long ret = strict_strtoll(val.c_str(), 10, &err);
+      if (err.empty()) {
 	format = ret;
 	format_specified = true;
 	cerr << "rbd: using --format for specifying the rbd image format is"
@@ -2279,19 +2557,6 @@ if (!set_conf_param(v, p1, p2, p3)) { \
     }
   }
 
-  g_conf->set_val_or_die("rbd_cache_writethrough_until_flush", "false");
-
-  /* get defaults from rbd_default_* options to keep behavior consistent with
-     manual short-form options */
-  if (!format_specified)
-    format = g_conf->rbd_default_format;
-  if (!order)
-    order = g_conf->rbd_default_order;
-  if (!stripe_unit)
-    stripe_unit = g_conf->rbd_default_stripe_unit;
-  if (!stripe_count)
-    stripe_count = g_conf->rbd_default_stripe_count;
-
   if (format_specified && opt_cmd != OPT_IMPORT && opt_cmd != OPT_CREATE) {
     cerr << "rbd: image format can only be set when "
 	 << "creating or importing an image" << std::endl;
@@ -2368,7 +2633,7 @@ if (!set_conf_param(v, p1, p2, p3)) { \
 
   // do this unconditionally so we can parse pool/image at snapshot into
   // the relevant parts
-  set_pool_image_name(imgname, (char **)&poolname,
+  set_pool_image_name(poolname, imgname, (char **)&poolname,
 		      (char **)&imgname, (char **)&snapname);
   if (snapname && opt_cmd != OPT_SNAP_CREATE && opt_cmd != OPT_SNAP_ROLLBACK &&
       opt_cmd != OPT_SNAP_REMOVE && opt_cmd != OPT_INFO &&
@@ -2388,7 +2653,7 @@ if (!set_conf_param(v, p1, p2, p3)) { \
     return EXIT_FAILURE;
   }
 
-  set_pool_image_name(destname, (char **)&dest_poolname,
+  set_pool_image_name(dest_poolname, destname, (char **)&dest_poolname,
 		      (char **)&destname, (char **)&dest_snapname);
 
   if (opt_cmd == OPT_IMPORT) {
@@ -2798,17 +3063,17 @@ if (!set_conf_param(v, p1, p2, p3)) { \
     break;
 
   case OPT_MAP:
-    r = do_kernel_map(poolname, imgname, snapname);
+    r = do_kernel_add(poolname, imgname, snapname);
     if (r < 0) {
-      cerr << "rbd: map failed: " << cpp_strerror(-r) << std::endl;
+      cerr << "rbd: add failed: " << cpp_strerror(-r) << std::endl;
       return -r;
     }
     break;
 
   case OPT_UNMAP:
-    r = do_kernel_unmap(devpath);
+    r = do_kernel_rm(devpath);
     if (r < 0) {
-      cerr << "rbd: unmap failed: " << cpp_strerror(-r) << std::endl;
+      cerr << "rbd: remove failed: " << cpp_strerror(-r) << std::endl;
       return -r;
     }
     break;
diff --git a/src/rbd_fuse/rbd-fuse.c b/src/rbd_fuse/rbd-fuse.c
index 6fc84f2..a13ca44 100644
--- a/src/rbd_fuse/rbd-fuse.c
+++ b/src/rbd_fuse/rbd-fuse.c
@@ -23,7 +23,6 @@
 
 static int gotrados = 0;
 char *pool_name;
-char *mount_image_name;
 rados_t cluster;
 rados_ioctx_t ioctx;
 
@@ -37,7 +36,6 @@ struct rbd_stat {
 struct rbd_options {
 	char *ceph_config;
 	char *pool_name;
-	char *image_name;
 };
 
 struct rbd_image {
@@ -54,7 +52,7 @@ struct rbd_openimage {
 #define MAX_RBD_IMAGES		128
 struct rbd_openimage opentbl[MAX_RBD_IMAGES];
 
-struct rbd_options rbd_options = {"/etc/ceph/ceph.conf", "rbd", NULL};
+struct rbd_options rbd_options = {"/etc/ceph/ceph.conf", "rbd"};
 
 #define rbdsize(fd)	opentbl[fd].rbd_stat.rbd_info.size
 #define rbdblksize(fd)	opentbl[fd].rbd_stat.rbd_info.obj_size
@@ -116,15 +114,11 @@ enumerate_images(struct rbd_image **head)
 
 	fprintf(stderr, "pool %s: ", pool_name);
 	for (ip = ibuf; ip < &ibuf[ibuf_len]; ip += strlen(ip) + 1)  {
-		if ((mount_image_name == NULL) ||
-		    ((strlen(mount_image_name) > 0) &&
-		    (strcmp(ip, mount_image_name) == 0))) {
-			fprintf(stderr, "%s, ", ip);
-			im = malloc(sizeof(*im));
-			im->image_name = ip;
-			im->next = *head;
-			*head = im;
-		}
+		fprintf(stderr, "%s, ", ip);
+		im = malloc(sizeof(*im));
+		im->image_name = ip;
+		im->next = *head;
+		*head = im;
 	}
 	fprintf(stderr, "\n");
 }
@@ -148,7 +142,7 @@ int
 open_rbd_image(const char *image_name)
 {
 	struct rbd_image *im;
-	struct rbd_openimage *rbd = NULL;
+	struct rbd_openimage *rbd;
 	int fd;
 
 	if (image_name == (char *)NULL) 
@@ -177,7 +171,7 @@ open_rbd_image(const char *image_name)
 				break;
 			}
 		}
-		if (i == MAX_RBD_IMAGES || !rbd)
+		if (i == MAX_RBD_IMAGES)
 			return -1;
 		int ret = rbd_open(ioctx, rbd->image_name, &(rbd->image), NULL);
 		if (ret < 0) {
@@ -477,7 +471,6 @@ rbdfs_init(struct fuse_conn_info *conn)
 		exit(90);
 
 	pool_name = rbd_options.pool_name;
-	mount_image_name = rbd_options.image_name;
 	ret = rados_ioctx_create(cluster, pool_name, &ioctx);
 	if (ret < 0)
 		exit(91);
@@ -513,7 +506,7 @@ rbdfs_utime(const char *path, struct utimbuf *utime)
 int
 rbdfs_unlink(const char *path)
 {
-	int fd = find_openrbd(path+1);
+	int fd = find_openrbd(path);
 	if (fd != -1) {
 		struct rbd_openimage *rbd = &opentbl[fd];
 		rbd_close(rbd->image);
@@ -565,7 +558,7 @@ struct rbdfuse_attr {
 	{ "user.rbdfuse.imagesize", &imagesize },
 	{ "user.rbdfuse.imageorder", &imageorder },
 	{ "user.rbdfuse.imagefeatures", &imagefeatures },
-	{ NULL, NULL }
+	{ NULL }
 };
 
 int
@@ -654,9 +647,7 @@ enum {
 	KEY_CEPH_CONFIG,
 	KEY_CEPH_CONFIG_LONG,
 	KEY_RADOS_POOLNAME,
-	KEY_RADOS_POOLNAME_LONG,
-	KEY_RBD_IMAGENAME,
-	KEY_RBD_IMAGENAME_LONG
+	KEY_RADOS_POOLNAME_LONG
 };
 
 static struct fuse_opt rbdfs_opts[] = {
@@ -670,9 +661,6 @@ static struct fuse_opt rbdfs_opts[] = {
 	{"-p %s", offsetof(struct rbd_options, pool_name), KEY_RADOS_POOLNAME},
 	{"--poolname=%s", offsetof(struct rbd_options, pool_name),
 	 KEY_RADOS_POOLNAME_LONG},
-	{"-r %s", offsetof(struct rbd_options, image_name), KEY_RBD_IMAGENAME},
-	{"--image=%s", offsetof(struct rbd_options, image_name),
-	KEY_RBD_IMAGENAME_LONG},
 };
 
 static void usage(const char *progname)
@@ -685,7 +673,6 @@ static void usage(const char *progname)
 "    -V   --version         print version\n"
 "    -c   --configfile      ceph configuration file [/etc/ceph/ceph.conf]\n"
 "    -p   --poolname        rados pool name [rbd]\n"
-"    -r   --image           RBD image name\n"
 "\n", progname);
 }
 
@@ -722,15 +709,6 @@ static int rbdfs_opt_proc(void *data, const char *arg, int key,
 		rbd_options.pool_name = strdup(arg+2);
 		return 0;
 	}
-    
-	if (key == KEY_RBD_IMAGENAME) {
-		if (rbd_options.image_name!= NULL) {
-			free(rbd_options.image_name);
-			rbd_options.image_name = NULL;
-		}
-		rbd_options.image_name = strdup(arg+2);
-		return 0;
-	}
 
 	return 1;
 }
@@ -738,8 +716,8 @@ static int rbdfs_opt_proc(void *data, const char *arg, int key,
 void
 simple_err(const char *msg, int err)
 {
-	fprintf(stderr, "%s: %s\n", msg, strerror(-err));
-	return;
+    fprintf(stderr, "%s: %s\n", msg, strerror(-err));
+    return;
 }
 
 int
@@ -775,7 +753,8 @@ int main(int argc, char *argv[])
 {
 	struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
 
-	if (fuse_opt_parse(&args, &rbd_options, rbdfs_opts, rbdfs_opt_proc) == -1) {
+	if (fuse_opt_parse(&args, &rbd_options, rbdfs_opts, rbdfs_opt_proc)
+	    == -1) {
 		exit(1);
 	}
 
diff --git a/src/rbd_replay/BoundedBuffer.hpp b/src/rbd_replay/BoundedBuffer.hpp
deleted file mode 100644
index 540fd31..0000000
--- a/src/rbd_replay/BoundedBuffer.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#ifndef _INCLUDED_BOUNDED_BUFFER_HPP
-#define _INCLUDED_BOUNDED_BUFFER_HPP
-
-#include <boost/bind.hpp>
-#include <boost/circular_buffer.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/thread/mutex.hpp>
-
-// Taken from http://www.boost.org/doc/libs/1_55_0/libs/circular_buffer/example/circular_buffer_bound_example.cpp
-template <class T>
-class BoundedBuffer {
-public:
-  typedef boost::circular_buffer<T> container_type;
-  typedef typename container_type::size_type size_type;
-  typedef typename container_type::value_type value_type;
-  typedef typename boost::call_traits<value_type>::param_type param_type;
-
-  explicit BoundedBuffer(size_type capacity) : m_unread(0), m_container(capacity) {
-  }
-
-  void push_front(typename boost::call_traits<value_type>::param_type item) {
-    // `param_type` represents the "best" way to pass a parameter of type `value_type` to a method.
-    boost::mutex::scoped_lock lock(m_mutex);
-    m_not_full.wait(lock, boost::bind(&BoundedBuffer<value_type>::is_not_full, this));
-    m_container.push_front(item);
-    ++m_unread;
-    lock.unlock();
-    m_not_empty.notify_one();
-  }
-
-  void pop_back(value_type* pItem) {
-    boost::mutex::scoped_lock lock(m_mutex);
-    m_not_empty.wait(lock, boost::bind(&BoundedBuffer<value_type>::is_not_empty, this));
-    *pItem = m_container[--m_unread];
-    lock.unlock();
-    m_not_full.notify_one();
-  }
-
-private:
-  BoundedBuffer(const BoundedBuffer&);             // Disabled copy constructor.
-  BoundedBuffer& operator= (const BoundedBuffer&); // Disabled assign operator.
-
-  bool is_not_empty() const {
-    return m_unread > 0;
-  }
-  bool is_not_full() const {
-    return m_unread < m_container.capacity();
-  }
-
-  size_type m_unread;
-  container_type m_container;
-  boost::mutex m_mutex;
-  boost::condition m_not_empty;
-  boost::condition m_not_full;
-};
-
-#endif
diff --git a/src/rbd_replay/Deser.cc b/src/rbd_replay/Deser.cc
deleted file mode 100644
index 986a18c..0000000
--- a/src/rbd_replay/Deser.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "Deser.hpp"
-#include <arpa/inet.h>
-#include <cstdlib>
-#include <endian.h>
-
-
-rbd_replay::Deser::Deser(std::istream &in)
-  : m_in(in) {
-}
-
-uint8_t rbd_replay::Deser::read_uint8_t() {
-  uint8_t data;
-  m_in.read(reinterpret_cast<char*>(&data), sizeof(data));
-  return data;
-}
-
-uint16_t rbd_replay::Deser::read_uint16_t() {
-  uint16_t data;
-  m_in.read(reinterpret_cast<char*>(&data), sizeof(data));
-  return ntohs(data);
-}
-
-uint32_t rbd_replay::Deser::read_uint32_t() {
-  uint32_t data;
-  m_in.read(reinterpret_cast<char*>(&data), sizeof(data));
-  return ntohl(data);
-}
-
-uint64_t rbd_replay::Deser::read_uint64_t() {
-  uint64_t data;
-  m_in.read(reinterpret_cast<char*>(&data), sizeof(data));
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-  data = (static_cast<uint64_t>(ntohl(data)) << 32 | ntohl(data >> 32));
-#endif
-  return data;
-}
-
-std::string rbd_replay::Deser::read_string() {
-  uint32_t length = read_uint32_t();
-  char* data = reinterpret_cast<char*>(malloc(length));
-  m_in.read(data, length);
-  std::string s(data, length);
-  free(data);
-  return s;
-}
-
-bool rbd_replay::Deser::read_bool() {
-  return read_uint8_t() != 0;
-}
-
-bool rbd_replay::Deser::eof() {
-  return m_in.eof();
-}
diff --git a/src/rbd_replay/Deser.hpp b/src/rbd_replay/Deser.hpp
deleted file mode 100644
index d5fad5a..0000000
--- a/src/rbd_replay/Deser.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_DESER_HPP
-#define _INCLUDED_RBD_REPLAY_DESER_HPP
-
-#include <iostream>
-#include <stdint.h>
-
-namespace rbd_replay {
-
-class Deser {
-public:
-  Deser(std::istream &in);
-
-  uint8_t read_uint8_t();
-
-  uint16_t read_uint16_t();
-
-  uint32_t read_uint32_t();
-
-  uint64_t read_uint64_t();
-
-  std::string read_string();
-
-  bool read_bool();
-
-  bool eof();
-
-private:
-  std::istream &m_in;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/ImageNameMap.cc b/src/rbd_replay/ImageNameMap.cc
deleted file mode 100644
index f542657..0000000
--- a/src/rbd_replay/ImageNameMap.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "ImageNameMap.hpp"
-
-
-using namespace std;
-using namespace rbd_replay;
-
-
-bool ImageNameMap::parse_mapping(string mapping_string, Mapping *mapping) const {
-  string fields[2];
-  int field = 0;
-  for (size_t i = 0, n = mapping_string.length(); i < n; i++) {
-    char c = mapping_string[i];
-    switch (c) {
-    case '\\':
-      if (i != n - 1 && mapping_string[i + 1] == '=') {
-	i++;
-	fields[field].push_back('=');
-      } else {
-	fields[field].push_back('\\');
-      }
-      break;
-    case '=':
-      if (field == 1) {
-	return false;
-      }
-      field = 1;
-      break;
-    default:
-      fields[field].push_back(c);
-    }
-  }
-  if (field == 0) {
-    return false;
-  }
-  if (!mapping->first.parse(fields[0])) {
-    return false;
-  }
-  if (!mapping->second.parse(fields[1])) {
-    return false;
-  }
-  return true;
-}
-
-void ImageNameMap::add_mapping(const Mapping& mapping) {
-  m_map.insert(mapping);
-}
-
-rbd_loc ImageNameMap::map(const rbd_loc& name) const {
-  std::map<rbd_loc, rbd_loc>::const_iterator p(m_map.find(name));
-  if (p == m_map.end()) {
-    return name;
-  } else {
-    return p->second;
-  }
-}
diff --git a/src/rbd_replay/ImageNameMap.hpp b/src/rbd_replay/ImageNameMap.hpp
deleted file mode 100644
index 00de765..0000000
--- a/src/rbd_replay/ImageNameMap.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_IMAGENAMEMAP_HPP
-#define _INCLUDED_RBD_REPLAY_IMAGENAMEMAP_HPP
-
-#include <map>
-#include <string>
-#include "rbd_loc.hpp"
-
-namespace rbd_replay {
-
-class ImageNameMap {
-public:
-  typedef std::pair<rbd_loc, rbd_loc> Mapping;
-
-  bool parse_mapping(std::string mapping_string, Mapping *mapping) const;
-
-  void add_mapping(const Mapping& mapping);
-
-  rbd_loc map(const rbd_loc& name) const;
-
-private:
-  std::map<rbd_loc, rbd_loc> m_map;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/Makefile.am b/src/rbd_replay/Makefile.am
deleted file mode 100644
index f1f406f..0000000
--- a/src/rbd_replay/Makefile.am
+++ /dev/null
@@ -1,53 +0,0 @@
-# librbd_replay_la exists only to help with unit tests
-librbd_replay_la_SOURCES = rbd_replay/actions.cc \
-	rbd_replay/Deser.cc \
-	rbd_replay/ImageNameMap.cc \
-	rbd_replay/PendingIO.cc \
-	rbd_replay/rbd_loc.cc \
-	rbd_replay/Replayer.cc \
-	rbd_replay/Ser.cc
-librbd_replay_la_LIBADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL)
-noinst_LTLIBRARIES += librbd_replay.la
-noinst_HEADERS += rbd_replay/BoundedBuffer.hpp \
-	rbd_replay/actions.hpp \
-	rbd_replay/Deser.hpp \
-	rbd_replay/ImageNameMap.hpp \
-	rbd_replay/ios.hpp \
-	rbd_replay/PendingIO.hpp \
-	rbd_replay/rbd_loc.hpp \
-	rbd_replay/rbd_replay_debug.hpp \
-	rbd_replay/Replayer.hpp \
-	rbd_replay/Ser.hpp
-
-
-rbd_replay_SOURCES = rbd_replay/rbd-replay.cc
-rbd_replay_LDADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la
-
-if LINUX
-bin_PROGRAMS += rbd-replay
-endif #LINUX
-
-librbd_replay_ios_la_SOURCES = rbd_replay/ios.cc
-librbd_replay_ios_la_LIBADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la
-noinst_LTLIBRARIES += librbd_replay_ios.la
-
-rbd_replay_prep_SOURCES = rbd_replay/rbd-replay-prep.cc
-rbd_replay_prep_LDADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la \
-	librbd_replay_ios.la \
-	-lbabeltrace \
-	-lbabeltrace-ctf \
-	-lboost_date_time
-if WITH_BABELTRACE
-bin_PROGRAMS += rbd-replay-prep
-endif
diff --git a/src/rbd_replay/PendingIO.cc b/src/rbd_replay/PendingIO.cc
deleted file mode 100644
index 6c41001..0000000
--- a/src/rbd_replay/PendingIO.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "PendingIO.hpp"
-#include "rbd_replay_debug.hpp"
-
-
-using namespace std;
-using namespace rbd_replay;
-
-extern "C"
-void pending_io_callback(librbd::completion_t cb, void *arg) {
-  PendingIO *io = static_cast<PendingIO*>(arg);
-  io->completed(cb);
-}
-
-PendingIO::PendingIO(action_id_t id,
-		     ActionCtx &worker)
-  : m_id(id),
-    m_completion(new librbd::RBD::AioCompletion(this, pending_io_callback)),
-    m_worker(worker) {
-    }
-
-PendingIO::~PendingIO() {
-  m_completion->release();
-}
-
-void PendingIO::completed(librbd::completion_t cb) {
-  dout(ACTION_LEVEL) << "Completed pending IO #" << m_id << dendl;
-  ssize_t r = m_completion->get_return_value();
-  assertf(r >= 0, "id = %d, r = %d", m_id, r);
-  m_worker.remove_pending(shared_from_this());
-}
diff --git a/src/rbd_replay/PendingIO.hpp b/src/rbd_replay/PendingIO.hpp
deleted file mode 100644
index 3f01207..0000000
--- a/src/rbd_replay/PendingIO.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_PENDINGIO_HPP
-#define _INCLUDED_RBD_REPLAY_PENDINGIO_HPP
-
-#include <boost/enable_shared_from_this.hpp>
-#include "actions.hpp"
-
-namespace rbd_replay {
-
-class PendingIO : public boost::enable_shared_from_this<PendingIO> {
-public:
-  typedef boost::shared_ptr<PendingIO> ptr;
-
-  PendingIO(action_id_t id,
-            ActionCtx &worker);
-
-  ~PendingIO();
-
-  void completed(librbd::completion_t cb);
-
-  action_id_t id() const {
-    return m_id;
-  }
-
-  ceph::bufferlist &bufferlist() {
-    return m_bl;
-  }
-
-  librbd::RBD::AioCompletion &completion() {
-    return *m_completion;
-  }
-
-private:
-  const action_id_t m_id;
-  ceph::bufferlist m_bl;
-  librbd::RBD::AioCompletion *m_completion;
-  ActionCtx &m_worker;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/Replayer.cc b/src/rbd_replay/Replayer.cc
deleted file mode 100644
index ffd04a9..0000000
--- a/src/rbd_replay/Replayer.cc
+++ /dev/null
@@ -1,310 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "Replayer.hpp"
-#include <boost/foreach.hpp>
-#include <boost/thread/thread.hpp>
-#include <fstream>
-#include "global/global_context.h"
-#include "rbd_replay_debug.hpp"
-
-
-using namespace std;
-using namespace rbd_replay;
-
-
-Worker::Worker(Replayer &replayer)
-  : m_replayer(replayer),
-    m_buffer(100),
-    m_done(false) {
-}
-
-void Worker::start() {
-  m_thread = boost::shared_ptr<boost::thread>(new boost::thread(boost::bind(&Worker::run, this)));
-}
-
-// Should only be called by StopThreadAction
-void Worker::stop() {
-  m_done = true;
-}
-
-void Worker::join() {
-  m_thread->join();
-}
-
-void Worker::send(Action::ptr action) {
-  assert(action);
-  m_buffer.push_front(action);
-}
-
-void Worker::add_pending(PendingIO::ptr io) {
-  assert(io);
-  boost::mutex::scoped_lock lock(m_pending_ios_mutex);
-  assertf(m_pending_ios.count(io->id()) == 0, "id = %d", io->id());
-  m_pending_ios[io->id()] = io;
-}
-
-void Worker::run() {
-  dout(THREAD_LEVEL) << "Worker thread started" << dendl;
-  while (!m_done) {
-    Action::ptr action;
-    m_buffer.pop_back(&action);
-    m_replayer.wait_for_actions(action->predecessors());
-    action->perform(*this);
-    m_replayer.set_action_complete(action->id());
-  }
-  {
-    boost::mutex::scoped_lock lock(m_pending_ios_mutex);
-    bool first_time = true;
-    while (!m_pending_ios.empty()) {
-      if (!first_time) {
-	dout(THREAD_LEVEL) << "Worker thread trying to stop, still waiting for " << m_pending_ios.size() << " pending IOs to complete:" << dendl;
-	pair<action_id_t, PendingIO::ptr> p;
-	BOOST_FOREACH(p, m_pending_ios) {
-	  dout(THREAD_LEVEL) << "> " << p.first << dendl;
-	}
-      }
-      m_pending_ios_empty.timed_wait(lock, boost::posix_time::seconds(1));
-      first_time = false;
-    }
-  }
-  dout(THREAD_LEVEL) << "Worker thread stopped" << dendl;
-}
-
-
-void Worker::remove_pending(PendingIO::ptr io) {
-  assert(io);
-  m_replayer.set_action_complete(io->id());
-  boost::mutex::scoped_lock lock(m_pending_ios_mutex);
-  size_t num_erased = m_pending_ios.erase(io->id());
-  assertf(num_erased == 1, "id = %d", io->id());
-  if (m_pending_ios.empty()) {
-    m_pending_ios_empty.notify_all();
-  }
-}
-
-
-librbd::Image* Worker::get_image(imagectx_id_t imagectx_id) {
-  return m_replayer.get_image(imagectx_id);
-}
-
-
-void Worker::put_image(imagectx_id_t imagectx_id, librbd::Image* image) {
-  assert(image);
-  m_replayer.put_image(imagectx_id, image);
-}
-
-
-void Worker::erase_image(imagectx_id_t imagectx_id) {
-  m_replayer.erase_image(imagectx_id);
-}
-
-
-librbd::RBD* Worker::rbd() {
-  return m_replayer.get_rbd();
-}
-
-
-librados::IoCtx* Worker::ioctx() {
-  return m_replayer.get_ioctx();
-}
-
-void Worker::set_action_complete(action_id_t id) {
-  m_replayer.set_action_complete(id);
-}
-
-bool Worker::readonly() const {
-  return m_replayer.readonly();
-}
-
-rbd_loc Worker::map_image_name(string image_name, string snap_name) const {
-  return m_replayer.image_name_map().map(rbd_loc("", image_name, snap_name));
-}
-
-
-Replayer::Replayer(int num_action_trackers)
-  : m_pool_name("rbd"),
-    m_num_action_trackers(num_action_trackers),
-    m_action_trackers(new action_tracker_d[m_num_action_trackers]) {
-  assertf(num_action_trackers > 0, "num_action_trackers = %d", num_action_trackers);
-}
-
-Replayer::~Replayer() {
-  delete[] m_action_trackers;
-}
-
-Replayer::action_tracker_d &Replayer::tracker_for(action_id_t id) {
-  return m_action_trackers[id % m_num_action_trackers];
-}
-
-void Replayer::run(const std::string& replay_file) {
-  {
-    librados::Rados rados;
-    rados.init(NULL);
-    int r = rados.init_with_context(g_ceph_context);
-    if (r) {
-      cerr << "Unable to read conf file: " << r << std::endl;
-      goto out;
-    }
-    r = rados.connect();
-    if (r) {
-      cerr << "Unable to connect to Rados: " << r << std::endl;
-      goto out;
-    }
-    m_ioctx = new librados::IoCtx();
-    {
-      r = rados.ioctx_create(m_pool_name.c_str(), *m_ioctx);
-      if (r) {
-	cerr << "Unable to create IoCtx: " << r << std::endl;
-	goto out2;
-      }
-      m_rbd = new librbd::RBD();
-      map<thread_id_t, Worker*> workers;
-
-      ifstream input(replay_file.c_str(), ios::in | ios::binary);
-      if (!input.is_open()) {
-	cerr << "Unable to open " << replay_file << std::endl;
-	exit(1);
-      }
-
-      Deser deser(input);
-      while (true) {
-	Action::ptr action = Action::read_from(deser);
-	if (!action) {
-	  break;
-	}
-	if (action->is_start_thread()) {
-	  Worker *worker = new Worker(*this);
-	  workers[action->thread_id()] = worker;
-	  worker->start();
-	} else {
-	  workers[action->thread_id()]->send(action);
-	}
-      }
-
-      dout(THREAD_LEVEL) << "Waiting for workers to die" << dendl;
-      pair<thread_id_t, Worker*> w;
-      BOOST_FOREACH(w, workers) {
-	w.second->join();
-	delete w.second;
-      }
-      clear_images();
-      delete m_rbd;
-      m_rbd = NULL;
-    }
-  out2:
-    delete m_ioctx;
-    m_ioctx = NULL;
-  }
- out:
-  ;
-}
-
-
-librbd::Image* Replayer::get_image(imagectx_id_t imagectx_id) {
-  boost::shared_lock<boost::shared_mutex> lock(m_images_mutex);
-  return m_images[imagectx_id];
-}
-
-void Replayer::put_image(imagectx_id_t imagectx_id, librbd::Image *image) {
-  assert(image);
-  boost::unique_lock<boost::shared_mutex> lock(m_images_mutex);
-  assert(m_images.count(imagectx_id) == 0);
-  m_images[imagectx_id] = image;
-}
-
-void Replayer::erase_image(imagectx_id_t imagectx_id) {
-  boost::unique_lock<boost::shared_mutex> lock(m_images_mutex);
-  delete m_images[imagectx_id];
-  m_images.erase(imagectx_id);
-}
-
-void Replayer::set_action_complete(action_id_t id) {
-  dout(DEPGRAPH_LEVEL) << "ActionTracker::set_complete(" << id << ")" << dendl;
-  boost::system_time now(boost::get_system_time());
-  action_tracker_d &tracker = tracker_for(id);
-  boost::unique_lock<boost::shared_mutex> lock(tracker.mutex);
-  assert(tracker.actions.count(id) == 0);
-  tracker.actions[id] = now;
-  tracker.condition.notify_all();
-}
-
-bool Replayer::is_action_complete(action_id_t id) {
-  action_tracker_d &tracker = tracker_for(id);
-  boost::shared_lock<boost::shared_mutex> lock(tracker.mutex);
-  return tracker.actions.count(id) > 0;
-}
-
-void Replayer::wait_for_actions(const vector<dependency_d> &deps) {
-  boost::posix_time::ptime release_time(boost::posix_time::neg_infin);
-  BOOST_FOREACH(const dependency_d &dep, deps) {
-    dout(DEPGRAPH_LEVEL) << "Waiting for " << dep.id << dendl;
-    boost::system_time start_time(boost::get_system_time());
-    action_tracker_d &tracker = tracker_for(dep.id);
-    boost::shared_lock<boost::shared_mutex> lock(tracker.mutex);
-    bool first_time = true;
-    while (tracker.actions.count(dep.id) == 0) {
-      if (!first_time) {
-	dout(DEPGRAPH_LEVEL) << "Still waiting for " << dep.id << dendl;
-      }
-      tracker.condition.timed_wait(lock, boost::posix_time::seconds(1));
-      first_time = false;
-    }
-    boost::system_time action_completed_time(tracker.actions[dep.id]);
-    lock.unlock();
-    boost::system_time end_time(boost::get_system_time());
-    long long micros = (end_time - start_time).total_microseconds();
-    dout(DEPGRAPH_LEVEL) << "Finished waiting for " << dep.id << " after " << micros << " microseconds" << dendl;
-    // Apparently the nanoseconds constructor is optional:
-    // http://www.boost.org/doc/libs/1_46_0/doc/html/date_time/details.html#compile_options
-    boost::system_time sub_release_time(action_completed_time + boost::posix_time::microseconds(dep.time_delta * m_latency_multiplier / 1000));
-    if (sub_release_time > release_time) {
-      release_time = sub_release_time;
-    }
-  }
-  if (release_time > boost::get_system_time()) {
-    dout(SLEEP_LEVEL) << "Sleeping for " << (release_time - boost::get_system_time()).total_microseconds() << " microseconds" << dendl;
-    boost::this_thread::sleep(release_time);
-  }
-}
-
-void Replayer::clear_images() {
-  boost::unique_lock<boost::shared_mutex> lock(m_images_mutex);
-  pair<imagectx_id_t, librbd::Image*> p;
-  BOOST_FOREACH(p, m_images) {
-    delete p.second;
-  }
-  m_images.clear();
-}
-
-void Replayer::set_latency_multiplier(float f) {
-  assertf(f >= 0, "f = %f", f);
-  m_latency_multiplier = f;
-}
-
-bool Replayer::readonly() const {
-  return m_readonly;
-}
-
-void Replayer::set_readonly(bool readonly) {
-  m_readonly = readonly;
-}
-
-string Replayer::pool_name() const {
-  return m_pool_name;
-}
-
-void Replayer::set_pool_name(string pool_name) {
-  m_pool_name = pool_name;
-}
diff --git a/src/rbd_replay/Replayer.hpp b/src/rbd_replay/Replayer.hpp
deleted file mode 100644
index 56b4fd7..0000000
--- a/src/rbd_replay/Replayer.hpp
+++ /dev/null
@@ -1,155 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_REPLAYER_HPP
-#define _INCLUDED_RBD_REPLAY_REPLAYER_HPP
-
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/shared_mutex.hpp>
-#include "BoundedBuffer.hpp"
-#include "ImageNameMap.hpp"
-#include "PendingIO.hpp"
-
-namespace rbd_replay {
-
-class Replayer;
-
-class Worker : public ActionCtx {
-public:
-  explicit Worker(Replayer &replayer);
-
-  void start();
-
-  // Should only be called by StopThreadAction
-  void stop();
-
-  void join();
-
-  void send(Action::ptr action);
-
-  void add_pending(PendingIO::ptr io);
-
-  void remove_pending(PendingIO::ptr io);
-
-  librbd::Image* get_image(imagectx_id_t imagectx_id);
-
-  void put_image(imagectx_id_t imagectx_id, librbd::Image* image);
-
-  void erase_image(imagectx_id_t imagectx_id);
-
-  librbd::RBD* rbd();
-
-  librados::IoCtx* ioctx();
-
-  void set_action_complete(action_id_t id);
-
-  bool readonly() const;
-
-  rbd_loc map_image_name(std::string image_name, std::string snap_name) const;
-
-private:
-  void run();
-
-  Replayer &m_replayer;
-  BoundedBuffer<Action::ptr> m_buffer;
-  boost::shared_ptr<boost::thread> m_thread;
-  std::map<action_id_t, PendingIO::ptr> m_pending_ios;
-  boost::mutex m_pending_ios_mutex;
-  boost::condition m_pending_ios_empty;
-  bool m_done;
-};
-
-
-class Replayer {
-public:
-  Replayer(int num_action_trackers);
-
-  ~Replayer();
-
-  void run(const std::string &replay_file);
-
-  librbd::RBD* get_rbd() {
-    return m_rbd;
-  }
-
-  librados::IoCtx* get_ioctx() {
-    return m_ioctx;
-  }
-
-  librbd::Image* get_image(imagectx_id_t imagectx_id);
-
-  void put_image(imagectx_id_t imagectx_id, librbd::Image *image);
-
-  void erase_image(imagectx_id_t imagectx_id);
-
-  void set_action_complete(action_id_t id);
-
-  bool is_action_complete(action_id_t id);
-
-  void wait_for_actions(const std::vector<dependency_d> &deps);
-
-  std::string pool_name() const;
-
-  void set_pool_name(std::string pool_name);
-
-  void set_latency_multiplier(float f);
-
-  bool readonly() const;
-
-  void set_readonly(bool readonly);
-
-  void set_image_name_map(const ImageNameMap &map) {
-    m_image_name_map = map;
-  }
-
-  const ImageNameMap &image_name_map() const {
-    return m_image_name_map;
-  }
-
-private:
-  struct action_tracker_d {
-    // Maps an action ID to the time the action completed
-    std::map<action_id_t, boost::system_time> actions;
-    boost::shared_mutex mutex;
-    boost::condition condition;
-  };
-
-  void clear_images();
-
-  action_tracker_d &tracker_for(action_id_t id);
-
-  // Disallow assignment and copying
-  Replayer(const Replayer& rhs);
-  const Replayer& operator=(const Replayer& rhs);
-
-  librbd::RBD* m_rbd;
-  librados::IoCtx* m_ioctx;
-  std::string m_pool_name;
-  float m_latency_multiplier;
-  bool m_readonly;
-  ImageNameMap m_image_name_map;
-
-  std::map<imagectx_id_t, librbd::Image*> m_images;
-  boost::shared_mutex m_images_mutex;
-
-  // Actions are hashed across the trackers by ID.
-  // Number of trackers should probably be larger than the number of cores and prime.
-  // Should definitely be odd.
-  const int m_num_action_trackers;
-  action_tracker_d* m_action_trackers;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/Ser.cc b/src/rbd_replay/Ser.cc
deleted file mode 100644
index 97a63cd..0000000
--- a/src/rbd_replay/Ser.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "Ser.hpp"
-#include <arpa/inet.h>
-#include <cstdlib>
-#include <endian.h>
-
-
-rbd_replay::Ser::Ser(std::ostream &out)
-  : m_out(out) {
-}
-
-void rbd_replay::Ser::write_uint8_t(uint8_t data) {
-  m_out.write(reinterpret_cast<char*>(&data), sizeof(data));
-}
-
-void rbd_replay::Ser::write_uint16_t(uint16_t data) {
-  data = htons(data);
-  m_out.write(reinterpret_cast<char*>(&data), sizeof(data));
-}
-
-void rbd_replay::Ser::write_uint32_t(uint32_t data) {
-  data = htonl(data);
-  m_out.write(reinterpret_cast<char*>(&data), sizeof(data));
-}
-
-void rbd_replay::Ser::write_uint64_t(uint64_t data) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-  data = (static_cast<uint64_t>(htonl(data)) << 32 | htonl(data >> 32));
-#endif
-  m_out.write(reinterpret_cast<char*>(&data), sizeof(data));
-}
-
-void rbd_replay::Ser::write_string(const std::string& data) {
-  write_uint32_t(data.length());
-  m_out.write(data.data(), data.length());
-}
-
-void rbd_replay::Ser::write_bool(bool data) {
-  write_uint8_t(data ? 1 : 0);
-}
diff --git a/src/rbd_replay/Ser.hpp b/src/rbd_replay/Ser.hpp
deleted file mode 100644
index 2bada8f..0000000
--- a/src/rbd_replay/Ser.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_SER_HPP
-#define _INCLUDED_RBD_REPLAY_SER_HPP
-
-#include <iostream>
-#include <stdint.h>
-
-namespace rbd_replay {
-
-class Ser {
-public:
-  Ser(std::ostream &out);
-
-  void write_uint8_t(uint8_t);
-
-  void write_uint16_t(uint16_t);
-
-  void write_uint32_t(uint32_t);
-
-  void write_uint64_t(uint64_t);
-
-  void write_string(const std::string&);
-
-  void write_bool(bool b);
-
-private:
-  std::ostream &m_out;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/actions.cc b/src/rbd_replay/actions.cc
deleted file mode 100644
index 2bcdfb1..0000000
--- a/src/rbd_replay/actions.cc
+++ /dev/null
@@ -1,380 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "actions.hpp"
-#include <boost/foreach.hpp>
-#include <cstdlib>
-#include "PendingIO.hpp"
-#include "rbd_replay_debug.hpp"
-
-
-using namespace rbd_replay;
-using namespace std;
-
-
-Action::Action(action_id_t id,
-               thread_id_t thread_id,
-               int num_successors,
-               int num_completion_successors,
-               std::vector<dependency_d> &predecessors)
-  : m_id(id),
-    m_thread_id(thread_id),
-    m_num_successors(num_successors),
-    m_num_completion_successors(num_completion_successors),
-    m_predecessors(predecessors) {
-    }
-
-Action::~Action() {
-}
-
-Action::ptr Action::read_from(Deser &d) {
-  uint8_t type = d.read_uint8_t();
-  if (d.eof()) {
-    return Action::ptr();
-  }
-  uint32_t ionum = d.read_uint32_t();
-  uint64_t thread_id = d.read_uint64_t();
-  uint32_t num_successors = d.read_uint32_t();
-  uint32_t num_completion_successors = d.read_uint32_t();
-  uint32_t num_dependencies = d.read_uint32_t();
-  vector<dependency_d> deps;
-  for (unsigned int i = 0; i < num_dependencies; i++) {
-    uint32_t dep_id = d.read_uint32_t();
-    uint64_t time_delta = d.read_uint64_t();
-    deps.push_back(dependency_d(dep_id, time_delta));
-  }
-  DummyAction dummy(ionum, thread_id, num_successors, num_completion_successors, deps);
-  switch (type) {
-  case IO_START_THREAD:
-    return StartThreadAction::read_from(dummy, d);
-  case IO_STOP_THREAD:
-    return StopThreadAction::read_from(dummy, d);
-  case IO_READ:
-    return ReadAction::read_from(dummy, d);
-  case IO_WRITE:
-    return WriteAction::read_from(dummy, d);
-  case IO_ASYNC_READ:
-    return AioReadAction::read_from(dummy, d);
-  case IO_ASYNC_WRITE:
-    return AioWriteAction::read_from(dummy, d);
-  case IO_OPEN_IMAGE:
-    return OpenImageAction::read_from(dummy, d);
-  case IO_CLOSE_IMAGE:
-    return CloseImageAction::read_from(dummy, d);
-  default:
-    cerr << "Invalid action type: " << type << std::endl;
-    exit(1);
-  }
-}
-
-std::ostream& Action::dump_action_fields(std::ostream& o) const {
-  o << "id=" << m_id << ", thread_id=" << m_thread_id << ", predecessors=[";
-  bool first = true;
-  BOOST_FOREACH(const dependency_d &d, m_predecessors) {
-    if (!first) {
-      o << ",";
-    }
-    o << d.id;
-    first = false;
-  }
-  return o << "]";
-}
-
-std::ostream& rbd_replay::operator<<(std::ostream& o, const Action& a) {
-  return a.dump(o);
-}
-
-
-std::ostream& DummyAction::dump(std::ostream& o) const {
-  o << "DummyAction[";
-  dump_action_fields(o);
-  return o << "]";
-}
-
-
-StartThreadAction::StartThreadAction(Action &src)
-  : Action(src) {
-}
-
-void StartThreadAction::perform(ActionCtx &ctx) {
-  cerr << "StartThreadAction should never actually be performed" << std::endl;
-  exit(1);
-}
-
-bool StartThreadAction::is_start_thread() {
-  return true;
-}
-
-Action::ptr StartThreadAction::read_from(Action &src, Deser &d) {
-  return Action::ptr(new StartThreadAction(src));
-}
-
-std::ostream& StartThreadAction::dump(std::ostream& o) const {
-  o << "StartThreadAction[";
-  dump_action_fields(o);
-  return o << "]";
-}
-
-
-StopThreadAction::StopThreadAction(Action &src)
-  : Action(src) {
-}
-
-void StopThreadAction::perform(ActionCtx &ctx) {
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  ctx.stop();
-}
-
-Action::ptr StopThreadAction::read_from(Action &src, Deser &d) {
-  return Action::ptr(new StopThreadAction(src));
-}
-
-std::ostream& StopThreadAction::dump(std::ostream& o) const {
-  o << "StopThreadAction[";
-  dump_action_fields(o);
-  return o << "]";
-}
-
-
-AioReadAction::AioReadAction(const Action &src,
-                             imagectx_id_t imagectx_id,
-                             uint64_t offset,
-                             uint64_t length)
-  : Action(src),
-    m_imagectx_id(imagectx_id),
-    m_offset(offset),
-    m_length(length) {
-    }
-
-Action::ptr AioReadAction::read_from(Action &src, Deser &d) {
-  imagectx_id_t imagectx_id = d.read_uint64_t();
-  uint64_t offset = d.read_uint64_t();
-  uint64_t length = d.read_uint64_t();
-  return Action::ptr(new AioReadAction(src, imagectx_id, offset, length));
-}
-
-void AioReadAction::perform(ActionCtx &worker) {
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  librbd::Image *image = worker.get_image(m_imagectx_id);
-  assert(image);
-  PendingIO::ptr io(new PendingIO(pending_io_id(), worker));
-  worker.add_pending(io);
-  int r = image->aio_read(m_offset, m_length, io->bufferlist(), &io->completion());
-  assertf(r >= 0, "id = %d, r = %d", id(), r);
-}
-
-std::ostream& AioReadAction::dump(std::ostream& o) const {
-  o << "AioReadAction[";
-  dump_action_fields(o);
-  return o << ", imagectx_id=" << m_imagectx_id << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-
-ReadAction::ReadAction(const Action &src,
-                       imagectx_id_t imagectx_id,
-                       uint64_t offset,
-                       uint64_t length)
-  : Action(src),
-    m_imagectx_id(imagectx_id),
-    m_offset(offset),
-    m_length(length) {
-    }
-
-Action::ptr ReadAction::read_from(Action &src, Deser &d) {
-  imagectx_id_t imagectx_id = d.read_uint64_t();
-  uint64_t offset = d.read_uint64_t();
-  uint64_t length = d.read_uint64_t();
-  return Action::ptr(new ReadAction(src, imagectx_id, offset, length));
-}
-
-void ReadAction::perform(ActionCtx &worker) {
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  librbd::Image *image = worker.get_image(m_imagectx_id);
-  PendingIO::ptr io(new PendingIO(pending_io_id(), worker));
-  worker.add_pending(io);
-  ssize_t r = image->read(m_offset, m_length, io->bufferlist());
-  assertf(r >= 0, "id = %d, r = %d", id(), r);
-  worker.remove_pending(io);
-}
-
-std::ostream& ReadAction::dump(std::ostream& o) const {
-  o << "ReadAction[";
-  dump_action_fields(o);
-  return o << ", imagectx_id=" << m_imagectx_id << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-
-AioWriteAction::AioWriteAction(const Action &src,
-                               imagectx_id_t imagectx_id,
-                               uint64_t offset,
-                               uint64_t length)
-  : Action(src),
-    m_imagectx_id(imagectx_id),
-    m_offset(offset),
-    m_length(length) {
-    }
-
-Action::ptr AioWriteAction::read_from(Action &src, Deser &d) {
-  imagectx_id_t imagectx_id = d.read_uint64_t();
-  uint64_t offset = d.read_uint64_t();
-  uint64_t length = d.read_uint64_t();
-  return Action::ptr(new AioWriteAction(src, imagectx_id, offset, length));
-}
-
-static std::string create_fake_data() {
-  char data[1 << 20]; // 1 MB
-  for (unsigned int i = 0; i < sizeof(data); i++) {
-    data[i] = (char) i;
-  }
-  return std::string(data, sizeof(data));
-}
-
-void AioWriteAction::perform(ActionCtx &worker) {
-  static const std::string fake_data(create_fake_data());
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  librbd::Image *image = worker.get_image(m_imagectx_id);
-  PendingIO::ptr io(new PendingIO(pending_io_id(), worker));
-  uint64_t remaining = m_length;
-  while (remaining > 0) {
-    uint64_t n = std::min(remaining, (uint64_t)fake_data.length());
-    io->bufferlist().append(fake_data.data(), n);
-    remaining -= n;
-  }
-  worker.add_pending(io);
-  if (worker.readonly()) {
-    worker.remove_pending(io);
-  } else {
-    int r = image->aio_write(m_offset, m_length, io->bufferlist(), &io->completion());
-    assertf(r >= 0, "id = %d, r = %d", id(), r);
-  }
-}
-
-std::ostream& AioWriteAction::dump(std::ostream& o) const {
-  o << "AioWriteAction[";
-  dump_action_fields(o);
-  return o << ", imagectx_id=" << m_imagectx_id << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-
-WriteAction::WriteAction(const Action &src,
-                         imagectx_id_t imagectx_id,
-                         uint64_t offset,
-                         uint64_t length)
-  : Action(src),
-    m_imagectx_id(imagectx_id),
-    m_offset(offset),
-    m_length(length) {
-    }
-
-Action::ptr WriteAction::read_from(Action &src, Deser &d) {
-  imagectx_id_t imagectx_id = d.read_uint64_t();
-  uint64_t offset = d.read_uint64_t();
-  uint64_t length = d.read_uint64_t();
-  return Action::ptr(new WriteAction(src, imagectx_id, offset, length));
-}
-
-void WriteAction::perform(ActionCtx &worker) {
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  librbd::Image *image = worker.get_image(m_imagectx_id);
-  PendingIO::ptr io(new PendingIO(pending_io_id(), worker));
-  worker.add_pending(io);
-  io->bufferlist().append_zero(m_length);
-  if (!worker.readonly()) {
-    ssize_t r = image->write(m_offset, m_length, io->bufferlist());
-    assertf(r >= 0, "id = %d, r = %d", id(), r);
-  }
-  worker.remove_pending(io);
-}
-
-std::ostream& WriteAction::dump(std::ostream& o) const {
-  o << "WriteAction[";
-  dump_action_fields(o);
-  return o << ", imagectx_id=" << m_imagectx_id << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-
-OpenImageAction::OpenImageAction(Action &src,
-                                 imagectx_id_t imagectx_id,
-                                 string name,
-                                 string snap_name,
-                                 bool readonly)
-  : Action(src),
-    m_imagectx_id(imagectx_id),
-    m_name(name),
-    m_snap_name(snap_name),
-    m_readonly(readonly) {
-    }
-
-Action::ptr OpenImageAction::read_from(Action &src, Deser &d) {
-  imagectx_id_t imagectx_id = d.read_uint64_t();
-  string name = d.read_string();
-  string snap_name = d.read_string();
-  bool readonly = d.read_bool();
-  return Action::ptr(new OpenImageAction(src, imagectx_id, name, snap_name, readonly));
-}
-
-void OpenImageAction::perform(ActionCtx &worker) {
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  PendingIO::ptr io(new PendingIO(pending_io_id(), worker));
-  worker.add_pending(io);
-  librbd::Image *image = new librbd::Image();
-  librbd::RBD *rbd = worker.rbd();
-  rbd_loc name(worker.map_image_name(m_name, m_snap_name));
-  int r;
-  if (m_readonly || worker.readonly()) {
-    r = rbd->open_read_only(*worker.ioctx(), *image, name.image.c_str(), name.snap.c_str());
-  } else {
-    r = rbd->open(*worker.ioctx(), *image, name.image.c_str(), name.snap.c_str());
-  }
-  if (r) {
-    cerr << "Unable to open image '" << m_name
-	 << "' with snap '" << m_snap_name
-	 << "' (mapped to '" << name.str()
-	 << "') and readonly " << m_readonly
-	 << ": (" << -r << ") " << strerror(-r) << std::endl;
-    exit(1);
-  }
-  worker.put_image(m_imagectx_id, image);
-  worker.remove_pending(io);
-}
-
-std::ostream& OpenImageAction::dump(std::ostream& o) const {
-  o << "OpenImageAction[";
-  dump_action_fields(o);
-  return o << ", imagectx_id=" << m_imagectx_id << ", name='" << m_name << "', snap_name='" << m_snap_name << "', readonly=" << m_readonly << "]";
-}
-
-
-CloseImageAction::CloseImageAction(Action &src,
-                                   imagectx_id_t imagectx_id)
-  : Action(src),
-    m_imagectx_id(imagectx_id) {
-    }
-
-Action::ptr CloseImageAction::read_from(Action &src, Deser &d) {
-  imagectx_id_t imagectx_id = d.read_uint64_t();
-  return Action::ptr(new CloseImageAction(src, imagectx_id));
-}
-
-void CloseImageAction::perform(ActionCtx &worker) {
-  dout(ACTION_LEVEL) << "Performing " << *this << dendl;
-  worker.erase_image(m_imagectx_id);
-  worker.set_action_complete(pending_io_id());
-}
-
-std::ostream& CloseImageAction::dump(std::ostream& o) const {
-  o << "CloseImageAction[";
-  dump_action_fields(o);
-  return o << ", imagectx_id=" << m_imagectx_id << "]";
-}
diff --git a/src/rbd_replay/actions.hpp b/src/rbd_replay/actions.hpp
deleted file mode 100644
index 5d3f4dc..0000000
--- a/src/rbd_replay/actions.hpp
+++ /dev/null
@@ -1,307 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_ACTIONS_HPP
-#define _INCLUDED_RBD_REPLAY_ACTIONS_HPP
-
-#include <boost/shared_ptr.hpp>
-#include "include/rbd/librbd.hpp"
-#include "Deser.hpp"
-#include "rbd_loc.hpp"
-
-namespace rbd_replay {
-
-typedef uint64_t imagectx_id_t;
-typedef uint64_t thread_id_t;
-
-// Even IDs are normal actions, odd IDs are completions
-typedef uint32_t action_id_t;
-
-struct dependency_d {
-  action_id_t id;
-
-  uint64_t time_delta;
-
-  dependency_d(action_id_t id,
-	       uint64_t time_delta)
-    : id(id),
-      time_delta(time_delta) {
-  }
-};
-
-// These are written to files, so don't change existing assignments.
-enum io_type {
-  IO_START_THREAD,
-  IO_STOP_THREAD,
-  IO_READ,
-  IO_WRITE,
-  IO_ASYNC_READ,
-  IO_ASYNC_WRITE,
-  IO_OPEN_IMAGE,
-  IO_CLOSE_IMAGE,
-};
-
-
-class PendingIO;
-
-
-class ActionCtx {
-public:
-  virtual ~ActionCtx() {
-  }
-
-  virtual librbd::Image* get_image(imagectx_id_t imagectx_id) = 0;
-
-  virtual void put_image(imagectx_id_t imagectx_id, librbd::Image* image) = 0;
-
-  virtual void erase_image(imagectx_id_t imagectx_id) = 0;
-
-  virtual librbd::RBD* rbd() = 0;
-
-  virtual librados::IoCtx* ioctx() = 0;
-
-  virtual void add_pending(boost::shared_ptr<PendingIO> io) = 0;
-
-  virtual bool readonly() const = 0;
-
-  virtual void remove_pending(boost::shared_ptr<PendingIO> io) = 0;
-
-  virtual void set_action_complete(action_id_t id) = 0;
-
-  virtual void stop() = 0;
-
-  virtual rbd_loc map_image_name(std::string image_name, std::string snap_name) const = 0;
-};
-
-
-class Action {
-public:
-  typedef boost::shared_ptr<Action> ptr;
-
-  Action(action_id_t id,
-	 thread_id_t thread_id,
-	 int num_successors,
-	 int num_completion_successors,
-	 std::vector<dependency_d> &predecessors);
-
-  virtual ~Action();
-
-  virtual void perform(ActionCtx &ctx) = 0;
-
-  action_id_t pending_io_id() {
-    return m_id + 1;
-  }
-
-  // There's probably a better way to do this, but oh well.
-  virtual bool is_start_thread() {
-    return false;
-  }
-
-  action_id_t id() const {
-    return m_id;
-  }
-
-  thread_id_t thread_id() const {
-    return m_thread_id;
-  }
-
-  const std::vector<dependency_d>& predecessors() const {
-    return m_predecessors;
-  }
-
-  static ptr read_from(Deser &d);
-
-protected:
-  std::ostream& dump_action_fields(std::ostream& o) const;
-
-private:
-  friend std::ostream& operator<<(std::ostream&, const Action&);
-
-  virtual std::ostream& dump(std::ostream& o) const = 0;
-
-  const action_id_t m_id;
-  const thread_id_t m_thread_id;
-  const int m_num_successors;
-  const int m_num_completion_successors;
-  const std::vector<dependency_d> m_predecessors;
-};
-
-std::ostream& operator<<(std::ostream& o, const Action& a);
-
-
-class DummyAction : public Action {
-public:
-  DummyAction(action_id_t id,
-	      thread_id_t thread_id,
-	      int num_successors,
-	      int num_completion_successors,
-	      std::vector<dependency_d> &predecessors)
-    : Action(id, thread_id, num_successors, num_completion_successors, predecessors) {
-  }
-
-  void perform(ActionCtx &ctx) {
-  }
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-};
-
-class StopThreadAction : public Action {
-public:
-  explicit StopThreadAction(Action &src);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-};
-
-
-class AioReadAction : public Action {
-public:
-  AioReadAction(const Action &src,
-		imagectx_id_t imagectx_id,
-		uint64_t offset,
-		uint64_t length);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-
-  imagectx_id_t m_imagectx_id;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-
-class ReadAction : public Action {
-public:
-  ReadAction(const Action &src,
-	     imagectx_id_t imagectx_id,
-	     uint64_t offset,
-	     uint64_t length);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-
-  imagectx_id_t m_imagectx_id;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-
-class AioWriteAction : public Action {
-public:
-  AioWriteAction(const Action &src,
-		 imagectx_id_t imagectx_id,
-		 uint64_t offset,
-		 uint64_t length);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-
-  imagectx_id_t m_imagectx_id;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-
-class WriteAction : public Action {
-public:
-  WriteAction(const Action &src,
-	      imagectx_id_t imagectx_id,
-	      uint64_t offset,
-	      uint64_t length);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-
-  imagectx_id_t m_imagectx_id;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-
-class OpenImageAction : public Action {
-public:
-  OpenImageAction(Action &src,
-		  imagectx_id_t imagectx_id,
-		  std::string name,
-		  std::string snap_name,
-		  bool readonly);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-
-  imagectx_id_t m_imagectx_id;
-  std::string m_name;
-  std::string m_snap_name;
-  bool m_readonly;
-};
-
-
-class CloseImageAction : public Action {
-public:
-  CloseImageAction(Action &src,
-		   imagectx_id_t imagectx_id);
-
-  void perform(ActionCtx &ctx);
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-
-  imagectx_id_t m_imagectx_id;
-};
-
-
-class StartThreadAction : public Action {
-public:
-  explicit StartThreadAction(Action &src);
-
-  void perform(ActionCtx &ctx);
-
-  bool is_start_thread();
-
-  static Action::ptr read_from(Action &src, Deser &d);
-
-private:
-  std::ostream& dump(std::ostream& o) const;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/ios.cc b/src/rbd_replay/ios.cc
deleted file mode 100644
index ccc560f..0000000
--- a/src/rbd_replay/ios.cc
+++ /dev/null
@@ -1,273 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-// This code assumes that IO IDs and timestamps are related monotonically.
-// In other words, (a.id < b.id) == (a.timestamp < b.timestamp) for all IOs a and b.
-
-#include "ios.hpp"
-
-using namespace std;
-using namespace rbd_replay;
-
-bool rbd_replay::compare_io_ptrs_by_start_time(IO::ptr p1, IO::ptr p2) {
-  return p1->start_time() < p2->start_time();
-}
-
-static uint64_t min_time(const map<action_id_t, IO::ptr>& s) {
-  if (s.empty()) {
-    return 0;
-  }
-  return s.begin()->second->start_time();
-}
-
-static uint64_t max_time(const map<action_id_t, IO::ptr>& s) {
-  if (s.empty()) {
-    return 0;
-  }
-  map<action_id_t, IO::ptr>::const_iterator itr(s.end());
-  --itr;
-  return itr->second->start_time();
-}
-
-void IO::add_dependencies(const io_set_t& deps) {
-  io_set_t base(m_dependencies);
-  for (io_set_t::const_iterator itr = deps.begin(); itr != deps.end(); ++itr) {
-    ptr dep(*itr);
-    for (io_set_t::const_iterator itr2 = dep->m_dependencies.begin(); itr2 != dep->m_dependencies.end(); ++itr2) {
-      base.insert(*itr2);
-    }
-  }
-  batch_unreachable_from(deps, base, &m_dependencies);
-}
-
-void IO::write_debug_base(ostream& out, string type) const {
-  out << m_ionum << ": " << m_start_time / 1000000.0 << ": " << type << ", thread = " << m_thread_id << ", deps = {";
-  bool first = true;
-  for (io_set_t::iterator itr = m_dependencies.begin(), end = m_dependencies.end(); itr != end; ++itr) {
-    if (first) {
-      first = false;
-    } else {
-      out << ", ";
-    }
-    out << (*itr)->m_ionum << ": " << m_start_time - (*itr)->m_start_time;
-  }
-  out << "}, num_successors = " << m_num_successors << ", numCompletionSuccessors = " << num_completion_successors();
-}
-
-
-void IO::write_to(Ser& out, io_type iotype) const {
-  out.write_uint8_t(iotype);
-  out.write_uint32_t(m_ionum);
-  out.write_uint64_t(m_thread_id);
-  out.write_uint32_t(m_num_successors);
-  out.write_uint32_t(num_completion_successors());
-  out.write_uint32_t(m_dependencies.size());
-  vector<IO::ptr> deps;
-  for (io_set_t::const_iterator itr = m_dependencies.begin(), end = m_dependencies.end(); itr != end; ++itr) {
-    deps.push_back(*itr);
-  }
-  sort(deps.begin(), deps.end(), compare_io_ptrs_by_start_time);
-  for (vector<IO::ptr>::const_iterator itr = deps.begin(), end = deps.end(); itr != end; ++itr) {
-    out.write_uint32_t((*itr)->m_ionum);
-    out.write_uint64_t(m_start_time - (*itr)->m_start_time);
-  }
-}
-
-IO::ptr IO::create_completion(uint64_t start_time, thread_id_t thread_id) {
-  assert(!m_completion.lock());
-  IO::ptr completion(new CompletionIO(m_ionum + 1, start_time, thread_id));
-  m_completion = completion;
-  completion->m_dependencies.insert(shared_from_this());
-  return completion;
-}
-
-
-// TODO: Add unit tests
-// Anything in 'deps' which is not reachable from 'base' is added to 'unreachable'
-void rbd_replay::batch_unreachable_from(const io_set_t& deps, const io_set_t& base, io_set_t* unreachable) {
-  if (deps.empty()) {
-    return;
-  }
-
-  map<action_id_t, IO::ptr> searching_for;
-  for (io_set_t::const_iterator itr = deps.begin(); itr != deps.end(); ++itr) {
-    searching_for[(*itr)->ionum()] = *itr;
-  }
-
-  map<action_id_t, IO::ptr> boundary;
-  for (io_set_t::const_iterator itr = base.begin(); itr != base.end(); ++itr) {
-    boundary[(*itr)->ionum()] = *itr;
-  }
-
-  // The boundary horizon is the maximum timestamp of IOs in the boundary.
-  // This monotonically decreases, because dependencies (which are added to the set)
-  // have earlier timestamp than the dependent IOs (which were just removed from the set).
-  uint64_t boundary_horizon = max_time(boundary);
-
-  for (io_map_t::iterator itr = searching_for.begin(); itr != searching_for.end(); ) {
-    if (boundary_horizon >= itr->second->start_time()) {
-      break;
-    }
-    unreachable->insert(itr->second);
-    searching_for.erase(itr++);
-  }
-  if (searching_for.empty()) {
-    return;
-  }
-
-  // The searching horizon is the minimum timestamp of IOs in the searching set.
-  // This monotonically increases, because elements are only removed from the set.
-  uint64_t searching_horizon = min_time(searching_for);
-
-  while (!boundary.empty()) {
-    // Take an IO from the end, which has the highest timestamp.
-    // This reduces the boundary horizon as early as possible,
-    // which means we can short cut as soon as possible.
-    map<action_id_t, boost::shared_ptr<IO> >::iterator b_itr(boundary.end());
-    --b_itr;
-    boost::shared_ptr<IO> io(b_itr->second);
-    boundary.erase(b_itr);
-
-    for (io_set_t::const_iterator itr = io->dependencies().begin(), end = io->dependencies().end(); itr != end; ++itr) {
-      IO::ptr dep(*itr);
-      assertf(dep->ionum() < io->ionum(), "IO: %d, dependency: %d", io->ionum(), dep->ionum());
-      io_map_t::iterator p = searching_for.find(dep->ionum());
-      if (p != searching_for.end()) {
-	searching_for.erase(p);
-	if (dep->start_time() == searching_horizon) {
-	  searching_horizon = min_time(searching_for);
-	  if (searching_horizon == 0) {
-	    return;
-	  }
-	}
-      }
-      boundary[dep->ionum()] = dep;
-    }
-
-    boundary_horizon = max_time(boundary);
-    if (boundary_horizon != 0) {
-      // Anything we're searching for that has a timestamp greater than the
-      // boundary horizon will never be found, since the boundary horizon
-      // falls monotonically.
-      for (io_map_t::iterator itr = searching_for.begin(); itr != searching_for.end(); ) {
-	if (boundary_horizon >= itr->second->start_time()) {
-	  break;
-	}
-	unreachable->insert(itr->second);
-	searching_for.erase(itr++);
-      }
-      searching_horizon = min_time(searching_for);
-      if (searching_horizon == 0) {
-	return;
-      }
-    }
-  }
-
-  // Anything we're still searching for has not been found.
-  for (io_map_t::iterator itr = searching_for.begin(), end = searching_for.end(); itr != end; ++itr) {
-    unreachable->insert(itr->second);
-  }
-}
-
-ostream& operator<<(ostream& out, IO::ptr io) {
-  io->write_debug(out);
-  return out;
-}
-
-void StartThreadIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_START_THREAD);
-}
-
-void StartThreadIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "start thread");
-}
-
-void StopThreadIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_STOP_THREAD);
-}
-
-void StopThreadIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "stop thread");
-}
-
-void ReadIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_READ);
-  out.write_uint64_t(m_imagectx);
-  out.write_uint64_t(m_offset);
-  out.write_uint64_t(m_length);
-}
-
-void ReadIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "read");
-  out << ", imagectx=" << m_imagectx << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-void WriteIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_WRITE);
-  out.write_uint64_t(m_imagectx);
-  out.write_uint64_t(m_offset);
-  out.write_uint64_t(m_length);
-}
-
-void WriteIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "write");
-  out << ", imagectx=" << m_imagectx << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-void AioReadIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_ASYNC_READ);
-  out.write_uint64_t(m_imagectx);
-  out.write_uint64_t(m_offset);
-  out.write_uint64_t(m_length);
-}
-
-void AioReadIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "aio read");
-  out << ", imagectx=" << m_imagectx << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-void AioWriteIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_ASYNC_WRITE);
-  out.write_uint64_t(m_imagectx);
-  out.write_uint64_t(m_offset);
-  out.write_uint64_t(m_length);
-}
-
-void AioWriteIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "aio write");
-  out << ", imagectx=" << m_imagectx << ", offset=" << m_offset << ", length=" << m_length << "]";
-}
-
-void OpenImageIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_OPEN_IMAGE);
-  out.write_uint64_t(m_imagectx);
-  out.write_string(m_name);
-  out.write_string(m_snap_name);
-  out.write_bool(m_readonly);
-}
-
-void OpenImageIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "open image");
-  out << ", imagectx=" << m_imagectx << ", name='" << m_name << "', snap_name='" << m_snap_name << "', readonly=" << m_readonly;
-}
-
-void CloseImageIO::write_to(Ser& out) const {
-  IO::write_to(out, IO_CLOSE_IMAGE);
-  out.write_uint64_t(m_imagectx);
-}
-
-void CloseImageIO::write_debug(std::ostream& out) const {
-  write_debug_base(out, "close image");
-  out << ", imagectx=" << m_imagectx;
-}
diff --git a/src/rbd_replay/ios.hpp b/src/rbd_replay/ios.hpp
deleted file mode 100644
index ad9ff2a..0000000
--- a/src/rbd_replay/ios.hpp
+++ /dev/null
@@ -1,334 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_IOS_HPP
-#define _INCLUDED_RBD_REPLAY_IOS_HPP
-
-// This code assumes that IO IDs and timestamps are related monotonically.
-// In other words, (a.id < b.id) == (a.timestamp < b.timestamp) for all IOs a and b.
-
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/shared_ptr.hpp>
-#include <iostream>
-#include <map>
-#include <set>
-#include "actions.hpp"
-#include "Ser.hpp"
-
-
-namespace rbd_replay {
-
-class IO;
-
-typedef std::set<boost::shared_ptr<IO> > io_set_t;
-
-typedef std::map<action_id_t, boost::shared_ptr<IO> > io_map_t;
-
-void batch_unreachable_from(const io_set_t& deps, const io_set_t& base, io_set_t* unreachable);
-
-class IO : public boost::enable_shared_from_this<IO> {
-public:
-  typedef boost::shared_ptr<IO> ptr;
-
-  typedef boost::weak_ptr<IO> weak_ptr;
-
-  IO(action_id_t ionum,
-     uint64_t start_time,
-     thread_id_t thread_id,
-     ptr prev)
-    : m_ionum(ionum),
-      m_start_time(start_time),
-      m_dependencies(io_set_t()),
-      m_completion(weak_ptr()),
-      m_num_successors(0),
-      m_thread_id(thread_id),
-      m_prev(prev) {
-  }
-
-  virtual ~IO() {
-  }
-
-  uint64_t start_time() const {
-    return m_start_time;
-  }
-
-  io_set_t& dependencies() {
-    return m_dependencies;
-  }
-
-  const io_set_t& dependencies() const {
-    return m_dependencies;
-  }
-
-  void add_dependencies(const io_set_t& deps);
-
-  uint64_t num_completion_successors() const {
-    ptr c(m_completion.lock());
-    return c ? c->m_num_successors : 0;
-  }
-
-  void write_to(Ser& out, io_type iotype) const;
-
-  virtual void write_to(Ser& out) const = 0;
-
-  virtual bool is_completion() const {
-    return false;
-  }
-
-  void set_ionum(action_id_t ionum) {
-    m_ionum = ionum;
-  }
-
-  action_id_t ionum() const {
-    return m_ionum;
-  }
-
-  ptr prev() const {
-    return m_prev;
-  }
-
-  void set_num_successors(uint32_t n) {
-    m_num_successors = n;
-  }
-
-  uint32_t num_successors() const {
-    return m_num_successors;
-  }
-
-  void write_debug_base(std::ostream& out, std::string iotype) const;
-
-  virtual void write_debug(std::ostream& out) const = 0;
-
-  // The result must be stored somewhere, or else m_completion will expire
-  ptr create_completion(uint64_t start_time, thread_id_t thread_id);
-
-private:
-  action_id_t m_ionum;
-  uint64_t m_start_time;
-  io_set_t m_dependencies;
-  boost::weak_ptr<IO> m_completion;
-  uint32_t m_num_successors;
-  thread_id_t m_thread_id;
-  ptr m_prev;
-};
-
-std::ostream& operator<<(std::ostream& out, IO::ptr io);
-
-
-class StartThreadIO : public IO {
-public:
-  StartThreadIO(action_id_t ionum,
-		uint64_t start_time,
-		thread_id_t thread_id)
-    : IO(ionum, start_time, thread_id, IO::ptr()) {
-  }
-
-  void write_to(Ser& out) const;
-
-  void write_debug(std::ostream& out) const;
-};
-
-class StopThreadIO : public IO {
-public:
-  StopThreadIO(action_id_t ionum,
-	       uint64_t start_time,
-	       thread_id_t thread_id)
-    : IO(ionum, start_time, thread_id, IO::ptr()) {
-  }
-
-  void write_to(Ser& out) const;
-
-  void write_debug(std::ostream& out) const;
-};
-
-class ReadIO : public IO {
-public:
-  ReadIO(action_id_t ionum,
-	 uint64_t start_time,
-	 thread_id_t thread_id,
-	 IO::ptr prev,
-	 imagectx_id_t imagectx,
-	 uint64_t offset,
-	 uint64_t length)
-    : IO(ionum, start_time, thread_id, prev),
-      m_imagectx(imagectx),
-      m_offset(offset),
-      m_length(length) {
-  }
-
-  void write_to(Ser& out) const;
-
-  void write_debug(std::ostream& out) const;
-
-private:
-  imagectx_id_t m_imagectx;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-class WriteIO : public IO {
-public:
-  WriteIO(action_id_t ionum,
-	  uint64_t start_time,
-	  thread_id_t thread_id,
-	  IO::ptr prev,
-	  imagectx_id_t imagectx,
-	  uint64_t offset,
-	  uint64_t length)
-    : IO(ionum, start_time, thread_id, prev),
-      m_imagectx(imagectx),
-      m_offset(offset),
-      m_length(length) {
-  }
-
-  void write_to(Ser& out) const;
-
-  void write_debug(std::ostream& out) const;
-
-private:
-  imagectx_id_t m_imagectx;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-class AioReadIO : public IO {
-public:
-  AioReadIO(action_id_t ionum,
-	    uint64_t start_time,
-	    thread_id_t thread_id,
-	    IO::ptr prev,
-	    imagectx_id_t imagectx,
-	    uint64_t offset,
-	    uint64_t length)
-    : IO(ionum, start_time, thread_id, prev),
-      m_imagectx(imagectx),
-      m_offset(offset),
-      m_length(length) {
-  }
-
-  void write_to(Ser& out) const;
-
-  void write_debug(std::ostream& out) const;
-
-private:
-  imagectx_id_t m_imagectx;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-class AioWriteIO : public IO {
-public:
-  AioWriteIO(action_id_t ionum,
-	     uint64_t start_time,
-	     thread_id_t thread_id,
-	     IO::ptr prev,
-	     imagectx_id_t imagectx,
-	     uint64_t offset,
-	     uint64_t length)
-    : IO(ionum, start_time, thread_id, prev),
-      m_imagectx(imagectx),
-      m_offset(offset),
-      m_length(length) {
-  }
-
-  void write_to(Ser& out) const;
-
-  void write_debug(std::ostream& out) const;
-
-private:
-  imagectx_id_t m_imagectx;
-  uint64_t m_offset;
-  uint64_t m_length;
-};
-
-class OpenImageIO : public IO {
-public:
-  OpenImageIO(action_id_t ionum,
-	      uint64_t start_time,
-	      thread_id_t thread_id,
-	      IO::ptr prev,
-	      imagectx_id_t imagectx,
-	      const std::string& name,
-	      const std::string& snap_name,
-	      bool readonly)
-    : IO(ionum, start_time, thread_id, prev),
-      m_imagectx(imagectx),
-      m_name(name),
-      m_snap_name(snap_name),
-      m_readonly(readonly) {
-  }
-
-  void write_to(Ser& out) const;
-
-  imagectx_id_t imagectx() const {
-    return m_imagectx;
-  }
-
-  void write_debug(std::ostream& out) const;
-
-private:
-  imagectx_id_t m_imagectx;
-  std::string m_name;
-  std::string m_snap_name;
-  bool m_readonly;
-};
-
-class CloseImageIO : public IO {
-public:
-  CloseImageIO(action_id_t ionum,
-	       uint64_t start_time,
-	       thread_id_t thread_id,
-	       IO::ptr prev,
-	       imagectx_id_t imagectx)
-    : IO(ionum, start_time, thread_id, prev),
-      m_imagectx(imagectx) {
-  }
-
-  void write_to(Ser& out) const;
-
-  imagectx_id_t imagectx() const {
-    return m_imagectx;
-  }
-
-  void write_debug(std::ostream& out) const;
-
-private:
-  imagectx_id_t m_imagectx;
-};
-
-class CompletionIO : public IO {
-public:
-  CompletionIO(action_id_t ionum,
-	       uint64_t start_time,
-	       thread_id_t thread_id)
-    : IO(ionum, start_time, thread_id, IO::ptr()) {
-  }
-
-  void write_to(Ser& out) const {
-  }
-
-  bool is_completion() const {
-    return true;
-  }
-
-  void write_debug(std::ostream& out) const {
-    write_debug_base(out, "completion");
-  }
-};
-
-bool compare_io_ptrs_by_start_time(IO::ptr p1, IO::ptr p2);
-
-}
-
-#endif
diff --git a/src/rbd_replay/rbd-replay-prep.cc b/src/rbd_replay/rbd-replay-prep.cc
deleted file mode 100644
index 63a5fda..0000000
--- a/src/rbd_replay/rbd-replay-prep.cc
+++ /dev/null
@@ -1,486 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-// This code assumes that IO IDs and timestamps are related monotonically.
-// In other words, (a.id < b.id) == (a.timestamp < b.timestamp) for all IOs a and b.
-
-#include <babeltrace/babeltrace.h>
-#include <babeltrace/ctf/events.h>
-#include <babeltrace/ctf/iterator.h>
-#include <cstdlib>
-#include <string>
-#include <assert.h>
-#include <fstream>
-#include <boost/thread/thread.hpp>
-#include "ios.hpp"
-
-using namespace std;
-using namespace rbd_replay;
-
-
-class Thread {
-public:
-  typedef boost::shared_ptr<Thread> ptr;
-
-  Thread(thread_id_t id,
-	 uint64_t window)
-    : m_id(id),
-      m_window(window),
-      m_pending_io(IO::ptr()),
-      m_latest_io(IO::ptr()),
-      m_max_ts(0) {
-  }
-
-  void insert_ts(uint64_t ts) {
-    if (m_max_ts == 0 || ts > m_max_ts) {
-      m_max_ts = ts;
-    }
-  }
-
-  uint64_t max_ts() const {
-    return m_max_ts;
-  }
-
-  void issued_io(IO::ptr io, const map<thread_id_t, ptr>& threads) {
-    assert(io);
-    io_set_t latest_ios;
-    for (map<thread_id_t, ptr>::const_iterator itr = threads.begin(), end = threads.end(); itr != end; ++itr) {
-      assertf(itr->second, "id = %ld", itr->first);
-      ptr thread(itr->second);
-      if (thread->m_latest_io) {
-	if (thread->m_latest_io->start_time() + m_window > io->start_time()) {
-	  latest_ios.insert(thread->m_latest_io);
-	}
-      }
-    }
-    io->add_dependencies(latest_ios);
-    m_latest_io = io;
-    m_pending_io = io;
-  }
-
-  thread_id_t id() const {
-    return m_id;
-  }
-
-  IO::ptr pending_io() {
-    return m_pending_io;
-  }
-
-private:
-  thread_id_t m_id;
-  uint64_t m_window;
-  IO::ptr m_pending_io;
-  IO::ptr m_latest_io;
-  uint64_t m_max_ts;
-};
-
-static void usage(string prog) {
-  cout << "Usage: " << prog << " [ --window <seconds> ] <trace-input> <replay-output>" << endl;
-}
-
-__attribute__((noreturn)) static void usage_exit(string prog, string msg) {
-  cerr << msg << endl;
-  usage(prog);
-  exit(1);
-}
-
-class Processor {
-public:
-  Processor()
-    : m_window(1000000000ULL), // 1 billion nanoseconds, i.e., one second
-      m_threads(),
-      m_io_count(0),
-      m_recent_completions(io_set_t()),
-      m_open_images(set<imagectx_id_t>()),
-      m_ios(vector<IO::ptr>()),
-      m_pending_ios(map<uint64_t, IO::ptr>()) {
-  }
-
-  void run(vector<string> args) {
-    string input_file_name;
-    string output_file_name;
-    bool got_input = false;
-    bool got_output = false;
-    for (int i = 1, nargs = args.size(); i < nargs; i++) {
-      const string& arg(args[i]);
-      if (arg == "--window") {
-	if (i == nargs - 1) {
-	  usage_exit(args[0], "--window requires an argument");
-	}
-	m_window = (uint64_t)(1e9 * atof(args[++i].c_str()));
-      } else if (arg.find("--window=") == 0) {
-	// TODO: test
-	printf("Arg: '%s'\n", arg.c_str() + sizeof("--window="));
-	m_window = (uint64_t)(1e9 * atof(arg.c_str() + sizeof("--window=")));
-      } else if (arg == "-h" || arg == "--help") {
-	usage(args[0]);
-	exit(0);
-      } else if (arg.find("-") == 0) {
-	usage_exit(args[0], "Unrecognized argument: " + arg);
-      } else if (!got_input) {
-	input_file_name = arg;
-	got_input = true;
-      } else if (!got_output) {
-	output_file_name = arg;
-	got_output = true;
-      } else {
-	usage_exit(args[0], "Too many arguments");
-      }
-    }
-    if (!got_output) {
-      usage_exit(args[0], "Not enough arguments");
-    }
-
-    struct bt_context *ctx = bt_context_create();
-    int trace_handle = bt_context_add_trace(ctx,
-					    input_file_name.c_str(), // path
-					    "ctf", // format
-					    NULL, // packet_seek
-					    NULL, // stream_list
-					    NULL); // metadata
-    assertf(trace_handle >= 0, "trace_handle = %d", trace_handle);
-
-    uint64_t start_time_ns = bt_trace_handle_get_timestamp_begin(ctx, trace_handle, BT_CLOCK_REAL);
-    assert(start_time_ns != -1ULL);
-
-    struct bt_ctf_iter *itr = bt_ctf_iter_create(ctx,
-						 NULL, // begin_pos
-						 NULL); // end_pos
-    assert(itr);
-
-    struct bt_iter *bt_itr = bt_ctf_get_iter(itr);
-
-    uint64_t trace_start = 0;
-    struct bt_ctf_event *evt;
-    bool first = true;
-    while(true) {
-      evt = bt_ctf_iter_read_event(itr);
-      if(!evt) {
-	break;
-      }
-      uint64_t ts = bt_ctf_get_timestamp(evt);
-      assert(ts != -1ULL);
-
-      if (first) {
-	trace_start = ts;
-	first = false;
-      }
-      ts -= trace_start;
-      ts += 4; // This is so we have room to insert two events (thread start and open image) at unique timestamps before whatever the first event is.
-
-      process_event(ts, evt);
-
-      int r = bt_iter_next(bt_itr);
-      assert(!r);
-    }
-
-    bt_ctf_iter_destroy(itr);
-
-    insert_thread_stops();
-
-    for (vector<IO::ptr>::const_iterator itr = m_ios.begin(); itr != m_ios.end(); ++itr) {
-      IO::ptr io(*itr);
-      IO::ptr prev(io->prev());
-      if (prev) {
-	// TODO: explain when prev is and isn't a dep
-	io_set_t::iterator depitr = io->dependencies().find(prev);
-	if (depitr != io->dependencies().end()) {
-	  io->dependencies().erase(depitr);
-	}
-      }
-      if (io->is_completion()) {
-	io->dependencies().clear();
-      }
-      for (io_set_t::const_iterator depitr = io->dependencies().begin(); depitr != io->dependencies().end(); ++depitr) {
-	IO::ptr dep(*depitr);
-	dep->set_num_successors(dep->num_successors() + 1);
-      }
-    }
-
-    ofstream myfile;
-    myfile.open(output_file_name.c_str(), ios::out | ios::binary);
-    Ser ser(myfile);
-    for (vector<IO::ptr>::iterator itr = m_ios.begin(); itr != m_ios.end(); ++itr) {
-      (*itr)->write_to(ser);
-    }
-    myfile.close();
-  }
-
-private:
-  void insert_thread_stops() {
-    sort(m_ios.begin(), m_ios.end(), compare_io_ptrs_by_start_time);
-    for (map<thread_id_t, Thread::ptr>::const_iterator itr = m_threads.begin(), end = m_threads.end(); itr != end; ++itr) {
-      Thread::ptr thread(itr->second);
-      const action_id_t none = -1;
-      action_id_t ionum = none;
-      action_id_t maxIONum = 0; // only valid if ionum is none
-      for (vector<IO::ptr>::const_iterator itr2 = m_ios.begin(); itr2 != m_ios.end(); ++itr2) {
-	IO::ptr io(*itr2);
-	if (io->ionum() > maxIONum) {
-	  maxIONum = io->ionum();
-	}
-	if (io->start_time() > thread->max_ts()) {
-	  ionum = io->ionum();
-	  if (ionum & 1) {
-	    ionum++;
-	  }
-	  break;
-	}
-      }
-      if (ionum == none) {
-	if (maxIONum & 1) {
-	  maxIONum--;
-	}
-	ionum = maxIONum + 2;
-      }
-      for (vector<IO::ptr>::const_iterator itr2 = m_ios.begin(); itr2 != m_ios.end(); ++itr2) {
-	IO::ptr io(*itr2);
-	if (io->ionum() >= ionum) {
-	  io->set_ionum(io->ionum() + 2);
-	}
-      }
-      IO::ptr stop_thread_io(new StopThreadIO(ionum, thread->max_ts(), thread->id()));
-      vector<IO::ptr>::iterator insertion_point = lower_bound(m_ios.begin(), m_ios.end(), stop_thread_io, compare_io_ptrs_by_start_time);
-      m_ios.insert(insertion_point, stop_thread_io);
-    }
-  }
-
-  void process_event(uint64_t ts, struct bt_ctf_event *evt) {
-    const char *event_name = bt_ctf_event_name(evt);
-    const struct bt_definition *scope_context = bt_ctf_get_top_level_scope(evt,
-									   BT_STREAM_EVENT_CONTEXT);
-    assert(scope_context);
-    const struct bt_definition *scope_fields = bt_ctf_get_top_level_scope(evt,
-									  BT_EVENT_FIELDS);
-    assert(scope_fields);
-
-    const struct bt_definition *pthread_id_field = bt_ctf_get_field(evt, scope_context, "pthread_id");
-    assert(pthread_id_field);
-    thread_id_t threadID = bt_ctf_get_uint64(pthread_id_field);
-    Thread::ptr &thread(m_threads[threadID]);
-    if (!thread) {
-      thread.reset(new Thread(threadID, m_window));
-      IO::ptr io(new StartThreadIO(next_id(), ts - 4, threadID));
-      m_ios.push_back(io);
-    }
-    thread->insert_ts(ts);
-
-    class FieldLookup {
-    public:
-      FieldLookup(struct bt_ctf_event *evt,
-		  const struct bt_definition *scope)
-	: m_evt(evt),
-	  m_scope(scope) {
-      }
-
-      const char* string(const char* name) {
-	const struct bt_definition *field = bt_ctf_get_field(m_evt, m_scope, name);
-	assertf(field, "field name = '%s'", name);
-	const char* c = bt_ctf_get_string(field);
-	int err = bt_ctf_field_get_error();
-	assertf(c && err == 0, "field name = '%s', err = %d", name, err);
-	return c;
-      }
-
-      int64_t int64(const char* name) {
-	const struct bt_definition *field = bt_ctf_get_field(m_evt, m_scope, name);
-	assertf(field, "field name = '%s'", name);
-	int64_t val = bt_ctf_get_int64(field);
-	int err = bt_ctf_field_get_error();
-	assertf(err == 0, "field name = '%s', err = %d", name, err);
-	return val;
-      }
-
-      uint64_t uint64(const char* name) {
-	const struct bt_definition *field = bt_ctf_get_field(m_evt, m_scope, name);
-	assertf(field, "field name = '%s'", name);
-	uint64_t val = bt_ctf_get_uint64(field);
-	int err = bt_ctf_field_get_error();
-	assertf(err == 0, "field name = '%s', err = %d", name, err);
-	return val;
-      }
-
-    private:
-      struct bt_ctf_event *m_evt;
-      const struct bt_definition *m_scope;
-    } fields(evt, scope_fields);
-
-    if (strcmp(event_name, "librbd:read_enter") == 0) {
-      string name(fields.string("name"));
-      string snap_name(fields.string("snap_name"));
-      bool readonly = fields.int64("read_only");
-      imagectx_id_t imagectx = fields.uint64("imagectx");
-      uint64_t offset = fields.uint64("offset");
-      uint64_t length = fields.uint64("length");
-      require_image(ts, thread, imagectx, name, snap_name, readonly);
-      action_id_t ionum = next_id();
-      IO::ptr io(new ReadIO(ionum, ts, threadID, thread->pending_io(), imagectx, offset, length));
-      io->add_dependencies(m_recent_completions);
-      thread->issued_io(io, m_threads);
-      m_ios.push_back(io);
-    } else if (strcmp(event_name, "librbd:open_image_enter") == 0) {
-      string name(fields.string("name"));
-      string snap_name(fields.string("snap_name"));
-      bool readonly = fields.int64("read_only");
-      imagectx_id_t imagectx = fields.uint64("imagectx");
-      action_id_t ionum = next_id();
-      IO::ptr io(new OpenImageIO(ionum, ts, threadID, thread->pending_io(), imagectx, name, snap_name, readonly));
-      io->add_dependencies(m_recent_completions);
-      thread->issued_io(io, m_threads);
-      m_ios.push_back(io);
-    } else if (strcmp(event_name, "librbd:open_image_exit") == 0) {
-      IO::ptr completionIO(thread->pending_io()->create_completion(ts, threadID));
-      m_ios.push_back(completionIO);
-      boost::shared_ptr<OpenImageIO> io(boost::dynamic_pointer_cast<OpenImageIO>(thread->pending_io()));
-      assert(io);
-      m_open_images.insert(io->imagectx());
-    } else if (strcmp(event_name, "librbd:close_image_enter") == 0) {
-      imagectx_id_t imagectx = fields.uint64("imagectx");
-      action_id_t ionum = next_id();
-      IO::ptr io(new CloseImageIO(ionum, ts, threadID, thread->pending_io(), imagectx));
-      io->add_dependencies(m_recent_completions);
-      thread->issued_io(io, m_threads);
-      m_ios.push_back(thread->pending_io());
-    } else if (strcmp(event_name, "librbd:close_image_exit") == 0) {
-      IO::ptr completionIO(thread->pending_io()->create_completion(ts, threadID));
-      m_ios.push_back(completionIO);
-      completed(completionIO);
-      boost::shared_ptr<CloseImageIO> io(boost::dynamic_pointer_cast<CloseImageIO>(thread->pending_io()));
-      assert(io);
-      m_open_images.erase(io->imagectx());
-    } else if (strcmp(event_name, "librbd:read_exit") == 0) {
-      IO::ptr completionIO(thread->pending_io()->create_completion(ts, threadID));
-      m_ios.push_back(completionIO);
-      completed(completionIO);
-    } else if (strcmp(event_name, "librbd:write_enter") == 0) {
-      string name(fields.string("name"));
-      string snap_name(fields.string("snap_name"));
-      bool readonly = fields.int64("read_only");
-      uint64_t offset = fields.uint64("off");
-      uint64_t length = fields.uint64("buf_len");
-      imagectx_id_t imagectx = fields.uint64("imagectx");
-      require_image(ts, thread, imagectx, name, snap_name, readonly);
-      action_id_t ionum = next_id();
-      IO::ptr io(new WriteIO(ionum, ts, threadID, thread->pending_io(), imagectx, offset, length));
-      io->add_dependencies(m_recent_completions);
-      thread->issued_io(io, m_threads);
-      m_ios.push_back(io);
-    } else if (strcmp(event_name, "librbd:write_exit") == 0) {
-      IO::ptr completionIO(thread->pending_io()->create_completion(ts, threadID));
-      m_ios.push_back(completionIO);
-      completed(completionIO);
-    } else if (strcmp(event_name, "librbd:aio_read_enter") == 0) {
-      string name(fields.string("name"));
-      string snap_name(fields.string("snap_name"));
-      bool readonly = fields.int64("read_only");
-      uint64_t completion = fields.uint64("completion");
-      imagectx_id_t imagectx = fields.uint64("imagectx");
-      uint64_t offset = fields.uint64("offset");
-      uint64_t length = fields.uint64("length");
-      require_image(ts, thread, imagectx, name, snap_name, readonly);
-      action_id_t ionum = next_id();
-      IO::ptr io(new AioReadIO(ionum, ts, threadID, thread->pending_io(), imagectx, offset, length));
-      io->add_dependencies(m_recent_completions);
-      m_ios.push_back(io);
-      thread->issued_io(io, m_threads);
-      m_pending_ios[completion] = io;
-    } else if (strcmp(event_name, "librbd:aio_write_enter") == 0) {
-      string name(fields.string("name"));
-      string snap_name(fields.string("snap_name"));
-      bool readonly = fields.int64("read_only");
-      uint64_t offset = fields.uint64("off");
-      uint64_t length = fields.uint64("len");
-      uint64_t completion = fields.uint64("completion");
-      imagectx_id_t imagectx = fields.uint64("imagectx");
-      require_image(ts, thread, imagectx, name, snap_name, readonly);
-      action_id_t ionum = next_id();
-      IO::ptr io(new AioWriteIO(ionum, ts, threadID, thread->pending_io(), imagectx, offset, length));
-      io->add_dependencies(m_recent_completions);
-      thread->issued_io(io, m_threads);
-      m_ios.push_back(io);
-      m_pending_ios[completion] = io;
-    } else if (strcmp(event_name, "librbd:aio_complete_enter") == 0) {
-      uint64_t completion = fields.uint64("completion");
-      map<uint64_t, IO::ptr>::iterator itr = m_pending_ios.find(completion);
-      if (itr != m_pending_ios.end()) {
-	IO::ptr completedIO(itr->second);
-	m_pending_ios.erase(itr);
-	IO::ptr completionIO(completedIO->create_completion(ts, threadID));
-	m_ios.push_back(completionIO);
-	completed(completionIO);
-      }
-    }
-
-    //        cout << ts << "\t" << event_name << "\tthreadID = " << threadID << endl;
-  }
-
-  action_id_t next_id() {
-    action_id_t id = m_io_count;
-    m_io_count += 2;
-    return id;
-  }
-
-  void completed(IO::ptr io) {
-    uint64_t limit = io->start_time() < m_window ? 0 : io->start_time() - m_window;
-    for (io_set_t::iterator itr = m_recent_completions.begin(); itr != m_recent_completions.end(); ) {
-      if ((*itr)->start_time() < limit) {
-	m_recent_completions.erase(itr++);
-      } else {
-	++itr;
-      }
-    }
-    m_recent_completions.insert(io);
-  }
-
-  void require_image(uint64_t ts,
-		     Thread::ptr thread,
-		     imagectx_id_t imagectx,
-		     const string& name,
-		     const string& snap_name,
-		     bool readonly) {
-    assert(thread);
-    if (m_open_images.count(imagectx) > 0) {
-      return;
-    }
-    action_id_t ionum = next_id();
-    IO::ptr io(new OpenImageIO(ionum, ts - 2, thread->id(), thread->pending_io(), imagectx, name, snap_name, readonly));
-    io->add_dependencies(m_recent_completions);
-    thread->issued_io(io, m_threads);
-    m_ios.push_back(io);
-    IO::ptr completionIO(io->create_completion(ts - 1, thread->id()));
-    m_ios.push_back(completionIO);
-    completed(completionIO);
-    m_open_images.insert(imagectx);
-  }
-
-  uint64_t m_window;
-  map<thread_id_t, Thread::ptr> m_threads;
-  uint32_t m_io_count;
-  io_set_t m_recent_completions;
-  set<imagectx_id_t> m_open_images;
-  vector<IO::ptr> m_ios;
-
-  // keyed by completion
-  map<uint64_t, IO::ptr> m_pending_ios;
-};
-
-int main(int argc, char** argv) {
-  vector<string> args;
-  for (int i = 0; i < argc; i++) {
-    args.push_back(string(argv[i]));
-  }
-
-  Processor p;
-  p.run(args);
-}
diff --git a/src/rbd_replay/rbd-replay.cc b/src/rbd_replay/rbd-replay.cc
deleted file mode 100644
index f600ead..0000000
--- a/src/rbd_replay/rbd-replay.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include <vector>
-#include <boost/thread.hpp>
-#include "common/ceph_argparse.h"
-#include "global/global_init.h"
-#include "Replayer.hpp"
-#include "rbd_replay_debug.hpp"
-#include "ImageNameMap.hpp"
-
-
-using namespace std;
-using namespace rbd_replay;
-
-
-static const char* get_remainder(const char *string, const char *prefix) {
-  while (*prefix) {
-    if (*prefix++ != *string++) {
-      return NULL;
-    }
-  }
-  return string;
-}
-
-static void usage(const char* program) {
-  cout << "Usage: " << program << " --conf=<config_file> <replay_file>" << std::endl;
-  cout << "Options:" << std::endl;
-  cout << "  -p, --pool-name <pool>          Name of the pool to use.  Default: rbd" << std::endl;
-  cout << "  --latency-multiplier <float>    Multiplies inter-request latencies.  Default: 1" << std::endl;
-  cout << "  --read-only                     Only perform non-destructive operations." << std::endl;
-  cout << "  --map-image <rule>              Add a rule to map image names in the trace to" << std::endl;
-  cout << "                                  image names in the replay cluster." << std::endl;
-  cout << std::endl;
-  cout << "Image mapping rules:" << std::endl;
-  cout << "A rule of image1 at snap1=image2 at snap2 would map snap1 of image1 to snap2 of" << std::endl;
-  cout << "image2." << std::endl;
-}
-
-int main(int argc, const char **argv) {
-  vector<const char*> args;
-
-  argv_to_vec(argc, argv, args);
-  env_to_vec(args);
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-
-  std::vector<const char*>::iterator i;
-  string pool_name = "rbd";
-  float latency_multiplier = 1;
-  bool readonly = false;
-  ImageNameMap image_name_map;
-  std::string val;
-  std::ostringstream err;
-  for (i = args.begin(); i != args.end(); ) {
-    if (ceph_argparse_double_dash(args, i)) {
-      break;
-    } else if (ceph_argparse_witharg(args, i, &val, "-p", "--pool", (char*)NULL)) {
-      pool_name = val;
-    } else if (ceph_argparse_withfloat(args, i, &latency_multiplier, &err, "--latency-multiplier",
-				     (char*)NULL)) {
-      if (!err.str().empty()) {
-	cerr << err.str() << std::endl;
-	return 1;
-      }
-    } else if (ceph_argparse_flag(args, i, "--read-only", (char*)NULL)) {
-      readonly = true;
-    } else if (ceph_argparse_witharg(args, i, &val, "--map-image", (char*)NULL)) {
-      ImageNameMap::Mapping mapping;
-      if (image_name_map.parse_mapping(val, &mapping)) {
-	image_name_map.add_mapping(mapping);
-      } else {
-	cerr << "Unable to parse mapping string: '" << val << "'" << std::endl;
-	return 1;
-      }
-    } else if (ceph_argparse_flag(args, i, "-h", "--help", (char*)NULL)) {
-      usage(argv[0]);
-      return 0;
-    } else if (get_remainder(*i, "-")) {
-      cerr << "Unrecognized argument: " << *i << std::endl;
-      return 1;
-    } else {
-      ++i;
-    }
-  }
-
-  common_init_finish(g_ceph_context);
-
-  string replay_file;
-  if (!args.empty()) {
-    replay_file = args[0];
-  }
-
-  if (replay_file.empty()) {
-    cerr << "No replay file specified." << std::endl;
-    return 1;
-  }
-
-  unsigned int nthreads = boost::thread::hardware_concurrency();
-  Replayer replayer(2 * nthreads + 1);
-  replayer.set_latency_multiplier(latency_multiplier);
-  replayer.set_pool_name(pool_name);
-  replayer.set_readonly(readonly);
-  replayer.set_image_name_map(image_name_map);
-  replayer.run(replay_file);
-}
diff --git a/src/rbd_replay/rbd_loc.cc b/src/rbd_replay/rbd_loc.cc
deleted file mode 100644
index 86c50ae1..0000000
--- a/src/rbd_replay/rbd_loc.cc
+++ /dev/null
@@ -1,130 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "rbd_loc.hpp"
-#include "include/assert.h"
-
-
-using namespace std;
-using namespace rbd_replay;
-
-
-rbd_loc::rbd_loc() {
-}
-
-rbd_loc::rbd_loc(string pool, string image, string snap)
-  : pool(pool),
-    image(image),
-    snap(snap) {
-}
-
-bool rbd_loc::parse(string name_string) {
-  int field = 0;
-  string fields[3];
-  bool read_slash = false;
-  bool read_at = false;
-  for (size_t i = 0, n = name_string.length(); i < n; i++) {
-    char c = name_string[i];
-    switch (c) {
-    case '/':
-      if (read_slash || read_at) {
-	return false;
-      }
-      assert(field == 0);
-      field++;
-      read_slash = true;
-      break;
-    case '@':
-      if (read_at) {
-	return false;
-      }
-      assert(field < 2);
-      field++;
-      read_at = true;
-      break;
-    case '\\':
-      if (i == n - 1) {
-	return false;
-      }
-      fields[field].push_back(name_string[++i]);
-      break;
-    default:
-      fields[field].push_back(c);
-    }
-  }
-
-  if (read_slash) {
-    pool = fields[0];
-    image = fields[1];
-    // note that if read_at is false, then fields[2] is the empty string,
-    // so this is still correct
-    snap = fields[2];
-  } else {
-    pool = "";
-    image = fields[0];
-    // note that if read_at is false, then fields[1] is the empty string,
-    // so this is still correct
-    snap = fields[1];
-  }
-  return true;
-}
-
-
-static void write(const string &in, string *out) {
-  for (size_t i = 0, n = in.length(); i < n; i++) {
-    char c = in[i];
-    if (c == '@' || c == '/' || c == '\\') {
-      out->push_back('\\');
-    }
-    out->push_back(c);
-  }
-}
-
-string rbd_loc::str() const {
-  string out;
-  if (!pool.empty()) {
-    write(pool, &out);
-    out.push_back('/');
-  }
-  write(image, &out);
-  if (!snap.empty()) {
-    out.push_back('@');
-    write(snap, &out);
-  }
-  return out;
-}
-
-int rbd_loc::compare(const rbd_loc& rhs) const {
-  int c = pool.compare(rhs.pool);
-  if (c) {
-    return c;
-  }
-  c = image.compare(rhs.image);
-  if (c) {
-    return c;
-  }
-  c = snap.compare(rhs.snap);
-  if (c) {
-    return c;
-  }
-  return 0;
-}
-
-bool rbd_loc::operator==(const rbd_loc& rhs) const {
-  return compare(rhs) == 0;
-}
-
-bool rbd_loc::operator<(const rbd_loc& rhs) const {
-  return compare(rhs) < 0;
-}
diff --git a/src/rbd_replay/rbd_loc.hpp b/src/rbd_replay/rbd_loc.hpp
deleted file mode 100644
index fab159a..0000000
--- a/src/rbd_replay/rbd_loc.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_RBD_LOC_HPP
-#define _INCLUDED_RBD_REPLAY_RBD_LOC_HPP
-
-#include <string>
-
-namespace rbd_replay {
-
-struct rbd_loc {
-  rbd_loc();
-
-  rbd_loc(std::string pool, std::string image, std::string snap);
-
-  bool parse(std::string name_string);
-
-  std::string str() const;
-
-  int compare(const rbd_loc& rhs) const;
-
-  bool operator==(const rbd_loc& rhs) const;
-
-  bool operator<(const rbd_loc& rhs) const;
-
-  std::string pool;
-
-  std::string image;
-
-  std::string snap;
-};
-
-}
-
-#endif
diff --git a/src/rbd_replay/rbd_replay_debug.hpp b/src/rbd_replay/rbd_replay_debug.hpp
deleted file mode 100644
index 3b9683f..0000000
--- a/src/rbd_replay/rbd_replay_debug.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#ifndef _INCLUDED_RBD_REPLAY_DEBUG_H
-#define _INCLUDED_RBD_REPLAY_DEBUG_H
-
-#include "common/debug.h"
-#include "include/assert.h"
-
-namespace rbd_replay {
-
-static const int ACTION_LEVEL = 11;
-static const int DEPGRAPH_LEVEL = 12;
-static const int SLEEP_LEVEL = 13;
-static const int THREAD_LEVEL = 10;
-
-}
-
-#define dout_subsys ceph_subsys_rbd_replay
-#undef dout_prefix
-#define dout_prefix *_dout << "rbd_replay: "
-
-#endif
diff --git a/src/rgw/Makefile.am b/src/rgw/Makefile.am
index 06e56c6..6bf9804 100644
--- a/src/rgw/Makefile.am
+++ b/src/rgw/Makefile.am
@@ -75,7 +75,7 @@ radosgw_SOURCES = \
 	rgw/rgw_civetweb_log.cc \
 	civetweb/src/civetweb.c \
 	rgw/rgw_main.cc
-radosgw_CFLAGS = -I$(srcdir)/civetweb/include
+radosgw_CFLAGS = -Icivetweb/include
 radosgw_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(RESOLV_LIBS) $(CEPH_GLOBAL)
 bin_PROGRAMS += radosgw
 
@@ -163,3 +163,4 @@ noinst_HEADERS += \
 	civetweb/civetweb.h \
 	civetweb/include/civetweb.h \
 	civetweb/src/md5.h
+
diff --git a/src/rgw/rgw_acl.cc b/src/rgw/rgw_acl.cc
index 669a83d..868bd65 100644
--- a/src/rgw/rgw_acl.cc
+++ b/src/rgw/rgw_acl.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <string.h>
 
 #include <iostream>
diff --git a/src/rgw/rgw_acl.h b/src/rgw/rgw_acl.h
index 2de62e7..c06e9eb 100644
--- a/src/rgw/rgw_acl.h
+++ b/src/rgw/rgw_acl.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_ACL_H
 #define CEPH_RGW_ACL_H
 
diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc
index 785324c..b47c14d 100644
--- a/src/rgw/rgw_acl_s3.cc
+++ b/src/rgw/rgw_acl_s3.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <string.h>
 
 #include <iostream>
diff --git a/src/rgw/rgw_acl_s3.h b/src/rgw/rgw_acl_s3.h
index 13a11c1..e0340d8 100644
--- a/src/rgw/rgw_acl_s3.h
+++ b/src/rgw/rgw_acl_s3.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_ACL_S3_H
 #define CEPH_RGW_ACL_S3_H
 
diff --git a/src/rgw/rgw_acl_swift.cc b/src/rgw/rgw_acl_swift.cc
index bdfa8f7..b02ce90 100644
--- a/src/rgw/rgw_acl_swift.cc
+++ b/src/rgw/rgw_acl_swift.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <string.h>
 
diff --git a/src/rgw/rgw_acl_swift.h b/src/rgw/rgw_acl_swift.h
index b26a39e..be64f58 100644
--- a/src/rgw/rgw_acl_swift.h
+++ b/src/rgw/rgw_acl_swift.h
@@ -1,8 +1,5 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_ACL_SWIFT_H
-#define CEPH_RGW_ACL_SWIFT_H
+#define CEPH_RGW_ACL_SWIFT3_H
 
 #include <map>
 #include <string>
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index 31c0c08..e31a28a 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -1,27 +1,23 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
+
 #include <iostream>
 #include <sstream>
 #include <string>
 
 using namespace std;
 
-#include "auth/Crypto.h"
-
-#include "common/armor.h"
 #include "common/ceph_json.h"
+
 #include "common/config.h"
 #include "common/ceph_argparse.h"
 #include "common/Formatter.h"
-#include "common/errno.h"
-
+#include "common/ceph_json.h"
 #include "global/global_init.h"
-
+#include "common/errno.h"
 #include "include/utime.h"
 #include "include/str_list.h"
 
+#include "common/armor.h"
 #include "rgw_user.h"
 #include "rgw_bucket.h"
 #include "rgw_rados.h"
@@ -31,6 +27,7 @@ using namespace std;
 #include "rgw_formats.h"
 #include "rgw_usage.h"
 #include "rgw_replica_log.h"
+#include "auth/Crypto.h"
 
 #define dout_subsys ceph_subsys_rgw
 
@@ -207,7 +204,6 @@ enum {
   OPT_BUCKET_STATS,
   OPT_BUCKET_CHECK,
   OPT_BUCKET_RM,
-  OPT_BUCKET_REWRITE,
   OPT_POLICY,
   OPT_POOL_ADD,
   OPT_POOL_RM,
@@ -221,7 +217,6 @@ enum {
   OPT_OBJECT_RM,
   OPT_OBJECT_UNLINK,
   OPT_OBJECT_STAT,
-  OPT_OBJECT_REWRITE,
   OPT_QUOTA_SET,
   OPT_QUOTA_ENABLE,
   OPT_QUOTA_DISABLE,
@@ -339,8 +334,6 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
       return OPT_BUCKET_STATS;
     if (strcmp(cmd, "rm") == 0)
       return OPT_BUCKET_RM;
-    if (strcmp(cmd, "rewrite") == 0)
-      return OPT_BUCKET_REWRITE;
     if (strcmp(cmd, "check") == 0)
       return OPT_BUCKET_CHECK;
   } else if (strcmp(prev_cmd, "log") == 0) {
@@ -380,8 +373,6 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
       return OPT_OBJECT_UNLINK;
     if (strcmp(cmd, "stat") == 0)
       return OPT_OBJECT_STAT;
-    if (strcmp(cmd, "rewrite") == 0)
-      return OPT_OBJECT_REWRITE;
   } else if (strcmp(prev_cmd, "region") == 0) {
     if (strcmp(cmd, "get") == 0)
       return OPT_REGION_GET;
@@ -754,62 +745,6 @@ int set_user_quota(int opt_cmd, RGWUser& user, RGWUserAdminOpState& op_state, in
   return 0;
 }
 
-static bool bucket_object_check_filter(const string& name)
-{
-  string ns;
-  string obj = name;
-  return rgw_obj::translate_raw_obj_to_obj_in_ns(obj, ns);
-}
-
-int check_min_obj_stripe_size(RGWRados *store, rgw_obj& obj, uint64_t min_stripe_size, bool *need_rewrite)
-{
-  map<string, bufferlist> attrs;
-  uint64_t obj_size;
-  void *handle;
-
-  void *obj_ctx = store->create_context(NULL);
-  int ret = store->prepare_get_obj(obj_ctx, obj, NULL, NULL, &attrs, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, &obj_size, NULL, &handle, NULL);
-  store->finish_get_obj(&handle);
-  store->destroy_context(obj_ctx);
-  if (ret < 0) {
-    lderr(store->ctx()) << "ERROR: failed to stat object, returned error: " << cpp_strerror(-ret) << dendl;
-    return ret;
-  }
-
-  map<string, bufferlist>::iterator iter;
-  iter = attrs.find(RGW_ATTR_MANIFEST);
-  if (iter == attrs.end()) {
-    *need_rewrite = (obj_size >= min_stripe_size);
-    return 0;
-  }
-
-  RGWObjManifest manifest;
-
-  try {
-    bufferlist& bl = iter->second;
-    bufferlist::iterator biter = bl.begin();
-    ::decode(manifest, biter);
-  } catch (buffer::error& err) {
-    ldout(store->ctx(), 0) << "ERROR: failed to decode manifest" << dendl;
-    return -EIO;
-  }
-
-  map<uint64_t, RGWObjManifestPart>& objs = manifest.get_explicit_objs();
-  map<uint64_t, RGWObjManifestPart>::iterator oiter;
-  for (oiter = objs.begin(); oiter != objs.end(); ++oiter) {
-    RGWObjManifestPart& part = oiter->second;
-
-    if (part.size >= min_stripe_size) {
-      *need_rewrite = true;
-      return 0;
-    }
-  }
-  *need_rewrite = false;
-
-  return 0;
-}
-
 int main(int argc, char **argv) 
 {
   vector<const char*> args;
@@ -882,10 +817,6 @@ int main(int argc, char **argv)
 
   int sync_stats = false;
 
-  uint64_t min_rewrite_size = 4 * 1024 * 1024;
-  uint64_t max_rewrite_size = ULLONG_MAX;
-  uint64_t min_rewrite_stripe_size = 0;
-
   std::string val;
   std::ostringstream errs;
   string err;
@@ -949,12 +880,6 @@ int main(int argc, char **argv)
 	cerr << errs.str() << std::endl;
 	exit(EXIT_FAILURE);
       }
-    } else if (ceph_argparse_witharg(args, i, &val, "--min-rewrite-size", (char*)NULL)) {
-      min_rewrite_size = (uint64_t)atoll(val.c_str());
-    } else if (ceph_argparse_witharg(args, i, &val, "--max-rewrite-size", (char*)NULL)) {
-      max_rewrite_size = (uint64_t)atoll(val.c_str());
-    } else if (ceph_argparse_witharg(args, i, &val, "--min-rewrite-stripe-size", (char*)NULL)) {
-      min_rewrite_stripe_size = (uint64_t)atoll(val.c_str());
     } else if (ceph_argparse_witharg(args, i, &val, "--max-buckets", (char*)NULL)) {
       max_buckets = atoi(val.c_str());
     } else if (ceph_argparse_witharg(args, i, &val, "--max-entries", (char*)NULL)) {
@@ -1600,11 +1525,9 @@ int main(int argc, char **argv)
   }
 
   if (opt_cmd == OPT_BUCKET_LINK) {
-    bucket_op.set_bucket_id(bucket_id);
-    string err;
-    int r = RGWBucketAdminOp::link(store, bucket_op, &err);
+    int r = RGWBucketAdminOp::link(store, bucket_op);
     if (r < 0) {
-      cerr << "failure: " << cpp_strerror(-r) << ": " << err << std::endl;
+      cerr << "failure: " << cpp_strerror(-r) << std::endl;
       return -r;
     }
   }
@@ -1684,7 +1607,7 @@ int main(int argc, char **argv)
       oid += "-";
       oid += bucket_id;
       oid += "-";
-      oid += bucket_name;
+      oid += string(bucket.name);
     }
 
     if (opt_cmd == OPT_LOG_SHOW) {
@@ -1890,141 +1813,6 @@ next:
     }
   }
 
-  if (opt_cmd == OPT_OBJECT_REWRITE) {
-    if (bucket_name.empty()) {
-      cerr << "ERROR: bucket not specified" << std::endl;
-      return EINVAL;
-    }
-    if (object.empty()) {
-      cerr << "ERROR: object not specified" << std::endl;
-      return EINVAL;
-    }
-
-    RGWBucketInfo bucket_info;
-    int ret = init_bucket(bucket_name, bucket_info, bucket);
-    if (ret < 0) {
-      cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
-      return -ret;
-    }
-
-    rgw_obj obj(bucket, object);
-    bool need_rewrite = true;
-    if (min_rewrite_stripe_size > 0) {
-      ret = check_min_obj_stripe_size(store, obj, min_rewrite_stripe_size, &need_rewrite);
-      if (ret < 0) {
-        ldout(store->ctx(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << ret << dendl;
-      }
-    }
-    if (need_rewrite) {
-      ret = store->rewrite_obj(bucket_info.owner, obj);
-      if (ret < 0) {
-        cerr << "ERROR: object rewrite returned: " << cpp_strerror(-ret) << std::endl;
-        return -ret;
-      }
-    } else {
-      ldout(store->ctx(), 20) << "skipped object" << dendl;
-    }
-  }
-
-  if (opt_cmd == OPT_BUCKET_REWRITE) {
-    if (bucket_name.empty()) {
-      cerr << "ERROR: bucket not specified" << std::endl;
-      return EINVAL;
-    }
-
-    RGWBucketInfo bucket_info;
-    int ret = init_bucket(bucket_name, bucket_info, bucket);
-    if (ret < 0) {
-      cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
-      return -ret;
-    }
-
-    uint64_t start_epoch = 0;
-    uint64_t end_epoch = 0;
-
-    if (!end_date.empty()) {
-      int ret = utime_t::parse_date(end_date, &end_epoch, NULL);
-      if (ret < 0) {
-        cerr << "ERROR: failed to parse end date" << std::endl;
-        return EINVAL;
-      }
-    }
-    if (!start_date.empty()) {
-      int ret = utime_t::parse_date(start_date, &start_epoch, NULL);
-      if (ret < 0) {
-        cerr << "ERROR: failed to parse start date" << std::endl;
-        return EINVAL;
-      }
-    }
-
-    bool is_truncated = true;
-
-    string marker;
-    string prefix;
-
-    formatter->open_object_section("result");
-    formatter->dump_string("bucket", bucket_name);
-    formatter->open_array_section("objects");
-    while (is_truncated) {
-      map<string, RGWObjEnt> result;
-      int r = store->cls_bucket_list(bucket, marker, prefix, 1000, 
-                                     result, &is_truncated, &marker,
-                                     bucket_object_check_filter);
-
-      if (r < 0 && r != -ENOENT) {
-        cerr << "ERROR: failed operation r=" << r << std::endl;
-      }
-
-      if (r == -ENOENT)
-        break;
-
-      map<string, RGWObjEnt>::iterator iter;
-      for (iter = result.begin(); iter != result.end(); ++iter) {
-        string name = iter->first;
-        RGWObjEnt& entry = iter->second;
-
-        formatter->open_object_section("object");
-        formatter->dump_string("name", name);
-        formatter->dump_int("size", entry.size);
-        utime_t ut(entry.mtime, 0);
-        ut.gmtime(formatter->dump_stream("mtime"));
-
-        if ((entry.size < min_rewrite_size) ||
-            (entry.size > max_rewrite_size) ||
-            (start_epoch > 0 && start_epoch > (uint64_t)ut.sec()) ||
-            (end_epoch > 0 && end_epoch < (uint64_t)ut.sec())) {
-          formatter->dump_string("status", "Skipped");
-        } else {
-          rgw_obj obj(bucket, name);
-
-          bool need_rewrite = true;
-          if (min_rewrite_stripe_size > 0) {
-            r = check_min_obj_stripe_size(store, obj, min_rewrite_stripe_size, &need_rewrite);
-            if (r < 0) {
-              ldout(store->ctx(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << r << dendl;
-            }
-          }
-          if (!need_rewrite) {
-            formatter->dump_string("status", "Skipped");
-          } else {
-            r = store->rewrite_obj(bucket_info.owner, obj);
-            if (r == 0) {
-              formatter->dump_string("status", "Success");
-            } else {
-              formatter->dump_string("status", cpp_strerror(-r));
-            }
-          }
-        }
-
-        formatter->close_section();
-        formatter->flush(cout);
-      }
-    }
-    formatter->close_section();
-    formatter->close_section();
-    formatter->flush(cout);
-  }
-
   if (opt_cmd == OPT_OBJECT_UNLINK) {
     RGWBucketInfo bucket_info;
     int ret = init_bucket(bucket_name, bucket_info, bucket);
diff --git a/src/rgw/rgw_auth_s3.cc b/src/rgw/rgw_auth_s3.cc
index b9151d2..b8246b7 100644
--- a/src/rgw/rgw_auth_s3.cc
+++ b/src/rgw/rgw_auth_s3.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include "common/armor.h"
 #include "rgw_common.h"
diff --git a/src/rgw/rgw_auth_s3.h b/src/rgw/rgw_auth_s3.h
index 3a7da09..33aa284 100644
--- a/src/rgw/rgw_auth_s3.h
+++ b/src/rgw/rgw_auth_s3.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_AUTH_S3_H
 #define CEPH_RGW_AUTH_S3_H
 
diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc
index 4afe1ae..3c4f66c 100644
--- a/src/rgw/rgw_bucket.cc
+++ b/src/rgw/rgw_bucket.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 
 #include <string>
@@ -77,10 +74,9 @@ int rgw_read_user_buckets(RGWRados *store, string user_id, RGWUserBuckets& bucke
 
   if (need_stats) {
     map<string, RGWBucketEnt>& m = buckets.get_buckets();
-    ret = store->update_containers_stats(m);
-    if (ret < 0 && ret != -ENOENT) {
+    int r = store->update_containers_stats(m);
+    if (r < 0) {
       ldout(store->ctx(), 0) << "ERROR: could not get stats for buckets" << dendl;
-      return ret;
     }
   }
   return 0;
@@ -465,12 +461,6 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, std::string *err_msg)
     return -EINVAL;
   }
 
-  string bucket_id = op_state.get_bucket_id();
-  if (bucket_id.empty()) {
-    set_err_msg(err_msg, "empty bucket instance id");
-    return -EINVAL;
-  }
-
   std::string no_oid;
 
   std::string display_name = op_state.get_user_display_name();
@@ -482,8 +472,7 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, std::string *err_msg)
   map<string, bufferlist> attrs;
   RGWBucketInfo bucket_info;
 
-  string key = bucket.name + ":" + bucket_id;
-  int r = store->get_bucket_instance_info(NULL, key, bucket_info, NULL, &attrs);
+  int r = store->get_bucket_info(NULL, bucket.name, bucket_info, NULL, &attrs);
   if (r < 0) {
     return r;
   }
@@ -868,7 +857,7 @@ int RGWBucketAdminOp::unlink(RGWRados *store, RGWBucketAdminOpState& op_state)
   return bucket.unlink(op_state);
 }
 
-int RGWBucketAdminOp::link(RGWRados *store, RGWBucketAdminOpState& op_state, string *err)
+int RGWBucketAdminOp::link(RGWRados *store, RGWBucketAdminOpState& op_state)
 {
   RGWBucket bucket;
 
@@ -876,7 +865,7 @@ int RGWBucketAdminOp::link(RGWRados *store, RGWBucketAdminOpState& op_state, str
   if (ret < 0)
     return ret;
 
-  return bucket.link(op_state, err);
+  return bucket.link(op_state);
 
 }
 
diff --git a/src/rgw/rgw_bucket.h b/src/rgw/rgw_bucket.h
index 3bdd68c..f113590 100644
--- a/src/rgw/rgw_bucket.h
+++ b/src/rgw/rgw_bucket.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_BUCKET_H
 #define CEPH_RGW_BUCKET_H
 
@@ -150,29 +147,24 @@ struct RGWBucketAdminOpState {
     object_name = object_str;
   }
 
-  std::string& get_user_id() { return uid; }
-  std::string& get_user_display_name() { return display_name; }
-  std::string& get_bucket_name() { return bucket_name; }
-  std::string& get_object_name() { return object_name; }
+  std::string& get_user_id() { return uid; };
+  std::string& get_user_display_name() { return display_name; };
+  std::string& get_bucket_name() { return bucket_name; };
+  std::string& get_object_name() { return object_name; };
 
-  rgw_bucket& get_bucket() { return bucket; }
+  rgw_bucket& get_bucket() { return bucket; };
   void set_bucket(rgw_bucket& _bucket) {
     bucket = _bucket; 
     bucket_stored = true;
   }
 
-  void set_bucket_id(const string& bi) {
-    bucket_id = bi;
-  }
-  const string& get_bucket_id() { return bucket_id; }
-
-  bool will_fetch_stats() { return stat_buckets; }
-  bool will_fix_index() { return fix_index; }
-  bool will_delete_children() { return delete_child_objects; }
-  bool will_check_objects() { return check_objects; }
-  bool is_user_op() { return !uid.empty(); }
-  bool is_system_op() { return uid.empty(); }
-  bool has_bucket_stored() { return bucket_stored; }
+  bool will_fetch_stats() { return stat_buckets; };
+  bool will_fix_index() { return fix_index; };
+  bool will_delete_children() { return delete_child_objects; };
+  bool will_check_objects() { return check_objects; };
+  bool is_user_op() { return !uid.empty(); };
+  bool is_system_op() { return uid.empty(); }; 
+  bool has_bucket_stored() { return bucket_stored; };
 
   RGWBucketAdminOpState() : list_buckets(false), stat_buckets(false), check_objects(false), 
                             fix_index(false), delete_child_objects(false),
@@ -221,7 +213,7 @@ public:
   int policy_bl_to_stream(bufferlist& bl, ostream& o);
   int get_policy(RGWBucketAdminOpState& op_state, ostream& o);
 
-  void clear_failure() { failure = false; }
+  void clear_failure() { failure = false; };
 };
 
 class RGWBucketAdminOp
@@ -234,7 +226,7 @@ public:
 
 
   static int unlink(RGWRados *store, RGWBucketAdminOpState& op_state);
-  static int link(RGWRados *store, RGWBucketAdminOpState& op_state, string *err_msg = NULL);
+  static int link(RGWRados *store, RGWBucketAdminOpState& op_state);
 
   static int check_index(RGWRados *store, RGWBucketAdminOpState& op_state,
                   RGWFormatterFlusher& flusher);
diff --git a/src/rgw/rgw_cache.cc b/src/rgw/rgw_cache.cc
index d1e8093..94b3d04 100644
--- a/src/rgw/rgw_cache.cc
+++ b/src/rgw/rgw_cache.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_cache.h"
 
 #include <errno.h>
@@ -9,7 +6,7 @@
 
 using namespace std;
 
-int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask, rgw_cache_entry_info *cache_info)
+int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask)
 {
   RWLock::RLocker l(lock);
 
@@ -20,25 +17,16 @@ int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask, rgw_cac
     return -ENOENT;
   }
 
-  ObjectCacheEntry *entry = &iter->second;
+  ObjectCacheEntry& entry = iter->second;
 
-  if (lru_counter - entry->lru_promotion_ts > lru_window) {
-    ldout(cct, 20) << "cache get: touching lru, lru_counter=" << lru_counter << " promotion_ts=" << entry->lru_promotion_ts << dendl;
+  if (lru_counter - entry.lru_promotion_ts > lru_window) {
+    ldout(cct, 20) << "cache get: touching lru, lru_counter=" << lru_counter << " promotion_ts=" << entry.lru_promotion_ts << dendl;
     lock.unlock();
     lock.get_write(); /* promote lock to writer */
 
-    /* need to redo this because entry might have dropped off the cache */
-    iter = cache_map.find(name);
-    if (iter == cache_map.end()) {
-      ldout(cct, 10) << "lost race! cache get: name=" << name << " : miss" << dendl;
-      if(perfcounter) perfcounter->inc(l_rgw_cache_miss);
-      return -ENOENT;
-    }
-
-    entry = &iter->second;
     /* check again, we might have lost a race here */
-    if (lru_counter - entry->lru_promotion_ts > lru_window) {
-      touch_lru(name, *entry, iter->second.lru_iter);
+    if (lru_counter - entry.lru_promotion_ts > lru_window) {
+      touch_lru(name, entry, iter->second.lru_iter);
     }
   }
 
@@ -51,59 +39,12 @@ int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask, rgw_cac
   ldout(cct, 10) << "cache get: name=" << name << " : hit" << dendl;
 
   info = src;
-  if (cache_info) {
-    cache_info->cache_locator = name;
-    cache_info->gen = entry->gen;
-  }
   if(perfcounter) perfcounter->inc(l_rgw_cache_hit);
 
   return 0;
 }
 
-bool ObjectCache::chain_cache_entry(list<rgw_cache_entry_info *>& cache_info_entries, RGWChainedCache::Entry *chained_entry)
-{
-  RWLock::WLocker l(lock);
-
-  list<rgw_cache_entry_info *>::iterator citer;
-
-  list<ObjectCacheEntry *> cache_entry_list;
-
-  /* first verify that all entries are still valid */
-  for (citer = cache_info_entries.begin(); citer != cache_info_entries.end(); ++citer) {
-    rgw_cache_entry_info *cache_info = *citer;
-
-    ldout(cct, 10) << "chain_cache_entry: cache_locator=" << cache_info->cache_locator << dendl;
-    map<string, ObjectCacheEntry>::iterator iter = cache_map.find(cache_info->cache_locator);
-    if (iter == cache_map.end()) {
-      ldout(cct, 20) << "chain_cache_entry: couldn't find cachce locator" << dendl;
-      return false;
-    }
-
-    ObjectCacheEntry *entry = &iter->second;
-
-    if (entry->gen != cache_info->gen) {
-      ldout(cct, 20) << "chain_cache_entry: entry.gen (" << entry->gen << ") != cache_info.gen (" << cache_info->gen << ")" << dendl;
-      return false;
-    }
-
-    cache_entry_list.push_back(entry);
-  }
-
-
-  chained_entry->cache->chain_cb(chained_entry->key, chained_entry->data);
-
-  list<ObjectCacheEntry *>::iterator liter;
-
-  for (liter = cache_entry_list.begin(); liter != cache_entry_list.end(); ++liter) {
-    ObjectCacheEntry *entry = *liter;
-
-    entry->chained_entries.push_back(make_pair<RGWChainedCache *, string>(chained_entry->cache, chained_entry->key));
-  }
-
-  return true;
-}
-
-void ObjectCache::put(string& name, ObjectCacheInfo& info, rgw_cache_entry_info *cache_info)
+void ObjectCache::put(string& name, ObjectCacheInfo& info)
 {
   RWLock::WLocker l(lock);
 
@@ -118,15 +59,6 @@ void ObjectCache::put(string& name, ObjectCacheInfo& info, rgw_cache_entry_info
   ObjectCacheEntry& entry = iter->second;
   ObjectCacheInfo& target = entry.info;
 
-  for (list<pair<RGWChainedCache *, string> >::iterator iiter = entry.chained_entries.begin();
-       iiter != entry.chained_entries.end(); ++iiter) {
-    RGWChainedCache *chained_cache = iiter->first;
-    chained_cache->invalidate(iiter->second);
-  }
-
-  entry.chained_entries.clear();
-  entry.gen++;
-
   touch_lru(name, entry, entry.lru_iter);
 
   target.status = info.status;
@@ -138,11 +70,6 @@ void ObjectCache::put(string& name, ObjectCacheInfo& info, rgw_cache_entry_info
     return;
   }
 
-  if (cache_info) {
-    cache_info->cache_locator = name;
-    cache_info->gen = entry.gen;
-  }
-
   target.flags |= info.flags;
 
   if (info.flags & CACHE_FLAG_META)
@@ -184,13 +111,6 @@ void ObjectCache::remove(string& name)
     return;
 
   ldout(cct, 10) << "removing " << name << " from cache" << dendl;
-  ObjectCacheEntry& entry = iter->second;
-
-  for (list<pair<RGWChainedCache *, string> >::iterator iiter = entry.chained_entries.begin();
-       iiter != entry.chained_entries.end(); ++iiter) {
-    RGWChainedCache *chained_cache = iiter->first;
-    chained_cache->invalidate(iiter->second);
-  }
 
   remove_lru(name, iter->second.lru_iter);
   cache_map.erase(iter);
diff --git a/src/rgw/rgw_cache.h b/src/rgw/rgw_cache.h
index c0a0e24..3b793f1 100644
--- a/src/rgw/rgw_cache.h
+++ b/src/rgw/rgw_cache.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGWCACHE_H
 #define CEPH_RGWCACHE_H
 
@@ -131,10 +128,8 @@ struct ObjectCacheEntry {
   ObjectCacheInfo info;
   std::list<string>::iterator lru_iter;
   uint64_t lru_promotion_ts;
-  uint64_t gen;
-  std::list<pair<RGWChainedCache *, string> > chained_entries;
 
-  ObjectCacheEntry() : lru_promotion_ts(0), gen(0) {}
+  ObjectCacheEntry() : lru_promotion_ts(0) {}
 };
 
 class ObjectCache {
@@ -150,14 +145,13 @@ class ObjectCache {
   void remove_lru(string& name, std::list<string>::iterator& lru_iter);
 public:
   ObjectCache() : lru_size(0), lru_counter(0), lru_window(0), lock("ObjectCache"), cct(NULL) { }
-  int get(std::string& name, ObjectCacheInfo& bl, uint32_t mask, rgw_cache_entry_info *cache_info);
-  void put(std::string& name, ObjectCacheInfo& bl, rgw_cache_entry_info *cache_info);
+  int get(std::string& name, ObjectCacheInfo& bl, uint32_t mask);
+  void put(std::string& name, ObjectCacheInfo& bl);
   void remove(std::string& name);
   void set_ctx(CephContext *_cct) {
     cct = _cct;
     lru_window = cct->_conf->rgw_cache_lru_size / 2;
   }
-  bool chain_cache_entry(list<rgw_cache_entry_info *>& cache_info_entries, RGWChainedCache::Entry *chained_entry);
 };
 
 template <class T>
@@ -219,17 +213,12 @@ public:
   int put_obj_data(void *ctx, rgw_obj& obj, const char *data,
               off_t ofs, size_t len, bool exclusive);
 
-  int get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **handle, rgw_obj& obj, bufferlist& bl, off_t ofs, off_t end,
-              rgw_cache_entry_info *cache_info);
+  int get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **handle, rgw_obj& obj, bufferlist& bl, off_t ofs, off_t end);
 
   int obj_stat(void *ctx, rgw_obj& obj, uint64_t *psize, time_t *pmtime, uint64_t *epoch, map<string, bufferlist> *attrs,
                bufferlist *first_chunk, RGWObjVersionTracker *objv_tracker);
 
   int delete_obj_impl(void *ctx, const string& bucket_owner, rgw_obj& obj, RGWObjVersionTracker *objv_tracker);
-
-  bool chain_cache_entry(list<rgw_cache_entry_info *>& cache_info_entries, RGWChainedCache::Entry *chained_entry) {
-    return cache.chain_cache_entry(cache_info_entries, chained_entry);
-  }
 };
 
 template <class T>
@@ -263,14 +252,13 @@ int RGWCache<T>::delete_obj_impl(void *ctx, const string& bucket_owner, rgw_obj&
 }
 
 template <class T>
-int RGWCache<T>::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **handle, rgw_obj& obj, bufferlist& obl, off_t ofs, off_t end,
-                         rgw_cache_entry_info *cache_info)
+int RGWCache<T>::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **handle, rgw_obj& obj, bufferlist& obl, off_t ofs, off_t end)
 {
   rgw_bucket bucket;
   string oid;
   normalize_bucket_and_obj(obj.bucket, obj.object, bucket, oid);
   if (bucket.name[0] != '.' || ofs != 0)
-    return T::get_obj(ctx, objv_tracker, handle, obj, obl, ofs, end, cache_info);
+    return T::get_obj(ctx, objv_tracker, handle, obj, obl, ofs, end);
 
   string name = normal_name(obj.bucket, oid);
 
@@ -280,7 +268,7 @@ int RGWCache<T>::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **h
   if (objv_tracker)
     flags |= CACHE_FLAG_OBJV;
   
-  if (cache.get(name, info, flags, cache_info) == 0) {
+  if (cache.get(name, info, flags) == 0) {
     if (info.status < 0)
       return info.status;
 
@@ -295,11 +283,11 @@ int RGWCache<T>::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **h
       objv_tracker->read_version = info.version;
     return bl.length();
   }
-  int r = T::get_obj(ctx, objv_tracker, handle, obj, obl, ofs, end, cache_info);
+  int r = T::get_obj(ctx, objv_tracker, handle, obj, obl, ofs, end);
   if (r < 0) {
     if (r == -ENOENT) { // only update ENOENT, we'd rather retry other errors
       info.status = r;
-      cache.put(name, info, cache_info);
+      cache.put(name, info);
     }
     return r;
   }
@@ -319,7 +307,7 @@ int RGWCache<T>::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **h
   if (objv_tracker) {
     info.version = objv_tracker->read_version;
   }
-  cache.put(name, info, cache_info);
+  cache.put(name, info);
   return r;
 }
 
@@ -345,7 +333,7 @@ int RGWCache<T>::set_attr(void *ctx, rgw_obj& obj, const char *attr_name, buffer
   if (cacheable) {
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
-      cache.put(name, info, NULL);
+      cache.put(name, info);
       int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
@@ -384,7 +372,7 @@ int RGWCache<T>::set_attrs(void *ctx, rgw_obj& obj,
   if (cacheable) {
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
-      cache.put(name, info, NULL);
+      cache.put(name, info);
       int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
@@ -428,7 +416,7 @@ int RGWCache<T>::put_obj_meta_impl(void *ctx, rgw_obj& obj, uint64_t size, time_
   if (cacheable) {
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
-      cache.put(name, info, NULL);
+      cache.put(name, info);
       int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
@@ -463,7 +451,7 @@ int RGWCache<T>::put_obj_data(void *ctx, rgw_obj& obj, const char *data,
   if (cacheable) {
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
-      cache.put(name, info, NULL);
+      cache.put(name, info);
       int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
@@ -496,7 +484,7 @@ int RGWCache<T>::obj_stat(void *ctx, rgw_obj& obj, uint64_t *psize, time_t *pmti
   uint32_t flags = CACHE_FLAG_META | CACHE_FLAG_XATTRS;
   if (objv_tracker)
     flags |= CACHE_FLAG_OBJV;
-  int r = cache.get(name, info, flags, NULL);
+  int r = cache.get(name, info, flags);
   if (r == 0) {
     if (info.status < 0)
       return info.status;
@@ -512,7 +500,7 @@ int RGWCache<T>::obj_stat(void *ctx, rgw_obj& obj, uint64_t *psize, time_t *pmti
   if (r < 0) {
     if (r == -ENOENT) {
       info.status = r;
-      cache.put(name, info, NULL);
+      cache.put(name, info);
     }
     return r;
   }
@@ -525,7 +513,7 @@ int RGWCache<T>::obj_stat(void *ctx, rgw_obj& obj, uint64_t *psize, time_t *pmti
     info.flags |= CACHE_FLAG_OBJV;
     info.version = objv_tracker->read_version;
   }
-  cache.put(name, info, NULL);
+  cache.put(name, info);
 done:
   if (psize)
     *psize = size;
@@ -576,7 +564,7 @@ int RGWCache<T>::watch_cb(int opcode, uint64_t ver, bufferlist& bl)
   
   switch (info.op) {
   case UPDATE_OBJ:
-    cache.put(name, info.obj_info, NULL);
+    cache.put(name, info.obj_info);
     break;
   case REMOVE_OBJ:
     cache.remove(name);
diff --git a/src/rgw/rgw_civetweb.cc b/src/rgw/rgw_civetweb.cc
index c6094d4..a31177f 100644
--- a/src/rgw/rgw_civetweb.cc
+++ b/src/rgw/rgw_civetweb.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <string.h>
 
@@ -169,6 +167,6 @@ int RGWMongoose::send_content_length(uint64_t len)
 {
   has_content_length = true;
   char buf[21];
-  snprintf(buf, sizeof(buf), "%" PRIu64, len);
+  snprintf(buf, sizeof(buf), "%"PRIu64, len);
   return print("Content-Length: %s\n", buf);
 }
diff --git a/src/rgw/rgw_civetweb.h b/src/rgw/rgw_civetweb.h
index 9a7594f..c1df9f0 100644
--- a/src/rgw/rgw_civetweb.h
+++ b/src/rgw/rgw_civetweb.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_MONGOOSE_H
 #define CEPH_RGW_MONGOOSE_H
 
diff --git a/src/rgw/rgw_civetweb_log.cc b/src/rgw/rgw_civetweb_log.cc
index e2d8dd9..720bab5 100644
--- a/src/rgw/rgw_civetweb_log.cc
+++ b/src/rgw/rgw_civetweb_log.cc
@@ -7,12 +7,7 @@
 
 
 int rgw_civetweb_log_callback(const struct mg_connection *conn, const char *buf) {
-  dout(0) << "civetweb: " << (void *)conn << ": " << buf << dendl;
-  return 0;
-}
-
-int rgw_civetweb_log_access_callback(const struct mg_connection *conn, const char *buf) {
-  dout(1) << "civetweb: " << (void *)conn << ": " << buf << dendl;
+  dout(10) << "civetweb: " << (void *)conn << ": " << buf << dendl;
   return 0;
 }
 
diff --git a/src/rgw/rgw_civetweb_log.h b/src/rgw/rgw_civetweb_log.h
index 0fc227a..6c6b2c0 100644
--- a/src/rgw/rgw_civetweb_log.h
+++ b/src/rgw/rgw_civetweb_log.h
@@ -2,6 +2,5 @@
 #define CEPH_RGW_CIVETWEB_LOG_H
 
 int rgw_civetweb_log_callback(const struct mg_connection *conn, const char *buf);
-int rgw_civetweb_log_access_callback(const struct mg_connection *conn, const char *buf);
 
 #endif
diff --git a/src/rgw/rgw_client_io.cc b/src/rgw/rgw_client_io.cc
index 5e8edbf..193f44e 100644
--- a/src/rgw/rgw_client_io.cc
+++ b/src/rgw/rgw_client_io.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/rgw/rgw_client_io.h b/src/rgw/rgw_client_io.h
index dc90db3..2e8720e 100644
--- a/src/rgw/rgw_client_io.h
+++ b/src/rgw/rgw_client_io.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_CLIENT_IO_H
 #define CEPH_RGW_CLIENT_IO_H
 
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc
index 0a68a3b..5a1043f 100644
--- a/src/rgw/rgw_common.cc
+++ b/src/rgw/rgw_common.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 
 #include "json_spirit/json_spirit.h"
@@ -496,13 +493,13 @@ int NameVal::parse()
 
 int XMLArgs::parse()
 {
-  int pos = 0;
+  int pos = 0, fpos;
   bool end = false;
   bool admin_subresource_added = false; 
   if (str[pos] == '?') pos++;
 
   while (!end) {
-    int fpos = str.find('&', pos);
+    fpos = str.find('&', pos);
     if (fpos  < pos) {
        end = true;
        fpos = str.size(); 
diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h
index 1170650..4d7a118 100644
--- a/src/rgw/rgw_common.h
+++ b/src/rgw/rgw_common.h
@@ -354,7 +354,7 @@ struct RGWAccessKey {
   void decode_json(JSONObj *obj);
   void decode_json(JSONObj *obj, bool swift);
 };
-WRITE_CLASS_ENCODER(RGWAccessKey)
+WRITE_CLASS_ENCODER(RGWAccessKey);
 
 struct RGWSubUser {
   string name;
@@ -380,7 +380,7 @@ struct RGWSubUser {
 
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWSubUser)
+WRITE_CLASS_ENCODER(RGWSubUser);
 
 class RGWUserCaps
 {
@@ -410,7 +410,7 @@ public:
 
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWUserCaps)
+WRITE_CLASS_ENCODER(RGWUserCaps);
 
 void encode_json(const char *name, const obj_version& v, Formatter *f);
 void encode_json(const char *name, const RGWUserCaps& val, Formatter *f);
@@ -863,7 +863,7 @@ struct req_state {
    string decoded_uri;
    string relative_uri;
    const char *length;
-   int64_t content_length;
+   uint64_t content_length;
    map<string, string> generic_attrs;
    struct rgw_err err;
    bool expect_cont;
@@ -1083,13 +1083,10 @@ public:
   }
 
   void set_obj(const string& o) {
-    object.reserve(128);
-
     orig_obj = o;
     if (ns.empty()) {
-      if (o.empty()) {
+      if (o.empty())
         return;
-      }
       if (o.size() < 1 || o[0] != '_') {
         object = o;
         return;
@@ -1229,13 +1226,6 @@ public:
 };
 WRITE_CLASS_ENCODER(rgw_obj)
 
-struct rgw_cache_entry_info {
-  string cache_locator;
-  uint64_t gen;
-
-  rgw_cache_entry_info() : gen(0) {}
-};
-
 inline ostream& operator<<(ostream& out, const rgw_obj &o) {
   return out << o.bucket.name << ":" << o.object;
 }
diff --git a/src/rgw/rgw_cors_s3.cc b/src/rgw/rgw_cors_s3.cc
index 03a4523..01150a9 100644
--- a/src/rgw/rgw_cors_s3.cc
+++ b/src/rgw/rgw_cors_s3.cc
@@ -31,7 +31,7 @@ void RGWCORSRule_S3::to_xml(XMLFormatter& f) {
   f.open_object_section("CORSRule");
   /*ID if present*/
   if (id.length() > 0) {
-    f.dump_string("ID", id);
+    f.dump_string("ID", id);;
   }
   /*AllowedMethods*/
   if (allowed_methods & RGW_CORS_GET)
diff --git a/src/rgw/rgw_dencoder.cc b/src/rgw/rgw_dencoder.cc
index 9f923bc..e6dc2ba 100644
--- a/src/rgw/rgw_dencoder.cc
+++ b/src/rgw/rgw_dencoder.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include "rgw_common.h"
 #include "rgw_rados.h"
diff --git a/src/rgw/rgw_env.cc b/src/rgw/rgw_env.cc
index ffa479b..faa8d8f 100644
--- a/src/rgw/rgw_env.cc
+++ b/src/rgw/rgw_env.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_common.h"
 #include "rgw_log.h"
 
diff --git a/src/rgw/rgw_fcgi.cc b/src/rgw/rgw_fcgi.cc
index 1fb640f..4b24dab 100644
--- a/src/rgw/rgw_fcgi.cc
+++ b/src/rgw/rgw_fcgi.cc
@@ -1,5 +1,4 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
+
 
 #include "rgw_fcgi.h"
 
@@ -48,7 +47,7 @@ int RGWFCGX::send_100_continue()
 int RGWFCGX::send_content_length(uint64_t len)
 {
   char buf[21];
-  snprintf(buf, sizeof(buf), "%" PRIu64, len);
+  snprintf(buf, sizeof(buf), "%"PRIu64, len);
   return print("Content-Length: %s\n", buf);
 }
 
diff --git a/src/rgw/rgw_fcgi.h b/src/rgw/rgw_fcgi.h
index 8fc96fc..fabc77a 100644
--- a/src/rgw/rgw_fcgi.h
+++ b/src/rgw/rgw_fcgi.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_FCGI_H
 #define CEPH_RGW_FCGI_H
 
diff --git a/src/rgw/rgw_formats.cc b/src/rgw/rgw_formats.cc
index 2ea0e3e..56fc7e7 100644
--- a/src/rgw/rgw_formats.cc
+++ b/src/rgw/rgw_formats.cc
@@ -97,12 +97,12 @@ void RGWFormatter_Plain::close_section()
 
 void RGWFormatter_Plain::dump_unsigned(const char *name, uint64_t u)
 {
-  dump_value_int(name, "%" PRIu64, u);
+  dump_value_int(name, "%"PRIu64, u);
 }
 
 void RGWFormatter_Plain::dump_int(const char *name, int64_t u)
 {
-  dump_value_int(name, "%" PRId64, u);
+  dump_value_int(name, "%"PRId64, u);
 }
 
 void RGWFormatter_Plain::dump_float(const char *name, double d)
@@ -121,9 +121,10 @@ std::ostream& RGWFormatter_Plain::dump_stream(const char *name)
   assert(0);
 }
 
-void RGWFormatter_Plain::dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap)
+void RGWFormatter_Plain::dump_format(const char *name, const char *fmt, ...)
 {
   char buf[LARGE_SIZE];
+  va_list ap;
   const char *format;
 
   struct plain_stack_entry& entry = stack.back();
@@ -138,7 +139,9 @@ void RGWFormatter_Plain::dump_format_va(const char *name, const char *ns, bool q
   if (!should_print)
     return;
 
+  va_start(ap, fmt);
   vsnprintf(buf, LARGE_SIZE, fmt, ap);
+  va_end(ap);
   if (len)
     format = "\n%s";
   else
diff --git a/src/rgw/rgw_formats.h b/src/rgw/rgw_formats.h
index 0d83688..3653ef4 100644
--- a/src/rgw/rgw_formats.h
+++ b/src/rgw/rgw_formats.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_FORMATS_H
 #define CEPH_RGW_FORMATS_H
 
@@ -38,7 +35,10 @@ public:
   virtual void dump_float(const char *name, double d);
   virtual void dump_string(const char *name, std::string s);
   virtual std::ostream& dump_stream(const char *name);
-  virtual void dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap);
+  virtual void dump_format(const char *name, const char *fmt, ...);
+  virtual void dump_format_unquoted(const char *name, const char *fmt, ...) {
+    assert(0 == "not implemented");
+  }
   virtual int get_len() const;
   virtual void write_raw_data(const char *data);
 
diff --git a/src/rgw/rgw_gc.cc b/src/rgw/rgw_gc.cc
index b12b634..dab07f3 100644
--- a/src/rgw/rgw_gc.cc
+++ b/src/rgw/rgw_gc.cc
@@ -1,5 +1,4 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
+
 
 #include "rgw_gc.h"
 #include "include/rados/librados.hpp"
@@ -155,7 +154,7 @@ int RGWGC::process(int index, int max_secs)
 
   string marker;
   bool truncated;
-  IoCtx *ctx = new IoCtx;
+  IoCtx *ctx = NULL;
   do {
     int max = 100;
     std::list<cls_rgw_gc_obj_info> entries;
@@ -168,6 +167,7 @@ int RGWGC::process(int index, int max_secs)
       goto done;
 
     string last_pool;
+    ctx = new IoCtx;
     std::list<cls_rgw_gc_obj_info>::iterator iter;
     for (iter = entries.begin(); iter != entries.end(); ++iter) {
       bool remove_tag;
diff --git a/src/rgw/rgw_gc.h b/src/rgw/rgw_gc.h
index 643a81c..afaead4 100644
--- a/src/rgw/rgw_gc.h
+++ b/src/rgw/rgw_gc.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_GC_H
 #define CEPH_RGW_GC_H
 
diff --git a/src/rgw/rgw_http_client.cc b/src/rgw/rgw_http_client.cc
index 3a382c0..3adc0ae 100644
--- a/src/rgw/rgw_http_client.cc
+++ b/src/rgw/rgw_http_client.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <curl/curl.h>
 #include <curl/easy.h>
 #include <curl/multi.h>
diff --git a/src/rgw/rgw_http_client.h b/src/rgw/rgw_http_client.h
index 9e0e314..3c00404 100644
--- a/src/rgw/rgw_http_client.h
+++ b/src/rgw/rgw_http_client.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_HTTP_CLIENT_H
 #define CEPH_RGW_HTTP_CLIENT_H
 
diff --git a/src/rgw/rgw_http_errors.h b/src/rgw/rgw_http_errors.h
index 9261df4..0ab19ad 100644
--- a/src/rgw/rgw_http_errors.h
+++ b/src/rgw/rgw_http_errors.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef RGW_HTTP_ERRORS_H_
 #define RGW_HTTP_ERRORS_H_
 
diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc
index 44db537..a198678 100644
--- a/src/rgw/rgw_json_enc.cc
+++ b/src/rgw/rgw_json_enc.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include "rgw_common.h"
 #include "rgw_rados.h"
diff --git a/src/rgw/rgw_jsonparser.cc b/src/rgw/rgw_jsonparser.cc
index b4b709c..ec1c4ce 100644
--- a/src/rgw/rgw_jsonparser.cc
+++ b/src/rgw/rgw_jsonparser.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 #include <string.h>
 
diff --git a/src/rgw/rgw_keystone.cc b/src/rgw/rgw_keystone.cc
index 7c5d206..7c74665 100644
--- a/src/rgw/rgw_keystone.cc
+++ b/src/rgw/rgw_keystone.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 #include <fnmatch.h>
 
diff --git a/src/rgw/rgw_keystone.h b/src/rgw/rgw_keystone.h
index a9600ac..05199ee 100644
--- a/src/rgw/rgw_keystone.h
+++ b/src/rgw/rgw_keystone.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_KEYSTONE_H
 #define CEPH_RGW_KEYSTONE_H
 
@@ -10,7 +7,7 @@ class KeystoneToken {
 public:
   class Metadata {
   public:
-    Metadata() : is_admin(false) { }
+    Metadata() : is_admin(false) { };
     bool is_admin;
     void decode_json(JSONObj *obj);
   };
@@ -34,10 +31,10 @@ public:
 
   class Token {
   public:
-    Token() : expires(0) { }
+    Token() : expires(0) { };
     class Tenant {
     public:
-      Tenant() : enabled(false) { }
+      Tenant() : enabled(false) { };
       string id;
       string name;
       string description;
diff --git a/src/rgw/rgw_loadgen.cc b/src/rgw/rgw_loadgen.cc
index 59b9462..01cf1a3 100644
--- a/src/rgw/rgw_loadgen.cc
+++ b/src/rgw/rgw_loadgen.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <string.h>
 
diff --git a/src/rgw/rgw_loadgen.h b/src/rgw/rgw_loadgen.h
index 5a65ff4..5459330 100644
--- a/src/rgw/rgw_loadgen.h
+++ b/src/rgw/rgw_loadgen.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_LOADGEN_H
 #define CEPH_RGW_LOADGEN_H
 
diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc
index c23a518..2673761 100644
--- a/src/rgw/rgw_log.cc
+++ b/src/rgw/rgw_log.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "common/Clock.h"
 #include "common/Timer.h"
 #include "common/utf8.h"
diff --git a/src/rgw/rgw_log.h b/src/rgw/rgw_log.h
index 4fd1957..37e387d 100644
--- a/src/rgw/rgw_log.h
+++ b/src/rgw/rgw_log.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_LOG_H
 #define CEPH_RGW_LOG_H
 
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc
index 2f2b755..5fa3279 100644
--- a/src/rgw/rgw_main.cc
+++ b/src/rgw/rgw_main.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -208,9 +205,6 @@ protected:
       perfcounter->inc(l_rgw_qactive, -1);
     }
     void _dump_queue() {
-      if (!g_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
-        return;
-      }
       deque<RGWRequest *>::iterator iter;
       if (process->m_req_queue.empty()) {
         dout(20) << "RGWWQ: empty" << dendl;
@@ -369,7 +363,7 @@ void RGWLoadGenProcess::run()
   int num_buckets;
   conf->get_val("num_buckets", 1, &num_buckets);
 
-  vector<string> buckets(num_buckets);
+  string buckets[num_buckets];
 
   atomic_t failed;
 
@@ -645,6 +639,10 @@ void RGWFCGXProcess::handle_request(RGWRequest *r)
 
   FCGX_Finish_r(fcgx);
 
+  if (store->ctx()->_conf->rgw_fcgi_explicit_free) {
+    FCGX_Free(fcgx, 1);
+  }
+
   delete req;
 }
 
@@ -682,7 +680,7 @@ void RGWLoadGenProcess::handle_request(RGWRequest *r)
 
 static int civetweb_callback(struct mg_connection *conn) {
   struct mg_request_info *req_info = mg_get_request_info(conn);
-  RGWProcessEnv *pe = static_cast<RGWProcessEnv *>(req_info->user_data);
+  RGWProcessEnv *pe = (RGWProcessEnv *)req_info->user_data;
   RGWRados *store = pe->store;
   RGWREST *rest = pe->rest;
   OpsLogSocket *olog = pe->olog;
@@ -730,15 +728,9 @@ int usage()
 {
   cerr << "usage: radosgw [options...]" << std::endl;
   cerr << "options:\n";
-  cerr << "  --rgw-region=<region>     region in which radosgw runs\n";
-  cerr << "  --rgw-zone=<zone>         zone in which radosgw runs\n";
-  cerr << "  --rgw-socket-path=<path>  specify a unix domain socket path\n";
-  cerr << "  -m monaddress[:port]      connect to specified monitor\n";
-  cerr << "  --keyring=<path>          path to radosgw keyring\n";
-  cerr << "  --logfile=<logfile>       file to log debug output\n";
-  cerr << "  --debug-rgw=<log-level>/<memory-level>  set radosgw debug level\n";
+  cerr << "   --rgw-region=<region>     region in which radosgw runs\n";
+  cerr << "   --rgw-zone=<zone>         zone in which radosgw runs\n";
   generic_server_usage();
-
   return 0;
 }
 
@@ -836,7 +828,7 @@ public:
   void *entry() {
     pprocess->run();
     return NULL;
-  }
+  };
 };
 
 class RGWProcessFrontend : public RGWFrontend {
@@ -944,7 +936,6 @@ public:
     memset((void *)&cb, 0, sizeof(cb));
     cb.begin_request = civetweb_callback;
     cb.log_message = rgw_civetweb_log_callback;
-    cb.log_access = rgw_civetweb_log_access_callback;
     ctx = mg_start(&cb, &env, (const char **)&options);
 
     if (!ctx) {
@@ -1101,7 +1092,10 @@ int main(int argc, const char **argv)
   register_async_signal_handler(SIGUSR1, handle_sigterm);
   sighandler_alrm = signal(SIGALRM, godown_alarm);
 
+  string frontend_frameworks = g_conf->rgw_frontends;
+
   list<string> frontends;
+
   get_str_list(g_conf->rgw_frontends, ",", frontends);
 
   multimap<string, RGWFrontendConfig *> fe_map;
@@ -1122,7 +1116,7 @@ int main(int argc, const char **argv)
     configs.push_back(config);
 
     string framework = config->get_framework();
-    fe_map.insert(pair<string, RGWFrontendConfig*>(framework, config));
+    fe_map.insert(make_pair<string, RGWFrontendConfig *>(framework, config));
   }
 
   list<RGWFrontend *> fes;
@@ -1136,6 +1130,8 @@ int main(int argc, const char **argv)
 
       fe = new RGWFCGXFrontend(fcgi_pe, config);
     } else if (framework == "civetweb" || framework == "mongoose") {
+      string err;
+
       int port;
       config->get_val("port", 80, &port);
 
diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc
index fb96b50..4307ce9 100644
--- a/src/rgw/rgw_metadata.cc
+++ b/src/rgw/rgw_metadata.cc
@@ -1,5 +1,4 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
+
 
 #include "common/ceph_json.h"
 #include "rgw_metadata.h"
@@ -70,9 +69,9 @@ struct RGWMetadataLogData {
     encode_json("read_version", read_version, f);
     encode_json("write_version", write_version, f);
     encode_json("status", LogStatusDump(status), f);
-  }
+  };
 };
-WRITE_CLASS_ENCODER(RGWMetadataLogData)
+WRITE_CLASS_ENCODER(RGWMetadataLogData);
 
 
 int RGWMetadataLog::add_entry(RGWRados *store, RGWMetadataHandler *handler, const string& section, const string& key, bufferlist& bl) {
diff --git a/src/rgw/rgw_metadata.h b/src/rgw/rgw_metadata.h
index 8063cf7..0145208 100644
--- a/src/rgw/rgw_metadata.h
+++ b/src/rgw/rgw_metadata.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_METADATA_H
 #define CEPH_RGW_METADATA_H
 
diff --git a/src/rgw/rgw_multi.cc b/src/rgw/rgw_multi.cc
index a1fba2d..74d18ba 100644
--- a/src/rgw/rgw_multi.cc
+++ b/src/rgw/rgw_multi.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <string.h>
 
 #include <iostream>
diff --git a/src/rgw/rgw_multi.h b/src/rgw/rgw_multi.h
index 5dc14cc..f24f71d 100644
--- a/src/rgw/rgw_multi.h
+++ b/src/rgw/rgw_multi.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_MULTI_H
 #define CEPH_RGW_MULTI_H
 
diff --git a/src/rgw/rgw_multi_del.cc b/src/rgw/rgw_multi_del.cc
index 711fc4b..502212f 100644
--- a/src/rgw/rgw_multi_del.cc
+++ b/src/rgw/rgw_multi_del.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <string.h>
 
 #include <iostream>
diff --git a/src/rgw/rgw_multi_del.h b/src/rgw/rgw_multi_del.h
index ffc5948..c590a1e 100644
--- a/src/rgw/rgw_multi_del.h
+++ b/src/rgw/rgw_multi_del.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef RGW_MULTI_DELETE_H_
 #define RGW_MULTI_DELETE_H_
 
@@ -16,7 +13,7 @@ public:
 
   std::vector<string> objects;
   bool quiet;
-  bool is_quiet() { return quiet; }
+  bool is_quiet() { return quiet; };
 };
 
 class RGWMultiDelQuiet : public XMLObj
diff --git a/src/rgw/rgw_multiparser.cc b/src/rgw/rgw_multiparser.cc
index 48a64b4..2f4d8d9 100644
--- a/src/rgw/rgw_multiparser.cc
+++ b/src/rgw/rgw_multiparser.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <string.h>
 
 #include <iostream>
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 7522fc5..457791f 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <errno.h>
 #include <stdlib.h>
@@ -659,7 +657,7 @@ int RGWGetObj::read_user_manifest_part(rgw_bucket& bucket, RGWObjEnt& ent, RGWAc
   perfcounter->inc(l_rgw_get_b, cur_end - cur_ofs);
   while (cur_ofs <= cur_end) {
     bufferlist bl;
-    ret = store->get_obj(obj_ctx, NULL, &handle, part, bl, cur_ofs, cur_end, NULL);
+    ret = store->get_obj(obj_ctx, NULL, &handle, part, bl, cur_ofs, cur_end);
     if (ret < 0)
       goto done_err;
 
@@ -758,7 +756,7 @@ static int iterate_user_manifest_parts(CephContext *cct, RGWRados *store, off_t
 static int get_obj_user_manifest_iterate_cb(rgw_bucket& bucket, RGWObjEnt& ent, RGWAccessControlPolicy *bucket_policy, off_t start_ofs, off_t end_ofs,
                                        void *param)
 {
-  RGWGetObj *op = static_cast<RGWGetObj *>(param);
+  RGWGetObj *op = (RGWGetObj *)param;
   return op->read_user_manifest_part(bucket, ent, bucket_policy, start_ofs, end_ofs);
 }
 
@@ -1118,14 +1116,6 @@ int RGWGetBucketLogging::verify_permission()
   return 0;
 }
 
-int RGWGetBucketLocation::verify_permission()
-{
-  if (s->user.user_id.compare(s->bucket_owner.get_id()) != 0)
-    return -EACCES;
-
-  return 0;
-}
-
 int RGWCreateBucket::verify_permission()
 {
   if (!rgw_user_is_authenticated(s->user))
@@ -1182,6 +1172,7 @@ void RGWCreateBucket::execute()
   bufferlist aclbl;
   bufferlist corsbl;
   bool existed;
+  int r;
   rgw_obj obj(store->zone.domain_root, s->bucket_name_str);
   obj_version objv, *pobjv = NULL;
 
@@ -1205,8 +1196,8 @@ void RGWCreateBucket::execute()
   s->bucket_owner.set_id(s->user.user_id);
   s->bucket_owner.set_name(s->user.display_name);
   if (s->bucket_exists) {
-    int r = get_policy_from_attr(s->cct, store, s->obj_ctx, s->bucket_info, s->bucket_attrs,
-                                 &old_policy, obj);
+    r = get_policy_from_attr(s->cct, store, s->obj_ctx, s->bucket_info, s->bucket_attrs,
+                             &old_policy, obj);
     if (r >= 0)  {
       if (old_policy.get_owner().get_id().compare(s->user.user_id) != 0) {
         ret = -EEXIST;
@@ -1536,7 +1527,7 @@ void RGWPutObj::pre_exec()
 static int put_obj_user_manifest_iterate_cb(rgw_bucket& bucket, RGWObjEnt& ent, RGWAccessControlPolicy *bucket_policy, off_t start_ofs, off_t end_ofs,
                                        void *param)
 {
-  RGWPutObj *op = static_cast<RGWPutObj *>(param);
+  RGWPutObj *op = (RGWPutObj *)param;
   return op->user_manifest_iterate_cb(bucket, ent, bucket_policy, start_ofs, end_ofs);
 }
 
@@ -1707,7 +1698,7 @@ void RGWPutObj::execute()
     ofs += len;
   } while (len > 0);
 
-  if (!chunked_upload && ofs != s->content_length) {
+  if (!chunked_upload && (uint64_t)ofs != s->content_length) {
     ret = -ERR_REQUEST_TIMEOUT;
     goto done;
   }
@@ -2556,6 +2547,7 @@ void RGWInitMultipart::execute()
 static int get_multipart_info(RGWRados *store, struct req_state *s, string& meta_oid,
                               RGWAccessControlPolicy *policy, map<string, bufferlist>& attrs)
 {
+  map<string, bufferlist> parts_map;
   map<string, bufferlist>::iterator iter;
   bufferlist header;
 
diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h
index 44994f3..b141ed5 100644
--- a/src/rgw/rgw_op.h
+++ b/src/rgw/rgw_op.h
@@ -243,19 +243,6 @@ public:
   virtual uint32_t op_mask() { return RGW_OP_TYPE_READ; }
 };
 
-class RGWGetBucketLocation : public RGWOp {
-public:
-  RGWGetBucketLocation() {}
-  ~RGWGetBucketLocation() {}
-  int verify_permission();
-  void execute() {}
-
-  virtual void send_response() = 0;
-  virtual const string name() { return "get_bucket_location"; }
-  virtual uint32_t op_mask() { return RGW_OP_TYPE_READ; }
-};
-
-
 class RGWStatBucket : public RGWOp {
 protected:
   int ret;
diff --git a/src/rgw/rgw_policy_s3.cc b/src/rgw/rgw_policy_s3.cc
index 3843511..fac05f1 100644
--- a/src/rgw/rgw_policy_s3.cc
+++ b/src/rgw/rgw_policy_s3.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <errno.h>
 
diff --git a/src/rgw/rgw_policy_s3.h b/src/rgw/rgw_policy_s3.h
index 9768055..84a2ee7 100644
--- a/src/rgw/rgw_policy_s3.h
+++ b/src/rgw/rgw_policy_s3.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_POLICY_H
 #define CEPH_RGW_POLICY_H
 
diff --git a/src/rgw/rgw_quota.cc b/src/rgw/rgw_quota.cc
index a48ce69..eab7e37 100644
--- a/src/rgw/rgw_quota.cc
+++ b/src/rgw/rgw_quota.cc
@@ -451,6 +451,9 @@ class RGWUserStatsCache : public RGWQuotaCache<string> {
     void *entry() {
       ldout(cct, 20) << "UserSyncThread: start" << dendl;
       do {
+
+        string key = "user";
+
         int ret = stats->sync_all_users();
         if (ret < 0) {
           ldout(cct, 0) << "ERROR: sync_all_users() returned ret=" << ret << dendl;
@@ -733,14 +736,14 @@ public:
   virtual void update_stats(const string& user, rgw_bucket& bucket, int obj_delta, uint64_t added_bytes, uint64_t removed_bytes) {
     bucket_stats_cache.adjust_stats(user, bucket, obj_delta, added_bytes, removed_bytes);
     user_stats_cache.adjust_stats(user, bucket, obj_delta, added_bytes, removed_bytes);
-  }
+  };
 };
 
 
 RGWQuotaHandler *RGWQuotaHandler::generate_handler(RGWRados *store, bool quota_threads)
 {
   return new RGWQuotaHandlerImpl(store, quota_threads);
-}
+};
 
 void RGWQuotaHandler::free_handler(RGWQuotaHandler *handler)
 {
diff --git a/src/rgw/rgw_quota.h b/src/rgw/rgw_quota.h
index c74cdce..abdb62e 100644
--- a/src/rgw/rgw_quota.h
+++ b/src/rgw/rgw_quota.h
@@ -55,7 +55,7 @@ struct RGWQuotaInfo {
 };
 WRITE_CLASS_ENCODER(RGWQuotaInfo)
 
-struct rgw_bucket;
+class rgw_bucket;
 
 class RGWQuotaHandler {
 public:
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 1d05509..62d44aa 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -672,6 +669,8 @@ int RGWObjManifest::generator::create_next(uint64_t ofs)
   if (ofs < last_ofs) /* only going forward */
     return -EINVAL;
 
+  string obj_name = manifest->prefix;
+
   uint64_t max_head_size = manifest->get_max_head_size();
 
   if (ofs <= max_head_size) {
@@ -691,6 +690,7 @@ int RGWObjManifest::generator::create_next(uint64_t ofs)
   last_ofs = ofs;
   manifest->set_obj_size(ofs);
 
+
   manifest->get_implicit_location(cur_part_id, cur_stripe, ofs, NULL, &cur_obj);
 
   manifest->update_iterators();
@@ -903,7 +903,7 @@ int RGWPutObjProcessor_Plain::prepare(RGWRados *store, void *obj_ctx, string *oi
   obj.init(bucket, obj_str);
 
   return 0;
-}
+};
 
 int RGWPutObjProcessor_Plain::handle_data(bufferlist& bl, off_t _ofs, MD5 *hash, void **phandle, bool *again)
 {
@@ -1143,7 +1143,7 @@ int RGWPutObjProcessor_Atomic::prepare_next_part(off_t ofs) {
   add_obj(cur_obj);
 
   return 0;
-}
+};
 
 int RGWPutObjProcessor_Atomic::complete_parts()
 {
@@ -1334,24 +1334,6 @@ int RGWRados::init_rados()
   return ret;
 }
 
-/**
- * Add new connection to connections map
- * @param region_conn_map map which new connection will be added to 
- * @param region region which new connection will connect to
- * @param new_connection pointer to new connection instance
- */
-static void add_new_connection_to_map(map<string, RGWRESTConn *> &region_conn_map, RGWRegion &region, RGWRESTConn *new_connection) 
-{
-  // Delete if connection is already exists
-  map<string, RGWRESTConn *>::iterator iterRegion = region_conn_map.find(region.name);
-  if (iterRegion != region_conn_map.end()) {
-    delete iterRegion->second;
-  }
-    
-  // Add new connection to connections map
-  region_conn_map[region.name] = new_connection;
-}
-
 /** 
  * Initialize the RADOS instance and prepare to do other ops
  * Returns 0 on success, -ERR# on failure.
@@ -1394,7 +1376,8 @@ int RGWRados::init_complete()
 
     for (iter = region_map.regions.begin(); iter != region_map.regions.end(); ++iter) {
       RGWRegion& region = iter->second;
-      add_new_connection_to_map(region_conn_map, region, new RGWRESTConn(cct, this, region.endpoints));
+
+      region_conn_map[region.name] = new RGWRESTConn(cct, this, region.endpoints);
     }
   }
 
@@ -3131,36 +3114,6 @@ public:
     }
 };
 
-int RGWRados::rewrite_obj(const string& bucket_owner, rgw_obj& obj)
-{
-  map<string, bufferlist> attrset;
-  off_t ofs = 0;
-  off_t end = -1;
-  void *handle = NULL;
-
-  time_t mtime;
-  uint64_t total_len;
-  uint64_t obj_size;
-  RGWRadosCtx rctx(this);
-  int ret = prepare_get_obj((void *)&rctx, obj, &ofs, &end, &attrset,
-                            NULL, NULL, &mtime, NULL, NULL, &total_len,
-                            &obj_size, NULL, &handle, NULL);
-  if (ret < 0)
-    return ret;
-
-  attrset.erase(RGW_ATTR_ID_TAG);
-
-  uint64_t max_chunk_size;
-
-  ret = get_max_chunk_size(obj.bucket, &max_chunk_size);
-  if (ret < 0) {
-    ldout(cct, 0) << "ERROR: failed to get max_chunk_size() for bucket " << obj.bucket << dendl;
-    return ret;
-  }
-
-  return copy_obj_data((void *)&rctx, bucket_owner, &handle, end, obj, obj, max_chunk_size, NULL, mtime, attrset, RGW_OBJ_CATEGORY_MAIN, NULL, NULL);
-}
-
 /**
  * Copy an object.
  * dest_obj: the object to copy into
@@ -3378,7 +3331,7 @@ set_err_state:
   }
 
   if (copy_data) { /* refcounting tail wouldn't work here, just copy the data */
-    return copy_obj_data(ctx, dest_bucket_info.owner, &handle, end, dest_obj, src_obj, max_chunk_size, mtime, 0, src_attrs, category, ptag, err);
+    return copy_obj_data(ctx, dest_bucket_info.owner, &handle, end, dest_obj, src_obj, max_chunk_size, mtime, src_attrs, category, ptag, err);
   }
 
   RGWObjManifest::obj_iterator miter = astate->manifest.obj_begin();
@@ -3439,7 +3392,7 @@ set_err_state:
   }
 
   if (copy_first) {
-    ret = get_obj(ctx, NULL, &handle, src_obj, first_chunk, 0, max_chunk_size, NULL);
+    ret = get_obj(ctx, NULL, &handle, src_obj, first_chunk, 0, max_chunk_size);
     if (ret < 0)
       goto done_ret;
 
@@ -3490,7 +3443,6 @@ int RGWRados::copy_obj_data(void *ctx,
                rgw_obj& src_obj,
                uint64_t max_chunk_size,
 	       time_t *mtime,
-	       time_t set_mtime,
                map<string, bufferlist>& attrs,
                RGWObjCategory category,
                string *ptag,
@@ -3513,7 +3465,7 @@ int RGWRados::copy_obj_data(void *ctx,
 
   do {
     bufferlist bl;
-    ret = get_obj(ctx, NULL, handle, src_obj, bl, ofs, end, NULL);
+    ret = get_obj(ctx, NULL, handle, src_obj, bl, ofs, end);
     if (ret < 0)
       return ret;
 
@@ -3542,7 +3494,10 @@ int RGWRados::copy_obj_data(void *ctx,
     etag = string(bl.c_str(), bl.length());
   }
 
-  ret = processor.complete(etag, mtime, set_mtime, attrs);
+  ret = processor.complete(etag, NULL, 0, attrs);
+
+  if (mtime)
+    obj_stat(ctx, dest_obj, NULL, mtime, NULL, NULL, NULL, NULL);
 
   return ret;
 }
@@ -4582,7 +4537,7 @@ int RGWRados::clone_objs(void *ctx, rgw_obj& dst_obj,
 
 
 int RGWRados::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **handle, rgw_obj& obj,
-                      bufferlist& bl, off_t ofs, off_t end, rgw_cache_entry_info *cache_info)
+                      bufferlist& bl, off_t ofs, off_t end)
 {
   rgw_bucket bucket;
   std::string oid, key;
@@ -5405,14 +5360,13 @@ int RGWRados::get_bucket_instance_info(void *ctx, rgw_bucket& bucket, RGWBucketI
 }
 
 int RGWRados::get_bucket_instance_from_oid(void *ctx, string& oid, RGWBucketInfo& info,
-                                           time_t *pmtime, map<string, bufferlist> *pattrs,
-                                           rgw_cache_entry_info *cache_info)
+                                           time_t *pmtime, map<string, bufferlist> *pattrs)
 {
   ldout(cct, 20) << "reading from " << zone.domain_root << ":" << oid << dendl;
 
   bufferlist epbl;
 
-  int ret = rgw_get_system_obj(this, ctx, zone.domain_root, oid, epbl, &info.objv_tracker, pmtime, pattrs, cache_info);
+  int ret = rgw_get_system_obj(this, ctx, zone.domain_root, oid, epbl, &info.objv_tracker, pmtime, pattrs);
   if (ret < 0) {
     return ret;
   }
@@ -5432,12 +5386,11 @@ int RGWRados::get_bucket_entrypoint_info(void *ctx, const string& bucket_name,
                                          RGWBucketEntryPoint& entry_point,
                                          RGWObjVersionTracker *objv_tracker,
                                          time_t *pmtime,
-                                         map<string, bufferlist> *pattrs,
-                                         rgw_cache_entry_info *cache_info)
+                                         map<string, bufferlist> *pattrs)
 {
   bufferlist bl;
 
-  int ret = rgw_get_system_obj(this, ctx, zone.domain_root, bucket_name, bl, objv_tracker, pmtime, pattrs, cache_info);
+  int ret = rgw_get_system_obj(this, ctx, zone.domain_root, bucket_name, bl, objv_tracker, pmtime, pattrs);
   if (ret < 0) {
     return ret;
   }
@@ -5487,34 +5440,15 @@ int RGWRados::convert_old_bucket_info(void *ctx, string& bucket_name)
   return 0;
 }
 
-struct bucket_info_entry {
-  RGWBucketInfo info;
-  time_t mtime;
-  map<string, bufferlist> attrs;
-};
-
-static RGWChainedCacheImpl<bucket_info_entry> binfo_cache;
-
 int RGWRados::get_bucket_info(void *ctx, const string& bucket_name, RGWBucketInfo& info,
                               time_t *pmtime, map<string, bufferlist> *pattrs)
 {
-  bucket_info_entry e;
-  if (binfo_cache.find(bucket_name, &e)) {
-    info = e.info;
-    if (pattrs)
-      *pattrs = e.attrs;
-    if (pmtime)
-      *pmtime = e.mtime;
-    return 0;
-  }
-
   bufferlist bl;
 
   RGWBucketEntryPoint entry_point;
   time_t ep_mtime;
   RGWObjVersionTracker ot;
-  rgw_cache_entry_info entry_cache_info;
-  int ret = get_bucket_entrypoint_info(ctx, bucket_name, entry_point, &ot, &ep_mtime, pattrs, &entry_cache_info);
+  int ret = get_bucket_entrypoint_info(ctx, bucket_name, entry_point, &ot, &ep_mtime, pattrs);
   if (ret < 0) {
     info.bucket.name = bucket_name; /* only init this field */
     return ret;
@@ -5545,31 +5479,12 @@ int RGWRados::get_bucket_info(void *ctx, const string& bucket_name, RGWBucketInf
   string oid;
   get_bucket_meta_oid(entry_point.bucket, oid);
 
-  rgw_cache_entry_info cache_info;
-
-  ret = get_bucket_instance_from_oid(ctx, oid, e.info, &e.mtime, &e.attrs, &cache_info);
-  e.info.ep_objv = ot.read_version;
-  info = e.info;
+  ret = get_bucket_instance_from_oid(ctx, oid, info, pmtime, pattrs);
+  info.ep_objv = ot.read_version;
   if (ret < 0) {
     info.bucket.name = bucket_name;
     return ret;
   }
-
-  if (pmtime)
-    *pmtime = e.mtime;
-  if (pattrs)
-    *pattrs = e.attrs;
-
-  list<rgw_cache_entry_info *> cache_info_entries;
-  cache_info_entries.push_back(&entry_cache_info);
-  cache_info_entries.push_back(&cache_info);
-
-
-  /* chain to both bucket entry point and bucket instance */
-  if (!binfo_cache.put(this, bucket_name, &e, cache_info_entries)) {
-    ldout(cct, 20) << "couldn't put binfo cache entry, might have raced with data changes" << dendl;
-  }
-
   return 0;
 }
 
diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
index 669cb2d..9aefe1e 100644
--- a/src/rgw/rgw_rados.h
+++ b/src/rgw/rgw_rados.h
@@ -1,13 +1,9 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGWRADOS_H
 #define CEPH_RGWRADOS_H
 
 #include "include/rados/librados.hpp"
 #include "include/Context.h"
 #include "common/RefCountedObj.h"
-#include "common/RWLock.h"
 #include "rgw_common.h"
 #include "cls/rgw/cls_rgw_types.h"
 #include "cls/version/cls_version_types.h"
@@ -120,7 +116,7 @@ struct RGWObjManifestPart {
   void dump(Formatter *f) const;
   static void generate_test_instances(list<RGWObjManifestPart*>& o);
 };
-WRITE_CLASS_ENCODER(RGWObjManifestPart)
+WRITE_CLASS_ENCODER(RGWObjManifestPart);
 
 /*
  The manifest defines a set of rules for structuring the object parts.
@@ -171,7 +167,7 @@ struct RGWObjManifestRule {
   }
   void dump(Formatter *f) const;
 };
-WRITE_CLASS_ENCODER(RGWObjManifestRule)
+WRITE_CLASS_ENCODER(RGWObjManifestRule);
 
 class RGWObjManifest {
 protected:
@@ -224,10 +220,6 @@ public:
     return *this;
   }
 
-  map<uint64_t, RGWObjManifestPart>& get_explicit_objs() {
-    return objs;
-  }
-
 
   void set_explicit(uint64_t _size, map<uint64_t, RGWObjManifestPart>& _objs) {
     explicit_objs = true;
@@ -408,15 +400,11 @@ public:
     }
     obj_iterator(RGWObjManifest *_m) : manifest(_m) {
       init();
-      if (!manifest->empty()) {
-        seek(0);
-      }
+      seek(0);
     }
     obj_iterator(RGWObjManifest *_m, uint64_t _ofs) : manifest(_m) {
       init();
-      if (!manifest->empty()) {
-        seek(_ofs);
-      }
+      seek(_ofs);
     }
     void seek(uint64_t ofs);
 
@@ -507,7 +495,7 @@ public:
     }
   };
 };
-WRITE_CLASS_ENCODER(RGWObjManifest)
+WRITE_CLASS_ENCODER(RGWObjManifest);
 
 struct RGWUploadPartInfo {
   uint32_t num;
@@ -564,7 +552,7 @@ public:
     store = _store;
     obj_ctx = _o;
     return 0;
-  }
+  };
   virtual int handle_data(bufferlist& bl, off_t ofs, MD5 *hash, void **phandle, bool *again) = 0;
   virtual int throttle_data(void *handle, bool need_to_wait) = 0;
   virtual void complete_hash(MD5 *hash) {
@@ -705,31 +693,6 @@ struct RGWObjState {
   RGWObjState() : is_atomic(false), has_attrs(0), exists(false),
                   size(0), mtime(0), epoch(0), fake_tag(false), has_manifest(false),
                   has_data(false), prefetch_data(false), keep_tail(false) {}
-  RGWObjState(const RGWObjState& rhs) {
-    is_atomic = rhs.is_atomic;
-    has_attrs = rhs.has_attrs;
-    exists = rhs.exists;
-    size = rhs.size;
-    mtime = rhs.mtime;
-    epoch = rhs.epoch;
-    if (rhs.obj_tag.length()) {
-      obj_tag = rhs.obj_tag;
-    }
-    write_tag = rhs.write_tag;
-    fake_tag = rhs.fake_tag;
-    if (rhs.has_manifest) {
-      manifest = rhs.manifest;
-    }
-    has_manifest = rhs.has_manifest;
-    shadow_obj = rhs.shadow_obj;
-    has_data = rhs.has_data;
-    if (rhs.data.length()) {
-      data = rhs.data;
-    }
-    prefetch_data = rhs.prefetch_data;
-    keep_tail = rhs.keep_tail;
-    objv_tracker = rhs.objv_tracker;
-  }
 
   bool get_attr(string name, bufferlist& dest) {
     map<string, bufferlist>::iterator iter = attrset.find(name);
@@ -825,7 +788,7 @@ struct RGWZonePlacementInfo {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWZonePlacementInfo)
+WRITE_CLASS_ENCODER(RGWZonePlacementInfo);
 
 struct RGWZoneParams {
   rgw_bucket domain_root;
@@ -896,7 +859,7 @@ struct RGWZoneParams {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWZoneParams)
+WRITE_CLASS_ENCODER(RGWZoneParams);
 
 struct RGWZone {
   string name;
@@ -928,7 +891,7 @@ struct RGWZone {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWZone)
+WRITE_CLASS_ENCODER(RGWZone);
 
 struct RGWDefaultRegionInfo {
   string default_region;
@@ -947,7 +910,7 @@ struct RGWDefaultRegionInfo {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWDefaultRegionInfo)
+WRITE_CLASS_ENCODER(RGWDefaultRegionInfo);
 
 struct RGWRegionPlacementTarget {
   string name;
@@ -984,7 +947,7 @@ struct RGWRegionPlacementTarget {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWRegionPlacementTarget)
+WRITE_CLASS_ENCODER(RGWRegionPlacementTarget);
 
 
 struct RGWRegion {
@@ -1043,7 +1006,7 @@ struct RGWRegion {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWRegion)
+WRITE_CLASS_ENCODER(RGWRegion);
 
 struct RGWRegionMap {
   Mutex lock;
@@ -1069,7 +1032,7 @@ struct RGWRegionMap {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 };
-WRITE_CLASS_ENCODER(RGWRegionMap)
+WRITE_CLASS_ENCODER(RGWRegionMap);
 
 class RGWDataChangesLog;
 class RGWReplicaLogger;
@@ -1221,21 +1184,6 @@ struct rgw_rados_ref {
   librados::IoCtx ioctx;
 };
 
-class RGWChainedCache {
-public:
-  virtual ~RGWChainedCache() {}
-  virtual void chain_cb(const string& key, void *data) = 0;
-  virtual void invalidate(const string& key) = 0;
-
-  struct Entry {
-    RGWChainedCache *cache;
-    const string& key;
-    void *data;
-
-    Entry(RGWChainedCache *_c, const string& _k, void *_d) : cache(_c), key(_k), data(_d) {}
-  };
-};
-
 
 class RGWRados
 {
@@ -1591,7 +1539,6 @@ public:
     return clone_objs(ctx, dst_obj, v, attrs, category, pmtime, truncate_dest, exclusive, xattr_cond);
   }
 
-  int rewrite_obj(const string& bucket_owner, rgw_obj& obj);
   /**
    * Copy an object.
    * dest_obj: the object to copy into
@@ -1630,12 +1577,10 @@ public:
                rgw_obj& src_obj,
                uint64_t max_chunk_size,
 	       time_t *mtime,
-	       time_t set_mtime,
                map<string, bufferlist>& attrs,
                RGWObjCategory category,
                string *ptag,
                struct rgw_err *err);
-
   /**
    * Delete a bucket.
    * bucket: the name of the bucket to delete
@@ -1717,12 +1662,10 @@ public:
             struct rgw_err *err);
 
   virtual int get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **handle, rgw_obj& obj,
-                      bufferlist& bl, off_t ofs, off_t end, rgw_cache_entry_info *cache_info);
+                      bufferlist& bl, off_t ofs, off_t end);
 
   virtual void finish_get_obj(void **handle);
 
-  virtual bool chain_cache_entry(list<rgw_cache_entry_info *>& cache_info_entries, RGWChainedCache::Entry *chained_entry) { return false; }
-
   int iterate_obj(void *ctx, rgw_obj& obj,
                   off_t ofs, off_t end,
                   uint64_t max_chunk_size,
@@ -1804,11 +1747,10 @@ public:
                                  map<string, bufferlist> *pattrs);
   int put_bucket_instance_info(RGWBucketInfo& info, bool exclusive, time_t mtime, map<string, bufferlist> *pattrs);
   int get_bucket_entrypoint_info(void *ctx, const string& bucket_name, RGWBucketEntryPoint& entry_point, RGWObjVersionTracker *objv_tracker, time_t *pmtime,
-                                 map<string, bufferlist> *pattrs, rgw_cache_entry_info *cache_info = NULL);
+                                 map<string, bufferlist> *pattrs);
   int get_bucket_instance_info(void *ctx, const string& meta_key, RGWBucketInfo& info, time_t *pmtime, map<string, bufferlist> *pattrs);
   int get_bucket_instance_info(void *ctx, rgw_bucket& bucket, RGWBucketInfo& info, time_t *pmtime, map<string, bufferlist> *pattrs);
-  int get_bucket_instance_from_oid(void *ctx, string& oid, RGWBucketInfo& info, time_t *pmtime, map<string, bufferlist> *pattrs,
-                                   rgw_cache_entry_info *cache_info = NULL);
+  int get_bucket_instance_from_oid(void *ctx, string& oid, RGWBucketInfo& info, time_t *pmtime, map<string, bufferlist> *pattrs);
 
   int convert_old_bucket_info(void *ctx, string& bucket_name);
   virtual int get_bucket_info(void *ctx, const string& bucket_name, RGWBucketInfo& info,
@@ -1991,44 +1933,6 @@ public:
 
 };
 
-template <class T>
-class RGWChainedCacheImpl : public RGWChainedCache {
-  RWLock lock;
-
-  map<string, T> entries;
-
-public:
-  RGWChainedCacheImpl() : lock("RGWChainedCacheImpl::lock") {}
-
-  bool find(const string& key, T *entry) {
-    RWLock::RLocker rl(lock);
-    typename map<string, T>::iterator iter = entries.find(key);
-    if (iter == entries.end()) {
-      return false;
-    }
-
-    *entry = iter->second;
-    return true;
-  }
-
-  bool put(RGWRados *store, const string& key, T *entry, list<rgw_cache_entry_info *>& cache_info_entries) {
-    Entry chain_entry(this, key, entry);
-
-    /* we need the store cache to call us under its lock to maintain lock ordering */
-    return store->chain_cache_entry(cache_info_entries, &chain_entry);
-  }
-
-  void chain_cb(const string& key, void *data) {
-    T *entry = static_cast<T *>(data);
-    RWLock::WLocker wl(lock);
-    entries[key] = *entry;
-  }
-
-  void invalidate(const string& key) {
-    RWLock::WLocker wl(lock);
-    entries.erase(key);
-  }
-};
 
 
 #endif
diff --git a/src/rgw/rgw_replica_log.cc b/src/rgw/rgw_replica_log.cc
index 961abc2..f80ebf8 100644
--- a/src/rgw/rgw_replica_log.cc
+++ b/src/rgw/rgw_replica_log.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 /*
  * Ceph - scalable distributed file system
  *
diff --git a/src/rgw/rgw_replica_log.h b/src/rgw/rgw_replica_log.h
index 456b230..f02fa42 100644
--- a/src/rgw/rgw_replica_log.h
+++ b/src/rgw/rgw_replica_log.h
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 /*
  * Ceph - scalable distributed file system
  *
diff --git a/src/rgw/rgw_resolve.cc b/src/rgw/rgw_resolve.cc
index a696589..471ac3f 100644
--- a/src/rgw/rgw_resolve.cc
+++ b/src/rgw/rgw_resolve.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <arpa/nameser.h>
@@ -170,7 +167,7 @@ RGWResolver::RGWResolver() {
 
 int RGWResolver::resolve_cname(const string& hostname, string& cname, bool *found) {
   return resolver->resolve_cname(hostname, cname, found);
-}
+};
 
 RGWResolver *rgw_resolver;
 
diff --git a/src/rgw/rgw_resolve.h b/src/rgw/rgw_resolve.h
index 7e127f8..3b29ba5 100644
--- a/src/rgw/rgw_resolve.h
+++ b/src/rgw/rgw_resolve.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_RESOLVE_H
 #define CEPH_RGW_RESOLVE_H
 
diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc
index 153628d..b74002d 100644
--- a/src/rgw/rgw_rest.cc
+++ b/src/rgw/rgw_rest.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 #include <limits.h>
 
@@ -1227,21 +1224,10 @@ int RGWREST::preprocess(struct req_state *s, RGWClientIO *cio)
   url_decode(s->info.request_uri, s->decoded_uri);
   s->length = info.env->get("CONTENT_LENGTH");
   if (s->length) {
-    if (*s->length == '\0') {
+    if (*s->length == '\0')
       s->content_length = 0;
-    } else {
-      string err;
-      s->content_length = strict_strtol(s->length, 10, &err);
-      if (!err.empty()) {
-        ldout(s->cct, 10) << "bad content length, aborting" << dendl;
-        return -EINVAL;
-      }
-    }
-  }
-
-  if (s->content_length < 0) {
-    ldout(s->cct, 10) << "negative content length, aborting" << dendl;
-    return -EINVAL;
+    else
+      s->content_length = atoll(s->length);
   }
 
   map<string, string>::iterator giter;
diff --git a/src/rgw/rgw_rest.h b/src/rgw/rgw_rest.h
index cc43c2e..38ffd8c 100644
--- a/src/rgw/rgw_rest.h
+++ b/src/rgw/rgw_rest.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_H
 #define CEPH_RGW_REST_H
 #define TIME_BUF_SIZE 128
diff --git a/src/rgw/rgw_rest_admin.h b/src/rgw/rgw_rest_admin.h
index 7f86b24..25470f9 100644
--- a/src/rgw/rgw_rest_admin.h
+++ b/src/rgw/rgw_rest_admin.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_ADMIN_H
 #define CEPH_RGW_REST_ADMIN_H
 
diff --git a/src/rgw/rgw_rest_bucket.cc b/src/rgw/rgw_rest_bucket.cc
index 772f286..e7068b4 100644
--- a/src/rgw/rgw_rest_bucket.cc
+++ b/src/rgw/rgw_rest_bucket.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_op.h"
 #include "rgw_bucket.h"
 #include "rgw_rest_bucket.h"
@@ -126,17 +123,14 @@ void RGWOp_Bucket_Link::execute()
 {
   std::string uid;
   std::string bucket;
-  std::string bucket_id;
 
   RGWBucketAdminOpState op_state;
 
   RESTArgs::get_string(s, "uid", uid, &uid);
   RESTArgs::get_string(s, "bucket", bucket, &bucket);
-  RESTArgs::get_string(s, "bucket-id", bucket_id, &bucket_id);
 
   op_state.set_user_id(uid);
   op_state.set_bucket_name(bucket);
-  op_state.set_bucket_id(bucket_id);
 
   http_ret = RGWBucketAdminOp::link(store, op_state);
 }
@@ -241,17 +235,17 @@ RGWOp *RGWHandler_Bucket::op_get()
     return new RGWOp_Check_Bucket_Index;
 
   return new RGWOp_Bucket_Info;
-}
+};
 
 RGWOp *RGWHandler_Bucket::op_put()
 {
   return new RGWOp_Bucket_Link;
-}
+};
 
 RGWOp *RGWHandler_Bucket::op_post()
 {
   return new RGWOp_Bucket_Unlink;
-}
+};
 
 RGWOp *RGWHandler_Bucket::op_delete()
 {
@@ -259,5 +253,5 @@ RGWOp *RGWHandler_Bucket::op_delete()
     return new RGWOp_Object_Remove;
 
   return new RGWOp_Bucket_Remove;
-}
+};
 
diff --git a/src/rgw/rgw_rest_bucket.h b/src/rgw/rgw_rest_bucket.h
index 542bec6..bb70643 100644
--- a/src/rgw/rgw_rest_bucket.h
+++ b/src/rgw/rgw_rest_bucket.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_BUCKET_H
 #define CEPH_RGW_REST_BUCKET_H
 
diff --git a/src/rgw/rgw_rest_client.cc b/src/rgw/rgw_rest_client.cc
index a24c1f0..256db77 100644
--- a/src/rgw/rgw_rest_client.cc
+++ b/src/rgw/rgw_rest_client.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_common.h"
 #include "rgw_rest_client.h"
 #include "rgw_auth_s3.h"
@@ -92,7 +89,7 @@ int RGWRESTSimpleRequest::execute(RGWAccessKey& key, const char *method, const c
 
   string date_str;
   get_new_date_str(cct, date_str);
-  headers.push_back(pair<string, string>("HTTP_DATE", date_str));
+  headers.push_back(make_pair<string, string>("HTTP_DATE", date_str));
 
   string canonical_header;
   map<string, string> meta_map;
@@ -111,7 +108,7 @@ int RGWRESTSimpleRequest::execute(RGWAccessKey& key, const char *method, const c
 
   ldout(cct, 15) << "generated auth header: " << auth_hdr << dendl;
 
-  headers.push_back(pair<string, string>("AUTHORIZATION", auth_hdr));
+  headers.push_back(make_pair<string, string>("AUTHORIZATION", auth_hdr));
   int r = process(method, new_url.c_str());
   if (r < 0)
     return r;
@@ -224,12 +221,12 @@ int RGWRESTSimpleRequest::forward_request(RGWAccessKey& key, req_info& info, siz
   map<string, string, ltstr_nocase>& m = new_env.get_map();
   map<string, string>::iterator iter;
   for (iter = m.begin(); iter != m.end(); ++iter) {
-    headers.push_back(pair<string, string>(iter->first, iter->second));
+    headers.push_back(make_pair<string, string>(iter->first, iter->second));
   }
 
   map<string, string>& meta_map = new_info.x_meta_map;
   for (iter = meta_map.begin(); iter != meta_map.end(); ++iter) {
-    headers.push_back(pair<string, string>(iter->first, iter->second));
+    headers.push_back(make_pair<string, string>(iter->first, iter->second));
   }
 
   string params_str;
@@ -449,7 +446,7 @@ int RGWRESTStreamWriteRequest::put_obj_init(RGWAccessKey& key, rgw_obj& obj, uin
 
   map<string, string>::iterator iter;
   for (iter = m.begin(); iter != m.end(); ++iter) {
-    headers.push_back(pair<string, string>(iter->first, iter->second));
+    headers.push_back(make_pair<string, string>(iter->first, iter->second));
   }
 
   cb = new RGWRESTStreamOutCB(this);
@@ -588,7 +585,7 @@ int RGWRESTStreamReadRequest::get_obj(RGWAccessKey& key, map<string, string>& ex
   map<string, string, ltstr_nocase>& m = new_env.get_map();
   map<string, string>::iterator iter;
   for (iter = m.begin(); iter != m.end(); ++iter) {
-    headers.push_back(pair<string, string>(iter->first, iter->second));
+    headers.push_back(make_pair<string, string>(iter->first, iter->second));
   }
 
   int r = process(new_info.method, new_url.c_str());
diff --git a/src/rgw/rgw_rest_client.h b/src/rgw/rgw_rest_client.h
index ccbb01c..a12c3dd 100644
--- a/src/rgw/rgw_rest_client.h
+++ b/src/rgw/rgw_rest_client.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_CLIENT_H
 #define CEPH_RGW_REST_CLIENT_H
 
diff --git a/src/rgw/rgw_rest_conn.cc b/src/rgw/rgw_rest_conn.cc
index cbffad0..32bf0ea 100644
--- a/src/rgw/rgw_rest_conn.cc
+++ b/src/rgw/rgw_rest_conn.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_rados.h"
 #include "rgw_rest_conn.h"
 
@@ -37,13 +34,13 @@ int RGWRESTConn::forward(const string& uid, req_info& info, obj_version *objv, s
   if (ret < 0)
     return ret;
   list<pair<string, string> > params;
-  params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "uid", uid));
-  params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "region", region));
+  params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "uid", uid));
+  params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "region", region));
   if (objv) {
-    params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "tag", objv->tag));
+    params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "tag", objv->tag));
     char buf[16];
     snprintf(buf, sizeof(buf), "%lld", (long long)objv->ver);
-    params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "ver", buf));
+    params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "ver", buf));
   }
   RGWRESTSimpleRequest req(cct, url, NULL, &params);
   return req.forward_request(key, info, max_response, inbl, outbl);
@@ -64,8 +61,8 @@ int RGWRESTConn::put_obj_init(const string& uid, rgw_obj& obj, uint64_t obj_size
     return ret;
 
   list<pair<string, string> > params;
-  params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "uid", uid));
-  params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "region", region));
+  params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "uid", uid));
+  params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "region", region));
   *req = new RGWRESTStreamWriteRequest(cct, url, NULL, &params);
   return (*req)->put_obj_init(key, obj, obj_size, attrs);
 }
@@ -87,10 +84,10 @@ int RGWRESTConn::get_obj(const string& uid, req_info *info /* optional */, rgw_o
     return ret;
 
   list<pair<string, string> > params;
-  params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "uid", uid));
-  params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "region", region));
+  params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "uid", uid));
+  params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "region", region));
   if (prepend_metadata) {
-    params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "prepend-metadata", region));
+    params.push_back(make_pair<string, string>(RGW_SYS_PARAM_PREFIX "prepend-metadata", region));
   }
   *req = new RGWRESTStreamReadRequest(cct, url, cb, NULL, &params);
   map<string, string> extra_headers;
diff --git a/src/rgw/rgw_rest_conn.h b/src/rgw/rgw_rest_conn.h
index 209ddcf..4a0b608 100644
--- a/src/rgw/rgw_rest_conn.h
+++ b/src/rgw/rgw_rest_conn.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_CONN_H
 #define CEPH_RGW_REST_CONN_H
 
diff --git a/src/rgw/rgw_rest_metadata.cc b/src/rgw/rgw_rest_metadata.cc
index 1068076..afd5c7b 100644
--- a/src/rgw/rgw_rest_metadata.cc
+++ b/src/rgw/rgw_rest_metadata.cc
@@ -142,7 +142,7 @@ int RGWOp_Metadata_Put::get_data(bufferlist& bl) {
         return r;
       }
       bl.append(data, read_len);
-    } while (read_len == chunk_size);
+    } while ((read_len == chunk_size));
   }
 
   free(data);
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
index b5a7a72..602a886 100644
--- a/src/rgw/rgw_rest_s3.cc
+++ b/src/rgw/rgw_rest_s3.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 #include <string.h>
 
@@ -302,23 +299,6 @@ void RGWGetBucketLogging_ObjStore_S3::send_response()
   rgw_flush_formatter_and_reset(s, s->formatter);
 }
 
-void RGWGetBucketLocation_ObjStore_S3::send_response()
-{
-  dump_errno(s);
-  end_header(s, this);
-  dump_start(s);
-
-  string location_constraint(s->bucket_info.region);
-  if (s->bucket_info.region == "default")
-    location_constraint.clear();
-
-  s->formatter->dump_format_ns("LocationConstraint",
-			       "http://doc.s3.amazonaws.com/doc/2006-03-01/",
-			       "%s",location_constraint.c_str());
-
-  rgw_flush_formatter_and_reset(s, s->formatter);
-}
-
 static void dump_bucket_metadata(struct req_state *s, RGWBucketEnt& bucket)
 {
   char buf[32];
@@ -1733,8 +1713,6 @@ RGWOp *RGWHandler_ObjStore_Bucket_S3::op_get()
 {
   if (s->info.args.sub_resource_exists("logging"))
     return new RGWGetBucketLogging_ObjStore_S3;
-  else if (s->info.args.sub_resource_exists("location"))
-    return new RGWGetBucketLocation_ObjStore_S3;
   if (is_acl_op()) {
     return new RGWGetACLs_ObjStore_S3;
   } else if (is_cors_op()) {
@@ -2120,7 +2098,7 @@ int RGW_Auth_S3::authorize(RGWRados *store, struct req_state *s)
     if (strncmp(s->http_auth, "AWS ", 4))
       return -EINVAL;
     string auth_str(s->http_auth + 4);
-    int pos = auth_str.rfind(':');
+    int pos = auth_str.find(':');
     if (pos < 0)
       return -EINVAL;
 
diff --git a/src/rgw/rgw_rest_s3.h b/src/rgw/rgw_rest_s3.h
index d983a6b..e62334b 100644
--- a/src/rgw/rgw_rest_s3.h
+++ b/src/rgw/rgw_rest_s3.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_S3_H
 #define CEPH_RGW_REST_S3_H
 #define TIME_BUF_SIZE 128
@@ -57,14 +54,6 @@ public:
   void send_response();
 };
 
-class RGWGetBucketLocation_ObjStore_S3 : public RGWGetBucketLocation {
-public:
-  RGWGetBucketLocation_ObjStore_S3() {}
-  ~RGWGetBucketLocation_ObjStore_S3() {}
-
-  void send_response();
-};
-
 class RGWStatBucket_ObjStore_S3 : public RGWStatBucket_ObjStore {
 public:
   RGWStatBucket_ObjStore_S3() {}
diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc
index e1cfedf..9bdb811 100644
--- a/src/rgw/rgw_rest_swift.cc
+++ b/src/rgw/rgw_rest_swift.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include "common/Formatter.h"
 #include "common/utf8.h"
diff --git a/src/rgw/rgw_rest_swift.h b/src/rgw/rgw_rest_swift.h
index 2374e15..27a31aa 100644
--- a/src/rgw/rgw_rest_swift.h
+++ b/src/rgw/rgw_rest_swift.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_SWIFT_H
 #define CEPH_RGW_REST_SWIFT_H
 #define TIME_BUF_SIZE 128
diff --git a/src/rgw/rgw_rest_usage.cc b/src/rgw/rgw_rest_usage.cc
index 8472297..1124d2b 100644
--- a/src/rgw/rgw_rest_usage.cc
+++ b/src/rgw/rgw_rest_usage.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_op.h"
 #include "rgw_usage.h"
 #include "rgw_rest_usage.h"
@@ -89,11 +86,11 @@ void RGWOp_Usage_Delete::execute() {
 RGWOp *RGWHandler_Usage::op_get()
 {
   return new RGWOp_Usage_Get;
-}
+};
 
 RGWOp *RGWHandler_Usage::op_delete()
 {
   return new RGWOp_Usage_Delete;
-}
+};
 
 
diff --git a/src/rgw/rgw_rest_usage.h b/src/rgw/rgw_rest_usage.h
index 1851ddf..a6eb3d5 100644
--- a/src/rgw/rgw_rest_usage.h
+++ b/src/rgw/rgw_rest_usage.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_USAGE_H
 #define CEPH_RGW_REST_USAGE_H
 
diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc
index c95ea46..30f46f0 100644
--- a/src/rgw/rgw_rest_user.cc
+++ b/src/rgw/rgw_rest_user.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "common/ceph_json.h"
 
 #include "rgw_op.h"
@@ -65,7 +62,6 @@ void RGWOp_User_Create::execute()
   bool gen_key;
   bool suspended;
   bool system;
-  bool exclusive;
 
   uint32_t max_buckets;
   int32_t key_type = KEY_TYPE_UNDEFINED;
@@ -83,7 +79,6 @@ void RGWOp_User_Create::execute()
   RESTArgs::get_bool(s, "suspended", false, &suspended);
   RESTArgs::get_uint32(s, "max-buckets", RGW_DEFAULT_MAX_BUCKETS, &max_buckets);
   RESTArgs::get_bool(s, "system", false, &system);
-  RESTArgs::get_bool(s, "exclusive", false, &exclusive);
 
   if (!s->user.system && system) {
     ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
@@ -128,9 +123,6 @@ void RGWOp_User_Create::execute()
   if (s->info.args.exists("system"))
     op_state.set_system(system);
 
-  if (s->info.args.exists("exclusive"))
-    op_state.set_exclusive(exclusive);
-
   if (gen_key)
     op_state.set_generate_key();
 
@@ -882,7 +874,7 @@ RGWOp *RGWHandler_User::op_get()
     return new RGWOp_Quota_Info;
 
   return new RGWOp_User_Info;
-}
+};
 
 RGWOp *RGWHandler_User::op_put()
 {
@@ -899,7 +891,7 @@ RGWOp *RGWHandler_User::op_put()
     return new RGWOp_Quota_Set;
 
   return new RGWOp_User_Create;
-}
+};
 
 RGWOp *RGWHandler_User::op_post()
 {
@@ -907,7 +899,7 @@ RGWOp *RGWHandler_User::op_post()
     return new RGWOp_Subuser_Modify;
 
   return new RGWOp_User_Modify;
-}
+};
 
 RGWOp *RGWHandler_User::op_delete()
 {
@@ -921,5 +913,5 @@ RGWOp *RGWHandler_User::op_delete()
     return new RGWOp_Caps_Remove;
 
   return new RGWOp_User_Remove;
-}
+};
 
diff --git a/src/rgw/rgw_rest_user.h b/src/rgw/rgw_rest_user.h
index 4fe22f7..1fe29d6 100644
--- a/src/rgw/rgw_rest_user.h
+++ b/src/rgw/rgw_rest_user.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_REST_USER_H
 #define CEPH_RGW_REST_USER_H
 
diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
index 74e023b..3c881a1 100644
--- a/src/rgw/rgw_string.h
+++ b/src/rgw/rgw_string.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_STRING_H
 #define CEPH_RGW_STRING_H
 
diff --git a/src/rgw/rgw_swift.cc b/src/rgw/rgw_swift.cc
index 743cbf1..2445e17 100644
--- a/src/rgw/rgw_swift.cc
+++ b/src/rgw/rgw_swift.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -508,6 +505,8 @@ int RGWSwift::validate_keystone_token(RGWRados *store, const string& token, stru
 
     validate.append_header("X-Auth-Token", admin_token);
 
+    validate.set_send_length(0);
+
     int ret = validate.process(url.c_str());
     if (ret < 0)
       return ret;
diff --git a/src/rgw/rgw_swift.h b/src/rgw/rgw_swift.h
index 6959bb0..97347e8 100644
--- a/src/rgw/rgw_swift.h
+++ b/src/rgw/rgw_swift.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 
 #ifndef CEPH_RGW_SWIFT_H
 #define CEPH_RGW_SWIFT_H
diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc
index ccbe3db..9c800c4 100644
--- a/src/rgw/rgw_swift_auth.cc
+++ b/src/rgw/rgw_swift_auth.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include "rgw_swift_auth.h"
 #include "rgw_rest.h"
 
diff --git a/src/rgw/rgw_swift_auth.h b/src/rgw/rgw_swift_auth.h
index 1202e78..6d50d94 100644
--- a/src/rgw/rgw_swift_auth.h
+++ b/src/rgw/rgw_swift_auth.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_SWIFT_AUTH_H
 #define CEPH_RGW_SWIFT_AUTH_H
 
diff --git a/src/rgw/rgw_tools.cc b/src/rgw/rgw_tools.cc
index 158bb79..49894ea 100644
--- a/src/rgw/rgw_tools.cc
+++ b/src/rgw/rgw_tools.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 
 #include "common/errno.h"
@@ -38,8 +35,7 @@ int rgw_put_system_obj(RGWRados *rgwstore, rgw_bucket& bucket, string& oid, cons
 }
 
 int rgw_get_system_obj(RGWRados *rgwstore, void *ctx, rgw_bucket& bucket, const string& key, bufferlist& bl,
-                       RGWObjVersionTracker *objv_tracker, time_t *pmtime, map<string, bufferlist> *pattrs,
-                       rgw_cache_entry_info *cache_info)
+                       RGWObjVersionTracker *objv_tracker, time_t *pmtime, map<string, bufferlist> *pattrs)
 {
   struct rgw_err err;
   void *handle = NULL;
@@ -54,7 +50,7 @@ int rgw_get_system_obj(RGWRados *rgwstore, void *ctx, rgw_bucket& bucket, const
     if (ret < 0)
       return ret;
 
-    ret = rgwstore->get_obj(ctx, objv_tracker, &handle, obj, bl, 0, request_len - 1, cache_info);
+    ret = rgwstore->get_obj(ctx, objv_tracker, &handle, obj, bl, 0, request_len - 1);
     rgwstore->finish_get_obj(&handle);
     if (ret < 0)
       return ret;
diff --git a/src/rgw/rgw_tools.h b/src/rgw/rgw_tools.h
index 8a7bf0c..9adaee4 100644
--- a/src/rgw/rgw_tools.h
+++ b/src/rgw/rgw_tools.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_TOOLS_H
 #define CEPH_RGW_TOOLS_H
 
@@ -17,8 +14,7 @@ struct obj_version;
 int rgw_put_system_obj(RGWRados *rgwstore, rgw_bucket& bucket, string& oid, const char *data, size_t size, bool exclusive,
                        RGWObjVersionTracker *objv_tracker, time_t set_mtime, map<string, bufferlist> *pattrs = NULL);
 int rgw_get_system_obj(RGWRados *rgwstore, void *ctx, rgw_bucket& bucket, const string& key, bufferlist& bl,
-                       RGWObjVersionTracker *objv_tracker, time_t *pmtime, map<string, bufferlist> *pattrs = NULL,
-                       rgw_cache_entry_info *cache_info = NULL);
+                       RGWObjVersionTracker *objv_tracker, time_t *pmtime, map<string, bufferlist> *pattrs = NULL);
 
 int rgw_tools_init(CephContext *cct);
 void rgw_tools_cleanup();
diff --git a/src/rgw/rgw_usage.cc b/src/rgw/rgw_usage.cc
index 486d96a..f501691 100644
--- a/src/rgw/rgw_usage.cc
+++ b/src/rgw/rgw_usage.cc
@@ -1,5 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 
 #include <string>
 #include <map>
diff --git a/src/rgw/rgw_usage.h b/src/rgw/rgw_usage.h
index 89dfdf7..76ae0f5 100644
--- a/src/rgw/rgw_usage.h
+++ b/src/rgw/rgw_usage.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_USAGE_H
 #define CEPH_RGW_USAGE_H
 
diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc
index ab8baf3..55d1d6a 100644
--- a/src/rgw/rgw_user.cc
+++ b/src/rgw/rgw_user.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <errno.h>
 
 #include <string>
@@ -9,7 +6,6 @@
 #include "common/errno.h"
 #include "common/Formatter.h"
 #include "common/ceph_json.h"
-#include "common/RWLock.h"
 #include "rgw_rados.h"
 #include "rgw_acl.h"
 
@@ -196,59 +192,25 @@ int rgw_store_user_info(RGWRados *store, RGWUserInfo& info, RGWUserInfo *old_inf
   return ret;
 }
 
-struct user_info_entry {
-  RGWUserInfo info;
-  RGWObjVersionTracker objv_tracker;
-  time_t mtime;
-};
-
-static RGWChainedCacheImpl<user_info_entry> uinfo_cache;
-
 int rgw_get_user_info_from_index(RGWRados *store, string& key, rgw_bucket& bucket, RGWUserInfo& info,
                                  RGWObjVersionTracker *objv_tracker, time_t *pmtime)
 {
-  user_info_entry e;
-  if (uinfo_cache.find(key, &e)) {
-    info = e.info;
-    if (objv_tracker)
-      *objv_tracker = e.objv_tracker;
-    if (pmtime)
-      *pmtime = e.mtime;
-    return 0;
-  }
-
   bufferlist bl;
   RGWUID uid;
 
-  int ret = rgw_get_system_obj(store, NULL, bucket, key, bl, NULL, &e.mtime);
+  int ret = rgw_get_system_obj(store, NULL, bucket, key, bl, NULL, pmtime);
   if (ret < 0)
     return ret;
 
-  rgw_cache_entry_info cache_info;
-
   bufferlist::iterator iter = bl.begin();
   try {
     ::decode(uid, iter);
-    int ret = rgw_get_user_info_by_uid(store, uid.user_id, e.info, &e.objv_tracker, NULL, &cache_info);
-    if (ret < 0) {
-      return ret;
-    }
+    return rgw_get_user_info_by_uid(store, uid.user_id, info, objv_tracker);
   } catch (buffer::error& err) {
     ldout(store->ctx(), 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
     return -EIO;
   }
 
-  list<rgw_cache_entry_info *> cache_info_entries;
-  cache_info_entries.push_back(&cache_info);
-
-  uinfo_cache.put(store, key, &e, cache_info_entries);
-
-  info = e.info;
-  if (objv_tracker)
-    *objv_tracker = e.objv_tracker;
-  if (pmtime)
-    *pmtime = e.mtime;
-
   return 0;
 }
 
@@ -257,13 +219,12 @@ int rgw_get_user_info_from_index(RGWRados *store, string& key, rgw_bucket& bucke
  * returns: 0 on success, -ERR# on failure (including nonexistence)
  */
 int rgw_get_user_info_by_uid(RGWRados *store, string& uid, RGWUserInfo& info,
-                             RGWObjVersionTracker *objv_tracker, time_t *pmtime,
-                             rgw_cache_entry_info *cache_info)
+                             RGWObjVersionTracker *objv_tracker, time_t *pmtime)
 {
   bufferlist bl;
   RGWUID user_id;
 
-  int ret = rgw_get_system_obj(store, NULL, store->zone.user_uid_pool, uid, bl, objv_tracker, pmtime, NULL, cache_info);
+  int ret = rgw_get_system_obj(store, NULL, store->zone.user_uid_pool, uid, bl, objv_tracker, pmtime);
   if (ret < 0)
     return ret;
 
@@ -767,6 +728,9 @@ int RGWAccessKeyPool::check_op(RGWUserAdminOpState& op_state,
     return -EACCES;
   }
 
+  std::string access_key = op_state.get_access_key();
+  std::string secret_key = op_state.get_secret_key();
+
   int32_t key_type = op_state.get_key_type();
 
   // if a key type wasn't specified set it to s3
@@ -775,9 +739,8 @@ int RGWAccessKeyPool::check_op(RGWUserAdminOpState& op_state,
 
   op_state.set_key_type(key_type);
 
-  /* see if the access key was specified */
-  if (key_type == KEY_TYPE_S3 && !op_state.will_gen_access() && 
-      op_state.get_access_key().empty()) {
+  /* see if the access key or secret key was specified */
+  if (key_type == KEY_TYPE_S3 && !op_state.will_gen_access() && access_key.empty()) {
     set_err_msg(err_msg, "empty access key");
     return -EINVAL;
   }
@@ -803,6 +766,7 @@ int RGWAccessKeyPool::generate_key(RGWUserAdminOpState& op_state, std::string *e
   int key_type = op_state.get_key_type();
   bool gen_access = op_state.will_gen_access();
   bool gen_secret = op_state.will_gen_secret();
+  std::string subuser = op_state.get_subuser();
 
   if (!keys_allowed) {
     set_err_msg(err_msg, "access keys not allowed for this user");
@@ -1724,8 +1688,7 @@ int RGWUser::execute_add(RGWUserAdminOpState& op_state, std::string *err_msg)
 
   // fail if the user exists already
   if (op_state.has_existing_user()) {
-    if (!op_state.exclusive &&
-        (user_email.empty() || old_info.user_email == user_email) &&
+    if ((user_email.empty() || old_info.user_email == user_email) &&
         old_info.display_name == display_name) {
       return execute_modify(op_state, err_msg);
     }
@@ -1951,8 +1914,11 @@ int RGWUser::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg)
 
   std::string old_email = old_info.user_email;
   if (!op_email.empty()) {
+    bool same_email = false;
+    same_email = (old_email.compare(op_email) == 0);
+
     // make sure we are not adding a duplicate email
-    if (old_email.compare(op_email) != 0) {
+    if (!same_email) {
       ret = rgw_get_user_info_by_email(store, op_email, duplicate_check);
       if (ret >= 0 && duplicate_check.user_id != user_id) {
         set_err_msg(err_msg, "cannot add duplicate email");
diff --git a/src/rgw/rgw_user.h b/src/rgw/rgw_user.h
index f13c241..af99ed5 100644
--- a/src/rgw/rgw_user.h
+++ b/src/rgw/rgw_user.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_USER_H
 #define CEPH_RGW_USER_H
 
@@ -62,8 +59,7 @@ extern int rgw_store_user_info(RGWRados *store, RGWUserInfo& info, RGWUserInfo *
  * returns: 0 on success, -ERR# on failure (including nonexistence)
  */
 extern int rgw_get_user_info_by_uid(RGWRados *store, string& user_id, RGWUserInfo& info,
-                                    RGWObjVersionTracker *objv_tracker = NULL, time_t *pmtime = NULL,
-                                    rgw_cache_entry_info *cache_info = NULL);
+                                    RGWObjVersionTracker *objv_tracker = NULL, time_t *pmtime = NULL);
 /**
  * Given an swift username, finds the user info associated with it.
  * returns: 0 on success, -ERR# on failure (including nonexistence)
@@ -133,7 +129,6 @@ struct RGWUserAdminOpState {
   uint32_t max_buckets;
   __u8 suspended;
   __u8 system;
-  __u8 exclusive;
   std::string caps;
   RGWObjVersionTracker objv;
   uint32_t op_mask;
@@ -270,9 +265,6 @@ struct RGWUserAdminOpState {
     system = is_system;
     system_specified = true;
   }
-  void set_exclusive(__u8 is_exclusive) {
-    exclusive = is_exclusive;
-  }
   void set_user_info(RGWUserInfo& user_info) {
     user_id = user_info.user_id;
     info = user_info;
@@ -315,59 +307,59 @@ struct RGWUserAdminOpState {
     user_quota_specified = true;
   }
 
-  bool is_populated() { return populated; }
-  bool is_initialized() { return initialized; }
-  bool has_existing_user() { return existing_user; }
-  bool has_existing_key() { return existing_key; }
-  bool has_existing_subuser() { return existing_subuser; }
-  bool has_existing_email() { return existing_email; }
-  bool has_subuser() { return subuser_specified; }
-  bool has_key_op() { return key_op; }
-  bool has_caps_op() { return caps_specified; }
-  bool has_suspension_op() { return suspension_op; }
-  bool has_subuser_perm() { return perm_specified; }
-  bool has_op_mask() { return op_mask_specified; }
-  bool will_gen_access() { return gen_access; }
-  bool will_gen_secret() { return gen_secret; }
-  bool will_gen_subuser() { return gen_subuser; }
-  bool will_purge_keys() { return purge_keys; }
-  bool will_purge_data() { return purge_data; }
-  bool will_generate_subuser() { return gen_subuser; }
+  bool is_populated() { return populated; };
+  bool is_initialized() { return initialized; };
+  bool has_existing_user() { return existing_user; };
+  bool has_existing_key() { return existing_key; };
+  bool has_existing_subuser() { return existing_subuser; };
+  bool has_existing_email() { return existing_email; };
+  bool has_subuser() { return subuser_specified; };
+  bool has_key_op() { return key_op; };
+  bool has_caps_op() { return caps_specified; };
+  bool has_suspension_op() { return suspension_op; };
+  bool has_subuser_perm() { return perm_specified; };
+  bool has_op_mask() { return op_mask_specified; };
+  bool will_gen_access() { return gen_access; };
+  bool will_gen_secret() { return gen_secret; };
+  bool will_gen_subuser() { return gen_subuser; };
+  bool will_purge_keys() { return purge_keys; };
+  bool will_purge_data() { return purge_data; };
+  bool will_generate_subuser() { return gen_subuser; };
   bool has_bucket_quota() { return bucket_quota_specified; }
   bool has_user_quota() { return user_quota_specified; }
-  void set_populated() { populated = true; }
-  void clear_populated() { populated = false; }
-  void set_initialized() { initialized = true; }
-  void set_existing_user(bool flag) { existing_user = flag; }
-  void set_existing_key(bool flag) { existing_key = flag; }
-  void set_existing_subuser(bool flag) { existing_subuser = flag; }
-  void set_existing_email(bool flag) { existing_email = flag; }
-  void set_purge_data(bool flag) { purge_data = flag; }
-  void set_generate_subuser(bool flag) { gen_subuser = flag; }
-  __u8 get_suspension_status() { return suspended; }
-  int32_t get_key_type() {return key_type; }
-  uint32_t get_subuser_perm() { return perm_mask; }
-  uint32_t get_max_buckets() { return max_buckets; }
-  uint32_t get_op_mask() { return op_mask; }
+  void set_populated() { populated = true; };
+  void clear_populated() { populated = false; };
+  void set_initialized() { initialized = true; };
+  void set_existing_user(bool flag) { existing_user = flag; };
+  void set_existing_key(bool flag) { existing_key = flag; };
+  void set_existing_subuser(bool flag) { existing_subuser = flag; };
+  void set_existing_email(bool flag) { existing_email = flag; };
+  void set_purge_data(bool flag) { purge_data = flag; };
+  void set_generate_subuser(bool flag) { gen_subuser = flag; };
+  __u8 get_suspension_status() { return suspended; };
+  int32_t get_key_type() {return key_type; };
+  uint32_t get_subuser_perm() { return perm_mask; };
+  uint32_t get_max_buckets() { return max_buckets; };
+  uint32_t get_op_mask() { return op_mask; };
   RGWQuotaInfo& get_bucket_quota() { return bucket_quota; }
   RGWQuotaInfo& get_user_quota() { return user_quota; }
 
-  std::string get_user_id() { return user_id; }
-  std::string get_subuser() { return subuser; }
-  std::string get_access_key() { return id; }
-  std::string get_secret_key() { return key; }
-  std::string get_caps() { return caps; }
-  std::string get_user_email() { return user_email; }
-  std::string get_display_name() { return display_name; }
-  map<int, std::string>& get_temp_url_keys() { return temp_url_keys; }
+  std::string get_user_id() { return user_id; };
+  std::string get_subuser() { return subuser; };
+  std::string get_access_key() { return id; };
+  std::string get_secret_key() { return key; };
+  std::string get_caps() { return caps; };
+  std::string get_user_email() { return user_email; };
+  std::string get_display_name() { return display_name; };
+  map<int, std::string>& get_temp_url_keys() { return temp_url_keys; };
 
-  RGWUserInfo&  get_user_info() { return info; }
+  RGWUserInfo&  get_user_info() { return info; };
 
-  map<std::string, RGWAccessKey> *get_swift_keys() { return &info.swift_keys; }
-  map<std::string, RGWAccessKey> *get_access_keys() { return &info.access_keys; }
-  map<std::string, RGWSubUser> *get_subusers() { return &info.subusers; }
+  map<std::string, RGWAccessKey> *get_swift_keys() { return &info.swift_keys; };
+  map<std::string, RGWAccessKey> *get_access_keys() { return &info.access_keys; };
+  map<std::string, RGWSubUser> *get_subusers() { return &info.subusers; };
 
-  RGWUserCaps *get_caps_obj() { return &info.caps; }
+  RGWUserCaps *get_caps_obj() { return &info.caps; };
 
   std::string build_default_swift_kid() {
     if (user_id.empty() || subuser.empty())
@@ -410,7 +402,6 @@ struct RGWUserAdminOpState {
     perm_mask = 0;
     suspended = 0;
     system = 0;
-    exclusive = 0;
     op_mask = 0;
 
     existing_user = false;
@@ -560,9 +551,9 @@ private:
   string user_id;
   bool info_stored;
 
-  void set_populated() { info_stored = true; }
-  void clear_populated() { info_stored = false; }
-  bool is_populated() { return info_stored; }
+  void set_populated() { info_stored = true; };
+  void clear_populated() { info_stored = false; };
+  bool is_populated() { return info_stored; };
 
   int check_op(RGWUserAdminOpState&  req, std::string *err_msg);
   int update(RGWUserAdminOpState& op_state, std::string *err_msg);
@@ -585,7 +576,7 @@ public:
   int init(RGWUserAdminOpState& op_state);
   int init_members(RGWUserAdminOpState& op_state);
 
-  RGWRados *get_store() { return store; }
+  RGWRados *get_store() { return store; };
 
   /* API Contracted Members */
   RGWUserCapPool caps;
diff --git a/src/rgw/rgw_xml.cc b/src/rgw/rgw_xml.cc
index 3e38f80..9595a02 100644
--- a/src/rgw/rgw_xml.cc
+++ b/src/rgw/rgw_xml.cc
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #include <string.h>
 
 #include <iostream>
@@ -41,7 +38,7 @@ get_next()
     ++cur;
   }
   return obj;
-}
+};
 
 ostream& operator<<(ostream& out, XMLObj& obj) {
    out << obj.obj_type << ": " << obj.data;
diff --git a/src/rgw/rgw_xml.h b/src/rgw/rgw_xml.h
index 164e97a..5004e98 100644
--- a/src/rgw/rgw_xml.h
+++ b/src/rgw/rgw_xml.h
@@ -1,6 +1,3 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
 #ifndef CEPH_RGW_XML_H
 #define CEPH_RGW_XML_H
 
diff --git a/src/rocksdb/.arcconfig b/src/rocksdb/.arcconfig
deleted file mode 100644
index 85ca38f..0000000
--- a/src/rocksdb/.arcconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "project_id" : "rocksdb",
-  "conduit_uri" : "https://reviews.facebook.net/",
-  "copyright_holder" : "Facebook",
-  "load" : [
-    "linters"
-  ],
-  "lint.engine" : "FacebookFbcodeLintEngine",
-  "lint.engine.single.linter" : "FbcodeCppLinter"
-}
diff --git a/src/rocksdb/.clang-format b/src/rocksdb/.clang-format
deleted file mode 100644
index 7c27981..0000000
--- a/src/rocksdb/.clang-format
+++ /dev/null
@@ -1,5 +0,0 @@
-# Complete list of style options can be found at: 
-# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
----
-BasedOnStyle: Google
-...
diff --git a/src/rocksdb/.gitignore b/src/rocksdb/.gitignore
deleted file mode 100644
index 5b31e68..0000000
--- a/src/rocksdb/.gitignore
+++ /dev/null
@@ -1,60 +0,0 @@
-TARGETS
-build_config.mk
-
-*.a
-*.arc
-*.d
-*.dylib*
-*.gcda
-*.gcno
-*.o
-*.so
-*.so.*
-*_test
-*_bench
-*_stress
-*.out
-*.class
-*.jar
-*.*jnilib*
-*.d-e
-*.o-*
-*.swp
-*.lo
-*~
-
-ldb
-manifest_dump
-sst_dump
-util/build_version.cc
-build_tools/VALGRIND_LOGS/
-coverage/COVERAGE_REPORT
-.gdbhistory
-.phutil_module_cache
-tags
-java/*.log
-java/include/org_rocksdb_*.h
-
-.dirstamp
-.deps/
-.libs/
-Makefile.in
-aclocal.m4
-ar-lib
-autom4te.cache/
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-librocksdb.la
-libtool
-ltmain.sh
-missing
-stamp-h1
-Makefile
-
diff --git a/src/rocksdb/CONTRIBUTING.md b/src/rocksdb/CONTRIBUTING.md
deleted file mode 100644
index 7270d0c..0000000
--- a/src/rocksdb/CONTRIBUTING.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Contributing to RocksDB
-
-## Contributor License Agreement ("CLA")
-
-In order to accept your pull request, we need you to submit a CLA. You
-only need to do this once, so if you've done this for another Facebook
-open source project, you're good to go. If you are submitting a pull
-request for the first time, just let us know that you have completed
-the CLA and we can cross-check with your GitHub username.
-
-Complete your CLA here: <https://code.facebook.com/cla>
-
-If you don't have a Facebook account, we can send you a PDF that you can
-sign offline. Send us an e-mail or create a new github issue to
-request the CLA in PDF format.
-
-## License
-
-By contributing to RocksDB, you agree that your contributions will be
-licensed under the [BSD License](LICENSE).
diff --git a/src/rocksdb/HISTORY.md b/src/rocksdb/HISTORY.md
deleted file mode 100644
index f64d532..0000000
--- a/src/rocksdb/HISTORY.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Rocksdb Change Log
-
-## 3.0.0 (05/05/2014)
-
-### Public API changes
-* Added _LEVEL to all InfoLogLevel enums
-* Deprecated ReadOptions.prefix and ReadOptions.prefix_seek. Seek() defaults to prefix-based seek when Options.prefix_extractor is supplied. More detail is documented in https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes
-
-### New Features
-* Column family support
-* Added an option to use different checksum functions in BlockBasedTableOptions
-* Added ApplyToAllCacheEntries() function to Cache
-
-## 2.8.0 (04/04/2014)
-
-* Removed arena.h from public header files.
-* By default, checksums are verified on every read from database
-* Change default value of several options, including: paranoid_checks=true, max_open_files=5000, level0_slowdown_writes_trigger=20, level0_stop_writes_trigger=24, disable_seek_compaction=true, max_background_flushes=1 and allow_mmap_writes=false
-* Added is_manual_compaction to CompactionFilter::Context
-* Added "virtual void WaitForJoin()" in class Env. Default operation is no-op.
-* Removed BackupEngine::DeleteBackupsNewerThan() function
-* Added new option -- verify_checksums_in_compaction
-* Changed Options.prefix_extractor from raw pointer to shared_ptr (take ownership)
-  Changed HashSkipListRepFactory and HashLinkListRepFactory constructor to not take SliceTransform object (use Options.prefix_extractor implicitly)
-* Added Env::GetThreadPoolQueueLen(), which returns the waiting queue length of thread pools
-* Added a command "checkconsistency" in ldb tool, which checks
-  if file system state matches DB state (file existence and file sizes)
-* Separate options related to block based table to a new struct BlockBasedTableOptions.
-* WriteBatch has a new function Count() to return total size in the batch, and Data() now returns a reference instead of a copy
-* Add more counters to perf context.
-* Supports several more DB properties: compaction-pending, background-errors and cur-size-active-mem-table.
-
-### New Features
-* If we find one truncated record at the end of the MANIFEST or WAL files,
-  we will ignore it. We assume that writers of these records were interrupted
-  and that we can safely ignore it.
-* A new SST format "PlainTable" is added, which is optimized for memory-only workloads. It can be created through NewPlainTableFactory() or NewTotalOrderPlainTableFactory().
-* A new mem table implementation hash linked list optimizing for the case that there are only few keys for each prefix, which can be created through NewHashLinkListRepFactory().
-* Merge operator supports a new function PartialMergeMulti() to allow users to do partial merges against multiple operands.
-* Now compaction filter has a V2 interface. It buffers the kv-pairs sharing the same key prefix, process them in batches, and return the batched results back to DB. The new interface uses a new structure CompactionFilterContext for the same purpose as CompactionFilter::Context in V1.
-* Geo-spatial support for locations and radial-search.
-
-## 2.7.0 (01/28/2014)
-
-### Public API changes
-
-* Renamed `StackableDB::GetRawDB()` to `StackableDB::GetBaseDB()`.
-* Renamed `WriteBatch::Data()` `const std::string& Data() const`.
-* Renamed class `TableStats` to `TableProperties`.
-* Deleted class `PrefixHashRepFactory`. Please use `NewHashSkipListRepFactory()` instead.
-* Supported multi-threaded `EnableFileDeletions()` and `DisableFileDeletions()`.
-* Added `DB::GetOptions()`.
-* Added `DB::GetDbIdentity()`.
-
-### New Features
-
-* Added [BackupableDB](https://github.com/facebook/rocksdb/wiki/How-to-backup-RocksDB%3F)
-* Implemented [TailingIterator](https://github.com/facebook/rocksdb/wiki/Tailing-Iterator), a special type of iterator that
-  doesn't create a snapshot (can be used to read newly inserted data)
-  and is optimized for doing sequential reads.
-* Added property block for table, which allows (1) a table to store
-  its metadata and (2) end user to collect and store properties they
-  are interested in.
-* Enabled caching index and filter block in block cache (turned off by default).
-* Supported error report when doing manual compaction.
-* Supported additional Linux platform flavors and Mac OS.
-* Put with `SliceParts` - Variant of `Put()` that gathers output like `writev(2)`
-* Bug fixes and code refactor for compatibility with upcoming Column
-  Family feature.
-
-### Performance Improvements
-
-* Huge benchmark performance improvements by multiple efforts. For example, increase in readonly QPS from about 530k in 2.6 release to 1.1 million in 2.7 [1]
-* Speeding up a way RocksDB deleted obsolete files - no longer listing the whole directory under a lock -- decrease in p99
-* Use raw pointer instead of shared pointer for statistics: [5b825d](https://github.com/facebook/rocksdb/commit/5b825d6964e26ec3b4bb6faa708ebb1787f1d7bd) -- huge increase in performance -- shared pointers are slow
-* Optimized locking for `Get()` -- [1fdb3f](https://github.com/facebook/rocksdb/commit/1fdb3f7dc60e96394e3e5b69a46ede5d67fb976c) -- 1.5x QPS increase for some workloads
-* Cache speedup - [e8d40c3](https://github.com/facebook/rocksdb/commit/e8d40c31b3cca0c3e1ae9abe9b9003b1288026a9)
-* Implemented autovector, which allocates first N elements on stack. Most of vectors in RocksDB are small. Also, we never want to allocate heap objects while holding a mutex. -- [c01676e4](https://github.com/facebook/rocksdb/commit/c01676e46d3be08c3c140361ef1f5884f47d3b3c)
-* Lots of efforts to move malloc, memcpy and IO outside of locks
diff --git a/src/rocksdb/INSTALL.md b/src/rocksdb/INSTALL.md
deleted file mode 100644
index 2a91be6..0000000
--- a/src/rocksdb/INSTALL.md
+++ /dev/null
@@ -1,80 +0,0 @@
-## Dependencies
-
-RocksDB is developed on Linux (CentOS release 5.2), with gcc 4.8.1.
-It depends on gcc with C++11 support.
-
-* RocksDB depends on the following libraries:
-  - [zlib](http://www.zlib.net/) - a library for data compression.
-  - [bzip2](http://www.bzip.org/) - a library for data compression.
-  - [snappy](https://code.google.com/p/snappy/) - a library for fast
-      data compression.
-  - [gflags](https://code.google.com/p/gflags/) - a library that handles
-      command line flags processing.
-
-RocksDB will successfully compile without the compression libraries included,
-but some things may fail. We do not support releases without the compression
-libraries. You are on your own.
-
-## Supported platforms
-
-* **Linux - Ubuntu**
-    * Upgrade your gcc to version at least 4.7 to get C++11 support.
-    * Install gflags. First, try: `sudo apt-get install libgflags-dev`
-      If this doesn't work and you're using Ubuntu, here's a nice tutorial:
-      (http://askubuntu.com/questions/312173/installing-gflags-12-04)
-    * Install snappy. This is usually as easy as:
-      `sudo apt-get install libsnappy-dev`.
-    * Install zlib. Try: `sudo apt-get install zlib1g-dev`.
-    * Install bzip2: `sudo apt-get install libbz2-dev`.
-* **Linux - CentOS**
-    * Upgrade your gcc to version at least 4.7 to get C++11 support:
-      `yum install gcc47-c++`
-    * Install gflags:
-
-              wget https://gflags.googlecode.com/files/gflags-2.0-no-svn-files.tar.gz
-              tar -xzvf gflags-2.0-no-svn-files.tar.gz
-              cd gflags-2.0
-              ./configure && make && sudo make install
-
-    * Install snappy:
-
-              wget https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz
-              tar -xzvf snappy-1.1.1.tar.gz
-              cd snappy-1.1.1
-              ./configure && make && sudo make install
-
-    * Install zlib:
-
-              sudo yum install zlib
-              sudo yum install zlib-devel
-
-    * Install bzip2:
-
-              sudo yum install bzip2
-              sudo yum install bzip2-devel
-
-* **OS X**:
-    * Install latest C++ compiler that supports C++ 11:
-        * Update XCode:  run `xcode-select --install` (or install it from XCode App's settting).
-        * Install via [homebrew](http://brew.sh/).
-            * If you're first time developer in MacOS, you still need to run: `xcode-select --install` in your command line.
-            * run `brew tap homebrew/dupes; brew install gcc47 --use-llvm` to install gcc 4.7 (or higher).
-    * Install zlib, bzip2 and snappy libraries for compression.
-    * Install gflags. We have included a script
-    `build_tools/mac-install-gflags.sh`, which should automatically install it.
-    If you installed gflags by other means (for example, `brew install gflags`),
-    please set `LIBRARY_PATH` and `CPATH` accordingly.
-    * Please note that some of the optimizations/features are disabled in OSX.
-    We did not run any production workloads on it.
-
-* **iOS**:
-  * Run: `TARGET_OS=IOS make static_lib`
-
-## Compilation
-`make clean; make` will compile librocksdb.a (RocksDB static library) and all
-the unit tests. You can run all unit tests with `make check`.
-
-For shared library builds, exec `make shared_lib` instead.
-
-If you followed the above steps and your compile or unit tests fail,
-please submit an issue: (https://github.com/facebook/rocksdb/issues)
diff --git a/src/rocksdb/LICENSE b/src/rocksdb/LICENSE
deleted file mode 100644
index b132901..0000000
--- a/src/rocksdb/LICENSE
+++ /dev/null
@@ -1,35 +0,0 @@
-BSD License
-
-For rocksdb software
-
-Copyright (c) 2014, Facebook, Inc.
-All rights reserved.
----------------------------------------------------------------------
-
-Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/rocksdb/Makefile.am b/src/rocksdb/Makefile.am
deleted file mode 100644
index d45927d..0000000
--- a/src/rocksdb/Makefile.am
+++ /dev/null
@@ -1,273 +0,0 @@
-AUTOMAKE_OPTIONS = subdir-objects
-OPT ?= -DNDEBUG
-
-ACLOCAL_AMFLAGS = -I m4
-WARNING_FLAGS = -Wall -Werror 
-ROCKSDB_CFLAGS = -g -O2 -fPIC
-ROCKSDB_CXXFLAGS = -std=c++11 -g -O2 -fPIC
-GFLAG = gflags
-noinst_LTLIBRARIES = librocksdb.la
-
-librocksdb_la_CFLAGS = $(WARNING_FLAGS) $(ROCKSDB_CFLAGS) -I$(srcdir) -I$(srcdir)/include -DOS_LINUX -DROCKSDB_PLATFORM_POSIX -fno-builtin-memcmp $(OPT) -DHAVE_JEMALLOC -Woverloaded-virtual
-librocksdb_la_CXXFLAGS = $(WARNING_FLAGS) $(ROCKSDB_CXXFLAGS) -I$(srcdir) -I$(srcdir)/include -DOS_LINUX -DROCKSDB_PLATFORM_POSIX -fno-builtin-memcmp $(OPT) -DHAVE_JEMALLOC -Woverloaded-virtual -DROCKSDB_ATOMIC_PRESENT -DROCKSDB_FALLOCATE_PRESENT 
-librocksdb_la_LDFLAGS = -shared -Wl,-soname -Wl
-if WITH_ATOMIC
-   librocksdb_la_CFLAGS += -DROCKSDB_ATOMIC_PRESENT
-   librocksdb_la_CXXFLAGS += -DROCKSDB_ATOMIC_PRESENT
-endif
-
-if WITH_FALLOCATE
-   librocksdb_la_CFLAGS += -DROCKSDB_FALLOCATE_PRESENT
-   librocksdb_la_CXXFLAGS += -DROCKSDB_FALLOCATE_PRESENT
-endif
-#
-librocksdb_la_LDFLAGS += -lpthread 
-if WITH_TCMALLOC
-   librocksdb_la_LDFLAGS += -ltcmalloc
-if WITH_RT
-   librocksdb_la_LDFLAGS += -lrt
-endif
-endif
-if WITH_SNAPPY
-   librocksdb_la_CFLAGS += -DSNAPPY
-   librocksdb_la_CXXFLAGS += -DSNAPPY
-   librocksdb_la_LDFLAGS += -lsnappy
-endif
-if WITH_Z
-   librocksdb_la_CFLAGS += -DZLIB
-   librocksdb_la_CXXFLAGS += -DZLIB
-   librocksdb_la_LDFLAGS += -lz
-endif
-if WITH_BZ2
-   librocksdb_la_CFLAGS += -DBZIP2
-   librocksdb_la_CXXFLAGS += -DBZIP2
-   librocksdb_la_LDFLAGS += -lbz2
-endif
-if WITH_GOOGLE_FLAGS
-   GFLAGS = google
-   librocksdb_la_CFLAGS += -DGFLAGS
-   librocksdb_la_CXXFLAGS += -DGFLAGS
-   librocksdb_la_LDFLAGS += -lgflags
-endif
-if WITH_GFLAGS_FLAGS
-   GFLAGS = gflags
-   librocksdb_la_CFLAGS += -DGFLAGS
-   librocksdb_la_CXXFLAGS += -DGFLAGS
-   librocksdb_la_LDFLAGS += -lgflags
-endif
-
-$(shell (./build_tools/build_detect_version))
-
-SOURCE_FILES = db/builder.cc \
-	db/c.cc \
-	db/column_family.cc \
-	db/compaction.cc \
-	db/compaction_picker.cc \
-	db/db_filesnapshot.cc \
-	db/dbformat.cc \
-	db/db_impl.cc \
-	db/db_impl_debug.cc \
-	db/db_impl_readonly.cc \
-	db/db_iter.cc \
-	db/db_stats_logger.cc \
-	db/file_indexer.cc \
-	db/filename.cc \
-	db/internal_stats.cc \
-	db/log_reader.cc \
-	db/log_writer.cc \
-	db/memtable.cc \
-	db/memtable_list.cc \
-	db/merge_helper.cc \
-	db/merge_operator.cc \
-	db/repair.cc \
-	db/table_cache.cc \
-	db/table_properties_collector.cc \
-	db/tailing_iter.cc \
-	db/transaction_log_impl.cc \
-	db/version_edit.cc \
-	db/version_set.cc \
-	db/write_batch.cc \
-	table/block_based_table_builder.cc \
-	table/block_based_table_factory.cc \
-	table/block_based_table_reader.cc \
-	table/block_builder.cc \
-	table/block.cc \
-	table/block_hash_index.cc \
-	table/filter_block.cc \
-	table/flush_block_policy.cc \
-	table/format.cc \
-	table/iterator.cc \
-	table/merger.cc \
-	table/meta_blocks.cc \
-	table/plain_table_builder.cc \
-	table/plain_table_factory.cc \
-	table/plain_table_reader.cc \
-	table/table_properties.cc \
-	table/two_level_iterator.cc \
-	util/arena.cc \
-	util/auto_roll_logger.cc \
-	util/blob_store.cc \
-	util/bloom.cc \
-	util/build_version.cc \
-	util/cache.cc \
-	util/coding.cc \
-	util/comparator.cc \
-	util/crc32c.cc \
-	util/dynamic_bloom.cc \
-	util/env.cc \
-	util/env_hdfs.cc \
-	util/env_posix.cc \
-	util/filter_policy.cc \
-	util/hash.cc \
-	util/hash_cuckoo_rep.cc \
-	util/hash_linklist_rep.cc \
-	util/hash_skiplist_rep.cc \
-	util/histogram.cc \
-	utilities/backupable/backupable_db.cc \
-	utilities/geodb/geodb_impl.cc \
-	utilities/merge_operators/put.cc \
-	utilities/merge_operators/string_append/stringappend2.cc \
-	utilities/merge_operators/string_append/stringappend.cc \
-	utilities/merge_operators/uint64add.cc \
-	utilities/redis/redis_lists.cc \
-	utilities/ttl/db_ttl_impl.cc \
-	util/ldb_cmd.cc \
-	util/ldb_tool.cc \
-	util/log_buffer.cc \
-	util/logging.cc \
-	util/murmurhash.cc \
-	util/options.cc \
-	util/perf_context.cc \
-	util/skiplistrep.cc \
-	util/slice.cc \
-	util/statistics.cc \
-	util/status.cc \
-	util/string_util.cc \
-	util/sync_point.cc \
-	util/thread_local.cc \
-	util/vectorrep.cc \
-	util/xxhash.cc \
-	port/port_posix.cc \
-	port/stack_trace.cc 
-
-
-SOURCE_H = util/ldb_cmd_execute_result.h \
-	util/xxhash.h \
-	util/mutexlock.h \
-	util/logging.h \
-	util/coding.h \
-	util/posix_logger.h \
-	util/crc32c.h \
-	util/ldb_cmd.h \
-	util/hash_linklist_rep.h \
-	util/log_buffer.h \
-	util/sync_point.h \
-	util/murmurhash.h \
-	util/autovector.h \
-	util/perf_context_imp.h \
-	util/testharness.h \
-	util/hash.h \
-	util/histogram.h \
-	util/stats_logger.h \
-	util/arena.h \
-	util/string_util.h \
-	util/stl_wrappers.h \
-	util/stop_watch.h \
-	util/statistics.h \
-	util/build_version.h \
-	util/benchharness.h \
-	util/auto_roll_logger.h \
-	util/dynamic_bloom.h \
-	util/random.h \
-	util/hash_skiplist_rep.h \
-	util/testutil.h \
-	util/thread_local.h \
-	util/blob_store.h \
-	util/hash_cuckoo_rep.h \
-	db/compaction_picker.h \
-	db/internal_stats.h \
-	db/builder.h \
-	db/memtable.h \
-	db/write_batch_internal.h \
-	db/file_indexer.h \
-	db/log_format.h \
-	db/merge_context.h \
-	db/log_writer.h \
-	db/snapshot.h \
-	db/table_properties_collector.h \
-	db/log_reader.h \
-	db/version_set.h \
-	db/merge_helper.h \
-	db/table_cache.h \
-	db/version_edit.h \
-	db/memtable_list.h \
-	db/db_impl_readonly.h \
-	db/tailing_iter.h \
-	db/filename.h \
-	db/db_iter.h \
-	db/compaction.h \
-	db/column_family.h \
-	db/skiplist.h \
-	db/transaction_log_impl.h \
-	db/dbformat.h \
-	db/db_impl.h \
-	table/block.h \
-	table/iter_heap.h \
-	table/block_based_table_reader.h \
-	table/iterator_wrapper.h \
-	table/block_builder.h \
-	table/table_builder.h \
-	table/plain_table_factory.h \
-	table/block_hash_index.h \
-	table/plain_table_reader.h \
-	table/table_reader.h \
-	table/meta_blocks.h \
-	table/format.h \
-	table/block_based_table_builder.h \
-	table/merger.h \
-	table/plain_table_builder.h \
-	table/two_level_iterator.h \
-	table/block_based_table_factory.h \
-	table/filter_block.h \
-	utilities/geodb/geodb_impl.h \
-	utilities/merge_operators.h \
-	utilities/merge_operators/string_append/stringappend2.h \
-	utilities/merge_operators/string_append/stringappend.h \
-	utilities/ttl/db_ttl_impl.h \
-	utilities/redis/redis_list_iterator.h \
-	utilities/redis/redis_lists.h \
-	utilities/redis/redis_list_exception.h \
-	include/utilities/geo_db.h \
-	include/utilities/stackable_db.h \
-	include/utilities/db_ttl.h \
-	include/utilities/utility_db.h \
-	include/utilities/backupable_db.h \
-	include/rocksdb/universal_compaction.h \
-	include/rocksdb/options.h \
-	include/rocksdb/comparator.h \
-	include/rocksdb/flush_block_policy.h \
-	include/rocksdb/ldb_tool.h \
-	include/rocksdb/perf_context.h \
-	include/rocksdb/slice_transform.h \
-	include/rocksdb/filter_policy.h \
-	include/rocksdb/types.h \
-	include/rocksdb/write_batch.h \
-	include/rocksdb/statistics.h \
-	include/rocksdb/slice.h \
-	include/rocksdb/merge_operator.h \
-	include/rocksdb/iterator.h \
-	include/rocksdb/env.h \
-	include/rocksdb/compaction_filter.h \
-	include/rocksdb/table_properties.h \
-	include/rocksdb/db.h \
-	include/rocksdb/table.h \
-	include/rocksdb/status.h \
-	include/rocksdb/memtablerep.h \
-	include/rocksdb/version.h \
-	include/rocksdb/c.h \
-	include/rocksdb/transaction_log.h \
-	include/rocksdb/cache.h 
-
-noinst_HEADERS = $(SOURCE_H)
-
-librocksdb_la_SOURCES = $(SOURCE_FILES)
diff --git a/src/rocksdb/PATENTS b/src/rocksdb/PATENTS
deleted file mode 100644
index 8a6fca4..0000000
--- a/src/rocksdb/PATENTS
+++ /dev/null
@@ -1,23 +0,0 @@
-Additional Grant of Patent Rights
-
-“Software” means the rocksdb software distributed by Facebook, Inc.
-
-Facebook hereby grants you a perpetual, worldwide, royalty-free,
-non-exclusive, irrevocable (subject to the termination provision below)
-license under any rights in any patent claims owned by Facebook, to make,
-have made, use, sell, offer to sell, import, and otherwise transfer the
-Software. For avoidance of doubt, no license is granted under Facebook’s
-rights in any patent claims that are infringed by (i) modifications to the
-Software made by you or a third party, or (ii) the Software in combination
-with any software or other technology provided by you or a third party.
-
-The license granted hereunder will terminate, automatically and without
-notice, for anyone that makes any claim (including by filing any lawsuit,
-assertion or other action) alleging (a) direct, indirect, or contributory
-infringement or inducement to infringe any patent: (i) by Facebook or any
-of its subsidiaries or affiliates, whether or not such claim is related
-to the Software, (ii) by any party if such claim arises in whole or in
-part from any software, product or service of Facebook or any of its
-subsidiaries or affiliates, whether or not such claim is related to the
-Software, or (iii) by any party relating to the Software; or (b) that
-any right in any patent claim of Facebook is invalid or unenforceable.
diff --git a/src/rocksdb/README b/src/rocksdb/README
deleted file mode 100644
index 473e414..0000000
--- a/src/rocksdb/README
+++ /dev/null
@@ -1,82 +0,0 @@
-rocksdb: A persistent key-value store for flash storage
-Authors: * The Facebook Database Engineering Team
-         * Build on earlier work on leveldb by Sanjay Ghemawat
-           (sanjay at google.com) and Jeff Dean (jeff at google.com)
-
-This code is a library that forms the core building block for a fast
-key value server, especially suited for storing data on flash drives.
-It has an Log-Structured-Merge-Database (LSM) design with flexible tradeoffs
-between Write-Amplification-Factor(WAF), Read-Amplification-Factor (RAF)
-and Space-Amplification-Factor(SAF). It has multi-threaded compactions,
-making it specially suitable for storing multiple terabytes of data in a
-single database.
-
-The core of this code has been derived from open-source leveldb.
-
-The code under this directory implements a system for maintaining a
-persistent key/value store.
-
-See doc/index.html and github wiki (https://github.com/facebook/rocksdb/wiki)
-for more explanation.
-
-The public interface is in include/*.  Callers should not include or
-rely on the details of any other header files in this package.  Those
-internal APIs may be changed without warning.
-
-Guide to header files:
-
-include/rocksdb/db.h
-    Main interface to the DB: Start here
-
-include/rocksdb/options.h
-    Control over the behavior of an entire database, and also
-    control over the behavior of individual reads and writes.
-
-include/rocksdb/comparator.h
-    Abstraction for user-specified comparison function.  If you want
-    just bytewise comparison of keys, you can use the default comparator,
-    but clients can write their own comparator implementations if they
-    want custom ordering (e.g. to handle different character
-    encodings, etc.)
-
-include/rocksdb/iterator.h
-    Interface for iterating over data. You can get an iterator
-    from a DB object.
-
-include/rocksdb/write_batch.h
-    Interface for atomically applying multiple updates to a database.
-
-include/rocksdb/slice.h
-    A simple module for maintaining a pointer and a length into some
-    other byte array.
-
-include/rocksdb/status.h
-    Status is returned from many of the public interfaces and is used
-    to report success and various kinds of errors.
-
-include/rocksdb/env.h
-    Abstraction of the OS environment.  A posix implementation of
-    this interface is in util/env_posix.cc
-
-include/rocksdb/table_builder.h
-    Lower-level modules that most clients probably won't use directly
-
-include/rocksdb/cache.h
-    An API for the block cache.
-
-include/rocksdb/compaction_filter.h
-    An API for a application filter invoked on every compaction.
-
-include/rocksdb/filter_policy.h
-    An API for configuring a bloom filter.
-
-include/rocksdb/memtablerep.h
-    An API for implementing a memtable.
-
-include/rocksdb/statistics.h
-    An API to retrieve various database statistics.
-
-include/rocksdb/transaction_log.h
-    An API to retrieve transaction logs from a database.
-
-Design discussions are conducted in https://www.facebook.com/groups/rocksdb.dev/
diff --git a/src/rocksdb/ROCKSDB_LITE.md b/src/rocksdb/ROCKSDB_LITE.md
deleted file mode 100644
index e7e3752..0000000
--- a/src/rocksdb/ROCKSDB_LITE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# RocksDBLite
-
-RocksDBLite is a project focused on mobile use cases, which don't need a lot of fancy things we've built for server workloads and they are very sensitive to binary size. For that reason, we added a compile flag ROCKSDB_LITE that comments out a lot of the nonessential code and keeps the binary lean.
-
-Some examples of the features disabled by ROCKSDB_LITE:
-* compiled-in support for LDB tool
-* No backupable DB
-* No support for replication (which we provide in form of TrasactionalIterator)
-* No advanced monitoring tools
-* No special-purpose memtables that are highly optimized for specific use cases
-
-When adding a new big feature to RocksDB, please add ROCKSDB_LITE compile guard if:
-* Nobody from mobile really needs your feature,
-* Your feature is adding a lot of weight to the binary.
-
-Don't add ROCKSDB_LITE compile guard if:
-* It would introduce a lot of code complexity. Compile guards make code harder to read. It's a trade-off.
-* Your feature is not adding a lot of weight.
-
-If unsure, ask. :)
diff --git a/src/rocksdb/build_tools/build_detect_platform b/src/rocksdb/build_tools/build_detect_platform
deleted file mode 100755
index 99a212b..0000000
--- a/src/rocksdb/build_tools/build_detect_platform
+++ /dev/null
@@ -1,313 +0,0 @@
-#!/bin/sh
-#
-# Detects OS we're compiling on and outputs a file specified by the first
-# argument, which in turn gets read while processing Makefile.
-#
-# The output will set the following variables:
-#   CC                          C Compiler path
-#   CXX                         C++ Compiler path
-#   PLATFORM_LDFLAGS            Linker flags
-#   PLATFORM_SHARED_EXT         Extension for shared libraries
-#   PLATFORM_SHARED_LDFLAGS     Flags for building shared library
-#   PLATFORM_SHARED_CFLAGS      Flags for compiling objects for shared library
-#   PLATFORM_CCFLAGS            C compiler flags
-#   PLATFORM_CXXFLAGS           C++ compiler flags.  Will contain:
-#   PLATFORM_SHARED_VERSIONED   Set to 'true' if platform supports versioned
-#                               shared libraries, empty otherwise.
-#
-# The PLATFORM_CCFLAGS and PLATFORM_CXXFLAGS might include the following:
-#
-#       -DLEVELDB_PLATFORM_POSIX if cstdatomic is present
-#       -DLEVELDB_PLATFORM_NOATOMIC if it is not
-#       -DSNAPPY                    if the Snappy library is present
-#       -DLZ4                       if the LZ4 library is present
-#
-# Using gflags in rocksdb:
-# Our project depends on gflags, which requires users to take some extra steps
-# before they can compile the whole repository:
-#   1. Install gflags. You may download it from here:
-#      https://code.google.com/p/gflags/
-#   2. Once install, add the include path/lib path for gflags to CPATH and
-#      LIBRARY_PATH respectively. If installed with default mode, the
-#      lib and include path will be /usr/local/lib and /usr/local/include
-# Mac user can do this by running build_tools/mac-install-gflags.sh
-
-OUTPUT=$1
-if test -z "$OUTPUT"; then
-  echo "usage: $0 <output-filename>" >&2
-  exit 1
-fi
-
-# we depend on C++11
-PLATFORM_CXXFLAGS="-std=c++11"
-# we currently depend on POSIX platform
-COMMON_FLAGS="-DROCKSDB_PLATFORM_POSIX"
-
-# Default to fbcode gcc on internal fb machines
-if [ -d /mnt/gvfs/third-party -a -z "$CXX" ]; then
-    FBCODE_BUILD="true"
-    if [ -z "$USE_CLANG" ]; then
-        CENTOS_VERSION=`rpm -q --qf "%{VERSION}" \
-          $(rpm -q --whatprovides redhat-release)`
-        if [ "$CENTOS_VERSION" = "6" ]; then
-          source $PWD/build_tools/fbcode.gcc481.sh
-        else
-          source $PWD/build_tools/fbcode.gcc471.sh
-        fi
-    else
-        source $PWD/build_tools/fbcode.clang31.sh
-    fi
-fi
-
-# Delete existing output, if it exists
-rm -f $OUTPUT
-touch $OUTPUT
-
-if test -z "$CC"; then
-   CC=cc
-fi
-
-if test -z "$CXX"; then
-    CXX=g++
-fi
-
-# Detect OS
-if test -z "$TARGET_OS"; then
-    TARGET_OS=`uname -s`
-fi
-
-COMMON_FLAGS="$COMMON_FLAGS ${CFLAGS}"
-CROSS_COMPILE=
-PLATFORM_CCFLAGS=
-PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS ${CXXFLAGS}"
-PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS"
-PLATFORM_SHARED_EXT="so"
-PLATFORM_SHARED_LDFLAGS="-shared -Wl,-soname -Wl,"
-PLATFORM_SHARED_CFLAGS="-fPIC"
-PLATFORM_SHARED_VERSIONED=false
-
-# generic port files (working on all platform by #ifdef) go directly in /port
-GENERIC_PORT_FILES=`cd $ROCKSDB_ROOT; find port -name '*.cc' | tr "\n" " "`
-
-# On GCC, we pick libc's memcmp over GCC's memcmp via -fno-builtin-memcmp
-case "$TARGET_OS" in
-    Darwin)
-        PLATFORM=OS_MACOSX
-        COMMON_FLAGS="$COMMON_FLAGS -DOS_MACOSX"
-        PLATFORM_SHARED_EXT=dylib
-        PLATFORM_SHARED_LDFLAGS="-dynamiclib -install_name "
-        # PORT_FILES=port/darwin/darwin_specific.cc
-        ;;
-    IOS)
-        PLATFORM=IOS
-        COMMON_FLAGS="$COMMON_FLAGS -DOS_MACOSX -DIOS_CROSS_COMPILE -DROCKSDB_LITE"
-        PLATFORM_SHARED_EXT=dylib
-        PLATFORM_SHARED_LDFLAGS="-dynamiclib -install_name "
-        CROSS_COMPILE=true
-        ;;
-    Linux)
-        PLATFORM=OS_LINUX
-        COMMON_FLAGS="$COMMON_FLAGS -DOS_LINUX"
-        if [ -z "$USE_CLANG" ]; then
-            COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp"
-        fi
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lrt"
-        # PORT_FILES=port/linux/linux_specific.cc
-        ;;
-    SunOS)
-        PLATFORM=OS_SOLARIS
-        COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_SOLARIS"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lrt"
-        # PORT_FILES=port/sunos/sunos_specific.cc
-        ;;
-    FreeBSD)
-        PLATFORM=OS_FREEBSD
-        COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_FREEBSD"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread"
-        # PORT_FILES=port/freebsd/freebsd_specific.cc
-        ;;
-    NetBSD)
-        PLATFORM=OS_NETBSD
-        COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_NETBSD"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lgcc_s"
-        # PORT_FILES=port/netbsd/netbsd_specific.cc
-        ;;
-    OpenBSD)
-        PLATFORM=OS_OPENBSD
-        COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_OPENBSD"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -pthread"
-        # PORT_FILES=port/openbsd/openbsd_specific.cc
-        ;;
-    DragonFly)
-        PLATFORM=OS_DRAGONFLYBSD
-        COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_DRAGONFLYBSD"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread"
-        # PORT_FILES=port/dragonfly/dragonfly_specific.cc
-        ;;
-    OS_ANDROID_CROSSCOMPILE)
-        PLATFORM=OS_ANDROID
-	COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_ANDROID -DLEVELDB_PLATFORM_POSIX"
-	PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS "  # All pthread features are in the Android C library
-        # PORT_FILES=port/android/android.cc
-        CROSS_COMPILE=true
-        ;;
-    *)
-        echo "Unknown platform!" >&2
-        exit 1
-esac
-
-if test -z "$DO_NOT_RUN_BUILD_DETECT_VERSION"; then
-  $PWD/build_tools/build_detect_version
-fi
-
-# We want to make a list of all cc files within util, db, table, and helpers
-# except for the test and benchmark files. By default, find will output a list
-# of all files matching either rule, so we need to append -print to make the
-# prune take effect.
-DIRS="util db table utilities"
-
-set -f # temporarily disable globbing so that our patterns arent expanded
-PRUNE_TEST="-name *test*.cc -prune"
-PRUNE_BENCH="-name *bench*.cc -prune"
-PORTABLE_FILES=`cd $ROCKSDB_ROOT; find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o -name '*.cc' -print | sort | tr "\n" " "`
-PORTABLE_CPP=`cd $ROCKSDB_ROOT; find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o -name '*.cpp' -print | sort | tr "\n" " "`
-set +f # re-enable globbing
-
-# The sources consist of the portable files, plus the platform-specific port
-# file.
-echo "SOURCES=$PORTABLE_FILES $GENERIC_PORT_FILES $PORT_FILES" >> $OUTPUT
-echo "SOURCESCPP=$PORTABLE_CPP" >> $OUTPUT
-echo "MEMENV_SOURCES=helpers/memenv/memenv.cc" >> $OUTPUT
-
-if [ "$CROSS_COMPILE" = "true" -o "$FBCODE_BUILD" = "true" ]; then
-    # Cross-compiling; do not try any compilation tests.
-    # Also don't need any compilation tests if compiling on fbcode
-    true
-else
-    # do fPIC on 64 bit in non-fbcode environment
-    case "$TARGET_OS" in
-        x86_64)
-            PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS -fPIC"
-    esac
-
-    # If -std=c++0x works, use <atomic>.  Otherwise use port_posix.h.
-    $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <atomic>
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_ATOMIC_PRESENT"
-    fi
-
-    # Test whether fallocate is available
-    $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <fcntl.h>
-      int main() {
-	int fd = open("/dev/null", 0);
-	fallocate(fd, 0, 0, 1024);
-      }
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_FALLOCATE_PRESENT"
-    fi
-
-    # Test whether Snappy library is installed
-    # http://code.google.com/p/snappy/
-    $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <snappy.h>
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lsnappy"
-    fi
-
-
-    # Test whether gflags library is installed
-    # http://code.google.com/p/gflags/
-    $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <gflags/gflags.h>
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DGFLAGS"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lgflags"
-    fi
-
-    # Test whether zlib library is installed
-    $CXX $CFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <zlib.h>
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DZLIB"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lz"
-    fi
-
-    # Test whether bzip library is installed
-    $CXX $CFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <bzlib.h>
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DBZIP2"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lbz2"
-    fi
-
-    # Test whether lz4 library is installed
-    $CXX $CFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-      #include <lz4.h>
-      #include <lz4hc.h>
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DLZ4"
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -llz4"
-    fi
-
-    # Test whether tcmalloc is available
-    $CXX $CFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null  <<EOF
-      int main() {}
-EOF
-    if [ "$?" = 0 ]; then
-        PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -ltcmalloc"
-    fi
-fi
-
-# shall we use HDFS?
-
-if test "$USE_HDFS"; then
-  if test -z "$JAVA_HOME"; then
-    echo "JAVA_HOME has to be set for HDFS usage."
-    exit 1
-  fi
-  HDFS_CCFLAGS="$HDFS_CCFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -DUSE_HDFS"
-  HDFS_LDFLAGS="$HDFS_LDFLAGS -Wl,--no-whole-archive hdfs/libhdfs.a -L$JAVA_HOME/jre/lib/amd64"
-  HDFS_LDFLAGS="$HDFS_LDFLAGS -L$JAVA_HOME/jre/lib/amd64/server -L$GLIBC_RUNTIME_PATH/lib"
-  HDFS_LDFLAGS="$HDFS_LDFLAGS -ldl -lverify -ljava -ljvm"
-  COMMON_FLAGS="$COMMON_FLAGS $HDFS_CCFLAGS"
-  PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS $HDFS_LDFLAGS"
-fi
-
-# if Intel SSE instruction set is supported, set USE_SSE=" -msse -msse4.2 "
-COMMON_FLAGS="$COMMON_FLAGS $USE_SSE"
-
-PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS"
-PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS $COMMON_FLAGS"
-
-VALGRIND_VER="$VALGRIND_VER"
-
-echo "CC=$CC" >> $OUTPUT
-echo "CXX=$CXX" >> $OUTPUT
-echo "PLATFORM=$PLATFORM" >> $OUTPUT
-echo "PLATFORM_LDFLAGS=$PLATFORM_LDFLAGS" >> $OUTPUT
-echo "VALGRIND_VER=$VALGRIND_VER" >> $OUTPUT
-echo "PLATFORM_CCFLAGS=$PLATFORM_CCFLAGS" >> $OUTPUT
-echo "PLATFORM_CXXFLAGS=$PLATFORM_CXXFLAGS" >> $OUTPUT
-echo "PLATFORM_SHARED_CFLAGS=$PLATFORM_SHARED_CFLAGS" >> $OUTPUT
-echo "PLATFORM_SHARED_EXT=$PLATFORM_SHARED_EXT" >> $OUTPUT
-echo "PLATFORM_SHARED_LDFLAGS=$PLATFORM_SHARED_LDFLAGS" >> $OUTPUT
-echo "PLATFORM_SHARED_VERSIONED=$PLATFORM_SHARED_VERSIONED" >> $OUTPUT
-echo "EXEC_LDFLAGS=$EXEC_LDFLAGS" >> $OUTPUT
-echo "JEMALLOC_INCLUDE=$JEMALLOC_INCLUDE" >> $OUTPUT
-echo "JEMALLOC_LIB=$JEMALLOC_LIB" >> $OUTPUT
diff --git a/src/rocksdb/build_tools/build_detect_version b/src/rocksdb/build_tools/build_detect_version
deleted file mode 100755
index f7d711f..0000000
--- a/src/rocksdb/build_tools/build_detect_version
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# Record the version of the source that we are compiling.
-# We keep a record of the git revision in util/version.cc. This source file
-# is then built as a regular source file as part of the compilation process.
-# One can run "strings executable_filename | grep _build_" to find the version of
-# the source that we used to build the executable file.
-
-OUTFILE="$PWD/util/build_version.cc"
-
-GIT_SHA=""
-if command -v git >/dev/null 2>&1; then
-    GIT_SHA=$(git rev-parse HEAD 2>/dev/null)
-fi
-
-cat > "${OUTFILE}" <<EOF
-#include "build_version.h"
-const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:${GIT_SHA}";
-const char* rocksdb_build_git_datetime = "rocksdb_build_git_datetime:$(date)";
-const char* rocksdb_build_compile_date = __DATE__;
-const char* rocksdb_build_compile_time = __TIME__;
-EOF
diff --git a/src/rocksdb/build_tools/fbcode.clang31.sh b/src/rocksdb/build_tools/fbcode.clang31.sh
deleted file mode 100644
index 25a2ca7..0000000
--- a/src/rocksdb/build_tools/fbcode.clang31.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-#
-# Set environment variables so that we can compile leveldb using
-# fbcode settings.  It uses the latest g++ compiler and also
-# uses jemalloc
-
-TOOLCHAIN_REV=fbe3b095a4cc4a3713730050d182b7b4a80c342f
-TOOLCHAIN_EXECUTABLES="/mnt/gvfs/third-party/$TOOLCHAIN_REV/centos5.2-native"
-TOOLCHAIN_LIB_BASE="/mnt/gvfs/third-party/$TOOLCHAIN_REV/gcc-4.7.1-glibc-2.14.1"
-TOOL_JEMALLOC=jemalloc-3.3.1/9202ce3
-GLIBC_RUNTIME_PATH=/usr/local/fbcode/gcc-4.7.1-glibc-2.14.1
-
-# location of libgcc
-LIBGCC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/include"
-LIBGCC_LIBS=" -L $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/libs"
-
-# location of glibc
-GLIBC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/glibc/glibc-2.14.1/99df8fc/include"
-GLIBC_LIBS=" -L $TOOLCHAIN_LIB_BASE/glibc/glibc-2.14.1/99df8fc/lib"
-
-# location of snappy headers and libraries
-SNAPPY_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/snappy/snappy-1.0.3/7518bbe/include"
-SNAPPY_LIBS=" $TOOLCHAIN_LIB_BASE/snappy/snappy-1.0.3/7518bbe/lib/libsnappy.a"
-
-# location of zlib headers and libraries
-ZLIB_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/zlib/zlib-1.2.5/91ddd43/include"
-ZLIB_LIBS=" $TOOLCHAIN_LIB_BASE/zlib/zlib-1.2.5/91ddd43/lib/libz.a"
-
-# location of gflags headers and libraries
-GFLAGS_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/91ddd43/include"
-GFLAGS_LIBS=" $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/91ddd43/lib/libgflags.a"
-
-# location of bzip headers and libraries
-BZIP_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/91ddd43/include"
-BZIP_LIBS=" $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/91ddd43/lib/libbz2.a"
-
-# location of gflags headers and libraries
-GFLAGS_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/91ddd43/include"
-GFLAGS_LIBS=" $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/91ddd43/lib/libgflags.a"
-
-# use Intel SSE support for checksum calculations
-export USE_SSE=" -msse -msse4.2 "
-
-CC="$TOOLCHAIN_EXECUTABLES/clang/clang-3.2/0b7c69d/bin/clang $CLANG_INCLUDES"
-CXX="$TOOLCHAIN_EXECUTABLES/clang/clang-3.2/0b7c69d/bin/clang++ $CLANG_INCLUDES $JINCLUDE $SNAPPY_INCLUDE $ZLIB_INCLUDE $BZIP_INCLUDE $GFLAGS_INCLUDE"
-AR=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ar
-RANLIB=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ranlib
-
-CFLAGS="-B$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin -nostdlib "
-CFLAGS+=" -nostdinc -isystem $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/include/c++/4.7.1 "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/include/c++/4.7.1/x86_64-facebook-linux "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/include/c++/4.7.1/backward "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/glibc/glibc-2.14.1/99df8fc/include "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/include "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/clang/clang-3.2/0b7c69d/lib/clang/3.2/include "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/kernel-headers/kernel-headers-3.2.18_70_fbk11_00129_gc8882d0/da39a3e/include/linux "
-CFLAGS+=" -isystem $TOOLCHAIN_LIB_BASE/kernel-headers/kernel-headers-3.2.18_70_fbk11_00129_gc8882d0/da39a3e/include "
-CFLAGS+=" -Wall -Wno-sign-compare -Wno-unused-variable -Winvalid-pch -Wno-deprecated -Woverloaded-virtual"
-CFLAGS+=" $LIBGCC_INCLUDE $GLIBC_INCLUDE"
-CXXFLAGS="$CFLAGS -nostdinc++"
-
-CFLAGS+=" -I $TOOLCHAIN_LIB_BASE/jemalloc/$TOOL_JEMALLOC/include -DHAVE_JEMALLOC"
-
-EXEC_LDFLAGS=" -Wl,--whole-archive $TOOLCHAIN_LIB_BASE/jemalloc/$TOOL_JEMALLOC/lib/libjemalloc.a"
-EXEC_LDFLAGS+=" -Wl,--no-whole-archive $TOOLCHAIN_LIB_BASE/libunwind/libunwind-1.0.1/350336c/lib/libunwind.a"
-EXEC_LDFLAGS+=" $HDFSLIB $SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $GFLAGS_LIBS"
-EXEC_LDFLAGS+=" -Wl,--dynamic-linker,$GLIBC_RUNTIME_PATH/lib/ld-linux-x86-64.so.2"
-EXEC_LDFLAGS+=" -B$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin"
-
-PLATFORM_LDFLAGS="$LIBGCC_LIBS $GLIBC_LIBS "
-
-EXEC_LDFLAGS_SHARED="$SNAPPY_LIBS $ZLIB_LIBS $GFLAGS_LIBS"
-
-export CC CXX AR RANLIB CFLAGS EXEC_LDFLAGS EXEC_LDFLAGS_SHARED 
diff --git a/src/rocksdb/build_tools/fbcode.gcc471.sh b/src/rocksdb/build_tools/fbcode.gcc471.sh
deleted file mode 100644
index 9294057..0000000
--- a/src/rocksdb/build_tools/fbcode.gcc471.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-#
-# Set environment variables so that we can compile leveldb using
-# fbcode settings.  It uses the latest g++ compiler and also
-# uses jemalloc
-
-TOOLCHAIN_REV=fbe3b095a4cc4a3713730050d182b7b4a80c342f
-TOOLCHAIN_EXECUTABLES="/mnt/gvfs/third-party/$TOOLCHAIN_REV/centos5.2-native"
-TOOLCHAIN_LIB_BASE="/mnt/gvfs/third-party/$TOOLCHAIN_REV/gcc-4.7.1-glibc-2.14.1"
-TOOL_JEMALLOC=jemalloc-3.3.1/9202ce3
-
-# location of libhdfs libraries
-if test "$USE_HDFS"; then
-  JAVA_HOME="/usr/local/jdk-6u22-64"
-  JINCLUDE="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
-  GLIBC_RUNTIME_PATH="/usr/local/fbcode/gcc-4.7.1-glibc-2.14.1"
-  HDFSLIB=" -Wl,--no-whole-archive hdfs/libhdfs.a -L$JAVA_HOME/jre/lib/amd64 "
-  HDFSLIB+=" -L$JAVA_HOME/jre/lib/amd64/server -L$GLIBC_RUNTIME_PATH/lib "
-  HDFSLIB+=" -ldl -lverify -ljava -ljvm "
-fi
-
-# location of libgcc
-LIBGCC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/include"
-LIBGCC_LIBS=" -L $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.7.1/afc21dc/libs"
-
-# location of glibc
-GLIBC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/glibc/glibc-2.14.1/99df8fc/include"
-GLIBC_LIBS=" -L $TOOLCHAIN_LIB_BASE/glibc/glibc-2.14.1/99df8fc/lib"
-
-# location of snappy headers and libraries
-SNAPPY_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/snappy/snappy-1.0.3/7518bbe/include"
-SNAPPY_LIBS=" $TOOLCHAIN_LIB_BASE/snappy/snappy-1.0.3/7518bbe/lib/libsnappy.a"
-
-# location of zlib headers and libraries
-ZLIB_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/zlib/zlib-1.2.5/91ddd43/include"
-ZLIB_LIBS=" $TOOLCHAIN_LIB_BASE/zlib/zlib-1.2.5/91ddd43/lib/libz.a"
-
-# location of bzip headers and libraries
-BZIP_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/91ddd43/include"
-BZIP_LIBS=" $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/91ddd43/lib/libbz2.a"
-
-# location of gflags headers and libraries
-GFLAGS_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/91ddd43/include"
-GFLAGS_LIBS=" $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/91ddd43/lib/libgflags.a"
-
-# use Intel SSE support for checksum calculations
-export USE_SSE=" -msse -msse4.2 "
-
-CC="$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.7.1-glibc-2.14.1/bin/gcc"
-CXX="$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.7.1-glibc-2.14.1/bin/g++ $JINCLUDE $SNAPPY_INCLUDE $ZLIB_INCLUDE $BZIP_INCLUDE $GFLAGS_INCLUDE"
-AR=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ar
-RANLIB=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ranlib
-
-CFLAGS="-B$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/gold -m64 -mtune=generic"
-CFLAGS+=" -I $TOOLCHAIN_LIB_BASE/jemalloc/$TOOL_JEMALLOC/include -DHAVE_JEMALLOC"
-CFLAGS+=" $LIBGCC_INCLUDE $GLIBC_INCLUDE"
-CFLAGS+=" -DROCKSDB_PLATFORM_POSIX -DROCKSDB_ATOMIC_PRESENT -DROCKSDB_FALLOCATE_PRESENT"
-CFLAGS+=" -DSNAPPY -DGFLAGS -DZLIB -DBZIP2"
-
-EXEC_LDFLAGS=" -Wl,--whole-archive $TOOLCHAIN_LIB_BASE/jemalloc/$TOOL_JEMALLOC/lib/libjemalloc.a"
-EXEC_LDFLAGS+=" -Wl,--no-whole-archive $TOOLCHAIN_LIB_BASE/libunwind/libunwind-1.0.1/350336c/lib/libunwind.a"
-EXEC_LDFLAGS+=" $HDFSLIB $SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $GFLAGS_LIBS"
-
-PLATFORM_LDFLAGS="$LIBGCC_LIBS $GLIBC_LIBS "
-
-EXEC_LDFLAGS_SHARED="$SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $GFLAGS_LIBS"
-
-VALGRIND_VER="$TOOLCHAIN_LIB_BASE/valgrind/valgrind-3.8.1/91ddd43/bin/"
-
-export CC CXX AR RANLIB CFLAGS EXEC_LDFLAGS EXEC_LDFLAGS_SHARED VALGRIND_VER
diff --git a/src/rocksdb/build_tools/fbcode.gcc481.sh b/src/rocksdb/build_tools/fbcode.gcc481.sh
deleted file mode 100644
index d02596f..0000000
--- a/src/rocksdb/build_tools/fbcode.gcc481.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-#
-# Set environment variables so that we can compile rocksdb using
-# fbcode settings.  It uses the latest g++ compiler and also
-# uses jemalloc
-
-TOOLCHAIN_REV=53dc1fe83f84e9145b9ffb81b81aa7f6a49c87cc
-CENTOS_VERSION=`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`
-if [ "$CENTOS_VERSION" = "6" ]; then
-  TOOLCHAIN_EXECUTABLES="/mnt/gvfs/third-party/$TOOLCHAIN_REV/centos6-native"
-else
-  TOOLCHAIN_EXECUTABLES="/mnt/gvfs/third-party/$TOOLCHAIN_REV/centos5.2-native"
-fi
-TOOLCHAIN_LIB_BASE="/mnt/gvfs/third-party/$TOOLCHAIN_REV/gcc-4.8.1-glibc-2.17"
-
-# location of libhdfs libraries
-if test "$USE_HDFS"; then
-  JAVA_HOME="/usr/local/jdk-6u22-64"
-  JINCLUDE="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
-  GLIBC_RUNTIME_PATH="/usr/local/fbcode/gcc-4.8.1-glibc-2.17"
-  HDFSLIB=" -Wl,--no-whole-archive hdfs/libhdfs.a -L$JAVA_HOME/jre/lib/amd64 "
-  HDFSLIB+=" -L$JAVA_HOME/jre/lib/amd64/server -L$GLIBC_RUNTIME_PATH/lib "
-  HDFSLIB+=" -ldl -lverify -ljava -ljvm "
-fi
-
-# location of libgcc
-LIBGCC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.8.1/8aac7fc/include"
-LIBGCC_LIBS=" -L $TOOLCHAIN_LIB_BASE/libgcc/libgcc-4.8.1/8aac7fc/libs"
-
-# location of glibc
-GLIBC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/glibc/glibc-2.17/99df8fc/include"
-GLIBC_LIBS=" -L $TOOLCHAIN_LIB_BASE/glibc/glibc-2.17/99df8fc/lib"
-
-# location of snappy headers and libraries
-SNAPPY_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/snappy/snappy-1.0.3/43d84e2/include"
-SNAPPY_LIBS=" $TOOLCHAIN_LIB_BASE/snappy/snappy-1.0.3/43d84e2/lib/libsnappy.a"
-
-# location of zlib headers and libraries
-ZLIB_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/zlib/zlib-1.2.5/c3f970a/include"
-ZLIB_LIBS=" $TOOLCHAIN_LIB_BASE/zlib/zlib-1.2.5/c3f970a/lib/libz.a"
-
-# location of bzip headers and libraries
-BZIP_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/c3f970a/include"
-BZIP_LIBS=" $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/c3f970a/lib/libbz2.a"
-
-LZ4_REV=065ec7e38fe83329031f6668c43bef83eff5808b
-LZ4_INCLUDE=" -I /mnt/gvfs/third-party2/lz4/$LZ4_REV/r108/gcc-4.8.1-glibc-2.17/c3f970a/include"
-LZ4_LIBS=" /mnt/gvfs/third-party2/lz4/$LZ4_REV/r108/gcc-4.8.1-glibc-2.17/c3f970a/lib/liblz4.a"
-
-# location of gflags headers and libraries
-GFLAGS_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/c3f970a/include"
-GFLAGS_LIBS=" $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/c3f970a/lib/libgflags.a"
-
-# location of jemalloc
-JEMALLOC_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/jemalloc/jemalloc-3.4.1/4d53c6f/include/"
-JEMALLOC_LIB=" -Wl,--whole-archive $TOOLCHAIN_LIB_BASE/jemalloc/jemalloc-3.4.1/4d53c6f/lib/libjemalloc.a"
-
-# use Intel SSE support for checksum calculations
-export USE_SSE=" -msse -msse4.2 "
-
-CC="$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.8.1/cc6c9dc/bin/gcc"
-CXX="$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.8.1/cc6c9dc/bin/g++ $JINCLUDE $SNAPPY_INCLUDE $ZLIB_INCLUDE $BZIP_INCLUDE $LZ4_INCLUDE $GFLAGS_INCLUDE"
-AR=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ar
-RANLIB=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ranlib
-
-CFLAGS="-B$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/gold -m64 -mtune=generic"
-CFLAGS+=" $LIBGCC_INCLUDE $GLIBC_INCLUDE"
-CFLAGS+=" -DROCKSDB_PLATFORM_POSIX -DROCKSDB_ATOMIC_PRESENT -DROCKSDB_FALLOCATE_PRESENT"
-CFLAGS+=" -DSNAPPY -DGFLAGS -DZLIB -DBZIP2 -DLZ4"
-
-EXEC_LDFLAGS="-Wl,--dynamic-linker,/usr/local/fbcode/gcc-4.8.1-glibc-2.17/lib/ld.so"
-EXEC_LDFLAGS+=" -Wl,--no-whole-archive $TOOLCHAIN_LIB_BASE/libunwind/libunwind-1.0.1/675d945/lib/libunwind.a"
-EXEC_LDFLAGS+=" $HDFSLIB $SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $LZ4_LIBS $GFLAGS_LIBS"
-
-PLATFORM_LDFLAGS="$LIBGCC_LIBS $GLIBC_LIBS "
-
-EXEC_LDFLAGS_SHARED="$SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $LZ4_LIBS $GFLAGS_LIBS"
-
-VALGRIND_VER="$TOOLCHAIN_LIB_BASE/valgrind/valgrind-3.8.1/c3f970a/bin/"
-
-export CC CXX AR RANLIB CFLAGS EXEC_LDFLAGS EXEC_LDFLAGS_SHARED VALGRIND_VER JEMALLOC_LIB JEMALLOC_INCLUDE
diff --git a/src/rocksdb/build_tools/format-diff.sh b/src/rocksdb/build_tools/format-diff.sh
deleted file mode 100755
index 2d60620..0000000
--- a/src/rocksdb/build_tools/format-diff.sh
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/bash
-# If clang_format_diff.py command is not specfied, we assume we are able to
-# access directly without any path.
-if [ -z $CLANG_FORMAT_DIFF ]
-then
-CLANG_FORMAT_DIFF="clang-format-diff.py"
-fi
-
-# Check clang-format-diff.py
-if ! which $CLANG_FORMAT_DIFF &> /dev/null
-then
-  echo "You didn't have clang-format-diff.py available in your computer!"
-  echo "You can download it by running: "
-  echo "    curl http://goo.gl/iUW1u2"
-  exit 128
-fi
-
-# Check argparse, a library that clang-format-diff.py requires.
-python 2>/dev/null << EOF
-import argparse
-EOF
-
-if [ "$?" != 0 ]
-then
-  echo "To run clang-format-diff.py, we'll need the library "argparse" to be"
-  echo "installed. You can try either of the follow ways to install it:"
-  echo "  1. Manually download argparse: https://pypi.python.org/pypi/argparse"
-  echo "  2. easy_install argparse (if you have easy_install)"
-  echo "  3. pip install argparse (if you have pip)"
-  exit 129
-fi
-
-# TODO(kailiu) following work is not complete since we still need to figure
-# out how to add the modified files done pre-commit hook to git's commit index.
-#
-# Check if this script has already been added to pre-commit hook.
-# Will suggest user to add this script to pre-commit hook if their pre-commit
-# is empty.
-# PRE_COMMIT_SCRIPT_PATH="`git rev-parse --show-toplevel`/.git/hooks/pre-commit"
-# if ! ls $PRE_COMMIT_SCRIPT_PATH &> /dev/null
-# then
-#   echo "Would you like to add this script to pre-commit hook, which will do "
-#   echo -n "the format check for all the affected lines before you check in (y/n):"
-#   read add_to_hook
-#   if [ "$add_to_hook" == "y" ]
-#   then
-#     ln -s `git rev-parse --show-toplevel`/build_tools/format-diff.sh $PRE_COMMIT_SCRIPT_PATH
-#   fi
-# fi
-set -e
-
-uncommitted_code=`git diff HEAD`
-
-# If there's no uncommitted changes, we assume user are doing post-commit
-# format check, in which case we'll check the modified lines from latest commit.
-# Otherwise, we'll check format of the uncommitted code only.
-if [ -z "$uncommitted_code" ]
-then
-  # Check the format of last commit
-  diffs=$(git diff -U0 HEAD^ | $CLANG_FORMAT_DIFF -p 1)
-else
-  # Check the format of uncommitted lines,
-  diffs=$(git diff -U0 HEAD | $CLANG_FORMAT_DIFF -p 1)
-fi
-
-if [ -z "$diffs" ]
-then
-  echo "Nothing needs to be reformatted!"
-  exit 0
-fi
-
-# Highlight the insertion/deletion from the clang-format-diff.py's output
-COLOR_END="\033[0m"
-COLOR_RED="\033[0;31m" 
-COLOR_GREEN="\033[0;32m" 
-
-echo -e "Detect lines that doesn't follow the format rules:\r"
-# Add the color to the diff. lines added will be green; lines removed will be red.
-echo "$diffs" | 
-  sed -e "s/\(^-.*$\)/`echo -e \"$COLOR_RED\1$COLOR_END\"`/" |
-  sed -e "s/\(^+.*$\)/`echo -e \"$COLOR_GREEN\1$COLOR_END\"`/"
-echo -e "Would you like to fix the format automatically (y/n): \c"
-
-# Make sure under any mode, we can read user input.
-exec < /dev/tty
-read to_fix
-
-if [ "$to_fix" != "y" ]
-then
-  exit 1
-fi
-
-# Do in-place format adjustment.
-git diff -U0 HEAD^ | $CLANG_FORMAT_DIFF -i -p 1
-echo "Files reformatted!"
-
-# Amend to last commit if user do the post-commit format check
-if [ -z "$uncommitted_code" ]; then
-  echo -e "Would you like to amend the changes to last commit (`git log HEAD --oneline | head -1`)? (y/n): \c"
-  read to_amend
-
-  if [ "$to_amend" == "y" ]
-  then
-    git commit -a --amend --reuse-message HEAD
-    echo "Amended to last commit"
-  fi
-fi
diff --git a/src/rocksdb/build_tools/mac-install-gflags.sh b/src/rocksdb/build_tools/mac-install-gflags.sh
deleted file mode 100755
index ef0339c..0000000
--- a/src/rocksdb/build_tools/mac-install-gflags.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-# Install gflags for mac developers.
-
-set -e
-
-DIR=`mktemp -d /tmp/rocksdb_gflags_XXXX`
-
-cd $DIR
-wget https://gflags.googlecode.com/files/gflags-2.0.tar.gz
-tar xvfz gflags-2.0.tar.gz
-cd gflags-2.0
-
-./configure
-make
-make install
-
-# Add include/lib path for g++
-echo 'export LIBRARY_PATH+=":/usr/local/lib"' >> ~/.bash_profile
-echo 'export CPATH+=":/usr/local/include"' >> ~/.bash_profile
-
-echo ""
-echo "-----------------------------------------------------------------------------"
-echo "|                         Installation Completed                            |"
-echo "-----------------------------------------------------------------------------"
-echo "Please run `. ~/bash_profile` to be able to compile with gflags"
diff --git a/src/rocksdb/build_tools/make_new_version.sh b/src/rocksdb/build_tools/make_new_version.sh
deleted file mode 100755
index a8d524f..0000000
--- a/src/rocksdb/build_tools/make_new_version.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-#  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-#  This source code is licensed under the BSD-style license found in the
-#  LICENSE file in the root directory of this source tree. An additional grant
-#  of patent rights can be found in the PATENTS file in the same directory.
-
-set -e
-if [ -z "$GIT" ]
-then
-  GIT="git"
-fi
-
-# Print out the colored progress info so that it can be brainlessly 
-# distinguished by users.
-function title() {
-  echo -e "\033[1;32m$*\033[0m"
-}
-
-usage="Create new RocksDB version and prepare it for the release process\n"
-usage+="USAGE: ./make_new_version.sh <version>"
-
-# -- Pre-check
-if [[ $# < 1 ]]; then
-  echo -e $usage
-  exit 1
-fi
-
-ROCKSDB_VERSION=$1
-
-GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
-echo $GIT_BRANCH
-
-if [ $GIT_BRANCH != "master" ]; then
-  echo "Error: Current branch is '$GIT_BRANCH', Please switch to master branch."
-  exit 1
-fi
-
-title "Adding new tag for this release ..."
-BRANCH="$ROCKSDB_VERSION.fb"
-$GIT co -b $BRANCH
-
-# Setting up the proxy for remote repo access
-title "Pushing new branch to remote repo ..."
-git push origin --set-upstream $BRANCH
-
-title "Branch $BRANCH is pushed to github;"
diff --git a/src/rocksdb/build_tools/regression_build_test.sh b/src/rocksdb/build_tools/regression_build_test.sh
deleted file mode 100755
index 58766f5..0000000
--- a/src/rocksdb/build_tools/regression_build_test.sh
+++ /dev/null
@@ -1,330 +0,0 @@
-#!/bin/bash
-
-set -e
-
-NUM=10000000
-
-if [ $# -eq 1 ];then
-  DATA_DIR=$1
-elif [ $# -eq 2 ];then
-  DATA_DIR=$1
-  STAT_FILE=$2
-fi
-
-# On the production build servers, set data and stat
-# files/directories not in /tmp or else the tempdir cleaning
-# scripts will make you very unhappy.
-DATA_DIR=${DATA_DIR:-$(mktemp -t -d rocksdb_XXXX)}
-STAT_FILE=${STAT_FILE:-$(mktemp -t -u rocksdb_test_stats_XXXX)}
-
-function cleanup {
-  rm -rf $DATA_DIR
-  rm -f $STAT_FILE.fillseq
-  rm -f $STAT_FILE.readrandom
-  rm -f $STAT_FILE.overwrite
-  rm -f $STAT_FILE.memtablefillreadrandom
-}
-
-trap cleanup EXIT
-
-if [ -z $GIT_BRANCH ]; then
-  git_br=`git rev-parse --abbrev-ref HEAD`
-else
-  git_br=$(basename $GIT_BRANCH)
-fi
-
-if [ $git_br == "master" ]; then
-  git_br=""
-else
-  git_br="."$git_br
-fi
-
-make release
-
-# measure fillseq + fill up the DB for overwrite benchmark
-./db_bench \
-    --benchmarks=fillseq \
-    --db=$DATA_DIR \
-    --use_existing_db=0 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --writes=$NUM \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0  > ${STAT_FILE}.fillseq
-
-# measure overwrite performance
-./db_bench \
-    --benchmarks=overwrite \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --writes=$((NUM / 10)) \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6  \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=8 > ${STAT_FILE}.overwrite
-
-# fill up the db for readrandom benchmark (1GB total size)
-./db_bench \
-    --benchmarks=fillseq \
-    --db=$DATA_DIR \
-    --use_existing_db=0 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --writes=$NUM \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=1 > /dev/null
-
-# measure readrandom with 6GB block cache
-./db_bench \
-    --benchmarks=readrandom \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --reads=$((NUM / 5)) \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > ${STAT_FILE}.readrandom
-
-# measure readrandom with 6GB block cache and tailing iterator
-./db_bench \
-    --benchmarks=readrandom \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --reads=$((NUM / 5)) \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --use_tailing_iterator=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > ${STAT_FILE}.readrandomtailing
-
-# measure readrandom with 100MB block cache
-./db_bench \
-    --benchmarks=readrandom \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --reads=$((NUM / 5)) \
-    --cache_size=104857600 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > ${STAT_FILE}.readrandomsmallblockcache
-
-# measure readrandom with 8k data in memtable
-./db_bench \
-    --benchmarks=overwrite,readrandom \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$NUM \
-    --reads=$((NUM / 5)) \
-    --writes=512 \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --write_buffer_size=1000000000 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > ${STAT_FILE}.readrandom_mem_sst
-
-
-# fill up the db for readrandom benchmark with filluniquerandom (1GB total size)
-./db_bench \
-    --benchmarks=filluniquerandom \
-    --db=$DATA_DIR \
-    --use_existing_db=0 \
-    --bloom_bits=10 \
-    --num=$((NUM / 4)) \
-    --writes=$((NUM / 4)) \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=1 > /dev/null
-
-# dummy test just to compact the data
-./db_bench \
-    --benchmarks=readrandom \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$((NUM / 1000)) \
-    --reads=$((NUM / 1000)) \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > /dev/null
-
-# measure readrandom after load with filluniquerandom with 6GB block cache
-./db_bench \
-    --benchmarks=readrandom \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$((NUM / 4)) \
-    --reads=$((NUM / 4)) \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --disable_auto_compactions=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > ${STAT_FILE}.readrandom_filluniquerandom
-
-# measure readwhilewriting after load with filluniquerandom with 6GB block cache
-./db_bench \
-    --benchmarks=readwhilewriting \
-    --db=$DATA_DIR \
-    --use_existing_db=1 \
-    --bloom_bits=10 \
-    --num=$((NUM / 4)) \
-    --reads=$((NUM / 4)) \
-    --writes_per_second=1000 \
-    --write_buffer_size=100000000 \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --threads=16 > ${STAT_FILE}.readwhilewriting
-
-# measure memtable performance -- none of the data gets flushed to disk
-./db_bench \
-    --benchmarks=fillrandom,readrandom, \
-    --db=$DATA_DIR \
-    --use_existing_db=0 \
-    --num=$((NUM / 10)) \
-    --reads=$NUM \
-    --cache_size=6442450944 \
-    --cache_numshardbits=6 \
-    --table_cache_numshardbits=4 \
-    --write_buffer_size=1000000000 \
-    --open_files=55000 \
-    --disable_seek_compaction=1 \
-    --statistics=1 \
-    --histogram=1 \
-    --disable_data_sync=1 \
-    --disable_wal=1 \
-    --sync=0 \
-    --value_size=10 \
-    --threads=16 > ${STAT_FILE}.memtablefillreadrandom
-
-# send data to ods
-function send_to_ods {
-  key="$1"
-  value="$2"
-
-  if [ -z $JENKINS_HOME ]; then
-    # running on devbox, just print out the values
-    echo $1 $2
-    return
-  fi
-
-  if [ -z "$value" ];then
-    echo >&2 "ERROR: Key $key doesn't have a value."
-    return
-  fi
-  curl -s "https://www.intern.facebook.com/intern/agent/ods_set.php?entity=rocksdb_build$git_br&key=$key&value=$value" \
-    --connect-timeout 60
-}
-
-function send_benchmark_to_ods {
-  bench="$1"
-  bench_key="$2"
-  file="$3"
-
-  QPS=$(grep $bench $file | awk '{print $5}')
-  P50_MICROS=$(grep $bench $file -A 4 | tail -n1 | awk '{print $3}' )
-  P75_MICROS=$(grep $bench $file -A 4 | tail -n1 | awk '{print $5}' )
-  P99_MICROS=$(grep $bench $file -A 4 | tail -n1 | awk '{print $7}' )
-
-  send_to_ods rocksdb.build.$bench_key.qps $QPS
-  send_to_ods rocksdb.build.$bench_key.p50_micros $P50_MICROS
-  send_to_ods rocksdb.build.$bench_key.p75_micros $P75_MICROS
-  send_to_ods rocksdb.build.$bench_key.p99_micros $P99_MICROS
-}
-
-send_benchmark_to_ods overwrite overwrite $STAT_FILE.overwrite
-send_benchmark_to_ods fillseq fillseq $STAT_FILE.fillseq
-send_benchmark_to_ods readrandom readrandom $STAT_FILE.readrandom
-send_benchmark_to_ods readrandom readrandom_tailing $STAT_FILE.readrandomtailing
-send_benchmark_to_ods readrandom readrandom_smallblockcache $STAT_FILE.readrandomsmallblockcache
-send_benchmark_to_ods readrandom readrandom_memtable_sst $STAT_FILE.readrandom_mem_sst
-send_benchmark_to_ods readrandom readrandom_fillunique_random $STAT_FILE.readrandom_filluniquerandom
-send_benchmark_to_ods fillrandom memtablefillrandom $STAT_FILE.memtablefillreadrandom
-send_benchmark_to_ods readrandom memtablereadrandom $STAT_FILE.memtablefillreadrandom
-send_benchmark_to_ods readwhilewriting readwhilewriting $STAT_FILE.readwhilewriting
diff --git a/src/rocksdb/build_tools/valgrind_test.sh b/src/rocksdb/build_tools/valgrind_test.sh
deleted file mode 100755
index 8c7e521..0000000
--- a/src/rocksdb/build_tools/valgrind_test.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-#A shell script for Jenknis to run valgrind on rocksdb tests
-#Returns 0 on success when there are no failed tests 
-
-VALGRIND_DIR=build_tools/VALGRIND_LOGS
-make clean
-make -j$(nproc) valgrind_check
-NUM_FAILED_TESTS=$((`wc -l $VALGRIND_DIR/valgrind_failed_tests | awk '{print $1}'` - 1))
-if [ $NUM_FAILED_TESTS -lt 1 ]; then
-  echo No tests have valgrind errors
-  exit 0
-else
-  cat $VALGRIND_DIR/valgrind_failed_tests
-  exit 1
-fi
diff --git a/src/rocksdb/configure.ac b/src/rocksdb/configure.ac
deleted file mode 100644
index 855c6a8..0000000
--- a/src/rocksdb/configure.ac
+++ /dev/null
@@ -1,80 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.59])
-AC_INIT([rockdb], [3.0])
-AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-LT_INIT
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-AC_LANG_CPLUSPLUS
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile])
-
-AC_CHECK_LIB([snappy], [snappy_compress], [HAVE_LIBSNAPPY=yes], [AC_MSG_FAILURE([libsnappy not found])])
-AC_CHECK_LIB([z], [gzread], [HAVE_LIBZ=yes], [AC_MSG_FAILURE([libz not found])])
-AC_CHECK_LIB([bz2], [BZ2_bzCompressInit], [HAVE_LIBBZ2=yes], [AC_MSG_FAILURE([libbz2 not found])])
-AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT=yes], [AC_MSG_FAILURE([librt not found])])
-AC_CHECK_LIB([tcmalloc], [malloc],  [HAVE_LIBTCMALLOC=yes],[AC_MSG_FAILURE([no tcmalloc found ])])
-
-OLD_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -std=c++11"
-
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <atomic>
-int main() {}
-])], [
-     HAVE_ATOMIC=yes
-   ],
-   [
-     HAVE_ATOMIC=no
-   ])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <gflags/gflags.h>
-using namespace gflags;
-int main() {}
-])], [
-     HAVE_GFLAGS_GFLAGS=yes
-   ],
-   [
-     HAVE_GFLAGS_GFLAGS=no
-   ])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <gflags/gflags.h>
-using namespace google;
-int main() {}
-])], [
-     HAVE_GOOGLE_GFLAGS=yes
-   ],
-   [
-     HAVE_GOOGLE_GFLAGS=no
-   ])
-
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <fcntl.h>
-      int main() {
-        int fd = open("/dev/null", 0);
-        fallocate(fd, 0, 0, 1024);
-      }
-])], [
-     HAVE_FALLOCATE=yes
-   ],
-   [
-     HAVE_FALLOCATE=no
-   ])
-
-AM_CONDITIONAL(WITH_TCMALLOC, [test x"$HAVE_LIBTCMALLOC" = "xyes"])
-AM_CONDITIONAL(WITH_ATOMIC, [test x"$HAVE_ATOMIC" = "xyes"])
-AM_CONDITIONAL(WITH_SNAPPY, [test x"$HAVE_LIBSNAPPY" = "xyes"])
-AM_CONDITIONAL(WITH_Z, [test x"$HAVE_LIBZ" = "xyes" ])
-AM_CONDITIONAL(WITH_BZ2, [test x"$HAVE_LIBBZ2" = "xyes"])
-AM_CONDITIONAL(WITH_RT, [test x"$HAVE_LIBRT" = "xyes"])
-AM_CONDITIONAL(WITH_GOOGLE_FLAGS, [test x"$HAVE_GFLAGS_GFLAGS" = "xyes"])
-AM_CONDITIONAL(WITH_GFLAGS_FLAGS, [test x"$HAVE_GOOGLE_GFLAGS" = "xyes"])
-AM_CONDITIONAL(WITH_FALLOCATE, [test x"$HAVE_FALLOCATE" = "xyes"])
-
-AC_OUTPUT
diff --git a/src/rocksdb/coverage/coverage_test.sh b/src/rocksdb/coverage/coverage_test.sh
deleted file mode 100755
index 08dbd05..0000000
--- a/src/rocksdb/coverage/coverage_test.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-
-# Exit on error.
-set -e
-
-if [ -n "$USE_CLANG" ]; then
-  echo "Error: Coverage test is supported only for gcc."
-  exit 1
-fi
-
-ROOT=".."
-# Fetch right version of gcov
-if [ -d /mnt/gvfs/third-party -a -z "$CXX" ]; then
-  source $ROOT/build_tools/fbcode.gcc471.sh
-  GCOV=$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.7.1/cc6c9dc/bin/gcov
-else
-  GCOV=$(which gcov)
-fi
-
-COVERAGE_DIR="$PWD/COVERAGE_REPORT"
-mkdir -p $COVERAGE_DIR
-
-# Find all gcno files to generate the coverage report
-
-GCNO_FILES=`find $ROOT -name "*.gcno"`
-$GCOV --preserve-paths --relative-only --no-output $GCNO_FILES 2>/dev/null |
-  # Parse the raw gcov report to more human readable form.
-  python $ROOT/coverage/parse_gcov_output.py |
-  # Write the output to both stdout and report file.
-  tee $COVERAGE_DIR/coverage_report_all.txt &&
-echo -e "Generated coverage report for all files: $COVERAGE_DIR/coverage_report_all.txt\n"
-
-# TODO: we also need to get the files of the latest commits.
-# Get the most recently committed files.
-LATEST_FILES=`
-  git show --pretty="format:" --name-only HEAD |
-  grep -v "^$" |
-  paste -s -d,`
-RECENT_REPORT=$COVERAGE_DIR/coverage_report_recent.txt
-
-echo -e "Recently updated files: $LATEST_FILES\n" > $RECENT_REPORT
-$GCOV --preserve-paths --relative-only --no-output $GCNO_FILES 2>/dev/null |
-  python $ROOT/coverage/parse_gcov_output.py -interested-files $LATEST_FILES |
-  tee -a $RECENT_REPORT &&
-echo -e "Generated coverage report for recently updated files: $RECENT_REPORT\n"
-
-# Unless otherwise specified, we'll not generate html report by default
-if [ -z "$HTML" ]; then
-  exit 0
-fi
-
-# Generate the html report. If we cannot find lcov in this machine, we'll simply
-# skip this step.
-echo "Generating the html coverage report..."
-
-LCOV=$(which lcov || true 2>/dev/null)
-if [ -z $LCOV ]
-then
-  echo "Skip: Cannot find lcov to generate the html report."
-  exit 0
-fi
-
-LCOV_VERSION=$(lcov -v | grep 1.1 || true)
-if [ $LCOV_VERSION ]
-then
-  echo "Not supported lcov version. Expect lcov 1.1."
-  exit 0
-fi
-
-(cd $ROOT; lcov --no-external \
-     --capture  \
-     --directory $PWD \
-     --gcov-tool $GCOV \
-     --output-file $COVERAGE_DIR/coverage.info)
-
-genhtml $COVERAGE_DIR/coverage.info -o $COVERAGE_DIR
-
-echo "HTML Coverage report is generated in $COVERAGE_DIR"
diff --git a/src/rocksdb/coverage/parse_gcov_output.py b/src/rocksdb/coverage/parse_gcov_output.py
deleted file mode 100644
index 72e8b07..0000000
--- a/src/rocksdb/coverage/parse_gcov_output.py
+++ /dev/null
@@ -1,118 +0,0 @@
-import optparse
-import re
-import sys
-
-from optparse import OptionParser
-
-# the gcov report follows certain pattern. Each file will have two lines
-# of report, from which we can extract the file name, total lines and coverage
-# percentage.
-def parse_gcov_report(gcov_input):
-    per_file_coverage = {}
-    total_coverage = None
-
-    for line in sys.stdin:
-        line = line.strip()
-
-        # --First line of the coverage report (with file name in it)?
-        match_obj = re.match("^File '(.*)'$", line)
-        if match_obj:
-            # fetch the file name from the first line of the report.
-            current_file = match_obj.group(1)
-            continue
-
-        # -- Second line of the file report (with coverage percentage)
-        match_obj = re.match("^Lines executed:(.*)% of (.*)", line)
-
-        if match_obj:
-            coverage = float(match_obj.group(1))
-            lines = int(match_obj.group(2))
-
-            if current_file is not None:
-                per_file_coverage[current_file] = (coverage, lines)
-                current_file = None
-            else:
-                # If current_file is not set, we reach the last line of report,
-                # which contains the summarized coverage percentage.
-                total_coverage = (coverage, lines)
-            continue
-
-        # If the line's pattern doesn't fall into the above categories. We
-        # can simply ignore them since they're either empty line or doesn't
-        # find executable lines of the given file.
-        current_file = None
-
-    return per_file_coverage, total_coverage
-
-def get_option_parser():
-    usage = "Parse the gcov output and generate more human-readable code " +\
-            "coverage report."
-    parser = OptionParser(usage)
-
-    parser.add_option(
-        "--interested-files", "-i",
-        dest="filenames",
-        help="Comma separated files names. if specified, we will display " +
-             "the coverage report only for interested source files. " +
-             "Otherwise we will display the coverage report for all " +
-             "source files."
-    )
-    return parser
-
-def display_file_coverage(per_file_coverage, total_coverage):
-    # To print out auto-adjustable column, we need to know the longest
-    # length of file names.
-    max_file_name_length = max(
-        len(fname) for fname in per_file_coverage.keys()
-    )
-
-    # -- Print header
-    # size of separator is determined by 3 column sizes:
-    # file name, coverage percentage and lines.
-    header_template = \
-        "%" + str(max_file_name_length) + "s\t%s\t%s"
-    separator = "-" * (max_file_name_length + 10 + 20)
-    print header_template % ("Filename", "Coverage", "Lines")
-    print separator
-
-    # -- Print body
-    # template for printing coverage report for each file.
-    record_template = "%" + str(max_file_name_length) + "s\t%5.2f%%\t%10d"
-
-    for fname, coverage_info in per_file_coverage.items():
-        coverage, lines = coverage_info
-        print record_template % (fname, coverage, lines)
-
-    # -- Print footer
-    if total_coverage:
-        print separator
-        print record_template % ("Total", total_coverage[0], total_coverage[1])
-
-def report_coverage():
-    parser = get_option_parser()
-    (options, args) = parser.parse_args()
-
-    interested_files = set()
-    if options.filenames is not None:
-        interested_files = set(f.strip() for f in options.filenames.split(','))
-
-    # To make things simple, right now we only read gcov report from the input
-    per_file_coverage, total_coverage = parse_gcov_report(sys.stdin)
-
-    # Check if we need to display coverage info for interested files.
-    if len(interested_files):
-        per_file_coverage = dict(
-            (fname, per_file_coverage[fname]) for fname in interested_files
-            if fname in per_file_coverage
-        )
-        # If we only interested in several files, it makes no sense to report
-        # the total_coverage
-        total_coverage = None
-
-    if not len(per_file_coverage):
-        print >> sys.stderr, "Cannot find coverage info for the given files."
-        return
-    display_file_coverage(per_file_coverage, total_coverage)
-
-if __name__ == "__main__":
-    report_coverage()
diff --git a/src/rocksdb/db/builder.cc b/src/rocksdb/db/builder.cc
deleted file mode 100644
index ce85ae5..0000000
--- a/src/rocksdb/db/builder.cc
+++ /dev/null
@@ -1,224 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/builder.h"
-
-#include "db/dbformat.h"
-#include "db/filename.h"
-#include "db/merge_helper.h"
-#include "db/table_cache.h"
-#include "db/version_edit.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-#include "rocksdb/table.h"
-#include "table/block_based_table_builder.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-class TableFactory;
-
-TableBuilder* NewTableBuilder(const Options& options,
-                              const InternalKeyComparator& internal_comparator,
-                              WritableFile* file,
-                              CompressionType compression_type) {
-  return options.table_factory->NewTableBuilder(options, internal_comparator,
-                                                file, compression_type);
-}
-
-Status BuildTable(const std::string& dbname, Env* env, const Options& options,
-                  const EnvOptions& soptions, TableCache* table_cache,
-                  Iterator* iter, FileMetaData* meta,
-                  const InternalKeyComparator& internal_comparator,
-                  const SequenceNumber newest_snapshot,
-                  const SequenceNumber earliest_seqno_in_memtable,
-                  const CompressionType compression) {
-  Status s;
-  meta->file_size = 0;
-  meta->smallest_seqno = meta->largest_seqno = 0;
-  iter->SeekToFirst();
-
-  // If the sequence number of the smallest entry in the memtable is
-  // smaller than the most recent snapshot, then we do not trigger
-  // removal of duplicate/deleted keys as part of this builder.
-  bool purge = options.purge_redundant_kvs_while_flush;
-  if (earliest_seqno_in_memtable <= newest_snapshot) {
-    purge = false;
-  }
-
-  std::string fname = TableFileName(dbname, meta->number);
-  if (iter->Valid()) {
-    unique_ptr<WritableFile> file;
-    s = env->NewWritableFile(fname, &file, soptions);
-    if (!s.ok()) {
-      return s;
-    }
-
-    TableBuilder* builder =
-        NewTableBuilder(options, internal_comparator, file.get(), compression);
-
-    // the first key is the smallest key
-    Slice key = iter->key();
-    meta->smallest.DecodeFrom(key);
-    meta->smallest_seqno = GetInternalKeySeqno(key);
-    meta->largest_seqno = meta->smallest_seqno;
-
-    MergeHelper merge(internal_comparator.user_comparator(),
-                      options.merge_operator.get(), options.info_log.get(),
-                      options.min_partial_merge_operands,
-                      true /* internal key corruption is not ok */);
-
-    if (purge) {
-      // Ugly walkaround to avoid compiler error for release build
-      bool ok __attribute__((unused)) = true;
-
-      // Will write to builder if current key != prev key
-      ParsedInternalKey prev_ikey;
-      std::string prev_key;
-      bool is_first_key = true;    // Also write if this is the very first key
-
-      while (iter->Valid()) {
-        bool iterator_at_next = false;
-
-        // Get current key
-        ParsedInternalKey this_ikey;
-        Slice key = iter->key();
-        Slice value = iter->value();
-
-        // In-memory key corruption is not ok;
-        // TODO: find a clean way to treat in memory key corruption
-        ok = ParseInternalKey(key, &this_ikey);
-        assert(ok);
-        assert(this_ikey.sequence >= earliest_seqno_in_memtable);
-
-        // If the key is the same as the previous key (and it is not the
-        // first key), then we skip it, since it is an older version.
-        // Otherwise we output the key and mark it as the "new" previous key.
-        if (!is_first_key && !internal_comparator.user_comparator()->Compare(
-                                  prev_ikey.user_key, this_ikey.user_key)) {
-          // seqno within the same key are in decreasing order
-          assert(this_ikey.sequence < prev_ikey.sequence);
-        } else {
-          is_first_key = false;
-
-          if (this_ikey.type == kTypeMerge) {
-            // Handle merge-type keys using the MergeHelper
-            // TODO: pass statistics to MergeUntil
-            merge.MergeUntil(iter, 0 /* don't worry about snapshot */);
-            iterator_at_next = true;
-            if (merge.IsSuccess()) {
-              // Merge completed correctly.
-              // Add the resulting merge key/value and continue to next
-              builder->Add(merge.key(), merge.value());
-              prev_key.assign(merge.key().data(), merge.key().size());
-              ok = ParseInternalKey(Slice(prev_key), &prev_ikey);
-              assert(ok);
-            } else {
-              // Merge did not find a Put/Delete.
-              // Can not compact these merges into a kValueType.
-              // Write them out one-by-one. (Proceed back() to front())
-              const std::deque<std::string>& keys = merge.keys();
-              const std::deque<std::string>& values = merge.values();
-              assert(keys.size() == values.size() && keys.size() >= 1);
-              std::deque<std::string>::const_reverse_iterator key_iter;
-              std::deque<std::string>::const_reverse_iterator value_iter;
-              for (key_iter=keys.rbegin(), value_iter = values.rbegin();
-                   key_iter != keys.rend() && value_iter != values.rend();
-                   ++key_iter, ++value_iter) {
-
-                builder->Add(Slice(*key_iter), Slice(*value_iter));
-              }
-
-              // Sanity check. Both iterators should end at the same time
-              assert(key_iter == keys.rend() && value_iter == values.rend());
-
-              prev_key.assign(keys.front());
-              ok = ParseInternalKey(Slice(prev_key), &prev_ikey);
-              assert(ok);
-            }
-          } else {
-            // Handle Put/Delete-type keys by simply writing them
-            builder->Add(key, value);
-            prev_key.assign(key.data(), key.size());
-            ok = ParseInternalKey(Slice(prev_key), &prev_ikey);
-            assert(ok);
-          }
-        }
-
-        if (!iterator_at_next) iter->Next();
-      }
-
-      // The last key is the largest key
-      meta->largest.DecodeFrom(Slice(prev_key));
-      SequenceNumber seqno = GetInternalKeySeqno(Slice(prev_key));
-      meta->smallest_seqno = std::min(meta->smallest_seqno, seqno);
-      meta->largest_seqno = std::max(meta->largest_seqno, seqno);
-
-    } else {
-      for (; iter->Valid(); iter->Next()) {
-        Slice key = iter->key();
-        meta->largest.DecodeFrom(key);
-        builder->Add(key, iter->value());
-        SequenceNumber seqno = GetInternalKeySeqno(key);
-        meta->smallest_seqno = std::min(meta->smallest_seqno, seqno);
-        meta->largest_seqno = std::max(meta->largest_seqno, seqno);
-      }
-    }
-
-    // Finish and check for builder errors
-    if (s.ok()) {
-      s = builder->Finish();
-      if (s.ok()) {
-        meta->file_size = builder->FileSize();
-        assert(meta->file_size > 0);
-      }
-    } else {
-      builder->Abandon();
-    }
-    delete builder;
-
-    // Finish and check for file errors
-    if (s.ok() && !options.disableDataSync) {
-      if (options.use_fsync) {
-        StopWatch sw(env, options.statistics.get(), TABLE_SYNC_MICROS);
-        s = file->Fsync();
-      } else {
-        StopWatch sw(env, options.statistics.get(), TABLE_SYNC_MICROS);
-        s = file->Sync();
-      }
-    }
-    if (s.ok()) {
-      s = file->Close();
-    }
-
-    if (s.ok()) {
-      // Verify that the table is usable
-      Iterator* it = table_cache->NewIterator(ReadOptions(), soptions,
-                                              internal_comparator, *meta);
-      s = it->status();
-      delete it;
-    }
-  }
-
-  // Check for input iterator errors
-  if (!iter->status().ok()) {
-    s = iter->status();
-  }
-
-  if (s.ok() && meta->file_size > 0) {
-    // Keep it
-  } else {
-    env->DeleteFile(fname);
-  }
-  return s;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/builder.h b/src/rocksdb/db/builder.h
deleted file mode 100644
index 6301629..0000000
--- a/src/rocksdb/db/builder.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#pragma once
-#include "rocksdb/comparator.h"
-#include "rocksdb/status.h"
-#include "rocksdb/types.h"
-#include "rocksdb/options.h"
-
-namespace rocksdb {
-
-struct Options;
-struct FileMetaData;
-
-class Env;
-struct EnvOptions;
-class Iterator;
-class TableCache;
-class VersionEdit;
-class TableBuilder;
-class WritableFile;
-
-extern TableBuilder* NewTableBuilder(
-    const Options& options, const InternalKeyComparator& internal_comparator,
-    WritableFile* file, CompressionType compression_type);
-
-// Build a Table file from the contents of *iter.  The generated file
-// will be named according to meta->number.  On success, the rest of
-// *meta will be filled with metadata about the generated table.
-// If no data is present in *iter, meta->file_size will be set to
-// zero, and no Table file will be produced.
-extern Status BuildTable(const std::string& dbname, Env* env,
-                         const Options& options, const EnvOptions& soptions,
-                         TableCache* table_cache, Iterator* iter,
-                         FileMetaData* meta,
-                         const InternalKeyComparator& internal_comparator,
-                         const SequenceNumber newest_snapshot,
-                         const SequenceNumber earliest_seqno_in_memtable,
-                         const CompressionType compression);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/c.cc b/src/rocksdb/db/c.cc
deleted file mode 100644
index b50e59e..0000000
--- a/src/rocksdb/db/c.cc
+++ /dev/null
@@ -1,1476 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-
-#include "rocksdb/c.h"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include "rocksdb/cache.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/options.h"
-#include "rocksdb/status.h"
-#include "rocksdb/write_batch.h"
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/universal_compaction.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-
-using rocksdb::Cache;
-using rocksdb::Comparator;
-using rocksdb::CompressionType;
-using rocksdb::DB;
-using rocksdb::Env;
-using rocksdb::InfoLogLevel;
-using rocksdb::FileLock;
-using rocksdb::FilterPolicy;
-using rocksdb::FlushOptions;
-using rocksdb::Iterator;
-using rocksdb::Logger;
-using rocksdb::MergeOperator;
-using rocksdb::NewBloomFilterPolicy;
-using rocksdb::NewLRUCache;
-using rocksdb::Options;
-using rocksdb::RandomAccessFile;
-using rocksdb::Range;
-using rocksdb::ReadOptions;
-using rocksdb::SequentialFile;
-using rocksdb::Slice;
-using rocksdb::SliceTransform;
-using rocksdb::Snapshot;
-using rocksdb::Status;
-using rocksdb::WritableFile;
-using rocksdb::WriteBatch;
-using rocksdb::WriteOptions;
-using rocksdb::LiveFileMetaData;
-
-using std::shared_ptr;
-
-extern "C" {
-
-struct rocksdb_t                 { DB*               rep; };
-struct rocksdb_iterator_t        { Iterator*         rep; };
-struct rocksdb_writebatch_t      { WriteBatch        rep; };
-struct rocksdb_snapshot_t        { const Snapshot*   rep; };
-struct rocksdb_flushoptions_t    { FlushOptions      rep; };
-struct rocksdb_readoptions_t     { ReadOptions       rep; };
-struct rocksdb_writeoptions_t    { WriteOptions      rep; };
-struct rocksdb_options_t         { Options           rep; };
-struct rocksdb_seqfile_t         { SequentialFile*   rep; };
-struct rocksdb_randomfile_t      { RandomAccessFile* rep; };
-struct rocksdb_writablefile_t    { WritableFile*     rep; };
-struct rocksdb_filelock_t        { FileLock*         rep; };
-struct rocksdb_logger_t          { shared_ptr<Logger>  rep; };
-struct rocksdb_cache_t           { shared_ptr<Cache>   rep; };
-struct rocksdb_livefiles_t       { std::vector<LiveFileMetaData> rep; };
-
-struct rocksdb_comparator_t : public Comparator {
-  void* state_;
-  void (*destructor_)(void*);
-  int (*compare_)(
-      void*,
-      const char* a, size_t alen,
-      const char* b, size_t blen);
-  const char* (*name_)(void*);
-
-  virtual ~rocksdb_comparator_t() {
-    (*destructor_)(state_);
-  }
-
-  virtual int Compare(const Slice& a, const Slice& b) const {
-    return (*compare_)(state_, a.data(), a.size(), b.data(), b.size());
-  }
-
-  virtual const char* Name() const {
-    return (*name_)(state_);
-  }
-
-  // No-ops since the C binding does not support key shortening methods.
-  virtual void FindShortestSeparator(std::string*, const Slice&) const { }
-  virtual void FindShortSuccessor(std::string* key) const { }
-};
-
-struct rocksdb_filterpolicy_t : public FilterPolicy {
-  void* state_;
-  void (*destructor_)(void*);
-  const char* (*name_)(void*);
-  char* (*create_)(
-      void*,
-      const char* const* key_array, const size_t* key_length_array,
-      int num_keys,
-      size_t* filter_length);
-  unsigned char (*key_match_)(
-      void*,
-      const char* key, size_t length,
-      const char* filter, size_t filter_length);
-  void (*delete_filter_)(
-      void*,
-      const char* filter, size_t filter_length);
-
-  virtual ~rocksdb_filterpolicy_t() {
-    (*destructor_)(state_);
-  }
-
-  virtual const char* Name() const {
-    return (*name_)(state_);
-  }
-
-  virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const {
-    std::vector<const char*> key_pointers(n);
-    std::vector<size_t> key_sizes(n);
-    for (int i = 0; i < n; i++) {
-      key_pointers[i] = keys[i].data();
-      key_sizes[i] = keys[i].size();
-    }
-    size_t len;
-    char* filter = (*create_)(state_, &key_pointers[0], &key_sizes[0], n, &len);
-    dst->append(filter, len);
-
-    if (delete_filter_ != nullptr) {
-      (*delete_filter_)(state_, filter, len);
-    } else {
-      free(filter);
-    }
-  }
-
-  virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const {
-    return (*key_match_)(state_, key.data(), key.size(),
-                         filter.data(), filter.size());
-  }
-};
-
-struct rocksdb_mergeoperator_t : public MergeOperator {
-  void* state_;
-  void (*destructor_)(void*);
-  const char* (*name_)(void*);
-  char* (*full_merge_)(
-      void*,
-      const char* key, size_t key_length,
-      const char* existing_value, size_t existing_value_length,
-      const char* const* operands_list, const size_t* operands_list_length,
-      int num_operands,
-      unsigned char* success, size_t* new_value_length);
-  char* (*partial_merge_)(void*, const char* key, size_t key_length,
-                          const char* const* operands_list,
-                          const size_t* operands_list_length, int num_operands,
-                          unsigned char* success, size_t* new_value_length);
-  void (*delete_value_)(
-      void*,
-      const char* value, size_t value_length);
-
-  virtual ~rocksdb_mergeoperator_t() {
-    (*destructor_)(state_);
-  }
-
-  virtual const char* Name() const {
-    return (*name_)(state_);
-  }
-
-  virtual bool FullMerge(
-      const Slice& key,
-      const Slice* existing_value,
-      const std::deque<std::string>& operand_list,
-      std::string* new_value,
-      Logger* logger) const {
-
-    size_t n = operand_list.size();
-    std::vector<const char*> operand_pointers(n);
-    std::vector<size_t> operand_sizes(n);
-    for (size_t i = 0; i < n; i++) {
-      Slice operand(operand_list[i]);
-      operand_pointers[i] = operand.data();
-      operand_sizes[i] = operand.size();
-    }
-
-    const char* existing_value_data = nullptr;
-    size_t existing_value_len = 0;
-    if (existing_value != nullptr) {
-      existing_value_data = existing_value->data();
-      existing_value_len = existing_value->size();
-    }
-
-    unsigned char success;
-    size_t new_value_len;
-    char* tmp_new_value = (*full_merge_)(
-        state_,
-        key.data(), key.size(),
-        existing_value_data, existing_value_len,
-        &operand_pointers[0], &operand_sizes[0], n,
-        &success, &new_value_len);
-    new_value->assign(tmp_new_value, new_value_len);
-
-    if (delete_value_ != nullptr) {
-      (*delete_value_)(state_, tmp_new_value, new_value_len);
-    } else {
-      free(tmp_new_value);
-    }
-
-    return success;
-  }
-
-  virtual bool PartialMergeMulti(const Slice& key,
-                                 const std::deque<Slice>& operand_list,
-                                 std::string* new_value, Logger* logger) const {
-    size_t operand_count = operand_list.size();
-    std::vector<const char*> operand_pointers(operand_count);
-    std::vector<size_t> operand_sizes(operand_count);
-    for (size_t i = 0; i < operand_count; ++i) {
-      Slice operand(operand_list[i]);
-      operand_pointers[i] = operand.data();
-      operand_sizes[i] = operand.size();
-    }
-
-    unsigned char success;
-    size_t new_value_len;
-    char* tmp_new_value = (*partial_merge_)(
-        state_, key.data(), key.size(), &operand_pointers[0], &operand_sizes[0],
-        operand_count, &success, &new_value_len);
-    new_value->assign(tmp_new_value, new_value_len);
-
-    if (delete_value_ != nullptr) {
-      (*delete_value_)(state_, tmp_new_value, new_value_len);
-    } else {
-      free(tmp_new_value);
-    }
-
-    return success;
-  }
-};
-
-struct rocksdb_env_t {
-  Env* rep;
-  bool is_default;
-};
-
-struct rocksdb_slicetransform_t : public SliceTransform {
-  void* state_;
-  void (*destructor_)(void*);
-  const char* (*name_)(void*);
-  char* (*transform_)(
-      void*,
-      const char* key, size_t length,
-      size_t* dst_length);
-  unsigned char (*in_domain_)(
-      void*,
-      const char* key, size_t length);
-  unsigned char (*in_range_)(
-      void*,
-      const char* key, size_t length);
-
-  virtual ~rocksdb_slicetransform_t() {
-    (*destructor_)(state_);
-  }
-
-  virtual const char* Name() const {
-    return (*name_)(state_);
-  }
-
-  virtual Slice Transform(const Slice& src) const {
-    size_t len;
-    char* dst = (*transform_)(state_, src.data(), src.size(), &len);
-    return Slice(dst, len);
-  }
-
-  virtual bool InDomain(const Slice& src) const {
-    return (*in_domain_)(state_, src.data(), src.size());
-  }
-
-  virtual bool InRange(const Slice& src) const {
-    return (*in_range_)(state_, src.data(), src.size());
-  }
-};
-
-struct rocksdb_universal_compaction_options_t {
-  rocksdb::CompactionOptionsUniversal *rep;
-};
-
-static bool SaveError(char** errptr, const Status& s) {
-  assert(errptr != nullptr);
-  if (s.ok()) {
-    return false;
-  } else if (*errptr == nullptr) {
-    *errptr = strdup(s.ToString().c_str());
-  } else {
-    // TODO(sanjay): Merge with existing error?
-    free(*errptr);
-    *errptr = strdup(s.ToString().c_str());
-  }
-  return true;
-}
-
-static char* CopyString(const std::string& str) {
-  char* result = reinterpret_cast<char*>(malloc(sizeof(char) * str.size()));
-  memcpy(result, str.data(), sizeof(char) * str.size());
-  return result;
-}
-
-rocksdb_t* rocksdb_open(
-    const rocksdb_options_t* options,
-    const char* name,
-    char** errptr) {
-  DB* db;
-  if (SaveError(errptr, DB::Open(options->rep, std::string(name), &db))) {
-    return nullptr;
-  }
-  rocksdb_t* result = new rocksdb_t;
-  result->rep = db;
-  return result;
-}
-
-rocksdb_t* rocksdb_open_for_read_only(
-    const rocksdb_options_t* options,
-    const char* name,
-    unsigned char error_if_log_file_exist,
-    char** errptr) {
-  DB* db;
-  if (SaveError(errptr, DB::OpenForReadOnly(options->rep, std::string(name), &db, error_if_log_file_exist))) {
-    return nullptr;
-  }
-  rocksdb_t* result = new rocksdb_t;
-  result->rep = db;
-  return result;
-}
-
-void rocksdb_close(rocksdb_t* db) {
-  delete db->rep;
-  delete db;
-}
-
-void rocksdb_put(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    const char* key, size_t keylen,
-    const char* val, size_t vallen,
-    char** errptr) {
-  SaveError(errptr,
-            db->rep->Put(options->rep, Slice(key, keylen), Slice(val, vallen)));
-}
-
-void rocksdb_delete(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    const char* key, size_t keylen,
-    char** errptr) {
-  SaveError(errptr, db->rep->Delete(options->rep, Slice(key, keylen)));
-}
-
-void rocksdb_merge(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    const char* key, size_t keylen,
-    const char* val, size_t vallen,
-    char** errptr) {
-  SaveError(errptr,
-            db->rep->Merge(options->rep, Slice(key, keylen), Slice(val, vallen)));
-}
-
-void rocksdb_write(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    rocksdb_writebatch_t* batch,
-    char** errptr) {
-  SaveError(errptr, db->rep->Write(options->rep, &batch->rep));
-}
-
-char* rocksdb_get(
-    rocksdb_t* db,
-    const rocksdb_readoptions_t* options,
-    const char* key, size_t keylen,
-    size_t* vallen,
-    char** errptr) {
-  char* result = nullptr;
-  std::string tmp;
-  Status s = db->rep->Get(options->rep, Slice(key, keylen), &tmp);
-  if (s.ok()) {
-    *vallen = tmp.size();
-    result = CopyString(tmp);
-  } else {
-    *vallen = 0;
-    if (!s.IsNotFound()) {
-      SaveError(errptr, s);
-    }
-  }
-  return result;
-}
-
-rocksdb_iterator_t* rocksdb_create_iterator(
-    rocksdb_t* db,
-    const rocksdb_readoptions_t* options) {
-  rocksdb_iterator_t* result = new rocksdb_iterator_t;
-  result->rep = db->rep->NewIterator(options->rep);
-  return result;
-}
-
-const rocksdb_snapshot_t* rocksdb_create_snapshot(
-    rocksdb_t* db) {
-  rocksdb_snapshot_t* result = new rocksdb_snapshot_t;
-  result->rep = db->rep->GetSnapshot();
-  return result;
-}
-
-void rocksdb_release_snapshot(
-    rocksdb_t* db,
-    const rocksdb_snapshot_t* snapshot) {
-  db->rep->ReleaseSnapshot(snapshot->rep);
-  delete snapshot;
-}
-
-char* rocksdb_property_value(
-    rocksdb_t* db,
-    const char* propname) {
-  std::string tmp;
-  if (db->rep->GetProperty(Slice(propname), &tmp)) {
-    // We use strdup() since we expect human readable output.
-    return strdup(tmp.c_str());
-  } else {
-    return nullptr;
-  }
-}
-
-void rocksdb_approximate_sizes(
-    rocksdb_t* db,
-    int num_ranges,
-    const char* const* range_start_key, const size_t* range_start_key_len,
-    const char* const* range_limit_key, const size_t* range_limit_key_len,
-    uint64_t* sizes) {
-  Range* ranges = new Range[num_ranges];
-  for (int i = 0; i < num_ranges; i++) {
-    ranges[i].start = Slice(range_start_key[i], range_start_key_len[i]);
-    ranges[i].limit = Slice(range_limit_key[i], range_limit_key_len[i]);
-  }
-  db->rep->GetApproximateSizes(ranges, num_ranges, sizes);
-  delete[] ranges;
-}
-
-void rocksdb_delete_file(
-    rocksdb_t* db,
-    const char* name) {
-  db->rep->DeleteFile(name);
-}
-
-const rocksdb_livefiles_t* rocksdb_livefiles(
-    rocksdb_t* db) {
-  rocksdb_livefiles_t* result = new rocksdb_livefiles_t;
-  db->rep->GetLiveFilesMetaData(&result->rep);
-  return result;
-}
-
-void rocksdb_compact_range(
-    rocksdb_t* db,
-    const char* start_key, size_t start_key_len,
-    const char* limit_key, size_t limit_key_len) {
-  Slice a, b;
-  db->rep->CompactRange(
-      // Pass nullptr Slice if corresponding "const char*" is nullptr
-      (start_key ? (a = Slice(start_key, start_key_len), &a) : nullptr),
-      (limit_key ? (b = Slice(limit_key, limit_key_len), &b) : nullptr));
-}
-
-void rocksdb_flush(
-    rocksdb_t* db,
-    const rocksdb_flushoptions_t* options,
-    char** errptr) {
-  SaveError(errptr, db->rep->Flush(options->rep));
-}
-
-void rocksdb_disable_file_deletions(
-    rocksdb_t* db,
-    char** errptr) {
-  SaveError(errptr, db->rep->DisableFileDeletions());
-}
-
-void rocksdb_enable_file_deletions(
-    rocksdb_t* db,
-    unsigned char force,
-    char** errptr) {
-  SaveError(errptr, db->rep->EnableFileDeletions(force));
-}
-
-void rocksdb_destroy_db(
-    const rocksdb_options_t* options,
-    const char* name,
-    char** errptr) {
-  SaveError(errptr, DestroyDB(name, options->rep));
-}
-
-void rocksdb_repair_db(
-    const rocksdb_options_t* options,
-    const char* name,
-    char** errptr) {
-  SaveError(errptr, RepairDB(name, options->rep));
-}
-
-void rocksdb_iter_destroy(rocksdb_iterator_t* iter) {
-  delete iter->rep;
-  delete iter;
-}
-
-unsigned char rocksdb_iter_valid(const rocksdb_iterator_t* iter) {
-  return iter->rep->Valid();
-}
-
-void rocksdb_iter_seek_to_first(rocksdb_iterator_t* iter) {
-  iter->rep->SeekToFirst();
-}
-
-void rocksdb_iter_seek_to_last(rocksdb_iterator_t* iter) {
-  iter->rep->SeekToLast();
-}
-
-void rocksdb_iter_seek(rocksdb_iterator_t* iter, const char* k, size_t klen) {
-  iter->rep->Seek(Slice(k, klen));
-}
-
-void rocksdb_iter_next(rocksdb_iterator_t* iter) {
-  iter->rep->Next();
-}
-
-void rocksdb_iter_prev(rocksdb_iterator_t* iter) {
-  iter->rep->Prev();
-}
-
-const char* rocksdb_iter_key(const rocksdb_iterator_t* iter, size_t* klen) {
-  Slice s = iter->rep->key();
-  *klen = s.size();
-  return s.data();
-}
-
-const char* rocksdb_iter_value(const rocksdb_iterator_t* iter, size_t* vlen) {
-  Slice s = iter->rep->value();
-  *vlen = s.size();
-  return s.data();
-}
-
-void rocksdb_iter_get_error(const rocksdb_iterator_t* iter, char** errptr) {
-  SaveError(errptr, iter->rep->status());
-}
-
-rocksdb_writebatch_t* rocksdb_writebatch_create() {
-  return new rocksdb_writebatch_t;
-}
-
-void rocksdb_writebatch_destroy(rocksdb_writebatch_t* b) {
-  delete b;
-}
-
-void rocksdb_writebatch_clear(rocksdb_writebatch_t* b) {
-  b->rep.Clear();
-}
-
-int rocksdb_writebatch_count(rocksdb_writebatch_t* b) {
-  return b->rep.Count();
-}
-
-void rocksdb_writebatch_put(
-    rocksdb_writebatch_t* b,
-    const char* key, size_t klen,
-    const char* val, size_t vlen) {
-  b->rep.Put(Slice(key, klen), Slice(val, vlen));
-}
-
-void rocksdb_writebatch_merge(
-    rocksdb_writebatch_t* b,
-    const char* key, size_t klen,
-    const char* val, size_t vlen) {
-  b->rep.Merge(Slice(key, klen), Slice(val, vlen));
-}
-
-void rocksdb_writebatch_delete(
-    rocksdb_writebatch_t* b,
-    const char* key, size_t klen) {
-  b->rep.Delete(Slice(key, klen));
-}
-
-void rocksdb_writebatch_iterate(
-    rocksdb_writebatch_t* b,
-    void* state,
-    void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
-    void (*deleted)(void*, const char* k, size_t klen)) {
-  class H : public WriteBatch::Handler {
-   public:
-    void* state_;
-    void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
-    void (*deleted_)(void*, const char* k, size_t klen);
-    virtual void Put(const Slice& key, const Slice& value) {
-      (*put_)(state_, key.data(), key.size(), value.data(), value.size());
-    }
-    virtual void Delete(const Slice& key) {
-      (*deleted_)(state_, key.data(), key.size());
-    }
-  };
-  H handler;
-  handler.state_ = state;
-  handler.put_ = put;
-  handler.deleted_ = deleted;
-  b->rep.Iterate(&handler);
-}
-
-const char* rocksdb_writebatch_data(rocksdb_writebatch_t* b, size_t* size) {
-  *size = b->rep.GetDataSize();
-  return b->rep.Data().c_str();
-}
-
-rocksdb_options_t* rocksdb_options_create() {
-  return new rocksdb_options_t;
-}
-
-void rocksdb_options_destroy(rocksdb_options_t* options) {
-  delete options;
-}
-
-void rocksdb_options_set_comparator(
-    rocksdb_options_t* opt,
-    rocksdb_comparator_t* cmp) {
-  opt->rep.comparator = cmp;
-}
-
-void rocksdb_options_set_merge_operator(
-    rocksdb_options_t* opt,
-    rocksdb_mergeoperator_t* merge_operator) {
-  opt->rep.merge_operator = std::shared_ptr<MergeOperator>(merge_operator);
-}
-
-void rocksdb_options_set_filter_policy(
-    rocksdb_options_t* opt,
-    rocksdb_filterpolicy_t* policy) {
-  opt->rep.filter_policy = policy;
-}
-
-void rocksdb_options_set_create_if_missing(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.create_if_missing = v;
-}
-
-void rocksdb_options_set_error_if_exists(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.error_if_exists = v;
-}
-
-void rocksdb_options_set_paranoid_checks(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.paranoid_checks = v;
-}
-
-void rocksdb_options_set_env(rocksdb_options_t* opt, rocksdb_env_t* env) {
-  opt->rep.env = (env ? env->rep : nullptr);
-}
-
-void rocksdb_options_set_info_log(rocksdb_options_t* opt, rocksdb_logger_t* l) {
-  if (l) {
-    opt->rep.info_log = l->rep;
-  }
-}
-
-void rocksdb_options_set_info_log_level(
-    rocksdb_options_t* opt, int v) {
-  opt->rep.info_log_level = static_cast<InfoLogLevel>(v);
-}
-
-void rocksdb_options_set_write_buffer_size(rocksdb_options_t* opt, size_t s) {
-  opt->rep.write_buffer_size = s;
-}
-
-void rocksdb_options_set_max_open_files(rocksdb_options_t* opt, int n) {
-  opt->rep.max_open_files = n;
-}
-
-void rocksdb_options_set_cache(rocksdb_options_t* opt, rocksdb_cache_t* c) {
-  if (c) {
-    opt->rep.block_cache = c->rep;
-  }
-}
-
-void rocksdb_options_set_cache_compressed(rocksdb_options_t* opt, rocksdb_cache_t* c) {
-  if (c) {
-    opt->rep.block_cache_compressed = c->rep;
-  }
-}
-
-void rocksdb_options_set_block_size(rocksdb_options_t* opt, size_t s) {
-  opt->rep.block_size = s;
-}
-
-void rocksdb_options_set_block_restart_interval(rocksdb_options_t* opt, int n) {
-  opt->rep.block_restart_interval = n;
-}
-
-void rocksdb_options_set_target_file_size_base(
-    rocksdb_options_t* opt, uint64_t n) {
-  opt->rep.target_file_size_base = n;
-}
-
-void rocksdb_options_set_target_file_size_multiplier(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.target_file_size_multiplier = n;
-}
-
-void rocksdb_options_set_max_bytes_for_level_base(
-    rocksdb_options_t* opt, uint64_t n) {
-  opt->rep.max_bytes_for_level_base = n;
-}
-
-void rocksdb_options_set_max_bytes_for_level_multiplier(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.max_bytes_for_level_multiplier = n;
-}
-
-void rocksdb_options_set_expanded_compaction_factor(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.expanded_compaction_factor = n;
-}
-
-void rocksdb_options_set_max_grandparent_overlap_factor(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.max_grandparent_overlap_factor = n;
-}
-
-void rocksdb_options_set_max_bytes_for_level_multiplier_additional(
-    rocksdb_options_t* opt, int* level_values, size_t num_levels) {
-  opt->rep.max_bytes_for_level_multiplier_additional.resize(num_levels);
-  for (size_t i = 0; i < num_levels; ++i) {
-    opt->rep.max_bytes_for_level_multiplier_additional[i] = level_values[i];
-  }
-}
-
-void rocksdb_options_enable_statistics(rocksdb_options_t* opt) {
-  opt->rep.statistics = rocksdb::CreateDBStatistics();
-}
-
-void rocksdb_options_set_num_levels(rocksdb_options_t* opt, int n) {
-  opt->rep.num_levels = n;
-}
-
-void rocksdb_options_set_level0_file_num_compaction_trigger(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.level0_file_num_compaction_trigger = n;
-}
-
-void rocksdb_options_set_level0_slowdown_writes_trigger(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.level0_slowdown_writes_trigger = n;
-}
-
-void rocksdb_options_set_level0_stop_writes_trigger(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.level0_stop_writes_trigger = n;
-}
-
-void rocksdb_options_set_max_mem_compaction_level(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.max_mem_compaction_level = n;
-}
-
-void rocksdb_options_set_compression(rocksdb_options_t* opt, int t) {
-  opt->rep.compression = static_cast<CompressionType>(t);
-}
-
-void rocksdb_options_set_compression_per_level(rocksdb_options_t* opt,
-                                               int* level_values,
-                                               size_t num_levels) {
-  opt->rep.compression_per_level.resize(num_levels);
-  for (size_t i = 0; i < num_levels; ++i) {
-    opt->rep.compression_per_level[i] =
-      static_cast<CompressionType>(level_values[i]);
-  }
-}
-
-void rocksdb_options_set_compression_options(
-    rocksdb_options_t* opt, int w_bits, int level, int strategy) {
-  opt->rep.compression_opts.window_bits = w_bits;
-  opt->rep.compression_opts.level = level;
-  opt->rep.compression_opts.strategy = strategy;
-}
-
-void rocksdb_options_set_prefix_extractor(
-    rocksdb_options_t* opt, rocksdb_slicetransform_t* prefix_extractor) {
-  opt->rep.prefix_extractor.reset(prefix_extractor);
-}
-
-void rocksdb_options_set_whole_key_filtering(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.whole_key_filtering = v;
-}
-
-void rocksdb_options_set_disable_data_sync(
-    rocksdb_options_t* opt, int disable_data_sync) {
-  opt->rep.disableDataSync = disable_data_sync;
-}
-
-void rocksdb_options_set_use_fsync(
-    rocksdb_options_t* opt, int use_fsync) {
-  opt->rep.use_fsync = use_fsync;
-}
-
-void rocksdb_options_set_db_stats_log_interval(
-    rocksdb_options_t* opt, int db_stats_log_interval) {
-  opt->rep.db_stats_log_interval = db_stats_log_interval;
-}
-
-void rocksdb_options_set_db_log_dir(
-    rocksdb_options_t* opt, const char* db_log_dir) {
-  opt->rep.db_log_dir = db_log_dir;
-}
-
-void rocksdb_options_set_wal_dir(
-    rocksdb_options_t* opt, const char* v) {
-  opt->rep.wal_dir = v;
-}
-
-void rocksdb_options_set_WAL_ttl_seconds(rocksdb_options_t* opt, uint64_t ttl) {
-  opt->rep.WAL_ttl_seconds = ttl;
-}
-
-void rocksdb_options_set_WAL_size_limit_MB(
-    rocksdb_options_t* opt, uint64_t limit) {
-  opt->rep.WAL_size_limit_MB = limit;
-}
-
-void rocksdb_options_set_manifest_preallocation_size(
-    rocksdb_options_t* opt, size_t v) {
-  opt->rep.manifest_preallocation_size = v;
-}
-
-void rocksdb_options_set_purge_redundant_kvs_while_flush(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.purge_redundant_kvs_while_flush = v;
-}
-
-void rocksdb_options_set_allow_os_buffer(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.allow_os_buffer = v;
-}
-
-void rocksdb_options_set_allow_mmap_reads(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.allow_mmap_reads = v;
-}
-
-void rocksdb_options_set_allow_mmap_writes(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.allow_mmap_writes = v;
-}
-
-void rocksdb_options_set_is_fd_close_on_exec(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.is_fd_close_on_exec = v;
-}
-
-void rocksdb_options_set_skip_log_error_on_recovery(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.skip_log_error_on_recovery = v;
-}
-
-void rocksdb_options_set_stats_dump_period_sec(
-    rocksdb_options_t* opt, unsigned int v) {
-  opt->rep.stats_dump_period_sec = v;
-}
-
-void rocksdb_options_set_block_size_deviation(
-    rocksdb_options_t* opt, int v) {
-  opt->rep.block_size_deviation = v;
-}
-
-void rocksdb_options_set_advise_random_on_open(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.advise_random_on_open = v;
-}
-
-void rocksdb_options_set_access_hint_on_compaction_start(
-    rocksdb_options_t* opt, int v) {
-  switch(v) {
-    case 0:
-      opt->rep.access_hint_on_compaction_start = rocksdb::Options::NONE;
-      break;
-    case 1:
-      opt->rep.access_hint_on_compaction_start = rocksdb::Options::NORMAL;
-      break;
-    case 2:
-      opt->rep.access_hint_on_compaction_start = rocksdb::Options::SEQUENTIAL;
-      break;
-    case 3:
-      opt->rep.access_hint_on_compaction_start = rocksdb::Options::WILLNEED;
-      break;
-  }
-}
-
-void rocksdb_options_set_use_adaptive_mutex(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.use_adaptive_mutex = v;
-}
-
-void rocksdb_options_set_bytes_per_sync(
-    rocksdb_options_t* opt, uint64_t v) {
-  opt->rep.bytes_per_sync = v;
-}
-
-void rocksdb_options_set_verify_checksums_in_compaction(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.verify_checksums_in_compaction = v;
-}
-
-void rocksdb_options_set_filter_deletes(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.filter_deletes = v;
-}
-
-void rocksdb_options_set_max_sequential_skip_in_iterations(
-    rocksdb_options_t* opt, uint64_t v) {
-  opt->rep.max_sequential_skip_in_iterations = v;
-}
-
-void rocksdb_options_set_max_write_buffer_number(rocksdb_options_t* opt, int n) {
-  opt->rep.max_write_buffer_number = n;
-}
-
-void rocksdb_options_set_min_write_buffer_number_to_merge(rocksdb_options_t* opt, int n) {
-  opt->rep.min_write_buffer_number_to_merge = n;
-}
-
-void rocksdb_options_set_max_background_compactions(rocksdb_options_t* opt, int n) {
-  opt->rep.max_background_compactions = n;
-}
-
-void rocksdb_options_set_max_background_flushes(rocksdb_options_t* opt, int n) {
-  opt->rep.max_background_flushes = n;
-}
-
-void rocksdb_options_set_max_log_file_size(rocksdb_options_t* opt, size_t v) {
-  opt->rep.max_log_file_size = v;
-}
-
-void rocksdb_options_set_log_file_time_to_roll(rocksdb_options_t* opt, size_t v) {
-  opt->rep.log_file_time_to_roll = v;
-}
-
-void rocksdb_options_set_keep_log_file_num(rocksdb_options_t* opt, size_t v) {
-  opt->rep.keep_log_file_num = v;
-}
-
-void rocksdb_options_set_soft_rate_limit(rocksdb_options_t* opt, double v) {
-  opt->rep.soft_rate_limit = v;
-}
-
-void rocksdb_options_set_hard_rate_limit(rocksdb_options_t* opt, double v) {
-  opt->rep.hard_rate_limit = v;
-}
-
-void rocksdb_options_set_rate_limit_delay_max_milliseconds(
-    rocksdb_options_t* opt, unsigned int v) {
-  opt->rep.rate_limit_delay_max_milliseconds = v;
-}
-
-void rocksdb_options_set_max_manifest_file_size(
-    rocksdb_options_t* opt, size_t v) {
-  opt->rep.max_manifest_file_size = v;
-}
-
-void rocksdb_options_set_no_block_cache(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.no_block_cache = v;
-}
-
-void rocksdb_options_set_table_cache_numshardbits(
-    rocksdb_options_t* opt, int v) {
-  opt->rep.table_cache_numshardbits = v;
-}
-
-void rocksdb_options_set_table_cache_remove_scan_count_limit(
-    rocksdb_options_t* opt, int v) {
-  opt->rep.table_cache_remove_scan_count_limit = v;
-}
-
-void rocksdb_options_set_arena_block_size(
-    rocksdb_options_t* opt, size_t v) {
-  opt->rep.arena_block_size = v;
-}
-
-void rocksdb_options_set_disable_auto_compactions(rocksdb_options_t* opt, int disable) {
-  opt->rep.disable_auto_compactions = disable;
-}
-
-void rocksdb_options_set_disable_seek_compaction(rocksdb_options_t* opt, int disable) {
-  opt->rep.disable_seek_compaction = disable;
-}
-
-void rocksdb_options_set_delete_obsolete_files_period_micros(
-    rocksdb_options_t* opt, uint64_t v) {
-  opt->rep.delete_obsolete_files_period_micros = v;
-}
-
-void rocksdb_options_set_source_compaction_factor(
-    rocksdb_options_t* opt, int n) {
-  opt->rep.expanded_compaction_factor = n;
-}
-
-void rocksdb_options_prepare_for_bulk_load(rocksdb_options_t* opt) {
-  opt->rep.PrepareForBulkLoad();
-}
-
-void rocksdb_options_set_memtable_vector_rep(rocksdb_options_t *opt) {
-  static rocksdb::VectorRepFactory* factory = 0;
-  if (!factory) {
-    factory = new rocksdb::VectorRepFactory;
-  }
-  opt->rep.memtable_factory.reset(factory);
-}
-
-void rocksdb_options_set_memtable_prefix_bloom_bits(
-    rocksdb_options_t* opt, uint32_t v) {
-  opt->rep.memtable_prefix_bloom_bits = v;
-}
-
-void rocksdb_options_set_memtable_prefix_bloom_probes(
-    rocksdb_options_t* opt, uint32_t v) {
-  opt->rep.memtable_prefix_bloom_probes = v;
-}
-
-void rocksdb_options_set_hash_skip_list_rep(
-    rocksdb_options_t *opt, size_t bucket_count,
-    int32_t skiplist_height, int32_t skiplist_branching_factor) {
-  static rocksdb::MemTableRepFactory* factory = 0;
-  if (!factory) {
-    factory = rocksdb::NewHashSkipListRepFactory(
-        bucket_count, skiplist_height, skiplist_branching_factor);
-  }
-  opt->rep.memtable_factory.reset(factory);
-}
-
-void rocksdb_options_set_hash_link_list_rep(
-    rocksdb_options_t *opt, size_t bucket_count) {
-  static rocksdb::MemTableRepFactory* factory = 0;
-  if (!factory) {
-    factory = rocksdb::NewHashLinkListRepFactory(bucket_count);
-  }
-  opt->rep.memtable_factory.reset(factory);
-}
-
-void rocksdb_options_set_plain_table_factory(
-    rocksdb_options_t *opt, uint32_t user_key_len, int bloom_bits_per_key,
-    double hash_table_ratio, size_t index_sparseness) {
-  static rocksdb::TableFactory* factory = 0;
-  if (!factory) {
-    factory = rocksdb::NewPlainTableFactory(
-        user_key_len, bloom_bits_per_key,
-        hash_table_ratio, index_sparseness);
-  }
-  opt->rep.table_factory.reset(factory);
-}
-
-void rocksdb_options_set_max_successive_merges(
-    rocksdb_options_t* opt, size_t v) {
-  opt->rep.max_successive_merges = v;
-}
-
-void rocksdb_options_set_min_partial_merge_operands(
-    rocksdb_options_t* opt, uint32_t v) {
-  opt->rep.min_partial_merge_operands = v;
-}
-
-void rocksdb_options_set_bloom_locality(
-    rocksdb_options_t* opt, uint32_t v) {
-  opt->rep.bloom_locality = v;
-}
-
-void rocksdb_options_set_allow_thread_local(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.allow_thread_local = v;
-}
-
-void rocksdb_options_set_inplace_update_support(
-    rocksdb_options_t* opt, unsigned char v) {
-  opt->rep.inplace_update_support = v;
-}
-
-void rocksdb_options_set_inplace_update_num_locks(
-    rocksdb_options_t* opt, size_t v) {
-  opt->rep.inplace_update_num_locks = v;
-}
-
-void rocksdb_options_set_compaction_style(rocksdb_options_t *opt, int style) {
-  opt->rep.compaction_style = static_cast<rocksdb::CompactionStyle>(style);
-}
-
-void rocksdb_options_set_universal_compaction_options(rocksdb_options_t *opt, rocksdb_universal_compaction_options_t *uco) {
-  opt->rep.compaction_options_universal = *(uco->rep);
-}
-
-/*
-TODO:
-DB::OpenForReadOnly
-DB::MultiGet
-DB::KeyMayExist
-DB::GetOptions
-DB::GetSortedWalFiles
-DB::GetLatestSequenceNumber
-DB::GetUpdatesSince
-DB::GetDbIdentity
-DB::RunManualCompaction
-custom cache
-compaction_filter
-table_properties_collectors
-*/
-
-rocksdb_comparator_t* rocksdb_comparator_create(
-    void* state,
-    void (*destructor)(void*),
-    int (*compare)(
-        void*,
-        const char* a, size_t alen,
-        const char* b, size_t blen),
-    const char* (*name)(void*)) {
-  rocksdb_comparator_t* result = new rocksdb_comparator_t;
-  result->state_ = state;
-  result->destructor_ = destructor;
-  result->compare_ = compare;
-  result->name_ = name;
-  return result;
-}
-
-void rocksdb_comparator_destroy(rocksdb_comparator_t* cmp) {
-  delete cmp;
-}
-
-rocksdb_filterpolicy_t* rocksdb_filterpolicy_create(
-    void* state,
-    void (*destructor)(void*),
-    char* (*create_filter)(
-        void*,
-        const char* const* key_array, const size_t* key_length_array,
-        int num_keys,
-        size_t* filter_length),
-    unsigned char (*key_may_match)(
-        void*,
-        const char* key, size_t length,
-        const char* filter, size_t filter_length),
-    void (*delete_filter)(
-        void*,
-        const char* filter, size_t filter_length),
-    const char* (*name)(void*)) {
-  rocksdb_filterpolicy_t* result = new rocksdb_filterpolicy_t;
-  result->state_ = state;
-  result->destructor_ = destructor;
-  result->create_ = create_filter;
-  result->key_match_ = key_may_match;
-  result->delete_filter_ = delete_filter;
-  result->name_ = name;
-  return result;
-}
-
-void rocksdb_filterpolicy_destroy(rocksdb_filterpolicy_t* filter) {
-  delete filter;
-}
-
-rocksdb_filterpolicy_t* rocksdb_filterpolicy_create_bloom(int bits_per_key) {
-  // Make a rocksdb_filterpolicy_t, but override all of its methods so
-  // they delegate to a NewBloomFilterPolicy() instead of user
-  // supplied C functions.
-  struct Wrapper : public rocksdb_filterpolicy_t {
-    const FilterPolicy* rep_;
-    ~Wrapper() { delete rep_; }
-    const char* Name() const { return rep_->Name(); }
-    void CreateFilter(const Slice* keys, int n, std::string* dst) const {
-      return rep_->CreateFilter(keys, n, dst);
-    }
-    bool KeyMayMatch(const Slice& key, const Slice& filter) const {
-      return rep_->KeyMayMatch(key, filter);
-    }
-    static void DoNothing(void*) { }
-  };
-  Wrapper* wrapper = new Wrapper;
-  wrapper->rep_ = NewBloomFilterPolicy(bits_per_key);
-  wrapper->state_ = nullptr;
-  wrapper->delete_filter_ = nullptr;
-  wrapper->destructor_ = &Wrapper::DoNothing;
-  return wrapper;
-}
-
-rocksdb_mergeoperator_t* rocksdb_mergeoperator_create(
-    void* state, void (*destructor)(void*),
-    char* (*full_merge)(void*, const char* key, size_t key_length,
-                        const char* existing_value,
-                        size_t existing_value_length,
-                        const char* const* operands_list,
-                        const size_t* operands_list_length, int num_operands,
-                        unsigned char* success, size_t* new_value_length),
-    char* (*partial_merge)(void*, const char* key, size_t key_length,
-                           const char* const* operands_list,
-                           const size_t* operands_list_length, int num_operands,
-                           unsigned char* success, size_t* new_value_length),
-    void (*delete_value)(void*, const char* value, size_t value_length),
-    const char* (*name)(void*)) {
-  rocksdb_mergeoperator_t* result = new rocksdb_mergeoperator_t;
-  result->state_ = state;
-  result->destructor_ = destructor;
-  result->full_merge_ = full_merge;
-  result->partial_merge_ = partial_merge;
-  result->delete_value_ = delete_value;
-  result->name_ = name;
-  return result;
-}
-
-void rocksdb_mergeoperator_destroy(rocksdb_mergeoperator_t* merge_operator) {
-  delete merge_operator;
-}
-
-rocksdb_readoptions_t* rocksdb_readoptions_create() {
-  return new rocksdb_readoptions_t;
-}
-
-void rocksdb_readoptions_destroy(rocksdb_readoptions_t* opt) {
-  delete opt;
-}
-
-void rocksdb_readoptions_set_verify_checksums(
-    rocksdb_readoptions_t* opt,
-    unsigned char v) {
-  opt->rep.verify_checksums = v;
-}
-
-void rocksdb_readoptions_set_fill_cache(
-    rocksdb_readoptions_t* opt, unsigned char v) {
-  opt->rep.fill_cache = v;
-}
-
-void rocksdb_readoptions_set_snapshot(
-    rocksdb_readoptions_t* opt,
-    const rocksdb_snapshot_t* snap) {
-  opt->rep.snapshot = (snap ? snap->rep : nullptr);
-}
-
-void rocksdb_readoptions_set_read_tier(
-    rocksdb_readoptions_t* opt, int v) {
-  opt->rep.read_tier = static_cast<rocksdb::ReadTier>(v);
-}
-
-void rocksdb_readoptions_set_tailing(
-    rocksdb_readoptions_t* opt, unsigned char v) {
-  opt->rep.tailing = v;
-}
-
-rocksdb_writeoptions_t* rocksdb_writeoptions_create() {
-  return new rocksdb_writeoptions_t;
-}
-
-void rocksdb_writeoptions_destroy(rocksdb_writeoptions_t* opt) {
-  delete opt;
-}
-
-void rocksdb_writeoptions_set_sync(
-    rocksdb_writeoptions_t* opt, unsigned char v) {
-  opt->rep.sync = v;
-}
-
-void rocksdb_writeoptions_disable_WAL(rocksdb_writeoptions_t* opt, int disable) {
-  opt->rep.disableWAL = disable;
-}
-
-
-rocksdb_flushoptions_t* rocksdb_flushoptions_create() {
-  return new rocksdb_flushoptions_t;
-}
-
-void rocksdb_flushoptions_destroy(rocksdb_flushoptions_t* opt) {
-  delete opt;
-}
-
-void rocksdb_flushoptions_set_wait(
-    rocksdb_flushoptions_t* opt, unsigned char v) {
-  opt->rep.wait = v;
-}
-
-rocksdb_cache_t* rocksdb_cache_create_lru(size_t capacity) {
-  rocksdb_cache_t* c = new rocksdb_cache_t;
-  c->rep = NewLRUCache(capacity);
-  return c;
-}
-
-void rocksdb_cache_destroy(rocksdb_cache_t* cache) {
-  delete cache;
-}
-
-rocksdb_env_t* rocksdb_create_default_env() {
-  rocksdb_env_t* result = new rocksdb_env_t;
-  result->rep = Env::Default();
-  result->is_default = true;
-  return result;
-}
-
-void rocksdb_env_set_background_threads(rocksdb_env_t* env, int n) {
-  env->rep->SetBackgroundThreads(n);
-}
-
-void rocksdb_env_set_high_priority_background_threads(rocksdb_env_t* env, int n) {
-  env->rep->SetBackgroundThreads(n, Env::HIGH);
-}
-
-void rocksdb_env_destroy(rocksdb_env_t* env) {
-  if (!env->is_default) delete env->rep;
-  delete env;
-}
-
-rocksdb_slicetransform_t* rocksdb_slicetransform_create(
-    void* state,
-    void (*destructor)(void*),
-    char* (*transform)(
-        void*,
-        const char* key, size_t length,
-        size_t* dst_length),
-    unsigned char (*in_domain)(
-        void*,
-        const char* key, size_t length),
-    unsigned char (*in_range)(
-        void*,
-        const char* key, size_t length),
-    const char* (*name)(void*)) {
-  rocksdb_slicetransform_t* result = new rocksdb_slicetransform_t;
-  result->state_ = state;
-  result->destructor_ = destructor;
-  result->transform_ = transform;
-  result->in_domain_ = in_domain;
-  result->in_range_ = in_range;
-  result->name_ = name;
-  return result;
-}
-
-void rocksdb_slicetransform_destroy(rocksdb_slicetransform_t* st) {
-  delete st;
-}
-
-rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) {
-  struct Wrapper : public rocksdb_slicetransform_t {
-    const SliceTransform* rep_;
-    ~Wrapper() { delete rep_; }
-    const char* Name() const { return rep_->Name(); }
-    Slice Transform(const Slice& src) const {
-      return rep_->Transform(src);
-    }
-    bool InDomain(const Slice& src) const {
-      return rep_->InDomain(src);
-    }
-    bool InRange(const Slice& src) const {
-      return rep_->InRange(src);
-    }
-    static void DoNothing(void*) { }
-  };
-  Wrapper* wrapper = new Wrapper;
-  wrapper->rep_ = rocksdb::NewFixedPrefixTransform(prefixLen);
-  wrapper->state_ = nullptr;
-  wrapper->destructor_ = &Wrapper::DoNothing;
-  return wrapper;
-}
-
-rocksdb_universal_compaction_options_t* rocksdb_universal_compaction_options_create() {
-  rocksdb_universal_compaction_options_t* result = new rocksdb_universal_compaction_options_t;
-  result->rep = new rocksdb::CompactionOptionsUniversal;
-  return result;
-}
-
-void rocksdb_universal_compaction_options_set_size_ratio(
-  rocksdb_universal_compaction_options_t* uco, int ratio) {
-  uco->rep->size_ratio = ratio;
-}
-
-void rocksdb_universal_compaction_options_set_min_merge_width(
-  rocksdb_universal_compaction_options_t* uco, int w) {
-  uco->rep->min_merge_width = w;
-}
-
-void rocksdb_universal_compaction_options_set_max_merge_width(
-  rocksdb_universal_compaction_options_t* uco, int w) {
-  uco->rep->max_merge_width = w;
-}
-
-void rocksdb_universal_compaction_options_set_max_size_amplification_percent(
-  rocksdb_universal_compaction_options_t* uco, int p) {
-  uco->rep->max_size_amplification_percent = p;
-}
-
-void rocksdb_universal_compaction_options_set_compression_size_percent(
-  rocksdb_universal_compaction_options_t* uco, int p) {
-  uco->rep->compression_size_percent = p;
-}
-
-void rocksdb_universal_compaction_options_set_stop_style(
-  rocksdb_universal_compaction_options_t* uco, int style) {
-  uco->rep->stop_style = static_cast<rocksdb::CompactionStopStyle>(style);
-}
-
-void rocksdb_universal_compaction_options_destroy(
-  rocksdb_universal_compaction_options_t* uco) {
-  delete uco->rep;
-  delete uco;
-}
-
-void rocksdb_options_set_min_level_to_compress(rocksdb_options_t* opt, int level) {
-  if (level >= 0) {
-    assert(level <= opt->rep.num_levels);
-    opt->rep.compression_per_level.resize(opt->rep.num_levels);
-    for (int i = 0; i < level; i++) {
-      opt->rep.compression_per_level[i] = rocksdb::kNoCompression;
-    }
-    for (int i = level; i < opt->rep.num_levels; i++) {
-      opt->rep.compression_per_level[i] = opt->rep.compression;
-    }
-  }
-}
-
-int rocksdb_livefiles_count(
-  const rocksdb_livefiles_t* lf) {
-  return lf->rep.size();
-}
-
-const char* rocksdb_livefiles_name(
-  const rocksdb_livefiles_t* lf,
-  int index) {
-  return lf->rep[index].name.c_str();
-}
-
-int rocksdb_livefiles_level(
-  const rocksdb_livefiles_t* lf,
-  int index) {
-  return lf->rep[index].level;
-}
-
-size_t rocksdb_livefiles_size(
-  const rocksdb_livefiles_t* lf,
-  int index) {
-  return lf->rep[index].size;
-}
-
-const char* rocksdb_livefiles_smallestkey(
-  const rocksdb_livefiles_t* lf,
-  int index,
-  size_t* size) {
-  *size = lf->rep[index].smallestkey.size();
-  return lf->rep[index].smallestkey.data();
-}
-
-const char* rocksdb_livefiles_largestkey(
-  const rocksdb_livefiles_t* lf,
-  int index,
-  size_t* size) {
-  *size = lf->rep[index].largestkey.size();
-  return lf->rep[index].largestkey.data();
-}
-
-extern void rocksdb_livefiles_destroy(
-  const rocksdb_livefiles_t* lf) {
-  delete lf;
-}
-
-}  // end extern "C"
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/c_test.c b/src/rocksdb/db/c_test.c
deleted file mode 100644
index 8ebce90..0000000
--- a/src/rocksdb/db/c_test.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/* Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-   Use of this source code is governed by a BSD-style license that can be
-   found in the LICENSE file. See the AUTHORS file for names of contributors. */
-
-#include "rocksdb/c.h"
-
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-const char* phase = "";
-static char dbname[200];
-
-static void StartPhase(const char* name) {
-  fprintf(stderr, "=== Test %s\n", name);
-  phase = name;
-}
-
-static const char* GetTempDir(void) {
-    const char* ret = getenv("TEST_TMPDIR");
-    if (ret == NULL || ret[0] == '\0')
-        ret = "/tmp";
-    return ret;
-}
-
-#define CheckNoError(err)                                               \
-  if ((err) != NULL) {                                                  \
-    fprintf(stderr, "%s:%d: %s: %s\n", __FILE__, __LINE__, phase, (err)); \
-    abort();                                                            \
-  }
-
-#define CheckCondition(cond)                                            \
-  if (!(cond)) {                                                        \
-    fprintf(stderr, "%s:%d: %s: %s\n", __FILE__, __LINE__, phase, #cond); \
-    abort();                                                            \
-  }
-
-static void CheckEqual(const char* expected, const char* v, size_t n) {
-  if (expected == NULL && v == NULL) {
-    // ok
-  } else if (expected != NULL && v != NULL && n == strlen(expected) &&
-             memcmp(expected, v, n) == 0) {
-    // ok
-    return;
-  } else {
-    fprintf(stderr, "%s: expected '%s', got '%s'\n",
-            phase,
-            (expected ? expected : "(null)"),
-            (v ? v : "(null"));
-    abort();
-  }
-}
-
-static void Free(char** ptr) {
-  if (*ptr) {
-    free(*ptr);
-    *ptr = NULL;
-  }
-}
-
-static void CheckGet(
-    rocksdb_t* db,
-    const rocksdb_readoptions_t* options,
-    const char* key,
-    const char* expected) {
-  char* err = NULL;
-  size_t val_len;
-  char* val;
-  val = rocksdb_get(db, options, key, strlen(key), &val_len, &err);
-  CheckNoError(err);
-  CheckEqual(expected, val, val_len);
-  Free(&val);
-}
-
-static void CheckIter(rocksdb_iterator_t* iter,
-                      const char* key, const char* val) {
-  size_t len;
-  const char* str;
-  str = rocksdb_iter_key(iter, &len);
-  CheckEqual(key, str, len);
-  str = rocksdb_iter_value(iter, &len);
-  CheckEqual(val, str, len);
-}
-
-// Callback from rocksdb_writebatch_iterate()
-static void CheckPut(void* ptr,
-                     const char* k, size_t klen,
-                     const char* v, size_t vlen) {
-  int* state = (int*) ptr;
-  CheckCondition(*state < 2);
-  switch (*state) {
-    case 0:
-      CheckEqual("bar", k, klen);
-      CheckEqual("b", v, vlen);
-      break;
-    case 1:
-      CheckEqual("box", k, klen);
-      CheckEqual("c", v, vlen);
-      break;
-  }
-  (*state)++;
-}
-
-// Callback from rocksdb_writebatch_iterate()
-static void CheckDel(void* ptr, const char* k, size_t klen) {
-  int* state = (int*) ptr;
-  CheckCondition(*state == 2);
-  CheckEqual("bar", k, klen);
-  (*state)++;
-}
-
-static void CmpDestroy(void* arg) { }
-
-static int CmpCompare(void* arg, const char* a, size_t alen,
-                      const char* b, size_t blen) {
-  int n = (alen < blen) ? alen : blen;
-  int r = memcmp(a, b, n);
-  if (r == 0) {
-    if (alen < blen) r = -1;
-    else if (alen > blen) r = +1;
-  }
-  return r;
-}
-
-static const char* CmpName(void* arg) {
-  return "foo";
-}
-
-// Custom filter policy
-static unsigned char fake_filter_result = 1;
-static void FilterDestroy(void* arg) { }
-static const char* FilterName(void* arg) {
-  return "TestFilter";
-}
-static char* FilterCreate(
-    void* arg,
-    const char* const* key_array, const size_t* key_length_array,
-    int num_keys,
-    size_t* filter_length) {
-  *filter_length = 4;
-  char* result = malloc(4);
-  memcpy(result, "fake", 4);
-  return result;
-}
-static unsigned char FilterKeyMatch(
-    void* arg,
-    const char* key, size_t length,
-    const char* filter, size_t filter_length) {
-  CheckCondition(filter_length == 4);
-  CheckCondition(memcmp(filter, "fake", 4) == 0);
-  return fake_filter_result;
-}
-
-// Custom merge operator
-static void MergeOperatorDestroy(void* arg) { }
-static const char* MergeOperatorName(void* arg) {
-  return "TestMergeOperator";
-}
-static char* MergeOperatorFullMerge(
-    void* arg,
-    const char* key, size_t key_length,
-    const char* existing_value, size_t existing_value_length,
-    const char* const* operands_list, const size_t* operands_list_length,
-    int num_operands,
-    unsigned char* success, size_t* new_value_length) {
-  *new_value_length = 4;
-  *success = 1;
-  char* result = malloc(4);
-  memcpy(result, "fake", 4);
-  return result;
-}
-static char* MergeOperatorPartialMerge(
-    void* arg,
-    const char* key, size_t key_length,
-    const char* const* operands_list, const size_t* operands_list_length,
-    int num_operands,
-    unsigned char* success, size_t* new_value_length) {
-  *new_value_length = 4;
-  *success = 1;
-  char* result = malloc(4);
-  memcpy(result, "fake", 4);
-  return result;
-}
-
-int main(int argc, char** argv) {
-  rocksdb_t* db;
-  rocksdb_comparator_t* cmp;
-  rocksdb_cache_t* cache;
-  rocksdb_env_t* env;
-  rocksdb_options_t* options;
-  rocksdb_readoptions_t* roptions;
-  rocksdb_writeoptions_t* woptions;
-  char* err = NULL;
-  int run = -1;
-
-  snprintf(dbname, sizeof(dbname),
-           "%s/rocksdb_c_test-%d",
-           GetTempDir(),
-           ((int) geteuid()));
-
-  StartPhase("create_objects");
-  cmp = rocksdb_comparator_create(NULL, CmpDestroy, CmpCompare, CmpName);
-  env = rocksdb_create_default_env();
-  cache = rocksdb_cache_create_lru(100000);
-
-  options = rocksdb_options_create();
-  rocksdb_options_set_comparator(options, cmp);
-  rocksdb_options_set_error_if_exists(options, 1);
-  rocksdb_options_set_cache(options, cache);
-  rocksdb_options_set_env(options, env);
-  rocksdb_options_set_info_log(options, NULL);
-  rocksdb_options_set_write_buffer_size(options, 100000);
-  rocksdb_options_set_paranoid_checks(options, 1);
-  rocksdb_options_set_max_open_files(options, 10);
-  rocksdb_options_set_block_size(options, 1024);
-  rocksdb_options_set_block_restart_interval(options, 8);
-  rocksdb_options_set_compression(options, rocksdb_no_compression);
-  rocksdb_options_set_compression_options(options, -14, -1, 0);
-  int compression_levels[] = {rocksdb_no_compression, rocksdb_no_compression,
-                              rocksdb_no_compression, rocksdb_no_compression};
-  rocksdb_options_set_compression_per_level(options, compression_levels, 4);
-
-  roptions = rocksdb_readoptions_create();
-  rocksdb_readoptions_set_verify_checksums(roptions, 1);
-  rocksdb_readoptions_set_fill_cache(roptions, 0);
-
-  woptions = rocksdb_writeoptions_create();
-  rocksdb_writeoptions_set_sync(woptions, 1);
-
-  StartPhase("destroy");
-  rocksdb_destroy_db(options, dbname, &err);
-  Free(&err);
-
-  StartPhase("open_error");
-  db = rocksdb_open(options, dbname, &err);
-  CheckCondition(err != NULL);
-  Free(&err);
-
-  StartPhase("open");
-  rocksdb_options_set_create_if_missing(options, 1);
-  db = rocksdb_open(options, dbname, &err);
-  CheckNoError(err);
-  CheckGet(db, roptions, "foo", NULL);
-
-  StartPhase("put");
-  rocksdb_put(db, woptions, "foo", 3, "hello", 5, &err);
-  CheckNoError(err);
-  CheckGet(db, roptions, "foo", "hello");
-
-  StartPhase("compactall");
-  rocksdb_compact_range(db, NULL, 0, NULL, 0);
-  CheckGet(db, roptions, "foo", "hello");
-
-  StartPhase("compactrange");
-  rocksdb_compact_range(db, "a", 1, "z", 1);
-  CheckGet(db, roptions, "foo", "hello");
-
-  StartPhase("writebatch");
-  {
-    rocksdb_writebatch_t* wb = rocksdb_writebatch_create();
-    rocksdb_writebatch_put(wb, "foo", 3, "a", 1);
-    rocksdb_writebatch_clear(wb);
-    rocksdb_writebatch_put(wb, "bar", 3, "b", 1);
-    rocksdb_writebatch_put(wb, "box", 3, "c", 1);
-    rocksdb_writebatch_delete(wb, "bar", 3);
-    rocksdb_write(db, woptions, wb, &err);
-    CheckNoError(err);
-    CheckGet(db, roptions, "foo", "hello");
-    CheckGet(db, roptions, "bar", NULL);
-    CheckGet(db, roptions, "box", "c");
-    int pos = 0;
-    rocksdb_writebatch_iterate(wb, &pos, CheckPut, CheckDel);
-    CheckCondition(pos == 3);
-    rocksdb_writebatch_destroy(wb);
-  }
-
-  StartPhase("iter");
-  {
-    rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
-    CheckCondition(!rocksdb_iter_valid(iter));
-    rocksdb_iter_seek_to_first(iter);
-    CheckCondition(rocksdb_iter_valid(iter));
-    CheckIter(iter, "box", "c");
-    rocksdb_iter_next(iter);
-    CheckIter(iter, "foo", "hello");
-    rocksdb_iter_prev(iter);
-    CheckIter(iter, "box", "c");
-    rocksdb_iter_prev(iter);
-    CheckCondition(!rocksdb_iter_valid(iter));
-    rocksdb_iter_seek_to_last(iter);
-    CheckIter(iter, "foo", "hello");
-    rocksdb_iter_seek(iter, "b", 1);
-    CheckIter(iter, "box", "c");
-    rocksdb_iter_get_error(iter, &err);
-    CheckNoError(err);
-    rocksdb_iter_destroy(iter);
-  }
-
-  StartPhase("approximate_sizes");
-  {
-    int i;
-    int n = 20000;
-    char keybuf[100];
-    char valbuf[100];
-    uint64_t sizes[2];
-    const char* start[2] = { "a", "k00000000000000010000" };
-    size_t start_len[2] = { 1, 21 };
-    const char* limit[2] = { "k00000000000000010000", "z" };
-    size_t limit_len[2] = { 21, 1 };
-    rocksdb_writeoptions_set_sync(woptions, 0);
-    for (i = 0; i < n; i++) {
-      snprintf(keybuf, sizeof(keybuf), "k%020d", i);
-      snprintf(valbuf, sizeof(valbuf), "v%020d", i);
-      rocksdb_put(db, woptions, keybuf, strlen(keybuf), valbuf, strlen(valbuf),
-                  &err);
-      CheckNoError(err);
-    }
-    rocksdb_approximate_sizes(db, 2, start, start_len, limit, limit_len, sizes);
-    CheckCondition(sizes[0] > 0);
-    CheckCondition(sizes[1] > 0);
-  }
-
-  StartPhase("property");
-  {
-    char* prop = rocksdb_property_value(db, "nosuchprop");
-    CheckCondition(prop == NULL);
-    prop = rocksdb_property_value(db, "rocksdb.stats");
-    CheckCondition(prop != NULL);
-    Free(&prop);
-  }
-
-  StartPhase("snapshot");
-  {
-    const rocksdb_snapshot_t* snap;
-    snap = rocksdb_create_snapshot(db);
-    rocksdb_delete(db, woptions, "foo", 3, &err);
-    CheckNoError(err);
-    rocksdb_readoptions_set_snapshot(roptions, snap);
-    CheckGet(db, roptions, "foo", "hello");
-    rocksdb_readoptions_set_snapshot(roptions, NULL);
-    CheckGet(db, roptions, "foo", NULL);
-    rocksdb_release_snapshot(db, snap);
-  }
-
-  StartPhase("repair");
-  {
-    // If we do not compact here, then the lazy deletion of
-    // files (https://reviews.facebook.net/D6123) would leave
-    // around deleted files and the repair process will find
-    // those files and put them back into the database.
-    rocksdb_compact_range(db, NULL, 0, NULL, 0);
-    rocksdb_close(db);
-    rocksdb_options_set_create_if_missing(options, 0);
-    rocksdb_options_set_error_if_exists(options, 0);
-    rocksdb_repair_db(options, dbname, &err);
-    CheckNoError(err);
-    db = rocksdb_open(options, dbname, &err);
-    CheckNoError(err);
-    CheckGet(db, roptions, "foo", NULL);
-    CheckGet(db, roptions, "bar", NULL);
-    CheckGet(db, roptions, "box", "c");
-    rocksdb_options_set_create_if_missing(options, 1);
-    rocksdb_options_set_error_if_exists(options, 1);
-  }
-
-  StartPhase("filter");
-  for (run = 0; run < 2; run++) {
-    // First run uses custom filter, second run uses bloom filter
-    CheckNoError(err);
-    rocksdb_filterpolicy_t* policy;
-    if (run == 0) {
-      policy = rocksdb_filterpolicy_create(
-          NULL, FilterDestroy, FilterCreate, FilterKeyMatch, NULL, FilterName);
-    } else {
-      policy = rocksdb_filterpolicy_create_bloom(10);
-    }
-
-    // Create new database
-    rocksdb_close(db);
-    rocksdb_destroy_db(options, dbname, &err);
-    rocksdb_options_set_filter_policy(options, policy);
-    db = rocksdb_open(options, dbname, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "foo", 3, "foovalue", 8, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "bar", 3, "barvalue", 8, &err);
-    CheckNoError(err);
-    rocksdb_compact_range(db, NULL, 0, NULL, 0);
-
-    fake_filter_result = 1;
-    CheckGet(db, roptions, "foo", "foovalue");
-    CheckGet(db, roptions, "bar", "barvalue");
-    if (phase == 0) {
-      // Must not find value when custom filter returns false
-      fake_filter_result = 0;
-      CheckGet(db, roptions, "foo", NULL);
-      CheckGet(db, roptions, "bar", NULL);
-      fake_filter_result = 1;
-
-      CheckGet(db, roptions, "foo", "foovalue");
-      CheckGet(db, roptions, "bar", "barvalue");
-    }
-    rocksdb_options_set_filter_policy(options, NULL);
-    rocksdb_filterpolicy_destroy(policy);
-  }
-
-  StartPhase("merge_operator");
-  {
-    rocksdb_mergeoperator_t* merge_operator;
-    merge_operator = rocksdb_mergeoperator_create(
-        NULL, MergeOperatorDestroy, MergeOperatorFullMerge,
-        MergeOperatorPartialMerge, NULL, MergeOperatorName);
-    // Create new database
-    rocksdb_close(db);
-    rocksdb_destroy_db(options, dbname, &err);
-    rocksdb_options_set_merge_operator(options, merge_operator);
-    db = rocksdb_open(options, dbname, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "foo", 3, "foovalue", 8, &err);
-    CheckNoError(err);
-    CheckGet(db, roptions, "foo", "foovalue");
-    rocksdb_merge(db, woptions, "foo", 3, "barvalue", 8, &err);
-    CheckNoError(err);
-    CheckGet(db, roptions, "foo", "fake");
-
-    // Merge of a non-existing value
-    rocksdb_merge(db, woptions, "bar", 3, "barvalue", 8, &err);
-    CheckNoError(err);
-    CheckGet(db, roptions, "bar", "fake");
-
-  }
-
-  StartPhase("prefix");
-  {
-    // Create new database
-    rocksdb_close(db);
-    rocksdb_destroy_db(options, dbname, &err);
-
-    rocksdb_filterpolicy_t* policy = rocksdb_filterpolicy_create_bloom(10);
-    rocksdb_options_set_filter_policy(options, policy);
-    rocksdb_options_set_prefix_extractor(options, rocksdb_slicetransform_create_fixed_prefix(3));
-    rocksdb_options_set_hash_skip_list_rep(options, 50000, 4, 4);
-    rocksdb_options_set_plain_table_factory(options, 4, 10, 0.75, 16);
-
-    db = rocksdb_open(options, dbname, &err);
-    CheckNoError(err);
-
-    rocksdb_put(db, woptions, "foo1", 4, "foo", 3, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "foo2", 4, "foo", 3, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "foo3", 4, "foo", 3, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "bar1", 4, "bar", 3, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "bar2", 4, "bar", 3, &err);
-    CheckNoError(err);
-    rocksdb_put(db, woptions, "bar3", 4, "bar", 3, &err);
-    CheckNoError(err);
-
-    rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
-    CheckCondition(!rocksdb_iter_valid(iter));
-
-    rocksdb_iter_seek(iter, "bar", 3);
-    rocksdb_iter_get_error(iter, &err);
-    CheckNoError(err);
-    CheckCondition(rocksdb_iter_valid(iter));
-
-    CheckIter(iter, "bar1", "bar");
-    rocksdb_iter_next(iter);
-    CheckIter(iter, "bar2", "bar");
-    rocksdb_iter_next(iter);
-    CheckIter(iter, "bar3", "bar");
-    rocksdb_iter_get_error(iter, &err);
-    CheckNoError(err);
-    rocksdb_iter_destroy(iter);
-    rocksdb_filterpolicy_destroy(policy);
-  }
-
-  StartPhase("cleanup");
-  rocksdb_close(db);
-  rocksdb_options_destroy(options);
-  rocksdb_readoptions_destroy(roptions);
-  rocksdb_writeoptions_destroy(woptions);
-  rocksdb_cache_destroy(cache);
-  rocksdb_comparator_destroy(cmp);
-  rocksdb_env_destroy(env);
-
-  fprintf(stderr, "PASS\n");
-  return 0;
-}
diff --git a/src/rocksdb/db/column_family.cc b/src/rocksdb/db/column_family.cc
deleted file mode 100644
index 2fd68e3..0000000
--- a/src/rocksdb/db/column_family.cc
+++ /dev/null
@@ -1,583 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/column_family.h"
-
-#include <vector>
-#include <string>
-#include <algorithm>
-
-#include "db/db_impl.h"
-#include "db/version_set.h"
-#include "db/internal_stats.h"
-#include "db/compaction_picker.h"
-#include "db/table_properties_collector.h"
-#include "util/autovector.h"
-#include "util/hash_skiplist_rep.h"
-
-namespace rocksdb {
-
-ColumnFamilyHandleImpl::ColumnFamilyHandleImpl(ColumnFamilyData* cfd,
-                                               DBImpl* db, port::Mutex* mutex)
-    : cfd_(cfd), db_(db), mutex_(mutex) {
-  if (cfd_ != nullptr) {
-    cfd_->Ref();
-  }
-}
-
-ColumnFamilyHandleImpl::~ColumnFamilyHandleImpl() {
-  if (cfd_ != nullptr) {
-    DBImpl::DeletionState deletion_state;
-    mutex_->Lock();
-    if (cfd_->Unref()) {
-      delete cfd_;
-    }
-    db_->FindObsoleteFiles(deletion_state, false, true);
-    mutex_->Unlock();
-    if (deletion_state.HaveSomethingToDelete()) {
-      db_->PurgeObsoleteFiles(deletion_state);
-    }
-  }
-}
-
-uint32_t ColumnFamilyHandleImpl::GetID() const { return cfd()->GetID(); }
-
-namespace {
-// Fix user-supplied options to be reasonable
-template <class T, class V>
-static void ClipToRange(T* ptr, V minvalue, V maxvalue) {
-  if (static_cast<V>(*ptr) > maxvalue) *ptr = maxvalue;
-  if (static_cast<V>(*ptr) < minvalue) *ptr = minvalue;
-}
-}  // anonymous namespace
-
-ColumnFamilyOptions SanitizeOptions(const InternalKeyComparator* icmp,
-                                    const InternalFilterPolicy* ipolicy,
-                                    const ColumnFamilyOptions& src) {
-  ColumnFamilyOptions result = src;
-  result.comparator = icmp;
-  result.filter_policy = (src.filter_policy != nullptr) ? ipolicy : nullptr;
-#ifdef OS_MACOSX
-  // TODO(icanadi) make write_buffer_size uint64_t instead of size_t
-  ClipToRange(&result.write_buffer_size, ((size_t)64) << 10, ((size_t)1) << 30);
-#else
-  ClipToRange(&result.write_buffer_size,
-              ((size_t)64) << 10, ((size_t)64) << 30);
-#endif
-  // if user sets arena_block_size, we trust user to use this value. Otherwise,
-  // calculate a proper value from writer_buffer_size;
-  if (result.arena_block_size <= 0) {
-    result.arena_block_size = result.write_buffer_size / 10;
-  }
-  result.min_write_buffer_number_to_merge =
-      std::min(result.min_write_buffer_number_to_merge,
-               result.max_write_buffer_number - 1);
-  if (result.block_cache == nullptr && !result.no_block_cache) {
-    result.block_cache = NewLRUCache(8 << 20);
-  }
-  result.compression_per_level = src.compression_per_level;
-  if (result.block_size_deviation < 0 || result.block_size_deviation > 100) {
-    result.block_size_deviation = 0;
-  }
-  if (result.max_mem_compaction_level >= result.num_levels) {
-    result.max_mem_compaction_level = result.num_levels - 1;
-  }
-  if (result.soft_rate_limit > result.hard_rate_limit) {
-    result.soft_rate_limit = result.hard_rate_limit;
-  }
-  if (!result.prefix_extractor) {
-    assert(result.memtable_factory);
-    Slice name = result.memtable_factory->Name();
-    if (name.compare("HashSkipListRepFactory") == 0 ||
-        name.compare("HashLinkListRepFactory") == 0) {
-      result.memtable_factory = std::make_shared<SkipListFactory>();
-    }
-  }
-
-  // -- Sanitize the table properties collector
-  // All user defined properties collectors will be wrapped by
-  // UserKeyTablePropertiesCollector since for them they only have the
-  // knowledge of the user keys; internal keys are invisible to them.
-  auto& collectors = result.table_properties_collectors;
-  for (size_t i = 0; i < result.table_properties_collectors.size(); ++i) {
-    assert(collectors[i]);
-    collectors[i] =
-        std::make_shared<UserKeyTablePropertiesCollector>(collectors[i]);
-  }
-  // Add collector to collect internal key statistics
-  collectors.push_back(std::make_shared<InternalKeyPropertiesCollector>());
-
-  return result;
-}
-
-int SuperVersion::dummy = 0;
-void* const SuperVersion::kSVInUse = &SuperVersion::dummy;
-void* const SuperVersion::kSVObsolete = nullptr;
-
-SuperVersion::~SuperVersion() {
-  for (auto td : to_delete) {
-    delete td;
-  }
-}
-
-SuperVersion* SuperVersion::Ref() {
-  refs.fetch_add(1, std::memory_order_relaxed);
-  return this;
-}
-
-bool SuperVersion::Unref() {
-  // fetch_sub returns the previous value of ref
-  uint32_t previous_refs = refs.fetch_sub(1, std::memory_order_relaxed);
-  assert(previous_refs > 0);
-  return previous_refs == 1;
-}
-
-void SuperVersion::Cleanup() {
-  assert(refs.load(std::memory_order_relaxed) == 0);
-  imm->Unref(&to_delete);
-  MemTable* m = mem->Unref();
-  if (m != nullptr) {
-    to_delete.push_back(m);
-  }
-  current->Unref();
-}
-
-void SuperVersion::Init(MemTable* new_mem, MemTableListVersion* new_imm,
-                        Version* new_current) {
-  mem = new_mem;
-  imm = new_imm;
-  current = new_current;
-  mem->Ref();
-  imm->Ref();
-  current->Ref();
-  refs.store(1, std::memory_order_relaxed);
-}
-
-namespace {
-void SuperVersionUnrefHandle(void* ptr) {
-  // UnrefHandle is called when a thread exists or a ThreadLocalPtr gets
-  // destroyed. When former happens, the thread shouldn't see kSVInUse.
-  // When latter happens, we are in ~ColumnFamilyData(), no get should happen as
-  // well.
-  SuperVersion* sv = static_cast<SuperVersion*>(ptr);
-  if (sv->Unref()) {
-    sv->db_mutex->Lock();
-    sv->Cleanup();
-    sv->db_mutex->Unlock();
-    delete sv;
-  }
-}
-}  // anonymous namespace
-
-ColumnFamilyData::ColumnFamilyData(const std::string& dbname, uint32_t id,
-                                   const std::string& name,
-                                   Version* dummy_versions, Cache* table_cache,
-                                   const ColumnFamilyOptions& options,
-                                   const DBOptions* db_options,
-                                   const EnvOptions& storage_options,
-                                   ColumnFamilySet* column_family_set)
-    : id_(id),
-      name_(name),
-      dummy_versions_(dummy_versions),
-      current_(nullptr),
-      refs_(0),
-      dropped_(false),
-      internal_comparator_(options.comparator),
-      internal_filter_policy_(options.filter_policy),
-      options_(*db_options, SanitizeOptions(&internal_comparator_,
-                                            &internal_filter_policy_, options)),
-      mem_(nullptr),
-      imm_(options.min_write_buffer_number_to_merge),
-      super_version_(nullptr),
-      super_version_number_(0),
-      local_sv_(new ThreadLocalPtr(&SuperVersionUnrefHandle)),
-      next_(nullptr),
-      prev_(nullptr),
-      log_number_(0),
-      need_slowdown_for_num_level0_files_(false),
-      column_family_set_(column_family_set) {
-  Ref();
-
-  // if dummy_versions is nullptr, then this is a dummy column family.
-  if (dummy_versions != nullptr) {
-    internal_stats_.reset(new InternalStats(options.num_levels, db_options->env,
-                                            db_options->statistics.get()));
-    table_cache_.reset(
-        new TableCache(dbname, &options_, storage_options, table_cache));
-    if (options_.compaction_style == kCompactionStyleUniversal) {
-      compaction_picker_.reset(
-          new UniversalCompactionPicker(&options_, &internal_comparator_));
-    } else {
-      compaction_picker_.reset(
-          new LevelCompactionPicker(&options_, &internal_comparator_));
-    }
-
-    Log(options_.info_log, "Options for column family \"%s\":\n",
-        name.c_str());
-    const ColumnFamilyOptions* cf_options = &options_;
-    cf_options->Dump(options_.info_log.get());
-  }
-}
-
-// DB mutex held
-ColumnFamilyData::~ColumnFamilyData() {
-  assert(refs_ == 0);
-  // remove from linked list
-  auto prev = prev_;
-  auto next = next_;
-  prev->next_ = next;
-  next->prev_ = prev;
-
-  // it's nullptr for dummy CFD
-  if (column_family_set_ != nullptr) {
-    // remove from column_family_set
-    column_family_set_->RemoveColumnFamily(this);
-  }
-
-  if (current_ != nullptr) {
-    current_->Unref();
-  }
-
-  if (super_version_ != nullptr) {
-    // Release SuperVersion reference kept in ThreadLocalPtr.
-    // This must be done outside of mutex_ since unref handler can lock mutex.
-    super_version_->db_mutex->Unlock();
-    local_sv_.reset();
-    super_version_->db_mutex->Lock();
-
-    bool is_last_reference __attribute__((unused));
-    is_last_reference = super_version_->Unref();
-    assert(is_last_reference);
-    super_version_->Cleanup();
-    delete super_version_;
-    super_version_ = nullptr;
-  }
-
-  if (dummy_versions_ != nullptr) {
-    // List must be empty
-    assert(dummy_versions_->next_ == dummy_versions_);
-    delete dummy_versions_;
-  }
-
-  if (mem_ != nullptr) {
-    delete mem_->Unref();
-  }
-  autovector<MemTable*> to_delete;
-  imm_.current()->Unref(&to_delete);
-  for (MemTable* m : to_delete) {
-    delete m;
-  }
-}
-
-const EnvOptions* ColumnFamilyData::soptions() const {
-  return &(column_family_set_->storage_options_);
-}
-
-void ColumnFamilyData::SetCurrent(Version* current) {
-  current_ = current;
-  need_slowdown_for_num_level0_files_ =
-      (options_.level0_slowdown_writes_trigger >= 0 &&
-       current_->NumLevelFiles(0) >= options_.level0_slowdown_writes_trigger);
-}
-
-void ColumnFamilyData::CreateNewMemtable() {
-  assert(current_ != nullptr);
-  if (mem_ != nullptr) {
-    delete mem_->Unref();
-  }
-  mem_ = new MemTable(internal_comparator_, options_);
-  mem_->Ref();
-}
-
-Compaction* ColumnFamilyData::PickCompaction(LogBuffer* log_buffer) {
-  return compaction_picker_->PickCompaction(current_, log_buffer);
-}
-
-Compaction* ColumnFamilyData::CompactRange(int input_level, int output_level,
-                                           const InternalKey* begin,
-                                           const InternalKey* end,
-                                           InternalKey** compaction_end) {
-  return compaction_picker_->CompactRange(current_, input_level, output_level,
-                                          begin, end, compaction_end);
-}
-
-SuperVersion* ColumnFamilyData::GetReferencedSuperVersion(
-    port::Mutex* db_mutex) {
-  SuperVersion* sv = nullptr;
-  if (LIKELY(column_family_set_->db_options_->allow_thread_local)) {
-    sv = GetThreadLocalSuperVersion(db_mutex);
-    sv->Ref();
-    if (!ReturnThreadLocalSuperVersion(sv)) {
-      sv->Unref();
-    }
-  } else {
-    db_mutex->Lock();
-    sv = super_version_->Ref();
-    db_mutex->Unlock();
-  }
-  return sv;
-}
-
-SuperVersion* ColumnFamilyData::GetThreadLocalSuperVersion(
-    port::Mutex* db_mutex) {
-  SuperVersion* sv = nullptr;
-  // The SuperVersion is cached in thread local storage to avoid acquiring
-  // mutex when SuperVersion does not change since the last use. When a new
-  // SuperVersion is installed, the compaction or flush thread cleans up
-  // cached SuperVersion in all existing thread local storage. To avoid
-  // acquiring mutex for this operation, we use atomic Swap() on the thread
-  // local pointer to guarantee exclusive access. If the thread local pointer
-  // is being used while a new SuperVersion is installed, the cached
-  // SuperVersion can become stale. In that case, the background thread would
-  // have swapped in kSVObsolete. We re-check the value at when returning
-  // SuperVersion back to thread local, with an atomic compare and swap.
-  // The superversion will need to be released if detected to be stale.
-  void* ptr = local_sv_->Swap(SuperVersion::kSVInUse);
-  // Invariant:
-  // (1) Scrape (always) installs kSVObsolete in ThreadLocal storage
-  // (2) the Swap above (always) installs kSVInUse, ThreadLocal storage
-  // should only keep kSVInUse before ReturnThreadLocalSuperVersion call
-  // (if no Scrape happens).
-  assert(ptr != SuperVersion::kSVInUse);
-  sv = static_cast<SuperVersion*>(ptr);
-  if (sv == SuperVersion::kSVObsolete ||
-      sv->version_number != super_version_number_.load()) {
-    RecordTick(options_.statistics.get(), NUMBER_SUPERVERSION_ACQUIRES);
-    SuperVersion* sv_to_delete = nullptr;
-
-    if (sv && sv->Unref()) {
-      RecordTick(options_.statistics.get(), NUMBER_SUPERVERSION_CLEANUPS);
-      db_mutex->Lock();
-      // NOTE: underlying resources held by superversion (sst files) might
-      // not be released until the next background job.
-      sv->Cleanup();
-      sv_to_delete = sv;
-    } else {
-      db_mutex->Lock();
-    }
-    sv = super_version_->Ref();
-    db_mutex->Unlock();
-
-    delete sv_to_delete;
-  }
-  assert(sv != nullptr);
-  return sv;
-}
-
-bool ColumnFamilyData::ReturnThreadLocalSuperVersion(SuperVersion* sv) {
-  assert(sv != nullptr);
-  // Put the SuperVersion back
-  void* expected = SuperVersion::kSVInUse;
-  if (local_sv_->CompareAndSwap(static_cast<void*>(sv), expected)) {
-    // When we see kSVInUse in the ThreadLocal, we are sure ThreadLocal
-    // storage has not been altered and no Scrape has happend. The
-    // SuperVersion is still current.
-    return true;
-  } else {
-    // ThreadLocal scrape happened in the process of this GetImpl call (after
-    // thread local Swap() at the beginning and before CompareAndSwap()).
-    // This means the SuperVersion it holds is obsolete.
-    assert(expected == SuperVersion::kSVObsolete);
-  }
-  return false;
-}
-
-SuperVersion* ColumnFamilyData::InstallSuperVersion(
-    SuperVersion* new_superversion, port::Mutex* db_mutex) {
-  new_superversion->db_mutex = db_mutex;
-  new_superversion->Init(mem_, imm_.current(), current_);
-  SuperVersion* old_superversion = super_version_;
-  super_version_ = new_superversion;
-  ++super_version_number_;
-  super_version_->version_number = super_version_number_;
-  // Reset SuperVersions cached in thread local storage
-  if (column_family_set_->db_options_->allow_thread_local) {
-    ResetThreadLocalSuperVersions();
-  }
-  if (old_superversion != nullptr && old_superversion->Unref()) {
-    old_superversion->Cleanup();
-    return old_superversion;  // will let caller delete outside of mutex
-  }
-  return nullptr;
-}
-
-void ColumnFamilyData::ResetThreadLocalSuperVersions() {
-  autovector<void*> sv_ptrs;
-  local_sv_->Scrape(&sv_ptrs, SuperVersion::kSVObsolete);
-  for (auto ptr : sv_ptrs) {
-    assert(ptr);
-    if (ptr == SuperVersion::kSVInUse) {
-      continue;
-    }
-    auto sv = static_cast<SuperVersion*>(ptr);
-    if (sv->Unref()) {
-      sv->Cleanup();
-      delete sv;
-    }
-  }
-}
-
-ColumnFamilySet::ColumnFamilySet(const std::string& dbname,
-                                 const DBOptions* db_options,
-                                 const EnvOptions& storage_options,
-                                 Cache* table_cache)
-    : max_column_family_(0),
-      dummy_cfd_(new ColumnFamilyData(dbname, 0, "", nullptr, nullptr,
-                                      ColumnFamilyOptions(), db_options,
-                                      storage_options_, nullptr)),
-      default_cfd_cache_(nullptr),
-      db_name_(dbname),
-      db_options_(db_options),
-      storage_options_(storage_options),
-      table_cache_(table_cache),
-      spin_lock_(ATOMIC_FLAG_INIT) {
-  // initialize linked list
-  dummy_cfd_->prev_ = dummy_cfd_;
-  dummy_cfd_->next_ = dummy_cfd_;
-}
-
-ColumnFamilySet::~ColumnFamilySet() {
-  while (column_family_data_.size() > 0) {
-    // cfd destructor will delete itself from column_family_data_
-    auto cfd = column_family_data_.begin()->second;
-    cfd->Unref();
-    delete cfd;
-  }
-  dummy_cfd_->Unref();
-  delete dummy_cfd_;
-}
-
-ColumnFamilyData* ColumnFamilySet::GetDefault() const {
-  assert(default_cfd_cache_ != nullptr);
-  return default_cfd_cache_;
-}
-
-ColumnFamilyData* ColumnFamilySet::GetColumnFamily(uint32_t id) const {
-  auto cfd_iter = column_family_data_.find(id);
-  if (cfd_iter != column_family_data_.end()) {
-    return cfd_iter->second;
-  } else {
-    return nullptr;
-  }
-}
-
-ColumnFamilyData* ColumnFamilySet::GetColumnFamily(const std::string& name)
-    const {
-  auto cfd_iter = column_families_.find(name);
-  if (cfd_iter != column_families_.end()) {
-    auto cfd = GetColumnFamily(cfd_iter->second);
-    assert(cfd != nullptr);
-    return cfd;
-  } else {
-    return nullptr;
-  }
-}
-
-uint32_t ColumnFamilySet::GetNextColumnFamilyID() {
-  return ++max_column_family_;
-}
-
-uint32_t ColumnFamilySet::GetMaxColumnFamily() { return max_column_family_; }
-
-void ColumnFamilySet::UpdateMaxColumnFamily(uint32_t new_max_column_family) {
-  max_column_family_ = std::max(new_max_column_family, max_column_family_);
-}
-
-// under a DB mutex
-ColumnFamilyData* ColumnFamilySet::CreateColumnFamily(
-    const std::string& name, uint32_t id, Version* dummy_versions,
-    const ColumnFamilyOptions& options) {
-  assert(column_families_.find(name) == column_families_.end());
-  ColumnFamilyData* new_cfd =
-      new ColumnFamilyData(db_name_, id, name, dummy_versions, table_cache_,
-                           options, db_options_, storage_options_, this);
-  Lock();
-  column_families_.insert({name, id});
-  column_family_data_.insert({id, new_cfd});
-  Unlock();
-  max_column_family_ = std::max(max_column_family_, id);
-  // add to linked list
-  new_cfd->next_ = dummy_cfd_;
-  auto prev = dummy_cfd_->prev_;
-  new_cfd->prev_ = prev;
-  prev->next_ = new_cfd;
-  dummy_cfd_->prev_ = new_cfd;
-  if (id == 0) {
-    default_cfd_cache_ = new_cfd;
-  }
-  return new_cfd;
-}
-
-void ColumnFamilySet::Lock() {
-  // spin lock
-  while (spin_lock_.test_and_set(std::memory_order_acquire)) {
-  }
-}
-
-void ColumnFamilySet::Unlock() { spin_lock_.clear(std::memory_order_release); }
-
-// REQUIRES: DB mutex held
-void ColumnFamilySet::FreeDeadColumnFamilies() {
-  autovector<ColumnFamilyData*> to_delete;
-  for (auto cfd = dummy_cfd_->next_; cfd != dummy_cfd_; cfd = cfd->next_) {
-    if (cfd->refs_ == 0) {
-      to_delete.push_back(cfd);
-    }
-  }
-  for (auto cfd : to_delete) {
-    // this is very rare, so it's not a problem that we do it under a mutex
-    delete cfd;
-  }
-}
-
-// under a DB mutex
-void ColumnFamilySet::RemoveColumnFamily(ColumnFamilyData* cfd) {
-  auto cfd_iter = column_family_data_.find(cfd->GetID());
-  assert(cfd_iter != column_family_data_.end());
-  Lock();
-  column_family_data_.erase(cfd_iter);
-  column_families_.erase(cfd->GetName());
-  Unlock();
-}
-
-bool ColumnFamilyMemTablesImpl::Seek(uint32_t column_family_id) {
-  if (column_family_id == 0) {
-    // optimization for common case
-    current_ = column_family_set_->GetDefault();
-  } else {
-    // maybe outside of db mutex, should lock
-    column_family_set_->Lock();
-    current_ = column_family_set_->GetColumnFamily(column_family_id);
-    column_family_set_->Unlock();
-  }
-  handle_.SetCFD(current_);
-  return current_ != nullptr;
-}
-
-uint64_t ColumnFamilyMemTablesImpl::GetLogNumber() const {
-  assert(current_ != nullptr);
-  return current_->GetLogNumber();
-}
-
-MemTable* ColumnFamilyMemTablesImpl::GetMemTable() const {
-  assert(current_ != nullptr);
-  return current_->mem();
-}
-
-const Options* ColumnFamilyMemTablesImpl::GetOptions() const {
-  assert(current_ != nullptr);
-  return current_->options();
-}
-
-ColumnFamilyHandle* ColumnFamilyMemTablesImpl::GetColumnFamilyHandle() {
-  assert(current_ != nullptr);
-  return &handle_;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/column_family.h b/src/rocksdb/db/column_family.h
deleted file mode 100644
index d306f4e..0000000
--- a/src/rocksdb/db/column_family.h
+++ /dev/null
@@ -1,418 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#include <unordered_map>
-#include <string>
-#include <vector>
-#include <atomic>
-
-#include "rocksdb/options.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "db/memtable_list.h"
-#include "db/write_batch_internal.h"
-#include "db/table_cache.h"
-#include "util/thread_local.h"
-
-namespace rocksdb {
-
-class Version;
-class VersionSet;
-class MemTable;
-class MemTableListVersion;
-class CompactionPicker;
-class Compaction;
-class InternalKey;
-class InternalStats;
-class ColumnFamilyData;
-class DBImpl;
-class LogBuffer;
-
-// ColumnFamilyHandleImpl is the class that clients use to access different
-// column families. It has non-trivial destructor, which gets called when client
-// is done using the column family
-class ColumnFamilyHandleImpl : public ColumnFamilyHandle {
- public:
-  // create while holding the mutex
-  ColumnFamilyHandleImpl(ColumnFamilyData* cfd, DBImpl* db, port::Mutex* mutex);
-  // destroy without mutex
-  virtual ~ColumnFamilyHandleImpl();
-  virtual ColumnFamilyData* cfd() const { return cfd_; }
-
-  virtual uint32_t GetID() const;
-
- private:
-  ColumnFamilyData* cfd_;
-  DBImpl* db_;
-  port::Mutex* mutex_;
-};
-
-// Does not ref-count ColumnFamilyData
-// We use this dummy ColumnFamilyHandleImpl because sometimes MemTableInserter
-// calls DBImpl methods. When this happens, MemTableInserter need access to
-// ColumnFamilyHandle (same as the client would need). In that case, we feed
-// MemTableInserter dummy ColumnFamilyHandle and enable it to call DBImpl
-// methods
-class ColumnFamilyHandleInternal : public ColumnFamilyHandleImpl {
- public:
-  ColumnFamilyHandleInternal()
-      : ColumnFamilyHandleImpl(nullptr, nullptr, nullptr) {}
-
-  void SetCFD(ColumnFamilyData* cfd) { internal_cfd_ = cfd; }
-  virtual ColumnFamilyData* cfd() const override { return internal_cfd_; }
-
- private:
-  ColumnFamilyData* internal_cfd_;
-};
-
-// holds references to memtable, all immutable memtables and version
-struct SuperVersion {
-  MemTable* mem;
-  MemTableListVersion* imm;
-  Version* current;
-  std::atomic<uint32_t> refs;
-  // We need to_delete because during Cleanup(), imm->Unref() returns
-  // all memtables that we need to free through this vector. We then
-  // delete all those memtables outside of mutex, during destruction
-  autovector<MemTable*> to_delete;
-  // Version number of the current SuperVersion
-  uint64_t version_number;
-  port::Mutex* db_mutex;
-
-  // should be called outside the mutex
-  SuperVersion() = default;
-  ~SuperVersion();
-  SuperVersion* Ref();
-
-  bool Unref();
-
-  // call these two methods with db mutex held
-  // Cleanup unrefs mem, imm and current. Also, it stores all memtables
-  // that needs to be deleted in to_delete vector. Unrefing those
-  // objects needs to be done in the mutex
-  void Cleanup();
-  void Init(MemTable* new_mem, MemTableListVersion* new_imm,
-            Version* new_current);
-
-  // The value of dummy is not actually used. kSVInUse takes its address as a
-  // mark in the thread local storage to indicate the SuperVersion is in use
-  // by thread. This way, the value of kSVInUse is guaranteed to have no
-  // conflict with SuperVersion object address and portable on different
-  // platform.
-  static int dummy;
-  static void* const kSVInUse;
-  static void* const kSVObsolete;
-};
-
-extern ColumnFamilyOptions SanitizeOptions(const InternalKeyComparator* icmp,
-                                           const InternalFilterPolicy* ipolicy,
-                                           const ColumnFamilyOptions& src);
-
-class ColumnFamilySet;
-
-// This class keeps all the data that a column family needs. It's mosly dumb and
-// used just to provide access to metadata.
-// Most methods require DB mutex held, unless otherwise noted
-class ColumnFamilyData {
- public:
-  ~ColumnFamilyData();
-
-  // thread-safe
-  uint32_t GetID() const { return id_; }
-  // thread-safe
-  const std::string& GetName() const { return name_; }
-
-  void Ref() { ++refs_; }
-  // will just decrease reference count to 0, but will not delete it. returns
-  // true if the ref count was decreased to zero. in that case, it can be
-  // deleted by the caller immediatelly, or later, by calling
-  // FreeDeadColumnFamilies()
-  bool Unref() {
-    assert(refs_ > 0);
-    return --refs_ == 0;
-  }
-
-  // This can only be called from single-threaded VersionSet::LogAndApply()
-  // After dropping column family no other operation on that column family
-  // will be executed. All the files and memory will be, however, kept around
-  // until client drops the column family handle. That way, client can still
-  // access data from dropped column family.
-  // Column family can be dropped and still alive. In that state:
-  // *) Column family is not included in the iteration.
-  // *) Compaction and flush is not executed on the dropped column family.
-  // *) Client can continue writing and reading from column family. However, all
-  // writes stay in the current memtable.
-  // When the dropped column family is unreferenced, then we:
-  // *) delete all memory associated with that column family
-  // *) delete all the files associated with that column family
-  void SetDropped() {
-    // can't drop default CF
-    assert(id_ != 0);
-    dropped_ = true;
-  }
-  bool IsDropped() const { return dropped_; }
-
-  // thread-safe
-  int NumberLevels() const { return options_.num_levels; }
-
-  void SetLogNumber(uint64_t log_number) { log_number_ = log_number; }
-  uint64_t GetLogNumber() const { return log_number_; }
-
-  // thread-safe
-  const Options* options() const { return &options_; }
-  const EnvOptions* soptions() const;
-
-  InternalStats* internal_stats() { return internal_stats_.get(); }
-
-  MemTableList* imm() { return &imm_; }
-  MemTable* mem() { return mem_; }
-  Version* current() { return current_; }
-  Version* dummy_versions() { return dummy_versions_; }
-  void SetMemtable(MemTable* new_mem) { mem_ = new_mem; }
-  void SetCurrent(Version* current);
-  void CreateNewMemtable();
-
-  TableCache* table_cache() { return table_cache_.get(); }
-
-  // See documentation in compaction_picker.h
-  Compaction* PickCompaction(LogBuffer* log_buffer);
-  Compaction* CompactRange(int input_level, int output_level,
-                           const InternalKey* begin, const InternalKey* end,
-                           InternalKey** compaction_end);
-
-  CompactionPicker* compaction_picker() { return compaction_picker_.get(); }
-  // thread-safe
-  const Comparator* user_comparator() const {
-    return internal_comparator_.user_comparator();
-  }
-  // thread-safe
-  const InternalKeyComparator& internal_comparator() const {
-    return internal_comparator_;
-  }
-
-  SuperVersion* GetSuperVersion() { return super_version_; }
-  // thread-safe
-  // Return a already referenced SuperVersion to be used safely.
-  SuperVersion* GetReferencedSuperVersion(port::Mutex* db_mutex);
-  // thread-safe
-  // Get SuperVersion stored in thread local storage. If it does not exist,
-  // get a reference from a current SuperVersion.
-  SuperVersion* GetThreadLocalSuperVersion(port::Mutex* db_mutex);
-  // Try to return SuperVersion back to thread local storage. Retrun true on
-  // success and false on failure. It fails when the thread local storage
-  // contains anything other than SuperVersion::kSVInUse flag.
-  bool ReturnThreadLocalSuperVersion(SuperVersion* sv);
-  // thread-safe
-  uint64_t GetSuperVersionNumber() const {
-    return super_version_number_.load();
-  }
-  // will return a pointer to SuperVersion* if previous SuperVersion
-  // if its reference count is zero and needs deletion or nullptr if not
-  // As argument takes a pointer to allocated SuperVersion to enable
-  // the clients to allocate SuperVersion outside of mutex.
-  SuperVersion* InstallSuperVersion(SuperVersion* new_superversion,
-                                    port::Mutex* db_mutex);
-
-  void ResetThreadLocalSuperVersions();
-
-  // A Flag indicating whether write needs to slowdown because of there are
-  // too many number of level0 files.
-  bool NeedSlowdownForNumLevel0Files() const {
-    return need_slowdown_for_num_level0_files_;
-  }
-
- private:
-  friend class ColumnFamilySet;
-  ColumnFamilyData(const std::string& dbname, uint32_t id,
-                   const std::string& name, Version* dummy_versions,
-                   Cache* table_cache, const ColumnFamilyOptions& options,
-                   const DBOptions* db_options,
-                   const EnvOptions& storage_options,
-                   ColumnFamilySet* column_family_set);
-
-  uint32_t id_;
-  const std::string name_;
-  Version* dummy_versions_;  // Head of circular doubly-linked list of versions.
-  Version* current_;         // == dummy_versions->prev_
-
-  int refs_;                   // outstanding references to ColumnFamilyData
-  bool dropped_;               // true if client dropped it
-
-  const InternalKeyComparator internal_comparator_;
-  const InternalFilterPolicy internal_filter_policy_;
-
-  Options const options_;
-
-  std::unique_ptr<TableCache> table_cache_;
-
-  std::unique_ptr<InternalStats> internal_stats_;
-
-  MemTable* mem_;
-  MemTableList imm_;
-  SuperVersion* super_version_;
-
-  // An ordinal representing the current SuperVersion. Updated by
-  // InstallSuperVersion(), i.e. incremented every time super_version_
-  // changes.
-  std::atomic<uint64_t> super_version_number_;
-
-  // Thread's local copy of SuperVersion pointer
-  // This needs to be destructed before mutex_
-  std::unique_ptr<ThreadLocalPtr> local_sv_;
-
-  // pointers for a circular linked list. we use it to support iterations
-  // that can be concurrent with writes
-  ColumnFamilyData* next_;
-  ColumnFamilyData* prev_;
-
-  // This is the earliest log file number that contains data from this
-  // Column Family. All earlier log files must be ignored and not
-  // recovered from
-  uint64_t log_number_;
-
-  // A flag indicating whether we should delay writes because
-  // we have too many level 0 files
-  bool need_slowdown_for_num_level0_files_;
-
-  // An object that keeps all the compaction stats
-  // and picks the next compaction
-  std::unique_ptr<CompactionPicker> compaction_picker_;
-
-  ColumnFamilySet* column_family_set_;
-};
-
-// ColumnFamilySet has interesting thread-safety requirements
-// * CreateColumnFamily() or RemoveColumnFamily() -- need to protect by DB
-// mutex. Inside, column_family_data_ and column_families_ will be protected
-// by Lock() and Unlock(). CreateColumnFamily() should ONLY be called from
-// VersionSet::LogAndApply() in the normal runtime. It is also called
-// during Recovery and in DumpManifest(). RemoveColumnFamily() is called
-// from ColumnFamilyData destructor
-// * Iteration -- hold DB mutex, but you can release it in the body of
-// iteration. If you release DB mutex in body, reference the column
-// family before the mutex and unreference after you unlock, since the column
-// family might get dropped when the DB mutex is released
-// * GetDefault() -- thread safe
-// * GetColumnFamily() -- either inside of DB mutex or call Lock() <-> Unlock()
-// * GetNextColumnFamilyID(), GetMaxColumnFamily(), UpdateMaxColumnFamily() --
-// inside of DB mutex
-class ColumnFamilySet {
- public:
-  // ColumnFamilySet supports iteration
-  class iterator {
-   public:
-    explicit iterator(ColumnFamilyData* cfd)
-        : current_(cfd) {}
-    iterator& operator++() {
-      // dummy is never dead or dropped, so this will never be infinite
-      do {
-        current_ = current_->next_;
-      } while (current_->refs_ == 0 || current_->IsDropped());
-      return *this;
-    }
-    bool operator!=(const iterator& other) {
-      return this->current_ != other.current_;
-    }
-    ColumnFamilyData* operator*() { return current_; }
-
-   private:
-    ColumnFamilyData* current_;
-  };
-
-  ColumnFamilySet(const std::string& dbname, const DBOptions* db_options,
-                  const EnvOptions& storage_options, Cache* table_cache);
-  ~ColumnFamilySet();
-
-  ColumnFamilyData* GetDefault() const;
-  // GetColumnFamily() calls return nullptr if column family is not found
-  ColumnFamilyData* GetColumnFamily(uint32_t id) const;
-  ColumnFamilyData* GetColumnFamily(const std::string& name) const;
-  // this call will return the next available column family ID. it guarantees
-  // that there is no column family with id greater than or equal to the
-  // returned value in the current running instance or anytime in RocksDB
-  // instance history.
-  uint32_t GetNextColumnFamilyID();
-  uint32_t GetMaxColumnFamily();
-  void UpdateMaxColumnFamily(uint32_t new_max_column_family);
-
-  ColumnFamilyData* CreateColumnFamily(const std::string& name, uint32_t id,
-                                       Version* dummy_version,
-                                       const ColumnFamilyOptions& options);
-
-  iterator begin() { return iterator(dummy_cfd_->next_); }
-  iterator end() { return iterator(dummy_cfd_); }
-
-  void Lock();
-  void Unlock();
-
-  // REQUIRES: DB mutex held
-  // Don't call while iterating over ColumnFamilySet
-  void FreeDeadColumnFamilies();
-
- private:
-  friend class ColumnFamilyData;
-  // helper function that gets called from cfd destructor
-  // REQUIRES: DB mutex held
-  void RemoveColumnFamily(ColumnFamilyData* cfd);
-
-  // column_families_ and column_family_data_ need to be protected:
-  // * when mutating: 1. DB mutex locked first, 2. spinlock locked second
-  // * when reading, either: 1. lock DB mutex, or 2. lock spinlock
-  //  (if both, respect the ordering to avoid deadlock!)
-  std::unordered_map<std::string, uint32_t> column_families_;
-  std::unordered_map<uint32_t, ColumnFamilyData*> column_family_data_;
-
-  uint32_t max_column_family_;
-  ColumnFamilyData* dummy_cfd_;
-  // We don't hold the refcount here, since default column family always exists
-  // We are also not responsible for cleaning up default_cfd_cache_. This is
-  // just a cache that makes common case (accessing default column family)
-  // faster
-  ColumnFamilyData* default_cfd_cache_;
-
-  const std::string db_name_;
-  const DBOptions* const db_options_;
-  const EnvOptions storage_options_;
-  Cache* table_cache_;
-  std::atomic_flag spin_lock_;
-};
-
-// We use ColumnFamilyMemTablesImpl to provide WriteBatch a way to access
-// memtables of different column families (specified by ID in the write batch)
-class ColumnFamilyMemTablesImpl : public ColumnFamilyMemTables {
- public:
-  explicit ColumnFamilyMemTablesImpl(ColumnFamilySet* column_family_set)
-      : column_family_set_(column_family_set), current_(nullptr) {}
-
-  // sets current_ to ColumnFamilyData with column_family_id
-  // returns false if column family doesn't exist
-  bool Seek(uint32_t column_family_id) override;
-
-  // Returns log number of the selected column family
-  uint64_t GetLogNumber() const override;
-
-  // REQUIRES: Seek() called first
-  virtual MemTable* GetMemTable() const override;
-
-  // Returns options for selected column family
-  // REQUIRES: Seek() called first
-  virtual const Options* GetOptions() const override;
-
-  // Returns column family handle for the selected column family
-  virtual ColumnFamilyHandle* GetColumnFamilyHandle() override;
-
- private:
-  ColumnFamilySet* column_family_set_;
-  ColumnFamilyData* current_;
-  ColumnFamilyHandleInternal handle_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/column_family_test.cc b/src/rocksdb/db/column_family_test.cc
deleted file mode 100644
index 5f7ff48..0000000
--- a/src/rocksdb/db/column_family_test.cc
+++ /dev/null
@@ -1,977 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <algorithm>
-#include <vector>
-#include <string>
-
-#include "db/db_impl.h"
-#include "rocksdb/env.h"
-#include "rocksdb/db.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-#include "util/coding.h"
-#include "utilities/merge_operators.h"
-
-namespace rocksdb {
-
-namespace {
-std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-}  // anonymous namespace
-
-// counts how many operations were performed
-class EnvCounter : public EnvWrapper {
- public:
-  explicit EnvCounter(Env* base)
-      : EnvWrapper(base), num_new_writable_file_(0) {}
-  int GetNumberOfNewWritableFileCalls() {
-    return num_new_writable_file_;
-  }
-  Status NewWritableFile(const std::string& f, unique_ptr<WritableFile>* r,
-                         const EnvOptions& soptions) {
-    ++num_new_writable_file_;
-    return EnvWrapper::NewWritableFile(f, r, soptions);
-  }
-
- private:
-  int num_new_writable_file_;
-};
-
-class ColumnFamilyTest {
- public:
-  ColumnFamilyTest() : rnd_(139) {
-    env_ = new EnvCounter(Env::Default());
-    dbname_ = test::TmpDir() + "/column_family_test";
-    db_options_.create_if_missing = true;
-    db_options_.env = env_;
-    DestroyDB(dbname_, Options(db_options_, column_family_options_));
-  }
-
-  ~ColumnFamilyTest() {
-    delete env_;
-  }
-
-  void Close() {
-    for (auto h : handles_) {
-      delete h;
-    }
-    handles_.clear();
-    names_.clear();
-    delete db_;
-    db_ = nullptr;
-  }
-
-  Status TryOpen(std::vector<std::string> cf,
-                 std::vector<ColumnFamilyOptions> options = {}) {
-    std::vector<ColumnFamilyDescriptor> column_families;
-    names_.clear();
-    for (size_t i = 0; i < cf.size(); ++i) {
-      column_families.push_back(ColumnFamilyDescriptor(
-          cf[i], options.size() == 0 ? column_family_options_ : options[i]));
-      names_.push_back(cf[i]);
-    }
-    return DB::Open(db_options_, dbname_, column_families, &handles_, &db_);
-  }
-
-  Status OpenReadOnly(std::vector<std::string> cf,
-                         std::vector<ColumnFamilyOptions> options = {}) {
-    std::vector<ColumnFamilyDescriptor> column_families;
-    names_.clear();
-    for (size_t i = 0; i < cf.size(); ++i) {
-      column_families.push_back(ColumnFamilyDescriptor(
-          cf[i], options.size() == 0 ? column_family_options_ : options[i]));
-      names_.push_back(cf[i]);
-    }
-    return DB::OpenForReadOnly(db_options_, dbname_, column_families, &handles_,
-                               &db_);
-  }
-
-  void AssertOpenReadOnly(std::vector<std::string> cf,
-                    std::vector<ColumnFamilyOptions> options = {}) {
-    ASSERT_OK(OpenReadOnly(cf, options));
-  }
-
-
-  void Open(std::vector<std::string> cf,
-            std::vector<ColumnFamilyOptions> options = {}) {
-    ASSERT_OK(TryOpen(cf, options));
-  }
-
-  void Open() {
-    Open({"default"});
-  }
-
-  DBImpl* dbfull() { return reinterpret_cast<DBImpl*>(db_); }
-
-  int GetProperty(int cf, std::string property) {
-    std::string value;
-    ASSERT_TRUE(dbfull()->GetProperty(handles_[cf], property, &value));
-    return std::stoi(value);
-  }
-
-  void Destroy() {
-    for (auto h : handles_) {
-      delete h;
-    }
-    handles_.clear();
-    names_.clear();
-    delete db_;
-    db_ = nullptr;
-    ASSERT_OK(DestroyDB(dbname_, Options(db_options_, column_family_options_)));
-  }
-
-  void CreateColumnFamilies(
-      const std::vector<std::string>& cfs,
-      const std::vector<ColumnFamilyOptions> options = {}) {
-    int cfi = handles_.size();
-    handles_.resize(cfi + cfs.size());
-    names_.resize(cfi + cfs.size());
-    for (size_t i = 0; i < cfs.size(); ++i) {
-      ASSERT_OK(db_->CreateColumnFamily(
-          options.size() == 0 ? column_family_options_ : options[i], cfs[i],
-          &handles_[cfi]));
-      names_[cfi] = cfs[i];
-      cfi++;
-    }
-  }
-
-  void Reopen(const std::vector<ColumnFamilyOptions> options = {}) {
-    std::vector<std::string> names;
-    for (auto name : names_) {
-      if (name != "") {
-        names.push_back(name);
-      }
-    }
-    Close();
-    assert(options.size() == 0 || names.size() == options.size());
-    Open(names, options);
-  }
-
-  void CreateColumnFamiliesAndReopen(const std::vector<std::string>& cfs) {
-    CreateColumnFamilies(cfs);
-    Reopen();
-  }
-
-  void DropColumnFamilies(const std::vector<int>& cfs) {
-    for (auto cf : cfs) {
-      ASSERT_OK(db_->DropColumnFamily(handles_[cf]));
-      delete handles_[cf];
-      handles_[cf] = nullptr;
-      names_[cf] = "";
-    }
-  }
-
-  void PutRandomData(int cf, int num, int key_value_size) {
-    for (int i = 0; i < num; ++i) {
-      // 10 bytes for key, rest is value
-      ASSERT_OK(Put(cf, test::RandomKey(&rnd_, 10),
-                    RandomString(&rnd_, key_value_size - 10)));
-    }
-  }
-
-  void WaitForFlush(int cf) {
-    ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable(handles_[cf]));
-  }
-
-  void WaitForCompaction() { ASSERT_OK(dbfull()->TEST_WaitForCompact()); }
-
-  Status Put(int cf, const std::string& key, const std::string& value) {
-    return db_->Put(WriteOptions(), handles_[cf], Slice(key), Slice(value));
-  }
-  Status Merge(int cf, const std::string& key, const std::string& value) {
-    return db_->Merge(WriteOptions(), handles_[cf], Slice(key), Slice(value));
-  }
-  Status Flush(int cf) {
-    return db_->Flush(FlushOptions(), handles_[cf]);
-  }
-
-  std::string Get(int cf, const std::string& key) {
-    ReadOptions options;
-    options.verify_checksums = true;
-    std::string result;
-    Status s = db_->Get(options, handles_[cf], Slice(key), &result);
-    if (s.IsNotFound()) {
-      result = "NOT_FOUND";
-    } else if (!s.ok()) {
-      result = s.ToString();
-    }
-    return result;
-  }
-
-  void CompactAll(int cf) {
-    ASSERT_OK(db_->CompactRange(handles_[cf], nullptr, nullptr));
-  }
-
-  void Compact(int cf, const Slice& start, const Slice& limit) {
-    ASSERT_OK(db_->CompactRange(handles_[cf], &start, &limit));
-  }
-
-  int NumTableFilesAtLevel(int level, int cf) {
-    return GetProperty(cf,
-                       "rocksdb.num-files-at-level" + std::to_string(level));
-  }
-
-  // Return spread of files per level
-  std::string FilesPerLevel(int cf) {
-    std::string result;
-    int last_non_zero_offset = 0;
-    for (int level = 0; level < dbfull()->NumberLevels(handles_[cf]); level++) {
-      int f = NumTableFilesAtLevel(level, cf);
-      char buf[100];
-      snprintf(buf, sizeof(buf), "%s%d", (level ? "," : ""), f);
-      result += buf;
-      if (f > 0) {
-        last_non_zero_offset = result.size();
-      }
-    }
-    result.resize(last_non_zero_offset);
-    return result;
-  }
-
-  int CountLiveFiles() {
-    std::vector<LiveFileMetaData> metadata;
-    db_->GetLiveFilesMetaData(&metadata);
-    return static_cast<int>(metadata.size());
-  }
-
-  // Do n memtable flushes, each of which produces an sstable
-  // covering the range [small,large].
-  void MakeTables(int cf, int n, const std::string& small,
-                  const std::string& large) {
-    for (int i = 0; i < n; i++) {
-      ASSERT_OK(Put(cf, small, "begin"));
-      ASSERT_OK(Put(cf, large, "end"));
-      ASSERT_OK(db_->Flush(FlushOptions(), handles_[cf]));
-    }
-  }
-
-  int CountLiveLogFiles() {
-    int micros_wait_for_log_deletion = 20000;
-    env_->SleepForMicroseconds(micros_wait_for_log_deletion);
-    int ret = 0;
-    VectorLogPtr wal_files;
-    Status s;
-    // GetSortedWalFiles is a flakey function -- it gets all the wal_dir
-    // children files and then later checks for their existance. if some of the
-    // log files doesn't exist anymore, it reports an error. it does all of this
-    // without DB mutex held, so if a background process deletes the log file
-    // while the function is being executed, it returns an error. We retry the
-    // function 10 times to avoid the error failing the test
-    for (int retries = 0; retries < 10; ++retries) {
-      wal_files.clear();
-      s = db_->GetSortedWalFiles(wal_files);
-      if (s.ok()) {
-        break;
-      }
-    }
-    ASSERT_OK(s);
-    for (const auto& wal : wal_files) {
-      if (wal->Type() == kAliveLogFile) {
-        ++ret;
-      }
-    }
-    return ret;
-  }
-
-  void AssertNumberOfImmutableMemtables(std::vector<int> num_per_cf) {
-    assert(num_per_cf.size() == handles_.size());
-
-    for (size_t i = 0; i < num_per_cf.size(); ++i) {
-      ASSERT_EQ(num_per_cf[i],
-                GetProperty(i, "rocksdb.num-immutable-mem-table"));
-    }
-  }
-
-  void CopyFile(const std::string& source, const std::string& destination,
-                uint64_t size = 0) {
-    const EnvOptions soptions;
-    unique_ptr<SequentialFile> srcfile;
-    ASSERT_OK(env_->NewSequentialFile(source, &srcfile, soptions));
-    unique_ptr<WritableFile> destfile;
-    ASSERT_OK(env_->NewWritableFile(destination, &destfile, soptions));
-
-    if (size == 0) {
-      // default argument means copy everything
-      ASSERT_OK(env_->GetFileSize(source, &size));
-    }
-
-    char buffer[4096];
-    Slice slice;
-    while (size > 0) {
-      uint64_t one = std::min(uint64_t(sizeof(buffer)), size);
-      ASSERT_OK(srcfile->Read(one, &slice, buffer));
-      ASSERT_OK(destfile->Append(slice));
-      size -= slice.size();
-    }
-    ASSERT_OK(destfile->Close());
-  }
-
-  std::vector<ColumnFamilyHandle*> handles_;
-  std::vector<std::string> names_;
-  ColumnFamilyOptions column_family_options_;
-  DBOptions db_options_;
-  std::string dbname_;
-  DB* db_ = nullptr;
-  EnvCounter* env_;
-  Random rnd_;
-};
-
-TEST(ColumnFamilyTest, DontReuseColumnFamilyID) {
-  for (int iter = 0; iter < 3; ++iter) {
-    Open();
-    CreateColumnFamilies({"one", "two", "three"});
-    for (size_t i = 0; i < handles_.size(); ++i) {
-      auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(handles_[i]);
-      ASSERT_EQ(i, cfh->GetID());
-    }
-    if (iter == 1) {
-      Reopen();
-    }
-    DropColumnFamilies({3});
-    Reopen();
-    if (iter == 2) {
-      // this tests if max_column_family is correctly persisted with
-      // WriteSnapshot()
-      Reopen();
-    }
-    CreateColumnFamilies({"three2"});
-    // ID 3 that was used for dropped column family "three" should not be reused
-    auto cfh3 = reinterpret_cast<ColumnFamilyHandleImpl*>(handles_[3]);
-    ASSERT_EQ(4U, cfh3->GetID());
-    Close();
-    Destroy();
-  }
-}
-
-
-TEST(ColumnFamilyTest, AddDrop) {
-  Open();
-  CreateColumnFamilies({"one", "two", "three"});
-  ASSERT_EQ("NOT_FOUND", Get(1, "fodor"));
-  ASSERT_EQ("NOT_FOUND", Get(2, "fodor"));
-  DropColumnFamilies({2});
-  ASSERT_EQ("NOT_FOUND", Get(1, "fodor"));
-  CreateColumnFamilies({"four"});
-  ASSERT_EQ("NOT_FOUND", Get(3, "fodor"));
-  ASSERT_OK(Put(1, "fodor", "mirko"));
-  ASSERT_EQ("mirko", Get(1, "fodor"));
-  ASSERT_EQ("NOT_FOUND", Get(3, "fodor"));
-  Close();
-  ASSERT_TRUE(TryOpen({"default"}).IsInvalidArgument());
-  Open({"default", "one", "three", "four"});
-  DropColumnFamilies({1});
-  Reopen();
-  Close();
-
-  std::vector<std::string> families;
-  ASSERT_OK(DB::ListColumnFamilies(db_options_, dbname_, &families));
-  sort(families.begin(), families.end());
-  ASSERT_TRUE(families ==
-              std::vector<std::string>({"default", "four", "three"}));
-}
-
-TEST(ColumnFamilyTest, DropTest) {
-  // first iteration - dont reopen DB before dropping
-  // second iteration - reopen DB before dropping
-  for (int iter = 0; iter < 2; ++iter) {
-    Open({"default"});
-    CreateColumnFamiliesAndReopen({"pikachu"});
-    for (int i = 0; i < 100; ++i) {
-      ASSERT_OK(Put(1, std::to_string(i), "bar" + std::to_string(i)));
-    }
-    ASSERT_OK(Flush(1));
-
-    if (iter == 1) {
-      Reopen();
-    }
-    ASSERT_EQ("bar1", Get(1, "1"));
-
-    ASSERT_EQ(CountLiveFiles(), 1);
-    DropColumnFamilies({1});
-    // make sure that all files are deleted when we drop the column family
-    ASSERT_EQ(CountLiveFiles(), 0);
-    Destroy();
-  }
-}
-
-TEST(ColumnFamilyTest, WriteBatchFailure) {
-  Open();
-  CreateColumnFamiliesAndReopen({"one", "two"});
-  WriteBatch batch;
-  batch.Put(handles_[1], Slice("non-existing"), Slice("column-family"));
-  ASSERT_OK(db_->Write(WriteOptions(), &batch));
-  DropColumnFamilies({1});
-  Status s = db_->Write(WriteOptions(), &batch);
-  ASSERT_TRUE(s.IsInvalidArgument());
-  Close();
-}
-
-TEST(ColumnFamilyTest, ReadWrite) {
-  Open();
-  CreateColumnFamiliesAndReopen({"one", "two"});
-  ASSERT_OK(Put(0, "foo", "v1"));
-  ASSERT_OK(Put(0, "bar", "v2"));
-  ASSERT_OK(Put(1, "mirko", "v3"));
-  ASSERT_OK(Put(0, "foo", "v2"));
-  ASSERT_OK(Put(2, "fodor", "v5"));
-
-  for (int iter = 0; iter <= 3; ++iter) {
-    ASSERT_EQ("v2", Get(0, "foo"));
-    ASSERT_EQ("v2", Get(0, "bar"));
-    ASSERT_EQ("v3", Get(1, "mirko"));
-    ASSERT_EQ("v5", Get(2, "fodor"));
-    ASSERT_EQ("NOT_FOUND", Get(0, "fodor"));
-    ASSERT_EQ("NOT_FOUND", Get(1, "fodor"));
-    ASSERT_EQ("NOT_FOUND", Get(2, "foo"));
-    if (iter <= 1) {
-      Reopen();
-    }
-  }
-  Close();
-}
-
-TEST(ColumnFamilyTest, IgnoreRecoveredLog) {
-  std::string backup_logs = dbname_ + "/backup_logs";
-
-  // delete old files in backup_logs directory
-  ASSERT_OK(env_->CreateDirIfMissing(dbname_));
-  ASSERT_OK(env_->CreateDirIfMissing(backup_logs));
-  std::vector<std::string> old_files;
-  env_->GetChildren(backup_logs, &old_files);
-  for (auto& file : old_files) {
-    if (file != "." && file != "..") {
-      env_->DeleteFile(backup_logs + "/" + file);
-    }
-  }
-
-  column_family_options_.merge_operator =
-      MergeOperators::CreateUInt64AddOperator();
-  db_options_.wal_dir = dbname_ + "/logs";
-  Destroy();
-  Open();
-  CreateColumnFamilies({"cf1", "cf2"});
-
-  // fill up the DB
-  std::string one, two, three;
-  PutFixed64(&one, 1);
-  PutFixed64(&two, 2);
-  PutFixed64(&three, 3);
-  ASSERT_OK(Merge(0, "foo", one));
-  ASSERT_OK(Merge(1, "mirko", one));
-  ASSERT_OK(Merge(0, "foo", one));
-  ASSERT_OK(Merge(2, "bla", one));
-  ASSERT_OK(Merge(2, "fodor", one));
-  ASSERT_OK(Merge(0, "bar", one));
-  ASSERT_OK(Merge(2, "bla", one));
-  ASSERT_OK(Merge(1, "mirko", two));
-  ASSERT_OK(Merge(1, "franjo", one));
-
-  // copy the logs to backup
-  std::vector<std::string> logs;
-  env_->GetChildren(db_options_.wal_dir, &logs);
-  for (auto& log : logs) {
-    if (log != ".." && log != ".") {
-      CopyFile(db_options_.wal_dir + "/" + log, backup_logs + "/" + log);
-    }
-  }
-
-  // recover the DB
-  Close();
-
-  // 1. check consistency
-  // 2. copy the logs from backup back to WAL dir. if the recovery happens
-  // again on the same log files, this should lead to incorrect results
-  // due to applying merge operator twice
-  // 3. check consistency
-  for (int iter = 0; iter < 2; ++iter) {
-    // assert consistency
-    Open({"default", "cf1", "cf2"});
-    ASSERT_EQ(two, Get(0, "foo"));
-    ASSERT_EQ(one, Get(0, "bar"));
-    ASSERT_EQ(three, Get(1, "mirko"));
-    ASSERT_EQ(one, Get(1, "franjo"));
-    ASSERT_EQ(one, Get(2, "fodor"));
-    ASSERT_EQ(two, Get(2, "bla"));
-    Close();
-
-    if (iter == 0) {
-      // copy the logs from backup back to wal dir
-      for (auto& log : logs) {
-        if (log != ".." && log != ".") {
-          CopyFile(backup_logs + "/" + log, db_options_.wal_dir + "/" + log);
-        }
-      }
-    }
-  }
-}
-
-TEST(ColumnFamilyTest, FlushTest) {
-  Open();
-  CreateColumnFamiliesAndReopen({"one", "two"});
-  ASSERT_OK(Put(0, "foo", "v1"));
-  ASSERT_OK(Put(0, "bar", "v2"));
-  ASSERT_OK(Put(1, "mirko", "v3"));
-  ASSERT_OK(Put(0, "foo", "v2"));
-  ASSERT_OK(Put(2, "fodor", "v5"));
-  for (int i = 0; i < 3; ++i) {
-    Flush(i);
-  }
-  Reopen();
-
-  for (int iter = 0; iter <= 2; ++iter) {
-    ASSERT_EQ("v2", Get(0, "foo"));
-    ASSERT_EQ("v2", Get(0, "bar"));
-    ASSERT_EQ("v3", Get(1, "mirko"));
-    ASSERT_EQ("v5", Get(2, "fodor"));
-    ASSERT_EQ("NOT_FOUND", Get(0, "fodor"));
-    ASSERT_EQ("NOT_FOUND", Get(1, "fodor"));
-    ASSERT_EQ("NOT_FOUND", Get(2, "foo"));
-    if (iter <= 1) {
-      Reopen();
-    }
-  }
-  Close();
-}
-
-// Makes sure that obsolete log files get deleted
-TEST(ColumnFamilyTest, LogDeletionTest) {
-  db_options_.max_total_wal_size = std::numeric_limits<uint64_t>::max();
-  column_family_options_.write_buffer_size = 100000;  // 100KB
-  Open();
-  CreateColumnFamilies({"one", "two", "three", "four"});
-  // Each bracket is one log file. if number is in (), it means
-  // we don't need it anymore (it's been flushed)
-  // []
-  ASSERT_EQ(CountLiveLogFiles(), 0);
-  PutRandomData(0, 1, 100);
-  // [0]
-  PutRandomData(1, 1, 100);
-  // [0, 1]
-  PutRandomData(1, 1000, 100);
-  WaitForFlush(1);
-  // [0, (1)] [1]
-  ASSERT_EQ(CountLiveLogFiles(), 2);
-  PutRandomData(0, 1, 100);
-  // [0, (1)] [0, 1]
-  ASSERT_EQ(CountLiveLogFiles(), 2);
-  PutRandomData(2, 1, 100);
-  // [0, (1)] [0, 1, 2]
-  PutRandomData(2, 1000, 100);
-  WaitForFlush(2);
-  // [0, (1)] [0, 1, (2)] [2]
-  ASSERT_EQ(CountLiveLogFiles(), 3);
-  PutRandomData(2, 1000, 100);
-  WaitForFlush(2);
-  // [0, (1)] [0, 1, (2)] [(2)] [2]
-  ASSERT_EQ(CountLiveLogFiles(), 4);
-  PutRandomData(3, 1, 100);
-  // [0, (1)] [0, 1, (2)] [(2)] [2, 3]
-  PutRandomData(1, 1, 100);
-  // [0, (1)] [0, 1, (2)] [(2)] [1, 2, 3]
-  ASSERT_EQ(CountLiveLogFiles(), 4);
-  PutRandomData(1, 1000, 100);
-  WaitForFlush(1);
-  // [0, (1)] [0, (1), (2)] [(2)] [(1), 2, 3] [1]
-  ASSERT_EQ(CountLiveLogFiles(), 5);
-  PutRandomData(0, 1000, 100);
-  WaitForFlush(0);
-  // [(0), (1)] [(0), (1), (2)] [(2)] [(1), 2, 3] [1, (0)] [0]
-  // delete obsolete logs -->
-  // [(1), 2, 3] [1, (0)] [0]
-  ASSERT_EQ(CountLiveLogFiles(), 3);
-  PutRandomData(0, 1000, 100);
-  WaitForFlush(0);
-  // [(1), 2, 3] [1, (0)], [(0)] [0]
-  ASSERT_EQ(CountLiveLogFiles(), 4);
-  PutRandomData(1, 1000, 100);
-  WaitForFlush(1);
-  // [(1), 2, 3] [(1), (0)] [(0)] [0, (1)] [1]
-  ASSERT_EQ(CountLiveLogFiles(), 5);
-  PutRandomData(2, 1000, 100);
-  WaitForFlush(2);
-  // [(1), (2), 3] [(1), (0)] [(0)] [0, (1)] [1, (2)], [2]
-  ASSERT_EQ(CountLiveLogFiles(), 6);
-  PutRandomData(3, 1000, 100);
-  WaitForFlush(3);
-  // [(1), (2), (3)] [(1), (0)] [(0)] [0, (1)] [1, (2)], [2, (3)] [3]
-  // delete obsolete logs -->
-  // [0, (1)] [1, (2)], [2, (3)] [3]
-  ASSERT_EQ(CountLiveLogFiles(), 4);
-  Close();
-}
-
-// Makes sure that obsolete log files get deleted
-TEST(ColumnFamilyTest, DifferentWriteBufferSizes) {
-  // disable flushing stale column families
-  db_options_.max_total_wal_size = std::numeric_limits<uint64_t>::max();
-  Open();
-  CreateColumnFamilies({"one", "two", "three"});
-  ColumnFamilyOptions default_cf, one, two, three;
-  // setup options. all column families have max_write_buffer_number setup to 10
-  // "default" -> 100KB memtable, start flushing immediatelly
-  // "one" -> 200KB memtable, start flushing with two immutable memtables
-  // "two" -> 1MB memtable, start flushing with three immutable memtables
-  // "three" -> 90KB memtable, start flushing with four immutable memtables
-  default_cf.write_buffer_size = 100000;
-  default_cf.max_write_buffer_number = 10;
-  default_cf.min_write_buffer_number_to_merge = 1;
-  one.write_buffer_size = 200000;
-  one.max_write_buffer_number = 10;
-  one.min_write_buffer_number_to_merge = 2;
-  two.write_buffer_size = 1000000;
-  two.max_write_buffer_number = 10;
-  two.min_write_buffer_number_to_merge = 3;
-  three.write_buffer_size = 90000;
-  three.max_write_buffer_number = 10;
-  three.min_write_buffer_number_to_merge = 4;
-
-  Reopen({default_cf, one, two, three});
-
-  int micros_wait_for_flush = 10000;
-  PutRandomData(0, 100, 1000);
-  WaitForFlush(0);
-  AssertNumberOfImmutableMemtables({0, 0, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 1);
-  PutRandomData(1, 200, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 2);
-  PutRandomData(2, 1000, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 1, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 3);
-  PutRandomData(2, 1000, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 2, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 4);
-  PutRandomData(3, 90, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 2, 1});
-  ASSERT_EQ(CountLiveLogFiles(), 5);
-  PutRandomData(3, 90, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 2, 2});
-  ASSERT_EQ(CountLiveLogFiles(), 6);
-  PutRandomData(3, 90, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 2, 3});
-  ASSERT_EQ(CountLiveLogFiles(), 7);
-  PutRandomData(0, 100, 1000);
-  WaitForFlush(0);
-  AssertNumberOfImmutableMemtables({0, 1, 2, 3});
-  ASSERT_EQ(CountLiveLogFiles(), 8);
-  PutRandomData(2, 100, 10000);
-  WaitForFlush(2);
-  AssertNumberOfImmutableMemtables({0, 1, 0, 3});
-  ASSERT_EQ(CountLiveLogFiles(), 9);
-  PutRandomData(3, 90, 1000);
-  WaitForFlush(3);
-  AssertNumberOfImmutableMemtables({0, 1, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 10);
-  PutRandomData(3, 90, 1000);
-  env_->SleepForMicroseconds(micros_wait_for_flush);
-  AssertNumberOfImmutableMemtables({0, 1, 0, 1});
-  ASSERT_EQ(CountLiveLogFiles(), 11);
-  PutRandomData(1, 200, 1000);
-  WaitForFlush(1);
-  AssertNumberOfImmutableMemtables({0, 0, 0, 1});
-  ASSERT_EQ(CountLiveLogFiles(), 5);
-  PutRandomData(3, 90*6, 1000);
-  WaitForFlush(3);
-  AssertNumberOfImmutableMemtables({0, 0, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 12);
-  PutRandomData(0, 100, 1000);
-  WaitForFlush(0);
-  AssertNumberOfImmutableMemtables({0, 0, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 12);
-  PutRandomData(2, 3*100, 10000);
-  WaitForFlush(2);
-  AssertNumberOfImmutableMemtables({0, 0, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 12);
-  PutRandomData(1, 2*200, 1000);
-  WaitForFlush(1);
-  AssertNumberOfImmutableMemtables({0, 0, 0, 0});
-  ASSERT_EQ(CountLiveLogFiles(), 7);
-  Close();
-}
-
-TEST(ColumnFamilyTest, DifferentMergeOperators) {
-  Open();
-  CreateColumnFamilies({"first", "second"});
-  ColumnFamilyOptions default_cf, first, second;
-  first.merge_operator = MergeOperators::CreateUInt64AddOperator();
-  second.merge_operator = MergeOperators::CreateStringAppendOperator();
-  Reopen({default_cf, first, second});
-
-  std::string one, two, three;
-  PutFixed64(&one, 1);
-  PutFixed64(&two, 2);
-  PutFixed64(&three, 3);
-
-  ASSERT_OK(Put(0, "foo", two));
-  ASSERT_OK(Put(0, "foo", one));
-  ASSERT_TRUE(Merge(0, "foo", two).IsNotSupported());
-  ASSERT_EQ(Get(0, "foo"), one);
-
-  ASSERT_OK(Put(1, "foo", two));
-  ASSERT_OK(Put(1, "foo", one));
-  ASSERT_OK(Merge(1, "foo", two));
-  ASSERT_EQ(Get(1, "foo"), three);
-
-  ASSERT_OK(Put(2, "foo", two));
-  ASSERT_OK(Put(2, "foo", one));
-  ASSERT_OK(Merge(2, "foo", two));
-  ASSERT_EQ(Get(2, "foo"), one + "," + two);
-  Close();
-}
-
-TEST(ColumnFamilyTest, DifferentCompactionStyles) {
-  Open();
-  CreateColumnFamilies({"one", "two"});
-  ColumnFamilyOptions default_cf, one, two;
-  db_options_.max_open_files = 20;  // only 10 files in file cache
-  db_options_.disableDataSync = true;
-
-  default_cf.compaction_style = kCompactionStyleLevel;
-  default_cf.num_levels = 3;
-  default_cf.write_buffer_size = 64 << 10;  // 64KB
-  default_cf.target_file_size_base = 30 << 10;
-  default_cf.filter_policy = nullptr;
-  default_cf.no_block_cache = true;
-  default_cf.source_compaction_factor = 100;
-  default_cf.disable_seek_compaction = false;
-
-  one.compaction_style = kCompactionStyleUniversal;
-  // trigger compaction if there are >= 4 files
-  one.level0_file_num_compaction_trigger = 4;
-  one.write_buffer_size = 100000;
-
-  two.compaction_style = kCompactionStyleLevel;
-  two.num_levels = 4;
-  two.max_mem_compaction_level = 0;
-  two.level0_file_num_compaction_trigger = 3;
-  two.write_buffer_size = 100000;
-
-  Reopen({default_cf, one, two});
-
-  // SETUP column family "default" - test read compaction
-  ASSERT_EQ("", FilesPerLevel(0));
-  PutRandomData(0, 1, 4096);
-  ASSERT_OK(Flush(0));
-  ASSERT_EQ("0,0,1", FilesPerLevel(0));
-  // write 8MB
-  PutRandomData(0, 2000, 4096);
-  ASSERT_OK(Flush(0));
-  // clear levels 0 and 1
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[0]);
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[0]);
-  ASSERT_EQ(NumTableFilesAtLevel(0, 0), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1, 0), 0);
-  // write some new keys into level 0 and 1
-  PutRandomData(0, 1024, 512);
-  ASSERT_OK(Flush(0));
-  WaitForCompaction();
-  PutRandomData(0, 10, 512);
-  ASSERT_OK(Flush(0));
-  // remember number of files in each level
-  int l1 = NumTableFilesAtLevel(0, 0);
-  int l2 = NumTableFilesAtLevel(1, 0);
-  int l3 = NumTableFilesAtLevel(2, 0);
-  ASSERT_NE(l1, 0);
-  ASSERT_NE(l2, 0);
-  ASSERT_NE(l3, 0);
-
-  // SETUP column family "one" -- universal style
-  for (int i = 0; i < one.level0_file_num_compaction_trigger - 1; ++i) {
-    PutRandomData(1, 11, 10000);
-    WaitForFlush(1);
-    ASSERT_EQ(std::to_string(i + 1), FilesPerLevel(1));
-  }
-
-  // SETUP column family "two" -- level style with 4 levels
-  for (int i = 0; i < two.level0_file_num_compaction_trigger - 1; ++i) {
-    PutRandomData(2, 15, 10000);
-    WaitForFlush(2);
-    ASSERT_EQ(std::to_string(i + 1), FilesPerLevel(2));
-  }
-
-  // TRIGGER compaction "default"
-  // read a bunch of times, trigger read compaction
-  for (int i = 0; i < 200000; ++i) {
-    Get(0, std::to_string(i));
-  }
-
-  // TRIGGER compaction "one"
-  PutRandomData(1, 12, 10000);
-
-  // TRIGGER compaction "two"
-  PutRandomData(2, 10, 10000);
-
-  // WAIT for compactions
-  WaitForCompaction();
-
-  // VERIFY compaction "default"
-  // verify that the number of files have decreased
-  // in some level, indicating that there was a compaction
-  ASSERT_TRUE(NumTableFilesAtLevel(0, 0) < l1 ||
-              NumTableFilesAtLevel(1, 0) < l2 ||
-              NumTableFilesAtLevel(2, 0) < l3);
-
-  // VERIFY compaction "one"
-  ASSERT_EQ("1", FilesPerLevel(1));
-
-  // VERIFY compaction "two"
-  ASSERT_EQ("0,1", FilesPerLevel(2));
-  CompactAll(2);
-  ASSERT_EQ("0,1", FilesPerLevel(2));
-
-  Close();
-}
-
-namespace {
-std::string IterStatus(Iterator* iter) {
-  std::string result;
-  if (iter->Valid()) {
-    result = iter->key().ToString() + "->" + iter->value().ToString();
-  } else {
-    result = "(invalid)";
-  }
-  return result;
-}
-}  // anonymous namespace
-
-TEST(ColumnFamilyTest, NewIteratorsTest) {
-  // iter == 0 -- no tailing
-  // iter == 2 -- tailing
-  for (int iter = 0; iter < 2; ++iter) {
-    Open();
-    CreateColumnFamiliesAndReopen({"one", "two"});
-    ASSERT_OK(Put(0, "a", "b"));
-    ASSERT_OK(Put(1, "b", "a"));
-    ASSERT_OK(Put(2, "c", "m"));
-    ASSERT_OK(Put(2, "v", "t"));
-    std::vector<Iterator*> iterators;
-    ReadOptions options;
-    options.tailing = (iter == 1);
-    ASSERT_OK(db_->NewIterators(options, handles_, &iterators));
-
-    for (auto it : iterators) {
-      it->SeekToFirst();
-    }
-    ASSERT_EQ(IterStatus(iterators[0]), "a->b");
-    ASSERT_EQ(IterStatus(iterators[1]), "b->a");
-    ASSERT_EQ(IterStatus(iterators[2]), "c->m");
-
-    ASSERT_OK(Put(1, "x", "x"));
-
-    for (auto it : iterators) {
-      it->Next();
-    }
-
-    ASSERT_EQ(IterStatus(iterators[0]), "(invalid)");
-    if (iter == 0) {
-      // no tailing
-      ASSERT_EQ(IterStatus(iterators[1]), "(invalid)");
-    } else {
-      // tailing
-      ASSERT_EQ(IterStatus(iterators[1]), "x->x");
-    }
-    ASSERT_EQ(IterStatus(iterators[2]), "v->t");
-
-    for (auto it : iterators) {
-      delete it;
-    }
-    Destroy();
-  }
-}
-
-TEST(ColumnFamilyTest, ReadOnlyDBTest) {
-  Open();
-  CreateColumnFamiliesAndReopen({"one", "two", "three", "four"});
-  ASSERT_OK(Put(1, "foo", "bla"));
-  ASSERT_OK(Put(2, "foo", "blabla"));
-  ASSERT_OK(Put(3, "foo", "blablabla"));
-  ASSERT_OK(Put(4, "foo", "blablablabla"));
-
-  DropColumnFamilies({2});
-  Close();
-  // open only a subset of column families
-  AssertOpenReadOnly({"default", "one", "four"});
-  ASSERT_EQ("NOT_FOUND", Get(0, "foo"));
-  ASSERT_EQ("bla", Get(1, "foo"));
-  ASSERT_EQ("blablablabla", Get(2, "foo"));
-
-  Close();
-  // can't open dropped column family
-  Status s = OpenReadOnly({"default", "one", "two"});
-  ASSERT_TRUE(!s.ok());
-
-  // Can't open without specifying default column family
-  s = OpenReadOnly({"one", "four"});
-  ASSERT_TRUE(!s.ok());
-}
-
-TEST(ColumnFamilyTest, DontRollEmptyLogs) {
-  Open();
-  CreateColumnFamiliesAndReopen({"one", "two", "three", "four"});
-
-  for (size_t i = 0; i < handles_.size(); ++i) {
-    PutRandomData(i, 10, 100);
-  }
-  int num_writable_file_start = env_->GetNumberOfNewWritableFileCalls();
-  // this will trigger the flushes
-  ASSERT_OK(db_->Write(WriteOptions(), nullptr));
-
-  for (int i = 0; i < 4; ++i) {
-    dbfull()->TEST_WaitForFlushMemTable(handles_[i]);
-  }
-  int total_new_writable_files =
-      env_->GetNumberOfNewWritableFileCalls() - num_writable_file_start;
-  ASSERT_EQ(static_cast<size_t>(total_new_writable_files), handles_.size() + 1);
-  Close();
-}
-
-TEST(ColumnFamilyTest, FlushStaleColumnFamilies) {
-  Open();
-  CreateColumnFamilies({"one", "two"});
-  ColumnFamilyOptions default_cf, one, two;
-  default_cf.write_buffer_size = 100000;  // small write buffer size
-  default_cf.disable_auto_compactions = true;
-  one.disable_auto_compactions = true;
-  two.disable_auto_compactions = true;
-  db_options_.max_total_wal_size = 210000;
-
-  Reopen({default_cf, one, two});
-
-  PutRandomData(2, 1, 10);  // 10 bytes
-  for (int i = 0; i < 2; ++i) {
-    PutRandomData(0, 100, 1000);  // flush
-    WaitForFlush(0);
-    ASSERT_EQ(i + 1, CountLiveFiles());
-  }
-  // third flush. now, CF [two] should be detected as stale and flushed
-  // column family 1 should not be flushed since it's empty
-  PutRandomData(0, 100, 1000);  // flush
-  WaitForFlush(0);
-  WaitForFlush(2);
-  // 3 files for default column families, 1 file for column family [two], zero
-  // files for column family [one], because it's empty
-  ASSERT_EQ(4, CountLiveFiles());
-  Close();
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/compaction.cc b/src/rocksdb/db/compaction.cc
deleted file mode 100644
index bafb5b4..0000000
--- a/src/rocksdb/db/compaction.cc
+++ /dev/null
@@ -1,261 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/compaction.h"
-#include "db/column_family.h"
-
-namespace rocksdb {
-
-static uint64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
-  uint64_t sum = 0;
-  for (size_t i = 0; i < files.size() && files[i]; i++) {
-    sum += files[i]->file_size;
-  }
-  return sum;
-}
-
-Compaction::Compaction(Version* input_version, int level, int out_level,
-                       uint64_t target_file_size,
-                       uint64_t max_grandparent_overlap_bytes,
-                       bool seek_compaction, bool enable_compression)
-    : level_(level),
-      out_level_(out_level),
-      max_output_file_size_(target_file_size),
-      max_grandparent_overlap_bytes_(max_grandparent_overlap_bytes),
-      input_version_(input_version),
-      number_levels_(input_version_->NumberLevels()),
-      cfd_(input_version_->cfd_),
-      seek_compaction_(seek_compaction),
-      enable_compression_(enable_compression),
-      grandparent_index_(0),
-      seen_key_(false),
-      overlapped_bytes_(0),
-      base_index_(-1),
-      parent_index_(-1),
-      score_(0),
-      bottommost_level_(false),
-      is_full_compaction_(false),
-      is_manual_compaction_(false),
-      level_ptrs_(std::vector<size_t>(number_levels_)) {
-
-  cfd_->Ref();
-  input_version_->Ref();
-  edit_ = new VersionEdit();
-  edit_->SetColumnFamily(cfd_->GetID());
-  for (int i = 0; i < number_levels_; i++) {
-    level_ptrs_[i] = 0;
-  }
-}
-
-Compaction::~Compaction() {
-  delete edit_;
-  if (input_version_ != nullptr) {
-    input_version_->Unref();
-  }
-  if (cfd_ != nullptr) {
-    if (cfd_->Unref()) {
-      delete cfd_;
-    }
-  }
-}
-
-bool Compaction::IsTrivialMove() const {
-  // Avoid a move if there is lots of overlapping grandparent data.
-  // Otherwise, the move could create a parent file that will require
-  // a very expensive merge later on.
-  // If level_== out_level_, the purpose is to force compaction filter to be
-  // applied to that level, and thus cannot be a trivia move.
-  return (level_ != out_level_ &&
-          num_input_files(0) == 1 &&
-          num_input_files(1) == 0 &&
-          TotalFileSize(grandparents_) <= max_grandparent_overlap_bytes_);
-}
-
-void Compaction::AddInputDeletions(VersionEdit* edit) {
-  for (int which = 0; which < 2; which++) {
-    for (size_t i = 0; i < inputs_[which].size(); i++) {
-      edit->DeleteFile(level_ + which, inputs_[which][i]->number);
-    }
-  }
-}
-
-bool Compaction::IsBaseLevelForKey(const Slice& user_key) {
-  if (cfd_->options()->compaction_style == kCompactionStyleUniversal) {
-    return bottommost_level_;
-  }
-  // Maybe use binary search to find right entry instead of linear search?
-  const Comparator* user_cmp = cfd_->user_comparator();
-  for (int lvl = level_ + 2; lvl < number_levels_; lvl++) {
-    const std::vector<FileMetaData*>& files = input_version_->files_[lvl];
-    for (; level_ptrs_[lvl] < files.size(); ) {
-      FileMetaData* f = files[level_ptrs_[lvl]];
-      if (user_cmp->Compare(user_key, f->largest.user_key()) <= 0) {
-        // We've advanced far enough
-        if (user_cmp->Compare(user_key, f->smallest.user_key()) >= 0) {
-          // Key falls in this file's range, so definitely not base level
-          return false;
-        }
-        break;
-      }
-      level_ptrs_[lvl]++;
-    }
-  }
-  return true;
-}
-
-bool Compaction::ShouldStopBefore(const Slice& internal_key) {
-  // Scan to find earliest grandparent file that contains key.
-  const InternalKeyComparator* icmp = &cfd_->internal_comparator();
-  while (grandparent_index_ < grandparents_.size() &&
-      icmp->Compare(internal_key,
-                    grandparents_[grandparent_index_]->largest.Encode()) > 0) {
-    if (seen_key_) {
-      overlapped_bytes_ += grandparents_[grandparent_index_]->file_size;
-    }
-    assert(grandparent_index_ + 1 >= grandparents_.size() ||
-           icmp->Compare(grandparents_[grandparent_index_]->largest.Encode(),
-                         grandparents_[grandparent_index_+1]->smallest.Encode())
-                         < 0);
-    grandparent_index_++;
-  }
-  seen_key_ = true;
-
-  if (overlapped_bytes_ > max_grandparent_overlap_bytes_) {
-    // Too much overlap for current output; start new output
-    overlapped_bytes_ = 0;
-    return true;
-  } else {
-    return false;
-  }
-}
-
-// Mark (or clear) each file that is being compacted
-void Compaction::MarkFilesBeingCompacted(bool value) {
-  for (int i = 0; i < 2; i++) {
-    std::vector<FileMetaData*> v = inputs_[i];
-    for (unsigned int j = 0; j < inputs_[i].size(); j++) {
-      assert(value ? !inputs_[i][j]->being_compacted :
-                      inputs_[i][j]->being_compacted);
-      inputs_[i][j]->being_compacted = value;
-    }
-  }
-}
-
-// Is this compaction producing files at the bottommost level?
-void Compaction::SetupBottomMostLevel(bool isManual) {
-  if (cfd_->options()->compaction_style == kCompactionStyleUniversal) {
-    // If universal compaction style is used and manual
-    // compaction is occuring, then we are guaranteed that
-    // all files will be picked in a single compaction
-    // run. We can safely set bottommost_level_ = true.
-    // If it is not manual compaction, then bottommost_level_
-    // is already set when the Compaction was created.
-    if (isManual) {
-      bottommost_level_ = true;
-    }
-    return;
-  }
-  bottommost_level_ = true;
-  for (int i = output_level() + 1; i < number_levels_; i++) {
-    if (input_version_->NumLevelFiles(i) > 0) {
-      bottommost_level_ = false;
-      break;
-    }
-  }
-}
-
-void Compaction::ReleaseInputs() {
-  if (input_version_ != nullptr) {
-    input_version_->Unref();
-    input_version_ = nullptr;
-  }
-  if (cfd_ != nullptr) {
-    if (cfd_->Unref()) {
-      delete cfd_;
-    }
-    cfd_ = nullptr;
-  }
-}
-
-void Compaction::ReleaseCompactionFiles(Status status) {
-  cfd_->compaction_picker()->ReleaseCompactionFiles(this, status);
-}
-
-void Compaction::ResetNextCompactionIndex() {
-  input_version_->ResetNextCompactionIndex(level_);
-}
-
-/*
-for sizes >=10TB, print "XXTB"
-for sizes >=10GB, print "XXGB"
-etc.
-*/
-static void FileSizeSummary(unsigned long long sz, char* output, int len) {
-  const unsigned long long ull10 = 10;
-  if (sz >= ull10<<40) {
-    snprintf(output, len, "%lluTB", sz>>40);
-  } else if (sz >= ull10<<30) {
-    snprintf(output, len, "%lluGB", sz>>30);
-  } else if (sz >= ull10<<20) {
-    snprintf(output, len, "%lluMB", sz>>20);
-  } else if (sz >= ull10<<10) {
-    snprintf(output, len, "%lluKB", sz>>10);
-  } else {
-    snprintf(output, len, "%lluB", sz);
-  }
-}
-
-static int InputSummary(std::vector<FileMetaData*>& files, char* output,
-                         int len) {
-  *output = '\0';
-  int write = 0;
-  for (unsigned int i = 0; i < files.size(); i++) {
-    int sz = len - write;
-    int ret;
-    char sztxt[16];
-    FileSizeSummary((unsigned long long)files.at(i)->file_size, sztxt, 16);
-    ret = snprintf(output + write, sz, "%lu(%s) ",
-                   (unsigned long)files.at(i)->number,
-                   sztxt);
-    if (ret < 0 || ret >= sz)
-      break;
-    write += ret;
-  }
-  return write;
-}
-
-void Compaction::Summary(char* output, int len) {
-  int write = snprintf(output, len,
-      "Base version %lu Base level %d, seek compaction:%d, inputs: [",
-      (unsigned long)input_version_->GetVersionNumber(),
-      level_,
-      seek_compaction_);
-  if (write < 0 || write >= len) {
-    return;
-  }
-
-  write += InputSummary(inputs_[0], output+write, len-write);
-  if (write < 0 || write >= len) {
-    return;
-  }
-
-  write += snprintf(output+write, len-write, "],[");
-  if (write < 0 || write >= len) {
-    return;
-  }
-
-  write += InputSummary(inputs_[1], output+write, len-write);
-  if (write < 0 || write >= len) {
-    return;
-  }
-
-  snprintf(output+write, len-write, "]");
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/compaction.h b/src/rocksdb/db/compaction.h
deleted file mode 100644
index 8fd95f9..0000000
--- a/src/rocksdb/db/compaction.h
+++ /dev/null
@@ -1,151 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "db/version_set.h"
-
-namespace rocksdb {
-
-class Version;
-class ColumnFamilyData;
-
-// A Compaction encapsulates information about a compaction.
-class Compaction {
- public:
-  ~Compaction();
-
-  // Return the level that is being compacted.  Inputs from "level"
-  // will be merged.
-  int level() const { return level_; }
-
-  // Outputs will go to this level
-  int output_level() const { return out_level_; }
-
-  // Return the object that holds the edits to the descriptor done
-  // by this compaction.
-  VersionEdit* edit() { return edit_; }
-
-  // "which" must be either 0 or 1
-  int num_input_files(int which) const { return inputs_[which].size(); }
-
-  // Returns input version of the compaction
-  Version* input_version() const { return input_version_; }
-
-  ColumnFamilyData* column_family_data() const { return cfd_; }
-
-  // Return the ith input file at "level()+which" ("which" must be 0 or 1).
-  FileMetaData* input(int which, int i) const { return inputs_[which][i]; }
-
-  std::vector<FileMetaData*>* inputs(int which) { return &inputs_[which]; }
-
-  // Maximum size of files to build during this compaction.
-  uint64_t MaxOutputFileSize() const { return max_output_file_size_; }
-
-  // Whether compression will be enabled for compaction outputs
-  bool enable_compression() const { return enable_compression_; }
-
-  // Is this a trivial compaction that can be implemented by just
-  // moving a single input file to the next level (no merging or splitting)
-  bool IsTrivialMove() const;
-
-  // Add all inputs to this compaction as delete operations to *edit.
-  void AddInputDeletions(VersionEdit* edit);
-
-  // Returns true if the information we have available guarantees that
-  // the compaction is producing data in "level+1" for which no data exists
-  // in levels greater than "level+1".
-  bool IsBaseLevelForKey(const Slice& user_key);
-
-  // Returns true iff we should stop building the current output
-  // before processing "internal_key".
-  bool ShouldStopBefore(const Slice& internal_key);
-
-  // Release the input version for the compaction, once the compaction
-  // is successful.
-  void ReleaseInputs();
-
-  // Clear all files to indicate that they are not being compacted
-  // Delete this compaction from the list of running compactions.
-  void ReleaseCompactionFiles(Status status);
-
-  void Summary(char* output, int len);
-
-  // Return the score that was used to pick this compaction run.
-  double score() const { return score_; }
-
-  // Is this compaction creating a file in the bottom most level?
-  bool BottomMostLevel() { return bottommost_level_; }
-
-  // Does this compaction include all sst files?
-  bool IsFullCompaction() { return is_full_compaction_; }
-
-  // Was this compaction triggered manually by the client?
-  bool IsManualCompaction() { return is_manual_compaction_; }
-
- private:
-  friend class CompactionPicker;
-  friend class UniversalCompactionPicker;
-  friend class LevelCompactionPicker;
-
-  Compaction(Version* input_version, int level, int out_level,
-             uint64_t target_file_size, uint64_t max_grandparent_overlap_bytes,
-             bool seek_compaction = false, bool enable_compression = true);
-
-  int level_;
-  int out_level_; // levels to which output files are stored
-  uint64_t max_output_file_size_;
-  uint64_t max_grandparent_overlap_bytes_;
-  Version* input_version_;
-  VersionEdit* edit_;
-  int number_levels_;
-  ColumnFamilyData* cfd_;
-
-  bool seek_compaction_;
-  bool enable_compression_;
-
-  // Each compaction reads inputs from "level_" and "level_+1"
-  std::vector<FileMetaData*> inputs_[2];      // The two sets of inputs
-
-  // State used to check for number of of overlapping grandparent files
-  // (parent == level_ + 1, grandparent == level_ + 2)
-  std::vector<FileMetaData*> grandparents_;
-  size_t grandparent_index_;  // Index in grandparent_starts_
-  bool seen_key_;             // Some output key has been seen
-  uint64_t overlapped_bytes_;  // Bytes of overlap between current output
-                              // and grandparent files
-  int base_index_;   // index of the file in files_[level_]
-  int parent_index_; // index of some file with same range in files_[level_+1]
-  double score_;     // score that was used to pick this compaction.
-
-  // Is this compaction creating a file in the bottom most level?
-  bool bottommost_level_;
-  // Does this compaction include all sst files?
-  bool is_full_compaction_;
-
-  // Is this compaction requested by the client?
-  bool is_manual_compaction_;
-
-  // level_ptrs_ holds indices into input_version_->levels_: our state
-  // is that we are positioned at one of the file ranges for each
-  // higher level than the ones involved in this compaction (i.e. for
-  // all L >= level_ + 2).
-  std::vector<size_t> level_ptrs_;
-
-  // mark (or clear) all files that are being compacted
-  void MarkFilesBeingCompacted(bool);
-
-  // Initialize whether compaction producing files at the bottommost level
-  void SetupBottomMostLevel(bool isManual);
-
-  // In case of compaction error, reset the nextIndex that is used
-  // to pick up the next file to be compacted from files_by_size_
-  void ResetNextCompactionIndex();
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/compaction_picker.cc b/src/rocksdb/db/compaction_picker.cc
deleted file mode 100644
index a8700bb..0000000
--- a/src/rocksdb/db/compaction_picker.cc
+++ /dev/null
@@ -1,889 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/compaction_picker.h"
-
-#include <limits>
-#include "util/log_buffer.h"
-#include "util/statistics.h"
-
-namespace rocksdb {
-
-namespace {
-
-uint64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
-  uint64_t sum = 0;
-  for (size_t i = 0; i < files.size() && files[i]; i++) {
-    sum += files[i]->file_size;
-  }
-  return sum;
-}
-
-// Multiple two operands. If they overflow, return op1.
-uint64_t MultiplyCheckOverflow(uint64_t op1, int op2) {
-  if (op1 == 0) {
-    return 0;
-  }
-  if (op2 <= 0) {
-    return op1;
-  }
-  uint64_t casted_op2 = (uint64_t) op2;
-  if (std::numeric_limits<uint64_t>::max() / op1 < casted_op2) {
-    return op1;
-  }
-  return op1 * casted_op2;
-}
-
-}  // anonymous namespace
-
-CompactionPicker::CompactionPicker(const Options* options,
-                                   const InternalKeyComparator* icmp)
-    : compactions_in_progress_(options->num_levels),
-      options_(options),
-      num_levels_(options->num_levels),
-      icmp_(icmp) {
-
-  max_file_size_.reset(new uint64_t[NumberLevels()]);
-  level_max_bytes_.reset(new uint64_t[NumberLevels()]);
-  int target_file_size_multiplier = options_->target_file_size_multiplier;
-  int max_bytes_multiplier = options_->max_bytes_for_level_multiplier;
-  for (int i = 0; i < NumberLevels(); i++) {
-    if (i == 0 && options_->compaction_style == kCompactionStyleUniversal) {
-      max_file_size_[i] = ULLONG_MAX;
-      level_max_bytes_[i] = options_->max_bytes_for_level_base;
-    } else if (i > 1) {
-      max_file_size_[i] = MultiplyCheckOverflow(max_file_size_[i - 1],
-                                                target_file_size_multiplier);
-      level_max_bytes_[i] = MultiplyCheckOverflow(
-          MultiplyCheckOverflow(level_max_bytes_[i - 1], max_bytes_multiplier),
-          options_->max_bytes_for_level_multiplier_additional[i - 1]);
-    } else {
-      max_file_size_[i] = options_->target_file_size_base;
-      level_max_bytes_[i] = options_->max_bytes_for_level_base;
-    }
-  }
-}
-
-CompactionPicker::~CompactionPicker() {}
-
-void CompactionPicker::SizeBeingCompacted(std::vector<uint64_t>& sizes) {
-  for (int level = 0; level < NumberLevels() - 1; level++) {
-    uint64_t total = 0;
-    for (auto c : compactions_in_progress_[level]) {
-      assert(c->level() == level);
-      for (int i = 0; i < c->num_input_files(0); i++) {
-        total += c->input(0,i)->file_size;
-      }
-    }
-    sizes[level] = total;
-  }
-}
-
-// Clear all files to indicate that they are not being compacted
-// Delete this compaction from the list of running compactions.
-void CompactionPicker::ReleaseCompactionFiles(Compaction* c, Status status) {
-  c->MarkFilesBeingCompacted(false);
-  compactions_in_progress_[c->level()].erase(c);
-  if (!status.ok()) {
-    c->ResetNextCompactionIndex();
-  }
-}
-
-uint64_t CompactionPicker::MaxFileSizeForLevel(int level) const {
-  assert(level >= 0);
-  assert(level < NumberLevels());
-  return max_file_size_[level];
-}
-
-uint64_t CompactionPicker::MaxGrandParentOverlapBytes(int level) {
-  uint64_t result = MaxFileSizeForLevel(level);
-  result *= options_->max_grandparent_overlap_factor;
-  return result;
-}
-
-double CompactionPicker::MaxBytesForLevel(int level) {
-  // Note: the result for level zero is not really used since we set
-  // the level-0 compaction threshold based on number of files.
-  assert(level >= 0);
-  assert(level < NumberLevels());
-  return level_max_bytes_[level];
-}
-
-void CompactionPicker::GetRange(const std::vector<FileMetaData*>& inputs,
-                                InternalKey* smallest, InternalKey* largest) {
-  assert(!inputs.empty());
-  smallest->Clear();
-  largest->Clear();
-  for (size_t i = 0; i < inputs.size(); i++) {
-    FileMetaData* f = inputs[i];
-    if (i == 0) {
-      *smallest = f->smallest;
-      *largest = f->largest;
-    } else {
-      if (icmp_->Compare(f->smallest, *smallest) < 0) {
-        *smallest = f->smallest;
-      }
-      if (icmp_->Compare(f->largest, *largest) > 0) {
-        *largest = f->largest;
-      }
-    }
-  }
-}
-
-void CompactionPicker::GetRange(const std::vector<FileMetaData*>& inputs1,
-                                const std::vector<FileMetaData*>& inputs2,
-                                InternalKey* smallest, InternalKey* largest) {
-  std::vector<FileMetaData*> all = inputs1;
-  all.insert(all.end(), inputs2.begin(), inputs2.end());
-  GetRange(all, smallest, largest);
-}
-
-bool CompactionPicker::ExpandWhileOverlapping(Compaction* c) {
-  // If inputs are empty then there is nothing to expand.
-  if (!c || c->inputs_[0].empty()) {
-    return true;
-  }
-
-  // GetOverlappingInputs will always do the right thing for level-0.
-  // So we don't need to do any expansion if level == 0.
-  if (c->level() == 0) {
-    return true;
-  }
-
-  const int level = c->level();
-  InternalKey smallest, largest;
-
-  // Keep expanding c->inputs_[0] until we are sure that there is a
-  // "clean cut" boundary between the files in input and the surrounding files.
-  // This will ensure that no parts of a key are lost during compaction.
-  int hint_index = -1;
-  size_t old_size;
-  do {
-    old_size = c->inputs_[0].size();
-    GetRange(c->inputs_[0], &smallest, &largest);
-    c->inputs_[0].clear();
-    c->input_version_->GetOverlappingInputs(
-        level, &smallest, &largest, &c->inputs_[0], hint_index, &hint_index);
-  } while(c->inputs_[0].size() > old_size);
-
-  // Get the new range
-  GetRange(c->inputs_[0], &smallest, &largest);
-
-  // If, after the expansion, there are files that are already under
-  // compaction, then we must drop/cancel this compaction.
-  int parent_index = -1;
-  if (c->inputs_[0].empty()) {
-    Log(options_->info_log,
-        "[%s] ExpandWhileOverlapping() failure because zero input files",
-        c->column_family_data()->GetName().c_str());
-  }
-  if (c->inputs_[0].empty() || FilesInCompaction(c->inputs_[0]) ||
-      (c->level() != c->output_level() &&
-       ParentRangeInCompaction(c->input_version_, &smallest, &largest, level,
-                               &parent_index))) {
-    c->inputs_[0].clear();
-    c->inputs_[1].clear();
-    return false;
-  }
-  return true;
-}
-
-uint64_t CompactionPicker::ExpandedCompactionByteSizeLimit(int level) {
-  uint64_t result = MaxFileSizeForLevel(level);
-  result *= options_->expanded_compaction_factor;
-  return result;
-}
-
-// Returns true if any one of specified files are being compacted
-bool CompactionPicker::FilesInCompaction(std::vector<FileMetaData*>& files) {
-  for (unsigned int i = 0; i < files.size(); i++) {
-    if (files[i]->being_compacted) {
-      return true;
-    }
-  }
-  return false;
-}
-
-// Returns true if any one of the parent files are being compacted
-bool CompactionPicker::ParentRangeInCompaction(Version* version,
-                                               const InternalKey* smallest,
-                                               const InternalKey* largest,
-                                               int level, int* parent_index) {
-  std::vector<FileMetaData*> inputs;
-  assert(level + 1 < NumberLevels());
-
-  version->GetOverlappingInputs(level + 1, smallest, largest, &inputs,
-                                *parent_index, parent_index);
-  return FilesInCompaction(inputs);
-}
-
-// Populates the set of inputs from "level+1" that overlap with "level".
-// Will also attempt to expand "level" if that doesn't expand "level+1"
-// or cause "level" to include a file for compaction that has an overlapping
-// user-key with another file.
-void CompactionPicker::SetupOtherInputs(Compaction* c) {
-  // If inputs are empty, then there is nothing to expand.
-  // If both input and output levels are the same, no need to consider
-  // files at level "level+1"
-  if (c->inputs_[0].empty() || c->level() == c->output_level()) {
-    return;
-  }
-
-  const int level = c->level();
-  InternalKey smallest, largest;
-
-  // Get the range one last time.
-  GetRange(c->inputs_[0], &smallest, &largest);
-
-  // Populate the set of next-level files (inputs_[1]) to include in compaction
-  c->input_version_->GetOverlappingInputs(level + 1, &smallest, &largest,
-                                          &c->inputs_[1], c->parent_index_,
-                                          &c->parent_index_);
-
-  // Get entire range covered by compaction
-  InternalKey all_start, all_limit;
-  GetRange(c->inputs_[0], c->inputs_[1], &all_start, &all_limit);
-
-  // See if we can further grow the number of inputs in "level" without
-  // changing the number of "level+1" files we pick up. We also choose NOT
-  // to expand if this would cause "level" to include some entries for some
-  // user key, while excluding other entries for the same user key. This
-  // can happen when one user key spans multiple files.
-  if (!c->inputs_[1].empty()) {
-    std::vector<FileMetaData*> expanded0;
-    c->input_version_->GetOverlappingInputs(
-        level, &all_start, &all_limit, &expanded0, c->base_index_, nullptr);
-    const uint64_t inputs0_size = TotalFileSize(c->inputs_[0]);
-    const uint64_t inputs1_size = TotalFileSize(c->inputs_[1]);
-    const uint64_t expanded0_size = TotalFileSize(expanded0);
-    uint64_t limit = ExpandedCompactionByteSizeLimit(level);
-    if (expanded0.size() > c->inputs_[0].size() &&
-        inputs1_size + expanded0_size < limit &&
-        !FilesInCompaction(expanded0) &&
-        !c->input_version_->HasOverlappingUserKey(&expanded0, level)) {
-      InternalKey new_start, new_limit;
-      GetRange(expanded0, &new_start, &new_limit);
-      std::vector<FileMetaData*> expanded1;
-      c->input_version_->GetOverlappingInputs(level + 1, &new_start, &new_limit,
-                                              &expanded1, c->parent_index_,
-                                              &c->parent_index_);
-      if (expanded1.size() == c->inputs_[1].size() &&
-          !FilesInCompaction(expanded1)) {
-        Log(options_->info_log,
-            "[%s] Expanding@%lu %lu+%lu (%lu+%lu bytes) to %lu+%lu (%lu+%lu "
-            "bytes)\n",
-            c->column_family_data()->GetName().c_str(), (unsigned long)level,
-            (unsigned long)(c->inputs_[0].size()),
-            (unsigned long)(c->inputs_[1].size()), (unsigned long)inputs0_size,
-            (unsigned long)inputs1_size, (unsigned long)(expanded0.size()),
-            (unsigned long)(expanded1.size()), (unsigned long)expanded0_size,
-            (unsigned long)inputs1_size);
-        smallest = new_start;
-        largest = new_limit;
-        c->inputs_[0] = expanded0;
-        c->inputs_[1] = expanded1;
-        GetRange(c->inputs_[0], c->inputs_[1], &all_start, &all_limit);
-      }
-    }
-  }
-
-  // Compute the set of grandparent files that overlap this compaction
-  // (parent == level+1; grandparent == level+2)
-  if (level + 2 < NumberLevels()) {
-    c->input_version_->GetOverlappingInputs(level + 2, &all_start, &all_limit,
-                                            &c->grandparents_);
-  }
-}
-
-
-Compaction* CompactionPicker::CompactRange(Version* version, int input_level,
-                                           int output_level,
-                                           const InternalKey* begin,
-                                           const InternalKey* end,
-                                           InternalKey** compaction_end) {
-  std::vector<FileMetaData*> inputs;
-  bool covering_the_whole_range = true;
-
-  // All files are 'overlapping' in universal style compaction.
-  // We have to compact the entire range in one shot.
-  if (options_->compaction_style == kCompactionStyleUniversal) {
-    begin = nullptr;
-    end = nullptr;
-  }
-  version->GetOverlappingInputs(input_level, begin, end, &inputs);
-  if (inputs.empty()) {
-    return nullptr;
-  }
-
-  // Avoid compacting too much in one shot in case the range is large.
-  // But we cannot do this for level-0 since level-0 files can overlap
-  // and we must not pick one file and drop another older file if the
-  // two files overlap.
-  if (input_level > 0) {
-    const uint64_t limit =
-        MaxFileSizeForLevel(input_level) * options_->source_compaction_factor;
-    uint64_t total = 0;
-    for (size_t i = 0; i + 1 < inputs.size(); ++i) {
-      uint64_t s = inputs[i]->file_size;
-      total += s;
-      if (total >= limit) {
-        **compaction_end = inputs[i + 1]->smallest;
-        covering_the_whole_range = false;
-        inputs.resize(i + 1);
-        break;
-      }
-    }
-  }
-  Compaction* c = new Compaction(version, input_level, output_level,
-                                 MaxFileSizeForLevel(output_level),
-                                 MaxGrandParentOverlapBytes(input_level));
-
-  c->inputs_[0] = inputs;
-  if (ExpandWhileOverlapping(c) == false) {
-    delete c;
-    Log(options_->info_log,
-        "[%s] Could not compact due to expansion failure.\n",
-        version->cfd_->GetName().c_str());
-    return nullptr;
-  }
-
-  SetupOtherInputs(c);
-
-  if (covering_the_whole_range) {
-    *compaction_end = nullptr;
-  }
-
-  // These files that are to be manaully compacted do not trample
-  // upon other files because manual compactions are processed when
-  // the system has a max of 1 background compaction thread.
-  c->MarkFilesBeingCompacted(true);
-
-  // Is this compaction creating a file at the bottommost level
-  c->SetupBottomMostLevel(true);
-
-  c->is_manual_compaction_ = true;
-
-  return c;
-}
-
-Compaction* LevelCompactionPicker::PickCompaction(Version* version,
-                                                  LogBuffer* log_buffer) {
-  Compaction* c = nullptr;
-  int level = -1;
-
-  // Compute the compactions needed. It is better to do it here
-  // and also in LogAndApply(), otherwise the values could be stale.
-  std::vector<uint64_t> size_being_compacted(NumberLevels() - 1);
-  SizeBeingCompacted(size_being_compacted);
-  version->ComputeCompactionScore(size_being_compacted);
-
-  // We prefer compactions triggered by too much data in a level over
-  // the compactions triggered by seeks.
-  //
-  // Find the compactions by size on all levels.
-  for (int i = 0; i < NumberLevels() - 1; i++) {
-    assert(i == 0 ||
-           version->compaction_score_[i] <= version->compaction_score_[i - 1]);
-    level = version->compaction_level_[i];
-    if ((version->compaction_score_[i] >= 1)) {
-      c = PickCompactionBySize(version, level, version->compaction_score_[i]);
-      if (ExpandWhileOverlapping(c) == false) {
-        delete c;
-        c = nullptr;
-      } else {
-        break;
-      }
-    }
-  }
-
-  // Find compactions needed by seeks
-  FileMetaData* f = version->file_to_compact_;
-  if (c == nullptr && f != nullptr && !f->being_compacted) {
-
-    level = version->file_to_compact_level_;
-    int parent_index = -1;
-
-    // Only allow one level 0 compaction at a time.
-    // Do not pick this file if its parents at level+1 are being compacted.
-    if (level != 0 || compactions_in_progress_[0].empty()) {
-      if (!ParentRangeInCompaction(version, &f->smallest, &f->largest, level,
-                                   &parent_index)) {
-        c = new Compaction(version, level, level + 1,
-                           MaxFileSizeForLevel(level + 1),
-                           MaxGrandParentOverlapBytes(level), true);
-        c->inputs_[0].push_back(f);
-        c->parent_index_ = parent_index;
-        c->input_version_->file_to_compact_ = nullptr;
-        if (ExpandWhileOverlapping(c) == false) {
-          return nullptr;
-        }
-      }
-    }
-  }
-
-  if (c == nullptr) {
-    return nullptr;
-  }
-
-  // Two level 0 compaction won't run at the same time, so don't need to worry
-  // about files on level 0 being compacted.
-  if (level == 0) {
-    assert(compactions_in_progress_[0].empty());
-    InternalKey smallest, largest;
-    GetRange(c->inputs_[0], &smallest, &largest);
-    // Note that the next call will discard the file we placed in
-    // c->inputs_[0] earlier and replace it with an overlapping set
-    // which will include the picked file.
-    c->inputs_[0].clear();
-    c->input_version_->GetOverlappingInputs(0, &smallest, &largest,
-                                            &c->inputs_[0]);
-
-    // If we include more L0 files in the same compaction run it can
-    // cause the 'smallest' and 'largest' key to get extended to a
-    // larger range. So, re-invoke GetRange to get the new key range
-    GetRange(c->inputs_[0], &smallest, &largest);
-    if (ParentRangeInCompaction(c->input_version_, &smallest, &largest, level,
-                                &c->parent_index_)) {
-      delete c;
-      return nullptr;
-    }
-    assert(!c->inputs_[0].empty());
-  }
-
-  // Setup "level+1" files (inputs_[1])
-  SetupOtherInputs(c);
-
-  // mark all the files that are being compacted
-  c->MarkFilesBeingCompacted(true);
-
-  // Is this compaction creating a file at the bottommost level
-  c->SetupBottomMostLevel(false);
-
-  // remember this currently undergoing compaction
-  compactions_in_progress_[level].insert(c);
-
-  return c;
-}
-
-Compaction* LevelCompactionPicker::PickCompactionBySize(Version* version,
-                                                        int level,
-                                                        double score) {
-  Compaction* c = nullptr;
-
-  // level 0 files are overlapping. So we cannot pick more
-  // than one concurrent compactions at this level. This
-  // could be made better by looking at key-ranges that are
-  // being compacted at level 0.
-  if (level == 0 && compactions_in_progress_[level].size() == 1) {
-    return nullptr;
-  }
-
-  assert(level >= 0);
-  assert(level + 1 < NumberLevels());
-  c = new Compaction(version, level, level + 1, MaxFileSizeForLevel(level + 1),
-                     MaxGrandParentOverlapBytes(level));
-  c->score_ = score;
-
-  // Pick the largest file in this level that is not already
-  // being compacted
-  std::vector<int>& file_size = c->input_version_->files_by_size_[level];
-
-  // record the first file that is not yet compacted
-  int nextIndex = -1;
-
-  for (unsigned int i = c->input_version_->next_file_to_compact_by_size_[level];
-       i < file_size.size(); i++) {
-    int index = file_size[i];
-    FileMetaData* f = c->input_version_->files_[level][index];
-
-    // check to verify files are arranged in descending size
-    assert((i == file_size.size() - 1) ||
-           (i >= Version::number_of_files_to_sort_ - 1) ||
-           (f->file_size >=
-            c->input_version_->files_[level][file_size[i + 1]]->file_size));
-
-    // do not pick a file to compact if it is being compacted
-    // from n-1 level.
-    if (f->being_compacted) {
-      continue;
-    }
-
-    // remember the startIndex for the next call to PickCompaction
-    if (nextIndex == -1) {
-      nextIndex = i;
-    }
-
-    // Do not pick this file if its parents at level+1 are being compacted.
-    // Maybe we can avoid redoing this work in SetupOtherInputs
-    int parent_index = -1;
-    if (ParentRangeInCompaction(c->input_version_, &f->smallest, &f->largest,
-                                level, &parent_index)) {
-      continue;
-    }
-    c->inputs_[0].push_back(f);
-    c->base_index_ = index;
-    c->parent_index_ = parent_index;
-    break;
-  }
-
-  if (c->inputs_[0].empty()) {
-    delete c;
-    c = nullptr;
-  }
-
-  // store where to start the iteration in the next call to PickCompaction
-  version->next_file_to_compact_by_size_[level] = nextIndex;
-
-  return c;
-}
-
-// Universal style of compaction. Pick files that are contiguous in
-// time-range to compact.
-//
-Compaction* UniversalCompactionPicker::PickCompaction(Version* version,
-                                                      LogBuffer* log_buffer) {
-  int level = 0;
-  double score = version->compaction_score_[0];
-
-  if ((version->files_[level].size() <
-       (unsigned int)options_->level0_file_num_compaction_trigger)) {
-    LogToBuffer(log_buffer, "[%s] Universal: nothing to do\n",
-                version->cfd_->GetName().c_str());
-    return nullptr;
-  }
-  Version::FileSummaryStorage tmp;
-  LogToBuffer(log_buffer, "[%s] Universal: candidate files(%zu): %s\n",
-              version->cfd_->GetName().c_str(), version->files_[level].size(),
-              version->LevelFileSummary(&tmp, 0));
-
-  // Check for size amplification first.
-  Compaction* c;
-  if ((c = PickCompactionUniversalSizeAmp(version, score, log_buffer)) !=
-      nullptr) {
-    LogToBuffer(log_buffer, "[%s] Universal: compacting for size amp\n",
-                version->cfd_->GetName().c_str());
-  } else {
-    // Size amplification is within limits. Try reducing read
-    // amplification while maintaining file size ratios.
-    unsigned int ratio = options_->compaction_options_universal.size_ratio;
-
-    if ((c = PickCompactionUniversalReadAmp(version, score, ratio, UINT_MAX,
-                                            log_buffer)) != nullptr) {
-      LogToBuffer(log_buffer, "[%s] Universal: compacting for size ratio\n",
-                  version->cfd_->GetName().c_str());
-    } else {
-      // Size amplification and file size ratios are within configured limits.
-      // If max read amplification is exceeding configured limits, then force
-      // compaction without looking at filesize ratios and try to reduce
-      // the number of files to fewer than level0_file_num_compaction_trigger.
-      unsigned int num_files = version->files_[level].size() -
-                               options_->level0_file_num_compaction_trigger;
-      if ((c = PickCompactionUniversalReadAmp(
-               version, score, UINT_MAX, num_files, log_buffer)) != nullptr) {
-        LogToBuffer(log_buffer, "[%s] Universal: compacting for file num\n",
-                    version->cfd_->GetName().c_str());
-      }
-    }
-  }
-  if (c == nullptr) {
-    return nullptr;
-  }
-  assert(c->inputs_[0].size() > 1);
-
-  // validate that all the chosen files are non overlapping in time
-  FileMetaData* newerfile __attribute__((unused)) = nullptr;
-  for (unsigned int i = 0; i < c->inputs_[0].size(); i++) {
-    FileMetaData* f = c->inputs_[0][i];
-    assert (f->smallest_seqno <= f->largest_seqno);
-    assert(newerfile == nullptr ||
-           newerfile->smallest_seqno > f->largest_seqno);
-    newerfile = f;
-  }
-
-  // The files are sorted from newest first to oldest last.
-  std::vector<int>& file_by_time = c->input_version_->files_by_size_[level];
-
-  // Is the earliest file part of this compaction?
-  int last_index = file_by_time[file_by_time.size()-1];
-  FileMetaData* last_file = c->input_version_->files_[level][last_index];
-  if (c->inputs_[0][c->inputs_[0].size()-1] == last_file) {
-    c->bottommost_level_ = true;
-  }
-
-  // update statistics
-  MeasureTime(options_->statistics.get(), NUM_FILES_IN_SINGLE_COMPACTION,
-              c->inputs_[0].size());
-
-  // mark all the files that are being compacted
-  c->MarkFilesBeingCompacted(true);
-
-  // remember this currently undergoing compaction
-  compactions_in_progress_[level].insert(c);
-
-  // Record whether this compaction includes all sst files.
-  // For now, it is only relevant in universal compaction mode.
-  c->is_full_compaction_ =
-      (c->inputs_[0].size() == c->input_version_->files_[0].size());
-
-  return c;
-}
-
-//
-// Consider compaction files based on their size differences with
-// the next file in time order.
-//
-Compaction* UniversalCompactionPicker::PickCompactionUniversalReadAmp(
-    Version* version, double score, unsigned int ratio,
-    unsigned int max_number_of_files_to_compact, LogBuffer* log_buffer) {
-  int level = 0;
-
-  unsigned int min_merge_width =
-    options_->compaction_options_universal.min_merge_width;
-  unsigned int max_merge_width =
-    options_->compaction_options_universal.max_merge_width;
-
-  // The files are sorted from newest first to oldest last.
-  std::vector<int>& file_by_time = version->files_by_size_[level];
-  FileMetaData* f = nullptr;
-  bool done = false;
-  int start_index = 0;
-  unsigned int candidate_count = 0;
-  assert(file_by_time.size() == version->files_[level].size());
-
-  unsigned int max_files_to_compact = std::min(max_merge_width,
-                                       max_number_of_files_to_compact);
-  min_merge_width = std::max(min_merge_width, 2U);
-
-  // Considers a candidate file only if it is smaller than the
-  // total size accumulated so far.
-  for (unsigned int loop = 0; loop < file_by_time.size(); loop++) {
-
-    candidate_count = 0;
-
-    // Skip files that are already being compacted
-    for (f = nullptr; loop < file_by_time.size(); loop++) {
-      int index = file_by_time[loop];
-      f = version->files_[level][index];
-
-      if (!f->being_compacted) {
-        candidate_count = 1;
-        break;
-      }
-      LogToBuffer(
-          log_buffer, "[%s] Universal: file %lu[%d] being compacted, skipping",
-          version->cfd_->GetName().c_str(), (unsigned long)f->number, loop);
-      f = nullptr;
-    }
-
-    // This file is not being compacted. Consider it as the
-    // first candidate to be compacted.
-    uint64_t candidate_size =  f != nullptr? f->file_size : 0;
-    if (f != nullptr) {
-      LogToBuffer(
-          log_buffer, "[%s] Universal: Possible candidate file %lu[%d].",
-          version->cfd_->GetName().c_str(), (unsigned long)f->number, loop);
-    }
-
-    // Check if the suceeding files need compaction.
-    for (unsigned int i = loop+1;
-         candidate_count < max_files_to_compact && i < file_by_time.size();
-         i++) {
-      int index = file_by_time[i];
-      FileMetaData* f = version->files_[level][index];
-      if (f->being_compacted) {
-        break;
-      }
-      // Pick files if the total/last candidate file size (increased by the
-      // specified ratio) is still larger than the next candidate file.
-      // candidate_size is the total size of files picked so far with the
-      // default kCompactionStopStyleTotalSize; with
-      // kCompactionStopStyleSimilarSize, it's simply the size of the last
-      // picked file.
-      uint64_t sz = (candidate_size * (100L + ratio)) /100;
-      if (sz < f->file_size) {
-        break;
-      }
-      if (options_->compaction_options_universal.stop_style == kCompactionStopStyleSimilarSize) {
-        // Similar-size stopping rule: also check the last picked file isn't
-        // far larger than the next candidate file.
-        sz = (f->file_size * (100L + ratio)) / 100;
-        if (sz < candidate_size) {
-          // If the small file we've encountered begins a run of similar-size
-          // files, we'll pick them up on a future iteration of the outer
-          // loop. If it's some lonely straggler, it'll eventually get picked
-          // by the last-resort read amp strategy which disregards size ratios.
-          break;
-        }
-        candidate_size = f->file_size;
-      } else { // default kCompactionStopStyleTotalSize
-        candidate_size += f->file_size;
-      }
-      candidate_count++;
-    }
-
-    // Found a series of consecutive files that need compaction.
-    if (candidate_count >= (unsigned int)min_merge_width) {
-      start_index = loop;
-      done = true;
-      break;
-    } else {
-      for (unsigned int i = loop;
-           i < loop + candidate_count && i < file_by_time.size(); i++) {
-       int index = file_by_time[i];
-       FileMetaData* f = version->files_[level][index];
-       LogToBuffer(log_buffer,
-                   "[%s] Universal: Skipping file %lu[%d] with size %lu %d\n",
-                   version->cfd_->GetName().c_str(), (unsigned long)f->number,
-                   i, (unsigned long)f->file_size, f->being_compacted);
-      }
-    }
-  }
-  if (!done || candidate_count <= 1) {
-    return nullptr;
-  }
-  unsigned int first_index_after = start_index + candidate_count;
-  // Compression is enabled if files compacted earlier already reached
-  // size ratio of compression.
-  bool enable_compression = true;
-  int ratio_to_compress =
-      options_->compaction_options_universal.compression_size_percent;
-  if (ratio_to_compress >= 0) {
-    uint64_t total_size = version->NumLevelBytes(level);
-    uint64_t older_file_size = 0;
-    for (unsigned int i = file_by_time.size() - 1; i >= first_index_after;
-        i--) {
-      older_file_size += version->files_[level][file_by_time[i]]->file_size;
-      if (older_file_size * 100L >= total_size * (long) ratio_to_compress) {
-        enable_compression = false;
-        break;
-      }
-    }
-  }
-  Compaction* c =
-      new Compaction(version, level, level, MaxFileSizeForLevel(level),
-                     LLONG_MAX, false, enable_compression);
-  c->score_ = score;
-
-  for (unsigned int i = start_index; i < first_index_after; i++) {
-    int index = file_by_time[i];
-    FileMetaData* f = c->input_version_->files_[level][index];
-    c->inputs_[0].push_back(f);
-    LogToBuffer(log_buffer,
-                "[%s] Universal: Picking file %lu[%d] with size %lu\n",
-                version->cfd_->GetName().c_str(), (unsigned long)f->number, i,
-                (unsigned long)f->file_size);
-  }
-  return c;
-}
-
-// Look at overall size amplification. If size amplification
-// exceeeds the configured value, then do a compaction
-// of the candidate files all the way upto the earliest
-// base file (overrides configured values of file-size ratios,
-// min_merge_width and max_merge_width).
-//
-Compaction* UniversalCompactionPicker::PickCompactionUniversalSizeAmp(
-    Version* version, double score, LogBuffer* log_buffer) {
-  int level = 0;
-
-  // percentage flexibilty while reducing size amplification
-  uint64_t ratio = options_->compaction_options_universal.
-                     max_size_amplification_percent;
-
-  // The files are sorted from newest first to oldest last.
-  std::vector<int>& file_by_time = version->files_by_size_[level];
-  assert(file_by_time.size() == version->files_[level].size());
-
-  unsigned int candidate_count = 0;
-  uint64_t candidate_size = 0;
-  unsigned int start_index = 0;
-  FileMetaData* f = nullptr;
-
-  // Skip files that are already being compacted
-  for (unsigned int loop = 0; loop < file_by_time.size() - 1; loop++) {
-    int index = file_by_time[loop];
-    f = version->files_[level][index];
-    if (!f->being_compacted) {
-      start_index = loop;         // Consider this as the first candidate.
-      break;
-    }
-    LogToBuffer(log_buffer,
-                "[%s] Universal: skipping file %lu[%d] compacted %s",
-                version->cfd_->GetName().c_str(), (unsigned long)f->number,
-                loop, " cannot be a candidate to reduce size amp.\n");
-    f = nullptr;
-  }
-  if (f == nullptr) {
-    return nullptr;             // no candidate files
-  }
-
-  LogToBuffer(log_buffer, "[%s] Universal: First candidate file %lu[%d] %s",
-              version->cfd_->GetName().c_str(), (unsigned long)f->number,
-              start_index, " to reduce size amp.\n");
-
-  // keep adding up all the remaining files
-  for (unsigned int loop = start_index; loop < file_by_time.size() - 1;
-       loop++) {
-    int index = file_by_time[loop];
-    f = version->files_[level][index];
-    if (f->being_compacted) {
-      LogToBuffer(
-          log_buffer, "[%s] Universal: Possible candidate file %lu[%d] %s.",
-          version->cfd_->GetName().c_str(), (unsigned long)f->number, loop,
-          " is already being compacted. No size amp reduction possible.\n");
-      return nullptr;
-    }
-    candidate_size += f->file_size;
-    candidate_count++;
-  }
-  if (candidate_count == 0) {
-    return nullptr;
-  }
-
-  // size of earliest file
-  int index = file_by_time[file_by_time.size() - 1];
-  uint64_t earliest_file_size = version->files_[level][index]->file_size;
-
-  // size amplification = percentage of additional size
-  if (candidate_size * 100 < ratio * earliest_file_size) {
-    LogToBuffer(
-        log_buffer,
-        "[%s] Universal: size amp not needed. newer-files-total-size %lu "
-        "earliest-file-size %lu",
-        version->cfd_->GetName().c_str(), (unsigned long)candidate_size,
-        (unsigned long)earliest_file_size);
-    return nullptr;
-  } else {
-    LogToBuffer(log_buffer,
-                "[%s] Universal: size amp needed. newer-files-total-size %lu "
-                "earliest-file-size %lu",
-                version->cfd_->GetName().c_str(), (unsigned long)candidate_size,
-                (unsigned long)earliest_file_size);
-  }
-  assert(start_index >= 0 && start_index < file_by_time.size() - 1);
-
-  // create a compaction request
-  // We always compact all the files, so always compress.
-  Compaction* c =
-      new Compaction(version, level, level, MaxFileSizeForLevel(level),
-                     LLONG_MAX, false, true);
-  c->score_ = score;
-  for (unsigned int loop = start_index; loop < file_by_time.size(); loop++) {
-    int index = file_by_time[loop];
-    f = c->input_version_->files_[level][index];
-    c->inputs_[0].push_back(f);
-    LogToBuffer(log_buffer,
-                "[%s] Universal: size amp picking file %lu[%d] with size %lu",
-                version->cfd_->GetName().c_str(), (unsigned long)f->number,
-                index, (unsigned long)f->file_size);
-  }
-  return c;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/compaction_picker.h b/src/rocksdb/db/compaction_picker.h
deleted file mode 100644
index 6527ef9..0000000
--- a/src/rocksdb/db/compaction_picker.h
+++ /dev/null
@@ -1,165 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "db/version_set.h"
-#include "db/compaction.h"
-#include "rocksdb/status.h"
-#include "rocksdb/options.h"
-#include "rocksdb/env.h"
-
-#include <vector>
-#include <memory>
-#include <set>
-
-namespace rocksdb {
-
-class LogBuffer;
-class Compaction;
-class Version;
-
-class CompactionPicker {
- public:
-  CompactionPicker(const Options* options, const InternalKeyComparator* icmp);
-  virtual ~CompactionPicker();
-
-  // Pick level and inputs for a new compaction.
-  // Returns nullptr if there is no compaction to be done.
-  // Otherwise returns a pointer to a heap-allocated object that
-  // describes the compaction.  Caller should delete the result.
-  virtual Compaction* PickCompaction(Version* version,
-                                     LogBuffer* log_buffer) = 0;
-
-  // Return a compaction object for compacting the range [begin,end] in
-  // the specified level.  Returns nullptr if there is nothing in that
-  // level that overlaps the specified range.  Caller should delete
-  // the result.
-  //
-  // The returned Compaction might not include the whole requested range.
-  // In that case, compaction_end will be set to the next key that needs
-  // compacting. In case the compaction will compact the whole range,
-  // compaction_end will be set to nullptr.
-  // Client is responsible for compaction_end storage -- when called,
-  // *compaction_end should point to valid InternalKey!
-  Compaction* CompactRange(Version* version, int input_level, int output_level,
-                           const InternalKey* begin, const InternalKey* end,
-                           InternalKey** compaction_end);
-
-  // Free up the files that participated in a compaction
-  void ReleaseCompactionFiles(Compaction* c, Status status);
-
-  // Return the total amount of data that is undergoing
-  // compactions per level
-  void SizeBeingCompacted(std::vector<uint64_t>& sizes);
-
-  // Returns maximum total overlap bytes with grandparent
-  // level (i.e., level+2) before we stop building a single
-  // file in level->level+1 compaction.
-  uint64_t MaxGrandParentOverlapBytes(int level);
-
-  // Returns maximum total bytes of data on a given level.
-  double MaxBytesForLevel(int level);
-
-  // Get the max file size in a given level.
-  uint64_t MaxFileSizeForLevel(int level) const;
-
- protected:
-  int NumberLevels() const { return num_levels_; }
-
-  // Stores the minimal range that covers all entries in inputs in
-  // *smallest, *largest.
-  // REQUIRES: inputs is not empty
-  void GetRange(const std::vector<FileMetaData*>& inputs, InternalKey* smallest,
-                InternalKey* largest);
-
-  // Stores the minimal range that covers all entries in inputs1 and inputs2
-  // in *smallest, *largest.
-  // REQUIRES: inputs is not empty
-  void GetRange(const std::vector<FileMetaData*>& inputs1,
-                const std::vector<FileMetaData*>& inputs2,
-                InternalKey* smallest, InternalKey* largest);
-
-  // Add more files to the inputs on "level" to make sure that
-  // no newer version of a key is compacted to "level+1" while leaving an older
-  // version in a "level". Otherwise, any Get() will search "level" first,
-  // and will likely return an old/stale value for the key, since it always
-  // searches in increasing order of level to find the value. This could
-  // also scramble the order of merge operands. This function should be
-  // called any time a new Compaction is created, and its inputs_[0] are
-  // populated.
-  //
-  // Will return false if it is impossible to apply this compaction.
-  bool ExpandWhileOverlapping(Compaction* c);
-
-  uint64_t ExpandedCompactionByteSizeLimit(int level);
-
-  // Returns true if any one of the specified files are being compacted
-  bool FilesInCompaction(std::vector<FileMetaData*>& files);
-
-  // Returns true if any one of the parent files are being compacted
-  bool ParentRangeInCompaction(Version* version, const InternalKey* smallest,
-                               const InternalKey* largest, int level,
-                               int* index);
-
-  void SetupOtherInputs(Compaction* c);
-
-  // record all the ongoing compactions for all levels
-  std::vector<std::set<Compaction*>> compactions_in_progress_;
-
-  // Per-level target file size.
-  std::unique_ptr<uint64_t[]> max_file_size_;
-
-  // Per-level max bytes
-  std::unique_ptr<uint64_t[]> level_max_bytes_;
-
-  const Options* const options_;
-
- private:
-  int num_levels_;
-
-  const InternalKeyComparator* const icmp_;
-};
-
-class UniversalCompactionPicker : public CompactionPicker {
- public:
-  UniversalCompactionPicker(const Options* options,
-                            const InternalKeyComparator* icmp)
-      : CompactionPicker(options, icmp) {}
-  virtual Compaction* PickCompaction(Version* version,
-                                     LogBuffer* log_buffer) override;
-
- private:
-  // Pick Universal compaction to limit read amplification
-  Compaction* PickCompactionUniversalReadAmp(Version* version, double score,
-                                             unsigned int ratio,
-                                             unsigned int num_files,
-                                             LogBuffer* log_buffer);
-
-  // Pick Universal compaction to limit space amplification.
-  Compaction* PickCompactionUniversalSizeAmp(Version* version, double score,
-                                             LogBuffer* log_buffer);
-};
-
-class LevelCompactionPicker : public CompactionPicker {
- public:
-  LevelCompactionPicker(const Options* options,
-                        const InternalKeyComparator* icmp)
-      : CompactionPicker(options, icmp) {}
-  virtual Compaction* PickCompaction(Version* version,
-                                     LogBuffer* log_buffer) override;
-
- private:
-  // For the specfied level, pick a compaction.
-  // Returns nullptr if there is no compaction to be done.
-  // If level is 0 and there is already a compaction on that level, this
-  // function will return nullptr.
-  Compaction* PickCompactionBySize(Version* version, int level, double score);
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/corruption_test.cc b/src/rocksdb/db/corruption_test.cc
deleted file mode 100644
index 4726e92..0000000
--- a/src/rocksdb/db/corruption_test.cc
+++ /dev/null
@@ -1,440 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/db.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include "rocksdb/cache.h"
-#include "rocksdb/env.h"
-#include "rocksdb/table.h"
-#include "rocksdb/write_batch.h"
-#include "db/db_impl.h"
-#include "db/filename.h"
-#include "db/log_format.h"
-#include "db/version_set.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-static const int kValueSize = 1000;
-
-class CorruptionTest {
- public:
-  test::ErrorEnv env_;
-  std::string dbname_;
-  shared_ptr<Cache> tiny_cache_;
-  Options options_;
-  DB* db_;
-
-  CorruptionTest() {
-    tiny_cache_ = NewLRUCache(100);
-    options_.env = &env_;
-    dbname_ = test::TmpDir() + "/corruption_test";
-    DestroyDB(dbname_, options_);
-
-    db_ = nullptr;
-    options_.create_if_missing = true;
-    options_.block_size_deviation = 0; // make unit test pass for now
-    Reopen();
-    options_.create_if_missing = false;
-  }
-
-  ~CorruptionTest() {
-     delete db_;
-     DestroyDB(dbname_, Options());
-  }
-
-  Status TryReopen(Options* options = nullptr) {
-    delete db_;
-    db_ = nullptr;
-    Options opt = (options ? *options : options_);
-    opt.env = &env_;
-    opt.block_cache = tiny_cache_;
-    opt.block_size_deviation = 0;
-    opt.arena_block_size = 4096;
-    return DB::Open(opt, dbname_, &db_);
-  }
-
-  void Reopen(Options* options = nullptr) {
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void RepairDB() {
-    delete db_;
-    db_ = nullptr;
-    ASSERT_OK(::rocksdb::RepairDB(dbname_, options_));
-  }
-
-  void Build(int n) {
-    std::string key_space, value_space;
-    WriteBatch batch;
-    for (int i = 0; i < n; i++) {
-      //if ((i % 100) == 0) fprintf(stderr, "@ %d of %d\n", i, n);
-      Slice key = Key(i, &key_space);
-      batch.Clear();
-      batch.Put(key, Value(i, &value_space));
-      ASSERT_OK(db_->Write(WriteOptions(), &batch));
-    }
-  }
-
-  void Check(int min_expected, int max_expected) {
-    unsigned int next_expected = 0;
-    int missed = 0;
-    int bad_keys = 0;
-    int bad_values = 0;
-    int correct = 0;
-    std::string value_space;
-    // Do not verify checksums. If we verify checksums then the
-    // db itself will raise errors because data is corrupted.
-    // Instead, we want the reads to be successful and this test
-    // will detect whether the appropriate corruptions have
-    // occured.
-    Iterator* iter = db_->NewIterator(ReadOptions(false, true));
-    for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-      uint64_t key;
-      Slice in(iter->key());
-      if (!ConsumeDecimalNumber(&in, &key) ||
-          !in.empty() ||
-          key < next_expected) {
-        bad_keys++;
-        continue;
-      }
-      missed += (key - next_expected);
-      next_expected = key + 1;
-      if (iter->value() != Value(key, &value_space)) {
-        bad_values++;
-      } else {
-        correct++;
-      }
-    }
-    delete iter;
-
-    fprintf(stderr,
-            "expected=%d..%d; got=%d; bad_keys=%d; bad_values=%d; missed=%d\n",
-            min_expected, max_expected, correct, bad_keys, bad_values, missed);
-    ASSERT_LE(min_expected, correct);
-    ASSERT_GE(max_expected, correct);
-  }
-
-  void CorruptFile(const std::string fname, int offset, int bytes_to_corrupt) {
-    struct stat sbuf;
-    if (stat(fname.c_str(), &sbuf) != 0) {
-      const char* msg = strerror(errno);
-      ASSERT_TRUE(false) << fname << ": " << msg;
-    }
-
-    if (offset < 0) {
-      // Relative to end of file; make it absolute
-      if (-offset > sbuf.st_size) {
-        offset = 0;
-      } else {
-        offset = sbuf.st_size + offset;
-      }
-    }
-    if (offset > sbuf.st_size) {
-      offset = sbuf.st_size;
-    }
-    if (offset + bytes_to_corrupt > sbuf.st_size) {
-      bytes_to_corrupt = sbuf.st_size - offset;
-    }
-
-    // Do it
-    std::string contents;
-    Status s = ReadFileToString(Env::Default(), fname, &contents);
-    ASSERT_TRUE(s.ok()) << s.ToString();
-    for (int i = 0; i < bytes_to_corrupt; i++) {
-      contents[i + offset] ^= 0x80;
-    }
-    s = WriteStringToFile(Env::Default(), contents, fname);
-    ASSERT_TRUE(s.ok()) << s.ToString();
-  }
-
-  void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) {
-    // Pick file to corrupt
-    std::vector<std::string> filenames;
-    ASSERT_OK(env_.GetChildren(dbname_, &filenames));
-    uint64_t number;
-    FileType type;
-    std::string fname;
-    int picked_number = -1;
-    for (unsigned int i = 0; i < filenames.size(); i++) {
-      if (ParseFileName(filenames[i], &number, &type) &&
-          type == filetype &&
-          static_cast<int>(number) > picked_number) {  // Pick latest file
-        fname = dbname_ + "/" + filenames[i];
-        picked_number = number;
-      }
-    }
-    ASSERT_TRUE(!fname.empty()) << filetype;
-
-    CorruptFile(fname, offset, bytes_to_corrupt);
-  }
-
-  // corrupts exactly one file at level `level`. if no file found at level,
-  // asserts
-  void CorruptTableFileAtLevel(int level, int offset, int bytes_to_corrupt) {
-    std::vector<LiveFileMetaData> metadata;
-    db_->GetLiveFilesMetaData(&metadata);
-    for (const auto& m : metadata) {
-      if (m.level == level) {
-        CorruptFile(dbname_ + "/" + m.name, offset, bytes_to_corrupt);
-        return;
-      }
-    }
-    ASSERT_TRUE(false) << "no file found at level";
-  }
-
-
-  int Property(const std::string& name) {
-    std::string property;
-    int result;
-    if (db_->GetProperty(name, &property) &&
-        sscanf(property.c_str(), "%d", &result) == 1) {
-      return result;
-    } else {
-      return -1;
-    }
-  }
-
-  // Return the ith key
-  Slice Key(int i, std::string* storage) {
-    char buf[100];
-    snprintf(buf, sizeof(buf), "%016d", i);
-    storage->assign(buf, strlen(buf));
-    return Slice(*storage);
-  }
-
-  // Return the value to associate with the specified key
-  Slice Value(int k, std::string* storage) {
-    Random r(k);
-    return test::RandomString(&r, kValueSize, storage);
-  }
-};
-
-TEST(CorruptionTest, Recovery) {
-  Build(100);
-  Check(100, 100);
-  Corrupt(kLogFile, 19, 1);      // WriteBatch tag for first record
-  Corrupt(kLogFile, log::kBlockSize + 1000, 1);  // Somewhere in second block
-  Reopen();
-
-  // The 64 records in the first two log blocks are completely lost.
-  Check(36, 36);
-}
-
-TEST(CorruptionTest, RecoverWriteError) {
-  env_.writable_file_error_ = true;
-  Status s = TryReopen();
-  ASSERT_TRUE(!s.ok());
-}
-
-TEST(CorruptionTest, NewFileErrorDuringWrite) {
-  // Do enough writing to force minor compaction
-  env_.writable_file_error_ = true;
-  const int num = 3 + (Options().write_buffer_size / kValueSize);
-  std::string value_storage;
-  Status s;
-  bool failed = false;
-  for (int i = 0; i < num; i++) {
-    WriteBatch batch;
-    batch.Put("a", Value(100, &value_storage));
-    s = db_->Write(WriteOptions(), &batch);
-    if (!s.ok()) {
-      failed = true;
-    }
-    ASSERT_TRUE(!failed || !s.ok());
-  }
-  ASSERT_TRUE(!s.ok());
-  ASSERT_GE(env_.num_writable_file_errors_, 1);
-  env_.writable_file_error_ = false;
-  Reopen();
-}
-
-TEST(CorruptionTest, TableFile) {
-  Build(100);
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-  dbi->TEST_FlushMemTable();
-  dbi->TEST_CompactRange(0, nullptr, nullptr);
-  dbi->TEST_CompactRange(1, nullptr, nullptr);
-
-  Corrupt(kTableFile, 100, 1);
-  Check(99, 99);
-}
-
-TEST(CorruptionTest, TableFileIndexData) {
-  Build(10000);  // Enough to build multiple Tables
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-  dbi->TEST_FlushMemTable();
-
-  Corrupt(kTableFile, -2000, 500);
-  Reopen();
-  Check(5000, 9999);
-}
-
-TEST(CorruptionTest, MissingDescriptor) {
-  Build(1000);
-  RepairDB();
-  Reopen();
-  Check(1000, 1000);
-}
-
-TEST(CorruptionTest, SequenceNumberRecovery) {
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "v1"));
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "v2"));
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "v3"));
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "v4"));
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "v5"));
-  RepairDB();
-  Reopen();
-  std::string v;
-  ASSERT_OK(db_->Get(ReadOptions(), "foo", &v));
-  ASSERT_EQ("v5", v);
-  // Write something.  If sequence number was not recovered properly,
-  // it will be hidden by an earlier write.
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "v6"));
-  ASSERT_OK(db_->Get(ReadOptions(), "foo", &v));
-  ASSERT_EQ("v6", v);
-  Reopen();
-  ASSERT_OK(db_->Get(ReadOptions(), "foo", &v));
-  ASSERT_EQ("v6", v);
-}
-
-TEST(CorruptionTest, CorruptedDescriptor) {
-  ASSERT_OK(db_->Put(WriteOptions(), "foo", "hello"));
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-  dbi->TEST_FlushMemTable();
-  dbi->TEST_CompactRange(0, nullptr, nullptr);
-
-  Corrupt(kDescriptorFile, 0, 1000);
-  Status s = TryReopen();
-  ASSERT_TRUE(!s.ok());
-
-  RepairDB();
-  Reopen();
-  std::string v;
-  ASSERT_OK(db_->Get(ReadOptions(), "foo", &v));
-  ASSERT_EQ("hello", v);
-}
-
-TEST(CorruptionTest, CompactionInputError) {
-  Build(10);
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-  dbi->TEST_FlushMemTable();
-  const int last = dbi->MaxMemCompactionLevel();
-  ASSERT_EQ(1, Property("rocksdb.num-files-at-level" + NumberToString(last)));
-
-  Corrupt(kTableFile, 100, 1);
-  Check(9, 9);
-
-  // Force compactions by writing lots of values
-  Build(10000);
-  Check(10000, 10000);
-}
-
-TEST(CorruptionTest, CompactionInputErrorParanoid) {
-  Options options;
-  options.paranoid_checks = true;
-  options.write_buffer_size = 131072;
-  options.max_write_buffer_number = 2;
-  Reopen(&options);
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-
-  // Fill levels >= 1 so memtable flush outputs to level 0
-  for (int level = 1; level < dbi->NumberLevels(); level++) {
-    dbi->Put(WriteOptions(), "", "begin");
-    dbi->Put(WriteOptions(), "~", "end");
-    dbi->TEST_FlushMemTable();
-  }
-
-  options.max_mem_compaction_level = 0;
-  Reopen(&options);
-
-  dbi = reinterpret_cast<DBImpl*>(db_);
-  Build(10);
-  dbi->TEST_FlushMemTable();
-  dbi->TEST_WaitForCompact();
-  ASSERT_EQ(1, Property("rocksdb.num-files-at-level0"));
-
-  CorruptTableFileAtLevel(0, 100, 1);
-  Check(9, 9);
-
-  // Write must eventually fail because of corrupted table
-  Status s;
-  std::string tmp1, tmp2;
-  bool failed = false;
-  for (int i = 0; i < 10000; i++) {
-    s = db_->Put(WriteOptions(), Key(i, &tmp1), Value(i, &tmp2));
-    if (!s.ok()) {
-      failed = true;
-    }
-    // if one write failed, every subsequent write must fail, too
-    ASSERT_TRUE(!failed || !s.ok()) << "write did not fail in a corrupted db";
-  }
-  ASSERT_TRUE(!s.ok()) << "write did not fail in corrupted paranoid db";
-}
-
-TEST(CorruptionTest, UnrelatedKeys) {
-  Build(10);
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-  dbi->TEST_FlushMemTable();
-  Corrupt(kTableFile, 100, 1);
-
-  std::string tmp1, tmp2;
-  ASSERT_OK(db_->Put(WriteOptions(), Key(1000, &tmp1), Value(1000, &tmp2)));
-  std::string v;
-  ASSERT_OK(db_->Get(ReadOptions(), Key(1000, &tmp1), &v));
-  ASSERT_EQ(Value(1000, &tmp2).ToString(), v);
-  dbi->TEST_FlushMemTable();
-  ASSERT_OK(db_->Get(ReadOptions(), Key(1000, &tmp1), &v));
-  ASSERT_EQ(Value(1000, &tmp2).ToString(), v);
-}
-
-TEST(CorruptionTest, FileSystemStateCorrupted) {
-  for (int iter = 0; iter < 2; ++iter) {
-    Options options;
-    options.paranoid_checks = true;
-    options.create_if_missing = true;
-    Reopen(&options);
-    Build(10);
-    ASSERT_OK(db_->Flush(FlushOptions()));
-    DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-    std::vector<LiveFileMetaData> metadata;
-    dbi->GetLiveFilesMetaData(&metadata);
-    ASSERT_GT(metadata.size(), size_t(0));
-    std::string filename = dbname_ + metadata[0].name;
-
-    delete db_;
-    db_ = nullptr;
-
-    if (iter == 0) {  // corrupt file size
-      unique_ptr<WritableFile> file;
-      env_.NewWritableFile(filename, &file, EnvOptions());
-      file->Append(Slice("corrupted sst"));
-      file.reset();
-    } else {  // delete the file
-      env_.DeleteFile(filename);
-    }
-
-    Status x = TryReopen(&options);
-    ASSERT_TRUE(x.IsCorruption());
-    DestroyDB(dbname_, options_);
-    Reopen(&options);
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/db_bench.cc b/src/rocksdb/db/db_bench.cc
deleted file mode 100644
index 2e8da9e..0000000
--- a/src/rocksdb/db/db_bench.cc
+++ /dev/null
@@ -1,2616 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <cstddef>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <gflags/gflags.h>
-#include "db/db_impl.h"
-#include "db/version_set.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/options.h"
-#include "rocksdb/cache.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/write_batch.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/perf_context.h"
-#include "port/port.h"
-#include "port/stack_trace.h"
-#include "util/crc32c.h"
-#include "util/histogram.h"
-#include "util/mutexlock.h"
-#include "util/random.h"
-#include "util/string_util.h"
-#include "util/statistics.h"
-#include "util/testutil.h"
-#include "util/xxhash.h"
-#include "hdfs/env_hdfs.h"
-#include "utilities/merge_operators.h"
-
-
-DEFINE_string(benchmarks,
-              "fillseq,"
-              "fillsync,"
-              "fillrandom,"
-              "overwrite,"
-              "readrandom,"
-              "newiterator,"
-              "newiteratorwhilewriting,"
-              "seekrandom,"
-              "seekrandomwhilewriting,"
-              "readseq,"
-              "readreverse,"
-              "compact,"
-              "readrandom,"
-              "multireadrandom,"
-              "readseq,"
-              "readtocache,"
-              "readreverse,"
-              "readwhilewriting,"
-              "readrandomwriterandom,"
-              "updaterandom,"
-              "randomwithverify,"
-              "fill100K,"
-              "crc32c,"
-              "xxhash,"
-              "compress,"
-              "uncompress,"
-              "acquireload,",
-
-              "Comma-separated list of operations to run in the specified order"
-              "Actual benchmarks:\n"
-              "\tfillseq       -- write N values in sequential key"
-              " order in async mode\n"
-              "\tfillrandom    -- write N values in random key order in async"
-              " mode\n"
-              "\toverwrite     -- overwrite N values in random key order in"
-              " async mode\n"
-              "\tfillsync      -- write N/100 values in random key order in "
-              "sync mode\n"
-              "\tfill100K      -- write N/1000 100K values in random order in"
-              " async mode\n"
-              "\tdeleteseq     -- delete N keys in sequential order\n"
-              "\tdeleterandom  -- delete N keys in random order\n"
-              "\treadseq       -- read N times sequentially\n"
-              "\treadtocache   -- 1 thread reading database sequentially\n"
-              "\treadreverse   -- read N times in reverse order\n"
-              "\treadrandom    -- read N times in random order\n"
-              "\treadmissing   -- read N missing keys in random order\n"
-              "\treadhot       -- read N times in random order from 1% section "
-              "of DB\n"
-              "\treadwhilewriting      -- 1 writer, N threads doing random "
-              "reads\n"
-              "\treadrandomwriterandom -- N threads doing random-read, "
-              "random-write\n"
-              "\tprefixscanrandom      -- prefix scan N times in random order\n"
-              "\tupdaterandom  -- N threads doing read-modify-write for random "
-              "keys\n"
-              "\tappendrandom  -- N threads doing read-modify-write with "
-              "growing values\n"
-              "\tmergerandom   -- same as updaterandom/appendrandom using merge"
-              " operator. "
-              "Must be used with merge_operator\n"
-              "\treadrandommergerandom -- perform N random read-or-merge "
-              "operations. Must be used with merge_operator\n"
-              "\tnewiterator   -- repeated iterator creation\n"
-              "\tseekrandom    -- N random seeks\n"
-              "\tseekrandom    -- 1 writer, N threads doing random seeks\n"
-              "\tcrc32c        -- repeated crc32c of 4K of data\n"
-              "\txxhash        -- repeated xxHash of 4K of data\n"
-              "\tacquireload   -- load N*1000 times\n"
-              "Meta operations:\n"
-              "\tcompact     -- Compact the entire DB\n"
-              "\tstats       -- Print DB stats\n"
-              "\tlevelstats  -- Print the number of files and bytes per level\n"
-              "\tsstables    -- Print sstable info\n"
-              "\theapprofile -- Dump a heap profile (if supported by this"
-              " port)\n");
-
-DEFINE_int64(num, 1000000, "Number of key/values to place in database");
-
-DEFINE_int64(numdistinct, 1000,
-             "Number of distinct keys to use. Used in RandomWithVerify to "
-             "read/write on fewer keys so that gets are more likely to find the"
-             " key and puts are more likely to update the same key");
-
-DEFINE_int64(merge_keys, -1,
-             "Number of distinct keys to use for MergeRandom and "
-             "ReadRandomMergeRandom. "
-             "If negative, there will be FLAGS_num keys.");
-
-DEFINE_int64(reads, -1, "Number of read operations to do.  "
-             "If negative, do FLAGS_num reads.");
-
-DEFINE_int32(bloom_locality, 0, "Control bloom filter probes locality");
-
-DEFINE_int64(seed, 0, "Seed base for random number generators. "
-             "When 0 it is deterministic.");
-
-DEFINE_int32(threads, 1, "Number of concurrent threads to run.");
-
-DEFINE_int32(duration, 0, "Time in seconds for the random-ops tests to run."
-             " When 0 then num & reads determine the test duration");
-
-DEFINE_int32(value_size, 100, "Size of each value");
-
-
-// the maximum size of key in bytes
-static const int kMaxKeySize = 128;
-static bool ValidateKeySize(const char* flagname, int32_t value) {
-  if (value > kMaxKeySize) {
-    fprintf(stderr, "Invalid value for --%s: %d, must be < %d\n",
-            flagname, value, kMaxKeySize);
-    return false;
-  }
-  return true;
-}
-
-DEFINE_int32(key_size, 16, "size of each key");
-
-DEFINE_int32(num_multi_db, 0,
-             "Number of DBs used in the benchmark. 0 means single DB.");
-
-DEFINE_double(compression_ratio, 0.5, "Arrange to generate values that shrink"
-              " to this fraction of their original size after compression");
-
-DEFINE_bool(histogram, false, "Print histogram of operation timings");
-
-DEFINE_int64(write_buffer_size, rocksdb::Options().write_buffer_size,
-             "Number of bytes to buffer in memtable before compacting");
-
-DEFINE_int32(max_write_buffer_number,
-             rocksdb::Options().max_write_buffer_number,
-             "The number of in-memory memtables. Each memtable is of size"
-             "write_buffer_size.");
-
-DEFINE_int32(min_write_buffer_number_to_merge,
-             rocksdb::Options().min_write_buffer_number_to_merge,
-             "The minimum number of write buffers that will be merged together"
-             "before writing to storage. This is cheap because it is an"
-             "in-memory merge. If this feature is not enabled, then all these"
-             "write buffers are flushed to L0 as separate files and this "
-             "increases read amplification because a get request has to check"
-             " in all of these files. Also, an in-memory merge may result in"
-             " writing less data to storage if there are duplicate records "
-             " in each of these individual write buffers.");
-
-DEFINE_int32(max_background_compactions,
-             rocksdb::Options().max_background_compactions,
-             "The maximum number of concurrent background compactions"
-             " that can occur in parallel.");
-
-DEFINE_int32(max_background_flushes,
-             rocksdb::Options().max_background_flushes,
-             "The maximum number of concurrent background flushes"
-             " that can occur in parallel.");
-
-static rocksdb::CompactionStyle FLAGS_compaction_style_e;
-DEFINE_int32(compaction_style, (int32_t) rocksdb::Options().compaction_style,
-             "style of compaction: level-based vs universal");
-
-DEFINE_int32(universal_size_ratio, 0,
-             "Percentage flexibility while comparing file size"
-             " (for universal compaction only).");
-
-DEFINE_int32(universal_min_merge_width, 0, "The minimum number of files in a"
-             " single compaction run (for universal compaction only).");
-
-DEFINE_int32(universal_max_merge_width, 0, "The max number of files to compact"
-             " in universal style compaction");
-
-DEFINE_int32(universal_max_size_amplification_percent, 0,
-             "The max size amplification for universal style compaction");
-
-DEFINE_int32(universal_compression_size_percent, -1,
-             "The percentage of the database to compress for universal "
-             "compaction. -1 means compress everything.");
-
-DEFINE_int64(cache_size, -1, "Number of bytes to use as a cache of uncompressed"
-             "data. Negative means use default settings.");
-
-DEFINE_int32(block_size, rocksdb::Options().block_size,
-             "Number of bytes in a block.");
-
-DEFINE_int64(compressed_cache_size, -1,
-             "Number of bytes to use as a cache of compressed data.");
-
-DEFINE_int32(open_files, rocksdb::Options().max_open_files,
-             "Maximum number of files to keep open at the same time"
-             " (use default if == 0)");
-
-DEFINE_int32(bloom_bits, -1, "Bloom filter bits per key. Negative means"
-             " use default settings.");
-DEFINE_int32(memtable_bloom_bits, 0, "Bloom filter bits per key for memtable. "
-             "Negative means no bloom filter.");
-
-DEFINE_bool(use_existing_db, false, "If true, do not destroy the existing"
-            " database.  If you set this flag and also specify a benchmark that"
-            " wants a fresh database, that benchmark will fail.");
-
-DEFINE_string(db, "", "Use the db with the following name.");
-
-static bool ValidateCacheNumshardbits(const char* flagname, int32_t value) {
-  if (value >= 20) {
-    fprintf(stderr, "Invalid value for --%s: %d, must be < 20\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(cache_numshardbits, -1, "Number of shards for the block cache"
-             " is 2 ** cache_numshardbits. Negative means use default settings."
-             " This is applied only if FLAGS_cache_size is non-negative.");
-
-DEFINE_int32(cache_remove_scan_count_limit, 32, "");
-
-DEFINE_bool(verify_checksum, false, "Verify checksum for every block read"
-            " from storage");
-
-DEFINE_bool(statistics, false, "Database statistics");
-static class std::shared_ptr<rocksdb::Statistics> dbstats;
-
-DEFINE_int64(writes, -1, "Number of write operations to do. If negative, do"
-             " --num reads.");
-
-DEFINE_int32(writes_per_second, 0, "Per-thread rate limit on writes per second."
-             " No limit when <= 0. Only for the readwhilewriting test.");
-
-DEFINE_bool(sync, false, "Sync all writes to disk");
-
-DEFINE_bool(disable_data_sync, false, "If true, do not wait until data is"
-            " synced to disk.");
-
-DEFINE_bool(use_fsync, false, "If true, issue fsync instead of fdatasync");
-
-DEFINE_bool(disable_wal, false, "If true, do not write WAL for write.");
-
-DEFINE_string(wal_dir, "", "If not empty, use the given dir for WAL");
-
-DEFINE_int32(num_levels, 7, "The total number of levels");
-
-DEFINE_int32(target_file_size_base, 2 * 1048576, "Target file size at level-1");
-
-DEFINE_int32(target_file_size_multiplier, 1,
-             "A multiplier to compute target level-N file size (N >= 2)");
-
-DEFINE_uint64(max_bytes_for_level_base,  10 * 1048576, "Max bytes for level-1");
-
-DEFINE_int32(max_bytes_for_level_multiplier, 10,
-             "A multiplier to compute max bytes for level-N (N >= 2)");
-
-static std::vector<int> FLAGS_max_bytes_for_level_multiplier_additional_v;
-DEFINE_string(max_bytes_for_level_multiplier_additional, "",
-              "A vector that specifies additional fanout per level");
-
-DEFINE_int32(level0_stop_writes_trigger, 12, "Number of files in level-0"
-             " that will trigger put stop.");
-
-DEFINE_int32(level0_slowdown_writes_trigger, 8, "Number of files in level-0"
-             " that will slow down writes.");
-
-DEFINE_int32(level0_file_num_compaction_trigger, 4, "Number of files in level-0"
-             " when compactions start");
-
-static bool ValidateInt32Percent(const char* flagname, int32_t value) {
-  if (value <= 0 || value>=100) {
-    fprintf(stderr, "Invalid value for --%s: %d, 0< pct <100 \n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(readwritepercent, 90, "Ratio of reads to reads/writes (expressed"
-             " as percentage) for the ReadRandomWriteRandom workload. The "
-             "default value 90 means 90% operations out of all reads and writes"
-             " operations are reads. In other words, 9 gets for every 1 put.");
-
-DEFINE_int32(mergereadpercent, 70, "Ratio of merges to merges&reads (expressed"
-             " as percentage) for the ReadRandomMergeRandom workload. The"
-             " default value 70 means 70% out of all read and merge operations"
-             " are merges. In other words, 7 merges for every 3 gets.");
-
-DEFINE_int32(deletepercent, 2, "Percentage of deletes out of reads/writes/"
-             "deletes (used in RandomWithVerify only). RandomWithVerify "
-             "calculates writepercent as (100 - FLAGS_readwritepercent - "
-             "deletepercent), so deletepercent must be smaller than (100 - "
-             "FLAGS_readwritepercent)");
-
-DEFINE_int32(disable_seek_compaction, false, "Option to disable compaction"
-             " triggered by read.");
-
-DEFINE_uint64(delete_obsolete_files_period_micros, 0, "Option to delete "
-              "obsolete files periodically. 0 means that obsolete files are"
-              " deleted after every compaction run.");
-
-namespace {
-enum rocksdb::CompressionType StringToCompressionType(const char* ctype) {
-  assert(ctype);
-
-  if (!strcasecmp(ctype, "none"))
-    return rocksdb::kNoCompression;
-  else if (!strcasecmp(ctype, "snappy"))
-    return rocksdb::kSnappyCompression;
-  else if (!strcasecmp(ctype, "zlib"))
-    return rocksdb::kZlibCompression;
-  else if (!strcasecmp(ctype, "bzip2"))
-    return rocksdb::kBZip2Compression;
-  else if (!strcasecmp(ctype, "lz4"))
-    return rocksdb::kLZ4Compression;
-  else if (!strcasecmp(ctype, "lz4hc"))
-    return rocksdb::kLZ4HCCompression;
-
-  fprintf(stdout, "Cannot parse compression type '%s'\n", ctype);
-  return rocksdb::kSnappyCompression; //default value
-}
-}  // namespace
-
-DEFINE_string(compression_type, "snappy",
-              "Algorithm to use to compress the database");
-static enum rocksdb::CompressionType FLAGS_compression_type_e =
-    rocksdb::kSnappyCompression;
-
-DEFINE_int32(compression_level, -1,
-             "Compression level. For zlib this should be -1 for the "
-             "default level, or between 0 and 9.");
-
-static bool ValidateCompressionLevel(const char* flagname, int32_t value) {
-  if (value < -1 || value > 9) {
-    fprintf(stderr, "Invalid value for --%s: %d, must be between -1 and 9\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-
-static const bool FLAGS_compression_level_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_compression_level,
-                                  &ValidateCompressionLevel);
-
-DEFINE_int32(min_level_to_compress, -1, "If non-negative, compression starts"
-             " from this level. Levels with number < min_level_to_compress are"
-             " not compressed. Otherwise, apply compression_type to "
-             "all levels.");
-
-static bool ValidateTableCacheNumshardbits(const char* flagname,
-                                           int32_t value) {
-  if (0 >= value || value > 20) {
-    fprintf(stderr, "Invalid value for --%s: %d, must be  0 < val <= 20\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(table_cache_numshardbits, 4, "");
-
-DEFINE_string(hdfs, "", "Name of hdfs environment");
-// posix or hdfs environment
-static rocksdb::Env* FLAGS_env = rocksdb::Env::Default();
-
-DEFINE_int64(stats_interval, 0, "Stats are reported every N operations when "
-             "this is greater than zero. When 0 the interval grows over time.");
-
-DEFINE_int32(stats_per_interval, 0, "Reports additional stats per interval when"
-             " this is greater than 0.");
-
-DEFINE_int32(perf_level, 0, "Level of perf collection");
-
-static bool ValidateRateLimit(const char* flagname, double value) {
-  static constexpr double EPSILON = 1e-10;
-  if ( value < -EPSILON ) {
-    fprintf(stderr, "Invalid value for --%s: %12.6f, must be >= 0.0\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_double(soft_rate_limit, 0.0, "");
-
-DEFINE_double(hard_rate_limit, 0.0, "When not equal to 0 this make threads "
-              "sleep at each stats reporting interval until the compaction"
-              " score for all levels is less than or equal to this value.");
-
-DEFINE_int32(rate_limit_delay_max_milliseconds, 1000,
-             "When hard_rate_limit is set then this is the max time a put will"
-             " be stalled.");
-
-DEFINE_int32(max_grandparent_overlap_factor, 10, "Control maximum bytes of "
-             "overlaps in grandparent (i.e., level+2) before we stop building a"
-             " single file in a level->level+1 compaction.");
-
-DEFINE_bool(readonly, false, "Run read only benchmarks.");
-
-DEFINE_bool(disable_auto_compactions, false, "Do not auto trigger compactions");
-
-DEFINE_int32(source_compaction_factor, 1, "Cap the size of data in level-K for"
-             " a compaction run that compacts Level-K with Level-(K+1) (for"
-             " K >= 1)");
-
-DEFINE_uint64(wal_ttl_seconds, 0, "Set the TTL for the WAL Files in seconds.");
-DEFINE_uint64(wal_size_limit_MB, 0, "Set the size limit for the WAL Files"
-              " in MB.");
-
-DEFINE_bool(bufferedio, rocksdb::EnvOptions().use_os_buffer,
-            "Allow buffered io using OS buffers");
-
-DEFINE_bool(mmap_read, rocksdb::EnvOptions().use_mmap_reads,
-            "Allow reads to occur via mmap-ing files");
-
-DEFINE_bool(mmap_write, rocksdb::EnvOptions().use_mmap_writes,
-            "Allow writes to occur via mmap-ing files");
-
-DEFINE_bool(advise_random_on_open, rocksdb::Options().advise_random_on_open,
-            "Advise random access on table file open");
-
-DEFINE_string(compaction_fadvice, "NORMAL",
-              "Access pattern advice when a file is compacted");
-static auto FLAGS_compaction_fadvice_e =
-  rocksdb::Options().access_hint_on_compaction_start;
-
-DEFINE_bool(use_tailing_iterator, false,
-            "Use tailing iterator to access a series of keys instead of get");
-
-DEFINE_bool(use_adaptive_mutex, rocksdb::Options().use_adaptive_mutex,
-            "Use adaptive mutex");
-
-DEFINE_uint64(bytes_per_sync,  rocksdb::Options().bytes_per_sync,
-              "Allows OS to incrementally sync files to disk while they are"
-              " being written, in the background. Issue one request for every"
-              " bytes_per_sync written. 0 turns it off.");
-DEFINE_bool(filter_deletes, false, " On true, deletes use bloom-filter and drop"
-            " the delete if key not present");
-
-DEFINE_int32(max_successive_merges, 0, "Maximum number of successive merge"
-             " operations on a key in the memtable");
-
-static bool ValidatePrefixSize(const char* flagname, int32_t value) {
-  if (value < 0 || value>=2000000000) {
-    fprintf(stderr, "Invalid value for --%s: %d. 0<= PrefixSize <=2000000000\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(prefix_size, 0, "control the prefix size for HashSkipList and "
-             "plain table");
-DEFINE_int64(keys_per_prefix, 0, "control average number of keys generated "
-             "per prefix, 0 means no special handling of the prefix, "
-             "i.e. use the prefix comes with the generated random number.");
-
-enum RepFactory {
-  kSkipList,
-  kPrefixHash,
-  kVectorRep,
-  kHashLinkedList,
-  kCuckoo
-};
-
-namespace {
-enum RepFactory StringToRepFactory(const char* ctype) {
-  assert(ctype);
-
-  if (!strcasecmp(ctype, "skip_list"))
-    return kSkipList;
-  else if (!strcasecmp(ctype, "prefix_hash"))
-    return kPrefixHash;
-  else if (!strcasecmp(ctype, "vector"))
-    return kVectorRep;
-  else if (!strcasecmp(ctype, "hash_linkedlist"))
-    return kHashLinkedList;
-  else if (!strcasecmp(ctype, "cuckoo"))
-    return kCuckoo;
-
-  fprintf(stdout, "Cannot parse memreptable %s\n", ctype);
-  return kSkipList;
-}
-}  // namespace
-
-static enum RepFactory FLAGS_rep_factory;
-DEFINE_string(memtablerep, "skip_list", "");
-DEFINE_int64(hash_bucket_count, 1024 * 1024, "hash bucket count");
-DEFINE_bool(use_plain_table, false, "if use plain table "
-            "instead of block-based table format");
-
-DEFINE_string(merge_operator, "", "The merge operator to use with the database."
-              "If a new merge operator is specified, be sure to use fresh"
-              " database The possible merge operators are defined in"
-              " utilities/merge_operators.h");
-
-static const bool FLAGS_soft_rate_limit_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_soft_rate_limit,
-                                &ValidateRateLimit);
-
-static const bool FLAGS_hard_rate_limit_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_hard_rate_limit, &ValidateRateLimit);
-
-static const bool FLAGS_prefix_size_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_prefix_size, &ValidatePrefixSize);
-
-static const bool FLAGS_key_size_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_key_size, &ValidateKeySize);
-
-static const bool FLAGS_cache_numshardbits_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_cache_numshardbits,
-                                &ValidateCacheNumshardbits);
-
-static const bool FLAGS_readwritepercent_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_readwritepercent,
-                                &ValidateInt32Percent);
-
-static const bool FLAGS_deletepercent_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_deletepercent,
-                                &ValidateInt32Percent);
-static const bool
-  FLAGS_table_cache_numshardbits_dummy __attribute__((unused)) =
-  google::RegisterFlagValidator(&FLAGS_table_cache_numshardbits,
-                                &ValidateTableCacheNumshardbits);
-
-namespace rocksdb {
-
-// Helper for quickly generating random data.
-class RandomGenerator {
- private:
-  std::string data_;
-  unsigned int pos_;
-
- public:
-  RandomGenerator() {
-    // We use a limited amount of data over and over again and ensure
-    // that it is larger than the compression window (32KB), and also
-    // large enough to serve all typical value sizes we want to write.
-    Random rnd(301);
-    std::string piece;
-    while (data_.size() < (unsigned)std::max(1048576, FLAGS_value_size)) {
-      // Add a short fragment that is as compressible as specified
-      // by FLAGS_compression_ratio.
-      test::CompressibleString(&rnd, FLAGS_compression_ratio, 100, &piece);
-      data_.append(piece);
-    }
-    pos_ = 0;
-  }
-
-  Slice Generate(unsigned int len) {
-    if (pos_ + len > data_.size()) {
-      pos_ = 0;
-      assert(len < data_.size());
-    }
-    pos_ += len;
-    return Slice(data_.data() + pos_ - len, len);
-  }
-};
-
-static void AppendWithSpace(std::string* str, Slice msg) {
-  if (msg.empty()) return;
-  if (!str->empty()) {
-    str->push_back(' ');
-  }
-  str->append(msg.data(), msg.size());
-}
-
-class Stats {
- private:
-  int id_;
-  double start_;
-  double finish_;
-  double seconds_;
-  int64_t done_;
-  int64_t last_report_done_;
-  int64_t next_report_;
-  int64_t bytes_;
-  double last_op_finish_;
-  double last_report_finish_;
-  HistogramImpl hist_;
-  std::string message_;
-  bool exclude_from_merge_;
-
- public:
-  Stats() { Start(-1); }
-
-  void Start(int id) {
-    id_ = id;
-    next_report_ = FLAGS_stats_interval ? FLAGS_stats_interval : 100;
-    last_op_finish_ = start_;
-    hist_.Clear();
-    done_ = 0;
-    last_report_done_ = 0;
-    bytes_ = 0;
-    seconds_ = 0;
-    start_ = FLAGS_env->NowMicros();
-    finish_ = start_;
-    last_report_finish_ = start_;
-    message_.clear();
-    // When set, stats from this thread won't be merged with others.
-    exclude_from_merge_ = false;
-  }
-
-  void Merge(const Stats& other) {
-    if (other.exclude_from_merge_)
-      return;
-
-    hist_.Merge(other.hist_);
-    done_ += other.done_;
-    bytes_ += other.bytes_;
-    seconds_ += other.seconds_;
-    if (other.start_ < start_) start_ = other.start_;
-    if (other.finish_ > finish_) finish_ = other.finish_;
-
-    // Just keep the messages from one thread
-    if (message_.empty()) message_ = other.message_;
-  }
-
-  void Stop() {
-    finish_ = FLAGS_env->NowMicros();
-    seconds_ = (finish_ - start_) * 1e-6;
-  }
-
-  void AddMessage(Slice msg) {
-    AppendWithSpace(&message_, msg);
-  }
-
-  void SetId(int id) { id_ = id; }
-  void SetExcludeFromMerge() { exclude_from_merge_ = true; }
-
-  void FinishedSingleOp(DB* db) {
-    if (FLAGS_histogram) {
-      double now = FLAGS_env->NowMicros();
-      double micros = now - last_op_finish_;
-      hist_.Add(micros);
-      if (micros > 20000 && !FLAGS_stats_interval) {
-        fprintf(stderr, "long op: %.1f micros%30s\r", micros, "");
-        fflush(stderr);
-      }
-      last_op_finish_ = now;
-    }
-
-    done_++;
-    if (done_ >= next_report_) {
-      if (!FLAGS_stats_interval) {
-        if      (next_report_ < 1000)   next_report_ += 100;
-        else if (next_report_ < 5000)   next_report_ += 500;
-        else if (next_report_ < 10000)  next_report_ += 1000;
-        else if (next_report_ < 50000)  next_report_ += 5000;
-        else if (next_report_ < 100000) next_report_ += 10000;
-        else if (next_report_ < 500000) next_report_ += 50000;
-        else                            next_report_ += 100000;
-        fprintf(stderr, "... finished %" PRIu64 " ops%30s\r", done_, "");
-        fflush(stderr);
-      } else {
-        double now = FLAGS_env->NowMicros();
-        fprintf(stderr,
-                "%s ... thread %d: (%" PRIu64 ",%" PRIu64 ") ops and "
-                "(%.1f,%.1f) ops/second in (%.6f,%.6f) seconds\n",
-                FLAGS_env->TimeToString((uint64_t) now/1000000).c_str(),
-                id_,
-                done_ - last_report_done_, done_,
-                (done_ - last_report_done_) /
-                ((now - last_report_finish_) / 1000000.0),
-                done_ / ((now - start_) / 1000000.0),
-                (now - last_report_finish_) / 1000000.0,
-                (now - start_) / 1000000.0);
-
-        if (FLAGS_stats_per_interval) {
-          std::string stats;
-          if (db && db->GetProperty("rocksdb.stats", &stats))
-            fprintf(stderr, "%s\n", stats.c_str());
-        }
-
-        fflush(stderr);
-        next_report_ += FLAGS_stats_interval;
-        last_report_finish_ = now;
-        last_report_done_ = done_;
-      }
-    }
-  }
-
-  void AddBytes(int64_t n) {
-    bytes_ += n;
-  }
-
-  void Report(const Slice& name) {
-    // Pretend at least one op was done in case we are running a benchmark
-    // that does not call FinishedSingleOp().
-    if (done_ < 1) done_ = 1;
-
-    std::string extra;
-    if (bytes_ > 0) {
-      // Rate is computed on actual elapsed time, not the sum of per-thread
-      // elapsed times.
-      double elapsed = (finish_ - start_) * 1e-6;
-      char rate[100];
-      snprintf(rate, sizeof(rate), "%6.1f MB/s",
-               (bytes_ / 1048576.0) / elapsed);
-      extra = rate;
-    }
-    AppendWithSpace(&extra, message_);
-    double elapsed = (finish_ - start_) * 1e-6;
-    double throughput = (double)done_/elapsed;
-
-    fprintf(stdout, "%-12s : %11.3f micros/op %ld ops/sec;%s%s\n",
-            name.ToString().c_str(),
-            elapsed * 1e6 / done_,
-            (long)throughput,
-            (extra.empty() ? "" : " "),
-            extra.c_str());
-    if (FLAGS_histogram) {
-      fprintf(stdout, "Microseconds per op:\n%s\n", hist_.ToString().c_str());
-    }
-    fflush(stdout);
-  }
-};
-
-// State shared by all concurrent executions of the same benchmark.
-struct SharedState {
-  port::Mutex mu;
-  port::CondVar cv;
-  int total;
-  int perf_level;
-
-  // Each thread goes through the following states:
-  //    (1) initializing
-  //    (2) waiting for others to be initialized
-  //    (3) running
-  //    (4) done
-
-  long num_initialized;
-  long num_done;
-  bool start;
-
-  SharedState() : cv(&mu), perf_level(FLAGS_perf_level) { }
-};
-
-// Per-thread state for concurrent executions of the same benchmark.
-struct ThreadState {
-  int tid;             // 0..n-1 when running in n threads
-  Random64 rand;         // Has different seeds for different threads
-  Stats stats;
-  SharedState* shared;
-
-  /* implicit */ ThreadState(int index)
-      : tid(index),
-        rand((FLAGS_seed ? FLAGS_seed : 1000) + index) {
-  }
-};
-
-class Duration {
- public:
-  Duration(int max_seconds, int64_t max_ops) {
-    max_seconds_ = max_seconds;
-    max_ops_= max_ops;
-    ops_ = 0;
-    start_at_ = FLAGS_env->NowMicros();
-  }
-
-  bool Done(int64_t increment) {
-    if (increment <= 0) increment = 1;    // avoid Done(0) and infinite loops
-    ops_ += increment;
-
-    if (max_seconds_) {
-      // Recheck every appx 1000 ops (exact iff increment is factor of 1000)
-      if ((ops_/1000) != ((ops_-increment)/1000)) {
-        double now = FLAGS_env->NowMicros();
-        return ((now - start_at_) / 1000000.0) >= max_seconds_;
-      } else {
-        return false;
-      }
-    } else {
-      return ops_ > max_ops_;
-    }
-  }
-
- private:
-  int max_seconds_;
-  int64_t max_ops_;
-  int64_t ops_;
-  double start_at_;
-};
-
-class Benchmark {
- private:
-  shared_ptr<Cache> cache_;
-  shared_ptr<Cache> compressed_cache_;
-  const FilterPolicy* filter_policy_;
-  const SliceTransform* prefix_extractor_;
-  DB* db_;
-  std::vector<DB*> multi_dbs_;
-  int64_t num_;
-  int value_size_;
-  int key_size_;
-  int prefix_size_;
-  int64_t keys_per_prefix_;
-  int64_t entries_per_batch_;
-  WriteOptions write_options_;
-  int64_t reads_;
-  int64_t writes_;
-  int64_t readwrites_;
-  int64_t merge_keys_;
-  void PrintHeader() {
-    PrintEnvironment();
-    fprintf(stdout, "Keys:       %d bytes each\n", FLAGS_key_size);
-    fprintf(stdout, "Values:     %d bytes each (%d bytes after compression)\n",
-            FLAGS_value_size,
-            static_cast<int>(FLAGS_value_size * FLAGS_compression_ratio + 0.5));
-    fprintf(stdout, "Entries:    %" PRIu64 "\n", num_);
-    fprintf(stdout, "Prefix:    %d bytes\n", FLAGS_prefix_size);
-    fprintf(stdout, "Keys per prefix:    %" PRIu64 "\n", keys_per_prefix_);
-    fprintf(stdout, "RawSize:    %.1f MB (estimated)\n",
-            ((static_cast<int64_t>(FLAGS_key_size + FLAGS_value_size) * num_)
-             / 1048576.0));
-    fprintf(stdout, "FileSize:   %.1f MB (estimated)\n",
-            (((FLAGS_key_size + FLAGS_value_size * FLAGS_compression_ratio)
-              * num_)
-             / 1048576.0));
-    fprintf(stdout, "Write rate limit: %d\n", FLAGS_writes_per_second);
-    switch (FLAGS_compression_type_e) {
-      case rocksdb::kNoCompression:
-        fprintf(stdout, "Compression: none\n");
-        break;
-      case rocksdb::kSnappyCompression:
-        fprintf(stdout, "Compression: snappy\n");
-        break;
-      case rocksdb::kZlibCompression:
-        fprintf(stdout, "Compression: zlib\n");
-        break;
-      case rocksdb::kBZip2Compression:
-        fprintf(stdout, "Compression: bzip2\n");
-        break;
-      case rocksdb::kLZ4Compression:
-        fprintf(stdout, "Compression: lz4\n");
-        break;
-      case rocksdb::kLZ4HCCompression:
-        fprintf(stdout, "Compression: lz4hc\n");
-        break;
-    }
-
-    switch (FLAGS_rep_factory) {
-      case kPrefixHash:
-        fprintf(stdout, "Memtablerep: prefix_hash\n");
-        break;
-      case kSkipList:
-        fprintf(stdout, "Memtablerep: skip_list\n");
-        break;
-      case kVectorRep:
-        fprintf(stdout, "Memtablerep: vector\n");
-        break;
-      case kHashLinkedList:
-        fprintf(stdout, "Memtablerep: hash_linkedlist\n");
-        break;
-      case kCuckoo:
-        fprintf(stdout, "Memtablerep: cuckoo\n");
-        break;
-    }
-    fprintf(stdout, "Perf Level: %d\n", FLAGS_perf_level);
-
-    PrintWarnings();
-    fprintf(stdout, "------------------------------------------------\n");
-  }
-
-  void PrintWarnings() {
-#if defined(__GNUC__) && !defined(__OPTIMIZE__)
-    fprintf(stdout,
-            "WARNING: Optimization is disabled: benchmarks unnecessarily slow\n"
-            );
-#endif
-#ifndef NDEBUG
-    fprintf(stdout,
-            "WARNING: Assertions are enabled; benchmarks unnecessarily slow\n");
-#endif
-    if (FLAGS_compression_type_e != rocksdb::kNoCompression) {
-      // The test string should not be too small.
-      const int len = FLAGS_block_size;
-      char* text = (char*) malloc(len+1);
-      bool result = true;
-      const char* name = nullptr;
-      std::string compressed;
-
-      memset(text, (int) 'y', len);
-      text[len] = '\0';
-      switch (FLAGS_compression_type_e) {
-        case kSnappyCompression:
-          result = port::Snappy_Compress(Options().compression_opts, text,
-                                         strlen(text), &compressed);
-          name = "Snappy";
-          break;
-        case kZlibCompression:
-          result = port::Zlib_Compress(Options().compression_opts, text,
-                                       strlen(text), &compressed);
-          name = "Zlib";
-          break;
-        case kBZip2Compression:
-          result = port::BZip2_Compress(Options().compression_opts, text,
-                                        strlen(text), &compressed);
-          name = "BZip2";
-          break;
-        case kLZ4Compression:
-          result = port::LZ4_Compress(Options().compression_opts, text,
-                                      strlen(text), &compressed);
-          name = "LZ4";
-          break;
-        case kLZ4HCCompression:
-          result = port::LZ4HC_Compress(Options().compression_opts, text,
-                                        strlen(text), &compressed);
-          name = "LZ4HC";
-          break;
-        case kNoCompression:
-          assert(false); // cannot happen
-          break;
-      }
-
-      if (!result) {
-        fprintf(stdout, "WARNING: %s compression is not enabled\n", name);
-      } else if (name && compressed.size() >= strlen(text)) {
-        fprintf(stdout, "WARNING: %s compression is not effective\n", name);
-      }
-
-      free(text);
-    }
-  }
-
-// Current the following isn't equivalent to OS_LINUX.
-#if defined(__linux)
-  static Slice TrimSpace(Slice s) {
-    unsigned int start = 0;
-    while (start < s.size() && isspace(s[start])) {
-      start++;
-    }
-    unsigned int limit = s.size();
-    while (limit > start && isspace(s[limit-1])) {
-      limit--;
-    }
-    return Slice(s.data() + start, limit - start);
-  }
-#endif
-
-  void PrintEnvironment() {
-    fprintf(stderr, "LevelDB:    version %d.%d\n",
-            kMajorVersion, kMinorVersion);
-
-#if defined(__linux)
-    time_t now = time(nullptr);
-    fprintf(stderr, "Date:       %s", ctime(&now));  // ctime() adds newline
-
-    FILE* cpuinfo = fopen("/proc/cpuinfo", "r");
-    if (cpuinfo != nullptr) {
-      char line[1000];
-      int num_cpus = 0;
-      std::string cpu_type;
-      std::string cache_size;
-      while (fgets(line, sizeof(line), cpuinfo) != nullptr) {
-        const char* sep = strchr(line, ':');
-        if (sep == nullptr) {
-          continue;
-        }
-        Slice key = TrimSpace(Slice(line, sep - 1 - line));
-        Slice val = TrimSpace(Slice(sep + 1));
-        if (key == "model name") {
-          ++num_cpus;
-          cpu_type = val.ToString();
-        } else if (key == "cache size") {
-          cache_size = val.ToString();
-        }
-      }
-      fclose(cpuinfo);
-      fprintf(stderr, "CPU:        %d * %s\n", num_cpus, cpu_type.c_str());
-      fprintf(stderr, "CPUCache:   %s\n", cache_size.c_str());
-    }
-#endif
-  }
-
- public:
-  Benchmark()
-  : cache_(FLAGS_cache_size >= 0 ?
-           (FLAGS_cache_numshardbits >= 1 ?
-            NewLRUCache(FLAGS_cache_size, FLAGS_cache_numshardbits,
-                        FLAGS_cache_remove_scan_count_limit) :
-            NewLRUCache(FLAGS_cache_size)) : nullptr),
-    compressed_cache_(FLAGS_compressed_cache_size >= 0 ?
-           (FLAGS_cache_numshardbits >= 1 ?
-            NewLRUCache(FLAGS_compressed_cache_size, FLAGS_cache_numshardbits) :
-            NewLRUCache(FLAGS_compressed_cache_size)) : nullptr),
-    filter_policy_(FLAGS_bloom_bits >= 0
-                   ? NewBloomFilterPolicy(FLAGS_bloom_bits)
-                   : nullptr),
-    prefix_extractor_(NewFixedPrefixTransform(FLAGS_prefix_size)),
-    db_(nullptr),
-    num_(FLAGS_num),
-    value_size_(FLAGS_value_size),
-    key_size_(FLAGS_key_size),
-    prefix_size_(FLAGS_prefix_size),
-    keys_per_prefix_(FLAGS_keys_per_prefix),
-    entries_per_batch_(1),
-    reads_(FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads),
-    writes_(FLAGS_writes < 0 ? FLAGS_num : FLAGS_writes),
-    readwrites_((FLAGS_writes < 0  && FLAGS_reads < 0)? FLAGS_num :
-                ((FLAGS_writes > FLAGS_reads) ? FLAGS_writes : FLAGS_reads)
-               ),
-    merge_keys_(FLAGS_merge_keys < 0 ? FLAGS_num : FLAGS_merge_keys) {
-    if (FLAGS_prefix_size > FLAGS_key_size) {
-      fprintf(stderr, "prefix size is larger than key size");
-      exit(1);
-    }
-
-    std::vector<std::string> files;
-    FLAGS_env->GetChildren(FLAGS_db, &files);
-    for (unsigned int i = 0; i < files.size(); i++) {
-      if (Slice(files[i]).starts_with("heap-")) {
-        FLAGS_env->DeleteFile(FLAGS_db + "/" + files[i]);
-      }
-    }
-    if (!FLAGS_use_existing_db) {
-      DestroyDB(FLAGS_db, Options());
-    }
-  }
-
-  ~Benchmark() {
-    delete db_;
-    delete filter_policy_;
-    delete prefix_extractor_;
-  }
-
-  Slice AllocateKey() {
-    return Slice(new char[key_size_], key_size_);
-  }
-
-  // Generate key according to the given specification and random number.
-  // The resulting key will have the following format (if keys_per_prefix_
-  // is positive), extra trailing bytes are either cut off or paddd with '0'.
-  // The prefix value is derived from key value.
-  //   ----------------------------
-  //   | prefix 00000 | key 00000 |
-  //   ----------------------------
-  // If keys_per_prefix_ is 0, the key is simply a binary representation of
-  // random number followed by trailing '0's
-  //   ----------------------------
-  //   |        key 00000         |
-  //   ----------------------------
-  void GenerateKeyFromInt(uint64_t v, int64_t num_keys, Slice* key) {
-    char* start = const_cast<char*>(key->data());
-    char* pos = start;
-    if (keys_per_prefix_ > 0) {
-      int64_t num_prefix = num_keys / keys_per_prefix_;
-      int64_t prefix = v % num_prefix;
-      int bytes_to_fill = std::min(prefix_size_, 8);
-      if (port::kLittleEndian) {
-        for (int i = 0; i < bytes_to_fill; ++i) {
-          pos[i] = (prefix >> ((bytes_to_fill - i - 1) << 3)) & 0xFF;
-        }
-      } else {
-        memcpy(pos, static_cast<void*>(&prefix), bytes_to_fill);
-      }
-      if (prefix_size_ > 8) {
-        // fill the rest with 0s
-        memset(pos + 8, '0', prefix_size_ - 8);
-      }
-      pos += prefix_size_;
-    }
-
-    int bytes_to_fill = std::min(key_size_ - static_cast<int>(pos - start), 8);
-    if (port::kLittleEndian) {
-      for (int i = 0; i < bytes_to_fill; ++i) {
-        pos[i] = (v >> ((bytes_to_fill - i - 1) << 3)) & 0xFF;
-      }
-    } else {
-      memcpy(pos, static_cast<void*>(&v), bytes_to_fill);
-    }
-    pos += bytes_to_fill;
-    if (key_size_ > pos - start) {
-      memset(pos, '0', key_size_ - (pos - start));
-    }
-  }
-
-  std::string GetDbNameForMultiple(std::string base_name, size_t id) {
-    return base_name + std::to_string(id);
-  }
-
-  void Run() {
-    PrintHeader();
-    Open();
-    const char* benchmarks = FLAGS_benchmarks.c_str();
-    while (benchmarks != nullptr) {
-      const char* sep = strchr(benchmarks, ',');
-      Slice name;
-      if (sep == nullptr) {
-        name = benchmarks;
-        benchmarks = nullptr;
-      } else {
-        name = Slice(benchmarks, sep - benchmarks);
-        benchmarks = sep + 1;
-      }
-
-      // Sanitize parameters
-      num_ = FLAGS_num;
-      reads_ = (FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads);
-      writes_ = (FLAGS_writes < 0 ? FLAGS_num : FLAGS_writes);
-      value_size_ = FLAGS_value_size;
-      key_size_ = FLAGS_key_size;
-      entries_per_batch_ = 1;
-      write_options_ = WriteOptions();
-      if (FLAGS_sync) {
-        write_options_.sync = true;
-      }
-      write_options_.disableWAL = FLAGS_disable_wal;
-
-      void (Benchmark::*method)(ThreadState*) = nullptr;
-      bool fresh_db = false;
-      int num_threads = FLAGS_threads;
-
-      if (name == Slice("fillseq")) {
-        fresh_db = true;
-        method = &Benchmark::WriteSeq;
-      } else if (name == Slice("fillbatch")) {
-        fresh_db = true;
-        entries_per_batch_ = 1000;
-        method = &Benchmark::WriteSeq;
-      } else if (name == Slice("fillrandom")) {
-        fresh_db = true;
-        method = &Benchmark::WriteRandom;
-      } else if (name == Slice("filluniquerandom")) {
-        fresh_db = true;
-        if (num_threads > 1) {
-          fprintf(stderr, "filluniquerandom multithreaded not supported"
-                           ", use 1 thread");
-          num_threads = 1;
-        }
-        method = &Benchmark::WriteUniqueRandom;
-      } else if (name == Slice("overwrite")) {
-        fresh_db = false;
-        method = &Benchmark::WriteRandom;
-      } else if (name == Slice("fillsync")) {
-        fresh_db = true;
-        num_ /= 1000;
-        write_options_.sync = true;
-        method = &Benchmark::WriteRandom;
-      } else if (name == Slice("fill100K")) {
-        fresh_db = true;
-        num_ /= 1000;
-        value_size_ = 100 * 1000;
-        method = &Benchmark::WriteRandom;
-      } else if (name == Slice("readseq")) {
-        method = &Benchmark::ReadSequential;
-      } else if (name == Slice("readtocache")) {
-        method = &Benchmark::ReadSequential;
-        num_threads = 1;
-        reads_ = num_;
-      } else if (name == Slice("readreverse")) {
-        method = &Benchmark::ReadReverse;
-      } else if (name == Slice("readrandom")) {
-        method = &Benchmark::ReadRandom;
-      } else if (name == Slice("multireadrandom")) {
-        method = &Benchmark::MultiReadRandom;
-      } else if (name == Slice("readmissing")) {
-        ++key_size_;
-        method = &Benchmark::ReadRandom;
-      } else if (name == Slice("newiterator")) {
-        method = &Benchmark::IteratorCreation;
-      } else if (name == Slice("newiteratorwhilewriting")) {
-        num_threads++;  // Add extra thread for writing
-        method = &Benchmark::IteratorCreationWhileWriting;
-      } else if (name == Slice("seekrandom")) {
-        method = &Benchmark::SeekRandom;
-      } else if (name == Slice("seekrandomwhilewriting")) {
-        num_threads++;  // Add extra thread for writing
-        method = &Benchmark::SeekRandomWhileWriting;
-      } else if (name == Slice("readrandomsmall")) {
-        reads_ /= 1000;
-        method = &Benchmark::ReadRandom;
-      } else if (name == Slice("deleteseq")) {
-        method = &Benchmark::DeleteSeq;
-      } else if (name == Slice("deleterandom")) {
-        method = &Benchmark::DeleteRandom;
-      } else if (name == Slice("readwhilewriting")) {
-        num_threads++;  // Add extra thread for writing
-        method = &Benchmark::ReadWhileWriting;
-      } else if (name == Slice("readrandomwriterandom")) {
-        method = &Benchmark::ReadRandomWriteRandom;
-      } else if (name == Slice("readrandommergerandom")) {
-        if (FLAGS_merge_operator.empty()) {
-          fprintf(stdout, "%-12s : skipped (--merge_operator is unknown)\n",
-                  name.ToString().c_str());
-          exit(1);
-        }
-        method = &Benchmark::ReadRandomMergeRandom;
-      } else if (name == Slice("updaterandom")) {
-        method = &Benchmark::UpdateRandom;
-      } else if (name == Slice("appendrandom")) {
-        method = &Benchmark::AppendRandom;
-      } else if (name == Slice("mergerandom")) {
-        if (FLAGS_merge_operator.empty()) {
-          fprintf(stdout, "%-12s : skipped (--merge_operator is unknown)\n",
-                  name.ToString().c_str());
-          exit(1);
-        }
-        method = &Benchmark::MergeRandom;
-      } else if (name == Slice("randomwithverify")) {
-        method = &Benchmark::RandomWithVerify;
-      } else if (name == Slice("compact")) {
-        method = &Benchmark::Compact;
-      } else if (name == Slice("crc32c")) {
-        method = &Benchmark::Crc32c;
-      } else if (name == Slice("xxhash")) {
-        method = &Benchmark::xxHash;
-      } else if (name == Slice("acquireload")) {
-        method = &Benchmark::AcquireLoad;
-      } else if (name == Slice("compress")) {
-        method = &Benchmark::Compress;
-      } else if (name == Slice("uncompress")) {
-        method = &Benchmark::Uncompress;
-      } else if (name == Slice("stats")) {
-        PrintStats("rocksdb.stats");
-      } else if (name == Slice("levelstats")) {
-        PrintStats("rocksdb.levelstats");
-      } else if (name == Slice("sstables")) {
-        PrintStats("rocksdb.sstables");
-      } else {
-        if (name != Slice()) {  // No error message for empty name
-          fprintf(stderr, "unknown benchmark '%s'\n", name.ToString().c_str());
-          exit(1);
-        }
-      }
-
-      if (fresh_db) {
-        if (FLAGS_use_existing_db) {
-          fprintf(stdout, "%-12s : skipped (--use_existing_db is true)\n",
-                  name.ToString().c_str());
-          method = nullptr;
-        } else {
-          if (db_ != nullptr) {
-            delete db_;
-            db_ = nullptr;
-            DestroyDB(FLAGS_db, Options());
-          }
-          for (size_t i = 0; i < multi_dbs_.size(); i++) {
-            delete multi_dbs_[i];
-            DestroyDB(GetDbNameForMultiple(FLAGS_db, i), Options());
-          }
-          multi_dbs_.clear();
-        }
-        Open();
-      }
-
-      if (method != nullptr) {
-        fprintf(stdout, "DB path: [%s]\n", FLAGS_db.c_str());
-        RunBenchmark(num_threads, name, method);
-      }
-    }
-    if (FLAGS_statistics) {
-     fprintf(stdout, "STATISTICS:\n%s\n", dbstats->ToString().c_str());
-    }
-  }
-
- private:
-  struct ThreadArg {
-    Benchmark* bm;
-    SharedState* shared;
-    ThreadState* thread;
-    void (Benchmark::*method)(ThreadState*);
-  };
-
-  static void ThreadBody(void* v) {
-    ThreadArg* arg = reinterpret_cast<ThreadArg*>(v);
-    SharedState* shared = arg->shared;
-    ThreadState* thread = arg->thread;
-    {
-      MutexLock l(&shared->mu);
-      shared->num_initialized++;
-      if (shared->num_initialized >= shared->total) {
-        shared->cv.SignalAll();
-      }
-      while (!shared->start) {
-        shared->cv.Wait();
-      }
-    }
-
-    SetPerfLevel(static_cast<PerfLevel> (shared->perf_level));
-    thread->stats.Start(thread->tid);
-    (arg->bm->*(arg->method))(thread);
-    thread->stats.Stop();
-
-    {
-      MutexLock l(&shared->mu);
-      shared->num_done++;
-      if (shared->num_done >= shared->total) {
-        shared->cv.SignalAll();
-      }
-    }
-  }
-
-  void RunBenchmark(int n, Slice name,
-                    void (Benchmark::*method)(ThreadState*)) {
-    SharedState shared;
-    shared.total = n;
-    shared.num_initialized = 0;
-    shared.num_done = 0;
-    shared.start = false;
-
-    ThreadArg* arg = new ThreadArg[n];
-    for (int i = 0; i < n; i++) {
-      arg[i].bm = this;
-      arg[i].method = method;
-      arg[i].shared = &shared;
-      arg[i].thread = new ThreadState(i);
-      arg[i].thread->shared = &shared;
-      FLAGS_env->StartThread(ThreadBody, &arg[i]);
-    }
-
-    shared.mu.Lock();
-    while (shared.num_initialized < n) {
-      shared.cv.Wait();
-    }
-
-    shared.start = true;
-    shared.cv.SignalAll();
-    while (shared.num_done < n) {
-      shared.cv.Wait();
-    }
-    shared.mu.Unlock();
-
-    // Stats for some threads can be excluded.
-    Stats merge_stats;
-    for (int i = 0; i < n; i++) {
-      merge_stats.Merge(arg[i].thread->stats);
-    }
-    merge_stats.Report(name);
-
-    for (int i = 0; i < n; i++) {
-      delete arg[i].thread;
-    }
-    delete[] arg;
-  }
-
-  void Crc32c(ThreadState* thread) {
-    // Checksum about 500MB of data total
-    const int size = 4096;
-    const char* label = "(4K per op)";
-    std::string data(size, 'x');
-    int64_t bytes = 0;
-    uint32_t crc = 0;
-    while (bytes < 500 * 1048576) {
-      crc = crc32c::Value(data.data(), size);
-      thread->stats.FinishedSingleOp(nullptr);
-      bytes += size;
-    }
-    // Print so result is not dead
-    fprintf(stderr, "... crc=0x%x\r", static_cast<unsigned int>(crc));
-
-    thread->stats.AddBytes(bytes);
-    thread->stats.AddMessage(label);
-  }
-
-  void xxHash(ThreadState* thread) {
-    // Checksum about 500MB of data total
-    const int size = 4096;
-    const char* label = "(4K per op)";
-    std::string data(size, 'x');
-    int64_t bytes = 0;
-    unsigned int xxh32 = 0;
-    while (bytes < 500 * 1048576) {
-      xxh32 = XXH32(data.data(), size, 0);
-      thread->stats.FinishedSingleOp(nullptr);
-      bytes += size;
-    }
-    // Print so result is not dead
-    fprintf(stderr, "... xxh32=0x%x\r", static_cast<unsigned int>(xxh32));
-
-    thread->stats.AddBytes(bytes);
-    thread->stats.AddMessage(label);
-  }
-
-  void AcquireLoad(ThreadState* thread) {
-    int dummy;
-    port::AtomicPointer ap(&dummy);
-    int count = 0;
-    void *ptr = nullptr;
-    thread->stats.AddMessage("(each op is 1000 loads)");
-    while (count < 100000) {
-      for (int i = 0; i < 1000; i++) {
-        ptr = ap.Acquire_Load();
-      }
-      count++;
-      thread->stats.FinishedSingleOp(nullptr);
-    }
-    if (ptr == nullptr) exit(1); // Disable unused variable warning.
-  }
-
-  void Compress(ThreadState *thread) {
-    RandomGenerator gen;
-    Slice input = gen.Generate(Options().block_size);
-    int64_t bytes = 0;
-    int64_t produced = 0;
-    bool ok = true;
-    std::string compressed;
-
-    // Compress 1G
-    while (ok && bytes < int64_t(1) << 30) {
-      switch (FLAGS_compression_type_e) {
-      case rocksdb::kSnappyCompression:
-        ok = port::Snappy_Compress(Options().compression_opts, input.data(),
-                                   input.size(), &compressed);
-        break;
-      case rocksdb::kZlibCompression:
-        ok = port::Zlib_Compress(Options().compression_opts, input.data(),
-                                 input.size(), &compressed);
-        break;
-      case rocksdb::kBZip2Compression:
-        ok = port::BZip2_Compress(Options().compression_opts, input.data(),
-                                  input.size(), &compressed);
-        break;
-      case rocksdb::kLZ4Compression:
-        ok = port::LZ4_Compress(Options().compression_opts, input.data(),
-                                input.size(), &compressed);
-        break;
-      case rocksdb::kLZ4HCCompression:
-        ok = port::LZ4HC_Compress(Options().compression_opts, input.data(),
-                                  input.size(), &compressed);
-        break;
-      default:
-        ok = false;
-      }
-      produced += compressed.size();
-      bytes += input.size();
-      thread->stats.FinishedSingleOp(nullptr);
-    }
-
-    if (!ok) {
-      thread->stats.AddMessage("(compression failure)");
-    } else {
-      char buf[100];
-      snprintf(buf, sizeof(buf), "(output: %.1f%%)",
-               (produced * 100.0) / bytes);
-      thread->stats.AddMessage(buf);
-      thread->stats.AddBytes(bytes);
-    }
-  }
-
-  void Uncompress(ThreadState *thread) {
-    RandomGenerator gen;
-    Slice input = gen.Generate(Options().block_size);
-    std::string compressed;
-
-    bool ok;
-    switch (FLAGS_compression_type_e) {
-    case rocksdb::kSnappyCompression:
-      ok = port::Snappy_Compress(Options().compression_opts, input.data(),
-                                 input.size(), &compressed);
-      break;
-    case rocksdb::kZlibCompression:
-      ok = port::Zlib_Compress(Options().compression_opts, input.data(),
-                               input.size(), &compressed);
-      break;
-    case rocksdb::kBZip2Compression:
-      ok = port::BZip2_Compress(Options().compression_opts, input.data(),
-                                input.size(), &compressed);
-      break;
-    case rocksdb::kLZ4Compression:
-      ok = port::LZ4_Compress(Options().compression_opts, input.data(),
-                              input.size(), &compressed);
-      break;
-    case rocksdb::kLZ4HCCompression:
-      ok = port::LZ4HC_Compress(Options().compression_opts, input.data(),
-                                input.size(), &compressed);
-      break;
-    default:
-      ok = false;
-    }
-
-    int64_t bytes = 0;
-    int decompress_size;
-    while (ok && bytes < 1024 * 1048576) {
-      char *uncompressed = nullptr;
-      switch (FLAGS_compression_type_e) {
-      case rocksdb::kSnappyCompression:
-        // allocate here to make comparison fair
-        uncompressed = new char[input.size()];
-        ok = port::Snappy_Uncompress(compressed.data(), compressed.size(),
-                                     uncompressed);
-        break;
-      case rocksdb::kZlibCompression:
-        uncompressed = port::Zlib_Uncompress(
-            compressed.data(), compressed.size(), &decompress_size);
-        ok = uncompressed != nullptr;
-        break;
-      case rocksdb::kBZip2Compression:
-        uncompressed = port::BZip2_Uncompress(
-            compressed.data(), compressed.size(), &decompress_size);
-        ok = uncompressed != nullptr;
-        break;
-      case rocksdb::kLZ4Compression:
-        uncompressed = port::LZ4_Uncompress(
-            compressed.data(), compressed.size(), &decompress_size);
-        ok = uncompressed != nullptr;
-        break;
-      case rocksdb::kLZ4HCCompression:
-        uncompressed = port::LZ4_Uncompress(
-            compressed.data(), compressed.size(), &decompress_size);
-        ok = uncompressed != nullptr;
-        break;
-      default:
-        ok = false;
-      }
-      delete[] uncompressed;
-      bytes += input.size();
-      thread->stats.FinishedSingleOp(nullptr);
-    }
-
-    if (!ok) {
-      thread->stats.AddMessage("(compression failure)");
-    } else {
-      thread->stats.AddBytes(bytes);
-    }
-  }
-
-  void Open() {
-    assert(db_ == nullptr);
-    Options options;
-    options.create_if_missing = !FLAGS_use_existing_db;
-    options.block_cache = cache_;
-    options.block_cache_compressed = compressed_cache_;
-    if (cache_ == nullptr) {
-      options.no_block_cache = true;
-    }
-    options.write_buffer_size = FLAGS_write_buffer_size;
-    options.max_write_buffer_number = FLAGS_max_write_buffer_number;
-    options.min_write_buffer_number_to_merge =
-      FLAGS_min_write_buffer_number_to_merge;
-    options.max_background_compactions = FLAGS_max_background_compactions;
-    options.max_background_flushes = FLAGS_max_background_flushes;
-    options.compaction_style = FLAGS_compaction_style_e;
-    options.block_size = FLAGS_block_size;
-    options.filter_policy = filter_policy_;
-    if (FLAGS_use_plain_table) {
-      options.prefix_extractor.reset(
-          NewFixedPrefixTransform(FLAGS_prefix_size));
-    }
-    options.memtable_prefix_bloom_bits = FLAGS_memtable_bloom_bits;
-    options.bloom_locality = FLAGS_bloom_locality;
-    options.max_open_files = FLAGS_open_files;
-    options.statistics = dbstats;
-    options.env = FLAGS_env;
-    options.disableDataSync = FLAGS_disable_data_sync;
-    options.use_fsync = FLAGS_use_fsync;
-    options.wal_dir = FLAGS_wal_dir;
-    options.num_levels = FLAGS_num_levels;
-    options.target_file_size_base = FLAGS_target_file_size_base;
-    options.target_file_size_multiplier = FLAGS_target_file_size_multiplier;
-    options.max_bytes_for_level_base = FLAGS_max_bytes_for_level_base;
-    options.max_bytes_for_level_multiplier =
-        FLAGS_max_bytes_for_level_multiplier;
-    options.filter_deletes = FLAGS_filter_deletes;
-    if ((FLAGS_prefix_size == 0) && (FLAGS_rep_factory == kPrefixHash ||
-                                     FLAGS_rep_factory == kHashLinkedList)) {
-      fprintf(stderr, "prefix_size should be non-zero if PrefixHash or "
-                      "HashLinkedList memtablerep is used\n");
-      exit(1);
-    }
-    switch (FLAGS_rep_factory) {
-      case kPrefixHash:
-        options.memtable_factory.reset(NewHashSkipListRepFactory(
-            FLAGS_hash_bucket_count));
-        break;
-      case kSkipList:
-        // no need to do anything
-        break;
-      case kHashLinkedList:
-        options.memtable_factory.reset(NewHashLinkListRepFactory(
-            FLAGS_hash_bucket_count));
-        break;
-      case kVectorRep:
-        options.memtable_factory.reset(
-          new VectorRepFactory
-        );
-        break;
-      case kCuckoo:
-        options.memtable_factory.reset(NewHashCuckooRepFactory(
-            options.write_buffer_size, FLAGS_key_size + FLAGS_value_size));
-        break;
-    }
-    if (FLAGS_use_plain_table) {
-      if (FLAGS_rep_factory != kPrefixHash &&
-          FLAGS_rep_factory != kHashLinkedList) {
-        fprintf(stderr, "Waring: plain table is used with skipList\n");
-      }
-      if (!FLAGS_mmap_read && !FLAGS_mmap_write) {
-        fprintf(stderr, "plain table format requires mmap to operate\n");
-        exit(1);
-      }
-
-      int bloom_bits_per_key = FLAGS_bloom_bits;
-      if (bloom_bits_per_key < 0) {
-        bloom_bits_per_key = 0;
-      }
-      options.table_factory = std::shared_ptr<TableFactory>(
-          NewPlainTableFactory(FLAGS_key_size, bloom_bits_per_key, 0.75));
-    }
-    if (FLAGS_max_bytes_for_level_multiplier_additional_v.size() > 0) {
-      if (FLAGS_max_bytes_for_level_multiplier_additional_v.size() !=
-          (unsigned int)FLAGS_num_levels) {
-        fprintf(stderr, "Insufficient number of fanouts specified %d\n",
-                (int)FLAGS_max_bytes_for_level_multiplier_additional_v.size());
-        exit(1);
-      }
-      options.max_bytes_for_level_multiplier_additional =
-        FLAGS_max_bytes_for_level_multiplier_additional_v;
-    }
-    options.level0_stop_writes_trigger = FLAGS_level0_stop_writes_trigger;
-    options.level0_file_num_compaction_trigger =
-        FLAGS_level0_file_num_compaction_trigger;
-    options.level0_slowdown_writes_trigger =
-      FLAGS_level0_slowdown_writes_trigger;
-    options.compression = FLAGS_compression_type_e;
-    options.compression_opts.level = FLAGS_compression_level;
-    options.WAL_ttl_seconds = FLAGS_wal_ttl_seconds;
-    options.WAL_size_limit_MB = FLAGS_wal_size_limit_MB;
-    if (FLAGS_min_level_to_compress >= 0) {
-      assert(FLAGS_min_level_to_compress <= FLAGS_num_levels);
-      options.compression_per_level.resize(FLAGS_num_levels);
-      for (int i = 0; i < FLAGS_min_level_to_compress; i++) {
-        options.compression_per_level[i] = kNoCompression;
-      }
-      for (int i = FLAGS_min_level_to_compress;
-           i < FLAGS_num_levels; i++) {
-        options.compression_per_level[i] = FLAGS_compression_type_e;
-      }
-    }
-    options.disable_seek_compaction = FLAGS_disable_seek_compaction;
-    options.delete_obsolete_files_period_micros =
-      FLAGS_delete_obsolete_files_period_micros;
-    options.soft_rate_limit = FLAGS_soft_rate_limit;
-    options.hard_rate_limit = FLAGS_hard_rate_limit;
-    options.rate_limit_delay_max_milliseconds =
-      FLAGS_rate_limit_delay_max_milliseconds;
-    options.table_cache_numshardbits = FLAGS_table_cache_numshardbits;
-    options.max_grandparent_overlap_factor =
-      FLAGS_max_grandparent_overlap_factor;
-    options.disable_auto_compactions = FLAGS_disable_auto_compactions;
-    options.source_compaction_factor = FLAGS_source_compaction_factor;
-
-    // fill storage options
-    options.allow_os_buffer = FLAGS_bufferedio;
-    options.allow_mmap_reads = FLAGS_mmap_read;
-    options.allow_mmap_writes = FLAGS_mmap_write;
-    options.advise_random_on_open = FLAGS_advise_random_on_open;
-    options.access_hint_on_compaction_start = FLAGS_compaction_fadvice_e;
-    options.use_adaptive_mutex = FLAGS_use_adaptive_mutex;
-    options.bytes_per_sync = FLAGS_bytes_per_sync;
-
-    // merge operator options
-    options.merge_operator = MergeOperators::CreateFromStringId(
-        FLAGS_merge_operator);
-    if (options.merge_operator == nullptr && !FLAGS_merge_operator.empty()) {
-      fprintf(stderr, "invalid merge operator: %s\n",
-              FLAGS_merge_operator.c_str());
-      exit(1);
-    }
-    options.max_successive_merges = FLAGS_max_successive_merges;
-
-    // set universal style compaction configurations, if applicable
-    if (FLAGS_universal_size_ratio != 0) {
-      options.compaction_options_universal.size_ratio =
-        FLAGS_universal_size_ratio;
-    }
-    if (FLAGS_universal_min_merge_width != 0) {
-      options.compaction_options_universal.min_merge_width =
-        FLAGS_universal_min_merge_width;
-    }
-    if (FLAGS_universal_max_merge_width != 0) {
-      options.compaction_options_universal.max_merge_width =
-        FLAGS_universal_max_merge_width;
-    }
-    if (FLAGS_universal_max_size_amplification_percent != 0) {
-      options.compaction_options_universal.max_size_amplification_percent =
-        FLAGS_universal_max_size_amplification_percent;
-    }
-    if (FLAGS_universal_compression_size_percent != -1) {
-      options.compaction_options_universal.compression_size_percent =
-        FLAGS_universal_compression_size_percent;
-    }
-
-    if (FLAGS_num_multi_db <= 1) {
-      OpenDb(options, FLAGS_db, &db_);
-    } else {
-      multi_dbs_.clear();
-      for (int i = 0; i < FLAGS_num_multi_db; i++) {
-        DB* db;
-        OpenDb(options, GetDbNameForMultiple(FLAGS_db, i), &db);
-        multi_dbs_.push_back(db);
-      }
-    }
-    if (FLAGS_min_level_to_compress >= 0) {
-      options.compression_per_level.clear();
-    }
-  }
-
-  void OpenDb(Options options, std::string db_name, DB** db) {
-    Status s;
-    if(FLAGS_readonly) {
-      s = DB::OpenForReadOnly(options, db_name, db);
-    } else {
-      s = DB::Open(options, db_name, db);
-    }
-    if (!s.ok()) {
-      fprintf(stderr, "open error: %s\n", s.ToString().c_str());
-      exit(1);
-    }
-  }
-
-  enum WriteMode {
-    RANDOM, SEQUENTIAL, UNIQUE_RANDOM
-  };
-
-  void WriteSeq(ThreadState* thread) {
-    DoWrite(thread, SEQUENTIAL);
-  }
-
-  void WriteRandom(ThreadState* thread) {
-    DoWrite(thread, RANDOM);
-  }
-
-  void WriteUniqueRandom(ThreadState* thread) {
-    DoWrite(thread, UNIQUE_RANDOM);
-  }
-
-  class KeyGenerator {
-   public:
-    KeyGenerator(Random64* rand, WriteMode mode,
-        uint64_t num, uint64_t num_per_set = 64 * 1024)
-      : rand_(rand),
-        mode_(mode),
-        num_(num),
-        next_(0) {
-      if (mode_ == UNIQUE_RANDOM) {
-        // NOTE: if memory consumption of this approach becomes a concern,
-        // we can either break it into pieces and only random shuffle a section
-        // each time. Alternatively, use a bit map implementation
-        // (https://reviews.facebook.net/differential/diff/54627/)
-        values_.resize(num_);
-        for (uint64_t i = 0; i < num_; ++i) {
-          values_[i] = i;
-        }
-        std::shuffle(values_.begin(), values_.end(),
-            std::default_random_engine(FLAGS_seed));
-      }
-    }
-
-    uint64_t Next() {
-      switch (mode_) {
-        case SEQUENTIAL:
-          return next_++;
-        case RANDOM:
-          return rand_->Next() % num_;
-        case UNIQUE_RANDOM:
-          return values_[next_++];
-      }
-      assert(false);
-      return std::numeric_limits<uint64_t>::max();
-    }
-
-   private:
-    Random64* rand_;
-    WriteMode mode_;
-    const uint64_t num_;
-    uint64_t next_;
-    std::vector<uint64_t> values_;
-  };
-
-  DB* SelectDB(ThreadState* thread) {
-    if (db_ != nullptr) {
-      return db_;
-    } else {
-      return multi_dbs_[thread->rand.Next() % multi_dbs_.size()];
-    }
-  }
-
-  void DoWrite(ThreadState* thread, WriteMode write_mode) {
-    const int test_duration = write_mode == RANDOM ? FLAGS_duration : 0;
-    const int64_t num_ops = writes_ == 0 ? num_ : writes_;
-
-    size_t num_key_gens = 1;
-    if (db_ == nullptr) {
-      num_key_gens = multi_dbs_.size();
-    }
-    std::vector<std::unique_ptr<KeyGenerator>> key_gens(num_key_gens);
-    Duration duration(test_duration, num_ops * num_key_gens);
-    for (size_t i = 0; i < num_key_gens; i++) {
-      key_gens[i].reset(new KeyGenerator(&(thread->rand), write_mode, num_ops));
-    }
-
-    if (num_ != FLAGS_num) {
-      char msg[100];
-      snprintf(msg, sizeof(msg), "(%" PRIu64 " ops)", num_);
-      thread->stats.AddMessage(msg);
-    }
-
-    RandomGenerator gen;
-    WriteBatch batch;
-    Status s;
-    int64_t bytes = 0;
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-    while (!duration.Done(entries_per_batch_)) {
-      size_t id = 0;
-      DB* db_to_write = db_;
-      if (db_to_write == nullptr) {
-        id = thread->rand.Next() % num_key_gens;
-        db_to_write = multi_dbs_[id];
-      }
-      batch.Clear();
-      for (int64_t j = 0; j < entries_per_batch_; j++) {
-        GenerateKeyFromInt(key_gens[id]->Next(), FLAGS_num, &key);
-        batch.Put(key, gen.Generate(value_size_));
-        bytes += value_size_ + key_size_;
-        thread->stats.FinishedSingleOp(db_to_write);
-      }
-      s = db_to_write->Write(write_options_, &batch);
-      if (!s.ok()) {
-        fprintf(stderr, "put error: %s\n", s.ToString().c_str());
-        exit(1);
-      }
-    }
-    thread->stats.AddBytes(bytes);
-  }
-
-  void ReadSequential(ThreadState* thread) {
-    if (db_ != nullptr) {
-      ReadSequential(thread, db_);
-    } else {
-      for (DB* db : multi_dbs_) {
-        ReadSequential(thread, db);
-      }
-    }
-  }
-
-  void ReadSequential(ThreadState* thread, DB* db) {
-    Iterator* iter = db->NewIterator(ReadOptions(FLAGS_verify_checksum, true));
-    int64_t i = 0;
-    int64_t bytes = 0;
-    for (iter->SeekToFirst(); i < reads_ && iter->Valid(); iter->Next()) {
-      bytes += iter->key().size() + iter->value().size();
-      thread->stats.FinishedSingleOp(db);
-      ++i;
-    }
-    delete iter;
-    thread->stats.AddBytes(bytes);
-  }
-
-  void ReadReverse(ThreadState* thread) {
-    if (db_ != nullptr) {
-      ReadReverse(thread, db_);
-    } else {
-      for (DB* db : multi_dbs_) {
-        ReadReverse(thread, db);
-      }
-    }
-  }
-
-  void ReadReverse(ThreadState* thread, DB* db) {
-    Iterator* iter = db->NewIterator(ReadOptions(FLAGS_verify_checksum, true));
-    int64_t i = 0;
-    int64_t bytes = 0;
-    for (iter->SeekToLast(); i < reads_ && iter->Valid(); iter->Prev()) {
-      bytes += iter->key().size() + iter->value().size();
-      thread->stats.FinishedSingleOp(db_);
-      ++i;
-    }
-    delete iter;
-    thread->stats.AddBytes(bytes);
-  }
-
-  void ReadRandom(ThreadState* thread) {
-    int64_t read = 0;
-    int64_t found = 0;
-    ReadOptions options(FLAGS_verify_checksum, true);
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-    std::string value;
-
-    Duration duration(FLAGS_duration, reads_);
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_num, FLAGS_num, &key);
-      read++;
-      if (db->Get(options, key, &value).ok()) {
-        found++;
-      }
-      thread->stats.FinishedSingleOp(db_);
-    }
-
-    char msg[100];
-    snprintf(msg, sizeof(msg), "(%" PRIu64 " of %" PRIu64 " found)",
-             found, read);
-
-    thread->stats.AddMessage(msg);
-
-    if (FLAGS_perf_level > 0) {
-      thread->stats.AddMessage(perf_context.ToString());
-    }
-  }
-
-  // Calls MultiGet over a list of keys from a random distribution.
-  // Returns the total number of keys found.
-  void MultiReadRandom(ThreadState* thread) {
-    int64_t read = 0;
-    int64_t found = 0;
-    ReadOptions options(FLAGS_verify_checksum, true);
-    std::vector<Slice> keys;
-    std::vector<std::string> values(entries_per_batch_);
-    while (static_cast<int64_t>(keys.size()) < entries_per_batch_) {
-      keys.push_back(AllocateKey());
-    }
-
-    Duration duration(FLAGS_duration, reads_);
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      for (int64_t i = 0; i < entries_per_batch_; ++i) {
-        GenerateKeyFromInt(thread->rand.Next() % FLAGS_num,
-            FLAGS_num, &keys[i]);
-      }
-      std::vector<Status> statuses = db->MultiGet(options, keys, &values);
-      assert(static_cast<int64_t>(statuses.size()) == entries_per_batch_);
-
-      read += entries_per_batch_;
-      for (int64_t i = 0; i < entries_per_batch_; ++i) {
-        if (statuses[i].ok()) {
-          ++found;
-        }
-      }
-    }
-    for (auto& k : keys) {
-      delete k.data();
-    }
-
-    char msg[100];
-    snprintf(msg, sizeof(msg), "(%" PRIu64 " of %" PRIu64 " found)",
-             found, read);
-    thread->stats.AddMessage(msg);
-  }
-
-  void IteratorCreation(ThreadState* thread) {
-    Duration duration(FLAGS_duration, reads_);
-    ReadOptions options(FLAGS_verify_checksum, true);
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      Iterator* iter = db->NewIterator(options);
-      delete iter;
-      thread->stats.FinishedSingleOp(db);
-    }
-  }
-
-  void IteratorCreationWhileWriting(ThreadState* thread) {
-    if (thread->tid > 0) {
-      IteratorCreation(thread);
-    } else {
-      BGWriter(thread);
-    }
-  }
-
-  void SeekRandom(ThreadState* thread) {
-    int64_t read = 0;
-    int64_t found = 0;
-    ReadOptions options(FLAGS_verify_checksum, true);
-    options.tailing = FLAGS_use_tailing_iterator;
-
-    Iterator* single_iter = nullptr;
-    std::vector<Iterator*> multi_iters;
-    if (db_ != nullptr) {
-      single_iter = db_->NewIterator(options);
-    } else {
-      for (DB* db : multi_dbs_) {
-        multi_iters.push_back(db->NewIterator(options));
-      }
-    }
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-
-    Duration duration(FLAGS_duration, reads_);
-    while (!duration.Done(1)) {
-      // Pick a Iterator to use
-      Iterator* iter_to_use = single_iter;
-      if (single_iter == nullptr) {
-        iter_to_use = multi_iters[thread->rand.Next() % multi_iters.size()];
-      }
-
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_num, FLAGS_num, &key);
-      iter_to_use->Seek(key);
-      read++;
-      if (iter_to_use->Valid() && iter_to_use->key().compare(key) == 0) {
-        found++;
-      }
-      thread->stats.FinishedSingleOp(db_);
-    }
-    delete single_iter;
-    for (auto iter : multi_iters) {
-      delete iter;
-    }
-
-    char msg[100];
-    snprintf(msg, sizeof(msg), "(%" PRIu64 " of %" PRIu64 " found)",
-             found, read);
-    thread->stats.AddMessage(msg);
-  }
-
-  void SeekRandomWhileWriting(ThreadState* thread) {
-    if (thread->tid > 0) {
-      SeekRandom(thread);
-    } else {
-      BGWriter(thread);
-    }
-  }
-
-  void DoDelete(ThreadState* thread, bool seq) {
-    WriteBatch batch;
-    Duration duration(seq ? 0 : FLAGS_duration, num_);
-    int64_t i = 0;
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-
-    while (!duration.Done(entries_per_batch_)) {
-      DB* db = SelectDB(thread);
-      batch.Clear();
-      for (int64_t j = 0; j < entries_per_batch_; ++j) {
-        const int64_t k = seq ? i + j : (thread->rand.Next() % FLAGS_num);
-        GenerateKeyFromInt(k, FLAGS_num, &key);
-        batch.Delete(key);
-        thread->stats.FinishedSingleOp(db);
-      }
-      auto s = db->Write(write_options_, &batch);
-      if (!s.ok()) {
-        fprintf(stderr, "del error: %s\n", s.ToString().c_str());
-        exit(1);
-      }
-      i += entries_per_batch_;
-    }
-  }
-
-  void DeleteSeq(ThreadState* thread) {
-    DoDelete(thread, true);
-  }
-
-  void DeleteRandom(ThreadState* thread) {
-    DoDelete(thread, false);
-  }
-
-  void ReadWhileWriting(ThreadState* thread) {
-    if (thread->tid > 0) {
-      ReadRandom(thread);
-    } else {
-      BGWriter(thread);
-    }
-  }
-
-  void BGWriter(ThreadState* thread) {
-    // Special thread that keeps writing until other threads are done.
-    RandomGenerator gen;
-    double last = FLAGS_env->NowMicros();
-    int writes_per_second_by_10 = 0;
-    int num_writes = 0;
-
-    // --writes_per_second rate limit is enforced per 100 milliseconds
-    // intervals to avoid a burst of writes at the start of each second.
-
-    if (FLAGS_writes_per_second > 0)
-      writes_per_second_by_10 = FLAGS_writes_per_second / 10;
-
-    // Don't merge stats from this thread with the readers.
-    thread->stats.SetExcludeFromMerge();
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-
-    while (true) {
-      DB* db = SelectDB(thread);
-      {
-        MutexLock l(&thread->shared->mu);
-        if (thread->shared->num_done + 1 >= thread->shared->num_initialized) {
-          // Other threads have finished
-          break;
-        }
-      }
-
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_num, FLAGS_num, &key);
-      Status s = db->Put(write_options_, key, gen.Generate(value_size_));
-      if (!s.ok()) {
-        fprintf(stderr, "put error: %s\n", s.ToString().c_str());
-        exit(1);
-      }
-      thread->stats.FinishedSingleOp(db_);
-
-      ++num_writes;
-      if (writes_per_second_by_10 && num_writes >= writes_per_second_by_10) {
-        double now = FLAGS_env->NowMicros();
-        double usecs_since_last = now - last;
-
-        num_writes = 0;
-        last = now;
-
-        if (usecs_since_last < 100000.0) {
-          FLAGS_env->SleepForMicroseconds(100000.0 - usecs_since_last);
-          last = FLAGS_env->NowMicros();
-        }
-      }
-    }
-  }
-
-  // Given a key K and value V, this puts (K+"0", V), (K+"1", V), (K+"2", V)
-  // in DB atomically i.e in a single batch. Also refer GetMany.
-  Status PutMany(DB* db, const WriteOptions& writeoptions, const Slice& key,
-                 const Slice& value) {
-    std::string suffixes[3] = {"2", "1", "0"};
-    std::string keys[3];
-
-    WriteBatch batch;
-    Status s;
-    for (int i = 0; i < 3; i++) {
-      keys[i] = key.ToString() + suffixes[i];
-      batch.Put(keys[i], value);
-    }
-
-    s = db->Write(writeoptions, &batch);
-    return s;
-  }
-
-
-  // Given a key K, this deletes (K+"0", V), (K+"1", V), (K+"2", V)
-  // in DB atomically i.e in a single batch. Also refer GetMany.
-  Status DeleteMany(DB* db, const WriteOptions& writeoptions,
-                    const Slice& key) {
-    std::string suffixes[3] = {"1", "2", "0"};
-    std::string keys[3];
-
-    WriteBatch batch;
-    Status s;
-    for (int i = 0; i < 3; i++) {
-      keys[i] = key.ToString() + suffixes[i];
-      batch.Delete(keys[i]);
-    }
-
-    s = db->Write(writeoptions, &batch);
-    return s;
-  }
-
-  // Given a key K and value V, this gets values for K+"0", K+"1" and K+"2"
-  // in the same snapshot, and verifies that all the values are identical.
-  // ASSUMES that PutMany was used to put (K, V) into the DB.
-  Status GetMany(DB* db, const ReadOptions& readoptions, const Slice& key,
-                 std::string* value) {
-    std::string suffixes[3] = {"0", "1", "2"};
-    std::string keys[3];
-    Slice key_slices[3];
-    std::string values[3];
-    ReadOptions readoptionscopy = readoptions;
-    readoptionscopy.snapshot = db->GetSnapshot();
-    Status s;
-    for (int i = 0; i < 3; i++) {
-      keys[i] = key.ToString() + suffixes[i];
-      key_slices[i] = keys[i];
-      s = db->Get(readoptionscopy, key_slices[i], value);
-      if (!s.ok() && !s.IsNotFound()) {
-        fprintf(stderr, "get error: %s\n", s.ToString().c_str());
-        values[i] = "";
-        // we continue after error rather than exiting so that we can
-        // find more errors if any
-      } else if (s.IsNotFound()) {
-        values[i] = "";
-      } else {
-        values[i] = *value;
-      }
-    }
-    db->ReleaseSnapshot(readoptionscopy.snapshot);
-
-    if ((values[0] != values[1]) || (values[1] != values[2])) {
-      fprintf(stderr, "inconsistent values for key %s: %s, %s, %s\n",
-              key.ToString().c_str(), values[0].c_str(), values[1].c_str(),
-              values[2].c_str());
-      // we continue after error rather than exiting so that we can
-      // find more errors if any
-    }
-
-    return s;
-  }
-
-  // Differs from readrandomwriterandom in the following ways:
-  // (a) Uses GetMany/PutMany to read/write key values. Refer to those funcs.
-  // (b) Does deletes as well (per FLAGS_deletepercent)
-  // (c) In order to achieve high % of 'found' during lookups, and to do
-  //     multiple writes (including puts and deletes) it uses upto
-  //     FLAGS_numdistinct distinct keys instead of FLAGS_num distinct keys.
-  // (d) Does not have a MultiGet option.
-  void RandomWithVerify(ThreadState* thread) {
-    ReadOptions options(FLAGS_verify_checksum, true);
-    RandomGenerator gen;
-    std::string value;
-    int64_t found = 0;
-    int get_weight = 0;
-    int put_weight = 0;
-    int delete_weight = 0;
-    int64_t gets_done = 0;
-    int64_t puts_done = 0;
-    int64_t deletes_done = 0;
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-
-    // the number of iterations is the larger of read_ or write_
-    for (int64_t i = 0; i < readwrites_; i++) {
-      DB* db = SelectDB(thread);
-      if (get_weight == 0 && put_weight == 0 && delete_weight == 0) {
-        // one batch completed, reinitialize for next batch
-        get_weight = FLAGS_readwritepercent;
-        delete_weight = FLAGS_deletepercent;
-        put_weight = 100 - get_weight - delete_weight;
-      }
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_numdistinct,
-          FLAGS_numdistinct, &key);
-      if (get_weight > 0) {
-        // do all the gets first
-        Status s = GetMany(db, options, key, &value);
-        if (!s.ok() && !s.IsNotFound()) {
-          fprintf(stderr, "getmany error: %s\n", s.ToString().c_str());
-          // we continue after error rather than exiting so that we can
-          // find more errors if any
-        } else if (!s.IsNotFound()) {
-          found++;
-        }
-        get_weight--;
-        gets_done++;
-      } else if (put_weight > 0) {
-        // then do all the corresponding number of puts
-        // for all the gets we have done earlier
-        Status s = PutMany(db, write_options_, key, gen.Generate(value_size_));
-        if (!s.ok()) {
-          fprintf(stderr, "putmany error: %s\n", s.ToString().c_str());
-          exit(1);
-        }
-        put_weight--;
-        puts_done++;
-      } else if (delete_weight > 0) {
-        Status s = DeleteMany(db, write_options_, key);
-        if (!s.ok()) {
-          fprintf(stderr, "deletemany error: %s\n", s.ToString().c_str());
-          exit(1);
-        }
-        delete_weight--;
-        deletes_done++;
-      }
-
-      thread->stats.FinishedSingleOp(db_);
-    }
-    char msg[100];
-    snprintf(msg, sizeof(msg),
-             "( get:%" PRIu64 " put:%" PRIu64 " del:%" PRIu64 " total:%" \
-             PRIu64 " found:%" PRIu64 ")",
-             gets_done, puts_done, deletes_done, readwrites_, found);
-    thread->stats.AddMessage(msg);
-  }
-
-  // This is different from ReadWhileWriting because it does not use
-  // an extra thread.
-  void ReadRandomWriteRandom(ThreadState* thread) {
-    ReadOptions options(FLAGS_verify_checksum, true);
-    RandomGenerator gen;
-    std::string value;
-    int64_t found = 0;
-    int get_weight = 0;
-    int put_weight = 0;
-    int64_t reads_done = 0;
-    int64_t writes_done = 0;
-    Duration duration(FLAGS_duration, readwrites_);
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-
-    // the number of iterations is the larger of read_ or write_
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_num, FLAGS_num, &key);
-      if (get_weight == 0 && put_weight == 0) {
-        // one batch completed, reinitialize for next batch
-        get_weight = FLAGS_readwritepercent;
-        put_weight = 100 - get_weight;
-      }
-      if (get_weight > 0) {
-        // do all the gets first
-        Status s = db->Get(options, key, &value);
-        if (!s.ok() && !s.IsNotFound()) {
-          fprintf(stderr, "get error: %s\n", s.ToString().c_str());
-          // we continue after error rather than exiting so that we can
-          // find more errors if any
-        } else if (!s.IsNotFound()) {
-          found++;
-        }
-        get_weight--;
-        reads_done++;
-      } else  if (put_weight > 0) {
-        // then do all the corresponding number of puts
-        // for all the gets we have done earlier
-        Status s = db->Put(write_options_, key, gen.Generate(value_size_));
-        if (!s.ok()) {
-          fprintf(stderr, "put error: %s\n", s.ToString().c_str());
-          exit(1);
-        }
-        put_weight--;
-        writes_done++;
-      }
-      thread->stats.FinishedSingleOp(db);
-    }
-    char msg[100];
-    snprintf(msg, sizeof(msg), "( reads:%" PRIu64 " writes:%" PRIu64 \
-             " total:%" PRIu64 " found:%" PRIu64 ")",
-             reads_done, writes_done, readwrites_, found);
-    thread->stats.AddMessage(msg);
-  }
-
-  //
-  // Read-modify-write for random keys
-  void UpdateRandom(ThreadState* thread) {
-    ReadOptions options(FLAGS_verify_checksum, true);
-    RandomGenerator gen;
-    std::string value;
-    int64_t found = 0;
-    Duration duration(FLAGS_duration, readwrites_);
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-    // the number of iterations is the larger of read_ or write_
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_num, FLAGS_num, &key);
-
-      if (db->Get(options, key, &value).ok()) {
-        found++;
-      }
-
-      Status s = db->Put(write_options_, key, gen.Generate(value_size_));
-      if (!s.ok()) {
-        fprintf(stderr, "put error: %s\n", s.ToString().c_str());
-        exit(1);
-      }
-      thread->stats.FinishedSingleOp(db);
-    }
-    char msg[100];
-    snprintf(msg, sizeof(msg),
-             "( updates:%" PRIu64 " found:%" PRIu64 ")", readwrites_, found);
-    thread->stats.AddMessage(msg);
-  }
-
-  // Read-modify-write for random keys.
-  // Each operation causes the key grow by value_size (simulating an append).
-  // Generally used for benchmarking against merges of similar type
-  void AppendRandom(ThreadState* thread) {
-    ReadOptions options(FLAGS_verify_checksum, true);
-    RandomGenerator gen;
-    std::string value;
-    int64_t found = 0;
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-    // The number of iterations is the larger of read_ or write_
-    Duration duration(FLAGS_duration, readwrites_);
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      GenerateKeyFromInt(thread->rand.Next() % FLAGS_num, FLAGS_num, &key);
-
-      // Get the existing value
-      if (db->Get(options, key, &value).ok()) {
-        found++;
-      } else {
-        // If not existing, then just assume an empty string of data
-        value.clear();
-      }
-
-      // Update the value (by appending data)
-      Slice operand = gen.Generate(value_size_);
-      if (value.size() > 0) {
-        // Use a delimeter to match the semantics for StringAppendOperator
-        value.append(1,',');
-      }
-      value.append(operand.data(), operand.size());
-
-      // Write back to the database
-      Status s = db->Put(write_options_, key, value);
-      if (!s.ok()) {
-        fprintf(stderr, "put error: %s\n", s.ToString().c_str());
-        exit(1);
-      }
-      thread->stats.FinishedSingleOp(db_);
-    }
-
-    char msg[100];
-    snprintf(msg, sizeof(msg), "( updates:%" PRIu64 " found:%" PRIu64 ")",
-            readwrites_, found);
-    thread->stats.AddMessage(msg);
-  }
-
-  // Read-modify-write for random keys (using MergeOperator)
-  // The merge operator to use should be defined by FLAGS_merge_operator
-  // Adjust FLAGS_value_size so that the keys are reasonable for this operator
-  // Assumes that the merge operator is non-null (i.e.: is well-defined)
-  //
-  // For example, use FLAGS_merge_operator="uint64add" and FLAGS_value_size=8
-  // to simulate random additions over 64-bit integers using merge.
-  //
-  // The number of merges on the same key can be controlled by adjusting
-  // FLAGS_merge_keys.
-  void MergeRandom(ThreadState* thread) {
-    RandomGenerator gen;
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-    // The number of iterations is the larger of read_ or write_
-    Duration duration(FLAGS_duration, readwrites_);
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      GenerateKeyFromInt(thread->rand.Next() % merge_keys_, merge_keys_, &key);
-
-      Status s = db->Merge(write_options_, key, gen.Generate(value_size_));
-
-      if (!s.ok()) {
-        fprintf(stderr, "merge error: %s\n", s.ToString().c_str());
-        exit(1);
-      }
-      thread->stats.FinishedSingleOp(db_);
-    }
-
-    // Print some statistics
-    char msg[100];
-    snprintf(msg, sizeof(msg), "( updates:%" PRIu64 ")", readwrites_);
-    thread->stats.AddMessage(msg);
-  }
-
-  // Read and merge random keys. The amount of reads and merges are controlled
-  // by adjusting FLAGS_num and FLAGS_mergereadpercent. The number of distinct
-  // keys (and thus also the number of reads and merges on the same key) can be
-  // adjusted with FLAGS_merge_keys.
-  //
-  // As with MergeRandom, the merge operator to use should be defined by
-  // FLAGS_merge_operator.
-  void ReadRandomMergeRandom(ThreadState* thread) {
-    ReadOptions options(FLAGS_verify_checksum, true);
-    RandomGenerator gen;
-    std::string value;
-    int64_t num_hits = 0;
-    int64_t num_gets = 0;
-    int64_t num_merges = 0;
-    size_t max_length = 0;
-
-    Slice key = AllocateKey();
-    std::unique_ptr<const char[]> key_guard(key.data());
-    // the number of iterations is the larger of read_ or write_
-    Duration duration(FLAGS_duration, readwrites_);
-    while (!duration.Done(1)) {
-      DB* db = SelectDB(thread);
-      GenerateKeyFromInt(thread->rand.Next() % merge_keys_, merge_keys_, &key);
-
-      bool do_merge = int(thread->rand.Next() % 100) < FLAGS_mergereadpercent;
-
-      if (do_merge) {
-        Status s = db->Merge(write_options_, key, gen.Generate(value_size_));
-        if (!s.ok()) {
-          fprintf(stderr, "merge error: %s\n", s.ToString().c_str());
-          exit(1);
-        }
-
-        num_merges++;
-
-      } else {
-        Status s = db->Get(options, key, &value);
-        if (value.length() > max_length)
-          max_length = value.length();
-
-        if (!s.ok() && !s.IsNotFound()) {
-          fprintf(stderr, "get error: %s\n", s.ToString().c_str());
-          // we continue after error rather than exiting so that we can
-          // find more errors if any
-        } else if (!s.IsNotFound()) {
-          num_hits++;
-        }
-
-        num_gets++;
-
-      }
-
-      thread->stats.FinishedSingleOp(db_);
-    }
-
-    char msg[100];
-    snprintf(msg, sizeof(msg),
-             "(reads:%" PRIu64 " merges:%" PRIu64 " total:%" PRIu64 " hits:%" \
-             PRIu64 " maxlength:%zu)",
-             num_gets, num_merges, readwrites_, num_hits, max_length);
-    thread->stats.AddMessage(msg);
-  }
-
-  void Compact(ThreadState* thread) {
-    DB* db = SelectDB(thread);
-    db->CompactRange(nullptr, nullptr);
-  }
-
-  void PrintStats(const char* key) {
-    if (db_ != nullptr) {
-      PrintStats(db_, key, false);
-    }
-    for (DB* db : multi_dbs_) {
-      PrintStats(db, key, true);
-    }
-  }
-
-  void PrintStats(DB* db, const char* key, bool print_header = false) {
-    if (print_header) {
-      fprintf(stdout, "\n==== DB: %s ===\n", db->GetName().c_str());
-    }
-    std::string stats;
-    if (!db->GetProperty(key, &stats)) {
-      stats = "(failed)";
-    }
-    fprintf(stdout, "\n%s\n", stats.c_str());
-  }
-};
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  rocksdb::port::InstallStackTraceHandler();
-  google::SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) +
-                          " [OPTIONS]...");
-  google::ParseCommandLineFlags(&argc, &argv, true);
-
-  FLAGS_compaction_style_e = (rocksdb::CompactionStyle) FLAGS_compaction_style;
-  if (FLAGS_statistics) {
-    dbstats = rocksdb::CreateDBStatistics();
-  }
-
-  std::vector<std::string> fanout =
-    rocksdb::stringSplit(FLAGS_max_bytes_for_level_multiplier_additional, ',');
-  for (unsigned int j= 0; j < fanout.size(); j++) {
-    FLAGS_max_bytes_for_level_multiplier_additional_v.push_back(
-      std::stoi(fanout[j]));
-  }
-
-  FLAGS_compression_type_e =
-    StringToCompressionType(FLAGS_compression_type.c_str());
-
-  if (!FLAGS_hdfs.empty()) {
-    FLAGS_env  = new rocksdb::HdfsEnv(FLAGS_hdfs);
-  }
-
-  if (!strcasecmp(FLAGS_compaction_fadvice.c_str(), "NONE"))
-    FLAGS_compaction_fadvice_e = rocksdb::Options::NONE;
-  else if (!strcasecmp(FLAGS_compaction_fadvice.c_str(), "NORMAL"))
-    FLAGS_compaction_fadvice_e = rocksdb::Options::NORMAL;
-  else if (!strcasecmp(FLAGS_compaction_fadvice.c_str(), "SEQUENTIAL"))
-    FLAGS_compaction_fadvice_e = rocksdb::Options::SEQUENTIAL;
-  else if (!strcasecmp(FLAGS_compaction_fadvice.c_str(), "WILLNEED"))
-    FLAGS_compaction_fadvice_e = rocksdb::Options::WILLNEED;
-  else {
-    fprintf(stdout, "Unknown compaction fadvice:%s\n",
-            FLAGS_compaction_fadvice.c_str());
-  }
-
-  FLAGS_rep_factory = StringToRepFactory(FLAGS_memtablerep.c_str());
-
-  // The number of background threads should be at least as much the
-  // max number of concurrent compactions.
-  FLAGS_env->SetBackgroundThreads(FLAGS_max_background_compactions);
-  // Choose a location for the test database if none given with --db=<path>
-  if (FLAGS_db.empty()) {
-    std::string default_db_path;
-    rocksdb::Env::Default()->GetTestDirectory(&default_db_path);
-    default_db_path += "/dbbench";
-    FLAGS_db = default_db_path;
-  }
-
-  rocksdb::Benchmark benchmark;
-  benchmark.Run();
-  return 0;
-}
diff --git a/src/rocksdb/db/db_filesnapshot.cc b/src/rocksdb/db/db_filesnapshot.cc
deleted file mode 100644
index 1e1ec97..0000000
--- a/src/rocksdb/db/db_filesnapshot.cc
+++ /dev/null
@@ -1,172 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 Facebook.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ROCKSDB_LITE
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <algorithm>
-#include <string>
-#include <stdint.h>
-#include "db/db_impl.h"
-#include "db/filename.h"
-#include "db/version_set.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "port/port.h"
-#include "util/mutexlock.h"
-#include "util/sync_point.h"
-
-namespace rocksdb {
-
-Status DBImpl::DisableFileDeletions() {
-  MutexLock l(&mutex_);
-  ++disable_delete_obsolete_files_;
-  if (disable_delete_obsolete_files_ == 1) {
-    // if not, it has already been disabled, so don't log anything
-    Log(options_.info_log, "File Deletions Disabled");
-  }
-  return Status::OK();
-}
-
-Status DBImpl::EnableFileDeletions(bool force) {
-  DeletionState deletion_state;
-  bool should_purge_files = false;
-  {
-    MutexLock l(&mutex_);
-    if (force) {
-      // if force, we need to enable file deletions right away
-      disable_delete_obsolete_files_ = 0;
-    } else if (disable_delete_obsolete_files_ > 0) {
-      --disable_delete_obsolete_files_;
-    }
-    if (disable_delete_obsolete_files_ == 0)  {
-      Log(options_.info_log, "File Deletions Enabled");
-      should_purge_files = true;
-      FindObsoleteFiles(deletion_state, true);
-    }
-  }
-  if (should_purge_files)  {
-    PurgeObsoleteFiles(deletion_state);
-  }
-  LogFlush(options_.info_log);
-  return Status::OK();
-}
-
-Status DBImpl::GetLiveFiles(std::vector<std::string>& ret,
-                            uint64_t* manifest_file_size,
-                            bool flush_memtable) {
-
-  *manifest_file_size = 0;
-
-  mutex_.Lock();
-
-  if (flush_memtable) {
-    // flush all dirty data to disk.
-    Status status;
-    for (auto cfd : *versions_->GetColumnFamilySet()) {
-      cfd->Ref();
-      mutex_.Unlock();
-      status = FlushMemTable(cfd, FlushOptions());
-      mutex_.Lock();
-      cfd->Unref();
-      if (!status.ok()) {
-        break;
-      }
-    }
-    versions_->GetColumnFamilySet()->FreeDeadColumnFamilies();
-
-    if (!status.ok()) {
-      mutex_.Unlock();
-      Log(options_.info_log, "Cannot Flush data %s\n",
-          status.ToString().c_str());
-      return status;
-    }
-  }
-
-  // Make a set of all of the live *.sst files
-  std::set<uint64_t> live;
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    cfd->current()->AddLiveFiles(&live);
-  }
-
-  ret.clear();
-  ret.reserve(live.size() + 2); //*.sst + CURRENT + MANIFEST
-
-  // create names of the live files. The names are not absolute
-  // paths, instead they are relative to dbname_;
-  for (auto live_file : live) {
-    ret.push_back(TableFileName("", live_file));
-  }
-
-  ret.push_back(CurrentFileName(""));
-  ret.push_back(DescriptorFileName("", versions_->ManifestFileNumber()));
-
-  // find length of manifest file while holding the mutex lock
-  *manifest_file_size = versions_->ManifestFileSize();
-
-  mutex_.Unlock();
-  return Status::OK();
-}
-
-Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
-  // First get sorted files in db dir, then get sorted files from archived
-  // dir, to avoid a race condition where a log file is moved to archived
-  // dir in between.
-  Status s;
-  // list wal files in main db dir.
-  VectorLogPtr logs;
-  s = GetSortedWalsOfType(options_.wal_dir, logs, kAliveLogFile);
-  if (!s.ok()) {
-    return s;
-  }
-
-  // Reproduce the race condition where a log file is moved
-  // to archived dir, between these two sync points, used in
-  // (DBTest,TransactionLogIteratorRace)
-  TEST_SYNC_POINT("DBImpl::GetSortedWalFiles:1");
-  TEST_SYNC_POINT("DBImpl::GetSortedWalFiles:2");
-
-  files.clear();
-  // list wal files in archive dir.
-  std::string archivedir = ArchivalDirectory(options_.wal_dir);
-  if (env_->FileExists(archivedir)) {
-    s = GetSortedWalsOfType(archivedir, files, kArchivedLogFile);
-    if (!s.ok()) {
-      return s;
-    }
-  }
-
-  uint64_t latest_archived_log_number = 0;
-  if (!files.empty()) {
-    latest_archived_log_number = files.back()->LogNumber();
-    Log(options_.info_log, "Latest Archived log: %" PRIu64,
-        latest_archived_log_number);
-  }
-
-  files.reserve(files.size() + logs.size());
-  for (auto& log : logs) {
-    if (log->LogNumber() > latest_archived_log_number) {
-      files.push_back(std::move(log));
-    } else {
-      // When the race condition happens, we could see the
-      // same log in both db dir and archived dir. Simply
-      // ignore the one in db dir. Note that, if we read
-      // archived dir first, we would have missed the log file.
-      Log(options_.info_log, "%s already moved to archive",
-          log->PathName().c_str());
-    }
-  }
-
-  return s;
-}
-
-}
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/db_impl.cc b/src/rocksdb/db/db_impl.cc
deleted file mode 100644
index 25d8a07..0000000
--- a/src/rocksdb/db/db_impl.cc
+++ /dev/null
@@ -1,4587 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/db_impl.h"
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <algorithm>
-#include <climits>
-#include <cstdio>
-#include <set>
-#include <stdexcept>
-#include <stdint.h>
-#include <string>
-#include <unordered_set>
-#include <unordered_map>
-#include <utility>
-#include <vector>
-
-#include "db/builder.h"
-#include "db/db_iter.h"
-#include "db/dbformat.h"
-#include "db/filename.h"
-#include "db/log_reader.h"
-#include "db/log_writer.h"
-#include "db/memtable.h"
-#include "db/memtable_list.h"
-#include "db/merge_context.h"
-#include "db/merge_helper.h"
-#include "db/table_cache.h"
-#include "db/table_properties_collector.h"
-#include "db/tailing_iter.h"
-#include "db/transaction_log_impl.h"
-#include "db/version_set.h"
-#include "db/write_batch_internal.h"
-#include "port/port.h"
-#include "rocksdb/cache.h"
-#include "port/likely.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/status.h"
-#include "rocksdb/table.h"
-#include "table/block.h"
-#include "table/block_based_table_factory.h"
-#include "table/merger.h"
-#include "table/table_builder.h"
-#include "table/two_level_iterator.h"
-#include "util/auto_roll_logger.h"
-#include "util/autovector.h"
-#include "util/build_version.h"
-#include "util/coding.h"
-#include "util/hash_skiplist_rep.h"
-#include "util/hash_linklist_rep.h"
-#include "util/logging.h"
-#include "util/log_buffer.h"
-#include "util/mutexlock.h"
-#include "util/perf_context_imp.h"
-#include "util/stop_watch.h"
-#include "util/sync_point.h"
-
-namespace rocksdb {
-
-const std::string kDefaultColumnFamilyName("default");
-
-void DumpLeveldbBuildVersion(Logger * log);
-
-// Information kept for every waiting writer
-struct DBImpl::Writer {
-  Status status;
-  WriteBatch* batch;
-  bool sync;
-  bool disableWAL;
-  bool done;
-  port::CondVar cv;
-
-  explicit Writer(port::Mutex* mu) : cv(mu) { }
-};
-
-struct DBImpl::CompactionState {
-  Compaction* const compaction;
-
-  // If there were two snapshots with seq numbers s1 and
-  // s2 and s1 < s2, and if we find two instances of a key k1 then lies
-  // entirely within s1 and s2, then the earlier version of k1 can be safely
-  // deleted because that version is not visible in any snapshot.
-  std::vector<SequenceNumber> existing_snapshots;
-
-  // Files produced by compaction
-  struct Output {
-    uint64_t number;
-    uint64_t file_size;
-    InternalKey smallest, largest;
-    SequenceNumber smallest_seqno, largest_seqno;
-  };
-  std::vector<Output> outputs;
-  std::list<uint64_t> allocated_file_numbers;
-
-  // State kept for output being generated
-  unique_ptr<WritableFile> outfile;
-  unique_ptr<TableBuilder> builder;
-
-  uint64_t total_bytes;
-
-  Output* current_output() { return &outputs[outputs.size()-1]; }
-
-  explicit CompactionState(Compaction* c)
-      : compaction(c),
-        total_bytes(0) {
-  }
-
-  // Create a client visible context of this compaction
-  CompactionFilter::Context GetFilterContextV1() {
-    CompactionFilter::Context context;
-    context.is_full_compaction = compaction->IsFullCompaction();
-    context.is_manual_compaction = compaction->IsManualCompaction();
-    return context;
-  }
-
-  // Create a client visible context of this compaction
-  CompactionFilterContext GetFilterContext() {
-    CompactionFilterContext context;
-    context.is_full_compaction = compaction->IsFullCompaction();
-    context.is_manual_compaction = compaction->IsManualCompaction();
-    return context;
-  }
-
-  std::vector<Slice> key_buf_;
-  std::vector<Slice> existing_value_buf_;
-  std::vector<std::string> key_str_buf_;
-  std::vector<std::string> existing_value_str_buf_;
-  // new_value_buf_ will only be appended if a value changes
-  std::vector<std::string> new_value_buf_;
-  // if values_changed_buf_[i] is true
-  // new_value_buf_ will add a new entry with the changed value
-  std::vector<bool> value_changed_buf_;
-  // to_delete_buf_[i] is true iff key_buf_[i] is deleted
-  std::vector<bool> to_delete_buf_;
-  // buffer for the parsed internal keys, the string buffer is backed
-  // by key_str_buf_
-  std::vector<ParsedInternalKey> ikey_buf_;
-
-  std::vector<Slice> other_key_buf_;
-  std::vector<Slice> other_value_buf_;
-  std::vector<std::string> other_key_str_buf_;
-  std::vector<std::string> other_value_str_buf_;
-
-  std::vector<Slice> combined_key_buf_;
-  std::vector<Slice> combined_value_buf_;
-
-  std::string cur_prefix_;
-
-  // Buffers the kv-pair that will be run through compaction filter V2
-  // in the future.
-  void BufferKeyValueSlices(const Slice& key, const Slice& value) {
-    key_str_buf_.emplace_back(key.ToString());
-    existing_value_str_buf_.emplace_back(value.ToString());
-    key_buf_.emplace_back(Slice(key_str_buf_.back()));
-    existing_value_buf_.emplace_back(Slice(existing_value_str_buf_.back()));
-
-    ParsedInternalKey ikey;
-    ParseInternalKey(key_buf_.back(), &ikey);
-    ikey_buf_.emplace_back(ikey);
-  }
-
-  // Buffers the kv-pair that will not be run through compaction filter V2
-  // in the future.
-  void BufferOtherKeyValueSlices(const Slice& key, const Slice& value) {
-    other_key_str_buf_.emplace_back(key.ToString());
-    other_value_str_buf_.emplace_back(value.ToString());
-    other_key_buf_.emplace_back(Slice(other_key_str_buf_.back()));
-    other_value_buf_.emplace_back(Slice(other_value_str_buf_.back()));
-  }
-
-  // Add a kv-pair to the combined buffer
-  void AddToCombinedKeyValueSlices(const Slice& key, const Slice& value) {
-    // The real strings are stored in the batch buffers
-    combined_key_buf_.emplace_back(key);
-    combined_value_buf_.emplace_back(value);
-  }
-
-  // Merging the two buffers
-  void MergeKeyValueSliceBuffer(const InternalKeyComparator* comparator) {
-    size_t i = 0;
-    size_t j = 0;
-    size_t total_size = key_buf_.size() + other_key_buf_.size();
-    combined_key_buf_.reserve(total_size);
-    combined_value_buf_.reserve(total_size);
-
-    while (i + j < total_size) {
-      int comp_res = 0;
-      if (i < key_buf_.size() && j < other_key_buf_.size()) {
-        comp_res = comparator->Compare(key_buf_[i], other_key_buf_[j]);
-      } else if (i >= key_buf_.size() && j < other_key_buf_.size()) {
-        comp_res = 1;
-      } else if (j >= other_key_buf_.size() && i < key_buf_.size()) {
-        comp_res = -1;
-      }
-      if (comp_res > 0) {
-        AddToCombinedKeyValueSlices(other_key_buf_[j], other_value_buf_[j]);
-        j++;
-      } else if (comp_res < 0) {
-        AddToCombinedKeyValueSlices(key_buf_[i], existing_value_buf_[i]);
-        i++;
-      }
-    }
-  }
-
-  void CleanupBatchBuffer() {
-    to_delete_buf_.clear();
-    key_buf_.clear();
-    existing_value_buf_.clear();
-    key_str_buf_.clear();
-    existing_value_str_buf_.clear();
-    new_value_buf_.clear();
-    value_changed_buf_.clear();
-    ikey_buf_.clear();
-
-    to_delete_buf_.shrink_to_fit();
-    key_buf_.shrink_to_fit();
-    existing_value_buf_.shrink_to_fit();
-    key_str_buf_.shrink_to_fit();
-    existing_value_str_buf_.shrink_to_fit();
-    new_value_buf_.shrink_to_fit();
-    value_changed_buf_.shrink_to_fit();
-    ikey_buf_.shrink_to_fit();
-
-    other_key_buf_.clear();
-    other_value_buf_.clear();
-    other_key_str_buf_.clear();
-    other_value_str_buf_.clear();
-    other_key_buf_.shrink_to_fit();
-    other_value_buf_.shrink_to_fit();
-    other_key_str_buf_.shrink_to_fit();
-    other_value_str_buf_.shrink_to_fit();
-  }
-
-  void CleanupMergedBuffer() {
-    combined_key_buf_.clear();
-    combined_value_buf_.clear();
-    combined_key_buf_.shrink_to_fit();
-    combined_value_buf_.shrink_to_fit();
-  }
-};
-
-namespace {
-// Fix user-supplied options to be reasonable
-template <class T, class V>
-static void ClipToRange(T* ptr, V minvalue, V maxvalue) {
-  if (static_cast<V>(*ptr) > maxvalue) *ptr = maxvalue;
-  if (static_cast<V>(*ptr) < minvalue) *ptr = minvalue;
-}
-}  // anonymous namespace
-
-Options SanitizeOptions(const std::string& dbname,
-                        const InternalKeyComparator* icmp,
-                        const InternalFilterPolicy* ipolicy,
-                        const Options& src) {
-  auto db_options = SanitizeOptions(dbname, DBOptions(src));
-  auto cf_options = SanitizeOptions(icmp, ipolicy, ColumnFamilyOptions(src));
-  return Options(db_options, cf_options);
-}
-
-DBOptions SanitizeOptions(const std::string& dbname, const DBOptions& src) {
-  DBOptions result = src;
-  // result.max_open_files means an "infinite" open files.
-  if (result.max_open_files != -1) {
-    ClipToRange(&result.max_open_files, 20, 1000000);
-  }
-
-  if (result.info_log == nullptr) {
-    Status s = CreateLoggerFromOptions(dbname, result.db_log_dir, src.env,
-                                       result, &result.info_log);
-    if (!s.ok()) {
-      // No place suitable for logging
-      result.info_log = nullptr;
-    }
-  }
-
-  if (result.wal_dir.empty()) {
-    // Use dbname as default
-    result.wal_dir = dbname;
-  }
-  if (result.wal_dir.back() == '/') {
-    result.wal_dir = result.wal_dir.substr(0, result.wal_dir.size() - 1);
-  }
-
-  return result;
-}
-
-CompressionType GetCompressionType(const Options& options, int level,
-                                   const bool enable_compression) {
-  if (!enable_compression) {
-    // disable compression
-    return kNoCompression;
-  }
-  // If the use has specified a different compression level for each level,
-  // then pick the compresison for that level.
-  if (!options.compression_per_level.empty()) {
-    const int n = options.compression_per_level.size() - 1;
-    // It is possible for level_ to be -1; in that case, we use level
-    // 0's compression.  This occurs mostly in backwards compatibility
-    // situations when the builder doesn't know what level the file
-    // belongs to.  Likewise, if level_ is beyond the end of the
-    // specified compression levels, use the last value.
-    return options.compression_per_level[std::max(0, std::min(level, n))];
-  } else {
-    return options.compression;
-  }
-}
-
-CompressionType GetCompressionFlush(const Options& options) {
-  // Compressing memtable flushes might not help unless the sequential load
-  // optimization is used for leveled compaction. Otherwise the CPU and
-  // latency overhead is not offset by saving much space.
-
-  bool can_compress;
-
-  if  (options.compaction_style == kCompactionStyleUniversal) {
-    can_compress =
-        (options.compaction_options_universal.compression_size_percent < 0);
-  } else {
-    // For leveled compress when min_level_to_compress == 0.
-    can_compress = (GetCompressionType(options, 0, true) != kNoCompression);
-  }
-
-  if (can_compress) {
-    return options.compression;
-  } else {
-    return kNoCompression;
-  }
-}
-
-DBImpl::DBImpl(const DBOptions& options, const std::string& dbname)
-    : env_(options.env),
-      dbname_(dbname),
-      options_(SanitizeOptions(dbname, options)),
-      db_lock_(nullptr),
-      mutex_(options.use_adaptive_mutex),
-      shutting_down_(nullptr),
-      bg_cv_(&mutex_),
-      logfile_number_(0),
-      log_empty_(true),
-      default_cf_handle_(nullptr),
-      total_log_size_(0),
-      max_total_in_memory_state_(0),
-      tmp_batch_(),
-      bg_schedule_needed_(false),
-      bg_compaction_scheduled_(0),
-      bg_manual_only_(0),
-      bg_flush_scheduled_(0),
-      bg_logstats_scheduled_(false),
-      manual_compaction_(nullptr),
-      logger_(nullptr),
-      disable_delete_obsolete_files_(0),
-      delete_obsolete_files_last_run_(options.env->NowMicros()),
-      purge_wal_files_last_run_(0),
-      last_stats_dump_time_microsec_(0),
-      default_interval_to_delete_obsolete_WAL_(600),
-      flush_on_destroy_(false),
-      delayed_writes_(0),
-      storage_options_(options),
-      bg_work_gate_closed_(false),
-      refitting_level_(false),
-      opened_successfully_(false) {
-  env_->GetAbsolutePath(dbname, &db_absolute_path_);
-
-  // Reserve ten files or so for other uses and give the rest to TableCache.
-  // Give a large number for setting of "infinite" open files.
-  const int table_cache_size =
-      (options_.max_open_files == -1) ? 4194304 : options_.max_open_files - 10;
-  // Reserve ten files or so for other uses and give the rest to TableCache.
-  table_cache_ =
-      NewLRUCache(table_cache_size, options_.table_cache_numshardbits,
-                  options_.table_cache_remove_scan_count_limit);
-
-  versions_.reset(
-      new VersionSet(dbname_, &options_, storage_options_, table_cache_.get()));
-  column_family_memtables_.reset(
-      new ColumnFamilyMemTablesImpl(versions_->GetColumnFamilySet()));
-
-  DumpLeveldbBuildVersion(options_.info_log.get());
-  options_.Dump(options_.info_log.get());
-
-  char name[100];
-  Status s = env_->GetHostName(name, 100L);
-  if (s.ok()) {
-    host_name_ = name;
-  } else {
-    Log(options_.info_log, "Can't get hostname, use localhost as host name.");
-    host_name_ = "localhost";
-  }
-  last_log_ts = 0;
-
-  LogFlush(options_.info_log);
-}
-
-DBImpl::~DBImpl() {
-  mutex_.Lock();
-  if (flush_on_destroy_) {
-    for (auto cfd : *versions_->GetColumnFamilySet()) {
-      if (cfd->mem()->GetFirstSequenceNumber() != 0) {
-        cfd->Ref();
-        mutex_.Unlock();
-        FlushMemTable(cfd, FlushOptions());
-        mutex_.Lock();
-        cfd->Unref();
-      }
-    }
-    versions_->GetColumnFamilySet()->FreeDeadColumnFamilies();
-  }
-
-  // Wait for background work to finish
-  shutting_down_.Release_Store(this);  // Any non-nullptr value is ok
-  while (bg_compaction_scheduled_ ||
-         bg_flush_scheduled_ ||
-         bg_logstats_scheduled_) {
-    bg_cv_.Wait();
-  }
-
-  if (default_cf_handle_ != nullptr) {
-    // we need to delete handle outside of lock because it does its own locking
-    mutex_.Unlock();
-    delete default_cf_handle_;
-    mutex_.Lock();
-  }
-
-  if (options_.allow_thread_local) {
-    // Clean up obsolete files due to SuperVersion release.
-    // (1) Need to delete to obsolete files before closing because RepairDB()
-    // scans all existing files in the file system and builds manifest file.
-    // Keeping obsolete files confuses the repair process.
-    // (2) Need to check if we Open()/Recover() the DB successfully before
-    // deleting because if VersionSet recover fails (may be due to corrupted
-    // manifest file), it is not able to identify live files correctly. As a
-    // result, all "live" files can get deleted by accident. However, corrupted
-    // manifest is recoverable by RepairDB().
-    if (opened_successfully_) {
-      DeletionState deletion_state;
-      FindObsoleteFiles(deletion_state, true);
-      // manifest number starting from 2
-      deletion_state.manifest_file_number = 1;
-      if (deletion_state.HaveSomethingToDelete()) {
-        PurgeObsoleteFiles(deletion_state);
-      }
-    }
-  }
-
-  // versions need to be destroyed before table_cache since it can hold
-  // references to table_cache.
-  versions_.reset();
-  mutex_.Unlock();
-  if (db_lock_ != nullptr) {
-    env_->UnlockFile(db_lock_);
-  }
-
-  LogFlush(options_.info_log);
-}
-
-Status DBImpl::NewDB() {
-  VersionEdit new_db;
-  new_db.SetLogNumber(0);
-  new_db.SetNextFile(2);
-  new_db.SetLastSequence(0);
-
-  const std::string manifest = DescriptorFileName(dbname_, 1);
-  unique_ptr<WritableFile> file;
-  Status s = env_->NewWritableFile(
-      manifest, &file, env_->OptimizeForManifestWrite(storage_options_));
-  if (!s.ok()) {
-    return s;
-  }
-  file->SetPreallocationBlockSize(options_.manifest_preallocation_size);
-  {
-    log::Writer log(std::move(file));
-    std::string record;
-    new_db.EncodeTo(&record);
-    s = log.AddRecord(record);
-  }
-  if (s.ok()) {
-    // Make "CURRENT" file that points to the new manifest file.
-    s = SetCurrentFile(env_, dbname_, 1);
-  } else {
-    env_->DeleteFile(manifest);
-  }
-  return s;
-}
-
-void DBImpl::MaybeIgnoreError(Status* s) const {
-  if (s->ok() || options_.paranoid_checks) {
-    // No change needed
-  } else {
-    Log(options_.info_log, "Ignoring error %s", s->ToString().c_str());
-    *s = Status::OK();
-  }
-}
-
-const Status DBImpl::CreateArchivalDirectory() {
-  if (options_.WAL_ttl_seconds > 0 || options_.WAL_size_limit_MB > 0) {
-    std::string archivalPath = ArchivalDirectory(options_.wal_dir);
-    return env_->CreateDirIfMissing(archivalPath);
-  }
-  return Status::OK();
-}
-
-void DBImpl::PrintStatistics() {
-  auto dbstats = options_.statistics.get();
-  if (dbstats) {
-    Log(options_.info_log,
-        "STATISTCS:\n %s",
-        dbstats->ToString().c_str());
-  }
-}
-
-void DBImpl::MaybeDumpStats() {
-  if (options_.stats_dump_period_sec == 0) return;
-
-  const uint64_t now_micros = env_->NowMicros();
-
-  if (last_stats_dump_time_microsec_ +
-      options_.stats_dump_period_sec * 1000000
-      <= now_micros) {
-    // Multiple threads could race in here simultaneously.
-    // However, the last one will update last_stats_dump_time_microsec_
-    // atomically. We could see more than one dump during one dump
-    // period in rare cases.
-    last_stats_dump_time_microsec_ = now_micros;
-    std::string stats;
-    GetProperty("rocksdb.stats", &stats);
-    Log(options_.info_log, "%s", stats.c_str());
-    PrintStatistics();
-  }
-}
-
-// Returns the list of live files in 'sst_live' and the list
-// of all files in the filesystem in 'candidate_files'.
-// no_full_scan = true -- never do the full scan using GetChildren()
-// force = false -- don't force the full scan, except every
-//  options_.delete_obsolete_files_period_micros
-// force = true -- force the full scan
-void DBImpl::FindObsoleteFiles(DeletionState& deletion_state,
-                               bool force,
-                               bool no_full_scan) {
-  mutex_.AssertHeld();
-
-  // if deletion is disabled, do nothing
-  if (disable_delete_obsolete_files_ > 0) {
-    return;
-  }
-
-  bool doing_the_full_scan = false;
-
-  // logic for figurint out if we're doing the full scan
-  if (no_full_scan) {
-    doing_the_full_scan = false;
-  } else if (force || options_.delete_obsolete_files_period_micros == 0) {
-    doing_the_full_scan = true;
-  } else {
-    const uint64_t now_micros = env_->NowMicros();
-    if (delete_obsolete_files_last_run_ +
-        options_.delete_obsolete_files_period_micros < now_micros) {
-      doing_the_full_scan = true;
-      delete_obsolete_files_last_run_ = now_micros;
-    }
-  }
-
-  // get obsolete files
-  versions_->GetObsoleteFiles(&deletion_state.sst_delete_files);
-
-  // store the current filenum, lognum, etc
-  deletion_state.manifest_file_number = versions_->ManifestFileNumber();
-  deletion_state.pending_manifest_file_number =
-      versions_->PendingManifestFileNumber();
-  deletion_state.log_number = versions_->MinLogNumber();
-  deletion_state.prev_log_number = versions_->PrevLogNumber();
-
-  if (!doing_the_full_scan && !deletion_state.HaveSomethingToDelete()) {
-    // avoid filling up sst_live if we're sure that we
-    // are not going to do the full scan and that we don't have
-    // anything to delete at the moment
-    return;
-  }
-
-  // don't delete live files
-  deletion_state.sst_live.assign(pending_outputs_.begin(),
-                                 pending_outputs_.end());
-  versions_->AddLiveFiles(&deletion_state.sst_live);
-
-  if (doing_the_full_scan) {
-    // set of all files in the directory. We'll exclude files that are still
-    // alive in the subsequent processings.
-    env_->GetChildren(
-        dbname_, &deletion_state.candidate_files
-    ); // Ignore errors
-
-    //Add log files in wal_dir
-    if (options_.wal_dir != dbname_) {
-      std::vector<std::string> log_files;
-      env_->GetChildren(options_.wal_dir, &log_files); // Ignore errors
-      deletion_state.candidate_files.insert(
-        deletion_state.candidate_files.end(),
-        log_files.begin(),
-        log_files.end()
-      );
-    }
-  }
-}
-
-// Diffs the files listed in filenames and those that do not
-// belong to live files are posibly removed. Also, removes all the
-// files in sst_delete_files and log_delete_files.
-// It is not necessary to hold the mutex when invoking this method.
-void DBImpl::PurgeObsoleteFiles(DeletionState& state) {
-  // we'd better have sth to delete
-  assert(state.HaveSomethingToDelete());
-
-  // this checks if FindObsoleteFiles() was run before. If not, don't do
-  // PurgeObsoleteFiles(). If FindObsoleteFiles() was run, we need to also
-  // run PurgeObsoleteFiles(), even if disable_delete_obsolete_files_ is true
-  if (state.manifest_file_number == 0) {
-    return;
-  }
-
-  // Now, convert live list to an unordered set, WITHOUT mutex held;
-  // set is slow.
-  std::unordered_set<uint64_t> sst_live(state.sst_live.begin(),
-                                        state.sst_live.end());
-
-  auto& candidate_files = state.candidate_files;
-  candidate_files.reserve(
-      candidate_files.size() +
-      state.sst_delete_files.size() +
-      state.log_delete_files.size());
-  // We may ignore the dbname when generating the file names.
-  const char* kDumbDbName = "";
-  for (auto file : state.sst_delete_files) {
-    candidate_files.push_back(
-        TableFileName(kDumbDbName, file->number).substr(1)
-    );
-    delete file;
-  }
-
-  for (auto file_num : state.log_delete_files) {
-    if (file_num > 0) {
-      candidate_files.push_back(LogFileName(kDumbDbName, file_num).substr(1));
-    }
-  }
-
-  // dedup state.candidate_files so we don't try to delete the same
-  // file twice
-  sort(candidate_files.begin(), candidate_files.end());
-  candidate_files.erase(unique(candidate_files.begin(), candidate_files.end()),
-                        candidate_files.end());
-
-  std::vector<std::string> old_info_log_files;
-
-  for (const auto& to_delete : candidate_files) {
-    uint64_t number;
-    FileType type;
-    // Ignore file if we cannot recognize it.
-    if (!ParseFileName(to_delete, &number, &type)) {
-      continue;
-    }
-
-    bool keep = true;
-    switch (type) {
-      case kLogFile:
-        keep = ((number >= state.log_number) ||
-                (number == state.prev_log_number));
-        break;
-      case kDescriptorFile:
-        // Keep my manifest file, and any newer incarnations'
-        // (can happen during manifest roll)
-        keep = (number >= state.manifest_file_number);
-        break;
-      case kTableFile:
-        keep = (sst_live.find(number) != sst_live.end());
-        break;
-      case kTempFile:
-        // Any temp files that are currently being written to must
-        // be recorded in pending_outputs_, which is inserted into "live".
-        // Also, SetCurrentFile creates a temp file when writing out new
-        // manifest, which is equal to state.pending_manifest_file_number. We
-        // should not delete that file
-        keep = (sst_live.find(number) != sst_live.end()) ||
-               (number == state.pending_manifest_file_number);
-        break;
-      case kInfoLogFile:
-        keep = true;
-        if (number != 0) {
-          old_info_log_files.push_back(to_delete);
-        }
-        break;
-      case kCurrentFile:
-      case kDBLockFile:
-      case kIdentityFile:
-      case kMetaDatabase:
-        keep = true;
-        break;
-    }
-
-    if (keep) {
-      continue;
-    }
-
-    if (type == kTableFile) {
-      // evict from cache
-      TableCache::Evict(table_cache_.get(), number);
-    }
-
-    std::string fname = ((type == kLogFile) ? options_.wal_dir : dbname_) +
-        "/" + to_delete;
-    if (type == kLogFile &&
-        (options_.WAL_ttl_seconds > 0 || options_.WAL_size_limit_MB > 0)) {
-      auto archived_log_name = ArchivedLogFileName(options_.wal_dir, number);
-      // The sync point below is used in (DBTest,TransactionLogIteratorRace)
-      TEST_SYNC_POINT("DBImpl::PurgeObsoleteFiles:1");
-      Status s = env_->RenameFile(fname, archived_log_name);
-      // The sync point below is used in (DBTest,TransactionLogIteratorRace)
-      TEST_SYNC_POINT("DBImpl::PurgeObsoleteFiles:2");
-      Log(options_.info_log,
-          "Move log file %s to %s -- %s\n",
-          fname.c_str(), archived_log_name.c_str(), s.ToString().c_str());
-    } else {
-      Status s = env_->DeleteFile(fname);
-      Log(options_.info_log, "Delete %s type=%d #%lu -- %s\n",
-          fname.c_str(), type, (unsigned long)number,
-          s.ToString().c_str());
-    }
-  }
-
-  // Delete old info log files.
-  size_t old_info_log_file_count = old_info_log_files.size();
-  // NOTE: Currently we only support log purge when options_.db_log_dir is
-  // located in `dbname` directory.
-  if (old_info_log_file_count >= options_.keep_log_file_num &&
-      options_.db_log_dir.empty()) {
-    std::sort(old_info_log_files.begin(), old_info_log_files.end());
-    size_t end = old_info_log_file_count - options_.keep_log_file_num;
-    for (unsigned int i = 0; i <= end; i++) {
-      std::string& to_delete = old_info_log_files.at(i);
-      Log(options_.info_log, "Delete info log file %s\n", to_delete.c_str());
-      Status s = env_->DeleteFile(dbname_ + "/" + to_delete);
-      if (!s.ok()) {
-        Log(options_.info_log, "Delete info log file %s FAILED -- %s\n",
-            to_delete.c_str(), s.ToString().c_str());
-      }
-    }
-  }
-  PurgeObsoleteWALFiles();
-  LogFlush(options_.info_log);
-}
-
-void DBImpl::DeleteObsoleteFiles() {
-  mutex_.AssertHeld();
-  DeletionState deletion_state;
-  FindObsoleteFiles(deletion_state, true);
-  if (deletion_state.HaveSomethingToDelete()) {
-    PurgeObsoleteFiles(deletion_state);
-  }
-}
-
-#ifndef ROCKSDB_LITE
-// 1. Go through all archived files and
-//    a. if ttl is enabled, delete outdated files
-//    b. if archive size limit is enabled, delete empty files,
-//        compute file number and size.
-// 2. If size limit is enabled:
-//    a. compute how many files should be deleted
-//    b. get sorted non-empty archived logs
-//    c. delete what should be deleted
-void DBImpl::PurgeObsoleteWALFiles() {
-  bool const ttl_enabled = options_.WAL_ttl_seconds > 0;
-  bool const size_limit_enabled =  options_.WAL_size_limit_MB > 0;
-  if (!ttl_enabled && !size_limit_enabled) {
-    return;
-  }
-
-  int64_t current_time;
-  Status s = env_->GetCurrentTime(&current_time);
-  if (!s.ok()) {
-    Log(options_.info_log, "Can't get current time: %s", s.ToString().c_str());
-    assert(false);
-    return;
-  }
-  uint64_t const now_seconds = static_cast<uint64_t>(current_time);
-  uint64_t const time_to_check = (ttl_enabled && !size_limit_enabled) ?
-    options_.WAL_ttl_seconds / 2 : default_interval_to_delete_obsolete_WAL_;
-
-  if (purge_wal_files_last_run_ + time_to_check > now_seconds) {
-    return;
-  }
-
-  purge_wal_files_last_run_ = now_seconds;
-
-  std::string archival_dir = ArchivalDirectory(options_.wal_dir);
-  std::vector<std::string> files;
-  s = env_->GetChildren(archival_dir, &files);
-  if (!s.ok()) {
-    Log(options_.info_log, "Can't get archive files: %s", s.ToString().c_str());
-    assert(false);
-    return;
-  }
-
-  size_t log_files_num = 0;
-  uint64_t log_file_size = 0;
-
-  for (auto& f : files) {
-    uint64_t number;
-    FileType type;
-    if (ParseFileName(f, &number, &type) && type == kLogFile) {
-      std::string const file_path = archival_dir + "/" + f;
-      if (ttl_enabled) {
-        uint64_t file_m_time;
-        Status const s = env_->GetFileModificationTime(file_path,
-          &file_m_time);
-        if (!s.ok()) {
-          Log(options_.info_log, "Can't get file mod time: %s: %s",
-              file_path.c_str(), s.ToString().c_str());
-          continue;
-        }
-        if (now_seconds - file_m_time > options_.WAL_ttl_seconds) {
-          Status const s = env_->DeleteFile(file_path);
-          if (!s.ok()) {
-            Log(options_.info_log, "Can't delete file: %s: %s",
-                file_path.c_str(), s.ToString().c_str());
-            continue;
-          } else {
-            MutexLock l(&read_first_record_cache_mutex_);
-            read_first_record_cache_.erase(number);
-          }
-          continue;
-        }
-      }
-
-      if (size_limit_enabled) {
-        uint64_t file_size;
-        Status const s = env_->GetFileSize(file_path, &file_size);
-        if (!s.ok()) {
-          Log(options_.info_log, "Can't get file size: %s: %s",
-              file_path.c_str(), s.ToString().c_str());
-          return;
-        } else {
-          if (file_size > 0) {
-            log_file_size = std::max(log_file_size, file_size);
-            ++log_files_num;
-          } else {
-            Status s = env_->DeleteFile(file_path);
-            if (!s.ok()) {
-              Log(options_.info_log, "Can't delete file: %s: %s",
-                  file_path.c_str(), s.ToString().c_str());
-              continue;
-            } else {
-              MutexLock l(&read_first_record_cache_mutex_);
-              read_first_record_cache_.erase(number);
-            }
-          }
-        }
-      }
-    }
-  }
-
-  if (0 == log_files_num || !size_limit_enabled) {
-    return;
-  }
-
-  size_t const files_keep_num = options_.WAL_size_limit_MB *
-    1024 * 1024 / log_file_size;
-  if (log_files_num <= files_keep_num) {
-    return;
-  }
-
-  size_t files_del_num = log_files_num - files_keep_num;
-  VectorLogPtr archived_logs;
-  GetSortedWalsOfType(archival_dir, archived_logs, kArchivedLogFile);
-
-  if (files_del_num > archived_logs.size()) {
-    Log(options_.info_log, "Trying to delete more archived log files than "
-        "exist. Deleting all");
-    files_del_num = archived_logs.size();
-  }
-
-  for (size_t i = 0; i < files_del_num; ++i) {
-    std::string const file_path = archived_logs[i]->PathName();
-    Status const s = DeleteFile(file_path);
-    if (!s.ok()) {
-      Log(options_.info_log, "Can't delete file: %s: %s",
-          file_path.c_str(), s.ToString().c_str());
-      continue;
-    } else {
-      MutexLock l(&read_first_record_cache_mutex_);
-      read_first_record_cache_.erase(archived_logs[i]->LogNumber());
-    }
-  }
-}
-
-namespace {
-struct CompareLogByPointer {
-  bool operator()(const unique_ptr<LogFile>& a, const unique_ptr<LogFile>& b) {
-    LogFileImpl* a_impl = dynamic_cast<LogFileImpl*>(a.get());
-    LogFileImpl* b_impl = dynamic_cast<LogFileImpl*>(b.get());
-    return *a_impl < *b_impl;
-  }
-};
-}
-
-Status DBImpl::GetSortedWalsOfType(const std::string& path,
-                                   VectorLogPtr& log_files,
-                                   WalFileType log_type) {
-  std::vector<std::string> all_files;
-  const Status status = env_->GetChildren(path, &all_files);
-  if (!status.ok()) {
-    return status;
-  }
-  log_files.reserve(all_files.size());
-  for (const auto& f : all_files) {
-    uint64_t number;
-    FileType type;
-    if (ParseFileName(f, &number, &type) && type == kLogFile) {
-      SequenceNumber sequence;
-      Status s = ReadFirstRecord(log_type, number, &sequence);
-      if (!s.ok()) {
-        return s;
-      }
-      if (sequence == 0) {
-        // empty file
-        continue;
-      }
-
-      uint64_t size_bytes;
-      s = env_->GetFileSize(LogFileName(path, number), &size_bytes);
-      if (!s.ok()) {
-        return s;
-      }
-
-      log_files.push_back(std::move(unique_ptr<LogFile>(
-          new LogFileImpl(number, log_type, sequence, size_bytes))));
-    }
-  }
-  CompareLogByPointer compare_log_files;
-  std::sort(log_files.begin(), log_files.end(), compare_log_files);
-  return status;
-}
-
-Status DBImpl::RetainProbableWalFiles(VectorLogPtr& all_logs,
-                                      const SequenceNumber target) {
-  int64_t start = 0;  // signed to avoid overflow when target is < first file.
-  int64_t end = static_cast<int64_t>(all_logs.size()) - 1;
-  // Binary Search. avoid opening all files.
-  while (end >= start) {
-    int64_t mid = start + (end - start) / 2;  // Avoid overflow.
-    SequenceNumber current_seq_num = all_logs.at(mid)->StartSequence();
-    if (current_seq_num == target) {
-      end = mid;
-      break;
-    } else if (current_seq_num < target) {
-      start = mid + 1;
-    } else {
-      end = mid - 1;
-    }
-  }
-  // end could be -ve.
-  size_t start_index = std::max(static_cast<int64_t>(0), end);
-  // The last wal file is always included
-  all_logs.erase(all_logs.begin(), all_logs.begin() + start_index);
-  return Status::OK();
-}
-
-Status DBImpl::ReadFirstRecord(const WalFileType type, const uint64_t number,
-                               SequenceNumber* sequence) {
-  if (type != kAliveLogFile && type != kArchivedLogFile) {
-    return Status::NotSupported("File Type Not Known " + std::to_string(type));
-  }
-  {
-    MutexLock l(&read_first_record_cache_mutex_);
-    auto itr = read_first_record_cache_.find(number);
-    if (itr != read_first_record_cache_.end()) {
-      *sequence = itr->second;
-      return Status::OK();
-    }
-  }
-  Status s;
-  if (type == kAliveLogFile) {
-    std::string fname = LogFileName(options_.wal_dir, number);
-    s = ReadFirstLine(fname, sequence);
-    if (env_->FileExists(fname) && !s.ok()) {
-      // return any error that is not caused by non-existing file
-      return s;
-    }
-  }
-
-  if (type == kArchivedLogFile || !s.ok()) {
-    //  check if the file got moved to archive.
-    std::string archived_file = ArchivedLogFileName(options_.wal_dir, number);
-    s = ReadFirstLine(archived_file, sequence);
-  }
-
-  if (s.ok() && *sequence != 0) {
-    MutexLock l(&read_first_record_cache_mutex_);
-    read_first_record_cache_.insert({number, *sequence});
-  }
-  return s;
-}
-
-// the function returns status.ok() and sequence == 0 if the file exists, but is
-// empty
-Status DBImpl::ReadFirstLine(const std::string& fname,
-                             SequenceNumber* sequence) {
-  struct LogReporter : public log::Reader::Reporter {
-    Env* env;
-    Logger* info_log;
-    const char* fname;
-
-    Status* status;
-    bool ignore_error;  // true if options_.paranoid_checks==false
-    virtual void Corruption(size_t bytes, const Status& s) {
-      Log(info_log, "%s%s: dropping %d bytes; %s",
-          (this->ignore_error ? "(ignoring error) " : ""), fname,
-          static_cast<int>(bytes), s.ToString().c_str());
-      if (this->status->ok()) {
-        // only keep the first error
-        *this->status = s;
-      }
-    }
-  };
-
-  unique_ptr<SequentialFile> file;
-  Status status = env_->NewSequentialFile(fname, &file, storage_options_);
-
-  if (!status.ok()) {
-    return status;
-  }
-
-  LogReporter reporter;
-  reporter.env = env_;
-  reporter.info_log = options_.info_log.get();
-  reporter.fname = fname.c_str();
-  reporter.status = &status;
-  reporter.ignore_error = !options_.paranoid_checks;
-  log::Reader reader(std::move(file), &reporter, true /*checksum*/,
-                     0 /*initial_offset*/);
-  std::string scratch;
-  Slice record;
-
-  if (reader.ReadRecord(&record, &scratch) &&
-      (status.ok() || !options_.paranoid_checks)) {
-    if (record.size() < 12) {
-      reporter.Corruption(record.size(),
-                          Status::Corruption("log record too small"));
-      // TODO read record's till the first no corrupt entry?
-    } else {
-      WriteBatch batch;
-      WriteBatchInternal::SetContents(&batch, record);
-      *sequence = WriteBatchInternal::Sequence(&batch);
-      return Status::OK();
-    }
-  }
-
-  // ReadRecord returns false on EOF, which means that the log file is empty. we
-  // return status.ok() in that case and set sequence number to 0
-  *sequence = 0;
-  return status;
-}
-
-#endif  // ROCKSDB_LITE
-
-Status DBImpl::Recover(
-    const std::vector<ColumnFamilyDescriptor>& column_families, bool read_only,
-    bool error_if_log_file_exist) {
-  mutex_.AssertHeld();
-
-  bool is_new_db = false;
-  assert(db_lock_ == nullptr);
-  if (!read_only) {
-    // We call CreateDirIfMissing() as the directory may already exist (if we
-    // are reopening a DB), when this happens we don't want creating the
-    // directory to cause an error. However, we need to check if creating the
-    // directory fails or else we may get an obscure message about the lock
-    // file not existing. One real-world example of this occurring is if
-    // env->CreateDirIfMissing() doesn't create intermediate directories, e.g.
-    // when dbname_ is "dir/db" but when "dir" doesn't exist.
-    Status s = env_->CreateDirIfMissing(dbname_);
-    if (!s.ok()) {
-      return s;
-    }
-
-    s = env_->NewDirectory(dbname_, &db_directory_);
-    if (!s.ok()) {
-      return s;
-    }
-
-    s = env_->LockFile(LockFileName(dbname_), &db_lock_);
-    if (!s.ok()) {
-      return s;
-    }
-
-    if (!env_->FileExists(CurrentFileName(dbname_))) {
-      if (options_.create_if_missing) {
-        // TODO: add merge_operator name check
-        s = NewDB();
-        is_new_db = true;
-        if (!s.ok()) {
-          return s;
-        }
-      } else {
-        return Status::InvalidArgument(
-            dbname_, "does not exist (create_if_missing is false)");
-      }
-    } else {
-      if (options_.error_if_exists) {
-        return Status::InvalidArgument(
-            dbname_, "exists (error_if_exists is true)");
-      }
-    }
-    // Check for the IDENTITY file and create it if not there
-    if (!env_->FileExists(IdentityFileName(dbname_))) {
-      s = SetIdentityFile(env_, dbname_);
-      if (!s.ok()) {
-        return s;
-      }
-    }
-  }
-
-  Status s = versions_->Recover(column_families, read_only);
-  if (options_.paranoid_checks && s.ok()) {
-    s = CheckConsistency();
-  }
-  if (s.ok()) {
-    SequenceNumber max_sequence(0);
-    default_cf_handle_ = new ColumnFamilyHandleImpl(
-        versions_->GetColumnFamilySet()->GetDefault(), this, &mutex_);
-
-    // Recover from all newer log files than the ones named in the
-    // descriptor (new log files may have been added by the previous
-    // incarnation without registering them in the descriptor).
-    //
-    // Note that PrevLogNumber() is no longer used, but we pay
-    // attention to it in case we are recovering a database
-    // produced by an older version of rocksdb.
-    const uint64_t min_log = versions_->MinLogNumber();
-    const uint64_t prev_log = versions_->PrevLogNumber();
-    std::vector<std::string> filenames;
-    s = env_->GetChildren(options_.wal_dir, &filenames);
-    if (!s.ok()) {
-      return s;
-    }
-
-    std::vector<uint64_t> logs;
-    for (size_t i = 0; i < filenames.size(); i++) {
-      uint64_t number;
-      FileType type;
-      if (ParseFileName(filenames[i], &number, &type) && type == kLogFile) {
-        if (is_new_db) {
-          return Status::Corruption(
-              "While creating a new Db, wal_dir contains "
-              "existing log file: ",
-              filenames[i]);
-        } else if ((number >= min_log) || (number == prev_log)) {
-          logs.push_back(number);
-        }
-      }
-    }
-
-    if (logs.size() > 0 && error_if_log_file_exist) {
-      return Status::Corruption(""
-          "The db was opened in readonly mode with error_if_log_file_exist"
-          "flag but a log file already exists");
-    }
-
-    // Recover in the order in which the logs were generated
-    std::sort(logs.begin(), logs.end());
-    for (const auto& log : logs) {
-      // The previous incarnation may not have written any MANIFEST
-      // records after allocating this log number.  So we manually
-      // update the file number allocation counter in VersionSet.
-      versions_->MarkFileNumberUsed(log);
-      s = RecoverLogFile(log, &max_sequence, read_only);
-    }
-    SetTickerCount(options_.statistics.get(), SEQUENCE_NUMBER,
-                   versions_->LastSequence());
-  }
-
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    max_total_in_memory_state_ += cfd->options()->write_buffer_size *
-                                  cfd->options()->max_write_buffer_number;
-  }
-
-  return s;
-}
-
-Status DBImpl::RecoverLogFile(uint64_t log_number, SequenceNumber* max_sequence,
-                              bool read_only) {
-  struct LogReporter : public log::Reader::Reporter {
-    Env* env;
-    Logger* info_log;
-    const char* fname;
-    Status* status;  // nullptr if options_.paranoid_checks==false or
-                     //            options_.skip_log_error_on_recovery==true
-    virtual void Corruption(size_t bytes, const Status& s) {
-      Log(info_log, "%s%s: dropping %d bytes; %s",
-          (this->status == nullptr ? "(ignoring error) " : ""),
-          fname, static_cast<int>(bytes), s.ToString().c_str());
-      if (this->status != nullptr && this->status->ok()) *this->status = s;
-    }
-  };
-
-  mutex_.AssertHeld();
-
-  std::unordered_map<int, VersionEdit> version_edits;
-  // no need to refcount because iteration is under mutex
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    VersionEdit edit;
-    edit.SetColumnFamily(cfd->GetID());
-    version_edits.insert({cfd->GetID(), edit});
-  }
-
-  // Open the log file
-  std::string fname = LogFileName(options_.wal_dir, log_number);
-  unique_ptr<SequentialFile> file;
-  Status status = env_->NewSequentialFile(fname, &file, storage_options_);
-  if (!status.ok()) {
-    MaybeIgnoreError(&status);
-    return status;
-  }
-
-  // Create the log reader.
-  LogReporter reporter;
-  reporter.env = env_;
-  reporter.info_log = options_.info_log.get();
-  reporter.fname = fname.c_str();
-  reporter.status = (options_.paranoid_checks &&
-                     !options_.skip_log_error_on_recovery ? &status : nullptr);
-  // We intentially make log::Reader do checksumming even if
-  // paranoid_checks==false so that corruptions cause entire commits
-  // to be skipped instead of propagating bad information (like overly
-  // large sequence numbers).
-  log::Reader reader(std::move(file), &reporter, true/*checksum*/,
-                     0/*initial_offset*/);
-  Log(options_.info_log, "Recovering log #%lu",
-      (unsigned long) log_number);
-
-  // Read all the records and add to a memtable
-  std::string scratch;
-  Slice record;
-  WriteBatch batch;
-  while (reader.ReadRecord(&record, &scratch)) {
-    if (record.size() < 12) {
-      reporter.Corruption(
-          record.size(), Status::Corruption("log record too small"));
-      continue;
-    }
-    WriteBatchInternal::SetContents(&batch, record);
-
-    status = WriteBatchInternal::InsertInto(
-        &batch, column_family_memtables_.get(), true, log_number);
-
-    MaybeIgnoreError(&status);
-    if (!status.ok()) {
-      return status;
-    }
-    const SequenceNumber last_seq =
-        WriteBatchInternal::Sequence(&batch) +
-        WriteBatchInternal::Count(&batch) - 1;
-    if (last_seq > *max_sequence) {
-      *max_sequence = last_seq;
-    }
-
-    if (!read_only) {
-      // no need to refcount since client still doesn't have access
-      // to the DB and can not drop column families while we iterate
-      for (auto cfd : *versions_->GetColumnFamilySet()) {
-        if (cfd->mem()->ShouldFlush()) {
-          // If this asserts, it means that InsertInto failed in
-          // filtering updates to already-flushed column families
-          assert(cfd->GetLogNumber() <= log_number);
-          auto iter = version_edits.find(cfd->GetID());
-          assert(iter != version_edits.end());
-          VersionEdit* edit = &iter->second;
-          status = WriteLevel0TableForRecovery(cfd, cfd->mem(), edit);
-          // we still want to clear the memtable, even if the recovery failed
-          cfd->CreateNewMemtable();
-          if (!status.ok()) {
-            // Reflect errors immediately so that conditions like full
-            // file-systems cause the DB::Open() to fail.
-            return status;
-          }
-        }
-      }
-    }
-  }
-
-  if (versions_->LastSequence() < *max_sequence) {
-    versions_->SetLastSequence(*max_sequence);
-  }
-
-  if (!read_only) {
-    // no need to refcount since client still doesn't have access
-    // to the DB and can not drop column families while we iterate
-    for (auto cfd : *versions_->GetColumnFamilySet()) {
-      auto iter = version_edits.find(cfd->GetID());
-      assert(iter != version_edits.end());
-      VersionEdit* edit = &iter->second;
-
-      if (cfd->GetLogNumber() > log_number) {
-        // Column family cfd has already flushed the data
-        // from log_number. Memtable has to be empty because
-        // we filter the updates based on log_number
-        // (in WriteBatch::InsertInto)
-        assert(cfd->mem()->GetFirstSequenceNumber() == 0);
-        assert(edit->NumEntries() == 0);
-        continue;
-      }
-
-      // flush the final memtable (if non-empty)
-      if (cfd->mem()->GetFirstSequenceNumber() != 0) {
-        status = WriteLevel0TableForRecovery(cfd, cfd->mem(), edit);
-      }
-      // we still want to clear the memtable, even if the recovery failed
-      cfd->CreateNewMemtable();
-      if (!status.ok()) {
-        return status;
-      }
-
-      // write MANIFEST with update
-      // writing log number in the manifest means that any log file
-      // with number strongly less than (log_number + 1) is already
-      // recovered and should be ignored on next reincarnation.
-      // Since we already recovered log_number, we want all logs
-      // with numbers `<= log_number` (includes this one) to be ignored
-      edit->SetLogNumber(log_number + 1);
-      // we must mark the next log number as used, even though it's
-      // not actually used. that is because VersionSet assumes
-      // VersionSet::next_file_number_ always to be strictly greater than any
-      // log number
-      versions_->MarkFileNumberUsed(log_number + 1);
-      status = versions_->LogAndApply(cfd, edit, &mutex_);
-      if (!status.ok()) {
-        return status;
-      }
-    }
-  }
-
-  return status;
-}
-
-Status DBImpl::WriteLevel0TableForRecovery(ColumnFamilyData* cfd, MemTable* mem,
-                                           VersionEdit* edit) {
-  mutex_.AssertHeld();
-  const uint64_t start_micros = env_->NowMicros();
-  FileMetaData meta;
-  meta.number = versions_->NewFileNumber();
-  pending_outputs_.insert(meta.number);
-  Iterator* iter = mem->NewIterator(ReadOptions(), true);
-  const SequenceNumber newest_snapshot = snapshots_.GetNewest();
-  const SequenceNumber earliest_seqno_in_memtable =
-    mem->GetFirstSequenceNumber();
-  Log(options_.info_log, "[%s] Level-0 table #%lu: started",
-      cfd->GetName().c_str(), (unsigned long)meta.number);
-
-  Status s;
-  {
-    mutex_.Unlock();
-    s = BuildTable(dbname_, env_, *cfd->options(), storage_options_,
-                   cfd->table_cache(), iter, &meta, cfd->internal_comparator(),
-                   newest_snapshot, earliest_seqno_in_memtable,
-                   GetCompressionFlush(*cfd->options()));
-    LogFlush(options_.info_log);
-    mutex_.Lock();
-  }
-
-  Log(options_.info_log, "[%s] Level-0 table #%lu: %lu bytes %s",
-      cfd->GetName().c_str(), (unsigned long)meta.number,
-      (unsigned long)meta.file_size, s.ToString().c_str());
-  delete iter;
-
-  pending_outputs_.erase(meta.number);
-
-  // Note that if file_size is zero, the file has been deleted and
-  // should not be added to the manifest.
-  int level = 0;
-  if (s.ok() && meta.file_size > 0) {
-    edit->AddFile(level, meta.number, meta.file_size,
-                  meta.smallest, meta.largest,
-                  meta.smallest_seqno, meta.largest_seqno);
-  }
-
-  InternalStats::CompactionStats stats;
-  stats.micros = env_->NowMicros() - start_micros;
-  stats.bytes_written = meta.file_size;
-  stats.files_out_levelnp1 = 1;
-  cfd->internal_stats()->AddCompactionStats(level, stats);
-  RecordTick(options_.statistics.get(), COMPACT_WRITE_BYTES, meta.file_size);
-  return s;
-}
-
-Status DBImpl::WriteLevel0Table(ColumnFamilyData* cfd,
-                                autovector<MemTable*>& mems, VersionEdit* edit,
-                                uint64_t* filenumber, LogBuffer* log_buffer) {
-  mutex_.AssertHeld();
-  const uint64_t start_micros = env_->NowMicros();
-  FileMetaData meta;
-  meta.number = versions_->NewFileNumber();
-  *filenumber = meta.number;
-  pending_outputs_.insert(meta.number);
-
-  const SequenceNumber newest_snapshot = snapshots_.GetNewest();
-  const SequenceNumber earliest_seqno_in_memtable =
-    mems[0]->GetFirstSequenceNumber();
-  Version* base = cfd->current();
-  base->Ref();          // it is likely that we do not need this reference
-  Status s;
-  {
-    mutex_.Unlock();
-    log_buffer->FlushBufferToLog();
-    std::vector<Iterator*> memtables;
-    for (MemTable* m : mems) {
-      Log(options_.info_log, "[%s] Flushing memtable with next log file: %lu\n",
-          cfd->GetName().c_str(), (unsigned long)m->GetNextLogNumber());
-      memtables.push_back(m->NewIterator(ReadOptions(), true));
-    }
-    Iterator* iter = NewMergingIterator(&cfd->internal_comparator(),
-                                        &memtables[0], memtables.size());
-    Log(options_.info_log, "[%s] Level-0 flush table #%lu: started",
-        cfd->GetName().c_str(), (unsigned long)meta.number);
-
-    s = BuildTable(dbname_, env_, *cfd->options(), storage_options_,
-                   cfd->table_cache(), iter, &meta, cfd->internal_comparator(),
-                   newest_snapshot, earliest_seqno_in_memtable,
-                   GetCompressionFlush(*cfd->options()));
-    LogFlush(options_.info_log);
-    delete iter;
-    Log(options_.info_log, "[%s] Level-0 flush table #%lu: %lu bytes %s",
-        cfd->GetName().c_str(), (unsigned long)meta.number,
-        (unsigned long)meta.file_size, s.ToString().c_str());
-
-    if (!options_.disableDataSync) {
-      db_directory_->Fsync();
-    }
-    mutex_.Lock();
-  }
-  base->Unref();
-
-  // re-acquire the most current version
-  base = cfd->current();
-
-  // There could be multiple threads writing to its own level-0 file.
-  // The pending_outputs cannot be cleared here, otherwise this newly
-  // created file might not be considered as a live-file by another
-  // compaction thread that is concurrently deleting obselete files.
-  // The pending_outputs can be cleared only after the new version is
-  // committed so that other threads can recognize this file as a
-  // valid one.
-  // pending_outputs_.erase(meta.number);
-
-  // Note that if file_size is zero, the file has been deleted and
-  // should not be added to the manifest.
-  int level = 0;
-  if (s.ok() && meta.file_size > 0) {
-    const Slice min_user_key = meta.smallest.user_key();
-    const Slice max_user_key = meta.largest.user_key();
-    // if we have more than 1 background thread, then we cannot
-    // insert files directly into higher levels because some other
-    // threads could be concurrently producing compacted files for
-    // that key range.
-    if (base != nullptr && options_.max_background_compactions <= 1 &&
-        cfd->options()->compaction_style == kCompactionStyleLevel) {
-      level = base->PickLevelForMemTableOutput(min_user_key, max_user_key);
-    }
-    edit->AddFile(level, meta.number, meta.file_size,
-                  meta.smallest, meta.largest,
-                  meta.smallest_seqno, meta.largest_seqno);
-  }
-
-  InternalStats::CompactionStats stats;
-  stats.micros = env_->NowMicros() - start_micros;
-  stats.bytes_written = meta.file_size;
-  cfd->internal_stats()->AddCompactionStats(level, stats);
-  RecordTick(options_.statistics.get(), COMPACT_WRITE_BYTES, meta.file_size);
-  return s;
-}
-
-Status DBImpl::FlushMemTableToOutputFile(ColumnFamilyData* cfd,
-                                         bool* madeProgress,
-                                         DeletionState& deletion_state,
-                                         LogBuffer* log_buffer) {
-  mutex_.AssertHeld();
-  assert(cfd->imm()->size() != 0);
-  assert(cfd->imm()->IsFlushPending());
-
-  // Save the contents of the earliest memtable as a new Table
-  uint64_t file_number;
-  autovector<MemTable*> mems;
-  cfd->imm()->PickMemtablesToFlush(&mems);
-  if (mems.empty()) {
-    LogToBuffer(log_buffer, "[%s] Nothing in memtable to flush",
-                cfd->GetName().c_str());
-    return Status::OK();
-  }
-
-  // record the logfile_number_ before we release the mutex
-  // entries mems are (implicitly) sorted in ascending order by their created
-  // time. We will use the first memtable's `edit` to keep the meta info for
-  // this flush.
-  MemTable* m = mems[0];
-  VersionEdit* edit = m->GetEdits();
-  edit->SetPrevLogNumber(0);
-  // SetLogNumber(log_num) indicates logs with number smaller than log_num
-  // will no longer be picked up for recovery.
-  edit->SetLogNumber(mems.back()->GetNextLogNumber());
-  edit->SetColumnFamily(cfd->GetID());
-
-  // This will release and re-acquire the mutex.
-  Status s = WriteLevel0Table(cfd, mems, edit, &file_number, log_buffer);
-
-  if (s.ok() && shutting_down_.Acquire_Load() && cfd->IsDropped()) {
-    s = Status::ShutdownInProgress(
-        "Database shutdown or Column family drop during flush");
-  }
-
-  if (!s.ok()) {
-    cfd->imm()->RollbackMemtableFlush(mems, file_number, &pending_outputs_);
-  } else {
-    // Replace immutable memtable with the generated Table
-    s = cfd->imm()->InstallMemtableFlushResults(
-        cfd, mems, versions_.get(), &mutex_, options_.info_log.get(),
-        file_number, pending_outputs_, &deletion_state.memtables_to_free,
-        db_directory_.get(), log_buffer);
-  }
-
-  if (s.ok()) {
-    InstallSuperVersion(cfd, deletion_state);
-    if (madeProgress) {
-      *madeProgress = 1;
-    }
-    Version::LevelSummaryStorage tmp;
-    LogToBuffer(log_buffer, "[%s] Level summary: %s\n", cfd->GetName().c_str(),
-                cfd->current()->LevelSummary(&tmp));
-
-    MaybeScheduleLogDBDeployStats();
-
-    if (disable_delete_obsolete_files_ == 0) {
-      // add to deletion state
-      while (alive_log_files_.size() &&
-             alive_log_files_.begin()->number < versions_->MinLogNumber()) {
-        const auto& earliest = *alive_log_files_.begin();
-        deletion_state.log_delete_files.push_back(earliest.number);
-        total_log_size_ -= earliest.size;
-        alive_log_files_.pop_front();
-      }
-    }
-  }
-
-  if (!s.ok() && !s.IsShutdownInProgress() && options_.paranoid_checks &&
-      bg_error_.ok()) {
-    // if a bad error happened (not ShutdownInProgress) and paranoid_checks is
-    // true, mark DB read-only
-    bg_error_ = s;
-  }
-  return s;
-}
-
-Status DBImpl::CompactRange(ColumnFamilyHandle* column_family,
-                            const Slice* begin, const Slice* end,
-                            bool reduce_level, int target_level) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-
-  Status s = FlushMemTable(cfd, FlushOptions());
-  if (!s.ok()) {
-    LogFlush(options_.info_log);
-    return s;
-  }
-
-  int max_level_with_files = 1;
-  {
-    MutexLock l(&mutex_);
-    Version* base = cfd->current();
-    for (int level = 1; level < cfd->NumberLevels(); level++) {
-      if (base->OverlapInLevel(level, begin, end)) {
-        max_level_with_files = level;
-      }
-    }
-  }
-  for (int level = 0; level <= max_level_with_files; level++) {
-    // in case the compaction is unversal or if we're compacting the
-    // bottom-most level, the output level will be the same as input one
-    if (cfd->options()->compaction_style == kCompactionStyleUniversal ||
-        level == max_level_with_files) {
-      s = RunManualCompaction(cfd, level, level, begin, end);
-    } else {
-      s = RunManualCompaction(cfd, level, level + 1, begin, end);
-    }
-    if (!s.ok()) {
-      LogFlush(options_.info_log);
-      return s;
-    }
-  }
-
-  if (reduce_level) {
-    s = ReFitLevel(cfd, max_level_with_files, target_level);
-  }
-  LogFlush(options_.info_log);
-
-  return s;
-}
-
-// return the same level if it cannot be moved
-int DBImpl::FindMinimumEmptyLevelFitting(ColumnFamilyData* cfd, int level) {
-  mutex_.AssertHeld();
-  Version* current = cfd->current();
-  int minimum_level = level;
-  for (int i = level - 1; i > 0; --i) {
-    // stop if level i is not empty
-    if (current->NumLevelFiles(i) > 0) break;
-    // stop if level i is too small (cannot fit the level files)
-    if (cfd->compaction_picker()->MaxBytesForLevel(i) <
-        current->NumLevelBytes(level)) {
-      break;
-    }
-
-    minimum_level = i;
-  }
-  return minimum_level;
-}
-
-Status DBImpl::ReFitLevel(ColumnFamilyData* cfd, int level, int target_level) {
-  assert(level < cfd->NumberLevels());
-
-  SuperVersion* superversion_to_free = nullptr;
-  SuperVersion* new_superversion = new SuperVersion();
-
-  mutex_.Lock();
-
-  // only allow one thread refitting
-  if (refitting_level_) {
-    mutex_.Unlock();
-    Log(options_.info_log, "ReFitLevel: another thread is refitting");
-    delete new_superversion;
-    return Status::NotSupported("another thread is refitting");
-  }
-  refitting_level_ = true;
-
-  // wait for all background threads to stop
-  bg_work_gate_closed_ = true;
-  while (bg_compaction_scheduled_ > 0 || bg_flush_scheduled_) {
-    Log(options_.info_log,
-        "RefitLevel: waiting for background threads to stop: %d %d",
-        bg_compaction_scheduled_, bg_flush_scheduled_);
-    bg_cv_.Wait();
-  }
-
-  // move to a smaller level
-  int to_level = target_level;
-  if (target_level < 0) {
-    to_level = FindMinimumEmptyLevelFitting(cfd, level);
-  }
-
-  assert(to_level <= level);
-
-  Status status;
-  if (to_level < level) {
-    Log(options_.info_log, "[%s] Before refitting:\n%s", cfd->GetName().c_str(),
-        cfd->current()->DebugString().data());
-
-    VersionEdit edit;
-    edit.SetColumnFamily(cfd->GetID());
-    for (const auto& f : cfd->current()->files_[level]) {
-      edit.DeleteFile(level, f->number);
-      edit.AddFile(to_level, f->number, f->file_size, f->smallest, f->largest,
-                   f->smallest_seqno, f->largest_seqno);
-    }
-    Log(options_.info_log, "[%s] Apply version edit:\n%s",
-        cfd->GetName().c_str(), edit.DebugString().data());
-
-    status = versions_->LogAndApply(cfd, &edit, &mutex_, db_directory_.get());
-    superversion_to_free = cfd->InstallSuperVersion(new_superversion, &mutex_);
-    new_superversion = nullptr;
-
-    Log(options_.info_log, "[%s] LogAndApply: %s\n", cfd->GetName().c_str(),
-        status.ToString().data());
-
-    if (status.ok()) {
-      Log(options_.info_log, "[%s] After refitting:\n%s",
-          cfd->GetName().c_str(), cfd->current()->DebugString().data());
-    }
-  }
-
-  refitting_level_ = false;
-  bg_work_gate_closed_ = false;
-
-  mutex_.Unlock();
-  delete superversion_to_free;
-  delete new_superversion;
-  return status;
-}
-
-int DBImpl::NumberLevels(ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  return cfh->cfd()->NumberLevels();
-}
-
-int DBImpl::MaxMemCompactionLevel(ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  return cfh->cfd()->options()->max_mem_compaction_level;
-}
-
-int DBImpl::Level0StopWriteTrigger(ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  return cfh->cfd()->options()->level0_stop_writes_trigger;
-}
-
-Status DBImpl::Flush(const FlushOptions& options,
-                     ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  return FlushMemTable(cfh->cfd(), options);
-}
-
-SequenceNumber DBImpl::GetLatestSequenceNumber() const {
-  return versions_->LastSequence();
-}
-
-Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
-                                   int output_level, const Slice* begin,
-                                   const Slice* end) {
-  assert(input_level >= 0);
-
-  InternalKey begin_storage, end_storage;
-
-  ManualCompaction manual;
-  manual.cfd = cfd;
-  manual.input_level = input_level;
-  manual.output_level = output_level;
-  manual.done = false;
-  manual.in_progress = false;
-  // For universal compaction, we enforce every manual compaction to compact
-  // all files.
-  if (begin == nullptr ||
-      cfd->options()->compaction_style == kCompactionStyleUniversal) {
-    manual.begin = nullptr;
-  } else {
-    begin_storage = InternalKey(*begin, kMaxSequenceNumber, kValueTypeForSeek);
-    manual.begin = &begin_storage;
-  }
-  if (end == nullptr ||
-      cfd->options()->compaction_style == kCompactionStyleUniversal) {
-    manual.end = nullptr;
-  } else {
-    end_storage = InternalKey(*end, 0, static_cast<ValueType>(0));
-    manual.end = &end_storage;
-  }
-
-  MutexLock l(&mutex_);
-
-  // When a manual compaction arrives, temporarily disable scheduling of
-  // non-manual compactions and wait until the number of scheduled compaction
-  // jobs drops to zero. This is needed to ensure that this manual compaction
-  // can compact any range of keys/files.
-  //
-  // bg_manual_only_ is non-zero when at least one thread is inside
-  // RunManualCompaction(), i.e. during that time no other compaction will
-  // get scheduled (see MaybeScheduleFlushOrCompaction).
-  //
-  // Note that the following loop doesn't stop more that one thread calling
-  // RunManualCompaction() from getting to the second while loop below.
-  // However, only one of them will actually schedule compaction, while
-  // others will wait on a condition variable until it completes.
-
-  ++bg_manual_only_;
-  while (bg_compaction_scheduled_ > 0) {
-    Log(options_.info_log,
-        "[%s] Manual compaction waiting for all other scheduled background "
-        "compactions to finish",
-        cfd->GetName().c_str());
-    bg_cv_.Wait();
-  }
-
-  Log(options_.info_log, "[%s] Manual compaction starting",
-      cfd->GetName().c_str());
-
-  while (!manual.done && !shutting_down_.Acquire_Load() && bg_error_.ok()) {
-    assert(bg_manual_only_ > 0);
-    if (manual_compaction_ != nullptr) {
-      // Running either this or some other manual compaction
-      bg_cv_.Wait();
-    } else {
-      manual_compaction_ = &manual;
-      MaybeScheduleFlushOrCompaction();
-    }
-  }
-
-  assert(!manual.in_progress);
-  assert(bg_manual_only_ > 0);
-  --bg_manual_only_;
-  return manual.status;
-}
-
-Status DBImpl::FlushMemTable(ColumnFamilyData* cfd,
-                             const FlushOptions& options) {
-  // nullptr batch means just wait for earlier writes to be done
-  Status s = Write(WriteOptions(), nullptr);
-  if (s.ok() && options.wait) {
-    // Wait until the compaction completes
-    s = WaitForFlushMemTable(cfd);
-  }
-  return s;
-}
-
-Status DBImpl::WaitForFlushMemTable(ColumnFamilyData* cfd) {
-  Status s;
-  // Wait until the compaction completes
-  MutexLock l(&mutex_);
-  while (cfd->imm()->size() > 0 && bg_error_.ok()) {
-    bg_cv_.Wait();
-  }
-  if (!bg_error_.ok()) {
-    s = bg_error_;
-  }
-  return s;
-}
-
-void DBImpl::MaybeScheduleFlushOrCompaction() {
-  mutex_.AssertHeld();
-  bg_schedule_needed_ = false;
-  if (bg_work_gate_closed_) {
-    // gate closed for backgrond work
-  } else if (shutting_down_.Acquire_Load()) {
-    // DB is being deleted; no more background compactions
-  } else {
-    bool is_flush_pending = false;
-    // no need to refcount since we're under a mutex
-    for (auto cfd : *versions_->GetColumnFamilySet()) {
-      if (cfd->imm()->IsFlushPending()) {
-        is_flush_pending = true;
-      }
-    }
-    if (is_flush_pending) {
-      // memtable flush needed
-      if (bg_flush_scheduled_ < options_.max_background_flushes) {
-        bg_flush_scheduled_++;
-        env_->Schedule(&DBImpl::BGWorkFlush, this, Env::Priority::HIGH);
-      } else if (options_.max_background_flushes > 0) {
-        bg_schedule_needed_ = true;
-      }
-    }
-    bool is_compaction_needed = false;
-    // no need to refcount since we're under a mutex
-    for (auto cfd : *versions_->GetColumnFamilySet()) {
-      if (cfd->current()->NeedsCompaction()) {
-        is_compaction_needed = true;
-        break;
-      }
-    }
-
-    // Schedule BGWorkCompaction if there's a compaction pending (or a memtable
-    // flush, but the HIGH pool is not enabled)
-    // Do it only if max_background_compactions hasn't been reached and, in case
-    // bg_manual_only_ > 0, if it's a manual compaction.
-    if ((manual_compaction_ || is_compaction_needed ||
-         (is_flush_pending && options_.max_background_flushes == 0)) &&
-        (!bg_manual_only_ || manual_compaction_)) {
-      if (bg_compaction_scheduled_ < options_.max_background_compactions) {
-        bg_compaction_scheduled_++;
-        env_->Schedule(&DBImpl::BGWorkCompaction, this, Env::Priority::LOW);
-      } else {
-        bg_schedule_needed_ = true;
-      }
-    }
-  }
-}
-
-void DBImpl::BGWorkFlush(void* db) {
-  reinterpret_cast<DBImpl*>(db)->BackgroundCallFlush();
-}
-
-void DBImpl::BGWorkCompaction(void* db) {
-  reinterpret_cast<DBImpl*>(db)->BackgroundCallCompaction();
-}
-
-Status DBImpl::BackgroundFlush(bool* madeProgress,
-                               DeletionState& deletion_state,
-                               LogBuffer* log_buffer) {
-  mutex_.AssertHeld();
-  // call_status is failure if at least one flush was a failure. even if
-  // flushing one column family reports a failure, we will continue flushing
-  // other column families. however, call_status will be a failure in that case.
-  Status call_status;
-  // refcounting in iteration
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    cfd->Ref();
-    Status flush_status;
-    while (flush_status.ok() && cfd->imm()->IsFlushPending()) {
-      LogToBuffer(
-          log_buffer,
-          "BackgroundCallFlush doing FlushMemTableToOutputFile with column "
-          "family [%s], flush slots available %d",
-          cfd->GetName().c_str(),
-          options_.max_background_flushes - bg_flush_scheduled_);
-      flush_status = FlushMemTableToOutputFile(cfd, madeProgress,
-                                               deletion_state, log_buffer);
-    }
-    if (call_status.ok() && !flush_status.ok()) {
-      call_status = flush_status;
-    }
-    cfd->Unref();
-  }
-  versions_->GetColumnFamilySet()->FreeDeadColumnFamilies();
-  return call_status;
-}
-
-void DBImpl::BackgroundCallFlush() {
-  bool madeProgress = false;
-  DeletionState deletion_state(true);
-  assert(bg_flush_scheduled_);
-
-  LogBuffer log_buffer(InfoLogLevel::INFO_LEVEL, options_.info_log.get());
-  {
-    MutexLock l(&mutex_);
-
-    Status s;
-    if (!shutting_down_.Acquire_Load()) {
-      s = BackgroundFlush(&madeProgress, deletion_state, &log_buffer);
-      if (!s.ok()) {
-        // Wait a little bit before retrying background compaction in
-        // case this is an environmental problem and we do not want to
-        // chew up resources for failed compactions for the duration of
-        // the problem.
-        uint64_t error_cnt = default_cf_handle_->cfd()
-                                 ->internal_stats()
-                                 ->BumpAndGetBackgroundErrorCount();
-        bg_cv_.SignalAll();  // In case a waiter can proceed despite the error
-        mutex_.Unlock();
-        Log(options_.info_log,
-            "Waiting after background flush error: %s"
-            "Accumulated background error counts: %" PRIu64,
-            s.ToString().c_str(), error_cnt);
-        log_buffer.FlushBufferToLog();
-        LogFlush(options_.info_log);
-        env_->SleepForMicroseconds(1000000);
-        mutex_.Lock();
-      }
-    }
-
-    // If !s.ok(), this means that Flush failed. In that case, we want
-    // to delete all obsolete files and we force FindObsoleteFiles()
-    FindObsoleteFiles(deletion_state, !s.ok());
-    // delete unnecessary files if any, this is done outside the mutex
-    if (deletion_state.HaveSomethingToDelete() || !log_buffer.IsEmpty()) {
-      mutex_.Unlock();
-      // Have to flush the info logs before bg_flush_scheduled_--
-      // because if bg_flush_scheduled_ becomes 0 and the lock is
-      // released, the deconstructor of DB can kick in and destroy all the
-      // states of DB so info_log might not be available after that point.
-      // It also applies to access other states that DB owns.
-      log_buffer.FlushBufferToLog();
-      if (deletion_state.HaveSomethingToDelete()) {
-        PurgeObsoleteFiles(deletion_state);
-      }
-      mutex_.Lock();
-    }
-
-    bg_flush_scheduled_--;
-    // Any time the mutex is released After finding the work to do, another
-    // thread might execute MaybeScheduleFlushOrCompaction(). It is possible
-    // that there is a pending job but it is not scheduled because of the
-    // max thread limit.
-    if (madeProgress || bg_schedule_needed_) {
-      MaybeScheduleFlushOrCompaction();
-    }
-    bg_cv_.SignalAll();
-    // IMPORTANT: there should be no code after calling SignalAll. This call may
-    // signal the DB destructor that it's OK to proceed with destruction. In
-    // that case, all DB variables will be dealloacated and referencing them
-    // will cause trouble.
-  }
-}
-
-void DBImpl::BackgroundCallCompaction() {
-  bool madeProgress = false;
-  DeletionState deletion_state(true);
-
-  MaybeDumpStats();
-  LogBuffer log_buffer(InfoLogLevel::INFO_LEVEL, options_.info_log.get());
-  {
-    MutexLock l(&mutex_);
-    assert(bg_compaction_scheduled_);
-    Status s;
-    if (!shutting_down_.Acquire_Load()) {
-      s = BackgroundCompaction(&madeProgress, deletion_state, &log_buffer);
-      if (!s.ok()) {
-        // Wait a little bit before retrying background compaction in
-        // case this is an environmental problem and we do not want to
-        // chew up resources for failed compactions for the duration of
-        // the problem.
-        uint64_t error_cnt = default_cf_handle_->cfd()
-                                 ->internal_stats()
-                                 ->BumpAndGetBackgroundErrorCount();
-        bg_cv_.SignalAll();  // In case a waiter can proceed despite the error
-        mutex_.Unlock();
-        log_buffer.FlushBufferToLog();
-        Log(options_.info_log,
-            "Waiting after background compaction error: %s, "
-            "Accumulated background error counts: %" PRIu64,
-            s.ToString().c_str(), error_cnt);
-        LogFlush(options_.info_log);
-        env_->SleepForMicroseconds(1000000);
-        mutex_.Lock();
-      }
-    }
-
-    // If !s.ok(), this means that Compaction failed. In that case, we want
-    // to delete all obsolete files we might have created and we force
-    // FindObsoleteFiles(). This is because deletion_state does not catch
-    // all created files if compaction failed.
-    FindObsoleteFiles(deletion_state, !s.ok());
-
-    // delete unnecessary files if any, this is done outside the mutex
-    if (deletion_state.HaveSomethingToDelete() || !log_buffer.IsEmpty()) {
-      mutex_.Unlock();
-      // Have to flush the info logs before bg_compaction_scheduled_--
-      // because if bg_flush_scheduled_ becomes 0 and the lock is
-      // released, the deconstructor of DB can kick in and destroy all the
-      // states of DB so info_log might not be available after that point.
-      // It also applies to access other states that DB owns.
-      log_buffer.FlushBufferToLog();
-      if (deletion_state.HaveSomethingToDelete()) {
-        PurgeObsoleteFiles(deletion_state);
-      }
-      mutex_.Lock();
-    }
-
-    bg_compaction_scheduled_--;
-
-    MaybeScheduleLogDBDeployStats();
-
-    versions_->GetColumnFamilySet()->FreeDeadColumnFamilies();
-
-    // Previous compaction may have produced too many files in a level,
-    // So reschedule another compaction if we made progress in the
-    // last compaction.
-    //
-    // Also, any time the mutex is released After finding the work to do,
-    // another thread might execute MaybeScheduleFlushOrCompaction(). It is
-    // possible  that there is a pending job but it is not scheduled because of
-    // the max thread limit.
-    if (madeProgress || bg_schedule_needed_) {
-      MaybeScheduleFlushOrCompaction();
-    }
-    bg_cv_.SignalAll();
-    // IMPORTANT: there should be no code after calling SignalAll. This call may
-    // signal the DB destructor that it's OK to proceed with destruction. In
-    // that case, all DB variables will be dealloacated and referencing them
-    // will cause trouble.
-  }
-}
-
-Status DBImpl::BackgroundCompaction(bool* madeProgress,
-                                    DeletionState& deletion_state,
-                                    LogBuffer* log_buffer) {
-  *madeProgress = false;
-  mutex_.AssertHeld();
-
-  bool is_manual = (manual_compaction_ != nullptr) &&
-                   (manual_compaction_->in_progress == false);
-
-  if (is_manual) {
-    // another thread cannot pick up the same work
-    manual_compaction_->in_progress = true;
-  }
-
-  // FLUSH preempts compaction
-  Status flush_stat;
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    while (cfd->imm()->IsFlushPending()) {
-      LogToBuffer(
-          log_buffer,
-          "BackgroundCompaction doing FlushMemTableToOutputFile, "
-          "compaction slots available %d",
-          options_.max_background_compactions - bg_compaction_scheduled_);
-      cfd->Ref();
-      flush_stat = FlushMemTableToOutputFile(cfd, madeProgress, deletion_state,
-                                             log_buffer);
-      cfd->Unref();
-      if (!flush_stat.ok()) {
-        if (is_manual) {
-          manual_compaction_->status = flush_stat;
-          manual_compaction_->done = true;
-          manual_compaction_->in_progress = false;
-          manual_compaction_ = nullptr;
-        }
-        return flush_stat;
-      }
-    }
-  }
-
-  unique_ptr<Compaction> c;
-  InternalKey manual_end_storage;
-  InternalKey* manual_end = &manual_end_storage;
-  if (is_manual) {
-    ManualCompaction* m = manual_compaction_;
-    assert(m->in_progress);
-    c.reset(m->cfd->CompactRange(m->input_level, m->output_level, m->begin,
-                                 m->end, &manual_end));
-    if (!c) {
-      m->done = true;
-    }
-    LogToBuffer(log_buffer,
-                "[%s] Manual compaction from level-%d to level-%d from %s .. "
-                "%s; will stop at %s\n",
-                m->cfd->GetName().c_str(), m->input_level, m->output_level,
-                (m->begin ? m->begin->DebugString().c_str() : "(begin)"),
-                (m->end ? m->end->DebugString().c_str() : "(end)"),
-                ((m->done || manual_end == nullptr)
-                     ? "(end)"
-                     : manual_end->DebugString().c_str()));
-  } else {
-    // no need to refcount in iteration since it's always under a mutex
-    for (auto cfd : *versions_->GetColumnFamilySet()) {
-      if (!cfd->options()->disable_auto_compactions) {
-        c.reset(cfd->PickCompaction(log_buffer));
-        if (c != nullptr) {
-          // update statistics
-          MeasureTime(options_.statistics.get(), NUM_FILES_IN_SINGLE_COMPACTION,
-                      c->inputs(0)->size());
-          break;
-        }
-      }
-    }
-  }
-
-  Status status;
-  if (!c) {
-    // Nothing to do
-    LogToBuffer(log_buffer, "Compaction nothing to do");
-  } else if (!is_manual && c->IsTrivialMove()) {
-    // Move file to next level
-    assert(c->num_input_files(0) == 1);
-    FileMetaData* f = c->input(0, 0);
-    c->edit()->DeleteFile(c->level(), f->number);
-    c->edit()->AddFile(c->level() + 1, f->number, f->file_size,
-                       f->smallest, f->largest,
-                       f->smallest_seqno, f->largest_seqno);
-    status = versions_->LogAndApply(c->column_family_data(), c->edit(), &mutex_,
-                                    db_directory_.get());
-    InstallSuperVersion(c->column_family_data(), deletion_state);
-
-    Version::LevelSummaryStorage tmp;
-    LogToBuffer(log_buffer, "[%s] Moved #%lld to level-%d %lld bytes %s: %s\n",
-                c->column_family_data()->GetName().c_str(),
-                static_cast<unsigned long long>(f->number), c->level() + 1,
-                static_cast<unsigned long long>(f->file_size),
-                status.ToString().c_str(),
-                c->input_version()->LevelSummary(&tmp));
-    c->ReleaseCompactionFiles(status);
-    *madeProgress = true;
-  } else {
-    MaybeScheduleFlushOrCompaction(); // do more compaction work in parallel.
-    CompactionState* compact = new CompactionState(c.get());
-    status = DoCompactionWork(compact, deletion_state, log_buffer);
-    CleanupCompaction(compact, status);
-    c->ReleaseCompactionFiles(status);
-    c->ReleaseInputs();
-    *madeProgress = true;
-  }
-  c.reset();
-
-  if (status.ok()) {
-    // Done
-  } else if (shutting_down_.Acquire_Load()) {
-    // Ignore compaction errors found during shutting down
-  } else {
-    Log(InfoLogLevel::WARN_LEVEL, options_.info_log, "Compaction error: %s",
-        status.ToString().c_str());
-    if (options_.paranoid_checks && bg_error_.ok()) {
-      bg_error_ = status;
-    }
-  }
-
-  if (is_manual) {
-    ManualCompaction* m = manual_compaction_;
-    if (!status.ok()) {
-      m->status = status;
-      m->done = true;
-    }
-    // For universal compaction:
-    //   Because universal compaction always happens at level 0, so one
-    //   compaction will pick up all overlapped files. No files will be
-    //   filtered out due to size limit and left for a successive compaction.
-    //   So we can safely conclude the current compaction.
-    //
-    //   Also note that, if we don't stop here, then the current compaction
-    //   writes a new file back to level 0, which will be used in successive
-    //   compaction. Hence the manual compaction will never finish.
-    //
-    // Stop the compaction if manual_end points to nullptr -- this means
-    // that we compacted the whole range. manual_end should always point
-    // to nullptr in case of universal compaction
-    if (manual_end == nullptr) {
-      m->done = true;
-    }
-    if (!m->done) {
-      // We only compacted part of the requested range.  Update *m
-      // to the range that is left to be compacted.
-      // Universal compaction should always compact the whole range
-      assert(m->cfd->options()->compaction_style != kCompactionStyleUniversal);
-      m->tmp_storage = *manual_end;
-      m->begin = &m->tmp_storage;
-    }
-    m->in_progress = false; // not being processed anymore
-    manual_compaction_ = nullptr;
-  }
-  return status;
-}
-
-void DBImpl::CleanupCompaction(CompactionState* compact, Status status) {
-  mutex_.AssertHeld();
-  if (compact->builder != nullptr) {
-    // May happen if we get a shutdown call in the middle of compaction
-    compact->builder->Abandon();
-    compact->builder.reset();
-  } else {
-    assert(compact->outfile == nullptr);
-  }
-  for (size_t i = 0; i < compact->outputs.size(); i++) {
-    const CompactionState::Output& out = compact->outputs[i];
-    pending_outputs_.erase(out.number);
-
-    // If this file was inserted into the table cache then remove
-    // them here because this compaction was not committed.
-    if (!status.ok()) {
-      TableCache::Evict(table_cache_.get(), out.number);
-    }
-  }
-  delete compact;
-}
-
-// Allocate the file numbers for the output file. We allocate as
-// many output file numbers as there are files in level+1 (at least one)
-// Insert them into pending_outputs so that they do not get deleted.
-void DBImpl::AllocateCompactionOutputFileNumbers(CompactionState* compact) {
-  mutex_.AssertHeld();
-  assert(compact != nullptr);
-  assert(compact->builder == nullptr);
-  int filesNeeded = compact->compaction->num_input_files(1);
-  for (int i = 0; i < std::max(filesNeeded, 1); i++) {
-    uint64_t file_number = versions_->NewFileNumber();
-    pending_outputs_.insert(file_number);
-    compact->allocated_file_numbers.push_back(file_number);
-  }
-}
-
-// Frees up unused file number.
-void DBImpl::ReleaseCompactionUnusedFileNumbers(CompactionState* compact) {
-  mutex_.AssertHeld();
-  for (const auto file_number : compact->allocated_file_numbers) {
-    pending_outputs_.erase(file_number);
-  }
-}
-
-Status DBImpl::OpenCompactionOutputFile(CompactionState* compact) {
-  assert(compact != nullptr);
-  assert(compact->builder == nullptr);
-  uint64_t file_number;
-  // If we have not yet exhausted the pre-allocated file numbers,
-  // then use the one from the front. Otherwise, we have to acquire
-  // the heavyweight lock and allocate a new file number.
-  if (!compact->allocated_file_numbers.empty()) {
-    file_number = compact->allocated_file_numbers.front();
-    compact->allocated_file_numbers.pop_front();
-  } else {
-    mutex_.Lock();
-    file_number = versions_->NewFileNumber();
-    pending_outputs_.insert(file_number);
-    mutex_.Unlock();
-  }
-  CompactionState::Output out;
-  out.number = file_number;
-  out.smallest.Clear();
-  out.largest.Clear();
-  out.smallest_seqno = out.largest_seqno = 0;
-  compact->outputs.push_back(out);
-
-  // Make the output file
-  std::string fname = TableFileName(dbname_, file_number);
-  Status s = env_->NewWritableFile(fname, &compact->outfile, storage_options_);
-
-  if (s.ok()) {
-    // Over-estimate slightly so we don't end up just barely crossing
-    // the threshold.
-    ColumnFamilyData* cfd = compact->compaction->column_family_data();
-    compact->outfile->SetPreallocationBlockSize(
-        1.1 * cfd->compaction_picker()->MaxFileSizeForLevel(
-                  compact->compaction->output_level()));
-
-    CompressionType compression_type =
-        GetCompressionType(*cfd->options(), compact->compaction->output_level(),
-                           compact->compaction->enable_compression());
-
-    compact->builder.reset(
-        NewTableBuilder(*cfd->options(), cfd->internal_comparator(),
-                        compact->outfile.get(), compression_type));
-  }
-  LogFlush(options_.info_log);
-  return s;
-}
-
-Status DBImpl::FinishCompactionOutputFile(CompactionState* compact,
-                                          Iterator* input) {
-  assert(compact != nullptr);
-  assert(compact->outfile);
-  assert(compact->builder != nullptr);
-
-  const uint64_t output_number = compact->current_output()->number;
-  assert(output_number != 0);
-
-  // Check for iterator errors
-  Status s = input->status();
-  const uint64_t current_entries = compact->builder->NumEntries();
-  if (s.ok()) {
-    s = compact->builder->Finish();
-  } else {
-    compact->builder->Abandon();
-  }
-  const uint64_t current_bytes = compact->builder->FileSize();
-  compact->current_output()->file_size = current_bytes;
-  compact->total_bytes += current_bytes;
-  compact->builder.reset();
-
-  // Finish and check for file errors
-  if (s.ok() && !options_.disableDataSync) {
-    if (options_.use_fsync) {
-      StopWatch sw(env_, options_.statistics.get(),
-                   COMPACTION_OUTFILE_SYNC_MICROS, false);
-      s = compact->outfile->Fsync();
-    } else {
-      StopWatch sw(env_, options_.statistics.get(),
-                   COMPACTION_OUTFILE_SYNC_MICROS, false);
-      s = compact->outfile->Sync();
-    }
-  }
-  if (s.ok()) {
-    s = compact->outfile->Close();
-  }
-  compact->outfile.reset();
-
-  if (s.ok() && current_entries > 0) {
-    // Verify that the table is usable
-    ColumnFamilyData* cfd = compact->compaction->column_family_data();
-    FileMetaData meta(output_number, current_bytes);
-    Iterator* iter = cfd->table_cache()->NewIterator(
-        ReadOptions(), storage_options_, cfd->internal_comparator(), meta);
-    s = iter->status();
-    delete iter;
-    if (s.ok()) {
-      Log(options_.info_log, "[%s] Generated table #%lu: %lu keys, %lu bytes",
-          cfd->GetName().c_str(), (unsigned long)output_number,
-          (unsigned long)current_entries, (unsigned long)current_bytes);
-    }
-  }
-  return s;
-}
-
-
-Status DBImpl::InstallCompactionResults(CompactionState* compact,
-                                        LogBuffer* log_buffer) {
-  mutex_.AssertHeld();
-
-  // paranoia: verify that the files that we started with
-  // still exist in the current version and in the same original level.
-  // This ensures that a concurrent compaction did not erroneously
-  // pick the same files to compact.
-  if (!versions_->VerifyCompactionFileConsistency(compact->compaction)) {
-    Log(options_.info_log, "[%s] Compaction %d@%d + %d@%d files aborted",
-        compact->compaction->column_family_data()->GetName().c_str(),
-        compact->compaction->num_input_files(0), compact->compaction->level(),
-        compact->compaction->num_input_files(1),
-        compact->compaction->output_level());
-    return Status::Corruption("Compaction input files inconsistent");
-  }
-
-  LogToBuffer(log_buffer, "[%s] Compacted %d@%d + %d@%d files => %lld bytes",
-              compact->compaction->column_family_data()->GetName().c_str(),
-              compact->compaction->num_input_files(0),
-              compact->compaction->level(),
-              compact->compaction->num_input_files(1),
-              compact->compaction->output_level(),
-              static_cast<long long>(compact->total_bytes));
-
-  // Add compaction outputs
-  compact->compaction->AddInputDeletions(compact->compaction->edit());
-  for (size_t i = 0; i < compact->outputs.size(); i++) {
-    const CompactionState::Output& out = compact->outputs[i];
-    compact->compaction->edit()->AddFile(
-        compact->compaction->output_level(), out.number, out.file_size,
-        out.smallest, out.largest, out.smallest_seqno, out.largest_seqno);
-  }
-  return versions_->LogAndApply(compact->compaction->column_family_data(),
-                                compact->compaction->edit(), &mutex_,
-                                db_directory_.get());
-}
-
-// Given a sequence number, return the sequence number of the
-// earliest snapshot that this sequence number is visible in.
-// The snapshots themselves are arranged in ascending order of
-// sequence numbers.
-// Employ a sequential search because the total number of
-// snapshots are typically small.
-inline SequenceNumber DBImpl::findEarliestVisibleSnapshot(
-  SequenceNumber in, std::vector<SequenceNumber>& snapshots,
-  SequenceNumber* prev_snapshot) {
-  if (!IsSnapshotSupported()) {
-    return 0;
-  }
-  SequenceNumber prev __attribute__((unused)) = 0;
-  for (const auto cur : snapshots) {
-    assert(prev <= cur);
-    if (cur >= in) {
-      *prev_snapshot = prev;
-      return cur;
-    }
-    prev = cur; // assignment
-    assert(prev);
-  }
-  Log(options_.info_log,
-      "Looking for seqid %lu but maxseqid is %lu",
-      (unsigned long)in,
-      (unsigned long)snapshots[snapshots.size()-1]);
-  assert(0);
-  return 0;
-}
-
-uint64_t DBImpl::CallFlushDuringCompaction(ColumnFamilyData* cfd,
-                                           DeletionState& deletion_state,
-                                           LogBuffer* log_buffer) {
-  if (cfd->imm()->imm_flush_needed.NoBarrier_Load() != nullptr) {
-    const uint64_t imm_start = env_->NowMicros();
-    mutex_.Lock();
-    if (cfd->imm()->IsFlushPending()) {
-      cfd->Ref();
-      FlushMemTableToOutputFile(cfd, nullptr, deletion_state, log_buffer);
-      cfd->Unref();
-      bg_cv_.SignalAll();  // Wakeup MakeRoomForWrite() if necessary
-    }
-    mutex_.Unlock();
-    log_buffer->FlushBufferToLog();
-    return env_->NowMicros() - imm_start;
-  }
-  return 0;
-}
-
-Status DBImpl::ProcessKeyValueCompaction(
-    SequenceNumber visible_at_tip,
-    SequenceNumber earliest_snapshot,
-    SequenceNumber latest_snapshot,
-    DeletionState& deletion_state,
-    bool bottommost_level,
-    int64_t& imm_micros,
-    Iterator* input,
-    CompactionState* compact,
-    bool is_compaction_v2,
-    LogBuffer* log_buffer) {
-  size_t combined_idx = 0;
-  Status status;
-  std::string compaction_filter_value;
-  ParsedInternalKey ikey;
-  IterKey current_user_key;
-  bool has_current_user_key = false;
-  IterKey delete_key;
-  SequenceNumber last_sequence_for_key __attribute__((unused)) =
-    kMaxSequenceNumber;
-  SequenceNumber visible_in_snapshot = kMaxSequenceNumber;
-  ColumnFamilyData* cfd = compact->compaction->column_family_data();
-  MergeHelper merge(
-      cfd->user_comparator(), cfd->options()->merge_operator.get(),
-      options_.info_log.get(), cfd->options()->min_partial_merge_operands,
-      false /* internal key corruption is expected */);
-  auto compaction_filter = cfd->options()->compaction_filter;
-  std::unique_ptr<CompactionFilter> compaction_filter_from_factory = nullptr;
-  if (!compaction_filter) {
-    auto context = compact->GetFilterContextV1();
-    compaction_filter_from_factory =
-        cfd->options()->compaction_filter_factory->CreateCompactionFilter(
-            context);
-    compaction_filter = compaction_filter_from_factory.get();
-  }
-
-  while (input->Valid() && !shutting_down_.Acquire_Load() &&
-         !cfd->IsDropped()) {
-    // FLUSH preempts compaction
-    // TODO(icanadi) this currently only checks if flush is necessary on
-    // compacting column family. we should also check if flush is necessary on
-    // other column families, too
-    imm_micros += CallFlushDuringCompaction(cfd, deletion_state, log_buffer);
-
-    Slice key;
-    Slice value;
-    // If is_compaction_v2 is on, kv-pairs are reset to the prefix batch.
-    // This prefix batch should contain results after calling
-    // compaction_filter_v2.
-    //
-    // If is_compaction_v2 is off, this function will go through all the
-    // kv-pairs in input.
-    if (!is_compaction_v2) {
-      key = input->key();
-      value = input->value();
-    } else {
-      if (combined_idx >= compact->combined_key_buf_.size()) {
-        break;
-      }
-      assert(combined_idx < compact->combined_key_buf_.size());
-      key = compact->combined_key_buf_[combined_idx];
-      value = compact->combined_value_buf_[combined_idx];
-
-      ++combined_idx;
-    }
-
-    if (compact->compaction->ShouldStopBefore(key) &&
-        compact->builder != nullptr) {
-      status = FinishCompactionOutputFile(compact, input);
-      if (!status.ok()) {
-        break;
-      }
-    }
-
-    // Handle key/value, add to state, etc.
-    bool drop = false;
-    bool current_entry_is_merging = false;
-    if (!ParseInternalKey(key, &ikey)) {
-      // Do not hide error keys
-      // TODO: error key stays in db forever? Figure out the intention/rationale
-      // v10 error v8 : we cannot hide v8 even though it's pretty obvious.
-      current_user_key.Clear();
-      has_current_user_key = false;
-      last_sequence_for_key = kMaxSequenceNumber;
-      visible_in_snapshot = kMaxSequenceNumber;
-    } else {
-      if (!has_current_user_key ||
-          cfd->user_comparator()->Compare(ikey.user_key,
-                                          current_user_key.GetKey()) != 0) {
-        // First occurrence of this user key
-        current_user_key.SetUserKey(ikey.user_key);
-        has_current_user_key = true;
-        last_sequence_for_key = kMaxSequenceNumber;
-        visible_in_snapshot = kMaxSequenceNumber;
-        // apply the compaction filter to the first occurrence of the user key
-        if (compaction_filter && !is_compaction_v2 &&
-            ikey.type == kTypeValue &&
-            (visible_at_tip || ikey.sequence > latest_snapshot)) {
-          // If the user has specified a compaction filter and the sequence
-          // number is greater than any external snapshot, then invoke the
-          // filter.
-          // If the return value of the compaction filter is true, replace
-          // the entry with a delete marker.
-          bool value_changed = false;
-          compaction_filter_value.clear();
-          bool to_delete = compaction_filter->Filter(
-              compact->compaction->level(), ikey.user_key, value,
-              &compaction_filter_value, &value_changed);
-          if (to_delete) {
-            // make a copy of the original key and convert it to a delete
-            delete_key.SetInternalKey(ExtractUserKey(key), ikey.sequence,
-                                      kTypeDeletion);
-            // anchor the key again
-            key = delete_key.GetKey();
-            // needed because ikey is backed by key
-            ParseInternalKey(key, &ikey);
-            // no value associated with delete
-            value.clear();
-            RecordTick(options_.statistics.get(), COMPACTION_KEY_DROP_USER);
-          } else if (value_changed) {
-            value = compaction_filter_value;
-          }
-        }
-      }
-
-      // If there are no snapshots, then this kv affect visibility at tip.
-      // Otherwise, search though all existing snapshots to find
-      // the earlist snapshot that is affected by this kv.
-      SequenceNumber prev_snapshot = 0; // 0 means no previous snapshot
-      SequenceNumber visible = visible_at_tip ?
-        visible_at_tip :
-        findEarliestVisibleSnapshot(ikey.sequence,
-            compact->existing_snapshots,
-            &prev_snapshot);
-
-      if (visible_in_snapshot == visible) {
-        // If the earliest snapshot is which this key is visible in
-        // is the same as the visibily of a previous instance of the
-        // same key, then this kv is not visible in any snapshot.
-        // Hidden by an newer entry for same user key
-        // TODO: why not > ?
-        assert(last_sequence_for_key >= ikey.sequence);
-        drop = true;    // (A)
-        RecordTick(options_.statistics.get(), COMPACTION_KEY_DROP_NEWER_ENTRY);
-      } else if (ikey.type == kTypeDeletion &&
-          ikey.sequence <= earliest_snapshot &&
-          compact->compaction->IsBaseLevelForKey(ikey.user_key)) {
-        // For this user key:
-        // (1) there is no data in higher levels
-        // (2) data in lower levels will have larger sequence numbers
-        // (3) data in layers that are being compacted here and have
-        //     smaller sequence numbers will be dropped in the next
-        //     few iterations of this loop (by rule (A) above).
-        // Therefore this deletion marker is obsolete and can be dropped.
-        drop = true;
-        RecordTick(options_.statistics.get(), COMPACTION_KEY_DROP_OBSOLETE);
-      } else if (ikey.type == kTypeMerge) {
-        // We know the merge type entry is not hidden, otherwise we would
-        // have hit (A)
-        // We encapsulate the merge related state machine in a different
-        // object to minimize change to the existing flow. Turn out this
-        // logic could also be nicely re-used for memtable flush purge
-        // optimization in BuildTable.
-        int steps = 0;
-        merge.MergeUntil(input, prev_snapshot, bottommost_level,
-            options_.statistics.get(), &steps);
-        // Skip the Merge ops
-        combined_idx = combined_idx - 1 + steps;
-
-        current_entry_is_merging = true;
-        if (merge.IsSuccess()) {
-          // Successfully found Put/Delete/(end-of-key-range) while merging
-          // Get the merge result
-          key = merge.key();
-          ParseInternalKey(key, &ikey);
-          value = merge.value();
-        } else {
-          // Did not find a Put/Delete/(end-of-key-range) while merging
-          // We now have some stack of merge operands to write out.
-          // NOTE: key,value, and ikey are now referring to old entries.
-          //       These will be correctly set below.
-          assert(!merge.keys().empty());
-          assert(merge.keys().size() == merge.values().size());
-
-          // Hack to make sure last_sequence_for_key is correct
-          ParseInternalKey(merge.keys().front(), &ikey);
-        }
-      }
-
-      last_sequence_for_key = ikey.sequence;
-      visible_in_snapshot = visible;
-    }
-
-    if (!drop) {
-      // We may write a single key (e.g.: for Put/Delete or successful merge).
-      // Or we may instead have to write a sequence/list of keys.
-      // We have to write a sequence iff we have an unsuccessful merge
-      bool has_merge_list = current_entry_is_merging && !merge.IsSuccess();
-      const std::deque<std::string>* keys = nullptr;
-      const std::deque<std::string>* values = nullptr;
-      std::deque<std::string>::const_reverse_iterator key_iter;
-      std::deque<std::string>::const_reverse_iterator value_iter;
-      if (has_merge_list) {
-        keys = &merge.keys();
-        values = &merge.values();
-        key_iter = keys->rbegin();    // The back (*rbegin()) is the first key
-        value_iter = values->rbegin();
-
-        key = Slice(*key_iter);
-        value = Slice(*value_iter);
-      }
-
-      // If we have a list of keys to write, traverse the list.
-      // If we have a single key to write, simply write that key.
-      while (true) {
-        // Invariant: key,value,ikey will always be the next entry to write
-        char* kptr = (char*)key.data();
-        std::string kstr;
-
-        // Zeroing out the sequence number leads to better compression.
-        // If this is the bottommost level (no files in lower levels)
-        // and the earliest snapshot is larger than this seqno
-        // then we can squash the seqno to zero.
-        if (bottommost_level && ikey.sequence < earliest_snapshot &&
-            ikey.type != kTypeMerge) {
-          assert(ikey.type != kTypeDeletion);
-          // make a copy because updating in place would cause problems
-          // with the priority queue that is managing the input key iterator
-          kstr.assign(key.data(), key.size());
-          kptr = (char *)kstr.c_str();
-          UpdateInternalKey(kptr, key.size(), (uint64_t)0, ikey.type);
-        }
-
-        Slice newkey(kptr, key.size());
-        assert((key.clear(), 1)); // we do not need 'key' anymore
-
-        // Open output file if necessary
-        if (compact->builder == nullptr) {
-          status = OpenCompactionOutputFile(compact);
-          if (!status.ok()) {
-            break;
-          }
-        }
-
-        SequenceNumber seqno = GetInternalKeySeqno(newkey);
-        if (compact->builder->NumEntries() == 0) {
-          compact->current_output()->smallest.DecodeFrom(newkey);
-          compact->current_output()->smallest_seqno = seqno;
-        } else {
-          compact->current_output()->smallest_seqno =
-            std::min(compact->current_output()->smallest_seqno, seqno);
-        }
-        compact->current_output()->largest.DecodeFrom(newkey);
-        compact->builder->Add(newkey, value);
-        compact->current_output()->largest_seqno =
-          std::max(compact->current_output()->largest_seqno, seqno);
-
-        // Close output file if it is big enough
-        if (compact->builder->FileSize() >=
-            compact->compaction->MaxOutputFileSize()) {
-          status = FinishCompactionOutputFile(compact, input);
-          if (!status.ok()) {
-            break;
-          }
-        }
-
-        // If we have a list of entries, move to next element
-        // If we only had one entry, then break the loop.
-        if (has_merge_list) {
-          ++key_iter;
-          ++value_iter;
-
-          // If at end of list
-          if (key_iter == keys->rend() || value_iter == values->rend()) {
-            // Sanity Check: if one ends, then both end
-            assert(key_iter == keys->rend() && value_iter == values->rend());
-            break;
-          }
-
-          // Otherwise not at end of list. Update key, value, and ikey.
-          key = Slice(*key_iter);
-          value = Slice(*value_iter);
-          ParseInternalKey(key, &ikey);
-
-        } else{
-          // Only had one item to begin with (Put/Delete)
-          break;
-        }
-      }
-    }
-
-    // MergeUntil has moved input to the next entry
-    if (!current_entry_is_merging) {
-      input->Next();
-    }
-  }
-
-  return status;
-}
-
-void DBImpl::CallCompactionFilterV2(CompactionState* compact,
-  CompactionFilterV2* compaction_filter_v2) {
-  if (compact == nullptr || compaction_filter_v2 == nullptr) {
-    return;
-  }
-
-  std::vector<Slice> user_key_buf;
-  for (const auto& key : compact->ikey_buf_) {
-    user_key_buf.emplace_back(key.user_key);
-  }
-
-  // If the user has specified a compaction filter and the sequence
-  // number is greater than any external snapshot, then invoke the
-  // filter.
-  // If the return value of the compaction filter is true, replace
-  // the entry with a delete marker.
-  compact->to_delete_buf_ = compaction_filter_v2->Filter(
-      compact->compaction->level(),
-      user_key_buf, compact->existing_value_buf_,
-      &compact->new_value_buf_,
-      &compact->value_changed_buf_);
-
-  // new_value_buf_.size() <= to_delete__buf_.size(). "=" iff all
-  // kv-pairs in this compaction run needs to be deleted.
-  assert(compact->to_delete_buf_.size() ==
-      compact->key_buf_.size());
-  assert(compact->to_delete_buf_.size() ==
-      compact->existing_value_buf_.size());
-  assert(compact->to_delete_buf_.size() ==
-      compact->value_changed_buf_.size());
-
-  int new_value_idx = 0;
-  for (unsigned int i = 0; i < compact->to_delete_buf_.size(); ++i) {
-    if (compact->to_delete_buf_[i]) {
-      // update the string buffer directly
-      // the Slice buffer points to the updated buffer
-      UpdateInternalKey(&compact->key_str_buf_[i][0],
-          compact->key_str_buf_[i].size(),
-          compact->ikey_buf_[i].sequence,
-          kTypeDeletion);
-
-      // no value associated with delete
-      compact->existing_value_buf_[i].clear();
-      RecordTick(options_.statistics.get(), COMPACTION_KEY_DROP_USER);
-    } else if (compact->value_changed_buf_[i]) {
-      compact->existing_value_buf_[i] =
-        Slice(compact->new_value_buf_[new_value_idx++]);
-    }
-  }  // for
-}
-
-Status DBImpl::DoCompactionWork(CompactionState* compact,
-                                DeletionState& deletion_state,
-                                LogBuffer* log_buffer) {
-  assert(compact);
-  compact->CleanupBatchBuffer();
-  compact->CleanupMergedBuffer();
-  bool prefix_initialized = false;
-
-  int64_t imm_micros = 0;  // Micros spent doing imm_ compactions
-  ColumnFamilyData* cfd = compact->compaction->column_family_data();
-  LogToBuffer(
-      log_buffer,
-      "[%s] Compacting %d@%d + %d@%d files, score %.2f slots available %d",
-      cfd->GetName().c_str(), compact->compaction->num_input_files(0),
-      compact->compaction->level(), compact->compaction->num_input_files(1),
-      compact->compaction->output_level(), compact->compaction->score(),
-      options_.max_background_compactions - bg_compaction_scheduled_);
-  char scratch[2345];
-  compact->compaction->Summary(scratch, sizeof(scratch));
-  LogToBuffer(log_buffer, "[%s] Compaction start summary: %s\n",
-              cfd->GetName().c_str(), scratch);
-
-  assert(cfd->current()->NumLevelFiles(compact->compaction->level()) > 0);
-  assert(compact->builder == nullptr);
-  assert(!compact->outfile);
-
-  SequenceNumber visible_at_tip = 0;
-  SequenceNumber earliest_snapshot;
-  SequenceNumber latest_snapshot = 0;
-  snapshots_.getAll(compact->existing_snapshots);
-  if (compact->existing_snapshots.size() == 0) {
-    // optimize for fast path if there are no snapshots
-    visible_at_tip = versions_->LastSequence();
-    earliest_snapshot = visible_at_tip;
-  } else {
-    latest_snapshot = compact->existing_snapshots.back();
-    // Add the current seqno as the 'latest' virtual
-    // snapshot to the end of this list.
-    compact->existing_snapshots.push_back(versions_->LastSequence());
-    earliest_snapshot = compact->existing_snapshots[0];
-  }
-
-  // Is this compaction producing files at the bottommost level?
-  bool bottommost_level = compact->compaction->BottomMostLevel();
-
-  // Allocate the output file numbers before we release the lock
-  AllocateCompactionOutputFileNumbers(compact);
-
-  // Release mutex while we're actually doing the compaction work
-  mutex_.Unlock();
-  log_buffer->FlushBufferToLog();
-
-  const uint64_t start_micros = env_->NowMicros();
-  unique_ptr<Iterator> input(versions_->MakeInputIterator(compact->compaction));
-  input->SeekToFirst();
-  shared_ptr<Iterator> backup_input(
-      versions_->MakeInputIterator(compact->compaction));
-  backup_input->SeekToFirst();
-
-  Status status;
-  ParsedInternalKey ikey;
-  std::unique_ptr<CompactionFilterV2> compaction_filter_from_factory_v2
-    = nullptr;
-  auto context = compact->GetFilterContext();
-  compaction_filter_from_factory_v2 =
-      cfd->options()->compaction_filter_factory_v2->CreateCompactionFilterV2(
-          context);
-  auto compaction_filter_v2 =
-    compaction_filter_from_factory_v2.get();
-
-  // temp_backup_input always point to the start of the current buffer
-  // temp_backup_input = backup_input;
-  // iterate through input,
-  // 1) buffer ineligible keys and value keys into 2 separate buffers;
-  // 2) send value_buffer to compaction filter and alternate the values;
-  // 3) merge value_buffer with ineligible_value_buffer;
-  // 4) run the modified "compaction" using the old for loop.
-  if (compaction_filter_v2) {
-    while (backup_input->Valid() && !shutting_down_.Acquire_Load() &&
-           !cfd->IsDropped()) {
-      // FLUSH preempts compaction
-      // TODO(icanadi) this currently only checks if flush is necessary on
-      // compacting column family. we should also check if flush is necessary on
-      // other column families, too
-      imm_micros += CallFlushDuringCompaction(cfd, deletion_state, log_buffer);
-
-      Slice key = backup_input->key();
-      Slice value = backup_input->value();
-
-      const SliceTransform* transformer =
-          cfd->options()->compaction_filter_factory_v2->GetPrefixExtractor();
-      const auto key_prefix = transformer->Transform(key);
-      if (!prefix_initialized) {
-        compact->cur_prefix_ = key_prefix.ToString();
-        prefix_initialized = true;
-      }
-      if (!ParseInternalKey(key, &ikey)) {
-        // log error
-        Log(options_.info_log, "[%s] Failed to parse key: %s",
-            cfd->GetName().c_str(), key.ToString().c_str());
-        continue;
-      } else {
-        // If the prefix remains the same, keep buffering
-        if (key_prefix.compare(Slice(compact->cur_prefix_)) == 0) {
-          // Apply the compaction filter V2 to all the kv pairs sharing
-          // the same prefix
-          if (ikey.type == kTypeValue &&
-              (visible_at_tip || ikey.sequence > latest_snapshot)) {
-            // Buffer all keys sharing the same prefix for CompactionFilterV2
-            // Iterate through keys to check prefix
-            compact->BufferKeyValueSlices(key, value);
-          } else {
-            // buffer ineligible keys
-            compact->BufferOtherKeyValueSlices(key, value);
-          }
-          backup_input->Next();
-          continue;
-          // finish changing values for eligible keys
-        } else {
-          // Now prefix changes, this batch is done.
-          // Call compaction filter on the buffered values to change the value
-          if (compact->key_buf_.size() > 0) {
-            CallCompactionFilterV2(compact, compaction_filter_v2);
-          }
-          compact->cur_prefix_ = key_prefix.ToString();
-        }
-      }
-
-      // Merge this batch of data (values + ineligible keys)
-      compact->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
-
-      // Done buffering for the current prefix. Spit it out to disk
-      // Now just iterate through all the kv-pairs
-      status = ProcessKeyValueCompaction(
-          visible_at_tip,
-          earliest_snapshot,
-          latest_snapshot,
-          deletion_state,
-          bottommost_level,
-          imm_micros,
-          input.get(),
-          compact,
-          true,
-          log_buffer);
-
-      if (!status.ok()) {
-        break;
-      }
-
-      // After writing the kv-pairs, we can safely remove the reference
-      // to the string buffer and clean them up
-      compact->CleanupBatchBuffer();
-      compact->CleanupMergedBuffer();
-      // Buffer the key that triggers the mismatch in prefix
-      if (ikey.type == kTypeValue &&
-        (visible_at_tip || ikey.sequence > latest_snapshot)) {
-        compact->BufferKeyValueSlices(key, value);
-      } else {
-        compact->BufferOtherKeyValueSlices(key, value);
-      }
-      backup_input->Next();
-      if (!backup_input->Valid()) {
-        // If this is the single last value, we need to merge it.
-        if (compact->key_buf_.size() > 0) {
-          CallCompactionFilterV2(compact, compaction_filter_v2);
-        }
-        compact->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
-
-        status = ProcessKeyValueCompaction(
-            visible_at_tip,
-            earliest_snapshot,
-            latest_snapshot,
-            deletion_state,
-            bottommost_level,
-            imm_micros,
-            input.get(),
-            compact,
-            true,
-            log_buffer);
-
-        compact->CleanupBatchBuffer();
-        compact->CleanupMergedBuffer();
-      }
-    }  // done processing all prefix batches
-    // finish the last batch
-    if (compact->key_buf_.size() > 0) {
-      CallCompactionFilterV2(compact, compaction_filter_v2);
-    }
-    compact->MergeKeyValueSliceBuffer(&cfd->internal_comparator());
-    status = ProcessKeyValueCompaction(
-        visible_at_tip,
-        earliest_snapshot,
-        latest_snapshot,
-        deletion_state,
-        bottommost_level,
-        imm_micros,
-        input.get(),
-        compact,
-        true,
-        log_buffer);
-  }  // checking for compaction filter v2
-
-  if (!compaction_filter_v2) {
-    status = ProcessKeyValueCompaction(
-      visible_at_tip,
-      earliest_snapshot,
-      latest_snapshot,
-      deletion_state,
-      bottommost_level,
-      imm_micros,
-      input.get(),
-      compact,
-      false,
-      log_buffer);
-  }
-
-  if (status.ok() && (shutting_down_.Acquire_Load() || cfd->IsDropped())) {
-    status = Status::ShutdownInProgress(
-        "Database shutdown or Column family drop during compaction");
-  }
-  if (status.ok() && compact->builder != nullptr) {
-    status = FinishCompactionOutputFile(compact, input.get());
-  }
-  if (status.ok()) {
-    status = input->status();
-  }
-  input.reset();
-
-  if (!options_.disableDataSync) {
-    db_directory_->Fsync();
-  }
-
-  InternalStats::CompactionStats stats;
-  stats.micros = env_->NowMicros() - start_micros - imm_micros;
-  MeasureTime(options_.statistics.get(), COMPACTION_TIME, stats.micros);
-  stats.files_in_leveln = compact->compaction->num_input_files(0);
-  stats.files_in_levelnp1 = compact->compaction->num_input_files(1);
-
-  int num_output_files = compact->outputs.size();
-  if (compact->builder != nullptr) {
-    // An error occurred so ignore the last output.
-    assert(num_output_files > 0);
-    --num_output_files;
-  }
-  stats.files_out_levelnp1 = num_output_files;
-
-  for (int i = 0; i < compact->compaction->num_input_files(0); i++) {
-    stats.bytes_readn += compact->compaction->input(0, i)->file_size;
-    RecordTick(options_.statistics.get(), COMPACT_READ_BYTES,
-               compact->compaction->input(0, i)->file_size);
-  }
-
-  for (int i = 0; i < compact->compaction->num_input_files(1); i++) {
-    stats.bytes_readnp1 += compact->compaction->input(1, i)->file_size;
-    RecordTick(options_.statistics.get(), COMPACT_READ_BYTES,
-               compact->compaction->input(1, i)->file_size);
-  }
-
-  for (int i = 0; i < num_output_files; i++) {
-    stats.bytes_written += compact->outputs[i].file_size;
-    RecordTick(options_.statistics.get(), COMPACT_WRITE_BYTES,
-               compact->outputs[i].file_size);
-  }
-
-  LogFlush(options_.info_log);
-  mutex_.Lock();
-  cfd->internal_stats()->AddCompactionStats(compact->compaction->output_level(),
-                                            stats);
-
-  // if there were any unused file number (mostly in case of
-  // compaction error), free up the entry from pending_putputs
-  ReleaseCompactionUnusedFileNumbers(compact);
-
-  if (status.ok()) {
-    status = InstallCompactionResults(compact, log_buffer);
-    InstallSuperVersion(cfd, deletion_state);
-  }
-  Version::LevelSummaryStorage tmp;
-  LogToBuffer(
-      log_buffer,
-      "[%s] compacted to: %s, %.1f MB/sec, level %d, files in(%d, %d) out(%d) "
-      "MB in(%.1f, %.1f) out(%.1f), read-write-amplify(%.1f) "
-      "write-amplify(%.1f) %s\n",
-      cfd->GetName().c_str(), cfd->current()->LevelSummary(&tmp),
-      (stats.bytes_readn + stats.bytes_readnp1 + stats.bytes_written) /
-          (double)stats.micros,
-      compact->compaction->output_level(), stats.files_in_leveln,
-      stats.files_in_levelnp1, stats.files_out_levelnp1,
-      stats.bytes_readn / 1048576.0, stats.bytes_readnp1 / 1048576.0,
-      stats.bytes_written / 1048576.0,
-      (stats.bytes_written + stats.bytes_readnp1 + stats.bytes_readn) /
-          (double)stats.bytes_readn,
-      stats.bytes_written / (double)stats.bytes_readn,
-      status.ToString().c_str());
-
-  return status;
-}
-
-namespace {
-struct IterState {
-  IterState(DBImpl* db, port::Mutex* mu, SuperVersion* super_version)
-      : db(db), mu(mu), super_version(super_version) {}
-
-  DBImpl* db;
-  port::Mutex* mu;
-  SuperVersion* super_version;
-};
-
-static void CleanupIteratorState(void* arg1, void* arg2) {
-  IterState* state = reinterpret_cast<IterState*>(arg1);
-
-  if (state->super_version->Unref()) {
-    DBImpl::DeletionState deletion_state;
-
-    state->mu->Lock();
-    state->super_version->Cleanup();
-    state->db->FindObsoleteFiles(deletion_state, false, true);
-    state->mu->Unlock();
-
-    delete state->super_version;
-    if (deletion_state.HaveSomethingToDelete()) {
-      state->db->PurgeObsoleteFiles(deletion_state);
-    }
-  }
-
-  delete state;
-}
-}  // namespace
-
-Iterator* DBImpl::NewInternalIterator(const ReadOptions& options,
-                                      ColumnFamilyData* cfd,
-                                      SuperVersion* super_version) {
-  std::vector<Iterator*> iterator_list;
-  // Collect iterator for mutable mem
-  iterator_list.push_back(super_version->mem->NewIterator(options));
-  // Collect all needed child iterators for immutable memtables
-  super_version->imm->AddIterators(options, &iterator_list);
-  // Collect iterators for files in L0 - Ln
-  super_version->current->AddIterators(options, storage_options_,
-                                       &iterator_list);
-  Iterator* internal_iter = NewMergingIterator(
-      &cfd->internal_comparator(), &iterator_list[0], iterator_list.size());
-
-  IterState* cleanup = new IterState(this, &mutex_, super_version);
-  internal_iter->RegisterCleanup(CleanupIteratorState, cleanup, nullptr);
-
-  return internal_iter;
-}
-
-ColumnFamilyHandle* DBImpl::DefaultColumnFamily() const {
-  return default_cf_handle_;
-}
-
-Status DBImpl::Get(const ReadOptions& options,
-                   ColumnFamilyHandle* column_family, const Slice& key,
-                   std::string* value) {
-  return GetImpl(options, column_family, key, value);
-}
-
-// DeletionState gets created and destructed outside of the lock -- we
-// use this convinently to:
-// * malloc one SuperVersion() outside of the lock -- new_superversion
-// * delete SuperVersion()s outside of the lock -- superversions_to_free
-//
-// However, if InstallSuperVersion() gets called twice with the same,
-// deletion_state, we can't reuse the SuperVersion() that got malloced because
-// first call already used it. In that rare case, we take a hit and create a
-// new SuperVersion() inside of the mutex. We do similar thing
-// for superversion_to_free
-void DBImpl::InstallSuperVersion(ColumnFamilyData* cfd,
-                                 DeletionState& deletion_state) {
-  mutex_.AssertHeld();
-  // if new_superversion == nullptr, it means somebody already used it
-  SuperVersion* new_superversion =
-    (deletion_state.new_superversion != nullptr) ?
-    deletion_state.new_superversion : new SuperVersion();
-  SuperVersion* old_superversion =
-      cfd->InstallSuperVersion(new_superversion, &mutex_);
-  deletion_state.new_superversion = nullptr;
-  deletion_state.superversions_to_free.push_back(old_superversion);
-}
-
-Status DBImpl::GetImpl(const ReadOptions& options,
-                       ColumnFamilyHandle* column_family, const Slice& key,
-                       std::string* value, bool* value_found) {
-  StopWatch sw(env_, options_.statistics.get(), DB_GET, false);
-  PERF_TIMER_AUTO(get_snapshot_time);
-
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-
-  SequenceNumber snapshot;
-  if (options.snapshot != nullptr) {
-    snapshot = reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_;
-  } else {
-    snapshot = versions_->LastSequence();
-  }
-
-  // Acquire SuperVersion
-  SuperVersion* sv = nullptr;
-  // TODO(ljin): consider using GetReferencedSuperVersion() directly
-  if (LIKELY(options_.allow_thread_local)) {
-    sv = cfd->GetThreadLocalSuperVersion(&mutex_);
-  } else {
-    mutex_.Lock();
-    sv = cfd->GetSuperVersion()->Ref();
-    mutex_.Unlock();
-  }
-
-  bool have_stat_update = false;
-  Version::GetStats stats;
-
-  // Prepare to store a list of merge operations if merge occurs.
-  MergeContext merge_context;
-
-  Status s;
-  // First look in the memtable, then in the immutable memtable (if any).
-  // s is both in/out. When in, s could either be OK or MergeInProgress.
-  // merge_operands will contain the sequence of merges in the latter case.
-  LookupKey lkey(key, snapshot);
-  PERF_TIMER_STOP(get_snapshot_time);
-  if (sv->mem->Get(lkey, value, &s, merge_context, *cfd->options())) {
-    // Done
-    RecordTick(options_.statistics.get(), MEMTABLE_HIT);
-  } else if (sv->imm->Get(lkey, value, &s, merge_context, *cfd->options())) {
-    // Done
-    RecordTick(options_.statistics.get(), MEMTABLE_HIT);
-  } else {
-    PERF_TIMER_START(get_from_output_files_time);
-
-    sv->current->Get(options, lkey, value, &s, &merge_context, &stats,
-                     value_found);
-    have_stat_update = true;
-    PERF_TIMER_STOP(get_from_output_files_time);
-    RecordTick(options_.statistics.get(), MEMTABLE_MISS);
-  }
-
-  PERF_TIMER_START(get_post_process_time);
-
-  if (!cfd->options()->disable_seek_compaction && have_stat_update) {
-    mutex_.Lock();
-    if (sv->current->UpdateStats(stats)) {
-      MaybeScheduleFlushOrCompaction();
-    }
-    mutex_.Unlock();
-  }
-
-  bool unref_sv = true;
-  if (LIKELY(options_.allow_thread_local)) {
-    unref_sv = !cfd->ReturnThreadLocalSuperVersion(sv);
-  }
-
-  if (unref_sv) {
-    // Release SuperVersion
-    if (sv->Unref()) {
-      mutex_.Lock();
-      sv->Cleanup();
-      mutex_.Unlock();
-      delete sv;
-      RecordTick(options_.statistics.get(), NUMBER_SUPERVERSION_CLEANUPS);
-    }
-    RecordTick(options_.statistics.get(), NUMBER_SUPERVERSION_RELEASES);
-  }
-
-  RecordTick(options_.statistics.get(), NUMBER_KEYS_READ);
-  RecordTick(options_.statistics.get(), BYTES_READ, value->size());
-  PERF_TIMER_STOP(get_post_process_time);
-  return s;
-}
-
-std::vector<Status> DBImpl::MultiGet(
-    const ReadOptions& options,
-    const std::vector<ColumnFamilyHandle*>& column_family,
-    const std::vector<Slice>& keys, std::vector<std::string>* values) {
-
-  StopWatch sw(env_, options_.statistics.get(), DB_MULTIGET, false);
-  PERF_TIMER_AUTO(get_snapshot_time);
-
-  SequenceNumber snapshot;
-
-  struct MultiGetColumnFamilyData {
-    ColumnFamilyData* cfd;
-    SuperVersion* super_version;
-    Version::GetStats stats;
-    bool have_stat_update = false;
-  };
-  std::unordered_map<uint32_t, MultiGetColumnFamilyData*> multiget_cf_data;
-  // fill up and allocate outside of mutex
-  for (auto cf : column_family) {
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(cf);
-    auto cfd = cfh->cfd();
-    if (multiget_cf_data.find(cfd->GetID()) == multiget_cf_data.end()) {
-      auto mgcfd = new MultiGetColumnFamilyData();
-      mgcfd->cfd = cfd;
-      multiget_cf_data.insert({cfd->GetID(), mgcfd});
-    }
-  }
-
-  mutex_.Lock();
-  if (options.snapshot != nullptr) {
-    snapshot = reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_;
-  } else {
-    snapshot = versions_->LastSequence();
-  }
-  for (auto mgd_iter : multiget_cf_data) {
-    mgd_iter.second->super_version =
-        mgd_iter.second->cfd->GetSuperVersion()->Ref();
-  }
-  mutex_.Unlock();
-
-  // Contain a list of merge operations if merge occurs.
-  MergeContext merge_context;
-
-  // Note: this always resizes the values array
-  size_t num_keys = keys.size();
-  std::vector<Status> stat_list(num_keys);
-  values->resize(num_keys);
-
-  // Keep track of bytes that we read for statistics-recording later
-  uint64_t bytes_read = 0;
-  PERF_TIMER_STOP(get_snapshot_time);
-
-  // For each of the given keys, apply the entire "get" process as follows:
-  // First look in the memtable, then in the immutable memtable (if any).
-  // s is both in/out. When in, s could either be OK or MergeInProgress.
-  // merge_operands will contain the sequence of merges in the latter case.
-  for (size_t i = 0; i < num_keys; ++i) {
-    merge_context.Clear();
-    Status& s = stat_list[i];
-    std::string* value = &(*values)[i];
-
-    LookupKey lkey(keys[i], snapshot);
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family[i]);
-    auto mgd_iter = multiget_cf_data.find(cfh->cfd()->GetID());
-    assert(mgd_iter != multiget_cf_data.end());
-    auto mgd = mgd_iter->second;
-    auto super_version = mgd->super_version;
-    auto cfd = mgd->cfd;
-    if (super_version->mem->Get(lkey, value, &s, merge_context,
-                                *cfd->options())) {
-      // Done
-    } else if (super_version->imm->Get(lkey, value, &s, merge_context,
-                                       *cfd->options())) {
-      // Done
-    } else {
-      super_version->current->Get(options, lkey, value, &s, &merge_context,
-                                  &mgd->stats);
-      mgd->have_stat_update = true;
-    }
-
-    if (s.ok()) {
-      bytes_read += value->size();
-    }
-  }
-
-  // Post processing (decrement reference counts and record statistics)
-  PERF_TIMER_START(get_post_process_time);
-  autovector<SuperVersion*> superversions_to_delete;
-
-  bool schedule_flush_or_compaction = false;
-  mutex_.Lock();
-  for (auto mgd_iter : multiget_cf_data) {
-    auto mgd = mgd_iter.second;
-    auto cfd = mgd->cfd;
-    if (!cfd->options()->disable_seek_compaction && mgd->have_stat_update) {
-      if (mgd->super_version->current->UpdateStats(mgd->stats)) {
-        schedule_flush_or_compaction = true;
-      }
-    }
-    if (mgd->super_version->Unref()) {
-      mgd->super_version->Cleanup();
-      superversions_to_delete.push_back(mgd->super_version);
-    }
-  }
-  if (schedule_flush_or_compaction) {
-    MaybeScheduleFlushOrCompaction();
-  }
-  mutex_.Unlock();
-
-  for (auto td : superversions_to_delete) {
-    delete td;
-  }
-  for (auto mgd : multiget_cf_data) {
-    delete mgd.second;
-  }
-
-  RecordTick(options_.statistics.get(), NUMBER_MULTIGET_CALLS);
-  RecordTick(options_.statistics.get(), NUMBER_MULTIGET_KEYS_READ, num_keys);
-  RecordTick(options_.statistics.get(), NUMBER_MULTIGET_BYTES_READ, bytes_read);
-  PERF_TIMER_STOP(get_post_process_time);
-
-  return stat_list;
-}
-
-Status DBImpl::CreateColumnFamily(const ColumnFamilyOptions& options,
-                                  const std::string& column_family_name,
-                                  ColumnFamilyHandle** handle) {
-  *handle = nullptr;
-  MutexLock l(&mutex_);
-
-  if (versions_->GetColumnFamilySet()->GetColumnFamily(column_family_name) !=
-      nullptr) {
-    return Status::InvalidArgument("Column family already exists");
-  }
-  VersionEdit edit;
-  edit.AddColumnFamily(column_family_name);
-  uint32_t new_id = versions_->GetColumnFamilySet()->GetNextColumnFamilyID();
-  edit.SetColumnFamily(new_id);
-  edit.SetLogNumber(logfile_number_);
-  edit.SetComparatorName(options.comparator->Name());
-
-  // LogAndApply will both write the creation in MANIFEST and create
-  // ColumnFamilyData object
-  Status s = versions_->LogAndApply(nullptr, &edit, &mutex_,
-                                    db_directory_.get(), false, &options);
-  if (s.ok()) {
-    auto cfd =
-        versions_->GetColumnFamilySet()->GetColumnFamily(column_family_name);
-    assert(cfd != nullptr);
-    delete cfd->InstallSuperVersion(new SuperVersion(), &mutex_);
-    *handle = new ColumnFamilyHandleImpl(cfd, this, &mutex_);
-    Log(options_.info_log, "Created column family [%s] (ID %u)",
-        column_family_name.c_str(), (unsigned)cfd->GetID());
-    max_total_in_memory_state_ += cfd->options()->write_buffer_size *
-                                  cfd->options()->max_write_buffer_number;
-  } else {
-    Log(options_.info_log, "Creating column family [%s] FAILED -- %s",
-        column_family_name.c_str(), s.ToString().c_str());
-  }
-  return s;
-}
-
-Status DBImpl::DropColumnFamily(ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-  if (cfd->GetID() == 0) {
-    return Status::InvalidArgument("Can't drop default column family");
-  }
-
-  VersionEdit edit;
-  edit.DropColumnFamily();
-  edit.SetColumnFamily(cfd->GetID());
-
-  Status s;
-  {
-    MutexLock l(&mutex_);
-    if (cfd->IsDropped()) {
-      s = Status::InvalidArgument("Column family already dropped!\n");
-    }
-    if (s.ok()) {
-      s = versions_->LogAndApply(cfd, &edit, &mutex_);
-    }
-  }
-
-  if (s.ok()) {
-    assert(cfd->IsDropped());
-    max_total_in_memory_state_ -= cfd->options()->write_buffer_size *
-                                  cfd->options()->max_write_buffer_number;
-    Log(options_.info_log, "Dropped column family with id %u\n", cfd->GetID());
-    // Flush the memtables. This will make all WAL files referencing dropped
-    // column family to be obsolete. They will be deleted once user deletes
-    // column family handle
-    Write(WriteOptions(), nullptr);  // ignore error
-  } else {
-    Log(options_.info_log, "Dropping column family with id %u FAILED -- %s\n",
-        cfd->GetID(), s.ToString().c_str());
-  }
-
-  return s;
-}
-
-bool DBImpl::KeyMayExist(const ReadOptions& options,
-                         ColumnFamilyHandle* column_family, const Slice& key,
-                         std::string* value, bool* value_found) {
-  if (value_found != nullptr) {
-    // falsify later if key-may-exist but can't fetch value
-    *value_found = true;
-  }
-  ReadOptions roptions = options;
-  roptions.read_tier = kBlockCacheTier; // read from block cache only
-  auto s = GetImpl(roptions, column_family, key, value, value_found);
-
-  // If options.block_cache != nullptr and the index block of the table didn't
-  // not present in block_cache, the return value will be Status::Incomplete.
-  // In this case, key may still exist in the table.
-  return s.ok() || s.IsIncomplete();
-}
-
-Iterator* DBImpl::NewIterator(const ReadOptions& options,
-                              ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-
-  Iterator* iter;
-  if (options.tailing) {
-#ifdef ROCKSDB_LITE
-    // not supported in lite version
-    return nullptr;
-#else
-    iter = new TailingIterator(env_, this, options, cfd);
-#endif
-  } else {
-    SequenceNumber latest_snapshot = versions_->LastSequence();
-    SuperVersion* sv = nullptr;
-    sv = cfd->GetReferencedSuperVersion(&mutex_);
-
-    iter = NewInternalIterator(options, cfd, sv);
-
-    auto snapshot =
-        options.snapshot != nullptr
-            ? reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_
-            : latest_snapshot;
-    iter = NewDBIterator(env_, *cfd->options(),
-                         cfd->user_comparator(), iter, snapshot);
-  }
-
-  return iter;
-}
-
-Status DBImpl::NewIterators(
-    const ReadOptions& options,
-    const std::vector<ColumnFamilyHandle*>& column_families,
-    std::vector<Iterator*>* iterators) {
-  iterators->clear();
-  iterators->reserve(column_families.size());
-  SequenceNumber latest_snapshot = 0;
-  std::vector<SuperVersion*> super_versions;
-  super_versions.reserve(column_families.size());
-
-  if (!options.tailing) {
-    mutex_.Lock();
-    latest_snapshot = versions_->LastSequence();
-    for (auto cfh : column_families) {
-      auto cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(cfh)->cfd();
-      super_versions.push_back(cfd->GetSuperVersion()->Ref());
-    }
-    mutex_.Unlock();
-  }
-
-  if (options.tailing) {
-#ifdef ROCKSDB_LITE
-    return Status::InvalidArgument(
-        "Tailing interator not supported in RocksDB lite");
-#else
-    for (auto cfh : column_families) {
-      auto cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(cfh)->cfd();
-      iterators->push_back(new TailingIterator(env_, this, options, cfd));
-    }
-#endif
-  } else {
-    for (size_t i = 0; i < column_families.size(); ++i) {
-      auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_families[i]);
-      auto cfd = cfh->cfd();
-
-      auto snapshot =
-          options.snapshot != nullptr
-              ? reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_
-              : latest_snapshot;
-
-      auto iter = NewInternalIterator(options, cfd, super_versions[i]);
-      iter = NewDBIterator(env_, *cfd->options(),
-                           cfd->user_comparator(), iter, snapshot);
-      iterators->push_back(iter);
-    }
-  }
-
-  return Status::OK();
-}
-
-bool DBImpl::IsSnapshotSupported() const {
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    if (!cfd->mem()->IsSnapshotSupported()) {
-      return false;
-    }
-  }
-  return true;
-}
-
-const Snapshot* DBImpl::GetSnapshot() {
-  // returns null if the underlying memtable does not support snapshot.
-  if (!IsSnapshotSupported()) return nullptr;
-  MutexLock l(&mutex_);
-  return snapshots_.New(versions_->LastSequence());
-}
-
-void DBImpl::ReleaseSnapshot(const Snapshot* s) {
-  MutexLock l(&mutex_);
-  snapshots_.Delete(reinterpret_cast<const SnapshotImpl*>(s));
-}
-
-// Convenience methods
-Status DBImpl::Put(const WriteOptions& o, ColumnFamilyHandle* column_family,
-                   const Slice& key, const Slice& val) {
-  return DB::Put(o, column_family, key, val);
-}
-
-Status DBImpl::Merge(const WriteOptions& o, ColumnFamilyHandle* column_family,
-                     const Slice& key, const Slice& val) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  if (!cfh->cfd()->options()->merge_operator) {
-    return Status::NotSupported("Provide a merge_operator when opening DB");
-  } else {
-    return DB::Merge(o, column_family, key, val);
-  }
-}
-
-Status DBImpl::Delete(const WriteOptions& options,
-                      ColumnFamilyHandle* column_family, const Slice& key) {
-  return DB::Delete(options, column_family, key);
-}
-
-Status DBImpl::Write(const WriteOptions& options, WriteBatch* my_batch) {
-  PERF_TIMER_AUTO(write_pre_and_post_process_time);
-  Writer w(&mutex_);
-  w.batch = my_batch;
-  w.sync = options.sync;
-  w.disableWAL = options.disableWAL;
-  w.done = false;
-
-  StopWatch sw(env_, options_.statistics.get(), DB_WRITE, false);
-  mutex_.Lock();
-  writers_.push_back(&w);
-  while (!w.done && &w != writers_.front()) {
-    w.cv.Wait();
-  }
-
-  if (!options.disableWAL) {
-    RecordTick(options_.statistics.get(), WRITE_WITH_WAL, 1);
-  }
-
-  if (w.done) {
-    mutex_.Unlock();
-    RecordTick(options_.statistics.get(), WRITE_DONE_BY_OTHER, 1);
-    return w.status;
-  } else {
-    RecordTick(options_.statistics.get(), WRITE_DONE_BY_SELF, 1);
-  }
-
-  uint64_t flush_column_family_if_log_file = 0;
-  uint64_t max_total_wal_size = (options_.max_total_wal_size == 0)
-                                    ? 2 * max_total_in_memory_state_
-                                    : options_.max_total_wal_size;
-  if (alive_log_files_.begin()->getting_flushed == false &&
-      total_log_size_ > max_total_wal_size) {
-    flush_column_family_if_log_file = alive_log_files_.begin()->number;
-    alive_log_files_.begin()->getting_flushed = true;
-    Log(options_.info_log,
-        "Flushing all column families with data in WAL number %" PRIu64,
-        flush_column_family_if_log_file);
-  }
-
-  Status status;
-  // refcounting cfd in iteration
-  bool dead_cfd = false;
-  autovector<SuperVersion*> superversions_to_free;
-  autovector<log::Writer*> logs_to_free;
-  for (auto cfd : *versions_->GetColumnFamilySet()) {
-    cfd->Ref();
-    bool force_flush = my_batch == nullptr ||
-                       (flush_column_family_if_log_file != 0 &&
-                        cfd->GetLogNumber() <= flush_column_family_if_log_file);
-    // May temporarily unlock and wait.
-    status = MakeRoomForWrite(cfd, force_flush, &superversions_to_free,
-                              &logs_to_free);
-    if (cfd->Unref()) {
-      dead_cfd = true;
-    }
-    if (!status.ok()) {
-      break;
-    }
-  }
-  if (dead_cfd) {
-    versions_->GetColumnFamilySet()->FreeDeadColumnFamilies();
-  }
-
-  uint64_t last_sequence = versions_->LastSequence();
-  Writer* last_writer = &w;
-  if (status.ok() && my_batch != nullptr) {  // nullptr batch is for compactions
-    autovector<WriteBatch*> write_batch_group;
-    BuildBatchGroup(&last_writer, &write_batch_group);
-
-    // Add to log and apply to memtable.  We can release the lock
-    // during this phase since &w is currently responsible for logging
-    // and protects against concurrent loggers and concurrent writes
-    // into memtables
-    {
-      mutex_.Unlock();
-      WriteBatch* updates = nullptr;
-      if (write_batch_group.size() == 1) {
-        updates = write_batch_group[0];
-      } else {
-        updates = &tmp_batch_;
-        for (size_t i = 0; i < write_batch_group.size(); ++i) {
-          WriteBatchInternal::Append(updates, write_batch_group[i]);
-        }
-      }
-
-      const SequenceNumber current_sequence = last_sequence + 1;
-      WriteBatchInternal::SetSequence(updates, current_sequence);
-      int my_batch_count = WriteBatchInternal::Count(updates);
-      last_sequence += my_batch_count;
-      // Record statistics
-      RecordTick(options_.statistics.get(),
-                 NUMBER_KEYS_WRITTEN, my_batch_count);
-      RecordTick(options_.statistics.get(),
-                 BYTES_WRITTEN,
-                 WriteBatchInternal::ByteSize(updates));
-      if (options.disableWAL) {
-        flush_on_destroy_ = true;
-      }
-      PERF_TIMER_STOP(write_pre_and_post_process_time);
-
-      if (!options.disableWAL) {
-        PERF_TIMER_START(write_wal_time);
-        Slice log_entry = WriteBatchInternal::Contents(updates);
-        status = log_->AddRecord(log_entry);
-        total_log_size_ += log_entry.size();
-        alive_log_files_.back().AddSize(log_entry.size());
-        log_empty_ = false;
-        RecordTick(options_.statistics.get(), WAL_FILE_SYNCED, 1);
-        RecordTick(options_.statistics.get(), WAL_FILE_BYTES, log_entry.size());
-        if (status.ok() && options.sync) {
-          if (options_.use_fsync) {
-            StopWatch(env_, options_.statistics.get(), WAL_FILE_SYNC_MICROS);
-            status = log_->file()->Fsync();
-          } else {
-            StopWatch(env_, options_.statistics.get(), WAL_FILE_SYNC_MICROS);
-            status = log_->file()->Sync();
-          }
-        }
-        PERF_TIMER_STOP(write_wal_time);
-      }
-      if (status.ok()) {
-        PERF_TIMER_START(write_memtable_time);
-        status = WriteBatchInternal::InsertInto(
-            updates, column_family_memtables_.get(), false, 0, this, false);
-        PERF_TIMER_STOP(write_memtable_time);
-
-        if (!status.ok()) {
-          // Iteration failed (either in-memory writebatch corruption (very
-          // bad), or the client specified invalid column family). Return
-          // failure.
-          // Note that existing logic was not sound. Any partial failure writing
-          // into the memtable would result in a state that some write ops might
-          // have succeeded in memtable but Status reports error for all writes.
-          return status;
-        }
-        SetTickerCount(options_.statistics.get(), SEQUENCE_NUMBER,
-                       last_sequence);
-      }
-      PERF_TIMER_START(write_pre_and_post_process_time);
-      if (updates == &tmp_batch_) tmp_batch_.Clear();
-      mutex_.Lock();
-      if (status.ok()) {
-        versions_->SetLastSequence(last_sequence);
-      }
-    }
-  }
-  if (options_.paranoid_checks && !status.ok() && bg_error_.ok()) {
-    bg_error_ = status; // stop compaction & fail any further writes
-  }
-
-  while (true) {
-    Writer* ready = writers_.front();
-    writers_.pop_front();
-    if (ready != &w) {
-      ready->status = status;
-      ready->done = true;
-      ready->cv.Signal();
-    }
-    if (ready == last_writer) break;
-  }
-
-  // Notify new head of write queue
-  if (!writers_.empty()) {
-    writers_.front()->cv.Signal();
-  }
-  mutex_.Unlock();
-
-  for (auto& sv : superversions_to_free) {
-    delete sv;
-  }
-  for (auto& log : logs_to_free) {
-    delete log;
-  }
-
-  PERF_TIMER_STOP(write_pre_and_post_process_time);
-  return status;
-}
-
-// REQUIRES: Writer list must be non-empty
-// REQUIRES: First writer must have a non-nullptr batch
-void DBImpl::BuildBatchGroup(Writer** last_writer,
-                             autovector<WriteBatch*>* write_batch_group) {
-  assert(!writers_.empty());
-  Writer* first = writers_.front();
-  assert(first->batch != nullptr);
-
-  size_t size = WriteBatchInternal::ByteSize(first->batch);
-  write_batch_group->push_back(first->batch);
-
-  // Allow the group to grow up to a maximum size, but if the
-  // original write is small, limit the growth so we do not slow
-  // down the small write too much.
-  size_t max_size = 1 << 20;
-  if (size <= (128<<10)) {
-    max_size = size + (128<<10);
-  }
-
-  *last_writer = first;
-  std::deque<Writer*>::iterator iter = writers_.begin();
-  ++iter;  // Advance past "first"
-  for (; iter != writers_.end(); ++iter) {
-    Writer* w = *iter;
-    if (w->sync && !first->sync) {
-      // Do not include a sync write into a batch handled by a non-sync write.
-      break;
-    }
-
-    if (!w->disableWAL && first->disableWAL) {
-      // Do not include a write that needs WAL into a batch that has
-      // WAL disabled.
-      break;
-    }
-
-    if (w->batch != nullptr) {
-      size += WriteBatchInternal::ByteSize(w->batch);
-      if (size > max_size) {
-        // Do not make batch too big
-        break;
-      }
-
-      write_batch_group->push_back(w->batch);
-    }
-    *last_writer = w;
-  }
-}
-
-// This function computes the amount of time in microseconds by which a write
-// should be delayed based on the number of level-0 files according to the
-// following formula:
-// if n < bottom, return 0;
-// if n >= top, return 1000;
-// otherwise, let r = (n - bottom) /
-//                    (top - bottom)
-//  and return r^2 * 1000.
-// The goal of this formula is to gradually increase the rate at which writes
-// are slowed. We also tried linear delay (r * 1000), but it seemed to do
-// slightly worse. There is no other particular reason for choosing quadratic.
-uint64_t DBImpl::SlowdownAmount(int n, double bottom, double top) {
-  uint64_t delay;
-  if (n >= top) {
-    delay = 1000;
-  }
-  else if (n < bottom) {
-    delay = 0;
-  }
-  else {
-    // If we are here, we know that:
-    //   level0_start_slowdown <= n < level0_slowdown
-    // since the previous two conditions are false.
-    double how_much =
-      (double) (n - bottom) /
-              (top - bottom);
-    delay = std::max(how_much * how_much * 1000, 100.0);
-  }
-  assert(delay <= 1000);
-  return delay;
-}
-
-// REQUIRES: mutex_ is held
-// REQUIRES: this thread is currently at the front of the writer queue
-Status DBImpl::MakeRoomForWrite(
-    ColumnFamilyData* cfd, bool force,
-    autovector<SuperVersion*>* superversions_to_free,
-    autovector<log::Writer*>* logs_to_free) {
-  mutex_.AssertHeld();
-  assert(!writers_.empty());
-  bool allow_delay = !force;
-  bool allow_hard_rate_limit_delay = !force;
-  bool allow_soft_rate_limit_delay = !force;
-  uint64_t rate_limit_delay_millis = 0;
-  Status s;
-  double score;
-
-  while (true) {
-    if (!bg_error_.ok()) {
-      // Yield previous error
-      s = bg_error_;
-      break;
-    } else if (allow_delay && cfd->NeedSlowdownForNumLevel0Files()) {
-      // We are getting close to hitting a hard limit on the number of
-      // L0 files.  Rather than delaying a single write by several
-      // seconds when we hit the hard limit, start delaying each
-      // individual write by 0-1ms to reduce latency variance.  Also,
-      // this delay hands over some CPU to the compaction thread in
-      // case it is sharing the same core as the writer.
-      uint64_t slowdown =
-          SlowdownAmount(cfd->current()->NumLevelFiles(0),
-                         cfd->options()->level0_slowdown_writes_trigger,
-                         cfd->options()->level0_stop_writes_trigger);
-      mutex_.Unlock();
-      uint64_t delayed;
-      {
-        StopWatch sw(env_, options_.statistics.get(), STALL_L0_SLOWDOWN_COUNT);
-        env_->SleepForMicroseconds(slowdown);
-        delayed = sw.ElapsedMicros();
-      }
-      RecordTick(options_.statistics.get(), STALL_L0_SLOWDOWN_MICROS, delayed);
-      cfd->internal_stats()->RecordWriteStall(InternalStats::LEVEL0_SLOWDOWN,
-                                              delayed);
-      allow_delay = false;  // Do not delay a single write more than once
-      mutex_.Lock();
-      delayed_writes_++;
-    } else if (!force && !cfd->mem()->ShouldFlush()) {
-      // There is room in current memtable
-      if (allow_delay) {
-        DelayLoggingAndReset();
-      }
-      break;
-    } else if (cfd->imm()->size() ==
-               cfd->options()->max_write_buffer_number - 1) {
-      // We have filled up the current memtable, but the previous
-      // ones are still being flushed, so we wait.
-      DelayLoggingAndReset();
-      Log(options_.info_log, "[%s] wait for memtable flush...\n",
-          cfd->GetName().c_str());
-      MaybeScheduleFlushOrCompaction();
-      uint64_t stall;
-      {
-        StopWatch sw(env_, options_.statistics.get(),
-                     STALL_MEMTABLE_COMPACTION_COUNT);
-        bg_cv_.Wait();
-        stall = sw.ElapsedMicros();
-      }
-      RecordTick(options_.statistics.get(),
-                 STALL_MEMTABLE_COMPACTION_MICROS, stall);
-      cfd->internal_stats()->RecordWriteStall(
-          InternalStats::MEMTABLE_COMPACTION, stall);
-    } else if (cfd->current()->NumLevelFiles(0) >=
-               cfd->options()->level0_stop_writes_trigger) {
-      // There are too many level-0 files.
-      DelayLoggingAndReset();
-      Log(options_.info_log, "[%s] wait for fewer level0 files...\n",
-          cfd->GetName().c_str());
-      uint64_t stall;
-      {
-        StopWatch sw(env_, options_.statistics.get(),
-                     STALL_L0_NUM_FILES_COUNT);
-        bg_cv_.Wait();
-        stall = sw.ElapsedMicros();
-      }
-      RecordTick(options_.statistics.get(), STALL_L0_NUM_FILES_MICROS, stall);
-      cfd->internal_stats()->RecordWriteStall(InternalStats::LEVEL0_NUM_FILES,
-                                              stall);
-    } else if (allow_hard_rate_limit_delay &&
-               cfd->options()->hard_rate_limit > 1.0 &&
-               (score = cfd->current()->MaxCompactionScore()) >
-                   cfd->options()->hard_rate_limit) {
-      // Delay a write when the compaction score for any level is too large.
-      int max_level = cfd->current()->MaxCompactionScoreLevel();
-      mutex_.Unlock();
-      uint64_t delayed;
-      {
-        StopWatch sw(env_, options_.statistics.get(),
-                     HARD_RATE_LIMIT_DELAY_COUNT);
-        env_->SleepForMicroseconds(1000);
-        delayed = sw.ElapsedMicros();
-      }
-      cfd->internal_stats()->RecordLevelNSlowdown(max_level, delayed);
-      // Make sure the following value doesn't round to zero.
-      uint64_t rate_limit = std::max((delayed / 1000), (uint64_t) 1);
-      rate_limit_delay_millis += rate_limit;
-      RecordTick(options_.statistics.get(),
-                 RATE_LIMIT_DELAY_MILLIS, rate_limit);
-      if (cfd->options()->rate_limit_delay_max_milliseconds > 0 &&
-          rate_limit_delay_millis >=
-              (unsigned)cfd->options()->rate_limit_delay_max_milliseconds) {
-        allow_hard_rate_limit_delay = false;
-      }
-      mutex_.Lock();
-    } else if (allow_soft_rate_limit_delay &&
-               cfd->options()->soft_rate_limit > 0.0 &&
-               (score = cfd->current()->MaxCompactionScore()) >
-                   cfd->options()->soft_rate_limit) {
-      // Delay a write when the compaction score for any level is too large.
-      // TODO: add statistics
-      mutex_.Unlock();
-      {
-        StopWatch sw(env_, options_.statistics.get(),
-                     SOFT_RATE_LIMIT_DELAY_COUNT);
-        env_->SleepForMicroseconds(
-            SlowdownAmount(score, cfd->options()->soft_rate_limit,
-                           cfd->options()->hard_rate_limit));
-        rate_limit_delay_millis += sw.ElapsedMicros();
-      }
-      allow_soft_rate_limit_delay = false;
-      mutex_.Lock();
-
-    } else {
-      unique_ptr<WritableFile> lfile;
-      log::Writer* new_log = nullptr;
-      MemTable* new_mem = nullptr;
-
-      // Attempt to switch to a new memtable and trigger flush of old.
-      // Do this without holding the dbmutex lock.
-      assert(versions_->PrevLogNumber() == 0);
-      bool creating_new_log = !log_empty_;
-      uint64_t new_log_number =
-          creating_new_log ? versions_->NewFileNumber() : logfile_number_;
-      SuperVersion* new_superversion = nullptr;
-      mutex_.Unlock();
-      {
-        DelayLoggingAndReset();
-        if (creating_new_log) {
-          s = env_->NewWritableFile(
-              LogFileName(options_.wal_dir, new_log_number), &lfile,
-              env_->OptimizeForLogWrite(storage_options_));
-          if (s.ok()) {
-            // Our final size should be less than write_buffer_size
-            // (compression, etc) but err on the side of caution.
-            lfile->SetPreallocationBlockSize(1.1 *
-                                             cfd->options()->write_buffer_size);
-            new_log = new log::Writer(std::move(lfile));
-          }
-        }
-
-        if (s.ok()) {
-          new_mem = new MemTable(cfd->internal_comparator(), *cfd->options());
-          new_superversion = new SuperVersion();
-        }
-      }
-      mutex_.Lock();
-      if (!s.ok()) {
-        // how do we fail if we're not creating new log?
-        assert(creating_new_log);
-        // Avoid chewing through file number space in a tight loop.
-        versions_->ReuseFileNumber(new_log_number);
-        assert(!new_mem);
-        assert(!new_log);
-        break;
-      }
-      if (creating_new_log) {
-        logfile_number_ = new_log_number;
-        assert(new_log != nullptr);
-        logs_to_free->push_back(log_.release());
-        log_.reset(new_log);
-        log_empty_ = true;
-        alive_log_files_.push_back(LogFileNumberSize(logfile_number_));
-        for (auto cfd : *versions_->GetColumnFamilySet()) {
-          // all this is just optimization to delete logs that
-          // are no longer needed -- if CF is empty, that means it
-          // doesn't need that particular log to stay alive, so we just
-          // advance the log number. no need to persist this in the manifest
-          if (cfd->mem()->GetFirstSequenceNumber() == 0 &&
-              cfd->imm()->size() == 0) {
-            cfd->SetLogNumber(logfile_number_);
-          }
-        }
-      }
-      cfd->mem()->SetNextLogNumber(logfile_number_);
-      cfd->imm()->Add(cfd->mem());
-      if (force) {
-        cfd->imm()->FlushRequested();
-      }
-      new_mem->Ref();
-      cfd->SetMemtable(new_mem);
-      Log(options_.info_log, "[%s] New memtable created with log file: #%lu\n",
-          cfd->GetName().c_str(), (unsigned long)logfile_number_);
-      force = false;  // Do not force another compaction if have room
-      MaybeScheduleFlushOrCompaction();
-      superversions_to_free->push_back(
-          cfd->InstallSuperVersion(new_superversion, &mutex_));
-    }
-  }
-  return s;
-}
-
-#ifndef ROCKSDB_LITE
-Status DBImpl::GetPropertiesOfAllTables(ColumnFamilyHandle* column_family,
-                                        TablePropertiesCollection* props) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-
-  // Increment the ref count
-  mutex_.Lock();
-  auto version = cfd->current();
-  version->Ref();
-  mutex_.Unlock();
-
-  auto s = version->GetPropertiesOfAllTables(props);
-
-  // Decrement the ref count
-  mutex_.Lock();
-  version->Unref();
-  mutex_.Unlock();
-
-  return s;
-}
-#endif  // ROCKSDB_LITE
-
-const std::string& DBImpl::GetName() const {
-  return dbname_;
-}
-
-Env* DBImpl::GetEnv() const {
-  return env_;
-}
-
-const Options& DBImpl::GetOptions(ColumnFamilyHandle* column_family) const {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  return *cfh->cfd()->options();
-}
-
-bool DBImpl::GetProperty(ColumnFamilyHandle* column_family,
-                         const Slice& property, std::string* value) {
-  value->clear();
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-  DBPropertyType property_type = GetPropertyType(property);
-  MutexLock l(&mutex_);
-  return cfd->internal_stats()->GetProperty(property_type, property, value,
-                                            cfd);
-}
-
-void DBImpl::GetApproximateSizes(ColumnFamilyHandle* column_family,
-                                 const Range* range, int n, uint64_t* sizes) {
-  // TODO(opt): better implementation
-  Version* v;
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-  {
-    MutexLock l(&mutex_);
-    v = cfd->current();
-    v->Ref();
-  }
-
-  for (int i = 0; i < n; i++) {
-    // Convert user_key into a corresponding internal key.
-    InternalKey k1(range[i].start, kMaxSequenceNumber, kValueTypeForSeek);
-    InternalKey k2(range[i].limit, kMaxSequenceNumber, kValueTypeForSeek);
-    uint64_t start = versions_->ApproximateOffsetOf(v, k1);
-    uint64_t limit = versions_->ApproximateOffsetOf(v, k2);
-    sizes[i] = (limit >= start ? limit - start : 0);
-  }
-
-  {
-    MutexLock l(&mutex_);
-    v->Unref();
-  }
-}
-
-inline void DBImpl::DelayLoggingAndReset() {
-  if (delayed_writes_ > 0) {
-    Log(options_.info_log, "delayed %d write...\n", delayed_writes_ );
-    delayed_writes_ = 0;
-  }
-}
-
-#ifndef ROCKSDB_LITE
-Status DBImpl::GetUpdatesSince(
-    SequenceNumber seq, unique_ptr<TransactionLogIterator>* iter,
-    const TransactionLogIterator::ReadOptions& read_options) {
-
-  RecordTick(options_.statistics.get(), GET_UPDATES_SINCE_CALLS);
-  if (seq > versions_->LastSequence()) {
-    return Status::NotFound("Requested sequence not yet written in the db");
-  }
-  //  Get all sorted Wal Files.
-  //  Do binary search and open files and find the seq number.
-
-  std::unique_ptr<VectorLogPtr> wal_files(new VectorLogPtr);
-  Status s = GetSortedWalFiles(*wal_files);
-  if (!s.ok()) {
-    return s;
-  }
-
-  s = RetainProbableWalFiles(*wal_files, seq);
-  if (!s.ok()) {
-    return s;
-  }
-  iter->reset(new TransactionLogIteratorImpl(options_.wal_dir, &options_,
-                                             read_options, storage_options_,
-                                             seq, std::move(wal_files), this));
-  return (*iter)->status();
-}
-
-Status DBImpl::DeleteFile(std::string name) {
-  uint64_t number;
-  FileType type;
-  WalFileType log_type;
-  if (!ParseFileName(name, &number, &type, &log_type) ||
-      (type != kTableFile && type != kLogFile)) {
-    Log(options_.info_log, "DeleteFile %s failed.\n", name.c_str());
-    return Status::InvalidArgument("Invalid file name");
-  }
-
-  Status status;
-  if (type == kLogFile) {
-    // Only allow deleting archived log files
-    if (log_type != kArchivedLogFile) {
-      Log(options_.info_log, "DeleteFile %s failed - not archived log.\n",
-          name.c_str());
-      return Status::NotSupported("Delete only supported for archived logs");
-    }
-    status = env_->DeleteFile(options_.wal_dir + "/" + name.c_str());
-    if (!status.ok()) {
-      Log(options_.info_log, "DeleteFile %s failed -- %s.\n",
-          name.c_str(), status.ToString().c_str());
-    }
-    return status;
-  }
-
-  int level;
-  FileMetaData* metadata;
-  ColumnFamilyData* cfd;
-  VersionEdit edit;
-  DeletionState deletion_state(true);
-  {
-    MutexLock l(&mutex_);
-    status = versions_->GetMetadataForFile(number, &level, &metadata, &cfd);
-    if (!status.ok()) {
-      Log(options_.info_log, "DeleteFile %s failed. File not found\n",
-                             name.c_str());
-      return Status::InvalidArgument("File not found");
-    }
-    assert((level > 0) && (level < cfd->NumberLevels()));
-
-    // If the file is being compacted no need to delete.
-    if (metadata->being_compacted) {
-      Log(options_.info_log,
-          "DeleteFile %s Skipped. File about to be compacted\n", name.c_str());
-      return Status::OK();
-    }
-
-    // Only the files in the last level can be deleted externally.
-    // This is to make sure that any deletion tombstones are not
-    // lost. Check that the level passed is the last level.
-    for (int i = level + 1; i < cfd->NumberLevels(); i++) {
-      if (cfd->current()->NumLevelFiles(i) != 0) {
-        Log(options_.info_log,
-            "DeleteFile %s FAILED. File not in last level\n", name.c_str());
-        return Status::InvalidArgument("File not in last level");
-      }
-    }
-    edit.DeleteFile(level, number);
-    status = versions_->LogAndApply(cfd, &edit, &mutex_, db_directory_.get());
-    if (status.ok()) {
-      InstallSuperVersion(cfd, deletion_state);
-    }
-    FindObsoleteFiles(deletion_state, false);
-  } // lock released here
-  LogFlush(options_.info_log);
-  // remove files outside the db-lock
-  if (deletion_state.HaveSomethingToDelete()) {
-    PurgeObsoleteFiles(deletion_state);
-  }
-  {
-    MutexLock l(&mutex_);
-    // schedule flush if file deletion means we freed the space for flushes to
-    // continue
-    MaybeScheduleFlushOrCompaction();
-  }
-  return status;
-}
-
-void DBImpl::GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) {
-  MutexLock l(&mutex_);
-  versions_->GetLiveFilesMetaData(metadata);
-}
-#endif  // ROCKSDB_LITE
-
-Status DBImpl::CheckConsistency() {
-  mutex_.AssertHeld();
-  std::vector<LiveFileMetaData> metadata;
-  versions_->GetLiveFilesMetaData(&metadata);
-
-  std::string corruption_messages;
-  for (const auto& md : metadata) {
-    std::string file_path = dbname_ + md.name;
-    uint64_t fsize = 0;
-    Status s = env_->GetFileSize(file_path, &fsize);
-    if (!s.ok()) {
-      corruption_messages +=
-          "Can't access " + md.name + ": " + s.ToString() + "\n";
-    } else if (fsize != md.size) {
-      corruption_messages += "Sst file size mismatch: " + md.name +
-                             ". Size recorded in manifest " +
-                             std::to_string(md.size) + ", actual size " +
-                             std::to_string(fsize) + "\n";
-    }
-  }
-  if (corruption_messages.size() == 0) {
-    return Status::OK();
-  } else {
-    return Status::Corruption(corruption_messages);
-  }
-}
-
-Status DBImpl::GetDbIdentity(std::string& identity) {
-  std::string idfilename = IdentityFileName(dbname_);
-  unique_ptr<SequentialFile> idfile;
-  const EnvOptions soptions;
-  Status s = env_->NewSequentialFile(idfilename, &idfile, soptions);
-  if (!s.ok()) {
-    return s;
-  }
-  uint64_t file_size;
-  s = env_->GetFileSize(idfilename, &file_size);
-  if (!s.ok()) {
-    return s;
-  }
-  char buffer[file_size];
-  Slice id;
-  s = idfile->Read(file_size, &id, buffer);
-  if (!s.ok()) {
-    return s;
-  }
-  identity.assign(id.ToString());
-  // If last character is '\n' remove it from identity
-  if (identity.size() > 0 && identity.back() == '\n') {
-    identity.pop_back();
-  }
-  return s;
-}
-
-// Default implementations of convenience methods that subclasses of DB
-// can call if they wish
-Status DB::Put(const WriteOptions& opt, ColumnFamilyHandle* column_family,
-               const Slice& key, const Slice& value) {
-  // Pre-allocate size of write batch conservatively.
-  // 8 bytes are taken by header, 4 bytes for count, 1 byte for type,
-  // and we allocate 11 extra bytes for key length, as well as value length.
-  WriteBatch batch(key.size() + value.size() + 24);
-  batch.Put(column_family, key, value);
-  return Write(opt, &batch);
-}
-
-Status DB::Delete(const WriteOptions& opt, ColumnFamilyHandle* column_family,
-                  const Slice& key) {
-  WriteBatch batch;
-  batch.Delete(column_family, key);
-  return Write(opt, &batch);
-}
-
-Status DB::Merge(const WriteOptions& opt, ColumnFamilyHandle* column_family,
-                 const Slice& key, const Slice& value) {
-  WriteBatch batch;
-  batch.Merge(column_family, key, value);
-  return Write(opt, &batch);
-}
-
-// Default implementation -- returns not supported status
-Status DB::CreateColumnFamily(const ColumnFamilyOptions& options,
-                              const std::string& column_family_name,
-                              ColumnFamilyHandle** handle) {
-  return Status::NotSupported("");
-}
-Status DB::DropColumnFamily(ColumnFamilyHandle* column_family) {
-  return Status::NotSupported("");
-}
-
-DB::~DB() { }
-
-Status DB::Open(const Options& options, const std::string& dbname, DB** dbptr) {
-  DBOptions db_options(options);
-  ColumnFamilyOptions cf_options(options);
-  std::vector<ColumnFamilyDescriptor> column_families;
-  column_families.push_back(
-      ColumnFamilyDescriptor(kDefaultColumnFamilyName, cf_options));
-  std::vector<ColumnFamilyHandle*> handles;
-  Status s = DB::Open(db_options, dbname, column_families, &handles, dbptr);
-  if (s.ok()) {
-    assert(handles.size() == 1);
-    // i can delete the handle since DBImpl is always holding a reference to
-    // default column family
-    delete handles[0];
-  }
-  return s;
-}
-
-Status DB::Open(const DBOptions& db_options, const std::string& dbname,
-                const std::vector<ColumnFamilyDescriptor>& column_families,
-                std::vector<ColumnFamilyHandle*>* handles, DB** dbptr) {
-  *dbptr = nullptr;
-  handles->clear();
-
-  size_t max_write_buffer_size = 0;
-  for (auto cf : column_families) {
-    max_write_buffer_size =
-        std::max(max_write_buffer_size, cf.options.write_buffer_size);
-    if (cf.options.block_cache != nullptr && cf.options.no_block_cache) {
-      return Status::InvalidArgument(
-          "no_block_cache is true while block_cache is not nullptr");
-    }
-  }
-
-  DBImpl* impl = new DBImpl(db_options, dbname);
-  Status s = impl->env_->CreateDirIfMissing(impl->options_.wal_dir);
-  if (!s.ok()) {
-    delete impl;
-    return s;
-  }
-
-  s = impl->CreateArchivalDirectory();
-  if (!s.ok()) {
-    delete impl;
-    return s;
-  }
-  impl->mutex_.Lock();
-  // Handles create_if_missing, error_if_exists
-  s = impl->Recover(column_families);
-  if (s.ok()) {
-    uint64_t new_log_number = impl->versions_->NewFileNumber();
-    unique_ptr<WritableFile> lfile;
-    EnvOptions soptions(db_options);
-    s = impl->options_.env->NewWritableFile(
-        LogFileName(impl->options_.wal_dir, new_log_number), &lfile,
-        impl->options_.env->OptimizeForLogWrite(soptions));
-    if (s.ok()) {
-      lfile->SetPreallocationBlockSize(1.1 * max_write_buffer_size);
-      impl->logfile_number_ = new_log_number;
-      impl->log_.reset(new log::Writer(std::move(lfile)));
-
-      // set column family handles
-      for (auto cf : column_families) {
-        auto cfd =
-            impl->versions_->GetColumnFamilySet()->GetColumnFamily(cf.name);
-        if (cfd == nullptr) {
-          s = Status::InvalidArgument("Column family not found: ", cf.name);
-          break;
-        }
-        handles->push_back(
-            new ColumnFamilyHandleImpl(cfd, impl, &impl->mutex_));
-      }
-    }
-    if (s.ok()) {
-      for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
-        delete cfd->InstallSuperVersion(new SuperVersion(), &impl->mutex_);
-      }
-      impl->alive_log_files_.push_back(
-          DBImpl::LogFileNumberSize(impl->logfile_number_));
-      impl->DeleteObsoleteFiles();
-      impl->MaybeScheduleFlushOrCompaction();
-      impl->MaybeScheduleLogDBDeployStats();
-      s = impl->db_directory_->Fsync();
-    }
-  }
-
-  if (s.ok()) {
-    for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
-      if (cfd->options()->compaction_style == kCompactionStyleUniversal) {
-        Version* current = cfd->current();
-        for (int i = 1; i < current->NumberLevels(); ++i) {
-          int num_files = current->NumLevelFiles(i);
-          if (num_files > 0) {
-            s = Status::InvalidArgument("Not all files are at level 0. Cannot "
-                "open with universal compaction style.");
-            break;
-          }
-        }
-      }
-      if (cfd->options()->merge_operator != nullptr &&
-          !cfd->mem()->IsMergeOperatorSupported()) {
-        s = Status::InvalidArgument(
-            "The memtable of column family %s does not support merge operator "
-            "its options.merge_operator is non-null", cfd->GetName().c_str());
-      }
-      if (!s.ok()) {
-        break;
-      }
-    }
-  }
-
-  impl->mutex_.Unlock();
-
-  if (s.ok()) {
-    impl->opened_successfully_ = true;
-    *dbptr = impl;
-  } else {
-    for (auto h : *handles) {
-      delete h;
-    }
-    handles->clear();
-    delete impl;
-  }
-  return s;
-}
-
-Status DB::ListColumnFamilies(const DBOptions& db_options,
-                              const std::string& name,
-                              std::vector<std::string>* column_families) {
-  return VersionSet::ListColumnFamilies(column_families, name, db_options.env);
-}
-
-Snapshot::~Snapshot() {
-}
-
-Status DestroyDB(const std::string& dbname, const Options& options) {
-  const InternalKeyComparator comparator(options.comparator);
-  const InternalFilterPolicy filter_policy(options.filter_policy);
-  const Options& soptions(SanitizeOptions(
-    dbname, &comparator, &filter_policy, options));
-  Env* env = soptions.env;
-  std::vector<std::string> filenames;
-  std::vector<std::string> archiveFiles;
-
-  std::string archivedir = ArchivalDirectory(dbname);
-  // Ignore error in case directory does not exist
-  env->GetChildren(dbname, &filenames);
-
-  if (dbname != soptions.wal_dir) {
-    std::vector<std::string> logfilenames;
-    env->GetChildren(soptions.wal_dir, &logfilenames);
-    filenames.insert(filenames.end(), logfilenames.begin(), logfilenames.end());
-    archivedir = ArchivalDirectory(soptions.wal_dir);
-  }
-
-  if (filenames.empty()) {
-    return Status::OK();
-  }
-
-  FileLock* lock;
-  const std::string lockname = LockFileName(dbname);
-  Status result = env->LockFile(lockname, &lock);
-  if (result.ok()) {
-    uint64_t number;
-    FileType type;
-    for (size_t i = 0; i < filenames.size(); i++) {
-      if (ParseFileName(filenames[i], &number, &type) &&
-          type != kDBLockFile) {  // Lock file will be deleted at end
-        Status del;
-        if (type == kMetaDatabase) {
-          del = DestroyDB(dbname + "/" + filenames[i], options);
-        } else if (type == kLogFile) {
-          del = env->DeleteFile(soptions.wal_dir + "/" + filenames[i]);
-        } else {
-          del = env->DeleteFile(dbname + "/" + filenames[i]);
-        }
-        if (result.ok() && !del.ok()) {
-          result = del;
-        }
-      }
-    }
-
-    env->GetChildren(archivedir, &archiveFiles);
-    // Delete archival files.
-    for (size_t i = 0; i < archiveFiles.size(); ++i) {
-      if (ParseFileName(archiveFiles[i], &number, &type) &&
-          type == kLogFile) {
-        Status del = env->DeleteFile(archivedir + "/" + archiveFiles[i]);
-        if (result.ok() && !del.ok()) {
-          result = del;
-        }
-      }
-    }
-    // ignore case where no archival directory is present.
-    env->DeleteDir(archivedir);
-
-    env->UnlockFile(lock);  // Ignore error since state is already gone
-    env->DeleteFile(lockname);
-    env->DeleteDir(dbname);  // Ignore error in case dir contains other files
-    env->DeleteDir(soptions.wal_dir);
-  }
-  return result;
-}
-
-//
-// A global method that can dump out the build version
-void DumpLeveldbBuildVersion(Logger * log) {
-#if !defined(IOS_CROSS_COMPILE)
-  // if we compile with Xcode, we don't run build_detect_vesion, so we don't generate util/build_version.cc
-  Log(log, "Git sha %s", rocksdb_build_git_sha);
-  Log(log, "Compile time %s %s",
-      rocksdb_build_compile_time, rocksdb_build_compile_date);
-#endif
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/db_impl.h b/src/rocksdb/db/db_impl.h
deleted file mode 100644
index cc59cfd..0000000
--- a/src/rocksdb/db/db_impl.h
+++ /dev/null
@@ -1,623 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#pragma once
-
-#include <atomic>
-#include <deque>
-#include <set>
-#include <utility>
-#include <vector>
-#include <string>
-
-#include "db/dbformat.h"
-#include "db/log_writer.h"
-#include "db/snapshot.h"
-#include "db/column_family.h"
-#include "db/version_edit.h"
-#include "memtable_list.h"
-#include "port/port.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/transaction_log.h"
-#include "util/autovector.h"
-#include "util/stats_logger.h"
-#include "util/thread_local.h"
-#include "db/internal_stats.h"
-
-namespace rocksdb {
-
-class MemTable;
-class TableCache;
-class Version;
-class VersionEdit;
-class VersionSet;
-class CompactionFilterV2;
-
-class DBImpl : public DB {
- public:
-  DBImpl(const DBOptions& options, const std::string& dbname);
-  virtual ~DBImpl();
-
-  // Implementations of the DB interface
-  using DB::Put;
-  virtual Status Put(const WriteOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     const Slice& value);
-  using DB::Merge;
-  virtual Status Merge(const WriteOptions& options,
-                       ColumnFamilyHandle* column_family, const Slice& key,
-                       const Slice& value);
-  using DB::Delete;
-  virtual Status Delete(const WriteOptions& options,
-                        ColumnFamilyHandle* column_family, const Slice& key);
-  using DB::Write;
-  virtual Status Write(const WriteOptions& options, WriteBatch* updates);
-  using DB::Get;
-  virtual Status Get(const ReadOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     std::string* value);
-  using DB::MultiGet;
-  virtual std::vector<Status> MultiGet(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      const std::vector<Slice>& keys, std::vector<std::string>* values);
-
-  virtual Status CreateColumnFamily(const ColumnFamilyOptions& options,
-                                    const std::string& column_family,
-                                    ColumnFamilyHandle** handle);
-  virtual Status DropColumnFamily(ColumnFamilyHandle* column_family);
-
-  // Returns false if key doesn't exist in the database and true if it may.
-  // If value_found is not passed in as null, then return the value if found in
-  // memory. On return, if value was found, then value_found will be set to true
-  // , otherwise false.
-  using DB::KeyMayExist;
-  virtual bool KeyMayExist(const ReadOptions& options,
-                           ColumnFamilyHandle* column_family, const Slice& key,
-                           std::string* value, bool* value_found = nullptr);
-  using DB::NewIterator;
-  virtual Iterator* NewIterator(const ReadOptions& options,
-                                ColumnFamilyHandle* column_family);
-  virtual Status NewIterators(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_families,
-      std::vector<Iterator*>* iterators);
-  virtual const Snapshot* GetSnapshot();
-  virtual void ReleaseSnapshot(const Snapshot* snapshot);
-  using DB::GetProperty;
-  virtual bool GetProperty(ColumnFamilyHandle* column_family,
-                           const Slice& property, std::string* value);
-  using DB::GetApproximateSizes;
-  virtual void GetApproximateSizes(ColumnFamilyHandle* column_family,
-                                   const Range* range, int n, uint64_t* sizes);
-  using DB::CompactRange;
-  virtual Status CompactRange(ColumnFamilyHandle* column_family,
-                              const Slice* begin, const Slice* end,
-                              bool reduce_level = false, int target_level = -1);
-
-  using DB::NumberLevels;
-  virtual int NumberLevels(ColumnFamilyHandle* column_family);
-  using DB::MaxMemCompactionLevel;
-  virtual int MaxMemCompactionLevel(ColumnFamilyHandle* column_family);
-  using DB::Level0StopWriteTrigger;
-  virtual int Level0StopWriteTrigger(ColumnFamilyHandle* column_family);
-  virtual const std::string& GetName() const;
-  virtual Env* GetEnv() const;
-  using DB::GetOptions;
-  virtual const Options& GetOptions(ColumnFamilyHandle* column_family) const;
-  using DB::Flush;
-  virtual Status Flush(const FlushOptions& options,
-                       ColumnFamilyHandle* column_family);
-
-  virtual SequenceNumber GetLatestSequenceNumber() const;
-
-#ifndef ROCKSDB_LITE
-  virtual Status DisableFileDeletions();
-  virtual Status EnableFileDeletions(bool force);
-  // All the returned filenames start with "/"
-  virtual Status GetLiveFiles(std::vector<std::string>&,
-                              uint64_t* manifest_file_size,
-                              bool flush_memtable = true);
-  virtual Status GetSortedWalFiles(VectorLogPtr& files);
-
-  virtual Status GetUpdatesSince(
-      SequenceNumber seq_number, unique_ptr<TransactionLogIterator>* iter,
-      const TransactionLogIterator::ReadOptions&
-          read_options = TransactionLogIterator::ReadOptions());
-  virtual Status DeleteFile(std::string name);
-
-  virtual void GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata);
-#endif  // ROCKSDB_LITE
-
-  // checks if all live files exist on file system and that their file sizes
-  // match to our in-memory records
-  virtual Status CheckConsistency();
-
-  virtual Status GetDbIdentity(std::string& identity);
-
-  Status RunManualCompaction(ColumnFamilyData* cfd, int input_level,
-                             int output_level, const Slice* begin,
-                             const Slice* end);
-
-#ifndef ROCKSDB_LITE
-  // Extra methods (for testing) that are not in the public DB interface
-  // Implemented in db_impl_debug.cc
-
-  // Compact any files in the named level that overlap [*begin, *end]
-  Status TEST_CompactRange(int level, const Slice* begin, const Slice* end,
-                           ColumnFamilyHandle* column_family = nullptr);
-
-  // Force current memtable contents to be flushed.
-  Status TEST_FlushMemTable(bool wait = true);
-
-  // Wait for memtable compaction
-  Status TEST_WaitForFlushMemTable(ColumnFamilyHandle* column_family = nullptr);
-
-  // Wait for any compaction
-  Status TEST_WaitForCompact();
-
-  // Return an internal iterator over the current state of the database.
-  // The keys of this iterator are internal keys (see format.h).
-  // The returned iterator should be deleted when no longer needed.
-  Iterator* TEST_NewInternalIterator(ColumnFamilyHandle* column_family =
-                                         nullptr);
-
-  // Return the maximum overlapping data (in bytes) at next level for any
-  // file at a level >= 1.
-  int64_t TEST_MaxNextLevelOverlappingBytes(ColumnFamilyHandle* column_family =
-                                                nullptr);
-
-  // Return the current manifest file no.
-  uint64_t TEST_Current_Manifest_FileNo();
-
-  // Trigger's a background call for testing.
-  void TEST_PurgeObsoleteteWAL();
-
-  // get total level0 file size. Only for testing.
-  uint64_t TEST_GetLevel0TotalSize();
-
-  void TEST_SetDefaultTimeToCheck(uint64_t default_interval_to_delete_obsolete_WAL)
-  {
-    default_interval_to_delete_obsolete_WAL_ = default_interval_to_delete_obsolete_WAL;
-  }
-
-  void TEST_GetFilesMetaData(ColumnFamilyHandle* column_family,
-                             std::vector<std::vector<FileMetaData>>* metadata);
-
-  Status TEST_ReadFirstRecord(const WalFileType type, const uint64_t number,
-                              SequenceNumber* sequence);
-
-  Status TEST_ReadFirstLine(const std::string& fname, SequenceNumber* sequence);
-#endif  // NDEBUG
-
-  // needed for CleanupIteratorState
-  struct DeletionState {
-    inline bool HaveSomethingToDelete() const {
-      return  candidate_files.size() ||
-        sst_delete_files.size() ||
-        log_delete_files.size();
-    }
-
-    // a list of all files that we'll consider deleting
-    // (every once in a while this is filled up with all files
-    // in the DB directory)
-    std::vector<std::string> candidate_files;
-
-    // the list of all live sst files that cannot be deleted
-    std::vector<uint64_t> sst_live;
-
-    // a list of sst files that we need to delete
-    std::vector<FileMetaData*> sst_delete_files;
-
-    // a list of log files that we need to delete
-    std::vector<uint64_t> log_delete_files;
-
-    // a list of memtables to be free
-    autovector<MemTable*> memtables_to_free;
-
-    autovector<SuperVersion*> superversions_to_free;
-
-    SuperVersion* new_superversion;  // if nullptr no new superversion
-
-    // the current manifest_file_number, log_number and prev_log_number
-    // that corresponds to the set of files in 'live'.
-    uint64_t manifest_file_number, pending_manifest_file_number, log_number,
-        prev_log_number;
-
-    explicit DeletionState(bool create_superversion = false) {
-      manifest_file_number = 0;
-      pending_manifest_file_number = 0;
-      log_number = 0;
-      prev_log_number = 0;
-      new_superversion = create_superversion ? new SuperVersion() : nullptr;
-    }
-
-    ~DeletionState() {
-      // free pending memtables
-      for (auto m : memtables_to_free) {
-        delete m;
-      }
-      // free superversions
-      for (auto s : superversions_to_free) {
-        delete s;
-      }
-      // if new_superversion was not used, it will be non-nullptr and needs
-      // to be freed here
-      delete new_superversion;
-    }
-  };
-
-  // Returns the list of live files in 'live' and the list
-  // of all files in the filesystem in 'candidate_files'.
-  // If force == false and the last call was less than
-  // options_.delete_obsolete_files_period_micros microseconds ago,
-  // it will not fill up the deletion_state
-  void FindObsoleteFiles(DeletionState& deletion_state,
-                         bool force,
-                         bool no_full_scan = false);
-
-  // Diffs the files listed in filenames and those that do not
-  // belong to live files are posibly removed. Also, removes all the
-  // files in sst_delete_files and log_delete_files.
-  // It is not necessary to hold the mutex when invoking this method.
-  void PurgeObsoleteFiles(DeletionState& deletion_state);
-
-  ColumnFamilyHandle* DefaultColumnFamily() const;
-
- protected:
-  Env* const env_;
-  const std::string dbname_;
-  unique_ptr<VersionSet> versions_;
-  const DBOptions options_;
-
-  Iterator* NewInternalIterator(const ReadOptions&, ColumnFamilyData* cfd,
-                                SuperVersion* super_version);
-
- private:
-  friend class DB;
-  friend class InternalStats;
-#ifndef ROCKSDB_LITE
-  friend class TailingIterator;
-#endif
-  friend struct SuperVersion;
-  struct CompactionState;
-  struct Writer;
-
-  Status NewDB();
-
-  // Recover the descriptor from persistent storage.  May do a significant
-  // amount of work to recover recently logged updates.  Any changes to
-  // be made to the descriptor are added to *edit.
-  Status Recover(const std::vector<ColumnFamilyDescriptor>& column_families,
-                 bool read_only = false, bool error_if_log_file_exist = false);
-
-  void MaybeIgnoreError(Status* s) const;
-
-  const Status CreateArchivalDirectory();
-
-  // Delete any unneeded files and stale in-memory entries.
-  void DeleteObsoleteFiles();
-
-  // Flush the in-memory write buffer to storage.  Switches to a new
-  // log-file/memtable and writes a new descriptor iff successful.
-  Status FlushMemTableToOutputFile(ColumnFamilyData* cfd, bool* madeProgress,
-                                   DeletionState& deletion_state,
-                                   LogBuffer* log_buffer);
-
-  Status RecoverLogFile(uint64_t log_number, SequenceNumber* max_sequence,
-                        bool read_only);
-
-  // The following two methods are used to flush a memtable to
-  // storage. The first one is used atdatabase RecoveryTime (when the
-  // database is opened) and is heavyweight because it holds the mutex
-  // for the entire period. The second method WriteLevel0Table supports
-  // concurrent flush memtables to storage.
-  Status WriteLevel0TableForRecovery(ColumnFamilyData* cfd, MemTable* mem,
-                                     VersionEdit* edit);
-  Status WriteLevel0Table(ColumnFamilyData* cfd, autovector<MemTable*>& mems,
-                          VersionEdit* edit, uint64_t* filenumber,
-                          LogBuffer* log_buffer);
-
-  uint64_t SlowdownAmount(int n, double bottom, double top);
-
-  // TODO(icanadi) free superversion_to_free and old_log outside of mutex
-  Status MakeRoomForWrite(ColumnFamilyData* cfd,
-                          bool force /* flush even if there is room? */,
-                          autovector<SuperVersion*>* superversions_to_free,
-                          autovector<log::Writer*>* logs_to_free);
-
-  void BuildBatchGroup(Writer** last_writer,
-                       autovector<WriteBatch*>* write_batch_group);
-
-  // Force current memtable contents to be flushed.
-  Status FlushMemTable(ColumnFamilyData* cfd, const FlushOptions& options);
-
-  // Wait for memtable flushed
-  Status WaitForFlushMemTable(ColumnFamilyData* cfd);
-
-  void MaybeScheduleLogDBDeployStats();
-
-#ifndef ROCKSDB_LITE
-  static void BGLogDBDeployStats(void* db);
-  void LogDBDeployStats();
-#endif  // ROCKSDB_LITE
-
-  void MaybeScheduleFlushOrCompaction();
-  static void BGWorkCompaction(void* db);
-  static void BGWorkFlush(void* db);
-  void BackgroundCallCompaction();
-  void BackgroundCallFlush();
-  Status BackgroundCompaction(bool* madeProgress, DeletionState& deletion_state,
-                              LogBuffer* log_buffer);
-  Status BackgroundFlush(bool* madeProgress, DeletionState& deletion_state,
-                         LogBuffer* log_buffer);
-  void CleanupCompaction(CompactionState* compact, Status status);
-  Status DoCompactionWork(CompactionState* compact,
-                          DeletionState& deletion_state,
-                          LogBuffer* log_buffer);
-
-  // This function is called as part of compaction. It enables Flush process to
-  // preempt compaction, since it's higher prioirty
-  // Returns: micros spent executing
-  uint64_t CallFlushDuringCompaction(ColumnFamilyData* cfd,
-                                     DeletionState& deletion_state,
-                                     LogBuffer* log_buffer);
-
-  // Call compaction filter if is_compaction_v2 is not true. Then iterate
-  // through input and compact the kv-pairs
-  Status ProcessKeyValueCompaction(
-    SequenceNumber visible_at_tip,
-    SequenceNumber earliest_snapshot,
-    SequenceNumber latest_snapshot,
-    DeletionState& deletion_state,
-    bool bottommost_level,
-    int64_t& imm_micros,
-    Iterator* input,
-    CompactionState* compact,
-    bool is_compaction_v2,
-    LogBuffer* log_buffer);
-
-  // Call compaction_filter_v2->Filter() on kv-pairs in compact
-  void CallCompactionFilterV2(CompactionState* compact,
-    CompactionFilterV2* compaction_filter_v2);
-
-  Status OpenCompactionOutputFile(CompactionState* compact);
-  Status FinishCompactionOutputFile(CompactionState* compact, Iterator* input);
-  Status InstallCompactionResults(CompactionState* compact,
-                                  LogBuffer* log_buffer);
-  void AllocateCompactionOutputFileNumbers(CompactionState* compact);
-  void ReleaseCompactionUnusedFileNumbers(CompactionState* compact);
-
-#ifdef ROCKSDB_LITE
-  void PurgeObsoleteWALFiles() {
-    // this function is used for archiving WAL files. we don't need this in
-    // ROCKSDB_LITE
-  }
-#else
-  void PurgeObsoleteWALFiles();
-
-  Status GetSortedWalsOfType(const std::string& path,
-                             VectorLogPtr& log_files,
-                             WalFileType type);
-
-  // Requires: all_logs should be sorted with earliest log file first
-  // Retains all log files in all_logs which contain updates with seq no.
-  // Greater Than or Equal to the requested SequenceNumber.
-  Status RetainProbableWalFiles(VectorLogPtr& all_logs,
-                                const SequenceNumber target);
-
-  Status ReadFirstRecord(const WalFileType type, const uint64_t number,
-                         SequenceNumber* sequence);
-
-  Status ReadFirstLine(const std::string& fname, SequenceNumber* sequence);
-#endif  // ROCKSDB_LITE
-
-  void PrintStatistics();
-
-  // dump rocksdb.stats to LOG
-  void MaybeDumpStats();
-
-  // Return true if the current db supports snapshot.  If the current
-  // DB does not support snapshot, then calling GetSnapshot() will always
-  // return nullptr.
-  //
-  // @see GetSnapshot()
-  virtual bool IsSnapshotSupported() const;
-
-  // Return the minimum empty level that could hold the total data in the
-  // input level. Return the input level, if such level could not be found.
-  int FindMinimumEmptyLevelFitting(ColumnFamilyData* cfd, int level);
-
-  // Move the files in the input level to the target level.
-  // If target_level < 0, automatically calculate the minimum level that could
-  // hold the data set.
-  Status ReFitLevel(ColumnFamilyData* cfd, int level, int target_level = -1);
-
-  // table_cache_ provides its own synchronization
-  std::shared_ptr<Cache> table_cache_;
-
-  // Lock over the persistent DB state.  Non-nullptr iff successfully acquired.
-  FileLock* db_lock_;
-
-  // State below is protected by mutex_
-  port::Mutex mutex_;
-  port::AtomicPointer shutting_down_;
-  port::CondVar bg_cv_;          // Signalled when background work finishes
-  uint64_t logfile_number_;
-  unique_ptr<log::Writer> log_;
-  bool log_empty_;
-  ColumnFamilyHandleImpl* default_cf_handle_;
-  unique_ptr<ColumnFamilyMemTablesImpl> column_family_memtables_;
-  struct LogFileNumberSize {
-    explicit LogFileNumberSize(uint64_t _number)
-        : number(_number), size(0), getting_flushed(false) {}
-    void AddSize(uint64_t new_size) { size += new_size; }
-    uint64_t number;
-    uint64_t size;
-    bool getting_flushed;
-  };
-  std::deque<LogFileNumberSize> alive_log_files_;
-  uint64_t total_log_size_;
-  // only used for dynamically adjusting max_total_wal_size. it is a sum of
-  // [write_buffer_size * max_write_buffer_number] over all column families
-  uint64_t max_total_in_memory_state_;
-
-  std::string host_name_;
-
-  std::unique_ptr<Directory> db_directory_;
-
-  // Queue of writers.
-  std::deque<Writer*> writers_;
-  WriteBatch tmp_batch_;
-
-  SnapshotList snapshots_;
-
-  // cache for ReadFirstRecord() calls
-  std::unordered_map<uint64_t, SequenceNumber> read_first_record_cache_;
-  port::Mutex read_first_record_cache_mutex_;
-
-  // Set of table files to protect from deletion because they are
-  // part of ongoing compactions.
-  std::set<uint64_t> pending_outputs_;
-
-  // At least one compaction or flush job is pending but not yet scheduled
-  // because of the max background thread limit.
-  bool bg_schedule_needed_;
-
-  // count how many background compactions are running or have been scheduled
-  int bg_compaction_scheduled_;
-
-  // If non-zero, MaybeScheduleFlushOrCompaction() will only schedule manual
-  // compactions (if manual_compaction_ is not null). This mechanism enables
-  // manual compactions to wait until all other compactions are finished.
-  int bg_manual_only_;
-
-  // number of background memtable flush jobs, submitted to the HIGH pool
-  int bg_flush_scheduled_;
-
-  // Has a background stats log thread scheduled?
-  bool bg_logstats_scheduled_;
-
-  // Information for a manual compaction
-  struct ManualCompaction {
-    ColumnFamilyData* cfd;
-    int input_level;
-    int output_level;
-    bool done;
-    Status status;
-    bool in_progress;           // compaction request being processed?
-    const InternalKey* begin;   // nullptr means beginning of key range
-    const InternalKey* end;     // nullptr means end of key range
-    InternalKey tmp_storage;    // Used to keep track of compaction progress
-  };
-  ManualCompaction* manual_compaction_;
-
-  // Have we encountered a background error in paranoid mode?
-  Status bg_error_;
-
-  std::unique_ptr<StatsLogger> logger_;
-
-  int64_t volatile last_log_ts;
-
-  // shall we disable deletion of obsolete files
-  // if 0 the deletion is enabled.
-  // if non-zero, files will not be getting deleted
-  // This enables two different threads to call
-  // EnableFileDeletions() and DisableFileDeletions()
-  // without any synchronization
-  int disable_delete_obsolete_files_;
-
-  // last time when DeleteObsoleteFiles was invoked
-  uint64_t delete_obsolete_files_last_run_;
-
-  // last time when PurgeObsoleteWALFiles ran.
-  uint64_t purge_wal_files_last_run_;
-
-  // last time stats were dumped to LOG
-  std::atomic<uint64_t> last_stats_dump_time_microsec_;
-
-  // obsolete files will be deleted every this seconds if ttl deletion is
-  // enabled and archive size_limit is disabled.
-  uint64_t default_interval_to_delete_obsolete_WAL_;
-
-  bool flush_on_destroy_; // Used when disableWAL is true.
-
-  static const int KEEP_LOG_FILE_NUM = 1000;
-  std::string db_absolute_path_;
-
-  // count of the number of contiguous delaying writes
-  int delayed_writes_;
-
-  // The options to access storage files
-  const EnvOptions storage_options_;
-
-  // A value of true temporarily disables scheduling of background work
-  bool bg_work_gate_closed_;
-
-  // Guard against multiple concurrent refitting
-  bool refitting_level_;
-
-  // Indicate DB was opened successfully
-  bool opened_successfully_;
-
-  // No copying allowed
-  DBImpl(const DBImpl&);
-  void operator=(const DBImpl&);
-
-  // dump the delayed_writes_ to the log file and reset counter.
-  void DelayLoggingAndReset();
-
-  // Return the earliest snapshot where seqno is visible.
-  // Store the snapshot right before that, if any, in prev_snapshot
-  inline SequenceNumber findEarliestVisibleSnapshot(
-    SequenceNumber in,
-    std::vector<SequenceNumber>& snapshots,
-    SequenceNumber* prev_snapshot);
-
-  // Background threads call this function, which is just a wrapper around
-  // the cfd->InstallSuperVersion() function. Background threads carry
-  // deletion_state which can have new_superversion already allocated.
-  void InstallSuperVersion(ColumnFamilyData* cfd,
-                           DeletionState& deletion_state);
-
-#ifndef ROCKSDB_LITE
-  using DB::GetPropertiesOfAllTables;
-  virtual Status GetPropertiesOfAllTables(ColumnFamilyHandle* column_family,
-                                          TablePropertiesCollection* props)
-      override;
-#endif  // ROCKSDB_LITE
-
-  // Function that Get and KeyMayExist call with no_io true or false
-  // Note: 'value_found' from KeyMayExist propagates here
-  Status GetImpl(const ReadOptions& options, ColumnFamilyHandle* column_family,
-                 const Slice& key, std::string* value,
-                 bool* value_found = nullptr);
-};
-
-// Sanitize db options.  The caller should delete result.info_log if
-// it is not equal to src.info_log.
-extern Options SanitizeOptions(const std::string& db,
-                               const InternalKeyComparator* icmp,
-                               const InternalFilterPolicy* ipolicy,
-                               const Options& src);
-extern DBOptions SanitizeOptions(const std::string& db, const DBOptions& src);
-
-// Determine compression type, based on user options, level of the output
-// file and whether compression is disabled.
-// If enable_compression is false, then compression is always disabled no
-// matter what the values of the other two parameters are.
-// Otherwise, the compression type is determined based on options and level.
-CompressionType GetCompressionType(const Options& options, int level,
-                                   const bool enable_compression);
-
-// Determine compression type for L0 file written by memtable flush.
-CompressionType GetCompressionFlush(const Options& options);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/db_impl_debug.cc b/src/rocksdb/db/db_impl_debug.cc
deleted file mode 100644
index d6551b4..0000000
--- a/src/rocksdb/db/db_impl_debug.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-
-#include "db/db_impl.h"
-
-namespace rocksdb {
-
-void DBImpl::TEST_PurgeObsoleteteWAL() { PurgeObsoleteWALFiles(); }
-
-uint64_t DBImpl::TEST_GetLevel0TotalSize() {
-  MutexLock l(&mutex_);
-  return default_cf_handle_->cfd()->current()->NumLevelBytes(0);
-}
-
-Iterator* DBImpl::TEST_NewInternalIterator(ColumnFamilyHandle* column_family) {
-  ColumnFamilyData* cfd;
-  if (column_family == nullptr) {
-    cfd = default_cf_handle_->cfd();
-  } else {
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-    cfd = cfh->cfd();
-  }
-
-  mutex_.Lock();
-  SuperVersion* super_version = cfd->GetSuperVersion()->Ref();
-  mutex_.Unlock();
-  ReadOptions roptions;
-  return NewInternalIterator(roptions, cfd, super_version);
-}
-
-int64_t DBImpl::TEST_MaxNextLevelOverlappingBytes(
-    ColumnFamilyHandle* column_family) {
-  ColumnFamilyData* cfd;
-  if (column_family == nullptr) {
-    cfd = default_cf_handle_->cfd();
-  } else {
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-    cfd = cfh->cfd();
-  }
-  MutexLock l(&mutex_);
-  return cfd->current()->MaxNextLevelOverlappingBytes();
-}
-
-void DBImpl::TEST_GetFilesMetaData(
-    ColumnFamilyHandle* column_family,
-    std::vector<std::vector<FileMetaData>>* metadata) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-  MutexLock l(&mutex_);
-  metadata->resize(NumberLevels());
-  for (int level = 0; level < NumberLevels(); level++) {
-    const std::vector<FileMetaData*>& files = cfd->current()->files_[level];
-
-    (*metadata)[level].clear();
-    for (const auto& f : files) {
-      (*metadata)[level].push_back(*f);
-    }
-  }
-}
-
-uint64_t DBImpl::TEST_Current_Manifest_FileNo() {
-  return versions_->ManifestFileNumber();
-}
-
-Status DBImpl::TEST_CompactRange(int level, const Slice* begin,
-                                 const Slice* end,
-                                 ColumnFamilyHandle* column_family) {
-  ColumnFamilyData* cfd;
-  if (column_family == nullptr) {
-    cfd = default_cf_handle_->cfd();
-  } else {
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-    cfd = cfh->cfd();
-  }
-  int output_level =
-      (cfd->options()->compaction_style == kCompactionStyleUniversal)
-          ? level
-          : level + 1;
-  return RunManualCompaction(cfd, level, output_level, begin, end);
-}
-
-Status DBImpl::TEST_FlushMemTable(bool wait) {
-  FlushOptions fo;
-  fo.wait = wait;
-  return FlushMemTable(default_cf_handle_->cfd(), fo);
-}
-
-Status DBImpl::TEST_WaitForFlushMemTable(ColumnFamilyHandle* column_family) {
-  ColumnFamilyData* cfd;
-  if (column_family == nullptr) {
-    cfd = default_cf_handle_->cfd();
-  } else {
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-    cfd = cfh->cfd();
-  }
-  return WaitForFlushMemTable(cfd);
-}
-
-Status DBImpl::TEST_WaitForCompact() {
-  // Wait until the compaction completes
-
-  // TODO: a bug here. This function actually does not necessarily
-  // wait for compact. It actually waits for scheduled compaction
-  // OR flush to finish.
-
-  MutexLock l(&mutex_);
-  while ((bg_compaction_scheduled_ || bg_flush_scheduled_) && bg_error_.ok()) {
-    bg_cv_.Wait();
-  }
-  return bg_error_;
-}
-
-Status DBImpl::TEST_ReadFirstRecord(const WalFileType type,
-                                    const uint64_t number,
-                                    SequenceNumber* sequence) {
-  return ReadFirstRecord(type, number, sequence);
-}
-
-Status DBImpl::TEST_ReadFirstLine(const std::string& fname,
-                                  SequenceNumber* sequence) {
-  return ReadFirstLine(fname, sequence);
-}
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/db_impl_readonly.cc b/src/rocksdb/db/db_impl_readonly.cc
deleted file mode 100644
index 4308374..0000000
--- a/src/rocksdb/db/db_impl_readonly.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 Facebook. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "db/db_impl_readonly.h"
-#include "db/db_impl.h"
-
-#include <algorithm>
-#include <set>
-#include <string>
-#include <stdint.h>
-#include <stdio.h>
-#include <vector>
-#include <algorithm>
-#include "db/db_iter.h"
-#include "db/dbformat.h"
-#include "db/filename.h"
-#include "db/log_reader.h"
-#include "db/log_writer.h"
-#include "db/memtable.h"
-#include "db/merge_context.h"
-#include "db/table_cache.h"
-#include "db/version_set.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-#include "rocksdb/table.h"
-#include "rocksdb/merge_operator.h"
-#include "port/port.h"
-#include "table/block.h"
-#include "table/merger.h"
-#include "table/two_level_iterator.h"
-#include "util/coding.h"
-#include "util/logging.h"
-#include "util/build_version.h"
-
-namespace rocksdb {
-
-DBImplReadOnly::DBImplReadOnly(const DBOptions& options,
-                               const std::string& dbname)
-    : DBImpl(options, dbname) {
-  Log(options_.info_log, "Opening the db in read only mode");
-}
-
-DBImplReadOnly::~DBImplReadOnly() {
-}
-
-// Implementations of the DB interface
-Status DBImplReadOnly::Get(const ReadOptions& options,
-                           ColumnFamilyHandle* column_family, const Slice& key,
-                           std::string* value) {
-  Status s;
-  SequenceNumber snapshot = versions_->LastSequence();
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-  SuperVersion* super_version = cfd->GetSuperVersion();
-  MergeContext merge_context;
-  LookupKey lkey(key, snapshot);
-  if (super_version->mem->Get(lkey, value, &s, merge_context,
-                              *cfd->options())) {
-  } else {
-    Version::GetStats stats;
-    super_version->current->Get(options, lkey, value, &s, &merge_context,
-                                &stats);
-  }
-  return s;
-}
-
-Iterator* DBImplReadOnly::NewIterator(const ReadOptions& options,
-                                      ColumnFamilyHandle* column_family) {
-  auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-  auto cfd = cfh->cfd();
-  SuperVersion* super_version = cfd->GetSuperVersion()->Ref();
-  SequenceNumber latest_snapshot = versions_->LastSequence();
-  Iterator* internal_iter = NewInternalIterator(options, cfd, super_version);
-  return NewDBIterator(
-      env_, *cfd->options(), cfd->user_comparator(), internal_iter,
-      (options.snapshot != nullptr
-           ? reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_
-           : latest_snapshot));
-}
-
-Status DB::OpenForReadOnly(const Options& options, const std::string& dbname,
-                           DB** dbptr, bool error_if_log_file_exist) {
-  *dbptr = nullptr;
-
-  DBOptions db_options(options);
-  ColumnFamilyOptions cf_options(options);
-  std::vector<ColumnFamilyDescriptor> column_families;
-  column_families.push_back(
-      ColumnFamilyDescriptor(kDefaultColumnFamilyName, cf_options));
-  std::vector<ColumnFamilyHandle*> handles;
-
-  Status s =
-      DB::OpenForReadOnly(db_options, dbname, column_families, &handles, dbptr);
-  if (s.ok()) {
-    assert(handles.size() == 1);
-    // i can delete the handle since DBImpl is always holding a
-    // reference to default column family
-    delete handles[0];
-  }
-  return s;
-}
-
-Status DB::OpenForReadOnly(
-    const DBOptions& db_options, const std::string& dbname,
-    const std::vector<ColumnFamilyDescriptor>& column_families,
-    std::vector<ColumnFamilyHandle*>* handles, DB** dbptr,
-    bool error_if_log_file_exist) {
-  *dbptr = nullptr;
-  handles->clear();
-
-  DBImplReadOnly* impl = new DBImplReadOnly(db_options, dbname);
-  impl->mutex_.Lock();
-  Status s = impl->Recover(column_families, true /* read only */,
-                           error_if_log_file_exist);
-  if (s.ok()) {
-    // set column family handles
-    for (auto cf : column_families) {
-      auto cfd =
-          impl->versions_->GetColumnFamilySet()->GetColumnFamily(cf.name);
-      if (cfd == nullptr) {
-        s = Status::InvalidArgument("Column family not found: ", cf.name);
-        break;
-      }
-      handles->push_back(new ColumnFamilyHandleImpl(cfd, impl, &impl->mutex_));
-    }
-  }
-  if (s.ok()) {
-    for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
-      delete cfd->InstallSuperVersion(new SuperVersion(), &impl->mutex_);
-    }
-  }
-  impl->mutex_.Unlock();
-  if (s.ok()) {
-    *dbptr = impl;
-  } else {
-    for (auto h : *handles) {
-      delete h;
-    }
-    handles->clear();
-    delete impl;
-  }
-  return s;
-}
-
-
-}   // namespace rocksdb
diff --git a/src/rocksdb/db/db_impl_readonly.h b/src/rocksdb/db/db_impl_readonly.h
deleted file mode 100644
index c4703ba..0000000
--- a/src/rocksdb/db/db_impl_readonly.h
+++ /dev/null
@@ -1,103 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 Facebook. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#pragma once
-#include "db/db_impl.h"
-
-#include <deque>
-#include <set>
-#include <vector>
-#include <string>
-#include "db/dbformat.h"
-#include "db/log_writer.h"
-#include "db/snapshot.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "port/port.h"
-#include "util/stats_logger.h"
-
-namespace rocksdb {
-
-class DBImplReadOnly : public DBImpl {
- public:
-  DBImplReadOnly(const DBOptions& options, const std::string& dbname);
-  virtual ~DBImplReadOnly();
-
-  // Implementations of the DB interface
-  using DB::Get;
-  virtual Status Get(const ReadOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     std::string* value);
-
-  // TODO: Implement ReadOnly MultiGet?
-
-  using DBImpl::NewIterator;
-  virtual Iterator* NewIterator(const ReadOptions&,
-                                ColumnFamilyHandle* column_family);
-
-  virtual Status NewIterators(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      std::vector<Iterator*>* iterators) {
-   // TODO
-    return Status::NotSupported("Not supported yet.");
-  }
-
-  using DBImpl::Put;
-  virtual Status Put(const WriteOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     const Slice& value) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  using DBImpl::Merge;
-  virtual Status Merge(const WriteOptions& options,
-                       ColumnFamilyHandle* column_family, const Slice& key,
-                       const Slice& value) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  using DBImpl::Delete;
-  virtual Status Delete(const WriteOptions& options,
-                        ColumnFamilyHandle* column_family, const Slice& key) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  virtual Status Write(const WriteOptions& options, WriteBatch* updates) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  using DBImpl::CompactRange;
-  virtual Status CompactRange(ColumnFamilyHandle* column_family,
-                              const Slice* begin, const Slice* end,
-                              bool reduce_level = false,
-                              int target_level = -1) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  virtual Status DisableFileDeletions() {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  virtual Status EnableFileDeletions(bool force) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  virtual Status GetLiveFiles(std::vector<std::string>&,
-                              uint64_t* manifest_file_size,
-                              bool flush_memtable = true) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-  using DBImpl::Flush;
-  virtual Status Flush(const FlushOptions& options,
-                       ColumnFamilyHandle* column_family) {
-    return Status::NotSupported("Not supported operation in read only mode.");
-  }
-
- private:
-  friend class DB;
-
-  // No copying allowed
-  DBImplReadOnly(const DBImplReadOnly&);
-  void operator=(const DBImplReadOnly&);
-};
-}
diff --git a/src/rocksdb/db/db_iter.cc b/src/rocksdb/db/db_iter.cc
deleted file mode 100644
index a6d765d..0000000
--- a/src/rocksdb/db/db_iter.cc
+++ /dev/null
@@ -1,477 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/db_iter.h"
-#include <stdexcept>
-#include <deque>
-
-#include "db/filename.h"
-#include "db/dbformat.h"
-#include "rocksdb/env.h"
-#include "rocksdb/options.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/merge_operator.h"
-#include "port/port.h"
-#include "util/logging.h"
-#include "util/mutexlock.h"
-#include "util/perf_context_imp.h"
-
-namespace rocksdb {
-
-#if 0
-static void DumpInternalIter(Iterator* iter) {
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    ParsedInternalKey k;
-    if (!ParseInternalKey(iter->key(), &k)) {
-      fprintf(stderr, "Corrupt '%s'\n", EscapeString(iter->key()).c_str());
-    } else {
-      fprintf(stderr, "@ '%s'\n", k.DebugString().c_str());
-    }
-  }
-}
-#endif
-
-namespace {
-
-// Memtables and sstables that make the DB representation contain
-// (userkey,seq,type) => uservalue entries.  DBIter
-// combines multiple entries for the same userkey found in the DB
-// representation into a single entry while accounting for sequence
-// numbers, deletion markers, overwrites, etc.
-class DBIter: public Iterator {
- public:
-  // The following is grossly complicated. TODO: clean it up
-  // Which direction is the iterator currently moving?
-  // (1) When moving forward, the internal iterator is positioned at
-  //     the exact entry that yields this->key(), this->value()
-  // (2) When moving backwards, the internal iterator is positioned
-  //     just before all entries whose user key == this->key().
-  enum Direction {
-    kForward,
-    kReverse
-  };
-
-  DBIter(Env* env, const Options& options,
-         const Comparator* cmp, Iterator* iter, SequenceNumber s)
-      : env_(env),
-        logger_(options.info_log.get()),
-        user_comparator_(cmp),
-        user_merge_operator_(options.merge_operator.get()),
-        iter_(iter),
-        sequence_(s),
-        direction_(kForward),
-        valid_(false),
-        current_entry_is_merged_(false),
-        statistics_(options.statistics.get()) {
-    RecordTick(statistics_, NO_ITERATORS, 1);
-    max_skip_ = options.max_sequential_skip_in_iterations;
-  }
-  virtual ~DBIter() {
-    RecordTick(statistics_, NO_ITERATORS, -1);
-    delete iter_;
-  }
-  virtual bool Valid() const { return valid_; }
-  virtual Slice key() const {
-    assert(valid_);
-    return saved_key_.GetKey();
-  }
-  virtual Slice value() const {
-    assert(valid_);
-    return (direction_ == kForward && !current_entry_is_merged_) ?
-      iter_->value() : saved_value_;
-  }
-  virtual Status status() const {
-    if (status_.ok()) {
-      return iter_->status();
-    } else {
-      return status_;
-    }
-  }
-
-  virtual void Next();
-  virtual void Prev();
-  virtual void Seek(const Slice& target);
-  virtual void SeekToFirst();
-  virtual void SeekToLast();
-
- private:
-  inline void FindNextUserEntry(bool skipping);
-  void FindNextUserEntryInternal(bool skipping);
-  void FindPrevUserEntry();
-  bool ParseKey(ParsedInternalKey* key);
-  void MergeValuesNewToOld();
-
-  inline void ClearSavedValue() {
-    if (saved_value_.capacity() > 1048576) {
-      std::string empty;
-      swap(empty, saved_value_);
-    } else {
-      saved_value_.clear();
-    }
-  }
-
-  Env* const env_;
-  Logger* logger_;
-  const Comparator* const user_comparator_;
-  const MergeOperator* const user_merge_operator_;
-  Iterator* const iter_;
-  SequenceNumber const sequence_;
-
-  Status status_;
-  IterKey saved_key_;   // == current key when direction_==kReverse
-  std::string saved_value_;   // == current raw value when direction_==kReverse
-  std::string skip_key_;
-  Direction direction_;
-  bool valid_;
-  bool current_entry_is_merged_;
-  Statistics* statistics_;
-  uint64_t max_skip_;
-
-  // No copying allowed
-  DBIter(const DBIter&);
-  void operator=(const DBIter&);
-};
-
-inline bool DBIter::ParseKey(ParsedInternalKey* ikey) {
-  if (!ParseInternalKey(iter_->key(), ikey)) {
-    status_ = Status::Corruption("corrupted internal key in DBIter");
-    Log(logger_, "corrupted internal key in DBIter: %s",
-        iter_->key().ToString(true).c_str());
-    return false;
-  } else {
-    return true;
-  }
-}
-
-void DBIter::Next() {
-  assert(valid_);
-
-  if (direction_ == kReverse) {  // Switch directions?
-    direction_ = kForward;
-    // iter_ is pointing just before the entries for this->key(),
-    // so advance into the range of entries for this->key() and then
-    // use the normal skipping code below.
-    if (!iter_->Valid()) {
-      iter_->SeekToFirst();
-    } else {
-      iter_->Next();
-    }
-    if (!iter_->Valid()) {
-      valid_ = false;
-      saved_key_.Clear();
-      return;
-    }
-  }
-
-  // If the current value is merged, we might already hit end of iter_
-  if (!iter_->Valid()) {
-    valid_ = false;
-    return;
-  }
-  FindNextUserEntry(true /* skipping the current user key */);
-}
-
-
-// PRE: saved_key_ has the current user key if skipping
-// POST: saved_key_ should have the next user key if valid_,
-//       if the current entry is a result of merge
-//           current_entry_is_merged_ => true
-//           saved_value_             => the merged value
-//
-// NOTE: In between, saved_key_ can point to a user key that has
-//       a delete marker
-inline void DBIter::FindNextUserEntry(bool skipping) {
-  PERF_TIMER_AUTO(find_next_user_entry_time);
-  FindNextUserEntryInternal(skipping);
-  PERF_TIMER_STOP(find_next_user_entry_time);
-}
-
-// Actual implementation of DBIter::FindNextUserEntry()
-void DBIter::FindNextUserEntryInternal(bool skipping) {
-  // Loop until we hit an acceptable entry to yield
-  assert(iter_->Valid());
-  assert(direction_ == kForward);
-  current_entry_is_merged_ = false;
-  uint64_t num_skipped = 0;
-  do {
-    ParsedInternalKey ikey;
-    if (ParseKey(&ikey) && ikey.sequence <= sequence_) {
-      if (skipping &&
-          user_comparator_->Compare(ikey.user_key, saved_key_.GetKey()) <= 0) {
-        num_skipped++; // skip this entry
-        PERF_COUNTER_ADD(internal_key_skipped_count, 1);
-      } else {
-        skipping = false;
-        switch (ikey.type) {
-          case kTypeDeletion:
-            // Arrange to skip all upcoming entries for this key since
-            // they are hidden by this deletion.
-            saved_key_.SetUserKey(ikey.user_key);
-            skipping = true;
-            num_skipped = 0;
-            PERF_COUNTER_ADD(internal_delete_skipped_count, 1);
-            break;
-          case kTypeValue:
-            valid_ = true;
-            saved_key_.SetUserKey(ikey.user_key);
-            return;
-          case kTypeMerge:
-            // By now, we are sure the current ikey is going to yield a value
-            saved_key_.SetUserKey(ikey.user_key);
-            current_entry_is_merged_ = true;
-            valid_ = true;
-            MergeValuesNewToOld();  // Go to a different state machine
-            return;
-          default:
-            assert(false);
-            break;
-        }
-      }
-    }
-    // If we have sequentially iterated via numerous keys and still not
-    // found the next user-key, then it is better to seek so that we can
-    // avoid too many key comparisons. We seek to the last occurence of
-    // our current key by looking for sequence number 0.
-    if (skipping && num_skipped > max_skip_) {
-      num_skipped = 0;
-      std::string last_key;
-      AppendInternalKey(&last_key, ParsedInternalKey(saved_key_.GetKey(), 0,
-                                                     kValueTypeForSeek));
-      iter_->Seek(last_key);
-      RecordTick(statistics_, NUMBER_OF_RESEEKS_IN_ITERATION);
-    } else {
-      iter_->Next();
-    }
-  } while (iter_->Valid());
-  valid_ = false;
-}
-
-// Merge values of the same user key starting from the current iter_ position
-// Scan from the newer entries to older entries.
-// PRE: iter_->key() points to the first merge type entry
-//      saved_key_ stores the user key
-// POST: saved_value_ has the merged value for the user key
-//       iter_ points to the next entry (or invalid)
-void DBIter::MergeValuesNewToOld() {
-  if (!user_merge_operator_) {
-    Log(logger_, "Options::merge_operator is null.");
-    throw std::logic_error("DBIter::MergeValuesNewToOld() with"
-                           " Options::merge_operator null");
-  }
-
-  // Start the merge process by pushing the first operand
-  std::deque<std::string> operands;
-  operands.push_front(iter_->value().ToString());
-
-  std::string merge_result;   // Temporary string to hold merge result later
-  ParsedInternalKey ikey;
-  for (iter_->Next(); iter_->Valid(); iter_->Next()) {
-    if (!ParseKey(&ikey)) {
-      // skip corrupted key
-      continue;
-    }
-
-    if (user_comparator_->Compare(ikey.user_key, saved_key_.GetKey()) != 0) {
-      // hit the next user key, stop right here
-      break;
-    }
-
-    if (kTypeDeletion == ikey.type) {
-      // hit a delete with the same user key, stop right here
-      // iter_ is positioned after delete
-      iter_->Next();
-      break;
-    }
-
-    if (kTypeValue == ikey.type) {
-      // hit a put, merge the put value with operands and store the
-      // final result in saved_value_. We are done!
-      // ignore corruption if there is any.
-      const Slice value = iter_->value();
-      user_merge_operator_->FullMerge(ikey.user_key, &value, operands,
-                                      &saved_value_, logger_);
-      // iter_ is positioned after put
-      iter_->Next();
-      return;
-    }
-
-    if (kTypeMerge == ikey.type) {
-      // hit a merge, add the value as an operand and run associative merge.
-      // when complete, add result to operands and continue.
-      const Slice& value = iter_->value();
-      operands.push_front(value.ToString());
-    }
-  }
-
-  // we either exhausted all internal keys under this user key, or hit
-  // a deletion marker.
-  // feed null as the existing value to the merge operator, such that
-  // client can differentiate this scenario and do things accordingly.
-  user_merge_operator_->FullMerge(saved_key_.GetKey(), nullptr, operands,
-                                  &saved_value_, logger_);
-}
-
-void DBIter::Prev() {
-  assert(valid_);
-
-  // Throw an exception now if merge_operator is provided
-  // TODO: support backward iteration
-  if (user_merge_operator_) {
-    Log(logger_, "Prev not supported yet if merge_operator is provided");
-    throw std::logic_error("DBIter::Prev backward iteration not supported"
-                           " if merge_operator is provided");
-  }
-
-  if (direction_ == kForward) {  // Switch directions?
-    // iter_ is pointing at the current entry.  Scan backwards until
-    // the key changes so we can use the normal reverse scanning code.
-    assert(iter_->Valid());  // Otherwise valid_ would have been false
-    saved_key_.SetUserKey(ExtractUserKey(iter_->key()));
-    while (true) {
-      iter_->Prev();
-      if (!iter_->Valid()) {
-        valid_ = false;
-        saved_key_.Clear();
-        ClearSavedValue();
-        return;
-      }
-      if (user_comparator_->Compare(ExtractUserKey(iter_->key()),
-                                    saved_key_.GetKey()) < 0) {
-        break;
-      }
-    }
-    direction_ = kReverse;
-  }
-
-  FindPrevUserEntry();
-}
-
-void DBIter::FindPrevUserEntry() {
-  assert(direction_ == kReverse);
-  uint64_t num_skipped = 0;
-
-  ValueType value_type = kTypeDeletion;
-  bool saved_key_valid = true;
-  if (iter_->Valid()) {
-    do {
-      ParsedInternalKey ikey;
-      if (ParseKey(&ikey) && ikey.sequence <= sequence_) {
-        if ((value_type != kTypeDeletion) &&
-            user_comparator_->Compare(ikey.user_key, saved_key_.GetKey()) < 0) {
-          // We encountered a non-deleted value in entries for previous keys,
-          break;
-        }
-        value_type = ikey.type;
-        if (value_type == kTypeDeletion) {
-          saved_key_.Clear();
-          ClearSavedValue();
-          saved_key_valid = false;
-        } else {
-          Slice raw_value = iter_->value();
-          if (saved_value_.capacity() > raw_value.size() + 1048576) {
-            std::string empty;
-            swap(empty, saved_value_);
-          }
-          saved_key_.SetUserKey(ExtractUserKey(iter_->key()));
-          saved_value_.assign(raw_value.data(), raw_value.size());
-        }
-      } else {
-        // In the case of ikey.sequence > sequence_, we might have already
-        // iterated to a different user key.
-        saved_key_valid = false;
-      }
-      num_skipped++;
-      // If we have sequentially iterated via numerous keys and still not
-      // found the prev user-key, then it is better to seek so that we can
-      // avoid too many key comparisons. We seek to the first occurence of
-      // our current key by looking for max sequence number.
-      if (saved_key_valid && num_skipped > max_skip_) {
-        num_skipped = 0;
-        std::string last_key;
-        AppendInternalKey(&last_key, ParsedInternalKey(saved_key_.GetKey(),
-                                                       kMaxSequenceNumber,
-                                                       kValueTypeForSeek));
-        iter_->Seek(last_key);
-        RecordTick(statistics_, NUMBER_OF_RESEEKS_IN_ITERATION);
-      } else {
-        iter_->Prev();
-      }
-    } while (iter_->Valid());
-  }
-
-  if (value_type == kTypeDeletion) {
-    // End
-    valid_ = false;
-    saved_key_.Clear();
-    ClearSavedValue();
-    direction_ = kForward;
-  } else {
-    valid_ = true;
-  }
-}
-
-void DBIter::Seek(const Slice& target) {
-  saved_key_.Clear();
-  // now savved_key is used to store internal key.
-  saved_key_.SetInternalKey(target, sequence_);
-  PERF_TIMER_AUTO(seek_internal_seek_time);
-  iter_->Seek(saved_key_.GetKey());
-  PERF_TIMER_STOP(seek_internal_seek_time);
-  if (iter_->Valid()) {
-    direction_ = kForward;
-    ClearSavedValue();
-    FindNextUserEntry(false /*not skipping */);
-  } else {
-    valid_ = false;
-  }
-}
-
-void DBIter::SeekToFirst() {
-  direction_ = kForward;
-  ClearSavedValue();
-  PERF_TIMER_AUTO(seek_internal_seek_time);
-  iter_->SeekToFirst();
-  PERF_TIMER_STOP(seek_internal_seek_time);
-  if (iter_->Valid()) {
-    FindNextUserEntry(false /* not skipping */);
-  } else {
-    valid_ = false;
-  }
-}
-
-void DBIter::SeekToLast() {
-  // Throw an exception for now if merge_operator is provided
-  // TODO: support backward iteration
-  if (user_merge_operator_) {
-    Log(logger_, "SeekToLast not supported yet if merge_operator is provided");
-    throw std::logic_error("DBIter::SeekToLast: backward iteration not"
-                           " supported if merge_operator is provided");
-  }
-
-  direction_ = kReverse;
-  ClearSavedValue();
-  PERF_TIMER_AUTO(seek_internal_seek_time);
-  iter_->SeekToLast();
-  PERF_TIMER_STOP(seek_internal_seek_time);
-  FindPrevUserEntry();
-}
-
-}  // anonymous namespace
-
-Iterator* NewDBIterator(
-    Env* env,
-    const Options& options,
-    const Comparator *user_key_comparator,
-    Iterator* internal_iter,
-    const SequenceNumber& sequence) {
-  return new DBIter(env, options, user_key_comparator,
-                    internal_iter, sequence);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/db_iter.h b/src/rocksdb/db/db_iter.h
deleted file mode 100644
index d8a3bad..0000000
--- a/src/rocksdb/db/db_iter.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <stdint.h>
-#include "rocksdb/db.h"
-#include "db/dbformat.h"
-
-namespace rocksdb {
-
-// Return a new iterator that converts internal keys (yielded by
-// "*internal_iter") that were live at the specified "sequence" number
-// into appropriate user keys.
-extern Iterator* NewDBIterator(
-    Env* env,
-    const Options& options,
-    const Comparator *user_key_comparator,
-    Iterator* internal_iter,
-    const SequenceNumber& sequence);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/db_stats_logger.cc b/src/rocksdb/db/db_stats_logger.cc
deleted file mode 100644
index 288e1bf..0000000
--- a/src/rocksdb/db/db_stats_logger.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/db_impl.h"
-#include <string>
-#include <stdint.h>
-#include <stdio.h>
-#include "db/version_set.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "port/port.h"
-#include "util/mutexlock.h"
-
-namespace rocksdb {
-
-void DBImpl::MaybeScheduleLogDBDeployStats() {
-// we did say maybe
-#ifndef ROCKSDB_LITE
-  // There is a lock in the actual logger.
-  if (!logger_ || options_.db_stats_log_interval < 0
-      || host_name_.empty()) {
-    return;
-  }
-
-  if(bg_logstats_scheduled_ || shutting_down_.Acquire_Load()) {
-    // Already scheduled
-  } else {
-    int64_t current_ts = 0;
-    Status st = env_->GetCurrentTime(&current_ts);
-    if (!st.ok()) {
-      return;
-    }
-    if ((current_ts - last_log_ts) < options_.db_stats_log_interval) {
-      return;
-    }
-    last_log_ts = current_ts;
-    bg_logstats_scheduled_ = true;
-    env_->Schedule(&DBImpl::BGLogDBDeployStats, this);
-  }
-}
-
-void DBImpl::BGLogDBDeployStats(void* db) {
-  DBImpl* db_inst = reinterpret_cast<DBImpl*>(db);
-  db_inst->LogDBDeployStats();
-}
-
-void DBImpl::LogDBDeployStats() {
-  mutex_.Lock();
-
-  if (shutting_down_.Acquire_Load()) {
-    bg_logstats_scheduled_ = false;
-    bg_cv_.SignalAll();
-    mutex_.Unlock();
-    return;
-  }
-
-  char tmp_ver[100];
-  sprintf(tmp_ver, "%d.%d", kMajorVersion, kMinorVersion);
-  std::string version_info(tmp_ver);
-
-  uint64_t file_total_size = 0;
-  uint32_t file_total_num = 0;
-  Version* current = default_cf_handle_->cfd()->current();
-  for (int i = 0; i < current->NumberLevels(); i++) {
-    file_total_num += current->NumLevelFiles(i);
-    file_total_size += current->NumLevelBytes(i);
-  }
-
-  Version::LevelSummaryStorage scratch;
-  const char* file_num_summary = current->LevelSummary(&scratch);
-  std::string file_num_per_level(file_num_summary);
-  std::string data_size_per_level(file_num_summary);
-
-  mutex_.Unlock();
-
-  int64_t unix_ts;
-  env_->GetCurrentTime(&unix_ts);
-
-  logger_->Log_Deploy_Stats(version_info, host_name_,
-      db_absolute_path_, file_total_size, file_total_num, file_num_per_level,
-      data_size_per_level, unix_ts);
-
-  mutex_.Lock();
-  bg_logstats_scheduled_ = false;
-  bg_cv_.SignalAll();
-  mutex_.Unlock();
-#endif
-}
-}
diff --git a/src/rocksdb/db/db_test.cc b/src/rocksdb/db/db_test.cc
deleted file mode 100644
index 88637ef..0000000
--- a/src/rocksdb/db/db_test.cc
+++ /dev/null
@@ -1,6764 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <algorithm>
-#include <iostream>
-#include <set>
-#include <unistd.h>
-#include <unordered_set>
-
-#include "db/dbformat.h"
-#include "db/db_impl.h"
-#include "db/filename.h"
-#include "db/version_set.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/cache.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/perf_context.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-#include "table/block_based_table_factory.h"
-#include "table/plain_table_factory.h"
-#include "util/hash.h"
-#include "util/hash_linklist_rep.h"
-#include "utilities/merge_operators.h"
-#include "util/logging.h"
-#include "util/mutexlock.h"
-#include "util/statistics.h"
-#include "util/testharness.h"
-#include "util/sync_point.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-static bool SnappyCompressionSupported(const CompressionOptions& options) {
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::Snappy_Compress(options, in.data(), in.size(), &out);
-}
-
-static bool ZlibCompressionSupported(const CompressionOptions& options) {
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::Zlib_Compress(options, in.data(), in.size(), &out);
-}
-
-static bool BZip2CompressionSupported(const CompressionOptions& options) {
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::BZip2_Compress(options, in.data(), in.size(), &out);
-}
-
-static bool LZ4CompressionSupported(const CompressionOptions &options) {
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::LZ4_Compress(options, in.data(), in.size(), &out);
-}
-
-static bool LZ4HCCompressionSupported(const CompressionOptions &options) {
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::LZ4HC_Compress(options, in.data(), in.size(), &out);
-}
-
-static std::string RandomString(Random *rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-
-namespace anon {
-class AtomicCounter {
- private:
-  port::Mutex mu_;
-  int count_;
- public:
-  AtomicCounter() : count_(0) { }
-  void Increment() {
-    MutexLock l(&mu_);
-    count_++;
-  }
-  int Read() {
-    MutexLock l(&mu_);
-    return count_;
-  }
-  void Reset() {
-    MutexLock l(&mu_);
-    count_ = 0;
-  }
-};
-
-}
-
-// Special Env used to delay background operations
-class SpecialEnv : public EnvWrapper {
- public:
-  // sstable Sync() calls are blocked while this pointer is non-nullptr.
-  port::AtomicPointer delay_sstable_sync_;
-
-  // Simulate no-space errors while this pointer is non-nullptr.
-  port::AtomicPointer no_space_;
-
-  // Simulate non-writable file system while this pointer is non-nullptr
-  port::AtomicPointer non_writable_;
-
-  // Force sync of manifest files to fail while this pointer is non-nullptr
-  port::AtomicPointer manifest_sync_error_;
-
-  // Force write to manifest files to fail while this pointer is non-nullptr
-  port::AtomicPointer manifest_write_error_;
-
-  // Force write to log files to fail while this pointer is non-nullptr
-  port::AtomicPointer log_write_error_;
-
-  bool count_random_reads_;
-  anon::AtomicCounter random_read_counter_;
-
-  bool count_sequential_reads_;
-  anon::AtomicCounter sequential_read_counter_;
-
-  anon::AtomicCounter sleep_counter_;
-
-  explicit SpecialEnv(Env* base) : EnvWrapper(base) {
-    delay_sstable_sync_.Release_Store(nullptr);
-    no_space_.Release_Store(nullptr);
-    non_writable_.Release_Store(nullptr);
-    count_random_reads_ = false;
-    count_sequential_reads_ = false;
-    manifest_sync_error_.Release_Store(nullptr);
-    manifest_write_error_.Release_Store(nullptr);
-    log_write_error_.Release_Store(nullptr);
-   }
-
-  Status NewWritableFile(const std::string& f, unique_ptr<WritableFile>* r,
-                         const EnvOptions& soptions) {
-    class SSTableFile : public WritableFile {
-     private:
-      SpecialEnv* env_;
-      unique_ptr<WritableFile> base_;
-
-     public:
-      SSTableFile(SpecialEnv* env, unique_ptr<WritableFile>&& base)
-          : env_(env),
-            base_(std::move(base)) {
-      }
-      Status Append(const Slice& data) {
-        if (env_->no_space_.Acquire_Load() != nullptr) {
-          // Drop writes on the floor
-          return Status::OK();
-        } else {
-          return base_->Append(data);
-        }
-      }
-      Status Close() { return base_->Close(); }
-      Status Flush() { return base_->Flush(); }
-      Status Sync() {
-        while (env_->delay_sstable_sync_.Acquire_Load() != nullptr) {
-          env_->SleepForMicroseconds(100000);
-        }
-        return base_->Sync();
-      }
-    };
-    class ManifestFile : public WritableFile {
-     private:
-      SpecialEnv* env_;
-      unique_ptr<WritableFile> base_;
-     public:
-      ManifestFile(SpecialEnv* env, unique_ptr<WritableFile>&& b)
-          : env_(env), base_(std::move(b)) { }
-      Status Append(const Slice& data) {
-        if (env_->manifest_write_error_.Acquire_Load() != nullptr) {
-          return Status::IOError("simulated writer error");
-        } else {
-          return base_->Append(data);
-        }
-      }
-      Status Close() { return base_->Close(); }
-      Status Flush() { return base_->Flush(); }
-      Status Sync() {
-        if (env_->manifest_sync_error_.Acquire_Load() != nullptr) {
-          return Status::IOError("simulated sync error");
-        } else {
-          return base_->Sync();
-        }
-      }
-    };
-    class LogFile : public WritableFile {
-     private:
-      SpecialEnv* env_;
-      unique_ptr<WritableFile> base_;
-     public:
-      LogFile(SpecialEnv* env, unique_ptr<WritableFile>&& b)
-          : env_(env), base_(std::move(b)) { }
-      Status Append(const Slice& data) {
-        if (env_->log_write_error_.Acquire_Load() != nullptr) {
-          return Status::IOError("simulated writer error");
-        } else {
-          return base_->Append(data);
-        }
-      }
-      Status Close() { return base_->Close(); }
-      Status Flush() { return base_->Flush(); }
-      Status Sync() { return base_->Sync(); }
-    };
-
-    if (non_writable_.Acquire_Load() != nullptr) {
-      return Status::IOError("simulated write error");
-    }
-
-    Status s = target()->NewWritableFile(f, r, soptions);
-    if (s.ok()) {
-      if (strstr(f.c_str(), ".sst") != nullptr) {
-        r->reset(new SSTableFile(this, std::move(*r)));
-      } else if (strstr(f.c_str(), "MANIFEST") != nullptr) {
-        r->reset(new ManifestFile(this, std::move(*r)));
-      } else if (strstr(f.c_str(), "log") != nullptr) {
-        r->reset(new LogFile(this, std::move(*r)));
-      }
-    }
-    return s;
-  }
-
-  Status NewRandomAccessFile(const std::string& f,
-                             unique_ptr<RandomAccessFile>* r,
-                             const EnvOptions& soptions) {
-    class CountingFile : public RandomAccessFile {
-     private:
-      unique_ptr<RandomAccessFile> target_;
-      anon::AtomicCounter* counter_;
-     public:
-      CountingFile(unique_ptr<RandomAccessFile>&& target,
-                   anon::AtomicCounter* counter)
-          : target_(std::move(target)), counter_(counter) {
-      }
-      virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                          char* scratch) const {
-        counter_->Increment();
-        return target_->Read(offset, n, result, scratch);
-      }
-    };
-
-    Status s = target()->NewRandomAccessFile(f, r, soptions);
-    if (s.ok() && count_random_reads_) {
-      r->reset(new CountingFile(std::move(*r), &random_read_counter_));
-    }
-    return s;
-  }
-
-  Status NewSequentialFile(const std::string& f, unique_ptr<SequentialFile>* r,
-                           const EnvOptions& soptions) {
-    class CountingFile : public SequentialFile {
-     private:
-      unique_ptr<SequentialFile> target_;
-      anon::AtomicCounter* counter_;
-
-     public:
-      CountingFile(unique_ptr<SequentialFile>&& target,
-                   anon::AtomicCounter* counter)
-          : target_(std::move(target)), counter_(counter) {}
-      virtual Status Read(size_t n, Slice* result, char* scratch) {
-        counter_->Increment();
-        return target_->Read(n, result, scratch);
-      }
-      virtual Status Skip(uint64_t n) { return target_->Skip(n); }
-    };
-
-    Status s = target()->NewSequentialFile(f, r, soptions);
-    if (s.ok() && count_sequential_reads_) {
-      r->reset(new CountingFile(std::move(*r), &sequential_read_counter_));
-    }
-    return s;
-  }
-
-  virtual void SleepForMicroseconds(int micros) {
-    sleep_counter_.Increment();
-    target()->SleepForMicroseconds(micros);
-  }
-};
-
-class DBTest {
- private:
-  const FilterPolicy* filter_policy_;
-
- protected:
-  // Sequence of option configurations to try
-  enum OptionConfig {
-    kBlockBasedTableWithWholeKeyHashIndex,
-    kDefault,
-    kBlockBasedTableWithPrefixHashIndex,
-    kPlainTableFirstBytePrefix,
-    kPlainTableAllBytesPrefix,
-    kVectorRep,
-    kHashLinkList,
-    kHashCuckoo,
-    kMergePut,
-    kFilter,
-    kUncompressed,
-    kNumLevel_3,
-    kDBLogDir,
-    kWalDir,
-    kManifestFileSize,
-    kCompactOnFlush,
-    kPerfOptions,
-    kDeletesFilterFirst,
-    kHashSkipList,
-    kUniversalCompaction,
-    kCompressedBlockCache,
-    kInfiniteMaxOpenFiles,
-    kxxHashChecksum,
-    kEnd
-  };
-  int option_config_;
-
- public:
-  std::string dbname_;
-  SpecialEnv* env_;
-  DB* db_;
-  std::vector<ColumnFamilyHandle*> handles_;
-
-  Options last_options_;
-
-  // Skip some options, as they may not be applicable to a specific test.
-  // To add more skip constants, use values 4, 8, 16, etc.
-  enum OptionSkip {
-    kNoSkip = 0,
-    kSkipDeletesFilterFirst = 1,
-    kSkipUniversalCompaction = 2,
-    kSkipMergePut = 4,
-    kSkipPlainTable = 8,
-    kSkipHashIndex = 16,
-    kSkipNoSeekToLast = 32,
-    kSkipHashCuckoo = 64
-  };
-
-  DBTest() : option_config_(kDefault),
-             env_(new SpecialEnv(Env::Default())) {
-    filter_policy_ = NewBloomFilterPolicy(10);
-    dbname_ = test::TmpDir() + "/db_test";
-    ASSERT_OK(DestroyDB(dbname_, Options()));
-    db_ = nullptr;
-    Reopen();
-  }
-
-  ~DBTest() {
-    Close();
-    ASSERT_OK(DestroyDB(dbname_, Options()));
-    delete env_;
-    delete filter_policy_;
-  }
-
-  // Switch to a fresh database with the next option configuration to
-  // test.  Return false if there are no more configurations to test.
-  bool ChangeOptions(int skip_mask = kNoSkip) {
-    for(option_config_++; option_config_ < kEnd; option_config_++) {
-      if ((skip_mask & kSkipDeletesFilterFirst) &&
-          option_config_ == kDeletesFilterFirst) {
-        continue;
-      }
-      if ((skip_mask & kSkipUniversalCompaction) &&
-          option_config_ == kUniversalCompaction) {
-        continue;
-      }
-      if ((skip_mask & kSkipMergePut) && option_config_ == kMergePut) {
-        continue;
-      }
-      if ((skip_mask & kSkipNoSeekToLast) &&
-          (option_config_ == kHashLinkList ||
-           option_config_ == kHashSkipList)) {;
-        continue;
-      }
-      if ((skip_mask & kSkipPlainTable)
-          && (option_config_ == kPlainTableAllBytesPrefix
-              || option_config_ == kPlainTableFirstBytePrefix)) {
-        continue;
-      }
-      if ((skip_mask & kSkipPlainTable) &&
-          (option_config_ == kBlockBasedTableWithPrefixHashIndex ||
-           option_config_ == kBlockBasedTableWithWholeKeyHashIndex)) {
-        continue;
-      }
-      if ((skip_mask & kSkipHashCuckoo) && (option_config_ == kHashCuckoo)) {
-        continue;
-      }
-      break;
-    }
-
-    if (option_config_ >= kEnd) {
-      Destroy(&last_options_);
-      return false;
-    } else {
-      DestroyAndReopen();
-      return true;
-    }
-  }
-
-  // Switch between different compaction styles (we have only 2 now).
-  bool ChangeCompactOptions(Options* prev_options = nullptr) {
-    if (option_config_ == kDefault) {
-      option_config_ = kUniversalCompaction;
-      if (prev_options == nullptr) {
-        prev_options = &last_options_;
-      }
-      Destroy(prev_options);
-      TryReopen();
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  // Return the current option configuration.
-  Options CurrentOptions() {
-    Options options;
-    return CurrentOptions(options);
-  }
-
-  Options CurrentOptions(const Options& defaultOptions) {
-    // this redudant copy is to minimize code change w/o having lint error.
-    Options options = defaultOptions;
-    switch (option_config_) {
-      case kHashSkipList:
-        options.prefix_extractor.reset(NewFixedPrefixTransform(1));
-        options.memtable_factory.reset(NewHashSkipListRepFactory());
-        break;
-      case kPlainTableFirstBytePrefix:
-        options.table_factory.reset(new PlainTableFactory());
-        options.prefix_extractor.reset(NewFixedPrefixTransform(1));
-        options.allow_mmap_reads = true;
-        options.max_sequential_skip_in_iterations = 999999;
-        break;
-      case kPlainTableAllBytesPrefix:
-        options.table_factory.reset(new PlainTableFactory());
-        options.prefix_extractor.reset(NewNoopTransform());
-        options.allow_mmap_reads = true;
-        options.max_sequential_skip_in_iterations = 999999;
-        break;
-      case kMergePut:
-        options.merge_operator = MergeOperators::CreatePutOperator();
-        break;
-      case kFilter:
-        options.filter_policy = filter_policy_;
-        break;
-      case kUncompressed:
-        options.compression = kNoCompression;
-        break;
-      case kNumLevel_3:
-        options.num_levels = 3;
-        break;
-      case kDBLogDir:
-        options.db_log_dir = test::TmpDir();
-        break;
-      case kWalDir:
-        options.wal_dir = "/tmp/wal";
-        break;
-      case kManifestFileSize:
-        options.max_manifest_file_size = 50; // 50 bytes
-      case kCompactOnFlush:
-        options.purge_redundant_kvs_while_flush =
-          !options.purge_redundant_kvs_while_flush;
-        break;
-      case kPerfOptions:
-        options.hard_rate_limit = 2.0;
-        options.rate_limit_delay_max_milliseconds = 2;
-        // TODO -- test more options
-        break;
-      case kDeletesFilterFirst:
-        options.filter_deletes = true;
-        break;
-      case kVectorRep:
-        options.memtable_factory.reset(new VectorRepFactory(100));
-        break;
-      case kHashLinkList:
-        options.prefix_extractor.reset(NewFixedPrefixTransform(1));
-        options.memtable_factory.reset(NewHashLinkListRepFactory(4, 0));
-        break;
-      case kHashCuckoo:
-        options.memtable_factory.reset(
-            NewHashCuckooRepFactory(options.write_buffer_size));
-        break;
-      case kUniversalCompaction:
-        options.compaction_style = kCompactionStyleUniversal;
-        break;
-      case kCompressedBlockCache:
-        options.allow_mmap_writes = true;
-        options.block_cache_compressed = NewLRUCache(8*1024*1024);
-        break;
-      case kInfiniteMaxOpenFiles:
-        options.max_open_files = -1;
-        break;
-      case kxxHashChecksum: {
-        BlockBasedTableOptions table_options;
-        table_options.checksum = kxxHash;
-        options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-        break;
-      }
-      case kBlockBasedTableWithPrefixHashIndex: {
-        BlockBasedTableOptions table_options;
-        table_options.index_type = BlockBasedTableOptions::kHashSearch;
-        options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-        options.prefix_extractor.reset(NewFixedPrefixTransform(1));
-        break;
-      }
-      case kBlockBasedTableWithWholeKeyHashIndex: {
-        BlockBasedTableOptions table_options;
-        table_options.index_type = BlockBasedTableOptions::kHashSearch;
-        options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-        options.prefix_extractor.reset(NewNoopTransform());
-        break;
-      }
-      default:
-        break;
-    }
-    return options;
-  }
-
-  DBImpl* dbfull() {
-    return reinterpret_cast<DBImpl*>(db_);
-  }
-
-  void CreateColumnFamilies(const std::vector<std::string>& cfs,
-                            const ColumnFamilyOptions* options = nullptr) {
-    ColumnFamilyOptions cf_opts;
-    if (options != nullptr) {
-      cf_opts = ColumnFamilyOptions(*options);
-    } else {
-      cf_opts = ColumnFamilyOptions(CurrentOptions());
-    }
-    int cfi = handles_.size();
-    handles_.resize(cfi + cfs.size());
-    for (auto cf : cfs) {
-      ASSERT_OK(db_->CreateColumnFamily(cf_opts, cf, &handles_[cfi++]));
-    }
-  }
-
-  void CreateAndReopenWithCF(const std::vector<std::string>& cfs,
-                             const Options* options = nullptr) {
-    CreateColumnFamilies(cfs, options);
-    std::vector<std::string> cfs_plus_default = cfs;
-    cfs_plus_default.insert(cfs_plus_default.begin(), kDefaultColumnFamilyName);
-    ReopenWithColumnFamilies(cfs_plus_default, options);
-  }
-
-  void ReopenWithColumnFamilies(const std::vector<std::string>& cfs,
-                                const std::vector<const Options*>& options) {
-    ASSERT_OK(TryReopenWithColumnFamilies(cfs, options));
-  }
-
-  void ReopenWithColumnFamilies(const std::vector<std::string>& cfs,
-                                const Options* options = nullptr) {
-    ASSERT_OK(TryReopenWithColumnFamilies(cfs, options));
-  }
-
-  Status TryReopenWithColumnFamilies(
-      const std::vector<std::string>& cfs,
-      const std::vector<const Options*>& options) {
-    Close();
-    ASSERT_EQ(cfs.size(), options.size());
-    std::vector<ColumnFamilyDescriptor> column_families;
-    for (size_t i = 0; i < cfs.size(); ++i) {
-      column_families.push_back(ColumnFamilyDescriptor(cfs[i], *options[i]));
-    }
-    DBOptions db_opts = DBOptions(*options[0]);
-    return DB::Open(db_opts, dbname_, column_families, &handles_, &db_);
-  }
-
-  Status TryReopenWithColumnFamilies(const std::vector<std::string>& cfs,
-                                     const Options* options = nullptr) {
-    Close();
-    Options opts = (options == nullptr) ? CurrentOptions() : *options;
-    std::vector<const Options*> v_opts(cfs.size(), &opts);
-    return TryReopenWithColumnFamilies(cfs, v_opts);
-  }
-
-  void Reopen(Options* options = nullptr) {
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void Close() {
-    for (auto h : handles_) {
-      delete h;
-    }
-    handles_.clear();
-    delete db_;
-    db_ = nullptr;
-  }
-
-  void DestroyAndReopen(Options* options = nullptr) {
-    //Destroy using last options
-    Destroy(&last_options_);
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void Destroy(Options* options) {
-    Close();
-    ASSERT_OK(DestroyDB(dbname_, *options));
-  }
-
-  Status ReadOnlyReopen(Options* options) {
-    return DB::OpenForReadOnly(*options, dbname_, &db_);
-  }
-
-  Status TryReopen(Options* options = nullptr) {
-    Close();
-    Options opts;
-    if (options != nullptr) {
-      opts = *options;
-    } else {
-      opts = CurrentOptions();
-      opts.create_if_missing = true;
-    }
-    last_options_ = opts;
-
-    return DB::Open(opts, dbname_, &db_);
-  }
-
-  Status Flush(int cf = 0) {
-    if (cf == 0) {
-      return db_->Flush(FlushOptions());
-    } else {
-      return db_->Flush(FlushOptions(), handles_[cf]);
-    }
-  }
-
-  Status Put(const Slice& k, const Slice& v, WriteOptions wo = WriteOptions()) {
-    if (kMergePut == option_config_ ) {
-      return db_->Merge(wo, k, v);
-    } else {
-      return db_->Put(wo, k, v);
-    }
-  }
-
-  Status Put(int cf, const Slice& k, const Slice& v,
-             WriteOptions wo = WriteOptions()) {
-    if (kMergePut == option_config_) {
-      return db_->Merge(wo, handles_[cf], k, v);
-    } else {
-      return db_->Put(wo, handles_[cf], k, v);
-    }
-  }
-
-  Status Delete(const std::string& k) {
-    return db_->Delete(WriteOptions(), k);
-  }
-
-  Status Delete(int cf, const std::string& k) {
-    return db_->Delete(WriteOptions(), handles_[cf], k);
-  }
-
-  std::string Get(const std::string& k, const Snapshot* snapshot = nullptr) {
-    ReadOptions options;
-    options.verify_checksums = true;
-    options.snapshot = snapshot;
-    std::string result;
-    Status s = db_->Get(options, k, &result);
-    if (s.IsNotFound()) {
-      result = "NOT_FOUND";
-    } else if (!s.ok()) {
-      result = s.ToString();
-    }
-    return result;
-  }
-
-  std::string Get(int cf, const std::string& k,
-                  const Snapshot* snapshot = nullptr) {
-    ReadOptions options;
-    options.verify_checksums = true;
-    options.snapshot = snapshot;
-    std::string result;
-    Status s = db_->Get(options, handles_[cf], k, &result);
-    if (s.IsNotFound()) {
-      result = "NOT_FOUND";
-    } else if (!s.ok()) {
-      result = s.ToString();
-    }
-    return result;
-  }
-
-  // Return a string that contains all key,value pairs in order,
-  // formatted like "(k1->v1)(k2->v2)".
-  std::string Contents(int cf = 0) {
-    std::vector<std::string> forward;
-    std::string result;
-    Iterator* iter = (cf == 0) ? db_->NewIterator(ReadOptions())
-                               : db_->NewIterator(ReadOptions(), handles_[cf]);
-    for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-      std::string s = IterStatus(iter);
-      result.push_back('(');
-      result.append(s);
-      result.push_back(')');
-      forward.push_back(s);
-    }
-
-    // Check reverse iteration results are the reverse of forward results
-    unsigned int matched = 0;
-    for (iter->SeekToLast(); iter->Valid(); iter->Prev()) {
-      ASSERT_LT(matched, forward.size());
-      ASSERT_EQ(IterStatus(iter), forward[forward.size() - matched - 1]);
-      matched++;
-    }
-    ASSERT_EQ(matched, forward.size());
-
-    delete iter;
-    return result;
-  }
-
-  std::string AllEntriesFor(const Slice& user_key, int cf = 0) {
-    Iterator* iter;
-    if (cf == 0) {
-      iter = dbfull()->TEST_NewInternalIterator();
-    } else {
-      iter = dbfull()->TEST_NewInternalIterator(handles_[cf]);
-    }
-    InternalKey target(user_key, kMaxSequenceNumber, kTypeValue);
-    iter->Seek(target.Encode());
-    std::string result;
-    if (!iter->status().ok()) {
-      result = iter->status().ToString();
-    } else {
-      result = "[ ";
-      bool first = true;
-      while (iter->Valid()) {
-        ParsedInternalKey ikey(Slice(), 0, kTypeValue);
-        if (!ParseInternalKey(iter->key(), &ikey)) {
-          result += "CORRUPTED";
-        } else {
-          if (last_options_.comparator->Compare(ikey.user_key, user_key) != 0) {
-            break;
-          }
-          if (!first) {
-            result += ", ";
-          }
-          first = false;
-          switch (ikey.type) {
-            case kTypeValue:
-              result += iter->value().ToString();
-              break;
-            case kTypeMerge:
-              // keep it the same as kTypeValue for testing kMergePut
-              result += iter->value().ToString();
-              break;
-            case kTypeDeletion:
-              result += "DEL";
-              break;
-            default:
-              assert(false);
-              break;
-          }
-        }
-        iter->Next();
-      }
-      if (!first) {
-        result += " ";
-      }
-      result += "]";
-    }
-    delete iter;
-    return result;
-  }
-
-  int NumTableFilesAtLevel(int level, int cf = 0) {
-    std::string property;
-    if (cf == 0) {
-      // default cfd
-      ASSERT_TRUE(db_->GetProperty(
-          "rocksdb.num-files-at-level" + NumberToString(level), &property));
-    } else {
-      ASSERT_TRUE(db_->GetProperty(
-          handles_[cf], "rocksdb.num-files-at-level" + NumberToString(level),
-          &property));
-    }
-    return atoi(property.c_str());
-  }
-
-  int TotalTableFiles(int cf = 0, int levels = -1) {
-    if (levels == -1) {
-      levels = CurrentOptions().num_levels;
-    }
-    int result = 0;
-    for (int level = 0; level < levels; level++) {
-      result += NumTableFilesAtLevel(level, cf);
-    }
-    return result;
-  }
-
-  // Return spread of files per level
-  std::string FilesPerLevel(int cf = 0) {
-    int num_levels =
-        (cf == 0) ? db_->NumberLevels() : db_->NumberLevels(handles_[1]);
-    std::string result;
-    int last_non_zero_offset = 0;
-    for (int level = 0; level < num_levels; level++) {
-      int f = NumTableFilesAtLevel(level, cf);
-      char buf[100];
-      snprintf(buf, sizeof(buf), "%s%d", (level ? "," : ""), f);
-      result += buf;
-      if (f > 0) {
-        last_non_zero_offset = result.size();
-      }
-    }
-    result.resize(last_non_zero_offset);
-    return result;
-  }
-
-  int CountFiles() {
-    std::vector<std::string> files;
-    env_->GetChildren(dbname_, &files);
-
-    std::vector<std::string> logfiles;
-    if (dbname_ != last_options_.wal_dir) {
-      env_->GetChildren(last_options_.wal_dir, &logfiles);
-    }
-
-    return static_cast<int>(files.size() + logfiles.size());
-  }
-
-  int CountLiveFiles() {
-    std::vector<LiveFileMetaData> metadata;
-    db_->GetLiveFilesMetaData(&metadata);
-    return metadata.size();
-  }
-
-  uint64_t Size(const Slice& start, const Slice& limit, int cf = 0) {
-    Range r(start, limit);
-    uint64_t size;
-    if (cf == 0) {
-      db_->GetApproximateSizes(&r, 1, &size);
-    } else {
-      db_->GetApproximateSizes(handles_[1], &r, 1, &size);
-    }
-    return size;
-  }
-
-  void Compact(int cf, const Slice& start, const Slice& limit) {
-    ASSERT_OK(db_->CompactRange(handles_[cf], &start, &limit));
-  }
-
-  void Compact(const Slice& start, const Slice& limit) {
-    ASSERT_OK(db_->CompactRange(&start, &limit));
-  }
-
-  // Do n memtable compactions, each of which produces an sstable
-  // covering the range [small,large].
-  void MakeTables(int n, const std::string& small, const std::string& large,
-                  int cf = 0) {
-    for (int i = 0; i < n; i++) {
-      ASSERT_OK(Put(cf, small, "begin"));
-      ASSERT_OK(Put(cf, large, "end"));
-      ASSERT_OK(Flush(cf));
-    }
-  }
-
-  // Prevent pushing of new sstables into deeper levels by adding
-  // tables that cover a specified range to all levels.
-  void FillLevels(const std::string& smallest, const std::string& largest,
-                  int cf) {
-    MakeTables(db_->NumberLevels(handles_[cf]), smallest, largest, cf);
-  }
-
-  void DumpFileCounts(const char* label) {
-    fprintf(stderr, "---\n%s:\n", label);
-    fprintf(stderr, "maxoverlap: %lld\n",
-            static_cast<long long>(
-                dbfull()->TEST_MaxNextLevelOverlappingBytes()));
-    for (int level = 0; level < db_->NumberLevels(); level++) {
-      int num = NumTableFilesAtLevel(level);
-      if (num > 0) {
-        fprintf(stderr, "  level %3d : %d files\n", level, num);
-      }
-    }
-  }
-
-  std::string DumpSSTableList() {
-    std::string property;
-    db_->GetProperty("rocksdb.sstables", &property);
-    return property;
-  }
-
-  std::string IterStatus(Iterator* iter) {
-    std::string result;
-    if (iter->Valid()) {
-      result = iter->key().ToString() + "->" + iter->value().ToString();
-    } else {
-      result = "(invalid)";
-    }
-    return result;
-  }
-
-  Options OptionsForLogIterTest() {
-    Options options = CurrentOptions();
-    options.create_if_missing = true;
-    options.WAL_ttl_seconds = 1000;
-    return options;
-  }
-
-  std::unique_ptr<TransactionLogIterator> OpenTransactionLogIter(
-      const SequenceNumber seq) {
-    unique_ptr<TransactionLogIterator> iter;
-    Status status = dbfull()->GetUpdatesSince(seq, &iter);
-    ASSERT_OK(status);
-    ASSERT_TRUE(iter->Valid());
-    return std::move(iter);
-  }
-
-  std::string DummyString(size_t len, char c = 'a') {
-    return std::string(len, c);
-  }
-
-  void VerifyIterLast(std::string expected_key, int cf = 0) {
-    Iterator* iter;
-    ReadOptions ro;
-    if (cf == 0) {
-      iter = db_->NewIterator(ro);
-    } else {
-      iter = db_->NewIterator(ro, handles_[cf]);
-    }
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), expected_key);
-    delete iter;
-  }
-
-  // Used to test InplaceUpdate
-
-  // If previous value is nullptr or delta is > than previous value,
-  //   sets newValue with delta
-  // If previous value is not empty,
-  //   updates previous value with 'b' string of previous value size - 1.
-  static UpdateStatus
-      updateInPlaceSmallerSize(char* prevValue, uint32_t* prevSize,
-                               Slice delta, std::string* newValue) {
-    if (prevValue == nullptr) {
-      *newValue = std::string(delta.size(), 'c');
-      return UpdateStatus::UPDATED;
-    } else {
-      *prevSize = *prevSize - 1;
-      std::string str_b = std::string(*prevSize, 'b');
-      memcpy(prevValue, str_b.c_str(), str_b.size());
-      return UpdateStatus::UPDATED_INPLACE;
-    }
-  }
-
-  static UpdateStatus
-      updateInPlaceSmallerVarintSize(char* prevValue, uint32_t* prevSize,
-                                     Slice delta, std::string* newValue) {
-    if (prevValue == nullptr) {
-      *newValue = std::string(delta.size(), 'c');
-      return UpdateStatus::UPDATED;
-    } else {
-      *prevSize = 1;
-      std::string str_b = std::string(*prevSize, 'b');
-      memcpy(prevValue, str_b.c_str(), str_b.size());
-      return UpdateStatus::UPDATED_INPLACE;
-    }
-  }
-
-  static UpdateStatus
-      updateInPlaceLargerSize(char* prevValue, uint32_t* prevSize,
-                              Slice delta, std::string* newValue) {
-    *newValue = std::string(delta.size(), 'c');
-    return UpdateStatus::UPDATED;
-  }
-
-  static UpdateStatus
-      updateInPlaceNoAction(char* prevValue, uint32_t* prevSize,
-                            Slice delta, std::string* newValue) {
-    return UpdateStatus::UPDATE_FAILED;
-  }
-
-  // Utility method to test InplaceUpdate
-  void validateNumberOfEntries(int numValues, int cf = 0) {
-    Iterator* iter;
-    if (cf != 0) {
-      iter = dbfull()->TEST_NewInternalIterator(handles_[cf]);
-    } else {
-      iter = dbfull()->TEST_NewInternalIterator();
-    }
-    iter->SeekToFirst();
-    ASSERT_EQ(iter->status().ok(), true);
-    int seq = numValues;
-    while (iter->Valid()) {
-      ParsedInternalKey ikey;
-      ikey.sequence = -1;
-      ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
-
-      // checks sequence number for updates
-      ASSERT_EQ(ikey.sequence, (unsigned)seq--);
-      iter->Next();
-    }
-    delete iter;
-    ASSERT_EQ(0, seq);
-  }
-
-  void CopyFile(const std::string& source, const std::string& destination,
-                uint64_t size = 0) {
-    const EnvOptions soptions;
-    unique_ptr<SequentialFile> srcfile;
-    ASSERT_OK(env_->NewSequentialFile(source, &srcfile, soptions));
-    unique_ptr<WritableFile> destfile;
-    ASSERT_OK(env_->NewWritableFile(destination, &destfile, soptions));
-
-    if (size == 0) {
-      // default argument means copy everything
-      ASSERT_OK(env_->GetFileSize(source, &size));
-    }
-
-    char buffer[4096];
-    Slice slice;
-    while (size > 0) {
-      uint64_t one = std::min(uint64_t(sizeof(buffer)), size);
-      ASSERT_OK(srcfile->Read(one, &slice, buffer));
-      ASSERT_OK(destfile->Append(slice));
-      size -= slice.size();
-    }
-    ASSERT_OK(destfile->Close());
-  }
-
-};
-
-static std::string Key(int i) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "key%06d", i);
-  return std::string(buf);
-}
-
-static long TestGetTickerCount(const Options& options, Tickers ticker_type) {
-  return options.statistics->getTickerCount(ticker_type);
-}
-
-// A helper function that ensures the table properties returned in
-// `GetPropertiesOfAllTablesTest` is correct.
-// This test assumes entries size is differnt for each of the tables.
-namespace {
-void VerifyTableProperties(DB* db, uint64_t expected_entries_size) {
-  TablePropertiesCollection props;
-  ASSERT_OK(db->GetPropertiesOfAllTables(&props));
-
-  ASSERT_EQ(4U, props.size());
-  std::unordered_set<uint64_t> unique_entries;
-
-  // Indirect test
-  uint64_t sum = 0;
-  for (const auto& item : props) {
-    unique_entries.insert(item.second->num_entries);
-    sum += item.second->num_entries;
-  }
-
-  ASSERT_EQ(props.size(), unique_entries.size());
-  ASSERT_EQ(expected_entries_size, sum);
-}
-}  // namespace
-
-TEST(DBTest, Empty) {
-  do {
-    Options options;
-    options.env = env_;
-    options.write_buffer_size = 100000;  // Small write buffer
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    std::string num;
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ("0", num);
-
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ("1", num);
-
-    env_->delay_sstable_sync_.Release_Store(env_);  // Block sync calls
-    Put(1, "k1", std::string(100000, 'x'));         // Fill memtable
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ("2", num);
-
-    Put(1, "k2", std::string(100000, 'y'));         // Trigger compaction
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ("1", num);
-
-    ASSERT_EQ("v1", Get(1, "foo"));
-    env_->delay_sstable_sync_.Release_Store(nullptr);   // Release sync calls
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, ReadOnlyDB) {
-  ASSERT_OK(Put("foo", "v1"));
-  ASSERT_OK(Put("bar", "v2"));
-  ASSERT_OK(Put("foo", "v3"));
-  Close();
-
-  Options options;
-  ASSERT_OK(ReadOnlyReopen(&options));
-  ASSERT_EQ("v3", Get("foo"));
-  ASSERT_EQ("v2", Get("bar"));
-  Iterator* iter = db_->NewIterator(ReadOptions());
-  int count = 0;
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    ASSERT_OK(iter->status());
-    ++count;
-  }
-  ASSERT_EQ(count, 2);
-  delete iter;
-}
-
-// Make sure that when options.block_cache is set, after a new table is
-// created its index/filter blocks are added to block cache.
-TEST(DBTest, IndexAndFilterBlocksOfNewTableAddedToCache) {
-  Options options = CurrentOptions();
-  std::unique_ptr<const FilterPolicy> filter_policy(NewBloomFilterPolicy(20));
-  options.filter_policy = filter_policy.get();
-  options.create_if_missing = true;
-  options.statistics = rocksdb::CreateDBStatistics();
-  BlockBasedTableOptions table_options;
-  table_options.cache_index_and_filter_blocks = true;
-  options.table_factory.reset(new BlockBasedTableFactory(table_options));
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  ASSERT_OK(Put(1, "key", "val"));
-  // Create a new table.
-  ASSERT_OK(Flush(1));
-
-  // index/filter blocks added to block cache right after table creation.
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS));
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS));
-  ASSERT_EQ(2, /* only index/filter were added */
-            TestGetTickerCount(options, BLOCK_CACHE_ADD));
-  ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_DATA_MISS));
-
-  // Make sure filter block is in cache.
-  std::string value;
-  ReadOptions ropt;
-  db_->KeyMayExist(ReadOptions(), handles_[1], "key", &value);
-
-  // Miss count should remain the same.
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS));
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT));
-
-  db_->KeyMayExist(ReadOptions(), handles_[1], "key", &value);
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS));
-  ASSERT_EQ(2, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT));
-
-  // Make sure index block is in cache.
-  auto index_block_hit = TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT);
-  value = Get(1, "key");
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS));
-  ASSERT_EQ(index_block_hit + 1,
-            TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT));
-
-  value = Get(1, "key");
-  ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS));
-  ASSERT_EQ(index_block_hit + 2,
-            TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT));
-}
-
-TEST(DBTest, GetPropertiesOfAllTablesTest) {
-  Options options = CurrentOptions();
-  Reopen(&options);
-  // Create 4 tables
-  for (int table = 0; table < 4; ++table) {
-    for (int i = 0; i < 10 + table; ++i) {
-      db_->Put(WriteOptions(), std::to_string(table * 100 + i), "val");
-    }
-    db_->Flush(FlushOptions());
-  }
-
-  // 1. Read table properties directly from file
-  Reopen(&options);
-  VerifyTableProperties(db_, 10 + 11 + 12 + 13);
-
-  // 2. Put two tables to table cache and
-  Reopen(&options);
-  // fetch key from 1st and 2nd table, which will internally place that table to
-  // the table cache.
-  for (int i = 0; i < 2; ++i) {
-    Get(std::to_string(i * 100 + 0));
-  }
-
-  VerifyTableProperties(db_, 10 + 11 + 12 + 13);
-
-  // 3. Put all tables to table cache
-  Reopen(&options);
-  // fetch key from 1st and 2nd table, which will internally place that table to
-  // the table cache.
-  for (int i = 0; i < 4; ++i) {
-    Get(std::to_string(i * 100 + 0));
-  }
-  VerifyTableProperties(db_, 10 + 11 + 12 + 13);
-}
-
-TEST(DBTest, LevelLimitReopen) {
-  Options options = CurrentOptions();
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  const std::string value(1024 * 1024, ' ');
-  int i = 0;
-  while (NumTableFilesAtLevel(2, 1) == 0) {
-    ASSERT_OK(Put(1, Key(i++), value));
-  }
-
-  options.num_levels = 1;
-  options.max_bytes_for_level_multiplier_additional.resize(1, 1);
-  Status s = TryReopenWithColumnFamilies({"default", "pikachu"}, &options);
-  ASSERT_EQ(s.IsInvalidArgument(), true);
-  ASSERT_EQ(s.ToString(),
-            "Invalid argument: db has more levels than options.num_levels");
-
-  options.num_levels = 10;
-  options.max_bytes_for_level_multiplier_additional.resize(10, 1);
-  ASSERT_OK(TryReopenWithColumnFamilies({"default", "pikachu"}, &options));
-}
-
-TEST(DBTest, Preallocation) {
-  const std::string src = dbname_ + "/alloc_test";
-  unique_ptr<WritableFile> srcfile;
-  const EnvOptions soptions;
-  ASSERT_OK(env_->NewWritableFile(src, &srcfile, soptions));
-  srcfile->SetPreallocationBlockSize(1024 * 1024);
-
-  // No writes should mean no preallocation
-  size_t block_size, last_allocated_block;
-  srcfile->GetPreallocationStatus(&block_size, &last_allocated_block);
-  ASSERT_EQ(last_allocated_block, 0UL);
-
-  // Small write should preallocate one block
-  srcfile->Append("test");
-  srcfile->GetPreallocationStatus(&block_size, &last_allocated_block);
-  ASSERT_EQ(last_allocated_block, 1UL);
-
-  // Write an entire preallocation block, make sure we increased by two.
-  std::string buf(block_size, ' ');
-  srcfile->Append(buf);
-  srcfile->GetPreallocationStatus(&block_size, &last_allocated_block);
-  ASSERT_EQ(last_allocated_block, 2UL);
-
-  // Write five more blocks at once, ensure we're where we need to be.
-  buf = std::string(block_size * 5, ' ');
-  srcfile->Append(buf);
-  srcfile->GetPreallocationStatus(&block_size, &last_allocated_block);
-  ASSERT_EQ(last_allocated_block, 7UL);
-}
-
-TEST(DBTest, PutDeleteGet) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_OK(Put(1, "foo", "v2"));
-    ASSERT_EQ("v2", Get(1, "foo"));
-    ASSERT_OK(Delete(1, "foo"));
-    ASSERT_EQ("NOT_FOUND", Get(1, "foo"));
-  } while (ChangeOptions());
-}
-
-
-TEST(DBTest, GetFromImmutableLayer) {
-  do {
-    Options options;
-    options.env = env_;
-    options.write_buffer_size = 100000;  // Small write buffer
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_EQ("v1", Get(1, "foo"));
-
-    env_->delay_sstable_sync_.Release_Store(env_);   // Block sync calls
-    Put(1, "k1", std::string(100000, 'x'));          // Fill memtable
-    Put(1, "k2", std::string(100000, 'y'));          // Trigger flush
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("NOT_FOUND", Get(0, "foo"));
-    env_->delay_sstable_sync_.Release_Store(nullptr);   // Release sync calls
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, GetFromVersions) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("NOT_FOUND", Get(0, "foo"));
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, GetSnapshot) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    // Try with both a short key and a long key
-    for (int i = 0; i < 2; i++) {
-      std::string key = (i == 0) ? std::string("foo") : std::string(200, 'x');
-      ASSERT_OK(Put(1, key, "v1"));
-      const Snapshot* s1 = db_->GetSnapshot();
-      ASSERT_OK(Put(1, key, "v2"));
-      ASSERT_EQ("v2", Get(1, key));
-      ASSERT_EQ("v1", Get(1, key, s1));
-      ASSERT_OK(Flush(1));
-      ASSERT_EQ("v2", Get(1, key));
-      ASSERT_EQ("v1", Get(1, key, s1));
-      db_->ReleaseSnapshot(s1);
-    }
-    // skip as HashCuckooRep does not support snapshot
-  } while (ChangeOptions(kSkipHashCuckoo));
-}
-
-TEST(DBTest, GetLevel0Ordering) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    // Check that we process level-0 files in correct order.  The code
-    // below generates two level-0 files where the earlier one comes
-    // before the later one in the level-0 file list since the earlier
-    // one has a smaller "smallest" key.
-    ASSERT_OK(Put(1, "bar", "b"));
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_OK(Flush(1));
-    ASSERT_OK(Put(1, "foo", "v2"));
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ("v2", Get(1, "foo"));
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, GetOrderedByLevels) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v1"));
-    Compact(1, "a", "z");
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_OK(Put(1, "foo", "v2"));
-    ASSERT_EQ("v2", Get(1, "foo"));
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ("v2", Get(1, "foo"));
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, GetPicksCorrectFile) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    // Arrange to have multiple files in a non-level-0 level.
-    ASSERT_OK(Put(1, "a", "va"));
-    Compact(1, "a", "b");
-    ASSERT_OK(Put(1, "x", "vx"));
-    Compact(1, "x", "y");
-    ASSERT_OK(Put(1, "f", "vf"));
-    Compact(1, "f", "g");
-    ASSERT_EQ("va", Get(1, "a"));
-    ASSERT_EQ("vf", Get(1, "f"));
-    ASSERT_EQ("vx", Get(1, "x"));
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, GetEncountersEmptyLevel) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    // Arrange for the following to happen:
-    //   * sstable A in level 0
-    //   * nothing in level 1
-    //   * sstable B in level 2
-    // Then do enough Get() calls to arrange for an automatic compaction
-    // of sstable A.  A bug would cause the compaction to be marked as
-    // occuring at level 1 (instead of the correct level 0).
-
-    // Step 1: First place sstables in levels 0 and 2
-    int compaction_count = 0;
-    while (NumTableFilesAtLevel(0, 1) == 0 || NumTableFilesAtLevel(2, 1) == 0) {
-      ASSERT_LE(compaction_count, 100) << "could not fill levels 0 and 2";
-      compaction_count++;
-      Put(1, "a", "begin");
-      Put(1, "z", "end");
-      ASSERT_OK(Flush(1));
-    }
-
-    // Step 2: clear level 1 if necessary.
-    dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 1);
-    ASSERT_EQ(NumTableFilesAtLevel(1, 1), 0);
-    ASSERT_EQ(NumTableFilesAtLevel(2, 1), 1);
-
-    // Step 3: read a bunch of times
-    for (int i = 0; i < 1000; i++) {
-      ASSERT_EQ("NOT_FOUND", Get(1, "missing"));
-    }
-
-    // Step 4: Wait for compaction to finish
-    env_->SleepForMicroseconds(1000000);
-
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 1);  // XXX
-  } while (ChangeOptions(kSkipUniversalCompaction));
-}
-
-// KeyMayExist can lead to a few false positives, but not false negatives.
-// To make test deterministic, use a much larger number of bits per key-20 than
-// bits in the key, so that false positives are eliminated
-TEST(DBTest, KeyMayExist) {
-  do {
-    ReadOptions ropts;
-    std::string value;
-    Options options = CurrentOptions();
-    options.filter_policy = NewBloomFilterPolicy(20);
-    options.statistics = rocksdb::CreateDBStatistics();
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    ASSERT_TRUE(!db_->KeyMayExist(ropts, handles_[1], "a", &value));
-
-    ASSERT_OK(Put(1, "a", "b"));
-    bool value_found = false;
-    ASSERT_TRUE(
-        db_->KeyMayExist(ropts, handles_[1], "a", &value, &value_found));
-    ASSERT_TRUE(value_found);
-    ASSERT_EQ("b", value);
-
-    ASSERT_OK(Flush(1));
-    value.clear();
-
-    long numopen = TestGetTickerCount(options, NO_FILE_OPENS);
-    long cache_added = TestGetTickerCount(options, BLOCK_CACHE_ADD);
-    ASSERT_TRUE(
-        db_->KeyMayExist(ropts, handles_[1], "a", &value, &value_found));
-    ASSERT_TRUE(!value_found);
-    // assert that no new files were opened and no new blocks were
-    // read into block cache.
-    ASSERT_EQ(numopen, TestGetTickerCount(options, NO_FILE_OPENS));
-    ASSERT_EQ(cache_added, TestGetTickerCount(options, BLOCK_CACHE_ADD));
-
-    ASSERT_OK(Delete(1, "a"));
-
-    numopen = TestGetTickerCount(options, NO_FILE_OPENS);
-    cache_added = TestGetTickerCount(options, BLOCK_CACHE_ADD);
-    ASSERT_TRUE(!db_->KeyMayExist(ropts, handles_[1], "a", &value));
-    ASSERT_EQ(numopen, TestGetTickerCount(options, NO_FILE_OPENS));
-    ASSERT_EQ(cache_added, TestGetTickerCount(options, BLOCK_CACHE_ADD));
-
-    ASSERT_OK(Flush(1));
-    db_->CompactRange(handles_[1], nullptr, nullptr);
-
-    numopen = TestGetTickerCount(options, NO_FILE_OPENS);
-    cache_added = TestGetTickerCount(options, BLOCK_CACHE_ADD);
-    ASSERT_TRUE(!db_->KeyMayExist(ropts, handles_[1], "a", &value));
-    ASSERT_EQ(numopen, TestGetTickerCount(options, NO_FILE_OPENS));
-    ASSERT_EQ(cache_added, TestGetTickerCount(options, BLOCK_CACHE_ADD));
-
-    ASSERT_OK(Delete(1, "c"));
-
-    numopen = TestGetTickerCount(options, NO_FILE_OPENS);
-    cache_added = TestGetTickerCount(options, BLOCK_CACHE_ADD);
-    ASSERT_TRUE(!db_->KeyMayExist(ropts, handles_[1], "c", &value));
-    ASSERT_EQ(numopen, TestGetTickerCount(options, NO_FILE_OPENS));
-    ASSERT_EQ(cache_added, TestGetTickerCount(options, BLOCK_CACHE_ADD));
-
-    delete options.filter_policy;
-
-    // KeyMayExist function only checks data in block caches, which is not used
-    // by plain table format.
-  } while (ChangeOptions(kSkipPlainTable | kSkipHashIndex));
-}
-
-TEST(DBTest, NonBlockingIteration) {
-  do {
-    ReadOptions non_blocking_opts, regular_opts;
-    Options options = CurrentOptions();
-    options.statistics = rocksdb::CreateDBStatistics();
-    non_blocking_opts.read_tier = kBlockCacheTier;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    // write one kv to the database.
-    ASSERT_OK(Put(1, "a", "b"));
-
-    // scan using non-blocking iterator. We should find it because
-    // it is in memtable.
-    Iterator* iter = db_->NewIterator(non_blocking_opts, handles_[1]);
-    int count = 0;
-    for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-      ASSERT_OK(iter->status());
-      count++;
-    }
-    ASSERT_EQ(count, 1);
-    delete iter;
-
-    // flush memtable to storage. Now, the key should not be in the
-    // memtable neither in the block cache.
-    ASSERT_OK(Flush(1));
-
-    // verify that a non-blocking iterator does not find any
-    // kvs. Neither does it do any IOs to storage.
-    long numopen = TestGetTickerCount(options, NO_FILE_OPENS);
-    long cache_added = TestGetTickerCount(options, BLOCK_CACHE_ADD);
-    iter = db_->NewIterator(non_blocking_opts, handles_[1]);
-    count = 0;
-    for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-      count++;
-    }
-    ASSERT_EQ(count, 0);
-    ASSERT_TRUE(iter->status().IsIncomplete());
-    ASSERT_EQ(numopen, TestGetTickerCount(options, NO_FILE_OPENS));
-    ASSERT_EQ(cache_added, TestGetTickerCount(options, BLOCK_CACHE_ADD));
-    delete iter;
-
-    // read in the specified block via a regular get
-    ASSERT_EQ(Get(1, "a"), "b");
-
-    // verify that we can find it via a non-blocking scan
-    numopen = TestGetTickerCount(options, NO_FILE_OPENS);
-    cache_added = TestGetTickerCount(options, BLOCK_CACHE_ADD);
-    iter = db_->NewIterator(non_blocking_opts, handles_[1]);
-    count = 0;
-    for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-      ASSERT_OK(iter->status());
-      count++;
-    }
-    ASSERT_EQ(count, 1);
-    ASSERT_EQ(numopen, TestGetTickerCount(options, NO_FILE_OPENS));
-    ASSERT_EQ(cache_added, TestGetTickerCount(options, BLOCK_CACHE_ADD));
-    delete iter;
-
-    // This test verifies block cache behaviors, which is not used by plain
-    // table format.
-    // Exclude kHashCuckoo as it does not support iteration currently
-  } while (ChangeOptions(kSkipPlainTable | kSkipNoSeekToLast |
-                         kSkipHashCuckoo));
-}
-
-// A delete is skipped for key if KeyMayExist(key) returns False
-// Tests Writebatch consistency and proper delete behaviour
-TEST(DBTest, FilterDeletes) {
-  do {
-    Options options = CurrentOptions();
-    options.filter_policy = NewBloomFilterPolicy(20);
-    options.filter_deletes = true;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    WriteBatch batch;
-
-    batch.Delete(handles_[1], "a");
-    dbfull()->Write(WriteOptions(), &batch);
-    ASSERT_EQ(AllEntriesFor("a", 1), "[ ]");  // Delete skipped
-    batch.Clear();
-
-    batch.Put(handles_[1], "a", "b");
-    batch.Delete(handles_[1], "a");
-    dbfull()->Write(WriteOptions(), &batch);
-    ASSERT_EQ(Get(1, "a"), "NOT_FOUND");
-    ASSERT_EQ(AllEntriesFor("a", 1), "[ DEL, b ]");  // Delete issued
-    batch.Clear();
-
-    batch.Delete(handles_[1], "c");
-    batch.Put(handles_[1], "c", "d");
-    dbfull()->Write(WriteOptions(), &batch);
-    ASSERT_EQ(Get(1, "c"), "d");
-    ASSERT_EQ(AllEntriesFor("c", 1), "[ d ]");  // Delete skipped
-    batch.Clear();
-
-    ASSERT_OK(Flush(1));  // A stray Flush
-
-    batch.Delete(handles_[1], "c");
-    dbfull()->Write(WriteOptions(), &batch);
-    ASSERT_EQ(AllEntriesFor("c", 1), "[ DEL, d ]");  // Delete issued
-    batch.Clear();
-
-    delete options.filter_policy;
-  } while (ChangeCompactOptions());
-}
-
-
-TEST(DBTest, IterSeekBeforePrev) {
-  ASSERT_OK(Put("a", "b"));
-  ASSERT_OK(Put("c", "d"));
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Put("0", "f"));
-  ASSERT_OK(Put("1", "h"));
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Put("2", "j"));
-  auto iter = db_->NewIterator(ReadOptions());
-  iter->Seek(Slice("c"));
-  iter->Prev();
-  iter->Seek(Slice("a"));
-  iter->Prev();
-  delete iter;
-}
-
-namespace {
-std::string MakeLongKey(size_t length, char c) {
-  return std::string(length, c);
-}
-}  // namespace
-
-TEST(DBTest, IterLongKeys) {
-  ASSERT_OK(Put(MakeLongKey(20, 0), "0"));
-  ASSERT_OK(Put(MakeLongKey(32, 2), "2"));
-  ASSERT_OK(Put("a", "b"));
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Put(MakeLongKey(50, 1), "1"));
-  ASSERT_OK(Put(MakeLongKey(127, 3), "3"));
-  ASSERT_OK(Put(MakeLongKey(64, 4), "4"));
-  auto iter = db_->NewIterator(ReadOptions());
-
-  // Create a key that needs to be skipped for Seq too new
-  iter->Seek(MakeLongKey(20, 0));
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(20, 0) + "->0");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(50, 1) + "->1");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(32, 2) + "->2");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(127, 3) + "->3");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(64, 4) + "->4");
-  delete iter;
-
-  iter = db_->NewIterator(ReadOptions());
-  iter->Seek(MakeLongKey(50, 1));
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(50, 1) + "->1");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(32, 2) + "->2");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), MakeLongKey(127, 3) + "->3");
-  delete iter;
-}
-
-
-TEST(DBTest, IterNextWithNewerSeq) {
-  ASSERT_OK(Put("0", "0"));
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Put("a", "b"));
-  ASSERT_OK(Put("c", "d"));
-  ASSERT_OK(Put("d", "e"));
-  auto iter = db_->NewIterator(ReadOptions());
-
-  // Create a key that needs to be skipped for Seq too new
-  for (uint64_t i = 0; i < last_options_.max_sequential_skip_in_iterations + 1;
-       i++) {
-    ASSERT_OK(Put("b", "f"));
-  }
-
-  iter->Seek(Slice("a"));
-  ASSERT_EQ(IterStatus(iter), "a->b");
-  iter->Next();
-  ASSERT_EQ(IterStatus(iter), "c->d");
-  delete iter;
-}
-
-TEST(DBTest, IterPrevWithNewerSeq) {
-  ASSERT_OK(Put("0", "0"));
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Put("a", "b"));
-  ASSERT_OK(Put("c", "d"));
-  ASSERT_OK(Put("d", "e"));
-  auto iter = db_->NewIterator(ReadOptions());
-
-  // Create a key that needs to be skipped for Seq too new
-  for (uint64_t i = 0; i < last_options_.max_sequential_skip_in_iterations + 1;
-       i++) {
-    ASSERT_OK(Put("b", "f"));
-  }
-
-  iter->Seek(Slice("d"));
-  ASSERT_EQ(IterStatus(iter), "d->e");
-  iter->Prev();
-  ASSERT_EQ(IterStatus(iter), "c->d");
-  iter->Prev();
-  ASSERT_EQ(IterStatus(iter), "a->b");
-
-  iter->Prev();
-  delete iter;
-}
-
-TEST(DBTest, IterPrevWithNewerSeq2) {
-  ASSERT_OK(Put("0", "0"));
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Put("a", "b"));
-  ASSERT_OK(Put("c", "d"));
-  ASSERT_OK(Put("d", "e"));
-  auto iter = db_->NewIterator(ReadOptions());
-  iter->Seek(Slice("c"));
-  ASSERT_EQ(IterStatus(iter), "c->d");
-
-  // Create a key that needs to be skipped for Seq too new
-  for (uint64_t i = 0; i < last_options_.max_sequential_skip_in_iterations + 1;
-      i++) {
-    ASSERT_OK(Put("b", "f"));
-  }
-
-  iter->Prev();
-  ASSERT_EQ(IterStatus(iter), "a->b");
-
-  iter->Prev();
-  delete iter;
-}
-
-TEST(DBTest, IterEmpty) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->Seek("foo");
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    delete iter;
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, IterSingle) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "a", "va"));
-    Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->Seek("");
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->Seek("a");
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->Seek("b");
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    delete iter;
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, IterMulti) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "a", "va"));
-    ASSERT_OK(Put(1, "b", "vb"));
-    ASSERT_OK(Put(1, "c", "vc"));
-    Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->Seek("");
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Seek("a");
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Seek("ax");
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-
-    iter->Seek("b");
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-    iter->Seek("z");
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    // Switch from reverse to forward
-    iter->SeekToLast();
-    iter->Prev();
-    iter->Prev();
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-
-    // Switch from forward to reverse
-    iter->SeekToFirst();
-    iter->Next();
-    iter->Next();
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-
-    // Make sure iter stays at snapshot
-    ASSERT_OK(Put(1, "a", "va2"));
-    ASSERT_OK(Put(1, "a2", "va3"));
-    ASSERT_OK(Put(1, "b", "vb2"));
-    ASSERT_OK(Put(1, "c", "vc2"));
-    ASSERT_OK(Delete(1, "b"));
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "b->vb");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    delete iter;
-  } while (ChangeCompactOptions());
-}
-
-// Check that we can skip over a run of user keys
-// by using reseek rather than sequential scan
-TEST(DBTest, IterReseek) {
-  Options options = CurrentOptions();
-  options.max_sequential_skip_in_iterations = 3;
-  options.create_if_missing = true;
-  options.statistics = rocksdb::CreateDBStatistics();
-  DestroyAndReopen(&options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  // insert two keys with same userkey and verify that
-  // reseek is not invoked. For each of these test cases,
-  // verify that we can find the next key "b".
-  ASSERT_OK(Put(1, "a", "one"));
-  ASSERT_OK(Put(1, "a", "two"));
-  ASSERT_OK(Put(1, "b", "bone"));
-  Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-  iter->SeekToFirst();
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 0);
-  ASSERT_EQ(IterStatus(iter), "a->two");
-  iter->Next();
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 0);
-  ASSERT_EQ(IterStatus(iter), "b->bone");
-  delete iter;
-
-  // insert a total of three keys with same userkey and verify
-  // that reseek is still not invoked.
-  ASSERT_OK(Put(1, "a", "three"));
-  iter = db_->NewIterator(ReadOptions(), handles_[1]);
-  iter->SeekToFirst();
-  ASSERT_EQ(IterStatus(iter), "a->three");
-  iter->Next();
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 0);
-  ASSERT_EQ(IterStatus(iter), "b->bone");
-  delete iter;
-
-  // insert a total of four keys with same userkey and verify
-  // that reseek is invoked.
-  ASSERT_OK(Put(1, "a", "four"));
-  iter = db_->NewIterator(ReadOptions(), handles_[1]);
-  iter->SeekToFirst();
-  ASSERT_EQ(IterStatus(iter), "a->four");
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 0);
-  iter->Next();
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 1);
-  ASSERT_EQ(IterStatus(iter), "b->bone");
-  delete iter;
-
-  // Testing reverse iterator
-  // At this point, we have three versions of "a" and one version of "b".
-  // The reseek statistics is already at 1.
-  int num_reseeks =
-      (int)TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION);
-
-  // Insert another version of b and assert that reseek is not invoked
-  ASSERT_OK(Put(1, "b", "btwo"));
-  iter = db_->NewIterator(ReadOptions(), handles_[1]);
-  iter->SeekToLast();
-  ASSERT_EQ(IterStatus(iter), "b->btwo");
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION),
-            num_reseeks);
-  iter->Prev();
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION),
-            num_reseeks + 1);
-  ASSERT_EQ(IterStatus(iter), "a->four");
-  delete iter;
-
-  // insert two more versions of b. This makes a total of 4 versions
-  // of b and 4 versions of a.
-  ASSERT_OK(Put(1, "b", "bthree"));
-  ASSERT_OK(Put(1, "b", "bfour"));
-  iter = db_->NewIterator(ReadOptions(), handles_[1]);
-  iter->SeekToLast();
-  ASSERT_EQ(IterStatus(iter), "b->bfour");
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION),
-            num_reseeks + 2);
-  iter->Prev();
-
-  // the previous Prev call should have invoked reseek
-  ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION),
-            num_reseeks + 3);
-  ASSERT_EQ(IterStatus(iter), "a->four");
-  delete iter;
-}
-
-TEST(DBTest, IterSmallAndLargeMix) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "a", "va"));
-    ASSERT_OK(Put(1, "b", std::string(100000, 'b')));
-    ASSERT_OK(Put(1, "c", "vc"));
-    ASSERT_OK(Put(1, "d", std::string(100000, 'd')));
-    ASSERT_OK(Put(1, "e", std::string(100000, 'e')));
-
-    Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-
-    iter->SeekToFirst();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "b->" + std::string(100000, 'b'));
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "d->" + std::string(100000, 'd'));
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "e->" + std::string(100000, 'e'));
-    iter->Next();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    iter->SeekToLast();
-    ASSERT_EQ(IterStatus(iter), "e->" + std::string(100000, 'e'));
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "d->" + std::string(100000, 'd'));
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "c->vc");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "b->" + std::string(100000, 'b'));
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "a->va");
-    iter->Prev();
-    ASSERT_EQ(IterStatus(iter), "(invalid)");
-
-    delete iter;
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, IterMultiWithDelete) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "ka", "va"));
-    ASSERT_OK(Put(1, "kb", "vb"));
-    ASSERT_OK(Put(1, "kc", "vc"));
-    ASSERT_OK(Delete(1, "kb"));
-    ASSERT_EQ("NOT_FOUND", Get(1, "kb"));
-
-    Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-    iter->Seek("kc");
-    ASSERT_EQ(IterStatus(iter), "kc->vc");
-    if (!CurrentOptions().merge_operator) {
-      // TODO: merge operator does not support backward iteration yet
-      if (kPlainTableAllBytesPrefix != option_config_&&
-          kBlockBasedTableWithWholeKeyHashIndex != option_config_ &&
-          kHashLinkList != option_config_) {
-        iter->Prev();
-        ASSERT_EQ(IterStatus(iter), "ka->va");
-      }
-    }
-    delete iter;
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, IterPrevMaxSkip) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    for (int i = 0; i < 2; i++) {
-      ASSERT_OK(Put(1, "key1", "v1"));
-      ASSERT_OK(Put(1, "key2", "v2"));
-      ASSERT_OK(Put(1, "key3", "v3"));
-      ASSERT_OK(Put(1, "key4", "v4"));
-      ASSERT_OK(Put(1, "key5", "v5"));
-    }
-
-    VerifyIterLast("key5->v5", 1);
-
-    ASSERT_OK(Delete(1, "key5"));
-    VerifyIterLast("key4->v4", 1);
-
-    ASSERT_OK(Delete(1, "key4"));
-    VerifyIterLast("key3->v3", 1);
-
-    ASSERT_OK(Delete(1, "key3"));
-    VerifyIterLast("key2->v2", 1);
-
-    ASSERT_OK(Delete(1, "key2"));
-    VerifyIterLast("key1->v1", 1);
-
-    ASSERT_OK(Delete(1, "key1"));
-    VerifyIterLast("(invalid)", 1);
-  } while (ChangeOptions(kSkipMergePut | kSkipNoSeekToLast));
-}
-
-TEST(DBTest, IterWithSnapshot) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "key1", "val1"));
-    ASSERT_OK(Put(1, "key2", "val2"));
-    ASSERT_OK(Put(1, "key3", "val3"));
-    ASSERT_OK(Put(1, "key4", "val4"));
-    ASSERT_OK(Put(1, "key5", "val5"));
-
-    const Snapshot *snapshot = db_->GetSnapshot();
-    ReadOptions options;
-    options.snapshot = snapshot;
-    Iterator* iter = db_->NewIterator(options, handles_[1]);
-
-    // Put more values after the snapshot
-    ASSERT_OK(Put(1, "key100", "val100"));
-    ASSERT_OK(Put(1, "key101", "val101"));
-
-    iter->Seek("key5");
-    ASSERT_EQ(IterStatus(iter), "key5->val5");
-    if (!CurrentOptions().merge_operator) {
-      // TODO: merge operator does not support backward iteration yet
-      if (kPlainTableAllBytesPrefix != option_config_&&
-        kBlockBasedTableWithWholeKeyHashIndex != option_config_ &&
-        kHashLinkList != option_config_) {
-        iter->Prev();
-        ASSERT_EQ(IterStatus(iter), "key4->val4");
-        iter->Prev();
-        ASSERT_EQ(IterStatus(iter), "key3->val3");
-
-        iter->Next();
-        ASSERT_EQ(IterStatus(iter), "key4->val4");
-        iter->Next();
-        ASSERT_EQ(IterStatus(iter), "key5->val5");
-      }
-      iter->Next();
-      ASSERT_TRUE(!iter->Valid());
-    }
-    db_->ReleaseSnapshot(snapshot);
-    delete iter;
-    // skip as HashCuckooRep does not support snapshot
-  } while (ChangeOptions(kSkipHashCuckoo));
-}
-
-TEST(DBTest, Recover) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_OK(Put(1, "baz", "v5"));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("v1", Get(1, "foo"));
-
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("v5", Get(1, "baz"));
-    ASSERT_OK(Put(1, "bar", "v2"));
-    ASSERT_OK(Put(1, "foo", "v3"));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("v3", Get(1, "foo"));
-    ASSERT_OK(Put(1, "foo", "v4"));
-    ASSERT_EQ("v4", Get(1, "foo"));
-    ASSERT_EQ("v2", Get(1, "bar"));
-    ASSERT_EQ("v5", Get(1, "baz"));
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, RecoverWithTableHandle) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.write_buffer_size = 100;
-    options.disable_auto_compactions = true;
-    options = CurrentOptions(options);
-    DestroyAndReopen(&options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_OK(Put(1, "bar", "v2"));
-    ASSERT_OK(Flush(1));
-    ASSERT_OK(Put(1, "foo", "v3"));
-    ASSERT_OK(Put(1, "bar", "v4"));
-    ASSERT_OK(Flush(1));
-    ASSERT_OK(Put(1, "big", std::string(100, 'a')));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-
-    std::vector<std::vector<FileMetaData>> files;
-    dbfull()->TEST_GetFilesMetaData(handles_[1], &files);
-    int total_files = 0;
-    for (const auto& level : files) {
-      total_files += level.size();
-    }
-    ASSERT_EQ(total_files, 3);
-    for (const auto& level : files) {
-      for (const auto& file : level) {
-        if (kInfiniteMaxOpenFiles == option_config_) {
-          ASSERT_TRUE(file.table_reader_handle != nullptr);
-        } else {
-          ASSERT_TRUE(file.table_reader_handle == nullptr);
-        }
-      }
-    }
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, IgnoreRecoveredLog) {
-  std::string backup_logs = dbname_ + "/backup_logs";
-
-  // delete old files in backup_logs directory
-  env_->CreateDirIfMissing(backup_logs);
-  std::vector<std::string> old_files;
-  env_->GetChildren(backup_logs, &old_files);
-  for (auto& file : old_files) {
-    if (file != "." && file != "..") {
-      env_->DeleteFile(backup_logs + "/" + file);
-    }
-  }
-
-  do {
-    Options options = CurrentOptions();
-    options.create_if_missing = true;
-    options.merge_operator = MergeOperators::CreateUInt64AddOperator();
-    options.wal_dir = dbname_ + "/logs";
-    DestroyAndReopen(&options);
-
-    // fill up the DB
-    std::string one, two;
-    PutFixed64(&one, 1);
-    PutFixed64(&two, 2);
-    ASSERT_OK(db_->Merge(WriteOptions(), Slice("foo"), Slice(one)));
-    ASSERT_OK(db_->Merge(WriteOptions(), Slice("foo"), Slice(one)));
-    ASSERT_OK(db_->Merge(WriteOptions(), Slice("bar"), Slice(one)));
-
-    // copy the logs to backup
-    std::vector<std::string> logs;
-    env_->GetChildren(options.wal_dir, &logs);
-    for (auto& log : logs) {
-      if (log != ".." && log != ".") {
-        CopyFile(options.wal_dir + "/" + log, backup_logs + "/" + log);
-      }
-    }
-
-    // recover the DB
-    Reopen(&options);
-    ASSERT_EQ(two, Get("foo"));
-    ASSERT_EQ(one, Get("bar"));
-    Close();
-
-    // copy the logs from backup back to wal dir
-    for (auto& log : logs) {
-      if (log != ".." && log != ".") {
-        CopyFile(backup_logs + "/" + log, options.wal_dir + "/" + log);
-      }
-    }
-    // this should ignore the log files, recovery should not happen again
-    // if the recovery happens, the same merge operator would be called twice,
-    // leading to incorrect results
-    Reopen(&options);
-    ASSERT_EQ(two, Get("foo"));
-    ASSERT_EQ(one, Get("bar"));
-    Close();
-    Destroy(&options);
-    Reopen(&options);
-    Close();
-
-    // copy the logs from backup back to wal dir
-    env_->CreateDirIfMissing(options.wal_dir);
-    for (auto& log : logs) {
-      if (log != ".." && log != ".") {
-        CopyFile(backup_logs + "/" + log, options.wal_dir + "/" + log);
-      }
-    }
-    // assert that we successfully recovered only from logs, even though we
-    // destroyed the DB
-    Reopen(&options);
-    ASSERT_EQ(two, Get("foo"));
-    ASSERT_EQ(one, Get("bar"));
-
-    // Recovery will fail if DB directory doesn't exist.
-    Destroy(&options);
-    // copy the logs from backup back to wal dir
-    env_->CreateDirIfMissing(options.wal_dir);
-    for (auto& log : logs) {
-      if (log != ".." && log != ".") {
-        CopyFile(backup_logs + "/" + log, options.wal_dir + "/" + log);
-        // we won't be needing this file no more
-        env_->DeleteFile(backup_logs + "/" + log);
-      }
-    }
-    Status s = TryReopen(&options);
-    ASSERT_TRUE(!s.ok());
-  } while (ChangeOptions(kSkipHashCuckoo));
-}
-
-TEST(DBTest, RollLog) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_OK(Put(1, "baz", "v5"));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    for (int i = 0; i < 10; i++) {
-      ReopenWithColumnFamilies({"default", "pikachu"});
-    }
-    ASSERT_OK(Put(1, "foo", "v4"));
-    for (int i = 0; i < 10; i++) {
-      ReopenWithColumnFamilies({"default", "pikachu"});
-    }
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, WAL) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    WriteOptions writeOpt = WriteOptions();
-    writeOpt.disableWAL = true;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v1"));
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v1"));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("v1", Get(1, "bar"));
-
-    writeOpt.disableWAL = false;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v2"));
-    writeOpt.disableWAL = true;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v2"));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    // Both value's should be present.
-    ASSERT_EQ("v2", Get(1, "bar"));
-    ASSERT_EQ("v2", Get(1, "foo"));
-
-    writeOpt.disableWAL = true;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v3"));
-    writeOpt.disableWAL = false;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v3"));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    // again both values should be present.
-    ASSERT_EQ("v3", Get(1, "foo"));
-    ASSERT_EQ("v3", Get(1, "bar"));
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, CheckLock) {
-  do {
-    DB* localdb;
-    Options options = CurrentOptions();
-    ASSERT_OK(TryReopen(&options));
-
-    // second open should fail
-    ASSERT_TRUE(!(DB::Open(options, dbname_, &localdb)).ok());
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, FlushMultipleMemtable) {
-  do {
-    Options options = CurrentOptions();
-    WriteOptions writeOpt = WriteOptions();
-    writeOpt.disableWAL = true;
-    options.max_write_buffer_number = 4;
-    options.min_write_buffer_number_to_merge = 3;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v1"));
-    ASSERT_OK(Flush(1));
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v1"));
-
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("v1", Get(1, "bar"));
-    ASSERT_OK(Flush(1));
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, NumImmutableMemTable) {
-  do {
-    Options options = CurrentOptions();
-    WriteOptions writeOpt = WriteOptions();
-    writeOpt.disableWAL = true;
-    options.max_write_buffer_number = 4;
-    options.min_write_buffer_number_to_merge = 3;
-    options.write_buffer_size = 1000000;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    std::string big_value(1000000 * 2, 'x');
-    std::string num;
-    SetPerfLevel(kEnableTime);;
-
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "k1", big_value));
-    ASSERT_TRUE(dbfull()->GetProperty(handles_[1],
-                                      "rocksdb.num-immutable-mem-table", &num));
-    ASSERT_EQ(num, "0");
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ(num, "1");
-    perf_context.Reset();
-    Get(1, "k1");
-    ASSERT_EQ(1, (int) perf_context.get_from_memtable_count);
-
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "k2", big_value));
-    ASSERT_TRUE(dbfull()->GetProperty(handles_[1],
-                                      "rocksdb.num-immutable-mem-table", &num));
-    ASSERT_EQ(num, "1");
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ(num, "1");
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-imm-mem-tables", &num));
-    ASSERT_EQ(num, "1");
-
-    perf_context.Reset();
-    Get(1, "k1");
-    ASSERT_EQ(2, (int) perf_context.get_from_memtable_count);
-    perf_context.Reset();
-    Get(1, "k2");
-    ASSERT_EQ(1, (int) perf_context.get_from_memtable_count);
-
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "k3", big_value));
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.cur-size-active-mem-table", &num));
-    ASSERT_TRUE(dbfull()->GetProperty(handles_[1],
-                                      "rocksdb.num-immutable-mem-table", &num));
-    ASSERT_EQ(num, "2");
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-active-mem-table", &num));
-    ASSERT_EQ(num, "1");
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.num-entries-imm-mem-tables", &num));
-    ASSERT_EQ(num, "2");
-    perf_context.Reset();
-    Get(1, "k2");
-    ASSERT_EQ(2, (int) perf_context.get_from_memtable_count);
-    perf_context.Reset();
-    Get(1, "k3");
-    ASSERT_EQ(1, (int) perf_context.get_from_memtable_count);
-    perf_context.Reset();
-    Get(1, "k1");
-    ASSERT_EQ(3, (int) perf_context.get_from_memtable_count);
-
-    ASSERT_OK(Flush(1));
-    ASSERT_TRUE(dbfull()->GetProperty(handles_[1],
-                                      "rocksdb.num-immutable-mem-table", &num));
-    ASSERT_EQ(num, "0");
-    ASSERT_TRUE(dbfull()->GetProperty(
-        handles_[1], "rocksdb.cur-size-active-mem-table", &num));
-    // "208" is the size of the metadata of an empty skiplist, this would
-    // break if we change the default skiplist implementation
-    ASSERT_EQ(num, "208");
-    SetPerfLevel(kDisable);
-  } while (ChangeCompactOptions());
-}
-
-class SleepingBackgroundTask {
- public:
-  SleepingBackgroundTask()
-      : bg_cv_(&mutex_), should_sleep_(true), done_with_sleep_(false) {}
-  void DoSleep() {
-    MutexLock l(&mutex_);
-    while (should_sleep_) {
-      bg_cv_.Wait();
-    }
-    done_with_sleep_ = true;
-    bg_cv_.SignalAll();
-  }
-  void WakeUp() {
-    MutexLock l(&mutex_);
-    should_sleep_ = false;
-    bg_cv_.SignalAll();
-  }
-  void WaitUntilDone() {
-    MutexLock l(&mutex_);
-    while (!done_with_sleep_) {
-      bg_cv_.Wait();
-    }
-  }
-
-  static void DoSleepTask(void* arg) {
-    reinterpret_cast<SleepingBackgroundTask*>(arg)->DoSleep();
-  }
-
- private:
-  port::Mutex mutex_;
-  port::CondVar bg_cv_;  // Signalled when background work finishes
-  bool should_sleep_;
-  bool done_with_sleep_;
-};
-
-TEST(DBTest, GetProperty) {
-  // Set sizes to both background thread pool to be 1 and block them.
-  env_->SetBackgroundThreads(1, Env::HIGH);
-  env_->SetBackgroundThreads(1, Env::LOW);
-  SleepingBackgroundTask sleeping_task_low;
-  env_->Schedule(&SleepingBackgroundTask::DoSleepTask, &sleeping_task_low,
-                 Env::Priority::LOW);
-  SleepingBackgroundTask sleeping_task_high;
-  env_->Schedule(&SleepingBackgroundTask::DoSleepTask, &sleeping_task_high,
-                 Env::Priority::HIGH);
-
-  Options options = CurrentOptions();
-  WriteOptions writeOpt = WriteOptions();
-  writeOpt.disableWAL = true;
-  options.compaction_style = kCompactionStyleUniversal;
-  options.level0_file_num_compaction_trigger = 1;
-  options.compaction_options_universal.size_ratio = 50;
-  options.max_background_compactions = 1;
-  options.max_background_flushes = 1;
-  options.max_write_buffer_number = 10;
-  options.min_write_buffer_number_to_merge = 1;
-  options.write_buffer_size = 1000000;
-  Reopen(&options);
-
-  std::string big_value(1000000 * 2, 'x');
-  std::string num;
-  SetPerfLevel(kEnableTime);
-
-  ASSERT_OK(dbfull()->Put(writeOpt, "k1", big_value));
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.num-immutable-mem-table", &num));
-  ASSERT_EQ(num, "0");
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.mem-table-flush-pending", &num));
-  ASSERT_EQ(num, "0");
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.compaction-pending", &num));
-  ASSERT_EQ(num, "0");
-  perf_context.Reset();
-
-  ASSERT_OK(dbfull()->Put(writeOpt, "k2", big_value));
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.num-immutable-mem-table", &num));
-  ASSERT_EQ(num, "1");
-  ASSERT_OK(dbfull()->Put(writeOpt, "k3", big_value));
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.num-immutable-mem-table", &num));
-  ASSERT_EQ(num, "2");
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.mem-table-flush-pending", &num));
-  ASSERT_EQ(num, "1");
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.compaction-pending", &num));
-  ASSERT_EQ(num, "0");
-
-  sleeping_task_high.WakeUp();
-  sleeping_task_high.WaitUntilDone();
-  dbfull()->TEST_WaitForFlushMemTable();
-
-  ASSERT_OK(dbfull()->Put(writeOpt, "k4", big_value));
-  ASSERT_OK(dbfull()->Put(writeOpt, "k5", big_value));
-  dbfull()->TEST_WaitForFlushMemTable();
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.mem-table-flush-pending", &num));
-  ASSERT_EQ(num, "0");
-  ASSERT_TRUE(dbfull()->GetProperty("rocksdb.compaction-pending", &num));
-  ASSERT_EQ(num, "1");
-  sleeping_task_low.WakeUp();
-  sleeping_task_low.WaitUntilDone();
-}
-
-TEST(DBTest, FLUSH) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    WriteOptions writeOpt = WriteOptions();
-    writeOpt.disableWAL = true;
-    SetPerfLevel(kEnableTime);;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v1"));
-    // this will now also flush the last 2 writes
-    ASSERT_OK(Flush(1));
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v1"));
-
-    perf_context.Reset();
-    Get(1, "foo");
-    ASSERT_TRUE((int) perf_context.get_from_output_files_time > 0);
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("v1", Get(1, "bar"));
-
-    writeOpt.disableWAL = true;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v2"));
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v2"));
-    ASSERT_OK(Flush(1));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("v2", Get(1, "bar"));
-    perf_context.Reset();
-    ASSERT_EQ("v2", Get(1, "foo"));
-    ASSERT_TRUE((int) perf_context.get_from_output_files_time > 0);
-
-    writeOpt.disableWAL = false;
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "bar", "v3"));
-    ASSERT_OK(dbfull()->Put(writeOpt, handles_[1], "foo", "v3"));
-    ASSERT_OK(Flush(1));
-
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    // 'foo' should be there because its put
-    // has WAL enabled.
-    ASSERT_EQ("v3", Get(1, "foo"));
-    ASSERT_EQ("v3", Get(1, "bar"));
-
-    SetPerfLevel(kDisable);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, RecoveryWithEmptyLog) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v1"));
-    ASSERT_OK(Put(1, "foo", "v2"));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_OK(Put(1, "foo", "v3"));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("v3", Get(1, "foo"));
-  } while (ChangeOptions());
-}
-
-// Check that writes done during a memtable compaction are recovered
-// if the database is shutdown during the memtable compaction.
-TEST(DBTest, RecoverDuringMemtableCompaction) {
-  do {
-    Options options;
-    options.env = env_;
-    options.write_buffer_size = 1000000;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Trigger a long memtable compaction and reopen the database during it
-    ASSERT_OK(Put(1, "foo", "v1"));  // Goes to 1st log file
-    ASSERT_OK(Put(1, "big1", std::string(10000000, 'x')));  // Fills memtable
-    ASSERT_OK(Put(1, "big2", std::string(1000, 'y')));  // Triggers compaction
-    ASSERT_OK(Put(1, "bar", "v2"));                     // Goes to new log file
-
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-    ASSERT_EQ("v1", Get(1, "foo"));
-    ASSERT_EQ("v2", Get(1, "bar"));
-    ASSERT_EQ(std::string(10000000, 'x'), Get(1, "big1"));
-    ASSERT_EQ(std::string(1000, 'y'), Get(1, "big2"));
-  } while (ChangeOptions());
-}
-
-TEST(DBTest, MinorCompactionsHappen) {
-  do {
-    Options options;
-    options.write_buffer_size = 10000;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    const int N = 500;
-
-    int starting_num_tables = TotalTableFiles(1);
-    for (int i = 0; i < N; i++) {
-      ASSERT_OK(Put(1, Key(i), Key(i) + std::string(1000, 'v')));
-    }
-    int ending_num_tables = TotalTableFiles(1);
-    ASSERT_GT(ending_num_tables, starting_num_tables);
-
-    for (int i = 0; i < N; i++) {
-      ASSERT_EQ(Key(i) + std::string(1000, 'v'), Get(1, Key(i)));
-    }
-
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-    for (int i = 0; i < N; i++) {
-      ASSERT_EQ(Key(i) + std::string(1000, 'v'), Get(1, Key(i)));
-    }
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, ManifestRollOver) {
-  do {
-    Options options;
-    options.max_manifest_file_size = 10 ;  // 10 bytes
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    {
-      ASSERT_OK(Put(1, "manifest_key1", std::string(1000, '1')));
-      ASSERT_OK(Put(1, "manifest_key2", std::string(1000, '2')));
-      ASSERT_OK(Put(1, "manifest_key3", std::string(1000, '3')));
-      uint64_t manifest_before_flush = dbfull()->TEST_Current_Manifest_FileNo();
-      ASSERT_OK(Flush(1));  // This should trigger LogAndApply.
-      uint64_t manifest_after_flush = dbfull()->TEST_Current_Manifest_FileNo();
-      ASSERT_GT(manifest_after_flush, manifest_before_flush);
-      ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-      ASSERT_GT(dbfull()->TEST_Current_Manifest_FileNo(), manifest_after_flush);
-      // check if a new manifest file got inserted or not.
-      ASSERT_EQ(std::string(1000, '1'), Get(1, "manifest_key1"));
-      ASSERT_EQ(std::string(1000, '2'), Get(1, "manifest_key2"));
-      ASSERT_EQ(std::string(1000, '3'), Get(1, "manifest_key3"));
-    }
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, IdentityAcrossRestarts) {
-  do {
-    std::string id1;
-    ASSERT_OK(db_->GetDbIdentity(id1));
-
-    Options options = CurrentOptions();
-    Reopen(&options);
-    std::string id2;
-    ASSERT_OK(db_->GetDbIdentity(id2));
-    // id1 should match id2 because identity was not regenerated
-    ASSERT_EQ(id1.compare(id2), 0);
-
-    std::string idfilename = IdentityFileName(dbname_);
-    ASSERT_OK(env_->DeleteFile(idfilename));
-    Reopen(&options);
-    std::string id3;
-    ASSERT_OK(db_->GetDbIdentity(id3));
-    // id1 should NOT match id3 because identity was regenerated
-    ASSERT_NE(id1.compare(id3), 0);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, RecoverWithLargeLog) {
-  do {
-    {
-      Options options = CurrentOptions();
-      CreateAndReopenWithCF({"pikachu"}, &options);
-      ASSERT_OK(Put(1, "big1", std::string(200000, '1')));
-      ASSERT_OK(Put(1, "big2", std::string(200000, '2')));
-      ASSERT_OK(Put(1, "small3", std::string(10, '3')));
-      ASSERT_OK(Put(1, "small4", std::string(10, '4')));
-      ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    }
-
-    // Make sure that if we re-open with a small write buffer size that
-    // we flush table files in the middle of a large log file.
-    Options options;
-    options.write_buffer_size = 100000;
-    options = CurrentOptions(options);
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 3);
-    ASSERT_EQ(std::string(200000, '1'), Get(1, "big1"));
-    ASSERT_EQ(std::string(200000, '2'), Get(1, "big2"));
-    ASSERT_EQ(std::string(10, '3'), Get(1, "small3"));
-    ASSERT_EQ(std::string(10, '4'), Get(1, "small4"));
-    ASSERT_GT(NumTableFilesAtLevel(0, 1), 1);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, CompactionsGenerateMultipleFiles) {
-  Options options;
-  options.write_buffer_size = 100000000;        // Large write buffer
-  options = CurrentOptions(options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  Random rnd(301);
-
-  // Write 8MB (80 values, each 100K)
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-  std::vector<std::string> values;
-  for (int i = 0; i < 80; i++) {
-    values.push_back(RandomString(&rnd, 100000));
-    ASSERT_OK(Put(1, Key(i), values[i]));
-  }
-
-  // Reopening moves updates to level-0
-  ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-  ASSERT_GT(NumTableFilesAtLevel(1, 1), 1);
-  for (int i = 0; i < 80; i++) {
-    ASSERT_EQ(Get(1, Key(i)), values[i]);
-  }
-}
-
-TEST(DBTest, CompactionTrigger) {
-  Options options;
-  options.write_buffer_size = 100<<10; //100KB
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  options.level0_file_num_compaction_trigger = 3;
-  options = CurrentOptions(options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  Random rnd(301);
-
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 1;
-       num++) {
-    std::vector<std::string> values;
-    // Write 120KB (12 values, each 10K)
-    for (int i = 0; i < 12; i++) {
-      values.push_back(RandomString(&rnd, 10000));
-      ASSERT_OK(Put(1, Key(i), values[i]));
-    }
-    dbfull()->TEST_WaitForFlushMemTable(handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), num + 1);
-  }
-
-  //generate one more file in level-0, and should trigger level-0 compaction
-  std::vector<std::string> values;
-  for (int i = 0; i < 12; i++) {
-    values.push_back(RandomString(&rnd, 10000));
-    ASSERT_OK(Put(1, Key(i), values[i]));
-  }
-  dbfull()->TEST_WaitForCompact();
-
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1, 1), 1);
-}
-
-// This is a static filter used for filtering
-// kvs during the compaction process.
-static int cfilter_count;
-static std::string NEW_VALUE = "NewValue";
-
-class KeepFilter : public CompactionFilter {
- public:
-  virtual bool Filter(int level, const Slice& key, const Slice& value,
-                      std::string* new_value, bool* value_changed) const
-      override {
-    cfilter_count++;
-    return false;
-  }
-
-  virtual const char* Name() const override { return "KeepFilter"; }
-};
-
-class DeleteFilter : public CompactionFilter {
- public:
-  virtual bool Filter(int level, const Slice& key, const Slice& value,
-                      std::string* new_value, bool* value_changed) const
-      override {
-    cfilter_count++;
-    return true;
-  }
-
-  virtual const char* Name() const override { return "DeleteFilter"; }
-};
-
-class ChangeFilter : public CompactionFilter {
- public:
-  explicit ChangeFilter() {}
-
-  virtual bool Filter(int level, const Slice& key, const Slice& value,
-                      std::string* new_value, bool* value_changed) const
-      override {
-    assert(new_value != nullptr);
-    *new_value = NEW_VALUE;
-    *value_changed = true;
-    return false;
-  }
-
-  virtual const char* Name() const override { return "ChangeFilter"; }
-};
-
-class KeepFilterFactory : public CompactionFilterFactory {
- public:
-  explicit KeepFilterFactory(bool check_context = false)
-      : check_context_(check_context) {}
-
-  virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-      const CompactionFilter::Context& context) override {
-    if (check_context_) {
-      ASSERT_EQ(expect_full_compaction_.load(), context.is_full_compaction);
-      ASSERT_EQ(expect_manual_compaction_.load(), context.is_manual_compaction);
-    }
-    return std::unique_ptr<CompactionFilter>(new KeepFilter());
-  }
-
-  virtual const char* Name() const override { return "KeepFilterFactory"; }
-  bool check_context_;
-  std::atomic_bool expect_full_compaction_;
-  std::atomic_bool expect_manual_compaction_;
-};
-
-class DeleteFilterFactory : public CompactionFilterFactory {
- public:
-  virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-      const CompactionFilter::Context& context) override {
-    if (context.is_manual_compaction) {
-      return std::unique_ptr<CompactionFilter>(new DeleteFilter());
-    } else {
-      return std::unique_ptr<CompactionFilter>(nullptr);
-    }
-  }
-
-  virtual const char* Name() const override { return "DeleteFilterFactory"; }
-};
-
-class ChangeFilterFactory : public CompactionFilterFactory {
- public:
-  explicit ChangeFilterFactory() {}
-
-  virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-      const CompactionFilter::Context& context) override {
-    return std::unique_ptr<CompactionFilter>(new ChangeFilter());
-  }
-
-  virtual const char* Name() const override { return "ChangeFilterFactory"; }
-};
-
-// TODO(kailiu) The tests on UniversalCompaction has some issues:
-//  1. A lot of magic numbers ("11" or "12").
-//  2. Made assumption on the memtable flush conidtions, which may change from
-//     time to time.
-TEST(DBTest, UniversalCompactionTrigger) {
-  Options options;
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  // trigger compaction if there are >= 4 files
-  options.level0_file_num_compaction_trigger = 4;
-  KeepFilterFactory* filter = new KeepFilterFactory(true);
-  filter->expect_manual_compaction_.store(false);
-  options.compaction_filter_factory.reset(filter);
-
-  options = CurrentOptions(options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  Random rnd(301);
-  int key_idx = 0;
-
-  filter->expect_full_compaction_.store(true);
-  // Stage 1:
-  //   Generate a set of files at level 0, but don't trigger level-0
-  //   compaction.
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 1;
-       num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 12; i++) {
-      ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable(handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), num + 1);
-  }
-
-  // Generate one more file at level-0, which should trigger level-0
-  // compaction.
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Suppose each file flushed from mem table has size 1. Now we compact
-  // (level0_file_num_compaction_trigger+1)=4 files and should have a big
-  // file of size 4.
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 1);
-  for (int i = 1; i < options.num_levels ; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-
-  // Stage 2:
-  //   Now we have one file at level 0, with size 4. We also have some data in
-  //   mem table. Let's continue generating new files at level 0, but don't
-  //   trigger level-0 compaction.
-  //   First, clean up memtable before inserting new data. This will generate
-  //   a level-0 file, with size around 0.4 (according to previously written
-  //   data amount).
-  filter->expect_full_compaction_.store(false);
-  ASSERT_OK(Flush(1));
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 3;
-       num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable(handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), num + 3);
-  }
-
-  // Generate one more file at level-0, which should trigger level-0
-  // compaction.
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Before compaction, we have 4 files at level 0, with size 4, 0.4, 1, 1.
-  // After comapction, we should have 2 files, with size 4, 2.4.
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 2);
-  for (int i = 1; i < options.num_levels ; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-
-  // Stage 3:
-  //   Now we have 2 files at level 0, with size 4 and 2.4. Continue
-  //   generating new files at level 0.
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 3;
-       num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable(handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), num + 3);
-  }
-
-  // Generate one more file at level-0, which should trigger level-0
-  // compaction.
-  for (int i = 0; i < 12; i++) {
-    ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Before compaction, we have 4 files at level 0, with size 4, 2.4, 1, 1.
-  // After comapction, we should have 3 files, with size 4, 2.4, 2.
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 3);
-  for (int i = 1; i < options.num_levels ; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-
-  // Stage 4:
-  //   Now we have 3 files at level 0, with size 4, 2.4, 2. Let's generate a
-  //   new file of size 1.
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Level-0 compaction is triggered, but no file will be picked up.
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 4);
-  for (int i = 1; i < options.num_levels ; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-
-  // Stage 5:
-  //   Now we have 4 files at level 0, with size 4, 2.4, 2, 1. Let's generate
-  //   a new file of size 1.
-  filter->expect_full_compaction_.store(true);
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // All files at level 0 will be compacted into a single one.
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 1);
-  for (int i = 1; i < options.num_levels ; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-}
-
-TEST(DBTest, UniversalCompactionSizeAmplification) {
-  Options options;
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  options.level0_file_num_compaction_trigger = 3;
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  // Trigger compaction if size amplification exceeds 110%
-  options.compaction_options_universal.max_size_amplification_percent = 110;
-  options = CurrentOptions(options);
-  ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-  Random rnd(301);
-  int key_idx = 0;
-
-  //   Generate two files in Level 0. Both files are approx the same size.
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 1;
-       num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable(handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), num + 1);
-  }
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 2);
-
-  // Flush whatever is remaining in memtable. This is typically
-  // small, which should not trigger size ratio based compaction
-  // but will instead trigger size amplification.
-  ASSERT_OK(Flush(1));
-
-  dbfull()->TEST_WaitForCompact();
-
-  // Verify that size amplification did occur
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 1);
-}
-
-TEST(DBTest, UniversalCompactionOptions) {
-  Options options;
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  options.level0_file_num_compaction_trigger = 4;
-  options.num_levels = 1;
-  options.compaction_options_universal.compression_size_percent = -1;
-  options = CurrentOptions(options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  Random rnd(301);
-  int key_idx = 0;
-
-  for (int num = 0; num < options.level0_file_num_compaction_trigger; num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(1, Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable(handles_[1]);
-
-    if (num < options.level0_file_num_compaction_trigger - 1) {
-      ASSERT_EQ(NumTableFilesAtLevel(0, 1), num + 1);
-    }
-  }
-
-  dbfull()->TEST_WaitForCompact();
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 1);
-  for (int i = 1; i < options.num_levels ; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-}
-
-TEST(DBTest, UniversalCompactionStopStyleSimilarSize) {
-  Options options = CurrentOptions();
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  // trigger compaction if there are >= 4 files
-  options.level0_file_num_compaction_trigger = 4;
-  options.compaction_options_universal.size_ratio = 10;
-  options.compaction_options_universal.stop_style = kCompactionStopStyleSimilarSize;
-  options.num_levels=1;
-  Reopen(&options);
-
-  Random rnd(301);
-  int key_idx = 0;
-
-  // Stage 1:
-  //   Generate a set of files at level 0, but don't trigger level-0
-  //   compaction.
-  for (int num = 0;
-       num < options.level0_file_num_compaction_trigger-1;
-       num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    ASSERT_EQ(NumTableFilesAtLevel(0), num + 1);
-  }
-
-  // Generate one more file at level-0, which should trigger level-0
-  // compaction.
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Suppose each file flushed from mem table has size 1. Now we compact
-  // (level0_file_num_compaction_trigger+1)=4 files and should have a big
-  // file of size 4.
-  ASSERT_EQ(NumTableFilesAtLevel(0), 1);
-
-  // Stage 2:
-  //   Now we have one file at level 0, with size 4. We also have some data in
-  //   mem table. Let's continue generating new files at level 0, but don't
-  //   trigger level-0 compaction.
-  //   First, clean up memtable before inserting new data. This will generate
-  //   a level-0 file, with size around 0.4 (according to previously written
-  //   data amount).
-  dbfull()->Flush(FlushOptions());
-  for (int num = 0;
-       num < options.level0_file_num_compaction_trigger-3;
-       num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(Key(key_idx), RandomString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    ASSERT_EQ(NumTableFilesAtLevel(0), num + 3);
-  }
-
-  // Generate one more file at level-0, which should trigger level-0
-  // compaction.
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Before compaction, we have 4 files at level 0, with size 4, 0.4, 1, 1.
-  // After compaction, we should have 3 files, with size 4, 0.4, 2.
-  ASSERT_EQ(NumTableFilesAtLevel(0), 3);
-  // Stage 3:
-  //   Now we have 3 files at level 0, with size 4, 0.4, 2. Generate one
-  //   more file at level-0, which should trigger level-0 compaction.
-  for (int i = 0; i < 11; i++) {
-    ASSERT_OK(Put(Key(key_idx), RandomString(&rnd, 10000)));
-    key_idx++;
-  }
-  dbfull()->TEST_WaitForCompact();
-  // Level-0 compaction is triggered, but no file will be picked up.
-  ASSERT_EQ(NumTableFilesAtLevel(0), 4);
-}
-
-#if defined(SNAPPY)
-TEST(DBTest, CompressedCache) {
-  int num_iter = 80;
-
-  // Run this test three iterations.
-  // Iteration 1: only a uncompressed block cache
-  // Iteration 2: only a compressed block cache
-  // Iteration 3: both block cache and compressed cache
-  // Iteration 4: both block cache and compressed cache, but DB is not
-  // compressed
-  for (int iter = 0; iter < 4; iter++) {
-    Options options = CurrentOptions();
-    options.write_buffer_size = 64*1024;        // small write buffer
-    options.statistics = rocksdb::CreateDBStatistics();
-
-    switch (iter) {
-      case 0:
-        // only uncompressed block cache
-        options.block_cache = NewLRUCache(8*1024);
-        options.block_cache_compressed = nullptr;
-        break;
-      case 1:
-        // no block cache, only compressed cache
-        options.no_block_cache = true;
-        options.block_cache = nullptr;
-        options.block_cache_compressed = NewLRUCache(8*1024);
-        break;
-      case 2:
-        // both compressed and uncompressed block cache
-        options.block_cache = NewLRUCache(1024);
-        options.block_cache_compressed = NewLRUCache(8*1024);
-        break;
-      case 3:
-        // both block cache and compressed cache, but DB is not compressed
-        // also, make block cache sizes bigger, to trigger block cache hits
-        options.block_cache = NewLRUCache(1024 * 1024);
-        options.block_cache_compressed = NewLRUCache(8 * 1024 * 1024);
-        options.compression = kNoCompression;
-        break;
-      default:
-        ASSERT_TRUE(false);
-    }
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    // default column family doesn't have block cache
-    Options no_block_cache_opts;
-    no_block_cache_opts.no_block_cache = true;
-    no_block_cache_opts.statistics = options.statistics;
-    options = CurrentOptions(options);
-    ReopenWithColumnFamilies({"default", "pikachu"},
-                             {&no_block_cache_opts, &options});
-
-    Random rnd(301);
-
-    // Write 8MB (80 values, each 100K)
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    std::vector<std::string> values;
-    std::string str;
-    for (int i = 0; i < num_iter; i++) {
-      if (i % 4 == 0) {        // high compression ratio
-        str = RandomString(&rnd, 1000);
-      }
-      values.push_back(str);
-      ASSERT_OK(Put(1, Key(i), values[i]));
-    }
-
-    // flush all data from memtable so that reads are from block cache
-    ASSERT_OK(Flush(1));
-
-    for (int i = 0; i < num_iter; i++) {
-      ASSERT_EQ(Get(1, Key(i)), values[i]);
-    }
-
-    // check that we triggered the appropriate code paths in the cache
-    switch (iter) {
-      case 0:
-        // only uncompressed block cache
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0);
-        ASSERT_EQ(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0);
-        break;
-      case 1:
-        // no block cache, only compressed cache
-        ASSERT_EQ(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0);
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0);
-        break;
-      case 2:
-        // both compressed and uncompressed block cache
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0);
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0);
-        break;
-      case 3:
-        // both compressed and uncompressed block cache
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0);
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_HIT), 0);
-        ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0);
-        // compressed doesn't have any hits since blocks are not compressed on
-        // storage
-        ASSERT_EQ(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_HIT), 0);
-        break;
-      default:
-        ASSERT_TRUE(false);
-    }
-
-    options.create_if_missing = true;
-    DestroyAndReopen(&options);
-  }
-}
-
-static std::string CompressibleString(Random* rnd, int len) {
-  std::string r;
-  test::CompressibleString(rnd, 0.8, len, &r);
-  return r;
-}
-
-TEST(DBTest, UniversalCompactionCompressRatio1) {
-  Options options;
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  options.level0_file_num_compaction_trigger = 2;
-  options.num_levels = 1;
-  options.compaction_options_universal.compression_size_percent = 70;
-  options = CurrentOptions(options);
-  Reopen(&options);
-
-  Random rnd(301);
-  int key_idx = 0;
-
-  // The first compaction (2) is compressed.
-  for (int num = 0; num < 2; num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(Key(key_idx), CompressibleString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    dbfull()->TEST_WaitForCompact();
-  }
-  ASSERT_LT((int)dbfull()->TEST_GetLevel0TotalSize(), 110000 * 2 * 0.9);
-
-  // The second compaction (4) is compressed
-  for (int num = 0; num < 2; num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(Key(key_idx), CompressibleString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    dbfull()->TEST_WaitForCompact();
-  }
-  ASSERT_LT((int)dbfull()->TEST_GetLevel0TotalSize(), 110000 * 4 * 0.9);
-
-  // The third compaction (2 4) is compressed since this time it is
-  // (1 1 3.2) and 3.2/5.2 doesn't reach ratio.
-  for (int num = 0; num < 2; num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(Key(key_idx), CompressibleString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    dbfull()->TEST_WaitForCompact();
-  }
-  ASSERT_LT((int)dbfull()->TEST_GetLevel0TotalSize(), 110000 * 6 * 0.9);
-
-  // When we start for the compaction up to (2 4 8), the latest
-  // compressed is not compressed.
-  for (int num = 0; num < 8; num++) {
-    // Write 110KB (11 values, each 10K)
-    for (int i = 0; i < 11; i++) {
-      ASSERT_OK(Put(Key(key_idx), CompressibleString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    dbfull()->TEST_WaitForCompact();
-  }
-  ASSERT_GT((int)dbfull()->TEST_GetLevel0TotalSize(),
-            110000 * 11 * 0.8 + 110000 * 2);
-}
-
-TEST(DBTest, UniversalCompactionCompressRatio2) {
-  Options options;
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  options.level0_file_num_compaction_trigger = 2;
-  options.num_levels = 1;
-  options.compaction_options_universal.compression_size_percent = 95;
-  options = CurrentOptions(options);
-  Reopen(&options);
-
-  Random rnd(301);
-  int key_idx = 0;
-
-  // When we start for the compaction up to (2 4 8), the latest
-  // compressed is compressed given the size ratio to compress.
-  for (int num = 0; num < 14; num++) {
-    // Write 120KB (12 values, each 10K)
-    for (int i = 0; i < 12; i++) {
-      ASSERT_OK(Put(Key(key_idx), CompressibleString(&rnd, 10000)));
-      key_idx++;
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    dbfull()->TEST_WaitForCompact();
-  }
-  ASSERT_LT((int)dbfull()->TEST_GetLevel0TotalSize(),
-            120000 * 12 * 0.8 + 120000 * 2);
-}
-#endif
-
-TEST(DBTest, ConvertCompactionStyle) {
-  Random rnd(301);
-  int max_key_level_insert = 200;
-  int max_key_universal_insert = 600;
-
-  // Stage 1: generate a db with level compaction
-  Options options;
-  options.write_buffer_size = 100<<10; //100KB
-  options.num_levels = 4;
-  options.level0_file_num_compaction_trigger = 3;
-  options.max_bytes_for_level_base = 500<<10; // 500KB
-  options.max_bytes_for_level_multiplier = 1;
-  options.target_file_size_base = 200<<10; // 200KB
-  options.target_file_size_multiplier = 1;
-  options = CurrentOptions(options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  for (int i = 0; i <= max_key_level_insert; i++) {
-    // each value is 10K
-    ASSERT_OK(Put(1, Key(i), RandomString(&rnd, 10000)));
-  }
-  ASSERT_OK(Flush(1));
-  dbfull()->TEST_WaitForCompact();
-
-  ASSERT_GT(TotalTableFiles(1, 4), 1);
-  int non_level0_num_files = 0;
-  for (int i = 1; i < options.num_levels; i++) {
-    non_level0_num_files += NumTableFilesAtLevel(i, 1);
-  }
-  ASSERT_GT(non_level0_num_files, 0);
-
-  // Stage 2: reopen with universal compaction - should fail
-  options = CurrentOptions();
-  options.compaction_style = kCompactionStyleUniversal;
-  options = CurrentOptions(options);
-  Status s = TryReopenWithColumnFamilies({"default", "pikachu"}, &options);
-  ASSERT_TRUE(s.IsInvalidArgument());
-
-  // Stage 3: compact into a single file and move the file to level 0
-  options = CurrentOptions();
-  options.disable_auto_compactions = true;
-  options.target_file_size_base = INT_MAX;
-  options.target_file_size_multiplier = 1;
-  options.max_bytes_for_level_base = INT_MAX;
-  options.max_bytes_for_level_multiplier = 1;
-  options = CurrentOptions(options);
-  ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-  dbfull()->CompactRange(handles_[1], nullptr, nullptr, true /* reduce level */,
-                         0 /* reduce to level 0 */);
-
-  for (int i = 0; i < options.num_levels; i++) {
-    int num = NumTableFilesAtLevel(i, 1);
-    if (i == 0) {
-      ASSERT_EQ(num, 1);
-    } else {
-      ASSERT_EQ(num, 0);
-    }
-  }
-
-  // Stage 4: re-open in universal compaction style and do some db operations
-  options = CurrentOptions();
-  options.compaction_style = kCompactionStyleUniversal;
-  options.write_buffer_size = 100<<10; //100KB
-  options.level0_file_num_compaction_trigger = 3;
-  options = CurrentOptions(options);
-  ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-  for (int i = max_key_level_insert / 2; i <= max_key_universal_insert; i++) {
-    ASSERT_OK(Put(1, Key(i), RandomString(&rnd, 10000)));
-  }
-  dbfull()->Flush(FlushOptions());
-  ASSERT_OK(Flush(1));
-  dbfull()->TEST_WaitForCompact();
-
-  for (int i = 1; i < options.num_levels; i++) {
-    ASSERT_EQ(NumTableFilesAtLevel(i, 1), 0);
-  }
-
-  // verify keys inserted in both level compaction style and universal
-  // compaction style
-  std::string keys_in_db;
-  Iterator* iter = dbfull()->NewIterator(ReadOptions(), handles_[1]);
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    keys_in_db.append(iter->key().ToString());
-    keys_in_db.push_back(',');
-  }
-  delete iter;
-
-  std::string expected_keys;
-  for (int i = 0; i <= max_key_universal_insert; i++) {
-    expected_keys.append(Key(i));
-    expected_keys.push_back(',');
-  }
-
-  ASSERT_EQ(keys_in_db, expected_keys);
-}
-
-namespace {
-void MinLevelHelper(DBTest* self, Options& options) {
-  Random rnd(301);
-
-  for (int num = 0;
-    num < options.level0_file_num_compaction_trigger - 1;
-    num++)
-  {
-    std::vector<std::string> values;
-    // Write 120KB (12 values, each 10K)
-    for (int i = 0; i < 12; i++) {
-      values.push_back(RandomString(&rnd, 10000));
-      ASSERT_OK(self->Put(Key(i), values[i]));
-    }
-    self->dbfull()->TEST_WaitForFlushMemTable();
-    ASSERT_EQ(self->NumTableFilesAtLevel(0), num + 1);
-  }
-
-  //generate one more file in level-0, and should trigger level-0 compaction
-  std::vector<std::string> values;
-  for (int i = 0; i < 12; i++) {
-    values.push_back(RandomString(&rnd, 10000));
-    ASSERT_OK(self->Put(Key(i), values[i]));
-  }
-  self->dbfull()->TEST_WaitForCompact();
-
-  ASSERT_EQ(self->NumTableFilesAtLevel(0), 0);
-  ASSERT_EQ(self->NumTableFilesAtLevel(1), 1);
-}
-
-// returns false if the calling-Test should be skipped
-bool MinLevelToCompress(CompressionType& type, Options& options, int wbits,
-                        int lev, int strategy) {
-  fprintf(stderr, "Test with compression options : window_bits = %d, level =  %d, strategy = %d}\n", wbits, lev, strategy);
-  options.write_buffer_size = 100<<10; //100KB
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  options.level0_file_num_compaction_trigger = 3;
-  options.create_if_missing = true;
-
-  if (SnappyCompressionSupported(CompressionOptions(wbits, lev, strategy))) {
-    type = kSnappyCompression;
-    fprintf(stderr, "using snappy\n");
-  } else if (ZlibCompressionSupported(
-               CompressionOptions(wbits, lev, strategy))) {
-    type = kZlibCompression;
-    fprintf(stderr, "using zlib\n");
-  } else if (BZip2CompressionSupported(
-               CompressionOptions(wbits, lev, strategy))) {
-    type = kBZip2Compression;
-    fprintf(stderr, "using bzip2\n");
-  } else if (LZ4CompressionSupported(
-                 CompressionOptions(wbits, lev, strategy))) {
-    type = kLZ4Compression;
-    fprintf(stderr, "using lz4\n");
-  } else if (LZ4HCCompressionSupported(
-                 CompressionOptions(wbits, lev, strategy))) {
-    type = kLZ4HCCompression;
-    fprintf(stderr, "using lz4hc\n");
-  } else {
-    fprintf(stderr, "skipping test, compression disabled\n");
-    return false;
-  }
-  options.compression_per_level.resize(options.num_levels);
-
-  // do not compress L0
-  for (int i = 0; i < 1; i++) {
-    options.compression_per_level[i] = kNoCompression;
-  }
-  for (int i = 1; i < options.num_levels; i++) {
-    options.compression_per_level[i] = type;
-  }
-  return true;
-}
-}  // namespace
-
-TEST(DBTest, MinLevelToCompress1) {
-  Options options = CurrentOptions();
-  CompressionType type;
-  if (!MinLevelToCompress(type, options, -14, -1, 0)) {
-    return;
-  }
-  Reopen(&options);
-  MinLevelHelper(this, options);
-
-  // do not compress L0 and L1
-  for (int i = 0; i < 2; i++) {
-    options.compression_per_level[i] = kNoCompression;
-  }
-  for (int i = 2; i < options.num_levels; i++) {
-    options.compression_per_level[i] = type;
-  }
-  DestroyAndReopen(&options);
-  MinLevelHelper(this, options);
-}
-
-TEST(DBTest, MinLevelToCompress2) {
-  Options options = CurrentOptions();
-  CompressionType type;
-  if (!MinLevelToCompress(type, options, 15, -1, 0)) {
-    return;
-  }
-  Reopen(&options);
-  MinLevelHelper(this, options);
-
-  // do not compress L0 and L1
-  for (int i = 0; i < 2; i++) {
-    options.compression_per_level[i] = kNoCompression;
-  }
-  for (int i = 2; i < options.num_levels; i++) {
-    options.compression_per_level[i] = type;
-  }
-  DestroyAndReopen(&options);
-  MinLevelHelper(this, options);
-}
-
-TEST(DBTest, RepeatedWritesToSameKey) {
-  do {
-    Options options;
-    options.env = env_;
-    options.write_buffer_size = 100000;  // Small write buffer
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // We must have at most one file per level except for level-0,
-    // which may have up to kL0_StopWritesTrigger files.
-    const int kMaxFiles =
-        options.num_levels + options.level0_stop_writes_trigger;
-
-    Random rnd(301);
-    std::string value = RandomString(&rnd, 2 * options.write_buffer_size);
-    for (int i = 0; i < 5 * kMaxFiles; i++) {
-      ASSERT_OK(Put(1, "key", value));
-      ASSERT_LE(TotalTableFiles(1), kMaxFiles);
-    }
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, InPlaceUpdate) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.inplace_update_support = true;
-    options.env = env_;
-    options.write_buffer_size = 100000;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Update key with values of smaller size
-    int numValues = 10;
-    for (int i = numValues; i > 0; i--) {
-      std::string value = DummyString(i, 'a');
-      ASSERT_OK(Put(1, "key", value));
-      ASSERT_EQ(value, Get(1, "key"));
-    }
-
-    // Only 1 instance for that key.
-    validateNumberOfEntries(1, 1);
-
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, InPlaceUpdateLargeNewValue) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.inplace_update_support = true;
-    options.env = env_;
-    options.write_buffer_size = 100000;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Update key with values of larger size
-    int numValues = 10;
-    for (int i = 0; i < numValues; i++) {
-      std::string value = DummyString(i, 'a');
-      ASSERT_OK(Put(1, "key", value));
-      ASSERT_EQ(value, Get(1, "key"));
-    }
-
-    // All 10 updates exist in the internal iterator
-    validateNumberOfEntries(numValues, 1);
-
-  } while (ChangeCompactOptions());
-}
-
-
-TEST(DBTest, InPlaceUpdateCallbackSmallerSize) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.inplace_update_support = true;
-
-    options.env = env_;
-    options.write_buffer_size = 100000;
-    options.inplace_callback =
-      rocksdb::DBTest::updateInPlaceSmallerSize;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Update key with values of smaller size
-    int numValues = 10;
-    ASSERT_OK(Put(1, "key", DummyString(numValues, 'a')));
-    ASSERT_EQ(DummyString(numValues, 'c'), Get(1, "key"));
-
-    for (int i = numValues; i > 0; i--) {
-      ASSERT_OK(Put(1, "key", DummyString(i, 'a')));
-      ASSERT_EQ(DummyString(i - 1, 'b'), Get(1, "key"));
-    }
-
-    // Only 1 instance for that key.
-    validateNumberOfEntries(1, 1);
-
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, InPlaceUpdateCallbackSmallerVarintSize) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.inplace_update_support = true;
-
-    options.env = env_;
-    options.write_buffer_size = 100000;
-    options.inplace_callback =
-      rocksdb::DBTest::updateInPlaceSmallerVarintSize;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Update key with values of smaller varint size
-    int numValues = 265;
-    ASSERT_OK(Put(1, "key", DummyString(numValues, 'a')));
-    ASSERT_EQ(DummyString(numValues, 'c'), Get(1, "key"));
-
-    for (int i = numValues; i > 0; i--) {
-      ASSERT_OK(Put(1, "key", DummyString(i, 'a')));
-      ASSERT_EQ(DummyString(1, 'b'), Get(1, "key"));
-    }
-
-    // Only 1 instance for that key.
-    validateNumberOfEntries(1, 1);
-
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, InPlaceUpdateCallbackLargeNewValue) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.inplace_update_support = true;
-
-    options.env = env_;
-    options.write_buffer_size = 100000;
-    options.inplace_callback =
-      rocksdb::DBTest::updateInPlaceLargerSize;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Update key with values of larger size
-    int numValues = 10;
-    for (int i = 0; i < numValues; i++) {
-      ASSERT_OK(Put(1, "key", DummyString(i, 'a')));
-      ASSERT_EQ(DummyString(i, 'c'), Get(1, "key"));
-    }
-
-    // No inplace updates. All updates are puts with new seq number
-    // All 10 updates exist in the internal iterator
-    validateNumberOfEntries(numValues, 1);
-
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, InPlaceUpdateCallbackNoAction) {
-  do {
-    Options options;
-    options.create_if_missing = true;
-    options.inplace_update_support = true;
-
-    options.env = env_;
-    options.write_buffer_size = 100000;
-    options.inplace_callback =
-      rocksdb::DBTest::updateInPlaceNoAction;
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Callback function requests no actions from db
-    ASSERT_OK(Put(1, "key", DummyString(1, 'a')));
-    ASSERT_EQ(Get(1, "key"), "NOT_FOUND");
-
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, CompactionFilter) {
-  Options options = CurrentOptions();
-  options.max_open_files = -1;
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  options.compaction_filter_factory = std::make_shared<KeepFilterFactory>();
-  options = CurrentOptions(options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  // Write 100K keys, these are written to a few files in L0.
-  const std::string value(10, 'x');
-  for (int i = 0; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%010d", i);
-    Put(1, key, value);
-  }
-  ASSERT_OK(Flush(1));
-
-  // Push all files to the highest level L2. Verify that
-  // the compaction is each level invokes the filter for
-  // all the keys in that level.
-  cfilter_count = 0;
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-  ASSERT_EQ(cfilter_count, 100000);
-  cfilter_count = 0;
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-  ASSERT_EQ(cfilter_count, 100000);
-
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1, 1), 0);
-  ASSERT_NE(NumTableFilesAtLevel(2, 1), 0);
-  cfilter_count = 0;
-
-  // All the files are in the lowest level.
-  // Verify that all but the 100001st record
-  // has sequence number zero. The 100001st record
-  // is at the tip of this snapshot and cannot
-  // be zeroed out.
-  // TODO: figure out sequence number squashtoo
-  int count = 0;
-  int total = 0;
-  Iterator* iter = dbfull()->TEST_NewInternalIterator(handles_[1]);
-  iter->SeekToFirst();
-  ASSERT_OK(iter->status());
-  while (iter->Valid()) {
-    ParsedInternalKey ikey(Slice(), 0, kTypeValue);
-    ikey.sequence = -1;
-    ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
-    total++;
-    if (ikey.sequence != 0) {
-      count++;
-    }
-    iter->Next();
-  }
-  ASSERT_EQ(total, 100000);
-  ASSERT_EQ(count, 1);
-  delete iter;
-
-  // overwrite all the 100K keys once again.
-  for (int i = 0; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%010d", i);
-    ASSERT_OK(Put(1, key, value));
-  }
-  ASSERT_OK(Flush(1));
-
-  // push all files to the highest level L2. This
-  // means that all keys should pass at least once
-  // via the compaction filter
-  cfilter_count = 0;
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-  ASSERT_EQ(cfilter_count, 100000);
-  cfilter_count = 0;
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-  ASSERT_EQ(cfilter_count, 100000);
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1, 1), 0);
-  ASSERT_NE(NumTableFilesAtLevel(2, 1), 0);
-
-  // create a new database with the compaction
-  // filter in such a way that it deletes all keys
-  options.compaction_filter_factory = std::make_shared<DeleteFilterFactory>();
-  options.create_if_missing = true;
-  DestroyAndReopen(&options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  // write all the keys once again.
-  for (int i = 0; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%010d", i);
-    ASSERT_OK(Put(1, key, value));
-  }
-  ASSERT_OK(Flush(1));
-  ASSERT_NE(NumTableFilesAtLevel(0, 1), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1, 1), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(2, 1), 0);
-
-  // Push all files to the highest level L2. This
-  // triggers the compaction filter to delete all keys,
-  // verify that at the end of the compaction process,
-  // nothing is left.
-  cfilter_count = 0;
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-  ASSERT_EQ(cfilter_count, 100000);
-  cfilter_count = 0;
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-  ASSERT_EQ(cfilter_count, 0);
-  ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1, 1), 0);
-
-  // Scan the entire database to ensure that nothing is left
-  iter = db_->NewIterator(ReadOptions(), handles_[1]);
-  iter->SeekToFirst();
-  count = 0;
-  while (iter->Valid()) {
-    count++;
-    iter->Next();
-  }
-  ASSERT_EQ(count, 0);
-  delete iter;
-
-  // The sequence number of the remaining record
-  // is not zeroed out even though it is at the
-  // level Lmax because this record is at the tip
-  // TODO: remove the following or design a different
-  // test
-  count = 0;
-  iter = dbfull()->TEST_NewInternalIterator(handles_[1]);
-  iter->SeekToFirst();
-  ASSERT_OK(iter->status());
-  while (iter->Valid()) {
-    ParsedInternalKey ikey(Slice(), 0, kTypeValue);
-    ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
-    ASSERT_NE(ikey.sequence, (unsigned)0);
-    count++;
-    iter->Next();
-  }
-  ASSERT_EQ(count, 0);
-  delete iter;
-}
-
-TEST(DBTest, CompactionFilterWithValueChange) {
-  do {
-    Options options;
-    options.num_levels = 3;
-    options.max_mem_compaction_level = 0;
-    options.compaction_filter_factory =
-      std::make_shared<ChangeFilterFactory>();
-    options = CurrentOptions(options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Write 100K+1 keys, these are written to a few files
-    // in L0. We do this so that the current snapshot points
-    // to the 100001 key.The compaction filter is  not invoked
-    // on keys that are visible via a snapshot because we
-    // anyways cannot delete it.
-    const std::string value(10, 'x');
-    for (int i = 0; i < 100001; i++) {
-      char key[100];
-      snprintf(key, sizeof(key), "B%010d", i);
-      Put(1, key, value);
-    }
-
-    // push all files to  lower levels
-    ASSERT_OK(Flush(1));
-    dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-    dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-
-    // re-write all data again
-    for (int i = 0; i < 100001; i++) {
-      char key[100];
-      snprintf(key, sizeof(key), "B%010d", i);
-      Put(1, key, value);
-    }
-
-    // push all files to  lower levels. This should
-    // invoke the compaction filter for all 100000 keys.
-    ASSERT_OK(Flush(1));
-    dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-    dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-
-    // verify that all keys now have the new value that
-    // was set by the compaction process.
-    for (int i = 0; i < 100001; i++) {
-      char key[100];
-      snprintf(key, sizeof(key), "B%010d", i);
-      std::string newvalue = Get(1, key);
-      ASSERT_EQ(newvalue.compare(NEW_VALUE), 0);
-    }
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, CompactionFilterContextManual) {
-  KeepFilterFactory* filter = new KeepFilterFactory();
-
-  Options options = CurrentOptions();
-  options.compaction_style = kCompactionStyleUniversal;
-  options.compaction_filter_factory.reset(filter);
-  options.compression = kNoCompression;
-  options.level0_file_num_compaction_trigger = 8;
-  Reopen(&options);
-  int num_keys_per_file = 400;
-  for (int j = 0; j < 3; j++) {
-    // Write several keys.
-    const std::string value(10, 'x');
-    for (int i = 0; i < num_keys_per_file; i++) {
-      char key[100];
-      snprintf(key, sizeof(key), "B%08d%02d", i, j);
-      Put(key, value);
-    }
-    dbfull()->TEST_FlushMemTable();
-    // Make sure next file is much smaller so automatic compaction will not
-    // be triggered.
-    num_keys_per_file /= 2;
-  }
-
-  // Force a manual compaction
-  cfilter_count = 0;
-  filter->expect_manual_compaction_.store(true);
-  filter->expect_full_compaction_.store(false);  // Manual compaction always
-                                                 // set this flag.
-  dbfull()->CompactRange(nullptr, nullptr);
-  ASSERT_EQ(cfilter_count, 700);
-  ASSERT_EQ(NumTableFilesAtLevel(0), 1);
-
-  // Verify total number of keys is correct after manual compaction.
-  int count = 0;
-  int total = 0;
-  Iterator* iter = dbfull()->TEST_NewInternalIterator();
-  iter->SeekToFirst();
-  ASSERT_OK(iter->status());
-  while (iter->Valid()) {
-    ParsedInternalKey ikey(Slice(), 0, kTypeValue);
-    ikey.sequence = -1;
-    ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
-    total++;
-    if (ikey.sequence != 0) {
-      count++;
-    }
-    iter->Next();
-  }
-  ASSERT_EQ(total, 700);
-  ASSERT_EQ(count, 1);
-  delete iter;
-}
-
-class KeepFilterV2 : public CompactionFilterV2 {
- public:
-  virtual std::vector<bool> Filter(int level,
-                                   const SliceVector& keys,
-                                   const SliceVector& existing_values,
-                                   std::vector<std::string>* new_values,
-                                   std::vector<bool>* values_changed)
-    const override {
-    cfilter_count++;
-    std::vector<bool> ret;
-    new_values->clear();
-    values_changed->clear();
-    for (unsigned int i = 0; i < keys.size(); ++i) {
-      values_changed->push_back(false);
-      ret.push_back(false);
-    }
-    return ret;
-  }
-
-  virtual const char* Name() const override {
-    return "KeepFilterV2";
-  }
-};
-
-class DeleteFilterV2 : public CompactionFilterV2 {
- public:
-  virtual std::vector<bool> Filter(int level,
-                                   const SliceVector& keys,
-                                   const SliceVector& existing_values,
-                                   std::vector<std::string>* new_values,
-                                   std::vector<bool>* values_changed)
-    const override {
-    cfilter_count++;
-    new_values->clear();
-    values_changed->clear();
-    std::vector<bool> ret;
-    for (unsigned int i = 0; i < keys.size(); ++i) {
-      values_changed->push_back(false);
-      ret.push_back(true);
-    }
-    return ret;
-  }
-
-  virtual const char* Name() const override {
-    return "DeleteFilterV2";
-  }
-};
-
-class ChangeFilterV2 : public CompactionFilterV2 {
- public:
-  virtual std::vector<bool> Filter(int level,
-                                   const SliceVector& keys,
-                                   const SliceVector& existing_values,
-                                   std::vector<std::string>* new_values,
-                                   std::vector<bool>* values_changed)
-    const override {
-    std::vector<bool> ret;
-    new_values->clear();
-    values_changed->clear();
-    for (unsigned int i = 0; i < keys.size(); ++i) {
-      values_changed->push_back(true);
-      new_values->push_back(NEW_VALUE);
-      ret.push_back(false);
-    }
-    return ret;
-  }
-
-  virtual const char* Name() const override {
-    return "ChangeFilterV2";
-  }
-};
-
-class KeepFilterFactoryV2 : public CompactionFilterFactoryV2 {
- public:
-  explicit KeepFilterFactoryV2(const SliceTransform* prefix_extractor)
-    : CompactionFilterFactoryV2(prefix_extractor) { }
-
-  virtual std::unique_ptr<CompactionFilterV2>
-  CreateCompactionFilterV2(
-      const CompactionFilterContext& context) override {
-    return std::unique_ptr<CompactionFilterV2>(new KeepFilterV2());
-  }
-
-  virtual const char* Name() const override {
-    return "KeepFilterFactoryV2";
-  }
-};
-
-class DeleteFilterFactoryV2 : public CompactionFilterFactoryV2 {
- public:
-  explicit DeleteFilterFactoryV2(const SliceTransform* prefix_extractor)
-    : CompactionFilterFactoryV2(prefix_extractor) { }
-
-  virtual std::unique_ptr<CompactionFilterV2>
-  CreateCompactionFilterV2(
-      const CompactionFilterContext& context) override {
-    return std::unique_ptr<CompactionFilterV2>(new DeleteFilterV2());
-  }
-
-  virtual const char* Name() const override {
-    return "DeleteFilterFactoryV2";
-  }
-};
-
-class ChangeFilterFactoryV2 : public CompactionFilterFactoryV2 {
- public:
-  explicit ChangeFilterFactoryV2(const SliceTransform* prefix_extractor)
-    : CompactionFilterFactoryV2(prefix_extractor) { }
-
-  virtual std::unique_ptr<CompactionFilterV2>
-  CreateCompactionFilterV2(
-      const CompactionFilterContext& context) override {
-    return std::unique_ptr<CompactionFilterV2>(new ChangeFilterV2());
-  }
-
-  virtual const char* Name() const override {
-    return "ChangeFilterFactoryV2";
-  }
-};
-
-TEST(DBTest, CompactionFilterV2) {
-  Options options = CurrentOptions();
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  // extract prefix
-  std::unique_ptr<const SliceTransform> prefix_extractor;
-  prefix_extractor.reset(NewFixedPrefixTransform(8));
-
-  options.compaction_filter_factory_v2
-    = std::make_shared<KeepFilterFactoryV2>(prefix_extractor.get());
-  // In a testing environment, we can only flush the application
-  // compaction filter buffer using universal compaction
-  option_config_ = kUniversalCompaction;
-  options.compaction_style = (rocksdb::CompactionStyle)1;
-  Reopen(&options);
-
-  // Write 100K keys, these are written to a few files in L0.
-  const std::string value(10, 'x');
-  for (int i = 0; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%08d%010d", i , i);
-    Put(key, value);
-  }
-
-  dbfull()->TEST_FlushMemTable();
-
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr);
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr);
-
-  ASSERT_EQ(NumTableFilesAtLevel(0), 1);
-
-  // All the files are in the lowest level.
-  int count = 0;
-  int total = 0;
-  Iterator* iter = dbfull()->TEST_NewInternalIterator();
-  iter->SeekToFirst();
-  ASSERT_OK(iter->status());
-  while (iter->Valid()) {
-    ParsedInternalKey ikey(Slice(), 0, kTypeValue);
-    ikey.sequence = -1;
-    ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
-    total++;
-    if (ikey.sequence != 0) {
-      count++;
-    }
-    iter->Next();
-  }
-
-  ASSERT_EQ(total, 100000);
-  // 1 snapshot only. Since we are using universal compacton,
-  // the sequence no is cleared for better compression
-  ASSERT_EQ(count, 1);
-  delete iter;
-
-  // create a new database with the compaction
-  // filter in such a way that it deletes all keys
-  options.compaction_filter_factory_v2 =
-    std::make_shared<DeleteFilterFactoryV2>(prefix_extractor.get());
-  options.create_if_missing = true;
-  DestroyAndReopen(&options);
-
-  // write all the keys once again.
-  for (int i = 0; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%08d%010d", i, i);
-    Put(key, value);
-  }
-
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_NE(NumTableFilesAtLevel(0), 0);
-
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr);
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr);
-  ASSERT_EQ(NumTableFilesAtLevel(1), 0);
-
-  // Scan the entire database to ensure that nothing is left
-  iter = db_->NewIterator(ReadOptions());
-  iter->SeekToFirst();
-  count = 0;
-  while (iter->Valid()) {
-    count++;
-    iter->Next();
-  }
-
-  ASSERT_EQ(count, 0);
-  delete iter;
-}
-
-TEST(DBTest, CompactionFilterV2WithValueChange) {
-  Options options = CurrentOptions();
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  std::unique_ptr<const SliceTransform> prefix_extractor;
-  prefix_extractor.reset(NewFixedPrefixTransform(8));
-  options.compaction_filter_factory_v2 =
-    std::make_shared<ChangeFilterFactoryV2>(prefix_extractor.get());
-  // In a testing environment, we can only flush the application
-  // compaction filter buffer using universal compaction
-  option_config_ = kUniversalCompaction;
-  options.compaction_style = (rocksdb::CompactionStyle)1;
-  options = CurrentOptions(options);
-  Reopen(&options);
-
-  // Write 100K+1 keys, these are written to a few files
-  // in L0. We do this so that the current snapshot points
-  // to the 100001 key.The compaction filter is  not invoked
-  // on keys that are visible via a snapshot because we
-  // anyways cannot delete it.
-  const std::string value(10, 'x');
-  for (int i = 0; i < 100001; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%08d%010d", i, i);
-    Put(key, value);
-  }
-
-  // push all files to lower levels
-  dbfull()->TEST_FlushMemTable();
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr);
-  dbfull()->TEST_CompactRange(1, nullptr, nullptr);
-
-  // verify that all keys now have the new value that
-  // was set by the compaction process.
-  for (int i = 0; i < 100001; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "B%08d%010d", i, i);
-    std::string newvalue = Get(key);
-    ASSERT_EQ(newvalue.compare(NEW_VALUE), 0);
-  }
-}
-
-TEST(DBTest, CompactionFilterV2NULLPrefix) {
-  Options options = CurrentOptions();
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  std::unique_ptr<const SliceTransform> prefix_extractor;
-  prefix_extractor.reset(NewFixedPrefixTransform(8));
-  options.compaction_filter_factory_v2 =
-    std::make_shared<ChangeFilterFactoryV2>(prefix_extractor.get());
-  // In a testing environment, we can only flush the application
-  // compaction filter buffer using universal compaction
-  option_config_ = kUniversalCompaction;
-  options.compaction_style = (rocksdb::CompactionStyle)1;
-  Reopen(&options);
-
-  // Write 100K+1 keys, these are written to a few files
-  // in L0. We do this so that the current snapshot points
-  // to the 100001 key.The compaction filter is  not invoked
-  // on keys that are visible via a snapshot because we
-  // anyways cannot delete it.
-  const std::string value(10, 'x');
-  char first_key[100];
-  snprintf(first_key, sizeof(first_key), "%s0000%010d", "NULL", 1);
-  Put(first_key, value);
-  for (int i = 1; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "%08d%010d", i, i);
-    Put(key, value);
-  }
-
-  char last_key[100];
-  snprintf(last_key, sizeof(last_key), "%s0000%010d", "NULL", 2);
-  Put(last_key, value);
-
-  // push all files to lower levels
-  dbfull()->TEST_FlushMemTable();
-  dbfull()->TEST_CompactRange(0, nullptr, nullptr);
-
-  // verify that all keys now have the new value that
-  // was set by the compaction process.
-  std::string newvalue = Get(first_key);
-  ASSERT_EQ(newvalue.compare(NEW_VALUE), 0);
-  newvalue = Get(last_key);
-  ASSERT_EQ(newvalue.compare(NEW_VALUE), 0);
-  for (int i = 1; i < 100000; i++) {
-    char key[100];
-    snprintf(key, sizeof(key), "%08d%010d", i, i);
-    std::string newvalue = Get(key);
-    ASSERT_EQ(newvalue.compare(NEW_VALUE), 0);
-  }
-}
-
-TEST(DBTest, SparseMerge) {
-  do {
-    Options options = CurrentOptions();
-    options.compression = kNoCompression;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    FillLevels("A", "Z", 1);
-
-    // Suppose there is:
-    //    small amount of data with prefix A
-    //    large amount of data with prefix B
-    //    small amount of data with prefix C
-    // and that recent updates have made small changes to all three prefixes.
-    // Check that we do not do a compaction that merges all of B in one shot.
-    const std::string value(1000, 'x');
-    Put(1, "A", "va");
-    // Write approximately 100MB of "B" values
-    for (int i = 0; i < 100000; i++) {
-      char key[100];
-      snprintf(key, sizeof(key), "B%010d", i);
-      Put(1, key, value);
-    }
-    Put(1, "C", "vc");
-    ASSERT_OK(Flush(1));
-    dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-
-    // Make sparse update
-    Put(1, "A", "va2");
-    Put(1, "B100", "bvalue2");
-    Put(1, "C", "vc2");
-    ASSERT_OK(Flush(1));
-
-    // Compactions should not cause us to create a situation where
-    // a file overlaps too much data at the next level.
-    ASSERT_LE(dbfull()->TEST_MaxNextLevelOverlappingBytes(handles_[1]),
-              20 * 1048576);
-    dbfull()->TEST_CompactRange(0, nullptr, nullptr);
-    ASSERT_LE(dbfull()->TEST_MaxNextLevelOverlappingBytes(handles_[1]),
-              20 * 1048576);
-    dbfull()->TEST_CompactRange(1, nullptr, nullptr);
-    ASSERT_LE(dbfull()->TEST_MaxNextLevelOverlappingBytes(handles_[1]),
-              20 * 1048576);
-  } while (ChangeCompactOptions());
-}
-
-static bool Between(uint64_t val, uint64_t low, uint64_t high) {
-  bool result = (val >= low) && (val <= high);
-  if (!result) {
-    fprintf(stderr, "Value %llu is not in range [%llu, %llu]\n",
-            (unsigned long long)(val),
-            (unsigned long long)(low),
-            (unsigned long long)(high));
-  }
-  return result;
-}
-
-TEST(DBTest, ApproximateSizes) {
-  do {
-    Options options;
-    options.write_buffer_size = 100000000;        // Large write buffer
-    options.compression = kNoCompression;
-    options = CurrentOptions(options);
-    DestroyAndReopen();
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    ASSERT_TRUE(Between(Size("", "xyz", 1), 0, 0));
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-    ASSERT_TRUE(Between(Size("", "xyz", 1), 0, 0));
-
-    // Write 8MB (80 values, each 100K)
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    const int N = 80;
-    static const int S1 = 100000;
-    static const int S2 = 105000;  // Allow some expansion from metadata
-    Random rnd(301);
-    for (int i = 0; i < N; i++) {
-      ASSERT_OK(Put(1, Key(i), RandomString(&rnd, S1)));
-    }
-
-    // 0 because GetApproximateSizes() does not account for memtable space
-    ASSERT_TRUE(Between(Size("", Key(50), 1), 0, 0));
-
-    // Check sizes across recovery by reopening a few times
-    for (int run = 0; run < 3; run++) {
-      ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-      for (int compact_start = 0; compact_start < N; compact_start += 10) {
-        for (int i = 0; i < N; i += 10) {
-          ASSERT_TRUE(Between(Size("", Key(i), 1), S1 * i, S2 * i));
-          ASSERT_TRUE(Between(Size("", Key(i) + ".suffix", 1), S1 * (i + 1),
-                              S2 * (i + 1)));
-          ASSERT_TRUE(Between(Size(Key(i), Key(i + 10), 1), S1 * 10, S2 * 10));
-        }
-        ASSERT_TRUE(Between(Size("", Key(50), 1), S1 * 50, S2 * 50));
-        ASSERT_TRUE(
-            Between(Size("", Key(50) + ".suffix", 1), S1 * 50, S2 * 50));
-
-        std::string cstart_str = Key(compact_start);
-        std::string cend_str = Key(compact_start + 9);
-        Slice cstart = cstart_str;
-        Slice cend = cend_str;
-        dbfull()->TEST_CompactRange(0, &cstart, &cend, handles_[1]);
-      }
-
-      ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-      ASSERT_GT(NumTableFilesAtLevel(1, 1), 0);
-    }
-    // ApproximateOffsetOf() is not yet implemented in plain table format.
-  } while (ChangeOptions(kSkipUniversalCompaction | kSkipPlainTable));
-}
-
-TEST(DBTest, ApproximateSizes_MixOfSmallAndLarge) {
-  do {
-    Options options = CurrentOptions();
-    options.compression = kNoCompression;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    Random rnd(301);
-    std::string big1 = RandomString(&rnd, 100000);
-    ASSERT_OK(Put(1, Key(0), RandomString(&rnd, 10000)));
-    ASSERT_OK(Put(1, Key(1), RandomString(&rnd, 10000)));
-    ASSERT_OK(Put(1, Key(2), big1));
-    ASSERT_OK(Put(1, Key(3), RandomString(&rnd, 10000)));
-    ASSERT_OK(Put(1, Key(4), big1));
-    ASSERT_OK(Put(1, Key(5), RandomString(&rnd, 10000)));
-    ASSERT_OK(Put(1, Key(6), RandomString(&rnd, 300000)));
-    ASSERT_OK(Put(1, Key(7), RandomString(&rnd, 10000)));
-
-    // Check sizes across recovery by reopening a few times
-    for (int run = 0; run < 3; run++) {
-      ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-      ASSERT_TRUE(Between(Size("", Key(0), 1), 0, 0));
-      ASSERT_TRUE(Between(Size("", Key(1), 1), 10000, 11000));
-      ASSERT_TRUE(Between(Size("", Key(2), 1), 20000, 21000));
-      ASSERT_TRUE(Between(Size("", Key(3), 1), 120000, 121000));
-      ASSERT_TRUE(Between(Size("", Key(4), 1), 130000, 131000));
-      ASSERT_TRUE(Between(Size("", Key(5), 1), 230000, 231000));
-      ASSERT_TRUE(Between(Size("", Key(6), 1), 240000, 241000));
-      ASSERT_TRUE(Between(Size("", Key(7), 1), 540000, 541000));
-      ASSERT_TRUE(Between(Size("", Key(8), 1), 550000, 560000));
-
-      ASSERT_TRUE(Between(Size(Key(3), Key(5), 1), 110000, 111000));
-
-      dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-    }
-    // ApproximateOffsetOf() is not yet implemented in plain table format.
-  } while (ChangeOptions(kSkipPlainTable));
-}
-
-TEST(DBTest, IteratorPinsRef) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    Put(1, "foo", "hello");
-
-    // Get iterator that will yield the current contents of the DB.
-    Iterator* iter = db_->NewIterator(ReadOptions(), handles_[1]);
-
-    // Write to force compactions
-    Put(1, "foo", "newvalue1");
-    for (int i = 0; i < 100; i++) {
-      // 100K values
-      ASSERT_OK(Put(1, Key(i), Key(i) + std::string(100000, 'v')));
-    }
-    Put(1, "foo", "newvalue2");
-
-    iter->SeekToFirst();
-    ASSERT_TRUE(iter->Valid());
-    ASSERT_EQ("foo", iter->key().ToString());
-    ASSERT_EQ("hello", iter->value().ToString());
-    iter->Next();
-    ASSERT_TRUE(!iter->Valid());
-    delete iter;
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, Snapshot) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    Put(0, "foo", "0v1");
-    Put(1, "foo", "1v1");
-    const Snapshot* s1 = db_->GetSnapshot();
-    Put(0, "foo", "0v2");
-    Put(1, "foo", "1v2");
-    const Snapshot* s2 = db_->GetSnapshot();
-    Put(0, "foo", "0v3");
-    Put(1, "foo", "1v3");
-    const Snapshot* s3 = db_->GetSnapshot();
-
-    Put(0, "foo", "0v4");
-    Put(1, "foo", "1v4");
-    ASSERT_EQ("0v1", Get(0, "foo", s1));
-    ASSERT_EQ("1v1", Get(1, "foo", s1));
-    ASSERT_EQ("0v2", Get(0, "foo", s2));
-    ASSERT_EQ("1v2", Get(1, "foo", s2));
-    ASSERT_EQ("0v3", Get(0, "foo", s3));
-    ASSERT_EQ("1v3", Get(1, "foo", s3));
-    ASSERT_EQ("0v4", Get(0, "foo"));
-    ASSERT_EQ("1v4", Get(1, "foo"));
-
-    db_->ReleaseSnapshot(s3);
-    ASSERT_EQ("0v1", Get(0, "foo", s1));
-    ASSERT_EQ("1v1", Get(1, "foo", s1));
-    ASSERT_EQ("0v2", Get(0, "foo", s2));
-    ASSERT_EQ("1v2", Get(1, "foo", s2));
-    ASSERT_EQ("0v4", Get(0, "foo"));
-    ASSERT_EQ("1v4", Get(1, "foo"));
-
-    db_->ReleaseSnapshot(s1);
-    ASSERT_EQ("0v2", Get(0, "foo", s2));
-    ASSERT_EQ("1v2", Get(1, "foo", s2));
-    ASSERT_EQ("0v4", Get(0, "foo"));
-    ASSERT_EQ("1v4", Get(1, "foo"));
-
-    db_->ReleaseSnapshot(s2);
-    ASSERT_EQ("0v4", Get(0, "foo"));
-    ASSERT_EQ("1v4", Get(1, "foo"));
-  } while (ChangeOptions(kSkipHashCuckoo));
-}
-
-TEST(DBTest, HiddenValuesAreRemoved) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    Random rnd(301);
-    FillLevels("a", "z", 1);
-
-    std::string big = RandomString(&rnd, 50000);
-    Put(1, "foo", big);
-    Put(1, "pastfoo", "v");
-    const Snapshot* snapshot = db_->GetSnapshot();
-    Put(1, "foo", "tiny");
-    Put(1, "pastfoo2", "v2");  // Advance sequence number one more
-
-    ASSERT_OK(Flush(1));
-    ASSERT_GT(NumTableFilesAtLevel(0, 1), 0);
-
-    ASSERT_EQ(big, Get(1, "foo", snapshot));
-    ASSERT_TRUE(Between(Size("", "pastfoo", 1), 50000, 60000));
-    db_->ReleaseSnapshot(snapshot);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ tiny, " + big + " ]");
-    Slice x("x");
-    dbfull()->TEST_CompactRange(0, nullptr, &x, handles_[1]);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ tiny ]");
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    ASSERT_GE(NumTableFilesAtLevel(1, 1), 1);
-    dbfull()->TEST_CompactRange(1, nullptr, &x, handles_[1]);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ tiny ]");
-
-    ASSERT_TRUE(Between(Size("", "pastfoo", 1), 0, 1000));
-    // ApproximateOffsetOf() is not yet implemented in plain table format,
-    // which is used by Size().
-    // skip HashCuckooRep as it does not support snapshot
-  } while (ChangeOptions(kSkipUniversalCompaction | kSkipPlainTable |
-                         kSkipHashCuckoo));
-}
-
-TEST(DBTest, CompactBetweenSnapshots) {
-  do {
-    Options options = CurrentOptions();
-    options.disable_auto_compactions = true;
-    CreateAndReopenWithCF({"pikachu"});
-    Random rnd(301);
-    FillLevels("a", "z", 1);
-
-    Put(1, "foo", "first");
-    const Snapshot* snapshot1 = db_->GetSnapshot();
-    Put(1, "foo", "second");
-    Put(1, "foo", "third");
-    Put(1, "foo", "fourth");
-    const Snapshot* snapshot2 = db_->GetSnapshot();
-    Put(1, "foo", "fifth");
-    Put(1, "foo", "sixth");
-
-    // All entries (including duplicates) exist
-    // before any compaction is triggered.
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ("sixth", Get(1, "foo"));
-    ASSERT_EQ("fourth", Get(1, "foo", snapshot2));
-    ASSERT_EQ("first", Get(1, "foo", snapshot1));
-    ASSERT_EQ(AllEntriesFor("foo", 1),
-              "[ sixth, fifth, fourth, third, second, first ]");
-
-    // After a compaction, "second", "third" and "fifth" should
-    // be removed
-    FillLevels("a", "z", 1);
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ("sixth", Get(1, "foo"));
-    ASSERT_EQ("fourth", Get(1, "foo", snapshot2));
-    ASSERT_EQ("first", Get(1, "foo", snapshot1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ sixth, fourth, first ]");
-
-    // after we release the snapshot1, only two values left
-    db_->ReleaseSnapshot(snapshot1);
-    FillLevels("a", "z", 1);
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-
-    // We have only one valid snapshot snapshot2. Since snapshot1 is
-    // not valid anymore, "first" should be removed by a compaction.
-    ASSERT_EQ("sixth", Get(1, "foo"));
-    ASSERT_EQ("fourth", Get(1, "foo", snapshot2));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ sixth, fourth ]");
-
-    // after we release the snapshot2, only one value should be left
-    db_->ReleaseSnapshot(snapshot2);
-    FillLevels("a", "z", 1);
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ("sixth", Get(1, "foo"));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ sixth ]");
-    // skip HashCuckooRep as it does not support snapshot
-  } while (ChangeOptions(kSkipHashCuckoo));
-}
-
-TEST(DBTest, DeletionMarkers1) {
-  CreateAndReopenWithCF({"pikachu"});
-  Put(1, "foo", "v1");
-  ASSERT_OK(Flush(1));
-  const int last = CurrentOptions().max_mem_compaction_level;
-  // foo => v1 is now in last level
-  ASSERT_EQ(NumTableFilesAtLevel(last, 1), 1);
-
-  // Place a table at level last-1 to prevent merging with preceding mutation
-  Put(1, "a", "begin");
-  Put(1, "z", "end");
-  Flush(1);
-  ASSERT_EQ(NumTableFilesAtLevel(last, 1), 1);
-  ASSERT_EQ(NumTableFilesAtLevel(last - 1, 1), 1);
-
-  Delete(1, "foo");
-  Put(1, "foo", "v2");
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2, DEL, v1 ]");
-  ASSERT_OK(Flush(1));  // Moves to level last-2
-  if (CurrentOptions().purge_redundant_kvs_while_flush) {
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2, v1 ]");
-  } else {
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2, DEL, v1 ]");
-  }
-  Slice z("z");
-  dbfull()->TEST_CompactRange(last - 2, nullptr, &z, handles_[1]);
-  // DEL eliminated, but v1 remains because we aren't compacting that level
-  // (DEL can be eliminated because v2 hides v1).
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2, v1 ]");
-  dbfull()->TEST_CompactRange(last - 1, nullptr, nullptr, handles_[1]);
-  // Merging last-1 w/ last, so we are the base level for "foo", so
-  // DEL is removed.  (as is v1).
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2 ]");
-}
-
-TEST(DBTest, DeletionMarkers2) {
-  CreateAndReopenWithCF({"pikachu"});
-  Put(1, "foo", "v1");
-  ASSERT_OK(Flush(1));
-  const int last = CurrentOptions().max_mem_compaction_level;
-  // foo => v1 is now in last level
-  ASSERT_EQ(NumTableFilesAtLevel(last, 1), 1);
-
-  // Place a table at level last-1 to prevent merging with preceding mutation
-  Put(1, "a", "begin");
-  Put(1, "z", "end");
-  Flush(1);
-  ASSERT_EQ(NumTableFilesAtLevel(last, 1), 1);
-  ASSERT_EQ(NumTableFilesAtLevel(last - 1, 1), 1);
-
-  Delete(1, "foo");
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL, v1 ]");
-  ASSERT_OK(Flush(1));  // Moves to level last-2
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL, v1 ]");
-  dbfull()->TEST_CompactRange(last - 2, nullptr, nullptr, handles_[1]);
-  // DEL kept: "last" file overlaps
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL, v1 ]");
-  dbfull()->TEST_CompactRange(last - 1, nullptr, nullptr, handles_[1]);
-  // Merging last-1 w/ last, so we are the base level for "foo", so
-  // DEL is removed.  (as is v1).
-  ASSERT_EQ(AllEntriesFor("foo", 1), "[ ]");
-}
-
-TEST(DBTest, OverlapInLevel0) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    int tmp = CurrentOptions().max_mem_compaction_level;
-    ASSERT_EQ(tmp, 2) << "Fix test to match config";
-
-    //Fill levels 1 and 2 to disable the pushing of new memtables to levels > 0.
-    ASSERT_OK(Put(1, "100", "v100"));
-    ASSERT_OK(Put(1, "999", "v999"));
-    Flush(1);
-    ASSERT_OK(Delete(1, "100"));
-    ASSERT_OK(Delete(1, "999"));
-    Flush(1);
-    ASSERT_EQ("0,1,1", FilesPerLevel(1));
-
-    // Make files spanning the following ranges in level-0:
-    //  files[0]  200 .. 900
-    //  files[1]  300 .. 500
-    // Note that files are sorted by smallest key.
-    ASSERT_OK(Put(1, "300", "v300"));
-    ASSERT_OK(Put(1, "500", "v500"));
-    Flush(1);
-    ASSERT_OK(Put(1, "200", "v200"));
-    ASSERT_OK(Put(1, "600", "v600"));
-    ASSERT_OK(Put(1, "900", "v900"));
-    Flush(1);
-    ASSERT_EQ("2,1,1", FilesPerLevel(1));
-
-    // Compact away the placeholder files we created initially
-    dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-    dbfull()->TEST_CompactRange(2, nullptr, nullptr, handles_[1]);
-    ASSERT_EQ("2", FilesPerLevel(1));
-
-    // Do a memtable compaction.  Before bug-fix, the compaction would
-    // not detect the overlap with level-0 files and would incorrectly place
-    // the deletion in a deeper level.
-    ASSERT_OK(Delete(1, "600"));
-    Flush(1);
-    ASSERT_EQ("3", FilesPerLevel(1));
-    ASSERT_EQ("NOT_FOUND", Get(1, "600"));
-  } while (ChangeOptions(kSkipUniversalCompaction));
-}
-
-TEST(DBTest, L0_CompactionBug_Issue44_a) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "b", "v"));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_OK(Delete(1, "b"));
-    ASSERT_OK(Delete(1, "a"));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_OK(Delete(1, "a"));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_OK(Put(1, "a", "v"));
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("(a->v)", Contents(1));
-    env_->SleepForMicroseconds(1000000);  // Wait for compaction to finish
-    ASSERT_EQ("(a->v)", Contents(1));
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, L0_CompactionBug_Issue44_b) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    Put(1, "", "");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Delete(1, "e");
-    Put(1, "", "");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Put(1, "c", "cv");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Put(1, "", "");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Put(1, "", "");
-    env_->SleepForMicroseconds(1000000);  // Wait for compaction to finish
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Put(1, "d", "dv");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Put(1, "", "");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    Delete(1, "d");
-    Delete(1, "b");
-    ReopenWithColumnFamilies({"default", "pikachu"});
-    ASSERT_EQ("(->)(c->cv)", Contents(1));
-    env_->SleepForMicroseconds(1000000);  // Wait for compaction to finish
-    ASSERT_EQ("(->)(c->cv)", Contents(1));
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, ComparatorCheck) {
-  class NewComparator : public Comparator {
-   public:
-    virtual const char* Name() const { return "rocksdb.NewComparator"; }
-    virtual int Compare(const Slice& a, const Slice& b) const {
-      return BytewiseComparator()->Compare(a, b);
-    }
-    virtual void FindShortestSeparator(std::string* s, const Slice& l) const {
-      BytewiseComparator()->FindShortestSeparator(s, l);
-    }
-    virtual void FindShortSuccessor(std::string* key) const {
-      BytewiseComparator()->FindShortSuccessor(key);
-    }
-  };
-  Options new_options, options;
-  NewComparator cmp;
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    options = CurrentOptions();
-    new_options = CurrentOptions();
-    new_options.comparator = &cmp;
-    // only the non-default column family has non-matching comparator
-    Status s = TryReopenWithColumnFamilies({"default", "pikachu"},
-                                           {&options, &new_options});
-    ASSERT_TRUE(!s.ok());
-    ASSERT_TRUE(s.ToString().find("comparator") != std::string::npos)
-        << s.ToString();
-  } while (ChangeCompactOptions(&new_options));
-}
-
-TEST(DBTest, CustomComparator) {
-  class NumberComparator : public Comparator {
-   public:
-    virtual const char* Name() const { return "test.NumberComparator"; }
-    virtual int Compare(const Slice& a, const Slice& b) const {
-      return ToNumber(a) - ToNumber(b);
-    }
-    virtual void FindShortestSeparator(std::string* s, const Slice& l) const {
-      ToNumber(*s);     // Check format
-      ToNumber(l);      // Check format
-    }
-    virtual void FindShortSuccessor(std::string* key) const {
-      ToNumber(*key);   // Check format
-    }
-   private:
-    static int ToNumber(const Slice& x) {
-      // Check that there are no extra characters.
-      ASSERT_TRUE(x.size() >= 2 && x[0] == '[' && x[x.size()-1] == ']')
-          << EscapeString(x);
-      int val;
-      char ignored;
-      ASSERT_TRUE(sscanf(x.ToString().c_str(), "[%i]%c", &val, &ignored) == 1)
-          << EscapeString(x);
-      return val;
-    }
-  };
-  Options new_options;
-  NumberComparator cmp;
-  do {
-    new_options = CurrentOptions();
-    new_options.create_if_missing = true;
-    new_options.comparator = &cmp;
-    new_options.filter_policy = nullptr;     // Cannot use bloom filters
-    new_options.write_buffer_size = 1000;  // Compact more often
-    new_options = CurrentOptions(new_options);
-    DestroyAndReopen(&new_options);
-    CreateAndReopenWithCF({"pikachu"}, &new_options);
-    ASSERT_OK(Put(1, "[10]", "ten"));
-    ASSERT_OK(Put(1, "[0x14]", "twenty"));
-    for (int i = 0; i < 2; i++) {
-      ASSERT_EQ("ten", Get(1, "[10]"));
-      ASSERT_EQ("ten", Get(1, "[0xa]"));
-      ASSERT_EQ("twenty", Get(1, "[20]"));
-      ASSERT_EQ("twenty", Get(1, "[0x14]"));
-      ASSERT_EQ("NOT_FOUND", Get(1, "[15]"));
-      ASSERT_EQ("NOT_FOUND", Get(1, "[0xf]"));
-      Compact(1, "[0]", "[9999]");
-    }
-
-    for (int run = 0; run < 2; run++) {
-      for (int i = 0; i < 1000; i++) {
-        char buf[100];
-        snprintf(buf, sizeof(buf), "[%d]", i*10);
-        ASSERT_OK(Put(1, buf, buf));
-      }
-      Compact(1, "[0]", "[1000000]");
-    }
-  } while (ChangeCompactOptions(&new_options));
-}
-
-TEST(DBTest, ManualCompaction) {
-  CreateAndReopenWithCF({"pikachu"});
-  ASSERT_EQ(dbfull()->MaxMemCompactionLevel(), 2)
-      << "Need to update this test to match kMaxMemCompactLevel";
-
-  // iter - 0 with 7 levels
-  // iter - 1 with 3 levels
-  for (int iter = 0; iter < 2; ++iter) {
-    MakeTables(3, "p", "q", 1);
-    ASSERT_EQ("1,1,1", FilesPerLevel(1));
-
-    // Compaction range falls before files
-    Compact(1, "", "c");
-    ASSERT_EQ("1,1,1", FilesPerLevel(1));
-
-    // Compaction range falls after files
-    Compact(1, "r", "z");
-    ASSERT_EQ("1,1,1", FilesPerLevel(1));
-
-    // Compaction range overlaps files
-    Compact(1, "p1", "p9");
-    ASSERT_EQ("0,0,1", FilesPerLevel(1));
-
-    // Populate a different range
-    MakeTables(3, "c", "e", 1);
-    ASSERT_EQ("1,1,2", FilesPerLevel(1));
-
-    // Compact just the new range
-    Compact(1, "b", "f");
-    ASSERT_EQ("0,0,2", FilesPerLevel(1));
-
-    // Compact all
-    MakeTables(1, "a", "z", 1);
-    ASSERT_EQ("0,1,2", FilesPerLevel(1));
-    db_->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ("0,0,1", FilesPerLevel(1));
-
-    if (iter == 0) {
-      Options options = CurrentOptions();
-      options.num_levels = 3;
-      options.create_if_missing = true;
-      DestroyAndReopen(&options);
-      CreateAndReopenWithCF({"pikachu"}, &options);
-    }
-  }
-
-}
-
-TEST(DBTest, DBOpen_Options) {
-  std::string dbname = test::TmpDir() + "/db_options_test";
-  ASSERT_OK(DestroyDB(dbname, Options()));
-
-  // Does not exist, and create_if_missing == false: error
-  DB* db = nullptr;
-  Options opts;
-  opts.create_if_missing = false;
-  Status s = DB::Open(opts, dbname, &db);
-  ASSERT_TRUE(strstr(s.ToString().c_str(), "does not exist") != nullptr);
-  ASSERT_TRUE(db == nullptr);
-
-  // Does not exist, and create_if_missing == true: OK
-  opts.create_if_missing = true;
-  s = DB::Open(opts, dbname, &db);
-  ASSERT_OK(s);
-  ASSERT_TRUE(db != nullptr);
-
-  delete db;
-  db = nullptr;
-
-  // Does exist, and error_if_exists == true: error
-  opts.create_if_missing = false;
-  opts.error_if_exists = true;
-  s = DB::Open(opts, dbname, &db);
-  ASSERT_TRUE(strstr(s.ToString().c_str(), "exists") != nullptr);
-  ASSERT_TRUE(db == nullptr);
-
-  // Does exist, and error_if_exists == false: OK
-  opts.create_if_missing = true;
-  opts.error_if_exists = false;
-  s = DB::Open(opts, dbname, &db);
-  ASSERT_OK(s);
-  ASSERT_TRUE(db != nullptr);
-
-  delete db;
-  db = nullptr;
-}
-
-TEST(DBTest, DBOpen_Change_NumLevels) {
-  Options opts;
-  opts.create_if_missing = true;
-  DestroyAndReopen(&opts);
-  ASSERT_TRUE(db_ != nullptr);
-  CreateAndReopenWithCF({"pikachu"}, &opts);
-
-  ASSERT_OK(Put(1, "a", "123"));
-  ASSERT_OK(Put(1, "b", "234"));
-  db_->CompactRange(handles_[1], nullptr, nullptr);
-  Close();
-
-  opts.create_if_missing = false;
-  opts.num_levels = 2;
-  Status s = TryReopenWithColumnFamilies({"default", "pikachu"}, &opts);
-  ASSERT_TRUE(strstr(s.ToString().c_str(), "Invalid argument") != nullptr);
-  ASSERT_TRUE(db_ == nullptr);
-}
-
-TEST(DBTest, DestroyDBMetaDatabase) {
-  std::string dbname = test::TmpDir() + "/db_meta";
-  std::string metadbname = MetaDatabaseName(dbname, 0);
-  std::string metametadbname = MetaDatabaseName(metadbname, 0);
-
-  // Destroy previous versions if they exist. Using the long way.
-  ASSERT_OK(DestroyDB(metametadbname, Options()));
-  ASSERT_OK(DestroyDB(metadbname, Options()));
-  ASSERT_OK(DestroyDB(dbname, Options()));
-
-  // Setup databases
-  Options opts;
-  opts.create_if_missing = true;
-  DB* db = nullptr;
-  ASSERT_OK(DB::Open(opts, dbname, &db));
-  delete db;
-  db = nullptr;
-  ASSERT_OK(DB::Open(opts, metadbname, &db));
-  delete db;
-  db = nullptr;
-  ASSERT_OK(DB::Open(opts, metametadbname, &db));
-  delete db;
-  db = nullptr;
-
-  // Delete databases
-  ASSERT_OK(DestroyDB(dbname, Options()));
-
-  // Check if deletion worked.
-  opts.create_if_missing = false;
-  ASSERT_TRUE(!(DB::Open(opts, dbname, &db)).ok());
-  ASSERT_TRUE(!(DB::Open(opts, metadbname, &db)).ok());
-  ASSERT_TRUE(!(DB::Open(opts, metametadbname, &db)).ok());
-}
-
-// Check that number of files does not grow when we are out of space
-TEST(DBTest, NoSpace) {
-  do {
-    Options options = CurrentOptions();
-    options.env = env_;
-    options.paranoid_checks = false;
-    Reopen(&options);
-
-    ASSERT_OK(Put("foo", "v1"));
-    ASSERT_EQ("v1", Get("foo"));
-    Compact("a", "z");
-    const int num_files = CountFiles();
-    env_->no_space_.Release_Store(env_);   // Force out-of-space errors
-    env_->sleep_counter_.Reset();
-    for (int i = 0; i < 5; i++) {
-      for (int level = 0; level < dbfull()->NumberLevels()-1; level++) {
-        dbfull()->TEST_CompactRange(level, nullptr, nullptr);
-      }
-    }
-
-    std::string property_value;
-    ASSERT_TRUE(db_->GetProperty("rocksdb.background-errors", &property_value));
-    ASSERT_EQ("5", property_value);
-
-    env_->no_space_.Release_Store(nullptr);
-    ASSERT_LT(CountFiles(), num_files + 3);
-
-    // Check that compaction attempts slept after errors
-    ASSERT_GE(env_->sleep_counter_.Read(), 5);
-  } while (ChangeCompactOptions());
-}
-
-// Check background error counter bumped on flush failures.
-TEST(DBTest, NoSpaceFlush) {
-  do {
-    Options options = CurrentOptions();
-    options.env = env_;
-    options.max_background_flushes = 1;
-    Reopen(&options);
-
-    ASSERT_OK(Put("foo", "v1"));
-    env_->no_space_.Release_Store(env_);  // Force out-of-space errors
-
-    std::string property_value;
-    // Background error count is 0 now.
-    ASSERT_TRUE(db_->GetProperty("rocksdb.background-errors", &property_value));
-    ASSERT_EQ("0", property_value);
-
-    dbfull()->TEST_FlushMemTable(false);
-
-    // Wait 300 milliseconds or background-errors turned 1 from 0.
-    int time_to_sleep_limit = 300000;
-    while (time_to_sleep_limit > 0) {
-      int to_sleep = (time_to_sleep_limit > 1000) ? 1000 : time_to_sleep_limit;
-      time_to_sleep_limit -= to_sleep;
-      env_->SleepForMicroseconds(to_sleep);
-
-      ASSERT_TRUE(
-          db_->GetProperty("rocksdb.background-errors", &property_value));
-      if (property_value == "1") {
-        break;
-      }
-    }
-    ASSERT_EQ("1", property_value);
-
-    env_->no_space_.Release_Store(nullptr);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, NonWritableFileSystem) {
-  do {
-    Options options = CurrentOptions();
-    options.write_buffer_size = 1000;
-    options.env = env_;
-    Reopen(&options);
-    ASSERT_OK(Put("foo", "v1"));
-    env_->non_writable_.Release_Store(env_); // Force errors for new files
-    std::string big(100000, 'x');
-    int errors = 0;
-    for (int i = 0; i < 20; i++) {
-      if (!Put("foo", big).ok()) {
-        errors++;
-        env_->SleepForMicroseconds(100000);
-      }
-    }
-    ASSERT_GT(errors, 0);
-    env_->non_writable_.Release_Store(nullptr);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, ManifestWriteError) {
-  // Test for the following problem:
-  // (a) Compaction produces file F
-  // (b) Log record containing F is written to MANIFEST file, but Sync() fails
-  // (c) GC deletes F
-  // (d) After reopening DB, reads fail since deleted F is named in log record
-
-  // We iterate twice.  In the second iteration, everything is the
-  // same except the log record never makes it to the MANIFEST file.
-  for (int iter = 0; iter < 2; iter++) {
-    port::AtomicPointer* error_type = (iter == 0)
-        ? &env_->manifest_sync_error_
-        : &env_->manifest_write_error_;
-
-    // Insert foo=>bar mapping
-    Options options = CurrentOptions();
-    options.env = env_;
-    options.create_if_missing = true;
-    options.error_if_exists = false;
-    DestroyAndReopen(&options);
-    ASSERT_OK(Put("foo", "bar"));
-    ASSERT_EQ("bar", Get("foo"));
-
-    // Memtable compaction (will succeed)
-    Flush();
-    ASSERT_EQ("bar", Get("foo"));
-    const int last = dbfull()->MaxMemCompactionLevel();
-    ASSERT_EQ(NumTableFilesAtLevel(last), 1);   // foo=>bar is now in last level
-
-    // Merging compaction (will fail)
-    error_type->Release_Store(env_);
-    dbfull()->TEST_CompactRange(last, nullptr, nullptr);  // Should fail
-    ASSERT_EQ("bar", Get("foo"));
-
-    // Recovery: should not lose data
-    error_type->Release_Store(nullptr);
-    Reopen(&options);
-    ASSERT_EQ("bar", Get("foo"));
-  }
-}
-
-TEST(DBTest, PutFailsParanoid) {
-  // Test the following:
-  // (a) A random put fails in paranoid mode (simulate by sync fail)
-  // (b) All other puts have to fail, even if writes would succeed
-  // (c) All of that should happen ONLY if paranoid_checks = true
-
-  Options options = CurrentOptions();
-  options.env = env_;
-  options.create_if_missing = true;
-  options.error_if_exists = false;
-  options.paranoid_checks = true;
-  DestroyAndReopen(&options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-  Status s;
-
-  ASSERT_OK(Put(1, "foo", "bar"));
-  ASSERT_OK(Put(1, "foo1", "bar1"));
-  // simulate error
-  env_->log_write_error_.Release_Store(env_);
-  s = Put(1, "foo2", "bar2");
-  ASSERT_TRUE(!s.ok());
-  env_->log_write_error_.Release_Store(nullptr);
-  s = Put(1, "foo3", "bar3");
-  // the next put should fail, too
-  ASSERT_TRUE(!s.ok());
-  // but we're still able to read
-  ASSERT_EQ("bar", Get(1, "foo"));
-
-  // do the same thing with paranoid checks off
-  options.paranoid_checks = false;
-  DestroyAndReopen(&options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  ASSERT_OK(Put(1, "foo", "bar"));
-  ASSERT_OK(Put(1, "foo1", "bar1"));
-  // simulate error
-  env_->log_write_error_.Release_Store(env_);
-  s = Put(1, "foo2", "bar2");
-  ASSERT_TRUE(!s.ok());
-  env_->log_write_error_.Release_Store(nullptr);
-  s = Put(1, "foo3", "bar3");
-  // the next put should NOT fail
-  ASSERT_TRUE(s.ok());
-}
-
-TEST(DBTest, FilesDeletedAfterCompaction) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "foo", "v2"));
-    Compact(1, "a", "z");
-    const int num_files = CountLiveFiles();
-    for (int i = 0; i < 10; i++) {
-      ASSERT_OK(Put(1, "foo", "v2"));
-      Compact(1, "a", "z");
-    }
-    ASSERT_EQ(CountLiveFiles(), num_files);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, BloomFilter) {
-  do {
-    env_->count_random_reads_ = true;
-    Options options = CurrentOptions();
-    options.env = env_;
-    options.no_block_cache = true;
-    options.filter_policy = NewBloomFilterPolicy(10);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Populate multiple layers
-    const int N = 10000;
-    for (int i = 0; i < N; i++) {
-      ASSERT_OK(Put(1, Key(i), Key(i)));
-    }
-    Compact(1, "a", "z");
-    for (int i = 0; i < N; i += 100) {
-      ASSERT_OK(Put(1, Key(i), Key(i)));
-    }
-    Flush(1);
-
-    // Prevent auto compactions triggered by seeks
-    env_->delay_sstable_sync_.Release_Store(env_);
-
-    // Lookup present keys.  Should rarely read from small sstable.
-    env_->random_read_counter_.Reset();
-    for (int i = 0; i < N; i++) {
-      ASSERT_EQ(Key(i), Get(1, Key(i)));
-    }
-    int reads = env_->random_read_counter_.Read();
-    fprintf(stderr, "%d present => %d reads\n", N, reads);
-    ASSERT_GE(reads, N);
-    ASSERT_LE(reads, N + 2*N/100);
-
-    // Lookup present keys.  Should rarely read from either sstable.
-    env_->random_read_counter_.Reset();
-    for (int i = 0; i < N; i++) {
-      ASSERT_EQ("NOT_FOUND", Get(1, Key(i) + ".missing"));
-    }
-    reads = env_->random_read_counter_.Read();
-    fprintf(stderr, "%d missing => %d reads\n", N, reads);
-    ASSERT_LE(reads, 3*N/100);
-
-    env_->delay_sstable_sync_.Release_Store(nullptr);
-    Close();
-    delete options.filter_policy;
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, SnapshotFiles) {
-  do {
-    Options options = CurrentOptions();
-    options.write_buffer_size = 100000000;        // Large write buffer
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    Random rnd(301);
-
-    // Write 8MB (80 values, each 100K)
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    std::vector<std::string> values;
-    for (int i = 0; i < 80; i++) {
-      values.push_back(RandomString(&rnd, 100000));
-      ASSERT_OK(Put((i < 40), Key(i), values[i]));
-    }
-
-    // assert that nothing makes it to disk yet.
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-
-    // get a file snapshot
-    uint64_t manifest_number = 0;
-    uint64_t manifest_size = 0;
-    std::vector<std::string> files;
-    dbfull()->DisableFileDeletions();
-    dbfull()->GetLiveFiles(files, &manifest_size);
-
-    // CURRENT, MANIFEST, *.sst files (one for each CF)
-    ASSERT_EQ(files.size(), 4U);
-
-    uint64_t number = 0;
-    FileType type;
-
-    // copy these files to a new snapshot directory
-    std::string snapdir = dbname_ + ".snapdir/";
-    std::string mkdir = "mkdir -p " + snapdir;
-    ASSERT_EQ(system(mkdir.c_str()), 0);
-
-    for (unsigned int i = 0; i < files.size(); i++) {
-      // our clients require that GetLiveFiles returns
-      // files with "/" as first character!
-      ASSERT_EQ(files[i][0], '/');
-      std::string src = dbname_ + files[i];
-      std::string dest = snapdir + files[i];
-
-      uint64_t size;
-      ASSERT_OK(env_->GetFileSize(src, &size));
-
-      // record the number and the size of the
-      // latest manifest file
-      if (ParseFileName(files[i].substr(1), &number, &type)) {
-        if (type == kDescriptorFile) {
-          if (number > manifest_number) {
-            manifest_number = number;
-            ASSERT_GE(size, manifest_size);
-            size = manifest_size; // copy only valid MANIFEST data
-          }
-        }
-      }
-      CopyFile(src, dest, size);
-    }
-
-    // release file snapshot
-    dbfull()->DisableFileDeletions();
-
-    // overwrite one key, this key should not appear in the snapshot
-    std::vector<std::string> extras;
-    for (unsigned int i = 0; i < 1; i++) {
-      extras.push_back(RandomString(&rnd, 100000));
-      ASSERT_OK(Put(0, Key(i), extras[i]));
-    }
-
-    // verify that data in the snapshot are correct
-    std::vector<ColumnFamilyDescriptor> column_families;
-    column_families.emplace_back("default", ColumnFamilyOptions());
-    column_families.emplace_back("pikachu", ColumnFamilyOptions());
-    std::vector<ColumnFamilyHandle*> cf_handles;
-    DB* snapdb;
-    DBOptions opts;
-    opts.create_if_missing = false;
-    Status stat =
-        DB::Open(opts, snapdir, column_families, &cf_handles, &snapdb);
-    ASSERT_OK(stat);
-
-    ReadOptions roptions;
-    std::string val;
-    for (unsigned int i = 0; i < 80; i++) {
-      stat = snapdb->Get(roptions, cf_handles[i < 40], Key(i), &val);
-      ASSERT_EQ(values[i].compare(val), 0);
-    }
-    for (auto cfh : cf_handles) {
-      delete cfh;
-    }
-    delete snapdb;
-
-    // look at the new live files after we added an 'extra' key
-    // and after we took the first snapshot.
-    uint64_t new_manifest_number = 0;
-    uint64_t new_manifest_size = 0;
-    std::vector<std::string> newfiles;
-    dbfull()->DisableFileDeletions();
-    dbfull()->GetLiveFiles(newfiles, &new_manifest_size);
-
-    // find the new manifest file. assert that this manifest file is
-    // the same one as in the previous snapshot. But its size should be
-    // larger because we added an extra key after taking the
-    // previous shapshot.
-    for (unsigned int i = 0; i < newfiles.size(); i++) {
-      std::string src = dbname_ + "/" + newfiles[i];
-      // record the lognumber and the size of the
-      // latest manifest file
-      if (ParseFileName(newfiles[i].substr(1), &number, &type)) {
-        if (type == kDescriptorFile) {
-          if (number > new_manifest_number) {
-            uint64_t size;
-            new_manifest_number = number;
-            ASSERT_OK(env_->GetFileSize(src, &size));
-            ASSERT_GE(size, new_manifest_size);
-          }
-        }
-      }
-    }
-    ASSERT_EQ(manifest_number, new_manifest_number);
-    ASSERT_GT(new_manifest_size, manifest_size);
-
-    // release file snapshot
-    dbfull()->DisableFileDeletions();
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, CompactOnFlush) {
-  do {
-    Options options = CurrentOptions();
-    options.purge_redundant_kvs_while_flush = true;
-    options.disable_auto_compactions = true;
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    Put(1, "foo", "v1");
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v1 ]");
-
-    // Write two new keys
-    Put(1, "a", "begin");
-    Put(1, "z", "end");
-    Flush(1);
-
-    // Case1: Delete followed by a put
-    Delete(1, "foo");
-    Put(1, "foo", "v2");
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2, DEL, v1 ]");
-
-    // After the current memtable is flushed, the DEL should
-    // have been removed
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2, v1 ]");
-
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v2 ]");
-
-    // Case 2: Delete followed by another delete
-    Delete(1, "foo");
-    Delete(1, "foo");
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL, DEL, v2 ]");
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL, v2 ]");
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ ]");
-
-    // Case 3: Put followed by a delete
-    Put(1, "foo", "v3");
-    Delete(1, "foo");
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL, v3 ]");
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ DEL ]");
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ ]");
-
-    // Case 4: Put followed by another Put
-    Put(1, "foo", "v4");
-    Put(1, "foo", "v5");
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v5, v4 ]");
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v5 ]");
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v5 ]");
-
-    // clear database
-    Delete(1, "foo");
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ ]");
-
-    // Case 5: Put followed by snapshot followed by another Put
-    // Both puts should remain.
-    Put(1, "foo", "v6");
-    const Snapshot* snapshot = db_->GetSnapshot();
-    Put(1, "foo", "v7");
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v7, v6 ]");
-    db_->ReleaseSnapshot(snapshot);
-
-    // clear database
-    Delete(1, "foo");
-    dbfull()->CompactRange(handles_[1], nullptr, nullptr);
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ ]");
-
-    // Case 5: snapshot followed by a put followed by another Put
-    // Only the last put should remain.
-    const Snapshot* snapshot1 = db_->GetSnapshot();
-    Put(1, "foo", "v8");
-    Put(1, "foo", "v9");
-    ASSERT_OK(Flush(1));
-    ASSERT_EQ(AllEntriesFor("foo", 1), "[ v9 ]");
-    db_->ReleaseSnapshot(snapshot1);
-  } while (ChangeCompactOptions());
-}
-
-namespace {
-std::vector<std::uint64_t> ListLogFiles(Env* env, const std::string& path) {
-  std::vector<std::string> files;
-  std::vector<uint64_t> log_files;
-  env->GetChildren(path, &files);
-  uint64_t number;
-  FileType type;
-  for (size_t i = 0; i < files.size(); ++i) {
-    if (ParseFileName(files[i], &number, &type)) {
-      if (type == kLogFile) {
-        log_files.push_back(number);
-      }
-    }
-  }
-  return std::move(log_files);
-}
-}  // namespace
-
-TEST(DBTest, WALArchivalTtl) {
-  do {
-    Options options = CurrentOptions();
-    options.create_if_missing = true;
-    options.WAL_ttl_seconds = 1000;
-    DestroyAndReopen(&options);
-
-    //  TEST : Create DB with a ttl and no size limit.
-    //  Put some keys. Count the log files present in the DB just after insert.
-    //  Re-open db. Causes deletion/archival to take place.
-    //  Assert that the files moved under "/archive".
-    //  Reopen db with small ttl.
-    //  Assert that archive was removed.
-
-    std::string archiveDir = ArchivalDirectory(dbname_);
-
-    for (int i = 0; i < 10; ++i) {
-      for (int j = 0; j < 10; ++j) {
-        ASSERT_OK(Put(Key(10 * i + j), DummyString(1024)));
-      }
-
-      std::vector<uint64_t> log_files = ListLogFiles(env_, dbname_);
-
-      options.create_if_missing = false;
-      Reopen(&options);
-
-      std::vector<uint64_t> logs = ListLogFiles(env_, archiveDir);
-      std::set<uint64_t> archivedFiles(logs.begin(), logs.end());
-
-      for (auto& log : log_files) {
-        ASSERT_TRUE(archivedFiles.find(log) != archivedFiles.end());
-      }
-    }
-
-    std::vector<uint64_t> log_files = ListLogFiles(env_, archiveDir);
-    ASSERT_TRUE(log_files.size() > 0);
-
-    options.WAL_ttl_seconds = 1;
-    env_->SleepForMicroseconds(2 * 1000 * 1000);
-    Reopen(&options);
-
-    log_files = ListLogFiles(env_, archiveDir);
-    ASSERT_TRUE(log_files.empty());
-  } while (ChangeCompactOptions());
-}
-
-namespace {
-uint64_t GetLogDirSize(std::string dir_path, SpecialEnv* env) {
-  uint64_t dir_size = 0;
-  std::vector<std::string> files;
-  env->GetChildren(dir_path, &files);
-  for (auto& f : files) {
-    uint64_t number;
-    FileType type;
-    if (ParseFileName(f, &number, &type) && type == kLogFile) {
-      std::string const file_path = dir_path + "/" + f;
-      uint64_t file_size;
-      env->GetFileSize(file_path, &file_size);
-      dir_size += file_size;
-    }
-  }
-  return dir_size;
-}
-}  // namespace
-
-TEST(DBTest, WALArchivalSizeLimit) {
-  do {
-    Options options = CurrentOptions();
-    options.create_if_missing = true;
-    options.WAL_ttl_seconds = 0;
-    options.WAL_size_limit_MB = 1000;
-
-    // TEST : Create DB with huge size limit and no ttl.
-    // Put some keys. Count the archived log files present in the DB
-    // just after insert. Assert that there are many enough.
-    // Change size limit. Re-open db.
-    // Assert that archive is not greater than WAL_size_limit_MB.
-    // Set ttl and time_to_check_ to small values. Re-open db.
-    // Assert that there are no archived logs left.
-
-    DestroyAndReopen(&options);
-    for (int i = 0; i < 128 * 128; ++i) {
-      ASSERT_OK(Put(Key(i), DummyString(1024)));
-    }
-    Reopen(&options);
-
-    std::string archive_dir = ArchivalDirectory(dbname_);
-    std::vector<std::uint64_t> log_files = ListLogFiles(env_, archive_dir);
-    ASSERT_TRUE(log_files.size() > 2);
-
-    options.WAL_size_limit_MB = 8;
-    Reopen(&options);
-    dbfull()->TEST_PurgeObsoleteteWAL();
-
-    uint64_t archive_size = GetLogDirSize(archive_dir, env_);
-    ASSERT_TRUE(archive_size <= options.WAL_size_limit_MB * 1024 * 1024);
-
-    options.WAL_ttl_seconds = 1;
-    dbfull()->TEST_SetDefaultTimeToCheck(1);
-    env_->SleepForMicroseconds(2 * 1000 * 1000);
-    Reopen(&options);
-    dbfull()->TEST_PurgeObsoleteteWAL();
-
-    log_files = ListLogFiles(env_, archive_dir);
-    ASSERT_TRUE(log_files.empty());
-  } while (ChangeCompactOptions());
-}
-
-namespace {
-SequenceNumber ReadRecords(
-    std::unique_ptr<TransactionLogIterator>& iter,
-    int& count) {
-  count = 0;
-  SequenceNumber lastSequence = 0;
-  BatchResult res;
-  while (iter->Valid()) {
-    res = iter->GetBatch();
-    ASSERT_TRUE(res.sequence > lastSequence);
-    ++count;
-    lastSequence = res.sequence;
-    ASSERT_OK(iter->status());
-    iter->Next();
-  }
-  return res.sequence;
-}
-
-void ExpectRecords(
-    const int expected_no_records,
-    std::unique_ptr<TransactionLogIterator>& iter) {
-  int num_records;
-  ReadRecords(iter, num_records);
-  ASSERT_EQ(num_records, expected_no_records);
-}
-}  // namespace
-
-TEST(DBTest, TransactionLogIterator) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    Put(0, "key1", DummyString(1024));
-    Put(1, "key2", DummyString(1024));
-    Put(1, "key2", DummyString(1024));
-    ASSERT_EQ(dbfull()->GetLatestSequenceNumber(), 3U);
-    {
-      auto iter = OpenTransactionLogIter(0);
-      ExpectRecords(3, iter);
-    }
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-    env_->SleepForMicroseconds(2 * 1000 * 1000);
-    {
-      Put(0, "key4", DummyString(1024));
-      Put(1, "key5", DummyString(1024));
-      Put(0, "key6", DummyString(1024));
-    }
-    {
-      auto iter = OpenTransactionLogIter(0);
-      ExpectRecords(6, iter);
-    }
-  } while (ChangeCompactOptions());
-}
-
-#ifndef NDEBUG // sync point is not included with DNDEBUG build
-TEST(DBTest, TransactionLogIteratorRace) {
-  // Setup sync point dependency to reproduce the race condition of
-  // a log file moved to archived dir, in the middle of GetSortedWalFiles
-  rocksdb::SyncPoint::GetInstance()->LoadDependency(
-    { { "DBImpl::GetSortedWalFiles:1", "DBImpl::PurgeObsoleteFiles:1" },
-      { "DBImpl::PurgeObsoleteFiles:2", "DBImpl::GetSortedWalFiles:2" },
-    });
-
-  do {
-    rocksdb::SyncPoint::GetInstance()->ClearTrace();
-    rocksdb::SyncPoint::GetInstance()->DisableProcessing();
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    Put("key1", DummyString(1024));
-    dbfull()->Flush(FlushOptions());
-    Put("key2", DummyString(1024));
-    dbfull()->Flush(FlushOptions());
-    Put("key3", DummyString(1024));
-    dbfull()->Flush(FlushOptions());
-    Put("key4", DummyString(1024));
-    ASSERT_EQ(dbfull()->GetLatestSequenceNumber(), 4U);
-
-    {
-      auto iter = OpenTransactionLogIter(0);
-      ExpectRecords(4, iter);
-    }
-
-    rocksdb::SyncPoint::GetInstance()->EnableProcessing();
-    // trigger async flush, and log move. Well, log move will
-    // wait until the GetSortedWalFiles:1 to reproduce the race
-    // condition
-    FlushOptions flush_options;
-    flush_options.wait = false;
-    dbfull()->Flush(flush_options);
-
-    // "key5" would be written in a new memtable and log
-    Put("key5", DummyString(1024));
-    {
-      // this iter would miss "key4" if not fixed
-      auto iter = OpenTransactionLogIter(0);
-      ExpectRecords(5, iter);
-    }
-  } while (ChangeCompactOptions());
-}
-#endif
-
-TEST(DBTest, TransactionLogIteratorMoveOverZeroFiles) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    // Do a plain Reopen.
-    Put(1, "key1", DummyString(1024));
-    // Two reopens should create a zero record WAL file.
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-
-    Put(1, "key2", DummyString(1024));
-
-    auto iter = OpenTransactionLogIter(0);
-    ExpectRecords(2, iter);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, TransactionLogIteratorStallAtLastRecord) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    Put("key1", DummyString(1024));
-    auto iter = OpenTransactionLogIter(0);
-    ASSERT_OK(iter->status());
-    ASSERT_TRUE(iter->Valid());
-    iter->Next();
-    ASSERT_TRUE(!iter->Valid());
-    ASSERT_OK(iter->status());
-    Put("key2", DummyString(1024));
-    iter->Next();
-    ASSERT_OK(iter->status());
-    ASSERT_TRUE(iter->Valid());
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, TransactionLogIteratorJustEmptyFile) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    unique_ptr<TransactionLogIterator> iter;
-    Status status = dbfull()->GetUpdatesSince(0, &iter);
-    // Check that an empty iterator is returned
-    ASSERT_TRUE(!iter->Valid());
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, TransactionLogIteratorCheckAfterRestart) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    Put("key1", DummyString(1024));
-    Put("key2", DummyString(1023));
-    dbfull()->Flush(FlushOptions());
-    Reopen(&options);
-    auto iter = OpenTransactionLogIter(0);
-    ExpectRecords(2, iter);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, TransactionLogIteratorCorruptedLog) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    for (int i = 0; i < 1024; i++) {
-      Put("key"+std::to_string(i), DummyString(10));
-    }
-    dbfull()->Flush(FlushOptions());
-    // Corrupt this log to create a gap
-    rocksdb::VectorLogPtr wal_files;
-    ASSERT_OK(dbfull()->GetSortedWalFiles(wal_files));
-    const auto logfilePath = dbname_ + "/" + wal_files.front()->PathName();
-    ASSERT_EQ(
-      0,
-      truncate(logfilePath.c_str(), wal_files.front()->SizeFileBytes() / 2));
-    // Insert a new entry to a new log file
-    Put("key1025", DummyString(10));
-    // Try to read from the beginning. Should stop before the gap and read less
-    // than 1025 entries
-    auto iter = OpenTransactionLogIter(0);
-    int count;
-    int last_sequence_read = ReadRecords(iter, count);
-    ASSERT_LT(last_sequence_read, 1025);
-    // Try to read past the gap, should be able to seek to key1025
-    auto iter2 = OpenTransactionLogIter(last_sequence_read + 1);
-    ExpectRecords(1, iter2);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, TransactionLogIteratorBatchOperations) {
-  do {
-    Options options = OptionsForLogIterTest();
-    DestroyAndReopen(&options);
-    CreateAndReopenWithCF({"pikachu"}, &options);
-    WriteBatch batch;
-    batch.Put(handles_[1], "key1", DummyString(1024));
-    batch.Put(handles_[0], "key2", DummyString(1024));
-    batch.Put(handles_[1], "key3", DummyString(1024));
-    batch.Delete(handles_[0], "key2");
-    dbfull()->Write(WriteOptions(), &batch);
-    Flush(1);
-    Flush(0);
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-    Put(1, "key4", DummyString(1024));
-    auto iter = OpenTransactionLogIter(3);
-    ExpectRecords(2, iter);
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, TransactionLogIteratorBlobs) {
-  Options options = OptionsForLogIterTest();
-  DestroyAndReopen(&options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-  {
-    WriteBatch batch;
-    batch.Put(handles_[1], "key1", DummyString(1024));
-    batch.Put(handles_[0], "key2", DummyString(1024));
-    batch.PutLogData(Slice("blob1"));
-    batch.Put(handles_[1], "key3", DummyString(1024));
-    batch.PutLogData(Slice("blob2"));
-    batch.Delete(handles_[0], "key2");
-    dbfull()->Write(WriteOptions(), &batch);
-    ReopenWithColumnFamilies({"default", "pikachu"}, &options);
-  }
-
-  auto res = OpenTransactionLogIter(0)->GetBatch();
-  struct Handler : public WriteBatch::Handler {
-    std::string seen;
-    virtual Status PutCF(uint32_t cf, const Slice& key, const Slice& value) {
-      seen += "Put(" + std::to_string(cf) + ", " + key.ToString() + ", " +
-              std::to_string(value.size()) + ")";
-      return Status::OK();
-    }
-    virtual Status MergeCF(uint32_t cf, const Slice& key, const Slice& value) {
-      seen += "Merge(" + std::to_string(cf) + ", " + key.ToString() + ", " +
-              std::to_string(value.size()) + ")";
-      return Status::OK();
-    }
-    virtual void LogData(const Slice& blob) {
-      seen += "LogData(" + blob.ToString() + ")";
-    }
-    virtual Status DeleteCF(uint32_t cf, const Slice& key) {
-      seen += "Delete(" + std::to_string(cf) + ", " + key.ToString() + ")";
-      return Status::OK();
-    }
-  } handler;
-  res.writeBatchPtr->Iterate(&handler);
-  ASSERT_EQ(
-      "Put(1, key1, 1024)"
-      "Put(0, key2, 1024)"
-      "LogData(blob1)"
-      "Put(1, key3, 1024)"
-      "LogData(blob2)"
-      "Delete(0, key2)",
-      handler.seen);
-}
-
-TEST(DBTest, ReadFirstRecordCache) {
-  Options options = CurrentOptions();
-  options.env = env_;
-  options.create_if_missing = true;
-  DestroyAndReopen(&options);
-
-  std::string path = dbname_ + "/000001.log";
-  unique_ptr<WritableFile> file;
-  ASSERT_OK(env_->NewWritableFile(path, &file, EnvOptions()));
-
-  SequenceNumber s;
-  ASSERT_OK(dbfull()->TEST_ReadFirstLine(path, &s));
-  ASSERT_EQ(s, 0U);
-
-  ASSERT_OK(dbfull()->TEST_ReadFirstRecord(kAliveLogFile, 1, &s));
-  ASSERT_EQ(s, 0U);
-
-  log::Writer writer(std::move(file));
-  WriteBatch batch;
-  batch.Put("foo", "bar");
-  WriteBatchInternal::SetSequence(&batch, 10);
-  writer.AddRecord(WriteBatchInternal::Contents(&batch));
-
-  env_->count_sequential_reads_ = true;
-  // sequential_read_counter_ sanity test
-  ASSERT_EQ(env_->sequential_read_counter_.Read(), 0);
-
-  ASSERT_OK(dbfull()->TEST_ReadFirstRecord(kAliveLogFile, 1, &s));
-  ASSERT_EQ(s, 10U);
-  // did a read
-  ASSERT_EQ(env_->sequential_read_counter_.Read(), 1);
-
-  ASSERT_OK(dbfull()->TEST_ReadFirstRecord(kAliveLogFile, 1, &s));
-  ASSERT_EQ(s, 10U);
-  // no new reads since the value is cached
-  ASSERT_EQ(env_->sequential_read_counter_.Read(), 1);
-}
-
-TEST(DBTest, ReadCompaction) {
-  std::string value(4096, '4'); // a string of size 4K
-  {
-    Options options = CurrentOptions();
-    options.create_if_missing = true;
-    options.max_open_files = 20; // only 10 file in file-cache
-    options.target_file_size_base = 512;
-    options.write_buffer_size = 64 * 1024;
-    options.filter_policy = nullptr;
-    options.block_size = 4096;
-    options.no_block_cache = true;
-    options.disable_seek_compaction = false;
-
-    CreateAndReopenWithCF({"pikachu"}, &options);
-
-    // Write 8MB (2000 values, each 4K)
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    std::vector<std::string> values;
-    for (int i = 0; i < 2000; i++) {
-      ASSERT_OK(Put(1, Key(i), value));
-    }
-
-    // clear level 0 and 1 if necessary.
-    Flush(1);
-    dbfull()->TEST_CompactRange(0, nullptr, nullptr, handles_[1]);
-    dbfull()->TEST_CompactRange(1, nullptr, nullptr, handles_[1]);
-    ASSERT_EQ(NumTableFilesAtLevel(0, 1), 0);
-    ASSERT_EQ(NumTableFilesAtLevel(1, 1), 0);
-
-    // write some new keys into level 0
-    for (int i = 0; i < 2000; i = i + 16) {
-      ASSERT_OK(Put(1, Key(i), value));
-    }
-    Flush(1);
-
-    // Wait for any write compaction to finish
-    dbfull()->TEST_WaitForCompact();
-
-    // remember number of files in each level
-    int l1 = NumTableFilesAtLevel(0, 1);
-    int l2 = NumTableFilesAtLevel(1, 1);
-    int l3 = NumTableFilesAtLevel(2, 1);
-    ASSERT_NE(NumTableFilesAtLevel(0, 1), 0);
-    ASSERT_NE(NumTableFilesAtLevel(1, 1), 0);
-    ASSERT_NE(NumTableFilesAtLevel(2, 1), 0);
-
-    // read a bunch of times, trigger read compaction
-    for (int j = 0; j < 100; j++) {
-      for (int i = 0; i < 2000; i++) {
-        Get(1, Key(i));
-      }
-    }
-    // wait for read compaction to finish
-    env_->SleepForMicroseconds(1000000);
-
-    // verify that the number of files have decreased
-    // in some level, indicating that there was a compaction
-    ASSERT_TRUE(NumTableFilesAtLevel(0, 1) < l1 ||
-                NumTableFilesAtLevel(1, 1) < l2 ||
-                NumTableFilesAtLevel(2, 1) < l3);
-  }
-}
-
-// Multi-threaded test:
-namespace {
-
-static const int kColumnFamilies = 10;
-static const int kNumThreads = 10;
-static const int kTestSeconds = 10;
-static const int kNumKeys = 1000;
-
-struct MTState {
-  DBTest* test;
-  port::AtomicPointer stop;
-  port::AtomicPointer counter[kNumThreads];
-  port::AtomicPointer thread_done[kNumThreads];
-};
-
-struct MTThread {
-  MTState* state;
-  int id;
-};
-
-static void MTThreadBody(void* arg) {
-  MTThread* t = reinterpret_cast<MTThread*>(arg);
-  int id = t->id;
-  DB* db = t->state->test->db_;
-  uintptr_t counter = 0;
-  fprintf(stderr, "... starting thread %d\n", id);
-  Random rnd(1000 + id);
-  char valbuf[1500];
-  while (t->state->stop.Acquire_Load() == nullptr) {
-    t->state->counter[id].Release_Store(reinterpret_cast<void*>(counter));
-
-    int key = rnd.Uniform(kNumKeys);
-    char keybuf[20];
-    snprintf(keybuf, sizeof(keybuf), "%016d", key);
-
-    if (rnd.OneIn(2)) {
-      // Write values of the form <key, my id, counter, cf, unique_id>.
-      // into each of the CFs
-      // We add some padding for force compactions.
-      int unique_id = rnd.Uniform(1000000);
-      WriteBatch batch;
-      for (int cf = 0; cf < kColumnFamilies; ++cf) {
-        snprintf(valbuf, sizeof(valbuf), "%d.%d.%d.%d.%-1000d", key, id,
-                 static_cast<int>(counter), cf, unique_id);
-        batch.Put(t->state->test->handles_[cf], Slice(keybuf), Slice(valbuf));
-      }
-      ASSERT_OK(db->Write(WriteOptions(), &batch));
-    } else {
-      // Read a value and verify that it matches the pattern written above
-      // and that writes to all column families were atomic (unique_id is the
-      // same)
-      std::vector<Slice> keys(kColumnFamilies, Slice(keybuf));
-      std::vector<std::string> values;
-      std::vector<Status> statuses =
-          db->MultiGet(ReadOptions(), t->state->test->handles_, keys, &values);
-      Status s = statuses[0];
-      // all statuses have to be the same
-      for (size_t i = 1; i < statuses.size(); ++i) {
-        // they are either both ok or both not-found
-        ASSERT_TRUE((s.ok() && statuses[i].ok()) ||
-                    (s.IsNotFound() && statuses[i].IsNotFound()));
-      }
-      if (s.IsNotFound()) {
-        // Key has not yet been written
-      } else {
-        // Check that the writer thread counter is >= the counter in the value
-        ASSERT_OK(s);
-        int unique_id = -1;
-        for (int i = 0; i < kColumnFamilies; ++i) {
-          int k, w, c, cf, u;
-          ASSERT_EQ(5, sscanf(values[i].c_str(), "%d.%d.%d.%d.%d", &k, &w,
-                              &c, &cf, &u))
-              << values[i];
-          ASSERT_EQ(k, key);
-          ASSERT_GE(w, 0);
-          ASSERT_LT(w, kNumThreads);
-          ASSERT_LE((unsigned int)c, reinterpret_cast<uintptr_t>(
-                                         t->state->counter[w].Acquire_Load()));
-          ASSERT_EQ(cf, i);
-          if (i == 0) {
-            unique_id = u;
-          } else {
-            // this checks that updates across column families happened
-            // atomically -- all unique ids are the same
-            ASSERT_EQ(u, unique_id);
-          }
-        }
-      }
-    }
-    counter++;
-  }
-  t->state->thread_done[id].Release_Store(t);
-  fprintf(stderr, "... stopping thread %d after %d ops\n", id, int(counter));
-}
-
-}  // namespace
-
-TEST(DBTest, MultiThreaded) {
-  do {
-    std::vector<std::string> cfs;
-    for (int i = 1; i < kColumnFamilies; ++i) {
-      cfs.push_back(std::to_string(i));
-    }
-    CreateAndReopenWithCF(cfs);
-    // Initialize state
-    MTState mt;
-    mt.test = this;
-    mt.stop.Release_Store(0);
-    for (int id = 0; id < kNumThreads; id++) {
-      mt.counter[id].Release_Store(0);
-      mt.thread_done[id].Release_Store(0);
-    }
-
-    // Start threads
-    MTThread thread[kNumThreads];
-    for (int id = 0; id < kNumThreads; id++) {
-      thread[id].state = &mt;
-      thread[id].id = id;
-      env_->StartThread(MTThreadBody, &thread[id]);
-    }
-
-    // Let them run for a while
-    env_->SleepForMicroseconds(kTestSeconds * 1000000);
-
-    // Stop the threads and wait for them to finish
-    mt.stop.Release_Store(&mt);
-    for (int id = 0; id < kNumThreads; id++) {
-      while (mt.thread_done[id].Acquire_Load() == nullptr) {
-        env_->SleepForMicroseconds(100000);
-      }
-    }
-    // skip as HashCuckooRep does not support snapshot
-  } while (ChangeOptions(kSkipHashCuckoo));
-}
-
-// Group commit test:
-namespace {
-
-static const int kGCNumThreads = 4;
-static const int kGCNumKeys = 1000;
-
-struct GCThread {
-  DB* db;
-  int id;
-  std::atomic<bool> done;
-};
-
-static void GCThreadBody(void* arg) {
-  GCThread* t = reinterpret_cast<GCThread*>(arg);
-  int id = t->id;
-  DB* db = t->db;
-  WriteOptions wo;
-
-  for (int i = 0; i < kGCNumKeys; ++i) {
-    std::string kv(std::to_string(i + id * kGCNumKeys));
-    ASSERT_OK(db->Put(wo, kv, kv));
-  }
-  t->done = true;
-}
-
-}  // namespace
-
-TEST(DBTest, GroupCommitTest) {
-  do {
-    Options options = CurrentOptions();
-    options.statistics = rocksdb::CreateDBStatistics();
-    Reopen(&options);
-
-    // Start threads
-    GCThread thread[kGCNumThreads];
-    for (int id = 0; id < kGCNumThreads; id++) {
-      thread[id].id = id;
-      thread[id].db = db_;
-      thread[id].done = false;
-      env_->StartThread(GCThreadBody, &thread[id]);
-    }
-
-    for (int id = 0; id < kGCNumThreads; id++) {
-      while (thread[id].done == false) {
-        env_->SleepForMicroseconds(100000);
-      }
-    }
-    ASSERT_GT(TestGetTickerCount(options, WRITE_DONE_BY_OTHER), 0);
-
-    std::vector<std::string> expected_db;
-    for (int i = 0; i < kGCNumThreads * kGCNumKeys; ++i) {
-      expected_db.push_back(std::to_string(i));
-    }
-    sort(expected_db.begin(), expected_db.end());
-
-    Iterator* itr = db_->NewIterator(ReadOptions());
-    itr->SeekToFirst();
-    for (auto x : expected_db) {
-      ASSERT_TRUE(itr->Valid());
-      ASSERT_EQ(itr->key().ToString(), x);
-      ASSERT_EQ(itr->value().ToString(), x);
-      itr->Next();
-    }
-    ASSERT_TRUE(!itr->Valid());
-    delete itr;
-
-  } while (ChangeOptions(kSkipNoSeekToLast));
-}
-
-namespace {
-typedef std::map<std::string, std::string> KVMap;
-}
-
-class ModelDB: public DB {
- public:
-  class ModelSnapshot : public Snapshot {
-   public:
-    KVMap map_;
-  };
-
-  explicit ModelDB(const Options& options) : options_(options) {}
-  using DB::Put;
-  virtual Status Put(const WriteOptions& o, ColumnFamilyHandle* cf,
-                     const Slice& k, const Slice& v) {
-    WriteBatch batch;
-    batch.Put(cf, k, v);
-    return Write(o, &batch);
-  }
-  using DB::Merge;
-  virtual Status Merge(const WriteOptions& o, ColumnFamilyHandle* cf,
-                       const Slice& k, const Slice& v) {
-    WriteBatch batch;
-    batch.Merge(cf, k, v);
-    return Write(o, &batch);
-  }
-  using DB::Delete;
-  virtual Status Delete(const WriteOptions& o, ColumnFamilyHandle* cf,
-                        const Slice& key) {
-    WriteBatch batch;
-    batch.Delete(cf, key);
-    return Write(o, &batch);
-  }
-  using DB::Get;
-  virtual Status Get(const ReadOptions& options, ColumnFamilyHandle* cf,
-                     const Slice& key, std::string* value) {
-    return Status::NotSupported(key);
-  }
-
-  using DB::MultiGet;
-  virtual std::vector<Status> MultiGet(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      const std::vector<Slice>& keys, std::vector<std::string>* values) {
-    std::vector<Status> s(keys.size(),
-                          Status::NotSupported("Not implemented."));
-    return s;
-  }
-
-  using DB::GetPropertiesOfAllTables;
-  virtual Status GetPropertiesOfAllTables(ColumnFamilyHandle* column_family,
-                                          TablePropertiesCollection* props) {
-    return Status();
-  }
-
-  using DB::KeyMayExist;
-  virtual bool KeyMayExist(const ReadOptions& options,
-                           ColumnFamilyHandle* column_family, const Slice& key,
-                           std::string* value, bool* value_found = nullptr) {
-    if (value_found != nullptr) {
-      *value_found = false;
-    }
-    return true; // Not Supported directly
-  }
-  using DB::NewIterator;
-  virtual Iterator* NewIterator(const ReadOptions& options,
-                                ColumnFamilyHandle* column_family) {
-    if (options.snapshot == nullptr) {
-      KVMap* saved = new KVMap;
-      *saved = map_;
-      return new ModelIter(saved, true);
-    } else {
-      const KVMap* snapshot_state =
-          &(reinterpret_cast<const ModelSnapshot*>(options.snapshot)->map_);
-      return new ModelIter(snapshot_state, false);
-    }
-  }
-  virtual Status NewIterators(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      std::vector<Iterator*>* iterators) {
-    return Status::NotSupported("Not supported yet");
-  }
-  virtual const Snapshot* GetSnapshot() {
-    ModelSnapshot* snapshot = new ModelSnapshot;
-    snapshot->map_ = map_;
-    return snapshot;
-  }
-
-  virtual void ReleaseSnapshot(const Snapshot* snapshot) {
-    delete reinterpret_cast<const ModelSnapshot*>(snapshot);
-  }
-
-  virtual Status Write(const WriteOptions& options, WriteBatch* batch) {
-    class Handler : public WriteBatch::Handler {
-     public:
-      KVMap* map_;
-      virtual void Put(const Slice& key, const Slice& value) {
-        (*map_)[key.ToString()] = value.ToString();
-      }
-      virtual void Merge(const Slice& key, const Slice& value) {
-        // ignore merge for now
-        //(*map_)[key.ToString()] = value.ToString();
-      }
-      virtual void Delete(const Slice& key) {
-        map_->erase(key.ToString());
-      }
-    };
-    Handler handler;
-    handler.map_ = &map_;
-    return batch->Iterate(&handler);
-  }
-
-  using DB::GetProperty;
-  virtual bool GetProperty(ColumnFamilyHandle* column_family,
-                           const Slice& property, std::string* value) {
-    return false;
-  }
-  using DB::GetApproximateSizes;
-  virtual void GetApproximateSizes(ColumnFamilyHandle* column_family,
-                                   const Range* range, int n, uint64_t* sizes) {
-    for (int i = 0; i < n; i++) {
-      sizes[i] = 0;
-    }
-  }
-  using DB::CompactRange;
-  virtual Status CompactRange(ColumnFamilyHandle* column_family,
-                              const Slice* start, const Slice* end,
-                              bool reduce_level, int target_level) {
-    return Status::NotSupported("Not supported operation.");
-  }
-
-  using DB::NumberLevels;
-  virtual int NumberLevels(ColumnFamilyHandle* column_family) { return 1; }
-
-  using DB::MaxMemCompactionLevel;
-  virtual int MaxMemCompactionLevel(ColumnFamilyHandle* column_family) {
-    return 1;
-  }
-
-  using DB::Level0StopWriteTrigger;
-  virtual int Level0StopWriteTrigger(ColumnFamilyHandle* column_family) {
-    return -1;
-  }
-
-  virtual const std::string& GetName() const {
-    return name_;
-  }
-
-  virtual Env* GetEnv() const {
-    return nullptr;
-  }
-
-  using DB::GetOptions;
-  virtual const Options& GetOptions(ColumnFamilyHandle* column_family) const {
-    return options_;
-  }
-
-  using DB::Flush;
-  virtual Status Flush(const rocksdb::FlushOptions& options,
-                       ColumnFamilyHandle* column_family) {
-    Status ret;
-    return ret;
-  }
-
-  virtual Status DisableFileDeletions() {
-    return Status::OK();
-  }
-  virtual Status EnableFileDeletions(bool force) {
-    return Status::OK();
-  }
-  virtual Status GetLiveFiles(std::vector<std::string>&, uint64_t* size,
-                              bool flush_memtable = true) {
-    return Status::OK();
-  }
-
-  virtual Status GetSortedWalFiles(VectorLogPtr& files) {
-    return Status::OK();
-  }
-
-  virtual Status DeleteFile(std::string name) {
-    return Status::OK();
-  }
-
-  virtual Status GetDbIdentity(std::string& identity) {
-    return Status::OK();
-  }
-
-  virtual SequenceNumber GetLatestSequenceNumber() const {
-    return 0;
-  }
-  virtual Status GetUpdatesSince(
-      rocksdb::SequenceNumber, unique_ptr<rocksdb::TransactionLogIterator>*,
-      const TransactionLogIterator::ReadOptions&
-          read_options = TransactionLogIterator::ReadOptions()) {
-    return Status::NotSupported("Not supported in Model DB");
-  }
-
-  virtual ColumnFamilyHandle* DefaultColumnFamily() const { return nullptr; }
-
- private:
-  class ModelIter: public Iterator {
-   public:
-    ModelIter(const KVMap* map, bool owned)
-        : map_(map), owned_(owned), iter_(map_->end()) {
-    }
-    ~ModelIter() {
-      if (owned_) delete map_;
-    }
-    virtual bool Valid() const { return iter_ != map_->end(); }
-    virtual void SeekToFirst() { iter_ = map_->begin(); }
-    virtual void SeekToLast() {
-      if (map_->empty()) {
-        iter_ = map_->end();
-      } else {
-        iter_ = map_->find(map_->rbegin()->first);
-      }
-    }
-    virtual void Seek(const Slice& k) {
-      iter_ = map_->lower_bound(k.ToString());
-    }
-    virtual void Next() { ++iter_; }
-    virtual void Prev() { --iter_; }
-    virtual Slice key() const { return iter_->first; }
-    virtual Slice value() const { return iter_->second; }
-    virtual Status status() const { return Status::OK(); }
-   private:
-    const KVMap* const map_;
-    const bool owned_;  // Do we own map_
-    KVMap::const_iterator iter_;
-  };
-  const Options options_;
-  KVMap map_;
-  std::string name_ = "";
-};
-
-static std::string RandomKey(Random* rnd, int minimum = 0) {
-  int len;
-  do {
-    len = (rnd->OneIn(3)
-           ? 1                // Short sometimes to encourage collisions
-           : (rnd->OneIn(100) ? rnd->Skewed(10) : rnd->Uniform(10)));
-  } while (len < minimum);
-  return test::RandomKey(rnd, len);
-}
-
-static bool CompareIterators(int step,
-                             DB* model,
-                             DB* db,
-                             const Snapshot* model_snap,
-                             const Snapshot* db_snap) {
-  ReadOptions options;
-  options.snapshot = model_snap;
-  Iterator* miter = model->NewIterator(options);
-  options.snapshot = db_snap;
-  Iterator* dbiter = db->NewIterator(options);
-  bool ok = true;
-  int count = 0;
-  for (miter->SeekToFirst(), dbiter->SeekToFirst();
-       ok && miter->Valid() && dbiter->Valid();
-       miter->Next(), dbiter->Next()) {
-    count++;
-    if (miter->key().compare(dbiter->key()) != 0) {
-      fprintf(stderr, "step %d: Key mismatch: '%s' vs. '%s'\n",
-              step,
-              EscapeString(miter->key()).c_str(),
-              EscapeString(dbiter->key()).c_str());
-      ok = false;
-      break;
-    }
-
-    if (miter->value().compare(dbiter->value()) != 0) {
-      fprintf(stderr, "step %d: Value mismatch for key '%s': '%s' vs. '%s'\n",
-              step,
-              EscapeString(miter->key()).c_str(),
-              EscapeString(miter->value()).c_str(),
-              EscapeString(miter->value()).c_str());
-      ok = false;
-    }
-  }
-
-  if (ok) {
-    if (miter->Valid() != dbiter->Valid()) {
-      fprintf(stderr, "step %d: Mismatch at end of iterators: %d vs. %d\n",
-              step, miter->Valid(), dbiter->Valid());
-      ok = false;
-    }
-  }
-  delete miter;
-  delete dbiter;
-  return ok;
-}
-
-TEST(DBTest, Randomized) {
-  Random rnd(test::RandomSeed());
-  do {
-    ModelDB model(CurrentOptions());
-    const int N = 10000;
-    const Snapshot* model_snap = nullptr;
-    const Snapshot* db_snap = nullptr;
-    std::string k, v;
-    for (int step = 0; step < N; step++) {
-      // TODO(sanjay): Test Get() works
-      int p = rnd.Uniform(100);
-      int minimum = 0;
-      if (option_config_ == kHashSkipList ||
-          option_config_ == kHashLinkList ||
-          option_config_ == kHashCuckoo ||
-          option_config_ == kPlainTableFirstBytePrefix ||
-          option_config_ == kBlockBasedTableWithWholeKeyHashIndex ||
-          option_config_ == kBlockBasedTableWithPrefixHashIndex) {
-        minimum = 1;
-      }
-      if (p < 45) {                               // Put
-        k = RandomKey(&rnd, minimum);
-        v = RandomString(&rnd,
-                         rnd.OneIn(20)
-                         ? 100 + rnd.Uniform(100)
-                         : rnd.Uniform(8));
-        ASSERT_OK(model.Put(WriteOptions(), k, v));
-        ASSERT_OK(db_->Put(WriteOptions(), k, v));
-
-      } else if (p < 90) {                        // Delete
-        k = RandomKey(&rnd, minimum);
-        ASSERT_OK(model.Delete(WriteOptions(), k));
-        ASSERT_OK(db_->Delete(WriteOptions(), k));
-
-
-      } else {                                    // Multi-element batch
-        WriteBatch b;
-        const int num = rnd.Uniform(8);
-        for (int i = 0; i < num; i++) {
-          if (i == 0 || !rnd.OneIn(10)) {
-            k = RandomKey(&rnd, minimum);
-          } else {
-            // Periodically re-use the same key from the previous iter, so
-            // we have multiple entries in the write batch for the same key
-          }
-          if (rnd.OneIn(2)) {
-            v = RandomString(&rnd, rnd.Uniform(10));
-            b.Put(k, v);
-          } else {
-            b.Delete(k);
-          }
-        }
-        ASSERT_OK(model.Write(WriteOptions(), &b));
-        ASSERT_OK(db_->Write(WriteOptions(), &b));
-      }
-
-      if ((step % 100) == 0) {
-        ASSERT_TRUE(CompareIterators(step, &model, db_, nullptr, nullptr));
-        ASSERT_TRUE(CompareIterators(step, &model, db_, model_snap, db_snap));
-
-        // Save a snapshot from each DB this time that we'll use next
-        // time we compare things, to make sure the current state is
-        // preserved with the snapshot
-        if (model_snap != nullptr) model.ReleaseSnapshot(model_snap);
-        if (db_snap != nullptr) db_->ReleaseSnapshot(db_snap);
-
-        Reopen();
-        ASSERT_TRUE(CompareIterators(step, &model, db_, nullptr, nullptr));
-
-        model_snap = model.GetSnapshot();
-        db_snap = db_->GetSnapshot();
-      }
-    }
-    if (model_snap != nullptr) model.ReleaseSnapshot(model_snap);
-    if (db_snap != nullptr) db_->ReleaseSnapshot(db_snap);
-    // skip cuckoo hash as it does not support snapshot.
-  } while (ChangeOptions(kSkipDeletesFilterFirst |
-                         kSkipNoSeekToLast | kSkipHashCuckoo));
-}
-
-TEST(DBTest, MultiGetSimple) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    ASSERT_OK(Put(1, "k1", "v1"));
-    ASSERT_OK(Put(1, "k2", "v2"));
-    ASSERT_OK(Put(1, "k3", "v3"));
-    ASSERT_OK(Put(1, "k4", "v4"));
-    ASSERT_OK(Delete(1, "k4"));
-    ASSERT_OK(Put(1, "k5", "v5"));
-    ASSERT_OK(Delete(1, "no_key"));
-
-    std::vector<Slice> keys({"k1", "k2", "k3", "k4", "k5", "no_key"});
-
-    std::vector<std::string> values(20, "Temporary data to be overwritten");
-    std::vector<ColumnFamilyHandle*> cfs(keys.size(), handles_[1]);
-
-    std::vector<Status> s = db_->MultiGet(ReadOptions(), cfs, keys, &values);
-    ASSERT_EQ(values.size(), keys.size());
-    ASSERT_EQ(values[0], "v1");
-    ASSERT_EQ(values[1], "v2");
-    ASSERT_EQ(values[2], "v3");
-    ASSERT_EQ(values[4], "v5");
-
-    ASSERT_OK(s[0]);
-    ASSERT_OK(s[1]);
-    ASSERT_OK(s[2]);
-    ASSERT_TRUE(s[3].IsNotFound());
-    ASSERT_OK(s[4]);
-    ASSERT_TRUE(s[5].IsNotFound());
-  } while (ChangeCompactOptions());
-}
-
-TEST(DBTest, MultiGetEmpty) {
-  do {
-    CreateAndReopenWithCF({"pikachu"});
-    // Empty Key Set
-    std::vector<Slice> keys;
-    std::vector<std::string> values;
-    std::vector<ColumnFamilyHandle*> cfs;
-    std::vector<Status> s = db_->MultiGet(ReadOptions(), cfs, keys, &values);
-    ASSERT_EQ(s.size(), 0U);
-
-    // Empty Database, Empty Key Set
-    DestroyAndReopen();
-    CreateAndReopenWithCF({"pikachu"});
-    s = db_->MultiGet(ReadOptions(), cfs, keys, &values);
-    ASSERT_EQ(s.size(), 0U);
-
-    // Empty Database, Search for Keys
-    keys.resize(2);
-    keys[0] = "a";
-    keys[1] = "b";
-    cfs.push_back(handles_[0]);
-    cfs.push_back(handles_[1]);
-    s = db_->MultiGet(ReadOptions(), cfs, keys, &values);
-    ASSERT_EQ((int)s.size(), 2);
-    ASSERT_TRUE(s[0].IsNotFound() && s[1].IsNotFound());
-  } while (ChangeCompactOptions());
-}
-
-namespace {
-void PrefixScanInit(DBTest *dbtest) {
-  char buf[100];
-  std::string keystr;
-  const int small_range_sstfiles = 5;
-  const int big_range_sstfiles = 5;
-
-  // Generate 11 sst files with the following prefix ranges.
-  // GROUP 0: [0,10]                              (level 1)
-  // GROUP 1: [1,2], [2,3], [3,4], [4,5], [5, 6]  (level 0)
-  // GROUP 2: [0,6], [0,7], [0,8], [0,9], [0,10]  (level 0)
-  //
-  // A seek with the previous API would do 11 random I/Os (to all the
-  // files).  With the new API and a prefix filter enabled, we should
-  // only do 2 random I/O, to the 2 files containing the key.
-
-  // GROUP 0
-  snprintf(buf, sizeof(buf), "%02d______:start", 0);
-  keystr = std::string(buf);
-  ASSERT_OK(dbtest->Put(keystr, keystr));
-  snprintf(buf, sizeof(buf), "%02d______:end", 10);
-  keystr = std::string(buf);
-  ASSERT_OK(dbtest->Put(keystr, keystr));
-  dbtest->Flush();
-  dbtest->dbfull()->CompactRange(nullptr, nullptr); // move to level 1
-
-  // GROUP 1
-  for (int i = 1; i <= small_range_sstfiles; i++) {
-    snprintf(buf, sizeof(buf), "%02d______:start", i);
-    keystr = std::string(buf);
-    ASSERT_OK(dbtest->Put(keystr, keystr));
-    snprintf(buf, sizeof(buf), "%02d______:end", i+1);
-    keystr = std::string(buf);
-    ASSERT_OK(dbtest->Put(keystr, keystr));
-    dbtest->Flush();
-  }
-
-  // GROUP 2
-  for (int i = 1; i <= big_range_sstfiles; i++) {
-    std::string keystr;
-    snprintf(buf, sizeof(buf), "%02d______:start", 0);
-    keystr = std::string(buf);
-    ASSERT_OK(dbtest->Put(keystr, keystr));
-    snprintf(buf, sizeof(buf), "%02d______:end",
-             small_range_sstfiles+i+1);
-    keystr = std::string(buf);
-    ASSERT_OK(dbtest->Put(keystr, keystr));
-    dbtest->Flush();
-  }
-}
-}  // namespace
-
-TEST(DBTest, PrefixScan) {
-  int count;
-  Slice prefix;
-  Slice key;
-  char buf[100];
-  Iterator* iter;
-  snprintf(buf, sizeof(buf), "03______:");
-  prefix = Slice(buf, 8);
-  key = Slice(buf, 9);
-  // db configs
-  env_->count_random_reads_ = true;
-  Options options = CurrentOptions();
-  options.env = env_;
-  options.no_block_cache = true;
-  options.filter_policy = NewBloomFilterPolicy(10);
-  options.prefix_extractor.reset(NewFixedPrefixTransform(8));
-  options.whole_key_filtering = false;
-  options.disable_auto_compactions = true;
-  options.max_background_compactions = 2;
-  options.create_if_missing = true;
-  options.disable_seek_compaction = true;
-  options.memtable_factory.reset(NewHashSkipListRepFactory());
-
-  // 11 RAND I/Os
-  DestroyAndReopen(&options);
-  PrefixScanInit(this);
-  count = 0;
-  env_->random_read_counter_.Reset();
-  iter = db_->NewIterator(ReadOptions());
-  for (iter->Seek(prefix); iter->Valid(); iter->Next()) {
-    if (! iter->key().starts_with(prefix)) {
-      break;
-    }
-    count++;
-  }
-  ASSERT_OK(iter->status());
-  delete iter;
-  ASSERT_EQ(count, 2);
-  ASSERT_EQ(env_->random_read_counter_.Read(), 2);
-  Close();
-  delete options.filter_policy;
-}
-
-TEST(DBTest, TailingIteratorSingle) {
-  ReadOptions read_options;
-  read_options.tailing = true;
-
-  std::unique_ptr<Iterator> iter(db_->NewIterator(read_options));
-  iter->SeekToFirst();
-  ASSERT_TRUE(!iter->Valid());
-
-  // add a record and check that iter can see it
-  ASSERT_OK(db_->Put(WriteOptions(), "mirko", "fodor"));
-  iter->SeekToFirst();
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ(iter->key().ToString(), "mirko");
-
-  iter->Next();
-  ASSERT_TRUE(!iter->Valid());
-}
-
-TEST(DBTest, TailingIteratorKeepAdding) {
-  CreateAndReopenWithCF({"pikachu"});
-  ReadOptions read_options;
-  read_options.tailing = true;
-
-  std::unique_ptr<Iterator> iter(db_->NewIterator(read_options, handles_[1]));
-  std::string value(1024, 'a');
-
-  const int num_records = 10000;
-  for (int i = 0; i < num_records; ++i) {
-    char buf[32];
-    snprintf(buf, sizeof(buf), "%016d", i);
-
-    Slice key(buf, 16);
-    ASSERT_OK(Put(1, key, value));
-
-    iter->Seek(key);
-    ASSERT_TRUE(iter->Valid());
-    ASSERT_EQ(iter->key().compare(key), 0);
-  }
-}
-
-TEST(DBTest, TailingIteratorDeletes) {
-  CreateAndReopenWithCF({"pikachu"});
-  ReadOptions read_options;
-  read_options.tailing = true;
-
-  std::unique_ptr<Iterator> iter(db_->NewIterator(read_options, handles_[1]));
-
-  // write a single record, read it using the iterator, then delete it
-  ASSERT_OK(Put(1, "0test", "test"));
-  iter->SeekToFirst();
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ(iter->key().ToString(), "0test");
-  ASSERT_OK(Delete(1, "0test"));
-
-  // write many more records
-  const int num_records = 10000;
-  std::string value(1024, 'A');
-
-  for (int i = 0; i < num_records; ++i) {
-    char buf[32];
-    snprintf(buf, sizeof(buf), "1%015d", i);
-
-    Slice key(buf, 16);
-    ASSERT_OK(Put(1, key, value));
-  }
-
-  // force a flush to make sure that no records are read from memtable
-  ASSERT_OK(Flush(1));
-
-  // skip "0test"
-  iter->Next();
-
-  // make sure we can read all new records using the existing iterator
-  int count = 0;
-  for (; iter->Valid(); iter->Next(), ++count) ;
-
-  ASSERT_EQ(count, num_records);
-}
-
-TEST(DBTest, TailingIteratorPrefixSeek) {
-  ReadOptions read_options;
-  read_options.tailing = true;
-
-  Options options = CurrentOptions();
-  options.env = env_;
-  options.create_if_missing = true;
-  options.disable_auto_compactions = true;
-  options.prefix_extractor.reset(NewFixedPrefixTransform(2));
-  options.memtable_factory.reset(NewHashSkipListRepFactory());
-  DestroyAndReopen(&options);
-  CreateAndReopenWithCF({"pikachu"}, &options);
-
-  std::unique_ptr<Iterator> iter(db_->NewIterator(read_options, handles_[1]));
-  ASSERT_OK(Put(1, "0101", "test"));
-
-  ASSERT_OK(Flush(1));
-
-  ASSERT_OK(Put(1, "0202", "test"));
-
-  // Seek(0102) shouldn't find any records since 0202 has a different prefix
-  iter->Seek("0102");
-  ASSERT_TRUE(!iter->Valid());
-
-  iter->Seek("0202");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ(iter->key().ToString(), "0202");
-
-  iter->Next();
-  ASSERT_TRUE(!iter->Valid());
-}
-
-TEST(DBTest, ChecksumTest) {
-  BlockBasedTableOptions table_options;
-  Options options = CurrentOptions();
-
-  table_options.checksum = kCRC32c;
-  options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-  Reopen(&options);
-  ASSERT_OK(Put("a", "b"));
-  ASSERT_OK(Put("c", "d"));
-  ASSERT_OK(Flush());  // table with crc checksum
-
-  table_options.checksum = kxxHash;
-  options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-  Reopen(&options);
-  ASSERT_OK(Put("e", "f"));
-  ASSERT_OK(Put("g", "h"));
-  ASSERT_OK(Flush());  // table with xxhash checksum
-
-  table_options.checksum = kCRC32c;
-  options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-  Reopen(&options);
-  ASSERT_EQ("b", Get("a"));
-  ASSERT_EQ("d", Get("c"));
-  ASSERT_EQ("f", Get("e"));
-  ASSERT_EQ("h", Get("g"));
-
-  table_options.checksum = kCRC32c;
-  options.table_factory.reset(NewBlockBasedTableFactory(table_options));
-  Reopen(&options);
-  ASSERT_EQ("b", Get("a"));
-  ASSERT_EQ("d", Get("c"));
-  ASSERT_EQ("f", Get("e"));
-  ASSERT_EQ("h", Get("g"));
-}
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/dbformat.cc b/src/rocksdb/db/dbformat.cc
deleted file mode 100644
index e53d16d..0000000
--- a/src/rocksdb/db/dbformat.cc
+++ /dev/null
@@ -1,169 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#include "db/dbformat.h"
-
-#include <stdio.h>
-#include "port/port.h"
-#include "util/coding.h"
-#include "util/perf_context_imp.h"
-
-namespace rocksdb {
-
-uint64_t PackSequenceAndType(uint64_t seq, ValueType t) {
-  assert(seq <= kMaxSequenceNumber);
-  assert(t <= kValueTypeForSeek);
-  return (seq << 8) | t;
-}
-
-void AppendInternalKey(std::string* result, const ParsedInternalKey& key) {
-  result->append(key.user_key.data(), key.user_key.size());
-  PutFixed64(result, PackSequenceAndType(key.sequence, key.type));
-}
-
-std::string ParsedInternalKey::DebugString(bool hex) const {
-  char buf[50];
-  snprintf(buf, sizeof(buf), "' @ %llu : %d",
-           (unsigned long long) sequence,
-           int(type));
-  std::string result = "'";
-  result += user_key.ToString(hex);
-  result += buf;
-  return result;
-}
-
-std::string InternalKey::DebugString(bool hex) const {
-  std::string result;
-  ParsedInternalKey parsed;
-  if (ParseInternalKey(rep_, &parsed)) {
-    result = parsed.DebugString(hex);
-  } else {
-    result = "(bad)";
-    result.append(EscapeString(rep_));
-  }
-  return result;
-}
-
-const char* InternalKeyComparator::Name() const {
-  return name_.c_str();
-}
-
-int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const {
-  // Order by:
-  //    increasing user key (according to user-supplied comparator)
-  //    decreasing sequence number
-  //    decreasing type (though sequence# should be enough to disambiguate)
-  int r = user_comparator_->Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
-  PERF_COUNTER_ADD(user_key_comparison_count, 1);
-  if (r == 0) {
-    const uint64_t anum = DecodeFixed64(akey.data() + akey.size() - 8);
-    const uint64_t bnum = DecodeFixed64(bkey.data() + bkey.size() - 8);
-    if (anum > bnum) {
-      r = -1;
-    } else if (anum < bnum) {
-      r = +1;
-    }
-  }
-  return r;
-}
-
-int InternalKeyComparator::Compare(const ParsedInternalKey& a,
-                                   const ParsedInternalKey& b) const {
-  // Order by:
-  //    increasing user key (according to user-supplied comparator)
-  //    decreasing sequence number
-  //    decreasing type (though sequence# should be enough to disambiguate)
-  int r = user_comparator_->Compare(a.user_key, b.user_key);
-  PERF_COUNTER_ADD(user_key_comparison_count, 1);
-  if (r == 0) {
-    if (a.sequence > b.sequence) {
-      r = -1;
-    } else if (a.sequence < b.sequence) {
-      r = +1;
-    } else if (a.type > b.type) {
-      r = -1;
-    } else if (a.type < b.type) {
-      r = +1;
-    }
-  }
-  return r;
-}
-
-void InternalKeyComparator::FindShortestSeparator(
-      std::string* start,
-      const Slice& limit) const {
-  // Attempt to shorten the user portion of the key
-  Slice user_start = ExtractUserKey(*start);
-  Slice user_limit = ExtractUserKey(limit);
-  std::string tmp(user_start.data(), user_start.size());
-  user_comparator_->FindShortestSeparator(&tmp, user_limit);
-  if (tmp.size() < user_start.size() &&
-      user_comparator_->Compare(user_start, tmp) < 0) {
-    // User key has become shorter physically, but larger logically.
-    // Tack on the earliest possible number to the shortened user key.
-    PutFixed64(&tmp, PackSequenceAndType(kMaxSequenceNumber,kValueTypeForSeek));
-    assert(this->Compare(*start, tmp) < 0);
-    assert(this->Compare(tmp, limit) < 0);
-    start->swap(tmp);
-  }
-}
-
-void InternalKeyComparator::FindShortSuccessor(std::string* key) const {
-  Slice user_key = ExtractUserKey(*key);
-  std::string tmp(user_key.data(), user_key.size());
-  user_comparator_->FindShortSuccessor(&tmp);
-  if (tmp.size() < user_key.size() &&
-      user_comparator_->Compare(user_key, tmp) < 0) {
-    // User key has become shorter physically, but larger logically.
-    // Tack on the earliest possible number to the shortened user key.
-    PutFixed64(&tmp, PackSequenceAndType(kMaxSequenceNumber,kValueTypeForSeek));
-    assert(this->Compare(*key, tmp) < 0);
-    key->swap(tmp);
-  }
-}
-
-const char* InternalFilterPolicy::Name() const {
-  return user_policy_->Name();
-}
-
-void InternalFilterPolicy::CreateFilter(const Slice* keys, int n,
-                                        std::string* dst) const {
-  // We rely on the fact that the code in table.cc does not mind us
-  // adjusting keys[].
-  Slice* mkey = const_cast<Slice*>(keys);
-  for (int i = 0; i < n; i++) {
-    mkey[i] = ExtractUserKey(keys[i]);
-    // TODO(sanjay): Suppress dups?
-  }
-  user_policy_->CreateFilter(keys, n, dst);
-}
-
-bool InternalFilterPolicy::KeyMayMatch(const Slice& key, const Slice& f) const {
-  return user_policy_->KeyMayMatch(ExtractUserKey(key), f);
-}
-
-LookupKey::LookupKey(const Slice& user_key, SequenceNumber s) {
-  size_t usize = user_key.size();
-  size_t needed = usize + 13;  // A conservative estimate
-  char* dst;
-  if (needed <= sizeof(space_)) {
-    dst = space_;
-  } else {
-    dst = new char[needed];
-  }
-  start_ = dst;
-  dst = EncodeVarint32(dst, usize + 8);
-  kstart_ = dst;
-  memcpy(dst, user_key.data(), usize);
-  dst += usize;
-  EncodeFixed64(dst, PackSequenceAndType(s, kValueTypeForSeek));
-  dst += 8;
-  end_ = dst;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/dbformat.h b/src/rocksdb/db/dbformat.h
deleted file mode 100644
index 1647661..0000000
--- a/src/rocksdb/db/dbformat.h
+++ /dev/null
@@ -1,340 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <stdio.h>
-#include "rocksdb/comparator.h"
-#include "rocksdb/db.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "rocksdb/types.h"
-#include "util/coding.h"
-#include "util/logging.h"
-
-namespace rocksdb {
-
-class InternalKey;
-
-// Value types encoded as the last component of internal keys.
-// DO NOT CHANGE THESE ENUM VALUES: they are embedded in the on-disk
-// data structures.
-// The highest bit of the value type needs to be reserved to SST tables
-// for them to do more flexible encoding.
-enum ValueType : unsigned char {
-  kTypeDeletion = 0x0,
-  kTypeValue = 0x1,
-  kTypeMerge = 0x2,
-  // Following types are used only in write ahead logs. They are not used in
-  // memtables or sst files:
-  kTypeLogData = 0x3,
-  kTypeColumnFamilyDeletion = 0x4,
-  kTypeColumnFamilyValue = 0x5,
-  kTypeColumnFamilyMerge = 0x6,
-  kMaxValue = 0x7F
-};
-
-// kValueTypeForSeek defines the ValueType that should be passed when
-// constructing a ParsedInternalKey object for seeking to a particular
-// sequence number (since we sort sequence numbers in decreasing order
-// and the value type is embedded as the low 8 bits in the sequence
-// number in internal keys, we need to use the highest-numbered
-// ValueType, not the lowest).
-static const ValueType kValueTypeForSeek = kTypeMerge;
-
-// We leave eight bits empty at the bottom so a type and sequence#
-// can be packed together into 64-bits.
-static const SequenceNumber kMaxSequenceNumber =
-    ((0x1ull << 56) - 1);
-
-struct ParsedInternalKey {
-  Slice user_key;
-  SequenceNumber sequence;
-  ValueType type;
-
-  ParsedInternalKey() { }  // Intentionally left uninitialized (for speed)
-  ParsedInternalKey(const Slice& u, const SequenceNumber& seq, ValueType t)
-      : user_key(u), sequence(seq), type(t) { }
-  std::string DebugString(bool hex = false) const;
-};
-
-// Return the length of the encoding of "key".
-inline size_t InternalKeyEncodingLength(const ParsedInternalKey& key) {
-  return key.user_key.size() + 8;
-}
-
-extern uint64_t PackSequenceAndType(uint64_t seq, ValueType t);
-
-// Append the serialization of "key" to *result.
-extern void AppendInternalKey(std::string* result,
-                              const ParsedInternalKey& key);
-
-// Attempt to parse an internal key from "internal_key".  On success,
-// stores the parsed data in "*result", and returns true.
-//
-// On error, returns false, leaves "*result" in an undefined state.
-extern bool ParseInternalKey(const Slice& internal_key,
-                             ParsedInternalKey* result);
-
-// Returns the user key portion of an internal key.
-inline Slice ExtractUserKey(const Slice& internal_key) {
-  assert(internal_key.size() >= 8);
-  return Slice(internal_key.data(), internal_key.size() - 8);
-}
-
-inline ValueType ExtractValueType(const Slice& internal_key) {
-  assert(internal_key.size() >= 8);
-  const size_t n = internal_key.size();
-  uint64_t num = DecodeFixed64(internal_key.data() + n - 8);
-  unsigned char c = num & 0xff;
-  return static_cast<ValueType>(c);
-}
-
-// A comparator for internal keys that uses a specified comparator for
-// the user key portion and breaks ties by decreasing sequence number.
-class InternalKeyComparator : public Comparator {
- private:
-  const Comparator* user_comparator_;
-  std::string name_;
- public:
-  explicit InternalKeyComparator(const Comparator* c) : user_comparator_(c),
-    name_("rocksdb.InternalKeyComparator:" +
-          std::string(user_comparator_->Name())) {
-  }
-  virtual ~InternalKeyComparator() {}
-
-  virtual const char* Name() const;
-  virtual int Compare(const Slice& a, const Slice& b) const;
-  virtual void FindShortestSeparator(
-      std::string* start,
-      const Slice& limit) const;
-  virtual void FindShortSuccessor(std::string* key) const;
-
-  const Comparator* user_comparator() const { return user_comparator_; }
-
-  int Compare(const InternalKey& a, const InternalKey& b) const;
-  int Compare(const ParsedInternalKey& a, const ParsedInternalKey& b) const;
-};
-
-// Filter policy wrapper that converts from internal keys to user keys
-class InternalFilterPolicy : public FilterPolicy {
- private:
-  const FilterPolicy* const user_policy_;
- public:
-  explicit InternalFilterPolicy(const FilterPolicy* p) : user_policy_(p) { }
-  virtual const char* Name() const;
-  virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const;
-  virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const;
-};
-
-// Modules in this directory should keep internal keys wrapped inside
-// the following class instead of plain strings so that we do not
-// incorrectly use string comparisons instead of an InternalKeyComparator.
-class InternalKey {
- private:
-  std::string rep_;
- public:
-  InternalKey() { }   // Leave rep_ as empty to indicate it is invalid
-  InternalKey(const Slice& user_key, SequenceNumber s, ValueType t) {
-    AppendInternalKey(&rep_, ParsedInternalKey(user_key, s, t));
-  }
-
-  void DecodeFrom(const Slice& s) { rep_.assign(s.data(), s.size()); }
-  Slice Encode() const {
-    assert(!rep_.empty());
-    return rep_;
-  }
-
-  Slice user_key() const { return ExtractUserKey(rep_); }
-
-  void SetFrom(const ParsedInternalKey& p) {
-    rep_.clear();
-    AppendInternalKey(&rep_, p);
-  }
-
-  void Clear() { rep_.clear(); }
-
-  std::string DebugString(bool hex = false) const;
-};
-
-inline int InternalKeyComparator::Compare(
-    const InternalKey& a, const InternalKey& b) const {
-  return Compare(a.Encode(), b.Encode());
-}
-
-inline bool ParseInternalKey(const Slice& internal_key,
-                             ParsedInternalKey* result) {
-  const size_t n = internal_key.size();
-  if (n < 8) return false;
-  uint64_t num = DecodeFixed64(internal_key.data() + n - 8);
-  unsigned char c = num & 0xff;
-  result->sequence = num >> 8;
-  result->type = static_cast<ValueType>(c);
-  assert(result->type <= ValueType::kMaxValue);
-  result->user_key = Slice(internal_key.data(), n - 8);
-  return (c <= static_cast<unsigned char>(kValueTypeForSeek));
-}
-
-// Update the sequence number in the internal key
-inline void UpdateInternalKey(char* internal_key,
-                              const size_t internal_key_size,
-                              uint64_t seq, ValueType t) {
-  assert(internal_key_size >= 8);
-  char* seqtype = internal_key + internal_key_size - 8;
-  uint64_t newval = (seq << 8) | t;
-  EncodeFixed64(seqtype, newval);
-}
-
-// Get the sequence number from the internal key
-inline uint64_t GetInternalKeySeqno(const Slice& internal_key) {
-  const size_t n = internal_key.size();
-  assert(n >= 8);
-  uint64_t num = DecodeFixed64(internal_key.data() + n - 8);
-  return num >> 8;
-}
-
-
-// A helper class useful for DBImpl::Get()
-class LookupKey {
- public:
-  // Initialize *this for looking up user_key at a snapshot with
-  // the specified sequence number.
-  LookupKey(const Slice& user_key, SequenceNumber sequence);
-
-  ~LookupKey();
-
-  // Return a key suitable for lookup in a MemTable.
-  Slice memtable_key() const { return Slice(start_, end_ - start_); }
-
-  // Return an internal key (suitable for passing to an internal iterator)
-  Slice internal_key() const { return Slice(kstart_, end_ - kstart_); }
-
-  // Return the user key
-  Slice user_key() const { return Slice(kstart_, end_ - kstart_ - 8); }
-
- private:
-  // We construct a char array of the form:
-  //    klength  varint32               <-- start_
-  //    userkey  char[klength]          <-- kstart_
-  //    tag      uint64
-  //                                    <-- end_
-  // The array is a suitable MemTable key.
-  // The suffix starting with "userkey" can be used as an InternalKey.
-  const char* start_;
-  const char* kstart_;
-  const char* end_;
-  char space_[200];      // Avoid allocation for short keys
-
-  // No copying allowed
-  LookupKey(const LookupKey&);
-  void operator=(const LookupKey&);
-};
-
-inline LookupKey::~LookupKey() {
-  if (start_ != space_) delete[] start_;
-}
-
-class IterKey {
- public:
-  IterKey() : key_(space_), buf_size_(sizeof(space_)), key_size_(0) {}
-
-  ~IterKey() { ResetBuffer(); }
-
-  Slice GetKey() const { return Slice(key_, key_size_); }
-
-  void Clear() { key_size_ = 0; }
-
-  void SetUserKey(const Slice& user_key) {
-    size_t size = user_key.size();
-    EnlargeBufferIfNeeded(size);
-    memcpy(key_, user_key.data(), size);
-    key_size_ = size;
-  }
-
-  void SetInternalKey(const Slice& user_key, SequenceNumber s,
-                      ValueType value_type = kValueTypeForSeek) {
-    size_t usize = user_key.size();
-    EnlargeBufferIfNeeded(usize + sizeof(uint64_t));
-    memcpy(key_, user_key.data(), usize);
-    EncodeFixed64(key_ + usize, PackSequenceAndType(s, value_type));
-    key_size_ = usize + sizeof(uint64_t);
-  }
-
-  void SetInternalKey(const ParsedInternalKey& parsed_key) {
-    SetInternalKey(parsed_key.user_key, parsed_key.sequence, parsed_key.type);
-  }
-
- private:
-  char* key_;
-  size_t buf_size_;
-  size_t key_size_;
-  char space_[32];  // Avoid allocation for short keys
-
-  void ResetBuffer() {
-    if (key_ != nullptr && key_ != space_) {
-      delete[] key_;
-    }
-    key_ = space_;
-    buf_size_ = sizeof(space_);
-    key_size_ = 0;
-  }
-
-  // Enlarge the buffer size if needed based on key_size.
-  // By default, static allocated buffer is used. Once there is a key
-  // larger than the static allocated buffer, another buffer is dynamically
-  // allocated, until a larger key buffer is requested. In that case, we
-  // reallocate buffer and delete the old one.
-  void EnlargeBufferIfNeeded(size_t key_size) {
-    // If size is smaller than buffer size, continue using current buffer,
-    // or the static allocated one, as default
-    if (key_size > buf_size_) {
-      // Need to enlarge the buffer.
-      ResetBuffer();
-      key_ = new char[key_size];
-      buf_size_ = key_size;
-    }
-  }
-
-  // No copying allowed
-  IterKey(const IterKey&) = delete;
-  void operator=(const IterKey&) = delete;
-};
-
-class InternalKeySliceTransform : public SliceTransform {
- public:
-  explicit InternalKeySliceTransform(const SliceTransform* transform)
-      : transform_(transform) {}
-
-  virtual const char* Name() const { return transform_->Name(); }
-
-  virtual Slice Transform(const Slice& src) const {
-    auto user_key = ExtractUserKey(src);
-    return transform_->Transform(user_key);
-  }
-
-  virtual bool InDomain(const Slice& src) const {
-    auto user_key = ExtractUserKey(src);
-    return transform_->InDomain(user_key);
-  }
-
-  virtual bool InRange(const Slice& dst) const {
-    auto user_key = ExtractUserKey(dst);
-    return transform_->InRange(user_key);
-  }
-
-  const SliceTransform* user_prefix_extractor() const { return transform_; }
-
- private:
-  // Like comparator, InternalKeySliceTransform will not take care of the
-  // deletion of transform_
-  const SliceTransform* const transform_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/dbformat_test.cc b/src/rocksdb/db/dbformat_test.cc
deleted file mode 100644
index b520f3c..0000000
--- a/src/rocksdb/db/dbformat_test.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/dbformat.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-static std::string IKey(const std::string& user_key,
-                        uint64_t seq,
-                        ValueType vt) {
-  std::string encoded;
-  AppendInternalKey(&encoded, ParsedInternalKey(user_key, seq, vt));
-  return encoded;
-}
-
-static std::string Shorten(const std::string& s, const std::string& l) {
-  std::string result = s;
-  InternalKeyComparator(BytewiseComparator()).FindShortestSeparator(&result, l);
-  return result;
-}
-
-static std::string ShortSuccessor(const std::string& s) {
-  std::string result = s;
-  InternalKeyComparator(BytewiseComparator()).FindShortSuccessor(&result);
-  return result;
-}
-
-static void TestKey(const std::string& key,
-                    uint64_t seq,
-                    ValueType vt) {
-  std::string encoded = IKey(key, seq, vt);
-
-  Slice in(encoded);
-  ParsedInternalKey decoded("", 0, kTypeValue);
-
-  ASSERT_TRUE(ParseInternalKey(in, &decoded));
-  ASSERT_EQ(key, decoded.user_key.ToString());
-  ASSERT_EQ(seq, decoded.sequence);
-  ASSERT_EQ(vt, decoded.type);
-
-  ASSERT_TRUE(!ParseInternalKey(Slice("bar"), &decoded));
-}
-
-class FormatTest { };
-
-TEST(FormatTest, InternalKey_EncodeDecode) {
-  const char* keys[] = { "", "k", "hello", "longggggggggggggggggggggg" };
-  const uint64_t seq[] = {
-    1, 2, 3,
-    (1ull << 8) - 1, 1ull << 8, (1ull << 8) + 1,
-    (1ull << 16) - 1, 1ull << 16, (1ull << 16) + 1,
-    (1ull << 32) - 1, 1ull << 32, (1ull << 32) + 1
-  };
-  for (unsigned int k = 0; k < sizeof(keys) / sizeof(keys[0]); k++) {
-    for (unsigned int s = 0; s < sizeof(seq) / sizeof(seq[0]); s++) {
-      TestKey(keys[k], seq[s], kTypeValue);
-      TestKey("hello", 1, kTypeDeletion);
-    }
-  }
-}
-
-TEST(FormatTest, InternalKeyShortSeparator) {
-  // When user keys are same
-  ASSERT_EQ(IKey("foo", 100, kTypeValue),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("foo", 99, kTypeValue)));
-  ASSERT_EQ(IKey("foo", 100, kTypeValue),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("foo", 101, kTypeValue)));
-  ASSERT_EQ(IKey("foo", 100, kTypeValue),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("foo", 100, kTypeValue)));
-  ASSERT_EQ(IKey("foo", 100, kTypeValue),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("foo", 100, kTypeDeletion)));
-
-  // When user keys are misordered
-  ASSERT_EQ(IKey("foo", 100, kTypeValue),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("bar", 99, kTypeValue)));
-
-  // When user keys are different, but correctly ordered
-  ASSERT_EQ(IKey("g", kMaxSequenceNumber, kValueTypeForSeek),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("hello", 200, kTypeValue)));
-
-  // When start user key is prefix of limit user key
-  ASSERT_EQ(IKey("foo", 100, kTypeValue),
-            Shorten(IKey("foo", 100, kTypeValue),
-                    IKey("foobar", 200, kTypeValue)));
-
-  // When limit user key is prefix of start user key
-  ASSERT_EQ(IKey("foobar", 100, kTypeValue),
-            Shorten(IKey("foobar", 100, kTypeValue),
-                    IKey("foo", 200, kTypeValue)));
-}
-
-TEST(FormatTest, InternalKeyShortestSuccessor) {
-  ASSERT_EQ(IKey("g", kMaxSequenceNumber, kValueTypeForSeek),
-            ShortSuccessor(IKey("foo", 100, kTypeValue)));
-  ASSERT_EQ(IKey("\xff\xff", 100, kTypeValue),
-            ShortSuccessor(IKey("\xff\xff", 100, kTypeValue)));
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/deletefile_test.cc b/src/rocksdb/db/deletefile_test.cc
deleted file mode 100644
index 14f0324..0000000
--- a/src/rocksdb/db/deletefile_test.cc
+++ /dev/null
@@ -1,295 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/db.h"
-#include "db/db_impl.h"
-#include "db/filename.h"
-#include "db/version_set.h"
-#include "db/write_batch_internal.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-#include "rocksdb/env.h"
-#include "rocksdb/transaction_log.h"
-#include <vector>
-#include <stdlib.h>
-#include <map>
-#include <string>
-
-namespace rocksdb {
-
-class DeleteFileTest {
- public:
-  std::string dbname_;
-  Options options_;
-  DB* db_;
-  Env* env_;
-  int numlevels_;
-
-  DeleteFileTest() {
-    db_ = nullptr;
-    env_ = Env::Default();
-    options_.write_buffer_size = 1024*1024*1000;
-    options_.target_file_size_base = 1024*1024*1000;
-    options_.max_bytes_for_level_base = 1024*1024*1000;
-    options_.WAL_ttl_seconds = 300; // Used to test log files
-    options_.WAL_size_limit_MB = 1024; // Used to test log files
-    dbname_ = test::TmpDir() + "/deletefile_test";
-    options_.wal_dir = dbname_ + "/wal_files";
-
-    // clean up all the files that might have been there before
-    std::vector<std::string> old_files;
-    env_->GetChildren(dbname_, &old_files);
-    for (auto file : old_files) {
-      env_->DeleteFile(dbname_ + "/" + file);
-    }
-    env_->GetChildren(options_.wal_dir, &old_files);
-    for (auto file : old_files) {
-      env_->DeleteFile(options_.wal_dir + "/" + file);
-    }
-
-    DestroyDB(dbname_, options_);
-    numlevels_ = 7;
-    ASSERT_OK(ReopenDB(true));
-  }
-
-  Status ReopenDB(bool create) {
-    delete db_;
-    if (create) {
-      DestroyDB(dbname_, options_);
-    }
-    db_ = nullptr;
-    options_.create_if_missing = create;
-    return DB::Open(options_, dbname_, &db_);
-  }
-
-  void CloseDB() {
-    delete db_;
-  }
-
-  void AddKeys(int numkeys, int startkey = 0) {
-    WriteOptions options;
-    options.sync = false;
-    ReadOptions roptions;
-    for (int i = startkey; i < (numkeys + startkey) ; i++) {
-      std::string temp = std::to_string(i);
-      Slice key(temp);
-      Slice value(temp);
-      ASSERT_OK(db_->Put(options, key, value));
-    }
-  }
-
-  int numKeysInLevels(
-    std::vector<LiveFileMetaData> &metadata,
-    std::vector<int> *keysperlevel = nullptr) {
-
-    if (keysperlevel != nullptr) {
-      keysperlevel->resize(numlevels_);
-    }
-
-    int numKeys = 0;
-    for (size_t i = 0; i < metadata.size(); i++) {
-      int startkey = atoi(metadata[i].smallestkey.c_str());
-      int endkey = atoi(metadata[i].largestkey.c_str());
-      int numkeysinfile = (endkey - startkey + 1);
-      numKeys += numkeysinfile;
-      if (keysperlevel != nullptr) {
-        (*keysperlevel)[(int)metadata[i].level] += numkeysinfile;
-      }
-      fprintf(stderr, "level %d name %s smallest %s largest %s\n",
-              metadata[i].level, metadata[i].name.c_str(),
-              metadata[i].smallestkey.c_str(),
-              metadata[i].largestkey.c_str());
-    }
-    return numKeys;
-  }
-
-  void CreateTwoLevels() {
-    AddKeys(50000, 10000);
-    DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
-    ASSERT_OK(dbi->TEST_FlushMemTable());
-    ASSERT_OK(dbi->TEST_WaitForFlushMemTable());
-
-    AddKeys(50000, 10000);
-    ASSERT_OK(dbi->TEST_FlushMemTable());
-    ASSERT_OK(dbi->TEST_WaitForFlushMemTable());
-  }
-
-  void CheckFileTypeCounts(std::string& dir,
-                            int required_log,
-                            int required_sst,
-                            int required_manifest) {
-    std::vector<std::string> filenames;
-    env_->GetChildren(dir, &filenames);
-
-    int log_cnt = 0, sst_cnt = 0, manifest_cnt = 0;
-    for (auto file : filenames) {
-      uint64_t number;
-      FileType type;
-      if (ParseFileName(file, &number, &type)) {
-        log_cnt += (type == kLogFile);
-        sst_cnt += (type == kTableFile);
-        manifest_cnt += (type == kDescriptorFile);
-      }
-    }
-    ASSERT_EQ(required_log, log_cnt);
-    ASSERT_EQ(required_sst, sst_cnt);
-    ASSERT_EQ(required_manifest, manifest_cnt);
-  }
-
-};
-
-TEST(DeleteFileTest, AddKeysAndQueryLevels) {
-  CreateTwoLevels();
-  std::vector<LiveFileMetaData> metadata;
-  std::vector<int> keysinlevel;
-  db_->GetLiveFilesMetaData(&metadata);
-
-  std::string level1file = "";
-  int level1keycount = 0;
-  std::string level2file = "";
-  int level2keycount = 0;
-  int level1index = 0;
-  int level2index = 1;
-
-  ASSERT_EQ((int)metadata.size(), 2);
-  if (metadata[0].level == 2) {
-    level1index = 1;
-    level2index = 0;
-  }
-
-  level1file = metadata[level1index].name;
-  int startkey = atoi(metadata[level1index].smallestkey.c_str());
-  int endkey = atoi(metadata[level1index].largestkey.c_str());
-  level1keycount = (endkey - startkey + 1);
-  level2file = metadata[level2index].name;
-  startkey = atoi(metadata[level2index].smallestkey.c_str());
-  endkey = atoi(metadata[level2index].largestkey.c_str());
-  level2keycount = (endkey - startkey + 1);
-
-  // COntrolled setup. Levels 1 and 2 should both have 50K files.
-  // This is a little fragile as it depends on the current
-  // compaction heuristics.
-  ASSERT_EQ(level1keycount, 50000);
-  ASSERT_EQ(level2keycount, 50000);
-
-  Status status = db_->DeleteFile("0.sst");
-  ASSERT_TRUE(status.IsInvalidArgument());
-
-  // intermediate level files cannot be deleted.
-  status = db_->DeleteFile(level1file);
-  ASSERT_TRUE(status.IsInvalidArgument());
-
-  // Lowest level file deletion should succeed.
-  ASSERT_OK(db_->DeleteFile(level2file));
-
-  CloseDB();
-}
-
-TEST(DeleteFileTest, PurgeObsoleteFilesTest) {
-  CreateTwoLevels();
-  // there should be only one (empty) log file because CreateTwoLevels()
-  // flushes the memtables to disk
-  CheckFileTypeCounts(options_.wal_dir, 1, 0, 0);
-  // 2 ssts, 1 manifest
-  CheckFileTypeCounts(dbname_, 0, 2, 1);
-  std::string first("0"), last("999999");
-  Slice first_slice(first), last_slice(last);
-  db_->CompactRange(&first_slice, &last_slice, true, 2);
-  // 1 sst after compaction
-  CheckFileTypeCounts(dbname_, 0, 1, 1);
-
-  // this time, we keep an iterator alive
-  ReopenDB(true);
-  Iterator *itr = 0;
-  CreateTwoLevels();
-  itr = db_->NewIterator(ReadOptions());
-  db_->CompactRange(&first_slice, &last_slice, true, 2);
-  // 3 sst after compaction with live iterator
-  CheckFileTypeCounts(dbname_, 0, 3, 1);
-  delete itr;
-  // 1 sst after iterator deletion
-  CheckFileTypeCounts(dbname_, 0, 1, 1);
-
-  CloseDB();
-}
-
-TEST(DeleteFileTest, DeleteFileWithIterator) {
-  CreateTwoLevels();
-  ReadOptions options;
-  Iterator* it = db_->NewIterator(options);
-  std::vector<LiveFileMetaData> metadata;
-  db_->GetLiveFilesMetaData(&metadata);
-
-  std::string level2file = "";
-
-  ASSERT_EQ((int)metadata.size(), 2);
-  if (metadata[0].level == 1) {
-    level2file = metadata[1].name;
-  } else {
-    level2file = metadata[0].name;
-  }
-
-  Status status = db_->DeleteFile(level2file);
-  fprintf(stdout, "Deletion status %s: %s\n",
-          level2file.c_str(), status.ToString().c_str());
-  ASSERT_TRUE(status.ok());
-  it->SeekToFirst();
-  int numKeysIterated = 0;
-  while(it->Valid()) {
-    numKeysIterated++;
-    it->Next();
-  }
-  ASSERT_EQ(numKeysIterated, 50000);
-  delete it;
-  CloseDB();
-}
-
-TEST(DeleteFileTest, DeleteLogFiles) {
-  AddKeys(10, 0);
-  VectorLogPtr logfiles;
-  db_->GetSortedWalFiles(logfiles);
-  ASSERT_GT(logfiles.size(), 0UL);
-  // Take the last log file which is expected to be alive and try to delete it
-  // Should not succeed because live logs are not allowed to be deleted
-  std::unique_ptr<LogFile> alive_log = std::move(logfiles.back());
-  ASSERT_EQ(alive_log->Type(), kAliveLogFile);
-  ASSERT_TRUE(env_->FileExists(options_.wal_dir + "/" + alive_log->PathName()));
-  fprintf(stdout, "Deleting alive log file %s\n",
-          alive_log->PathName().c_str());
-  ASSERT_TRUE(!db_->DeleteFile(alive_log->PathName()).ok());
-  ASSERT_TRUE(env_->FileExists(options_.wal_dir + "/" + alive_log->PathName()));
-  logfiles.clear();
-
-  // Call Flush to bring about a new working log file and add more keys
-  // Call Flush again to flush out memtable and move alive log to archived log
-  // and try to delete the archived log file
-  FlushOptions fopts;
-  db_->Flush(fopts);
-  AddKeys(10, 0);
-  db_->Flush(fopts);
-  db_->GetSortedWalFiles(logfiles);
-  ASSERT_GT(logfiles.size(), 0UL);
-  std::unique_ptr<LogFile> archived_log = std::move(logfiles.front());
-  ASSERT_EQ(archived_log->Type(), kArchivedLogFile);
-  ASSERT_TRUE(env_->FileExists(options_.wal_dir + "/" +
-        archived_log->PathName()));
-  fprintf(stdout, "Deleting archived log file %s\n",
-          archived_log->PathName().c_str());
-  ASSERT_OK(db_->DeleteFile(archived_log->PathName()));
-  ASSERT_TRUE(!env_->FileExists(options_.wal_dir + "/" +
-        archived_log->PathName()));
-  CloseDB();
-}
-
-} //namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
-
diff --git a/src/rocksdb/db/file_indexer.cc b/src/rocksdb/db/file_indexer.cc
deleted file mode 100644
index 2de7660..0000000
--- a/src/rocksdb/db/file_indexer.cc
+++ /dev/null
@@ -1,202 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/file_indexer.h"
-#include <algorithm>
-#include "rocksdb/comparator.h"
-#include "db/version_edit.h"
-
-namespace rocksdb {
-
-FileIndexer::FileIndexer(const uint32_t num_levels,
-                         const Comparator* ucmp)
-  : num_levels_(num_levels),
-    ucmp_(ucmp),
-    next_level_index_(num_levels),
-    level_rb_(num_levels, -1) {
-}
-
-
-uint32_t FileIndexer::NumLevelIndex() {
-  return next_level_index_.size();
-}
-
-uint32_t FileIndexer::LevelIndexSize(uint32_t level) {
-  return next_level_index_[level].size();
-}
-
-void FileIndexer::GetNextLevelIndex(
-    const uint32_t level, const uint32_t file_index, const int cmp_smallest,
-    const int cmp_largest, int32_t* left_bound, int32_t* right_bound) {
-  assert(level > 0);
-
-  // Last level, no hint
-  if (level == num_levels_ - 1) {
-    *left_bound = 0;
-    *right_bound = -1;
-    return;
-  }
-
-  assert(level < num_levels_ - 1);
-  assert(static_cast<int32_t>(file_index) <= level_rb_[level]);
-
-  const auto& index = next_level_index_[level][file_index];
-
-  if (cmp_smallest < 0) {
-    *left_bound = (level > 0 && file_index > 0) ?
-      next_level_index_[level][file_index - 1].largest_lb : 0;
-    *right_bound = index.smallest_rb;
-  } else if (cmp_smallest == 0) {
-    *left_bound = index.smallest_lb;
-    *right_bound = index.smallest_rb;
-  } else if (cmp_smallest > 0 && cmp_largest < 0) {
-    *left_bound = index.smallest_lb;
-    *right_bound = index.largest_rb;
-  } else if (cmp_largest == 0) {
-    *left_bound = index.largest_lb;
-    *right_bound = index.largest_rb;
-  } else if (cmp_largest > 0) {
-    *left_bound = index.largest_lb;
-    *right_bound = level_rb_[level + 1];
-  } else {
-    assert(false);
-  }
-
-  assert(*left_bound >= 0);
-  assert(*left_bound <= *right_bound + 1);
-  assert(*right_bound <= level_rb_[level + 1]);
-}
-
-void FileIndexer::ClearIndex() {
-  for (uint32_t level = 1; level < num_levels_; ++level) {
-    next_level_index_[level].clear();
-  }
-}
-
-void FileIndexer::UpdateIndex(std::vector<FileMetaData*>* const files) {
-  if (files == nullptr) {
-    return;
-  }
-
-  // L1 - Ln-1
-  for (uint32_t level = 1; level < num_levels_ - 1; ++level) {
-    const auto& upper_files = files[level];
-    const int32_t upper_size = upper_files.size();
-    const auto& lower_files = files[level + 1];
-    level_rb_[level] = upper_files.size() - 1;
-    if (upper_size == 0) {
-      continue;
-    }
-    auto& index = next_level_index_[level];
-    index.resize(upper_size);
-
-    CalculateLB(upper_files, lower_files, &index,
-        [this](const FileMetaData* a, const FileMetaData* b) -> int {
-          return ucmp_->Compare(a->smallest.user_key(), b->largest.user_key());
-        },
-        [](IndexUnit* index, int32_t f_idx) {
-          index->smallest_lb = f_idx;
-        });
-    CalculateLB(upper_files, lower_files, &index,
-        [this](const FileMetaData* a, const FileMetaData* b) -> int {
-          return ucmp_->Compare(a->largest.user_key(), b->largest.user_key());
-        },
-        [](IndexUnit* index, int32_t f_idx) {
-          index->largest_lb = f_idx;
-        });
-    CalculateRB(upper_files, lower_files, &index,
-        [this](const FileMetaData* a, const FileMetaData* b) -> int {
-          return ucmp_->Compare(a->smallest.user_key(), b->smallest.user_key());
-        },
-        [](IndexUnit* index, int32_t f_idx) {
-          index->smallest_rb = f_idx;
-        });
-    CalculateRB(upper_files, lower_files, &index,
-        [this](const FileMetaData* a, const FileMetaData* b) -> int {
-          return ucmp_->Compare(a->largest.user_key(), b->smallest.user_key());
-        },
-        [](IndexUnit* index, int32_t f_idx) {
-          index->largest_rb = f_idx;
-        });
-  }
-  level_rb_[num_levels_ - 1] = files[num_levels_ - 1].size() - 1;
-}
-
-void FileIndexer::CalculateLB(const std::vector<FileMetaData*>& upper_files,
-    const std::vector<FileMetaData*>& lower_files,
-    std::vector<IndexUnit>* index,
-    std::function<int(const FileMetaData*, const FileMetaData*)> cmp_op,
-    std::function<void(IndexUnit*, int32_t)> set_index) {
-  const int32_t upper_size = upper_files.size();
-  const int32_t lower_size = lower_files.size();
-  int32_t upper_idx = 0;
-  int32_t lower_idx = 0;
-  while (upper_idx < upper_size && lower_idx < lower_size) {
-    int cmp = cmp_op(upper_files[upper_idx], lower_files[lower_idx]);
-
-    if (cmp == 0) {
-      set_index(&(*index)[upper_idx], lower_idx);
-      ++upper_idx;
-      ++lower_idx;
-    } else if (cmp > 0) {
-      // Lower level's file (largest) is smaller, a key won't hit in that
-      // file. Move to next lower file
-      ++lower_idx;
-    } else {
-      // Lower level's file becomes larger, update the index, and
-      // move to the next upper file
-      set_index(&(*index)[upper_idx], lower_idx);
-      ++upper_idx;
-    }
-  }
-
-  while (upper_idx < upper_size) {
-    // Lower files are exhausted, that means the remaining upper files are
-    // greater than any lower files. Set the index to be the lower level size.
-    set_index(&(*index)[upper_idx], lower_size);
-    ++upper_idx;
-  }
-}
-
-void FileIndexer::CalculateRB(const std::vector<FileMetaData*>& upper_files,
-    const std::vector<FileMetaData*>& lower_files,
-    std::vector<IndexUnit>* index,
-    std::function<int(const FileMetaData*, const FileMetaData*)> cmp_op,
-    std::function<void(IndexUnit*, int32_t)> set_index) {
-  const int32_t upper_size = upper_files.size();
-  const int32_t lower_size = lower_files.size();
-  int32_t upper_idx = upper_size - 1;
-  int32_t lower_idx = lower_size - 1;
-  while (upper_idx >= 0 && lower_idx >= 0) {
-    int cmp = cmp_op(upper_files[upper_idx], lower_files[lower_idx]);
-
-    if (cmp == 0) {
-      set_index(&(*index)[upper_idx], lower_idx);
-      --upper_idx;
-      --lower_idx;
-    } else if (cmp < 0) {
-      // Lower level's file (smallest) is larger, a key won't hit in that
-      // file. Move to next lower file.
-      --lower_idx;
-    } else {
-      // Lower level's file becomes smaller, update the index, and move to
-      // the next the upper file
-      set_index(&(*index)[upper_idx], lower_idx);
-      --upper_idx;
-    }
-  }
-  while (upper_idx >= 0) {
-    // Lower files are exhausted, that means the remaining upper files are
-    // smaller than any lower files. Set it to -1.
-    set_index(&(*index)[upper_idx], -1);
-    --upper_idx;
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/file_indexer.h b/src/rocksdb/db/file_indexer.h
deleted file mode 100644
index 5e405df..0000000
--- a/src/rocksdb/db/file_indexer.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <cstdint>
-#include <functional>
-#include <limits>
-#include <vector>
-
-namespace rocksdb {
-
-class Comparator;
-struct FileMetaData;
-
-// The file tree structure in Version is prebuilt and the range of each file
-// is known. On Version::Get(), it uses binary search to find a potential file
-// and then check if a target key can be found in the file by comparing the key
-// to each file's smallest and largest key. The results of these comparisions
-// can be reused beyond checking if a key falls into a file's range.
-// With some pre-calculated knowledge, each key comparision that has been done
-// can serve as a hint to narrow down further searches: if a key compared to
-// be smaller than a file's smallest or largest, that comparison can be used
-// to find out the right bound of next binary search. Similarly, if a key
-// compared to be larger than a file's smallest or largest, it can be utilized
-// to find out the left bound of next binary search.
-// With these hints: it can greatly reduce the range of binary search,
-// especially for bottom levels, given that one file most likely overlaps with
-// only N files from level below (where N is max_bytes_for_level_multiplier).
-// So on level L, we will only look at ~N files instead of N^L files on the
-// naive approach.
-class FileIndexer {
- public:
-  FileIndexer(const uint32_t num_levels, const Comparator* ucmp);
-
-  uint32_t NumLevelIndex();
-
-  uint32_t LevelIndexSize(uint32_t level);
-
-  // Return a file index range in the next level to search for a key based on
-  // smallest and largest key comparision for the current file specified by
-  // level and file_index. When *left_index < *right_index, both index should
-  // be valid and fit in the vector size.
-  void GetNextLevelIndex(
-    const uint32_t level, const uint32_t file_index, const int cmp_smallest,
-    const int cmp_largest, int32_t* left_bound, int32_t* right_bound);
-
-  void ClearIndex();
-
-  void UpdateIndex(std::vector<FileMetaData*>* const files);
-
-  enum {
-    kLevelMaxIndex = std::numeric_limits<int32_t>::max()
-  };
-
- private:
-  const uint32_t num_levels_;
-  const Comparator* ucmp_;
-
-  struct IndexUnit {
-    IndexUnit()
-      : smallest_lb(0), largest_lb(0), smallest_rb(-1), largest_rb(-1) {}
-    // During file search, a key is compared against smallest and largest
-    // from a FileMetaData. It can have 3 possible outcomes:
-    // (1) key is smaller than smallest, implying it is also smaller than
-    //     larger. Precalculated index based on "smallest < smallest" can
-    //     be used to provide right bound.
-    // (2) key is in between smallest and largest.
-    //     Precalculated index based on "smallest > greatest" can be used to
-    //     provide left bound.
-    //     Precalculated index based on "largest < smallest" can be used to
-    //     provide right bound.
-    // (3) key is larger than largest, implying it is also larger than smallest.
-    //     Precalculated index based on "largest > largest" can be used to
-    //     provide left bound.
-    //
-    // As a result, we will need to do:
-    // Compare smallest (<=) and largest keys from upper level file with
-    // smallest key from lower level to get a right bound.
-    // Compare smallest (>=) and largest keys from upper level file with
-    // largest key from lower level to get a left bound.
-    //
-    // Example:
-    //    level 1:              [50 - 60]
-    //    level 2:        [1 - 40], [45 - 55], [58 - 80]
-    // A key 35, compared to be less than 50, 3rd file on level 2 can be
-    // skipped according to rule (1). LB = 0, RB = 1.
-    // A key 53, sits in the middle 50 and 60. 1st file on level 2 can be
-    // skipped according to rule (2)-a, but the 3rd file cannot be skipped
-    // because 60 is greater than 58. LB = 1, RB = 2.
-    // A key 70, compared to be larger than 60. 1st and 2nd file can be skipped
-    // according to rule (3). LB = 2, RB = 2.
-    //
-    // Point to a left most file in a lower level that may contain a key,
-    // which compares greater than smallest of a FileMetaData (upper level)
-    int32_t smallest_lb;
-    // Point to a left most file in a lower level that may contain a key,
-    // which compares greater than largest of a FileMetaData (upper level)
-    int32_t largest_lb;
-    // Point to a right most file in a lower level that may contain a key,
-    // which compares smaller than smallest of a FileMetaData (upper level)
-    int32_t smallest_rb;
-    // Point to a right most file in a lower level that may contain a key,
-    // which compares smaller than largest of a FileMetaData (upper level)
-    int32_t largest_rb;
-  };
-
-  void CalculateLB(const std::vector<FileMetaData*>& upper_files,
-    const std::vector<FileMetaData*>& lower_files,
-    std::vector<IndexUnit>* index,
-    std::function<int(const FileMetaData*, const FileMetaData*)> cmp_op,
-    std::function<void(IndexUnit*, int32_t)> set_index);
-
-  void CalculateRB(const std::vector<FileMetaData*>& upper_files,
-    const std::vector<FileMetaData*>& lower_files,
-    std::vector<IndexUnit>* index,
-    std::function<int(const FileMetaData*, const FileMetaData*)> cmp_op,
-    std::function<void(IndexUnit*, int32_t)> set_index);
-
-  std::vector<std::vector<IndexUnit>> next_level_index_;
-  std::vector<int32_t> level_rb_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/file_indexer_test.cc b/src/rocksdb/db/file_indexer_test.cc
deleted file mode 100644
index 14d67f4..0000000
--- a/src/rocksdb/db/file_indexer_test.cc
+++ /dev/null
@@ -1,330 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <string>
-#include "db/file_indexer.h"
-#include "db/dbformat.h"
-#include "db/version_edit.h"
-#include "rocksdb/comparator.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-class IntComparator : public Comparator {
- public:
-  int Compare(const Slice& a, const Slice& b) const {
-    assert(a.size() == 8);
-    assert(b.size() == 8);
-    return *reinterpret_cast<const int64_t*>(a.data()) -
-      *reinterpret_cast<const int64_t*>(b.data());
-  }
-
-  const char* Name() const {
-    return "IntComparator";
-  }
-
-  void FindShortestSeparator(std::string* start, const Slice& limit) const {}
-
-  void FindShortSuccessor(std::string* key) const {}
-};
-
-
-struct FileIndexerTest {
- public:
-  FileIndexerTest() :
-    kNumLevels(4), indexer(kNumLevels, &ucmp),
-    files(new std::vector<FileMetaData*>[kNumLevels]) {
-  }
-
-  ~FileIndexerTest() {
-    Reset();
-    delete[] files;
-  }
-
-  void AddFile(int level, int64_t smallest, int64_t largest) {
-    auto* f = new FileMetaData();
-    f->smallest = IntKey(smallest);
-    f->largest = IntKey(largest);
-    files[level].push_back(f);
-  }
-
-  InternalKey IntKey(int64_t v) {
-    return InternalKey(Slice(reinterpret_cast<char*>(&v), 8), 0, kTypeValue);
-  }
-
-  void Reset() {
-    for (uint32_t i = 0; i < kNumLevels; ++i) {
-      for (auto* f : files[i]) {
-        delete f;
-      }
-      files[i].clear();
-    }
-    indexer.ClearIndex();
-  }
-
-  void GetNextLevelIndex(const uint32_t level, const uint32_t file_index,
-      const int cmp_smallest, const int cmp_largest, int32_t* left_index,
-      int32_t* right_index) {
-    *left_index = 100;
-    *right_index = 100;
-    indexer.GetNextLevelIndex(level, file_index, cmp_smallest, cmp_largest,
-        left_index, right_index);
-  }
-
-  const uint32_t kNumLevels;
-  IntComparator ucmp;
-  FileIndexer indexer;
-
-  std::vector<FileMetaData*>* files;
-};
-
-TEST(FileIndexerTest, next_level_hint) {
-  for (uint32_t i = 0; i < kNumLevels; ++i) {
-    ASSERT_EQ(0U, indexer.LevelIndexSize(i));
-  }
-
-  // Case 1: no overlap, files are on the left of next level files
-  // level 1
-  AddFile(1, 100, 200);
-  AddFile(1, 300, 400);
-  AddFile(1, 500, 600);
-  // level 2
-  AddFile(2, 1500, 1600);
-  AddFile(2, 1601, 1699);
-  AddFile(2, 1700, 1800);
-  // level 3
-  AddFile(3, 2500, 2600);
-  AddFile(3, 2601, 2699);
-  AddFile(3, 2700, 2800);
-  indexer.UpdateIndex(files);
-  int32_t left = 100;
-  int32_t right = 100;
-  for (uint32_t level = 1; level < 3; ++level) {
-    for (uint32_t f = 0; f < 3; ++f) {
-      GetNextLevelIndex(level, f, -1, -1, &left, &right);
-      ASSERT_EQ(0, left);
-      ASSERT_EQ(-1, right);
-      GetNextLevelIndex(level, f, 0, -1, &left, &right);
-      ASSERT_EQ(0, left);
-      ASSERT_EQ(-1, right);
-      GetNextLevelIndex(level, f, 1, -1, &left, &right);
-      ASSERT_EQ(0, left);
-      ASSERT_EQ(-1, right);
-      GetNextLevelIndex(level, f, 1, 0, &left, &right);
-      ASSERT_EQ(0, left);
-      ASSERT_EQ(-1, right);
-      GetNextLevelIndex(level, f, 1, 1, &left, &right);
-      ASSERT_EQ(0, left);
-      ASSERT_EQ(2, right);
-    }
-  }
-
-  // Case 2: no overlap, files are on the right of next level files
-  Reset();
-  for (uint32_t i = 1; i < kNumLevels; ++i) {
-    ASSERT_EQ(0U, indexer.LevelIndexSize(i));
-  }
-  // level 1
-  AddFile(1, 2100, 2200);
-  AddFile(1, 2300, 2400);
-  AddFile(1, 2500, 2600);
-  // level 2
-  AddFile(2, 1500, 1600);
-  AddFile(2, 1501, 1699);
-  AddFile(2, 1700, 1800);
-  // level 3
-  AddFile(3, 500, 600);
-  AddFile(3, 501, 699);
-  AddFile(3, 700, 800);
-  indexer.UpdateIndex(files);
-  for (uint32_t level = 1; level < 3; ++level) {
-    for (uint32_t f = 0; f < 3; ++f) {
-      GetNextLevelIndex(level, f, -1, -1, &left, &right);
-      ASSERT_EQ(f == 0 ? 0 : 3, left);
-      ASSERT_EQ(2, right);
-      GetNextLevelIndex(level, f, 0, -1, &left, &right);
-      ASSERT_EQ(3, left);
-      ASSERT_EQ(2, right);
-      GetNextLevelIndex(level, f, 1, -1, &left, &right);
-      ASSERT_EQ(3, left);
-      ASSERT_EQ(2, right);
-      GetNextLevelIndex(level, f, 1, -1, &left, &right);
-      ASSERT_EQ(3, left);
-      ASSERT_EQ(2, right);
-      GetNextLevelIndex(level, f, 1, 0, &left, &right);
-      ASSERT_EQ(3, left);
-      ASSERT_EQ(2, right);
-      GetNextLevelIndex(level, f, 1, 1, &left, &right);
-      ASSERT_EQ(3, left);
-      ASSERT_EQ(2, right);
-    }
-  }
-
-  // Case 3: empty L2
-  Reset();
-  for (uint32_t i = 1; i < kNumLevels; ++i) {
-    ASSERT_EQ(0U, indexer.LevelIndexSize(i));
-  }
-  // level 1
-  AddFile(1, 2100, 2200);
-  AddFile(1, 2300, 2400);
-  AddFile(1, 2500, 2600);
-  // level 3
-  AddFile(3, 500, 600);
-  AddFile(3, 501, 699);
-  AddFile(3, 700, 800);
-  indexer.UpdateIndex(files);
-  for (uint32_t f = 0; f < 3; ++f) {
-    GetNextLevelIndex(1, f, -1, -1, &left, &right);
-    ASSERT_EQ(0, left);
-    ASSERT_EQ(-1, right);
-    GetNextLevelIndex(1, f, 0, -1, &left, &right);
-    ASSERT_EQ(0, left);
-    ASSERT_EQ(-1, right);
-    GetNextLevelIndex(1, f, 1, -1, &left, &right);
-    ASSERT_EQ(0, left);
-    ASSERT_EQ(-1, right);
-    GetNextLevelIndex(1, f, 1, -1, &left, &right);
-    ASSERT_EQ(0, left);
-    ASSERT_EQ(-1, right);
-    GetNextLevelIndex(1, f, 1, 0, &left, &right);
-    ASSERT_EQ(0, left);
-    ASSERT_EQ(-1, right);
-    GetNextLevelIndex(1, f, 1, 1, &left, &right);
-    ASSERT_EQ(0, left);
-    ASSERT_EQ(-1, right);
-  }
-
-
-  // Case 4: mixed
-  Reset();
-  for (uint32_t i = 1; i < kNumLevels; ++i) {
-    ASSERT_EQ(0U, indexer.LevelIndexSize(i));
-  }
-  // level 1
-  AddFile(1, 100, 200);
-  AddFile(1, 250, 400);
-  AddFile(1, 450, 500);
-  // level 2
-  AddFile(2, 100, 150);  // 0
-  AddFile(2, 200, 250);  // 1
-  AddFile(2, 251, 300);  // 2
-  AddFile(2, 301, 350);  // 3
-  AddFile(2, 500, 600);  // 4
-  // level 3
-  AddFile(3, 0, 50);
-  AddFile(3, 100, 200);
-  AddFile(3, 201, 250);
-  indexer.UpdateIndex(files);
-  // level 1, 0
-  GetNextLevelIndex(1, 0, -1, -1, &left, &right);
-  ASSERT_EQ(0, left);
-  ASSERT_EQ(0, right);
-  GetNextLevelIndex(1, 0, 0, -1, &left, &right);
-  ASSERT_EQ(0, left);
-  ASSERT_EQ(0, right);
-  GetNextLevelIndex(1, 0, 1, -1, &left, &right);
-  ASSERT_EQ(0, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(1, 0, 1, 0, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(1, 0, 1, 1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(4, right);
-  // level 1, 1
-  GetNextLevelIndex(1, 1, -1, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(1, 1, 0, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(1, 1, 1, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(3, right);
-  GetNextLevelIndex(1, 1, 1, 0, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(3, right);
-  GetNextLevelIndex(1, 1, 1, 1, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(4, right);
-  // level 1, 2
-  GetNextLevelIndex(1, 2, -1, -1, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(3, right);
-  GetNextLevelIndex(1, 2, 0, -1, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(3, right);
-  GetNextLevelIndex(1, 2, 1, -1, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(4, right);
-  GetNextLevelIndex(1, 2, 1, 0, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(4, right);
-  GetNextLevelIndex(1, 2, 1, 1, &left, &right);
-  ASSERT_EQ(4, left);
-  ASSERT_EQ(4, right);
-  // level 2, 0
-  GetNextLevelIndex(2, 0, -1, -1, &left, &right);
-  ASSERT_EQ(0, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(2, 0, 0, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(2, 0, 1, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(2, 0, 1, 0, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(2, 0, 1, 1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(2, right);
-  // level 2, 1
-  GetNextLevelIndex(2, 1, -1, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(2, 1, 0, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(1, right);
-  GetNextLevelIndex(2, 1, 1, -1, &left, &right);
-  ASSERT_EQ(1, left);
-  ASSERT_EQ(2, right);
-  GetNextLevelIndex(2, 1, 1, 0, &left, &right);
-  ASSERT_EQ(2, left);
-  ASSERT_EQ(2, right);
-  GetNextLevelIndex(2, 1, 1, 1, &left, &right);
-  ASSERT_EQ(2, left);
-  ASSERT_EQ(2, right);
-  // level 2, [2 - 4], no overlap
-  for (uint32_t f = 2; f <= 4; ++f) {
-    GetNextLevelIndex(2, f, -1, -1, &left, &right);
-    ASSERT_EQ(f == 2 ? 2 : 3, left);
-    ASSERT_EQ(2, right);
-    GetNextLevelIndex(2, f, 0, -1, &left, &right);
-    ASSERT_EQ(3, left);
-    ASSERT_EQ(2, right);
-    GetNextLevelIndex(2, f, 1, -1, &left, &right);
-    ASSERT_EQ(3, left);
-    ASSERT_EQ(2, right);
-    GetNextLevelIndex(2, f, 1, 0, &left, &right);
-    ASSERT_EQ(3, left);
-    ASSERT_EQ(2, right);
-    GetNextLevelIndex(2, f, 1, 1, &left, &right);
-    ASSERT_EQ(3, left);
-    ASSERT_EQ(2, right);
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/filename.cc b/src/rocksdb/db/filename.cc
deleted file mode 100644
index 4b3ac8e..0000000
--- a/src/rocksdb/db/filename.cc
+++ /dev/null
@@ -1,261 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/filename.h"
-
-#include <ctype.h>
-#include <stdio.h>
-#include "db/dbformat.h"
-#include "rocksdb/env.h"
-#include "util/logging.h"
-
-namespace rocksdb {
-
-// Given a path, flatten the path name by replacing all chars not in
-// {[0-9,a-z,A-Z,-,_,.]} with _. And append '\0' at the end.
-// Return the number of chars stored in dest not including the trailing '\0'.
-static int FlattenPath(const std::string& path, char* dest, int len) {
-  int write_idx = 0;
-  int i = 0;
-  int src_len = path.size();
-
-  while (i < src_len && write_idx < len - 1) {
-    if ((path[i] >= 'a' && path[i] <= 'z') ||
-        (path[i] >= '0' && path[i] <= '9') ||
-        (path[i] >= 'A' && path[i] <= 'Z') ||
-        path[i] == '-' ||
-        path[i] == '.' ||
-        path[i] == '_'){
-      dest[write_idx++] = path[i];
-    } else {
-      if (i > 0)
-        dest[write_idx++] = '_';
-    }
-    i++;
-  }
-
-  dest[write_idx] = '\0';
-  return write_idx;
-}
-
-static std::string MakeFileName(const std::string& name, uint64_t number,
-                                const char* suffix) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "/%06llu.%s",
-           static_cast<unsigned long long>(number),
-           suffix);
-  return name + buf;
-}
-
-std::string LogFileName(const std::string& name, uint64_t number) {
-  assert(number > 0);
-  return MakeFileName(name, number, "log");
-}
-
-std::string ArchivalDirectory(const std::string& dir) {
-  return dir + "/" + ARCHIVAL_DIR;
-}
-std::string ArchivedLogFileName(const std::string& name, uint64_t number) {
-  assert(number > 0);
-  return MakeFileName(name + "/" + ARCHIVAL_DIR, number, "log");
-}
-
-std::string TableFileName(const std::string& name, uint64_t number) {
-  assert(number > 0);
-  return MakeFileName(name, number, "sst");
-}
-
-std::string DescriptorFileName(const std::string& dbname, uint64_t number) {
-  assert(number > 0);
-  char buf[100];
-  snprintf(buf, sizeof(buf), "/MANIFEST-%06llu",
-           static_cast<unsigned long long>(number));
-  return dbname + buf;
-}
-
-std::string CurrentFileName(const std::string& dbname) {
-  return dbname + "/CURRENT";
-}
-
-std::string LockFileName(const std::string& dbname) {
-  return dbname + "/LOCK";
-}
-
-std::string TempFileName(const std::string& dbname, uint64_t number) {
-  return MakeFileName(dbname, number, "dbtmp");
-}
-
-std::string InfoLogFileName(const std::string& dbname,
-    const std::string& db_path, const std::string& log_dir) {
-  if (log_dir.empty())
-    return dbname + "/LOG";
-
-  char flatten_db_path[256];
-  FlattenPath(db_path, flatten_db_path, 256);
-  return log_dir + "/" + flatten_db_path + "_LOG";
-}
-
-// Return the name of the old info log file for "dbname".
-std::string OldInfoLogFileName(const std::string& dbname, uint64_t ts,
-    const std::string& db_path, const std::string& log_dir) {
-  char buf[50];
-  snprintf(buf, sizeof(buf), "%llu", static_cast<unsigned long long>(ts));
-
-  if (log_dir.empty())
-    return dbname + "/LOG.old." + buf;
-
-  char flatten_db_path[256];
-  FlattenPath(db_path, flatten_db_path, 256);
-  return log_dir + "/" + flatten_db_path + "_LOG.old." + buf;
-}
-
-std::string MetaDatabaseName(const std::string& dbname, uint64_t number) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "/METADB-%llu",
-           static_cast<unsigned long long>(number));
-  return dbname + buf;
-}
-
-std::string IdentityFileName(const std::string& dbname) {
-  return dbname + "/IDENTITY";
-}
-
-// Owned filenames have the form:
-//    dbname/IDENTITY
-//    dbname/CURRENT
-//    dbname/LOCK
-//    dbname/LOG
-//    dbname/LOG.old.[0-9]+
-//    dbname/MANIFEST-[0-9]+
-//    dbname/[0-9]+.(log|sst)
-//    dbname/METADB-[0-9]+
-//    Disregards / at the beginning
-bool ParseFileName(const std::string& fname,
-                   uint64_t* number,
-                   FileType* type,
-                   WalFileType* log_type) {
-  Slice rest(fname);
-  if (fname.length() > 1 && fname[0] == '/') {
-    rest.remove_prefix(1);
-  }
-  if (rest == "IDENTITY") {
-    *number = 0;
-    *type = kIdentityFile;
-  } else if (rest == "CURRENT") {
-    *number = 0;
-    *type = kCurrentFile;
-  } else if (rest == "LOCK") {
-    *number = 0;
-    *type = kDBLockFile;
-  } else if (rest == "LOG" || rest == "LOG.old") {
-    *number = 0;
-    *type = kInfoLogFile;
-  } else if (rest.starts_with("LOG.old.")) {
-    uint64_t ts_suffix;
-    // sizeof also counts the trailing '\0'.
-    rest.remove_prefix(sizeof("LOG.old.") - 1);
-    if (!ConsumeDecimalNumber(&rest, &ts_suffix)) {
-      return false;
-    }
-    *number = ts_suffix;
-    *type = kInfoLogFile;
-  } else if (rest.starts_with("MANIFEST-")) {
-    rest.remove_prefix(strlen("MANIFEST-"));
-    uint64_t num;
-    if (!ConsumeDecimalNumber(&rest, &num)) {
-      return false;
-    }
-    if (!rest.empty()) {
-      return false;
-    }
-    *type = kDescriptorFile;
-    *number = num;
-  } else if (rest.starts_with("METADB-")) {
-    rest.remove_prefix(strlen("METADB-"));
-    uint64_t num;
-    if (!ConsumeDecimalNumber(&rest, &num)) {
-      return false;
-    }
-    if (!rest.empty()) {
-      return false;
-    }
-    *type = kMetaDatabase;
-    *number = num;
-  } else {
-    // Avoid strtoull() to keep filename format independent of the
-    // current locale
-    bool archive_dir_found = false;
-    if (rest.starts_with(ARCHIVAL_DIR)) {
-      if (rest.size() <= ARCHIVAL_DIR.size()) {
-        return false;
-      }
-      rest.remove_prefix(ARCHIVAL_DIR.size() + 1); // Add 1 to remove / also
-      if (log_type) {
-        *log_type = kArchivedLogFile;
-      }
-      archive_dir_found = true;
-    }
-    uint64_t num;
-    if (!ConsumeDecimalNumber(&rest, &num)) {
-      return false;
-    }
-    Slice suffix = rest;
-    if (suffix == Slice(".log")) {
-      *type = kLogFile;
-      if (log_type && !archive_dir_found) {
-        *log_type = kAliveLogFile;
-      }
-    } else if (archive_dir_found) {
-      return false; // Archive dir can contain only log files
-    } else if (suffix == Slice(".sst")) {
-      *type = kTableFile;
-    } else if (suffix == Slice(".dbtmp")) {
-      *type = kTempFile;
-    } else {
-      return false;
-    }
-    *number = num;
-  }
-  return true;
-}
-
-Status SetCurrentFile(Env* env, const std::string& dbname,
-                      uint64_t descriptor_number) {
-  // Remove leading "dbname/" and add newline to manifest file name
-  std::string manifest = DescriptorFileName(dbname, descriptor_number);
-  Slice contents = manifest;
-  assert(contents.starts_with(dbname + "/"));
-  contents.remove_prefix(dbname.size() + 1);
-  std::string tmp = TempFileName(dbname, descriptor_number);
-  Status s = WriteStringToFile(env, contents.ToString() + "\n", tmp, true);
-  if (s.ok()) {
-    s = env->RenameFile(tmp, CurrentFileName(dbname));
-  }
-  if (!s.ok()) {
-    env->DeleteFile(tmp);
-  }
-  return s;
-}
-
-Status SetIdentityFile(Env* env, const std::string& dbname) {
-  std::string id = env->GenerateUniqueId();
-  assert(!id.empty());
-  // Reserve the filename dbname/000000.dbtmp for the temporary identity file
-  std::string tmp = TempFileName(dbname, 0);
-  Status s = WriteStringToFile(env, id, tmp, true);
-  if (s.ok()) {
-    s = env->RenameFile(tmp, IdentityFileName(dbname));
-  }
-  if (!s.ok()) {
-    env->DeleteFile(tmp);
-  }
-  return s;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/filename.h b/src/rocksdb/db/filename.h
deleted file mode 100644
index 8e55f11..0000000
--- a/src/rocksdb/db/filename.h
+++ /dev/null
@@ -1,108 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// File names used by DB code
-
-#pragma once
-#include <stdint.h>
-#include <string>
-#include "rocksdb/slice.h"
-#include "rocksdb/status.h"
-#include "rocksdb/transaction_log.h"
-#include "port/port.h"
-
-namespace rocksdb {
-
-class Env;
-
-enum FileType {
-  kLogFile,
-  kDBLockFile,
-  kTableFile,
-  kDescriptorFile,
-  kCurrentFile,
-  kTempFile,
-  kInfoLogFile,  // Either the current one, or an old one
-  kMetaDatabase,
-  kIdentityFile
-};
-
-// Return the name of the log file with the specified number
-// in the db named by "dbname".  The result will be prefixed with
-// "dbname".
-extern std::string LogFileName(const std::string& dbname, uint64_t number);
-
-static const std::string ARCHIVAL_DIR = "archive";
-
-extern std::string ArchivalDirectory(const std::string& dbname);
-
-//  Return the name of the archived log file with the specified number
-//  in the db named by "dbname". The result will be prefixed with "dbname".
-extern std::string ArchivedLogFileName(const std::string& dbname,
-                                       uint64_t num);
-
-// Return the name of the sstable with the specified number
-// in the db named by "dbname".  The result will be prefixed with
-// "dbname".
-extern std::string TableFileName(const std::string& dbname, uint64_t number);
-
-// Return the name of the descriptor file for the db named by
-// "dbname" and the specified incarnation number.  The result will be
-// prefixed with "dbname".
-extern std::string DescriptorFileName(const std::string& dbname,
-                                      uint64_t number);
-
-// Return the name of the current file.  This file contains the name
-// of the current manifest file.  The result will be prefixed with
-// "dbname".
-extern std::string CurrentFileName(const std::string& dbname);
-
-// Return the name of the lock file for the db named by
-// "dbname".  The result will be prefixed with "dbname".
-extern std::string LockFileName(const std::string& dbname);
-
-// Return the name of a temporary file owned by the db named "dbname".
-// The result will be prefixed with "dbname".
-extern std::string TempFileName(const std::string& dbname, uint64_t number);
-
-// Return the name of the info log file for "dbname".
-extern std::string InfoLogFileName(const std::string& dbname,
-    const std::string& db_path="", const std::string& log_dir="");
-
-// Return the name of the old info log file for "dbname".
-extern std::string OldInfoLogFileName(const std::string& dbname, uint64_t ts,
-    const std::string& db_path="", const std::string& log_dir="");
-
-// Return the name to use for a metadatabase. The result will be prefixed with
-// "dbname".
-extern std::string MetaDatabaseName(const std::string& dbname,
-                                    uint64_t number);
-
-// Return the name of the Identity file which stores a unique number for the db
-// that will get regenerated if the db loses all its data and is recreated fresh
-// either from a backup-image or empty
-extern std::string IdentityFileName(const std::string& dbname);
-
-// If filename is a rocksdb file, store the type of the file in *type.
-// The number encoded in the filename is stored in *number.  If the
-// filename was successfully parsed, returns true.  Else return false.
-extern bool ParseFileName(const std::string& filename,
-                          uint64_t* number,
-                          FileType* type,
-                          WalFileType* log_type = nullptr);
-
-// Make the CURRENT file point to the descriptor file with the
-// specified number.
-extern Status SetCurrentFile(Env* env, const std::string& dbname,
-                             uint64_t descriptor_number);
-
-// Make the IDENTITY file for the db
-extern Status SetIdentityFile(Env* env, const std::string& dbname);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/filename_test.cc b/src/rocksdb/db/filename_test.cc
deleted file mode 100644
index 0baa7fd..0000000
--- a/src/rocksdb/db/filename_test.cc
+++ /dev/null
@@ -1,140 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/filename.h"
-
-#include "db/dbformat.h"
-#include "port/port.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-class FileNameTest { };
-
-TEST(FileNameTest, Parse) {
-  Slice db;
-  FileType type;
-  uint64_t number;
-
-  // Successful parses
-  static struct {
-    const char* fname;
-    uint64_t number;
-    FileType type;
-  } cases[] = {
-    { "100.log",            100,   kLogFile },
-    { "0.log",              0,     kLogFile },
-    { "0.sst",              0,     kTableFile },
-    { "CURRENT",            0,     kCurrentFile },
-    { "LOCK",               0,     kDBLockFile },
-    { "MANIFEST-2",         2,     kDescriptorFile },
-    { "MANIFEST-7",         7,     kDescriptorFile },
-    { "METADB-2",           2,     kMetaDatabase },
-    { "METADB-7",           7,     kMetaDatabase },
-    { "LOG",                0,     kInfoLogFile },
-    { "LOG.old",            0,     kInfoLogFile },
-    { "18446744073709551615.log", 18446744073709551615ull, kLogFile },
-  };
-  for (unsigned int i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) {
-    std::string f = cases[i].fname;
-    ASSERT_TRUE(ParseFileName(f, &number, &type)) << f;
-    ASSERT_EQ(cases[i].type, type) << f;
-    ASSERT_EQ(cases[i].number, number) << f;
-  }
-
-  // Errors
-  static const char* errors[] = {
-    "",
-    "foo",
-    "foo-dx-100.log",
-    ".log",
-    "",
-    "manifest",
-    "CURREN",
-    "CURRENTX",
-    "MANIFES",
-    "MANIFEST",
-    "MANIFEST-",
-    "XMANIFEST-3",
-    "MANIFEST-3x",
-    "META",
-    "METADB",
-    "METADB-",
-    "XMETADB-3",
-    "METADB-3x",
-    "LOC",
-    "LOCKx",
-    "LO",
-    "LOGx",
-    "18446744073709551616.log",
-    "184467440737095516150.log",
-    "100",
-    "100.",
-    "100.lop"
-  };
-  for (unsigned int i = 0; i < sizeof(errors) / sizeof(errors[0]); i++) {
-    std::string f = errors[i];
-    ASSERT_TRUE(!ParseFileName(f, &number, &type)) << f;
-  };
-}
-
-TEST(FileNameTest, Construction) {
-  uint64_t number;
-  FileType type;
-  std::string fname;
-
-  fname = CurrentFileName("foo");
-  ASSERT_EQ("foo/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(0U, number);
-  ASSERT_EQ(kCurrentFile, type);
-
-  fname = LockFileName("foo");
-  ASSERT_EQ("foo/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(0U, number);
-  ASSERT_EQ(kDBLockFile, type);
-
-  fname = LogFileName("foo", 192);
-  ASSERT_EQ("foo/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(192U, number);
-  ASSERT_EQ(kLogFile, type);
-
-  fname = TableFileName("bar", 200);
-  ASSERT_EQ("bar/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(200U, number);
-  ASSERT_EQ(kTableFile, type);
-
-  fname = DescriptorFileName("bar", 100);
-  ASSERT_EQ("bar/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(100U, number);
-  ASSERT_EQ(kDescriptorFile, type);
-
-  fname = TempFileName("tmp", 999);
-  ASSERT_EQ("tmp/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(999U, number);
-  ASSERT_EQ(kTempFile, type);
-
-  fname = MetaDatabaseName("met", 100);
-  ASSERT_EQ("met/", std::string(fname.data(), 4));
-  ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type));
-  ASSERT_EQ(100U, number);
-  ASSERT_EQ(kMetaDatabase, type);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/internal_stats.cc b/src/rocksdb/db/internal_stats.cc
deleted file mode 100644
index e8b22a7..0000000
--- a/src/rocksdb/db/internal_stats.cc
+++ /dev/null
@@ -1,369 +0,0 @@
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/internal_stats.h"
-#include "db/column_family.h"
-
-#include <vector>
-
-namespace rocksdb {
-
-DBPropertyType GetPropertyType(const Slice& property) {
-  Slice in = property;
-  Slice prefix("rocksdb.");
-  if (!in.starts_with(prefix)) return kUnknown;
-  in.remove_prefix(prefix.size());
-
-  if (in.starts_with("num-files-at-level")) {
-    return kNumFilesAtLevel;
-  } else if (in == "levelstats") {
-    return kLevelStats;
-  } else if (in == "stats") {
-    return kStats;
-  } else if (in == "sstables") {
-    return kSsTables;
-  } else if (in == "num-immutable-mem-table") {
-    return kNumImmutableMemTable;
-  } else if (in == "mem-table-flush-pending") {
-    return kMemtableFlushPending;
-  } else if (in == "compaction-pending") {
-    return kCompactionPending;
-  } else if (in == "background-errors") {
-    return kBackgroundErrors;
-  } else if (in == "cur-size-active-mem-table") {
-    return kCurSizeActiveMemTable;
-  } else if (in == "num-entries-active-mem-table") {
-    return kNumEntriesInMutableMemtable;
-  } else if (in == "num-entries-imm-mem-tables") {
-    return kNumEntriesInImmutableMemtable;
-  }
-  return kUnknown;
-}
-
-bool InternalStats::GetProperty(DBPropertyType property_type,
-                                const Slice& property, std::string* value,
-                                ColumnFamilyData* cfd) {
-  Version* current = cfd->current();
-  Slice in = property;
-
-  switch (property_type) {
-    case kNumFilesAtLevel: {
-      in.remove_prefix(strlen("rocksdb.num-files-at-level"));
-      uint64_t level;
-      bool ok = ConsumeDecimalNumber(&in, &level) && in.empty();
-      if (!ok || (int)level >= number_levels_) {
-        return false;
-      } else {
-        char buf[100];
-        snprintf(buf, sizeof(buf), "%d",
-                 current->NumLevelFiles(static_cast<int>(level)));
-        *value = buf;
-        return true;
-      }
-    }
-    case kLevelStats: {
-      char buf[1000];
-      snprintf(buf, sizeof(buf),
-               "Level Files Size(MB)\n"
-               "--------------------\n");
-      value->append(buf);
-
-      for (int level = 0; level < number_levels_; level++) {
-        snprintf(buf, sizeof(buf), "%3d %8d %8.0f\n", level,
-                 current->NumLevelFiles(level),
-                 current->NumLevelBytes(level) / 1048576.0);
-        value->append(buf);
-      }
-      return true;
-    }
-    case kStats: {
-      char buf[1000];
-
-      uint64_t wal_bytes = 0;
-      uint64_t wal_synced = 0;
-      uint64_t user_bytes_written = 0;
-      uint64_t write_other = 0;
-      uint64_t write_self = 0;
-      uint64_t write_with_wal = 0;
-      uint64_t total_bytes_written = 0;
-      uint64_t total_bytes_read = 0;
-      uint64_t micros_up = env_->NowMicros() - started_at_;
-      // Add "+1" to make sure seconds_up is > 0 and avoid NaN later
-      double seconds_up = (micros_up + 1) / 1000000.0;
-      uint64_t total_slowdown = 0;
-      uint64_t total_slowdown_count = 0;
-      uint64_t interval_bytes_written = 0;
-      uint64_t interval_bytes_read = 0;
-      uint64_t interval_bytes_new = 0;
-      double interval_seconds_up = 0;
-
-      if (statistics_) {
-        wal_bytes = statistics_->getTickerCount(WAL_FILE_BYTES);
-        wal_synced = statistics_->getTickerCount(WAL_FILE_SYNCED);
-        user_bytes_written = statistics_->getTickerCount(BYTES_WRITTEN);
-        write_other = statistics_->getTickerCount(WRITE_DONE_BY_OTHER);
-        write_self = statistics_->getTickerCount(WRITE_DONE_BY_SELF);
-        write_with_wal = statistics_->getTickerCount(WRITE_WITH_WAL);
-      }
-
-      snprintf(
-          buf, sizeof(buf),
-          "                               Compactions\n"
-          "Level  Files Size(MB) Score Time(sec)  Read(MB) Write(MB)    Rn(MB) "
-          " "
-          "Rnp1(MB)  Wnew(MB) RW-Amplify Read(MB/s) Write(MB/s)      Rn     "
-          "Rnp1 "
-          "    Wnp1     NewW    Count   msComp   msStall  Ln-stall Stall-cnt\n"
-          "--------------------------------------------------------------------"
-          "--"
-          "--------------------------------------------------------------------"
-          "--"
-          "----------------------------------------------------------------\n");
-      value->append(buf);
-      for (int level = 0; level < number_levels_; level++) {
-        int files = current->NumLevelFiles(level);
-        if (compaction_stats_[level].micros > 0 || files > 0) {
-          int64_t bytes_read = compaction_stats_[level].bytes_readn +
-                               compaction_stats_[level].bytes_readnp1;
-          int64_t bytes_new = compaction_stats_[level].bytes_written -
-                              compaction_stats_[level].bytes_readnp1;
-          double amplify =
-              (compaction_stats_[level].bytes_readn == 0)
-                  ? 0.0
-                  : (compaction_stats_[level].bytes_written +
-                     compaction_stats_[level].bytes_readnp1 +
-                     compaction_stats_[level].bytes_readn) /
-                        (double)compaction_stats_[level].bytes_readn;
-
-          total_bytes_read += bytes_read;
-          total_bytes_written += compaction_stats_[level].bytes_written;
-
-          uint64_t stalls = level == 0 ? (stall_counts_[LEVEL0_SLOWDOWN] +
-                                          stall_counts_[LEVEL0_NUM_FILES] +
-                                          stall_counts_[MEMTABLE_COMPACTION])
-                                       : stall_leveln_slowdown_count_[level];
-
-          double stall_us = level == 0 ? (stall_micros_[LEVEL0_SLOWDOWN] +
-                                          stall_micros_[LEVEL0_NUM_FILES] +
-                                          stall_micros_[MEMTABLE_COMPACTION])
-                                       : stall_leveln_slowdown_[level];
-
-          snprintf(buf, sizeof(buf),
-                   "%3d %8d %8.0f %5.1f %9.0f %9.0f %9.0f %9.0f %9.0f %9.0f "
-                   "%10.1f %9.1f %11.1f %8d %8d %8d %8d %8d %8d %9.1f %9.1f "
-                   "%9lu\n",
-                   level, files, current->NumLevelBytes(level) / 1048576.0,
-                   current->NumLevelBytes(level) /
-                       cfd->compaction_picker()->MaxBytesForLevel(level),
-                   compaction_stats_[level].micros / 1e6,
-                   bytes_read / 1048576.0,
-                   compaction_stats_[level].bytes_written / 1048576.0,
-                   compaction_stats_[level].bytes_readn / 1048576.0,
-                   compaction_stats_[level].bytes_readnp1 / 1048576.0,
-                   bytes_new / 1048576.0, amplify,
-                   // +1 to avoid division by 0
-                   (bytes_read / 1048576.0) /
-                       ((compaction_stats_[level].micros + 1) / 1000000.0),
-                   (compaction_stats_[level].bytes_written / 1048576.0) /
-                       ((compaction_stats_[level].micros + 1) / 1000000.0),
-                   compaction_stats_[level].files_in_leveln,
-                   compaction_stats_[level].files_in_levelnp1,
-                   compaction_stats_[level].files_out_levelnp1,
-                   compaction_stats_[level].files_out_levelnp1 -
-                       compaction_stats_[level].files_in_levelnp1,
-                   compaction_stats_[level].count,
-                   (int)((double)compaction_stats_[level].micros / 1000.0 /
-                         (compaction_stats_[level].count + 1)),
-                   (double)stall_us / 1000.0 / (stalls + 1),
-                   stall_us / 1000000.0, (unsigned long)stalls);
-          total_slowdown += stall_leveln_slowdown_[level];
-          total_slowdown_count += stall_leveln_slowdown_count_[level];
-          value->append(buf);
-        }
-      }
-
-      interval_bytes_new = user_bytes_written - last_stats_.ingest_bytes_;
-      interval_bytes_read =
-          total_bytes_read - last_stats_.compaction_bytes_read_;
-      interval_bytes_written =
-          total_bytes_written - last_stats_.compaction_bytes_written_;
-      interval_seconds_up = seconds_up - last_stats_.seconds_up_;
-
-      snprintf(buf, sizeof(buf), "Uptime(secs): %.1f total, %.1f interval\n",
-               seconds_up, interval_seconds_up);
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "Writes cumulative: %llu total, %llu batches, "
-               "%.1f per batch, %.2f ingest GB\n",
-               (unsigned long long)(write_other + write_self),
-               (unsigned long long)write_self,
-               (write_other + write_self) / (double)(write_self + 1),
-               user_bytes_written / (1048576.0 * 1024));
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "WAL cumulative: %llu WAL writes, %llu WAL syncs, "
-               "%.2f writes per sync, %.2f GB written\n",
-               (unsigned long long)write_with_wal,
-               (unsigned long long)wal_synced,
-               write_with_wal / (double)(wal_synced + 1),
-               wal_bytes / (1048576.0 * 1024));
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "Compaction IO cumulative (GB): "
-               "%.2f new, %.2f read, %.2f write, %.2f read+write\n",
-               user_bytes_written / (1048576.0 * 1024),
-               total_bytes_read / (1048576.0 * 1024),
-               total_bytes_written / (1048576.0 * 1024),
-               (total_bytes_read + total_bytes_written) / (1048576.0 * 1024));
-      value->append(buf);
-
-      snprintf(
-          buf, sizeof(buf),
-          "Compaction IO cumulative (MB/sec): "
-          "%.1f new, %.1f read, %.1f write, %.1f read+write\n",
-          user_bytes_written / 1048576.0 / seconds_up,
-          total_bytes_read / 1048576.0 / seconds_up,
-          total_bytes_written / 1048576.0 / seconds_up,
-          (total_bytes_read + total_bytes_written) / 1048576.0 / seconds_up);
-      value->append(buf);
-
-      // +1 to avoid divide by 0 and NaN
-      snprintf(
-          buf, sizeof(buf),
-          "Amplification cumulative: %.1f write, %.1f compaction\n",
-          (double)(total_bytes_written + wal_bytes) / (user_bytes_written + 1),
-          (double)(total_bytes_written + total_bytes_read + wal_bytes) /
-              (user_bytes_written + 1));
-      value->append(buf);
-
-      uint64_t interval_write_other = write_other - last_stats_.write_other_;
-      uint64_t interval_write_self = write_self - last_stats_.write_self_;
-
-      snprintf(buf, sizeof(buf),
-               "Writes interval: %llu total, %llu batches, "
-               "%.1f per batch, %.1f ingest MB\n",
-               (unsigned long long)(interval_write_other + interval_write_self),
-               (unsigned long long)interval_write_self,
-               (double)(interval_write_other + interval_write_self) /
-                   (interval_write_self + 1),
-               (user_bytes_written - last_stats_.ingest_bytes_) / 1048576.0);
-      value->append(buf);
-
-      uint64_t interval_write_with_wal =
-          write_with_wal - last_stats_.write_with_wal_;
-
-      uint64_t interval_wal_synced = wal_synced - last_stats_.wal_synced_;
-      uint64_t interval_wal_bytes = wal_bytes - last_stats_.wal_bytes_;
-
-      snprintf(buf, sizeof(buf),
-               "WAL interval: %llu WAL writes, %llu WAL syncs, "
-               "%.2f writes per sync, %.2f MB written\n",
-               (unsigned long long)interval_write_with_wal,
-               (unsigned long long)interval_wal_synced,
-               interval_write_with_wal / (double)(interval_wal_synced + 1),
-               interval_wal_bytes / (1048576.0 * 1024));
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "Compaction IO interval (MB): "
-               "%.2f new, %.2f read, %.2f write, %.2f read+write\n",
-               interval_bytes_new / 1048576.0, interval_bytes_read / 1048576.0,
-               interval_bytes_written / 1048576.0,
-               (interval_bytes_read + interval_bytes_written) / 1048576.0);
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "Compaction IO interval (MB/sec): "
-               "%.1f new, %.1f read, %.1f write, %.1f read+write\n",
-               interval_bytes_new / 1048576.0 / interval_seconds_up,
-               interval_bytes_read / 1048576.0 / interval_seconds_up,
-               interval_bytes_written / 1048576.0 / interval_seconds_up,
-               (interval_bytes_read + interval_bytes_written) / 1048576.0 /
-                   interval_seconds_up);
-      value->append(buf);
-
-      // +1 to avoid divide by 0 and NaN
-      snprintf(
-          buf, sizeof(buf),
-          "Amplification interval: %.1f write, %.1f compaction\n",
-          (double)(interval_bytes_written + wal_bytes) /
-              (interval_bytes_new + 1),
-          (double)(interval_bytes_written + interval_bytes_read + wal_bytes) /
-              (interval_bytes_new + 1));
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "Stalls(secs): %.3f level0_slowdown, %.3f level0_numfiles, "
-               "%.3f memtable_compaction, %.3f leveln_slowdown\n",
-               stall_micros_[LEVEL0_SLOWDOWN] / 1000000.0,
-               stall_micros_[LEVEL0_NUM_FILES] / 1000000.0,
-               stall_micros_[MEMTABLE_COMPACTION] / 1000000.0,
-               total_slowdown / 1000000.0);
-      value->append(buf);
-
-      snprintf(buf, sizeof(buf),
-               "Stalls(count): %lu level0_slowdown, %lu level0_numfiles, "
-               "%lu memtable_compaction, %lu leveln_slowdown\n",
-               (unsigned long)stall_counts_[LEVEL0_SLOWDOWN],
-               (unsigned long)stall_counts_[LEVEL0_NUM_FILES],
-               (unsigned long)stall_counts_[MEMTABLE_COMPACTION],
-               (unsigned long)total_slowdown_count);
-      value->append(buf);
-
-      last_stats_.compaction_bytes_read_ = total_bytes_read;
-      last_stats_.compaction_bytes_written_ = total_bytes_written;
-      last_stats_.ingest_bytes_ = user_bytes_written;
-      last_stats_.seconds_up_ = seconds_up;
-      last_stats_.wal_bytes_ = wal_bytes;
-      last_stats_.wal_synced_ = wal_synced;
-      last_stats_.write_with_wal_ = write_with_wal;
-      last_stats_.write_other_ = write_other;
-      last_stats_.write_self_ = write_self;
-
-      return true;
-    }
-    case kSsTables:
-      *value = current->DebugString();
-      return true;
-    case kNumImmutableMemTable:
-      *value = std::to_string(cfd->imm()->size());
-      return true;
-    case kMemtableFlushPending:
-      // Return number of mem tables that are ready to flush (made immutable)
-      *value = std::to_string(cfd->imm()->IsFlushPending() ? 1 : 0);
-      return true;
-    case kCompactionPending:
-      // 1 if the system already determines at least one compacdtion is needed.
-      // 0 otherwise,
-      *value = std::to_string(current->NeedsCompaction() ? 1 : 0);
-      return true;
-    case kBackgroundErrors:
-      // Accumulated number of  errors in background flushes or compactions.
-      *value = std::to_string(GetBackgroundErrorCount());
-      return true;
-    case kCurSizeActiveMemTable:
-      // Current size of the active memtable
-      *value = std::to_string(cfd->mem()->ApproximateMemoryUsage());
-      return true;
-    case kNumEntriesInMutableMemtable:
-      // Current size of the active memtable
-      *value = std::to_string(cfd->mem()->GetNumEntries());
-      return true;
-    case kNumEntriesInImmutableMemtable:
-      // Current size of the active memtable
-      *value = std::to_string(cfd->imm()->current()->GetTotalNumEntries());
-      return true;
-    default:
-      return false;
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/internal_stats.h b/src/rocksdb/db/internal_stats.h
deleted file mode 100644
index 2a74359..0000000
--- a/src/rocksdb/db/internal_stats.h
+++ /dev/null
@@ -1,187 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-
-#pragma once
-#include "rocksdb/statistics.h"
-#include "util/statistics.h"
-#include "db/version_set.h"
-
-#include <vector>
-#include <string>
-
-class ColumnFamilyData;
-
-namespace rocksdb {
-
-class MemTableList;
-class DBImpl;
-
-enum DBPropertyType {
-  kNumFilesAtLevel,  // Number of files at a specific level
-  kLevelStats,       // Return number of files and total sizes of each level
-  kStats,            // Return general statitistics of DB
-  kSsTables,         // Return a human readable string of current SST files
-  kNumImmutableMemTable,   // Return number of immutable mem tables
-  kMemtableFlushPending,   // Return 1 if mem table flushing is pending,
-                           // otherwise 0.
-  kCompactionPending,      // Return 1 if a compaction is pending. Otherwise 0.
-  kBackgroundErrors,       // Return accumulated background errors encountered.
-  kCurSizeActiveMemTable,  // Return current size of the active memtable
-  kNumEntriesInMutableMemtable,    // Return number of entries in the mutable
-                                   // memtable.
-  kNumEntriesInImmutableMemtable,  // Return sum of number of entries in all
-                                   // the immutable mem tables.
-  kUnknown,
-};
-
-extern DBPropertyType GetPropertyType(const Slice& property);
-
-class InternalStats {
- public:
-  enum WriteStallType {
-    LEVEL0_SLOWDOWN,
-    MEMTABLE_COMPACTION,
-    LEVEL0_NUM_FILES,
-    WRITE_STALLS_ENUM_MAX,
-  };
-
-  InternalStats(int num_levels, Env* env, Statistics* statistics)
-      : compaction_stats_(num_levels),
-        stall_micros_(WRITE_STALLS_ENUM_MAX, 0),
-        stall_counts_(WRITE_STALLS_ENUM_MAX, 0),
-        stall_leveln_slowdown_(num_levels, 0),
-        stall_leveln_slowdown_count_(num_levels, 0),
-        bg_error_count_(0),
-        number_levels_(num_levels),
-        statistics_(statistics),
-        env_(env),
-        started_at_(env->NowMicros()) {}
-
-  // Per level compaction stats.  compaction_stats_[level] stores the stats for
-  // compactions that produced data for the specified "level".
-  struct CompactionStats {
-    uint64_t micros;
-
-    // Bytes read from level N during compaction between levels N and N+1
-    int64_t bytes_readn;
-
-    // Bytes read from level N+1 during compaction between levels N and N+1
-    int64_t bytes_readnp1;
-
-    // Total bytes written during compaction between levels N and N+1
-    int64_t bytes_written;
-
-    // Files read from level N during compaction between levels N and N+1
-    int files_in_leveln;
-
-    // Files read from level N+1 during compaction between levels N and N+1
-    int files_in_levelnp1;
-
-    // Files written during compaction between levels N and N+1
-    int files_out_levelnp1;
-
-    // Number of compactions done
-    int count;
-
-    CompactionStats()
-        : micros(0),
-          bytes_readn(0),
-          bytes_readnp1(0),
-          bytes_written(0),
-          files_in_leveln(0),
-          files_in_levelnp1(0),
-          files_out_levelnp1(0),
-          count(0) {}
-
-    void Add(const CompactionStats& c) {
-      this->micros += c.micros;
-      this->bytes_readn += c.bytes_readn;
-      this->bytes_readnp1 += c.bytes_readnp1;
-      this->bytes_written += c.bytes_written;
-      this->files_in_leveln += c.files_in_leveln;
-      this->files_in_levelnp1 += c.files_in_levelnp1;
-      this->files_out_levelnp1 += c.files_out_levelnp1;
-      this->count += 1;
-    }
-  };
-
-  void AddCompactionStats(int level, const CompactionStats& stats) {
-    compaction_stats_[level].Add(stats);
-  }
-
-  void RecordWriteStall(WriteStallType write_stall_type, uint64_t micros) {
-    stall_micros_[write_stall_type] += micros;
-    stall_counts_[write_stall_type]++;
-  }
-
-  void RecordLevelNSlowdown(int level, uint64_t micros) {
-    stall_leveln_slowdown_[level] += micros;
-    stall_leveln_slowdown_count_[level] += micros;
-  }
-
-  uint64_t GetBackgroundErrorCount() const { return bg_error_count_; }
-
-  uint64_t BumpAndGetBackgroundErrorCount() { return ++bg_error_count_; }
-
-  bool GetProperty(DBPropertyType property_type, const Slice& property,
-                   std::string* value, ColumnFamilyData* cfd);
-
- private:
-  std::vector<CompactionStats> compaction_stats_;
-
-  // Used to compute per-interval statistics
-  struct StatsSnapshot {
-    uint64_t compaction_bytes_read_;     // Bytes read by compaction
-    uint64_t compaction_bytes_written_;  // Bytes written by compaction
-    uint64_t ingest_bytes_;              // Bytes written by user
-    uint64_t wal_bytes_;                 // Bytes written to WAL
-    uint64_t wal_synced_;                // Number of times WAL is synced
-    uint64_t write_with_wal_;            // Number of writes that request WAL
-    // These count the number of writes processed by the calling thread or
-    // another thread.
-    uint64_t write_other_;
-    uint64_t write_self_;
-    double seconds_up_;
-
-    StatsSnapshot()
-        : compaction_bytes_read_(0),
-          compaction_bytes_written_(0),
-          ingest_bytes_(0),
-          wal_bytes_(0),
-          wal_synced_(0),
-          write_with_wal_(0),
-          write_other_(0),
-          write_self_(0),
-          seconds_up_(0) {}
-  };
-
-  // Counters from the previous time per-interval stats were computed
-  StatsSnapshot last_stats_;
-
-  // These count the number of microseconds for which MakeRoomForWrite stalls.
-  std::vector<uint64_t> stall_micros_;
-  std::vector<uint64_t> stall_counts_;
-  std::vector<uint64_t> stall_leveln_slowdown_;
-  std::vector<uint64_t> stall_leveln_slowdown_count_;
-
-  // Total number of background errors encountered. Every time a flush task
-  // or compaction task fails, this counter is incremented. The failure can
-  // be caused by any possible reason, including file system errors, out of
-  // resources, or input file corruption. Failing when retrying the same flush
-  // or compaction will cause the counter to increase too.
-  uint64_t bg_error_count_;
-
-  int number_levels_;
-  Statistics* statistics_;
-  Env* env_;
-  uint64_t started_at_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/log_and_apply_bench.cc b/src/rocksdb/db/log_and_apply_bench.cc
deleted file mode 100644
index ab9716d..0000000
--- a/src/rocksdb/db/log_and_apply_bench.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-
-#include <vector>
-
-#include "util/testharness.h"
-#include "util/benchharness.h"
-#include "db/version_set.h"
-#include "util/mutexlock.h"
-
-namespace rocksdb {
-
-std::string MakeKey(unsigned int num) {
-  char buf[30];
-  snprintf(buf, sizeof(buf), "%016u", num);
-  return std::string(buf);
-}
-
-void BM_LogAndApply(int iters, int num_base_files) {
-  VersionSet* vset;
-  ColumnFamilyData* default_cfd;
-  uint64_t fnum = 1;
-  port::Mutex mu;
-  MutexLock l(&mu);
-
-  BENCHMARK_SUSPEND {
-    std::string dbname = test::TmpDir() + "/rocksdb_test_benchmark";
-    ASSERT_OK(DestroyDB(dbname, Options()));
-
-    DB* db = nullptr;
-    Options opts;
-    opts.create_if_missing = true;
-    Status s = DB::Open(opts, dbname, &db);
-    ASSERT_OK(s);
-    ASSERT_TRUE(db != nullptr);
-
-    delete db;
-    db = nullptr;
-
-    Options options;
-    EnvOptions sopt;
-    vset = new VersionSet(dbname, &options, sopt, nullptr);
-    std::vector<ColumnFamilyDescriptor> dummy;
-    dummy.push_back(ColumnFamilyDescriptor());
-    ASSERT_OK(vset->Recover(dummy));
-    default_cfd = vset->GetColumnFamilySet()->GetDefault();
-    VersionEdit vbase;
-    for (int i = 0; i < num_base_files; i++) {
-      InternalKey start(MakeKey(2 * fnum), 1, kTypeValue);
-      InternalKey limit(MakeKey(2 * fnum + 1), 1, kTypeDeletion);
-      vbase.AddFile(2, ++fnum, 1 /* file size */, start, limit, 1, 1);
-    }
-    ASSERT_OK(vset->LogAndApply(default_cfd, &vbase, &mu));
-  }
-
-  for (int i = 0; i < iters; i++) {
-    VersionEdit vedit;
-    vedit.DeleteFile(2, fnum);
-    InternalKey start(MakeKey(2 * fnum), 1, kTypeValue);
-    InternalKey limit(MakeKey(2 * fnum + 1), 1, kTypeDeletion);
-    vedit.AddFile(2, ++fnum, 1 /* file size */, start, limit, 1, 1);
-    vset->LogAndApply(default_cfd, &vedit, &mu);
-  }
-}
-
-BENCHMARK_NAMED_PARAM(BM_LogAndApply, 1000_iters_1_file, 1000, 1)
-BENCHMARK_NAMED_PARAM(BM_LogAndApply, 1000_iters_100_files, 1000, 100)
-BENCHMARK_NAMED_PARAM(BM_LogAndApply, 1000_iters_10000_files, 1000, 10000)
-BENCHMARK_NAMED_PARAM(BM_LogAndApply, 100_iters_100000_files, 100, 100000)
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  rocksdb::benchmark::RunBenchmarks();
-  return 0;
-}
diff --git a/src/rocksdb/db/log_format.h b/src/rocksdb/db/log_format.h
deleted file mode 100644
index 919c087..0000000
--- a/src/rocksdb/db/log_format.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Log format information shared by reader and writer.
-// See ../doc/log_format.txt for more detail.
-
-#pragma once
-namespace rocksdb {
-namespace log {
-
-enum RecordType {
-  // Zero is reserved for preallocated files
-  kZeroType = 0,
-  kFullType = 1,
-
-  // For fragments
-  kFirstType = 2,
-  kMiddleType = 3,
-  kLastType = 4
-};
-static const int kMaxRecordType = kLastType;
-
-static const unsigned int kBlockSize = 32768;
-
-// Header is checksum (4 bytes), type (1 byte), length (2 bytes).
-static const int kHeaderSize = 4 + 1 + 2;
-
-}  // namespace log
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/log_reader.cc b/src/rocksdb/db/log_reader.cc
deleted file mode 100644
index be1fb8c..0000000
--- a/src/rocksdb/db/log_reader.cc
+++ /dev/null
@@ -1,339 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/log_reader.h"
-
-#include <stdio.h>
-#include "rocksdb/env.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-
-namespace rocksdb {
-namespace log {
-
-Reader::Reporter::~Reporter() {
-}
-
-Reader::Reader(unique_ptr<SequentialFile>&& file, Reporter* reporter,
-               bool checksum, uint64_t initial_offset)
-    : file_(std::move(file)),
-      reporter_(reporter),
-      checksum_(checksum),
-      backing_store_(new char[kBlockSize]),
-      buffer_(),
-      eof_(false),
-      read_error_(false),
-      eof_offset_(0),
-      last_record_offset_(0),
-      end_of_buffer_offset_(0),
-      initial_offset_(initial_offset) {
-}
-
-Reader::~Reader() {
-  delete[] backing_store_;
-}
-
-bool Reader::SkipToInitialBlock() {
-  size_t offset_in_block = initial_offset_ % kBlockSize;
-  uint64_t block_start_location = initial_offset_ - offset_in_block;
-
-  // Don't search a block if we'd be in the trailer
-  if (offset_in_block > kBlockSize - 6) {
-    offset_in_block = 0;
-    block_start_location += kBlockSize;
-  }
-
-  end_of_buffer_offset_ = block_start_location;
-
-  // Skip to start of first block that can contain the initial record
-  if (block_start_location > 0) {
-    Status skip_status = file_->Skip(block_start_location);
-    if (!skip_status.ok()) {
-      ReportDrop(block_start_location, skip_status);
-      return false;
-    }
-  }
-
-  return true;
-}
-
-bool Reader::ReadRecord(Slice* record, std::string* scratch) {
-  if (last_record_offset_ < initial_offset_) {
-    if (!SkipToInitialBlock()) {
-      return false;
-    }
-  }
-
-  scratch->clear();
-  record->clear();
-  bool in_fragmented_record = false;
-  // Record offset of the logical record that we're reading
-  // 0 is a dummy value to make compilers happy
-  uint64_t prospective_record_offset = 0;
-
-  Slice fragment;
-  while (true) {
-    uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size();
-    const unsigned int record_type = ReadPhysicalRecord(&fragment);
-    switch (record_type) {
-      case kFullType:
-        if (in_fragmented_record) {
-          // Handle bug in earlier versions of log::Writer where
-          // it could emit an empty kFirstType record at the tail end
-          // of a block followed by a kFullType or kFirstType record
-          // at the beginning of the next block.
-          if (scratch->empty()) {
-            in_fragmented_record = false;
-          } else {
-            ReportCorruption(scratch->size(), "partial record without end(1)");
-          }
-        }
-        prospective_record_offset = physical_record_offset;
-        scratch->clear();
-        *record = fragment;
-        last_record_offset_ = prospective_record_offset;
-        return true;
-
-      case kFirstType:
-        if (in_fragmented_record) {
-          // Handle bug in earlier versions of log::Writer where
-          // it could emit an empty kFirstType record at the tail end
-          // of a block followed by a kFullType or kFirstType record
-          // at the beginning of the next block.
-          if (scratch->empty()) {
-            in_fragmented_record = false;
-          } else {
-            ReportCorruption(scratch->size(), "partial record without end(2)");
-          }
-        }
-        prospective_record_offset = physical_record_offset;
-        scratch->assign(fragment.data(), fragment.size());
-        in_fragmented_record = true;
-        break;
-
-      case kMiddleType:
-        if (!in_fragmented_record) {
-          ReportCorruption(fragment.size(),
-                           "missing start of fragmented record(1)");
-        } else {
-          scratch->append(fragment.data(), fragment.size());
-        }
-        break;
-
-      case kLastType:
-        if (!in_fragmented_record) {
-          ReportCorruption(fragment.size(),
-                           "missing start of fragmented record(2)");
-        } else {
-          scratch->append(fragment.data(), fragment.size());
-          *record = Slice(*scratch);
-          last_record_offset_ = prospective_record_offset;
-          return true;
-        }
-        break;
-
-      case kEof:
-        if (in_fragmented_record) {
-          // This can be caused by the writer dying immediately after
-          //  writing a physical record but before completing the next; don't
-          //  treat it as a corruption, just ignore the entire logical record.
-          scratch->clear();
-        }
-        return false;
-
-      case kBadRecord:
-        if (in_fragmented_record) {
-          ReportCorruption(scratch->size(), "error in middle of record");
-          in_fragmented_record = false;
-          scratch->clear();
-        }
-        break;
-
-      default: {
-        char buf[40];
-        snprintf(buf, sizeof(buf), "unknown record type %u", record_type);
-        ReportCorruption(
-            (fragment.size() + (in_fragmented_record ? scratch->size() : 0)),
-            buf);
-        in_fragmented_record = false;
-        scratch->clear();
-        break;
-      }
-    }
-  }
-  return false;
-}
-
-uint64_t Reader::LastRecordOffset() {
-  return last_record_offset_;
-}
-
-void Reader::UnmarkEOF() {
-  if (read_error_) {
-    return;
-  }
-
-  eof_ = false;
-
-  if (eof_offset_ == 0) {
-    return;
-  }
-
-  // If the EOF was in the middle of a block (a partial block was read) we have
-  // to read the rest of the block as ReadPhysicalRecord can only read full
-  // blocks and expects the file position indicator to be aligned to the start
-  // of a block.
-  //
-  //      consumed_bytes + buffer_size() + remaining == kBlockSize
-
-  size_t consumed_bytes = eof_offset_ - buffer_.size();
-  size_t remaining = kBlockSize - eof_offset_;
-
-  // backing_store_ is used to concatenate what is left in buffer_ and
-  // the remainder of the block. If buffer_ already uses backing_store_,
-  // we just append the new data.
-  if (buffer_.data() != backing_store_ + consumed_bytes) {
-    // Buffer_ does not use backing_store_ for storage.
-    // Copy what is left in buffer_ to backing_store.
-    memmove(backing_store_ + consumed_bytes, buffer_.data(), buffer_.size());
-  }
-
-  Slice read_buffer;
-  Status status = file_->Read(remaining, &read_buffer,
-    backing_store_ + eof_offset_);
-
-  size_t added = read_buffer.size();
-  end_of_buffer_offset_ += added;
-
-  if (!status.ok()) {
-    if (added > 0) {
-      ReportDrop(added, status);
-    }
-
-    read_error_ = true;
-    return;
-  }
-
-  if (read_buffer.data() != backing_store_ + eof_offset_) {
-    // Read did not write to backing_store_
-    memmove(backing_store_ + eof_offset_, read_buffer.data(),
-      read_buffer.size());
-  }
-
-  buffer_ = Slice(backing_store_ + consumed_bytes,
-    eof_offset_ + added - consumed_bytes);
-
-  if (added < remaining) {
-    eof_ = true;
-    eof_offset_ += added;
-  } else {
-    eof_offset_ = 0;
-  }
-}
-
-void Reader::ReportCorruption(size_t bytes, const char* reason) {
-  ReportDrop(bytes, Status::Corruption(reason));
-}
-
-void Reader::ReportDrop(size_t bytes, const Status& reason) {
-  if (reporter_ != nullptr &&
-      end_of_buffer_offset_ - buffer_.size() - bytes >= initial_offset_) {
-    reporter_->Corruption(bytes, reason);
-  }
-}
-
-unsigned int Reader::ReadPhysicalRecord(Slice* result) {
-  while (true) {
-    if (buffer_.size() < (size_t)kHeaderSize) {
-      if (!eof_ && !read_error_) {
-        // Last read was a full read, so this is a trailer to skip
-        buffer_.clear();
-        Status status = file_->Read(kBlockSize, &buffer_, backing_store_);
-        end_of_buffer_offset_ += buffer_.size();
-        if (!status.ok()) {
-          buffer_.clear();
-          ReportDrop(kBlockSize, status);
-          read_error_ = true;
-          return kEof;
-        } else if (buffer_.size() < (size_t)kBlockSize) {
-          eof_ = true;
-          eof_offset_ = buffer_.size();
-        }
-        continue;
-      } else {
-        // Note that if buffer_ is non-empty, we have a truncated header at the
-        //  end of the file, which can be caused by the writer crashing in the
-        //  middle of writing the header. Instead of considering this an error,
-        //  just report EOF.
-        buffer_.clear();
-        return kEof;
-      }
-    }
-
-    // Parse the header
-    const char* header = buffer_.data();
-    const uint32_t a = static_cast<uint32_t>(header[4]) & 0xff;
-    const uint32_t b = static_cast<uint32_t>(header[5]) & 0xff;
-    const unsigned int type = header[6];
-    const uint32_t length = a | (b << 8);
-    if (kHeaderSize + length > buffer_.size()) {
-      size_t drop_size = buffer_.size();
-      buffer_.clear();
-      if (!eof_) {
-        ReportCorruption(drop_size, "bad record length");
-        return kBadRecord;
-      }
-      // If the end of the file has been reached without reading |length| bytes
-      // of payload, assume the writer died in the middle of writing the record.
-      // Don't report a corruption.
-      return kEof;
-    }
-
-    if (type == kZeroType && length == 0) {
-      // Skip zero length record without reporting any drops since
-      // such records are produced by the mmap based writing code in
-      // env_posix.cc that preallocates file regions.
-      // NOTE: this should never happen in DB written by new RocksDB versions,
-      // since we turn off mmap writes to manifest and log files
-      buffer_.clear();
-      return kBadRecord;
-    }
-
-    // Check crc
-    if (checksum_) {
-      uint32_t expected_crc = crc32c::Unmask(DecodeFixed32(header));
-      uint32_t actual_crc = crc32c::Value(header + 6, 1 + length);
-      if (actual_crc != expected_crc) {
-        // Drop the rest of the buffer since "length" itself may have
-        // been corrupted and if we trust it, we could find some
-        // fragment of a real log record that just happens to look
-        // like a valid log record.
-        size_t drop_size = buffer_.size();
-        buffer_.clear();
-        ReportCorruption(drop_size, "checksum mismatch");
-        return kBadRecord;
-      }
-    }
-
-    buffer_.remove_prefix(kHeaderSize + length);
-
-    // Skip physical record that started before initial_offset_
-    if (end_of_buffer_offset_ - buffer_.size() - kHeaderSize - length <
-        initial_offset_) {
-      result->clear();
-      return kBadRecord;
-    }
-
-    *result = Slice(header + kHeaderSize, length);
-    return type;
-  }
-}
-
-}  // namespace log
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/log_reader.h b/src/rocksdb/db/log_reader.h
deleted file mode 100644
index 81d334d..0000000
--- a/src/rocksdb/db/log_reader.h
+++ /dev/null
@@ -1,130 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <memory>
-#include <stdint.h>
-
-#include "db/log_format.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-class SequentialFile;
-using std::unique_ptr;
-
-namespace log {
-
-class Reader {
- public:
-  // Interface for reporting errors.
-  class Reporter {
-   public:
-    virtual ~Reporter();
-
-    // Some corruption was detected.  "size" is the approximate number
-    // of bytes dropped due to the corruption.
-    virtual void Corruption(size_t bytes, const Status& status) = 0;
-  };
-
-  // Create a reader that will return log records from "*file".
-  // "*file" must remain live while this Reader is in use.
-  //
-  // If "reporter" is non-nullptr, it is notified whenever some data is
-  // dropped due to a detected corruption.  "*reporter" must remain
-  // live while this Reader is in use.
-  //
-  // If "checksum" is true, verify checksums if available.
-  //
-  // The Reader will start reading at the first record located at physical
-  // position >= initial_offset within the file.
-  Reader(unique_ptr<SequentialFile>&& file, Reporter* reporter,
-         bool checksum, uint64_t initial_offset);
-
-  ~Reader();
-
-  // Read the next record into *record.  Returns true if read
-  // successfully, false if we hit end of the input.  May use
-  // "*scratch" as temporary storage.  The contents filled in *record
-  // will only be valid until the next mutating operation on this
-  // reader or the next mutation to *scratch.
-  bool ReadRecord(Slice* record, std::string* scratch);
-
-  // Returns the physical offset of the last record returned by ReadRecord.
-  //
-  // Undefined before the first call to ReadRecord.
-  uint64_t LastRecordOffset();
-
-  // returns true if the reader has encountered an eof condition.
-  bool IsEOF() {
-    return eof_;
-  }
-
-  // when we know more data has been written to the file. we can use this
-  // function to force the reader to look again in the file.
-  // Also aligns the file position indicator to the start of the next block
-  // by reading the rest of the data from the EOF position to the end of the
-  // block that was partially read.
-  void UnmarkEOF();
-
-  SequentialFile* file() { return file_.get(); }
-
- private:
-  const unique_ptr<SequentialFile> file_;
-  Reporter* const reporter_;
-  bool const checksum_;
-  char* const backing_store_;
-  Slice buffer_;
-  bool eof_;   // Last Read() indicated EOF by returning < kBlockSize
-  bool read_error_;   // Error occurred while reading from file
-
-  // Offset of the file position indicator within the last block when an
-  // EOF was detected.
-  size_t eof_offset_;
-
-  // Offset of the last record returned by ReadRecord.
-  uint64_t last_record_offset_;
-  // Offset of the first location past the end of buffer_.
-  uint64_t end_of_buffer_offset_;
-
-  // Offset at which to start looking for the first record to return
-  uint64_t const initial_offset_;
-
-  // Extend record types with the following special values
-  enum {
-    kEof = kMaxRecordType + 1,
-    // Returned whenever we find an invalid physical record.
-    // Currently there are three situations in which this happens:
-    // * The record has an invalid CRC (ReadPhysicalRecord reports a drop)
-    // * The record is a 0-length record (No drop is reported)
-    // * The record is below constructor's initial_offset (No drop is reported)
-    kBadRecord = kMaxRecordType + 2
-  };
-
-  // Skips all blocks that are completely before "initial_offset_".
-  //
-  // Returns true on success. Handles reporting.
-  bool SkipToInitialBlock();
-
-  // Return type, or one of the preceding special values
-  unsigned int ReadPhysicalRecord(Slice* result);
-
-  // Reports dropped bytes to the reporter.
-  // buffer_ must be updated to remove the dropped bytes prior to invocation.
-  void ReportCorruption(size_t bytes, const char* reason);
-  void ReportDrop(size_t bytes, const Status& reason);
-
-  // No copying allowed
-  Reader(const Reader&);
-  void operator=(const Reader&);
-};
-
-}  // namespace log
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/log_test.cc b/src/rocksdb/db/log_test.cc
deleted file mode 100644
index 6577a6a..0000000
--- a/src/rocksdb/db/log_test.cc
+++ /dev/null
@@ -1,689 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/log_reader.h"
-#include "db/log_writer.h"
-#include "rocksdb/env.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-#include "util/random.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-namespace log {
-
-// Construct a string of the specified length made out of the supplied
-// partial string.
-static std::string BigString(const std::string& partial_string, size_t n) {
-  std::string result;
-  while (result.size() < n) {
-    result.append(partial_string);
-  }
-  result.resize(n);
-  return result;
-}
-
-// Construct a string from a number
-static std::string NumberString(int n) {
-  char buf[50];
-  snprintf(buf, sizeof(buf), "%d.", n);
-  return std::string(buf);
-}
-
-// Return a skewed potentially long string
-static std::string RandomSkewedString(int i, Random* rnd) {
-  return BigString(NumberString(i), rnd->Skewed(17));
-}
-
-class LogTest {
- private:
-  class StringDest : public WritableFile {
-   public:
-    std::string contents_;
-
-    explicit StringDest(Slice& reader_contents) :
-      WritableFile(),
-      contents_(""),
-      reader_contents_(reader_contents),
-      last_flush_(0) {
-      reader_contents_ = Slice(contents_.data(), 0);
-    };
-
-    virtual Status Close() { return Status::OK(); }
-    virtual Status Flush() {
-      ASSERT_TRUE(reader_contents_.size() <= last_flush_);
-      size_t offset = last_flush_ - reader_contents_.size();
-      reader_contents_ = Slice(
-          contents_.data() + offset,
-          contents_.size() - offset);
-      last_flush_ = contents_.size();
-
-      return Status::OK();
-    }
-    virtual Status Sync() { return Status::OK(); }
-    virtual Status Append(const Slice& slice) {
-      contents_.append(slice.data(), slice.size());
-      return Status::OK();
-    }
-    void Drop(size_t bytes) {
-      contents_.resize(contents_.size() - bytes);
-      reader_contents_ = Slice(
-          reader_contents_.data(), reader_contents_.size() - bytes);
-      last_flush_ = contents_.size();
-    }
-
-   private:
-    Slice& reader_contents_;
-    size_t last_flush_;
-  };
-
-  class StringSource : public SequentialFile {
-   public:
-    Slice& contents_;
-    bool force_error_;
-    size_t force_error_position_;
-    bool force_eof_;
-    size_t force_eof_position_;
-    bool returned_partial_;
-    explicit StringSource(Slice& contents) :
-      contents_(contents),
-      force_error_(false),
-      force_error_position_(0),
-      force_eof_(false),
-      force_eof_position_(0),
-      returned_partial_(false) { }
-
-    virtual Status Read(size_t n, Slice* result, char* scratch) {
-      ASSERT_TRUE(!returned_partial_) << "must not Read() after eof/error";
-
-      if (force_error_) {
-        if (force_error_position_ >= n) {
-          force_error_position_ -= n;
-        } else {
-          *result = Slice(contents_.data(), force_error_position_);
-          contents_.remove_prefix(force_error_position_);
-          force_error_ = false;
-          returned_partial_ = true;
-          return Status::Corruption("read error");
-        }
-      }
-
-      if (contents_.size() < n) {
-        n = contents_.size();
-        returned_partial_ = true;
-      }
-
-      if (force_eof_) {
-        if (force_eof_position_ >= n) {
-          force_eof_position_ -= n;
-        } else {
-          force_eof_ = false;
-          n = force_eof_position_;
-          returned_partial_ = true;
-        }
-      }
-
-      // By using scratch we ensure that caller has control over the
-      // lifetime of result.data()
-      memcpy(scratch, contents_.data(), n);
-      *result = Slice(scratch, n);
-
-      contents_.remove_prefix(n);
-      return Status::OK();
-    }
-
-    virtual Status Skip(uint64_t n) {
-      if (n > contents_.size()) {
-        contents_.clear();
-        return Status::NotFound("in-memory file skipepd past end");
-      }
-
-      contents_.remove_prefix(n);
-
-      return Status::OK();
-    }
-  };
-
-  class ReportCollector : public Reader::Reporter {
-   public:
-    size_t dropped_bytes_;
-    std::string message_;
-
-    ReportCollector() : dropped_bytes_(0) { }
-    virtual void Corruption(size_t bytes, const Status& status) {
-      dropped_bytes_ += bytes;
-      message_.append(status.ToString());
-    }
-  };
-
-  std::string& dest_contents() {
-    auto dest = dynamic_cast<StringDest*>(writer_.file());
-    assert(dest);
-    return dest->contents_;
-  }
-
-  const std::string& dest_contents() const {
-    auto dest = dynamic_cast<const StringDest*>(writer_.file());
-    assert(dest);
-    return dest->contents_;
-  }
-
-  void reset_source_contents() {
-    auto src = dynamic_cast<StringSource*>(reader_.file());
-    assert(src);
-    src->contents_ = dest_contents();
-  }
-
-  Slice reader_contents_;
-  unique_ptr<StringDest> dest_holder_;
-  unique_ptr<StringSource> source_holder_;
-  ReportCollector report_;
-  Writer writer_;
-  Reader reader_;
-
-  // Record metadata for testing initial offset functionality
-  static size_t initial_offset_record_sizes_[];
-  static uint64_t initial_offset_last_record_offsets_[];
-
- public:
-  LogTest() : reader_contents_(),
-              dest_holder_(new StringDest(reader_contents_)),
-              source_holder_(new StringSource(reader_contents_)),
-              writer_(std::move(dest_holder_)),
-              reader_(std::move(source_holder_), &report_, true/*checksum*/,
-                      0/*initial_offset*/) {
-  }
-
-  void Write(const std::string& msg) {
-    writer_.AddRecord(Slice(msg));
-  }
-
-  size_t WrittenBytes() const {
-    return dest_contents().size();
-  }
-
-  std::string Read() {
-    std::string scratch;
-    Slice record;
-    if (reader_.ReadRecord(&record, &scratch)) {
-      return record.ToString();
-    } else {
-      return "EOF";
-    }
-  }
-
-  void IncrementByte(int offset, int delta) {
-    dest_contents()[offset] += delta;
-  }
-
-  void SetByte(int offset, char new_byte) {
-    dest_contents()[offset] = new_byte;
-  }
-
-  void ShrinkSize(int bytes) {
-    auto dest = dynamic_cast<StringDest*>(writer_.file());
-    assert(dest);
-    dest->Drop(bytes);
-  }
-
-  void FixChecksum(int header_offset, int len) {
-    // Compute crc of type/len/data
-    uint32_t crc = crc32c::Value(&dest_contents()[header_offset+6], 1 + len);
-    crc = crc32c::Mask(crc);
-    EncodeFixed32(&dest_contents()[header_offset], crc);
-  }
-
-  void ForceError(size_t position = 0) {
-    auto src = dynamic_cast<StringSource*>(reader_.file());
-    src->force_error_ = true;
-    src->force_error_position_ = position;
-  }
-
-  size_t DroppedBytes() const {
-    return report_.dropped_bytes_;
-  }
-
-  std::string ReportMessage() const {
-    return report_.message_;
-  }
-
-  void ForceEOF(size_t position = 0) {
-    auto src = dynamic_cast<StringSource*>(reader_.file());
-    src->force_eof_ = true;
-    src->force_eof_position_ = position;
-  }
-
-  void UnmarkEOF() {
-    auto src = dynamic_cast<StringSource*>(reader_.file());
-    src->returned_partial_ = false;
-    reader_.UnmarkEOF();
-  }
-
-  bool IsEOF() {
-    return reader_.IsEOF();
-  }
-
-  // Returns OK iff recorded error message contains "msg"
-  std::string MatchError(const std::string& msg) const {
-    if (report_.message_.find(msg) == std::string::npos) {
-      return report_.message_;
-    } else {
-      return "OK";
-    }
-  }
-
-  void WriteInitialOffsetLog() {
-    for (int i = 0; i < 4; i++) {
-      std::string record(initial_offset_record_sizes_[i],
-                         static_cast<char>('a' + i));
-      Write(record);
-    }
-  }
-
-  void CheckOffsetPastEndReturnsNoRecords(uint64_t offset_past_end) {
-    WriteInitialOffsetLog();
-    unique_ptr<StringSource> source(new StringSource(reader_contents_));
-    unique_ptr<Reader> offset_reader(
-      new Reader(std::move(source), &report_, true/*checksum*/,
-                 WrittenBytes() + offset_past_end));
-    Slice record;
-    std::string scratch;
-    ASSERT_TRUE(!offset_reader->ReadRecord(&record, &scratch));
-  }
-
-  void CheckInitialOffsetRecord(uint64_t initial_offset,
-                                int expected_record_offset) {
-    WriteInitialOffsetLog();
-    unique_ptr<StringSource> source(new StringSource(reader_contents_));
-    unique_ptr<Reader> offset_reader(
-      new Reader(std::move(source), &report_, true/*checksum*/,
-                 initial_offset));
-    Slice record;
-    std::string scratch;
-    ASSERT_TRUE(offset_reader->ReadRecord(&record, &scratch));
-    ASSERT_EQ(initial_offset_record_sizes_[expected_record_offset],
-              record.size());
-    ASSERT_EQ(initial_offset_last_record_offsets_[expected_record_offset],
-              offset_reader->LastRecordOffset());
-    ASSERT_EQ((char)('a' + expected_record_offset), record.data()[0]);
-  }
-
-};
-
-size_t LogTest::initial_offset_record_sizes_[] =
-    {10000,  // Two sizable records in first block
-     10000,
-     2 * log::kBlockSize - 1000,  // Span three blocks
-     1};
-
-uint64_t LogTest::initial_offset_last_record_offsets_[] =
-    {0,
-     kHeaderSize + 10000,
-     2 * (kHeaderSize + 10000),
-     2 * (kHeaderSize + 10000) +
-         (2 * log::kBlockSize - 1000) + 3 * kHeaderSize};
-
-
-TEST(LogTest, Empty) {
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, ReadWrite) {
-  Write("foo");
-  Write("bar");
-  Write("");
-  Write("xxxx");
-  ASSERT_EQ("foo", Read());
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("", Read());
-  ASSERT_EQ("xxxx", Read());
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ("EOF", Read());  // Make sure reads at eof work
-}
-
-TEST(LogTest, ManyBlocks) {
-  for (int i = 0; i < 100000; i++) {
-    Write(NumberString(i));
-  }
-  for (int i = 0; i < 100000; i++) {
-    ASSERT_EQ(NumberString(i), Read());
-  }
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, Fragmentation) {
-  Write("small");
-  Write(BigString("medium", 50000));
-  Write(BigString("large", 100000));
-  ASSERT_EQ("small", Read());
-  ASSERT_EQ(BigString("medium", 50000), Read());
-  ASSERT_EQ(BigString("large", 100000), Read());
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, MarginalTrailer) {
-  // Make a trailer that is exactly the same length as an empty record.
-  const int n = kBlockSize - 2*kHeaderSize;
-  Write(BigString("foo", n));
-  ASSERT_EQ((unsigned int)(kBlockSize - kHeaderSize), WrittenBytes());
-  Write("");
-  Write("bar");
-  ASSERT_EQ(BigString("foo", n), Read());
-  ASSERT_EQ("", Read());
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, MarginalTrailer2) {
-  // Make a trailer that is exactly the same length as an empty record.
-  const int n = kBlockSize - 2*kHeaderSize;
-  Write(BigString("foo", n));
-  ASSERT_EQ((unsigned int)(kBlockSize - kHeaderSize), WrittenBytes());
-  Write("bar");
-  ASSERT_EQ(BigString("foo", n), Read());
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(0U, DroppedBytes());
-  ASSERT_EQ("", ReportMessage());
-}
-
-TEST(LogTest, ShortTrailer) {
-  const int n = kBlockSize - 2*kHeaderSize + 4;
-  Write(BigString("foo", n));
-  ASSERT_EQ((unsigned int)(kBlockSize - kHeaderSize + 4), WrittenBytes());
-  Write("");
-  Write("bar");
-  ASSERT_EQ(BigString("foo", n), Read());
-  ASSERT_EQ("", Read());
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, AlignedEof) {
-  const int n = kBlockSize - 2*kHeaderSize + 4;
-  Write(BigString("foo", n));
-  ASSERT_EQ((unsigned int)(kBlockSize - kHeaderSize + 4), WrittenBytes());
-  ASSERT_EQ(BigString("foo", n), Read());
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, RandomRead) {
-  const int N = 500;
-  Random write_rnd(301);
-  for (int i = 0; i < N; i++) {
-    Write(RandomSkewedString(i, &write_rnd));
-  }
-  Random read_rnd(301);
-  for (int i = 0; i < N; i++) {
-    ASSERT_EQ(RandomSkewedString(i, &read_rnd), Read());
-  }
-  ASSERT_EQ("EOF", Read());
-}
-
-// Tests of all the error paths in log_reader.cc follow:
-
-TEST(LogTest, ReadError) {
-  Write("foo");
-  ForceError();
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ((unsigned int)kBlockSize, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("read error"));
-}
-
-TEST(LogTest, BadRecordType) {
-  Write("foo");
-  // Type is stored in header[6]
-  IncrementByte(6, 100);
-  FixChecksum(0, 3);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(3U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("unknown record type"));
-}
-
-TEST(LogTest, TruncatedTrailingRecordIsIgnored) {
-  Write("foo");
-  ShrinkSize(4);   // Drop all payload as well as a header byte
-  ASSERT_EQ("EOF", Read());
-  // Truncated last record is ignored, not treated as an error
-  ASSERT_EQ(0U, DroppedBytes());
-  ASSERT_EQ("", ReportMessage());
-}
-
-TEST(LogTest, BadLength) {
-  const int kPayloadSize = kBlockSize - kHeaderSize;
-  Write(BigString("bar", kPayloadSize));
-  Write("foo");
-  // Least significant size byte is stored in header[4].
-  IncrementByte(4, 1);
-  ASSERT_EQ("foo", Read());
-  ASSERT_EQ(kBlockSize, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("bad record length"));
-}
-
-TEST(LogTest, BadLengthAtEndIsIgnored) {
-  Write("foo");
-  ShrinkSize(1);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(0U, DroppedBytes());
-  ASSERT_EQ("", ReportMessage());
-}
-
-TEST(LogTest, ChecksumMismatch) {
-  Write("foo");
-  IncrementByte(0, 10);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(10U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("checksum mismatch"));
-}
-
-TEST(LogTest, UnexpectedMiddleType) {
-  Write("foo");
-  SetByte(6, kMiddleType);
-  FixChecksum(0, 3);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(3U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("missing start"));
-}
-
-TEST(LogTest, UnexpectedLastType) {
-  Write("foo");
-  SetByte(6, kLastType);
-  FixChecksum(0, 3);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(3U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("missing start"));
-}
-
-TEST(LogTest, UnexpectedFullType) {
-  Write("foo");
-  Write("bar");
-  SetByte(6, kFirstType);
-  FixChecksum(0, 3);
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(3U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("partial record without end"));
-}
-
-TEST(LogTest, UnexpectedFirstType) {
-  Write("foo");
-  Write(BigString("bar", 100000));
-  SetByte(6, kFirstType);
-  FixChecksum(0, 3);
-  ASSERT_EQ(BigString("bar", 100000), Read());
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(3U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("partial record without end"));
-}
-
-TEST(LogTest, MissingLastIsIgnored) {
-  Write(BigString("bar", kBlockSize));
-  // Remove the LAST block, including header.
-  ShrinkSize(14);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ("", ReportMessage());
-  ASSERT_EQ(0U, DroppedBytes());
-}
-
-TEST(LogTest, PartialLastIsIgnored) {
-  Write(BigString("bar", kBlockSize));
-  // Cause a bad record length in the LAST block.
-  ShrinkSize(1);
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ("", ReportMessage());
-  ASSERT_EQ(0U, DroppedBytes());
-}
-
-TEST(LogTest, ErrorJoinsRecords) {
-  // Consider two fragmented records:
-  //    first(R1) last(R1) first(R2) last(R2)
-  // where the middle two fragments disappear.  We do not want
-  // first(R1),last(R2) to get joined and returned as a valid record.
-
-  // Write records that span two blocks
-  Write(BigString("foo", kBlockSize));
-  Write(BigString("bar", kBlockSize));
-  Write("correct");
-
-  // Wipe the middle block
-  for (unsigned int offset = kBlockSize; offset < 2*kBlockSize; offset++) {
-    SetByte(offset, 'x');
-  }
-
-  ASSERT_EQ("correct", Read());
-  ASSERT_EQ("EOF", Read());
-  const unsigned int dropped = DroppedBytes();
-  ASSERT_LE(dropped, 2*kBlockSize + 100);
-  ASSERT_GE(dropped, 2*kBlockSize);
-}
-
-TEST(LogTest, ReadStart) {
-  CheckInitialOffsetRecord(0, 0);
-}
-
-TEST(LogTest, ReadSecondOneOff) {
-  CheckInitialOffsetRecord(1, 1);
-}
-
-TEST(LogTest, ReadSecondTenThousand) {
-  CheckInitialOffsetRecord(10000, 1);
-}
-
-TEST(LogTest, ReadSecondStart) {
-  CheckInitialOffsetRecord(10007, 1);
-}
-
-TEST(LogTest, ReadThirdOneOff) {
-  CheckInitialOffsetRecord(10008, 2);
-}
-
-TEST(LogTest, ReadThirdStart) {
-  CheckInitialOffsetRecord(20014, 2);
-}
-
-TEST(LogTest, ReadFourthOneOff) {
-  CheckInitialOffsetRecord(20015, 3);
-}
-
-TEST(LogTest, ReadFourthFirstBlockTrailer) {
-  CheckInitialOffsetRecord(log::kBlockSize - 4, 3);
-}
-
-TEST(LogTest, ReadFourthMiddleBlock) {
-  CheckInitialOffsetRecord(log::kBlockSize + 1, 3);
-}
-
-TEST(LogTest, ReadFourthLastBlock) {
-  CheckInitialOffsetRecord(2 * log::kBlockSize + 1, 3);
-}
-
-TEST(LogTest, ReadFourthStart) {
-  CheckInitialOffsetRecord(
-      2 * (kHeaderSize + 1000) + (2 * log::kBlockSize - 1000) + 3 * kHeaderSize,
-      3);
-}
-
-TEST(LogTest, ReadEnd) {
-  CheckOffsetPastEndReturnsNoRecords(0);
-}
-
-TEST(LogTest, ReadPastEnd) {
-  CheckOffsetPastEndReturnsNoRecords(5);
-}
-
-TEST(LogTest, ClearEofSingleBlock) {
-  Write("foo");
-  Write("bar");
-  ForceEOF(3 + kHeaderSize + 2);
-  ASSERT_EQ("foo", Read());
-  UnmarkEOF();
-  ASSERT_EQ("bar", Read());
-  ASSERT_TRUE(IsEOF());
-  ASSERT_EQ("EOF", Read());
-  Write("xxx");
-  UnmarkEOF();
-  ASSERT_EQ("xxx", Read());
-  ASSERT_TRUE(IsEOF());
-}
-
-TEST(LogTest, ClearEofMultiBlock) {
-  size_t num_full_blocks = 5;
-  size_t n = (kBlockSize - kHeaderSize) * num_full_blocks + 25;
-  Write(BigString("foo", n));
-  Write(BigString("bar", n));
-  ForceEOF(n + num_full_blocks * kHeaderSize + 10);
-  ASSERT_EQ(BigString("foo", n), Read());
-  ASSERT_TRUE(IsEOF());
-  UnmarkEOF();
-  ASSERT_EQ(BigString("bar", n), Read());
-  ASSERT_TRUE(IsEOF());
-  Write(BigString("xxx", n));
-  UnmarkEOF();
-  ASSERT_EQ(BigString("xxx", n), Read());
-  ASSERT_TRUE(IsEOF());
-}
-
-TEST(LogTest, ClearEofError) {
-  // If an error occurs during Read() in UnmarkEOF(), the records contained
-  // in the buffer should be returned on subsequent calls of ReadRecord()
-  // until no more full records are left, whereafter ReadRecord() should return
-  // false to indicate that it cannot read any further.
-
-  Write("foo");
-  Write("bar");
-  UnmarkEOF();
-  ASSERT_EQ("foo", Read());
-  ASSERT_TRUE(IsEOF());
-  Write("xxx");
-  ForceError(0);
-  UnmarkEOF();
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("EOF", Read());
-}
-
-TEST(LogTest, ClearEofError2) {
-  Write("foo");
-  Write("bar");
-  UnmarkEOF();
-  ASSERT_EQ("foo", Read());
-  Write("xxx");
-  ForceError(3);
-  UnmarkEOF();
-  ASSERT_EQ("bar", Read());
-  ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(3U, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("read error"));
-}
-
-}  // namespace log
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/log_writer.cc b/src/rocksdb/db/log_writer.cc
deleted file mode 100644
index df601a4..0000000
--- a/src/rocksdb/db/log_writer.cc
+++ /dev/null
@@ -1,108 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/log_writer.h"
-
-#include <stdint.h>
-#include "rocksdb/env.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-
-namespace rocksdb {
-namespace log {
-
-Writer::Writer(unique_ptr<WritableFile>&& dest)
-    : dest_(std::move(dest)),
-      block_offset_(0) {
-  for (int i = 0; i <= kMaxRecordType; i++) {
-    char t = static_cast<char>(i);
-    type_crc_[i] = crc32c::Value(&t, 1);
-  }
-}
-
-Writer::~Writer() {
-}
-
-Status Writer::AddRecord(const Slice& slice) {
-  const char* ptr = slice.data();
-  size_t left = slice.size();
-
-  // Fragment the record if necessary and emit it.  Note that if slice
-  // is empty, we still want to iterate once to emit a single
-  // zero-length record
-  Status s;
-  bool begin = true;
-  do {
-    const int leftover = kBlockSize - block_offset_;
-    assert(leftover >= 0);
-    if (leftover < kHeaderSize) {
-      // Switch to a new block
-      if (leftover > 0) {
-        // Fill the trailer (literal below relies on kHeaderSize being 7)
-        assert(kHeaderSize == 7);
-        dest_->Append(Slice("\x00\x00\x00\x00\x00\x00", leftover));
-      }
-      block_offset_ = 0;
-    }
-
-    // Invariant: we never leave < kHeaderSize bytes in a block.
-    assert(kBlockSize - block_offset_ - kHeaderSize >= 0);
-
-    const size_t avail = kBlockSize - block_offset_ - kHeaderSize;
-    const size_t fragment_length = (left < avail) ? left : avail;
-
-    RecordType type;
-    const bool end = (left == fragment_length);
-    if (begin && end) {
-      type = kFullType;
-    } else if (begin) {
-      type = kFirstType;
-    } else if (end) {
-      type = kLastType;
-    } else {
-      type = kMiddleType;
-    }
-
-    s = EmitPhysicalRecord(type, ptr, fragment_length);
-    ptr += fragment_length;
-    left -= fragment_length;
-    begin = false;
-  } while (s.ok() && left > 0);
-  return s;
-}
-
-Status Writer::EmitPhysicalRecord(RecordType t, const char* ptr, size_t n) {
-  assert(n <= 0xffff);  // Must fit in two bytes
-  assert(block_offset_ + kHeaderSize + n <= kBlockSize);
-
-  // Format the header
-  char buf[kHeaderSize];
-  buf[4] = static_cast<char>(n & 0xff);
-  buf[5] = static_cast<char>(n >> 8);
-  buf[6] = static_cast<char>(t);
-
-  // Compute the crc of the record type and the payload.
-  uint32_t crc = crc32c::Extend(type_crc_[t], ptr, n);
-  crc = crc32c::Mask(crc);                 // Adjust for storage
-  EncodeFixed32(buf, crc);
-
-  // Write the header and the payload
-  Status s = dest_->Append(Slice(buf, kHeaderSize));
-  if (s.ok()) {
-    s = dest_->Append(Slice(ptr, n));
-    if (s.ok()) {
-      s = dest_->Flush();
-    }
-  }
-  block_offset_ += kHeaderSize + n;
-  return s;
-}
-
-}  // namespace log
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/log_writer.h b/src/rocksdb/db/log_writer.h
deleted file mode 100644
index d7b7aff..0000000
--- a/src/rocksdb/db/log_writer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <memory>
-#include <stdint.h>
-#include "db/log_format.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-class WritableFile;
-
-using std::unique_ptr;
-
-namespace log {
-
-class Writer {
- public:
-  // Create a writer that will append data to "*dest".
-  // "*dest" must be initially empty.
-  // "*dest" must remain live while this Writer is in use.
-  explicit Writer(unique_ptr<WritableFile>&& dest);
-  ~Writer();
-
-  Status AddRecord(const Slice& slice);
-
-  WritableFile* file() { return dest_.get(); }
-  const WritableFile* file() const { return dest_.get(); }
-
- private:
-  unique_ptr<WritableFile> dest_;
-  int block_offset_;       // Current offset in block
-
-  // crc32c values for all supported record types.  These are
-  // pre-computed to reduce the overhead of computing the crc of the
-  // record type stored in the header.
-  uint32_t type_crc_[kMaxRecordType + 1];
-
-  Status EmitPhysicalRecord(RecordType type, const char* ptr, size_t length);
-
-  // No copying allowed
-  Writer(const Writer&);
-  void operator=(const Writer&);
-};
-
-}  // namespace log
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/memtable.cc b/src/rocksdb/db/memtable.cc
deleted file mode 100644
index f95ad3c..0000000
--- a/src/rocksdb/db/memtable.cc
+++ /dev/null
@@ -1,601 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/memtable.h"
-
-#include <memory>
-#include <algorithm>
-#include <limits>
-
-#include "db/dbformat.h"
-#include "db/merge_context.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/slice_transform.h"
-#include "util/arena.h"
-#include "util/coding.h"
-#include "util/murmurhash.h"
-#include "util/mutexlock.h"
-#include "util/perf_context_imp.h"
-#include "util/statistics.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-MemTable::MemTable(const InternalKeyComparator& cmp, const Options& options)
-    : comparator_(cmp),
-      refs_(0),
-      kArenaBlockSize(OptimizeBlockSize(options.arena_block_size)),
-      kWriteBufferSize(options.write_buffer_size),
-      arena_(options.arena_block_size),
-      table_(options.memtable_factory->CreateMemTableRep(
-          comparator_, &arena_, options.prefix_extractor.get())),
-      num_entries_(0),
-      flush_in_progress_(false),
-      flush_completed_(false),
-      file_number_(0),
-      first_seqno_(0),
-      mem_next_logfile_number_(0),
-      locks_(options.inplace_update_support ? options.inplace_update_num_locks
-                                            : 0),
-      prefix_extractor_(options.prefix_extractor.get()),
-      should_flush_(ShouldFlushNow()) {
-  // if should_flush_ == true without an entry inserted, something must have
-  // gone wrong already.
-  assert(!should_flush_);
-  if (prefix_extractor_ && options.memtable_prefix_bloom_bits > 0) {
-    prefix_bloom_.reset(new DynamicBloom(
-        options.memtable_prefix_bloom_bits, options.bloom_locality,
-        options.memtable_prefix_bloom_probes, nullptr,
-        options.memtable_prefix_bloom_huge_page_tlb_size));
-  }
-}
-
-MemTable::~MemTable() {
-  assert(refs_ == 0);
-}
-
-size_t MemTable::ApproximateMemoryUsage() {
-  size_t arena_usage = arena_.ApproximateMemoryUsage();
-  size_t table_usage = table_->ApproximateMemoryUsage();
-  // let MAX_USAGE =  std::numeric_limits<size_t>::max()
-  // then if arena_usage + total_usage >= MAX_USAGE, return MAX_USAGE.
-  // the following variation is to avoid numeric overflow.
-  if (arena_usage >= std::numeric_limits<size_t>::max() - table_usage) {
-    return std::numeric_limits<size_t>::max();
-  }
-  // otherwise, return the actual usage
-  return arena_usage + table_usage;
-}
-
-bool MemTable::ShouldFlushNow() const {
-  // In a lot of times, we cannot allocate arena blocks that exactly matches the
-  // buffer size. Thus we have to decide if we should over-allocate or
-  // under-allocate.
-  // This constant avariable can be interpreted as: if we still have more than
-  // "kAllowOverAllocationRatio * kArenaBlockSize" space left, we'd try to over
-  // allocate one more block.
-  const double kAllowOverAllocationRatio = 0.6;
-
-  // If arena still have room for new block allocation, we can safely say it
-  // shouldn't flush.
-  auto allocated_memory =
-      table_->ApproximateMemoryUsage() + arena_.MemoryAllocatedBytes();
-
-  // if we can still allocate one more block without exceeding the
-  // over-allocation ratio, then we should not flush.
-  if (allocated_memory + kArenaBlockSize <
-      kWriteBufferSize + kArenaBlockSize * kAllowOverAllocationRatio) {
-    return false;
-  }
-
-  // if user keeps adding entries that exceeds kWriteBufferSize, we need to
-  // flush earlier even though we still have much available memory left.
-  if (allocated_memory >
-      kWriteBufferSize + kArenaBlockSize * kAllowOverAllocationRatio) {
-    return true;
-  }
-
-  // In this code path, Arena has already allocated its "last block", which
-  // means the total allocatedmemory size is either:
-  //  (1) "moderately" over allocated the memory (no more than `0.6 * arena
-  // block size`. Or,
-  //  (2) the allocated memory is less than write buffer size, but we'll stop
-  // here since if we allocate a new arena block, we'll over allocate too much
-  // more (half of the arena block size) memory.
-  //
-  // In either case, to avoid over-allocate, the last block will stop allocation
-  // when its usage reaches a certain ratio, which we carefully choose "0.75
-  // full" as the stop condition because it addresses the following issue with
-  // great simplicity: What if the next inserted entry's size is
-  // bigger than AllocatedAndUnused()?
-  //
-  // The answer is: if the entry size is also bigger than 0.25 *
-  // kArenaBlockSize, a dedicated block will be allocated for it; otherwise
-  // arena will anyway skip the AllocatedAndUnused() and allocate a new, empty
-  // and regular block. In either case, we *overly* over-allocated.
-  //
-  // Therefore, setting the last block to be at most "0.75 full" avoids both
-  // cases.
-  //
-  // NOTE: the average percentage of waste space of this approach can be counted
-  // as: "arena block size * 0.25 / write buffer size". User who specify a small
-  // write buffer size and/or big arena block size may suffer.
-  return arena_.AllocatedAndUnused() < kArenaBlockSize / 4;
-}
-
-int MemTable::KeyComparator::operator()(const char* prefix_len_key1,
-                                        const char* prefix_len_key2) const {
-  // Internal keys are encoded as length-prefixed strings.
-  Slice k1 = GetLengthPrefixedSlice(prefix_len_key1);
-  Slice k2 = GetLengthPrefixedSlice(prefix_len_key2);
-  return comparator.Compare(k1, k2);
-}
-
-int MemTable::KeyComparator::operator()(const char* prefix_len_key,
-                                        const Slice& key)
-    const {
-  // Internal keys are encoded as length-prefixed strings.
-  Slice a = GetLengthPrefixedSlice(prefix_len_key);
-  return comparator.Compare(a, key);
-}
-
-Slice MemTableRep::UserKey(const char* key) const {
-  Slice slice = GetLengthPrefixedSlice(key);
-  return Slice(slice.data(), slice.size() - 8);
-}
-
-KeyHandle MemTableRep::Allocate(const size_t len, char** buf) {
-  *buf = arena_->Allocate(len);
-  return static_cast<KeyHandle>(*buf);
-}
-
-// Encode a suitable internal key target for "target" and return it.
-// Uses *scratch as scratch space, and the returned pointer will point
-// into this scratch space.
-const char* EncodeKey(std::string* scratch, const Slice& target) {
-  scratch->clear();
-  PutVarint32(scratch, target.size());
-  scratch->append(target.data(), target.size());
-  return scratch->data();
-}
-
-class MemTableIterator: public Iterator {
- public:
-  MemTableIterator(const MemTable& mem, const ReadOptions& options,
-                   bool enforce_total_order)
-      : bloom_(nullptr),
-        prefix_extractor_(mem.prefix_extractor_),
-        valid_(false) {
-    if (prefix_extractor_ != nullptr && !enforce_total_order) {
-      bloom_ = mem.prefix_bloom_.get();
-      iter_.reset(mem.table_->GetDynamicPrefixIterator());
-    } else {
-      iter_.reset(mem.table_->GetIterator());
-    }
-  }
-
-  virtual bool Valid() const { return valid_; }
-  virtual void Seek(const Slice& k) {
-    if (bloom_ != nullptr &&
-        !bloom_->MayContain(prefix_extractor_->Transform(ExtractUserKey(k)))) {
-      valid_ = false;
-      return;
-    }
-    iter_->Seek(k, nullptr);
-    valid_ = iter_->Valid();
-  }
-  virtual void SeekToFirst() {
-    iter_->SeekToFirst();
-    valid_ = iter_->Valid();
-  }
-  virtual void SeekToLast() {
-    iter_->SeekToLast();
-    valid_ = iter_->Valid();
-  }
-  virtual void Next() {
-    assert(Valid());
-    iter_->Next();
-    valid_ = iter_->Valid();
-  }
-  virtual void Prev() {
-    assert(Valid());
-    iter_->Prev();
-    valid_ = iter_->Valid();
-  }
-  virtual Slice key() const {
-    assert(Valid());
-    return GetLengthPrefixedSlice(iter_->key());
-  }
-  virtual Slice value() const {
-    assert(Valid());
-    Slice key_slice = GetLengthPrefixedSlice(iter_->key());
-    return GetLengthPrefixedSlice(key_slice.data() + key_slice.size());
-  }
-
-  virtual Status status() const { return Status::OK(); }
-
- private:
-  DynamicBloom* bloom_;
-  const SliceTransform* const prefix_extractor_;
-  std::unique_ptr<MemTableRep::Iterator> iter_;
-  bool valid_;
-
-  // No copying allowed
-  MemTableIterator(const MemTableIterator&);
-  void operator=(const MemTableIterator&);
-};
-
-Iterator* MemTable::NewIterator(const ReadOptions& options,
-    bool enforce_total_order) {
-  return new MemTableIterator(*this, options, enforce_total_order);
-}
-
-port::RWMutex* MemTable::GetLock(const Slice& key) {
-  static murmur_hash hash;
-  return &locks_[hash(key) % locks_.size()];
-}
-
-void MemTable::Add(SequenceNumber s, ValueType type,
-                   const Slice& key, /* user key */
-                   const Slice& value) {
-  // Format of an entry is concatenation of:
-  //  key_size     : varint32 of internal_key.size()
-  //  key bytes    : char[internal_key.size()]
-  //  value_size   : varint32 of value.size()
-  //  value bytes  : char[value.size()]
-  size_t key_size = key.size();
-  size_t val_size = value.size();
-  size_t internal_key_size = key_size + 8;
-  const size_t encoded_len =
-      VarintLength(internal_key_size) + internal_key_size +
-      VarintLength(val_size) + val_size;
-  char* buf = nullptr;
-  KeyHandle handle = table_->Allocate(encoded_len, &buf);
-  assert(buf != nullptr);
-  char* p = EncodeVarint32(buf, internal_key_size);
-  memcpy(p, key.data(), key_size);
-  p += key_size;
-  EncodeFixed64(p, (s << 8) | type);
-  p += 8;
-  p = EncodeVarint32(p, val_size);
-  memcpy(p, value.data(), val_size);
-  assert((unsigned)(p + val_size - buf) == (unsigned)encoded_len);
-  table_->Insert(handle);
-  num_entries_++;
-
-  if (prefix_bloom_) {
-    assert(prefix_extractor_);
-    prefix_bloom_->Add(prefix_extractor_->Transform(key));
-  }
-
-  // The first sequence number inserted into the memtable
-  assert(first_seqno_ == 0 || s > first_seqno_);
-  if (first_seqno_ == 0) {
-    first_seqno_ = s;
-  }
-
-  should_flush_ = ShouldFlushNow();
-}
-
-// Callback from MemTable::Get()
-namespace {
-
-struct Saver {
-  Status* status;
-  const LookupKey* key;
-  bool* found_final_value;  // Is value set correctly? Used by KeyMayExist
-  bool* merge_in_progress;
-  std::string* value;
-  const MergeOperator* merge_operator;
-  // the merge operations encountered;
-  MergeContext* merge_context;
-  MemTable* mem;
-  Logger* logger;
-  Statistics* statistics;
-  bool inplace_update_support;
-};
-}  // namespace
-
-static bool SaveValue(void* arg, const char* entry) {
-  Saver* s = reinterpret_cast<Saver*>(arg);
-  MergeContext* merge_context = s->merge_context;
-  const MergeOperator* merge_operator = s->merge_operator;
-
-  assert(s != nullptr && merge_context != nullptr);
-
-  // entry format is:
-  //    klength  varint32
-  //    userkey  char[klength-8]
-  //    tag      uint64
-  //    vlength  varint32
-  //    value    char[vlength]
-  // Check that it belongs to same user key.  We do not check the
-  // sequence number since the Seek() call above should have skipped
-  // all entries with overly large sequence numbers.
-  uint32_t key_length;
-  const char* key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length);
-  if (s->mem->GetInternalKeyComparator().user_comparator()->Compare(
-          Slice(key_ptr, key_length - 8), s->key->user_key()) == 0) {
-    // Correct user key
-    const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8);
-    switch (static_cast<ValueType>(tag & 0xff)) {
-      case kTypeValue: {
-        if (s->inplace_update_support) {
-          s->mem->GetLock(s->key->user_key())->ReadLock();
-        }
-        Slice v = GetLengthPrefixedSlice(key_ptr + key_length);
-        *(s->status) = Status::OK();
-        if (*(s->merge_in_progress)) {
-          assert(merge_operator);
-          if (!merge_operator->FullMerge(s->key->user_key(), &v,
-                                         merge_context->GetOperands(), s->value,
-                                         s->logger)) {
-            RecordTick(s->statistics, NUMBER_MERGE_FAILURES);
-            *(s->status) =
-                Status::Corruption("Error: Could not perform merge.");
-          }
-        } else {
-          s->value->assign(v.data(), v.size());
-        }
-        if (s->inplace_update_support) {
-          s->mem->GetLock(s->key->user_key())->Unlock();
-        }
-        *(s->found_final_value) = true;
-        return false;
-      }
-      case kTypeDeletion: {
-        if (*(s->merge_in_progress)) {
-          assert(merge_operator);
-          *(s->status) = Status::OK();
-          if (!merge_operator->FullMerge(s->key->user_key(), nullptr,
-                                         merge_context->GetOperands(), s->value,
-                                         s->logger)) {
-            RecordTick(s->statistics, NUMBER_MERGE_FAILURES);
-            *(s->status) =
-                Status::Corruption("Error: Could not perform merge.");
-          }
-        } else {
-          *(s->status) = Status::NotFound();
-        }
-        *(s->found_final_value) = true;
-        return false;
-      }
-      case kTypeMerge: {
-        std::string merge_result;  // temporary area for merge results later
-        Slice v = GetLengthPrefixedSlice(key_ptr + key_length);
-        *(s->merge_in_progress) = true;
-        merge_context->PushOperand(v);
-        return true;
-      }
-      default:
-        assert(false);
-        return true;
-    }
-  }
-
-  // s->state could be Corrupt, merge or notfound
-  return false;
-}
-
-bool MemTable::Get(const LookupKey& key, std::string* value, Status* s,
-                   MergeContext& merge_context, const Options& options) {
-  PERF_TIMER_AUTO(get_from_memtable_time);
-
-  Slice user_key = key.user_key();
-  bool found_final_value = false;
-  bool merge_in_progress = s->IsMergeInProgress();
-
-  if (prefix_bloom_ &&
-      !prefix_bloom_->MayContain(prefix_extractor_->Transform(user_key))) {
-    // iter is null if prefix bloom says the key does not exist
-  } else {
-    Saver saver;
-    saver.status = s;
-    saver.found_final_value = &found_final_value;
-    saver.merge_in_progress = &merge_in_progress;
-    saver.key = &key;
-    saver.value = value;
-    saver.status = s;
-    saver.mem = this;
-    saver.merge_context = &merge_context;
-    saver.merge_operator = options.merge_operator.get();
-    saver.logger = options.info_log.get();
-    saver.inplace_update_support = options.inplace_update_support;
-    saver.statistics = options.statistics.get();
-    table_->Get(key, &saver, SaveValue);
-  }
-
-  // No change to value, since we have not yet found a Put/Delete
-  if (!found_final_value && merge_in_progress) {
-    *s = Status::MergeInProgress("");
-  }
-  PERF_TIMER_STOP(get_from_memtable_time);
-  PERF_COUNTER_ADD(get_from_memtable_count, 1);
-  return found_final_value;
-}
-
-void MemTable::Update(SequenceNumber seq,
-                      const Slice& key,
-                      const Slice& value) {
-  LookupKey lkey(key, seq);
-  Slice mem_key = lkey.memtable_key();
-
-  std::unique_ptr<MemTableRep::Iterator> iter(
-    table_->GetIterator(lkey.user_key()));
-  iter->Seek(lkey.internal_key(), mem_key.data());
-
-  if (iter->Valid()) {
-    // entry format is:
-    //    key_length  varint32
-    //    userkey  char[klength-8]
-    //    tag      uint64
-    //    vlength  varint32
-    //    value    char[vlength]
-    // Check that it belongs to same user key.  We do not check the
-    // sequence number since the Seek() call above should have skipped
-    // all entries with overly large sequence numbers.
-    const char* entry = iter->key();
-    uint32_t key_length = 0;
-    const char* key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length);
-    if (comparator_.comparator.user_comparator()->Compare(
-        Slice(key_ptr, key_length - 8), lkey.user_key()) == 0) {
-      // Correct user key
-      const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8);
-      switch (static_cast<ValueType>(tag & 0xff)) {
-        case kTypeValue: {
-          Slice prev_value = GetLengthPrefixedSlice(key_ptr + key_length);
-          uint32_t prev_size = prev_value.size();
-          uint32_t new_size = value.size();
-
-          // Update value, if new value size  <= previous value size
-          if (new_size <= prev_size ) {
-            char* p = EncodeVarint32(const_cast<char*>(key_ptr) + key_length,
-                                     new_size);
-            WriteLock wl(GetLock(lkey.user_key()));
-            memcpy(p, value.data(), value.size());
-            assert((unsigned)((p + value.size()) - entry) ==
-                   (unsigned)(VarintLength(key_length) + key_length +
-                              VarintLength(value.size()) + value.size()));
-            return;
-          }
-        }
-        default:
-          // If the latest value is kTypeDeletion, kTypeMerge or kTypeLogData
-          // we don't have enough space for update inplace
-            Add(seq, kTypeValue, key, value);
-            return;
-      }
-    }
-  }
-
-  // key doesn't exist
-  Add(seq, kTypeValue, key, value);
-}
-
-bool MemTable::UpdateCallback(SequenceNumber seq,
-                              const Slice& key,
-                              const Slice& delta,
-                              const Options& options) {
-  LookupKey lkey(key, seq);
-  Slice memkey = lkey.memtable_key();
-
-  std::unique_ptr<MemTableRep::Iterator> iter(
-    table_->GetIterator(lkey.user_key()));
-  iter->Seek(lkey.internal_key(), memkey.data());
-
-  if (iter->Valid()) {
-    // entry format is:
-    //    key_length  varint32
-    //    userkey  char[klength-8]
-    //    tag      uint64
-    //    vlength  varint32
-    //    value    char[vlength]
-    // Check that it belongs to same user key.  We do not check the
-    // sequence number since the Seek() call above should have skipped
-    // all entries with overly large sequence numbers.
-    const char* entry = iter->key();
-    uint32_t key_length = 0;
-    const char* key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length);
-    if (comparator_.comparator.user_comparator()->Compare(
-        Slice(key_ptr, key_length - 8), lkey.user_key()) == 0) {
-      // Correct user key
-      const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8);
-      switch (static_cast<ValueType>(tag & 0xff)) {
-        case kTypeValue: {
-          Slice prev_value = GetLengthPrefixedSlice(key_ptr + key_length);
-          uint32_t  prev_size = prev_value.size();
-
-          char* prev_buffer = const_cast<char*>(prev_value.data());
-          uint32_t  new_prev_size = prev_size;
-
-          std::string str_value;
-          WriteLock wl(GetLock(lkey.user_key()));
-          auto status = options.inplace_callback(prev_buffer, &new_prev_size,
-                                                    delta, &str_value);
-          if (status == UpdateStatus::UPDATED_INPLACE) {
-            // Value already updated by callback.
-            assert(new_prev_size <= prev_size);
-            if (new_prev_size < prev_size) {
-              // overwrite the new prev_size
-              char* p = EncodeVarint32(const_cast<char*>(key_ptr) + key_length,
-                                       new_prev_size);
-              if (VarintLength(new_prev_size) < VarintLength(prev_size)) {
-                // shift the value buffer as well.
-                memcpy(p, prev_buffer, new_prev_size);
-              }
-            }
-            RecordTick(options.statistics.get(), NUMBER_KEYS_UPDATED);
-            should_flush_ = ShouldFlushNow();
-            return true;
-          } else if (status == UpdateStatus::UPDATED) {
-            Add(seq, kTypeValue, key, Slice(str_value));
-            RecordTick(options.statistics.get(), NUMBER_KEYS_WRITTEN);
-            should_flush_ = ShouldFlushNow();
-            return true;
-          } else if (status == UpdateStatus::UPDATE_FAILED) {
-            // No action required. Return.
-            should_flush_ = ShouldFlushNow();
-            return true;
-          }
-        }
-        default:
-          break;
-      }
-    }
-  }
-  // If the latest value is not kTypeValue
-  // or key doesn't exist
-  return false;
-}
-
-size_t MemTable::CountSuccessiveMergeEntries(const LookupKey& key) {
-  Slice memkey = key.memtable_key();
-
-  // A total ordered iterator is costly for some memtablerep (prefix aware
-  // reps). By passing in the user key, we allow efficient iterator creation.
-  // The iterator only needs to be ordered within the same user key.
-  std::unique_ptr<MemTableRep::Iterator> iter(
-      table_->GetIterator(key.user_key()));
-  iter->Seek(key.internal_key(), memkey.data());
-
-  size_t num_successive_merges = 0;
-
-  for (; iter->Valid(); iter->Next()) {
-    const char* entry = iter->key();
-    uint32_t key_length = 0;
-    const char* iter_key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length);
-    if (comparator_.comparator.user_comparator()->Compare(
-            Slice(iter_key_ptr, key_length - 8), key.user_key()) != 0) {
-      break;
-    }
-
-    const uint64_t tag = DecodeFixed64(iter_key_ptr + key_length - 8);
-    if (static_cast<ValueType>(tag & 0xff) != kTypeMerge) {
-      break;
-    }
-
-    ++num_successive_merges;
-  }
-
-  return num_successive_merges;
-}
-
-void MemTableRep::Get(const LookupKey& k, void* callback_args,
-                      bool (*callback_func)(void* arg, const char* entry)) {
-  auto iter = GetIterator(k.user_key());
-  for (iter->Seek(k.internal_key(), k.memtable_key().data());
-       iter->Valid() && callback_func(callback_args, iter->key());
-       iter->Next()) {
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/memtable.h b/src/rocksdb/db/memtable.h
deleted file mode 100644
index 7e9af35..0000000
--- a/src/rocksdb/db/memtable.h
+++ /dev/null
@@ -1,217 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <string>
-#include <memory>
-#include <deque>
-#include "db/dbformat.h"
-#include "db/skiplist.h"
-#include "db/version_edit.h"
-#include "rocksdb/db.h"
-#include "rocksdb/memtablerep.h"
-#include "util/arena.h"
-#include "util/dynamic_bloom.h"
-
-namespace rocksdb {
-
-class Mutex;
-class MemTableIterator;
-class MergeContext;
-
-class MemTable {
- public:
-  struct KeyComparator : public MemTableRep::KeyComparator {
-    const InternalKeyComparator comparator;
-    explicit KeyComparator(const InternalKeyComparator& c) : comparator(c) { }
-    virtual int operator()(const char* prefix_len_key1,
-                           const char* prefix_len_key2) const;
-    virtual int operator()(const char* prefix_len_key,
-                           const Slice& key) const override;
-  };
-
-  // MemTables are reference counted.  The initial reference count
-  // is zero and the caller must call Ref() at least once.
-  explicit MemTable(const InternalKeyComparator& comparator,
-                    const Options& options);
-
-  ~MemTable();
-
-  // Increase reference count.
-  void Ref() { ++refs_; }
-
-  // Drop reference count.
-  // If the refcount goes to zero return this memtable, otherwise return null
-  MemTable* Unref() {
-    --refs_;
-    assert(refs_ >= 0);
-    if (refs_ <= 0) {
-      return this;
-    }
-    return nullptr;
-  }
-
-  // Returns an estimate of the number of bytes of data in use by this
-  // data structure.
-  //
-  // REQUIRES: external synchronization to prevent simultaneous
-  // operations on the same MemTable.
-  size_t ApproximateMemoryUsage();
-
-  // This method heuristically determines if the memtable should continue to
-  // host more data.
-  bool ShouldFlush() const { return should_flush_; }
-
-  // Return an iterator that yields the contents of the memtable.
-  //
-  // The caller must ensure that the underlying MemTable remains live
-  // while the returned iterator is live.  The keys returned by this
-  // iterator are internal keys encoded by AppendInternalKey in the
-  // db/dbformat.{h,cc} module.
-  //
-  // By default, it returns an iterator for prefix seek if prefix_extractor
-  // is configured in Options.
-  Iterator* NewIterator(const ReadOptions& options,
-                        bool enforce_total_order = false);
-
-  // Add an entry into memtable that maps key to value at the
-  // specified sequence number and with the specified type.
-  // Typically value will be empty if type==kTypeDeletion.
-  void Add(SequenceNumber seq, ValueType type,
-           const Slice& key,
-           const Slice& value);
-
-  // If memtable contains a value for key, store it in *value and return true.
-  // If memtable contains a deletion for key, store a NotFound() error
-  // in *status and return true.
-  // If memtable contains Merge operation as the most recent entry for a key,
-  //   and the merge process does not stop (not reaching a value or delete),
-  //   prepend the current merge operand to *operands.
-  //   store MergeInProgress in s, and return false.
-  // Else, return false.
-  bool Get(const LookupKey& key, std::string* value, Status* s,
-           MergeContext& merge_context, const Options& options);
-
-  // Attempts to update the new_value inplace, else does normal Add
-  // Pseudocode
-  //   if key exists in current memtable && prev_value is of type kTypeValue
-  //     if new sizeof(new_value) <= sizeof(prev_value)
-  //       update inplace
-  //     else add(key, new_value)
-  //   else add(key, new_value)
-  void Update(SequenceNumber seq,
-              const Slice& key,
-              const Slice& value);
-
-  // If prev_value for key exits, attempts to update it inplace.
-  // else returns false
-  // Pseudocode
-  //   if key exists in current memtable && prev_value is of type kTypeValue
-  //     new_value = delta(prev_value)
-  //     if sizeof(new_value) <= sizeof(prev_value)
-  //       update inplace
-  //     else add(key, new_value)
-  //   else return false
-  bool UpdateCallback(SequenceNumber seq,
-                      const Slice& key,
-                      const Slice& delta,
-                      const Options& options);
-
-  // Returns the number of successive merge entries starting from the newest
-  // entry for the key up to the last non-merge entry or last entry for the
-  // key in the memtable.
-  size_t CountSuccessiveMergeEntries(const LookupKey& key);
-
-  // Get total number of entries in the mem table.
-  uint64_t GetNumEntries() const { return num_entries_; }
-
-  // Returns the edits area that is needed for flushing the memtable
-  VersionEdit* GetEdits() { return &edit_; }
-
-  // Returns the sequence number of the first element that was inserted
-  // into the memtable
-  SequenceNumber GetFirstSequenceNumber() { return first_seqno_; }
-
-  // Returns the next active logfile number when this memtable is about to
-  // be flushed to storage
-  uint64_t GetNextLogNumber() { return mem_next_logfile_number_; }
-
-  // Sets the next active logfile number when this memtable is about to
-  // be flushed to storage
-  void SetNextLogNumber(uint64_t num) { mem_next_logfile_number_ = num; }
-
-  // Notify the underlying storage that no more items will be added
-  void MarkImmutable() { table_->MarkReadOnly(); }
-
-  // return true if the current MemTableRep supports merge operator.
-  bool IsMergeOperatorSupported() const {
-    return table_->IsMergeOperatorSupported();
-  }
-
-  // return true if the current MemTableRep supports snapshots.
-  bool IsSnapshotSupported() const { return table_->IsSnapshotSupported(); }
-
-  // Get the lock associated for the key
-  port::RWMutex* GetLock(const Slice& key);
-
-  const InternalKeyComparator& GetInternalKeyComparator() const {
-    return comparator_.comparator;
-  }
-
-  const Arena& TEST_GetArena() const { return arena_; }
-
- private:
-  // Dynamically check if we can add more incoming entries.
-  bool ShouldFlushNow() const;
-
-  friend class MemTableIterator;
-  friend class MemTableBackwardIterator;
-  friend class MemTableList;
-
-  KeyComparator comparator_;
-  int refs_;
-  const size_t kArenaBlockSize;
-  const size_t kWriteBufferSize;
-  Arena arena_;
-  unique_ptr<MemTableRep> table_;
-
-  uint64_t num_entries_;
-
-  // These are used to manage memtable flushes to storage
-  bool flush_in_progress_; // started the flush
-  bool flush_completed_;   // finished the flush
-  uint64_t file_number_;    // filled up after flush is complete
-
-  // The updates to be applied to the transaction log when this
-  // memtable is flushed to storage.
-  VersionEdit edit_;
-
-  // The sequence number of the kv that was inserted first
-  SequenceNumber first_seqno_;
-
-  // The log files earlier than this number can be deleted.
-  uint64_t mem_next_logfile_number_;
-
-  // rw locks for inplace updates
-  std::vector<port::RWMutex> locks_;
-
-  // No copying allowed
-  MemTable(const MemTable&);
-  void operator=(const MemTable&);
-
-  const SliceTransform* const prefix_extractor_;
-  std::unique_ptr<DynamicBloom> prefix_bloom_;
-
-  // a flag indicating if a memtable has met the criteria to flush
-  bool should_flush_;
-};
-
-extern const char* EncodeKey(std::string* scratch, const Slice& target);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/memtable_list.cc b/src/rocksdb/db/memtable_list.cc
deleted file mode 100644
index 2354219..0000000
--- a/src/rocksdb/db/memtable_list.cc
+++ /dev/null
@@ -1,277 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "db/memtable_list.h"
-
-#include <string>
-#include "rocksdb/db.h"
-#include "db/memtable.h"
-#include "db/version_set.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "util/coding.h"
-#include "util/log_buffer.h"
-
-namespace rocksdb {
-
-class InternalKeyComparator;
-class Mutex;
-class VersionSet;
-
-MemTableListVersion::MemTableListVersion(MemTableListVersion* old) {
-  if (old != nullptr) {
-    memlist_ = old->memlist_;
-    size_ = old->size_;
-    for (auto& m : memlist_) {
-      m->Ref();
-    }
-  }
-}
-
-void MemTableListVersion::Ref() { ++refs_; }
-
-void MemTableListVersion::Unref(autovector<MemTable*>* to_delete) {
-  assert(refs_ >= 1);
-  --refs_;
-  if (refs_ == 0) {
-    // if to_delete is equal to nullptr it means we're confident
-    // that refs_ will not be zero
-    assert(to_delete != nullptr);
-    for (const auto& m : memlist_) {
-      MemTable* x = m->Unref();
-      if (x != nullptr) {
-        to_delete->push_back(x);
-      }
-    }
-    delete this;
-  }
-}
-
-int MemTableListVersion::size() const { return size_; }
-
-// Returns the total number of memtables in the list
-int MemTableList::size() const {
-  assert(num_flush_not_started_ <= current_->size_);
-  return current_->size_;
-}
-
-// Search all the memtables starting from the most recent one.
-// Return the most recent value found, if any.
-// Operands stores the list of merge operations to apply, so far.
-bool MemTableListVersion::Get(const LookupKey& key, std::string* value,
-                              Status* s, MergeContext& merge_context,
-                              const Options& options) {
-  for (auto& memtable : memlist_) {
-    if (memtable->Get(key, value, s, merge_context, options)) {
-      return true;
-    }
-  }
-  return false;
-}
-
-void MemTableListVersion::AddIterators(const ReadOptions& options,
-                                       std::vector<Iterator*>* iterator_list) {
-  for (auto& m : memlist_) {
-    iterator_list->push_back(m->NewIterator(options));
-  }
-}
-
-uint64_t MemTableListVersion::GetTotalNumEntries() const {
-  uint64_t total_num = 0;
-  for (auto& m : memlist_) {
-    total_num += m->GetNumEntries();
-  }
-  return total_num;
-}
-
-// caller is responsible for referencing m
-void MemTableListVersion::Add(MemTable* m) {
-  assert(refs_ == 1);  // only when refs_ == 1 is MemTableListVersion mutable
-  memlist_.push_front(m);
-  ++size_;
-}
-
-// caller is responsible for unreferencing m
-void MemTableListVersion::Remove(MemTable* m) {
-  assert(refs_ == 1);  // only when refs_ == 1 is MemTableListVersion mutable
-  memlist_.remove(m);
-  --size_;
-}
-
-// Returns true if there is at least one memtable on which flush has
-// not yet started.
-bool MemTableList::IsFlushPending() const {
-  if ((flush_requested_ && num_flush_not_started_ >= 1) ||
-      (num_flush_not_started_ >= min_write_buffer_number_to_merge_)) {
-    assert(imm_flush_needed.NoBarrier_Load() != nullptr);
-    return true;
-  }
-  return false;
-}
-
-// Returns the memtables that need to be flushed.
-void MemTableList::PickMemtablesToFlush(autovector<MemTable*>* ret) {
-  const auto& memlist = current_->memlist_;
-  for (auto it = memlist.rbegin(); it != memlist.rend(); ++it) {
-    MemTable* m = *it;
-    if (!m->flush_in_progress_) {
-      assert(!m->flush_completed_);
-      num_flush_not_started_--;
-      if (num_flush_not_started_ == 0) {
-        imm_flush_needed.Release_Store(nullptr);
-      }
-      m->flush_in_progress_ = true;  // flushing will start very soon
-      ret->push_back(m);
-    }
-  }
-  flush_requested_ = false;  // start-flush request is complete
-}
-
-void MemTableList::RollbackMemtableFlush(const autovector<MemTable*>& mems,
-                                         uint64_t file_number,
-                                         std::set<uint64_t>* pending_outputs) {
-  assert(!mems.empty());
-
-  // If the flush was not successful, then just reset state.
-  // Maybe a suceeding attempt to flush will be successful.
-  for (MemTable* m : mems) {
-    assert(m->flush_in_progress_);
-    assert(m->file_number_ == 0);
-
-    m->flush_in_progress_ = false;
-    m->flush_completed_ = false;
-    m->edit_.Clear();
-    num_flush_not_started_++;
-  }
-  pending_outputs->erase(file_number);
-  imm_flush_needed.Release_Store(reinterpret_cast<void *>(1));
-}
-
-// Record a successful flush in the manifest file
-Status MemTableList::InstallMemtableFlushResults(
-    ColumnFamilyData* cfd, const autovector<MemTable*>& mems, VersionSet* vset,
-    port::Mutex* mu, Logger* info_log, uint64_t file_number,
-    std::set<uint64_t>& pending_outputs, autovector<MemTable*>* to_delete,
-    Directory* db_directory, LogBuffer* log_buffer) {
-  mu->AssertHeld();
-
-  // flush was sucessful
-  for (size_t i = 0; i < mems.size(); ++i) {
-    // All the edits are associated with the first memtable of this batch.
-    assert(i == 0 || mems[i]->GetEdits()->NumEntries() == 0);
-
-    mems[i]->flush_completed_ = true;
-    mems[i]->file_number_ = file_number;
-  }
-
-  // if some other thread is already commiting, then return
-  Status s;
-  if (commit_in_progress_) {
-    return s;
-  }
-
-  // Only a single thread can be executing this piece of code
-  commit_in_progress_ = true;
-
-  // scan all memtables from the earliest, and commit those
-  // (in that order) that have finished flushing. Memetables
-  // are always committed in the order that they were created.
-  while (!current_->memlist_.empty() && s.ok()) {
-    MemTable* m = current_->memlist_.back();  // get the last element
-    if (!m->flush_completed_) {
-      break;
-    }
-
-    LogToBuffer(log_buffer, "[%s] Level-0 commit table #%lu started",
-                cfd->GetName().c_str(), (unsigned long)m->file_number_);
-
-    // this can release and reacquire the mutex.
-    s = vset->LogAndApply(cfd, &m->edit_, mu, db_directory);
-
-    // we will be changing the version in the next code path,
-    // so we better create a new one, since versions are immutable
-    InstallNewVersion();
-
-    // All the later memtables that have the same filenum
-    // are part of the same batch. They can be committed now.
-    uint64_t mem_id = 1;  // how many memtables has been flushed.
-    do {
-      if (s.ok()) { // commit new state
-        LogToBuffer(log_buffer,
-                    "[%s] Level-0 commit table #%lu: memtable #%lu done",
-                    cfd->GetName().c_str(), (unsigned long)m->file_number_,
-                    (unsigned long)mem_id);
-        current_->Remove(m);
-        assert(m->file_number_ > 0);
-
-        // pending_outputs can be cleared only after the newly created file
-        // has been written to a committed version so that other concurrently
-        // executing compaction threads do not mistakenly assume that this
-        // file is not live.
-        pending_outputs.erase(m->file_number_);
-        if (m->Unref() != nullptr) {
-          to_delete->push_back(m);
-        }
-      } else {
-        //commit failed. setup state so that we can flush again.
-        Log(info_log,
-            "Level-0 commit table #%lu: memtable #%lu failed",
-            (unsigned long)m->file_number_,
-            (unsigned long)mem_id);
-        m->flush_completed_ = false;
-        m->flush_in_progress_ = false;
-        m->edit_.Clear();
-        num_flush_not_started_++;
-        pending_outputs.erase(m->file_number_);
-        m->file_number_ = 0;
-        imm_flush_needed.Release_Store((void *)1);
-      }
-      ++mem_id;
-    } while (!current_->memlist_.empty() && (m = current_->memlist_.back()) &&
-             m->file_number_ == file_number);
-  }
-  commit_in_progress_ = false;
-  return s;
-}
-
-// New memtables are inserted at the front of the list.
-void MemTableList::Add(MemTable* m) {
-  assert(current_->size_ >= num_flush_not_started_);
-  InstallNewVersion();
-  // this method is used to move mutable memtable into an immutable list.
-  // since mutable memtable is already refcounted by the DBImpl,
-  // and when moving to the imutable list we don't unref it,
-  // we don't have to ref the memtable here. we just take over the
-  // reference from the DBImpl.
-  current_->Add(m);
-  m->MarkImmutable();
-  num_flush_not_started_++;
-  if (num_flush_not_started_ == 1) {
-    imm_flush_needed.Release_Store((void *)1);
-  }
-}
-
-// Returns an estimate of the number of bytes of data in use.
-size_t MemTableList::ApproximateMemoryUsage() {
-  size_t size = 0;
-  for (auto& memtable : current_->memlist_) {
-    size += memtable->ApproximateMemoryUsage();
-  }
-  return size;
-}
-
-void MemTableList::InstallNewVersion() {
-  if (current_->refs_ == 1) {
-    // we're the only one using the version, just keep using it
-  } else {
-    // somebody else holds the current version, we need to create new one
-    MemTableListVersion* version = current_;
-    current_ = new MemTableListVersion(current_);
-    current_->Ref();
-    version->Unref();
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/memtable_list.h b/src/rocksdb/db/memtable_list.h
deleted file mode 100644
index d85380b..0000000
--- a/src/rocksdb/db/memtable_list.h
+++ /dev/null
@@ -1,152 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-
-#include <string>
-#include <list>
-#include <vector>
-#include <set>
-#include <deque>
-#include "rocksdb/db.h"
-#include "rocksdb/options.h"
-#include "rocksdb/iterator.h"
-
-#include "db/dbformat.h"
-#include "db/skiplist.h"
-#include "db/memtable.h"
-#include "rocksdb/db.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-#include "util/autovector.h"
-#include "util/log_buffer.h"
-
-namespace rocksdb {
-
-class ColumnFamilyData;
-class InternalKeyComparator;
-class Mutex;
-
-// keeps a list of immutable memtables in a vector. the list is immutable
-// if refcount is bigger than one. It is used as a state for Get() and
-// Iterator code paths
-class MemTableListVersion {
- public:
-  explicit MemTableListVersion(MemTableListVersion* old = nullptr);
-
-  void Ref();
-  void Unref(autovector<MemTable*>* to_delete = nullptr);
-
-  int size() const;
-
-  // Search all the memtables starting from the most recent one.
-  // Return the most recent value found, if any.
-  bool Get(const LookupKey& key, std::string* value, Status* s,
-           MergeContext& merge_context, const Options& options);
-
-  void AddIterators(const ReadOptions& options,
-                    std::vector<Iterator*>* iterator_list);
-
-  uint64_t GetTotalNumEntries() const;
-
- private:
-  // REQUIRE: m is mutable memtable
-  void Add(MemTable* m);
-  // REQUIRE: m is mutable memtable
-  void Remove(MemTable* m);
-
-  friend class MemTableList;
-  std::list<MemTable*> memlist_;
-  int size_ = 0;
-  int refs_ = 0;
-};
-
-// This class stores references to all the immutable memtables.
-// The memtables are flushed to L0 as soon as possible and in
-// any order. If there are more than one immutable memtable, their
-// flushes can occur concurrently.  However, they are 'committed'
-// to the manifest in FIFO order to maintain correctness and
-// recoverability from a crash.
-class MemTableList {
- public:
-  // A list of memtables.
-  explicit MemTableList(int min_write_buffer_number_to_merge)
-      : min_write_buffer_number_to_merge_(min_write_buffer_number_to_merge),
-        current_(new MemTableListVersion()),
-        num_flush_not_started_(0),
-        commit_in_progress_(false),
-        flush_requested_(false) {
-    imm_flush_needed.Release_Store(nullptr);
-    current_->Ref();
-  }
-  ~MemTableList() {}
-
-  MemTableListVersion* current() { return current_; }
-
-  // so that background threads can detect non-nullptr pointer to
-  // determine whether there is anything more to start flushing.
-  port::AtomicPointer imm_flush_needed;
-
-  // Returns the total number of memtables in the list
-  int size() const;
-
-  // Returns true if there is at least one memtable on which flush has
-  // not yet started.
-  bool IsFlushPending() const;
-
-  // Returns the earliest memtables that needs to be flushed. The returned
-  // memtables are guaranteed to be in the ascending order of created time.
-  void PickMemtablesToFlush(autovector<MemTable*>* mems);
-
-  // Reset status of the given memtable list back to pending state so that
-  // they can get picked up again on the next round of flush.
-  void RollbackMemtableFlush(const autovector<MemTable*>& mems,
-                             uint64_t file_number,
-                             std::set<uint64_t>* pending_outputs);
-
-  // Commit a successful flush in the manifest file
-  Status InstallMemtableFlushResults(ColumnFamilyData* cfd,
-                                     const autovector<MemTable*>& m,
-                                     VersionSet* vset, port::Mutex* mu,
-                                     Logger* info_log, uint64_t file_number,
-                                     std::set<uint64_t>& pending_outputs,
-                                     autovector<MemTable*>* to_delete,
-                                     Directory* db_directory,
-                                     LogBuffer* log_buffer);
-
-  // New memtables are inserted at the front of the list.
-  // Takes ownership of the referenced held on *m by the caller of Add().
-  void Add(MemTable* m);
-
-  // Returns an estimate of the number of bytes of data in use.
-  size_t ApproximateMemoryUsage();
-
-  // Request a flush of all existing memtables to storage
-  void FlushRequested() { flush_requested_ = true; }
-
-  // Copying allowed
-  // MemTableList(const MemTableList&);
-  // void operator=(const MemTableList&);
-
- private:
-  // DB mutex held
-  void InstallNewVersion();
-
-  int min_write_buffer_number_to_merge_;
-
-  MemTableListVersion* current_;
-
-  // the number of elements that still need flushing
-  int num_flush_not_started_;
-
-  // committing in progress
-  bool commit_in_progress_;
-
-  // Requested a flush of all memtables to storage
-  bool flush_requested_;
-
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/merge_context.h b/src/rocksdb/db/merge_context.h
deleted file mode 100644
index bf483a8..0000000
--- a/src/rocksdb/db/merge_context.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-#include "db/dbformat.h"
-#include "rocksdb/slice.h"
-#include <string>
-#include <deque>
-
-namespace rocksdb {
-
-const std::deque<std::string> empty_operand_list;
-
-// The merge context for merging a user key.
-// When doing a Get(), DB will create such a class and pass it when
-// issuing Get() operation to memtables and version_set. The operands
-// will be fetched from the context when issuing partial of full merge.
-class MergeContext {
-public:
-  // Clear all the operands
-  void Clear() {
-    if (operand_list) {
-      operand_list->clear();
-    }
-  }
-  // Replace all operands with merge_result, which are expected to be the
-  // merge result of them.
-  void PushPartialMergeResult(std::string& merge_result) {
-    assert (operand_list);
-    operand_list->clear();
-    operand_list->push_front(std::move(merge_result));
-  }
-  // Push a merge operand
-  void PushOperand(const Slice& operand_slice) {
-    Initialize();
-    operand_list->push_front(operand_slice.ToString());
-  }
-  // return total number of operands in the list
-  size_t GetNumOperands() const {
-    if (!operand_list) {
-      return 0;
-    }
-    return operand_list->size();
-  }
-  // Get the operand at the index.
-  Slice GetOperand(int index) const {
-    assert (operand_list);
-    return (*operand_list)[index];
-  }
-  // Return all the operands.
-  const std::deque<std::string>& GetOperands() const {
-    if (!operand_list) {
-      return empty_operand_list;
-    }
-    return *operand_list;
-  }
-private:
-  void Initialize() {
-    if (!operand_list) {
-      operand_list.reset(new std::deque<std::string>());
-    }
-  }
-  std::unique_ptr<std::deque<std::string>> operand_list;
-};
-
-} // namespace rocksdb
-
diff --git a/src/rocksdb/db/merge_helper.cc b/src/rocksdb/db/merge_helper.cc
deleted file mode 100644
index 0e36f6a..0000000
--- a/src/rocksdb/db/merge_helper.cc
+++ /dev/null
@@ -1,209 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "merge_helper.h"
-#include "db/dbformat.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/db.h"
-#include "rocksdb/merge_operator.h"
-#include "util/statistics.h"
-#include <string>
-#include <stdio.h>
-
-namespace rocksdb {
-
-// PRE:  iter points to the first merge type entry
-// POST: iter points to the first entry beyond the merge process (or the end)
-//       keys_, operands_ are updated to reflect the merge result.
-//       keys_ stores the list of keys encountered while merging.
-//       operands_ stores the list of merge operands encountered while merging.
-//       keys_[i] corresponds to operands_[i] for each i.
-void MergeHelper::MergeUntil(Iterator* iter, SequenceNumber stop_before,
-                             bool at_bottom, Statistics* stats, int* steps) {
-  // Get a copy of the internal key, before it's invalidated by iter->Next()
-  // Also maintain the list of merge operands seen.
-  keys_.clear();
-  operands_.clear();
-  keys_.push_front(iter->key().ToString());
-  operands_.push_front(iter->value().ToString());
-
-  success_ = false;   // Will become true if we hit Put/Delete or bottom
-
-  // We need to parse the internal key again as the parsed key is
-  // backed by the internal key!
-  // Assume no internal key corruption as it has been successfully parsed
-  // by the caller.
-  // Invariant: keys_.back() will not change. Hence, orig_ikey is always valid.
-  ParsedInternalKey orig_ikey;
-  ParseInternalKey(keys_.back(), &orig_ikey);
-
-  bool hit_the_next_user_key = false;
-  std::string merge_result;  // Temporary value for merge results
-  if (steps) {
-    ++(*steps);
-  }
-  for (iter->Next(); iter->Valid(); iter->Next()) {
-    ParsedInternalKey ikey;
-    assert(operands_.size() >= 1);        // Should be invariants!
-    assert(keys_.size() == operands_.size());
-
-    if (!ParseInternalKey(iter->key(), &ikey)) {
-      // stop at corrupted key
-      if (assert_valid_internal_key_) {
-        assert(!"corrupted internal key is not expected");
-      }
-      break;
-    }
-
-    if (user_comparator_->Compare(ikey.user_key, orig_ikey.user_key) != 0) {
-      // hit a different user key, stop right here
-      hit_the_next_user_key = true;
-      break;
-    }
-
-    if (stop_before && ikey.sequence <= stop_before) {
-      // hit an entry that's visible by the previous snapshot, can't touch that
-      break;
-    }
-
-    // At this point we are guaranteed that we need to process this key.
-
-    if (kTypeDeletion == ikey.type) {
-      // hit a delete
-      //   => merge nullptr with operands_
-      //   => store result in operands_.back() (and update keys_.back())
-      //   => change the entry type to kTypeValue for keys_.back()
-      // We are done! Return a success if the merge passes.
-      success_ = user_merge_operator_->FullMerge(ikey.user_key, nullptr,
-                                                 operands_, &merge_result,
-                                                 logger_);
-
-      // We store the result in keys_.back() and operands_.back()
-      // if nothing went wrong (i.e.: no operand corruption on disk)
-      if (success_) {
-        std::string& key = keys_.back();  // The original key encountered
-        orig_ikey.type = kTypeValue;
-        UpdateInternalKey(&key[0], key.size(),
-                          orig_ikey.sequence, orig_ikey.type);
-        swap(operands_.back(), merge_result);
-      } else {
-        RecordTick(stats, NUMBER_MERGE_FAILURES);
-      }
-
-      // move iter to the next entry (before doing anything else)
-      iter->Next();
-      if (steps) {
-        ++(*steps);
-      }
-      return;
-    }
-
-    if (kTypeValue == ikey.type) {
-      // hit a put
-      //   => merge the put value with operands_
-      //   => store result in operands_.back() (and update keys_.back())
-      //   => change the entry type to kTypeValue for keys_.back()
-      // We are done! Success!
-      const Slice value = iter->value();
-      success_ = user_merge_operator_->FullMerge(ikey.user_key, &value,
-                                                 operands_, &merge_result,
-                                                 logger_);
-
-      // We store the result in keys_.back() and operands_.back()
-      // if nothing went wrong (i.e.: no operand corruption on disk)
-      if (success_) {
-        std::string& key = keys_.back();  // The original key encountered
-        orig_ikey.type = kTypeValue;
-        UpdateInternalKey(&key[0], key.size(),
-                          orig_ikey.sequence, orig_ikey.type);
-        swap(operands_.back(), merge_result);
-      } else {
-        RecordTick(stats, NUMBER_MERGE_FAILURES);
-      }
-
-      // move iter to the next entry
-      iter->Next();
-      if (steps) {
-        ++(*steps);
-      }
-      return;
-    }
-
-    if (kTypeMerge == ikey.type) {
-      // hit a merge
-      //   => merge the operand into the front of the operands_ list
-      //   => use the user's associative merge function to determine how.
-      //   => then continue because we haven't yet seen a Put/Delete.
-      assert(!operands_.empty()); // Should have at least one element in it
-
-      // keep queuing keys and operands until we either meet a put / delete
-      // request or later did a partial merge.
-      keys_.push_front(iter->key().ToString());
-      operands_.push_front(iter->value().ToString());
-      if (steps) {
-        ++(*steps);
-      }
-    }
-  }
-
-  // We are sure we have seen this key's entire history if we are at the
-  // last level and exhausted all internal keys of this user key.
-  // NOTE: !iter->Valid() does not necessarily mean we hit the
-  // beginning of a user key, as versions of a user key might be
-  // split into multiple files (even files on the same level)
-  // and some files might not be included in the compaction/merge.
-  //
-  // There are also cases where we have seen the root of history of this
-  // key without being sure of it. Then, we simply miss the opportunity
-  // to combine the keys. Since VersionSet::SetupOtherInputs() always makes
-  // sure that all merge-operands on the same level get compacted together,
-  // this will simply lead to these merge operands moving to the next level.
-  //
-  // So, we only perform the following logic (to merge all operands together
-  // without a Put/Delete) if we are certain that we have seen the end of key.
-  bool surely_seen_the_beginning = hit_the_next_user_key && at_bottom;
-  if (surely_seen_the_beginning) {
-    // do a final merge with nullptr as the existing value and say
-    // bye to the merge type (it's now converted to a Put)
-    assert(kTypeMerge == orig_ikey.type);
-    assert(operands_.size() >= 1);
-    assert(operands_.size() == keys_.size());
-    success_ = user_merge_operator_->FullMerge(orig_ikey.user_key, nullptr,
-                                               operands_, &merge_result,
-                                               logger_);
-
-    if (success_) {
-      std::string& key = keys_.back();  // The original key encountered
-      orig_ikey.type = kTypeValue;
-      UpdateInternalKey(&key[0], key.size(),
-                        orig_ikey.sequence, orig_ikey.type);
-
-      // The final value() is always stored in operands_.back()
-      swap(operands_.back(),merge_result);
-    } else {
-      RecordTick(stats, NUMBER_MERGE_FAILURES);
-      // Do nothing if not success_. Leave keys() and operands() as they are.
-    }
-  } else {
-    // We haven't seen the beginning of the key nor a Put/Delete.
-    // Attempt to use the user's associative merge function to
-    // merge the stacked merge operands into a single operand.
-
-    if (operands_.size() >= 2 &&
-        operands_.size() >= min_partial_merge_operands_ &&
-        user_merge_operator_->PartialMergeMulti(
-            orig_ikey.user_key,
-            std::deque<Slice>(operands_.begin(), operands_.end()),
-            &merge_result, logger_)) {
-      // Merging of operands (associative merge) was successful.
-      // Replace operands with the merge result
-      operands_.clear();
-      operands_.push_front(std::move(merge_result));
-      keys_.erase(keys_.begin(), keys_.end() - 1);
-    }
-  }
-}
-
-} // namespace rocksdb
diff --git a/src/rocksdb/db/merge_helper.h b/src/rocksdb/db/merge_helper.h
deleted file mode 100644
index fef153e..0000000
--- a/src/rocksdb/db/merge_helper.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef MERGE_HELPER_H
-#define MERGE_HELPER_H
-
-#include "db/dbformat.h"
-#include "rocksdb/slice.h"
-#include <string>
-#include <deque>
-
-namespace rocksdb {
-
-class Comparator;
-class Iterator;
-class Logger;
-class MergeOperator;
-class Statistics;
-
-class MergeHelper {
- public:
-  MergeHelper(const Comparator* user_comparator,
-              const MergeOperator* user_merge_operator, Logger* logger,
-              unsigned min_partial_merge_operands,
-              bool assert_valid_internal_key)
-      : user_comparator_(user_comparator),
-        user_merge_operator_(user_merge_operator),
-        logger_(logger),
-        min_partial_merge_operands_(min_partial_merge_operands),
-        assert_valid_internal_key_(assert_valid_internal_key),
-        keys_(),
-        operands_(),
-        success_(false) {}
-
-  // Merge entries until we hit
-  //     - a corrupted key
-  //     - a Put/Delete,
-  //     - a different user key,
-  //     - a specific sequence number (snapshot boundary),
-  //  or - the end of iteration
-  // iter: (IN)  points to the first merge type entry
-  //       (OUT) points to the first entry not included in the merge process
-  // stop_before: (IN) a sequence number that merge should not cross.
-  //                   0 means no restriction
-  // at_bottom:   (IN) true if the iterator covers the bottem level, which means
-  //                   we could reach the start of the history of this user key.
-  void MergeUntil(Iterator* iter, SequenceNumber stop_before = 0,
-                  bool at_bottom = false, Statistics* stats = nullptr,
-                  int* steps = nullptr);
-
-  // Query the merge result
-  // These are valid until the next MergeUntil call
-  // If the merging was successful:
-  //   - IsSuccess() will be true
-  //   - key() will have the latest sequence number of the merges.
-  //           The type will be Put or Merge. See IMPORTANT 1 note, below.
-  //   - value() will be the result of merging all the operands together
-  //   - The user should ignore keys() and values().
-  //
-  //   IMPORTANT 1: the key type could change after the MergeUntil call.
-  //        Put/Delete + Merge + ... + Merge => Put
-  //        Merge + ... + Merge => Merge
-  //
-  // If the merge operator is not associative, and if a Put/Delete is not found
-  // then the merging will be unsuccessful. In this case:
-  //   - IsSuccess() will be false
-  //   - keys() contains the list of internal keys seen in order of iteration.
-  //   - values() contains the list of values (merges) seen in the same order.
-  //              values() is parallel to keys() so that the first entry in
-  //              keys() is the key associated with the first entry in values()
-  //              and so on. These lists will be the same length.
-  //              All of these pairs will be merges over the same user key.
-  //              See IMPORTANT 2 note below.
-  //   - The user should ignore key() and value().
-  //
-  //   IMPORTANT 2: The entries were traversed in order from BACK to FRONT.
-  //                So keys().back() was the first key seen by iterator.
-  // TODO: Re-style this comment to be like the first one
-  bool IsSuccess() { return success_; }
-  Slice key() { assert(success_); return Slice(keys_.back()); }
-  Slice value() { assert(success_); return Slice(operands_.back()); }
-  const std::deque<std::string>& keys() { assert(!success_); return keys_; }
-  const std::deque<std::string>& values() {
-    assert(!success_); return operands_;
-  }
-
- private:
-  const Comparator* user_comparator_;
-  const MergeOperator* user_merge_operator_;
-  Logger* logger_;
-  unsigned min_partial_merge_operands_;
-  bool assert_valid_internal_key_; // enforce no internal key corruption?
-
-  // the scratch area that holds the result of MergeUntil
-  // valid up to the next MergeUntil call
-  std::deque<std::string> keys_;    // Keeps track of the sequence of keys seen
-  std::deque<std::string> operands_;  // Parallel with keys_; stores the values
-  bool success_;
-};
-
-} // namespace rocksdb
-
-#endif
diff --git a/src/rocksdb/db/merge_operator.cc b/src/rocksdb/db/merge_operator.cc
deleted file mode 100644
index a14df8a..0000000
--- a/src/rocksdb/db/merge_operator.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-/**
- * Back-end implementation details specific to the Merge Operator.
- */
-
-#include "rocksdb/merge_operator.h"
-
-namespace rocksdb {
-
-// The default implementation of PartialMergeMulti, which invokes
-// PartialMerge multiple times internally and merges two operands at
-// a time.
-bool MergeOperator::PartialMergeMulti(const Slice& key,
-                                      const std::deque<Slice>& operand_list,
-                                      std::string* new_value,
-                                      Logger* logger) const {
-  assert(operand_list.size() >= 2);
-  // Simply loop through the operands
-  std::string temp_value;
-  Slice temp_slice(operand_list[0]);
-
-  for (size_t i = 1; i < operand_list.size(); ++i) {
-    auto& operand = operand_list[i];
-    if (!PartialMerge(key, temp_slice, operand, &temp_value, logger)) {
-      return false;
-    }
-    swap(temp_value, *new_value);
-    temp_slice = Slice(*new_value);
-  }
-
-  // The result will be in *new_value. All merges succeeded.
-  return true;
-}
-
-// Given a "real" merge from the library, call the user's
-// associative merge function one-by-one on each of the operands.
-// NOTE: It is assumed that the client's merge-operator will handle any errors.
-bool AssociativeMergeOperator::FullMerge(
-    const Slice& key,
-    const Slice* existing_value,
-    const std::deque<std::string>& operand_list,
-    std::string* new_value,
-    Logger* logger) const {
-
-  // Simply loop through the operands
-  Slice temp_existing;
-  std::string temp_value;
-  for (const auto& operand : operand_list) {
-    Slice value(operand);
-    if (!Merge(key, existing_value, value, &temp_value, logger)) {
-      return false;
-    }
-    swap(temp_value, *new_value);
-    temp_existing = Slice(*new_value);
-    existing_value = &temp_existing;
-  }
-
-  // The result will be in *new_value. All merges succeeded.
-  return true;
-}
-
-// Call the user defined simple merge on the operands;
-// NOTE: It is assumed that the client's merge-operator will handle any errors.
-bool AssociativeMergeOperator::PartialMerge(
-    const Slice& key,
-    const Slice& left_operand,
-    const Slice& right_operand,
-    std::string* new_value,
-    Logger* logger) const {
-  return Merge(key, &left_operand, right_operand, new_value, logger);
-}
-
-} // namespace rocksdb
diff --git a/src/rocksdb/db/merge_test.cc b/src/rocksdb/db/merge_test.cc
deleted file mode 100644
index 9bdf543..0000000
--- a/src/rocksdb/db/merge_test.cc
+++ /dev/null
@@ -1,472 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <assert.h>
-#include <memory>
-#include <iostream>
-
-#include "rocksdb/cache.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/merge_operator.h"
-#include "db/dbformat.h"
-#include "db/db_impl.h"
-#include "db/write_batch_internal.h"
-#include "utilities/merge_operators.h"
-#include "util/testharness.h"
-#include "utilities/db_ttl.h"
-
-using namespace std;
-using namespace rocksdb;
-
-namespace {
-  int numMergeOperatorCalls;
-  void resetNumMergeOperatorCalls() {
-    numMergeOperatorCalls = 0;
-  }
-
-  int num_partial_merge_calls;
-  void resetNumPartialMergeCalls() {
-    num_partial_merge_calls = 0;
-  }
-}
-
-class CountMergeOperator : public AssociativeMergeOperator {
- public:
-  CountMergeOperator() {
-    mergeOperator_ = MergeOperators::CreateUInt64AddOperator();
-  }
-
-  virtual bool Merge(const Slice& key,
-                     const Slice* existing_value,
-                     const Slice& value,
-                     std::string* new_value,
-                     Logger* logger) const override {
-    ++numMergeOperatorCalls;
-    if (existing_value == nullptr) {
-      new_value->assign(value.data(), value.size());
-      return true;
-    }
-
-    return mergeOperator_->PartialMerge(
-        key,
-        *existing_value,
-        value,
-        new_value,
-        logger);
-  }
-
-  virtual bool PartialMergeMulti(const Slice& key,
-                                 const std::deque<Slice>& operand_list,
-                                 std::string* new_value, Logger* logger) const {
-    ++num_partial_merge_calls;
-    return mergeOperator_->PartialMergeMulti(key, operand_list, new_value,
-                                             logger);
-  }
-
-  virtual const char* Name() const override {
-    return "UInt64AddOperator";
-  }
-
- private:
-  std::shared_ptr<MergeOperator> mergeOperator_;
-};
-
-namespace {
-std::shared_ptr<DB> OpenDb(const string& dbname, const bool ttl = false,
-                           const size_t max_successive_merges = 0,
-                           const uint32_t min_partial_merge_operands = 2) {
-  DB* db;
-  Options options;
-  options.create_if_missing = true;
-  options.merge_operator = std::make_shared<CountMergeOperator>();
-  options.max_successive_merges = max_successive_merges;
-  options.min_partial_merge_operands = min_partial_merge_operands;
-  Status s;
-  DestroyDB(dbname, Options());
-  if (ttl) {
-    cout << "Opening database with TTL\n";
-    DBWithTTL* db_with_ttl;
-    s = DBWithTTL::Open(options, dbname, &db_with_ttl);
-    db = db_with_ttl;
-  } else {
-    s = DB::Open(options, dbname, &db);
-  }
-  if (!s.ok()) {
-    cerr << s.ToString() << endl;
-    assert(false);
-  }
-  return std::shared_ptr<DB>(db);
-}
-}  // namespace
-
-// Imagine we are maintaining a set of uint64 counters.
-// Each counter has a distinct name. And we would like
-// to support four high level operations:
-// set, add, get and remove
-// This is a quick implementation without a Merge operation.
-class Counters {
-
- protected:
-  std::shared_ptr<DB> db_;
-
-  WriteOptions put_option_;
-  ReadOptions get_option_;
-  WriteOptions delete_option_;
-
-  uint64_t default_;
-
- public:
-  explicit Counters(std::shared_ptr<DB> db, uint64_t defaultCount = 0)
-      : db_(db),
-        put_option_(),
-        get_option_(),
-        delete_option_(),
-        default_(defaultCount) {
-    assert(db_);
-  }
-
-  virtual ~Counters() {}
-
-  // public interface of Counters.
-  // All four functions return false
-  // if the underlying level db operation failed.
-
-  // mapped to a levedb Put
-  bool set(const string& key, uint64_t value) {
-    // just treat the internal rep of int64 as the string
-    Slice slice((char *)&value, sizeof(value));
-    auto s = db_->Put(put_option_, key, slice);
-
-    if (s.ok()) {
-      return true;
-    } else {
-      cerr << s.ToString() << endl;
-      return false;
-    }
-  }
-
-  // mapped to a rocksdb Delete
-  bool remove(const string& key) {
-    auto s = db_->Delete(delete_option_, key);
-
-    if (s.ok()) {
-      return true;
-    } else {
-      cerr << s.ToString() << std::endl;
-      return false;
-    }
-  }
-
-  // mapped to a rocksdb Get
-  bool get(const string& key, uint64_t *value) {
-    string str;
-    auto s = db_->Get(get_option_, key, &str);
-
-    if (s.IsNotFound()) {
-      // return default value if not found;
-      *value = default_;
-      return true;
-    } else if (s.ok()) {
-      // deserialization
-      if (str.size() != sizeof(uint64_t)) {
-        cerr << "value corruption\n";
-        return false;
-      }
-      *value = DecodeFixed64(&str[0]);
-      return true;
-    } else {
-      cerr << s.ToString() << std::endl;
-      return false;
-    }
-  }
-
-  // 'add' is implemented as get -> modify -> set
-  // An alternative is a single merge operation, see MergeBasedCounters
-  virtual bool add(const string& key, uint64_t value) {
-    uint64_t base = default_;
-    return get(key, &base) && set(key, base + value);
-  }
-
-
-  // convenience functions for testing
-  void assert_set(const string& key, uint64_t value) {
-    assert(set(key, value));
-  }
-
-  void assert_remove(const string& key) {
-    assert(remove(key));
-  }
-
-  uint64_t assert_get(const string& key) {
-    uint64_t value = default_;
-    int result = get(key, &value);
-    assert(result);
-    if (result == 0) exit(1); // Disable unused variable warning.
-    return value;
-  }
-
-  void assert_add(const string& key, uint64_t value) {
-    int result = add(key, value);
-    assert(result);
-    if (result == 0) exit(1); // Disable unused variable warning. 
-  }
-};
-
-// Implement 'add' directly with the new Merge operation
-class MergeBasedCounters : public Counters {
- private:
-  WriteOptions merge_option_; // for merge
-
- public:
-  explicit MergeBasedCounters(std::shared_ptr<DB> db, uint64_t defaultCount = 0)
-      : Counters(db, defaultCount),
-        merge_option_() {
-  }
-
-  // mapped to a rocksdb Merge operation
-  virtual bool add(const string& key, uint64_t value) override {
-    char encoded[sizeof(uint64_t)];
-    EncodeFixed64(encoded, value);
-    Slice slice(encoded, sizeof(uint64_t));
-    auto s = db_->Merge(merge_option_, key, slice);
-
-    if (s.ok()) {
-      return true;
-    } else {
-      cerr << s.ToString() << endl;
-      return false;
-    }
-  }
-};
-
-namespace {
-void dumpDb(DB* db) {
-  auto it = unique_ptr<Iterator>(db->NewIterator(ReadOptions()));
-  for (it->SeekToFirst(); it->Valid(); it->Next()) {
-    uint64_t value = DecodeFixed64(it->value().data());
-    cout << it->key().ToString() << ": "  << value << endl;
-  }
-  assert(it->status().ok());  // Check for any errors found during the scan
-}
-
-void testCounters(Counters& counters, DB* db, bool test_compaction) {
-
-  FlushOptions o;
-  o.wait = true;
-
-  counters.assert_set("a", 1);
-
-  if (test_compaction) db->Flush(o);
-
-  assert(counters.assert_get("a") == 1);
-
-  counters.assert_remove("b");
-
-  // defaut value is 0 if non-existent
-  assert(counters.assert_get("b") == 0);
-
-  counters.assert_add("a", 2);
-
-  if (test_compaction) db->Flush(o);
-
-  // 1+2 = 3
-  assert(counters.assert_get("a")== 3);
-
-  dumpDb(db);
-
-  std::cout << "1\n";
-
-  // 1+...+49 = ?
-  uint64_t sum = 0;
-  for (int i = 1; i < 50; i++) {
-    counters.assert_add("b", i);
-    sum += i;
-  }
-  assert(counters.assert_get("b") == sum);
-
-  std::cout << "2\n";
-  dumpDb(db);
-
-  std::cout << "3\n";
-
-  if (test_compaction) {
-    db->Flush(o);
-
-    cout << "Compaction started ...\n";
-    db->CompactRange(nullptr, nullptr);
-    cout << "Compaction ended\n";
-
-    dumpDb(db);
-
-    assert(counters.assert_get("a")== 3);
-    assert(counters.assert_get("b") == sum);
-  }
-}
-
-void testSuccessiveMerge(
-    Counters& counters, int max_num_merges, int num_merges) {
-
-  counters.assert_remove("z");
-  uint64_t sum = 0;
-
-  for (int i = 1; i <= num_merges; ++i) {
-    resetNumMergeOperatorCalls();
-    counters.assert_add("z", i);
-    sum += i;
-
-    if (i % (max_num_merges + 1) == 0) {
-      assert(numMergeOperatorCalls == max_num_merges + 1);
-    } else {
-      assert(numMergeOperatorCalls == 0);
-    }
-
-    resetNumMergeOperatorCalls();
-    assert(counters.assert_get("z") == sum);
-    assert(numMergeOperatorCalls == i % (max_num_merges + 1));
-  }
-}
-
-void testPartialMerge(Counters* counters, DB* db, int max_merge, int min_merge,
-                      int count) {
-  FlushOptions o;
-  o.wait = true;
-
-  // Test case 1: partial merge should be called when the number of merge
-  //              operands exceeds the threshold.
-  uint64_t tmp_sum = 0;
-  resetNumPartialMergeCalls();
-  for (int i = 1; i <= count; i++) {
-    counters->assert_add("b", i);
-    tmp_sum += i;
-  }
-  db->Flush(o);
-  db->CompactRange(nullptr, nullptr);
-  ASSERT_EQ(tmp_sum, counters->assert_get("b"));
-  if (count > max_merge) {
-    // in this case, FullMerge should be called instead.
-    ASSERT_EQ(num_partial_merge_calls, 0);
-  } else {
-    // if count >= min_merge, then partial merge should be called once.
-    ASSERT_EQ((count >= min_merge), (num_partial_merge_calls == 1));
-  }
-
-  // Test case 2: partial merge should not be called when a put is found.
-  resetNumPartialMergeCalls();
-  tmp_sum = 0;
-  db->Put(rocksdb::WriteOptions(), "c", "10");
-  for (int i = 1; i <= count; i++) {
-    counters->assert_add("c", i);
-    tmp_sum += i;
-  }
-  db->Flush(o);
-  db->CompactRange(nullptr, nullptr);
-  ASSERT_EQ(tmp_sum, counters->assert_get("c"));
-  ASSERT_EQ(num_partial_merge_calls, 0);
-}
-
-void testSingleBatchSuccessiveMerge(
-    DB* db,
-    int max_num_merges,
-    int num_merges) {
-  assert(num_merges > max_num_merges);
-
-  Slice key("BatchSuccessiveMerge");
-  uint64_t merge_value = 1;
-  Slice merge_value_slice((char *)&merge_value, sizeof(merge_value));
-
-  // Create the batch
-  WriteBatch batch;
-  for (int i = 0; i < num_merges; ++i) {
-    batch.Merge(key, merge_value_slice);
-  }
-
-  // Apply to memtable and count the number of merges
-  resetNumMergeOperatorCalls();
-  {
-    Status s = db->Write(WriteOptions(), &batch);
-    assert(s.ok());
-  }
-  assert(numMergeOperatorCalls ==
-      num_merges - (num_merges % (max_num_merges + 1)));
-
-  // Get the value
-  resetNumMergeOperatorCalls();
-  string get_value_str;
-  {
-    Status s = db->Get(ReadOptions(), key, &get_value_str);
-    assert(s.ok());
-  }
-  assert(get_value_str.size() == sizeof(uint64_t));
-  uint64_t get_value = DecodeFixed64(&get_value_str[0]);
-  ASSERT_EQ(get_value, num_merges * merge_value);
-  ASSERT_EQ(numMergeOperatorCalls, (num_merges % (max_num_merges + 1)));
-}
-
-void runTest(int argc, const string& dbname, const bool use_ttl = false) {
-  auto db = OpenDb(dbname, use_ttl);
-
-  {
-    cout << "Test read-modify-write counters... \n";
-    Counters counters(db, 0);
-    testCounters(counters, db.get(), true);
-  }
-
-  bool compact = false;
-  if (argc > 1) {
-    compact = true;
-    cout << "Turn on Compaction\n";
-  }
-
-  {
-    cout << "Test merge-based counters... \n";
-    MergeBasedCounters counters(db, 0);
-    testCounters(counters, db.get(), compact);
-  }
-
-  DestroyDB(dbname, Options());
-  db.reset();
-
-  {
-    cout << "Test merge in memtable... \n";
-    size_t max_merge = 5;
-    auto db = OpenDb(dbname, use_ttl, max_merge);
-    MergeBasedCounters counters(db, 0);
-    testCounters(counters, db.get(), compact);
-    testSuccessiveMerge(counters, max_merge, max_merge * 2);
-    testSingleBatchSuccessiveMerge(db.get(), 5, 7);
-    DestroyDB(dbname, Options());
-  }
-
-  {
-    cout << "Test Partial-Merge\n";
-    size_t max_merge = 100;
-    for (uint32_t min_merge = 5; min_merge < 25; min_merge += 5) {
-      for (uint32_t count = min_merge - 1; count <= min_merge + 1; count++) {
-        auto db = OpenDb(dbname, use_ttl, max_merge, min_merge);
-        MergeBasedCounters counters(db, 0);
-        testPartialMerge(&counters, db.get(), max_merge, min_merge, count);
-        DestroyDB(dbname, Options());
-      }
-      {
-        auto db = OpenDb(dbname, use_ttl, max_merge, min_merge);
-        MergeBasedCounters counters(db, 0);
-        testPartialMerge(&counters, db.get(), max_merge, min_merge,
-                         min_merge * 10);
-        DestroyDB(dbname, Options());
-      }
-    }
-  }
-}
-}  // namespace
-
-int main(int argc, char *argv[]) {
-  //TODO: Make this test like a general rocksdb unit-test
-  runTest(argc, test::TmpDir() + "/merge_testdb");
-  runTest(argc, test::TmpDir() + "/merge_testdbttl", true); // Run test on TTL database
-  printf("Passed all tests!\n");
-  return 0;
-}
diff --git a/src/rocksdb/db/perf_context_test.cc b/src/rocksdb/db/perf_context_test.cc
deleted file mode 100644
index a182fb5..0000000
--- a/src/rocksdb/db/perf_context_test.cc
+++ /dev/null
@@ -1,358 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <algorithm>
-#include <iostream>
-#include <vector>
-#include "/usr/include/valgrind/callgrind.h"
-
-#include "rocksdb/db.h"
-#include "rocksdb/perf_context.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/memtablerep.h"
-#include "util/histogram.h"
-#include "util/stop_watch.h"
-#include "util/testharness.h"
-
-
-bool FLAGS_random_key = false;
-bool FLAGS_use_set_based_memetable = false;
-int FLAGS_total_keys = 100;
-int FLAGS_write_buffer_size = 1000000000;
-int FLAGS_max_write_buffer_number = 8;
-int FLAGS_min_write_buffer_number_to_merge = 7;
-
-// Path to the database on file system
-const std::string kDbName = rocksdb::test::TmpDir() + "/perf_context_test";
-
-namespace rocksdb {
-
-std::shared_ptr<DB> OpenDb() {
-    DB* db;
-    Options options;
-    options.create_if_missing = true;
-    options.write_buffer_size = FLAGS_write_buffer_size;
-    options.max_write_buffer_number = FLAGS_max_write_buffer_number;
-    options.min_write_buffer_number_to_merge =
-      FLAGS_min_write_buffer_number_to_merge;
-
-    if (FLAGS_use_set_based_memetable) {
-      auto prefix_extractor = rocksdb::NewFixedPrefixTransform(0);
-      options.memtable_factory.reset(
-          NewHashSkipListRepFactory(prefix_extractor));
-    }
-
-    Status s = DB::Open(options, kDbName,  &db);
-    ASSERT_OK(s);
-    return std::shared_ptr<DB>(db);
-}
-
-class PerfContextTest { };
-
-TEST(PerfContextTest, SeekIntoDeletion) {
-  DestroyDB(kDbName, Options());
-  auto db = OpenDb();
-  WriteOptions write_options;
-  ReadOptions read_options;
-
-  for (int i = 0; i < FLAGS_total_keys; ++i) {
-    std::string key = "k" + std::to_string(i);
-    std::string value = "v" + std::to_string(i);
-
-    db->Put(write_options, key, value);
-  }
-
-  for (int i = 0; i < FLAGS_total_keys -1 ; ++i) {
-    std::string key = "k" + std::to_string(i);
-    db->Delete(write_options, key);
-  }
-
-  HistogramImpl hist_get;
-  HistogramImpl hist_get_time;
-  for (int i = 0; i < FLAGS_total_keys - 1; ++i) {
-    std::string key = "k" + std::to_string(i);
-    std::string value;
-
-    perf_context.Reset();
-    StopWatchNano timer(Env::Default(), true);
-    auto status = db->Get(read_options, key, &value);
-    auto elapsed_nanos = timer.ElapsedNanos();
-    ASSERT_TRUE(status.IsNotFound());
-    hist_get.Add(perf_context.user_key_comparison_count);
-    hist_get_time.Add(elapsed_nanos);
-  }
-
-  std::cout << "Get uesr key comparison: \n" << hist_get.ToString()
-            << "Get time: \n" << hist_get_time.ToString();
-
-  HistogramImpl hist_seek_to_first;
-  std::unique_ptr<Iterator> iter(db->NewIterator(read_options));
-
-  perf_context.Reset();
-  StopWatchNano timer(Env::Default(), true);
-  iter->SeekToFirst();
-  hist_seek_to_first.Add(perf_context.user_key_comparison_count);
-  auto elapsed_nanos = timer.ElapsedNanos();
-
-  std::cout << "SeekToFirst uesr key comparison: \n" << hist_seek_to_first.ToString()
-            << "ikey skipped: " << perf_context.internal_key_skipped_count << "\n"
-            << "idelete skipped: " << perf_context.internal_delete_skipped_count << "\n"
-            << "elapsed: " << elapsed_nanos << "\n";
-
-  HistogramImpl hist_seek;
-  for (int i = 0; i < FLAGS_total_keys; ++i) {
-    std::unique_ptr<Iterator> iter(db->NewIterator(read_options));
-    std::string key = "k" + std::to_string(i);
-
-    perf_context.Reset();
-    StopWatchNano timer(Env::Default(), true);
-    iter->Seek(key);
-    auto elapsed_nanos = timer.ElapsedNanos();
-    hist_seek.Add(perf_context.user_key_comparison_count);
-    std::cout << "seek cmp: " << perf_context.user_key_comparison_count
-              << " ikey skipped " << perf_context.internal_key_skipped_count
-              << " idelete skipped " << perf_context.internal_delete_skipped_count
-              << " elapsed: " << elapsed_nanos << "ns\n";
-
-    perf_context.Reset();
-    ASSERT_TRUE(iter->Valid());
-    StopWatchNano timer2(Env::Default(), true);
-    iter->Next();
-    auto elapsed_nanos2 = timer2.ElapsedNanos();
-    std::cout << "next cmp: " << perf_context.user_key_comparison_count
-              << "elapsed: " << elapsed_nanos2 << "ns\n";
-  }
-
-  std::cout << "Seek uesr key comparison: \n" << hist_seek.ToString();
-}
-
-TEST(PerfContextTest, StopWatchNanoOverhead) {
-  // profile the timer cost by itself!
-  const int kTotalIterations = 1000000;
-  std::vector<uint64_t> timings(kTotalIterations);
-
-  StopWatchNano timer(Env::Default(), true);
-  for (auto& timing : timings) {
-    timing = timer.ElapsedNanos(true /* reset */);
-  }
-
-  HistogramImpl histogram;
-  for (const auto timing : timings) {
-    histogram.Add(timing);
-  }
-
-  std::cout << histogram.ToString();
-}
-
-TEST(PerfContextTest, StopWatchOverhead) {
-  // profile the timer cost by itself!
-  const int kTotalIterations = 1000000;
-  std::vector<uint64_t> timings(kTotalIterations);
-
-  StopWatch timer(Env::Default());
-  for (auto& timing : timings) {
-    timing = timer.ElapsedMicros();
-  }
-
-  HistogramImpl histogram;
-  uint64_t prev_timing = 0;
-  for (const auto timing : timings) {
-    histogram.Add(timing - prev_timing);
-    prev_timing = timing;
-  }
-
-  std::cout << histogram.ToString();
-}
-
-void ProfileKeyComparison() {
-  DestroyDB(kDbName, Options());    // Start this test with a fresh DB
-
-  auto db = OpenDb();
-
-  WriteOptions write_options;
-  ReadOptions read_options;
-
-  HistogramImpl hist_put;
-  HistogramImpl hist_get;
-  HistogramImpl hist_get_snapshot;
-  HistogramImpl hist_get_memtable;
-  HistogramImpl hist_get_post_process;
-  HistogramImpl hist_num_memtable_checked;
-  HistogramImpl hist_write_pre_post;
-  HistogramImpl hist_write_wal_time;
-  HistogramImpl hist_write_memtable_time;
-
-  std::cout << "Inserting " << FLAGS_total_keys << " key/value pairs\n...\n";
-
-  std::vector<int> keys;
-  for (int i = 0; i < FLAGS_total_keys; ++i) {
-    keys.push_back(i);
-  }
-
-  if (FLAGS_random_key) {
-    std::random_shuffle(keys.begin(), keys.end());
-  }
-
-  for (const int i : keys) {
-    std::string key = "k" + std::to_string(i);
-    std::string value = "v" + std::to_string(i);
-
-    perf_context.Reset();
-    db->Put(write_options, key, value);
-    hist_write_pre_post.Add(perf_context.write_pre_and_post_process_time);
-    hist_write_wal_time.Add(perf_context.write_wal_time);
-    hist_write_memtable_time.Add(perf_context.write_memtable_time);
-    hist_put.Add(perf_context.user_key_comparison_count);
-
-    perf_context.Reset();
-    db->Get(read_options, key, &value);
-    hist_get_snapshot.Add(perf_context.get_snapshot_time);
-    hist_get_memtable.Add(perf_context.get_from_memtable_time);
-    hist_num_memtable_checked.Add(perf_context.get_from_memtable_count);
-    hist_get_post_process.Add(perf_context.get_post_process_time);
-    hist_get.Add(perf_context.user_key_comparison_count);
-  }
-
-  std::cout << "Put uesr key comparison: \n" << hist_put.ToString()
-            << "Get uesr key comparison: \n" << hist_get.ToString();
-  std::cout << "Put(): Pre and Post Process Time: \n"
-            << hist_write_pre_post.ToString()
-            << " Writing WAL time: \n"
-            << hist_write_wal_time.ToString() << "\n"
-            << " Writing Mem Table time: \n"
-            << hist_write_memtable_time.ToString() << "\n";
-
-  std::cout << "Get(): Time to get snapshot: \n"
-            << hist_get_snapshot.ToString()
-            << " Time to get value from memtables: \n"
-            << hist_get_memtable.ToString() << "\n"
-            << " Number of memtables checked: \n"
-            << hist_num_memtable_checked.ToString() << "\n"
-            << " Time to post process: \n"
-            << hist_get_post_process.ToString() << "\n";
-}
-
-TEST(PerfContextTest, KeyComparisonCount) {
-  SetPerfLevel(kEnableCount);
-  ProfileKeyComparison();
-
-  SetPerfLevel(kDisable);
-  ProfileKeyComparison();
-
-  SetPerfLevel(kEnableTime);
-  ProfileKeyComparison();
-}
-
-// make perf_context_test
-// export ROCKSDB_TESTS=PerfContextTest.SeekKeyComparison
-// For one memtable:
-// ./perf_context_test --write_buffer_size=500000 --total_keys=10000
-// For two memtables:
-// ./perf_context_test --write_buffer_size=250000 --total_keys=10000
-// Specify --random_key=1 to shuffle the key before insertion
-// Results show that, for sequential insertion, worst-case Seek Key comparison
-// is close to the total number of keys (linear), when there is only one
-// memtable. When there are two memtables, even the avg Seek Key comparison
-// starts to become linear to the input size.
-
-TEST(PerfContextTest, SeekKeyComparison) {
-  DestroyDB(kDbName, Options());
-  auto db = OpenDb();
-  WriteOptions write_options;
-  ReadOptions read_options;
-
-  std::cout << "Inserting " << FLAGS_total_keys << " key/value pairs\n...\n";
-
-  std::vector<int> keys;
-  for (int i = 0; i < FLAGS_total_keys; ++i) {
-    keys.push_back(i);
-  }
-
-  if (FLAGS_random_key) {
-    std::random_shuffle(keys.begin(), keys.end());
-  }
-
-  HistogramImpl hist_put_time;
-  HistogramImpl hist_wal_time;
-  HistogramImpl hist_time_diff;
-
-  SetPerfLevel(kEnableTime);
-  StopWatchNano timer(Env::Default());
-  for (const int i : keys) {
-    std::string key = "k" + std::to_string(i);
-    std::string value = "v" + std::to_string(i);
-
-    perf_context.Reset();
-    timer.Start();
-    db->Put(write_options, key, value);
-    auto put_time = timer.ElapsedNanos();
-    hist_put_time.Add(put_time);
-    hist_wal_time.Add(perf_context.write_wal_time);
-    hist_time_diff.Add(put_time - perf_context.write_wal_time);
-  }
-
-  std::cout << "Put time:\n" << hist_put_time.ToString()
-            << "WAL time:\n" << hist_wal_time.ToString()
-            << "time diff:\n" << hist_time_diff.ToString();
-
-  HistogramImpl hist_seek;
-  HistogramImpl hist_next;
-
-  for (int i = 0; i < FLAGS_total_keys; ++i) {
-    std::string key = "k" + std::to_string(i);
-    std::string value = "v" + std::to_string(i);
-
-    std::unique_ptr<Iterator> iter(db->NewIterator(read_options));
-    perf_context.Reset();
-    iter->Seek(key);
-    ASSERT_TRUE(iter->Valid());
-    ASSERT_EQ(iter->value().ToString(), value);
-    hist_seek.Add(perf_context.user_key_comparison_count);
-  }
-
-  std::unique_ptr<Iterator> iter(db->NewIterator(read_options));
-  for (iter->SeekToFirst(); iter->Valid();) {
-    perf_context.Reset();
-    iter->Next();
-    hist_next.Add(perf_context.user_key_comparison_count);
-  }
-
-  std::cout << "Seek:\n" << hist_seek.ToString()
-            << "Next:\n" << hist_next.ToString();
-}
-
-}
-
-int main(int argc, char** argv) {
-
-  for (int i = 1; i < argc; i++) {
-    int n;
-    char junk;
-
-    if (sscanf(argv[i], "--write_buffer_size=%d%c", &n, &junk) == 1) {
-      FLAGS_write_buffer_size = n;
-    }
-
-    if (sscanf(argv[i], "--total_keys=%d%c", &n, &junk) == 1) {
-      FLAGS_total_keys = n;
-    }
-
-    if (sscanf(argv[i], "--random_key=%d%c", &n, &junk) == 1 &&
-        (n == 0 || n == 1)) {
-      FLAGS_random_key = n;
-    }
-
-    if (sscanf(argv[i], "--use_set_based_memetable=%d%c", &n, &junk) == 1 &&
-        (n == 0 || n == 1)) {
-      FLAGS_use_set_based_memetable = n;
-    }
-
-  }
-
-  std::cout << kDbName << "\n";
-
-  rocksdb::test::RunAllTests();
-  return 0;
-}
diff --git a/src/rocksdb/db/plain_table_db_test.cc b/src/rocksdb/db/plain_table_db_test.cc
deleted file mode 100644
index 17e3e61..0000000
--- a/src/rocksdb/db/plain_table_db_test.cc
+++ /dev/null
@@ -1,853 +0,0 @@
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#include <algorithm>
-#include <set>
-
-#include "db/db_impl.h"
-#include "db/filename.h"
-#include "db/version_set.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/cache.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "table/meta_blocks.h"
-#include "table/plain_table_factory.h"
-#include "table/plain_table_reader.h"
-#include "util/hash.h"
-#include "util/logging.h"
-#include "util/mutexlock.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-#include "utilities/merge_operators.h"
-
-using std::unique_ptr;
-
-namespace rocksdb {
-
-class PlainTableDBTest {
- protected:
- private:
-  std::string dbname_;
-  Env* env_;
-  DB* db_;
-
-  Options last_options_;
-
- public:
-  PlainTableDBTest() : env_(Env::Default()) {
-    dbname_ = test::TmpDir() + "/plain_table_db_test";
-    ASSERT_OK(DestroyDB(dbname_, Options()));
-    db_ = nullptr;
-    Reopen();
-  }
-
-  ~PlainTableDBTest() {
-    delete db_;
-    ASSERT_OK(DestroyDB(dbname_, Options()));
-  }
-
-  // Return the current option configuration.
-  Options CurrentOptions() {
-    Options options;
-    options.table_factory.reset(NewPlainTableFactory(16, 2, 0.8, 3));
-    options.prefix_extractor.reset(NewFixedPrefixTransform(8));
-    options.allow_mmap_reads = true;
-    return options;
-  }
-
-  DBImpl* dbfull() {
-    return reinterpret_cast<DBImpl*>(db_);
-  }
-
-  void Reopen(Options* options = nullptr) {
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void Close() {
-    delete db_;
-    db_ = nullptr;
-  }
-
-  void DestroyAndReopen(Options* options = nullptr) {
-    //Destroy using last options
-    Destroy(&last_options_);
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void Destroy(Options* options) {
-    delete db_;
-    db_ = nullptr;
-    ASSERT_OK(DestroyDB(dbname_, *options));
-  }
-
-  Status PureReopen(Options* options, DB** db) {
-    return DB::Open(*options, dbname_, db);
-  }
-
-  Status TryReopen(Options* options = nullptr) {
-    delete db_;
-    db_ = nullptr;
-    Options opts;
-    if (options != nullptr) {
-      opts = *options;
-    } else {
-      opts = CurrentOptions();
-      opts.create_if_missing = true;
-    }
-    last_options_ = opts;
-
-    return DB::Open(opts, dbname_, &db_);
-  }
-
-  Status Put(const Slice& k, const Slice& v) {
-    return db_->Put(WriteOptions(), k, v);
-  }
-
-  Status Delete(const std::string& k) {
-    return db_->Delete(WriteOptions(), k);
-  }
-
-  std::string Get(const std::string& k, const Snapshot* snapshot = nullptr) {
-    ReadOptions options;
-    options.snapshot = snapshot;
-    std::string result;
-    Status s = db_->Get(options, k, &result);
-    if (s.IsNotFound()) {
-      result = "NOT_FOUND";
-    } else if (!s.ok()) {
-      result = s.ToString();
-    }
-    return result;
-  }
-
-
-  int NumTableFilesAtLevel(int level) {
-    std::string property;
-    ASSERT_TRUE(
-        db_->GetProperty("rocksdb.num-files-at-level" + NumberToString(level),
-                         &property));
-    return atoi(property.c_str());
-  }
-
-  // Return spread of files per level
-  std::string FilesPerLevel() {
-    std::string result;
-    int last_non_zero_offset = 0;
-    for (int level = 0; level < db_->NumberLevels(); level++) {
-      int f = NumTableFilesAtLevel(level);
-      char buf[100];
-      snprintf(buf, sizeof(buf), "%s%d", (level ? "," : ""), f);
-      result += buf;
-      if (f > 0) {
-        last_non_zero_offset = result.size();
-      }
-    }
-    result.resize(last_non_zero_offset);
-    return result;
-  }
-
-  std::string IterStatus(Iterator* iter) {
-    std::string result;
-    if (iter->Valid()) {
-      result = iter->key().ToString() + "->" + iter->value().ToString();
-    } else {
-      result = "(invalid)";
-    }
-    return result;
-  }
-};
-
-TEST(PlainTableDBTest, Empty) {
-  ASSERT_TRUE(dbfull() != nullptr);
-  ASSERT_EQ("NOT_FOUND", Get("0000000000000foo"));
-}
-
-class TestPlainTableReader : public PlainTableReader {
- public:
-  TestPlainTableReader(const EnvOptions& storage_options,
-                       const InternalKeyComparator& icomparator,
-                       uint64_t file_size, int bloom_bits_per_key,
-                       double hash_table_ratio, size_t index_sparseness,
-                       const TableProperties* table_properties,
-                       unique_ptr<RandomAccessFile>&& file,
-                       const Options& options, bool* expect_bloom_not_match)
-      : PlainTableReader(options, std::move(file), storage_options, icomparator,
-                         file_size, bloom_bits_per_key, hash_table_ratio,
-                         index_sparseness, table_properties, 2 * 1024 * 1024),
-        expect_bloom_not_match_(expect_bloom_not_match) {
-    Status s = PopulateIndex(const_cast<TableProperties*>(table_properties));
-    ASSERT_TRUE(s.ok());
-  }
-
-  virtual ~TestPlainTableReader() {}
-
- private:
-  virtual bool MatchBloom(uint32_t hash) const override {
-    bool ret = PlainTableReader::MatchBloom(hash);
-    ASSERT_TRUE(!*expect_bloom_not_match_ || !ret);
-    return ret;
-  }
-  bool* expect_bloom_not_match_;
-};
-
-extern const uint64_t kPlainTableMagicNumber;
-class TestPlainTableFactory : public PlainTableFactory {
- public:
-  explicit TestPlainTableFactory(bool* expect_bloom_not_match,
-                                 uint32_t user_key_len, int bloom_bits_per_key,
-                                 double hash_table_ratio,
-                                 size_t index_sparseness,
-                                 size_t huge_page_tlb_size)
-      : PlainTableFactory(user_key_len, user_key_len, hash_table_ratio,
-                          index_sparseness, huge_page_tlb_size),
-        bloom_bits_per_key_(bloom_bits_per_key),
-        hash_table_ratio_(hash_table_ratio),
-        index_sparseness_(index_sparseness),
-        expect_bloom_not_match_(expect_bloom_not_match) {}
-
-  Status NewTableReader(const Options& options, const EnvOptions& soptions,
-                        const InternalKeyComparator& internal_comparator,
-                        unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-                        unique_ptr<TableReader>* table) const override {
-    TableProperties* props = nullptr;
-    auto s = ReadTableProperties(file.get(), file_size, kPlainTableMagicNumber,
-                                 options.env, options.info_log.get(), &props);
-    ASSERT_TRUE(s.ok());
-
-    std::unique_ptr<PlainTableReader> new_reader(new TestPlainTableReader(
-        soptions, internal_comparator, file_size, bloom_bits_per_key_,
-        hash_table_ratio_, index_sparseness_, props, std::move(file), options,
-        expect_bloom_not_match_));
-
-    *table = std::move(new_reader);
-    return s;
-  }
-
- private:
-  int bloom_bits_per_key_;
-  double hash_table_ratio_;
-  size_t index_sparseness_;
-  bool* expect_bloom_not_match_;
-};
-
-TEST(PlainTableDBTest, Flush) {
-  for (size_t huge_page_tlb_size = 0; huge_page_tlb_size <= 2 * 1024 * 1024;
-       huge_page_tlb_size += 2 * 1024 * 1024) {
-    for (int bloom_bits = 0; bloom_bits <= 117; bloom_bits += 117) {
-      for (int total_order = 0; total_order <= 1; total_order++) {
-        Options options = CurrentOptions();
-        options.create_if_missing = true;
-        // Set only one bucket to force bucket conflict.
-        // Test index interval for the same prefix to be 1, 2 and 4
-        if (total_order) {
-          options.table_factory.reset(NewTotalOrderPlainTableFactory(
-              16, bloom_bits, 2, huge_page_tlb_size));
-        } else {
-          options.table_factory.reset(NewPlainTableFactory(
-              16, bloom_bits, 0.75, 16, huge_page_tlb_size));
-        }
-        DestroyAndReopen(&options);
-
-        ASSERT_OK(Put("1000000000000foo", "v1"));
-        ASSERT_OK(Put("0000000000000bar", "v2"));
-        ASSERT_OK(Put("1000000000000foo", "v3"));
-        dbfull()->TEST_FlushMemTable();
-
-        TablePropertiesCollection ptc;
-        reinterpret_cast<DB*>(dbfull())->GetPropertiesOfAllTables(&ptc);
-        ASSERT_EQ(1U, ptc.size());
-        auto row = ptc.begin();
-        auto tp = row->second;
-        ASSERT_EQ(total_order ? "4" : "12", (tp->user_collected_properties).at(
-                                                "plain_table_hash_table_size"));
-        ASSERT_EQ(total_order ? "9" : "0", (tp->user_collected_properties).at(
-                                               "plain_table_sub_index_size"));
-
-        ASSERT_EQ("v3", Get("1000000000000foo"));
-        ASSERT_EQ("v2", Get("0000000000000bar"));
-      }
-    }
-  }
-}
-
-TEST(PlainTableDBTest, Flush2) {
-  for (size_t huge_page_tlb_size = 0; huge_page_tlb_size <= 2 * 1024 * 1024;
-       huge_page_tlb_size += 2 * 1024 * 1024) {
-    for (int bloom_bits = 0; bloom_bits <= 117; bloom_bits += 117) {
-      for (int total_order = 0; total_order <= 1; total_order++) {
-        bool expect_bloom_not_match = false;
-        Options options = CurrentOptions();
-        options.create_if_missing = true;
-        // Set only one bucket to force bucket conflict.
-        // Test index interval for the same prefix to be 1, 2 and 4
-        if (total_order) {
-          options.prefix_extractor = nullptr;
-          options.table_factory.reset(
-              new TestPlainTableFactory(&expect_bloom_not_match, 16, bloom_bits,
-                                        0, 2, huge_page_tlb_size));
-        } else {
-          options.table_factory.reset(
-              new TestPlainTableFactory(&expect_bloom_not_match, 16, bloom_bits,
-                                        0.75, 16, huge_page_tlb_size));
-        }
-        DestroyAndReopen(&options);
-        ASSERT_OK(Put("0000000000000bar", "b"));
-        ASSERT_OK(Put("1000000000000foo", "v1"));
-        dbfull()->TEST_FlushMemTable();
-
-        ASSERT_OK(Put("1000000000000foo", "v2"));
-        dbfull()->TEST_FlushMemTable();
-        ASSERT_EQ("v2", Get("1000000000000foo"));
-
-        ASSERT_OK(Put("0000000000000eee", "v3"));
-        dbfull()->TEST_FlushMemTable();
-        ASSERT_EQ("v3", Get("0000000000000eee"));
-
-        ASSERT_OK(Delete("0000000000000bar"));
-        dbfull()->TEST_FlushMemTable();
-        ASSERT_EQ("NOT_FOUND", Get("0000000000000bar"));
-
-        ASSERT_OK(Put("0000000000000eee", "v5"));
-        ASSERT_OK(Put("9000000000000eee", "v5"));
-        dbfull()->TEST_FlushMemTable();
-        ASSERT_EQ("v5", Get("0000000000000eee"));
-
-        // Test Bloom Filter
-        if (bloom_bits > 0) {
-          // Neither key nor value should exist.
-          expect_bloom_not_match = true;
-          ASSERT_EQ("NOT_FOUND", Get("5_not00000000bar"));
-
-          // Key doesn't exist any more but prefix exists.
-          if (total_order) {
-            ASSERT_EQ("NOT_FOUND", Get("1000000000000not"));
-            ASSERT_EQ("NOT_FOUND", Get("0000000000000not"));
-          }
-          expect_bloom_not_match = false;
-        }
-      }
-    }
-  }
-}
-
-TEST(PlainTableDBTest, Iterator) {
-  for (size_t huge_page_tlb_size = 0; huge_page_tlb_size <= 2 * 1024 * 1024;
-       huge_page_tlb_size += 2 * 1024 * 1024) {
-    for (int bloom_bits = 0; bloom_bits <= 117; bloom_bits += 117) {
-      for (int total_order = 0; total_order <= 1; total_order++) {
-        bool expect_bloom_not_match = false;
-        Options options = CurrentOptions();
-        options.create_if_missing = true;
-        // Set only one bucket to force bucket conflict.
-        // Test index interval for the same prefix to be 1, 2 and 4
-        if (total_order) {
-          options.prefix_extractor = nullptr;
-          options.table_factory.reset(
-              new TestPlainTableFactory(&expect_bloom_not_match, 16, bloom_bits,
-                                        0, 2, huge_page_tlb_size));
-        } else {
-          options.table_factory.reset(
-              new TestPlainTableFactory(&expect_bloom_not_match, 16, bloom_bits,
-                                        0.75, 16, huge_page_tlb_size));
-        }
-        DestroyAndReopen(&options);
-
-        ASSERT_OK(Put("1000000000foo002", "v_2"));
-        ASSERT_OK(Put("0000000000000bar", "random"));
-        ASSERT_OK(Put("1000000000foo001", "v1"));
-        ASSERT_OK(Put("3000000000000bar", "bar_v"));
-        ASSERT_OK(Put("1000000000foo003", "v__3"));
-        ASSERT_OK(Put("1000000000foo004", "v__4"));
-        ASSERT_OK(Put("1000000000foo005", "v__5"));
-        ASSERT_OK(Put("1000000000foo007", "v__7"));
-        ASSERT_OK(Put("1000000000foo008", "v__8"));
-        dbfull()->TEST_FlushMemTable();
-        ASSERT_EQ("v1", Get("1000000000foo001"));
-        ASSERT_EQ("v__3", Get("1000000000foo003"));
-        Iterator* iter = dbfull()->NewIterator(ReadOptions());
-        iter->Seek("1000000000foo000");
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo001", iter->key().ToString());
-        ASSERT_EQ("v1", iter->value().ToString());
-
-        iter->Next();
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo002", iter->key().ToString());
-        ASSERT_EQ("v_2", iter->value().ToString());
-
-        iter->Next();
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo003", iter->key().ToString());
-        ASSERT_EQ("v__3", iter->value().ToString());
-
-        iter->Next();
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo004", iter->key().ToString());
-        ASSERT_EQ("v__4", iter->value().ToString());
-
-        iter->Seek("3000000000000bar");
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("3000000000000bar", iter->key().ToString());
-        ASSERT_EQ("bar_v", iter->value().ToString());
-
-        iter->Seek("1000000000foo000");
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo001", iter->key().ToString());
-        ASSERT_EQ("v1", iter->value().ToString());
-
-        iter->Seek("1000000000foo005");
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo005", iter->key().ToString());
-        ASSERT_EQ("v__5", iter->value().ToString());
-
-        iter->Seek("1000000000foo006");
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo007", iter->key().ToString());
-        ASSERT_EQ("v__7", iter->value().ToString());
-
-        iter->Seek("1000000000foo008");
-        ASSERT_TRUE(iter->Valid());
-        ASSERT_EQ("1000000000foo008", iter->key().ToString());
-        ASSERT_EQ("v__8", iter->value().ToString());
-
-        if (total_order == 0) {
-          iter->Seek("1000000000foo009");
-          ASSERT_TRUE(iter->Valid());
-          ASSERT_EQ("3000000000000bar", iter->key().ToString());
-        }
-
-        // Test Bloom Filter
-        if (bloom_bits > 0) {
-          if (!total_order) {
-            // Neither key nor value should exist.
-            expect_bloom_not_match = true;
-            iter->Seek("2not000000000bar");
-            ASSERT_TRUE(!iter->Valid());
-            ASSERT_EQ("NOT_FOUND", Get("2not000000000bar"));
-            expect_bloom_not_match = false;
-          } else {
-            expect_bloom_not_match = true;
-            ASSERT_EQ("NOT_FOUND", Get("2not000000000bar"));
-            expect_bloom_not_match = false;
-          }
-        }
-
-        delete iter;
-      }
-    }
-  }
-}
-
-namespace {
-std::string MakeLongKey(size_t length, char c) {
-  return std::string(length, c);
-}
-}  // namespace
-
-TEST(PlainTableDBTest, IteratorLargeKeys) {
-  Options options = CurrentOptions();
-  options.table_factory.reset(NewTotalOrderPlainTableFactory(0, 0, 16));
-  options.create_if_missing = true;
-  options.prefix_extractor.reset();
-  DestroyAndReopen(&options);
-
-  std::string key_list[] = {
-      MakeLongKey(30, '0'),
-      MakeLongKey(16, '1'),
-      MakeLongKey(32, '2'),
-      MakeLongKey(60, '3'),
-      MakeLongKey(90, '4'),
-      MakeLongKey(50, '5'),
-      MakeLongKey(26, '6')
-  };
-
-  for (size_t i = 0; i < 7; i++) {
-    ASSERT_OK(Put(key_list[i], std::to_string(i)));
-  }
-
-  dbfull()->TEST_FlushMemTable();
-
-  Iterator* iter = dbfull()->NewIterator(ReadOptions());
-  iter->Seek(key_list[0]);
-
-  for (size_t i = 0; i < 7; i++) {
-    ASSERT_TRUE(iter->Valid());
-    ASSERT_EQ(key_list[i], iter->key().ToString());
-    ASSERT_EQ(std::to_string(i), iter->value().ToString());
-    iter->Next();
-  }
-
-  ASSERT_TRUE(!iter->Valid());
-
-  delete iter;
-}
-
-// A test comparator which compare two strings in this way:
-// (1) first compare prefix of 8 bytes in alphabet order,
-// (2) if two strings share the same prefix, sort the other part of the string
-//     in the reverse alphabet order.
-class SimpleSuffixReverseComparator : public Comparator {
- public:
-  SimpleSuffixReverseComparator() {}
-
-  virtual const char* Name() const { return "SimpleSuffixReverseComparator"; }
-
-  virtual int Compare(const Slice& a, const Slice& b) const {
-    Slice prefix_a = Slice(a.data(), 8);
-    Slice prefix_b = Slice(b.data(), 8);
-    int prefix_comp = prefix_a.compare(prefix_b);
-    if (prefix_comp != 0) {
-      return prefix_comp;
-    } else {
-      Slice suffix_a = Slice(a.data() + 8, a.size() - 8);
-      Slice suffix_b = Slice(b.data() + 8, b.size() - 8);
-      return -(suffix_a.compare(suffix_b));
-    }
-  }
-  virtual void FindShortestSeparator(std::string* start,
-                                     const Slice& limit) const {}
-
-  virtual void FindShortSuccessor(std::string* key) const {}
-};
-
-TEST(PlainTableDBTest, IteratorReverseSuffixComparator) {
-  Options options = CurrentOptions();
-  options.create_if_missing = true;
-  // Set only one bucket to force bucket conflict.
-  // Test index interval for the same prefix to be 1, 2 and 4
-  SimpleSuffixReverseComparator comp;
-  options.comparator = ∁
-  DestroyAndReopen(&options);
-
-  ASSERT_OK(Put("1000000000foo002", "v_2"));
-  ASSERT_OK(Put("0000000000000bar", "random"));
-  ASSERT_OK(Put("1000000000foo001", "v1"));
-  ASSERT_OK(Put("3000000000000bar", "bar_v"));
-  ASSERT_OK(Put("1000000000foo003", "v__3"));
-  ASSERT_OK(Put("1000000000foo004", "v__4"));
-  ASSERT_OK(Put("1000000000foo005", "v__5"));
-  ASSERT_OK(Put("1000000000foo007", "v__7"));
-  ASSERT_OK(Put("1000000000foo008", "v__8"));
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_EQ("v1", Get("1000000000foo001"));
-  ASSERT_EQ("v__3", Get("1000000000foo003"));
-  Iterator* iter = dbfull()->NewIterator(ReadOptions());
-  iter->Seek("1000000000foo009");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo008", iter->key().ToString());
-  ASSERT_EQ("v__8", iter->value().ToString());
-
-  iter->Next();
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo007", iter->key().ToString());
-  ASSERT_EQ("v__7", iter->value().ToString());
-
-  iter->Next();
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo005", iter->key().ToString());
-  ASSERT_EQ("v__5", iter->value().ToString());
-
-  iter->Next();
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo004", iter->key().ToString());
-  ASSERT_EQ("v__4", iter->value().ToString());
-
-  iter->Seek("3000000000000bar");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("3000000000000bar", iter->key().ToString());
-  ASSERT_EQ("bar_v", iter->value().ToString());
-
-  iter->Seek("1000000000foo005");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo005", iter->key().ToString());
-  ASSERT_EQ("v__5", iter->value().ToString());
-
-  iter->Seek("1000000000foo006");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo005", iter->key().ToString());
-  ASSERT_EQ("v__5", iter->value().ToString());
-
-  iter->Seek("1000000000foo008");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("1000000000foo008", iter->key().ToString());
-  ASSERT_EQ("v__8", iter->value().ToString());
-
-  iter->Seek("1000000000foo000");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("3000000000000bar", iter->key().ToString());
-
-  delete iter;
-}
-
-TEST(PlainTableDBTest, HashBucketConflict) {
-  for (size_t huge_page_tlb_size = 0; huge_page_tlb_size <= 2 * 1024 * 1024;
-       huge_page_tlb_size += 2 * 1024 * 1024) {
-    for (unsigned char i = 1; i <= 3; i++) {
-      Options options = CurrentOptions();
-      options.create_if_missing = true;
-      // Set only one bucket to force bucket conflict.
-      // Test index interval for the same prefix to be 1, 2 and 4
-      options.table_factory.reset(
-          NewTotalOrderPlainTableFactory(16, 0, 2 ^ i, huge_page_tlb_size));
-      DestroyAndReopen(&options);
-      ASSERT_OK(Put("5000000000000fo0", "v1"));
-      ASSERT_OK(Put("5000000000000fo1", "v2"));
-      ASSERT_OK(Put("5000000000000fo2", "v"));
-      ASSERT_OK(Put("2000000000000fo0", "v3"));
-      ASSERT_OK(Put("2000000000000fo1", "v4"));
-      ASSERT_OK(Put("2000000000000fo2", "v"));
-      ASSERT_OK(Put("2000000000000fo3", "v"));
-
-      dbfull()->TEST_FlushMemTable();
-
-      ASSERT_EQ("v1", Get("5000000000000fo0"));
-      ASSERT_EQ("v2", Get("5000000000000fo1"));
-      ASSERT_EQ("v3", Get("2000000000000fo0"));
-      ASSERT_EQ("v4", Get("2000000000000fo1"));
-
-      ASSERT_EQ("NOT_FOUND", Get("5000000000000bar"));
-      ASSERT_EQ("NOT_FOUND", Get("2000000000000bar"));
-      ASSERT_EQ("NOT_FOUND", Get("5000000000000fo8"));
-      ASSERT_EQ("NOT_FOUND", Get("2000000000000fo8"));
-
-      ReadOptions ro;
-      Iterator* iter = dbfull()->NewIterator(ro);
-
-      iter->Seek("5000000000000fo0");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo0", iter->key().ToString());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo1", iter->key().ToString());
-
-      iter->Seek("5000000000000fo1");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo1", iter->key().ToString());
-
-      iter->Seek("2000000000000fo0");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo0", iter->key().ToString());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo1", iter->key().ToString());
-
-      iter->Seek("2000000000000fo1");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo1", iter->key().ToString());
-
-      iter->Seek("2000000000000bar");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo0", iter->key().ToString());
-
-      iter->Seek("5000000000000bar");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo0", iter->key().ToString());
-
-      iter->Seek("2000000000000fo8");
-      ASSERT_TRUE(!iter->Valid() ||
-                  options.comparator->Compare(iter->key(), "20000001") > 0);
-
-      iter->Seek("5000000000000fo8");
-      ASSERT_TRUE(!iter->Valid());
-
-      iter->Seek("1000000000000fo2");
-      ASSERT_TRUE(!iter->Valid());
-
-      iter->Seek("3000000000000fo2");
-      ASSERT_TRUE(!iter->Valid());
-
-      iter->Seek("8000000000000fo2");
-      ASSERT_TRUE(!iter->Valid());
-
-      delete iter;
-    }
-  }
-}
-
-TEST(PlainTableDBTest, HashBucketConflictReverseSuffixComparator) {
-  for (size_t huge_page_tlb_size = 0; huge_page_tlb_size <= 2 * 1024 * 1024;
-       huge_page_tlb_size += 2 * 1024 * 1024) {
-    for (unsigned char i = 1; i <= 3; i++) {
-      Options options = CurrentOptions();
-      options.create_if_missing = true;
-      SimpleSuffixReverseComparator comp;
-      options.comparator = ∁
-      // Set only one bucket to force bucket conflict.
-      // Test index interval for the same prefix to be 1, 2 and 4
-      options.table_factory.reset(
-          NewTotalOrderPlainTableFactory(16, 0, 2 ^ i, huge_page_tlb_size));
-      DestroyAndReopen(&options);
-      ASSERT_OK(Put("5000000000000fo0", "v1"));
-      ASSERT_OK(Put("5000000000000fo1", "v2"));
-      ASSERT_OK(Put("5000000000000fo2", "v"));
-      ASSERT_OK(Put("2000000000000fo0", "v3"));
-      ASSERT_OK(Put("2000000000000fo1", "v4"));
-      ASSERT_OK(Put("2000000000000fo2", "v"));
-      ASSERT_OK(Put("2000000000000fo3", "v"));
-
-      dbfull()->TEST_FlushMemTable();
-
-      ASSERT_EQ("v1", Get("5000000000000fo0"));
-      ASSERT_EQ("v2", Get("5000000000000fo1"));
-      ASSERT_EQ("v3", Get("2000000000000fo0"));
-      ASSERT_EQ("v4", Get("2000000000000fo1"));
-
-      ASSERT_EQ("NOT_FOUND", Get("5000000000000bar"));
-      ASSERT_EQ("NOT_FOUND", Get("2000000000000bar"));
-      ASSERT_EQ("NOT_FOUND", Get("5000000000000fo8"));
-      ASSERT_EQ("NOT_FOUND", Get("2000000000000fo8"));
-
-      ReadOptions ro;
-      Iterator* iter = dbfull()->NewIterator(ro);
-
-      iter->Seek("5000000000000fo1");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo1", iter->key().ToString());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo0", iter->key().ToString());
-
-      iter->Seek("5000000000000fo1");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo1", iter->key().ToString());
-
-      iter->Seek("2000000000000fo1");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo1", iter->key().ToString());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo0", iter->key().ToString());
-
-      iter->Seek("2000000000000fo1");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo1", iter->key().ToString());
-
-      iter->Seek("2000000000000var");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("2000000000000fo3", iter->key().ToString());
-
-      iter->Seek("5000000000000var");
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_EQ("5000000000000fo2", iter->key().ToString());
-
-      std::string seek_key = "2000000000000bar";
-      iter->Seek(seek_key);
-      ASSERT_TRUE(!iter->Valid() ||
-                  options.prefix_extractor->Transform(iter->key()) !=
-                      options.prefix_extractor->Transform(seek_key));
-
-      iter->Seek("1000000000000fo2");
-      ASSERT_TRUE(!iter->Valid());
-
-      iter->Seek("3000000000000fo2");
-      ASSERT_TRUE(!iter->Valid());
-
-      iter->Seek("8000000000000fo2");
-      ASSERT_TRUE(!iter->Valid());
-
-      delete iter;
-    }
-  }
-}
-
-TEST(PlainTableDBTest, NonExistingKeyToNonEmptyBucket) {
-  Options options = CurrentOptions();
-  options.create_if_missing = true;
-  // Set only one bucket to force bucket conflict.
-  // Test index interval for the same prefix to be 1, 2 and 4
-  options.table_factory.reset(NewTotalOrderPlainTableFactory(16, 0, 5));
-  DestroyAndReopen(&options);
-  ASSERT_OK(Put("5000000000000fo0", "v1"));
-  ASSERT_OK(Put("5000000000000fo1", "v2"));
-  ASSERT_OK(Put("5000000000000fo2", "v3"));
-
-  dbfull()->TEST_FlushMemTable();
-
-  ASSERT_EQ("v1", Get("5000000000000fo0"));
-  ASSERT_EQ("v2", Get("5000000000000fo1"));
-  ASSERT_EQ("v3", Get("5000000000000fo2"));
-
-  ASSERT_EQ("NOT_FOUND", Get("8000000000000bar"));
-  ASSERT_EQ("NOT_FOUND", Get("1000000000000bar"));
-
-  Iterator* iter = dbfull()->NewIterator(ReadOptions());
-
-  iter->Seek("5000000000000bar");
-  ASSERT_TRUE(iter->Valid());
-  ASSERT_EQ("5000000000000fo0", iter->key().ToString());
-
-  iter->Seek("5000000000000fo8");
-  ASSERT_TRUE(!iter->Valid());
-
-  iter->Seek("1000000000000fo2");
-  ASSERT_TRUE(!iter->Valid());
-
-  iter->Seek("8000000000000fo2");
-  ASSERT_TRUE(!iter->Valid());
-
-  delete iter;
-}
-
-static std::string Key(int i) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "key_______%06d", i);
-  return std::string(buf);
-}
-
-static std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-
-TEST(PlainTableDBTest, CompactionTrigger) {
-  Options options = CurrentOptions();
-  options.write_buffer_size = 100 << 10; //100KB
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  options.level0_file_num_compaction_trigger = 3;
-  Reopen(&options);
-
-  Random rnd(301);
-
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 1;
-      num++) {
-    std::vector<std::string> values;
-    // Write 120KB (12 values, each 10K)
-    for (int i = 0; i < 12; i++) {
-      values.push_back(RandomString(&rnd, 10000));
-      ASSERT_OK(Put(Key(i), values[i]));
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    ASSERT_EQ(NumTableFilesAtLevel(0), num + 1);
-  }
-
-  //generate one more file in level-0, and should trigger level-0 compaction
-  std::vector<std::string> values;
-  for (int i = 0; i < 12; i++) {
-    values.push_back(RandomString(&rnd, 10000));
-    ASSERT_OK(Put(Key(i), values[i]));
-  }
-  dbfull()->TEST_WaitForCompact();
-
-  ASSERT_EQ(NumTableFilesAtLevel(0), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1), 1);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/prefix_test.cc b/src/rocksdb/db/prefix_test.cc
deleted file mode 100644
index 3a88fc8..0000000
--- a/src/rocksdb/db/prefix_test.cc
+++ /dev/null
@@ -1,487 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <algorithm>
-#include <iostream>
-#include <vector>
-
-#include <gflags/gflags.h>
-#include "rocksdb/comparator.h"
-#include "rocksdb/db.h"
-#include "rocksdb/perf_context.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/memtablerep.h"
-#include "util/histogram.h"
-#include "util/stop_watch.h"
-#include "util/testharness.h"
-
-DEFINE_bool(trigger_deadlock, false,
-            "issue delete in range scan to trigger PrefixHashMap deadlock");
-DEFINE_uint64(bucket_count, 100000, "number of buckets");
-DEFINE_uint64(num_locks, 10001, "number of locks");
-DEFINE_bool(random_prefix, false, "randomize prefix");
-DEFINE_uint64(total_prefixes, 100000, "total number of prefixes");
-DEFINE_uint64(items_per_prefix, 1, "total number of values per prefix");
-DEFINE_int64(write_buffer_size, 33554432, "");
-DEFINE_int64(max_write_buffer_number, 2, "");
-DEFINE_int64(min_write_buffer_number_to_merge, 1, "");
-DEFINE_int32(skiplist_height, 4, "");
-DEFINE_int32(memtable_prefix_bloom_bits, 10000000, "");
-DEFINE_int32(memtable_prefix_bloom_probes, 10, "");
-DEFINE_int32(memtable_prefix_bloom_huge_page_tlb_size, 2 * 1024 * 1024, "");
-DEFINE_int32(value_size, 40, "");
-
-// Path to the database on file system
-const std::string kDbName = rocksdb::test::TmpDir() + "/prefix_test";
-
-namespace rocksdb {
-
-struct TestKey {
-  uint64_t prefix;
-  uint64_t sorted;
-
-  TestKey(uint64_t prefix, uint64_t sorted) : prefix(prefix), sorted(sorted) {}
-};
-
-// return a slice backed by test_key
-inline Slice TestKeyToSlice(const TestKey& test_key) {
-  return Slice((const char*)&test_key, sizeof(test_key));
-}
-
-inline const TestKey* SliceToTestKey(const Slice& slice) {
-  return (const TestKey*)slice.data();
-}
-
-class TestKeyComparator : public Comparator {
- public:
-
-  // Compare needs to be aware of the possibility of a and/or b is
-  // prefix only
-  virtual int Compare(const Slice& a, const Slice& b) const {
-    const TestKey* key_a = SliceToTestKey(a);
-    const TestKey* key_b = SliceToTestKey(b);
-    if (key_a->prefix != key_b->prefix) {
-      if (key_a->prefix < key_b->prefix) return -1;
-      if (key_a->prefix > key_b->prefix) return 1;
-    } else {
-      ASSERT_TRUE(key_a->prefix == key_b->prefix);
-      // note, both a and b could be prefix only
-      if (a.size() != b.size()) {
-        // one of them is prefix
-        ASSERT_TRUE(
-          (a.size() == sizeof(uint64_t) && b.size() == sizeof(TestKey)) ||
-          (b.size() == sizeof(uint64_t) && a.size() == sizeof(TestKey)));
-        if (a.size() < b.size()) return -1;
-        if (a.size() > b.size()) return 1;
-      } else {
-        // both a and b are prefix
-        if (a.size() == sizeof(uint64_t)) {
-          return 0;
-        }
-
-        // both a and b are whole key
-        ASSERT_TRUE(a.size() == sizeof(TestKey) && b.size() == sizeof(TestKey));
-        if (key_a->sorted < key_b->sorted) return -1;
-        if (key_a->sorted > key_b->sorted) return 1;
-        if (key_a->sorted == key_b->sorted) return 0;
-      }
-    }
-    return 0;
-  }
-
-  virtual const char* Name() const override {
-    return "TestKeyComparator";
-  }
-
-  virtual void FindShortestSeparator(
-      std::string* start,
-      const Slice& limit) const {
-  }
-
-  virtual void FindShortSuccessor(std::string* key) const {}
-
-};
-
-namespace {
-void PutKey(DB* db, WriteOptions write_options, uint64_t prefix,
-            uint64_t suffix, const Slice& value) {
-  TestKey test_key(prefix, suffix);
-  Slice key = TestKeyToSlice(test_key);
-  ASSERT_OK(db->Put(write_options, key, value));
-}
-
-void SeekIterator(Iterator* iter, uint64_t prefix, uint64_t suffix) {
-  TestKey test_key(prefix, suffix);
-  Slice key = TestKeyToSlice(test_key);
-  iter->Seek(key);
-}
-
-const std::string kNotFoundResult = "NOT_FOUND";
-
-std::string Get(DB* db, const ReadOptions& read_options, uint64_t prefix,
-                uint64_t suffix) {
-  TestKey test_key(prefix, suffix);
-  Slice key = TestKeyToSlice(test_key);
-
-  std::string result;
-  Status s = db->Get(read_options, key, &result);
-  if (s.IsNotFound()) {
-    result = kNotFoundResult;
-  } else if (!s.ok()) {
-    result = s.ToString();
-  }
-  return result;
-}
-}  // namespace
-
-class PrefixTest {
- public:
-  std::shared_ptr<DB> OpenDb() {
-    DB* db;
-
-    options.create_if_missing = true;
-    options.write_buffer_size = FLAGS_write_buffer_size;
-    options.max_write_buffer_number = FLAGS_max_write_buffer_number;
-    options.min_write_buffer_number_to_merge =
-      FLAGS_min_write_buffer_number_to_merge;
-
-    options.memtable_prefix_bloom_bits = FLAGS_memtable_prefix_bloom_bits;
-    options.memtable_prefix_bloom_probes = FLAGS_memtable_prefix_bloom_probes;
-    options.memtable_prefix_bloom_huge_page_tlb_size =
-        FLAGS_memtable_prefix_bloom_huge_page_tlb_size;
-
-    Status s = DB::Open(options, kDbName,  &db);
-    ASSERT_OK(s);
-    return std::shared_ptr<DB>(db);
-  }
-
-  void FirstOption() {
-    option_config_ = kBegin;
-  }
-
-  bool NextOptions(int bucket_count) {
-    // skip some options
-    option_config_++;
-    if (option_config_ < kEnd) {
-      options.prefix_extractor.reset(NewFixedPrefixTransform(8));
-      switch(option_config_) {
-        case kHashSkipList:
-          options.memtable_factory.reset(
-              NewHashSkipListRepFactory(bucket_count, FLAGS_skiplist_height));
-          return true;
-        case kHashLinkList:
-          options.memtable_factory.reset(
-              NewHashLinkListRepFactory(bucket_count));
-          return true;
-        case kHashLinkListHugePageTlb:
-          options.memtable_factory.reset(
-              NewHashLinkListRepFactory(bucket_count, 2 * 1024 * 1024));
-          return true;
-        default:
-          return false;
-      }
-    }
-    return false;
-  }
-
-  PrefixTest() : option_config_(kBegin) {
-    options.comparator = new TestKeyComparator();
-  }
-  ~PrefixTest() {
-    delete options.comparator;
-  }
- protected:
-  enum OptionConfig {
-    kBegin,
-    kHashSkipList,
-    kHashLinkList,
-    kHashLinkListHugePageTlb,
-    kEnd
-  };
-  int option_config_;
-  Options options;
-};
-
-TEST(PrefixTest, TestResult) {
-  for (int num_buckets = 1; num_buckets <= 2; num_buckets++) {
-    FirstOption();
-    while (NextOptions(num_buckets)) {
-      std::cout << "*** Mem table: " << options.memtable_factory->Name()
-                << " number of buckets: " << num_buckets
-                << std::endl;
-      DestroyDB(kDbName, Options());
-      auto db = OpenDb();
-      WriteOptions write_options;
-      ReadOptions read_options;
-
-      // 1. Insert one row.
-      Slice v16("v16");
-      PutKey(db.get(), write_options, 1, 6, v16);
-      std::unique_ptr<Iterator> iter(db->NewIterator(read_options));
-      SeekIterator(iter.get(), 1, 6);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v16 == iter->value());
-      SeekIterator(iter.get(), 1, 5);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v16 == iter->value());
-      SeekIterator(iter.get(), 1, 5);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v16 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(!iter->Valid());
-
-      SeekIterator(iter.get(), 2, 0);
-      ASSERT_TRUE(!iter->Valid());
-
-      ASSERT_EQ(v16.ToString(), Get(db.get(), read_options, 1, 6));
-      ASSERT_EQ(kNotFoundResult, Get(db.get(), read_options, 1, 5));
-      ASSERT_EQ(kNotFoundResult, Get(db.get(), read_options, 1, 7));
-      ASSERT_EQ(kNotFoundResult, Get(db.get(), read_options, 0, 6));
-      ASSERT_EQ(kNotFoundResult, Get(db.get(), read_options, 2, 6));
-
-      // 2. Insert an entry for the same prefix as the last entry in the bucket.
-      Slice v17("v17");
-      PutKey(db.get(), write_options, 1, 7, v17);
-      iter.reset(db->NewIterator(read_options));
-      SeekIterator(iter.get(), 1, 7);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-
-      SeekIterator(iter.get(), 1, 6);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v16 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(!iter->Valid());
-
-      SeekIterator(iter.get(), 2, 0);
-      ASSERT_TRUE(!iter->Valid());
-
-      // 3. Insert an entry for the same prefix as the head of the bucket.
-      Slice v15("v15");
-      PutKey(db.get(), write_options, 1, 5, v15);
-      iter.reset(db->NewIterator(read_options));
-
-      SeekIterator(iter.get(), 1, 7);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-
-      SeekIterator(iter.get(), 1, 5);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v15 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v16 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-
-      SeekIterator(iter.get(), 1, 5);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v15 == iter->value());
-
-      ASSERT_EQ(v15.ToString(), Get(db.get(), read_options, 1, 5));
-      ASSERT_EQ(v16.ToString(), Get(db.get(), read_options, 1, 6));
-      ASSERT_EQ(v17.ToString(), Get(db.get(), read_options, 1, 7));
-
-      // 4. Insert an entry with a larger prefix
-      Slice v22("v22");
-      PutKey(db.get(), write_options, 2, 2, v22);
-      iter.reset(db->NewIterator(read_options));
-
-      SeekIterator(iter.get(), 2, 2);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v22 == iter->value());
-      SeekIterator(iter.get(), 2, 0);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v22 == iter->value());
-
-      SeekIterator(iter.get(), 1, 5);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v15 == iter->value());
-
-      SeekIterator(iter.get(), 1, 7);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-
-      // 5. Insert an entry with a smaller prefix
-      Slice v02("v02");
-      PutKey(db.get(), write_options, 0, 2, v02);
-      iter.reset(db->NewIterator(read_options));
-
-      SeekIterator(iter.get(), 0, 2);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v02 == iter->value());
-      SeekIterator(iter.get(), 0, 0);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v02 == iter->value());
-
-      SeekIterator(iter.get(), 2, 0);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v22 == iter->value());
-
-      SeekIterator(iter.get(), 1, 5);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v15 == iter->value());
-
-      SeekIterator(iter.get(), 1, 7);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-
-      // 6. Insert to the beginning and the end of the first prefix
-      Slice v13("v13");
-      Slice v18("v18");
-      PutKey(db.get(), write_options, 1, 3, v13);
-      PutKey(db.get(), write_options, 1, 8, v18);
-      iter.reset(db->NewIterator(read_options));
-      SeekIterator(iter.get(), 1, 7);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-
-      SeekIterator(iter.get(), 1, 3);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v13 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v15 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v16 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v17 == iter->value());
-      iter->Next();
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v18 == iter->value());
-
-      SeekIterator(iter.get(), 0, 0);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v02 == iter->value());
-
-      SeekIterator(iter.get(), 2, 0);
-      ASSERT_TRUE(iter->Valid());
-      ASSERT_TRUE(v22 == iter->value());
-
-      ASSERT_EQ(v22.ToString(), Get(db.get(), read_options, 2, 2));
-      ASSERT_EQ(v02.ToString(), Get(db.get(), read_options, 0, 2));
-      ASSERT_EQ(v13.ToString(), Get(db.get(), read_options, 1, 3));
-      ASSERT_EQ(v15.ToString(), Get(db.get(), read_options, 1, 5));
-      ASSERT_EQ(v16.ToString(), Get(db.get(), read_options, 1, 6));
-      ASSERT_EQ(v17.ToString(), Get(db.get(), read_options, 1, 7));
-      ASSERT_EQ(v18.ToString(), Get(db.get(), read_options, 1, 8));
-    }
-  }
-}
-
-TEST(PrefixTest, DynamicPrefixIterator) {
-  while (NextOptions(FLAGS_bucket_count)) {
-    std::cout << "*** Mem table: " << options.memtable_factory->Name()
-        << std::endl;
-    DestroyDB(kDbName, Options());
-    auto db = OpenDb();
-    WriteOptions write_options;
-    ReadOptions read_options;
-
-    std::vector<uint64_t> prefixes;
-    for (uint64_t i = 0; i < FLAGS_total_prefixes; ++i) {
-      prefixes.push_back(i);
-    }
-
-    if (FLAGS_random_prefix) {
-      std::random_shuffle(prefixes.begin(), prefixes.end());
-    }
-
-    HistogramImpl hist_put_time;
-    HistogramImpl hist_put_comparison;
-
-    // insert x random prefix, each with y continuous element.
-    for (auto prefix : prefixes) {
-       for (uint64_t sorted = 0; sorted < FLAGS_items_per_prefix; sorted++) {
-        TestKey test_key(prefix, sorted);
-
-        Slice key = TestKeyToSlice(test_key);
-        std::string value(FLAGS_value_size, 0);
-
-        perf_context.Reset();
-        StopWatchNano timer(Env::Default(), true);
-        ASSERT_OK(db->Put(write_options, key, value));
-        hist_put_time.Add(timer.ElapsedNanos());
-        hist_put_comparison.Add(perf_context.user_key_comparison_count);
-      }
-    }
-
-    std::cout << "Put key comparison: \n" << hist_put_comparison.ToString()
-              << "Put time: \n" << hist_put_time.ToString();
-
-    // test seek existing keys
-    HistogramImpl hist_seek_time;
-    HistogramImpl hist_seek_comparison;
-
-    std::unique_ptr<Iterator> iter(db->NewIterator(read_options));
-
-    for (auto prefix : prefixes) {
-      TestKey test_key(prefix, FLAGS_items_per_prefix / 2);
-      Slice key = TestKeyToSlice(test_key);
-      std::string value = "v" + std::to_string(0);
-
-      perf_context.Reset();
-      StopWatchNano timer(Env::Default(), true);
-      auto key_prefix = options.prefix_extractor->Transform(key);
-      uint64_t total_keys = 0;
-      for (iter->Seek(key);
-           iter->Valid() && iter->key().starts_with(key_prefix);
-           iter->Next()) {
-        if (FLAGS_trigger_deadlock) {
-          std::cout << "Behold the deadlock!\n";
-          db->Delete(write_options, iter->key());
-        }
-        total_keys++;
-      }
-      hist_seek_time.Add(timer.ElapsedNanos());
-      hist_seek_comparison.Add(perf_context.user_key_comparison_count);
-      ASSERT_EQ(total_keys, FLAGS_items_per_prefix - FLAGS_items_per_prefix/2);
-    }
-
-    std::cout << "Seek key comparison: \n"
-              << hist_seek_comparison.ToString()
-              << "Seek time: \n"
-              << hist_seek_time.ToString();
-
-    // test non-existing keys
-    HistogramImpl hist_no_seek_time;
-    HistogramImpl hist_no_seek_comparison;
-
-    for (auto prefix = FLAGS_total_prefixes;
-         prefix < FLAGS_total_prefixes + 10000;
-         prefix++) {
-      TestKey test_key(prefix, 0);
-      Slice key = TestKeyToSlice(test_key);
-
-      perf_context.Reset();
-      StopWatchNano timer(Env::Default(), true);
-      iter->Seek(key);
-      hist_no_seek_time.Add(timer.ElapsedNanos());
-      hist_no_seek_comparison.Add(perf_context.user_key_comparison_count);
-      ASSERT_TRUE(!iter->Valid());
-    }
-
-    std::cout << "non-existing Seek key comparison: \n"
-              << hist_no_seek_comparison.ToString()
-              << "non-existing Seek time: \n"
-              << hist_no_seek_time.ToString();
-  }
-}
-
-}
-
-int main(int argc, char** argv) {
-  google::ParseCommandLineFlags(&argc, &argv, true);
-  std::cout << kDbName << "\n";
-
-  rocksdb::test::RunAllTests();
-  return 0;
-}
diff --git a/src/rocksdb/db/repair.cc b/src/rocksdb/db/repair.cc
deleted file mode 100644
index 8ae64b2..0000000
--- a/src/rocksdb/db/repair.cc
+++ /dev/null
@@ -1,403 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// We recover the contents of the descriptor from the other files we find.
-// (1) Any log files are first converted to tables
-// (2) We scan every table to compute
-//     (a) smallest/largest for the table
-//     (b) largest sequence number in the table
-// (3) We generate descriptor contents:
-//      - log number is set to zero
-//      - next-file-number is set to 1 + largest file number we found
-//      - last-sequence-number is set to largest sequence# found across
-//        all tables (see 2c)
-//      - compaction pointers are cleared
-//      - every table file is added at level 0
-//
-// Possible optimization 1:
-//   (a) Compute total size and use to pick appropriate max-level M
-//   (b) Sort tables by largest sequence# in the table
-//   (c) For each table: if it overlaps earlier table, place in level-0,
-//       else place in level-M.
-// Possible optimization 2:
-//   Store per-table metadata (smallest, largest, largest-seq#, ...)
-//   in the table's meta section to speed up ScanTable.
-
-#ifndef ROCKSDB_LITE
-
-#include "db/builder.h"
-#include "db/db_impl.h"
-#include "db/dbformat.h"
-#include "db/filename.h"
-#include "db/log_reader.h"
-#include "db/log_writer.h"
-#include "db/memtable.h"
-#include "db/table_cache.h"
-#include "db/version_edit.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-
-namespace rocksdb {
-
-namespace {
-
-class Repairer {
- public:
-  Repairer(const std::string& dbname, const Options& options)
-      : dbname_(dbname),
-        env_(options.env),
-        icmp_(options.comparator),
-        ipolicy_(options.filter_policy),
-        options_(SanitizeOptions(dbname, &icmp_, &ipolicy_, options)),
-        raw_table_cache_(
-            // TableCache can be small since we expect each table to be opened
-            // once.
-            NewLRUCache(10, options_.table_cache_numshardbits,
-                        options_.table_cache_remove_scan_count_limit)),
-        next_file_number_(1) {
-    table_cache_ = new TableCache(dbname_, &options_, storage_options_,
-                                  raw_table_cache_.get());
-    edit_ = new VersionEdit();
-  }
-
-  ~Repairer() {
-    delete table_cache_;
-    raw_table_cache_.reset();
-    delete edit_;
-  }
-
-  Status Run() {
-    Status status = FindFiles();
-    if (status.ok()) {
-      ConvertLogFilesToTables();
-      ExtractMetaData();
-      status = WriteDescriptor();
-    }
-    if (status.ok()) {
-      unsigned long long bytes = 0;
-      for (size_t i = 0; i < tables_.size(); i++) {
-        bytes += tables_[i].meta.file_size;
-      }
-      Log(options_.info_log,
-          "**** Repaired rocksdb %s; "
-          "recovered %d files; %llu bytes. "
-          "Some data may have been lost. "
-          "****",
-          dbname_.c_str(),
-          static_cast<int>(tables_.size()),
-          bytes);
-    }
-    return status;
-  }
-
- private:
-  struct TableInfo {
-    FileMetaData meta;
-    SequenceNumber min_sequence;
-    SequenceNumber max_sequence;
-  };
-
-  std::string const dbname_;
-  Env* const env_;
-  InternalKeyComparator const icmp_;
-  InternalFilterPolicy const ipolicy_;
-  Options const options_;
-  std::shared_ptr<Cache> raw_table_cache_;
-  TableCache* table_cache_;
-  VersionEdit* edit_;
-
-  std::vector<std::string> manifests_;
-  std::vector<uint64_t> table_numbers_;
-  std::vector<uint64_t> logs_;
-  std::vector<TableInfo> tables_;
-  uint64_t next_file_number_;
-  const EnvOptions storage_options_;
-
-  Status FindFiles() {
-    std::vector<std::string> filenames;
-    Status status = env_->GetChildren(dbname_, &filenames);
-    if (!status.ok()) {
-      return status;
-    }
-    if (filenames.empty()) {
-      return Status::Corruption(dbname_, "repair found no files");
-    }
-
-    uint64_t number;
-    FileType type;
-    for (size_t i = 0; i < filenames.size(); i++) {
-      if (ParseFileName(filenames[i], &number, &type)) {
-        if (type == kDescriptorFile) {
-          manifests_.push_back(filenames[i]);
-        } else {
-          if (number + 1 > next_file_number_) {
-            next_file_number_ = number + 1;
-          }
-          if (type == kLogFile) {
-            logs_.push_back(number);
-          } else if (type == kTableFile) {
-            table_numbers_.push_back(number);
-          } else {
-            // Ignore other files
-          }
-        }
-      }
-    }
-    return status;
-  }
-
-  void ConvertLogFilesToTables() {
-    for (size_t i = 0; i < logs_.size(); i++) {
-      std::string logname = LogFileName(dbname_, logs_[i]);
-      Status status = ConvertLogToTable(logs_[i]);
-      if (!status.ok()) {
-        Log(options_.info_log, "Log #%llu: ignoring conversion error: %s",
-            (unsigned long long) logs_[i],
-            status.ToString().c_str());
-      }
-      ArchiveFile(logname);
-    }
-  }
-
-  Status ConvertLogToTable(uint64_t log) {
-    struct LogReporter : public log::Reader::Reporter {
-      Env* env;
-      std::shared_ptr<Logger> info_log;
-      uint64_t lognum;
-      virtual void Corruption(size_t bytes, const Status& s) {
-        // We print error messages for corruption, but continue repairing.
-        Log(info_log, "Log #%llu: dropping %d bytes; %s",
-            (unsigned long long) lognum,
-            static_cast<int>(bytes),
-            s.ToString().c_str());
-      }
-    };
-
-    // Open the log file
-    std::string logname = LogFileName(dbname_, log);
-    unique_ptr<SequentialFile> lfile;
-    Status status = env_->NewSequentialFile(logname, &lfile, storage_options_);
-    if (!status.ok()) {
-      return status;
-    }
-
-    // Create the log reader.
-    LogReporter reporter;
-    reporter.env = env_;
-    reporter.info_log = options_.info_log;
-    reporter.lognum = log;
-    // We intentially make log::Reader do checksumming so that
-    // corruptions cause entire commits to be skipped instead of
-    // propagating bad information (like overly large sequence
-    // numbers).
-    log::Reader reader(std::move(lfile), &reporter, false/*do not checksum*/,
-                       0/*initial_offset*/);
-
-    // Read all the records and add to a memtable
-    std::string scratch;
-    Slice record;
-    WriteBatch batch;
-    MemTable* mem = new MemTable(icmp_, options_);
-    auto cf_mems_default = new ColumnFamilyMemTablesDefault(mem, &options_);
-    mem->Ref();
-    int counter = 0;
-    while (reader.ReadRecord(&record, &scratch)) {
-      if (record.size() < 12) {
-        reporter.Corruption(
-            record.size(), Status::Corruption("log record too small"));
-        continue;
-      }
-      WriteBatchInternal::SetContents(&batch, record);
-      status = WriteBatchInternal::InsertInto(&batch, cf_mems_default);
-      if (status.ok()) {
-        counter += WriteBatchInternal::Count(&batch);
-      } else {
-        Log(options_.info_log, "Log #%llu: ignoring %s",
-            (unsigned long long) log,
-            status.ToString().c_str());
-        status = Status::OK();  // Keep going with rest of file
-      }
-    }
-
-    // Do not record a version edit for this conversion to a Table
-    // since ExtractMetaData() will also generate edits.
-    FileMetaData meta;
-    meta.number = next_file_number_++;
-    ReadOptions ro;
-    Iterator* iter = mem->NewIterator(ro, true /* enforce_total_order */);
-    status = BuildTable(dbname_, env_, options_, storage_options_, table_cache_,
-                        iter, &meta, icmp_, 0, 0, kNoCompression);
-    delete iter;
-    delete mem->Unref();
-    delete cf_mems_default;
-    mem = nullptr;
-    if (status.ok()) {
-      if (meta.file_size > 0) {
-        table_numbers_.push_back(meta.number);
-      }
-    }
-    Log(options_.info_log, "Log #%llu: %d ops saved to Table #%llu %s",
-        (unsigned long long) log,
-        counter,
-        (unsigned long long) meta.number,
-        status.ToString().c_str());
-    return status;
-  }
-
-  void ExtractMetaData() {
-    for (size_t i = 0; i < table_numbers_.size(); i++) {
-      TableInfo t;
-      t.meta.number = table_numbers_[i];
-      Status status = ScanTable(&t);
-      if (!status.ok()) {
-        std::string fname = TableFileName(dbname_, table_numbers_[i]);
-        Log(options_.info_log, "Table #%llu: ignoring %s",
-            (unsigned long long) table_numbers_[i],
-            status.ToString().c_str());
-        ArchiveFile(fname);
-      } else {
-        tables_.push_back(t);
-      }
-    }
-  }
-
-  Status ScanTable(TableInfo* t) {
-    std::string fname = TableFileName(dbname_, t->meta.number);
-    int counter = 0;
-    Status status = env_->GetFileSize(fname, &t->meta.file_size);
-    if (status.ok()) {
-      FileMetaData dummy_meta(t->meta.number, t->meta.file_size);
-      Iterator* iter = table_cache_->NewIterator(
-          ReadOptions(), storage_options_, icmp_, dummy_meta);
-      bool empty = true;
-      ParsedInternalKey parsed;
-      t->min_sequence = 0;
-      t->max_sequence = 0;
-      for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-        Slice key = iter->key();
-        if (!ParseInternalKey(key, &parsed)) {
-          Log(options_.info_log, "Table #%llu: unparsable key %s",
-              (unsigned long long) t->meta.number,
-              EscapeString(key).c_str());
-          continue;
-        }
-
-        counter++;
-        if (empty) {
-          empty = false;
-          t->meta.smallest.DecodeFrom(key);
-        }
-        t->meta.largest.DecodeFrom(key);
-        if (parsed.sequence < t->min_sequence) {
-          t->min_sequence = parsed.sequence;
-        }
-        if (parsed.sequence > t->max_sequence) {
-          t->max_sequence = parsed.sequence;
-        }
-      }
-      if (!iter->status().ok()) {
-        status = iter->status();
-      }
-      delete iter;
-    }
-    Log(options_.info_log, "Table #%llu: %d entries %s",
-        (unsigned long long) t->meta.number,
-        counter,
-        status.ToString().c_str());
-    return status;
-  }
-
-  Status WriteDescriptor() {
-    std::string tmp = TempFileName(dbname_, 1);
-    unique_ptr<WritableFile> file;
-    Status status = env_->NewWritableFile(
-        tmp, &file, env_->OptimizeForManifestWrite(storage_options_));
-    if (!status.ok()) {
-      return status;
-    }
-
-    SequenceNumber max_sequence = 0;
-    for (size_t i = 0; i < tables_.size(); i++) {
-      if (max_sequence < tables_[i].max_sequence) {
-        max_sequence = tables_[i].max_sequence;
-      }
-    }
-
-    edit_->SetComparatorName(icmp_.user_comparator()->Name());
-    edit_->SetLogNumber(0);
-    edit_->SetNextFile(next_file_number_);
-    edit_->SetLastSequence(max_sequence);
-
-    for (size_t i = 0; i < tables_.size(); i++) {
-      // TODO(opt): separate out into multiple levels
-      const TableInfo& t = tables_[i];
-      edit_->AddFile(0, t.meta.number, t.meta.file_size,
-                    t.meta.smallest, t.meta.largest,
-                    t.min_sequence, t.max_sequence);
-    }
-
-    //fprintf(stderr, "NewDescriptor:\n%s\n", edit_.DebugString().c_str());
-    {
-      log::Writer log(std::move(file));
-      std::string record;
-      edit_->EncodeTo(&record);
-      status = log.AddRecord(record);
-    }
-
-    if (!status.ok()) {
-      env_->DeleteFile(tmp);
-    } else {
-      // Discard older manifests
-      for (size_t i = 0; i < manifests_.size(); i++) {
-        ArchiveFile(dbname_ + "/" + manifests_[i]);
-      }
-
-      // Install new manifest
-      status = env_->RenameFile(tmp, DescriptorFileName(dbname_, 1));
-      if (status.ok()) {
-        status = SetCurrentFile(env_, dbname_, 1);
-      } else {
-        env_->DeleteFile(tmp);
-      }
-    }
-    return status;
-  }
-
-  void ArchiveFile(const std::string& fname) {
-    // Move into another directory.  E.g., for
-    //    dir/foo
-    // rename to
-    //    dir/lost/foo
-    const char* slash = strrchr(fname.c_str(), '/');
-    std::string new_dir;
-    if (slash != nullptr) {
-      new_dir.assign(fname.data(), slash - fname.data());
-    }
-    new_dir.append("/lost");
-    env_->CreateDir(new_dir);  // Ignore error
-    std::string new_file = new_dir;
-    new_file.append("/");
-    new_file.append((slash == nullptr) ? fname.c_str() : slash + 1);
-    Status s = env_->RenameFile(fname, new_file);
-    Log(options_.info_log, "Archiving %s: %s\n",
-        fname.c_str(), s.ToString().c_str());
-  }
-};
-}  // namespace
-
-Status RepairDB(const std::string& dbname, const Options& options) {
-  Repairer repairer(dbname, options);
-  return repairer.Run();
-}
-
-}  // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/simple_table_db_test.cc b/src/rocksdb/db/simple_table_db_test.cc
deleted file mode 100644
index affa614..0000000
--- a/src/rocksdb/db/simple_table_db_test.cc
+++ /dev/null
@@ -1,794 +0,0 @@
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#include <algorithm>
-#include <set>
-
-#include "rocksdb/db.h"
-#include "rocksdb/filter_policy.h"
-#include "db/db_impl.h"
-#include "db/filename.h"
-#include "db/version_set.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/cache.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/env.h"
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-#include "table/table_builder.h"
-#include "util/hash.h"
-#include "util/logging.h"
-#include "util/mutexlock.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-#include "utilities/merge_operators.h"
-
-using std::unique_ptr;
-
-// IS THIS FILE STILL NEEDED?
-namespace rocksdb {
-
-// SimpleTable is a simple table format for UNIT TEST ONLY. It is not built
-// as production quality.
-// SimpleTable requires the input key size to be fixed 16 bytes, value cannot
-// be longer than 150000 bytes and stored data on disk in this format:
-// +--------------------------------------------+  <= key1 offset
-// | key1            | value_size (4 bytes) |   |
-// +----------------------------------------+   |
-// | value1                                     |
-// |                                            |
-// +----------------------------------------+---+  <= key2 offset
-// | key2            | value_size (4 bytes) |   |
-// +----------------------------------------+   |
-// | value2                                     |
-// |                                            |
-// |        ......                              |
-// +-----------------+--------------------------+   <= index_block_offset
-// | key1            | key1 offset (8 bytes)    |
-// +-----------------+--------------------------+
-// | key2            | key2 offset (8 bytes)    |
-// +-----------------+--------------------------+
-// | key3            | key3 offset (8 bytes)    |
-// +-----------------+--------------------------+
-// |        ......                              |
-// +-----------------+------------+-------------+
-// | index_block_offset (8 bytes) |
-// +------------------------------+
-
-// SimpleTable is a simple table format for UNIT TEST ONLY. It is not built
-// as production quality.
-class SimpleTableReader: public TableReader {
-public:
-  // Attempt to open the table that is stored in bytes [0..file_size)
-  // of "file", and read the metadata entries necessary to allow
-  // retrieving data from the table.
-  //
-  // If successful, returns ok and sets "*table" to the newly opened
-  // table.  The client should delete "*table" when no longer needed.
-  // If there was an error while initializing the table, sets "*table"
-  // to nullptr and returns a non-ok status.  Does not take ownership of
-  // "*source", but the client must ensure that "source" remains live
-  // for the duration of the returned table's lifetime.
-  //
-  // *file must remain live while this Table is in use.
-  static Status Open(const Options& options, const EnvOptions& soptions,
-                     unique_ptr<RandomAccessFile> && file, uint64_t file_size,
-                     unique_ptr<TableReader>* table_reader);
-
-  Iterator* NewIterator(const ReadOptions&) override;
-
-  Status Get(const ReadOptions&, const Slice& key, void* arg,
-             bool (*handle_result)(void* arg, const ParsedInternalKey& k,
-                                   const Slice& v, bool),
-             void (*mark_key_may_exist)(void*) = nullptr) override;
-
-  uint64_t ApproximateOffsetOf(const Slice& key) override;
-
-  void SetupForCompaction() override;
-
-  std::shared_ptr<const TableProperties> GetTableProperties() const override;
-
-  ~SimpleTableReader();
-
-private:
-  struct Rep;
-  Rep* rep_;
-
-  explicit SimpleTableReader(Rep* rep) {
-    rep_ = rep;
-  }
-  friend class TableCache;
-  friend class SimpleTableIterator;
-
-  Status GetOffset(const Slice& target, uint64_t* offset);
-
-  // No copying allowed
-  explicit SimpleTableReader(const TableReader&) = delete;
-  void operator=(const TableReader&) = delete;
-};
-
-// Iterator to iterate SimpleTable
-class SimpleTableIterator: public Iterator {
-public:
-  explicit SimpleTableIterator(SimpleTableReader* table);
-  ~SimpleTableIterator();
-
-  bool Valid() const;
-
-  void SeekToFirst();
-
-  void SeekToLast();
-
-  void Seek(const Slice& target);
-
-  void Next();
-
-  void Prev();
-
-  Slice key() const;
-
-  Slice value() const;
-
-  Status status() const;
-
-private:
-  SimpleTableReader* table_;
-  uint64_t offset_;
-  uint64_t next_offset_;
-  Slice key_;
-  Slice value_;
-  char tmp_str_[4];
-  char* key_str_;
-  char* value_str_;
-  int value_str_len_;
-  Status status_;
-  // No copying allowed
-  SimpleTableIterator(const SimpleTableIterator&) = delete;
-  void operator=(const Iterator&) = delete;
-};
-
-struct SimpleTableReader::Rep {
-  ~Rep() {
-  }
-  Rep(const EnvOptions& storage_options, uint64_t index_start_offset,
-      int num_entries) :
-      soptions(storage_options), index_start_offset(index_start_offset),
-      num_entries(num_entries) {
-  }
-
-  Options options;
-  const EnvOptions& soptions;
-  Status status;
-  unique_ptr<RandomAccessFile> file;
-  uint64_t index_start_offset;
-  int num_entries;
-  std::shared_ptr<TableProperties> table_properties;
-
-  const static int user_key_size = 16;
-  const static int offset_length = 8;
-  const static int key_footer_len = 8;
-
-  static int GetInternalKeyLength() {
-    return user_key_size + key_footer_len;
-  }
-};
-
-SimpleTableReader::~SimpleTableReader() {
-  delete rep_;
-}
-
-Status SimpleTableReader::Open(const Options& options,
-                               const EnvOptions& soptions,
-                               unique_ptr<RandomAccessFile> && file,
-                               uint64_t size,
-                               unique_ptr<TableReader>* table_reader) {
-  char footer_space[Rep::offset_length];
-  Slice footer_input;
-  Status s = file->Read(size - Rep::offset_length, Rep::offset_length,
-                        &footer_input, footer_space);
-  if (s.ok()) {
-    uint64_t index_start_offset = DecodeFixed64(footer_space);
-
-    int num_entries = (size - Rep::offset_length - index_start_offset)
-        / (Rep::GetInternalKeyLength() + Rep::offset_length);
-    SimpleTableReader::Rep* rep = new SimpleTableReader::Rep(soptions,
-                                                             index_start_offset,
-                                                             num_entries);
-
-    rep->file = std::move(file);
-    rep->options = options;
-    table_reader->reset(new SimpleTableReader(rep));
-  }
-  return s;
-}
-
-void SimpleTableReader::SetupForCompaction() {
-}
-
-std::shared_ptr<const TableProperties> SimpleTableReader::GetTableProperties()
-    const {
-  return rep_->table_properties;
-}
-
-Iterator* SimpleTableReader::NewIterator(const ReadOptions& options) {
-  return new SimpleTableIterator(this);
-}
-
-Status SimpleTableReader::GetOffset(const Slice& target, uint64_t* offset) {
-  uint32_t left = 0;
-  uint32_t right = rep_->num_entries - 1;
-  char key_chars[Rep::GetInternalKeyLength()];
-  Slice tmp_slice;
-
-  uint32_t target_offset = 0;
-  while (left <= right) {
-    uint32_t mid = (left + right + 1) / 2;
-
-    uint64_t offset_to_read = rep_->index_start_offset
-        + (Rep::GetInternalKeyLength() + Rep::offset_length) * mid;
-    Status s = rep_->file->Read(offset_to_read, Rep::GetInternalKeyLength(),
-                                &tmp_slice, key_chars);
-    if (!s.ok()) {
-      return s;
-    }
-
-    InternalKeyComparator ikc(rep_->options.comparator);
-    int compare_result = ikc.Compare(tmp_slice, target);
-
-    if (compare_result < 0) {
-      if (left == right) {
-        target_offset = right + 1;
-        break;
-      }
-      left = mid;
-    } else {
-      if (left == right) {
-        target_offset = left;
-        break;
-      }
-      right = mid - 1;
-    }
-  }
-
-  if (target_offset >= (uint32_t) rep_->num_entries) {
-    *offset = rep_->index_start_offset;
-    return Status::OK();
-  }
-
-  char value_offset_chars[Rep::offset_length];
-
-  int64_t offset_for_value_offset = rep_->index_start_offset
-      + (Rep::GetInternalKeyLength() + Rep::offset_length) * target_offset
-      + Rep::GetInternalKeyLength();
-  Status s = rep_->file->Read(offset_for_value_offset, Rep::offset_length,
-                              &tmp_slice, value_offset_chars);
-  if (s.ok()) {
-    *offset = DecodeFixed64(value_offset_chars);
-  }
-  return s;
-}
-
-Status SimpleTableReader::Get(const ReadOptions& options, const Slice& k,
-                              void* arg,
-                              bool (*saver)(void*, const ParsedInternalKey&,
-                                            const Slice&, bool),
-                              void (*mark_key_may_exist)(void*)) {
-  Status s;
-  SimpleTableIterator* iter = new SimpleTableIterator(this);
-  for (iter->Seek(k); iter->Valid(); iter->Next()) {
-    ParsedInternalKey parsed_key;
-    if (!ParseInternalKey(iter->key(), &parsed_key)) {
-      return Status::Corruption(Slice());
-    }
-
-    if (!(*saver)(arg, parsed_key, iter->value(), true)) {
-      break;
-    }
-  }
-  s = iter->status();
-  delete iter;
-  return s;
-}
-
-uint64_t SimpleTableReader::ApproximateOffsetOf(const Slice& key) {
-  return 0;
-}
-
-SimpleTableIterator::SimpleTableIterator(SimpleTableReader* table) :
-    table_(table) {
-  key_str_ = new char[SimpleTableReader::Rep::GetInternalKeyLength()];
-  value_str_len_ = -1;
-  SeekToFirst();
-}
-
-SimpleTableIterator::~SimpleTableIterator() {
- delete[] key_str_;
- if (value_str_len_ >= 0) {
-   delete[] value_str_;
- }
-}
-
-bool SimpleTableIterator::Valid() const {
-  return offset_ < table_->rep_->index_start_offset;
-}
-
-void SimpleTableIterator::SeekToFirst() {
-  next_offset_ = 0;
-  Next();
-}
-
-void SimpleTableIterator::SeekToLast() {
-  assert(false);
-}
-
-void SimpleTableIterator::Seek(const Slice& target) {
-  Status s = table_->GetOffset(target, &next_offset_);
-  if (!s.ok()) {
-    status_ = s;
-  }
-  Next();
-}
-
-void SimpleTableIterator::Next() {
-  offset_ = next_offset_;
-  if (offset_ >= table_->rep_->index_start_offset) {
-    return;
-  }
-  Slice result;
-  int internal_key_size = SimpleTableReader::Rep::GetInternalKeyLength();
-
-  Status s = table_->rep_->file->Read(next_offset_, internal_key_size, &result,
-                                      key_str_);
-  next_offset_ += internal_key_size;
-  key_ = result;
-
-  Slice value_size_slice;
-  s = table_->rep_->file->Read(next_offset_, 4, &value_size_slice, tmp_str_);
-  next_offset_ += 4;
-  uint32_t value_size = DecodeFixed32(tmp_str_);
-
-  Slice value_slice;
-  if ((int) value_size > value_str_len_) {
-    if (value_str_len_ >= 0) {
-      delete[] value_str_;
-    }
-    value_str_ = new char[value_size];
-    value_str_len_ = value_size;
-  }
-  s = table_->rep_->file->Read(next_offset_, value_size, &value_slice,
-                               value_str_);
-  next_offset_ += value_size;
-  value_ = value_slice;
-}
-
-void SimpleTableIterator::Prev() {
-  assert(false);
-}
-
-Slice SimpleTableIterator::key() const {
-  Log(table_->rep_->options.info_log, "key!!!!");
-  return key_;
-}
-
-Slice SimpleTableIterator::value() const {
-  return value_;
-}
-
-Status SimpleTableIterator::status() const {
-  return status_;
-}
-
-class SimpleTableBuilder: public TableBuilder {
-public:
-  // Create a builder that will store the contents of the table it is
-  // building in *file.  Does not close the file.  It is up to the
-  // caller to close the file after calling Finish(). The output file
-  // will be part of level specified by 'level'.  A value of -1 means
-  // that the caller does not know which level the output file will reside.
-  SimpleTableBuilder(const Options& options, WritableFile* file,
-                     CompressionType compression_type);
-
-  // REQUIRES: Either Finish() or Abandon() has been called.
-  ~SimpleTableBuilder();
-
-  // Add key,value to the table being constructed.
-  // REQUIRES: key is after any previously added key according to comparator.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Add(const Slice& key, const Slice& value) override;
-
-  // Return non-ok iff some error has been detected.
-  Status status() const override;
-
-  // Finish building the table.  Stops using the file passed to the
-  // constructor after this function returns.
-  // REQUIRES: Finish(), Abandon() have not been called
-  Status Finish() override;
-
-  // Indicate that the contents of this builder should be abandoned.  Stops
-  // using the file passed to the constructor after this function returns.
-  // If the caller is not going to call Finish(), it must call Abandon()
-  // before destroying this builder.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Abandon() override;
-
-  // Number of calls to Add() so far.
-  uint64_t NumEntries() const override;
-
-  // Size of the file generated so far.  If invoked after a successful
-  // Finish() call, returns the size of the final generated file.
-  uint64_t FileSize() const override;
-
-private:
-  struct Rep;
-  Rep* rep_;
-
-  // No copying allowed
-  SimpleTableBuilder(const SimpleTableBuilder&) = delete;
-  void operator=(const SimpleTableBuilder&) = delete;
-};
-
-struct SimpleTableBuilder::Rep {
-  Options options;
-  WritableFile* file;
-  uint64_t offset = 0;
-  Status status;
-
-  uint64_t num_entries = 0;
-
-  bool closed = false;  // Either Finish() or Abandon() has been called.
-
-  const static int user_key_size = 16;
-  const static int offset_length = 8;
-  const static int key_footer_len = 8;
-
-  static int GetInternalKeyLength() {
-    return user_key_size + key_footer_len;
-  }
-
-  std::string index;
-
-  Rep(const Options& opt, WritableFile* f) :
-      options(opt), file(f) {
-  }
-  ~Rep() {
-  }
-};
-
-SimpleTableBuilder::SimpleTableBuilder(const Options& options,
-                                       WritableFile* file,
-                                       CompressionType compression_type) :
-    rep_(new SimpleTableBuilder::Rep(options, file)) {
-}
-
-SimpleTableBuilder::~SimpleTableBuilder() {
-  delete (rep_);
-}
-
-void SimpleTableBuilder::Add(const Slice& key, const Slice& value) {
-  assert((int ) key.size() == Rep::GetInternalKeyLength());
-
-  // Update index
-  rep_->index.append(key.data(), key.size());
-  PutFixed64(&(rep_->index), rep_->offset);
-
-  // Write key-value pair
-  rep_->file->Append(key);
-  rep_->offset += Rep::GetInternalKeyLength();
-
-  std::string size;
-  int value_size = value.size();
-  PutFixed32(&size, value_size);
-  Slice sizeSlice(size);
-  rep_->file->Append(sizeSlice);
-  rep_->file->Append(value);
-  rep_->offset += value_size + 4;
-
-  rep_->num_entries++;
-}
-
-Status SimpleTableBuilder::status() const {
-  return Status::OK();
-}
-
-Status SimpleTableBuilder::Finish() {
-  Rep* r = rep_;
-  assert(!r->closed);
-  r->closed = true;
-
-  uint64_t index_offset = rep_->offset;
-  Slice index_slice(rep_->index);
-  rep_->file->Append(index_slice);
-  rep_->offset += index_slice.size();
-
-  std::string index_offset_str;
-  PutFixed64(&index_offset_str, index_offset);
-  Slice foot_slice(index_offset_str);
-  rep_->file->Append(foot_slice);
-  rep_->offset += foot_slice.size();
-
-  return Status::OK();
-}
-
-void SimpleTableBuilder::Abandon() {
-  rep_->closed = true;
-}
-
-uint64_t SimpleTableBuilder::NumEntries() const {
-  return rep_->num_entries;
-}
-
-uint64_t SimpleTableBuilder::FileSize() const {
-  return rep_->offset;
-}
-
-class SimpleTableFactory: public TableFactory {
-public:
-  ~SimpleTableFactory() {
-  }
-  SimpleTableFactory() {
-  }
-  const char* Name() const override {
-    return "SimpleTable";
-  }
-  Status NewTableReader(const Options& options, const EnvOptions& soptions,
-                        const InternalKeyComparator& internal_key,
-                        unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-                        unique_ptr<TableReader>* table_reader) const;
-
-  TableBuilder* NewTableBuilder(const Options& options,
-                                const InternalKeyComparator& internal_key,
-                                WritableFile* file,
-                                CompressionType compression_type) const;
-};
-
-Status SimpleTableFactory::NewTableReader(
-    const Options& options, const EnvOptions& soptions,
-    const InternalKeyComparator& internal_key,
-    unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-    unique_ptr<TableReader>* table_reader) const {
-
-  return SimpleTableReader::Open(options, soptions, std::move(file), file_size,
-                                 table_reader);
-}
-
-TableBuilder* SimpleTableFactory::NewTableBuilder(
-    const Options& options, const InternalKeyComparator& internal_key,
-    WritableFile* file, CompressionType compression_type) const {
-  return new SimpleTableBuilder(options, file, compression_type);
-}
-
-class SimpleTableDBTest {
-protected:
-public:
-  std::string dbname_;
-  Env* env_;
-  DB* db_;
-
-  Options last_options_;
-
-  SimpleTableDBTest() :
-      env_(Env::Default()) {
-    dbname_ = test::TmpDir() + "/simple_table_db_test";
-    ASSERT_OK(DestroyDB(dbname_, Options()));
-    db_ = nullptr;
-    Reopen();
-  }
-
-  ~SimpleTableDBTest() {
-    delete db_;
-    ASSERT_OK(DestroyDB(dbname_, Options()));
-  }
-
-  // Return the current option configuration.
-  Options CurrentOptions() {
-    Options options;
-    options.table_factory.reset(new SimpleTableFactory());
-    return options;
-  }
-
-  DBImpl* dbfull() {
-    return reinterpret_cast<DBImpl*>(db_);
-  }
-
-  void Reopen(Options* options = nullptr) {
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void Close() {
-    delete db_;
-    db_ = nullptr;
-  }
-
-  void DestroyAndReopen(Options* options = nullptr) {
-    //Destroy using last options
-    Destroy(&last_options_);
-    ASSERT_OK(TryReopen(options));
-  }
-
-  void Destroy(Options* options) {
-    delete db_;
-    db_ = nullptr;
-    ASSERT_OK(DestroyDB(dbname_, *options));
-  }
-
-  Status PureReopen(Options* options, DB** db) {
-    return DB::Open(*options, dbname_, db);
-  }
-
-  Status TryReopen(Options* options = nullptr) {
-    delete db_;
-    db_ = nullptr;
-    Options opts;
-    if (options != nullptr) {
-      opts = *options;
-    } else {
-      opts = CurrentOptions();
-      opts.create_if_missing = true;
-    }
-    last_options_ = opts;
-
-    return DB::Open(opts, dbname_, &db_);
-  }
-
-  Status Put(const Slice& k, const Slice& v) {
-    return db_->Put(WriteOptions(), k, v);
-  }
-
-  Status Delete(const std::string& k) {
-    return db_->Delete(WriteOptions(), k);
-  }
-
-  std::string Get(const std::string& k, const Snapshot* snapshot = nullptr) {
-    ReadOptions options;
-    options.snapshot = snapshot;
-    std::string result;
-    Status s = db_->Get(options, k, &result);
-    if (s.IsNotFound()) {
-      result = "NOT_FOUND";
-    } else if (!s.ok()) {
-      result = s.ToString();
-    }
-    return result;
-  }
-
-
-  int NumTableFilesAtLevel(int level) {
-    std::string property;
-    ASSERT_TRUE(
-        db_->GetProperty("rocksdb.num-files-at-level" + NumberToString(level),
-                         &property));
-    return atoi(property.c_str());
-  }
-
-  // Return spread of files per level
-  std::string FilesPerLevel() {
-    std::string result;
-    int last_non_zero_offset = 0;
-    for (int level = 0; level < db_->NumberLevels(); level++) {
-      int f = NumTableFilesAtLevel(level);
-      char buf[100];
-      snprintf(buf, sizeof(buf), "%s%d", (level ? "," : ""), f);
-      result += buf;
-      if (f > 0) {
-        last_non_zero_offset = result.size();
-      }
-    }
-    result.resize(last_non_zero_offset);
-    return result;
-  }
-
-  std::string IterStatus(Iterator* iter) {
-    std::string result;
-    if (iter->Valid()) {
-      result = iter->key().ToString() + "->" + iter->value().ToString();
-    } else {
-      result = "(invalid)";
-    }
-    return result;
-  }
-};
-
-TEST(SimpleTableDBTest, Empty) {
-  ASSERT_TRUE(db_ != nullptr);
-  ASSERT_EQ("NOT_FOUND", Get("0000000000000foo"));
-}
-
-TEST(SimpleTableDBTest, ReadWrite) {
-  ASSERT_OK(Put("0000000000000foo", "v1"));
-  ASSERT_EQ("v1", Get("0000000000000foo"));
-  ASSERT_OK(Put("0000000000000bar", "v2"));
-  ASSERT_OK(Put("0000000000000foo", "v3"));
-  ASSERT_EQ("v3", Get("0000000000000foo"));
-  ASSERT_EQ("v2", Get("0000000000000bar"));
-}
-
-TEST(SimpleTableDBTest, Flush) {
-  ASSERT_OK(Put("0000000000000foo", "v1"));
-  ASSERT_OK(Put("0000000000000bar", "v2"));
-  ASSERT_OK(Put("0000000000000foo", "v3"));
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_EQ("v3", Get("0000000000000foo"));
-  ASSERT_EQ("v2", Get("0000000000000bar"));
-}
-
-TEST(SimpleTableDBTest, Flush2) {
-  ASSERT_OK(Put("0000000000000bar", "b"));
-  ASSERT_OK(Put("0000000000000foo", "v1"));
-  dbfull()->TEST_FlushMemTable();
-
-  ASSERT_OK(Put("0000000000000foo", "v2"));
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_EQ("v2", Get("0000000000000foo"));
-
-  ASSERT_OK(Put("0000000000000eee", "v3"));
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_EQ("v3", Get("0000000000000eee"));
-
-  ASSERT_OK(Delete("0000000000000bar"));
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_EQ("NOT_FOUND", Get("0000000000000bar"));
-
-  ASSERT_OK(Put("0000000000000eee", "v5"));
-  dbfull()->TEST_FlushMemTable();
-  ASSERT_EQ("v5", Get("0000000000000eee"));
-}
-
-static std::string Key(int i) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "key_______%06d", i);
-  return std::string(buf);
-}
-
-static std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-
-TEST(SimpleTableDBTest, CompactionTrigger) {
-  Options options = CurrentOptions();
-  options.write_buffer_size = 100 << 10; //100KB
-  options.num_levels = 3;
-  options.max_mem_compaction_level = 0;
-  options.level0_file_num_compaction_trigger = 3;
-  Reopen(&options);
-
-  Random rnd(301);
-
-  for (int num = 0; num < options.level0_file_num_compaction_trigger - 1;
-      num++) {
-    std::vector<std::string> values;
-    // Write 120KB (12 values, each 10K)
-    for (int i = 0; i < 12; i++) {
-      values.push_back(RandomString(&rnd, 10000));
-      ASSERT_OK(Put(Key(i), values[i]));
-    }
-    dbfull()->TEST_WaitForFlushMemTable();
-    ASSERT_EQ(NumTableFilesAtLevel(0), num + 1);
-  }
-
-  //generate one more file in level-0, and should trigger level-0 compaction
-  std::vector<std::string> values;
-  for (int i = 0; i < 12; i++) {
-    values.push_back(RandomString(&rnd, 10000));
-    ASSERT_OK(Put(Key(i), values[i]));
-  }
-  dbfull()->TEST_WaitForCompact();
-
-  ASSERT_EQ(NumTableFilesAtLevel(0), 0);
-  ASSERT_EQ(NumTableFilesAtLevel(1), 1);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/skiplist.h b/src/rocksdb/db/skiplist.h
deleted file mode 100644
index 751f7c3..0000000
--- a/src/rocksdb/db/skiplist.h
+++ /dev/null
@@ -1,429 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Thread safety
-// -------------
-//
-// Writes require external synchronization, most likely a mutex.
-// Reads require a guarantee that the SkipList will not be destroyed
-// while the read is in progress.  Apart from that, reads progress
-// without any internal locking or synchronization.
-//
-// Invariants:
-//
-// (1) Allocated nodes are never deleted until the SkipList is
-// destroyed.  This is trivially guaranteed by the code since we
-// never delete any skip list nodes.
-//
-// (2) The contents of a Node except for the next/prev pointers are
-// immutable after the Node has been linked into the SkipList.
-// Only Insert() modifies the list, and it is careful to initialize
-// a node and use release-stores to publish the nodes in one or
-// more lists.
-//
-// ... prev vs. next pointer ordering ...
-//
-
-#pragma once
-#include <assert.h>
-#include <stdlib.h>
-#include "util/arena.h"
-#include "port/port.h"
-#include "util/arena.h"
-#include "util/random.h"
-
-namespace rocksdb {
-
-template<typename Key, class Comparator>
-class SkipList {
- private:
-  struct Node;
-
- public:
-  // Create a new SkipList object that will use "cmp" for comparing keys,
-  // and will allocate memory using "*arena".  Objects allocated in the arena
-  // must remain allocated for the lifetime of the skiplist object.
-  explicit SkipList(Comparator cmp, Arena* arena,
-                    int32_t max_height = 12, int32_t branching_factor = 4);
-
-  // Insert key into the list.
-  // REQUIRES: nothing that compares equal to key is currently in the list.
-  void Insert(const Key& key);
-
-  // Returns true iff an entry that compares equal to key is in the list.
-  bool Contains(const Key& key) const;
-
-  // Iteration over the contents of a skip list
-  class Iterator {
-   public:
-    // Initialize an iterator over the specified list.
-    // The returned iterator is not valid.
-    explicit Iterator(const SkipList* list);
-
-    // Change the underlying skiplist used for this iterator
-    // This enables us not changing the iterator without deallocating
-    // an old one and then allocating a new one
-    void SetList(const SkipList* list);
-
-    // Returns true iff the iterator is positioned at a valid node.
-    bool Valid() const;
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    const Key& key() const;
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    void Next();
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    void Prev();
-
-    // Advance to the first entry with a key >= target
-    void Seek(const Key& target);
-
-    // Position at the first entry in list.
-    // Final state of iterator is Valid() iff list is not empty.
-    void SeekToFirst();
-
-    // Position at the last entry in list.
-    // Final state of iterator is Valid() iff list is not empty.
-    void SeekToLast();
-
-   private:
-    const SkipList* list_;
-    Node* node_;
-    // Intentionally copyable
-  };
-
- private:
-  const int32_t kMaxHeight_;
-  const int32_t kBranching_;
-
-  // Immutable after construction
-  Comparator const compare_;
-  Arena* const arena_;    // Arena used for allocations of nodes
-
-  Node* const head_;
-
-  // Modified only by Insert().  Read racily by readers, but stale
-  // values are ok.
-  port::AtomicPointer max_height_;   // Height of the entire list
-
-  // Used for optimizing sequential insert patterns
-  Node** prev_;
-  int32_t prev_height_;
-
-  inline int GetMaxHeight() const {
-    return static_cast<int>(
-        reinterpret_cast<intptr_t>(max_height_.NoBarrier_Load()));
-  }
-
-  // Read/written only by Insert().
-  Random rnd_;
-
-  Node* NewNode(const Key& key, int height);
-  int RandomHeight();
-  bool Equal(const Key& a, const Key& b) const { return (compare_(a, b) == 0); }
-
-  // Return true if key is greater than the data stored in "n"
-  bool KeyIsAfterNode(const Key& key, Node* n) const;
-
-  // Return the earliest node that comes at or after key.
-  // Return nullptr if there is no such node.
-  //
-  // If prev is non-nullptr, fills prev[level] with pointer to previous
-  // node at "level" for every level in [0..max_height_-1].
-  Node* FindGreaterOrEqual(const Key& key, Node** prev) const;
-
-  // Return the latest node with a key < key.
-  // Return head_ if there is no such node.
-  Node* FindLessThan(const Key& key) const;
-
-  // Return the last node in the list.
-  // Return head_ if list is empty.
-  Node* FindLast() const;
-
-  // No copying allowed
-  SkipList(const SkipList&);
-  void operator=(const SkipList&);
-};
-
-// Implementation details follow
-template<typename Key, class Comparator>
-struct SkipList<Key, Comparator>::Node {
-  explicit Node(const Key& k) : key(k) { }
-
-  Key const key;
-
-  // Accessors/mutators for links.  Wrapped in methods so we can
-  // add the appropriate barriers as necessary.
-  Node* Next(int n) {
-    assert(n >= 0);
-    // Use an 'acquire load' so that we observe a fully initialized
-    // version of the returned Node.
-    return reinterpret_cast<Node*>(next_[n].Acquire_Load());
-  }
-  void SetNext(int n, Node* x) {
-    assert(n >= 0);
-    // Use a 'release store' so that anybody who reads through this
-    // pointer observes a fully initialized version of the inserted node.
-    next_[n].Release_Store(x);
-  }
-
-  // No-barrier variants that can be safely used in a few locations.
-  Node* NoBarrier_Next(int n) {
-    assert(n >= 0);
-    return reinterpret_cast<Node*>(next_[n].NoBarrier_Load());
-  }
-  void NoBarrier_SetNext(int n, Node* x) {
-    assert(n >= 0);
-    next_[n].NoBarrier_Store(x);
-  }
-
- private:
-  // Array of length equal to the node height.  next_[0] is lowest level link.
-  port::AtomicPointer next_[1];
-};
-
-template<typename Key, class Comparator>
-typename SkipList<Key, Comparator>::Node*
-SkipList<Key, Comparator>::NewNode(const Key& key, int height) {
-  char* mem = arena_->AllocateAligned(
-      sizeof(Node) + sizeof(port::AtomicPointer) * (height - 1));
-  return new (mem) Node(key);
-}
-
-template<typename Key, class Comparator>
-inline SkipList<Key, Comparator>::Iterator::Iterator(const SkipList* list) {
-  SetList(list);
-}
-
-template<typename Key, class Comparator>
-inline void SkipList<Key, Comparator>::Iterator::SetList(const SkipList* list) {
-  list_ = list;
-  node_ = nullptr;
-}
-
-template<typename Key, class Comparator>
-inline bool SkipList<Key, Comparator>::Iterator::Valid() const {
-  return node_ != nullptr;
-}
-
-template<typename Key, class Comparator>
-inline const Key& SkipList<Key, Comparator>::Iterator::key() const {
-  assert(Valid());
-  return node_->key;
-}
-
-template<typename Key, class Comparator>
-inline void SkipList<Key, Comparator>::Iterator::Next() {
-  assert(Valid());
-  node_ = node_->Next(0);
-}
-
-template<typename Key, class Comparator>
-inline void SkipList<Key, Comparator>::Iterator::Prev() {
-  // Instead of using explicit "prev" links, we just search for the
-  // last node that falls before key.
-  assert(Valid());
-  node_ = list_->FindLessThan(node_->key);
-  if (node_ == list_->head_) {
-    node_ = nullptr;
-  }
-}
-
-template<typename Key, class Comparator>
-inline void SkipList<Key, Comparator>::Iterator::Seek(const Key& target) {
-  node_ = list_->FindGreaterOrEqual(target, nullptr);
-}
-
-template<typename Key, class Comparator>
-inline void SkipList<Key, Comparator>::Iterator::SeekToFirst() {
-  node_ = list_->head_->Next(0);
-}
-
-template<typename Key, class Comparator>
-inline void SkipList<Key, Comparator>::Iterator::SeekToLast() {
-  node_ = list_->FindLast();
-  if (node_ == list_->head_) {
-    node_ = nullptr;
-  }
-}
-
-template<typename Key, class Comparator>
-int SkipList<Key, Comparator>::RandomHeight() {
-  // Increase height with probability 1 in kBranching
-  int height = 1;
-  while (height < kMaxHeight_ && ((rnd_.Next() % kBranching_) == 0)) {
-    height++;
-  }
-  assert(height > 0);
-  assert(height <= kMaxHeight_);
-  return height;
-}
-
-template<typename Key, class Comparator>
-bool SkipList<Key, Comparator>::KeyIsAfterNode(const Key& key, Node* n) const {
-  // nullptr n is considered infinite
-  return (n != nullptr) && (compare_(n->key, key) < 0);
-}
-
-template<typename Key, class Comparator>
-typename SkipList<Key, Comparator>::Node* SkipList<Key, Comparator>::
-  FindGreaterOrEqual(const Key& key, Node** prev) const {
-  // Use prev as an optimization hint and fallback to slow path
-  if (prev && !KeyIsAfterNode(key, prev[0]->Next(0))) {
-    Node* x = prev[0];
-    Node* next = x->Next(0);
-    if ((x == head_) || KeyIsAfterNode(key, x)) {
-      // Adjust all relevant insertion points to the previous entry
-      for (int i = 1; i < prev_height_; i++) {
-        prev[i] = x;
-      }
-      return next;
-    }
-  }
-  // Normal lookup
-  Node* x = head_;
-  int level = GetMaxHeight() - 1;
-  while (true) {
-    Node* next = x->Next(level);
-    // Make sure the lists are sorted.
-    // If x points to head_ or next points nullptr, it is trivially satisfied.
-    assert((x == head_) || (next == nullptr) || KeyIsAfterNode(next->key, x));
-    if (KeyIsAfterNode(key, next)) {
-      // Keep searching in this list
-      x = next;
-    } else {
-      if (prev != nullptr) prev[level] = x;
-      if (level == 0) {
-        return next;
-      } else {
-        // Switch to next list
-        level--;
-      }
-    }
-  }
-}
-
-template<typename Key, class Comparator>
-typename SkipList<Key, Comparator>::Node*
-SkipList<Key, Comparator>::FindLessThan(const Key& key) const {
-  Node* x = head_;
-  int level = GetMaxHeight() - 1;
-  while (true) {
-    assert(x == head_ || compare_(x->key, key) < 0);
-    Node* next = x->Next(level);
-    if (next == nullptr || compare_(next->key, key) >= 0) {
-      if (level == 0) {
-        return x;
-      } else {
-        // Switch to next list
-        level--;
-      }
-    } else {
-      x = next;
-    }
-  }
-}
-
-template<typename Key, class Comparator>
-typename SkipList<Key, Comparator>::Node* SkipList<Key, Comparator>::FindLast()
-    const {
-  Node* x = head_;
-  int level = GetMaxHeight() - 1;
-  while (true) {
-    Node* next = x->Next(level);
-    if (next == nullptr) {
-      if (level == 0) {
-        return x;
-      } else {
-        // Switch to next list
-        level--;
-      }
-    } else {
-      x = next;
-    }
-  }
-}
-
-template<typename Key, class Comparator>
-SkipList<Key, Comparator>::SkipList(const Comparator cmp, Arena* arena,
-                                   int32_t max_height,
-                                   int32_t branching_factor)
-    : kMaxHeight_(max_height),
-      kBranching_(branching_factor),
-      compare_(cmp),
-      arena_(arena),
-      head_(NewNode(0 /* any key will do */, max_height)),
-      max_height_(reinterpret_cast<void*>(1)),
-      prev_height_(1),
-      rnd_(0xdeadbeef) {
-  assert(kMaxHeight_ > 0);
-  assert(kBranching_ > 0);
-  // Allocate the prev_ Node* array, directly from the passed-in arena.
-  // prev_ does not need to be freed, as its life cycle is tied up with
-  // the arena as a whole.
-  prev_ = (Node**) arena_->AllocateAligned(sizeof(Node*) * kMaxHeight_);
-  for (int i = 0; i < kMaxHeight_; i++) {
-    head_->SetNext(i, nullptr);
-    prev_[i] = head_;
-  }
-}
-
-template<typename Key, class Comparator>
-void SkipList<Key, Comparator>::Insert(const Key& key) {
-  // TODO(opt): We can use a barrier-free variant of FindGreaterOrEqual()
-  // here since Insert() is externally synchronized.
-  Node* x = FindGreaterOrEqual(key, prev_);
-
-  // Our data structure does not allow duplicate insertion
-  assert(x == nullptr || !Equal(key, x->key));
-
-  int height = RandomHeight();
-  if (height > GetMaxHeight()) {
-    for (int i = GetMaxHeight(); i < height; i++) {
-      prev_[i] = head_;
-    }
-    //fprintf(stderr, "Change height from %d to %d\n", max_height_, height);
-
-    // It is ok to mutate max_height_ without any synchronization
-    // with concurrent readers.  A concurrent reader that observes
-    // the new value of max_height_ will see either the old value of
-    // new level pointers from head_ (nullptr), or a new value set in
-    // the loop below.  In the former case the reader will
-    // immediately drop to the next level since nullptr sorts after all
-    // keys.  In the latter case the reader will use the new node.
-    max_height_.NoBarrier_Store(reinterpret_cast<void*>(height));
-  }
-
-  x = NewNode(key, height);
-  for (int i = 0; i < height; i++) {
-    // NoBarrier_SetNext() suffices since we will add a barrier when
-    // we publish a pointer to "x" in prev[i].
-    x->NoBarrier_SetNext(i, prev_[i]->NoBarrier_Next(i));
-    prev_[i]->SetNext(i, x);
-  }
-  prev_[0] = x;
-  prev_height_ = height;
-}
-
-template<typename Key, class Comparator>
-bool SkipList<Key, Comparator>::Contains(const Key& key) const {
-  Node* x = FindGreaterOrEqual(key, nullptr);
-  if (x != nullptr && Equal(key, x->key)) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/skiplist_test.cc b/src/rocksdb/db/skiplist_test.cc
deleted file mode 100644
index b87ddcb..0000000
--- a/src/rocksdb/db/skiplist_test.cc
+++ /dev/null
@@ -1,383 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/skiplist.h"
-#include <set>
-#include "rocksdb/env.h"
-#include "util/arena.h"
-#include "util/hash.h"
-#include "util/random.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-typedef uint64_t Key;
-
-struct TestComparator {
-  int operator()(const Key& a, const Key& b) const {
-    if (a < b) {
-      return -1;
-    } else if (a > b) {
-      return +1;
-    } else {
-      return 0;
-    }
-  }
-};
-
-class SkipTest { };
-
-TEST(SkipTest, Empty) {
-  Arena arena;
-  TestComparator cmp;
-  SkipList<Key, TestComparator> list(cmp, &arena);
-  ASSERT_TRUE(!list.Contains(10));
-
-  SkipList<Key, TestComparator>::Iterator iter(&list);
-  ASSERT_TRUE(!iter.Valid());
-  iter.SeekToFirst();
-  ASSERT_TRUE(!iter.Valid());
-  iter.Seek(100);
-  ASSERT_TRUE(!iter.Valid());
-  iter.SeekToLast();
-  ASSERT_TRUE(!iter.Valid());
-}
-
-TEST(SkipTest, InsertAndLookup) {
-  const int N = 2000;
-  const int R = 5000;
-  Random rnd(1000);
-  std::set<Key> keys;
-  Arena arena;
-  TestComparator cmp;
-  SkipList<Key, TestComparator> list(cmp, &arena);
-  for (int i = 0; i < N; i++) {
-    Key key = rnd.Next() % R;
-    if (keys.insert(key).second) {
-      list.Insert(key);
-    }
-  }
-
-  for (int i = 0; i < R; i++) {
-    if (list.Contains(i)) {
-      ASSERT_EQ(keys.count(i), 1U);
-    } else {
-      ASSERT_EQ(keys.count(i), 0U);
-    }
-  }
-
-  // Simple iterator tests
-  {
-    SkipList<Key, TestComparator>::Iterator iter(&list);
-    ASSERT_TRUE(!iter.Valid());
-
-    iter.Seek(0);
-    ASSERT_TRUE(iter.Valid());
-    ASSERT_EQ(*(keys.begin()), iter.key());
-
-    iter.SeekToFirst();
-    ASSERT_TRUE(iter.Valid());
-    ASSERT_EQ(*(keys.begin()), iter.key());
-
-    iter.SeekToLast();
-    ASSERT_TRUE(iter.Valid());
-    ASSERT_EQ(*(keys.rbegin()), iter.key());
-  }
-
-  // Forward iteration test
-  for (int i = 0; i < R; i++) {
-    SkipList<Key, TestComparator>::Iterator iter(&list);
-    iter.Seek(i);
-
-    // Compare against model iterator
-    std::set<Key>::iterator model_iter = keys.lower_bound(i);
-    for (int j = 0; j < 3; j++) {
-      if (model_iter == keys.end()) {
-        ASSERT_TRUE(!iter.Valid());
-        break;
-      } else {
-        ASSERT_TRUE(iter.Valid());
-        ASSERT_EQ(*model_iter, iter.key());
-        ++model_iter;
-        iter.Next();
-      }
-    }
-  }
-
-  // Backward iteration test
-  {
-    SkipList<Key, TestComparator>::Iterator iter(&list);
-    iter.SeekToLast();
-
-    // Compare against model iterator
-    for (std::set<Key>::reverse_iterator model_iter = keys.rbegin();
-         model_iter != keys.rend();
-         ++model_iter) {
-      ASSERT_TRUE(iter.Valid());
-      ASSERT_EQ(*model_iter, iter.key());
-      iter.Prev();
-    }
-    ASSERT_TRUE(!iter.Valid());
-  }
-}
-
-// We want to make sure that with a single writer and multiple
-// concurrent readers (with no synchronization other than when a
-// reader's iterator is created), the reader always observes all the
-// data that was present in the skip list when the iterator was
-// constructor.  Because insertions are happening concurrently, we may
-// also observe new values that were inserted since the iterator was
-// constructed, but we should never miss any values that were present
-// at iterator construction time.
-//
-// We generate multi-part keys:
-//     <key,gen,hash>
-// where:
-//     key is in range [0..K-1]
-//     gen is a generation number for key
-//     hash is hash(key,gen)
-//
-// The insertion code picks a random key, sets gen to be 1 + the last
-// generation number inserted for that key, and sets hash to Hash(key,gen).
-//
-// At the beginning of a read, we snapshot the last inserted
-// generation number for each key.  We then iterate, including random
-// calls to Next() and Seek().  For every key we encounter, we
-// check that it is either expected given the initial snapshot or has
-// been concurrently added since the iterator started.
-class ConcurrentTest {
- private:
-  static const uint32_t K = 4;
-
-  static uint64_t key(Key key) { return (key >> 40); }
-  static uint64_t gen(Key key) { return (key >> 8) & 0xffffffffu; }
-  static uint64_t hash(Key key) { return key & 0xff; }
-
-  static uint64_t HashNumbers(uint64_t k, uint64_t g) {
-    uint64_t data[2] = { k, g };
-    return Hash(reinterpret_cast<char*>(data), sizeof(data), 0);
-  }
-
-  static Key MakeKey(uint64_t k, uint64_t g) {
-    assert(sizeof(Key) == sizeof(uint64_t));
-    assert(k <= K);  // We sometimes pass K to seek to the end of the skiplist
-    assert(g <= 0xffffffffu);
-    return ((k << 40) | (g << 8) | (HashNumbers(k, g) & 0xff));
-  }
-
-  static bool IsValidKey(Key k) {
-    return hash(k) == (HashNumbers(key(k), gen(k)) & 0xff);
-  }
-
-  static Key RandomTarget(Random* rnd) {
-    switch (rnd->Next() % 10) {
-      case 0:
-        // Seek to beginning
-        return MakeKey(0, 0);
-      case 1:
-        // Seek to end
-        return MakeKey(K, 0);
-      default:
-        // Seek to middle
-        return MakeKey(rnd->Next() % K, 0);
-    }
-  }
-
-  // Per-key generation
-  struct State {
-    port::AtomicPointer generation[K];
-    void Set(int k, intptr_t v) {
-      generation[k].Release_Store(reinterpret_cast<void*>(v));
-    }
-    intptr_t Get(int k) {
-      return reinterpret_cast<intptr_t>(generation[k].Acquire_Load());
-    }
-
-    State() {
-      for (unsigned int k = 0; k < K; k++) {
-        Set(k, 0);
-      }
-    }
-  };
-
-  // Current state of the test
-  State current_;
-
-  Arena arena_;
-
-  // SkipList is not protected by mu_.  We just use a single writer
-  // thread to modify it.
-  SkipList<Key, TestComparator> list_;
-
- public:
-  ConcurrentTest() : list_(TestComparator(), &arena_) {}
-
-  // REQUIRES: External synchronization
-  void WriteStep(Random* rnd) {
-    const uint32_t k = rnd->Next() % K;
-    const intptr_t g = current_.Get(k) + 1;
-    const Key key = MakeKey(k, g);
-    list_.Insert(key);
-    current_.Set(k, g);
-  }
-
-  void ReadStep(Random* rnd) {
-    // Remember the initial committed state of the skiplist.
-    State initial_state;
-    for (unsigned int k = 0; k < K; k++) {
-      initial_state.Set(k, current_.Get(k));
-    }
-
-    Key pos = RandomTarget(rnd);
-    SkipList<Key, TestComparator>::Iterator iter(&list_);
-    iter.Seek(pos);
-    while (true) {
-      Key current;
-      if (!iter.Valid()) {
-        current = MakeKey(K, 0);
-      } else {
-        current = iter.key();
-        ASSERT_TRUE(IsValidKey(current)) << current;
-      }
-      ASSERT_LE(pos, current) << "should not go backwards";
-
-      // Verify that everything in [pos,current) was not present in
-      // initial_state.
-      while (pos < current) {
-        ASSERT_LT(key(pos), K) << pos;
-
-        // Note that generation 0 is never inserted, so it is ok if
-        // <*,0,*> is missing.
-        ASSERT_TRUE((gen(pos) == 0U) ||
-                    (gen(pos) > (uint64_t)initial_state.Get(key(pos)))
-                    ) << "key: " << key(pos)
-                      << "; gen: " << gen(pos)
-                      << "; initgen: "
-                      << initial_state.Get(key(pos));
-
-        // Advance to next key in the valid key space
-        if (key(pos) < key(current)) {
-          pos = MakeKey(key(pos) + 1, 0);
-        } else {
-          pos = MakeKey(key(pos), gen(pos) + 1);
-        }
-      }
-
-      if (!iter.Valid()) {
-        break;
-      }
-
-      if (rnd->Next() % 2) {
-        iter.Next();
-        pos = MakeKey(key(pos), gen(pos) + 1);
-      } else {
-        Key new_target = RandomTarget(rnd);
-        if (new_target > pos) {
-          pos = new_target;
-          iter.Seek(new_target);
-        }
-      }
-    }
-  }
-};
-const uint32_t ConcurrentTest::K;
-
-// Simple test that does single-threaded testing of the ConcurrentTest
-// scaffolding.
-TEST(SkipTest, ConcurrentWithoutThreads) {
-  ConcurrentTest test;
-  Random rnd(test::RandomSeed());
-  for (int i = 0; i < 10000; i++) {
-    test.ReadStep(&rnd);
-    test.WriteStep(&rnd);
-  }
-}
-
-class TestState {
- public:
-  ConcurrentTest t_;
-  int seed_;
-  port::AtomicPointer quit_flag_;
-
-  enum ReaderState {
-    STARTING,
-    RUNNING,
-    DONE
-  };
-
-  explicit TestState(int s)
-      : seed_(s),
-        quit_flag_(nullptr),
-        state_(STARTING),
-        state_cv_(&mu_) {}
-
-  void Wait(ReaderState s) {
-    mu_.Lock();
-    while (state_ != s) {
-      state_cv_.Wait();
-    }
-    mu_.Unlock();
-  }
-
-  void Change(ReaderState s) {
-    mu_.Lock();
-    state_ = s;
-    state_cv_.Signal();
-    mu_.Unlock();
-  }
-
- private:
-  port::Mutex mu_;
-  ReaderState state_;
-  port::CondVar state_cv_;
-};
-
-static void ConcurrentReader(void* arg) {
-  TestState* state = reinterpret_cast<TestState*>(arg);
-  Random rnd(state->seed_);
-  int64_t reads = 0;
-  state->Change(TestState::RUNNING);
-  while (!state->quit_flag_.Acquire_Load()) {
-    state->t_.ReadStep(&rnd);
-    ++reads;
-  }
-  state->Change(TestState::DONE);
-}
-
-static void RunConcurrent(int run) {
-  const int seed = test::RandomSeed() + (run * 100);
-  Random rnd(seed);
-  const int N = 1000;
-  const int kSize = 1000;
-  for (int i = 0; i < N; i++) {
-    if ((i % 100) == 0) {
-      fprintf(stderr, "Run %d of %d\n", i, N);
-    }
-    TestState state(seed + 1);
-    Env::Default()->Schedule(ConcurrentReader, &state);
-    state.Wait(TestState::RUNNING);
-    for (int i = 0; i < kSize; i++) {
-      state.t_.WriteStep(&rnd);
-    }
-    state.quit_flag_.Release_Store(&state);  // Any non-nullptr arg will do
-    state.Wait(TestState::DONE);
-  }
-}
-
-TEST(SkipTest, Concurrent1) { RunConcurrent(1); }
-TEST(SkipTest, Concurrent2) { RunConcurrent(2); }
-TEST(SkipTest, Concurrent3) { RunConcurrent(3); }
-TEST(SkipTest, Concurrent4) { RunConcurrent(4); }
-TEST(SkipTest, Concurrent5) { RunConcurrent(5); }
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/snapshot.h b/src/rocksdb/db/snapshot.h
deleted file mode 100644
index 2c2e3ea..0000000
--- a/src/rocksdb/db/snapshot.h
+++ /dev/null
@@ -1,86 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "rocksdb/db.h"
-
-namespace rocksdb {
-
-class SnapshotList;
-
-// Snapshots are kept in a doubly-linked list in the DB.
-// Each SnapshotImpl corresponds to a particular sequence number.
-class SnapshotImpl : public Snapshot {
- public:
-  SequenceNumber number_;  // const after creation
-
- private:
-  friend class SnapshotList;
-
-  // SnapshotImpl is kept in a doubly-linked circular list
-  SnapshotImpl* prev_;
-  SnapshotImpl* next_;
-
-  SnapshotList* list_;                 // just for sanity checks
-};
-
-class SnapshotList {
- public:
-  SnapshotList() {
-    list_.prev_ = &list_;
-    list_.next_ = &list_;
-    list_.number_ = 0xFFFFFFFFL;      // placeholder marker, for debugging
-  }
-
-  bool empty() const { return list_.next_ == &list_; }
-  SnapshotImpl* oldest() const { assert(!empty()); return list_.next_; }
-  SnapshotImpl* newest() const { assert(!empty()); return list_.prev_; }
-
-  const SnapshotImpl* New(SequenceNumber seq) {
-    SnapshotImpl* s = new SnapshotImpl;
-    s->number_ = seq;
-    s->list_ = this;
-    s->next_ = &list_;
-    s->prev_ = list_.prev_;
-    s->prev_->next_ = s;
-    s->next_->prev_ = s;
-    return s;
-  }
-
-  void Delete(const SnapshotImpl* s) {
-    assert(s->list_ == this);
-    s->prev_->next_ = s->next_;
-    s->next_->prev_ = s->prev_;
-    delete s;
-  }
-
-  // retrieve all snapshot numbers. They are sorted in ascending order.
-  void getAll(std::vector<SequenceNumber>& ret) {
-    if (empty()) return;
-    SnapshotImpl* s = &list_;
-    while (s->next_ != &list_) {
-      ret.push_back(s->next_->number_);
-      s = s ->next_;
-    }
-  }
-
-  // get the sequence number of the most recent snapshot
-  const SequenceNumber GetNewest() {
-    if (empty()) {
-      return 0;
-    }
-    return newest()->number_;
-  }
-
- private:
-  // Dummy head of doubly-linked list of snapshots
-  SnapshotImpl list_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/table_cache.cc b/src/rocksdb/db/table_cache.cc
deleted file mode 100644
index 2321d03..0000000
--- a/src/rocksdb/db/table_cache.cc
+++ /dev/null
@@ -1,197 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/table_cache.h"
-
-#include "db/filename.h"
-#include "db/version_edit.h"
-
-#include "rocksdb/statistics.h"
-#include "table/table_reader.h"
-#include "util/coding.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-static void DeleteEntry(const Slice& key, void* value) {
-  TableReader* table_reader = reinterpret_cast<TableReader*>(value);
-  delete table_reader;
-}
-
-static void UnrefEntry(void* arg1, void* arg2) {
-  Cache* cache = reinterpret_cast<Cache*>(arg1);
-  Cache::Handle* h = reinterpret_cast<Cache::Handle*>(arg2);
-  cache->Release(h);
-}
-
-static Slice GetSliceForFileNumber(uint64_t* file_number) {
-  return Slice(reinterpret_cast<const char*>(file_number),
-               sizeof(*file_number));
-}
-
-TableCache::TableCache(const std::string& dbname, const Options* options,
-                       const EnvOptions& storage_options, Cache* const cache)
-    : env_(options->env),
-      dbname_(dbname),
-      options_(options),
-      storage_options_(storage_options),
-      cache_(cache) {}
-
-TableCache::~TableCache() {
-}
-
-TableReader* TableCache::GetTableReaderFromHandle(Cache::Handle* handle) {
-  return reinterpret_cast<TableReader*>(cache_->Value(handle));
-}
-
-void TableCache::ReleaseHandle(Cache::Handle* handle) {
-  cache_->Release(handle);
-}
-
-Status TableCache::FindTable(const EnvOptions& toptions,
-                             const InternalKeyComparator& internal_comparator,
-                             uint64_t file_number, uint64_t file_size,
-                             Cache::Handle** handle, bool* table_io,
-                             const bool no_io) {
-  Status s;
-  Slice key = GetSliceForFileNumber(&file_number);
-  *handle = cache_->Lookup(key);
-  if (*handle == nullptr) {
-    if (no_io) { // Dont do IO and return a not-found status
-      return Status::Incomplete("Table not found in table_cache, no_io is set");
-    }
-    if (table_io != nullptr) {
-      *table_io = true;    // we had to do IO from storage
-    }
-    std::string fname = TableFileName(dbname_, file_number);
-    unique_ptr<RandomAccessFile> file;
-    unique_ptr<TableReader> table_reader;
-    s = env_->NewRandomAccessFile(fname, &file, toptions);
-    RecordTick(options_->statistics.get(), NO_FILE_OPENS);
-    if (s.ok()) {
-      if (options_->advise_random_on_open) {
-        file->Hint(RandomAccessFile::RANDOM);
-      }
-      StopWatch sw(env_, options_->statistics.get(), TABLE_OPEN_IO_MICROS);
-      s = options_->table_factory->NewTableReader(
-          *options_, toptions, internal_comparator, std::move(file), file_size,
-          &table_reader);
-    }
-
-    if (!s.ok()) {
-      assert(table_reader == nullptr);
-      RecordTick(options_->statistics.get(), NO_FILE_ERRORS);
-      // We do not cache error results so that if the error is transient,
-      // or somebody repairs the file, we recover automatically.
-    } else {
-      assert(file.get() == nullptr);
-      *handle = cache_->Insert(key, table_reader.release(), 1, &DeleteEntry);
-    }
-  }
-  return s;
-}
-
-Iterator* TableCache::NewIterator(const ReadOptions& options,
-                                  const EnvOptions& toptions,
-                                  const InternalKeyComparator& icomparator,
-                                  const FileMetaData& file_meta,
-                                  TableReader** table_reader_ptr,
-                                  bool for_compaction) {
-  if (table_reader_ptr != nullptr) {
-    *table_reader_ptr = nullptr;
-  }
-  TableReader* table_reader = file_meta.table_reader;
-  Cache::Handle* handle = nullptr;
-  Status s;
-  if (table_reader == nullptr) {
-    s = FindTable(toptions, icomparator, file_meta.number, file_meta.file_size,
-                  &handle, nullptr, options.read_tier == kBlockCacheTier);
-    if (!s.ok()) {
-      return NewErrorIterator(s);
-    }
-    table_reader = GetTableReaderFromHandle(handle);
-  }
-
-  Iterator* result = table_reader->NewIterator(options);
-  if (handle != nullptr) {
-    result->RegisterCleanup(&UnrefEntry, cache_, handle);
-  }
-  if (table_reader_ptr != nullptr) {
-    *table_reader_ptr = table_reader;
-  }
-
-  if (for_compaction) {
-    table_reader->SetupForCompaction();
-  }
-
-  return result;
-}
-
-Status TableCache::Get(const ReadOptions& options,
-                       const InternalKeyComparator& internal_comparator,
-                       const FileMetaData& file_meta, const Slice& k, void* arg,
-                       bool (*saver)(void*, const ParsedInternalKey&,
-                                     const Slice&, bool),
-                       bool* table_io, void (*mark_key_may_exist)(void*)) {
-  TableReader* t = file_meta.table_reader;
-  Status s;
-  Cache::Handle* handle = nullptr;
-  if (!t) {
-    s = FindTable(storage_options_, internal_comparator, file_meta.number,
-                  file_meta.file_size, &handle, table_io,
-                  options.read_tier == kBlockCacheTier);
-    if (s.ok()) {
-      t = GetTableReaderFromHandle(handle);
-    }
-  }
-  if (s.ok()) {
-    s = t->Get(options, k, arg, saver, mark_key_may_exist);
-    if (handle != nullptr) {
-      ReleaseHandle(handle);
-    }
-  } else if (options.read_tier && s.IsIncomplete()) {
-    // Couldnt find Table in cache but treat as kFound if no_io set
-    (*mark_key_may_exist)(arg);
-    return Status::OK();
-  }
-  return s;
-}
-Status TableCache::GetTableProperties(
-    const EnvOptions& toptions,
-    const InternalKeyComparator& internal_comparator,
-    const FileMetaData& file_meta,
-    std::shared_ptr<const TableProperties>* properties, bool no_io) {
-  Status s;
-  auto table_reader = file_meta.table_reader;
-  // table already been pre-loaded?
-  if (table_reader) {
-    *properties = table_reader->GetTableProperties();
-
-    return s;
-  }
-
-  bool table_io;
-  Cache::Handle* table_handle = nullptr;
-  s = FindTable(toptions, internal_comparator, file_meta.number,
-                file_meta.file_size, &table_handle, &table_io, no_io);
-  if (!s.ok()) {
-    return s;
-  }
-  assert(table_handle);
-  auto table = GetTableReaderFromHandle(table_handle);
-  *properties = table->GetTableProperties();
-  ReleaseHandle(table_handle);
-  return s;
-}
-
-void TableCache::Evict(Cache* cache, uint64_t file_number) {
-  cache->Erase(GetSliceForFileNumber(&file_number));
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/table_cache.h b/src/rocksdb/db/table_cache.h
deleted file mode 100644
index e8cd7ea..0000000
--- a/src/rocksdb/db/table_cache.h
+++ /dev/null
@@ -1,94 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Thread-safe (provides internal synchronization)
-
-#pragma once
-#include <string>
-#include <stdint.h>
-
-#include "db/dbformat.h"
-#include "port/port.h"
-#include "rocksdb/cache.h"
-#include "rocksdb/env.h"
-#include "rocksdb/table.h"
-#include "table/table_reader.h"
-
-namespace rocksdb {
-
-class Env;
-struct FileMetaData;
-
-// TODO(sdong): try to come up with a better API to pass the file information
-//              other than simply passing FileMetaData.
-class TableCache {
- public:
-  TableCache(const std::string& dbname, const Options* options,
-             const EnvOptions& storage_options, Cache* cache);
-  ~TableCache();
-
-  // Return an iterator for the specified file number (the corresponding
-  // file length must be exactly "file_size" bytes).  If "tableptr" is
-  // non-nullptr, also sets "*tableptr" to point to the Table object
-  // underlying the returned iterator, or nullptr if no Table object underlies
-  // the returned iterator.  The returned "*tableptr" object is owned by
-  // the cache and should not be deleted, and is valid for as long as the
-  // returned iterator is live.
-  Iterator* NewIterator(const ReadOptions& options, const EnvOptions& toptions,
-                        const InternalKeyComparator& internal_comparator,
-                        const FileMetaData& file_meta,
-                        TableReader** table_reader_ptr = nullptr,
-                        bool for_compaction = false);
-
-  // If a seek to internal key "k" in specified file finds an entry,
-  // call (*handle_result)(arg, found_key, found_value) repeatedly until
-  // it returns false.
-  Status Get(const ReadOptions& options,
-             const InternalKeyComparator& internal_comparator,
-             const FileMetaData& file_meta, const Slice& k, void* arg,
-             bool (*handle_result)(void*, const ParsedInternalKey&,
-                                   const Slice&, bool),
-             bool* table_io, void (*mark_key_may_exist)(void*) = nullptr);
-
-  // Evict any entry for the specified file number
-  static void Evict(Cache* cache, uint64_t file_number);
-
-  // Find table reader
-  Status FindTable(const EnvOptions& toptions,
-                   const InternalKeyComparator& internal_comparator,
-                   uint64_t file_number, uint64_t file_size, Cache::Handle**,
-                   bool* table_io = nullptr, const bool no_io = false);
-
-  // Get TableReader from a cache handle.
-  TableReader* GetTableReaderFromHandle(Cache::Handle* handle);
-
-  // Get the table properties of a given table.
-  // @no_io: indicates if we should load table to the cache if it is not present
-  //         in table cache yet.
-  // @returns: `properties` will be reset on success. Please note that we will
-  //            return Status::Incomplete() if table is not present in cache and
-  //            we set `no_io` to be true.
-  Status GetTableProperties(const EnvOptions& toptions,
-                            const InternalKeyComparator& internal_comparator,
-                            const FileMetaData& file_meta,
-                            std::shared_ptr<const TableProperties>* properties,
-                            bool no_io = false);
-
-  // Release the handle from a cache
-  void ReleaseHandle(Cache::Handle* handle);
-
- private:
-  Env* const env_;
-  const std::string dbname_;
-  const Options* options_;
-  const EnvOptions& storage_options_;
-  Cache* const cache_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/table_properties_collector.cc b/src/rocksdb/db/table_properties_collector.cc
deleted file mode 100644
index 25bd700..0000000
--- a/src/rocksdb/db/table_properties_collector.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include "db/table_properties_collector.h"
-
-#include "db/dbformat.h"
-#include "util/coding.h"
-
-namespace rocksdb {
-
-Status InternalKeyPropertiesCollector::Add(
-    const Slice& key, const Slice& value) {
-  ParsedInternalKey ikey;
-  if (!ParseInternalKey(key, &ikey)) {
-    return Status::InvalidArgument("Invalid internal key");
-  }
-
-  if (ikey.type == ValueType::kTypeDeletion) {
-    ++deleted_keys_;
-  }
-
-  return Status::OK();
-}
-
-Status InternalKeyPropertiesCollector::Finish(
-    UserCollectedProperties* properties) {
-  assert(properties);
-  assert(properties->find(
-        InternalKeyTablePropertiesNames::kDeletedKeys) == properties->end());
-  std::string val;
-
-  PutVarint64(&val, deleted_keys_);
-  properties->insert({ InternalKeyTablePropertiesNames::kDeletedKeys, val });
-
-  return Status::OK();
-}
-
-UserCollectedProperties
-InternalKeyPropertiesCollector::GetReadableProperties() const {
-  return {
-    { "kDeletedKeys", std::to_string(deleted_keys_) }
-  };
-}
-
-
-Status UserKeyTablePropertiesCollector::Add(
-    const Slice& key, const Slice& value) {
-  ParsedInternalKey ikey;
-  if (!ParseInternalKey(key, &ikey)) {
-    return Status::InvalidArgument("Invalid internal key");
-  }
-
-  return collector_->Add(ikey.user_key, value);
-}
-
-Status UserKeyTablePropertiesCollector::Finish(
-    UserCollectedProperties* properties) {
-  return collector_->Finish(properties);
-}
-
-UserCollectedProperties
-UserKeyTablePropertiesCollector::GetReadableProperties() const {
-  return collector_->GetReadableProperties();
-}
-
-
-const std::string InternalKeyTablePropertiesNames::kDeletedKeys
-  = "rocksdb.deleted.keys";
-
-uint64_t GetDeletedKeys(
-    const UserCollectedProperties& props) {
-  auto pos = props.find(InternalKeyTablePropertiesNames::kDeletedKeys);
-  if (pos == props.end()) {
-    return 0;
-  }
-  Slice raw = pos->second;
-  uint64_t val = 0;
-  return GetVarint64(&raw, &val) ? val : 0;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/table_properties_collector.h b/src/rocksdb/db/table_properties_collector.h
deleted file mode 100644
index 6cf5629..0000000
--- a/src/rocksdb/db/table_properties_collector.h
+++ /dev/null
@@ -1,72 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file defines a collection of statistics collectors.
-#pragma once
-
-#include "rocksdb/table_properties.h"
-
-#include <memory>
-#include <string>
-#include <vector>
-
-namespace rocksdb {
-
-struct InternalKeyTablePropertiesNames {
-  static const std::string kDeletedKeys;
-};
-
-// Collecting the statistics for internal keys. Visible only by internal
-// rocksdb modules.
-class InternalKeyPropertiesCollector : public TablePropertiesCollector {
- public:
-  virtual Status Add(const Slice& key, const Slice& value) override;
-
-  virtual Status Finish(UserCollectedProperties* properties) override;
-
-  virtual const char* Name() const override {
-    return "InternalKeyPropertiesCollector";
-  }
-
-  UserCollectedProperties GetReadableProperties() const override;
-
- private:
-  uint64_t deleted_keys_ = 0;
-};
-
-// When rocksdb creates a new table, it will encode all "user keys" into
-// "internal keys", which contains meta information of a given entry.
-//
-// This class extracts user key from the encoded internal key when Add() is
-// invoked.
-class UserKeyTablePropertiesCollector : public TablePropertiesCollector {
- public:
-  explicit UserKeyTablePropertiesCollector(
-      TablePropertiesCollector* collector) :
-      UserKeyTablePropertiesCollector(
-        std::shared_ptr<TablePropertiesCollector>(collector)
-    ) {
-  }
-
-  explicit UserKeyTablePropertiesCollector(
-      std::shared_ptr<TablePropertiesCollector> collector) :
-      collector_(collector) {
-  }
-
-  virtual ~UserKeyTablePropertiesCollector() { }
-
-  virtual Status Add(const Slice& key, const Slice& value) override;
-
-  virtual Status Finish(UserCollectedProperties* properties) override;
-
-  virtual const char* Name() const override { return collector_->Name(); }
-
-  UserCollectedProperties GetReadableProperties() const override;
-
- protected:
-  std::shared_ptr<TablePropertiesCollector> collector_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/table_properties_collector_test.cc b/src/rocksdb/db/table_properties_collector_test.cc
deleted file mode 100644
index ea15260..0000000
--- a/src/rocksdb/db/table_properties_collector_test.cc
+++ /dev/null
@@ -1,312 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <map>
-#include <memory>
-#include <string>
-
-#include "db/db_impl.h"
-#include "db/dbformat.h"
-#include "db/table_properties_collector.h"
-#include "rocksdb/table.h"
-#include "table/block_based_table_factory.h"
-#include "table/meta_blocks.h"
-#include "table/plain_table_factory.h"
-#include "table/table_builder.h"
-#include "util/coding.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-class TablePropertiesTest {
-};
-
-// TODO(kailiu) the following classes should be moved to some more general
-// places, so that other tests can also make use of them.
-// `FakeWritableFile` and `FakeRandomeAccessFile` bypass the real file system
-// and therefore enable us to quickly setup the tests.
-class FakeWritableFile : public WritableFile {
- public:
-  ~FakeWritableFile() { }
-
-  const std::string& contents() const { return contents_; }
-
-  virtual Status Close() { return Status::OK(); }
-  virtual Status Flush() { return Status::OK(); }
-  virtual Status Sync() { return Status::OK(); }
-
-  virtual Status Append(const Slice& data) {
-    contents_.append(data.data(), data.size());
-    return Status::OK();
-  }
-
- private:
-  std::string contents_;
-};
-
-
-class FakeRandomeAccessFile : public RandomAccessFile {
- public:
-  explicit FakeRandomeAccessFile(const Slice& contents)
-      : contents_(contents.data(), contents.size()) {
-  }
-
-  virtual ~FakeRandomeAccessFile() { }
-
-  uint64_t Size() const { return contents_.size(); }
-
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                       char* scratch) const {
-    if (offset > contents_.size()) {
-      return Status::InvalidArgument("invalid Read offset");
-    }
-    if (offset + n > contents_.size()) {
-      n = contents_.size() - offset;
-    }
-    memcpy(scratch, &contents_[offset], n);
-    *result = Slice(scratch, n);
-    return Status::OK();
-  }
-
- private:
-  std::string contents_;
-};
-
-
-class DumbLogger : public Logger {
- public:
-  virtual void Logv(const char* format, va_list ap) { }
-  virtual size_t GetLogFileSize() const { return 0; }
-};
-
-// Utilities test functions
-namespace {
-void MakeBuilder(const Options& options,
-                 const InternalKeyComparator& internal_comparator,
-                 std::unique_ptr<FakeWritableFile>* writable,
-                 std::unique_ptr<TableBuilder>* builder) {
-  writable->reset(new FakeWritableFile);
-  builder->reset(options.table_factory->NewTableBuilder(
-      options, internal_comparator, writable->get(), options.compression));
-}
-}  // namespace
-
-// Collects keys that starts with "A" in a table.
-class RegularKeysStartWithA: public TablePropertiesCollector {
- public:
-   const char* Name() const { return "RegularKeysStartWithA"; }
-
-   Status Finish(UserCollectedProperties* properties) {
-     std::string encoded;
-     PutVarint32(&encoded, count_);
-     *properties = UserCollectedProperties {
-       { "TablePropertiesTest", "Rocksdb" },
-       { "Count", encoded }
-     };
-     return Status::OK();
-   }
-
-   Status Add(const Slice& user_key, const Slice& value) {
-     // simply asssume all user keys are not empty.
-     if (user_key.data()[0] == 'A') {
-       ++count_;
-     }
-     return Status::OK();
-   }
-
-  virtual UserCollectedProperties GetReadableProperties() const {
-    return UserCollectedProperties{};
-  }
-
-
- private:
-  uint32_t count_ = 0;
-};
-
-extern uint64_t kBlockBasedTableMagicNumber;
-extern uint64_t kPlainTableMagicNumber;
-namespace {
-void TestCustomizedTablePropertiesCollector(
-    uint64_t magic_number, bool encode_as_internal, const Options& options,
-    const InternalKeyComparator& internal_comparator) {
-  // make sure the entries will be inserted with order.
-  std::map<std::string, std::string> kvs = {
-    {"About   ", "val5"},  // starts with 'A'
-    {"Abstract", "val2"},  // starts with 'A'
-    {"Around  ", "val7"},  // starts with 'A'
-    {"Beyond  ", "val3"},
-    {"Builder ", "val1"},
-    {"Cancel  ", "val4"},
-    {"Find    ", "val6"},
-  };
-
-  // -- Step 1: build table
-  std::unique_ptr<TableBuilder> builder;
-  std::unique_ptr<FakeWritableFile> writable;
-  MakeBuilder(options, internal_comparator, &writable, &builder);
-
-  for (const auto& kv : kvs) {
-    if (encode_as_internal) {
-      InternalKey ikey(kv.first, 0, ValueType::kTypeValue);
-      builder->Add(ikey.Encode(), kv.second);
-    } else {
-      builder->Add(kv.first, kv.second);
-    }
-  }
-  ASSERT_OK(builder->Finish());
-
-  // -- Step 2: Read properties
-  FakeRandomeAccessFile readable(writable->contents());
-  TableProperties* props;
-  Status s = ReadTableProperties(
-      &readable,
-      writable->contents().size(),
-      magic_number,
-      Env::Default(),
-      nullptr,
-      &props
-  );
-  std::unique_ptr<TableProperties> props_guard(props);
-  ASSERT_OK(s);
-
-  auto user_collected = props->user_collected_properties;
-
-  ASSERT_EQ("Rocksdb", user_collected.at("TablePropertiesTest"));
-
-  uint32_t starts_with_A = 0;
-  Slice key(user_collected.at("Count"));
-  ASSERT_TRUE(GetVarint32(&key, &starts_with_A));
-  ASSERT_EQ(3u, starts_with_A);
-}
-}  // namespace
-
-TEST(TablePropertiesTest, CustomizedTablePropertiesCollector) {
-  // Test properties collectors with internal keys or regular keys
-  // for block based table
-  for (bool encode_as_internal : { true, false }) {
-    Options options;
-    auto collector = new RegularKeysStartWithA();
-    if (encode_as_internal) {
-      options.table_properties_collectors = {
-        std::make_shared<UserKeyTablePropertiesCollector>(collector)
-      };
-    } else {
-      options.table_properties_collectors.resize(1);
-      options.table_properties_collectors[0].reset(collector);
-    }
-    test::PlainInternalKeyComparator ikc(options.comparator);
-    TestCustomizedTablePropertiesCollector(kBlockBasedTableMagicNumber,
-                                           encode_as_internal, options, ikc);
-  }
-
-  // test plain table
-  Options options;
-  options.table_properties_collectors.push_back(
-      std::make_shared<RegularKeysStartWithA>()
-  );
-  options.table_factory = std::make_shared<PlainTableFactory>(8, 8, 0);
-  test::PlainInternalKeyComparator ikc(options.comparator);
-  TestCustomizedTablePropertiesCollector(kPlainTableMagicNumber, true, options,
-                                         ikc);
-}
-
-namespace {
-void TestInternalKeyPropertiesCollector(
-    uint64_t magic_number,
-    bool sanitized,
-    std::shared_ptr<TableFactory> table_factory) {
-  InternalKey keys[] = {
-    InternalKey("A       ", 0, ValueType::kTypeValue),
-    InternalKey("B       ", 0, ValueType::kTypeValue),
-    InternalKey("C       ", 0, ValueType::kTypeValue),
-    InternalKey("W       ", 0, ValueType::kTypeDeletion),
-    InternalKey("X       ", 0, ValueType::kTypeDeletion),
-    InternalKey("Y       ", 0, ValueType::kTypeDeletion),
-    InternalKey("Z       ", 0, ValueType::kTypeDeletion),
-  };
-
-  std::unique_ptr<TableBuilder> builder;
-  std::unique_ptr<FakeWritableFile> writable;
-  Options options;
-  test::PlainInternalKeyComparator pikc(options.comparator);
-
-  options.table_factory = table_factory;
-  if (sanitized) {
-    options.table_properties_collectors = {
-      std::make_shared<RegularKeysStartWithA>()
-    };
-    // with sanitization, even regular properties collector will be able to
-    // handle internal keys.
-    auto comparator = options.comparator;
-    // HACK: Set options.info_log to avoid writing log in
-    // SanitizeOptions().
-    options.info_log = std::make_shared<DumbLogger>();
-    options = SanitizeOptions("db",            // just a place holder
-                              &pikc, nullptr,  // don't care filter policy
-                              options);
-    options.comparator = comparator;
-  } else {
-    options.table_properties_collectors = {
-      std::make_shared<InternalKeyPropertiesCollector>()
-    };
-  }
-
-  MakeBuilder(options, pikc, &writable, &builder);
-  for (const auto& k : keys) {
-    builder->Add(k.Encode(), "val");
-  }
-
-  ASSERT_OK(builder->Finish());
-
-  FakeRandomeAccessFile readable(writable->contents());
-  TableProperties* props;
-  Status s = ReadTableProperties(
-      &readable,
-      writable->contents().size(),
-      magic_number,
-      Env::Default(),
-      nullptr,
-      &props
-  );
-  ASSERT_OK(s);
-
-  std::unique_ptr<TableProperties> props_guard(props);
-  auto user_collected = props->user_collected_properties;
-  uint64_t deleted = GetDeletedKeys(user_collected);
-  ASSERT_EQ(4u, deleted);
-
-  if (sanitized) {
-    uint32_t starts_with_A = 0;
-    Slice key(user_collected.at("Count"));
-    ASSERT_TRUE(GetVarint32(&key, &starts_with_A));
-    ASSERT_EQ(1u, starts_with_A);
-  }
-}
-}  // namespace
-
-TEST(TablePropertiesTest, InternalKeyPropertiesCollector) {
-  TestInternalKeyPropertiesCollector(
-      kBlockBasedTableMagicNumber,
-      true /* sanitize */,
-      std::make_shared<BlockBasedTableFactory>()
-  );
-  TestInternalKeyPropertiesCollector(
-      kBlockBasedTableMagicNumber,
-      true /* not sanitize */,
-      std::make_shared<BlockBasedTableFactory>()
-  );
-  TestInternalKeyPropertiesCollector(
-      kPlainTableMagicNumber,
-      false /* not sanitize */,
-      std::make_shared<PlainTableFactory>(8, 8, 0)
-  );
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/tailing_iter.cc b/src/rocksdb/db/tailing_iter.cc
deleted file mode 100644
index 67b59b2..0000000
--- a/src/rocksdb/db/tailing_iter.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef ROCKSDB_LITE
-#include "db/tailing_iter.h"
-
-#include <string>
-#include <utility>
-#include <vector>
-#include "db/db_impl.h"
-#include "db/db_iter.h"
-#include "db/column_family.h"
-#include "rocksdb/env.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "table/merger.h"
-
-namespace rocksdb {
-
-TailingIterator::TailingIterator(Env* const env, DBImpl* db,
-    const ReadOptions& read_options, ColumnFamilyData* cfd)
-    : env_(env),
-      db_(db),
-      read_options_(read_options),
-      cfd_(cfd),
-      super_version_(nullptr),
-      current_(nullptr),
-      status_(Status::InvalidArgument("Seek() not called on this iterator")) {}
-
-TailingIterator::~TailingIterator() {
-  Cleanup();
-}
-
-bool TailingIterator::Valid() const {
-  return current_ != nullptr;
-}
-
-void TailingIterator::SeekToFirst() {
-  if (!IsCurrentVersion()) {
-    CreateIterators();
-  }
-
-  mutable_->SeekToFirst();
-  immutable_->SeekToFirst();
-  UpdateCurrent();
-}
-
-void TailingIterator::Seek(const Slice& target) {
-  if (!IsCurrentVersion()) {
-    CreateIterators();
-  }
-
-  mutable_->Seek(target);
-
-  // We maintain the interval (prev_key_, immutable_->key()] such that there
-  // are no records with keys within that range in immutable_ other than
-  // immutable_->key(). Since immutable_ can't change in this version, we don't
-  // need to do a seek if 'target' belongs to that interval (i.e. immutable_ is
-  // already at the correct position)!
-  //
-  // If prefix seek is used and immutable_ is not valid, seek if target has a
-  // different prefix than prev_key.
-  //
-  // prev_key_ is updated by Next(). SeekImmutable() sets prev_key_ to
-  // 'target' -- in this case, prev_key_ is included in the interval, so
-  // prev_inclusive_ has to be set.
-
-  const Comparator* cmp = cfd_->user_comparator();
-  if (!is_prev_set_ || cmp->Compare(prev_key_, target) >= !is_prev_inclusive_ ||
-      (immutable_->Valid() && cmp->Compare(target, immutable_->key()) > 0) ||
-      (cfd_->options()->prefix_extractor != nullptr && !IsSamePrefix(target))) {
-    SeekImmutable(target);
-  }
-
-  UpdateCurrent();
-}
-
-void TailingIterator::Next() {
-  assert(Valid());
-
-  if (!IsCurrentVersion()) {
-    // save the current key, create new iterators and then seek
-    std::string current_key = key().ToString();
-    Slice key_slice(current_key.data(), current_key.size());
-
-    CreateIterators();
-    Seek(key_slice);
-
-    if (!Valid() || key().compare(key_slice) != 0) {
-      // record with current_key no longer exists
-      return;
-    }
-
-  } else if (current_ == immutable_.get()) {
-    // immutable iterator is advanced -- update prev_key_
-    prev_key_ = key().ToString();
-    is_prev_inclusive_ = false;
-    is_prev_set_ = true;
-  }
-
-  current_->Next();
-  UpdateCurrent();
-}
-
-Slice TailingIterator::key() const {
-  assert(Valid());
-  return current_->key();
-}
-
-Slice TailingIterator::value() const {
-  assert(Valid());
-  return current_->value();
-}
-
-Status TailingIterator::status() const {
-  if (!status_.ok()) {
-    return status_;
-  } else if (!mutable_->status().ok()) {
-    return mutable_->status();
-  } else {
-    return immutable_->status();
-  }
-}
-
-void TailingIterator::Prev() {
-  status_ = Status::NotSupported("This iterator doesn't support Prev()");
-}
-
-void TailingIterator::SeekToLast() {
-  status_ = Status::NotSupported("This iterator doesn't support SeekToLast()");
-}
-
-void TailingIterator::Cleanup() {
-  // Release old super version if necessary
-  mutable_.reset();
-  immutable_.reset();
-  if (super_version_ != nullptr && super_version_->Unref()) {
-    DBImpl::DeletionState deletion_state;
-    db_->mutex_.Lock();
-    super_version_->Cleanup();
-    db_->FindObsoleteFiles(deletion_state, false, true);
-    db_->mutex_.Unlock();
-    delete super_version_;
-    if (deletion_state.HaveSomethingToDelete()) {
-      db_->PurgeObsoleteFiles(deletion_state);
-    }
-  }
-}
-
-void TailingIterator::CreateIterators() {
-  Cleanup();
-  super_version_= cfd_->GetReferencedSuperVersion(&(db_->mutex_));
-
-  Iterator* mutable_iter = super_version_->mem->NewIterator(read_options_);
-  // create a DBIter that only uses memtable content; see NewIterator()
-  mutable_.reset(
-      NewDBIterator(env_, *cfd_->options(), cfd_->user_comparator(),
-                    mutable_iter, kMaxSequenceNumber));
-
-  std::vector<Iterator*> list;
-  super_version_->imm->AddIterators(read_options_, &list);
-  super_version_->current->AddIterators(
-      read_options_, *cfd_->soptions(), &list);
-  Iterator* immutable_iter =
-      NewMergingIterator(&cfd_->internal_comparator(), &list[0], list.size());
-
-  // create a DBIter that only uses memtable content; see NewIterator()
-  immutable_.reset(
-      NewDBIterator(env_, *cfd_->options(), cfd_->user_comparator(),
-                    immutable_iter, kMaxSequenceNumber));
-
-  current_ = nullptr;
-  is_prev_set_ = false;
-}
-
-void TailingIterator::UpdateCurrent() {
-  current_ = nullptr;
-
-  if (mutable_->Valid()) {
-    current_ = mutable_.get();
-  }
-  const Comparator* cmp = cfd_->user_comparator();
-  if (immutable_->Valid() &&
-      (current_ == nullptr ||
-       cmp->Compare(immutable_->key(), current_->key()) < 0)) {
-    current_ = immutable_.get();
-  }
-
-  if (!status_.ok()) {
-    // reset status that was set by Prev() or SeekToLast()
-    status_ = Status::OK();
-  }
-}
-
-bool TailingIterator::IsCurrentVersion() const {
-  return super_version_ != nullptr &&
-         super_version_->version_number == cfd_->GetSuperVersionNumber();
-}
-
-bool TailingIterator::IsSamePrefix(const Slice& target) const {
-  const SliceTransform* extractor = cfd_->options()->prefix_extractor.get();
-
-  assert(extractor);
-  assert(is_prev_set_);
-
-  return extractor->Transform(target)
-    .compare(extractor->Transform(prev_key_)) == 0;
-}
-
-void TailingIterator::SeekImmutable(const Slice& target) {
-  prev_key_ = target.ToString();
-  is_prev_inclusive_ = true;
-  is_prev_set_ = true;
-
-  immutable_->Seek(target);
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/tailing_iter.h b/src/rocksdb/db/tailing_iter.h
deleted file mode 100644
index 6b9c513..0000000
--- a/src/rocksdb/db/tailing_iter.h
+++ /dev/null
@@ -1,97 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-#pragma once
-
-#ifndef ROCKSDB_LITE
-
-#include <string>
-
-#include "rocksdb/db.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-
-namespace rocksdb {
-
-class DBImpl;
-class Env;
-struct SuperVersion;
-class ColumnFamilyData;
-
-/**
- * TailingIterator is a special type of iterator that doesn't use an (implicit)
- * snapshot. In other words, it can be used to read data that was added to the
- * db after the iterator had been created.
- *
- * TailingIterator is optimized for sequential reading. It doesn't support
- * Prev() and SeekToLast() operations.
- */
-class TailingIterator : public Iterator {
- public:
-  TailingIterator(Env* const env, DBImpl* db, const ReadOptions& read_options,
-                  ColumnFamilyData* cfd);
-  virtual ~TailingIterator();
-
-  virtual bool Valid() const override;
-  virtual void SeekToFirst() override;
-  virtual void SeekToLast() override;
-  virtual void Seek(const Slice& target) override;
-  virtual void Next() override;
-  virtual void Prev() override;
-  virtual Slice key() const override;
-  virtual Slice value() const override;
-  virtual Status status() const override;
-
- private:
-  void Cleanup();
-
-  Env* const env_;
-  DBImpl* const db_;
-  const ReadOptions read_options_;
-  ColumnFamilyData* const cfd_;
-  SuperVersion* super_version_;
-
-  // TailingIterator merges the contents of the two iterators below (one using
-  // mutable memtable contents only, other over SSTs and immutable memtables).
-  // See DBIter::GetTailingIteratorPair().
-  std::unique_ptr<Iterator> mutable_;
-  std::unique_ptr<Iterator> immutable_;
-
-  // points to either mutable_ or immutable_
-  Iterator* current_;
-
-  // key that precedes immutable iterator's current key
-  std::string prev_key_;
-
-  // unless prev_set is true, prev_key/prev_head is not valid and shouldn't be
-  // used; reset by createIterators()
-  bool is_prev_set_;
-
-  // prev_key_ was set by SeekImmutable(), which means that the interval of
-  // keys covered by immutable_ is [prev_key_, current], i.e. it includes the
-  // left endpoint
-  bool is_prev_inclusive_;
-
-  // internal iterator status
-  Status status_;
-
-  // check if this iterator's version matches DB's version
-  bool IsCurrentVersion() const;
-
-  // check if SeekImmutable() is needed due to target having a different prefix
-  // than prev_key_ (used when in prefix seek mode)
-  bool IsSamePrefix(const Slice& target) const;
-
-  // creates mutable_ and immutable_ iterators and updates version_number_
-  void CreateIterators();
-
-  // set current_ to be one of the iterators with the smallest key
-  void UpdateCurrent();
-
-  // seek on immutable_ and update prev_key
-  void SeekImmutable(const Slice& target);
-};
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/transaction_log_impl.cc b/src/rocksdb/db/transaction_log_impl.cc
deleted file mode 100644
index 82e58f1..0000000
--- a/src/rocksdb/db/transaction_log_impl.cc
+++ /dev/null
@@ -1,261 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef ROCKSDB_LITE
-#include "db/transaction_log_impl.h"
-#include "db/write_batch_internal.h"
-
-namespace rocksdb {
-
-TransactionLogIteratorImpl::TransactionLogIteratorImpl(
-    const std::string& dir, const DBOptions* options,
-    const TransactionLogIterator::ReadOptions& read_options,
-    const EnvOptions& soptions, const SequenceNumber seq,
-    std::unique_ptr<VectorLogPtr> files, DBImpl const* const dbimpl)
-    : dir_(dir),
-      options_(options),
-      read_options_(read_options),
-      soptions_(soptions),
-      startingSequenceNumber_(seq),
-      files_(std::move(files)),
-      started_(false),
-      isValid_(false),
-      currentFileIndex_(0),
-      currentBatchSeq_(0),
-      currentLastSeq_(0),
-      dbimpl_(dbimpl) {
-  assert(files_ != nullptr);
-  assert(dbimpl_ != nullptr);
-
-  reporter_.env = options_->env;
-  reporter_.info_log = options_->info_log.get();
-  SeekToStartSequence(); // Seek till starting sequence
-}
-
-Status TransactionLogIteratorImpl::OpenLogFile(
-    const LogFile* logFile,
-    unique_ptr<SequentialFile>* file) {
-  Env* env = options_->env;
-  if (logFile->Type() == kArchivedLogFile) {
-    std::string fname = ArchivedLogFileName(dir_, logFile->LogNumber());
-    return env->NewSequentialFile(fname, file, soptions_);
-  } else {
-    std::string fname = LogFileName(dir_, logFile->LogNumber());
-    Status status = env->NewSequentialFile(fname, file, soptions_);
-    if (!status.ok()) {
-      //  If cannot open file in DB directory.
-      //  Try the archive dir, as it could have moved in the meanwhile.
-      fname = ArchivedLogFileName(dir_, logFile->LogNumber());
-      status = env->NewSequentialFile(fname, file, soptions_);
-    }
-    return status;
-  }
-}
-
-BatchResult TransactionLogIteratorImpl::GetBatch()  {
-  assert(isValid_);  //  cannot call in a non valid state.
-  BatchResult result;
-  result.sequence = currentBatchSeq_;
-  result.writeBatchPtr = std::move(currentBatch_);
-  return result;
-}
-
-Status TransactionLogIteratorImpl::status() {
-  return currentStatus_;
-}
-
-bool TransactionLogIteratorImpl::Valid() {
-  return started_ && isValid_;
-}
-
-bool TransactionLogIteratorImpl::RestrictedRead(
-    Slice* record,
-    std::string* scratch) {
-  // Don't read if no more complete entries to read from logs
-  if (currentLastSeq_ >= dbimpl_->GetLatestSequenceNumber()) {
-    return false;
-  }
-  return currentLogReader_->ReadRecord(record, scratch);
-}
-
-void TransactionLogIteratorImpl::SeekToStartSequence(
-    uint64_t startFileIndex,
-    bool strict) {
-  std::string scratch;
-  Slice record;
-  started_ = false;
-  isValid_ = false;
-  if (files_->size() <= startFileIndex) {
-    return;
-  }
-  Status s = OpenLogReader(files_->at(startFileIndex).get());
-  if (!s.ok()) {
-    currentStatus_ = s;
-    return;
-  }
-  while (RestrictedRead(&record, &scratch)) {
-    if (record.size() < 12) {
-      reporter_.Corruption(
-        record.size(), Status::Corruption("very small log record"));
-      continue;
-    }
-    UpdateCurrentWriteBatch(record);
-    if (currentLastSeq_ >= startingSequenceNumber_) {
-      if (strict && currentBatchSeq_ != startingSequenceNumber_) {
-        currentStatus_ = Status::Corruption("Gap in sequence number. Could not "
-                                            "seek to required sequence number");
-        reporter_.Info(currentStatus_.ToString().c_str());
-        return;
-      } else if (strict) {
-        reporter_.Info("Could seek required sequence number. Iterator will "
-                       "continue.");
-      }
-      isValid_ = true;
-      started_ = true; // set started_ as we could seek till starting sequence
-      return;
-    } else {
-      isValid_ = false;
-    }
-  }
-
-  // Could not find start sequence in first file. Normally this must be the
-  // only file. Otherwise log the error and let the iterator return next entry
-  // If strict is set, we want to seek exactly till the start sequence and it
-  // should have been present in the file we scanned above
-  if (strict) {
-    currentStatus_ = Status::Corruption("Gap in sequence number. Could not "
-                                        "seek to required sequence number");
-    reporter_.Info(currentStatus_.ToString().c_str());
-  } else if (files_->size() != 1) {
-    currentStatus_ = Status::Corruption("Start sequence was not found, "
-                                        "skipping to the next available");
-    reporter_.Info(currentStatus_.ToString().c_str());
-    // Let NextImpl find the next available entry. started_ remains false
-    // because we don't want to check for gaps while moving to start sequence
-    NextImpl(true);
-  }
-}
-
-void TransactionLogIteratorImpl::Next() {
-  return NextImpl(false);
-}
-
-void TransactionLogIteratorImpl::NextImpl(bool internal) {
-  std::string scratch;
-  Slice record;
-  isValid_ = false;
-  if (!internal && !started_) {
-    // Runs every time until we can seek to the start sequence
-    return SeekToStartSequence();
-  }
-  while(true) {
-    assert(currentLogReader_);
-    if (currentLogReader_->IsEOF()) {
-      currentLogReader_->UnmarkEOF();
-    }
-    while (RestrictedRead(&record, &scratch)) {
-      if (record.size() < 12) {
-        reporter_.Corruption(
-          record.size(), Status::Corruption("very small log record"));
-        continue;
-      } else {
-        // started_ should be true if called by application
-        assert(internal || started_);
-        // started_ should be false if called internally
-        assert(!internal || !started_);
-        UpdateCurrentWriteBatch(record);
-        if (internal && !started_) {
-          started_ = true;
-        }
-        return;
-      }
-    }
-
-    // Open the next file
-    if (currentFileIndex_ < files_->size() - 1) {
-      ++currentFileIndex_;
-      Status status =OpenLogReader(files_->at(currentFileIndex_).get());
-      if (!status.ok()) {
-        isValid_ = false;
-        currentStatus_ = status;
-        return;
-      }
-    } else {
-      isValid_ = false;
-      if (currentLastSeq_ == dbimpl_->GetLatestSequenceNumber()) {
-        currentStatus_ = Status::OK();
-      } else {
-        currentStatus_ = Status::Corruption("NO MORE DATA LEFT");
-      }
-      return;
-    }
-  }
-}
-
-bool TransactionLogIteratorImpl::IsBatchExpected(
-    const WriteBatch* batch,
-    const SequenceNumber expectedSeq) {
-  assert(batch);
-  SequenceNumber batchSeq = WriteBatchInternal::Sequence(batch);
-  if (batchSeq != expectedSeq) {
-    char buf[200];
-    snprintf(buf, sizeof(buf),
-             "Discontinuity in log records. Got seq=%lu, Expected seq=%lu, "
-             "Last flushed seq=%lu.Log iterator will reseek the correct "
-             "batch.",
-             (unsigned long)batchSeq,
-             (unsigned long)expectedSeq,
-             (unsigned long)dbimpl_->GetLatestSequenceNumber());
-    reporter_.Info(buf);
-    return false;
-  }
-  return true;
-}
-
-void TransactionLogIteratorImpl::UpdateCurrentWriteBatch(const Slice& record) {
-  std::unique_ptr<WriteBatch> batch(new WriteBatch());
-  WriteBatchInternal::SetContents(batch.get(), record);
-
-  SequenceNumber expectedSeq = currentLastSeq_ + 1;
-  // If the iterator has started, then confirm that we get continuous batches
-  if (started_ && !IsBatchExpected(batch.get(), expectedSeq)) {
-    // Seek to the batch having expected sequence number
-    if (expectedSeq < files_->at(currentFileIndex_)->StartSequence()) {
-      // Expected batch must lie in the previous log file
-      // Avoid underflow.
-      if (currentFileIndex_ != 0) {
-        currentFileIndex_--;
-      }
-    }
-    startingSequenceNumber_ = expectedSeq;
-    // currentStatus_ will be set to Ok if reseek succeeds
-    currentStatus_ = Status::NotFound("Gap in sequence numbers");
-    return SeekToStartSequence(currentFileIndex_, true);
-  }
-
-  currentBatchSeq_ = WriteBatchInternal::Sequence(batch.get());
-  currentLastSeq_ = currentBatchSeq_ +
-                    WriteBatchInternal::Count(batch.get()) - 1;
-  // currentBatchSeq_ can only change here
-  assert(currentLastSeq_ <= dbimpl_->GetLatestSequenceNumber());
-
-  currentBatch_ = move(batch);
-  isValid_ = true;
-  currentStatus_ = Status::OK();
-}
-
-Status TransactionLogIteratorImpl::OpenLogReader(const LogFile* logFile) {
-  unique_ptr<SequentialFile> file;
-  Status status = OpenLogFile(logFile, &file);
-  if (!status.ok()) {
-    return status;
-  }
-  assert(file);
-  currentLogReader_.reset(new log::Reader(std::move(file), &reporter_,
-                                          read_options_.verify_checksums_, 0));
-  return Status::OK();
-}
-}  //  namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/transaction_log_impl.h b/src/rocksdb/db/transaction_log_impl.h
deleted file mode 100644
index 319b01c..0000000
--- a/src/rocksdb/db/transaction_log_impl.h
+++ /dev/null
@@ -1,120 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include <vector>
-
-#include "rocksdb/env.h"
-#include "rocksdb/options.h"
-#include "rocksdb/types.h"
-#include "rocksdb/transaction_log.h"
-#include "db/db_impl.h"
-#include "db/log_reader.h"
-#include "db/filename.h"
-
-namespace rocksdb {
-
-struct LogReporter : public log::Reader::Reporter {
-  Env* env;
-  Logger* info_log;
-  virtual void Corruption(size_t bytes, const Status& s) {
-    Log(info_log, "dropping %zu bytes; %s", bytes, s.ToString().c_str());
-  }
-  virtual void Info(const char* s) {
-    Log(info_log, "%s", s);
-  }
-};
-
-class LogFileImpl : public LogFile {
- public:
-  LogFileImpl(uint64_t logNum, WalFileType logType, SequenceNumber startSeq,
-              uint64_t sizeBytes) :
-    logNumber_(logNum),
-    type_(logType),
-    startSequence_(startSeq),
-    sizeFileBytes_(sizeBytes) {
-  }
-
-  std::string PathName() const {
-    if (type_ == kArchivedLogFile) {
-      return ArchivedLogFileName("", logNumber_);
-    }
-    return LogFileName("", logNumber_);
-  }
-
-  uint64_t LogNumber() const { return logNumber_; }
-
-  WalFileType Type() const { return type_; }
-
-  SequenceNumber StartSequence() const { return startSequence_; }
-
-  uint64_t SizeFileBytes() const { return sizeFileBytes_; }
-
-  bool operator < (const LogFile& that) const {
-    return LogNumber() < that.LogNumber();
-  }
-
- private:
-  uint64_t logNumber_;
-  WalFileType type_;
-  SequenceNumber startSequence_;
-  uint64_t sizeFileBytes_;
-
-};
-
-class TransactionLogIteratorImpl : public TransactionLogIterator {
- public:
-  TransactionLogIteratorImpl(
-      const std::string& dir, const DBOptions* options,
-      const TransactionLogIterator::ReadOptions& read_options,
-      const EnvOptions& soptions, const SequenceNumber seqNum,
-      std::unique_ptr<VectorLogPtr> files, DBImpl const* const dbimpl);
-
-  virtual bool Valid();
-
-  virtual void Next();
-
-  virtual Status status();
-
-  virtual BatchResult GetBatch();
-
- private:
-  const std::string& dir_;
-  const DBOptions* options_;
-  const TransactionLogIterator::ReadOptions read_options_;
-  const EnvOptions& soptions_;
-  SequenceNumber startingSequenceNumber_;
-  std::unique_ptr<VectorLogPtr> files_;
-  bool started_;
-  bool isValid_;  // not valid when it starts of.
-  Status currentStatus_;
-  size_t currentFileIndex_;
-  std::unique_ptr<WriteBatch> currentBatch_;
-  unique_ptr<log::Reader> currentLogReader_;
-  Status OpenLogFile(const LogFile* logFile, unique_ptr<SequentialFile>* file);
-  LogReporter reporter_;
-  SequenceNumber currentBatchSeq_; // sequence number at start of current batch
-  SequenceNumber currentLastSeq_; // last sequence in the current batch
-  DBImpl const * const dbimpl_; // The db on whose log files this iterates
-
-  // Reads from transaction log only if the writebatch record has been written
-  bool RestrictedRead(Slice* record, std::string* scratch);
-  // Seeks to startingSequenceNumber reading from startFileIndex in files_.
-  // If strict is set,then must get a batch starting with startingSequenceNumber
-  void SeekToStartSequence(uint64_t startFileIndex = 0, bool strict = false);
-  // Implementation of Next. SeekToStartSequence calls it internally with
-  // internal=true to let it find next entry even if it has to jump gaps because
-  // the iterator may start off from the first available entry but promises to
-  // be continuous after that
-  void NextImpl(bool internal = false);
-  // Check if batch is expected, else return false
-  bool IsBatchExpected(const WriteBatch* batch, SequenceNumber expectedSeq);
-  // Update current batch if a continuous batch is found, else return false
-  void UpdateCurrentWriteBatch(const Slice& record);
-  Status OpenLogReader(const LogFile* file);
-};
-}  //  namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/db/version_edit.cc b/src/rocksdb/db/version_edit.cc
deleted file mode 100644
index 24d7f0d..0000000
--- a/src/rocksdb/db/version_edit.cc
+++ /dev/null
@@ -1,364 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/version_edit.h"
-
-#include "db/version_set.h"
-#include "util/coding.h"
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-// Tag numbers for serialized VersionEdit.  These numbers are written to
-// disk and should not be changed.
-enum Tag {
-  kComparator           = 1,
-  kLogNumber            = 2,
-  kNextFileNumber       = 3,
-  kLastSequence         = 4,
-  kCompactPointer       = 5,
-  kDeletedFile          = 6,
-  kNewFile              = 7,
-  // 8 was used for large value refs
-  kPrevLogNumber        = 9,
-
-  // these are new formats divergent from open source leveldb
-  kNewFile2             = 100,  // store smallest & largest seqno
-
-  kColumnFamily         = 200,  // specify column family for version edit
-  kColumnFamilyAdd      = 201,
-  kColumnFamilyDrop     = 202,
-  kMaxColumnFamily      = 203,
-};
-
-void VersionEdit::Clear() {
-  comparator_.clear();
-  max_level_ = 0;
-  log_number_ = 0;
-  prev_log_number_ = 0;
-  last_sequence_ = 0;
-  next_file_number_ = 0;
-  max_column_family_ = 0;
-  has_comparator_ = false;
-  has_log_number_ = false;
-  has_prev_log_number_ = false;
-  has_next_file_number_ = false;
-  has_last_sequence_ = false;
-  has_max_column_family_ = false;
-  deleted_files_.clear();
-  new_files_.clear();
-  column_family_ = 0;
-  is_column_family_add_ = 0;
-  is_column_family_drop_ = 0;
-  column_family_name_.clear();
-}
-
-void VersionEdit::EncodeTo(std::string* dst) const {
-  if (has_comparator_) {
-    PutVarint32(dst, kComparator);
-    PutLengthPrefixedSlice(dst, comparator_);
-  }
-  if (has_log_number_) {
-    PutVarint32(dst, kLogNumber);
-    PutVarint64(dst, log_number_);
-  }
-  if (has_prev_log_number_) {
-    PutVarint32(dst, kPrevLogNumber);
-    PutVarint64(dst, prev_log_number_);
-  }
-  if (has_next_file_number_) {
-    PutVarint32(dst, kNextFileNumber);
-    PutVarint64(dst, next_file_number_);
-  }
-  if (has_last_sequence_) {
-    PutVarint32(dst, kLastSequence);
-    PutVarint64(dst, last_sequence_);
-  }
-  if (has_max_column_family_) {
-    PutVarint32(dst, kMaxColumnFamily);
-    PutVarint32(dst, max_column_family_);
-  }
-
-  for (const auto& deleted : deleted_files_) {
-    PutVarint32(dst, kDeletedFile);
-    PutVarint32(dst, deleted.first /* level */);
-    PutVarint64(dst, deleted.second /* file number */);
-  }
-
-  for (size_t i = 0; i < new_files_.size(); i++) {
-    const FileMetaData& f = new_files_[i].second;
-    PutVarint32(dst, kNewFile2);
-    PutVarint32(dst, new_files_[i].first);  // level
-    PutVarint64(dst, f.number);
-    PutVarint64(dst, f.file_size);
-    PutLengthPrefixedSlice(dst, f.smallest.Encode());
-    PutLengthPrefixedSlice(dst, f.largest.Encode());
-    PutVarint64(dst, f.smallest_seqno);
-    PutVarint64(dst, f.largest_seqno);
-  }
-
-  // 0 is default and does not need to be explicitly written
-  if (column_family_ != 0) {
-    PutVarint32(dst, kColumnFamily);
-    PutVarint32(dst, column_family_);
-  }
-
-  if (is_column_family_add_) {
-    PutVarint32(dst, kColumnFamilyAdd);
-    PutLengthPrefixedSlice(dst, Slice(column_family_name_));
-  }
-
-  if (is_column_family_drop_) {
-    PutVarint32(dst, kColumnFamilyDrop);
-  }
-}
-
-static bool GetInternalKey(Slice* input, InternalKey* dst) {
-  Slice str;
-  if (GetLengthPrefixedSlice(input, &str)) {
-    dst->DecodeFrom(str);
-    return true;
-  } else {
-    return false;
-  }
-}
-
-bool VersionEdit::GetLevel(Slice* input, int* level, const char** msg) {
-  uint32_t v;
-  if (GetVarint32(input, &v)) {
-    *level = v;
-    if (max_level_ < *level) {
-      max_level_ = *level;
-    }
-    return true;
-  } else {
-    return false;
-  }
-}
-
-Status VersionEdit::DecodeFrom(const Slice& src) {
-  Clear();
-  Slice input = src;
-  const char* msg = nullptr;
-  uint32_t tag;
-
-  // Temporary storage for parsing
-  int level;
-  uint64_t number;
-  FileMetaData f;
-  Slice str;
-  InternalKey key;
-
-  while (msg == nullptr && GetVarint32(&input, &tag)) {
-    switch (tag) {
-      case kComparator:
-        if (GetLengthPrefixedSlice(&input, &str)) {
-          comparator_ = str.ToString();
-          has_comparator_ = true;
-        } else {
-          msg = "comparator name";
-        }
-        break;
-
-      case kLogNumber:
-        if (GetVarint64(&input, &log_number_)) {
-          has_log_number_ = true;
-        } else {
-          msg = "log number";
-        }
-        break;
-
-      case kPrevLogNumber:
-        if (GetVarint64(&input, &prev_log_number_)) {
-          has_prev_log_number_ = true;
-        } else {
-          msg = "previous log number";
-        }
-        break;
-
-      case kNextFileNumber:
-        if (GetVarint64(&input, &next_file_number_)) {
-          has_next_file_number_ = true;
-        } else {
-          msg = "next file number";
-        }
-        break;
-
-      case kLastSequence:
-        if (GetVarint64(&input, &last_sequence_)) {
-          has_last_sequence_ = true;
-        } else {
-          msg = "last sequence number";
-        }
-        break;
-
-      case kMaxColumnFamily:
-        if (GetVarint32(&input, &max_column_family_)) {
-          has_max_column_family_ = true;
-        } else {
-          msg = "max column family";
-        }
-        break;
-
-      case kCompactPointer:
-        if (GetLevel(&input, &level, &msg) &&
-            GetInternalKey(&input, &key)) {
-          // we don't use compact pointers anymore,
-          // but we should not fail if they are still
-          // in manifest
-        } else {
-          if (!msg) {
-            msg = "compaction pointer";
-          }
-        }
-        break;
-
-      case kDeletedFile:
-        if (GetLevel(&input, &level, &msg) &&
-            GetVarint64(&input, &number)) {
-          deleted_files_.insert(std::make_pair(level, number));
-        } else {
-          if (!msg) {
-            msg = "deleted file";
-          }
-        }
-        break;
-
-      case kNewFile:
-        if (GetLevel(&input, &level, &msg) &&
-            GetVarint64(&input, &f.number) &&
-            GetVarint64(&input, &f.file_size) &&
-            GetInternalKey(&input, &f.smallest) &&
-            GetInternalKey(&input, &f.largest)) {
-          new_files_.push_back(std::make_pair(level, f));
-        } else {
-          if (!msg) {
-            msg = "new-file entry";
-          }
-        }
-        break;
-
-      case kNewFile2:
-        if (GetLevel(&input, &level, &msg) &&
-            GetVarint64(&input, &f.number) &&
-            GetVarint64(&input, &f.file_size) &&
-            GetInternalKey(&input, &f.smallest) &&
-            GetInternalKey(&input, &f.largest) &&
-            GetVarint64(&input, &f.smallest_seqno) &&
-            GetVarint64(&input, &f.largest_seqno) ) {
-          new_files_.push_back(std::make_pair(level, f));
-        } else {
-          if (!msg) {
-            msg = "new-file2 entry";
-          }
-        }
-        break;
-
-      case kColumnFamily:
-        if (!GetVarint32(&input, &column_family_)) {
-          if (!msg) {
-            msg = "set column family id";
-          }
-        }
-        break;
-
-      case kColumnFamilyAdd:
-        if (GetLengthPrefixedSlice(&input, &str)) {
-          is_column_family_add_ = true;
-          column_family_name_ = str.ToString();
-        } else {
-          if (!msg) {
-            msg = "column family add";
-          }
-        }
-        break;
-
-      case kColumnFamilyDrop:
-        is_column_family_drop_ = true;
-        break;
-
-      default:
-        msg = "unknown tag";
-        break;
-    }
-  }
-
-  if (msg == nullptr && !input.empty()) {
-    msg = "invalid tag";
-  }
-
-  Status result;
-  if (msg != nullptr) {
-    result = Status::Corruption("VersionEdit", msg);
-  }
-  return result;
-}
-
-std::string VersionEdit::DebugString(bool hex_key) const {
-  std::string r;
-  r.append("VersionEdit {");
-  if (has_comparator_) {
-    r.append("\n  Comparator: ");
-    r.append(comparator_);
-  }
-  if (has_log_number_) {
-    r.append("\n  LogNumber: ");
-    AppendNumberTo(&r, log_number_);
-  }
-  if (has_prev_log_number_) {
-    r.append("\n  PrevLogNumber: ");
-    AppendNumberTo(&r, prev_log_number_);
-  }
-  if (has_next_file_number_) {
-    r.append("\n  NextFile: ");
-    AppendNumberTo(&r, next_file_number_);
-  }
-  if (has_last_sequence_) {
-    r.append("\n  LastSeq: ");
-    AppendNumberTo(&r, last_sequence_);
-  }
-  for (DeletedFileSet::const_iterator iter = deleted_files_.begin();
-       iter != deleted_files_.end();
-       ++iter) {
-    r.append("\n  DeleteFile: ");
-    AppendNumberTo(&r, iter->first);
-    r.append(" ");
-    AppendNumberTo(&r, iter->second);
-  }
-  for (size_t i = 0; i < new_files_.size(); i++) {
-    const FileMetaData& f = new_files_[i].second;
-    r.append("\n  AddFile: ");
-    AppendNumberTo(&r, new_files_[i].first);
-    r.append(" ");
-    AppendNumberTo(&r, f.number);
-    r.append(" ");
-    AppendNumberTo(&r, f.file_size);
-    r.append(" ");
-    r.append(f.smallest.DebugString(hex_key));
-    r.append(" .. ");
-    r.append(f.largest.DebugString(hex_key));
-  }
-  r.append("\n  ColumnFamily: ");
-  AppendNumberTo(&r, column_family_);
-  if (is_column_family_add_) {
-    r.append("\n  ColumnFamilyAdd: ");
-    r.append(column_family_name_);
-  }
-  if (is_column_family_drop_) {
-    r.append("\n  ColumnFamilyDrop");
-  }
-  if (has_max_column_family_) {
-    r.append("\n  MaxColumnFamily: ");
-    AppendNumberTo(&r, max_column_family_);
-  }
-  r.append("\n}\n");
-  return r;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/version_edit.h b/src/rocksdb/db/version_edit.h
deleted file mode 100644
index acaec8a..0000000
--- a/src/rocksdb/db/version_edit.h
+++ /dev/null
@@ -1,176 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <set>
-#include <utility>
-#include <vector>
-#include <string>
-#include "rocksdb/cache.h"
-#include "db/dbformat.h"
-
-namespace rocksdb {
-
-class VersionSet;
-
-struct FileMetaData {
-  int refs;
-  int allowed_seeks;          // Seeks allowed until compaction
-  uint64_t number;
-  uint64_t file_size;         // File size in bytes
-  InternalKey smallest;       // Smallest internal key served by table
-  InternalKey largest;        // Largest internal key served by table
-  bool being_compacted;       // Is this file undergoing compaction?
-  SequenceNumber smallest_seqno;// The smallest seqno in this file
-  SequenceNumber largest_seqno; // The largest seqno in this file
-
-  // Needs to be disposed when refs becomes 0.
-  Cache::Handle* table_reader_handle;
-  // Table reader in table_reader_handle
-  TableReader* table_reader;
-
-  FileMetaData(uint64_t number, uint64_t file_size)
-      : refs(0),
-        allowed_seeks(1 << 30),
-        number(number),
-        file_size(file_size),
-        being_compacted(false),
-        table_reader_handle(nullptr),
-        table_reader(nullptr) {}
-  FileMetaData() : FileMetaData(0, 0) {}
-};
-
-class VersionEdit {
- public:
-  VersionEdit() { Clear(); }
-  ~VersionEdit() { }
-
-  void Clear();
-
-  void SetComparatorName(const Slice& name) {
-    has_comparator_ = true;
-    comparator_ = name.ToString();
-  }
-  void SetLogNumber(uint64_t num) {
-    has_log_number_ = true;
-    log_number_ = num;
-  }
-  void SetPrevLogNumber(uint64_t num) {
-    has_prev_log_number_ = true;
-    prev_log_number_ = num;
-  }
-  void SetNextFile(uint64_t num) {
-    has_next_file_number_ = true;
-    next_file_number_ = num;
-  }
-  void SetLastSequence(SequenceNumber seq) {
-    has_last_sequence_ = true;
-    last_sequence_ = seq;
-  }
-  void SetMaxColumnFamily(uint32_t max_column_family) {
-    has_max_column_family_ = true;
-    max_column_family_ = max_column_family;
-  }
-
-  // Add the specified file at the specified number.
-  // REQUIRES: This version has not been saved (see VersionSet::SaveTo)
-  // REQUIRES: "smallest" and "largest" are smallest and largest keys in file
-  void AddFile(int level, uint64_t file,
-               uint64_t file_size,
-               const InternalKey& smallest,
-               const InternalKey& largest,
-               const SequenceNumber& smallest_seqno,
-               const SequenceNumber& largest_seqno) {
-    assert(smallest_seqno <= largest_seqno);
-    FileMetaData f;
-    f.number = file;
-    f.file_size = file_size;
-    f.smallest = smallest;
-    f.largest = largest;
-    f.smallest_seqno = smallest_seqno;
-    f.largest_seqno = largest_seqno;
-    new_files_.push_back(std::make_pair(level, f));
-  }
-
-  // Delete the specified "file" from the specified "level".
-  void DeleteFile(int level, uint64_t file) {
-    deleted_files_.insert({level, file});
-  }
-
-  // Number of edits
-  int NumEntries() {
-    return new_files_.size() + deleted_files_.size();
-  }
-
-  bool IsColumnFamilyManipulation() {
-    return is_column_family_add_ || is_column_family_drop_;
-  }
-
-  void SetColumnFamily(uint32_t column_family_id) {
-    column_family_ = column_family_id;
-  }
-
-  // set column family ID by calling SetColumnFamily()
-  void AddColumnFamily(const std::string& name) {
-    assert(!is_column_family_drop_);
-    assert(!is_column_family_add_);
-    assert(NumEntries() == 0);
-    is_column_family_add_ = true;
-    column_family_name_ = name;
-  }
-
-  // set column family ID by calling SetColumnFamily()
-  void DropColumnFamily() {
-    assert(!is_column_family_drop_);
-    assert(!is_column_family_add_);
-    assert(NumEntries() == 0);
-    is_column_family_drop_ = true;
-  }
-
-  void EncodeTo(std::string* dst) const;
-  Status DecodeFrom(const Slice& src);
-
-  std::string DebugString(bool hex_key = false) const;
-
- private:
-  friend class VersionSet;
-
-  typedef std::set< std::pair<int, uint64_t>> DeletedFileSet;
-
-  bool GetLevel(Slice* input, int* level, const char** msg);
-
-  int max_level_;
-  std::string comparator_;
-  uint64_t log_number_;
-  uint64_t prev_log_number_;
-  uint64_t next_file_number_;
-  uint32_t max_column_family_;
-  SequenceNumber last_sequence_;
-  bool has_comparator_;
-  bool has_log_number_;
-  bool has_prev_log_number_;
-  bool has_next_file_number_;
-  bool has_last_sequence_;
-  bool has_max_column_family_;
-
-  DeletedFileSet deleted_files_;
-  std::vector<std::pair<int, FileMetaData>> new_files_;
-
-  // Each version edit record should have column_family_id set
-  // If it's not set, it is default (0)
-  uint32_t column_family_;
-  // a version edit can be either column_family add or
-  // column_family drop. If it's column family add,
-  // it also includes column family name.
-  bool is_column_family_drop_;
-  bool is_column_family_add_;
-  std::string column_family_name_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/version_edit_test.cc b/src/rocksdb/db/version_edit_test.cc
deleted file mode 100644
index 7842b32..0000000
--- a/src/rocksdb/db/version_edit_test.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/version_edit.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-static void TestEncodeDecode(const VersionEdit& edit) {
-  std::string encoded, encoded2;
-  edit.EncodeTo(&encoded);
-  VersionEdit parsed;
-  Status s = parsed.DecodeFrom(encoded);
-  ASSERT_TRUE(s.ok()) << s.ToString();
-  parsed.EncodeTo(&encoded2);
-  ASSERT_EQ(encoded, encoded2);
-}
-
-class VersionEditTest { };
-
-TEST(VersionEditTest, EncodeDecode) {
-  static const uint64_t kBig = 1ull << 50;
-
-  VersionEdit edit;
-  for (int i = 0; i < 4; i++) {
-    TestEncodeDecode(edit);
-    edit.AddFile(3, kBig + 300 + i, kBig + 400 + i,
-                 InternalKey("foo", kBig + 500 + i, kTypeValue),
-                 InternalKey("zoo", kBig + 600 + i, kTypeDeletion),
-                 kBig + 500 + i,
-                 kBig + 600 + i);
-    edit.DeleteFile(4, kBig + 700 + i);
-  }
-
-  edit.SetComparatorName("foo");
-  edit.SetLogNumber(kBig + 100);
-  edit.SetNextFile(kBig + 200);
-  edit.SetLastSequence(kBig + 1000);
-  TestEncodeDecode(edit);
-}
-
-TEST(VersionEditTest, ColumnFamilyTest) {
-  VersionEdit edit;
-  edit.SetColumnFamily(2);
-  edit.AddColumnFamily("column_family");
-  edit.SetMaxColumnFamily(5);
-  TestEncodeDecode(edit);
-
-  edit.Clear();
-  edit.SetColumnFamily(3);
-  edit.DropColumnFamily();
-  TestEncodeDecode(edit);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/version_set.cc b/src/rocksdb/db/version_set.cc
deleted file mode 100644
index 00d9caf..0000000
--- a/src/rocksdb/db/version_set.cc
+++ /dev/null
@@ -1,2780 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#define __STDC_FORMAT_MACROS
-#include "db/version_set.h"
-
-#include <inttypes.h>
-#include <algorithm>
-#include <map>
-#include <set>
-#include <climits>
-#include <unordered_map>
-#include <stdio.h>
-
-#include "db/filename.h"
-#include "db/log_reader.h"
-#include "db/log_writer.h"
-#include "db/memtable.h"
-#include "db/merge_context.h"
-#include "db/table_cache.h"
-#include "db/compaction.h"
-#include "rocksdb/env.h"
-#include "rocksdb/merge_operator.h"
-#include "table/table_reader.h"
-#include "table/merger.h"
-#include "table/two_level_iterator.h"
-#include "table/format.h"
-#include "table/plain_table_factory.h"
-#include "table/meta_blocks.h"
-#include "util/coding.h"
-#include "util/logging.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-static uint64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
-  uint64_t sum = 0;
-  for (size_t i = 0; i < files.size() && files[i]; i++) {
-    sum += files[i]->file_size;
-  }
-  return sum;
-}
-
-Version::~Version() {
-  assert(refs_ == 0);
-
-  // Remove from linked list
-  prev_->next_ = next_;
-  next_->prev_ = prev_;
-
-  // Drop references to files
-  for (int level = 0; level < num_levels_; level++) {
-    for (size_t i = 0; i < files_[level].size(); i++) {
-      FileMetaData* f = files_[level][i];
-      assert(f->refs > 0);
-      f->refs--;
-      if (f->refs <= 0) {
-        if (f->table_reader_handle) {
-          cfd_->table_cache()->ReleaseHandle(f->table_reader_handle);
-          f->table_reader_handle = nullptr;
-        }
-        vset_->obsolete_files_.push_back(f);
-      }
-    }
-  }
-  delete[] files_;
-}
-
-int FindFileInRange(const InternalKeyComparator& icmp,
-    const std::vector<FileMetaData*>& files,
-    const Slice& key,
-    uint32_t left,
-    uint32_t right) {
-  while (left < right) {
-    uint32_t mid = (left + right) / 2;
-    const FileMetaData* f = files[mid];
-    if (icmp.InternalKeyComparator::Compare(f->largest.Encode(), key) < 0) {
-      // Key at "mid.largest" is < "target".  Therefore all
-      // files at or before "mid" are uninteresting.
-      left = mid + 1;
-    } else {
-      // Key at "mid.largest" is >= "target".  Therefore all files
-      // after "mid" are uninteresting.
-      right = mid;
-    }
-  }
-  return right;
-}
-
-int FindFile(const InternalKeyComparator& icmp,
-             const std::vector<FileMetaData*>& files,
-             const Slice& key) {
-  return FindFileInRange(icmp, files, key, 0, files.size());
-}
-
-static bool AfterFile(const Comparator* ucmp,
-                      const Slice* user_key, const FileMetaData* f) {
-  // nullptr user_key occurs before all keys and is therefore never after *f
-  return (user_key != nullptr &&
-          ucmp->Compare(*user_key, f->largest.user_key()) > 0);
-}
-
-static bool BeforeFile(const Comparator* ucmp,
-                       const Slice* user_key, const FileMetaData* f) {
-  // nullptr user_key occurs after all keys and is therefore never before *f
-  return (user_key != nullptr &&
-          ucmp->Compare(*user_key, f->smallest.user_key()) < 0);
-}
-
-bool SomeFileOverlapsRange(
-    const InternalKeyComparator& icmp,
-    bool disjoint_sorted_files,
-    const std::vector<FileMetaData*>& files,
-    const Slice* smallest_user_key,
-    const Slice* largest_user_key) {
-  const Comparator* ucmp = icmp.user_comparator();
-  if (!disjoint_sorted_files) {
-    // Need to check against all files
-    for (size_t i = 0; i < files.size(); i++) {
-      const FileMetaData* f = files[i];
-      if (AfterFile(ucmp, smallest_user_key, f) ||
-          BeforeFile(ucmp, largest_user_key, f)) {
-        // No overlap
-      } else {
-        return true;  // Overlap
-      }
-    }
-    return false;
-  }
-
-  // Binary search over file list
-  uint32_t index = 0;
-  if (smallest_user_key != nullptr) {
-    // Find the earliest possible internal key for smallest_user_key
-    InternalKey small(*smallest_user_key, kMaxSequenceNumber,kValueTypeForSeek);
-    index = FindFile(icmp, files, small.Encode());
-  }
-
-  if (index >= files.size()) {
-    // beginning of range is after all files, so no overlap.
-    return false;
-  }
-
-  return !BeforeFile(ucmp, largest_user_key, files[index]);
-}
-
-namespace {
-// Used for LevelFileNumIterator to pass "block handle" value,
-// which actually means file information in this iterator.
-// It contains subset of fields of FileMetaData, that is sufficient
-// for table cache to use.
-struct EncodedFileMetaData {
-  uint64_t number;   // file number
-  uint64_t file_size;   // file size
-  TableReader* table_reader;   // cached table reader
-};
-}  // namespace
-
-// An internal iterator.  For a given version/level pair, yields
-// information about the files in the level.  For a given entry, key()
-// is the largest key that occurs in the file, and value() is an
-// 16-byte value containing the file number and file size, both
-// encoded using EncodeFixed64.
-class Version::LevelFileNumIterator : public Iterator {
- public:
-  LevelFileNumIterator(const InternalKeyComparator& icmp,
-                       const std::vector<FileMetaData*>* flist)
-      : icmp_(icmp),
-        flist_(flist),
-        index_(flist->size()) {        // Marks as invalid
-  }
-  virtual bool Valid() const {
-    return index_ < flist_->size();
-  }
-  virtual void Seek(const Slice& target) {
-    index_ = FindFile(icmp_, *flist_, target);
-  }
-  virtual void SeekToFirst() { index_ = 0; }
-  virtual void SeekToLast() {
-    index_ = flist_->empty() ? 0 : flist_->size() - 1;
-  }
-  virtual void Next() {
-    assert(Valid());
-    index_++;
-  }
-  virtual void Prev() {
-    assert(Valid());
-    if (index_ == 0) {
-      index_ = flist_->size();  // Marks as invalid
-    } else {
-      index_--;
-    }
-  }
-  Slice key() const {
-    assert(Valid());
-    return (*flist_)[index_]->largest.Encode();
-  }
-  Slice value() const {
-    assert(Valid());
-    auto* file_meta = (*flist_)[index_];
-    current_value_.number = file_meta->number;
-    current_value_.file_size = file_meta->file_size;
-    current_value_.table_reader = file_meta->table_reader;
-    return Slice(reinterpret_cast<const char*>(&current_value_),
-                 sizeof(EncodedFileMetaData));
-  }
-  virtual Status status() const { return Status::OK(); }
- private:
-  const InternalKeyComparator icmp_;
-  const std::vector<FileMetaData*>* const flist_;
-  uint32_t index_;
-  mutable EncodedFileMetaData current_value_;
-};
-
-class Version::LevelFileIteratorState : public TwoLevelIteratorState {
- public:
-  LevelFileIteratorState(TableCache* table_cache,
-    const ReadOptions& read_options, const EnvOptions& env_options,
-    const InternalKeyComparator& icomparator, bool for_compaction,
-    bool prefix_enabled)
-    : TwoLevelIteratorState(prefix_enabled),
-      table_cache_(table_cache), read_options_(read_options),
-      env_options_(env_options), icomparator_(icomparator),
-      for_compaction_(for_compaction) {}
-
-  Iterator* NewSecondaryIterator(const Slice& meta_handle) override {
-    if (meta_handle.size() != sizeof(EncodedFileMetaData)) {
-      return NewErrorIterator(
-          Status::Corruption("FileReader invoked with unexpected value"));
-    } else {
-      const EncodedFileMetaData* encoded_meta =
-          reinterpret_cast<const EncodedFileMetaData*>(meta_handle.data());
-      FileMetaData meta(encoded_meta->number, encoded_meta->file_size);
-      meta.table_reader = encoded_meta->table_reader;
-      return table_cache_->NewIterator(read_options_, env_options_,
-          icomparator_, meta, nullptr /* don't need reference to table*/,
-          for_compaction_);
-    }
-  }
-
-  bool PrefixMayMatch(const Slice& internal_key) override {
-    return true;
-  }
-
- private:
-  TableCache* table_cache_;
-  const ReadOptions read_options_;
-  const EnvOptions& env_options_;
-  const InternalKeyComparator& icomparator_;
-  bool for_compaction_;
-};
-
-Status Version::GetPropertiesOfAllTables(TablePropertiesCollection* props) {
-  auto table_cache = cfd_->table_cache();
-  auto options = cfd_->options();
-  for (int level = 0; level < num_levels_; level++) {
-    for (const auto& file_meta : files_[level]) {
-      auto fname = TableFileName(vset_->dbname_, file_meta->number);
-      // 1. If the table is already present in table cache, load table
-      // properties from there.
-      std::shared_ptr<const TableProperties> table_properties;
-      Status s = table_cache->GetTableProperties(
-          vset_->storage_options_, cfd_->internal_comparator(), *file_meta,
-          &table_properties, true /* no io */);
-      if (s.ok()) {
-        props->insert({fname, table_properties});
-        continue;
-      }
-
-      // We only ignore error type `Incomplete` since it's by design that we
-      // disallow table when it's not in table cache.
-      if (!s.IsIncomplete()) {
-        return s;
-      }
-
-      // 2. Table is not present in table cache, we'll read the table properties
-      // directly from the properties block in the file.
-      std::unique_ptr<RandomAccessFile> file;
-      s = options->env->NewRandomAccessFile(fname, &file,
-                                            vset_->storage_options_);
-      if (!s.ok()) {
-        return s;
-      }
-
-      TableProperties* raw_table_properties;
-      // By setting the magic number to kInvalidTableMagicNumber, we can by
-      // pass the magic number check in the footer.
-      s = ReadTableProperties(
-          file.get(), file_meta->file_size,
-          Footer::kInvalidTableMagicNumber /* table's magic number */,
-          vset_->env_, options->info_log.get(), &raw_table_properties);
-      if (!s.ok()) {
-        return s;
-      }
-      RecordTick(options->statistics.get(),
-                 NUMBER_DIRECT_LOAD_TABLE_PROPERTIES);
-
-      props->insert({fname, std::shared_ptr<const TableProperties>(
-                                raw_table_properties)});
-    }
-  }
-
-  return Status::OK();
-}
-
-void Version::AddIterators(const ReadOptions& read_options,
-                           const EnvOptions& soptions,
-                           std::vector<Iterator*>* iters) {
-  // Merge all level zero files together since they may overlap
-  for (const FileMetaData* file : files_[0]) {
-    iters->push_back(cfd_->table_cache()->NewIterator(
-        read_options, soptions, cfd_->internal_comparator(), *file));
-  }
-
-  // For levels > 0, we can use a concatenating iterator that sequentially
-  // walks through the non-overlapping files in the level, opening them
-  // lazily.
-  for (int level = 1; level < num_levels_; level++) {
-    if (!files_[level].empty()) {
-      iters->push_back(NewTwoLevelIterator(new LevelFileIteratorState(
-          cfd_->table_cache(), read_options, soptions,
-          cfd_->internal_comparator(), false /* for_compaction */,
-          cfd_->options()->prefix_extractor != nullptr),
-        new LevelFileNumIterator(cfd_->internal_comparator(), &files_[level])));
-    }
-  }
-}
-
-// Callback from TableCache::Get()
-namespace {
-enum SaverState {
-  kNotFound,
-  kFound,
-  kDeleted,
-  kCorrupt,
-  kMerge // saver contains the current merge result (the operands)
-};
-struct Saver {
-  SaverState state;
-  const Comparator* ucmp;
-  Slice user_key;
-  bool* value_found; // Is value set correctly? Used by KeyMayExist
-  std::string* value;
-  const MergeOperator* merge_operator;
-  // the merge operations encountered;
-  MergeContext* merge_context;
-  Logger* logger;
-  bool didIO;    // did we do any disk io?
-  Statistics* statistics;
-};
-}
-
-// Called from TableCache::Get and Table::Get when file/block in which
-// key may  exist are not there in TableCache/BlockCache respectively. In this
-// case we  can't guarantee that key does not exist and are not permitted to do
-// IO to be  certain.Set the status=kFound and value_found=false to let the
-// caller know that key may exist but is not there in memory
-static void MarkKeyMayExist(void* arg) {
-  Saver* s = reinterpret_cast<Saver*>(arg);
-  s->state = kFound;
-  if (s->value_found != nullptr) {
-    *(s->value_found) = false;
-  }
-}
-
-static bool SaveValue(void* arg, const ParsedInternalKey& parsed_key,
-                      const Slice& v, bool didIO) {
-  Saver* s = reinterpret_cast<Saver*>(arg);
-  MergeContext* merge_contex = s->merge_context;
-  std::string merge_result;  // temporary area for merge results later
-
-  assert(s != nullptr && merge_contex != nullptr);
-
-  // TODO: didIO and Merge?
-  s->didIO = didIO;
-  if (s->ucmp->Compare(parsed_key.user_key, s->user_key) == 0) {
-    // Key matches. Process it
-    switch (parsed_key.type) {
-      case kTypeValue:
-        if (kNotFound == s->state) {
-          s->state = kFound;
-          s->value->assign(v.data(), v.size());
-        } else if (kMerge == s->state) {
-          assert(s->merge_operator != nullptr);
-          s->state = kFound;
-          if (!s->merge_operator->FullMerge(s->user_key, &v,
-                                            merge_contex->GetOperands(),
-                                            s->value, s->logger)) {
-            RecordTick(s->statistics, NUMBER_MERGE_FAILURES);
-            s->state = kCorrupt;
-          }
-        } else {
-          assert(false);
-        }
-        return false;
-
-      case kTypeDeletion:
-        if (kNotFound == s->state) {
-          s->state = kDeleted;
-        } else if (kMerge == s->state) {
-          s->state = kFound;
-          if (!s->merge_operator->FullMerge(s->user_key, nullptr,
-                                            merge_contex->GetOperands(),
-                                            s->value, s->logger)) {
-            RecordTick(s->statistics, NUMBER_MERGE_FAILURES);
-            s->state = kCorrupt;
-          }
-        } else {
-          assert(false);
-        }
-        return false;
-
-      case kTypeMerge:
-        assert(s->state == kNotFound || s->state == kMerge);
-        s->state = kMerge;
-        merge_contex->PushOperand(v);
-        return true;
-
-      default:
-        assert(false);
-        break;
-    }
-  }
-
-  // s->state could be Corrupt, merge or notfound
-
-  return false;
-}
-
-namespace {
-bool NewestFirst(FileMetaData* a, FileMetaData* b) {
-  return a->number > b->number;
-}
-bool NewestFirstBySeqNo(FileMetaData* a, FileMetaData* b) {
-  if (a->smallest_seqno != b->smallest_seqno) {
-    return a->smallest_seqno > b->smallest_seqno;
-  }
-  if (a->largest_seqno != b->largest_seqno) {
-    return a->largest_seqno > b->largest_seqno;
-  }
-  // Break ties by file number
-  return NewestFirst(a, b);
-}
-bool BySmallestKey(FileMetaData* a, FileMetaData* b,
-                   const InternalKeyComparator* cmp) {
-  int r = cmp->Compare(a->smallest, b->smallest);
-  if (r != 0) {
-    return (r < 0);
-  }
-  // Break ties by file number
-  return (a->number < b->number);
-}
-}  // anonymous namespace
-
-Version::Version(ColumnFamilyData* cfd, VersionSet* vset,
-                 uint64_t version_number)
-    : cfd_(cfd),
-      internal_comparator_((cfd == nullptr) ? nullptr
-                                            : &cfd->internal_comparator()),
-      user_comparator_((cfd == nullptr)
-                           ? nullptr
-                           : internal_comparator_->user_comparator()),
-      table_cache_((cfd == nullptr) ? nullptr : cfd->table_cache()),
-      merge_operator_((cfd == nullptr) ? nullptr
-                                       : cfd->options()->merge_operator.get()),
-      info_log_((cfd == nullptr) ? nullptr : cfd->options()->info_log.get()),
-      db_statistics_((cfd == nullptr) ? nullptr
-                                      : cfd->options()->statistics.get()),
-      vset_(vset),
-      next_(this),
-      prev_(this),
-      refs_(0),
-      // cfd is nullptr if Version is dummy
-      num_levels_(cfd == nullptr ? 0 : cfd->NumberLevels()),
-      files_(new std::vector<FileMetaData*>[num_levels_]),
-      files_by_size_(num_levels_),
-      next_file_to_compact_by_size_(num_levels_),
-      file_to_compact_(nullptr),
-      file_to_compact_level_(-1),
-      compaction_score_(num_levels_),
-      compaction_level_(num_levels_),
-      version_number_(version_number),
-      file_indexer_(num_levels_, cfd == nullptr ?  nullptr
-          : cfd->internal_comparator().user_comparator()) {
-}
-
-void Version::Get(const ReadOptions& options,
-                  const LookupKey& k,
-                  std::string* value,
-                  Status* status,
-                  MergeContext* merge_context,
-                  GetStats* stats,
-                  bool* value_found) {
-  Slice ikey = k.internal_key();
-  Slice user_key = k.user_key();
-
-  assert(status->ok() || status->IsMergeInProgress());
-  Saver saver;
-  saver.state = status->ok()? kNotFound : kMerge;
-  saver.ucmp = user_comparator_;
-  saver.user_key = user_key;
-  saver.value_found = value_found;
-  saver.value = value;
-  saver.merge_operator = merge_operator_;
-  saver.merge_context = merge_context;
-  saver.logger = info_log_;
-  saver.didIO = false;
-  saver.statistics = db_statistics_;
-
-  stats->seek_file = nullptr;
-  stats->seek_file_level = -1;
-  FileMetaData* last_file_read = nullptr;
-  int last_file_read_level = -1;
-
-  // We can search level-by-level since entries never hop across
-  // levels. Therefore we are guaranteed that if we find data
-  // in an smaller level, later levels are irrelevant (unless we
-  // are MergeInProgress).
-
-  int32_t search_left_bound = 0;
-  int32_t search_right_bound = FileIndexer::kLevelMaxIndex;
-  for (int level = 0; level < num_levels_; ++level) {
-    int num_files = files_[level].size();
-    if (num_files == 0) {
-      // When current level is empty, the search bound generated from upper
-      // level must be [0, -1] or [0, FileIndexer::kLevelMaxIndex] if it is
-      // also empty.
-      assert(search_left_bound == 0);
-      assert(search_right_bound == -1 ||
-             search_right_bound == FileIndexer::kLevelMaxIndex);
-      // Since current level is empty, it will need to search all files in the
-      // next level
-      search_left_bound = 0;
-      search_right_bound = FileIndexer::kLevelMaxIndex;
-      continue;
-    }
-
-    // Get the list of files to search in this level
-    FileMetaData* const* files = &files_[level][0];
-
-    // Some files may overlap each other. We find
-    // all files that overlap user_key and process them in order from
-    // newest to oldest. In the context of merge-operator,
-    // this can occur at any level. Otherwise, it only occurs
-    // at Level-0 (since Put/Deletes are always compacted into a single entry).
-    int32_t start_index;
-    if (level == 0) {
-      // On Level-0, we read through all files to check for overlap.
-      start_index = 0;
-    } else {
-      // On Level-n (n>=1), files are sorted. Binary search to find the earliest
-      // file whose largest key >= ikey. Search left bound and right bound are
-      // used to narrow the range.
-      if (search_left_bound == search_right_bound) {
-        start_index = search_left_bound;
-      } else if (search_left_bound < search_right_bound) {
-        if (search_right_bound == FileIndexer::kLevelMaxIndex) {
-          search_right_bound = num_files - 1;
-        }
-        start_index = FindFileInRange(cfd_->internal_comparator(),
-            files_[level], ikey, search_left_bound, search_right_bound);
-      } else {
-        // search_left_bound > search_right_bound, key does not exist in this
-        // level. Since no comparision is done in this level, it will need to
-        // search all files in the next level.
-        search_left_bound = 0;
-        search_right_bound = FileIndexer::kLevelMaxIndex;
-        continue;
-      }
-    }
-    // Traverse each relevant file to find the desired key
-#ifndef NDEBUG
-    FileMetaData* prev_file = nullptr;
-#endif
-
-    for (int32_t i = start_index; i < num_files;) {
-      FileMetaData* f = files[i];
-      // Check if key is within a file's range. If search left bound and right
-      // bound point to the same find, we are sure key falls in range.
-      assert(level == 0 || i == start_index ||
-             user_comparator_->Compare(user_key, f->smallest.user_key()) <= 0);
-
-      int cmp_smallest = user_comparator_->Compare(user_key, f->smallest.user_key());
-      int cmp_largest = -1;
-      if (cmp_smallest >= 0) {
-        cmp_largest = user_comparator_->Compare(user_key, f->largest.user_key());
-      }
-
-      // Setup file search bound for the next level based on the comparison
-      // results
-      if (level > 0) {
-        file_indexer_.GetNextLevelIndex(level, i, cmp_smallest, cmp_largest,
-            &search_left_bound, &search_right_bound);
-      }
-      // Key falls out of current file's range
-      if (cmp_smallest < 0 || cmp_largest > 0) {
-        if (level == 0) {
-          ++i;
-          continue;
-        } else {
-          break;
-        }
-      }
-
-#ifndef NDEBUG
-      // Sanity check to make sure that the files are correctly sorted
-      if (prev_file) {
-        if (level != 0) {
-          int comp_sign =
-              internal_comparator_->Compare(prev_file->largest, f->smallest);
-          assert(comp_sign < 0);
-        } else {
-          // level == 0, the current file cannot be newer than the previous one.
-          if (cfd_->options()->compaction_style == kCompactionStyleUniversal) {
-            assert(!NewestFirstBySeqNo(f, prev_file));
-          } else {
-            assert(!NewestFirst(f, prev_file));
-          }
-        }
-      }
-      prev_file = f;
-#endif
-      bool tableIO = false;
-      *status = table_cache_->Get(options, *internal_comparator_, *f, ikey,
-                                  &saver, SaveValue, &tableIO, MarkKeyMayExist);
-      // TODO: examine the behavior for corrupted key
-      if (!status->ok()) {
-        return;
-      }
-
-      if (last_file_read != nullptr && stats->seek_file == nullptr) {
-        // We have had more than one seek for this read.  Charge the 1st file.
-        stats->seek_file = last_file_read;
-        stats->seek_file_level = last_file_read_level;
-      }
-
-      // If we did any IO as part of the read, then we remember it because
-      // it is a possible candidate for seek-based compaction. saver.didIO
-      // is true if the block had to be read in from storage and was not
-      // pre-exisiting in the block cache. Also, if this file was not pre-
-      // existing in the table cache and had to be freshly opened that needed
-      // the index blocks to be read-in, then tableIO is true. One thing
-      // to note is that the index blocks are not part of the block cache.
-      if (saver.didIO || tableIO) {
-        last_file_read = f;
-        last_file_read_level = level;
-      }
-
-      switch (saver.state) {
-        case kNotFound:
-          break;      // Keep searching in other files
-        case kFound:
-          return;
-        case kDeleted:
-          *status = Status::NotFound();  // Use empty error message for speed
-          return;
-        case kCorrupt:
-          *status = Status::Corruption("corrupted key for ", user_key);
-          return;
-        case kMerge:
-          break;
-      }
-      if (level > 0 && cmp_largest < 0) {
-        break;
-      } else {
-        ++i;
-      }
-    }
-  }
-
-
-  if (kMerge == saver.state) {
-    // merge_operands are in saver and we hit the beginning of the key history
-    // do a final merge of nullptr and operands;
-    if (merge_operator_->FullMerge(user_key, nullptr,
-                                   saver.merge_context->GetOperands(), value,
-                                   info_log_)) {
-      *status = Status::OK();
-    } else {
-      RecordTick(db_statistics_, NUMBER_MERGE_FAILURES);
-      *status = Status::Corruption("could not perform end-of-key merge for ",
-                                   user_key);
-    }
-  } else {
-    *status = Status::NotFound(); // Use an empty error message for speed
-  }
-}
-
-bool Version::UpdateStats(const GetStats& stats) {
-  FileMetaData* f = stats.seek_file;
-  if (f != nullptr) {
-    f->allowed_seeks--;
-    if (f->allowed_seeks <= 0 && file_to_compact_ == nullptr) {
-      file_to_compact_ = f;
-      file_to_compact_level_ = stats.seek_file_level;
-      return true;
-    }
-  }
-  return false;
-}
-
-void Version::ComputeCompactionScore(
-    std::vector<uint64_t>& size_being_compacted) {
-  double max_score = 0;
-  int max_score_level = 0;
-
-  int num_levels_to_check =
-      (cfd_->options()->compaction_style != kCompactionStyleUniversal)
-          ? NumberLevels() - 1
-          : 1;
-
-  for (int level = 0; level < num_levels_to_check; level++) {
-    double score;
-    if (level == 0) {
-      // We treat level-0 specially by bounding the number of files
-      // instead of number of bytes for two reasons:
-      //
-      // (1) With larger write-buffer sizes, it is nice not to do too
-      // many level-0 compactions.
-      //
-      // (2) The files in level-0 are merged on every read and
-      // therefore we wish to avoid too many files when the individual
-      // file size is small (perhaps because of a small write-buffer
-      // setting, or very high compression ratios, or lots of
-      // overwrites/deletions).
-      int numfiles = 0;
-      for (unsigned int i = 0; i < files_[level].size(); i++) {
-        if (!files_[level][i]->being_compacted) {
-          numfiles++;
-        }
-      }
-
-      // If we are slowing down writes, then we better compact that first
-      if (numfiles >= cfd_->options()->level0_stop_writes_trigger) {
-        score = 1000000;
-      } else if (numfiles >= cfd_->options()->level0_slowdown_writes_trigger) {
-        score = 10000;
-      } else {
-        score = static_cast<double>(numfiles) /
-                cfd_->options()->level0_file_num_compaction_trigger;
-      }
-    } else {
-      // Compute the ratio of current size to size limit.
-      const uint64_t level_bytes =
-          TotalFileSize(files_[level]) - size_being_compacted[level];
-      score = static_cast<double>(level_bytes) /
-              cfd_->compaction_picker()->MaxBytesForLevel(level);
-      if (max_score < score) {
-        max_score = score;
-        max_score_level = level;
-      }
-    }
-    compaction_level_[level] = level;
-    compaction_score_[level] = score;
-  }
-
-  // update the max compaction score in levels 1 to n-1
-  max_compaction_score_ = max_score;
-  max_compaction_score_level_ = max_score_level;
-
-  // sort all the levels based on their score. Higher scores get listed
-  // first. Use bubble sort because the number of entries are small.
-  for (int i = 0; i < NumberLevels() - 2; i++) {
-    for (int j = i + 1; j < NumberLevels() - 1; j++) {
-      if (compaction_score_[i] < compaction_score_[j]) {
-        double score = compaction_score_[i];
-        int level = compaction_level_[i];
-        compaction_score_[i] = compaction_score_[j];
-        compaction_level_[i] = compaction_level_[j];
-        compaction_score_[j] = score;
-        compaction_level_[j] = level;
-      }
-    }
-  }
-}
-
-namespace {
-
-// Compator that is used to sort files based on their size
-// In normal mode: descending size
-bool CompareSizeDescending(const Version::Fsize& first,
-                           const Version::Fsize& second) {
-  return (first.file->file_size > second.file->file_size);
-}
-// A static compator used to sort files based on their seqno
-// In universal style : descending seqno
-bool CompareSeqnoDescending(const Version::Fsize& first,
-                            const Version::Fsize& second) {
-  if (first.file->smallest_seqno > second.file->smallest_seqno) {
-    assert(first.file->largest_seqno > second.file->largest_seqno);
-    return true;
-  }
-  assert(first.file->largest_seqno <= second.file->largest_seqno);
-  return false;
-}
-
-} // anonymous namespace
-
-void Version::UpdateFilesBySize() {
-  // No need to sort the highest level because it is never compacted.
-  int max_level =
-      (cfd_->options()->compaction_style == kCompactionStyleUniversal)
-          ? NumberLevels()
-          : NumberLevels() - 1;
-
-  for (int level = 0; level < max_level; level++) {
-    const std::vector<FileMetaData*>& files = files_[level];
-    std::vector<int>& files_by_size = files_by_size_[level];
-    assert(files_by_size.size() == 0);
-
-    // populate a temp vector for sorting based on size
-    std::vector<Fsize> temp(files.size());
-    for (unsigned int i = 0; i < files.size(); i++) {
-      temp[i].index = i;
-      temp[i].file = files[i];
-    }
-
-    // sort the top number_of_files_to_sort_ based on file size
-    if (cfd_->options()->compaction_style == kCompactionStyleUniversal) {
-      int num = temp.size();
-      std::partial_sort(temp.begin(), temp.begin() + num, temp.end(),
-                        CompareSeqnoDescending);
-    } else {
-      int num = Version::number_of_files_to_sort_;
-      if (num > (int)temp.size()) {
-        num = temp.size();
-      }
-      std::partial_sort(temp.begin(), temp.begin() + num, temp.end(),
-                        CompareSizeDescending);
-    }
-    assert(temp.size() == files.size());
-
-    // initialize files_by_size_
-    for (unsigned int i = 0; i < temp.size(); i++) {
-      files_by_size.push_back(temp[i].index);
-    }
-    next_file_to_compact_by_size_[level] = 0;
-    assert(files_[level].size() == files_by_size_[level].size());
-  }
-}
-
-void Version::Ref() {
-  ++refs_;
-}
-
-bool Version::Unref() {
-  assert(refs_ >= 1);
-  --refs_;
-  if (refs_ == 0) {
-    delete this;
-    return true;
-  }
-  return false;
-}
-
-bool Version::NeedsCompaction() const {
-  if (file_to_compact_ != nullptr) {
-    return true;
-  }
-  // In universal compaction case, this check doesn't really
-  // check the compaction condition, but checks num of files threshold
-  // only. We are not going to miss any compaction opportunity
-  // but it's likely that more compactions are scheduled but
-  // ending up with nothing to do. We can improve it later.
-  // TODO(sdong): improve this function to be accurate for universal
-  //              compactions.
-  int num_levels_to_check =
-      (cfd_->options()->compaction_style != kCompactionStyleUniversal)
-          ? NumberLevels() - 1
-          : 1;
-  for (int i = 0; i < num_levels_to_check; i++) {
-    if (compaction_score_[i] >= 1) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool Version::OverlapInLevel(int level,
-                             const Slice* smallest_user_key,
-                             const Slice* largest_user_key) {
-  return SomeFileOverlapsRange(cfd_->internal_comparator(), (level > 0),
-                               files_[level], smallest_user_key,
-                               largest_user_key);
-}
-
-int Version::PickLevelForMemTableOutput(
-    const Slice& smallest_user_key,
-    const Slice& largest_user_key) {
-  int level = 0;
-  if (!OverlapInLevel(0, &smallest_user_key, &largest_user_key)) {
-    // Push to next level if there is no overlap in next level,
-    // and the #bytes overlapping in the level after that are limited.
-    InternalKey start(smallest_user_key, kMaxSequenceNumber, kValueTypeForSeek);
-    InternalKey limit(largest_user_key, 0, static_cast<ValueType>(0));
-    std::vector<FileMetaData*> overlaps;
-    int max_mem_compact_level = cfd_->options()->max_mem_compaction_level;
-    while (max_mem_compact_level > 0 && level < max_mem_compact_level) {
-      if (OverlapInLevel(level + 1, &smallest_user_key, &largest_user_key)) {
-        break;
-      }
-      if (level + 2 >= num_levels_) {
-        level++;
-        break;
-      }
-      GetOverlappingInputs(level + 2, &start, &limit, &overlaps);
-      const uint64_t sum = TotalFileSize(overlaps);
-      if (sum > cfd_->compaction_picker()->MaxGrandParentOverlapBytes(level)) {
-        break;
-      }
-      level++;
-    }
-  }
-
-  return level;
-}
-
-// Store in "*inputs" all files in "level" that overlap [begin,end]
-// If hint_index is specified, then it points to a file in the
-// overlapping range.
-// The file_index returns a pointer to any file in an overlapping range.
-void Version::GetOverlappingInputs(int level,
-                                   const InternalKey* begin,
-                                   const InternalKey* end,
-                                   std::vector<FileMetaData*>* inputs,
-                                   int hint_index,
-                                   int* file_index) {
-  inputs->clear();
-  Slice user_begin, user_end;
-  if (begin != nullptr) {
-    user_begin = begin->user_key();
-  }
-  if (end != nullptr) {
-    user_end = end->user_key();
-  }
-  if (file_index) {
-    *file_index = -1;
-  }
-  const Comparator* user_cmp = cfd_->internal_comparator().user_comparator();
-  if (begin != nullptr && end != nullptr && level > 0) {
-    GetOverlappingInputsBinarySearch(level, user_begin, user_end, inputs,
-      hint_index, file_index);
-    return;
-  }
-  for (size_t i = 0; i < files_[level].size(); ) {
-    FileMetaData* f = files_[level][i++];
-    const Slice file_start = f->smallest.user_key();
-    const Slice file_limit = f->largest.user_key();
-    if (begin != nullptr && user_cmp->Compare(file_limit, user_begin) < 0) {
-      // "f" is completely before specified range; skip it
-    } else if (end != nullptr && user_cmp->Compare(file_start, user_end) > 0) {
-      // "f" is completely after specified range; skip it
-    } else {
-      inputs->push_back(f);
-      if (level == 0) {
-        // Level-0 files may overlap each other.  So check if the newly
-        // added file has expanded the range.  If so, restart search.
-        if (begin != nullptr && user_cmp->Compare(file_start, user_begin) < 0) {
-          user_begin = file_start;
-          inputs->clear();
-          i = 0;
-        } else if (end != nullptr
-            && user_cmp->Compare(file_limit, user_end) > 0) {
-          user_end = file_limit;
-          inputs->clear();
-          i = 0;
-        }
-      } else if (file_index) {
-        *file_index = i-1;
-      }
-    }
-  }
-}
-
-// Store in "*inputs" all files in "level" that overlap [begin,end]
-// Employ binary search to find at least one file that overlaps the
-// specified range. From that file, iterate backwards and
-// forwards to find all overlapping files.
-void Version::GetOverlappingInputsBinarySearch(
-    int level,
-    const Slice& user_begin,
-    const Slice& user_end,
-    std::vector<FileMetaData*>* inputs,
-    int hint_index,
-    int* file_index) {
-  assert(level > 0);
-  int min = 0;
-  int mid = 0;
-  int max = files_[level].size() -1;
-  bool foundOverlap = false;
-  const Comparator* user_cmp = cfd_->internal_comparator().user_comparator();
-
-  // if the caller already knows the index of a file that has overlap,
-  // then we can skip the binary search.
-  if (hint_index != -1) {
-    mid = hint_index;
-    foundOverlap = true;
-  }
-
-  while (!foundOverlap && min <= max) {
-    mid = (min + max)/2;
-    FileMetaData* f = files_[level][mid];
-    const Slice file_start = f->smallest.user_key();
-    const Slice file_limit = f->largest.user_key();
-    if (user_cmp->Compare(file_limit, user_begin) < 0) {
-      min = mid + 1;
-    } else if (user_cmp->Compare(user_end, file_start) < 0) {
-      max = mid - 1;
-    } else {
-      foundOverlap = true;
-      break;
-    }
-  }
-
-  // If there were no overlapping files, return immediately.
-  if (!foundOverlap) {
-    return;
-  }
-  // returns the index where an overlap is found
-  if (file_index) {
-    *file_index = mid;
-  }
-  ExtendOverlappingInputs(level, user_begin, user_end, inputs, mid);
-}
-
-// Store in "*inputs" all files in "level" that overlap [begin,end]
-// The midIndex specifies the index of at least one file that
-// overlaps the specified range. From that file, iterate backward
-// and forward to find all overlapping files.
-void Version::ExtendOverlappingInputs(
-    int level,
-    const Slice& user_begin,
-    const Slice& user_end,
-    std::vector<FileMetaData*>* inputs,
-    unsigned int midIndex) {
-
-  const Comparator* user_cmp = cfd_->internal_comparator().user_comparator();
-#ifndef NDEBUG
-  {
-    // assert that the file at midIndex overlaps with the range
-    assert(midIndex < files_[level].size());
-    FileMetaData* f = files_[level][midIndex];
-    const Slice fstart = f->smallest.user_key();
-    const Slice flimit = f->largest.user_key();
-    if (user_cmp->Compare(fstart, user_begin) >= 0) {
-      assert(user_cmp->Compare(fstart, user_end) <= 0);
-    } else {
-      assert(user_cmp->Compare(flimit, user_begin) >= 0);
-    }
-  }
-#endif
-  int startIndex = midIndex + 1;
-  int endIndex = midIndex;
-  int count __attribute__((unused)) = 0;
-
-  // check backwards from 'mid' to lower indices
-  for (int i = midIndex; i >= 0 ; i--) {
-    FileMetaData* f = files_[level][i];
-    const Slice file_limit = f->largest.user_key();
-    if (user_cmp->Compare(file_limit, user_begin) >= 0) {
-      startIndex = i;
-      assert((count++, true));
-    } else {
-      break;
-    }
-  }
-  // check forward from 'mid+1' to higher indices
-  for (unsigned int i = midIndex+1; i < files_[level].size(); i++) {
-    FileMetaData* f = files_[level][i];
-    const Slice file_start = f->smallest.user_key();
-    if (user_cmp->Compare(file_start, user_end) <= 0) {
-      assert((count++, true));
-      endIndex = i;
-    } else {
-      break;
-    }
-  }
-  assert(count == endIndex - startIndex + 1);
-
-  // insert overlapping files into vector
-  for (int i = startIndex; i <= endIndex; i++) {
-    FileMetaData* f = files_[level][i];
-    inputs->push_back(f);
-  }
-}
-
-// Returns true iff the first or last file in inputs contains
-// an overlapping user key to the file "just outside" of it (i.e.
-// just after the last file, or just before the first file)
-// REQUIRES: "*inputs" is a sorted list of non-overlapping files
-bool Version::HasOverlappingUserKey(
-    const std::vector<FileMetaData*>* inputs,
-    int level) {
-
-  // If inputs empty, there is no overlap.
-  // If level == 0, it is assumed that all needed files were already included.
-  if (inputs->empty() || level == 0){
-    return false;
-  }
-
-  const Comparator* user_cmp = cfd_->internal_comparator().user_comparator();
-  const std::vector<FileMetaData*>& files = files_[level];
-  const size_t kNumFiles = files.size();
-
-  // Check the last file in inputs against the file after it
-  size_t last_file = FindFile(cfd_->internal_comparator(), files,
-                              inputs->back()->largest.Encode());
-  assert(0 <= last_file && last_file < kNumFiles);  // File should exist!
-  if (last_file < kNumFiles-1) {                    // If not the last file
-    const Slice last_key_in_input = files[last_file]->largest.user_key();
-    const Slice first_key_after = files[last_file+1]->smallest.user_key();
-    if (user_cmp->Compare(last_key_in_input, first_key_after) == 0) {
-      // The last user key in input overlaps with the next file's first key
-      return true;
-    }
-  }
-
-  // Check the first file in inputs against the file just before it
-  size_t first_file = FindFile(cfd_->internal_comparator(), files,
-                               inputs->front()->smallest.Encode());
-  assert(0 <= first_file && first_file <= last_file);   // File should exist!
-  if (first_file > 0) {                                 // If not first file
-    const Slice& first_key_in_input = files[first_file]->smallest.user_key();
-    const Slice& last_key_before = files[first_file-1]->largest.user_key();
-    if (user_cmp->Compare(first_key_in_input, last_key_before) == 0) {
-      // The first user key in input overlaps with the previous file's last key
-      return true;
-    }
-  }
-
-  return false;
-}
-
-int64_t Version::NumLevelBytes(int level) const {
-  assert(level >= 0);
-  assert(level < NumberLevels());
-  return TotalFileSize(files_[level]);
-}
-
-const char* Version::LevelSummary(LevelSummaryStorage* scratch) const {
-  int len = snprintf(scratch->buffer, sizeof(scratch->buffer), "files[");
-  for (int i = 0; i < NumberLevels(); i++) {
-    int sz = sizeof(scratch->buffer) - len;
-    int ret = snprintf(scratch->buffer + len, sz, "%d ", int(files_[i].size()));
-    if (ret < 0 || ret >= sz) break;
-    len += ret;
-  }
-  snprintf(scratch->buffer + len, sizeof(scratch->buffer) - len, "]");
-  return scratch->buffer;
-}
-
-const char* Version::LevelFileSummary(FileSummaryStorage* scratch,
-                                      int level) const {
-  int len = snprintf(scratch->buffer, sizeof(scratch->buffer), "files_size[");
-  for (const auto& f : files_[level]) {
-    int sz = sizeof(scratch->buffer) - len;
-    int ret = snprintf(scratch->buffer + len, sz,
-                       "#%lu(seq=%lu,sz=%lu,%lu) ",
-                       (unsigned long)f->number,
-                       (unsigned long)f->smallest_seqno,
-                       (unsigned long)f->file_size,
-                       (unsigned long)f->being_compacted);
-    if (ret < 0 || ret >= sz)
-      break;
-    len += ret;
-  }
-  snprintf(scratch->buffer + len, sizeof(scratch->buffer) - len, "]");
-  return scratch->buffer;
-}
-
-int64_t Version::MaxNextLevelOverlappingBytes() {
-  uint64_t result = 0;
-  std::vector<FileMetaData*> overlaps;
-  for (int level = 1; level < NumberLevels() - 1; level++) {
-    for (const auto& f : files_[level]) {
-      GetOverlappingInputs(level + 1, &f->smallest, &f->largest, &overlaps);
-      const uint64_t sum = TotalFileSize(overlaps);
-      if (sum > result) {
-        result = sum;
-      }
-    }
-  }
-  return result;
-}
-
-void Version::AddLiveFiles(std::set<uint64_t>* live) {
-  for (int level = 0; level < NumberLevels(); level++) {
-    const std::vector<FileMetaData*>& files = files_[level];
-    for (const auto& file : files) {
-      live->insert(file->number);
-    }
-  }
-}
-
-std::string Version::DebugString(bool hex) const {
-  std::string r;
-  for (int level = 0; level < num_levels_; level++) {
-    // E.g.,
-    //   --- level 1 ---
-    //   17:123['a' .. 'd']
-    //   20:43['e' .. 'g']
-    r.append("--- level ");
-    AppendNumberTo(&r, level);
-    r.append(" --- version# ");
-    AppendNumberTo(&r, version_number_);
-    r.append(" ---\n");
-    const std::vector<FileMetaData*>& files = files_[level];
-    for (size_t i = 0; i < files.size(); i++) {
-      r.push_back(' ');
-      AppendNumberTo(&r, files[i]->number);
-      r.push_back(':');
-      AppendNumberTo(&r, files[i]->file_size);
-      r.append("[");
-      r.append(files[i]->smallest.DebugString(hex));
-      r.append(" .. ");
-      r.append(files[i]->largest.DebugString(hex));
-      r.append("]\n");
-    }
-  }
-  return r;
-}
-
-// this is used to batch writes to the manifest file
-struct VersionSet::ManifestWriter {
-  Status status;
-  bool done;
-  port::CondVar cv;
-  ColumnFamilyData* cfd;
-  VersionEdit* edit;
-
-  explicit ManifestWriter(port::Mutex* mu, ColumnFamilyData* cfd,
-                          VersionEdit* e)
-      : done(false), cv(mu), cfd(cfd), edit(e) {}
-};
-
-// A helper class so we can efficiently apply a whole sequence
-// of edits to a particular state without creating intermediate
-// Versions that contain full copies of the intermediate state.
-class VersionSet::Builder {
- private:
-  // Helper to sort v->files_
-  // kLevel0LevelCompaction -- NewestFirst
-  // kLevel0UniversalCompaction -- NewestFirstBySeqNo
-  // kLevelNon0 -- BySmallestKey
-  struct FileComparator {
-    enum SortMethod {
-      kLevel0LevelCompaction = 0,
-      kLevel0UniversalCompaction = 1,
-      kLevelNon0 = 2,
-    } sort_method;
-    const InternalKeyComparator* internal_comparator;
-
-    bool operator()(FileMetaData* f1, FileMetaData* f2) const {
-      switch (sort_method) {
-        case kLevel0LevelCompaction:
-          return NewestFirst(f1, f2);
-        case kLevel0UniversalCompaction:
-          return NewestFirstBySeqNo(f1, f2);
-        case kLevelNon0:
-          return BySmallestKey(f1, f2, internal_comparator);
-      }
-      assert(false);
-      return false;
-    }
-  };
-
-  typedef std::set<FileMetaData*, FileComparator> FileSet;
-  struct LevelState {
-    std::set<uint64_t> deleted_files;
-    FileSet* added_files;
-  };
-
-  ColumnFamilyData* cfd_;
-  Version* base_;
-  LevelState* levels_;
-  FileComparator level_zero_cmp_;
-  FileComparator level_nonzero_cmp_;
-
- public:
-  Builder(ColumnFamilyData* cfd) : cfd_(cfd), base_(cfd->current()) {
-    base_->Ref();
-    levels_ = new LevelState[base_->NumberLevels()];
-    level_zero_cmp_.sort_method =
-        (cfd_->options()->compaction_style == kCompactionStyleUniversal)
-            ? FileComparator::kLevel0UniversalCompaction
-            : FileComparator::kLevel0LevelCompaction;
-    level_nonzero_cmp_.sort_method = FileComparator::kLevelNon0;
-    level_nonzero_cmp_.internal_comparator = &cfd->internal_comparator();
-
-    levels_[0].added_files = new FileSet(level_zero_cmp_);
-    for (int level = 1; level < base_->NumberLevels(); level++) {
-        levels_[level].added_files = new FileSet(level_nonzero_cmp_);
-    }
-  }
-
-  ~Builder() {
-    for (int level = 0; level < base_->NumberLevels(); level++) {
-      const FileSet* added = levels_[level].added_files;
-      std::vector<FileMetaData*> to_unref;
-      to_unref.reserve(added->size());
-      for (FileSet::const_iterator it = added->begin();
-          it != added->end(); ++it) {
-        to_unref.push_back(*it);
-      }
-      delete added;
-      for (uint32_t i = 0; i < to_unref.size(); i++) {
-        FileMetaData* f = to_unref[i];
-        f->refs--;
-        if (f->refs <= 0) {
-          if (f->table_reader_handle) {
-            cfd_->table_cache()->ReleaseHandle(f->table_reader_handle);
-            f->table_reader_handle = nullptr;
-          }
-          delete f;
-        }
-      }
-    }
-
-    delete[] levels_;
-    base_->Unref();
-  }
-
-  void CheckConsistency(Version* v) {
-#ifndef NDEBUG
-    // make sure the files are sorted correctly
-    for (int level = 0; level < v->NumberLevels(); level++) {
-      for (size_t i = 1; i < v->files_[level].size(); i++) {
-        auto f1 = v->files_[level][i - 1];
-        auto f2 = v->files_[level][i];
-        if (level == 0) {
-          assert(level_zero_cmp_(f1, f2));
-          if (cfd_->options()->compaction_style == kCompactionStyleUniversal) {
-            assert(f1->largest_seqno > f2->largest_seqno);
-          }
-        } else {
-          assert(level_nonzero_cmp_(f1, f2));
-
-          // Make sure there is no overlap in levels > 0
-          if (cfd_->internal_comparator().Compare(f1->largest, f2->smallest) >=
-              0) {
-            fprintf(stderr, "overlapping ranges in same level %s vs. %s\n",
-                    (f1->largest).DebugString().c_str(),
-                    (f2->smallest).DebugString().c_str());
-            abort();
-          }
-        }
-      }
-    }
-#endif
-  }
-
-  void CheckConsistencyForDeletes(VersionEdit* edit, unsigned int number,
-                                  int level) {
-#ifndef NDEBUG
-      // a file to be deleted better exist in the previous version
-      bool found = false;
-      for (int l = 0; !found && l < base_->NumberLevels(); l++) {
-        const std::vector<FileMetaData*>& base_files = base_->files_[l];
-        for (unsigned int i = 0; i < base_files.size(); i++) {
-          FileMetaData* f = base_files[i];
-          if (f->number == number) {
-            found =  true;
-            break;
-          }
-        }
-      }
-      // if the file did not exist in the previous version, then it
-      // is possibly moved from lower level to higher level in current
-      // version
-      for (int l = level+1; !found && l < base_->NumberLevels(); l++) {
-        const FileSet* added = levels_[l].added_files;
-        for (FileSet::const_iterator added_iter = added->begin();
-             added_iter != added->end(); ++added_iter) {
-          FileMetaData* f = *added_iter;
-          if (f->number == number) {
-            found = true;
-            break;
-          }
-        }
-      }
-
-      // maybe this file was added in a previous edit that was Applied
-      if (!found) {
-        const FileSet* added = levels_[level].added_files;
-        for (FileSet::const_iterator added_iter = added->begin();
-             added_iter != added->end(); ++added_iter) {
-          FileMetaData* f = *added_iter;
-          if (f->number == number) {
-            found = true;
-            break;
-          }
-        }
-      }
-      assert(found);
-#endif
-  }
-
-  // Apply all of the edits in *edit to the current state.
-  void Apply(VersionEdit* edit) {
-    CheckConsistency(base_);
-
-    // Delete files
-    const VersionEdit::DeletedFileSet& del = edit->deleted_files_;
-    for (const auto& del_file : del) {
-      const auto level = del_file.first;
-      const auto number = del_file.second;
-      levels_[level].deleted_files.insert(number);
-      CheckConsistencyForDeletes(edit, number, level);
-    }
-
-    // Add new files
-    for (const auto& new_file : edit->new_files_) {
-      const int level = new_file.first;
-      FileMetaData* f = new FileMetaData(new_file.second);
-      f->refs = 1;
-
-      // We arrange to automatically compact this file after
-      // a certain number of seeks.  Let's assume:
-      //   (1) One seek costs 10ms
-      //   (2) Writing or reading 1MB costs 10ms (100MB/s)
-      //   (3) A compaction of 1MB does 25MB of IO:
-      //         1MB read from this level
-      //         10-12MB read from next level (boundaries may be misaligned)
-      //         10-12MB written to next level
-      // This implies that 25 seeks cost the same as the compaction
-      // of 1MB of data.  I.e., one seek costs approximately the
-      // same as the compaction of 40KB of data.  We are a little
-      // conservative and allow approximately one seek for every 16KB
-      // of data before triggering a compaction.
-      f->allowed_seeks = (f->file_size / 16384);
-      if (f->allowed_seeks < 100) f->allowed_seeks = 100;
-
-      levels_[level].deleted_files.erase(f->number);
-      levels_[level].added_files->insert(f);
-    }
-  }
-
-  // Save the current state in *v.
-  void SaveTo(Version* v) {
-    CheckConsistency(base_);
-    CheckConsistency(v);
-
-    for (int level = 0; level < base_->NumberLevels(); level++) {
-      const auto& cmp = (level == 0) ? level_zero_cmp_ : level_nonzero_cmp_;
-      // Merge the set of added files with the set of pre-existing files.
-      // Drop any deleted files.  Store the result in *v.
-      const auto& base_files = base_->files_[level];
-      auto base_iter = base_files.begin();
-      auto base_end = base_files.end();
-      const auto& added_files = *levels_[level].added_files;
-      v->files_[level].reserve(base_files.size() + added_files.size());
-
-      for (const auto& added : added_files) {
-        // Add all smaller files listed in base_
-        for (auto bpos = std::upper_bound(base_iter, base_end, added, cmp);
-             base_iter != bpos;
-             ++base_iter) {
-          MaybeAddFile(v, level, *base_iter);
-        }
-
-        MaybeAddFile(v, level, added);
-      }
-
-      // Add remaining base files
-      for (; base_iter != base_end; ++base_iter) {
-        MaybeAddFile(v, level, *base_iter);
-      }
-    }
-
-    CheckConsistency(v);
-
-    v->file_indexer_.UpdateIndex(v->files_);
-  }
-
-  void LoadTableHandlers() {
-    for (int level = 0; level < cfd_->NumberLevels(); level++) {
-      for (auto& file_meta : *(levels_[level].added_files)) {
-        assert (!file_meta->table_reader_handle);
-        bool table_io;
-        cfd_->table_cache()->FindTable(
-            base_->vset_->storage_options_, cfd_->internal_comparator(),
-            file_meta->number, file_meta->file_size,
-            &file_meta->table_reader_handle, &table_io, false);
-        if (file_meta->table_reader_handle != nullptr) {
-          // Load table_reader
-          file_meta->table_reader =
-              cfd_->table_cache()->GetTableReaderFromHandle(
-                  file_meta->table_reader_handle);
-        }
-      }
-    }
-  }
-
-  void MaybeAddFile(Version* v, int level, FileMetaData* f) {
-    if (levels_[level].deleted_files.count(f->number) > 0) {
-      // File is deleted: do nothing
-    } else {
-      auto* files = &v->files_[level];
-      if (level > 0 && !files->empty()) {
-        // Must not overlap
-        assert(cfd_->internal_comparator().Compare(
-                   (*files)[files->size() - 1]->largest, f->smallest) < 0);
-      }
-      f->refs++;
-      files->push_back(f);
-    }
-  }
-};
-
-VersionSet::VersionSet(const std::string& dbname, const DBOptions* options,
-                       const EnvOptions& storage_options, Cache* table_cache)
-    : column_family_set_(new ColumnFamilySet(dbname, options, storage_options,
-                                             table_cache)),
-      env_(options->env),
-      dbname_(dbname),
-      options_(options),
-      next_file_number_(2),
-      manifest_file_number_(0),  // Filled by Recover()
-      pending_manifest_file_number_(0),
-      last_sequence_(0),
-      prev_log_number_(0),
-      current_version_number_(0),
-      manifest_file_size_(0),
-      storage_options_(storage_options),
-      storage_options_compactions_(storage_options_) {}
-
-VersionSet::~VersionSet() {
-  // we need to delete column_family_set_ because its destructor depends on
-  // VersionSet
-  column_family_set_.reset();
-  for (auto file : obsolete_files_) {
-    delete file;
-  }
-  obsolete_files_.clear();
-}
-
-void VersionSet::AppendVersion(ColumnFamilyData* column_family_data,
-                               Version* v) {
-  // Make "v" current
-  assert(v->refs_ == 0);
-  Version* current = column_family_data->current();
-  assert(v != current);
-  if (current != nullptr) {
-    assert(current->refs_ > 0);
-    current->Unref();
-  }
-  column_family_data->SetCurrent(v);
-  v->Ref();
-
-  // Append to linked list
-  v->prev_ = column_family_data->dummy_versions()->prev_;
-  v->next_ = column_family_data->dummy_versions();
-  v->prev_->next_ = v;
-  v->next_->prev_ = v;
-}
-
-Status VersionSet::LogAndApply(ColumnFamilyData* column_family_data,
-                               VersionEdit* edit, port::Mutex* mu,
-                               Directory* db_directory, bool new_descriptor_log,
-                               const ColumnFamilyOptions* options) {
-  mu->AssertHeld();
-
-  // column_family_data can be nullptr only if this is column_family_add.
-  // in that case, we also need to specify ColumnFamilyOptions
-  if (column_family_data == nullptr) {
-    assert(edit->is_column_family_add_);
-    assert(options != nullptr);
-  }
-
-  // queue our request
-  ManifestWriter w(mu, column_family_data, edit);
-  manifest_writers_.push_back(&w);
-  while (!w.done && &w != manifest_writers_.front()) {
-    w.cv.Wait();
-  }
-  if (w.done) {
-    return w.status;
-  }
-  if (column_family_data != nullptr && column_family_data->IsDropped()) {
-    // if column family is dropped by the time we get here, no need to write
-    // anything to the manifest
-    manifest_writers_.pop_front();
-    // Notify new head of write queue
-    if (!manifest_writers_.empty()) {
-      manifest_writers_.front()->cv.Signal();
-    }
-    return Status::OK();
-  }
-
-  std::vector<VersionEdit*> batch_edits;
-  Version* v = nullptr;
-  std::unique_ptr<Builder> builder(nullptr);
-
-  // process all requests in the queue
-  ManifestWriter* last_writer = &w;
-  assert(!manifest_writers_.empty());
-  assert(manifest_writers_.front() == &w);
-  if (edit->IsColumnFamilyManipulation()) {
-    // no group commits for column family add or drop
-    LogAndApplyCFHelper(edit);
-    batch_edits.push_back(edit);
-  } else {
-    v = new Version(column_family_data, this, current_version_number_++);
-    builder.reset(new Builder(column_family_data));
-    for (const auto& writer : manifest_writers_) {
-      if (writer->edit->IsColumnFamilyManipulation() ||
-          writer->cfd->GetID() != column_family_data->GetID()) {
-        // no group commits for column family add or drop
-        // also, group commits across column families are not supported
-        break;
-      }
-      last_writer = writer;
-      LogAndApplyHelper(column_family_data, builder.get(), v, last_writer->edit,
-                        mu);
-      batch_edits.push_back(last_writer->edit);
-    }
-    builder->SaveTo(v);
-  }
-
-  // Initialize new descriptor log file if necessary by creating
-  // a temporary file that contains a snapshot of the current version.
-  uint64_t new_manifest_file_size = 0;
-  Status s;
-
-  assert(pending_manifest_file_number_ == 0);
-  if (!descriptor_log_ ||
-      manifest_file_size_ > options_->max_manifest_file_size) {
-    pending_manifest_file_number_ = NewFileNumber();
-    batch_edits.back()->SetNextFile(next_file_number_);
-    new_descriptor_log = true;
-  } else {
-    pending_manifest_file_number_ = manifest_file_number_;
-  }
-
-  if (new_descriptor_log) {
-    // if we're writing out new snapshot make sure to persist max column family
-    if (column_family_set_->GetMaxColumnFamily() > 0) {
-      edit->SetMaxColumnFamily(column_family_set_->GetMaxColumnFamily());
-    }
-  }
-
-  // Unlock during expensive operations. New writes cannot get here
-  // because &w is ensuring that all new writes get queued.
-  {
-    std::vector<uint64_t> size_being_compacted;
-    if (!edit->IsColumnFamilyManipulation()) {
-      size_being_compacted.resize(v->NumberLevels() - 1);
-      // calculate the amount of data being compacted at every level
-      column_family_data->compaction_picker()->SizeBeingCompacted(
-          size_being_compacted);
-    }
-
-    mu->Unlock();
-
-    if (!edit->IsColumnFamilyManipulation() && options_->max_open_files == -1) {
-      // unlimited table cache. Pre-load table handle now.
-      // Need to do it out of the mutex.
-      builder->LoadTableHandlers();
-    }
-
-    // This is fine because everything inside of this block is serialized --
-    // only one thread can be here at the same time
-    if (new_descriptor_log) {
-      unique_ptr<WritableFile> descriptor_file;
-      s = env_->NewWritableFile(
-          DescriptorFileName(dbname_, pending_manifest_file_number_),
-          &descriptor_file, env_->OptimizeForManifestWrite(storage_options_));
-      if (s.ok()) {
-        descriptor_file->SetPreallocationBlockSize(
-            options_->manifest_preallocation_size);
-        descriptor_log_.reset(new log::Writer(std::move(descriptor_file)));
-        s = WriteSnapshot(descriptor_log_.get());
-      }
-    }
-
-    if (!edit->IsColumnFamilyManipulation()) {
-      // The calls to ComputeCompactionScore and UpdateFilesBySize are cpu-heavy
-      // and is best called outside the mutex.
-      v->ComputeCompactionScore(size_being_compacted);
-      v->UpdateFilesBySize();
-    }
-
-    // Write new record to MANIFEST log
-    if (s.ok()) {
-      for (auto& e : batch_edits) {
-        std::string record;
-        e->EncodeTo(&record);
-        s = descriptor_log_->AddRecord(record);
-        if (!s.ok()) {
-          break;
-        }
-      }
-      if (s.ok()) {
-        if (options_->use_fsync) {
-          StopWatch sw(env_, options_->statistics.get(),
-                       MANIFEST_FILE_SYNC_MICROS);
-          s = descriptor_log_->file()->Fsync();
-        } else {
-          StopWatch sw(env_, options_->statistics.get(),
-                       MANIFEST_FILE_SYNC_MICROS);
-          s = descriptor_log_->file()->Sync();
-        }
-      }
-      if (!s.ok()) {
-        Log(options_->info_log, "MANIFEST write: %s\n", s.ToString().c_str());
-        bool all_records_in = true;
-        for (auto& e : batch_edits) {
-          std::string record;
-          e->EncodeTo(&record);
-          if (!ManifestContains(pending_manifest_file_number_, record)) {
-            all_records_in = false;
-            break;
-          }
-        }
-        if (all_records_in) {
-          Log(options_->info_log,
-              "MANIFEST contains log record despite error; advancing to new "
-              "version to prevent mismatch between in-memory and logged state"
-              " If paranoid is set, then the db is now in readonly mode.");
-          s = Status::OK();
-        }
-      }
-    }
-
-    // If we just created a new descriptor file, install it by writing a
-    // new CURRENT file that points to it.
-    if (s.ok() && new_descriptor_log) {
-      s = SetCurrentFile(env_, dbname_, pending_manifest_file_number_);
-      if (s.ok() && pending_manifest_file_number_ > manifest_file_number_) {
-        // delete old manifest file
-        Log(options_->info_log,
-            "Deleting manifest %" PRIu64 " current manifest %" PRIu64 "\n",
-            manifest_file_number_, pending_manifest_file_number_);
-        // we don't care about an error here, PurgeObsoleteFiles will take care
-        // of it later
-        env_->DeleteFile(DescriptorFileName(dbname_, manifest_file_number_));
-      }
-      if (!options_->disableDataSync && db_directory != nullptr) {
-        db_directory->Fsync();
-      }
-    }
-
-    if (s.ok()) {
-      // find offset in manifest file where this version is stored.
-      new_manifest_file_size = descriptor_log_->file()->GetFileSize();
-    }
-
-    LogFlush(options_->info_log);
-    mu->Lock();
-  }
-
-  // Install the new version
-  if (s.ok()) {
-    if (edit->is_column_family_add_) {
-      // no group commit on column family add
-      assert(batch_edits.size() == 1);
-      assert(options != nullptr);
-      CreateColumnFamily(*options, edit);
-    } else if (edit->is_column_family_drop_) {
-      assert(batch_edits.size() == 1);
-      column_family_data->SetDropped();
-      if (column_family_data->Unref()) {
-        delete column_family_data;
-      }
-    } else {
-      uint64_t max_log_number_in_batch  = 0;
-      for (auto& e : batch_edits) {
-        if (e->has_log_number_) {
-          max_log_number_in_batch =
-              std::max(max_log_number_in_batch, e->log_number_);
-        }
-      }
-      if (max_log_number_in_batch != 0) {
-        assert(column_family_data->GetLogNumber() <= max_log_number_in_batch);
-        column_family_data->SetLogNumber(max_log_number_in_batch);
-      }
-      AppendVersion(column_family_data, v);
-    }
-
-    manifest_file_number_ = pending_manifest_file_number_;
-    manifest_file_size_ = new_manifest_file_size;
-    prev_log_number_ = edit->prev_log_number_;
-  } else {
-    Log(options_->info_log, "Error in committing version %lu to [%s]",
-        (unsigned long)v->GetVersionNumber(),
-        column_family_data->GetName().c_str());
-    delete v;
-    if (new_descriptor_log) {
-      descriptor_log_.reset();
-      env_->DeleteFile(
-          DescriptorFileName(dbname_, pending_manifest_file_number_));
-    }
-  }
-  pending_manifest_file_number_ = 0;
-
-  // wake up all the waiting writers
-  while (true) {
-    ManifestWriter* ready = manifest_writers_.front();
-    manifest_writers_.pop_front();
-    if (ready != &w) {
-      ready->status = s;
-      ready->done = true;
-      ready->cv.Signal();
-    }
-    if (ready == last_writer) break;
-  }
-  // Notify new head of write queue
-  if (!manifest_writers_.empty()) {
-    manifest_writers_.front()->cv.Signal();
-  }
-  return s;
-}
-
-void VersionSet::LogAndApplyCFHelper(VersionEdit* edit) {
-  assert(edit->IsColumnFamilyManipulation());
-  edit->SetNextFile(next_file_number_);
-  edit->SetLastSequence(last_sequence_);
-  if (edit->is_column_family_drop_) {
-    // if we drop column family, we have to make sure to save max column family,
-    // so that we don't reuse existing ID
-    edit->SetMaxColumnFamily(column_family_set_->GetMaxColumnFamily());
-  }
-}
-
-void VersionSet::LogAndApplyHelper(ColumnFamilyData* cfd, Builder* builder,
-                                   Version* v, VersionEdit* edit,
-                                   port::Mutex* mu) {
-  mu->AssertHeld();
-  assert(!edit->IsColumnFamilyManipulation());
-
-  if (edit->has_log_number_) {
-    assert(edit->log_number_ >= cfd->GetLogNumber());
-    assert(edit->log_number_ < next_file_number_);
-  }
-
-  if (!edit->has_prev_log_number_) {
-    edit->SetPrevLogNumber(prev_log_number_);
-  }
-  edit->SetNextFile(next_file_number_);
-  edit->SetLastSequence(last_sequence_);
-
-  builder->Apply(edit);
-}
-
-Status VersionSet::Recover(
-    const std::vector<ColumnFamilyDescriptor>& column_families,
-    bool read_only) {
-  std::unordered_map<std::string, ColumnFamilyOptions> cf_name_to_options;
-  for (auto cf : column_families) {
-    cf_name_to_options.insert({cf.name, cf.options});
-  }
-  // keeps track of column families in manifest that were not found in
-  // column families parameters. if those column families are not dropped
-  // by subsequent manifest records, Recover() will return failure status
-  std::unordered_map<int, std::string> column_families_not_found;
-
-  // Read "CURRENT" file, which contains a pointer to the current manifest file
-  std::string manifest_filename;
-  Status s = ReadFileToString(
-      env_, CurrentFileName(dbname_), &manifest_filename
-  );
-  if (!s.ok()) {
-    return s;
-  }
-  if (manifest_filename.empty() ||
-      manifest_filename.back() != '\n') {
-    return Status::Corruption("CURRENT file does not end with newline");
-  }
-  // remove the trailing '\n'
-  manifest_filename.resize(manifest_filename.size() - 1);
-  FileType type;
-  bool parse_ok =
-      ParseFileName(manifest_filename, &manifest_file_number_, &type);
-  if (!parse_ok || type != kDescriptorFile) {
-    return Status::Corruption("CURRENT file corrupted");
-  }
-
-  Log(options_->info_log, "Recovering from manifest file: %s\n",
-      manifest_filename.c_str());
-
-  manifest_filename = dbname_ + "/" + manifest_filename;
-  unique_ptr<SequentialFile> manifest_file;
-  s = env_->NewSequentialFile(manifest_filename, &manifest_file,
-                              storage_options_);
-  if (!s.ok()) {
-    return s;
-  }
-  uint64_t manifest_file_size;
-  s = env_->GetFileSize(manifest_filename, &manifest_file_size);
-  if (!s.ok()) {
-    return s;
-  }
-
-  bool have_log_number = false;
-  bool have_prev_log_number = false;
-  bool have_next_file = false;
-  bool have_last_sequence = false;
-  uint64_t next_file = 0;
-  uint64_t last_sequence = 0;
-  uint64_t log_number = 0;
-  uint64_t prev_log_number = 0;
-  uint32_t max_column_family = 0;
-  std::unordered_map<uint32_t, Builder*> builders;
-
-  // add default column family
-  auto default_cf_iter = cf_name_to_options.find(kDefaultColumnFamilyName);
-  if (default_cf_iter == cf_name_to_options.end()) {
-    return Status::InvalidArgument("Default column family not specified");
-  }
-  VersionEdit default_cf_edit;
-  default_cf_edit.AddColumnFamily(kDefaultColumnFamilyName);
-  default_cf_edit.SetColumnFamily(0);
-  ColumnFamilyData* default_cfd =
-      CreateColumnFamily(default_cf_iter->second, &default_cf_edit);
-  builders.insert({0, new Builder(default_cfd)});
-
-  {
-    VersionSet::LogReporter reporter;
-    reporter.status = &s;
-    log::Reader reader(std::move(manifest_file), &reporter, true /*checksum*/,
-                       0 /*initial_offset*/);
-    Slice record;
-    std::string scratch;
-    while (reader.ReadRecord(&record, &scratch) && s.ok()) {
-      VersionEdit edit;
-      s = edit.DecodeFrom(record);
-      if (!s.ok()) {
-        break;
-      }
-
-      // Not found means that user didn't supply that column
-      // family option AND we encountered column family add
-      // record. Once we encounter column family drop record,
-      // we will delete the column family from
-      // column_families_not_found.
-      bool cf_in_not_found =
-          column_families_not_found.find(edit.column_family_) !=
-          column_families_not_found.end();
-      // in builders means that user supplied that column family
-      // option AND that we encountered column family add record
-      bool cf_in_builders =
-          builders.find(edit.column_family_) != builders.end();
-
-      // they can't both be true
-      assert(!(cf_in_not_found && cf_in_builders));
-
-      ColumnFamilyData* cfd = nullptr;
-
-      if (edit.is_column_family_add_) {
-        if (cf_in_builders || cf_in_not_found) {
-          s = Status::Corruption(
-              "Manifest adding the same column family twice");
-          break;
-        }
-        auto cf_options = cf_name_to_options.find(edit.column_family_name_);
-        if (cf_options == cf_name_to_options.end()) {
-          column_families_not_found.insert(
-              {edit.column_family_, edit.column_family_name_});
-        } else {
-          cfd = CreateColumnFamily(cf_options->second, &edit);
-          builders.insert({edit.column_family_, new Builder(cfd)});
-        }
-      } else if (edit.is_column_family_drop_) {
-        if (cf_in_builders) {
-          auto builder = builders.find(edit.column_family_);
-          assert(builder != builders.end());
-          delete builder->second;
-          builders.erase(builder);
-          cfd = column_family_set_->GetColumnFamily(edit.column_family_);
-          if (cfd->Unref()) {
-            delete cfd;
-            cfd = nullptr;
-          } else {
-            // who else can have reference to cfd!?
-            assert(false);
-          }
-        } else if (cf_in_not_found) {
-          column_families_not_found.erase(edit.column_family_);
-        } else {
-          s = Status::Corruption(
-              "Manifest - dropping non-existing column family");
-          break;
-        }
-      } else if (!cf_in_not_found) {
-        if (!cf_in_builders) {
-          s = Status::Corruption(
-              "Manifest record referencing unknown column family");
-          break;
-        }
-
-        cfd = column_family_set_->GetColumnFamily(edit.column_family_);
-        // this should never happen since cf_in_builders is true
-        assert(cfd != nullptr);
-        if (edit.max_level_ >= cfd->current()->NumberLevels()) {
-          s = Status::InvalidArgument(
-              "db has more levels than options.num_levels");
-          break;
-        }
-
-        // if it is not column family add or column family drop,
-        // then it's a file add/delete, which should be forwarded
-        // to builder
-        auto builder = builders.find(edit.column_family_);
-        assert(builder != builders.end());
-        builder->second->Apply(&edit);
-      }
-
-      if (cfd != nullptr) {
-        if (edit.has_log_number_) {
-          if (cfd->GetLogNumber() > edit.log_number_) {
-            Log(options_->info_log,
-                "MANIFEST corruption detected, but ignored - Log numbers in "
-                "records NOT monotonically increasing");
-          } else {
-            cfd->SetLogNumber(edit.log_number_);
-            have_log_number = true;
-          }
-        }
-        if (edit.has_comparator_ &&
-            edit.comparator_ != cfd->user_comparator()->Name()) {
-          s = Status::InvalidArgument(
-              cfd->user_comparator()->Name(),
-              "does not match existing comparator " + edit.comparator_);
-          break;
-        }
-      }
-
-      if (edit.has_prev_log_number_) {
-        prev_log_number = edit.prev_log_number_;
-        have_prev_log_number = true;
-      }
-
-      if (edit.has_next_file_number_) {
-        next_file = edit.next_file_number_;
-        have_next_file = true;
-      }
-
-      if (edit.has_max_column_family_) {
-        max_column_family = edit.max_column_family_;
-      }
-
-      if (edit.has_last_sequence_) {
-        last_sequence = edit.last_sequence_;
-        have_last_sequence = true;
-      }
-    }
-  }
-
-  if (s.ok()) {
-    if (!have_next_file) {
-      s = Status::Corruption("no meta-nextfile entry in descriptor");
-    } else if (!have_log_number) {
-      s = Status::Corruption("no meta-lognumber entry in descriptor");
-    } else if (!have_last_sequence) {
-      s = Status::Corruption("no last-sequence-number entry in descriptor");
-    }
-
-    if (!have_prev_log_number) {
-      prev_log_number = 0;
-    }
-
-    column_family_set_->UpdateMaxColumnFamily(max_column_family);
-
-    MarkFileNumberUsed(prev_log_number);
-    MarkFileNumberUsed(log_number);
-  }
-
-  // there were some column families in the MANIFEST that weren't specified
-  // in the argument. This is OK in read_only mode
-  if (read_only == false && column_families_not_found.size() > 0) {
-    std::string list_of_not_found;
-    for (const auto& cf : column_families_not_found) {
-      list_of_not_found += ", " + cf.second;
-    }
-    list_of_not_found = list_of_not_found.substr(2);
-    s = Status::InvalidArgument(
-        "You have to open all column families. Column families not opened: " +
-        list_of_not_found);
-  }
-
-  if (s.ok()) {
-    for (auto cfd : *column_family_set_) {
-      auto builders_iter = builders.find(cfd->GetID());
-      assert(builders_iter != builders.end());
-      auto builder = builders_iter->second;
-
-      if (options_->max_open_files == -1) {
-      // unlimited table cache. Pre-load table handle now.
-      // Need to do it out of the mutex.
-        builder->LoadTableHandlers();
-      }
-
-      Version* v = new Version(cfd, this, current_version_number_++);
-      builder->SaveTo(v);
-
-      // Install recovered version
-      std::vector<uint64_t> size_being_compacted(v->NumberLevels() - 1);
-      cfd->compaction_picker()->SizeBeingCompacted(size_being_compacted);
-      v->ComputeCompactionScore(size_being_compacted);
-      v->UpdateFilesBySize();
-      AppendVersion(cfd, v);
-    }
-
-    manifest_file_size_ = manifest_file_size;
-    next_file_number_ = next_file + 1;
-    last_sequence_ = last_sequence;
-    prev_log_number_ = prev_log_number;
-
-    Log(options_->info_log, "Recovered from manifest file:%s succeeded,"
-        "manifest_file_number is %lu, next_file_number is %lu, "
-        "last_sequence is %lu, log_number is %lu,"
-        "prev_log_number is %lu,"
-        "max_column_family is %u\n",
-        manifest_filename.c_str(),
-        (unsigned long)manifest_file_number_,
-        (unsigned long)next_file_number_,
-        (unsigned long)last_sequence_,
-        (unsigned long)log_number,
-        (unsigned long)prev_log_number_,
-        column_family_set_->GetMaxColumnFamily());
-
-    for (auto cfd : *column_family_set_) {
-      Log(options_->info_log,
-          "Column family [%s] (ID %u), log number is %" PRIu64 "\n",
-          cfd->GetName().c_str(), cfd->GetID(), cfd->GetLogNumber());
-    }
-  }
-
-  for (auto builder : builders) {
-    delete builder.second;
-  }
-
-  return s;
-}
-
-Status VersionSet::ListColumnFamilies(std::vector<std::string>* column_families,
-                                      const std::string& dbname, Env* env) {
-  // these are just for performance reasons, not correcntes,
-  // so we're fine using the defaults
-  EnvOptions soptions;
-  // Read "CURRENT" file, which contains a pointer to the current manifest file
-  std::string current;
-  Status s = ReadFileToString(env, CurrentFileName(dbname), &current);
-  if (!s.ok()) {
-    return s;
-  }
-  if (current.empty() || current[current.size()-1] != '\n') {
-    return Status::Corruption("CURRENT file does not end with newline");
-  }
-  current.resize(current.size() - 1);
-
-  std::string dscname = dbname + "/" + current;
-  unique_ptr<SequentialFile> file;
-  s = env->NewSequentialFile(dscname, &file, soptions);
-  if (!s.ok()) {
-    return s;
-  }
-
-  std::map<uint32_t, std::string> column_family_names;
-  // default column family is always implicitly there
-  column_family_names.insert({0, kDefaultColumnFamilyName});
-  VersionSet::LogReporter reporter;
-  reporter.status = &s;
-  log::Reader reader(std::move(file), &reporter, true /*checksum*/,
-                     0 /*initial_offset*/);
-  Slice record;
-  std::string scratch;
-  while (reader.ReadRecord(&record, &scratch) && s.ok()) {
-    VersionEdit edit;
-    s = edit.DecodeFrom(record);
-    if (!s.ok()) {
-      break;
-    }
-    if (edit.is_column_family_add_) {
-      if (column_family_names.find(edit.column_family_) !=
-          column_family_names.end()) {
-        s = Status::Corruption("Manifest adding the same column family twice");
-        break;
-      }
-      column_family_names.insert(
-          {edit.column_family_, edit.column_family_name_});
-    } else if (edit.is_column_family_drop_) {
-      if (column_family_names.find(edit.column_family_) ==
-          column_family_names.end()) {
-        s = Status::Corruption(
-            "Manifest - dropping non-existing column family");
-        break;
-      }
-      column_family_names.erase(edit.column_family_);
-    }
-  }
-
-  column_families->clear();
-  if (s.ok()) {
-    for (const auto& iter : column_family_names) {
-      column_families->push_back(iter.second);
-    }
-  }
-
-  return s;
-}
-
-#ifndef ROCKSDB_LITE
-Status VersionSet::ReduceNumberOfLevels(const std::string& dbname,
-                                        const Options* options,
-                                        const EnvOptions& storage_options,
-                                        int new_levels) {
-  if (new_levels <= 1) {
-    return Status::InvalidArgument(
-        "Number of levels needs to be bigger than 1");
-  }
-
-  ColumnFamilyOptions cf_options(*options);
-  std::shared_ptr<Cache> tc(NewLRUCache(
-      options->max_open_files - 10, options->table_cache_numshardbits,
-      options->table_cache_remove_scan_count_limit));
-  VersionSet versions(dbname, options, storage_options, tc.get());
-  Status status;
-
-  std::vector<ColumnFamilyDescriptor> dummy;
-  ColumnFamilyDescriptor dummy_descriptor(kDefaultColumnFamilyName,
-                                          ColumnFamilyOptions(*options));
-  dummy.push_back(dummy_descriptor);
-  status = versions.Recover(dummy);
-  if (!status.ok()) {
-    return status;
-  }
-
-  Version* current_version =
-      versions.GetColumnFamilySet()->GetDefault()->current();
-  int current_levels = current_version->NumberLevels();
-
-  if (current_levels <= new_levels) {
-    return Status::OK();
-  }
-
-  // Make sure there are file only on one level from
-  // (new_levels-1) to (current_levels-1)
-  int first_nonempty_level = -1;
-  int first_nonempty_level_filenum = 0;
-  for (int i = new_levels - 1; i < current_levels; i++) {
-    int file_num = current_version->NumLevelFiles(i);
-    if (file_num != 0) {
-      if (first_nonempty_level < 0) {
-        first_nonempty_level = i;
-        first_nonempty_level_filenum = file_num;
-      } else {
-        char msg[255];
-        snprintf(msg, sizeof(msg),
-                 "Found at least two levels containing files: "
-                 "[%d:%d],[%d:%d].\n",
-                 first_nonempty_level, first_nonempty_level_filenum, i,
-                 file_num);
-        return Status::InvalidArgument(msg);
-      }
-    }
-  }
-
-  std::vector<FileMetaData*>* old_files_list = current_version->files_;
-  // we need to allocate an array with the old number of levels size to
-  // avoid SIGSEGV in WriteSnapshot()
-  // however, all levels bigger or equal to new_levels will be empty
-  std::vector<FileMetaData*>* new_files_list =
-      new std::vector<FileMetaData*>[current_levels];
-  for (int i = 0; i < new_levels - 1; i++) {
-    new_files_list[i] = old_files_list[i];
-  }
-
-  if (first_nonempty_level > 0) {
-    new_files_list[new_levels - 1] = old_files_list[first_nonempty_level];
-  }
-
-  delete[] current_version->files_;
-  current_version->files_ = new_files_list;
-  current_version->num_levels_ = new_levels;
-
-  VersionEdit ve;
-  port::Mutex dummy_mutex;
-  MutexLock l(&dummy_mutex);
-  return versions.LogAndApply(versions.GetColumnFamilySet()->GetDefault(), &ve,
-                              &dummy_mutex, nullptr, true);
-}
-
-Status VersionSet::DumpManifest(Options& options, std::string& dscname,
-                                bool verbose, bool hex) {
-  // Open the specified manifest file.
-  unique_ptr<SequentialFile> file;
-  Status s = options.env->NewSequentialFile(dscname, &file, storage_options_);
-  if (!s.ok()) {
-    return s;
-  }
-
-  bool have_prev_log_number = false;
-  bool have_next_file = false;
-  bool have_last_sequence = false;
-  uint64_t next_file = 0;
-  uint64_t last_sequence = 0;
-  uint64_t prev_log_number = 0;
-  int count = 0;
-  std::unordered_map<uint32_t, std::string> comparators;
-  std::unordered_map<uint32_t, Builder*> builders;
-
-  // add default column family
-  VersionEdit default_cf_edit;
-  default_cf_edit.AddColumnFamily(kDefaultColumnFamilyName);
-  default_cf_edit.SetColumnFamily(0);
-  ColumnFamilyData* default_cfd =
-      CreateColumnFamily(ColumnFamilyOptions(options), &default_cf_edit);
-  builders.insert({0, new Builder(default_cfd)});
-
-  {
-    VersionSet::LogReporter reporter;
-    reporter.status = &s;
-    log::Reader reader(std::move(file), &reporter, true/*checksum*/,
-                       0/*initial_offset*/);
-    Slice record;
-    std::string scratch;
-    while (reader.ReadRecord(&record, &scratch) && s.ok()) {
-      VersionEdit edit;
-      s = edit.DecodeFrom(record);
-      if (!s.ok()) {
-        break;
-      }
-
-      // Write out each individual edit
-      if (verbose) {
-        printf("*************************Edit[%d] = %s\n",
-                count, edit.DebugString(hex).c_str());
-      }
-      count++;
-
-      bool cf_in_builders =
-          builders.find(edit.column_family_) != builders.end();
-
-      if (edit.has_comparator_) {
-        comparators.insert({edit.column_family_, edit.comparator_});
-      }
-
-      ColumnFamilyData* cfd = nullptr;
-
-      if (edit.is_column_family_add_) {
-        if (cf_in_builders) {
-          s = Status::Corruption(
-              "Manifest adding the same column family twice");
-          break;
-        }
-        cfd = CreateColumnFamily(ColumnFamilyOptions(options), &edit);
-        builders.insert({edit.column_family_, new Builder(cfd)});
-      } else if (edit.is_column_family_drop_) {
-        if (!cf_in_builders) {
-          s = Status::Corruption(
-              "Manifest - dropping non-existing column family");
-          break;
-        }
-        auto builder_iter = builders.find(edit.column_family_);
-        delete builder_iter->second;
-        builders.erase(builder_iter);
-        comparators.erase(edit.column_family_);
-        cfd = column_family_set_->GetColumnFamily(edit.column_family_);
-        assert(cfd != nullptr);
-        cfd->Unref();
-        delete cfd;
-        cfd = nullptr;
-      } else {
-        if (!cf_in_builders) {
-          s = Status::Corruption(
-              "Manifest record referencing unknown column family");
-          break;
-        }
-
-        cfd = column_family_set_->GetColumnFamily(edit.column_family_);
-        // this should never happen since cf_in_builders is true
-        assert(cfd != nullptr);
-
-        // if it is not column family add or column family drop,
-        // then it's a file add/delete, which should be forwarded
-        // to builder
-        auto builder = builders.find(edit.column_family_);
-        assert(builder != builders.end());
-        builder->second->Apply(&edit);
-      }
-
-      if (cfd != nullptr && edit.has_log_number_) {
-        cfd->SetLogNumber(edit.log_number_);
-      }
-
-      if (edit.has_prev_log_number_) {
-        prev_log_number = edit.prev_log_number_;
-        have_prev_log_number = true;
-      }
-
-      if (edit.has_next_file_number_) {
-        next_file = edit.next_file_number_;
-        have_next_file = true;
-      }
-
-      if (edit.has_last_sequence_) {
-        last_sequence = edit.last_sequence_;
-        have_last_sequence = true;
-      }
-
-      if (edit.has_max_column_family_) {
-        column_family_set_->UpdateMaxColumnFamily(edit.max_column_family_);
-      }
-    }
-  }
-  file.reset();
-
-  if (s.ok()) {
-    if (!have_next_file) {
-      s = Status::Corruption("no meta-nextfile entry in descriptor");
-      printf("no meta-nextfile entry in descriptor");
-    } else if (!have_last_sequence) {
-      printf("no last-sequence-number entry in descriptor");
-      s = Status::Corruption("no last-sequence-number entry in descriptor");
-    }
-
-    if (!have_prev_log_number) {
-      prev_log_number = 0;
-    }
-  }
-
-  if (s.ok()) {
-    for (auto cfd : *column_family_set_) {
-      auto builders_iter = builders.find(cfd->GetID());
-      assert(builders_iter != builders.end());
-      auto builder = builders_iter->second;
-
-      Version* v = new Version(cfd, this, current_version_number_++);
-      builder->SaveTo(v);
-      std::vector<uint64_t> size_being_compacted(v->NumberLevels() - 1);
-      cfd->compaction_picker()->SizeBeingCompacted(size_being_compacted);
-      v->ComputeCompactionScore(size_being_compacted);
-      v->UpdateFilesBySize();
-      delete builder;
-
-      printf("--------------- Column family \"%s\"  (ID %u) --------------\n",
-             cfd->GetName().c_str(), (unsigned int)cfd->GetID());
-      printf("log number: %lu\n", (unsigned long)cfd->GetLogNumber());
-      auto comparator = comparators.find(cfd->GetID());
-      if (comparator != comparators.end()) {
-        printf("comparator: %s\n", comparator->second.c_str());
-      } else {
-        printf("comparator: <NO COMPARATOR>\n");
-      }
-      printf("%s \n", v->DebugString(hex).c_str());
-      delete v;
-    }
-
-    next_file_number_ = next_file + 1;
-    last_sequence_ = last_sequence;
-    prev_log_number_ = prev_log_number;
-
-    printf(
-        "next_file_number %lu last_sequence "
-        "%lu  prev_log_number %lu max_column_family %u\n",
-        (unsigned long)next_file_number_, (unsigned long)last_sequence,
-        (unsigned long)prev_log_number,
-        column_family_set_->GetMaxColumnFamily());
-  }
-
-  return s;
-}
-#endif  // ROCKSDB_LITE
-
-void VersionSet::MarkFileNumberUsed(uint64_t number) {
-  if (next_file_number_ <= number) {
-    next_file_number_ = number + 1;
-  }
-}
-
-Status VersionSet::WriteSnapshot(log::Writer* log) {
-  // TODO: Break up into multiple records to reduce memory usage on recovery?
-
-  // WARNING: This method doesn't hold a mutex!!
-
-  // This is done without DB mutex lock held, but only within single-threaded
-  // LogAndApply. Column family manipulations can only happen within LogAndApply
-  // (the same single thread), so we're safe to iterate.
-  for (auto cfd : *column_family_set_) {
-    {
-      // Store column family info
-      VersionEdit edit;
-      if (cfd->GetID() != 0) {
-        // default column family is always there,
-        // no need to explicitly write it
-        edit.AddColumnFamily(cfd->GetName());
-        edit.SetColumnFamily(cfd->GetID());
-      }
-      edit.SetComparatorName(
-          cfd->internal_comparator().user_comparator()->Name());
-      std::string record;
-      edit.EncodeTo(&record);
-      Status s = log->AddRecord(record);
-      if (!s.ok()) {
-        return s;
-      }
-    }
-
-    {
-      // Save files
-      VersionEdit edit;
-      edit.SetColumnFamily(cfd->GetID());
-
-      for (int level = 0; level < cfd->NumberLevels(); level++) {
-        for (const auto& f : cfd->current()->files_[level]) {
-          edit.AddFile(level,
-                       f->number,
-                       f->file_size,
-                       f->smallest,
-                       f->largest,
-                       f->smallest_seqno,
-                       f->largest_seqno);
-        }
-      }
-      edit.SetLogNumber(cfd->GetLogNumber());
-      std::string record;
-      edit.EncodeTo(&record);
-      Status s = log->AddRecord(record);
-      if (!s.ok()) {
-        return s;
-      }
-    }
-  }
-
-  return Status::OK();
-}
-
-// Opens the mainfest file and reads all records
-// till it finds the record we are looking for.
-bool VersionSet::ManifestContains(uint64_t manifest_file_number,
-                                  const std::string& record) const {
-  std::string fname =
-      DescriptorFileName(dbname_, manifest_file_number);
-  Log(options_->info_log, "ManifestContains: checking %s\n", fname.c_str());
-  unique_ptr<SequentialFile> file;
-  Status s = env_->NewSequentialFile(fname, &file, storage_options_);
-  if (!s.ok()) {
-    Log(options_->info_log, "ManifestContains: %s\n", s.ToString().c_str());
-    Log(options_->info_log,
-        "ManifestContains: is unable to reopen the manifest file  %s",
-        fname.c_str());
-    return false;
-  }
-  log::Reader reader(std::move(file), nullptr, true/*checksum*/, 0);
-  Slice r;
-  std::string scratch;
-  bool result = false;
-  while (reader.ReadRecord(&r, &scratch)) {
-    if (r == Slice(record)) {
-      result = true;
-      break;
-    }
-  }
-  Log(options_->info_log, "ManifestContains: result = %d\n", result ? 1 : 0);
-  return result;
-}
-
-
-uint64_t VersionSet::ApproximateOffsetOf(Version* v, const InternalKey& ikey) {
-  uint64_t result = 0;
-  for (int level = 0; level < v->NumberLevels(); level++) {
-    const std::vector<FileMetaData*>& files = v->files_[level];
-    for (size_t i = 0; i < files.size(); i++) {
-      if (v->cfd_->internal_comparator().Compare(files[i]->largest, ikey) <=
-          0) {
-        // Entire file is before "ikey", so just add the file size
-        result += files[i]->file_size;
-      } else if (v->cfd_->internal_comparator().Compare(files[i]->smallest,
-                                                        ikey) > 0) {
-        // Entire file is after "ikey", so ignore
-        if (level > 0) {
-          // Files other than level 0 are sorted by meta->smallest, so
-          // no further files in this level will contain data for
-          // "ikey".
-          break;
-        }
-      } else {
-        // "ikey" falls in the range for this table.  Add the
-        // approximate offset of "ikey" within the table.
-        TableReader* table_reader_ptr;
-        Iterator* iter = v->cfd_->table_cache()->NewIterator(
-            ReadOptions(), storage_options_, v->cfd_->internal_comparator(),
-            *(files[i]), &table_reader_ptr);
-        if (table_reader_ptr != nullptr) {
-          result += table_reader_ptr->ApproximateOffsetOf(ikey.Encode());
-        }
-        delete iter;
-      }
-    }
-  }
-  return result;
-}
-
-void VersionSet::AddLiveFiles(std::vector<uint64_t>* live_list) {
-  // pre-calculate space requirement
-  int64_t total_files = 0;
-  for (auto cfd : *column_family_set_) {
-    Version* dummy_versions = cfd->dummy_versions();
-    for (Version* v = dummy_versions->next_; v != dummy_versions;
-         v = v->next_) {
-      for (int level = 0; level < v->NumberLevels(); level++) {
-        total_files += v->files_[level].size();
-      }
-    }
-  }
-
-  // just one time extension to the right size
-  live_list->reserve(live_list->size() + total_files);
-
-  for (auto cfd : *column_family_set_) {
-    Version* dummy_versions = cfd->dummy_versions();
-    for (Version* v = dummy_versions->next_; v != dummy_versions;
-         v = v->next_) {
-      for (int level = 0; level < v->NumberLevels(); level++) {
-        for (const auto& f : v->files_[level]) {
-          live_list->push_back(f->number);
-        }
-      }
-    }
-  }
-}
-
-Iterator* VersionSet::MakeInputIterator(Compaction* c) {
-  auto cfd = c->column_family_data();
-  ReadOptions read_options;
-  read_options.verify_checksums =
-    cfd->options()->verify_checksums_in_compaction;
-  read_options.fill_cache = false;
-
-  // Level-0 files have to be merged together.  For other levels,
-  // we will make a concatenating iterator per level.
-  // TODO(opt): use concatenating iterator for level-0 if there is no overlap
-  const int space = (c->level() == 0 ? c->inputs(0)->size() + 1 : 2);
-  Iterator** list = new Iterator*[space];
-  int num = 0;
-  for (int which = 0; which < 2; which++) {
-    if (!c->inputs(which)->empty()) {
-      if (c->level() + which == 0) {
-        for (const auto& file : *c->inputs(which)) {
-          list[num++] = cfd->table_cache()->NewIterator(
-              read_options, storage_options_compactions_,
-              cfd->internal_comparator(), *file, nullptr,
-              true /* for compaction */);
-        }
-      } else {
-        // Create concatenating iterator for the files from this level
-        list[num++] = NewTwoLevelIterator(new Version::LevelFileIteratorState(
-              cfd->table_cache(), read_options, storage_options_,
-              cfd->internal_comparator(), true /* for_compaction */,
-              false /* prefix enabled */),
-            new Version::LevelFileNumIterator(cfd->internal_comparator(),
-                                              c->inputs(which)));
-      }
-    }
-  }
-  assert(num <= space);
-  Iterator* result = NewMergingIterator(
-      &c->column_family_data()->internal_comparator(), list, num);
-  delete[] list;
-  return result;
-}
-
-// verify that the files listed in this compaction are present
-// in the current version
-bool VersionSet::VerifyCompactionFileConsistency(Compaction* c) {
-#ifndef NDEBUG
-  Version* version = c->column_family_data()->current();
-  if (c->input_version() != version) {
-    Log(options_->info_log,
-        "[%s] VerifyCompactionFileConsistency version mismatch",
-        c->column_family_data()->GetName().c_str());
-  }
-
-  // verify files in level
-  int level = c->level();
-  for (int i = 0; i < c->num_input_files(0); i++) {
-    uint64_t number = c->input(0,i)->number;
-
-    // look for this file in the current version
-    bool found = false;
-    for (unsigned int j = 0; j < version->files_[level].size(); j++) {
-      FileMetaData* f = version->files_[level][j];
-      if (f->number == number) {
-        found = true;
-        break;
-      }
-    }
-    if (!found) {
-      return false; // input files non existant in current version
-    }
-  }
-  // verify level+1 files
-  level++;
-  for (int i = 0; i < c->num_input_files(1); i++) {
-    uint64_t number = c->input(1,i)->number;
-
-    // look for this file in the current version
-    bool found = false;
-    for (unsigned int j = 0; j < version->files_[level].size(); j++) {
-      FileMetaData* f = version->files_[level][j];
-      if (f->number == number) {
-        found = true;
-        break;
-      }
-    }
-    if (!found) {
-      return false; // input files non existant in current version
-    }
-  }
-#endif
-  return true;     // everything good
-}
-
-Status VersionSet::GetMetadataForFile(uint64_t number, int* filelevel,
-                                      FileMetaData** meta,
-                                      ColumnFamilyData** cfd) {
-  for (auto cfd_iter : *column_family_set_) {
-    Version* version = cfd_iter->current();
-    for (int level = 0; level < version->NumberLevels(); level++) {
-      for (const auto& file : version->files_[level]) {
-        if (file->number == number) {
-          *meta = file;
-          *filelevel = level;
-          *cfd = cfd_iter;
-          return Status::OK();
-        }
-      }
-    }
-  }
-  return Status::NotFound("File not present in any level");
-}
-
-void VersionSet::GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) {
-  for (auto cfd : *column_family_set_) {
-    for (int level = 0; level < cfd->NumberLevels(); level++) {
-      for (const auto& file : cfd->current()->files_[level]) {
-        LiveFileMetaData filemetadata;
-        filemetadata.column_family_name = cfd->GetName();
-        filemetadata.name = TableFileName("", file->number);
-        filemetadata.level = level;
-        filemetadata.size = file->file_size;
-        filemetadata.smallestkey = file->smallest.user_key().ToString();
-        filemetadata.largestkey = file->largest.user_key().ToString();
-        filemetadata.smallest_seqno = file->smallest_seqno;
-        filemetadata.largest_seqno = file->largest_seqno;
-        metadata->push_back(filemetadata);
-      }
-    }
-  }
-}
-
-void VersionSet::GetObsoleteFiles(std::vector<FileMetaData*>* files) {
-  files->insert(files->end(), obsolete_files_.begin(), obsolete_files_.end());
-  obsolete_files_.clear();
-}
-
-ColumnFamilyData* VersionSet::CreateColumnFamily(
-    const ColumnFamilyOptions& options, VersionEdit* edit) {
-  assert(edit->is_column_family_add_);
-
-  Version* dummy_versions = new Version(nullptr, this);
-  auto new_cfd = column_family_set_->CreateColumnFamily(
-      edit->column_family_name_, edit->column_family_, dummy_versions, options);
-
-  Version* v = new Version(new_cfd, this, current_version_number_++);
-
-  AppendVersion(new_cfd, v);
-  new_cfd->CreateNewMemtable();
-  new_cfd->SetLogNumber(edit->log_number_);
-  return new_cfd;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/version_set.h b/src/rocksdb/db/version_set.h
deleted file mode 100644
index 13a1383..0000000
--- a/src/rocksdb/db/version_set.h
+++ /dev/null
@@ -1,493 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// The representation of a DBImpl consists of a set of Versions.  The
-// newest version is called "current".  Older versions may be kept
-// around to provide a consistent view to live iterators.
-//
-// Each Version keeps track of a set of Table files per level.  The
-// entire set of versions is maintained in a VersionSet.
-//
-// Version,VersionSet are thread-compatible, but require external
-// synchronization on all accesses.
-
-#pragma once
-#include <map>
-#include <memory>
-#include <set>
-#include <vector>
-#include <deque>
-#include <atomic>
-#include <limits>
-#include "db/dbformat.h"
-#include "db/version_edit.h"
-#include "port/port.h"
-#include "db/table_cache.h"
-#include "db/compaction.h"
-#include "db/compaction_picker.h"
-#include "db/column_family.h"
-#include "db/log_reader.h"
-#include "db/file_indexer.h"
-
-namespace rocksdb {
-
-namespace log { class Writer; }
-
-class Compaction;
-class CompactionPicker;
-class Iterator;
-class LogBuffer;
-class LookupKey;
-class MemTable;
-class Version;
-class VersionSet;
-class MergeContext;
-class ColumnFamilyData;
-class ColumnFamilySet;
-class TableCache;
-
-// Return the smallest index i such that files[i]->largest >= key.
-// Return files.size() if there is no such file.
-// REQUIRES: "files" contains a sorted list of non-overlapping files.
-extern int FindFile(const InternalKeyComparator& icmp,
-                    const std::vector<FileMetaData*>& files,
-                    const Slice& key);
-
-// Returns true iff some file in "files" overlaps the user key range
-// [*smallest,*largest].
-// smallest==nullptr represents a key smaller than all keys in the DB.
-// largest==nullptr represents a key largest than all keys in the DB.
-// REQUIRES: If disjoint_sorted_files, files[] contains disjoint ranges
-//           in sorted order.
-extern bool SomeFileOverlapsRange(
-    const InternalKeyComparator& icmp,
-    bool disjoint_sorted_files,
-    const std::vector<FileMetaData*>& files,
-    const Slice* smallest_user_key,
-    const Slice* largest_user_key);
-
-class Version {
- public:
-  // Append to *iters a sequence of iterators that will
-  // yield the contents of this Version when merged together.
-  // REQUIRES: This version has been saved (see VersionSet::SaveTo)
-  void AddIterators(const ReadOptions&, const EnvOptions& soptions,
-                    std::vector<Iterator*>* iters);
-
-  // Lookup the value for key.  If found, store it in *val and
-  // return OK.  Else return a non-OK status.  Fills *stats.
-  // Uses *operands to store merge_operator operations to apply later
-  // REQUIRES: lock is not held
-  struct GetStats {
-    FileMetaData* seek_file;
-    int seek_file_level;
-  };
-  void Get(const ReadOptions&, const LookupKey& key, std::string* val,
-           Status* status, MergeContext* merge_context, GetStats* stats,
-           bool* value_found = nullptr);
-
-  // Adds "stats" into the current state.  Returns true if a new
-  // compaction may need to be triggered, false otherwise.
-  // REQUIRES: lock is held
-  bool UpdateStats(const GetStats& stats);
-
-  // Updates internal structures that keep track of compaction scores
-  // We use compaction scores to figure out which compaction to do next
-  // REQUIRES: If Version is not yet saved to current_, it can be called without
-  // a lock. Once a version is saved to current_, call only with mutex held
-  void ComputeCompactionScore(std::vector<uint64_t>& size_being_compacted);
-
-  // Reference count management (so Versions do not disappear out from
-  // under live iterators)
-  void Ref();
-  // Decrease reference count. Delete the object if no reference left
-  // and return true. Otherwise, return false.
-  bool Unref();
-
-  // Returns true iff some level needs a compaction.
-  bool NeedsCompaction() const;
-
-  // Returns the maxmimum compaction score for levels 1 to max
-  double MaxCompactionScore() const { return max_compaction_score_; }
-
-  // See field declaration
-  int MaxCompactionScoreLevel() const { return max_compaction_score_level_; }
-
-  void GetOverlappingInputs(
-      int level,
-      const InternalKey* begin,         // nullptr means before all keys
-      const InternalKey* end,           // nullptr means after all keys
-      std::vector<FileMetaData*>* inputs,
-      int hint_index = -1,              // index of overlap file
-      int* file_index = nullptr);          // return index of overlap file
-
-  void GetOverlappingInputsBinarySearch(
-      int level,
-      const Slice& begin,         // nullptr means before all keys
-      const Slice& end,           // nullptr means after all keys
-      std::vector<FileMetaData*>* inputs,
-      int hint_index,             // index of overlap file
-      int* file_index);           // return index of overlap file
-
-  void ExtendOverlappingInputs(
-      int level,
-      const Slice& begin,         // nullptr means before all keys
-      const Slice& end,           // nullptr means after all keys
-      std::vector<FileMetaData*>* inputs,
-      unsigned int index);                 // start extending from this index
-
-  // Returns true iff some file in the specified level overlaps
-  // some part of [*smallest_user_key,*largest_user_key].
-  // smallest_user_key==NULL represents a key smaller than all keys in the DB.
-  // largest_user_key==NULL represents a key largest than all keys in the DB.
-  bool OverlapInLevel(int level,
-                      const Slice* smallest_user_key,
-                      const Slice* largest_user_key);
-
-  // Returns true iff the first or last file in inputs contains
-  // an overlapping user key to the file "just outside" of it (i.e.
-  // just after the last file, or just before the first file)
-  // REQUIRES: "*inputs" is a sorted list of non-overlapping files
-  bool HasOverlappingUserKey(const std::vector<FileMetaData*>* inputs,
-                             int level);
-
-
-  // Return the level at which we should place a new memtable compaction
-  // result that covers the range [smallest_user_key,largest_user_key].
-  int PickLevelForMemTableOutput(const Slice& smallest_user_key,
-                                 const Slice& largest_user_key);
-
-  int NumberLevels() const { return num_levels_; }
-
-  // REQUIRES: lock is held
-  int NumLevelFiles(int level) const { return files_[level].size(); }
-
-  // Return the combined file size of all files at the specified level.
-  int64_t NumLevelBytes(int level) const;
-
-  // Return a human-readable short (single-line) summary of the number
-  // of files per level.  Uses *scratch as backing store.
-  struct LevelSummaryStorage {
-    char buffer[100];
-  };
-  struct FileSummaryStorage {
-    char buffer[1000];
-  };
-  const char* LevelSummary(LevelSummaryStorage* scratch) const;
-  // Return a human-readable short (single-line) summary of files
-  // in a specified level.  Uses *scratch as backing store.
-  const char* LevelFileSummary(FileSummaryStorage* scratch, int level) const;
-
-  // Return the maximum overlapping data (in bytes) at next level for any
-  // file at a level >= 1.
-  int64_t MaxNextLevelOverlappingBytes();
-
-  // Add all files listed in the current version to *live.
-  void AddLiveFiles(std::set<uint64_t>* live);
-
-  // Return a human readable string that describes this version's contents.
-  std::string DebugString(bool hex = false) const;
-
-  // Returns the version nuber of this version
-  uint64_t GetVersionNumber() const { return version_number_; }
-
-  // REQUIRES: lock is held
-  // On success, *props will be populated with all SSTables' table properties.
-  // The keys of `props` are the sst file name, the values of `props` are the
-  // tables' propertis, represented as shared_ptr.
-  Status GetPropertiesOfAllTables(TablePropertiesCollection* props);
-
-  // used to sort files by size
-  struct Fsize {
-    int index;
-    FileMetaData* file;
-  };
-
- private:
-  friend class Compaction;
-  friend class VersionSet;
-  friend class DBImpl;
-  friend class ColumnFamilyData;
-  friend class CompactionPicker;
-  friend class LevelCompactionPicker;
-  friend class UniversalCompactionPicker;
-
-  class LevelFileNumIterator;
-  class LevelFileIteratorState;
-
-  bool PrefixMayMatch(const ReadOptions& options, Iterator* level_iter,
-                      const Slice& internal_prefix) const;
-
-  // Sort all files for this version based on their file size and
-  // record results in files_by_size_. The largest files are listed first.
-  void UpdateFilesBySize();
-
-  ColumnFamilyData* cfd_;  // ColumnFamilyData to which this Version belongs
-  const InternalKeyComparator* internal_comparator_;
-  const Comparator* user_comparator_;
-  TableCache* table_cache_;
-  const MergeOperator* merge_operator_;
-  Logger* info_log_;
-  Statistics* db_statistics_;
-  VersionSet* vset_;            // VersionSet to which this Version belongs
-  Version* next_;               // Next version in linked list
-  Version* prev_;               // Previous version in linked list
-  int refs_;                    // Number of live refs to this version
-  int num_levels_;              // Number of levels
-
-  // List of files per level, files in each level are arranged
-  // in increasing order of keys
-  std::vector<FileMetaData*>* files_;
-
-  // A list for the same set of files that are stored in files_,
-  // but files in each level are now sorted based on file
-  // size. The file with the largest size is at the front.
-  // This vector stores the index of the file from files_.
-  std::vector<std::vector<int>> files_by_size_;
-
-  // An index into files_by_size_ that specifies the first
-  // file that is not yet compacted
-  std::vector<int> next_file_to_compact_by_size_;
-
-  // Only the first few entries of files_by_size_ are sorted.
-  // There is no need to sort all the files because it is likely
-  // that on a running system, we need to look at only the first
-  // few largest files because a new version is created every few
-  // seconds/minutes (because of concurrent compactions).
-  static const int number_of_files_to_sort_ = 50;
-
-  // Next file to compact based on seek stats.
-  FileMetaData* file_to_compact_;
-  int file_to_compact_level_;
-
-  // Level that should be compacted next and its compaction score.
-  // Score < 1 means compaction is not strictly needed.  These fields
-  // are initialized by Finalize().
-  // The most critical level to be compacted is listed first
-  // These are used to pick the best compaction level
-  std::vector<double> compaction_score_;
-  std::vector<int> compaction_level_;
-  double max_compaction_score_; // max score in l1 to ln-1
-  int max_compaction_score_level_; // level on which max score occurs
-
-  // A version number that uniquely represents this version. This is
-  // used for debugging and logging purposes only.
-  uint64_t version_number_;
-
-  Version(ColumnFamilyData* cfd, VersionSet* vset, uint64_t version_number = 0);
-  FileIndexer file_indexer_;
-
-  ~Version();
-
-  // re-initializes the index that is used to offset into files_by_size_
-  // to find the next compaction candidate file.
-  void ResetNextCompactionIndex(int level) {
-    next_file_to_compact_by_size_[level] = 0;
-  }
-
-  // No copying allowed
-  Version(const Version&);
-  void operator=(const Version&);
-};
-
-class VersionSet {
- public:
-  VersionSet(const std::string& dbname, const DBOptions* options,
-             const EnvOptions& storage_options, Cache* table_cache);
-  ~VersionSet();
-
-  // Apply *edit to the current version to form a new descriptor that
-  // is both saved to persistent state and installed as the new
-  // current version.  Will release *mu while actually writing to the file.
-  // column_family_options has to be set if edit is column family add
-  // REQUIRES: *mu is held on entry.
-  // REQUIRES: no other thread concurrently calls LogAndApply()
-  Status LogAndApply(ColumnFamilyData* column_family_data, VersionEdit* edit,
-                     port::Mutex* mu, Directory* db_directory = nullptr,
-                     bool new_descriptor_log = false,
-                     const ColumnFamilyOptions* column_family_options =
-                         nullptr);
-
-  // Recover the last saved descriptor from persistent storage.
-  // If read_only == true, Recover() will not complain if some column families
-  // are not opened
-  Status Recover(const std::vector<ColumnFamilyDescriptor>& column_families,
-                 bool read_only = false);
-
-  // Reads a manifest file and returns a list of column families in
-  // column_families.
-  static Status ListColumnFamilies(std::vector<std::string>* column_families,
-                                   const std::string& dbname, Env* env);
-
-#ifndef ROCKSDB_LITE
-  // Try to reduce the number of levels. This call is valid when
-  // only one level from the new max level to the old
-  // max level containing files.
-  // The call is static, since number of levels is immutable during
-  // the lifetime of a RocksDB instance. It reduces number of levels
-  // in a DB by applying changes to manifest.
-  // For example, a db currently has 7 levels [0-6], and a call to
-  // to reduce to 5 [0-4] can only be executed when only one level
-  // among [4-6] contains files.
-  static Status ReduceNumberOfLevels(const std::string& dbname,
-                                     const Options* options,
-                                     const EnvOptions& storage_options,
-                                     int new_levels);
-
-  // printf contents (for debugging)
-  Status DumpManifest(Options& options, std::string& manifestFileName,
-                      bool verbose, bool hex = false);
-
-#endif  // ROCKSDB_LITE
-
-  // Return the current manifest file number
-  uint64_t ManifestFileNumber() const { return manifest_file_number_; }
-
-  uint64_t PendingManifestFileNumber() const {
-    return pending_manifest_file_number_;
-  }
-
-  // Allocate and return a new file number
-  uint64_t NewFileNumber() { return next_file_number_++; }
-
-  // Arrange to reuse "file_number" unless a newer file number has
-  // already been allocated.
-  // REQUIRES: "file_number" was returned by a call to NewFileNumber().
-  void ReuseFileNumber(uint64_t file_number) {
-    if (next_file_number_ == file_number + 1) {
-      next_file_number_ = file_number;
-    }
-  }
-
-  // Return the last sequence number.
-  uint64_t LastSequence() const {
-    return last_sequence_.load(std::memory_order_acquire);
-  }
-
-  // Set the last sequence number to s.
-  void SetLastSequence(uint64_t s) {
-    assert(s >= last_sequence_);
-    last_sequence_.store(s, std::memory_order_release);
-  }
-
-  // Mark the specified file number as used.
-  void MarkFileNumberUsed(uint64_t number);
-
-  // Return the log file number for the log file that is currently
-  // being compacted, or zero if there is no such log file.
-  uint64_t PrevLogNumber() const { return prev_log_number_; }
-
-  // Returns the minimum log number such that all
-  // log numbers less than or equal to it can be deleted
-  uint64_t MinLogNumber() const {
-    uint64_t min_log_num = std::numeric_limits<uint64_t>::max();
-    for (auto cfd : *column_family_set_) {
-      if (min_log_num > cfd->GetLogNumber()) {
-        min_log_num = cfd->GetLogNumber();
-      }
-    }
-    return min_log_num;
-  }
-
-  // Create an iterator that reads over the compaction inputs for "*c".
-  // The caller should delete the iterator when no longer needed.
-  Iterator* MakeInputIterator(Compaction* c);
-
-  // Add all files listed in any live version to *live.
-  void AddLiveFiles(std::vector<uint64_t>* live_list);
-
-  // Return the approximate offset in the database of the data for
-  // "key" as of version "v".
-  uint64_t ApproximateOffsetOf(Version* v, const InternalKey& key);
-
-  // Return the size of the current manifest file
-  uint64_t ManifestFileSize() const { return manifest_file_size_; }
-
-  // verify that the files that we started with for a compaction
-  // still exist in the current version and in the same original level.
-  // This ensures that a concurrent compaction did not erroneously
-  // pick the same files to compact.
-  bool VerifyCompactionFileConsistency(Compaction* c);
-
-  Status GetMetadataForFile(uint64_t number, int* filelevel,
-                            FileMetaData** metadata, ColumnFamilyData** cfd);
-
-  void GetLiveFilesMetaData(
-    std::vector<LiveFileMetaData> *metadata);
-
-  void GetObsoleteFiles(std::vector<FileMetaData*>* files);
-
-  ColumnFamilySet* GetColumnFamilySet() { return column_family_set_.get(); }
-
- private:
-  class Builder;
-  struct ManifestWriter;
-
-  friend class Version;
-
-  struct LogReporter : public log::Reader::Reporter {
-    Status* status;
-    virtual void Corruption(size_t bytes, const Status& s) {
-      if (this->status->ok()) *this->status = s;
-    }
-  };
-
-  // Save current contents to *log
-  Status WriteSnapshot(log::Writer* log);
-
-  void AppendVersion(ColumnFamilyData* column_family_data, Version* v);
-
-  bool ManifestContains(uint64_t manifest_file_number,
-                        const std::string& record) const;
-
-  ColumnFamilyData* CreateColumnFamily(const ColumnFamilyOptions& options,
-                                       VersionEdit* edit);
-
-  std::unique_ptr<ColumnFamilySet> column_family_set_;
-
-  Env* const env_;
-  const std::string dbname_;
-  const DBOptions* const options_;
-  uint64_t next_file_number_;
-  uint64_t manifest_file_number_;
-  uint64_t pending_manifest_file_number_;
-  std::atomic<uint64_t> last_sequence_;
-  uint64_t prev_log_number_;  // 0 or backing store for memtable being compacted
-
-  // Opened lazily
-  unique_ptr<log::Writer> descriptor_log_;
-
-  // generates a increasing version number for every new version
-  uint64_t current_version_number_;
-
-  // Queue of writers to the manifest file
-  std::deque<ManifestWriter*> manifest_writers_;
-
-  // Current size of manifest file
-  uint64_t manifest_file_size_;
-
-  std::vector<FileMetaData*> obsolete_files_;
-
-  // storage options for all reads and writes except compactions
-  const EnvOptions& storage_options_;
-
-  // storage options used for compactions. This is a copy of
-  // storage_options_ but with readaheads set to readahead_compactions_.
-  const EnvOptions storage_options_compactions_;
-
-  // No copying allowed
-  VersionSet(const VersionSet&);
-  void operator=(const VersionSet&);
-
-  void LogAndApplyCFHelper(VersionEdit* edit);
-  void LogAndApplyHelper(ColumnFamilyData* cfd, Builder* b, Version* v,
-                         VersionEdit* edit, port::Mutex* mu);
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/version_set_test.cc b/src/rocksdb/db/version_set_test.cc
deleted file mode 100644
index 1af95dd..0000000
--- a/src/rocksdb/db/version_set_test.cc
+++ /dev/null
@@ -1,184 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/version_set.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-class FindFileTest {
- public:
-  std::vector<FileMetaData*> files_;
-  bool disjoint_sorted_files_;
-
-  FindFileTest() : disjoint_sorted_files_(true) { }
-
-  ~FindFileTest() {
-    for (unsigned int i = 0; i < files_.size(); i++) {
-      delete files_[i];
-    }
-  }
-
-  void Add(const char* smallest, const char* largest,
-           SequenceNumber smallest_seq = 100,
-           SequenceNumber largest_seq = 100) {
-    FileMetaData* f = new FileMetaData;
-    f->number = files_.size() + 1;
-    f->smallest = InternalKey(smallest, smallest_seq, kTypeValue);
-    f->largest = InternalKey(largest, largest_seq, kTypeValue);
-    files_.push_back(f);
-  }
-
-  int Find(const char* key) {
-    InternalKey target(key, 100, kTypeValue);
-    InternalKeyComparator cmp(BytewiseComparator());
-    return FindFile(cmp, files_, target.Encode());
-  }
-
-  bool Overlaps(const char* smallest, const char* largest) {
-    InternalKeyComparator cmp(BytewiseComparator());
-    Slice s(smallest != nullptr ? smallest : "");
-    Slice l(largest != nullptr ? largest : "");
-    return SomeFileOverlapsRange(cmp, disjoint_sorted_files_, files_,
-                                 (smallest != nullptr ? &s : nullptr),
-                                 (largest != nullptr ? &l : nullptr));
-  }
-};
-
-TEST(FindFileTest, Empty) {
-  ASSERT_EQ(0, Find("foo"));
-  ASSERT_TRUE(! Overlaps("a", "z"));
-  ASSERT_TRUE(! Overlaps(nullptr, "z"));
-  ASSERT_TRUE(! Overlaps("a", nullptr));
-  ASSERT_TRUE(! Overlaps(nullptr, nullptr));
-}
-
-TEST(FindFileTest, Single) {
-  Add("p", "q");
-  ASSERT_EQ(0, Find("a"));
-  ASSERT_EQ(0, Find("p"));
-  ASSERT_EQ(0, Find("p1"));
-  ASSERT_EQ(0, Find("q"));
-  ASSERT_EQ(1, Find("q1"));
-  ASSERT_EQ(1, Find("z"));
-
-  ASSERT_TRUE(! Overlaps("a", "b"));
-  ASSERT_TRUE(! Overlaps("z1", "z2"));
-  ASSERT_TRUE(Overlaps("a", "p"));
-  ASSERT_TRUE(Overlaps("a", "q"));
-  ASSERT_TRUE(Overlaps("a", "z"));
-  ASSERT_TRUE(Overlaps("p", "p1"));
-  ASSERT_TRUE(Overlaps("p", "q"));
-  ASSERT_TRUE(Overlaps("p", "z"));
-  ASSERT_TRUE(Overlaps("p1", "p2"));
-  ASSERT_TRUE(Overlaps("p1", "z"));
-  ASSERT_TRUE(Overlaps("q", "q"));
-  ASSERT_TRUE(Overlaps("q", "q1"));
-
-  ASSERT_TRUE(! Overlaps(nullptr, "j"));
-  ASSERT_TRUE(! Overlaps("r", nullptr));
-  ASSERT_TRUE(Overlaps(nullptr, "p"));
-  ASSERT_TRUE(Overlaps(nullptr, "p1"));
-  ASSERT_TRUE(Overlaps("q", nullptr));
-  ASSERT_TRUE(Overlaps(nullptr, nullptr));
-}
-
-
-TEST(FindFileTest, Multiple) {
-  Add("150", "200");
-  Add("200", "250");
-  Add("300", "350");
-  Add("400", "450");
-  ASSERT_EQ(0, Find("100"));
-  ASSERT_EQ(0, Find("150"));
-  ASSERT_EQ(0, Find("151"));
-  ASSERT_EQ(0, Find("199"));
-  ASSERT_EQ(0, Find("200"));
-  ASSERT_EQ(1, Find("201"));
-  ASSERT_EQ(1, Find("249"));
-  ASSERT_EQ(1, Find("250"));
-  ASSERT_EQ(2, Find("251"));
-  ASSERT_EQ(2, Find("299"));
-  ASSERT_EQ(2, Find("300"));
-  ASSERT_EQ(2, Find("349"));
-  ASSERT_EQ(2, Find("350"));
-  ASSERT_EQ(3, Find("351"));
-  ASSERT_EQ(3, Find("400"));
-  ASSERT_EQ(3, Find("450"));
-  ASSERT_EQ(4, Find("451"));
-
-  ASSERT_TRUE(! Overlaps("100", "149"));
-  ASSERT_TRUE(! Overlaps("251", "299"));
-  ASSERT_TRUE(! Overlaps("451", "500"));
-  ASSERT_TRUE(! Overlaps("351", "399"));
-
-  ASSERT_TRUE(Overlaps("100", "150"));
-  ASSERT_TRUE(Overlaps("100", "200"));
-  ASSERT_TRUE(Overlaps("100", "300"));
-  ASSERT_TRUE(Overlaps("100", "400"));
-  ASSERT_TRUE(Overlaps("100", "500"));
-  ASSERT_TRUE(Overlaps("375", "400"));
-  ASSERT_TRUE(Overlaps("450", "450"));
-  ASSERT_TRUE(Overlaps("450", "500"));
-}
-
-TEST(FindFileTest, MultipleNullBoundaries) {
-  Add("150", "200");
-  Add("200", "250");
-  Add("300", "350");
-  Add("400", "450");
-  ASSERT_TRUE(! Overlaps(nullptr, "149"));
-  ASSERT_TRUE(! Overlaps("451", nullptr));
-  ASSERT_TRUE(Overlaps(nullptr, nullptr));
-  ASSERT_TRUE(Overlaps(nullptr, "150"));
-  ASSERT_TRUE(Overlaps(nullptr, "199"));
-  ASSERT_TRUE(Overlaps(nullptr, "200"));
-  ASSERT_TRUE(Overlaps(nullptr, "201"));
-  ASSERT_TRUE(Overlaps(nullptr, "400"));
-  ASSERT_TRUE(Overlaps(nullptr, "800"));
-  ASSERT_TRUE(Overlaps("100", nullptr));
-  ASSERT_TRUE(Overlaps("200", nullptr));
-  ASSERT_TRUE(Overlaps("449", nullptr));
-  ASSERT_TRUE(Overlaps("450", nullptr));
-}
-
-TEST(FindFileTest, OverlapSequenceChecks) {
-  Add("200", "200", 5000, 3000);
-  ASSERT_TRUE(! Overlaps("199", "199"));
-  ASSERT_TRUE(! Overlaps("201", "300"));
-  ASSERT_TRUE(Overlaps("200", "200"));
-  ASSERT_TRUE(Overlaps("190", "200"));
-  ASSERT_TRUE(Overlaps("200", "210"));
-}
-
-TEST(FindFileTest, OverlappingFiles) {
-  Add("150", "600");
-  Add("400", "500");
-  disjoint_sorted_files_ = false;
-  ASSERT_TRUE(! Overlaps("100", "149"));
-  ASSERT_TRUE(! Overlaps("601", "700"));
-  ASSERT_TRUE(Overlaps("100", "150"));
-  ASSERT_TRUE(Overlaps("100", "200"));
-  ASSERT_TRUE(Overlaps("100", "300"));
-  ASSERT_TRUE(Overlaps("100", "400"));
-  ASSERT_TRUE(Overlaps("100", "500"));
-  ASSERT_TRUE(Overlaps("375", "400"));
-  ASSERT_TRUE(Overlaps("450", "450"));
-  ASSERT_TRUE(Overlaps("450", "500"));
-  ASSERT_TRUE(Overlaps("450", "700"));
-  ASSERT_TRUE(Overlaps("600", "700"));
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/db/write_batch.cc b/src/rocksdb/db/write_batch.cc
deleted file mode 100644
index 734d1e3..0000000
--- a/src/rocksdb/db/write_batch.cc
+++ /dev/null
@@ -1,489 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// WriteBatch::rep_ :=
-//    sequence: fixed64
-//    count: fixed32
-//    data: record[count]
-// record :=
-//    kTypeValue varstring varstring
-//    kTypeMerge varstring varstring
-//    kTypeDeletion varstring
-//    kTypeColumnFamilyValue varint32 varstring varstring
-//    kTypeColumnFamilyMerge varint32 varstring varstring
-//    kTypeColumnFamilyDeletion varint32 varstring varstring
-// varstring :=
-//    len: varint32
-//    data: uint8[len]
-
-#include "rocksdb/write_batch.h"
-#include "rocksdb/options.h"
-#include "rocksdb/merge_operator.h"
-#include "db/dbformat.h"
-#include "db/db_impl.h"
-#include "db/memtable.h"
-#include "db/snapshot.h"
-#include "db/write_batch_internal.h"
-#include "util/coding.h"
-#include "util/statistics.h"
-#include <stdexcept>
-
-namespace rocksdb {
-
-// WriteBatch header has an 8-byte sequence number followed by a 4-byte count.
-static const size_t kHeader = 12;
-
-WriteBatch::WriteBatch(size_t reserved_bytes) {
-  rep_.reserve((reserved_bytes > kHeader) ? reserved_bytes : kHeader);
-  Clear();
-}
-
-WriteBatch::~WriteBatch() { }
-
-WriteBatch::Handler::~Handler() { }
-
-void WriteBatch::Handler::Put(const Slice& key, const Slice& value) {
-  // you need to either implement Put or PutCF
-  throw std::runtime_error("Handler::Put not implemented!");
-}
-
-void WriteBatch::Handler::Merge(const Slice& key, const Slice& value) {
-  throw std::runtime_error("Handler::Merge not implemented!");
-}
-
-void WriteBatch::Handler::Delete(const Slice& key) {
-  // you need to either implement Delete or DeleteCF
-  throw std::runtime_error("Handler::Delete not implemented!");
-}
-
-void WriteBatch::Handler::LogData(const Slice& blob) {
-  // If the user has not specified something to do with blobs, then we ignore
-  // them.
-}
-
-bool WriteBatch::Handler::Continue() {
-  return true;
-}
-
-void WriteBatch::Clear() {
-  rep_.clear();
-  rep_.resize(kHeader);
-}
-
-int WriteBatch::Count() const {
-  return WriteBatchInternal::Count(this);
-}
-
-Status WriteBatch::Iterate(Handler* handler) const {
-  Slice input(rep_);
-  if (input.size() < kHeader) {
-    return Status::Corruption("malformed WriteBatch (too small)");
-  }
-
-  input.remove_prefix(kHeader);
-  Slice key, value, blob;
-  int found = 0;
-  Status s;
-  while (s.ok() && !input.empty() && handler->Continue()) {
-    char tag = input[0];
-    input.remove_prefix(1);
-    uint32_t column_family = 0;  // default
-    switch (tag) {
-      case kTypeColumnFamilyValue:
-        if (!GetVarint32(&input, &column_family)) {
-          return Status::Corruption("bad WriteBatch Put");
-        }
-      // intentional fallthrough
-      case kTypeValue:
-        if (GetLengthPrefixedSlice(&input, &key) &&
-            GetLengthPrefixedSlice(&input, &value)) {
-          s = handler->PutCF(column_family, key, value);
-          found++;
-        } else {
-          return Status::Corruption("bad WriteBatch Put");
-        }
-        break;
-      case kTypeColumnFamilyDeletion:
-        if (!GetVarint32(&input, &column_family)) {
-          return Status::Corruption("bad WriteBatch Delete");
-        }
-      // intentional fallthrough
-      case kTypeDeletion:
-        if (GetLengthPrefixedSlice(&input, &key)) {
-          s = handler->DeleteCF(column_family, key);
-          found++;
-        } else {
-          return Status::Corruption("bad WriteBatch Delete");
-        }
-        break;
-      case kTypeColumnFamilyMerge:
-        if (!GetVarint32(&input, &column_family)) {
-          return Status::Corruption("bad WriteBatch Merge");
-        }
-      // intentional fallthrough
-      case kTypeMerge:
-        if (GetLengthPrefixedSlice(&input, &key) &&
-            GetLengthPrefixedSlice(&input, &value)) {
-          s = handler->MergeCF(column_family, key, value);
-          found++;
-        } else {
-          return Status::Corruption("bad WriteBatch Merge");
-        }
-        break;
-      case kTypeLogData:
-        if (GetLengthPrefixedSlice(&input, &blob)) {
-          handler->LogData(blob);
-        } else {
-          return Status::Corruption("bad WriteBatch Blob");
-        }
-        break;
-      default:
-        return Status::Corruption("unknown WriteBatch tag");
-    }
-  }
-  if (!s.ok()) {
-    return s;
-  }
-  if (found != WriteBatchInternal::Count(this)) {
-    return Status::Corruption("WriteBatch has wrong count");
-  } else {
-    return Status::OK();
-  }
-}
-
-int WriteBatchInternal::Count(const WriteBatch* b) {
-  return DecodeFixed32(b->rep_.data() + 8);
-}
-
-void WriteBatchInternal::SetCount(WriteBatch* b, int n) {
-  EncodeFixed32(&b->rep_[8], n);
-}
-
-SequenceNumber WriteBatchInternal::Sequence(const WriteBatch* b) {
-  return SequenceNumber(DecodeFixed64(b->rep_.data()));
-}
-
-void WriteBatchInternal::SetSequence(WriteBatch* b, SequenceNumber seq) {
-  EncodeFixed64(&b->rep_[0], seq);
-}
-
-void WriteBatchInternal::Put(WriteBatch* b, uint32_t column_family_id,
-                             const Slice& key, const Slice& value) {
-  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
-  if (column_family_id == 0) {
-    b->rep_.push_back(static_cast<char>(kTypeValue));
-  } else {
-    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyValue));
-    PutVarint32(&b->rep_, column_family_id);
-  }
-  PutLengthPrefixedSlice(&b->rep_, key);
-  PutLengthPrefixedSlice(&b->rep_, value);
-}
-
-namespace {
-inline uint32_t GetColumnFamilyID(ColumnFamilyHandle* column_family) {
-  uint32_t column_family_id = 0;
-  if (column_family != nullptr) {
-    auto cfh = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family);
-    column_family_id = cfh->GetID();
-  }
-  return column_family_id;
-}
-}  // namespace
-
-void WriteBatch::Put(ColumnFamilyHandle* column_family, const Slice& key,
-                     const Slice& value) {
-  WriteBatchInternal::Put(this, GetColumnFamilyID(column_family), key, value);
-}
-
-void WriteBatchInternal::Put(WriteBatch* b, uint32_t column_family_id,
-                             const SliceParts& key, const SliceParts& value) {
-  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
-  if (column_family_id == 0) {
-    b->rep_.push_back(static_cast<char>(kTypeValue));
-  } else {
-    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyValue));
-    PutVarint32(&b->rep_, column_family_id);
-  }
-  PutLengthPrefixedSliceParts(&b->rep_, key);
-  PutLengthPrefixedSliceParts(&b->rep_, value);
-}
-
-void WriteBatch::Put(ColumnFamilyHandle* column_family, const SliceParts& key,
-                     const SliceParts& value) {
-  WriteBatchInternal::Put(this, GetColumnFamilyID(column_family), key, value);
-}
-
-void WriteBatchInternal::Delete(WriteBatch* b, uint32_t column_family_id,
-                                const Slice& key) {
-  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
-  if (column_family_id == 0) {
-    b->rep_.push_back(static_cast<char>(kTypeDeletion));
-  } else {
-    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyDeletion));
-    PutVarint32(&b->rep_, column_family_id);
-  }
-  PutLengthPrefixedSlice(&b->rep_, key);
-}
-
-void WriteBatch::Delete(ColumnFamilyHandle* column_family, const Slice& key) {
-  WriteBatchInternal::Delete(this, GetColumnFamilyID(column_family), key);
-}
-
-void WriteBatchInternal::Merge(WriteBatch* b, uint32_t column_family_id,
-                               const Slice& key, const Slice& value) {
-  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
-  if (column_family_id == 0) {
-    b->rep_.push_back(static_cast<char>(kTypeMerge));
-  } else {
-    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyMerge));
-    PutVarint32(&b->rep_, column_family_id);
-  }
-  PutLengthPrefixedSlice(&b->rep_, key);
-  PutLengthPrefixedSlice(&b->rep_, value);
-}
-
-void WriteBatch::Merge(ColumnFamilyHandle* column_family, const Slice& key,
-                       const Slice& value) {
-  WriteBatchInternal::Merge(this, GetColumnFamilyID(column_family), key, value);
-}
-
-void WriteBatch::PutLogData(const Slice& blob) {
-  rep_.push_back(static_cast<char>(kTypeLogData));
-  PutLengthPrefixedSlice(&rep_, blob);
-}
-
-namespace {
-class MemTableInserter : public WriteBatch::Handler {
- public:
-  SequenceNumber sequence_;
-  ColumnFamilyMemTables* cf_mems_;
-  bool recovery_;
-  uint64_t log_number_;
-  DBImpl* db_;
-  const bool dont_filter_deletes_;
-
-  MemTableInserter(SequenceNumber sequence, ColumnFamilyMemTables* cf_mems,
-                   bool recovery, uint64_t log_number, DB* db,
-                   const bool dont_filter_deletes)
-      : sequence_(sequence),
-        cf_mems_(cf_mems),
-        recovery_(recovery),
-        log_number_(log_number),
-        db_(reinterpret_cast<DBImpl*>(db)),
-        dont_filter_deletes_(dont_filter_deletes) {
-    assert(cf_mems);
-    if (!dont_filter_deletes_) {
-      assert(db_);
-    }
-  }
-
-  bool SeekToColumnFamily(uint32_t column_family_id, Status* s) {
-    bool found = cf_mems_->Seek(column_family_id);
-    if (recovery_ && (!found || log_number_ < cf_mems_->GetLogNumber())) {
-      // if in recovery envoronment:
-      // * If column family was not found, it might mean that the WAL write
-      // batch references to the column family that was dropped after the
-      // insert. We don't want to fail the whole write batch in that case -- we
-      // just ignore the update.
-      // * If log_number_ < cf_mems_->GetLogNumber(), this means that column
-      // family already contains updates from this log. We can't apply updates
-      // twice because of update-in-place or merge workloads -- ignore the
-      // update
-      *s = Status::OK();
-      return false;
-    }
-    if (!found) {
-      assert(!recovery_);
-      // If the column family was not found in non-recovery enviornment
-      // (client's write code-path), we have to fail the write and return
-      // the failure status to the client.
-      *s = Status::InvalidArgument(
-          "Invalid column family specified in write batch");
-      return false;
-    }
-    return true;
-  }
-
-  virtual Status PutCF(uint32_t column_family_id, const Slice& key,
-                       const Slice& value) {
-    Status seek_status;
-    if (!SeekToColumnFamily(column_family_id, &seek_status)) {
-      ++sequence_;
-      return seek_status;
-    }
-    MemTable* mem = cf_mems_->GetMemTable();
-    const Options* options = cf_mems_->GetOptions();
-    if (!options->inplace_update_support) {
-      mem->Add(sequence_, kTypeValue, key, value);
-    } else if (options->inplace_callback == nullptr) {
-      mem->Update(sequence_, key, value);
-      RecordTick(options->statistics.get(), NUMBER_KEYS_UPDATED);
-    } else {
-      if (mem->UpdateCallback(sequence_, key, value, *options)) {
-      } else {
-        // key not found in memtable. Do sst get, update, add
-        SnapshotImpl read_from_snapshot;
-        read_from_snapshot.number_ = sequence_;
-        ReadOptions ropts;
-        ropts.snapshot = &read_from_snapshot;
-
-        std::string prev_value;
-        std::string merged_value;
-
-        auto cf_handle = cf_mems_->GetColumnFamilyHandle();
-        if (cf_handle == nullptr) {
-          cf_handle = db_->DefaultColumnFamily();
-        }
-        Status s = db_->Get(ropts, cf_handle, key, &prev_value);
-
-        char* prev_buffer = const_cast<char*>(prev_value.c_str());
-        uint32_t prev_size = prev_value.size();
-        auto status = options->inplace_callback(s.ok() ? prev_buffer : nullptr,
-                                                s.ok() ? &prev_size : nullptr,
-                                                value, &merged_value);
-        if (status == UpdateStatus::UPDATED_INPLACE) {
-          // prev_value is updated in-place with final value.
-          mem->Add(sequence_, kTypeValue, key, Slice(prev_buffer, prev_size));
-          RecordTick(options->statistics.get(), NUMBER_KEYS_WRITTEN);
-        } else if (status == UpdateStatus::UPDATED) {
-          // merged_value contains the final value.
-          mem->Add(sequence_, kTypeValue, key, Slice(merged_value));
-          RecordTick(options->statistics.get(), NUMBER_KEYS_WRITTEN);
-        }
-      }
-    }
-    // Since all Puts are logged in trasaction logs (if enabled), always bump
-    // sequence number. Even if the update eventually fails and does not result
-    // in memtable add/update.
-    sequence_++;
-    return Status::OK();
-  }
-
-  virtual Status MergeCF(uint32_t column_family_id, const Slice& key,
-                         const Slice& value) {
-    Status seek_status;
-    if (!SeekToColumnFamily(column_family_id, &seek_status)) {
-      ++sequence_;
-      return seek_status;
-    }
-    MemTable* mem = cf_mems_->GetMemTable();
-    const Options* options = cf_mems_->GetOptions();
-    bool perform_merge = false;
-
-    if (options->max_successive_merges > 0 && db_ != nullptr) {
-      LookupKey lkey(key, sequence_);
-
-      // Count the number of successive merges at the head
-      // of the key in the memtable
-      size_t num_merges = mem->CountSuccessiveMergeEntries(lkey);
-
-      if (num_merges >= options->max_successive_merges) {
-        perform_merge = true;
-      }
-    }
-
-    if (perform_merge) {
-      // 1) Get the existing value
-      std::string get_value;
-
-      // Pass in the sequence number so that we also include previous merge
-      // operations in the same batch.
-      SnapshotImpl read_from_snapshot;
-      read_from_snapshot.number_ = sequence_;
-      ReadOptions read_options;
-      read_options.snapshot = &read_from_snapshot;
-
-      auto cf_handle = cf_mems_->GetColumnFamilyHandle();
-      if (cf_handle == nullptr) {
-        cf_handle = db_->DefaultColumnFamily();
-      }
-      db_->Get(read_options, cf_handle, key, &get_value);
-      Slice get_value_slice = Slice(get_value);
-
-      // 2) Apply this merge
-      auto merge_operator = options->merge_operator.get();
-      assert(merge_operator);
-
-      std::deque<std::string> operands;
-      operands.push_front(value.ToString());
-      std::string new_value;
-      if (!merge_operator->FullMerge(key, &get_value_slice, operands,
-                                     &new_value, options->info_log.get())) {
-          // Failed to merge!
-        RecordTick(options->statistics.get(), NUMBER_MERGE_FAILURES);
-
-          // Store the delta in memtable
-          perform_merge = false;
-      } else {
-        // 3) Add value to memtable
-        mem->Add(sequence_, kTypeValue, key, new_value);
-      }
-    }
-
-    if (!perform_merge) {
-      // Add merge operator to memtable
-      mem->Add(sequence_, kTypeMerge, key, value);
-    }
-
-    sequence_++;
-    return Status::OK();
-  }
-
-  virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) {
-    Status seek_status;
-    if (!SeekToColumnFamily(column_family_id, &seek_status)) {
-      ++sequence_;
-      return seek_status;
-    }
-    MemTable* mem = cf_mems_->GetMemTable();
-    const Options* options = cf_mems_->GetOptions();
-    if (!dont_filter_deletes_ && options->filter_deletes) {
-      SnapshotImpl read_from_snapshot;
-      read_from_snapshot.number_ = sequence_;
-      ReadOptions ropts;
-      ropts.snapshot = &read_from_snapshot;
-      std::string value;
-      auto cf_handle = cf_mems_->GetColumnFamilyHandle();
-      if (cf_handle == nullptr) {
-        cf_handle = db_->DefaultColumnFamily();
-      }
-      if (!db_->KeyMayExist(ropts, cf_handle, key, &value)) {
-        RecordTick(options->statistics.get(), NUMBER_FILTERED_DELETES);
-        return Status::OK();
-      }
-    }
-    mem->Add(sequence_, kTypeDeletion, key, Slice());
-    sequence_++;
-    return Status::OK();
-  }
-};
-}  // namespace
-
-Status WriteBatchInternal::InsertInto(const WriteBatch* b,
-                                      ColumnFamilyMemTables* memtables,
-                                      bool recovery, uint64_t log_number,
-                                      DB* db, const bool dont_filter_deletes) {
-  MemTableInserter inserter(WriteBatchInternal::Sequence(b), memtables,
-                            recovery, log_number, db, dont_filter_deletes);
-  return b->Iterate(&inserter);
-}
-
-void WriteBatchInternal::SetContents(WriteBatch* b, const Slice& contents) {
-  assert(contents.size() >= kHeader);
-  b->rep_.assign(contents.data(), contents.size());
-}
-
-void WriteBatchInternal::Append(WriteBatch* dst, const WriteBatch* src) {
-  SetCount(dst, Count(dst) + Count(src));
-  assert(src->rep_.size() >= kHeader);
-  dst->rep_.append(src->rep_.data() + kHeader, src->rep_.size() - kHeader);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/write_batch_internal.h b/src/rocksdb/db/write_batch_internal.h
deleted file mode 100644
index 85e85b3..0000000
--- a/src/rocksdb/db/write_batch_internal.h
+++ /dev/null
@@ -1,123 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "rocksdb/types.h"
-#include "rocksdb/write_batch.h"
-#include "rocksdb/db.h"
-#include "rocksdb/options.h"
-
-namespace rocksdb {
-
-class MemTable;
-
-class ColumnFamilyMemTables {
- public:
-  virtual ~ColumnFamilyMemTables() {}
-  virtual bool Seek(uint32_t column_family_id) = 0;
-  // returns true if the update to memtable should be ignored
-  // (useful when recovering from log whose updates have already
-  // been processed)
-  virtual uint64_t GetLogNumber() const = 0;
-  virtual MemTable* GetMemTable() const = 0;
-  virtual const Options* GetOptions() const = 0;
-  virtual ColumnFamilyHandle* GetColumnFamilyHandle() = 0;
-};
-
-class ColumnFamilyMemTablesDefault : public ColumnFamilyMemTables {
- public:
-  ColumnFamilyMemTablesDefault(MemTable* mem, const Options* options)
-      : ok_(false), mem_(mem), options_(options) {}
-
-  bool Seek(uint32_t column_family_id) override {
-    ok_ = (column_family_id == 0);
-    return ok_;
-  }
-
-  uint64_t GetLogNumber() const override { return 0; }
-
-  MemTable* GetMemTable() const override {
-    assert(ok_);
-    return mem_;
-  }
-
-  const Options* GetOptions() const override {
-    assert(ok_);
-    return options_;
-  }
-
-  ColumnFamilyHandle* GetColumnFamilyHandle() override { return nullptr; }
-
- private:
-  bool ok_;
-  MemTable* mem_;
-  const Options* const options_;
-};
-
-// WriteBatchInternal provides static methods for manipulating a
-// WriteBatch that we don't want in the public WriteBatch interface.
-class WriteBatchInternal {
- public:
-  // WriteBatch methods with column_family_id instead of ColumnFamilyHandle*
-  static void Put(WriteBatch* batch, uint32_t column_family_id,
-                  const Slice& key, const Slice& value);
-
-  static void Put(WriteBatch* batch, uint32_t column_family_id,
-                  const SliceParts& key, const SliceParts& value);
-
-  static void Delete(WriteBatch* batch, uint32_t column_family_id,
-                     const Slice& key);
-
-  static void Merge(WriteBatch* batch, uint32_t column_family_id,
-                    const Slice& key, const Slice& value);
-
-  // Return the number of entries in the batch.
-  static int Count(const WriteBatch* batch);
-
-  // Set the count for the number of entries in the batch.
-  static void SetCount(WriteBatch* batch, int n);
-
-  // Return the seqeunce number for the start of this batch.
-  static SequenceNumber Sequence(const WriteBatch* batch);
-
-  // Store the specified number as the seqeunce number for the start of
-  // this batch.
-  static void SetSequence(WriteBatch* batch, SequenceNumber seq);
-
-  static Slice Contents(const WriteBatch* batch) {
-    return Slice(batch->rep_);
-  }
-
-  static size_t ByteSize(const WriteBatch* batch) {
-    return batch->rep_.size();
-  }
-
-  static void SetContents(WriteBatch* batch, const Slice& contents);
-
-  // Inserts batch entries into memtable
-  // If dont_filter_deletes is false AND options.filter_deletes is true,
-  // then --> Drops deletes in batch if db->KeyMayExist returns false
-  // If recovery == true, this means InsertInto is executed on a recovery
-  // code-path. WriteBatch referencing a dropped column family can be
-  // found on a recovery code-path and should be ignored (recovery should not
-  // fail). Additionally, the memtable will be updated only if
-  // memtables->GetLogNumber() >= log_number
-  // However, if recovery == false, any WriteBatch referencing
-  // non-existing column family will return a failure. Also, log_number is
-  // ignored in that case
-  static Status InsertInto(const WriteBatch* batch,
-                           ColumnFamilyMemTables* memtables,
-                           bool recovery = false, uint64_t log_number = 0,
-                           DB* db = nullptr,
-                           const bool dont_filter_deletes = true);
-
-  static void Append(WriteBatch* dst, const WriteBatch* src);
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/db/write_batch_test.cc b/src/rocksdb/db/write_batch_test.cc
deleted file mode 100644
index febd35c..0000000
--- a/src/rocksdb/db/write_batch_test.cc
+++ /dev/null
@@ -1,323 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/db.h"
-
-#include <memory>
-#include "db/memtable.h"
-#include "db/column_family.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/env.h"
-#include "rocksdb/memtablerep.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-static std::string PrintContents(WriteBatch* b) {
-  InternalKeyComparator cmp(BytewiseComparator());
-  auto factory = std::make_shared<SkipListFactory>();
-  Options options;
-  options.memtable_factory = factory;
-  MemTable* mem = new MemTable(cmp, options);
-  mem->Ref();
-  std::string state;
-  ColumnFamilyMemTablesDefault cf_mems_default(mem, &options);
-  Status s = WriteBatchInternal::InsertInto(b, &cf_mems_default);
-  int count = 0;
-  Iterator* iter = mem->NewIterator(ReadOptions());
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    ParsedInternalKey ikey;
-    memset((void *)&ikey, 0, sizeof(ikey));
-    ASSERT_TRUE(ParseInternalKey(iter->key(), &ikey));
-    switch (ikey.type) {
-      case kTypeValue:
-        state.append("Put(");
-        state.append(ikey.user_key.ToString());
-        state.append(", ");
-        state.append(iter->value().ToString());
-        state.append(")");
-        count++;
-        break;
-      case kTypeMerge:
-        state.append("Merge(");
-        state.append(ikey.user_key.ToString());
-        state.append(", ");
-        state.append(iter->value().ToString());
-        state.append(")");
-        count++;
-        break;
-      case kTypeDeletion:
-        state.append("Delete(");
-        state.append(ikey.user_key.ToString());
-        state.append(")");
-        count++;
-        break;
-      default:
-        assert(false);
-        break;
-    }
-    state.append("@");
-    state.append(NumberToString(ikey.sequence));
-  }
-  delete iter;
-  if (!s.ok()) {
-    state.append(s.ToString());
-  } else if (count != WriteBatchInternal::Count(b)) {
-    state.append("CountMismatch()");
-  }
-  delete mem->Unref();
-  return state;
-}
-
-class WriteBatchTest { };
-
-TEST(WriteBatchTest, Empty) {
-  WriteBatch batch;
-  ASSERT_EQ("", PrintContents(&batch));
-  ASSERT_EQ(0, WriteBatchInternal::Count(&batch));
-  ASSERT_EQ(0, batch.Count());
-}
-
-TEST(WriteBatchTest, Multiple) {
-  WriteBatch batch;
-  batch.Put(Slice("foo"), Slice("bar"));
-  batch.Delete(Slice("box"));
-  batch.Put(Slice("baz"), Slice("boo"));
-  WriteBatchInternal::SetSequence(&batch, 100);
-  ASSERT_EQ(100U, WriteBatchInternal::Sequence(&batch));
-  ASSERT_EQ(3, WriteBatchInternal::Count(&batch));
-  ASSERT_EQ("Put(baz, boo)@102"
-            "Delete(box)@101"
-            "Put(foo, bar)@100",
-            PrintContents(&batch));
-  ASSERT_EQ(3, batch.Count());
-}
-
-TEST(WriteBatchTest, Corruption) {
-  WriteBatch batch;
-  batch.Put(Slice("foo"), Slice("bar"));
-  batch.Delete(Slice("box"));
-  WriteBatchInternal::SetSequence(&batch, 200);
-  Slice contents = WriteBatchInternal::Contents(&batch);
-  WriteBatchInternal::SetContents(&batch,
-                                  Slice(contents.data(),contents.size()-1));
-  ASSERT_EQ("Put(foo, bar)@200"
-            "Corruption: bad WriteBatch Delete",
-            PrintContents(&batch));
-}
-
-TEST(WriteBatchTest, Append) {
-  WriteBatch b1, b2;
-  WriteBatchInternal::SetSequence(&b1, 200);
-  WriteBatchInternal::SetSequence(&b2, 300);
-  WriteBatchInternal::Append(&b1, &b2);
-  ASSERT_EQ("",
-            PrintContents(&b1));
-  ASSERT_EQ(0, b1.Count());
-  b2.Put("a", "va");
-  WriteBatchInternal::Append(&b1, &b2);
-  ASSERT_EQ("Put(a, va)@200",
-            PrintContents(&b1));
-  ASSERT_EQ(1, b1.Count());
-  b2.Clear();
-  b2.Put("b", "vb");
-  WriteBatchInternal::Append(&b1, &b2);
-  ASSERT_EQ("Put(a, va)@200"
-            "Put(b, vb)@201",
-            PrintContents(&b1));
-  ASSERT_EQ(2, b1.Count());
-  b2.Delete("foo");
-  WriteBatchInternal::Append(&b1, &b2);
-  ASSERT_EQ("Put(a, va)@200"
-            "Put(b, vb)@202"
-            "Put(b, vb)@201"
-            "Delete(foo)@203",
-            PrintContents(&b1));
-  ASSERT_EQ(4, b1.Count());
-}
-
-namespace {
-  struct TestHandler : public WriteBatch::Handler {
-    std::string seen;
-    virtual Status PutCF(uint32_t column_family_id, const Slice& key,
-                       const Slice& value) {
-      if (column_family_id == 0) {
-        seen += "Put(" + key.ToString() + ", " + value.ToString() + ")";
-      } else {
-        seen += "PutCF(" + std::to_string(column_family_id) + ", " +
-                key.ToString() + ", " + value.ToString() + ")";
-      }
-      return Status::OK();
-    }
-    virtual Status MergeCF(uint32_t column_family_id, const Slice& key,
-                         const Slice& value) {
-      if (column_family_id == 0) {
-        seen += "Merge(" + key.ToString() + ", " + value.ToString() + ")";
-      } else {
-        seen += "MergeCF(" + std::to_string(column_family_id) + ", " +
-                key.ToString() + ", " + value.ToString() + ")";
-      }
-      return Status::OK();
-    }
-    virtual void LogData(const Slice& blob) {
-      seen += "LogData(" + blob.ToString() + ")";
-    }
-    virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) {
-      if (column_family_id == 0) {
-        seen += "Delete(" + key.ToString() + ")";
-      } else {
-        seen += "DeleteCF(" + std::to_string(column_family_id) + ", " +
-                key.ToString() + ")";
-      }
-      return Status::OK();
-    }
-  };
-}
-
-TEST(WriteBatchTest, Blob) {
-  WriteBatch batch;
-  batch.Put(Slice("k1"), Slice("v1"));
-  batch.Put(Slice("k2"), Slice("v2"));
-  batch.Put(Slice("k3"), Slice("v3"));
-  batch.PutLogData(Slice("blob1"));
-  batch.Delete(Slice("k2"));
-  batch.PutLogData(Slice("blob2"));
-  batch.Merge(Slice("foo"), Slice("bar"));
-  ASSERT_EQ(5, batch.Count());
-  ASSERT_EQ("Merge(foo, bar)@4"
-            "Put(k1, v1)@0"
-            "Delete(k2)@3"
-            "Put(k2, v2)@1"
-            "Put(k3, v3)@2",
-            PrintContents(&batch));
-
-  TestHandler handler;
-  batch.Iterate(&handler);
-  ASSERT_EQ(
-            "Put(k1, v1)"
-            "Put(k2, v2)"
-            "Put(k3, v3)"
-            "LogData(blob1)"
-            "Delete(k2)"
-            "LogData(blob2)"
-            "Merge(foo, bar)",
-            handler.seen);
-}
-
-TEST(WriteBatchTest, Continue) {
-  WriteBatch batch;
-
-  struct Handler : public TestHandler {
-    int num_seen = 0;
-    virtual Status PutCF(uint32_t column_family_id, const Slice& key,
-                       const Slice& value) {
-      ++num_seen;
-      return TestHandler::PutCF(column_family_id, key, value);
-    }
-    virtual Status MergeCF(uint32_t column_family_id, const Slice& key,
-                         const Slice& value) {
-      ++num_seen;
-      return TestHandler::MergeCF(column_family_id, key, value);
-    }
-    virtual void LogData(const Slice& blob) {
-      ++num_seen;
-      TestHandler::LogData(blob);
-    }
-    virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) {
-      ++num_seen;
-      return TestHandler::DeleteCF(column_family_id, key);
-    }
-    virtual bool Continue() override {
-      return num_seen < 3;
-    }
-  } handler;
-
-  batch.Put(Slice("k1"), Slice("v1"));
-  batch.PutLogData(Slice("blob1"));
-  batch.Delete(Slice("k1"));
-  batch.PutLogData(Slice("blob2"));
-  batch.Merge(Slice("foo"), Slice("bar"));
-  batch.Iterate(&handler);
-  ASSERT_EQ(
-            "Put(k1, v1)"
-            "LogData(blob1)"
-            "Delete(k1)",
-            handler.seen);
-}
-
-TEST(WriteBatchTest, PutGatherSlices) {
-  WriteBatch batch;
-  batch.Put(Slice("foo"), Slice("bar"));
-
-  {
-    // Try a write where the key is one slice but the value is two
-    Slice key_slice("baz");
-    Slice value_slices[2] = { Slice("header"), Slice("payload") };
-    batch.Put(SliceParts(&key_slice, 1),
-              SliceParts(value_slices, 2));
-  }
-
-  {
-    // One where the key is composite but the value is a single slice
-    Slice key_slices[3] = { Slice("key"), Slice("part2"), Slice("part3") };
-    Slice value_slice("value");
-    batch.Put(SliceParts(key_slices, 3),
-              SliceParts(&value_slice, 1));
-  }
-
-  WriteBatchInternal::SetSequence(&batch, 100);
-  ASSERT_EQ("Put(baz, headerpayload)@101"
-            "Put(foo, bar)@100"
-            "Put(keypart2part3, value)@102",
-            PrintContents(&batch));
-  ASSERT_EQ(3, batch.Count());
-}
-
-namespace {
-class ColumnFamilyHandleImplDummy : public ColumnFamilyHandleImpl {
- public:
-  explicit ColumnFamilyHandleImplDummy(int id)
-      : ColumnFamilyHandleImpl(nullptr, nullptr, nullptr), id_(id) {}
-  uint32_t GetID() const override { return id_; }
-
- private:
-  uint32_t id_;
-};
-}  // namespace anonymous
-
-TEST(WriteBatchTest, ColumnFamiliesBatchTest) {
-  WriteBatch batch;
-  ColumnFamilyHandleImplDummy zero(0), two(2), three(3), eight(8);
-  batch.Put(&zero, Slice("foo"), Slice("bar"));
-  batch.Put(&two, Slice("twofoo"), Slice("bar2"));
-  batch.Put(&eight, Slice("eightfoo"), Slice("bar8"));
-  batch.Delete(&eight, Slice("eightfoo"));
-  batch.Merge(&three, Slice("threethree"), Slice("3three"));
-  batch.Put(&zero, Slice("foo"), Slice("bar"));
-  batch.Merge(Slice("omom"), Slice("nom"));
-
-  TestHandler handler;
-  batch.Iterate(&handler);
-  ASSERT_EQ(
-      "Put(foo, bar)"
-      "PutCF(2, twofoo, bar2)"
-      "PutCF(8, eightfoo, bar8)"
-      "DeleteCF(8, eightfoo)"
-      "MergeCF(3, threethree, 3three)"
-      "Put(foo, bar)"
-      "Merge(omom, nom)",
-      handler.seen);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/doc/doc.css b/src/rocksdb/doc/doc.css
deleted file mode 100644
index 700c564..0000000
--- a/src/rocksdb/doc/doc.css
+++ /dev/null
@@ -1,89 +0,0 @@
-body {
-  margin-left: 0.5in;
-  margin-right: 0.5in;
-  background: white;
-  color: black;
-}
-
-h1 {
-  margin-left: -0.2in;
-  font-size: 14pt;
-}
-h2 {
-  margin-left: -0in;
-  font-size: 12pt;
-}
-h3 {
-  margin-left: -0in;
-}
-h4 {
-  margin-left: -0in;
-}
-hr {
-  margin-left: -0in;
-}
-
-/* Definition lists: definition term bold */
-dt {
-  font-weight: bold;
-}
-
-address {
-  text-align: center;
-}
-code,samp,var {
-  color: blue;
-}
-kbd {
-  color: #600000;
-}
-div.note p {
-  float: right;
-  width: 3in;
-  margin-right: 0%;
-  padding: 1px;
-  border: 2px solid #6060a0;
-  background-color: #fffff0;
-}
-
-ul {
-  margin-top: -0em;
-  margin-bottom: -0em;
-}
-
-ol {
-  margin-top: -0em;
-  margin-bottom: -0em;
-}
-
-UL.nobullets {
-  list-style-type: none;
-  list-style-image: none;
-  margin-left: -1em;
-}
-
-p {
-  margin: 1em 0 1em 0;
-  padding: 0 0 0 0;
-}
-
-pre {
-  line-height: 1.3em;
-  padding: 0.4em 0 0.8em 0;
-  margin:  0 0 0 0;
-  border:  0 0 0 0;
-  color: blue;
-}
-
-.datatable {
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: 2em;
-  margin-bottom: 2em;
-  border: 1px solid;
-}
-
-.datatable td,th {
-  padding: 0 0.5em 0 0.5em;
-  text-align: right;
-}
diff --git a/src/rocksdb/doc/index.html b/src/rocksdb/doc/index.html
deleted file mode 100644
index 71f515e..0000000
--- a/src/rocksdb/doc/index.html
+++ /dev/null
@@ -1,831 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="doc.css" />
-<title>RocksDB</title>
-</head>
-
-<body>
-<h1>RocksDB</h1>
-<address>The Facebook Database Engineering Team</address>
-<address>Build on earlier work on leveldb by Sanjay Ghemawat
-               (sanjay at google.com) and Jeff Dean (jeff at google.com)</address>
-<p>
-The <code>rocksdb</code> library provides a persistent key value store.  Keys and
-values are arbitrary byte arrays.  The keys are ordered within the key
-value store according to a user-specified comparator function.
-
-<p>
-<h1>Opening A Database</h1>
-<p>
-A <code>rocksdb</code> database has a name which corresponds to a file system
-directory.  All of the contents of database are stored in this
-directory.  The following example shows how to open a database,
-creating it if necessary:
-<p>
-<pre>
-  #include <assert>
-  #include "rocksdb/db.h"
-
-  rocksdb::DB* db;
-  rocksdb::Options options;
-  options.create_if_missing = true;
-  rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/testdb", &db);
-  assert(status.ok());
-  ...
-</pre>
-If you want to raise an error if the database already exists, add
-the following line before the <code>rocksdb::DB::Open</code> call:
-<pre>
-  options.error_if_exists = true;
-</pre>
-<h1>Status</h1>
-<p>
-You may have noticed the <code>rocksdb::Status</code> type above.  Values of this
-type are returned by most functions in <code>rocksdb</code> that may encounter an
-error.  You can check if such a result is ok, and also print an
-associated error message:
-<p>
-<pre>
-   rocksdb::Status s = ...;
-   if (!s.ok()) cerr << s.ToString() << endl;
-</pre>
-<h1>Closing A Database</h1>
-<p>
-When you are done with a database, just delete the database object.
-Example:
-<p>
-<pre>
-  ... open the db as described above ...
-  ... do something with db ...
-  delete db;
-</pre>
-<h1>Reads And Writes</h1>
-<p>
-The database provides <code>Put</code>, <code>Delete</code>, and <code>Get</code> methods to
-modify/query the database.  For example, the following code
-moves the value stored under key1 to key2.
-<pre>
-  std::string value;
-  rocksdb::Status s = db->Get(rocksdb::ReadOptions(), key1, &value);
-  if (s.ok()) s = db->Put(rocksdb::WriteOptions(), key2, value);
-  if (s.ok()) s = db->Delete(rocksdb::WriteOptions(), key1);
-</pre>
-
-<h1>Atomic Updates</h1>
-<p>
-Note that if the process dies after the Put of key2 but before the
-delete of key1, the same value may be left stored under multiple keys.
-Such problems can be avoided by using the <code>WriteBatch</code> class to
-atomically apply a set of updates:
-<p>
-<pre>
-  #include "rocksdb/write_batch.h"
-  ...
-  std::string value;
-  rocksdb::Status s = db->Get(rocksdb::ReadOptions(), key1, &value);
-  if (s.ok()) {
-    rocksdb::WriteBatch batch;
-    batch.Delete(key1);
-    batch.Put(key2, value);
-    s = db->Write(rocksdb::WriteOptions(), &batch);
-  }
-</pre>
-The <code>WriteBatch</code> holds a sequence of edits to be made to the database,
-and these edits within the batch are applied in order.  Note that we
-called <code>Delete</code> before <code>Put</code> so that if <code>key1</code> is identical to <code>key2</code>,
-we do not end up erroneously dropping the value entirely.
-<p>
-Apart from its atomicity benefits, <code>WriteBatch</code> may also be used to
-speed up bulk updates by placing lots of individual mutations into the
-same batch.
-
-<h1>Synchronous Writes</h1>
-By default, each write to <code>leveldb</code> is asynchronous: it
-returns after pushing the write from the process into the operating
-system.  The transfer from operating system memory to the underlying
-persistent storage happens asynchronously.  The <code>sync</code> flag
-can be turned on for a particular write to make the write operation
-not return until the data being written has been pushed all the way to
-persistent storage.  (On Posix systems, this is implemented by calling
-either <code>fsync(...)</code> or <code>fdatasync(...)</code> or
-<code>msync(..., MS_SYNC)</code> before the write operation returns.)
-<pre>
-  rocksdb::WriteOptions write_options;
-  write_options.sync = true;
-  db->Put(write_options, ...);
-</pre>
-Asynchronous writes are often more than a thousand times as fast as
-synchronous writes.  The downside of asynchronous writes is that a
-crash of the machine may cause the last few updates to be lost.  Note
-that a crash of just the writing process (i.e., not a reboot) will not
-cause any loss since even when <code>sync</code> is false, an update
-is pushed from the process memory into the operating system before it
-is considered done.
-
-<p>
-Asynchronous writes can often be used safely.  For example, when
-loading a large amount of data into the database you can handle lost
-updates by restarting the bulk load after a crash.  A hybrid scheme is
-also possible where every Nth write is synchronous, and in the event
-of a crash, the bulk load is restarted just after the last synchronous
-write finished by the previous run.  (The synchronous write can update
-a marker that describes where to restart on a crash.)
-
-<p>
-<code>WriteBatch</code> provides an alternative to asynchronous writes.
-Multiple updates may be placed in the same <code>WriteBatch</code> and
-applied together using a synchronous write (i.e.,
-<code>write_options.sync</code> is set to true).  The extra cost of
-the synchronous write will be amortized across all of the writes in
-the batch.
-
-<p>
-We also provide a way to completely disable Write Ahead Log for a
-particular write. If you set write_option.disableWAL to true, the
-write will not go to the log at all and may be lost in an event of
-process crash.
-
-<p>
-When opening a DB, you can disable syncing of data files by setting
-Options::disableDataSync to true. This can be useful when doing
-bulk-loading or big idempotent operations. Once the operation is
-finished, you can manually call sync() to flush all dirty buffers
-to stable storage.
-
-<p>
-RocksDB by default uses faster fdatasync() to sync files. If you want
-to use fsync(), you can set Options::use_fsync to true. You should set
-this to true on filesystems like ext3 that can lose files after a
-reboot.
-
-<p>
-<h1>Concurrency</h1>
-<p>
-A database may only be opened by one process at a time.
-The <code>rocksdb</code> implementation acquires a lock from the
-operating system to prevent misuse.  Within a single process, the
-same <code>rocksdb::DB</code> object may be safely shared by multiple
-concurrent threads.  I.e., different threads may write into or fetch
-iterators or call <code>Get</code> on the same database without any
-external synchronization (the leveldb implementation will
-automatically do the required synchronization).  However other objects
-(like Iterator and WriteBatch) may require external synchronization.
-If two threads share such an object, they must protect access to it
-using their own locking protocol.  More details are available in
-the public header files.
-
-<p>
-<h1>Merge operators</h1>
-<p>
-Merge operators provide efficient support for read-modify-write operation.
-More on the interface and implementation can be found on:
-<p>
-<a href="https://github.com/facebook/rocksdb/wiki/Merge-Operator">
-    Merge Operator</a>
-<p>
-<a href="https://github.com/facebook/rocksdb/wiki/Merge-Operator-Implementation">
-    Merge Operator Implementation</a>
-
-<p>
-<h1>Iteration</h1>
-<p>
-The following example demonstrates how to print all key,value pairs
-in a database.
-<p>
-<pre>
-  rocksdb::Iterator* it = db->NewIterator(rocksdb::ReadOptions());
-  for (it->SeekToFirst(); it->Valid(); it->Next()) {
-    cout << it->key().ToString() << ": "  << it->value().ToString() << endl;
-  }
-  assert(it->status().ok());  // Check for any errors found during the scan
-  delete it;
-</pre>
-The following variation shows how to process just the keys in the
-range <code>[start,limit)</code>:
-<p>
-<pre>
-  for (it->Seek(start);
-       it->Valid() && it->key().ToString() < limit;
-       it->Next()) {
-    ...
-  }
-</pre>
-You can also process entries in reverse order.  (Caveat: reverse
-iteration may be somewhat slower than forward iteration.)
-<p>
-<pre>
-  for (it->SeekToLast(); it->Valid(); it->Prev()) {
-    ...
-  }
-</pre>
-<h1>Snapshots</h1>
-<p>
-Snapshots provide consistent read-only views over the entire state of
-the key-value store.  <code>ReadOptions::snapshot</code> may be non-NULL to indicate
-that a read should operate on a particular version of the DB state.
-If <code>ReadOptions::snapshot</code> is NULL, the read will operate on an
-implicit snapshot of the current state.
-<p>
-Snapshots are created by the DB::GetSnapshot() method:
-<p>
-<pre>
-  rocksdb::ReadOptions options;
-  options.snapshot = db->GetSnapshot();
-  ... apply some updates to db ...
-  rocksdb::Iterator* iter = db->NewIterator(options);
-  ... read using iter to view the state when the snapshot was created ...
-  delete iter;
-  db->ReleaseSnapshot(options.snapshot);
-</pre>
-Note that when a snapshot is no longer needed, it should be released
-using the DB::ReleaseSnapshot interface.  This allows the
-implementation to get rid of state that was being maintained just to
-support reading as of that snapshot.
-<h1>Slice</h1>
-<p>
-The return value of the <code>it->key()</code> and <code>it->value()</code> calls above
-are instances of the <code>rocksdb::Slice</code> type.  <code>Slice</code> is a simple
-structure that contains a length and a pointer to an external byte
-array.  Returning a <code>Slice</code> is a cheaper alternative to returning a
-<code>std::string</code> since we do not need to copy potentially large keys and
-values.  In addition, <code>rocksdb</code> methods do not return null-terminated
-C-style strings since <code>rocksdb</code> keys and values are allowed to
-contain '\0' bytes.
-<p>
-C++ strings and null-terminated C-style strings can be easily converted
-to a Slice:
-<p>
-<pre>
-   rocksdb::Slice s1 = "hello";
-
-   std::string str("world");
-   rocksdb::Slice s2 = str;
-</pre>
-A Slice can be easily converted back to a C++ string:
-<pre>
-   std::string str = s1.ToString();
-   assert(str == std::string("hello"));
-</pre>
-Be careful when using Slices since it is up to the caller to ensure that
-the external byte array into which the Slice points remains live while
-the Slice is in use.  For example, the following is buggy:
-<p>
-<pre>
-   rocksdb::Slice slice;
-   if (...) {
-     std::string str = ...;
-     slice = str;
-   }
-   Use(slice);
-</pre>
-When the <code>if</code> statement goes out of scope, <code>str</code> will be destroyed and the
-backing storage for <code>slice</code> will disappear.
-<p>
-<h1>Comparators</h1>
-<p>
-The preceding examples used the default ordering function for key,
-which orders bytes lexicographically.  You can however supply a custom
-comparator when opening a database.  For example, suppose each
-database key consists of two numbers and we should sort by the first
-number, breaking ties by the second number.  First, define a proper
-subclass of <code>rocksdb::Comparator</code> that expresses these rules:
-<p>
-<pre>
-  class TwoPartComparator : public rocksdb::Comparator {
-   public:
-    // Three-way comparison function:
-    //   if a < b: negative result
-    //   if a > b: positive result
-    //   else: zero result
-    int Compare(const rocksdb::Slice& a, const rocksdb::Slice& b) const {
-      int a1, a2, b1, b2;
-      ParseKey(a, &a1, &a2);
-      ParseKey(b, &b1, &b2);
-      if (a1 < b1) return -1;
-      if (a1 > b1) return +1;
-      if (a2 < b2) return -1;
-      if (a2 > b2) return +1;
-      return 0;
-    }
-
-    // Ignore the following methods for now:
-    const char* Name() const { return "TwoPartComparator"; }
-    void FindShortestSeparator(std::string*, const rocksdb::Slice&) const { }
-    void FindShortSuccessor(std::string*) const { }
-  };
-</pre>
-Now create a database using this custom comparator:
-<p>
-<pre>
-  TwoPartComparator cmp;
-  rocksdb::DB* db;
-  rocksdb::Options options;
-  options.create_if_missing = true;
-  options.comparator = &cmp;
-  rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/testdb", &db);
-  ...
-</pre>
-<h2>Backwards compatibility</h2>
-<p>
-The result of the comparator's <code>Name</code> method is attached to the
-database when it is created, and is checked on every subsequent
-database open.  If the name changes, the <code>rocksdb::DB::Open</code> call will
-fail.  Therefore, change the name if and only if the new key format
-and comparison function are incompatible with existing databases, and
-it is ok to discard the contents of all existing databases.
-<p>
-You can however still gradually evolve your key format over time with
-a little bit of pre-planning.  For example, you could store a version
-number at the end of each key (one byte should suffice for most uses).
-When you wish to switch to a new key format (e.g., adding an optional
-third part to the keys processed by <code>TwoPartComparator</code>),
-(a) keep the same comparator name (b) increment the version number
-for new keys (c) change the comparator function so it uses the
-version numbers found in the keys to decide how to interpret them.
-
-
-<p>
-<h1>MemTable and Table factories</h1>
-<p>
-By default, we keep the data in memory in skiplist memtable and the data
-on disk in a table format described here:
-<a href="https://github.com/facebook/rocksdb/wiki/Rocksdb-Table-Format">
-    RocksDB Table Format</a>.
-<p>
-Since one of the goals of RocksDB is to have
-different parts of the system easily pluggable, we support different
-implementations of both memtable and table format. You can supply
-your own memtable factory by setting <code>Options::memtable_factory</code>
-and your own table factory by setting <code>Options::table_factory</code>.
-For available memtable factories, please refer to
-<code>rocksdb/memtablerep.h</code> and for table factores to
-<code>rocksdb/table.h</code>. These features are both in active development
-and please be wary of any API changes that might break your application
-going forward.
-<p>
-You can also read more about memtables here:
-<a href="https://github.com/facebook/rocksdb/wiki/Rocksdb-Architecture-Guide#memtables">
-Memtables wiki
-</a>
-
-<p>
-<h1>Performance</h1>
-<p>
-Performance can be tuned by changing the default values of the
-types defined in <code>include/rocksdb/options.h</code>.
-
-<p>
-<h2>Block size</h2>
-<p>
-<code>rocksdb</code> groups adjacent keys together into the same block and such a
-block is the unit of transfer to and from persistent storage.  The
-default block size is approximately 4096 uncompressed bytes.
-Applications that mostly do bulk scans over the contents of the
-database may wish to increase this size.  Applications that do a lot
-of point reads of small values may wish to switch to a smaller block
-size if performance measurements indicate an improvement.  There isn't
-much benefit in using blocks smaller than one kilobyte, or larger than
-a few megabytes.  Also note that compression will be more effective
-with larger block sizes. To change block size parameter, use
-<code>Options::block_size</code>.
-<p>
-<h2>Write buffer</h2>
-<p>
-<code>Options::write_buffer_size</code> specifies the amount of data
-to build up in memory before converting to a sorted on-disk file.
-Larger values increase performance, especially during bulk loads.
-Up to max_write_buffer_number write buffers may be held in memory
-at the same time,
-so you may wish to adjust this parameter to control memory usage.
-Also, a larger write buffer will result in a longer recovery time
-the next time the database is opened.
-Related option is
-<code>Options::max_write_buffer_number</code>, which is maximum number
-of write buffers that are built up in memory. The default is 2, so that
-when 1 write buffer is being flushed to storage, new writes can continue
-to the other write buffer.
-<code>Options::min_write_buffer_number_to_merge</code> is the minimum number
-of write buffers that will be merged together before writing to storage.
-If set to 1, then all write buffers are flushed to L0 as individual files and
-this increases read amplification because a get request has to check in all
-of these files. Also, an in-memory merge may result in writing lesser
-data to storage if there are duplicate records in each of these
-individual write buffers.  Default: 1
-<p>
-<h2>Compression</h2>
-<p>
-Each block is individually compressed before being written to
-persistent storage.  Compression is on by default since the default
-compression method is very fast, and is automatically disabled for
-uncompressible data.  In rare cases, applications may want to disable
-compression entirely, but should only do so if benchmarks show a
-performance improvement:
-<p>
-<pre>
-  rocksdb::Options options;
-  options.compression = rocksdb::kNoCompression;
-  ... rocksdb::DB::Open(options, name, ...) ....
-</pre>
-<h2>Cache</h2>
-<p>
-The contents of the database are stored in a set of files in the
-filesystem and each file stores a sequence of compressed blocks.  If
-<code>options.block_cache</code> is non-NULL, it is used to cache frequently
-used uncompressed block contents. If <code>options.block_cache_compressed</code>
-is non-NULL, it is used to cache frequently used compressed blocks. Compressed
-cache is an alternative to OS cache, which also caches compressed blocks. If
-compressed cache is used, the OS cache will be disabled automatically by setting
-<code>options.allow_os_buffer</code> to false.
-<p>
-<pre>
-  #include "rocksdb/cache.h"
-
-  rocksdb::Options options;
-  options.block_cache = rocksdb::NewLRUCache(100 * 1048576);  // 100MB uncompressed cache
-  options.block_cache_compressed = rocksdb::NewLRUCache(100 * 1048576);  // 100MB compressed cache
-  rocksdb::DB* db;
-  rocksdb::DB::Open(options, name, &db);
-  ... use the db ...
-  delete db
-  delete options.block_cache;
-  delete options.block_cache_compressed;
-</pre>
-<p>
-When performing a bulk read, the application may wish to disable
-caching so that the data processed by the bulk read does not end up
-displacing most of the cached contents.  A per-iterator option can be
-used to achieve this:
-<p>
-<pre>
-  rocksdb::ReadOptions options;
-  options.fill_cache = false;
-  rocksdb::Iterator* it = db->NewIterator(options);
-  for (it->SeekToFirst(); it->Valid(); it->Next()) {
-    ...
-  }
-</pre>
-<p>
-You can also disable block cache by setting <code>options.no_block_cache</code>
-to true.
-<h2>Key Layout</h2>
-<p>
-Note that the unit of disk transfer and caching is a block.  Adjacent
-keys (according to the database sort order) will usually be placed in
-the same block.  Therefore the application can improve its performance
-by placing keys that are accessed together near each other and placing
-infrequently used keys in a separate region of the key space.
-<p>
-For example, suppose we are implementing a simple file system on top
-of <code>rocksdb</code>.  The types of entries we might wish to store are:
-<p>
-<pre>
-   filename -> permission-bits, length, list of file_block_ids
-   file_block_id -> data
-</pre>
-We might want to prefix <code>filename</code> keys with one letter (say '/') and the
-<code>file_block_id</code> keys with a different letter (say '0') so that scans
-over just the metadata do not force us to fetch and cache bulky file
-contents.
-<p>
-<h2>Filters</h2>
-<p>
-Because of the way <code>rocksdb</code> data is organized on disk,
-a single <code>Get()</code> call may involve multiple reads from disk.
-The optional <code>FilterPolicy</code> mechanism can be used to reduce
-the number of disk reads substantially.
-<pre>
-   rocksdb::Options options;
-   options.filter_policy = NewBloomFilter(10);
-   rocksdb::DB* db;
-   rocksdb::DB::Open(options, "/tmp/testdb", &db);
-   ... use the database ...
-   delete db;
-   delete options.filter_policy;
-</pre>
-The preceding code associates a
-<a href="http://en.wikipedia.org/wiki/Bloom_filter">Bloom filter</a>
-based filtering policy with the database.  Bloom filter based
-filtering relies on keeping some number of bits of data in memory per
-key (in this case 10 bits per key since that is the argument we passed
-to NewBloomFilter).  This filter will reduce the number of unnecessary
-disk reads needed for <code>Get()</code> calls by a factor of
-approximately a 100.  Increasing the bits per key will lead to a
-larger reduction at the cost of more memory usage.  We recommend that
-applications whose working set does not fit in memory and that do a
-lot of random reads set a filter policy.
-<p>
-If you are using a custom comparator, you should ensure that the filter
-policy you are using is compatible with your comparator.  For example,
-consider a comparator that ignores trailing spaces when comparing keys.
-<code>NewBloomFilter</code> must not be used with such a comparator.
-Instead, the application should provide a custom filter policy that
-also ignores trailing spaces.  For example:
-<pre>
-  class CustomFilterPolicy : public rocksdb::FilterPolicy {
-   private:
-    FilterPolicy* builtin_policy_;
-   public:
-    CustomFilterPolicy() : builtin_policy_(NewBloomFilter(10)) { }
-    ~CustomFilterPolicy() { delete builtin_policy_; }
-
-    const char* Name() const { return "IgnoreTrailingSpacesFilter"; }
-
-    void CreateFilter(const Slice* keys, int n, std::string* dst) const {
-      // Use builtin bloom filter code after removing trailing spaces
-      std::vector<Slice> trimmed(n);
-      for (int i = 0; i < n; i++) {
-        trimmed[i] = RemoveTrailingSpaces(keys[i]);
-      }
-      return builtin_policy_->CreateFilter(&trimmed[i], n, dst);
-    }
-
-    bool KeyMayMatch(const Slice& key, const Slice& filter) const {
-      // Use builtin bloom filter code after removing trailing spaces
-      return builtin_policy_->KeyMayMatch(RemoveTrailingSpaces(key), filter);
-    }
-  };
-</pre>
-<p>
-Advanced applications may provide a filter policy that does not use
-a bloom filter but uses some other mechanism for summarizing a set
-of keys.  See <code>rocksdb/filter_policy.h</code> for detail.
-<p>
-<h1>Checksums</h1>
-<p>
-<code>rocksdb</code> associates checksums with all data it stores in the file system.
-There are two separate controls provided over how aggressively these
-checksums are verified:
-<p>
-<ul>
-<li> <code>ReadOptions::verify_checksums</code> may be set to true to force
-  checksum verification of all data that is read from the file system on
-  behalf of a particular read.  By default, no such verification is
-  done.
-<p>
-<li> <code>Options::paranoid_checks</code> may be set to true before opening a
-  database to make the database implementation raise an error as soon as
-  it detects an internal corruption.  Depending on which portion of the
-  database has been corrupted, the error may be raised when the database
-  is opened, or later by another database operation.  By default,
-  paranoid checking is off so that the database can be used even if
-  parts of its persistent storage have been corrupted.
-<p>
-  If a database is corrupted (perhaps it cannot be opened when
-  paranoid checking is turned on), the <code>rocksdb::RepairDB</code> function
-  may be used to recover as much of the data as possible.
-<p>
-</ul>
-
-<p>
-<h1>Compaction</h1>
-<p>
-You can read more on Compactions here:
-<a href="https://github.com/facebook/rocksdb/wiki/Rocksdb-Architecture-Guide#multi-threaded-compactions">
-    Multi-threaded compactions
-</a>
-<p>
-Here we give overview of the options that impact behavior of Compactions:
-<ul>
-<p>
-<li><code>Options::compaction_style</code> - RocksDB currently supports two
-compaction algorithms - Universal  style and Level style. This option switches
-between the two.  Can be kCompactionStyleUniversal or kCompactionStyleLevel.
-If this is kCompactionStyleUniversal, then you can configure universal style
-parameters with <code>Options::compaction_options_universal</code>.
-<p>
-<li><code>Options::disable_auto_compactions</code> - Disable automatic compactions.
-Manual compactions can still be issued on this database.
-<p>
-<li><code>Options::compaction_filter</code> - Allows an application to modify/delete
-a key-value during background compaction. The client must provide
-compaction_filter_factory if it requires a new compaction filter to be used
-for different compaction processes. Client should specify only one of filter
-or factory.
-<p>
-<li><code>Options::compaction_filter_factory</code> - a factory that provides
-compaction filter objects which allow an application to modify/delete a
-key-value during background compaction.
-</ul>
-<p>
-Other options impacting performance of compactions and when they get triggered
-are:
-<ul>
-<p>
-<li> <code>Options::access_hint_on_compaction_start</code> - Specify the file access
-pattern once a compaction is started. It will be applied to all input files of a compaction. Default: NORMAL
-<p>
-<li> <code>Options::level0_file_num_compaction_trigger</code> -  Number of files to trigger level-0 compaction.
-A negative value means that level-0 compaction will not be triggered by number of files at all.
-<p>
-<li> <code>Options::max_mem_compaction_level</code> -  Maximum level to which a new compacted memtable is pushed if it
-does not create overlap.  We try to push to level 2 to avoid the relatively expensive level 0=>1 compactions and to avoid some
-expensive manifest file operations.  We do not push all the way to the largest level since that can generate a lot of wasted disk
-space if the same key space is being repeatedly overwritten.
-<p>
-<li> <code>Options::target_file_size_base</code> and <code>Options::target_file_size_multiplier</code> -
-Target file size for compaction.  target_file_size_base is per-file size for level-1.
-Target file size for level L can be calculated by target_file_size_base * (target_file_size_multiplier ^ (L-1))
-For example, if target_file_size_base is 2MB and target_file_size_multiplier is 10, then each file on level-1 will
-be 2MB, and each file on level 2 will be 20MB, and each file on level-3 will be 200MB. Default target_file_size_base is 2MB
-and default target_file_size_multiplier is 1.
-<p>
-<li> <code>Options::expanded_compaction_factor</code> -  Maximum number of bytes in all compacted files.  We avoid expanding
-the lower level file set of a compaction if it would make the total compaction cover more than
-(expanded_compaction_factor * targetFileSizeLevel()) many bytes.
-<p>
-<li> <code>Options::source_compaction_factor</code> -    Maximum number of bytes in all source files to be compacted in a
-single compaction run. We avoid picking too many files in the source level so that we do not exceed the total source bytes
-for compaction to exceed (source_compaction_factor * targetFileSizeLevel()) many bytes.
-Default:1, i.e. pick maxfilesize amount of data as the source of a compaction.
-<p>
-<li> <code>Options::max_grandparent_overlap_factor</code> -   Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
-stop building a single file in a level->level+1 compaction.
-<p>
-<li> <code>Options::disable_seek_compaction</code> -  Disable compaction triggered by seek.
-With bloomfilter and fast storage, a miss on one level is very cheap if the file handle is cached in table cache
-(which is true if max_open_files is large).
-<p>
-<li> <code>Options::max_background_compactions</code> - Maximum number of concurrent background jobs, submitted to
-the default LOW priority thread pool
-</ul>
-
-<p>
-You can learn more about all of those options in <code>rocksdb/options.h</code>
-
-<h2> Universal style compaction specific settings</h2>
-<p>
-If you're using Universal style compaction, there is an object <code>CompactionOptionsUniversal</code>
-that hold all the different options for that compaction. The exact definition is in
-<code>rocksdb/universal_compaction.h</code> and you can set it in <code>Options::compaction_options_universal</code>.
-Here we give short overview of options in <code>CompactionOptionsUniversal</code>:
-<ul>
-<p>
-<li> <code>CompactionOptionsUniversal::size_ratio</code> - Percentage flexibility while comparing file size. If the candidate file(s)
-   size is 1% smaller than the next file's size, then include next file into
-   this candidate set.  Default: 1
-<p>
-<li> <code>CompactionOptionsUniversal::min_merge_width</code> - The minimum number of files in a single compaction run. Default: 2
-<p>
-<li> <code>CompactionOptionsUniversal::max_merge_width</code> - The maximum number of files in a single compaction run. Default: UINT_MAX
-<p>
-<li> <code>CompactionOptionsUniversal::max_size_amplification_percent</code> - The size amplification is defined as the amount (in percentage) of
-additional storage needed to store a single byte of data in the database.  For example, a size amplification of 2% means that a database that
-contains 100 bytes of user-data may occupy upto 102 bytes of physical storage. By this definition, a fully compacted database has
-a size amplification of 0%. Rocksdb uses the following heuristic to calculate size amplification: it assumes that all files excluding
-the earliest file contribute to the size amplification.  Default: 200, which means that a 100 byte database could require upto
-300 bytes of storage.
-<p>
-<li> <code>CompactionOptionsUniversal::compression_size_percent</code> - If this option is set to be -1 (the default value), all the output files
-will follow compression type specified.  If this option is not negative, we will try to make sure compressed
-size is just above this value. In normal cases, at least this percentage
-of data will be compressed.
-When we are compacting to a new file, here is the criteria whether
-it needs to be compressed: assuming here are the list of files sorted
-by generation time: [ A1...An B1...Bm C1...Ct ],
-where A1 is the newest and Ct is the oldest, and we are going to compact
-B1...Bm, we calculate the total size of all the files as total_size, as
-well as  the total size of C1...Ct as total_C, the compaction output file
-will be compressed iff total_C / total_size < this percentage
-<p>
-<li> <code>CompactionOptionsUniversal::stop_style</code> - The algorithm used to stop picking files into a single compaction run.
-Can be kCompactionStopStyleSimilarSize (pick files of similar size) or kCompactionStopStyleTotalSize (total size of picked files > next file).
-Default: kCompactionStopStyleTotalSize
-</ul>
-
-<h1>Thread pools</h1>
-<p>
-A thread pool is associated with Env environment object. The client has to create a thread pool by setting the number of background
-threads using method <code>Env::SetBackgroundThreads()</code> defined in <code>rocksdb/env.h</code>.
-We use the thread pool for compactions and memtable flushes.
-Since memtable flushes are in critical code path (stalling memtable flush can stall writes, increasing p99), we suggest
-having two thread pools - with priorities HIGH and LOW. Memtable flushes can be set up to be scheduled on HIGH thread pool.
-There are two options available for configuration of background compactions and flushes:
-<ul>
-<p>
-<li> <code>Options::max_background_compactions</code> - Maximum number of concurrent background jobs,
-submitted to the default LOW priority thread pool
-<p>
-<li> <code>Options::max_background_flushes</code> - Maximum number of concurrent background memtable flush jobs, submitted to
-the HIGH priority thread pool.  By default, all background jobs (major compaction and memtable flush) go
-to the LOW priority pool. If this option is set to a positive number, memtable flush jobs will be submitted to the HIGH priority pool.
-It is important when the same Env is shared by multiple db instances.  Without a separate pool, long running major compaction jobs could
-potentially block memtable flush jobs of other db instances, leading to unnecessary Put stalls.
-</ul>
-<p>
-<pre>
-  #include "rocksdb/env.h"
-  #include "rocksdb/db.h"
-
-  auto env = rocksdb::Env::Default();
-  env->SetBackgroundThreads(2, rocksdb::Env::LOW);
-  env->SetBackgroundThreads(1, rocksdb::Env::HIGH);
-  rocksdb::DB* db;
-  rocksdb::Options options;
-  options.env = env;
-  options.max_background_compactions = 2;
-  options.max_background_flushes = 1;
-  rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/testdb", &db);
-  assert(status.ok());
-  ...
-</pre>
-<h1>Approximate Sizes</h1>
-<p>
-The <code>GetApproximateSizes</code> method can used to get the approximate
-number of bytes of file system space used by one or more key ranges.
-<p>
-<pre>
-   rocksdb::Range ranges[2];
-   ranges[0] = rocksdb::Range("a", "c");
-   ranges[1] = rocksdb::Range("x", "z");
-   uint64_t sizes[2];
-   rocksdb::Status s = db->GetApproximateSizes(ranges, 2, sizes);
-</pre>
-The preceding call will set <code>sizes[0]</code> to the approximate number of
-bytes of file system space used by the key range <code>[a..c)</code> and
-<code>sizes[1]</code> to the approximate number of bytes used by the key range
-<code>[x..z)</code>.
-<p>
-<h1>Environment</h1>
-<p>
-All file operations (and other operating system calls) issued by the
-<code>rocksdb</code> implementation are routed through a <code>rocksdb::Env</code> object.
-Sophisticated clients may wish to provide their own <code>Env</code>
-implementation to get better control.  For example, an application may
-introduce artificial delays in the file IO paths to limit the impact
-of <code>rocksdb</code> on other activities in the system.
-<p>
-<pre>
-  class SlowEnv : public rocksdb::Env {
-    .. implementation of the Env interface ...
-  };
-
-  SlowEnv env;
-  rocksdb::Options options;
-  options.env = &env;
-  Status s = rocksdb::DB::Open(options, ...);
-</pre>
-<h1>Porting</h1>
-<p>
-<code>rocksdb</code> may be ported to a new platform by providing platform
-specific implementations of the types/methods/functions exported by
-<code>rocksdb/port/port.h</code>.  See <code>rocksdb/port/port_example.h</code> for more
-details.
-<p>
-In addition, the new platform may need a new default <code>rocksdb::Env</code>
-implementation.  See <code>rocksdb/util/env_posix.h</code> for an example.
-
-<h1>Statistics</h1>
-<p>
-To be able to efficiently tune your application, it is always helpful if you
-have access to usage statistics. You can collect those statistics by setting
-<code>Options::table_properties_collectors</code> or
-<code>Options::statistics</code>. For more information, refer to
-<code>rocksdb/table_properties.h</code> and <code>rocksdb/statistics.h</code>.
-These should not add significant overhead to your application and we
-recommend exporting them to other monitoring tools.
-
-<h1>Purging WAL files</h1>
-<p>
-By default, old write-ahead logs are deleted automatically when they fall out
-of scope and application doesn't need them anymore. There are options that
-enable the user to archive the logs and then delete them lazily, either in
-TTL fashion or based on size limit.
-
-The options are <code>Options::WAL_ttl_seconds</code> and
-<code>Options::WAL_size_limit_MB</code>. Here is how they can be used:
-<ul>
-<li>
-<p>
-If both set to 0, logs will be deleted asap and will never get into the archive.
-<li>
-<p>
-If <code>WAL_ttl_seconds</code> is 0 and WAL_size_limit_MB is not 0, WAL
-files will be checked every 10 min and if total size is greater then
-<code>WAL_size_limit_MB</code>, they will be deleted starting with the
-earliest until size_limit is met. All empty files will be deleted.
-<li>
-<p>
-If <code>WAL_ttl_seconds</code> is not 0 and WAL_size_limit_MB is 0, then
-WAL files will be checked every <code>WAL_ttl_seconds / 2</code> and those
-that are older than WAL_ttl_seconds will be deleted.
-<li>
-<p>
-If both are not 0, WAL files will be checked every 10 min and both
-checks will be performed with ttl being first.
-</ul>
-
-<h1>Other Information</h1>
-<p>
-Details about the <code>rocksdb</code> implementation may be found in
-the following documents:
-<ul>
-<li> <a href="https://github.com/facebook/rocksdb/wiki/Rocksdb-Architecture-Guide">
-  RocksDB Architecture Guide</a>
-<li> <a href="https://github.com/facebook/rocksdb/wiki/Rocksdb-Table-Format">
-    Format of an immutable Table file</a>
-<li> <a href="log_format.txt">Format of a log file</a>
-</ul>
-
-</body>
-</html>
diff --git a/src/rocksdb/doc/log_format.txt b/src/rocksdb/doc/log_format.txt
deleted file mode 100644
index 3a0414b..0000000
--- a/src/rocksdb/doc/log_format.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-The log file contents are a sequence of 32KB blocks.  The only
-exception is that the tail of the file may contain a partial block.
-
-Each block consists of a sequence of records:
-   block := record* trailer?
-   record :=
-	checksum: uint32	// crc32c of type and data[]
-	length: uint16
-	type: uint8		// One of FULL, FIRST, MIDDLE, LAST
-	data: uint8[length]
-
-A record never starts within the last six bytes of a block (since it
-won't fit).  Any leftover bytes here form the trailer, which must
-consist entirely of zero bytes and must be skipped by readers.  
-
-Aside: if exactly seven bytes are left in the current block, and a new
-non-zero length record is added, the writer must emit a FIRST record
-(which contains zero bytes of user data) to fill up the trailing seven
-bytes of the block and then emit all of the user data in subsequent
-blocks.
-
-More types may be added in the future.  Some Readers may skip record
-types they do not understand, others may report that some data was
-skipped.
-
-FULL == 1
-FIRST == 2
-MIDDLE == 3
-LAST == 4
-
-The FULL record contains the contents of an entire user record.
-
-FIRST, MIDDLE, LAST are types used for user records that have been
-split into multiple fragments (typically because of block boundaries).
-FIRST is the type of the first fragment of a user record, LAST is the
-type of the last fragment of a user record, and MID is the type of all
-interior fragments of a user record.
-
-Example: consider a sequence of user records:
-   A: length 1000
-   B: length 97270
-   C: length 8000
-A will be stored as a FULL record in the first block.
-
-B will be split into three fragments: first fragment occupies the rest
-of the first block, second fragment occupies the entirety of the
-second block, and the third fragment occupies a prefix of the third
-block.  This will leave six bytes free in the third block, which will
-be left empty as the trailer.
-
-C will be stored as a FULL record in the fourth block.
-
-===================
-
-Some benefits over the recordio format:
-
-(1) We do not need any heuristics for resyncing - just go to next
-block boundary and scan.  If there is a corruption, skip to the next
-block.  As a side-benefit, we do not get confused when part of the
-contents of one log file are embedded as a record inside another log
-file.
-
-(2) Splitting at approximate boundaries (e.g., for mapreduce) is
-simple: find the next block boundary and skip records until we
-hit a FULL or FIRST record.
-
-(3) We do not need extra buffering for large records.
-
-Some downsides compared to recordio format:
-
-(1) No packing of tiny records.  This could be fixed by adding a new
-record type, so it is a shortcoming of the current implementation,
-not necessarily the format.
-
-(2) No compression.  Again, this could be fixed by adding new record types.
diff --git a/src/rocksdb/doc/rockslogo.jpg b/src/rocksdb/doc/rockslogo.jpg
deleted file mode 100644
index 363905a..0000000
Binary files a/src/rocksdb/doc/rockslogo.jpg and /dev/null differ
diff --git a/src/rocksdb/doc/rockslogo.png b/src/rocksdb/doc/rockslogo.png
deleted file mode 100644
index 1961360..0000000
Binary files a/src/rocksdb/doc/rockslogo.png and /dev/null differ
diff --git a/src/rocksdb/hdfs/README b/src/rocksdb/hdfs/README
deleted file mode 100644
index 9b7d0a6..0000000
--- a/src/rocksdb/hdfs/README
+++ /dev/null
@@ -1,26 +0,0 @@
-This directory contains the hdfs extensions needed to make rocksdb store
-files in HDFS.
-
-The hdfs.h file is copied from the Apache Hadoop 1.0 source code. 
-It defines the libhdfs library
-(http://hadoop.apache.org/common/docs/r0.20.2/libhdfs.html) to access 
-data in HDFS.  The libhdfs.a is copied from the Apache Hadoop 1.0 build. 
-It implements the API defined in hdfs.h. If your hadoop cluster is running
-a different hadoop release, then install these two files manually from your
-hadoop distribution and then recompile rocksdb.
-
-The env_hdfs.h file defines the rocksdb objects that are needed to talk to an
-underlying filesystem. 
-
-If you want to compile rocksdb with hdfs support, please set the following
-enviroment variables appropriately:
-   USE_HDFS=1
-   JAVA_HOME=/usr/local/jdk-6u22-64
-   LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/jdk-6u22-64/jre/lib/amd64/server:/usr/local/jdk-6u22-64/jre/lib/amd64/:./snappy/libs
-   make clean all db_bench
-
-To run dbbench,
-  set CLASSPATH to include your hadoop distribution
-  db_bench --hdfs="hdfs://hbaseudbperf001.snc1.facebook.com:9000"
-
-
diff --git a/src/rocksdb/hdfs/env_hdfs.h b/src/rocksdb/hdfs/env_hdfs.h
deleted file mode 100644
index 303cd81..0000000
--- a/src/rocksdb/hdfs/env_hdfs.h
+++ /dev/null
@@ -1,323 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#pragma once
-#include <algorithm>
-#include <stdio.h>
-#include <sys/time.h>
-#include <time.h>
-#include <iostream>
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-
-#ifdef USE_HDFS
-#include "hdfs/hdfs.h"
-
-namespace rocksdb {
-
-static const std::string kProto = "hdfs://";
-static const std::string pathsep = "/";
-
-// Thrown during execution when there is an issue with the supplied
-// arguments.
-class HdfsUsageException : public std::exception { };
-
-// A simple exception that indicates something went wrong that is not
-// recoverable.  The intention is for the message to be printed (with
-// nothing else) and the process terminate.
-class HdfsFatalException : public std::exception {
-public:
-  explicit HdfsFatalException(const std::string& s) : what_(s) { }
-  virtual ~HdfsFatalException() throw() { }
-  virtual const char* what() const throw() {
-    return what_.c_str();
-  }
-private:
-  const std::string what_;
-};
-
-//
-// The HDFS environment for rocksdb. This class overrides all the
-// file/dir access methods and delegates the thread-mgmt methods to the
-// default posix environment.
-//
-class HdfsEnv : public Env {
-
- public:
-  explicit HdfsEnv(const std::string& fsname) : fsname_(fsname) {
-    posixEnv = Env::Default();
-    fileSys_ = connectToPath(fsname_);
-  }
-
-  virtual ~HdfsEnv() {
-    fprintf(stderr, "Destroying HdfsEnv::Default()\n");
-    hdfsDisconnect(fileSys_);
-  }
-
-  virtual Status NewSequentialFile(const std::string& fname,
-                                   SequentialFile** result);
-
-  virtual Status NewRandomAccessFile(const std::string& fname,
-                                     RandomAccessFile** result);
-
-  virtual Status NewWritableFile(const std::string& fname,
-                                 WritableFile** result);
-
-  virtual Status NewRandomRWFile(const std::string& fname,
-                                 unique_ptr<RandomRWFile>* result,
-                                 const EnvOptions& options);
-
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result);
-
-  virtual bool FileExists(const std::string& fname);
-
-  virtual Status GetChildren(const std::string& path,
-                             std::vector<std::string>* result);
-
-  virtual Status DeleteFile(const std::string& fname);
-
-  virtual Status CreateDir(const std::string& name);
-
-  virtual Status CreateDirIfMissing(const std::string& name);
-
-  virtual Status DeleteDir(const std::string& name);
-
-  virtual Status GetFileSize(const std::string& fname, uint64_t* size);
-
-  virtual Status GetFileModificationTime(const std::string& fname,
-                                         uint64_t* file_mtime);
-
-  virtual Status RenameFile(const std::string& src, const std::string& target);
-
-  virtual Status LockFile(const std::string& fname, FileLock** lock);
-
-  virtual Status UnlockFile(FileLock* lock);
-
-  virtual Status NewLogger(const std::string& fname, Logger** result);
-
-  virtual void Schedule(void (*function)(void* arg), void* arg,
-                        Priority pri = LOW) {
-    posixEnv->Schedule(function, arg, pri);
-  }
-
-  virtual void StartThread(void (*function)(void* arg), void* arg) {
-    posixEnv->StartThread(function, arg);
-  }
-
-  virtual void WaitForJoin() { posixEnv->WaitForJoin(); }
-
-  virtual unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const
-      override {
-    return posixEnv->GetThreadPoolQueueLen(pri);
-  }
-
-  virtual Status GetTestDirectory(std::string* path) {
-    return posixEnv->GetTestDirectory(path);
-  }
-
-  virtual uint64_t NowMicros() {
-    return posixEnv->NowMicros();
-  }
-
-  virtual void SleepForMicroseconds(int micros) {
-    posixEnv->SleepForMicroseconds(micros);
-  }
-
-  virtual Status GetHostName(char* name, uint64_t len) {
-    return posixEnv->GetHostName(name, len);
-  }
-
-  virtual Status GetCurrentTime(int64_t* unix_time) {
-    return posixEnv->GetCurrentTime(unix_time);
-  }
-
-  virtual Status GetAbsolutePath(const std::string& db_path,
-      std::string* output_path) {
-    return posixEnv->GetAbsolutePath(db_path, output_path);
-  }
-
-  virtual void SetBackgroundThreads(int number, Priority pri = LOW) {
-    posixEnv->SetBackgroundThreads(number, pri);
-  }
-
-  virtual std::string TimeToString(uint64_t number) {
-    return posixEnv->TimeToString(number);
-  }
-
-  static uint64_t gettid() {
-    assert(sizeof(pthread_t) <= sizeof(uint64_t));
-    return (uint64_t)pthread_self();
-  }
-
- private:
-  std::string fsname_;  // string of the form "hdfs://hostname:port/"
-  hdfsFS fileSys_;      //  a single FileSystem object for all files
-  Env*  posixEnv;       // This object is derived from Env, but not from
-                        // posixEnv. We have posixnv as an encapsulated
-                        // object here so that we can use posix timers,
-                        // posix threads, etc.
-
-  /**
-   * If the URI is specified of the form hdfs://server:port/path,
-   * then connect to the specified cluster
-   * else connect to default.
-   */
-  hdfsFS connectToPath(const std::string& uri) {
-    if (uri.empty()) {
-      return nullptr;
-    }
-    if (uri.find(kProto) != 0) {
-      // uri doesn't start with hdfs:// -> use default:0, which is special
-      // to libhdfs.
-      return hdfsConnectNewInstance("default", 0);
-    }
-    const std::string hostport = uri.substr(kProto.length());
-
-    std::vector <std::string> parts;
-    split(hostport, ':', parts);
-    if (parts.size() != 2) {
-      throw HdfsFatalException("Bad uri for hdfs " + uri);
-    }
-    // parts[0] = hosts, parts[1] = port/xxx/yyy
-    std::string host(parts[0]);
-    std::string remaining(parts[1]);
-
-    int rem = remaining.find(pathsep);
-    std::string portStr = (rem == 0 ? remaining :
-                           remaining.substr(0, rem));
-
-    tPort port;
-    port = atoi(portStr.c_str());
-    if (port == 0) {
-      throw HdfsFatalException("Bad host-port for hdfs " + uri);
-    }
-    hdfsFS fs = hdfsConnectNewInstance(host.c_str(), port);
-    return fs;
-  }
-
-  void split(const std::string &s, char delim,
-             std::vector<std::string> &elems) {
-    elems.clear();
-    size_t prev = 0;
-    size_t pos = s.find(delim);
-    while (pos != std::string::npos) {
-      elems.push_back(s.substr(prev, pos));
-      prev = pos + 1;
-      pos = s.find(delim, prev);
-    }
-    elems.push_back(s.substr(prev, s.size()));
-  }
-};
-
-}  // namespace rocksdb
-
-#else // USE_HDFS
-
-
-namespace rocksdb {
-
-static const Status notsup;
-
-class HdfsEnv : public Env {
-
- public:
-  explicit HdfsEnv(const std::string& fsname) {
-    fprintf(stderr, "You have not build rocksdb with HDFS support\n");
-    fprintf(stderr, "Please see hdfs/README for details\n");
-    throw std::exception();
-  }
-
-  virtual ~HdfsEnv() {
-  }
-
-  virtual Status NewSequentialFile(const std::string& fname,
-                                   unique_ptr<SequentialFile>* result,
-                                   const EnvOptions& options);
-
-  virtual Status NewRandomAccessFile(const std::string& fname,
-                                     unique_ptr<RandomAccessFile>* result,
-                                     const EnvOptions& options) {
-    return notsup;
-  }
-
-  virtual Status NewWritableFile(const std::string& fname,
-                                 unique_ptr<WritableFile>* result,
-                                 const EnvOptions& options) {
-    return notsup;
-  }
-
-  virtual Status NewRandomRWFile(const std::string& fname,
-                                 unique_ptr<RandomRWFile>* result,
-                                 const EnvOptions& options) {
-    return notsup;
-  }
-
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result) {
-    return notsup;
-  }
-
-  virtual bool FileExists(const std::string& fname){return false;}
-
-  virtual Status GetChildren(const std::string& path,
-                             std::vector<std::string>* result){return notsup;}
-
-  virtual Status DeleteFile(const std::string& fname){return notsup;}
-
-  virtual Status CreateDir(const std::string& name){return notsup;}
-
-  virtual Status CreateDirIfMissing(const std::string& name){return notsup;}
-
-  virtual Status DeleteDir(const std::string& name){return notsup;}
-
-  virtual Status GetFileSize(const std::string& fname, uint64_t* size){return notsup;}
-
-  virtual Status GetFileModificationTime(const std::string& fname,
-                                         uint64_t* time) {
-    return notsup;
-  }
-
-  virtual Status RenameFile(const std::string& src, const std::string& target){return notsup;}
-
-  virtual Status LockFile(const std::string& fname, FileLock** lock){return notsup;}
-
-  virtual Status UnlockFile(FileLock* lock){return notsup;}
-
-  virtual Status NewLogger(const std::string& fname,
-                           shared_ptr<Logger>* result){return notsup;}
-
-  virtual void Schedule(void (*function)(void* arg), void* arg,
-                        Priority pri = LOW) {}
-
-  virtual void StartThread(void (*function)(void* arg), void* arg) {}
-
-  virtual void WaitForJoin() {}
-
-  virtual unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const {
-    return 0;
-  }
-
-  virtual Status GetTestDirectory(std::string* path) {return notsup;}
-
-  virtual uint64_t NowMicros() {return 0;}
-
-  virtual void SleepForMicroseconds(int micros) {}
-
-  virtual Status GetHostName(char* name, uint64_t len) {return notsup;}
-
-  virtual Status GetCurrentTime(int64_t* unix_time) {return notsup;}
-
-  virtual Status GetAbsolutePath(const std::string& db_path,
-      std::string* outputpath) {return notsup;}
-
-  virtual void SetBackgroundThreads(int number, Priority pri = LOW) {}
-
-  virtual std::string TimeToString(uint64_t number) { return "";}
-};
-}
-
-#endif // USE_HDFS
diff --git a/src/rocksdb/hdfs/hdfs.h b/src/rocksdb/hdfs/hdfs.h
deleted file mode 100644
index 8e8dfec..0000000
--- a/src/rocksdb/hdfs/hdfs.h
+++ /dev/null
@@ -1,477 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef LIBHDFS_HDFS_H
-#define LIBHDFS_HDFS_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <errno.h>
-
-#include <jni.h>
-
-#ifndef O_RDONLY
-#define O_RDONLY 1
-#endif
-
-#ifndef O_WRONLY 
-#define O_WRONLY 2
-#endif
-
-#ifndef EINTERNAL
-#define EINTERNAL 255 
-#endif
-
-
-/** All APIs set errno to meaningful values */
-#ifdef __cplusplus
-extern  "C" {
-#endif
-
-    /**
-     * Some utility decls used in libhdfs.
-     */
-
-    typedef int32_t   tSize; /// size of data for read/write io ops 
-    typedef time_t    tTime; /// time type in seconds
-    typedef int64_t   tOffset;/// offset within the file
-    typedef uint16_t  tPort; /// port
-    typedef enum tObjectKind {
-        kObjectKindFile = 'F',
-        kObjectKindDirectory = 'D',
-    } tObjectKind;
-
-
-    /**
-     * The C reflection of org.apache.org.hadoop.FileSystem .
-     */
-    typedef void* hdfsFS;
-
-    
-    /**
-     * The C equivalent of org.apache.org.hadoop.FSData(Input|Output)Stream .
-     */
-    enum hdfsStreamType
-    {
-        UNINITIALIZED = 0,
-        INPUT = 1,
-        OUTPUT = 2,
-    };
-
-    
-    /**
-     * The 'file-handle' to a file in hdfs.
-     */
-    struct hdfsFile_internal {
-        void* file;
-        enum hdfsStreamType type;
-    };
-    typedef struct hdfsFile_internal* hdfsFile;
-      
-
-    /** 
-     * hdfsConnectAsUser - Connect to a hdfs file system as a specific user
-     * Connect to the hdfs.
-     * @param host A string containing either a host name, or an ip address
-     * of the namenode of a hdfs cluster. 'host' should be passed as NULL if
-     * you want to connect to local filesystem. 'host' should be passed as
-     * 'default' (and port as 0) to used the 'configured' filesystem
-     * (core-site/core-default.xml).
-     * @param port The port on which the server is listening.
-     * @param user the user name (this is hadoop domain user). Or NULL is equivelant to hhdfsConnect(host, port)
-     * @param groups the groups (these are hadoop domain groups)
-     * @return Returns a handle to the filesystem or NULL on error.
-     */
-     hdfsFS hdfsConnectAsUser(const char* host, tPort port, const char *user , const char *groups[], int groups_size );
-
-
-    /** 
-     * hdfsConnect - Connect to a hdfs file system.
-     * Connect to the hdfs.
-     * @param host A string containing either a host name, or an ip address
-     * of the namenode of a hdfs cluster. 'host' should be passed as NULL if
-     * you want to connect to local filesystem. 'host' should be passed as
-     * 'default' (and port as 0) to used the 'configured' filesystem
-     * (core-site/core-default.xml).
-     * @param port The port on which the server is listening.
-     * @return Returns a handle to the filesystem or NULL on error.
-     */
-     hdfsFS hdfsConnect(const char* host, tPort port);
-
-
-    /**
-     * This are the same as hdfsConnectAsUser except that every invocation returns a new FileSystem handle.
-     * Applications should call a hdfsDisconnect for every call to hdfsConnectAsUserNewInstance.
-     */
-     hdfsFS hdfsConnectAsUserNewInstance(const char* host, tPort port, const char *user , const char *groups[], int groups_size );
-     hdfsFS hdfsConnectNewInstance(const char* host, tPort port);
-     hdfsFS hdfsConnectPath(const char* uri);
-
-    /** 
-     * hdfsDisconnect - Disconnect from the hdfs file system.
-     * Disconnect from hdfs.
-     * @param fs The configured filesystem handle.
-     * @return Returns 0 on success, -1 on error.  
-     */
-    int hdfsDisconnect(hdfsFS fs);
-        
-
-    /** 
-     * hdfsOpenFile - Open a hdfs file in given mode.
-     * @param fs The configured filesystem handle.
-     * @param path The full path to the file.
-     * @param flags - an | of bits/fcntl.h file flags - supported flags are O_RDONLY, O_WRONLY (meaning create or overwrite i.e., implies O_TRUNCAT), 
-     * O_WRONLY|O_APPEND. Other flags are generally ignored other than (O_RDWR || (O_EXCL & O_CREAT)) which return NULL and set errno equal ENOTSUP.
-     * @param bufferSize Size of buffer for read/write - pass 0 if you want
-     * to use the default configured values.
-     * @param replication Block replication - pass 0 if you want to use
-     * the default configured values.
-     * @param blocksize Size of block - pass 0 if you want to use the
-     * default configured values.
-     * @return Returns the handle to the open file or NULL on error.
-     */
-    hdfsFile hdfsOpenFile(hdfsFS fs, const char* path, int flags,
-                          int bufferSize, short replication, tSize blocksize);
-
-
-    /** 
-     * hdfsCloseFile - Close an open file. 
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @return Returns 0 on success, -1 on error.  
-     */
-    int hdfsCloseFile(hdfsFS fs, hdfsFile file);
-
-
-    /** 
-     * hdfsExists - Checks if a given path exsits on the filesystem 
-     * @param fs The configured filesystem handle.
-     * @param path The path to look for
-     * @return Returns 0 on exists, 1 on non-exists, -1/-2 on error.  
-     */
-    int hdfsExists(hdfsFS fs, const char *path);
-
-
-    /** 
-     * hdfsSeek - Seek to given offset in file. 
-     * This works only for files opened in read-only mode. 
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @param desiredPos Offset into the file to seek into.
-     * @return Returns 0 on success, -1 on error.  
-     */
-    int hdfsSeek(hdfsFS fs, hdfsFile file, tOffset desiredPos); 
-
-
-    /** 
-     * hdfsTell - Get the current offset in the file, in bytes.
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @return Current offset, -1 on error.
-     */
-    tOffset hdfsTell(hdfsFS fs, hdfsFile file);
-
-
-    /** 
-     * hdfsRead - Read data from an open file.
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @param buffer The buffer to copy read bytes into.
-     * @param length The length of the buffer.
-     * @return Returns the number of bytes actually read, possibly less
-     * than than length;-1 on error.
-     */
-    tSize hdfsRead(hdfsFS fs, hdfsFile file, void* buffer, tSize length);
-
-
-    /** 
-     * hdfsPread - Positional read of data from an open file.
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @param position Position from which to read
-     * @param buffer The buffer to copy read bytes into.
-     * @param length The length of the buffer.
-     * @return Returns the number of bytes actually read, possibly less than
-     * than length;-1 on error.
-     */
-    tSize hdfsPread(hdfsFS fs, hdfsFile file, tOffset position,
-                    void* buffer, tSize length);
-
-
-    /** 
-     * hdfsWrite - Write data into an open file.
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @param buffer The data.
-     * @param length The no. of bytes to write. 
-     * @return Returns the number of bytes written, -1 on error.
-     */
-    tSize hdfsWrite(hdfsFS fs, hdfsFile file, const void* buffer,
-                    tSize length);
-
-
-    /** 
-     * hdfsWrite - Flush the data. 
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsFlush(hdfsFS fs, hdfsFile file);
-
-    /**
-     * hdfsSync - Sync the data to persistent store.
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @return Returns 0 on success, -1 on error.
-     */
-    int hdfsSync(hdfsFS fs, hdfsFile file);
-
-    /**
-     * hdfsGetNumReplicasInPipeline - get number of remaining replicas in 
-     * pipeline
-     * @param fs The configured filesystem handle
-     * @param file the file handle
-     * @return returns the # of datanodes in the write pipeline; -1 on error
-     */
-   int hdfsGetNumCurrentReplicas(hdfsFS, hdfsFile file);
-
-    /**
-     * hdfsAvailable - Number of bytes that can be read from this
-     * input stream without blocking.
-     * @param fs The configured filesystem handle.
-     * @param file The file handle.
-     * @return Returns available bytes; -1 on error. 
-     */
-    int hdfsAvailable(hdfsFS fs, hdfsFile file);
-
-
-    /**
-     * hdfsCopy - Copy file from one filesystem to another.
-     * @param srcFS The handle to source filesystem.
-     * @param src The path of source file. 
-     * @param dstFS The handle to destination filesystem.
-     * @param dst The path of destination file. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsCopy(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst);
-
-
-    /**
-     * hdfsMove - Move file from one filesystem to another.
-     * @param srcFS The handle to source filesystem.
-     * @param src The path of source file. 
-     * @param dstFS The handle to destination filesystem.
-     * @param dst The path of destination file. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsMove(hdfsFS srcFS, const char* src, hdfsFS dstFS, const char* dst);
-
-
-    /**
-     * hdfsDelete - Delete file. 
-     * @param fs The configured filesystem handle.
-     * @param path The path of the file. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsDelete(hdfsFS fs, const char* path);
-
-
-    /**
-     * hdfsRename - Rename file. 
-     * @param fs The configured filesystem handle.
-     * @param oldPath The path of the source file. 
-     * @param newPath The path of the destination file. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsRename(hdfsFS fs, const char* oldPath, const char* newPath);
-
-
-    /** 
-     * hdfsGetWorkingDirectory - Get the current working directory for
-     * the given filesystem.
-     * @param fs The configured filesystem handle.
-     * @param buffer The user-buffer to copy path of cwd into. 
-     * @param bufferSize The length of user-buffer.
-     * @return Returns buffer, NULL on error.
-     */
-    char* hdfsGetWorkingDirectory(hdfsFS fs, char *buffer, size_t bufferSize);
-
-
-    /** 
-     * hdfsSetWorkingDirectory - Set the working directory. All relative
-     * paths will be resolved relative to it.
-     * @param fs The configured filesystem handle.
-     * @param path The path of the new 'cwd'. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsSetWorkingDirectory(hdfsFS fs, const char* path);
-
-
-    /** 
-     * hdfsCreateDirectory - Make the given file and all non-existent
-     * parents into directories.
-     * @param fs The configured filesystem handle.
-     * @param path The path of the directory. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsCreateDirectory(hdfsFS fs, const char* path);
-
-
-    /** 
-     * hdfsSetReplication - Set the replication of the specified
-     * file to the supplied value
-     * @param fs The configured filesystem handle.
-     * @param path The path of the file. 
-     * @return Returns 0 on success, -1 on error. 
-     */
-    int hdfsSetReplication(hdfsFS fs, const char* path, int16_t replication);
-
-
-    /** 
-     * hdfsFileInfo - Information about a file/directory.
-     */
-    typedef struct  {
-        tObjectKind mKind;   /* file or directory */
-        char *mName;         /* the name of the file */
-        tTime mLastMod;      /* the last modification time for the file in seconds */
-        tOffset mSize;       /* the size of the file in bytes */
-        short mReplication;    /* the count of replicas */
-        tOffset mBlockSize;  /* the block size for the file */
-        char *mOwner;        /* the owner of the file */
-        char *mGroup;        /* the group associated with the file */
-        short mPermissions;  /* the permissions associated with the file */
-        tTime mLastAccess;    /* the last access time for the file in seconds */
-    } hdfsFileInfo;
-
-
-    /** 
-     * hdfsListDirectory - Get list of files/directories for a given
-     * directory-path. hdfsFreeFileInfo should be called to deallocate memory if
-     * the function returns non-NULL value.
-     * @param fs The configured filesystem handle.
-     * @param path The path of the directory. 
-     * @param numEntries Set to the number of files/directories in path.
-     * @return Returns a dynamically-allocated array of hdfsFileInfo
-     * objects; NULL if empty or on error.
-     * on error, numEntries will be -1.
-     */
-    hdfsFileInfo *hdfsListDirectory(hdfsFS fs, const char* path,
-                                    int *numEntries);
-
-
-    /** 
-     * hdfsGetPathInfo - Get information about a path as a (dynamically
-     * allocated) single hdfsFileInfo struct. hdfsFreeFileInfo should be
-     * called when the pointer is no longer needed.
-     * @param fs The configured filesystem handle.
-     * @param path The path of the file. 
-     * @return Returns a dynamically-allocated hdfsFileInfo object;
-     * NULL on error.
-     */
-    hdfsFileInfo *hdfsGetPathInfo(hdfsFS fs, const char* path);
-
-
-    /** 
-     * hdfsFreeFileInfo - Free up the hdfsFileInfo array (including fields) 
-     * @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo
-     * objects.
-     * @param numEntries The size of the array.
-     */
-    void hdfsFreeFileInfo(hdfsFileInfo *hdfsFileInfo, int numEntries);
-
-
-    /** 
-     * hdfsGetHosts - Get hostnames where a particular block (determined by
-     * pos & blocksize) of a file is stored. The last element in the array
-     * is NULL. Due to replication, a single block could be present on
-     * multiple hosts.
-     * @param fs The configured filesystem handle.
-     * @param path The path of the file. 
-     * @param start The start of the block.
-     * @param length The length of the block.
-     * @return Returns a dynamically-allocated 2-d array of blocks-hosts;
-     * NULL on error.
-     */
-    char*** hdfsGetHosts(hdfsFS fs, const char* path, 
-            tOffset start, tOffset length);
-
-
-    /** 
-     * hdfsFreeHosts - Free up the structure returned by hdfsGetHosts
-     * @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo
-     * objects.
-     * @param numEntries The size of the array.
-     */
-    void hdfsFreeHosts(char ***blockHosts);
-
-
-    /** 
-     * hdfsGetDefaultBlockSize - Get the optimum blocksize.
-     * @param fs The configured filesystem handle.
-     * @return Returns the blocksize; -1 on error. 
-     */
-    tOffset hdfsGetDefaultBlockSize(hdfsFS fs);
-
-
-    /** 
-     * hdfsGetCapacity - Return the raw capacity of the filesystem.  
-     * @param fs The configured filesystem handle.
-     * @return Returns the raw-capacity; -1 on error. 
-     */
-    tOffset hdfsGetCapacity(hdfsFS fs);
-
-
-    /** 
-     * hdfsGetUsed - Return the total raw size of all files in the filesystem.
-     * @param fs The configured filesystem handle.
-     * @return Returns the total-size; -1 on error. 
-     */
-    tOffset hdfsGetUsed(hdfsFS fs);
-
-    /** 
-     * hdfsChown 
-     * @param fs The configured filesystem handle.
-     * @param path the path to the file or directory
-     * @param owner this is a string in Hadoop land. Set to null or "" if only setting group
-     * @param group  this is a string in Hadoop land. Set to null or "" if only setting user
-     * @return 0 on success else -1
-     */
-    int hdfsChown(hdfsFS fs, const char* path, const char *owner, const char *group);
-
-    /** 
-     * hdfsChmod
-     * @param fs The configured filesystem handle.
-     * @param path the path to the file or directory
-     * @param mode the bitmask to set it to
-     * @return 0 on success else -1
-     */
-      int hdfsChmod(hdfsFS fs, const char* path, short mode);
-
-    /** 
-     * hdfsUtime
-     * @param fs The configured filesystem handle.
-     * @param path the path to the file or directory
-     * @param mtime new modification time or 0 for only set access time in seconds
-     * @param atime new access time or 0 for only set modification time in seconds
-     * @return 0 on success else -1
-     */
-    int hdfsUtime(hdfsFS fs, const char* path, tTime mtime, tTime atime);
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*LIBHDFS_HDFS_H*/
-
-/**
- * vim: ts=4: sw=4: et
- */
diff --git a/src/rocksdb/hdfs/libhdfs.a b/src/rocksdb/hdfs/libhdfs.a
deleted file mode 100644
index 4d1f19f..0000000
Binary files a/src/rocksdb/hdfs/libhdfs.a and /dev/null differ
diff --git a/src/rocksdb/helpers/memenv/memenv.cc b/src/rocksdb/helpers/memenv/memenv.cc
deleted file mode 100644
index 185e7d8..0000000
--- a/src/rocksdb/helpers/memenv/memenv.cc
+++ /dev/null
@@ -1,395 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-#include "port/port.h"
-#include "util/mutexlock.h"
-#include <map>
-#include <string.h>
-#include <string>
-#include <vector>
-
-namespace rocksdb {
-
-namespace {
-
-class FileState {
- public:
-  // FileStates are reference counted. The initial reference count is zero
-  // and the caller must call Ref() at least once.
-  FileState() : refs_(0), size_(0) {}
-
-  // Increase the reference count.
-  void Ref() {
-    MutexLock lock(&refs_mutex_);
-    ++refs_;
-  }
-
-  // Decrease the reference count. Delete if this is the last reference.
-  void Unref() {
-    bool do_delete = false;
-
-    {
-      MutexLock lock(&refs_mutex_);
-      --refs_;
-      assert(refs_ >= 0);
-      if (refs_ <= 0) {
-        do_delete = true;
-      }
-    }
-
-    if (do_delete) {
-      delete this;
-    }
-  }
-
-  uint64_t Size() const { return size_; }
-
-  Status Read(uint64_t offset, size_t n, Slice* result, char* scratch) const {
-    if (offset > size_) {
-      return Status::IOError("Offset greater than file size.");
-    }
-    const uint64_t available = size_ - offset;
-    if (n > available) {
-      n = available;
-    }
-    if (n == 0) {
-      *result = Slice();
-      return Status::OK();
-    }
-
-    size_t block = offset / kBlockSize;
-    size_t block_offset = offset % kBlockSize;
-
-    if (n <= kBlockSize - block_offset) {
-      // The requested bytes are all in the first block.
-      *result = Slice(blocks_[block] + block_offset, n);
-      return Status::OK();
-    }
-
-    size_t bytes_to_copy = n;
-    char* dst = scratch;
-
-    while (bytes_to_copy > 0) {
-      size_t avail = kBlockSize - block_offset;
-      if (avail > bytes_to_copy) {
-        avail = bytes_to_copy;
-      }
-      memcpy(dst, blocks_[block] + block_offset, avail);
-
-      bytes_to_copy -= avail;
-      dst += avail;
-      block++;
-      block_offset = 0;
-    }
-
-    *result = Slice(scratch, n);
-    return Status::OK();
-  }
-
-  Status Append(const Slice& data) {
-    const char* src = data.data();
-    size_t src_len = data.size();
-
-    while (src_len > 0) {
-      size_t avail;
-      size_t offset = size_ % kBlockSize;
-
-      if (offset != 0) {
-        // There is some room in the last block.
-        avail = kBlockSize - offset;
-      } else {
-        // No room in the last block; push new one.
-        blocks_.push_back(new char[kBlockSize]);
-        avail = kBlockSize;
-      }
-
-      if (avail > src_len) {
-        avail = src_len;
-      }
-      memcpy(blocks_.back() + offset, src, avail);
-      src_len -= avail;
-      src += avail;
-      size_ += avail;
-    }
-
-    return Status::OK();
-  }
-
- private:
-  // Private since only Unref() should be used to delete it.
-  ~FileState() {
-    for (std::vector<char*>::iterator i = blocks_.begin(); i != blocks_.end();
-         ++i) {
-      delete [] *i;
-    }
-  }
-
-  // No copying allowed.
-  FileState(const FileState&);
-  void operator=(const FileState&);
-
-  port::Mutex refs_mutex_;
-  int refs_;  // Protected by refs_mutex_;
-
-  // The following fields are not protected by any mutex. They are only mutable
-  // while the file is being written, and concurrent access is not allowed
-  // to writable files.
-  std::vector<char*> blocks_;
-  uint64_t size_;
-
-  enum { kBlockSize = 8 * 1024 };
-};
-
-class SequentialFileImpl : public SequentialFile {
- public:
-  explicit SequentialFileImpl(FileState* file) : file_(file), pos_(0) {
-    file_->Ref();
-  }
-
-  ~SequentialFileImpl() {
-    file_->Unref();
-  }
-
-  virtual Status Read(size_t n, Slice* result, char* scratch) {
-    Status s = file_->Read(pos_, n, result, scratch);
-    if (s.ok()) {
-      pos_ += result->size();
-    }
-    return s;
-  }
-
-  virtual Status Skip(uint64_t n) {
-    if (pos_ > file_->Size()) {
-      return Status::IOError("pos_ > file_->Size()");
-    }
-    const size_t available = file_->Size() - pos_;
-    if (n > available) {
-      n = available;
-    }
-    pos_ += n;
-    return Status::OK();
-  }
-
- private:
-  FileState* file_;
-  size_t pos_;
-};
-
-class RandomAccessFileImpl : public RandomAccessFile {
- public:
-  explicit RandomAccessFileImpl(FileState* file) : file_(file) {
-    file_->Ref();
-  }
-
-  ~RandomAccessFileImpl() {
-    file_->Unref();
-  }
-
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const {
-    return file_->Read(offset, n, result, scratch);
-  }
-
- private:
-  FileState* file_;
-};
-
-class WritableFileImpl : public WritableFile {
- public:
-  WritableFileImpl(FileState* file) : file_(file) {
-    file_->Ref();
-  }
-
-  ~WritableFileImpl() {
-    file_->Unref();
-  }
-
-  virtual Status Append(const Slice& data) {
-    return file_->Append(data);
-  }
-
-  virtual Status Close() { return Status::OK(); }
-  virtual Status Flush() { return Status::OK(); }
-  virtual Status Sync() { return Status::OK(); }
-
- private:
-  FileState* file_;
-};
-
-class InMemoryDirectory : public Directory {
- public:
-  virtual Status Fsync() { return Status::OK(); }
-};
-
-class InMemoryEnv : public EnvWrapper {
- public:
-  explicit InMemoryEnv(Env* base_env) : EnvWrapper(base_env) { }
-
-  virtual ~InMemoryEnv() {
-    for (FileSystem::iterator i = file_map_.begin(); i != file_map_.end(); ++i){
-      i->second->Unref();
-    }
-  }
-
-  // Partial implementation of the Env interface.
-  virtual Status NewSequentialFile(const std::string& fname,
-                                   unique_ptr<SequentialFile>* result,
-                                   const EnvOptions& soptions) {
-    MutexLock lock(&mutex_);
-    if (file_map_.find(fname) == file_map_.end()) {
-      *result = NULL;
-      return Status::IOError(fname, "File not found");
-    }
-
-    result->reset(new SequentialFileImpl(file_map_[fname]));
-    return Status::OK();
-  }
-
-  virtual Status NewRandomAccessFile(const std::string& fname,
-                                     unique_ptr<RandomAccessFile>* result,
-                                     const EnvOptions& soptions) {
-    MutexLock lock(&mutex_);
-    if (file_map_.find(fname) == file_map_.end()) {
-      *result = NULL;
-      return Status::IOError(fname, "File not found");
-    }
-
-    result->reset(new RandomAccessFileImpl(file_map_[fname]));
-    return Status::OK();
-  }
-
-  virtual Status NewWritableFile(const std::string& fname,
-                                 unique_ptr<WritableFile>* result,
-                                 const EnvOptions& soptions) {
-    MutexLock lock(&mutex_);
-    if (file_map_.find(fname) != file_map_.end()) {
-      DeleteFileInternal(fname);
-    }
-
-    FileState* file = new FileState();
-    file->Ref();
-    file_map_[fname] = file;
-
-    result->reset(new WritableFileImpl(file));
-    return Status::OK();
-  }
-
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result) {
-    result->reset(new InMemoryDirectory());
-    return Status::OK();
-  }
-
-  virtual bool FileExists(const std::string& fname) {
-    MutexLock lock(&mutex_);
-    return file_map_.find(fname) != file_map_.end();
-  }
-
-  virtual Status GetChildren(const std::string& dir,
-                             std::vector<std::string>* result) {
-    MutexLock lock(&mutex_);
-    result->clear();
-
-    for (FileSystem::iterator i = file_map_.begin(); i != file_map_.end(); ++i){
-      const std::string& filename = i->first;
-
-      if (filename.size() >= dir.size() + 1 && filename[dir.size()] == '/' &&
-          Slice(filename).starts_with(Slice(dir))) {
-        result->push_back(filename.substr(dir.size() + 1));
-      }
-    }
-
-    return Status::OK();
-  }
-
-  void DeleteFileInternal(const std::string& fname) {
-    if (file_map_.find(fname) == file_map_.end()) {
-      return;
-    }
-
-    file_map_[fname]->Unref();
-    file_map_.erase(fname);
-  }
-
-  virtual Status DeleteFile(const std::string& fname) {
-    MutexLock lock(&mutex_);
-    if (file_map_.find(fname) == file_map_.end()) {
-      return Status::IOError(fname, "File not found");
-    }
-
-    DeleteFileInternal(fname);
-    return Status::OK();
-  }
-
-  virtual Status CreateDir(const std::string& dirname) {
-    return Status::OK();
-  }
-
-  virtual Status CreateDirIfMissing(const std::string& dirname) {
-    return Status::OK();
-  }
-
-  virtual Status DeleteDir(const std::string& dirname) {
-    return Status::OK();
-  }
-
-  virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) {
-    MutexLock lock(&mutex_);
-    if (file_map_.find(fname) == file_map_.end()) {
-      return Status::IOError(fname, "File not found");
-    }
-
-    *file_size = file_map_[fname]->Size();
-    return Status::OK();
-  }
-
-  virtual Status GetFileModificationTime(const std::string& fname,
-                                         uint64_t* time) {
-    return Status::NotSupported("getFileMTime", "Not supported in MemEnv");
-  }
-
-  virtual Status RenameFile(const std::string& src,
-                            const std::string& target) {
-    MutexLock lock(&mutex_);
-    if (file_map_.find(src) == file_map_.end()) {
-      return Status::IOError(src, "File not found");
-    }
-
-    DeleteFileInternal(target);
-    file_map_[target] = file_map_[src];
-    file_map_.erase(src);
-    return Status::OK();
-  }
-
-  virtual Status LockFile(const std::string& fname, FileLock** lock) {
-    *lock = new FileLock;
-    return Status::OK();
-  }
-
-  virtual Status UnlockFile(FileLock* lock) {
-    delete lock;
-    return Status::OK();
-  }
-
-  virtual Status GetTestDirectory(std::string* path) {
-    *path = "/test";
-    return Status::OK();
-  }
-
- private:
-  // Map from filenames to FileState objects, representing a simple file system.
-  typedef std::map<std::string, FileState*> FileSystem;
-  port::Mutex mutex_;
-  FileSystem file_map_;  // Protected by mutex_.
-};
-
-}  // namespace
-
-Env* NewMemEnv(Env* base_env) {
-  return new InMemoryEnv(base_env);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/helpers/memenv/memenv_test.cc b/src/rocksdb/helpers/memenv/memenv_test.cc
deleted file mode 100644
index ea3ed61..0000000
--- a/src/rocksdb/helpers/memenv/memenv_test.cc
+++ /dev/null
@@ -1,231 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "db/db_impl.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "util/testharness.h"
-#include <memory>
-#include <string>
-#include <vector>
-
-namespace rocksdb {
-
-class MemEnvTest {
- public:
-  Env* env_;
-  const EnvOptions soptions_;
-
-  MemEnvTest()
-      : env_(NewMemEnv(Env::Default())) {
-  }
-  ~MemEnvTest() {
-    delete env_;
-  }
-};
-
-TEST(MemEnvTest, Basics) {
-  uint64_t file_size;
-  unique_ptr<WritableFile> writable_file;
-  std::vector<std::string> children;
-
-  ASSERT_OK(env_->CreateDir("/dir"));
-
-  // Check that the directory is empty.
-  ASSERT_TRUE(!env_->FileExists("/dir/non_existent"));
-  ASSERT_TRUE(!env_->GetFileSize("/dir/non_existent", &file_size).ok());
-  ASSERT_OK(env_->GetChildren("/dir", &children));
-  ASSERT_EQ(0U, children.size());
-
-  // Create a file.
-  ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file, soptions_));
-  writable_file.reset();
-
-  // Check that the file exists.
-  ASSERT_TRUE(env_->FileExists("/dir/f"));
-  ASSERT_OK(env_->GetFileSize("/dir/f", &file_size));
-  ASSERT_EQ(0U, file_size);
-  ASSERT_OK(env_->GetChildren("/dir", &children));
-  ASSERT_EQ(1U, children.size());
-  ASSERT_EQ("f", children[0]);
-
-  // Write to the file.
-  ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file, soptions_));
-  ASSERT_OK(writable_file->Append("abc"));
-  writable_file.reset();
-
-  // Check for expected size.
-  ASSERT_OK(env_->GetFileSize("/dir/f", &file_size));
-  ASSERT_EQ(3U, file_size);
-
-  // Check that renaming works.
-  ASSERT_TRUE(!env_->RenameFile("/dir/non_existent", "/dir/g").ok());
-  ASSERT_OK(env_->RenameFile("/dir/f", "/dir/g"));
-  ASSERT_TRUE(!env_->FileExists("/dir/f"));
-  ASSERT_TRUE(env_->FileExists("/dir/g"));
-  ASSERT_OK(env_->GetFileSize("/dir/g", &file_size));
-  ASSERT_EQ(3U, file_size);
-
-  // Check that opening non-existent file fails.
-  unique_ptr<SequentialFile> seq_file;
-  unique_ptr<RandomAccessFile> rand_file;
-  ASSERT_TRUE(!env_->NewSequentialFile("/dir/non_existent", &seq_file,
-                                       soptions_).ok());
-  ASSERT_TRUE(!seq_file);
-  ASSERT_TRUE(!env_->NewRandomAccessFile("/dir/non_existent", &rand_file,
-                                         soptions_).ok());
-  ASSERT_TRUE(!rand_file);
-
-  // Check that deleting works.
-  ASSERT_TRUE(!env_->DeleteFile("/dir/non_existent").ok());
-  ASSERT_OK(env_->DeleteFile("/dir/g"));
-  ASSERT_TRUE(!env_->FileExists("/dir/g"));
-  ASSERT_OK(env_->GetChildren("/dir", &children));
-  ASSERT_EQ(0U, children.size());
-  ASSERT_OK(env_->DeleteDir("/dir"));
-}
-
-TEST(MemEnvTest, ReadWrite) {
-  unique_ptr<WritableFile> writable_file;
-  unique_ptr<SequentialFile> seq_file;
-  unique_ptr<RandomAccessFile> rand_file;
-  Slice result;
-  char scratch[100];
-
-  ASSERT_OK(env_->CreateDir("/dir"));
-
-  ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file, soptions_));
-  ASSERT_OK(writable_file->Append("hello "));
-  ASSERT_OK(writable_file->Append("world"));
-  writable_file.reset();
-
-  // Read sequentially.
-  ASSERT_OK(env_->NewSequentialFile("/dir/f", &seq_file, soptions_));
-  ASSERT_OK(seq_file->Read(5, &result, scratch)); // Read "hello".
-  ASSERT_EQ(0, result.compare("hello"));
-  ASSERT_OK(seq_file->Skip(1));
-  ASSERT_OK(seq_file->Read(1000, &result, scratch)); // Read "world".
-  ASSERT_EQ(0, result.compare("world"));
-  ASSERT_OK(seq_file->Read(1000, &result, scratch)); // Try reading past EOF.
-  ASSERT_EQ(0U, result.size());
-  ASSERT_OK(seq_file->Skip(100)); // Try to skip past end of file.
-  ASSERT_OK(seq_file->Read(1000, &result, scratch));
-  ASSERT_EQ(0U, result.size());
-
-  // Random reads.
-  ASSERT_OK(env_->NewRandomAccessFile("/dir/f", &rand_file, soptions_));
-  ASSERT_OK(rand_file->Read(6, 5, &result, scratch)); // Read "world".
-  ASSERT_EQ(0, result.compare("world"));
-  ASSERT_OK(rand_file->Read(0, 5, &result, scratch)); // Read "hello".
-  ASSERT_EQ(0, result.compare("hello"));
-  ASSERT_OK(rand_file->Read(10, 100, &result, scratch)); // Read "d".
-  ASSERT_EQ(0, result.compare("d"));
-
-  // Too high offset.
-  ASSERT_TRUE(!rand_file->Read(1000, 5, &result, scratch).ok());
-}
-
-TEST(MemEnvTest, Locks) {
-  FileLock* lock;
-
-  // These are no-ops, but we test they return success.
-  ASSERT_OK(env_->LockFile("some file", &lock));
-  ASSERT_OK(env_->UnlockFile(lock));
-}
-
-TEST(MemEnvTest, Misc) {
-  std::string test_dir;
-  ASSERT_OK(env_->GetTestDirectory(&test_dir));
-  ASSERT_TRUE(!test_dir.empty());
-
-  unique_ptr<WritableFile> writable_file;
-  ASSERT_OK(env_->NewWritableFile("/a/b", &writable_file, soptions_));
-
-  // These are no-ops, but we test they return success.
-  ASSERT_OK(writable_file->Sync());
-  ASSERT_OK(writable_file->Flush());
-  ASSERT_OK(writable_file->Close());
-  writable_file.reset();
-}
-
-TEST(MemEnvTest, LargeWrite) {
-  const size_t kWriteSize = 300 * 1024;
-  char* scratch = new char[kWriteSize * 2];
-
-  std::string write_data;
-  for (size_t i = 0; i < kWriteSize; ++i) {
-    write_data.append(1, static_cast<char>(i));
-  }
-
-  unique_ptr<WritableFile> writable_file;
-  ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file, soptions_));
-  ASSERT_OK(writable_file->Append("foo"));
-  ASSERT_OK(writable_file->Append(write_data));
-  writable_file.reset();
-
-  unique_ptr<SequentialFile> seq_file;
-  Slice result;
-  ASSERT_OK(env_->NewSequentialFile("/dir/f", &seq_file, soptions_));
-  ASSERT_OK(seq_file->Read(3, &result, scratch)); // Read "foo".
-  ASSERT_EQ(0, result.compare("foo"));
-
-  size_t read = 0;
-  std::string read_data;
-  while (read < kWriteSize) {
-    ASSERT_OK(seq_file->Read(kWriteSize - read, &result, scratch));
-    read_data.append(result.data(), result.size());
-    read += result.size();
-  }
-  ASSERT_TRUE(write_data == read_data);
-  delete [] scratch;
-}
-
-TEST(MemEnvTest, DBTest) {
-  Options options;
-  options.create_if_missing = true;
-  options.env = env_;
-  DB* db;
-
-  const Slice keys[] = {Slice("aaa"), Slice("bbb"), Slice("ccc")};
-  const Slice vals[] = {Slice("foo"), Slice("bar"), Slice("baz")};
-
-  ASSERT_OK(DB::Open(options, "/dir/db", &db));
-  for (size_t i = 0; i < 3; ++i) {
-    ASSERT_OK(db->Put(WriteOptions(), keys[i], vals[i]));
-  }
-
-  for (size_t i = 0; i < 3; ++i) {
-    std::string res;
-    ASSERT_OK(db->Get(ReadOptions(), keys[i], &res));
-    ASSERT_TRUE(res == vals[i]);
-  }
-
-  Iterator* iterator = db->NewIterator(ReadOptions());
-  iterator->SeekToFirst();
-  for (size_t i = 0; i < 3; ++i) {
-    ASSERT_TRUE(iterator->Valid());
-    ASSERT_TRUE(keys[i] == iterator->key());
-    ASSERT_TRUE(vals[i] == iterator->value());
-    iterator->Next();
-  }
-  ASSERT_TRUE(!iterator->Valid());
-  delete iterator;
-
-  DBImpl* dbi = reinterpret_cast<DBImpl*>(db);
-  ASSERT_OK(dbi->TEST_FlushMemTable());
-
-  for (size_t i = 0; i < 3; ++i) {
-    std::string res;
-    ASSERT_OK(db->Get(ReadOptions(), keys[i], &res));
-    ASSERT_TRUE(res == vals[i]);
-  }
-
-  delete db;
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/include/rocksdb/c.h b/src/rocksdb/include/rocksdb/c.h
deleted file mode 100644
index 013ee5d..0000000
--- a/src/rocksdb/include/rocksdb/c.h
+++ /dev/null
@@ -1,575 +0,0 @@
-/*  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-  This source code is licensed under the BSD-style license found in the
-  LICENSE file in the root directory of this source tree. An additional grant
-  of patent rights can be found in the PATENTS file in the same directory.
- Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-  Use of this source code is governed by a BSD-style license that can be
-  found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-  C bindings for leveldb.  May be useful as a stable ABI that can be
-  used by programs that keep leveldb in a shared library, or for
-  a JNI api.
-
-  Does not support:
-  . getters for the option types
-  . custom comparators that implement key shortening
-  . capturing post-write-snapshot
-  . custom iter, db, env, cache implementations using just the C bindings
-
-  Some conventions:
-
-  (1) We expose just opaque struct pointers and functions to clients.
-  This allows us to change internal representations without having to
-  recompile clients.
-
-  (2) For simplicity, there is no equivalent to the Slice type.  Instead,
-  the caller has to pass the pointer and length as separate
-  arguments.
-
-  (3) Errors are represented by a null-terminated c string.  NULL
-  means no error.  All operations that can raise an error are passed
-  a "char** errptr" as the last argument.  One of the following must
-  be true on entry:
-     *errptr == NULL
-     *errptr points to a malloc()ed null-terminated error message
-  On success, a leveldb routine leaves *errptr unchanged.
-  On failure, leveldb frees the old value of *errptr and
-  set *errptr to a malloc()ed error message.
-
-  (4) Bools have the type unsigned char (0 == false; rest == true)
-
-  (5) All of the pointer arguments must be non-NULL.
-*/
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_C_H_
-#define STORAGE_ROCKSDB_INCLUDE_C_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdint.h>
-
-/* Exported types */
-
-typedef struct rocksdb_t                 rocksdb_t;
-typedef struct rocksdb_cache_t           rocksdb_cache_t;
-typedef struct rocksdb_comparator_t      rocksdb_comparator_t;
-typedef struct rocksdb_env_t             rocksdb_env_t;
-typedef struct rocksdb_filelock_t        rocksdb_filelock_t;
-typedef struct rocksdb_filterpolicy_t    rocksdb_filterpolicy_t;
-typedef struct rocksdb_flushoptions_t    rocksdb_flushoptions_t;
-typedef struct rocksdb_iterator_t        rocksdb_iterator_t;
-typedef struct rocksdb_logger_t          rocksdb_logger_t;
-typedef struct rocksdb_mergeoperator_t   rocksdb_mergeoperator_t;
-typedef struct rocksdb_options_t         rocksdb_options_t;
-typedef struct rocksdb_randomfile_t      rocksdb_randomfile_t;
-typedef struct rocksdb_readoptions_t     rocksdb_readoptions_t;
-typedef struct rocksdb_seqfile_t         rocksdb_seqfile_t;
-typedef struct rocksdb_slicetransform_t  rocksdb_slicetransform_t;
-typedef struct rocksdb_snapshot_t        rocksdb_snapshot_t;
-typedef struct rocksdb_writablefile_t    rocksdb_writablefile_t;
-typedef struct rocksdb_writebatch_t      rocksdb_writebatch_t;
-typedef struct rocksdb_writeoptions_t    rocksdb_writeoptions_t;
-typedef struct rocksdb_universal_compaction_options_t rocksdb_universal_compaction_options_t;
-typedef struct rocksdb_livefiles_t     rocksdb_livefiles_t;
-
-/* DB operations */
-
-extern rocksdb_t* rocksdb_open(
-    const rocksdb_options_t* options,
-    const char* name,
-    char** errptr);
-
-extern rocksdb_t* rocksdb_open_for_read_only(
-    const rocksdb_options_t* options,
-    const char* name,
-    unsigned char error_if_log_file_exist,
-    char** errptr);
-
-extern void rocksdb_close(rocksdb_t* db);
-
-extern void rocksdb_put(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    const char* key, size_t keylen,
-    const char* val, size_t vallen,
-    char** errptr);
-
-extern void rocksdb_delete(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    const char* key, size_t keylen,
-    char** errptr);
-
-extern void rocksdb_merge(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    const char* key, size_t keylen,
-    const char* val, size_t vallen,
-    char** errptr);
-
-extern void rocksdb_write(
-    rocksdb_t* db,
-    const rocksdb_writeoptions_t* options,
-    rocksdb_writebatch_t* batch,
-    char** errptr);
-
-/* Returns NULL if not found.  A malloc()ed array otherwise.
-   Stores the length of the array in *vallen. */
-extern char* rocksdb_get(
-    rocksdb_t* db,
-    const rocksdb_readoptions_t* options,
-    const char* key, size_t keylen,
-    size_t* vallen,
-    char** errptr);
-
-extern rocksdb_iterator_t* rocksdb_create_iterator(
-    rocksdb_t* db,
-    const rocksdb_readoptions_t* options);
-
-extern const rocksdb_snapshot_t* rocksdb_create_snapshot(
-    rocksdb_t* db);
-
-extern void rocksdb_release_snapshot(
-    rocksdb_t* db,
-    const rocksdb_snapshot_t* snapshot);
-
-/* Returns NULL if property name is unknown.
-   Else returns a pointer to a malloc()-ed null-terminated value. */
-extern char* rocksdb_property_value(
-    rocksdb_t* db,
-    const char* propname);
-
-extern void rocksdb_approximate_sizes(
-    rocksdb_t* db,
-    int num_ranges,
-    const char* const* range_start_key, const size_t* range_start_key_len,
-    const char* const* range_limit_key, const size_t* range_limit_key_len,
-    uint64_t* sizes);
-
-extern void rocksdb_compact_range(
-    rocksdb_t* db,
-    const char* start_key, size_t start_key_len,
-    const char* limit_key, size_t limit_key_len);
-
-extern void rocksdb_delete_file(
-    rocksdb_t* db,
-    const char* name);
-
-extern const rocksdb_livefiles_t* rocksdb_livefiles(
-    rocksdb_t* db);
-
-extern void rocksdb_flush(
-    rocksdb_t* db,
-    const rocksdb_flushoptions_t* options,
-    char** errptr);
-
-extern void rocksdb_disable_file_deletions(
-    rocksdb_t* db,
-    char** errptr);
-
-extern void rocksdb_enable_file_deletions(
-    rocksdb_t* db,
-    unsigned char force,
-    char** errptr);
-
-/* Management operations */
-
-extern void rocksdb_destroy_db(
-    const rocksdb_options_t* options,
-    const char* name,
-    char** errptr);
-
-extern void rocksdb_repair_db(
-    const rocksdb_options_t* options,
-    const char* name,
-    char** errptr);
-
-/* Iterator */
-
-extern void rocksdb_iter_destroy(rocksdb_iterator_t*);
-extern unsigned char rocksdb_iter_valid(const rocksdb_iterator_t*);
-extern void rocksdb_iter_seek_to_first(rocksdb_iterator_t*);
-extern void rocksdb_iter_seek_to_last(rocksdb_iterator_t*);
-extern void rocksdb_iter_seek(rocksdb_iterator_t*, const char* k, size_t klen);
-extern void rocksdb_iter_next(rocksdb_iterator_t*);
-extern void rocksdb_iter_prev(rocksdb_iterator_t*);
-extern const char* rocksdb_iter_key(const rocksdb_iterator_t*, size_t* klen);
-extern const char* rocksdb_iter_value(const rocksdb_iterator_t*, size_t* vlen);
-extern void rocksdb_iter_get_error(const rocksdb_iterator_t*, char** errptr);
-
-/* Write batch */
-
-extern rocksdb_writebatch_t* rocksdb_writebatch_create();
-extern void rocksdb_writebatch_destroy(rocksdb_writebatch_t*);
-extern void rocksdb_writebatch_clear(rocksdb_writebatch_t*);
-extern int rocksdb_writebatch_count(rocksdb_writebatch_t*);
-extern void rocksdb_writebatch_put(
-    rocksdb_writebatch_t*,
-    const char* key, size_t klen,
-    const char* val, size_t vlen);
-extern void rocksdb_writebatch_merge(
-    rocksdb_writebatch_t*,
-    const char* key, size_t klen,
-    const char* val, size_t vlen);
-extern void rocksdb_writebatch_delete(
-    rocksdb_writebatch_t*,
-    const char* key, size_t klen);
-extern void rocksdb_writebatch_iterate(
-    rocksdb_writebatch_t*,
-    void* state,
-    void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
-    void (*deleted)(void*, const char* k, size_t klen));
-extern const char* rocksdb_writebatch_data(rocksdb_writebatch_t*, size_t *size);
-
-/* Options */
-
-extern rocksdb_options_t* rocksdb_options_create();
-extern void rocksdb_options_destroy(rocksdb_options_t*);
-extern void rocksdb_options_set_comparator(
-    rocksdb_options_t*,
-    rocksdb_comparator_t*);
-extern void rocksdb_options_set_merge_operator(rocksdb_options_t*,
-                                               rocksdb_mergeoperator_t*);
-extern void rocksdb_options_set_compression_per_level(
-  rocksdb_options_t* opt,
-  int* level_values,
-  size_t num_levels);
-extern void rocksdb_options_set_filter_policy(
-    rocksdb_options_t*,
-    rocksdb_filterpolicy_t*);
-extern void rocksdb_options_set_create_if_missing(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_error_if_exists(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_paranoid_checks(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_env(rocksdb_options_t*, rocksdb_env_t*);
-extern void rocksdb_options_set_info_log(rocksdb_options_t*, rocksdb_logger_t*);
-extern void rocksdb_options_set_info_log_level(rocksdb_options_t*, int);
-extern void rocksdb_options_set_write_buffer_size(rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_max_open_files(rocksdb_options_t*, int);
-extern void rocksdb_options_set_cache(rocksdb_options_t*, rocksdb_cache_t*);
-extern void rocksdb_options_set_cache_compressed(rocksdb_options_t*, rocksdb_cache_t*);
-extern void rocksdb_options_set_block_size(rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_block_restart_interval(rocksdb_options_t*, int);
-extern void rocksdb_options_set_compression_options(
-    rocksdb_options_t*, int, int, int);
-extern void rocksdb_options_set_whole_key_filtering(rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_prefix_extractor(
-    rocksdb_options_t*, rocksdb_slicetransform_t*);
-extern void rocksdb_options_set_num_levels(rocksdb_options_t*, int);
-extern void rocksdb_options_set_level0_file_num_compaction_trigger(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_level0_slowdown_writes_trigger(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_level0_stop_writes_trigger(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_mem_compaction_level(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_target_file_size_base(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_target_file_size_multiplier(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_bytes_for_level_base(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_max_bytes_for_level_multiplier(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_expanded_compaction_factor(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_grandparent_overlap_factor(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_bytes_for_level_multiplier_additional(
-    rocksdb_options_t*, int* level_values, size_t num_levels);
-extern void rocksdb_options_enable_statistics(rocksdb_options_t*);
-
-extern void rocksdb_options_set_max_write_buffer_number(rocksdb_options_t*, int);
-extern void rocksdb_options_set_min_write_buffer_number_to_merge(rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_background_compactions(rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_background_flushes(rocksdb_options_t*, int);
-extern void rocksdb_options_set_max_log_file_size(rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_log_file_time_to_roll(rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_keep_log_file_num(rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_soft_rate_limit(rocksdb_options_t*, double);
-extern void rocksdb_options_set_hard_rate_limit(rocksdb_options_t*, double);
-extern void rocksdb_options_set_rate_limit_delay_max_milliseconds(
-    rocksdb_options_t*, unsigned int);
-extern void rocksdb_options_set_max_manifest_file_size(
-    rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_no_block_cache(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_table_cache_numshardbits(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_table_cache_remove_scan_count_limit(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_arena_block_size(
-    rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_use_fsync(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_db_stats_log_interval(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_db_log_dir(
-    rocksdb_options_t*, const char*);
-extern void rocksdb_options_set_wal_dir(
-    rocksdb_options_t*, const char*);
-extern void rocksdb_options_set_WAL_ttl_seconds(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_WAL_size_limit_MB(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_manifest_preallocation_size(
-    rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_purge_redundant_kvs_while_flush(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_allow_os_buffer(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_allow_mmap_reads(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_allow_mmap_writes(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_is_fd_close_on_exec(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_skip_log_error_on_recovery(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_stats_dump_period_sec(
-    rocksdb_options_t*, unsigned int);
-extern void rocksdb_options_set_block_size_deviation(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_advise_random_on_open(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_access_hint_on_compaction_start(
-    rocksdb_options_t*, int);
-extern void rocksdb_options_set_use_adaptive_mutex(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_bytes_per_sync(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_verify_checksums_in_compaction(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_filter_deletes(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_max_sequential_skip_in_iterations(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_disable_data_sync(rocksdb_options_t*, int);
-extern void rocksdb_options_set_disable_auto_compactions(rocksdb_options_t*, int);
-extern void rocksdb_options_set_disable_seek_compaction(rocksdb_options_t*, int);
-extern void rocksdb_options_set_delete_obsolete_files_period_micros(
-    rocksdb_options_t*, uint64_t);
-extern void rocksdb_options_set_source_compaction_factor(rocksdb_options_t*, int);
-extern void rocksdb_options_prepare_for_bulk_load(rocksdb_options_t*);
-extern void rocksdb_options_set_memtable_vector_rep(rocksdb_options_t*);
-extern void rocksdb_options_set_hash_skip_list_rep(rocksdb_options_t*, size_t, int32_t, int32_t);
-extern void rocksdb_options_set_hash_link_list_rep(rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_plain_table_factory(rocksdb_options_t*, uint32_t, int, double, size_t);
-
-extern void rocksdb_options_set_max_bytes_for_level_base(rocksdb_options_t* opt, uint64_t n);
-extern void rocksdb_options_set_stats_dump_period_sec(rocksdb_options_t* opt, unsigned int sec);
-
-extern void rocksdb_options_set_min_level_to_compress(rocksdb_options_t* opt, int level);
-
-extern void rocksdb_options_set_memtable_prefix_bloom_bits(
-    rocksdb_options_t*, uint32_t);
-extern void rocksdb_options_set_memtable_prefix_bloom_probes(
-    rocksdb_options_t*, uint32_t);
-extern void rocksdb_options_set_max_successive_merges(
-    rocksdb_options_t*, size_t);
-extern void rocksdb_options_set_min_partial_merge_operands(
-    rocksdb_options_t*, uint32_t);
-extern void rocksdb_options_set_bloom_locality(
-    rocksdb_options_t*, uint32_t);
-extern void rocksdb_options_set_allow_thread_local(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_inplace_update_support(
-    rocksdb_options_t*, unsigned char);
-extern void rocksdb_options_set_inplace_update_num_locks(
-    rocksdb_options_t*, size_t);
-
-enum {
-  rocksdb_no_compression = 0,
-  rocksdb_snappy_compression = 1,
-  rocksdb_zlib_compression = 2,
-  rocksdb_bz2_compression = 3,
-  rocksdb_lz4_compression = 4,
-  rocksdb_lz4hc_compression = 5
-};
-extern void rocksdb_options_set_compression(rocksdb_options_t*, int);
-
-enum {
-  rocksdb_level_compaction = 0,
-  rocksdb_universal_compaction = 1
-};
-extern void rocksdb_options_set_compaction_style(rocksdb_options_t*, int);
-extern void rocksdb_options_set_universal_compaction_options(rocksdb_options_t*, rocksdb_universal_compaction_options_t*);
-/* Comparator */
-
-extern rocksdb_comparator_t* rocksdb_comparator_create(
-    void* state,
-    void (*destructor)(void*),
-    int (*compare)(
-        void*,
-        const char* a, size_t alen,
-        const char* b, size_t blen),
-    const char* (*name)(void*));
-extern void rocksdb_comparator_destroy(rocksdb_comparator_t*);
-
-/* Filter policy */
-
-extern rocksdb_filterpolicy_t* rocksdb_filterpolicy_create(
-    void* state,
-    void (*destructor)(void*),
-    char* (*create_filter)(
-        void*,
-        const char* const* key_array, const size_t* key_length_array,
-        int num_keys,
-        size_t* filter_length),
-    unsigned char (*key_may_match)(
-        void*,
-        const char* key, size_t length,
-        const char* filter, size_t filter_length),
-    void (*delete_filter)(
-        void*,
-        const char* filter, size_t filter_length),
-    const char* (*name)(void*));
-extern void rocksdb_filterpolicy_destroy(rocksdb_filterpolicy_t*);
-
-extern rocksdb_filterpolicy_t* rocksdb_filterpolicy_create_bloom(
-    int bits_per_key);
-
-/* Merge Operator */
-
-extern rocksdb_mergeoperator_t* rocksdb_mergeoperator_create(
-    void* state,
-    void (*destructor)(void*),
-    char* (*full_merge)(
-        void*,
-        const char* key, size_t key_length,
-        const char* existing_value, size_t existing_value_length,
-        const char* const* operands_list, const size_t* operands_list_length,
-        int num_operands,
-        unsigned char* success, size_t* new_value_length),
-    char* (*partial_merge)(
-        void*,
-        const char* key, size_t key_length,
-        const char* const* operands_list, const size_t* operands_list_length,
-        int num_operands,
-        unsigned char* success, size_t* new_value_length),
-    void (*delete_value)(
-        void*,
-        const char* value, size_t value_length),
-    const char* (*name)(void*));
-extern void rocksdb_mergeoperator_destroy(rocksdb_mergeoperator_t*);
-
-/* Read options */
-
-extern rocksdb_readoptions_t* rocksdb_readoptions_create();
-extern void rocksdb_readoptions_destroy(rocksdb_readoptions_t*);
-extern void rocksdb_readoptions_set_verify_checksums(
-    rocksdb_readoptions_t*,
-    unsigned char);
-extern void rocksdb_readoptions_set_fill_cache(
-    rocksdb_readoptions_t*, unsigned char);
-extern void rocksdb_readoptions_set_snapshot(
-    rocksdb_readoptions_t*,
-    const rocksdb_snapshot_t*);
-extern void rocksdb_readoptions_set_read_tier(
-    rocksdb_readoptions_t*, int);
-extern void rocksdb_readoptions_set_tailing(
-    rocksdb_readoptions_t*, unsigned char);
-
-/* Write options */
-
-extern rocksdb_writeoptions_t* rocksdb_writeoptions_create();
-extern void rocksdb_writeoptions_destroy(rocksdb_writeoptions_t*);
-extern void rocksdb_writeoptions_set_sync(
-    rocksdb_writeoptions_t*, unsigned char);
-extern void rocksdb_writeoptions_disable_WAL(rocksdb_writeoptions_t* opt, int disable);
-
-/* Flush options */
-
-extern rocksdb_flushoptions_t* rocksdb_flushoptions_create();
-extern void rocksdb_flushoptions_destroy(rocksdb_flushoptions_t*);
-extern void rocksdb_flushoptions_set_wait(
-    rocksdb_flushoptions_t*, unsigned char);
-
-/* Cache */
-
-extern rocksdb_cache_t* rocksdb_cache_create_lru(size_t capacity);
-extern void rocksdb_cache_destroy(rocksdb_cache_t* cache);
-
-/* Env */
-
-extern rocksdb_env_t* rocksdb_create_default_env();
-extern void rocksdb_env_set_background_threads(rocksdb_env_t* env, int n);
-extern void rocksdb_env_set_high_priority_background_threads(rocksdb_env_t* env, int n);
-extern void rocksdb_env_destroy(rocksdb_env_t*);
-
-/* SliceTransform */
-
-extern rocksdb_slicetransform_t* rocksdb_slicetransform_create(
-    void* state,
-    void (*destructor)(void*),
-    char* (*transform)(
-        void*,
-        const char* key, size_t length,
-        size_t* dst_length),
-    unsigned char (*in_domain)(
-        void*,
-        const char* key, size_t length),
-    unsigned char (*in_range)(
-        void*,
-        const char* key, size_t length),
-    const char* (*name)(void*));
-extern rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t);
-extern void rocksdb_slicetransform_destroy(rocksdb_slicetransform_t*);
-
-/* Universal Compaction options */
-
-enum {
-  rocksdb_similar_size_compaction_stop_style = 0,
-  rocksdb_total_size_compaction_stop_style = 1
-};
-
-extern rocksdb_universal_compaction_options_t* rocksdb_universal_compaction_options_create() ;
-extern void rocksdb_universal_compaction_options_set_size_ratio(
-  rocksdb_universal_compaction_options_t*, int);
-extern void rocksdb_universal_compaction_options_set_min_merge_width(
-  rocksdb_universal_compaction_options_t*, int);
-extern void rocksdb_universal_compaction_options_set_max_merge_width(
-  rocksdb_universal_compaction_options_t*, int);
-extern void rocksdb_universal_compaction_options_set_max_size_amplification_percent(
-  rocksdb_universal_compaction_options_t*, int);
-extern void rocksdb_universal_compaction_options_set_compression_size_percent(
-  rocksdb_universal_compaction_options_t*, int);
-extern void rocksdb_universal_compaction_options_set_stop_style(
-  rocksdb_universal_compaction_options_t*, int);
-extern void rocksdb_universal_compaction_options_destroy(
-  rocksdb_universal_compaction_options_t*);
-
-extern int rocksdb_livefiles_count(
-  const rocksdb_livefiles_t*);
-extern const char* rocksdb_livefiles_name(
-  const rocksdb_livefiles_t*,
-  int index);
-extern int rocksdb_livefiles_level(
-  const rocksdb_livefiles_t*,
-  int index);
-extern size_t rocksdb_livefiles_size(
-  const rocksdb_livefiles_t*,
-  int index);
-extern const char* rocksdb_livefiles_smallestkey(
-  const rocksdb_livefiles_t*,
-  int index,
-  size_t* size);
-extern const char* rocksdb_livefiles_largestkey(
-  const rocksdb_livefiles_t*,
-  int index,
-  size_t* size);
-extern void rocksdb_livefiles_destroy(
-  const rocksdb_livefiles_t*);
-
-#ifdef __cplusplus
-}  /* end extern "C" */
-#endif
-
-#endif  /* STORAGE_ROCKSDB_INCLUDE_C_H_ */
diff --git a/src/rocksdb/include/rocksdb/cache.h b/src/rocksdb/include/rocksdb/cache.h
deleted file mode 100644
index 65d44b6..0000000
--- a/src/rocksdb/include/rocksdb/cache.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// A Cache is an interface that maps keys to values.  It has internal
-// synchronization and may be safely accessed concurrently from
-// multiple threads.  It may automatically evict entries to make room
-// for new entries.  Values have a specified charge against the cache
-// capacity.  For example, a cache where the values are variable
-// length strings, may use the length of the string as the charge for
-// the string.
-//
-// A builtin cache implementation with a least-recently-used eviction
-// policy is provided.  Clients may use their own implementations if
-// they want something more sophisticated (like scan-resistance, a
-// custom eviction policy, variable cache sizing, etc.)
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_CACHE_H_
-#define STORAGE_ROCKSDB_INCLUDE_CACHE_H_
-
-#include <memory>
-#include <stdint.h>
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-using std::shared_ptr;
-
-class Cache;
-
-// Create a new cache with a fixed size capacity. The cache is sharded
-// to 2^numShardBits shards, by hash of the key. The total capacity
-// is divided and evenly assigned to each shard. Inside each shard,
-// the eviction is done in two passes: first try to free spaces by
-// evicting entries that are among the most least used removeScanCountLimit
-// entries and do not have reference other than by the cache itself, in
-// the least-used order. If not enough space is freed, further free the
-// entries in least used order.
-//
-// The functions without parameter numShardBits and/or removeScanCountLimit
-// use default values. removeScanCountLimit's default value is 0, which
-// means a strict LRU order inside each shard.
-extern shared_ptr<Cache> NewLRUCache(size_t capacity);
-extern shared_ptr<Cache> NewLRUCache(size_t capacity, int numShardBits);
-extern shared_ptr<Cache> NewLRUCache(size_t capacity, int numShardBits,
-                                     int removeScanCountLimit);
-
-class Cache {
- public:
-  Cache() { }
-
-  // Destroys all existing entries by calling the "deleter"
-  // function that was passed to the constructor.
-  virtual ~Cache();
-
-  // Opaque handle to an entry stored in the cache.
-  struct Handle { };
-
-  // Insert a mapping from key->value into the cache and assign it
-  // the specified charge against the total cache capacity.
-  //
-  // Returns a handle that corresponds to the mapping.  The caller
-  // must call this->Release(handle) when the returned mapping is no
-  // longer needed.
-  //
-  // When the inserted entry is no longer needed, the key and
-  // value will be passed to "deleter".
-  virtual Handle* Insert(const Slice& key, void* value, size_t charge,
-                         void (*deleter)(const Slice& key, void* value)) = 0;
-
-  // If the cache has no mapping for "key", returns nullptr.
-  //
-  // Else return a handle that corresponds to the mapping.  The caller
-  // must call this->Release(handle) when the returned mapping is no
-  // longer needed.
-  virtual Handle* Lookup(const Slice& key) = 0;
-
-  // Release a mapping returned by a previous Lookup().
-  // REQUIRES: handle must not have been released yet.
-  // REQUIRES: handle must have been returned by a method on *this.
-  virtual void Release(Handle* handle) = 0;
-
-  // Return the value encapsulated in a handle returned by a
-  // successful Lookup().
-  // REQUIRES: handle must not have been released yet.
-  // REQUIRES: handle must have been returned by a method on *this.
-  virtual void* Value(Handle* handle) = 0;
-
-  // If the cache contains entry for key, erase it.  Note that the
-  // underlying entry will be kept around until all existing handles
-  // to it have been released.
-  virtual void Erase(const Slice& key) = 0;
-
-  // Return a new numeric id.  May be used by multiple clients who are
-  // sharing the same cache to partition the key space.  Typically the
-  // client will allocate a new id at startup and prepend the id to
-  // its cache keys.
-  virtual uint64_t NewId() = 0;
-
-  // returns the maximum configured capacity of the cache
-  virtual size_t GetCapacity() const = 0;
-
-  // returns the memory size for the entries residing in the cache.
-  virtual size_t GetUsage() const = 0;
-
-  // Call this on shutdown if you want to speed it up. Cache will disown
-  // any underlying data and will not free it on delete. This call will leak
-  // memory - call this only if you're shutting down the process.
-  // Any attempts of using cache after this call will fail terribly.
-  // Always delete the DB object before calling this method!
-  virtual void DisownData() {
-    // default implementation is noop
-  };
-
-  // Apply callback to all entries in the cache
-  // If thread_safe is true, it will also lock the accesses. Otherwise, it will
-  // access the cache without the lock held
-  virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
-                                      bool thread_safe) = 0;
-
- private:
-  void LRU_Remove(Handle* e);
-  void LRU_Append(Handle* e);
-  void Unref(Handle* e);
-
-  struct Rep;
-  Rep* rep_;
-
-  // No copying allowed
-  Cache(const Cache&);
-  void operator=(const Cache&);
-};
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_UTIL_CACHE_H_
diff --git a/src/rocksdb/include/rocksdb/compaction_filter.h b/src/rocksdb/include/rocksdb/compaction_filter.h
deleted file mode 100644
index 59b0509..0000000
--- a/src/rocksdb/include/rocksdb/compaction_filter.h
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2013 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_COMPACTION_FILTER_H_
-#define STORAGE_ROCKSDB_INCLUDE_COMPACTION_FILTER_H_
-
-#include <string>
-#include <vector>
-
-namespace rocksdb {
-
-class Slice;
-class SliceTransform;
-
-// Context information of a compaction run
-struct CompactionFilterContext {
-  // Does this compaction run include all data files
-  bool is_full_compaction;
-  // Is this compaction requested by the client (true),
-  // or is it occurring as an automatic compaction process
-  bool is_manual_compaction;
-};
-
-// CompactionFilter allows an application to modify/delete a key-value at
-// the time of compaction.
-
-class CompactionFilter {
- public:
-  // Context information of a compaction run
-  struct Context {
-    // Does this compaction run include all data files
-    bool is_full_compaction;
-    // Is this compaction requested by the client (true),
-    // or is it occurring as an automatic compaction process
-    bool is_manual_compaction;
-  };
-
-  virtual ~CompactionFilter() {}
-
-  // The compaction process invokes this
-  // method for kv that is being compacted. A return value
-  // of false indicates that the kv should be preserved in the
-  // output of this compaction run and a return value of true
-  // indicates that this key-value should be removed from the
-  // output of the compaction.  The application can inspect
-  // the existing value of the key and make decision based on it.
-  //
-  // When the value is to be preserved, the application has the option
-  // to modify the existing_value and pass it back through new_value.
-  // value_changed needs to be set to true in this case.
-  //
-  // If multithreaded compaction is being used *and* a single CompactionFilter
-  // instance was supplied via Options::compaction_filter, this method may be
-  // called from different threads concurrently.  The application must ensure
-  // that the call is thread-safe.
-  //
-  // If the CompactionFilter was created by a factory, then it will only ever
-  // be used by a single thread that is doing the compaction run, and this
-  // call does not need to be thread-safe.  However, multiple filters may be
-  // in existence and operating concurrently.
-  virtual bool Filter(int level,
-                      const Slice& key,
-                      const Slice& existing_value,
-                      std::string* new_value,
-                      bool* value_changed) const = 0;
-
-  // Returns a name that identifies this compaction filter.
-  // The name will be printed to LOG file on start up for diagnosis.
-  virtual const char* Name() const = 0;
-};
-
-// CompactionFilterV2 that buffers kv pairs sharing the same prefix and let
-// application layer to make individual decisions for all the kv pairs in the
-// buffer.
-class CompactionFilterV2 {
- public:
-  virtual ~CompactionFilterV2() {}
-
-  // The compaction process invokes this method for all the kv pairs
-  // sharing the same prefix. It is a "roll-up" version of CompactionFilter.
-  //
-  // Each entry in the return vector indicates if the corresponding kv should
-  // be preserved in the output of this compaction run. The application can
-  // inspect the exisitng values of the keys and make decision based on it.
-  //
-  // When a value is to be preserved, the application has the option
-  // to modify the entry in existing_values and pass it back through an entry
-  // in new_values. A corresponding values_changed entry needs to be set to
-  // true in this case. Note that the new_values vector contains only changed
-  // values, i.e. new_values.size() <= values_changed.size().
-  //
-  typedef std::vector<Slice> SliceVector;
-  virtual std::vector<bool> Filter(int level,
-                                   const SliceVector& keys,
-                                   const SliceVector& existing_values,
-                                   std::vector<std::string>* new_values,
-                                   std::vector<bool>* values_changed)
-    const = 0;
-
-  // Returns a name that identifies this compaction filter.
-  // The name will be printed to LOG file on start up for diagnosis.
-  virtual const char* Name() const = 0;
-};
-
-// Each compaction will create a new CompactionFilter allowing the
-// application to know about different campactions
-class CompactionFilterFactory {
- public:
-  virtual ~CompactionFilterFactory() { }
-
-  virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-      const CompactionFilter::Context& context) = 0;
-
-  // Returns a name that identifies this compaction filter factory.
-  virtual const char* Name() const = 0;
-};
-
-// Default implementaion of CompactionFilterFactory which does not
-// return any filter
-class DefaultCompactionFilterFactory : public CompactionFilterFactory {
- public:
-  virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-      const CompactionFilter::Context& context) override {
-    return std::unique_ptr<CompactionFilter>(nullptr);
-  }
-
-  virtual const char* Name() const override {
-    return "DefaultCompactionFilterFactory";
-  }
-};
-
-// Each compaction will create a new CompactionFilterV2
-//
-// CompactionFilterFactoryV2 enables application to specify a prefix and use
-// CompactionFilterV2 to filter kv-pairs in batches. Each batch contains all
-// the kv-pairs sharing the same prefix.
-//
-// This is useful for applications that require grouping kv-pairs in
-// compaction filter to make a purge/no-purge decision. For example, if the
-// key prefix is user id and the rest of key represents the type of value.
-// This batching filter will come in handy if the application's compaction
-// filter requires knowledge of all types of values for any user id.
-//
-class CompactionFilterFactoryV2 {
- public:
-  // NOTE: CompactionFilterFactoryV2 will not delete prefix_extractor
-  explicit CompactionFilterFactoryV2(const SliceTransform* prefix_extractor)
-    : prefix_extractor_(prefix_extractor) { }
-
-  virtual ~CompactionFilterFactoryV2() { }
-
-  virtual std::unique_ptr<CompactionFilterV2> CreateCompactionFilterV2(
-    const CompactionFilterContext& context) = 0;
-
-  // Returns a name that identifies this compaction filter factory.
-  virtual const char* Name() const = 0;
-
-  const SliceTransform* GetPrefixExtractor() const {
-    return prefix_extractor_;
-  }
-
-  void SetPrefixExtractor(const SliceTransform* prefix_extractor) {
-    prefix_extractor_ = prefix_extractor;
-  }
-
- private:
-  // Prefix extractor for compaction filter v2
-  // Keys sharing the same prefix will be buffered internally.
-  // Client can implement a Filter callback function to operate on the buffer
-  const SliceTransform* prefix_extractor_;
-};
-
-// Default implementaion of CompactionFilterFactoryV2 which does not
-// return any filter
-class DefaultCompactionFilterFactoryV2 : public CompactionFilterFactoryV2 {
- public:
-  explicit DefaultCompactionFilterFactoryV2()
-      : CompactionFilterFactoryV2(nullptr) { }
-
-  virtual std::unique_ptr<CompactionFilterV2>
-  CreateCompactionFilterV2(
-      const CompactionFilterContext& context) override {
-    return std::unique_ptr<CompactionFilterV2>(nullptr);
-  }
-
-  virtual const char* Name() const override {
-    return "DefaultCompactionFilterFactoryV2";
-  }
-};
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_COMPACTION_FILTER_H_
diff --git a/src/rocksdb/include/rocksdb/comparator.h b/src/rocksdb/include/rocksdb/comparator.h
deleted file mode 100644
index f3a8499..0000000
--- a/src/rocksdb/include/rocksdb/comparator.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_COMPARATOR_H_
-#define STORAGE_ROCKSDB_INCLUDE_COMPARATOR_H_
-
-#include <string>
-
-namespace rocksdb {
-
-class Slice;
-
-// A Comparator object provides a total order across slices that are
-// used as keys in an sstable or a database.  A Comparator implementation
-// must be thread-safe since rocksdb may invoke its methods concurrently
-// from multiple threads.
-class Comparator {
- public:
-  virtual ~Comparator();
-
-  // Three-way comparison.  Returns value:
-  //   < 0 iff "a" < "b",
-  //   == 0 iff "a" == "b",
-  //   > 0 iff "a" > "b"
-  virtual int Compare(const Slice& a, const Slice& b) const = 0;
-
-  // The name of the comparator.  Used to check for comparator
-  // mismatches (i.e., a DB created with one comparator is
-  // accessed using a different comparator.
-  //
-  // The client of this package should switch to a new name whenever
-  // the comparator implementation changes in a way that will cause
-  // the relative ordering of any two keys to change.
-  //
-  // Names starting with "rocksdb." are reserved and should not be used
-  // by any clients of this package.
-  virtual const char* Name() const = 0;
-
-  // Advanced functions: these are used to reduce the space requirements
-  // for internal data structures like index blocks.
-
-  // If *start < limit, changes *start to a short string in [start,limit).
-  // Simple comparator implementations may return with *start unchanged,
-  // i.e., an implementation of this method that does nothing is correct.
-  virtual void FindShortestSeparator(
-      std::string* start,
-      const Slice& limit) const = 0;
-
-  // Changes *key to a short string >= *key.
-  // Simple comparator implementations may return with *key unchanged,
-  // i.e., an implementation of this method that does nothing is correct.
-  virtual void FindShortSuccessor(std::string* key) const = 0;
-};
-
-// Return a builtin comparator that uses lexicographic byte-wise
-// ordering.  The result remains the property of this module and
-// must not be deleted.
-extern const Comparator* BytewiseComparator();
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_COMPARATOR_H_
diff --git a/src/rocksdb/include/rocksdb/db.h b/src/rocksdb/include/rocksdb/db.h
deleted file mode 100644
index e743b4c..0000000
--- a/src/rocksdb/include/rocksdb/db.h
+++ /dev/null
@@ -1,495 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_DB_H_
-#define STORAGE_ROCKSDB_INCLUDE_DB_H_
-
-#include <stdint.h>
-#include <stdio.h>
-#include <memory>
-#include <vector>
-#include <string>
-#include <unordered_map>
-#include "rocksdb/version.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-#include "rocksdb/types.h"
-#include "rocksdb/transaction_log.h"
-
-namespace rocksdb {
-
-using std::unique_ptr;
-
-class ColumnFamilyHandle {
- public:
-  virtual ~ColumnFamilyHandle() {}
-};
-extern const std::string kDefaultColumnFamilyName;
-
-struct ColumnFamilyDescriptor {
-  std::string name;
-  ColumnFamilyOptions options;
-  ColumnFamilyDescriptor()
-      : name(kDefaultColumnFamilyName), options(ColumnFamilyOptions()) {}
-  ColumnFamilyDescriptor(const std::string& _name,
-                         const ColumnFamilyOptions& _options)
-      : name(_name), options(_options) {}
-};
-
-static const int kMajorVersion = __ROCKSDB_MAJOR__;
-static const int kMinorVersion = __ROCKSDB_MINOR__;
-
-struct Options;
-struct ReadOptions;
-struct WriteOptions;
-struct FlushOptions;
-struct TableProperties;
-class WriteBatch;
-class Env;
-
-// Metadata associated with each SST file.
-struct LiveFileMetaData {
-  std::string column_family_name;  // Name of the column family
-  std::string name;                // Name of the file
-  int level;               // Level at which this file resides.
-  size_t size;             // File size in bytes.
-  std::string smallestkey; // Smallest user defined key in the file.
-  std::string largestkey;  // Largest user defined key in the file.
-  SequenceNumber smallest_seqno; // smallest seqno in file
-  SequenceNumber largest_seqno;  // largest seqno in file
-};
-
-// Abstract handle to particular state of a DB.
-// A Snapshot is an immutable object and can therefore be safely
-// accessed from multiple threads without any external synchronization.
-class Snapshot {
- protected:
-  virtual ~Snapshot();
-};
-
-// A range of keys
-struct Range {
-  Slice start;          // Included in the range
-  Slice limit;          // Not included in the range
-
-  Range() { }
-  Range(const Slice& s, const Slice& l) : start(s), limit(l) { }
-};
-
-// A collections of table properties objects, where
-//  key: is the table's file name.
-//  value: the table properties object of the given table.
-typedef std::unordered_map<std::string, std::shared_ptr<const TableProperties>>
-    TablePropertiesCollection;
-
-// A DB is a persistent ordered map from keys to values.
-// A DB is safe for concurrent access from multiple threads without
-// any external synchronization.
-class DB {
- public:
-  // Open the database with the specified "name".
-  // Stores a pointer to a heap-allocated database in *dbptr and returns
-  // OK on success.
-  // Stores nullptr in *dbptr and returns a non-OK status on error.
-  // Caller should delete *dbptr when it is no longer needed.
-  static Status Open(const Options& options,
-                     const std::string& name,
-                     DB** dbptr);
-
-  // Open the database for read only. All DB interfaces
-  // that modify data, like put/delete, will return error.
-  // If the db is opened in read only mode, then no compactions
-  // will happen.
-  static Status OpenForReadOnly(const Options& options,
-      const std::string& name, DB** dbptr,
-      bool error_if_log_file_exist = false);
-
-  // Open the database for read only with column families. When opening DB with
-  // read only, you can specify only a subset of column families in the
-  // database that should be opened. However, you always need to specify default
-  // column family. The default column family name is 'default' and it's stored
-  // in rocksdb::kDefaultColumnFamilyName
-  static Status OpenForReadOnly(
-      const DBOptions& db_options, const std::string& name,
-      const std::vector<ColumnFamilyDescriptor>& column_families,
-      std::vector<ColumnFamilyHandle*>* handles, DB** dbptr,
-      bool error_if_log_file_exist = false);
-
-  // Open DB with column families.
-  // db_options specify database specific options
-  // column_families is the vector of all column families in the databse,
-  // containing column family name and options. You need to open ALL column
-  // families in the database. To get the list of column families, you can use
-  // ListColumnFamilies(). Also, you can open only a subset of column families
-  // for read-only access.
-  // The default column family name is 'default' and it's stored
-  // in rocksdb::kDefaultColumnFamilyName.
-  // If everything is OK, handles will on return be the same size
-  // as column_families --- handles[i] will be a handle that you
-  // will use to operate on column family column_family[i]
-  static Status Open(const DBOptions& db_options, const std::string& name,
-                     const std::vector<ColumnFamilyDescriptor>& column_families,
-                     std::vector<ColumnFamilyHandle*>* handles, DB** dbptr);
-
-  // ListColumnFamilies will open the DB specified by argument name
-  // and return the list of all column families in that DB
-  // through column_families argument. The ordering of
-  // column families in column_families is unspecified.
-  static Status ListColumnFamilies(const DBOptions& db_options,
-                                   const std::string& name,
-                                   std::vector<std::string>* column_families);
-
-  DB() { }
-  virtual ~DB();
-
-  // Create a column_family and return the handle of column family
-  // through the argument handle.
-  virtual Status CreateColumnFamily(const ColumnFamilyOptions& options,
-                                    const std::string& column_family_name,
-                                    ColumnFamilyHandle** handle);
-
-  // Drop a column family specified by column_family handle. This call
-  // only records a drop record in the manifest and prevents the column
-  // family from flushing and compacting.
-  virtual Status DropColumnFamily(ColumnFamilyHandle* column_family);
-
-  // Set the database entry for "key" to "value".
-  // Returns OK on success, and a non-OK status on error.
-  // Note: consider setting options.sync = true.
-  virtual Status Put(const WriteOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     const Slice& value) = 0;
-  virtual Status Put(const WriteOptions& options, const Slice& key,
-                     const Slice& value) {
-    return Put(options, DefaultColumnFamily(), key, value);
-  }
-
-  // Remove the database entry (if any) for "key".  Returns OK on
-  // success, and a non-OK status on error.  It is not an error if "key"
-  // did not exist in the database.
-  // Note: consider setting options.sync = true.
-  virtual Status Delete(const WriteOptions& options,
-                        ColumnFamilyHandle* column_family,
-                        const Slice& key) = 0;
-  virtual Status Delete(const WriteOptions& options, const Slice& key) {
-    return Delete(options, DefaultColumnFamily(), key);
-  }
-
-  // Merge the database entry for "key" with "value".  Returns OK on success,
-  // and a non-OK status on error. The semantics of this operation is
-  // determined by the user provided merge_operator when opening DB.
-  // Note: consider setting options.sync = true.
-  virtual Status Merge(const WriteOptions& options,
-                       ColumnFamilyHandle* column_family, const Slice& key,
-                       const Slice& value) = 0;
-  virtual Status Merge(const WriteOptions& options, const Slice& key,
-                       const Slice& value) {
-    return Merge(options, DefaultColumnFamily(), key, value);
-  }
-
-  // Apply the specified updates to the database.
-  // Returns OK on success, non-OK on failure.
-  // Note: consider setting options.sync = true.
-  virtual Status Write(const WriteOptions& options, WriteBatch* updates) = 0;
-
-  // If the database contains an entry for "key" store the
-  // corresponding value in *value and return OK.
-  //
-  // If there is no entry for "key" leave *value unchanged and return
-  // a status for which Status::IsNotFound() returns true.
-  //
-  // May return some other Status on an error.
-  virtual Status Get(const ReadOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     std::string* value) = 0;
-  virtual Status Get(const ReadOptions& options, const Slice& key, std::string* value) {
-    return Get(options, DefaultColumnFamily(), key, value);
-  }
-
-  // If keys[i] does not exist in the database, then the i'th returned
-  // status will be one for which Status::IsNotFound() is true, and
-  // (*values)[i] will be set to some arbitrary value (often ""). Otherwise,
-  // the i'th returned status will have Status::ok() true, and (*values)[i]
-  // will store the value associated with keys[i].
-  //
-  // (*values) will always be resized to be the same size as (keys).
-  // Similarly, the number of returned statuses will be the number of keys.
-  // Note: keys will not be "de-duplicated". Duplicate keys will return
-  // duplicate values in order.
-  virtual std::vector<Status> MultiGet(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      const std::vector<Slice>& keys, std::vector<std::string>* values) = 0;
-  virtual std::vector<Status> MultiGet(const ReadOptions& options,
-                                       const std::vector<Slice>& keys,
-                                       std::vector<std::string>* values) {
-    return MultiGet(options, std::vector<ColumnFamilyHandle*>(
-                                 keys.size(), DefaultColumnFamily()),
-                    keys, values);
-  }
-
-  // If the key definitely does not exist in the database, then this method
-  // returns false, else true. If the caller wants to obtain value when the key
-  // is found in memory, a bool for 'value_found' must be passed. 'value_found'
-  // will be true on return if value has been set properly.
-  // This check is potentially lighter-weight than invoking DB::Get(). One way
-  // to make this lighter weight is to avoid doing any IOs.
-  // Default implementation here returns true and sets 'value_found' to false
-  virtual bool KeyMayExist(const ReadOptions& options,
-                           ColumnFamilyHandle* column_family, const Slice& key,
-                           std::string* value, bool* value_found = nullptr) {
-    if (value_found != nullptr) {
-      *value_found = false;
-    }
-    return true;
-  }
-  virtual bool KeyMayExist(const ReadOptions& options, const Slice& key,
-                           std::string* value, bool* value_found = nullptr) {
-    return KeyMayExist(options, DefaultColumnFamily(), key, value, value_found);
-  }
-
-  // Return a heap-allocated iterator over the contents of the database.
-  // The result of NewIterator() is initially invalid (caller must
-  // call one of the Seek methods on the iterator before using it).
-  //
-  // Caller should delete the iterator when it is no longer needed.
-  // The returned iterator should be deleted before this db is deleted.
-  virtual Iterator* NewIterator(const ReadOptions& options,
-                                ColumnFamilyHandle* column_family) = 0;
-  virtual Iterator* NewIterator(const ReadOptions& options) {
-    return NewIterator(options, DefaultColumnFamily());
-  }
-  // Returns iterators from a consistent database state across multiple
-  // column families. Iterators are heap allocated and need to be deleted
-  // before the db is deleted
-  virtual Status NewIterators(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_families,
-      std::vector<Iterator*>* iterators) = 0;
-
-  // Return a handle to the current DB state.  Iterators created with
-  // this handle will all observe a stable snapshot of the current DB
-  // state.  The caller must call ReleaseSnapshot(result) when the
-  // snapshot is no longer needed.
-  //
-  // nullptr will be returned if the DB fails to take a snapshot or does
-  // not support snapshot.
-  virtual const Snapshot* GetSnapshot() = 0;
-
-  // Release a previously acquired snapshot.  The caller must not
-  // use "snapshot" after this call.
-  virtual void ReleaseSnapshot(const Snapshot* snapshot) = 0;
-
-  // DB implementations can export properties about their state
-  // via this method.  If "property" is a valid property understood by this
-  // DB implementation, fills "*value" with its current value and returns
-  // true.  Otherwise returns false.
-  //
-  //
-  // Valid property names include:
-  //
-  //  "rocksdb.num-files-at-level<N>" - return the number of files at level <N>,
-  //     where <N> is an ASCII representation of a level number (e.g. "0").
-  //  "rocksdb.stats" - returns a multi-line string that describes statistics
-  //     about the internal operation of the DB.
-  //  "rocksdb.sstables" - returns a multi-line string that describes all
-  //     of the sstables that make up the db contents.
-  virtual bool GetProperty(ColumnFamilyHandle* column_family,
-                           const Slice& property, std::string* value) = 0;
-  virtual bool GetProperty(const Slice& property, std::string* value) {
-    return GetProperty(DefaultColumnFamily(), property, value);
-  }
-
-  // For each i in [0,n-1], store in "sizes[i]", the approximate
-  // file system space used by keys in "[range[i].start .. range[i].limit)".
-  //
-  // Note that the returned sizes measure file system space usage, so
-  // if the user data compresses by a factor of ten, the returned
-  // sizes will be one-tenth the size of the corresponding user data size.
-  //
-  // The results may not include the sizes of recently written data.
-  virtual void GetApproximateSizes(ColumnFamilyHandle* column_family,
-                                   const Range* range, int n,
-                                   uint64_t* sizes) = 0;
-  virtual void GetApproximateSizes(const Range* range, int n, uint64_t* sizes) {
-    GetApproximateSizes(DefaultColumnFamily(), range, n, sizes);
-  }
-
-  // Compact the underlying storage for the key range [*begin,*end].
-  // The actual compaction interval might be superset of [*begin, *end].
-  // In particular, deleted and overwritten versions are discarded,
-  // and the data is rearranged to reduce the cost of operations
-  // needed to access the data.  This operation should typically only
-  // be invoked by users who understand the underlying implementation.
-  //
-  // begin==nullptr is treated as a key before all keys in the database.
-  // end==nullptr is treated as a key after all keys in the database.
-  // Therefore the following call will compact the entire database:
-  //    db->CompactRange(nullptr, nullptr);
-  // Note that after the entire database is compacted, all data are pushed
-  // down to the last level containing any data. If the total data size
-  // after compaction is reduced, that level might not be appropriate for
-  // hosting all the files. In this case, client could set reduce_level
-  // to true, to move the files back to the minimum level capable of holding
-  // the data set or a given level (specified by non-negative target_level).
-  virtual Status CompactRange(ColumnFamilyHandle* column_family,
-                              const Slice* begin, const Slice* end,
-                              bool reduce_level = false,
-                              int target_level = -1) = 0;
-  virtual Status CompactRange(const Slice* begin, const Slice* end,
-                              bool reduce_level = false,
-                              int target_level = -1) {
-    return CompactRange(DefaultColumnFamily(), begin, end, reduce_level,
-                        target_level);
-  }
-
-  // Number of levels used for this DB.
-  virtual int NumberLevels(ColumnFamilyHandle* column_family) = 0;
-  virtual int NumberLevels() { return NumberLevels(DefaultColumnFamily()); }
-
-  // Maximum level to which a new compacted memtable is pushed if it
-  // does not create overlap.
-  virtual int MaxMemCompactionLevel(ColumnFamilyHandle* column_family) = 0;
-  virtual int MaxMemCompactionLevel() {
-    return MaxMemCompactionLevel(DefaultColumnFamily());
-  }
-
-  // Number of files in level-0 that would stop writes.
-  virtual int Level0StopWriteTrigger(ColumnFamilyHandle* column_family) = 0;
-  virtual int Level0StopWriteTrigger() {
-    return Level0StopWriteTrigger(DefaultColumnFamily());
-  }
-
-  // Get DB name -- the exact same name that was provided as an argument to
-  // DB::Open()
-  virtual const std::string& GetName() const = 0;
-
-  // Get Env object from the DB
-  virtual Env* GetEnv() const = 0;
-
-  // Get DB Options that we use
-  virtual const Options& GetOptions(ColumnFamilyHandle* column_family)
-      const = 0;
-  virtual const Options& GetOptions() const {
-    return GetOptions(DefaultColumnFamily());
-  }
-
-  // Flush all mem-table data.
-  virtual Status Flush(const FlushOptions& options,
-                       ColumnFamilyHandle* column_family) = 0;
-  virtual Status Flush(const FlushOptions& options) {
-    return Flush(options, DefaultColumnFamily());
-  }
-
-  // The sequence number of the most recent transaction.
-  virtual SequenceNumber GetLatestSequenceNumber() const = 0;
-
-#ifndef ROCKSDB_LITE
-
-  // Prevent file deletions. Compactions will continue to occur,
-  // but no obsolete files will be deleted. Calling this multiple
-  // times have the same effect as calling it once.
-  virtual Status DisableFileDeletions() = 0;
-
-  // Allow compactions to delete obselete files.
-  // If force == true, the call to EnableFileDeletions() will guarantee that
-  // file deletions are enabled after the call, even if DisableFileDeletions()
-  // was called multiple times before.
-  // If force == false, EnableFileDeletions will only enable file deletion
-  // after it's been called at least as many times as DisableFileDeletions(),
-  // enabling the two methods to be called by two threads concurrently without
-  // synchronization -- i.e., file deletions will be enabled only after both
-  // threads call EnableFileDeletions()
-  virtual Status EnableFileDeletions(bool force = true) = 0;
-
-  // GetLiveFiles followed by GetSortedWalFiles can generate a lossless backup
-
-  // THIS METHOD IS DEPRECATED. Use the GetLiveFilesMetaData to get more
-  // detailed information on the live files.
-  // Retrieve the list of all files in the database. The files are
-  // relative to the dbname and are not absolute paths. The valid size of the
-  // manifest file is returned in manifest_file_size. The manifest file is an
-  // ever growing file, but only the portion specified by manifest_file_size is
-  // valid for this snapshot.
-  // Setting flush_memtable to true does Flush before recording the live files.
-  // Setting flush_memtable to false is useful when we don't want to wait for
-  // flush which may have to wait for compaction to complete taking an
-  // indeterminate time.
-  //
-  // In case you have multiple column families, even if flush_memtable is true,
-  // you still need to call GetSortedWalFiles after GetLiveFiles to compensate
-  // for new data that arrived to already-flushed column families while other
-  // column families were flushing
-  virtual Status GetLiveFiles(std::vector<std::string>&,
-                              uint64_t* manifest_file_size,
-                              bool flush_memtable = true) = 0;
-
-  // Retrieve the sorted list of all wal files with earliest file first
-  virtual Status GetSortedWalFiles(VectorLogPtr& files) = 0;
-
-  // Sets iter to an iterator that is positioned at a write-batch containing
-  // seq_number. If the sequence number is non existent, it returns an iterator
-  // at the first available seq_no after the requested seq_no
-  // Returns Status::OK if iterator is valid
-  // Must set WAL_ttl_seconds or WAL_size_limit_MB to large values to
-  // use this api, else the WAL files will get
-  // cleared aggressively and the iterator might keep getting invalid before
-  // an update is read.
-  virtual Status GetUpdatesSince(
-      SequenceNumber seq_number, unique_ptr<TransactionLogIterator>* iter,
-      const TransactionLogIterator::ReadOptions&
-          read_options = TransactionLogIterator::ReadOptions()) = 0;
-
-  // Delete the file name from the db directory and update the internal state to
-  // reflect that. Supports deletion of sst and log files only. 'name' must be
-  // path relative to the db directory. eg. 000001.sst, /archive/000003.log
-  virtual Status DeleteFile(std::string name) = 0;
-
-  // Returns a list of all table files with their level, start key
-  // and end key
-  virtual void GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) {}
-
-#endif  // ROCKSDB_LITE
-
-  // Sets the globally unique ID created at database creation time by invoking
-  // Env::GenerateUniqueId(), in identity. Returns Status::OK if identity could
-  // be set properly
-  virtual Status GetDbIdentity(std::string& identity) = 0;
-
-  // Returns default column family handle
-  virtual ColumnFamilyHandle* DefaultColumnFamily() const = 0;
-
-#ifndef ROCKSDB_LITE
-  virtual Status GetPropertiesOfAllTables(ColumnFamilyHandle* column_family,
-                                          TablePropertiesCollection* props) = 0;
-  virtual Status GetPropertiesOfAllTables(TablePropertiesCollection* props) {
-    return GetPropertiesOfAllTables(DefaultColumnFamily(), props);
-  }
-#endif  // ROCKSDB_LITE
-
- private:
-  // No copying allowed
-  DB(const DB&);
-  void operator=(const DB&);
-};
-
-// Destroy the contents of the specified database.
-// Be very careful using this method.
-Status DestroyDB(const std::string& name, const Options& options);
-
-#ifndef ROCKSDB_LITE
-// If a DB cannot be opened, you may attempt to call this method to
-// resurrect as much of the contents of the database as possible.
-// Some data may be lost, so be careful when calling this function
-// on a database that contains important information.
-Status RepairDB(const std::string& dbname, const Options& options);
-#endif
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_DB_H_
diff --git a/src/rocksdb/include/rocksdb/env.h b/src/rocksdb/include/rocksdb/env.h
deleted file mode 100644
index 6a96351..0000000
--- a/src/rocksdb/include/rocksdb/env.h
+++ /dev/null
@@ -1,772 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// An Env is an interface used by the rocksdb implementation to access
-// operating system functionality like the filesystem etc.  Callers
-// may wish to provide a custom Env object when opening a database to
-// get fine gain control; e.g., to rate limit file system operations.
-//
-// All Env implementations are safe for concurrent access from
-// multiple threads without any external synchronization.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_ENV_H_
-#define STORAGE_ROCKSDB_INCLUDE_ENV_H_
-
-#include <cstdarg>
-#include <string>
-#include <memory>
-#include <vector>
-#include <stdint.h>
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-class FileLock;
-class Logger;
-class RandomAccessFile;
-class SequentialFile;
-class Slice;
-class WritableFile;
-class RandomRWFile;
-class Directory;
-struct DBOptions;
-
-using std::unique_ptr;
-using std::shared_ptr;
-
-
-// Options while opening a file to read/write
-struct EnvOptions {
-
-  // construct with default Options
-  EnvOptions();
-
-  // construct from Options
-  explicit EnvOptions(const DBOptions& options);
-
-  // If true, then allow caching of data in environment buffers
-  bool use_os_buffer = true;
-
-   // If true, then use mmap to read data
-  bool use_mmap_reads = false;
-
-   // If true, then use mmap to write data
-  bool use_mmap_writes = true;
-
-  // If true, set the FD_CLOEXEC on open fd.
-  bool set_fd_cloexec = true;
-
-  // Allows OS to incrementally sync files to disk while they are being
-  // written, in the background. Issue one request for every bytes_per_sync
-  // written. 0 turns it off.
-  // Default: 0
-  uint64_t bytes_per_sync = 0;
-
-  // If true, we will preallocate the file with FALLOC_FL_KEEP_SIZE flag, which
-  // means that file size won't change as part of preallocation.
-  // If false, preallocation will also change the file size. This option will
-  // improve the performance in workloads where you sync the data on every
-  // write. By default, we set it to true for MANIFEST writes and false for
-  // WAL writes
-  bool fallocate_with_keep_size = true;
-};
-
-class Env {
- public:
-  Env() { }
-  virtual ~Env();
-
-  // Return a default environment suitable for the current operating
-  // system.  Sophisticated users may wish to provide their own Env
-  // implementation instead of relying on this default environment.
-  //
-  // The result of Default() belongs to rocksdb and must never be deleted.
-  static Env* Default();
-
-  // Create a brand new sequentially-readable file with the specified name.
-  // On success, stores a pointer to the new file in *result and returns OK.
-  // On failure stores nullptr in *result and returns non-OK.  If the file does
-  // not exist, returns a non-OK status.
-  //
-  // The returned file will only be accessed by one thread at a time.
-  virtual Status NewSequentialFile(const std::string& fname,
-                                   unique_ptr<SequentialFile>* result,
-                                   const EnvOptions& options)
-                                   = 0;
-
-  // Create a brand new random access read-only file with the
-  // specified name.  On success, stores a pointer to the new file in
-  // *result and returns OK.  On failure stores nullptr in *result and
-  // returns non-OK.  If the file does not exist, returns a non-OK
-  // status.
-  //
-  // The returned file may be concurrently accessed by multiple threads.
-  virtual Status NewRandomAccessFile(const std::string& fname,
-                                     unique_ptr<RandomAccessFile>* result,
-                                     const EnvOptions& options)
-                                     = 0;
-
-  // Create an object that writes to a new file with the specified
-  // name.  Deletes any existing file with the same name and creates a
-  // new file.  On success, stores a pointer to the new file in
-  // *result and returns OK.  On failure stores nullptr in *result and
-  // returns non-OK.
-  //
-  // The returned file will only be accessed by one thread at a time.
-  virtual Status NewWritableFile(const std::string& fname,
-                                 unique_ptr<WritableFile>* result,
-                                 const EnvOptions& options) = 0;
-
-  // Create an object that both reads and writes to a file on
-  // specified offsets (random access). If file already exists,
-  // does not overwrite it. On success, stores a pointer to the
-  // new file in *result and returns OK. On failure stores nullptr
-  // in *result and returns non-OK.
-  virtual Status NewRandomRWFile(const std::string& fname,
-                                 unique_ptr<RandomRWFile>* result,
-                                 const EnvOptions& options) = 0;
-
-  // Create an object that represents a directory. Will fail if directory
-  // doesn't exist. If the directory exists, it will open the directory
-  // and create a new Directory object.
-  //
-  // On success, stores a pointer to the new Directory in
-  // *result and returns OK. On failure stores nullptr in *result and
-  // returns non-OK.
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result) = 0;
-
-  // Returns true iff the named file exists.
-  virtual bool FileExists(const std::string& fname) = 0;
-
-  // Store in *result the names of the children of the specified directory.
-  // The names are relative to "dir".
-  // Original contents of *results are dropped.
-  virtual Status GetChildren(const std::string& dir,
-                             std::vector<std::string>* result) = 0;
-
-  // Delete the named file.
-  virtual Status DeleteFile(const std::string& fname) = 0;
-
-  // Create the specified directory. Returns error if directory exists.
-  virtual Status CreateDir(const std::string& dirname) = 0;
-
-  // Creates directory if missing. Return Ok if it exists, or successful in
-  // Creating.
-  virtual Status CreateDirIfMissing(const std::string& dirname) = 0;
-
-  // Delete the specified directory.
-  virtual Status DeleteDir(const std::string& dirname) = 0;
-
-  // Store the size of fname in *file_size.
-  virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) = 0;
-
-  // Store the last modification time of fname in *file_mtime.
-  virtual Status GetFileModificationTime(const std::string& fname,
-                                         uint64_t* file_mtime) = 0;
-  // Rename file src to target.
-  virtual Status RenameFile(const std::string& src,
-                            const std::string& target) = 0;
-
-  // Lock the specified file.  Used to prevent concurrent access to
-  // the same db by multiple processes.  On failure, stores nullptr in
-  // *lock and returns non-OK.
-  //
-  // On success, stores a pointer to the object that represents the
-  // acquired lock in *lock and returns OK.  The caller should call
-  // UnlockFile(*lock) to release the lock.  If the process exits,
-  // the lock will be automatically released.
-  //
-  // If somebody else already holds the lock, finishes immediately
-  // with a failure.  I.e., this call does not wait for existing locks
-  // to go away.
-  //
-  // May create the named file if it does not already exist.
-  virtual Status LockFile(const std::string& fname, FileLock** lock) = 0;
-
-  // Release the lock acquired by a previous successful call to LockFile.
-  // REQUIRES: lock was returned by a successful LockFile() call
-  // REQUIRES: lock has not already been unlocked.
-  virtual Status UnlockFile(FileLock* lock) = 0;
-
-  enum Priority { LOW, HIGH, TOTAL };
-
-  // Arrange to run "(*function)(arg)" once in a background thread, in
-  // the thread pool specified by pri. By default, jobs go to the 'LOW'
-  // priority thread pool.
-
-  // "function" may run in an unspecified thread.  Multiple functions
-  // added to the same Env may run concurrently in different threads.
-  // I.e., the caller may not assume that background work items are
-  // serialized.
-  virtual void Schedule(
-      void (*function)(void* arg),
-      void* arg,
-      Priority pri = LOW) = 0;
-
-  // Start a new thread, invoking "function(arg)" within the new thread.
-  // When "function(arg)" returns, the thread will be destroyed.
-  virtual void StartThread(void (*function)(void* arg), void* arg) = 0;
-
-  // Wait for all threads started by StartThread to terminate.
-  virtual void WaitForJoin() {}
-
-  // Get thread pool queue length for specific thrad pool.
-  virtual unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const {
-    return 0;
-  }
-
-  // *path is set to a temporary directory that can be used for testing. It may
-  // or many not have just been created. The directory may or may not differ
-  // between runs of the same process, but subsequent calls will return the
-  // same directory.
-  virtual Status GetTestDirectory(std::string* path) = 0;
-
-  // Create and return a log file for storing informational messages.
-  virtual Status NewLogger(const std::string& fname,
-                           shared_ptr<Logger>* result) = 0;
-
-  // Returns the number of micro-seconds since some fixed point in time. Only
-  // useful for computing deltas of time.
-  virtual uint64_t NowMicros() = 0;
-
-  // Returns the number of nano-seconds since some fixed point in time. Only
-  // useful for computing deltas of time in one run.
-  // Default implementation simply relies on NowMicros
-  virtual uint64_t NowNanos() {
-    return NowMicros() * 1000;
-  }
-
-  // Sleep/delay the thread for the perscribed number of micro-seconds.
-  virtual void SleepForMicroseconds(int micros) = 0;
-
-  // Get the current host name.
-  virtual Status GetHostName(char* name, uint64_t len) = 0;
-
-  // Get the number of seconds since the Epoch, 1970-01-01 00:00:00 (UTC).
-  virtual Status GetCurrentTime(int64_t* unix_time) = 0;
-
-  // Get full directory name for this db.
-  virtual Status GetAbsolutePath(const std::string& db_path,
-      std::string* output_path) = 0;
-
-  // The number of background worker threads of a specific thread pool
-  // for this environment. 'LOW' is the default pool.
-  // default number: 1
-  virtual void SetBackgroundThreads(int number, Priority pri = LOW) = 0;
-
-  // Converts seconds-since-Jan-01-1970 to a printable string
-  virtual std::string TimeToString(uint64_t time) = 0;
-
-  // Generates a unique id that can be used to identify a db
-  virtual std::string GenerateUniqueId();
-
-  // OptimizeForLogWrite will create a new EnvOptions object that is a copy of
-  // the EnvOptions in the parameters, but is optimized for writing log files.
-  // Default implementation returns the copy of the same object.
-  virtual EnvOptions OptimizeForLogWrite(const EnvOptions& env_options) const;
-  // OptimizeForManifestWrite will create a new EnvOptions object that is a copy
-  // of the EnvOptions in the parameters, but is optimized for writing manifest
-  // files. Default implementation returns the copy of the same object.
-  virtual EnvOptions OptimizeForManifestWrite(const EnvOptions& env_options)
-      const;
-
- private:
-  // No copying allowed
-  Env(const Env&);
-  void operator=(const Env&);
-};
-
-// A file abstraction for reading sequentially through a file
-class SequentialFile {
- public:
-  SequentialFile() { }
-  virtual ~SequentialFile();
-
-  // Read up to "n" bytes from the file.  "scratch[0..n-1]" may be
-  // written by this routine.  Sets "*result" to the data that was
-  // read (including if fewer than "n" bytes were successfully read).
-  // May set "*result" to point at data in "scratch[0..n-1]", so
-  // "scratch[0..n-1]" must be live when "*result" is used.
-  // If an error was encountered, returns a non-OK status.
-  //
-  // REQUIRES: External synchronization
-  virtual Status Read(size_t n, Slice* result, char* scratch) = 0;
-
-  // Skip "n" bytes from the file. This is guaranteed to be no
-  // slower that reading the same data, but may be faster.
-  //
-  // If end of file is reached, skipping will stop at the end of the
-  // file, and Skip will return OK.
-  //
-  // REQUIRES: External synchronization
-  virtual Status Skip(uint64_t n) = 0;
-
-  // Remove any kind of caching of data from the offset to offset+length
-  // of this file. If the length is 0, then it refers to the end of file.
-  // If the system is not caching the file contents, then this is a noop.
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-    return Status::NotSupported("InvalidateCache not supported.");
-  }
-};
-
-// A file abstraction for randomly reading the contents of a file.
-class RandomAccessFile {
- public:
-  RandomAccessFile() { }
-  virtual ~RandomAccessFile();
-
-  // Read up to "n" bytes from the file starting at "offset".
-  // "scratch[0..n-1]" may be written by this routine.  Sets "*result"
-  // to the data that was read (including if fewer than "n" bytes were
-  // successfully read).  May set "*result" to point at data in
-  // "scratch[0..n-1]", so "scratch[0..n-1]" must be live when
-  // "*result" is used.  If an error was encountered, returns a non-OK
-  // status.
-  //
-  // Safe for concurrent use by multiple threads.
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const = 0;
-
-  // Tries to get an unique ID for this file that will be the same each time
-  // the file is opened (and will stay the same while the file is open).
-  // Furthermore, it tries to make this ID at most "max_size" bytes. If such an
-  // ID can be created this function returns the length of the ID and places it
-  // in "id"; otherwise, this function returns 0, in which case "id"
-  // may not have been modified.
-  //
-  // This function guarantees, for IDs from a given environment, two unique ids
-  // cannot be made equal to eachother by adding arbitrary bytes to one of
-  // them. That is, no unique ID is the prefix of another.
-  //
-  // This function guarantees that the returned ID will not be interpretable as
-  // a single varint.
-  //
-  // Note: these IDs are only valid for the duration of the process.
-  virtual size_t GetUniqueId(char* id, size_t max_size) const {
-    return 0; // Default implementation to prevent issues with backwards
-              // compatibility.
-  };
-
-
-  enum AccessPattern { NORMAL, RANDOM, SEQUENTIAL, WILLNEED, DONTNEED };
-
-  virtual void Hint(AccessPattern pattern) {}
-
-  // Remove any kind of caching of data from the offset to offset+length
-  // of this file. If the length is 0, then it refers to the end of file.
-  // If the system is not caching the file contents, then this is a noop.
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-    return Status::NotSupported("InvalidateCache not supported.");
-  }
-};
-
-// A file abstraction for sequential writing.  The implementation
-// must provide buffering since callers may append small fragments
-// at a time to the file.
-class WritableFile {
- public:
-  WritableFile() : last_preallocated_block_(0), preallocation_block_size_ (0) {
-  }
-  virtual ~WritableFile();
-
-  virtual Status Append(const Slice& data) = 0;
-  virtual Status Close() = 0;
-  virtual Status Flush() = 0;
-  virtual Status Sync() = 0; // sync data
-
-  /*
-   * Sync data and/or metadata as well.
-   * By default, sync only data.
-   * Override this method for environments where we need to sync
-   * metadata as well.
-   */
-  virtual Status Fsync() {
-    return Sync();
-  }
-
-  /*
-   * Get the size of valid data in the file.
-   */
-  virtual uint64_t GetFileSize() {
-    return 0;
-  }
-
-  /*
-   * Get and set the default pre-allocation block size for writes to
-   * this file.  If non-zero, then Allocate will be used to extend the
-   * underlying storage of a file (generally via fallocate) if the Env
-   * instance supports it.
-   */
-  void SetPreallocationBlockSize(size_t size) {
-    preallocation_block_size_ = size;
-  }
-
-  virtual void GetPreallocationStatus(size_t* block_size,
-                                      size_t* last_allocated_block) {
-    *last_allocated_block = last_preallocated_block_;
-    *block_size = preallocation_block_size_;
-  }
-
-  // For documentation, refer to RandomAccessFile::GetUniqueId()
-  virtual size_t GetUniqueId(char* id, size_t max_size) const {
-    return 0; // Default implementation to prevent issues with backwards
-  }
-
-  // Remove any kind of caching of data from the offset to offset+length
-  // of this file. If the length is 0, then it refers to the end of file.
-  // If the system is not caching the file contents, then this is a noop.
-  // This call has no effect on dirty pages in the cache.
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-    return Status::NotSupported("InvalidateCache not supported.");
-  }
-
- protected:
-  // PrepareWrite performs any necessary preparation for a write
-  // before the write actually occurs.  This allows for pre-allocation
-  // of space on devices where it can result in less file
-  // fragmentation and/or less waste from over-zealous filesystem
-  // pre-allocation.
-  void PrepareWrite(size_t offset, size_t len) {
-    if (preallocation_block_size_ == 0) {
-      return;
-    }
-    // If this write would cross one or more preallocation blocks,
-    // determine what the last preallocation block necesessary to
-    // cover this write would be and Allocate to that point.
-    const auto block_size = preallocation_block_size_;
-    size_t new_last_preallocated_block =
-      (offset + len + block_size - 1) / block_size;
-    if (new_last_preallocated_block > last_preallocated_block_) {
-      size_t num_spanned_blocks =
-        new_last_preallocated_block - last_preallocated_block_;
-      Allocate(block_size * last_preallocated_block_,
-               block_size * num_spanned_blocks);
-      last_preallocated_block_ = new_last_preallocated_block;
-    }
-  }
-
-  /*
-   * Pre-allocate space for a file.
-   */
-  virtual Status Allocate(off_t offset, off_t len) {
-    return Status::OK();
-  }
-
-  // Sync a file range with disk.
-  // offset is the starting byte of the file range to be synchronized.
-  // nbytes specifies the length of the range to be synchronized.
-  // This asks the OS to initiate flushing the cached data to disk,
-  // without waiting for completion.
-  // Default implementation does nothing.
-  virtual Status RangeSync(off_t offset, off_t nbytes) {
-    return Status::OK();
-  }
-
- private:
-  size_t last_preallocated_block_;
-  size_t preallocation_block_size_;
-  // No copying allowed
-  WritableFile(const WritableFile&);
-  void operator=(const WritableFile&);
-};
-
-// A file abstraction for random reading and writing.
-class RandomRWFile {
- public:
-  RandomRWFile() {}
-  virtual ~RandomRWFile() {}
-
-  // Write data from Slice data to file starting from offset
-  // Returns IOError on failure, but does not guarantee
-  // atomicity of a write.  Returns OK status on success.
-  //
-  // Safe for concurrent use.
-  virtual Status Write(uint64_t offset, const Slice& data) = 0;
-  // Read up to "n" bytes from the file starting at "offset".
-  // "scratch[0..n-1]" may be written by this routine.  Sets "*result"
-  // to the data that was read (including if fewer than "n" bytes were
-  // successfully read).  May set "*result" to point at data in
-  // "scratch[0..n-1]", so "scratch[0..n-1]" must be live when
-  // "*result" is used.  If an error was encountered, returns a non-OK
-  // status.
-  //
-  // Safe for concurrent use by multiple threads.
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const = 0;
-  virtual Status Close() = 0; // closes the file
-  virtual Status Sync() = 0; // sync data
-
-  /*
-   * Sync data and/or metadata as well.
-   * By default, sync only data.
-   * Override this method for environments where we need to sync
-   * metadata as well.
-   */
-  virtual Status Fsync() {
-    return Sync();
-  }
-
-  /*
-   * Pre-allocate space for a file.
-   */
-  virtual Status Allocate(off_t offset, off_t len) {
-    return Status::OK();
-  }
-
- private:
-  // No copying allowed
-  RandomRWFile(const RandomRWFile&);
-  void operator=(const RandomRWFile&);
-};
-
-// Directory object represents collection of files and implements
-// filesystem operations that can be executed on directories.
-class Directory {
- public:
-  virtual ~Directory() {}
-  // Fsync directory
-  virtual Status Fsync() = 0;
-};
-
-enum InfoLogLevel : unsigned char {
-  DEBUG_LEVEL = 0,
-  INFO_LEVEL,
-  WARN_LEVEL,
-  ERROR_LEVEL,
-  FATAL_LEVEL,
-  NUM_INFO_LOG_LEVELS,
-};
-
-// An interface for writing log messages.
-class Logger {
- public:
-  enum { DO_NOT_SUPPORT_GET_LOG_FILE_SIZE = -1 };
-  explicit Logger(const InfoLogLevel log_level = InfoLogLevel::INFO_LEVEL)
-      : log_level_(log_level) {}
-  virtual ~Logger();
-
-  // Write an entry to the log file with the specified format.
-  virtual void Logv(const char* format, va_list ap) = 0;
-
-  // Write an entry to the log file with the specified log level
-  // and format.  Any log with level under the internal log level
-  // of *this (see @SetInfoLogLevel and @GetInfoLogLevel) will not be
-  // printed.
-  void Logv(const InfoLogLevel log_level, const char* format, va_list ap) {
-    static const char* kInfoLogLevelNames[5] = {"DEBUG", "INFO", "WARN",
-                                                "ERROR", "FATAL"};
-    if (log_level < log_level_) {
-      return;
-    }
-
-    if (log_level == InfoLogLevel::INFO_LEVEL) {
-      // Doesn't print log level if it is INFO level.
-      // This is to avoid unexpected performance regression after we add
-      // the feature of log level. All the logs before we add the feature
-      // are INFO level. We don't want to add extra costs to those existing
-      // logging.
-      Logv(format, ap);
-    } else {
-      char new_format[500];
-      snprintf(new_format, sizeof(new_format) - 1, "[%s] %s",
-               kInfoLogLevelNames[log_level], format);
-      Logv(new_format, ap);
-    }
-  }
-  virtual size_t GetLogFileSize() const {
-    return DO_NOT_SUPPORT_GET_LOG_FILE_SIZE;
-  }
-  // Flush to the OS buffers
-  virtual void Flush() {}
-  virtual InfoLogLevel GetInfoLogLevel() const { return log_level_; }
-  virtual void SetInfoLogLevel(const InfoLogLevel log_level) {
-    log_level_ = log_level;
-  }
-
- private:
-  // No copying allowed
-  Logger(const Logger&);
-  void operator=(const Logger&);
-  InfoLogLevel log_level_;
-};
-
-
-// Identifies a locked file.
-class FileLock {
- public:
-  FileLock() { }
-  virtual ~FileLock();
- private:
-  // No copying allowed
-  FileLock(const FileLock&);
-  void operator=(const FileLock&);
-};
-
-extern void LogFlush(const shared_ptr<Logger>& info_log);
-
-extern void Log(const InfoLogLevel log_level,
-                const shared_ptr<Logger>& info_log, const char* format, ...);
-
-// a set of log functions with different log levels.
-extern void Debug(const shared_ptr<Logger>& info_log, const char* format, ...);
-extern void Info(const shared_ptr<Logger>& info_log, const char* format, ...);
-extern void Warn(const shared_ptr<Logger>& info_log, const char* format, ...);
-extern void Error(const shared_ptr<Logger>& info_log, const char* format, ...);
-extern void Fatal(const shared_ptr<Logger>& info_log, const char* format, ...);
-
-// Log the specified data to *info_log if info_log is non-nullptr.
-// The default info log level is InfoLogLevel::ERROR.
-extern void Log(const shared_ptr<Logger>& info_log, const char* format, ...)
-#   if defined(__GNUC__) || defined(__clang__)
-    __attribute__((__format__ (__printf__, 2, 3)))
-#   endif
-    ;
-
-extern void LogFlush(Logger *info_log);
-
-extern void Log(const InfoLogLevel log_level, Logger* info_log,
-                const char* format, ...);
-
-// The default info log level is InfoLogLevel::ERROR.
-extern void Log(Logger* info_log, const char* format, ...)
-#   if defined(__GNUC__) || defined(__clang__)
-    __attribute__((__format__ (__printf__, 2, 3)))
-#   endif
-    ;
-
-// a set of log functions with different log levels.
-extern void Debug(Logger* info_log, const char* format, ...);
-extern void Info(Logger* info_log, const char* format, ...);
-extern void Warn(Logger* info_log, const char* format, ...);
-extern void Error(Logger* info_log, const char* format, ...);
-extern void Fatal(Logger* info_log, const char* format, ...);
-
-// A utility routine: write "data" to the named file.
-extern Status WriteStringToFile(Env* env, const Slice& data,
-                                const std::string& fname,
-                                bool should_sync = false);
-
-// A utility routine: read contents of named file into *data
-extern Status ReadFileToString(Env* env, const std::string& fname,
-                               std::string* data);
-
-// An implementation of Env that forwards all calls to another Env.
-// May be useful to clients who wish to override just part of the
-// functionality of another Env.
-class EnvWrapper : public Env {
- public:
-  // Initialize an EnvWrapper that delegates all calls to *t
-  explicit EnvWrapper(Env* t) : target_(t) { }
-  virtual ~EnvWrapper();
-
-  // Return the target to which this Env forwards all calls
-  Env* target() const { return target_; }
-
-  // The following text is boilerplate that forwards all methods to target()
-  Status NewSequentialFile(const std::string& f,
-                           unique_ptr<SequentialFile>* r,
-                           const EnvOptions& options) {
-    return target_->NewSequentialFile(f, r, options);
-  }
-  Status NewRandomAccessFile(const std::string& f,
-                             unique_ptr<RandomAccessFile>* r,
-                             const EnvOptions& options) {
-    return target_->NewRandomAccessFile(f, r, options);
-  }
-  Status NewWritableFile(const std::string& f, unique_ptr<WritableFile>* r,
-                         const EnvOptions& options) {
-    return target_->NewWritableFile(f, r, options);
-  }
-  Status NewRandomRWFile(const std::string& f, unique_ptr<RandomRWFile>* r,
-                         const EnvOptions& options) {
-    return target_->NewRandomRWFile(f, r, options);
-  }
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result) {
-    return target_->NewDirectory(name, result);
-  }
-  bool FileExists(const std::string& f) { return target_->FileExists(f); }
-  Status GetChildren(const std::string& dir, std::vector<std::string>* r) {
-    return target_->GetChildren(dir, r);
-  }
-  Status DeleteFile(const std::string& f) { return target_->DeleteFile(f); }
-  Status CreateDir(const std::string& d) { return target_->CreateDir(d); }
-  Status CreateDirIfMissing(const std::string& d) {
-    return target_->CreateDirIfMissing(d);
-  }
-  Status DeleteDir(const std::string& d) { return target_->DeleteDir(d); }
-  Status GetFileSize(const std::string& f, uint64_t* s) {
-    return target_->GetFileSize(f, s);
-  }
-
-  Status GetFileModificationTime(const std::string& fname,
-                                 uint64_t* file_mtime) {
-    return target_->GetFileModificationTime(fname, file_mtime);
-  }
-
-  Status RenameFile(const std::string& s, const std::string& t) {
-    return target_->RenameFile(s, t);
-  }
-  Status LockFile(const std::string& f, FileLock** l) {
-    return target_->LockFile(f, l);
-  }
-  Status UnlockFile(FileLock* l) { return target_->UnlockFile(l); }
-  void Schedule(void (*f)(void*), void* a, Priority pri) {
-    return target_->Schedule(f, a, pri);
-  }
-  void StartThread(void (*f)(void*), void* a) {
-    return target_->StartThread(f, a);
-  }
-  void WaitForJoin() { return target_->WaitForJoin(); }
-  virtual unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const {
-    return target_->GetThreadPoolQueueLen(pri);
-  }
-  virtual Status GetTestDirectory(std::string* path) {
-    return target_->GetTestDirectory(path);
-  }
-  virtual Status NewLogger(const std::string& fname,
-                           shared_ptr<Logger>* result) {
-    return target_->NewLogger(fname, result);
-  }
-  uint64_t NowMicros() {
-    return target_->NowMicros();
-  }
-  void SleepForMicroseconds(int micros) {
-    target_->SleepForMicroseconds(micros);
-  }
-  Status GetHostName(char* name, uint64_t len) {
-    return target_->GetHostName(name, len);
-  }
-  Status GetCurrentTime(int64_t* unix_time) {
-    return target_->GetCurrentTime(unix_time);
-  }
-  Status GetAbsolutePath(const std::string& db_path,
-      std::string* output_path) {
-    return target_->GetAbsolutePath(db_path, output_path);
-  }
-  void SetBackgroundThreads(int num, Priority pri) {
-    return target_->SetBackgroundThreads(num, pri);
-  }
-  std::string TimeToString(uint64_t time) {
-    return target_->TimeToString(time);
-  }
-
- private:
-  Env* target_;
-};
-
-// Returns a new environment that stores its data in memory and delegates
-// all non-file-storage tasks to base_env. The caller must delete the result
-// when it is no longer needed.
-// *base_env must remain live while the result is in use.
-Env* NewMemEnv(Env* base_env);
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_ENV_H_
diff --git a/src/rocksdb/include/rocksdb/filter_policy.h b/src/rocksdb/include/rocksdb/filter_policy.h
deleted file mode 100644
index fa44db4..0000000
--- a/src/rocksdb/include/rocksdb/filter_policy.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// A database can be configured with a custom FilterPolicy object.
-// This object is responsible for creating a small filter from a set
-// of keys.  These filters are stored in rocksdb and are consulted
-// automatically by rocksdb to decide whether or not to read some
-// information from disk. In many cases, a filter can cut down the
-// number of disk seeks form a handful to a single disk seek per
-// DB::Get() call.
-//
-// Most people will want to use the builtin bloom filter support (see
-// NewBloomFilterPolicy() below).
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_FILTER_POLICY_H_
-#define STORAGE_ROCKSDB_INCLUDE_FILTER_POLICY_H_
-
-#include <string>
-
-namespace rocksdb {
-
-class Slice;
-
-class FilterPolicy {
- public:
-  virtual ~FilterPolicy();
-
-  // Return the name of this policy.  Note that if the filter encoding
-  // changes in an incompatible way, the name returned by this method
-  // must be changed.  Otherwise, old incompatible filters may be
-  // passed to methods of this type.
-  virtual const char* Name() const = 0;
-
-  // keys[0,n-1] contains a list of keys (potentially with duplicates)
-  // that are ordered according to the user supplied comparator.
-  // Append a filter that summarizes keys[0,n-1] to *dst.
-  //
-  // Warning: do not change the initial contents of *dst.  Instead,
-  // append the newly constructed filter to *dst.
-  virtual void CreateFilter(const Slice* keys, int n, std::string* dst)
-      const = 0;
-
-  // "filter" contains the data appended by a preceding call to
-  // CreateFilter() on this class.  This method must return true if
-  // the key was in the list of keys passed to CreateFilter().
-  // This method may return true or false if the key was not on the
-  // list, but it should aim to return false with a high probability.
-  virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const = 0;
-};
-
-// Return a new filter policy that uses a bloom filter with approximately
-// the specified number of bits per key.  A good value for bits_per_key
-// is 10, which yields a filter with ~ 1% false positive rate.
-//
-// Callers must delete the result after any database that is using the
-// result has been closed.
-//
-// Note: if you are using a custom comparator that ignores some parts
-// of the keys being compared, you must not use NewBloomFilterPolicy()
-// and must provide your own FilterPolicy that also ignores the
-// corresponding parts of the keys.  For example, if the comparator
-// ignores trailing spaces, it would be incorrect to use a
-// FilterPolicy (like NewBloomFilterPolicy) that does not ignore
-// trailing spaces in keys.
-extern const FilterPolicy* NewBloomFilterPolicy(int bits_per_key);
-
-}
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_FILTER_POLICY_H_
diff --git a/src/rocksdb/include/rocksdb/flush_block_policy.h b/src/rocksdb/include/rocksdb/flush_block_policy.h
deleted file mode 100644
index 8340ad6..0000000
--- a/src/rocksdb/include/rocksdb/flush_block_policy.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#pragma once
-
-#include <string>
-
-namespace rocksdb {
-
-class Slice;
-class BlockBuilder;
-struct Options;
-
-// FlushBlockPolicy provides a configurable way to determine when to flush a
-// block in the block based tables,
-class FlushBlockPolicy {
- public:
-  // Keep track of the key/value sequences and return the boolean value to
-  // determine if table builder should flush current data block.
-  virtual bool Update(const Slice& key,
-                      const Slice& value) = 0;
-
-  virtual ~FlushBlockPolicy() { }
-};
-
-class FlushBlockPolicyFactory {
- public:
-  // Return the name of the flush block policy.
-  virtual const char* Name() const = 0;
-
-  // Return a new block flush policy that flushes data blocks by data size.
-  // FlushBlockPolicy may need to access the metadata of the data block
-  // builder to determine when to flush the blocks.
-  //
-  // Callers must delete the result after any database that is using the
-  // result has been closed.
-  virtual FlushBlockPolicy* NewFlushBlockPolicy(
-      const Options& options, const BlockBuilder& data_block_builder) const = 0;
-
-  virtual ~FlushBlockPolicyFactory() { }
-};
-
-class FlushBlockBySizePolicyFactory : public FlushBlockPolicyFactory {
- public:
-  FlushBlockBySizePolicyFactory() {}
-
-  virtual const char* Name() const override {
-    return "FlushBlockBySizePolicyFactory";
-  }
-
-  virtual FlushBlockPolicy* NewFlushBlockPolicy(
-      const Options& options,
-      const BlockBuilder& data_block_builder) const override;
-};
-
-}  // rocksdb
diff --git a/src/rocksdb/include/rocksdb/iterator.h b/src/rocksdb/include/rocksdb/iterator.h
deleted file mode 100644
index 7538e9c..0000000
--- a/src/rocksdb/include/rocksdb/iterator.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// An iterator yields a sequence of key/value pairs from a source.
-// The following class defines the interface.  Multiple implementations
-// are provided by this library.  In particular, iterators are provided
-// to access the contents of a Table or a DB.
-//
-// Multiple threads can invoke const methods on an Iterator without
-// external synchronization, but if any of the threads may call a
-// non-const method, all threads accessing the same Iterator must use
-// external synchronization.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_ITERATOR_H_
-#define STORAGE_ROCKSDB_INCLUDE_ITERATOR_H_
-
-#include "rocksdb/slice.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-class Iterator {
- public:
-  Iterator();
-  virtual ~Iterator();
-
-  // An iterator is either positioned at a key/value pair, or
-  // not valid.  This method returns true iff the iterator is valid.
-  virtual bool Valid() const = 0;
-
-  // Position at the first key in the source.  The iterator is Valid()
-  // after this call iff the source is not empty.
-  virtual void SeekToFirst() = 0;
-
-  // Position at the last key in the source.  The iterator is
-  // Valid() after this call iff the source is not empty.
-  virtual void SeekToLast() = 0;
-
-  // Position at the first key in the source that at or past target
-  // The iterator is Valid() after this call iff the source contains
-  // an entry that comes at or past target.
-  virtual void Seek(const Slice& target) = 0;
-
-  // Moves to the next entry in the source.  After this call, Valid() is
-  // true iff the iterator was not positioned at the last entry in the source.
-  // REQUIRES: Valid()
-  virtual void Next() = 0;
-
-  // Moves to the previous entry in the source.  After this call, Valid() is
-  // true iff the iterator was not positioned at the first entry in source.
-  // REQUIRES: Valid()
-  virtual void Prev() = 0;
-
-  // Return the key for the current entry.  The underlying storage for
-  // the returned slice is valid only until the next modification of
-  // the iterator.
-  // REQUIRES: Valid()
-  virtual Slice key() const = 0;
-
-  // Return the value for the current entry.  The underlying storage for
-  // the returned slice is valid only until the next modification of
-  // the iterator.
-  // REQUIRES: !AtEnd() && !AtStart()
-  virtual Slice value() const = 0;
-
-  // If an error has occurred, return it.  Else return an ok status.
-  // If non-blocking IO is requested and this operation cannot be
-  // satisfied without doing some IO, then this returns Status::Incomplete().
-  virtual Status status() const = 0;
-
-  // Clients are allowed to register function/arg1/arg2 triples that
-  // will be invoked when this iterator is destroyed.
-  //
-  // Note that unlike all of the preceding methods, this method is
-  // not abstract and therefore clients should not override it.
-  typedef void (*CleanupFunction)(void* arg1, void* arg2);
-  void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2);
-
- private:
-  struct Cleanup {
-    CleanupFunction function;
-    void* arg1;
-    void* arg2;
-    Cleanup* next;
-  };
-  Cleanup cleanup_;
-
-  // No copying allowed
-  Iterator(const Iterator&);
-  void operator=(const Iterator&);
-};
-
-// Return an empty iterator (yields nothing).
-extern Iterator* NewEmptyIterator();
-
-// Return an empty iterator with the specified status.
-extern Iterator* NewErrorIterator(const Status& status);
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_ITERATOR_H_
diff --git a/src/rocksdb/include/rocksdb/ldb_tool.h b/src/rocksdb/include/rocksdb/ldb_tool.h
deleted file mode 100644
index 46bacc8..0000000
--- a/src/rocksdb/include/rocksdb/ldb_tool.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-#ifndef ROCKSDB_LITE
-#pragma once
-#include "rocksdb/options.h"
-
-namespace rocksdb {
-
-class LDBTool {
- public:
-  void Run(int argc, char** argv, Options = Options());
-};
-
-} // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/include/rocksdb/memtablerep.h b/src/rocksdb/include/rocksdb/memtablerep.h
deleted file mode 100644
index be15a60..0000000
--- a/src/rocksdb/include/rocksdb/memtablerep.h
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file contains the interface that must be implemented by any collection
-// to be used as the backing store for a MemTable. Such a collection must
-// satisfy the following properties:
-//  (1) It does not store duplicate items.
-//  (2) It uses MemTableRep::KeyComparator to compare items for iteration and
-//     equality.
-//  (3) It can be accessed concurrently by multiple readers and can support
-//     during reads. However, it needn't support multiple concurrent writes.
-//  (4) Items are never deleted.
-// The liberal use of assertions is encouraged to enforce (1).
-//
-// The factory will be passed an Arena object when a new MemTableRep is
-// requested. The API for this object is in rocksdb/arena.h.
-//
-// Users can implement their own memtable representations. We include three
-// types built in:
-//  - SkipListRep: This is the default; it is backed by a skip list.
-//  - HashSkipListRep: The memtable rep that is best used for keys that are
-//  structured like "prefix:suffix" where iteration within a prefix is
-//  common and iteration across different prefixes is rare. It is backed by
-//  a hash map where each bucket is a skip list.
-//  - VectorRep: This is backed by an unordered std::vector. On iteration, the
-// vector is sorted. It is intelligent about sorting; once the MarkReadOnly()
-// has been called, the vector will only be sorted once. It is optimized for
-// random-write-heavy workloads.
-//
-// The last four implementations are designed for situations in which
-// iteration over the entire collection is rare since doing so requires all the
-// keys to be copied into a sorted data structure.
-
-#pragma once
-
-#include <memory>
-#include <stdint.h>
-
-namespace rocksdb {
-
-class Arena;
-class LookupKey;
-class Slice;
-class SliceTransform;
-
-typedef void* KeyHandle;
-
-class MemTableRep {
- public:
-  // KeyComparator provides a means to compare keys, which are internal keys
-  // concatenated with values.
-  class KeyComparator {
-   public:
-    // Compare a and b. Return a negative value if a is less than b, 0 if they
-    // are equal, and a positive value if a is greater than b
-    virtual int operator()(const char* prefix_len_key1,
-                           const char* prefix_len_key2) const = 0;
-
-    virtual int operator()(const char* prefix_len_key,
-                           const Slice& key) const = 0;
-
-    virtual ~KeyComparator() { }
-  };
-
-  explicit MemTableRep(Arena* arena) : arena_(arena) {}
-
-  // Allocate a buf of len size for storing key. The idea is that a specific
-  // memtable representation knows its underlying data structure better. By
-  // allowing it to allocate memory, it can possibly put correlated stuff
-  // in consecutive memory area to make processor prefetching more efficient.
-  virtual KeyHandle Allocate(const size_t len, char** buf);
-
-  // Insert key into the collection. (The caller will pack key and value into a
-  // single buffer and pass that in as the parameter to Insert).
-  // REQUIRES: nothing that compares equal to key is currently in the
-  // collection.
-  virtual void Insert(KeyHandle handle) = 0;
-
-  // Returns true iff an entry that compares equal to key is in the collection.
-  virtual bool Contains(const char* key) const = 0;
-
-  // Notify this table rep that it will no longer be added to. By default, does
-  // nothing.
-  virtual void MarkReadOnly() { }
-
-  // Look up key from the mem table, since the first key in the mem table whose
-  // user_key matches the one given k, call the function callback_func(), with
-  // callback_args directly forwarded as the first parameter, and the mem table
-  // key as the second parameter. If the return value is false, then terminates.
-  // Otherwise, go through the next key.
-  // It's safe for Get() to terminate after having finished all the potential
-  // key for the k.user_key(), or not.
-  //
-  // Default:
-  // Get() function with a default value of dynamically construct an iterator,
-  // seek and call the call back function.
-  virtual void Get(const LookupKey& k, void* callback_args,
-                   bool (*callback_func)(void* arg, const char* entry));
-
-  // Report an approximation of how much memory has been used other than memory
-  // that was allocated through the arena.
-  virtual size_t ApproximateMemoryUsage() = 0;
-
-  virtual ~MemTableRep() { }
-
-  // Iteration over the contents of a skip collection
-  class Iterator {
-   public:
-    // Initialize an iterator over the specified collection.
-    // The returned iterator is not valid.
-    // explicit Iterator(const MemTableRep* collection);
-    virtual ~Iterator() {}
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const = 0;
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const = 0;
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() = 0;
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() = 0;
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& internal_key, const char* memtable_key) = 0;
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() = 0;
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() = 0;
-  };
-
-  // Return an iterator over the keys in this representation.
-  virtual Iterator* GetIterator() = 0;
-
-  // Return an iterator over at least the keys with the specified user key. The
-  // iterator may also allow access to other keys, but doesn't have to. Default:
-  // GetIterator().
-  virtual Iterator* GetIterator(const Slice& user_key) { return GetIterator(); }
-
-  // Return an iterator that has a special Seek semantics. The result of
-  // a Seek might only include keys with the same prefix as the target key.
-  virtual Iterator* GetDynamicPrefixIterator() { return GetIterator(); }
-
-  // Return true if the current MemTableRep supports merge operator.
-  // Default: true
-  virtual bool IsMergeOperatorSupported() const { return true; }
-
-  // Return true if the current MemTableRep supports snapshot
-  // Default: true
-  virtual bool IsSnapshotSupported() const { return true; }
-
- protected:
-  // When *key is an internal key concatenated with the value, returns the
-  // user key.
-  virtual Slice UserKey(const char* key) const;
-
-  Arena* arena_;
-};
-
-// This is the base class for all factories that are used by RocksDB to create
-// new MemTableRep objects
-class MemTableRepFactory {
- public:
-  virtual ~MemTableRepFactory() {}
-  virtual MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&,
-      Arena*, const SliceTransform*) = 0;
-  virtual const char* Name() const = 0;
-};
-
-// This uses a skip list to store keys. It is the default.
-class SkipListFactory : public MemTableRepFactory {
- public:
-  virtual MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&,
-                                         Arena*,
-                                         const SliceTransform*) override;
-  virtual const char* Name() const override { return "SkipListFactory"; }
-};
-
-#ifndef ROCKSDB_LITE
-// This creates MemTableReps that are backed by an std::vector. On iteration,
-// the vector is sorted. This is useful for workloads where iteration is very
-// rare and writes are generally not issued after reads begin.
-//
-// Parameters:
-//   count: Passed to the constructor of the underlying std::vector of each
-//     VectorRep. On initialization, the underlying array will be at least count
-//     bytes reserved for usage.
-class VectorRepFactory : public MemTableRepFactory {
-  const size_t count_;
-
- public:
-  explicit VectorRepFactory(size_t count = 0) : count_(count) { }
-  virtual MemTableRep* CreateMemTableRep(
-      const MemTableRep::KeyComparator&, Arena*,
-      const SliceTransform*) override;
-  virtual const char* Name() const override {
-    return "VectorRepFactory";
-  }
-};
-
-// This class contains a fixed array of buckets, each
-// pointing to a skiplist (null if the bucket is empty).
-// bucket_count: number of fixed array buckets
-// skiplist_height: the max height of the skiplist
-// skiplist_branching_factor: probabilistic size ratio between adjacent
-//                            link lists in the skiplist
-extern MemTableRepFactory* NewHashSkipListRepFactory(
-    size_t bucket_count = 1000000, int32_t skiplist_height = 4,
-    int32_t skiplist_branching_factor = 4
-);
-
-// The factory is to create memtables with a hashed linked list:
-// it contains a fixed array of buckets, each pointing to a sorted single
-// linked list (null if the bucket is empty).
-// @bucket_count: number of fixed array buckets
-// @huge_page_tlb_size: if <=0, allocate the hash table bytes from malloc.
-//                      Otherwise from huge page TLB. The user needs to reserve
-//                      huge pages for it to be allocated, like:
-//                          sysctl -w vm.nr_hugepages=20
-//                      See linux doc Documentation/vm/hugetlbpage.txt
-extern MemTableRepFactory* NewHashLinkListRepFactory(
-    size_t bucket_count = 50000, size_t huge_page_tlb_size = 0);
-
-// This factory creates a cuckoo-hashing based mem-table representation.
-// Cuckoo-hash is a closed-hash strategy, in which all key/value pairs
-// are stored in the bucket array itself intead of in some data structures
-// external to the bucket array.  In addition, each key in cuckoo hash
-// has a constant number of possible buckets in the bucket array.  These
-// two properties together makes cuckoo hash more memory efficient and
-// a constant worst-case read time.  Cuckoo hash is best suitable for
-// point-lookup workload.
-//
-// When inserting a key / value, it first checks whether one of its possible
-// buckets is empty.  If so, the key / value will be inserted to that vacant
-// bucket.  Otherwise, one of the keys originally stored in one of these
-// possible buckets will be "kicked out" and move to one of its possible
-// buckets (and possibly kicks out another victim.)  In the current
-// implementation, such "kick-out" path is bounded.  If it cannot find a
-// "kick-out" path for a specific key, this key will be stored in a backup
-// structure, and the current memtable to be forced to immutable.
-//
-// Note that currently this mem-table representation does not support
-// snapshot (i.e., it only queries latest state) and iterators.  In addition,
-// MultiGet operation might also lose its atomicity due to the lack of
-// snapshot support.
-//
-// Parameters:
-//   write_buffer_size: the write buffer size in bytes.
-//   average_data_size: the average size of key + value in bytes.  This value
-//     together with write_buffer_size will be used to compute the number
-//     of buckets.
-//   hash_function_count: the number of hash functions that will be used by
-//     the cuckoo-hash.  The number also equals to the number of possible
-//     buckets each key will have.
-extern MemTableRepFactory* NewHashCuckooRepFactory(
-    size_t write_buffer_size, size_t average_data_size = 64,
-    unsigned int hash_function_count = 4);
-#endif  // ROCKSDB_LITE
-}  // namespace rocksdb
diff --git a/src/rocksdb/include/rocksdb/merge_operator.h b/src/rocksdb/include/rocksdb/merge_operator.h
deleted file mode 100644
index 2ae64c1..0000000
--- a/src/rocksdb/include/rocksdb/merge_operator.h
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_MERGE_OPERATOR_H_
-#define STORAGE_ROCKSDB_INCLUDE_MERGE_OPERATOR_H_
-
-#include <memory>
-#include <string>
-#include <deque>
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-class Slice;
-class Logger;
-
-// The Merge Operator
-//
-// Essentially, a MergeOperator specifies the SEMANTICS of a merge, which only
-// client knows. It could be numeric addition, list append, string
-// concatenation, edit data structure, ... , anything.
-// The library, on the other hand, is concerned with the exercise of this
-// interface, at the right time (during get, iteration, compaction...)
-//
-// To use merge, the client needs to provide an object implementing one of
-// the following interfaces:
-//  a) AssociativeMergeOperator - for most simple semantics (always take
-//    two values, and merge them into one value, which is then put back
-//    into rocksdb); numeric addition and string concatenation are examples;
-//
-//  b) MergeOperator - the generic class for all the more abstract / complex
-//    operations; one method (FullMerge) to merge a Put/Delete value with a
-//    merge operand; and another method (PartialMerge) that merges multiple
-//    operands together. this is especially useful if your key values have
-//    complex structures but you would still like to support client-specific
-//    incremental updates.
-//
-// AssociativeMergeOperator is simpler to implement. MergeOperator is simply
-// more powerful.
-//
-// Refer to rocksdb-merge wiki for more details and example implementations.
-//
-class MergeOperator {
- public:
-  virtual ~MergeOperator() {}
-
-  // Gives the client a way to express the read -> modify -> write semantics
-  // key:      (IN)    The key that's associated with this merge operation.
-  //                   Client could multiplex the merge operator based on it
-  //                   if the key space is partitioned and different subspaces
-  //                   refer to different types of data which have different
-  //                   merge operation semantics
-  // existing: (IN)    null indicates that the key does not exist before this op
-  // operand_list:(IN) the sequence of merge operations to apply, front() first.
-  // new_value:(OUT)   Client is responsible for filling the merge result here
-  // logger:   (IN)    Client could use this to log errors during merge.
-  //
-  // Return true on success.
-  // All values passed in will be client-specific values. So if this method
-  // returns false, it is because client specified bad data or there was
-  // internal corruption. This will be treated as an error by the library.
-  //
-  // Also make use of the *logger for error messages.
-  virtual bool FullMerge(const Slice& key,
-                         const Slice* existing_value,
-                         const std::deque<std::string>& operand_list,
-                         std::string* new_value,
-                         Logger* logger) const = 0;
-
-  // This function performs merge(left_op, right_op)
-  // when both the operands are themselves merge operation types
-  // that you would have passed to a DB::Merge() call in the same order
-  // (i.e.: DB::Merge(key,left_op), followed by DB::Merge(key,right_op)).
-  //
-  // PartialMerge should combine them into a single merge operation that is
-  // saved into *new_value, and then it should return true.
-  // *new_value should be constructed such that a call to
-  // DB::Merge(key, *new_value) would yield the same result as a call
-  // to DB::Merge(key, left_op) followed by DB::Merge(key, right_op).
-  //
-  // The default implementation of PartialMergeMulti will use this function
-  // as a helper, for backward compatibility.  Any successor class of
-  // MergeOperator should either implement PartialMerge or PartialMergeMulti,
-  // although implementing PartialMergeMulti is suggested as it is in general
-  // more effective to merge multiple operands at a time instead of two
-  // operands at a time.
-  //
-  // If it is impossible or infeasible to combine the two operations,
-  // leave new_value unchanged and return false. The library will
-  // internally keep track of the operations, and apply them in the
-  // correct order once a base-value (a Put/Delete/End-of-Database) is seen.
-  //
-  // TODO: Presently there is no way to differentiate between error/corruption
-  // and simply "return false". For now, the client should simply return
-  // false in any case it cannot perform partial-merge, regardless of reason.
-  // If there is corruption in the data, handle it in the FullMerge() function,
-  // and return false there.  The default implementation of PartialMerge will
-  // always return false.
-  virtual bool PartialMerge(const Slice& key, const Slice& left_operand,
-                            const Slice& right_operand, std::string* new_value,
-                            Logger* logger) const {
-    return false;
-  }
-
-  // This function performs merge when all the operands are themselves merge
-  // operation types that you would have passed to a DB::Merge() call in the
-  // same order (front() first)
-  // (i.e. DB::Merge(key, operand_list[0]), followed by
-  //  DB::Merge(key, operand_list[1]), ...)
-  //
-  // PartialMergeMulti should combine them into a single merge operation that is
-  // saved into *new_value, and then it should return true.  *new_value should
-  // be constructed such that a call to DB::Merge(key, *new_value) would yield
-  // the same result as subquential individual calls to DB::Merge(key, operand)
-  // for each operand in operand_list from front() to back().
-  //
-  // The PartialMergeMulti function will be called only when the list of
-  // operands are long enough. The minimum amount of operands that will be
-  // passed to the function are specified by the "min_partial_merge_operands"
-  // option.
-  //
-  // In the default implementation, PartialMergeMulti will invoke PartialMerge
-  // multiple times, where each time it only merges two operands.  Developers
-  // should either implement PartialMergeMulti, or implement PartialMerge which
-  // is served as the helper function of the default PartialMergeMulti.
-  virtual bool PartialMergeMulti(const Slice& key,
-                                 const std::deque<Slice>& operand_list,
-                                 std::string* new_value, Logger* logger) const;
-
-  // The name of the MergeOperator. Used to check for MergeOperator
-  // mismatches (i.e., a DB created with one MergeOperator is
-  // accessed using a different MergeOperator)
-  // TODO: the name is currently not stored persistently and thus
-  //       no checking is enforced. Client is responsible for providing
-  //       consistent MergeOperator between DB opens.
-  virtual const char* Name() const = 0;
-};
-
-// The simpler, associative merge operator.
-class AssociativeMergeOperator : public MergeOperator {
- public:
-  virtual ~AssociativeMergeOperator() {}
-
-  // Gives the client a way to express the read -> modify -> write semantics
-  // key:           (IN) The key that's associated with this merge operation.
-  // existing_value:(IN) null indicates the key does not exist before this op
-  // value:         (IN) the value to update/merge the existing_value with
-  // new_value:    (OUT) Client is responsible for filling the merge result here
-  // logger:        (IN) Client could use this to log errors during merge.
-  //
-  // Return true on success.
-  // All values passed in will be client-specific values. So if this method
-  // returns false, it is because client specified bad data or there was
-  // internal corruption. The client should assume that this will be treated
-  // as an error by the library.
-  virtual bool Merge(const Slice& key,
-                     const Slice* existing_value,
-                     const Slice& value,
-                     std::string* new_value,
-                     Logger* logger) const = 0;
-
-
- private:
-  // Default implementations of the MergeOperator functions
-  virtual bool FullMerge(const Slice& key,
-                         const Slice* existing_value,
-                         const std::deque<std::string>& operand_list,
-                         std::string* new_value,
-                         Logger* logger) const override;
-
-  virtual bool PartialMerge(const Slice& key,
-                            const Slice& left_operand,
-                            const Slice& right_operand,
-                            std::string* new_value,
-                            Logger* logger) const override;
-};
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_MERGE_OPERATOR_H_
diff --git a/src/rocksdb/include/rocksdb/options.h b/src/rocksdb/include/rocksdb/options.h
deleted file mode 100644
index 93dbf0d..0000000
--- a/src/rocksdb/include/rocksdb/options.h
+++ /dev/null
@@ -1,930 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_OPTIONS_H_
-#define STORAGE_ROCKSDB_INCLUDE_OPTIONS_H_
-
-#include <stddef.h>
-#include <string>
-#include <memory>
-#include <vector>
-#include <stdint.h>
-
-#include "rocksdb/version.h"
-#include "rocksdb/universal_compaction.h"
-
-namespace rocksdb {
-
-class Cache;
-class CompactionFilter;
-class CompactionFilterFactory;
-class CompactionFilterFactoryV2;
-class Comparator;
-class Env;
-enum InfoLogLevel : unsigned char;
-class FilterPolicy;
-class Logger;
-class MergeOperator;
-class Snapshot;
-class TableFactory;
-class MemTableRepFactory;
-class TablePropertiesCollector;
-class Slice;
-class SliceTransform;
-class Statistics;
-class InternalKeyComparator;
-
-using std::shared_ptr;
-
-// DB contents are stored in a set of blocks, each of which holds a
-// sequence of key,value pairs.  Each block may be compressed before
-// being stored in a file.  The following enum describes which
-// compression method (if any) is used to compress a block.
-enum CompressionType : char {
-  // NOTE: do not change the values of existing entries, as these are
-  // part of the persistent format on disk.
-  kNoCompression = 0x0, kSnappyCompression = 0x1, kZlibCompression = 0x2,
-  kBZip2Compression = 0x3, kLZ4Compression = 0x4, kLZ4HCCompression = 0x5
-};
-
-enum CompactionStyle : char {
-  kCompactionStyleLevel = 0x0,     // level based compaction style
-  kCompactionStyleUniversal = 0x1  // Universal compaction style
-};
-
-// Compression options for different compression algorithms like Zlib
-struct CompressionOptions {
-  int window_bits;
-  int level;
-  int strategy;
-  CompressionOptions() : window_bits(-14), level(-1), strategy(0) {}
-  CompressionOptions(int wbits, int _lev, int _strategy)
-      : window_bits(wbits), level(_lev), strategy(_strategy) {}
-};
-
-enum UpdateStatus {    // Return status For inplace update callback
-  UPDATE_FAILED   = 0, // Nothing to update
-  UPDATED_INPLACE = 1, // Value updated inplace
-  UPDATED         = 2, // No inplace update. Merged value set
-};
-
-struct Options;
-
-struct ColumnFamilyOptions {
-  // -------------------
-  // Parameters that affect behavior
-
-  // Comparator used to define the order of keys in the table.
-  // Default: a comparator that uses lexicographic byte-wise ordering
-  //
-  // REQUIRES: The client must ensure that the comparator supplied
-  // here has the same name and orders keys *exactly* the same as the
-  // comparator provided to previous open calls on the same DB.
-  const Comparator* comparator;
-
-  // REQUIRES: The client must provide a merge operator if Merge operation
-  // needs to be accessed. Calling Merge on a DB without a merge operator
-  // would result in Status::NotSupported. The client must ensure that the
-  // merge operator supplied here has the same name and *exactly* the same
-  // semantics as the merge operator provided to previous open calls on
-  // the same DB. The only exception is reserved for upgrade, where a DB
-  // previously without a merge operator is introduced to Merge operation
-  // for the first time. It's necessary to specify a merge operator when
-  // openning the DB in this case.
-  // Default: nullptr
-  shared_ptr<MergeOperator> merge_operator;
-
-  // A single CompactionFilter instance to call into during compaction.
-  // Allows an application to modify/delete a key-value during background
-  // compaction.
-  //
-  // If the client requires a new compaction filter to be used for different
-  // compaction runs, it can specify compaction_filter_factory instead of this
-  // option.  The client should specify only one of the two.
-  // compaction_filter takes precedence over compaction_filter_factory if
-  // client specifies both.
-  //
-  // If multithreaded compaction is being used, the supplied CompactionFilter
-  // instance may be used from different threads concurrently and so should be
-  // thread-safe.
-  //
-  // Default: nullptr
-  const CompactionFilter* compaction_filter;
-
-  // This is a factory that provides compaction filter objects which allow
-  // an application to modify/delete a key-value during background compaction.
-  //
-  // A new filter will be created on each compaction run.  If multithreaded
-  // compaction is being used, each created CompactionFilter will only be used
-  // from a single thread and so does not need to be thread-safe.
-  //
-  // Default: a factory that doesn't provide any object
-  std::shared_ptr<CompactionFilterFactory> compaction_filter_factory;
-
-  // Version TWO of the compaction_filter_factory
-  // It supports rolling compaction
-  //
-  // Default: a factory that doesn't provide any object
-  std::shared_ptr<CompactionFilterFactoryV2> compaction_filter_factory_v2;
-
-  // -------------------
-  // Parameters that affect performance
-
-  // Amount of data to build up in memory (backed by an unsorted log
-  // on disk) before converting to a sorted on-disk file.
-  //
-  // Larger values increase performance, especially during bulk loads.
-  // Up to max_write_buffer_number write buffers may be held in memory
-  // at the same time,
-  // so you may wish to adjust this parameter to control memory usage.
-  // Also, a larger write buffer will result in a longer recovery time
-  // the next time the database is opened.
-  //
-  // Default: 4MB
-  size_t write_buffer_size;
-
-  // The maximum number of write buffers that are built up in memory.
-  // The default is 2, so that when 1 write buffer is being flushed to
-  // storage, new writes can continue to the other write buffer.
-  // Default: 2
-  int max_write_buffer_number;
-
-  // The minimum number of write buffers that will be merged together
-  // before writing to storage.  If set to 1, then
-  // all write buffers are fushed to L0 as individual files and this increases
-  // read amplification because a get request has to check in all of these
-  // files. Also, an in-memory merge may result in writing lesser
-  // data to storage if there are duplicate records in each of these
-  // individual write buffers.  Default: 1
-  int min_write_buffer_number_to_merge;
-
-  // Control over blocks (user data is stored in a set of blocks, and
-  // a block is the unit of reading from disk).
-
-  // If non-NULL use the specified cache for blocks.
-  // If NULL, rocksdb will automatically create and use an 8MB internal cache.
-  // Default: nullptr
-  shared_ptr<Cache> block_cache;
-
-  // If non-NULL use the specified cache for compressed blocks.
-  // If NULL, rocksdb will not use a compressed block cache.
-  // Default: nullptr
-  shared_ptr<Cache> block_cache_compressed;
-
-  // Approximate size of user data packed per block.  Note that the
-  // block size specified here corresponds to uncompressed data.  The
-  // actual size of the unit read from disk may be smaller if
-  // compression is enabled.  This parameter can be changed dynamically.
-  //
-  // Default: 4K
-  size_t block_size;
-
-  // Number of keys between restart points for delta encoding of keys.
-  // This parameter can be changed dynamically.  Most clients should
-  // leave this parameter alone.
-  //
-  // Default: 16
-  int block_restart_interval;
-
-  // Compress blocks using the specified compression algorithm.  This
-  // parameter can be changed dynamically.
-  //
-  // Default: kSnappyCompression, which gives lightweight but fast
-  // compression.
-  //
-  // Typical speeds of kSnappyCompression on an Intel(R) Core(TM)2 2.4GHz:
-  //    ~200-500MB/s compression
-  //    ~400-800MB/s decompression
-  // Note that these speeds are significantly faster than most
-  // persistent storage speeds, and therefore it is typically never
-  // worth switching to kNoCompression.  Even if the input data is
-  // incompressible, the kSnappyCompression implementation will
-  // efficiently detect that and will switch to uncompressed mode.
-  CompressionType compression;
-
-  // Different levels can have different compression policies. There
-  // are cases where most lower levels would like to quick compression
-  // algorithm while the higher levels (which have more data) use
-  // compression algorithms that have better compression but could
-  // be slower. This array, if non nullptr, should have an entry for
-  // each level of the database. This array, if non nullptr, overides the
-  // value specified in the previous field 'compression'. The caller is
-  // reponsible for allocating memory and initializing the values in it
-  // before invoking Open(). The caller is responsible for freeing this
-  // array and it could be freed anytime after the return from Open().
-  // This could have been a std::vector but that makes the equivalent
-  // java/C api hard to construct.
-  std::vector<CompressionType> compression_per_level;
-
-  // different options for compression algorithms
-  CompressionOptions compression_opts;
-
-  // If non-nullptr, use the specified filter policy to reduce disk reads.
-  // Many applications will benefit from passing the result of
-  // NewBloomFilterPolicy() here.
-  //
-  // Default: nullptr
-  const FilterPolicy* filter_policy;
-
-  // If non-nullptr, use the specified function to determine the
-  // prefixes for keys.  These prefixes will be placed in the filter.
-  // Depending on the workload, this can reduce the number of read-IOP
-  // cost for scans when a prefix is passed via ReadOptions to
-  // db.NewIterator().  For prefix filtering to work properly,
-  // "prefix_extractor" and "comparator" must be such that the following
-  // properties hold:
-  //
-  // 1) key.starts_with(prefix(key))
-  // 2) Compare(prefix(key), key) <= 0.
-  // 3) If Compare(k1, k2) <= 0, then Compare(prefix(k1), prefix(k2)) <= 0
-  // 4) prefix(prefix(key)) == prefix(key)
-  //
-  // Default: nullptr
-  std::shared_ptr<const SliceTransform> prefix_extractor;
-
-  // If true, place whole keys in the filter (not just prefixes).
-  // This must generally be true for gets to be efficient.
-  //
-  // Default: true
-  bool whole_key_filtering;
-
-  // Number of levels for this database
-  int num_levels;
-
-  // Number of files to trigger level-0 compaction. A value <0 means that
-  // level-0 compaction will not be triggered by number of files at all.
-  //
-  // Default: 4
-  int level0_file_num_compaction_trigger;
-
-  // Soft limit on number of level-0 files. We start slowing down writes at this
-  // point. A value <0 means that no writing slow down will be triggered by
-  // number of files in level-0.
-  int level0_slowdown_writes_trigger;
-
-  // Maximum number of level-0 files.  We stop writes at this point.
-  int level0_stop_writes_trigger;
-
-  // Maximum level to which a new compacted memtable is pushed if it
-  // does not create overlap.  We try to push to level 2 to avoid the
-  // relatively expensive level 0=>1 compactions and to avoid some
-  // expensive manifest file operations.  We do not push all the way to
-  // the largest level since that can generate a lot of wasted disk
-  // space if the same key space is being repeatedly overwritten.
-  int max_mem_compaction_level;
-
-  // Target file size for compaction.
-  // target_file_size_base is per-file size for level-1.
-  // Target file size for level L can be calculated by
-  // target_file_size_base * (target_file_size_multiplier ^ (L-1))
-  // For example, if target_file_size_base is 2MB and
-  // target_file_size_multiplier is 10, then each file on level-1 will
-  // be 2MB, and each file on level 2 will be 20MB,
-  // and each file on level-3 will be 200MB.
-
-  // by default target_file_size_base is 2MB.
-  int target_file_size_base;
-  // by default target_file_size_multiplier is 1, which means
-  // by default files in different levels will have similar size.
-  int target_file_size_multiplier;
-
-  // Control maximum total data size for a level.
-  // max_bytes_for_level_base is the max total for level-1.
-  // Maximum number of bytes for level L can be calculated as
-  // (max_bytes_for_level_base) * (max_bytes_for_level_multiplier ^ (L-1))
-  // For example, if max_bytes_for_level_base is 20MB, and if
-  // max_bytes_for_level_multiplier is 10, total data size for level-1
-  // will be 20MB, total file size for level-2 will be 200MB,
-  // and total file size for level-3 will be 2GB.
-
-  // by default 'max_bytes_for_level_base' is 10MB.
-  uint64_t max_bytes_for_level_base;
-  // by default 'max_bytes_for_level_base' is 10.
-  int max_bytes_for_level_multiplier;
-
-  // Different max-size multipliers for different levels.
-  // These are multiplied by max_bytes_for_level_multiplier to arrive
-  // at the max-size of each level.
-  // Default: 1
-  std::vector<int> max_bytes_for_level_multiplier_additional;
-
-  // Maximum number of bytes in all compacted files.  We avoid expanding
-  // the lower level file set of a compaction if it would make the
-  // total compaction cover more than
-  // (expanded_compaction_factor * targetFileSizeLevel()) many bytes.
-  int expanded_compaction_factor;
-
-  // Maximum number of bytes in all source files to be compacted in a
-  // single compaction run. We avoid picking too many files in the
-  // source level so that we do not exceed the total source bytes
-  // for compaction to exceed
-  // (source_compaction_factor * targetFileSizeLevel()) many bytes.
-  // Default:1, i.e. pick maxfilesize amount of data as the source of
-  // a compaction.
-  int source_compaction_factor;
-
-  // Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
-  // stop building a single file in a level->level+1 compaction.
-  int max_grandparent_overlap_factor;
-
-  // Disable compaction triggered by seek.
-  // With bloomfilter and fast storage, a miss on one level
-  // is very cheap if the file handle is cached in table cache
-  // (which is true if max_open_files is large).
-  bool disable_seek_compaction;
-
-  // Puts are delayed 0-1 ms when any level has a compaction score that exceeds
-  // soft_rate_limit. This is ignored when == 0.0.
-  // CONSTRAINT: soft_rate_limit <= hard_rate_limit. If this constraint does not
-  // hold, RocksDB will set soft_rate_limit = hard_rate_limit
-  // Default: 0 (disabled)
-  double soft_rate_limit;
-
-  // Puts are delayed 1ms at a time when any level has a compaction score that
-  // exceeds hard_rate_limit. This is ignored when <= 1.0.
-  // Default: 0 (disabled)
-  double hard_rate_limit;
-
-  // Max time a put will be stalled when hard_rate_limit is enforced. If 0, then
-  // there is no limit.
-  // Default: 1000
-  unsigned int rate_limit_delay_max_milliseconds;
-
-  // Disable block cache. If this is set to true,
-  // then no block cache should be used, and the block_cache should
-  // point to a nullptr object.
-  // Default: false
-  bool no_block_cache;
-
-  // size of one block in arena memory allocation.
-  // If <= 0, a proper value is automatically calculated (usually 1/10 of
-  // writer_buffer_size).
-  //
-  // There are two additonal restriction of the The specified size:
-  // (1) size should be in the range of [4096, 2 << 30] and
-  // (2) be the multiple of the CPU word (which helps with the memory
-  // alignment).
-  //
-  // We'll automatically check and adjust the size number to make sure it
-  // conforms to the restrictions.
-  //
-  // Default: 0
-  size_t arena_block_size;
-
-  // Disable automatic compactions. Manual compactions can still
-  // be issued on this column family
-  bool disable_auto_compactions;
-
-  // Purge duplicate/deleted keys when a memtable is flushed to storage.
-  // Default: true
-  bool purge_redundant_kvs_while_flush;
-
-  // This is used to close a block before it reaches the configured
-  // 'block_size'. If the percentage of free space in the current block is less
-  // than this specified number and adding a new record to the block will
-  // exceed the configured block size, then this block will be closed and the
-  // new record will be written to the next block.
-  // Default is 10.
-  int block_size_deviation;
-
-  // The compaction style. Default: kCompactionStyleLevel
-  CompactionStyle compaction_style;
-
-  // If true, compaction will verify checksum on every read that happens
-  // as part of compaction
-  // Default: true
-  bool verify_checksums_in_compaction;
-
-  // The options needed to support Universal Style compactions
-  CompactionOptionsUniversal compaction_options_universal;
-
-  // Use KeyMayExist API to filter deletes when this is true.
-  // If KeyMayExist returns false, i.e. the key definitely does not exist, then
-  // the delete is a noop. KeyMayExist only incurs in-memory look up.
-  // This optimization avoids writing the delete to storage when appropriate.
-  // Default: false
-  bool filter_deletes;
-
-  // An iteration->Next() sequentially skips over keys with the same
-  // user-key unless this option is set. This number specifies the number
-  // of keys (with the same userkey) that will be sequentially
-  // skipped before a reseek is issued.
-  // Default: 8
-  uint64_t max_sequential_skip_in_iterations;
-
-  // This is a factory that provides MemTableRep objects.
-  // Default: a factory that provides a skip-list-based implementation of
-  // MemTableRep.
-  std::shared_ptr<MemTableRepFactory> memtable_factory;
-
-  // This is a factory that provides TableFactory objects.
-  // Default: a factory that provides a default implementation of
-  // Table and TableBuilder.
-  std::shared_ptr<TableFactory> table_factory;
-
-  // This option allows user to to collect their own interested statistics of
-  // the tables.
-  // Default: emtpy vector -- no user-defined statistics collection will be
-  // performed.
-  typedef std::vector<std::shared_ptr<TablePropertiesCollector>>
-      TablePropertiesCollectors;
-  TablePropertiesCollectors table_properties_collectors;
-
-  // Allows thread-safe inplace updates.
-  // If inplace_callback function is not set,
-  //   Put(key, new_value) will update inplace the existing_value iff
-  //   * key exists in current memtable
-  //   * new sizeof(new_value) <= sizeof(existing_value)
-  //   * existing_value for that key is a put i.e. kTypeValue
-  // If inplace_callback function is set, check doc for inplace_callback.
-  // Default: false.
-  bool inplace_update_support;
-
-  // Number of locks used for inplace update
-  // Default: 10000, if inplace_update_support = true, else 0.
-  size_t inplace_update_num_locks;
-
-  // existing_value - pointer to previous value (from both memtable and sst).
-  //                  nullptr if key doesn't exist
-  // existing_value_size - pointer to size of existing_value).
-  //                       nullptr if key doesn't exist
-  // delta_value - Delta value to be merged with the existing_value.
-  //               Stored in transaction logs.
-  // merged_value - Set when delta is applied on the previous value.
-
-  // Applicable only when inplace_update_support is true,
-  // this callback function is called at the time of updating the memtable
-  // as part of a Put operation, lets say Put(key, delta_value). It allows the
-  // 'delta_value' specified as part of the Put operation to be merged with
-  // an 'existing_value' of the key in the database.
-
-  // If the merged value is smaller in size that the 'existing_value',
-  // then this function can update the 'existing_value' buffer inplace and
-  // the corresponding 'existing_value'_size pointer, if it wishes to.
-  // The callback should return UpdateStatus::UPDATED_INPLACE.
-  // In this case. (In this case, the snapshot-semantics of the rocksdb
-  // Iterator is not atomic anymore).
-
-  // If the merged value is larger in size than the 'existing_value' or the
-  // application does not wish to modify the 'existing_value' buffer inplace,
-  // then the merged value should be returned via *merge_value. It is set by
-  // merging the 'existing_value' and the Put 'delta_value'. The callback should
-  // return UpdateStatus::UPDATED in this case. This merged value will be added
-  // to the memtable.
-
-  // If merging fails or the application does not wish to take any action,
-  // then the callback should return UpdateStatus::UPDATE_FAILED.
-
-  // Please remember that the original call from the application is Put(key,
-  // delta_value). So the transaction log (if enabled) will still contain (key,
-  // delta_value). The 'merged_value' is not stored in the transaction log.
-  // Hence the inplace_callback function should be consistent across db reopens.
-
-  // Default: nullptr
-  UpdateStatus (*inplace_callback)(char* existing_value,
-                                   uint32_t* existing_value_size,
-                                   Slice delta_value,
-                                   std::string* merged_value);
-
-  // if prefix_extractor is set and bloom_bits is not 0, create prefix bloom
-  // for memtable
-  uint32_t memtable_prefix_bloom_bits;
-
-  // number of hash probes per key
-  uint32_t memtable_prefix_bloom_probes;
-
-  // Page size for huge page TLB for bloom in memtable. If <=0, not allocate
-  // from huge page TLB but from malloc.
-  // Need to reserve huge pages for it to be allocated. For example:
-  //      sysctl -w vm.nr_hugepages=20
-  // See linux doc Documentation/vm/hugetlbpage.txt
-
-  size_t memtable_prefix_bloom_huge_page_tlb_size;
-
-  // Control locality of bloom filter probes to improve cache miss rate.
-  // This option only applies to memtable prefix bloom and plaintable
-  // prefix bloom. It essentially limits the max number of cache lines each
-  // bloom filter check can touch.
-  // This optimization is turned off when set to 0. The number should never
-  // be greater than number of probes. This option can boost performance
-  // for in-memory workload but should use with care since it can cause
-  // higher false positive rate.
-  // Default: 0
-  uint32_t bloom_locality;
-
-  // Maximum number of successive merge operations on a key in the memtable.
-  //
-  // When a merge operation is added to the memtable and the maximum number of
-  // successive merges is reached, the value of the key will be calculated and
-  // inserted into the memtable instead of the merge operation. This will
-  // ensure that there are never more than max_successive_merges merge
-  // operations in the memtable.
-  //
-  // Default: 0 (disabled)
-  size_t max_successive_merges;
-
-  // The number of partial merge operands to accumulate before partial
-  // merge will be performed. Partial merge will not be called
-  // if the list of values to merge is less than min_partial_merge_operands.
-  //
-  // If min_partial_merge_operands < 2, then it will be treated as 2.
-  //
-  // Default: 2
-  uint32_t min_partial_merge_operands;
-
-  // Create ColumnFamilyOptions with default values for all fields
-  ColumnFamilyOptions();
-  // Create ColumnFamilyOptions from Options
-  explicit ColumnFamilyOptions(const Options& options);
-
-  void Dump(Logger* log) const;
-};
-
-struct DBOptions {
-  // If true, the database will be created if it is missing.
-  // Default: false
-  bool create_if_missing;
-
-  // If true, an error is raised if the database already exists.
-  // Default: false
-  bool error_if_exists;
-
-  // If true, the implementation will do aggressive checking of the
-  // data it is processing and will stop early if it detects any
-  // errors.  This may have unforeseen ramifications: for example, a
-  // corruption of one DB entry may cause a large number of entries to
-  // become unreadable or for the entire DB to become unopenable.
-  // If any of the  writes to the database fails (Put, Delete, Merge, Write),
-  // the database will switch to read-only mode and fail all other
-  // Write operations.
-  // Default: true
-  bool paranoid_checks;
-
-  // Use the specified object to interact with the environment,
-  // e.g. to read/write files, schedule background work, etc.
-  // Default: Env::Default()
-  Env* env;
-
-  // Any internal progress/error information generated by the db will
-  // be written to info_log if it is non-nullptr, or to a file stored
-  // in the same directory as the DB contents if info_log is nullptr.
-  // Default: nullptr
-  shared_ptr<Logger> info_log;
-
-  InfoLogLevel info_log_level;
-
-  // Number of open files that can be used by the DB.  You may need to
-  // increase this if your database has a large working set. Value -1 means
-  // files opened are always kept open. You can estimate number of files based
-  // on target_file_size_base and target_file_size_multiplier for level-based
-  // compaction. For universal-style compaction, you can usually set it to -1.
-  // Default: 5000
-  int max_open_files;
-
-  // Once write-ahead logs exceed this size, we will start forcing the flush of
-  // column families whose memtables are backed by the oldest live WAL file
-  // (i.e. the ones that are causing all the space amplification). If set to 0
-  // (default), we will dynamically choose the WAL size limit to be
-  // [sum of all write_buffer_size * max_write_buffer_number] * 2
-  // Default: 0
-  uint64_t max_total_wal_size;
-
-  // If non-null, then we should collect metrics about database operations
-  // Statistics objects should not be shared between DB instances as
-  // it does not use any locks to prevent concurrent updates.
-  shared_ptr<Statistics> statistics;
-
-  // If true, then the contents of data files are not synced
-  // to stable storage. Their contents remain in the OS buffers till the
-  // OS decides to flush them. This option is good for bulk-loading
-  // of data. Once the bulk-loading is complete, please issue a
-  // sync to the OS to flush all dirty buffesrs to stable storage.
-  // Default: false
-  bool disableDataSync;
-
-  // If true, then every store to stable storage will issue a fsync.
-  // If false, then every store to stable storage will issue a fdatasync.
-  // This parameter should be set to true while storing data to
-  // filesystem like ext3 that can lose files after a reboot.
-  // Default: false
-  bool use_fsync;
-
-  // This number controls how often a new scribe log about
-  // db deploy stats is written out.
-  // -1 indicates no logging at all.
-  // Default value is 1800 (half an hour).
-  int db_stats_log_interval;
-
-  // This specifies the info LOG dir.
-  // If it is empty, the log files will be in the same dir as data.
-  // If it is non empty, the log files will be in the specified dir,
-  // and the db data dir's absolute path will be used as the log file
-  // name's prefix.
-  std::string db_log_dir;
-
-  // This specifies the absolute dir path for write-ahead logs (WAL).
-  // If it is empty, the log files will be in the same dir as data,
-  //   dbname is used as the data dir by default
-  // If it is non empty, the log files will be in kept the specified dir.
-  // When destroying the db,
-  //   all log files in wal_dir and the dir itself is deleted
-  std::string wal_dir;
-
-  // The periodicity when obsolete files get deleted. The default
-  // value is 6 hours. The files that get out of scope by compaction
-  // process will still get automatically delete on every compaction,
-  // regardless of this setting
-  uint64_t delete_obsolete_files_period_micros;
-
-  // Maximum number of concurrent background compaction jobs, submitted to
-  // the default LOW priority thread pool.
-  // If you're increasing this, also consider increasing number of threads in
-  // LOW priority thread pool. For more information, see
-  // Env::SetBackgroundThreads
-  // Default: 1
-  int max_background_compactions;
-
-  // Maximum number of concurrent background memtable flush jobs, submitted to
-  // the HIGH priority thread pool.
-  //
-  // By default, all background jobs (major compaction and memtable flush) go
-  // to the LOW priority pool. If this option is set to a positive number,
-  // memtable flush jobs will be submitted to the HIGH priority pool.
-  // It is important when the same Env is shared by multiple db instances.
-  // Without a separate pool, long running major compaction jobs could
-  // potentially block memtable flush jobs of other db instances, leading to
-  // unnecessary Put stalls.
-  //
-  // If you're increasing this, also consider increasing number of threads in
-  // HIGH priority thread pool. For more information, see
-  // Env::SetBackgroundThreads
-  // Default: 1
-  int max_background_flushes;
-
-  // Specify the maximal size of the info log file. If the log file
-  // is larger than `max_log_file_size`, a new info log file will
-  // be created.
-  // If max_log_file_size == 0, all logs will be written to one
-  // log file.
-  size_t max_log_file_size;
-
-  // Time for the info log file to roll (in seconds).
-  // If specified with non-zero value, log file will be rolled
-  // if it has been active longer than `log_file_time_to_roll`.
-  // Default: 0 (disabled)
-  size_t log_file_time_to_roll;
-
-  // Maximal info log files to be kept.
-  // Default: 1000
-  size_t keep_log_file_num;
-
-  // manifest file is rolled over on reaching this limit.
-  // The older manifest file be deleted.
-  // The default value is MAX_INT so that roll-over does not take place.
-  uint64_t max_manifest_file_size;
-
-  // Number of shards used for table cache.
-  int table_cache_numshardbits;
-
-  // During data eviction of table's LRU cache, it would be inefficient
-  // to strictly follow LRU because this piece of memory will not really
-  // be released unless its refcount falls to zero. Instead, make two
-  // passes: the first pass will release items with refcount = 1,
-  // and if not enough space releases after scanning the number of
-  // elements specified by this parameter, we will remove items in LRU
-  // order.
-  int table_cache_remove_scan_count_limit;
-
-  // The following two fields affect how archived logs will be deleted.
-  // 1. If both set to 0, logs will be deleted asap and will not get into
-  //    the archive.
-  // 2. If WAL_ttl_seconds is 0 and WAL_size_limit_MB is not 0,
-  //    WAL files will be checked every 10 min and if total size is greater
-  //    then WAL_size_limit_MB, they will be deleted starting with the
-  //    earliest until size_limit is met. All empty files will be deleted.
-  // 3. If WAL_ttl_seconds is not 0 and WAL_size_limit_MB is 0, then
-  //    WAL files will be checked every WAL_ttl_secondsi / 2 and those that
-  //    are older than WAL_ttl_seconds will be deleted.
-  // 4. If both are not 0, WAL files will be checked every 10 min and both
-  //    checks will be performed with ttl being first.
-  uint64_t WAL_ttl_seconds;
-  uint64_t WAL_size_limit_MB;
-
-  // Number of bytes to preallocate (via fallocate) the manifest
-  // files.  Default is 4mb, which is reasonable to reduce random IO
-  // as well as prevent overallocation for mounts that preallocate
-  // large amounts of data (such as xfs's allocsize option).
-  size_t manifest_preallocation_size;
-
-  // Data being read from file storage may be buffered in the OS
-  // Default: true
-  bool allow_os_buffer;
-
-  // Allow the OS to mmap file for reading sst tables. Default: false
-  bool allow_mmap_reads;
-
-  // Allow the OS to mmap file for writing. Default: false
-  bool allow_mmap_writes;
-
-  // Disable child process inherit open files. Default: true
-  bool is_fd_close_on_exec;
-
-  // Skip log corruption error on recovery (If client is ok with
-  // losing most recent changes)
-  // Default: false
-  bool skip_log_error_on_recovery;
-
-  // if not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
-  // Default: 3600 (1 hour)
-  unsigned int stats_dump_period_sec;
-
-  // If set true, will hint the underlying file system that the file
-  // access pattern is random, when a sst file is opened.
-  // Default: true
-  bool advise_random_on_open;
-
-  // Specify the file access pattern once a compaction is started.
-  // It will be applied to all input files of a compaction.
-  // Default: NORMAL
-  enum {
-    NONE,
-    NORMAL,
-    SEQUENTIAL,
-    WILLNEED
-  } access_hint_on_compaction_start;
-
-  // Use adaptive mutex, which spins in the user space before resorting
-  // to kernel. This could reduce context switch when the mutex is not
-  // heavily contended. However, if the mutex is hot, we could end up
-  // wasting spin time.
-  // Default: false
-  bool use_adaptive_mutex;
-
-  // Allows OS to incrementally sync files to disk while they are being
-  // written, asynchronously, in the background.
-  // Issue one request for every bytes_per_sync written. 0 turns it off.
-  // Default: 0
-  uint64_t bytes_per_sync;
-
-  // Allow RocksDB to use thread local storage to optimize performance.
-  // Default: true
-  bool allow_thread_local;
-
-  // Create DBOptions with default values for all fields
-  DBOptions();
-  // Create DBOptions from Options
-  explicit DBOptions(const Options& options);
-
-  void Dump(Logger* log) const;
-};
-
-// Options to control the behavior of a database (passed to DB::Open)
-struct Options : public DBOptions, public ColumnFamilyOptions {
-  // Create an Options object with default values for all fields.
-  Options() :
-    DBOptions(),
-    ColumnFamilyOptions() {}
-
-  Options(const DBOptions& db_options,
-          const ColumnFamilyOptions& column_family_options)
-      : DBOptions(db_options), ColumnFamilyOptions(column_family_options) {}
-
-  void Dump(Logger* log) const;
-
-  // Set appropriate parameters for bulk loading.
-  // The reason that this is a function that returns "this" instead of a
-  // constructor is to enable chaining of multiple similar calls in the future.
-  //
-
-  // All data will be in level 0 without any automatic compaction.
-  // It's recommended to manually call CompactRange(NULL, NULL) before reading
-  // from the database, because otherwise the read can be very slow.
-  Options* PrepareForBulkLoad();
-};
-
-//
-// An application can issue a read request (via Get/Iterators) and specify
-// if that read should process data that ALREADY resides on a specified cache
-// level. For example, if an application specifies kBlockCacheTier then the
-// Get call will process data that is already processed in the memtable or
-// the block cache. It will not page in data from the OS cache or data that
-// resides in storage.
-enum ReadTier {
-  kReadAllTier = 0x0,    // data in memtable, block cache, OS cache or storage
-  kBlockCacheTier = 0x1  // data in memtable or block cache
-};
-
-// Options that control read operations
-struct ReadOptions {
-  // If true, all data read from underlying storage will be
-  // verified against corresponding checksums.
-  // Default: true
-  bool verify_checksums;
-
-  // Should the "data block"/"index block"/"filter block" read for this
-  // iteration be cached in memory?
-  // Callers may wish to set this field to false for bulk scans.
-  // Default: true
-  bool fill_cache;
-
-  // If this option is set and memtable implementation allows, Seek
-  // might only return keys with the same prefix as the seek-key
-  //
-  // ! DEPRECATED: prefix_seek is on by default when prefix_extractor
-  // is configured
-  // bool prefix_seek;
-
-  // If "snapshot" is non-nullptr, read as of the supplied snapshot
-  // (which must belong to the DB that is being read and which must
-  // not have been released).  If "snapshot" is nullptr, use an impliicit
-  // snapshot of the state at the beginning of this read operation.
-  // Default: nullptr
-  const Snapshot* snapshot;
-
-  // If "prefix" is non-nullptr, and ReadOptions is being passed to
-  // db.NewIterator, only return results when the key begins with this
-  // prefix.  This field is ignored by other calls (e.g., Get).
-  // Options.prefix_extractor must also be set, and
-  // prefix_extractor.InRange(prefix) must be true.  The iterator
-  // returned by NewIterator when this option is set will behave just
-  // as if the underlying store did not contain any non-matching keys,
-  // with two exceptions.  Seek() only accepts keys starting with the
-  // prefix, and SeekToLast() is not supported.  prefix filter with this
-  // option will sometimes reduce the number of read IOPs.
-  // Default: nullptr
-  //
-  // ! DEPRECATED
-  // const Slice* prefix;
-
-  // Specify if this read request should process data that ALREADY
-  // resides on a particular cache. If the required data is not
-  // found at the specified cache, then Status::Incomplete is returned.
-  // Default: kReadAllTier
-  ReadTier read_tier;
-
-  // Specify to create a tailing iterator -- a special iterator that has a
-  // view of the complete database (i.e. it can also be used to read newly
-  // added data) and is optimized for sequential reads. It will return records
-  // that were inserted into the database after the creation of the iterator.
-  // Default: false
-  // Not supported in ROCKSDB_LITE mode!
-  bool tailing;
-
-  ReadOptions()
-      : verify_checksums(true),
-        fill_cache(true),
-        snapshot(nullptr),
-        read_tier(kReadAllTier),
-        tailing(false) {}
-  ReadOptions(bool cksum, bool cache)
-      : verify_checksums(cksum),
-        fill_cache(cache),
-        snapshot(nullptr),
-        read_tier(kReadAllTier),
-        tailing(false) {}
-};
-
-// Options that control write operations
-struct WriteOptions {
-  // If true, the write will be flushed from the operating system
-  // buffer cache (by calling WritableFile::Sync()) before the write
-  // is considered complete.  If this flag is true, writes will be
-  // slower.
-  //
-  // If this flag is false, and the machine crashes, some recent
-  // writes may be lost.  Note that if it is just the process that
-  // crashes (i.e., the machine does not reboot), no writes will be
-  // lost even if sync==false.
-  //
-  // In other words, a DB write with sync==false has similar
-  // crash semantics as the "write()" system call.  A DB write
-  // with sync==true has similar crash semantics to a "write()"
-  // system call followed by "fdatasync()".
-  //
-  // Default: false
-  bool sync;
-
-  // If true, writes will not first go to the write ahead log,
-  // and the write may got lost after a crash.
-  bool disableWAL;
-
-  WriteOptions() : sync(false), disableWAL(false) {}
-};
-
-// Options that control flush operations
-struct FlushOptions {
-  // If true, the flush will wait until the flush is done.
-  // Default: true
-  bool wait;
-
-  FlushOptions() : wait(true) {}
-};
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_OPTIONS_H_
diff --git a/src/rocksdb/include/rocksdb/perf_context.h b/src/rocksdb/include/rocksdb/perf_context.h
deleted file mode 100644
index 0704ea2..0000000
--- a/src/rocksdb/include/rocksdb/perf_context.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_PERF_CONTEXT_H
-#define STORAGE_ROCKSDB_INCLUDE_PERF_CONTEXT_H
-
-#include <stdint.h>
-#include <string>
-
-namespace rocksdb {
-
-enum PerfLevel {
-  kDisable        = 0,  // disable perf stats
-  kEnableCount    = 1,  // enable only count stats
-  kEnableTime     = 2   // enable time stats too
-};
-
-// set the perf stats level
-void SetPerfLevel(PerfLevel level);
-
-// A thread local context for gathering performance counter efficiently
-// and transparently.
-
-struct PerfContext {
-
-  void Reset(); // reset all performance counters to zero
-
-  std::string ToString() const;
-
-  uint64_t user_key_comparison_count; // total number of user key comparisons
-  uint64_t block_cache_hit_count;     // total number of block cache hits
-  uint64_t block_read_count;          // total number of block reads (with IO)
-  uint64_t block_read_byte;           // total number of bytes from block reads
-  uint64_t block_read_time;           // total time spent on block reads
-  uint64_t block_checksum_time;       // total time spent on block checksum
-  uint64_t block_decompress_time;     // total time spent on block decompression
-  // total number of internal keys skipped over during iteration (overwritten or
-  // deleted, to be more specific, hidden by a put or delete of the same key)
-  uint64_t internal_key_skipped_count;
-  // total number of deletes skipped over during iteration
-  uint64_t internal_delete_skipped_count;
-
-  uint64_t get_snapshot_time;          // total time spent on getting snapshot
-  uint64_t get_from_memtable_time;     // total time spent on querying memtables
-  uint64_t get_from_memtable_count;    // number of mem tables queried
-  // total time spent after Get() finds a key
-  uint64_t get_post_process_time;
-  uint64_t get_from_output_files_time; // total time reading from output files
-  // total time spent on seeking child iters
-  uint64_t seek_child_seek_time;
-  // number of seek issued in child iterators
-  uint64_t seek_child_seek_count;
-  uint64_t seek_min_heap_time;         // total time spent on the merge heap
-  // total time spent on seeking the internal entries
-  uint64_t seek_internal_seek_time;
-  // total time spent on iterating internal entries to find the next user entry
-  uint64_t find_next_user_entry_time;
-  // total time spent on pre or post processing when writing a record
-  uint64_t write_pre_and_post_process_time;
-  uint64_t write_wal_time;            // total time spent on writing to WAL
-  // total time spent on writing to mem tables
-  uint64_t write_memtable_time;
-};
-
-#if defined(NPERF_CONTEXT) || defined(IOS_CROSS_COMPILE)
-extern PerfContext perf_context;
-#else
-extern __thread PerfContext perf_context;
-#endif
-
-}
-
-#endif
diff --git a/src/rocksdb/include/rocksdb/slice.h b/src/rocksdb/include/rocksdb/slice.h
deleted file mode 100644
index 2253715..0000000
--- a/src/rocksdb/include/rocksdb/slice.h
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Slice is a simple structure containing a pointer into some external
-// storage and a size.  The user of a Slice must ensure that the slice
-// is not used after the corresponding external storage has been
-// deallocated.
-//
-// Multiple threads can invoke const methods on a Slice without
-// external synchronization, but if any of the threads may call a
-// non-const method, all threads accessing the same Slice must use
-// external synchronization.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_SLICE_H_
-#define STORAGE_ROCKSDB_INCLUDE_SLICE_H_
-
-#include <assert.h>
-#include <stddef.h>
-#include <string.h>
-#include <string>
-
-namespace rocksdb {
-
-class Slice {
- public:
-  // Create an empty slice.
-  Slice() : data_(""), size_(0) { }
-
-  // Create a slice that refers to d[0,n-1].
-  Slice(const char* d, size_t n) : data_(d), size_(n) { }
-
-  // Create a slice that refers to the contents of "s"
-  /* implicit */
-  Slice(const std::string& s) : data_(s.data()), size_(s.size()) { }
-
-  // Create a slice that refers to s[0,strlen(s)-1]
-  /* implicit */
-  Slice(const char* s) : data_(s), size_(strlen(s)) { }
-
-  // Return a pointer to the beginning of the referenced data
-  const char* data() const { return data_; }
-
-  // Return the length (in bytes) of the referenced data
-  size_t size() const { return size_; }
-
-  // Return true iff the length of the referenced data is zero
-  bool empty() const { return size_ == 0; }
-
-  // Return the ith byte in the referenced data.
-  // REQUIRES: n < size()
-  char operator[](size_t n) const {
-    assert(n < size());
-    return data_[n];
-  }
-
-  // Change this slice to refer to an empty array
-  void clear() { data_ = ""; size_ = 0; }
-
-  // Drop the first "n" bytes from this slice.
-  void remove_prefix(size_t n) {
-    assert(n <= size());
-    data_ += n;
-    size_ -= n;
-  }
-
-  // Return a string that contains the copy of the referenced data.
-  std::string ToString(bool hex = false) const {
-    if (hex) {
-      std::string result;
-      char buf[10];
-      for (size_t i = 0; i < size_; i++) {
-        snprintf(buf, 10, "%02X", (unsigned char)data_[i]);
-        result += buf;
-      }
-      return result;
-    } else {
-      return std::string(data_, size_);
-    }
-  }
-
-  // Three-way comparison.  Returns value:
-  //   <  0 iff "*this" <  "b",
-  //   == 0 iff "*this" == "b",
-  //   >  0 iff "*this" >  "b"
-  int compare(const Slice& b) const;
-
-  // Return true iff "x" is a prefix of "*this"
-  bool starts_with(const Slice& x) const {
-    return ((size_ >= x.size_) &&
-            (memcmp(data_, x.data_, x.size_) == 0));
-  }
-
- // private: make these public for rocksdbjni access
-  const char* data_;
-  size_t size_;
-
-  // Intentionally copyable
-};
-
-// A set of Slices that are virtually concatenated together.  'parts' points
-// to an array of Slices.  The number of elements in the array is 'num_parts'.
-struct SliceParts {
-  SliceParts(const Slice* _parts, int _num_parts) :
-      parts(_parts), num_parts(_num_parts) { }
-
-  const Slice* parts;
-  int num_parts;
-};
-
-inline bool operator==(const Slice& x, const Slice& y) {
-  return ((x.size() == y.size()) &&
-          (memcmp(x.data(), y.data(), x.size()) == 0));
-}
-
-inline bool operator!=(const Slice& x, const Slice& y) {
-  return !(x == y);
-}
-
-inline int Slice::compare(const Slice& b) const {
-  const int min_len = (size_ < b.size_) ? size_ : b.size_;
-  int r = memcmp(data_, b.data_, min_len);
-  if (r == 0) {
-    if (size_ < b.size_) r = -1;
-    else if (size_ > b.size_) r = +1;
-  }
-  return r;
-}
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_SLICE_H_
diff --git a/src/rocksdb/include/rocksdb/slice_transform.h b/src/rocksdb/include/rocksdb/slice_transform.h
deleted file mode 100644
index a784550..0000000
--- a/src/rocksdb/include/rocksdb/slice_transform.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Class for specifying user-defined functions which perform a
-// transformation on a slice.  It is not required that every slice
-// belong to the domain and/or range of a function.  Subclasses should
-// define InDomain and InRange to determine which slices are in either
-// of these sets respectively.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_SLICE_TRANSFORM_H_
-#define STORAGE_ROCKSDB_INCLUDE_SLICE_TRANSFORM_H_
-
-#include <string>
-
-namespace rocksdb {
-
-class Slice;
-
-class SliceTransform {
- public:
-  virtual ~SliceTransform() {};
-
-  // Return the name of this transformation.
-  virtual const char* Name() const = 0;
-
-  // transform a src in domain to a dst in the range
-  virtual Slice Transform(const Slice& src) const = 0;
-
-  // determine whether this is a valid src upon the function applies
-  virtual bool InDomain(const Slice& src) const = 0;
-
-  // determine whether dst=Transform(src) for some src
-  virtual bool InRange(const Slice& dst) const = 0;
-};
-
-extern const SliceTransform* NewFixedPrefixTransform(size_t prefix_len);
-
-extern const SliceTransform* NewNoopTransform();
-
-}
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_SLICE_TRANSFORM_H_
diff --git a/src/rocksdb/include/rocksdb/statistics.h b/src/rocksdb/include/rocksdb/statistics.h
deleted file mode 100644
index dcd82f6..0000000
--- a/src/rocksdb/include/rocksdb/statistics.h
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_STATISTICS_H_
-#define STORAGE_ROCKSDB_INCLUDE_STATISTICS_H_
-
-#include <atomic>
-#include <cstddef>
-#include <cstdint>
-#include <string>
-#include <memory>
-#include <vector>
-
-namespace rocksdb {
-
-/**
- * Keep adding ticker's here.
- *  1. Any ticker should be added before TICKER_ENUM_MAX.
- *  2. Add a readable string in TickersNameMap below for the newly added ticker.
- */
-enum Tickers {
-  // total block cache misses
-  // REQUIRES: BLOCK_CACHE_MISS == BLOCK_CACHE_INDEX_MISS +
-  //                               BLOCK_CACHE_FILTER_MISS +
-  //                               BLOCK_CACHE_DATA_MISS;
-  BLOCK_CACHE_MISS,
-  // total block cache hit
-  // REQUIRES: BLOCK_CACHE_HIT == BLOCK_CACHE_INDEX_HIT +
-  //                              BLOCK_CACHE_FILTER_HIT +
-  //                              BLOCK_CACHE_DATA_HIT;
-  BLOCK_CACHE_HIT,
-  // # of blocks added to block cache.
-  BLOCK_CACHE_ADD,
-  // # of times cache miss when accessing index block from block cache.
-  BLOCK_CACHE_INDEX_MISS,
-  // # of times cache hit when accessing index block from block cache.
-  BLOCK_CACHE_INDEX_HIT,
-  // # of times cache miss when accessing filter block from block cache.
-  BLOCK_CACHE_FILTER_MISS,
-  // # of times cache hit when accessing filter block from block cache.
-  BLOCK_CACHE_FILTER_HIT,
-  // # of times cache miss when accessing data block from block cache.
-  BLOCK_CACHE_DATA_MISS,
-  // # of times cache hit when accessing data block from block cache.
-  BLOCK_CACHE_DATA_HIT,
-  // # of times bloom filter has avoided file reads.
-  BLOOM_FILTER_USEFUL,
-
-  // # of memtable hits.
-  MEMTABLE_HIT,
-  // # of memtable misses.
-  MEMTABLE_MISS,
-
-  /**
-   * COMPACTION_KEY_DROP_* count the reasons for key drop during compaction
-   * There are 3 reasons currently.
-   */
-  COMPACTION_KEY_DROP_NEWER_ENTRY,  // key was written with a newer value.
-  COMPACTION_KEY_DROP_OBSOLETE,     // The key is obsolete.
-  COMPACTION_KEY_DROP_USER,  // user compaction function has dropped the key.
-
-  // Number of keys written to the database via the Put and Write call's
-  NUMBER_KEYS_WRITTEN,
-  // Number of Keys read,
-  NUMBER_KEYS_READ,
-  // Number keys updated, if inplace update is enabled
-  NUMBER_KEYS_UPDATED,
-  // Bytes written / read
-  BYTES_WRITTEN,
-  BYTES_READ,
-  NO_FILE_CLOSES,
-  NO_FILE_OPENS,
-  NO_FILE_ERRORS,
-  // Time system had to wait to do LO-L1 compactions
-  STALL_L0_SLOWDOWN_MICROS,
-  // Time system had to wait to move memtable to L1.
-  STALL_MEMTABLE_COMPACTION_MICROS,
-  // write throttle because of too many files in L0
-  STALL_L0_NUM_FILES_MICROS,
-  RATE_LIMIT_DELAY_MILLIS,
-  NO_ITERATORS,  // number of iterators currently open
-
-  // Number of MultiGet calls, keys read, and bytes read
-  NUMBER_MULTIGET_CALLS,
-  NUMBER_MULTIGET_KEYS_READ,
-  NUMBER_MULTIGET_BYTES_READ,
-
-  // Number of deletes records that were not required to be
-  // written to storage because key does not exist
-  NUMBER_FILTERED_DELETES,
-  NUMBER_MERGE_FAILURES,
-  SEQUENCE_NUMBER,
-
-  // number of times bloom was checked before creating iterator on a
-  // file, and the number of times the check was useful in avoiding
-  // iterator creation (and thus likely IOPs).
-  BLOOM_FILTER_PREFIX_CHECKED,
-  BLOOM_FILTER_PREFIX_USEFUL,
-
-  // Number of times we had to reseek inside an iteration to skip
-  // over large number of keys with same userkey.
-  NUMBER_OF_RESEEKS_IN_ITERATION,
-
-  // Record the number of calls to GetUpadtesSince. Useful to keep track of
-  // transaction log iterator refreshes
-  GET_UPDATES_SINCE_CALLS,
-  BLOCK_CACHE_COMPRESSED_MISS,  // miss in the compressed block cache
-  BLOCK_CACHE_COMPRESSED_HIT,   // hit in the compressed block cache
-  WAL_FILE_SYNCED,              // Number of times WAL sync is done
-  WAL_FILE_BYTES,               // Number of bytes written to WAL
-
-  // Writes can be processed by requesting thread or by the thread at the
-  // head of the writers queue.
-  WRITE_DONE_BY_SELF,
-  WRITE_DONE_BY_OTHER,
-  WRITE_WITH_WAL,       // Number of Write calls that request WAL
-  COMPACT_READ_BYTES,   // Bytes read during compaction
-  COMPACT_WRITE_BYTES,  // Bytes written during compaction
-
-  // Number of table's properties loaded directly from file, without creating
-  // table reader object.
-  NUMBER_DIRECT_LOAD_TABLE_PROPERTIES,
-  NUMBER_SUPERVERSION_ACQUIRES,
-  NUMBER_SUPERVERSION_RELEASES,
-  NUMBER_SUPERVERSION_CLEANUPS,
-  TICKER_ENUM_MAX
-};
-
-// The order of items listed in  Tickers should be the same as
-// the order listed in TickersNameMap
-const std::vector<std::pair<Tickers, std::string>> TickersNameMap = {
-    {BLOCK_CACHE_MISS, "rocksdb.block.cache.miss"},
-    {BLOCK_CACHE_HIT, "rocksdb.block.cache.hit"},
-    {BLOCK_CACHE_ADD, "rocksdb.block.cache.add"},
-    {BLOCK_CACHE_INDEX_MISS, "rocksdb.block.cache.index.miss"},
-    {BLOCK_CACHE_INDEX_HIT, "rocksdb.block.cache.index.hit"},
-    {BLOCK_CACHE_FILTER_MISS, "rocksdb.block.cache.filter.miss"},
-    {BLOCK_CACHE_FILTER_HIT, "rocksdb.block.cache.filter.hit"},
-    {BLOCK_CACHE_DATA_MISS, "rocksdb.block.cache.data.miss"},
-    {BLOCK_CACHE_DATA_HIT, "rocksdb.block.cache.data.hit"},
-    {BLOOM_FILTER_USEFUL, "rocksdb.bloom.filter.useful"},
-    {MEMTABLE_HIT, "rocksdb.memtable.hit"},
-    {MEMTABLE_MISS, "rocksdb.memtable.miss"},
-    {COMPACTION_KEY_DROP_NEWER_ENTRY, "rocksdb.compaction.key.drop.new"},
-    {COMPACTION_KEY_DROP_OBSOLETE, "rocksdb.compaction.key.drop.obsolete"},
-    {COMPACTION_KEY_DROP_USER, "rocksdb.compaction.key.drop.user"},
-    {NUMBER_KEYS_WRITTEN, "rocksdb.number.keys.written"},
-    {NUMBER_KEYS_READ, "rocksdb.number.keys.read"},
-    {NUMBER_KEYS_UPDATED, "rocksdb.number.keys.updated"},
-    {BYTES_WRITTEN, "rocksdb.bytes.written"},
-    {BYTES_READ, "rocksdb.bytes.read"},
-    {NO_FILE_CLOSES, "rocksdb.no.file.closes"},
-    {NO_FILE_OPENS, "rocksdb.no.file.opens"},
-    {NO_FILE_ERRORS, "rocksdb.no.file.errors"},
-    {STALL_L0_SLOWDOWN_MICROS, "rocksdb.l0.slowdown.micros"},
-    {STALL_MEMTABLE_COMPACTION_MICROS, "rocksdb.memtable.compaction.micros"},
-    {STALL_L0_NUM_FILES_MICROS, "rocksdb.l0.num.files.stall.micros"},
-    {RATE_LIMIT_DELAY_MILLIS, "rocksdb.rate.limit.delay.millis"},
-    {NO_ITERATORS, "rocksdb.num.iterators"},
-    {NUMBER_MULTIGET_CALLS, "rocksdb.number.multiget.get"},
-    {NUMBER_MULTIGET_KEYS_READ, "rocksdb.number.multiget.keys.read"},
-    {NUMBER_MULTIGET_BYTES_READ, "rocksdb.number.multiget.bytes.read"},
-    {NUMBER_FILTERED_DELETES, "rocksdb.number.deletes.filtered"},
-    {NUMBER_MERGE_FAILURES, "rocksdb.number.merge.failures"},
-    {SEQUENCE_NUMBER, "rocksdb.sequence.number"},
-    {BLOOM_FILTER_PREFIX_CHECKED, "rocksdb.bloom.filter.prefix.checked"},
-    {BLOOM_FILTER_PREFIX_USEFUL, "rocksdb.bloom.filter.prefix.useful"},
-    {NUMBER_OF_RESEEKS_IN_ITERATION, "rocksdb.number.reseeks.iteration"},
-    {GET_UPDATES_SINCE_CALLS, "rocksdb.getupdatessince.calls"},
-    {BLOCK_CACHE_COMPRESSED_MISS, "rocksdb.block.cachecompressed.miss"},
-    {BLOCK_CACHE_COMPRESSED_HIT, "rocksdb.block.cachecompressed.hit"},
-    {WAL_FILE_SYNCED, "rocksdb.wal.synced"},
-    {WAL_FILE_BYTES, "rocksdb.wal.bytes"},
-    {WRITE_DONE_BY_SELF, "rocksdb.write.self"},
-    {WRITE_DONE_BY_OTHER, "rocksdb.write.other"},
-    {WRITE_WITH_WAL, "rocksdb.write.wal"},
-    {COMPACT_READ_BYTES, "rocksdb.compact.read.bytes"},
-    {COMPACT_WRITE_BYTES, "rocksdb.compact.write.bytes"},
-    {NUMBER_DIRECT_LOAD_TABLE_PROPERTIES,
-     "rocksdb.number.direct.load.table.properties"},
-    {NUMBER_SUPERVERSION_ACQUIRES, "rocksdb.number.superversion_acquires"},
-    {NUMBER_SUPERVERSION_RELEASES, "rocksdb.number.superversion_releases"},
-    {NUMBER_SUPERVERSION_CLEANUPS, "rocksdb.number.superversion_cleanups"},
-};
-
-/**
- * Keep adding histogram's here.
- * Any histogram whould have value less than HISTOGRAM_ENUM_MAX
- * Add a new Histogram by assigning it the current value of HISTOGRAM_ENUM_MAX
- * Add a string representation in HistogramsNameMap below
- * And increment HISTOGRAM_ENUM_MAX
- */
-enum Histograms {
-  DB_GET,
-  DB_WRITE,
-  COMPACTION_TIME,
-  TABLE_SYNC_MICROS,
-  COMPACTION_OUTFILE_SYNC_MICROS,
-  WAL_FILE_SYNC_MICROS,
-  MANIFEST_FILE_SYNC_MICROS,
-  // TIME SPENT IN IO DURING TABLE OPEN
-  TABLE_OPEN_IO_MICROS,
-  DB_MULTIGET,
-  READ_BLOCK_COMPACTION_MICROS,
-  READ_BLOCK_GET_MICROS,
-  WRITE_RAW_BLOCK_MICROS,
-
-  STALL_L0_SLOWDOWN_COUNT,
-  STALL_MEMTABLE_COMPACTION_COUNT,
-  STALL_L0_NUM_FILES_COUNT,
-  HARD_RATE_LIMIT_DELAY_COUNT,
-  SOFT_RATE_LIMIT_DELAY_COUNT,
-  NUM_FILES_IN_SINGLE_COMPACTION,
-  HISTOGRAM_ENUM_MAX,
-};
-
-const std::vector<std::pair<Histograms, std::string>> HistogramsNameMap = {
-  { DB_GET, "rocksdb.db.get.micros" },
-  { DB_WRITE, "rocksdb.db.write.micros" },
-  { COMPACTION_TIME, "rocksdb.compaction.times.micros" },
-  { TABLE_SYNC_MICROS, "rocksdb.table.sync.micros" },
-  { COMPACTION_OUTFILE_SYNC_MICROS, "rocksdb.compaction.outfile.sync.micros" },
-  { WAL_FILE_SYNC_MICROS, "rocksdb.wal.file.sync.micros" },
-  { MANIFEST_FILE_SYNC_MICROS, "rocksdb.manifest.file.sync.micros" },
-  { TABLE_OPEN_IO_MICROS, "rocksdb.table.open.io.micros" },
-  { DB_MULTIGET, "rocksdb.db.multiget.micros" },
-  { READ_BLOCK_COMPACTION_MICROS, "rocksdb.read.block.compaction.micros" },
-  { READ_BLOCK_GET_MICROS, "rocksdb.read.block.get.micros" },
-  { WRITE_RAW_BLOCK_MICROS, "rocksdb.write.raw.block.micros" },
-  { STALL_L0_SLOWDOWN_COUNT, "rocksdb.l0.slowdown.count"},
-  { STALL_MEMTABLE_COMPACTION_COUNT, "rocksdb.memtable.compaction.count"},
-  { STALL_L0_NUM_FILES_COUNT, "rocksdb.num.files.stall.count"},
-  { HARD_RATE_LIMIT_DELAY_COUNT, "rocksdb.hard.rate.limit.delay.count"},
-  { SOFT_RATE_LIMIT_DELAY_COUNT, "rocksdb.soft.rate.limit.delay.count"},
-  { NUM_FILES_IN_SINGLE_COMPACTION, "rocksdb.numfiles.in.singlecompaction" },
-};
-
-struct HistogramData {
-  double median;
-  double percentile95;
-  double percentile99;
-  double average;
-  double standard_deviation;
-};
-
-// Analyze the performance of a db
-class Statistics {
- public:
-  virtual ~Statistics() {}
-
-  virtual long getTickerCount(Tickers tickerType) = 0;
-  virtual void recordTick(Tickers tickerType, uint64_t count = 0) = 0;
-  virtual void setTickerCount(Tickers tickerType, uint64_t count) = 0;
-  virtual void measureTime(Histograms histogramType, uint64_t time) = 0;
-
-  virtual void histogramData(Histograms type, HistogramData* const data) = 0;
-  // String representation of the statistic object.
-  std::string ToString();
-};
-
-// Create a concrete DBStatistics object
-std::shared_ptr<Statistics> CreateDBStatistics();
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_STATISTICS_H_
diff --git a/src/rocksdb/include/rocksdb/status.h b/src/rocksdb/include/rocksdb/status.h
deleted file mode 100644
index dbd41fc..0000000
--- a/src/rocksdb/include/rocksdb/status.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// A Status encapsulates the result of an operation.  It may indicate success,
-// or it may indicate an error with an associated error message.
-//
-// Multiple threads can invoke const methods on a Status without
-// external synchronization, but if any of the threads may call a
-// non-const method, all threads accessing the same Status must use
-// external synchronization.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_STATUS_H_
-#define STORAGE_ROCKSDB_INCLUDE_STATUS_H_
-
-#include <string>
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-class Status {
- public:
-  // Create a success status.
-  Status() : code_(kOk), state_(nullptr) { }
-  ~Status() { delete[] state_; }
-
-  // Copy the specified status.
-  Status(const Status& s);
-  void operator=(const Status& s);
-
-  // Return a success status.
-  static Status OK() { return Status(); }
-
-  // Return error status of an appropriate type.
-  static Status NotFound(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kNotFound, msg, msg2);
-  }
-  // Fast path for not found without malloc;
-  static Status NotFound() {
-    return Status(kNotFound);
-  }
-  static Status Corruption(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kCorruption, msg, msg2);
-  }
-  static Status NotSupported(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kNotSupported, msg, msg2);
-  }
-  static Status InvalidArgument(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kInvalidArgument, msg, msg2);
-  }
-  static Status IOError(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kIOError, msg, msg2);
-  }
-  static Status MergeInProgress(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kMergeInProgress, msg, msg2);
-  }
-  static Status Incomplete(const Slice& msg, const Slice& msg2 = Slice()) {
-    return Status(kIncomplete, msg, msg2);
-  }
-  static Status ShutdownInProgress(const Slice& msg,
-                                   const Slice& msg2 = Slice()) {
-    return Status(kShutdownInProgress, msg, msg2);
-  }
-
-  // Returns true iff the status indicates success.
-  bool ok() const { return code() == kOk; }
-
-  // Returns true iff the status indicates a NotFound error.
-  bool IsNotFound() const { return code() == kNotFound; }
-
-  // Returns true iff the status indicates a Corruption error.
-  bool IsCorruption() const { return code() == kCorruption; }
-
-  // Returns true iff the status indicates a NotSupported error.
-  bool IsNotSupported() const { return code() == kNotSupported; }
-
-  // Returns true iff the status indicates an InvalidArgument error.
-  bool IsInvalidArgument() const { return code() == kInvalidArgument; }
-
-  // Returns true iff the status indicates an IOError.
-  bool IsIOError() const { return code() == kIOError; }
-
-  // Returns true iff the status indicates an MergeInProgress.
-  bool IsMergeInProgress() const { return code() == kMergeInProgress; }
-
-  // Returns true iff the status indicates Incomplete
-  bool IsIncomplete() const { return code() == kIncomplete; }
-
-  // Returns true iff the status indicates Incomplete
-  bool IsShutdownInProgress() const { return code() == kShutdownInProgress; }
-
-  // Return a string representation of this status suitable for printing.
-  // Returns the string "OK" for success.
-  std::string ToString() const;
-
- private:
-  enum Code {
-    kOk = 0,
-    kNotFound = 1,
-    kCorruption = 2,
-    kNotSupported = 3,
-    kInvalidArgument = 4,
-    kIOError = 5,
-    kMergeInProgress = 6,
-    kIncomplete = 7,
-    kShutdownInProgress = 8
-  };
-
-  // A nullptr state_ (which is always the case for OK) means the message
-  // is empty.
-  // of the following form:
-  //    state_[0..3] == length of message
-  //    state_[4..]  == message
-  Code code_;
-  const char* state_;
-
-  Code code() const {
-    return code_;
-  }
-  explicit Status(Code code) : code_(code), state_(nullptr) { }
-  Status(Code code, const Slice& msg, const Slice& msg2);
-  static const char* CopyState(const char* s);
-};
-
-inline Status::Status(const Status& s) {
-  code_ = s.code_;
-  state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_);
-}
-inline void Status::operator=(const Status& s) {
-  // The following condition catches both aliasing (when this == &s),
-  // and the common case where both s and *this are ok.
-  code_ = s.code_;
-  if (state_ != s.state_) {
-    delete[] state_;
-    state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_);
-  }
-}
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_STATUS_H_
diff --git a/src/rocksdb/include/rocksdb/table.h b/src/rocksdb/include/rocksdb/table.h
deleted file mode 100644
index 11adfec..0000000
--- a/src/rocksdb/include/rocksdb/table.h
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Currently we support two types of tables: plain table and block-based table.
-//   1. Block-based table: this is the default table type that we inherited from
-//      LevelDB, which was designed for storing data in hard disk or flash
-//      device.
-//   2. Plain table: it is one of RocksDB's SST file format optimized
-//      for low query latency on pure-memory or really low-latency media.
-//
-// A tutorial of rocksdb table formats is available here:
-//   https://github.com/facebook/rocksdb/wiki/A-Tutorial-of-RocksDB-SST-formats
-//
-// Example code is also available
-//   https://github.com/facebook/rocksdb/wiki/A-Tutorial-of-RocksDB-SST-formats#wiki-examples
-
-#pragma once
-#include <memory>
-#include <string>
-#include <unordered_map>
-
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-// -- Block-based Table
-class FlushBlockPolicyFactory;
-class RandomAccessFile;
-class TableBuilder;
-class TableReader;
-class WritableFile;
-struct EnvOptions;
-struct Options;
-
-using std::unique_ptr;
-
-enum ChecksumType : char {
-  kNoChecksum = 0x0,  // not yet supported. Will fail
-  kCRC32c = 0x1,
-  kxxHash = 0x2,
-};
-
-// For advanced user only
-struct BlockBasedTableOptions {
-  // @flush_block_policy_factory creates the instances of flush block policy.
-  // which provides a configurable way to determine when to flush a block in
-  // the block based tables.  If not set, table builder will use the default
-  // block flush policy, which cut blocks by block size (please refer to
-  // `FlushBlockBySizePolicy`).
-  std::shared_ptr<FlushBlockPolicyFactory> flush_block_policy_factory;
-
-  // TODO(kailiu) Temporarily disable this feature by making the default value
-  // to be false.
-  //
-  // Indicating if we'd put index/filter blocks to the block cache.
-  // If not specified, each "table reader" object will pre-load index/filter
-  // block during table initialization.
-  bool cache_index_and_filter_blocks = false;
-
-  // The index type that will be used for this table.
-  enum IndexType : char {
-    // A space efficient index block that is optimized for
-    // binary-search-based index.
-    kBinarySearch,
-
-    // The hash index, if enabled, will do the hash lookup when
-    // `Options.prefix_extractor` is provided.
-    kHashSearch,
-  };
-
-  IndexType index_type = kBinarySearch;
-
-  // Use the specified checksum type. Newly created table files will be
-  // protected with this checksum type. Old table files will still be readable,
-  // even though they have different checksum type.
-  ChecksumType checksum = kCRC32c;
-};
-
-// Table Properties that are specific to block-based table properties.
-struct BlockBasedTablePropertyNames {
-  // value of this propertis is a fixed int32 number.
-  static const std::string kIndexType;
-};
-
-// Create default block based table factory.
-extern TableFactory* NewBlockBasedTableFactory(
-    const BlockBasedTableOptions& table_options = BlockBasedTableOptions());
-
-#ifndef ROCKSDB_LITE
-// -- Plain Table with prefix-only seek
-// For this factory, you need to set Options.prefix_extrator properly to make it
-// work. Look-up will starts with prefix hash lookup for key prefix. Inside the
-// hash bucket found, a binary search is executed for hash conflicts. Finally,
-// a linear search is used.
-// @user_key_len: plain table has optimization for fix-sized keys, which can be
-//                specified via user_key_len.  Alternatively, you can pass
-//                `kPlainTableVariableLength` if your keys have variable
-//                lengths.
-// @bloom_bits_per_key: the number of bits used for bloom filer per prefix. You
-//                      may disable it by passing a zero.
-// @hash_table_ratio: the desired utilization of the hash table used for prefix
-//                    hashing. hash_table_ratio = number of prefixes / #buckets
-//                    in the hash table
-// @index_sparseness: inside each prefix, need to build one index record for how
-//                    many keys for binary search inside each hash bucket.
-// @huge_page_tlb_size: if <=0, allocate hash indexes and blooms from malloc.
-//                      Otherwise from huge page TLB. The user needs to reserve
-//                      huge pages for it to be allocated, like:
-//                          sysctl -w vm.nr_hugepages=20
-//                      See linux doc Documentation/vm/hugetlbpage.txt
-
-const uint32_t kPlainTableVariableLength = 0;
-extern TableFactory* NewPlainTableFactory(uint32_t user_key_len =
-                                              kPlainTableVariableLength,
-                                          int bloom_bits_per_prefix = 10,
-                                          double hash_table_ratio = 0.75,
-                                          size_t index_sparseness = 16,
-                                          size_t huge_page_tlb_size = 0);
-
-// -- Plain Table
-// This factory of plain table ignores Options.prefix_extractor and assumes no
-// hashable prefix available to the key structure. Lookup will be based on
-// binary search index only. Total order seek() can be issued.
-// @user_key_len: plain table has optimization for fix-sized keys, which can be
-//                specified via user_key_len.  Alternatively, you can pass
-//                `kPlainTableVariableLength` if your keys have variable
-//                lengths.
-// @bloom_bits_per_key: the number of bits used for bloom filer per key. You may
-//                  disable it by passing a zero.
-// @index_sparseness: need to build one index record for how many keys for
-//                    binary search.
-// @huge_page_tlb_size: if <=0, allocate hash indexes and blooms from malloc.
-//                      Otherwise from huge page TLB. The user needs to reserve
-//                      huge pages for it to be allocated, like:
-//                          sysctl -w vm.nr_hugepages=20
-//                      See linux doc Documentation/vm/hugetlbpage.txt
-extern TableFactory* NewTotalOrderPlainTableFactory(
-    uint32_t user_key_len = kPlainTableVariableLength,
-    int bloom_bits_per_key = 0, size_t index_sparseness = 16,
-    size_t huge_page_tlb_size = 0);
-
-#endif  // ROCKSDB_LITE
-
-// A base class for table factories.
-class TableFactory {
- public:
-  virtual ~TableFactory() {}
-
-  // The type of the table.
-  //
-  // The client of this package should switch to a new name whenever
-  // the table format implementation changes.
-  //
-  // Names starting with "rocksdb." are reserved and should not be used
-  // by any clients of this package.
-  virtual const char* Name() const = 0;
-
-  // Returns a Table object table that can fetch data from file specified
-  // in parameter file. It's the caller's responsibility to make sure
-  // file is in the correct format.
-  //
-  // NewTableReader() is called in two places:
-  // (1) TableCache::FindTable() calls the function when table cache miss
-  //     and cache the table object returned.
-  // (1) SstFileReader (for SST Dump) opens the table and dump the table
-  //     contents using the interator of the table.
-  // options and soptions are options. options is the general options.
-  // Multiple configured can be accessed from there, including and not
-  // limited to block cache and key comparators.
-  // file is a file handler to handle the file for the table
-  // file_size is the physical file size of the file
-  // table_reader is the output table reader
-  virtual Status NewTableReader(
-      const Options& options, const EnvOptions& soptions,
-      const InternalKeyComparator& internal_comparator,
-      unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-      unique_ptr<TableReader>* table_reader) const = 0;
-
-  // Return a table builder to write to a file for this table type.
-  //
-  // It is called in several places:
-  // (1) When flushing memtable to a level-0 output file, it creates a table
-  //     builder (In DBImpl::WriteLevel0Table(), by calling BuildTable())
-  // (2) During compaction, it gets the builder for writing compaction output
-  //     files in DBImpl::OpenCompactionOutputFile().
-  // (3) When recovering from transaction logs, it creates a table builder to
-  //     write to a level-0 output file (In DBImpl::WriteLevel0TableForRecovery,
-  //     by calling BuildTable())
-  // (4) When running Repairer, it creates a table builder to convert logs to
-  //     SST files (In Repairer::ConvertLogToTable() by calling BuildTable())
-  //
-  // options is the general options. Multiple configured can be acceseed from
-  // there, including and not limited to compression options.
-  // file is a handle of a writable file. It is the caller's responsibility to
-  // keep the file open and close the file after closing the table builder.
-  // compression_type is the compression type to use in this table.
-  virtual TableBuilder* NewTableBuilder(
-      const Options& options, const InternalKeyComparator& internal_comparator,
-      WritableFile* file, CompressionType compression_type) const = 0;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/include/rocksdb/table_properties.h b/src/rocksdb/include/rocksdb/table_properties.h
deleted file mode 100644
index aa8b8a0..0000000
--- a/src/rocksdb/include/rocksdb/table_properties.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#pragma once
-
-#include <string>
-#include <map>
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-// -- Table Properties
-// Other than basic table properties, each table may also have the user
-// collected properties.
-// The value of the user-collected properties are encoded as raw bytes --
-// users have to interprete these values by themselves.
-// Note: To do prefix seek/scan in `UserCollectedProperties`, you can do
-// something similar to:
-//
-// UserCollectedProperties props = ...;
-// for (auto pos = props.lower_bound(prefix);
-//      pos != props.end() && pos->first.compare(0, prefix.size(), prefix) == 0;
-//      ++pos) {
-//   ...
-// }
-typedef std::map<const std::string, std::string> UserCollectedProperties;
-
-// TableProperties contains a bunch of read-only properties of its associated
-// table.
-struct TableProperties {
- public:
-  // the total size of all data blocks.
-  uint64_t data_size = 0;
-  // the size of index block.
-  uint64_t index_size = 0;
-  // the size of filter block.
-  uint64_t filter_size = 0;
-  // total raw key size
-  uint64_t raw_key_size = 0;
-  // total raw value size
-  uint64_t raw_value_size = 0;
-  // the number of blocks in this table
-  uint64_t num_data_blocks = 0;
-  // the number of entries in this table
-  uint64_t num_entries = 0;
-  // format version, reserved for backward compatibility
-  uint64_t format_version = 0;
-  // If 0, key is variable length. Otherwise number of bytes for each key.
-  uint64_t fixed_key_len = 0;
-
-  // The name of the filter policy used in this table.
-  // If no filter policy is used, `filter_policy_name` will be an empty string.
-  std::string filter_policy_name;
-
-  // user collected properties
-  UserCollectedProperties user_collected_properties;
-
-  // convert this object to a human readable form
-  //   @prop_delim: delimiter for each property.
-  std::string ToString(const std::string& prop_delim = "; ",
-                       const std::string& kv_delim = "=") const;
-};
-
-// table properties' human-readable names in the property block.
-struct TablePropertiesNames {
-  static const std::string kDataSize;
-  static const std::string kIndexSize;
-  static const std::string kFilterSize;
-  static const std::string kRawKeySize;
-  static const std::string kRawValueSize;
-  static const std::string kNumDataBlocks;
-  static const std::string kNumEntries;
-  static const std::string kFormatVersion;
-  static const std::string kFixedKeyLen;
-  static const std::string kFilterPolicy;
-};
-
-extern const std::string kPropertiesBlock;
-
-// `TablePropertiesCollector` provides the mechanism for users to collect
-// their own interested properties. This class is essentially a collection
-//  of callback functions that will be invoked during table building.
-class TablePropertiesCollector {
- public:
-  virtual ~TablePropertiesCollector() {}
-
-  // Add() will be called when a new key/value pair is inserted into the table.
-  // @params key    the original key that is inserted into the table.
-  // @params value  the original value that is inserted into the table.
-  virtual Status Add(const Slice& key, const Slice& value) = 0;
-
-  // Finish() will be called when a table has already been built and is ready
-  // for writing the properties block.
-  // @params properties  User will add their collected statistics to
-  // `properties`.
-  virtual Status Finish(UserCollectedProperties* properties) = 0;
-
-  // The name of the properties collector can be used for debugging purpose.
-  virtual const char* Name() const = 0;
-
-  // Return the human-readable properties, where the key is property name and
-  // the value is the human-readable form of value.
-  virtual UserCollectedProperties GetReadableProperties() const = 0;
-};
-
-// Extra properties
-// Below is a list of non-basic properties that are collected by database
-// itself. Especially some properties regarding to the internal keys (which
-// is unknown to `table`).
-extern uint64_t GetDeletedKeys(const UserCollectedProperties& props);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/include/rocksdb/transaction_log.h b/src/rocksdb/include/rocksdb/transaction_log.h
deleted file mode 100644
index 30443bb..0000000
--- a/src/rocksdb/include/rocksdb/transaction_log.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_TRANSACTION_LOG_ITERATOR_H_
-#define STORAGE_ROCKSDB_INCLUDE_TRANSACTION_LOG_ITERATOR_H_
-
-#include "rocksdb/status.h"
-#include "rocksdb/types.h"
-#include "rocksdb/write_batch.h"
-#include <memory>
-#include <vector>
-
-namespace rocksdb {
-
-class LogFile;
-typedef std::vector<std::unique_ptr<LogFile>> VectorLogPtr;
-
-enum  WalFileType {
-  /* Indicates that WAL file is in archive directory. WAL files are moved from
-   * the main db directory to archive directory once they are not live and stay
-   * there until cleaned up. Files are cleaned depending on archive size
-   * (Options::WAL_size_limit_MB) and time since last cleaning
-   * (Options::WAL_ttl_seconds).
-   */
-  kArchivedLogFile = 0,
-
-  /* Indicates that WAL file is live and resides in the main db directory */
-  kAliveLogFile = 1
-} ;
-
-class LogFile {
- public:
-  LogFile() {}
-  virtual ~LogFile() {}
-
-  // Returns log file's pathname relative to the main db dir
-  // Eg. For a live-log-file = /000003.log
-  //     For an archived-log-file = /archive/000003.log
-  virtual std::string PathName() const = 0;
-
-
-  // Primary identifier for log file.
-  // This is directly proportional to creation time of the log file
-  virtual uint64_t LogNumber() const = 0;
-
-  // Log file can be either alive or archived
-  virtual WalFileType Type() const = 0;
-
-  // Starting sequence number of writebatch written in this log file
-  virtual SequenceNumber StartSequence() const = 0;
-
-  // Size of log file on disk in Bytes
-  virtual uint64_t SizeFileBytes() const = 0;
-};
-
-struct BatchResult {
-  SequenceNumber sequence = 0;
-  std::unique_ptr<WriteBatch> writeBatchPtr;
-};
-
-// A TransactionLogIterator is used to iterate over the transactions in a db.
-// One run of the iterator is continuous, i.e. the iterator will stop at the
-// beginning of any gap in sequences
-class TransactionLogIterator {
- public:
-  TransactionLogIterator() {}
-  virtual ~TransactionLogIterator() {}
-
-  // An iterator is either positioned at a WriteBatch or not valid.
-  // This method returns true if the iterator is valid.
-  // Can read data from a valid iterator.
-  virtual bool Valid() = 0;
-
-  // Moves the iterator to the next WriteBatch.
-  // REQUIRES: Valid() to be true.
-  virtual void Next() = 0;
-
-  // Returns ok if the iterator is valid.
-  // Returns the Error when something has gone wrong.
-  virtual Status status() = 0;
-
-  // If valid return's the current write_batch and the sequence number of the
-  // earliest transaction contained in the batch.
-  // ONLY use if Valid() is true and status() is OK.
-  virtual BatchResult GetBatch() = 0;
-
-  // The read options for TransactionLogIterator.
-  struct ReadOptions {
-    // If true, all data read from underlying storage will be
-    // verified against corresponding checksums.
-    // Default: true
-    bool verify_checksums_;
-
-    ReadOptions() : verify_checksums_(true) {}
-
-    explicit ReadOptions(bool verify_checksums)
-        : verify_checksums_(verify_checksums) {}
-  };
-};
-} //  namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_TRANSACTION_LOG_ITERATOR_H_
diff --git a/src/rocksdb/include/rocksdb/types.h b/src/rocksdb/include/rocksdb/types.h
deleted file mode 100644
index f20bf82..0000000
--- a/src/rocksdb/include/rocksdb/types.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_TYPES_H_
-#define STORAGE_ROCKSDB_INCLUDE_TYPES_H_
-
-#include <stdint.h>
-
-namespace rocksdb {
-
-// Define all public custom types here.
-
-// Represents a sequence number in a WAL file.
-typedef uint64_t SequenceNumber;
-
-}  //  namespace rocksdb
-
-#endif //  STORAGE_ROCKSDB_INCLUDE_TYPES_H_
diff --git a/src/rocksdb/include/rocksdb/universal_compaction.h b/src/rocksdb/include/rocksdb/universal_compaction.h
deleted file mode 100644
index eaf47e5..0000000
--- a/src/rocksdb/include/rocksdb/universal_compaction.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#ifndef STORAGE_ROCKSDB_UNIVERSAL_COMPACTION_OPTIONS_H
-#define STORAGE_ROCKSDB_UNIVERSAL_COMPACTION_OPTIONS_H
-
-#include <stdint.h>
-#include <climits>
-
-namespace rocksdb {
-
-//
-// Algorithm used to make a compaction request stop picking new files
-// into a single compaction run
-//
-enum CompactionStopStyle {
-  kCompactionStopStyleSimilarSize, // pick files of similar size
-  kCompactionStopStyleTotalSize    // total size of picked files > next file
-};
-
-class CompactionOptionsUniversal {
- public:
-
-  // Percentage flexibilty while comparing file size. If the candidate file(s)
-  // size is 1% smaller than the next file's size, then include next file into
-  // this candidate set. // Default: 1
-  unsigned int size_ratio;
-
-  // The minimum number of files in a single compaction run. Default: 2
-  unsigned int min_merge_width;
-
-  // The maximum number of files in a single compaction run. Default: UINT_MAX
-  unsigned int max_merge_width;
-
-  // The size amplification is defined as the amount (in percentage) of
-  // additional storage needed to store a single byte of data in the database.
-  // For example, a size amplification of 2% means that a database that
-  // contains 100 bytes of user-data may occupy upto 102 bytes of
-  // physical storage. By this definition, a fully compacted database has
-  // a size amplification of 0%. Rocksdb uses the following heuristic
-  // to calculate size amplification: it assumes that all files excluding
-  // the earliest file contribute to the size amplification.
-  // Default: 200, which means that a 100 byte database could require upto
-  // 300 bytes of storage.
-  unsigned int max_size_amplification_percent;
-
-  // If this option is set to be -1 (the default value), all the output files
-  // will follow compression type specified.
-  //
-  // If this option is not negative, we will try to make sure compressed
-  // size is just above this value. In normal cases, at least this percentage
-  // of data will be compressed.
-  // When we are compacting to a new file, here is the criteria whether
-  // it needs to be compressed: assuming here are the list of files sorted
-  // by generation time:
-  //    A1...An B1...Bm C1...Ct
-  // where A1 is the newest and Ct is the oldest, and we are going to compact
-  // B1...Bm, we calculate the total size of all the files as total_size, as
-  // well as  the total size of C1...Ct as total_C, the compaction output file
-  // will be compressed iff
-  //   total_C / total_size < this percentage
-  int compression_size_percent;
-
-  // The algorithm used to stop picking files into a single compaction run
-  // Default: kCompactionStopStyleTotalSize
-  CompactionStopStyle stop_style;
-
-  // Default set of parameters
-  CompactionOptionsUniversal() :
-    size_ratio(1),
-    min_merge_width(2),
-    max_merge_width(UINT_MAX),
-    max_size_amplification_percent(200),
-    compression_size_percent(-1),
-    stop_style(kCompactionStopStyleTotalSize) {
-  }
-};
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_UNIVERSAL_COMPACTION_OPTIONS_H
diff --git a/src/rocksdb/include/rocksdb/version.h b/src/rocksdb/include/rocksdb/version.h
deleted file mode 100644
index 6aeabc2..0000000
--- a/src/rocksdb/include/rocksdb/version.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-// Also update Makefile if you change these
-#define __ROCKSDB_MAJOR__ 3
-#define __ROCKSDB_MINOR__ 0
-#define __ROCKSDB_PATCH__ 0
diff --git a/src/rocksdb/include/rocksdb/write_batch.h b/src/rocksdb/include/rocksdb/write_batch.h
deleted file mode 100644
index 74ee2ad..0000000
--- a/src/rocksdb/include/rocksdb/write_batch.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// WriteBatch holds a collection of updates to apply atomically to a DB.
-//
-// The updates are applied in the order in which they are added
-// to the WriteBatch.  For example, the value of "key" will be "v3"
-// after the following batch is written:
-//
-//    batch.Put("key", "v1");
-//    batch.Delete("key");
-//    batch.Put("key", "v2");
-//    batch.Put("key", "v3");
-//
-// Multiple threads can invoke const methods on a WriteBatch without
-// external synchronization, but if any of the threads may call a
-// non-const method, all threads accessing the same WriteBatch must use
-// external synchronization.
-
-#ifndef STORAGE_ROCKSDB_INCLUDE_WRITE_BATCH_H_
-#define STORAGE_ROCKSDB_INCLUDE_WRITE_BATCH_H_
-
-#include <string>
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-class Slice;
-class ColumnFamilyHandle;
-struct SliceParts;
-
-class WriteBatch {
- public:
-  explicit WriteBatch(size_t reserved_bytes = 0);
-  ~WriteBatch();
-
-  // Store the mapping "key->value" in the database.
-  void Put(ColumnFamilyHandle* column_family, const Slice& key,
-           const Slice& value);
-  void Put(const Slice& key, const Slice& value) {
-    Put(nullptr, key, value);
-  }
-
-  // Variant of Put() that gathers output like writev(2).  The key and value
-  // that will be written to the database are concatentations of arrays of
-  // slices.
-  void Put(ColumnFamilyHandle* column_family, const SliceParts& key,
-           const SliceParts& value);
-  void Put(const SliceParts& key, const SliceParts& value) {
-    Put(nullptr, key, value);
-  }
-
-  // Merge "value" with the existing value of "key" in the database.
-  // "key->merge(existing, value)"
-  void Merge(ColumnFamilyHandle* column_family, const Slice& key,
-             const Slice& value);
-  void Merge(const Slice& key, const Slice& value) {
-    Merge(nullptr, key, value);
-  }
-
-  // If the database contains a mapping for "key", erase it.  Else do nothing.
-  void Delete(ColumnFamilyHandle* column_family, const Slice& key);
-  void Delete(const Slice& key) { Delete(nullptr, key); }
-
-  // Append a blob of arbitrary size to the records in this batch. The blob will
-  // be stored in the transaction log but not in any other file. In particular,
-  // it will not be persisted to the SST files. When iterating over this
-  // WriteBatch, WriteBatch::Handler::LogData will be called with the contents
-  // of the blob as it is encountered. Blobs, puts, deletes, and merges will be
-  // encountered in the same order in thich they were inserted. The blob will
-  // NOT consume sequence number(s) and will NOT increase the count of the batch
-  //
-  // Example application: add timestamps to the transaction log for use in
-  // replication.
-  void PutLogData(const Slice& blob);
-
-  // Clear all updates buffered in this batch.
-  void Clear();
-
-  // Support for iterating over the contents of a batch.
-  class Handler {
-   public:
-    virtual ~Handler();
-    // default implementation will just call Put without column family for
-    // backwards compatibility. If the column family is not default,
-    // the function is noop
-    virtual Status PutCF(uint32_t column_family_id, const Slice& key,
-                         const Slice& value) {
-      if (column_family_id == 0) {
-        // Put() historically doesn't return status. We didn't want to be
-        // backwards incompatible so we didn't change the return status
-        // (this is a public API). We do an ordinary get and return Status::OK()
-        Put(key, value);
-        return Status::OK();
-      }
-      return Status::InvalidArgument(
-          "non-default column family and PutCF not implemented");
-    }
-    virtual void Put(const Slice& key, const Slice& value);
-    // Merge and LogData are not pure virtual. Otherwise, we would break
-    // existing clients of Handler on a source code level. The default
-    // implementation of Merge simply throws a runtime exception.
-    virtual Status MergeCF(uint32_t column_family_id, const Slice& key,
-                           const Slice& value) {
-      if (column_family_id == 0) {
-        Merge(key, value);
-        return Status::OK();
-      }
-      return Status::InvalidArgument(
-          "non-default column family and MergeCF not implemented");
-    }
-    virtual void Merge(const Slice& key, const Slice& value);
-    // The default implementation of LogData does nothing.
-    virtual void LogData(const Slice& blob);
-    virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) {
-      if (column_family_id == 0) {
-        Delete(key);
-        return Status::OK();
-      }
-      return Status::InvalidArgument(
-          "non-default column family and DeleteCF not implemented");
-    }
-    virtual void Delete(const Slice& key);
-    // Continue is called by WriteBatch::Iterate. If it returns false,
-    // iteration is halted. Otherwise, it continues iterating. The default
-    // implementation always returns true.
-    virtual bool Continue();
-  };
-  Status Iterate(Handler* handler) const;
-
-  // Retrieve the serialized version of this batch.
-  const std::string& Data() const { return rep_; }
-
-  // Retrieve data size of the batch.
-  size_t GetDataSize() const { return rep_.size(); }
-
-  // Returns the number of updates in the batch
-  int Count() const;
-
-  // Constructor with a serialized string object
-  explicit WriteBatch(std::string rep): rep_(rep) {}
-
- private:
-  friend class WriteBatchInternal;
-
-  std::string rep_;  // See comment in write_batch.cc for the format of rep_
-
-  // Intentionally copyable
-};
-
-}  // namespace rocksdb
-
-#endif  // STORAGE_ROCKSDB_INCLUDE_WRITE_BATCH_H_
diff --git a/src/rocksdb/include/utilities/backupable_db.h b/src/rocksdb/include/utilities/backupable_db.h
deleted file mode 100644
index 617fe8a..0000000
--- a/src/rocksdb/include/utilities/backupable_db.h
+++ /dev/null
@@ -1,251 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#ifndef ROCKSDB_LITE
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <string>
-#include <map>
-#include <vector>
-
-#include "utilities/stackable_db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-struct BackupableDBOptions {
-  // Where to keep the backup files. Has to be different than dbname_
-  // Best to set this to dbname_ + "/backups"
-  // Required
-  std::string backup_dir;
-
-  // Backup Env object. It will be used for backup file I/O. If it's
-  // nullptr, backups will be written out using DBs Env. If it's
-  // non-nullptr, backup's I/O will be performed using this object.
-  // If you want to have backups on HDFS, use HDFS Env here!
-  // Default: nullptr
-  Env* backup_env;
-
-  // If share_table_files == true, backup will assume that table files with
-  // same name have the same contents. This enables incremental backups and
-  // avoids unnecessary data copies.
-  // If share_table_files == false, each backup will be on its own and will
-  // not share any data with other backups.
-  // default: true
-  bool share_table_files;
-
-  // Backup info and error messages will be written to info_log
-  // if non-nullptr.
-  // Default: nullptr
-  Logger* info_log;
-
-  // If sync == true, we can guarantee you'll get consistent backup even
-  // on a machine crash/reboot. Backup process is slower with sync enabled.
-  // If sync == false, we don't guarantee anything on machine reboot. However,
-  // chances are some of the backups are consistent.
-  // Default: true
-  bool sync;
-
-  // If true, it will delete whatever backups there are already
-  // Default: false
-  bool destroy_old_data;
-
-  // If false, we won't backup log files. This option can be useful for backing
-  // up in-memory databases where log file are persisted, but table files are in
-  // memory.
-  // Default: true
-  bool backup_log_files;
-
-  // Max bytes that can be transferred in a second during backup.
-  // If 0, go as fast as you can
-  // Default: 0
-  uint64_t backup_rate_limit;
-
-  // Max bytes that can be transferred in a second during restore.
-  // If 0, go as fast as you can
-  // Default: 0
-  uint64_t restore_rate_limit;
-
-  // Only used if share_table_files is set to true. If true, will consider that
-  // backups can come from different databases, hence a sst is not uniquely
-  // identifed by its name, but by the triple (file name, crc32, file length)
-  // Default: false
-  // Note: this is an experimental option, and you'll need to set it manually
-  // *turn it on only if you know what you're doing*
-  bool share_files_with_checksum;
-
-  void Dump(Logger* logger) const;
-
-  explicit BackupableDBOptions(const std::string& _backup_dir,
-                               Env* _backup_env = nullptr,
-                               bool _share_table_files = true,
-                               Logger* _info_log = nullptr, bool _sync = true,
-                               bool _destroy_old_data = false,
-                               bool _backup_log_files = true,
-                               uint64_t _backup_rate_limit = 0,
-                               uint64_t _restore_rate_limit = 0)
-      : backup_dir(_backup_dir),
-        backup_env(_backup_env),
-        share_table_files(_share_table_files),
-        info_log(_info_log),
-        sync(_sync),
-        destroy_old_data(_destroy_old_data),
-        backup_log_files(_backup_log_files),
-        backup_rate_limit(_backup_rate_limit),
-        restore_rate_limit(_restore_rate_limit),
-        share_files_with_checksum(false) {
-    assert(share_table_files || !share_files_with_checksum);
-  }
-};
-
-struct RestoreOptions {
-  // If true, restore won't overwrite the existing log files in wal_dir. It will
-  // also move all log files from archive directory to wal_dir. Use this option
-  // in combination with BackupableDBOptions::backup_log_files = false for
-  // persisting in-memory databases.
-  // Default: false
-  bool keep_log_files;
-
-  explicit RestoreOptions(bool _keep_log_files = false)
-      : keep_log_files(_keep_log_files) {}
-};
-
-typedef uint32_t BackupID;
-
-struct BackupInfo {
-  BackupID backup_id;
-  int64_t timestamp;
-  uint64_t size;
-
-  BackupInfo() {}
-  BackupInfo(BackupID _backup_id, int64_t _timestamp, uint64_t _size)
-      : backup_id(_backup_id), timestamp(_timestamp), size(_size) {}
-};
-
-class BackupEngineReadOnly {
- public:
-  virtual ~BackupEngineReadOnly() {}
-
-  static BackupEngineReadOnly* NewReadOnlyBackupEngine(
-      Env* db_env, const BackupableDBOptions& options);
-
-  // You can GetBackupInfo safely, even with other BackupEngine performing
-  // backups on the same directory
-  virtual void GetBackupInfo(std::vector<BackupInfo>* backup_info) = 0;
-
-  // Restoring DB from backup is NOT safe when there is another BackupEngine
-  // running that might call DeleteBackup() or PurgeOldBackups(). It is caller's
-  // responsibility to synchronize the operation, i.e. don't delete the backup
-  // when you're restoring from it
-  virtual Status RestoreDBFromBackup(
-      BackupID backup_id, const std::string& db_dir, const std::string& wal_dir,
-      const RestoreOptions& restore_options = RestoreOptions()) = 0;
-  virtual Status RestoreDBFromLatestBackup(
-      const std::string& db_dir, const std::string& wal_dir,
-      const RestoreOptions& restore_options = RestoreOptions()) = 0;
-};
-
-// Please see the documentation in BackupableDB and RestoreBackupableDB
-class BackupEngine {
- public:
-  virtual ~BackupEngine() {}
-
-  static BackupEngine* NewBackupEngine(Env* db_env,
-                                       const BackupableDBOptions& options);
-
-  virtual Status CreateNewBackup(DB* db, bool flush_before_backup = false) = 0;
-  virtual Status PurgeOldBackups(uint32_t num_backups_to_keep) = 0;
-  virtual Status DeleteBackup(BackupID backup_id) = 0;
-  virtual void StopBackup() = 0;
-
-  virtual void GetBackupInfo(std::vector<BackupInfo>* backup_info) = 0;
-  virtual Status RestoreDBFromBackup(
-      BackupID backup_id, const std::string& db_dir, const std::string& wal_dir,
-      const RestoreOptions& restore_options = RestoreOptions()) = 0;
-  virtual Status RestoreDBFromLatestBackup(
-      const std::string& db_dir, const std::string& wal_dir,
-      const RestoreOptions& restore_options = RestoreOptions()) = 0;
-};
-
-// Stack your DB with BackupableDB to be able to backup the DB
-class BackupableDB : public StackableDB {
- public:
-  // BackupableDBOptions have to be the same as the ones used in a previous
-  // incarnation of the DB
-  //
-  // BackupableDB ownes the pointer `DB* db` now. You should not delete it or
-  // use it after the invocation of BackupableDB
-  BackupableDB(DB* db, const BackupableDBOptions& options);
-  virtual ~BackupableDB();
-
-  // Captures the state of the database in the latest backup
-  // NOT a thread safe call
-  Status CreateNewBackup(bool flush_before_backup = false);
-  // Returns info about backups in backup_info
-  void GetBackupInfo(std::vector<BackupInfo>* backup_info);
-  // deletes old backups, keeping latest num_backups_to_keep alive
-  Status PurgeOldBackups(uint32_t num_backups_to_keep);
-  // deletes a specific backup
-  Status DeleteBackup(BackupID backup_id);
-  // Call this from another thread if you want to stop the backup
-  // that is currently happening. It will return immediatelly, will
-  // not wait for the backup to stop.
-  // The backup will stop ASAP and the call to CreateNewBackup will
-  // return Status::Incomplete(). It will not clean up after itself, but
-  // the state will remain consistent. The state will be cleaned up
-  // next time you create BackupableDB or RestoreBackupableDB.
-  void StopBackup();
-
- private:
-  BackupEngine* backup_engine_;
-};
-
-// Use this class to access information about backups and restore from them
-class RestoreBackupableDB {
- public:
-  RestoreBackupableDB(Env* db_env, const BackupableDBOptions& options);
-  ~RestoreBackupableDB();
-
-  // Returns info about backups in backup_info
-  void GetBackupInfo(std::vector<BackupInfo>* backup_info);
-
-  // restore from backup with backup_id
-  // IMPORTANT -- if options_.share_table_files == true and you restore DB
-  // from some backup that is not the latest, and you start creating new
-  // backups from the new DB, they will probably fail
-  //
-  // Example: Let's say you have backups 1, 2, 3, 4, 5 and you restore 3.
-  // If you add new data to the DB and try creating a new backup now, the
-  // database will diverge from backups 4 and 5 and the new backup will fail.
-  // If you want to create new backup, you will first have to delete backups 4
-  // and 5.
-  Status RestoreDBFromBackup(BackupID backup_id, const std::string& db_dir,
-                             const std::string& wal_dir,
-                             const RestoreOptions& restore_options =
-                                 RestoreOptions());
-
-  // restore from the latest backup
-  Status RestoreDBFromLatestBackup(const std::string& db_dir,
-                                   const std::string& wal_dir,
-                                   const RestoreOptions& restore_options =
-                                       RestoreOptions());
-  // deletes old backups, keeping latest num_backups_to_keep alive
-  Status PurgeOldBackups(uint32_t num_backups_to_keep);
-  // deletes a specific backup
-  Status DeleteBackup(BackupID backup_id);
-
- private:
-  BackupEngine* backup_engine_;
-};
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/include/utilities/db_ttl.h b/src/rocksdb/include/utilities/db_ttl.h
deleted file mode 100644
index e99744d..0000000
--- a/src/rocksdb/include/utilities/db_ttl.h
+++ /dev/null
@@ -1,68 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#pragma once
-#ifndef ROCKSDB_LITE
-
-#include <string>
-#include <vector>
-
-#include "utilities/stackable_db.h"
-#include "rocksdb/db.h"
-
-namespace rocksdb {
-
-// Database with TTL support.
-//
-// USE-CASES:
-// This API should be used to open the db when key-values inserted are
-//  meant to be removed from the db in a non-strict 'ttl' amount of time
-//  Therefore, this guarantees that key-values inserted will remain in the
-//  db for >= ttl amount of time and the db will make efforts to remove the
-//  key-values as soon as possible after ttl seconds of their insertion.
-//
-// BEHAVIOUR:
-// TTL is accepted in seconds
-// (int32_t)Timestamp(creation) is suffixed to values in Put internally
-// Expired TTL values deleted in compaction only:(Timestamp+ttl<time_now)
-// Get/Iterator may return expired entries(compaction not run on them yet)
-// Different TTL may be used during different Opens
-// Example: Open1 at t=0 with ttl=4 and insert k1,k2, close at t=2
-//          Open2 at t=3 with ttl=5. Now k1,k2 should be deleted at t>=5
-// read_only=true opens in the usual read-only mode. Compactions will not be
-//  triggered(neither manual nor automatic), so no expired entries removed
-//
-// CONSTRAINTS:
-// Not specifying/passing or non-positive TTL behaves like TTL = infinity
-//
-// !!!WARNING!!!:
-// Calling DB::Open directly to re-open a db created by this API will get
-//  corrupt values(timestamp suffixed) and no ttl effect will be there
-//  during the second Open, so use this API consistently to open the db
-// Be careful when passing ttl with a small positive value because the
-//  whole database may be deleted in a small amount of time
-
-class DBWithTTL : public StackableDB {
- public:
-  virtual Status CreateColumnFamilyWithTtl(
-      const ColumnFamilyOptions& options, const std::string& column_family_name,
-      ColumnFamilyHandle** handle, int ttl) = 0;
-
-  static Status Open(const Options& options, const std::string& dbname,
-                     DBWithTTL** dbptr, int32_t ttl = 0,
-                     bool read_only = false);
-
-  static Status Open(const DBOptions& db_options, const std::string& dbname,
-                     const std::vector<ColumnFamilyDescriptor>& column_families,
-                     std::vector<ColumnFamilyHandle*>* handles,
-                     DBWithTTL** dbptr, std::vector<int32_t> ttls,
-                     bool read_only = false);
-
- protected:
-  explicit DBWithTTL(DB* db) : StackableDB(db) {}
-};
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/include/utilities/geo_db.h b/src/rocksdb/include/utilities/geo_db.h
deleted file mode 100644
index 87ff5e6..0000000
--- a/src/rocksdb/include/utilities/geo_db.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include <string>
-#include <vector>
-
-#include "utilities/stackable_db.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-//
-// Configurable options needed for setting up a Geo database
-//
-struct GeoDBOptions {
-  // Backup info and error messages will be written to info_log
-  // if non-nullptr.
-  // Default: nullptr
-  Logger* info_log;
-
-  explicit GeoDBOptions(Logger* _info_log = nullptr):info_log(_info_log) { }
-};
-
-//
-// A position in the earth's geoid
-//
-class GeoPosition {
- public:
-  double latitude;
-  double longitude;
-
-  explicit GeoPosition(double la = 0, double lo = 0) :
-    latitude(la), longitude(lo) {
-  }
-};
-
-//
-// Description of an object on the Geoid. It is located by a GPS location,
-// and is identified by the id. The value associated with this object is
-// an opaque string 'value'. Different objects identified by unique id's
-// can have the same gps-location associated with them.
-//
-class GeoObject {
- public:
-  GeoPosition position;
-  std::string id;
-  std::string value;
-
-  GeoObject() {}
-
-  GeoObject(const GeoPosition& pos, const std::string& i,
-            const std::string& val) :
-    position(pos), id(i), value(val) {
-  }
-};
-
-//
-// Stack your DB with GeoDB to be able to get geo-spatial support
-//
-class GeoDB : public StackableDB {
- public:
-  // GeoDBOptions have to be the same as the ones used in a previous
-  // incarnation of the DB
-  //
-  // GeoDB owns the pointer `DB* db` now. You should not delete it or
-  // use it after the invocation of GeoDB
-  // GeoDB(DB* db, const GeoDBOptions& options) : StackableDB(db) {}
-  GeoDB(DB* db, const GeoDBOptions& options) : StackableDB(db) {}
-  virtual ~GeoDB() {}
-
-  // Insert a new object into the location database. The object is
-  // uniquely identified by the id. If an object with the same id already
-  // exists in the db, then the old one is overwritten by the new
-  // object being inserted here.
-  virtual Status Insert(const GeoObject& object) = 0;
-
-  // Retrieve the value of the object located at the specified GPS
-  // location and is identified by the 'id'.
-  virtual Status GetByPosition(const GeoPosition& pos,
-                               const Slice& id, std::string* value) = 0;
-
-  // Retrieve the value of the object identified by the 'id'. This method
-  // could be potentially slower than GetByPosition
-  virtual Status GetById(const Slice& id, GeoObject*  object) = 0;
-
-  // Delete the specified object
-  virtual Status Remove(const Slice& id) = 0;
-
-  // Returns a list of all items within a circular radius from the
-  // specified gps location. If 'number_of_values' is specified,
-  // then this call returns at most that many number of objects.
-  // The radius is specified in 'meters'.
-  virtual Status SearchRadial(const GeoPosition& pos,
-                              double radius,
-                              std::vector<GeoObject>* values,
-                              int number_of_values = INT_MAX) = 0;
-};
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/include/utilities/stackable_db.h b/src/rocksdb/include/utilities/stackable_db.h
deleted file mode 100644
index 7927c2a..0000000
--- a/src/rocksdb/include/utilities/stackable_db.h
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "rocksdb/db.h"
-
-namespace rocksdb {
-
-// This class contains APIs to stack rocksdb wrappers.Eg. Stack TTL over base d
-class StackableDB : public DB {
- public:
-  // StackableDB is the owner of db now!
-  explicit StackableDB(DB* db) : db_(db) {}
-
-  ~StackableDB() {
-    delete db_;
-  }
-
-  virtual DB* GetBaseDB() {
-    return db_;
-  }
-
-  virtual Status CreateColumnFamily(const ColumnFamilyOptions& options,
-                                    const std::string& column_family_name,
-                                    ColumnFamilyHandle** handle) {
-    return db_->CreateColumnFamily(options, column_family_name, handle);
-  }
-
-  virtual Status DropColumnFamily(ColumnFamilyHandle* column_family) {
-    return db_->DropColumnFamily(column_family);
-  }
-
-  using DB::Put;
-  virtual Status Put(const WriteOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     const Slice& val) override {
-    return db_->Put(options, column_family, key, val);
-  }
-
-  using DB::Get;
-  virtual Status Get(const ReadOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     std::string* value) override {
-    return db_->Get(options, column_family, key, value);
-  }
-
-  using DB::MultiGet;
-  virtual std::vector<Status> MultiGet(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      const std::vector<Slice>& keys,
-      std::vector<std::string>* values) override {
-    return db_->MultiGet(options, column_family, keys, values);
-  }
-
-  using DB::KeyMayExist;
-  virtual bool KeyMayExist(const ReadOptions& options,
-                           ColumnFamilyHandle* column_family, const Slice& key,
-                           std::string* value,
-                           bool* value_found = nullptr) override {
-    return db_->KeyMayExist(options, column_family, key, value, value_found);
-  }
-
-  using DB::Delete;
-  virtual Status Delete(const WriteOptions& wopts,
-                        ColumnFamilyHandle* column_family,
-                        const Slice& key) override {
-    return db_->Delete(wopts, column_family, key);
-  }
-
-  using DB::Merge;
-  virtual Status Merge(const WriteOptions& options,
-                       ColumnFamilyHandle* column_family, const Slice& key,
-                       const Slice& value) override {
-    return db_->Merge(options, column_family, key, value);
-  }
-
-
-  virtual Status Write(const WriteOptions& opts, WriteBatch* updates)
-    override {
-      return db_->Write(opts, updates);
-  }
-
-  using DB::NewIterator;
-  virtual Iterator* NewIterator(const ReadOptions& opts,
-                                ColumnFamilyHandle* column_family) override {
-    return db_->NewIterator(opts, column_family);
-  }
-
-  virtual Status NewIterators(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_families,
-      std::vector<Iterator*>* iterators) {
-    return db_->NewIterators(options, column_families, iterators);
-  }
-
-
-  virtual const Snapshot* GetSnapshot() override {
-    return db_->GetSnapshot();
-  }
-
-  virtual void ReleaseSnapshot(const Snapshot* snapshot) override {
-    return db_->ReleaseSnapshot(snapshot);
-  }
-
-  using DB::GetProperty;
-  virtual bool GetProperty(ColumnFamilyHandle* column_family,
-                           const Slice& property, std::string* value) override {
-      return db_->GetProperty(column_family, property, value);
-  }
-
-  using DB::GetApproximateSizes;
-  virtual void GetApproximateSizes(ColumnFamilyHandle* column_family,
-                                   const Range* r, int n,
-                                   uint64_t* sizes) override {
-      return db_->GetApproximateSizes(column_family, r, n, sizes);
-  }
-
-  using DB::CompactRange;
-  virtual Status CompactRange(ColumnFamilyHandle* column_family,
-                              const Slice* begin, const Slice* end,
-                              bool reduce_level = false,
-                              int target_level = -1) override {
-    return db_->CompactRange(column_family, begin, end, reduce_level,
-                             target_level);
-  }
-
-  using DB::NumberLevels;
-  virtual int NumberLevels(ColumnFamilyHandle* column_family) override {
-    return db_->NumberLevels(column_family);
-  }
-
-  using DB::MaxMemCompactionLevel;
-  virtual int MaxMemCompactionLevel(ColumnFamilyHandle* column_family)
-      override {
-    return db_->MaxMemCompactionLevel(column_family);
-  }
-
-  using DB::Level0StopWriteTrigger;
-  virtual int Level0StopWriteTrigger(ColumnFamilyHandle* column_family)
-      override {
-    return db_->Level0StopWriteTrigger(column_family);
-  }
-
-  virtual const std::string& GetName() const override {
-    return db_->GetName();
-  }
-
-  virtual Env* GetEnv() const override {
-    return db_->GetEnv();
-  }
-
-  using DB::GetOptions;
-  virtual const Options& GetOptions(ColumnFamilyHandle* column_family) const
-      override {
-    return db_->GetOptions(column_family);
-  }
-
-  using DB::Flush;
-  virtual Status Flush(const FlushOptions& fopts,
-                       ColumnFamilyHandle* column_family) override {
-    return db_->Flush(fopts, column_family);
-  }
-
-  virtual Status DisableFileDeletions() override {
-    return db_->DisableFileDeletions();
-  }
-
-  virtual Status EnableFileDeletions(bool force) override {
-    return db_->EnableFileDeletions(force);
-  }
-
-  virtual Status GetLiveFiles(std::vector<std::string>& vec, uint64_t* mfs,
-                              bool flush_memtable = true) override {
-      return db_->GetLiveFiles(vec, mfs, flush_memtable);
-  }
-
-  virtual SequenceNumber GetLatestSequenceNumber() const override {
-    return db_->GetLatestSequenceNumber();
-  }
-
-  virtual Status GetSortedWalFiles(VectorLogPtr& files) override {
-    return db_->GetSortedWalFiles(files);
-  }
-
-  virtual Status DeleteFile(std::string name) override {
-    return db_->DeleteFile(name);
-  }
-
-  virtual Status GetDbIdentity(std::string& identity) {
-    return db_->GetDbIdentity(identity);
-  }
-
-  using DB::GetPropertiesOfAllTables;
-  virtual Status GetPropertiesOfAllTables(ColumnFamilyHandle* column_family,
-                                          TablePropertiesCollection* props) {
-    return db_->GetPropertiesOfAllTables(column_family, props);
-  }
-
-  virtual Status GetUpdatesSince(
-      SequenceNumber seq_number, unique_ptr<TransactionLogIterator>* iter,
-      const TransactionLogIterator::ReadOptions& read_options) override {
-    return db_->GetUpdatesSince(seq_number, iter, read_options);
-  }
-
-  virtual ColumnFamilyHandle* DefaultColumnFamily() const override {
-    return db_->DefaultColumnFamily();
-  }
-
- protected:
-  DB* db_;
-};
-
-} //  namespace rocksdb
diff --git a/src/rocksdb/include/utilities/utility_db.h b/src/rocksdb/include/utilities/utility_db.h
deleted file mode 100644
index f2b99ce..0000000
--- a/src/rocksdb/include/utilities/utility_db.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#ifndef ROCKSDB_LITE
-#include <vector>
-#include <string>
-
-#include "utilities/stackable_db.h"
-#include "utilities/db_ttl.h"
-#include "rocksdb/db.h"
-
-namespace rocksdb {
-
-// Please don't use this class. It's deprecated
-class UtilityDB {
- public:
-  // This function is here only for backwards compatibility. Please use the
-  // functions defined in DBWithTTl (utilities/db_ttl.h)
-  // (deprecated)
-  __attribute__((deprecated)) static Status OpenTtlDB(const Options& options,
-                                                      const std::string& name,
-                                                      StackableDB** dbptr,
-                                                      int32_t ttl = 0,
-                                                      bool read_only = false);
-};
-
-} //  namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/java/Makefile b/src/rocksdb/java/Makefile
deleted file mode 100644
index 9d21b57..0000000
--- a/src/rocksdb/java/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-NATIVE_JAVA_CLASSES = org.rocksdb.RocksDB org.rocksdb.Options org.rocksdb.WriteBatch org.rocksdb.WriteBatchInternal org.rocksdb.WriteBatchTest org.rocksdb.WriteOptions org.rocksdb.BackupableDB org.rocksdb.BackupableDBOptions org.rocksdb.Statistics org.rocksdb.Iterator org.rocksdb.VectorMemTableConfig org.rocksdb.SkipListMemTableConfig org.rocksdb.HashLinkedListMemTableConfig org.rocksdb.HashSkipListMemTableConfig org.rocksdb.PlainTableConfig org.rocksdb.ReadOptions org.rocksdb.Filter org [...]
-NATIVE_INCLUDE = ./include
-ROCKSDB_JAR = rocksdbjni.jar
-
-clean:
-	-find . -name "*.class" -exec rm {} \;
-	-find . -name "hs*.log" -exec rm {} \;
-	rm -f $(ROCKSDB_JAR)
-
-java:
-	javac org/rocksdb/util/*.java org/rocksdb/*.java
-	jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class
-	javah -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_CLASSES)
-
-sample: java
-	javac -cp $(ROCKSDB_JAR) RocksDBSample.java
-	@rm -rf /tmp/rocksdbjni
-	@rm -rf /tmp/rocksdbjni_not_found
-	java -ea -Djava.library.path=.:../ -cp ".:./*" -Xcheck:jni RocksDBSample /tmp/rocksdbjni
-	@rm -rf /tmp/rocksdbjni
-	@rm -rf /tmp/rocksdbjni_not_found
-
-test: java
-	javac org/rocksdb/test/*.java
-	java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.WriteBatchTest
-	java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.BackupableDBTest
-	java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.OptionsTest
-	java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.ReadOptionsTest
-
-db_bench: java
-	javac org/rocksdb/benchmark/*.java
diff --git a/src/rocksdb/java/RocksDBSample.java b/src/rocksdb/java/RocksDBSample.java
deleted file mode 100644
index 5d11b1a..0000000
--- a/src/rocksdb/java/RocksDBSample.java
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.ArrayList;
-import org.rocksdb.*;
-import org.rocksdb.util.SizeUnit;
-import java.io.IOException;
-
-public class RocksDBSample {
-  static {
-    RocksDB.loadLibrary();
-  }
-
-  public static void main(String[] args) {
-    if (args.length < 1) {
-      System.out.println("usage: RocksDBSample db_path");
-      return;
-    }
-    String db_path = args[0];
-    String db_path_not_found = db_path + "_not_found";
-
-    System.out.println("RocksDBSample");
-    RocksDB db = null;
-    Options options = new Options();
-    try {
-      db = RocksDB.open(options, db_path_not_found);
-      assert(false);
-    } catch (RocksDBException e) {
-      System.out.format("caught the expceted exception -- %s\n", e);
-      assert(db == null);
-    }
-
-    Filter filter = new BloomFilter(10);
-    options.setCreateIfMissing(true)
-        .createStatistics()
-        .setWriteBufferSize(8 * SizeUnit.KB)
-        .setMaxWriteBufferNumber(3)
-        .setDisableSeekCompaction(true)
-        .setBlockSize(64 * SizeUnit.KB)
-        .setMaxBackgroundCompactions(10)
-        .setFilter(filter);
-    Statistics stats = options.statisticsPtr();
-
-    assert(options.createIfMissing() == true);
-    assert(options.writeBufferSize() == 8 * SizeUnit.KB);
-    assert(options.maxWriteBufferNumber() == 3);
-    assert(options.disableSeekCompaction() == true);
-    assert(options.blockSize() == 64 * SizeUnit.KB);
-    assert(options.maxBackgroundCompactions() == 10);
-
-    assert(options.memTableFactoryName().equals("SkipListFactory"));
-    options.setMemTableConfig(
-        new HashSkipListMemTableConfig()
-            .setHeight(4)
-            .setBranchingFactor(4)
-            .setBucketCount(2000000));
-    assert(options.memTableFactoryName().equals("HashSkipListRepFactory"));
-
-    options.setMemTableConfig(
-        new HashLinkedListMemTableConfig()
-            .setBucketCount(100000));
-    assert(options.memTableFactoryName().equals("HashLinkedListRepFactory"));
-
-    options.setMemTableConfig(
-        new VectorMemTableConfig().setReservedSize(10000));
-    assert(options.memTableFactoryName().equals("VectorRepFactory"));
-
-    options.setMemTableConfig(new SkipListMemTableConfig());
-    assert(options.memTableFactoryName().equals("SkipListFactory"));
-
-    options.setTableFormatConfig(new PlainTableConfig());
-    assert(options.tableFactoryName().equals("PlainTable"));
-
-    try {
-      db = RocksDB.open(options, db_path_not_found);
-      db.put("hello".getBytes(), "world".getBytes());
-      byte[] value = db.get("hello".getBytes());
-      assert("world".equals(new String(value)));
-    } catch (RocksDBException e) {
-      System.out.format("[ERROR] caught the unexpceted exception -- %s\n", e);
-      assert(db == null);
-      assert(false);
-    }
-    // be sure to release the c++ pointer
-    db.close();
-
-    ReadOptions readOptions = new ReadOptions();
-    readOptions.setFillCache(false);
-
-    try {
-      db = RocksDB.open(options, db_path);
-      db.put("hello".getBytes(), "world".getBytes());
-      byte[] value = db.get("hello".getBytes());
-      System.out.format("Get('hello') = %s\n",
-          new String(value));
-
-      for (int i = 1; i <= 9; ++i) {
-        for (int j = 1; j <= 9; ++j) {
-          db.put(String.format("%dx%d", i, j).getBytes(),
-                 String.format("%d", i * j).getBytes());
-        }
-      }
-
-      for (int i = 1; i <= 9; ++i) {
-        for (int j = 1; j <= 9; ++j) {
-          System.out.format("%s ", new String(db.get(
-              String.format("%dx%d", i, j).getBytes())));
-        }
-        System.out.println("");
-      }
-
-      value = db.get("1x1".getBytes());
-      assert(value != null);
-      value = db.get("world".getBytes());
-      assert(value == null);
-      value = db.get(readOptions, "world".getBytes());
-      assert(value == null);
-
-      byte[] testKey = "asdf".getBytes();
-      byte[] testValue =
-          "asdfghjkl;'?><MNBVCXZQWERTYUIOP{+_)(*&^%$#@".getBytes();
-      db.put(testKey, testValue);
-      byte[] testResult = db.get(testKey);
-      assert(testResult != null);
-      assert(Arrays.equals(testValue, testResult));
-      assert(new String(testValue).equals(new String(testResult)));
-      testResult = db.get(readOptions, testKey);
-      assert(testResult != null);
-      assert(Arrays.equals(testValue, testResult));
-      assert(new String(testValue).equals(new String(testResult)));
-
-      byte[] insufficientArray = new byte[10];
-      byte[] enoughArray = new byte[50];
-      int len;
-      len = db.get(testKey, insufficientArray);
-      assert(len > insufficientArray.length);
-      len = db.get("asdfjkl;".getBytes(), enoughArray);
-      assert(len == RocksDB.NOT_FOUND);
-      len = db.get(testKey, enoughArray);
-      assert(len == testValue.length);
-
-      len = db.get(readOptions, testKey, insufficientArray);
-      assert(len > insufficientArray.length);
-      len = db.get(readOptions, "asdfjkl;".getBytes(), enoughArray);
-      assert(len == RocksDB.NOT_FOUND);
-      len = db.get(readOptions, testKey, enoughArray);
-      assert(len == testValue.length);
-
-      db.remove(testKey);
-      len = db.get(testKey, enoughArray);
-      assert(len == RocksDB.NOT_FOUND);
-
-      // repeat the test with WriteOptions
-      WriteOptions writeOpts = new WriteOptions();
-      writeOpts.setSync(true);
-      writeOpts.setDisableWAL(true);
-      db.put(writeOpts, testKey, testValue);
-      len = db.get(testKey, enoughArray);
-      assert(len == testValue.length);
-      assert(new String(testValue).equals(
-          new String(enoughArray, 0, len)));
-      writeOpts.dispose();
-
-      try {
-        for (TickerType statsType : TickerType.values()) {
-          stats.getTickerCount(statsType);
-        }
-        System.out.println("getTickerCount() passed.");
-      } catch (Exception e) {
-        System.out.println("Failed in call to getTickerCount()");
-        assert(false); //Should never reach here.
-      }
-
-      try {
-        for (HistogramType histogramType : HistogramType.values()) {
-          HistogramData data = stats.geHistogramData(histogramType);
-        }
-        System.out.println("geHistogramData() passed.");
-      } catch (Exception e) {
-        System.out.println("Failed in call to geHistogramData()");
-        assert(false); //Should never reach here.
-      }
-
-      Iterator iterator = db.newIterator();
-
-      boolean seekToFirstPassed = false;
-      for (iterator.seekToFirst(); iterator.isValid(); iterator.next()) {
-        iterator.status();
-        assert(iterator.key() != null);
-        assert(iterator.value() != null);
-        seekToFirstPassed = true;
-      }
-      if(seekToFirstPassed) {
-        System.out.println("iterator seekToFirst tests passed.");
-      }
-
-      boolean seekToLastPassed = false;
-      for (iterator.seekToLast(); iterator.isValid(); iterator.prev()) {
-        iterator.status();
-        assert(iterator.key() != null);
-        assert(iterator.value() != null);
-        seekToLastPassed = true;
-      }
-
-      if(seekToLastPassed) {
-        System.out.println("iterator seekToLastPassed tests passed.");
-      }
-
-      iterator.seekToFirst();
-      iterator.seek(iterator.key());
-      assert(iterator.key() != null);
-      assert(iterator.value() != null);
-
-      System.out.println("iterator seek test passed.");
-
-      iterator.dispose();
-      System.out.println("iterator tests passed.");
-
-      iterator = db.newIterator();
-      List<byte[]> keys = new ArrayList<byte[]>();
-      for (iterator.seekToLast(); iterator.isValid(); iterator.prev()) {
-        keys.add(iterator.key());
-      }
-      iterator.dispose();
-
-      Map<byte[], byte[]> values = db.multiGet(keys);
-      assert(values.size() == keys.size());
-      for(byte[] value1 : values.values()) {
-        assert(value1 != null);
-      }
-
-      values = db.multiGet(new ReadOptions(), keys);
-      assert(values.size() == keys.size());
-      for(byte[] value1 : values.values()) {
-        assert(value1 != null);
-      }
-    } catch (RocksDBException e) {
-      System.err.println(e);
-    }
-    if (db != null) {
-      db.close();
-    }
-    // be sure to dispose c++ pointers
-    options.dispose();
-    readOptions.dispose();
-    filter.dispose();
-  }
-}
diff --git a/src/rocksdb/java/jdb_bench.sh b/src/rocksdb/java/jdb_bench.sh
deleted file mode 100755
index dba7dbd..0000000
--- a/src/rocksdb/java/jdb_bench.sh
+++ /dev/null
@@ -1 +0,0 @@
-java -server -d64 -XX:NewSize=4m -XX:+AggressiveOpts -Djava.library.path=.:../ -cp "rocksdbjni.jar:.:./*" org.rocksdb.benchmark.DbBenchmark $@
diff --git a/src/rocksdb/java/org/rocksdb/BackupableDB.java b/src/rocksdb/java/org/rocksdb/BackupableDB.java
deleted file mode 100644
index 91607d4..0000000
--- a/src/rocksdb/java/org/rocksdb/BackupableDB.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * A subclass of RocksDB which supports backup-related operations.
- *
- * @see BackupableDBOptions
- */
-public class BackupableDB extends RocksDB {
-  /**
-   * Open a BackupableDB under the specified path.
-   * Note that the backup path should be set properly in the
-   * input BackupableDBOptions.
-   *
-   * @param opt options for db.
-   * @param bopt backup related options.
-   * @param the db path for storing data.  The path for storing
-   *     backup should be specified in the BackupableDBOptions.
-   * @return reference to the opened BackupableDB.
-   */
-  public static BackupableDB open(
-      Options opt, BackupableDBOptions bopt, String db_path)
-      throws RocksDBException {
-    // since BackupableDB c++ will handle the life cycle of
-    // the returned RocksDB of RocksDB.open(), here we store
-    // it as a BackupableDB member variable to avoid GC.
-    BackupableDB bdb = new BackupableDB(RocksDB.open(opt, db_path));
-    bdb.open(bdb.db_.nativeHandle_, bopt.nativeHandle_);
-
-    return bdb;
-  }
-
-  /**
-   * Captures the state of the database in the latest backup.
-   * Note that this function is not thread-safe.
-   *
-   * @param flushBeforeBackup if true, then all data will be flushed
-   *     before creating backup.
-   */
-  public void createNewBackup(boolean flushBeforeBackup) {
-    createNewBackup(nativeHandle_, flushBeforeBackup);
-  }
-
-
-  /**
-   * Close the BackupableDB instance and release resource.
-   *
-   * Internally, BackupableDB owns the rocksdb::DB pointer to its
-   * associated RocksDB.  The release of that RocksDB pointer is
-   * handled in the destructor of the c++ rocksdb::BackupableDB and
-   * should be transparent to Java developers.
-   */
-  @Override public synchronized void close() {
-    if (isInitialized()) {
-      super.close();
-    }
-  }
-
-  /**
-   * A protected construction that will be used in the static factory
-   * method BackupableDB.open().
-   */
-  protected BackupableDB(RocksDB db) {
-    super();
-    db_ = db;
-  }
-
-  @Override protected void finalize() {
-    close();
-  }
-
-  protected native void open(long rocksDBHandle, long backupDBOptionsHandle);
-  protected native void createNewBackup(long handle, boolean flag);
-
-  private final RocksDB db_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/BackupableDBOptions.java b/src/rocksdb/java/org/rocksdb/BackupableDBOptions.java
deleted file mode 100644
index 2c64b60..0000000
--- a/src/rocksdb/java/org/rocksdb/BackupableDBOptions.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * BackupableDBOptions to control the behavior of a backupable database.
- * It will be used during the creation of a BackupableDB.
- *
- * Note that dispose() must be called before an Options instance
- * become out-of-scope to release the allocated memory in c++.
- */
-public class BackupableDBOptions extends RocksObject {
-  public BackupableDBOptions(String path) {
-    super();
-    newBackupableDBOptions(path);
-  }
-
-  /**
-   * Returns the path to the BackupableDB directory.
-   *
-   * @return the path to the BackupableDB directory.
-   */
-  public String backupDir() {
-    assert(isInitialized());
-    return backupDir(nativeHandle_);
-  }
-
-  /**
-   * Release the memory allocated for the current instance
-   * in the c++ side.
-   */
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose(nativeHandle_);
-    }
-  }
-
-  private native void newBackupableDBOptions(String path);
-  private native String backupDir(long handle);
-  private native void dispose(long handle);
-}
diff --git a/src/rocksdb/java/org/rocksdb/BloomFilter.java b/src/rocksdb/java/org/rocksdb/BloomFilter.java
deleted file mode 100644
index 9c4913a..0000000
--- a/src/rocksdb/java/org/rocksdb/BloomFilter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * This class creates a new filter policy that uses a bloom filter
- * with approximately the specified number of bits per key.
- * A good value for bitsPerKey is 10, which yields a filter
- * with ~ 1% false positive rate.
- *
- * Default value of bits per key is 10.
- */
-public class BloomFilter extends Filter {
-  private static final int DEFAULT_BITS_PER_KEY = 10;
-  private final int bitsPerKey_;
-
-  public BloomFilter() {
-    this(DEFAULT_BITS_PER_KEY);
-  }
-
-  public BloomFilter(int bitsPerKey) {
-    super();
-    bitsPerKey_ = bitsPerKey;
-
-    createNewFilter();
-  }
-
-  @Override
-  protected void createNewFilter() {
-    createNewFilter0(bitsPerKey_);
-  }
-
-  private native void createNewFilter0(int bitsKeyKey);
-}
diff --git a/src/rocksdb/java/org/rocksdb/Filter.java b/src/rocksdb/java/org/rocksdb/Filter.java
deleted file mode 100644
index 3a01ad4..0000000
--- a/src/rocksdb/java/org/rocksdb/Filter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * Filters are stored in rocksdb and are consulted automatically
- * by rocksdb to decide whether or not to read some
- * information from disk. In many cases, a filter can cut down the
- * number of disk seeks form a handful to a single disk seek per
- * DB::Get() call.
- */
-public abstract class Filter extends RocksObject {
-  protected abstract void createNewFilter();
-
-  /**
-   * Deletes underlying C++ filter pointer.
-   *
-   * Note that this function should be called only after all
-   * RocksDB instances referencing the filter are closed.
-   * Otherwise an undefined behavior will occur.
-   */
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose0(nativeHandle_);
-    }
-  }
-
-  private native void dispose0(long handle);
-}
diff --git a/src/rocksdb/java/org/rocksdb/HashLinkedListMemTableConfig.java b/src/rocksdb/java/org/rocksdb/HashLinkedListMemTableConfig.java
deleted file mode 100644
index 24fcd8b..0000000
--- a/src/rocksdb/java/org/rocksdb/HashLinkedListMemTableConfig.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.rocksdb;
-
-/**
- * The config for hash linked list memtable representation
- * Such memtable contains a fix-sized array of buckets, where
- * each bucket points to a sorted singly-linked
- * list (or null if the bucket is empty).
- *
- * Note that since this mem-table representation relies on the
- * key prefix, it is required to invoke one of the usePrefixExtractor
- * functions to specify how to extract key prefix given a key.
- * If proper prefix-extractor is not set, then RocksDB will
- * use the default memtable representation (SkipList) instead
- * and post a warning in the LOG.
- */
-public class HashLinkedListMemTableConfig extends MemTableConfig {
-  public static final long DEFAULT_BUCKET_COUNT = 50000;
-
-  public HashLinkedListMemTableConfig() {
-    bucketCount_ = DEFAULT_BUCKET_COUNT;
-  }
-
-  /**
-   * Set the number of buckets in the fixed-size array used
-   * in the hash linked-list mem-table.
-   *
-   * @param count the number of hash buckets.
-   * @return the reference to the current HashLinkedListMemTableConfig.
-   */
-  public HashLinkedListMemTableConfig setBucketCount(long count) {
-    bucketCount_ = count;
-    return this;
-  }
-
-  /**
-   * Returns the number of buckets that will be used in the memtable
-   * created based on this config.
-   *
-   * @return the number of buckets
-   */
-  public long bucketCount() {
-    return bucketCount_;
-  }
-
-  @Override protected long newMemTableFactoryHandle() {
-    return newMemTableFactoryHandle(bucketCount_);
-  }
-
-  private native long newMemTableFactoryHandle(long bucketCount);
-
-  private long bucketCount_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/HashSkipListMemTableConfig.java b/src/rocksdb/java/org/rocksdb/HashSkipListMemTableConfig.java
deleted file mode 100644
index 74fb0db..0000000
--- a/src/rocksdb/java/org/rocksdb/HashSkipListMemTableConfig.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.rocksdb;
-
-/**
- * The config for hash skip-list mem-table representation.
- * Such mem-table representation contains a fix-sized array of
- * buckets, where each bucket points to a skiplist (or null if the
- * bucket is empty).
- *
- * Note that since this mem-table representation relies on the
- * key prefix, it is required to invoke one of the usePrefixExtractor
- * functions to specify how to extract key prefix given a key.
- * If proper prefix-extractor is not set, then RocksDB will
- * use the default memtable representation (SkipList) instead
- * and post a warning in the LOG.
- */
-public class HashSkipListMemTableConfig extends MemTableConfig {
-  public static final int DEFAULT_BUCKET_COUNT = 1000000;
-  public static final int DEFAULT_BRANCHING_FACTOR = 4;
-  public static final int DEFAULT_HEIGHT = 4;
-
-  public HashSkipListMemTableConfig() {
-    bucketCount_ = DEFAULT_BUCKET_COUNT;
-    branchingFactor_ = DEFAULT_BRANCHING_FACTOR;
-    height_ = DEFAULT_HEIGHT;
-  }
-
-  /**
-   * Set the number of hash buckets used in the hash skiplist memtable.
-   * Default = 1000000.
-   *
-   * @param count the number of hash buckets used in the hash
-   *    skiplist memtable.
-   * @return the reference to the current HashSkipListMemTableConfig.
-   */
-  public HashSkipListMemTableConfig setBucketCount(long count) {
-    bucketCount_ = count;
-    return this;
-  }
-
-  /**
-   * @return the number of hash buckets
-   */
-  public long bucketCount() {
-    return bucketCount_;
-  }
-
-  /**
-   * Set the height of the skip list.  Default = 4.
-   *
-   * @return the reference to the current HashSkipListMemTableConfig.
-   */
-  public HashSkipListMemTableConfig setHeight(int height) {
-    height_ = height;
-    return this;
-  }
-
-  /**
-   * @return the height of the skip list.
-   */
-  public int height() {
-    return height_;
-  }
-
-  /**
-   * Set the branching factor used in the hash skip-list memtable.
-   * This factor controls the probabilistic size ratio between adjacent
-   * links in the skip list.
-   *
-   * @param bf the probabilistic size ratio between adjacent link
-   *     lists in the skip list.
-   * @return the reference to the current HashSkipListMemTableConfig.
-   */
-  public HashSkipListMemTableConfig setBranchingFactor(int bf) {
-    branchingFactor_ = bf;
-    return this;
-  }
-
-  /**
-   * @return branching factor, the probabilistic size ratio between
-   *     adjacent links in the skip list.
-   */
-  public int branchingFactor() {
-    return branchingFactor_;
-  }
-
-  @Override protected long newMemTableFactoryHandle() {
-    return newMemTableFactoryHandle(
-        bucketCount_, height_, branchingFactor_);
-  }
-
-  private native long newMemTableFactoryHandle(
-      long bucketCount, int height, int branchingFactor);
-
-  private long bucketCount_;
-  private int branchingFactor_;
-  private int height_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/HistogramData.java b/src/rocksdb/java/org/rocksdb/HistogramData.java
deleted file mode 100644
index 3b2e295..0000000
--- a/src/rocksdb/java/org/rocksdb/HistogramData.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-public class HistogramData {
-  private final double median_;
-  private final double percentile95_;
-  private final double percentile99_;
-  private final double average_;
-  private final double standardDeviation_;
-
-  public HistogramData(double median, double percentile95,
-      double percentile99, double average, double standardDeviation) {
-    median_ = median;
-    percentile95_ = percentile95;
-    percentile99_ = percentile99;
-    average_ = average;
-    standardDeviation_ = standardDeviation;
-  }
-
-  public double getMedian() {
-    return median_;
-  }
-
-  public double getPercentile95() {
-    return percentile95_;
-  }
-
-  public double getPercentile99() {
-    return percentile99_;
-  }
-
-  public double getAverage() {
-    return average_;
-  }
-
-  public double getStandardDeviation() {
-    return standardDeviation_;
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/HistogramType.java b/src/rocksdb/java/org/rocksdb/HistogramType.java
deleted file mode 100644
index 751c03a..0000000
--- a/src/rocksdb/java/org/rocksdb/HistogramType.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-public enum HistogramType {
-  DB_GET(0),
-  DB_WRITE(1),
-  COMPACTION_TIME(2),
-  TABLE_SYNC_MICROS(3),
-  COMPACTION_OUTFILE_SYNC_MICROS(4),
-  WAL_FILE_SYNC_MICROS(5),
-  MANIFEST_FILE_SYNC_MICROS(6),
-  // TIME SPENT IN IO DURING TABLE OPEN
-  TABLE_OPEN_IO_MICROS(7),
-  DB_MULTIGET(8),
-  READ_BLOCK_COMPACTION_MICROS(9),
-  READ_BLOCK_GET_MICROS(10),
-  WRITE_RAW_BLOCK_MICROS(11),
-
-  STALL_L0_SLOWDOWN_COUNT(12),
-  STALL_MEMTABLE_COMPACTION_COUNT(13),
-  STALL_L0_NUM_FILES_COUNT(14),
-  HARD_RATE_LIMIT_DELAY_COUNT(15),
-  SOFT_RATE_LIMIT_DELAY_COUNT(16),
-  NUM_FILES_IN_SINGLE_COMPACTION(17);
-
-  private final int value_;
-
-  private HistogramType(int value) {
-    value_ = value;
-  }
-
-  public int getValue() {
-    return value_;
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/Iterator.java b/src/rocksdb/java/org/rocksdb/Iterator.java
deleted file mode 100644
index 3c745a4..0000000
--- a/src/rocksdb/java/org/rocksdb/Iterator.java
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * An iterator yields a sequence of key/value pairs from a source.
- * The following class defines the interface.  Multiple implementations
- * are provided by this library.  In particular, iterators are provided
- * to access the contents of a Table or a DB.
- *
- * Multiple threads can invoke const methods on an Iterator without
- * external synchronization, but if any of the threads may call a
- * non-const method, all threads accessing the same Iterator must use
- * external synchronization.
- */
-public class Iterator extends RocksObject {
-  public Iterator(long nativeHandle) {
-    super();
-    nativeHandle_ = nativeHandle;
-  }
-
-  /**
-   * An iterator is either positioned at a key/value pair, or
-   * not valid.  This method returns true iff the iterator is valid.
-   * @return true if iterator is valid.
-   */
-  public boolean isValid() {
-    assert(isInitialized());
-    return isValid0(nativeHandle_);
-  }
-
-  /**
-   * Position at the first key in the source.  The iterator is Valid()
-   * after this call iff the source is not empty.
-   */
-  public void seekToFirst() {
-    assert(isInitialized());
-    seekToFirst0(nativeHandle_);
-  }
-
-  /**
-   * Position at the last key in the source.  The iterator is
-   * Valid() after this call iff the source is not empty.
-   */
-  public void seekToLast() {
-    assert(isInitialized());
-    seekToLast0(nativeHandle_);
-  }
-
-  /**
-   * Moves to the next entry in the source.  After this call, Valid() is
-   * true iff the iterator was not positioned at the last entry in the source.
-   * REQUIRES: Valid()
-   */
-  public void next() {
-    assert(isInitialized());
-    next0(nativeHandle_);
-  }
-
-  /**
-   * Moves to the previous entry in the source.  After this call, Valid() is
-   * true iff the iterator was not positioned at the first entry in source.
-   * REQUIRES: Valid()
-   */
-  public void prev() {
-    assert(isInitialized());
-    prev0(nativeHandle_);
-  }
-
-  /**
-   * Return the key for the current entry.  The underlying storage for
-   * the returned slice is valid only until the next modification of
-   * the iterator.
-   * REQUIRES: Valid()
-   * @return key for the current entry.
-   */
-  public byte[] key() {
-    assert(isInitialized());
-    return key0(nativeHandle_);
-  }
-
-  /**
-   * Return the value for the current entry.  The underlying storage for
-   * the returned slice is valid only until the next modification of
-   * the iterator.
-   * REQUIRES: !AtEnd() && !AtStart()
-   * @return value for the current entry.
-   */
-  public byte[] value() {
-    assert(isInitialized());
-    return value0(nativeHandle_);
-  }
-
-  /**
-   * Position at the first key in the source that at or past target
-   * The iterator is Valid() after this call iff the source contains
-   * an entry that comes at or past target.
-   */
-  public void seek(byte[] target) {
-    assert(isInitialized());
-    seek0(nativeHandle_, target, target.length);
-  }
-
-  /**
-   * If an error has occurred, return it.  Else return an ok status.
-   * If non-blocking IO is requested and this operation cannot be
-   * satisfied without doing some IO, then this returns Status::Incomplete().
-   *
-   */
-  public void status() throws RocksDBException {
-    assert(isInitialized());
-    status0(nativeHandle_);
-  }
-
-  /**
-   * Deletes underlying C++ iterator pointer.
-   */
-  @Override public synchronized void dispose() {
-    if(isInitialized()) {
-      dispose(nativeHandle_);
-      nativeHandle_ = 0;
-    }
-  }
-
-  private native boolean isValid0(long handle);
-  private native void dispose(long handle);
-  private native void seekToFirst0(long handle);
-  private native void seekToLast0(long handle);
-  private native void next0(long handle);
-  private native void prev0(long handle);
-  private native byte[] key0(long handle);
-  private native byte[] value0(long handle);
-  private native void seek0(long handle, byte[] target, int targetLen);
-  private native void status0(long handle);
-}
diff --git a/src/rocksdb/java/org/rocksdb/MemTableConfig.java b/src/rocksdb/java/org/rocksdb/MemTableConfig.java
deleted file mode 100644
index a473c25..0000000
--- a/src/rocksdb/java/org/rocksdb/MemTableConfig.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-package org.rocksdb;
-
-/**
- * MemTableConfig is used to config the internal mem-table of a RocksDB.
- * It is required for each memtable to have one such sub-class to allow
- * Java developers to use it.
- *
- * To make a RocksDB to use a specific MemTable format, its associated
- * MemTableConfig should be properly set and passed into Options
- * via Options.setMemTableFactory() and open the db using that Options.
- *
- * @see Options
- */
-public abstract class MemTableConfig {
-  /**
-   * This function should only be called by Options.setMemTableConfig(),
-   * which will create a c++ shared-pointer to the c++ MemTableRepFactory
-   * that associated with the Java MemTableConfig.
-   *
-   * @see Options.setMemTableFactory()
-   */
-  abstract protected long newMemTableFactoryHandle();
-}
diff --git a/src/rocksdb/java/org/rocksdb/Options.java b/src/rocksdb/java/org/rocksdb/Options.java
deleted file mode 100644
index 02d3e20..0000000
--- a/src/rocksdb/java/org/rocksdb/Options.java
+++ /dev/null
@@ -1,2355 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * Options to control the behavior of a database.  It will be used
- * during the creation of a RocksDB (i.e., RocksDB.open()).
- *
- * Note that dispose() must be called before an Options instance
- * become out-of-scope to release the allocated memory in c++.
- */
-public class Options extends RocksObject {
-  static final long DEFAULT_CACHE_SIZE = 8 << 20;
-  /**
-   * Construct options for opening a RocksDB.
-   *
-   * This constructor will create (by allocating a block of memory)
-   * an rocksdb::Options in the c++ side.
-   */
-  public Options() {
-    super();
-    cacheSize_ = DEFAULT_CACHE_SIZE;
-    newOptions();
-  }
-
-  /**
-   * If this value is set to true, then the database will be created
-   * if it is missing during RocksDB.open().
-   * Default: false
-   *
-   * @param flag a flag indicating whether to create a database the
-   *     specified database in RocksDB.open() operation is missing.
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options setCreateIfMissing(boolean flag) {
-    assert(isInitialized());
-    setCreateIfMissing(nativeHandle_, flag);
-    return this;
-  }
-
-  /**
-   * Return true if the create_if_missing flag is set to true.
-   * If true, the database will be created if it is missing.
-   *
-   * @return true if the createIfMissing option is set to true.
-   * @see setCreateIfMissing()
-   */
-  public boolean createIfMissing() {
-    assert(isInitialized());
-    return createIfMissing(nativeHandle_);
-  }
-
-  /**
-   * Amount of data to build up in memory (backed by an unsorted log
-   * on disk) before converting to a sorted on-disk file.
-   *
-   * Larger values increase performance, especially during bulk loads.
-   * Up to max_write_buffer_number write buffers may be held in memory
-   * at the same time, so you may wish to adjust this parameter
-   * to control memory usage.
-   *
-   * Also, a larger write buffer will result in a longer recovery time
-   * the next time the database is opened.
-   *
-   * Default: 4MB
-   * @param writeBufferSize the size of write buffer.
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options setWriteBufferSize(long writeBufferSize) {
-    assert(isInitialized());
-    setWriteBufferSize(nativeHandle_, writeBufferSize);
-    return this;
-  }
-
-  /**
-   * Return size of write buffer size.
-   *
-   * @return size of write buffer.
-   * @see setWriteBufferSize()
-   */
-  public long writeBufferSize()  {
-    assert(isInitialized());
-    return writeBufferSize(nativeHandle_);
-  }
-
-  /**
-   * The maximum number of write buffers that are built up in memory.
-   * The default is 2, so that when 1 write buffer is being flushed to
-   * storage, new writes can continue to the other write buffer.
-   * Default: 2
-   *
-   * @param maxWriteBufferNumber maximum number of write buffers.
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options setMaxWriteBufferNumber(int maxWriteBufferNumber) {
-    assert(isInitialized());
-    setMaxWriteBufferNumber(nativeHandle_, maxWriteBufferNumber);
-    return this;
-  }
-
-  /**
-   * Returns maximum number of write buffers.
-   *
-   * @return maximum number of write buffers.
-   * @see setMaxWriteBufferNumber()
-   */
-  public int maxWriteBufferNumber() {
-    assert(isInitialized());
-    return maxWriteBufferNumber(nativeHandle_);
-  }
-
-  /*
-   * Approximate size of user data packed per block.  Note that the
-   * block size specified here corresponds to uncompressed data.  The
-   * actual size of the unit read from disk may be smaller if
-   * compression is enabled.  This parameter can be changed dynamically.
-   *
-   * Default: 4K
-   *
-   * @param blockSize the size of each block in bytes.
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options setBlockSize(long blockSize) {
-    assert(isInitialized());
-    setBlockSize(nativeHandle_, blockSize);
-    return this;
-  }
-
-  /*
-   * Returns the size of a block in bytes.
-   *
-   * @return block size.
-   * @see setBlockSize()
-   */
-  public long blockSize() {
-    assert(isInitialized());
-    return blockSize(nativeHandle_);
-  }
-
-  /**
-   * Use the specified filter policy to reduce disk reads.
-   *
-   * Note that the caller should not dispose the input filter as
-   * Options.dispose() will dispose this filter.
-   *
-   * @param Filter policy java instance.
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options setFilter(Filter filter) {
-    assert(isInitialized());
-    setFilterHandle(nativeHandle_, filter.nativeHandle_);
-    filter_ = filter;
-    return this;
-  }
-  private native void setFilterHandle(long optHandle, long filterHandle);
-
-  /*
-   * Disable compaction triggered by seek.
-   * With bloomfilter and fast storage, a miss on one level
-   * is very cheap if the file handle is cached in table cache
-   * (which is true if max_open_files is large).
-   * Default: true
-   *
-   * @param disableSeekCompaction a boolean value to specify whether
-   *     to disable seek compaction.
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options setDisableSeekCompaction(boolean disableSeekCompaction) {
-    assert(isInitialized());
-    setDisableSeekCompaction(nativeHandle_, disableSeekCompaction);
-    return this;
-  }
-
-  /*
-   * Returns true if disable seek compaction is set to true.
-   *
-   * @return true if disable seek compaction is set to true.
-   * @see setDisableSeekCompaction()
-   */
-  public boolean disableSeekCompaction() {
-    assert(isInitialized());
-    return disableSeekCompaction(nativeHandle_);
-  }
-
-  /**
-   * Set the amount of cache in bytes that will be used by RocksDB.
-   * If cacheSize is non-positive, then cache will not be used.
-   *
-   * DEFAULT: 8M
-   */
-  public Options setCacheSize(long cacheSize) {
-    cacheSize_ = cacheSize;
-    return this;
-  }
-
-  /**
-   * @return the amount of cache in bytes that will be used by RocksDB.
-   */
-  public long cacheSize() {
-    return cacheSize_;
-  }
-
-  /**
-   * If true, an error will be thrown during RocksDB.open() if the
-   * database already exists.
-   *
-   * @return if true, an error is raised when the specified database
-   *    already exists before open.
-   */
-  public boolean errorIfExists() {
-    assert(isInitialized());
-    return errorIfExists(nativeHandle_);
-  }
-  private native boolean errorIfExists(long handle);
-
-  /**
-   * If true, an error will be thrown during RocksDB.open() if the
-   * database already exists.
-   * Default: false
-   *
-   * @param errorIfExists if true, an exception will be thrown
-   *     during RocksDB.open() if the database already exists.
-   * @return the reference to the current option.
-   * @see RocksDB.open()
-   */
-  public Options setErrorIfExists(boolean errorIfExists) {
-    assert(isInitialized());
-    setErrorIfExists(nativeHandle_, errorIfExists);
-    return this;
-  }
-  private native void setErrorIfExists(long handle, boolean errorIfExists);
-
-  /**
-   * If true, the implementation will do aggressive checking of the
-   * data it is processing and will stop early if it detects any
-   * errors.  This may have unforeseen ramifications: for example, a
-   * corruption of one DB entry may cause a large number of entries to
-   * become unreadable or for the entire DB to become unopenable.
-   * If any of the  writes to the database fails (Put, Delete, Merge, Write),
-   * the database will switch to read-only mode and fail all other
-   * Write operations.
-   *
-   * @return a boolean indicating whether paranoid-check is on.
-   */
-  public boolean paranoidChecks() {
-    assert(isInitialized());
-    return paranoidChecks(nativeHandle_);
-  }
-  private native boolean paranoidChecks(long handle);
-
-  /**
-   * If true, the implementation will do aggressive checking of the
-   * data it is processing and will stop early if it detects any
-   * errors.  This may have unforeseen ramifications: for example, a
-   * corruption of one DB entry may cause a large number of entries to
-   * become unreadable or for the entire DB to become unopenable.
-   * If any of the  writes to the database fails (Put, Delete, Merge, Write),
-   * the database will switch to read-only mode and fail all other
-   * Write operations.
-   * Default: true
-   *
-   * @param paranoidChecks a flag to indicate whether paranoid-check
-   *     is on.
-   * @return the reference to the current option.
-   */
-  public Options setParanoidChecks(boolean paranoidChecks) {
-    assert(isInitialized());
-    setParanoidChecks(nativeHandle_, paranoidChecks);
-    return this;
-  }
-  private native void setParanoidChecks(
-      long handle, boolean paranoidChecks);
-
-  /**
-   * Number of open files that can be used by the DB.  You may need to
-   * increase this if your database has a large working set. Value -1 means
-   * files opened are always kept open. You can estimate number of files based
-   * on target_file_size_base and target_file_size_multiplier for level-based
-   * compaction. For universal-style compaction, you can usually set it to -1.
-   *
-   * @return the maximum number of open files.
-   */
-  public int maxOpenFiles() {
-    assert(isInitialized());
-    return maxOpenFiles(nativeHandle_);
-  }
-  private native int maxOpenFiles(long handle);
-
-  /**
-   * Number of open files that can be used by the DB.  You may need to
-   * increase this if your database has a large working set. Value -1 means
-   * files opened are always kept open. You can estimate number of files based
-   * on target_file_size_base and target_file_size_multiplier for level-based
-   * compaction. For universal-style compaction, you can usually set it to -1.
-   * Default: 5000
-   *
-   * @param maxOpenFiles the maximum number of open files.
-   * @return the reference to the current option.
-   */
-  public Options setMaxOpenFiles(int maxOpenFiles) {
-    assert(isInitialized());
-    setMaxOpenFiles(nativeHandle_, maxOpenFiles);
-    return this;
-  }
-  private native void setMaxOpenFiles(long handle, int maxOpenFiles);
-
-  /**
-   * If true, then the contents of data files are not synced
-   * to stable storage. Their contents remain in the OS buffers till the
-   * OS decides to flush them. This option is good for bulk-loading
-   * of data. Once the bulk-loading is complete, please issue a
-   * sync to the OS to flush all dirty buffesrs to stable storage.
-   *
-   * @return if true, then data-sync is disabled.
-   */
-  public boolean disableDataSync() {
-    assert(isInitialized());
-    return disableDataSync(nativeHandle_);
-  }
-  private native boolean disableDataSync(long handle);
-
-  /**
-   * If true, then the contents of data files are not synced
-   * to stable storage. Their contents remain in the OS buffers till the
-   * OS decides to flush them. This option is good for bulk-loading
-   * of data. Once the bulk-loading is complete, please issue a
-   * sync to the OS to flush all dirty buffesrs to stable storage.
-   * Default: false
-   *
-   * @param disableDataSync a boolean flag to specify whether to
-   *     disable data sync.
-   * @return the reference to the current option.
-   */
-  public Options setDisableDataSync(boolean disableDataSync) {
-    assert(isInitialized());
-    setDisableDataSync(nativeHandle_, disableDataSync);
-    return this;
-  }
-  private native void setDisableDataSync(long handle, boolean disableDataSync);
-
-  /**
-   * If true, then every store to stable storage will issue a fsync.
-   * If false, then every store to stable storage will issue a fdatasync.
-   * This parameter should be set to true while storing data to
-   * filesystem like ext3 that can lose files after a reboot.
-   *
-   * @return true if fsync is used.
-   */
-  public boolean useFsync() {
-    assert(isInitialized());
-    return useFsync(nativeHandle_);
-  }
-  private native boolean useFsync(long handle);
-
-  /**
-   * If true, then every store to stable storage will issue a fsync.
-   * If false, then every store to stable storage will issue a fdatasync.
-   * This parameter should be set to true while storing data to
-   * filesystem like ext3 that can lose files after a reboot.
-   * Default: false
-   *
-   * @param useFsync a boolean flag to specify whether to use fsync
-   * @return the reference to the current option.
-   */
-  public Options setUseFsync(boolean useFsync) {
-    assert(isInitialized());
-    setUseFsync(nativeHandle_, useFsync);
-    return this;
-  }
-  private native void setUseFsync(long handle, boolean useFsync);
-
-  /**
-   * The time interval in seconds between each two consecutive stats logs.
-   * This number controls how often a new scribe log about
-   * db deploy stats is written out.
-   * -1 indicates no logging at all.
-   *
-   * @return the time interval in seconds between each two consecutive
-   *     stats logs.
-   */
-  public int dbStatsLogInterval() {
-    assert(isInitialized());
-    return dbStatsLogInterval(nativeHandle_);
-  }
-  private native int dbStatsLogInterval(long handle);
-
-  /**
-   * The time interval in seconds between each two consecutive stats logs.
-   * This number controls how often a new scribe log about
-   * db deploy stats is written out.
-   * -1 indicates no logging at all.
-   * Default value is 1800 (half an hour).
-   *
-   * @param dbStatsLogInterval the time interval in seconds between each
-   *     two consecutive stats logs.
-   * @return the reference to the current option.
-   */
-  public Options setDbStatsLogInterval(int dbStatsLogInterval) {
-    assert(isInitialized());
-    setDbStatsLogInterval(nativeHandle_, dbStatsLogInterval);
-    return this;
-  }
-  private native void setDbStatsLogInterval(
-      long handle, int dbStatsLogInterval);
-
-  /**
-   * Returns the directory of info log.
-   *
-   * If it is empty, the log files will be in the same dir as data.
-   * If it is non empty, the log files will be in the specified dir,
-   * and the db data dir's absolute path will be used as the log file
-   * name's prefix.
-   *
-   * @return the path to the info log directory
-   */
-  public String dbLogDir() {
-    assert(isInitialized());
-    return dbLogDir(nativeHandle_);
-  }
-  private native String dbLogDir(long handle);
-
-  /**
-   * This specifies the info LOG dir.
-   * If it is empty, the log files will be in the same dir as data.
-   * If it is non empty, the log files will be in the specified dir,
-   * and the db data dir's absolute path will be used as the log file
-   * name's prefix.
-   *
-   * @param dbLogDir the path to the info log directory
-   * @return the reference to the current option.
-   */
-  public Options setDbLogDir(String dbLogDir) {
-    assert(isInitialized());
-    setDbLogDir(nativeHandle_, dbLogDir);
-    return this;
-  }
-  private native void setDbLogDir(long handle, String dbLogDir);
-
-  /**
-   * Returns the path to the write-ahead-logs (WAL) directory.
-   *
-   * If it is empty, the log files will be in the same dir as data,
-   *   dbname is used as the data dir by default
-   * If it is non empty, the log files will be in kept the specified dir.
-   * When destroying the db,
-   *   all log files in wal_dir and the dir itself is deleted
-   *
-   * @return the path to the write-ahead-logs (WAL) directory.
-   */
-  public String walDir() {
-    assert(isInitialized());
-    return walDir(nativeHandle_);
-  }
-  private native String walDir(long handle);
-
-  /**
-   * This specifies the absolute dir path for write-ahead logs (WAL).
-   * If it is empty, the log files will be in the same dir as data,
-   *   dbname is used as the data dir by default
-   * If it is non empty, the log files will be in kept the specified dir.
-   * When destroying the db,
-   *   all log files in wal_dir and the dir itself is deleted
-   *
-   * @param walDir the path to the write-ahead-log directory.
-   * @return the reference to the current option.
-   */
-  public Options setWalDir(String walDir) {
-    assert(isInitialized());
-    setWalDir(nativeHandle_, walDir);
-    return this;
-  }
-  private native void setWalDir(long handle, String walDir);
-
-  /**
-   * The periodicity when obsolete files get deleted. The default
-   * value is 6 hours. The files that get out of scope by compaction
-   * process will still get automatically delete on every compaction,
-   * regardless of this setting
-   *
-   * @return the time interval in micros when obsolete files will be deleted.
-   */
-  public long deleteObsoleteFilesPeriodMicros() {
-    assert(isInitialized());
-    return deleteObsoleteFilesPeriodMicros(nativeHandle_);
-  }
-  private native long deleteObsoleteFilesPeriodMicros(long handle);
-
-  /**
-   * The periodicity when obsolete files get deleted. The default
-   * value is 6 hours. The files that get out of scope by compaction
-   * process will still get automatically delete on every compaction,
-   * regardless of this setting
-   *
-   * @param micros the time interval in micros
-   * @return the reference to the current option.
-   */
-  public Options setDeleteObsoleteFilesPeriodMicros(long micros) {
-    assert(isInitialized());
-    setDeleteObsoleteFilesPeriodMicros(nativeHandle_, micros);
-    return this;
-  }
-  private native void setDeleteObsoleteFilesPeriodMicros(
-      long handle, long micros);
-
-  /**
-   * Returns the maximum number of concurrent background compaction jobs,
-   * submitted to the default LOW priority thread pool.
-   * When increasing this number, we may also want to consider increasing
-   * number of threads in LOW priority thread pool.
-   * Default: 1
-   *
-   * @return the maximum number of concurrent background compaction jobs.
-   * @see Env.setBackgroundThreads()
-   */
-  public int maxBackgroundCompactions() {
-    assert(isInitialized());
-    return maxBackgroundCompactions(nativeHandle_);
-  }
-
-  /**
-   * Creates statistics object which collects metrics about database operations.
-     Statistics objects should not be shared between DB instances as
-     it does not use any locks to prevent concurrent updates.
-   *
-   * @return the instance of the current Options.
-   * @see RocksDB.open()
-   */
-  public Options createStatistics() {
-    assert(isInitialized());
-    createStatistics(nativeHandle_);
-    return this;
-  }
-
-  /**
-   * Returns statistics object. Calls createStatistics() if
-   * C++ returns NULL pointer for statistics.
-   *
-   * @return the instance of the statistics object.
-   * @see createStatistics()
-   */
-  public Statistics statisticsPtr() {
-    assert(isInitialized());
-
-    long statsPtr = statisticsPtr(nativeHandle_);
-    if(statsPtr == 0) {
-      createStatistics();
-      statsPtr = statisticsPtr(nativeHandle_);
-    }
-
-    return new Statistics(statsPtr);
-  }
-
-  /**
-   * Specifies the maximum number of concurrent background compaction jobs,
-   * submitted to the default LOW priority thread pool.
-   * If you're increasing this, also consider increasing number of threads in
-   * LOW priority thread pool. For more information, see
-   * Default: 1
-   *
-   * @param maxBackgroundCompactions the maximum number of background
-   *     compaction jobs.
-   * @return the reference to the current option.
-   *
-   * @see Env.setBackgroundThreads()
-   * @see maxBackgroundFlushes()
-   */
-  public Options setMaxBackgroundCompactions(int maxBackgroundCompactions) {
-    assert(isInitialized());
-    setMaxBackgroundCompactions(nativeHandle_, maxBackgroundCompactions);
-    return this;
-  }
-
-  /**
-   * Returns the maximum number of concurrent background flush jobs.
-   * If you're increasing this, also consider increasing number of threads in
-   * HIGH priority thread pool. For more information, see
-   * Default: 1
-   *
-   * @return the maximum number of concurrent background flush jobs.
-   * @see Env.setBackgroundThreads()
-   */
-  public int maxBackgroundFlushes() {
-    assert(isInitialized());
-    return maxBackgroundFlushes(nativeHandle_);
-  }
-  private native int maxBackgroundFlushes(long handle);
-
-  /**
-   * Specifies the maximum number of concurrent background flush jobs.
-   * If you're increasing this, also consider increasing number of threads in
-   * HIGH priority thread pool. For more information, see
-   * Default: 1
-   *
-   * @param maxBackgroundFlushes
-   * @return the reference to the current option.
-   *
-   * @see Env.setBackgroundThreads()
-   * @see maxBackgroundCompactions()
-   */
-  public Options setMaxBackgroundFlushes(int maxBackgroundFlushes) {
-    assert(isInitialized());
-    setMaxBackgroundFlushes(nativeHandle_, maxBackgroundFlushes);
-    return this;
-  }
-  private native void setMaxBackgroundFlushes(
-      long handle, int maxBackgroundFlushes);
-
-  /**
-   * Returns the maximum size of a info log file. If the current log file
-   * is larger than this size, a new info log file will be created.
-   * If 0, all logs will be written to one log file.
-   *
-   * @return the maximum size of the info log file.
-   */
-  public long maxLogFileSize() {
-    assert(isInitialized());
-    return maxLogFileSize(nativeHandle_);
-  }
-  private native long maxLogFileSize(long handle);
-
-  /**
-   * Specifies the maximum size of a info log file. If the current log file
-   * is larger than `max_log_file_size`, a new info log file will
-   * be created.
-   * If 0, all logs will be written to one log file.
-   *
-   * @param maxLogFileSize the maximum size of a info log file.
-   * @return the reference to the current option.
-   */
-  public Options setMaxLogFileSize(long maxLogFileSize) {
-    assert(isInitialized());
-    setMaxLogFileSize(nativeHandle_, maxLogFileSize);
-    return this;
-  }
-  private native void setMaxLogFileSize(long handle, long maxLogFileSize);
-
-  /**
-   * Returns the time interval for the info log file to roll (in seconds).
-   * If specified with non-zero value, log file will be rolled
-   * if it has been active longer than `log_file_time_to_roll`.
-   * Default: 0 (disabled)
-   *
-   * @return the time interval in seconds.
-   */
-  public long logFileTimeToRoll() {
-    assert(isInitialized());
-    return logFileTimeToRoll(nativeHandle_);
-  }
-  private native long logFileTimeToRoll(long handle);
-
-  /**
-   * Specifies the time interval for the info log file to roll (in seconds).
-   * If specified with non-zero value, log file will be rolled
-   * if it has been active longer than `log_file_time_to_roll`.
-   * Default: 0 (disabled)
-   *
-   * @param logFileTimeToRoll the time interval in seconds.
-   * @return the reference to the current option.
-   */
-  public Options setLogFileTimeToRoll(long logFileTimeToRoll) {
-    assert(isInitialized());
-    setLogFileTimeToRoll(nativeHandle_, logFileTimeToRoll);
-    return this;
-  }
-  private native void setLogFileTimeToRoll(
-      long handle, long logFileTimeToRoll);
-
-  /**
-   * Returns the maximum number of info log files to be kept.
-   * Default: 1000
-   *
-   * @return the maximum number of info log files to be kept.
-   */
-  public long keepLogFileNum() {
-    assert(isInitialized());
-    return keepLogFileNum(nativeHandle_);
-  }
-  private native long keepLogFileNum(long handle);
-
-  /**
-   * Specifies the maximum number of info log files to be kept.
-   * Default: 1000
-   *
-   * @param keepLogFileNum the maximum number of info log files to be kept.
-   * @return the reference to the current option.
-   */
-  public Options setKeepLogFileNum(long keepLogFileNum) {
-    assert(isInitialized());
-    setKeepLogFileNum(nativeHandle_, keepLogFileNum);
-    return this;
-  }
-  private native void setKeepLogFileNum(long handle, long keepLogFileNum);
-
-  /**
-   * Manifest file is rolled over on reaching this limit.
-   * The older manifest file be deleted.
-   * The default value is MAX_INT so that roll-over does not take place.
-   *
-   * @return the size limit of a manifest file.
-   */
-  public long maxManifestFileSize() {
-    assert(isInitialized());
-    return maxManifestFileSize(nativeHandle_);
-  }
-  private native long maxManifestFileSize(long handle);
-
-  /**
-   * Manifest file is rolled over on reaching this limit.
-   * The older manifest file be deleted.
-   * The default value is MAX_INT so that roll-over does not take place.
-   *
-   * @param maxManifestFileSize the size limit of a manifest file.
-   * @return the reference to the current option.
-   */
-  public Options setMaxManifestFileSize(long maxManifestFileSize) {
-    assert(isInitialized());
-    setMaxManifestFileSize(nativeHandle_, maxManifestFileSize);
-    return this;
-  }
-  private native void setMaxManifestFileSize(
-      long handle, long maxManifestFileSize);
-
-  /**
-   * Number of shards used for table cache.
-   *
-   * @return the number of shards used for table cache.
-   */
-  public int tableCacheNumshardbits() {
-    assert(isInitialized());
-    return tableCacheNumshardbits(nativeHandle_);
-  }
-  private native int tableCacheNumshardbits(long handle);
-
-  /**
-   * Number of shards used for table cache.
-   *
-   * @param tableCacheNumshardbits the number of chards
-   * @return the reference to the current option.
-   */
-  public Options setTableCacheNumshardbits(int tableCacheNumshardbits) {
-    assert(isInitialized());
-    setTableCacheNumshardbits(nativeHandle_, tableCacheNumshardbits);
-    return this;
-  }
-  private native void setTableCacheNumshardbits(
-      long handle, int tableCacheNumshardbits);
-
-  /**
-   * During data eviction of table's LRU cache, it would be inefficient
-   * to strictly follow LRU because this piece of memory will not really
-   * be released unless its refcount falls to zero. Instead, make two
-   * passes: the first pass will release items with refcount = 1,
-   * and if not enough space releases after scanning the number of
-   * elements specified by this parameter, we will remove items in LRU
-   * order.
-   *
-   * @return scan count limit
-   */
-  public int tableCacheRemoveScanCountLimit() {
-    assert(isInitialized());
-    return tableCacheRemoveScanCountLimit(nativeHandle_);
-  }
-  private native int tableCacheRemoveScanCountLimit(long handle);
-
-  /**
-   * During data eviction of table's LRU cache, it would be inefficient
-   * to strictly follow LRU because this piece of memory will not really
-   * be released unless its refcount falls to zero. Instead, make two
-   * passes: the first pass will release items with refcount = 1,
-   * and if not enough space releases after scanning the number of
-   * elements specified by this parameter, we will remove items in LRU
-   * order.
-   *
-   * @param limit scan count limit
-   * @return the reference to the current option.
-   */
-  public Options setTableCacheRemoveScanCountLimit(int limit) {
-    assert(isInitialized());
-    setTableCacheRemoveScanCountLimit(nativeHandle_, limit);
-    return this;
-  }
-  private native void setTableCacheRemoveScanCountLimit(
-      long handle, int limit);
-
-  /**
-   * WalTtlSeconds() and walSizeLimitMB() affect how archived logs
-   * will be deleted.
-   * 1. If both set to 0, logs will be deleted asap and will not get into
-   *    the archive.
-   * 2. If WAL_ttl_seconds is 0 and WAL_size_limit_MB is not 0,
-   *    WAL files will be checked every 10 min and if total size is greater
-   *    then WAL_size_limit_MB, they will be deleted starting with the
-   *    earliest until size_limit is met. All empty files will be deleted.
-   * 3. If WAL_ttl_seconds is not 0 and WAL_size_limit_MB is 0, then
-   *    WAL files will be checked every WAL_ttl_secondsi / 2 and those that
-   *    are older than WAL_ttl_seconds will be deleted.
-   * 4. If both are not 0, WAL files will be checked every 10 min and both
-   *    checks will be performed with ttl being first.
-   *
-   * @return the wal-ttl seconds
-   * @see walSizeLimitMB()
-   */
-  public long walTtlSeconds() {
-    assert(isInitialized());
-    return walTtlSeconds(nativeHandle_);
-  }
-  private native long walTtlSeconds(long handle);
-
-  /**
-   * WalTtlSeconds() and walSizeLimitMB() affect how archived logs
-   * will be deleted.
-   * 1. If both set to 0, logs will be deleted asap and will not get into
-   *    the archive.
-   * 2. If WAL_ttl_seconds is 0 and WAL_size_limit_MB is not 0,
-   *    WAL files will be checked every 10 min and if total size is greater
-   *    then WAL_size_limit_MB, they will be deleted starting with the
-   *    earliest until size_limit is met. All empty files will be deleted.
-   * 3. If WAL_ttl_seconds is not 0 and WAL_size_limit_MB is 0, then
-   *    WAL files will be checked every WAL_ttl_secondsi / 2 and those that
-   *    are older than WAL_ttl_seconds will be deleted.
-   * 4. If both are not 0, WAL files will be checked every 10 min and both
-   *    checks will be performed with ttl being first.
-   *
-   * @param walTtlSeconds the ttl seconds
-   * @return the reference to the current option.
-   * @see setWalSizeLimitMB()
-   */
-  public Options setWalTtlSeconds(long walTtlSeconds) {
-    assert(isInitialized());
-    setWalTtlSeconds(nativeHandle_, walTtlSeconds);
-    return this;
-  }
-  private native void setWalTtlSeconds(long handle, long walTtlSeconds);
-
-  /**
-   * WalTtlSeconds() and walSizeLimitMB() affect how archived logs
-   * will be deleted.
-   * 1. If both set to 0, logs will be deleted asap and will not get into
-   *    the archive.
-   * 2. If WAL_ttl_seconds is 0 and WAL_size_limit_MB is not 0,
-   *    WAL files will be checked every 10 min and if total size is greater
-   *    then WAL_size_limit_MB, they will be deleted starting with the
-   *    earliest until size_limit is met. All empty files will be deleted.
-   * 3. If WAL_ttl_seconds is not 0 and WAL_size_limit_MB is 0, then
-   *    WAL files will be checked every WAL_ttl_secondsi / 2 and those that
-   *    are older than WAL_ttl_seconds will be deleted.
-   * 4. If both are not 0, WAL files will be checked every 10 min and both
-   *    checks will be performed with ttl being first.
-   *
-   * @return size limit in mega-bytes.
-   * @see walSizeLimitMB()
-   */
-  public long walSizeLimitMB() {
-    assert(isInitialized());
-    return walSizeLimitMB(nativeHandle_);
-  }
-  private native long walSizeLimitMB(long handle);
-
-  /**
-   * WalTtlSeconds() and walSizeLimitMB() affect how archived logs
-   * will be deleted.
-   * 1. If both set to 0, logs will be deleted asap and will not get into
-   *    the archive.
-   * 2. If WAL_ttl_seconds is 0 and WAL_size_limit_MB is not 0,
-   *    WAL files will be checked every 10 min and if total size is greater
-   *    then WAL_size_limit_MB, they will be deleted starting with the
-   *    earliest until size_limit is met. All empty files will be deleted.
-   * 3. If WAL_ttl_seconds is not 0 and WAL_size_limit_MB is 0, then
-   *    WAL files will be checked every WAL_ttl_secondsi / 2 and those that
-   *    are older than WAL_ttl_seconds will be deleted.
-   * 4. If both are not 0, WAL files will be checked every 10 min and both
-   *    checks will be performed with ttl being first.
-   *
-   * @param sizeLimitMB size limit in mega-bytes.
-   * @return the reference to the current option.
-   * @see setWalSizeLimitMB()
-   */
-  public Options setWalSizeLimitMB(long sizeLimitMB) {
-    assert(isInitialized());
-    setWalSizeLimitMB(nativeHandle_, sizeLimitMB);
-    return this;
-  }
-  private native void setWalSizeLimitMB(long handle, long sizeLimitMB);
-
-  /**
-   * Number of bytes to preallocate (via fallocate) the manifest
-   * files.  Default is 4mb, which is reasonable to reduce random IO
-   * as well as prevent overallocation for mounts that preallocate
-   * large amounts of data (such as xfs's allocsize option).
-   *
-   * @return size in bytes.
-   */
-  public long manifestPreallocationSize() {
-    assert(isInitialized());
-    return manifestPreallocationSize(nativeHandle_);
-  }
-  private native long manifestPreallocationSize(long handle);
-
-  /**
-   * Number of bytes to preallocate (via fallocate) the manifest
-   * files.  Default is 4mb, which is reasonable to reduce random IO
-   * as well as prevent overallocation for mounts that preallocate
-   * large amounts of data (such as xfs's allocsize option).
-   *
-   * @param size the size in byte
-   * @return the reference to the current option.
-   */
-  public Options setManifestPreallocationSize(long size) {
-    assert(isInitialized());
-    setManifestPreallocationSize(nativeHandle_, size);
-    return this;
-  }
-  private native void setManifestPreallocationSize(
-      long handle, long size);
-
-  /**
-   * Data being read from file storage may be buffered in the OS
-   * Default: true
-   *
-   * @return if true, then OS buffering is allowed.
-   */
-  public boolean allowOsBuffer() {
-    assert(isInitialized());
-    return allowOsBuffer(nativeHandle_);
-  }
-  private native boolean allowOsBuffer(long handle);
-
-  /**
-   * Data being read from file storage may be buffered in the OS
-   * Default: true
-   *
-   * @param allowOsBufferif true, then OS buffering is allowed.
-   * @return the reference to the current option.
-   */
-  public Options setAllowOsBuffer(boolean allowOsBuffer) {
-    assert(isInitialized());
-    setAllowOsBuffer(nativeHandle_, allowOsBuffer);
-    return this;
-  }
-  private native void setAllowOsBuffer(
-      long handle, boolean allowOsBuffer);
-
-  /**
-   * Allow the OS to mmap file for reading sst tables.
-   * Default: false
-   *
-   * @return true if mmap reads are allowed.
-   */
-  public boolean allowMmapReads() {
-    assert(isInitialized());
-    return allowMmapReads(nativeHandle_);
-  }
-  private native boolean allowMmapReads(long handle);
-
-  /**
-   * Allow the OS to mmap file for reading sst tables.
-   * Default: false
-   *
-   * @param allowMmapReads true if mmap reads are allowed.
-   * @return the reference to the current option.
-   */
-  public Options setAllowMmapReads(boolean allowMmapReads) {
-    assert(isInitialized());
-    setAllowMmapReads(nativeHandle_, allowMmapReads);
-    return this;
-  }
-  private native void setAllowMmapReads(
-      long handle, boolean allowMmapReads);
-
-  /**
-   * Allow the OS to mmap file for writing. Default: false
-   *
-   * @return true if mmap writes are allowed.
-   */
-  public boolean allowMmapWrites() {
-    assert(isInitialized());
-    return allowMmapWrites(nativeHandle_);
-  }
-  private native boolean allowMmapWrites(long handle);
-
-  /**
-   * Allow the OS to mmap file for writing. Default: false
-   *
-   * @param allowMmapWrites true if mmap writes are allowd.
-   * @return the reference to the current option.
-   */
-  public Options setAllowMmapWrites(boolean allowMmapWrites) {
-    assert(isInitialized());
-    setAllowMmapWrites(nativeHandle_, allowMmapWrites);
-    return this;
-  }
-  private native void setAllowMmapWrites(
-      long handle, boolean allowMmapWrites);
-
-  /**
-   * Disable child process inherit open files. Default: true
-   *
-   * @return true if child process inheriting open files is disabled.
-   */
-  public boolean isFdCloseOnExec() {
-    assert(isInitialized());
-    return isFdCloseOnExec(nativeHandle_);
-  }
-  private native boolean isFdCloseOnExec(long handle);
-
-  /**
-   * Disable child process inherit open files. Default: true
-   *
-   * @param isFdCloseOnExec true if child process inheriting open
-   *     files is disabled.
-   * @return the reference to the current option.
-   */
-  public Options setIsFdCloseOnExec(boolean isFdCloseOnExec) {
-    assert(isInitialized());
-    setIsFdCloseOnExec(nativeHandle_, isFdCloseOnExec);
-    return this;
-  }
-  private native void setIsFdCloseOnExec(
-      long handle, boolean isFdCloseOnExec);
-
-  /**
-   * Skip log corruption error on recovery (If client is ok with
-   * losing most recent changes)
-   * Default: false
-   *
-   * @return true if log corruption errors are skipped during recovery.
-   */
-  public boolean skipLogErrorOnRecovery() {
-    assert(isInitialized());
-    return skipLogErrorOnRecovery(nativeHandle_);
-  }
-  private native boolean skipLogErrorOnRecovery(long handle);
-
-  /**
-   * Skip log corruption error on recovery (If client is ok with
-   * losing most recent changes)
-   * Default: false
-   *
-   * @param skip true if log corruption errors are skipped during recovery.
-   * @return the reference to the current option.
-   */
-  public Options setSkipLogErrorOnRecovery(boolean skip) {
-    assert(isInitialized());
-    setSkipLogErrorOnRecovery(nativeHandle_, skip);
-    return this;
-  }
-  private native void setSkipLogErrorOnRecovery(
-      long handle, boolean skip);
-
-  /**
-   * If not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
-   * Default: 3600 (1 hour)
-   *
-   * @return time interval in seconds.
-   */
-  public int statsDumpPeriodSec() {
-    assert(isInitialized());
-    return statsDumpPeriodSec(nativeHandle_);
-  }
-  private native int statsDumpPeriodSec(long handle);
-
-  /**
-   * if not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
-   * Default: 3600 (1 hour)
-   *
-   * @param statsDumpPeriodSec time interval in seconds.
-   * @return the reference to the current option.
-   */
-  public Options setStatsDumpPeriodSec(int statsDumpPeriodSec) {
-    assert(isInitialized());
-    setStatsDumpPeriodSec(nativeHandle_, statsDumpPeriodSec);
-    return this;
-  }
-  private native void setStatsDumpPeriodSec(
-      long handle, int statsDumpPeriodSec);
-
-  /**
-   * If set true, will hint the underlying file system that the file
-   * access pattern is random, when a sst file is opened.
-   * Default: true
-   *
-   * @return true if hinting random access is on.
-   */
-  public boolean adviseRandomOnOpen() {
-    return adviseRandomOnOpen(nativeHandle_);
-  }
-  private native boolean adviseRandomOnOpen(long handle);
-
-  /**
-   * If set true, will hint the underlying file system that the file
-   * access pattern is random, when a sst file is opened.
-   * Default: true
-   *
-   * @param adviseRandomOnOpen true if hinting random access is on.
-   * @return the reference to the current option.
-   */
-  public Options setAdviseRandomOnOpen(boolean adviseRandomOnOpen) {
-    assert(isInitialized());
-    setAdviseRandomOnOpen(nativeHandle_, adviseRandomOnOpen);
-    return this;
-  }
-  private native void setAdviseRandomOnOpen(
-      long handle, boolean adviseRandomOnOpen);
-
-  /**
-   * Use adaptive mutex, which spins in the user space before resorting
-   * to kernel. This could reduce context switch when the mutex is not
-   * heavily contended. However, if the mutex is hot, we could end up
-   * wasting spin time.
-   * Default: false
-   *
-   * @return true if adaptive mutex is used.
-   */
-  public boolean useAdaptiveMutex() {
-    assert(isInitialized());
-    return useAdaptiveMutex(nativeHandle_);
-  }
-  private native boolean useAdaptiveMutex(long handle);
-
-  /**
-   * Use adaptive mutex, which spins in the user space before resorting
-   * to kernel. This could reduce context switch when the mutex is not
-   * heavily contended. However, if the mutex is hot, we could end up
-   * wasting spin time.
-   * Default: false
-   *
-   * @param useAdaptiveMutex true if adaptive mutex is used.
-   * @return the reference to the current option.
-   */
-  public Options setUseAdaptiveMutex(boolean useAdaptiveMutex) {
-    assert(isInitialized());
-    setUseAdaptiveMutex(nativeHandle_, useAdaptiveMutex);
-    return this;
-  }
-  private native void setUseAdaptiveMutex(
-      long handle, boolean useAdaptiveMutex);
-
-  /**
-   * Allows OS to incrementally sync files to disk while they are being
-   * written, asynchronously, in the background.
-   * Issue one request for every bytes_per_sync written. 0 turns it off.
-   * Default: 0
-   *
-   * @return size in bytes
-   */
-  public long bytesPerSync() {
-    return bytesPerSync(nativeHandle_);
-  }
-  private native long bytesPerSync(long handle);
-
-  /**
-   * Allows OS to incrementally sync files to disk while they are being
-   * written, asynchronously, in the background.
-   * Issue one request for every bytes_per_sync written. 0 turns it off.
-   * Default: 0
-   *
-   * @param bytesPerSync size in bytes
-   * @return the reference to the current option.
-   */
-  public Options setBytesPerSync(long bytesPerSync) {
-    assert(isInitialized());
-    setBytesPerSync(nativeHandle_, bytesPerSync);
-    return this;
-  }
-  private native void setBytesPerSync(
-      long handle, long bytesPerSync);
-
-  /**
-   * Allow RocksDB to use thread local storage to optimize performance.
-   * Default: true
-   *
-   * @return true if thread-local storage is allowed
-   */
-  public boolean allowThreadLocal() {
-    assert(isInitialized());
-    return allowThreadLocal(nativeHandle_);
-  }
-  private native boolean allowThreadLocal(long handle);
-
-  /**
-   * Allow RocksDB to use thread local storage to optimize performance.
-   * Default: true
-   *
-   * @param allowThreadLocal true if thread-local storage is allowed.
-   * @return the reference to the current option.
-   */
-  public Options setAllowThreadLocal(boolean allowThreadLocal) {
-    assert(isInitialized());
-    setAllowThreadLocal(nativeHandle_, allowThreadLocal);
-    return this;
-  }
-  private native void setAllowThreadLocal(
-      long handle, boolean allowThreadLocal);
-
-  /**
-   * Set the config for mem-table.
-   *
-   * @param config the mem-table config.
-   * @return the instance of the current Options.
-   */
-  public Options setMemTableConfig(MemTableConfig config) {
-    setMemTableFactory(nativeHandle_, config.newMemTableFactoryHandle());
-    return this;
-  }
-
-  /**
-   * Returns the name of the current mem table representation.
-   * Memtable format can be set using setTableFormatConfig.
-   *
-   * @return the name of the currently-used memtable factory.
-   * @see setTableFormatConfig()
-   */
-  public String memTableFactoryName() {
-    assert(isInitialized());
-    return memTableFactoryName(nativeHandle_);
-  }
-
-  /**
-   * Set the config for table format.
-   *
-   * @param config the table format config.
-   * @return the reference of the current Options.
-   */
-  public Options setTableFormatConfig(TableFormatConfig config) {
-    setTableFactory(nativeHandle_, config.newTableFactoryHandle());
-    return this;
-  }
-
-  /**
-   * @return the name of the currently used table factory.
-   */
-  public String tableFactoryName() {
-    assert(isInitialized());
-    return tableFactoryName(nativeHandle_);
-  }
-
-  /**
-   * This prefix-extractor uses the first n bytes of a key as its prefix.
-   *
-   * In some hash-based memtable representation such as HashLinkedList
-   * and HashSkipList, prefixes are used to partition the keys into
-   * several buckets.  Prefix extractor is used to specify how to
-   * extract the prefix given a key.
-   *
-   * @param n use the first n bytes of a key as its prefix.
-   */
-  public Options useFixedLengthPrefixExtractor(int n) {
-    assert(isInitialized());
-    useFixedLengthPrefixExtractor(nativeHandle_, n);
-    return this;
-  }
-
-///////////////////////////////////////////////////////////////////////
-  /**
-   * Number of keys between restart points for delta encoding of keys.
-   * This parameter can be changed dynamically.  Most clients should
-   * leave this parameter alone.
-   * Default: 16
-   *
-   * @return the number of keys between restart points.
-   */
-  public int blockRestartInterval() {
-    return blockRestartInterval(nativeHandle_);
-  }
-  private native int blockRestartInterval(long handle);
-
-  /**
-   * Number of keys between restart points for delta encoding of keys.
-   * This parameter can be changed dynamically.  Most clients should
-   * leave this parameter alone.
-   * Default: 16
-   *
-   * @param blockRestartInterval the number of keys between restart points.
-   * @return the reference to the current option.
-   */
-  public Options setBlockRestartInterval(int blockRestartInterval) {
-    setBlockRestartInterval(nativeHandle_, blockRestartInterval);
-    return this;
-  }
-  private native void setBlockRestartInterval(
-      long handle, int blockRestartInterval);
-
-  /**
-   * If true, place whole keys in the filter (not just prefixes).
-   * This must generally be true for gets to be efficient.
-   * Default: true
-   *
-   * @return if true, then whole-key-filtering is on.
-   */
-  public boolean wholeKeyFiltering() {
-    return wholeKeyFiltering(nativeHandle_);
-  }
-  private native boolean wholeKeyFiltering(long handle);
-
-  /**
-   * If true, place whole keys in the filter (not just prefixes).
-   * This must generally be true for gets to be efficient.
-   * Default: true
-   *
-   * @param wholeKeyFiltering if true, then whole-key-filtering is on.
-   * @return the reference to the current option.
-   */
-  public Options setWholeKeyFiltering(boolean wholeKeyFiltering) {
-    setWholeKeyFiltering(nativeHandle_, wholeKeyFiltering);
-    return this;
-  }
-  private native void setWholeKeyFiltering(
-      long handle, boolean wholeKeyFiltering);
-
-  /**
-   * If level-styled compaction is used, then this number determines
-   * the total number of levels.
-   *
-   * @return the number of levels.
-   */
-  public int numLevels() {
-    return numLevels(nativeHandle_);
-  }
-  private native int numLevels(long handle);
-
-  /**
-   * Set the number of levels for this database
-   * If level-styled compaction is used, then this number determines
-   * the total number of levels.
-   *
-   * @param numLevels the number of levels.
-   * @return the reference to the current option.
-   */
-  public Options setNumLevels(int numLevels) {
-    setNumLevels(nativeHandle_, numLevels);
-    return this;
-  }
-  private native void setNumLevels(
-      long handle, int numLevels);
-
-  /**
-   * The number of files in leve 0 to trigger compaction from level-0 to
-   * level-1.  A value < 0 means that level-0 compaction will not be
-   * triggered by number of files at all.
-   * Default: 4
-   *
-   * @return the number of files in level 0 to trigger compaction.
-   */
-  public int levelZeroFileNumCompactionTrigger() {
-    return levelZeroFileNumCompactionTrigger(nativeHandle_);
-  }
-  private native int levelZeroFileNumCompactionTrigger(long handle);
-
-  /**
-   * Number of files to trigger level-0 compaction. A value <0 means that
-   * level-0 compaction will not be triggered by number of files at all.
-   * Default: 4
-   *
-   * @param numFiles the number of files in level-0 to trigger compaction.
-   * @return the reference to the current option.
-   */
-  public Options setLevelZeroFileNumCompactionTrigger(
-      int numFiles) {
-    setLevelZeroFileNumCompactionTrigger(
-        nativeHandle_, numFiles);
-    return this;
-  }
-  private native void setLevelZeroFileNumCompactionTrigger(
-      long handle, int numFiles);
-
-  /**
-   * Soft limit on the number of level-0 files. We start slowing down writes
-   * at this point. A value < 0 means that no writing slow down will be
-   * triggered by number of files in level-0.
-   *
-   * @return the soft limit on the number of level-0 files.
-   */
-  public int levelZeroSlowdownWritesTrigger() {
-    return levelZeroSlowdownWritesTrigger(nativeHandle_);
-  }
-  private native int levelZeroSlowdownWritesTrigger(long handle);
-
-  /**
-   * Soft limit on number of level-0 files. We start slowing down writes at this
-   * point. A value <0 means that no writing slow down will be triggered by
-   * number of files in level-0.
-   *
-   * @param numFiles soft limit on number of level-0 files.
-   * @return the reference to the current option.
-   */
-  public Options setLevelZeroSlowdownWritesTrigger(
-      int numFiles) {
-    setLevelZeroSlowdownWritesTrigger(nativeHandle_, numFiles);
-    return this;
-  }
-  private native void setLevelZeroSlowdownWritesTrigger(
-      long handle, int numFiles);
-
-  /**
-   * Maximum number of level-0 files.  We stop writes at this point.
-   *
-   * @return the hard limit of the number of level-0 file.
-   */
-  public int levelZeroStopWritesTrigger() {
-    return levelZeroStopWritesTrigger(nativeHandle_);
-  }
-  private native int levelZeroStopWritesTrigger(long handle);
-
-  /**
-   * Maximum number of level-0 files.  We stop writes at this point.
-   *
-   * @param numFiles the hard limit of the number of level-0 files.
-   * @return the reference to the current option.
-   */
-  public Options setLevelZeroStopWritesTrigger(int numFiles) {
-    setLevelZeroStopWritesTrigger(nativeHandle_, numFiles);
-    return this;
-  }
-  private native void setLevelZeroStopWritesTrigger(
-      long handle, int numFiles);
-
-  /**
-   * The highest level to which a new compacted memtable is pushed if it
-   * does not create overlap.  We try to push to level 2 to avoid the
-   * relatively expensive level 0=>1 compactions and to avoid some
-   * expensive manifest file operations.  We do not push all the way to
-   * the largest level since that can generate a lot of wasted disk
-   * space if the same key space is being repeatedly overwritten.
-   *
-   * @return the highest level where a new compacted memtable will be pushed.
-   */
-  public int maxMemCompactionLevel() {
-    return maxMemCompactionLevel(nativeHandle_);
-  }
-  private native int maxMemCompactionLevel(long handle);
-
-  /**
-   * The highest level to which a new compacted memtable is pushed if it
-   * does not create overlap.  We try to push to level 2 to avoid the
-   * relatively expensive level 0=>1 compactions and to avoid some
-   * expensive manifest file operations.  We do not push all the way to
-   * the largest level since that can generate a lot of wasted disk
-   * space if the same key space is being repeatedly overwritten.
-   *
-   * @param maxMemCompactionLevel the highest level to which a new compacted
-   *     mem-table will be pushed.
-   * @return the reference to the current option.
-   */
-  public Options setMaxMemCompactionLevel(int maxMemCompactionLevel) {
-    setMaxMemCompactionLevel(nativeHandle_, maxMemCompactionLevel);
-    return this;
-  }
-  private native void setMaxMemCompactionLevel(
-      long handle, int maxMemCompactionLevel);
-
-  /**
-   * The target file size for compaction.
-   * This targetFileSizeBase determines a level-1 file size.
-   * Target file size for level L can be calculated by
-   * targetFileSizeBase * (targetFileSizeMultiplier ^ (L-1))
-   * For example, if targetFileSizeBase is 2MB and
-   * target_file_size_multiplier is 10, then each file on level-1 will
-   * be 2MB, and each file on level 2 will be 20MB,
-   * and each file on level-3 will be 200MB.
-   * by default targetFileSizeBase is 2MB.
-   *
-   * @return the target size of a level-0 file.
-   *
-   * @see targetFileSizeMultiplier()
-   */
-  public int targetFileSizeBase() {
-    return targetFileSizeBase(nativeHandle_);
-  }
-  private native int targetFileSizeBase(long handle);
-
-  /**
-   * The target file size for compaction.
-   * This targetFileSizeBase determines a level-1 file size.
-   * Target file size for level L can be calculated by
-   * targetFileSizeBase * (targetFileSizeMultiplier ^ (L-1))
-   * For example, if targetFileSizeBase is 2MB and
-   * target_file_size_multiplier is 10, then each file on level-1 will
-   * be 2MB, and each file on level 2 will be 20MB,
-   * and each file on level-3 will be 200MB.
-   * by default targetFileSizeBase is 2MB.
-   *
-   * @param targetFileSizeBase the target size of a level-0 file.
-   * @return the reference to the current option.
-   *
-   * @see setTargetFileSizeMultiplier()
-   */
-  public Options setTargetFileSizeBase(int targetFileSizeBase) {
-    setTargetFileSizeBase(nativeHandle_, targetFileSizeBase);
-    return this;
-  }
-  private native void setTargetFileSizeBase(
-      long handle, int targetFileSizeBase);
-
-  /**
-   * targetFileSizeMultiplier defines the size ratio between a
-   * level-(L+1) file and level-L file.
-   * By default targetFileSizeMultiplier is 1, meaning
-   * files in different levels have the same target.
-   *
-   * @return the size ratio between a level-(L+1) file and level-L file.
-   */
-  public int targetFileSizeMultiplier() {
-    return targetFileSizeMultiplier(nativeHandle_);
-  }
-  private native int targetFileSizeMultiplier(long handle);
-
-  /**
-   * targetFileSizeMultiplier defines the size ratio between a
-   * level-L file and level-(L+1) file.
-   * By default target_file_size_multiplier is 1, meaning
-   * files in different levels have the same target.
-   *
-   * @param multiplier the size ratio between a level-(L+1) file
-   *     and level-L file.
-   * @return the reference to the current option.
-   */
-  public Options setTargetFileSizeMultiplier(int multiplier) {
-    setTargetFileSizeMultiplier(nativeHandle_, multiplier);
-    return this;
-  }
-  private native void setTargetFileSizeMultiplier(
-      long handle, int multiplier);
-
-  /**
-   * The upper-bound of the total size of level-1 files in bytes.
-   * Maximum number of bytes for level L can be calculated as
-   * (maxBytesForLevelBase) * (maxBytesForLevelMultiplier ^ (L-1))
-   * For example, if maxBytesForLevelBase is 20MB, and if
-   * max_bytes_for_level_multiplier is 10, total data size for level-1
-   * will be 20MB, total file size for level-2 will be 200MB,
-   * and total file size for level-3 will be 2GB.
-   * by default 'maxBytesForLevelBase' is 10MB.
-   *
-   * @return the upper-bound of the total size of leve-1 files in bytes.
-   * @see maxBytesForLevelMultiplier()
-   */
-  public long maxBytesForLevelBase() {
-    return maxBytesForLevelBase(nativeHandle_);
-  }
-  private native long maxBytesForLevelBase(long handle);
-
-  /**
-   * The upper-bound of the total size of level-1 files in bytes.
-   * Maximum number of bytes for level L can be calculated as
-   * (maxBytesForLevelBase) * (maxBytesForLevelMultiplier ^ (L-1))
-   * For example, if maxBytesForLevelBase is 20MB, and if
-   * max_bytes_for_level_multiplier is 10, total data size for level-1
-   * will be 20MB, total file size for level-2 will be 200MB,
-   * and total file size for level-3 will be 2GB.
-   * by default 'maxBytesForLevelBase' is 10MB.
-   *
-   * @return maxBytesForLevelBase the upper-bound of the total size of
-   *     leve-1 files in bytes.
-   * @return the reference to the current option.
-   * @see setMaxBytesForLevelMultiplier()
-   */
-  public Options setMaxBytesForLevelBase(long maxBytesForLevelBase) {
-    setMaxBytesForLevelBase(nativeHandle_, maxBytesForLevelBase);
-    return this;
-  }
-  private native void setMaxBytesForLevelBase(
-      long handle, long maxBytesForLevelBase);
-
-  /**
-   * The ratio between the total size of level-(L+1) files and the total
-   * size of level-L files for all L.
-   * DEFAULT: 10
-   *
-   * @return the ratio between the total size of level-(L+1) files and
-   *     the total size of level-L files for all L.
-   * @see maxBytesForLevelBase()
-   */
-  public int maxBytesForLevelMultiplier() {
-    return maxBytesForLevelMultiplier(nativeHandle_);
-  }
-  private native int maxBytesForLevelMultiplier(long handle);
-
-  /**
-   * The ratio between the total size of level-(L+1) files and the total
-   * size of level-L files for all L.
-   * DEFAULT: 10
-   *
-   * @param multiplier the ratio between the total size of level-(L+1)
-   *     files and the total size of level-L files for all L.
-   * @return the reference to the current option.
-   * @see setMaxBytesForLevelBase()
-   */
-  public Options setMaxBytesForLevelMultiplier(int multiplier) {
-    setMaxBytesForLevelMultiplier(nativeHandle_, multiplier);
-    return this;
-  }
-  private native void setMaxBytesForLevelMultiplier(
-      long handle, int multiplier);
-
-  /**
-   * Maximum number of bytes in all compacted files.  We avoid expanding
-   * the lower level file set of a compaction if it would make the
-   * total compaction cover more than
-   * (expanded_compaction_factor * targetFileSizeLevel()) many bytes.
-   *
-   * @return the maximum number of bytes in all compacted files.
-   * @see sourceCompactionFactor()
-   */
-  public int expandedCompactionFactor() {
-    return expandedCompactionFactor(nativeHandle_);
-  }
-  private native int expandedCompactionFactor(long handle);
-
-  /**
-   * Maximum number of bytes in all compacted files.  We avoid expanding
-   * the lower level file set of a compaction if it would make the
-   * total compaction cover more than
-   * (expanded_compaction_factor * targetFileSizeLevel()) many bytes.
-   *
-   * @param expandedCompactionFactor the maximum number of bytes in all
-   *     compacted files.
-   * @return the reference to the current option.
-   * @see setSourceCompactionFactor()
-   */
-  public Options setExpandedCompactionFactor(int expandedCompactionFactor) {
-    setExpandedCompactionFactor(nativeHandle_, expandedCompactionFactor);
-    return this;
-  }
-  private native void setExpandedCompactionFactor(
-      long handle, int expandedCompactionFactor);
-
-  /**
-   * Maximum number of bytes in all source files to be compacted in a
-   * single compaction run. We avoid picking too many files in the
-   * source level so that we do not exceed the total source bytes
-   * for compaction to exceed
-   * (source_compaction_factor * targetFileSizeLevel()) many bytes.
-   * Default:1, i.e. pick maxfilesize amount of data as the source of
-   * a compaction.
-   *
-   * @return the maximum number of bytes in all source files to be compactedo.
-   * @see expendedCompactionFactor()
-   */
-  public int sourceCompactionFactor() {
-    return sourceCompactionFactor(nativeHandle_);
-  }
-  private native int sourceCompactionFactor(long handle);
-
-  /**
-   * Maximum number of bytes in all source files to be compacted in a
-   * single compaction run. We avoid picking too many files in the
-   * source level so that we do not exceed the total source bytes
-   * for compaction to exceed
-   * (source_compaction_factor * targetFileSizeLevel()) many bytes.
-   * Default:1, i.e. pick maxfilesize amount of data as the source of
-   * a compaction.
-   *
-   * @param sourceCompactionFactor the maximum number of bytes in all
-   *     source files to be compacted in a single compaction run.
-   * @return the reference to the current option.
-   * @see setExpendedCompactionFactor()
-   */
-  public Options setSourceCompactionFactor(int sourceCompactionFactor) {
-    setSourceCompactionFactor(nativeHandle_, sourceCompactionFactor);
-    return this;
-  }
-  private native void setSourceCompactionFactor(
-      long handle, int sourceCompactionFactor);
-
-  /**
-   * Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
-   * stop building a single file in a level->level+1 compaction.
-   *
-   * @return maximum bytes of overlaps in "grandparent" level.
-   */
-  public int maxGrandparentOverlapFactor() {
-    return maxGrandparentOverlapFactor(nativeHandle_);
-  }
-  private native int maxGrandparentOverlapFactor(long handle);
-
-  /**
-   * Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
-   * stop building a single file in a level->level+1 compaction.
-   *
-   * @param maxGrandparentOverlapFactor maximum bytes of overlaps in
-   *     "grandparent" level.
-   * @return the reference to the current option.
-   */
-  public Options setMaxGrandparentOverlapFactor(
-      int maxGrandparentOverlapFactor) {
-    setMaxGrandparentOverlapFactor(nativeHandle_, maxGrandparentOverlapFactor);
-    return this;
-  }
-  private native void setMaxGrandparentOverlapFactor(
-      long handle, int maxGrandparentOverlapFactor);
-
-  /**
-   * Puts are delayed 0-1 ms when any level has a compaction score that exceeds
-   * soft_rate_limit. This is ignored when == 0.0.
-   * CONSTRAINT: soft_rate_limit <= hard_rate_limit. If this constraint does not
-   * hold, RocksDB will set soft_rate_limit = hard_rate_limit
-   * Default: 0 (disabled)
-   *
-   * @return soft-rate-limit for put delay.
-   */
-  public double softRateLimit() {
-    return softRateLimit(nativeHandle_);
-  }
-  private native double softRateLimit(long handle);
-
-  /**
-   * Puts are delayed 0-1 ms when any level has a compaction score that exceeds
-   * soft_rate_limit. This is ignored when == 0.0.
-   * CONSTRAINT: soft_rate_limit <= hard_rate_limit. If this constraint does not
-   * hold, RocksDB will set soft_rate_limit = hard_rate_limit
-   * Default: 0 (disabled)
-   *
-   * @param softRateLimit the soft-rate-limit of a compaction score
-   *     for put delay.
-   * @return the reference to the current option.
-   */
-  public Options setSoftRateLimit(double softRateLimit) {
-    setSoftRateLimit(nativeHandle_, softRateLimit);
-    return this;
-  }
-  private native void setSoftRateLimit(
-      long handle, double softRateLimit);
-
-  /**
-   * Puts are delayed 1ms at a time when any level has a compaction score that
-   * exceeds hard_rate_limit. This is ignored when <= 1.0.
-   * Default: 0 (disabled)
-   *
-   * @return the hard-rate-limit of a compaction score for put delay.
-   */
-  public double hardRateLimit() {
-    return hardRateLimit(nativeHandle_);
-  }
-  private native double hardRateLimit(long handle);
-
-  /**
-   * Puts are delayed 1ms at a time when any level has a compaction score that
-   * exceeds hard_rate_limit. This is ignored when <= 1.0.
-   * Default: 0 (disabled)
-   *
-   * @param hardRateLimit the hard-rate-limit of a compaction score for put
-   *     delay.
-   * @return the reference to the current option.
-   */
-  public Options setHardRateLimit(double hardRateLimit) {
-    setHardRateLimit(nativeHandle_, hardRateLimit);
-    return this;
-  }
-  private native void setHardRateLimit(
-      long handle, double hardRateLimit);
-
-  /**
-   * The maximum time interval a put will be stalled when hard_rate_limit
-   * is enforced.  If 0, then there is no limit.
-   * Default: 1000
-   *
-   * @return the maximum time interval a put will be stalled when
-   *     hard_rate_limit is enforced.
-   */
-  public int rateLimitDelayMaxMilliseconds() {
-    return rateLimitDelayMaxMilliseconds(nativeHandle_);
-  }
-  private native int rateLimitDelayMaxMilliseconds(long handle);
-
-  /**
-   * The maximum time interval a put will be stalled when hard_rate_limit
-   * is enforced. If 0, then there is no limit.
-   * Default: 1000
-   *
-   * @param rateLimitDelayMaxMilliseconds the maximum time interval a put
-   *     will be stalled.
-   * @return the reference to the current option.
-   */
-  public Options setRateLimitDelayMaxMilliseconds(
-      int rateLimitDelayMaxMilliseconds) {
-    setRateLimitDelayMaxMilliseconds(
-        nativeHandle_, rateLimitDelayMaxMilliseconds);
-    return this;
-  }
-  private native void setRateLimitDelayMaxMilliseconds(
-      long handle, int rateLimitDelayMaxMilliseconds);
-
-  /**
-   * Disable block cache. If this is set to true,
-   * then no block cache should be used, and the block_cache should
-   * point to a nullptr object.
-   * Default: false
-   *
-   * @return true if block cache is disabled.
-   */
-  public boolean noBlockCache() {
-    return noBlockCache(nativeHandle_);
-  }
-  private native boolean noBlockCache(long handle);
-
-  /**
-   * Disable block cache. If this is set to true,
-   * then no block cache should be used, and the block_cache should
-   * point to a nullptr object.
-   * Default: false
-   *
-   * @param noBlockCache true if block-cache is disabled.
-   * @return the reference to the current option.
-   */
-  public Options setNoBlockCache(boolean noBlockCache) {
-    setNoBlockCache(nativeHandle_, noBlockCache);
-    return this;
-  }
-  private native void setNoBlockCache(
-      long handle, boolean noBlockCache);
-
-  /**
-   * The size of one block in arena memory allocation.
-   * If <= 0, a proper value is automatically calculated (usually 1/10 of
-   * writer_buffer_size).
-   *
-   * There are two additonal restriction of the The specified size:
-   * (1) size should be in the range of [4096, 2 << 30] and
-   * (2) be the multiple of the CPU word (which helps with the memory
-   * alignment).
-   *
-   * We'll automatically check and adjust the size number to make sure it
-   * conforms to the restrictions.
-   * Default: 0
-   *
-   * @return the size of an arena block
-   */
-  public long arenaBlockSize() {
-    return arenaBlockSize(nativeHandle_);
-  }
-  private native long arenaBlockSize(long handle);
-
-  /**
-   * The size of one block in arena memory allocation.
-   * If <= 0, a proper value is automatically calculated (usually 1/10 of
-   * writer_buffer_size).
-   *
-   * There are two additonal restriction of the The specified size:
-   * (1) size should be in the range of [4096, 2 << 30] and
-   * (2) be the multiple of the CPU word (which helps with the memory
-   * alignment).
-   *
-   * We'll automatically check and adjust the size number to make sure it
-   * conforms to the restrictions.
-   * Default: 0
-   *
-   * @param arenaBlockSize the size of an arena block
-   * @return the reference to the current option.
-   */
-  public Options setArenaBlockSize(long arenaBlockSize) {
-    setArenaBlockSize(nativeHandle_, arenaBlockSize);
-    return this;
-  }
-  private native void setArenaBlockSize(
-      long handle, long arenaBlockSize);
-
-  /**
-   * Disable automatic compactions. Manual compactions can still
-   * be issued on this column family
-   *
-   * @return true if auto-compactions are disabled.
-   */
-  public boolean disableAutoCompactions() {
-    return disableAutoCompactions(nativeHandle_);
-  }
-  private native boolean disableAutoCompactions(long handle);
-
-  /**
-   * Disable automatic compactions. Manual compactions can still
-   * be issued on this column family
-   *
-   * @param disableAutoCompactions true if auto-compactions are disabled.
-   * @return the reference to the current option.
-   */
-  public Options setDisableAutoCompactions(boolean disableAutoCompactions) {
-    setDisableAutoCompactions(nativeHandle_, disableAutoCompactions);
-    return this;
-  }
-  private native void setDisableAutoCompactions(
-      long handle, boolean disableAutoCompactions);
-
-  /**
-   * Purge duplicate/deleted keys when a memtable is flushed to storage.
-   * Default: true
-   *
-   * @return true if purging keys is disabled.
-   */
-  public boolean purgeRedundantKvsWhileFlush() {
-    return purgeRedundantKvsWhileFlush(nativeHandle_);
-  }
-  private native boolean purgeRedundantKvsWhileFlush(long handle);
-
-  /**
-   * Purge duplicate/deleted keys when a memtable is flushed to storage.
-   * Default: true
-   *
-   * @param purgeRedundantKvsWhileFlush true if purging keys is disabled.
-   * @return the reference to the current option.
-   */
-  public Options setPurgeRedundantKvsWhileFlush(
-      boolean purgeRedundantKvsWhileFlush) {
-    setPurgeRedundantKvsWhileFlush(
-        nativeHandle_, purgeRedundantKvsWhileFlush);
-    return this;
-  }
-  private native void setPurgeRedundantKvsWhileFlush(
-      long handle, boolean purgeRedundantKvsWhileFlush);
-
-  /**
-   * This is used to close a block before it reaches the configured
-   * 'block_size'. If the percentage of free space in the current block is less
-   * than this specified number and adding a new record to the block will
-   * exceed the configured block size, then this block will be closed and the
-   * new record will be written to the next block.
-   * Default is 10.
-   *
-   * @return the target block size
-   */
-  public int blockSizeDeviation() {
-    return blockSizeDeviation(nativeHandle_);
-  }
-  private native int blockSizeDeviation(long handle);
-
-  /**
-   * This is used to close a block before it reaches the configured
-   * 'block_size'. If the percentage of free space in the current block is less
-   * than this specified number and adding a new record to the block will
-   * exceed the configured block size, then this block will be closed and the
-   * new record will be written to the next block.
-   * Default is 10.
-   *
-   * @param blockSizeDeviation the target block size
-   * @return the reference to the current option.
-   */
-  public Options setBlockSizeDeviation(int blockSizeDeviation) {
-    setBlockSizeDeviation(nativeHandle_, blockSizeDeviation);
-    return this;
-  }
-  private native void setBlockSizeDeviation(
-      long handle, int blockSizeDeviation);
-
-  /**
-   * If true, compaction will verify checksum on every read that happens
-   * as part of compaction
-   * Default: true
-   *
-   * @return true if compaction verifies checksum on every read.
-   */
-  public boolean verifyChecksumsInCompaction() {
-    return verifyChecksumsInCompaction(nativeHandle_);
-  }
-  private native boolean verifyChecksumsInCompaction(long handle);
-
-  /**
-   * If true, compaction will verify checksum on every read that happens
-   * as part of compaction
-   * Default: true
-   *
-   * @param verifyChecksumsInCompaction true if compaction verifies
-   *     checksum on every read.
-   * @return the reference to the current option.
-   */
-  public Options setVerifyChecksumsInCompaction(
-      boolean verifyChecksumsInCompaction) {
-    setVerifyChecksumsInCompaction(
-        nativeHandle_, verifyChecksumsInCompaction);
-    return this;
-  }
-  private native void setVerifyChecksumsInCompaction(
-      long handle, boolean verifyChecksumsInCompaction);
-
-  /**
-   * Use KeyMayExist API to filter deletes when this is true.
-   * If KeyMayExist returns false, i.e. the key definitely does not exist, then
-   * the delete is a noop. KeyMayExist only incurs in-memory look up.
-   * This optimization avoids writing the delete to storage when appropriate.
-   * Default: false
-   *
-   * @return true if filter-deletes behavior is on.
-   */
-  public boolean filterDeletes() {
-    return filterDeletes(nativeHandle_);
-  }
-  private native boolean filterDeletes(long handle);
-
-  /**
-   * Use KeyMayExist API to filter deletes when this is true.
-   * If KeyMayExist returns false, i.e. the key definitely does not exist, then
-   * the delete is a noop. KeyMayExist only incurs in-memory look up.
-   * This optimization avoids writing the delete to storage when appropriate.
-   * Default: false
-   *
-   * @param filterDeletes true if filter-deletes behavior is on.
-   * @return the reference to the current option.
-   */
-  public Options setFilterDeletes(boolean filterDeletes) {
-    setFilterDeletes(nativeHandle_, filterDeletes);
-    return this;
-  }
-  private native void setFilterDeletes(
-      long handle, boolean filterDeletes);
-
-  /**
-   * An iteration->Next() sequentially skips over keys with the same
-   * user-key unless this option is set. This number specifies the number
-   * of keys (with the same userkey) that will be sequentially
-   * skipped before a reseek is issued.
-   * Default: 8
-   *
-   * @return the number of keys could be skipped in a iteration.
-   */
-  public long maxSequentialSkipInIterations() {
-    return maxSequentialSkipInIterations(nativeHandle_);
-  }
-  private native long maxSequentialSkipInIterations(long handle);
-
-  /**
-   * An iteration->Next() sequentially skips over keys with the same
-   * user-key unless this option is set. This number specifies the number
-   * of keys (with the same userkey) that will be sequentially
-   * skipped before a reseek is issued.
-   * Default: 8
-   *
-   * @param maxSequentialSkipInIterations the number of keys could
-   *     be skipped in a iteration.
-   * @return the reference to the current option.
-   */
-  public Options setMaxSequentialSkipInIterations(long maxSequentialSkipInIterations) {
-    setMaxSequentialSkipInIterations(nativeHandle_, maxSequentialSkipInIterations);
-    return this;
-  }
-  private native void setMaxSequentialSkipInIterations(
-      long handle, long maxSequentialSkipInIterations);
-
-  /**
-   * Allows thread-safe inplace updates.
-   * If inplace_callback function is not set,
-   *   Put(key, new_value) will update inplace the existing_value iff
-   *   * key exists in current memtable
-   *   * new sizeof(new_value) <= sizeof(existing_value)
-   *   * existing_value for that key is a put i.e. kTypeValue
-   * If inplace_callback function is set, check doc for inplace_callback.
-   * Default: false.
-   *
-   * @return true if thread-safe inplace updates are allowed.
-   */
-  public boolean inplaceUpdateSupport() {
-    return inplaceUpdateSupport(nativeHandle_);
-  }
-  private native boolean inplaceUpdateSupport(long handle);
-
-  /**
-   * Allows thread-safe inplace updates.
-   * If inplace_callback function is not set,
-   *   Put(key, new_value) will update inplace the existing_value iff
-   *   * key exists in current memtable
-   *   * new sizeof(new_value) <= sizeof(existing_value)
-   *   * existing_value for that key is a put i.e. kTypeValue
-   * If inplace_callback function is set, check doc for inplace_callback.
-   * Default: false.
-   *
-   * @param inplaceUpdateSupport true if thread-safe inplace updates
-   *     are allowed.
-   * @return the reference to the current option.
-   */
-  public Options setInplaceUpdateSupport(boolean inplaceUpdateSupport) {
-    setInplaceUpdateSupport(nativeHandle_, inplaceUpdateSupport);
-    return this;
-  }
-  private native void setInplaceUpdateSupport(
-      long handle, boolean inplaceUpdateSupport);
-
-  /**
-   * Number of locks used for inplace update
-   * Default: 10000, if inplace_update_support = true, else 0.
-   *
-   * @return the number of locks used for inplace update.
-   */
-  public long inplaceUpdateNumLocks() {
-    return inplaceUpdateNumLocks(nativeHandle_);
-  }
-  private native long inplaceUpdateNumLocks(long handle);
-
-  /**
-   * Number of locks used for inplace update
-   * Default: 10000, if inplace_update_support = true, else 0.
-   *
-   * @param inplaceUpdateNumLocks the number of locks used for
-   *     inplace updates.
-   * @return the reference to the current option.
-   */
-  public Options setInplaceUpdateNumLocks(long inplaceUpdateNumLocks) {
-    setInplaceUpdateNumLocks(nativeHandle_, inplaceUpdateNumLocks);
-    return this;
-  }
-  private native void setInplaceUpdateNumLocks(
-      long handle, long inplaceUpdateNumLocks);
-
-  /**
-   * Returns the number of bits used in the prefix bloom filter.
-   *
-   * This value will be used only when a prefix-extractor is specified.
-   *
-   * @return the number of bloom-bits.
-   * @see useFixedLengthPrefixExtractor()
-   */
-  public int memtablePrefixBloomBits() {
-    return memtablePrefixBloomBits(nativeHandle_);
-  }
-  private native int memtablePrefixBloomBits(long handle);
-
-  /**
-   * Sets the number of bits used in the prefix bloom filter.
-   *
-   * This value will be used only when a prefix-extractor is specified.
-   *
-   * @param memtablePrefixBloomBits the number of bits used in the
-   *     prefix bloom filter.
-   * @return the reference to the current option.
-   */
-  public Options setMemtablePrefixBloomBits(int memtablePrefixBloomBits) {
-    setMemtablePrefixBloomBits(nativeHandle_, memtablePrefixBloomBits);
-    return this;
-  }
-  private native void setMemtablePrefixBloomBits(
-      long handle, int memtablePrefixBloomBits);
-
-  /**
-   * The number of hash probes per key used in the mem-table.
-   *
-   * @return the number of hash probes per key.
-   */
-  public int memtablePrefixBloomProbes() {
-    return memtablePrefixBloomProbes(nativeHandle_);
-  }
-  private native int memtablePrefixBloomProbes(long handle);
-
-  /**
-   * The number of hash probes per key used in the mem-table.
-   *
-   * @param memtablePrefixBloomProbes the number of hash probes per key.
-   * @return the reference to the current option.
-   */
-  public Options setMemtablePrefixBloomProbes(int memtablePrefixBloomProbes) {
-    setMemtablePrefixBloomProbes(nativeHandle_, memtablePrefixBloomProbes);
-    return this;
-  }
-  private native void setMemtablePrefixBloomProbes(
-      long handle, int memtablePrefixBloomProbes);
-
-  /**
-   * Control locality of bloom filter probes to improve cache miss rate.
-   * This option only applies to memtable prefix bloom and plaintable
-   * prefix bloom. It essentially limits the max number of cache lines each
-   * bloom filter check can touch.
-   * This optimization is turned off when set to 0. The number should never
-   * be greater than number of probes. This option can boost performance
-   * for in-memory workload but should use with care since it can cause
-   * higher false positive rate.
-   * Default: 0
-   *
-   * @return the level of locality of bloom-filter probes.
-   * @see setMemTablePrefixBloomProbes
-   */
-  public int bloomLocality() {
-    return bloomLocality(nativeHandle_);
-  }
-  private native int bloomLocality(long handle);
-
-  /**
-   * Control locality of bloom filter probes to improve cache miss rate.
-   * This option only applies to memtable prefix bloom and plaintable
-   * prefix bloom. It essentially limits the max number of cache lines each
-   * bloom filter check can touch.
-   * This optimization is turned off when set to 0. The number should never
-   * be greater than number of probes. This option can boost performance
-   * for in-memory workload but should use with care since it can cause
-   * higher false positive rate.
-   * Default: 0
-   *
-   * @param bloomLocality the level of locality of bloom-filter probes.
-   * @return the reference to the current option.
-   */
-  public Options setBloomLocality(int bloomLocality) {
-    setBloomLocality(nativeHandle_, bloomLocality);
-    return this;
-  }
-  private native void setBloomLocality(
-      long handle, int bloomLocality);
-
-  /**
-   * Maximum number of successive merge operations on a key in the memtable.
-   *
-   * When a merge operation is added to the memtable and the maximum number of
-   * successive merges is reached, the value of the key will be calculated and
-   * inserted into the memtable instead of the merge operation. This will
-   * ensure that there are never more than max_successive_merges merge
-   * operations in the memtable.
-   *
-   * Default: 0 (disabled)
-   *
-   * @return the maximum number of successive merges.
-   */
-  public long maxSuccessiveMerges() {
-    return maxSuccessiveMerges(nativeHandle_);
-  }
-  private native long maxSuccessiveMerges(long handle);
-
-  /**
-   * Maximum number of successive merge operations on a key in the memtable.
-   *
-   * When a merge operation is added to the memtable and the maximum number of
-   * successive merges is reached, the value of the key will be calculated and
-   * inserted into the memtable instead of the merge operation. This will
-   * ensure that there are never more than max_successive_merges merge
-   * operations in the memtable.
-   *
-   * Default: 0 (disabled)
-   *
-   * @param maxSuccessiveMerges the maximum number of successive merges.
-   * @return the reference to the current option.
-   */
-  public Options setMaxSuccessiveMerges(long maxSuccessiveMerges) {
-    setMaxSuccessiveMerges(nativeHandle_, maxSuccessiveMerges);
-    return this;
-  }
-  private native void setMaxSuccessiveMerges(
-      long handle, long maxSuccessiveMerges);
-
-  /**
-   * The minimum number of write buffers that will be merged together
-   * before writing to storage.  If set to 1, then
-   * all write buffers are fushed to L0 as individual files and this increases
-   * read amplification because a get request has to check in all of these
-   * files. Also, an in-memory merge may result in writing lesser
-   * data to storage if there are duplicate records in each of these
-   * individual write buffers.  Default: 1
-   *
-   * @return the minimum number of write buffers that will be merged together.
-   */
-  public int minWriteBufferNumberToMerge() {
-    return minWriteBufferNumberToMerge(nativeHandle_);
-  }
-  private native int minWriteBufferNumberToMerge(long handle);
-
-  /**
-   * The minimum number of write buffers that will be merged together
-   * before writing to storage.  If set to 1, then
-   * all write buffers are fushed to L0 as individual files and this increases
-   * read amplification because a get request has to check in all of these
-   * files. Also, an in-memory merge may result in writing lesser
-   * data to storage if there are duplicate records in each of these
-   * individual write buffers.  Default: 1
-   *
-   * @param minWriteBufferNumberToMerge the minimum number of write buffers
-   *     that will be merged together.
-   * @return the reference to the current option.
-   */
-  public Options setMinWriteBufferNumberToMerge(int minWriteBufferNumberToMerge) {
-    setMinWriteBufferNumberToMerge(nativeHandle_, minWriteBufferNumberToMerge);
-    return this;
-  }
-  private native void setMinWriteBufferNumberToMerge(
-      long handle, int minWriteBufferNumberToMerge);
-
-  /**
-   * The number of partial merge operands to accumulate before partial
-   * merge will be performed. Partial merge will not be called
-   * if the list of values to merge is less than min_partial_merge_operands.
-   *
-   * If min_partial_merge_operands < 2, then it will be treated as 2.
-   *
-   * Default: 2
-   *
-   * @return
-   */
-  public int minPartialMergeOperands() {
-    return minPartialMergeOperands(nativeHandle_);
-  }
-  private native int minPartialMergeOperands(long handle);
-
-  /**
-   * The number of partial merge operands to accumulate before partial
-   * merge will be performed. Partial merge will not be called
-   * if the list of values to merge is less than min_partial_merge_operands.
-   *
-   * If min_partial_merge_operands < 2, then it will be treated as 2.
-   *
-   * Default: 2
-   *
-   * @param minPartialMergeOperands
-   * @return the reference to the current option.
-   */
-  public Options setMinPartialMergeOperands(int minPartialMergeOperands) {
-    setMinPartialMergeOperands(nativeHandle_, minPartialMergeOperands);
-    return this;
-  }
-  private native void setMinPartialMergeOperands(
-      long handle, int minPartialMergeOperands);
-
-  /**
-   * Release the memory allocated for the current instance
-   * in the c++ side.
-   */
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose0();
-    }
-  }
-
-  static final int DEFAULT_PLAIN_TABLE_BLOOM_BITS_PER_KEY = 10;
-  static final double DEFAULT_PLAIN_TABLE_HASH_TABLE_RATIO = 0.75;
-  static final int DEFAULT_PLAIN_TABLE_INDEX_SPARSENESS = 16;
-
-  private native void newOptions();
-  private native void dispose0();
-  private native void setCreateIfMissing(long handle, boolean flag);
-  private native boolean createIfMissing(long handle);
-  private native void setWriteBufferSize(long handle, long writeBufferSize);
-  private native long writeBufferSize(long handle);
-  private native void setMaxWriteBufferNumber(
-      long handle, int maxWriteBufferNumber);
-  private native int maxWriteBufferNumber(long handle);
-  private native void setBlockSize(long handle, long blockSize);
-  private native long blockSize(long handle);
-  private native void setDisableSeekCompaction(
-      long handle, boolean disableSeekCompaction);
-  private native boolean disableSeekCompaction(long handle);
-  private native void setMaxBackgroundCompactions(
-      long handle, int maxBackgroundCompactions);
-  private native int maxBackgroundCompactions(long handle);
-  private native void createStatistics(long optHandle);
-  private native long statisticsPtr(long optHandle);
-
-  private native void setMemTableFactory(long handle, long factoryHandle);
-  private native String memTableFactoryName(long handle);
-
-  private native void setTableFactory(long handle, long factoryHandle);
-  private native String tableFactoryName(long handle);
-
-  private native void useFixedLengthPrefixExtractor(
-      long handle, int prefixLength);
-
-  long cacheSize_;
-  Filter filter_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/PlainTableConfig.java b/src/rocksdb/java/org/rocksdb/PlainTableConfig.java
deleted file mode 100644
index 554ce38..0000000
--- a/src/rocksdb/java/org/rocksdb/PlainTableConfig.java
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-package org.rocksdb;
-
-/**
- * The config for plain table sst format.
- *
- * PlainTable is a RocksDB's SST file format optimized for low query latency
- * on pure-memory or really low-latency media.  It also support prefix
- * hash feature.
- */
-public class PlainTableConfig extends TableFormatConfig {
-  public static final int VARIABLE_LENGTH = 0;
-  public static final int DEFAULT_BLOOM_BITS_PER_KEY = 10;
-  public static final double DEFAULT_HASH_TABLE_RATIO = 0.75;
-  public static final int DEFAULT_INDEX_SPARSENESS = 16;
-
-  public PlainTableConfig() {
-    keySize_ = VARIABLE_LENGTH;
-    bloomBitsPerKey_ = DEFAULT_BLOOM_BITS_PER_KEY;
-    hashTableRatio_ = DEFAULT_HASH_TABLE_RATIO;
-    indexSparseness_ = DEFAULT_INDEX_SPARSENESS;
-  }
-
-  /**
-   * Set the length of the user key. If it is set to be VARIABLE_LENGTH,
-   * then it indicates the user keys are variable-lengthed.  Otherwise,
-   * all the keys need to have the same length in byte.
-   * DEFAULT: VARIABLE_LENGTH
-   *
-   * @param keySize the length of the user key.
-   * @return the reference to the current config.
-   */
-  public PlainTableConfig setKeySize(int keySize) {
-    keySize_ = keySize;
-    return this;
-  }
-
-  /**
-   * @return the specified size of the user key.  If VARIABLE_LENGTH,
-   *     then it indicates variable-length key.
-   */
-  public int keySize() {
-    return keySize_;
-  }
-
-  /**
-   * Set the number of bits per key used by the internal bloom filter
-   * in the plain table sst format.
-   *
-   * @param bitsPerKey the number of bits per key for bloom filer.
-   * @return the reference to the current config.
-   */
-  public PlainTableConfig setBloomBitsPerKey(int bitsPerKey) {
-    bloomBitsPerKey_ = bitsPerKey;
-    return this;
-  }
-
-  /**
-   * @return the number of bits per key used for the bloom filter.
-   */
-  public int bloomBitsPerKey() {
-    return bloomBitsPerKey_;
-  }
-
-  /**
-   * hashTableRatio is the desired utilization of the hash table used
-   * for prefix hashing.  The ideal ratio would be the number of
-   * prefixes / the number of hash buckets.  If this value is set to
-   * zero, then hash table will not be used.
-   *
-   * @param ratio the hash table ratio.
-   * @return the reference to the current config.
-   */
-  public PlainTableConfig setHashTableRatio(double ratio) {
-    hashTableRatio_ = ratio;
-    return this;
-  }
-
-  /**
-   * @return the hash table ratio.
-   */
-  public double hashTableRatio() {
-    return hashTableRatio_;
-  }
-
-  /**
-   * Index sparseness determines the index interval for keys inside the
-   * same prefix.  This number is equal to the maximum number of linear
-   * search required after hash and binary search.  If it's set to 0,
-   * then each key will be indexed.
-   *
-   * @param sparseness the index sparseness.
-   * @return the reference to the current config.
-   */
-  public PlainTableConfig setIndexSparseness(int sparseness) {
-    indexSparseness_ = sparseness;
-    return this;
-  }
-
-  /**
-   * @return the index sparseness.
-   */
-  public int indexSparseness() {
-    return indexSparseness_;
-  }
-
-  @Override protected long newTableFactoryHandle() {
-    return newTableFactoryHandle(keySize_, bloomBitsPerKey_,
-        hashTableRatio_, indexSparseness_);
-  }
-
-  private native long newTableFactoryHandle(
-      int keySize, int bloomBitsPerKey,
-      double hashTableRatio, int indexSparseness);
-
-  private int keySize_;
-  private int bloomBitsPerKey_;
-  private double hashTableRatio_;
-  private int indexSparseness_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/ReadOptions.java b/src/rocksdb/java/org/rocksdb/ReadOptions.java
deleted file mode 100644
index 23250fc..0000000
--- a/src/rocksdb/java/org/rocksdb/ReadOptions.java
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * The class that controls the get behavior.
- *
- * Note that dispose() must be called before an Options instance
- * become out-of-scope to release the allocated memory in c++.
- */
-public class ReadOptions extends RocksObject {
-  public ReadOptions() {
-    super();
-    newReadOptions();
-  }
-  private native void newReadOptions();
-
-  /**
-   * Release the memory allocated for the current instance
-   * in the c++ side.
-   *
-   * Calling other methods after dispose() leads to undefined behavior.
-   */
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose(nativeHandle_);
-    }
-  }
-  private native void dispose(long handle);
-
-  /**
-   * If true, all data read from underlying storage will be
-   * verified against corresponding checksums.
-   * Default: true
-   *
-   * @return true if checksum verification is on.
-   */
-  public boolean verifyChecksums() {
-    assert(isInitialized());
-    return verifyChecksums(nativeHandle_);
-  }
-  private native boolean verifyChecksums(long handle);
-
-  /**
-   * If true, all data read from underlying storage will be
-   * verified against corresponding checksums.
-   * Default: true
-   *
-   * @param verifyChecksums if true, then checksum verification
-   *     will be performed on every read.
-   * @return the reference to the current ReadOptions.
-   */
-  public ReadOptions setVerifyChecksums(boolean verifyChecksums) {
-    assert(isInitialized());
-    setVerifyChecksums(nativeHandle_, verifyChecksums);
-    return this;
-  }
-  private native void setVerifyChecksums(
-      long handle, boolean verifyChecksums);
-
-  // TODO(yhchiang): this option seems to be block-based table only.
-  //                 move this to a better place?
-  /**
-   * Fill the cache when loading the block-based sst formated db.
-   * Callers may wish to set this field to false for bulk scans.
-   * Default: true
-   *
-   * @return true if the fill-cache behavior is on.
-   */
-  public boolean fillCache() {
-    assert(isInitialized());
-    return fillCache(nativeHandle_);
-  }
-  private native boolean fillCache(long handle);
-
-  /**
-   * Fill the cache when loading the block-based sst formated db.
-   * Callers may wish to set this field to false for bulk scans.
-   * Default: true
-   *
-   * @param fillCache if true, then fill-cache behavior will be
-   *     performed.
-   * @return the reference to the current ReadOptions.
-   */
-  public ReadOptions setFillCache(boolean fillCache) {
-    assert(isInitialized());
-    setFillCache(nativeHandle_, fillCache);
-    return this;
-  }
-  private native void setFillCache(
-      long handle, boolean fillCache);
-
-  /**
-   * Specify to create a tailing iterator -- a special iterator that has a
-   * view of the complete database (i.e. it can also be used to read newly
-   * added data) and is optimized for sequential reads. It will return records
-   * that were inserted into the database after the creation of the iterator.
-   * Default: false
-   * Not supported in ROCKSDB_LITE mode!
-   *
-   * @return true if tailing iterator is enabled.
-   */
-  public boolean tailing() {
-    assert(isInitialized());
-    return tailing(nativeHandle_);
-  }
-  private native boolean tailing(long handle);
-
-  /**
-   * Specify to create a tailing iterator -- a special iterator that has a
-   * view of the complete database (i.e. it can also be used to read newly
-   * added data) and is optimized for sequential reads. It will return records
-   * that were inserted into the database after the creation of the iterator.
-   * Default: false
-   * Not supported in ROCKSDB_LITE mode!
-   *
-   * @param tailing if true, then tailing iterator will be enabled.
-   * @return the reference to the current ReadOptions.
-   */
-  public ReadOptions setTailing(boolean tailing) {
-    assert(isInitialized());
-    setTailing(nativeHandle_, tailing);
-    return this;
-  }
-  private native void setTailing(
-      long handle, boolean tailing);
-}
diff --git a/src/rocksdb/java/org/rocksdb/RocksDB.java b/src/rocksdb/java/org/rocksdb/RocksDB.java
deleted file mode 100644
index e92acea..0000000
--- a/src/rocksdb/java/org/rocksdb/RocksDB.java
+++ /dev/null
@@ -1,376 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.Closeable;
-import java.io.IOException;
-import org.rocksdb.util.Environment;
-
-/**
- * A RocksDB is a persistent ordered map from keys to values.  It is safe for
- * concurrent access from multiple threads without any external synchronization.
- * All methods of this class could potentially throw RocksDBException, which
- * indicates sth wrong at the rocksdb library side and the call failed.
- */
-public class RocksDB extends RocksObject {
-  public static final int NOT_FOUND = -1;
-  private static final String[] compressionLibs_ = {
-      "snappy", "zlib", "bzip2", "lz4", "lz4hc"};
-
-  /**
-   * Loads the necessary library files.
-   * Calling this method twice will have no effect.
-   */
-  public static synchronized void loadLibrary() {
-    // loading possibly necessary libraries.
-    for (String lib : compressionLibs_) {
-      try {
-      System.loadLibrary(lib);
-      } catch (UnsatisfiedLinkError e) {
-        // since it may be optional, we ignore its loading failure here.
-      }
-    }
-    // However, if any of them is required.  We will see error here.
-    System.loadLibrary("rocksdbjni");
-  }
-
-  /**
-   * Tries to load the necessary library files from the given list of
-   * directories.
-   *
-   * @param paths a list of strings where each describes a directory
-   *     of a library.
-   */
-  public static synchronized void loadLibrary(List<String> paths) {
-    for (String lib : compressionLibs_) {
-      for (String path : paths) {
-        try {
-          System.load(path + "/" + Environment.getSharedLibraryName(lib));
-          break;
-        } catch (UnsatisfiedLinkError e) {
-          // since they are optional, we ignore loading fails.
-        }
-      }
-    }
-    boolean success = false;
-    UnsatisfiedLinkError err = null;
-    for (String path : paths) {
-      try {
-        System.load(path + "/" + Environment.getJniLibraryName("rocksdbjni"));
-        success = true;
-        break;
-      } catch (UnsatisfiedLinkError e) {
-        err = e;
-      }
-    }
-    if (success == false) {
-      throw err;
-    }
-  }
-
-  /**
-   * The factory constructor of RocksDB that opens a RocksDB instance given
-   * the path to the database using the default options w/ createIfMissing
-   * set to true.
-   *
-   * @param path the path to the rocksdb.
-   * @param status an out value indicating the status of the Open().
-   * @return a rocksdb instance on success, null if the specified rocksdb can
-   *     not be opened.
-   *
-   * @see Options.setCreateIfMissing()
-   * @see Options.createIfMissing()
-   */
-  public static RocksDB open(String path) throws RocksDBException {
-    RocksDB db = new RocksDB();
-
-    // This allows to use the rocksjni default Options instead of
-    // the c++ one.
-    Options options = new Options();
-    db.open(options.nativeHandle_, options.cacheSize_, path);
-    db.transferCppRawPointersOwnershipFrom(options);
-    options.dispose();
-    return db;
-  }
-
-  /**
-   * The factory constructor of RocksDB that opens a RocksDB instance given
-   * the path to the database using the specified options and db path.
-   */
-  public static RocksDB open(Options options, String path)
-      throws RocksDBException {
-    // when non-default Options is used, keeping an Options reference
-    // in RocksDB can prevent Java to GC during the life-time of
-    // the currently-created RocksDB.
-    RocksDB db = new RocksDB();
-    db.open(options.nativeHandle_, options.cacheSize_, path);
-    db.transferCppRawPointersOwnershipFrom(options);
-    return db;
-  }
-
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose(nativeHandle_);
-      nativeHandle_ = 0;
-    }
-  }
-
-  /**
-   * Close the RocksDB instance.
-   * This function is equivalent to dispose().
-   */
-  public void close() {
-    dispose();
-  }
-
-  /**
-   * Set the database entry for "key" to "value".
-   *
-   * @param key the specified key to be inserted.
-   * @param value the value associated with the specified key.
-   */
-  public void put(byte[] key, byte[] value) throws RocksDBException {
-    put(nativeHandle_, key, key.length, value, value.length);
-  }
-
-  /**
-   * Set the database entry for "key" to "value".
-   *
-   * @param key the specified key to be inserted.
-   * @param value the value associated with the specified key.
-   */
-  public void put(WriteOptions writeOpts, byte[] key, byte[] value)
-      throws RocksDBException {
-    put(nativeHandle_, writeOpts.nativeHandle_,
-        key, key.length, value, value.length);
-  }
-
-  /**
-   * Apply the specified updates to the database.
-   */
-  public void write(WriteOptions writeOpts, WriteBatch updates)
-      throws RocksDBException {
-    write(writeOpts.nativeHandle_, updates.nativeHandle_);
-  }
-
-  /**
-   * Get the value associated with the specified key.
-   *
-   * @param key the key to retrieve the value.
-   * @param value the out-value to receive the retrieved value.
-   * @return The size of the actual value that matches the specified
-   *     {@code key} in byte.  If the return value is greater than the
-   *     length of {@code value}, then it indicates that the size of the
-   *     input buffer {@code value} is insufficient and partial result will
-   *     be returned.  RocksDB.NOT_FOUND will be returned if the value not
-   *     found.
-   */
-  public int get(byte[] key, byte[] value) throws RocksDBException {
-    return get(nativeHandle_, key, key.length, value, value.length);
-  }
-
-  /**
-   * Get the value associated with the specified key.
-   *
-   * @param key the key to retrieve the value.
-   * @param value the out-value to receive the retrieved value.
-   * @return The size of the actual value that matches the specified
-   *     {@code key} in byte.  If the return value is greater than the
-   *     length of {@code value}, then it indicates that the size of the
-   *     input buffer {@code value} is insufficient and partial result will
-   *     be returned.  RocksDB.NOT_FOUND will be returned if the value not
-   *     found.
-   */
-  public int get(ReadOptions opt, byte[] key, byte[] value)
-      throws RocksDBException {
-    return get(nativeHandle_, opt.nativeHandle_,
-               key, key.length, value, value.length);
-  }
-
-  /**
-   * The simplified version of get which returns a new byte array storing
-   * the value associated with the specified input key if any.  null will be
-   * returned if the specified key is not found.
-   *
-   * @param key the key retrieve the value.
-   * @return a byte array storing the value associated with the input key if
-   *     any.  null if it does not find the specified key.
-   *
-   * @see RocksDBException
-   */
-  public byte[] get(byte[] key) throws RocksDBException {
-    return get(nativeHandle_, key, key.length);
-  }
-
-  /**
-   * The simplified version of get which returns a new byte array storing
-   * the value associated with the specified input key if any.  null will be
-   * returned if the specified key is not found.
-   *
-   * @param key the key retrieve the value.
-   * @param opt Read options.
-   * @return a byte array storing the value associated with the input key if
-   *     any.  null if it does not find the specified key.
-   *
-   * @see RocksDBException
-   */
-  public byte[] get(ReadOptions opt, byte[] key) throws RocksDBException {
-    return get(nativeHandle_, opt.nativeHandle_, key, key.length);
-  }
-
-  /**
-   * Returns a map of keys for which values were found in DB.
-   *
-   * @param keys List of keys for which values need to be retrieved.
-   * @return Map where key of map is the key passed by user and value for map
-   * entry is the corresponding value in DB.
-   *
-   * @see RocksDBException
-   */
-  public Map<byte[], byte[]> multiGet(List<byte[]> keys)
-      throws RocksDBException {
-    assert(keys.size() != 0);
-
-    List<byte[]> values = multiGet(
-        nativeHandle_, keys, keys.size());
-
-    Map<byte[], byte[]> keyValueMap = new HashMap<byte[], byte[]>();
-    for(int i = 0; i < values.size(); i++) {
-      if(values.get(i) == null) {
-        continue;
-      }
-
-      keyValueMap.put(keys.get(i), values.get(i));
-    }
-
-    return keyValueMap;
-  }
-
-
-  /**
-   * Returns a map of keys for which values were found in DB.
-   *
-   * @param List of keys for which values need to be retrieved.
-   * @param opt Read options.
-   * @return Map where key of map is the key passed by user and value for map
-   * entry is the corresponding value in DB.
-   *
-   * @see RocksDBException
-   */
-  public Map<byte[], byte[]> multiGet(ReadOptions opt, List<byte[]> keys)
-      throws RocksDBException {
-    assert(keys.size() != 0);
-
-    List<byte[]> values = multiGet(
-        nativeHandle_, opt.nativeHandle_, keys, keys.size());
-
-    Map<byte[], byte[]> keyValueMap = new HashMap<byte[], byte[]>();
-    for(int i = 0; i < values.size(); i++) {
-      if(values.get(i) == null) {
-        continue;
-      }
-
-      keyValueMap.put(keys.get(i), values.get(i));
-    }
-
-    return keyValueMap;
-  }
-
-  /**
-   * Remove the database entry (if any) for "key".  Returns OK on
-   * success, and a non-OK status on error.  It is not an error if "key"
-   * did not exist in the database.
-   */
-  public void remove(byte[] key) throws RocksDBException {
-    remove(nativeHandle_, key, key.length);
-  }
-
-  /**
-   * Remove the database entry (if any) for "key".  Returns OK on
-   * success, and a non-OK status on error.  It is not an error if "key"
-   * did not exist in the database.
-   */
-  public void remove(WriteOptions writeOpt, byte[] key)
-      throws RocksDBException {
-    remove(nativeHandle_, writeOpt.nativeHandle_, key, key.length);
-  }
-
-  /**
-   * Return a heap-allocated iterator over the contents of the database.
-   * The result of newIterator() is initially invalid (caller must
-   * call one of the Seek methods on the iterator before using it).
-   *
-   * Caller should close the iterator when it is no longer needed.
-   * The returned iterator should be closed before this db is closed.
-   *
-   * @return instance of iterator object.
-   */
-  public Iterator newIterator() {
-    return new Iterator(iterator0(nativeHandle_));
-  }
-
-  @Override protected void finalize() {
-    close();
-  }
-
-  /**
-   * Private constructor.
-   */
-  protected RocksDB() {
-    super();
-  }
-
-  /**
-   * Transfer the ownership of all c++ raw-pointers from Options
-   * to RocksDB to ensure the life-time of those raw-pointers
-   * will be at least as long as the life-time of any RocksDB
-   * that uses these raw-pointers.
-   */
-  protected void transferCppRawPointersOwnershipFrom(Options opt) {
-    filter_ = opt.filter_;
-    opt.filter_ = null;
-  }
-
-  // native methods
-  protected native void open(
-      long optionsHandle, long cacheSize, String path) throws RocksDBException;
-  protected native void put(
-      long handle, byte[] key, int keyLen,
-      byte[] value, int valueLen) throws RocksDBException;
-  protected native void put(
-      long handle, long writeOptHandle,
-      byte[] key, int keyLen,
-      byte[] value, int valueLen) throws RocksDBException;
-  protected native void write(
-      long writeOptHandle, long batchHandle) throws RocksDBException;
-  protected native int get(
-      long handle, byte[] key, int keyLen,
-      byte[] value, int valueLen) throws RocksDBException;
-  protected native int get(
-      long handle, long readOptHandle, byte[] key, int keyLen,
-      byte[] value, int valueLen) throws RocksDBException;
-  protected native List<byte[]> multiGet(
-      long dbHandle, List<byte[]> keys, int keysCount);
-  protected native List<byte[]> multiGet(
-      long dbHandle, long rOptHandle, List<byte[]> keys, int keysCount);
-  protected native byte[] get(
-      long handle, byte[] key, int keyLen) throws RocksDBException;
-  protected native byte[] get(
-      long handle, long readOptHandle,
-      byte[] key, int keyLen) throws RocksDBException;
-  protected native void remove(
-      long handle, byte[] key, int keyLen) throws RocksDBException;
-  protected native void remove(
-      long handle, long writeOptHandle,
-      byte[] key, int keyLen) throws RocksDBException;
-  protected native long iterator0(long optHandle);
-  protected native void dispose(long handle);
-
-  protected Filter filter_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/RocksDBException.java b/src/rocksdb/java/org/rocksdb/RocksDBException.java
deleted file mode 100644
index acc9366..0000000
--- a/src/rocksdb/java/org/rocksdb/RocksDBException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-import java.util.*;
-
-/**
- * A RocksDBException encapsulates the error of an operation.  This exception
- * type is used to describe an internal error from the c++ rocksdb library.
- */
-public class RocksDBException extends Exception {
-  /**
-   * The private construct used by a set of public static factory method.
-   *
-   * @param msg the specified error message.
-   */
-  public RocksDBException(String msg) {
-    super(msg);
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/RocksObject.java b/src/rocksdb/java/org/rocksdb/RocksObject.java
deleted file mode 100644
index 6e36cba..0000000
--- a/src/rocksdb/java/org/rocksdb/RocksObject.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * RocksObject is the base-class of all RocksDB related class that has
- * a pointer to some c++ rocksdb object.  Although RocksObject
- * will release its c++ resource on its finalize() once it has been
- * garbage-collected, it is suggested to call dispose() manually to
- * release its c++ resource once an instance of RocksObject is no
- * longer used.
- */
-public abstract class RocksObject {
-  protected RocksObject() {
-    nativeHandle_ = 0;
-  }
-
-  /**
-   * Release the c++ object pointed by the native handle.
-   */
-  public abstract void dispose();
-
-  protected boolean isInitialized() {
-    return (nativeHandle_ != 0);
-  }
-
-  @Override protected void finalize() {
-    dispose();
-  }
-
-  protected long nativeHandle_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/SkipListMemTableConfig.java b/src/rocksdb/java/org/rocksdb/SkipListMemTableConfig.java
deleted file mode 100644
index 7f9f5cb..0000000
--- a/src/rocksdb/java/org/rocksdb/SkipListMemTableConfig.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.rocksdb;
-
-/**
- * The config for skip-list memtable representation.
- */
-public class SkipListMemTableConfig extends MemTableConfig {
-  public SkipListMemTableConfig() {
-  }
-
-  @Override protected long newMemTableFactoryHandle() {
-    return newMemTableFactoryHandle0();
-  }
-
-  private native long newMemTableFactoryHandle0();
-}
diff --git a/src/rocksdb/java/org/rocksdb/Statistics.java b/src/rocksdb/java/org/rocksdb/Statistics.java
deleted file mode 100644
index bed2b88..0000000
--- a/src/rocksdb/java/org/rocksdb/Statistics.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * Statistics to analyze the performance of a db. Pointer for statistics object
- * is managed by Options class.
- */
-public class Statistics {
-
-  private final long statsHandle_;
-
-  public Statistics(long statsHandle) {
-    statsHandle_ = statsHandle;
-  }
-
-  public long getTickerCount(TickerType tickerType) {
-    assert(isInitialized());
-    return getTickerCount0(tickerType.getValue(), statsHandle_);
-  }
-
-  public HistogramData geHistogramData(HistogramType histogramType) {
-    assert(isInitialized());
-    HistogramData hist = geHistogramData0(
-        histogramType.getValue(), statsHandle_);
-    return hist;
-  }
-
-  private boolean isInitialized() {
-    return (statsHandle_ != 0);
-  }
-
-  private native long getTickerCount0(int tickerType, long handle);
-  private native HistogramData geHistogramData0(int histogramType, long handle);
-}
diff --git a/src/rocksdb/java/org/rocksdb/TableFormatConfig.java b/src/rocksdb/java/org/rocksdb/TableFormatConfig.java
deleted file mode 100644
index e5c6341..0000000
--- a/src/rocksdb/java/org/rocksdb/TableFormatConfig.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-package org.rocksdb;
-
-/**
- * TableFormatConfig is used to config the internal Table format of a RocksDB.
- * To make a RocksDB to use a specific Table format, its associated
- * TableFormatConfig should be properly set and passed into Options via
- * Options.setTableFormatConfig() and open the db using that Options.
- */
-public abstract class TableFormatConfig {
-  /**
-   * This function should only be called by Options.setTableFormatConfig(),
-   * which will create a c++ shared-pointer to the c++ TableFactory
-   * that associated with the Java TableFormatConfig.
-   */
-  abstract protected long newTableFactoryHandle();
-}
diff --git a/src/rocksdb/java/org/rocksdb/TickerType.java b/src/rocksdb/java/org/rocksdb/TickerType.java
deleted file mode 100644
index 5ad714d..0000000
--- a/src/rocksdb/java/org/rocksdb/TickerType.java
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-public enum TickerType {
-  // total block cache misses
-  // REQUIRES: BLOCK_CACHE_MISS == BLOCK_CACHE_INDEX_MISS +
-  //                               BLOCK_CACHE_FILTER_MISS +
-  //                               BLOCK_CACHE_DATA_MISS;
-  BLOCK_CACHE_MISS(0),
-  // total block cache hit
-  // REQUIRES: BLOCK_CACHE_HIT == BLOCK_CACHE_INDEX_HIT +
-  //                              BLOCK_CACHE_FILTER_HIT +
-  //                              BLOCK_CACHE_DATA_HIT;
-  BLOCK_CACHE_HIT(1),
-  // # of blocks added to block cache.
-  BLOCK_CACHE_ADD(2),
-  // # of times cache miss when accessing index block from block cache.
-  BLOCK_CACHE_INDEX_MISS(3),
-  // # of times cache hit when accessing index block from block cache.
-  BLOCK_CACHE_INDEX_HIT(4),
-  // # of times cache miss when accessing filter block from block cache.
-  BLOCK_CACHE_FILTER_MISS(5),
-  // # of times cache hit when accessing filter block from block cache.
-  BLOCK_CACHE_FILTER_HIT(6),
-  // # of times cache miss when accessing data block from block cache.
-  BLOCK_CACHE_DATA_MISS(7),
-  // # of times cache hit when accessing data block from block cache.
-  BLOCK_CACHE_DATA_HIT(8),
-  // # of times bloom filter has avoided file reads.
-  BLOOM_FILTER_USEFUL(9),
-
-  // # of memtable hits.
-  MEMTABLE_HIT(10),
-  // # of memtable misses.
-  MEMTABLE_MISS(11),
-
-  /**
-   * COMPACTION_KEY_DROP_* count the reasons for key drop during compaction
-   * There are 3 reasons currently.
-   */
-  COMPACTION_KEY_DROP_NEWER_ENTRY(12),  // key was written with a newer value.
-  COMPACTION_KEY_DROP_OBSOLETE(13),     // The key is obsolete.
-  COMPACTION_KEY_DROP_USER(14),  // user compaction function has dropped the key.
-
-  // Number of keys written to the database via the Put and Write call's
-  NUMBER_KEYS_WRITTEN(15),
-  // Number of Keys read,
-  NUMBER_KEYS_READ(16),
-  // Number keys updated, if inplace update is enabled
-  NUMBER_KEYS_UPDATED(17),
-  // Bytes written / read
-  BYTES_WRITTEN(18),
-  BYTES_READ(19),
-  NO_FILE_CLOSES(20),
-  NO_FILE_OPENS(21),
-  NO_FILE_ERRORS(22),
-  // Time system had to wait to do LO-L1 compactions
-  STALL_L0_SLOWDOWN_MICROS(23),
-  // Time system had to wait to move memtable to L1.
-  STALL_MEMTABLE_COMPACTION_MICROS(24),
-  // write throttle because of too many files in L0
-  STALL_L0_NUM_FILES_MICROS(25),
-  RATE_LIMIT_DELAY_MILLIS(26),
-  NO_ITERATORS(27),  // number of iterators currently open
-
-  // Number of MultiGet calls, keys read, and bytes read
-  NUMBER_MULTIGET_CALLS(28),
-  NUMBER_MULTIGET_KEYS_READ(29),
-  NUMBER_MULTIGET_BYTES_READ(30),
-
-  // Number of deletes records that were not required to be
-  // written to storage because key does not exist
-  NUMBER_FILTERED_DELETES(31),
-  NUMBER_MERGE_FAILURES(32),
-  SEQUENCE_NUMBER(33),
-
-  // number of times bloom was checked before creating iterator on a
-  // file, and the number of times the check was useful in avoiding
-  // iterator creation (and thus likely IOPs).
-  BLOOM_FILTER_PREFIX_CHECKED(34),
-  BLOOM_FILTER_PREFIX_USEFUL(35),
-
-  // Number of times we had to reseek inside an iteration to skip
-  // over large number of keys with same userkey.
-  NUMBER_OF_RESEEKS_IN_ITERATION(36),
-
-  // Record the number of calls to GetUpadtesSince. Useful to keep track of
-  // transaction log iterator refreshes
-  GET_UPDATES_SINCE_CALLS(37),
-  BLOCK_CACHE_COMPRESSED_MISS(38),  // miss in the compressed block cache
-  BLOCK_CACHE_COMPRESSED_HIT(39),   // hit in the compressed block cache
-  WAL_FILE_SYNCED(40),              // Number of times WAL sync is done
-  WAL_FILE_BYTES(41),               // Number of bytes written to WAL
-
-  // Writes can be processed by requesting thread or by the thread at the
-  // head of the writers queue.
-  WRITE_DONE_BY_SELF(42),
-  WRITE_DONE_BY_OTHER(43),
-  WRITE_WITH_WAL(44),       // Number of Write calls that request WAL
-  COMPACT_READ_BYTES(45),   // Bytes read during compaction
-  COMPACT_WRITE_BYTES(46),  // Bytes written during compaction
-
-  // Number of table's properties loaded directly from file, without creating
-  // table reader object.
-  NUMBER_DIRECT_LOAD_TABLE_PROPERTIES(47),
-  NUMBER_SUPERVERSION_ACQUIRES(48),
-  NUMBER_SUPERVERSION_RELEASES(49),
-  NUMBER_SUPERVERSION_CLEANUPS(50);
-
-  private final int value_;
-
-  private TickerType(int value) {
-    value_ = value;
-  }
-
-  public int getValue() {
-    return value_;
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/VectorMemTableConfig.java b/src/rocksdb/java/org/rocksdb/VectorMemTableConfig.java
deleted file mode 100644
index b7a413f..0000000
--- a/src/rocksdb/java/org/rocksdb/VectorMemTableConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.rocksdb;
-
-/**
- * The config for vector memtable representation.
- */
-public class VectorMemTableConfig extends MemTableConfig {
-  public static final int DEFAULT_RESERVED_SIZE = 0;
-  public VectorMemTableConfig() {
-    reservedSize_ = DEFAULT_RESERVED_SIZE;
-  }
-
-  /**
-   * Set the initial size of the vector that will be used
-   * by the memtable created based on this config.
-   *
-   * @param size the initial size of the vector.
-   * @return the reference to the current config.
-   */
-  public VectorMemTableConfig setReservedSize(int size) {
-    reservedSize_ = size;
-    return this;
-  }
-
-  /**
-   * Returns the initial size of the vector used by the memtable
-   * created based on this config.
-   *
-   * @return the initial size of the vector.
-   */
-  public int reservedSize() {
-    return reservedSize_;
-  }
-
-  @Override protected long newMemTableFactoryHandle() {
-    return newMemTableFactoryHandle(reservedSize_);
-  }
-
-  private native long newMemTableFactoryHandle(long reservedSize);
-  private int reservedSize_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/WriteBatch.java b/src/rocksdb/java/org/rocksdb/WriteBatch.java
deleted file mode 100644
index 1ddbd44..0000000
--- a/src/rocksdb/java/org/rocksdb/WriteBatch.java
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-import java.util.*;
-
-/**
- * WriteBatch holds a collection of updates to apply atomically to a DB.
- *
- * The updates are applied in the order in which they are added
- * to the WriteBatch.  For example, the value of "key" will be "v3"
- * after the following batch is written:
- *
- *    batch.put("key", "v1");
- *    batch.remove("key");
- *    batch.put("key", "v2");
- *    batch.put("key", "v3");
- *
- * Multiple threads can invoke const methods on a WriteBatch without
- * external synchronization, but if any of the threads may call a
- * non-const method, all threads accessing the same WriteBatch must use
- * external synchronization.
- */
-public class WriteBatch extends RocksObject {
-  public WriteBatch() {
-    super();
-    newWriteBatch(0);
-  }
-
-  public WriteBatch(int reserved_bytes) {
-    nativeHandle_ = 0;
-    newWriteBatch(reserved_bytes);
-  }
-
-  /**
-   * Returns the number of updates in the batch.
-   */
-  public native int count();
-
-  /**
-   * Store the mapping "key->value" in the database.
-   */
-  public void put(byte[] key, byte[] value) {
-    put(key, key.length, value, value.length);
-  }
-
-  /**
-   * Merge "value" with the existing value of "key" in the database.
-   * "key->merge(existing, value)"
-   */
-  public void merge(byte[] key, byte[] value) {
-    merge(key, key.length, value, value.length);
-  }
-
-  /**
-   * If the database contains a mapping for "key", erase it.  Else do nothing.
-   */
-  public void remove(byte[] key) {
-    remove(key, key.length);
-  }
-
-  /**
-   * Append a blob of arbitrary size to the records in this batch. The blob will
-   * be stored in the transaction log but not in any other file. In particular,
-   * it will not be persisted to the SST files. When iterating over this
-   * WriteBatch, WriteBatch::Handler::LogData will be called with the contents
-   * of the blob as it is encountered. Blobs, puts, deletes, and merges will be
-   * encountered in the same order in thich they were inserted. The blob will
-   * NOT consume sequence number(s) and will NOT increase the count of the batch
-   *
-   * Example application: add timestamps to the transaction log for use in
-   * replication.
-   */
-  public void putLogData(byte[] blob) {
-    putLogData(blob, blob.length);
-  }
-
-  /**
-   * Clear all updates buffered in this batch
-   */
-  public native void clear();
-
-  /**
-   * Delete the c++ side pointer.
-   */
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose0();
-    }
-  }
-
-  private native void newWriteBatch(int reserved_bytes);
-  private native void put(byte[] key, int keyLen,
-                          byte[] value, int valueLen);
-  private native void merge(byte[] key, int keyLen,
-                            byte[] value, int valueLen);
-  private native void remove(byte[] key, int keyLen);
-  private native void putLogData(byte[] blob, int blobLen);
-  private native void dispose0();
-}
-
-/**
- * Package-private class which provides java api to access
- * c++ WriteBatchInternal.
- */
-class WriteBatchInternal {
-  static native void setSequence(WriteBatch batch, long sn);
-  static native long sequence(WriteBatch batch);
-  static native void append(WriteBatch b1, WriteBatch b2);
-}
diff --git a/src/rocksdb/java/org/rocksdb/WriteBatchTest.java b/src/rocksdb/java/org/rocksdb/WriteBatchTest.java
deleted file mode 100644
index 03a8663..0000000
--- a/src/rocksdb/java/org/rocksdb/WriteBatchTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-//  Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-package org.rocksdb;
-
-import java.util.*;
-import java.io.UnsupportedEncodingException;
-
-/**
- * This class mimics the db/write_batch_test.cc in the c++ rocksdb library.
- */
-public class WriteBatchTest {
-  static {
-    RocksDB.loadLibrary();
-  }
-
-  public static void main(String args[]) {
-    System.out.println("Testing WriteBatchTest.Empty ===");
-    Empty();
-
-    System.out.println("Testing WriteBatchTest.Multiple ===");
-    Multiple();
-
-    System.out.println("Testing WriteBatchTest.Append ===");
-    Append();
-
-    System.out.println("Testing WriteBatchTest.Blob ===");
-    Blob();
-
-    // The following tests have not yet ported.
-    // Continue();
-    // PutGatherSlices();
-
-    System.out.println("Passed all WriteBatchTest!");
-  }
-
-  static void Empty() {
-    WriteBatch batch = new WriteBatch();
-    assert(batch.count() == 0);
-  }
-
-  static void Multiple() {
-    try {
-      WriteBatch batch =  new WriteBatch();
-      batch.put("foo".getBytes("US-ASCII"), "bar".getBytes("US-ASCII"));
-      batch.remove("box".getBytes("US-ASCII"));
-      batch.put("baz".getBytes("US-ASCII"), "boo".getBytes("US-ASCII"));
-      WriteBatchInternal.setSequence(batch, 100);
-      assert(100 == WriteBatchInternal.sequence(batch));
-      assert(3 == batch.count());
-      assert(new String("Put(baz, boo)@102" +
-                        "Delete(box)@101" +
-                        "Put(foo, bar)@100")
-                .equals(new String(getContents(batch), "US-ASCII")));
-    } catch (UnsupportedEncodingException e) {
-      System.err.println(e);
-      assert(false);
-    }
-  }
-
-  static void Append() {
-    WriteBatch b1 = new WriteBatch();
-    WriteBatch b2 = new WriteBatch();
-    WriteBatchInternal.setSequence(b1, 200);
-    WriteBatchInternal.setSequence(b2, 300);
-    WriteBatchInternal.append(b1, b2);
-    assert(getContents(b1).length == 0);
-    assert(b1.count() == 0);
-    try {
-      b2.put("a".getBytes("US-ASCII"), "va".getBytes("US-ASCII"));
-      WriteBatchInternal.append(b1, b2);
-      assert("Put(a, va)@200".equals(new String(getContents(b1), "US-ASCII")));
-      assert(1 == b1.count());
-      b2.clear();
-      b2.put("b".getBytes("US-ASCII"), "vb".getBytes("US-ASCII"));
-      WriteBatchInternal.append(b1, b2);
-      assert(new String("Put(a, va)@200" +
-                        "Put(b, vb)@201")
-                .equals(new String(getContents(b1), "US-ASCII")));
-      assert(2 == b1.count());
-      b2.remove("foo".getBytes("US-ASCII"));
-      WriteBatchInternal.append(b1, b2);
-      assert(new String("Put(a, va)@200" +
-                        "Put(b, vb)@202" +
-                        "Put(b, vb)@201" +
-                        "Delete(foo)@203")
-                 .equals(new String(getContents(b1), "US-ASCII")));
-      assert(4 == b1.count());
-    } catch (UnsupportedEncodingException e) {
-      System.err.println(e);
-      assert(false);
-    }
-  }
-
-  static void Blob() {
-    WriteBatch batch = new WriteBatch();
-    try {
-      batch.put("k1".getBytes("US-ASCII"), "v1".getBytes("US-ASCII"));
-      batch.put("k2".getBytes("US-ASCII"), "v2".getBytes("US-ASCII"));
-      batch.put("k3".getBytes("US-ASCII"), "v3".getBytes("US-ASCII"));
-      batch.putLogData("blob1".getBytes("US-ASCII"));
-      batch.remove("k2".getBytes("US-ASCII"));
-      batch.putLogData("blob2".getBytes("US-ASCII"));
-      batch.merge("foo".getBytes("US-ASCII"), "bar".getBytes("US-ASCII"));
-      assert(5 == batch.count());
-      assert(new String("Merge(foo, bar)@4" +
-                        "Put(k1, v1)@0" +
-                        "Delete(k2)@3" +
-                        "Put(k2, v2)@1" +
-                        "Put(k3, v3)@2")
-                .equals(new String(getContents(batch), "US-ASCII")));
-    } catch (UnsupportedEncodingException e) {
-      System.err.println(e);
-      assert(false);
-    }
-  }
-
-  static native byte[] getContents(WriteBatch batch);
-}
diff --git a/src/rocksdb/java/org/rocksdb/WriteOptions.java b/src/rocksdb/java/org/rocksdb/WriteOptions.java
deleted file mode 100644
index f4a1d6a..0000000
--- a/src/rocksdb/java/org/rocksdb/WriteOptions.java
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb;
-
-/**
- * Options that control write operations.
- *
- * Note that developers should call WriteOptions.dispose() to release the
- * c++ side memory before a WriteOptions instance runs out of scope.
- */
-public class WriteOptions extends RocksObject {
-  public WriteOptions() {
-    super();
-    newWriteOptions();
-  }
-
-  @Override public synchronized void dispose() {
-    if (isInitialized()) {
-      dispose0(nativeHandle_);
-    }
-  }
-
-  /**
-   * If true, the write will be flushed from the operating system
-   * buffer cache (by calling WritableFile::Sync()) before the write
-   * is considered complete.  If this flag is true, writes will be
-   * slower.
-   *
-   * If this flag is false, and the machine crashes, some recent
-   * writes may be lost.  Note that if it is just the process that
-   * crashes (i.e., the machine does not reboot), no writes will be
-   * lost even if sync==false.
-   *
-   * In other words, a DB write with sync==false has similar
-   * crash semantics as the "write()" system call.  A DB write
-   * with sync==true has similar crash semantics to a "write()"
-   * system call followed by "fdatasync()".
-   *
-   * Default: false
-   *
-   * @param flag a boolean flag to indicate whether a write
-   *     should be synchronized.
-   * @return the instance of the current WriteOptions.
-   */
-  public WriteOptions setSync(boolean flag) {
-    setSync(nativeHandle_, flag);
-    return this;
-  }
-
-  /**
-   * If true, the write will be flushed from the operating system
-   * buffer cache (by calling WritableFile::Sync()) before the write
-   * is considered complete.  If this flag is true, writes will be
-   * slower.
-   *
-   * If this flag is false, and the machine crashes, some recent
-   * writes may be lost.  Note that if it is just the process that
-   * crashes (i.e., the machine does not reboot), no writes will be
-   * lost even if sync==false.
-   *
-   * In other words, a DB write with sync==false has similar
-   * crash semantics as the "write()" system call.  A DB write
-   * with sync==true has similar crash semantics to a "write()"
-   * system call followed by "fdatasync()".
-   */
-  public boolean sync() {
-    return sync(nativeHandle_);
-  }
-
-  /**
-   * If true, writes will not first go to the write ahead log,
-   * and the write may got lost after a crash.
-   *
-   * @param flag a boolean flag to specify whether to disable
-   *     write-ahead-log on writes.
-   * @return the instance of the current WriteOptions.
-   */
-  public WriteOptions setDisableWAL(boolean flag) {
-    setDisableWAL(nativeHandle_, flag);
-    return this;
-  }
-
-  /**
-   * If true, writes will not first go to the write ahead log,
-   * and the write may got lost after a crash.
-   */
-  public boolean disableWAL() {
-    return disableWAL(nativeHandle_);
-  }
-
-  private native void newWriteOptions();
-  private native void setSync(long handle, boolean flag);
-  private native boolean sync(long handle);
-  private native void setDisableWAL(long handle, boolean flag);
-  private native boolean disableWAL(long handle);
-  private native void dispose0(long handle);
-}
diff --git a/src/rocksdb/java/org/rocksdb/benchmark/DbBenchmark.java b/src/rocksdb/java/org/rocksdb/benchmark/DbBenchmark.java
deleted file mode 100644
index 5404b72..0000000
--- a/src/rocksdb/java/org/rocksdb/benchmark/DbBenchmark.java
+++ /dev/null
@@ -1,1577 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-/**
- * Copyright (C) 2011 the original author or authors.
- * See the notice.md file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.rocksdb.benchmark;
-
-import java.lang.Runnable;
-import java.io.File;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.Date;
-import java.util.EnumMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.TimeUnit;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import org.rocksdb.*;
-import org.rocksdb.util.SizeUnit;
-
-class Stats {
-  int id_;
-  long start_;
-  long finish_;
-  double seconds_;
-  long done_;
-  long found_;
-  long lastOpTime_;
-  long nextReport_;
-  long bytes_;
-  StringBuilder message_;
-  boolean excludeFromMerge_;
-
-  // TODO(yhchiang): use the following arguments:
-  //   (Long)Flag.stats_interval
-  //   (Integer)Flag.stats_per_interval
-
-  Stats(int id) {
-    id_ = id;
-    nextReport_ = 100;
-    done_ = 0;
-    bytes_ = 0;
-    seconds_ = 0;
-    start_ = System.nanoTime();
-    lastOpTime_ = start_;
-    finish_ = start_;
-    found_ = 0;
-    message_ = new StringBuilder("");
-    excludeFromMerge_ = false;
-  }
-
-  void merge(final Stats other) {
-    if (other.excludeFromMerge_) {
-      return;
-    }
-
-    done_ += other.done_;
-    found_ += other.found_;
-    bytes_ += other.bytes_;
-    seconds_ += other.seconds_;
-    if (other.start_ < start_) start_ = other.start_;
-    if (other.finish_ > finish_) finish_ = other.finish_;
-
-    // Just keep the messages from one thread
-    if (message_.length() == 0) {
-      message_ = other.message_;
-    }
-  }
-
-  void stop() {
-    finish_ = System.nanoTime();
-    seconds_ = (double) (finish_ - start_) / 1000000;
-  }
-
-  void addMessage(String msg) {
-    if (message_.length() > 0) {
-      message_.append(" ");
-    }
-    message_.append(msg);
-  }
-
-  void setId(int id) { id_ = id; }
-  void setExcludeFromMerge() { excludeFromMerge_ = true; }
-
-  void finishedSingleOp(int bytes) {
-    done_++;
-    lastOpTime_ = System.nanoTime();
-    bytes_ += bytes;
-    if (done_ >= nextReport_) {
-      if (nextReport_ < 1000) {
-        nextReport_ += 100;
-      } else if (nextReport_ < 5000) {
-        nextReport_ += 500;
-      } else if (nextReport_ < 10000) {
-        nextReport_ += 1000;
-      } else if (nextReport_ < 50000) {
-        nextReport_ += 5000;
-      } else if (nextReport_ < 100000) {
-        nextReport_ += 10000;
-      } else if (nextReport_ < 500000) {
-        nextReport_ += 50000;
-      } else {
-        nextReport_ += 100000;
-      }
-      System.err.printf("... Task %s finished %d ops%30s\r", id_, done_, "");
-    }
-  }
-
-  void report(String name) {
-    // Pretend at least one op was done in case we are running a benchmark
-    // that does not call FinishedSingleOp().
-    if (done_ < 1) done_ = 1;
-
-    StringBuilder extra = new StringBuilder("");
-    if (bytes_ > 0) {
-      // Rate is computed on actual elapsed time, not the sum of per-thread
-      // elapsed times.
-      double elapsed = (finish_ - start_) * 1e-6;
-      extra.append(String.format("%6.1f MB/s", (bytes_ / 1048576.0) / elapsed));
-    }
-    extra.append(message_.toString());
-    double elapsed = (finish_ - start_) * 1e-6;
-    double throughput = (double) done_ / elapsed;
-
-    System.out.format("%-12s : %11.3f micros/op %d ops/sec;%s%s\n",
-            name, elapsed * 1e6 / done_,
-            (long) throughput, (extra.length() == 0 ? "" : " "), extra.toString());
-  }
-}
-
-public class DbBenchmark {
-  enum Order {
-    SEQUENTIAL,
-    RANDOM
-  }
-
-  enum DBState {
-    FRESH,
-    EXISTING
-  }
-
-  enum CompressionType {
-    NONE,
-    SNAPPY,
-    ZLIB,
-    BZIP2,
-    LZ4,
-    LZ4HC
-  }
-
-  static {
-    RocksDB.loadLibrary();
-  }
-
-  abstract class BenchmarkTask implements Callable<Stats> {
-    // TODO(yhchiang): use (Integer)Flag.perf_level.
-    public BenchmarkTask(
-        int tid, long randSeed, long numEntries, long keyRange) {
-      tid_ = tid;
-      rand_ = new Random(randSeed + tid * 1000);
-      numEntries_ = numEntries;
-      keyRange_ = keyRange;
-      stats_ = new Stats(tid);
-    }
-
-    @Override public Stats call() throws RocksDBException {
-      stats_.start_ = System.nanoTime();
-      runTask();
-      stats_.finish_ = System.nanoTime();
-      return stats_;
-    }
-
-    abstract protected void runTask() throws RocksDBException;
-
-    protected int tid_;
-    protected Random rand_;
-    protected long numEntries_;
-    protected long keyRange_;
-    protected Stats stats_;
-
-    protected void getFixedKey(byte[] key, long sn) {
-      generateKeyFromLong(key, sn);
-    }
-
-    protected void getRandomKey(byte[] key, long range) {
-      generateKeyFromLong(key, Math.abs(rand_.nextLong() % range));
-    }
-  }
-
-  abstract class WriteTask extends BenchmarkTask {
-    public WriteTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch) {
-      super(tid, randSeed, numEntries, keyRange);
-      writeOpt_ = writeOpt;
-      entriesPerBatch_ = entriesPerBatch;
-      maxWritesPerSecond_ = -1;
-    }
-
-    public WriteTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch, long maxWritesPerSecond) {
-      super(tid, randSeed, numEntries, keyRange);
-      writeOpt_ = writeOpt;
-      entriesPerBatch_ = entriesPerBatch;
-      maxWritesPerSecond_ = maxWritesPerSecond;
-    }
-
-    @Override public void runTask() throws RocksDBException {
-      if (numEntries_ != DbBenchmark.this.num_) {
-        stats_.message_.append(String.format(" (%d ops)", numEntries_));
-      }
-      byte[] key = new byte[keySize_];
-      byte[] value = new byte[valueSize_];
-
-      try {
-        if (entriesPerBatch_ == 1) {
-          for (long i = 0; i < numEntries_; ++i) {
-            getKey(key, i, keyRange_);
-            db_.put(writeOpt_, key, DbBenchmark.this.gen_.generate(valueSize_));
-            stats_.finishedSingleOp(keySize_ + valueSize_);
-            writeRateControl(i);
-            if (isFinished()) {
-              return;
-            }
-          }
-        } else {
-          for (long i = 0; i < numEntries_; i += entriesPerBatch_) {
-            WriteBatch batch = new WriteBatch();
-            for (long j = 0; j < entriesPerBatch_; j++) {
-              getKey(key, i + j, keyRange_);
-              batch.put(key, DbBenchmark.this.gen_.generate(valueSize_));
-              stats_.finishedSingleOp(keySize_ + valueSize_);
-            }
-            db_.write(writeOpt_, batch);
-            batch.dispose();
-            writeRateControl(i);
-            if (isFinished()) {
-              return;
-            }
-          }
-        }
-      } catch (InterruptedException e) {
-        // thread has been terminated.
-      }
-    }
-
-    protected void writeRateControl(long writeCount)
-        throws InterruptedException {
-      if (maxWritesPerSecond_ <= 0) return;
-      long minInterval =
-          writeCount * TimeUnit.SECONDS.toNanos(1) / maxWritesPerSecond_;
-      long interval = System.nanoTime() - stats_.start_;
-      if (minInterval - interval > TimeUnit.MILLISECONDS.toNanos(1)) {
-        TimeUnit.NANOSECONDS.sleep(minInterval - interval);
-      }
-    }
-
-    abstract protected void getKey(byte[] key, long id, long range);
-    protected WriteOptions writeOpt_;
-    protected long entriesPerBatch_;
-    protected long maxWritesPerSecond_;
-  }
-
-  class WriteSequentialTask extends WriteTask {
-    public WriteSequentialTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch) {
-      super(tid, randSeed, numEntries, keyRange,
-            writeOpt, entriesPerBatch);
-    }
-    public WriteSequentialTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch,
-        long maxWritesPerSecond) {
-      super(tid, randSeed, numEntries, keyRange,
-            writeOpt, entriesPerBatch,
-            maxWritesPerSecond);
-    }
-    @Override protected void getKey(byte[] key, long id, long range) {
-      getFixedKey(key, id);
-    }
-  }
-
-  class WriteRandomTask extends WriteTask {
-    public WriteRandomTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch) {
-      super(tid, randSeed, numEntries, keyRange,
-            writeOpt, entriesPerBatch);
-    }
-    public WriteRandomTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch,
-        long maxWritesPerSecond) {
-      super(tid, randSeed, numEntries, keyRange,
-            writeOpt, entriesPerBatch,
-            maxWritesPerSecond);
-    }
-    @Override protected void getKey(byte[] key, long id, long range) {
-      getRandomKey(key, range);
-    }
-  }
-
-  class WriteUniqueRandomTask extends WriteTask {
-    static final int MAX_BUFFER_SIZE = 10000000;
-    public WriteUniqueRandomTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch) {
-      super(tid, randSeed, numEntries, keyRange,
-            writeOpt, entriesPerBatch);
-      initRandomKeySequence();
-    }
-    public WriteUniqueRandomTask(
-        int tid, long randSeed, long numEntries, long keyRange,
-        WriteOptions writeOpt, long entriesPerBatch,
-        long maxWritesPerSecond) {
-      super(tid, randSeed, numEntries, keyRange,
-            writeOpt, entriesPerBatch,
-            maxWritesPerSecond);
-      initRandomKeySequence();
-    }
-    @Override protected void getKey(byte[] key, long id, long range) {
-      generateKeyFromLong(key, nextUniqueRandom());
-    }
-
-    protected void initRandomKeySequence() {
-      bufferSize_ = MAX_BUFFER_SIZE;
-      if (bufferSize_ > keyRange_) {
-        bufferSize_ = (int) keyRange_;
-      }
-      currentKeyCount_ = bufferSize_;
-      keyBuffer_ = new long[MAX_BUFFER_SIZE];
-      for (int k = 0; k < bufferSize_; ++k) {
-        keyBuffer_[k] = k;
-      }
-    }
-
-    /**
-     * Semi-randomly return the next unique key.  It is guaranteed to be
-     * fully random if keyRange_ <= MAX_BUFFER_SIZE.
-     */
-    long nextUniqueRandom() {
-      if (bufferSize_ == 0) {
-        System.err.println("bufferSize_ == 0.");
-        return 0;
-      }
-      int r = rand_.nextInt(bufferSize_);
-      // randomly pick one from the keyBuffer
-      long randKey = keyBuffer_[r];
-      if (currentKeyCount_ < keyRange_) {
-        // if we have not yet inserted all keys, insert next new key to [r].
-        keyBuffer_[r] = currentKeyCount_++;
-      } else {
-        // move the last element to [r] and decrease the size by 1.
-        keyBuffer_[r] = keyBuffer_[--bufferSize_];
-      }
-      return randKey;
-    }
-
-    int bufferSize_;
-    long currentKeyCount_;
-    long[] keyBuffer_;
-  }
-
-  class ReadRandomTask extends BenchmarkTask {
-    public ReadRandomTask(
-        int tid, long randSeed, long numEntries, long keyRange) {
-      super(tid, randSeed, numEntries, keyRange);
-    }
-    @Override public void runTask() throws RocksDBException {
-      byte[] key = new byte[keySize_];
-      byte[] value = new byte[valueSize_];
-      for (long i = 0; i < numEntries_; i++) {
-        getRandomKey(key, numEntries_);
-        int len = db_.get(key, value);
-        if (len != RocksDB.NOT_FOUND) {
-          stats_.found_++;
-          stats_.finishedSingleOp(keySize_ + valueSize_);
-        } else {
-          stats_.finishedSingleOp(keySize_);
-        }
-        if (isFinished()) {
-          return;
-        }
-      }
-    }
-  }
-
-  class ReadSequentialTask extends BenchmarkTask {
-    public ReadSequentialTask(
-        int tid, long randSeed, long numEntries, long keyRange) {
-      super(tid, randSeed, numEntries, keyRange);
-    }
-    @Override public void runTask() throws RocksDBException {
-      org.rocksdb.Iterator iter = db_.newIterator();
-      long i;
-      for (iter.seekToFirst(), i = 0;
-           iter.isValid() && i < numEntries_;
-           iter.next(), ++i) {
-        stats_.found_++;
-        stats_.finishedSingleOp(iter.key().length + iter.value().length);
-        if (isFinished()) {
-          return;
-        }
-      }
-    }
-  }
-
-  public DbBenchmark(Map<Flag, Object> flags) throws Exception {
-    benchmarks_ = (List<String>) flags.get(Flag.benchmarks);
-    num_ = (Integer) flags.get(Flag.num);
-    threadNum_ = (Integer) flags.get(Flag.threads);
-    reads_ = (Integer) (flags.get(Flag.reads) == null ?
-        flags.get(Flag.num) : flags.get(Flag.reads));
-    keySize_ = (Integer) flags.get(Flag.key_size);
-    valueSize_ = (Integer) flags.get(Flag.value_size);
-    compressionRatio_ = (Double) flags.get(Flag.compression_ratio);
-    useExisting_ = (Boolean) flags.get(Flag.use_existing_db);
-    randSeed_ = (Long) flags.get(Flag.seed);
-    databaseDir_ = (String) flags.get(Flag.db);
-    writesPerSeconds_ = (Integer) flags.get(Flag.writes_per_second);
-    cacheSize_ = (Long) flags.get(Flag.cache_size);
-    memtable_ = (String) flags.get(Flag.memtablerep);
-    maxWriteBufferNumber_ = (Integer) flags.get(Flag.max_write_buffer_number);
-    prefixSize_ = (Integer) flags.get(Flag.prefix_size);
-    keysPerPrefix_ = (Integer) flags.get(Flag.keys_per_prefix);
-    hashBucketCount_ = (Long) flags.get(Flag.hash_bucket_count);
-    usePlainTable_ = (Boolean) flags.get(Flag.use_plain_table);
-    flags_ = flags;
-    finishLock_ = new Object();
-    // options.setPrefixSize((Integer)flags_.get(Flag.prefix_size));
-    // options.setKeysPerPrefix((Long)flags_.get(Flag.keys_per_prefix));
-    compressionType_ = (String) flags.get(Flag.compression_type);
-    compression_ = CompressionType.NONE;
-    try {
-      if (compressionType_.equals("snappy")) {
-        System.loadLibrary("snappy");
-      } else if (compressionType_.equals("zlib")) {
-        System.loadLibrary("zlib");
-      } else if (compressionType_.equals("bzip2")) {
-        System.loadLibrary("bzip2");
-      } else if (compressionType_.equals("lz4")) {
-        System.loadLibrary("lz4");
-      } else if (compressionType_.equals("lz4hc")) {
-        System.loadLibrary("lz4hc");
-      }
-    } catch (UnsatisfiedLinkError e) {
-      System.err.format("Unable to load %s library:%s%n" +
-                        "No compression is used.%n",
-          compressionType_, e.toString());
-      compressionType_ = "none";
-      compressionRatio_ = 1.0;
-    }
-    gen_ = new RandomGenerator(randSeed_, compressionRatio_);
-  }
-
-  private void prepareReadOptions(ReadOptions options) {
-    options.setVerifyChecksums((Boolean)flags_.get(Flag.verify_checksum));
-    options.setTailing((Boolean)flags_.get(Flag.use_tailing_iterator));
-  }
-
-  private void prepareWriteOptions(WriteOptions options) {
-    options.setSync((Boolean)flags_.get(Flag.sync));
-    options.setDisableWAL((Boolean)flags_.get(Flag.disable_wal));
-  }
-
-  private void prepareOptions(Options options) {
-    options.setCacheSize(cacheSize_);
-    if (!useExisting_) {
-      options.setCreateIfMissing(true);
-    } else {
-      options.setCreateIfMissing(false);
-    }
-    if (memtable_.equals("skip_list")) {
-      options.setMemTableConfig(new SkipListMemTableConfig());
-    } else if (memtable_.equals("vector")) {
-      options.setMemTableConfig(new VectorMemTableConfig());
-    } else if (memtable_.equals("hash_linkedlist")) {
-      options.setMemTableConfig(
-          new HashLinkedListMemTableConfig()
-              .setBucketCount(hashBucketCount_));
-      options.useFixedLengthPrefixExtractor(prefixSize_);
-    } else if (memtable_.equals("hash_skiplist") ||
-               memtable_.equals("prefix_hash")) {
-      options.setMemTableConfig(
-          new HashSkipListMemTableConfig()
-              .setBucketCount(hashBucketCount_));
-      options.useFixedLengthPrefixExtractor(prefixSize_);
-    } else {
-      System.err.format(
-          "unable to detect the specified memtable, " +
-          "use the default memtable factory %s%n",
-          options.memTableFactoryName());
-    }
-    if (usePlainTable_) {
-      options.setTableFormatConfig(
-          new PlainTableConfig().setKeySize(keySize_));
-    }
-    options.setWriteBufferSize(
-        (Long)flags_.get(Flag.write_buffer_size));
-    options.setMaxWriteBufferNumber(
-        (Integer)flags_.get(Flag.max_write_buffer_number));
-    options.setMaxBackgroundCompactions(
-        (Integer)flags_.get(Flag.max_background_compactions));
-    options.setMaxBackgroundFlushes(
-        (Integer)flags_.get(Flag.max_background_flushes));
-    options.setCacheSize(
-        (Long)flags_.get(Flag.cache_size));
-    options.setBlockSize(
-        (Long)flags_.get(Flag.block_size));
-    options.setMaxOpenFiles(
-        (Integer)flags_.get(Flag.open_files));
-    options.setCreateIfMissing(
-        !(Boolean)flags_.get(Flag.use_existing_db));
-    options.setTableCacheRemoveScanCountLimit(
-        (Integer)flags_.get(Flag.cache_remove_scan_count_limit));
-    options.setDisableDataSync(
-        (Boolean)flags_.get(Flag.disable_data_sync));
-    options.setUseFsync(
-        (Boolean)flags_.get(Flag.use_fsync));
-    options.setWalDir(
-        (String)flags_.get(Flag.wal_dir));
-    options.setDisableSeekCompaction(
-        (Boolean)flags_.get(Flag.disable_seek_compaction));
-    options.setDeleteObsoleteFilesPeriodMicros(
-        (Integer)flags_.get(Flag.delete_obsolete_files_period_micros));
-    options.setTableCacheNumshardbits(
-        (Integer)flags_.get(Flag.table_cache_numshardbits));
-    options.setAllowMmapReads(
-        (Boolean)flags_.get(Flag.mmap_read));
-    options.setAllowMmapWrites(
-        (Boolean)flags_.get(Flag.mmap_write));
-    options.setAdviseRandomOnOpen(
-        (Boolean)flags_.get(Flag.advise_random_on_open));
-    options.setUseAdaptiveMutex(
-        (Boolean)flags_.get(Flag.use_adaptive_mutex));
-    options.setBytesPerSync(
-        (Long)flags_.get(Flag.bytes_per_sync));
-    options.setBloomLocality(
-        (Integer)flags_.get(Flag.bloom_locality));
-    options.setMinWriteBufferNumberToMerge(
-        (Integer)flags_.get(Flag.min_write_buffer_number_to_merge));
-    options.setMemtablePrefixBloomBits(
-        (Integer)flags_.get(Flag.memtable_bloom_bits));
-    options.setNumLevels(
-        (Integer)flags_.get(Flag.num_levels));
-    options.setTargetFileSizeBase(
-        (Integer)flags_.get(Flag.target_file_size_base));
-    options.setTargetFileSizeMultiplier(
-        (Integer)flags_.get(Flag.target_file_size_multiplier));
-    options.setMaxBytesForLevelBase(
-        (Integer)flags_.get(Flag.max_bytes_for_level_base));
-    options.setMaxBytesForLevelMultiplier(
-        (Integer)flags_.get(Flag.max_bytes_for_level_multiplier));
-    options.setLevelZeroStopWritesTrigger(
-        (Integer)flags_.get(Flag.level0_stop_writes_trigger));
-    options.setLevelZeroSlowdownWritesTrigger(
-        (Integer)flags_.get(Flag.level0_slowdown_writes_trigger));
-    options.setLevelZeroFileNumCompactionTrigger(
-        (Integer)flags_.get(Flag.level0_file_num_compaction_trigger));
-    options.setSoftRateLimit(
-        (Double)flags_.get(Flag.soft_rate_limit));
-    options.setHardRateLimit(
-        (Double)flags_.get(Flag.hard_rate_limit));
-    options.setRateLimitDelayMaxMilliseconds(
-        (Integer)flags_.get(Flag.rate_limit_delay_max_milliseconds));
-    options.setMaxGrandparentOverlapFactor(
-        (Integer)flags_.get(Flag.max_grandparent_overlap_factor));
-    options.setDisableAutoCompactions(
-        (Boolean)flags_.get(Flag.disable_auto_compactions));
-    options.setSourceCompactionFactor(
-        (Integer)flags_.get(Flag.source_compaction_factor));
-    options.setFilterDeletes(
-        (Boolean)flags_.get(Flag.filter_deletes));
-    options.setMaxSuccessiveMerges(
-        (Integer)flags_.get(Flag.max_successive_merges));
-    options.setWalTtlSeconds((Long)flags_.get(Flag.wal_ttl_seconds));
-    options.setWalSizeLimitMB((Long)flags_.get(Flag.wal_size_limit_MB));
-    int bloomBits = (Integer)flags_.get(Flag.bloom_bits);
-    if (bloomBits > 0) {
-      // Internally, options will keep a reference to this BloomFilter.
-      // This will disallow Java to GC this BloomFilter.  In addition,
-      // options.dispose() will release the c++ object of this BloomFilter.
-      // As a result, the caller should not directly call
-      // BloomFilter.dispose().
-      options.setFilter(new BloomFilter(bloomBits));
-    }
-    /* TODO(yhchiang): enable the following parameters
-    options.setCompressionType((String)flags_.get(Flag.compression_type));
-    options.setCompressionLevel((Integer)flags_.get(Flag.compression_level));
-    options.setMinLevelToCompress((Integer)flags_.get(Flag.min_level_to_compress));
-    options.setHdfs((String)flags_.get(Flag.hdfs)); // env
-    options.setCacheNumshardbits((Integer)flags_.get(Flag.cache_numshardbits));
-    options.setStatistics((Boolean)flags_.get(Flag.statistics));
-    options.setUniversalSizeRatio(
-        (Integer)flags_.get(Flag.universal_size_ratio));
-    options.setUniversalMinMergeWidth(
-        (Integer)flags_.get(Flag.universal_min_merge_width));
-    options.setUniversalMaxMergeWidth(
-        (Integer)flags_.get(Flag.universal_max_merge_width));
-    options.setUniversalMaxSizeAmplificationPercent(
-        (Integer)flags_.get(Flag.universal_max_size_amplification_percent));
-    options.setUniversalCompressionSizePercent(
-        (Integer)flags_.get(Flag.universal_compression_size_percent));
-    // TODO(yhchiang): add RocksDB.openForReadOnly() to enable Flag.readonly
-    // TODO(yhchiang): enable Flag.merge_operator by switch
-    options.setAccessHintOnCompactionStart(
-        (String)flags_.get(Flag.compaction_fadvice));
-    // available values of fadvice are "NONE", "NORMAL", "SEQUENTIAL", "WILLNEED" for fadvice
-    */
-  }
-
-  private void run() throws RocksDBException {
-    if (!useExisting_) {
-      destroyDb();
-    }
-    Options options = new Options();
-    prepareOptions(options);
-    open(options);
-
-    printHeader(options);
-
-    for (String benchmark : benchmarks_) {
-      List<Callable<Stats>> tasks = new ArrayList<Callable<Stats>>();
-      List<Callable<Stats>> bgTasks = new ArrayList<Callable<Stats>>();
-      WriteOptions writeOpt = new WriteOptions();
-      prepareWriteOptions(writeOpt);
-      ReadOptions readOpt = new ReadOptions();
-      prepareReadOptions(readOpt);
-      int currentTaskId = 0;
-      boolean known = true;
-
-      if (benchmark.equals("fillseq")) {
-        tasks.add(new WriteSequentialTask(
-            currentTaskId++, randSeed_, num_, num_, writeOpt, 1));
-      } else if (benchmark.equals("fillbatch")) {
-        tasks.add(new WriteRandomTask(
-            currentTaskId++, randSeed_, num_ / 1000, num_, writeOpt, 1000));
-      } else if (benchmark.equals("fillrandom")) {
-        tasks.add(new WriteRandomTask(
-            currentTaskId++, randSeed_, num_, num_, writeOpt, 1));
-      } else if (benchmark.equals("filluniquerandom")) {
-        tasks.add(new WriteUniqueRandomTask(
-            currentTaskId++, randSeed_, num_, num_, writeOpt, 1));
-      } else if (benchmark.equals("fillsync")) {
-        writeOpt.setSync(true);
-        tasks.add(new WriteRandomTask(
-            currentTaskId++, randSeed_, num_ / 1000, num_ / 1000,
-            writeOpt, 1));
-      } else if (benchmark.equals("readseq")) {
-        for (int t = 0; t < threadNum_; ++t) {
-          tasks.add(new ReadSequentialTask(
-              currentTaskId++, randSeed_, reads_ / threadNum_, num_));
-        }
-      } else if (benchmark.equals("readrandom")) {
-        for (int t = 0; t < threadNum_; ++t) {
-          tasks.add(new ReadRandomTask(
-              currentTaskId++, randSeed_, reads_ / threadNum_, num_));
-        }
-      } else if (benchmark.equals("readwhilewriting")) {
-        WriteTask writeTask = new WriteRandomTask(
-            -1, randSeed_, Long.MAX_VALUE, num_, writeOpt, 1, writesPerSeconds_);
-        writeTask.stats_.setExcludeFromMerge();
-        bgTasks.add(writeTask);
-        for (int t = 0; t < threadNum_; ++t) {
-          tasks.add(new ReadRandomTask(
-              currentTaskId++, randSeed_, reads_ / threadNum_, num_));
-        }
-      } else if (benchmark.equals("readhot")) {
-        for (int t = 0; t < threadNum_; ++t) {
-          tasks.add(new ReadRandomTask(
-              currentTaskId++, randSeed_, reads_ / threadNum_, num_ / 100));
-        }
-      } else if (benchmark.equals("delete")) {
-        destroyDb();
-        open(options);
-      } else {
-        known = false;
-        System.err.println("Unknown benchmark: " + benchmark);
-      }
-      if (known) {
-        ExecutorService executor = Executors.newCachedThreadPool();
-        ExecutorService bgExecutor = Executors.newCachedThreadPool();
-        try {
-          // measure only the main executor time
-          List<Future<Stats>> bgResults = new ArrayList<Future<Stats>>();
-          for (Callable bgTask : bgTasks) {
-            bgResults.add(bgExecutor.submit(bgTask));
-          }
-          start();
-          List<Future<Stats>> results = executor.invokeAll(tasks);
-          executor.shutdown();
-          boolean finished = executor.awaitTermination(10, TimeUnit.SECONDS);
-          if (!finished) {
-            System.out.format(
-                "Benchmark %s was not finished before timeout.",
-                benchmark);
-            executor.shutdownNow();
-          }
-          setFinished(true);
-          bgExecutor.shutdown();
-          finished = bgExecutor.awaitTermination(10, TimeUnit.SECONDS);
-          if (!finished) {
-            System.out.format(
-                "Benchmark %s was not finished before timeout.",
-                benchmark);
-            bgExecutor.shutdownNow();
-          }
-
-          stop(benchmark, results, currentTaskId);
-        } catch (InterruptedException e) {
-          System.err.println(e);
-        }
-      }
-      writeOpt.dispose();
-      readOpt.dispose();
-    }
-    options.dispose();
-    db_.close();
-  }
-
-  private void printHeader(Options options) {
-    int kKeySize = 16;
-    System.out.printf("Keys:     %d bytes each\n", kKeySize);
-    System.out.printf("Values:   %d bytes each (%d bytes after compression)\n",
-        valueSize_,
-        (int) (valueSize_ * compressionRatio_ + 0.5));
-    System.out.printf("Entries:  %d\n", num_);
-    System.out.printf("RawSize:  %.1f MB (estimated)\n",
-        ((double)(kKeySize + valueSize_) * num_) / SizeUnit.MB);
-    System.out.printf("FileSize:   %.1f MB (estimated)\n",
-        (((kKeySize + valueSize_ * compressionRatio_) * num_) / SizeUnit.MB));
-    System.out.format("Memtable Factory: %s%n", options.memTableFactoryName());
-    System.out.format("Prefix:   %d bytes%n", prefixSize_);
-    System.out.format("Compression: %s%n", compressionType_);
-    printWarnings();
-    System.out.printf("------------------------------------------------\n");
-  }
-
-  void printWarnings() {
-    boolean assertsEnabled = false;
-    assert assertsEnabled = true; // Intentional side effect!!!
-    if (assertsEnabled) {
-      System.out.printf(
-          "WARNING: Assertions are enabled; benchmarks unnecessarily slow\n");
-    }
-  }
-
-  private void open(Options options) throws RocksDBException {
-    db_ = RocksDB.open(options, databaseDir_);
-  }
-
-  private void start() {
-    setFinished(false);
-    startTime_ = System.nanoTime();
-  }
-
-  private void stop(
-      String benchmark, List<Future<Stats>> results, int concurrentThreads) {
-    long endTime = System.nanoTime();
-    double elapsedSeconds =
-        1.0d * (endTime - startTime_) / TimeUnit.SECONDS.toNanos(1);
-
-    Stats stats = new Stats(-1);
-    int taskFinishedCount = 0;
-    for (Future<Stats> result : results) {
-      if (result.isDone()) {
-        try {
-          Stats taskStats = result.get(3, TimeUnit.SECONDS);
-          if (!result.isCancelled()) {
-            taskFinishedCount++;
-          }
-          stats.merge(taskStats);
-        } catch (Exception e) {
-          // then it's not successful, the output will indicate this
-        }
-      }
-    }
-
-    System.out.printf(
-        "%-16s : %11.5f micros/op; %6.1f MB/s; %d / %d task(s) finished.\n",
-        benchmark, (double) elapsedSeconds / stats.done_ * 1e6,
-        (stats.bytes_ / 1048576.0) / elapsedSeconds,
-        taskFinishedCount, concurrentThreads);
-  }
-
-  public void generateKeyFromLong(byte[] slice, long n) {
-    assert(n >= 0);
-    int startPos = 0;
-
-    if (keysPerPrefix_ > 0) {
-      long numPrefix = (num_ + keysPerPrefix_ - 1) / keysPerPrefix_;
-      long prefix = n % numPrefix;
-      int bytesToFill = Math.min(prefixSize_, 8);
-      for (int i = 0; i < bytesToFill; ++i) {
-        slice[i] = (byte) (prefix % 256);
-        prefix /= 256;
-      }
-      for (int i = 8; i < bytesToFill; ++i) {
-        slice[i] = '0';
-      }
-      startPos = bytesToFill;
-    }
-
-    for (int i = slice.length - 1; i >= startPos; --i) {
-      slice[i] = (byte) ('0' + (n % 10));
-      n /= 10;
-    }
-  }
-
-  private void destroyDb() {
-    if (db_ != null) {
-      db_.close();
-    }
-    // TODO(yhchiang): develop our own FileUtil
-    // FileUtil.deleteDir(databaseDir_);
-  }
-
-  private void printStats() {
-  }
-
-  static void printHelp() {
-    System.out.println("usage:");
-    for (Flag flag : Flag.values()) {
-      System.out.format("  --%s%n\t%s%n",
-          flag.name(),
-          flag.desc());
-      if (flag.getDefaultValue() != null) {
-        System.out.format("\tDEFAULT: %s%n",
-            flag.getDefaultValue().toString());
-      }
-    }
-  }
-
-  public static void main(String[] args) throws Exception {
-    Map<Flag, Object> flags = new EnumMap<Flag, Object>(Flag.class);
-    for (Flag flag : Flag.values()) {
-      if (flag.getDefaultValue() != null) {
-        flags.put(flag, flag.getDefaultValue());
-      }
-    }
-    for (String arg : args) {
-      boolean valid = false;
-      if (arg.equals("--help") || arg.equals("-h")) {
-        printHelp();
-        System.exit(0);
-      }
-      if (arg.startsWith("--")) {
-        try {
-          String[] parts = arg.substring(2).split("=");
-          if (parts.length >= 1) {
-            Flag key = Flag.valueOf(parts[0]);
-            if (key != null) {
-              Object value = null;
-              if (parts.length >= 2) {
-                value = key.parseValue(parts[1]);
-              }
-              flags.put(key, value);
-              valid = true;
-            }
-          }
-        }
-        catch (Exception e) {
-        }
-      }
-      if (!valid) {
-        System.err.println("Invalid argument " + arg);
-        System.exit(1);
-      }
-    }
-    new DbBenchmark(flags).run();
-  }
-
-  private enum Flag {
-    benchmarks(
-        Arrays.asList(
-            "fillseq",
-            "readrandom",
-            "fillrandom"),
-        "Comma-separated list of operations to run in the specified order\n" +
-        "\tActual benchmarks:\n" +
-        "\t\tfillseq          -- write N values in sequential key order in async mode.\n" +
-        "\t\tfillrandom       -- write N values in random key order in async mode.\n" +
-        "\t\tfillbatch        -- write N/1000 batch where each batch has 1000 values\n" +
-        "\t\t                   in random key order in sync mode.\n" +
-        "\t\tfillsync         -- write N/100 values in random key order in sync mode.\n" +
-        "\t\tfill100K         -- write N/1000 100K values in random order in async mode.\n" +
-        "\t\treadseq          -- read N times sequentially.\n" +
-        "\t\treadrandom       -- read N times in random order.\n" +
-        "\t\treadhot          -- read N times in random order from 1% section of DB.\n" +
-        "\t\treadwhilewriting -- measure the read performance of multiple readers\n" +
-        "\t\t                   with a bg single writer.  The write rate of the bg\n" +
-        "\t\t                   is capped by --writes_per_second.\n" +
-        "\tMeta Operations:\n" +
-        "\t\tdelete            -- delete DB") {
-      @Override public Object parseValue(String value) {
-        return new ArrayList<String>(Arrays.asList(value.split(",")));
-      }
-    },
-    compression_ratio(0.5d,
-        "Arrange to generate values that shrink to this fraction of\n" +
-        "\ttheir original size after compression.") {
-      @Override public Object parseValue(String value) {
-        return Double.parseDouble(value);
-      }
-    },
-    use_existing_db(false,
-        "If true, do not destroy the existing database.  If you set this\n" +
-        "\tflag and also specify a benchmark that wants a fresh database,\n" +
-        "\tthat benchmark will fail.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    num(1000000,
-        "Number of key/values to place in database.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    threads(1,
-        "Number of concurrent threads to run.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    reads(null,
-        "Number of read operations to do.  If negative, do --nums reads.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    key_size(16,
-        "The size of each key in bytes.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    value_size(100,
-        "The size of each value in bytes.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    write_buffer_size(4 * SizeUnit.MB,
-        "Number of bytes to buffer in memtable before compacting\n" +
-        "\t(initialized to default value by 'main'.)") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    max_write_buffer_number(2,
-             "The number of in-memory memtables. Each memtable is of size\n" +
-             "\twrite_buffer_size.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    prefix_size(0, "Controls the prefix size for HashSkipList, HashLinkedList,\n" +
-                   "\tand plain table.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    keys_per_prefix(0, "Controls the average number of keys generated\n" +
-             "\tper prefix, 0 means no special handling of the prefix,\n" +
-             "\ti.e. use the prefix comes with the generated random number.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    memtablerep("skip_list",
-        "The memtable format.  Available options are\n" +
-        "\tskip_list,\n" +
-        "\tvector,\n" +
-        "\thash_linkedlist,\n" +
-        "\thash_skiplist (prefix_hash.)") {
-      @Override public Object parseValue(String value) {
-        return value;
-      }
-    },
-    hash_bucket_count(SizeUnit.MB,
-        "The number of hash buckets used in the hash-bucket-based\n" +
-        "\tmemtables.  Memtables that currently support this argument are\n" +
-        "\thash_linkedlist and hash_skiplist.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    writes_per_second(10000,
-        "The write-rate of the background writer used in the\n" +
-        "\t`readwhilewriting` benchmark.  Non-positive number indicates\n" +
-        "\tusing an unbounded write-rate in `readwhilewriting` benchmark.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    use_plain_table(false,
-        "Use plain-table sst format.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    cache_size(-1L,
-        "Number of bytes to use as a cache of uncompressed data.\n" +
-        "\tNegative means use default settings.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    seed(0L,
-        "Seed base for random number generators.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    num_levels(7,
-        "The total number of levels.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    numdistinct(1000,
-        "Number of distinct keys to use. Used in RandomWithVerify to\n" +
-        "\tread/write on fewer keys so that gets are more likely to find the\n" +
-        "\tkey and puts are more likely to update the same key.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    merge_keys(-1,
-        "Number of distinct keys to use for MergeRandom and\n" +
-        "\tReadRandomMergeRandom.\n" +
-        "\tIf negative, there will be FLAGS_num keys.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    bloom_locality(0,"Control bloom filter probes locality.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    duration(0,"Time in seconds for the random-ops tests to run.\n" +
-        "\tWhen 0 then num & reads determine the test duration.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    num_multi_db(0,
-        "Number of DBs used in the benchmark. 0 means single DB.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    histogram(false,"Print histogram of operation timings.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    min_write_buffer_number_to_merge(
-        defaultOptions_.minWriteBufferNumberToMerge(),
-        "The minimum number of write buffers that will be merged together\n" +
-        "\tbefore writing to storage. This is cheap because it is an\n" +
-        "\tin-memory merge. If this feature is not enabled, then all these\n" +
-        "\twrite buffers are flushed to L0 as separate files and this\n" +
-        "\tincreases read amplification because a get request has to check\n" +
-        "\tin all of these files. Also, an in-memory merge may result in\n" +
-        "\twriting less data to storage if there are duplicate records\n" +
-        "\tin each of these individual write buffers.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    max_background_compactions(
-        defaultOptions_.maxBackgroundCompactions(),
-        "The maximum number of concurrent background compactions\n" +
-        "\tthat can occur in parallel.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    max_background_flushes(
-        defaultOptions_.maxBackgroundFlushes(),
-        "The maximum number of concurrent background flushes\n" +
-        "\tthat can occur in parallel.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    /* TODO(yhchiang): enable the following
-    compaction_style((int32_t) defaultOptions_.compactionStyle(),
-        "style of compaction: level-based vs universal.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },*/
-    universal_size_ratio(0,
-        "Percentage flexibility while comparing file size\n" +
-        "\t(for universal compaction only).") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    universal_min_merge_width(0,"The minimum number of files in a\n" +
-        "\tsingle compaction run (for universal compaction only).") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    universal_max_merge_width(0,"The max number of files to compact\n" +
-        "\tin universal style compaction.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    universal_max_size_amplification_percent(0,
-        "The max size amplification for universal style compaction.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    universal_compression_size_percent(-1,
-        "The percentage of the database to compress for universal\n" +
-        "\tcompaction. -1 means compress everything.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    block_size(defaultOptions_.blockSize(),
-        "Number of bytes in a block.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    compressed_cache_size(-1,
-        "Number of bytes to use as a cache of compressed data.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    open_files(defaultOptions_.maxOpenFiles(),
-        "Maximum number of files to keep open at the same time\n" +
-        "\t(use default if == 0)") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    bloom_bits(-1,"Bloom filter bits per key. Negative means\n" +
-        "\tuse default settings.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    memtable_bloom_bits(0,"Bloom filter bits per key for memtable.\n" +
-        "\tNegative means no bloom filter.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    cache_numshardbits(-1,"Number of shards for the block cache\n" +
-        "\tis 2 ** cache_numshardbits. Negative means use default settings.\n" +
-        "\tThis is applied only if FLAGS_cache_size is non-negative.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    cache_remove_scan_count_limit(32,"") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    verify_checksum(false,"Verify checksum for every block read\n" +
-        "\tfrom storage.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    statistics(false,"Database statistics.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    writes(-1,"Number of write operations to do. If negative, do\n" +
-        "\t--num reads.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    sync(false,"Sync all writes to disk.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    disable_data_sync(false,"If true, do not wait until data is\n" +
-        "\tsynced to disk.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    use_fsync(false,"If true, issue fsync instead of fdatasync.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    disable_wal(false,"If true, do not write WAL for write.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    wal_dir("", "If not empty, use the given dir for WAL.") {
-      @Override public Object parseValue(String value) {
-        return value;
-      }
-    },
-    target_file_size_base(2 * 1048576,"Target file size at level-1") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    target_file_size_multiplier(1,
-        "A multiplier to compute target level-N file size (N >= 2)") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    max_bytes_for_level_base(10 * 1048576,
-      "Max bytes for level-1") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    max_bytes_for_level_multiplier(10,
-        "A multiplier to compute max bytes for level-N (N >= 2)") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    level0_stop_writes_trigger(12,"Number of files in level-0\n" +
-        "\tthat will trigger put stop.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    level0_slowdown_writes_trigger(8,"Number of files in level-0\n" +
-        "\tthat will slow down writes.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    level0_file_num_compaction_trigger(4,"Number of files in level-0\n" +
-        "\twhen compactions start.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    readwritepercent(90,"Ratio of reads to reads/writes (expressed\n" +
-        "\tas percentage) for the ReadRandomWriteRandom workload. The\n" +
-        "\tdefault value 90 means 90% operations out of all reads and writes\n" +
-        "\toperations are reads. In other words, 9 gets for every 1 put.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    mergereadpercent(70,"Ratio of merges to merges&reads (expressed\n" +
-        "\tas percentage) for the ReadRandomMergeRandom workload. The\n" +
-        "\tdefault value 70 means 70% out of all read and merge operations\n" +
-        "\tare merges. In other words, 7 merges for every 3 gets.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    deletepercent(2,"Percentage of deletes out of reads/writes/\n" +
-        "\tdeletes (used in RandomWithVerify only). RandomWithVerify\n" +
-        "\tcalculates writepercent as (100 - FLAGS_readwritepercent -\n" +
-        "\tdeletepercent), so deletepercent must be smaller than (100 -\n" +
-        "\tFLAGS_readwritepercent)") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    disable_seek_compaction(false,"Option to disable compaction\n" +
-        "\ttriggered by read.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    delete_obsolete_files_period_micros(0,"Option to delete\n" +
-        "\tobsolete files periodically. 0 means that obsolete files are\n" +
-        "\tdeleted after every compaction run.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    compression_type("snappy",
-        "Algorithm used to compress the database.") {
-      @Override public Object parseValue(String value) {
-        return value;
-      }
-    },
-    compression_level(-1,
-        "Compression level. For zlib this should be -1 for the\n" +
-        "\tdefault level, or between 0 and 9.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    min_level_to_compress(-1,"If non-negative, compression starts\n" +
-        "\tfrom this level. Levels with number < min_level_to_compress are\n" +
-        "\tnot compressed. Otherwise, apply compression_type to\n" +
-        "\tall levels.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    table_cache_numshardbits(4,"") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    stats_interval(0,"Stats are reported every N operations when\n" +
-        "\tthis is greater than zero. When 0 the interval grows over time.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    stats_per_interval(0,"Reports additional stats per interval when\n" +
-        "\tthis is greater than 0.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    perf_level(0,"Level of perf collection.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    soft_rate_limit(0.0,"") {
-      @Override public Object parseValue(String value) {
-        return Double.parseDouble(value);
-      }
-    },
-    hard_rate_limit(0.0,"When not equal to 0 this make threads\n" +
-        "\tsleep at each stats reporting interval until the compaction\n" +
-        "\tscore for all levels is less than or equal to this value.") {
-      @Override public Object parseValue(String value) {
-        return Double.parseDouble(value);
-      }
-    },
-    rate_limit_delay_max_milliseconds(1000,
-        "When hard_rate_limit is set then this is the max time a put will\n" +
-        "\tbe stalled.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    max_grandparent_overlap_factor(10,"Control maximum bytes of\n" +
-        "\toverlaps in grandparent (i.e., level+2) before we stop building a\n" +
-        "\tsingle file in a level->level+1 compaction.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    readonly(false,"Run read only benchmarks.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    disable_auto_compactions(false,"Do not auto trigger compactions.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    source_compaction_factor(1,"Cap the size of data in level-K for\n" +
-        "\ta compaction run that compacts Level-K with Level-(K+1) (for\n" +
-        "\tK >= 1)") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    wal_ttl_seconds(0L,"Set the TTL for the WAL Files in seconds.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    wal_size_limit_MB(0L,"Set the size limit for the WAL Files\n" +
-        "\tin MB.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    /* TODO(yhchiang): enable the following
-    bufferedio(rocksdb::EnvOptions().use_os_buffer,
-        "Allow buffered io using OS buffers.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    */
-    mmap_read(false,
-        "Allow reads to occur via mmap-ing files.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    mmap_write(false,
-        "Allow writes to occur via mmap-ing files.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    advise_random_on_open(defaultOptions_.adviseRandomOnOpen(),
-        "Advise random access on table file open.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    compaction_fadvice("NORMAL",
-      "Access pattern advice when a file is compacted.") {
-      @Override public Object parseValue(String value) {
-        return value;
-      }
-    },
-    use_tailing_iterator(false,
-        "Use tailing iterator to access a series of keys instead of get.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    use_adaptive_mutex(defaultOptions_.useAdaptiveMutex(),
-        "Use adaptive mutex.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    bytes_per_sync(defaultOptions_.bytesPerSync(),
-        "Allows OS to incrementally sync files to disk while they are\n" +
-        "\tbeing written, in the background. Issue one request for every\n" +
-        "\tbytes_per_sync written. 0 turns it off.") {
-      @Override public Object parseValue(String value) {
-        return Long.parseLong(value);
-      }
-    },
-    filter_deletes(false," On true, deletes use bloom-filter and drop\n" +
-        "\tthe delete if key not present.") {
-      @Override public Object parseValue(String value) {
-        return Boolean.parseBoolean(value);
-      }
-    },
-    max_successive_merges(0,"Maximum number of successive merge\n" +
-        "\toperations on a key in the memtable.") {
-      @Override public Object parseValue(String value) {
-        return Integer.parseInt(value);
-      }
-    },
-    db("/tmp/rocksdbjni-bench",
-       "Use the db with the following name.") {
-      @Override public Object parseValue(String value) {
-        return value;
-      }
-    };
-
-    private Flag(Object defaultValue, String desc) {
-      defaultValue_ = defaultValue;
-      desc_ = desc;
-    }
-
-    protected abstract Object parseValue(String value);
-
-    public Object getDefaultValue() {
-      return defaultValue_;
-    }
-
-    public String desc() {
-      return desc_;
-    }
-
-    private final Object defaultValue_;
-    private final String desc_;
-  }
-
-  private static class RandomGenerator {
-    private final byte[] data_;
-    private int dataLength_;
-    private int position_;
-    Random rand_;
-
-    private RandomGenerator(long seed, double compressionRatio) {
-      // We use a limited amount of data over and over again and ensure
-      // that it is larger than the compression window (32KB), and also
-      // large enough to serve all typical value sizes we want to write.
-      rand_ = new Random(seed);
-      dataLength_ = 1048576 + 100;
-      data_ = new byte[dataLength_];
-      // TODO(yhchiang): mimic test::CompressibleString?
-      for (int i = 0; i < dataLength_; ++i) {
-        data_[i] = (byte) (' ' + rand_.nextInt(95));
-      }
-    }
-
-    private byte[] generate(int length) {
-      position_ = rand_.nextInt(data_.length - length);
-      return Arrays.copyOfRange(data_, position_, position_ + length);
-    }
-  }
-
-  boolean isFinished() {
-    synchronized(finishLock_) {
-      return isFinished_;
-    }
-  }
-
-  void setFinished(boolean flag) {
-    synchronized(finishLock_) {
-      isFinished_ = flag;
-    }
-  }
-
-  RocksDB db_;
-  final List<String> benchmarks_;
-  final int num_;
-  final int reads_;
-  final int keySize_;
-  final int valueSize_;
-  final int threadNum_;
-  final int writesPerSeconds_;
-  final long randSeed_;
-  final long cacheSize_;
-  final boolean useExisting_;
-  final String databaseDir_;
-  double compressionRatio_;
-  RandomGenerator gen_;
-  long startTime_;
-
-  // memtable related
-  final int maxWriteBufferNumber_;
-  final int prefixSize_;
-  final int keysPerPrefix_;
-  final String memtable_;
-  final long hashBucketCount_;
-
-  // sst format related
-  boolean usePlainTable_;
-
-  Object finishLock_;
-  boolean isFinished_;
-  Map<Flag, Object> flags_;
-  // as the scope of a static member equals to the scope of the problem,
-  // we let its c++ pointer to be disposed in its finalizer.
-  static Options defaultOptions_ = new Options();
-  String compressionType_;
-  CompressionType compression_;
-}
diff --git a/src/rocksdb/java/org/rocksdb/test/BackupableDBTest.java b/src/rocksdb/java/org/rocksdb/test/BackupableDBTest.java
deleted file mode 100644
index f0fc3d5..0000000
--- a/src/rocksdb/java/org/rocksdb/test/BackupableDBTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb.test;
-
-import org.rocksdb.*;
-
-public class BackupableDBTest {
-  static final String db_path = "/tmp/backupablejni_db";
-  static final String backup_path = "/tmp/backupablejni_db_backup";
-  static {
-    RocksDB.loadLibrary();
-  }
-  public static void main(String[] args) {
-
-    Options opt = new Options();
-    opt.setCreateIfMissing(true);
-
-    BackupableDBOptions bopt = new BackupableDBOptions(backup_path);
-    BackupableDB bdb = null;
-
-    try {
-      bdb = BackupableDB.open(opt, bopt, db_path);
-      bdb.put("hello".getBytes(), "BackupableDB".getBytes());
-      bdb.createNewBackup(true);
-      byte[] value = bdb.get("hello".getBytes());
-      assert(new String(value).equals("BackupableDB"));
-    } catch (RocksDBException e) {
-      System.err.format("[ERROR]: %s%n", e);
-      e.printStackTrace();
-    } finally {
-      opt.dispose();
-      bopt.dispose();
-      if (bdb != null) {
-        bdb.close();
-      }
-    }
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/test/OptionsTest.java b/src/rocksdb/java/org/rocksdb/test/OptionsTest.java
deleted file mode 100644
index e1e0e05..0000000
--- a/src/rocksdb/java/org/rocksdb/test/OptionsTest.java
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb.test;
-
-import java.util.Random;
-import org.rocksdb.RocksDB;
-import org.rocksdb.Options;
-
-public class OptionsTest {
-  static {
-    RocksDB.loadLibrary();
-  }
-  public static void main(String[] args) {
-    Options opt = new Options();
-    Random rand = new Random();
-    { // CreateIfMissing test
-      boolean boolValue = rand.nextBoolean();
-      opt.setCreateIfMissing(boolValue);
-      assert(opt.createIfMissing() == boolValue);
-    }
-
-    { // ErrorIfExists test
-      boolean boolValue = rand.nextBoolean();
-      opt.setErrorIfExists(boolValue);
-      assert(opt.errorIfExists() == boolValue);
-    }
-
-    { // ParanoidChecks test
-      boolean boolValue = rand.nextBoolean();
-      opt.setParanoidChecks(boolValue);
-      assert(opt.paranoidChecks() == boolValue);
-    }
-
-    { // MaxOpenFiles test
-      int intValue = rand.nextInt();
-      opt.setMaxOpenFiles(intValue);
-      assert(opt.maxOpenFiles() == intValue);
-    }
-
-    { // DisableDataSync test
-      boolean boolValue = rand.nextBoolean();
-      opt.setDisableDataSync(boolValue);
-      assert(opt.disableDataSync() == boolValue);
-    }
-
-    { // UseFsync test
-      boolean boolValue = rand.nextBoolean();
-      opt.setUseFsync(boolValue);
-      assert(opt.useFsync() == boolValue);
-    }
-
-    { // DbStatsLogInterval test
-      int intValue = rand.nextInt();
-      opt.setDbStatsLogInterval(intValue);
-      assert(opt.dbStatsLogInterval() == intValue);
-    }
-
-    { // DbLogDir test
-      String str = "path/to/DbLogDir";
-      opt.setDbLogDir(str);
-      assert(opt.dbLogDir().equals(str));
-    }
-
-    { // WalDir test
-      String str = "path/to/WalDir";
-      opt.setWalDir(str);
-      assert(opt.walDir().equals(str));
-    }
-
-    { // DeleteObsoleteFilesPeriodMicros test
-      long longValue = rand.nextLong();
-      opt.setDeleteObsoleteFilesPeriodMicros(longValue);
-      assert(opt.deleteObsoleteFilesPeriodMicros() == longValue);
-    }
-
-    { // MaxBackgroundCompactions test
-      int intValue = rand.nextInt();
-      opt.setMaxBackgroundCompactions(intValue);
-      assert(opt.maxBackgroundCompactions() == intValue);
-    }
-
-    { // MaxBackgroundFlushes test
-      int intValue = rand.nextInt();
-      opt.setMaxBackgroundFlushes(intValue);
-      assert(opt.maxBackgroundFlushes() == intValue);
-    }
-
-    { // MaxLogFileSize test
-      long longValue = rand.nextLong();
-      opt.setMaxLogFileSize(longValue);
-      assert(opt.maxLogFileSize() == longValue);
-    }
-
-    { // LogFileTimeToRoll test
-      long longValue = rand.nextLong();
-      opt.setLogFileTimeToRoll(longValue);
-      assert(opt.logFileTimeToRoll() == longValue);
-    }
-
-    { // KeepLogFileNum test
-      long longValue = rand.nextLong();
-      opt.setKeepLogFileNum(longValue);
-      assert(opt.keepLogFileNum() == longValue);
-    }
-
-    { // MaxManifestFileSize test
-      long longValue = rand.nextLong();
-      opt.setMaxManifestFileSize(longValue);
-      assert(opt.maxManifestFileSize() == longValue);
-    }
-
-    { // TableCacheNumshardbits test
-      int intValue = rand.nextInt();
-      opt.setTableCacheNumshardbits(intValue);
-      assert(opt.tableCacheNumshardbits() == intValue);
-    }
-
-    { // TableCacheRemoveScanCountLimit test
-      int intValue = rand.nextInt();
-      opt.setTableCacheRemoveScanCountLimit(intValue);
-      assert(opt.tableCacheRemoveScanCountLimit() == intValue);
-    }
-
-    { // WalTtlSeconds test
-      long longValue = rand.nextLong();
-      opt.setWalTtlSeconds(longValue);
-      assert(opt.walTtlSeconds() == longValue);
-    }
-
-    { // ManifestPreallocationSize test
-      long longValue = rand.nextLong();
-      opt.setManifestPreallocationSize(longValue);
-      assert(opt.manifestPreallocationSize() == longValue);
-    }
-
-    { // AllowOsBuffer test
-      boolean boolValue = rand.nextBoolean();
-      opt.setAllowOsBuffer(boolValue);
-      assert(opt.allowOsBuffer() == boolValue);
-    }
-
-    { // AllowMmapReads test
-      boolean boolValue = rand.nextBoolean();
-      opt.setAllowMmapReads(boolValue);
-      assert(opt.allowMmapReads() == boolValue);
-    }
-
-    { // AllowMmapWrites test
-      boolean boolValue = rand.nextBoolean();
-      opt.setAllowMmapWrites(boolValue);
-      assert(opt.allowMmapWrites() == boolValue);
-    }
-
-    { // IsFdCloseOnExec test
-      boolean boolValue = rand.nextBoolean();
-      opt.setIsFdCloseOnExec(boolValue);
-      assert(opt.isFdCloseOnExec() == boolValue);
-    }
-
-    { // SkipLogErrorOnRecovery test
-      boolean boolValue = rand.nextBoolean();
-      opt.setSkipLogErrorOnRecovery(boolValue);
-      assert(opt.skipLogErrorOnRecovery() == boolValue);
-    }
-
-    { // StatsDumpPeriodSec test
-      int intValue = rand.nextInt();
-      opt.setStatsDumpPeriodSec(intValue);
-      assert(opt.statsDumpPeriodSec() == intValue);
-    }
-
-    { // AdviseRandomOnOpen test
-      boolean boolValue = rand.nextBoolean();
-      opt.setAdviseRandomOnOpen(boolValue);
-      assert(opt.adviseRandomOnOpen() == boolValue);
-    }
-
-    { // UseAdaptiveMutex test
-      boolean boolValue = rand.nextBoolean();
-      opt.setUseAdaptiveMutex(boolValue);
-      assert(opt.useAdaptiveMutex() == boolValue);
-    }
-
-    { // BytesPerSync test
-      long longValue = rand.nextLong();
-      opt.setBytesPerSync(longValue);
-      assert(opt.bytesPerSync() == longValue);
-    }
-
-    { // AllowThreadLocal test
-      boolean boolValue = rand.nextBoolean();
-      opt.setAllowThreadLocal(boolValue);
-      assert(opt.allowThreadLocal() == boolValue);
-    }
-
-    { // WriteBufferSize test
-      long longValue = rand.nextLong();
-      opt.setWriteBufferSize(longValue);
-      assert(opt.writeBufferSize() == longValue);
-    }
-
-    { // MaxWriteBufferNumber test
-      int intValue = rand.nextInt();
-      opt.setMaxWriteBufferNumber(intValue);
-      assert(opt.maxWriteBufferNumber() == intValue);
-    }
-
-    { // MinWriteBufferNumberToMerge test
-      int intValue = rand.nextInt();
-      opt.setMinWriteBufferNumberToMerge(intValue);
-      assert(opt.minWriteBufferNumberToMerge() == intValue);
-    }
-
-    { // BlockSize test
-      long longValue = rand.nextLong();
-      opt.setBlockSize(longValue);
-      assert(opt.blockSize() == longValue);
-    }
-
-    { // BlockRestartInterval test
-      int intValue = rand.nextInt();
-      opt.setBlockRestartInterval(intValue);
-      assert(opt.blockRestartInterval() == intValue);
-    }
-
-    { // WholeKeyFiltering test
-      boolean boolValue = rand.nextBoolean();
-      opt.setWholeKeyFiltering(boolValue);
-      assert(opt.wholeKeyFiltering() == boolValue);
-    }
-
-    { // NumLevels test
-      int intValue = rand.nextInt();
-      opt.setNumLevels(intValue);
-      assert(opt.numLevels() == intValue);
-    }
-
-    { // LevelFileNumCompactionTrigger test
-      int intValue = rand.nextInt();
-      opt.setLevelZeroFileNumCompactionTrigger(intValue);
-      assert(opt.levelZeroFileNumCompactionTrigger() == intValue);
-    }
-
-    { // LevelSlowdownWritesTrigger test
-      int intValue = rand.nextInt();
-      opt.setLevelZeroSlowdownWritesTrigger(intValue);
-      assert(opt.levelZeroSlowdownWritesTrigger() == intValue);
-    }
-
-    { // LevelStopWritesTrigger test
-      int intValue = rand.nextInt();
-      opt.setLevelZeroStopWritesTrigger(intValue);
-      assert(opt.levelZeroStopWritesTrigger() == intValue);
-    }
-
-    { // MaxMemCompactionLevel test
-      int intValue = rand.nextInt();
-      opt.setMaxMemCompactionLevel(intValue);
-      assert(opt.maxMemCompactionLevel() == intValue);
-    }
-
-    { // TargetFileSizeBase test
-      int intValue = rand.nextInt();
-      opt.setTargetFileSizeBase(intValue);
-      assert(opt.targetFileSizeBase() == intValue);
-    }
-
-    { // TargetFileSizeMultiplier test
-      int intValue = rand.nextInt();
-      opt.setTargetFileSizeMultiplier(intValue);
-      assert(opt.targetFileSizeMultiplier() == intValue);
-    }
-
-    { // MaxBytesForLevelBase test
-      long longValue = rand.nextLong();
-      opt.setMaxBytesForLevelBase(longValue);
-      assert(opt.maxBytesForLevelBase() == longValue);
-    }
-
-    { // MaxBytesForLevelMultiplier test
-      int intValue = rand.nextInt();
-      opt.setMaxBytesForLevelMultiplier(intValue);
-      assert(opt.maxBytesForLevelMultiplier() == intValue);
-    }
-
-    { // ExpandedCompactionFactor test
-      int intValue = rand.nextInt();
-      opt.setExpandedCompactionFactor(intValue);
-      assert(opt.expandedCompactionFactor() == intValue);
-    }
-
-    { // SourceCompactionFactor test
-      int intValue = rand.nextInt();
-      opt.setSourceCompactionFactor(intValue);
-      assert(opt.sourceCompactionFactor() == intValue);
-    }
-
-    { // MaxGrandparentOverlapFactor test
-      int intValue = rand.nextInt();
-      opt.setMaxGrandparentOverlapFactor(intValue);
-      assert(opt.maxGrandparentOverlapFactor() == intValue);
-    }
-
-    { // DisableSeekCompaction test
-      boolean boolValue = rand.nextBoolean();
-      opt.setDisableSeekCompaction(boolValue);
-      assert(opt.disableSeekCompaction() == boolValue);
-    }
-
-    { // SoftRateLimit test
-      double doubleValue = rand.nextDouble();
-      opt.setSoftRateLimit(doubleValue);
-      assert(opt.softRateLimit() == doubleValue);
-    }
-
-    { // HardRateLimit test
-      double doubleValue = rand.nextDouble();
-      opt.setHardRateLimit(doubleValue);
-      assert(opt.hardRateLimit() == doubleValue);
-    }
-
-    { // RateLimitDelayMaxMilliseconds test
-      int intValue = rand.nextInt();
-      opt.setRateLimitDelayMaxMilliseconds(intValue);
-      assert(opt.rateLimitDelayMaxMilliseconds() == intValue);
-    }
-
-    { // NoBlockCache test
-      boolean boolValue = rand.nextBoolean();
-      opt.setNoBlockCache(boolValue);
-      assert(opt.noBlockCache() == boolValue);
-    }
-
-    { // ArenaBlockSize test
-      long longValue = rand.nextLong();
-      opt.setArenaBlockSize(longValue);
-      assert(opt.arenaBlockSize() == longValue);
-    }
-
-    { // DisableAutoCompactions test
-      boolean boolValue = rand.nextBoolean();
-      opt.setDisableAutoCompactions(boolValue);
-      assert(opt.disableAutoCompactions() == boolValue);
-    }
-
-    { // PurgeRedundantKvsWhileFlush test
-      boolean boolValue = rand.nextBoolean();
-      opt.setPurgeRedundantKvsWhileFlush(boolValue);
-      assert(opt.purgeRedundantKvsWhileFlush() == boolValue);
-    }
-
-    { // BlockSizeDeviation test
-      int intValue = rand.nextInt();
-      opt.setBlockSizeDeviation(intValue);
-      assert(opt.blockSizeDeviation() == intValue);
-    }
-
-    { // VerifyChecksumsInCompaction test
-      boolean boolValue = rand.nextBoolean();
-      opt.setVerifyChecksumsInCompaction(boolValue);
-      assert(opt.verifyChecksumsInCompaction() == boolValue);
-    }
-
-    { // FilterDeletes test
-      boolean boolValue = rand.nextBoolean();
-      opt.setFilterDeletes(boolValue);
-      assert(opt.filterDeletes() == boolValue);
-    }
-
-    { // MaxSequentialSkipInIterations test
-      long longValue = rand.nextLong();
-      opt.setMaxSequentialSkipInIterations(longValue);
-      assert(opt.maxSequentialSkipInIterations() == longValue);
-    }
-
-    { // InplaceUpdateSupport test
-      boolean boolValue = rand.nextBoolean();
-      opt.setInplaceUpdateSupport(boolValue);
-      assert(opt.inplaceUpdateSupport() == boolValue);
-    }
-
-    { // InplaceUpdateNumLocks test
-      long longValue = rand.nextLong();
-      opt.setInplaceUpdateNumLocks(longValue);
-      assert(opt.inplaceUpdateNumLocks() == longValue);
-    }
-
-    { // MemtablePrefixBloomBits test
-      int intValue = rand.nextInt();
-      opt.setMemtablePrefixBloomBits(intValue);
-      assert(opt.memtablePrefixBloomBits() == intValue);
-    }
-
-    { // MemtablePrefixBloomProbes test
-      int intValue = rand.nextInt();
-      opt.setMemtablePrefixBloomProbes(intValue);
-      assert(opt.memtablePrefixBloomProbes() == intValue);
-    }
-
-    { // BloomLocality test
-      int intValue = rand.nextInt();
-      opt.setBloomLocality(intValue);
-      assert(opt.bloomLocality() == intValue);
-    }
-
-    { // MaxSuccessiveMerges test
-      long longValue = rand.nextLong();
-      opt.setMaxSuccessiveMerges(longValue);
-      assert(opt.maxSuccessiveMerges() == longValue);
-    }
-
-    { // MinPartialMergeOperands test
-      int intValue = rand.nextInt();
-      opt.setMinPartialMergeOperands(intValue);
-      assert(opt.minPartialMergeOperands() == intValue);
-    }
-
-    opt.dispose();
-    System.out.println("Passed OptionsTest");
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/test/ReadOptionsTest.java b/src/rocksdb/java/org/rocksdb/test/ReadOptionsTest.java
deleted file mode 100644
index b3b5b26..0000000
--- a/src/rocksdb/java/org/rocksdb/test/ReadOptionsTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb.test;
-
-import java.util.Random;
-import org.rocksdb.RocksDB;
-import org.rocksdb.ReadOptions;
-
-public class ReadOptionsTest {
-  static {
-    RocksDB.loadLibrary();
-  }
-  public static void main(String[] args) {
-    ReadOptions opt = new ReadOptions();
-    Random rand = new Random();
-    { // VerifyChecksums test
-      boolean boolValue = rand.nextBoolean();
-      opt.setVerifyChecksums(boolValue);
-      assert(opt.verifyChecksums() == boolValue);
-    }
-
-    { // FillCache test
-      boolean boolValue = rand.nextBoolean();
-      opt.setFillCache(boolValue);
-      assert(opt.fillCache() == boolValue);
-    }
-
-    { // Tailing test
-      boolean boolValue = rand.nextBoolean();
-      opt.setTailing(boolValue);
-      assert(opt.tailing() == boolValue);
-    }
-
-    opt.dispose();
-    System.out.println("Passed ReadOptionsTest");
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/util/Environment.java b/src/rocksdb/java/org/rocksdb/util/Environment.java
deleted file mode 100644
index c2e3bc0..0000000
--- a/src/rocksdb/java/org/rocksdb/util/Environment.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.rocksdb.util;
-
-public class Environment {
-  private static String OS = System.getProperty("os.name").toLowerCase();
-
-  public static boolean isWindows() {
-    return (OS.indexOf("win") >= 0);
-  }
-
-  public static boolean isMac() {
-    return (OS.indexOf("mac") >= 0);
-  }
-
-  public static boolean isUnix() {
-    return (OS.indexOf("nix") >= 0 ||
-            OS.indexOf("nux") >= 0 ||
-            OS.indexOf("aix") >= 0);
-  }
-
-  public static String getSharedLibraryName(String name) {
-    if (isUnix()) {
-      return String.format("lib%s.so", name);
-    } else if (isMac()) {
-      return String.format("lib%s.dylib", name);
-    }
-    throw new UnsupportedOperationException();
-  }
-
-  public static String getJniLibraryName(String name) {
-    if (isUnix()) {
-      return String.format("lib%s.so", name);
-    } else if (isMac()) {
-      return String.format("lib%s.jnilib", name);
-    }
-    throw new UnsupportedOperationException();
-  }
-}
diff --git a/src/rocksdb/java/org/rocksdb/util/SizeUnit.java b/src/rocksdb/java/org/rocksdb/util/SizeUnit.java
deleted file mode 100644
index 8d50cd1..0000000
--- a/src/rocksdb/java/org/rocksdb/util/SizeUnit.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-package org.rocksdb.util;
-
-public class SizeUnit {
-  public static final long KB = 1024L;
-  public static final long MB = KB * KB;
-  public static final long GB = KB * MB;
-  public static final long TB = KB * GB;
-  public static final long PB = KB * TB;
-
-  private SizeUnit() {}
-}
diff --git a/src/rocksdb/java/rocksjni/backupablejni.cc b/src/rocksdb/java/rocksjni/backupablejni.cc
deleted file mode 100644
index 8b57a0c..0000000
--- a/src/rocksdb/java/rocksjni/backupablejni.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ and enables
-// calling c++ rocksdb::DB methods from Java side.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <string>
-
-#include "include/org_rocksdb_BackupableDB.h"
-#include "include/org_rocksdb_BackupableDBOptions.h"
-#include "rocksjni/portal.h"
-#include "utilities/backupable_db.h"
-
-/*
- * Class:     org_rocksdb_BackupableDB
- * Method:    open
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_BackupableDB_open(
-    JNIEnv* env, jobject jbdb, jlong jdb_handle, jlong jopt_handle) {
-  auto db = reinterpret_cast<rocksdb::DB*>(jdb_handle);
-  auto opt = reinterpret_cast<rocksdb::BackupableDBOptions*>(jopt_handle);
-  auto bdb = new rocksdb::BackupableDB(db, *opt);
-
-  // as BackupableDB extends RocksDB on the java side, we can reuse
-  // the RocksDB portal here.
-  rocksdb::RocksDBJni::setHandle(env, jbdb, bdb);
-}
-
-/*
- * Class:     org_rocksdb_BackupableDB
- * Method:    createNewBackup
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_BackupableDB_createNewBackup(
-    JNIEnv* env, jobject jbdb, jlong jhandle, jboolean jflag) {
-  reinterpret_cast<rocksdb::BackupableDB*>(jhandle)->CreateNewBackup(jflag);
-}
-
-///////////////////////////////////////////////////////////////////////////
-// BackupDBOptions
-
-/*
- * Class:     org_rocksdb_BackupableDBOptions
- * Method:    newBackupableDBOptions
- * Signature: (Ljava/lang/String;)V
- */
-void Java_org_rocksdb_BackupableDBOptions_newBackupableDBOptions(
-    JNIEnv* env, jobject jobj, jstring jpath) {
-  const char* cpath = env->GetStringUTFChars(jpath, 0);
-  auto bopt = new rocksdb::BackupableDBOptions(cpath);
-  env->ReleaseStringUTFChars(jpath, cpath);
-
-  rocksdb::BackupableDBOptionsJni::setHandle(env, jobj, bopt);
-}
-
-/*
- * Class:     org_rocksdb_BackupableDBOptions
- * Method:    backupDir
- * Signature: (J)Ljava/lang/String;
- */
-jstring Java_org_rocksdb_BackupableDBOptions_backupDir(
-    JNIEnv* env, jobject jopt, jlong jhandle, jstring jpath) {
-  auto bopt = reinterpret_cast<rocksdb::BackupableDBOptions*>(jhandle);
-  return env->NewStringUTF(bopt->backup_dir.c_str());
-}
-
-/*
- * Class:     org_rocksdb_BackupableDBOptions
- * Method:    dispose
- * Signature: (J)V
- */
-void Java_org_rocksdb_BackupableDBOptions_dispose(
-    JNIEnv* env, jobject jopt, jlong jhandle) {
-  auto bopt = reinterpret_cast<rocksdb::BackupableDBOptions*>(jhandle);
-  assert(bopt);
-  delete bopt;
-
-  rocksdb::BackupableDBOptionsJni::setHandle(env, jopt, nullptr);
-}
diff --git a/src/rocksdb/java/rocksjni/filter.cc b/src/rocksdb/java/rocksjni/filter.cc
deleted file mode 100644
index 7ef9598..0000000
--- a/src/rocksdb/java/rocksjni/filter.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ for
-// rocksdb::FilterPolicy.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <string>
-
-#include "include/org_rocksdb_Filter.h"
-#include "include/org_rocksdb_BloomFilter.h"
-#include "rocksjni/portal.h"
-#include "rocksdb/filter_policy.h"
-
-/*
- * Class:     org_rocksdb_BloomFilter
- * Method:    createNewFilter0
- * Signature: (I)V
- */
-void Java_org_rocksdb_BloomFilter_createNewFilter0(
-    JNIEnv* env, jobject jobj, jint bits_per_key) {
-  const rocksdb::FilterPolicy* fp = rocksdb::NewBloomFilterPolicy(bits_per_key);
-  rocksdb::FilterJni::setHandle(env, jobj, fp);
-}
-
-/*
- * Class:     org_rocksdb_Filter
- * Method:    dispose0
- * Signature: (J)V
- */
-void Java_org_rocksdb_Filter_dispose0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  auto fp = reinterpret_cast<rocksdb::FilterPolicy*>(handle);
-  delete fp;
-
-  rocksdb::FilterJni::setHandle(env, jobj, nullptr);
-}
diff --git a/src/rocksdb/java/rocksjni/iterator.cc b/src/rocksdb/java/rocksjni/iterator.cc
deleted file mode 100644
index a7ea97d..0000000
--- a/src/rocksdb/java/rocksjni/iterator.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ and enables
-// calling c++ rocksdb::Iterator methods from Java side.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <jni.h>
-
-#include "include/org_rocksdb_Iterator.h"
-#include "rocksjni/portal.h"
-#include "rocksdb/iterator.h"
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    isValid0
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Iterator_isValid0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  return reinterpret_cast<rocksdb::Iterator*>(handle)->Valid();
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    seekToFirst0
- * Signature: (J)V
- */
-void Java_org_rocksdb_Iterator_seekToFirst0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  reinterpret_cast<rocksdb::Iterator*>(handle)->SeekToFirst();
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    seekToFirst0
- * Signature: (J)V
- */
-void Java_org_rocksdb_Iterator_seekToLast0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  reinterpret_cast<rocksdb::Iterator*>(handle)->SeekToLast();
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    seekToLast0
- * Signature: (J)V
- */
-void Java_org_rocksdb_Iterator_next0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  reinterpret_cast<rocksdb::Iterator*>(handle)->Next();
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    next0
- * Signature: (J)V
- */
-void Java_org_rocksdb_Iterator_prev0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  reinterpret_cast<rocksdb::Iterator*>(handle)->Prev();
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    prev0
- * Signature: (J)V
- */
-jbyteArray Java_org_rocksdb_Iterator_key0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  auto it = reinterpret_cast<rocksdb::Iterator*>(handle);
-  rocksdb::Slice key_slice = it->key();
-
-  jbyteArray jkey = env->NewByteArray(key_slice.size());
-  env->SetByteArrayRegion(
-      jkey, 0, key_slice.size(),
-      reinterpret_cast<const jbyte*>(key_slice.data()));
-  return jkey;
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    key0
- * Signature: (J)[B
- */
-jbyteArray Java_org_rocksdb_Iterator_value0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  auto it = reinterpret_cast<rocksdb::Iterator*>(handle);
-  rocksdb::Slice value_slice = it->value();
-
-  jbyteArray jvalue = env->NewByteArray(value_slice.size());
-  env->SetByteArrayRegion(
-      jvalue, 0, value_slice.size(),
-      reinterpret_cast<const jbyte*>(value_slice.data()));
-  return jvalue;
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    value0
- * Signature: (J)[B
- */
-void Java_org_rocksdb_Iterator_seek0(
-    JNIEnv* env, jobject jobj, jlong handle,
-    jbyteArray jtarget, jint jtarget_len) {
-  auto it = reinterpret_cast<rocksdb::Iterator*>(handle);
-  jbyte* target = env->GetByteArrayElements(jtarget, 0);
-  rocksdb::Slice target_slice(
-      reinterpret_cast<char*>(target), jtarget_len);
-
-  it->Seek(target_slice);
-
-  env->ReleaseByteArrayElements(jtarget, target, JNI_ABORT);
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    seek0
- * Signature: (J[BI)V
- */
-void Java_org_rocksdb_Iterator_status0(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  auto it = reinterpret_cast<rocksdb::Iterator*>(handle);
-  rocksdb::Status s = it->status();
-
-  if (s.ok()) {
-    return;
-  }
-
-  rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-}
-
-/*
- * Class:     org_rocksdb_Iterator
- * Method:    dispose
- * Signature: (J)V
- */
-void Java_org_rocksdb_Iterator_dispose(
-    JNIEnv* env, jobject jobj, jlong handle) {
-  auto it = reinterpret_cast<rocksdb::Iterator*>(handle);
-  delete it;
-}
diff --git a/src/rocksdb/java/rocksjni/memtablejni.cc b/src/rocksdb/java/rocksjni/memtablejni.cc
deleted file mode 100644
index a0d50f5..0000000
--- a/src/rocksdb/java/rocksjni/memtablejni.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ for MemTables.
-
-#include "include/org_rocksdb_HashSkipListMemTableConfig.h"
-#include "include/org_rocksdb_HashLinkedListMemTableConfig.h"
-#include "include/org_rocksdb_VectorMemTableConfig.h"
-#include "include/org_rocksdb_SkipListMemTableConfig.h"
-#include "rocksdb/memtablerep.h"
-
-/*
- * Class:     org_rocksdb_HashSkipListMemTableConfig
- * Method:    newMemTableFactoryHandle
- * Signature: (JII)J
- */
-jlong Java_org_rocksdb_HashSkipListMemTableConfig_newMemTableFactoryHandle(
-    JNIEnv* env, jobject jobj, jlong jbucket_count,
-    jint jheight, jint jbranching_factor) {
-  return reinterpret_cast<jlong>(rocksdb::NewHashSkipListRepFactory(
-      static_cast<size_t>(jbucket_count),
-      static_cast<int32_t>(jheight),
-      static_cast<int32_t>(jbranching_factor)));
-}
-
-/*
- * Class:     org_rocksdb_HashLinkedListMemTableConfig
- * Method:    newMemTableFactoryHandle
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_HashLinkedListMemTableConfig_newMemTableFactoryHandle(
-    JNIEnv* env, jobject jobj, jlong jbucket_count) {
-  return reinterpret_cast<jlong>(rocksdb::NewHashLinkListRepFactory(
-       static_cast<size_t>(jbucket_count)));
-}
-
-/*
- * Class:     org_rocksdb_VectorMemTableConfig
- * Method:    newMemTableFactoryHandle
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_VectorMemTableConfig_newMemTableFactoryHandle(
-    JNIEnv* env, jobject jobj, jlong jreserved_size) {
-  return reinterpret_cast<jlong>(new rocksdb::VectorRepFactory(
-      static_cast<size_t>(jreserved_size)));
-}
-
-/*
- * Class:     org_rocksdb_SkipListMemTableConfig
- * Method:    newMemTableFactoryHandle0
- * Signature: ()J
- */
-jlong Java_org_rocksdb_SkipListMemTableConfig_newMemTableFactoryHandle0(
-    JNIEnv* env, jobject jobj) {
-  return reinterpret_cast<jlong>(new rocksdb::SkipListFactory());
-}
diff --git a/src/rocksdb/java/rocksjni/options.cc b/src/rocksdb/java/rocksjni/options.cc
deleted file mode 100644
index c5849ce..0000000
--- a/src/rocksdb/java/rocksjni/options.cc
+++ /dev/null
@@ -1,1807 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ for rocksdb::Options.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <string>
-#include <memory>
-
-#include "include/org_rocksdb_Options.h"
-#include "include/org_rocksdb_WriteOptions.h"
-#include "include/org_rocksdb_ReadOptions.h"
-#include "rocksjni/portal.h"
-#include "rocksdb/db.h"
-#include "rocksdb/options.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/table.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/filter_policy.h"
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    newOptions
- * Signature: ()V
- */
-void Java_org_rocksdb_Options_newOptions(JNIEnv* env, jobject jobj) {
-  rocksdb::Options* op = new rocksdb::Options();
-  rocksdb::OptionsJni::setHandle(env, jobj, op);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    dispose0
- * Signature: ()V
- */
-void Java_org_rocksdb_Options_dispose0(JNIEnv* env, jobject jobj) {
-  rocksdb::Options* op = rocksdb::OptionsJni::getHandle(env, jobj);
-  delete op;
-
-  rocksdb::OptionsJni::setHandle(env, jobj, nullptr);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setCreateIfMissing
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setCreateIfMissing(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean flag) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->create_if_missing = flag;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    createIfMissing
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_createIfMissing(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->create_if_missing;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setWriteBufferSize
- * Signature: (JJ)I
- */
-void Java_org_rocksdb_Options_setWriteBufferSize(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong jwrite_buffer_size) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->write_buffer_size =
-          static_cast<size_t>(jwrite_buffer_size);
-}
-
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    writeBufferSize
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_writeBufferSize(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->write_buffer_size;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxWriteBufferNumber
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxWriteBufferNumber(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint jmax_write_buffer_number) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_write_buffer_number =
-          jmax_write_buffer_number;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    createStatistics
- * Signature: (J)V
- */
-void Java_org_rocksdb_Options_createStatistics(
-    JNIEnv* env, jobject jobj, jlong jOptHandle) {
-  reinterpret_cast<rocksdb::Options*>(jOptHandle)->statistics =
-      rocksdb::CreateDBStatistics();
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    statisticsPtr
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_statisticsPtr(
-    JNIEnv* env, jobject jobj, jlong jOptHandle) {
-  auto st = reinterpret_cast<rocksdb::Options*>(jOptHandle)->statistics.get();
-  return reinterpret_cast<jlong>(st);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setFilterHandle
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setFilterHandle(
-    JNIEnv* env, jobject jobj, jlong jopt_handle, jlong jfilter_handle) {
-  reinterpret_cast<rocksdb::Options*>(jopt_handle)->filter_policy =
-      reinterpret_cast<rocksdb::FilterPolicy*>(jfilter_handle);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxWriteBufferNumber
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxWriteBufferNumber(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->max_write_buffer_number;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setBlockSize
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setBlockSize(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong jblock_size) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->block_size =
-          static_cast<size_t>(jblock_size);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    blockSize
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_blockSize(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->block_size;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setDisableSeekCompaction
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setDisableSeekCompaction(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jboolean jdisable_seek_compaction) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->disable_seek_compaction =
-         jdisable_seek_compaction;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    disableSeekCompaction
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_disableSeekCompaction(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->disable_seek_compaction;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    errorIfExists
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_errorIfExists(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->error_if_exists;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setErrorIfExists
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setErrorIfExists(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean error_if_exists) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->error_if_exists =
-      static_cast<bool>(error_if_exists);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    paranoidChecks
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_paranoidChecks(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->paranoid_checks;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setParanoidChecks
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setParanoidChecks(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean paranoid_checks) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->paranoid_checks =
-      static_cast<bool>(paranoid_checks);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxOpenFiles
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxOpenFiles(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->max_open_files;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxOpenFiles
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxOpenFiles(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint max_open_files) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_open_files =
-      static_cast<int>(max_open_files);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    disableDataSync
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_disableDataSync(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->disableDataSync;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setDisableDataSync
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setDisableDataSync(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean disableDataSync) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->disableDataSync =
-      static_cast<bool>(disableDataSync);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    useFsync
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_useFsync(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->use_fsync;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setUseFsync
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setUseFsync(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean use_fsync) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->use_fsync =
-      static_cast<bool>(use_fsync);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    dbStatsLogInterval
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_dbStatsLogInterval(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->db_stats_log_interval;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setDbStatsLogInterval
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setDbStatsLogInterval(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint db_stats_log_interval) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->db_stats_log_interval =
-      static_cast<int>(db_stats_log_interval);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    dbLogDir
- * Signature: (J)Ljava/lang/String
- */
-jstring Java_org_rocksdb_Options_dbLogDir(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return env->NewStringUTF(
-      reinterpret_cast<rocksdb::Options*>(jhandle)->db_log_dir.c_str());
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setDbLogDir
- * Signature: (JLjava/lang/String)V
- */
-void Java_org_rocksdb_Options_setDbLogDir(
-    JNIEnv* env, jobject jobj, jlong jhandle, jstring jdb_log_dir) {
-  const char* log_dir = env->GetStringUTFChars(jdb_log_dir, 0);
-  reinterpret_cast<rocksdb::Options*>(jhandle)->db_log_dir.assign(log_dir);
-  env->ReleaseStringUTFChars(jdb_log_dir, log_dir);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    walDir
- * Signature: (J)Ljava/lang/String
- */
-jstring Java_org_rocksdb_Options_walDir(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return env->NewStringUTF(
-      reinterpret_cast<rocksdb::Options*>(jhandle)->wal_dir.c_str());
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setWalDir
- * Signature: (JLjava/lang/String)V
- */
-void Java_org_rocksdb_Options_setWalDir(
-    JNIEnv* env, jobject jobj, jlong jhandle, jstring jwal_dir) {
-  const char* wal_dir = env->GetStringUTFChars(jwal_dir, 0);
-  reinterpret_cast<rocksdb::Options*>(jhandle)->wal_dir.assign(wal_dir);
-  env->ReleaseStringUTFChars(jwal_dir, wal_dir);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    deleteObsoleteFilesPeriodMicros
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_deleteObsoleteFilesPeriodMicros(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)
-      ->delete_obsolete_files_period_micros;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setDeleteObsoleteFilesPeriodMicros
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setDeleteObsoleteFilesPeriodMicros(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong micros) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)
-      ->delete_obsolete_files_period_micros =
-          static_cast<int64_t>(micros);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxBackgroundCompactions
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxBackgroundCompactions(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_background_compactions;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxBackgroundCompactions
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxBackgroundCompactions(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint max) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)
-      ->max_background_compactions = static_cast<int>(max);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxBackgroundFlushes
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxBackgroundFlushes(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->max_background_flushes;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxBackgroundFlushes
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxBackgroundFlushes(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint max_background_flushes) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_background_flushes =
-      static_cast<int>(max_background_flushes);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxLogFileSize
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_maxLogFileSize(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->max_log_file_size;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxLogFileSize
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setMaxLogFileSize(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong max_log_file_size) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_log_file_size =
-      static_cast<size_t>(max_log_file_size);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    logFileTimeToRoll
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_logFileTimeToRoll(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->log_file_time_to_roll;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setLogFileTimeToRoll
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setLogFileTimeToRoll(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong log_file_time_to_roll) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->log_file_time_to_roll =
-      static_cast<size_t>(log_file_time_to_roll);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    keepLogFileNum
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_keepLogFileNum(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->keep_log_file_num;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setKeepLogFileNum
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setKeepLogFileNum(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong keep_log_file_num) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->keep_log_file_num =
-      static_cast<size_t>(keep_log_file_num);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxManifestFileSize
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_maxManifestFileSize(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->max_manifest_file_size;
-}
-
-/*
- * Method:    memTableFactoryName
- * Signature: (J)Ljava/lang/String
- */
-jstring Java_org_rocksdb_Options_memTableFactoryName(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  auto opt = reinterpret_cast<rocksdb::Options*>(jhandle);
-  rocksdb::MemTableRepFactory* tf = opt->memtable_factory.get();
-
-  // Should never be nullptr.
-  // Default memtable factory is SkipListFactory
-  assert(tf);
-
-  // temporarly fix for the historical typo
-  if (strcmp(tf->Name(), "HashLinkListRepFactory") == 0) {
-    return env->NewStringUTF("HashLinkedListRepFactory");
-  }
-
-  return env->NewStringUTF(tf->Name());
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxManifestFileSize
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setMaxManifestFileSize(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong max_manifest_file_size) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_manifest_file_size =
-      static_cast<int64_t>(max_manifest_file_size);
-}
-
-/*
- * Method:    setMemTableFactory
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setMemTableFactory(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong jfactory_handle) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->memtable_factory.reset(
-      reinterpret_cast<rocksdb::MemTableRepFactory*>(jfactory_handle));
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    tableCacheNumshardbits
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_tableCacheNumshardbits(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->table_cache_numshardbits;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setTableCacheNumshardbits
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setTableCacheNumshardbits(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint table_cache_numshardbits) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->table_cache_numshardbits =
-      static_cast<int>(table_cache_numshardbits);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    tableCacheRemoveScanCountLimit
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_tableCacheRemoveScanCountLimit(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->table_cache_remove_scan_count_limit;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setTableCacheRemoveScanCountLimit
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setTableCacheRemoveScanCountLimit(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint limit) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->table_cache_remove_scan_count_limit = static_cast<int>(limit);
-}
-
-/*
- * Method:    useFixedLengthPrefixExtractor
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_useFixedLengthPrefixExtractor(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint jprefix_length) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->prefix_extractor.reset(
-      rocksdb::NewFixedPrefixTransform(static_cast<size_t>(jprefix_length)));
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    walTtlSeconds
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_walTtlSeconds(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->WAL_ttl_seconds;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setWalTtlSeconds
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setWalTtlSeconds(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong WAL_ttl_seconds) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->WAL_ttl_seconds =
-      static_cast<int64_t>(WAL_ttl_seconds);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    walTtlSeconds
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_walSizeLimitMB(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->WAL_size_limit_MB;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setWalSizeLimitMB
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setWalSizeLimitMB(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong WAL_size_limit_MB) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->WAL_size_limit_MB =
-      static_cast<int64_t>(WAL_size_limit_MB);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    manifestPreallocationSize
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_manifestPreallocationSize(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)
-      ->manifest_preallocation_size;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setManifestPreallocationSize
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setManifestPreallocationSize(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong preallocation_size) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->manifest_preallocation_size =
-      static_cast<size_t>(preallocation_size);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    allowOsBuffer
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_allowOsBuffer(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->allow_os_buffer;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setAllowOsBuffer
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setAllowOsBuffer(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean allow_os_buffer) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->allow_os_buffer =
-      static_cast<bool>(allow_os_buffer);
-}
-
-/*
- * Method:    setTableFactory
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setTableFactory(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong jfactory_handle) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->table_factory.reset(
-      reinterpret_cast<rocksdb::TableFactory*>(jfactory_handle));
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    allowMmapReads
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_allowMmapReads(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->allow_mmap_reads;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setAllowMmapReads
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setAllowMmapReads(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean allow_mmap_reads) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->allow_mmap_reads =
-      static_cast<bool>(allow_mmap_reads);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    allowMmapWrites
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_allowMmapWrites(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->allow_mmap_writes;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setAllowMmapWrites
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setAllowMmapWrites(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean allow_mmap_writes) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->allow_mmap_writes =
-      static_cast<bool>(allow_mmap_writes);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    isFdCloseOnExec
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_isFdCloseOnExec(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->is_fd_close_on_exec;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setIsFdCloseOnExec
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setIsFdCloseOnExec(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean is_fd_close_on_exec) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->is_fd_close_on_exec =
-      static_cast<bool>(is_fd_close_on_exec);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    skipLogErrorOnRecovery
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_skipLogErrorOnRecovery(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)
-      ->skip_log_error_on_recovery;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setSkipLogErrorOnRecovery
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setSkipLogErrorOnRecovery(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean skip) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->skip_log_error_on_recovery =
-      static_cast<bool>(skip);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    statsDumpPeriodSec
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_statsDumpPeriodSec(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->stats_dump_period_sec;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setStatsDumpPeriodSec
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setStatsDumpPeriodSec(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint stats_dump_period_sec) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->stats_dump_period_sec =
-      static_cast<int>(stats_dump_period_sec);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    adviseRandomOnOpen
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_adviseRandomOnOpen(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->advise_random_on_open;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setAdviseRandomOnOpen
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setAdviseRandomOnOpen(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean advise_random_on_open) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->advise_random_on_open =
-      static_cast<bool>(advise_random_on_open);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    useAdaptiveMutex
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_useAdaptiveMutex(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->use_adaptive_mutex;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setUseAdaptiveMutex
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setUseAdaptiveMutex(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean use_adaptive_mutex) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->use_adaptive_mutex =
-      static_cast<bool>(use_adaptive_mutex);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    bytesPerSync
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_bytesPerSync(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->bytes_per_sync;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setBytesPerSync
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setBytesPerSync(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong bytes_per_sync) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->bytes_per_sync =
-      static_cast<int64_t>(bytes_per_sync);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    allowThreadLocal
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_allowThreadLocal(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->allow_thread_local;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setAllowThreadLocal
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setAllowThreadLocal(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean allow_thread_local) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->allow_thread_local =
-      static_cast<bool>(allow_thread_local);
-}
-
-/*
- * Method:    tableFactoryName
- * Signature: (J)Ljava/lang/String
- */
-jstring Java_org_rocksdb_Options_tableFactoryName(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  auto opt = reinterpret_cast<rocksdb::Options*>(jhandle);
-  rocksdb::TableFactory* tf = opt->table_factory.get();
-
-  // Should never be nullptr.
-  // Default memtable factory is SkipListFactory
-  assert(tf);
-
-  return env->NewStringUTF(tf->Name());
-}
-
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    minWriteBufferNumberToMerge
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_minWriteBufferNumberToMerge(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->min_write_buffer_number_to_merge;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMinWriteBufferNumberToMerge
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMinWriteBufferNumberToMerge(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmin_write_buffer_number_to_merge) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->min_write_buffer_number_to_merge =
-          static_cast<int>(jmin_write_buffer_number_to_merge);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    blockRestartInterval
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_blockRestartInterval(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->block_restart_interval;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setBlockRestartInterval
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setBlockRestartInterval(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint jblock_restart_interval) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->block_restart_interval =
-      static_cast<int>(jblock_restart_interval);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    wholeKeyFiltering
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_wholeKeyFiltering(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->whole_key_filtering;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setWholeKeyFiltering
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setWholeKeyFiltering(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean jwhole_key_filtering) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->whole_key_filtering =
-      static_cast<bool>(jwhole_key_filtering);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    numLevels
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_numLevels(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->num_levels;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setNumLevels
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setNumLevels(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint jnum_levels) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->num_levels =
-      static_cast<int>(jnum_levels);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    levelZeroFileNumCompactionTrigger
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_levelZeroFileNumCompactionTrigger(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->level0_file_num_compaction_trigger;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setLevelZeroFileNumCompactionTrigger
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setLevelZeroFileNumCompactionTrigger(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jlevel0_file_num_compaction_trigger) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->level0_file_num_compaction_trigger =
-          static_cast<int>(jlevel0_file_num_compaction_trigger);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    levelZeroSlowdownWritesTrigger
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_levelZeroSlowdownWritesTrigger(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->level0_slowdown_writes_trigger;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setLevelSlowdownWritesTrigger
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setLevelZeroSlowdownWritesTrigger(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jlevel0_slowdown_writes_trigger) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->level0_slowdown_writes_trigger =
-          static_cast<int>(jlevel0_slowdown_writes_trigger);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    levelZeroStopWritesTrigger
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_levelZeroStopWritesTrigger(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->level0_stop_writes_trigger;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setLevelStopWritesTrigger
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setLevelZeroStopWritesTrigger(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jlevel0_stop_writes_trigger) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->level0_stop_writes_trigger =
-      static_cast<int>(jlevel0_stop_writes_trigger);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxMemCompactionLevel
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxMemCompactionLevel(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_mem_compaction_level;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxMemCompactionLevel
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxMemCompactionLevel(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmax_mem_compaction_level) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_mem_compaction_level =
-      static_cast<int>(jmax_mem_compaction_level);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    targetFileSizeBase
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_targetFileSizeBase(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->target_file_size_base;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setTargetFileSizeBase
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setTargetFileSizeBase(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jtarget_file_size_base) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->target_file_size_base =
-      static_cast<int>(jtarget_file_size_base);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    targetFileSizeMultiplier
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_targetFileSizeMultiplier(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->target_file_size_multiplier;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setTargetFileSizeMultiplier
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setTargetFileSizeMultiplier(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jtarget_file_size_multiplier) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->target_file_size_multiplier =
-          static_cast<int>(jtarget_file_size_multiplier);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxBytesForLevelBase
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_maxBytesForLevelBase(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_bytes_for_level_base;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxBytesForLevelBase
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setMaxBytesForLevelBase(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jlong jmax_bytes_for_level_base) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_bytes_for_level_base =
-          static_cast<int64_t>(jmax_bytes_for_level_base);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxBytesForLevelMultiplier
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxBytesForLevelMultiplier(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_bytes_for_level_multiplier;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxBytesForLevelMultiplier
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxBytesForLevelMultiplier(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmax_bytes_for_level_multiplier) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_bytes_for_level_multiplier =
-          static_cast<int>(jmax_bytes_for_level_multiplier);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    expandedCompactionFactor
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_expandedCompactionFactor(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->expanded_compaction_factor;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setExpandedCompactionFactor
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setExpandedCompactionFactor(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jexpanded_compaction_factor) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->expanded_compaction_factor =
-          static_cast<int>(jexpanded_compaction_factor);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    sourceCompactionFactor
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_sourceCompactionFactor(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->source_compaction_factor;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setSourceCompactionFactor
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setSourceCompactionFactor(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-        jint jsource_compaction_factor) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->source_compaction_factor =
-          static_cast<int>(jsource_compaction_factor);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxGrandparentOverlapFactor
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_maxGrandparentOverlapFactor(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_grandparent_overlap_factor;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxGrandparentOverlapFactor
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMaxGrandparentOverlapFactor(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmax_grandparent_overlap_factor) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_grandparent_overlap_factor =
-          static_cast<int>(jmax_grandparent_overlap_factor);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    softRateLimit
- * Signature: (J)D
- */
-jdouble Java_org_rocksdb_Options_softRateLimit(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->soft_rate_limit;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setSoftRateLimit
- * Signature: (JD)V
- */
-void Java_org_rocksdb_Options_setSoftRateLimit(
-    JNIEnv* env, jobject jobj, jlong jhandle, jdouble jsoft_rate_limit) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->soft_rate_limit =
-      static_cast<double>(jsoft_rate_limit);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    hardRateLimit
- * Signature: (J)D
- */
-jdouble Java_org_rocksdb_Options_hardRateLimit(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->hard_rate_limit;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setHardRateLimit
- * Signature: (JD)V
- */
-void Java_org_rocksdb_Options_setHardRateLimit(
-    JNIEnv* env, jobject jobj, jlong jhandle, jdouble jhard_rate_limit) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->hard_rate_limit =
-      static_cast<double>(jhard_rate_limit);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    rateLimitDelayMaxMilliseconds
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_rateLimitDelayMaxMilliseconds(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->rate_limit_delay_max_milliseconds;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setRateLimitDelayMaxMilliseconds
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setRateLimitDelayMaxMilliseconds(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jrate_limit_delay_max_milliseconds) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->rate_limit_delay_max_milliseconds =
-          static_cast<int>(jrate_limit_delay_max_milliseconds);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    noBlockCache
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_noBlockCache(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->no_block_cache;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setNoBlockCache
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setNoBlockCache(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean jno_block_cache) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->no_block_cache =
-      static_cast<bool>(jno_block_cache);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    arenaBlockSize
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_arenaBlockSize(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->arena_block_size;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setArenaBlockSize
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setArenaBlockSize(
-    JNIEnv* env, jobject jobj, jlong jhandle, jlong jarena_block_size) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->arena_block_size =
-      static_cast<size_t>(jarena_block_size);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    disableAutoCompactions
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_disableAutoCompactions(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->disable_auto_compactions;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setDisableAutoCompactions
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setDisableAutoCompactions(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jboolean jdisable_auto_compactions) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->disable_auto_compactions =
-          static_cast<bool>(jdisable_auto_compactions);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    purgeRedundantKvsWhileFlush
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_purgeRedundantKvsWhileFlush(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->purge_redundant_kvs_while_flush;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setPurgeRedundantKvsWhileFlush
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setPurgeRedundantKvsWhileFlush(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jboolean jpurge_redundant_kvs_while_flush) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->purge_redundant_kvs_while_flush =
-          static_cast<bool>(jpurge_redundant_kvs_while_flush);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    blockSizeDeviation
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_blockSizeDeviation(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->block_size_deviation;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setBlockSizeDeviation
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setBlockSizeDeviation(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jblock_size_deviation) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->block_size_deviation =
-      static_cast<int>(jblock_size_deviation);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    verifyChecksumsInCompaction
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_verifyChecksumsInCompaction(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->verify_checksums_in_compaction;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setVerifyChecksumsInCompaction
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setVerifyChecksumsInCompaction(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jboolean jverify_checksums_in_compaction) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->verify_checksums_in_compaction =
-          static_cast<bool>(jverify_checksums_in_compaction);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    filterDeletes
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_filterDeletes(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->filter_deletes;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setFilterDeletes
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setFilterDeletes(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean jfilter_deletes) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->filter_deletes =
-      static_cast<bool>(jfilter_deletes);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxSequentialSkipInIterations
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_maxSequentialSkipInIterations(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_sequential_skip_in_iterations;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxSequentialSkipInIterations
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setMaxSequentialSkipInIterations(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jlong jmax_sequential_skip_in_iterations) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->max_sequential_skip_in_iterations =
-          static_cast<int64_t>(jmax_sequential_skip_in_iterations);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    inplaceUpdateSupport
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_Options_inplaceUpdateSupport(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->inplace_update_support;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setInplaceUpdateSupport
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_Options_setInplaceUpdateSupport(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jboolean jinplace_update_support) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->inplace_update_support =
-          static_cast<bool>(jinplace_update_support);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    inplaceUpdateNumLocks
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_inplaceUpdateNumLocks(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->inplace_update_num_locks;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setInplaceUpdateNumLocks
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setInplaceUpdateNumLocks(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jlong jinplace_update_num_locks) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->inplace_update_num_locks =
-          static_cast<size_t>(jinplace_update_num_locks);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    memtablePrefixBloomBits
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_memtablePrefixBloomBits(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->memtable_prefix_bloom_bits;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMemtablePrefixBloomBits
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMemtablePrefixBloomBits(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmemtable_prefix_bloom_bits) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->memtable_prefix_bloom_bits =
-          static_cast<int32_t>(jmemtable_prefix_bloom_bits);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    memtablePrefixBloomProbes
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_memtablePrefixBloomProbes(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->memtable_prefix_bloom_probes;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMemtablePrefixBloomProbes
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMemtablePrefixBloomProbes(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmemtable_prefix_bloom_probes) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->memtable_prefix_bloom_probes =
-          static_cast<int32_t>(jmemtable_prefix_bloom_probes);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    bloomLocality
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_bloomLocality(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->bloom_locality;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setBloomLocality
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setBloomLocality(
-    JNIEnv* env, jobject jobj, jlong jhandle, jint jbloom_locality) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->bloom_locality =
-      static_cast<int32_t>(jbloom_locality);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    maxSuccessiveMerges
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_Options_maxSuccessiveMerges(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(jhandle)->max_successive_merges;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMaxSuccessiveMerges
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_Options_setMaxSuccessiveMerges(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jlong jmax_successive_merges) {
-  reinterpret_cast<rocksdb::Options*>(jhandle)->max_successive_merges =
-      static_cast<size_t>(jmax_successive_merges);
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    minPartialMergeOperands
- * Signature: (J)I
- */
-jint Java_org_rocksdb_Options_minPartialMergeOperands(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::Options*>(
-      jhandle)->min_partial_merge_operands;
-}
-
-/*
- * Class:     org_rocksdb_Options
- * Method:    setMinPartialMergeOperands
- * Signature: (JI)V
- */
-void Java_org_rocksdb_Options_setMinPartialMergeOperands(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jint jmin_partial_merge_operands) {
-  reinterpret_cast<rocksdb::Options*>(
-      jhandle)->min_partial_merge_operands =
-          static_cast<int32_t>(jmin_partial_merge_operands);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// WriteOptions
-
-/*
- * Class:     org_rocksdb_WriteOptions
- * Method:    newWriteOptions
- * Signature: ()V
- */
-void Java_org_rocksdb_WriteOptions_newWriteOptions(
-    JNIEnv* env, jobject jwrite_options) {
-  rocksdb::WriteOptions* op = new rocksdb::WriteOptions();
-  rocksdb::WriteOptionsJni::setHandle(env, jwrite_options, op);
-}
-
-/*
- * Class:     org_rocksdb_WriteOptions
- * Method:    dispose0
- * Signature: ()V
- */
-void Java_org_rocksdb_WriteOptions_dispose0(
-    JNIEnv* env, jobject jwrite_options, jlong jhandle) {
-  auto write_options = reinterpret_cast<rocksdb::WriteOptions*>(jhandle);
-  delete write_options;
-
-  rocksdb::WriteOptionsJni::setHandle(env, jwrite_options, nullptr);
-}
-
-/*
- * Class:     org_rocksdb_WriteOptions
- * Method:    setSync
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_WriteOptions_setSync(
-  JNIEnv* env, jobject jwrite_options, jlong jhandle, jboolean jflag) {
-  reinterpret_cast<rocksdb::WriteOptions*>(jhandle)->sync = jflag;
-}
-
-/*
- * Class:     org_rocksdb_WriteOptions
- * Method:    sync
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_WriteOptions_sync(
-    JNIEnv* env, jobject jwrite_options, jlong jhandle) {
-  return reinterpret_cast<rocksdb::WriteOptions*>(jhandle)->sync;
-}
-
-/*
- * Class:     org_rocksdb_WriteOptions
- * Method:    setDisableWAL
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_WriteOptions_setDisableWAL(
-    JNIEnv* env, jobject jwrite_options, jlong jhandle, jboolean jflag) {
-  reinterpret_cast<rocksdb::WriteOptions*>(jhandle)->disableWAL = jflag;
-}
-
-/*
- * Class:     org_rocksdb_WriteOptions
- * Method:    disableWAL
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_WriteOptions_disableWAL(
-    JNIEnv* env, jobject jwrite_options, jlong jhandle) {
-  return reinterpret_cast<rocksdb::WriteOptions*>(jhandle)->disableWAL;
-}
-
-/////////////////////////////////////////////////////////////////////
-// rocksdb::ReadOptions
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    newReadOptions
- * Signature: ()V
- */
-void Java_org_rocksdb_ReadOptions_newReadOptions(
-    JNIEnv* env, jobject jobj) {
-  auto read_opt = new rocksdb::ReadOptions();
-  rocksdb::ReadOptionsJni::setHandle(env, jobj, read_opt);
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    dispose
- * Signature: (J)V
- */
-void Java_org_rocksdb_ReadOptions_dispose(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  delete reinterpret_cast<rocksdb::ReadOptions*>(jhandle);
-  rocksdb::ReadOptionsJni::setHandle(env, jobj, nullptr);
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    verifyChecksums
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_ReadOptions_verifyChecksums(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::ReadOptions*>(
-      jhandle)->verify_checksums;
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    setVerifyChecksums
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_ReadOptions_setVerifyChecksums(
-    JNIEnv* env, jobject jobj, jlong jhandle,
-    jboolean jverify_checksums) {
-  reinterpret_cast<rocksdb::ReadOptions*>(jhandle)->verify_checksums =
-      static_cast<bool>(jverify_checksums);
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    fillCache
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_ReadOptions_fillCache(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::ReadOptions*>(jhandle)->fill_cache;
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    setFillCache
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_ReadOptions_setFillCache(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean jfill_cache) {
-  reinterpret_cast<rocksdb::ReadOptions*>(jhandle)->fill_cache =
-      static_cast<bool>(jfill_cache);
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    tailing
- * Signature: (J)Z
- */
-jboolean Java_org_rocksdb_ReadOptions_tailing(
-    JNIEnv* env, jobject jobj, jlong jhandle) {
-  return reinterpret_cast<rocksdb::ReadOptions*>(jhandle)->tailing;
-}
-
-/*
- * Class:     org_rocksdb_ReadOptions
- * Method:    setTailing
- * Signature: (JZ)V
- */
-void Java_org_rocksdb_ReadOptions_setTailing(
-    JNIEnv* env, jobject jobj, jlong jhandle, jboolean jtailing) {
-  reinterpret_cast<rocksdb::ReadOptions*>(jhandle)->tailing =
-      static_cast<bool>(jtailing);
-}
diff --git a/src/rocksdb/java/rocksjni/portal.h b/src/rocksdb/java/rocksjni/portal.h
deleted file mode 100644
index 7d70eec..0000000
--- a/src/rocksdb/java/rocksjni/portal.h
+++ /dev/null
@@ -1,383 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-// This file is designed for caching those frequently used IDs and provide
-// efficient portal (i.e, a set of static functions) to access java code
-// from c++.
-
-#ifndef JAVA_ROCKSJNI_PORTAL_H_
-#define JAVA_ROCKSJNI_PORTAL_H_
-
-#include <jni.h>
-#include "rocksdb/db.h"
-#include "rocksdb/filter_policy.h"
-#include "utilities/backupable_db.h"
-
-namespace rocksdb {
-
-// The portal class for org.rocksdb.RocksDB
-class RocksDBJni {
- public:
-  // Get the java class id of org.rocksdb.RocksDB.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/RocksDB");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.RocksDB
-  // that stores the pointer to rocksdb::DB.
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::DB of the specified org.rocksdb.RocksDB.
-  static rocksdb::DB* getHandle(JNIEnv* env, jobject jdb) {
-    return reinterpret_cast<rocksdb::DB*>(
-        env->GetLongField(jdb, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::DB pointer to the java side.
-  static void setHandle(JNIEnv* env, jobject jdb, rocksdb::DB* db) {
-    env->SetLongField(
-        jdb, getHandleFieldID(env),
-        reinterpret_cast<jlong>(db));
-  }
-};
-
-// The portal class for org.rocksdb.RocksDBException
-class RocksDBExceptionJni {
- public:
-  // Get the jclass of org.rocksdb.RocksDBException
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/RocksDBException");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Create and throw a java exception by converting the input
-  // Status to an RocksDBException.
-  //
-  // In case s.ok() is true, then this function will not throw any
-  // exception.
-  static void ThrowNew(JNIEnv* env, Status s) {
-    if (s.ok()) {
-      return;
-    }
-    jstring msg = env->NewStringUTF(s.ToString().c_str());
-    // get the constructor id of org.rocksdb.RocksDBException
-    static jmethodID mid = env->GetMethodID(
-        getJClass(env), "<init>", "(Ljava/lang/String;)V");
-    assert(mid != nullptr);
-
-    env->Throw((jthrowable)env->NewObject(getJClass(env), mid, msg));
-  }
-};
-
-class OptionsJni {
- public:
-  // Get the java class id of org.rocksdb.Options.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/Options");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.Options
-  // that stores the pointer to rocksdb::Options
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::Options
-  static rocksdb::Options* getHandle(JNIEnv* env, jobject jobj) {
-    return reinterpret_cast<rocksdb::Options*>(
-        env->GetLongField(jobj, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::Options pointer to the java side.
-  static void setHandle(JNIEnv* env, jobject jobj, rocksdb::Options* op) {
-    env->SetLongField(
-        jobj, getHandleFieldID(env),
-        reinterpret_cast<jlong>(op));
-  }
-};
-
-class WriteOptionsJni {
- public:
-  // Get the java class id of org.rocksdb.WriteOptions.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/WriteOptions");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.WriteOptions
-  // that stores the pointer to rocksdb::WriteOptions
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::WriteOptions
-  static rocksdb::WriteOptions* getHandle(JNIEnv* env, jobject jobj) {
-    return reinterpret_cast<rocksdb::WriteOptions*>(
-        env->GetLongField(jobj, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::WriteOptions pointer to the java side.
-  static void setHandle(JNIEnv* env, jobject jobj, rocksdb::WriteOptions* op) {
-    env->SetLongField(
-        jobj, getHandleFieldID(env),
-        reinterpret_cast<jlong>(op));
-  }
-};
-
-
-class ReadOptionsJni {
- public:
-  // Get the java class id of org.rocksdb.ReadOptions.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/ReadOptions");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.ReadOptions
-  // that stores the pointer to rocksdb::ReadOptions
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::ReadOptions
-  static rocksdb::ReadOptions* getHandle(JNIEnv* env, jobject jobj) {
-    return reinterpret_cast<rocksdb::ReadOptions*>(
-        env->GetLongField(jobj, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::ReadOptions pointer to the java side.
-  static void setHandle(JNIEnv* env, jobject jobj,
-                        rocksdb::ReadOptions* op) {
-    env->SetLongField(
-        jobj, getHandleFieldID(env),
-        reinterpret_cast<jlong>(op));
-  }
-};
-
-
-class WriteBatchJni {
- public:
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/WriteBatch");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::WriteBatch of the specified
-  // org.rocksdb.WriteBatch.
-  static rocksdb::WriteBatch* getHandle(JNIEnv* env, jobject jwb) {
-    return reinterpret_cast<rocksdb::WriteBatch*>(
-        env->GetLongField(jwb, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::WriteBatch pointer to the java side.
-  static void setHandle(JNIEnv* env, jobject jwb, rocksdb::WriteBatch* wb) {
-    env->SetLongField(
-        jwb, getHandleFieldID(env),
-        reinterpret_cast<jlong>(wb));
-  }
-};
-
-class HistogramDataJni {
- public:
-  static jmethodID getConstructorMethodId(JNIEnv* env, jclass jclazz) {
-    static jmethodID mid = env->GetMethodID(
-        jclazz, "<init>", "(DDDDD)V");
-    assert(mid != nullptr);
-    return mid;
-  }
-};
-class BackupableDBOptionsJni {
- public:
-  // Get the java class id of org.rocksdb.BackupableDBOptions.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/BackupableDBOptions");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.BackupableDBOptions
-  // that stores the pointer to rocksdb::BackupableDBOptions
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::BackupableDBOptions
-  static rocksdb::BackupableDBOptions* getHandle(JNIEnv* env, jobject jobj) {
-    return reinterpret_cast<rocksdb::BackupableDBOptions*>(
-        env->GetLongField(jobj, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::BackupableDBOptions pointer to the java side.
-  static void setHandle(
-      JNIEnv* env, jobject jobj, rocksdb::BackupableDBOptions* op) {
-    env->SetLongField(
-        jobj, getHandleFieldID(env),
-        reinterpret_cast<jlong>(op));
-  }
-};
-
-class IteratorJni {
- public:
-  // Get the java class id of org.rocksdb.Iteartor.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/Iterator");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.Iterator
-  // that stores the pointer to rocksdb::Iterator.
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::Iterator.
-  static rocksdb::Iterator* getHandle(JNIEnv* env, jobject jobj) {
-    return reinterpret_cast<rocksdb::Iterator*>(
-        env->GetLongField(jobj, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::Iterator pointer to the java side.
-  static void setHandle(
-      JNIEnv* env, jobject jobj, rocksdb::Iterator* op) {
-    env->SetLongField(
-        jobj, getHandleFieldID(env),
-        reinterpret_cast<jlong>(op));
-  }
-};
-
-class FilterJni {
- public:
-  // Get the java class id of org.rocksdb.FilterPolicy.
-  static jclass getJClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("org/rocksdb/Filter");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the field id of the member variable of org.rocksdb.Filter
-  // that stores the pointer to rocksdb::FilterPolicy.
-  static jfieldID getHandleFieldID(JNIEnv* env) {
-    static jfieldID fid = env->GetFieldID(
-        getJClass(env), "nativeHandle_", "J");
-    assert(fid != nullptr);
-    return fid;
-  }
-
-  // Get the pointer to rocksdb::FilterPolicy.
-  static rocksdb::FilterPolicy* getHandle(JNIEnv* env, jobject jobj) {
-    return reinterpret_cast<rocksdb::FilterPolicy*>(
-        env->GetLongField(jobj, getHandleFieldID(env)));
-  }
-
-  // Pass the rocksdb::FilterPolicy pointer to the java side.
-  static void setHandle(
-      JNIEnv* env, jobject jobj, const rocksdb::FilterPolicy* op) {
-    env->SetLongField(
-        jobj, getHandleFieldID(env),
-        reinterpret_cast<jlong>(op));
-  }
-};
-
-class ListJni {
- public:
-  // Get the java class id of java.util.List.
-  static jclass getListClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("java/util/List");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the java class id of java.util.ArrayList.
-  static jclass getArrayListClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("java/util/ArrayList");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the java class id of java.util.Iterator.
-  static jclass getIteratorClass(JNIEnv* env) {
-    static jclass jclazz = env->FindClass("java/util/Iterator");
-    assert(jclazz != nullptr);
-    return jclazz;
-  }
-
-  // Get the java method id of java.util.List.iterator().
-  static jmethodID getIteratorMethod(JNIEnv* env) {
-    static jmethodID mid = env->GetMethodID(
-        getListClass(env), "iterator", "()Ljava/util/Iterator;");
-    assert(mid != nullptr);
-    return mid;
-  }
-
-  // Get the java method id of java.util.Iterator.hasNext().
-  static jmethodID getHasNextMethod(JNIEnv* env) {
-    static jmethodID mid = env->GetMethodID(
-        getIteratorClass(env), "hasNext", "()Z");
-    assert(mid != nullptr);
-    return mid;
-  }
-
-  // Get the java method id of java.util.Iterator.next().
-  static jmethodID getNextMethod(JNIEnv* env) {
-    static jmethodID mid = env->GetMethodID(
-        getIteratorClass(env), "next", "()Ljava/lang/Object;");
-    assert(mid != nullptr);
-    return mid;
-  }
-
-  // Get the java method id of arrayList constructor.
-  static jmethodID getArrayListConstructorMethodId(JNIEnv* env, jclass jclazz) {
-    static jmethodID mid = env->GetMethodID(
-        jclazz, "<init>", "(I)V");
-    assert(mid != nullptr);
-    return mid;
-  }
-
-  // Get the java method id of java.util.List.add().
-  static jmethodID getListAddMethodId(JNIEnv* env) {
-    static jmethodID mid = env->GetMethodID(
-        getListClass(env), "add", "(Ljava/lang/Object;)Z");
-    assert(mid != nullptr);
-    return mid;
-  }
-};
-}  // namespace rocksdb
-#endif  // JAVA_ROCKSJNI_PORTAL_H_
diff --git a/src/rocksdb/java/rocksjni/rocksjni.cc b/src/rocksdb/java/rocksjni/rocksjni.cc
deleted file mode 100644
index 4595f3f..0000000
--- a/src/rocksdb/java/rocksjni/rocksjni.cc
+++ /dev/null
@@ -1,438 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ and enables
-// calling c++ rocksdb::DB methods from Java side.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <string>
-#include <vector>
-
-#include "include/org_rocksdb_RocksDB.h"
-#include "rocksjni/portal.h"
-#include "rocksdb/db.h"
-#include "rocksdb/cache.h"
-
-//////////////////////////////////////////////////////////////////////////////
-// rocksdb::DB::Open
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    open
- * Signature: (JLjava/lang/String;)V
- */
-void Java_org_rocksdb_RocksDB_open(
-    JNIEnv* env, jobject jdb, jlong jopt_handle,
-    jlong jcache_size, jstring jdb_path) {
-  auto opt = reinterpret_cast<rocksdb::Options*>(jopt_handle);
-  if (jcache_size > 0) {
-    opt->no_block_cache = false;
-    opt->block_cache = rocksdb::NewLRUCache(jcache_size);
-  } else {
-    opt->no_block_cache = true;
-    opt->block_cache = nullptr;
-  }
-
-  rocksdb::DB* db = nullptr;
-  const char* db_path = env->GetStringUTFChars(jdb_path, 0);
-  rocksdb::Status s = rocksdb::DB::Open(*opt, db_path, &db);
-  env->ReleaseStringUTFChars(jdb_path, db_path);
-
-  if (s.ok()) {
-    rocksdb::RocksDBJni::setHandle(env, jdb, db);
-    return;
-  }
-  rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// rocksdb::DB::Put
-
-void rocksdb_put_helper(
-    JNIEnv* env, rocksdb::DB* db, const rocksdb::WriteOptions& write_options,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-
-  jbyte* key = env->GetByteArrayElements(jkey, 0);
-  jbyte* value = env->GetByteArrayElements(jvalue, 0);
-  rocksdb::Slice key_slice(reinterpret_cast<char*>(key), jkey_len);
-  rocksdb::Slice value_slice(reinterpret_cast<char*>(value), jvalue_len);
-
-  rocksdb::Status s = db->Put(write_options, key_slice, value_slice);
-
-  // trigger java unref on key and value.
-  // by passing JNI_ABORT, it will simply release the reference without
-  // copying the result back to the java byte array.
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-  env->ReleaseByteArrayElements(jvalue, value, JNI_ABORT);
-
-  if (s.ok()) {
-    return;
-  }
-  rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    put
- * Signature: (J[BI[BI)V
- */
-void Java_org_rocksdb_RocksDB_put__J_3BI_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  auto db = reinterpret_cast<rocksdb::DB*>(jdb_handle);
-  static const rocksdb::WriteOptions default_write_options =
-      rocksdb::WriteOptions();
-
-  rocksdb_put_helper(env, db, default_write_options,
-                     jkey, jkey_len,
-                     jvalue, jvalue_len);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    put
- * Signature: (JJ[BI[BI)V
- */
-void Java_org_rocksdb_RocksDB_put__JJ_3BI_3BI(
-    JNIEnv* env, jobject jdb,
-    jlong jdb_handle, jlong jwrite_options_handle,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  auto db = reinterpret_cast<rocksdb::DB*>(jdb_handle);
-  auto write_options = reinterpret_cast<rocksdb::WriteOptions*>(
-      jwrite_options_handle);
-
-  rocksdb_put_helper(env, db, *write_options,
-                     jkey, jkey_len,
-                     jvalue, jvalue_len);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// rocksdb::DB::Write
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    write
- * Signature: (JJ)V
- */
-void Java_org_rocksdb_RocksDB_write(
-    JNIEnv* env, jobject jdb,
-    jlong jwrite_options_handle, jlong jbatch_handle) {
-  rocksdb::DB* db = rocksdb::RocksDBJni::getHandle(env, jdb);
-  auto write_options = reinterpret_cast<rocksdb::WriteOptions*>(
-      jwrite_options_handle);
-  auto batch = reinterpret_cast<rocksdb::WriteBatch*>(jbatch_handle);
-
-  rocksdb::Status s = db->Write(*write_options, batch);
-
-  if (!s.ok()) {
-    rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-  }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// rocksdb::DB::Get
-
-jbyteArray rocksdb_get_helper(
-    JNIEnv* env, rocksdb::DB* db, const rocksdb::ReadOptions& read_opt,
-    jbyteArray jkey, jint jkey_len) {
-  jboolean isCopy;
-  jbyte* key = env->GetByteArrayElements(jkey, &isCopy);
-  rocksdb::Slice key_slice(
-      reinterpret_cast<char*>(key), jkey_len);
-
-  std::string value;
-  rocksdb::Status s = db->Get(
-      read_opt, key_slice, &value);
-
-  // trigger java unref on key.
-  // by passing JNI_ABORT, it will simply release the reference without
-  // copying the result back to the java byte array.
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-
-  if (s.IsNotFound()) {
-    return nullptr;
-  }
-
-  if (s.ok()) {
-    jbyteArray jvalue = env->NewByteArray(value.size());
-    env->SetByteArrayRegion(
-        jvalue, 0, value.size(),
-        reinterpret_cast<const jbyte*>(value.c_str()));
-    return jvalue;
-  }
-  rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-
-  return nullptr;
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    get
- * Signature: (J[BI)[B
- */
-jbyteArray Java_org_rocksdb_RocksDB_get__J_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jbyteArray jkey, jint jkey_len) {
-  return rocksdb_get_helper(env,
-      reinterpret_cast<rocksdb::DB*>(jdb_handle),
-      rocksdb::ReadOptions(),
-      jkey, jkey_len);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    get
- * Signature: (JJ[BI)[B
- */
-jbyteArray Java_org_rocksdb_RocksDB_get__JJ_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle, jlong jropt_handle,
-    jbyteArray jkey, jint jkey_len) {
-  return rocksdb_get_helper(env,
-      reinterpret_cast<rocksdb::DB*>(jdb_handle),
-      *reinterpret_cast<rocksdb::ReadOptions*>(jropt_handle),
-      jkey, jkey_len);
-}
-
-jint rocksdb_get_helper(
-    JNIEnv* env, rocksdb::DB* db, const rocksdb::ReadOptions& read_options,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  static const int kNotFound = -1;
-  static const int kStatusError = -2;
-
-  jbyte* key = env->GetByteArrayElements(jkey, 0);
-  rocksdb::Slice key_slice(
-      reinterpret_cast<char*>(key), jkey_len);
-
-  // TODO(yhchiang): we might save one memory allocation here by adding
-  // a DB::Get() function which takes preallocated jbyte* as input.
-  std::string cvalue;
-  rocksdb::Status s = db->Get(
-      read_options, key_slice, &cvalue);
-
-  // trigger java unref on key.
-  // by passing JNI_ABORT, it will simply release the reference without
-  // copying the result back to the java byte array.
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-
-  if (s.IsNotFound()) {
-    return kNotFound;
-  } else if (!s.ok()) {
-    // Here since we are throwing a Java exception from c++ side.
-    // As a result, c++ does not know calling this function will in fact
-    // throwing an exception.  As a result, the execution flow will
-    // not stop here, and codes after this throw will still be
-    // executed.
-    rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-
-    // Return a dummy const value to avoid compilation error, although
-    // java side might not have a chance to get the return value :)
-    return kStatusError;
-  }
-
-  int cvalue_len = static_cast<int>(cvalue.size());
-  int length = std::min(jvalue_len, cvalue_len);
-
-  env->SetByteArrayRegion(
-      jvalue, 0, length,
-      reinterpret_cast<const jbyte*>(cvalue.c_str()));
-  return cvalue_len;
-}
-
-jobject multi_get_helper(JNIEnv* env, jobject jdb, rocksdb::DB* db,
-    const rocksdb::ReadOptions& rOpt, jobject jkey_list, jint jkeys_count) {
-  std::vector<rocksdb::Slice> keys;
-  std::vector<jbyte*> keys_to_free;
-
-  // get iterator
-  jobject iteratorObj = env->CallObjectMethod(
-      jkey_list, rocksdb::ListJni::getIteratorMethod(env));
-
-  // iterate over keys and convert java byte array to slice
-  while(env->CallBooleanMethod(
-      iteratorObj, rocksdb::ListJni::getHasNextMethod(env)) == JNI_TRUE) {
-    jbyteArray jkey = (jbyteArray) env->CallObjectMethod(
-       iteratorObj, rocksdb::ListJni::getNextMethod(env));
-    jint key_length = env->GetArrayLength(jkey);
-
-    jbyte* key = new jbyte[key_length];
-    env->GetByteArrayRegion(jkey, 0, key_length, key);
-    // store allocated jbyte to free it after multiGet call
-    keys_to_free.push_back(key);
-
-    rocksdb::Slice key_slice(
-      reinterpret_cast<char*>(key), key_length);
-    keys.push_back(key_slice);
-  }
-
-  std::vector<std::string> values;
-  std::vector<rocksdb::Status> s = db->MultiGet(rOpt, keys, &values);
-
-  // Don't reuse class pointer
-  jclass jclazz = env->FindClass("java/util/ArrayList");
-  jmethodID mid = rocksdb::ListJni::getArrayListConstructorMethodId(
-      env, jclazz);
-  jobject jvalue_list = env->NewObject(jclazz, mid, jkeys_count);
-
-  // insert in java list
-  for(std::vector<rocksdb::Status>::size_type i = 0; i != s.size(); i++) {
-    if(s[i].ok()) {
-      jbyteArray jvalue = env->NewByteArray(values[i].size());
-      env->SetByteArrayRegion(
-          jvalue, 0, values[i].size(),
-          reinterpret_cast<const jbyte*>(values[i].c_str()));
-      env->CallBooleanMethod(
-          jvalue_list, rocksdb::ListJni::getListAddMethodId(env), jvalue);
-    }
-    else {
-      env->CallBooleanMethod(
-          jvalue_list, rocksdb::ListJni::getListAddMethodId(env), nullptr);
-    }
-  }
-
-  // free up allocated byte arrays
-  for(std::vector<jbyte*>::size_type i = 0; i != keys_to_free.size(); i++) {
-    delete[] keys_to_free[i];
-  }
-  keys_to_free.clear();
-
-  return jvalue_list;
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    multiGet
- * Signature: (JLjava/util/List;I)Ljava/util/List;
- */
-jobject Java_org_rocksdb_RocksDB_multiGet__JLjava_util_List_2I(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jobject jkey_list, jint jkeys_count) {
-  return multi_get_helper(env, jdb, reinterpret_cast<rocksdb::DB*>(jdb_handle),
-      rocksdb::ReadOptions(), jkey_list, jkeys_count);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    multiGet
- * Signature: (JJLjava/util/List;I)Ljava/util/List;
- */
-jobject Java_org_rocksdb_RocksDB_multiGet__JJLjava_util_List_2I(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jlong jropt_handle, jobject jkey_list, jint jkeys_count) {
-  return multi_get_helper(env, jdb, reinterpret_cast<rocksdb::DB*>(jdb_handle),
-      *reinterpret_cast<rocksdb::ReadOptions*>(jropt_handle), jkey_list,
-      jkeys_count);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    get
- * Signature: (J[BI[BI)I
- */
-jint Java_org_rocksdb_RocksDB_get__J_3BI_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  return rocksdb_get_helper(env,
-      reinterpret_cast<rocksdb::DB*>(jdb_handle),
-      rocksdb::ReadOptions(),
-      jkey, jkey_len, jvalue, jvalue_len);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    get
- * Signature: (JJ[BI[BI)I
- */
-jint Java_org_rocksdb_RocksDB_get__JJ_3BI_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle, jlong jropt_handle,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  return rocksdb_get_helper(env,
-      reinterpret_cast<rocksdb::DB*>(jdb_handle),
-      *reinterpret_cast<rocksdb::ReadOptions*>(jropt_handle),
-      jkey, jkey_len, jvalue, jvalue_len);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// rocksdb::DB::Delete()
-void rocksdb_remove_helper(
-    JNIEnv* env, rocksdb::DB* db, const rocksdb::WriteOptions& write_options,
-    jbyteArray jkey, jint jkey_len) {
-  jbyte* key = env->GetByteArrayElements(jkey, 0);
-  rocksdb::Slice key_slice(reinterpret_cast<char*>(key), jkey_len);
-
-  rocksdb::Status s = db->Delete(write_options, key_slice);
-
-  // trigger java unref on key and value.
-  // by passing JNI_ABORT, it will simply release the reference without
-  // copying the result back to the java byte array.
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-
-  if (!s.ok()) {
-    rocksdb::RocksDBExceptionJni::ThrowNew(env, s);
-  }
-  return;
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    remove
- * Signature: (J[BI)V
- */
-void Java_org_rocksdb_RocksDB_remove__J_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jbyteArray jkey, jint jkey_len) {
-  auto db = reinterpret_cast<rocksdb::DB*>(jdb_handle);
-  static const rocksdb::WriteOptions default_write_options =
-      rocksdb::WriteOptions();
-
-  rocksdb_remove_helper(env, db, default_write_options, jkey, jkey_len);
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    remove
- * Signature: (JJ[BI)V
- */
-void Java_org_rocksdb_RocksDB_remove__JJ_3BI(
-    JNIEnv* env, jobject jdb, jlong jdb_handle,
-    jlong jwrite_options, jbyteArray jkey, jint jkey_len) {
-  auto db = reinterpret_cast<rocksdb::DB*>(jdb_handle);
-  auto write_options = reinterpret_cast<rocksdb::WriteOptions*>(jwrite_options);
-
-  rocksdb_remove_helper(env, db, *write_options, jkey, jkey_len);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// rocksdb::DB::~DB()
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    dispose
- * Signature: (J)V
- */
-void Java_org_rocksdb_RocksDB_dispose(
-    JNIEnv* env, jobject java_db, jlong jhandle) {
-  auto db = reinterpret_cast<rocksdb::DB*>(jhandle);
-  assert(db != nullptr);
-  delete db;
-}
-
-/*
- * Class:     org_rocksdb_RocksDB
- * Method:    iterator0
- * Signature: (J)J
- */
-jlong Java_org_rocksdb_RocksDB_iterator0(
-    JNIEnv* env, jobject jdb, jlong db_handle) {
-  auto db = reinterpret_cast<rocksdb::DB*>(db_handle);
-  rocksdb::Iterator* iterator = db->NewIterator(rocksdb::ReadOptions());
-  return reinterpret_cast<jlong>(iterator);
-}
diff --git a/src/rocksdb/java/rocksjni/statistics.cc b/src/rocksdb/java/rocksjni/statistics.cc
deleted file mode 100644
index bf170c6..0000000
--- a/src/rocksdb/java/rocksjni/statistics.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ and enables
-// calling c++ rocksdb::Statistics methods from Java side.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <jni.h>
-
-#include "include/org_rocksdb_Statistics.h"
-#include "rocksjni/portal.h"
-#include "rocksdb/statistics.h"
-
-/*
- * Class:     org_rocksdb_Statistics
- * Method:    getTickerCount0
- * Signature: (IJ)J
- */
-jlong Java_org_rocksdb_Statistics_getTickerCount0(
-    JNIEnv* env, jobject jobj, int tickerType, jlong handle) {
-  auto st = reinterpret_cast<rocksdb::Statistics*>(handle);
-  assert(st != nullptr);
-
-  return st->getTickerCount(static_cast<rocksdb::Tickers>(tickerType));
-}
-
-/*
- * Class:     org_rocksdb_Statistics
- * Method:    geHistogramData0
- * Signature: (IJ)Lorg/rocksdb/HistogramData;
- */
-jobject Java_org_rocksdb_Statistics_geHistogramData0(
-  JNIEnv* env, jobject jobj, int histogramType, jlong handle) {
-  auto st = reinterpret_cast<rocksdb::Statistics*>(handle);
-  assert(st != nullptr);
-
-  rocksdb::HistogramData data;
-  st->histogramData(static_cast<rocksdb::Histograms>(histogramType),
-    &data);
-
-  // Don't reuse class pointer
-  jclass jclazz = env->FindClass("org/rocksdb/HistogramData");
-  jmethodID mid = rocksdb::HistogramDataJni::getConstructorMethodId(
-      env, jclazz);
-  return env->NewObject(jclazz, mid, data.median, data.percentile95,
-      data.percentile99, data.average, data.standard_deviation);
-}
diff --git a/src/rocksdb/java/rocksjni/table.cc b/src/rocksdb/java/rocksjni/table.cc
deleted file mode 100644
index c21501b..0000000
--- a/src/rocksdb/java/rocksjni/table.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ for rocksdb::Options.
-
-#include <jni.h>
-#include "include/org_rocksdb_PlainTableConfig.h"
-#include "rocksdb/table.h"
-
-/*
- * Class:     org_rocksdb_PlainTableConfig
- * Method:    newTableFactoryHandle
- * Signature: (IIDI)J
- */
-jlong Java_org_rocksdb_PlainTableConfig_newTableFactoryHandle(
-    JNIEnv* env, jobject jobj, jint jkey_size, jint jbloom_bits_per_key,
-    jdouble jhash_table_ratio, jint jindex_sparseness) {
-  return reinterpret_cast<jlong>(rocksdb::NewPlainTableFactory(
-          static_cast<uint32_t>(jkey_size),
-          static_cast<int>(jbloom_bits_per_key),
-          static_cast<double>(jhash_table_ratio),
-          static_cast<size_t>(jindex_sparseness)));
-}
diff --git a/src/rocksdb/java/rocksjni/write_batch.cc b/src/rocksdb/java/rocksjni/write_batch.cc
deleted file mode 100644
index 035b35f..0000000
--- a/src/rocksdb/java/rocksjni/write_batch.cc
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-// This file implements the "bridge" between Java and C++ and enables
-// calling c++ rocksdb::WriteBatch methods from Java side.
-#include <memory>
-
-#include "include/org_rocksdb_WriteBatch.h"
-#include "include/org_rocksdb_WriteBatchInternal.h"
-#include "include/org_rocksdb_WriteBatchTest.h"
-#include "rocksjni/portal.h"
-#include "rocksdb/db.h"
-#include "db/memtable.h"
-#include "rocksdb/write_batch.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/env.h"
-#include "rocksdb/memtablerep.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    newWriteBatch
- * Signature: (I)V
- */
-void Java_org_rocksdb_WriteBatch_newWriteBatch(
-    JNIEnv* env, jobject jobj, jint jreserved_bytes) {
-  rocksdb::WriteBatch* wb = new rocksdb::WriteBatch(
-      static_cast<size_t>(jreserved_bytes));
-
-  rocksdb::WriteBatchJni::setHandle(env, jobj, wb);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    count
- * Signature: ()I
- */
-jint Java_org_rocksdb_WriteBatch_count(JNIEnv* env, jobject jobj) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  return static_cast<jint>(wb->Count());
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    clear
- * Signature: ()V
- */
-void Java_org_rocksdb_WriteBatch_clear(JNIEnv* env, jobject jobj) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  wb->Clear();
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    put
- * Signature: ([BI[BI)V
- */
-void Java_org_rocksdb_WriteBatch_put(
-    JNIEnv* env, jobject jobj,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  jbyte* key = env->GetByteArrayElements(jkey, nullptr);
-  jbyte* value = env->GetByteArrayElements(jvalue, nullptr);
-  rocksdb::Slice key_slice(reinterpret_cast<char*>(key), jkey_len);
-  rocksdb::Slice value_slice(reinterpret_cast<char*>(value), jvalue_len);
-  wb->Put(key_slice, value_slice);
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-  env->ReleaseByteArrayElements(jvalue, value, JNI_ABORT);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    merge
- * Signature: ([BI[BI)V
- */
-JNIEXPORT void JNICALL Java_org_rocksdb_WriteBatch_merge(
-    JNIEnv* env, jobject jobj,
-    jbyteArray jkey, jint jkey_len,
-    jbyteArray jvalue, jint jvalue_len) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  jbyte* key = env->GetByteArrayElements(jkey, nullptr);
-  jbyte* value = env->GetByteArrayElements(jvalue, nullptr);
-  rocksdb::Slice key_slice(reinterpret_cast<char*>(key), jkey_len);
-  rocksdb::Slice value_slice(reinterpret_cast<char*>(value), jvalue_len);
-  wb->Merge(key_slice, value_slice);
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-  env->ReleaseByteArrayElements(jvalue, value, JNI_ABORT);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    remove
- * Signature: ([BI)V
- */
-JNIEXPORT void JNICALL Java_org_rocksdb_WriteBatch_remove(
-    JNIEnv* env, jobject jobj,
-    jbyteArray jkey, jint jkey_len) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  jbyte* key = env->GetByteArrayElements(jkey, nullptr);
-  rocksdb::Slice key_slice(reinterpret_cast<char*>(key), jkey_len);
-  wb->Delete(key_slice);
-  env->ReleaseByteArrayElements(jkey, key, JNI_ABORT);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    putLogData
- * Signature: ([BI)V
- */
-void Java_org_rocksdb_WriteBatch_putLogData(
-    JNIEnv* env, jobject jobj, jbyteArray jblob, jint jblob_len) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  jbyte* blob = env->GetByteArrayElements(jblob, nullptr);
-  rocksdb::Slice blob_slice(reinterpret_cast<char*>(blob), jblob_len);
-  wb->PutLogData(blob_slice);
-  env->ReleaseByteArrayElements(jblob, blob, JNI_ABORT);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatch
- * Method:    dispose0
- * Signature: ()V
- */
-void Java_org_rocksdb_WriteBatch_dispose0(JNIEnv* env, jobject jobj) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-  delete wb;
-
-  rocksdb::WriteBatchJni::setHandle(env, jobj, nullptr);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatchInternal
- * Method:    setSequence
- * Signature: (Lorg/rocksdb/WriteBatch;J)V
- */
-void Java_org_rocksdb_WriteBatchInternal_setSequence(
-    JNIEnv* env, jclass jclazz, jobject jobj, jlong jsn) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  rocksdb::WriteBatchInternal::SetSequence(
-      wb, static_cast<rocksdb::SequenceNumber>(jsn));
-}
-
-/*
- * Class:     org_rocksdb_WriteBatchInternal
- * Method:    sequence
- * Signature: (Lorg/rocksdb/WriteBatch;)J
- */
-jlong Java_org_rocksdb_WriteBatchInternal_sequence(
-    JNIEnv* env, jclass jclazz, jobject jobj) {
-  rocksdb::WriteBatch* wb = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(wb != nullptr);
-
-  return static_cast<jlong>(rocksdb::WriteBatchInternal::Sequence(wb));
-}
-
-/*
- * Class:     org_rocksdb_WriteBatchInternal
- * Method:    append
- * Signature: (Lorg/rocksdb/WriteBatch;Lorg/rocksdb/WriteBatch;)V
- */
-void Java_org_rocksdb_WriteBatchInternal_append(
-    JNIEnv* env, jclass jclazz, jobject jwb1, jobject jwb2) {
-  rocksdb::WriteBatch* wb1 = rocksdb::WriteBatchJni::getHandle(env, jwb1);
-  assert(wb1 != nullptr);
-  rocksdb::WriteBatch* wb2 = rocksdb::WriteBatchJni::getHandle(env, jwb2);
-  assert(wb2 != nullptr);
-
-  rocksdb::WriteBatchInternal::Append(wb1, wb2);
-}
-
-/*
- * Class:     org_rocksdb_WriteBatchTest
- * Method:    getContents
- * Signature: (Lorg/rocksdb/WriteBatch;)[B
- */
-jbyteArray Java_org_rocksdb_WriteBatchTest_getContents(
-    JNIEnv* env, jclass jclazz, jobject jobj) {
-  rocksdb::WriteBatch* b = rocksdb::WriteBatchJni::getHandle(env, jobj);
-  assert(b != nullptr);
-
-  // todo: Currently the following code is directly copied from
-  // db/write_bench_test.cc.  It could be implemented in java once
-  // all the necessary components can be accessed via jni api.
-
-  rocksdb::InternalKeyComparator cmp(rocksdb::BytewiseComparator());
-  auto factory = std::make_shared<rocksdb::SkipListFactory>();
-  rocksdb::Options options;
-  options.memtable_factory = factory;
-  rocksdb::MemTable* mem = new rocksdb::MemTable(cmp, options);
-  mem->Ref();
-  std::string state;
-  rocksdb::ColumnFamilyMemTablesDefault cf_mems_default(mem, &options);
-  rocksdb::Status s =
-      rocksdb::WriteBatchInternal::InsertInto(b, &cf_mems_default);
-  int count = 0;
-  rocksdb::Iterator* iter = mem->NewIterator(rocksdb::ReadOptions());
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    rocksdb::ParsedInternalKey ikey;
-    memset(reinterpret_cast<void*>(&ikey), 0, sizeof(ikey));
-    ASSERT_TRUE(rocksdb::ParseInternalKey(iter->key(), &ikey));
-    switch (ikey.type) {
-      case rocksdb::kTypeValue:
-        state.append("Put(");
-        state.append(ikey.user_key.ToString());
-        state.append(", ");
-        state.append(iter->value().ToString());
-        state.append(")");
-        count++;
-        break;
-      case rocksdb::kTypeMerge:
-        state.append("Merge(");
-        state.append(ikey.user_key.ToString());
-        state.append(", ");
-        state.append(iter->value().ToString());
-        state.append(")");
-        count++;
-        break;
-      case rocksdb::kTypeDeletion:
-        state.append("Delete(");
-        state.append(ikey.user_key.ToString());
-        state.append(")");
-        count++;
-        break;
-      default:
-        assert(false);
-        break;
-    }
-    state.append("@");
-    state.append(rocksdb::NumberToString(ikey.sequence));
-  }
-  delete iter;
-  if (!s.ok()) {
-    state.append(s.ToString());
-  } else if (count != rocksdb::WriteBatchInternal::Count(b)) {
-    state.append("CountMismatch()");
-  }
-  delete mem->Unref();
-
-  jbyteArray jstate = env->NewByteArray(state.size());
-  env->SetByteArrayRegion(
-      jstate, 0, state.size(),
-      reinterpret_cast<const jbyte*>(state.c_str()));
-
-  return jstate;
-}
diff --git a/src/rocksdb/linters/__phutil_library_init__.php b/src/rocksdb/linters/__phutil_library_init__.php
deleted file mode 100644
index 4b8d3d1..0000000
--- a/src/rocksdb/linters/__phutil_library_init__.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-phutil_register_library('linters', __FILE__);
diff --git a/src/rocksdb/linters/__phutil_library_map__.php b/src/rocksdb/linters/__phutil_library_map__.php
deleted file mode 100644
index 7808dc1..0000000
--- a/src/rocksdb/linters/__phutil_library_map__.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * This file is automatically generated. Use 'arc liberate' to rebuild it.
- * @generated
- * @phutil-library-version 2
- */
-
-phutil_register_library_map(array(
-  '__library_version__' => 2,
-  'class' =>
-  array(
-    'FacebookFbcodeLintEngine' => 'lint_engine/FacebookFbcodeLintEngine.php',
-    'FbcodeCppLinter' => 'cpp_linter/FbcodeCppLinter.php',
-    'PfffCppLinter' => 'cpp_linter/PfffCppLinter.php',
-    'ArcanistCpplintLinter' => 'cpp_linter/ArcanistCpplintLinter.php',
-  ),
-  'function' =>
-  array(
-  ),
-  'xmap' =>
-  array(
-    'FacebookFbcodeLintEngine' => 'ArcanistLintEngine',
-    'FbcodeCppLinter' => 'ArcanistLinter',
-    'PfffCppLinter' => 'ArcanistLinter',
-  ),
-));
diff --git a/src/rocksdb/linters/cpp_linter/ArcanistCpplintLinter.php b/src/rocksdb/linters/cpp_linter/ArcanistCpplintLinter.php
deleted file mode 100644
index b9c4137..0000000
--- a/src/rocksdb/linters/cpp_linter/ArcanistCpplintLinter.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/**
- * Uses google's cpplint.py to check code. RocksDB team forked this file from
- * phabricator's /src/lint/linter/ArcanistCpplintLinter.php, and customized it
- * for its own use.
- *
- * You can get it here:
- * http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
- * @group linter
- */
-final class ArcanistCpplintLinter extends ArcanistLinter {
-
-  public function willLintPaths(array $paths) {
-    return;
-  }
-
-  public function getLinterName() {
-    return 'cpplint.py';
-  }
-
-  public function getLintPath() {
-    $bin = 'cpplint.py';
-    // Search under current dir
-    list($err) = exec_manual('which %s/%s', $this->linterDir(), $bin);
-    if (!$err) {
-      return $this->linterDir().'/'.$bin;
-    }
-
-    // Look for globally installed cpplint.py
-    list($err) = exec_manual('which %s', $bin);
-    if ($err) {
-      throw new ArcanistUsageException(
-        "cpplint.py does not appear to be installed on this system. Install ".
-        "it (e.g., with 'wget \"http://google-styleguide.googlecode.com/".
-        "svn/trunk/cpplint/cpplint.py\"') ".
-        "in your .arcconfig to point to the directory where it resides. ".
-        "Also don't forget to chmod a+x cpplint.py!");
-    }
-
-    return $bin;
-  }
-
-  public function lintPath($path) {
-    $bin = $this->getLintPath();
-    $path = $this->rocksdbDir().'/'.$path;
-
-    $f = new ExecFuture("%C $path", $bin);
-
-    list($err, $stdout, $stderr) = $f->resolve();
-
-    if ($err === 2) {
-      throw new Exception("cpplint failed to run correctly:\n".$stderr);
-    }
-
-    $lines = explode("\n", $stderr);
-    $messages = array();
-    foreach ($lines as $line) {
-      $line = trim($line);
-      $matches = null;
-      $regex = '/^[^:]+:(\d+):\s*(.*)\s*\[(.*)\] \[(\d+)\]$/';
-      if (!preg_match($regex, $line, $matches)) {
-        continue;
-      }
-      foreach ($matches as $key => $match) {
-        $matches[$key] = trim($match);
-      }
-      $message = new ArcanistLintMessage();
-      $message->setPath($path);
-      $message->setLine($matches[1]);
-      $message->setCode($matches[3]);
-      $message->setName($matches[3]);
-      $message->setDescription($matches[2]);
-      $message->setSeverity(ArcanistLintSeverity::SEVERITY_WARNING);
-      $this->addLintMessage($message);
-    }
-  }
-
-  // The path of this linter
-  private function linterDir() {
-    return dirname(__FILE__);
-  }
-
-  // TODO(kaili) a quick and dirty way to figure out rocksdb's root dir.
-  private function rocksdbDir() {
-    return $this->linterDir()."/../..";
-  }
-}
diff --git a/src/rocksdb/linters/cpp_linter/FbcodeCppLinter.php b/src/rocksdb/linters/cpp_linter/FbcodeCppLinter.php
deleted file mode 100644
index e62d3bb..0000000
--- a/src/rocksdb/linters/cpp_linter/FbcodeCppLinter.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-class FbcodeCppLinter extends ArcanistLinter {
-  const CPPLINT      = "/home/engshare/tools/cpplint";
-  const LINT_ERROR   = 1;
-  const LINT_WARNING = 2;
-  const C_FLAG = "--c_mode=true";
-  private $rawLintOutput = array();
-
-  public function willLintPaths(array $paths) {
-    $futures = array();
-    $ret_value = 0;
-    $last_line = system("which cpplint", $ret_value);
-    $CPP_LINT = false;
-    if ($ret_value == 0) {
-      $CPP_LINT = $last_line;
-    } else if (file_exists(self::CPPLINT)) {
-      $CPP_LINT = self::CPPLINT;
-    }
-
-    if ($CPP_LINT) {
-      foreach ($paths as $p) {
-        $lpath = $this->getEngine()->getFilePathOnDisk($p);
-        $lpath_file = file($lpath);
-        if (preg_match('/\.(c)$/', $lpath) ||
-            preg_match('/-\*-.*Mode: C[; ].*-\*-/', $lpath_file[0]) ||
-            preg_match('/vim(:.*)*:\s*(set\s+)?filetype=c\s*:/', $lpath_file[0])
-            ) {
-          $futures[$p] = new ExecFuture("%s %s %s 2>&1",
-                             $CPP_LINT, self::C_FLAG,
-                             $this->getEngine()->getFilePathOnDisk($p));
-        } else {
-          $futures[$p] = new ExecFuture("%s %s 2>&1",
-            self::CPPLINT, $this->getEngine()->getFilePathOnDisk($p));
-        }
-      }
-
-      foreach (Futures($futures)->limit(8) as $p => $f) {
-        $this->rawLintOutput[$p] = $f->resolvex();
-      }
-    }
-    return;
-  }
-
-  public function getLinterName() {
-    return "FBCPP";
-  }
-
-  public function lintPath($path) {
-    $msgs = $this->getCppLintOutput($path);
-    foreach ($msgs as $m) {
-      $this->raiseLintAtLine($m['line'], 0, $m['severity'], $m['msg']);
-    }
-  }
-
-  public function getLintSeverityMap() {
-    return array(
-      self::LINT_WARNING => ArcanistLintSeverity::SEVERITY_WARNING,
-      self::LINT_ERROR   => ArcanistLintSeverity::SEVERITY_ERROR
-    );
-  }
-
-  public function getLintNameMap() {
-    return array(
-      self::LINT_WARNING => "CppLint Warning",
-      self::LINT_ERROR   => "CppLint Error"
-    );
-  }
-
-  private function getCppLintOutput($path) {
-    list($output) = $this->rawLintOutput[$path];
-
-    $msgs = array();
-    $current = null;
-    foreach (explode("\n", $output) as $line) {
-      if (preg_match('/[^:]*\((\d+)\):(.*)$/', $line, $matches)) {
-        if ($current) {
-          $msgs[] = $current;
-        }
-        $line = $matches[1];
-        $text = $matches[2];
-        $sev  = preg_match('/.*Warning.*/', $text)
-                  ? self::LINT_WARNING
-                  : self::LINT_ERROR;
-        $current = array('line'     => $line,
-                         'msg'      => $text,
-                         'severity' => $sev);
-      } else if ($current) {
-        $current['msg'] .= ' ' . $line;
-      }
-    }
-    if ($current) {
-      $msgs[] = $current;
-    }
-
-    return $msgs;
-  }
-}
-
diff --git a/src/rocksdb/linters/cpp_linter/PfffCppLinter.php b/src/rocksdb/linters/cpp_linter/PfffCppLinter.php
deleted file mode 100644
index 6736614..0000000
--- a/src/rocksdb/linters/cpp_linter/PfffCppLinter.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-// Copyright 2004-present Facebook.  All rights reserved.
-
-class PfffCppLinter extends ArcanistLinter {
-  const PROGRAM      = "/home/engshare/tools/checkCpp";
-
-  public function getLinterName() {
-    return "checkCpp";
-  }
-  public function getLintNameMap() {
-    return array(
-    );
-  }
-
-  public function getLintSeverityMap() {
-    return array(
-    );
-  }
-
-  public function willLintPaths(array $paths) {
-    $program = false;
-    $ret_value = 0;
-    $last_line = system("which checkCpp", $ret_value);
-    if ($ret_value == 0) {
-      $program = $last_line;
-    } else if (file_exists(self::PROGRAM)) {
-      $program = self::PROGRAM;
-    }
-    if ($program) {
-      $futures = array();
-      foreach ($paths as $p) {
-        $futures[$p] = new ExecFuture("%s --lint %s 2>&1",
-          $program, $this->getEngine()->getFilePathOnDisk($p));
-      }
-      foreach (Futures($futures)->limit(8) as $p => $f) {
-
-        list($stdout, $stderr) = $f->resolvex();
-        $raw = json_decode($stdout, true);
-        if (!is_array($raw)) {
-          throw new Exception(
-            "checkCpp returned invalid JSON!".
-            "Stdout: {$stdout} Stderr: {$stderr}"
-          );
-        }
-        foreach($raw as $err) {
-          $this->addLintMessage(
-            ArcanistLintMessage::newFromDictionary(
-              array(
-                'path' => $err['file'],
-                'line' => $err['line'],
-                'char' => 0,
-                'name' => $err['name'],
-                'description' => $err['info'],
-                'code' => $this->getLinterName(),
-                'severity' => ArcanistLintSeverity::SEVERITY_WARNING,
-              )
-            )
-          );
-        }
-      }
-    }
-    return;
-  }
-
-  public function lintPath($path) {
-    return;
-  }
-}
diff --git a/src/rocksdb/linters/cpp_linter/cpplint.py b/src/rocksdb/linters/cpp_linter/cpplint.py
deleted file mode 100755
index d264b00..0000000
--- a/src/rocksdb/linters/cpp_linter/cpplint.py
+++ /dev/null
@@ -1,4767 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-# This source code is licensed under the BSD-style license found in the
-# LICENSE file in the root directory of this source tree. An additional grant
-# of patent rights can be found in the PATENTS file in the same directory.
-# Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file. See the AUTHORS file for names of contributors.
-#
-# Copyright (c) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Does google-lint on c++ files.
-
-The goal of this script is to identify places in the code that *may*
-be in non-compliance with google style.  It does not attempt to fix
-up these problems -- the point is to educate.  It does also not
-attempt to find all problems, or to ensure that everything it does
-find is legitimately a problem.
-
-In particular, we can get very confused by /* and // inside strings!
-We do a small hack, which is to ignore //'s with "'s after them on the
-same line, but it is far from perfect (in either direction).
-"""
-
-import codecs
-import copy
-import getopt
-import math  # for log
-import os
-import re
-import sre_compile
-import string
-import sys
-import unicodedata
-
-
-_USAGE = """
-Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...]
-                   [--counting=total|toplevel|detailed] [--root=subdir]
-                   [--linelength=digits]
-        <file> [file] ...
-
-  The style guidelines this tries to follow are those in
-    http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
-
-  Every problem is given a confidence score from 1-5, with 5 meaning we are
-  certain of the problem, and 1 meaning it could be a legitimate construct.
-  This will miss some errors, and is not a substitute for a code review.
-
-  To suppress false-positive errors of a certain category, add a
-  'NOLINT(category)' comment to the line.  NOLINT or NOLINT(*)
-  suppresses errors of all categories on that line.
-
-  The files passed in will be linted; at least one file must be provided.
-  Default linted extensions are .cc, .cpp, .cu, .cuh and .h.  Change the
-  extensions with the --extensions flag.
-
-  Flags:
-
-    output=vs7
-      By default, the output is formatted to ease emacs parsing.  Visual Studio
-      compatible output (vs7) may also be used.  Other formats are unsupported.
-
-    verbose=#
-      Specify a number 0-5 to restrict errors to certain verbosity levels.
-
-    filter=-x,+y,...
-      Specify a comma-separated list of category-filters to apply: only
-      error messages whose category names pass the filters will be printed.
-      (Category names are printed with the message and look like
-      "[whitespace/indent]".)  Filters are evaluated left to right.
-      "-FOO" and "FOO" means "do not print categories that start with FOO".
-      "+FOO" means "do print categories that start with FOO".
-
-      Examples: --filter=-whitespace,+whitespace/braces
-                --filter=whitespace,runtime/printf,+runtime/printf_format
-                --filter=-,+build/include_what_you_use
-
-      To see a list of all the categories used in cpplint, pass no arg:
-         --filter=
-
-    counting=total|toplevel|detailed
-      The total number of errors found is always printed. If
-      'toplevel' is provided, then the count of errors in each of
-      the top-level categories like 'build' and 'whitespace' will
-      also be printed. If 'detailed' is provided, then a count
-      is provided for each category like 'build/class'.
-
-    root=subdir
-      The root directory used for deriving header guard CPP variable.
-      By default, the header guard CPP variable is calculated as the relative
-      path to the directory that contains .git, .hg, or .svn.  When this flag
-      is specified, the relative path is calculated from the specified
-      directory. If the specified directory does not exist, this flag is
-      ignored.
-
-      Examples:
-        Assuing that src/.git exists, the header guard CPP variables for
-        src/chrome/browser/ui/browser.h are:
-
-        No flag => CHROME_BROWSER_UI_BROWSER_H_
-        --root=chrome => BROWSER_UI_BROWSER_H_
-        --root=chrome/browser => UI_BROWSER_H_
-
-    linelength=digits
-      This is the allowed line length for the project. The default value is
-      80 characters.
-
-      Examples:
-        --linelength=120
-
-    extensions=extension,extension,...
-      The allowed file extensions that cpplint will check
-
-      Examples:
-        --extensions=hpp,cpp
-"""
-
-# We categorize each error message we print.  Here are the categories.
-# We want an explicit list so we can list them all in cpplint --filter=.
-# If you add a new error message with a new category, add it to the list
-# here!  cpplint_unittest.py should tell you if you forget to do this.
-_ERROR_CATEGORIES = [
-  'build/class',
-  'build/deprecated',
-  'build/endif_comment',
-  'build/explicit_make_pair',
-  'build/forward_decl',
-  'build/header_guard',
-  'build/include',
-  'build/include_alpha',
-  'build/include_order',
-  'build/include_what_you_use',
-  'build/namespaces',
-  'build/printf_format',
-  'build/storage_class',
-  'legal/copyright',
-  'readability/alt_tokens',
-  'readability/braces',
-  'readability/casting',
-  'readability/check',
-  'readability/constructors',
-  'readability/fn_size',
-  'readability/function',
-  'readability/multiline_comment',
-  'readability/multiline_string',
-  'readability/namespace',
-  'readability/nolint',
-  'readability/nul',
-  'readability/streams',
-  'readability/todo',
-  'readability/utf8',
-  'runtime/arrays',
-  'runtime/casting',
-  'runtime/explicit',
-  'runtime/int',
-  'runtime/init',
-  'runtime/invalid_increment',
-  'runtime/member_string_references',
-  'runtime/memset',
-  'runtime/operator',
-  'runtime/printf',
-  'runtime/printf_format',
-  'runtime/references',
-  'runtime/string',
-  'runtime/threadsafe_fn',
-  'runtime/vlog',
-  'whitespace/blank_line',
-  'whitespace/braces',
-  'whitespace/comma',
-  'whitespace/comments',
-  'whitespace/empty_conditional_body',
-  'whitespace/empty_loop_body',
-  'whitespace/end_of_line',
-  'whitespace/ending_newline',
-  'whitespace/forcolon',
-  'whitespace/indent',
-  'whitespace/line_length',
-  'whitespace/newline',
-  'whitespace/operators',
-  'whitespace/parens',
-  'whitespace/semicolon',
-  'whitespace/tab',
-  'whitespace/todo'
-  ]
-
-# The default state of the category filter. This is overrided by the --filter=
-# flag. By default all errors are on, so only add here categories that should be
-# off by default (i.e., categories that must be enabled by the --filter= flags).
-# All entries here should start with a '-' or '+', as in the --filter= flag.
-_DEFAULT_FILTERS = ['-build/include_alpha']
-
-# We used to check for high-bit characters, but after much discussion we
-# decided those were OK, as long as they were in UTF-8 and didn't represent
-# hard-coded international strings, which belong in a separate i18n file.
-
-
-# C++ headers
-_CPP_HEADERS = frozenset([
-    # Legacy
-    'algobase.h',
-    'algo.h',
-    'alloc.h',
-    'builtinbuf.h',
-    'bvector.h',
-    'complex.h',
-    'defalloc.h',
-    'deque.h',
-    'editbuf.h',
-    'fstream.h',
-    'function.h',
-    'hash_map',
-    'hash_map.h',
-    'hash_set',
-    'hash_set.h',
-    'hashtable.h',
-    'heap.h',
-    'indstream.h',
-    'iomanip.h',
-    'iostream.h',
-    'istream.h',
-    'iterator.h',
-    'list.h',
-    'map.h',
-    'multimap.h',
-    'multiset.h',
-    'ostream.h',
-    'pair.h',
-    'parsestream.h',
-    'pfstream.h',
-    'procbuf.h',
-    'pthread_alloc',
-    'pthread_alloc.h',
-    'rope',
-    'rope.h',
-    'ropeimpl.h',
-    'set.h',
-    'slist',
-    'slist.h',
-    'stack.h',
-    'stdiostream.h',
-    'stl_alloc.h',
-    'stl_relops.h',
-    'streambuf.h',
-    'stream.h',
-    'strfile.h',
-    'strstream.h',
-    'tempbuf.h',
-    'tree.h',
-    'type_traits.h',
-    'vector.h',
-    # 17.6.1.2 C++ library headers
-    'algorithm',
-    'array',
-    'atomic',
-    'bitset',
-    'chrono',
-    'codecvt',
-    'complex',
-    'condition_variable',
-    'deque',
-    'exception',
-    'forward_list',
-    'fstream',
-    'functional',
-    'future',
-    'initializer_list',
-    'iomanip',
-    'ios',
-    'iosfwd',
-    'iostream',
-    'istream',
-    'iterator',
-    'limits',
-    'list',
-    'locale',
-    'map',
-    'memory',
-    'mutex',
-    'new',
-    'numeric',
-    'ostream',
-    'queue',
-    'random',
-    'ratio',
-    'regex',
-    'set',
-    'sstream',
-    'stack',
-    'stdexcept',
-    'streambuf',
-    'string',
-    'strstream',
-    'system_error',
-    'thread',
-    'tuple',
-    'typeindex',
-    'typeinfo',
-    'type_traits',
-    'unordered_map',
-    'unordered_set',
-    'utility',
-    'valarray',
-    'vector',
-    # 17.6.1.2 C++ headers for C library facilities
-    'cassert',
-    'ccomplex',
-    'cctype',
-    'cerrno',
-    'cfenv',
-    'cfloat',
-    'cinttypes',
-    'ciso646',
-    'climits',
-    'clocale',
-    'cmath',
-    'csetjmp',
-    'csignal',
-    'cstdalign',
-    'cstdarg',
-    'cstdbool',
-    'cstddef',
-    'cstdint',
-    'cstdio',
-    'cstdlib',
-    'cstring',
-    'ctgmath',
-    'ctime',
-    'cuchar',
-    'cwchar',
-    'cwctype',
-    ])
-
-# Assertion macros.  These are defined in base/logging.h and
-# testing/base/gunit.h.  Note that the _M versions need to come first
-# for substring matching to work.
-_CHECK_MACROS = [
-    'DCHECK', 'CHECK',
-    'EXPECT_TRUE_M', 'EXPECT_TRUE',
-    'ASSERT_TRUE_M', 'ASSERT_TRUE',
-    'EXPECT_FALSE_M', 'EXPECT_FALSE',
-    'ASSERT_FALSE_M', 'ASSERT_FALSE',
-    ]
-
-# Replacement macros for CHECK/DCHECK/EXPECT_TRUE/EXPECT_FALSE
-_CHECK_REPLACEMENT = dict([(m, {}) for m in _CHECK_MACROS])
-
-for op, replacement in [('==', 'EQ'), ('!=', 'NE'),
-                        ('>=', 'GE'), ('>', 'GT'),
-                        ('<=', 'LE'), ('<', 'LT')]:
-  _CHECK_REPLACEMENT['DCHECK'][op] = 'DCHECK_%s' % replacement
-  _CHECK_REPLACEMENT['CHECK'][op] = 'CHECK_%s' % replacement
-  _CHECK_REPLACEMENT['EXPECT_TRUE'][op] = 'EXPECT_%s' % replacement
-  _CHECK_REPLACEMENT['ASSERT_TRUE'][op] = 'ASSERT_%s' % replacement
-  _CHECK_REPLACEMENT['EXPECT_TRUE_M'][op] = 'EXPECT_%s_M' % replacement
-  _CHECK_REPLACEMENT['ASSERT_TRUE_M'][op] = 'ASSERT_%s_M' % replacement
-
-for op, inv_replacement in [('==', 'NE'), ('!=', 'EQ'),
-                            ('>=', 'LT'), ('>', 'LE'),
-                            ('<=', 'GT'), ('<', 'GE')]:
-  _CHECK_REPLACEMENT['EXPECT_FALSE'][op] = 'EXPECT_%s' % inv_replacement
-  _CHECK_REPLACEMENT['ASSERT_FALSE'][op] = 'ASSERT_%s' % inv_replacement
-  _CHECK_REPLACEMENT['EXPECT_FALSE_M'][op] = 'EXPECT_%s_M' % inv_replacement
-  _CHECK_REPLACEMENT['ASSERT_FALSE_M'][op] = 'ASSERT_%s_M' % inv_replacement
-
-# Alternative tokens and their replacements.  For full list, see section 2.5
-# Alternative tokens [lex.digraph] in the C++ standard.
-#
-# Digraphs (such as '%:') are not included here since it's a mess to
-# match those on a word boundary.
-_ALT_TOKEN_REPLACEMENT = {
-    'and': '&&',
-    'bitor': '|',
-    'or': '||',
-    'xor': '^',
-    'compl': '~',
-    'bitand': '&',
-    'and_eq': '&=',
-    'or_eq': '|=',
-    'xor_eq': '^=',
-    'not': '!',
-    'not_eq': '!='
-    }
-
-# Compile regular expression that matches all the above keywords.  The "[ =()]"
-# bit is meant to avoid matching these keywords outside of boolean expressions.
-#
-# False positives include C-style multi-line comments and multi-line strings
-# but those have always been troublesome for cpplint.
-_ALT_TOKEN_REPLACEMENT_PATTERN = re.compile(
-    r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)')
-
-
-# These constants define types of headers for use with
-# _IncludeState.CheckNextIncludeOrder().
-_C_SYS_HEADER = 1
-_CPP_SYS_HEADER = 2
-_LIKELY_MY_HEADER = 3
-_POSSIBLE_MY_HEADER = 4
-_OTHER_HEADER = 5
-
-# These constants define the current inline assembly state
-_NO_ASM = 0       # Outside of inline assembly block
-_INSIDE_ASM = 1   # Inside inline assembly block
-_END_ASM = 2      # Last line of inline assembly block
-_BLOCK_ASM = 3    # The whole block is an inline assembly block
-
-# Match start of assembly blocks
-_MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)'
-                        r'(?:\s+(volatile|__volatile__))?'
-                        r'\s*[{(]')
-
-
-_regexp_compile_cache = {}
-
-# Finds occurrences of NOLINT or NOLINT(...).
-_RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?')
-
-# {str, set(int)}: a map from error categories to sets of linenumbers
-# on which those errors are expected and should be suppressed.
-_error_suppressions = {}
-
-# The root directory used for deriving header guard CPP variable.
-# This is set by --root flag.
-_root = None
-
-# The allowed line length of files.
-# This is set by --linelength flag.
-_line_length = 80
-
-# The allowed extensions for file names
-# This is set by --extensions flag.
-_valid_extensions = set(['cc', 'h', 'cpp', 'cu', 'cuh'])
-
-def ParseNolintSuppressions(filename, raw_line, linenum, error):
-  """Updates the global list of error-suppressions.
-
-  Parses any NOLINT comments on the current line, updating the global
-  error_suppressions store.  Reports an error if the NOLINT comment
-  was malformed.
-
-  Args:
-    filename: str, the name of the input file.
-    raw_line: str, the line of input text, with comments.
-    linenum: int, the number of the current line.
-    error: function, an error handler.
-  """
-  # FIXME(adonovan): "NOLINT(" is misparsed as NOLINT(*).
-  matched = _RE_SUPPRESSION.search(raw_line)
-  if matched:
-    category = matched.group(1)
-    if category in (None, '(*)'):  # => "suppress all"
-      _error_suppressions.setdefault(None, set()).add(linenum)
-    else:
-      if category.startswith('(') and category.endswith(')'):
-        category = category[1:-1]
-        if category in _ERROR_CATEGORIES:
-          _error_suppressions.setdefault(category, set()).add(linenum)
-        else:
-          error(filename, linenum, 'readability/nolint', 5,
-                'Unknown NOLINT error category: %s' % category)
-
-
-def ResetNolintSuppressions():
-  "Resets the set of NOLINT suppressions to empty."
-  _error_suppressions.clear()
-
-
-def IsErrorSuppressedByNolint(category, linenum):
-  """Returns true if the specified error category is suppressed on this line.
-
-  Consults the global error_suppressions map populated by
-  ParseNolintSuppressions/ResetNolintSuppressions.
-
-  Args:
-    category: str, the category of the error.
-    linenum: int, the current line number.
-  Returns:
-    bool, True iff the error should be suppressed due to a NOLINT comment.
-  """
-  return (linenum in _error_suppressions.get(category, set()) or
-          linenum in _error_suppressions.get(None, set()))
-
-def Match(pattern, s):
-  """Matches the string with the pattern, caching the compiled regexp."""
-  # The regexp compilation caching is inlined in both Match and Search for
-  # performance reasons; factoring it out into a separate function turns out
-  # to be noticeably expensive.
-  if pattern not in _regexp_compile_cache:
-    _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
-  return _regexp_compile_cache[pattern].match(s)
-
-
-def ReplaceAll(pattern, rep, s):
-  """Replaces instances of pattern in a string with a replacement.
-
-  The compiled regex is kept in a cache shared by Match and Search.
-
-  Args:
-    pattern: regex pattern
-    rep: replacement text
-    s: search string
-
-  Returns:
-    string with replacements made (or original string if no replacements)
-  """
-  if pattern not in _regexp_compile_cache:
-    _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
-  return _regexp_compile_cache[pattern].sub(rep, s)
-
-
-def Search(pattern, s):
-  """Searches the string for the pattern, caching the compiled regexp."""
-  if pattern not in _regexp_compile_cache:
-    _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
-  return _regexp_compile_cache[pattern].search(s)
-
-
-class _IncludeState(dict):
-  """Tracks line numbers for includes, and the order in which includes appear.
-
-  As a dict, an _IncludeState object serves as a mapping between include
-  filename and line number on which that file was included.
-
-  Call CheckNextIncludeOrder() once for each header in the file, passing
-  in the type constants defined above. Calls in an illegal order will
-  raise an _IncludeError with an appropriate error message.
-
-  """
-  # self._section will move monotonically through this set. If it ever
-  # needs to move backwards, CheckNextIncludeOrder will raise an error.
-  _INITIAL_SECTION = 0
-  _MY_H_SECTION = 1
-  _C_SECTION = 2
-  _CPP_SECTION = 3
-  _OTHER_H_SECTION = 4
-
-  _TYPE_NAMES = {
-      _C_SYS_HEADER: 'C system header',
-      _CPP_SYS_HEADER: 'C++ system header',
-      _LIKELY_MY_HEADER: 'header this file implements',
-      _POSSIBLE_MY_HEADER: 'header this file may implement',
-      _OTHER_HEADER: 'other header',
-      }
-  _SECTION_NAMES = {
-      _INITIAL_SECTION: "... nothing. (This can't be an error.)",
-      _MY_H_SECTION: 'a header this file implements',
-      _C_SECTION: 'C system header',
-      _CPP_SECTION: 'C++ system header',
-      _OTHER_H_SECTION: 'other header',
-      }
-
-  def __init__(self):
-    dict.__init__(self)
-    self.ResetSection()
-
-  def ResetSection(self):
-    # The name of the current section.
-    self._section = self._INITIAL_SECTION
-    # The path of last found header.
-    self._last_header = ''
-
-  def SetLastHeader(self, header_path):
-    self._last_header = header_path
-
-  def CanonicalizeAlphabeticalOrder(self, header_path):
-    """Returns a path canonicalized for alphabetical comparison.
-
-    - replaces "-" with "_" so they both cmp the same.
-    - removes '-inl' since we don't require them to be after the main header.
-    - lowercase everything, just in case.
-
-    Args:
-      header_path: Path to be canonicalized.
-
-    Returns:
-      Canonicalized path.
-    """
-    return header_path.replace('-inl.h', '.h').replace('-', '_').lower()
-
-  def IsInAlphabeticalOrder(self, clean_lines, linenum, header_path):
-    """Check if a header is in alphabetical order with the previous header.
-
-    Args:
-      clean_lines: A CleansedLines instance containing the file.
-      linenum: The number of the line to check.
-      header_path: Canonicalized header to be checked.
-
-    Returns:
-      Returns true if the header is in alphabetical order.
-    """
-    # If previous section is different from current section, _last_header will
-    # be reset to empty string, so it's always less than current header.
-    #
-    # If previous line was a blank line, assume that the headers are
-    # intentionally sorted the way they are.
-    if (self._last_header > header_path and
-        not Match(r'^\s*$', clean_lines.elided[linenum - 1])):
-      return False
-    return True
-
-  def CheckNextIncludeOrder(self, header_type):
-    """Returns a non-empty error message if the next header is out of order.
-
-    This function also updates the internal state to be ready to check
-    the next include.
-
-    Args:
-      header_type: One of the _XXX_HEADER constants defined above.
-
-    Returns:
-      The empty string if the header is in the right order, or an
-      error message describing what's wrong.
-
-    """
-    error_message = ('Found %s after %s' %
-                     (self._TYPE_NAMES[header_type],
-                      self._SECTION_NAMES[self._section]))
-
-    last_section = self._section
-
-    if header_type == _C_SYS_HEADER:
-      if self._section <= self._C_SECTION:
-        self._section = self._C_SECTION
-      else:
-        self._last_header = ''
-        return error_message
-    elif header_type == _CPP_SYS_HEADER:
-      if self._section <= self._CPP_SECTION:
-        self._section = self._CPP_SECTION
-      else:
-        self._last_header = ''
-        return error_message
-    elif header_type == _LIKELY_MY_HEADER:
-      if self._section <= self._MY_H_SECTION:
-        self._section = self._MY_H_SECTION
-      else:
-        self._section = self._OTHER_H_SECTION
-    elif header_type == _POSSIBLE_MY_HEADER:
-      if self._section <= self._MY_H_SECTION:
-        self._section = self._MY_H_SECTION
-      else:
-        # This will always be the fallback because we're not sure
-        # enough that the header is associated with this file.
-        self._section = self._OTHER_H_SECTION
-    else:
-      assert header_type == _OTHER_HEADER
-      self._section = self._OTHER_H_SECTION
-
-    if last_section != self._section:
-      self._last_header = ''
-
-    return ''
-
-
-class _CppLintState(object):
-  """Maintains module-wide state.."""
-
-  def __init__(self):
-    self.verbose_level = 1  # global setting.
-    self.error_count = 0    # global count of reported errors
-    # filters to apply when emitting error messages
-    self.filters = _DEFAULT_FILTERS[:]
-    self.counting = 'total'  # In what way are we counting errors?
-    self.errors_by_category = {}  # string to int dict storing error counts
-
-    # output format:
-    # "emacs" - format that emacs can parse (default)
-    # "vs7" - format that Microsoft Visual Studio 7 can parse
-    self.output_format = 'emacs'
-
-  def SetOutputFormat(self, output_format):
-    """Sets the output format for errors."""
-    self.output_format = output_format
-
-  def SetVerboseLevel(self, level):
-    """Sets the module's verbosity, and returns the previous setting."""
-    last_verbose_level = self.verbose_level
-    self.verbose_level = level
-    return last_verbose_level
-
-  def SetCountingStyle(self, counting_style):
-    """Sets the module's counting options."""
-    self.counting = counting_style
-
-  def SetFilters(self, filters):
-    """Sets the error-message filters.
-
-    These filters are applied when deciding whether to emit a given
-    error message.
-
-    Args:
-      filters: A string of comma-separated filters (eg "+whitespace/indent").
-               Each filter should start with + or -; else we die.
-
-    Raises:
-      ValueError: The comma-separated filters did not all start with '+' or '-'.
-                  E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter"
-    """
-    # Default filters always have less priority than the flag ones.
-    self.filters = _DEFAULT_FILTERS[:]
-    for filt in filters.split(','):
-      clean_filt = filt.strip()
-      if clean_filt:
-        self.filters.append(clean_filt)
-    for filt in self.filters:
-      if not (filt.startswith('+') or filt.startswith('-')):
-        raise ValueError('Every filter in --filters must start with + or -'
-                         ' (%s does not)' % filt)
-
-  def ResetErrorCounts(self):
-    """Sets the module's error statistic back to zero."""
-    self.error_count = 0
-    self.errors_by_category = {}
-
-  def IncrementErrorCount(self, category):
-    """Bumps the module's error statistic."""
-    self.error_count += 1
-    if self.counting in ('toplevel', 'detailed'):
-      if self.counting != 'detailed':
-        category = category.split('/')[0]
-      if category not in self.errors_by_category:
-        self.errors_by_category[category] = 0
-      self.errors_by_category[category] += 1
-
-  def PrintErrorCounts(self):
-    """Print a summary of errors by category, and the total."""
-    for category, count in self.errors_by_category.iteritems():
-      sys.stderr.write('Category \'%s\' errors found: %d\n' %
-                       (category, count))
-    sys.stderr.write('Total errors found: %d\n' % self.error_count)
-
-_cpplint_state = _CppLintState()
-
-
-def _OutputFormat():
-  """Gets the module's output format."""
-  return _cpplint_state.output_format
-
-
-def _SetOutputFormat(output_format):
-  """Sets the module's output format."""
-  _cpplint_state.SetOutputFormat(output_format)
-
-
-def _VerboseLevel():
-  """Returns the module's verbosity setting."""
-  return _cpplint_state.verbose_level
-
-
-def _SetVerboseLevel(level):
-  """Sets the module's verbosity, and returns the previous setting."""
-  return _cpplint_state.SetVerboseLevel(level)
-
-
-def _SetCountingStyle(level):
-  """Sets the module's counting options."""
-  _cpplint_state.SetCountingStyle(level)
-
-
-def _Filters():
-  """Returns the module's list of output filters, as a list."""
-  return _cpplint_state.filters
-
-
-def _SetFilters(filters):
-  """Sets the module's error-message filters.
-
-  These filters are applied when deciding whether to emit a given
-  error message.
-
-  Args:
-    filters: A string of comma-separated filters (eg "whitespace/indent").
-             Each filter should start with + or -; else we die.
-  """
-  _cpplint_state.SetFilters(filters)
-
-
-class _FunctionState(object):
-  """Tracks current function name and the number of lines in its body."""
-
-  _NORMAL_TRIGGER = 250  # for --v=0, 500 for --v=1, etc.
-  _TEST_TRIGGER = 400    # about 50% more than _NORMAL_TRIGGER.
-
-  def __init__(self):
-    self.in_a_function = False
-    self.lines_in_function = 0
-    self.current_function = ''
-
-  def Begin(self, function_name):
-    """Start analyzing function body.
-
-    Args:
-      function_name: The name of the function being tracked.
-    """
-    self.in_a_function = True
-    self.lines_in_function = 0
-    self.current_function = function_name
-
-  def Count(self):
-    """Count line in current function body."""
-    if self.in_a_function:
-      self.lines_in_function += 1
-
-  def Check(self, error, filename, linenum):
-    """Report if too many lines in function body.
-
-    Args:
-      error: The function to call with any errors found.
-      filename: The name of the current file.
-      linenum: The number of the line to check.
-    """
-    if Match(r'T(EST|est)', self.current_function):
-      base_trigger = self._TEST_TRIGGER
-    else:
-      base_trigger = self._NORMAL_TRIGGER
-    trigger = base_trigger * 2**_VerboseLevel()
-
-    if self.lines_in_function > trigger:
-      error_level = int(math.log(self.lines_in_function / base_trigger, 2))
-      # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ...
-      if error_level > 5:
-        error_level = 5
-      error(filename, linenum, 'readability/fn_size', error_level,
-            'Small and focused functions are preferred:'
-            ' %s has %d non-comment lines'
-            ' (error triggered by exceeding %d lines).'  % (
-                self.current_function, self.lines_in_function, trigger))
-
-  def End(self):
-    """Stop analyzing function body."""
-    self.in_a_function = False
-
-
-class _IncludeError(Exception):
-  """Indicates a problem with the include order in a file."""
-  pass
-
-
-class FileInfo:
-  """Provides utility functions for filenames.
-
-  FileInfo provides easy access to the components of a file's path
-  relative to the project root.
-  """
-
-  def __init__(self, filename):
-    self._filename = filename
-
-  def FullName(self):
-    """Make Windows paths like Unix."""
-    return os.path.abspath(self._filename).replace('\\', '/')
-
-  def RepositoryName(self):
-    """FullName after removing the local path to the repository.
-
-    If we have a real absolute path name here we can try to do something smart:
-    detecting the root of the checkout and truncating /path/to/checkout from
-    the name so that we get header guards that don't include things like
-    "C:\Documents and Settings\..." or "/home/username/..." in them and thus
-    people on different computers who have checked the source out to different
-    locations won't see bogus errors.
-    """
-    fullname = self.FullName()
-
-    if os.path.exists(fullname):
-      project_dir = os.path.dirname(fullname)
-
-      if os.path.exists(os.path.join(project_dir, ".svn")):
-        # If there's a .svn file in the current directory, we recursively look
-        # up the directory tree for the top of the SVN checkout
-        root_dir = project_dir
-        one_up_dir = os.path.dirname(root_dir)
-        while os.path.exists(os.path.join(one_up_dir, ".svn")):
-          root_dir = os.path.dirname(root_dir)
-          one_up_dir = os.path.dirname(one_up_dir)
-
-        prefix = os.path.commonprefix([root_dir, project_dir])
-        return fullname[len(prefix) + 1:]
-
-      # Not SVN <= 1.6? Try to find a git, hg, or svn top level directory by
-      # searching up from the current path.
-      root_dir = os.path.dirname(fullname)
-      while (root_dir != os.path.dirname(root_dir) and
-             not os.path.exists(os.path.join(root_dir, ".git")) and
-             not os.path.exists(os.path.join(root_dir, ".hg")) and
-             not os.path.exists(os.path.join(root_dir, ".svn"))):
-        root_dir = os.path.dirname(root_dir)
-
-      if (os.path.exists(os.path.join(root_dir, ".git")) or
-          os.path.exists(os.path.join(root_dir, ".hg")) or
-          os.path.exists(os.path.join(root_dir, ".svn"))):
-        prefix = os.path.commonprefix([root_dir, project_dir])
-        return fullname[len(prefix) + 1:]
-
-    # Don't know what to do; header guard warnings may be wrong...
-    return fullname
-
-  def Split(self):
-    """Splits the file into the directory, basename, and extension.
-
-    For 'chrome/browser/browser.cc', Split() would
-    return ('chrome/browser', 'browser', '.cc')
-
-    Returns:
-      A tuple of (directory, basename, extension).
-    """
-
-    googlename = self.RepositoryName()
-    project, rest = os.path.split(googlename)
-    return (project,) + os.path.splitext(rest)
-
-  def BaseName(self):
-    """File base name - text after the final slash, before the final period."""
-    return self.Split()[1]
-
-  def Extension(self):
-    """File extension - text following the final period."""
-    return self.Split()[2]
-
-  def NoExtension(self):
-    """File has no source file extension."""
-    return '/'.join(self.Split()[0:2])
-
-  def IsSource(self):
-    """File has a source file extension."""
-    return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
-
-
-def _ShouldPrintError(category, confidence, linenum):
-  """If confidence >= verbose, category passes filter and is not suppressed."""
-
-  # There are three ways we might decide not to print an error message:
-  # a "NOLINT(category)" comment appears in the source,
-  # the verbosity level isn't high enough, or the filters filter it out.
-  if IsErrorSuppressedByNolint(category, linenum):
-    return False
-  if confidence < _cpplint_state.verbose_level:
-    return False
-
-  is_filtered = False
-  for one_filter in _Filters():
-    if one_filter.startswith('-'):
-      if category.startswith(one_filter[1:]):
-        is_filtered = True
-    elif one_filter.startswith('+'):
-      if category.startswith(one_filter[1:]):
-        is_filtered = False
-    else:
-      assert False  # should have been checked for in SetFilter.
-  if is_filtered:
-    return False
-
-  return True
-
-
-def Error(filename, linenum, category, confidence, message):
-  """Logs the fact we've found a lint error.
-
-  We log where the error was found, and also our confidence in the error,
-  that is, how certain we are this is a legitimate style regression, and
-  not a misidentification or a use that's sometimes justified.
-
-  False positives can be suppressed by the use of
-  "cpplint(category)"  comments on the offending line.  These are
-  parsed into _error_suppressions.
-
-  Args:
-    filename: The name of the file containing the error.
-    linenum: The number of the line containing the error.
-    category: A string used to describe the "category" this bug
-      falls under: "whitespace", say, or "runtime".  Categories
-      may have a hierarchy separated by slashes: "whitespace/indent".
-    confidence: A number from 1-5 representing a confidence score for
-      the error, with 5 meaning that we are certain of the problem,
-      and 1 meaning that it could be a legitimate construct.
-    message: The error message.
-  """
-  if _ShouldPrintError(category, confidence, linenum):
-    _cpplint_state.IncrementErrorCount(category)
-    if _cpplint_state.output_format == 'vs7':
-      sys.stderr.write('%s(%s):  %s  [%s] [%d]\n' % (
-          filename, linenum, message, category, confidence))
-    elif _cpplint_state.output_format == 'eclipse':
-      sys.stderr.write('%s:%s: warning: %s  [%s] [%d]\n' % (
-          filename, linenum, message, category, confidence))
-    else:
-      sys.stderr.write('%s:%s:  %s  [%s] [%d]\n' % (
-          filename, linenum, message, category, confidence))
-
-
-# Matches standard C++ escape sequences per 2.13.2.3 of the C++ standard.
-_RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
-    r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)')
-# Matches strings.  Escape codes should already be removed by ESCAPES.
-_RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"')
-# Matches characters.  Escape codes should already be removed by ESCAPES.
-_RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'")
-# Matches multi-line C++ comments.
-# This RE is a little bit more complicated than one might expect, because we
-# have to take care of space removals tools so we can handle comments inside
-# statements better.
-# The current rule is: We only clear spaces from both sides when we're at the
-# end of the line. Otherwise, we try to remove spaces from the right side,
-# if this doesn't work we try on left side but only if there's a non-character
-# on the right.
-_RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile(
-    r"""(\s*/\*.*\*/\s*$|
-            /\*.*\*/\s+|
-         \s+/\*.*\*/(?=\W)|
-            /\*.*\*/)""", re.VERBOSE)
-
-
-def IsCppString(line):
-  """Does line terminate so, that the next symbol is in string constant.
-
-  This function does not consider single-line nor multi-line comments.
-
-  Args:
-    line: is a partial line of code starting from the 0..n.
-
-  Returns:
-    True, if next character appended to 'line' is inside a
-    string constant.
-  """
-
-  line = line.replace(r'\\', 'XX')  # after this, \\" does not match to \"
-  return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1
-
-
-def CleanseRawStrings(raw_lines):
-  """Removes C++11 raw strings from lines.
-
-    Before:
-      static const char kData[] = R"(
-          multi-line string
-          )";
-
-    After:
-      static const char kData[] = ""
-          (replaced by blank line)
-          "";
-
-  Args:
-    raw_lines: list of raw lines.
-
-  Returns:
-    list of lines with C++11 raw strings replaced by empty strings.
-  """
-
-  delimiter = None
-  lines_without_raw_strings = []
-  for line in raw_lines:
-    if delimiter:
-      # Inside a raw string, look for the end
-      end = line.find(delimiter)
-      if end >= 0:
-        # Found the end of the string, match leading space for this
-        # line and resume copying the original lines, and also insert
-        # a "" on the last line.
-        leading_space = Match(r'^(\s*)\S', line)
-        line = leading_space.group(1) + '""' + line[end + len(delimiter):]
-        delimiter = None
-      else:
-        # Haven't found the end yet, append a blank line.
-        line = ''
-
-    else:
-      # Look for beginning of a raw string.
-      # See 2.14.15 [lex.string] for syntax.
-      matched = Match(r'^(.*)\b(?:R|u8R|uR|UR|LR)"([^\s\\()]*)\((.*)$', line)
-      if matched:
-        delimiter = ')' + matched.group(2) + '"'
-
-        end = matched.group(3).find(delimiter)
-        if end >= 0:
-          # Raw string ended on same line
-          line = (matched.group(1) + '""' +
-                  matched.group(3)[end + len(delimiter):])
-          delimiter = None
-        else:
-          # Start of a multi-line raw string
-          line = matched.group(1) + '""'
-
-    lines_without_raw_strings.append(line)
-
-  # TODO(unknown): if delimiter is not None here, we might want to
-  # emit a warning for unterminated string.
-  return lines_without_raw_strings
-
-
-def FindNextMultiLineCommentStart(lines, lineix):
-  """Find the beginning marker for a multiline comment."""
-  while lineix < len(lines):
-    if lines[lineix].strip().startswith('/*'):
-      # Only return this marker if the comment goes beyond this line
-      if lines[lineix].strip().find('*/', 2) < 0:
-        return lineix
-    lineix += 1
-  return len(lines)
-
-
-def FindNextMultiLineCommentEnd(lines, lineix):
-  """We are inside a comment, find the end marker."""
-  while lineix < len(lines):
-    if lines[lineix].strip().endswith('*/'):
-      return lineix
-    lineix += 1
-  return len(lines)
-
-
-def RemoveMultiLineCommentsFromRange(lines, begin, end):
-  """Clears a range of lines for multi-line comments."""
-  # Having // dummy comments makes the lines non-empty, so we will not get
-  # unnecessary blank line warnings later in the code.
-  for i in range(begin, end):
-    lines[i] = '// dummy'
-
-
-def RemoveMultiLineComments(filename, lines, error):
-  """Removes multiline (c-style) comments from lines."""
-  lineix = 0
-  while lineix < len(lines):
-    lineix_begin = FindNextMultiLineCommentStart(lines, lineix)
-    if lineix_begin >= len(lines):
-      return
-    lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin)
-    if lineix_end >= len(lines):
-      error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
-            'Could not find end of multi-line comment')
-      return
-    RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1)
-    lineix = lineix_end + 1
-
-
-def CleanseComments(line):
-  """Removes //-comments and single-line C-style /* */ comments.
-
-  Args:
-    line: A line of C++ source.
-
-  Returns:
-    The line with single-line comments removed.
-  """
-  commentpos = line.find('//')
-  if commentpos != -1 and not IsCppString(line[:commentpos]):
-    line = line[:commentpos].rstrip()
-  # get rid of /* ... */
-  return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line)
-
-
-class CleansedLines(object):
-  """Holds 3 copies of all lines with different preprocessing applied to them.
-
-  1) elided member contains lines without strings and comments,
-  2) lines member contains lines without comments, and
-  3) raw_lines member contains all the lines without processing.
-  All these three members are of <type 'list'>, and of the same length.
-  """
-
-  def __init__(self, lines):
-    self.elided = []
-    self.lines = []
-    self.raw_lines = lines
-    self.num_lines = len(lines)
-    self.lines_without_raw_strings = CleanseRawStrings(lines)
-    for linenum in range(len(self.lines_without_raw_strings)):
-      self.lines.append(CleanseComments(
-          self.lines_without_raw_strings[linenum]))
-      elided = self._CollapseStrings(self.lines_without_raw_strings[linenum])
-      self.elided.append(CleanseComments(elided))
-
-  def NumLines(self):
-    """Returns the number of lines represented."""
-    return self.num_lines
-
-  @staticmethod
-  def _CollapseStrings(elided):
-    """Collapses strings and chars on a line to simple "" or '' blocks.
-
-    We nix strings first so we're not fooled by text like '"http://"'
-
-    Args:
-      elided: The line being processed.
-
-    Returns:
-      The line with collapsed strings.
-    """
-    if not _RE_PATTERN_INCLUDE.match(elided):
-      # Remove escaped characters first to make quote/single quote collapsing
-      # basic.  Things that look like escaped characters shouldn't occur
-      # outside of strings and chars.
-      elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub('', elided)
-      elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub("''", elided)
-      elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub('""', elided)
-    return elided
-
-
-def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar):
-  """Find the position just after the matching endchar.
-
-  Args:
-    line: a CleansedLines line.
-    startpos: start searching at this position.
-    depth: nesting level at startpos.
-    startchar: expression opening character.
-    endchar: expression closing character.
-
-  Returns:
-    On finding matching endchar: (index just after matching endchar, 0)
-    Otherwise: (-1, new depth at end of this line)
-  """
-  for i in xrange(startpos, len(line)):
-    if line[i] == startchar:
-      depth += 1
-    elif line[i] == endchar:
-      depth -= 1
-      if depth == 0:
-        return (i + 1, 0)
-  return (-1, depth)
-
-
-def CloseExpression(clean_lines, linenum, pos):
-  """If input points to ( or { or [ or <, finds the position that closes it.
-
-  If lines[linenum][pos] points to a '(' or '{' or '[' or '<', finds the
-  linenum/pos that correspond to the closing of the expression.
-
-  Args:
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    pos: A position on the line.
-
-  Returns:
-    A tuple (line, linenum, pos) pointer *past* the closing brace, or
-    (line, len(lines), -1) if we never find a close.  Note we ignore
-    strings and comments when matching; and the line we return is the
-    'cleansed' line at linenum.
-  """
-
-  line = clean_lines.elided[linenum]
-  startchar = line[pos]
-  if startchar not in '({[<':
-    return (line, clean_lines.NumLines(), -1)
-  if startchar == '(': endchar = ')'
-  if startchar == '[': endchar = ']'
-  if startchar == '{': endchar = '}'
-  if startchar == '<': endchar = '>'
-
-  # Check first line
-  (end_pos, num_open) = FindEndOfExpressionInLine(
-      line, pos, 0, startchar, endchar)
-  if end_pos > -1:
-    return (line, linenum, end_pos)
-
-  # Continue scanning forward
-  while linenum < clean_lines.NumLines() - 1:
-    linenum += 1
-    line = clean_lines.elided[linenum]
-    (end_pos, num_open) = FindEndOfExpressionInLine(
-        line, 0, num_open, startchar, endchar)
-    if end_pos > -1:
-      return (line, linenum, end_pos)
-
-  # Did not find endchar before end of file, give up
-  return (line, clean_lines.NumLines(), -1)
-
-
-def FindStartOfExpressionInLine(line, endpos, depth, startchar, endchar):
-  """Find position at the matching startchar.
-
-  This is almost the reverse of FindEndOfExpressionInLine, but note
-  that the input position and returned position differs by 1.
-
-  Args:
-    line: a CleansedLines line.
-    endpos: start searching at this position.
-    depth: nesting level at endpos.
-    startchar: expression opening character.
-    endchar: expression closing character.
-
-  Returns:
-    On finding matching startchar: (index at matching startchar, 0)
-    Otherwise: (-1, new depth at beginning of this line)
-  """
-  for i in xrange(endpos, -1, -1):
-    if line[i] == endchar:
-      depth += 1
-    elif line[i] == startchar:
-      depth -= 1
-      if depth == 0:
-        return (i, 0)
-  return (-1, depth)
-
-
-def ReverseCloseExpression(clean_lines, linenum, pos):
-  """If input points to ) or } or ] or >, finds the position that opens it.
-
-  If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the
-  linenum/pos that correspond to the opening of the expression.
-
-  Args:
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    pos: A position on the line.
-
-  Returns:
-    A tuple (line, linenum, pos) pointer *at* the opening brace, or
-    (line, 0, -1) if we never find the matching opening brace.  Note
-    we ignore strings and comments when matching; and the line we
-    return is the 'cleansed' line at linenum.
-  """
-  line = clean_lines.elided[linenum]
-  endchar = line[pos]
-  if endchar not in ')}]>':
-    return (line, 0, -1)
-  if endchar == ')': startchar = '('
-  if endchar == ']': startchar = '['
-  if endchar == '}': startchar = '{'
-  if endchar == '>': startchar = '<'
-
-  # Check last line
-  (start_pos, num_open) = FindStartOfExpressionInLine(
-      line, pos, 0, startchar, endchar)
-  if start_pos > -1:
-    return (line, linenum, start_pos)
-
-  # Continue scanning backward
-  while linenum > 0:
-    linenum -= 1
-    line = clean_lines.elided[linenum]
-    (start_pos, num_open) = FindStartOfExpressionInLine(
-        line, len(line) - 1, num_open, startchar, endchar)
-    if start_pos > -1:
-      return (line, linenum, start_pos)
-
-  # Did not find startchar before beginning of file, give up
-  return (line, 0, -1)
-
-
-def CheckForCopyright(filename, lines, error):
-  """Logs an error if no Copyright message appears at the top of the file."""
-
-  # We'll say it should occur by line 10. Don't forget there's a
-  # dummy line at the front.
-  for line in xrange(1, min(len(lines), 11)):
-    if re.search(r'Copyright', lines[line], re.I): break
-  else:                       # means no copyright line was found
-    error(filename, 0, 'legal/copyright', 5,
-          'No copyright message found.  '
-          'You should have a line: "Copyright [year] <Copyright Owner>"')
-
-
-def GetHeaderGuardCPPVariable(filename):
-  """Returns the CPP variable that should be used as a header guard.
-
-  Args:
-    filename: The name of a C++ header file.
-
-  Returns:
-    The CPP variable that should be used as a header guard in the
-    named file.
-
-  """
-
-  # Restores original filename in case that cpplint is invoked from Emacs's
-  # flymake.
-  filename = re.sub(r'_flymake\.h$', '.h', filename)
-  filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
-
-  fileinfo = FileInfo(filename)
-  file_path_from_root = fileinfo.RepositoryName()
-  if _root:
-    file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root)
-  return re.sub(r'[-./\s]', '_', file_path_from_root).upper() + '_'
-
-
-def CheckForHeaderGuard(filename, lines, error):
-  """Checks that the file contains a header guard.
-
-  Logs an error if no #ifndef header guard is present.  For other
-  headers, checks that the full pathname is used.
-
-  Args:
-    filename: The name of the C++ header file.
-    lines: An array of strings, each representing a line of the file.
-    error: The function to call with any errors found.
-  """
-
-  cppvar = GetHeaderGuardCPPVariable(filename)
-
-  ifndef = None
-  ifndef_linenum = 0
-  define = None
-  endif = None
-  endif_linenum = 0
-  for linenum, line in enumerate(lines):
-    # Already been well guarded, no need for further checking.
-    if line.strip() == "#pragma once":
-        return
-    linesplit = line.split()
-    if len(linesplit) >= 2:
-      # find the first occurrence of #ifndef and #define, save arg
-      if not ifndef and linesplit[0] == '#ifndef':
-        # set ifndef to the header guard presented on the #ifndef line.
-        ifndef = linesplit[1]
-        ifndef_linenum = linenum
-      if not define and linesplit[0] == '#define':
-        define = linesplit[1]
-    # find the last occurrence of #endif, save entire line
-    if line.startswith('#endif'):
-      endif = line
-      endif_linenum = linenum
-
-  if not ifndef:
-    error(filename, 0, 'build/header_guard', 5,
-          'No #ifndef header guard found, suggested CPP variable is: %s' %
-          cppvar)
-    return
-
-  if not define:
-    error(filename, 0, 'build/header_guard', 5,
-          'No #define header guard found, suggested CPP variable is: %s' %
-          cppvar)
-    return
-
-  # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__
-  # for backward compatibility.
-  if ifndef != cppvar:
-    error_level = 0
-    if ifndef != cppvar + '_':
-      error_level = 5
-
-    ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum,
-                            error)
-    error(filename, ifndef_linenum, 'build/header_guard', error_level,
-          '#ifndef header guard has wrong style, please use: %s' % cppvar)
-
-  if define != ifndef:
-    error(filename, 0, 'build/header_guard', 5,
-          '#ifndef and #define don\'t match, suggested CPP variable is: %s' %
-          cppvar)
-    return
-
-  if endif != ('#endif  // %s' % cppvar):
-    error_level = 0
-    if endif != ('#endif  // %s' % (cppvar + '_')):
-      error_level = 5
-
-    ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum,
-                            error)
-    error(filename, endif_linenum, 'build/header_guard', error_level,
-          '#endif line should be "#endif  // %s"' % cppvar)
-
-
-def CheckForBadCharacters(filename, lines, error):
-  """Logs an error for each line containing bad characters.
-
-  Two kinds of bad characters:
-
-  1. Unicode replacement characters: These indicate that either the file
-  contained invalid UTF-8 (likely) or Unicode replacement characters (which
-  it shouldn't).  Note that it's possible for this to throw off line
-  numbering if the invalid UTF-8 occurred adjacent to a newline.
-
-  2. NUL bytes.  These are problematic for some tools.
-
-  Args:
-    filename: The name of the current file.
-    lines: An array of strings, each representing a line of the file.
-    error: The function to call with any errors found.
-  """
-  for linenum, line in enumerate(lines):
-    if u'\ufffd' in line:
-      error(filename, linenum, 'readability/utf8', 5,
-            'Line contains invalid UTF-8 (or Unicode replacement character).')
-    if '\0' in line:
-      error(filename, linenum, 'readability/nul', 5, 'Line contains NUL byte.')
-
-
-def CheckForNewlineAtEOF(filename, lines, error):
-  """Logs an error if there is no newline char at the end of the file.
-
-  Args:
-    filename: The name of the current file.
-    lines: An array of strings, each representing a line of the file.
-    error: The function to call with any errors found.
-  """
-
-  # The array lines() was created by adding two newlines to the
-  # original file (go figure), then splitting on \n.
-  # To verify that the file ends in \n, we just have to make sure the
-  # last-but-two element of lines() exists and is empty.
-  if len(lines) < 3 or lines[-2]:
-    error(filename, len(lines) - 2, 'whitespace/ending_newline', 5,
-          'Could not find a newline character at the end of the file.')
-
-
-def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error):
-  """Logs an error if we see /* ... */ or "..." that extend past one line.
-
-  /* ... */ comments are legit inside macros, for one line.
-  Otherwise, we prefer // comments, so it's ok to warn about the
-  other.  Likewise, it's ok for strings to extend across multiple
-  lines, as long as a line continuation character (backslash)
-  terminates each line. Although not currently prohibited by the C++
-  style guide, it's ugly and unnecessary. We don't do well with either
-  in this lint program, so we warn about both.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]
-
-  # Remove all \\ (escaped backslashes) from the line. They are OK, and the
-  # second (escaped) slash may trigger later \" detection erroneously.
-  line = line.replace('\\\\', '')
-
-  if line.count('/*') > line.count('*/'):
-    error(filename, linenum, 'readability/multiline_comment', 5,
-          'Complex multi-line /*...*/-style comment found. '
-          'Lint may give bogus warnings.  '
-          'Consider replacing these with //-style comments, '
-          'with #if 0...#endif, '
-          'or with more clearly structured multi-line comments.')
-
-  if (line.count('"') - line.count('\\"')) % 2:
-    error(filename, linenum, 'readability/multiline_string', 5,
-          'Multi-line string ("...") found.  This lint script doesn\'t '
-          'do well with such strings, and may give bogus warnings.  '
-          'Use C++11 raw strings or concatenation instead.')
-
-
-threading_list = (
-    ('asctime(', 'asctime_r('),
-    ('ctime(', 'ctime_r('),
-    ('getgrgid(', 'getgrgid_r('),
-    ('getgrnam(', 'getgrnam_r('),
-    ('getlogin(', 'getlogin_r('),
-    ('getpwnam(', 'getpwnam_r('),
-    ('getpwuid(', 'getpwuid_r('),
-    ('gmtime(', 'gmtime_r('),
-    ('localtime(', 'localtime_r('),
-    ('rand(', 'rand_r('),
-    ('strtok(', 'strtok_r('),
-    ('ttyname(', 'ttyname_r('),
-    )
-
-
-def CheckPosixThreading(filename, clean_lines, linenum, error):
-  """Checks for calls to thread-unsafe functions.
-
-  Much code has been originally written without consideration of
-  multi-threading. Also, engineers are relying on their old experience;
-  they have learned posix before threading extensions were added. These
-  tests guide the engineers to use thread-safe functions (when using
-  posix directly).
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]
-  for single_thread_function, multithread_safe_function in threading_list:
-    ix = line.find(single_thread_function)
-    # Comparisons made explicit for clarity -- pylint: disable=g-explicit-bool-comparison
-    if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and
-                                line[ix - 1] not in ('_', '.', '>'))):
-      error(filename, linenum, 'runtime/threadsafe_fn', 2,
-            'Consider using ' + multithread_safe_function +
-            '...) instead of ' + single_thread_function +
-            '...) for improved thread safety.')
-
-
-def CheckVlogArguments(filename, clean_lines, linenum, error):
-  """Checks that VLOG() is only used for defining a logging level.
-
-  For example, VLOG(2) is correct. VLOG(INFO), VLOG(WARNING), VLOG(ERROR), and
-  VLOG(FATAL) are not.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]
-  if Search(r'\bVLOG\((INFO|ERROR|WARNING|DFATAL|FATAL)\)', line):
-    error(filename, linenum, 'runtime/vlog', 5,
-          'VLOG() should be used with numeric verbosity level.  '
-          'Use LOG() if you want symbolic severity levels.')
-
-
-# Matches invalid increment: *count++, which moves pointer instead of
-# incrementing a value.
-_RE_PATTERN_INVALID_INCREMENT = re.compile(
-    r'^\s*\*\w+(\+\+|--);')
-
-
-def CheckInvalidIncrement(filename, clean_lines, linenum, error):
-  """Checks for invalid increment *count++.
-
-  For example following function:
-  void increment_counter(int* count) {
-    *count++;
-  }
-  is invalid, because it effectively does count++, moving pointer, and should
-  be replaced with ++*count, (*count)++ or *count += 1.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]
-  if _RE_PATTERN_INVALID_INCREMENT.match(line):
-    error(filename, linenum, 'runtime/invalid_increment', 5,
-          'Changing pointer instead of value (or unused value of operator*).')
-
-
-class _BlockInfo(object):
-  """Stores information about a generic block of code."""
-
-  def __init__(self, seen_open_brace):
-    self.seen_open_brace = seen_open_brace
-    self.open_parentheses = 0
-    self.inline_asm = _NO_ASM
-
-  def CheckBegin(self, filename, clean_lines, linenum, error):
-    """Run checks that applies to text up to the opening brace.
-
-    This is mostly for checking the text after the class identifier
-    and the "{", usually where the base class is specified.  For other
-    blocks, there isn't much to check, so we always pass.
-
-    Args:
-      filename: The name of the current file.
-      clean_lines: A CleansedLines instance containing the file.
-      linenum: The number of the line to check.
-      error: The function to call with any errors found.
-    """
-    pass
-
-  def CheckEnd(self, filename, clean_lines, linenum, error):
-    """Run checks that applies to text after the closing brace.
-
-    This is mostly used for checking end of namespace comments.
-
-    Args:
-      filename: The name of the current file.
-      clean_lines: A CleansedLines instance containing the file.
-      linenum: The number of the line to check.
-      error: The function to call with any errors found.
-    """
-    pass
-
-
-class _ClassInfo(_BlockInfo):
-  """Stores information about a class."""
-
-  def __init__(self, name, class_or_struct, clean_lines, linenum):
-    _BlockInfo.__init__(self, False)
-    self.name = name
-    self.starting_linenum = linenum
-    self.is_derived = False
-    if class_or_struct == 'struct':
-      self.access = 'public'
-      self.is_struct = True
-    else:
-      self.access = 'private'
-      self.is_struct = False
-
-    # Remember initial indentation level for this class.  Using raw_lines here
-    # instead of elided to account for leading comments.
-    initial_indent = Match(r'^( *)\S', clean_lines.raw_lines[linenum])
-    if initial_indent:
-      self.class_indent = len(initial_indent.group(1))
-    else:
-      self.class_indent = 0
-
-    # Try to find the end of the class.  This will be confused by things like:
-    #   class A {
-    #   } *x = { ...
-    #
-    # But it's still good enough for CheckSectionSpacing.
-    self.last_line = 0
-    depth = 0
-    for i in range(linenum, clean_lines.NumLines()):
-      line = clean_lines.elided[i]
-      depth += line.count('{') - line.count('}')
-      if not depth:
-        self.last_line = i
-        break
-
-  def CheckBegin(self, filename, clean_lines, linenum, error):
-    # Look for a bare ':'
-    if Search('(^|[^:]):($|[^:])', clean_lines.elided[linenum]):
-      self.is_derived = True
-
-  def CheckEnd(self, filename, clean_lines, linenum, error):
-    # Check that closing brace is aligned with beginning of the class.
-    # Only do this if the closing brace is indented by only whitespaces.
-    # This means we will not check single-line class definitions.
-    indent = Match(r'^( *)\}', clean_lines.elided[linenum])
-    if indent and len(indent.group(1)) != self.class_indent:
-      if self.is_struct:
-        parent = 'struct ' + self.name
-      else:
-        parent = 'class ' + self.name
-      error(filename, linenum, 'whitespace/indent', 3,
-            'Closing brace should be aligned with beginning of %s' % parent)
-
-
-class _NamespaceInfo(_BlockInfo):
-  """Stores information about a namespace."""
-
-  def __init__(self, name, linenum):
-    _BlockInfo.__init__(self, False)
-    self.name = name or ''
-    self.starting_linenum = linenum
-
-  def CheckEnd(self, filename, clean_lines, linenum, error):
-    """Check end of namespace comments."""
-    line = clean_lines.raw_lines[linenum]
-
-    # Check how many lines is enclosed in this namespace.  Don't issue
-    # warning for missing namespace comments if there aren't enough
-    # lines.  However, do apply checks if there is already an end of
-    # namespace comment and it's incorrect.
-    #
-    # TODO(unknown): We always want to check end of namespace comments
-    # if a namespace is large, but sometimes we also want to apply the
-    # check if a short namespace contained nontrivial things (something
-    # other than forward declarations).  There is currently no logic on
-    # deciding what these nontrivial things are, so this check is
-    # triggered by namespace size only, which works most of the time.
-    if (linenum - self.starting_linenum < 10
-        and not Match(r'};*\s*(//|/\*).*\bnamespace\b', line)):
-      return
-
-    # Look for matching comment at end of namespace.
-    #
-    # Note that we accept C style "/* */" comments for terminating
-    # namespaces, so that code that terminate namespaces inside
-    # preprocessor macros can be cpplint clean.
-    #
-    # We also accept stuff like "// end of namespace <name>." with the
-    # period at the end.
-    #
-    # Besides these, we don't accept anything else, otherwise we might
-    # get false negatives when existing comment is a substring of the
-    # expected namespace.
-    if self.name:
-      # Named namespace
-      if not Match((r'};*\s*(//|/\*).*\bnamespace\s+' + re.escape(self.name) +
-                    r'[\*/\.\\\s]*$'),
-                   line):
-        error(filename, linenum, 'readability/namespace', 5,
-              'Namespace should be terminated with "// namespace %s"' %
-              self.name)
-    else:
-      # Anonymous namespace
-      if not Match(r'};*\s*(//|/\*).*\bnamespace[\*/\.\\\s]*$', line):
-        error(filename, linenum, 'readability/namespace', 5,
-              'Namespace should be terminated with "// namespace"')
-
-
-class _PreprocessorInfo(object):
-  """Stores checkpoints of nesting stacks when #if/#else is seen."""
-
-  def __init__(self, stack_before_if):
-    # The entire nesting stack before #if
-    self.stack_before_if = stack_before_if
-
-    # The entire nesting stack up to #else
-    self.stack_before_else = []
-
-    # Whether we have already seen #else or #elif
-    self.seen_else = False
-
-
-class _NestingState(object):
-  """Holds states related to parsing braces."""
-
-  def __init__(self):
-    # Stack for tracking all braces.  An object is pushed whenever we
-    # see a "{", and popped when we see a "}".  Only 3 types of
-    # objects are possible:
-    # - _ClassInfo: a class or struct.
-    # - _NamespaceInfo: a namespace.
-    # - _BlockInfo: some other type of block.
-    self.stack = []
-
-    # Stack of _PreprocessorInfo objects.
-    self.pp_stack = []
-
-  def SeenOpenBrace(self):
-    """Check if we have seen the opening brace for the innermost block.
-
-    Returns:
-      True if we have seen the opening brace, False if the innermost
-      block is still expecting an opening brace.
-    """
-    return (not self.stack) or self.stack[-1].seen_open_brace
-
-  def InNamespaceBody(self):
-    """Check if we are currently one level inside a namespace body.
-
-    Returns:
-      True if top of the stack is a namespace block, False otherwise.
-    """
-    return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
-
-  def UpdatePreprocessor(self, line):
-    """Update preprocessor stack.
-
-    We need to handle preprocessors due to classes like this:
-      #ifdef SWIG
-      struct ResultDetailsPageElementExtensionPoint {
-      #else
-      struct ResultDetailsPageElementExtensionPoint : public Extension {
-      #endif
-
-    We make the following assumptions (good enough for most files):
-    - Preprocessor condition evaluates to true from #if up to first
-      #else/#elif/#endif.
-
-    - Preprocessor condition evaluates to false from #else/#elif up
-      to #endif.  We still perform lint checks on these lines, but
-      these do not affect nesting stack.
-
-    Args:
-      line: current line to check.
-    """
-    if Match(r'^\s*#\s*(if|ifdef|ifndef)\b', line):
-      # Beginning of #if block, save the nesting stack here.  The saved
-      # stack will allow us to restore the parsing state in the #else case.
-      self.pp_stack.append(_PreprocessorInfo(copy.deepcopy(self.stack)))
-    elif Match(r'^\s*#\s*(else|elif)\b', line):
-      # Beginning of #else block
-      if self.pp_stack:
-        if not self.pp_stack[-1].seen_else:
-          # This is the first #else or #elif block.  Remember the
-          # whole nesting stack up to this point.  This is what we
-          # keep after the #endif.
-          self.pp_stack[-1].seen_else = True
-          self.pp_stack[-1].stack_before_else = copy.deepcopy(self.stack)
-
-        # Restore the stack to how it was before the #if
-        self.stack = copy.deepcopy(self.pp_stack[-1].stack_before_if)
-      else:
-        # TODO(unknown): unexpected #else, issue warning?
-        pass
-    elif Match(r'^\s*#\s*endif\b', line):
-      # End of #if or #else blocks.
-      if self.pp_stack:
-        # If we saw an #else, we will need to restore the nesting
-        # stack to its former state before the #else, otherwise we
-        # will just continue from where we left off.
-        if self.pp_stack[-1].seen_else:
-          # Here we can just use a shallow copy since we are the last
-          # reference to it.
-          self.stack = self.pp_stack[-1].stack_before_else
-        # Drop the corresponding #if
-        self.pp_stack.pop()
-      else:
-        # TODO(unknown): unexpected #endif, issue warning?
-        pass
-
-  def Update(self, filename, clean_lines, linenum, error):
-    """Update nesting state with current line.
-
-    Args:
-      filename: The name of the current file.
-      clean_lines: A CleansedLines instance containing the file.
-      linenum: The number of the line to check.
-      error: The function to call with any errors found.
-    """
-    line = clean_lines.elided[linenum]
-
-    # Update pp_stack first
-    self.UpdatePreprocessor(line)
-
-    # Count parentheses.  This is to avoid adding struct arguments to
-    # the nesting stack.
-    if self.stack:
-      inner_block = self.stack[-1]
-      depth_change = line.count('(') - line.count(')')
-      inner_block.open_parentheses += depth_change
-
-      # Also check if we are starting or ending an inline assembly block.
-      if inner_block.inline_asm in (_NO_ASM, _END_ASM):
-        if (depth_change != 0 and
-            inner_block.open_parentheses == 1 and
-            _MATCH_ASM.match(line)):
-          # Enter assembly block
-          inner_block.inline_asm = _INSIDE_ASM
-        else:
-          # Not entering assembly block.  If previous line was _END_ASM,
-          # we will now shift to _NO_ASM state.
-          inner_block.inline_asm = _NO_ASM
-      elif (inner_block.inline_asm == _INSIDE_ASM and
-            inner_block.open_parentheses == 0):
-        # Exit assembly block
-        inner_block.inline_asm = _END_ASM
-
-    # Consume namespace declaration at the beginning of the line.  Do
-    # this in a loop so that we catch same line declarations like this:
-    #   namespace proto2 { namespace bridge { class MessageSet; } }
-    while True:
-      # Match start of namespace.  The "\b\s*" below catches namespace
-      # declarations even if it weren't followed by a whitespace, this
-      # is so that we don't confuse our namespace checker.  The
-      # missing spaces will be flagged by CheckSpacing.
-      namespace_decl_match = Match(r'^\s*namespace\b\s*([:\w]+)?(.*)$', line)
-      if not namespace_decl_match:
-        break
-
-      new_namespace = _NamespaceInfo(namespace_decl_match.group(1), linenum)
-      self.stack.append(new_namespace)
-
-      line = namespace_decl_match.group(2)
-      if line.find('{') != -1:
-        new_namespace.seen_open_brace = True
-        line = line[line.find('{') + 1:]
-
-    # Look for a class declaration in whatever is left of the line
-    # after parsing namespaces.  The regexp accounts for decorated classes
-    # such as in:
-    #   class LOCKABLE API Object {
-    #   };
-    #
-    # Templates with class arguments may confuse the parser, for example:
-    #   template <class T
-    #             class Comparator = less<T>,
-    #             class Vector = vector<T> >
-    #   class HeapQueue {
-    #
-    # Because this parser has no nesting state about templates, by the
-    # time it saw "class Comparator", it may think that it's a new class.
-    # Nested templates have a similar problem:
-    #   template <
-    #       typename ExportedType,
-    #       typename TupleType,
-    #       template <typename, typename> class ImplTemplate>
-    #
-    # To avoid these cases, we ignore classes that are followed by '=' or '>'
-    class_decl_match = Match(
-        r'\s*(template\s*<[\w\s<>,:]*>\s*)?'
-        r'(class|struct)\s+([A-Z_]+\s+)*(\w+(?:::\w+)*)'
-        r'(([^=>]|<[^<>]*>|<[^<>]*<[^<>]*>\s*>)*)$', line)
-    if (class_decl_match and
-        (not self.stack or self.stack[-1].open_parentheses == 0)):
-      self.stack.append(_ClassInfo(
-          class_decl_match.group(4), class_decl_match.group(2),
-          clean_lines, linenum))
-      line = class_decl_match.group(5)
-
-    # If we have not yet seen the opening brace for the innermost block,
-    # run checks here.
-    if not self.SeenOpenBrace():
-      self.stack[-1].CheckBegin(filename, clean_lines, linenum, error)
-
-    # Update access control if we are inside a class/struct
-    if self.stack and isinstance(self.stack[-1], _ClassInfo):
-      classinfo = self.stack[-1]
-      access_match = Match(
-          r'^(.*)\b(public|private|protected|signals)(\s+(?:slots\s*)?)?'
-          r':(?:[^:]|$)',
-          line)
-      if access_match:
-        classinfo.access = access_match.group(2)
-
-        # Check that access keywords are indented +1 space.  Skip this
-        # check if the keywords are not preceded by whitespaces.
-        indent = access_match.group(1)
-        if (len(indent) != classinfo.class_indent + 1 and
-            Match(r'^\s*$', indent)):
-          if classinfo.is_struct:
-            parent = 'struct ' + classinfo.name
-          else:
-            parent = 'class ' + classinfo.name
-          slots = ''
-          if access_match.group(3):
-            slots = access_match.group(3)
-          error(filename, linenum, 'whitespace/indent', 3,
-                '%s%s: should be indented +1 space inside %s' % (
-                    access_match.group(2), slots, parent))
-
-    # Consume braces or semicolons from what's left of the line
-    while True:
-      # Match first brace, semicolon, or closed parenthesis.
-      matched = Match(r'^[^{;)}]*([{;)}])(.*)$', line)
-      if not matched:
-        break
-
-      token = matched.group(1)
-      if token == '{':
-        # If namespace or class hasn't seen a opening brace yet, mark
-        # namespace/class head as complete.  Push a new block onto the
-        # stack otherwise.
-        if not self.SeenOpenBrace():
-          self.stack[-1].seen_open_brace = True
-        else:
-          self.stack.append(_BlockInfo(True))
-          if _MATCH_ASM.match(line):
-            self.stack[-1].inline_asm = _BLOCK_ASM
-      elif token == ';' or token == ')':
-        # If we haven't seen an opening brace yet, but we already saw
-        # a semicolon, this is probably a forward declaration.  Pop
-        # the stack for these.
-        #
-        # Similarly, if we haven't seen an opening brace yet, but we
-        # already saw a closing parenthesis, then these are probably
-        # function arguments with extra "class" or "struct" keywords.
-        # Also pop these stack for these.
-        if not self.SeenOpenBrace():
-          self.stack.pop()
-      else:  # token == '}'
-        # Perform end of block checks and pop the stack.
-        if self.stack:
-          self.stack[-1].CheckEnd(filename, clean_lines, linenum, error)
-          self.stack.pop()
-      line = matched.group(2)
-
-  def InnermostClass(self):
-    """Get class info on the top of the stack.
-
-    Returns:
-      A _ClassInfo object if we are inside a class, or None otherwise.
-    """
-    for i in range(len(self.stack), 0, -1):
-      classinfo = self.stack[i - 1]
-      if isinstance(classinfo, _ClassInfo):
-        return classinfo
-    return None
-
-  def CheckCompletedBlocks(self, filename, error):
-    """Checks that all classes and namespaces have been completely parsed.
-
-    Call this when all lines in a file have been processed.
-    Args:
-      filename: The name of the current file.
-      error: The function to call with any errors found.
-    """
-    # Note: This test can result in false positives if #ifdef constructs
-    # get in the way of brace matching. See the testBuildClass test in
-    # cpplint_unittest.py for an example of this.
-    for obj in self.stack:
-      if isinstance(obj, _ClassInfo):
-        error(filename, obj.starting_linenum, 'build/class', 5,
-              'Failed to find complete declaration of class %s' %
-              obj.name)
-      elif isinstance(obj, _NamespaceInfo):
-        error(filename, obj.starting_linenum, 'build/namespaces', 5,
-              'Failed to find complete declaration of namespace %s' %
-              obj.name)
-
-
-def CheckForNonStandardConstructs(filename, clean_lines, linenum,
-                                  nesting_state, error):
-  r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
-
-  Complain about several constructs which gcc-2 accepts, but which are
-  not standard C++.  Warning about these in lint is one way to ease the
-  transition to new compilers.
-  - put storage class first (e.g. "static const" instead of "const static").
-  - "%lld" instead of %qd" in printf-type functions.
-  - "%1$d" is non-standard in printf-type functions.
-  - "\%" is an undefined character escape sequence.
-  - text after #endif is not allowed.
-  - invalid inner-style forward declaration.
-  - >? and <? operators, and their >?= and <?= cousins.
-
-  Additionally, check for constructor/destructor style violations and reference
-  members, as it is very convenient to do so while checking for
-  gcc-2 compliance.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: A callable to which errors are reported, which takes 4 arguments:
-           filename, line number, error level, and message
-  """
-
-  # Remove comments from the line, but leave in strings for now.
-  line = clean_lines.lines[linenum]
-
-  if Search(r'printf\s*\(.*".*%[-+ ]?\d*q', line):
-    error(filename, linenum, 'runtime/printf_format', 3,
-          '%q in format strings is deprecated.  Use %ll instead.')
-
-  if Search(r'printf\s*\(.*".*%\d+\$', line):
-    error(filename, linenum, 'runtime/printf_format', 2,
-          '%N$ formats are unconventional.  Try rewriting to avoid them.')
-
-  # Remove escaped backslashes before looking for undefined escapes.
-  line = line.replace('\\\\', '')
-
-  if Search(r'("|\').*\\(%|\[|\(|{)', line):
-    error(filename, linenum, 'build/printf_format', 3,
-          '%, [, (, and { are undefined character escapes.  Unescape them.')
-
-  # For the rest, work with both comments and strings removed.
-  line = clean_lines.elided[linenum]
-
-  if Search(r'\b(const|volatile|void|char|short|int|long'
-            r'|float|double|signed|unsigned'
-            r'|schar|u?int8|u?int16|u?int32|u?int64)'
-            r'\s+(register|static|extern|typedef)\b',
-            line):
-    error(filename, linenum, 'build/storage_class', 5,
-          'Storage class (static, extern, typedef, etc) should be first.')
-
-  if Match(r'\s*#\s*endif\s*[^/\s]+', line):
-    error(filename, linenum, 'build/endif_comment', 5,
-          'Uncommented text after #endif is non-standard.  Use a comment.')
-
-  if Match(r'\s*class\s+(\w+\s*::\s*)+\w+\s*;', line):
-    error(filename, linenum, 'build/forward_decl', 5,
-          'Inner-style forward declarations are invalid.  Remove this line.')
-
-  if Search(r'(\w+|[+-]?\d+(\.\d*)?)\s*(<|>)\?=?\s*(\w+|[+-]?\d+)(\.\d*)?',
-            line):
-    error(filename, linenum, 'build/deprecated', 3,
-          '>? and <? (max and min) operators are non-standard and deprecated.')
-
-  if Search(r'^\s*const\s*string\s*&\s*\w+\s*;', line):
-    # TODO(unknown): Could it be expanded safely to arbitrary references,
-    # without triggering too many false positives? The first
-    # attempt triggered 5 warnings for mostly benign code in the regtest, hence
-    # the restriction.
-    # Here's the original regexp, for the reference:
-    # type_name = r'\w+((\s*::\s*\w+)|(\s*<\s*\w+?\s*>))?'
-    # r'\s*const\s*' + type_name + '\s*&\s*\w+\s*;'
-    error(filename, linenum, 'runtime/member_string_references', 2,
-          'const string& members are dangerous. It is much better to use '
-          'alternatives, such as pointers or simple constants.')
-
-  # Everything else in this function operates on class declarations.
-  # Return early if the top of the nesting stack is not a class, or if
-  # the class head is not completed yet.
-  classinfo = nesting_state.InnermostClass()
-  if not classinfo or not classinfo.seen_open_brace:
-    return
-
-  # The class may have been declared with namespace or classname qualifiers.
-  # The constructor and destructor will not have those qualifiers.
-  base_classname = classinfo.name.split('::')[-1]
-
-  # Look for single-argument constructors that aren't marked explicit.
-  # Technically a valid construct, but against style.
-  args = Match(r'\s+(?:inline\s+)?%s\s*\(([^,()]+)\)'
-               % re.escape(base_classname),
-               line)
-  if (args and
-      args.group(1) != 'void' and
-      not Match(r'(const\s+)?%s(\s+const)?\s*(?:<\w+>\s*)?&'
-                % re.escape(base_classname), args.group(1).strip())):
-    error(filename, linenum, 'runtime/explicit', 5,
-          'Single-argument constructors should be marked explicit.')
-
-
-def CheckSpacingForFunctionCall(filename, line, linenum, error):
-  """Checks for the correctness of various spacing around function calls.
-
-  Args:
-    filename: The name of the current file.
-    line: The text of the line to check.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-
-  # Since function calls often occur inside if/for/while/switch
-  # expressions - which have their own, more liberal conventions - we
-  # first see if we should be looking inside such an expression for a
-  # function call, to which we can apply more strict standards.
-  fncall = line    # if there's no control flow construct, look at whole line
-  for pattern in (r'\bif\s*\((.*)\)\s*{',
-                  r'\bfor\s*\((.*)\)\s*{',
-                  r'\bwhile\s*\((.*)\)\s*[{;]',
-                  r'\bswitch\s*\((.*)\)\s*{'):
-    match = Search(pattern, line)
-    if match:
-      fncall = match.group(1)    # look inside the parens for function calls
-      break
-
-  # Except in if/for/while/switch, there should never be space
-  # immediately inside parens (eg "f( 3, 4 )").  We make an exception
-  # for nested parens ( (a+b) + c ).  Likewise, there should never be
-  # a space before a ( when it's a function argument.  I assume it's a
-  # function argument when the char before the whitespace is legal in
-  # a function name (alnum + _) and we're not starting a macro. Also ignore
-  # pointers and references to arrays and functions coz they're too tricky:
-  # we use a very simple way to recognize these:
-  # " (something)(maybe-something)" or
-  # " (something)(maybe-something," or
-  # " (something)[something]"
-  # Note that we assume the contents of [] to be short enough that
-  # they'll never need to wrap.
-  if (  # Ignore control structures.
-      not Search(r'\b(if|for|while|switch|return|new|delete|catch|sizeof)\b',
-                 fncall) and
-      # Ignore pointers/references to functions.
-      not Search(r' \([^)]+\)\([^)]*(\)|,$)', fncall) and
-      # Ignore pointers/references to arrays.
-      not Search(r' \([^)]+\)\[[^\]]+\]', fncall)):
-    if Search(r'\w\s*\(\s(?!\s*\\$)', fncall):      # a ( used for a fn call
-      error(filename, linenum, 'whitespace/parens', 4,
-            'Extra space after ( in function call')
-    elif Search(r'\(\s+(?!(\s*\\)|\()', fncall):
-      error(filename, linenum, 'whitespace/parens', 2,
-            'Extra space after (')
-    if (Search(r'\w\s+\(', fncall) and
-        not Search(r'#\s*define|typedef', fncall) and
-        not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall)):
-      error(filename, linenum, 'whitespace/parens', 4,
-            'Extra space before ( in function call')
-    # If the ) is followed only by a newline or a { + newline, assume it's
-    # part of a control statement (if/while/etc), and don't complain
-    if Search(r'[^)]\s+\)\s*[^{\s]', fncall):
-      # If the closing parenthesis is preceded by only whitespaces,
-      # try to give a more descriptive error message.
-      if Search(r'^\s+\)', fncall):
-        error(filename, linenum, 'whitespace/parens', 2,
-              'Closing ) should be moved to the previous line')
-      else:
-        error(filename, linenum, 'whitespace/parens', 2,
-              'Extra space before )')
-
-
-def IsBlankLine(line):
-  """Returns true if the given line is blank.
-
-  We consider a line to be blank if the line is empty or consists of
-  only white spaces.
-
-  Args:
-    line: A line of a string.
-
-  Returns:
-    True, if the given line is blank.
-  """
-  return not line or line.isspace()
-
-
-def CheckForFunctionLengths(filename, clean_lines, linenum,
-                            function_state, error):
-  """Reports for long function bodies.
-
-  For an overview why this is done, see:
-  http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Write_Short_Functions
-
-  Uses a simplistic algorithm assuming other style guidelines
-  (especially spacing) are followed.
-  Only checks unindented functions, so class members are unchecked.
-  Trivial bodies are unchecked, so constructors with huge initializer lists
-  may be missed.
-  Blank/comment lines are not counted so as to avoid encouraging the removal
-  of vertical space and comments just to get through a lint check.
-  NOLINT *on the last line of a function* disables this check.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    function_state: Current function name and lines in body so far.
-    error: The function to call with any errors found.
-  """
-  lines = clean_lines.lines
-  line = lines[linenum]
-  raw = clean_lines.raw_lines
-  raw_line = raw[linenum]
-  joined_line = ''
-
-  starting_func = False
-  regexp = r'(\w(\w|::|\*|\&|\s)*)\('  # decls * & space::name( ...
-  match_result = Match(regexp, line)
-  if match_result:
-    # If the name is all caps and underscores, figure it's a macro and
-    # ignore it, unless it's TEST or TEST_F.
-    function_name = match_result.group(1).split()[-1]
-    if function_name == 'TEST' or function_name == 'TEST_F' or (
-        not Match(r'[A-Z_]+$', function_name)):
-      starting_func = True
-
-  if starting_func:
-    body_found = False
-    for start_linenum in xrange(linenum, clean_lines.NumLines()):
-      start_line = lines[start_linenum]
-      joined_line += ' ' + start_line.lstrip()
-      if Search(r'(;|})', start_line):  # Declarations and trivial functions
-        body_found = True
-        break                              # ... ignore
-      elif Search(r'{', start_line):
-        body_found = True
-        function = Search(r'((\w|:)*)\(', line).group(1)
-        if Match(r'TEST', function):    # Handle TEST... macros
-          parameter_regexp = Search(r'(\(.*\))', joined_line)
-          if parameter_regexp:             # Ignore bad syntax
-            function += parameter_regexp.group(1)
-        else:
-          function += '()'
-        function_state.Begin(function)
-        break
-    if not body_found:
-      # No body for the function (or evidence of a non-function) was found.
-      error(filename, linenum, 'readability/fn_size', 5,
-            'Lint failed to find start of function body.')
-  elif Match(r'^\}\s*$', line):  # function end
-    function_state.Check(error, filename, linenum)
-    function_state.End()
-  elif not Match(r'^\s*$', line):
-    function_state.Count()  # Count non-blank/non-comment lines.
-
-
-_RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?')
-
-
-def CheckComment(comment, filename, linenum, error):
-  """Checks for common mistakes in TODO comments.
-
-  Args:
-    comment: The text of the comment from the line in question.
-    filename: The name of the current file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  match = _RE_PATTERN_TODO.match(comment)
-  if match:
-    # One whitespace is correct; zero whitespace is handled elsewhere.
-    leading_whitespace = match.group(1)
-    if len(leading_whitespace) > 1:
-      error(filename, linenum, 'whitespace/todo', 2,
-            'Too many spaces before TODO')
-
-    username = match.group(2)
-    if not username:
-      error(filename, linenum, 'readability/todo', 2,
-            'Missing username in TODO; it should look like '
-            '"// TODO(my_username): Stuff."')
-
-    middle_whitespace = match.group(3)
-    # Comparisons made explicit for correctness -- pylint: disable=g-explicit-bool-comparison
-    if middle_whitespace != ' ' and middle_whitespace != '':
-      error(filename, linenum, 'whitespace/todo', 2,
-            'TODO(my_username) should be followed by a space')
-
-def CheckAccess(filename, clean_lines, linenum, nesting_state, error):
-  """Checks for improper use of DISALLOW* macros.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]  # get rid of comments and strings
-
-  matched = Match((r'\s*(DISALLOW_COPY_AND_ASSIGN|'
-                   r'DISALLOW_EVIL_CONSTRUCTORS|'
-                   r'DISALLOW_IMPLICIT_CONSTRUCTORS)'), line)
-  if not matched:
-    return
-  if nesting_state.stack and isinstance(nesting_state.stack[-1], _ClassInfo):
-    if nesting_state.stack[-1].access != 'private':
-      error(filename, linenum, 'readability/constructors', 3,
-            '%s must be in the private: section' % matched.group(1))
-
-  else:
-    # Found DISALLOW* macro outside a class declaration, or perhaps it
-    # was used inside a function when it should have been part of the
-    # class declaration.  We could issue a warning here, but it
-    # probably resulted in a compiler error already.
-    pass
-
-
-def FindNextMatchingAngleBracket(clean_lines, linenum, init_suffix):
-  """Find the corresponding > to close a template.
-
-  Args:
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: Current line number.
-    init_suffix: Remainder of the current line after the initial <.
-
-  Returns:
-    True if a matching bracket exists.
-  """
-  line = init_suffix
-  nesting_stack = ['<']
-  while True:
-    # Find the next operator that can tell us whether < is used as an
-    # opening bracket or as a less-than operator.  We only want to
-    # warn on the latter case.
-    #
-    # We could also check all other operators and terminate the search
-    # early, e.g. if we got something like this "a<b+c", the "<" is
-    # most likely a less-than operator, but then we will get false
-    # positives for default arguments and other template expressions.
-    match = Search(r'^[^<>(),;\[\]]*([<>(),;\[\]])(.*)$', line)
-    if match:
-      # Found an operator, update nesting stack
-      operator = match.group(1)
-      line = match.group(2)
-
-      if nesting_stack[-1] == '<':
-        # Expecting closing angle bracket
-        if operator in ('<', '(', '['):
-          nesting_stack.append(operator)
-        elif operator == '>':
-          nesting_stack.pop()
-          if not nesting_stack:
-            # Found matching angle bracket
-            return True
-        elif operator == ',':
-          # Got a comma after a bracket, this is most likely a template
-          # argument.  We have not seen a closing angle bracket yet, but
-          # it's probably a few lines later if we look for it, so just
-          # return early here.
-          return True
-        else:
-          # Got some other operator.
-          return False
-
-      else:
-        # Expecting closing parenthesis or closing bracket
-        if operator in ('<', '(', '['):
-          nesting_stack.append(operator)
-        elif operator in (')', ']'):
-          # We don't bother checking for matching () or [].  If we got
-          # something like (] or [), it would have been a syntax error.
-          nesting_stack.pop()
-
-    else:
-      # Scan the next line
-      linenum += 1
-      if linenum >= len(clean_lines.elided):
-        break
-      line = clean_lines.elided[linenum]
-
-  # Exhausted all remaining lines and still no matching angle bracket.
-  # Most likely the input was incomplete, otherwise we should have
-  # seen a semicolon and returned early.
-  return True
-
-
-def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix):
-  """Find the corresponding < that started a template.
-
-  Args:
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: Current line number.
-    init_prefix: Part of the current line before the initial >.
-
-  Returns:
-    True if a matching bracket exists.
-  """
-  line = init_prefix
-  nesting_stack = ['>']
-  while True:
-    # Find the previous operator
-    match = Search(r'^(.*)([<>(),;\[\]])[^<>(),;\[\]]*$', line)
-    if match:
-      # Found an operator, update nesting stack
-      operator = match.group(2)
-      line = match.group(1)
-
-      if nesting_stack[-1] == '>':
-        # Expecting opening angle bracket
-        if operator in ('>', ')', ']'):
-          nesting_stack.append(operator)
-        elif operator == '<':
-          nesting_stack.pop()
-          if not nesting_stack:
-            # Found matching angle bracket
-            return True
-        elif operator == ',':
-          # Got a comma before a bracket, this is most likely a
-          # template argument.  The opening angle bracket is probably
-          # there if we look for it, so just return early here.
-          return True
-        else:
-          # Got some other operator.
-          return False
-
-      else:
-        # Expecting opening parenthesis or opening bracket
-        if operator in ('>', ')', ']'):
-          nesting_stack.append(operator)
-        elif operator in ('(', '['):
-          nesting_stack.pop()
-
-    else:
-      # Scan the previous line
-      linenum -= 1
-      if linenum < 0:
-        break
-      line = clean_lines.elided[linenum]
-
-  # Exhausted all earlier lines and still no matching angle bracket.
-  return False
-
-
-def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
-  """Checks for the correctness of various spacing issues in the code.
-
-  Things we check for: spaces around operators, spaces after
-  if/for/while/switch, no spaces around parens in function calls, two
-  spaces between code and comment, don't start a block with a blank
-  line, don't end a function with a blank line, don't add a blank line
-  after public/protected/private, don't have too many blank lines in a row.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: The function to call with any errors found.
-  """
-
-  # Don't use "elided" lines here, otherwise we can't check commented lines.
-  # Don't want to use "raw" either, because we don't want to check inside C++11
-  # raw strings,
-  raw = clean_lines.lines_without_raw_strings
-  line = raw[linenum]
-
-  # Before nixing comments, check if the line is blank for no good
-  # reason.  This includes the first line after a block is opened, and
-  # blank lines at the end of a function (ie, right before a line like '}'
-  #
-  # Skip all the blank line checks if we are immediately inside a
-  # namespace body.  In other words, don't issue blank line warnings
-  # for this block:
-  #   namespace {
-  #
-  #   }
-  #
-  # A warning about missing end of namespace comments will be issued instead.
-  if IsBlankLine(line) and not nesting_state.InNamespaceBody():
-    elided = clean_lines.elided
-    prev_line = elided[linenum - 1]
-    prevbrace = prev_line.rfind('{')
-    # TODO(unknown): Don't complain if line before blank line, and line after,
-    #                both start with alnums and are indented the same amount.
-    #                This ignores whitespace at the start of a namespace block
-    #                because those are not usually indented.
-    if prevbrace != -1 and prev_line[prevbrace:].find('}') == -1:
-      # OK, we have a blank line at the start of a code block.  Before we
-      # complain, we check if it is an exception to the rule: The previous
-      # non-empty line has the parameters of a function header that are indented
-      # 4 spaces (because they did not fit in a 80 column line when placed on
-      # the same line as the function name).  We also check for the case where
-      # the previous line is indented 6 spaces, which may happen when the
-      # initializers of a constructor do not fit into a 80 column line.
-      exception = False
-      if Match(r' {6}\w', prev_line):  # Initializer list?
-        # We are looking for the opening column of initializer list, which
-        # should be indented 4 spaces to cause 6 space indentation afterwards.
-        search_position = linenum-2
-        while (search_position >= 0
-               and Match(r' {6}\w', elided[search_position])):
-          search_position -= 1
-        exception = (search_position >= 0
-                     and elided[search_position][:5] == '    :')
-      else:
-        # Search for the function arguments or an initializer list.  We use a
-        # simple heuristic here: If the line is indented 4 spaces; and we have a
-        # closing paren, without the opening paren, followed by an opening brace
-        # or colon (for initializer lists) we assume that it is the last line of
-        # a function header.  If we have a colon indented 4 spaces, it is an
-        # initializer list.
-        exception = (Match(r' {4}\w[^\(]*\)\s*(const\s*)?(\{\s*$|:)',
-                           prev_line)
-                     or Match(r' {4}:', prev_line))
-
-      if not exception:
-        error(filename, linenum, 'whitespace/blank_line', 2,
-              'Redundant blank line at the start of a code block '
-              'should be deleted.')
-    # Ignore blank lines at the end of a block in a long if-else
-    # chain, like this:
-    #   if (condition1) {
-    #     // Something followed by a blank line
-    #
-    #   } else if (condition2) {
-    #     // Something else
-    #   }
-    if linenum + 1 < clean_lines.NumLines():
-      next_line = raw[linenum + 1]
-      if (next_line
-          and Match(r'\s*}', next_line)
-          and next_line.find('} else ') == -1):
-        error(filename, linenum, 'whitespace/blank_line', 3,
-              'Redundant blank line at the end of a code block '
-              'should be deleted.')
-
-    matched = Match(r'\s*(public|protected|private):', prev_line)
-    if matched:
-      error(filename, linenum, 'whitespace/blank_line', 3,
-            'Do not leave a blank line after "%s:"' % matched.group(1))
-
-  # Next, we complain if there's a comment too near the text
-  commentpos = line.find('//')
-  if commentpos != -1:
-    # Check if the // may be in quotes.  If so, ignore it
-    # Comparisons made explicit for clarity -- pylint: disable=g-explicit-bool-comparison
-    if (line.count('"', 0, commentpos) -
-        line.count('\\"', 0, commentpos)) % 2 == 0:   # not in quotes
-      # Allow one space for new scopes, two spaces otherwise:
-      if (not Match(r'^\s*{ //', line) and
-          ((commentpos >= 1 and
-            line[commentpos-1] not in string.whitespace) or
-           (commentpos >= 2 and
-            line[commentpos-2] not in string.whitespace))):
-        error(filename, linenum, 'whitespace/comments', 2,
-              'At least two spaces is best between code and comments')
-      # There should always be a space between the // and the comment
-      commentend = commentpos + 2
-      if commentend < len(line) and not line[commentend] == ' ':
-        # but some lines are exceptions -- e.g. if they're big
-        # comment delimiters like:
-        # //----------------------------------------------------------
-        # or are an empty C++ style Doxygen comment, like:
-        # ///
-        # or C++ style Doxygen comments placed after the variable:
-        # ///<  Header comment
-        # //!<  Header comment
-        # or they begin with multiple slashes followed by a space:
-        # //////// Header comment
-        match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or
-                 Search(r'^/$', line[commentend:]) or
-                 Search(r'^!< ', line[commentend:]) or
-                 Search(r'^/< ', line[commentend:]) or
-                 Search(r'^/+ ', line[commentend:]))
-        if not match:
-          error(filename, linenum, 'whitespace/comments', 4,
-                'Should have a space between // and comment')
-      CheckComment(line[commentpos:], filename, linenum, error)
-
-  line = clean_lines.elided[linenum]  # get rid of comments and strings
-
-  # Don't try to do spacing checks for operator methods
-  line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line)
-
-  # We allow no-spaces around = within an if: "if ( (a=Foo()) == 0 )".
-  # Otherwise not.  Note we only check for non-spaces on *both* sides;
-  # sometimes people put non-spaces on one side when aligning ='s among
-  # many lines (not that this is behavior that I approve of...)
-  if Search(r'[\w.]=[\w.]', line) and not Search(r'\b(if|while) ', line):
-    error(filename, linenum, 'whitespace/operators', 4,
-          'Missing spaces around =')
-
-  # It's ok not to have spaces around binary operators like + - * /, but if
-  # there's too little whitespace, we get concerned.  It's hard to tell,
-  # though, so we punt on this one for now.  TODO.
-
-  # You should always have whitespace around binary operators.
-  #
-  # Check <= and >= first to avoid false positives with < and >, then
-  # check non-include lines for spacing around < and >.
-  match = Search(r'[^<>=!\s](==|!=|<=|>=)[^<>=!\s]', line)
-  if match:
-    error(filename, linenum, 'whitespace/operators', 3,
-          'Missing spaces around %s' % match.group(1))
-  # We allow no-spaces around << when used like this: 10<<20, but
-  # not otherwise (particularly, not when used as streams)
-  # Also ignore using ns::operator<<;
-  match = Search(r'(operator|\S)(?:L|UL|ULL|l|ul|ull)?<<(\S)', line)
-  if (match and
-      not (match.group(1).isdigit() and match.group(2).isdigit()) and
-      not (match.group(1) == 'operator' and match.group(2) == ';')):
-    error(filename, linenum, 'whitespace/operators', 3,
-          'Missing spaces around <<')
-  elif not Match(r'#.*include', line):
-    # Avoid false positives on ->
-    reduced_line = line.replace('->', '')
-
-    # Look for < that is not surrounded by spaces.  This is only
-    # triggered if both sides are missing spaces, even though
-    # technically should should flag if at least one side is missing a
-    # space.  This is done to avoid some false positives with shifts.
-    match = Search(r'[^\s<]<([^\s=<].*)', reduced_line)
-    if (match and
-        not FindNextMatchingAngleBracket(clean_lines, linenum, match.group(1))):
-      error(filename, linenum, 'whitespace/operators', 3,
-            'Missing spaces around <')
-
-    # Look for > that is not surrounded by spaces.  Similar to the
-    # above, we only trigger if both sides are missing spaces to avoid
-    # false positives with shifts.
-    match = Search(r'^(.*[^\s>])>[^\s=>]', reduced_line)
-    if (match and
-        not FindPreviousMatchingAngleBracket(clean_lines, linenum,
-                                             match.group(1))):
-      error(filename, linenum, 'whitespace/operators', 3,
-            'Missing spaces around >')
-
-  # We allow no-spaces around >> for almost anything.  This is because
-  # C++11 allows ">>" to close nested templates, which accounts for
-  # most cases when ">>" is not followed by a space.
-  #
-  # We still warn on ">>" followed by alpha character, because that is
-  # likely due to ">>" being used for right shifts, e.g.:
-  #   value >> alpha
-  #
-  # When ">>" is used to close templates, the alphanumeric letter that
-  # follows would be part of an identifier, and there should still be
-  # a space separating the template type and the identifier.
-  #   type<type<type>> alpha
-  match = Search(r'>>[a-zA-Z_]', line)
-  if match:
-    error(filename, linenum, 'whitespace/operators', 3,
-          'Missing spaces around >>')
-
-  # There shouldn't be space around unary operators
-  match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
-  if match:
-    error(filename, linenum, 'whitespace/operators', 4,
-          'Extra space for operator %s' % match.group(1))
-
-  # A pet peeve of mine: no spaces after an if, while, switch, or for
-  match = Search(r' (if\(|for\(|while\(|switch\()', line)
-  if match:
-    error(filename, linenum, 'whitespace/parens', 5,
-          'Missing space before ( in %s' % match.group(1))
-
-  # For if/for/while/switch, the left and right parens should be
-  # consistent about how many spaces are inside the parens, and
-  # there should either be zero or one spaces inside the parens.
-  # We don't want: "if ( foo)" or "if ( foo   )".
-  # Exception: "for ( ; foo; bar)" and "for (foo; bar; )" are allowed.
-  match = Search(r'\b(if|for|while|switch)\s*'
-                 r'\(([ ]*)(.).*[^ ]+([ ]*)\)\s*{\s*$',
-                 line)
-  if match:
-    if len(match.group(2)) != len(match.group(4)):
-      if not (match.group(3) == ';' and
-              len(match.group(2)) == 1 + len(match.group(4)) or
-              not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)):
-        error(filename, linenum, 'whitespace/parens', 5,
-              'Mismatching spaces inside () in %s' % match.group(1))
-    if len(match.group(2)) not in [0, 1]:
-      error(filename, linenum, 'whitespace/parens', 5,
-            'Should have zero or one spaces inside ( and ) in %s' %
-            match.group(1))
-
-  # You should always have a space after a comma (either as fn arg or operator)
-  #
-  # This does not apply when the non-space character following the
-  # comma is another comma, since the only time when that happens is
-  # for empty macro arguments.
-  #
-  # We run this check in two passes: first pass on elided lines to
-  # verify that lines contain missing whitespaces, second pass on raw
-  # lines to confirm that those missing whitespaces are not due to
-  # elided comments.
-  if Search(r',[^,\s]', line) and Search(r',[^,\s]', raw[linenum]):
-    error(filename, linenum, 'whitespace/comma', 3,
-          'Missing space after ,')
-
-  # You should always have a space after a semicolon
-  # except for few corner cases
-  # TODO(unknown): clarify if 'if (1) { return 1;}' is requires one more
-  # space after ;
-  if Search(r';[^\s};\\)/]', line):
-    error(filename, linenum, 'whitespace/semicolon', 3,
-          'Missing space after ;')
-
-  # Next we will look for issues with function calls.
-  CheckSpacingForFunctionCall(filename, line, linenum, error)
-
-  # Except after an opening paren, or after another opening brace (in case of
-  # an initializer list, for instance), you should have spaces before your
-  # braces. And since you should never have braces at the beginning of a line,
-  # this is an easy test.
-  match = Match(r'^(.*[^ ({]){', line)
-  if match:
-    # Try a bit harder to check for brace initialization.  This
-    # happens in one of the following forms:
-    #   Constructor() : initializer_list_{} { ... }
-    #   Constructor{}.MemberFunction()
-    #   Type variable{};
-    #   FunctionCall(type{}, ...);
-    #   LastArgument(..., type{});
-    #   LOG(INFO) << type{} << " ...";
-    #   map_of_type[{...}] = ...;
-    #
-    # We check for the character following the closing brace, and
-    # silence the warning if it's one of those listed above, i.e.
-    # "{.;,)<]".
-    #
-    # To account for nested initializer list, we allow any number of
-    # closing braces up to "{;,)<".  We can't simply silence the
-    # warning on first sight of closing brace, because that would
-    # cause false negatives for things that are not initializer lists.
-    #   Silence this:         But not this:
-    #     Outer{                if (...) {
-    #       Inner{...}            if (...){  // Missing space before {
-    #     };                    }
-    #
-    # There is a false negative with this approach if people inserted
-    # spurious semicolons, e.g. "if (cond){};", but we will catch the
-    # spurious semicolon with a separate check.
-    (endline, endlinenum, endpos) = CloseExpression(
-        clean_lines, linenum, len(match.group(1)))
-    trailing_text = ''
-    if endpos > -1:
-      trailing_text = endline[endpos:]
-    for offset in xrange(endlinenum + 1,
-                         min(endlinenum + 3, clean_lines.NumLines() - 1)):
-      trailing_text += clean_lines.elided[offset]
-    if not Match(r'^[\s}]*[{.;,)<\]]', trailing_text):
-      error(filename, linenum, 'whitespace/braces', 5,
-            'Missing space before {')
-
-  # Make sure '} else {' has spaces.
-  if Search(r'}else', line):
-    error(filename, linenum, 'whitespace/braces', 5,
-          'Missing space before else')
-
-  # You shouldn't have spaces before your brackets, except maybe after
-  # 'delete []' or 'new char * []'.
-  if Search(r'\w\s+\[', line) and not Search(r'delete\s+\[', line):
-    error(filename, linenum, 'whitespace/braces', 5,
-          'Extra space before [')
-
-  # You shouldn't have a space before a semicolon at the end of the line.
-  # There's a special case for "for" since the style guide allows space before
-  # the semicolon there.
-  if Search(r':\s*;\s*$', line):
-    error(filename, linenum, 'whitespace/semicolon', 5,
-          'Semicolon defining empty statement. Use {} instead.')
-  elif Search(r'^\s*;\s*$', line):
-    error(filename, linenum, 'whitespace/semicolon', 5,
-          'Line contains only semicolon. If this should be an empty statement, '
-          'use {} instead.')
-  elif (Search(r'\s+;\s*$', line) and
-        not Search(r'\bfor\b', line)):
-    error(filename, linenum, 'whitespace/semicolon', 5,
-          'Extra space before last semicolon. If this should be an empty '
-          'statement, use {} instead.')
-
-  # In range-based for, we wanted spaces before and after the colon, but
-  # not around "::" tokens that might appear.
-  if (Search('for *\(.*[^:]:[^: ]', line) or
-      Search('for *\(.*[^: ]:[^:]', line)):
-    error(filename, linenum, 'whitespace/forcolon', 2,
-          'Missing space around colon in range-based for loop')
-
-
-def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error):
-  """Checks for additional blank line issues related to sections.
-
-  Currently the only thing checked here is blank line before protected/private.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    class_info: A _ClassInfo objects.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  # Skip checks if the class is small, where small means 25 lines or less.
-  # 25 lines seems like a good cutoff since that's the usual height of
-  # terminals, and any class that can't fit in one screen can't really
-  # be considered "small".
-  #
-  # Also skip checks if we are on the first line.  This accounts for
-  # classes that look like
-  #   class Foo { public: ... };
-  #
-  # If we didn't find the end of the class, last_line would be zero,
-  # and the check will be skipped by the first condition.
-  if (class_info.last_line - class_info.starting_linenum <= 24 or
-      linenum <= class_info.starting_linenum):
-    return
-
-  matched = Match(r'\s*(public|protected|private):', clean_lines.lines[linenum])
-  if matched:
-    # Issue warning if the line before public/protected/private was
-    # not a blank line, but don't do this if the previous line contains
-    # "class" or "struct".  This can happen two ways:
-    #  - We are at the beginning of the class.
-    #  - We are forward-declaring an inner class that is semantically
-    #    private, but needed to be public for implementation reasons.
-    # Also ignores cases where the previous line ends with a backslash as can be
-    # common when defining classes in C macros.
-    prev_line = clean_lines.lines[linenum - 1]
-    if (not IsBlankLine(prev_line) and
-        not Search(r'\b(class|struct)\b', prev_line) and
-        not Search(r'\\$', prev_line)):
-      # Try a bit harder to find the beginning of the class.  This is to
-      # account for multi-line base-specifier lists, e.g.:
-      #   class Derived
-      #       : public Base {
-      end_class_head = class_info.starting_linenum
-      for i in range(class_info.starting_linenum, linenum):
-        if Search(r'\{\s*$', clean_lines.lines[i]):
-          end_class_head = i
-          break
-      if end_class_head < linenum - 1:
-        error(filename, linenum, 'whitespace/blank_line', 3,
-              '"%s:" should be preceded by a blank line' % matched.group(1))
-
-
-def GetPreviousNonBlankLine(clean_lines, linenum):
-  """Return the most recent non-blank line and its line number.
-
-  Args:
-    clean_lines: A CleansedLines instance containing the file contents.
-    linenum: The number of the line to check.
-
-  Returns:
-    A tuple with two elements.  The first element is the contents of the last
-    non-blank line before the current line, or the empty string if this is the
-    first non-blank line.  The second is the line number of that line, or -1
-    if this is the first non-blank line.
-  """
-
-  prevlinenum = linenum - 1
-  while prevlinenum >= 0:
-    prevline = clean_lines.elided[prevlinenum]
-    if not IsBlankLine(prevline):     # if not a blank line...
-      return (prevline, prevlinenum)
-    prevlinenum -= 1
-  return ('', -1)
-
-
-def CheckBraces(filename, clean_lines, linenum, error):
-  """Looks for misplaced braces (e.g. at the end of line).
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-
-  line = clean_lines.elided[linenum]        # get rid of comments and strings
-
-  if Match(r'\s*{\s*$', line):
-    # We allow an open brace to start a line in the case where someone is using
-    # braces in a block to explicitly create a new scope, which is commonly used
-    # to control the lifetime of stack-allocated variables.  Braces are also
-    # used for brace initializers inside function calls.  We don't detect this
-    # perfectly: we just don't complain if the last non-whitespace character on
-    # the previous non-blank line is ',', ';', ':', '(', '{', or '}', or if the
-    # previous line starts a preprocessor block.
-    prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
-    if (not Search(r'[,;:}{(]\s*$', prevline) and
-        not Match(r'\s*#', prevline)):
-      error(filename, linenum, 'whitespace/braces', 4,
-            '{ should almost always be at the end of the previous line')
-
-  # An else clause should be on the same line as the preceding closing brace.
-  if Match(r'\s*else\s*', line):
-    prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
-    if Match(r'\s*}\s*$', prevline):
-      error(filename, linenum, 'whitespace/newline', 4,
-            'An else should appear on the same line as the preceding }')
-
-  # If braces come on one side of an else, they should be on both.
-  # However, we have to worry about "else if" that spans multiple lines!
-  if Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line):
-    if Search(r'}\s*else if([^{]*)$', line):       # could be multi-line if
-      # find the ( after the if
-      pos = line.find('else if')
-      pos = line.find('(', pos)
-      if pos > 0:
-        (endline, _, endpos) = CloseExpression(clean_lines, linenum, pos)
-        if endline[endpos:].find('{') == -1:    # must be brace after if
-          error(filename, linenum, 'readability/braces', 5,
-                'If an else has a brace on one side, it should have it on both')
-    else:            # common case: else not followed by a multi-line if
-      error(filename, linenum, 'readability/braces', 5,
-            'If an else has a brace on one side, it should have it on both')
-
-  # Likewise, an else should never have the else clause on the same line
-  if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line):
-    error(filename, linenum, 'whitespace/newline', 4,
-          'Else clause should never be on same line as else (use 2 lines)')
-
-  # In the same way, a do/while should never be on one line
-  if Match(r'\s*do [^\s{]', line):
-    error(filename, linenum, 'whitespace/newline', 4,
-          'do/while clauses should not be on a single line')
-
-  # Block bodies should not be followed by a semicolon.  Due to C++11
-  # brace initialization, there are more places where semicolons are
-  # required than not, so we use a whitelist approach to check these
-  # rather than a blacklist.  These are the places where "};" should
-  # be replaced by just "}":
-  # 1. Some flavor of block following closing parenthesis:
-  #    for (;;) {};
-  #    while (...) {};
-  #    switch (...) {};
-  #    Function(...) {};
-  #    if (...) {};
-  #    if (...) else if (...) {};
-  #
-  # 2. else block:
-  #    if (...) else {};
-  #
-  # 3. const member function:
-  #    Function(...) const {};
-  #
-  # 4. Block following some statement:
-  #    x = 42;
-  #    {};
-  #
-  # 5. Block at the beginning of a function:
-  #    Function(...) {
-  #      {};
-  #    }
-  #
-  #    Note that naively checking for the preceding "{" will also match
-  #    braces inside multi-dimensional arrays, but this is fine since
-  #    that expression will not contain semicolons.
-  #
-  # 6. Block following another block:
-  #    while (true) {}
-  #    {};
-  #
-  # 7. End of namespaces:
-  #    namespace {};
-  #
-  #    These semicolons seems far more common than other kinds of
-  #    redundant semicolons, possibly due to people converting classes
-  #    to namespaces.  For now we do not warn for this case.
-  #
-  # Try matching case 1 first.
-  match = Match(r'^(.*\)\s*)\{', line)
-  if match:
-    # Matched closing parenthesis (case 1).  Check the token before the
-    # matching opening parenthesis, and don't warn if it looks like a
-    # macro.  This avoids these false positives:
-    #  - macro that defines a base class
-    #  - multi-line macro that defines a base class
-    #  - macro that defines the whole class-head
-    #
-    # But we still issue warnings for macros that we know are safe to
-    # warn, specifically:
-    #  - TEST, TEST_F, TEST_P, MATCHER, MATCHER_P
-    #  - TYPED_TEST
-    #  - INTERFACE_DEF
-    #  - EXCLUSIVE_LOCKS_REQUIRED, SHARED_LOCKS_REQUIRED, LOCKS_EXCLUDED:
-    #
-    # We implement a whitelist of safe macros instead of a blacklist of
-    # unsafe macros, even though the latter appears less frequently in
-    # google code and would have been easier to implement.  This is because
-    # the downside for getting the whitelist wrong means some extra
-    # semicolons, while the downside for getting the blacklist wrong
-    # would result in compile errors.
-    #
-    # In addition to macros, we also don't want to warn on compound
-    # literals.
-    closing_brace_pos = match.group(1).rfind(')')
-    opening_parenthesis = ReverseCloseExpression(
-        clean_lines, linenum, closing_brace_pos)
-    if opening_parenthesis[2] > -1:
-      line_prefix = opening_parenthesis[0][0:opening_parenthesis[2]]
-      macro = Search(r'\b([A-Z_]+)\s*$', line_prefix)
-      if ((macro and
-           macro.group(1) not in (
-               'TEST', 'TEST_F', 'MATCHER', 'MATCHER_P', 'TYPED_TEST',
-               'EXCLUSIVE_LOCKS_REQUIRED', 'SHARED_LOCKS_REQUIRED',
-               'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
-          Search(r'\s+=\s*$', line_prefix)):
-        match = None
-    # Whitelist lambda function definition which also requires a ";" after
-    # closing brace
-    if match:
-        if Match(r'^.*\[.*\]\s*(.*\)\s*)\{', line):
-            match = None
-
-  else:
-    # Try matching cases 2-3.
-    match = Match(r'^(.*(?:else|\)\s*const)\s*)\{', line)
-    if not match:
-      # Try matching cases 4-6.  These are always matched on separate lines.
-      #
-      # Note that we can't simply concatenate the previous line to the
-      # current line and do a single match, otherwise we may output
-      # duplicate warnings for the blank line case:
-      #   if (cond) {
-      #     // blank line
-      #   }
-      prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
-      if prevline and Search(r'[;{}]\s*$', prevline):
-        match = Match(r'^(\s*)\{', line)
-
-  # Check matching closing brace
-  if match:
-    (endline, endlinenum, endpos) = CloseExpression(
-        clean_lines, linenum, len(match.group(1)))
-    if endpos > -1 and Match(r'^\s*;', endline[endpos:]):
-      # Current {} pair is eligible for semicolon check, and we have found
-      # the redundant semicolon, output warning here.
-      #
-      # Note: because we are scanning forward for opening braces, and
-      # outputting warnings for the matching closing brace, if there are
-      # nested blocks with trailing semicolons, we will get the error
-      # messages in reversed order.
-      error(filename, endlinenum, 'readability/braces', 4,
-            "You don't need a ; after a }")
-
-
-def CheckEmptyBlockBody(filename, clean_lines, linenum, error):
-  """Look for empty loop/conditional body with only a single semicolon.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-
-  # Search for loop keywords at the beginning of the line.  Because only
-  # whitespaces are allowed before the keywords, this will also ignore most
-  # do-while-loops, since those lines should start with closing brace.
-  #
-  # We also check "if" blocks here, since an empty conditional block
-  # is likely an error.
-  line = clean_lines.elided[linenum]
-  matched = Match(r'\s*(for|while|if)\s*\(', line)
-  if matched:
-    # Find the end of the conditional expression
-    (end_line, end_linenum, end_pos) = CloseExpression(
-        clean_lines, linenum, line.find('('))
-
-    # Output warning if what follows the condition expression is a semicolon.
-    # No warning for all other cases, including whitespace or newline, since we
-    # have a separate check for semicolons preceded by whitespace.
-    if end_pos >= 0 and Match(r';', end_line[end_pos:]):
-      if matched.group(1) == 'if':
-        error(filename, end_linenum, 'whitespace/empty_conditional_body', 5,
-              'Empty conditional bodies should use {}')
-      else:
-        error(filename, end_linenum, 'whitespace/empty_loop_body', 5,
-              'Empty loop bodies should use {} or continue')
-
-
-def CheckCheck(filename, clean_lines, linenum, error):
-  """Checks the use of CHECK and EXPECT macros.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-
-  # Decide the set of replacement macros that should be suggested
-  lines = clean_lines.elided
-  check_macro = None
-  start_pos = -1
-  for macro in _CHECK_MACROS:
-    i = lines[linenum].find(macro)
-    if i >= 0:
-      check_macro = macro
-
-      # Find opening parenthesis.  Do a regular expression match here
-      # to make sure that we are matching the expected CHECK macro, as
-      # opposed to some other macro that happens to contain the CHECK
-      # substring.
-      matched = Match(r'^(.*\b' + check_macro + r'\s*)\(', lines[linenum])
-      if not matched:
-        continue
-      start_pos = len(matched.group(1))
-      break
-  if not check_macro or start_pos < 0:
-    # Don't waste time here if line doesn't contain 'CHECK' or 'EXPECT'
-    return
-
-  # Find end of the boolean expression by matching parentheses
-  (last_line, end_line, end_pos) = CloseExpression(
-      clean_lines, linenum, start_pos)
-  if end_pos < 0:
-    return
-  if linenum == end_line:
-    expression = lines[linenum][start_pos + 1:end_pos - 1]
-  else:
-    expression = lines[linenum][start_pos + 1:]
-    for i in xrange(linenum + 1, end_line):
-      expression += lines[i]
-    expression += last_line[0:end_pos - 1]
-
-  # Parse expression so that we can take parentheses into account.
-  # This avoids false positives for inputs like "CHECK((a < 4) == b)",
-  # which is not replaceable by CHECK_LE.
-  lhs = ''
-  rhs = ''
-  operator = None
-  while expression:
-    matched = Match(r'^\s*(<<|<<=|>>|>>=|->\*|->|&&|\|\||'
-                    r'==|!=|>=|>|<=|<|\()(.*)$', expression)
-    if matched:
-      token = matched.group(1)
-      if token == '(':
-        # Parenthesized operand
-        expression = matched.group(2)
-        (end, _) = FindEndOfExpressionInLine(expression, 0, 1, '(', ')')
-        if end < 0:
-          return  # Unmatched parenthesis
-        lhs += '(' + expression[0:end]
-        expression = expression[end:]
-      elif token in ('&&', '||'):
-        # Logical and/or operators.  This means the expression
-        # contains more than one term, for example:
-        #   CHECK(42 < a && a < b);
-        #
-        # These are not replaceable with CHECK_LE, so bail out early.
-        return
-      elif token in ('<<', '<<=', '>>', '>>=', '->*', '->'):
-        # Non-relational operator
-        lhs += token
-        expression = matched.group(2)
-      else:
-        # Relational operator
-        operator = token
-        rhs = matched.group(2)
-        break
-    else:
-      # Unparenthesized operand.  Instead of appending to lhs one character
-      # at a time, we do another regular expression match to consume several
-      # characters at once if possible.  Trivial benchmark shows that this
-      # is more efficient when the operands are longer than a single
-      # character, which is generally the case.
-      matched = Match(r'^([^-=!<>()&|]+)(.*)$', expression)
-      if not matched:
-        matched = Match(r'^(\s*\S)(.*)$', expression)
-        if not matched:
-          break
-      lhs += matched.group(1)
-      expression = matched.group(2)
-
-  # Only apply checks if we got all parts of the boolean expression
-  if not (lhs and operator and rhs):
-    return
-
-  # Check that rhs do not contain logical operators.  We already know
-  # that lhs is fine since the loop above parses out && and ||.
-  if rhs.find('&&') > -1 or rhs.find('||') > -1:
-    return
-
-  # At least one of the operands must be a constant literal.  This is
-  # to avoid suggesting replacements for unprintable things like
-  # CHECK(variable != iterator)
-  #
-  # The following pattern matches decimal, hex integers, strings, and
-  # characters (in that order).
-  lhs = lhs.strip()
-  rhs = rhs.strip()
-  match_constant = r'^([-+]?(\d+|0[xX][0-9a-fA-F]+)[lLuU]{0,3}|".*"|\'.*\')$'
-  if Match(match_constant, lhs) or Match(match_constant, rhs):
-    # Note: since we know both lhs and rhs, we can provide a more
-    # descriptive error message like:
-    #   Consider using CHECK_EQ(x, 42) instead of CHECK(x == 42)
-    # Instead of:
-    #   Consider using CHECK_EQ instead of CHECK(a == b)
-    #
-    # We are still keeping the less descriptive message because if lhs
-    # or rhs gets long, the error message might become unreadable.
-    error(filename, linenum, 'readability/check', 2,
-          'Consider using %s instead of %s(a %s b)' % (
-              _CHECK_REPLACEMENT[check_macro][operator],
-              check_macro, operator))
-
-
-def CheckAltTokens(filename, clean_lines, linenum, error):
-  """Check alternative keywords being used in boolean expressions.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]
-
-  # Avoid preprocessor lines
-  if Match(r'^\s*#', line):
-    return
-
-  # Last ditch effort to avoid multi-line comments.  This will not help
-  # if the comment started before the current line or ended after the
-  # current line, but it catches most of the false positives.  At least,
-  # it provides a way to workaround this warning for people who use
-  # multi-line comments in preprocessor macros.
-  #
-  # TODO(unknown): remove this once cpplint has better support for
-  # multi-line comments.
-  if line.find('/*') >= 0 or line.find('*/') >= 0:
-    return
-
-  for match in _ALT_TOKEN_REPLACEMENT_PATTERN.finditer(line):
-    error(filename, linenum, 'readability/alt_tokens', 2,
-          'Use operator %s instead of %s' % (
-              _ALT_TOKEN_REPLACEMENT[match.group(1)], match.group(1)))
-
-
-def GetLineWidth(line):
-  """Determines the width of the line in column positions.
-
-  Args:
-    line: A string, which may be a Unicode string.
-
-  Returns:
-    The width of the line in column positions, accounting for Unicode
-    combining characters and wide characters.
-  """
-  if isinstance(line, unicode):
-    width = 0
-    for uc in unicodedata.normalize('NFC', line):
-      if unicodedata.east_asian_width(uc) in ('W', 'F'):
-        width += 2
-      elif not unicodedata.combining(uc):
-        width += 1
-    return width
-  else:
-    return len(line)
-
-
-def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state,
-               error):
-  """Checks rules from the 'C++ style rules' section of cppguide.html.
-
-  Most of these rules are hard to test (naming, comment style), but we
-  do what we can.  In particular we check for 2-space indents, line lengths,
-  tab usage, spaces inside code, etc.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    file_extension: The extension (without the dot) of the filename.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: The function to call with any errors found.
-  """
-
-  # Don't use "elided" lines here, otherwise we can't check commented lines.
-  # Don't want to use "raw" either, because we don't want to check inside C++11
-  # raw strings,
-  raw_lines = clean_lines.lines_without_raw_strings
-  line = raw_lines[linenum]
-
-  if line.find('\t') != -1:
-    error(filename, linenum, 'whitespace/tab', 1,
-          'Tab found; better to use spaces')
-
-  # One or three blank spaces at the beginning of the line is weird; it's
-  # hard to reconcile that with 2-space indents.
-  # NOTE: here are the conditions rob pike used for his tests.  Mine aren't
-  # as sophisticated, but it may be worth becoming so:  RLENGTH==initial_spaces
-  # if(RLENGTH > 20) complain = 0;
-  # if(match($0, " +(error|private|public|protected):")) complain = 0;
-  # if(match(prev, "&& *$")) complain = 0;
-  # if(match(prev, "\\|\\| *$")) complain = 0;
-  # if(match(prev, "[\",=><] *$")) complain = 0;
-  # if(match($0, " <<")) complain = 0;
-  # if(match(prev, " +for \\(")) complain = 0;
-  # if(prevodd && match(prevprev, " +for \\(")) complain = 0;
-  initial_spaces = 0
-  cleansed_line = clean_lines.elided[linenum]
-  while initial_spaces < len(line) and line[initial_spaces] == ' ':
-    initial_spaces += 1
-  if line and line[-1].isspace():
-    error(filename, linenum, 'whitespace/end_of_line', 4,
-          'Line ends in whitespace.  Consider deleting these extra spaces.')
-  # There are certain situations we allow one space, notably for section labels
-  elif ((initial_spaces == 1 or initial_spaces == 3) and
-        not Match(r'\s*\w+\s*:\s*$', cleansed_line)):
-    error(filename, linenum, 'whitespace/indent', 3,
-          'Weird number of spaces at line-start.  '
-          'Are you using a 2-space indent?')
-
-  # Check if the line is a header guard.
-  is_header_guard = False
-  if file_extension == 'h':
-    cppvar = GetHeaderGuardCPPVariable(filename)
-    if (line.startswith('#ifndef %s' % cppvar) or
-        line.startswith('#define %s' % cppvar) or
-        line.startswith('#endif  // %s' % cppvar)):
-      is_header_guard = True
-  # #include lines and header guards can be long, since there's no clean way to
-  # split them.
-  #
-  # URLs can be long too.  It's possible to split these, but it makes them
-  # harder to cut&paste.
-  #
-  # The "$Id:...$" comment may also get very long without it being the
-  # developers fault.
-  if (not line.startswith('#include') and not is_header_guard and
-      not Match(r'^\s*//.*http(s?)://\S*$', line) and
-      not Match(r'^// \$Id:.*#[0-9]+ \$$', line)):
-    line_width = GetLineWidth(line)
-    extended_length = int((_line_length * 1.25))
-    if line_width > extended_length:
-      error(filename, linenum, 'whitespace/line_length', 4,
-            'Lines should very rarely be longer than %i characters' %
-            extended_length)
-    elif line_width > _line_length:
-      error(filename, linenum, 'whitespace/line_length', 2,
-            'Lines should be <= %i characters long' % _line_length)
-
-  if (cleansed_line.count(';') > 1 and
-      # for loops are allowed two ;'s (and may run over two lines).
-      cleansed_line.find('for') == -1 and
-      (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or
-       GetPreviousNonBlankLine(clean_lines, linenum)[0].find(';') != -1) and
-      # It's ok to have many commands in a switch case that fits in 1 line
-      not ((cleansed_line.find('case ') != -1 or
-            cleansed_line.find('default:') != -1) and
-           cleansed_line.find('break;') != -1)):
-    error(filename, linenum, 'whitespace/newline', 0,
-          'More than one command on the same line')
-
-  # Some more style checks
-  CheckBraces(filename, clean_lines, linenum, error)
-  CheckEmptyBlockBody(filename, clean_lines, linenum, error)
-  CheckAccess(filename, clean_lines, linenum, nesting_state, error)
-  CheckSpacing(filename, clean_lines, linenum, nesting_state, error)
-  CheckCheck(filename, clean_lines, linenum, error)
-  CheckAltTokens(filename, clean_lines, linenum, error)
-  classinfo = nesting_state.InnermostClass()
-  if classinfo:
-    CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error)
-
-
-_RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"')
-_RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$')
-# Matches the first component of a filename delimited by -s and _s. That is:
-#  _RE_FIRST_COMPONENT.match('foo').group(0) == 'foo'
-#  _RE_FIRST_COMPONENT.match('foo.cc').group(0) == 'foo'
-#  _RE_FIRST_COMPONENT.match('foo-bar_baz.cc').group(0) == 'foo'
-#  _RE_FIRST_COMPONENT.match('foo_bar-baz.cc').group(0) == 'foo'
-_RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+')
-
-
-def _DropCommonSuffixes(filename):
-  """Drops common suffixes like _test.cc or -inl.h from filename.
-
-  For example:
-    >>> _DropCommonSuffixes('foo/foo-inl.h')
-    'foo/foo'
-    >>> _DropCommonSuffixes('foo/bar/foo.cc')
-    'foo/bar/foo'
-    >>> _DropCommonSuffixes('foo/foo_internal.h')
-    'foo/foo'
-    >>> _DropCommonSuffixes('foo/foo_unusualinternal.h')
-    'foo/foo_unusualinternal'
-
-  Args:
-    filename: The input filename.
-
-  Returns:
-    The filename with the common suffix removed.
-  """
-  for suffix in ('test.cc', 'regtest.cc', 'unittest.cc',
-                 'inl.h', 'impl.h', 'internal.h'):
-    if (filename.endswith(suffix) and len(filename) > len(suffix) and
-        filename[-len(suffix) - 1] in ('-', '_')):
-      return filename[:-len(suffix) - 1]
-  return os.path.splitext(filename)[0]
-
-
-def _IsTestFilename(filename):
-  """Determines if the given filename has a suffix that identifies it as a test.
-
-  Args:
-    filename: The input filename.
-
-  Returns:
-    True if 'filename' looks like a test, False otherwise.
-  """
-  if (filename.endswith('_test.cc') or
-      filename.endswith('_unittest.cc') or
-      filename.endswith('_regtest.cc')):
-    return True
-  else:
-    return False
-
-
-def _ClassifyInclude(fileinfo, include, is_system):
-  """Figures out what kind of header 'include' is.
-
-  Args:
-    fileinfo: The current file cpplint is running over. A FileInfo instance.
-    include: The path to a #included file.
-    is_system: True if the #include used <> rather than "".
-
-  Returns:
-    One of the _XXX_HEADER constants.
-
-  For example:
-    >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'stdio.h', True)
-    _C_SYS_HEADER
-    >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'string', True)
-    _CPP_SYS_HEADER
-    >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', False)
-    _LIKELY_MY_HEADER
-    >>> _ClassifyInclude(FileInfo('foo/foo_unknown_extension.cc'),
-    ...                  'bar/foo_other_ext.h', False)
-    _POSSIBLE_MY_HEADER
-    >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/bar.h', False)
-    _OTHER_HEADER
-  """
-  # This is a list of all standard c++ header files, except
-  # those already checked for above.
-  is_cpp_h = include in _CPP_HEADERS
-
-  if is_system:
-    if is_cpp_h:
-      return _CPP_SYS_HEADER
-    else:
-      return _C_SYS_HEADER
-
-  # If the target file and the include we're checking share a
-  # basename when we drop common extensions, and the include
-  # lives in . , then it's likely to be owned by the target file.
-  target_dir, target_base = (
-      os.path.split(_DropCommonSuffixes(fileinfo.RepositoryName())))
-  include_dir, include_base = os.path.split(_DropCommonSuffixes(include))
-  if target_base == include_base and (
-      include_dir == target_dir or
-      include_dir == os.path.normpath(target_dir + '/../public')):
-    return _LIKELY_MY_HEADER
-
-  # If the target and include share some initial basename
-  # component, it's possible the target is implementing the
-  # include, so it's allowed to be first, but we'll never
-  # complain if it's not there.
-  target_first_component = _RE_FIRST_COMPONENT.match(target_base)
-  include_first_component = _RE_FIRST_COMPONENT.match(include_base)
-  if (target_first_component and include_first_component and
-      target_first_component.group(0) ==
-      include_first_component.group(0)):
-    return _POSSIBLE_MY_HEADER
-
-  return _OTHER_HEADER
-
-
-
-def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
-  """Check rules that are applicable to #include lines.
-
-  Strings on #include lines are NOT removed from elided line, to make
-  certain tasks easier. However, to prevent false positives, checks
-  applicable to #include lines in CheckLanguage must be put here.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    include_state: An _IncludeState instance in which the headers are inserted.
-    error: The function to call with any errors found.
-  """
-  fileinfo = FileInfo(filename)
-
-  line = clean_lines.lines[linenum]
-
-  # "include" should use the new style "foo/bar.h" instead of just "bar.h"
-  if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line):
-    error(filename, linenum, 'build/include', 4,
-          'Include the directory when naming .h files')
-
-  # we shouldn't include a file more than once. actually, there are a
-  # handful of instances where doing so is okay, but in general it's
-  # not.
-  match = _RE_PATTERN_INCLUDE.search(line)
-  if match:
-    include = match.group(2)
-    is_system = (match.group(1) == '<')
-    if include in include_state:
-      error(filename, linenum, 'build/include', 4,
-            '"%s" already included at %s:%s' %
-            (include, filename, include_state[include]))
-    else:
-      include_state[include] = linenum
-
-      # We want to ensure that headers appear in the right order:
-      # 1) for foo.cc, foo.h  (preferred location)
-      # 2) c system files
-      # 3) cpp system files
-      # 4) for foo.cc, foo.h  (deprecated location)
-      # 5) other google headers
-      #
-      # We classify each include statement as one of those 5 types
-      # using a number of techniques. The include_state object keeps
-      # track of the highest type seen, and complains if we see a
-      # lower type after that.
-      error_message = include_state.CheckNextIncludeOrder(
-          _ClassifyInclude(fileinfo, include, is_system))
-      if error_message:
-        error(filename, linenum, 'build/include_order', 4,
-              '%s. Should be: %s.h, c system, c++ system, other.' %
-              (error_message, fileinfo.BaseName()))
-      canonical_include = include_state.CanonicalizeAlphabeticalOrder(include)
-      if not include_state.IsInAlphabeticalOrder(
-          clean_lines, linenum, canonical_include):
-        error(filename, linenum, 'build/include_alpha', 4,
-              'Include "%s" not in alphabetical order' % include)
-      include_state.SetLastHeader(canonical_include)
-
-  # Look for any of the stream classes that are part of standard C++.
-  match = _RE_PATTERN_INCLUDE.match(line)
-  if match:
-    include = match.group(2)
-    if Match(r'(f|ind|io|i|o|parse|pf|stdio|str|)?stream$', include):
-      # Many unit tests use cout, so we exempt them.
-      if not _IsTestFilename(filename):
-        error(filename, linenum, 'readability/streams', 3,
-              'Streams are highly discouraged.')
-
-
-def _GetTextInside(text, start_pattern):
-  r"""Retrieves all the text between matching open and close parentheses.
-
-  Given a string of lines and a regular expression string, retrieve all the text
-  following the expression and between opening punctuation symbols like
-  (, [, or {, and the matching close-punctuation symbol. This properly nested
-  occurrences of the punctuations, so for the text like
-    printf(a(), b(c()));
-  a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'.
-  start_pattern must match string having an open punctuation symbol at the end.
-
-  Args:
-    text: The lines to extract text. Its comments and strings must be elided.
-           It can be single line and can span multiple lines.
-    start_pattern: The regexp string indicating where to start extracting
-                   the text.
-  Returns:
-    The extracted text.
-    None if either the opening string or ending punctuation could not be found.
-  """
-  # TODO(sugawarayu): Audit cpplint.py to see what places could be profitably
-  # rewritten to use _GetTextInside (and use inferior regexp matching today).
-
-  # Give opening punctuations to get the matching close-punctuations.
-  matching_punctuation = {'(': ')', '{': '}', '[': ']'}
-  closing_punctuation = set(matching_punctuation.itervalues())
-
-  # Find the position to start extracting text.
-  match = re.search(start_pattern, text, re.M)
-  if not match:  # start_pattern not found in text.
-    return None
-  start_position = match.end(0)
-
-  assert start_position > 0, (
-      'start_pattern must ends with an opening punctuation.')
-  assert text[start_position - 1] in matching_punctuation, (
-      'start_pattern must ends with an opening punctuation.')
-  # Stack of closing punctuations we expect to have in text after position.
-  punctuation_stack = [matching_punctuation[text[start_position - 1]]]
-  position = start_position
-  while punctuation_stack and position < len(text):
-    if text[position] == punctuation_stack[-1]:
-      punctuation_stack.pop()
-    elif text[position] in closing_punctuation:
-      # A closing punctuation without matching opening punctuations.
-      return None
-    elif text[position] in matching_punctuation:
-      punctuation_stack.append(matching_punctuation[text[position]])
-    position += 1
-  if punctuation_stack:
-    # Opening punctuations left without matching close-punctuations.
-    return None
-  # punctuations match.
-  return text[start_position:position - 1]
-
-
-# Patterns for matching call-by-reference parameters.
-#
-# Supports nested templates up to 2 levels deep using this messy pattern:
-#   < (?: < (?: < [^<>]*
-#               >
-#           |   [^<>] )*
-#         >
-#     |   [^<>] )*
-#   >
-_RE_PATTERN_IDENT = r'[_a-zA-Z]\w*'  # =~ [[:alpha:]][[:alnum:]]*
-_RE_PATTERN_TYPE = (
-    r'(?:const\s+)?(?:typename\s+|class\s+|struct\s+|union\s+|enum\s+)?'
-    r'(?:\w|'
-    r'\s*<(?:<(?:<[^<>]*>|[^<>])*>|[^<>])*>|'
-    r'::)+')
-# A call-by-reference parameter ends with '& identifier'.
-_RE_PATTERN_REF_PARAM = re.compile(
-    r'(' + _RE_PATTERN_TYPE + r'(?:\s*(?:\bconst\b|[*]))*\s*'
-    r'&\s*' + _RE_PATTERN_IDENT + r')\s*(?:=[^,()]+)?[,)]')
-# A call-by-const-reference parameter either ends with 'const& identifier'
-# or looks like 'const type& identifier' when 'type' is atomic.
-_RE_PATTERN_CONST_REF_PARAM = (
-    r'(?:.*\s*\bconst\s*&\s*' + _RE_PATTERN_IDENT +
-    r'|const\s+' + _RE_PATTERN_TYPE + r'\s*&\s*' + _RE_PATTERN_IDENT + r')')
-
-
-def CheckLanguage(filename, clean_lines, linenum, file_extension,
-                  include_state, nesting_state, error):
-  """Checks rules from the 'C++ language rules' section of cppguide.html.
-
-  Some of these rules are hard to test (function overloading, using
-  uint32 inappropriately), but we do the best we can.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    file_extension: The extension (without the dot) of the filename.
-    include_state: An _IncludeState instance in which the headers are inserted.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: The function to call with any errors found.
-  """
-  # If the line is empty or consists of entirely a comment, no need to
-  # check it.
-  line = clean_lines.elided[linenum]
-  if not line:
-    return
-
-  match = _RE_PATTERN_INCLUDE.search(line)
-  if match:
-    CheckIncludeLine(filename, clean_lines, linenum, include_state, error)
-    return
-
-  # Reset include state across preprocessor directives.  This is meant
-  # to silence warnings for conditional includes.
-  if Match(r'^\s*#\s*(?:ifdef|elif|else|endif)\b', line):
-    include_state.ResetSection()
-
-  # Make Windows paths like Unix.
-  fullname = os.path.abspath(filename).replace('\\', '/')
-
-  # TODO(unknown): figure out if they're using default arguments in fn proto.
-
-  # Check to see if they're using an conversion function cast.
-  # I just try to capture the most common basic types, though there are more.
-  # Parameterless conversion functions, such as bool(), are allowed as they are
-  # probably a member operator declaration or default constructor.
-  match = Search(
-      r'(\bnew\s+)?\b'  # Grab 'new' operator, if it's there
-      r'(int|float|double|bool|char|int32|uint32|int64|uint64)'
-      r'(\([^)].*)', line)
-  if match:
-    matched_new = match.group(1)
-    matched_type = match.group(2)
-    matched_funcptr = match.group(3)
-
-    # gMock methods are defined using some variant of MOCK_METHODx(name, type)
-    # where type may be float(), int(string), etc.  Without context they are
-    # virtually indistinguishable from int(x) casts. Likewise, gMock's
-    # MockCallback takes a template parameter of the form return_type(arg_type),
-    # which looks much like the cast we're trying to detect.
-    #
-    # std::function<> wrapper has a similar problem.
-    #
-    # Return types for function pointers also look like casts if they
-    # don't have an extra space.
-    if (matched_new is None and  # If new operator, then this isn't a cast
-        not (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or
-             Search(r'\bMockCallback<.*>', line) or
-             Search(r'\bstd::function<.*>', line)) and
-        not (matched_funcptr and
-             Match(r'\((?:[^() ]+::\s*\*\s*)?[^() ]+\)\s*\(',
-                   matched_funcptr))):
-      # Try a bit harder to catch gmock lines: the only place where
-      # something looks like an old-style cast is where we declare the
-      # return type of the mocked method, and the only time when we
-      # are missing context is if MOCK_METHOD was split across
-      # multiple lines.  The missing MOCK_METHOD is usually one or two
-      # lines back, so scan back one or two lines.
-      #
-      # It's not possible for gmock macros to appear in the first 2
-      # lines, since the class head + section name takes up 2 lines.
-      if (linenum < 2 or
-          not (Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$',
-                     clean_lines.elided[linenum - 1]) or
-               Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$',
-                     clean_lines.elided[linenum - 2]))):
-        error(filename, linenum, 'readability/casting', 4,
-              'Using deprecated casting style.  '
-              'Use static_cast<%s>(...) instead' %
-              matched_type)
-
-  CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
-                  'static_cast',
-                  r'\((int|float|double|bool|char|u?int(16|32|64))\)', error)
-
-  # This doesn't catch all cases. Consider (const char * const)"hello".
-  #
-  # (char *) "foo" should always be a const_cast (reinterpret_cast won't
-  # compile).
-  if CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
-                     'const_cast', r'\((char\s?\*+\s?)\)\s*"', error):
-    pass
-  else:
-    # Check pointer casts for other than string constants
-    CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
-                    'reinterpret_cast', r'\((\w+\s?\*+\s?)\)', error)
-
-  # In addition, we look for people taking the address of a cast.  This
-  # is dangerous -- casts can assign to temporaries, so the pointer doesn't
-  # point where you think.
-  match = Search(
-      r'(?:&\(([^)]+)\)[\w(])|'
-      r'(?:&(static|dynamic|down|reinterpret)_cast\b)', line)
-  if match and match.group(1) != '*':
-    error(filename, linenum, 'runtime/casting', 4,
-          ('Are you taking an address of a cast?  '
-           'This is dangerous: could be a temp var.  '
-           'Take the address before doing the cast, rather than after'))
-
-  # Create an extended_line, which is the concatenation of the current and
-  # next lines, for more effective checking of code that may span more than one
-  # line.
-  if linenum + 1 < clean_lines.NumLines():
-    extended_line = line + clean_lines.elided[linenum + 1]
-  else:
-    extended_line = line
-
-  # Check for people declaring static/global STL strings at the top level.
-  # This is dangerous because the C++ language does not guarantee that
-  # globals with constructors are initialized before the first access.
-  match = Match(
-      r'((?:|static +)(?:|const +))string +([a-zA-Z0-9_:]+)\b(.*)',
-      line)
-  # Make sure it's not a function.
-  # Function template specialization looks like: "string foo<Type>(...".
-  # Class template definitions look like: "string Foo<Type>::Method(...".
-  #
-  # Also ignore things that look like operators.  These are matched separately
-  # because operator names cross non-word boundaries.  If we change the pattern
-  # above, we would decrease the accuracy of matching identifiers.
-  if (match and
-      not Search(r'\boperator\W', line) and
-      not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)?\s*\(([^"]|$)', match.group(3))):
-    error(filename, linenum, 'runtime/string', 4,
-          'For a static/global string constant, use a C style string instead: '
-          '"%schar %s[]".' %
-          (match.group(1), match.group(2)))
-
-  if Search(r'\b([A-Za-z0-9_]*_)\(\1\)', line):
-    error(filename, linenum, 'runtime/init', 4,
-          'You seem to be initializing a member variable with itself.')
-
-  if file_extension == 'h':
-    # TODO(unknown): check that 1-arg constructors are explicit.
-    #                How to tell it's a constructor?
-    #                (handled in CheckForNonStandardConstructs for now)
-    # TODO(unknown): check that classes have DISALLOW_EVIL_CONSTRUCTORS
-    #                (level 1 error)
-    pass
-
-  # Check if people are using the verboten C basic types.  The only exception
-  # we regularly allow is "unsigned short port" for port.
-  if Search(r'\bshort port\b', line):
-    if not Search(r'\bunsigned short port\b', line):
-      error(filename, linenum, 'runtime/int', 4,
-            'Use "unsigned short" for ports, not "short"')
-  else:
-    match = Search(r'\b(short|long(?! +double)|long long)\b', line)
-    if match:
-      error(filename, linenum, 'runtime/int', 4,
-            'Use int16/int64/etc, rather than the C type %s' % match.group(1))
-
-  # When snprintf is used, the second argument shouldn't be a literal.
-  match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
-  if match and match.group(2) != '0':
-    # If 2nd arg is zero, snprintf is used to calculate size.
-    error(filename, linenum, 'runtime/printf', 3,
-          'If you can, use sizeof(%s) instead of %s as the 2nd arg '
-          'to snprintf.' % (match.group(1), match.group(2)))
-
-  # Check if some verboten C functions are being used.
-  if Search(r'\bsprintf\b', line):
-    error(filename, linenum, 'runtime/printf', 5,
-          'Never use sprintf.  Use snprintf instead.')
-  match = Search(r'\b(strcpy|strcat)\b', line)
-  if match:
-    error(filename, linenum, 'runtime/printf', 4,
-          'Almost always, snprintf is better than %s' % match.group(1))
-
-  # Check if some verboten operator overloading is going on
-  # TODO(unknown): catch out-of-line unary operator&:
-  #   class X {};
-  #   int operator&(const X& x) { return 42; }  // unary operator&
-  # The trick is it's hard to tell apart from binary operator&:
-  #   class Y { int operator&(const Y& x) { return 23; } }; // binary operator&
-  if Search(r'\boperator\s*&\s*\(\s*\)', line):
-    error(filename, linenum, 'runtime/operator', 4,
-          'Unary operator& is dangerous.  Do not use it.')
-
-  # Check for suspicious usage of "if" like
-  # } if (a == b) {
-  if Search(r'\}\s*if\s*\(', line):
-    error(filename, linenum, 'readability/braces', 4,
-          'Did you mean "else if"? If not, start a new line for "if".')
-
-  # Check for potential format string bugs like printf(foo).
-  # We constrain the pattern not to pick things like DocidForPrintf(foo).
-  # Not perfect but it can catch printf(foo.c_str()) and printf(foo->c_str())
-  # TODO(sugawarayu): Catch the following case. Need to change the calling
-  # convention of the whole function to process multiple line to handle it.
-  #   printf(
-  #       boy_this_is_a_really_long_variable_that_cannot_fit_on_the_prev_line);
-  printf_args = _GetTextInside(line, r'(?i)\b(string)?printf\s*\(')
-  if printf_args:
-    match = Match(r'([\w.\->()]+)$', printf_args)
-    if match and match.group(1) != '__VA_ARGS__':
-      function_name = re.search(r'\b((?:string)?printf)\s*\(',
-                                line, re.I).group(1)
-      error(filename, linenum, 'runtime/printf', 4,
-            'Potential format string bug. Do %s("%%s", %s) instead.'
-            % (function_name, match.group(1)))
-
-  # Check for potential memset bugs like memset(buf, sizeof(buf), 0).
-  match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
-  if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)):
-    error(filename, linenum, 'runtime/memset', 4,
-          'Did you mean "memset(%s, 0, %s)"?'
-          % (match.group(1), match.group(2)))
-
-  if Search(r'\busing namespace\b', line):
-    error(filename, linenum, 'build/namespaces', 5,
-          'Do not use namespace using-directives.  '
-          'Use using-declarations instead.')
-
-  # Detect variable-length arrays.
-  match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line)
-  if (match and match.group(2) != 'return' and match.group(2) != 'delete' and
-      match.group(3).find(']') == -1):
-    # Split the size using space and arithmetic operators as delimiters.
-    # If any of the resulting tokens are not compile time constants then
-    # report the error.
-    tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3))
-    is_const = True
-    skip_next = False
-    for tok in tokens:
-      if skip_next:
-        skip_next = False
-        continue
-
-      if Search(r'sizeof\(.+\)', tok): continue
-      if Search(r'arraysize\(\w+\)', tok): continue
-
-      tok = tok.lstrip('(')
-      tok = tok.rstrip(')')
-      if not tok: continue
-      if Match(r'\d+', tok): continue
-      if Match(r'0[xX][0-9a-fA-F]+', tok): continue
-      if Match(r'k[A-Z0-9]\w*', tok): continue
-      if Match(r'(.+::)?k[A-Z0-9]\w*', tok): continue
-      if Match(r'(.+::)?[A-Z][A-Z0-9_]*', tok): continue
-      # A catch all for tricky sizeof cases, including 'sizeof expression',
-      # 'sizeof(*type)', 'sizeof(const type)', 'sizeof(struct StructName)'
-      # requires skipping the next token because we split on ' ' and '*'.
-      if tok.startswith('sizeof'):
-        skip_next = True
-        continue
-      is_const = False
-      break
-    if not is_const:
-      error(filename, linenum, 'runtime/arrays', 1,
-            'Do not use variable-length arrays.  Use an appropriately named '
-            "('k' followed by CamelCase) compile-time constant for the size.")
-
-  # If DISALLOW_EVIL_CONSTRUCTORS, DISALLOW_COPY_AND_ASSIGN, or
-  # DISALLOW_IMPLICIT_CONSTRUCTORS is present, then it should be the last thing
-  # in the class declaration.
-  match = Match(
-      (r'\s*'
-       r'(DISALLOW_(EVIL_CONSTRUCTORS|COPY_AND_ASSIGN|IMPLICIT_CONSTRUCTORS))'
-       r'\(.*\);$'),
-      line)
-  if match and linenum + 1 < clean_lines.NumLines():
-    next_line = clean_lines.elided[linenum + 1]
-    # We allow some, but not all, declarations of variables to be present
-    # in the statement that defines the class.  The [\w\*,\s]* fragment of
-    # the regular expression below allows users to declare instances of
-    # the class or pointers to instances, but not less common types such
-    # as function pointers or arrays.  It's a tradeoff between allowing
-    # reasonable code and avoiding trying to parse more C++ using regexps.
-    if not Search(r'^\s*}[\w\*,\s]*;', next_line):
-      error(filename, linenum, 'readability/constructors', 3,
-            match.group(1) + ' should be the last thing in the class')
-
-  # Check for use of unnamed namespaces in header files.  Registration
-  # macros are typically OK, so we allow use of "namespace {" on lines
-  # that end with backslashes.
-  if (file_extension == 'h'
-      and Search(r'\bnamespace\s*{', line)
-      and line[-1] != '\\'):
-    error(filename, linenum, 'build/namespaces', 4,
-          'Do not use unnamed namespaces in header files.  See '
-          'http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces'
-          ' for more information.')
-
-def CheckForNonConstReference(filename, clean_lines, linenum,
-                              nesting_state, error):
-  """Check for non-const references.
-
-  Separate from CheckLanguage since it scans backwards from current
-  line, instead of scanning forward.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: The function to call with any errors found.
-  """
-  # Do nothing if there is no '&' on current line.
-  line = clean_lines.elided[linenum]
-  if '&' not in line:
-    return
-
-  # Long type names may be broken across multiple lines, usually in one
-  # of these forms:
-  #   LongType
-  #       ::LongTypeContinued &identifier
-  #   LongType::
-  #       LongTypeContinued &identifier
-  #   LongType<
-  #       ...>::LongTypeContinued &identifier
-  #
-  # If we detected a type split across two lines, join the previous
-  # line to current line so that we can match const references
-  # accordingly.
-  #
-  # Note that this only scans back one line, since scanning back
-  # arbitrary number of lines would be expensive.  If you have a type
-  # that spans more than 2 lines, please use a typedef.
-  if linenum > 1:
-    previous = None
-    if Match(r'\s*::(?:[\w<>]|::)+\s*&\s*\S', line):
-      # previous_line\n + ::current_line
-      previous = Search(r'\b((?:const\s*)?(?:[\w<>]|::)+[\w<>])\s*$',
-                        clean_lines.elided[linenum - 1])
-    elif Match(r'\s*[a-zA-Z_]([\w<>]|::)+\s*&\s*\S', line):
-      # previous_line::\n + current_line
-      previous = Search(r'\b((?:const\s*)?(?:[\w<>]|::)+::)\s*$',
-                        clean_lines.elided[linenum - 1])
-    if previous:
-      line = previous.group(1) + line.lstrip()
-    else:
-      # Check for templated parameter that is split across multiple lines
-      endpos = line.rfind('>')
-      if endpos > -1:
-        (_, startline, startpos) = ReverseCloseExpression(
-            clean_lines, linenum, endpos)
-        if startpos > -1 and startline < linenum:
-          # Found the matching < on an earlier line, collect all
-          # pieces up to current line.
-          line = ''
-          for i in xrange(startline, linenum + 1):
-            line += clean_lines.elided[i].strip()
-
-  # Check for non-const references in function parameters.  A single '&' may
-  # found in the following places:
-  #   inside expression: binary & for bitwise AND
-  #   inside expression: unary & for taking the address of something
-  #   inside declarators: reference parameter
-  # We will exclude the first two cases by checking that we are not inside a
-  # function body, including one that was just introduced by a trailing '{'.
-  # TODO(unknwon): Doesn't account for preprocessor directives.
-  # TODO(unknown): Doesn't account for 'catch(Exception& e)' [rare].
-  check_params = False
-  if not nesting_state.stack:
-    check_params = True  # top level
-  elif (isinstance(nesting_state.stack[-1], _ClassInfo) or
-        isinstance(nesting_state.stack[-1], _NamespaceInfo)):
-    check_params = True  # within class or namespace
-  elif Match(r'.*{\s*$', line):
-    if (len(nesting_state.stack) == 1 or
-        isinstance(nesting_state.stack[-2], _ClassInfo) or
-        isinstance(nesting_state.stack[-2], _NamespaceInfo)):
-      check_params = True  # just opened global/class/namespace block
-  # We allow non-const references in a few standard places, like functions
-  # called "swap()" or iostream operators like "<<" or ">>".  Do not check
-  # those function parameters.
-  #
-  # We also accept & in static_assert, which looks like a function but
-  # it's actually a declaration expression.
-  whitelisted_functions = (r'(?:[sS]wap(?:<\w:+>)?|'
-                           r'operator\s*[<>][<>]|'
-                           r'static_assert|COMPILE_ASSERT'
-                           r')\s*\(')
-  if Search(whitelisted_functions, line):
-    check_params = False
-  elif not Search(r'\S+\([^)]*$', line):
-    # Don't see a whitelisted function on this line.  Actually we
-    # didn't see any function name on this line, so this is likely a
-    # multi-line parameter list.  Try a bit harder to catch this case.
-    for i in xrange(2):
-      if (linenum > i and
-          Search(whitelisted_functions, clean_lines.elided[linenum - i - 1])):
-        check_params = False
-        break
-
-  if check_params:
-    decls = ReplaceAll(r'{[^}]*}', ' ', line)  # exclude function body
-    for parameter in re.findall(_RE_PATTERN_REF_PARAM, decls):
-      if not Match(_RE_PATTERN_CONST_REF_PARAM, parameter):
-        error(filename, linenum, 'runtime/references', 2,
-              'Is this a non-const reference? '
-              'If so, make const or use a pointer: ' +
-              ReplaceAll(' *<', '<', parameter))
-
-
-def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern,
-                    error):
-  """Checks for a C-style cast by looking for the pattern.
-
-  Args:
-    filename: The name of the current file.
-    linenum: The number of the line to check.
-    line: The line of code to check.
-    raw_line: The raw line of code to check, with comments.
-    cast_type: The string for the C++ cast to recommend.  This is either
-      reinterpret_cast, static_cast, or const_cast, depending.
-    pattern: The regular expression used to find C-style casts.
-    error: The function to call with any errors found.
-
-  Returns:
-    True if an error was emitted.
-    False otherwise.
-  """
-  match = Search(pattern, line)
-  if not match:
-    return False
-
-  # Exclude lines with sizeof, since sizeof looks like a cast.
-  sizeof_match = Match(r'.*sizeof\s*$', line[0:match.start(1) - 1])
-  if sizeof_match:
-    return False
-
-  # operator++(int) and operator--(int)
-  if (line[0:match.start(1) - 1].endswith(' operator++') or
-      line[0:match.start(1) - 1].endswith(' operator--')):
-    return False
-
-  # A single unnamed argument for a function tends to look like old
-  # style cast.  If we see those, don't issue warnings for deprecated
-  # casts, instead issue warnings for unnamed arguments where
-  # appropriate.
-  #
-  # These are things that we want warnings for, since the style guide
-  # explicitly require all parameters to be named:
-  #   Function(int);
-  #   Function(int) {
-  #   ConstMember(int) const;
-  #   ConstMember(int) const {
-  #   ExceptionMember(int) throw (...);
-  #   ExceptionMember(int) throw (...) {
-  #   PureVirtual(int) = 0;
-  #
-  # These are functions of some sort, where the compiler would be fine
-  # if they had named parameters, but people often omit those
-  # identifiers to reduce clutter:
-  #   (FunctionPointer)(int);
-  #   (FunctionPointer)(int) = value;
-  #   Function((function_pointer_arg)(int))
-  #   <TemplateArgument(int)>;
-  #   <(FunctionPointerTemplateArgument)(int)>;
-  remainder = line[match.end(0):]
-  if Match(r'^\s*(?:;|const\b|throw\b|=|>|\{|\))', remainder):
-    # Looks like an unnamed parameter.
-
-    # Don't warn on any kind of template arguments.
-    if Match(r'^\s*>', remainder):
-      return False
-
-    # Don't warn on assignments to function pointers, but keep warnings for
-    # unnamed parameters to pure virtual functions.  Note that this pattern
-    # will also pass on assignments of "0" to function pointers, but the
-    # preferred values for those would be "nullptr" or "NULL".
-    matched_zero = Match(r'^\s=\s*(\S+)\s*;', remainder)
-    if matched_zero and matched_zero.group(1) != '0':
-      return False
-
-    # Don't warn on function pointer declarations.  For this we need
-    # to check what came before the "(type)" string.
-    if Match(r'.*\)\s*$', line[0:match.start(0)]):
-      return False
-
-    # Don't warn if the parameter is named with block comments, e.g.:
-    #  Function(int /*unused_param*/);
-    if '/*' in raw_line:
-      return False
-
-    # Passed all filters, issue warning here.
-    error(filename, linenum, 'readability/function', 3,
-          'All parameters should be named in a function')
-    return True
-
-  # At this point, all that should be left is actual casts.
-  error(filename, linenum, 'readability/casting', 4,
-        'Using C-style cast.  Use %s<%s>(...) instead' %
-        (cast_type, match.group(1)))
-
-  return True
-
-
-_HEADERS_CONTAINING_TEMPLATES = (
-    ('<deque>', ('deque',)),
-    ('<functional>', ('unary_function', 'binary_function',
-                      'plus', 'minus', 'multiplies', 'divides', 'modulus',
-                      'negate',
-                      'equal_to', 'not_equal_to', 'greater', 'less',
-                      'greater_equal', 'less_equal',
-                      'logical_and', 'logical_or', 'logical_not',
-                      'unary_negate', 'not1', 'binary_negate', 'not2',
-                      'bind1st', 'bind2nd',
-                      'pointer_to_unary_function',
-                      'pointer_to_binary_function',
-                      'ptr_fun',
-                      'mem_fun_t', 'mem_fun', 'mem_fun1_t', 'mem_fun1_ref_t',
-                      'mem_fun_ref_t',
-                      'const_mem_fun_t', 'const_mem_fun1_t',
-                      'const_mem_fun_ref_t', 'const_mem_fun1_ref_t',
-                      'mem_fun_ref',
-                     )),
-    ('<limits>', ('numeric_limits',)),
-    ('<list>', ('list',)),
-    ('<map>', ('map', 'multimap',)),
-    ('<memory>', ('allocator',)),
-    ('<queue>', ('queue', 'priority_queue',)),
-    ('<set>', ('set', 'multiset',)),
-    ('<stack>', ('stack',)),
-    ('<string>', ('char_traits', 'basic_string',)),
-    ('<utility>', ('pair',)),
-    ('<vector>', ('vector',)),
-
-    # gcc extensions.
-    # Note: std::hash is their hash, ::hash is our hash
-    ('<hash_map>', ('hash_map', 'hash_multimap',)),
-    ('<hash_set>', ('hash_set', 'hash_multiset',)),
-    ('<slist>', ('slist',)),
-    )
-
-_RE_PATTERN_STRING = re.compile(r'\bstring\b')
-
-_re_pattern_algorithm_header = []
-for _template in ('copy', 'max', 'min', 'min_element', 'sort', 'swap',
-                  'transform'):
-  # Match max<type>(..., ...), max(..., ...), but not foo->max, foo.max or
-  # type::max().
-  _re_pattern_algorithm_header.append(
-      (re.compile(r'[^>.]\b' + _template + r'(<.*?>)?\([^\)]'),
-       _template,
-       '<algorithm>'))
-
-_re_pattern_templates = []
-for _header, _templates in _HEADERS_CONTAINING_TEMPLATES:
-  for _template in _templates:
-    _re_pattern_templates.append(
-        (re.compile(r'(\<|\b)' + _template + r'\s*\<'),
-         _template + '<>',
-         _header))
-
-
-def FilesBelongToSameModule(filename_cc, filename_h):
-  """Check if these two filenames belong to the same module.
-
-  The concept of a 'module' here is a as follows:
-  foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the
-  same 'module' if they are in the same directory.
-  some/path/public/xyzzy and some/path/internal/xyzzy are also considered
-  to belong to the same module here.
-
-  If the filename_cc contains a longer path than the filename_h, for example,
-  '/absolute/path/to/base/sysinfo.cc', and this file would include
-  'base/sysinfo.h', this function also produces the prefix needed to open the
-  header. This is used by the caller of this function to more robustly open the
-  header file. We don't have access to the real include paths in this context,
-  so we need this guesswork here.
-
-  Known bugs: tools/base/bar.cc and base/bar.h belong to the same module
-  according to this implementation. Because of this, this function gives
-  some false positives. This should be sufficiently rare in practice.
-
-  Args:
-    filename_cc: is the path for the .cc file
-    filename_h: is the path for the header path
-
-  Returns:
-    Tuple with a bool and a string:
-    bool: True if filename_cc and filename_h belong to the same module.
-    string: the additional prefix needed to open the header file.
-  """
-
-  if not filename_cc.endswith('.cc'):
-    return (False, '')
-  filename_cc = filename_cc[:-len('.cc')]
-  if filename_cc.endswith('_unittest'):
-    filename_cc = filename_cc[:-len('_unittest')]
-  elif filename_cc.endswith('_test'):
-    filename_cc = filename_cc[:-len('_test')]
-  filename_cc = filename_cc.replace('/public/', '/')
-  filename_cc = filename_cc.replace('/internal/', '/')
-
-  if not filename_h.endswith('.h'):
-    return (False, '')
-  filename_h = filename_h[:-len('.h')]
-  if filename_h.endswith('-inl'):
-    filename_h = filename_h[:-len('-inl')]
-  filename_h = filename_h.replace('/public/', '/')
-  filename_h = filename_h.replace('/internal/', '/')
-
-  files_belong_to_same_module = filename_cc.endswith(filename_h)
-  common_path = ''
-  if files_belong_to_same_module:
-    common_path = filename_cc[:-len(filename_h)]
-  return files_belong_to_same_module, common_path
-
-
-def UpdateIncludeState(filename, include_state, io=codecs):
-  """Fill up the include_state with new includes found from the file.
-
-  Args:
-    filename: the name of the header to read.
-    include_state: an _IncludeState instance in which the headers are inserted.
-    io: The io factory to use to read the file. Provided for testability.
-
-  Returns:
-    True if a header was successfully added. False otherwise.
-  """
-  headerfile = None
-  try:
-    headerfile = io.open(filename, 'r', 'utf8', 'replace')
-  except IOError:
-    return False
-  linenum = 0
-  for line in headerfile:
-    linenum += 1
-    clean_line = CleanseComments(line)
-    match = _RE_PATTERN_INCLUDE.search(clean_line)
-    if match:
-      include = match.group(2)
-      # The value formatting is cute, but not really used right now.
-      # What matters here is that the key is in include_state.
-      include_state.setdefault(include, '%s:%d' % (filename, linenum))
-  return True
-
-
-def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error,
-                              io=codecs):
-  """Reports for missing stl includes.
-
-  This function will output warnings to make sure you are including the headers
-  necessary for the stl containers and functions that you use. We only give one
-  reason to include a header. For example, if you use both equal_to<> and
-  less<> in a .h file, only one (the latter in the file) of these will be
-  reported as a reason to include the <functional>.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    include_state: An _IncludeState instance.
-    error: The function to call with any errors found.
-    io: The IO factory to use to read the header file. Provided for unittest
-        injection.
-  """
-  required = {}  # A map of header name to linenumber and the template entity.
-                 # Example of required: { '<functional>': (1219, 'less<>') }
-
-  for linenum in xrange(clean_lines.NumLines()):
-    line = clean_lines.elided[linenum]
-    if not line or line[0] == '#':
-      continue
-
-    # String is special -- it is a non-templatized type in STL.
-    matched = _RE_PATTERN_STRING.search(line)
-    if matched:
-      # Don't warn about strings in non-STL namespaces:
-      # (We check only the first match per line; good enough.)
-      prefix = line[:matched.start()]
-      if prefix.endswith('std::') or not prefix.endswith('::'):
-        required['<string>'] = (linenum, 'string')
-
-    for pattern, template, header in _re_pattern_algorithm_header:
-      if pattern.search(line):
-        required[header] = (linenum, template)
-
-    # The following function is just a speed up, no semantics are changed.
-    if not '<' in line:  # Reduces the cpu time usage by skipping lines.
-      continue
-
-    for pattern, template, header in _re_pattern_templates:
-      if pattern.search(line):
-        required[header] = (linenum, template)
-
-  # The policy is that if you #include something in foo.h you don't need to
-  # include it again in foo.cc. Here, we will look at possible includes.
-  # Let's copy the include_state so it is only messed up within this function.
-  include_state = include_state.copy()
-
-  # Did we find the header for this file (if any) and successfully load it?
-  header_found = False
-
-  # Use the absolute path so that matching works properly.
-  abs_filename = FileInfo(filename).FullName()
-
-  # For Emacs's flymake.
-  # If cpplint is invoked from Emacs's flymake, a temporary file is generated
-  # by flymake and that file name might end with '_flymake.cc'. In that case,
-  # restore original file name here so that the corresponding header file can be
-  # found.
-  # e.g. If the file name is 'foo_flymake.cc', we should search for 'foo.h'
-  # instead of 'foo_flymake.h'
-  abs_filename = re.sub(r'_flymake\.cc$', '.cc', abs_filename)
-
-  # include_state is modified during iteration, so we iterate over a copy of
-  # the keys.
-  header_keys = include_state.keys()
-  for header in header_keys:
-    (same_module, common_path) = FilesBelongToSameModule(abs_filename, header)
-    fullpath = common_path + header
-    if same_module and UpdateIncludeState(fullpath, include_state, io):
-      header_found = True
-
-  # If we can't find the header file for a .cc, assume it's because we don't
-  # know where to look. In that case we'll give up as we're not sure they
-  # didn't include it in the .h file.
-  # TODO(unknown): Do a better job of finding .h files so we are confident that
-  # not having the .h file means there isn't one.
-  if filename.endswith('.cc') and not header_found:
-    return
-
-  # All the lines have been processed, report the errors found.
-  for required_header_unstripped in required:
-    template = required[required_header_unstripped][1]
-    if required_header_unstripped.strip('<>"') not in include_state:
-      error(filename, required[required_header_unstripped][0],
-            'build/include_what_you_use', 4,
-            'Add #include ' + required_header_unstripped + ' for ' + template)
-
-
-_RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<')
-
-
-def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error):
-  """Check that make_pair's template arguments are deduced.
-
-  G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are
-  specified explicitly, and such use isn't intended in any case.
-
-  Args:
-    filename: The name of the current file.
-    clean_lines: A CleansedLines instance containing the file.
-    linenum: The number of the line to check.
-    error: The function to call with any errors found.
-  """
-  line = clean_lines.elided[linenum]
-  match = _RE_PATTERN_EXPLICIT_MAKEPAIR.search(line)
-  if match:
-    error(filename, linenum, 'build/explicit_make_pair',
-          4,  # 4 = high confidence
-          'For C++11-compatibility, omit template arguments from make_pair'
-          ' OR use pair directly OR if appropriate, construct a pair directly')
-
-
-def ProcessLine(filename, file_extension, clean_lines, line,
-                include_state, function_state, nesting_state, error,
-                extra_check_functions=[]):
-  """Processes a single line in the file.
-
-  Args:
-    filename: Filename of the file that is being processed.
-    file_extension: The extension (dot not included) of the file.
-    clean_lines: An array of strings, each representing a line of the file,
-                 with comments stripped.
-    line: Number of line being processed.
-    include_state: An _IncludeState instance in which the headers are inserted.
-    function_state: A _FunctionState instance which counts function lines, etc.
-    nesting_state: A _NestingState instance which maintains information about
-                   the current stack of nested blocks being parsed.
-    error: A callable to which errors are reported, which takes 4 arguments:
-           filename, line number, error level, and message
-    extra_check_functions: An array of additional check functions that will be
-                           run on each source line. Each function takes 4
-                           arguments: filename, clean_lines, line, error
-  """
-  raw_lines = clean_lines.raw_lines
-  ParseNolintSuppressions(filename, raw_lines[line], line, error)
-  nesting_state.Update(filename, clean_lines, line, error)
-  if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM:
-    return
-  CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
-  CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
-  CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error)
-  CheckLanguage(filename, clean_lines, line, file_extension, include_state,
-                nesting_state, error)
-  CheckForNonConstReference(filename, clean_lines, line, nesting_state, error)
-  CheckForNonStandardConstructs(filename, clean_lines, line,
-                                nesting_state, error)
-  CheckVlogArguments(filename, clean_lines, line, error)
-  CheckPosixThreading(filename, clean_lines, line, error)
-  CheckInvalidIncrement(filename, clean_lines, line, error)
-  CheckMakePairUsesDeduction(filename, clean_lines, line, error)
-  for check_fn in extra_check_functions:
-    check_fn(filename, clean_lines, line, error)
-
-def ProcessFileData(filename, file_extension, lines, error,
-                    extra_check_functions=[]):
-  """Performs lint checks and reports any errors to the given error function.
-
-  Args:
-    filename: Filename of the file that is being processed.
-    file_extension: The extension (dot not included) of the file.
-    lines: An array of strings, each representing a line of the file, with the
-           last element being empty if the file is terminated with a newline.
-    error: A callable to which errors are reported, which takes 4 arguments:
-           filename, line number, error level, and message
-    extra_check_functions: An array of additional check functions that will be
-                           run on each source line. Each function takes 4
-                           arguments: filename, clean_lines, line, error
-  """
-  lines = (['// marker so line numbers and indices both start at 1'] + lines +
-           ['// marker so line numbers end in a known way'])
-
-  include_state = _IncludeState()
-  function_state = _FunctionState()
-  nesting_state = _NestingState()
-
-  ResetNolintSuppressions()
-
-  CheckForCopyright(filename, lines, error)
-
-  if file_extension == 'h':
-    CheckForHeaderGuard(filename, lines, error)
-
-  RemoveMultiLineComments(filename, lines, error)
-  clean_lines = CleansedLines(lines)
-  for line in xrange(clean_lines.NumLines()):
-    ProcessLine(filename, file_extension, clean_lines, line,
-                include_state, function_state, nesting_state, error,
-                extra_check_functions)
-  nesting_state.CheckCompletedBlocks(filename, error)
-
-  CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error)
-
-  # We check here rather than inside ProcessLine so that we see raw
-  # lines rather than "cleaned" lines.
-  CheckForBadCharacters(filename, lines, error)
-
-  CheckForNewlineAtEOF(filename, lines, error)
-
-def ProcessFile(filename, vlevel, extra_check_functions=[]):
-  """Does google-lint on a single file.
-
-  Args:
-    filename: The name of the file to parse.
-
-    vlevel: The level of errors to report.  Every error of confidence
-    >= verbose_level will be reported.  0 is a good default.
-
-    extra_check_functions: An array of additional check functions that will be
-                           run on each source line. Each function takes 4
-                           arguments: filename, clean_lines, line, error
-  """
-
-  _SetVerboseLevel(vlevel)
-
-  try:
-    # Support the UNIX convention of using "-" for stdin.  Note that
-    # we are not opening the file with universal newline support
-    # (which codecs doesn't support anyway), so the resulting lines do
-    # contain trailing '\r' characters if we are reading a file that
-    # has CRLF endings.
-    # If after the split a trailing '\r' is present, it is removed
-    # below. If it is not expected to be present (i.e. os.linesep !=
-    # '\r\n' as in Windows), a warning is issued below if this file
-    # is processed.
-
-    if filename == '-':
-      lines = codecs.StreamReaderWriter(sys.stdin,
-                                        codecs.getreader('utf8'),
-                                        codecs.getwriter('utf8'),
-                                        'replace').read().split('\n')
-    else:
-      lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
-
-    carriage_return_found = False
-    # Remove trailing '\r'.
-    for linenum in range(len(lines)):
-      if lines[linenum].endswith('\r'):
-        lines[linenum] = lines[linenum].rstrip('\r')
-        carriage_return_found = True
-
-  except IOError:
-    sys.stderr.write(
-        "Skipping input '%s': Can't open for reading\n" % filename)
-    return
-
-  # Note, if no dot is found, this will give the entire filename as the ext.
-  file_extension = filename[filename.rfind('.') + 1:]
-
-  # When reading from stdin, the extension is unknown, so no cpplint tests
-  # should rely on the extension.
-  if filename != '-' and file_extension not in _valid_extensions:
-    sys.stderr.write('Ignoring %s; not a valid file name '
-                     '(%s)\n' % (filename, ', '.join(_valid_extensions)))
-  else:
-    ProcessFileData(filename, file_extension, lines, Error,
-                    extra_check_functions)
-    if carriage_return_found and os.linesep != '\r\n':
-      # Use 0 for linenum since outputting only one error for potentially
-      # several lines.
-      Error(filename, 0, 'whitespace/newline', 1,
-            'One or more unexpected \\r (^M) found;'
-            'better to use only a \\n')
-
-  sys.stderr.write('Done processing %s\n' % filename)
-
-
-def PrintUsage(message):
-  """Prints a brief usage string and exits, optionally with an error message.
-
-  Args:
-    message: The optional error message.
-  """
-  sys.stderr.write(_USAGE)
-  if message:
-    sys.exit('\nFATAL ERROR: ' + message)
-  else:
-    sys.exit(1)
-
-
-def PrintCategories():
-  """Prints a list of all the error-categories used by error messages.
-
-  These are the categories used to filter messages via --filter.
-  """
-  sys.stderr.write(''.join('  %s\n' % cat for cat in _ERROR_CATEGORIES))
-  sys.exit(0)
-
-
-def ParseArguments(args):
-  """Parses the command line arguments.
-
-  This may set the output format and verbosity level as side-effects.
-
-  Args:
-    args: The command line arguments:
-
-  Returns:
-    The list of filenames to lint.
-  """
-  try:
-    (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=',
-                                                 'counting=',
-                                                 'filter=',
-                                                 'root=',
-                                                 'linelength=',
-                                                 'extensions='])
-  except getopt.GetoptError:
-    PrintUsage('Invalid arguments.')
-
-  verbosity = _VerboseLevel()
-  output_format = _OutputFormat()
-  filters = ''
-  counting_style = ''
-
-  for (opt, val) in opts:
-    if opt == '--help':
-      PrintUsage(None)
-    elif opt == '--output':
-      if val not in ('emacs', 'vs7', 'eclipse'):
-        PrintUsage('The only allowed output formats are emacs, vs7 and eclipse.')
-      output_format = val
-    elif opt == '--verbose':
-      verbosity = int(val)
-    elif opt == '--filter':
-      filters = val
-      if not filters:
-        PrintCategories()
-    elif opt == '--counting':
-      if val not in ('total', 'toplevel', 'detailed'):
-        PrintUsage('Valid counting options are total, toplevel, and detailed')
-      counting_style = val
-    elif opt == '--root':
-      global _root
-      _root = val
-    elif opt == '--linelength':
-      global _line_length
-      try:
-          _line_length = int(val)
-      except ValueError:
-          PrintUsage('Line length must be digits.')
-    elif opt == '--extensions':
-      global _valid_extensions
-      try:
-          _valid_extensions = set(val.split(','))
-      except ValueError:
-          PrintUsage('Extensions must be comma separated list.')
-
-  if not filenames:
-    PrintUsage('No files were specified.')
-
-  _SetOutputFormat(output_format)
-  _SetVerboseLevel(verbosity)
-  _SetFilters(filters)
-  _SetCountingStyle(counting_style)
-
-  return filenames
-
-
-def main():
-  filenames = ParseArguments(sys.argv[1:])
-
-  # Change stderr to write with replacement characters so we don't die
-  # if we try to print something containing non-ASCII characters.
-  sys.stderr = codecs.StreamReaderWriter(sys.stderr,
-                                         codecs.getreader('utf8'),
-                                         codecs.getwriter('utf8'),
-                                         'replace')
-
-  _cpplint_state.ResetErrorCounts()
-  for filename in filenames:
-    ProcessFile(filename, _cpplint_state.verbose_level)
-  _cpplint_state.PrintErrorCounts()
-
-  sys.exit(_cpplint_state.error_count > 0)
-
-
-if __name__ == '__main__':
-  main()
diff --git a/src/rocksdb/linters/lint_engine/FacebookFbcodeLintEngine.php b/src/rocksdb/linters/lint_engine/FacebookFbcodeLintEngine.php
deleted file mode 100644
index cb9cf9b..0000000
--- a/src/rocksdb/linters/lint_engine/FacebookFbcodeLintEngine.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-// Copyright 2004-present Facebook.  All rights reserved.
-
-class FacebookFbcodeLintEngine extends ArcanistLintEngine {
-
-  public function buildLinters() {
-    $linters = array();
-    $paths = $this->getPaths();
-
-    // Remove all deleted files, which are not checked by the
-    // following linters.
-    foreach ($paths as $key => $path) {
-      if (!Filesystem::pathExists($this->getFilePathOnDisk($path))) {
-        unset($paths[$key]);
-      }
-    }
-
-    $generated_linter = new ArcanistGeneratedLinter();
-    $linters[] = $generated_linter;
-
-    $nolint_linter = new ArcanistNoLintLinter();
-    $linters[] = $nolint_linter;
-
-    $text_linter = new ArcanistTextLinter();
-    $text_linter->setCustomSeverityMap(array(
-      ArcanistTextLinter::LINT_LINE_WRAP
-        => ArcanistLintSeverity::SEVERITY_ADVICE,
-    ));
-    $linters[] = $text_linter;
-
-    $java_text_linter = new ArcanistTextLinter();
-    $java_text_linter->setMaxLineLength(100);
-    $java_text_linter->setCustomSeverityMap(array(
-      ArcanistTextLinter::LINT_LINE_WRAP
-        => ArcanistLintSeverity::SEVERITY_ADVICE,
-    ));
-    $linters[] = $java_text_linter;
-
-    $pep8_options = $this->getPEP8WithTextOptions().',E302';
-
-    $python_linter = new ArcanistPEP8Linter();
-    $python_linter->setConfig(array('options' => $pep8_options));
-    $linters[] = $python_linter;
-
-    $python_2space_linter = new ArcanistPEP8Linter();
-    $python_2space_linter->setConfig(array('options' => $pep8_options.',E111'));
-    $linters[] = $python_2space_linter;
-
-   // Currently we can't run cpplint in commit hook mode, because it
-    // depends on having access to the working directory.
-    if (!$this->getCommitHookMode()) {
-      $cpp_linters = array();
-      $google_linter = new ArcanistCpplintLinter();
-      $google_linter->setConfig(array(
-        'lint.cpplint.prefix' => '',
-        'lint.cpplint.bin' => 'cpplint',
-      ));
-      $cpp_linters[] = $linters[] = $google_linter;
-      $cpp_linters[] = $linters[] = new FbcodeCppLinter();
-      $cpp_linters[] = $linters[] = new PfffCppLinter();
-    }
-
-    $spelling_linter = new ArcanistSpellingLinter();
-    $linters[] = $spelling_linter;
-
-    foreach ($paths as $path) {
-      $is_text = false;
-
-      $text_extensions = (
-        '/\.('.
-        'cpp|cxx|c|cc|h|hpp|hxx|tcc|'.
-        'py|rb|hs|pl|pm|tw|'.
-        'php|phpt|css|js|'.
-        'java|'.
-        'thrift|'.
-        'lua|'.
-        'siv|'.
-        'txt'.
-        ')$/'
-      );
-      if (preg_match($text_extensions, $path)) {
-        $is_text = true;
-      }
-      if ($is_text) {
-        $nolint_linter->addPath($path);
-
-        $generated_linter->addPath($path);
-        $generated_linter->addData($path, $this->loadData($path));
-
-        if (preg_match('/\.java$/', $path)) {
-          $java_text_linter->addPath($path);
-          $java_text_linter->addData($path, $this->loadData($path));
-        } else {
-          $text_linter->addPath($path);
-          $text_linter->addData($path, $this->loadData($path));
-        }
-
-        $spelling_linter->addPath($path);
-        $spelling_linter->addData($path, $this->loadData($path));
-      }
-      if (preg_match('/\.(cpp|c|cc|cxx|h|hh|hpp|hxx|tcc)$/', $path)) {
-        foreach ($cpp_linters as &$linter) {
-          $linter->addPath($path);
-          $linter->addData($path, $this->loadData($path));
-        }
-      }
-
-      // Match *.py and contbuild config files
-      if (preg_match('/(\.(py|tw|smcprops)|^contbuild\/configs\/[^\/]*)$/',
-                    $path)) {
-        $space_count = 4;
-        $real_path = $this->getFilePathOnDisk($path);
-        $dir = dirname($real_path);
-        do {
-          if (file_exists($dir.'/.python2space')) {
-            $space_count = 2;
-            break;
-          }
-          $dir = dirname($dir);
-        } while ($dir != '/' && $dir != '.');
-
-        if ($space_count == 4) {
-          $cur_path_linter = $python_linter;
-        } else {
-          $cur_path_linter = $python_2space_linter;
-        }
-        $cur_path_linter->addPath($path);
-        $cur_path_linter->addData($path, $this->loadData($path));
-
-        if (preg_match('/\.tw$/', $path)) {
-          $cur_path_linter->setCustomSeverityMap(array(
-            'E251' => ArcanistLintSeverity::SEVERITY_DISABLED,
-          ));
-        }
-      }
-    }
-
-    $name_linter = new ArcanistFilenameLinter();
-    $linters[] = $name_linter;
-    foreach ($paths as $path) {
-      $name_linter->addPath($path);
-    }
-
-    return $linters;
-  }
-
-}
diff --git a/src/rocksdb/m4/libtool.m4 b/src/rocksdb/m4/libtool.m4
deleted file mode 100644
index 828104c..0000000
--- a/src/rocksdb/m4/libtool.m4
+++ /dev/null
@@ -1,8001 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 57 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
-       [m4_default([$3],
-		   [m4_fatal([Libtool version $1 or higher is required],
-		             63)])],
-       [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
-  *\ * | *\	*)
-    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-
-_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
-dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_WITH_SYSROOT])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    _LT_PATH_MAGIC
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PREPARE_SED_QUOTE_VARS
-# --------------------------
-# Define a few sed substitution that help us do robust quoting.
-m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
-[# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-])
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
-              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME.  Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
-    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
-	[m4_ifval([$1], [$1], [$2])])
-    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
-    m4_ifval([$4],
-	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
-    lt_dict_add_subkey([lt_decl_dict], [$2],
-	[tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
-  [0], [m4_fatal([$0: too few arguments: $#])],
-  [1], [m4_fatal([$0: too few arguments: $#: $1])],
-  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
-  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
-  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
-    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
-    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
-     m4_if([$2], [],
-	   m4_quote(lt_decl_varnames),
-	m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
-			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly.  In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
-    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-#    # Some comment about what VAR is for.
-#    visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
-					   [description])))[]dnl
-m4_pushdef([_libtool_name],
-    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
-    [0], [_libtool_name=[$]$1],
-    [1], [_libtool_name=$lt_[]$1],
-    [2], [_libtool_name=$lt_[]$1],
-    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
-    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
-	dnl If the libtool generation code has been placed in $CONFIG_LT,
-	dnl instead of duplicating it all over again into config.status,
-	dnl then we will have config.status run $CONFIG_LT later, so it
-	dnl needs to know what name is stored there:
-        [AC_CONFIG_COMMANDS([libtool],
-            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
-    dnl If the libtool generation code is destined for config.status,
-    dnl expand the accumulated commands and init code now:
-    [AC_CONFIG_COMMANDS([libtool],
-        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-\$[]1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
-# ------------------------------------
-# Generate a child script FILE with all initialization necessary to
-# reuse the environment learned by the parent script, and make the
-# file executable.  If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins.  After this
-# macro, additional text can be appended to FILE to form the body of
-# the child script.  The macro ends with non-zero status if the
-# file could not be fully written (such as if the disk is full).
-m4_ifdef([AS_INIT_GENERATED],
-[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
-[m4_defun([_LT_GENERATED_FILE_INIT],
-[m4_require([AS_PREPARE])]dnl
-[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
-[lt_write_fail=0
-cat >$1 <<_ASEOF || lt_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-$2
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$1 <<\_ASEOF || lt_write_fail=1
-AS_SHELL_SANITIZE
-_AS_PREPARE
-exec AS_MESSAGE_FD>&1
-_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
-m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
-[# Run this file to recreate a libtool stub with the current configuration.])
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec AS_MESSAGE_LOG_FD>>config.log
-{
-  echo
-  AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
-  -h, --help      print this help, then exit
-  -V, --version   print version number, then exit
-  -q, --quiet     do not print progress messages
-  -d, --debug     don't remove temporary files
-
-Report bugs to <bug-libtool at gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2011 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
-  case $[1] in
-    --version | --v* | -V )
-      echo "$lt_cl_version"; exit 0 ;;
-    --help | --h* | -h )
-      echo "$lt_cl_help"; exit 0 ;;
-    --debug | --d* | -d )
-      debug=: ;;
-    --quiet | --q* | --silent | --s* | -q )
-      lt_cl_silent=: ;;
-
-    -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
-    *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
-  esac
-  shift
-done
-
-if $lt_cl_silent; then
-  exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure.  Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
-  lt_config_lt_args="$lt_config_lt_args --quiet"
-exec AS_MESSAGE_LOG_FD>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec AS_MESSAGE_LOG_FD>>config.log
-$lt_cl_success || AS_EXIT(1)
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars.  Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
-  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
-  m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-  _LT_PROG_LTMAIN
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
-     || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_REPLACE_SHELLFNS
-
-   mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
-  [C],			[_LT_LANG(C)],
-  [C++],		[_LT_LANG(CXX)],
-  [Go],			[_LT_LANG(GO)],
-  [Java],		[_LT_LANG(GCJ)],
-  [Fortran 77],		[_LT_LANG(F77)],
-  [Fortran],		[_LT_LANG(FC)],
-  [Windows Resource],	[_LT_LANG(RC)],
-  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
-    [_LT_LANG($1)],
-    [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
-  [LT_SUPPORTED_TAG([$1])dnl
-  m4_append([_LT_TAGS], [$1 ])dnl
-  m4_define([_LT_LANG_]$1[_enabled], [])dnl
-  _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-m4_ifndef([AC_PROG_GO], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-m4_defun([AC_PROG_GO],
-[AC_LANG_PUSH(Go)dnl
-AC_ARG_VAR([GOC],     [Go compiler command])dnl
-AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
-_AC_ARG_VAR_LDFLAGS()dnl
-AC_CHECK_TOOL(GOC, gccgo)
-if test -z "$GOC"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
-  fi
-fi
-if test -z "$GOC"; then
-  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
-fi
-])#m4_defun
-])#m4_ifndef
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
-  [LT_LANG(CXX)],
-  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
-  [LT_LANG(F77)],
-  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
-  [LT_LANG(FC)],
-  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-  [LT_LANG(GCJ)],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-    [LT_LANG(GCJ)],
-    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-      [LT_LANG(GCJ)],
-      [m4_ifdef([AC_PROG_GCJ],
-	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([A][M_PROG_GCJ],
-	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([LT_PROG_GCJ],
-	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([AC_PROG_GO],
-  [LT_LANG(GO)],
-  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
-  [LT_LANG(RC)],
-  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-dnl AC_DEFUN([AC_LIBTOOL_RC], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
-  case $host_os in
-    rhapsody* | darwin*)
-    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
-    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
-    AC_CHECK_TOOL([LIPO], [lipo], [:])
-    AC_CHECK_TOOL([OTOOL], [otool], [:])
-    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
-    _LT_DECL([], [DSYMUTIL], [1],
-      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
-    _LT_DECL([], [NMEDIT], [1],
-      [Tool to change global to local symbols on Mac OS X])
-    _LT_DECL([], [LIPO], [1],
-      [Tool to manipulate fat objects and archives on Mac OS X])
-    _LT_DECL([], [OTOOL], [1],
-      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
-    _LT_DECL([], [OTOOL64], [1],
-      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
-    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
-      [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-	# By default we will add the -single_module flag. You can override
-	# by either setting the environment variable LT_MULTI_MODULE
-	# non-empty at configure time, or by adding -multi_module to the
-	# link flags.
-	rm -rf libconftest.dylib*
-	echo "int foo(void){return 1;}" > conftest.c
-	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
-	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-	# If there is a non-empty error log, and "single_module"
-	# appears in it, assume the flag caused a linker warning
-        if test -s conftest.err && $GREP single_module conftest.err; then
-	  cat conftest.err >&AS_MESSAGE_LOG_FD
-	# Otherwise, if the output was created with a 0 exit code from
-	# the compiler, it worked.
-	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
-	  lt_cv_apple_cc_single_mod=yes
-	else
-	  cat conftest.err >&AS_MESSAGE_LOG_FD
-	fi
-	rm -rf libconftest.dylib*
-	rm -f conftest.*
-      fi])
-
-    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
-      [lt_cv_ld_exported_symbols_list],
-      [lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-	[lt_cv_ld_exported_symbols_list=yes],
-	[lt_cv_ld_exported_symbols_list=no])
-	LDFLAGS="$save_LDFLAGS"
-    ])
-
-    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
-      [lt_cv_ld_force_load=no
-      cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
-      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
-      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
-      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
-      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
-      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
-      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
-      cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
-      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
-      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
-      _lt_result=$?
-      if test -s conftest.err && $GREP force_load conftest.err; then
-	cat conftest.err >&AS_MESSAGE_LOG_FD
-      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
-	lt_cv_ld_force_load=yes
-      else
-	cat conftest.err >&AS_MESSAGE_LOG_FD
-      fi
-        rm -f conftest.err libconftest.a conftest conftest.c
-        rm -rf conftest.dSYM
-    ])
-    case $host_os in
-    rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES([TAG])
-# ---------------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
-  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_automatic, $1)=yes
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
-    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
-                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
-  else
-    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
-  fi
-  _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=func_echo_all
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-    m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
-    fi
-],[])
-  else
-  _LT_TAGVAR(ld_shlibs, $1)=no
-  fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
-# ----------------------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-# Store the results from the different compilers for each TAGNAME.
-# Allow to override them for all tags through lt_cv_aix_libpath.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
-  aix_libpath=$lt_cv_aix_libpath
-else
-  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
-  lt_aix_libpath_sed='[
-      /Import File Strings/,/^$/ {
-	  /^0/ {
-	      s/^0  *\([^ ]*\) *$/\1/
-	      p
-	  }
-      }]'
-  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  # Check for a 64-bit object if we didn't find anything.
-  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  fi],[])
-  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
-  fi
-  ])
-  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
-fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[m4_divert_text([M4SH-INIT], [$1
-])])# _LT_SHELL_INIT
-
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Find how we can fake an echo command that does not interpret backslash.
-# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-AC_MSG_CHECKING([how to print strings])
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
-   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
-  ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-  ECHO='printf %s\n'
-else
-  # Use this function as a fallback that always works.
-  func_fallback_echo ()
-  {
-    eval 'cat <<_LTECHO_EOF
-$[]1
-_LTECHO_EOF'
-  }
-  ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
-    $ECHO "$*" 
-}
-
-case "$ECHO" in
-  printf*) AC_MSG_RESULT([printf]) ;;
-  print*) AC_MSG_RESULT([print -r]) ;;
-  *) AC_MSG_RESULT([cat]) ;;
-esac
-
-m4_ifdef([_AS_DETECT_SUGGESTED],
-[_AS_DETECT_SUGGESTED([
-  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
-    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-    PATH=/empty FPATH=/empty; export PATH FPATH
-    test "X`printf %s $ECHO`" = "X$ECHO" \
-      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
-
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_WITH_SYSROOT
-# ----------------
-AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
-[  --with-sysroot[=DIR] Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).],
-[], [with_sysroot=no])
-
-dnl lt_sysroot will always be passed unquoted.  We quote it here
-dnl in case the user passed a directory name.
-lt_sysroot=
-case ${with_sysroot} in #(
- yes)
-   if test "$GCC" = yes; then
-     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
-   fi
-   ;; #(
- /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
-   ;; #(
- no|'')
-   ;; #(
- *)
-   AC_MSG_RESULT([${with_sysroot}])
-   AC_MSG_ERROR([The sysroot must be an absolute path.])
-   ;;
-esac
-
- AC_MSG_RESULT([${lt_sysroot:-no}])
-_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-  [AS_HELP_STRING([--disable-libtool-lock],
-    [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-	HPUX_IA64_MODE="32"
-	;;
-      *ELF-64*)
-	HPUX_IA64_MODE="64"
-	;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -melf32bsmip"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -melf32bmipn32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -melf64bmip"
-	;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -32"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -n32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -64"
-	  ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_i386_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
-	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
-	    LD="${LD-ld} -m elf32ppclinux"
-	    ;;
-	  s390x-*linux*)
-	    LD="${LD-ld} -m elf_s390"
-	    ;;
-	  sparc64-*linux*)
-	    LD="${LD-ld} -m elf32_sparc"
-	    ;;
-	esac
-	;;
-      *64-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_x86_64_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_x86_64"
-	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
-	    LD="${LD-ld} -m elf64ppc"
-	    ;;
-	  s390*-*linux*|s390*-*tpf*)
-	    LD="${LD-ld} -m elf64_s390"
-	    ;;
-	  sparc*-*linux*)
-	    LD="${LD-ld} -m elf64_sparc"
-	    ;;
-	esac
-	;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*)
-        case $host in
-        i?86-*-solaris*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        sparc*-*-solaris*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-        esac
-        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
-        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD="${LD-ld}_sol2"
-        fi
-        ;;
-      *)
-	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-	  LD="${LD-ld} -64"
-	fi
-	;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_PROG_AR
-# -----------
-m4_defun([_LT_PROG_AR],
-[AC_CHECK_TOOLS(AR, [ar], false)
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
-
-AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
-  [lt_cv_ar_at_file=no
-   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
-     [echo conftest.$ac_objext > conftest.lst
-      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
-      AC_TRY_EVAL([lt_ar_try])
-      if test "$ac_status" -eq 0; then
-	# Ensure the archiver fails upon bogus file names.
-	rm -f conftest.$ac_objext libconftest.a
-	AC_TRY_EVAL([lt_ar_try])
-	if test "$ac_status" -ne 0; then
-          lt_cv_ar_at_file=@
-        fi
-      fi
-      rm -f conftest.* libconftest.a
-     ])
-  ])
-
-if test "x$lt_cv_ar_at_file" = xno; then
-  archiver_list_spec=
-else
-  archiver_list_spec=$lt_cv_ar_at_file
-fi
-_LT_DECL([], [archiver_list_spec], [1],
-  [How to feed a file listing to the archiver])
-])# _LT_PROG_AR
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[_LT_PROG_AR
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
-    [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
-fi
-
-case $host_os in
-  darwin*)
-    lock_old_archive_extraction=yes ;;
-  *)
-    lock_old_archive_extraction=no ;;
-esac
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
-    [Commands used to build an old-style archive])
-_LT_DECL([], [lock_old_archive_extraction], [0],
-    [Whether to use a lock for old archive extraction])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$5], , :, [$5])
-else
-    m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                  [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$4], , :, [$4])
-else
-    m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  mint*)
-    # On MiNT this can take a long time and run out of memory.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  os2*)
-    # The test takes a long time on OS/2.
-    lt_cv_sys_max_cmd_len=8192
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
-	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
-    [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-[#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
-   correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else
-        {
-	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
-          else puts (dlerror ());
-	}
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}]
-_LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-    ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-	  lt_cv_dlopen_self_static, [dnl
-	  _LT_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
-	 [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
-	 [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
-	 [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-	[Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
-         [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
-   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
-    [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
-	[], [
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
-  case $lt_search_path_spec in
-  *\;*)
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
-    ;;
-  *)
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
-    ;;
-  esac
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
-  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
-  # AWK program above erroneously prepends '/' to C:/dos/paths
-  # for these hosts.
-  case $host_os in
-    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
-  esac
-  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[[4-9]]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$cc_basename in
-  yes,*)
-    # gcc
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-m4_if([$1], [],[
-      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    dynamic_linker='Win32 ld.exe'
-    ;;
-
-  *,cl*)
-    # Native MSVC
-    libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
-
-    case $build_os in
-    mingw*)
-      sys_lib_search_path_spec=
-      lt_save_ifs=$IFS
-      IFS=';'
-      for lt_path in $LIB
-      do
-        IFS=$lt_save_ifs
-        # Let DOS variable expansion print the short 8.3 style file name.
-        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
-        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
-      done
-      IFS=$lt_save_ifs
-      # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
-      ;;
-    cygwin*)
-      # Convert to unix form, then to dos form, then back to unix form
-      # but this time dos style (no spaces!) so that the unix form looks
-      # like /cygdrive/c/PROGRA~1:/cygdr...
-      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
-      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
-      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      ;;
-    *)
-      sys_lib_search_path_spec="$LIB"
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      # FIXME: find the short name or the path components, as spaces are
-      # common. (e.g. "Program Files" -> "PROGRA~1")
-      ;;
-    esac
-
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-    dynamic_linker='Win32 link.exe'
-    ;;
-
-  *)
-    # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    dynamic_linker='Win32 ld.exe'
-    ;;
-  esac
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[23]].*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2.*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-haiku*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
-  postinstall_cmds='chmod 555 $lib'
-  # or fails outright, so override atomically:
-  install_override_mode=555
-  ;;
-
-interix[[3-9]]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux # correct to gnu/linux during the next big refactor
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-
-  # Some binutils ld are patched to set DT_RUNPATH
-  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
-    [lt_cv_shlibpath_overrides_runpath=no
-    save_LDFLAGS=$LDFLAGS
-    save_libdir=$libdir
-    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-	 [lt_cv_shlibpath_overrides_runpath=yes])])
-    LDFLAGS=$save_LDFLAGS
-    libdir=$save_libdir
-    ])
-  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
-    [Variables whose values should be saved in libtool wrapper scripts and
-    restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
-    [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
-    [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
-    [[List of archive names.  First name is the real one, the rest are links.
-    The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
-    [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [install_override_mode], [1],
-    [Permission mode override for installation of shared libraries])
-_LT_DECL([], [postinstall_cmds], [2],
-    [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
-    [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
-    [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
-    [[As "finish_cmds", except a single script fragment to be evaled but
-    not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
-    [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
-    [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="m4_if([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-_LT_EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
-	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
-
-AC_ARG_WITH([gnu-ld],
-    [AS_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
-	;;
-      *)
-	test "$with_gnu_ld" != yes && break
-	;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
-      reload_cmds=false
-    fi
-    ;;
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_TAGDECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    # Keep this pattern in sync with the one in func_win32_libid.
-    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc*)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-haiku*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[[3-9]]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-
-file_magic_glob=
-want_nocaseglob=no
-if test "$build" = "$host"; then
-  case $host_os in
-  mingw* | pw32*)
-    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
-      want_nocaseglob=yes
-    else
-      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
-    fi
-    ;;
-  esac
-fi
-
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
-    [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method = "file_magic"])
-_LT_DECL([], [file_magic_glob], [1],
-    [How to find potential files when deplibs_check_method = "file_magic"])
-_LT_DECL([], [want_nocaseglob], [1],
-    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
-	#   nm: unknown option "B" ignored
-	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
-	  lt_cv_path_NM="$tmp_nm -B"
-	  break
-	  ;;
-	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-	  */dev/null*)
-	    lt_cv_path_NM="$tmp_nm -p"
-	    break
-	    ;;
-	  *)
-	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	    continue # so that we can try to find one that supports BSD flags
-	    ;;
-	  esac
-	  ;;
-	esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$DUMPBIN"; then :
-    # Let the user override the test.
-  else
-    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
-    *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
-      ;;
-    *)
-      DUMPBIN=:
-      ;;
-    esac
-  fi
-  AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
-  [lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
-  cat conftest.out >&AS_MESSAGE_LOG_FD
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-# --------------------------------
-# how to determine the name of the shared library
-# associated with a specific link library.
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-m4_require([_LT_DECL_DLLTOOL])
-AC_CACHE_CHECK([how to associate runtime and link libraries],
-lt_cv_sharedlib_from_linklib_cmd,
-[lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
-  case `$DLLTOOL --help 2>&1` in
-  *--identify-strict*)
-    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
-    ;;
-  *)
-    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
-    ;;
-  esac
-  ;;
-*)
-  # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
-  ;;
-esac
-])
-sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
-test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
-_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
-    [Command to associate shared and link libraries])
-])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-
-
-# _LT_PATH_MANIFEST_TOOL
-# ----------------------
-# locate the manifest tool
-m4_defun([_LT_PATH_MANIFEST_TOOL],
-[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
-test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
-  [lt_cv_path_mainfest_tool=no
-  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
-  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
-    lt_cv_path_mainfest_tool=yes
-  fi
-  rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
-  MANIFEST_TOOL=:
-fi
-_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
-])# _LT_PATH_MANIFEST_TOOL
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  case $cc_basename in
-  nvcc*)
-    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
-  esac
-
-  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
-	[Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK ['"\
-"     {last_section=section; section=\$ 3};"\
-"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx]"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<_LT_EOF > conftest.$ac_ext
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
-   relocations are performed -- see ld's documentation on pseudo-relocs.  */
-# define LT@&t at _DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data.  */
-# define LT@&t at _DLSYM_CONST
-#else
-# define LT@&t at _DLSYM_CONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-	  cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-LT@&t at _DLSYM_CONST struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-	  cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_globsym_save_LIBS=$LIBS
-	  lt_globsym_save_CFLAGS=$CFLAGS
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS=$lt_globsym_save_LIBS
-	  CFLAGS=$lt_globsym_save_CFLAGS
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-
-# Response file support.
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-  nm_file_list_spec='@'
-elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
-  nm_file_list_spec='@'
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
-    [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-    [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
-    [lt_cv_sys_global_symbol_to_c_name_address], [1],
-    [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
-    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
-    [Transform the output of nm in a C name address pair when lib prefix is needed])
-_LT_DECL([], [nm_file_list_spec], [1],
-    [Specify filename containing input files for $NM])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-m4_if([$1], [CXX], [
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | cygwin* | os2* | pw32* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    haiku*)
-      # PIC is the default for Haiku.
-      # The "-static" flag exists, but is broken.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)=
-      ;;
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-    *qnx* | *nto*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix[[4-9]]*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	else
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68*)
-	  # Green Hills C++ Compiler
-	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-      mingw* | cygwin* | os2* | pw32* | cegcc*)
-	# This hack is so that the source file can tell whether it is being
-	# built for inclusion in a dll (and should export symbols for example).
-	m4_if([$1], [GCJ], [],
-	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-	;;
-      dgux*)
-	case $cc_basename in
-	  ec++*)
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  ghcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd* | dragonfly*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  aCC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    case $host_cpu in
-	    hppa*64*|ia64*)
-	      # +Z the default
-	      ;;
-	    *)
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	      ;;
-	    esac
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      interix*)
-	# This is c89, which is MS Visual C++ (no shared libs)
-	# Anyone wants to do a port?
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
-	case $cc_basename in
-	  KCC*)
-	    # KAI C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  icpc* )
-	    # Intel C++, used to be incompatible with GCC.
-	    # ICC 10 doesn't accept -KPIC any more.
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  pgCC* | pgcpp*)
-	    # Portland Group C++ compiler
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  cxx*)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
-	    # IBM XL 8.0, 9.0 on PPC and BlueGene
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx*)
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd* | netbsdelf*-gnu)
-	;;
-      *qnx* | *nto*)
-        # QNX uses GNU C++, but need to define -shared option too, otherwise
-        # it will coredump.
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-        ;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    ;;
-	  RCC*)
-	    # Rational C++ 2.4.1
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  cxx*)
-	    # Digital/Compaq C++
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC* | sunCC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	    ;;
-	  gcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.x
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc*)
-	    # Lucid
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC*)
-	    # NonStop-UX NCC 3.20
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      vxworks*)
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    haiku*)
-      # PIC is the default for Haiku.
-      # The "-static" flag exists, but is broken.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)=
-      ;;
-
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	# +Z the default
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-
-    case $cc_basename in
-    nvcc*) # Cuda Compiler Driver 2.2
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
-      fi
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
-	;;
-      nagfor*)
-	# NAG Fortran compiler
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	;;
-      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      xl* | bgxl* | bgf* | mpixl*)
-	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-	;;
-      *)
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
-	  ;;
-	*Sun\ F* | *Sun*Fortran*)
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	  ;;
-	*Sun\ C*)
-	  # Sun C 5.9
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	  ;;
-        *Intel*\ [[CF]]*Compiler*)
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	  ;;
-	*Portland\ Group*)
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  ;;
-	esac
-	;;
-      esac
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    rdos*)
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-
-AC_CACHE_CHECK([for $compiler option to produce PIC],
-  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
-    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
-    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
-	[Additional compiler flags for building library objects])
-
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-	[How to pass a linker flag through the compiler])
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
-	[Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  case $host_os in
-  aix[[4-9]]*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    # Also, AIX nm treats weak defined symbols like other global defined
-    # symbols, whereas GNU nm marks them as "W".
-    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-    ;;
-  cygwin* | mingw* | cegcc*)
-    case $cc_basename in
-    cl*)
-      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-      ;;
-    *)
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
-      ;;
-    esac
-    ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
-  *)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-    ;;
-  esac
-], [
-  runpath_var=
-  _LT_TAGVAR(allow_undefined_flag, $1)=
-  _LT_TAGVAR(always_export_symbols, $1)=no
-  _LT_TAGVAR(archive_cmds, $1)=
-  _LT_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_TAGVAR(compiler_needs_object, $1)=no
-  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(hardcode_automatic, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
-  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(inherit_rpath, $1)=no
-  _LT_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_TAGVAR(module_cmds, $1)=
-  _LT_TAGVAR(module_expsym_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
-  esac
-
-  _LT_TAGVAR(ld_shlibs, $1)=yes
-
-  # On some targets, GNU ld is compatible enough with the native linker
-  # that we're better off using the native interface for both.
-  lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
-    case $host_os in
-      aix*)
-	# The AIX port of GNU ld has always aspired to compatibility
-	# with the native linker.  However, as the warning in the GNU ld
-	# block says, versions before 2.19.5* couldn't really create working
-	# shared libraries, regardless of the interface used.
-	case `$LD -v 2>&1` in
-	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
-	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
-	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
-	  *)
-	    lt_use_gnu_ld_interface=yes
-	    ;;
-	esac
-	;;
-      *)
-	lt_use_gnu_ld_interface=yes
-	;;
-    esac
-  fi
-
-  if test "$lt_use_gnu_ld_interface" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *GNU\ gold*) supports_anon_versioning=yes ;;
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[[3-9]]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.19, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to install binutils
-*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
-*** You will then need to restart the configuration process.
-
-_LT_EOF
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=no
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
-
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    haiku*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    interix[[3-9]]*)
-      _LT_TAGVAR(hardcode_direct, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-	case $cc_basename in
-	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
-	esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
-      then
-	tmp_addflag=' $pic_flag'
-	tmp_sharedflag='-shared'
-	case $cc_basename,$host_cpu in
-        pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95* | pgfortran*)
-					# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	lf95*)				# Lahey Fortran 8.1
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
-	  tmp_sharedflag='-qmkshrobj'
-	  tmp_addflag= ;;
-	nvcc*)	# Cuda Compiler Driver 2.2
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-	  _LT_TAGVAR(compiler_needs_object, $1)=yes
-	  ;;
-	esac
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-	  _LT_TAGVAR(compiler_needs_object, $1)=yes
-	  tmp_sharedflag='-G' ;;
-	*Sun\ F*)			# Sun Fortran 8.3
-	  tmp_sharedflag='-G' ;;
-	esac
-	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-        if test "x$supports_anon_versioning" = xyes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
-
-	case $cc_basename in
-	xlf* | bgf* | bgxlf* | mpixlf*)
-	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-	  fi
-	  ;;
-	esac
-      else
-        _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-	;;
-	*)
-	  # For security reasons, it is highly recommended that you always
-	  # use absolute paths for naming shared libraries, and exclude the
-	  # DT_RUNPATH tag from executables and libraries.  But doing so
-	  # requires that you compile everything twice, which is a pain.
-	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  else
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	  fi
-	;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	# Also, AIX nm treats weak defined symbols like other global
-	# defined symbols, whereas GNU nm marks them as "W".
-	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
-
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-	    aix_use_runtimelinking=yes
-	    break
-	  fi
-	  done
-	  ;;
-	esac
-
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_TAGVAR(archive_cmds, $1)=''
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[[012]]|aix4.[[012]].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	  # We have reworked collect2
-	  :
-	  else
-	  # We have old collect2
-	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-	_LT_TAGVAR(link_all_deplibs, $1)=no
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
-
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-	if test "$host_cpu" = ia64; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an
-	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX([$1])
-	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  if test "$with_gnu_ld" = yes; then
-	    # We only use this code for GNU lds that support --whole-archive.
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	  else
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	  fi
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    bsdi[[45]]*)
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      case $cc_basename in
-      cl*)
-	# Native MSVC
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	_LT_TAGVAR(always_export_symbols, $1)=yes
-	_LT_TAGVAR(file_list_spec, $1)='@'
-	# Tell ltmain to make .lib files, not .a files.
-	libext=lib
-	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=".dll"
-	# FIXME: Setting linknames here is a bad hack.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-	  else
-	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-	  fi~
-	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	  linknames='
-	# The linker will not automatically build a static lib if we build a DLL.
-	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-	# Don't use ranlib
-	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
-	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-	  lt_tool_outputfile="@TOOL_OUTPUT@"~
-	  case $lt_outputfile in
-	    *.exe|*.EXE) ;;
-	    *)
-	      lt_outputfile="$lt_outputfile.exe"
-	      lt_tool_outputfile="$lt_tool_outputfile.exe"
-	      ;;
-	  esac~
-	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	    $RM "$lt_outputfile.manifest";
-	  fi'
-	;;
-      *)
-	# Assume MSVC wrapper
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Tell ltmain to make .lib files, not .a files.
-	libext=lib
-	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=".dll"
-	# FIXME: Setting linknames here is a bad hack.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
-	# The linker will automatically build a .lib file if we build a DLL.
-	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-	# FIXME: Should let the user specify the lib program.
-	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-	;;
-      esac
-      ;;
-
-    darwin* | rhapsody*)
-      _LT_DARWIN_LINKER_FEATURES($1)
-      ;;
-
-    dgux*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2.*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_TAGVAR(hardcode_direct, $1)=yes
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	_LT_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	m4_if($1, [], [
-	  # Older versions of the 11.00 compiler do not understand -b yet
-	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
-	  _LT_LINKER_OPTION([if $CC understands -b],
-	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
-	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
-	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
-	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  _LT_TAGVAR(hardcode_direct, $1)=no
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  ;;
-	*)
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	  ;;
-	esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	# Try to use the -exported_symbol ld option, if it does not
-	# work, assume that -exports_file does not work either and
-	# implicitly export all symbols.
-	# This should be the same for all languages, so no per-tag cache variable.
-	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
-	  [lt_cv_irix_exported_symbol],
-	  [save_LDFLAGS="$LDFLAGS"
-	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-	   AC_LINK_IFELSE(
-	     [AC_LANG_SOURCE(
-	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
-			      [C++], [[int foo (void) { return 0; }]],
-			      [Fortran 77], [[
-      subroutine foo
-      end]],
-			      [Fortran], [[
-      subroutine foo
-      end]])])],
-	      [lt_cv_irix_exported_symbol=yes],
-	      [lt_cv_irix_exported_symbol=no])
-           LDFLAGS="$save_LDFLAGS"])
-	if test "$lt_cv_irix_exported_symbol" = yes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-	fi
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(inherit_rpath, $1)=yes
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *nto* | *qnx*)
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-	_LT_TAGVAR(hardcode_direct, $1)=yes
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	else
-	  case $host_os in
-	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	     ;;
-	   *)
-	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	     ;;
-	  esac
-	fi
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    os2*)
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
-	# Both c and cxx compiler support -rpath directly
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-	case `$CC -V 2>&1` in
-	*"Compilers 5.0"*)
-	  wlarc=''
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-	  ;;
-	*)
-	  wlarc='${wl}'
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-	  ;;
-	esac
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
-	# but is careful enough not to reorder.
-	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	else
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-	fi
-	;;
-      esac
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-	sni)
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-	  _LT_TAGVAR(hardcode_direct, $1)=no
-        ;;
-	motorola)
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
-	;;
-      esac
-    fi
-  fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
-    [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
-	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
-	[$RM conftest*
-	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-	  soname=conftest
-	  lib=conftest
-	  libobjs=conftest.$ac_objext
-	  deplibs=
-	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-	  compiler_flags=-v
-	  linker_flags=-v
-	  verstring=
-	  output_objdir=.
-	  libname=conftest
-	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-	  _LT_TAGVAR(allow_undefined_flag, $1)=
-	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-	  then
-	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	  else
-	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  fi
-	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-	else
-	  cat conftest.err 1>&5
-	fi
-	$RM conftest*
-	])
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
-    [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
-    [enable_shared_with_static_runtimes], [0],
-    [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
-    [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
-    [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
-    [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
-    [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
-    [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
-    [Commands used to build a loadable module if different from building
-    a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
-    [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
-    [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
-    [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
-    [Flag to hardcode $libdir into a binary during linking.
-    This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
-    [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
-    library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
-    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
-    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
-    [Set to "yes" if building a shared library automatically hardcodes DIR
-    into the library and all subsequent libraries and executables linked
-    against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
-    [Set to yes if linker adds runtime paths of dependent libraries
-    to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
-    [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [always_export_symbols], [0],
-    [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
-    [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
-    [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
-    [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
-    [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [postlink_cmds], [2],
-    [Commands necessary for finishing linking programs])
-_LT_TAGDECL([], [file_list_spec], [1],
-    [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl    [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_SYS_DYNAMIC_LINKER($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-  LT_SYS_DLOPEN_SELF
-  _LT_CMD_STRIPLIB
-
-  # Report which library types will actually be built
-  AC_MSG_CHECKING([if libtool supports shared libraries])
-  AC_MSG_RESULT([$can_build_shared])
-
-  AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
-
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-
-  aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  AC_MSG_RESULT([$enable_shared])
-
-  AC_MSG_CHECKING([whether to build static libraries])
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  AC_MSG_RESULT([$enable_static])
-
-  _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="int some_variable = 0;"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
-  lt_save_CFLAGS=$CFLAGS
-  lt_save_LD=$LD
-  lt_save_GCC=$GCC
-  GCC=$GXX
-  lt_save_with_gnu_ld=$with_gnu_ld
-  lt_save_path_LD=$lt_cv_path_LD
-  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-  else
-    $as_unset lt_cv_prog_gnu_ld
-  fi
-  if test -n "${lt_cv_path_LDCXX+set}"; then
-    lt_cv_path_LD=$lt_cv_path_LDCXX
-  else
-    $as_unset lt_cv_path_LD
-  fi
-  test -z "${LDCXX+set}" || LD=$LDCXX
-  CC=${CXX-"c++"}
-  CFLAGS=$CXXFLAGS
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    # We don't want -fno-exception when compiling C++ code, so set the
-    # no_builtin_flag separately
-    if test "$GXX" = yes; then
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-    else
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-    fi
-
-    if test "$GXX" = yes; then
-      # Set up default GNU C++ configuration
-
-      LT_PATH_LD
-
-      # Check if GNU C++ uses GNU ld as the underlying linker, since the
-      # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-        # If archive_cmds runs LD, not CC, wlarc should be empty
-        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-        #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
-
-        # ancient GNU ld didn't support --whole-archive et. al.
-        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
-	  $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-        else
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=
-        fi
-      else
-        with_gnu_ld=no
-        wlarc=
-
-        # A generic and very simple default shared library creation
-        # command for GNU C++ for the case where it uses the native
-        # linker, instead of GNU ld.  If possible, this setting should
-        # overridden to take advantage of the native linker features on
-        # the platform it is being used on.
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      fi
-
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
-    else
-      GXX=no
-      with_gnu_ld=no
-      wlarc=
-    fi
-
-    # PORTME: fill in a description of your system's C++ link characteristics
-    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-    _LT_TAGVAR(ld_shlibs, $1)=yes
-    case $host_os in
-      aix3*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-      aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
-          # On IA64, the linker does run time linking by default, so we don't
-          # have to do anything special.
-          aix_use_runtimelinking=no
-          exp_sym_flag='-Bexport'
-          no_entry_flag=""
-        else
-          aix_use_runtimelinking=no
-
-          # Test if we are trying to use run time linking or normal
-          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
-          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-	    for ld_flag in $LDFLAGS; do
-	      case $ld_flag in
-	      *-brtl*)
-	        aix_use_runtimelinking=yes
-	        break
-	        ;;
-	      esac
-	    done
-	    ;;
-          esac
-
-          exp_sym_flag='-bexport'
-          no_entry_flag='-bnoentry'
-        fi
-
-        # When large executables or shared objects are built, AIX ld can
-        # have problems creating the table of contents.  If linking a library
-        # or program results in "error TOC overflow" add -mminimal-toc to
-        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-        _LT_TAGVAR(archive_cmds, $1)=''
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-        if test "$GXX" = yes; then
-          case $host_os in aix4.[[012]]|aix4.[[012]].*)
-          # We only want to do this on AIX 4.2 and lower, the check
-          # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	    # We have reworked collect2
-	    :
-	  else
-	    # We have old collect2
-	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
-	    # It fails to find uninstalled libraries when the uninstalled
-	    # path is not listed in the libpath.  Setting hardcode_minus_L
-	    # to unsupported forces relinking
-	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-          esac
-          shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
-	  fi
-        else
-          # not using gcc
-          if test "$host_cpu" = ia64; then
-	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	  # chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-          else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
-	    else
-	      shared_flag='${wl}-bM:SRE'
-	    fi
-          fi
-        fi
-
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-        # It seems that -bexpall does not export symbols beginning with
-        # underscore (_), so it is better to generate a list of symbols to
-	# export.
-        _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
-          # Warning - without using the other runtime loading flags (-brtl),
-          # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-          # Determine the default libpath from the value encoded in an empty
-          # executable.
-          _LT_SYS_MODULE_PATH_AIX([$1])
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-          if test "$host_cpu" = ia64; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-          else
-	    # Determine the default libpath from the value encoded in an
-	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX([$1])
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	    # Warning - without using the other run time loading flags,
-	    # -berok will link without error, but may produce a broken library.
-	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    if test "$with_gnu_ld" = yes; then
-	      # We only use this code for GNU lds that support --whole-archive.
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	    else
-	      # Exported symbols can be pulled into shared objects from archives
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	    fi
-	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-          fi
-        fi
-        ;;
-
-      beos*)
-	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	  # support --undefined.  This deserves some investigation.  FIXME
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	else
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-
-      chorus*)
-        case $cc_basename in
-          *)
-	  # FIXME: insert proper C++ library support
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	  ;;
-        esac
-        ;;
-
-      cygwin* | mingw* | pw32* | cegcc*)
-	case $GXX,$cc_basename in
-	,cl* | no,cl*)
-	  # Native MSVC
-	  # hardcode_libdir_flag_spec is actually meaningless, as there is
-	  # no search path for DLLs.
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	  _LT_TAGVAR(always_export_symbols, $1)=yes
-	  _LT_TAGVAR(file_list_spec, $1)='@'
-	  # Tell ltmain to make .lib files, not .a files.
-	  libext=lib
-	  # Tell ltmain to make .dll files, not .so files.
-	  shrext_cmds=".dll"
-	  # FIXME: Setting linknames here is a bad hack.
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-	    else
-	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-	    fi~
-	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	    linknames='
-	  # The linker will not automatically build a static lib if we build a DLL.
-	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-	  # Don't use ranlib
-	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
-	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-	    lt_tool_outputfile="@TOOL_OUTPUT@"~
-	    case $lt_outputfile in
-	      *.exe|*.EXE) ;;
-	      *)
-		lt_outputfile="$lt_outputfile.exe"
-		lt_tool_outputfile="$lt_tool_outputfile.exe"
-		;;
-	    esac~
-	    func_to_tool_file "$lt_outputfile"~
-	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	      $RM "$lt_outputfile.manifest";
-	    fi'
-	  ;;
-	*)
-	  # g++
-	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-	  # as there is no search path for DLLs.
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	  _LT_TAGVAR(always_export_symbols, $1)=no
-	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	    # If the export-symbols file already is a .def file (1st line
-	    # is EXPORTS), use it as is; otherwise, prepend...
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	      cp $export_symbols $output_objdir/$soname.def;
-	    else
-	      echo EXPORTS > $output_objdir/$soname.def;
-	      cat $export_symbols >> $output_objdir/$soname.def;
-	    fi~
-	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	  else
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	  fi
-	  ;;
-	esac
-	;;
-      darwin* | rhapsody*)
-        _LT_DARWIN_LINKER_FEATURES($1)
-	;;
-
-      dgux*)
-        case $cc_basename in
-          ec++*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          ghcx*)
-	    # Green Hills C++ Compiler
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      freebsd2.*)
-        # C++ shared libraries reported to be fairly broken before
-	# switch to ELF
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      freebsd-elf*)
-        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        ;;
-
-      freebsd* | dragonfly*)
-        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-        # conventions
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-        ;;
-
-      gnu*)
-        ;;
-
-      haiku*)
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        ;;
-
-      hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-				             # but as the default
-				             # location of the library.
-
-        case $cc_basename in
-          CC*)
-            # FIXME: insert proper C++ library support
-            _LT_TAGVAR(ld_shlibs, $1)=no
-            ;;
-          aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            # Commands to make compiler produce verbose output that lists
-            # what "hidden" libraries, object files and flags are used when
-            # linking a shared library.
-            #
-            # There doesn't appear to be a way to prevent this compiler from
-            # explicitly linking system object files so we need to strip them
-            # from the output so that they don't get included in the library
-            # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-            ;;
-          *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            else
-              # FIXME: insert proper C++ library support
-              _LT_TAGVAR(ld_shlibs, $1)=no
-            fi
-            ;;
-        esac
-        ;;
-
-      hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-          case $host_cpu in
-            hppa*64*|ia64*)
-              ;;
-            *)
-	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-              ;;
-          esac
-        fi
-        case $host_cpu in
-          hppa*64*|ia64*)
-            _LT_TAGVAR(hardcode_direct, $1)=no
-            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-            ;;
-          *)
-            _LT_TAGVAR(hardcode_direct, $1)=yes
-            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					         # but as the default
-					         # location of the library.
-            ;;
-        esac
-
-        case $cc_basename in
-          CC*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          aCC*)
-	    case $host_cpu in
-	      hppa*64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	      ia64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	      *)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	    esac
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-	    ;;
-          *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
-	        case $host_cpu in
-	          hppa*64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	        esac
-	      fi
-	    else
-	      # FIXME: insert proper C++ library support
-	      _LT_TAGVAR(ld_shlibs, $1)=no
-	    fi
-	    ;;
-        esac
-        ;;
-
-      interix[[3-9]]*)
-	_LT_TAGVAR(hardcode_direct, $1)=no
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-	# Instead, shared libraries are loaded at an image base (0x10000000 by
-	# default) and relocated if they conflict, which is a slow very memory
-	# consuming and fragmenting process.  To avoid this, we pick a random,
-	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	;;
-      irix5* | irix6*)
-        case $cc_basename in
-          CC*)
-	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	    # necessary to make sure instantiated templates are included
-	    # in the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	    ;;
-          *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
-	      fi
-	    fi
-	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-	    ;;
-        esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(inherit_rpath, $1)=yes
-        ;;
-
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
-        case $cc_basename in
-          KCC*)
-	    # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	    # KCC will only create a shared library if the output file
-	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
-	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	    ;;
-	  icpc* | ecpc* )
-	    # Intel C++
-	    with_gnu_ld=yes
-	    # version 8.0 and above of icpc choke on multiply defined symbols
-	    # if we add $predep_objects and $postdep_objects, however 7.1 and
-	    # earlier do not add the objects themselves.
-	    case `$CC -V 2>&1` in
-	      *"Version 7."*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-		;;
-	      *)  # Version 8.0 or newer
-	        tmp_idyn=
-	        case $host_cpu in
-		  ia64*) tmp_idyn=' -i_dynamic';;
-		esac
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-		;;
-	    esac
-	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	    ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
-	    case `$CC -V` in
-	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
-	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
-	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-		$RANLIB $oldlib'
-	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-	      ;;
-	    *) # Version 6 and above use weak symbols
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-	      ;;
-	    esac
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-            ;;
-	  cxx*)
-	    # Compaq C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-	    runpath_var=LD_RUN_PATH
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
-	    ;;
-	  xl* | mpixl* | bgxl*)
-	    # IBM XL 8.0 on PPC, with GNU ld
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	    fi
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-	      _LT_TAGVAR(compiler_needs_object, $1)=yes
-
-	      # Not sure whether something based on
-	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
-	      # would be better.
-	      output_verbose_link_cmd='func_echo_all'
-
-	      # Archives containing C++ object files must be created using
-	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	      # necessary to make sure instantiated templates are included
-	      # in the archive.
-	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-
-      lynxos*)
-        # FIXME: insert proper C++ library support
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      m88k*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      mvs*)
-        case $cc_basename in
-          cxx*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-	  *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-	esac
-	;;
-
-      netbsd*)
-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-	  wlarc=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	fi
-	# Workaround some broken pre-1.5 toolchains
-	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-	;;
-
-      *nto* | *qnx*)
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-	;;
-
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      openbsd*)
-	if test -f /usr/libexec/ld.so; then
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	  fi
-	  output_verbose_link_cmd=func_echo_all
-	else
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-
-      osf3* | osf4* | osf5*)
-        case $cc_basename in
-          KCC*)
-	    # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	    # KCC will only create a shared library if the output file
-	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
-	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Archives containing C++ object files must be created using
-	    # the KAI C++ compiler.
-	    case $host in
-	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
-	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
-	    esac
-	    ;;
-          RCC*)
-	    # Rational C++ 2.4.1
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          cxx*)
-	    case $host in
-	      osf3*)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-		;;
-	      *)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-		;;
-	    esac
-
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-	    ;;
-	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	      case $host in
-	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-		  ;;
-	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-		  ;;
-	      esac
-
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	      # Commands to make compiler produce verbose output that lists
-	      # what "hidden" libraries, object files and flags are used when
-	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
-	    else
-	      # FIXME: insert proper C++ library support
-	      _LT_TAGVAR(ld_shlibs, $1)=no
-	    fi
-	    ;;
-        esac
-        ;;
-
-      psos*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      sunos4*)
-        case $cc_basename in
-          CC*)
-	    # Sun C++ 4.x
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          lcc*)
-	    # Lucid
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      solaris*)
-        case $cc_basename in
-          CC* | sunCC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
-	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	    case $host_os in
-	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-	      *)
-		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
-	        # Supported since Solaris 2.6 (maybe 2.5.1?)
-		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-	        ;;
-	    esac
-	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-
-	    output_verbose_link_cmd='func_echo_all'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	    # necessary to make sure instantiated templates are included
-	    # in the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	    ;;
-          gcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-	    # The C++ compiler must be used to create the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	    ;;
-          *)
-	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	        # Commands to make compiler produce verbose output that lists
-	        # what "hidden" libraries, object files and flags are used when
-	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
-	        # platform.
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	        # Commands to make compiler produce verbose output that lists
-	        # what "hidden" libraries, object files and flags are used when
-	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-	      fi
-
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	      case $host_os in
-		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-		*)
-		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-		  ;;
-	      esac
-	    fi
-	    ;;
-        esac
-        ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      case $cc_basename in
-        CC*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-      esac
-      ;;
-
-      sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
-	# link with -lc, and that would cause any symbols used from libc to
-	# always be unresolved, which means just about no library would
-	# ever link correctly.  If we're not using GNU ld we use -z text
-	# though, which does catch some bad symbols but isn't as heavy-handed
-	# as -z defs.
-	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-	_LT_TAGVAR(link_all_deplibs, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-	runpath_var='LD_RUN_PATH'
-
-	case $cc_basename in
-          CC*)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
-	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
-	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
-	      '"$_LT_TAGVAR(reload_cmds, $1)"
-	    ;;
-	  *)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    ;;
-	esac
-      ;;
-
-      tandem*)
-        case $cc_basename in
-          NCC*)
-	    # NonStop-UX NCC 3.20
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      vxworks*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      *)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-    esac
-
-    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  CC=$lt_save_CC
-  CFLAGS=$lt_save_CFLAGS
-  LDCXX=$LD
-  LD=$lt_save_LD
-  GCC=$lt_save_GCC
-  with_gnu_ld=$lt_save_with_gnu_ld
-  lt_cv_path_LDCXX=$lt_cv_path_LD
-  lt_cv_path_LD=$lt_save_path_LD
-  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_FUNC_STRIPNAME_CNF
-# ----------------------
-# func_stripname_cnf prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-#
-# This function is identical to the (non-XSI) version of func_stripname,
-# except this one can be used by m4 code that may be executed by configure,
-# rather than the libtool script.
-m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
-AC_REQUIRE([_LT_DECL_SED])
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
-func_stripname_cnf ()
-{
-  case ${2} in
-  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-  esac
-} # func_stripname_cnf
-])# _LT_FUNC_STRIPNAME_CNF
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-_LT_EOF
-], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
-package foo
-func foo() {
-}
-_LT_EOF
-])
-
-_lt_libdeps_save_CFLAGS=$CFLAGS
-case "$CC $CFLAGS " in #(
-*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
-*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
-*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
-esac
-
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  for p in `eval "$output_verbose_link_cmd"`; do
-    case ${prev}${p} in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
-	 prev=$p
-	 continue
-       fi
-
-       # Expand the sysroot to ease extracting the directories later.
-       if test -z "$prev"; then
-         case $p in
-         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
-         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
-         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
-         esac
-       fi
-       case $p in
-       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
-       esac
-       if test "$pre_test_object_deps_done" = no; then
-	 case ${prev} in
-	 -L | -R)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       prev=
-       ;;
-
-    *.lto.$objext) ;; # Ignore GCC LTO objects
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-	   _LT_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-	   _LT_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-CFLAGS=$_lt_libdeps_save_CFLAGS
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_TAGVAR(predep_objects,$1)=
-  _LT_TAGVAR(postdep_objects,$1)=
-  _LT_TAGVAR(postdeps,$1)=
-  ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
-    [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
-    [Dependencies to place before and after the objects being linked to
-    create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
-    [The library search path used internally by the compiler when linking
-    a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  lt_save_CFLAGS=$CFLAGS
-  CC=${F77-"f77"}
-  CFLAGS=$FFLAGS
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-  GCC=$G77
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
-	fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-  CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_LANG_PUSH(Fortran)
-
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  lt_save_CFLAGS=$CFLAGS
-  CC=${FC-"f95"}
-  CFLAGS=$FCFLAGS
-  compiler=$CC
-  GCC=$ac_cv_fc_compiler_gnu
-
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
-	fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC=$lt_save_CC
-  CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-CFLAGS=$GCJFLAGS
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_GO_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Go compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GO_CONFIG],
-[AC_REQUIRE([LT_PROG_GO])dnl
-AC_LANG_SAVE
-
-# Source file extension for Go test sources.
-ac_ext=go
-
-# Object file extension for compiled Go test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="package main; func main() { }"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='package main; func main() { }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GOC-"gccgo"}
-CFLAGS=$GOFLAGS
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# Go did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_GO_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-CFLAGS=
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
-  :
-  _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
-  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
-    [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-      AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_GO
-# ----------
-AC_DEFUN([LT_PROG_GO],
-[AC_CHECK_TOOL(GOC, gccgo,)
-])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-# _LT_DECL_DLLTOOL
-# ----------------
-# Ensure DLLTOOL variable is set.
-m4_defun([_LT_DECL_DLLTOOL],
-[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
-AC_SUBST([DLLTOOL])
-])
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_FUNCTION_REPLACE],
-[dnl {
-sed -e '/^$1 ()$/,/^} # $1 /c\
-$1 ()\
-{\
-m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
-} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-])
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-m4_defun([_LT_PROG_REPLACE_SHELLFNS],
-[if test x"$xsi_shell" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
-    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-    # positional parameters, so assign one to ordinary parameter first.
-    func_stripname_result=${3}
-    func_stripname_result=${func_stripname_result#"${1}"}
-    func_stripname_result=${func_stripname_result%"${2}"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
-    func_split_long_opt_name=${1%%=*}
-    func_split_long_opt_arg=${1#*=}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
-    func_split_short_opt_arg=${1#??}
-    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
-    case ${1} in
-      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-      *)    func_lo2o_result=${1} ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
-
-  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
-
-  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
-    func_quote_for_eval "${2}"
-dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
-    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
-fi
-])
-
-# _LT_PATH_CONVERSION_FUNCTIONS
-# -----------------------------
-# Determine which file name conversion functions should be used by
-# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
-# for certain cross-compile configurations and native mingw.
-m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_MSG_CHECKING([how to convert $build file names to $host format])
-AC_CACHE_VAL(lt_cv_to_host_file_cmd,
-[case $host in
-  *-*-mingw* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
-        ;;
-      *-*-cygwin* )
-        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
-        ;;
-      * ) # otherwise, assume *nix
-        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
-        ;;
-    esac
-    ;;
-  *-*-cygwin* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
-        ;;
-      *-*-cygwin* )
-        lt_cv_to_host_file_cmd=func_convert_file_noop
-        ;;
-      * ) # otherwise, assume *nix
-        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
-        ;;
-    esac
-    ;;
-  * ) # unhandled hosts (and "normal" native builds)
-    lt_cv_to_host_file_cmd=func_convert_file_noop
-    ;;
-esac
-])
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
-_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
-         [0], [convert $build file names to $host format])dnl
-
-AC_MSG_CHECKING([how to convert $build file names to toolchain format])
-AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
-[#assume ordinary cross tools, or native build.
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-case $host in
-  *-*-mingw* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
-        ;;
-    esac
-    ;;
-esac
-])
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
-_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
-         [0], [convert $build files to toolchain format])dnl
-])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/src/rocksdb/m4/ltoptions.m4 b/src/rocksdb/m4/ltoptions.m4
deleted file mode 100644
index 5d9acd8..0000000
--- a/src/rocksdb/m4/ltoptions.m4
+++ /dev/null
@@ -1,384 +0,0 @@
-# Helper functions for option handling.                    -*- Autoconf -*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
-#   Inc.
-#   Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 7 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
-        _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
-		      [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME.  If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-    [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
-  dnl
-  dnl Simply set some default values (i.e off) if boolean options were not
-  dnl specified:
-  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
-  ])
-  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
-  ])
-  dnl
-  dnl If no reference was made to various pairs of opposing options, then
-  dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
-  dnl archives by default:
-  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
-  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-  		   [_LT_ENABLE_FAST_INSTALL])
-  ])
-])# _LT_SET_OPTIONS
-
-
-## --------------------------------- ##
-## Macros to handle LT_INIT options. ##
-## --------------------------------- ##
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [1], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
-    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
-    _LT_DECL([build_libtool_libs], [enable_shared], [0],
-	[Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
-    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
-    _LT_DECL([build_old_libs], [enable_static], [0],
-	[Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
-    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
-	 [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [lt_p=${PACKAGE-default}
-    case $withval in
-    yes|no) pic_mode=$withval ;;
-    *)
-      pic_mode=default
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for lt_pkg in $withval; do
-	IFS="$lt_save_ifs"
-	if test "X$lt_pkg" = "X$lt_p"; then
-	  pic_mode=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-## ----------------- ##
-## LTDL_INIT Options ##
-## ----------------- ##
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
-		 [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
-		 [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
-		 [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
-		 [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
-		 [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/src/rocksdb/m4/ltsugar.m4 b/src/rocksdb/m4/ltsugar.m4
deleted file mode 100644
index 9000a05..0000000
--- a/src/rocksdb/m4/ltsugar.m4
+++ /dev/null
@@ -1,123 +0,0 @@
-# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
-       [$#], [2], [[$2]],
-       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
-       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
-       [$#], 1, [],
-       [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
-	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
-       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
-	     [m4_foreach([_Lt_suffix],
-		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
-	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
-	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
-		 [lt_append([$1], [$2], [$3])$4],
-		 [$5])],
-	  [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
-	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
-    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
-	[$5],
-    [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
-  [lt_join(m4_quote(m4_default([$4], [[, ]])),
-           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
-		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
diff --git a/src/rocksdb/m4/ltversion.m4 b/src/rocksdb/m4/ltversion.m4
deleted file mode 100644
index 07a8602..0000000
--- a/src/rocksdb/m4/ltversion.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-# ltversion.m4 -- version numbers			-*- Autoconf -*-
-#
-#   Copyright (C) 2004 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# @configure_input@
-
-# serial 3337 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.4.2])
-m4_define([LT_PACKAGE_REVISION], [1.3337])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.2'
-macro_revision='1.3337'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
diff --git a/src/rocksdb/m4/lt~obsolete.m4 b/src/rocksdb/m4/lt~obsolete.m4
deleted file mode 100644
index c573da9..0000000
--- a/src/rocksdb/m4/lt~obsolete.m4
+++ /dev/null
@@ -1,98 +0,0 @@
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 5 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else.  This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
-m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
-m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
-m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
-m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
-m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
diff --git a/src/rocksdb/port/README b/src/rocksdb/port/README
deleted file mode 100644
index 422563e..0000000
--- a/src/rocksdb/port/README
+++ /dev/null
@@ -1,10 +0,0 @@
-This directory contains interfaces and implementations that isolate the
-rest of the package from platform details.
-
-Code in the rest of the package includes "port.h" from this directory.
-"port.h" in turn includes a platform specific "port_<platform>.h" file
-that provides the platform specific implementation.
-
-See port_posix.h for an example of what must be provided in a platform
-specific header file.
-
diff --git a/src/rocksdb/port/atomic_pointer.h b/src/rocksdb/port/atomic_pointer.h
deleted file mode 100644
index db3580b..0000000
--- a/src/rocksdb/port/atomic_pointer.h
+++ /dev/null
@@ -1,157 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-// AtomicPointer provides storage for a lock-free pointer.
-// Platform-dependent implementation of AtomicPointer:
-// - If the platform provides a cheap barrier, we use it with raw pointers
-// - If cstdatomic is present (on newer versions of gcc, it is), we use
-//   a cstdatomic-based AtomicPointer.  However we prefer the memory
-//   barrier based version, because at least on a gcc 4.4 32-bit build
-//   on linux, we have encountered a buggy <cstdatomic>
-//   implementation.  Also, some <cstdatomic> implementations are much
-//   slower than a memory-barrier based implementation (~16ns for
-//   <cstdatomic> based acquire-load vs. ~1ns for a barrier based
-//   acquire-load).
-// This code is based on atomicops-internals-* in Google's perftools:
-// http://code.google.com/p/google-perftools/source/browse/#svn%2Ftrunk%2Fsrc%2Fbase
-
-#ifndef PORT_ATOMIC_POINTER_H_
-#define PORT_ATOMIC_POINTER_H_
-
-#include <stdint.h>
-#ifdef ROCKSDB_ATOMIC_PRESENT
-#include <atomic>
-#endif
-#ifdef OS_WIN
-#include <windows.h>
-#endif
-#ifdef OS_MACOSX
-#include <libkern/OSAtomic.h>
-#endif
-
-#if defined(_M_X64) || defined(__x86_64__)
-#define ARCH_CPU_X86_FAMILY 1
-#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
-#define ARCH_CPU_X86_FAMILY 1
-#elif defined(__ARMEL__)
-#define ARCH_CPU_ARM_FAMILY 1
-#endif
-
-namespace rocksdb {
-namespace port {
-
-// Define MemoryBarrier() if available
-// Windows on x86
-#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)
-// windows.h already provides a MemoryBarrier(void) macro
-// http://msdn.microsoft.com/en-us/library/ms684208(v=vs.85).aspx
-#define ROCKSDB_HAVE_MEMORY_BARRIER
-
-// Gcc on x86
-#elif defined(ARCH_CPU_X86_FAMILY) && defined(__GNUC__)
-inline void MemoryBarrier() {
-  // See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on
-  // this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering.
-  __asm__ __volatile__("" : : : "memory");
-}
-#define ROCKSDB_HAVE_MEMORY_BARRIER
-
-// Sun Studio
-#elif defined(ARCH_CPU_X86_FAMILY) && defined(__SUNPRO_CC)
-inline void MemoryBarrier() {
-  // See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on
-  // this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering.
-  asm volatile("" : : : "memory");
-}
-#define ROCKSDB_HAVE_MEMORY_BARRIER
-
-// Mac OS
-#elif defined(OS_MACOSX)
-inline void MemoryBarrier() {
-  OSMemoryBarrier();
-}
-#define ROCKSDB_HAVE_MEMORY_BARRIER
-
-// ARM Linux
-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(__linux__)
-typedef void (*LinuxKernelMemoryBarrierFunc)(void);
-// The Linux ARM kernel provides a highly optimized device-specific memory
-// barrier function at a fixed memory address that is mapped in every
-// user-level process.
-//
-// This beats using CPU-specific instructions which are, on single-core
-// devices, un-necessary and very costly (e.g. ARMv7-A "dmb" takes more
-// than 180ns on a Cortex-A8 like the one on a Nexus One). Benchmarking
-// shows that the extra function call cost is completely negligible on
-// multi-core devices.
-//
-inline void MemoryBarrier() {
-  (*(LinuxKernelMemoryBarrierFunc)0xffff0fa0)();
-}
-#define ROCKSDB_HAVE_MEMORY_BARRIER
-
-#endif
-
-// AtomicPointer built using platform-specific MemoryBarrier()
-#if defined(ROCKSDB_HAVE_MEMORY_BARRIER)
-class AtomicPointer {
- private:
-  void* rep_;
- public:
-  AtomicPointer() { }
-  explicit AtomicPointer(void* p) : rep_(p) {}
-  inline void* NoBarrier_Load() const { return rep_; }
-  inline void NoBarrier_Store(void* v) { rep_ = v; }
-  inline void* Acquire_Load() const {
-    void* result = rep_;
-    MemoryBarrier();
-    return result;
-  }
-  inline void Release_Store(void* v) {
-    MemoryBarrier();
-    rep_ = v;
-  }
-};
-
-// AtomicPointer based on <atomic>
-#elif defined(ROCKSDB_ATOMIC_PRESENT)
-class AtomicPointer {
- private:
-  std::atomic<void*> rep_;
- public:
-  AtomicPointer() { }
-  explicit AtomicPointer(void* v) : rep_(v) { }
-  inline void* Acquire_Load() const {
-    return rep_.load(std::memory_order_acquire);
-  }
-  inline void Release_Store(void* v) {
-    rep_.store(v, std::memory_order_release);
-  }
-  inline void* NoBarrier_Load() const {
-    return rep_.load(std::memory_order_relaxed);
-  }
-  inline void NoBarrier_Store(void* v) {
-    rep_.store(v, std::memory_order_relaxed);
-  }
-};
-
-// We have neither MemoryBarrier(), nor <cstdatomic>
-#else
-#error Please implement AtomicPointer for this platform.
-
-#endif
-
-#undef ROCKSDB_HAVE_MEMORY_BARRIER
-#undef ARCH_CPU_X86_FAMILY
-#undef ARCH_CPU_ARM_FAMILY
-
-}  // namespace port
-}  // namespace rocksdb
-
-#endif  // PORT_ATOMIC_POINTER_H_
diff --git a/src/rocksdb/port/likely.h b/src/rocksdb/port/likely.h
deleted file mode 100644
index ede0df5..0000000
--- a/src/rocksdb/port/likely.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef PORT_LIKELY_H_
-#define PORT_LIKELY_H_
-
-#if defined(__GNUC__) && __GNUC__ >= 4
-#define LIKELY(x)   (__builtin_expect((x), 1))
-#define UNLIKELY(x) (__builtin_expect((x), 0))
-#else
-#define LIKELY(x)   (x)
-#define UNLIKELY(x) (x)
-#endif
-
-#endif  // PORT_LIKELY_H_
diff --git a/src/rocksdb/port/port.h b/src/rocksdb/port/port.h
deleted file mode 100644
index 2dc9a0f..0000000
--- a/src/rocksdb/port/port.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef STORAGE_LEVELDB_PORT_PORT_H_
-#define STORAGE_LEVELDB_PORT_PORT_H_
-
-#include <string.h>
-
-// Include the appropriate platform specific file below.  If you are
-// porting to a new platform, see "port_example.h" for documentation
-// of what the new port_<platform>.h file must provide.
-#if defined(ROCKSDB_PLATFORM_POSIX)
-#  include "port/port_posix.h"
-#endif
-
-#endif  // STORAGE_LEVELDB_PORT_PORT_H_
diff --git a/src/rocksdb/port/port_example.h b/src/rocksdb/port/port_example.h
deleted file mode 100644
index f124abb..0000000
--- a/src/rocksdb/port/port_example.h
+++ /dev/null
@@ -1,133 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// This file contains the specification, but not the implementations,
-// of the types/operations/etc. that should be defined by a platform
-// specific port_<platform>.h file.  Use this file as a reference for
-// how to port this package to a new platform.
-
-#ifndef STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_
-#define STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_
-
-namespace rocksdb {
-namespace port {
-
-// TODO(jorlow): Many of these belong more in the environment class rather than
-//               here. We should try moving them and see if it affects perf.
-
-// The following boolean constant must be true on a little-endian machine
-// and false otherwise.
-static const bool kLittleEndian = true /* or some other expression */;
-
-// ------------------ Threading -------------------
-
-// A Mutex represents an exclusive lock.
-class Mutex {
- public:
-  Mutex();
-  ~Mutex();
-
-  // Lock the mutex.  Waits until other lockers have exited.
-  // Will deadlock if the mutex is already locked by this thread.
-  void Lock();
-
-  // Unlock the mutex.
-  // REQUIRES: This mutex was locked by this thread.
-  void Unlock();
-
-  // Optionally crash if this thread does not hold this mutex.
-  // The implementation must be fast, especially if NDEBUG is
-  // defined.  The implementation is allowed to skip all checks.
-  void AssertHeld();
-};
-
-class CondVar {
- public:
-  explicit CondVar(Mutex* mu);
-  ~CondVar();
-
-  // Atomically release *mu and block on this condition variable until
-  // either a call to SignalAll(), or a call to Signal() that picks
-  // this thread to wakeup.
-  // REQUIRES: this thread holds *mu
-  void Wait();
-
-  // If there are some threads waiting, wake up at least one of them.
-  void Signal();
-
-  // Wake up all waiting threads.
-  void SignallAll();
-};
-
-// Thread-safe initialization.
-// Used as follows:
-//      static port::OnceType init_control = LEVELDB_ONCE_INIT;
-//      static void Initializer() { ... do something ...; }
-//      ...
-//      port::InitOnce(&init_control, &Initializer);
-typedef intptr_t OnceType;
-#define LEVELDB_ONCE_INIT 0
-extern void InitOnce(port::OnceType*, void (*initializer)());
-
-// A type that holds a pointer that can be read or written atomically
-// (i.e., without word-tearing.)
-class AtomicPointer {
- private:
-  intptr_t rep_;
- public:
-  // Initialize to arbitrary value
-  AtomicPointer();
-
-  // Initialize to hold v
-  explicit AtomicPointer(void* v) : rep_(v) { }
-
-  // Read and return the stored pointer with the guarantee that no
-  // later memory access (read or write) by this thread can be
-  // reordered ahead of this read.
-  void* Acquire_Load() const;
-
-  // Set v as the stored pointer with the guarantee that no earlier
-  // memory access (read or write) by this thread can be reordered
-  // after this store.
-  void Release_Store(void* v);
-
-  // Read the stored pointer with no ordering guarantees.
-  void* NoBarrier_Load() const;
-
-  // Set va as the stored pointer with no ordering guarantees.
-  void NoBarrier_Store(void* v);
-};
-
-// ------------------ Compression -------------------
-
-// Store the snappy compression of "input[0,input_length-1]" in *output.
-// Returns false if snappy is not supported by this port.
-extern bool Snappy_Compress(const char* input, size_t input_length,
-                            std::string* output);
-
-// If input[0,input_length-1] looks like a valid snappy compressed
-// buffer, store the size of the uncompressed data in *result and
-// return true.  Else return false.
-extern bool Snappy_GetUncompressedLength(const char* input, size_t length,
-                                         size_t* result);
-
-// Attempt to snappy uncompress input[0,input_length-1] into *output.
-// Returns true if successful, false if the input is invalid lightweight
-// compressed data.
-//
-// REQUIRES: at least the first "n" bytes of output[] must be writable
-// where "n" is the result of a successful call to
-// Snappy_GetUncompressedLength.
-extern bool Snappy_Uncompress(const char* input_data, size_t input_length,
-                              char* output);
-
-}  // namespace port
-}  // namespace rocksdb
-
-#endif  // STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_
diff --git a/src/rocksdb/port/port_posix.cc b/src/rocksdb/port/port_posix.cc
deleted file mode 100644
index 911cebd..0000000
--- a/src/rocksdb/port/port_posix.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "port/port_posix.h"
-
-#include <cstdlib>
-#include <stdio.h>
-#include <assert.h>
-#include <string.h>
-#include "util/logging.h"
-
-namespace rocksdb {
-namespace port {
-
-static void PthreadCall(const char* label, int result) {
-  if (result != 0) {
-    fprintf(stderr, "pthread %s: %s\n", label, strerror(result));
-    abort();
-  }
-}
-
-Mutex::Mutex(bool adaptive) {
-#ifdef OS_LINUX
-  if (!adaptive) {
-    PthreadCall("init mutex", pthread_mutex_init(&mu_, NULL));
-  } else {
-    pthread_mutexattr_t mutex_attr;
-    PthreadCall("init mutex attr", pthread_mutexattr_init(&mutex_attr));
-    PthreadCall("set mutex attr",
-                pthread_mutexattr_settype(&mutex_attr,
-                                          PTHREAD_MUTEX_ADAPTIVE_NP));
-    PthreadCall("init mutex", pthread_mutex_init(&mu_, &mutex_attr));
-    PthreadCall("destroy mutex attr",
-                pthread_mutexattr_destroy(&mutex_attr));
-  }
-#else // ignore adaptive for non-linux platform
-  PthreadCall("init mutex", pthread_mutex_init(&mu_, NULL));
-#endif // OS_LINUX
-}
-
-Mutex::~Mutex() { PthreadCall("destroy mutex", pthread_mutex_destroy(&mu_)); }
-
-void Mutex::Lock() {
-  PthreadCall("lock", pthread_mutex_lock(&mu_));
-#ifndef NDEBUG
-  locked_ = true;
-#endif
-}
-
-void Mutex::Unlock() {
-#ifndef NDEBUG
-  locked_ = false;
-#endif
-  PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-}
-
-void Mutex::AssertHeld() {
-#ifndef NDEBUG
-  assert(locked_);
-#endif
-}
-
-CondVar::CondVar(Mutex* mu)
-    : mu_(mu) {
-    PthreadCall("init cv", pthread_cond_init(&cv_, NULL));
-}
-
-CondVar::~CondVar() { PthreadCall("destroy cv", pthread_cond_destroy(&cv_)); }
-
-void CondVar::Wait() {
-#ifndef NDEBUG
-  mu_->locked_ = false;
-#endif
-  PthreadCall("wait", pthread_cond_wait(&cv_, &mu_->mu_));
-#ifndef NDEBUG
-  mu_->locked_ = true;
-#endif
-}
-
-void CondVar::Signal() {
-  PthreadCall("signal", pthread_cond_signal(&cv_));
-}
-
-void CondVar::SignalAll() {
-  PthreadCall("broadcast", pthread_cond_broadcast(&cv_));
-}
-
-RWMutex::RWMutex() { PthreadCall("init mutex", pthread_rwlock_init(&mu_, NULL)); }
-
-RWMutex::~RWMutex() { PthreadCall("destroy mutex", pthread_rwlock_destroy(&mu_)); }
-
-void RWMutex::ReadLock() { PthreadCall("read lock", pthread_rwlock_rdlock(&mu_)); }
-
-void RWMutex::WriteLock() { PthreadCall("write lock", pthread_rwlock_wrlock(&mu_)); }
-
-void RWMutex::Unlock() { PthreadCall("unlock", pthread_rwlock_unlock(&mu_)); }
-
-void InitOnce(OnceType* once, void (*initializer)()) {
-  PthreadCall("once", pthread_once(once, initializer));
-}
-
-}  // namespace port
-}  // namespace rocksdb
diff --git a/src/rocksdb/port/port_posix.h b/src/rocksdb/port/port_posix.h
deleted file mode 100644
index d20a5df..0000000
--- a/src/rocksdb/port/port_posix.h
+++ /dev/null
@@ -1,488 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// See port_example.h for documentation for the following types/functions.
-
-#ifndef STORAGE_LEVELDB_PORT_PORT_POSIX_H_
-#define STORAGE_LEVELDB_PORT_PORT_POSIX_H_
-
-#undef PLATFORM_IS_LITTLE_ENDIAN
-#if defined(OS_MACOSX)
-  #include <machine/endian.h>
-  #if defined(__DARWIN_LITTLE_ENDIAN) && defined(__DARWIN_BYTE_ORDER)
-    #define PLATFORM_IS_LITTLE_ENDIAN \
-        (__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN)
-  #endif
-#elif defined(OS_SOLARIS)
-  #include <sys/isa_defs.h>
-  #ifdef _LITTLE_ENDIAN
-    #define PLATFORM_IS_LITTLE_ENDIAN true
-  #else
-    #define PLATFORM_IS_LITTLE_ENDIAN false
-  #endif
-#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
-      defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
-  #include <sys/types.h>
-  #include <sys/endian.h>
-#else
-  #include <endian.h>
-#endif
-#include <pthread.h>
-#ifdef SNAPPY
-#include <snappy.h>
-#endif
-
-#ifdef ZLIB
-#include <zlib.h>
-#endif
-
-#ifdef BZIP2
-#include <bzlib.h>
-#endif
-
-#if defined(LZ4)
-#include <lz4.h>
-#include <lz4hc.h>
-#endif
-
-#include <stdint.h>
-#include <string>
-#include <string.h>
-#include "rocksdb/options.h"
-#include "port/atomic_pointer.h"
-
-#ifndef PLATFORM_IS_LITTLE_ENDIAN
-#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
-#endif
-
-#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
-    defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
-    defined(OS_ANDROID)
-// Use fread/fwrite/fflush on platforms without _unlocked variants
-#define fread_unlocked fread
-#define fwrite_unlocked fwrite
-#define fflush_unlocked fflush
-#endif
-
-#if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
-    defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
-// Use fsync() on platforms without fdatasync()
-#define fdatasync fsync
-#endif
-
-#if defined(OS_ANDROID) && __ANDROID_API__ < 9
-// fdatasync() was only introduced in API level 9 on Android. Use fsync()
-// when targetting older platforms.
-#define fdatasync fsync
-#endif
-
-namespace rocksdb {
-namespace port {
-
-static const bool kLittleEndian = PLATFORM_IS_LITTLE_ENDIAN;
-#undef PLATFORM_IS_LITTLE_ENDIAN
-
-class CondVar;
-
-class Mutex {
- public:
-  /* implicit */ Mutex(bool adaptive = false);
-  ~Mutex();
-
-  void Lock();
-  void Unlock();
-  // this will assert if the mutex is not locked
-  // it does NOT verify that mutex is held by a calling thread
-  void AssertHeld();
-
- private:
-  friend class CondVar;
-  pthread_mutex_t mu_;
-#ifndef NDEBUG
-  bool locked_;
-#endif
-
-  // No copying
-  Mutex(const Mutex&);
-  void operator=(const Mutex&);
-};
-
-class RWMutex {
- public:
-  RWMutex();
-  ~RWMutex();
-
-  void ReadLock();
-  void WriteLock();
-  void Unlock();
-  void AssertHeld() { }
-
- private:
-  pthread_rwlock_t mu_; // the underlying platform mutex
-
-  // No copying allowed
-  RWMutex(const RWMutex&);
-  void operator=(const RWMutex&);
-};
-
-class CondVar {
- public:
-  explicit CondVar(Mutex* mu);
-  ~CondVar();
-  void Wait();
-  void Signal();
-  void SignalAll();
- private:
-  pthread_cond_t cv_;
-  Mutex* mu_;
-};
-
-typedef pthread_once_t OnceType;
-#define LEVELDB_ONCE_INIT PTHREAD_ONCE_INIT
-extern void InitOnce(OnceType* once, void (*initializer)());
-
-inline bool Snappy_Compress(const CompressionOptions& opts, const char* input,
-                            size_t length, ::std::string* output) {
-#ifdef SNAPPY
-  output->resize(snappy::MaxCompressedLength(length));
-  size_t outlen;
-  snappy::RawCompress(input, length, &(*output)[0], &outlen);
-  output->resize(outlen);
-  return true;
-#endif
-
-  return false;
-}
-
-inline bool Snappy_GetUncompressedLength(const char* input, size_t length,
-                                         size_t* result) {
-#ifdef SNAPPY
-  return snappy::GetUncompressedLength(input, length, result);
-#else
-  return false;
-#endif
-}
-
-inline bool Snappy_Uncompress(const char* input, size_t length,
-                              char* output) {
-#ifdef SNAPPY
-  return snappy::RawUncompress(input, length, output);
-#else
-  return false;
-#endif
-}
-
-inline bool Zlib_Compress(const CompressionOptions& opts, const char* input,
-                          size_t length, ::std::string* output) {
-#ifdef ZLIB
-  // The memLevel parameter specifies how much memory should be allocated for
-  // the internal compression state.
-  // memLevel=1 uses minimum memory but is slow and reduces compression ratio.
-  // memLevel=9 uses maximum memory for optimal speed.
-  // The default value is 8. See zconf.h for more details.
-  static const int memLevel = 8;
-  z_stream _stream;
-  memset(&_stream, 0, sizeof(z_stream));
-  int st = deflateInit2(&_stream, opts.level, Z_DEFLATED, opts.window_bits,
-                        memLevel, opts.strategy);
-  if (st != Z_OK) {
-    return false;
-  }
-
-  // Resize output to be the plain data length.
-  // This may not be big enough if the compression actually expands data.
-  output->resize(length);
-
-  // Compress the input, and put compressed data in output.
-  _stream.next_in = (Bytef *)input;
-  _stream.avail_in = length;
-
-  // Initialize the output size.
-  _stream.avail_out = length;
-  _stream.next_out = (Bytef *)&(*output)[0];
-
-  int old_sz =0, new_sz =0, new_sz_delta =0;
-  bool done = false;
-  while (!done) {
-    int st = deflate(&_stream, Z_FINISH);
-    switch (st) {
-      case Z_STREAM_END:
-        done = true;
-        break;
-      case Z_OK:
-        // No output space. Increase the output space by 20%.
-        // (Should we fail the compression since it expands the size?)
-        old_sz = output->size();
-        new_sz_delta = (int)(output->size() * 0.2);
-        new_sz = output->size() + (new_sz_delta < 10 ? 10 : new_sz_delta);
-        output->resize(new_sz);
-        // Set more output.
-        _stream.next_out = (Bytef *)&(*output)[old_sz];
-        _stream.avail_out = new_sz - old_sz;
-        break;
-      case Z_BUF_ERROR:
-      default:
-        deflateEnd(&_stream);
-        return false;
-    }
-  }
-
-  output->resize(output->size() - _stream.avail_out);
-  deflateEnd(&_stream);
-  return true;
-#endif
-  return false;
-}
-
-inline char* Zlib_Uncompress(const char* input_data, size_t input_length,
-    int* decompress_size, int windowBits = -14) {
-#ifdef ZLIB
-  z_stream _stream;
-  memset(&_stream, 0, sizeof(z_stream));
-
-  // For raw inflate, the windowBits should be -8..-15.
-  // If windowBits is bigger than zero, it will use either zlib
-  // header or gzip header. Adding 32 to it will do automatic detection.
-  int st = inflateInit2(&_stream,
-      windowBits > 0 ? windowBits + 32 : windowBits);
-  if (st != Z_OK) {
-    return nullptr;
-  }
-
-  _stream.next_in = (Bytef *)input_data;
-  _stream.avail_in = input_length;
-
-  // Assume the decompressed data size will 5x of compressed size.
-  int output_len = input_length * 5;
-  char* output = new char[output_len];
-  int old_sz = output_len;
-
-  _stream.next_out = (Bytef *)output;
-  _stream.avail_out = output_len;
-
-  char* tmp = nullptr;
-  int output_len_delta;
-  bool done = false;
-
-  //while(_stream.next_in != nullptr && _stream.avail_in != 0) {
-  while (!done) {
-    int st = inflate(&_stream, Z_SYNC_FLUSH);
-    switch (st) {
-      case Z_STREAM_END:
-        done = true;
-        break;
-      case Z_OK:
-        // No output space. Increase the output space by 20%.
-        old_sz = output_len;
-        output_len_delta = (int)(output_len * 0.2);
-        output_len += output_len_delta < 10 ? 10 : output_len_delta;
-        tmp = new char[output_len];
-        memcpy(tmp, output, old_sz);
-        delete[] output;
-        output = tmp;
-
-        // Set more output.
-        _stream.next_out = (Bytef *)(output + old_sz);
-        _stream.avail_out = output_len - old_sz;
-        break;
-      case Z_BUF_ERROR:
-      default:
-        delete[] output;
-        inflateEnd(&_stream);
-        return nullptr;
-    }
-  }
-
-  *decompress_size = output_len - _stream.avail_out;
-  inflateEnd(&_stream);
-  return output;
-#endif
-
-  return nullptr;
-}
-
-inline bool BZip2_Compress(const CompressionOptions& opts, const char* input,
-                           size_t length, ::std::string* output) {
-#ifdef BZIP2
-  bz_stream _stream;
-  memset(&_stream, 0, sizeof(bz_stream));
-
-  // Block size 1 is 100K.
-  // 0 is for silent.
-  // 30 is the default workFactor
-  int st = BZ2_bzCompressInit(&_stream, 1, 0, 30);
-  if (st != BZ_OK) {
-    return false;
-  }
-
-  // Resize output to be the plain data length.
-  // This may not be big enough if the compression actually expands data.
-  output->resize(length);
-
-  // Compress the input, and put compressed data in output.
-  _stream.next_in = (char *)input;
-  _stream.avail_in = length;
-
-  // Initialize the output size.
-  _stream.next_out = (char *)&(*output)[0];
-  _stream.avail_out = length;
-
-  int old_sz =0, new_sz =0;
-  while(_stream.next_in != nullptr && _stream.avail_in != 0) {
-    int st = BZ2_bzCompress(&_stream, BZ_FINISH);
-    switch (st) {
-      case BZ_STREAM_END:
-        break;
-      case BZ_FINISH_OK:
-        // No output space. Increase the output space by 20%.
-        // (Should we fail the compression since it expands the size?)
-        old_sz = output->size();
-        new_sz = (int)(output->size() * 1.2);
-        output->resize(new_sz);
-        // Set more output.
-        _stream.next_out = (char *)&(*output)[old_sz];
-        _stream.avail_out = new_sz - old_sz;
-        break;
-      case BZ_SEQUENCE_ERROR:
-      default:
-        BZ2_bzCompressEnd(&_stream);
-        return false;
-    }
-  }
-
-  output->resize(output->size() - _stream.avail_out);
-  BZ2_bzCompressEnd(&_stream);
-  return true;
-#endif
-  return false;
-}
-
-inline char* BZip2_Uncompress(const char* input_data, size_t input_length,
-                              int* decompress_size) {
-#ifdef BZIP2
-  bz_stream _stream;
-  memset(&_stream, 0, sizeof(bz_stream));
-
-  int st = BZ2_bzDecompressInit(&_stream, 0, 0);
-  if (st != BZ_OK) {
-    return nullptr;
-  }
-
-  _stream.next_in = (char *)input_data;
-  _stream.avail_in = input_length;
-
-  // Assume the decompressed data size will be 5x of compressed size.
-  int output_len = input_length * 5;
-  char* output = new char[output_len];
-  int old_sz = output_len;
-
-  _stream.next_out = (char *)output;
-  _stream.avail_out = output_len;
-
-  char* tmp = nullptr;
-
-  while(_stream.next_in != nullptr && _stream.avail_in != 0) {
-    int st = BZ2_bzDecompress(&_stream);
-    switch (st) {
-      case BZ_STREAM_END:
-        break;
-      case BZ_OK:
-        // No output space. Increase the output space by 20%.
-        old_sz = output_len;
-        output_len = (int)(output_len * 1.2);
-        tmp = new char[output_len];
-        memcpy(tmp, output, old_sz);
-        delete[] output;
-        output = tmp;
-
-        // Set more output.
-        _stream.next_out = (char *)(output + old_sz);
-        _stream.avail_out = output_len - old_sz;
-        break;
-      default:
-        delete[] output;
-        BZ2_bzDecompressEnd(&_stream);
-        return nullptr;
-    }
-  }
-
-  *decompress_size = output_len - _stream.avail_out;
-  BZ2_bzDecompressEnd(&_stream);
-  return output;
-#endif
-  return nullptr;
-}
-
-inline bool LZ4_Compress(const CompressionOptions &opts, const char *input,
-                         size_t length, ::std::string* output) {
-#ifdef LZ4
-  int compressBound = LZ4_compressBound(length);
-  output->resize(8 + compressBound);
-  char *p = const_cast<char *>(output->c_str());
-  memcpy(p, &length, sizeof(length));
-  size_t outlen;
-  outlen = LZ4_compress_limitedOutput(input, p + 8, length, compressBound);
-  if (outlen == 0) {
-    return false;
-  }
-  output->resize(8 + outlen);
-  return true;
-#endif
-  return false;
-}
-
-inline char* LZ4_Uncompress(const char* input_data, size_t input_length,
-                            int* decompress_size) {
-#ifdef LZ4
-  if (input_length < 8) {
-    return nullptr;
-  }
-  int output_len;
-  memcpy(&output_len, input_data, sizeof(output_len));
-  char *output = new char[output_len];
-  *decompress_size = LZ4_decompress_safe_partial(
-      input_data + 8, output, input_length - 8, output_len, output_len);
-  if (*decompress_size < 0) {
-    delete[] output;
-    return nullptr;
-  }
-  return output;
-#endif
-  return nullptr;
-}
-
-inline bool LZ4HC_Compress(const CompressionOptions &opts, const char* input,
-                           size_t length, ::std::string* output) {
-#ifdef LZ4
-  int compressBound = LZ4_compressBound(length);
-  output->resize(8 + compressBound);
-  char *p = const_cast<char *>(output->c_str());
-  memcpy(p, &length, sizeof(length));
-  size_t outlen;
-#ifdef LZ4_VERSION_MAJOR  // they only started defining this since r113
-  outlen = LZ4_compressHC2_limitedOutput(input, p + 8, length, compressBound,
-                                         opts.level);
-#else
-  outlen = LZ4_compressHC_limitedOutput(input, p + 8, length, compressBound);
-#endif
-  if (outlen == 0) {
-    return false;
-  }
-  output->resize(8 + outlen);
-  return true;
-#endif
-  return false;
-}
-
-#define CACHE_LINE_SIZE 64U
-
-} // namespace port
-} // namespace rocksdb
-
-#endif  // STORAGE_LEVELDB_PORT_PORT_POSIX_H_
diff --git a/src/rocksdb/port/stack_trace.cc b/src/rocksdb/port/stack_trace.cc
deleted file mode 100644
index 76866e6..0000000
--- a/src/rocksdb/port/stack_trace.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "port/stack_trace.h"
-
-namespace rocksdb {
-namespace port {
-
-#if defined(ROCKSDB_LITE) || !(defined(OS_LINUX) || defined(OS_MACOSX))
-
-// noop
-
-void InstallStackTraceHandler() {}
-void PrintStack(int first_frames_to_skip) {}
-
-#else
-
-#include <execinfo.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <cxxabi.h>
-
-namespace {
-
-#ifdef OS_LINUX
-const char* GetExecutableName() {
-  static char name[1024];
-
-  char link[1024];
-  snprintf(link, sizeof(link), "/proc/%d/exe", getpid());
-  auto read = readlink(link, name, sizeof(name));
-  if (-1 == read) {
-    return nullptr;
-  } else {
-    name[read] = 0;
-    return name;
-  }
-}
-
-void PrintStackTraceLine(const char* symbol, void* frame) {
-  static const char* executable = GetExecutableName();
-  if (symbol) {
-    fprintf(stderr, "%s ", symbol);
-  }
-  if (executable) {
-    // out source to addr2line, for the address translation
-    const int kLineMax = 256;
-    char cmd[kLineMax];
-    snprintf(cmd, kLineMax, "addr2line %p -e %s -f -C 2>&1", frame, executable);
-    auto f = popen(cmd, "r");
-    if (f) {
-      char line[kLineMax];
-      while (fgets(line, sizeof(line), f)) {
-        line[strlen(line) - 1] = 0;  // remove newline
-        fprintf(stderr, "%s\t", line);
-      }
-      pclose(f);
-    }
-  } else {
-    fprintf(stderr, " %p", frame);
-  }
-
-  fprintf(stderr, "\n");
-}
-#elif OS_MACOSX
-
-void PrintStackTraceLine(const char* symbol, void* frame) {
-  static int pid = getpid();
-  // out source to atos, for the address translation
-  const int kLineMax = 256;
-  char cmd[kLineMax];
-  snprintf(cmd, kLineMax, "xcrun atos %p -p %d  2>&1", frame, pid);
-  auto f = popen(cmd, "r");
-  if (f) {
-    char line[kLineMax];
-    while (fgets(line, sizeof(line), f)) {
-      line[strlen(line) - 1] = 0;  // remove newline
-      fprintf(stderr, "%s\t", line);
-    }
-    pclose(f);
-  } else if (symbol) {
-    fprintf(stderr, "%s ", symbol);
-  }
-
-  fprintf(stderr, "\n");
-}
-
-#endif
-
-}  // namespace
-
-void PrintStack(int first_frames_to_skip) {
-  const int kMaxFrames = 100;
-  void* frames[kMaxFrames];
-
-  auto num_frames = backtrace(frames, kMaxFrames);
-  auto symbols = backtrace_symbols(frames, num_frames);
-
-  for (int i = first_frames_to_skip; i < num_frames; ++i) {
-    fprintf(stderr, "#%-2d  ", i - first_frames_to_skip);
-    PrintStackTraceLine((symbols != nullptr) ? symbols[i] : nullptr, frames[i]);
-  }
-}
-
-static void StackTraceHandler(int sig) {
-  // reset to default handler
-  signal(sig, SIG_DFL);
-  fprintf(stderr, "Received signal %d (%s)\n", sig, strsignal(sig));
-  // skip the top three signal handler related frames
-  PrintStack(3);
-  // re-signal to default handler (so we still get core dump if needed...)
-  raise(sig);
-}
-
-void InstallStackTraceHandler() {
-  // just use the plain old signal as it's simple and sufficient
-  // for this use case
-  signal(SIGILL, StackTraceHandler);
-  signal(SIGSEGV, StackTraceHandler);
-  signal(SIGBUS, StackTraceHandler);
-  signal(SIGABRT, StackTraceHandler);
-}
-
-#endif
-
-}  // namespace port
-}  // namespace rocksdb
diff --git a/src/rocksdb/port/stack_trace.h b/src/rocksdb/port/stack_trace.h
deleted file mode 100644
index 8bc6c7d..0000000
--- a/src/rocksdb/port/stack_trace.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-namespace rocksdb {
-namespace port {
-
-// Install a signal handler to print callstack on the following signals:
-// SIGILL SIGSEGV SIGBUS SIGABRT
-// Currently supports linux only. No-op otherwise.
-void InstallStackTraceHandler();
-
-// Prints stack, skips skip_first_frames frames
-void PrintStack(int first_frames_to_skip = 0);
-
-}  // namespace port
-}  // namespace rocksdb
diff --git a/src/rocksdb/port/win/stdint.h b/src/rocksdb/port/win/stdint.h
deleted file mode 100644
index 39edd0d..0000000
--- a/src/rocksdb/port/win/stdint.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-// MSVC didn't ship with this file until the 2010 version.
-
-#ifndef STORAGE_LEVELDB_PORT_WIN_STDINT_H_
-#define STORAGE_LEVELDB_PORT_WIN_STDINT_H_
-
-#if !defined(_MSC_VER)
-#error This file should only be included when compiling with MSVC.
-#endif
-
-// Define C99 equivalent types.
-typedef signed char           int8_t;
-typedef signed short          int16_t;
-typedef signed int            int32_t;
-typedef signed long long      int64_t;
-typedef unsigned char         uint8_t;
-typedef unsigned short        uint16_t;
-typedef unsigned int          uint32_t;
-typedef unsigned long long    uint64_t;
-
-#endif  // STORAGE_LEVELDB_PORT_WIN_STDINT_H_
diff --git a/src/rocksdb/table/block.cc b/src/rocksdb/table/block.cc
deleted file mode 100644
index 6a6751c..0000000
--- a/src/rocksdb/table/block.cc
+++ /dev/null
@@ -1,307 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Decodes the blocks generated by block_builder.cc.
-
-#include "table/block.h"
-
-#include <algorithm>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
-#include "rocksdb/comparator.h"
-#include "table/block_hash_index.h"
-#include "table/format.h"
-#include "util/coding.h"
-#include "util/logging.h"
-
-namespace rocksdb {
-
-uint32_t Block::NumRestarts() const {
-  assert(size_ >= 2*sizeof(uint32_t));
-  return DecodeFixed32(data_ + size_ - sizeof(uint32_t));
-}
-
-Block::Block(const BlockContents& contents)
-    : data_(contents.data.data()),
-      size_(contents.data.size()),
-      owned_(contents.heap_allocated),
-      cachable_(contents.cachable),
-      compression_type_(contents.compression_type) {
-  if (size_ < sizeof(uint32_t)) {
-    size_ = 0;  // Error marker
-  } else {
-    restart_offset_ = size_ - (1 + NumRestarts()) * sizeof(uint32_t);
-    if (restart_offset_ > size_ - sizeof(uint32_t)) {
-      // The size is too small for NumRestarts() and therefore
-      // restart_offset_ wrapped around.
-      size_ = 0;
-    }
-  }
-}
-
-Block::~Block() {
-  if (owned_) {
-    delete[] data_;
-  }
-}
-
-// Helper routine: decode the next block entry starting at "p",
-// storing the number of shared key bytes, non_shared key bytes,
-// and the length of the value in "*shared", "*non_shared", and
-// "*value_length", respectively.  Will not derefence past "limit".
-//
-// If any errors are detected, returns nullptr.  Otherwise, returns a
-// pointer to the key delta (just past the three decoded values).
-static inline const char* DecodeEntry(const char* p, const char* limit,
-                                      uint32_t* shared,
-                                      uint32_t* non_shared,
-                                      uint32_t* value_length) {
-  if (limit - p < 3) return nullptr;
-  *shared = reinterpret_cast<const unsigned char*>(p)[0];
-  *non_shared = reinterpret_cast<const unsigned char*>(p)[1];
-  *value_length = reinterpret_cast<const unsigned char*>(p)[2];
-  if ((*shared | *non_shared | *value_length) < 128) {
-    // Fast path: all three values are encoded in one byte each
-    p += 3;
-  } else {
-    if ((p = GetVarint32Ptr(p, limit, shared)) == nullptr) return nullptr;
-    if ((p = GetVarint32Ptr(p, limit, non_shared)) == nullptr) return nullptr;
-    if ((p = GetVarint32Ptr(p, limit, value_length)) == nullptr) return nullptr;
-  }
-
-  if (static_cast<uint32_t>(limit - p) < (*non_shared + *value_length)) {
-    return nullptr;
-  }
-  return p;
-}
-
-class Block::Iter : public Iterator {
- private:
-  const Comparator* const comparator_;
-  const char* const data_;      // underlying block contents
-  uint32_t const restarts_;     // Offset of restart array (list of fixed32)
-  uint32_t const num_restarts_; // Number of uint32_t entries in restart array
-
-  // current_ is offset in data_ of current entry.  >= restarts_ if !Valid
-  uint32_t current_;
-  uint32_t restart_index_;  // Index of restart block in which current_ falls
-  std::string key_;
-  Slice value_;
-  Status status_;
-  BlockHashIndex* hash_index_;
-
-  inline int Compare(const Slice& a, const Slice& b) const {
-    return comparator_->Compare(a, b);
-  }
-
-  // Return the offset in data_ just past the end of the current entry.
-  inline uint32_t NextEntryOffset() const {
-    return (value_.data() + value_.size()) - data_;
-  }
-
-  uint32_t GetRestartPoint(uint32_t index) {
-    assert(index < num_restarts_);
-    return DecodeFixed32(data_ + restarts_ + index * sizeof(uint32_t));
-  }
-
-  void SeekToRestartPoint(uint32_t index) {
-    key_.clear();
-    restart_index_ = index;
-    // current_ will be fixed by ParseNextKey();
-
-    // ParseNextKey() starts at the end of value_, so set value_ accordingly
-    uint32_t offset = GetRestartPoint(index);
-    value_ = Slice(data_ + offset, 0);
-  }
-
- public:
-  Iter(const Comparator* comparator, const char* data, uint32_t restarts,
-       uint32_t num_restarts, BlockHashIndex* hash_index)
-      : comparator_(comparator),
-        data_(data),
-        restarts_(restarts),
-        num_restarts_(num_restarts),
-        current_(restarts_),
-        restart_index_(num_restarts_),
-        hash_index_(hash_index) {
-    assert(num_restarts_ > 0);
-  }
-
-  virtual bool Valid() const { return current_ < restarts_; }
-  virtual Status status() const { return status_; }
-  virtual Slice key() const {
-    assert(Valid());
-    return key_;
-  }
-  virtual Slice value() const {
-    assert(Valid());
-    return value_;
-  }
-
-  virtual void Next() {
-    assert(Valid());
-    ParseNextKey();
-  }
-
-  virtual void Prev() {
-    assert(Valid());
-
-    // Scan backwards to a restart point before current_
-    const uint32_t original = current_;
-    while (GetRestartPoint(restart_index_) >= original) {
-      if (restart_index_ == 0) {
-        // No more entries
-        current_ = restarts_;
-        restart_index_ = num_restarts_;
-        return;
-      }
-      restart_index_--;
-    }
-
-    SeekToRestartPoint(restart_index_);
-    do {
-      // Loop until end of current entry hits the start of original entry
-    } while (ParseNextKey() && NextEntryOffset() < original);
-  }
-
-  virtual void Seek(const Slice& target) {
-    uint32_t index = 0;
-    bool ok = hash_index_ ? HashSeek(target, &index)
-                          : BinarySeek(target, 0, num_restarts_ - 1, &index);
-
-    if (!ok) {
-      return;
-    }
-    SeekToRestartPoint(index);
-    // Linear search (within restart block) for first key >= target
-
-    while (true) {
-      if (!ParseNextKey() || Compare(key_, target) >= 0) {
-        return;
-      }
-    }
-  }
-  virtual void SeekToFirst() {
-    SeekToRestartPoint(0);
-    ParseNextKey();
-  }
-
-  virtual void SeekToLast() {
-    SeekToRestartPoint(num_restarts_ - 1);
-    while (ParseNextKey() && NextEntryOffset() < restarts_) {
-      // Keep skipping
-    }
-  }
-
- private:
-  void CorruptionError() {
-    current_ = restarts_;
-    restart_index_ = num_restarts_;
-    status_ = Status::Corruption("bad entry in block");
-    key_.clear();
-    value_.clear();
-  }
-
-  bool ParseNextKey() {
-    current_ = NextEntryOffset();
-    const char* p = data_ + current_;
-    const char* limit = data_ + restarts_;  // Restarts come right after data
-    if (p >= limit) {
-      // No more entries to return.  Mark as invalid.
-      current_ = restarts_;
-      restart_index_ = num_restarts_;
-      return false;
-    }
-
-    // Decode next entry
-    uint32_t shared, non_shared, value_length;
-    p = DecodeEntry(p, limit, &shared, &non_shared, &value_length);
-    if (p == nullptr || key_.size() < shared) {
-      CorruptionError();
-      return false;
-    } else {
-      key_.resize(shared);
-      key_.append(p, non_shared);
-      value_ = Slice(p + non_shared, value_length);
-      while (restart_index_ + 1 < num_restarts_ &&
-             GetRestartPoint(restart_index_ + 1) < current_) {
-        ++restart_index_;
-      }
-      return true;
-    }
-  }
-  // Binary search in restart array to find the first restart point
-  // with a key >= target
-  bool BinarySeek(const Slice& target, uint32_t left, uint32_t right,
-                  uint32_t* index) {
-    assert(left <= right);
-
-    while (left < right) {
-      uint32_t mid = (left + right + 1) / 2;
-      uint32_t region_offset = GetRestartPoint(mid);
-      uint32_t shared, non_shared, value_length;
-      const char* key_ptr =
-          DecodeEntry(data_ + region_offset, data_ + restarts_, &shared,
-                      &non_shared, &value_length);
-      if (key_ptr == nullptr || (shared != 0)) {
-        CorruptionError();
-        return false;
-      }
-      Slice mid_key(key_ptr, non_shared);
-      if (Compare(mid_key, target) < 0) {
-        // Key at "mid" is smaller than "target". Therefore all
-        // blocks before "mid" are uninteresting.
-        left = mid;
-      } else {
-        // Key at "mid" is >= "target". Therefore all blocks at or
-        // after "mid" are uninteresting.
-        right = mid - 1;
-      }
-    }
-
-    *index = left;
-    return true;
-  }
-
-  bool HashSeek(const Slice& target, uint32_t* index) {
-    assert(hash_index_);
-    auto restart_index = hash_index_->GetRestartIndex(target);
-    if (restart_index == nullptr) {
-      current_ = restarts_;
-      return 0;
-    }
-
-    // the elements in restart_array[index : index + num_blocks]
-    // are all with same prefix. We'll do binary search in that small range.
-    auto left = restart_index->first_index;
-    auto right = restart_index->first_index + restart_index->num_blocks - 1;
-    return BinarySeek(target, left, right, index);
-  }
-};
-
-Iterator* Block::NewIterator(const Comparator* cmp) {
-  if (size_ < 2*sizeof(uint32_t)) {
-    return NewErrorIterator(Status::Corruption("bad block contents"));
-  }
-  const uint32_t num_restarts = NumRestarts();
-  if (num_restarts == 0) {
-    return NewEmptyIterator();
-  } else {
-    return new Iter(cmp, data_, restart_offset_, num_restarts,
-                    hash_index_.get());
-  }
-}
-
-void Block::SetBlockHashIndex(BlockHashIndex* hash_index) {
-  hash_index_.reset(hash_index);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block.h b/src/rocksdb/table/block.h
deleted file mode 100644
index b363d62..0000000
--- a/src/rocksdb/table/block.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <stddef.h>
-#include <stdint.h>
-
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-
-namespace rocksdb {
-
-struct BlockContents;
-class Comparator;
-class BlockHashIndex;
-
-class Block {
- public:
-  // Initialize the block with the specified contents.
-  explicit Block(const BlockContents& contents);
-
-  ~Block();
-
-  size_t size() const { return size_; }
-  const char* data() const { return data_; }
-  bool cachable() const { return cachable_; }
-  uint32_t NumRestarts() const;
-  CompressionType compression_type() const { return compression_type_; }
-
-  // If hash index lookup is enabled and `use_hash_index` is true. This block
-  // will do hash lookup for the key prefix.
-  //
-  // NOTE: for the hash based lookup, if a key prefix doesn't match any key,
-  // the iterator will simply be set as "invalid", rather than returning
-  // the key that is just pass the target key.
-  Iterator* NewIterator(const Comparator* comparator);
-  void SetBlockHashIndex(BlockHashIndex* hash_index);
-
- private:
-  const char* data_;
-  size_t size_;
-  uint32_t restart_offset_;     // Offset in data_ of restart array
-  bool owned_;                  // Block owns data_[]
-  bool cachable_;
-  CompressionType compression_type_;
-  std::unique_ptr<BlockHashIndex> hash_index_;
-
-  // No copying allowed
-  Block(const Block&);
-  void operator=(const Block&);
-
-  class Iter;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_based_table_builder.cc b/src/rocksdb/table/block_based_table_builder.cc
deleted file mode 100644
index c6469a2..0000000
--- a/src/rocksdb/table/block_based_table_builder.cc
+++ /dev/null
@@ -1,689 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/block_based_table_builder.h"
-
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-
-#include <map>
-#include <memory>
-
-#include "db/dbformat.h"
-
-#include "rocksdb/cache.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/flush_block_policy.h"
-#include "rocksdb/options.h"
-#include "rocksdb/table.h"
-
-#include "table/block.h"
-#include "table/block_based_table_reader.h"
-#include "table/block_builder.h"
-#include "table/filter_block.h"
-#include "table/format.h"
-#include "table/meta_blocks.h"
-#include "table/table_builder.h"
-
-#include "util/coding.h"
-#include "util/crc32c.h"
-#include "util/stop_watch.h"
-#include "util/xxhash.h"
-
-namespace rocksdb {
-
-namespace {
-
-typedef BlockBasedTableOptions::IndexType IndexType;
-
-// The interface for building index.
-// Instruction for adding a new concrete IndexBuilder:
-//  1. Create a subclass instantiated from IndexBuilder.
-//  2. Add a new entry associated with that subclass in TableOptions::IndexType.
-//  3. Add a create function for the new subclass in CreateIndexBuilder.
-// Note: we can devise more advanced design to simplify the process for adding
-// new subclass, which will, on the other hand, increase the code complexity and
-// catch unwanted attention from readers. Given that we won't add/change
-// indexes frequently, it makes sense to just embrace a more straightforward
-// design that just works.
-class IndexBuilder {
- public:
-  explicit IndexBuilder(const Comparator* comparator)
-      : comparator_(comparator) {}
-
-  virtual ~IndexBuilder() {}
-
-  // Add a new index entry to index block.
-  // To allow further optimization, we provide `last_key_in_current_block` and
-  // `first_key_in_next_block`, based on which the specific implementation can
-  // determine the best index key to be used for the index block.
-  // @last_key_in_current_block: this parameter maybe overridden with the value
-  //                             "substitute key".
-  // @first_key_in_next_block: it will be nullptr if the entry being added is
-  //                           the last one in the table
-  //
-  // REQUIRES: Finish() has not yet been called.
-  virtual void AddEntry(std::string* last_key_in_current_block,
-                        const Slice* first_key_in_next_block,
-                        const BlockHandle& block_handle) = 0;
-
-  // Inform the index builder that all entries has been written. Block builder
-  // may therefore perform any operation required for block finalization.
-  //
-  // REQUIRES: Finish() has not yet been called.
-  virtual Slice Finish() = 0;
-
-  // Get the estimated size for index block.
-  virtual size_t EstimatedSize() const = 0;
-
- protected:
-  const Comparator* comparator_;
-};
-
-// This index builder builds space-efficient index block.
-//
-// Optimizations:
-//  1. Made block's `block_restart_interval` to be 1, which will avoid linear
-//     search when doing index lookup.
-//  2. Shorten the key length for index block. Other than honestly using the
-//     last key in the data block as the index key, we instead find a shortest
-//     substitute key that serves the same function.
-class ShortenedIndexBuilder : public IndexBuilder {
- public:
-  explicit ShortenedIndexBuilder(const Comparator* comparator)
-      : IndexBuilder(comparator),
-        index_block_builder_(1 /* block_restart_interval == 1 */, comparator) {}
-
-  virtual void AddEntry(std::string* last_key_in_current_block,
-                        const Slice* first_key_in_next_block,
-                        const BlockHandle& block_handle) override {
-    if (first_key_in_next_block != nullptr) {
-      comparator_->FindShortestSeparator(last_key_in_current_block,
-                                         *first_key_in_next_block);
-    } else {
-      comparator_->FindShortSuccessor(last_key_in_current_block);
-    }
-
-    std::string handle_encoding;
-    block_handle.EncodeTo(&handle_encoding);
-    index_block_builder_.Add(*last_key_in_current_block, handle_encoding);
-  }
-
-  virtual Slice Finish() override { return index_block_builder_.Finish(); }
-
-  virtual size_t EstimatedSize() const {
-    return index_block_builder_.CurrentSizeEstimate();
-  }
-
- private:
-  BlockBuilder index_block_builder_;
-};
-
-// FullKeyIndexBuilder is also based on BlockBuilder. It works pretty much like
-// ShortenedIndexBuilder, but preserves the full key instead the substitude key.
-class FullKeyIndexBuilder : public IndexBuilder {
- public:
-  explicit FullKeyIndexBuilder(const Comparator* comparator)
-      : IndexBuilder(comparator),
-        index_block_builder_(1 /* block_restart_interval == 1 */, comparator) {}
-
-  virtual void AddEntry(std::string* last_key_in_current_block,
-                        const Slice* first_key_in_next_block,
-                        const BlockHandle& block_handle) override {
-    std::string handle_encoding;
-    block_handle.EncodeTo(&handle_encoding);
-    index_block_builder_.Add(*last_key_in_current_block, handle_encoding);
-  }
-
-  virtual Slice Finish() override { return index_block_builder_.Finish(); }
-
-  virtual size_t EstimatedSize() const {
-    return index_block_builder_.CurrentSizeEstimate();
-  }
-
- private:
-  BlockBuilder index_block_builder_;
-};
-
-// Create a index builder based on its type.
-IndexBuilder* CreateIndexBuilder(IndexType type, const Comparator* comparator) {
-  switch (type) {
-    case BlockBasedTableOptions::kBinarySearch: {
-      return new ShortenedIndexBuilder(comparator);
-    }
-    default: {
-      assert(!"Do not recognize the index type ");
-      return nullptr;
-    }
-  }
-  // impossible.
-  assert(false);
-  return nullptr;
-}
-
-bool GoodCompressionRatio(size_t compressed_size, size_t raw_size) {
-  // Check to see if compressed less than 12.5%
-  return compressed_size < raw_size - (raw_size / 8u);
-}
-
-Slice CompressBlock(const Slice& raw,
-                    const CompressionOptions& compression_options,
-                    CompressionType* type, std::string* compressed_output) {
-  if (*type == kNoCompression) {
-    return raw;
-  }
-
-  // Will return compressed block contents if (1) the compression method is
-  // supported in this platform and (2) the compression rate is "good enough".
-  switch (*type) {
-    case kSnappyCompression:
-      if (port::Snappy_Compress(compression_options, raw.data(), raw.size(),
-                                compressed_output) &&
-          GoodCompressionRatio(compressed_output->size(), raw.size())) {
-        return *compressed_output;
-      }
-      break;  // fall back to no compression.
-    case kZlibCompression:
-      if (port::Zlib_Compress(compression_options, raw.data(), raw.size(),
-                              compressed_output) &&
-          GoodCompressionRatio(compressed_output->size(), raw.size())) {
-        return *compressed_output;
-      }
-      break;  // fall back to no compression.
-    case kBZip2Compression:
-      if (port::BZip2_Compress(compression_options, raw.data(), raw.size(),
-                               compressed_output) &&
-          GoodCompressionRatio(compressed_output->size(), raw.size())) {
-        return *compressed_output;
-      }
-      break;  // fall back to no compression.
-    case kLZ4Compression:
-      if (port::LZ4_Compress(compression_options, raw.data(), raw.size(),
-                             compressed_output) &&
-          GoodCompressionRatio(compressed_output->size(), raw.size())) {
-        return *compressed_output;
-      }
-      break;  // fall back to no compression.
-    case kLZ4HCCompression:
-      if (port::LZ4HC_Compress(compression_options, raw.data(), raw.size(),
-                               compressed_output) &&
-          GoodCompressionRatio(compressed_output->size(), raw.size())) {
-        return *compressed_output;
-      }
-      break;     // fall back to no compression.
-    default: {}  // Do not recognize this compression type
-  }
-
-  // Compression method is not supported, or not good compression ratio, so just
-  // fall back to uncompressed form.
-  *type = kNoCompression;
-  return raw;
-}
-
-}  // anonymous namespace
-
-// kBlockBasedTableMagicNumber was picked by running
-//    echo rocksdb.table.block_based | sha1sum
-// and taking the leading 64 bits.
-// Please note that kBlockBasedTableMagicNumber may also be accessed by
-// other .cc files so it have to be explicitly declared with "extern".
-extern const uint64_t kBlockBasedTableMagicNumber = 0x88e241b785f4cff7ull;
-// We also support reading and writing legacy block based table format (for
-// backwards compatibility)
-extern const uint64_t kLegacyBlockBasedTableMagicNumber = 0xdb4775248b80fb57ull;
-
-// A collector that collects properties of interest to block-based table.
-// For now this class looks heavy-weight since we only write one additional
-// property.
-// But in the forseeable future, we will add more and more properties that are
-// specific to block-based table.
-class BlockBasedTableBuilder::BlockBasedTablePropertiesCollector
-    : public TablePropertiesCollector {
- public:
-  BlockBasedTablePropertiesCollector(
-      BlockBasedTableOptions::IndexType index_type)
-      : index_type_(index_type) {}
-
-  virtual Status Add(const Slice& key, const Slice& value) {
-    // Intentionally left blank. Have no interest in collecting stats for
-    // individual key/value pairs.
-    return Status::OK();
-  }
-
-  virtual Status Finish(UserCollectedProperties* properties) {
-    std::string val;
-    PutFixed32(&val, static_cast<uint32_t>(index_type_));
-    properties->insert({BlockBasedTablePropertyNames::kIndexType, val});
-
-    return Status::OK();
-  }
-
-  // The name of the properties collector can be used for debugging purpose.
-  virtual const char* Name() const {
-    return "BlockBasedTablePropertiesCollector";
-  }
-
-  virtual UserCollectedProperties GetReadableProperties() const {
-    // Intentionally left blank.
-    return UserCollectedProperties();
-  }
-
- private:
-  BlockBasedTableOptions::IndexType index_type_;
-};
-
-struct BlockBasedTableBuilder::Rep {
-  Options options;
-  const InternalKeyComparator& internal_comparator;
-  WritableFile* file;
-  uint64_t offset = 0;
-  Status status;
-  BlockBuilder data_block;
-  std::unique_ptr<IndexBuilder> index_builder;
-
-  std::string last_key;
-  CompressionType compression_type;
-  ChecksumType checksum_type;
-  TableProperties props;
-
-  bool closed = false;  // Either Finish() or Abandon() has been called.
-  FilterBlockBuilder* filter_block;
-  char compressed_cache_key_prefix[BlockBasedTable::kMaxCacheKeyPrefixSize];
-  size_t compressed_cache_key_prefix_size;
-
-  BlockHandle pending_handle;  // Handle to add to index block
-
-  std::string compressed_output;
-  std::unique_ptr<FlushBlockPolicy> flush_block_policy;
-
-  Rep(const Options& opt, const InternalKeyComparator& icomparator,
-      WritableFile* f, FlushBlockPolicyFactory* flush_block_policy_factory,
-      CompressionType compression_type, IndexType index_block_type,
-      ChecksumType checksum_type)
-      : options(opt),
-        internal_comparator(icomparator),
-        file(f),
-        data_block(options, &internal_comparator),
-        index_builder(
-            CreateIndexBuilder(index_block_type, &internal_comparator)),
-        compression_type(compression_type),
-        checksum_type(checksum_type),
-        filter_block(opt.filter_policy == nullptr
-                         ? nullptr
-                         : new FilterBlockBuilder(opt, &internal_comparator)),
-        flush_block_policy(flush_block_policy_factory->NewFlushBlockPolicy(
-            options, data_block)) {
-    options.table_properties_collectors.push_back(
-        std::make_shared<BlockBasedTablePropertiesCollector>(index_block_type));
-  }
-};
-
-// TODO(sdong): Currently only write out binary search index. In
-// BlockBasedTableReader, Hash index will be built using binary search index.
-BlockBasedTableBuilder::BlockBasedTableBuilder(
-    const Options& options, const BlockBasedTableOptions& table_options,
-    const InternalKeyComparator& internal_comparator, WritableFile* file,
-    CompressionType compression_type)
-    : rep_(new Rep(options, internal_comparator, file,
-                   table_options.flush_block_policy_factory.get(),
-                   compression_type,
-                   BlockBasedTableOptions::IndexType::kBinarySearch,
-                   table_options.checksum)) {
-  if (rep_->filter_block != nullptr) {
-    rep_->filter_block->StartBlock(0);
-  }
-  if (options.block_cache_compressed.get() != nullptr) {
-    BlockBasedTable::GenerateCachePrefix(
-        options.block_cache_compressed.get(), file,
-        &rep_->compressed_cache_key_prefix[0],
-        &rep_->compressed_cache_key_prefix_size);
-  }
-}
-
-BlockBasedTableBuilder::~BlockBasedTableBuilder() {
-  assert(rep_->closed);  // Catch errors where caller forgot to call Finish()
-  delete rep_->filter_block;
-  delete rep_;
-}
-
-void BlockBasedTableBuilder::Add(const Slice& key, const Slice& value) {
-  Rep* r = rep_;
-  assert(!r->closed);
-  if (!ok()) return;
-  if (r->props.num_entries > 0) {
-    assert(r->internal_comparator.Compare(key, Slice(r->last_key)) > 0);
-  }
-
-  auto should_flush = r->flush_block_policy->Update(key, value);
-  if (should_flush) {
-    assert(!r->data_block.empty());
-    Flush();
-
-    // Add item to index block.
-    // We do not emit the index entry for a block until we have seen the
-    // first key for the next data block.  This allows us to use shorter
-    // keys in the index block.  For example, consider a block boundary
-    // between the keys "the quick brown fox" and "the who".  We can use
-    // "the r" as the key for the index block entry since it is >= all
-    // entries in the first block and < all entries in subsequent
-    // blocks.
-    if (ok()) {
-      r->index_builder->AddEntry(&r->last_key, &key, r->pending_handle);
-    }
-  }
-
-  if (r->filter_block != nullptr) {
-    r->filter_block->AddKey(key);
-  }
-
-  r->last_key.assign(key.data(), key.size());
-  r->data_block.Add(key, value);
-  r->props.num_entries++;
-  r->props.raw_key_size += key.size();
-  r->props.raw_value_size += value.size();
-
-  NotifyCollectTableCollectorsOnAdd(
-      key,
-      value,
-      r->options.table_properties_collectors,
-      r->options.info_log.get()
-  );
-}
-
-void BlockBasedTableBuilder::Flush() {
-  Rep* r = rep_;
-  assert(!r->closed);
-  if (!ok()) return;
-  if (r->data_block.empty()) return;
-  WriteBlock(&r->data_block, &r->pending_handle);
-  if (ok()) {
-    r->status = r->file->Flush();
-  }
-  if (r->filter_block != nullptr) {
-    r->filter_block->StartBlock(r->offset);
-  }
-  r->props.data_size = r->offset;
-  ++r->props.num_data_blocks;
-}
-
-void BlockBasedTableBuilder::WriteBlock(BlockBuilder* block,
-                                        BlockHandle* handle) {
-  WriteBlock(block->Finish(), handle);
-  block->Reset();
-}
-
-void BlockBasedTableBuilder::WriteBlock(const Slice& raw_block_contents,
-                                        BlockHandle* handle) {
-  // File format contains a sequence of blocks where each block has:
-  //    block_data: uint8[n]
-  //    type: uint8
-  //    crc: uint32
-  assert(ok());
-  Rep* r = rep_;
-
-  auto type = r->compression_type;
-  auto block_contents =
-      CompressBlock(raw_block_contents, r->options.compression_opts, &type,
-                    &r->compressed_output);
-  WriteRawBlock(block_contents, type, handle);
-  r->compressed_output.clear();
-}
-
-void BlockBasedTableBuilder::WriteRawBlock(const Slice& block_contents,
-                                           CompressionType type,
-                                           BlockHandle* handle) {
-  Rep* r = rep_;
-  StopWatch sw(r->options.env, r->options.statistics.get(),
-               WRITE_RAW_BLOCK_MICROS);
-  handle->set_offset(r->offset);
-  handle->set_size(block_contents.size());
-  r->status = r->file->Append(block_contents);
-  if (r->status.ok()) {
-    char trailer[kBlockTrailerSize];
-    trailer[0] = type;
-    char* trailer_without_type = trailer + 1;
-    switch (r->checksum_type) {
-      case kNoChecksum:
-        // we don't support no checksum yet
-        assert(false);
-        // intentional fallthrough in release binary
-      case kCRC32c: {
-        auto crc = crc32c::Value(block_contents.data(), block_contents.size());
-        crc = crc32c::Extend(crc, trailer, 1);  // Extend to cover block type
-        EncodeFixed32(trailer_without_type, crc32c::Mask(crc));
-        break;
-      }
-      case kxxHash: {
-        void* xxh = XXH32_init(0);
-        XXH32_update(xxh, block_contents.data(), block_contents.size());
-        XXH32_update(xxh, trailer, 1);  // Extend  to cover block type
-        EncodeFixed32(trailer_without_type, XXH32_digest(xxh));
-        break;
-      }
-    }
-
-    r->status = r->file->Append(Slice(trailer, kBlockTrailerSize));
-    if (r->status.ok()) {
-      r->status = InsertBlockInCache(block_contents, type, handle);
-    }
-    if (r->status.ok()) {
-      r->offset += block_contents.size() + kBlockTrailerSize;
-    }
-  }
-}
-
-Status BlockBasedTableBuilder::status() const {
-  return rep_->status;
-}
-
-static void DeleteCachedBlock(const Slice& key, void* value) {
-  Block* block = reinterpret_cast<Block*>(value);
-  delete block;
-}
-
-//
-// Make a copy of the block contents and insert into compressed block cache
-//
-Status BlockBasedTableBuilder::InsertBlockInCache(const Slice& block_contents,
-                                 const CompressionType type,
-                                 const BlockHandle* handle) {
-  Rep* r = rep_;
-  Cache* block_cache_compressed = r->options.block_cache_compressed.get();
-
-  if (type != kNoCompression && block_cache_compressed != nullptr) {
-
-    Cache::Handle* cache_handle = nullptr;
-    size_t size = block_contents.size();
-
-    char* ubuf = new char[size];             // make a new copy
-    memcpy(ubuf, block_contents.data(), size);
-
-    BlockContents results;
-    Slice sl(ubuf, size);
-    results.data = sl;
-    results.cachable = true; // XXX
-    results.heap_allocated = true;
-    results.compression_type = type;
-
-    Block* block = new Block(results);
-
-    // make cache key by appending the file offset to the cache prefix id
-    char* end = EncodeVarint64(
-                  r->compressed_cache_key_prefix +
-                  r->compressed_cache_key_prefix_size,
-                  handle->offset());
-    Slice key(r->compressed_cache_key_prefix, static_cast<size_t>
-              (end - r->compressed_cache_key_prefix));
-
-    // Insert into compressed block cache.
-    cache_handle = block_cache_compressed->Insert(key, block, block->size(),
-                                                  &DeleteCachedBlock);
-    block_cache_compressed->Release(cache_handle);
-
-    // Invalidate OS cache.
-    r->file->InvalidateCache(r->offset, size);
-  }
-  return Status::OK();
-}
-
-Status BlockBasedTableBuilder::Finish() {
-  Rep* r = rep_;
-  bool empty_data_block = r->data_block.empty();
-  Flush();
-  assert(!r->closed);
-  r->closed = true;
-
-  BlockHandle filter_block_handle,
-              metaindex_block_handle,
-              index_block_handle;
-
-  // Write filter block
-  if (ok() && r->filter_block != nullptr) {
-    auto filter_contents = r->filter_block->Finish();
-    r->props.filter_size = filter_contents.size();
-    WriteRawBlock(filter_contents, kNoCompression, &filter_block_handle);
-  }
-
-  // To make sure properties block is able to keep the accurate size of index
-  // block, we will finish writing all index entries here and flush them
-  // to storage after metaindex block is written.
-  if (ok() && !empty_data_block) {
-    r->index_builder->AddEntry(&r->last_key, nullptr /* no next data block */,
-                               r->pending_handle);
-  }
-
-  // Write meta blocks and metaindex block with the following order.
-  //    1. [meta block: filter]
-  //    2. [meta block: properties]
-  //    3. [metaindex block]
-  if (ok()) {
-    MetaIndexBuilder meta_index_builer;
-
-    // Write filter block.
-    if (r->filter_block != nullptr) {
-      // Add mapping from "<filter_block_prefix>.Name" to location
-      // of filter data.
-      std::string key = BlockBasedTable::kFilterBlockPrefix;
-      key.append(r->options.filter_policy->Name());
-      meta_index_builer.Add(key, filter_block_handle);
-    }
-
-    // Write properties block.
-    {
-      PropertyBlockBuilder property_block_builder;
-      std::vector<std::string> failed_user_prop_collectors;
-      r->props.filter_policy_name = r->options.filter_policy != nullptr ?
-          r->options.filter_policy->Name() : "";
-      r->props.index_size =
-          r->index_builder->EstimatedSize() + kBlockTrailerSize;
-
-      // Add basic properties
-      property_block_builder.AddTableProperty(r->props);
-
-      // Add use collected properties
-      NotifyCollectTableCollectorsOnFinish(
-          r->options.table_properties_collectors,
-          r->options.info_log.get(),
-          &property_block_builder
-      );
-
-      BlockHandle properties_block_handle;
-      WriteRawBlock(
-          property_block_builder.Finish(),
-          kNoCompression,
-          &properties_block_handle
-      );
-
-      meta_index_builer.Add(kPropertiesBlock,
-                            properties_block_handle);
-    }  // end of properties block writing
-
-    WriteRawBlock(
-        meta_index_builer.Finish(),
-        kNoCompression,
-        &metaindex_block_handle
-    );
-  }  // meta blocks and metaindex block.
-
-  // Write index block
-  if (ok()) {
-    WriteBlock(r->index_builder->Finish(), &index_block_handle);
-  }
-
-  // Write footer
-  if (ok()) {
-    // No need to write out new footer if we're using default checksum.
-    // We're writing legacy magic number because we want old versions of RocksDB
-    // be able to read files generated with new release (just in case if
-    // somebody wants to roll back after an upgrade)
-    // TODO(icanadi) at some point in the future, when we're absolutely sure
-    // nobody will roll back to RocksDB 2.x versions, retire the legacy magic
-    // number and always write new table files with new magic number
-    bool legacy = (r->checksum_type == kCRC32c);
-    Footer footer(legacy ? kLegacyBlockBasedTableMagicNumber
-                         : kBlockBasedTableMagicNumber);
-    footer.set_metaindex_handle(metaindex_block_handle);
-    footer.set_index_handle(index_block_handle);
-    footer.set_checksum(r->checksum_type);
-    std::string footer_encoding;
-    footer.EncodeTo(&footer_encoding);
-    r->status = r->file->Append(footer_encoding);
-    if (r->status.ok()) {
-      r->offset += footer_encoding.size();
-    }
-  }
-
-  // Print out the table stats
-  if (ok()) {
-    // user collected properties
-    std::string user_collected;
-    user_collected.reserve(1024);
-    for (auto collector : r->options.table_properties_collectors) {
-      for (const auto& prop : collector->GetReadableProperties()) {
-        user_collected.append(prop.first);
-        user_collected.append("=");
-        user_collected.append(prop.second);
-        user_collected.append("; ");
-      }
-    }
-
-    Log(
-        r->options.info_log,
-        "Table was constructed:\n"
-        "  [basic properties]: %s\n"
-        "  [user collected properties]: %s",
-        r->props.ToString().c_str(),
-        user_collected.c_str()
-    );
-  }
-
-  return r->status;
-}
-
-void BlockBasedTableBuilder::Abandon() {
-  Rep* r = rep_;
-  assert(!r->closed);
-  r->closed = true;
-}
-
-uint64_t BlockBasedTableBuilder::NumEntries() const {
-  return rep_->props.num_entries;
-}
-
-uint64_t BlockBasedTableBuilder::FileSize() const {
-  return rep_->offset;
-}
-
-const std::string BlockBasedTable::kFilterBlockPrefix =
-    "filter.";
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_based_table_builder.h b/src/rocksdb/table/block_based_table_builder.h
deleted file mode 100644
index 5871427..0000000
--- a/src/rocksdb/table/block_based_table_builder.h
+++ /dev/null
@@ -1,91 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <stdint.h>
-
-#include "rocksdb/flush_block_policy.h"
-#include "rocksdb/options.h"
-#include "rocksdb/status.h"
-#include "table/table_builder.h"
-
-namespace rocksdb {
-
-class BlockBuilder;
-class BlockHandle;
-class WritableFile;
-struct BlockBasedTableOptions;
-
-class BlockBasedTableBuilder : public TableBuilder {
- public:
-  // Create a builder that will store the contents of the table it is
-  // building in *file.  Does not close the file.  It is up to the
-  // caller to close the file after calling Finish().
-  BlockBasedTableBuilder(const Options& options,
-                         const BlockBasedTableOptions& table_options,
-                         const InternalKeyComparator& internal_comparator,
-                         WritableFile* file, CompressionType compression_type);
-
-  // REQUIRES: Either Finish() or Abandon() has been called.
-  ~BlockBasedTableBuilder();
-
-  // Add key,value to the table being constructed.
-  // REQUIRES: key is after any previously added key according to comparator.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Add(const Slice& key, const Slice& value) override;
-
-  // Return non-ok iff some error has been detected.
-  Status status() const override;
-
-  // Finish building the table.  Stops using the file passed to the
-  // constructor after this function returns.
-  // REQUIRES: Finish(), Abandon() have not been called
-  Status Finish() override;
-
-  // Indicate that the contents of this builder should be abandoned.  Stops
-  // using the file passed to the constructor after this function returns.
-  // If the caller is not going to call Finish(), it must call Abandon()
-  // before destroying this builder.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Abandon() override;
-
-  // Number of calls to Add() so far.
-  uint64_t NumEntries() const override;
-
-  // Size of the file generated so far.  If invoked after a successful
-  // Finish() call, returns the size of the final generated file.
-  uint64_t FileSize() const override;
-
- private:
-  bool ok() const { return status().ok(); }
-  // Call block's Finish() method and then write the finalize block contents to
-  // file.
-  void WriteBlock(BlockBuilder* block, BlockHandle* handle);
-  // Directly write block content to the file.
-  void WriteBlock(const Slice& block_contents, BlockHandle* handle);
-  void WriteRawBlock(const Slice& data, CompressionType, BlockHandle* handle);
-  Status InsertBlockInCache(const Slice& block_contents,
-                            const CompressionType type,
-                            const BlockHandle* handle);
-  struct Rep;
-  class BlockBasedTablePropertiesCollector;
-  Rep* rep_;
-
-  // Advanced operation: flush any buffered key/value pairs to file.
-  // Can be used to ensure that two adjacent entries never live in
-  // the same data block.  Most clients should not need to use this method.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Flush();
-
-  // No copying allowed
-  BlockBasedTableBuilder(const BlockBasedTableBuilder&) = delete;
-  void operator=(const BlockBasedTableBuilder&) = delete;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_based_table_factory.cc b/src/rocksdb/table/block_based_table_factory.cc
deleted file mode 100644
index 822adee..0000000
--- a/src/rocksdb/table/block_based_table_factory.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-
-#include "table/block_based_table_factory.h"
-
-#include <memory>
-#include <string>
-#include <stdint.h>
-
-#include "rocksdb/flush_block_policy.h"
-#include "table/block_based_table_builder.h"
-#include "table/block_based_table_reader.h"
-#include "port/port.h"
-
-namespace rocksdb {
-
-BlockBasedTableFactory::BlockBasedTableFactory(
-    const BlockBasedTableOptions& table_options)
-    : table_options_(table_options) {
-  if (table_options_.flush_block_policy_factory == nullptr) {
-    table_options_.flush_block_policy_factory.reset(
-        new FlushBlockBySizePolicyFactory());
-  }
-}
-
-Status BlockBasedTableFactory::NewTableReader(
-    const Options& options, const EnvOptions& soptions,
-    const InternalKeyComparator& internal_comparator,
-    unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-    unique_ptr<TableReader>* table_reader) const {
-  return BlockBasedTable::Open(options, soptions, table_options_,
-                               internal_comparator, std::move(file), file_size,
-                               table_reader);
-}
-
-TableBuilder* BlockBasedTableFactory::NewTableBuilder(
-    const Options& options, const InternalKeyComparator& internal_comparator,
-    WritableFile* file, CompressionType compression_type) const {
-  auto table_builder = new BlockBasedTableBuilder(
-      options, table_options_, internal_comparator, file, compression_type);
-
-  return table_builder;
-}
-
-TableFactory* NewBlockBasedTableFactory(
-    const BlockBasedTableOptions& table_options) {
-  return new BlockBasedTableFactory(table_options);
-}
-
-const std::string BlockBasedTablePropertyNames::kIndexType =
-    "rocksdb.block.based.table.index.type";
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_based_table_factory.h b/src/rocksdb/table/block_based_table_factory.h
deleted file mode 100644
index 492349c..0000000
--- a/src/rocksdb/table/block_based_table_factory.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <memory>
-#include <stdint.h>
-
-#include "rocksdb/flush_block_policy.h"
-#include "rocksdb/options.h"
-#include "rocksdb/table.h"
-
-namespace rocksdb {
-
-struct Options;
-struct EnvOptions;
-
-using std::unique_ptr;
-class BlockBasedTableBuilder;
-
-class BlockBasedTableFactory : public TableFactory {
- public:
-  explicit BlockBasedTableFactory(
-      const BlockBasedTableOptions& table_options = BlockBasedTableOptions());
-
-  ~BlockBasedTableFactory() {}
-
-  const char* Name() const override { return "BlockBasedTable"; }
-
-  Status NewTableReader(const Options& options, const EnvOptions& soptions,
-                        const InternalKeyComparator& internal_comparator,
-                        unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-                        unique_ptr<TableReader>* table_reader) const override;
-
-  TableBuilder* NewTableBuilder(
-      const Options& options, const InternalKeyComparator& internal_comparator,
-      WritableFile* file, CompressionType compression_type) const override;
-
- private:
-  BlockBasedTableOptions table_options_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_based_table_reader.cc b/src/rocksdb/table/block_based_table_reader.cc
deleted file mode 100644
index 9538007..0000000
--- a/src/rocksdb/table/block_based_table_reader.cc
+++ /dev/null
@@ -1,1129 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/block_based_table_reader.h"
-
-#include <string>
-#include <utility>
-
-#include "db/dbformat.h"
-
-#include "rocksdb/cache.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-
-#include "table/block.h"
-#include "table/filter_block.h"
-#include "table/block_hash_index.h"
-#include "table/format.h"
-#include "table/meta_blocks.h"
-#include "table/two_level_iterator.h"
-
-#include "util/coding.h"
-#include "util/perf_context_imp.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-extern const uint64_t kBlockBasedTableMagicNumber;
-using std::unique_ptr;
-
-typedef BlockBasedTable::IndexReader IndexReader;
-
-namespace {
-
-// The longest the prefix of the cache key used to identify blocks can be.
-// We are using the fact that we know for Posix files the unique ID is three
-// varints.
-// For some reason, compiling for iOS complains that this variable is unused
-const size_t kMaxCacheKeyPrefixSize __attribute__((unused)) =
-    kMaxVarint64Length * 3 + 1;
-
-// Read the block identified by "handle" from "file".
-// The only relevant option is options.verify_checksums for now.
-// Set *didIO to true if didIO is not null.
-// On failure return non-OK.
-// On success fill *result and return OK - caller owns *result
-Status ReadBlockFromFile(RandomAccessFile* file, const Footer& footer,
-                         const ReadOptions& options, const BlockHandle& handle,
-                         Block** result, Env* env, bool* didIO = nullptr,
-                         bool do_uncompress = true) {
-  BlockContents contents;
-  Status s = ReadBlockContents(file, footer, options, handle, &contents, env,
-                               do_uncompress);
-  if (s.ok()) {
-    *result = new Block(contents);
-  }
-
-  if (didIO != nullptr) {
-    *didIO = true;
-  }
-  return s;
-}
-
-// Delete the resource that is held by the iterator.
-template <class ResourceType>
-void DeleteHeldResource(void* arg, void* ignored) {
-  delete reinterpret_cast<ResourceType*>(arg);
-}
-
-// Delete the entry resided in the cache.
-template <class Entry>
-void DeleteCachedEntry(const Slice& key, void* value) {
-  auto entry = reinterpret_cast<Entry*>(value);
-  delete entry;
-}
-
-// Release the cached entry and decrement its ref count.
-void ReleaseCachedEntry(void* arg, void* h) {
-  Cache* cache = reinterpret_cast<Cache*>(arg);
-  Cache::Handle* handle = reinterpret_cast<Cache::Handle*>(h);
-  cache->Release(handle);
-}
-
-Slice GetCacheKey(const char* cache_key_prefix, size_t cache_key_prefix_size,
-                  const BlockHandle& handle, char* cache_key) {
-  assert(cache_key != nullptr);
-  assert(cache_key_prefix_size != 0);
-  assert(cache_key_prefix_size <= kMaxCacheKeyPrefixSize);
-  memcpy(cache_key, cache_key_prefix, cache_key_prefix_size);
-  char* end =
-      EncodeVarint64(cache_key + cache_key_prefix_size, handle.offset());
-  return Slice(cache_key, static_cast<size_t>(end - cache_key));
-}
-
-Cache::Handle* GetEntryFromCache(Cache* block_cache, const Slice& key,
-                                 Tickers block_cache_miss_ticker,
-                                 Tickers block_cache_hit_ticker,
-                                 Statistics* statistics) {
-  auto cache_handle = block_cache->Lookup(key);
-  if (cache_handle != nullptr) {
-    PERF_COUNTER_ADD(block_cache_hit_count, 1);
-    // overall cache hit
-    RecordTick(statistics, BLOCK_CACHE_HIT);
-    // block-type specific cache hit
-    RecordTick(statistics, block_cache_hit_ticker);
-  } else {
-    // overall cache miss
-    RecordTick(statistics, BLOCK_CACHE_MISS);
-    // block-type specific cache miss
-    RecordTick(statistics, block_cache_miss_ticker);
-  }
-
-  return cache_handle;
-}
-
-}  // namespace
-
-// -- IndexReader and its subclasses
-// IndexReader is the interface that provide the functionality for index access.
-class BlockBasedTable::IndexReader {
- public:
-  explicit IndexReader(const Comparator* comparator)
-      : comparator_(comparator) {}
-
-  virtual ~IndexReader() {}
-
-  // Create an iterator for index access.
-  virtual Iterator* NewIterator() = 0;
-
-  // The size of the index.
-  virtual size_t size() const = 0;
-
- protected:
-  const Comparator* comparator_;
-};
-
-// Index that allows binary search lookup for the first key of each block.
-// This class can be viewed as a thin wrapper for `Block` class which already
-// supports binary search.
-class BinarySearchIndexReader : public IndexReader {
- public:
-  // Read index from the file and create an intance for
-  // `BinarySearchIndexReader`.
-  // On success, index_reader will be populated; otherwise it will remain
-  // unmodified.
-  static Status Create(RandomAccessFile* file, const Footer& footer,
-                       const BlockHandle& index_handle, Env* env,
-                       const Comparator* comparator,
-                       IndexReader** index_reader) {
-    Block* index_block = nullptr;
-    auto s = ReadBlockFromFile(file, footer, ReadOptions(), index_handle,
-                               &index_block, env);
-
-    if (s.ok()) {
-      *index_reader = new BinarySearchIndexReader(comparator, index_block);
-    }
-
-    return s;
-  }
-
-  virtual Iterator* NewIterator() override {
-    return index_block_->NewIterator(comparator_);
-  }
-
-  virtual size_t size() const override { return index_block_->size(); }
-
- private:
-  BinarySearchIndexReader(const Comparator* comparator, Block* index_block)
-      : IndexReader(comparator), index_block_(index_block) {
-    assert(index_block_ != nullptr);
-  }
-  std::unique_ptr<Block> index_block_;
-};
-
-// Index that leverages an internal hash table to quicken the lookup for a given
-// key.
-// @param data_iter_gen, equavalent to BlockBasedTable::NewIterator(). But that
-// functions requires index to be initalized. To avoid this problem external
-// caller will pass a function that can create the iterator over the entries
-// without the table to be fully initialized.
-class HashIndexReader : public IndexReader {
- public:
-  static Status Create(RandomAccessFile* file, const Footer& footer,
-                       const BlockHandle& index_handle, Env* env,
-                       const Comparator* comparator,
-                       std::function<Iterator*(Iterator*)> data_iter_gen,
-                       const SliceTransform* prefix_extractor,
-                       IndexReader** index_reader) {
-    assert(prefix_extractor);
-    Block* index_block = nullptr;
-    auto s = ReadBlockFromFile(file, footer, ReadOptions(), index_handle,
-                               &index_block, env);
-
-    if (!s.ok()) {
-      return s;
-    }
-
-    *index_reader = new HashIndexReader(comparator, index_block);
-    std::unique_ptr<Iterator> index_iter(index_block->NewIterator(nullptr));
-    std::unique_ptr<Iterator> data_iter(
-        data_iter_gen(index_block->NewIterator(nullptr)));
-    auto hash_index = CreateBlockHashIndex(index_iter.get(), data_iter.get(),
-                                           index_block->NumRestarts(),
-                                           comparator, prefix_extractor);
-    index_block->SetBlockHashIndex(hash_index);
-    return s;
-  }
-
-  virtual Iterator* NewIterator() override {
-    return index_block_->NewIterator(comparator_);
-  }
-
-  virtual size_t size() const override { return index_block_->size(); }
-
- private:
-  HashIndexReader(const Comparator* comparator, Block* index_block)
-      : IndexReader(comparator), index_block_(index_block) {
-    assert(index_block_ != nullptr);
-  }
-  std::unique_ptr<Block> index_block_;
-};
-
-
-struct BlockBasedTable::Rep {
-  Rep(const EnvOptions& storage_options,
-      const InternalKeyComparator& internal_comparator)
-      : soptions(storage_options), internal_comparator(internal_comparator) {}
-
-  Options options;
-  const EnvOptions& soptions;
-  const InternalKeyComparator& internal_comparator;
-  Status status;
-  unique_ptr<RandomAccessFile> file;
-  char cache_key_prefix[kMaxCacheKeyPrefixSize];
-  size_t cache_key_prefix_size = 0;
-  char compressed_cache_key_prefix[kMaxCacheKeyPrefixSize];
-  size_t compressed_cache_key_prefix_size = 0;
-
-  // Footer contains the fixed table information
-  Footer footer;
-  // index_reader and filter will be populated and used only when
-  // options.block_cache is nullptr; otherwise we will get the index block via
-  // the block cache.
-  unique_ptr<IndexReader> index_reader;
-  unique_ptr<FilterBlockReader> filter;
-
-  std::shared_ptr<const TableProperties> table_properties;
-  BlockBasedTableOptions::IndexType index_type;
-  // TODO(kailiu) It is very ugly to use internal key in table, since table
-  // module should not be relying on db module. However to make things easier
-  // and compatible with existing code, we introduce a wrapper that allows
-  // block to extract prefix without knowing if a key is internal or not.
-  unique_ptr<SliceTransform> internal_prefix_transform;
-};
-
-BlockBasedTable::~BlockBasedTable() {
-  delete rep_;
-}
-
-// CachableEntry represents the entries that *may* be fetched from block cache.
-//  field `value` is the item we want to get.
-//  field `cache_handle` is the cache handle to the block cache. If the value
-//    was not read from cache, `cache_handle` will be nullptr.
-template <class TValue>
-struct BlockBasedTable::CachableEntry {
-  CachableEntry(TValue* value, Cache::Handle* cache_handle)
-    : value(value)
-    , cache_handle(cache_handle) {
-  }
-  CachableEntry(): CachableEntry(nullptr, nullptr) { }
-  void Release(Cache* cache) {
-    if (cache_handle) {
-      cache->Release(cache_handle);
-      value = nullptr;
-      cache_handle = nullptr;
-    }
-  }
-
-  TValue* value = nullptr;
-  // if the entry is from the cache, cache_handle will be populated.
-  Cache::Handle* cache_handle = nullptr;
-};
-
-// Helper function to setup the cache key's prefix for the Table.
-void BlockBasedTable::SetupCacheKeyPrefix(Rep* rep) {
-  assert(kMaxCacheKeyPrefixSize >= 10);
-  rep->cache_key_prefix_size = 0;
-  rep->compressed_cache_key_prefix_size = 0;
-  if (rep->options.block_cache != nullptr) {
-    GenerateCachePrefix(rep->options.block_cache.get(), rep->file.get(),
-                        &rep->cache_key_prefix[0],
-                        &rep->cache_key_prefix_size);
-  }
-  if (rep->options.block_cache_compressed != nullptr) {
-    GenerateCachePrefix(rep->options.block_cache_compressed.get(),
-                        rep->file.get(), &rep->compressed_cache_key_prefix[0],
-                        &rep->compressed_cache_key_prefix_size);
-  }
-}
-
-void BlockBasedTable::GenerateCachePrefix(Cache* cc,
-    RandomAccessFile* file, char* buffer, size_t* size) {
-
-  // generate an id from the file
-  *size = file->GetUniqueId(buffer, kMaxCacheKeyPrefixSize);
-
-  // If the prefix wasn't generated or was too long,
-  // create one from the cache.
-  if (*size == 0) {
-    char* end = EncodeVarint64(buffer, cc->NewId());
-    *size = static_cast<size_t>(end - buffer);
-  }
-}
-
-void BlockBasedTable::GenerateCachePrefix(Cache* cc,
-    WritableFile* file, char* buffer, size_t* size) {
-
-  // generate an id from the file
-  *size = file->GetUniqueId(buffer, kMaxCacheKeyPrefixSize);
-
-  // If the prefix wasn't generated or was too long,
-  // create one from the cache.
-  if (*size == 0) {
-    char* end = EncodeVarint64(buffer, cc->NewId());
-    *size = static_cast<size_t>(end - buffer);
-  }
-}
-
-Status BlockBasedTable::Open(const Options& options, const EnvOptions& soptions,
-                             const BlockBasedTableOptions& table_options,
-                             const InternalKeyComparator& internal_comparator,
-                             unique_ptr<RandomAccessFile>&& file,
-                             uint64_t file_size,
-                             unique_ptr<TableReader>* table_reader) {
-  table_reader->reset();
-
-  Footer footer(kBlockBasedTableMagicNumber);
-  auto s = ReadFooterFromFile(file.get(), file_size, &footer);
-  if (!s.ok()) return s;
-
-  // We've successfully read the footer and the index block: we're
-  // ready to serve requests.
-  Rep* rep = new BlockBasedTable::Rep(soptions, internal_comparator);
-  rep->options = options;
-  rep->file = std::move(file);
-  rep->footer = footer;
-  rep->index_type = table_options.index_type;
-  SetupCacheKeyPrefix(rep);
-  unique_ptr<BlockBasedTable> new_table(new BlockBasedTable(rep));
-
-  // Read meta index
-  std::unique_ptr<Block> meta;
-  std::unique_ptr<Iterator> meta_iter;
-  s = ReadMetaBlock(rep, &meta, &meta_iter);
-
-  // Read the properties
-  bool found_properties_block = true;
-  s = SeekToPropertiesBlock(meta_iter.get(), &found_properties_block);
-
-  if (found_properties_block) {
-    s = meta_iter->status();
-    TableProperties* table_properties = nullptr;
-    if (s.ok()) {
-      s = ReadProperties(meta_iter->value(), rep->file.get(), rep->footer,
-                         rep->options.env, rep->options.info_log.get(),
-                         &table_properties);
-    }
-
-    if (!s.ok()) {
-      auto err_msg =
-        "[Warning] Encountered error while reading data from properties "
-        "block " + s.ToString();
-      Log(rep->options.info_log, "%s", err_msg.c_str());
-    } else {
-      rep->table_properties.reset(table_properties);
-    }
-  } else {
-    Log(WARN_LEVEL, rep->options.info_log,
-        "Cannot find Properties block from file.");
-  }
-
-  // Will use block cache for index/filter blocks access?
-  if (options.block_cache && table_options.cache_index_and_filter_blocks) {
-    // Hack: Call NewIndexIterator() to implicitly add index to the block_cache
-    unique_ptr<Iterator> iter(new_table->NewIndexIterator(ReadOptions()));
-    s = iter->status();
-
-    if (s.ok()) {
-      // Hack: Call GetFilter() to implicitly add filter to the block_cache
-      auto filter_entry = new_table->GetFilter();
-      filter_entry.Release(options.block_cache.get());
-    }
-  } else {
-    // If we don't use block cache for index/filter blocks access, we'll
-    // pre-load these blocks, which will kept in member variables in Rep
-    // and with a same life-time as this table object.
-    IndexReader* index_reader = nullptr;
-    // TODO: we never really verify check sum for index block
-    s = new_table->CreateIndexReader(&index_reader);
-
-    if (s.ok()) {
-      rep->index_reader.reset(index_reader);
-
-      // Set filter block
-      if (rep->options.filter_policy) {
-        std::string key = kFilterBlockPrefix;
-        key.append(rep->options.filter_policy->Name());
-        meta_iter->Seek(key);
-
-        if (meta_iter->Valid() && meta_iter->key() == Slice(key)) {
-          rep->filter.reset(ReadFilter(meta_iter->value(), rep));
-        }
-      }
-    } else {
-      delete index_reader;
-    }
-  }
-
-  if (s.ok()) {
-    *table_reader = std::move(new_table);
-  }
-
-  return s;
-}
-
-void BlockBasedTable::SetupForCompaction() {
-  switch (rep_->options.access_hint_on_compaction_start) {
-    case Options::NONE:
-      break;
-    case Options::NORMAL:
-      rep_->file->Hint(RandomAccessFile::NORMAL);
-      break;
-    case Options::SEQUENTIAL:
-      rep_->file->Hint(RandomAccessFile::SEQUENTIAL);
-      break;
-    case Options::WILLNEED:
-      rep_->file->Hint(RandomAccessFile::WILLNEED);
-      break;
-    default:
-      assert(false);
-  }
-  compaction_optimized_ = true;
-}
-
-std::shared_ptr<const TableProperties> BlockBasedTable::GetTableProperties()
-    const {
-  return rep_->table_properties;
-}
-
-// Load the meta-block from the file. On success, return the loaded meta block
-// and its iterator.
-Status BlockBasedTable::ReadMetaBlock(
-    Rep* rep,
-    std::unique_ptr<Block>* meta_block,
-    std::unique_ptr<Iterator>* iter) {
-  // TODO(sanjay): Skip this if footer.metaindex_handle() size indicates
-  // it is an empty block.
-  //  TODO: we never really verify check sum for meta index block
-  Block* meta = nullptr;
-  Status s = ReadBlockFromFile(
-      rep->file.get(),
-      rep->footer,
-      ReadOptions(),
-      rep->footer.metaindex_handle(),
-      &meta,
-      rep->options.env);
-
-    if (!s.ok()) {
-      auto err_msg =
-        "[Warning] Encountered error while reading data from properties"
-        "block " + s.ToString();
-      Log(rep->options.info_log, "%s", err_msg.c_str());
-    }
-  if (!s.ok()) {
-    delete meta;
-    return s;
-  }
-
-  meta_block->reset(meta);
-  // meta block uses bytewise comparator.
-  iter->reset(meta->NewIterator(BytewiseComparator()));
-  return Status::OK();
-}
-
-Status BlockBasedTable::GetDataBlockFromCache(
-    const Slice& block_cache_key, const Slice& compressed_block_cache_key,
-    Cache* block_cache, Cache* block_cache_compressed, Statistics* statistics,
-    const ReadOptions& read_options,
-    BlockBasedTable::CachableEntry<Block>* block) {
-  Status s;
-  Block* compressed_block = nullptr;
-  Cache::Handle* block_cache_compressed_handle = nullptr;
-
-  // Lookup uncompressed cache first
-  if (block_cache != nullptr) {
-    block->cache_handle =
-        GetEntryFromCache(block_cache, block_cache_key, BLOCK_CACHE_DATA_MISS,
-                          BLOCK_CACHE_DATA_HIT, statistics);
-    if (block->cache_handle != nullptr) {
-      block->value =
-          reinterpret_cast<Block*>(block_cache->Value(block->cache_handle));
-      return s;
-    }
-  }
-
-  // If not found, search from the compressed block cache.
-  assert(block->cache_handle == nullptr && block->value == nullptr);
-
-  if (block_cache_compressed == nullptr) {
-    return s;
-  }
-
-  assert(!compressed_block_cache_key.empty());
-  block_cache_compressed_handle =
-      block_cache_compressed->Lookup(compressed_block_cache_key);
-  // if we found in the compressed cache, then uncompress and insert into
-  // uncompressed cache
-  if (block_cache_compressed_handle == nullptr) {
-    RecordTick(statistics, BLOCK_CACHE_COMPRESSED_MISS);
-    return s;
-  }
-
-  // found compressed block
-  RecordTick(statistics, BLOCK_CACHE_COMPRESSED_HIT);
-  compressed_block = reinterpret_cast<Block*>(
-      block_cache_compressed->Value(block_cache_compressed_handle));
-  assert(compressed_block->compression_type() != kNoCompression);
-
-  // Retrieve the uncompressed contents into a new buffer
-  BlockContents contents;
-  s = UncompressBlockContents(compressed_block->data(),
-                              compressed_block->size(), &contents);
-
-  // Insert uncompressed block into block cache
-  if (s.ok()) {
-    block->value = new Block(contents);  // uncompressed block
-    assert(block->value->compression_type() == kNoCompression);
-    if (block_cache != nullptr && block->value->cachable() &&
-        read_options.fill_cache) {
-      block->cache_handle =
-          block_cache->Insert(block_cache_key, block->value,
-                              block->value->size(), &DeleteCachedEntry<Block>);
-      assert(reinterpret_cast<Block*>(
-                 block_cache->Value(block->cache_handle)) == block->value);
-    }
-  }
-
-  // Release hold on compressed cache entry
-  block_cache_compressed->Release(block_cache_compressed_handle);
-  return s;
-}
-
-Status BlockBasedTable::PutDataBlockToCache(
-    const Slice& block_cache_key, const Slice& compressed_block_cache_key,
-    Cache* block_cache, Cache* block_cache_compressed,
-    const ReadOptions& read_options, Statistics* statistics,
-    CachableEntry<Block>* block, Block* raw_block) {
-  assert(raw_block->compression_type() == kNoCompression ||
-         block_cache_compressed != nullptr);
-
-  Status s;
-  // Retrieve the uncompressed contents into a new buffer
-  BlockContents contents;
-  if (raw_block->compression_type() != kNoCompression) {
-    s = UncompressBlockContents(raw_block->data(), raw_block->size(),
-                                &contents);
-  }
-  if (!s.ok()) {
-    delete raw_block;
-    return s;
-  }
-
-  if (raw_block->compression_type() != kNoCompression) {
-    block->value = new Block(contents);  // uncompressed block
-  } else {
-    block->value = raw_block;
-    raw_block = nullptr;
-  }
-
-  // Insert compressed block into compressed block cache.
-  // Release the hold on the compressed cache entry immediately.
-  if (block_cache_compressed != nullptr && raw_block != nullptr &&
-      raw_block->cachable()) {
-    auto cache_handle = block_cache_compressed->Insert(
-        compressed_block_cache_key, raw_block, raw_block->size(),
-        &DeleteCachedEntry<Block>);
-    block_cache_compressed->Release(cache_handle);
-    RecordTick(statistics, BLOCK_CACHE_COMPRESSED_MISS);
-    // Avoid the following code to delete this cached block.
-    raw_block = nullptr;
-  }
-  delete raw_block;
-
-  // insert into uncompressed block cache
-  assert((block->value->compression_type() == kNoCompression));
-  if (block_cache != nullptr && block->value->cachable()) {
-    block->cache_handle =
-        block_cache->Insert(block_cache_key, block->value, block->value->size(),
-                            &DeleteCachedEntry<Block>);
-    RecordTick(statistics, BLOCK_CACHE_ADD);
-    assert(reinterpret_cast<Block*>(block_cache->Value(block->cache_handle)) ==
-           block->value);
-  }
-
-  return s;
-}
-
-FilterBlockReader* BlockBasedTable::ReadFilter (
-    const Slice& filter_handle_value,
-    BlockBasedTable::Rep* rep,
-    size_t* filter_size) {
-  Slice v = filter_handle_value;
-  BlockHandle filter_handle;
-  if (!filter_handle.DecodeFrom(&v).ok()) {
-    return nullptr;
-  }
-
-  // TODO: We might want to unify with ReadBlockFromFile() if we start
-  // requiring checksum verification in Table::Open.
-  ReadOptions opt;
-  BlockContents block;
-  if (!ReadBlockContents(rep->file.get(), rep->footer, opt, filter_handle,
-                         &block, rep->options.env, false).ok()) {
-    return nullptr;
-  }
-
-  if (filter_size) {
-    *filter_size = block.data.size();
-  }
-
-  return new FilterBlockReader(
-       rep->options, block.data, block.heap_allocated);
-}
-
-BlockBasedTable::CachableEntry<FilterBlockReader> BlockBasedTable::GetFilter(
-    bool no_io) const {
-  // filter pre-populated
-  if (rep_->filter != nullptr) {
-    return {rep_->filter.get(), nullptr /* cache handle */};
-  }
-
-  if (rep_->options.filter_policy == nullptr /* do not use filter at all */ ||
-      rep_->options.block_cache == nullptr /* no block cache at all */) {
-    return {nullptr /* filter */, nullptr /* cache handle */};
-  }
-
-  // Fetching from the cache
-  Cache* block_cache = rep_->options.block_cache.get();
-  char cache_key[kMaxCacheKeyPrefixSize + kMaxVarint64Length];
-  auto key = GetCacheKey(
-      rep_->cache_key_prefix,
-      rep_->cache_key_prefix_size,
-      rep_->footer.metaindex_handle(),
-      cache_key
-  );
-
-  Statistics* statistics = rep_->options.statistics.get();
-  auto cache_handle =
-      GetEntryFromCache(block_cache, key, BLOCK_CACHE_FILTER_MISS,
-                        BLOCK_CACHE_FILTER_HIT, statistics);
-
-  FilterBlockReader* filter = nullptr;
-  if (cache_handle != nullptr) {
-     filter = reinterpret_cast<FilterBlockReader*>(
-         block_cache->Value(cache_handle));
-  } else if (no_io) {
-    // Do not invoke any io.
-    return CachableEntry<FilterBlockReader>();
-  } else {
-    size_t filter_size = 0;
-    std::unique_ptr<Block> meta;
-    std::unique_ptr<Iterator> iter;
-    auto s = ReadMetaBlock(rep_, &meta, &iter);
-
-    if (s.ok()) {
-      std::string filter_block_key = kFilterBlockPrefix;
-      filter_block_key.append(rep_->options.filter_policy->Name());
-      iter->Seek(filter_block_key);
-
-      if (iter->Valid() && iter->key() == Slice(filter_block_key)) {
-        filter = ReadFilter(iter->value(), rep_, &filter_size);
-        assert(filter);
-        assert(filter_size > 0);
-
-        cache_handle = block_cache->Insert(
-            key, filter, filter_size, &DeleteCachedEntry<FilterBlockReader>);
-        RecordTick(statistics, BLOCK_CACHE_ADD);
-      }
-    }
-  }
-
-  return { filter, cache_handle };
-}
-
-Iterator* BlockBasedTable::NewIndexIterator(const ReadOptions& read_options) {
-  // index reader has already been pre-populated.
-  if (rep_->index_reader) {
-    return rep_->index_reader->NewIterator();
-  }
-
-  bool no_io = read_options.read_tier == kBlockCacheTier;
-  Cache* block_cache = rep_->options.block_cache.get();
-  char cache_key[kMaxCacheKeyPrefixSize + kMaxVarint64Length];
-  auto key = GetCacheKey(rep_->cache_key_prefix, rep_->cache_key_prefix_size,
-                         rep_->footer.index_handle(), cache_key);
-  Statistics* statistics = rep_->options.statistics.get();
-  auto cache_handle =
-      GetEntryFromCache(block_cache, key, BLOCK_CACHE_INDEX_MISS,
-                        BLOCK_CACHE_INDEX_HIT, statistics);
-
-  if (cache_handle == nullptr && no_io) {
-    return NewErrorIterator(Status::Incomplete("no blocking io"));
-  }
-
-  IndexReader* index_reader = nullptr;
-  if (cache_handle != nullptr) {
-    index_reader =
-        reinterpret_cast<IndexReader*>(block_cache->Value(cache_handle));
-  } else {
-    // Create index reader and put it in the cache.
-    Status s;
-    s = CreateIndexReader(&index_reader);
-
-    if (!s.ok()) {
-      // make sure if something goes wrong, index_reader shall remain intact.
-      assert(index_reader == nullptr);
-      return NewErrorIterator(s);
-    }
-
-    cache_handle = block_cache->Insert(key, index_reader, index_reader->size(),
-                                       &DeleteCachedEntry<IndexReader>);
-    RecordTick(statistics, BLOCK_CACHE_ADD);
-  }
-
-  assert(cache_handle);
-  auto iter = index_reader->NewIterator();
-  iter->RegisterCleanup(&ReleaseCachedEntry, block_cache, cache_handle);
-
-  return iter;
-}
-
-// Convert an index iterator value (i.e., an encoded BlockHandle)
-// into an iterator over the contents of the corresponding block.
-Iterator* BlockBasedTable::NewDataBlockIterator(Rep* rep,
-    const ReadOptions& ro, bool* didIO, const Slice& index_value) {
-  const bool no_io = (ro.read_tier == kBlockCacheTier);
-  Cache* block_cache = rep->options.block_cache.get();
-  Cache* block_cache_compressed = rep->options.
-                                    block_cache_compressed.get();
-  CachableEntry<Block> block;
-
-  BlockHandle handle;
-  Slice input = index_value;
-  // We intentionally allow extra stuff in index_value so that we
-  // can add more features in the future.
-  Status s = handle.DecodeFrom(&input);
-
-  if (!s.ok()) {
-    return NewErrorIterator(s);
-  }
-
-  // If either block cache is enabled, we'll try to read from it.
-  if (block_cache != nullptr || block_cache_compressed != nullptr) {
-    Statistics* statistics = rep->options.statistics.get();
-    char cache_key[kMaxCacheKeyPrefixSize + kMaxVarint64Length];
-    char compressed_cache_key[kMaxCacheKeyPrefixSize + kMaxVarint64Length];
-    Slice key, /* key to the block cache */
-        ckey /* key to the compressed block cache */;
-
-    // create key for block cache
-    if (block_cache != nullptr) {
-      key = GetCacheKey(rep->cache_key_prefix,
-                        rep->cache_key_prefix_size, handle, cache_key);
-    }
-
-    if (block_cache_compressed != nullptr) {
-      ckey = GetCacheKey(rep->compressed_cache_key_prefix,
-                         rep->compressed_cache_key_prefix_size, handle,
-                         compressed_cache_key);
-    }
-
-    s = GetDataBlockFromCache(key, ckey, block_cache, block_cache_compressed,
-                      statistics, ro, &block);
-
-    if (block.value == nullptr && !no_io && ro.fill_cache) {
-      Histograms histogram = READ_BLOCK_GET_MICROS;
-      Block* raw_block = nullptr;
-      {
-        StopWatch sw(rep->options.env, statistics, histogram);
-        s = ReadBlockFromFile(rep->file.get(), rep->footer, ro, handle,
-                              &raw_block, rep->options.env, didIO,
-                              block_cache_compressed == nullptr);
-      }
-
-      if (s.ok()) {
-        s = PutDataBlockToCache(key, ckey, block_cache, block_cache_compressed,
-                                ro, statistics, &block, raw_block);
-      }
-    }
-  }
-
-  // Didn't get any data from block caches.
-  if (block.value == nullptr) {
-    if (no_io) {
-      // Could not read from block_cache and can't do IO
-      return NewErrorIterator(Status::Incomplete("no blocking io"));
-    }
-    s = ReadBlockFromFile(rep->file.get(), rep->footer, ro, handle,
-                          &block.value, rep->options.env, didIO);
-  }
-
-  Iterator* iter;
-  if (block.value != nullptr) {
-    iter = block.value->NewIterator(&rep->internal_comparator);
-    if (block.cache_handle != nullptr) {
-      iter->RegisterCleanup(&ReleaseCachedEntry, block_cache,
-                            block.cache_handle);
-    } else {
-      iter->RegisterCleanup(&DeleteHeldResource<Block>, block.value, nullptr);
-    }
-  } else {
-    iter = NewErrorIterator(s);
-  }
-  return iter;
-}
-
-class BlockBasedTable::BlockEntryIteratorState : public TwoLevelIteratorState {
- public:
-  BlockEntryIteratorState(BlockBasedTable* table,
-      const ReadOptions& read_options, bool* did_io)
-    : TwoLevelIteratorState(table->rep_->options.prefix_extractor != nullptr),
-      table_(table), read_options_(read_options), did_io_(did_io) {}
-
-  Iterator* NewSecondaryIterator(const Slice& index_value) override {
-    return NewDataBlockIterator(table_->rep_, read_options_, did_io_,
-                                index_value);
-  }
-
-  bool PrefixMayMatch(const Slice& internal_key) override {
-    return table_->PrefixMayMatch(internal_key);
-  }
-
- private:
-  // Don't own table_
-  BlockBasedTable* table_;
-  const ReadOptions read_options_;
-  // Don't own did_io_
-  bool* did_io_;
-};
-
-// This will be broken if the user specifies an unusual implementation
-// of Options.comparator, or if the user specifies an unusual
-// definition of prefixes in Options.filter_policy.  In particular, we
-// require the following three properties:
-//
-// 1) key.starts_with(prefix(key))
-// 2) Compare(prefix(key), key) <= 0.
-// 3) If Compare(key1, key2) <= 0, then Compare(prefix(key1), prefix(key2)) <= 0
-//
-// Otherwise, this method guarantees no I/O will be incurred.
-//
-// REQUIRES: this method shouldn't be called while the DB lock is held.
-bool BlockBasedTable::PrefixMayMatch(const Slice& internal_key) {
-  assert(rep_->options.prefix_extractor != nullptr);
-  auto prefix = rep_->options.prefix_extractor->Transform(
-      ExtractUserKey(internal_key));
-  InternalKey internal_key_prefix(prefix, 0, kTypeValue);
-  auto internal_prefix = internal_key_prefix.Encode();
-
-  bool may_match = true;
-  Status s;
-
-  if (!rep_->options.filter_policy) {
-    return true;
-  }
-
-  // To prevent any io operation in this method, we set `read_tier` to make
-  // sure we always read index or filter only when they have already been
-  // loaded to memory.
-  ReadOptions no_io_read_options;
-  no_io_read_options.read_tier = kBlockCacheTier;
-  unique_ptr<Iterator> iiter(NewIndexIterator(no_io_read_options));
-  iiter->Seek(internal_prefix);
-
-  if (!iiter->Valid()) {
-    // we're past end of file
-    // if it's incomplete, it means that we avoided I/O
-    // and we're not really sure that we're past the end
-    // of the file
-    may_match = iiter->status().IsIncomplete();
-  } else if (ExtractUserKey(iiter->key()).starts_with(
-              ExtractUserKey(internal_prefix))) {
-    // we need to check for this subtle case because our only
-    // guarantee is that "the key is a string >= last key in that data
-    // block" according to the doc/table_format.txt spec.
-    //
-    // Suppose iiter->key() starts with the desired prefix; it is not
-    // necessarily the case that the corresponding data block will
-    // contain the prefix, since iiter->key() need not be in the
-    // block.  However, the next data block may contain the prefix, so
-    // we return true to play it safe.
-    may_match = true;
-  } else {
-    // iiter->key() does NOT start with the desired prefix.  Because
-    // Seek() finds the first key that is >= the seek target, this
-    // means that iiter->key() > prefix.  Thus, any data blocks coming
-    // after the data block corresponding to iiter->key() cannot
-    // possibly contain the key.  Thus, the corresponding data block
-    // is the only one which could potentially contain the prefix.
-    Slice handle_value = iiter->value();
-    BlockHandle handle;
-    s = handle.DecodeFrom(&handle_value);
-    assert(s.ok());
-    auto filter_entry = GetFilter(true /* no io */);
-    may_match =
-      filter_entry.value == nullptr ||
-      filter_entry.value->PrefixMayMatch(handle.offset(), internal_prefix);
-    filter_entry.Release(rep_->options.block_cache.get());
-  }
-
-  Statistics* statistics = rep_->options.statistics.get();
-  RecordTick(statistics, BLOOM_FILTER_PREFIX_CHECKED);
-  if (!may_match) {
-    RecordTick(statistics, BLOOM_FILTER_PREFIX_USEFUL);
-  }
-
-  return may_match;
-}
-
-Iterator* BlockBasedTable::NewIterator(const ReadOptions& read_options) {
-  return NewTwoLevelIterator(new BlockEntryIteratorState(this, read_options,
-                                                         nullptr),
-                             NewIndexIterator(read_options));
-}
-
-Status BlockBasedTable::Get(
-    const ReadOptions& read_options, const Slice& key, void* handle_context,
-    bool (*result_handler)(void* handle_context, const ParsedInternalKey& k,
-                           const Slice& v, bool didIO),
-    void (*mark_key_may_exist_handler)(void* handle_context)) {
-  Status s;
-  Iterator* iiter = NewIndexIterator(read_options);
-  auto filter_entry = GetFilter(read_options.read_tier == kBlockCacheTier);
-  FilterBlockReader* filter = filter_entry.value;
-  bool done = false;
-  for (iiter->Seek(key); iiter->Valid() && !done; iiter->Next()) {
-    Slice handle_value = iiter->value();
-
-    BlockHandle handle;
-    bool may_not_exist_in_filter =
-      filter != nullptr &&
-      handle.DecodeFrom(&handle_value).ok() &&
-      !filter->KeyMayMatch(handle.offset(), key);
-
-    if (may_not_exist_in_filter) {
-      // Not found
-      // TODO: think about interaction with Merge. If a user key cannot
-      // cross one data block, we should be fine.
-      RecordTick(rep_->options.statistics.get(), BLOOM_FILTER_USEFUL);
-      break;
-    } else {
-      bool didIO = false;
-      unique_ptr<Iterator> block_iter(
-          NewDataBlockIterator(rep_, read_options, &didIO, iiter->value()));
-
-      if (read_options.read_tier && block_iter->status().IsIncomplete()) {
-        // couldn't get block from block_cache
-        // Update Saver.state to Found because we are only looking for whether
-        // we can guarantee the key is not there when "no_io" is set
-        (*mark_key_may_exist_handler)(handle_context);
-        break;
-      }
-
-      // Call the *saver function on each entry/block until it returns false
-      for (block_iter->Seek(key); block_iter->Valid(); block_iter->Next()) {
-        ParsedInternalKey parsed_key;
-        if (!ParseInternalKey(block_iter->key(), &parsed_key)) {
-          s = Status::Corruption(Slice());
-        }
-
-        if (!(*result_handler)(handle_context, parsed_key, block_iter->value(),
-                               didIO)) {
-          done = true;
-          break;
-        }
-      }
-      s = block_iter->status();
-    }
-  }
-
-  filter_entry.Release(rep_->options.block_cache.get());
-  if (s.ok()) {
-    s = iiter->status();
-  }
-  delete iiter;
-  return s;
-}
-
-namespace {
-bool SaveDidIO(void* arg, const ParsedInternalKey& key, const Slice& value,
-               bool didIO) {
-  *reinterpret_cast<bool*>(arg) = didIO;
-  return false;
-}
-}  // namespace
-
-bool BlockBasedTable::TEST_KeyInCache(const ReadOptions& options,
-                                      const Slice& key) {
-  // We use Get() as it has logic that checks whether we read the
-  // block from the disk or not.
-  bool didIO = false;
-  Status s = Get(options, key, &didIO, SaveDidIO);
-  assert(s.ok());
-  return !didIO;
-}
-
-// REQUIRES: The following fields of rep_ should have already been populated:
-//  1. file
-//  2. index_handle,
-//  3. options
-//  4. internal_comparator
-//  5. index_type
-Status BlockBasedTable::CreateIndexReader(IndexReader** index_reader) {
-  // Some old version of block-based tables don't have index type present in
-  // table properties. If that's the case we can safely use the kBinarySearch.
-  auto index_type_on_file = BlockBasedTableOptions::kBinarySearch;
-  if (rep_->table_properties) {
-    auto& props = rep_->table_properties->user_collected_properties;
-    auto pos = props.find(BlockBasedTablePropertyNames::kIndexType);
-    if (pos != props.end()) {
-      index_type_on_file = static_cast<BlockBasedTableOptions::IndexType>(
-          DecodeFixed32(pos->second.c_str()));
-    }
-  }
-
-  // TODO(sdong): Currently binary index is the only index type we support in
-  // files. Hash index is built on top of binary index too.
-  if (index_type_on_file != BlockBasedTableOptions::kBinarySearch) {
-    return Status::NotSupported("File Contains not supported index type: ",
-                                std::to_string(index_type_on_file));
-  }
-
-  auto file = rep_->file.get();
-  auto env = rep_->options.env;
-  auto comparator = &rep_->internal_comparator;
-  const Footer& footer = rep_->footer;
-
-  switch (rep_->index_type) {
-    case BlockBasedTableOptions::kBinarySearch: {
-      return BinarySearchIndexReader::Create(
-          file, footer, footer.index_handle(), env, comparator, index_reader);
-    }
-    case BlockBasedTableOptions::kHashSearch: {
-      // We need to wrap data with internal_prefix_transform to make sure it can
-      // handle prefix correctly.
-      rep_->internal_prefix_transform.reset(
-          new InternalKeySliceTransform(rep_->options.prefix_extractor.get()));
-      return HashIndexReader::Create(
-          file, footer, footer.index_handle(), env, comparator,
-          [&](Iterator* index_iter) {
-            return NewTwoLevelIterator(new BlockEntryIteratorState(this,
-                ReadOptions(), nullptr), index_iter);
-          },
-          rep_->internal_prefix_transform.get(), index_reader);
-    }
-    default: {
-      std::string error_message =
-          "Unrecognized index type: " + std::to_string(rep_->index_type);
-      // equivalent to assert(false), but more informative.
-      assert(!error_message.c_str());
-      return Status::InvalidArgument(error_message.c_str());
-    }
-  }
-}
-
-uint64_t BlockBasedTable::ApproximateOffsetOf(const Slice& key) {
-  unique_ptr<Iterator> index_iter(NewIndexIterator(ReadOptions()));
-
-  index_iter->Seek(key);
-  uint64_t result;
-  if (index_iter->Valid()) {
-    BlockHandle handle;
-    Slice input = index_iter->value();
-    Status s = handle.DecodeFrom(&input);
-    if (s.ok()) {
-      result = handle.offset();
-    } else {
-      // Strange: we can't decode the block handle in the index block.
-      // We'll just return the offset of the metaindex block, which is
-      // close to the whole file size for this case.
-      result = rep_->footer.metaindex_handle().offset();
-    }
-  } else {
-    // key is past the last key in the file. If table_properties is not
-    // available, approximate the offset by returning the offset of the
-    // metaindex block (which is right near the end of the file).
-    result = 0;
-    if (rep_->table_properties) {
-      result = rep_->table_properties->data_size;
-    }
-    // table_properties is not present in the table.
-    if (result == 0) {
-      result = rep_->footer.metaindex_handle().offset();
-    }
-  }
-  return result;
-}
-
-bool BlockBasedTable::TEST_filter_block_preloaded() const {
-  return rep_->filter != nullptr;
-}
-
-bool BlockBasedTable::TEST_index_reader_preloaded() const {
-  return rep_->index_reader != nullptr;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_based_table_reader.h b/src/rocksdb/table/block_based_table_reader.h
deleted file mode 100644
index f68d642..0000000
--- a/src/rocksdb/table/block_based_table_reader.h
+++ /dev/null
@@ -1,198 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#include <stdint.h>
-#include <memory>
-#include <utility>
-#include <string>
-
-#include "rocksdb/statistics.h"
-#include "rocksdb/status.h"
-#include "rocksdb/table.h"
-#include "table/table_reader.h"
-#include "util/coding.h"
-
-namespace rocksdb {
-
-class Block;
-class BlockHandle;
-class Cache;
-class FilterBlockReader;
-class Footer;
-class InternalKeyComparator;
-class Iterator;
-class RandomAccessFile;
-class TableCache;
-class TableReader;
-class WritableFile;
-struct BlockBasedTableOptions;
-struct EnvOptions;
-struct Options;
-struct ReadOptions;
-
-using std::unique_ptr;
-
-// A Table is a sorted map from strings to strings.  Tables are
-// immutable and persistent.  A Table may be safely accessed from
-// multiple threads without external synchronization.
-class BlockBasedTable : public TableReader {
- public:
-  static const std::string kFilterBlockPrefix;
-
-  // Attempt to open the table that is stored in bytes [0..file_size)
-  // of "file", and read the metadata entries necessary to allow
-  // retrieving data from the table.
-  //
-  // If successful, returns ok and sets "*table_reader" to the newly opened
-  // table.  The client should delete "*table_reader" when no longer needed.
-  // If there was an error while initializing the table, sets "*table_reader"
-  // to nullptr and returns a non-ok status.
-  //
-  // *file must remain live while this Table is in use.
-  static Status Open(const Options& db_options, const EnvOptions& env_options,
-                     const BlockBasedTableOptions& table_options,
-                     const InternalKeyComparator& internal_key_comparator,
-                     unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-                     unique_ptr<TableReader>* table_reader);
-
-  bool PrefixMayMatch(const Slice& internal_key);
-
-  // Returns a new iterator over the table contents.
-  // The result of NewIterator() is initially invalid (caller must
-  // call one of the Seek methods on the iterator before using it).
-  Iterator* NewIterator(const ReadOptions&) override;
-
-  Status Get(const ReadOptions& readOptions, const Slice& key,
-             void* handle_context,
-             bool (*result_handler)(void* handle_context,
-                                    const ParsedInternalKey& k, const Slice& v,
-                                    bool didIO),
-             void (*mark_key_may_exist_handler)(void* handle_context) =
-                 nullptr) override;
-
-  // Given a key, return an approximate byte offset in the file where
-  // the data for that key begins (or would begin if the key were
-  // present in the file).  The returned value is in terms of file
-  // bytes, and so includes effects like compression of the underlying data.
-  // E.g., the approximate offset of the last key in the table will
-  // be close to the file length.
-  uint64_t ApproximateOffsetOf(const Slice& key) override;
-
-  // Returns true if the block for the specified key is in cache.
-  // REQUIRES: key is in this table.
-  bool TEST_KeyInCache(const ReadOptions& options, const Slice& key);
-
-  // Set up the table for Compaction. Might change some parameters with
-  // posix_fadvise
-  void SetupForCompaction() override;
-
-  std::shared_ptr<const TableProperties> GetTableProperties() const override;
-
-  ~BlockBasedTable();
-
-  bool TEST_filter_block_preloaded() const;
-  bool TEST_index_reader_preloaded() const;
-  // Implementation of IndexReader will be exposed to internal cc file only.
-  class IndexReader;
-
- private:
-  template <class TValue>
-  struct CachableEntry;
-
-  struct Rep;
-  Rep* rep_;
-  bool compaction_optimized_;
-
-  class BlockEntryIteratorState;
-  static Iterator* NewDataBlockIterator(Rep* rep, const ReadOptions& ro,
-      bool* didIO, const Slice& index_value);
-
-  // For the following two functions:
-  // if `no_io == true`, we will not try to read filter/index from sst file
-  // were they not present in cache yet.
-  CachableEntry<FilterBlockReader> GetFilter(bool no_io = false) const;
-
-  // Get the iterator from the index reader.
-  //
-  // Note: ErrorIterator with Status::Incomplete shall be returned if all the
-  // following conditions are met:
-  //  1. We enabled table_options.cache_index_and_filter_blocks.
-  //  2. index is not present in block cache.
-  //  3. We disallowed any io to be performed, that is, read_options ==
-  //     kBlockCacheTier
-  Iterator* NewIndexIterator(const ReadOptions& read_options);
-
-  // Read block cache from block caches (if set): block_cache and
-  // block_cache_compressed.
-  // On success, Status::OK with be returned and @block will be populated with
-  // pointer to the block as well as its block handle.
-  static Status GetDataBlockFromCache(
-      const Slice& block_cache_key, const Slice& compressed_block_cache_key,
-      Cache* block_cache, Cache* block_cache_compressed, Statistics* statistics,
-      const ReadOptions& read_options,
-      BlockBasedTable::CachableEntry<Block>* block);
-  // Put a raw block (maybe compressed) to the corresponding block caches.
-  // This method will perform decompression against raw_block if needed and then
-  // populate the block caches.
-  // On success, Status::OK will be returned; also @block will be populated with
-  // uncompressed block and its cache handle.
-  //
-  // REQUIRES: raw_block is heap-allocated. PutDataBlockToCache() will be
-  // responsible for releasing its memory if error occurs.
-  static Status PutDataBlockToCache(
-      const Slice& block_cache_key, const Slice& compressed_block_cache_key,
-      Cache* block_cache, Cache* block_cache_compressed,
-      const ReadOptions& read_options, Statistics* statistics,
-      CachableEntry<Block>* block, Block* raw_block);
-
-  // Calls (*handle_result)(arg, ...) repeatedly, starting with the entry found
-  // after a call to Seek(key), until handle_result returns false.
-  // May not make such a call if filter policy says that key is not present.
-  friend class TableCache;
-  friend class BlockBasedTableBuilder;
-
-  void ReadMeta(const Footer& footer);
-  void ReadFilter(const Slice& filter_handle_value);
-  Status CreateIndexReader(IndexReader** index_reader);
-
-  // Read the meta block from sst.
-  static Status ReadMetaBlock(
-      Rep* rep,
-      std::unique_ptr<Block>* meta_block,
-      std::unique_ptr<Iterator>* iter);
-
-  // Create the filter from the filter block.
-  static FilterBlockReader* ReadFilter(
-      const Slice& filter_handle_value,
-      Rep* rep,
-      size_t* filter_size = nullptr);
-
-  static void SetupCacheKeyPrefix(Rep* rep);
-
-  explicit BlockBasedTable(Rep* rep)
-      : rep_(rep), compaction_optimized_(false) {}
-
-  // Generate a cache key prefix from the file
-  static void GenerateCachePrefix(Cache* cc,
-    RandomAccessFile* file, char* buffer, size_t* size);
-  static void GenerateCachePrefix(Cache* cc,
-    WritableFile* file, char* buffer, size_t* size);
-
-  // The longest prefix of the cache key used to identify blocks.
-  // For Posix files the unique ID is three varints.
-  static const size_t kMaxCacheKeyPrefixSize = kMaxVarint64Length*3+1;
-
-  // No copying allowed
-  explicit BlockBasedTable(const TableReader&) = delete;
-  void operator=(const TableReader&) = delete;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_builder.cc b/src/rocksdb/table/block_builder.cc
deleted file mode 100644
index f812dba..0000000
--- a/src/rocksdb/table/block_builder.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// BlockBuilder generates blocks where keys are prefix-compressed:
-//
-// When we store a key, we drop the prefix shared with the previous
-// string.  This helps reduce the space requirement significantly.
-// Furthermore, once every K keys, we do not apply the prefix
-// compression and store the entire key.  We call this a "restart
-// point".  The tail end of the block stores the offsets of all of the
-// restart points, and can be used to do a binary search when looking
-// for a particular key.  Values are stored as-is (without compression)
-// immediately following the corresponding key.
-//
-// An entry for a particular key-value pair has the form:
-//     shared_bytes: varint32
-//     unshared_bytes: varint32
-//     value_length: varint32
-//     key_delta: char[unshared_bytes]
-//     value: char[value_length]
-// shared_bytes == 0 for restart points.
-//
-// The trailer of the block has the form:
-//     restarts: uint32[num_restarts]
-//     num_restarts: uint32
-// restarts[i] contains the offset within the block of the ith restart point.
-
-#include "table/block_builder.h"
-
-#include <algorithm>
-#include <assert.h>
-#include "rocksdb/comparator.h"
-#include "db/dbformat.h"
-#include "util/coding.h"
-
-namespace rocksdb {
-
-BlockBuilder::BlockBuilder(int block_restart_interval,
-                           const Comparator* comparator)
-    : block_restart_interval_(block_restart_interval),
-      comparator_(comparator),
-      restarts_(),
-      counter_(0),
-      finished_(false) {
-  assert(block_restart_interval_ >= 1);
-  restarts_.push_back(0);       // First restart point is at offset 0
-}
-
-BlockBuilder::BlockBuilder(const Options& options, const Comparator* comparator)
-    : BlockBuilder(options.block_restart_interval, comparator) {}
-
-void BlockBuilder::Reset() {
-  buffer_.clear();
-  restarts_.clear();
-  restarts_.push_back(0);       // First restart point is at offset 0
-  counter_ = 0;
-  finished_ = false;
-  last_key_.clear();
-}
-
-size_t BlockBuilder::CurrentSizeEstimate() const {
-  return (buffer_.size() +                        // Raw data buffer
-          restarts_.size() * sizeof(uint32_t) +   // Restart array
-          sizeof(uint32_t));                      // Restart array length
-}
-
-size_t BlockBuilder::EstimateSizeAfterKV(const Slice& key, const Slice& value)
-  const {
-  size_t estimate = CurrentSizeEstimate();
-  estimate += key.size() + value.size();
-  if (counter_ >= block_restart_interval_) {
-    estimate += sizeof(uint32_t); // a new restart entry.
-  }
-
-  estimate += sizeof(int32_t); // varint for shared prefix length.
-  estimate += VarintLength(key.size()); // varint for key length.
-  estimate += VarintLength(value.size()); // varint for value length.
-
-  return estimate;
-}
-
-Slice BlockBuilder::Finish() {
-  // Append restart array
-  for (size_t i = 0; i < restarts_.size(); i++) {
-    PutFixed32(&buffer_, restarts_[i]);
-  }
-  PutFixed32(&buffer_, restarts_.size());
-  finished_ = true;
-  return Slice(buffer_);
-}
-
-void BlockBuilder::Add(const Slice& key, const Slice& value) {
-  Slice last_key_piece(last_key_);
-  assert(!finished_);
-  assert(counter_ <= block_restart_interval_);
-  assert(buffer_.empty() // No values yet?
-         || comparator_->Compare(key, last_key_piece) > 0);
-  size_t shared = 0;
-  if (counter_ < block_restart_interval_) {
-    // See how much sharing to do with previous string
-    const size_t min_length = std::min(last_key_piece.size(), key.size());
-    while ((shared < min_length) && (last_key_piece[shared] == key[shared])) {
-      shared++;
-    }
-  } else {
-    // Restart compression
-    restarts_.push_back(buffer_.size());
-    counter_ = 0;
-  }
-  const size_t non_shared = key.size() - shared;
-
-  // Add "<shared><non_shared><value_size>" to buffer_
-  PutVarint32(&buffer_, shared);
-  PutVarint32(&buffer_, non_shared);
-  PutVarint32(&buffer_, value.size());
-
-  // Add string delta to buffer_ followed by value
-  buffer_.append(key.data() + shared, non_shared);
-  buffer_.append(value.data(), value.size());
-
-  // Update state
-  last_key_.resize(shared);
-  last_key_.append(key.data() + shared, non_shared);
-  assert(Slice(last_key_) == key);
-  counter_++;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_builder.h b/src/rocksdb/table/block_builder.h
deleted file mode 100644
index ed2f290..0000000
--- a/src/rocksdb/table/block_builder.h
+++ /dev/null
@@ -1,65 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <vector>
-
-#include <stdint.h>
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-struct Options;
-class Comparator;
-
-class BlockBuilder {
- public:
-  BlockBuilder(int block_builder, const Comparator* comparator);
-  explicit BlockBuilder(const Options& options, const Comparator* comparator);
-
-  // Reset the contents as if the BlockBuilder was just constructed.
-  void Reset();
-
-  // REQUIRES: Finish() has not been callled since the last call to Reset().
-  // REQUIRES: key is larger than any previously added key
-  void Add(const Slice& key, const Slice& value);
-
-  // Finish building the block and return a slice that refers to the
-  // block contents.  The returned slice will remain valid for the
-  // lifetime of this builder or until Reset() is called.
-  Slice Finish();
-
-  // Returns an estimate of the current (uncompressed) size of the block
-  // we are building.
-  size_t CurrentSizeEstimate() const;
-
-  // Returns an estimated block size after appending key and value.
-  size_t EstimateSizeAfterKV(const Slice& key, const Slice& value) const;
-
-  // Return true iff no entries have been added since the last Reset()
-  bool empty() const {
-    return buffer_.empty();
-  }
-
- private:
-  const int          block_restart_interval_;
-  const Comparator*  comparator_;
-
-  std::string           buffer_;    // Destination buffer
-  std::vector<uint32_t> restarts_;  // Restart points
-  int                   counter_;   // Number of entries emitted since restart
-  bool                  finished_;  // Has Finish() been called?
-  std::string           last_key_;
-
-  // No copying allowed
-  BlockBuilder(const BlockBuilder&);
-  void operator=(const BlockBuilder&);
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_hash_index.cc b/src/rocksdb/table/block_hash_index.cc
deleted file mode 100644
index 0c9674c..0000000
--- a/src/rocksdb/table/block_hash_index.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#include <algorithm>
-
-#include "table/block_hash_index.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/slice_transform.h"
-
-namespace rocksdb {
-
-BlockHashIndex* CreateBlockHashIndex(Iterator* index_iter, Iterator* data_iter,
-                                     const uint32_t num_restarts,
-                                     const Comparator* comparator,
-                                     const SliceTransform* hash_key_extractor) {
-  assert(hash_key_extractor);
-  auto hash_index = new BlockHashIndex(hash_key_extractor);
-  uint64_t current_restart_index = 0;
-
-  std::string pending_entry_prefix;
-  // pending_block_num == 0 also implies there is no entry inserted at all.
-  uint32_t pending_block_num = 0;
-  uint32_t pending_entry_index = 0;
-
-  // scan all the entries and create a hash index based on their prefixes.
-  data_iter->SeekToFirst();
-  for (index_iter->SeekToFirst();
-       index_iter->Valid() && current_restart_index < num_restarts;
-       index_iter->Next()) {
-    Slice last_key_in_block = index_iter->key();
-    assert(data_iter->Valid() && data_iter->status().ok());
-
-    // scan through all entries within a data block.
-    while (data_iter->Valid() &&
-           comparator->Compare(data_iter->key(), last_key_in_block) <= 0) {
-      auto key_prefix = hash_key_extractor->Transform(data_iter->key());
-      bool is_first_entry = pending_block_num == 0;
-
-      // Keys may share the prefix
-      if (is_first_entry || pending_entry_prefix != key_prefix) {
-        if (!is_first_entry) {
-          bool succeeded = hash_index->Add(
-              pending_entry_prefix, pending_entry_index, pending_block_num);
-          if (!succeeded) {
-            delete hash_index;
-            return nullptr;
-          }
-        }
-
-        // update the status.
-        // needs a hard copy otherwise the underlying data changes all the time.
-        pending_entry_prefix = key_prefix.ToString();
-        pending_block_num = 1;
-        pending_entry_index = current_restart_index;
-      } else {
-        // entry number increments when keys share the prefix reside in
-        // differnt data blocks.
-        auto last_restart_index = pending_entry_index + pending_block_num - 1;
-        assert(last_restart_index <= current_restart_index);
-        if (last_restart_index != current_restart_index) {
-          ++pending_block_num;
-        }
-      }
-      data_iter->Next();
-    }
-
-    ++current_restart_index;
-  }
-
-  // make sure all entries has been scaned.
-  assert(!index_iter->Valid());
-  assert(!data_iter->Valid());
-
-  if (pending_block_num > 0) {
-    auto succeeded = hash_index->Add(pending_entry_prefix, pending_entry_index,
-                                     pending_block_num);
-    if (!succeeded) {
-      delete hash_index;
-      return nullptr;
-    }
-  }
-
-  return hash_index;
-}
-
-bool BlockHashIndex::Add(const Slice& prefix, uint32_t restart_index,
-                         uint32_t num_blocks) {
-  auto prefix_ptr = arena_.Allocate(prefix.size());
-  std::copy(prefix.data() /* begin */, prefix.data() + prefix.size() /* end */,
-            prefix_ptr /* destination */);
-  auto result =
-      restart_indices_.insert({Slice(prefix_ptr, prefix.size()),
-                               RestartIndex(restart_index, num_blocks)});
-  return result.second;
-}
-
-const BlockHashIndex::RestartIndex* BlockHashIndex::GetRestartIndex(
-    const Slice& key) {
-  auto key_prefix = hash_key_extractor_->Transform(key);
-
-  auto pos = restart_indices_.find(key_prefix);
-  if (pos == restart_indices_.end()) {
-    return nullptr;
-  }
-
-  return &pos->second;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_hash_index.h b/src/rocksdb/table/block_hash_index.h
deleted file mode 100644
index 0ff65b4..0000000
--- a/src/rocksdb/table/block_hash_index.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-#pragma once
-
-#include <string>
-#include <unordered_map>
-
-#include "util/arena.h"
-#include "util/murmurhash.h"
-
-namespace rocksdb {
-
-class Comparator;
-class Iterator;
-class Slice;
-class SliceTransform;
-
-// Build a hash-based index to speed up the lookup for "index block".
-// BlockHashIndex accepts a key and, if found, returns its restart index within
-// that index block.
-class BlockHashIndex {
- public:
-  // Represents a restart index in the index block's restart array.
-  struct RestartIndex {
-    explicit RestartIndex(uint32_t first_index, uint32_t num_blocks = 1)
-        : first_index(first_index), num_blocks(num_blocks) {}
-
-    // For a given prefix, what is the restart index for the first data block
-    // that contains it.
-    uint32_t first_index = 0;
-
-    // How many data blocks contains this prefix?
-    uint32_t num_blocks = 1;
-  };
-
-  explicit BlockHashIndex(const SliceTransform* hash_key_extractor)
-      : hash_key_extractor_(hash_key_extractor) {}
-
-  // Maps a key to its restart first_index.
-  // Returns nullptr if the restart first_index is found
-  const RestartIndex* GetRestartIndex(const Slice& key);
-
-  bool Add(const Slice& key_prefix, uint32_t restart_index,
-           uint32_t num_blocks);
-
-  size_t ApproximateMemoryUsage() const {
-    return arena_.ApproximateMemoryUsage();
-  }
-
- private:
-  const SliceTransform* hash_key_extractor_;
-  std::unordered_map<Slice, RestartIndex, murmur_hash> restart_indices_;
-  Arena arena_;
-};
-
-// Create hash index by scanning the entries in index as well as the whole
-// dataset.
-// @params index_iter: an iterator with the pointer to the first entry in a
-//                     block.
-// @params data_iter: an iterator that can scan all the entries reside in a
-//                     table.
-// @params num_restarts: used for correctness verification.
-// @params hash_key_extractor: extract the hashable part of a given key.
-// On error, nullptr will be returned.
-BlockHashIndex* CreateBlockHashIndex(Iterator* index_iter, Iterator* data_iter,
-                                     const uint32_t num_restarts,
-                                     const Comparator* comparator,
-                                     const SliceTransform* hash_key_extractor);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/block_hash_index_test.cc b/src/rocksdb/table/block_hash_index_test.cc
deleted file mode 100644
index f4c0ac4..0000000
--- a/src/rocksdb/table/block_hash_index_test.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#include <map>
-#include <memory>
-#include <vector>
-
-#include "rocksdb/comparator.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/slice_transform.h"
-#include "table/block_hash_index.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-typedef std::map<std::string, std::string> Data;
-
-class MapIterator : public Iterator {
- public:
-  explicit MapIterator(const Data& data) : data_(data), pos_(data_.end()) {}
-
-  virtual bool Valid() const { return pos_ != data_.end(); }
-
-  virtual void SeekToFirst() { pos_ = data_.begin(); }
-
-  virtual void SeekToLast() {
-    pos_ = data_.end();
-    --pos_;
-  }
-
-  virtual void Seek(const Slice& target) {
-    pos_ = data_.find(target.ToString());
-  }
-
-  virtual void Next() { ++pos_; }
-
-  virtual void Prev() { --pos_; }
-
-  virtual Slice key() const { return pos_->first; }
-
-  virtual Slice value() const { return pos_->second; }
-
-  virtual Status status() const { return Status::OK(); }
-
- private:
-  const Data& data_;
-  Data::const_iterator pos_;
-};
-
-class BlockTest {};
-
-TEST(BlockTest, BasicTest) {
-  const size_t keys_per_block = 4;
-  const size_t prefix_size = 2;
-  std::vector<std::string> keys = {/* block 1 */
-                                   "0101", "0102", "0103", "0201",
-                                   /* block 2 */
-                                   "0202", "0203", "0301", "0401",
-                                   /* block 3 */
-                                   "0501", "0601", "0701", "0801",
-                                   /* block 4 */
-                                   "0802", "0803", "0804", "0805",
-                                   /* block 5 */
-                                   "0806", "0807", "0808", "0809", };
-
-  Data data_entries;
-  for (const auto key : keys) {
-    data_entries.insert({key, key});
-  }
-
-  Data index_entries;
-  for (size_t i = 3; i < keys.size(); i += keys_per_block) {
-    // simply ignore the value part
-    index_entries.insert({keys[i], ""});
-  }
-
-  MapIterator data_iter(data_entries);
-  MapIterator index_iter(index_entries);
-
-  auto prefix_extractor = NewFixedPrefixTransform(prefix_size);
-  std::unique_ptr<BlockHashIndex> block_hash_index(
-      CreateBlockHashIndex(&index_iter, &data_iter, index_entries.size(),
-                           BytewiseComparator(), prefix_extractor));
-
-  std::map<std::string, BlockHashIndex::RestartIndex> expected = {
-      {"01xx", BlockHashIndex::RestartIndex(0, 1)},
-      {"02yy", BlockHashIndex::RestartIndex(0, 2)},
-      {"03zz", BlockHashIndex::RestartIndex(1, 1)},
-      {"04pp", BlockHashIndex::RestartIndex(1, 1)},
-      {"05ww", BlockHashIndex::RestartIndex(2, 1)},
-      {"06xx", BlockHashIndex::RestartIndex(2, 1)},
-      {"07pp", BlockHashIndex::RestartIndex(2, 1)},
-      {"08xz", BlockHashIndex::RestartIndex(2, 3)}, };
-
-  const BlockHashIndex::RestartIndex* index = nullptr;
-  // search existed prefixes
-  for (const auto& item : expected) {
-    index = block_hash_index->GetRestartIndex(item.first);
-    ASSERT_TRUE(index != nullptr);
-    ASSERT_EQ(item.second.first_index, index->first_index);
-    ASSERT_EQ(item.second.num_blocks, index->num_blocks);
-  }
-
-  // search non exist prefixes
-  ASSERT_TRUE(!block_hash_index->GetRestartIndex("00xx"));
-  ASSERT_TRUE(!block_hash_index->GetRestartIndex("10yy"));
-  ASSERT_TRUE(!block_hash_index->GetRestartIndex("20zz"));
-
-  delete prefix_extractor;
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) { return rocksdb::test::RunAllTests(); }
diff --git a/src/rocksdb/table/block_test.cc b/src/rocksdb/table/block_test.cc
deleted file mode 100644
index fdba8e9..0000000
--- a/src/rocksdb/table/block_test.cc
+++ /dev/null
@@ -1,242 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <stdio.h>
-#include <string>
-#include <vector>
-
-#include "db/dbformat.h"
-#include "db/memtable.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/table.h"
-#include "rocksdb/slice_transform.h"
-#include "table/block.h"
-#include "table/block_builder.h"
-#include "table/format.h"
-#include "table/block_hash_index.h"
-#include "util/random.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-static std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-std::string GenerateKey(int primary_key, int secondary_key, int padding_size,
-                        Random *rnd) {
-  char buf[50];
-  char *p = &buf[0];
-  snprintf(buf, sizeof(buf), "%6d%4d", primary_key, secondary_key);
-  std::string k(p);
-  if (padding_size) {
-    k += RandomString(rnd, padding_size);
-  }
-
-  return k;
-}
-
-// Generate random key value pairs.
-// The generated key will be sorted. You can tune the parameters to generated
-// different kinds of test key/value pairs for different scenario.
-void GenerateRandomKVs(std::vector<std::string> *keys,
-                       std::vector<std::string> *values, const int from,
-                       const int len, const int step = 1,
-                       const int padding_size = 0,
-                       const int keys_share_prefix = 1) {
-  Random rnd(302);
-
-  // generate different prefix
-  for (int i = from; i < from + len; i += step) {
-    // generating keys that shares the prefix
-    for (int j = 0; j < keys_share_prefix; ++j) {
-      keys->emplace_back(GenerateKey(i, j, padding_size, &rnd));
-
-      // 100 bytes values
-      values->emplace_back(RandomString(&rnd, 100));
-    }
-  }
-}
-
-class BlockTest {};
-
-// block test
-TEST(BlockTest, SimpleTest) {
-  Random rnd(301);
-  Options options = Options();
-  std::unique_ptr<InternalKeyComparator> ic;
-  ic.reset(new test::PlainInternalKeyComparator(options.comparator));
-
-  std::vector<std::string> keys;
-  std::vector<std::string> values;
-  BlockBuilder builder(options, ic.get());
-  int num_records = 100000;
-
-  GenerateRandomKVs(&keys, &values, 0, num_records);
-  // add a bunch of records to a block
-  for (int i = 0; i < num_records; i++) {
-    builder.Add(keys[i], values[i]);
-  }
-
-  // read serialized contents of the block
-  Slice rawblock = builder.Finish();
-
-  // create block reader
-  BlockContents contents;
-  contents.data = rawblock;
-  contents.cachable = false;
-  contents.heap_allocated = false;
-  Block reader(contents);
-
-  // read contents of block sequentially
-  int count = 0;
-  Iterator* iter = reader.NewIterator(options.comparator);
-  for (iter->SeekToFirst();iter->Valid(); count++, iter->Next()) {
-
-    // read kv from block
-    Slice k = iter->key();
-    Slice v = iter->value();
-
-    // compare with lookaside array
-    ASSERT_EQ(k.ToString().compare(keys[count]), 0);
-    ASSERT_EQ(v.ToString().compare(values[count]), 0);
-  }
-  delete iter;
-
-  // read block contents randomly
-  iter = reader.NewIterator(options.comparator);
-  for (int i = 0; i < num_records; i++) {
-
-    // find a random key in the lookaside array
-    int index = rnd.Uniform(num_records);
-    Slice k(keys[index]);
-
-    // search in block for this key
-    iter->Seek(k);
-    ASSERT_TRUE(iter->Valid());
-    Slice v = iter->value();
-    ASSERT_EQ(v.ToString().compare(values[index]), 0);
-  }
-  delete iter;
-}
-
-// return the block contents
-BlockContents GetBlockContents(std::unique_ptr<BlockBuilder> *builder,
-                               const std::vector<std::string> &keys,
-                               const std::vector<std::string> &values,
-                               const int prefix_group_size = 1) {
-  builder->reset(
-      new BlockBuilder(1 /* restart interval */, BytewiseComparator()));
-
-  // Add only half of the keys
-  for (size_t i = 0; i < keys.size(); ++i) {
-    (*builder)->Add(keys[i], values[i]);
-  }
-  Slice rawblock = (*builder)->Finish();
-
-  BlockContents contents;
-  contents.data = rawblock;
-  contents.cachable = false;
-  contents.heap_allocated = false;
-
-  return contents;
-}
-
-void CheckBlockContents(BlockContents contents, const int max_key,
-                        const std::vector<std::string> &keys,
-                        const std::vector<std::string> &values) {
-  const size_t prefix_size = 6;
-  // create block reader
-  Block reader1(contents);
-  Block reader2(contents);
-
-  std::unique_ptr<const SliceTransform> prefix_extractor(
-      NewFixedPrefixTransform(prefix_size));
-
-  {
-    auto iter1 = reader1.NewIterator(nullptr);
-    auto iter2 = reader1.NewIterator(nullptr);
-    reader1.SetBlockHashIndex(CreateBlockHashIndex(iter1, iter2, keys.size(),
-                                                   BytewiseComparator(),
-                                                   prefix_extractor.get()));
-
-    delete iter1;
-    delete iter2;
-  }
-
-  std::unique_ptr<Iterator> hash_iter(
-      reader1.NewIterator(BytewiseComparator()));
-
-  std::unique_ptr<Iterator> regular_iter(
-      reader2.NewIterator(BytewiseComparator()));
-
-  // Seek existent keys
-  for (size_t i = 0; i < keys.size(); i++) {
-    hash_iter->Seek(keys[i]);
-    ASSERT_OK(hash_iter->status());
-    ASSERT_TRUE(hash_iter->Valid());
-
-    Slice v = hash_iter->value();
-    ASSERT_EQ(v.ToString().compare(values[i]), 0);
-  }
-
-  // Seek non-existent keys.
-  // For hash index, if no key with a given prefix is not found, iterator will
-  // simply be set as invalid; whereas the binary search based iterator will
-  // return the one that is closest.
-  for (int i = 1; i < max_key - 1; i += 2) {
-    auto key = GenerateKey(i, 0, 0, nullptr);
-    hash_iter->Seek(key);
-    ASSERT_TRUE(!hash_iter->Valid());
-
-    regular_iter->Seek(key);
-    ASSERT_TRUE(regular_iter->Valid());
-  }
-}
-
-// In this test case, no two key share same prefix.
-TEST(BlockTest, SimpleIndexHash) {
-  const int kMaxKey = 100000;
-  std::vector<std::string> keys;
-  std::vector<std::string> values;
-  GenerateRandomKVs(&keys, &values, 0 /* first key id */,
-                    kMaxKey /* last key id */, 2 /* step */,
-                    8 /* padding size (8 bytes randomly generated suffix) */);
-
-  std::unique_ptr<BlockBuilder> builder;
-  auto contents = GetBlockContents(&builder, keys, values);
-
-  CheckBlockContents(contents, kMaxKey, keys, values);
-}
-
-TEST(BlockTest, IndexHashWithSharedPrefix) {
-  const int kMaxKey = 100000;
-  // for each prefix, there will be 5 keys starts with it.
-  const int kPrefixGroup = 5;
-  std::vector<std::string> keys;
-  std::vector<std::string> values;
-  // Generate keys with same prefix.
-  GenerateRandomKVs(&keys, &values, 0,  // first key id
-                    kMaxKey,            // last key id
-                    2,                  // step
-                    10,                 // padding size,
-                    kPrefixGroup);
-
-  std::unique_ptr<BlockBuilder> builder;
-  auto contents = GetBlockContents(&builder, keys, values, kPrefixGroup);
-
-  CheckBlockContents(contents, kMaxKey, keys, values);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/table/filter_block.cc b/src/rocksdb/table/filter_block.cc
deleted file mode 100644
index 3651a7d..0000000
--- a/src/rocksdb/table/filter_block.cc
+++ /dev/null
@@ -1,187 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/filter_block.h"
-
-#include "db/dbformat.h"
-#include "rocksdb/filter_policy.h"
-#include "util/coding.h"
-
-namespace rocksdb {
-
-// See doc/table_format.txt for an explanation of the filter block format.
-
-// Generate new filter every 2KB of data
-static const size_t kFilterBaseLg = 11;
-static const size_t kFilterBase = 1 << kFilterBaseLg;
-
-FilterBlockBuilder::FilterBlockBuilder(const Options& opt,
-                                       const Comparator* internal_comparator)
-    : policy_(opt.filter_policy),
-      prefix_extractor_(opt.prefix_extractor.get()),
-      whole_key_filtering_(opt.whole_key_filtering),
-      comparator_(internal_comparator) {}
-
-void FilterBlockBuilder::StartBlock(uint64_t block_offset) {
-  uint64_t filter_index = (block_offset / kFilterBase);
-  assert(filter_index >= filter_offsets_.size());
-  while (filter_index > filter_offsets_.size()) {
-    GenerateFilter();
-  }
-}
-
-bool FilterBlockBuilder::SamePrefix(const Slice &key1,
-                                    const Slice &key2) const {
-  if (!prefix_extractor_->InDomain(key1) &&
-      !prefix_extractor_->InDomain(key2)) {
-    return true;
-  } else if (!prefix_extractor_->InDomain(key1) ||
-             !prefix_extractor_->InDomain(key2)) {
-    return false;
-  } else {
-    return (prefix_extractor_->Transform(key1) ==
-            prefix_extractor_->Transform(key2));
-  }
-}
-
-void FilterBlockBuilder::AddKey(const Slice& key) {
-  // get slice for most recently added entry
-  Slice prev;
-  size_t added_to_start = 0;
-
-  // add key to filter if needed
-  if (whole_key_filtering_) {
-    start_.push_back(entries_.size());
-    ++added_to_start;
-    entries_.append(key.data(), key.size());
-  }
-
-  if (start_.size() > added_to_start) {
-    size_t prev_start = start_[start_.size() - 1 - added_to_start];
-    const char* base = entries_.data() + prev_start;
-    size_t length = entries_.size() - prev_start;
-    prev = Slice(base, length);
-  }
-
-  // add prefix to filter if needed
-  if (prefix_extractor_ && prefix_extractor_->InDomain(ExtractUserKey(key))) {
-    // If prefix_extractor_, this filter_block layer assumes we only
-    // operate on internal keys.
-    Slice user_key = ExtractUserKey(key);
-    // this assumes prefix(prefix(key)) == prefix(key), as the last
-    // entry in entries_ may be either a key or prefix, and we use
-    // prefix(last entry) to get the prefix of the last key.
-    if (prev.size() == 0 ||
-        !SamePrefix(user_key, ExtractUserKey(prev))) {
-      Slice prefix = prefix_extractor_->Transform(user_key);
-      InternalKey internal_prefix_tmp(prefix, 0, kTypeValue);
-      Slice internal_prefix = internal_prefix_tmp.Encode();
-      start_.push_back(entries_.size());
-      entries_.append(internal_prefix.data(), internal_prefix.size());
-    }
-  }
-}
-
-Slice FilterBlockBuilder::Finish() {
-  if (!start_.empty()) {
-    GenerateFilter();
-  }
-
-  // Append array of per-filter offsets
-  const uint32_t array_offset = result_.size();
-  for (size_t i = 0; i < filter_offsets_.size(); i++) {
-    PutFixed32(&result_, filter_offsets_[i]);
-  }
-
-  PutFixed32(&result_, array_offset);
-  result_.push_back(kFilterBaseLg);  // Save encoding parameter in result
-  return Slice(result_);
-}
-
-void FilterBlockBuilder::GenerateFilter() {
-  const size_t num_entries = start_.size();
-  if (num_entries == 0) {
-    // Fast path if there are no keys for this filter
-    filter_offsets_.push_back(result_.size());
-    return;
-  }
-
-  // Make list of keys from flattened key structure
-  start_.push_back(entries_.size());  // Simplify length computation
-  tmp_entries_.resize(num_entries);
-  for (size_t i = 0; i < num_entries; i++) {
-    const char* base = entries_.data() + start_[i];
-    size_t length = start_[i+1] - start_[i];
-    tmp_entries_[i] = Slice(base, length);
-  }
-
-  // Generate filter for current set of keys and append to result_.
-  filter_offsets_.push_back(result_.size());
-  policy_->CreateFilter(&tmp_entries_[0], num_entries, &result_);
-
-  tmp_entries_.clear();
-  entries_.clear();
-  start_.clear();
-}
-
-FilterBlockReader::FilterBlockReader(
-    const Options& opt, const Slice& contents, bool delete_contents_after_use)
-    : policy_(opt.filter_policy),
-      prefix_extractor_(opt.prefix_extractor.get()),
-      whole_key_filtering_(opt.whole_key_filtering),
-      data_(nullptr),
-      offset_(nullptr),
-      num_(0),
-      base_lg_(0) {
-  size_t n = contents.size();
-  if (n < 5) return;  // 1 byte for base_lg_ and 4 for start of offset array
-  base_lg_ = contents[n-1];
-  uint32_t last_word = DecodeFixed32(contents.data() + n - 5);
-  if (last_word > n - 5) return;
-  data_ = contents.data();
-  offset_ = data_ + last_word;
-  num_ = (n - 5 - last_word) / 4;
-  if (delete_contents_after_use) {
-    filter_data.reset(contents.data());
-  }
-}
-
-bool FilterBlockReader::KeyMayMatch(uint64_t block_offset,
-                                    const Slice& key) {
-  if (!whole_key_filtering_) {
-    return true;
-  }
-  return MayMatch(block_offset, key);
-}
-
-bool FilterBlockReader::PrefixMayMatch(uint64_t block_offset,
-                                       const Slice& prefix) {
-  if (!prefix_extractor_) {
-    return true;
-  }
-  return MayMatch(block_offset, prefix);
-}
-
-bool FilterBlockReader::MayMatch(uint64_t block_offset, const Slice& entry) {
-  uint64_t index = block_offset >> base_lg_;
-  if (index < num_) {
-    uint32_t start = DecodeFixed32(offset_ + index*4);
-    uint32_t limit = DecodeFixed32(offset_ + index*4 + 4);
-    if (start <= limit && limit <= (uint32_t)(offset_ - data_)) {
-      Slice filter = Slice(data_ + start, limit - start);
-      return policy_->KeyMayMatch(entry, filter);
-    } else if (start == limit) {
-      // Empty filters do not match any entries
-      return false;
-    }
-  }
-  return true;  // Errors are treated as potential matches
-}
-
-}
diff --git a/src/rocksdb/table/filter_block.h b/src/rocksdb/table/filter_block.h
deleted file mode 100644
index 05c2bb9..0000000
--- a/src/rocksdb/table/filter_block.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// A filter block is stored near the end of a Table file.  It contains
-// filters (e.g., bloom filters) for all data blocks in the table combined
-// into a single filter block.
-
-#pragma once
-
-#include <memory>
-#include <stddef.h>
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include "rocksdb/options.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "util/hash.h"
-
-namespace rocksdb {
-
-class FilterPolicy;
-
-// A FilterBlockBuilder is used to construct all of the filters for a
-// particular Table.  It generates a single string which is stored as
-// a special block in the Table.
-//
-// The sequence of calls to FilterBlockBuilder must match the regexp:
-//      (StartBlock AddKey*)* Finish
-class FilterBlockBuilder {
- public:
-  explicit FilterBlockBuilder(const Options& opt,
-                              const Comparator* internal_comparator);
-
-  void StartBlock(uint64_t block_offset);
-  void AddKey(const Slice& key);
-  Slice Finish();
-
- private:
-  bool SamePrefix(const Slice &key1, const Slice &key2) const;
-  void GenerateFilter();
-
-  // important: all of these might point to invalid addresses
-  // at the time of destruction of this filter block. destructor
-  // should NOT dereference them.
-  const FilterPolicy* policy_;
-  const SliceTransform* prefix_extractor_;
-  bool whole_key_filtering_;
-  const Comparator* comparator_;
-
-  std::string entries_;         // Flattened entry contents
-  std::vector<size_t> start_;   // Starting index in entries_ of each entry
-  std::string result_;          // Filter data computed so far
-  std::vector<Slice> tmp_entries_; // policy_->CreateFilter() argument
-  std::vector<uint32_t> filter_offsets_;
-
-  // No copying allowed
-  FilterBlockBuilder(const FilterBlockBuilder&);
-  void operator=(const FilterBlockBuilder&);
-};
-
-class FilterBlockReader {
- public:
- // REQUIRES: "contents" and *policy must stay live while *this is live.
-  FilterBlockReader(
-    const Options& opt,
-    const Slice& contents,
-    bool delete_contents_after_use = false);
-  bool KeyMayMatch(uint64_t block_offset, const Slice& key);
-  bool PrefixMayMatch(uint64_t block_offset, const Slice& prefix);
-
- private:
-  const FilterPolicy* policy_;
-  const SliceTransform* prefix_extractor_;
-  bool whole_key_filtering_;
-  const char* data_;    // Pointer to filter data (at block-start)
-  const char* offset_;  // Pointer to beginning of offset array (at block-end)
-  size_t num_;          // Number of entries in offset array
-  size_t base_lg_;      // Encoding parameter (see kFilterBaseLg in .cc file)
-  std::unique_ptr<const char[]> filter_data;
-
-
-  bool MayMatch(uint64_t block_offset, const Slice& entry);
-};
-
-}
diff --git a/src/rocksdb/table/filter_block_test.cc b/src/rocksdb/table/filter_block_test.cc
deleted file mode 100644
index 1703d59..0000000
--- a/src/rocksdb/table/filter_block_test.cc
+++ /dev/null
@@ -1,139 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/filter_block.h"
-
-#include "rocksdb/filter_policy.h"
-#include "util/coding.h"
-#include "util/hash.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-// For testing: emit an array with one hash value per key
-class TestHashFilter : public FilterPolicy {
- public:
-  virtual const char* Name() const {
-    return "TestHashFilter";
-  }
-
-  virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const {
-    for (int i = 0; i < n; i++) {
-      uint32_t h = Hash(keys[i].data(), keys[i].size(), 1);
-      PutFixed32(dst, h);
-    }
-  }
-
-  virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const {
-    uint32_t h = Hash(key.data(), key.size(), 1);
-    for (unsigned int i = 0; i + 4 <= filter.size(); i += 4) {
-      if (h == DecodeFixed32(filter.data() + i)) {
-        return true;
-      }
-    }
-    return false;
-  }
-};
-
-class FilterBlockTest {
- public:
-  TestHashFilter policy_;
-  Options options_;
-
-  FilterBlockTest() {
-    options_ = Options();
-    options_.filter_policy = &policy_;
-  }
-};
-
-TEST(FilterBlockTest, EmptyBuilder) {
-  FilterBlockBuilder builder(options_, options_.comparator);
-  Slice block = builder.Finish();
-  ASSERT_EQ("\\x00\\x00\\x00\\x00\\x0b", EscapeString(block));
-  FilterBlockReader reader(options_, block);
-  ASSERT_TRUE(reader.KeyMayMatch(0, "foo"));
-  ASSERT_TRUE(reader.KeyMayMatch(100000, "foo"));
-}
-
-TEST(FilterBlockTest, SingleChunk) {
-  FilterBlockBuilder builder(options_, options_.comparator);
-  builder.StartBlock(100);
-  builder.AddKey("foo");
-  builder.AddKey("bar");
-  builder.AddKey("box");
-  builder.StartBlock(200);
-  builder.AddKey("box");
-  builder.StartBlock(300);
-  builder.AddKey("hello");
-  Slice block = builder.Finish();
-  FilterBlockReader reader(options_, block);
-  ASSERT_TRUE(reader.KeyMayMatch(100, "foo"));
-  ASSERT_TRUE(reader.KeyMayMatch(100, "bar"));
-  ASSERT_TRUE(reader.KeyMayMatch(100, "box"));
-  ASSERT_TRUE(reader.KeyMayMatch(100, "hello"));
-  ASSERT_TRUE(reader.KeyMayMatch(100, "foo"));
-  ASSERT_TRUE(! reader.KeyMayMatch(100, "missing"));
-  ASSERT_TRUE(! reader.KeyMayMatch(100, "other"));
-}
-
-TEST(FilterBlockTest, MultiChunk) {
-  FilterBlockBuilder builder(options_, options_.comparator);
-
-  // First filter
-  builder.StartBlock(0);
-  builder.AddKey("foo");
-  builder.StartBlock(2000);
-  builder.AddKey("bar");
-
-  // Second filter
-  builder.StartBlock(3100);
-  builder.AddKey("box");
-
-  // Third filter is empty
-
-  // Last filter
-  builder.StartBlock(9000);
-  builder.AddKey("box");
-  builder.AddKey("hello");
-
-  Slice block = builder.Finish();
-  FilterBlockReader reader(options_, block);
-
-  // Check first filter
-  ASSERT_TRUE(reader.KeyMayMatch(0, "foo"));
-  ASSERT_TRUE(reader.KeyMayMatch(2000, "bar"));
-  ASSERT_TRUE(! reader.KeyMayMatch(0, "box"));
-  ASSERT_TRUE(! reader.KeyMayMatch(0, "hello"));
-
-  // Check second filter
-  ASSERT_TRUE(reader.KeyMayMatch(3100, "box"));
-  ASSERT_TRUE(! reader.KeyMayMatch(3100, "foo"));
-  ASSERT_TRUE(! reader.KeyMayMatch(3100, "bar"));
-  ASSERT_TRUE(! reader.KeyMayMatch(3100, "hello"));
-
-  // Check third filter (empty)
-  ASSERT_TRUE(! reader.KeyMayMatch(4100, "foo"));
-  ASSERT_TRUE(! reader.KeyMayMatch(4100, "bar"));
-  ASSERT_TRUE(! reader.KeyMayMatch(4100, "box"));
-  ASSERT_TRUE(! reader.KeyMayMatch(4100, "hello"));
-
-  // Check last filter
-  ASSERT_TRUE(reader.KeyMayMatch(9000, "box"));
-  ASSERT_TRUE(reader.KeyMayMatch(9000, "hello"));
-  ASSERT_TRUE(! reader.KeyMayMatch(9000, "foo"));
-  ASSERT_TRUE(! reader.KeyMayMatch(9000, "bar"));
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/table/flush_block_policy.cc b/src/rocksdb/table/flush_block_policy.cc
deleted file mode 100644
index 4e22352..0000000
--- a/src/rocksdb/table/flush_block_policy.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include "rocksdb/options.h"
-#include "rocksdb/flush_block_policy.h"
-#include "rocksdb/slice.h"
-#include "table/block_builder.h"
-
-#include <cassert>
-
-namespace rocksdb {
-
-// Flush block by size
-class FlushBlockBySizePolicy : public FlushBlockPolicy {
- public:
-  // @params block_size:           Approximate size of user data packed per
-  //                               block.
-  // @params block_size_deviation: This is used to close a block before it
-  //                               reaches the configured
-  FlushBlockBySizePolicy(const uint64_t block_size,
-                         const uint64_t block_size_deviation,
-                         const BlockBuilder& data_block_builder) :
-      block_size_(block_size),
-      block_size_deviation_(block_size_deviation),
-      data_block_builder_(data_block_builder) {
-  }
-
-  virtual bool Update(const Slice& key,
-                      const Slice& value) override {
-    // it makes no sense to flush when the data block is empty
-    if (data_block_builder_.empty()) {
-      return false;
-    }
-
-    auto curr_size = data_block_builder_.CurrentSizeEstimate();
-
-    // Do flush if one of the below two conditions is true:
-    // 1) if the current estimated size already exceeds the block size,
-    // 2) block_size_deviation is set and the estimated size after appending
-    // the kv will exceed the block size and the current size is under the
-    // the deviation.
-    return curr_size >= block_size_ || BlockAlmostFull(key, value);
-  }
-
- private:
-  bool BlockAlmostFull(const Slice& key, const Slice& value) const {
-    const auto curr_size = data_block_builder_.CurrentSizeEstimate();
-    const auto estimated_size_after =
-      data_block_builder_.EstimateSizeAfterKV(key, value);
-
-    return
-      estimated_size_after > block_size_ &&
-      block_size_deviation_ > 0 &&
-      curr_size * 100 > block_size_ * (100 - block_size_deviation_);
-  }
-
-  const uint64_t block_size_;
-  const uint64_t block_size_deviation_;
-  const BlockBuilder& data_block_builder_;
-};
-
-FlushBlockPolicy* FlushBlockBySizePolicyFactory::NewFlushBlockPolicy(
-    const Options& options, const BlockBuilder& data_block_builder) const {
-  return new FlushBlockBySizePolicy(
-      options.block_size, options.block_size_deviation, data_block_builder);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/format.cc b/src/rocksdb/table/format.cc
deleted file mode 100644
index e9229dc..0000000
--- a/src/rocksdb/table/format.cc
+++ /dev/null
@@ -1,371 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/format.h"
-
-#include <string>
-#include <inttypes.h>
-
-#include "port/port.h"
-#include "rocksdb/env.h"
-#include "table/block.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-#include "util/perf_context_imp.h"
-#include "util/xxhash.h"
-
-namespace rocksdb {
-
-extern const uint64_t kLegacyBlockBasedTableMagicNumber;
-extern const uint64_t kBlockBasedTableMagicNumber;
-
-#ifndef ROCKSDB_LITE
-extern const uint64_t kLegacyPlainTableMagicNumber;
-extern const uint64_t kPlainTableMagicNumber;
-#else
-// ROCKSDB_LITE doesn't have plain table
-const uint64_t kLegacyPlainTableMagicNumber = 0;
-const uint64_t kPlainTableMagicNumber = 0;
-#endif
-
-void BlockHandle::EncodeTo(std::string* dst) const {
-  // Sanity check that all fields have been set
-  assert(offset_ != ~static_cast<uint64_t>(0));
-  assert(size_ != ~static_cast<uint64_t>(0));
-  PutVarint64(dst, offset_);
-  PutVarint64(dst, size_);
-}
-
-Status BlockHandle::DecodeFrom(Slice* input) {
-  if (GetVarint64(input, &offset_) &&
-      GetVarint64(input, &size_)) {
-    return Status::OK();
-  } else {
-    return Status::Corruption("bad block handle");
-  }
-}
-const BlockHandle BlockHandle::kNullBlockHandle(0, 0);
-
-// legacy footer format:
-//    metaindex handle (varint64 offset, varint64 size)
-//    index handle     (varint64 offset, varint64 size)
-//    <padding> to make the total size 2 * BlockHandle::kMaxEncodedLength
-//    table_magic_number (8 bytes)
-// new footer format:
-//    checksum (char, 1 byte)
-//    metaindex handle (varint64 offset, varint64 size)
-//    index handle     (varint64 offset, varint64 size)
-//    <padding> to make the total size 2 * BlockHandle::kMaxEncodedLength + 1
-//    footer version (4 bytes)
-//    table_magic_number (8 bytes)
-void Footer::EncodeTo(std::string* dst) const {
-  if (version() == kLegacyFooter) {
-    // has to be default checksum with legacy footer
-    assert(checksum_ == kCRC32c);
-    const size_t original_size = dst->size();
-    metaindex_handle_.EncodeTo(dst);
-    index_handle_.EncodeTo(dst);
-    dst->resize(original_size + 2 * BlockHandle::kMaxEncodedLength);  // Padding
-    PutFixed32(dst, static_cast<uint32_t>(table_magic_number() & 0xffffffffu));
-    PutFixed32(dst, static_cast<uint32_t>(table_magic_number() >> 32));
-    assert(dst->size() == original_size + kVersion0EncodedLength);
-  } else {
-    const size_t original_size = dst->size();
-    dst->push_back(static_cast<char>(checksum_));
-    metaindex_handle_.EncodeTo(dst);
-    index_handle_.EncodeTo(dst);
-    dst->resize(original_size + kVersion1EncodedLength - 12);  // Padding
-    PutFixed32(dst, kFooterVersion);
-    PutFixed32(dst, static_cast<uint32_t>(table_magic_number() & 0xffffffffu));
-    PutFixed32(dst, static_cast<uint32_t>(table_magic_number() >> 32));
-    assert(dst->size() == original_size + kVersion1EncodedLength);
-  }
-}
-
-namespace {
-inline bool IsLegacyFooterFormat(uint64_t magic_number) {
-  return magic_number == kLegacyBlockBasedTableMagicNumber ||
-         magic_number == kLegacyPlainTableMagicNumber;
-}
-
-inline uint64_t UpconvertLegacyFooterFormat(uint64_t magic_number) {
-  if (magic_number == kLegacyBlockBasedTableMagicNumber) {
-    return kBlockBasedTableMagicNumber;
-  }
-  if (magic_number == kLegacyPlainTableMagicNumber) {
-    return kPlainTableMagicNumber;
-  }
-  assert(false);
-  return 0;
-}
-}  // namespace
-
-Footer::Footer(uint64_t table_magic_number)
-    : version_(IsLegacyFooterFormat(table_magic_number) ? kLegacyFooter
-                                                        : kFooterVersion),
-      checksum_(kCRC32c),
-      table_magic_number_(table_magic_number) {}
-
-Status Footer::DecodeFrom(Slice* input) {
-  assert(input != nullptr);
-  assert(input->size() >= kMinEncodedLength);
-
-  const char *magic_ptr =
-      input->data() + input->size() - kMagicNumberLengthByte;
-  const uint32_t magic_lo = DecodeFixed32(magic_ptr);
-  const uint32_t magic_hi = DecodeFixed32(magic_ptr + 4);
-  uint64_t magic = ((static_cast<uint64_t>(magic_hi) << 32) |
-                    (static_cast<uint64_t>(magic_lo)));
-
-  // We check for legacy formats here and silently upconvert them
-  bool legacy = IsLegacyFooterFormat(magic);
-  if (legacy) {
-    magic = UpconvertLegacyFooterFormat(magic);
-  }
-  if (HasInitializedTableMagicNumber()) {
-    if (magic != table_magic_number()) {
-      char buffer[80];
-      snprintf(buffer, sizeof(buffer) - 1,
-               "not an sstable (bad magic number --- %lx)",
-               (long)magic);
-      return Status::InvalidArgument(buffer);
-    }
-  } else {
-    set_table_magic_number(magic);
-  }
-
-  if (legacy) {
-    // The size is already asserted to be at least kMinEncodedLength
-    // at the beginning of the function
-    input->remove_prefix(input->size() - kVersion0EncodedLength);
-    version_ = kLegacyFooter;
-    checksum_ = kCRC32c;
-  } else {
-    version_ = DecodeFixed32(magic_ptr - 4);
-    if (version_ != kFooterVersion) {
-      return Status::Corruption("bad footer version");
-    }
-    // Footer version 1 will always occupy exactly this many bytes.
-    // It consists of the checksum type, two block handles, padding,
-    // a version number, and a magic number
-    if (input->size() < kVersion1EncodedLength) {
-      return Status::InvalidArgument("input is too short to be an sstable");
-    } else {
-      input->remove_prefix(input->size() - kVersion1EncodedLength);
-    }
-    uint32_t checksum;
-    if (!GetVarint32(input, &checksum)) {
-      return Status::Corruption("bad checksum type");
-    }
-    checksum_ = static_cast<ChecksumType>(checksum);
-  }
-
-  Status result = metaindex_handle_.DecodeFrom(input);
-  if (result.ok()) {
-    result = index_handle_.DecodeFrom(input);
-  }
-  if (result.ok()) {
-    // We skip over any leftover data (just padding for now) in "input"
-    const char* end = magic_ptr + kMagicNumberLengthByte;
-    *input = Slice(end, input->data() + input->size() - end);
-  }
-  return result;
-}
-
-Status ReadFooterFromFile(RandomAccessFile* file,
-                          uint64_t file_size,
-                          Footer* footer) {
-  if (file_size < Footer::kMinEncodedLength) {
-    return Status::InvalidArgument("file is too short to be an sstable");
-  }
-
-  char footer_space[Footer::kMaxEncodedLength];
-  Slice footer_input;
-  size_t read_offset = (file_size > Footer::kMaxEncodedLength)
-                           ? (file_size - Footer::kMaxEncodedLength)
-                           : 0;
-  Status s = file->Read(read_offset, Footer::kMaxEncodedLength, &footer_input,
-                        footer_space);
-  if (!s.ok()) return s;
-
-  // Check that we actually read the whole footer from the file. It may be
-  // that size isn't correct.
-  if (footer_input.size() < Footer::kMinEncodedLength) {
-    return Status::InvalidArgument("file is too short to be an sstable");
-  }
-
-  return footer->DecodeFrom(&footer_input);
-}
-
-Status ReadBlockContents(RandomAccessFile* file,
-                         const Footer& footer,
-                         const ReadOptions& options,
-                         const BlockHandle& handle,
-                         BlockContents* result,
-                         Env* env,
-                         bool do_uncompress) {
-  result->data = Slice();
-  result->cachable = false;
-  result->heap_allocated = false;
-
-  // Read the block contents as well as the type/crc footer.
-  // See table_builder.cc for the code that built this structure.
-  size_t n = static_cast<size_t>(handle.size());
-  char* buf = new char[n + kBlockTrailerSize];
-  Slice contents;
-
-  PERF_TIMER_AUTO(block_read_time);
-  Status s = file->Read(handle.offset(), n + kBlockTrailerSize, &contents, buf);
-  PERF_TIMER_MEASURE(block_read_time);
-  PERF_COUNTER_ADD(block_read_count, 1);
-  PERF_COUNTER_ADD(block_read_byte, n + kBlockTrailerSize);
-
-  if (!s.ok()) {
-    delete[] buf;
-    return s;
-  }
-  if (contents.size() != n + kBlockTrailerSize) {
-    delete[] buf;
-    return Status::Corruption("truncated block read");
-  }
-
-  // Check the crc of the type and the block contents
-  const char* data = contents.data();    // Pointer to where Read put the data
-  if (options.verify_checksums) {
-    uint32_t value = DecodeFixed32(data + n + 1);
-    uint32_t actual = 0;
-    switch (footer.checksum()) {
-      case kCRC32c:
-        value = crc32c::Unmask(value);
-        actual = crc32c::Value(data, n + 1);
-        break;
-      case kxxHash:
-        actual = XXH32(data, n + 1, 0);
-        break;
-      default:
-        s = Status::Corruption("unknown checksum type");
-    }
-    if (s.ok() && actual != value) {
-      s = Status::Corruption("block checksum mismatch");
-    }
-    if (!s.ok()) {
-      delete[] buf;
-      return s;
-    }
-    PERF_TIMER_MEASURE(block_checksum_time);
-  }
-
-  rocksdb::CompressionType compression_type =
-      static_cast<rocksdb::CompressionType>(data[n]);
-  // If the caller has requested that the block not be uncompressed
-  if (!do_uncompress || compression_type == kNoCompression) {
-    if (data != buf) {
-      // File implementation gave us pointer to some other data.
-      // Use it directly under the assumption that it will be live
-      // while the file is open.
-      delete[] buf;
-      result->data = Slice(data, n);
-      result->heap_allocated = false;
-      result->cachable = false;  // Do not double-cache
-    } else {
-      result->data = Slice(buf, n);
-      result->heap_allocated = true;
-      result->cachable = true;
-    }
-    result->compression_type = compression_type;
-    s = Status::OK();
-  } else {
-    s = UncompressBlockContents(data, n, result);
-    delete[] buf;
-  }
-  PERF_TIMER_STOP(block_decompress_time);
-  return s;
-}
-
-//
-// The 'data' points to the raw block contents that was read in from file.
-// This method allocates a new heap buffer and the raw block
-// contents are uncompresed into this buffer. This
-// buffer is returned via 'result' and it is upto the caller to
-// free this buffer.
-Status UncompressBlockContents(const char* data, size_t n,
-                               BlockContents* result) {
-  char* ubuf = nullptr;
-  int decompress_size = 0;
-  assert(data[n] != kNoCompression);
-  switch (data[n]) {
-    case kSnappyCompression: {
-      size_t ulength = 0;
-      static char snappy_corrupt_msg[] =
-        "Snappy not supported or corrupted Snappy compressed block contents";
-      if (!port::Snappy_GetUncompressedLength(data, n, &ulength)) {
-        return Status::Corruption(snappy_corrupt_msg);
-      }
-      ubuf = new char[ulength];
-      if (!port::Snappy_Uncompress(data, n, ubuf)) {
-        delete[] ubuf;
-        return Status::Corruption(snappy_corrupt_msg);
-      }
-      result->data = Slice(ubuf, ulength);
-      result->heap_allocated = true;
-      result->cachable = true;
-      break;
-    }
-    case kZlibCompression:
-      ubuf = port::Zlib_Uncompress(data, n, &decompress_size);
-      static char zlib_corrupt_msg[] =
-        "Zlib not supported or corrupted Zlib compressed block contents";
-      if (!ubuf) {
-        return Status::Corruption(zlib_corrupt_msg);
-      }
-      result->data = Slice(ubuf, decompress_size);
-      result->heap_allocated = true;
-      result->cachable = true;
-      break;
-    case kBZip2Compression:
-      ubuf = port::BZip2_Uncompress(data, n, &decompress_size);
-      static char bzip2_corrupt_msg[] =
-        "Bzip2 not supported or corrupted Bzip2 compressed block contents";
-      if (!ubuf) {
-        return Status::Corruption(bzip2_corrupt_msg);
-      }
-      result->data = Slice(ubuf, decompress_size);
-      result->heap_allocated = true;
-      result->cachable = true;
-      break;
-    case kLZ4Compression:
-      ubuf = port::LZ4_Uncompress(data, n, &decompress_size);
-      static char lz4_corrupt_msg[] =
-          "LZ4 not supported or corrupted LZ4 compressed block contents";
-      if (!ubuf) {
-        return Status::Corruption(lz4_corrupt_msg);
-      }
-      result->data = Slice(ubuf, decompress_size);
-      result->heap_allocated = true;
-      result->cachable = true;
-      break;
-    case kLZ4HCCompression:
-      ubuf = port::LZ4_Uncompress(data, n, &decompress_size);
-      static char lz4hc_corrupt_msg[] =
-          "LZ4HC not supported or corrupted LZ4HC compressed block contents";
-      if (!ubuf) {
-        return Status::Corruption(lz4hc_corrupt_msg);
-      }
-      result->data = Slice(ubuf, decompress_size);
-      result->heap_allocated = true;
-      result->cachable = true;
-      break;
-    default:
-      return Status::Corruption("bad block type");
-  }
-  result->compression_type = kNoCompression;  // not compressed any more
-  return Status::OK();
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/format.h b/src/rocksdb/table/format.h
deleted file mode 100644
index a971c1a..0000000
--- a/src/rocksdb/table/format.h
+++ /dev/null
@@ -1,198 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <string>
-#include <stdint.h>
-#include "rocksdb/slice.h"
-#include "rocksdb/status.h"
-#include "rocksdb/options.h"
-#include "rocksdb/table.h"
-
-namespace rocksdb {
-
-class Block;
-class RandomAccessFile;
-struct ReadOptions;
-
-// the length of the magic number in bytes.
-const int kMagicNumberLengthByte = 8;
-
-// BlockHandle is a pointer to the extent of a file that stores a data
-// block or a meta block.
-class BlockHandle {
- public:
-  BlockHandle();
-  BlockHandle(uint64_t offset, uint64_t size);
-
-  // The offset of the block in the file.
-  uint64_t offset() const { return offset_; }
-  void set_offset(uint64_t offset) { offset_ = offset; }
-
-  // The size of the stored block
-  uint64_t size() const { return size_; }
-  void set_size(uint64_t size) { size_ = size; }
-
-  void EncodeTo(std::string* dst) const;
-  Status DecodeFrom(Slice* input);
-
-  // if the block handle's offset and size are both "0", we will view it
-  // as a null block handle that points to no where.
-  bool IsNull() const {
-    return offset_ == 0 && size_ == 0;
-  }
-
-  static const BlockHandle& NullBlockHandle() {
-    return kNullBlockHandle;
-  }
-
-  // Maximum encoding length of a BlockHandle
-  enum { kMaxEncodedLength = 10 + 10 };
-
- private:
-  uint64_t offset_ = 0;
-  uint64_t size_ = 0;
-
-  static const BlockHandle kNullBlockHandle;
-};
-
-// Footer encapsulates the fixed information stored at the tail
-// end of every table file.
-class Footer {
- public:
-  // Constructs a footer without specifying its table magic number.
-  // In such case, the table magic number of such footer should be
-  // initialized via @ReadFooterFromFile().
-  Footer() : Footer(kInvalidTableMagicNumber) {}
-
-  // @table_magic_number serves two purposes:
-  //  1. Identify different types of the tables.
-  //  2. Help us to identify if a given file is a valid sst.
-  explicit Footer(uint64_t table_magic_number);
-
-  // The version of the footer in this file
-  uint32_t version() const { return version_; }
-
-  // The checksum type used in this file
-  ChecksumType checksum() const { return checksum_; }
-  void set_checksum(const ChecksumType c) { checksum_ = c; }
-
-  // The block handle for the metaindex block of the table
-  const BlockHandle& metaindex_handle() const { return metaindex_handle_; }
-  void set_metaindex_handle(const BlockHandle& h) { metaindex_handle_ = h; }
-
-  // The block handle for the index block of the table
-  const BlockHandle& index_handle() const { return index_handle_; }
-
-  void set_index_handle(const BlockHandle& h) { index_handle_ = h; }
-
-  uint64_t table_magic_number() const { return table_magic_number_; }
-
-  // The version of Footer we encode
-  enum {
-    kLegacyFooter = 0,
-    kFooterVersion = 1,
-  };
-
-  void EncodeTo(std::string* dst) const;
-
-  // Set the current footer based on the input slice.  If table_magic_number_
-  // is not set (i.e., HasInitializedTableMagicNumber() is true), then this
-  // function will also initialize table_magic_number_.  Otherwise, this
-  // function will verify whether the magic number specified in the input
-  // slice matches table_magic_number_ and update the current footer only
-  // when the test passes.
-  Status DecodeFrom(Slice* input);
-
-  // Encoded length of a Footer.  Note that the serialization of a Footer will
-  // always occupy at least kMinEncodedLength bytes.  If fields are changed
-  // the version number should be incremented and kMaxEncodedLength should be
-  // increased accordingly.
-  enum {
-    // Footer version 0 (legacy) will always occupy exactly this many bytes.
-    // It consists of two block handles, padding, and a magic number.
-    kVersion0EncodedLength = 2 * BlockHandle::kMaxEncodedLength + 8,
-    // Footer version 1 will always occupy exactly this many bytes.
-    // It consists of the checksum type, two block handles, padding,
-    // a version number, and a magic number
-    kVersion1EncodedLength = 1 + 2 * BlockHandle::kMaxEncodedLength + 4 + 8,
-
-    kMinEncodedLength = kVersion0EncodedLength,
-    kMaxEncodedLength = kVersion1EncodedLength
-  };
-
-  static const uint64_t kInvalidTableMagicNumber = 0;
-
- private:
-  // REQUIRES: magic number wasn't initialized.
-  void set_table_magic_number(uint64_t magic_number) {
-    assert(!HasInitializedTableMagicNumber());
-    table_magic_number_ = magic_number;
-  }
-
-  // return true if @table_magic_number_ is set to a value different
-  // from @kInvalidTableMagicNumber.
-  bool HasInitializedTableMagicNumber() const {
-    return (table_magic_number_ != kInvalidTableMagicNumber);
-  }
-
-  uint32_t version_;
-  ChecksumType checksum_;
-  BlockHandle metaindex_handle_;
-  BlockHandle index_handle_;
-  uint64_t table_magic_number_ = 0;
-};
-
-// Read the footer from file
-Status ReadFooterFromFile(RandomAccessFile* file,
-                          uint64_t file_size,
-                          Footer* footer);
-
-// 1-byte type + 32-bit crc
-static const size_t kBlockTrailerSize = 5;
-
-struct BlockContents {
-  Slice data;           // Actual contents of data
-  bool cachable;        // True iff data can be cached
-  bool heap_allocated;  // True iff caller should delete[] data.data()
-  CompressionType compression_type;
-};
-
-// Read the block identified by "handle" from "file".  On failure
-// return non-OK.  On success fill *result and return OK.
-extern Status ReadBlockContents(RandomAccessFile* file,
-                                const Footer& footer,
-                                const ReadOptions& options,
-                                const BlockHandle& handle,
-                                BlockContents* result,
-                                Env* env,
-                                bool do_uncompress);
-
-// The 'data' points to the raw block contents read in from file.
-// This method allocates a new heap buffer and the raw block
-// contents are uncompresed into this buffer. This buffer is
-// returned via 'result' and it is upto the caller to
-// free this buffer.
-extern Status UncompressBlockContents(const char* data,
-                                      size_t n,
-                                      BlockContents* result);
-
-// Implementation details follow.  Clients should ignore,
-
-inline BlockHandle::BlockHandle()
-    : BlockHandle(~static_cast<uint64_t>(0),
-                  ~static_cast<uint64_t>(0)) {
-}
-
-inline BlockHandle::BlockHandle(uint64_t offset, uint64_t size)
-    : offset_(offset),
-      size_(size) {
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/iter_heap.h b/src/rocksdb/table/iter_heap.h
deleted file mode 100644
index 9569d36..0000000
--- a/src/rocksdb/table/iter_heap.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#pragma once
-#include <queue>
-
-#include "rocksdb/comparator.h"
-#include "table/iterator_wrapper.h"
-
-namespace rocksdb {
-
-// Return the max of two keys.
-class MaxIteratorComparator {
- public:
-  MaxIteratorComparator(const Comparator* comparator) :
-    comparator_(comparator) {}
-
-  bool operator()(IteratorWrapper* a, IteratorWrapper* b) {
-    return comparator_->Compare(a->key(), b->key()) <= 0;
-  }
- private:
-  const Comparator* comparator_;
-};
-
-// Return the max of two keys.
-class MinIteratorComparator {
- public:
-  // if maxHeap is set comparator returns the max value.
-  // else returns the min Value.
-  // Can use to create a minHeap or a maxHeap.
-  MinIteratorComparator(const Comparator* comparator) :
-    comparator_(comparator) {}
-
-  bool operator()(IteratorWrapper* a, IteratorWrapper* b) {
-    return comparator_->Compare(a->key(), b->key()) > 0;
-  }
- private:
-  const Comparator* comparator_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/iterator.cc b/src/rocksdb/table/iterator.cc
deleted file mode 100644
index a3d4f63..0000000
--- a/src/rocksdb/table/iterator.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/iterator.h"
-
-namespace rocksdb {
-
-Iterator::Iterator() {
-  cleanup_.function = nullptr;
-  cleanup_.next = nullptr;
-}
-
-Iterator::~Iterator() {
-  if (cleanup_.function != nullptr) {
-    (*cleanup_.function)(cleanup_.arg1, cleanup_.arg2);
-    for (Cleanup* c = cleanup_.next; c != nullptr; ) {
-      (*c->function)(c->arg1, c->arg2);
-      Cleanup* next = c->next;
-      delete c;
-      c = next;
-    }
-  }
-}
-
-void Iterator::RegisterCleanup(CleanupFunction func, void* arg1, void* arg2) {
-  assert(func != nullptr);
-  Cleanup* c;
-  if (cleanup_.function == nullptr) {
-    c = &cleanup_;
-  } else {
-    c = new Cleanup;
-    c->next = cleanup_.next;
-    cleanup_.next = c;
-  }
-  c->function = func;
-  c->arg1 = arg1;
-  c->arg2 = arg2;
-}
-
-namespace {
-class EmptyIterator : public Iterator {
- public:
-  explicit EmptyIterator(const Status& s) : status_(s) { }
-  virtual bool Valid() const { return false; }
-  virtual void Seek(const Slice& target) { }
-  virtual void SeekToFirst() { }
-  virtual void SeekToLast() { }
-  virtual void Next() { assert(false); }
-  virtual void Prev() { assert(false); }
-  Slice key() const { assert(false); return Slice(); }
-  Slice value() const { assert(false); return Slice(); }
-  virtual Status status() const { return status_; }
- private:
-  Status status_;
-};
-}  // namespace
-
-Iterator* NewEmptyIterator() {
-  return new EmptyIterator(Status::OK());
-}
-
-Iterator* NewErrorIterator(const Status& status) {
-  return new EmptyIterator(status);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/iterator_wrapper.h b/src/rocksdb/table/iterator_wrapper.h
deleted file mode 100644
index cb8520b..0000000
--- a/src/rocksdb/table/iterator_wrapper.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-namespace rocksdb {
-
-// A internal wrapper class with an interface similar to Iterator that
-// caches the valid() and key() results for an underlying iterator.
-// This can help avoid virtual function calls and also gives better
-// cache locality.
-class IteratorWrapper {
- public:
-  IteratorWrapper(): iter_(nullptr), valid_(false) { }
-  explicit IteratorWrapper(Iterator* iter): iter_(nullptr) {
-    Set(iter);
-  }
-  ~IteratorWrapper() { delete iter_; }
-  Iterator* iter() const { return iter_; }
-
-  // Takes ownership of "iter" and will delete it when destroyed, or
-  // when Set() is invoked again.
-  void Set(Iterator* iter) {
-    delete iter_;
-    iter_ = iter;
-    if (iter_ == nullptr) {
-      valid_ = false;
-    } else {
-      Update();
-    }
-  }
-
-
-  // Iterator interface methods
-  bool Valid() const        { return valid_; }
-  Slice key() const         { assert(Valid()); return key_; }
-  Slice value() const       { assert(Valid()); return iter_->value(); }
-  // Methods below require iter() != nullptr
-  Status status() const     { assert(iter_); return iter_->status(); }
-  void Next()               { assert(iter_); iter_->Next();        Update(); }
-  void Prev()               { assert(iter_); iter_->Prev();        Update(); }
-  void Seek(const Slice& k) { assert(iter_); iter_->Seek(k);       Update(); }
-  void SeekToFirst()        { assert(iter_); iter_->SeekToFirst(); Update(); }
-  void SeekToLast()         { assert(iter_); iter_->SeekToLast();  Update(); }
-
- private:
-  void Update() {
-    valid_ = iter_->Valid();
-    if (valid_) {
-      key_ = iter_->key();
-    }
-  }
-
-  Iterator* iter_;
-  bool valid_;
-  Slice key_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/merger.cc b/src/rocksdb/table/merger.cc
deleted file mode 100644
index b829f71..0000000
--- a/src/rocksdb/table/merger.cc
+++ /dev/null
@@ -1,301 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/merger.h"
-
-#include <vector>
-#include <queue>
-
-#include "rocksdb/comparator.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/options.h"
-#include "table/iter_heap.h"
-#include "table/iterator_wrapper.h"
-#include "util/stop_watch.h"
-#include "util/perf_context_imp.h"
-
-namespace rocksdb {
-namespace {
-
-typedef std::priority_queue<
-          IteratorWrapper*,
-          std::vector<IteratorWrapper*>,
-          MaxIteratorComparator> MaxIterHeap;
-
-typedef std::priority_queue<
-          IteratorWrapper*,
-          std::vector<IteratorWrapper*>,
-          MinIteratorComparator> MinIterHeap;
-
-// Return's a new MaxHeap of IteratorWrapper's using the provided Comparator.
-MaxIterHeap NewMaxIterHeap(const Comparator* comparator) {
-  return MaxIterHeap(MaxIteratorComparator(comparator));
-}
-
-// Return's a new MinHeap of IteratorWrapper's using the provided Comparator.
-MinIterHeap NewMinIterHeap(const Comparator* comparator) {
-  return MinIterHeap(MinIteratorComparator(comparator));
-}
-
-class MergingIterator : public Iterator {
- public:
-  MergingIterator(const Comparator* comparator, Iterator** children, int n)
-      : comparator_(comparator),
-        children_(n),
-        current_(nullptr),
-        use_heap_(true),
-        direction_(kForward),
-        maxHeap_(NewMaxIterHeap(comparator_)),
-        minHeap_(NewMinIterHeap(comparator_)) {
-    for (int i = 0; i < n; i++) {
-      children_[i].Set(children[i]);
-    }
-    for (auto& child : children_) {
-      if (child.Valid()) {
-        minHeap_.push(&child);
-      }
-    }
-  }
-
-  virtual ~MergingIterator() { }
-
-  virtual bool Valid() const {
-    return (current_ != nullptr);
-  }
-
-  virtual void SeekToFirst() {
-    ClearHeaps();
-    for (auto& child : children_) {
-      child.SeekToFirst();
-      if (child.Valid()) {
-        minHeap_.push(&child);
-      }
-    }
-    FindSmallest();
-    direction_ = kForward;
-  }
-
-  virtual void SeekToLast() {
-    ClearHeaps();
-    for (auto& child : children_) {
-      child.SeekToLast();
-      if (child.Valid()) {
-        maxHeap_.push(&child);
-      }
-    }
-    FindLargest();
-    direction_ = kReverse;
-  }
-
-  virtual void Seek(const Slice& target) {
-    // Invalidate the heap.
-    use_heap_ = false;
-    IteratorWrapper* first_child = nullptr;
-    PERF_TIMER_DECLARE();
-
-    for (auto& child : children_) {
-      PERF_TIMER_START(seek_child_seek_time);
-      child.Seek(target);
-      PERF_TIMER_STOP(seek_child_seek_time);
-      PERF_COUNTER_ADD(seek_child_seek_count, 1);
-
-      if (child.Valid()) {
-        // This child has valid key
-        if (!use_heap_) {
-          if (first_child == nullptr) {
-            // It's the first child has valid key. Only put it int
-            // current_. Now the values in the heap should be invalid.
-            first_child = &child;
-          } else {
-            // We have more than one children with valid keys. Initialize
-            // the heap and put the first child into the heap.
-            PERF_TIMER_START(seek_min_heap_time);
-            ClearHeaps();
-            minHeap_.push(first_child);
-            PERF_TIMER_STOP(seek_min_heap_time);
-          }
-        }
-        if (use_heap_) {
-          PERF_TIMER_START(seek_min_heap_time);
-          minHeap_.push(&child);
-          PERF_TIMER_STOP(seek_min_heap_time);
-        }
-      }
-    }
-    if (use_heap_) {
-      // If heap is valid, need to put the smallest key to curent_.
-      PERF_TIMER_START(seek_min_heap_time);
-      FindSmallest();
-      PERF_TIMER_STOP(seek_min_heap_time);
-    } else {
-      // The heap is not valid, then the current_ iterator is the first
-      // one, or null if there is no first child.
-      current_ = first_child;
-    }
-    direction_ = kForward;
-  }
-
-  virtual void Next() {
-    assert(Valid());
-
-    // Ensure that all children are positioned after key().
-    // If we are moving in the forward direction, it is already
-    // true for all of the non-current_ children since current_ is
-    // the smallest child and key() == current_->key().  Otherwise,
-    // we explicitly position the non-current_ children.
-    if (direction_ != kForward) {
-      ClearHeaps();
-      for (auto& child : children_) {
-        if (&child != current_) {
-          child.Seek(key());
-          if (child.Valid() &&
-              comparator_->Compare(key(), child.key()) == 0) {
-            child.Next();
-          }
-          if (child.Valid()) {
-            minHeap_.push(&child);
-          }
-        }
-      }
-      direction_ = kForward;
-    }
-
-    // as the current points to the current record. move the iterator forward.
-    // and if it is valid add it to the heap.
-    current_->Next();
-    if (use_heap_) {
-      if (current_->Valid()) {
-        minHeap_.push(current_);
-      }
-      FindSmallest();
-    } else if (!current_->Valid()) {
-      current_ = nullptr;
-    }
-  }
-
-  virtual void Prev() {
-    assert(Valid());
-    // Ensure that all children are positioned before key().
-    // If we are moving in the reverse direction, it is already
-    // true for all of the non-current_ children since current_ is
-    // the largest child and key() == current_->key().  Otherwise,
-    // we explicitly position the non-current_ children.
-    if (direction_ != kReverse) {
-      ClearHeaps();
-      for (auto& child : children_) {
-        if (&child != current_) {
-          child.Seek(key());
-          if (child.Valid()) {
-            // Child is at first entry >= key().  Step back one to be < key()
-            child.Prev();
-          } else {
-            // Child has no entries >= key().  Position at last entry.
-            child.SeekToLast();
-          }
-          if (child.Valid()) {
-            maxHeap_.push(&child);
-          }
-        }
-      }
-      direction_ = kReverse;
-    }
-
-    current_->Prev();
-    if (current_->Valid()) {
-      maxHeap_.push(current_);
-    }
-    FindLargest();
-  }
-
-  virtual Slice key() const {
-    assert(Valid());
-    return current_->key();
-  }
-
-  virtual Slice value() const {
-    assert(Valid());
-    return current_->value();
-  }
-
-  virtual Status status() const {
-    Status status;
-    for (auto& child : children_) {
-      status = child.status();
-      if (!status.ok()) {
-        break;
-      }
-    }
-    return status;
-  }
-
- private:
-  void FindSmallest();
-  void FindLargest();
-  void ClearHeaps();
-
-  const Comparator* comparator_;
-  std::vector<IteratorWrapper> children_;
-  IteratorWrapper* current_;
-  // If the value is true, both of iterators in the heap and current_
-  // contain valid rows. If it is false, only current_ can possibly contain
-  // valid rows.
-  // This flag is always true for reverse direction, as we always use heap for
-  // the reverse iterating case.
-  bool use_heap_;
-  // Which direction is the iterator moving?
-  enum Direction {
-    kForward,
-    kReverse
-  };
-  Direction direction_;
-  MaxIterHeap maxHeap_;
-  MinIterHeap minHeap_;
-};
-
-void MergingIterator::FindSmallest() {
-  assert(use_heap_);
-  if (minHeap_.empty()) {
-    current_ = nullptr;
-  } else {
-    current_ = minHeap_.top();
-    assert(current_->Valid());
-    minHeap_.pop();
-  }
-}
-
-void MergingIterator::FindLargest() {
-  assert(use_heap_);
-  if (maxHeap_.empty()) {
-    current_ = nullptr;
-  } else {
-    current_ = maxHeap_.top();
-    assert(current_->Valid());
-    maxHeap_.pop();
-  }
-}
-
-void MergingIterator::ClearHeaps() {
-  use_heap_ = true;
-  maxHeap_ = NewMaxIterHeap(comparator_);
-  minHeap_ = NewMinIterHeap(comparator_);
-}
-}  // namespace
-
-Iterator* NewMergingIterator(const Comparator* cmp, Iterator** list, int n) {
-  assert(n >= 0);
-  if (n == 0) {
-    return NewEmptyIterator();
-  } else if (n == 1) {
-    return list[0];
-  } else {
-    return new MergingIterator(cmp, list, n);
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/merger.h b/src/rocksdb/table/merger.h
deleted file mode 100644
index 3a1a4fe..0000000
--- a/src/rocksdb/table/merger.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-namespace rocksdb {
-
-class Comparator;
-class Iterator;
-class Env;
-
-// Return an iterator that provided the union of the data in
-// children[0,n-1].  Takes ownership of the child iterators and
-// will delete them when the result iterator is deleted.
-//
-// The result does no duplicate suppression.  I.e., if a particular
-// key is present in K child iterators, it will be yielded K times.
-//
-// REQUIRES: n >= 0
-extern Iterator* NewMergingIterator(const Comparator* comparator,
-                                    Iterator** children, int n);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/meta_blocks.cc b/src/rocksdb/table/meta_blocks.cc
deleted file mode 100644
index f28b44d..0000000
--- a/src/rocksdb/table/meta_blocks.cc
+++ /dev/null
@@ -1,266 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-#include "table/meta_blocks.h"
-
-#include <map>
-#include <string>
-
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-#include "table/block.h"
-#include "table/format.h"
-#include "util/coding.h"
-
-namespace rocksdb {
-
-MetaIndexBuilder::MetaIndexBuilder()
-    : meta_index_block_(
-        new BlockBuilder(1 /* restart interval */, BytewiseComparator())) {
-}
-
-void MetaIndexBuilder::Add(const std::string& key,
-                           const BlockHandle& handle) {
-  std::string handle_encoding;
-  handle.EncodeTo(&handle_encoding);
-  meta_block_handles_.insert({key, handle_encoding});
-}
-
-Slice MetaIndexBuilder::Finish() {
-  for (const auto& metablock : meta_block_handles_) {
-    meta_index_block_->Add(metablock.first, metablock.second);
-  }
-  return meta_index_block_->Finish();
-}
-
-PropertyBlockBuilder::PropertyBlockBuilder()
-  : properties_block_(
-      new BlockBuilder(1 /* restart interval */, BytewiseComparator())) {
-}
-
-void PropertyBlockBuilder::Add(const std::string& name,
-                               const std::string& val) {
-  props_.insert({name, val});
-}
-
-void PropertyBlockBuilder::Add(const std::string& name, uint64_t val) {
-  assert(props_.find(name) == props_.end());
-
-  std::string dst;
-  PutVarint64(&dst, val);
-
-  Add(name, dst);
-}
-
-void PropertyBlockBuilder::Add(
-    const UserCollectedProperties& user_collected_properties) {
-  for (const auto& prop : user_collected_properties) {
-    Add(prop.first, prop.second);
-  }
-}
-
-void PropertyBlockBuilder::AddTableProperty(const TableProperties& props) {
-  Add(TablePropertiesNames::kRawKeySize, props.raw_key_size);
-  Add(TablePropertiesNames::kRawValueSize, props.raw_value_size);
-  Add(TablePropertiesNames::kDataSize, props.data_size);
-  Add(TablePropertiesNames::kIndexSize, props.index_size);
-  Add(TablePropertiesNames::kNumEntries, props.num_entries);
-  Add(TablePropertiesNames::kNumDataBlocks, props.num_data_blocks);
-  Add(TablePropertiesNames::kFilterSize, props.filter_size);
-  Add(TablePropertiesNames::kFormatVersion, props.format_version);
-  Add(TablePropertiesNames::kFixedKeyLen, props.fixed_key_len);
-
-  if (!props.filter_policy_name.empty()) {
-    Add(TablePropertiesNames::kFilterPolicy,
-        props.filter_policy_name);
-  }
-}
-
-Slice PropertyBlockBuilder::Finish() {
-  for (const auto& prop : props_) {
-    properties_block_->Add(prop.first, prop.second);
-  }
-
-  return properties_block_->Finish();
-}
-
-void LogPropertiesCollectionError(
-    Logger* info_log, const std::string& method, const std::string& name) {
-  assert(method == "Add" || method == "Finish");
-
-  std::string msg =
-    "[Warning] encountered error when calling TablePropertiesCollector::" +
-    method + "() with collector name: " + name;
-  Log(info_log, "%s", msg.c_str());
-}
-
-bool NotifyCollectTableCollectorsOnAdd(
-    const Slice& key,
-    const Slice& value,
-    const Options::TablePropertiesCollectors& collectors,
-    Logger* info_log) {
-  bool all_succeeded = true;
-  for (auto collector : collectors) {
-    Status s = collector->Add(key, value);
-    all_succeeded = all_succeeded && s.ok();
-    if (!s.ok()) {
-      LogPropertiesCollectionError(info_log, "Add" /* method */,
-                                   collector->Name());
-    }
-  }
-  return all_succeeded;
-}
-
-bool NotifyCollectTableCollectorsOnFinish(
-    const Options::TablePropertiesCollectors& collectors,
-    Logger* info_log,
-    PropertyBlockBuilder* builder) {
-  bool all_succeeded = true;
-  for (auto collector : collectors) {
-    UserCollectedProperties user_collected_properties;
-    Status s = collector->Finish(&user_collected_properties);
-
-    all_succeeded = all_succeeded && s.ok();
-    if (!s.ok()) {
-      LogPropertiesCollectionError(info_log, "Finish" /* method */,
-                                   collector->Name());
-    } else {
-      builder->Add(user_collected_properties);
-    }
-  }
-
-  return all_succeeded;
-}
-
-Status ReadProperties(const Slice &handle_value, RandomAccessFile *file,
-                      const Footer &footer, Env *env, Logger *logger,
-                      TableProperties **table_properties) {
-  assert(table_properties);
-
-  Slice v = handle_value;
-  BlockHandle handle;
-  if (!handle.DecodeFrom(&v).ok()) {
-    return Status::InvalidArgument("Failed to decode properties block handle");
-  }
-
-  BlockContents block_contents;
-  ReadOptions read_options;
-  read_options.verify_checksums = false;
-  Status s = ReadBlockContents(file, footer, read_options, handle,
-                               &block_contents, env, false);
-
-  if (!s.ok()) {
-    return s;
-  }
-
-  Block properties_block(block_contents);
-  std::unique_ptr<Iterator> iter(
-      properties_block.NewIterator(BytewiseComparator()));
-
-  auto new_table_properties = new TableProperties();
-  // All pre-defined properties of type uint64_t
-  std::unordered_map<std::string, uint64_t*> predefined_uint64_properties = {
-      {TablePropertiesNames::kDataSize, &new_table_properties->data_size},
-      {TablePropertiesNames::kIndexSize, &new_table_properties->index_size},
-      {TablePropertiesNames::kFilterSize, &new_table_properties->filter_size},
-      {TablePropertiesNames::kRawKeySize, &new_table_properties->raw_key_size},
-      {TablePropertiesNames::kRawValueSize,
-       &new_table_properties->raw_value_size},
-      {TablePropertiesNames::kNumDataBlocks,
-       &new_table_properties->num_data_blocks},
-      {TablePropertiesNames::kNumEntries, &new_table_properties->num_entries},
-      {TablePropertiesNames::kFormatVersion,
-       &new_table_properties->format_version},
-      {TablePropertiesNames::kFixedKeyLen,
-       &new_table_properties->fixed_key_len}, };
-
-  std::string last_key;
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    s = iter->status();
-    if (!s.ok()) {
-      break;
-    }
-
-    auto key = iter->key().ToString();
-    // properties block is strictly sorted with no duplicate key.
-    assert(last_key.empty() ||
-           BytewiseComparator()->Compare(key, last_key) > 0);
-    last_key = key;
-
-    auto raw_val = iter->value();
-    auto pos = predefined_uint64_properties.find(key);
-
-    if (pos != predefined_uint64_properties.end()) {
-      // handle predefined rocksdb properties
-      uint64_t val;
-      if (!GetVarint64(&raw_val, &val)) {
-        // skip malformed value
-        auto error_msg =
-          "[Warning] detect malformed value in properties meta-block:"
-          "\tkey: " + key + "\tval: " + raw_val.ToString();
-        Log(logger, "%s", error_msg.c_str());
-        continue;
-      }
-      *(pos->second) = val;
-    } else if (key == TablePropertiesNames::kFilterPolicy) {
-      new_table_properties->filter_policy_name = raw_val.ToString();
-    } else {
-      // handle user-collected properties
-      new_table_properties->user_collected_properties.insert(
-          {key, raw_val.ToString()});
-    }
-  }
-  if (s.ok()) {
-    *table_properties = new_table_properties;
-  } else {
-    delete new_table_properties;
-  }
-
-  return s;
-}
-
-Status ReadTableProperties(RandomAccessFile* file, uint64_t file_size,
-                           uint64_t table_magic_number, Env* env,
-                           Logger* info_log, TableProperties** properties) {
-  // -- Read metaindex block
-  Footer footer(table_magic_number);
-  auto s = ReadFooterFromFile(file, file_size, &footer);
-  if (!s.ok()) {
-    return s;
-  }
-
-  auto metaindex_handle = footer.metaindex_handle();
-  BlockContents metaindex_contents;
-  ReadOptions read_options;
-  read_options.verify_checksums = false;
-  s = ReadBlockContents(file, footer, read_options, metaindex_handle,
-                        &metaindex_contents, env, false);
-  if (!s.ok()) {
-    return s;
-  }
-  Block metaindex_block(metaindex_contents);
-  std::unique_ptr<Iterator> meta_iter(
-      metaindex_block.NewIterator(BytewiseComparator()));
-
-  // -- Read property block
-  bool found_properties_block = true;
-  s = SeekToPropertiesBlock(meta_iter.get(), &found_properties_block);
-  if (!s.ok()) {
-    return s;
-  }
-
-  TableProperties table_properties;
-  if (found_properties_block == true) {
-    s = ReadProperties(meta_iter->value(), file, footer, env, info_log,
-                       properties);
-  } else {
-    s = Status::Corruption("Unable to read the property block.");
-    Log(WARN_LEVEL, info_log,
-        "Cannot find Properties block from file.");
-  }
-
-  return s;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/meta_blocks.h b/src/rocksdb/table/meta_blocks.h
deleted file mode 100644
index 2ac8903..0000000
--- a/src/rocksdb/table/meta_blocks.h
+++ /dev/null
@@ -1,127 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-#pragma once
-
-#include <map>
-#include <memory>
-#include <string>
-
-#include "db/builder.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/options.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/table_properties.h"
-#include "table/block_builder.h"
-
-namespace rocksdb {
-
-class BlockBuilder;
-class BlockHandle;
-class Env;
-class Footer;
-class Logger;
-class RandomAccessFile;
-struct TableProperties;
-
-// An STL style comparator that does the bytewise comparator comparasion
-// internally.
-struct BytewiseLessThan {
-  bool operator()(const std::string& key1, const std::string& key2) const {
-    // smaller entries will be placed in front.
-    return comparator->Compare(key1, key2) <= 0;
-  }
-
-  const Comparator* comparator = BytewiseComparator();
-};
-
-// When writing to a block that requires entries to be sorted by
-// `BytewiseComparator`, we can buffer the content to `BytewiseSortedMap`
-// before writng to store.
-typedef std::map<std::string, std::string, BytewiseLessThan> BytewiseSortedMap;
-
-class MetaIndexBuilder {
- public:
-  MetaIndexBuilder(const MetaIndexBuilder&) = delete;
-  MetaIndexBuilder& operator=(const MetaIndexBuilder&) = delete;
-
-  MetaIndexBuilder();
-  void Add(const std::string& key, const BlockHandle& handle);
-
-  // Write all the added key/value pairs to the block and return the contents
-  // of the block.
-  Slice Finish();
-
- private:
-  // store the sorted key/handle of the metablocks.
-  BytewiseSortedMap meta_block_handles_;
-  std::unique_ptr<BlockBuilder> meta_index_block_;
-};
-
-class PropertyBlockBuilder {
- public:
-  PropertyBlockBuilder(const PropertyBlockBuilder&) = delete;
-  PropertyBlockBuilder& operator=(const PropertyBlockBuilder&) = delete;
-
-  PropertyBlockBuilder();
-
-  void AddTableProperty(const TableProperties& props);
-  void Add(const std::string& key, uint64_t value);
-  void Add(const std::string& key, const std::string& value);
-  void Add(const UserCollectedProperties& user_collected_properties);
-
-  // Write all the added entries to the block and return the block contents
-  Slice Finish();
-
- private:
-  std::unique_ptr<BlockBuilder> properties_block_;
-  BytewiseSortedMap props_;
-};
-
-// Were we encounter any error occurs during user-defined statistics collection,
-// we'll write the warning message to info log.
-void LogPropertiesCollectionError(
-    Logger* info_log, const std::string& method, const std::string& name);
-
-// Utility functions help table builder to trigger batch events for user
-// defined property collectors.
-// Return value indicates if there is any error occurred; if error occurred,
-// the warning message will be logged.
-// NotifyCollectTableCollectorsOnAdd() triggers the `Add` event for all
-// property collectors.
-bool NotifyCollectTableCollectorsOnAdd(
-    const Slice& key,
-    const Slice& value,
-    const Options::TablePropertiesCollectors& collectors,
-    Logger* info_log);
-
-// NotifyCollectTableCollectorsOnAdd() triggers the `Finish` event for all
-// property collectors. The collected properties will be added to `builder`.
-bool NotifyCollectTableCollectorsOnFinish(
-    const Options::TablePropertiesCollectors& collectors,
-    Logger* info_log,
-    PropertyBlockBuilder* builder);
-
-// Read the properties from the table.
-// @returns a status to indicate if the operation succeeded. On success,
-//          *table_properties will point to a heap-allocated TableProperties
-//          object, otherwise value of `table_properties` will not be modified.
-Status ReadProperties(const Slice &handle_value, RandomAccessFile *file,
-                      const Footer &footer, Env *env, Logger *logger,
-                      TableProperties **table_properties);
-
-// Directly read the properties from the properties block of a plain table.
-// @returns a status to indicate if the operation succeeded. On success,
-//          *table_properties will point to a heap-allocated TableProperties
-//          object, otherwise value of `table_properties` will not be modified.
-Status ReadTableProperties(RandomAccessFile* file, uint64_t file_size,
-                           uint64_t table_magic_number, Env* env,
-                           Logger* info_log, TableProperties** properties);
-
-// Seek to the properties block.
-// If it successfully seeks to the properties block, "is_found" will be
-// set to true.
-extern Status SeekToPropertiesBlock(Iterator* meta_iter, bool* is_found);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/plain_table_builder.cc b/src/rocksdb/table/plain_table_builder.cc
deleted file mode 100644
index d76f0b2..0000000
--- a/src/rocksdb/table/plain_table_builder.cc
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#include "table/plain_table_builder.h"
-
-#include <assert.h>
-#include <map>
-
-#include "rocksdb/comparator.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/options.h"
-#include "table/plain_table_factory.h"
-#include "db/dbformat.h"
-#include "table/block_builder.h"
-#include "table/filter_block.h"
-#include "table/format.h"
-#include "table/meta_blocks.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-namespace {
-
-// a utility that helps writing block content to the file
-//   @offset will advance if @block_contents was successfully written.
-//   @block_handle the block handle this particular block.
-Status WriteBlock(
-    const Slice& block_contents,
-    WritableFile* file,
-    uint64_t* offset,
-    BlockHandle* block_handle) {
-  block_handle->set_offset(*offset);
-  block_handle->set_size(block_contents.size());
-  Status s = file->Append(block_contents);
-
-  if (s.ok()) {
-    *offset += block_contents.size();
-  }
-  return s;
-}
-
-}  // namespace
-
-// kPlainTableMagicNumber was picked by running
-//    echo rocksdb.table.plain | sha1sum
-// and taking the leading 64 bits.
-extern const uint64_t kPlainTableMagicNumber = 0x8242229663bf9564ull;
-extern const uint64_t kLegacyPlainTableMagicNumber = 0x4f3418eb7a8f13b8ull;
-
-PlainTableBuilder::PlainTableBuilder(const Options& options,
-                                     WritableFile* file,
-                                     uint32_t user_key_len) :
-    options_(options), file_(file), user_key_len_(user_key_len) {
-  properties_.fixed_key_len = user_key_len;
-
-  // for plain table, we put all the data in a big chuck.
-  properties_.num_data_blocks = 1;
-  // emphasize that currently plain table doesn't have persistent index or
-  // filter block.
-  properties_.index_size = 0;
-  properties_.filter_size = 0;
-  properties_.format_version = 0;
-}
-
-PlainTableBuilder::~PlainTableBuilder() {
-}
-
-void PlainTableBuilder::Add(const Slice& key, const Slice& value) {
-  size_t user_key_size = key.size() - 8;
-  assert(user_key_len_ == 0 || user_key_size == user_key_len_);
-
-  if (!IsFixedLength()) {
-    // Write key length
-    char key_size_buf[5];  // tmp buffer for key size as varint32
-    char* ptr = EncodeVarint32(key_size_buf, user_key_size);
-    assert(ptr <= key_size_buf + sizeof(key_size_buf));
-    auto len = ptr - key_size_buf;
-    file_->Append(Slice(key_size_buf, len));
-    offset_ += len;
-  }
-
-  // Write key
-  ParsedInternalKey parsed_key;
-  if (!ParseInternalKey(key, &parsed_key)) {
-    status_ = Status::Corruption(Slice());
-    return;
-  }
-  // For value size as varint32 (up to 5 bytes).
-  // If the row is of value type with seqId 0, flush the special flag together
-  // in this buffer to safe one file append call, which takes 1 byte.
-  char value_size_buf[6];
-  size_t value_size_buf_size = 0;
-  if (parsed_key.sequence == 0 && parsed_key.type == kTypeValue) {
-    file_->Append(Slice(key.data(), user_key_size));
-    offset_ += user_key_size;
-    value_size_buf[0] = PlainTableFactory::kValueTypeSeqId0;
-    value_size_buf_size = 1;
-  } else {
-    file_->Append(key);
-    offset_ += key.size();
-  }
-
-  // Write value length
-  int value_size = value.size();
-  char* end_ptr =
-      EncodeVarint32(value_size_buf + value_size_buf_size, value_size);
-  assert(end_ptr <= value_size_buf + sizeof(value_size_buf));
-  value_size_buf_size = end_ptr - value_size_buf;
-  file_->Append(Slice(value_size_buf, value_size_buf_size));
-
-  // Write value
-  file_->Append(value);
-  offset_ += value_size + value_size_buf_size;
-
-  properties_.num_entries++;
-  properties_.raw_key_size += key.size();
-  properties_.raw_value_size += value.size();
-
-  // notify property collectors
-  NotifyCollectTableCollectorsOnAdd(
-      key,
-      value,
-      options_.table_properties_collectors,
-      options_.info_log.get()
-  );
-}
-
-Status PlainTableBuilder::status() const { return status_; }
-
-Status PlainTableBuilder::Finish() {
-  assert(!closed_);
-  closed_ = true;
-
-  properties_.data_size = offset_;
-
-  // Write the following blocks
-  //  1. [meta block: properties]
-  //  2. [metaindex block]
-  //  3. [footer]
-  MetaIndexBuilder meta_index_builer;
-
-  PropertyBlockBuilder property_block_builder;
-  // -- Add basic properties
-  property_block_builder.AddTableProperty(properties_);
-
-  // -- Add user collected properties
-  NotifyCollectTableCollectorsOnFinish(
-      options_.table_properties_collectors,
-      options_.info_log.get(),
-      &property_block_builder
-  );
-
-  // -- Write property block
-  BlockHandle property_block_handle;
-  auto s = WriteBlock(
-      property_block_builder.Finish(),
-      file_,
-      &offset_,
-      &property_block_handle
-  );
-  if (!s.ok()) {
-    return s;
-  }
-  meta_index_builer.Add(kPropertiesBlock, property_block_handle);
-
-  // -- write metaindex block
-  BlockHandle metaindex_block_handle;
-  s = WriteBlock(
-      meta_index_builer.Finish(),
-      file_,
-      &offset_,
-      &metaindex_block_handle
-  );
-  if (!s.ok()) {
-    return s;
-  }
-
-  // Write Footer
-  // no need to write out new footer if we're using default checksum
-  Footer footer(kLegacyPlainTableMagicNumber);
-  footer.set_metaindex_handle(metaindex_block_handle);
-  footer.set_index_handle(BlockHandle::NullBlockHandle());
-  std::string footer_encoding;
-  footer.EncodeTo(&footer_encoding);
-  s = file_->Append(footer_encoding);
-  if (s.ok()) {
-    offset_ += footer_encoding.size();
-  }
-
-  return s;
-}
-
-void PlainTableBuilder::Abandon() {
-  closed_ = true;
-}
-
-uint64_t PlainTableBuilder::NumEntries() const {
-  return properties_.num_entries;
-}
-
-uint64_t PlainTableBuilder::FileSize() const {
-  return offset_;
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/table/plain_table_builder.h b/src/rocksdb/table/plain_table_builder.h
deleted file mode 100644
index 7bc388b..0000000
--- a/src/rocksdb/table/plain_table_builder.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// IndexedTable is a simple table format for UNIT TEST ONLY. It is not built
-// as production quality.
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include <stdint.h>
-#include "rocksdb/options.h"
-#include "rocksdb/status.h"
-#include "table/table_builder.h"
-#include "rocksdb/table_properties.h"
-
-namespace rocksdb {
-
-class BlockBuilder;
-class BlockHandle;
-class WritableFile;
-class TableBuilder;
-
-class PlainTableBuilder: public TableBuilder {
-public:
-  // Create a builder that will store the contents of the table it is
-  // building in *file.  Does not close the file.  It is up to the
-  // caller to close the file after calling Finish(). The output file
-  // will be part of level specified by 'level'.  A value of -1 means
-  // that the caller does not know which level the output file will reside.
-  PlainTableBuilder(const Options& options, WritableFile* file,
-                    uint32_t user_key_size);
-
-  // REQUIRES: Either Finish() or Abandon() has been called.
-  ~PlainTableBuilder();
-
-  // Add key,value to the table being constructed.
-  // REQUIRES: key is after any previously added key according to comparator.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Add(const Slice& key, const Slice& value) override;
-
-  // Return non-ok iff some error has been detected.
-  Status status() const override;
-
-  // Finish building the table.  Stops using the file passed to the
-  // constructor after this function returns.
-  // REQUIRES: Finish(), Abandon() have not been called
-  Status Finish() override;
-
-  // Indicate that the contents of this builder should be abandoned.  Stops
-  // using the file passed to the constructor after this function returns.
-  // If the caller is not going to call Finish(), it must call Abandon()
-  // before destroying this builder.
-  // REQUIRES: Finish(), Abandon() have not been called
-  void Abandon() override;
-
-  // Number of calls to Add() so far.
-  uint64_t NumEntries() const override;
-
-  // Size of the file generated so far.  If invoked after a successful
-  // Finish() call, returns the size of the final generated file.
-  uint64_t FileSize() const override;
-
-private:
-  Options options_;
-  WritableFile* file_;
-  uint64_t offset_ = 0;
-  Status status_;
-  TableProperties properties_;
-
-  const size_t user_key_len_;
-  bool closed_ = false;  // Either Finish() or Abandon() has been called.
-
-  bool IsFixedLength() const {
-    return user_key_len_ > 0;
-  }
-
-  // No copying allowed
-  PlainTableBuilder(const PlainTableBuilder&) = delete;
-  void operator=(const PlainTableBuilder&) = delete;
-};
-
-}  // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/table/plain_table_factory.cc b/src/rocksdb/table/plain_table_factory.cc
deleted file mode 100644
index f9d88e9..0000000
--- a/src/rocksdb/table/plain_table_factory.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#include "table/plain_table_factory.h"
-
-#include <memory>
-#include <stdint.h>
-#include "db/dbformat.h"
-#include "table/plain_table_builder.h"
-#include "table/plain_table_reader.h"
-#include "port/port.h"
-
-namespace rocksdb {
-
-Status PlainTableFactory::NewTableReader(const Options& options,
-                                         const EnvOptions& soptions,
-                                         const InternalKeyComparator& icomp,
-                                         unique_ptr<RandomAccessFile>&& file,
-                                         uint64_t file_size,
-                                         unique_ptr<TableReader>* table) const {
-  return PlainTableReader::Open(options, soptions, icomp, std::move(file),
-                                file_size, table, bloom_bits_per_key_,
-                                hash_table_ratio_, index_sparseness_,
-                                huge_page_tlb_size_);
-}
-
-TableBuilder* PlainTableFactory::NewTableBuilder(
-    const Options& options, const InternalKeyComparator& internal_comparator,
-    WritableFile* file, CompressionType compression_type) const {
-  return new PlainTableBuilder(options, file, user_key_len_);
-}
-
-extern TableFactory* NewPlainTableFactory(uint32_t user_key_len,
-                                          int bloom_bits_per_key,
-                                          double hash_table_ratio,
-                                          size_t index_sparseness,
-                                          size_t huge_page_tlb_size) {
-  return new PlainTableFactory(user_key_len, bloom_bits_per_key,
-                               hash_table_ratio, index_sparseness,
-                               huge_page_tlb_size);
-}
-
-extern TableFactory* NewTotalOrderPlainTableFactory(uint32_t user_key_len,
-                                                    int bloom_bits_per_key,
-                                                    size_t index_sparseness,
-                                                    size_t huge_page_tlb_size) {
-  return new PlainTableFactory(user_key_len, bloom_bits_per_key, 0,
-                               index_sparseness, huge_page_tlb_size);
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/table/plain_table_factory.h b/src/rocksdb/table/plain_table_factory.h
deleted file mode 100644
index 06ddbf4..0000000
--- a/src/rocksdb/table/plain_table_factory.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#ifndef ROCKSDB_LITE
-#include <memory>
-#include <stdint.h>
-
-#include "rocksdb/options.h"
-#include "rocksdb/table.h"
-
-namespace rocksdb {
-
-struct Options;
-struct EnvOptions;
-
-using std::unique_ptr;
-class Status;
-class RandomAccessFile;
-class WritableFile;
-class Table;
-class TableBuilder;
-
-// IndexedTable requires fixed length key, configured as a constructor
-// parameter of the factory class. Output file format:
-// +-------------+-----------------+
-// | version     | user_key_length |
-// +------------++------------------------------+  <= key1 offset
-// | [key_size] |  key1       | value_size  |   |
-// +------------+-------------+-------------+   |
-// | value1                                     |
-// |                                            |
-// +----------------------------------------+---+  <= key2 offset
-// | [key_size] |  key2       | value_size  |   |
-// +------------+-------------+-------------+   |
-// | value2                                     |
-// |                                            |
-// |        ......                              |
-// +-----------------+--------------------------+
-// If user_key_length = kPlainTableVariableLength, it means the key is variable
-// length, there will be an extra field for key size encoded before every key.
-class PlainTableFactory : public TableFactory {
- public:
-  ~PlainTableFactory() {}
-  // user_key_size is the length of the user key. If it is set to be
-  // kPlainTableVariableLength, then it means variable length. Otherwise, all
-  // the keys need to have the fix length of this value. bloom_bits_per_key is
-  // number of bits used for bloom filer per key. hash_table_ratio is
-  // the desired utilization of the hash table used for prefix hashing.
-  // hash_table_ratio = number of prefixes / #buckets in the hash table
-  // hash_table_ratio = 0 means skip hash table but only replying on binary
-  // search.
-  // index_sparseness determines index interval for keys
-  // inside the same prefix. It will be the maximum number of linear search
-  // required after hash and binary search.
-  // index_sparseness = 0 means index for every key.
-  // huge_page_tlb_size determines whether to allocate hash indexes from huge
-  // page TLB and the page size if allocating from there. See comments of
-  // Arena::AllocateAligned() for details.
-  explicit PlainTableFactory(uint32_t user_key_len = kPlainTableVariableLength,
-                             int bloom_bits_per_key = 0,
-                             double hash_table_ratio = 0.75,
-                             size_t index_sparseness = 16,
-                             size_t huge_page_tlb_size = 0)
-      : user_key_len_(user_key_len),
-        bloom_bits_per_key_(bloom_bits_per_key),
-        hash_table_ratio_(hash_table_ratio),
-        index_sparseness_(index_sparseness),
-        huge_page_tlb_size_(huge_page_tlb_size) {}
-  const char* Name() const override { return "PlainTable"; }
-  Status NewTableReader(const Options& options, const EnvOptions& soptions,
-                        const InternalKeyComparator& internal_comparator,
-                        unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-                        unique_ptr<TableReader>* table) const override;
-  TableBuilder* NewTableBuilder(const Options& options,
-                                const InternalKeyComparator& icomparator,
-                                WritableFile* file,
-                                CompressionType compression_type) const
-      override;
-
-  static const char kValueTypeSeqId0 = 0xFF;
-
- private:
-  uint32_t user_key_len_;
-  int bloom_bits_per_key_;
-  double hash_table_ratio_;
-  size_t index_sparseness_;
-  size_t huge_page_tlb_size_;
-};
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/table/plain_table_reader.cc b/src/rocksdb/table/plain_table_reader.cc
deleted file mode 100644
index f1cb3db..0000000
--- a/src/rocksdb/table/plain_table_reader.cc
+++ /dev/null
@@ -1,767 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#include "table/plain_table_reader.h"
-
-#include <string>
-#include <vector>
-
-#include "db/dbformat.h"
-
-#include "rocksdb/cache.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/options.h"
-#include "rocksdb/statistics.h"
-
-#include "table/block.h"
-#include "table/filter_block.h"
-#include "table/format.h"
-#include "table/meta_blocks.h"
-#include "table/two_level_iterator.h"
-#include "table/plain_table_factory.h"
-
-#include "util/arena.h"
-#include "util/coding.h"
-#include "util/dynamic_bloom.h"
-#include "util/hash.h"
-#include "util/histogram.h"
-#include "util/murmurhash.h"
-#include "util/perf_context_imp.h"
-#include "util/stop_watch.h"
-
-
-namespace rocksdb {
-
-namespace {
-
-inline uint32_t GetSliceHash(const Slice& s) {
-  return Hash(s.data(), s.size(), 397) ;
-}
-
-inline uint32_t GetBucketIdFromHash(uint32_t hash, uint32_t num_buckets) {
-  return hash % num_buckets;
-}
-
-// Safely getting a uint32_t element from a char array, where, starting from
-// `base`, every 4 bytes are considered as an fixed 32 bit integer.
-inline uint32_t GetFixed32Element(const char* base, size_t offset) {
-  return DecodeFixed32(base + offset * sizeof(uint32_t));
-}
-
-}  // namespace
-
-// Iterator to iterate IndexedTable
-class PlainTableIterator : public Iterator {
- public:
-  explicit PlainTableIterator(PlainTableReader* table, bool use_prefix_seek);
-  ~PlainTableIterator();
-
-  bool Valid() const;
-
-  void SeekToFirst();
-
-  void SeekToLast();
-
-  void Seek(const Slice& target);
-
-  void Next();
-
-  void Prev();
-
-  Slice key() const;
-
-  Slice value() const;
-
-  Status status() const;
-
- private:
-  PlainTableReader* table_;
-  bool use_prefix_seek_;
-  uint32_t offset_;
-  uint32_t next_offset_;
-  IterKey key_;
-  Slice value_;
-  Status status_;
-  // No copying allowed
-  PlainTableIterator(const PlainTableIterator&) = delete;
-  void operator=(const Iterator&) = delete;
-};
-
-extern const uint64_t kPlainTableMagicNumber;
-PlainTableReader::PlainTableReader(
-    const Options& options, unique_ptr<RandomAccessFile>&& file,
-    const EnvOptions& storage_options, const InternalKeyComparator& icomparator,
-    uint64_t file_size, int bloom_bits_per_key, double hash_table_ratio,
-    size_t index_sparseness, const TableProperties* table_properties,
-    size_t huge_page_tlb_size)
-    : options_(options),
-      soptions_(storage_options),
-      file_(std::move(file)),
-      internal_comparator_(icomparator),
-      file_size_(file_size),
-      kHashTableRatio(hash_table_ratio),
-      kBloomBitsPerKey(bloom_bits_per_key),
-      kIndexIntervalForSamePrefixKeys(index_sparseness),
-      table_properties_(nullptr),
-      data_end_offset_(table_properties->data_size),
-      user_key_len_(table_properties->fixed_key_len),
-      huge_page_tlb_size_(huge_page_tlb_size) {
-  assert(kHashTableRatio >= 0.0);
-}
-
-PlainTableReader::~PlainTableReader() {
-}
-
-Status PlainTableReader::Open(const Options& options,
-                              const EnvOptions& soptions,
-                              const InternalKeyComparator& internal_comparator,
-                              unique_ptr<RandomAccessFile>&& file,
-                              uint64_t file_size,
-                              unique_ptr<TableReader>* table_reader,
-                              const int bloom_bits_per_key,
-                              double hash_table_ratio, size_t index_sparseness,
-                              size_t huge_page_tlb_size) {
-  assert(options.allow_mmap_reads);
-
-  if (file_size > kMaxFileSize) {
-    return Status::NotSupported("File is too large for PlainTableReader!");
-  }
-
-  TableProperties* props = nullptr;
-  auto s = ReadTableProperties(file.get(), file_size, kPlainTableMagicNumber,
-                               options.env, options.info_log.get(), &props);
-  if (!s.ok()) {
-    return s;
-  }
-
-  std::unique_ptr<PlainTableReader> new_reader(new PlainTableReader(
-      options, std::move(file), soptions, internal_comparator, file_size,
-      bloom_bits_per_key, hash_table_ratio, index_sparseness, props,
-      huge_page_tlb_size));
-
-  // -- Populate Index
-  s = new_reader->PopulateIndex(props);
-  if (!s.ok()) {
-    return s;
-  }
-
-  *table_reader = std::move(new_reader);
-  return s;
-}
-
-void PlainTableReader::SetupForCompaction() {
-}
-
-Iterator* PlainTableReader::NewIterator(const ReadOptions& options) {
-  return new PlainTableIterator(this, options_.prefix_extractor != nullptr);
-}
-
-struct PlainTableReader::IndexRecord {
-  uint32_t hash; // hash of the prefix
-  uint32_t offset; // offset of a row
-  IndexRecord* next;
-};
-
-// Helper class to track all the index records
-class PlainTableReader::IndexRecordList {
- public:
-  explicit IndexRecordList(size_t num_records_per_group)
-      : kNumRecordsPerGroup(num_records_per_group),
-        current_group_(nullptr),
-        num_records_in_current_group_(num_records_per_group) {}
-
-  ~IndexRecordList() {
-    for (size_t i = 0; i < groups_.size(); i++) {
-      delete[] groups_[i];
-    }
-  }
-
-  void AddRecord(murmur_t hash, uint32_t offset) {
-    if (num_records_in_current_group_ == kNumRecordsPerGroup) {
-      current_group_ = AllocateNewGroup();
-      num_records_in_current_group_ = 0;
-    }
-    auto& new_record = current_group_[num_records_in_current_group_++];
-    new_record.hash = hash;
-    new_record.offset = offset;
-    new_record.next = nullptr;
-  }
-
-  size_t GetNumRecords() const {
-    return (groups_.size() - 1) * kNumRecordsPerGroup +
-           num_records_in_current_group_;
-  }
-  IndexRecord* At(size_t index) {
-    return &(groups_[index / kNumRecordsPerGroup][index % kNumRecordsPerGroup]);
-  }
-
- private:
-  IndexRecord* AllocateNewGroup() {
-    IndexRecord* result = new IndexRecord[kNumRecordsPerGroup];
-    groups_.push_back(result);
-    return result;
-  }
-
-  // Each group in `groups_` contains fix-sized records (determined by
-  // kNumRecordsPerGroup). Which can help us minimize the cost if resizing
-  // occurs.
-  const size_t kNumRecordsPerGroup;
-  IndexRecord* current_group_;
-  // List of arrays allocated
-  std::vector<IndexRecord*> groups_;
-  size_t num_records_in_current_group_;
-};
-
-Status PlainTableReader::PopulateIndexRecordList(IndexRecordList* record_list,
-                                                 int* num_prefixes) const {
-  Slice prev_key_prefix_slice;
-  uint32_t prev_key_prefix_hash = 0;
-  uint32_t pos = data_start_offset_;
-  int num_keys_per_prefix = 0;
-  bool is_first_record = true;
-  HistogramImpl keys_per_prefix_hist;
-  // Need map to be ordered to make sure sub indexes generated
-  // are in order.
-
-  *num_prefixes = 0;
-  while (pos < data_end_offset_) {
-    uint32_t key_offset = pos;
-    ParsedInternalKey key;
-    Slice value_slice;
-    Status s = Next(&pos, &key, &value_slice);
-    if (!s.ok()) {
-      return s;
-    }
-    if (bloom_) {
-      // total order mode and bloom filter is enabled.
-      bloom_->AddHash(GetSliceHash(key.user_key));
-    }
-    Slice key_prefix_slice = GetPrefix(key);
-
-    if (is_first_record || prev_key_prefix_slice != key_prefix_slice) {
-      ++(*num_prefixes);
-      if (!is_first_record) {
-        keys_per_prefix_hist.Add(num_keys_per_prefix);
-      }
-      num_keys_per_prefix = 0;
-      prev_key_prefix_slice = key_prefix_slice;
-      prev_key_prefix_hash = GetSliceHash(key_prefix_slice);
-    }
-
-    if (kIndexIntervalForSamePrefixKeys == 0 ||
-        num_keys_per_prefix++ % kIndexIntervalForSamePrefixKeys == 0) {
-      // Add an index key for every kIndexIntervalForSamePrefixKeys keys
-      record_list->AddRecord(prev_key_prefix_hash, key_offset);
-    }
-    is_first_record = false;
-  }
-
-  keys_per_prefix_hist.Add(num_keys_per_prefix);
-  Log(options_.info_log, "Number of Keys per prefix Histogram: %s",
-      keys_per_prefix_hist.ToString().c_str());
-
-  return Status::OK();
-}
-
-void PlainTableReader::AllocateIndexAndBloom(int num_prefixes) {
-  if (options_.prefix_extractor.get() != nullptr) {
-    uint32_t bloom_total_bits = num_prefixes * kBloomBitsPerKey;
-    if (bloom_total_bits > 0) {
-      bloom_.reset(new DynamicBloom(bloom_total_bits, options_.bloom_locality,
-                                    6, nullptr, huge_page_tlb_size_));
-    }
-  }
-
-  if (options_.prefix_extractor.get() == nullptr || kHashTableRatio <= 0) {
-    // Fall back to pure binary search if the user fails to specify a prefix
-    // extractor.
-    index_size_ = 1;
-  } else {
-    double hash_table_size_multipier = 1.0 / kHashTableRatio;
-    index_size_ = num_prefixes * hash_table_size_multipier + 1;
-  }
-}
-
-size_t PlainTableReader::BucketizeIndexesAndFillBloom(
-    IndexRecordList* record_list, std::vector<IndexRecord*>* hash_to_offsets,
-    std::vector<uint32_t>* entries_per_bucket) {
-  bool first = true;
-  uint32_t prev_hash = 0;
-  size_t num_records = record_list->GetNumRecords();
-  for (size_t i = 0; i < num_records; i++) {
-    IndexRecord* index_record = record_list->At(i);
-    uint32_t cur_hash = index_record->hash;
-    if (first || prev_hash != cur_hash) {
-      prev_hash = cur_hash;
-      first = false;
-      if (bloom_ && !IsTotalOrderMode()) {
-        bloom_->AddHash(cur_hash);
-      }
-    }
-    uint32_t bucket = GetBucketIdFromHash(cur_hash, index_size_);
-    IndexRecord* prev_bucket_head = (*hash_to_offsets)[bucket];
-    index_record->next = prev_bucket_head;
-    (*hash_to_offsets)[bucket] = index_record;
-    (*entries_per_bucket)[bucket]++;
-  }
-  size_t sub_index_size = 0;
-  for (auto entry_count : *entries_per_bucket) {
-    if (entry_count <= 1) {
-      continue;
-    }
-    // Only buckets with more than 1 entry will have subindex.
-    sub_index_size += VarintLength(entry_count);
-    // total bytes needed to store these entries' in-file offsets.
-    sub_index_size += entry_count * kOffsetLen;
-  }
-  return sub_index_size;
-}
-
-void PlainTableReader::FillIndexes(
-    const size_t kSubIndexSize,
-    const std::vector<IndexRecord*>& hash_to_offsets,
-    const std::vector<uint32_t>& entries_per_bucket) {
-  Log(options_.info_log, "Reserving %zu bytes for plain table's sub_index",
-      kSubIndexSize);
-  auto total_allocate_size = sizeof(uint32_t) * index_size_ + kSubIndexSize;
-  char* allocated =
-      arena_.AllocateAligned(total_allocate_size, huge_page_tlb_size_);
-  index_ = reinterpret_cast<uint32_t*>(allocated);
-  sub_index_ = allocated + sizeof(uint32_t) * index_size_;
-
-  size_t sub_index_offset = 0;
-  for (int i = 0; i < index_size_; i++) {
-    uint32_t num_keys_for_bucket = entries_per_bucket[i];
-    switch (num_keys_for_bucket) {
-    case 0:
-      // No key for bucket
-      index_[i] = data_end_offset_;
-      break;
-    case 1:
-      // point directly to the file offset
-      index_[i] = hash_to_offsets[i]->offset;
-      break;
-    default:
-      // point to second level indexes.
-      index_[i] = sub_index_offset | kSubIndexMask;
-      char* prev_ptr = &sub_index_[sub_index_offset];
-      char* cur_ptr = EncodeVarint32(prev_ptr, num_keys_for_bucket);
-      sub_index_offset += (cur_ptr - prev_ptr);
-      char* sub_index_pos = &sub_index_[sub_index_offset];
-      IndexRecord* record = hash_to_offsets[i];
-      int j;
-      for (j = num_keys_for_bucket - 1; j >= 0 && record;
-           j--, record = record->next) {
-        EncodeFixed32(sub_index_pos + j * sizeof(uint32_t), record->offset);
-      }
-      assert(j == -1 && record == nullptr);
-      sub_index_offset += kOffsetLen * num_keys_for_bucket;
-      assert(sub_index_offset <= kSubIndexSize);
-      break;
-    }
-  }
-  assert(sub_index_offset == kSubIndexSize);
-
-  Log(options_.info_log, "hash table size: %d, suffix_map length %zu",
-      index_size_, kSubIndexSize);
-}
-
-Status PlainTableReader::PopulateIndex(TableProperties* props) {
-  assert(props != nullptr);
-  table_properties_.reset(props);
-
-  // options.prefix_extractor is requried for a hash-based look-up.
-  if (options_.prefix_extractor.get() == nullptr && kHashTableRatio != 0) {
-    return Status::NotSupported(
-        "PlainTable requires a prefix extractor enable prefix hash mode.");
-  }
-
-  // Get mmapped memory to file_data_.
-  Status s = file_->Read(0, file_size_, &file_data_, nullptr);
-  if (!s.ok()) {
-    return s;
-  }
-
-  IndexRecordList record_list(kRecordsPerGroup);
-  // First, read the whole file, for every kIndexIntervalForSamePrefixKeys rows
-  // for a prefix (starting from the first one), generate a record of (hash,
-  // offset) and append it to IndexRecordList, which is a data structure created
-  // to store them.
-  int num_prefixes;
-
-  // Allocate bloom filter here for total order mode.
-  if (IsTotalOrderMode()) {
-    uint32_t num_bloom_bits = table_properties_->num_entries * kBloomBitsPerKey;
-    if (num_bloom_bits > 0) {
-      bloom_.reset(new DynamicBloom(num_bloom_bits, options_.bloom_locality, 6,
-                                    nullptr, huge_page_tlb_size_));
-    }
-  }
-
-  s = PopulateIndexRecordList(&record_list, &num_prefixes);
-  if (!s.ok()) {
-    return s;
-  }
-  // Calculated hash table and bloom filter size and allocate memory for indexes
-  // and bloom filter based on the number of prefixes.
-  AllocateIndexAndBloom(num_prefixes);
-
-  // Bucketize all the index records to a temp data structure, in which for
-  // each bucket, we generate a linked list of IndexRecord, in reversed order.
-  std::vector<IndexRecord*> hash_to_offsets(index_size_, nullptr);
-  std::vector<uint32_t> entries_per_bucket(index_size_, 0);
-  size_t sub_index_size_needed = BucketizeIndexesAndFillBloom(
-      &record_list, &hash_to_offsets, &entries_per_bucket);
-  // From the temp data structure, populate indexes.
-  FillIndexes(sub_index_size_needed, hash_to_offsets, entries_per_bucket);
-
-  // Fill two table properties.
-  // TODO(sdong): after we have the feature of storing index in file, this
-  // properties need to be populated to index_size instead.
-  props->user_collected_properties["plain_table_hash_table_size"] =
-      std::to_string(index_size_ * 4U);
-  props->user_collected_properties["plain_table_sub_index_size"] =
-      std::to_string(sub_index_size_needed);
-
-  return Status::OK();
-}
-
-Status PlainTableReader::GetOffset(const Slice& target, const Slice& prefix,
-                                   uint32_t prefix_hash, bool& prefix_matched,
-                                   uint32_t* offset) const {
-  prefix_matched = false;
-  int bucket = GetBucketIdFromHash(prefix_hash, index_size_);
-  uint32_t bucket_value = index_[bucket];
-  if (bucket_value == data_end_offset_) {
-    *offset = data_end_offset_;
-    return Status::OK();
-  } else if ((bucket_value & kSubIndexMask) == 0) {
-    // point directly to the file
-    *offset = bucket_value;
-    return Status::OK();
-  }
-
-  // point to sub-index, need to do a binary search
-  uint32_t low = 0;
-  uint64_t prefix_index_offset = bucket_value ^ kSubIndexMask;
-
-  const char* index_ptr = &sub_index_[prefix_index_offset];
-  uint32_t upper_bound = 0;
-  const char* base_ptr = GetVarint32Ptr(index_ptr, index_ptr + 4, &upper_bound);
-  uint32_t high = upper_bound;
-  ParsedInternalKey mid_key;
-  ParsedInternalKey parsed_target;
-  if (!ParseInternalKey(target, &parsed_target)) {
-    return Status::Corruption(Slice());
-  }
-
-  // The key is between [low, high). Do a binary search between it.
-  while (high - low > 1) {
-    uint32_t mid = (high + low) / 2;
-    uint32_t file_offset = GetFixed32Element(base_ptr, mid);
-    size_t tmp;
-    Status s = ReadKey(file_data_.data() + file_offset, &mid_key, &tmp);
-    if (!s.ok()) {
-      return s;
-    }
-    int cmp_result = internal_comparator_.Compare(mid_key, parsed_target);
-    if (cmp_result < 0) {
-      low = mid;
-    } else {
-      if (cmp_result == 0) {
-        // Happen to have found the exact key or target is smaller than the
-        // first key after base_offset.
-        prefix_matched = true;
-        *offset = file_offset;
-        return Status::OK();
-      } else {
-        high = mid;
-      }
-    }
-  }
-  // Both of the key at the position low or low+1 could share the same
-  // prefix as target. We need to rule out one of them to avoid to go
-  // to the wrong prefix.
-  ParsedInternalKey low_key;
-  size_t tmp;
-  uint32_t low_key_offset = GetFixed32Element(base_ptr, low);
-  Status s = ReadKey(file_data_.data() + low_key_offset, &low_key, &tmp);
-  if (GetPrefix(low_key) == prefix) {
-    prefix_matched = true;
-    *offset = low_key_offset;
-  } else if (low + 1 < upper_bound) {
-    // There is possible a next prefix, return it
-    prefix_matched = false;
-    *offset = GetFixed32Element(base_ptr, low + 1);
-  } else {
-    // target is larger than a key of the last prefix in this bucket
-    // but with a different prefix. Key does not exist.
-    *offset = data_end_offset_;
-  }
-  return Status::OK();
-}
-
-bool PlainTableReader::MatchBloom(uint32_t hash) const {
-  return bloom_.get() == nullptr || bloom_->MayContainHash(hash);
-}
-
-Slice PlainTableReader::GetPrefix(const ParsedInternalKey& target) const {
-  return GetPrefixFromUserKey(target.user_key);
-}
-
-Status PlainTableReader::ReadKey(const char* start, ParsedInternalKey* key,
-                                 size_t* bytes_read) const {
-  const char* key_ptr = nullptr;
-  *bytes_read = 0;
-  size_t user_key_size = 0;
-  if (IsFixedLength()) {
-    user_key_size = user_key_len_;
-    key_ptr = start;
-  } else {
-    uint32_t tmp_size = 0;
-    key_ptr =
-        GetVarint32Ptr(start, file_data_.data() + data_end_offset_, &tmp_size);
-    if (key_ptr == nullptr) {
-      return Status::Corruption(
-          "Unexpected EOF when reading the next key's size");
-    }
-    user_key_size = (size_t)tmp_size;
-    *bytes_read = key_ptr - start;
-  }
-  if (key_ptr + user_key_size + 1 >= file_data_.data() + data_end_offset_) {
-    return Status::Corruption("Unexpected EOF when reading the next key");
-  }
-
-  if (*(key_ptr + user_key_size) == PlainTableFactory::kValueTypeSeqId0) {
-    // Special encoding for the row with seqID=0
-    key->user_key = Slice(key_ptr, user_key_size);
-    key->sequence = 0;
-    key->type = kTypeValue;
-    *bytes_read += user_key_size + 1;
-  } else {
-    if (start + user_key_size + 8 >= file_data_.data() + data_end_offset_) {
-      return Status::Corruption(
-          "Unexpected EOF when reading internal bytes of the next key");
-    }
-    if (!ParseInternalKey(Slice(key_ptr, user_key_size + 8), key)) {
-      return Status::Corruption(
-          Slice("Incorrect value type found when reading the next key"));
-    }
-    *bytes_read += user_key_size + 8;
-  }
-
-  return Status::OK();
-}
-
-Status PlainTableReader::Next(uint32_t* offset, ParsedInternalKey* key,
-                              Slice* value) const {
-  if (*offset == data_end_offset_) {
-    *offset = data_end_offset_;
-    return Status::OK();
-  }
-
-  if (*offset > data_end_offset_) {
-    return Status::Corruption("Offset is out of file size");
-  }
-
-  const char* start = file_data_.data() + *offset;
-  size_t bytes_for_key;
-  Status s = ReadKey(start, key, &bytes_for_key);
-  if (!s.ok()) {
-    return s;
-  }
-  uint32_t value_size;
-  const char* value_ptr = GetVarint32Ptr(
-      start + bytes_for_key, file_data_.data() + data_end_offset_, &value_size);
-  if (value_ptr == nullptr) {
-    return Status::Corruption(
-        "Unexpected EOF when reading the next value's size.");
-  }
-  *offset = *offset + (value_ptr - start) + value_size;
-  if (*offset > data_end_offset_) {
-    return Status::Corruption("Unexpected EOF when reading the next value. ");
-  }
-  *value = Slice(value_ptr, value_size);
-
-  return Status::OK();
-}
-
-Status PlainTableReader::Get(const ReadOptions& ro, const Slice& target,
-                             void* arg,
-                             bool (*saver)(void*, const ParsedInternalKey&,
-                                           const Slice&, bool),
-                             void (*mark_key_may_exist)(void*)) {
-  // Check bloom filter first.
-  Slice prefix_slice;
-  uint32_t prefix_hash;
-  if (IsTotalOrderMode()) {
-    // Match whole user key for bloom filter check.
-    if (!MatchBloom(GetSliceHash(GetUserKey(target)))) {
-      return Status::OK();
-    }
-    // in total order mode, there is only one bucket 0, and we always use empty
-    // prefix.
-    prefix_slice = Slice();
-    prefix_hash = 0;
-  } else {
-    prefix_slice = GetPrefix(target);
-    prefix_hash = GetSliceHash(prefix_slice);
-    if (!MatchBloom(prefix_hash)) {
-      return Status::OK();
-    }
-  }
-  uint32_t offset;
-  bool prefix_match;
-  Status s =
-      GetOffset(target, prefix_slice, prefix_hash, prefix_match, &offset);
-  if (!s.ok()) {
-    return s;
-  }
-  ParsedInternalKey found_key;
-  ParsedInternalKey parsed_target;
-  if (!ParseInternalKey(target, &parsed_target)) {
-    return Status::Corruption(Slice());
-  }
-
-  Slice found_value;
-  while (offset < data_end_offset_) {
-    Status s = Next(&offset, &found_key, &found_value);
-    if (!s.ok()) {
-      return s;
-    }
-    if (!prefix_match) {
-      // Need to verify prefix for the first key found if it is not yet
-      // checked.
-      if (GetPrefix(found_key) != prefix_slice) {
-        return Status::OK();
-      }
-      prefix_match = true;
-    }
-    if (internal_comparator_.Compare(found_key, parsed_target) >= 0) {
-      if (!(*saver)(arg, found_key, found_value, true)) {
-        break;
-      }
-    }
-  }
-  return Status::OK();
-}
-
-uint64_t PlainTableReader::ApproximateOffsetOf(const Slice& key) {
-  return 0;
-}
-
-PlainTableIterator::PlainTableIterator(PlainTableReader* table,
-                                       bool use_prefix_seek)
-    : table_(table), use_prefix_seek_(use_prefix_seek) {
-  next_offset_ = offset_ = table_->data_end_offset_;
-}
-
-PlainTableIterator::~PlainTableIterator() {
-}
-
-bool PlainTableIterator::Valid() const {
-  return offset_ < table_->data_end_offset_
-      && offset_ >= table_->data_start_offset_;
-}
-
-void PlainTableIterator::SeekToFirst() {
-  next_offset_ = table_->data_start_offset_;
-  if (next_offset_ >= table_->data_end_offset_) {
-    next_offset_ = offset_ = table_->data_end_offset_;
-  } else {
-    Next();
-  }
-}
-
-void PlainTableIterator::SeekToLast() {
-  assert(false);
-  status_ = Status::NotSupported("SeekToLast() is not supported in PlainTable");
-}
-
-void PlainTableIterator::Seek(const Slice& target) {
-  // If the user doesn't set prefix seek option and we are not able to do a
-  // total Seek(). assert failure.
-  if (!use_prefix_seek_ && table_->index_size_ > 1) {
-    assert(false);
-    status_ = Status::NotSupported(
-        "PlainTable cannot issue non-prefix seek unless in total order mode.");
-    offset_ = next_offset_ = table_->data_end_offset_;
-    return;
-  }
-
-  Slice prefix_slice = table_->GetPrefix(target);
-  uint32_t prefix_hash = 0;
-  // Bloom filter is ignored in total-order mode.
-  if (!table_->IsTotalOrderMode()) {
-    prefix_hash = GetSliceHash(prefix_slice);
-    if (!table_->MatchBloom(prefix_hash)) {
-      offset_ = next_offset_ = table_->data_end_offset_;
-      return;
-    }
-  }
-  bool prefix_match;
-  status_ = table_->GetOffset(target, prefix_slice, prefix_hash, prefix_match,
-                              &next_offset_);
-  if (!status_.ok()) {
-    offset_ = next_offset_ = table_->data_end_offset_;
-    return;
-  }
-
-  if (next_offset_ < table_-> data_end_offset_) {
-    for (Next(); status_.ok() && Valid(); Next()) {
-      if (!prefix_match) {
-        // Need to verify the first key's prefix
-        if (table_->GetPrefix(key()) != prefix_slice) {
-          offset_ = next_offset_ = table_->data_end_offset_;
-          break;
-        }
-        prefix_match = true;
-      }
-      if (table_->internal_comparator_.Compare(key(), target) >= 0) {
-        break;
-      }
-    }
-  } else {
-    offset_ = table_->data_end_offset_;
-  }
-}
-
-void PlainTableIterator::Next() {
-  offset_ = next_offset_;
-  if (offset_ < table_->data_end_offset_) {
-    Slice tmp_slice;
-    ParsedInternalKey parsed_key;
-    status_ = table_->Next(&next_offset_, &parsed_key, &value_);
-    if (status_.ok()) {
-      // Make a copy in this case. TODO optimize.
-      key_.SetInternalKey(parsed_key);
-    } else {
-      offset_ = next_offset_ = table_->data_end_offset_;
-    }
-  }
-}
-
-void PlainTableIterator::Prev() {
-  assert(false);
-}
-
-Slice PlainTableIterator::key() const {
-  assert(Valid());
-  return key_.GetKey();
-}
-
-Slice PlainTableIterator::value() const {
-  assert(Valid());
-  return value_;
-}
-
-Status PlainTableIterator::status() const {
-  return status_;
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/table/plain_table_reader.h b/src/rocksdb/table/plain_table_reader.h
deleted file mode 100644
index e6373dc..0000000
--- a/src/rocksdb/table/plain_table_reader.h
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#ifndef ROCKSDB_LITE
-#include <unordered_map>
-#include <memory>
-#include <vector>
-#include <string>
-#include <stdint.h>
-
-#include "db/dbformat.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-#include "table/table_reader.h"
-#include "table/plain_table_factory.h"
-#include "util/arena.h"
-
-namespace rocksdb {
-
-class Block;
-class BlockHandle;
-class Footer;
-struct Options;
-class RandomAccessFile;
-struct ReadOptions;
-class TableCache;
-class TableReader;
-class DynamicBloom;
-class InternalKeyComparator;
-
-using std::unique_ptr;
-using std::unordered_map;
-extern const uint32_t kPlainTableVariableLength;
-
-// Based on following output file format shown in plain_table_factory.h
-// When opening the output file, IndexedTableReader creates a hash table
-// from key prefixes to offset of the output file. IndexedTable will decide
-// whether it points to the data offset of the first key with the key prefix
-// or the offset of it. If there are too many keys share this prefix, it will
-// create a binary search-able index from the suffix to offset on disk.
-//
-// The implementation of IndexedTableReader requires output file is mmaped
-class PlainTableReader: public TableReader {
- public:
-  static Status Open(const Options& options, const EnvOptions& soptions,
-                     const InternalKeyComparator& internal_comparator,
-                     unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
-                     unique_ptr<TableReader>* table,
-                     const int bloom_bits_per_key, double hash_table_ratio,
-                     size_t index_sparseness, size_t huge_page_tlb_size);
-
-  Iterator* NewIterator(const ReadOptions&);
-
-  Status Get(const ReadOptions&, const Slice& key, void* arg,
-             bool (*result_handler)(void* arg, const ParsedInternalKey& k,
-                                    const Slice& v, bool),
-             void (*mark_key_may_exist)(void*) = nullptr);
-
-  uint64_t ApproximateOffsetOf(const Slice& key);
-
-  void SetupForCompaction();
-
-  std::shared_ptr<const TableProperties> GetTableProperties() const {
-    return table_properties_;
-  }
-
-  PlainTableReader(const Options& options, unique_ptr<RandomAccessFile>&& file,
-                   const EnvOptions& storage_options,
-                   const InternalKeyComparator& internal_comparator,
-                   uint64_t file_size, int bloom_num_bits,
-                   double hash_table_ratio, size_t index_sparseness,
-                   const TableProperties* table_properties,
-                   size_t huge_page_tlb_size);
-  virtual ~PlainTableReader();
-
- protected:
-  // Check bloom filter to see whether it might contain this prefix.
-  // The hash of the prefix is given, since it can be reused for index lookup
-  // too.
-  virtual bool MatchBloom(uint32_t hash) const;
-
-  // PopulateIndex() builds index of keys. It must be called before any query
-  // to the table.
-  //
-  // props: the table properties object that need to be stored. Ownership of
-  //        the object will be passed.
-  //
-  // index_ contains buckets size of index_size_, each is a
-  // 32-bit integer. The lower 31 bits contain an offset value (explained below)
-  // and the first bit of the integer indicates type of the offset.
-  //
-  // +--------------+------------------------------------------------------+
-  // | Flag (1 bit) | Offset to binary search buffer or file (31 bits)     +
-  // +--------------+------------------------------------------------------+
-  //
-  // Explanation for the "flag bit":
-  //
-  // 0 indicates that the bucket contains only one prefix (no conflict when
-  //   hashing this prefix), whose first row starts from this offset of the
-  // file.
-  // 1 indicates that the bucket contains more than one prefixes, or there
-  //   are too many rows for one prefix so we need a binary search for it. In
-  //   this case, the offset indicates the offset of sub_index_ holding the
-  //   binary search indexes of keys for those rows. Those binary search indexes
-  //   are organized in this way:
-  //
-  // The first 4 bytes, indicate how many indexes (N) are stored after it. After
-  // it, there are N 32-bit integers, each points of an offset of the file,
-  // which
-  // points to starting of a row. Those offsets need to be guaranteed to be in
-  // ascending order so the keys they are pointing to are also in ascending
-  // order
-  // to make sure we can use them to do binary searches. Below is visual
-  // presentation of a bucket.
-  //
-  // <begin>
-  //   number_of_records:  varint32
-  //   record 1 file offset:  fixedint32
-  //   record 2 file offset:  fixedint32
-  //    ....
-  //   record N file offset:  fixedint32
-  // <end>
-  Status PopulateIndex(TableProperties* props);
-
- private:
-  struct IndexRecord;
-  class IndexRecordList;
-
-  // Plain table maintains an index and a sub index.
-  // index is implemented by a hash table.
-  // subindex is a big of memory array.
-  // For more details about the in-memory index, please refer to:
-  // https://github.com/facebook/rocksdb/wiki/PlainTable-Format
-  // #wiki-in-memory-index-format
-  uint32_t* index_;
-  int index_size_ = 0;
-  char* sub_index_;
-
-  Options options_;
-  const EnvOptions& soptions_;
-  unique_ptr<RandomAccessFile> file_;
-
-  const InternalKeyComparator internal_comparator_;
-  // represents plain table's current status.
-  Status status_;
-
-  Slice file_data_;
-  uint32_t file_size_;
-
-  const double kHashTableRatio;
-  const int kBloomBitsPerKey;
-  // To speed up the search for keys with same prefix, we'll add index key for
-  // every N keys, where the "N" is determined by
-  // kIndexIntervalForSamePrefixKeys
-  const size_t kIndexIntervalForSamePrefixKeys = 16;
-  // Bloom filter is used to rule out non-existent key
-  unique_ptr<DynamicBloom> bloom_;
-  Arena arena_;
-
-  std::shared_ptr<const TableProperties> table_properties_;
-  // data_start_offset_ and data_end_offset_ defines the range of the
-  // sst file that stores data.
-  const uint32_t data_start_offset_ = 0;
-  const uint32_t data_end_offset_;
-  const size_t user_key_len_;
-  const size_t huge_page_tlb_size_;
-
-  static const size_t kNumInternalBytes = 8;
-  static const uint32_t kSubIndexMask = 0x80000000;
-  static const size_t kOffsetLen = sizeof(uint32_t);
-  static const uint64_t kMaxFileSize = 1u << 31;
-  static const size_t kRecordsPerGroup = 256;
-
-  bool IsFixedLength() const {
-    return user_key_len_ != kPlainTableVariableLength;
-  }
-
-  size_t GetFixedInternalKeyLength() const {
-    return user_key_len_ + kNumInternalBytes;
-  }
-
-  friend class TableCache;
-  friend class PlainTableIterator;
-
-  // Internal helper function to generate an IndexRecordList object from all
-  // the rows, which contains index records as a list.
-  // If bloom_ is not null, all the keys' full-key hash will be added to the
-  // bloom filter.
-  Status PopulateIndexRecordList(IndexRecordList* record_list,
-                                 int* num_prefixes) const;
-
-  // Internal helper function to allocate memory for indexes and bloom filters
-  void AllocateIndexAndBloom(int num_prefixes);
-
-  // Internal helper function to bucket index record list to hash buckets.
-  // bucket_header is a vector of size hash_table_size_, with each entry
-  // containing a linklist of IndexRecord hashed to the same bucket, in reverse
-  // order.
-  // of offsets for the hash, in reversed order.
-  // entries_per_bucket is sized of index_size_. The value is how many index
-  // records are there in bucket_headers for the same bucket.
-  size_t BucketizeIndexesAndFillBloom(
-      IndexRecordList* record_list, std::vector<IndexRecord*>* bucket_headers,
-      std::vector<uint32_t>* entries_per_bucket);
-
-  // Internal helper class to fill the indexes and bloom filters to internal
-  // data structures. bucket_headers and entries_per_bucket are bucketized
-  // indexes and counts generated by BucketizeIndexesAndFillBloom().
-  void FillIndexes(const size_t kSubIndexSize,
-                   const std::vector<IndexRecord*>& bucket_headers,
-                   const std::vector<uint32_t>& entries_per_bucket);
-
-  // Read a plain table key from the position `start`. The read content
-  // will be written to `key` and the size of read bytes will be populated
-  // in `bytes_read`.
-  Status ReadKey(const char* row_ptr, ParsedInternalKey* key,
-                 size_t* bytes_read) const;
-  // Read the key and value at `offset` to parameters `key` and `value`.
-  // On success, `offset` will be updated as the offset for the next key.
-  Status Next(uint32_t* offset, ParsedInternalKey* key, Slice* value) const;
-  // Get file offset for key target.
-  // return value prefix_matched is set to true if the offset is confirmed
-  // for a key with the same prefix as target.
-  Status GetOffset(const Slice& target, const Slice& prefix,
-                   uint32_t prefix_hash, bool& prefix_matched,
-                   uint32_t* offset) const;
-
-  Slice GetUserKey(const Slice& key) const {
-    return Slice(key.data(), key.size() - 8);
-  }
-
-  Slice GetPrefix(const Slice& target) const {
-    assert(target.size() >= 8);  // target is internal key
-    return GetPrefixFromUserKey(GetUserKey(target));
-  }
-
-  inline Slice GetPrefix(const ParsedInternalKey& target) const;
-
-  Slice GetPrefixFromUserKey(const Slice& user_key) const {
-    if (!IsTotalOrderMode()) {
-      return options_.prefix_extractor->Transform(user_key);
-    } else {
-      // Use empty slice as prefix if prefix_extractor is not set. In that case,
-      // it falls back to pure binary search and total iterator seek is
-      // supported.
-      return Slice();
-    }
-  }
-
-  bool IsTotalOrderMode() const {
-    return (options_.prefix_extractor.get() == nullptr);
-  }
-
-  // No copying allowed
-  explicit PlainTableReader(const TableReader&) = delete;
-  void operator=(const TableReader&) = delete;
-};
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/table/table_builder.h b/src/rocksdb/table/table_builder.h
deleted file mode 100644
index ee32cff..0000000
--- a/src/rocksdb/table/table_builder.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-namespace rocksdb {
-
-class Slice;
-class Status;
-
-// TableBuilder provides the interface used to build a Table
-// (an immutable and sorted map from keys to values).
-//
-// Multiple threads can invoke const methods on a TableBuilder without
-// external synchronization, but if any of the threads may call a
-// non-const method, all threads accessing the same TableBuilder must use
-// external synchronization.
-class TableBuilder {
- public:
-  // REQUIRES: Either Finish() or Abandon() has been called.
-  virtual ~TableBuilder() {}
-
-  // Add key,value to the table being constructed.
-  // REQUIRES: key is after any previously added key according to comparator.
-  // REQUIRES: Finish(), Abandon() have not been called
-  virtual void Add(const Slice& key, const Slice& value) = 0;
-
-  // Return non-ok iff some error has been detected.
-  virtual Status status() const = 0;
-
-  // Finish building the table.
-  // REQUIRES: Finish(), Abandon() have not been called
-  virtual Status Finish() = 0;
-
-  // Indicate that the contents of this builder should be abandoned.
-  // If the caller is not going to call Finish(), it must call Abandon()
-  // before destroying this builder.
-  // REQUIRES: Finish(), Abandon() have not been called
-  virtual void Abandon() = 0;
-
-  // Number of calls to Add() so far.
-  virtual uint64_t NumEntries() const = 0;
-
-  // Size of the file generated so far.  If invoked after a successful
-  // Finish() call, returns the size of the final generated file.
-  virtual uint64_t FileSize() const = 0;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/table_properties.cc b/src/rocksdb/table/table_properties.cc
deleted file mode 100644
index c7e1419..0000000
--- a/src/rocksdb/table/table_properties.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include "rocksdb/table_properties.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/env.h"
-
-namespace rocksdb {
-
-namespace {
-  void AppendProperty(
-      std::string& props,
-      const std::string& key,
-      const std::string& value,
-      const std::string& prop_delim,
-      const std::string& kv_delim) {
-    props.append(key);
-    props.append(kv_delim);
-    props.append(value);
-    props.append(prop_delim);
-  }
-
-  template <class TValue>
-  void AppendProperty(
-      std::string& props,
-      const std::string& key,
-      const TValue& value,
-      const std::string& prop_delim,
-      const std::string& kv_delim) {
-    AppendProperty(
-        props, key, std::to_string(value), prop_delim, kv_delim
-    );
-  }
-}
-
-std::string TableProperties::ToString(
-    const std::string& prop_delim,
-    const std::string& kv_delim) const {
-  std::string result;
-  result.reserve(1024);
-
-  // Basic Info
-  AppendProperty(result, "# data blocks", num_data_blocks, prop_delim,
-                 kv_delim);
-  AppendProperty(result, "# entries", num_entries, prop_delim, kv_delim);
-
-  AppendProperty(result, "raw key size", raw_key_size, prop_delim, kv_delim);
-  AppendProperty(result, "raw average key size",
-                 num_entries != 0 ? 1.0 * raw_key_size / num_entries : 0.0,
-                 prop_delim, kv_delim);
-  AppendProperty(result, "raw value size", raw_value_size, prop_delim,
-                 kv_delim);
-  AppendProperty(result, "raw average value size",
-                 num_entries != 0 ? 1.0 * raw_value_size / num_entries : 0.0,
-                 prop_delim, kv_delim);
-
-  AppendProperty(result, "data block size", data_size, prop_delim, kv_delim);
-  AppendProperty(result, "index block size", index_size, prop_delim, kv_delim);
-  AppendProperty(result, "filter block size", filter_size, prop_delim,
-                 kv_delim);
-  AppendProperty(result, "(estimated) table size",
-                 data_size + index_size + filter_size, prop_delim, kv_delim);
-
-  AppendProperty(
-      result, "filter policy name",
-      filter_policy_name.empty() ? std::string("N/A") : filter_policy_name,
-      prop_delim, kv_delim);
-
-  return result;
-}
-
-const std::string TablePropertiesNames::kDataSize  =
-    "rocksdb.data.size";
-const std::string TablePropertiesNames::kIndexSize =
-    "rocksdb.index.size";
-const std::string TablePropertiesNames::kFilterSize =
-    "rocksdb.filter.size";
-const std::string TablePropertiesNames::kRawKeySize =
-    "rocksdb.raw.key.size";
-const std::string TablePropertiesNames::kRawValueSize =
-    "rocksdb.raw.value.size";
-const std::string TablePropertiesNames::kNumDataBlocks =
-    "rocksdb.num.data.blocks";
-const std::string TablePropertiesNames::kNumEntries =
-    "rocksdb.num.entries";
-const std::string TablePropertiesNames::kFilterPolicy =
-    "rocksdb.filter.policy";
-const std::string TablePropertiesNames::kFormatVersion =
-    "rocksdb.format.version";
-const std::string TablePropertiesNames::kFixedKeyLen =
-    "rocksdb.fixed.key.length";
-
-extern const std::string kPropertiesBlock = "rocksdb.properties";
-// Old property block name for backward compatibility
-extern const std::string kPropertiesBlockOldName = "rocksdb.stats";
-
-// Seek to the properties block.
-// Return true if it successfully seeks to the properties block.
-Status SeekToPropertiesBlock(Iterator* meta_iter, bool* is_found) {
-  *is_found = true;
-  meta_iter->Seek(kPropertiesBlock);
-  if (meta_iter->status().ok() &&
-      (!meta_iter->Valid() || meta_iter->key() != kPropertiesBlock)) {
-    meta_iter->Seek(kPropertiesBlockOldName);
-    if (meta_iter->status().ok() &&
-        (!meta_iter->Valid() || meta_iter->key() != kPropertiesBlockOldName)) {
-      *is_found = false;
-    }
-  }
-  return meta_iter->status();
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/table_reader.h b/src/rocksdb/table/table_reader.h
deleted file mode 100644
index 02a2d16..0000000
--- a/src/rocksdb/table/table_reader.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <memory>
-
-namespace rocksdb {
-
-class Iterator;
-struct ParsedInternalKey;
-class Slice;
-struct ReadOptions;
-struct TableProperties;
-
-// A Table is a sorted map from strings to strings.  Tables are
-// immutable and persistent.  A Table may be safely accessed from
-// multiple threads without external synchronization.
-class TableReader {
- public:
-  virtual ~TableReader() {}
-
-  // Returns a new iterator over the table contents.
-  // The result of NewIterator() is initially invalid (caller must
-  // call one of the Seek methods on the iterator before using it).
-  virtual Iterator* NewIterator(const ReadOptions&) = 0;
-
-  // Given a key, return an approximate byte offset in the file where
-  // the data for that key begins (or would begin if the key were
-  // present in the file).  The returned value is in terms of file
-  // bytes, and so includes effects like compression of the underlying data.
-  // E.g., the approximate offset of the last key in the table will
-  // be close to the file length.
-  virtual uint64_t ApproximateOffsetOf(const Slice& key) = 0;
-
-  // Set up the table for Compaction. Might change some parameters with
-  // posix_fadvise
-  virtual void SetupForCompaction() = 0;
-
-  virtual std::shared_ptr<const TableProperties> GetTableProperties() const = 0;
-
-  // Calls (*result_handler)(handle_context, ...) repeatedly, starting with
-  // the entry found after a call to Seek(key), until result_handler returns
-  // false, where k is the actual internal key for a row found and v as the
-  // value of the key. didIO is true if I/O is involved in the operation. May
-  // not make such a call if filter policy says that key is not present.
-  //
-  // mark_key_may_exist_handler needs to be called when it is configured to be
-  // memory only and the key is not found in the block cache, with
-  // the parameter to be handle_context.
-  //
-  // readOptions is the options for the read
-  // key is the key to search for
-  virtual Status Get(
-      const ReadOptions& readOptions, const Slice& key, void* handle_context,
-      bool (*result_handler)(void* arg, const ParsedInternalKey& k,
-                             const Slice& v, bool didIO),
-      void (*mark_key_may_exist_handler)(void* handle_context) = nullptr) = 0;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/table_reader_bench.cc b/src/rocksdb/table/table_reader_bench.cc
deleted file mode 100644
index a0ff0d7..0000000
--- a/src/rocksdb/table/table_reader_bench.cc
+++ /dev/null
@@ -1,271 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <gflags/gflags.h>
-
-#include "rocksdb/db.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "db/db_impl.h"
-#include "db/dbformat.h"
-#include "port/atomic_pointer.h"
-#include "table/block_based_table_factory.h"
-#include "table/plain_table_factory.h"
-#include "table/table_builder.h"
-#include "util/histogram.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-namespace {
-// Make a key that i determines the first 4 characters and j determines the
-// last 4 characters.
-static std::string MakeKey(int i, int j, bool through_db) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "%04d__key___%04d", i, j);
-  if (through_db) {
-    return std::string(buf);
-  }
-  // If we directly query table, which operates on internal keys
-  // instead of user keys, we need to add 8 bytes of internal
-  // information (row type etc) to user key to make an internal
-  // key.
-  InternalKey key(std::string(buf), 0, ValueType::kTypeValue);
-  return key.Encode().ToString();
-}
-
-static bool DummySaveValue(void* arg, const ParsedInternalKey& ikey,
-                           const Slice& v, bool didIO) {
-  return false;
-}
-
-uint64_t Now(Env* env, bool measured_by_nanosecond) {
-  return measured_by_nanosecond ? env->NowNanos() : env->NowMicros();
-}
-}  // namespace
-
-// A very simple benchmark that.
-// Create a table with roughly numKey1 * numKey2 keys,
-// where there are numKey1 prefixes of the key, each has numKey2 number of
-// distinguished key, differing in the suffix part.
-// If if_query_empty_keys = false, query the existing keys numKey1 * numKey2
-// times randomly.
-// If if_query_empty_keys = true, query numKey1 * numKey2 random empty keys.
-// Print out the total time.
-// If through_db=true, a full DB will be created and queries will be against
-// it. Otherwise, operations will be directly through table level.
-//
-// If for_terator=true, instead of just query one key each time, it queries
-// a range sharing the same prefix.
-namespace {
-void TableReaderBenchmark(Options& opts, EnvOptions& env_options,
-                          ReadOptions& read_options, int num_keys1,
-                          int num_keys2, int num_iter, int prefix_len,
-                          bool if_query_empty_keys, bool for_iterator,
-                          bool through_db, bool measured_by_nanosecond) {
-  rocksdb::InternalKeyComparator ikc(opts.comparator);
-
-  std::string file_name = test::TmpDir()
-      + "/rocksdb_table_reader_benchmark";
-  std::string dbname = test::TmpDir() + "/rocksdb_table_reader_bench_db";
-  WriteOptions wo;
-  unique_ptr<WritableFile> file;
-  Env* env = Env::Default();
-  TableBuilder* tb = nullptr;
-  DB* db = nullptr;
-  Status s;
-  if (!through_db) {
-    env->NewWritableFile(file_name, &file, env_options);
-    tb = opts.table_factory->NewTableBuilder(opts, ikc, file.get(),
-                                             CompressionType::kNoCompression);
-  } else {
-    s = DB::Open(opts, dbname, &db);
-    ASSERT_OK(s);
-    ASSERT_TRUE(db != nullptr);
-  }
-  // Populate slightly more than 1M keys
-  for (int i = 0; i < num_keys1; i++) {
-    for (int j = 0; j < num_keys2; j++) {
-      std::string key = MakeKey(i * 2, j, through_db);
-      if (!through_db) {
-        tb->Add(key, key);
-      } else {
-        db->Put(wo, key, key);
-      }
-    }
-  }
-  if (!through_db) {
-    tb->Finish();
-    file->Close();
-  } else {
-    db->Flush(FlushOptions());
-  }
-
-  unique_ptr<TableReader> table_reader;
-  unique_ptr<RandomAccessFile> raf;
-  if (!through_db) {
-    Status s = env->NewRandomAccessFile(file_name, &raf, env_options);
-    uint64_t file_size;
-    env->GetFileSize(file_name, &file_size);
-    s = opts.table_factory->NewTableReader(
-        opts, env_options, ikc, std::move(raf), file_size, &table_reader);
-  }
-
-  Random rnd(301);
-  std::string result;
-  HistogramImpl hist;
-
-  void* arg = nullptr;
-  for (int it = 0; it < num_iter; it++) {
-    for (int i = 0; i < num_keys1; i++) {
-      for (int j = 0; j < num_keys2; j++) {
-        int r1 = rnd.Uniform(num_keys1) * 2;
-        int r2 = rnd.Uniform(num_keys2);
-        if (if_query_empty_keys) {
-          r1++;
-          r2 = num_keys2 * 2 - r2;
-        }
-
-        if (!for_iterator) {
-          // Query one existing key;
-          std::string key = MakeKey(r1, r2, through_db);
-          uint64_t start_time = Now(env, measured_by_nanosecond);
-          port::MemoryBarrier();
-          if (!through_db) {
-            s = table_reader->Get(read_options, key, arg, DummySaveValue,
-                                  nullptr);
-          } else {
-            s = db->Get(read_options, key, &result);
-          }
-          port::MemoryBarrier();
-          hist.Add(Now(env, measured_by_nanosecond) - start_time);
-        } else {
-          int r2_len;
-          if (if_query_empty_keys) {
-            r2_len = 0;
-          } else {
-            r2_len = rnd.Uniform(num_keys2) + 1;
-            if (r2_len + r2 > num_keys2) {
-              r2_len = num_keys2 - r2;
-            }
-          }
-          std::string start_key = MakeKey(r1, r2, through_db);
-          std::string end_key = MakeKey(r1, r2 + r2_len, through_db);
-          uint64_t total_time = 0;
-          uint64_t start_time = Now(env, measured_by_nanosecond);
-          port::MemoryBarrier();
-          Iterator* iter;
-          if (!through_db) {
-            iter = table_reader->NewIterator(read_options);
-          } else {
-            iter = db->NewIterator(read_options);
-          }
-          int count = 0;
-          for(iter->Seek(start_key); iter->Valid(); iter->Next()) {
-            if (if_query_empty_keys) {
-              break;
-            }
-            // verify key;
-            port::MemoryBarrier();
-            total_time += Now(env, measured_by_nanosecond) - start_time;
-            assert(Slice(MakeKey(r1, r2 + count, through_db)) == iter->key());
-            start_time = Now(env, measured_by_nanosecond);
-            if (++count >= r2_len) {
-              break;
-            }
-          }
-          if (count != r2_len) {
-            fprintf(
-                stderr, "Iterator cannot iterate expected number of entries. "
-                "Expected %d but got %d\n", r2_len, count);
-            assert(false);
-          }
-          delete iter;
-          port::MemoryBarrier();
-          total_time += Now(env, measured_by_nanosecond) - start_time;
-          hist.Add(total_time);
-        }
-      }
-    }
-  }
-
-  fprintf(
-      stderr,
-      "==================================================="
-      "====================================================\n"
-      "InMemoryTableSimpleBenchmark: %20s   num_key1:  %5d   "
-      "num_key2: %5d  %10s\n"
-      "==================================================="
-      "===================================================="
-      "\nHistogram (unit: %s): \n%s",
-      opts.table_factory->Name(), num_keys1, num_keys2,
-      for_iterator ? "iterator" : (if_query_empty_keys ? "empty" : "non_empty"),
-      measured_by_nanosecond ? "nanosecond" : "microsecond",
-      hist.ToString().c_str());
-  if (!through_db) {
-    env->DeleteFile(file_name);
-  } else {
-    delete db;
-    db = nullptr;
-    DestroyDB(dbname, opts);
-  }
-}
-}  // namespace
-}  // namespace rocksdb
-
-DEFINE_bool(query_empty, false, "query non-existing keys instead of existing "
-            "ones.");
-DEFINE_int32(num_keys1, 4096, "number of distinguish prefix of keys");
-DEFINE_int32(num_keys2, 512, "number of distinguish keys for each prefix");
-DEFINE_int32(iter, 3, "query non-existing keys instead of existing ones");
-DEFINE_int32(prefix_len, 16, "Prefix length used for iterators and indexes");
-DEFINE_bool(iterator, false, "For test iterator");
-DEFINE_bool(through_db, false, "If enable, a DB instance will be created and "
-            "the query will be against DB. Otherwise, will be directly against "
-            "a table reader.");
-DEFINE_bool(plain_table, false, "Use PlainTable");
-DEFINE_string(time_unit, "microsecond",
-              "The time unit used for measuring performance. User can specify "
-              "`microsecond` (default) or `nanosecond`");
-
-int main(int argc, char** argv) {
-  google::SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) +
-                          " [OPTIONS]...");
-  google::ParseCommandLineFlags(&argc, &argv, true);
-
-  rocksdb::TableFactory* tf = new rocksdb::BlockBasedTableFactory();
-  rocksdb::Options options;
-  if (FLAGS_prefix_len < 16) {
-    options.prefix_extractor.reset(rocksdb::NewFixedPrefixTransform(
-        FLAGS_prefix_len));
-  }
-  rocksdb::ReadOptions ro;
-  rocksdb::EnvOptions env_options;
-  options.create_if_missing = true;
-  options.compression = rocksdb::CompressionType::kNoCompression;
-
-  if (FLAGS_plain_table) {
-    options.allow_mmap_reads = true;
-    env_options.use_mmap_reads = true;
-    tf = new rocksdb::PlainTableFactory(16, (FLAGS_prefix_len == 16) ? 0 : 8,
-                                        0.75);
-    options.prefix_extractor.reset(rocksdb::NewFixedPrefixTransform(
-        FLAGS_prefix_len));
-  } else {
-    tf = new rocksdb::BlockBasedTableFactory();
-  }
-  // if user provides invalid options, just fall back to microsecond.
-  bool measured_by_nanosecond = FLAGS_time_unit == "nanosecond";
-
-  options.table_factory =
-      std::shared_ptr<rocksdb::TableFactory>(tf);
-  rocksdb::TableReaderBenchmark(options, env_options, ro, FLAGS_num_keys1,
-                                FLAGS_num_keys2, FLAGS_iter, FLAGS_prefix_len,
-                                FLAGS_query_empty, FLAGS_iterator,
-                                FLAGS_through_db, measured_by_nanosecond);
-  delete tf;
-  return 0;
-}
diff --git a/src/rocksdb/table/table_test.cc b/src/rocksdb/table/table_test.cc
deleted file mode 100644
index dd81bae..0000000
--- a/src/rocksdb/table/table_test.cc
+++ /dev/null
@@ -1,1805 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <inttypes.h>
-#include <stdio.h>
-
-#include <algorithm>
-#include <map>
-#include <string>
-#include <memory>
-#include <vector>
-
-#include "db/dbformat.h"
-#include "db/memtable.h"
-#include "db/write_batch_internal.h"
-
-#include "rocksdb/cache.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/statistics.h"
-
-#include "table/block.h"
-#include "table/block_based_table_builder.h"
-#include "table/block_based_table_factory.h"
-#include "table/block_based_table_reader.h"
-#include "table/block_builder.h"
-#include "table/format.h"
-#include "table/meta_blocks.h"
-#include "table/plain_table_factory.h"
-
-#include "util/random.h"
-#include "util/statistics.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-extern const uint64_t kLegacyBlockBasedTableMagicNumber;
-extern const uint64_t kLegacyPlainTableMagicNumber;
-extern const uint64_t kBlockBasedTableMagicNumber;
-extern const uint64_t kPlainTableMagicNumber;
-
-namespace {
-
-// Return reverse of "key".
-// Used to test non-lexicographic comparators.
-std::string Reverse(const Slice& key) {
-  auto rev = key.ToString();
-  std::reverse(rev.begin(), rev.end());
-  return rev;
-}
-
-class ReverseKeyComparator : public Comparator {
- public:
-  virtual const char* Name() const {
-    return "rocksdb.ReverseBytewiseComparator";
-  }
-
-  virtual int Compare(const Slice& a, const Slice& b) const {
-    return BytewiseComparator()->Compare(Reverse(a), Reverse(b));
-  }
-
-  virtual void FindShortestSeparator(
-      std::string* start,
-      const Slice& limit) const {
-    std::string s = Reverse(*start);
-    std::string l = Reverse(limit);
-    BytewiseComparator()->FindShortestSeparator(&s, l);
-    *start = Reverse(s);
-  }
-
-  virtual void FindShortSuccessor(std::string* key) const {
-    std::string s = Reverse(*key);
-    BytewiseComparator()->FindShortSuccessor(&s);
-    *key = Reverse(s);
-  }
-};
-
-ReverseKeyComparator reverse_key_comparator;
-
-void Increment(const Comparator* cmp, std::string* key) {
-  if (cmp == BytewiseComparator()) {
-    key->push_back('\0');
-  } else {
-    assert(cmp == &reverse_key_comparator);
-    std::string rev = Reverse(*key);
-    rev.push_back('\0');
-    *key = Reverse(rev);
-  }
-}
-
-// An STL comparator that uses a Comparator
-struct STLLessThan {
-  const Comparator* cmp;
-
-  STLLessThan() : cmp(BytewiseComparator()) { }
-  explicit STLLessThan(const Comparator* c) : cmp(c) { }
-  bool operator()(const std::string& a, const std::string& b) const {
-    return cmp->Compare(Slice(a), Slice(b)) < 0;
-  }
-};
-
-}  // namespace
-
-class StringSink: public WritableFile {
- public:
-  ~StringSink() { }
-
-  const std::string& contents() const { return contents_; }
-
-  virtual Status Close() { return Status::OK(); }
-  virtual Status Flush() { return Status::OK(); }
-  virtual Status Sync() { return Status::OK(); }
-
-  virtual Status Append(const Slice& data) {
-    contents_.append(data.data(), data.size());
-    return Status::OK();
-  }
-
- private:
-  std::string contents_;
-};
-
-
-class StringSource: public RandomAccessFile {
- public:
-  StringSource(const Slice& contents, uint64_t uniq_id, bool mmap)
-      : contents_(contents.data(), contents.size()), uniq_id_(uniq_id),
-        mmap_(mmap) {
-  }
-
-  virtual ~StringSource() { }
-
-  uint64_t Size() const { return contents_.size(); }
-
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                       char* scratch) const {
-    if (offset > contents_.size()) {
-      return Status::InvalidArgument("invalid Read offset");
-    }
-    if (offset + n > contents_.size()) {
-      n = contents_.size() - offset;
-    }
-    if (!mmap_) {
-      memcpy(scratch, &contents_[offset], n);
-      *result = Slice(scratch, n);
-    } else {
-      *result = Slice(&contents_[offset], n);
-    }
-    return Status::OK();
-  }
-
-  virtual size_t GetUniqueId(char* id, size_t max_size) const {
-    if (max_size < 20) {
-      return 0;
-    }
-
-    char* rid = id;
-    rid = EncodeVarint64(rid, uniq_id_);
-    rid = EncodeVarint64(rid, 0);
-    return static_cast<size_t>(rid-id);
-  }
-
- private:
-  std::string contents_;
-  uint64_t uniq_id_;
-  bool mmap_;
-};
-
-typedef std::map<std::string, std::string, STLLessThan> KVMap;
-
-// Helper class for tests to unify the interface between
-// BlockBuilder/TableBuilder and Block/Table.
-class Constructor {
- public:
-  explicit Constructor(const Comparator* cmp) : data_(STLLessThan(cmp)) {}
-  virtual ~Constructor() { }
-
-  void Add(const std::string& key, const Slice& value) {
-    data_[key] = value.ToString();
-  }
-
-  // Finish constructing the data structure with all the keys that have
-  // been added so far.  Returns the keys in sorted order in "*keys"
-  // and stores the key/value pairs in "*kvmap"
-  void Finish(const Options& options,
-              const InternalKeyComparator& internal_comparator,
-              std::vector<std::string>* keys, KVMap* kvmap) {
-    last_internal_key_ = &internal_comparator;
-    *kvmap = data_;
-    keys->clear();
-    for (KVMap::const_iterator it = data_.begin();
-         it != data_.end();
-         ++it) {
-      keys->push_back(it->first);
-    }
-    data_.clear();
-    Status s = FinishImpl(options, internal_comparator, *kvmap);
-    ASSERT_TRUE(s.ok()) << s.ToString();
-  }
-
-  // Construct the data structure from the data in "data"
-  virtual Status FinishImpl(const Options& options,
-                            const InternalKeyComparator& internal_comparator,
-                            const KVMap& data) = 0;
-
-  virtual Iterator* NewIterator() const = 0;
-
-  virtual const KVMap& data() { return data_; }
-
-  virtual DB* db() const { return nullptr; }  // Overridden in DBConstructor
-
- protected:
-  const InternalKeyComparator* last_internal_key_;
-
- private:
-  KVMap data_;
-};
-
-class BlockConstructor: public Constructor {
- public:
-  explicit BlockConstructor(const Comparator* cmp)
-      : Constructor(cmp),
-        comparator_(cmp),
-        block_(nullptr) { }
-  ~BlockConstructor() {
-    delete block_;
-  }
-  virtual Status FinishImpl(const Options& options,
-                            const InternalKeyComparator& internal_comparator,
-                            const KVMap& data) {
-    delete block_;
-    block_ = nullptr;
-    BlockBuilder builder(options, &internal_comparator);
-
-    for (KVMap::const_iterator it = data.begin();
-         it != data.end();
-         ++it) {
-      builder.Add(it->first, it->second);
-    }
-    // Open the block
-    data_ = builder.Finish().ToString();
-    BlockContents contents;
-    contents.data = data_;
-    contents.cachable = false;
-    contents.heap_allocated = false;
-    block_ = new Block(contents);
-    return Status::OK();
-  }
-  virtual Iterator* NewIterator() const {
-    return block_->NewIterator(comparator_);
-  }
-
- private:
-  const Comparator* comparator_;
-  std::string data_;
-  Block* block_;
-
-  BlockConstructor();
-};
-
-// A helper class that converts internal format keys into user keys
-class KeyConvertingIterator: public Iterator {
- public:
-  explicit KeyConvertingIterator(Iterator* iter) : iter_(iter) { }
-  virtual ~KeyConvertingIterator() { delete iter_; }
-  virtual bool Valid() const { return iter_->Valid(); }
-  virtual void Seek(const Slice& target) {
-    ParsedInternalKey ikey(target, kMaxSequenceNumber, kTypeValue);
-    std::string encoded;
-    AppendInternalKey(&encoded, ikey);
-    iter_->Seek(encoded);
-  }
-  virtual void SeekToFirst() { iter_->SeekToFirst(); }
-  virtual void SeekToLast() { iter_->SeekToLast(); }
-  virtual void Next() { iter_->Next(); }
-  virtual void Prev() { iter_->Prev(); }
-
-  virtual Slice key() const {
-    assert(Valid());
-    ParsedInternalKey key;
-    if (!ParseInternalKey(iter_->key(), &key)) {
-      status_ = Status::Corruption("malformed internal key");
-      return Slice("corrupted key");
-    }
-    return key.user_key;
-  }
-
-  virtual Slice value() const { return iter_->value(); }
-  virtual Status status() const {
-    return status_.ok() ? iter_->status() : status_;
-  }
-
- private:
-  mutable Status status_;
-  Iterator* iter_;
-
-  // No copying allowed
-  KeyConvertingIterator(const KeyConvertingIterator&);
-  void operator=(const KeyConvertingIterator&);
-};
-
-class TableConstructor: public Constructor {
- public:
-  explicit TableConstructor(const Comparator* cmp,
-                            bool convert_to_internal_key = false)
-      : Constructor(cmp),
-        convert_to_internal_key_(convert_to_internal_key) {}
-  ~TableConstructor() { Reset(); }
-
-  virtual Status FinishImpl(const Options& options,
-                            const InternalKeyComparator& internal_comparator,
-                            const KVMap& data) {
-    Reset();
-    sink_.reset(new StringSink());
-    unique_ptr<TableBuilder> builder;
-    builder.reset(options.table_factory->NewTableBuilder(
-        options, internal_comparator, sink_.get(), options.compression));
-
-    for (KVMap::const_iterator it = data.begin();
-         it != data.end();
-         ++it) {
-      if (convert_to_internal_key_) {
-        ParsedInternalKey ikey(it->first, kMaxSequenceNumber, kTypeValue);
-        std::string encoded;
-        AppendInternalKey(&encoded, ikey);
-        builder->Add(encoded, it->second);
-      } else {
-        builder->Add(it->first, it->second);
-      }
-      ASSERT_TRUE(builder->status().ok());
-    }
-    Status s = builder->Finish();
-    ASSERT_TRUE(s.ok()) << s.ToString();
-
-    ASSERT_EQ(sink_->contents().size(), builder->FileSize());
-
-    // Open the table
-    uniq_id_ = cur_uniq_id_++;
-    source_.reset(new StringSource(sink_->contents(), uniq_id_,
-                                   options.allow_mmap_reads));
-    return options.table_factory->NewTableReader(
-        options, soptions, internal_comparator, std::move(source_),
-        sink_->contents().size(), &table_reader_);
-  }
-
-  virtual Iterator* NewIterator() const {
-    ReadOptions ro;
-    Iterator* iter = table_reader_->NewIterator(ro);
-    if (convert_to_internal_key_) {
-      return new KeyConvertingIterator(iter);
-    } else {
-      return iter;
-    }
-  }
-
-  uint64_t ApproximateOffsetOf(const Slice& key) const {
-    return table_reader_->ApproximateOffsetOf(key);
-  }
-
-  virtual Status Reopen(const Options& options) {
-    source_.reset(
-        new StringSource(sink_->contents(), uniq_id_,
-                         options.allow_mmap_reads));
-    return options.table_factory->NewTableReader(
-        options, soptions, *last_internal_key_, std::move(source_),
-        sink_->contents().size(), &table_reader_);
-  }
-
-  virtual TableReader* table_reader() {
-    return table_reader_.get();
-  }
-
- private:
-  void Reset() {
-    uniq_id_ = 0;
-    table_reader_.reset();
-    sink_.reset();
-    source_.reset();
-  }
-  bool convert_to_internal_key_;
-
-  uint64_t uniq_id_;
-  unique_ptr<StringSink> sink_;
-  unique_ptr<StringSource> source_;
-  unique_ptr<TableReader> table_reader_;
-
-  TableConstructor();
-
-  static uint64_t cur_uniq_id_;
-  const EnvOptions soptions;
-};
-uint64_t TableConstructor::cur_uniq_id_ = 1;
-
-class MemTableConstructor: public Constructor {
- public:
-  explicit MemTableConstructor(const Comparator* cmp)
-      : Constructor(cmp),
-        internal_comparator_(cmp),
-        table_factory_(new SkipListFactory) {
-    Options options;
-    options.memtable_factory = table_factory_;
-    memtable_ = new MemTable(internal_comparator_, options);
-    memtable_->Ref();
-  }
-  ~MemTableConstructor() {
-    delete memtable_->Unref();
-  }
-  virtual Status FinishImpl(const Options& options,
-                            const InternalKeyComparator& internal_comparator,
-                            const KVMap& data) {
-    delete memtable_->Unref();
-    Options memtable_options;
-    memtable_options.memtable_factory = table_factory_;
-    memtable_ = new MemTable(internal_comparator_, memtable_options);
-    memtable_->Ref();
-    int seq = 1;
-    for (KVMap::const_iterator it = data.begin();
-         it != data.end();
-         ++it) {
-      memtable_->Add(seq, kTypeValue, it->first, it->second);
-      seq++;
-    }
-    return Status::OK();
-  }
-  virtual Iterator* NewIterator() const {
-    return new KeyConvertingIterator(memtable_->NewIterator(ReadOptions()));
-  }
-
- private:
-  InternalKeyComparator internal_comparator_;
-  MemTable* memtable_;
-  std::shared_ptr<SkipListFactory> table_factory_;
-};
-
-class DBConstructor: public Constructor {
- public:
-  explicit DBConstructor(const Comparator* cmp)
-      : Constructor(cmp),
-        comparator_(cmp) {
-    db_ = nullptr;
-    NewDB();
-  }
-  ~DBConstructor() {
-    delete db_;
-  }
-  virtual Status FinishImpl(const Options& options,
-                            const InternalKeyComparator& internal_comparator,
-                            const KVMap& data) {
-    delete db_;
-    db_ = nullptr;
-    NewDB();
-    for (KVMap::const_iterator it = data.begin();
-         it != data.end();
-         ++it) {
-      WriteBatch batch;
-      batch.Put(it->first, it->second);
-      ASSERT_TRUE(db_->Write(WriteOptions(), &batch).ok());
-    }
-    return Status::OK();
-  }
-  virtual Iterator* NewIterator() const {
-    return db_->NewIterator(ReadOptions());
-  }
-
-  virtual DB* db() const { return db_; }
-
- private:
-  void NewDB() {
-    std::string name = test::TmpDir() + "/table_testdb";
-
-    Options options;
-    options.comparator = comparator_;
-    Status status = DestroyDB(name, options);
-    ASSERT_TRUE(status.ok()) << status.ToString();
-
-    options.create_if_missing = true;
-    options.error_if_exists = true;
-    options.write_buffer_size = 10000;  // Something small to force merging
-    status = DB::Open(options, name, &db_);
-    ASSERT_TRUE(status.ok()) << status.ToString();
-  }
-
-  const Comparator* comparator_;
-  DB* db_;
-};
-
-static bool SnappyCompressionSupported() {
-#ifdef SNAPPY
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::Snappy_Compress(Options().compression_opts,
-                               in.data(), in.size(),
-                               &out);
-#else
-  return false;
-#endif
-}
-
-static bool ZlibCompressionSupported() {
-#ifdef ZLIB
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::Zlib_Compress(Options().compression_opts,
-                             in.data(), in.size(),
-                             &out);
-#else
-  return false;
-#endif
-}
-
-static bool BZip2CompressionSupported() {
-#ifdef BZIP2
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::BZip2_Compress(Options().compression_opts,
-                              in.data(), in.size(),
-                              &out);
-#else
-  return false;
-#endif
-}
-
-static bool LZ4CompressionSupported() {
-#ifdef LZ4
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::LZ4_Compress(Options().compression_opts, in.data(), in.size(),
-                            &out);
-#else
-  return false;
-#endif
-}
-
-static bool LZ4HCCompressionSupported() {
-#ifdef LZ4
-  std::string out;
-  Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-  return port::LZ4HC_Compress(Options().compression_opts, in.data(), in.size(),
-                              &out);
-#else
-  return false;
-#endif
-}
-
-enum TestType {
-  BLOCK_BASED_TABLE_TEST,
-  PLAIN_TABLE_SEMI_FIXED_PREFIX,
-  PLAIN_TABLE_FULL_STR_PREFIX,
-  PLAIN_TABLE_TOTAL_ORDER,
-  BLOCK_TEST,
-  MEMTABLE_TEST,
-  DB_TEST
-};
-
-struct TestArgs {
-  TestType type;
-  bool reverse_compare;
-  int restart_interval;
-  CompressionType compression;
-};
-
-static std::vector<TestArgs> GenerateArgList() {
-  std::vector<TestArgs> test_args;
-  std::vector<TestType> test_types = {
-      BLOCK_BASED_TABLE_TEST,      PLAIN_TABLE_SEMI_FIXED_PREFIX,
-      PLAIN_TABLE_FULL_STR_PREFIX, PLAIN_TABLE_TOTAL_ORDER,
-      BLOCK_TEST,                  MEMTABLE_TEST,
-      DB_TEST};
-  std::vector<bool> reverse_compare_types = {false, true};
-  std::vector<int> restart_intervals = {16, 1, 1024};
-
-  // Only add compression if it is supported
-  std::vector<CompressionType> compression_types;
-  compression_types.push_back(kNoCompression);
-  if (SnappyCompressionSupported()) {
-    compression_types.push_back(kSnappyCompression);
-  }
-  if (ZlibCompressionSupported()) {
-    compression_types.push_back(kZlibCompression);
-  }
-  if (BZip2CompressionSupported()) {
-    compression_types.push_back(kBZip2Compression);
-  }
-  if (LZ4CompressionSupported()) {
-    compression_types.push_back(kLZ4Compression);
-  }
-  if (LZ4HCCompressionSupported()) {
-    compression_types.push_back(kLZ4HCCompression);
-  }
-
-  for (auto test_type : test_types) {
-    for (auto reverse_compare : reverse_compare_types) {
-      if (test_type == PLAIN_TABLE_SEMI_FIXED_PREFIX ||
-          test_type == PLAIN_TABLE_FULL_STR_PREFIX) {
-        // Plain table doesn't use restart index or compression.
-        TestArgs one_arg;
-        one_arg.type = test_type;
-        one_arg.reverse_compare = reverse_compare;
-        one_arg.restart_interval = restart_intervals[0];
-        one_arg.compression = compression_types[0];
-        test_args.push_back(one_arg);
-        continue;
-      }
-
-      for (auto restart_interval : restart_intervals) {
-        for (auto compression_type : compression_types) {
-          TestArgs one_arg;
-          one_arg.type = test_type;
-          one_arg.reverse_compare = reverse_compare;
-          one_arg.restart_interval = restart_interval;
-          one_arg.compression = compression_type;
-          test_args.push_back(one_arg);
-        }
-      }
-    }
-  }
-  return test_args;
-}
-
-// In order to make all tests run for plain table format, including
-// those operating on empty keys, create a new prefix transformer which
-// return fixed prefix if the slice is not shorter than the prefix length,
-// and the full slice if it is shorter.
-class FixedOrLessPrefixTransform : public SliceTransform {
- private:
-  const size_t prefix_len_;
-
- public:
-  explicit FixedOrLessPrefixTransform(size_t prefix_len) :
-      prefix_len_(prefix_len) {
-  }
-
-  virtual const char* Name() const {
-    return "rocksdb.FixedPrefix";
-  }
-
-  virtual Slice Transform(const Slice& src) const {
-    assert(InDomain(src));
-    if (src.size() < prefix_len_) {
-      return src;
-    }
-    return Slice(src.data(), prefix_len_);
-  }
-
-  virtual bool InDomain(const Slice& src) const {
-    return true;
-  }
-
-  virtual bool InRange(const Slice& dst) const {
-    return (dst.size() <= prefix_len_);
-  }
-};
-
-class Harness {
- public:
-  Harness() : constructor_(nullptr) { }
-
-  void Init(const TestArgs& args) {
-    delete constructor_;
-    constructor_ = nullptr;
-    options_ = Options();
-
-    options_.block_restart_interval = args.restart_interval;
-    options_.compression = args.compression;
-    // Use shorter block size for tests to exercise block boundary
-    // conditions more.
-    options_.block_size = 256;
-    if (args.reverse_compare) {
-      options_.comparator = &reverse_key_comparator;
-    }
-
-    internal_comparator_.reset(
-        new test::PlainInternalKeyComparator(options_.comparator));
-
-    support_prev_ = true;
-    only_support_prefix_seek_ = false;
-    BlockBasedTableOptions table_options;
-    switch (args.type) {
-      case BLOCK_BASED_TABLE_TEST:
-        table_options.flush_block_policy_factory.reset(
-            new FlushBlockBySizePolicyFactory());
-        options_.table_factory.reset(new BlockBasedTableFactory(table_options));
-        constructor_ = new TableConstructor(options_.comparator);
-        break;
-      case PLAIN_TABLE_SEMI_FIXED_PREFIX:
-        support_prev_ = false;
-        only_support_prefix_seek_ = true;
-        options_.prefix_extractor.reset(new FixedOrLessPrefixTransform(2));
-        options_.allow_mmap_reads = true;
-        options_.table_factory.reset(NewPlainTableFactory());
-        constructor_ = new TableConstructor(options_.comparator, true);
-        internal_comparator_.reset(
-            new InternalKeyComparator(options_.comparator));
-        break;
-      case PLAIN_TABLE_FULL_STR_PREFIX:
-        support_prev_ = false;
-        only_support_prefix_seek_ = true;
-        options_.prefix_extractor.reset(NewNoopTransform());
-        options_.allow_mmap_reads = true;
-        options_.table_factory.reset(NewPlainTableFactory());
-        constructor_ = new TableConstructor(options_.comparator, true);
-        internal_comparator_.reset(
-            new InternalKeyComparator(options_.comparator));
-        break;
-      case PLAIN_TABLE_TOTAL_ORDER:
-        support_prev_ = false;
-        only_support_prefix_seek_ = false;
-        options_.prefix_extractor = nullptr;
-        options_.allow_mmap_reads = true;
-        options_.table_factory.reset(NewTotalOrderPlainTableFactory());
-        constructor_ = new TableConstructor(options_.comparator, true);
-        internal_comparator_.reset(
-            new InternalKeyComparator(options_.comparator));
-        break;
-      case BLOCK_TEST:
-        constructor_ = new BlockConstructor(options_.comparator);
-        break;
-      case MEMTABLE_TEST:
-        constructor_ = new MemTableConstructor(options_.comparator);
-        break;
-      case DB_TEST:
-        constructor_ = new DBConstructor(options_.comparator);
-        break;
-    }
-  }
-
-  ~Harness() {
-    delete constructor_;
-  }
-
-  void Add(const std::string& key, const std::string& value) {
-    constructor_->Add(key, value);
-  }
-
-  void Test(Random* rnd) {
-    std::vector<std::string> keys;
-    KVMap data;
-    constructor_->Finish(options_, *internal_comparator_, &keys, &data);
-
-    TestForwardScan(keys, data);
-    if (support_prev_) {
-      TestBackwardScan(keys, data);
-    }
-    TestRandomAccess(rnd, keys, data);
-  }
-
-  void TestForwardScan(const std::vector<std::string>& keys,
-                       const KVMap& data) {
-    Iterator* iter = constructor_->NewIterator();
-    ASSERT_TRUE(!iter->Valid());
-    iter->SeekToFirst();
-    for (KVMap::const_iterator model_iter = data.begin();
-         model_iter != data.end();
-         ++model_iter) {
-      ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-      iter->Next();
-    }
-    ASSERT_TRUE(!iter->Valid());
-    delete iter;
-  }
-
-  void TestBackwardScan(const std::vector<std::string>& keys,
-                        const KVMap& data) {
-    Iterator* iter = constructor_->NewIterator();
-    ASSERT_TRUE(!iter->Valid());
-    iter->SeekToLast();
-    for (KVMap::const_reverse_iterator model_iter = data.rbegin();
-         model_iter != data.rend();
-         ++model_iter) {
-      ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-      iter->Prev();
-    }
-    ASSERT_TRUE(!iter->Valid());
-    delete iter;
-  }
-
-  void TestRandomAccess(Random* rnd,
-                        const std::vector<std::string>& keys,
-                        const KVMap& data) {
-    static const bool kVerbose = false;
-    Iterator* iter = constructor_->NewIterator();
-    ASSERT_TRUE(!iter->Valid());
-    KVMap::const_iterator model_iter = data.begin();
-    if (kVerbose) fprintf(stderr, "---\n");
-    for (int i = 0; i < 200; i++) {
-      const int toss = rnd->Uniform(support_prev_ ? 5 : 3);
-      switch (toss) {
-        case 0: {
-          if (iter->Valid()) {
-            if (kVerbose) fprintf(stderr, "Next\n");
-            iter->Next();
-            ++model_iter;
-            ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-          }
-          break;
-        }
-
-        case 1: {
-          if (kVerbose) fprintf(stderr, "SeekToFirst\n");
-          iter->SeekToFirst();
-          model_iter = data.begin();
-          ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-          break;
-        }
-
-        case 2: {
-          std::string key = PickRandomKey(rnd, keys);
-          model_iter = data.lower_bound(key);
-          if (kVerbose) fprintf(stderr, "Seek '%s'\n",
-                                EscapeString(key).c_str());
-          iter->Seek(Slice(key));
-          ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-          break;
-        }
-
-        case 3: {
-          if (iter->Valid()) {
-            if (kVerbose) fprintf(stderr, "Prev\n");
-            iter->Prev();
-            if (model_iter == data.begin()) {
-              model_iter = data.end();   // Wrap around to invalid value
-            } else {
-              --model_iter;
-            }
-            ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-          }
-          break;
-        }
-
-        case 4: {
-          if (kVerbose) fprintf(stderr, "SeekToLast\n");
-          iter->SeekToLast();
-          if (keys.empty()) {
-            model_iter = data.end();
-          } else {
-            std::string last = data.rbegin()->first;
-            model_iter = data.lower_bound(last);
-          }
-          ASSERT_EQ(ToString(data, model_iter), ToString(iter));
-          break;
-        }
-      }
-    }
-    delete iter;
-  }
-
-  std::string ToString(const KVMap& data, const KVMap::const_iterator& it) {
-    if (it == data.end()) {
-      return "END";
-    } else {
-      return "'" + it->first + "->" + it->second + "'";
-    }
-  }
-
-  std::string ToString(const KVMap& data,
-                       const KVMap::const_reverse_iterator& it) {
-    if (it == data.rend()) {
-      return "END";
-    } else {
-      return "'" + it->first + "->" + it->second + "'";
-    }
-  }
-
-  std::string ToString(const Iterator* it) {
-    if (!it->Valid()) {
-      return "END";
-    } else {
-      return "'" + it->key().ToString() + "->" + it->value().ToString() + "'";
-    }
-  }
-
-  std::string PickRandomKey(Random* rnd, const std::vector<std::string>& keys) {
-    if (keys.empty()) {
-      return "foo";
-    } else {
-      const int index = rnd->Uniform(keys.size());
-      std::string result = keys[index];
-      switch (rnd->Uniform(support_prev_ ? 3 : 1)) {
-        case 0:
-          // Return an existing key
-          break;
-        case 1: {
-          // Attempt to return something smaller than an existing key
-          if (result.size() > 0 && result[result.size() - 1] > '\0'
-              && (!only_support_prefix_seek_
-                  || options_.prefix_extractor->Transform(result).size()
-                  < result.size())) {
-            result[result.size() - 1]--;
-          }
-          break;
-      }
-        case 2: {
-          // Return something larger than an existing key
-          Increment(options_.comparator, &result);
-          break;
-        }
-      }
-      return result;
-    }
-  }
-
-  // Returns nullptr if not running against a DB
-  DB* db() const { return constructor_->db(); }
-
- private:
-  Options options_ = Options();
-  Constructor* constructor_;
-  bool support_prev_;
-  bool only_support_prefix_seek_;
-  shared_ptr<InternalKeyComparator> internal_comparator_;
-};
-
-static bool Between(uint64_t val, uint64_t low, uint64_t high) {
-  bool result = (val >= low) && (val <= high);
-  if (!result) {
-    fprintf(stderr, "Value %llu is not in range [%llu, %llu]\n",
-            (unsigned long long)(val),
-            (unsigned long long)(low),
-            (unsigned long long)(high));
-  }
-  return result;
-}
-
-// Tests against all kinds of tables
-class TableTest {
- public:
-  const InternalKeyComparator& GetPlainInternalComparator(
-      const Comparator* comp) {
-    if (!plain_internal_comparator) {
-      plain_internal_comparator.reset(
-          new test::PlainInternalKeyComparator(comp));
-    }
-    return *plain_internal_comparator;
-  }
-
- private:
-  std::unique_ptr<InternalKeyComparator> plain_internal_comparator;
-};
-
-class GeneralTableTest : public TableTest {};
-class BlockBasedTableTest : public TableTest {};
-class PlainTableTest : public TableTest {};
-class TablePropertyTest {};
-
-// This test serves as the living tutorial for the prefix scan of user collected
-// properties.
-TEST(TablePropertyTest, PrefixScanTest) {
-  UserCollectedProperties props{{"num.111.1", "1"},
-                                {"num.111.2", "2"},
-                                {"num.111.3", "3"},
-                                {"num.333.1", "1"},
-                                {"num.333.2", "2"},
-                                {"num.333.3", "3"},
-                                {"num.555.1", "1"},
-                                {"num.555.2", "2"},
-                                {"num.555.3", "3"}, };
-
-  // prefixes that exist
-  for (const std::string& prefix : {"num.111", "num.333", "num.555"}) {
-    int num = 0;
-    for (auto pos = props.lower_bound(prefix);
-         pos != props.end() &&
-             pos->first.compare(0, prefix.size(), prefix) == 0;
-         ++pos) {
-      ++num;
-      auto key = prefix + "." + std::to_string(num);
-      ASSERT_EQ(key, pos->first);
-      ASSERT_EQ(std::to_string(num), pos->second);
-    }
-    ASSERT_EQ(3, num);
-  }
-
-  // prefixes that don't exist
-  for (const std::string& prefix :
-       {"num.000", "num.222", "num.444", "num.666"}) {
-    auto pos = props.lower_bound(prefix);
-    ASSERT_TRUE(pos == props.end() ||
-                pos->first.compare(0, prefix.size(), prefix) != 0);
-  }
-}
-
-// This test include all the basic checks except those for index size and block
-// size, which will be conducted in separated unit tests.
-TEST(BlockBasedTableTest, BasicBlockBasedTableProperties) {
-  TableConstructor c(BytewiseComparator());
-
-  c.Add("a1", "val1");
-  c.Add("b2", "val2");
-  c.Add("c3", "val3");
-  c.Add("d4", "val4");
-  c.Add("e5", "val5");
-  c.Add("f6", "val6");
-  c.Add("g7", "val7");
-  c.Add("h8", "val8");
-  c.Add("j9", "val9");
-
-  std::vector<std::string> keys;
-  KVMap kvmap;
-  Options options;
-  options.compression = kNoCompression;
-  options.block_restart_interval = 1;
-
-  c.Finish(options, GetPlainInternalComparator(options.comparator), &keys,
-           &kvmap);
-
-  auto& props = *c.table_reader()->GetTableProperties();
-  ASSERT_EQ(kvmap.size(), props.num_entries);
-
-  auto raw_key_size = kvmap.size() * 2ul;
-  auto raw_value_size = kvmap.size() * 4ul;
-
-  ASSERT_EQ(raw_key_size, props.raw_key_size);
-  ASSERT_EQ(raw_value_size, props.raw_value_size);
-  ASSERT_EQ(1ul, props.num_data_blocks);
-  ASSERT_EQ("", props.filter_policy_name);  // no filter policy is used
-
-  // Verify data size.
-  BlockBuilder block_builder(options, options.comparator);
-  for (const auto& item : kvmap) {
-    block_builder.Add(item.first, item.second);
-  }
-  Slice content = block_builder.Finish();
-  ASSERT_EQ(content.size() + kBlockTrailerSize, props.data_size);
-}
-
-TEST(BlockBasedTableTest, FilterPolicyNameProperties) {
-  TableConstructor c(BytewiseComparator());
-  c.Add("a1", "val1");
-  std::vector<std::string> keys;
-  KVMap kvmap;
-  Options options;
-  std::unique_ptr<const FilterPolicy> filter_policy(NewBloomFilterPolicy(10));
-  options.filter_policy = filter_policy.get();
-
-  c.Finish(options, GetPlainInternalComparator(options.comparator), &keys,
-           &kvmap);
-  auto& props = *c.table_reader()->GetTableProperties();
-  ASSERT_EQ("rocksdb.BuiltinBloomFilter", props.filter_policy_name);
-}
-
-static std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-
-void AddInternalKey(TableConstructor* c, const std::string prefix,
-                    int suffix_len = 800) {
-  static Random rnd(1023);
-  InternalKey k(prefix + RandomString(&rnd, 800), 0, kTypeValue);
-  c->Add(k.Encode().ToString(), "v");
-}
-
-TEST(TableTest, HashIndexTest) {
-  TableConstructor c(BytewiseComparator());
-
-  // keys with prefix length 3, make sure the key/value is big enough to fill
-  // one block
-  AddInternalKey(&c, "0015");
-  AddInternalKey(&c, "0035");
-
-  AddInternalKey(&c, "0054");
-  AddInternalKey(&c, "0055");
-
-  AddInternalKey(&c, "0056");
-  AddInternalKey(&c, "0057");
-
-  AddInternalKey(&c, "0058");
-  AddInternalKey(&c, "0075");
-
-  AddInternalKey(&c, "0076");
-  AddInternalKey(&c, "0095");
-
-  std::vector<std::string> keys;
-  KVMap kvmap;
-  Options options;
-  BlockBasedTableOptions table_options;
-  table_options.index_type = BlockBasedTableOptions::kHashSearch;
-  options.table_factory.reset(new BlockBasedTableFactory(table_options));
-
-  options.prefix_extractor.reset(NewFixedPrefixTransform(3));
-  options.block_cache = NewLRUCache(1024);
-  options.block_size = 1700;
-
-  std::unique_ptr<InternalKeyComparator> comparator(
-      new InternalKeyComparator(BytewiseComparator()));
-  c.Finish(options, *comparator, &keys, &kvmap);
-  auto reader = c.table_reader();
-
-  auto props = c.table_reader()->GetTableProperties();
-  ASSERT_EQ(5u, props->num_data_blocks);
-
-  std::unique_ptr<Iterator> hash_iter(reader->NewIterator(ReadOptions()));
-
-  // -- Find keys do not exist, but have common prefix.
-  std::vector<std::string> prefixes = {"001", "003", "005", "007", "009"};
-  std::vector<std::string> lower_bound = {keys[0], keys[1], keys[2],
-                                          keys[7], keys[9], };
-
-  // find the lower bound of the prefix
-  for (size_t i = 0; i < prefixes.size(); ++i) {
-    hash_iter->Seek(InternalKey(prefixes[i], 0, kTypeValue).Encode());
-    ASSERT_OK(hash_iter->status());
-    ASSERT_TRUE(hash_iter->Valid());
-
-    // seek the first element in the block
-    ASSERT_EQ(lower_bound[i], hash_iter->key().ToString());
-    ASSERT_EQ("v", hash_iter->value().ToString());
-  }
-
-  // find the upper bound of prefixes
-  std::vector<std::string> upper_bound = {keys[1], keys[2], keys[7], keys[9], };
-
-  // find existing keys
-  for (const auto& item : kvmap) {
-    auto ukey = ExtractUserKey(item.first).ToString();
-    hash_iter->Seek(ukey);
-
-    // ASSERT_OK(regular_iter->status());
-    ASSERT_OK(hash_iter->status());
-
-    // ASSERT_TRUE(regular_iter->Valid());
-    ASSERT_TRUE(hash_iter->Valid());
-
-    ASSERT_EQ(item.first, hash_iter->key().ToString());
-    ASSERT_EQ(item.second, hash_iter->value().ToString());
-  }
-
-  for (size_t i = 0; i < prefixes.size(); ++i) {
-    // the key is greater than any existing keys.
-    auto key = prefixes[i] + "9";
-    hash_iter->Seek(InternalKey(key, 0, kTypeValue).Encode());
-
-    ASSERT_OK(hash_iter->status());
-    if (i == prefixes.size() - 1) {
-      // last key
-      ASSERT_TRUE(!hash_iter->Valid());
-    } else {
-      ASSERT_TRUE(hash_iter->Valid());
-      // seek the first element in the block
-      ASSERT_EQ(upper_bound[i], hash_iter->key().ToString());
-      ASSERT_EQ("v", hash_iter->value().ToString());
-    }
-  }
-
-  // find keys with prefix that don't match any of the existing prefixes.
-  std::vector<std::string> non_exist_prefixes = {"002", "004", "006", "008"};
-  for (const auto& prefix : non_exist_prefixes) {
-    hash_iter->Seek(InternalKey(prefix, 0, kTypeValue).Encode());
-    // regular_iter->Seek(prefix);
-
-    ASSERT_OK(hash_iter->status());
-    ASSERT_TRUE(!hash_iter->Valid());
-  }
-}
-
-// It's very hard to figure out the index block size of a block accurately.
-// To make sure we get the index size, we just make sure as key number
-// grows, the filter block size also grows.
-TEST(BlockBasedTableTest, IndexSizeStat) {
-  uint64_t last_index_size = 0;
-
-  // we need to use random keys since the pure human readable texts
-  // may be well compressed, resulting insignifcant change of index
-  // block size.
-  Random rnd(test::RandomSeed());
-  std::vector<std::string> keys;
-
-  for (int i = 0; i < 100; ++i) {
-    keys.push_back(RandomString(&rnd, 10000));
-  }
-
-  // Each time we load one more key to the table. the table index block
-  // size is expected to be larger than last time's.
-  for (size_t i = 1; i < keys.size(); ++i) {
-    TableConstructor c(BytewiseComparator());
-    for (size_t j = 0; j < i; ++j) {
-      c.Add(keys[j], "val");
-    }
-
-    std::vector<std::string> ks;
-    KVMap kvmap;
-    Options options;
-    options.compression = kNoCompression;
-    options.block_restart_interval = 1;
-
-    c.Finish(options, GetPlainInternalComparator(options.comparator), &ks,
-             &kvmap);
-    auto index_size = c.table_reader()->GetTableProperties()->index_size;
-    ASSERT_GT(index_size, last_index_size);
-    last_index_size = index_size;
-  }
-}
-
-TEST(BlockBasedTableTest, NumBlockStat) {
-  Random rnd(test::RandomSeed());
-  TableConstructor c(BytewiseComparator());
-  Options options;
-  options.compression = kNoCompression;
-  options.block_restart_interval = 1;
-  options.block_size = 1000;
-
-  for (int i = 0; i < 10; ++i) {
-    // the key/val are slightly smaller than block size, so that each block
-    // holds roughly one key/value pair.
-    c.Add(RandomString(&rnd, 900), "val");
-  }
-
-  std::vector<std::string> ks;
-  KVMap kvmap;
-  c.Finish(options, GetPlainInternalComparator(options.comparator), &ks,
-           &kvmap);
-  ASSERT_EQ(kvmap.size(),
-            c.table_reader()->GetTableProperties()->num_data_blocks);
-}
-
-// A simple tool that takes the snapshot of block cache statistics.
-class BlockCachePropertiesSnapshot {
- public:
-  explicit BlockCachePropertiesSnapshot(Statistics* statistics) {
-    block_cache_miss = statistics->getTickerCount(BLOCK_CACHE_MISS);
-    block_cache_hit = statistics->getTickerCount(BLOCK_CACHE_HIT);
-    index_block_cache_miss = statistics->getTickerCount(BLOCK_CACHE_INDEX_MISS);
-    index_block_cache_hit = statistics->getTickerCount(BLOCK_CACHE_INDEX_HIT);
-    data_block_cache_miss = statistics->getTickerCount(BLOCK_CACHE_DATA_MISS);
-    data_block_cache_hit = statistics->getTickerCount(BLOCK_CACHE_DATA_HIT);
-    filter_block_cache_miss =
-        statistics->getTickerCount(BLOCK_CACHE_FILTER_MISS);
-    filter_block_cache_hit = statistics->getTickerCount(BLOCK_CACHE_FILTER_HIT);
-  }
-
-  void AssertIndexBlockStat(int64_t index_block_cache_miss,
-                            int64_t index_block_cache_hit) {
-    ASSERT_EQ(index_block_cache_miss, this->index_block_cache_miss);
-    ASSERT_EQ(index_block_cache_hit, this->index_block_cache_hit);
-  }
-
-  void AssertFilterBlockStat(int64_t filter_block_cache_miss,
-                             int64_t filter_block_cache_hit) {
-    ASSERT_EQ(filter_block_cache_miss, this->filter_block_cache_miss);
-    ASSERT_EQ(filter_block_cache_hit, this->filter_block_cache_hit);
-  }
-
-  // Check if the fetched props matches the expected ones.
-  // TODO(kailiu) Use this only when you disabled filter policy!
-  void AssertEqual(int64_t index_block_cache_miss,
-                   int64_t index_block_cache_hit, int64_t data_block_cache_miss,
-                   int64_t data_block_cache_hit) const {
-    ASSERT_EQ(index_block_cache_miss, this->index_block_cache_miss);
-    ASSERT_EQ(index_block_cache_hit, this->index_block_cache_hit);
-    ASSERT_EQ(data_block_cache_miss, this->data_block_cache_miss);
-    ASSERT_EQ(data_block_cache_hit, this->data_block_cache_hit);
-    ASSERT_EQ(index_block_cache_miss + data_block_cache_miss,
-              this->block_cache_miss);
-    ASSERT_EQ(index_block_cache_hit + data_block_cache_hit,
-              this->block_cache_hit);
-  }
-
- private:
-  int64_t block_cache_miss = 0;
-  int64_t block_cache_hit = 0;
-  int64_t index_block_cache_miss = 0;
-  int64_t index_block_cache_hit = 0;
-  int64_t data_block_cache_miss = 0;
-  int64_t data_block_cache_hit = 0;
-  int64_t filter_block_cache_miss = 0;
-  int64_t filter_block_cache_hit = 0;
-};
-
-// Make sure, by default, index/filter blocks were pre-loaded (meaning we won't
-// use block cache to store them).
-TEST(BlockBasedTableTest, BlockCacheDisabledTest) {
-  Options options;
-  options.create_if_missing = true;
-  options.statistics = CreateDBStatistics();
-  options.block_cache = NewLRUCache(1024);
-  std::unique_ptr<const FilterPolicy> filter_policy(NewBloomFilterPolicy(10));
-  options.filter_policy = filter_policy.get();
-  BlockBasedTableOptions table_options;
-  // Intentionally commented out: table_options.cache_index_and_filter_blocks =
-  // true;
-  options.table_factory.reset(new BlockBasedTableFactory(table_options));
-  std::vector<std::string> keys;
-  KVMap kvmap;
-
-  TableConstructor c(BytewiseComparator());
-  c.Add("key", "value");
-  c.Finish(options, GetPlainInternalComparator(options.comparator), &keys,
-           &kvmap);
-
-  // preloading filter/index blocks is enabled.
-  auto reader = dynamic_cast<BlockBasedTable*>(c.table_reader());
-  ASSERT_TRUE(reader->TEST_filter_block_preloaded());
-  ASSERT_TRUE(reader->TEST_index_reader_preloaded());
-
-  {
-    // nothing happens in the beginning
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertIndexBlockStat(0, 0);
-    props.AssertFilterBlockStat(0, 0);
-  }
-
-  {
-    // a hack that just to trigger BlockBasedTable::GetFilter.
-    reader->Get(ReadOptions(), "non-exist-key", nullptr, nullptr, nullptr);
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertIndexBlockStat(0, 0);
-    props.AssertFilterBlockStat(0, 0);
-  }
-}
-
-// Due to the difficulities of the intersaction between statistics, this test
-// only tests the case when "index block is put to block cache"
-TEST(BlockBasedTableTest, FilterBlockInBlockCache) {
-  // -- Table construction
-  Options options;
-  options.create_if_missing = true;
-  options.statistics = CreateDBStatistics();
-  options.block_cache = NewLRUCache(1024);
-
-  // Enable the cache for index/filter blocks
-  BlockBasedTableOptions table_options;
-  table_options.cache_index_and_filter_blocks = true;
-  options.table_factory.reset(new BlockBasedTableFactory(table_options));
-  std::vector<std::string> keys;
-  KVMap kvmap;
-
-  TableConstructor c(BytewiseComparator());
-  c.Add("key", "value");
-  c.Finish(options, GetPlainInternalComparator(options.comparator), &keys,
-           &kvmap);
-  // preloading filter/index blocks is prohibited.
-  auto reader = dynamic_cast<BlockBasedTable*>(c.table_reader());
-  ASSERT_TRUE(!reader->TEST_filter_block_preloaded());
-  ASSERT_TRUE(!reader->TEST_index_reader_preloaded());
-
-  // -- PART 1: Open with regular block cache.
-  // Since block_cache is disabled, no cache activities will be involved.
-  unique_ptr<Iterator> iter;
-
-  // At first, no block will be accessed.
-  {
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    // index will be added to block cache.
-    props.AssertEqual(1,  // index block miss
-                      0, 0, 0);
-  }
-
-  // Only index block will be accessed
-  {
-    iter.reset(c.NewIterator());
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    // NOTE: to help better highlight the "detla" of each ticker, I use
-    // <last_value> + <added_value> to indicate the increment of changed
-    // value; other numbers remain the same.
-    props.AssertEqual(1, 0 + 1,  // index block hit
-                      0, 0);
-  }
-
-  // Only data block will be accessed
-  {
-    iter->SeekToFirst();
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertEqual(1, 1, 0 + 1,  // data block miss
-                      0);
-  }
-
-  // Data block will be in cache
-  {
-    iter.reset(c.NewIterator());
-    iter->SeekToFirst();
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertEqual(1, 1 + 1, /* index block hit */
-                      1, 0 + 1 /* data block hit */);
-  }
-  // release the iterator so that the block cache can reset correctly.
-  iter.reset();
-
-  // -- PART 2: Open without block cache
-  options.block_cache.reset();
-  options.statistics = CreateDBStatistics();  // reset the stats
-  c.Reopen(options);
-
-  {
-    iter.reset(c.NewIterator());
-    iter->SeekToFirst();
-    ASSERT_EQ("key", iter->key().ToString());
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    // Nothing is affected at all
-    props.AssertEqual(0, 0, 0, 0);
-  }
-
-  // -- PART 3: Open with very small block cache
-  // In this test, no block will ever get hit since the block cache is
-  // too small to fit even one entry.
-  options.block_cache = NewLRUCache(1);
-  c.Reopen(options);
-  {
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertEqual(1,  // index block miss
-                      0, 0, 0);
-  }
-
-
-  {
-    // Both index and data block get accessed.
-    // It first cache index block then data block. But since the cache size
-    // is only 1, index block will be purged after data block is inserted.
-    iter.reset(c.NewIterator());
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertEqual(1 + 1,  // index block miss
-                      0, 0,   // data block miss
-                      0);
-  }
-
-  {
-    // SeekToFirst() accesses data block. With similar reason, we expect data
-    // block's cache miss.
-    iter->SeekToFirst();
-    BlockCachePropertiesSnapshot props(options.statistics.get());
-    props.AssertEqual(2, 0, 0 + 1,  // data block miss
-                      0);
-  }
-}
-
-TEST(BlockBasedTableTest, BlockCacheLeak) {
-  // Check that when we reopen a table we don't lose access to blocks already
-  // in the cache. This test checks whether the Table actually makes use of the
-  // unique ID from the file.
-
-  Options opt;
-  unique_ptr<InternalKeyComparator> ikc;
-  ikc.reset(new test::PlainInternalKeyComparator(opt.comparator));
-  opt.block_size = 1024;
-  opt.compression = kNoCompression;
-  opt.block_cache =
-      NewLRUCache(16 * 1024 * 1024);  // big enough so we don't ever
-                                      // lose cached values.
-
-  TableConstructor c(BytewiseComparator());
-  c.Add("k01", "hello");
-  c.Add("k02", "hello2");
-  c.Add("k03", std::string(10000, 'x'));
-  c.Add("k04", std::string(200000, 'x'));
-  c.Add("k05", std::string(300000, 'x'));
-  c.Add("k06", "hello3");
-  c.Add("k07", std::string(100000, 'x'));
-  std::vector<std::string> keys;
-  KVMap kvmap;
-  c.Finish(opt, *ikc, &keys, &kvmap);
-
-  unique_ptr<Iterator> iter(c.NewIterator());
-  iter->SeekToFirst();
-  while (iter->Valid()) {
-    iter->key();
-    iter->value();
-    iter->Next();
-  }
-  ASSERT_OK(iter->status());
-
-  ASSERT_OK(c.Reopen(opt));
-  auto table_reader = dynamic_cast<BlockBasedTable*>(c.table_reader());
-  for (const std::string& key : keys) {
-    ASSERT_TRUE(table_reader->TEST_KeyInCache(ReadOptions(), key));
-  }
-}
-
-TEST(PlainTableTest, BasicPlainTableProperties) {
-  PlainTableFactory factory(8, 8, 0);
-  StringSink sink;
-  Options options;
-  InternalKeyComparator ikc(options.comparator);
-  std::unique_ptr<TableBuilder> builder(
-      factory.NewTableBuilder(options, ikc, &sink, kNoCompression));
-
-  for (char c = 'a'; c <= 'z'; ++c) {
-    std::string key(8, c);
-    key.append("\1       ");  // PlainTable expects internal key structure
-    std::string value(28, c + 42);
-    builder->Add(key, value);
-  }
-  ASSERT_OK(builder->Finish());
-
-  StringSource source(sink.contents(), 72242, true);
-
-  TableProperties* props = nullptr;
-  auto s = ReadTableProperties(&source, sink.contents().size(),
-                               kPlainTableMagicNumber, Env::Default(), nullptr,
-                               &props);
-  std::unique_ptr<TableProperties> props_guard(props);
-  ASSERT_OK(s);
-
-  ASSERT_EQ(0ul, props->index_size);
-  ASSERT_EQ(0ul, props->filter_size);
-  ASSERT_EQ(16ul * 26, props->raw_key_size);
-  ASSERT_EQ(28ul * 26, props->raw_value_size);
-  ASSERT_EQ(26ul, props->num_entries);
-  ASSERT_EQ(1ul, props->num_data_blocks);
-}
-
-TEST(GeneralTableTest, ApproximateOffsetOfPlain) {
-  TableConstructor c(BytewiseComparator());
-  c.Add("k01", "hello");
-  c.Add("k02", "hello2");
-  c.Add("k03", std::string(10000, 'x'));
-  c.Add("k04", std::string(200000, 'x'));
-  c.Add("k05", std::string(300000, 'x'));
-  c.Add("k06", "hello3");
-  c.Add("k07", std::string(100000, 'x'));
-  std::vector<std::string> keys;
-  KVMap kvmap;
-  Options options;
-  test::PlainInternalKeyComparator internal_comparator(options.comparator);
-  options.block_size = 1024;
-  options.compression = kNoCompression;
-  c.Finish(options, internal_comparator, &keys, &kvmap);
-
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01a"),      0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"),   10000,  11000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04a"), 210000, 211000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k05"),  210000, 211000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k06"),  510000, 511000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k07"),  510000, 511000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"),  610000, 612000));
-}
-
-static void DoCompressionTest(CompressionType comp) {
-  Random rnd(301);
-  TableConstructor c(BytewiseComparator());
-  std::string tmp;
-  c.Add("k01", "hello");
-  c.Add("k02", test::CompressibleString(&rnd, 0.25, 10000, &tmp));
-  c.Add("k03", "hello3");
-  c.Add("k04", test::CompressibleString(&rnd, 0.25, 10000, &tmp));
-  std::vector<std::string> keys;
-  KVMap kvmap;
-  Options options;
-  test::PlainInternalKeyComparator ikc(options.comparator);
-  options.block_size = 1024;
-  options.compression = comp;
-  c.Finish(options, ikc, &keys, &kvmap);
-
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"),       0,      0));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"),    2000,   3000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"),    2000,   3000));
-  ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"),    4000,   6100));
-}
-
-TEST(GeneralTableTest, ApproximateOffsetOfCompressed) {
-  std::vector<CompressionType> compression_state;
-  if (!SnappyCompressionSupported()) {
-    fprintf(stderr, "skipping snappy compression tests\n");
-  } else {
-    compression_state.push_back(kSnappyCompression);
-  }
-
-  if (!ZlibCompressionSupported()) {
-    fprintf(stderr, "skipping zlib compression tests\n");
-  } else {
-    compression_state.push_back(kZlibCompression);
-  }
-
-  // TODO(kailiu) DoCompressionTest() doesn't work with BZip2.
-  /*
-  if (!BZip2CompressionSupported()) {
-    fprintf(stderr, "skipping bzip2 compression tests\n");
-  } else {
-    compression_state.push_back(kBZip2Compression);
-  }
-  */
-
-  if (!LZ4CompressionSupported()) {
-    fprintf(stderr, "skipping lz4 compression tests\n");
-  } else {
-    compression_state.push_back(kLZ4Compression);
-  }
-
-  if (!LZ4HCCompressionSupported()) {
-    fprintf(stderr, "skipping lz4hc compression tests\n");
-  } else {
-    compression_state.push_back(kLZ4HCCompression);
-  }
-
-  for (auto state : compression_state) {
-    DoCompressionTest(state);
-  }
-}
-
-TEST(Harness, Randomized) {
-  std::vector<TestArgs> args = GenerateArgList();
-  for (unsigned int i = 0; i < args.size(); i++) {
-    Init(args[i]);
-    Random rnd(test::RandomSeed() + 5);
-    for (int num_entries = 0; num_entries < 2000;
-         num_entries += (num_entries < 50 ? 1 : 200)) {
-      if ((num_entries % 10) == 0) {
-        fprintf(stderr, "case %d of %d: num_entries = %d\n", (i + 1),
-                static_cast<int>(args.size()), num_entries);
-      }
-      for (int e = 0; e < num_entries; e++) {
-        std::string v;
-        Add(test::RandomKey(&rnd, rnd.Skewed(4)),
-            test::RandomString(&rnd, rnd.Skewed(5), &v).ToString());
-      }
-      Test(&rnd);
-    }
-  }
-}
-
-TEST(Harness, RandomizedLongDB) {
-  Random rnd(test::RandomSeed());
-  TestArgs args = { DB_TEST, false, 16, kNoCompression };
-  Init(args);
-  int num_entries = 100000;
-  for (int e = 0; e < num_entries; e++) {
-    std::string v;
-    Add(test::RandomKey(&rnd, rnd.Skewed(4)),
-        test::RandomString(&rnd, rnd.Skewed(5), &v).ToString());
-  }
-  Test(&rnd);
-
-  // We must have created enough data to force merging
-  int files = 0;
-  for (int level = 0; level < db()->NumberLevels(); level++) {
-    std::string value;
-    char name[100];
-    snprintf(name, sizeof(name), "rocksdb.num-files-at-level%d", level);
-    ASSERT_TRUE(db()->GetProperty(name, &value));
-    files += atoi(value.c_str());
-  }
-  ASSERT_GT(files, 0);
-}
-
-class MemTableTest { };
-
-TEST(MemTableTest, Simple) {
-  InternalKeyComparator cmp(BytewiseComparator());
-  auto table_factory = std::make_shared<SkipListFactory>();
-  Options options;
-  options.memtable_factory = table_factory;
-  MemTable* memtable = new MemTable(cmp, options);
-  memtable->Ref();
-  WriteBatch batch;
-  WriteBatchInternal::SetSequence(&batch, 100);
-  batch.Put(std::string("k1"), std::string("v1"));
-  batch.Put(std::string("k2"), std::string("v2"));
-  batch.Put(std::string("k3"), std::string("v3"));
-  batch.Put(std::string("largekey"), std::string("vlarge"));
-  ColumnFamilyMemTablesDefault cf_mems_default(memtable, &options);
-  ASSERT_TRUE(WriteBatchInternal::InsertInto(&batch, &cf_mems_default).ok());
-
-  Iterator* iter = memtable->NewIterator(ReadOptions());
-  iter->SeekToFirst();
-  while (iter->Valid()) {
-    fprintf(stderr, "key: '%s' -> '%s'\n",
-            iter->key().ToString().c_str(),
-            iter->value().ToString().c_str());
-    iter->Next();
-  }
-
-  delete iter;
-  delete memtable->Unref();
-}
-
-// Test the empty key
-TEST(Harness, SimpleEmptyKey) {
-  auto args = GenerateArgList();
-  for (const auto& arg : args) {
-    Init(arg);
-    Random rnd(test::RandomSeed() + 1);
-    Add("", "v");
-    Test(&rnd);
-  }
-}
-
-TEST(Harness, SimpleSingle) {
-  auto args = GenerateArgList();
-  for (const auto& arg : args) {
-    Init(arg);
-    Random rnd(test::RandomSeed() + 2);
-    Add("abc", "v");
-    Test(&rnd);
-  }
-}
-
-TEST(Harness, SimpleMulti) {
-  auto args = GenerateArgList();
-  for (const auto& arg : args) {
-    Init(arg);
-    Random rnd(test::RandomSeed() + 3);
-    Add("abc", "v");
-    Add("abcd", "v");
-    Add("ac", "v2");
-    Test(&rnd);
-  }
-}
-
-TEST(Harness, SimpleSpecialKey) {
-  auto args = GenerateArgList();
-  for (const auto& arg : args) {
-    Init(arg);
-    Random rnd(test::RandomSeed() + 4);
-    Add("\xff\xff", "v3");
-    Test(&rnd);
-  }
-}
-
-TEST(Harness, FooterTests) {
-  {
-    // upconvert legacy block based
-    std::string encoded;
-    Footer footer(kLegacyBlockBasedTableMagicNumber);
-    BlockHandle meta_index(10, 5), index(20, 15);
-    footer.set_metaindex_handle(meta_index);
-    footer.set_index_handle(index);
-    footer.EncodeTo(&encoded);
-    Footer decoded_footer;
-    Slice encoded_slice(encoded);
-    decoded_footer.DecodeFrom(&encoded_slice);
-    ASSERT_EQ(decoded_footer.table_magic_number(), kBlockBasedTableMagicNumber);
-    ASSERT_EQ(decoded_footer.checksum(), kCRC32c);
-    ASSERT_EQ(decoded_footer.metaindex_handle().offset(), meta_index.offset());
-    ASSERT_EQ(decoded_footer.metaindex_handle().size(), meta_index.size());
-    ASSERT_EQ(decoded_footer.index_handle().offset(), index.offset());
-    ASSERT_EQ(decoded_footer.index_handle().size(), index.size());
-  }
-  {
-    // xxhash block based
-    std::string encoded;
-    Footer footer(kBlockBasedTableMagicNumber);
-    BlockHandle meta_index(10, 5), index(20, 15);
-    footer.set_metaindex_handle(meta_index);
-    footer.set_index_handle(index);
-    footer.set_checksum(kxxHash);
-    footer.EncodeTo(&encoded);
-    Footer decoded_footer;
-    Slice encoded_slice(encoded);
-    decoded_footer.DecodeFrom(&encoded_slice);
-    ASSERT_EQ(decoded_footer.table_magic_number(), kBlockBasedTableMagicNumber);
-    ASSERT_EQ(decoded_footer.checksum(), kxxHash);
-    ASSERT_EQ(decoded_footer.metaindex_handle().offset(), meta_index.offset());
-    ASSERT_EQ(decoded_footer.metaindex_handle().size(), meta_index.size());
-    ASSERT_EQ(decoded_footer.index_handle().offset(), index.offset());
-    ASSERT_EQ(decoded_footer.index_handle().size(), index.size());
-  }
-  {
-    // upconvert legacy plain table
-    std::string encoded;
-    Footer footer(kLegacyPlainTableMagicNumber);
-    BlockHandle meta_index(10, 5), index(20, 15);
-    footer.set_metaindex_handle(meta_index);
-    footer.set_index_handle(index);
-    footer.EncodeTo(&encoded);
-    Footer decoded_footer;
-    Slice encoded_slice(encoded);
-    decoded_footer.DecodeFrom(&encoded_slice);
-    ASSERT_EQ(decoded_footer.table_magic_number(), kPlainTableMagicNumber);
-    ASSERT_EQ(decoded_footer.checksum(), kCRC32c);
-    ASSERT_EQ(decoded_footer.metaindex_handle().offset(), meta_index.offset());
-    ASSERT_EQ(decoded_footer.metaindex_handle().size(), meta_index.size());
-    ASSERT_EQ(decoded_footer.index_handle().offset(), index.offset());
-    ASSERT_EQ(decoded_footer.index_handle().size(), index.size());
-  }
-  {
-    // xxhash block based
-    std::string encoded;
-    Footer footer(kPlainTableMagicNumber);
-    BlockHandle meta_index(10, 5), index(20, 15);
-    footer.set_metaindex_handle(meta_index);
-    footer.set_index_handle(index);
-    footer.set_checksum(kxxHash);
-    footer.EncodeTo(&encoded);
-    Footer decoded_footer;
-    Slice encoded_slice(encoded);
-    decoded_footer.DecodeFrom(&encoded_slice);
-    ASSERT_EQ(decoded_footer.table_magic_number(), kPlainTableMagicNumber);
-    ASSERT_EQ(decoded_footer.checksum(), kxxHash);
-    ASSERT_EQ(decoded_footer.metaindex_handle().offset(), meta_index.offset());
-    ASSERT_EQ(decoded_footer.metaindex_handle().size(), meta_index.size());
-    ASSERT_EQ(decoded_footer.index_handle().offset(), index.offset());
-    ASSERT_EQ(decoded_footer.index_handle().size(), index.size());
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/table/two_level_iterator.cc b/src/rocksdb/table/two_level_iterator.cc
deleted file mode 100644
index 990f181..0000000
--- a/src/rocksdb/table/two_level_iterator.cc
+++ /dev/null
@@ -1,190 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "table/two_level_iterator.h"
-
-#include "rocksdb/options.h"
-#include "rocksdb/table.h"
-#include "table/block.h"
-#include "table/format.h"
-
-namespace rocksdb {
-
-namespace {
-
-class TwoLevelIterator: public Iterator {
- public:
-  explicit TwoLevelIterator(TwoLevelIteratorState* state,
-      Iterator* first_level_iter);
-
-  virtual ~TwoLevelIterator() {}
-
-  virtual void Seek(const Slice& target);
-  virtual void SeekToFirst();
-  virtual void SeekToLast();
-  virtual void Next();
-  virtual void Prev();
-
-  virtual bool Valid() const {
-    return second_level_iter_.Valid();
-  }
-  virtual Slice key() const {
-    assert(Valid());
-    return second_level_iter_.key();
-  }
-  virtual Slice value() const {
-    assert(Valid());
-    return second_level_iter_.value();
-  }
-  virtual Status status() const {
-    // It'd be nice if status() returned a const Status& instead of a Status
-    if (!first_level_iter_.status().ok()) {
-      return first_level_iter_.status();
-    } else if (second_level_iter_.iter() != nullptr &&
-               !second_level_iter_.status().ok()) {
-      return second_level_iter_.status();
-    } else {
-      return status_;
-    }
-  }
-
- private:
-  void SaveError(const Status& s) {
-    if (status_.ok() && !s.ok()) status_ = s;
-  }
-  void SkipEmptyDataBlocksForward();
-  void SkipEmptyDataBlocksBackward();
-  void SetSecondLevelIterator(Iterator* iter);
-  void InitDataBlock();
-
-  std::unique_ptr<TwoLevelIteratorState> state_;
-  IteratorWrapper first_level_iter_;
-  IteratorWrapper second_level_iter_;  // May be nullptr
-  Status status_;
-  // If second_level_iter is non-nullptr, then "data_block_handle_" holds the
-  // "index_value" passed to block_function_ to create the second_level_iter.
-  std::string data_block_handle_;
-};
-
-TwoLevelIterator::TwoLevelIterator(TwoLevelIteratorState* state,
-    Iterator* first_level_iter)
-  : state_(state), first_level_iter_(first_level_iter) {}
-
-void TwoLevelIterator::Seek(const Slice& target) {
-  if (state_->check_prefix_may_match &&
-      !state_->PrefixMayMatch(target)) {
-    SetSecondLevelIterator(nullptr);
-    return;
-  }
-  first_level_iter_.Seek(target);
-
-  InitDataBlock();
-  if (second_level_iter_.iter() != nullptr) {
-    second_level_iter_.Seek(target);
-  }
-  SkipEmptyDataBlocksForward();
-}
-
-void TwoLevelIterator::SeekToFirst() {
-  first_level_iter_.SeekToFirst();
-  InitDataBlock();
-  if (second_level_iter_.iter() != nullptr) {
-    second_level_iter_.SeekToFirst();
-  }
-  SkipEmptyDataBlocksForward();
-}
-
-void TwoLevelIterator::SeekToLast() {
-  first_level_iter_.SeekToLast();
-  InitDataBlock();
-  if (second_level_iter_.iter() != nullptr) {
-    second_level_iter_.SeekToLast();
-  }
-  SkipEmptyDataBlocksBackward();
-}
-
-void TwoLevelIterator::Next() {
-  assert(Valid());
-  second_level_iter_.Next();
-  SkipEmptyDataBlocksForward();
-}
-
-void TwoLevelIterator::Prev() {
-  assert(Valid());
-  second_level_iter_.Prev();
-  SkipEmptyDataBlocksBackward();
-}
-
-
-void TwoLevelIterator::SkipEmptyDataBlocksForward() {
-  while (second_level_iter_.iter() == nullptr ||
-         (!second_level_iter_.Valid() &&
-         !second_level_iter_.status().IsIncomplete())) {
-    // Move to next block
-    if (!first_level_iter_.Valid()) {
-      SetSecondLevelIterator(nullptr);
-      return;
-    }
-    first_level_iter_.Next();
-    InitDataBlock();
-    if (second_level_iter_.iter() != nullptr) {
-      second_level_iter_.SeekToFirst();
-    }
-  }
-}
-
-void TwoLevelIterator::SkipEmptyDataBlocksBackward() {
-  while (second_level_iter_.iter() == nullptr ||
-         (!second_level_iter_.Valid() &&
-         !second_level_iter_.status().IsIncomplete())) {
-    // Move to next block
-    if (!first_level_iter_.Valid()) {
-      SetSecondLevelIterator(nullptr);
-      return;
-    }
-    first_level_iter_.Prev();
-    InitDataBlock();
-    if (second_level_iter_.iter() != nullptr) {
-      second_level_iter_.SeekToLast();
-    }
-  }
-}
-
-void TwoLevelIterator::SetSecondLevelIterator(Iterator* iter) {
-  if (second_level_iter_.iter() != nullptr) {
-    SaveError(second_level_iter_.status());
-  }
-  second_level_iter_.Set(iter);
-}
-
-void TwoLevelIterator::InitDataBlock() {
-  if (!first_level_iter_.Valid()) {
-    SetSecondLevelIterator(nullptr);
-  } else {
-    Slice handle = first_level_iter_.value();
-    if (second_level_iter_.iter() != nullptr
-        && handle.compare(data_block_handle_) == 0) {
-      // second_level_iter is already constructed with this iterator, so
-      // no need to change anything
-    } else {
-      Iterator* iter = state_->NewSecondaryIterator(handle);
-      data_block_handle_.assign(handle.data(), handle.size());
-      SetSecondLevelIterator(iter);
-    }
-  }
-}
-
-}  // namespace
-
-Iterator* NewTwoLevelIterator(TwoLevelIteratorState* state,
-      Iterator* first_level_iter) {
-  return new TwoLevelIterator(state, first_level_iter);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/table/two_level_iterator.h b/src/rocksdb/table/two_level_iterator.h
deleted file mode 100644
index b808338..0000000
--- a/src/rocksdb/table/two_level_iterator.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "rocksdb/iterator.h"
-#include "rocksdb/env.h"
-#include "table/iterator_wrapper.h"
-
-namespace rocksdb {
-
-struct ReadOptions;
-class InternalKeyComparator;
-
-struct TwoLevelIteratorState {
-  explicit TwoLevelIteratorState(bool check_prefix_may_match)
-    : check_prefix_may_match(check_prefix_may_match) {}
-
-  virtual ~TwoLevelIteratorState() {}
-  virtual Iterator* NewSecondaryIterator(const Slice& handle) = 0;
-  virtual bool PrefixMayMatch(const Slice& internal_key) = 0;
-
-  // If call PrefixMayMatch()
-  bool check_prefix_may_match;
-};
-
-
-// Return a new two level iterator.  A two-level iterator contains an
-// index iterator whose values point to a sequence of blocks where
-// each block is itself a sequence of key,value pairs.  The returned
-// two-level iterator yields the concatenation of all key/value pairs
-// in the sequence of blocks.  Takes ownership of "index_iter" and
-// will delete it when no longer needed.
-//
-// Uses a supplied function to convert an index_iter value into
-// an iterator over the contents of the corresponding block.
-extern Iterator* NewTwoLevelIterator(TwoLevelIteratorState* state,
-      Iterator* first_level_iter);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/tools/auto_sanity_test.sh b/src/rocksdb/tools/auto_sanity_test.sh
deleted file mode 100755
index 2d63c0a..0000000
--- a/src/rocksdb/tools/auto_sanity_test.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-TMP_DIR="/tmp/rocksdb-sanity-test"
-
-if [ "$#" -lt 2 ]; then
-  echo "usage: ./auto_sanity_test.sh [new_commit] [old_commit]"
-  echo "Missing either [new_commit] or [old_commit], perform sanity check with the latest and 10th latest commits."
-  recent_commits=`git log | grep -e "^commit [a-z0-9]\+$"| head -n10 | sed -e 's/commit //g'`
-  commit_new=`echo "$recent_commits" | head -n1`
-  commit_old=`echo "$recent_commits" | tail -n1`
-  echo "the most recent commits are:"
-  echo "$recent_commits"
-else
-  commit_new=$1
-  commit_old=$2
-fi
-
-if [ ! -d $TMP_DIR ]; then
-  mkdir $TMP_DIR
-fi
-dir_new="${TMP_DIR}/${commit_new}"
-dir_old="${TMP_DIR}/${commit_old}"
-
-function makestuff() {
-  echo "make clean"
-  make clean > /dev/null
-  echo "make db_sanity_test -j32"
-  make db_sanity_test -j32 > /dev/null
-  if [ $? -ne 0 ]; then
-    echo "[ERROR] Failed to perform 'make db_sanity_test'"
-    exit 1
-  fi
-}
-
-rm -r -f $dir_new
-rm -r -f $dir_old
-
-echo "Running db sanity check with commits $commit_new and $commit_old."
-
-echo "============================================================="
-echo "Making build $commit_new"
-makestuff
-mv db_sanity_test new_db_sanity_test
-echo "Creating db based on the new commit --- $commit_new"
-./new_db_sanity_test $dir_new create
-
-echo "============================================================="
-echo "Making build $commit_old"
-makestuff
-mv db_sanity_test old_db_sanity_test
-echo "Creating db based on the old commit --- $commit_old"
-./old_db_sanity_test $dir_old create
-
-echo "============================================================="
-echo "Verifying new db $dir_new using the old commit --- $commit_old"
-./old_db_sanity_test $dir_new verify
-if [ $? -ne 0 ]; then
-  echo "[ERROR] Verification of $dir_new using commit $commit_old failed."
-  exit 2
-fi
-
-echo "============================================================="
-echo "Verifying old db $dir_old using the new commit --- $commit_new"
-./new_db_sanity_test $dir_old verify
-if [ $? -ne 0 ]; then
-  echo "[ERROR] Verification of $dir_old using commit $commit_new failed."
-  exit 2
-fi
-
-rm old_db_sanity_test
-rm new_db_sanity_test
-
-echo "Auto sanity test passed!"
diff --git a/src/rocksdb/tools/blob_store_bench.cc b/src/rocksdb/tools/blob_store_bench.cc
deleted file mode 100644
index 60a0b84..0000000
--- a/src/rocksdb/tools/blob_store_bench.cc
+++ /dev/null
@@ -1,280 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <cstdio>
-#include <vector>
-#include <atomic>
-
-#include "rocksdb/env.h"
-#include "util/blob_store.h"
-#include "util/testutil.h"
-
-#define KB 1024LL
-#define MB 1024*1024LL
-// BlobStore does costly asserts to make sure it's running correctly, which
-// significantly impacts benchmark runtime.
-// NDEBUG will compile out those asserts.
-#ifndef NDEBUG
-#define NDEBUG
-#endif
-
-using namespace rocksdb;
-using namespace std;
-
-// used by all threads
-uint64_t timeout_sec;
-Env *env;
-BlobStore* bs;
-
-namespace {
-std::string RandomString(Random* rnd, uint64_t len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-}  // namespace
-
-struct Result {
-  uint32_t writes;
-  uint32_t reads;
-  uint32_t deletes;
-  uint64_t data_written;
-  uint64_t data_read;
-
-  void print() {
-    printf("Total writes = %u\n", writes);
-    printf("Total reads = %u\n", reads);
-    printf("Total deletes = %u\n", deletes);
-    printf("Write throughput = %lf MB/s\n",
-           (double)data_written / (1024*1024.0) / timeout_sec);
-    printf("Read throughput = %lf MB/s\n",
-           (double)data_read / (1024*1024.0) / timeout_sec);
-    printf("Total throughput = %lf MB/s\n",
-           (double)(data_read + data_written) / (1024*1024.0) / timeout_sec);
-  }
-
-  Result() {
-    writes = reads = deletes = data_read = data_written = 0;
-  }
-
-  Result (uint32_t writes, uint32_t reads, uint32_t deletes,
-          uint64_t data_written, uint64_t data_read) :
-    writes(writes), reads(reads), deletes(deletes),
-    data_written(data_written), data_read(data_read) {}
-
-};
-
-namespace {
-Result operator + (const Result &a, const Result &b) {
-  return Result(a.writes + b.writes, a.reads + b.reads,
-                a.deletes + b.deletes, a.data_written + b.data_written,
-                a.data_read + b.data_read);
-}
-}  // namespace
-
-struct WorkerThread {
-  uint64_t data_size_from, data_size_to;
-  double read_ratio;
-  uint64_t working_set_size; // start deleting once you reach this
-  Result result;
-  atomic<bool> stopped;
-
-  WorkerThread(uint64_t data_size_from, uint64_t data_size_to,
-                double read_ratio, uint64_t working_set_size) :
-    data_size_from(data_size_from), data_size_to(data_size_to),
-    read_ratio(read_ratio), working_set_size(working_set_size),
-    stopped(false) {}
-
-  WorkerThread(const WorkerThread& wt) :
-    data_size_from(wt.data_size_from), data_size_to(wt.data_size_to),
-    read_ratio(wt.read_ratio), working_set_size(wt.working_set_size),
-    stopped(false) {}
-};
-
-static void WorkerThreadBody(void* arg) {
-  WorkerThread* t = reinterpret_cast<WorkerThread*>(arg);
-  Random rnd(5);
-  string buf;
-  vector<pair<Blob, uint64_t>> blobs;
-  vector<string> random_strings;
-
-  for (int i = 0; i < 10; ++i) {
-    random_strings.push_back(RandomString(&rnd, t->data_size_to));
-  }
-
-  uint64_t total_size = 0;
-
-  uint64_t start_micros = env->NowMicros();
-  while (env->NowMicros() - start_micros < timeout_sec * 1000 * 1000) {
-    if (blobs.size() && rand() < RAND_MAX * t->read_ratio) {
-      // read
-      int bi = rand() % blobs.size();
-      Status s = bs->Get(blobs[bi].first, &buf);
-      assert(s.ok());
-      t->result.data_read += buf.size();
-      t->result.reads++;
-    } else {
-      // write
-      uint64_t size = rand() % (t->data_size_to - t->data_size_from) +
-        t->data_size_from;
-      total_size += size;
-      string put_str = random_strings[rand() % random_strings.size()];
-      blobs.push_back(make_pair(Blob(), size));
-      Status s = bs->Put(Slice(put_str.data(), size), &blobs.back().first);
-      assert(s.ok());
-      t->result.data_written += size;
-      t->result.writes++;
-    }
-
-    while (total_size >= t->working_set_size) {
-      // delete random
-      int bi = rand() % blobs.size();
-      total_size -= blobs[bi].second;
-      bs->Delete(blobs[bi].first);
-      blobs.erase(blobs.begin() + bi);
-      t->result.deletes++;
-    }
-  }
-  t->stopped.store(true);
-}
-
-namespace {
-Result StartBenchmark(vector<WorkerThread*>& config) {
-  for (auto w : config) {
-    env->StartThread(WorkerThreadBody, w);
-  }
-
-  Result result;
-
-  for (auto w : config) {
-    while (!w->stopped.load());
-    result = result + w->result;
-  }
-
-  for (auto w : config) {
-    delete w;
-  }
-
-  delete bs;
-
-  return result;
-}
-
-vector<WorkerThread*> SetupBenchmarkBalanced() {
-  string test_path;
-  env->GetTestDirectory(&test_path);
-  test_path.append("/blob_store");
-
-  // config start
-  uint32_t block_size = 16*KB;
-  uint32_t file_size = 1*MB;
-  double read_write_ratio = 0.5;
-  uint64_t data_read_from = 16*KB;
-  uint64_t data_read_to = 32*KB;
-  int number_of_threads = 10;
-  uint64_t working_set_size = 5*MB;
-  timeout_sec = 5;
-  // config end
-
-  bs = new BlobStore(test_path, block_size, file_size / block_size, 10000, env);
-
-  vector <WorkerThread*> config;
-
-  for (int i = 0; i < number_of_threads; ++i) {
-    config.push_back(new WorkerThread(data_read_from,
-                                      data_read_to,
-                                      read_write_ratio,
-                                      working_set_size));
-  };
-
-  return config;
-}
-
-vector<WorkerThread*> SetupBenchmarkWriteHeavy() {
-  string test_path;
-  env->GetTestDirectory(&test_path);
-  test_path.append("/blob_store");
-
-  // config start
-  uint32_t block_size = 16*KB;
-  uint32_t file_size = 1*MB;
-  double read_write_ratio = 0.1;
-  uint64_t data_read_from = 16*KB;
-  uint64_t data_read_to = 32*KB;
-  int number_of_threads = 10;
-  uint64_t working_set_size = 5*MB;
-  timeout_sec = 5;
-  // config end
-
-  bs = new BlobStore(test_path, block_size, file_size / block_size, 10000, env);
-
-  vector <WorkerThread*> config;
-
-  for (int i = 0; i < number_of_threads; ++i) {
-    config.push_back(new WorkerThread(data_read_from,
-                                      data_read_to,
-                                      read_write_ratio,
-                                      working_set_size));
-  };
-
-  return config;
-}
-
-vector<WorkerThread*> SetupBenchmarkReadHeavy() {
-  string test_path;
-  env->GetTestDirectory(&test_path);
-  test_path.append("/blob_store");
-
-  // config start
-  uint32_t block_size = 16*KB;
-  uint32_t file_size = 1*MB;
-  double read_write_ratio = 0.9;
-  uint64_t data_read_from = 16*KB;
-  uint64_t data_read_to = 32*KB;
-  int number_of_threads = 10;
-  uint64_t working_set_size = 5*MB;
-  timeout_sec = 5;
-  // config end
-
-  bs = new BlobStore(test_path, block_size, file_size / block_size, 10000, env);
-
-  vector <WorkerThread*> config;
-
-  for (int i = 0; i < number_of_threads; ++i) {
-    config.push_back(new WorkerThread(data_read_from,
-                                      data_read_to,
-                                      read_write_ratio,
-                                      working_set_size));
-  };
-
-  return config;
-}
-}  // namespace
-
-int main(int argc, const char** argv) {
-  srand(33);
-  env = Env::Default();
-
-  {
-    printf("--- Balanced read/write benchmark ---\n");
-    vector <WorkerThread*> config = SetupBenchmarkBalanced();
-    Result r = StartBenchmark(config);
-    r.print();
-  }
-  {
-    printf("--- Write heavy benchmark ---\n");
-    vector <WorkerThread*> config = SetupBenchmarkWriteHeavy();
-    Result r = StartBenchmark(config);
-    r.print();
-  }
-  {
-    printf("--- Read heavy benchmark ---\n");
-    vector <WorkerThread*> config = SetupBenchmarkReadHeavy();
-    Result r = StartBenchmark(config);
-    r.print();
-  }
-
-  return 0;
-}
diff --git a/src/rocksdb/tools/db_crashtest.py b/src/rocksdb/tools/db_crashtest.py
deleted file mode 100644
index 3c93eca..0000000
--- a/src/rocksdb/tools/db_crashtest.py
+++ /dev/null
@@ -1,150 +0,0 @@
-#! /usr/bin/env python
-import os
-import re
-import sys
-import time
-import random
-import getopt
-import logging
-import tempfile
-import subprocess
-import shutil
-
-# This script runs and kills db_stress multiple times. It checks consistency
-# in case of unsafe crashes in RocksDB.
-
-def main(argv):
-    try:
-        opts, args = getopt.getopt(argv, "hd:t:i:o:b:")
-    except getopt.GetoptError:
-        print("db_crashtest.py -d <duration_test> -t <#threads> "
-              "-i <interval for one run> -o <ops_per_thread> "
-              "-b <write_buffer_size>\n")
-        sys.exit(2)
-
-    # default values, will be overridden by cmdline args
-    interval = 120  # time for one db_stress instance to run
-    duration = 6000  # total time for this script to test db_stress
-    threads = 32
-    # since we will be killing anyway, use large value for ops_per_thread
-    ops_per_thread = 100000000
-    write_buf_size = 4 * 1024 * 1024
-
-    for opt, arg in opts:
-        if opt == '-h':
-            print("db_crashtest.py -d <duration_test>"
-                  " -t <#threads> -i <interval for one run>"
-                  " -o <ops_per_thread> -b <write_buffer_size>\n")
-            sys.exit()
-        elif opt == "-d":
-            duration = int(arg)
-        elif opt == "-t":
-            threads = int(arg)
-        elif opt == "-i":
-            interval = int(arg)
-        elif opt == "-o":
-            ops_per_thread = int(arg)
-        elif opt == "-b":
-            write_buf_size = int(arg)
-        else:
-            print("db_crashtest.py -d <duration_test>"
-                  " -t <#threads> -i <interval for one run>"
-                  " -o <ops_per_thread> -b <write_buffer_size>\n")
-            sys.exit(2)
-
-    exit_time = time.time() + duration
-
-    print("Running blackbox-crash-test with \ninterval_between_crash="
-          + str(interval) + "\ntotal-duration=" + str(duration)
-          + "\nthreads=" + str(threads) + "\nops_per_thread="
-          + str(ops_per_thread) + "\nwrite_buffer_size="
-          + str(write_buf_size) + "\n")
-
-    dbname = tempfile.mkdtemp(prefix='rocksdb_crashtest_')
-
-    while time.time() < exit_time:
-        run_had_errors = False
-        killtime = time.time() + interval
-
-        cmd = re.sub('\s+', ' ', """
-            ./db_stress
-            --test_batches_snapshots=1
-            --ops_per_thread=%s
-            --threads=%s
-            --write_buffer_size=%s
-            --destroy_db_initially=0
-            --reopen=20
-            --readpercent=45
-            --prefixpercent=5
-            --writepercent=35
-            --delpercent=5
-            --iterpercent=10
-            --db=%s
-            --max_key=100000000
-            --disable_seek_compaction=%s
-            --mmap_read=%s
-            --block_size=16384
-            --cache_size=1048576
-            --open_files=500000
-            --verify_checksum=1
-            --sync=0
-            --progress_reports=0
-            --disable_wal=0
-            --disable_data_sync=1
-            --target_file_size_base=2097152
-            --target_file_size_multiplier=2
-            --max_write_buffer_number=3
-            --max_background_compactions=20
-            --max_bytes_for_level_base=10485760
-            --filter_deletes=%s
-            --memtablerep=prefix_hash
-            --prefix_size=7
-            """ % (ops_per_thread,
-                   threads,
-                   write_buf_size,
-                   dbname,
-                   random.randint(0, 1),
-                   random.randint(0, 1),
-                   random.randint(0, 1)))
-
-        child = subprocess.Popen([cmd],
-                                 stderr=subprocess.PIPE, shell=True)
-        print("Running db_stress with pid=%d: %s\n\n"
-              % (child.pid, cmd))
-
-        stop_early = False
-        while time.time() < killtime:
-            if child.poll() is not None:
-                print("WARNING: db_stress ended before kill: exitcode=%d\n"
-                      % child.returncode)
-                stop_early = True
-                break
-            time.sleep(1)
-
-        if not stop_early:
-            if child.poll() is not None:
-                print("WARNING: db_stress ended before kill: exitcode=%d\n"
-                      % child.returncode)
-            else:
-                child.kill()
-                print("KILLED %d\n" % child.pid)
-                time.sleep(1)  # time to stabilize after a kill
-
-        while True:
-            line = child.stderr.readline().strip()
-            if line != '':
-                run_had_errors = True
-                print('***' + line + '^')
-            else:
-                break
-
-        if run_had_errors:
-            sys.exit(2)
-
-        time.sleep(1)  # time to stabilize before the next run
-
-    # we need to clean up after ourselves -- only do this on test success
-    shutil.rmtree(dbname, True)
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv[1:]))
diff --git a/src/rocksdb/tools/db_crashtest2.py b/src/rocksdb/tools/db_crashtest2.py
deleted file mode 100644
index 0a12b5a..0000000
--- a/src/rocksdb/tools/db_crashtest2.py
+++ /dev/null
@@ -1,168 +0,0 @@
-#! /usr/bin/env python
-import os
-import re
-import sys
-import time
-import random
-import getopt
-import logging
-import tempfile
-import subprocess
-import shutil
-
-# This python script runs db_stress multiple times. Some runs with
-# kill_random_test that causes rocksdb to crash at various points in code.
-
-def main(argv):
-    try:
-        opts, args = getopt.getopt(argv, "hd:t:k:o:b:")
-    except getopt.GetoptError:
-        print str(getopt.GetoptError)
-        print "db_crashtest2.py -d <duration_test> -t <#threads> " \
-              "-k <kills with prob 1/k> -o <ops_per_thread> "\
-              "-b <write_buffer_size>\n"
-        sys.exit(2)
-
-    # default values, will be overridden by cmdline args
-    kill_random_test = 97  # kill with probability 1/97 by default
-    duration = 10000  # total time for this script to test db_stress
-    threads = 32
-    ops_per_thread = 200000
-    write_buf_size = 4 * 1024 * 1024
-
-    for opt, arg in opts:
-        if opt == '-h':
-            print "db_crashtest2.py -d <duration_test> -t <#threads> " \
-                  "-k <kills with prob 1/k> -o <ops_per_thread> " \
-                  "-b <write_buffer_size>\n"
-            sys.exit()
-        elif opt == "-d":
-            duration = int(arg)
-        elif opt == "-t":
-            threads = int(arg)
-        elif opt == "-k":
-            kill_random_test = int(arg)
-        elif opt == "-o":
-            ops_per_thread = int(arg)
-        elif opt == "-b":
-            write_buf_size = int(arg)
-        else:
-            print "unrecognized option " + str(opt) + "\n"
-            print "db_crashtest2.py -d <duration_test> -t <#threads> " \
-                  "-k <kills with prob 1/k> -o <ops_per_thread> " \
-                  "-b <write_buffer_size>\n"
-            sys.exit(2)
-
-    exit_time = time.time() + duration
-
-    print "Running whitebox-crash-test with \ntotal-duration=" + str(duration) \
-          + "\nthreads=" + str(threads) + "\nops_per_thread=" \
-          + str(ops_per_thread) + "\nwrite_buffer_size=" \
-          + str(write_buf_size) + "\n"
-
-    total_check_mode = 3
-    check_mode = 0
-
-    while time.time() < exit_time:
-        killoption = ""
-        if check_mode == 0:
-            # run with kill_random_test
-            killoption = " --kill_random_test=" + str(kill_random_test)
-            # use large ops per thread since we will kill it anyway
-            additional_opts = "--ops_per_thread=" + \
-                              str(100 * ops_per_thread) + killoption
-        elif check_mode == 1:
-            # normal run with universal compaction mode
-            additional_opts = "--ops_per_thread=" + str(ops_per_thread) + \
-                              " --compaction_style=1"
-        else:
-            # nomral run
-            additional_opts = "--ops_per_thread=" + str(ops_per_thread)
-
-        dbname = tempfile.mkdtemp(prefix='rocksdb_crashtest_')
-        cmd = re.sub('\s+', ' ', """
-            ./db_stress
-            --test_batches_snapshots=%s
-            --threads=%s
-            --write_buffer_size=%s
-            --destroy_db_initially=0
-            --reopen=20
-            --readpercent=45
-            --prefixpercent=5
-            --writepercent=35
-            --delpercent=5
-            --iterpercent=10
-            --db=%s
-            --max_key=100000000
-            --disable_seek_compaction=%s
-            --mmap_read=%s
-            --block_size=16384
-            --cache_size=1048576
-            --open_files=500000
-            --verify_checksum=1
-            --sync=0
-            --progress_reports=0
-            --disable_wal=0
-            --disable_data_sync=1
-            --target_file_size_base=2097152
-            --target_file_size_multiplier=2
-            --max_write_buffer_number=3
-            --max_background_compactions=20
-            --max_bytes_for_level_base=10485760
-            --filter_deletes=%s
-            --memtablerep=prefix_hash
-            --prefix_size=7
-            %s
-            """ % (random.randint(0, 1),
-                   threads,
-                   write_buf_size,
-                   dbname,
-                   random.randint(0, 1),
-                   random.randint(0, 1),
-                   random.randint(0, 1),
-                   additional_opts))
-
-        print "Running:" + cmd + "\n"
-
-        popen = subprocess.Popen([cmd], stdout=subprocess.PIPE,
-                                 stderr=subprocess.STDOUT,
-                                 shell=True)
-        stdoutdata, stderrdata = popen.communicate()
-        retncode = popen.returncode
-        msg = ("check_mode={0}, kill option={1}, exitcode={2}\n".format(
-               check_mode, killoption, retncode))
-        print msg
-        print stdoutdata
-
-        expected = False
-        if (killoption == '') and (retncode == 0):
-            # we expect zero retncode if no kill option
-            expected = True
-        elif killoption != '' and retncode < 0:
-            # we expect negative retncode if kill option was given
-            expected = True
-
-        if not expected:
-            print "TEST FAILED. See kill option and exit code above!!!\n"
-            sys.exit(1)
-
-        stdoutdata = stdoutdata.lower()
-        errorcount = (stdoutdata.count('error') -
-                      stdoutdata.count('got errors 0 times'))
-        print "#times error occurred in output is " + str(errorcount) + "\n"
-
-        if (errorcount > 0):
-            print "TEST FAILED. Output has 'error'!!!\n"
-            sys.exit(2)
-        if (stdoutdata.find('fail') >= 0):
-            print "TEST FAILED. Output has 'fail'!!!\n"
-            sys.exit(2)
-        # we need to clean up after ourselves -- only do this on test success
-        shutil.rmtree(dbname, True)
-
-        check_mode = (check_mode + 1) % total_check_mode
-
-        time.sleep(1)  # time to stabilize after a kill
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv[1:]))
diff --git a/src/rocksdb/tools/db_repl_stress.cc b/src/rocksdb/tools/db_repl_stress.cc
deleted file mode 100644
index 27cb6d5..0000000
--- a/src/rocksdb/tools/db_repl_stress.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <cstdio>
-
-#include <gflags/gflags.h>
-
-#include "db/write_batch_internal.h"
-#include "rocksdb/db.h"
-#include "rocksdb/types.h"
-#include "port/atomic_pointer.h"
-#include "util/testutil.h"
-
-
-// Run a thread to perform Put's.
-// Another thread uses GetUpdatesSince API to keep getting the updates.
-// options :
-// --num_inserts = the num of inserts the first thread should perform.
-// --wal_ttl = the wal ttl for the run.
-
-using namespace rocksdb;
-
-struct DataPumpThread {
-  size_t no_records;
-  DB* db; // Assumption DB is Open'ed already.
-};
-
-static std::string RandomString(Random* rnd, int len) {
-  std::string r;
-  test::RandomString(rnd, len, &r);
-  return r;
-}
-
-static void DataPumpThreadBody(void* arg) {
-  DataPumpThread* t = reinterpret_cast<DataPumpThread*>(arg);
-  DB* db = t->db;
-  Random rnd(301);
-  size_t i = 0;
-  while(i++ < t->no_records) {
-    if(!db->Put(WriteOptions(), Slice(RandomString(&rnd, 500)),
-                Slice(RandomString(&rnd, 500))).ok()) {
-      fprintf(stderr, "Error in put\n");
-      exit(1);
-    }
-  }
-}
-
-struct ReplicationThread {
-  port::AtomicPointer stop;
-  DB* db;
-  volatile size_t no_read;
-};
-
-static void ReplicationThreadBody(void* arg) {
-  ReplicationThread* t = reinterpret_cast<ReplicationThread*>(arg);
-  DB* db = t->db;
-  unique_ptr<TransactionLogIterator> iter;
-  SequenceNumber currentSeqNum = 1;
-  while (t->stop.Acquire_Load() != nullptr) {
-    iter.reset();
-    Status s;
-    while(!db->GetUpdatesSince(currentSeqNum, &iter).ok()) {
-      if (t->stop.Acquire_Load() == nullptr) {
-        return;
-      }
-    }
-    fprintf(stderr, "Refreshing iterator\n");
-    for(;iter->Valid(); iter->Next(), t->no_read++, currentSeqNum++) {
-      BatchResult res = iter->GetBatch();
-      if (res.sequence != currentSeqNum) {
-        fprintf(stderr,
-                "Missed a seq no. b/w %ld and %ld\n",
-                (long)currentSeqNum,
-                (long)res.sequence);
-        exit(1);
-      }
-    }
-  }
-}
-
-DEFINE_uint64(num_inserts, 1000, "the num of inserts the first thread should"
-              " perform.");
-DEFINE_uint64(wal_ttl_seconds, 1000, "the wal ttl for the run(in seconds)");
-DEFINE_uint64(wal_size_limit_MB, 10, "the wal size limit for the run"
-              "(in MB)");
-
-int main(int argc, const char** argv) {
-  google::SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) +
-    " --num_inserts=<num_inserts> --wal_ttl_seconds=<WAL_ttl_seconds>" +
-    " --wal_size_limit_MB=<WAL_size_limit_MB>");
-  google::ParseCommandLineFlags(&argc, const_cast<char***>(&argv), true);
-
-  Env* env = Env::Default();
-  std::string default_db_path;
-  env->GetTestDirectory(&default_db_path);
-  default_db_path += "db_repl_stress";
-  Options options;
-  options.create_if_missing = true;
-  options.WAL_ttl_seconds = FLAGS_wal_ttl_seconds;
-  options.WAL_size_limit_MB = FLAGS_wal_size_limit_MB;
-  DB* db;
-  DestroyDB(default_db_path, options);
-
-  Status s = DB::Open(options, default_db_path, &db);
-
-  if (!s.ok()) {
-    fprintf(stderr, "Could not open DB due to %s\n", s.ToString().c_str());
-    exit(1);
-  }
-
-  DataPumpThread dataPump;
-  dataPump.no_records = FLAGS_num_inserts;
-  dataPump.db = db;
-  env->StartThread(DataPumpThreadBody, &dataPump);
-
-  ReplicationThread replThread;
-  replThread.db = db;
-  replThread.no_read = 0;
-  replThread.stop.Release_Store(env); // store something to make it non-null.
-
-  env->StartThread(ReplicationThreadBody, &replThread);
-  while(replThread.no_read < FLAGS_num_inserts);
-  replThread.stop.Release_Store(nullptr);
-  if (replThread.no_read < dataPump.no_records) {
-    // no. read should be => than inserted.
-    fprintf(stderr, "No. of Record's written and read not same\nRead : %zu"
-            " Written : %zu\n", replThread.no_read, dataPump.no_records);
-    exit(1);
-  }
-  fprintf(stderr, "Successful!\n");
-  exit(0);
-}
diff --git a/src/rocksdb/tools/db_sanity_test.cc b/src/rocksdb/tools/db_sanity_test.cc
deleted file mode 100644
index e970f5e..0000000
--- a/src/rocksdb/tools/db_sanity_test.cc
+++ /dev/null
@@ -1,203 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <cstdio>
-#include <vector>
-#include <memory>
-
-#include "include/rocksdb/db.h"
-#include "include/rocksdb/options.h"
-#include "include/rocksdb/env.h"
-#include "include/rocksdb/slice.h"
-#include "include/rocksdb/status.h"
-#include "include/rocksdb/comparator.h"
-#include "include/rocksdb/table.h"
-#include "include/rocksdb/slice_transform.h"
-
-namespace rocksdb {
-
-class SanityTest {
- public:
-  explicit SanityTest(const std::string& path)
-      : env_(Env::Default()), path_(path) {
-    env_->CreateDirIfMissing(path);
-  }
-  virtual ~SanityTest() {}
-
-  virtual std::string Name() const = 0;
-  virtual Options GetOptions() const = 0;
-
-  Status Create() {
-    Options options = GetOptions();
-    options.create_if_missing = true;
-    std::string dbname = path_ + Name();
-    DestroyDB(dbname, options);
-    DB* db;
-    Status s = DB::Open(options, dbname, &db);
-    std::unique_ptr<DB> db_guard(db);
-    if (!s.ok()) {
-      return s;
-    }
-    for (int i = 0; i < 1000000; ++i) {
-      std::string k = "key" + std::to_string(i);
-      std::string v = "value" + std::to_string(i);
-      s = db->Put(WriteOptions(), Slice(k), Slice(v));
-      if (!s.ok()) {
-        return s;
-      }
-    }
-    return Status::OK();
-  }
-  Status Verify() {
-    DB* db;
-    std::string dbname = path_ + Name();
-    Status s = DB::Open(GetOptions(), dbname, &db);
-    std::unique_ptr<DB> db_guard(db);
-    if (!s.ok()) {
-      return s;
-    }
-    for (int i = 0; i < 1000000; ++i) {
-      std::string k = "key" + std::to_string(i);
-      std::string v = "value" + std::to_string(i);
-      std::string result;
-      s = db->Get(ReadOptions(), Slice(k), &result);
-      if (!s.ok()) {
-        return s;
-      }
-      if (result != v) {
-        return Status::Corruption("Unexpected value for key " + k);
-      }
-    }
-    return Status::OK();
-  }
-
- private:
-  Env* env_;
-  std::string const path_;
-};
-
-class SanityTestBasic : public SanityTest {
- public:
-  explicit SanityTestBasic(const std::string& path) : SanityTest(path) {}
-  virtual Options GetOptions() const {
-    Options options;
-    options.create_if_missing = true;
-    return options;
-  }
-  virtual std::string Name() const { return "Basic"; }
-};
-
-class SanityTestSpecialComparator : public SanityTest {
- public:
-  explicit SanityTestSpecialComparator(const std::string& path)
-      : SanityTest(path) {
-    options_.comparator = new NewComparator();
-  }
-  ~SanityTestSpecialComparator() { delete options_.comparator; }
-  virtual Options GetOptions() const { return options_; }
-  virtual std::string Name() const { return "SpecialComparator"; }
-
- private:
-  class NewComparator : public Comparator {
-   public:
-    virtual const char* Name() const { return "rocksdb.NewComparator"; }
-    virtual int Compare(const Slice& a, const Slice& b) const {
-      return BytewiseComparator()->Compare(a, b);
-    }
-    virtual void FindShortestSeparator(std::string* s, const Slice& l) const {
-      BytewiseComparator()->FindShortestSeparator(s, l);
-    }
-    virtual void FindShortSuccessor(std::string* key) const {
-      BytewiseComparator()->FindShortSuccessor(key);
-    }
-  };
-  Options options_;
-};
-
-class SanityTestZlibCompression : public SanityTest {
- public:
-  explicit SanityTestZlibCompression(const std::string& path)
-      : SanityTest(path) {
-    options_.compression = kZlibCompression;
-  }
-  virtual Options GetOptions() const { return options_; }
-  virtual std::string Name() const { return "ZlibCompression"; }
-
- private:
-  Options options_;
-};
-
-class SanityTestPlainTableFactory : public SanityTest {
- public:
-  explicit SanityTestPlainTableFactory(const std::string& path)
-      : SanityTest(path) {
-    options_.table_factory.reset(NewPlainTableFactory());
-    options_.prefix_extractor.reset(NewFixedPrefixTransform(2));
-    options_.allow_mmap_reads = true;
-  }
-  ~SanityTestPlainTableFactory() {}
-  virtual Options GetOptions() const { return options_; }
-  virtual std::string Name() const { return "PlainTable"; }
-
- private:
-  Options options_;
-};
-
-namespace {
-bool RunSanityTests(const std::string& command, const std::string& path) {
-  std::vector<SanityTest*> sanity_tests = {
-      new SanityTestBasic(path),
-      new SanityTestSpecialComparator(path),
-      new SanityTestZlibCompression(path),
-      new SanityTestPlainTableFactory(path)};
-
-  if (command == "create") {
-    fprintf(stderr, "Creating...\n");
-  } else {
-    fprintf(stderr, "Verifying...\n");
-  }
-  for (auto sanity_test : sanity_tests) {
-    Status s;
-    fprintf(stderr, "%s -- ", sanity_test->Name().c_str());
-    if (command == "create") {
-      s = sanity_test->Create();
-    } else {
-      assert(command == "verify");
-      s = sanity_test->Verify();
-    }
-    fprintf(stderr, "%s\n", s.ToString().c_str());
-    if (!s.ok()) {
-      fprintf(stderr, "FAIL\n");
-      return false;
-    }
-
-    delete sanity_test;
-  }
-  return true;
-}
-}  // namespace
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  std::string path, command;
-  bool ok = (argc == 3);
-  if (ok) {
-    path = std::string(argv[1]);
-    command = std::string(argv[2]);
-    ok = (command == "create" || command == "verify");
-  }
-  if (!ok) {
-    fprintf(stderr, "Usage: %s <path> [create|verify] \n", argv[0]);
-    exit(1);
-  }
-  if (path.back() != '/') {
-    path += "/";
-  }
-
-  bool sanity_ok = rocksdb::RunSanityTests(command, path);
-
-  return sanity_ok ? 0 : 1;
-}
diff --git a/src/rocksdb/tools/db_stress.cc b/src/rocksdb/tools/db_stress.cc
deleted file mode 100644
index c774171..0000000
--- a/src/rocksdb/tools/db_stress.cc
+++ /dev/null
@@ -1,1732 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// The test uses an array to compare against values written to the database.
-// Keys written to the array are in 1:1 correspondence to the actual values in
-// the database according to the formula in the function GenerateValue.
-
-// Space is reserved in the array from 0 to FLAGS_max_key and values are
-// randomly written/deleted/read from those positions. During verification we
-// compare all the positions in the array. To shorten/elongate the running
-// time, you could change the settings: FLAGS_max_key, FLAGS_ops_per_thread,
-// (sometimes also FLAGS_threads).
-//
-// NOTE that if FLAGS_test_batches_snapshots is set, the test will have
-// different behavior. See comment of the flag for details.
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <gflags/gflags.h>
-#include "db/db_impl.h"
-#include "db/version_set.h"
-#include "rocksdb/statistics.h"
-#include "rocksdb/cache.h"
-#include "utilities/db_ttl.h"
-#include "rocksdb/env.h"
-#include "rocksdb/write_batch.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/statistics.h"
-#include "port/port.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-#include "util/histogram.h"
-#include "util/mutexlock.h"
-#include "util/random.h"
-#include "util/testutil.h"
-#include "util/logging.h"
-#include "hdfs/env_hdfs.h"
-#include "utilities/merge_operators.h"
-
-static const long KB = 1024;
-
-
-static bool ValidateUint32Range(const char* flagname, uint64_t value) {
-  if (value > std::numeric_limits<uint32_t>::max()) {
-    fprintf(stderr,
-            "Invalid value for --%s: %lu, overflow\n",
-            flagname,
-            (unsigned long)value);
-    return false;
-  }
-  return true;
-}
-
-DEFINE_uint64(seed, 2341234, "Seed for PRNG");
-static const bool FLAGS_seed_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_seed, &ValidateUint32Range);
-
-DEFINE_int64(max_key, 1 * KB* KB,
-             "Max number of key/values to place in database");
-
-DEFINE_int32(column_families, 10, "Number of column families");
-
-DEFINE_bool(test_batches_snapshots, false,
-            "If set, the test uses MultiGet(), Multiut() and MultiDelete()"
-            " which read/write/delete multiple keys in a batch. In this mode,"
-            " we do not verify db content by comparing the content with the "
-            "pre-allocated array. Instead, we do partial verification inside"
-            " MultiGet() by checking various values in a batch. Benefit of"
-            " this mode:\n"
-            "\t(a) No need to acquire mutexes during writes (less cache "
-            "flushes in multi-core leading to speed up)\n"
-            "\t(b) No long validation at the end (more speed up)\n"
-            "\t(c) Test snapshot and atomicity of batch writes");
-
-DEFINE_int32(threads, 32, "Number of concurrent threads to run.");
-
-DEFINE_int32(ttl, -1,
-             "Opens the db with this ttl value if this is not -1. "
-             "Carefully specify a large value such that verifications on "
-             "deleted values don't fail");
-
-DEFINE_int32(value_size_mult, 8,
-             "Size of value will be this number times rand_int(1,3) bytes");
-
-DEFINE_bool(verify_before_write, false, "Verify before write");
-
-DEFINE_bool(histogram, false, "Print histogram of operation timings");
-
-DEFINE_bool(destroy_db_initially, true,
-            "Destroys the database dir before start if this is true");
-
-DEFINE_bool(verbose, false, "Verbose");
-
-DEFINE_bool(progress_reports, true,
-            "If true, db_stress will report number of finished operations");
-
-DEFINE_int32(write_buffer_size, rocksdb::Options().write_buffer_size,
-             "Number of bytes to buffer in memtable before compacting");
-
-DEFINE_int32(max_write_buffer_number,
-             rocksdb::Options().max_write_buffer_number,
-             "The number of in-memory memtables. "
-             "Each memtable is of size FLAGS_write_buffer_size.");
-
-DEFINE_int32(min_write_buffer_number_to_merge,
-             rocksdb::Options().min_write_buffer_number_to_merge,
-             "The minimum number of write buffers that will be merged together "
-             "before writing to storage. This is cheap because it is an "
-             "in-memory merge. If this feature is not enabled, then all these "
-             "write buffers are flushed to L0 as separate files and this "
-             "increases read amplification because a get request has to check "
-             "in all of these files. Also, an in-memory merge may result in "
-             "writing less data to storage if there are duplicate records in"
-             " each of these individual write buffers.");
-
-DEFINE_int32(open_files, rocksdb::Options().max_open_files,
-             "Maximum number of files to keep open at the same time "
-             "(use default if == 0)");
-
-DEFINE_int64(compressed_cache_size, -1,
-             "Number of bytes to use as a cache of compressed data."
-             " Negative means use default settings.");
-
-DEFINE_int32(compaction_style, rocksdb::Options().compaction_style, "");
-
-DEFINE_int32(level0_file_num_compaction_trigger,
-             rocksdb::Options().level0_file_num_compaction_trigger,
-             "Level0 compaction start trigger");
-
-DEFINE_int32(level0_slowdown_writes_trigger,
-             rocksdb::Options().level0_slowdown_writes_trigger,
-             "Number of files in level-0 that will slow down writes");
-
-DEFINE_int32(level0_stop_writes_trigger,
-             rocksdb::Options().level0_stop_writes_trigger,
-             "Number of files in level-0 that will trigger put stop.");
-
-DEFINE_int32(block_size, rocksdb::Options().block_size,
-             "Number of bytes in a block.");
-
-DEFINE_int32(max_background_compactions,
-             rocksdb::Options().max_background_compactions,
-             "The maximum number of concurrent background compactions "
-             "that can occur in parallel.");
-
-DEFINE_int32(max_background_flushes, rocksdb::Options().max_background_flushes,
-             "The maximum number of concurrent background flushes "
-             "that can occur in parallel.");
-
-DEFINE_int32(universal_size_ratio, 0, "The ratio of file sizes that trigger"
-             " compaction in universal style");
-
-DEFINE_int32(universal_min_merge_width, 0, "The minimum number of files to "
-             "compact in universal style compaction");
-
-DEFINE_int32(universal_max_merge_width, 0, "The max number of files to compact"
-             " in universal style compaction");
-
-DEFINE_int32(universal_max_size_amplification_percent, 0,
-             "The max size amplification for universal style compaction");
-
-DEFINE_int32(clear_column_family_one_in, 1000000,
-             "With a chance of 1/N, delete a column family and then recreate "
-             "it again. If N == 0, never drop/create column families. "
-             "When test_batches_snapshots is true, this flag has no effect");
-
-DEFINE_int64(cache_size, 2 * KB * KB * KB,
-             "Number of bytes to use as a cache of uncompressed data.");
-
-static bool ValidateInt32Positive(const char* flagname, int32_t value) {
-  if (value < 0) {
-    fprintf(stderr, "Invalid value for --%s: %d, must be >=0\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(reopen, 10, "Number of times database reopens");
-static const bool FLAGS_reopen_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_reopen, &ValidateInt32Positive);
-
-DEFINE_int32(bloom_bits, 10, "Bloom filter bits per key. "
-             "Negative means use default settings.");
-
-DEFINE_string(db, "", "Use the db with the following name.");
-
-DEFINE_bool(verify_checksum, false,
-            "Verify checksum for every block read from storage");
-
-DEFINE_bool(mmap_read, rocksdb::EnvOptions().use_mmap_reads,
-            "Allow reads to occur via mmap-ing files");
-
-// Database statistics
-static std::shared_ptr<rocksdb::Statistics> dbstats;
-DEFINE_bool(statistics, false, "Create database statistics");
-
-DEFINE_bool(sync, false, "Sync all writes to disk");
-
-DEFINE_bool(disable_data_sync, false,
-            "If true, do not wait until data is synced to disk.");
-
-DEFINE_bool(use_fsync, false, "If true, issue fsync instead of fdatasync");
-
-DEFINE_int32(kill_random_test, 0,
-             "If non-zero, kill at various points in source code with "
-             "probability 1/this");
-static const bool FLAGS_kill_random_test_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_kill_random_test,
-                                  &ValidateInt32Positive);
-extern int rocksdb_kill_odds;
-
-DEFINE_bool(disable_wal, false, "If true, do not write WAL for write.");
-
-DEFINE_int32(target_file_size_base, 64 * KB,
-             "Target level-1 file size for compaction");
-
-DEFINE_int32(target_file_size_multiplier, 1,
-             "A multiplier to compute targe level-N file size (N >= 2)");
-
-DEFINE_uint64(max_bytes_for_level_base, 256 * KB, "Max bytes for level-1");
-
-DEFINE_int32(max_bytes_for_level_multiplier, 2,
-             "A multiplier to compute max bytes for level-N (N >= 2)");
-
-static bool ValidateInt32Percent(const char* flagname, int32_t value) {
-  if (value < 0 || value>100) {
-    fprintf(stderr, "Invalid value for --%s: %d, 0<= pct <=100 \n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(readpercent, 10,
-             "Ratio of reads to total workload (expressed as a percentage)");
-static const bool FLAGS_readpercent_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_readpercent, &ValidateInt32Percent);
-
-DEFINE_int32(prefixpercent, 20,
-             "Ratio of prefix iterators to total workload (expressed as a"
-             " percentage)");
-static const bool FLAGS_prefixpercent_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_prefixpercent, &ValidateInt32Percent);
-
-DEFINE_int32(writepercent, 45,
-             " Ratio of deletes to total workload (expressed as a percentage)");
-static const bool FLAGS_writepercent_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_writepercent, &ValidateInt32Percent);
-
-DEFINE_int32(delpercent, 15,
-             "Ratio of deletes to total workload (expressed as a percentage)");
-static const bool FLAGS_delpercent_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_delpercent, &ValidateInt32Percent);
-
-DEFINE_int32(iterpercent, 10, "Ratio of iterations to total workload"
-             " (expressed as a percentage)");
-static const bool FLAGS_iterpercent_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_iterpercent, &ValidateInt32Percent);
-
-DEFINE_uint64(num_iterations, 10, "Number of iterations per MultiIterate run");
-static const bool FLAGS_num_iterations_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_num_iterations, &ValidateUint32Range);
-
-DEFINE_bool(disable_seek_compaction, false,
-            "Option to disable compation triggered by read.");
-
-namespace {
-enum rocksdb::CompressionType StringToCompressionType(const char* ctype) {
-  assert(ctype);
-
-  if (!strcasecmp(ctype, "none"))
-    return rocksdb::kNoCompression;
-  else if (!strcasecmp(ctype, "snappy"))
-    return rocksdb::kSnappyCompression;
-  else if (!strcasecmp(ctype, "zlib"))
-    return rocksdb::kZlibCompression;
-  else if (!strcasecmp(ctype, "bzip2"))
-    return rocksdb::kBZip2Compression;
-  else if (!strcasecmp(ctype, "lz4"))
-    return rocksdb::kLZ4Compression;
-  else if (!strcasecmp(ctype, "lz4hc"))
-    return rocksdb::kLZ4HCCompression;
-
-  fprintf(stdout, "Cannot parse compression type '%s'\n", ctype);
-  return rocksdb::kSnappyCompression; //default value
-}
-}  // namespace
-
-DEFINE_string(compression_type, "snappy",
-              "Algorithm to use to compress the database");
-static enum rocksdb::CompressionType FLAGS_compression_type_e =
-    rocksdb::kSnappyCompression;
-
-DEFINE_string(hdfs, "", "Name of hdfs environment");
-// posix or hdfs environment
-static rocksdb::Env* FLAGS_env = rocksdb::Env::Default();
-
-DEFINE_uint64(ops_per_thread, 1200000, "Number of operations per thread.");
-static const bool FLAGS_ops_per_thread_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_ops_per_thread, &ValidateUint32Range);
-
-DEFINE_uint64(log2_keys_per_lock, 2, "Log2 of number of keys per lock");
-static const bool FLAGS_log2_keys_per_lock_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_log2_keys_per_lock,
-                                  &ValidateUint32Range);
-
-DEFINE_int32(purge_redundant_percent, 50,
-             "Percentage of times we want to purge redundant keys in memory "
-             "before flushing");
-static const bool FLAGS_purge_redundant_percent_dummy __attribute__((unused)) =
-    google::RegisterFlagValidator(&FLAGS_purge_redundant_percent,
-                                  &ValidateInt32Percent);
-
-DEFINE_bool(filter_deletes, false, "On true, deletes use KeyMayExist to drop"
-            " the delete if key not present");
-
-enum RepFactory {
-  kSkipList,
-  kHashSkipList,
-  kVectorRep
-};
-
-namespace {
-enum RepFactory StringToRepFactory(const char* ctype) {
-  assert(ctype);
-
-  if (!strcasecmp(ctype, "skip_list"))
-    return kSkipList;
-  else if (!strcasecmp(ctype, "prefix_hash"))
-    return kHashSkipList;
-  else if (!strcasecmp(ctype, "vector"))
-    return kVectorRep;
-
-  fprintf(stdout, "Cannot parse memreptable %s\n", ctype);
-  return kSkipList;
-}
-}  // namespace
-
-static enum RepFactory FLAGS_rep_factory;
-DEFINE_string(memtablerep, "prefix_hash", "");
-
-static bool ValidatePrefixSize(const char* flagname, int32_t value) {
-  if (value < 0 || value > 8) {
-    fprintf(stderr, "Invalid value for --%s: %d. 0 <= PrefixSize <= 8\n",
-            flagname, value);
-    return false;
-  }
-  return true;
-}
-DEFINE_int32(prefix_size, 7, "Control the prefix size for HashSkipListRep");
-static const bool FLAGS_prefix_size_dummy =
-  google::RegisterFlagValidator(&FLAGS_prefix_size, &ValidatePrefixSize);
-
-DEFINE_bool(use_merge, false, "On true, replaces all writes with a Merge "
-            "that behaves like a Put");
-
-
-namespace rocksdb {
-
-// convert long to a big-endian slice key
-static std::string Key(long val) {
-  std::string little_endian_key;
-  std::string big_endian_key;
-  PutFixed64(&little_endian_key, val);
-  assert(little_endian_key.size() == sizeof(val));
-  big_endian_key.resize(sizeof(val));
-  for (int i=0; i<(int)sizeof(val); i++) {
-    big_endian_key[i] = little_endian_key[sizeof(val) - 1 - i];
-  }
-  return big_endian_key;
-}
-
-static std::string StringToHex(const std::string& str) {
-  std::string result = "0x";
-  char buf[10];
-  for (size_t i = 0; i < str.length(); i++) {
-    snprintf(buf, 10, "%02X", (unsigned char)str[i]);
-    result += buf;
-  }
-  return result;
-}
-
-
-class StressTest;
-namespace {
-
-class Stats {
- private:
-  double start_;
-  double finish_;
-  double seconds_;
-  long done_;
-  long gets_;
-  long prefixes_;
-  long writes_;
-  long deletes_;
-  long iterator_size_sums_;
-  long founds_;
-  long iterations_;
-  long errors_;
-  int next_report_;
-  size_t bytes_;
-  double last_op_finish_;
-  HistogramImpl hist_;
-
- public:
-  Stats() { }
-
-  void Start() {
-    next_report_ = 100;
-    hist_.Clear();
-    done_ = 0;
-    gets_ = 0;
-    prefixes_ = 0;
-    writes_ = 0;
-    deletes_ = 0;
-    iterator_size_sums_ = 0;
-    founds_ = 0;
-    iterations_ = 0;
-    errors_ = 0;
-    bytes_ = 0;
-    seconds_ = 0;
-    start_ = FLAGS_env->NowMicros();
-    last_op_finish_ = start_;
-    finish_ = start_;
-  }
-
-  void Merge(const Stats& other) {
-    hist_.Merge(other.hist_);
-    done_ += other.done_;
-    gets_ += other.gets_;
-    prefixes_ += other.prefixes_;
-    writes_ += other.writes_;
-    deletes_ += other.deletes_;
-    iterator_size_sums_ += other.iterator_size_sums_;
-    founds_ += other.founds_;
-    iterations_ += other.iterations_;
-    errors_ += other.errors_;
-    bytes_ += other.bytes_;
-    seconds_ += other.seconds_;
-    if (other.start_ < start_) start_ = other.start_;
-    if (other.finish_ > finish_) finish_ = other.finish_;
-  }
-
-  void Stop() {
-    finish_ = FLAGS_env->NowMicros();
-    seconds_ = (finish_ - start_) * 1e-6;
-  }
-
-  void FinishedSingleOp() {
-    if (FLAGS_histogram) {
-      double now = FLAGS_env->NowMicros();
-      double micros = now - last_op_finish_;
-      hist_.Add(micros);
-      if (micros > 20000) {
-        fprintf(stdout, "long op: %.1f micros%30s\r", micros, "");
-      }
-      last_op_finish_ = now;
-    }
-
-      done_++;
-    if (FLAGS_progress_reports) {
-      if (done_ >= next_report_) {
-        if      (next_report_ < 1000)   next_report_ += 100;
-        else if (next_report_ < 5000)   next_report_ += 500;
-        else if (next_report_ < 10000)  next_report_ += 1000;
-        else if (next_report_ < 50000)  next_report_ += 5000;
-        else if (next_report_ < 100000) next_report_ += 10000;
-        else if (next_report_ < 500000) next_report_ += 50000;
-        else                            next_report_ += 100000;
-        fprintf(stdout, "... finished %ld ops%30s\r", done_, "");
-      }
-    }
-  }
-
-  void AddBytesForWrites(int nwrites, size_t nbytes) {
-    writes_ += nwrites;
-    bytes_ += nbytes;
-  }
-
-  void AddGets(int ngets, int nfounds) {
-    founds_ += nfounds;
-    gets_ += ngets;
-  }
-
-  void AddPrefixes(int nprefixes, int count) {
-    prefixes_ += nprefixes;
-    iterator_size_sums_ += count;
-  }
-
-  void AddIterations(int n) {
-    iterations_ += n;
-  }
-
-  void AddDeletes(int n) {
-    deletes_ += n;
-  }
-
-  void AddErrors(int n) {
-    errors_ += n;
-  }
-
-  void Report(const char* name) {
-    std::string extra;
-    if (bytes_ < 1 || done_ < 1) {
-      fprintf(stderr, "No writes or ops?\n");
-      return;
-    }
-
-    double elapsed = (finish_ - start_) * 1e-6;
-    double bytes_mb = bytes_ / 1048576.0;
-    double rate = bytes_mb / elapsed;
-    double throughput = (double)done_/elapsed;
-
-    fprintf(stdout, "%-12s: ", name);
-    fprintf(stdout, "%.3f micros/op %ld ops/sec\n",
-            seconds_ * 1e6 / done_, (long)throughput);
-    fprintf(stdout, "%-12s: Wrote %.2f MB (%.2f MB/sec) (%ld%% of %ld ops)\n",
-            "", bytes_mb, rate, (100*writes_)/done_, done_);
-    fprintf(stdout, "%-12s: Wrote %ld times\n", "", writes_);
-    fprintf(stdout, "%-12s: Deleted %ld times\n", "", deletes_);
-    fprintf(stdout, "%-12s: %ld read and %ld found the key\n", "",
-            gets_, founds_);
-    fprintf(stdout, "%-12s: Prefix scanned %ld times\n", "", prefixes_);
-    fprintf(stdout, "%-12s: Iterator size sum is %ld\n", "",
-            iterator_size_sums_);
-    fprintf(stdout, "%-12s: Iterated %ld times\n", "", iterations_);
-    fprintf(stdout, "%-12s: Got errors %ld times\n", "", errors_);
-
-    if (FLAGS_histogram) {
-      fprintf(stdout, "Microseconds per op:\n%s\n", hist_.ToString().c_str());
-    }
-    fflush(stdout);
-  }
-};
-
-// State shared by all concurrent executions of the same benchmark.
-class SharedState {
- public:
-  static const uint32_t SENTINEL;
-
-  explicit SharedState(StressTest* stress_test)
-      : cv_(&mu_),
-        seed_(FLAGS_seed),
-        max_key_(FLAGS_max_key),
-        log2_keys_per_lock_(FLAGS_log2_keys_per_lock),
-        num_threads_(FLAGS_threads),
-        num_initialized_(0),
-        num_populated_(0),
-        vote_reopen_(0),
-        num_done_(0),
-        start_(false),
-        start_verify_(false),
-        stress_test_(stress_test),
-        verification_failure_(false) {
-    if (FLAGS_test_batches_snapshots) {
-      fprintf(stdout, "No lock creation because test_batches_snapshots set\n");
-      return;
-    }
-    values_.resize(FLAGS_column_families);
-
-    for (int i = 0; i < FLAGS_column_families; ++i) {
-      values_[i] = std::vector<uint32_t>(max_key_, SENTINEL);
-    }
-
-    long num_locks = (max_key_ >> log2_keys_per_lock_);
-    if (max_key_ & ((1 << log2_keys_per_lock_) - 1)) {
-      num_locks++;
-    }
-    fprintf(stdout, "Creating %ld locks\n", num_locks * FLAGS_column_families);
-    key_locks_.resize(FLAGS_column_families);
-    for (int i = 0; i < FLAGS_column_families; ++i) {
-      key_locks_[i] = std::vector<port::Mutex>(num_locks);
-    }
-  }
-
-  ~SharedState() {}
-
-  port::Mutex* GetMutex() {
-    return &mu_;
-  }
-
-  port::CondVar* GetCondVar() {
-    return &cv_;
-  }
-
-  StressTest* GetStressTest() const {
-    return stress_test_;
-  }
-
-  long GetMaxKey() const {
-    return max_key_;
-  }
-
-  uint32_t GetNumThreads() const {
-    return num_threads_;
-  }
-
-  void IncInitialized() {
-    num_initialized_++;
-  }
-
-  void IncOperated() {
-    num_populated_++;
-  }
-
-  void IncDone() {
-    num_done_++;
-  }
-
-  void IncVotedReopen() {
-    vote_reopen_ = (vote_reopen_ + 1) % num_threads_;
-  }
-
-  bool AllInitialized() const {
-    return num_initialized_ >= num_threads_;
-  }
-
-  bool AllOperated() const {
-    return num_populated_ >= num_threads_;
-  }
-
-  bool AllDone() const {
-    return num_done_ >= num_threads_;
-  }
-
-  bool AllVotedReopen() {
-    return (vote_reopen_ == 0);
-  }
-
-  void SetStart() {
-    start_ = true;
-  }
-
-  void SetStartVerify() {
-    start_verify_ = true;
-  }
-
-  bool Started() const {
-    return start_;
-  }
-
-  bool VerifyStarted() const {
-    return start_verify_;
-  }
-
-  void SetVerificationFailure() { verification_failure_.store(true); }
-
-  bool HasVerificationFailedYet() { return verification_failure_.load(); }
-
-  port::Mutex* GetMutexForKey(int cf, long key) {
-    return &key_locks_[cf][key >> log2_keys_per_lock_];
-  }
-
-  void LockColumnFamily(int cf) {
-    for (auto& mutex : key_locks_[cf]) {
-      mutex.Lock();
-    }
-  }
-
-  void UnlockColumnFamily(int cf) {
-    for (auto& mutex : key_locks_[cf]) {
-      mutex.Unlock();
-    }
-  }
-
-  void ClearColumnFamily(int cf) {
-    std::fill(values_[cf].begin(), values_[cf].end(), SENTINEL);
-  }
-
-  void Put(int cf, long key, uint32_t value_base) {
-    values_[cf][key] = value_base;
-  }
-
-  uint32_t Get(int cf, long key) const { return values_[cf][key]; }
-
-  void Delete(int cf, long key) { values_[cf][key] = SENTINEL; }
-
-  uint32_t GetSeed() const { return seed_; }
-
- private:
-  port::Mutex mu_;
-  port::CondVar cv_;
-  const uint32_t seed_;
-  const long max_key_;
-  const uint32_t log2_keys_per_lock_;
-  const int num_threads_;
-  long num_initialized_;
-  long num_populated_;
-  long vote_reopen_;
-  long num_done_;
-  bool start_;
-  bool start_verify_;
-  StressTest* stress_test_;
-  std::atomic<bool> verification_failure_;
-
-  std::vector<std::vector<uint32_t>> values_;
-  std::vector<std::vector<port::Mutex>> key_locks_;
-};
-
-const uint32_t SharedState::SENTINEL = 0xffffffff;
-
-// Per-thread state for concurrent executions of the same benchmark.
-struct ThreadState {
-  uint32_t tid; // 0..n-1
-  Random rand;  // Has different seeds for different threads
-  SharedState* shared;
-  Stats stats;
-
-  ThreadState(uint32_t index, SharedState *shared)
-      : tid(index),
-        rand(1000 + index + shared->GetSeed()),
-        shared(shared) {
-  }
-};
-
-}  // namespace
-
-class StressTest {
- public:
-  StressTest()
-      : cache_(NewLRUCache(FLAGS_cache_size)),
-        compressed_cache_(FLAGS_compressed_cache_size >= 0
-                              ? NewLRUCache(FLAGS_compressed_cache_size)
-                              : nullptr),
-        filter_policy_(FLAGS_bloom_bits >= 0
-                           ? NewBloomFilterPolicy(FLAGS_bloom_bits)
-                           : nullptr),
-        db_(nullptr),
-        new_column_family_name_(0),
-        num_times_reopened_(0) {
-    if (FLAGS_destroy_db_initially) {
-      std::vector<std::string> files;
-      FLAGS_env->GetChildren(FLAGS_db, &files);
-      for (unsigned int i = 0; i < files.size(); i++) {
-        if (Slice(files[i]).starts_with("heap-")) {
-          FLAGS_env->DeleteFile(FLAGS_db + "/" + files[i]);
-        }
-      }
-      DestroyDB(FLAGS_db, Options());
-    }
-  }
-
-  ~StressTest() {
-    for (auto cf : column_families_) {
-      delete cf;
-    }
-    column_families_.clear();
-    delete db_;
-    delete filter_policy_;
-  }
-
-  bool Run() {
-    PrintEnv();
-    Open();
-    SharedState shared(this);
-    uint32_t n = shared.GetNumThreads();
-
-    std::vector<ThreadState*> threads(n);
-    for (uint32_t i = 0; i < n; i++) {
-      threads[i] = new ThreadState(i, &shared);
-      FLAGS_env->StartThread(ThreadBody, threads[i]);
-    }
-    // Each thread goes through the following states:
-    // initializing -> wait for others to init -> read/populate/depopulate
-    // wait for others to operate -> verify -> done
-
-    {
-      MutexLock l(shared.GetMutex());
-      while (!shared.AllInitialized()) {
-        shared.GetCondVar()->Wait();
-      }
-
-      double now = FLAGS_env->NowMicros();
-      fprintf(stdout, "%s Starting database operations\n",
-              FLAGS_env->TimeToString((uint64_t) now/1000000).c_str());
-
-      shared.SetStart();
-      shared.GetCondVar()->SignalAll();
-      while (!shared.AllOperated()) {
-        shared.GetCondVar()->Wait();
-      }
-
-      now = FLAGS_env->NowMicros();
-      if (FLAGS_test_batches_snapshots) {
-        fprintf(stdout, "%s Limited verification already done during gets\n",
-                FLAGS_env->TimeToString((uint64_t) now/1000000).c_str());
-      } else {
-        fprintf(stdout, "%s Starting verification\n",
-                FLAGS_env->TimeToString((uint64_t) now/1000000).c_str());
-      }
-
-      shared.SetStartVerify();
-      shared.GetCondVar()->SignalAll();
-      while (!shared.AllDone()) {
-        shared.GetCondVar()->Wait();
-      }
-    }
-
-    for (unsigned int i = 1; i < n; i++) {
-      threads[0]->stats.Merge(threads[i]->stats);
-    }
-    threads[0]->stats.Report("Stress Test");
-
-    for (unsigned int i = 0; i < n; i++) {
-      delete threads[i];
-      threads[i] = nullptr;
-    }
-    double now = FLAGS_env->NowMicros();
-    if (!FLAGS_test_batches_snapshots) {
-      fprintf(stdout, "%s Verification successful\n",
-              FLAGS_env->TimeToString((uint64_t) now/1000000).c_str());
-    }
-    PrintStatistics();
-
-    if (shared.HasVerificationFailedYet()) {
-      printf("Verification failed :(\n");
-      return false;
-    }
-    return true;
-  }
-
- private:
-
-  static void ThreadBody(void* v) {
-    ThreadState* thread = reinterpret_cast<ThreadState*>(v);
-    SharedState* shared = thread->shared;
-
-    {
-      MutexLock l(shared->GetMutex());
-      shared->IncInitialized();
-      if (shared->AllInitialized()) {
-        shared->GetCondVar()->SignalAll();
-      }
-      while (!shared->Started()) {
-        shared->GetCondVar()->Wait();
-      }
-    }
-    thread->shared->GetStressTest()->OperateDb(thread);
-
-    {
-      MutexLock l(shared->GetMutex());
-      shared->IncOperated();
-      if (shared->AllOperated()) {
-        shared->GetCondVar()->SignalAll();
-      }
-      while (!shared->VerifyStarted()) {
-        shared->GetCondVar()->Wait();
-      }
-    }
-
-    if (!FLAGS_test_batches_snapshots) {
-      thread->shared->GetStressTest()->VerifyDb(thread);
-    }
-
-    {
-      MutexLock l(shared->GetMutex());
-      shared->IncDone();
-      if (shared->AllDone()) {
-        shared->GetCondVar()->SignalAll();
-      }
-    }
-
-  }
-
-  // Given a key K and value V, this puts ("0"+K, "0"+V), ("1"+K, "1"+V), ...
-  // ("9"+K, "9"+V) in DB atomically i.e in a single batch.
-  // Also refer MultiGet.
-  Status MultiPut(ThreadState* thread, const WriteOptions& writeoptions,
-                  ColumnFamilyHandle* column_family, const Slice& key,
-                  const Slice& value, size_t sz) {
-    std::string keys[10] = {"9", "8", "7", "6", "5",
-                            "4", "3", "2", "1", "0"};
-    std::string values[10] = {"9", "8", "7", "6", "5",
-                              "4", "3", "2", "1", "0"};
-    Slice value_slices[10];
-    WriteBatch batch;
-    Status s;
-    for (int i = 0; i < 10; i++) {
-      keys[i] += key.ToString();
-      values[i] += value.ToString();
-      value_slices[i] = values[i];
-      if (FLAGS_use_merge) {
-        batch.Merge(column_family, keys[i], value_slices[i]);
-      } else {
-        batch.Put(column_family, keys[i], value_slices[i]);
-      }
-    }
-
-    s = db_->Write(writeoptions, &batch);
-    if (!s.ok()) {
-      fprintf(stderr, "multiput error: %s\n", s.ToString().c_str());
-      thread->stats.AddErrors(1);
-    } else {
-      // we did 10 writes each of size sz + 1
-      thread->stats.AddBytesForWrites(10, (sz + 1) * 10);
-    }
-
-    return s;
-  }
-
-  // Given a key K, this deletes ("0"+K), ("1"+K),... ("9"+K)
-  // in DB atomically i.e in a single batch. Also refer MultiGet.
-  Status MultiDelete(ThreadState* thread, const WriteOptions& writeoptions,
-                     ColumnFamilyHandle* column_family, const Slice& key) {
-    std::string keys[10] = {"9", "7", "5", "3", "1",
-                            "8", "6", "4", "2", "0"};
-
-    WriteBatch batch;
-    Status s;
-    for (int i = 0; i < 10; i++) {
-      keys[i] += key.ToString();
-      batch.Delete(column_family, keys[i]);
-    }
-
-    s = db_->Write(writeoptions, &batch);
-    if (!s.ok()) {
-      fprintf(stderr, "multidelete error: %s\n", s.ToString().c_str());
-      thread->stats.AddErrors(1);
-    } else {
-      thread->stats.AddDeletes(10);
-    }
-
-    return s;
-  }
-
-  // Given a key K, this gets values for "0"+K, "1"+K,..."9"+K
-  // in the same snapshot, and verifies that all the values are of the form
-  // "0"+V, "1"+V,..."9"+V.
-  // ASSUMES that MultiPut was used to put (K, V) into the DB.
-  Status MultiGet(ThreadState* thread, const ReadOptions& readoptions,
-                  ColumnFamilyHandle* column_family, const Slice& key,
-                  std::string* value) {
-    std::string keys[10] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
-    Slice key_slices[10];
-    std::string values[10];
-    ReadOptions readoptionscopy = readoptions;
-    readoptionscopy.snapshot = db_->GetSnapshot();
-    Status s;
-    for (int i = 0; i < 10; i++) {
-      keys[i] += key.ToString();
-      key_slices[i] = keys[i];
-      s = db_->Get(readoptionscopy, column_family, key_slices[i], value);
-      if (!s.ok() && !s.IsNotFound()) {
-        fprintf(stderr, "get error: %s\n", s.ToString().c_str());
-        values[i] = "";
-        thread->stats.AddErrors(1);
-        // we continue after error rather than exiting so that we can
-        // find more errors if any
-      } else if (s.IsNotFound()) {
-        values[i] = "";
-        thread->stats.AddGets(1, 0);
-      } else {
-        values[i] = *value;
-
-        char expected_prefix = (keys[i])[0];
-        char actual_prefix = (values[i])[0];
-        if (actual_prefix != expected_prefix) {
-          fprintf(stderr, "error expected prefix = %c actual = %c\n",
-                  expected_prefix, actual_prefix);
-        }
-        (values[i])[0] = ' '; // blank out the differing character
-        thread->stats.AddGets(1, 1);
-      }
-    }
-    db_->ReleaseSnapshot(readoptionscopy.snapshot);
-
-    // Now that we retrieved all values, check that they all match
-    for (int i = 1; i < 10; i++) {
-      if (values[i] != values[0]) {
-        fprintf(stderr, "error : inconsistent values for key %s: %s, %s\n",
-                key.ToString(true).c_str(), StringToHex(values[0]).c_str(),
-                StringToHex(values[i]).c_str());
-      // we continue after error rather than exiting so that we can
-      // find more errors if any
-      }
-    }
-
-    return s;
-  }
-
-  // Given a key, this does prefix scans for "0"+P, "1"+P,..."9"+P
-  // in the same snapshot where P is the first FLAGS_prefix_size - 1 bytes
-  // of the key. Each of these 10 scans returns a series of values;
-  // each series should be the same length, and it is verified for each
-  // index i that all the i'th values are of the form "0"+V, "1"+V,..."9"+V.
-  // ASSUMES that MultiPut was used to put (K, V)
-  Status MultiPrefixScan(ThreadState* thread, const ReadOptions& readoptions,
-                         ColumnFamilyHandle* column_family,
-                         const Slice& key) {
-    std::string prefixes[10] = {"0", "1", "2", "3", "4",
-                                "5", "6", "7", "8", "9"};
-    Slice prefix_slices[10];
-    ReadOptions readoptionscopy[10];
-    const Snapshot* snapshot = db_->GetSnapshot();
-    Iterator* iters[10];
-    Status s = Status::OK();
-    for (int i = 0; i < 10; i++) {
-      prefixes[i] += key.ToString();
-      prefixes[i].resize(FLAGS_prefix_size);
-      prefix_slices[i] = Slice(prefixes[i]);
-      readoptionscopy[i] = readoptions;
-      readoptionscopy[i].snapshot = snapshot;
-      iters[i] = db_->NewIterator(readoptionscopy[i], column_family);
-      iters[i]->Seek(prefix_slices[i]);
-    }
-
-    int count = 0;
-    while (iters[0]->Valid() && iters[0]->key().starts_with(prefix_slices[0])) {
-      count++;
-      std::string values[10];
-      // get list of all values for this iteration
-      for (int i = 0; i < 10; i++) {
-        // no iterator should finish before the first one
-        assert(iters[i]->Valid() &&
-               iters[i]->key().starts_with(prefix_slices[i]));
-        values[i] = iters[i]->value().ToString();
-
-        char expected_first = (prefixes[i])[0];
-        char actual_first = (values[i])[0];
-
-        if (actual_first != expected_first) {
-          fprintf(stderr, "error expected first = %c actual = %c\n",
-                  expected_first, actual_first);
-        }
-        (values[i])[0] = ' '; // blank out the differing character
-      }
-      // make sure all values are equivalent
-      for (int i = 0; i < 10; i++) {
-        if (values[i] != values[0]) {
-          fprintf(stderr, "error : %d, inconsistent values for prefix %s: %s, %s\n",
-                  i, prefixes[i].c_str(), StringToHex(values[0]).c_str(),
-                  StringToHex(values[i]).c_str());
-          // we continue after error rather than exiting so that we can
-          // find more errors if any
-        }
-        iters[i]->Next();
-      }
-    }
-
-    // cleanup iterators and snapshot
-    for (int i = 0; i < 10; i++) {
-      // if the first iterator finished, they should have all finished
-      assert(!iters[i]->Valid() ||
-             !iters[i]->key().starts_with(prefix_slices[i]));
-      assert(iters[i]->status().ok());
-      delete iters[i];
-    }
-    db_->ReleaseSnapshot(snapshot);
-
-    if (s.ok()) {
-      thread->stats.AddPrefixes(1, count);
-    } else {
-      thread->stats.AddErrors(1);
-    }
-
-    return s;
-  }
-
-  // Given a key K, this creates an iterator which scans to K and then
-  // does a random sequence of Next/Prev operations.
-  Status MultiIterate(ThreadState* thread, const ReadOptions& readoptions,
-                      ColumnFamilyHandle* column_family, const Slice& key) {
-    Status s;
-    const Snapshot* snapshot = db_->GetSnapshot();
-    ReadOptions readoptionscopy = readoptions;
-    readoptionscopy.snapshot = snapshot;
-    unique_ptr<Iterator> iter(db_->NewIterator(readoptionscopy, column_family));
-
-    iter->Seek(key);
-    for (uint64_t i = 0; i < FLAGS_num_iterations && iter->Valid(); i++) {
-      if (thread->rand.OneIn(2)) {
-        iter->Next();
-      } else {
-        iter->Prev();
-      }
-    }
-
-    if (s.ok()) {
-      thread->stats.AddIterations(1);
-    } else {
-      thread->stats.AddErrors(1);
-    }
-
-    db_->ReleaseSnapshot(snapshot);
-
-    return s;
-  }
-
-  void OperateDb(ThreadState* thread) {
-    ReadOptions read_opts(FLAGS_verify_checksum, true);
-    WriteOptions write_opts;
-    char value[100];
-    long max_key = thread->shared->GetMaxKey();
-    std::string from_db;
-    if (FLAGS_sync) {
-      write_opts.sync = true;
-    }
-    write_opts.disableWAL = FLAGS_disable_wal;
-    const int prefixBound = (int)FLAGS_readpercent + (int)FLAGS_prefixpercent;
-    const int writeBound = prefixBound + (int)FLAGS_writepercent;
-    const int delBound = writeBound + (int)FLAGS_delpercent;
-
-    thread->stats.Start();
-    for (uint64_t i = 0; i < FLAGS_ops_per_thread; i++) {
-      if (thread->shared->HasVerificationFailedYet()) {
-        break;
-      }
-      if (i != 0 && (i % (FLAGS_ops_per_thread / (FLAGS_reopen + 1))) == 0) {
-        {
-          thread->stats.FinishedSingleOp();
-          MutexLock l(thread->shared->GetMutex());
-          thread->shared->IncVotedReopen();
-          if (thread->shared->AllVotedReopen()) {
-            thread->shared->GetStressTest()->Reopen();
-            thread->shared->GetCondVar()->SignalAll();
-          }
-          else {
-            thread->shared->GetCondVar()->Wait();
-          }
-          // Commenting this out as we don't want to reset stats on each open.
-          // thread->stats.Start();
-        }
-      }
-
-      if (!FLAGS_test_batches_snapshots &&
-          FLAGS_clear_column_family_one_in != 0) {
-        if (thread->rand.OneIn(FLAGS_clear_column_family_one_in)) {
-          // drop column family and then create it again (can't drop default)
-          int cf = thread->rand.Next() % (FLAGS_column_families - 1) + 1;
-          std::string new_name =
-              std::to_string(new_column_family_name_.fetch_add(1));
-          {
-            MutexLock l(thread->shared->GetMutex());
-            fprintf(
-                stdout,
-                "[CF %d] Dropping and recreating column family. new name: %s\n",
-                cf, new_name.c_str());
-          }
-          thread->shared->LockColumnFamily(cf);
-          Status s __attribute__((unused));
-          s = db_->DropColumnFamily(column_families_[cf]);
-          delete column_families_[cf];
-          assert(s.ok());
-          s = db_->CreateColumnFamily(ColumnFamilyOptions(options_), new_name,
-                                      &column_families_[cf]);
-          column_family_names_[cf] = new_name;
-          thread->shared->ClearColumnFamily(cf);
-          assert(s.ok());
-          thread->shared->UnlockColumnFamily(cf);
-        }
-      }
-
-      long rand_key = thread->rand.Next() % max_key;
-      int rand_column_family = thread->rand.Next() % FLAGS_column_families;
-      std::string keystr = Key(rand_key);
-      Slice key = keystr;
-      int prob_op = thread->rand.Uniform(100);
-      std::unique_ptr<MutexLock> l;
-      if (!FLAGS_test_batches_snapshots) {
-        l.reset(new MutexLock(
-            thread->shared->GetMutexForKey(rand_column_family, rand_key)));
-      }
-      auto column_family = column_families_[rand_column_family];
-
-      if (prob_op >= 0 && prob_op < (int)FLAGS_readpercent) {
-        // OPERATION read
-        if (!FLAGS_test_batches_snapshots) {
-          Status s = db_->Get(read_opts, column_family, key, &from_db);
-          if (s.ok()) {
-            // found case
-            thread->stats.AddGets(1, 1);
-          } else if (s.IsNotFound()) {
-            // not found case
-            thread->stats.AddGets(1, 0);
-          } else {
-            // errors case
-            thread->stats.AddErrors(1);
-          }
-        } else {
-          MultiGet(thread, read_opts, column_family, key, &from_db);
-        }
-      } else if ((int)FLAGS_readpercent <= prob_op && prob_op < prefixBound) {
-        // OPERATION prefix scan
-        // keys are 8 bytes long, prefix size is FLAGS_prefix_size. There are
-        // (8 - FLAGS_prefix_size) bytes besides the prefix. So there will
-        // be 2 ^ ((8 - FLAGS_prefix_size) * 8) possible keys with the same
-        // prefix
-        if (!FLAGS_test_batches_snapshots) {
-          Slice prefix = Slice(key.data(), FLAGS_prefix_size);
-          Iterator* iter = db_->NewIterator(read_opts, column_family);
-          int64_t count = 0;
-          for (iter->Seek(prefix);
-               iter->Valid() && iter->key().starts_with(prefix); iter->Next()) {
-            ++count;
-          }
-          assert(count <=
-                 (static_cast<int64_t>(1) << ((8 - FLAGS_prefix_size) * 8)));
-          if (iter->status().ok()) {
-            thread->stats.AddPrefixes(1, count);
-          } else {
-            thread->stats.AddErrors(1);
-          }
-          delete iter;
-        } else {
-          MultiPrefixScan(thread, read_opts, column_family, key);
-        }
-      } else if (prefixBound <= prob_op && prob_op < writeBound) {
-        // OPERATION write
-        uint32_t value_base = thread->rand.Next();
-        size_t sz = GenerateValue(value_base, value, sizeof(value));
-        Slice v(value, sz);
-        if (!FLAGS_test_batches_snapshots) {
-          if (FLAGS_verify_before_write) {
-            std::string keystr2 = Key(rand_key);
-            Slice k = keystr2;
-            Status s = db_->Get(read_opts, column_family, k, &from_db);
-            if (VerifyValue(rand_column_family, rand_key, read_opts,
-                            thread->shared, from_db, s, true) == false) {
-              break;
-            }
-          }
-          thread->shared->Put(rand_column_family, rand_key, value_base);
-          if (FLAGS_use_merge) {
-            db_->Merge(write_opts, column_family, key, v);
-          } else {
-            db_->Put(write_opts, column_family, key, v);
-          }
-          thread->stats.AddBytesForWrites(1, sz);
-        } else {
-          MultiPut(thread, write_opts, column_family, key, v, sz);
-        }
-        PrintKeyValue(rand_column_family, rand_key, value, sz);
-      } else if (writeBound <= prob_op && prob_op < delBound) {
-        // OPERATION delete
-        if (!FLAGS_test_batches_snapshots) {
-          thread->shared->Delete(rand_column_family, rand_key);
-          db_->Delete(write_opts, column_family, key);
-          thread->stats.AddDeletes(1);
-        } else {
-          MultiDelete(thread, write_opts, column_family, key);
-        }
-      } else {
-        // OPERATION iterate
-        MultiIterate(thread, read_opts, column_family, key);
-      }
-      thread->stats.FinishedSingleOp();
-    }
-
-    thread->stats.Stop();
-  }
-
-  void VerifyDb(ThreadState* thread) const {
-    ReadOptions options(FLAGS_verify_checksum, true);
-    auto shared = thread->shared;
-    static const long max_key = shared->GetMaxKey();
-    static const long keys_per_thread = max_key / shared->GetNumThreads();
-    long start = keys_per_thread * thread->tid;
-    long end = start + keys_per_thread;
-    if (thread->tid == shared->GetNumThreads() - 1) {
-      end = max_key;
-    }
-    for (size_t cf = 0; cf < column_families_.size(); ++cf) {
-      if (thread->shared->HasVerificationFailedYet()) {
-        break;
-      }
-      if (!thread->rand.OneIn(2)) {
-        // Use iterator to verify this range
-        unique_ptr<Iterator> iter(
-            db_->NewIterator(options, column_families_[cf]));
-        iter->Seek(Key(start));
-        for (long i = start; i < end; i++) {
-          if (thread->shared->HasVerificationFailedYet()) {
-            break;
-          }
-          // TODO(ljin): update "long" to uint64_t
-          // Reseek when the prefix changes
-          if (i % (static_cast<int64_t>(1) << 8 * (8 - FLAGS_prefix_size)) ==
-              0) {
-            iter->Seek(Key(i));
-          }
-          std::string from_db;
-          std::string keystr = Key(i);
-          Slice k = keystr;
-          Status s = iter->status();
-          if (iter->Valid()) {
-            if (iter->key().compare(k) > 0) {
-              s = Status::NotFound(Slice());
-            } else if (iter->key().compare(k) == 0) {
-              from_db = iter->value().ToString();
-              iter->Next();
-            } else if (iter->key().compare(k) < 0) {
-              VerificationAbort(shared, "An out of range key was found", cf, i);
-            }
-          } else {
-            // The iterator found no value for the key in question, so do not
-            // move to the next item in the iterator
-            s = Status::NotFound(Slice());
-          }
-          VerifyValue(cf, i, options, shared, from_db, s, true);
-          if (from_db.length()) {
-            PrintKeyValue(cf, i, from_db.data(), from_db.length());
-          }
-        }
-      } else {
-        // Use Get to verify this range
-        for (long i = start; i < end; i++) {
-          if (thread->shared->HasVerificationFailedYet()) {
-            break;
-          }
-          std::string from_db;
-          std::string keystr = Key(i);
-          Slice k = keystr;
-          Status s = db_->Get(options, column_families_[cf], k, &from_db);
-          VerifyValue(cf, i, options, shared, from_db, s, true);
-          if (from_db.length()) {
-            PrintKeyValue(cf, i, from_db.data(), from_db.length());
-          }
-        }
-      }
-    }
-  }
-
-  void VerificationAbort(SharedState* shared, std::string msg, int cf,
-                         long key) const {
-    printf("Verification failed for column family %d key %ld: %s\n", cf, key,
-           msg.c_str());
-    shared->SetVerificationFailure();
-  }
-
-  bool VerifyValue(int cf, long key, const ReadOptions& opts,
-                   SharedState* shared, const std::string& value_from_db,
-                   Status s, bool strict = false) const {
-    if (shared->HasVerificationFailedYet()) {
-      return false;
-    }
-    // compare value_from_db with the value in the shared state
-    char value[100];
-    uint32_t value_base = shared->Get(cf, key);
-    if (value_base == SharedState::SENTINEL && !strict) {
-      return true;
-    }
-
-    if (s.ok()) {
-      if (value_base == SharedState::SENTINEL) {
-        VerificationAbort(shared, "Unexpected value found", cf, key);
-        return false;
-      }
-      size_t sz = GenerateValue(value_base, value, sizeof(value));
-      if (value_from_db.length() != sz) {
-        VerificationAbort(shared, "Length of value read is not equal", cf, key);
-        return false;
-      }
-      if (memcmp(value_from_db.data(), value, sz) != 0) {
-        VerificationAbort(shared, "Contents of value read don't match", cf,
-                          key);
-        return false;
-      }
-    } else {
-      if (value_base != SharedState::SENTINEL) {
-        VerificationAbort(shared, "Value not found: " + s.ToString(), cf, key);
-        return false;
-      }
-    }
-    return true;
-  }
-
-  static void PrintKeyValue(int cf, uint32_t key, const char* value,
-                            size_t sz) {
-    if (!FLAGS_verbose) {
-      return;
-    }
-    fprintf(stdout, "[CF %d] %u ==> (%u) ", cf, key, (unsigned int)sz);
-    for (size_t i = 0; i < sz; i++) {
-      fprintf(stdout, "%X", value[i]);
-    }
-    fprintf(stdout, "\n");
-  }
-
-  static size_t GenerateValue(uint32_t rand, char *v, size_t max_sz) {
-    size_t value_sz = ((rand % 3) + 1) * FLAGS_value_size_mult;
-    assert(value_sz <= max_sz && value_sz >= sizeof(uint32_t));
-    *((uint32_t*)v) = rand;
-    for (size_t i=sizeof(uint32_t); i < value_sz; i++) {
-      v[i] = (char)(rand ^ i);
-    }
-    v[value_sz] = '\0';
-    return value_sz; // the size of the value set.
-  }
-
-  void PrintEnv() const {
-    fprintf(stdout, "RocksDB version     : %d.%d\n", kMajorVersion,
-            kMinorVersion);
-    fprintf(stdout, "Column families     : %d\n", FLAGS_column_families);
-    if (!FLAGS_test_batches_snapshots) {
-      fprintf(stdout, "Clear CFs one in    : %d\n",
-              FLAGS_clear_column_family_one_in);
-    }
-    fprintf(stdout, "Number of threads   : %d\n", FLAGS_threads);
-    fprintf(stdout,
-            "Ops per thread      : %lu\n",
-            (unsigned long)FLAGS_ops_per_thread);
-    std::string ttl_state("unused");
-    if (FLAGS_ttl > 0) {
-      ttl_state = NumberToString(FLAGS_ttl);
-    }
-    fprintf(stdout, "Time to live(sec)   : %s\n", ttl_state.c_str());
-    fprintf(stdout, "Read percentage     : %d%%\n", FLAGS_readpercent);
-    fprintf(stdout, "Prefix percentage   : %d%%\n", FLAGS_prefixpercent);
-    fprintf(stdout, "Write percentage    : %d%%\n", FLAGS_writepercent);
-    fprintf(stdout, "Delete percentage   : %d%%\n", FLAGS_delpercent);
-    fprintf(stdout, "Iterate percentage  : %d%%\n", FLAGS_iterpercent);
-    fprintf(stdout, "Write-buffer-size   : %d\n", FLAGS_write_buffer_size);
-    fprintf(stdout,
-            "Iterations          : %lu\n",
-            (unsigned long)FLAGS_num_iterations);
-    fprintf(stdout,
-            "Max key             : %lu\n",
-            (unsigned long)FLAGS_max_key);
-    fprintf(stdout, "Ratio #ops/#keys    : %f\n",
-            (1.0 * FLAGS_ops_per_thread * FLAGS_threads)/FLAGS_max_key);
-    fprintf(stdout, "Num times DB reopens: %d\n", FLAGS_reopen);
-    fprintf(stdout, "Batches/snapshots   : %d\n",
-            FLAGS_test_batches_snapshots);
-    fprintf(stdout, "Purge redundant %%   : %d\n",
-            FLAGS_purge_redundant_percent);
-    fprintf(stdout, "Deletes use filter  : %d\n",
-            FLAGS_filter_deletes);
-    fprintf(stdout, "Num keys per lock   : %d\n",
-            1 << FLAGS_log2_keys_per_lock);
-
-    const char* compression = "";
-    switch (FLAGS_compression_type_e) {
-      case rocksdb::kNoCompression:
-        compression = "none";
-        break;
-      case rocksdb::kSnappyCompression:
-        compression = "snappy";
-        break;
-      case rocksdb::kZlibCompression:
-        compression = "zlib";
-        break;
-      case rocksdb::kBZip2Compression:
-        compression = "bzip2";
-        break;
-      case rocksdb::kLZ4Compression:
-        compression = "lz4";
-      case rocksdb::kLZ4HCCompression:
-        compression = "lz4hc";
-        break;
-      }
-
-    fprintf(stdout, "Compression         : %s\n", compression);
-
-    const char* memtablerep = "";
-    switch (FLAGS_rep_factory) {
-      case kSkipList:
-        memtablerep = "skip_list";
-        break;
-      case kHashSkipList:
-        memtablerep = "prefix_hash";
-        break;
-      case kVectorRep:
-        memtablerep = "vector";
-        break;
-    }
-
-    fprintf(stdout, "Memtablerep         : %s\n", memtablerep);
-
-    fprintf(stdout, "------------------------------------------------\n");
-  }
-
-  void Open() {
-    assert(db_ == nullptr);
-    options_.block_cache = cache_;
-    options_.block_cache_compressed = compressed_cache_;
-    options_.write_buffer_size = FLAGS_write_buffer_size;
-    options_.max_write_buffer_number = FLAGS_max_write_buffer_number;
-    options_.min_write_buffer_number_to_merge =
-        FLAGS_min_write_buffer_number_to_merge;
-    options_.max_background_compactions = FLAGS_max_background_compactions;
-    options_.max_background_flushes = FLAGS_max_background_flushes;
-    options_.compaction_style =
-        static_cast<rocksdb::CompactionStyle>(FLAGS_compaction_style);
-    options_.block_size = FLAGS_block_size;
-    options_.filter_policy = filter_policy_;
-    options_.prefix_extractor.reset(NewFixedPrefixTransform(FLAGS_prefix_size));
-    options_.max_open_files = FLAGS_open_files;
-    options_.statistics = dbstats;
-    options_.env = FLAGS_env;
-    options_.disableDataSync = FLAGS_disable_data_sync;
-    options_.use_fsync = FLAGS_use_fsync;
-    options_.allow_mmap_reads = FLAGS_mmap_read;
-    rocksdb_kill_odds = FLAGS_kill_random_test;
-    options_.target_file_size_base = FLAGS_target_file_size_base;
-    options_.target_file_size_multiplier = FLAGS_target_file_size_multiplier;
-    options_.max_bytes_for_level_base = FLAGS_max_bytes_for_level_base;
-    options_.max_bytes_for_level_multiplier =
-        FLAGS_max_bytes_for_level_multiplier;
-    options_.level0_stop_writes_trigger = FLAGS_level0_stop_writes_trigger;
-    options_.level0_slowdown_writes_trigger =
-        FLAGS_level0_slowdown_writes_trigger;
-    options_.level0_file_num_compaction_trigger =
-        FLAGS_level0_file_num_compaction_trigger;
-    options_.compression = FLAGS_compression_type_e;
-    options_.create_if_missing = true;
-    options_.disable_seek_compaction = FLAGS_disable_seek_compaction;
-    options_.max_manifest_file_size = 10 * 1024;
-    options_.filter_deletes = FLAGS_filter_deletes;
-    if ((FLAGS_prefix_size == 0) == (FLAGS_rep_factory == kHashSkipList)) {
-      fprintf(stderr,
-            "prefix_size should be non-zero iff memtablerep == prefix_hash\n");
-      exit(1);
-    }
-    switch (FLAGS_rep_factory) {
-      case kHashSkipList:
-        options_.memtable_factory.reset(NewHashSkipListRepFactory());
-        break;
-      case kSkipList:
-        // no need to do anything
-        break;
-      case kVectorRep:
-        options_.memtable_factory.reset(new VectorRepFactory());
-        break;
-    }
-    static Random purge_percent(1000); // no benefit from non-determinism here
-    if (static_cast<int32_t>(purge_percent.Uniform(100)) <
-        FLAGS_purge_redundant_percent - 1) {
-      options_.purge_redundant_kvs_while_flush = false;
-    }
-
-    if (FLAGS_use_merge) {
-      options_.merge_operator = MergeOperators::CreatePutOperator();
-    }
-
-    // set universal style compaction configurations, if applicable
-    if (FLAGS_universal_size_ratio != 0) {
-      options_.compaction_options_universal.size_ratio =
-          FLAGS_universal_size_ratio;
-    }
-    if (FLAGS_universal_min_merge_width != 0) {
-      options_.compaction_options_universal.min_merge_width =
-          FLAGS_universal_min_merge_width;
-    }
-    if (FLAGS_universal_max_merge_width != 0) {
-      options_.compaction_options_universal.max_merge_width =
-          FLAGS_universal_max_merge_width;
-    }
-    if (FLAGS_universal_max_size_amplification_percent != 0) {
-      options_.compaction_options_universal.max_size_amplification_percent =
-          FLAGS_universal_max_size_amplification_percent;
-    }
-
-    fprintf(stdout, "DB path: [%s]\n", FLAGS_db.c_str());
-
-    Status s;
-    if (FLAGS_ttl == -1) {
-      std::vector<std::string> existing_column_families;
-      s = DB::ListColumnFamilies(DBOptions(options_), FLAGS_db,
-                                 &existing_column_families);  // ignore errors
-      if (!s.ok()) {
-        // DB doesn't exist
-        assert(existing_column_families.empty());
-        assert(column_family_names_.empty());
-        column_family_names_.push_back(kDefaultColumnFamilyName);
-      } else if (column_family_names_.empty()) {
-        // this is the first call to the function Open()
-        column_family_names_ = existing_column_families;
-      } else {
-        // this is a reopen. just assert that existing column_family_names are
-        // equivalent to what we remember
-        auto sorted_cfn = column_family_names_;
-        sort(sorted_cfn.begin(), sorted_cfn.end());
-        sort(existing_column_families.begin(), existing_column_families.end());
-        if (sorted_cfn != existing_column_families) {
-          fprintf(stderr,
-                  "Expected column families differ from the existing:\n");
-          printf("Expected: {");
-          for (auto cf : sorted_cfn) {
-            printf("%s ", cf.c_str());
-          }
-          printf("}\n");
-          printf("Existing: {");
-          for (auto cf : existing_column_families) {
-            printf("%s ", cf.c_str());
-          }
-          printf("}\n");
-        }
-        assert(sorted_cfn == existing_column_families);
-      }
-      std::vector<ColumnFamilyDescriptor> cf_descriptors;
-      for (auto name : column_family_names_) {
-        if (name != kDefaultColumnFamilyName) {
-          new_column_family_name_ =
-              std::max(new_column_family_name_.load(), std::stoi(name) + 1);
-        }
-        cf_descriptors.emplace_back(name, ColumnFamilyOptions(options_));
-      }
-      s = DB::Open(DBOptions(options_), FLAGS_db, cf_descriptors,
-                   &column_families_, &db_);
-      if (s.ok()) {
-        while (s.ok() &&
-               column_families_.size() < (size_t)FLAGS_column_families) {
-          ColumnFamilyHandle* cf = nullptr;
-          std::string name = std::to_string(new_column_family_name_.load());
-          new_column_family_name_++;
-          s = db_->CreateColumnFamily(ColumnFamilyOptions(options_), name, &cf);
-          column_families_.push_back(cf);
-          column_family_names_.push_back(name);
-        }
-      }
-      assert(!s.ok() || column_families_.size() ==
-                            static_cast<size_t>(FLAGS_column_families));
-    } else {
-      DBWithTTL* db_with_ttl;
-      s = DBWithTTL::Open(options_, FLAGS_db, &db_with_ttl, FLAGS_ttl);
-      db_ = db_with_ttl;
-    }
-    if (!s.ok()) {
-      fprintf(stderr, "open error: %s\n", s.ToString().c_str());
-      exit(1);
-    }
-  }
-
-  void Reopen() {
-    for (auto cf : column_families_) {
-      delete cf;
-    }
-    column_families_.clear();
-    delete db_;
-    db_ = nullptr;
-
-    num_times_reopened_++;
-    double now = FLAGS_env->NowMicros();
-    fprintf(stdout, "%s Reopening database for the %dth time\n",
-            FLAGS_env->TimeToString((uint64_t) now/1000000).c_str(),
-            num_times_reopened_);
-    Open();
-  }
-
-  void PrintStatistics() {
-    if (dbstats) {
-      fprintf(stdout, "STATISTICS:\n%s\n", dbstats->ToString().c_str());
-    }
-  }
-
- private:
-  shared_ptr<Cache> cache_;
-  shared_ptr<Cache> compressed_cache_;
-  const FilterPolicy* filter_policy_;
-  DB* db_;
-  Options options_;
-  std::vector<ColumnFamilyHandle*> column_families_;
-  std::vector<std::string> column_family_names_;
-  std::atomic<int> new_column_family_name_;
-  int num_times_reopened_;
-};
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  google::SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) +
-                          " [OPTIONS]...");
-  google::ParseCommandLineFlags(&argc, &argv, true);
-
-  if (FLAGS_statistics) {
-    dbstats = rocksdb::CreateDBStatistics();
-  }
-  FLAGS_compression_type_e =
-    StringToCompressionType(FLAGS_compression_type.c_str());
-  if (!FLAGS_hdfs.empty()) {
-    FLAGS_env  = new rocksdb::HdfsEnv(FLAGS_hdfs);
-  }
-  FLAGS_rep_factory = StringToRepFactory(FLAGS_memtablerep.c_str());
-
-  // The number of background threads should be at least as much the
-  // max number of concurrent compactions.
-  FLAGS_env->SetBackgroundThreads(FLAGS_max_background_compactions);
-
-  if (FLAGS_prefixpercent > 0 && FLAGS_prefix_size <= 0) {
-    fprintf(stderr,
-            "Error: prefixpercent is non-zero while prefix_size is "
-            "not positive!\n");
-    exit(1);
-  }
-  if (FLAGS_test_batches_snapshots && FLAGS_prefix_size <= 0) {
-    fprintf(stderr,
-            "Error: please specify prefix_size for "
-            "test_batches_snapshots test!\n");
-    exit(1);
-  }
-  if ((FLAGS_readpercent + FLAGS_prefixpercent +
-       FLAGS_writepercent + FLAGS_delpercent + FLAGS_iterpercent) != 100) {
-      fprintf(stderr,
-              "Error: Read+Prefix+Write+Delete+Iterate percents != 100!\n");
-      exit(1);
-  }
-  if (FLAGS_disable_wal == 1 && FLAGS_reopen > 0) {
-      fprintf(stderr, "Error: Db cannot reopen safely with disable_wal set!\n");
-      exit(1);
-  }
-  if ((unsigned)FLAGS_reopen >= FLAGS_ops_per_thread) {
-      fprintf(stderr,
-              "Error: #DB-reopens should be < ops_per_thread\n"
-              "Provided reopens = %d and ops_per_thread = %lu\n",
-              FLAGS_reopen,
-              (unsigned long)FLAGS_ops_per_thread);
-      exit(1);
-  }
-
-  // Choose a location for the test database if none given with --db=<path>
-  if (FLAGS_db.empty()) {
-      std::string default_db_path;
-      rocksdb::Env::Default()->GetTestDirectory(&default_db_path);
-      default_db_path += "/dbstress";
-      FLAGS_db = default_db_path;
-  }
-
-  rocksdb::StressTest stress;
-  if (stress.Run()) {
-    return 0;
-  } else {
-    return 1;
-  }
-}
diff --git a/src/rocksdb/tools/ldb.cc b/src/rocksdb/tools/ldb.cc
deleted file mode 100644
index 4581b80..0000000
--- a/src/rocksdb/tools/ldb.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#include "rocksdb/ldb_tool.h"
-
-int main(int argc, char** argv) {
-  rocksdb::LDBTool tool;
-  tool.Run(argc, argv);
-  return 0;
-}
diff --git a/src/rocksdb/tools/ldb_test.py b/src/rocksdb/tools/ldb_test.py
deleted file mode 100644
index b4ef522..0000000
--- a/src/rocksdb/tools/ldb_test.py
+++ /dev/null
@@ -1,383 +0,0 @@
-import os
-import os.path
-import shutil
-import subprocess
-import time
-import unittest
-import tempfile
-
-def my_check_output(*popenargs, **kwargs):
-    """
-    If we had python 2.7, we should simply use subprocess.check_output.
-    This is a stop-gap solution for python 2.6
-    """
-    if 'stdout' in kwargs:
-        raise ValueError('stdout argument not allowed, it will be overridden.')
-    process = subprocess.Popen(stderr=subprocess.PIPE, stdout=subprocess.PIPE,
-                               *popenargs, **kwargs)
-    output, unused_err = process.communicate()
-    retcode = process.poll()
-    if retcode:
-        cmd = kwargs.get("args")
-        if cmd is None:
-            cmd = popenargs[0]
-        raise Exception("Exit code is not 0.  It is %d.  Command: %s" %
-                (retcode, cmd))
-    return output
-
-def run_err_null(cmd):
-    return os.system(cmd + " 2>/dev/null ")
-
-class LDBTestCase(unittest.TestCase):
-    def setUp(self):
-        self.TMP_DIR  = tempfile.mkdtemp(prefix="ldb_test_")
-        self.DB_NAME = "testdb"
-
-    def tearDown(self):
-        assert(self.TMP_DIR.strip() != "/"
-                and self.TMP_DIR.strip() != "/tmp"
-                and self.TMP_DIR.strip() != "/tmp/") #Just some paranoia
-
-        shutil.rmtree(self.TMP_DIR)
-
-    def dbParam(self, dbName):
-        return "--db=%s" % os.path.join(self.TMP_DIR, dbName)
-
-    def assertRunOKFull(self, params, expectedOutput, unexpected=False):
-        """
-        All command-line params must be specified.
-        Allows full flexibility in testing; for example: missing db param.
-
-        """
-
-        output = my_check_output("./ldb %s |grep -v \"Created bg thread\"" %
-                            params, shell=True)
-        if not unexpected:
-            self.assertEqual(output.strip(), expectedOutput.strip())
-        else:
-            self.assertNotEqual(output.strip(), expectedOutput.strip())
-
-    def assertRunFAILFull(self, params):
-        """
-        All command-line params must be specified.
-        Allows full flexibility in testing; for example: missing db param.
-
-        """
-        try:
-
-            my_check_output("./ldb %s >/dev/null 2>&1 |grep -v \"Created bg \
-                thread\"" % params, shell=True)
-        except Exception, e:
-            return
-        self.fail(
-            "Exception should have been raised for command with params: %s" %
-            params)
-
-    def assertRunOK(self, params, expectedOutput, unexpected=False):
-        """
-        Uses the default test db.
-
-        """
-        self.assertRunOKFull("%s %s" % (self.dbParam(self.DB_NAME), params),
-                             expectedOutput, unexpected)
-
-    def assertRunFAIL(self, params):
-        """
-        Uses the default test db.
-        """
-        self.assertRunFAILFull("%s %s" % (self.dbParam(self.DB_NAME), params))
-
-    def testSimpleStringPutGet(self):
-        print "Running testSimpleStringPutGet..."
-        self.assertRunFAIL("put x1 y1")
-        self.assertRunOK("put --create_if_missing x1 y1", "OK")
-        self.assertRunOK("get x1", "y1")
-        self.assertRunFAIL("get x2")
-
-        self.assertRunOK("put x2 y2", "OK")
-        self.assertRunOK("get x1", "y1")
-        self.assertRunOK("get x2", "y2")
-        self.assertRunFAIL("get x3")
-
-        self.assertRunOK("scan --from=x1 --to=z", "x1 : y1\nx2 : y2")
-        self.assertRunOK("put x3 y3", "OK")
-
-        self.assertRunOK("scan --from=x1 --to=z", "x1 : y1\nx2 : y2\nx3 : y3")
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3")
-        self.assertRunOK("scan --from=x", "x1 : y1\nx2 : y2\nx3 : y3")
-
-        self.assertRunOK("scan --to=x2", "x1 : y1")
-        self.assertRunOK("scan --from=x1 --to=z --max_keys=1", "x1 : y1")
-        self.assertRunOK("scan --from=x1 --to=z --max_keys=2",
-                "x1 : y1\nx2 : y2")
-
-        self.assertRunOK("scan --from=x1 --to=z --max_keys=3",
-                "x1 : y1\nx2 : y2\nx3 : y3")
-        self.assertRunOK("scan --from=x1 --to=z --max_keys=4",
-                "x1 : y1\nx2 : y2\nx3 : y3")
-        self.assertRunOK("scan --from=x1 --to=x2", "x1 : y1")
-        self.assertRunOK("scan --from=x2 --to=x4", "x2 : y2\nx3 : y3")
-        self.assertRunFAIL("scan --from=x4 --to=z") # No results => FAIL
-        self.assertRunFAIL("scan --from=x1 --to=z --max_keys=foo")
-
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3")
-
-        self.assertRunOK("delete x1", "OK")
-        self.assertRunOK("scan", "x2 : y2\nx3 : y3")
-
-        self.assertRunOK("delete NonExistentKey", "OK")
-        # It is weird that GET and SCAN raise exception for
-        # non-existent key, while delete does not
-
-        self.assertRunOK("checkconsistency", "OK")
-
-    def dumpDb(self, params, dumpFile):
-        return 0 == run_err_null("./ldb dump %s > %s" % (params, dumpFile))
-
-    def loadDb(self, params, dumpFile):
-        return 0 == run_err_null("cat %s | ./ldb load %s" % (dumpFile, params))
-
-    def testStringBatchPut(self):
-        print "Running testStringBatchPut..."
-        self.assertRunOK("batchput x1 y1 --create_if_missing", "OK")
-        self.assertRunOK("scan", "x1 : y1")
-        self.assertRunOK("batchput x2 y2 x3 y3 \"x4 abc\" \"y4 xyz\"", "OK")
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 abc : y4 xyz")
-        self.assertRunFAIL("batchput")
-        self.assertRunFAIL("batchput k1")
-        self.assertRunFAIL("batchput k1 v1 k2")
-
-    def testCountDelimDump(self):
-        print "Running testCountDelimDump..."
-        self.assertRunOK("batchput x.1 x1 --create_if_missing", "OK")
-        self.assertRunOK("batchput y.abc abc y.2 2 z.13c pqr", "OK")
-        self.assertRunOK("dump --count_delim", "x => count:1\tsize:5\ny => count:2\tsize:12\nz => count:1\tsize:8")
-        self.assertRunOK("dump --count_delim=\".\"", "x => count:1\tsize:5\ny => count:2\tsize:12\nz => count:1\tsize:8")
-        self.assertRunOK("batchput x,2 x2 x,abc xabc", "OK")
-        self.assertRunOK("dump --count_delim=\",\"", "x => count:2\tsize:14\nx.1 => count:1\tsize:5\ny.2 => count:1\tsize:4\ny.abc => count:1\tsize:8\nz.13c => count:1\tsize:8")
-
-    def testCountDelimIDump(self):
-        print "Running testCountDelimIDump..."
-        self.assertRunOK("batchput x.1 x1 --create_if_missing", "OK")
-        self.assertRunOK("batchput y.abc abc y.2 2 z.13c pqr", "OK")
-        self.assertRunOK("dump --count_delim", "x => count:1\tsize:5\ny => count:2\tsize:12\nz => count:1\tsize:8")
-        self.assertRunOK("dump --count_delim=\".\"", "x => count:1\tsize:5\ny => count:2\tsize:12\nz => count:1\tsize:8")
-        self.assertRunOK("batchput x,2 x2 x,abc xabc", "OK")
-        self.assertRunOK("dump --count_delim=\",\"", "x => count:2\tsize:14\nx.1 => count:1\tsize:5\ny.2 => count:1\tsize:4\ny.abc => count:1\tsize:8\nz.13c => count:1\tsize:8")
-
-    def testInvalidCmdLines(self):
-        print "Running testInvalidCmdLines..."
-        # db not specified
-        self.assertRunFAILFull("put 0x6133 0x6233 --hex --create_if_missing")
-        # No param called he
-        self.assertRunFAIL("put 0x6133 0x6233 --he --create_if_missing")
-        # max_keys is not applicable for put
-        self.assertRunFAIL("put 0x6133 0x6233 --max_keys=1 --create_if_missing")
-        # hex has invalid boolean value
-
-    def testHexPutGet(self):
-        print "Running testHexPutGet..."
-        self.assertRunOK("put a1 b1 --create_if_missing", "OK")
-        self.assertRunOK("scan", "a1 : b1")
-        self.assertRunOK("scan --hex", "0x6131 : 0x6231")
-        self.assertRunFAIL("put --hex 6132 6232")
-        self.assertRunOK("put --hex 0x6132 0x6232", "OK")
-        self.assertRunOK("scan --hex", "0x6131 : 0x6231\n0x6132 : 0x6232")
-        self.assertRunOK("scan", "a1 : b1\na2 : b2")
-        self.assertRunOK("get a1", "b1")
-        self.assertRunOK("get --hex 0x6131", "0x6231")
-        self.assertRunOK("get a2", "b2")
-        self.assertRunOK("get --hex 0x6132", "0x6232")
-        self.assertRunOK("get --key_hex 0x6132", "b2")
-        self.assertRunOK("get --key_hex --value_hex 0x6132", "0x6232")
-        self.assertRunOK("get --value_hex a2", "0x6232")
-        self.assertRunOK("scan --key_hex --value_hex",
-                "0x6131 : 0x6231\n0x6132 : 0x6232")
-        self.assertRunOK("scan --hex --from=0x6131 --to=0x6133",
-                "0x6131 : 0x6231\n0x6132 : 0x6232")
-        self.assertRunOK("scan --hex --from=0x6131 --to=0x6132",
-                "0x6131 : 0x6231")
-        self.assertRunOK("scan --key_hex", "0x6131 : b1\n0x6132 : b2")
-        self.assertRunOK("scan --value_hex", "a1 : 0x6231\na2 : 0x6232")
-        self.assertRunOK("batchput --hex 0x6133 0x6233 0x6134 0x6234", "OK")
-        self.assertRunOK("scan", "a1 : b1\na2 : b2\na3 : b3\na4 : b4")
-        self.assertRunOK("delete --hex 0x6133", "OK")
-        self.assertRunOK("scan", "a1 : b1\na2 : b2\na4 : b4")
-        self.assertRunOK("checkconsistency", "OK")
-
-    def testTtlPutGet(self):
-        print "Running testTtlPutGet..."
-        self.assertRunOK("put a1 b1 --ttl --create_if_missing", "OK")
-        self.assertRunOK("scan --hex", "0x6131 : 0x6231", True)
-        self.assertRunOK("dump --ttl ", "a1 ==> b1", True)
-        self.assertRunOK("dump --hex --ttl ",
-                         "0x6131 ==> 0x6231\nKeys in range: 1")
-        self.assertRunOK("scan --hex --ttl", "0x6131 : 0x6231")
-        self.assertRunOK("get --value_hex a1", "0x6231", True)
-        self.assertRunOK("get --ttl a1", "b1")
-        self.assertRunOK("put a3 b3 --create_if_missing", "OK")
-        # fails because timstamp's length is greater than value's
-        self.assertRunFAIL("get --ttl a3")
-        self.assertRunOK("checkconsistency", "OK")
-
-    def testInvalidCmdLines(self):
-        print "Running testInvalidCmdLines..."
-        # db not specified
-        self.assertRunFAILFull("put 0x6133 0x6233 --hex --create_if_missing")
-        # No param called he
-        self.assertRunFAIL("put 0x6133 0x6233 --he --create_if_missing")
-        # max_keys is not applicable for put
-        self.assertRunFAIL("put 0x6133 0x6233 --max_keys=1 --create_if_missing")
-        # hex has invalid boolean value
-        self.assertRunFAIL("put 0x6133 0x6233 --hex=Boo --create_if_missing")
-
-    def testDumpLoad(self):
-        print "Running testDumpLoad..."
-        self.assertRunOK("batchput --create_if_missing x1 y1 x2 y2 x3 y3 x4 y4",
-                "OK")
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-        origDbPath = os.path.join(self.TMP_DIR, self.DB_NAME)
-
-        # Dump and load without any additional params specified
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump1")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump1")
-        self.assertTrue(self.dumpDb("--db=%s" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s --create_if_missing" % loadedDbPath, dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath,
-                "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        # Dump and load in hex
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump2")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump2")
-        self.assertTrue(self.dumpDb("--db=%s --hex" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s --hex --create_if_missing" % loadedDbPath, dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath,
-                "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        # Dump only a portion of the key range
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump3")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump3")
-        self.assertTrue(self.dumpDb(
-            "--db=%s --from=x1 --to=x3" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s --create_if_missing" % loadedDbPath, dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath, "x1 : y1\nx2 : y2")
-
-        # Dump upto max_keys rows
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump4")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump4")
-        self.assertTrue(self.dumpDb(
-            "--db=%s --max_keys=3" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s --create_if_missing" % loadedDbPath, dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath,
-                "x1 : y1\nx2 : y2\nx3 : y3")
-
-        # Load into an existing db, create_if_missing is not specified
-        self.assertTrue(self.dumpDb("--db=%s" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb("--db=%s" % loadedDbPath, dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath,
-                "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        # Dump and load with WAL disabled
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump5")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump5")
-        self.assertTrue(self.dumpDb("--db=%s" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s --disable_wal --create_if_missing" % loadedDbPath,
-            dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath,
-                "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        # Dump and load with lots of extra params specified
-        extraParams = " ".join(["--bloom_bits=14", "--compression_type=bzip2",
-                                "--block_size=1024", "--auto_compaction=true",
-                                "--write_buffer_size=4194304",
-                                "--file_size=2097152"])
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump6")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump6")
-        self.assertTrue(self.dumpDb(
-            "--db=%s %s" % (origDbPath, extraParams), dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s %s --create_if_missing" % (loadedDbPath, extraParams),
-            dumpFilePath))
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath,
-                "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        # Dump with count_only
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump7")
-        loadedDbPath = os.path.join(self.TMP_DIR, "loaded_from_dump7")
-        self.assertTrue(self.dumpDb(
-            "--db=%s --count_only" % origDbPath, dumpFilePath))
-        self.assertTrue(self.loadDb(
-            "--db=%s --create_if_missing" % loadedDbPath, dumpFilePath))
-        # DB should have atleast one value for scan to work
-        self.assertRunOKFull("put --db=%s k1 v1" % loadedDbPath, "OK")
-        self.assertRunOKFull("scan --db=%s" % loadedDbPath, "k1 : v1")
-
-        # Dump command fails because of typo in params
-        dumpFilePath = os.path.join(self.TMP_DIR, "dump8")
-        self.assertFalse(self.dumpDb(
-            "--db=%s --create_if_missing" % origDbPath, dumpFilePath))
-
-    def testMiscAdminTask(self):
-        print "Running testMiscAdminTask..."
-        # These tests need to be improved; for example with asserts about
-        # whether compaction or level reduction actually took place.
-        self.assertRunOK("batchput --create_if_missing x1 y1 x2 y2 x3 y3 x4 y4",
-                "OK")
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-        origDbPath = os.path.join(self.TMP_DIR, self.DB_NAME)
-
-        self.assertTrue(0 == run_err_null(
-            "./ldb compact --db=%s" % origDbPath))
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        self.assertTrue(0 == run_err_null(
-            "./ldb reduce_levels --db=%s --new_levels=2" % origDbPath))
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        self.assertTrue(0 == run_err_null(
-            "./ldb reduce_levels --db=%s --new_levels=3" % origDbPath))
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        self.assertTrue(0 == run_err_null(
-            "./ldb compact --db=%s --from=x1 --to=x3" % origDbPath))
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        self.assertTrue(0 == run_err_null(
-            "./ldb compact --db=%s --hex --from=0x6131 --to=0x6134"
-            % origDbPath))
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-        #TODO(dilip): Not sure what should be passed to WAL.Currently corrupted.
-        self.assertTrue(0 == run_err_null(
-            "./ldb dump_wal --db=%s --walfile=%s --header" % (
-                origDbPath, os.path.join(origDbPath, "LOG"))))
-        self.assertRunOK("scan", "x1 : y1\nx2 : y2\nx3 : y3\nx4 : y4")
-
-    def testCheckConsistency(self):
-        print "Running testCheckConsistency..."
-
-        dbPath = os.path.join(self.TMP_DIR, self.DB_NAME)
-        self.assertRunOK("put x1 y1 --create_if_missing", "OK")
-        self.assertRunOK("put x2 y2", "OK")
-        self.assertRunOK("get x1", "y1")
-        self.assertRunOK("checkconsistency", "OK")
-
-        sstFilePath = my_check_output("ls %s" % os.path.join(dbPath, "*.sst"),
-                                      shell=True)
-
-        # Modify the file
-        my_check_output("echo 'evil' > %s" % sstFilePath, shell=True)
-        self.assertRunFAIL("checkconsistency")
-
-        # Delete the file
-        my_check_output("rm -f %s" % sstFilePath, shell=True)
-        self.assertRunFAIL("checkconsistency")
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/src/rocksdb/tools/reduce_levels_test.cc b/src/rocksdb/tools/reduce_levels_test.cc
deleted file mode 100644
index b588b52..0000000
--- a/src/rocksdb/tools/reduce_levels_test.cc
+++ /dev/null
@@ -1,197 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "rocksdb/db.h"
-#include "db/db_impl.h"
-#include "db/version_set.h"
-#include "util/logging.h"
-#include "util/testutil.h"
-#include "util/testharness.h"
-#include "util/ldb_cmd.h"
-
-namespace rocksdb {
-
-class ReduceLevelTest {
-public:
-  ReduceLevelTest() {
-    dbname_ = test::TmpDir() + "/db_reduce_levels_test";
-    DestroyDB(dbname_, Options());
-    db_ = nullptr;
-  }
-
-  Status OpenDB(bool create_if_missing, int levels,
-      int mem_table_compact_level);
-
-  Status Put(const std::string& k, const std::string& v) {
-    return db_->Put(WriteOptions(), k, v);
-  }
-
-  std::string Get(const std::string& k) {
-    ReadOptions options;
-    std::string result;
-    Status s = db_->Get(options, k, &result);
-    if (s.IsNotFound()) {
-      result = "NOT_FOUND";
-    } else if (!s.ok()) {
-      result = s.ToString();
-    }
-    return result;
-  }
-
-  Status CompactMemTable() {
-    if (db_ == nullptr) {
-      return Status::InvalidArgument("DB not opened.");
-    }
-    DBImpl* db_impl = reinterpret_cast<DBImpl*>(db_);
-    return db_impl->TEST_FlushMemTable();
-  }
-
-  void CloseDB() {
-    if (db_ != nullptr) {
-      delete db_;
-      db_ = nullptr;
-    }
-  }
-
-  bool ReduceLevels(int target_level);
-
-  int FilesOnLevel(int level) {
-    std::string property;
-    ASSERT_TRUE(
-        db_->GetProperty("rocksdb.num-files-at-level" + NumberToString(level),
-                         &property));
-    return atoi(property.c_str());
-  }
-
-private:
-  std::string dbname_;
-  DB* db_;
-};
-
-Status ReduceLevelTest::OpenDB(bool create_if_missing, int num_levels,
-    int mem_table_compact_level) {
-  rocksdb::Options opt;
-  opt.num_levels = num_levels;
-  opt.create_if_missing = create_if_missing;
-  opt.max_mem_compaction_level = mem_table_compact_level;
-  rocksdb::Status st = rocksdb::DB::Open(opt, dbname_, &db_);
-  if (!st.ok()) {
-    fprintf(stderr, "Can't open the db:%s\n", st.ToString().c_str());
-  }
-  return st;
-}
-
-bool ReduceLevelTest::ReduceLevels(int target_level) {
-  std::vector<std::string> args = rocksdb::ReduceDBLevelsCommand::PrepareArgs(
-      dbname_, target_level, false);
-  LDBCommand* level_reducer = LDBCommand::InitFromCmdLineArgs(args);
-  level_reducer->Run();
-  bool is_succeed = level_reducer->GetExecuteState().IsSucceed();
-  delete level_reducer;
-  return is_succeed;
-}
-
-TEST(ReduceLevelTest, Last_Level) {
-  // create files on all levels;
-  ASSERT_OK(OpenDB(true, 4, 3));
-  ASSERT_OK(Put("aaaa", "11111"));
-  ASSERT_OK(CompactMemTable());
-  ASSERT_EQ(FilesOnLevel(3), 1);
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(3));
-  ASSERT_OK(OpenDB(true, 3, 1));
-  ASSERT_EQ(FilesOnLevel(2), 1);
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(2));
-  ASSERT_OK(OpenDB(true, 2, 1));
-  ASSERT_EQ(FilesOnLevel(1), 1);
-  CloseDB();
-}
-
-TEST(ReduceLevelTest, Top_Level) {
-  // create files on all levels;
-  ASSERT_OK(OpenDB(true, 5, 0));
-  ASSERT_OK(Put("aaaa", "11111"));
-  ASSERT_OK(CompactMemTable());
-  ASSERT_EQ(FilesOnLevel(0), 1);
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(4));
-  ASSERT_OK(OpenDB(true, 4, 0));
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(3));
-  ASSERT_OK(OpenDB(true, 3, 0));
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(2));
-  ASSERT_OK(OpenDB(true, 2, 0));
-  CloseDB();
-}
-
-TEST(ReduceLevelTest, All_Levels) {
-  // create files on all levels;
-  ASSERT_OK(OpenDB(true, 5, 1));
-  ASSERT_OK(Put("a", "a11111"));
-  ASSERT_OK(CompactMemTable());
-  ASSERT_EQ(FilesOnLevel(1), 1);
-  CloseDB();
-
-  ASSERT_OK(OpenDB(true, 5, 2));
-  ASSERT_OK(Put("b", "b11111"));
-  ASSERT_OK(CompactMemTable());
-  ASSERT_EQ(FilesOnLevel(1), 1);
-  ASSERT_EQ(FilesOnLevel(2), 1);
-  CloseDB();
-
-  ASSERT_OK(OpenDB(true, 5, 3));
-  ASSERT_OK(Put("c", "c11111"));
-  ASSERT_OK(CompactMemTable());
-  ASSERT_EQ(FilesOnLevel(1), 1);
-  ASSERT_EQ(FilesOnLevel(2), 1);
-  ASSERT_EQ(FilesOnLevel(3), 1);
-  CloseDB();
-
-  ASSERT_OK(OpenDB(true, 5, 4));
-  ASSERT_OK(Put("d", "d11111"));
-  ASSERT_OK(CompactMemTable());
-  ASSERT_EQ(FilesOnLevel(1), 1);
-  ASSERT_EQ(FilesOnLevel(2), 1);
-  ASSERT_EQ(FilesOnLevel(3), 1);
-  ASSERT_EQ(FilesOnLevel(4), 1);
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(4));
-  ASSERT_OK(OpenDB(true, 4, 0));
-  ASSERT_EQ("a11111", Get("a"));
-  ASSERT_EQ("b11111", Get("b"));
-  ASSERT_EQ("c11111", Get("c"));
-  ASSERT_EQ("d11111", Get("d"));
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(3));
-  ASSERT_OK(OpenDB(true, 3, 0));
-  ASSERT_EQ("a11111", Get("a"));
-  ASSERT_EQ("b11111", Get("b"));
-  ASSERT_EQ("c11111", Get("c"));
-  ASSERT_EQ("d11111", Get("d"));
-  CloseDB();
-
-  ASSERT_TRUE(ReduceLevels(2));
-  ASSERT_OK(OpenDB(true, 2, 0));
-  ASSERT_EQ("a11111", Get("a"));
-  ASSERT_EQ("b11111", Get("b"));
-  ASSERT_EQ("c11111", Get("c"));
-  ASSERT_EQ("d11111", Get("d"));
-  CloseDB();
-}
-
-}
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/tools/sst_dump.cc b/src/rocksdb/tools/sst_dump.cc
deleted file mode 100644
index 9a144bb..0000000
--- a/src/rocksdb/tools/sst_dump.cc
+++ /dev/null
@@ -1,367 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#include <map>
-#include <string>
-#include <vector>
-#include <inttypes.h>
-
-#include "db/dbformat.h"
-#include "db/memtable.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-#include "table/block_based_table_factory.h"
-#include "table/plain_table_factory.h"
-#include "table/meta_blocks.h"
-#include "table/block.h"
-#include "table/block_builder.h"
-#include "table/format.h"
-#include "util/ldb_cmd.h"
-#include "util/random.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-class SstFileReader {
- public:
-  explicit SstFileReader(const std::string& file_name,
-                         bool verify_checksum,
-                         bool output_hex);
-
-  Status ReadSequential(bool print_kv,
-                        uint64_t read_num,
-                        bool has_from,
-                        const std::string& from_key,
-                        bool has_to,
-                        const std::string& to_key);
-
-  Status ReadTableProperties(
-      std::shared_ptr<const TableProperties>* table_properties);
-  uint64_t GetReadNumber() { return read_num_; }
-
- private:
-  Status NewTableReader(const std::string& file_path);
-  Status SetTableOptionsByMagicNumber(uint64_t table_magic_number,
-                                      RandomAccessFile* file,
-                                      uint64_t file_size);
-
-  std::string file_name_;
-  uint64_t read_num_;
-  bool verify_checksum_;
-  bool output_hex_;
-  EnvOptions soptions_;
-
-  Status init_result_;
-  unique_ptr<TableReader> table_reader_;
-  unique_ptr<RandomAccessFile> file_;
-  // options_ and internal_comparator_ will also be used in
-  // ReadSequential internally (specifically, seek-related operations)
-  Options options_;
-  InternalKeyComparator internal_comparator_;
-};
-
-SstFileReader::SstFileReader(const std::string& file_path,
-                             bool verify_checksum,
-                             bool output_hex)
-    :file_name_(file_path), read_num_(0), verify_checksum_(verify_checksum),
-    output_hex_(output_hex), internal_comparator_(BytewiseComparator()) {
-  fprintf(stdout, "Process %s\n", file_path.c_str());
-
-  init_result_ = NewTableReader(file_name_);
-}
-
-extern uint64_t kBlockBasedTableMagicNumber;
-extern uint64_t kPlainTableMagicNumber;
-
-Status SstFileReader::NewTableReader(const std::string& file_path) {
-  uint64_t magic_number;
-
-  // read table magic number
-  Footer footer;
-
-  unique_ptr<RandomAccessFile> file;
-  uint64_t file_size;
-  Status s = options_.env->NewRandomAccessFile(file_path, &file_, soptions_);
-  if (s.ok()) {
-    s = options_.env->GetFileSize(file_path, &file_size);
-  }
-  if (s.ok()) {
-    s = ReadFooterFromFile(file_.get(), file_size, &footer);
-  }
-  if (s.ok()) {
-    magic_number = footer.table_magic_number();
-  }
-
-  if (s.ok()) {
-    if (magic_number == kPlainTableMagicNumber) {
-      soptions_.use_mmap_reads = true;
-    }
-    options_.comparator = &internal_comparator_;
-    s = SetTableOptionsByMagicNumber(magic_number, file_.get(), file_size);
-  }
-
-  if (s.ok()) {
-    s = options_.table_factory->NewTableReader(
-        options_, soptions_, internal_comparator_, std::move(file_), file_size,
-        &table_reader_);
-  }
-  return s;
-}
-
-Status SstFileReader::SetTableOptionsByMagicNumber(uint64_t table_magic_number,
-                                                   RandomAccessFile* file,
-                                                   uint64_t file_size) {
-  TableProperties* table_properties;
-  Status s = rocksdb::ReadTableProperties(file, file_size, table_magic_number,
-                                          options_.env, options_.info_log.get(),
-                                          &table_properties);
-  if (!s.ok()) {
-    return s;
-  }
-  std::unique_ptr<TableProperties> props_guard(table_properties);
-
-  if (table_magic_number == kBlockBasedTableMagicNumber) {
-    options_.table_factory = std::make_shared<BlockBasedTableFactory>();
-    fprintf(stdout, "Sst file format: block-based\n");
-  } else if (table_magic_number == kPlainTableMagicNumber) {
-    options_.allow_mmap_reads = true;
-    options_.table_factory = std::make_shared<PlainTableFactory>(
-        table_properties->fixed_key_len, 2, 0.8);
-    options_.prefix_extractor.reset(NewNoopTransform());
-    fprintf(stdout, "Sst file format: plain table\n");
-  } else {
-    char error_msg_buffer[80];
-    snprintf(error_msg_buffer, sizeof(error_msg_buffer) - 1,
-             "Unsupported table magic number --- %lx",
-             (long)table_magic_number);
-    return Status::InvalidArgument(error_msg_buffer);
-  }
-
-  return Status::OK();
-}
-
-Status SstFileReader::ReadSequential(bool print_kv,
-                                     uint64_t read_num,
-                                     bool has_from,
-                                     const std::string& from_key,
-                                     bool has_to,
-                                     const std::string& to_key) {
-  if (!table_reader_) {
-    return init_result_;
-  }
-
-  Iterator* iter = table_reader_->NewIterator(ReadOptions(verify_checksum_,
-                                                         false));
-  uint64_t i = 0;
-  if (has_from) {
-    InternalKey ikey(from_key, kMaxSequenceNumber, kValueTypeForSeek);
-    iter->Seek(ikey.Encode());
-  } else {
-    iter->SeekToFirst();
-  }
-  for (; iter->Valid(); iter->Next()) {
-    Slice key = iter->key();
-    Slice value = iter->value();
-    ++i;
-    if (read_num > 0 && i > read_num)
-      break;
-
-    ParsedInternalKey ikey;
-    if (!ParseInternalKey(key, &ikey)) {
-      std::cerr << "Internal Key ["
-                << key.ToString(true /* in hex*/)
-                << "] parse error!\n";
-      continue;
-    }
-
-    // If end marker was specified, we stop before it
-    if (has_to && BytewiseComparator()->Compare(ikey.user_key, to_key) >= 0) {
-      break;
-    }
-
-    if (print_kv) {
-      fprintf(stdout, "%s => %s\n",
-          ikey.DebugString(output_hex_).c_str(),
-          value.ToString(output_hex_).c_str());
-    }
-  }
-
-  read_num_ += i;
-
-  Status ret = iter->status();
-  delete iter;
-  return ret;
-}
-
-Status SstFileReader::ReadTableProperties(
-    std::shared_ptr<const TableProperties>* table_properties) {
-  if (!table_reader_) {
-    return init_result_;
-  }
-
-  *table_properties = table_reader_->GetTableProperties();
-  return init_result_;
-}
-
-}  // namespace rocksdb
-
-static void print_help() {
-  fprintf(stderr,
-      "sst_dump [--command=check|scan] [--verify_checksum] "
-      "--file=data_dir_OR_sst_file"
-      " [--output_hex]"
-      " [--input_key_hex]"
-      " [--from=<user_key>]"
-      " [--to=<user_key>]"
-      " [--read_num=NUM]"
-      " [--show_properties]\n");
-}
-
-namespace {
-string HexToString(const string& str) {
-  string parsed;
-  if (str[0] != '0' || str[1] != 'x') {
-    fprintf(stderr, "Invalid hex input %s.  Must start with 0x\n",
-            str.c_str());
-    throw "Invalid hex input";
-  }
-
-  for (unsigned int i = 2; i < str.length();) {
-    int c;
-    sscanf(str.c_str() + i, "%2X", &c);
-    parsed.push_back(c);
-    i += 2;
-  }
-  return parsed;
-}
-}  // namespace
-
-int main(int argc, char** argv) {
-  const char* dir_or_file = nullptr;
-  uint64_t read_num = -1;
-  std::string command;
-
-  char junk;
-  uint64_t n;
-  bool verify_checksum = false;
-  bool output_hex = false;
-  bool input_key_hex = false;
-  bool has_from = false;
-  bool has_to = false;
-  bool show_properties = false;
-  std::string from_key;
-  std::string to_key;
-  for (int i = 1; i < argc; i++) {
-    if (strncmp(argv[i], "--file=", 7) == 0) {
-      dir_or_file = argv[i] + 7;
-    } else if (strcmp(argv[i], "--output_hex") == 0) {
-      output_hex = true;
-    } else if (strcmp(argv[i], "--input_key_hex") == 0) {
-      input_key_hex = true;
-    } else if (sscanf(argv[i],
-               "--read_num=%lu%c",
-               (unsigned long*)&n, &junk) == 1) {
-      read_num = n;
-    } else if (strcmp(argv[i], "--verify_checksum") == 0) {
-      verify_checksum = true;
-    } else if (strncmp(argv[i], "--command=", 10) == 0) {
-      command = argv[i] + 10;
-    } else if (strncmp(argv[i], "--from=", 7) == 0) {
-      from_key = argv[i] + 7;
-      has_from = true;
-    } else if (strncmp(argv[i], "--to=", 5) == 0) {
-      to_key = argv[i] + 5;
-      has_to = true;
-    } else if (strcmp(argv[i], "--show_properties") == 0) {
-      show_properties = true;
-    } else {
-      print_help();
-      exit(1);
-    }
-  }
-
-
-  if (input_key_hex) {
-    if (has_from) {
-      from_key = HexToString(from_key);
-    }
-    if (has_to) {
-      to_key = HexToString(to_key);
-    }
-  }
-
-  if (dir_or_file == nullptr) {
-    print_help();
-    exit(1);
-  }
-
-  std::vector<std::string> filenames;
-  rocksdb::Env* env = rocksdb::Env::Default();
-  rocksdb::Status st = env->GetChildren(dir_or_file, &filenames);
-  bool dir = true;
-  if (!st.ok()) {
-    filenames.clear();
-    filenames.push_back(dir_or_file);
-    dir = false;
-  }
-
-  fprintf(stdout, "from [%s] to [%s]\n",
-      rocksdb::Slice(from_key).ToString(true).c_str(),
-      rocksdb::Slice(to_key).ToString(true).c_str());
-
-  uint64_t total_read = 0;
-  for (size_t i = 0; i < filenames.size(); i++) {
-    std::string filename = filenames.at(i);
-    if (filename.length() <= 4 ||
-        filename.rfind(".sst") != filename.length() - 4) {
-      // ignore
-      continue;
-    }
-    if (dir) {
-      filename = std::string(dir_or_file) + "/" + filename;
-    }
-    rocksdb::SstFileReader reader(filename, verify_checksum,
-                                  output_hex);
-    rocksdb::Status st;
-    // scan all files in give file path.
-    if (command == "" || command == "scan" || command == "check") {
-      st = reader.ReadSequential(command != "check",
-                                 read_num > 0 ? (read_num - total_read) :
-                                                read_num,
-                                 has_from, from_key, has_to, to_key);
-      if (!st.ok()) {
-        fprintf(stderr, "%s: %s\n", filename.c_str(),
-            st.ToString().c_str());
-      }
-      total_read += reader.GetReadNumber();
-      if (read_num > 0 && total_read > read_num) {
-        break;
-      }
-    }
-    if (show_properties) {
-      std::shared_ptr<const rocksdb::TableProperties> table_properties;
-      st = reader.ReadTableProperties(&table_properties);
-      if (!st.ok()) {
-        fprintf(stderr, "%s: %s\n", filename.c_str(), st.ToString().c_str());
-      } else {
-        fprintf(stdout,
-                "Table Properties:\n"
-                "------------------------------\n"
-                "  %s",
-                table_properties->ToString("\n  ", ": ").c_str());
-        fprintf(stdout, "# deleted keys: %zd\n",
-                rocksdb::GetDeletedKeys(
-                    table_properties->user_collected_properties));
-      }
-    }
-  }
-}
diff --git a/src/rocksdb/util/arena.cc b/src/rocksdb/util/arena.cc
deleted file mode 100644
index 0e36bb5..0000000
--- a/src/rocksdb/util/arena.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/arena.h"
-#include <sys/mman.h>
-#include <algorithm>
-
-namespace rocksdb {
-
-const size_t Arena::kMinBlockSize = 4096;
-const size_t Arena::kMaxBlockSize = 2 << 30;
-static const int kAlignUnit = sizeof(void*);
-
-size_t OptimizeBlockSize(size_t block_size) {
-  // Make sure block_size is in optimal range
-  block_size = std::max(Arena::kMinBlockSize, block_size);
-  block_size = std::min(Arena::kMaxBlockSize, block_size);
-
-  // make sure block_size is the multiple of kAlignUnit
-  if (block_size % kAlignUnit != 0) {
-    block_size = (1 + block_size / kAlignUnit) * kAlignUnit;
-  }
-
-  return block_size;
-}
-
-Arena::Arena(size_t block_size) : kBlockSize(OptimizeBlockSize(block_size)) {
-  assert(kBlockSize >= kMinBlockSize && kBlockSize <= kMaxBlockSize &&
-         kBlockSize % kAlignUnit == 0);
-}
-
-Arena::~Arena() {
-  for (const auto& block : blocks_) {
-    delete[] block;
-  }
-  for (const auto& mmap_info : huge_blocks_) {
-    auto ret = munmap(mmap_info.addr_, mmap_info.length_);
-    if (ret != 0) {
-      // TODO(sdong): Better handling
-    }
-  }
-}
-
-char* Arena::AllocateFallback(size_t bytes, bool aligned) {
-  if (bytes > kBlockSize / 4) {
-    ++irregular_block_num;
-    // Object is more than a quarter of our block size.  Allocate it separately
-    // to avoid wasting too much space in leftover bytes.
-    return AllocateNewBlock(bytes);
-  }
-
-  // We waste the remaining space in the current block.
-  auto block_head = AllocateNewBlock(kBlockSize);
-  alloc_bytes_remaining_ = kBlockSize - bytes;
-
-  if (aligned) {
-    aligned_alloc_ptr_ = block_head + bytes;
-    unaligned_alloc_ptr_ = block_head + kBlockSize;
-    return block_head;
-  } else {
-    aligned_alloc_ptr_ = block_head;
-    unaligned_alloc_ptr_ = block_head + kBlockSize - bytes;
-    return unaligned_alloc_ptr_;
-  }
-}
-
-char* Arena::AllocateAligned(size_t bytes, size_t huge_page_tlb_size) {
-  assert((kAlignUnit & (kAlignUnit - 1)) ==
-         0);  // Pointer size should be a power of 2
-
-#ifdef OS_LINUX
-  if (huge_page_tlb_size > 0 && bytes > 0) {
-    // Allocate from a huge page TBL table.
-    size_t reserved_size =
-        ((bytes - 1U) / huge_page_tlb_size + 1U) * huge_page_tlb_size;
-    assert(reserved_size >= bytes);
-    void* addr = mmap(nullptr, reserved_size, (PROT_READ | PROT_WRITE),
-                      (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB), 0, 0);
-    if (addr == MAP_FAILED) {
-      // TODO(sdong): Better handling
-      // fail back to malloc
-    } else {
-      blocks_memory_ += reserved_size;
-      huge_blocks_.push_back(MmapInfo(addr, reserved_size));
-      return reinterpret_cast<char*>(addr);
-    }
-  }
-#endif
-
-  size_t current_mod =
-      reinterpret_cast<uintptr_t>(aligned_alloc_ptr_) & (kAlignUnit - 1);
-  size_t slop = (current_mod == 0 ? 0 : kAlignUnit - current_mod);
-  size_t needed = bytes + slop;
-  char* result;
-  if (needed <= alloc_bytes_remaining_) {
-    result = aligned_alloc_ptr_ + slop;
-    aligned_alloc_ptr_ += needed;
-    alloc_bytes_remaining_ -= needed;
-  } else {
-    // AllocateFallback always returned aligned memory
-    result = AllocateFallback(bytes, true /* aligned */);
-  }
-  assert((reinterpret_cast<uintptr_t>(result) & (kAlignUnit - 1)) == 0);
-  return result;
-}
-
-char* Arena::AllocateNewBlock(size_t block_bytes) {
-  char* block = new char[block_bytes];
-  blocks_memory_ += block_bytes;
-  blocks_.push_back(block);
-  return block;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/arena.h b/src/rocksdb/util/arena.h
deleted file mode 100644
index a4dff49..0000000
--- a/src/rocksdb/util/arena.h
+++ /dev/null
@@ -1,115 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-// Arena is an implementation of Arena class. For a request of small size,
-// it allocates a block with pre-defined block size. For a request of big
-// size, it uses malloc to directly get the requested size.
-
-#pragma once
-#include <cstddef>
-#include <vector>
-#include <assert.h>
-#include <stdint.h>
-#include "util/arena.h"
-
-namespace rocksdb {
-
-class Arena {
- public:
-  // No copying allowed
-  Arena(const Arena&) = delete;
-  void operator=(const Arena&) = delete;
-
-  static const size_t kMinBlockSize;
-  static const size_t kMaxBlockSize;
-
-  explicit Arena(size_t block_size = kMinBlockSize);
-  ~Arena();
-
-  char* Allocate(size_t bytes);
-
-  // huge_page_tlb_size: if >0, allocate bytes from huge page TLB and the size
-  // of the huge page TLB. Bytes will be rounded up to multiple and 2MB and
-  // allocate huge pages through mmap anonymous option with huge page on.
-  // The extra  space allocated will be wasted. To enable it, need to reserve
-  // huge pages for it to be allocated, like:
-  //     sysctl -w vm.nr_hugepages=20
-  // See linux doc Documentation/vm/hugetlbpage.txt for details.
-  char* AllocateAligned(size_t bytes, size_t huge_page_tlb_size = 0);
-
-  // Returns an estimate of the total memory usage of data allocated
-  // by the arena (exclude the space allocated but not yet used for future
-  // allocations).
-  size_t ApproximateMemoryUsage() const {
-    return blocks_memory_ + blocks_.capacity() * sizeof(char*) -
-           alloc_bytes_remaining_;
-  }
-
-  size_t MemoryAllocatedBytes() const { return blocks_memory_; }
-
-  size_t AllocatedAndUnused() const { return alloc_bytes_remaining_; }
-
-  // If an allocation is too big, we'll allocate an irregular block with the
-  // same size of that allocation.
-  virtual size_t IrregularBlockNum() const { return irregular_block_num; }
-
-  size_t BlockSize() const { return kBlockSize; }
-
- private:
-  // Number of bytes allocated in one block
-  const size_t kBlockSize;
-  // Array of new[] allocated memory blocks
-  typedef std::vector<char*> Blocks;
-  Blocks blocks_;
-
-  struct MmapInfo {
-    void* addr_;
-    size_t length_;
-
-    MmapInfo(void* addr, size_t length) : addr_(addr), length_(length) {}
-  };
-  std::vector<MmapInfo> huge_blocks_;
-  size_t irregular_block_num = 0;
-
-  // Stats for current active block.
-  // For each block, we allocate aligned memory chucks from one end and
-  // allocate unaligned memory chucks from the other end. Otherwise the
-  // memory waste for alignment will be higher if we allocate both types of
-  // memory from one direction.
-  char* unaligned_alloc_ptr_ = nullptr;
-  char* aligned_alloc_ptr_ = nullptr;
-  // How many bytes left in currently active block?
-  size_t alloc_bytes_remaining_ = 0;
-
-  char* AllocateFallback(size_t bytes, bool aligned);
-  char* AllocateNewBlock(size_t block_bytes);
-
-  // Bytes of memory in blocks allocated so far
-  size_t blocks_memory_ = 0;
-};
-
-inline char* Arena::Allocate(size_t bytes) {
-  // The semantics of what to return are a bit messy if we allow
-  // 0-byte allocations, so we disallow them here (we don't need
-  // them for our internal use).
-  assert(bytes > 0);
-  if (bytes <= alloc_bytes_remaining_) {
-    unaligned_alloc_ptr_ -= bytes;
-    alloc_bytes_remaining_ -= bytes;
-    return unaligned_alloc_ptr_;
-  }
-  return AllocateFallback(bytes, false /* unaligned */);
-}
-
-// check and adjust the block_size so that the return value is
-//  1. in the range of [kMinBlockSize, kMaxBlockSize].
-//  2. the multiple of align unit.
-extern size_t OptimizeBlockSize(size_t block_size);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/arena_test.cc b/src/rocksdb/util/arena_test.cc
deleted file mode 100644
index 1b2b531..0000000
--- a/src/rocksdb/util/arena_test.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/arena.h"
-#include "util/random.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-class ArenaTest {};
-
-TEST(ArenaTest, Empty) { Arena arena0; }
-
-TEST(ArenaTest, MemoryAllocatedBytes) {
-  const int N = 17;
-  size_t req_sz;  // requested size
-  size_t bsz = 8192;  // block size
-  size_t expected_memory_allocated;
-
-  Arena arena(bsz);
-
-  // requested size > quarter of a block:
-  //   allocate requested size separately
-  req_sz = 3001;
-  for (int i = 0; i < N; i++) {
-    arena.Allocate(req_sz);
-  }
-  expected_memory_allocated = req_sz * N;
-  ASSERT_EQ(arena.MemoryAllocatedBytes(), expected_memory_allocated);
-
-  // requested size < quarter of a block:
-  //   allocate a block with the default size, then try to use unused part
-  //   of the block. So one new block will be allocated for the first
-  //   Allocate(99) call. All the remaining calls won't lead to new allocation.
-  req_sz = 99;
-  for (int i = 0; i < N; i++) {
-    arena.Allocate(req_sz);
-  }
-  expected_memory_allocated += bsz;
-  ASSERT_EQ(arena.MemoryAllocatedBytes(), expected_memory_allocated);
-
-  // requested size > quarter of a block:
-  //   allocate requested size separately
-  req_sz = 99999999;
-  for (int i = 0; i < N; i++) {
-    arena.Allocate(req_sz);
-  }
-  expected_memory_allocated += req_sz * N;
-  ASSERT_EQ(arena.MemoryAllocatedBytes(), expected_memory_allocated);
-}
-
-// Make sure we didn't count the allocate but not used memory space in
-// Arena::ApproximateMemoryUsage()
-TEST(ArenaTest, ApproximateMemoryUsageTest) {
-  const size_t kBlockSize = 4096;
-  const size_t kEntrySize = kBlockSize / 8;
-  const size_t kZero = 0;
-  Arena arena(kBlockSize);
-  ASSERT_EQ(kZero, arena.ApproximateMemoryUsage());
-
-  auto num_blocks = kBlockSize / kEntrySize;
-
-  // first allocation
-  arena.AllocateAligned(kEntrySize);
-  auto mem_usage = arena.MemoryAllocatedBytes();
-  ASSERT_EQ(mem_usage, kBlockSize);
-  auto usage = arena.ApproximateMemoryUsage();
-  ASSERT_LT(usage, mem_usage);
-  for (size_t i = 1; i < num_blocks; ++i) {
-    arena.AllocateAligned(kEntrySize);
-    ASSERT_EQ(mem_usage, arena.MemoryAllocatedBytes());
-    ASSERT_EQ(arena.ApproximateMemoryUsage(), usage + kEntrySize);
-    usage = arena.ApproximateMemoryUsage();
-  }
-  ASSERT_GT(usage, mem_usage);
-}
-
-TEST(ArenaTest, Simple) {
-  std::vector<std::pair<size_t, char*>> allocated;
-  Arena arena;
-  const int N = 100000;
-  size_t bytes = 0;
-  Random rnd(301);
-  for (int i = 0; i < N; i++) {
-    size_t s;
-    if (i % (N / 10) == 0) {
-      s = i;
-    } else {
-      s = rnd.OneIn(4000)
-              ? rnd.Uniform(6000)
-              : (rnd.OneIn(10) ? rnd.Uniform(100) : rnd.Uniform(20));
-    }
-    if (s == 0) {
-      // Our arena disallows size 0 allocations.
-      s = 1;
-    }
-    char* r;
-    if (rnd.OneIn(10)) {
-      r = arena.AllocateAligned(s);
-    } else {
-      r = arena.Allocate(s);
-    }
-
-    for (unsigned int b = 0; b < s; b++) {
-      // Fill the "i"th allocation with a known bit pattern
-      r[b] = i % 256;
-    }
-    bytes += s;
-    allocated.push_back(std::make_pair(s, r));
-    ASSERT_GE(arena.ApproximateMemoryUsage(), bytes);
-    if (i > N / 10) {
-      ASSERT_LE(arena.ApproximateMemoryUsage(), bytes * 1.10);
-    }
-  }
-  for (unsigned int i = 0; i < allocated.size(); i++) {
-    size_t num_bytes = allocated[i].first;
-    const char* p = allocated[i].second;
-    for (unsigned int b = 0; b < num_bytes; b++) {
-      // Check the "i"th allocation for the known bit pattern
-      ASSERT_EQ(int(p[b]) & 0xff, (int)(i % 256));
-    }
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) { return rocksdb::test::RunAllTests(); }
diff --git a/src/rocksdb/util/auto_roll_logger.cc b/src/rocksdb/util/auto_roll_logger.cc
deleted file mode 100644
index 19c2b8c..0000000
--- a/src/rocksdb/util/auto_roll_logger.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "util/auto_roll_logger.h"
-#include "util/mutexlock.h"
-
-using namespace std;
-
-namespace rocksdb {
-
-// -- AutoRollLogger
-Status AutoRollLogger::ResetLogger() {
-  status_ = env_->NewLogger(log_fname_, &logger_);
-
-  if (!status_.ok()) {
-    return status_;
-  }
-
-  if (logger_->GetLogFileSize() ==
-      (size_t)Logger::DO_NOT_SUPPORT_GET_LOG_FILE_SIZE) {
-    status_ = Status::NotSupported(
-        "The underlying logger doesn't support GetLogFileSize()");
-  }
-  if (status_.ok()) {
-    cached_now = static_cast<uint64_t>(env_->NowMicros() * 1e-6);
-    ctime_ = cached_now;
-    cached_now_access_count = 0;
-  }
-
-  return status_;
-}
-
-void AutoRollLogger::RollLogFile() {
-  std::string old_fname = OldInfoLogFileName(
-      dbname_, env_->NowMicros(), db_absolute_path_, db_log_dir_);
-  env_->RenameFile(log_fname_, old_fname);
-}
-
-void AutoRollLogger::Logv(const char* format, va_list ap) {
-  assert(GetStatus().ok());
-
-  std::shared_ptr<Logger> logger;
-  {
-    MutexLock l(&mutex_);
-    if ((kLogFileTimeToRoll > 0 && LogExpired()) ||
-        (kMaxLogFileSize > 0 && logger_->GetLogFileSize() >= kMaxLogFileSize)) {
-      RollLogFile();
-      Status s = ResetLogger();
-      if (!s.ok()) {
-        // can't really log the error if creating a new LOG file failed
-        return;
-      }
-    }
-
-    // pin down the current logger_ instance before releasing the mutex.
-    logger = logger_;
-  }
-
-  // Another thread could have put a new Logger instance into logger_ by now.
-  // However, since logger is still hanging on to the previous instance
-  // (reference count is not zero), we don't have to worry about it being
-  // deleted while we are accessing it.
-  // Note that logv itself is not mutex protected to allow maximum concurrency,
-  // as thread safety should have been handled by the underlying logger.
-  logger->Logv(format, ap);
-}
-
-bool AutoRollLogger::LogExpired() {
-  if (cached_now_access_count >= call_NowMicros_every_N_records_) {
-    cached_now = static_cast<uint64_t>(env_->NowMicros() * 1e-6);
-    cached_now_access_count = 0;
-  }
-
-  ++cached_now_access_count;
-  return cached_now >= ctime_ + kLogFileTimeToRoll;
-}
-
-Status CreateLoggerFromOptions(
-    const std::string& dbname,
-    const std::string& db_log_dir,
-    Env* env,
-    const DBOptions& options,
-    std::shared_ptr<Logger>* logger) {
-  std::string db_absolute_path;
-  env->GetAbsolutePath(dbname, &db_absolute_path);
-  std::string fname = InfoLogFileName(dbname, db_absolute_path, db_log_dir);
-
-  // Currently we only support roll by time-to-roll and log size
-  if (options.log_file_time_to_roll > 0 || options.max_log_file_size > 0) {
-    AutoRollLogger* result = new AutoRollLogger(
-        env, dbname, db_log_dir,
-        options.max_log_file_size,
-        options.log_file_time_to_roll, options.info_log_level);
-    Status s = result->GetStatus();
-    if (!s.ok()) {
-      delete result;
-    } else {
-      logger->reset(result);
-    }
-    return s;
-  } else {
-    // Open a log file in the same directory as the db
-    env->CreateDir(dbname);  // In case it does not exist
-    env->RenameFile(fname, OldInfoLogFileName(dbname, env->NowMicros(),
-                                              db_absolute_path, db_log_dir));
-    auto s = env->NewLogger(fname, logger);
-    if (logger->get() != nullptr) {
-      (*logger)->SetInfoLogLevel(options.info_log_level);
-    }
-    return s;
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/auto_roll_logger.h b/src/rocksdb/util/auto_roll_logger.h
deleted file mode 100644
index c592d79..0000000
--- a/src/rocksdb/util/auto_roll_logger.h
+++ /dev/null
@@ -1,91 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Logger implementation that can be shared by all environments
-// where enough posix functionality is available.
-
-#pragma once
-#include "db/filename.h"
-#include "port/port.h"
-#include "util/posix_logger.h"
-
-namespace rocksdb {
-
-// Rolls the log file by size and/or time
-class AutoRollLogger : public Logger {
- public:
-  AutoRollLogger(Env* env, const std::string& dbname,
-                 const std::string& db_log_dir, size_t log_max_size,
-                 size_t log_file_time_to_roll,
-                 const InfoLogLevel log_level = InfoLogLevel::INFO_LEVEL)
-      : Logger(log_level),
-        dbname_(dbname),
-        db_log_dir_(db_log_dir),
-        env_(env),
-        status_(Status::OK()),
-        kMaxLogFileSize(log_max_size),
-        kLogFileTimeToRoll(log_file_time_to_roll),
-        cached_now(static_cast<uint64_t>(env_->NowMicros() * 1e-6)),
-        ctime_(cached_now),
-        cached_now_access_count(0),
-        call_NowMicros_every_N_records_(100),
-        mutex_() {
-    env->GetAbsolutePath(dbname, &db_absolute_path_);
-    log_fname_ = InfoLogFileName(dbname_, db_absolute_path_, db_log_dir_);
-    RollLogFile();
-    ResetLogger();
-  }
-
-  void Logv(const char* format, va_list ap);
-
-  // check if the logger has encountered any problem.
-  Status GetStatus() {
-    return status_;
-  }
-
-  size_t GetLogFileSize() const {
-    return logger_->GetLogFileSize();
-  }
-
-  virtual ~AutoRollLogger() {
-  }
-
-  void SetCallNowMicrosEveryNRecords(uint64_t call_NowMicros_every_N_records) {
-    call_NowMicros_every_N_records_ = call_NowMicros_every_N_records;
-  }
-
- private:
-
-  bool LogExpired();
-  Status ResetLogger();
-  void RollLogFile();
-
-  std::string log_fname_; // Current active info log's file name.
-  std::string dbname_;
-  std::string db_log_dir_;
-  std::string db_absolute_path_;
-  Env* env_;
-  std::shared_ptr<Logger> logger_;
-  // current status of the logger
-  Status status_;
-  const size_t kMaxLogFileSize;
-  const size_t kLogFileTimeToRoll;
-  // to avoid frequent env->NowMicros() calls, we cached the current time
-  uint64_t cached_now;
-  uint64_t ctime_;
-  uint64_t cached_now_access_count;
-  uint64_t call_NowMicros_every_N_records_;
-  port::Mutex mutex_;
-};
-
-// Facade to craete logger automatically
-Status CreateLoggerFromOptions(
-    const std::string& dbname,
-    const std::string& db_log_dir,
-    Env* env,
-    const DBOptions& options,
-    std::shared_ptr<Logger>* logger);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/auto_roll_logger_test.cc b/src/rocksdb/util/auto_roll_logger_test.cc
deleted file mode 100755
index c49894f..0000000
--- a/src/rocksdb/util/auto_roll_logger_test.cc
+++ /dev/null
@@ -1,292 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <string>
-#include <cmath>
-#include <iostream>
-#include <fstream>
-#include <iterator>
-#include <algorithm>
-#include "util/testharness.h"
-#include "util/auto_roll_logger.h"
-#include "rocksdb/db.h"
-#include <sys/stat.h>
-#include <errno.h>
-
-using namespace std;
-
-namespace rocksdb {
-
-class AutoRollLoggerTest {
- public:
-  static void InitTestDb() {
-    string deleteCmd = "rm -rf " + kTestDir;
-    ASSERT_TRUE(system(deleteCmd.c_str()) == 0);
-    Env::Default()->CreateDir(kTestDir);
-  }
-
-  void RollLogFileBySizeTest(AutoRollLogger* logger,
-                             size_t log_max_size,
-                             const string& log_message);
-  uint64_t RollLogFileByTimeTest(AutoRollLogger* logger,
-                                 size_t time,
-                                 const string& log_message);
-
-  static const string kSampleMessage;
-  static const string kTestDir;
-  static const string kLogFile;
-  static Env* env;
-};
-
-const string AutoRollLoggerTest::kSampleMessage(
-    "this is the message to be written to the log file!!");
-const string AutoRollLoggerTest::kTestDir(test::TmpDir() + "/db_log_test");
-const string AutoRollLoggerTest::kLogFile(test::TmpDir() + "/db_log_test/LOG");
-Env* AutoRollLoggerTest::env = Env::Default();
-
-// In this test we only want to Log some simple log message with
-// no format. LogMessage() provides such a simple interface and
-// avoids the [format-security] warning which occurs when you
-// call Log(logger, log_message) directly.
-namespace {
-void LogMessage(Logger* logger, const char* message) {
-  Log(logger, "%s", message);
-}
-
-void LogMessage(const InfoLogLevel log_level, Logger* logger,
-                const char* message) {
-  Log(log_level, logger, "%s", message);
-}
-}  // namespace
-
-namespace {
-void GetFileCreateTime(const std::string& fname, uint64_t* file_ctime) {
-  struct stat s;
-  if (stat(fname.c_str(), &s) != 0) {
-    *file_ctime = (uint64_t)0;
-  }
-  *file_ctime = static_cast<uint64_t>(s.st_ctime);
-}
-}  // namespace
-
-void AutoRollLoggerTest::RollLogFileBySizeTest(AutoRollLogger* logger,
-                                               size_t log_max_size,
-                                               const string& log_message) {
-  logger->SetInfoLogLevel(InfoLogLevel::INFO_LEVEL);
-  // measure the size of each message, which is supposed
-  // to be equal or greater than log_message.size()
-  LogMessage(logger, log_message.c_str());
-  size_t message_size = logger->GetLogFileSize();
-  size_t current_log_size = message_size;
-
-  // Test the cases when the log file will not be rolled.
-  while (current_log_size + message_size < log_max_size) {
-    LogMessage(logger, log_message.c_str());
-    current_log_size += message_size;
-    ASSERT_EQ(current_log_size, logger->GetLogFileSize());
-  }
-
-  // Now the log file will be rolled
-  LogMessage(logger, log_message.c_str());
-  // Since rotation is checked before actual logging, we need to
-  // trigger the rotation by logging another message.
-  LogMessage(logger, log_message.c_str());
-
-  ASSERT_TRUE(message_size == logger->GetLogFileSize());
-}
-
-uint64_t AutoRollLoggerTest::RollLogFileByTimeTest(
-    AutoRollLogger* logger, size_t time, const string& log_message) {
-  uint64_t expected_create_time;
-  uint64_t actual_create_time;
-  uint64_t total_log_size;
-  ASSERT_OK(env->GetFileSize(kLogFile, &total_log_size));
-  GetFileCreateTime(kLogFile, &expected_create_time);
-  logger->SetCallNowMicrosEveryNRecords(0);
-
-  // -- Write to the log for several times, which is supposed
-  // to be finished before time.
-  for (int i = 0; i < 10; ++i) {
-     LogMessage(logger, log_message.c_str());
-     ASSERT_OK(logger->GetStatus());
-     // Make sure we always write to the same log file (by
-     // checking the create time);
-     GetFileCreateTime(kLogFile, &actual_create_time);
-
-     // Also make sure the log size is increasing.
-     ASSERT_EQ(expected_create_time, actual_create_time);
-     ASSERT_GT(logger->GetLogFileSize(), total_log_size);
-     total_log_size = logger->GetLogFileSize();
-  }
-
-  // -- Make the log file expire
-  sleep(time);
-  LogMessage(logger, log_message.c_str());
-
-  // At this time, the new log file should be created.
-  GetFileCreateTime(kLogFile, &actual_create_time);
-  ASSERT_GT(actual_create_time, expected_create_time);
-  ASSERT_LT(logger->GetLogFileSize(), total_log_size);
-  expected_create_time = actual_create_time;
-
-  return expected_create_time;
-}
-
-TEST(AutoRollLoggerTest, RollLogFileBySize) {
-    InitTestDb();
-    size_t log_max_size = 1024 * 5;
-
-    AutoRollLogger logger(Env::Default(), kTestDir, "", log_max_size, 0);
-
-    RollLogFileBySizeTest(&logger, log_max_size,
-                          kSampleMessage + ":RollLogFileBySize");
-}
-
-TEST(AutoRollLoggerTest, RollLogFileByTime) {
-    size_t time = 1;
-    size_t log_size = 1024 * 5;
-
-    InitTestDb();
-    // -- Test the existence of file during the server restart.
-    ASSERT_TRUE(!env->FileExists(kLogFile));
-    AutoRollLogger logger(Env::Default(), kTestDir, "", log_size, 1);
-    ASSERT_TRUE(env->FileExists(kLogFile));
-
-    RollLogFileByTimeTest(&logger, time, kSampleMessage + ":RollLogFileByTime");
-}
-
-TEST(AutoRollLoggerTest,
-     OpenLogFilesMultipleTimesWithOptionLog_max_size) {
-  // If only 'log_max_size' options is specified, then every time
-  // when rocksdb is restarted, a new empty log file will be created.
-  InitTestDb();
-  // WORKAROUND:
-  // avoid complier's complaint of "comparison between signed
-  // and unsigned integer expressions" because literal 0 is
-  // treated as "singed".
-  size_t kZero = 0;
-  size_t log_size = 1024;
-
-  AutoRollLogger* logger = new AutoRollLogger(
-    Env::Default(), kTestDir, "", log_size, 0);
-
-  LogMessage(logger, kSampleMessage.c_str());
-  ASSERT_GT(logger->GetLogFileSize(), kZero);
-  delete logger;
-
-  // reopens the log file and an empty log file will be created.
-  logger = new AutoRollLogger(
-    Env::Default(), kTestDir, "", log_size, 0);
-  ASSERT_EQ(logger->GetLogFileSize(), kZero);
-  delete logger;
-}
-
-TEST(AutoRollLoggerTest, CompositeRollByTimeAndSizeLogger) {
-  size_t time = 1, log_max_size = 1024 * 5;
-
-  InitTestDb();
-
-  AutoRollLogger logger(Env::Default(), kTestDir, "", log_max_size, time);
-
-  // Test the ability to roll by size
-  RollLogFileBySizeTest(
-      &logger, log_max_size,
-      kSampleMessage + ":CompositeRollByTimeAndSizeLogger");
-
-  // Test the ability to roll by Time
-  RollLogFileByTimeTest( &logger, time,
-      kSampleMessage + ":CompositeRollByTimeAndSizeLogger");
-}
-
-TEST(AutoRollLoggerTest, CreateLoggerFromOptions) {
-  DBOptions options;
-  shared_ptr<Logger> logger;
-
-  // Normal logger
-  ASSERT_OK(CreateLoggerFromOptions(kTestDir, "", env, options, &logger));
-  ASSERT_TRUE(dynamic_cast<PosixLogger*>(logger.get()));
-
-  // Only roll by size
-  InitTestDb();
-  options.max_log_file_size = 1024;
-  ASSERT_OK(CreateLoggerFromOptions(kTestDir, "", env, options, &logger));
-  AutoRollLogger* auto_roll_logger =
-    dynamic_cast<AutoRollLogger*>(logger.get());
-  ASSERT_TRUE(auto_roll_logger);
-  RollLogFileBySizeTest(
-      auto_roll_logger, options.max_log_file_size,
-      kSampleMessage + ":CreateLoggerFromOptions - size");
-
-  // Only roll by Time
-  InitTestDb();
-  options.max_log_file_size = 0;
-  options.log_file_time_to_roll = 1;
-  ASSERT_OK(CreateLoggerFromOptions(kTestDir, "", env, options, &logger));
-  auto_roll_logger =
-    dynamic_cast<AutoRollLogger*>(logger.get());
-  RollLogFileByTimeTest(
-      auto_roll_logger, options.log_file_time_to_roll,
-      kSampleMessage + ":CreateLoggerFromOptions - time");
-
-  // roll by both Time and size
-  InitTestDb();
-  options.max_log_file_size = 1024 * 5;
-  options.log_file_time_to_roll = 1;
-  ASSERT_OK(CreateLoggerFromOptions(kTestDir, "", env, options, &logger));
-  auto_roll_logger =
-    dynamic_cast<AutoRollLogger*>(logger.get());
-  RollLogFileBySizeTest(
-      auto_roll_logger, options.max_log_file_size,
-      kSampleMessage + ":CreateLoggerFromOptions - both");
-  RollLogFileByTimeTest(
-      auto_roll_logger, options.log_file_time_to_roll,
-      kSampleMessage + ":CreateLoggerFromOptions - both");
-}
-
-TEST(AutoRollLoggerTest, InfoLogLevel) {
-  InitTestDb();
-
-  size_t log_size = 8192;
-  size_t log_lines = 0;
-  // an extra-scope to force the AutoRollLogger to flush the log file when it
-  // becomes out of scope.
-  {
-    AutoRollLogger logger(Env::Default(), kTestDir, "", log_size, 0);
-    for (int log_level = InfoLogLevel::FATAL_LEVEL;
-         log_level >= InfoLogLevel::DEBUG_LEVEL; log_level--) {
-      logger.SetInfoLogLevel((InfoLogLevel)log_level);
-      for (int log_type = InfoLogLevel::DEBUG_LEVEL;
-           log_type <= InfoLogLevel::FATAL_LEVEL; log_type++) {
-        // log messages with log level smaller than log_level will not be
-        // logged.
-        LogMessage((InfoLogLevel)log_type, &logger, kSampleMessage.c_str());
-      }
-      log_lines += InfoLogLevel::FATAL_LEVEL - log_level + 1;
-    }
-    for (int log_level = InfoLogLevel::FATAL_LEVEL;
-         log_level >= InfoLogLevel::DEBUG_LEVEL; log_level--) {
-      logger.SetInfoLogLevel((InfoLogLevel)log_level);
-
-      // again, messages with level smaller than log_level will not be logged.
-      Debug(&logger, "%s", kSampleMessage.c_str());
-      Info(&logger, "%s", kSampleMessage.c_str());
-      Warn(&logger, "%s", kSampleMessage.c_str());
-      Error(&logger, "%s", kSampleMessage.c_str());
-      Fatal(&logger, "%s", kSampleMessage.c_str());
-      log_lines += InfoLogLevel::FATAL_LEVEL - log_level + 1;
-    }
-  }
-  std::ifstream inFile(AutoRollLoggerTest::kLogFile.c_str());
-  size_t lines = std::count(std::istreambuf_iterator<char>(inFile),
-                         std::istreambuf_iterator<char>(), '\n');
-  ASSERT_EQ(log_lines, lines);
-  inFile.close();
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/autovector.h b/src/rocksdb/util/autovector.h
deleted file mode 100644
index 212073e..0000000
--- a/src/rocksdb/util/autovector.h
+++ /dev/null
@@ -1,307 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-#pragma once
-
-#include <algorithm>
-#include <cassert>
-#include <stdexcept>
-#include <iterator>
-#include <vector>
-
-namespace rocksdb {
-
-#ifdef ROCKSDB_LITE
-template <class T, size_t kSize = 8>
-class autovector : public std::vector<T> {};
-#else
-// A vector that leverages pre-allocated stack-based array to achieve better
-// performance for array with small amount of items.
-//
-// The interface resembles that of vector, but with less features since we aim
-// to solve the problem that we have in hand, rather than implementing a
-// full-fledged generic container.
-//
-// Currently we don't support:
-//  * reserve()/shrink_to_fit()/resize()
-//     If used correctly, in most cases, people should not touch the
-//     underlying vector at all.
-//  * random insert()/erase(), please only use push_back()/pop_back().
-//  * No move/swap operations. Each autovector instance has a
-//     stack-allocated array and if we want support move/swap operations, we
-//     need to copy the arrays other than just swapping the pointers. In this
-//     case we'll just explicitly forbid these operations since they may
-//     lead users to make false assumption by thinking they are inexpensive
-//     operations.
-//
-// Naming style of public methods almost follows that of the STL's.
-template <class T, size_t kSize = 8>
-class autovector {
- public:
-  // General STL-style container member types.
-  typedef T value_type;
-  typedef typename std::vector<T>::difference_type difference_type;
-  typedef typename std::vector<T>::size_type size_type;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-
-  // This class is the base for regular/const iterator
-  template <class TAutoVector, class TValueType>
-  class iterator_impl {
-   public:
-    // -- iterator traits
-    typedef iterator_impl<TAutoVector, TValueType> self_type;
-    typedef TValueType value_type;
-    typedef TValueType& reference;
-    typedef TValueType* pointer;
-    typedef typename TAutoVector::difference_type difference_type;
-    typedef std::random_access_iterator_tag iterator_category;
-
-    iterator_impl(TAutoVector* vect, size_t index)
-        : vect_(vect), index_(index) {};
-    iterator_impl(const iterator_impl&) = default;
-    ~iterator_impl() {}
-    iterator_impl& operator=(const iterator_impl&) = default;
-
-    // -- Advancement
-    // iterator++
-    self_type& operator++() {
-      ++index_;
-      return *this;
-    }
-
-    // ++iterator
-    self_type operator++(int) {
-      auto old = *this;
-      ++index_;
-      return old;
-    }
-
-    // iterator--
-    self_type& operator--() {
-      --index_;
-      return *this;
-    }
-
-    // --iterator
-    self_type operator--(int) {
-      auto old = *this;
-      --index_;
-      return old;
-    }
-
-    self_type operator-(difference_type len) {
-      return self_type(vect_, index_ - len);
-    }
-
-    difference_type operator-(const self_type& other) {
-      assert(vect_ == other.vect_);
-      return index_ - other.index_;
-    }
-
-    self_type operator+(difference_type len) {
-      return self_type(vect_, index_ + len);
-    }
-
-    self_type& operator+=(difference_type len) {
-      index_ += len;
-      return *this;
-    }
-
-    self_type& operator-=(difference_type len) {
-      index_ -= len;
-      return *this;
-    }
-
-    // -- Reference
-    reference operator*() {
-      assert(vect_->size() >= index_);
-      return (*vect_)[index_];
-    }
-    pointer operator->() {
-      assert(vect_->size() >= index_);
-      return &(*vect_)[index_];
-    }
-
-    // -- Logical Operators
-    bool operator==(const self_type& other) const {
-      assert(vect_ == other.vect_);
-      return index_ == other.index_;
-    }
-
-    bool operator!=(const self_type& other) const { return !(*this == other); }
-
-    bool operator>(const self_type& other) const {
-      assert(vect_ == other.vect_);
-      return index_ > other.index_;
-    }
-
-    bool operator<(const self_type& other) const {
-      assert(vect_ == other.vect_);
-      return index_ < other.index_;
-    }
-
-    bool operator>=(const self_type& other) const {
-      assert(vect_ == other.vect_);
-      return index_ >= other.index_;
-    }
-
-    bool operator<=(const self_type& other) const {
-      assert(vect_ == other.vect_);
-      return index_ <= other.index_;
-    }
-
-   private:
-    TAutoVector* vect_ = nullptr;
-    size_t index_ = 0;
-  };
-
-  typedef iterator_impl<autovector, value_type> iterator;
-  typedef iterator_impl<const autovector, const value_type> const_iterator;
-  typedef std::reverse_iterator<iterator> reverse_iterator;
-  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
-  autovector() = default;
-  ~autovector() = default;
-
-  // -- Immutable operations
-  // Indicate if all data resides in in-stack data structure.
-  bool only_in_stack() const {
-    // If no element was inserted at all, the vector's capacity will be `0`.
-    return vect_.capacity() == 0;
-  }
-
-  size_type size() const { return num_stack_items_ + vect_.size(); }
-
-  bool empty() const { return size() == 0; }
-
-  // will not check boundry
-  const_reference operator[](size_type n) const {
-    return n < kSize ? values_[n] : vect_[n - kSize];
-  }
-
-  reference operator[](size_type n) {
-    return n < kSize ? values_[n] : vect_[n - kSize];
-  }
-
-  // will check boundry
-  const_reference at(size_type n) const {
-    if (n >= size()) {
-      throw std::out_of_range("autovector: index out of range");
-    }
-    return (*this)[n];
-  }
-
-  reference at(size_type n) {
-    if (n >= size()) {
-      throw std::out_of_range("autovector: index out of range");
-    }
-    return (*this)[n];
-  }
-
-  reference front() {
-    assert(!empty());
-    return *begin();
-  }
-
-  const_reference front() const {
-    assert(!empty());
-    return *begin();
-  }
-
-  reference back() {
-    assert(!empty());
-    return *(end() - 1);
-  }
-
-  const_reference back() const {
-    assert(!empty());
-    return *(end() - 1);
-  }
-
-  // -- Mutable Operations
-  void push_back(T&& item) {
-    if (num_stack_items_ < kSize) {
-      values_[num_stack_items_++] = std::move(item);
-    } else {
-      vect_.push_back(item);
-    }
-  }
-
-  void push_back(const T& item) { push_back(value_type(item)); }
-
-  template <class... Args>
-  void emplace_back(Args&&... args) {
-    push_back(value_type(args...));
-  }
-
-  void pop_back() {
-    assert(!empty());
-    if (!vect_.empty()) {
-      vect_.pop_back();
-    } else {
-      --num_stack_items_;
-    }
-  }
-
-  void clear() {
-    num_stack_items_ = 0;
-    vect_.clear();
-  }
-
-  // -- Copy and Assignment
-  autovector& assign(const autovector& other);
-
-  autovector(const autovector& other) { assign(other); }
-
-  autovector& operator=(const autovector& other) { return assign(other); }
-
-  // move operation are disallowed since it is very hard to make sure both
-  // autovectors are allocated from the same function stack.
-  autovector& operator=(autovector&& other) = delete;
-  autovector(autovector&& other) = delete;
-
-  // -- Iterator Operations
-  iterator begin() { return iterator(this, 0); }
-
-  const_iterator begin() const { return const_iterator(this, 0); }
-
-  iterator end() { return iterator(this, this->size()); }
-
-  const_iterator end() const { return const_iterator(this, this->size()); }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-
-  const_reverse_iterator rbegin() const {
-    return const_reverse_iterator(end());
-  }
-
-  reverse_iterator rend() { return reverse_iterator(begin()); }
-
-  const_reverse_iterator rend() const {
-    return const_reverse_iterator(begin());
-  }
-
- private:
-  size_type num_stack_items_ = 0;  // current number of items
-  value_type values_[kSize];       // the first `kSize` items
-  // used only if there are more than `kSize` items.
-  std::vector<T> vect_;
-};
-
-template <class T, size_t kSize>
-autovector<T, kSize>& autovector<T, kSize>::assign(const autovector& other) {
-  // copy the internal vector
-  vect_.assign(other.vect_.begin(), other.vect_.end());
-
-  // copy array
-  num_stack_items_ = other.num_stack_items_;
-  std::copy(other.values_, other.values_ + num_stack_items_, values_);
-
-  return *this;
-}
-#endif  // ROCKSDB_LITE
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/autovector_test.cc b/src/rocksdb/util/autovector_test.cc
deleted file mode 100644
index 88744cf..0000000
--- a/src/rocksdb/util/autovector_test.cc
+++ /dev/null
@@ -1,294 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <atomic>
-#include <iostream>
-
-#include "rocksdb/env.h"
-#include "util/autovector.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-using namespace std;
-
-class AutoVectorTest { };
-
-const unsigned long kSize = 8;
-TEST(AutoVectorTest, PushBackAndPopBack) {
-  autovector<size_t, kSize> vec;
-  ASSERT_TRUE(vec.empty());
-  ASSERT_EQ(0ul, vec.size());
-
-  for (size_t i = 0; i < 1000 * kSize; ++i) {
-    vec.push_back(i);
-    ASSERT_TRUE(!vec.empty());
-    if (i < kSize) {
-      ASSERT_TRUE(vec.only_in_stack());
-    } else {
-      ASSERT_TRUE(!vec.only_in_stack());
-    }
-    ASSERT_EQ(i + 1, vec.size());
-    ASSERT_EQ(i, vec[i]);
-    ASSERT_EQ(i, vec.at(i));
-  }
-
-  size_t size = vec.size();
-  while (size != 0) {
-    vec.pop_back();
-    // will always be in heap
-    ASSERT_TRUE(!vec.only_in_stack());
-    ASSERT_EQ(--size, vec.size());
-  }
-
-  ASSERT_TRUE(vec.empty());
-}
-
-TEST(AutoVectorTest, EmplaceBack) {
-  typedef std::pair<size_t, std::string> ValueType;
-  autovector<ValueType, kSize> vec;
-
-  for (size_t i = 0; i < 1000 * kSize; ++i) {
-    vec.emplace_back(i, std::to_string(i + 123));
-    ASSERT_TRUE(!vec.empty());
-    if (i < kSize) {
-      ASSERT_TRUE(vec.only_in_stack());
-    } else {
-      ASSERT_TRUE(!vec.only_in_stack());
-    }
-
-    ASSERT_EQ(i + 1, vec.size());
-    ASSERT_EQ(i, vec[i].first);
-    ASSERT_EQ(std::to_string(i + 123), vec[i].second);
-  }
-
-  vec.clear();
-  ASSERT_TRUE(vec.empty());
-  ASSERT_TRUE(!vec.only_in_stack());
-}
-
-namespace {
-void AssertEqual(
-    const autovector<size_t, kSize>& a, const autovector<size_t, kSize>& b) {
-  ASSERT_EQ(a.size(), b.size());
-  ASSERT_EQ(a.empty(), b.empty());
-  ASSERT_EQ(a.only_in_stack(), b.only_in_stack());
-  for (size_t i = 0; i < a.size(); ++i) {
-    ASSERT_EQ(a[i], b[i]);
-  }
-}
-}  // namespace
-
-TEST(AutoVectorTest, CopyAndAssignment) {
-  // Test both heap-allocated and stack-allocated cases.
-  for (auto size : { kSize / 2, kSize * 1000 }) {
-    autovector<size_t, kSize> vec;
-    for (size_t i = 0; i < size; ++i) {
-      vec.push_back(i);
-    }
-
-    {
-      autovector<size_t, kSize> other;
-      other = vec;
-      AssertEqual(other, vec);
-    }
-
-    {
-      autovector<size_t, kSize> other(vec);
-      AssertEqual(other, vec);
-    }
-  }
-}
-
-TEST(AutoVectorTest, Iterators) {
-  autovector<std::string, kSize> vec;
-  for (size_t i = 0; i < kSize * 1000; ++i) {
-    vec.push_back(std::to_string(i));
-  }
-
-  // basic operator test
-  ASSERT_EQ(vec.front(), *vec.begin());
-  ASSERT_EQ(vec.back(), *(vec.end() - 1));
-  ASSERT_TRUE(vec.begin() < vec.end());
-
-  // non-const iterator
-  size_t index = 0;
-  for (const auto& item : vec) {
-    ASSERT_EQ(vec[index++], item);
-  }
-
-  index = vec.size() - 1;
-  for (auto pos = vec.rbegin(); pos != vec.rend(); ++pos) {
-    ASSERT_EQ(vec[index--], *pos);
-  }
-
-  // const iterator
-  const auto& cvec = vec;
-  index = 0;
-  for (const auto& item : cvec) {
-    ASSERT_EQ(cvec[index++], item);
-  }
-
-  index = vec.size() - 1;
-  for (auto pos = cvec.rbegin(); pos != cvec.rend(); ++pos) {
-    ASSERT_EQ(cvec[index--], *pos);
-  }
-
-  // forward and backward
-  auto pos = vec.begin();
-  while (pos != vec.end()) {
-    auto old_val = *pos;
-    auto old = pos++;
-    // HACK: make sure -> works
-    ASSERT_TRUE(!old->empty());
-    ASSERT_EQ(old_val, *old);
-    ASSERT_TRUE(pos == vec.end() || old_val != *pos);
-  }
-
-  pos = vec.begin();
-  for (size_t i = 0; i < vec.size(); i += 2) {
-    // Cannot use ASSERT_EQ since that macro depends on iostream serialization
-    ASSERT_TRUE(pos + 2 - 2 == pos);
-    pos += 2;
-    ASSERT_TRUE(pos >= vec.begin());
-    ASSERT_TRUE(pos <= vec.end());
-
-    size_t diff = static_cast<size_t>(pos - vec.begin());
-    ASSERT_EQ(i + 2, diff);
-  }
-}
-
-namespace {
-vector<string> GetTestKeys(size_t size) {
-  vector<string> keys;
-  keys.resize(size);
-
-  int index = 0;
-  for (auto& key : keys) {
-    key = "item-" + to_string(index++);
-  }
-  return keys;
-}
-}  // namespace
-
-template<class TVector>
-void BenchmarkVectorCreationAndInsertion(
-    string name, size_t ops, size_t item_size,
-    const std::vector<typename TVector::value_type>& items) {
-  auto env = Env::Default();
-
-  int index = 0;
-  auto start_time = env->NowNanos();
-  auto ops_remaining = ops;
-  while(ops_remaining--) {
-    TVector v;
-    for (size_t i = 0; i < item_size; ++i) {
-      v.push_back(items[index++]);
-    }
-  }
-  auto elapsed = env->NowNanos() - start_time;
-  cout << "created " << ops << " " << name << " instances:\n\t"
-       << "each was inserted with " << item_size << " elements\n\t"
-       << "total time elapsed: " << elapsed << " (ns)" << endl;
-}
-
-template <class TVector>
-size_t BenchmarkSequenceAccess(string name, size_t ops, size_t elem_size) {
-  TVector v;
-  for (const auto& item : GetTestKeys(elem_size)) {
-    v.push_back(item);
-  }
-  auto env = Env::Default();
-
-  auto ops_remaining = ops;
-  auto start_time = env->NowNanos();
-  size_t total = 0;
-  while (ops_remaining--) {
-    auto end = v.end();
-    for (auto pos = v.begin(); pos != end; ++pos) {
-      total += pos->size();
-    }
-  }
-  auto elapsed = env->NowNanos() - start_time;
-  cout << "performed " << ops << " sequence access against " << name << "\n\t"
-       << "size: " << elem_size << "\n\t"
-       << "total time elapsed: " << elapsed << " (ns)" << endl;
-  // HACK avoid compiler's optimization to ignore total
-  return total;
-}
-
-// This test case only reports the performance between std::vector<string>
-// and autovector<string>. We chose string for comparison because in most
-// o our use cases we used std::vector<string>.
-TEST(AutoVectorTest, PerfBench) {
-  // We run same operations for kOps times in order to get a more fair result.
-  size_t kOps = 100000;
-
-  // Creation and insertion test
-  // Test the case when there is:
-  //  * no element inserted: internal array of std::vector may not really get
-  //    initialize.
-  //  * one element inserted: internal array of std::vector must have
-  //    initialized.
-  //  * kSize elements inserted. This shows the most time we'll spend if we
-  //    keep everything in stack.
-  //  * 2 * kSize elements inserted. The internal vector of
-  //    autovector must have been initialized.
-  cout << "=====================================================" << endl;
-  cout << "Creation and Insertion Test (value type: std::string)" << endl;
-  cout << "=====================================================" << endl;
-
-  // pre-generated unique keys
-  auto string_keys = GetTestKeys(kOps * 2 * kSize);
-  for (auto insertions : { 0ul, 1ul, kSize / 2, kSize, 2 * kSize }) {
-    BenchmarkVectorCreationAndInsertion<vector<string>>(
-      "vector<string>", kOps, insertions, string_keys
-    );
-    BenchmarkVectorCreationAndInsertion<autovector<string, kSize>>(
-      "autovector<string>", kOps, insertions, string_keys
-    );
-    cout << "-----------------------------------" << endl;
-  }
-
-  cout << "=====================================================" << endl;
-  cout << "Creation and Insertion Test (value type: uint64_t)" << endl;
-  cout << "=====================================================" << endl;
-
-  // pre-generated unique keys
-  vector<uint64_t> int_keys(kOps * 2 * kSize);
-  for (size_t i = 0; i < kOps * 2 * kSize; ++i) {
-    int_keys[i] = i;
-  }
-  for (auto insertions : { 0ul, 1ul, kSize / 2, kSize, 2 * kSize }) {
-    BenchmarkVectorCreationAndInsertion<vector<uint64_t>>(
-      "vector<uint64_t>", kOps, insertions, int_keys
-    );
-    BenchmarkVectorCreationAndInsertion<autovector<uint64_t, kSize>>(
-      "autovector<uint64_t>", kOps, insertions, int_keys
-    );
-    cout << "-----------------------------------" << endl;
-  }
-
-  // Sequence Access Test
-  cout << "=====================================================" << endl;
-  cout << "Sequence Access Test" << endl;
-  cout << "=====================================================" << endl;
-  for (auto elem_size : { kSize / 2, kSize, 2 * kSize }) {
-    BenchmarkSequenceAccess<vector<string>>(
-        "vector", kOps, elem_size
-    );
-    BenchmarkSequenceAccess<autovector<string, kSize>>(
-        "autovector", kOps, elem_size
-    );
-    cout << "-----------------------------------" << endl;
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/benchharness.cc b/src/rocksdb/util/benchharness.cc
deleted file mode 100644
index 8cd3700..0000000
--- a/src/rocksdb/util/benchharness.cc
+++ /dev/null
@@ -1,398 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// This code is derived from Benchmark.cpp implemented in Folly, the opensourced
-// Facebook C++ library available at https://github.com/facebook/folly
-// The code has removed any dependence on other folly and boost libraries
-
-#include "util/benchharness.h"
-
-#include <algorithm>
-#include <cmath>
-#include <cstring>
-#include <limits>
-#include <string>
-#include <utility>
-#include <vector>
-
-using std::function;
-using std::get;
-using std::make_pair;
-using std::max;
-using std::min;
-using std::pair;
-using std::sort;
-using std::string;
-using std::tuple;
-using std::vector;
-
-DEFINE_bool(benchmark, false, "Run benchmarks.");
-
-DEFINE_int64(bm_min_usec, 100,
-             "Minimum # of microseconds we'll accept for each benchmark.");
-
-DEFINE_int64(bm_min_iters, 1,
-             "Minimum # of iterations we'll try for each benchmark.");
-
-DEFINE_int32(bm_max_secs, 1,
-             "Maximum # of seconds we'll spend on each benchmark.");
-
-
-namespace rocksdb {
-namespace benchmark {
-
-BenchmarkSuspender::NanosecondsSpent BenchmarkSuspender::nsSpent;
-
-typedef function<uint64_t(unsigned int)> BenchmarkFun;
-static vector<tuple<const char*, const char*, BenchmarkFun>> benchmarks;
-
-// Add the global baseline
-BENCHMARK(globalBenchmarkBaseline) {
-  asm volatile("");
-}
-
-void detail::AddBenchmarkImpl(const char* file, const char* name,
-                              BenchmarkFun fun) {
-  benchmarks.emplace_back(file, name, std::move(fun));
-}
-
-/**
- * Given a point, gives density at that point as a number 0.0 < x <=
- * 1.0. The result is 1.0 if all samples are equal to where, and
- * decreases near 0 if all points are far away from it. The density is
- * computed with the help of a radial basis function.
- */
-static double Density(const double * begin, const double *const end,
-                      const double where, const double bandwidth) {
-  assert(begin < end);
-  assert(bandwidth > 0.0);
-  double sum = 0.0;
-  for (auto i = begin; i < end; i++) {
-    auto d = (*i - where) / bandwidth;
-    sum += exp(- d * d);
-  }
-  return sum / (end - begin);
-}
-
-/**
- * Computes mean and variance for a bunch of data points. Note that
- * mean is currently not being used.
- */
-static pair<double, double>
-MeanVariance(const double * begin, const double *const end) {
-  assert(begin < end);
-  double sum = 0.0, sum2 = 0.0;
-  for (auto i = begin; i < end; i++) {
-    sum += *i;
-    sum2 += *i * *i;
-  }
-  auto const n = end - begin;
-  return make_pair(sum / n, sqrt((sum2 - sum * sum / n) / n));
-}
-
-/**
- * Computes the mode of a sample set through brute force. Assumes
- * input is sorted.
- */
-static double Mode(const double * begin, const double *const end) {
-  assert(begin < end);
-  // Lower bound and upper bound for result and their respective
-  // densities.
-  auto
-    result = 0.0,
-    bestDensity = 0.0;
-
-  // Get the variance so we pass it down to Density()
-  auto const sigma = MeanVariance(begin, end).second;
-  if (!sigma) {
-    // No variance means constant signal
-    return *begin;
-  }
-
-  for (auto i = begin; i < end; i++) {
-    assert(i == begin || *i >= i[-1]);
-    auto candidate = Density(begin, end, *i, sigma * sqrt(2.0));
-    if (candidate > bestDensity) {
-      // Found a new best
-      bestDensity = candidate;
-      result = *i;
-    } else {
-      // Density is decreasing... we could break here if we definitely
-      // knew this is unimodal.
-    }
-  }
-
-  return result;
-}
-
-/**
- * Given a bunch of benchmark samples, estimate the actual run time.
- */
-static double EstimateTime(double * begin, double * end) {
-  assert(begin < end);
-
-  // Current state of the art: get the minimum. After some
-  // experimentation, it seems taking the minimum is the best.
-
-  return *std::min_element(begin, end);
-
-  // What follows after estimates the time as the mode of the
-  // distribution.
-
-  // Select the awesomest (i.e. most frequent) result. We do this by
-  // sorting and then computing the longest run length.
-  sort(begin, end);
-
-  // Eliminate outliers. A time much larger than the minimum time is
-  // considered an outlier.
-  while (end[-1] > 2.0 * *begin) {
-    --end;
-    if (begin == end) {
-//      LOG(INFO) << *begin;
-    }
-    assert(begin < end);
-  }
-
-  double result = 0;
-
-  /* Code used just for comparison purposes */ {
-    unsigned bestFrequency = 0;
-    unsigned candidateFrequency = 1;
-    double candidateValue = *begin;
-    for (auto current = begin + 1; ; ++current) {
-      if (current == end || *current != candidateValue) {
-        // Done with the current run, see if it was best
-        if (candidateFrequency > bestFrequency) {
-          bestFrequency = candidateFrequency;
-          result = candidateValue;
-        }
-        if (current == end) {
-          break;
-        }
-        // Start a new run
-        candidateValue = *current;
-        candidateFrequency = 1;
-      } else {
-        // Cool, inside a run, increase the frequency
-        ++candidateFrequency;
-      }
-    }
-  }
-
-  result = Mode(begin, end);
-
-  return result;
-}
-
-static double RunBenchmarkGetNSPerIteration(const BenchmarkFun& fun,
-                                            const double globalBaseline) {
-  // They key here is accuracy; too low numbers means the accuracy was
-  // coarse. We up the ante until we get to at least minNanoseconds
-  // timings.
-  static const auto minNanoseconds = FLAGS_bm_min_usec * 1000UL;
-
-  // We do measurements in several epochs and take the minimum, to
-  // account for jitter.
-  static const unsigned int epochs = 1000;
-  // We establish a total time budget as we don't want a measurement
-  // to take too long. This will curtail the number of actual epochs.
-  const uint64_t timeBudgetInNs = FLAGS_bm_max_secs * 1000000000;
-  auto env = Env::Default();
-  uint64_t global = env->NowNanos();
-
-  double epochResults[epochs] = { 0 };
-  size_t actualEpochs = 0;
-
-  for (; actualEpochs < epochs; ++actualEpochs) {
-    for (unsigned int n = FLAGS_bm_min_iters; n < (1UL << 30); n *= 2) {
-      auto const nsecs = fun(n);
-      if (nsecs < minNanoseconds) {
-        continue;
-      }
-      // We got an accurate enough timing, done. But only save if
-      // smaller than the current result.
-      epochResults[actualEpochs] = max(0.0,
-          static_cast<double>(nsecs) / n - globalBaseline);
-      // Done with the current epoch, we got a meaningful timing.
-      break;
-    }
-    uint64_t now = env->NowNanos();
-    if ((now - global) >= timeBudgetInNs) {
-      // No more time budget available.
-      ++actualEpochs;
-      break;
-    }
-  }
-
-  // If the benchmark was basically drowned in baseline noise, it's
-  // possible it became negative.
-  return max(0.0, EstimateTime(epochResults, epochResults + actualEpochs));
-}
-
-struct ScaleInfo {
-  double boundary;
-  const char* suffix;
-};
-
-static const ScaleInfo kTimeSuffixes[] {
-  { 365.25 * 24 * 3600, "years" },
-  { 24 * 3600, "days" },
-  { 3600, "hr" },
-  { 60, "min" },
-  { 1, "s" },
-  { 1E-3, "ms" },
-  { 1E-6, "us" },
-  { 1E-9, "ns" },
-  { 1E-12, "ps" },
-  { 1E-15, "fs" },
-  { 0, nullptr },
-};
-
-static const ScaleInfo kMetricSuffixes[] {
-  { 1E24, "Y" },  // yotta
-  { 1E21, "Z" },  // zetta
-  { 1E18, "X" },  // "exa" written with suffix 'X' so as to not create
-                  //   confusion with scientific notation
-  { 1E15, "P" },  // peta
-  { 1E12, "T" },  // terra
-  { 1E9, "G" },   // giga
-  { 1E6, "M" },   // mega
-  { 1E3, "K" },   // kilo
-  { 1, "" },
-  { 1E-3, "m" },  // milli
-  { 1E-6, "u" },  // micro
-  { 1E-9, "n" },  // nano
-  { 1E-12, "p" },  // pico
-  { 1E-15, "f" },  // femto
-  { 1E-18, "a" },  // atto
-  { 1E-21, "z" },  // zepto
-  { 1E-24, "y" },  // yocto
-  { 0, nullptr },
-};
-
-static string HumanReadable(double n, unsigned int decimals,
-                            const ScaleInfo* scales) {
-  if (std::isinf(n) || std::isnan(n)) {
-    return std::to_string(n);
-  }
-
-  const double absValue = fabs(n);
-  const ScaleInfo* scale = scales;
-  while (absValue < scale[0].boundary && scale[1].suffix != nullptr) {
-    ++scale;
-  }
-
-  const double scaledValue = n / scale->boundary;
-  char a[80];
-  snprintf(a, sizeof(a), "%.*f%s", decimals, scaledValue, scale->suffix);
-  return a;
-}
-
-static string ReadableTime(double n, unsigned int decimals) {
-  return HumanReadable(n, decimals, kTimeSuffixes);
-}
-
-static string MetricReadable(double n, unsigned int decimals) {
-  return HumanReadable(n, decimals, kMetricSuffixes);
-}
-
-static void PrintBenchmarkResultsAsTable(
-  const vector<tuple<const char*, const char*, double> >& data) {
-  // Width available
-  static const uint columns = 76;
-
-  // Compute the longest benchmark name
-  size_t longestName = 0;
-  for (size_t i = 1; i < benchmarks.size(); i++) {
-    longestName = max(longestName, strlen(get<1>(benchmarks[i])));
-  }
-
-  // Print a horizontal rule
-  auto separator = [&](char pad) {
-    puts(string(columns, pad).c_str());
-  };
-
-  // Print header for a file
-  auto header = [&](const char* file) {
-    separator('=');
-    printf("%-*srelative  time/iter  iters/s\n",
-           columns - 28, file);
-    separator('=');
-  };
-
-  double baselineNsPerIter = std::numeric_limits<double>::max();
-  const char* lastFile = "";
-
-  for (auto& datum : data) {
-    auto file = get<0>(datum);
-    if (strcmp(file, lastFile)) {
-      // New file starting
-      header(file);
-      lastFile = file;
-    }
-
-    string s = get<1>(datum);
-    if (s == "-") {
-      separator('-');
-      continue;
-    }
-    bool useBaseline /* = void */;
-    if (s[0] == '%') {
-      s.erase(0, 1);
-      useBaseline = true;
-    } else {
-      baselineNsPerIter = get<2>(datum);
-      useBaseline = false;
-    }
-    s.resize(columns - 29, ' ');
-    auto nsPerIter = get<2>(datum);
-    auto secPerIter = nsPerIter / 1E9;
-    auto itersPerSec = 1 / secPerIter;
-    if (!useBaseline) {
-      // Print without baseline
-      printf("%*s           %9s  %7s\n",
-             static_cast<int>(s.size()), s.c_str(),
-             ReadableTime(secPerIter, 2).c_str(),
-             MetricReadable(itersPerSec, 2).c_str());
-    } else {
-      // Print with baseline
-      auto rel = baselineNsPerIter / nsPerIter * 100.0;
-      printf("%*s %7.2f%%  %9s  %7s\n",
-             static_cast<int>(s.size()), s.c_str(),
-             rel,
-             ReadableTime(secPerIter, 2).c_str(),
-             MetricReadable(itersPerSec, 2).c_str());
-    }
-  }
-  separator('=');
-}
-
-void RunBenchmarks() {
-  ASSERT_TRUE(!benchmarks.empty());
-
-  vector<tuple<const char*, const char*, double>> results;
-  results.reserve(benchmarks.size() - 1);
-
-  // PLEASE KEEP QUIET. MEASUREMENTS IN PROGRESS.
-
-  auto const globalBaseline = RunBenchmarkGetNSPerIteration(
-    get<2>(benchmarks.front()), 0);
-  for (size_t i = 1; i < benchmarks.size(); i++) {
-    double elapsed = 0.0;
-    if (strcmp(get<1>(benchmarks[i]), "-") != 0) {  // skip separators
-      elapsed = RunBenchmarkGetNSPerIteration(get<2>(benchmarks[i]),
-                                              globalBaseline);
-    }
-    results.emplace_back(get<0>(benchmarks[i]),
-                         get<1>(benchmarks[i]), elapsed);
-  }
-
-  // PLEASE MAKE NOISE. MEASUREMENTS DONE.
-
-  PrintBenchmarkResultsAsTable(results);
-}
-
-}  // namespace benchmark
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/benchharness.h b/src/rocksdb/util/benchharness.h
deleted file mode 100644
index 4fdef52..0000000
--- a/src/rocksdb/util/benchharness.h
+++ /dev/null
@@ -1,357 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// This code is derived from Benchmark.h implemented in Folly, the opensourced
-// Facebook C++ library available at https://github.com/facebook/folly
-// The code has removed any dependence on other folly and boost libraries
-
-#pragma once
-
-#include <gflags/gflags.h>
-
-#include <cassert>
-#include <functional>
-#include <limits>
-
-#include "util/testharness.h"
-#include "rocksdb/env.h"
-
-namespace rocksdb {
-namespace benchmark {
-
-/**
- * Runs all benchmarks defined. Usually put in main().
- */
-void RunBenchmarks();
-
-namespace detail {
-
-/**
- * Adds a benchmark wrapped in a std::function. Only used
- * internally. Pass by value is intentional.
- */
-void AddBenchmarkImpl(const char* file,
-                      const char* name,
-                      std::function<uint64_t(unsigned int)>);
-
-}  // namespace detail
-
-
-/**
- * Supporting type for BENCHMARK_SUSPEND defined below.
- */
-struct BenchmarkSuspender {
-  BenchmarkSuspender() { start_ = Env::Default()->NowNanos(); }
-
-  BenchmarkSuspender(const BenchmarkSuspender&) = delete;
-  BenchmarkSuspender(BenchmarkSuspender && rhs) {
-    start_ = rhs.start_;
-    rhs.start_ = 0;
-  }
-
-  BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete;
-  BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) {
-    if (start_ > 0) {
-      tally();
-    }
-    start_ = rhs.start_;
-    rhs.start_ = 0;
-    return *this;
-  }
-
-  ~BenchmarkSuspender() {
-    if (start_ > 0) {
-      tally();
-    }
-  }
-
-  void Dismiss() {
-    assert(start_ > 0);
-    tally();
-    start_ = 0;
-  }
-
-  void Rehire() { start_ = Env::Default()->NowNanos(); }
-
-  /**
-   * This helps the macro definition. To get around the dangers of
-   * operator bool, returns a pointer to member (which allows no
-   * arithmetic).
-   */
-  /* implicit */
-  operator int BenchmarkSuspender::*() const { return nullptr; }
-
-  /**
-   * Accumulates nanoseconds spent outside benchmark.
-   */
-  typedef uint64_t NanosecondsSpent;
-  static NanosecondsSpent nsSpent;
-
- private:
-  void tally() {
-    uint64_t end = Env::Default()->NowNanos();
-    nsSpent += start_ - end;
-    start_ = end;
-  }
-
-  uint64_t start_;
-};
-
-/**
- * Adds a benchmark. Usually not called directly but instead through
- * the macro BENCHMARK defined below. The lambda function involved
- * must take exactly one parameter of type unsigned, and the benchmark
- * uses it with counter semantics (iteration occurs inside the
- * function).
- */
-template <typename Lambda>
-void
-AddBenchmark_n(const char* file, const char* name, Lambda&& lambda) {
-  auto execute = [=](unsigned int times) -> uint64_t {
-    BenchmarkSuspender::nsSpent = 0;
-    uint64_t start, end;
-    auto env = Env::Default();
-
-    // CORE MEASUREMENT STARTS
-    start = env->NowNanos();
-    lambda(times);
-    end = env->NowNanos();
-    // CORE MEASUREMENT ENDS
-    return (end - start) - BenchmarkSuspender::nsSpent;
-  };
-
-  detail::AddBenchmarkImpl(file, name,
-                           std::function<uint64_t(unsigned int)>(execute));
-}
-
-/**
- * Adds a benchmark. Usually not called directly but instead through
- * the macro BENCHMARK defined below. The lambda function involved
- * must take zero parameters, and the benchmark calls it repeatedly
- * (iteration occurs outside the function).
- */
-template <typename Lambda>
-void
-AddBenchmark(const char* file, const char* name, Lambda&& lambda) {
-  AddBenchmark_n(file, name, [=](unsigned int times) {
-      while (times-- > 0) {
-        lambda();
-      }
-    });
-}
-
-}  // namespace benchmark
-}  // namespace rocksdb
-
-/**
- * FB_ONE_OR_NONE(hello, world) expands to hello and
- * FB_ONE_OR_NONE(hello) expands to nothing. This macro is used to
- * insert or eliminate text based on the presence of another argument.
- */
-#define FB_ONE_OR_NONE(a, ...) FB_THIRD(a, ## __VA_ARGS__, a)
-#define FB_THIRD(a, b, ...) __VA_ARGS__
-
-#define FB_CONCATENATE_IMPL(s1, s2) s1##s2
-#define FB_CONCATENATE(s1, s2) FB_CONCATENATE_IMPL(s1, s2)
-
-#define FB_ANONYMOUS_VARIABLE(str) FB_CONCATENATE(str, __LINE__)
-
-#define FB_STRINGIZE(x) #x
-
-/**
- * Introduces a benchmark function. Used internally, see BENCHMARK and
- * friends below.
- */
-#define BENCHMARK_IMPL_N(funName, stringName, paramType, paramName)     \
-  static void funName(paramType);                                       \
-  static bool FB_ANONYMOUS_VARIABLE(rocksdbBenchmarkUnused) = (         \
-    ::rocksdb::benchmark::AddBenchmark_n(__FILE__, stringName,          \
-      [](paramType paramName) { funName(paramName); }),                 \
-    true);                                                              \
-  static void funName(paramType paramName)
-
-#define BENCHMARK_IMPL(funName, stringName)                             \
-  static void funName();                                                \
-  static bool FB_ANONYMOUS_VARIABLE(rocksdbBenchmarkUnused) = (         \
-    ::rocksdb::benchmark::AddBenchmark(__FILE__, stringName,            \
-      []() { funName(); }),                                             \
-    true);                                                              \
-  static void funName()
-
-/**
- * Introduces a benchmark function. Use with either one one or two
- * arguments. The first is the name of the benchmark. Use something
- * descriptive, such as insertVectorBegin. The second argument may be
- * missing, or could be a symbolic counter. The counter dictates how
- * many internal iteration the benchmark does. Example:
- *
- * BENCHMARK(vectorPushBack) {
- *   vector<int> v;
- *   v.push_back(42);
- * }
- *
- * BENCHMARK_N(insertVectorBegin, n) {
- *   vector<int> v;
- *   FOR_EACH_RANGE (i, 0, n) {
- *     v.insert(v.begin(), 42);
- *   }
- * }
- */
-#define BENCHMARK_N(name, ...)                                  \
-  BENCHMARK_IMPL_N(                                             \
-    name,                                                       \
-    FB_STRINGIZE(name),                                         \
-    FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__),                   \
-    __VA_ARGS__)
-
-#define BENCHMARK(name)                                         \
-  BENCHMARK_IMPL(                                               \
-    name,                                                       \
-    FB_STRINGIZE(name))
-
-/**
- * Defines a benchmark that passes a parameter to another one. This is
- * common for benchmarks that need a "problem size" in addition to
- * "number of iterations". Consider:
- *
- * void pushBack(uint n, size_t initialSize) {
- *   vector<int> v;
- *   BENCHMARK_SUSPEND {
- *     v.resize(initialSize);
- *   }
- *   FOR_EACH_RANGE (i, 0, n) {
- *    v.push_back(i);
- *   }
- * }
- * BENCHMARK_PARAM(pushBack, 0)
- * BENCHMARK_PARAM(pushBack, 1000)
- * BENCHMARK_PARAM(pushBack, 1000000)
- *
- * The benchmark above estimates the speed of push_back at different
- * initial sizes of the vector. The framework will pass 0, 1000, and
- * 1000000 for initialSize, and the iteration count for n.
- */
-#define BENCHMARK_PARAM(name, param)                                    \
-  BENCHMARK_NAMED_PARAM(name, param, param)
-
-/*
- * Like BENCHMARK_PARAM(), but allows a custom name to be specified for each
- * parameter, rather than using the parameter value.
- *
- * Useful when the parameter value is not a valid token for string pasting,
- * of when you want to specify multiple parameter arguments.
- *
- * For example:
- *
- * void addValue(uint n, int64_t bucketSize, int64_t min, int64_t max) {
- *   Histogram<int64_t> hist(bucketSize, min, max);
- *   int64_t num = min;
- *   FOR_EACH_RANGE (i, 0, n) {
- *     hist.addValue(num);
- *     ++num;
- *     if (num > max) { num = min; }
- *   }
- * }
- *
- * BENCHMARK_NAMED_PARAM(addValue, 0_to_100, 1, 0, 100)
- * BENCHMARK_NAMED_PARAM(addValue, 0_to_1000, 10, 0, 1000)
- * BENCHMARK_NAMED_PARAM(addValue, 5k_to_20k, 250, 5000, 20000)
- */
-#define BENCHMARK_NAMED_PARAM(name, param_name, ...)                    \
-  BENCHMARK_IMPL(                                                       \
-      FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)),              \
-      FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")") {            \
-    name(__VA_ARGS__);                                                  \
-  }
-
-#define BENCHMARK_NAMED_PARAM_N(name, param_name, ...)                  \
-  BENCHMARK_IMPL_N(                                                     \
-      FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)),              \
-      FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")",              \
-      unsigned,                                                         \
-      iters) {                                                          \
-    name(iters, ## __VA_ARGS__);                                        \
-  }
-
-/**
- * Just like BENCHMARK, but prints the time relative to a
- * baseline. The baseline is the most recent BENCHMARK() seen in
- * lexical order. Example:
- *
- * // This is the baseline
- * BENCHMARK_N(insertVectorBegin, n) {
- *   vector<int> v;
- *   FOR_EACH_RANGE (i, 0, n) {
- *     v.insert(v.begin(), 42);
- *   }
- * }
- *
- * BENCHMARK_RELATIVE_N(insertListBegin, n) {
- *   list<int> s;
- *   FOR_EACH_RANGE (i, 0, n) {
- *     s.insert(s.begin(), 42);
- *   }
- * }
- *
- * Any number of relative benchmark can be associated with a
- * baseline. Another BENCHMARK() occurrence effectively establishes a
- * new baseline.
- */
-#define BENCHMARK_RELATIVE_N(name, ...)                         \
-  BENCHMARK_IMPL_N(                                             \
-    name,                                                       \
-    "%" FB_STRINGIZE(name),                                     \
-    FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__),                   \
-    __VA_ARGS__)
-
-#define BENCHMARK_RELATIVE(name)                                \
-  BENCHMARK_IMPL(                                               \
-    name,                                                       \
-    "%" FB_STRINGIZE(name))
-
-/**
- * A combination of BENCHMARK_RELATIVE and BENCHMARK_PARAM.
- */
-#define BENCHMARK_RELATIVE_PARAM(name, param)                   \
-  BENCHMARK_RELATIVE_NAMED_PARAM(name, param, param)
-
-/**
- * A combination of BENCHMARK_RELATIVE and BENCHMARK_NAMED_PARAM.
- */
-#define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...)           \
-  BENCHMARK_IMPL_N(                                                     \
-      FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)),              \
-      "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")",          \
-      unsigned,                                                         \
-      iters) {                                                          \
-    name(iters, ## __VA_ARGS__);                                        \
-  }
-
-/**
- * Draws a line of dashes.
- */
-#define BENCHMARK_DRAW_LINE()                                       \
-  static bool FB_ANONYMOUS_VARIABLE(rocksdbBenchmarkUnused) = (     \
-    ::rocksdb::benchmark::AddBenchmark(__FILE__, "-", []() { }),    \
-    true);
-
-/**
- * Allows execution of code that doesn't count torward the benchmark's
- * time budget. Example:
- *
- * BENCHMARK_START_GROUP(insertVectorBegin, n) {
- *   vector<int> v;
- *   BENCHMARK_SUSPEND {
- *     v.reserve(n);
- *   }
- *   FOR_EACH_RANGE (i, 0, n) {
- *     v.insert(v.begin(), 42);
- *   }
- * }
- */
-#define BENCHMARK_SUSPEND                               \
-  if (auto FB_ANONYMOUS_VARIABLE(BENCHMARK_SUSPEND) =   \
-      ::rocksdb::benchmark::BenchmarkSuspender()) {}    \
-  else
diff --git a/src/rocksdb/util/benchharness_test.cc b/src/rocksdb/util/benchharness_test.cc
deleted file mode 100644
index 75ff658..0000000
--- a/src/rocksdb/util/benchharness_test.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#include "util/benchharness.h"
-#include <vector>
-
-namespace rocksdb {
-
-BENCHMARK(insertFrontVector) {
-  std::vector<int> v;
-  for (int i = 0; i < 100; i++) {
-    v.insert(v.begin(), i);
-  }
-}
-
-BENCHMARK_RELATIVE(insertBackVector) {
-  std::vector<int> v;
-  for (size_t i = 0; i < 100; i++) {
-    v.insert(v.end(), i);
-  }
-}
-
-BENCHMARK_N(insertFrontVector_n, n) {
-  std::vector<int> v;
-  for (size_t i = 0; i < n; i++) {
-    v.insert(v.begin(), i);
-  }
-}
-
-BENCHMARK_RELATIVE_N(insertBackVector_n, n) {
-  std::vector<int> v;
-  for (size_t i = 0; i < n; i++) {
-    v.insert(v.end(), i);
-  }
-}
-
-BENCHMARK_N(insertFrontEnd_n, n) {
-  std::vector<int> v;
-  for (size_t i = 0; i < n; i++) {
-    v.insert(v.begin(), i);
-  }
-  for (size_t i = 0; i < n; i++) {
-    v.insert(v.end(), i);
-  }
-}
-
-BENCHMARK_RELATIVE_N(insertFrontEndSuspend_n, n) {
-  std::vector<int> v;
-  for (size_t i = 0; i < n; i++) {
-    v.insert(v.begin(), i);
-  }
-  BENCHMARK_SUSPEND {
-    for (size_t i = 0; i < n; i++) {
-      v.insert(v.end(), i);
-    }
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  rocksdb::benchmark::RunBenchmarks();
-  return 0;
-}
diff --git a/src/rocksdb/util/blob_store.cc b/src/rocksdb/util/blob_store.cc
deleted file mode 100644
index daaf4bc..0000000
--- a/src/rocksdb/util/blob_store.cc
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#include "util/blob_store.h"
-
-namespace rocksdb {
-
-using namespace std;
-
-// BlobChunk
-bool BlobChunk::ImmediatelyBefore(const BlobChunk& chunk) const {
-  // overlapping!?
-  assert(!Overlap(chunk));
-  // size == 0 is a marker, not a block
-  return size != 0 &&
-    bucket_id == chunk.bucket_id &&
-    offset + size == chunk.offset;
-}
-
-bool BlobChunk::Overlap(const BlobChunk &chunk) const {
-  return size != 0 && chunk.size != 0 && bucket_id == chunk.bucket_id &&
-    ((offset >= chunk.offset && offset < chunk.offset + chunk.size) ||
-     (chunk.offset >= offset && chunk.offset < offset + size));
-}
-
-// Blob
-string Blob::ToString() const {
-  string ret;
-  for (auto chunk : chunks) {
-    PutFixed32(&ret, chunk.bucket_id);
-    PutFixed32(&ret, chunk.offset);
-    PutFixed32(&ret, chunk.size);
-  }
-  return ret;
-}
-
-Blob::Blob(const std::string& blob) {
-  for (uint32_t i = 0; i < blob.size(); ) {
-    uint32_t t[3] = {0};
-    for (int j = 0; j < 3 && i + sizeof(uint32_t) - 1 < blob.size();
-                    ++j, i += sizeof(uint32_t)) {
-      t[j] = DecodeFixed32(blob.data() + i);
-    }
-    chunks.push_back(BlobChunk(t[0], t[1], t[2]));
-  }
-}
-
-// FreeList
-Status FreeList::Free(const Blob& blob) {
-  // add it back to the free list
-  for (auto chunk : blob.chunks) {
-    free_blocks_ += chunk.size;
-    if (fifo_free_chunks_.size() &&
-        fifo_free_chunks_.back().ImmediatelyBefore(chunk)) {
-      fifo_free_chunks_.back().size += chunk.size;
-    } else {
-      fifo_free_chunks_.push_back(chunk);
-    }
-  }
-
-  return Status::OK();
-}
-
-Status FreeList::Allocate(uint32_t blocks, Blob* blob) {
-  if (free_blocks_ < blocks) {
-    return Status::Incomplete("");
-  }
-
-  blob->chunks.clear();
-  free_blocks_ -= blocks;
-
-  while (blocks > 0) {
-    assert(fifo_free_chunks_.size() > 0);
-    auto& front = fifo_free_chunks_.front();
-    if (front.size > blocks) {
-      blob->chunks.push_back(BlobChunk(front.bucket_id, front.offset, blocks));
-      front.offset += blocks;
-      front.size -= blocks;
-      blocks = 0;
-    } else {
-      blob->chunks.push_back(front);
-      blocks -= front.size;
-      fifo_free_chunks_.pop_front();
-    }
-  }
-  assert(blocks == 0);
-
-  return Status::OK();
-}
-
-bool FreeList::Overlap(const Blob &blob) const {
-  for (auto chunk : blob.chunks) {
-    for (auto itr = fifo_free_chunks_.begin();
-         itr != fifo_free_chunks_.end();
-         ++itr) {
-      if (itr->Overlap(chunk)) {
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-// BlobStore
-BlobStore::BlobStore(const string& directory,
-                     uint64_t block_size,
-                     uint32_t blocks_per_bucket,
-                     uint32_t max_buckets,
-                     Env* env) :
-    directory_(directory),
-    block_size_(block_size),
-    blocks_per_bucket_(blocks_per_bucket),
-    env_(env),
-    max_buckets_(max_buckets) {
-  env_->CreateDirIfMissing(directory_);
-
-  storage_options_.use_mmap_writes = false;
-  storage_options_.use_mmap_reads = false;
-
-  buckets_size_ = 0;
-  buckets_ = new unique_ptr<RandomRWFile>[max_buckets_];
-
-  CreateNewBucket();
-}
-
-BlobStore::~BlobStore() {
-  // TODO we don't care about recovery for now
-  delete [] buckets_;
-}
-
-Status BlobStore::Put(const Slice& value, Blob* blob) {
-  // convert size to number of blocks
-  Status s = Allocate((value.size() + block_size_ - 1) / block_size_, blob);
-  if (!s.ok()) {
-    return s;
-  }
-  auto size_left = (uint64_t) value.size();
-
-  uint64_t offset = 0; // in bytes, not blocks
-  for (auto chunk : blob->chunks) {
-    uint64_t write_size = min(chunk.size * block_size_, size_left);
-    assert(chunk.bucket_id < buckets_size_);
-    s = buckets_[chunk.bucket_id].get()->Write(chunk.offset * block_size_,
-                                               Slice(value.data() + offset,
-                                                     write_size));
-    if (!s.ok()) {
-      Delete(*blob);
-      return s;
-    }
-    offset += write_size;
-    size_left -= write_size;
-    if (write_size < chunk.size * block_size_) {
-      // if we have any space left in the block, fill it up with zeros
-      string zero_string(chunk.size * block_size_ - write_size, 0);
-      s = buckets_[chunk.bucket_id].get()->Write(chunk.offset * block_size_ +
-                                                    write_size,
-                                                 Slice(zero_string));
-    }
-  }
-
-  if (size_left > 0) {
-    Delete(*blob);
-    return Status::Corruption("Tried to write more data than fits in the blob");
-  }
-
-  return Status::OK();
-}
-
-Status BlobStore::Get(const Blob& blob,
-                      string* value) const {
-  {
-    // assert that it doesn't overlap with free list
-    // it will get compiled out for release
-    MutexLock l(&free_list_mutex_);
-    assert(!free_list_.Overlap(blob));
-  }
-
-  value->resize(blob.Size() * block_size_);
-
-  uint64_t offset = 0; // in bytes, not blocks
-  for (auto chunk : blob.chunks) {
-    Slice result;
-    assert(chunk.bucket_id < buckets_size_);
-    Status s;
-    s = buckets_[chunk.bucket_id].get()->Read(chunk.offset * block_size_,
-                                              chunk.size * block_size_,
-                                              &result,
-                                              &value->at(offset));
-    if (!s.ok()) {
-      value->clear();
-      return s;
-    }
-    if (result.size() < chunk.size * block_size_) {
-      value->clear();
-      return Status::Corruption("Could not read in from file");
-    }
-    offset += chunk.size * block_size_;
-  }
-
-  // remove the '\0's at the end of the string
-  value->erase(find(value->begin(), value->end(), '\0'), value->end());
-
-  return Status::OK();
-}
-
-Status BlobStore::Delete(const Blob& blob) {
-  MutexLock l(&free_list_mutex_);
-  return free_list_.Free(blob);
-}
-
-Status BlobStore::Sync() {
-  for (size_t i = 0; i < buckets_size_; ++i) {
-    Status s = buckets_[i].get()->Sync();
-    if (!s.ok()) {
-      return s;
-    }
-  }
-  return Status::OK();
-}
-
-Status BlobStore::Allocate(uint32_t blocks, Blob* blob) {
-  MutexLock l(&free_list_mutex_);
-  Status s;
-
-  s = free_list_.Allocate(blocks, blob);
-  if (!s.ok()) {
-    s = CreateNewBucket();
-    if (!s.ok()) {
-      return s;
-    }
-    s = free_list_.Allocate(blocks, blob);
-  }
-
-  return s;
-}
-
-// called with free_list_mutex_ held
-Status BlobStore::CreateNewBucket() {
-  MutexLock l(&buckets_mutex_);
-
-  if (buckets_size_ >= max_buckets_) {
-    return Status::NotSupported("Max size exceeded\n");
-  }
-
-  int new_bucket_id = buckets_size_;
-
-  char fname[200];
-  sprintf(fname, "%s/%d.bs", directory_.c_str(), new_bucket_id);
-
-  Status s = env_->NewRandomRWFile(string(fname),
-                                   &buckets_[new_bucket_id],
-                                   storage_options_);
-  if (!s.ok()) {
-    return s;
-  }
-
-  // whether Allocate succeeds or not, does not affect the overall correctness
-  // of this function - calling Allocate is really optional
-  // (also, tmpfs does not support allocate)
-  buckets_[new_bucket_id].get()->Allocate(0, block_size_ * blocks_per_bucket_);
-
-  buckets_size_ = new_bucket_id + 1;
-
-  return free_list_.Free(Blob(new_bucket_id, 0, blocks_per_bucket_));
-}
-
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/blob_store.h b/src/rocksdb/util/blob_store.h
deleted file mode 100644
index ce86337..0000000
--- a/src/rocksdb/util/blob_store.h
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-#include "port/port.h"
-#include "util/mutexlock.h"
-#include "util/coding.h"
-
-#include <list>
-#include <deque>
-#include <cstdint>
-#include <iostream>
-#include <stdexcept>
-#include <algorithm>
-#include <cstdio>
-
-namespace rocksdb {
-
-struct BlobChunk {
-  uint32_t bucket_id;
-  uint32_t offset; // in blocks
-  uint32_t size; // in blocks
-  BlobChunk() {}
-  BlobChunk(uint32_t bucket_id, uint32_t offset, uint32_t size) :
-    bucket_id(bucket_id), offset(offset), size(size) {}
-
-  // returns true if it's immediately before chunk
-  bool ImmediatelyBefore(const BlobChunk& chunk) const;
-  // returns true if chunks overlap
-  bool Overlap(const BlobChunk &chunk) const;
-};
-
-// We represent each Blob as a string in format:
-// bucket_id offset size|bucket_id offset size...
-// The string can be used to reference the Blob stored on external
-// device/file
-// Not thread-safe!
-struct Blob {
-  // Generates the string
-  std::string ToString() const;
-  // Parses the previously generated string
-  explicit Blob(const std::string& blob);
-  // Creates unfragmented Blob
-  Blob(uint32_t bucket_id, uint32_t offset, uint32_t size) {
-    SetOneChunk(bucket_id, offset, size);
-  }
-  Blob() {}
-
-  void SetOneChunk(uint32_t bucket_id, uint32_t offset, uint32_t size) {
-    chunks.clear();
-    chunks.push_back(BlobChunk(bucket_id, offset, size));
-  }
-
-  uint32_t Size() const { // in blocks
-    uint32_t ret = 0;
-    for (auto chunk : chunks) {
-      ret += chunk.size;
-    }
-    assert(ret > 0);
-    return ret;
-  }
-
-  // bucket_id, offset, size
-  std::vector<BlobChunk> chunks;
-};
-
-// Keeps a list of free chunks
-// NOT thread-safe. Externally synchronized
-class FreeList {
- public:
-  FreeList() :
-    free_blocks_(0) {}
-  ~FreeList() {}
-
-  // Allocates a a blob. Stores the allocated blob in
-  // 'blob'. Returns non-OK status if it failed to allocate.
-  // Thread-safe
-  Status Allocate(uint32_t blocks, Blob* blob);
-  // Frees the blob for reuse. Thread-safe
-  Status Free(const Blob& blob);
-
-  // returns true if blob is overlapping with any of the
-  // chunks stored in free list
-  bool Overlap(const Blob &blob) const;
-
- private:
-  std::deque<BlobChunk> fifo_free_chunks_;
-  uint32_t free_blocks_;
-  mutable port::Mutex mutex_;
-};
-
-// thread-safe
-class BlobStore {
- public:
-   // directory - wherever the blobs should be stored. It will be created
-   //   if missing
-   // block_size - self explanatory
-   // blocks_per_bucket - how many blocks we want to keep in one bucket.
-   //   Bucket is a device or a file that we use to store the blobs.
-   //   If we don't have enough blocks to allocate a new blob, we will
-   //   try to create a new file or device.
-   // max_buckets - maximum number of buckets BlobStore will create
-   //   BlobStore max size in bytes is
-   //     max_buckets * blocks_per_bucket * block_size
-   // env - env for creating new files
-  BlobStore(const std::string& directory,
-            uint64_t block_size,
-            uint32_t blocks_per_bucket,
-            uint32_t max_buckets,
-            Env* env);
-  ~BlobStore();
-
-  // Allocates space for value.size bytes (rounded up to be multiple of
-  // block size) and writes value.size bytes from value.data to a backing store.
-  // Sets Blob blob that can than be used for addressing the
-  // stored value. Returns non-OK status on error.
-  Status Put(const Slice& value, Blob* blob);
-  // Value needs to have enough space to store all the loaded stuff.
-  // This function is thread safe!
-  Status Get(const Blob& blob, std::string* value) const;
-  // Frees the blob for reuse, but does not delete the data
-  // on the backing store.
-  Status Delete(const Blob& blob);
-  // Sync all opened files that are modified
-  Status Sync();
-
- private:
-  const std::string directory_;
-  // block_size_ is uint64_t because when we multiply with
-  // blocks_size_ we want the result to be uint64_t or
-  // we risk overflowing
-  const uint64_t block_size_;
-  const uint32_t blocks_per_bucket_;
-  Env* env_;
-  EnvOptions storage_options_;
-  // protected by free_list_mutex_
-  FreeList free_list_;
-  // free_list_mutex_ is locked BEFORE buckets_mutex_
-  mutable port::Mutex free_list_mutex_;
-  // protected by buckets_mutex_
-  // array of buckets
-  unique_ptr<RandomRWFile>* buckets_;
-  // number of buckets in the array
-  uint32_t buckets_size_;
-  uint32_t max_buckets_;
-  mutable port::Mutex buckets_mutex_;
-
-  // Calls FreeList allocate. If free list can't allocate
-  // new blob, creates new bucket and tries again
-  // Thread-safe
-  Status Allocate(uint32_t blocks, Blob* blob);
-
-  // Creates a new backing store and adds all the blocks
-  // from the new backing store to the free list
-  Status CreateNewBucket();
-};
-
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/blob_store_test.cc b/src/rocksdb/util/blob_store_test.cc
deleted file mode 100644
index f199f5d..0000000
--- a/src/rocksdb/util/blob_store_test.cc
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/blob_store.h"
-
-#include "util/testharness.h"
-#include "util/testutil.h"
-#include "util/random.h"
-
-#include <cstdlib>
-#include <string>
-
-namespace rocksdb {
-
-using namespace std;
-
-class BlobStoreTest { };
-
-TEST(BlobStoreTest, RangeParseTest) {
-  Blob e;
-  for (int i = 0; i < 5; ++i) {
-    e.chunks.push_back(BlobChunk(rand(), rand(), rand()));
-  }
-  string x = e.ToString();
-  Blob nx(x);
-
-  ASSERT_EQ(nx.ToString(), x);
-}
-
-// make sure we're reusing the freed space
-TEST(BlobStoreTest, SanityTest) {
-  const uint64_t block_size = 10;
-  const uint32_t blocks_per_file = 20;
-  Random random(5);
-
-  BlobStore blob_store(test::TmpDir() + "/blob_store_test",
-                       block_size,
-                       blocks_per_file,
-                       1000,
-                       Env::Default());
-
-  string buf;
-
-  // put string of size 170
-  test::RandomString(&random, 170, &buf);
-  Blob r1;
-  ASSERT_OK(blob_store.Put(Slice(buf), &r1));
-  // use the first file
-  for (size_t i = 0; i < r1.chunks.size(); ++i) {
-    ASSERT_EQ(r1.chunks[0].bucket_id, 0u);
-  }
-
-  // put string of size 30
-  test::RandomString(&random, 30, &buf);
-  Blob r2;
-  ASSERT_OK(blob_store.Put(Slice(buf), &r2));
-  // use the first file
-  for (size_t i = 0; i < r2.chunks.size(); ++i) {
-    ASSERT_EQ(r2.chunks[0].bucket_id, 0u);
-  }
-
-  // delete blob of size 170
-  ASSERT_OK(blob_store.Delete(r1));
-
-  // put a string of size 100
-  test::RandomString(&random, 100, &buf);
-  Blob r3;
-  ASSERT_OK(blob_store.Put(Slice(buf), &r3));
-  // use the first file
-  for (size_t i = 0; i < r3.chunks.size(); ++i) {
-    ASSERT_EQ(r3.chunks[0].bucket_id, 0u);
-  }
-
-  // put a string of size 70
-  test::RandomString(&random, 70, &buf);
-  Blob r4;
-  ASSERT_OK(blob_store.Put(Slice(buf), &r4));
-  // use the first file
-  for (size_t i = 0; i < r4.chunks.size(); ++i) {
-    ASSERT_EQ(r4.chunks[0].bucket_id, 0u);
-  }
-
-  // put a string of size 5
-  test::RandomString(&random, 5, &buf);
-  Blob r5;
-  ASSERT_OK(blob_store.Put(Slice(buf), &r5));
-  // now you get to use the second file
-  for (size_t i = 0; i < r5.chunks.size(); ++i) {
-    ASSERT_EQ(r5.chunks[0].bucket_id, 1u);
-  }
-}
-
-TEST(BlobStoreTest, FragmentedChunksTest) {
-  const uint64_t block_size = 10;
-  const uint32_t blocks_per_file = 20;
-  Random random(5);
-
-  BlobStore blob_store(test::TmpDir() + "/blob_store_test",
-                       block_size,
-                       blocks_per_file,
-                       1000,
-                       Env::Default());
-
-  string buf;
-
-  vector <Blob> r(4);
-
-  // put 4 strings of size 50
-  for (int k = 0; k < 4; ++k)  {
-    test::RandomString(&random, 50, &buf);
-    ASSERT_OK(blob_store.Put(Slice(buf), &r[k]));
-    // use the first file
-    for (size_t i = 0; i < r[k].chunks.size(); ++i) {
-      ASSERT_EQ(r[k].chunks[0].bucket_id, 0u);
-    }
-  }
-
-  // delete the first and third
-  ASSERT_OK(blob_store.Delete(r[0]));
-  ASSERT_OK(blob_store.Delete(r[2]));
-
-  // put string of size 100. it should reuse space that we deleting
-  // by deleting first and third strings of size 50
-  test::RandomString(&random, 100, &buf);
-  Blob r2;
-  ASSERT_OK(blob_store.Put(Slice(buf), &r2));
-  // use the first file
-  for (size_t i = 0; i < r2.chunks.size(); ++i) {
-    ASSERT_EQ(r2.chunks[0].bucket_id, 0u);
-  }
-}
-
-TEST(BlobStoreTest, CreateAndStoreTest) {
-  const uint64_t block_size = 10;
-  const uint32_t blocks_per_file = 1000;
-  const int max_blurb_size = 300;
-  Random random(5);
-
-  BlobStore blob_store(test::TmpDir() + "/blob_store_test",
-                       block_size,
-                       blocks_per_file,
-                       10000,
-                       Env::Default());
-  vector<pair<Blob, string>> ranges;
-
-  for (int i = 0; i < 2000; ++i) {
-    int decision = rand() % 5;
-    if (decision <= 2 || ranges.size() == 0) {
-      string buf;
-      int size_blocks = (rand() % max_blurb_size + 1);
-      int string_size = size_blocks * block_size - (rand() % block_size);
-      test::RandomString(&random, string_size, &buf);
-      Blob r;
-      ASSERT_OK(blob_store.Put(Slice(buf), &r));
-      ranges.push_back(make_pair(r, buf));
-    } else if (decision == 3) {
-      int ti = rand() % ranges.size();
-      string out_buf;
-      ASSERT_OK(blob_store.Get(ranges[ti].first, &out_buf));
-      ASSERT_EQ(ranges[ti].second, out_buf);
-    } else {
-      int ti = rand() % ranges.size();
-      ASSERT_OK(blob_store.Delete(ranges[ti].first));
-      ranges.erase(ranges.begin() + ti);
-    }
-  }
-  ASSERT_OK(blob_store.Sync());
-}
-
-TEST(BlobStoreTest, MaxSizeTest) {
-  const uint64_t block_size = 10;
-  const uint32_t blocks_per_file = 100;
-  const int max_buckets = 10;
-  Random random(5);
-
-  BlobStore blob_store(test::TmpDir() + "/blob_store_test",
-                       block_size,
-                       blocks_per_file,
-                       max_buckets,
-                       Env::Default());
-  string buf;
-  for (int i = 0; i < max_buckets; ++i) {
-    test::RandomString(&random, 1000, &buf);
-    Blob r;
-    ASSERT_OK(blob_store.Put(Slice(buf), &r));
-  }
-
-  test::RandomString(&random, 1000, &buf);
-  Blob r;
-  // should fail because max size
-  Status s = blob_store.Put(Slice(buf), &r);
-  ASSERT_EQ(s.ok(), false);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/bloom.cc b/src/rocksdb/util/bloom.cc
deleted file mode 100644
index 78ae04a..0000000
--- a/src/rocksdb/util/bloom.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/filter_policy.h"
-
-#include "rocksdb/slice.h"
-#include "util/hash.h"
-
-namespace rocksdb {
-
-namespace {
-static uint32_t BloomHash(const Slice& key) {
-  return Hash(key.data(), key.size(), 0xbc9f1d34);
-}
-
-class BloomFilterPolicy : public FilterPolicy {
- private:
-  size_t bits_per_key_;
-  size_t k_;
-  uint32_t (*hash_func_)(const Slice& key);
-
-  void initialize() {
-    // We intentionally round down to reduce probing cost a little bit
-    k_ = static_cast<size_t>(bits_per_key_ * 0.69);  // 0.69 =~ ln(2)
-    if (k_ < 1) k_ = 1;
-    if (k_ > 30) k_ = 30;
-  }
-
- public:
-  explicit BloomFilterPolicy(int bits_per_key,
-                             uint32_t (*hash_func)(const Slice& key))
-      : bits_per_key_(bits_per_key), hash_func_(hash_func) {
-    initialize();
-  }
-  explicit BloomFilterPolicy(int bits_per_key)
-      : bits_per_key_(bits_per_key) {
-    hash_func_ = BloomHash;
-    initialize();
-  }
-
-  virtual const char* Name() const {
-    return "rocksdb.BuiltinBloomFilter";
-  }
-
-  virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const {
-    // Compute bloom filter size (in both bits and bytes)
-    size_t bits = n * bits_per_key_;
-
-    // For small n, we can see a very high false positive rate.  Fix it
-    // by enforcing a minimum bloom filter length.
-    if (bits < 64) bits = 64;
-
-    size_t bytes = (bits + 7) / 8;
-    bits = bytes * 8;
-
-    const size_t init_size = dst->size();
-    dst->resize(init_size + bytes, 0);
-    dst->push_back(static_cast<char>(k_));  // Remember # of probes in filter
-    char* array = &(*dst)[init_size];
-    for (size_t i = 0; i < (size_t)n; i++) {
-      // Use double-hashing to generate a sequence of hash values.
-      // See analysis in [Kirsch,Mitzenmacher 2006].
-      uint32_t h = hash_func_(keys[i]);
-      const uint32_t delta = (h >> 17) | (h << 15);  // Rotate right 17 bits
-      for (size_t j = 0; j < k_; j++) {
-        const uint32_t bitpos = h % bits;
-        array[bitpos/8] |= (1 << (bitpos % 8));
-        h += delta;
-      }
-    }
-  }
-
-  virtual bool KeyMayMatch(const Slice& key, const Slice& bloom_filter) const {
-    const size_t len = bloom_filter.size();
-    if (len < 2) return false;
-
-    const char* array = bloom_filter.data();
-    const size_t bits = (len - 1) * 8;
-
-    // Use the encoded k so that we can read filters generated by
-    // bloom filters created using different parameters.
-    const size_t k = array[len-1];
-    if (k > 30) {
-      // Reserved for potentially new encodings for short bloom filters.
-      // Consider it a match.
-      return true;
-    }
-
-    uint32_t h = hash_func_(key);
-    const uint32_t delta = (h >> 17) | (h << 15);  // Rotate right 17 bits
-    for (size_t j = 0; j < k; j++) {
-      const uint32_t bitpos = h % bits;
-      if ((array[bitpos/8] & (1 << (bitpos % 8))) == 0) return false;
-      h += delta;
-    }
-    return true;
-  }
-};
-}
-
-const FilterPolicy* NewBloomFilterPolicy(int bits_per_key) {
-  return new BloomFilterPolicy(bits_per_key);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/bloom_test.cc b/src/rocksdb/util/bloom_test.cc
deleted file mode 100644
index 2c430e2..0000000
--- a/src/rocksdb/util/bloom_test.cc
+++ /dev/null
@@ -1,170 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <gflags/gflags.h>
-
-#include "rocksdb/filter_policy.h"
-
-#include "util/logging.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-DEFINE_int32(bits_per_key, 10, "");
-
-namespace rocksdb {
-
-static const int kVerbose = 1;
-
-static Slice Key(int i, char* buffer) {
-  memcpy(buffer, &i, sizeof(i));
-  return Slice(buffer, sizeof(i));
-}
-
-class BloomTest {
- private:
-  const FilterPolicy* policy_;
-  std::string filter_;
-  std::vector<std::string> keys_;
-
- public:
-  BloomTest() : policy_(NewBloomFilterPolicy(FLAGS_bits_per_key)) { }
-
-  ~BloomTest() {
-    delete policy_;
-  }
-
-  void Reset() {
-    keys_.clear();
-    filter_.clear();
-  }
-
-  void Add(const Slice& s) {
-    keys_.push_back(s.ToString());
-  }
-
-  void Build() {
-    std::vector<Slice> key_slices;
-    for (size_t i = 0; i < keys_.size(); i++) {
-      key_slices.push_back(Slice(keys_[i]));
-    }
-    filter_.clear();
-    policy_->CreateFilter(&key_slices[0], key_slices.size(), &filter_);
-    keys_.clear();
-    if (kVerbose >= 2) DumpFilter();
-  }
-
-  size_t FilterSize() const {
-    return filter_.size();
-  }
-
-  void DumpFilter() {
-    fprintf(stderr, "F(");
-    for (size_t i = 0; i+1 < filter_.size(); i++) {
-      const unsigned int c = static_cast<unsigned int>(filter_[i]);
-      for (int j = 0; j < 8; j++) {
-        fprintf(stderr, "%c", (c & (1 <<j)) ? '1' : '.');
-      }
-    }
-    fprintf(stderr, ")\n");
-  }
-
-  bool Matches(const Slice& s) {
-    if (!keys_.empty()) {
-      Build();
-    }
-    return policy_->KeyMayMatch(s, filter_);
-  }
-
-  double FalsePositiveRate() {
-    char buffer[sizeof(int)];
-    int result = 0;
-    for (int i = 0; i < 10000; i++) {
-      if (Matches(Key(i + 1000000000, buffer))) {
-        result++;
-      }
-    }
-    return result / 10000.0;
-  }
-};
-
-TEST(BloomTest, EmptyFilter) {
-  ASSERT_TRUE(! Matches("hello"));
-  ASSERT_TRUE(! Matches("world"));
-}
-
-TEST(BloomTest, Small) {
-  Add("hello");
-  Add("world");
-  ASSERT_TRUE(Matches("hello"));
-  ASSERT_TRUE(Matches("world"));
-  ASSERT_TRUE(! Matches("x"));
-  ASSERT_TRUE(! Matches("foo"));
-}
-
-static int NextLength(int length) {
-  if (length < 10) {
-    length += 1;
-  } else if (length < 100) {
-    length += 10;
-  } else if (length < 1000) {
-    length += 100;
-  } else {
-    length += 1000;
-  }
-  return length;
-}
-
-TEST(BloomTest, VaryingLengths) {
-  char buffer[sizeof(int)];
-
-  // Count number of filters that significantly exceed the false positive rate
-  int mediocre_filters = 0;
-  int good_filters = 0;
-
-  for (int length = 1; length <= 10000; length = NextLength(length)) {
-    Reset();
-    for (int i = 0; i < length; i++) {
-      Add(Key(i, buffer));
-    }
-    Build();
-
-    ASSERT_LE(FilterSize(), (size_t)((length * 10 / 8) + 40)) << length;
-
-    // All added keys must match
-    for (int i = 0; i < length; i++) {
-      ASSERT_TRUE(Matches(Key(i, buffer)))
-          << "Length " << length << "; key " << i;
-    }
-
-    // Check false positive rate
-    double rate = FalsePositiveRate();
-    if (kVerbose >= 1) {
-      fprintf(stderr, "False positives: %5.2f%% @ length = %6d ; bytes = %6d\n",
-              rate*100.0, length, static_cast<int>(FilterSize()));
-    }
-    ASSERT_LE(rate, 0.02);   // Must not be over 2%
-    if (rate > 0.0125) mediocre_filters++;  // Allowed, but not too often
-    else good_filters++;
-  }
-  if (kVerbose >= 1) {
-    fprintf(stderr, "Filters: %d good, %d mediocre\n",
-            good_filters, mediocre_filters);
-  }
-  ASSERT_LE(mediocre_filters, good_filters/5);
-}
-
-// Different bits-per-byte
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  google::ParseCommandLineFlags(&argc, &argv, true);
-
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/build_version.h b/src/rocksdb/util/build_version.h
deleted file mode 100644
index 2035a78..0000000
--- a/src/rocksdb/util/build_version.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-#if !defined(IOS_CROSS_COMPILE)
-// if we compile with Xcode, we don't run build_detect_vesion, so we don't
-// generate these variables
-// these variables tell us about the git config and time
-extern const char* rocksdb_build_git_sha;
-
-// these variables tell us when the compilation occurred
-extern const char* rocksdb_build_compile_time;
-extern const char* rocksdb_build_compile_date;
-#endif
diff --git a/src/rocksdb/util/cache.cc b/src/rocksdb/util/cache.cc
deleted file mode 100644
index f1c48a8..0000000
--- a/src/rocksdb/util/cache.cc
+++ /dev/null
@@ -1,481 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "rocksdb/cache.h"
-#include "port/port.h"
-#include "util/autovector.h"
-#include "util/hash.h"
-#include "util/mutexlock.h"
-
-namespace rocksdb {
-
-Cache::~Cache() {
-}
-
-namespace {
-
-// LRU cache implementation
-
-// An entry is a variable length heap-allocated structure.  Entries
-// are kept in a circular doubly linked list ordered by access time.
-struct LRUHandle {
-  void* value;
-  void (*deleter)(const Slice&, void* value);
-  LRUHandle* next_hash;
-  LRUHandle* next;
-  LRUHandle* prev;
-  size_t charge;      // TODO(opt): Only allow uint32_t?
-  size_t key_length;
-  uint32_t refs;
-  uint32_t hash;      // Hash of key(); used for fast sharding and comparisons
-  char key_data[1];   // Beginning of key
-
-  Slice key() const {
-    // For cheaper lookups, we allow a temporary Handle object
-    // to store a pointer to a key in "value".
-    if (next == this) {
-      return *(reinterpret_cast<Slice*>(value));
-    } else {
-      return Slice(key_data, key_length);
-    }
-  }
-};
-
-// We provide our own simple hash table since it removes a whole bunch
-// of porting hacks and is also faster than some of the built-in hash
-// table implementations in some of the compiler/runtime combinations
-// we have tested.  E.g., readrandom speeds up by ~5% over the g++
-// 4.4.3's builtin hashtable.
-class HandleTable {
- public:
-  HandleTable() : length_(0), elems_(0), list_(nullptr) { Resize(); }
-  ~HandleTable() { delete[] list_; }
-
-  LRUHandle* Lookup(const Slice& key, uint32_t hash) {
-    return *FindPointer(key, hash);
-  }
-
-  LRUHandle* Insert(LRUHandle* h) {
-    LRUHandle** ptr = FindPointer(h->key(), h->hash);
-    LRUHandle* old = *ptr;
-    h->next_hash = (old == nullptr ? nullptr : old->next_hash);
-    *ptr = h;
-    if (old == nullptr) {
-      ++elems_;
-      if (elems_ > length_) {
-        // Since each cache entry is fairly large, we aim for a small
-        // average linked list length (<= 1).
-        Resize();
-      }
-    }
-    return old;
-  }
-
-  LRUHandle* Remove(const Slice& key, uint32_t hash) {
-    LRUHandle** ptr = FindPointer(key, hash);
-    LRUHandle* result = *ptr;
-    if (result != nullptr) {
-      *ptr = result->next_hash;
-      --elems_;
-    }
-    return result;
-  }
-
- private:
-  // The table consists of an array of buckets where each bucket is
-  // a linked list of cache entries that hash into the bucket.
-  uint32_t length_;
-  uint32_t elems_;
-  LRUHandle** list_;
-
-  // Return a pointer to slot that points to a cache entry that
-  // matches key/hash.  If there is no such cache entry, return a
-  // pointer to the trailing slot in the corresponding linked list.
-  LRUHandle** FindPointer(const Slice& key, uint32_t hash) {
-    LRUHandle** ptr = &list_[hash & (length_ - 1)];
-    while (*ptr != nullptr &&
-           ((*ptr)->hash != hash || key != (*ptr)->key())) {
-      ptr = &(*ptr)->next_hash;
-    }
-    return ptr;
-  }
-
-  void Resize() {
-    uint32_t new_length = 16;
-    while (new_length < elems_ * 1.5) {
-      new_length *= 2;
-    }
-    LRUHandle** new_list = new LRUHandle*[new_length];
-    memset(new_list, 0, sizeof(new_list[0]) * new_length);
-    uint32_t count = 0;
-    for (uint32_t i = 0; i < length_; i++) {
-      LRUHandle* h = list_[i];
-      while (h != nullptr) {
-        LRUHandle* next = h->next_hash;
-        uint32_t hash = h->hash;
-        LRUHandle** ptr = &new_list[hash & (new_length - 1)];
-        h->next_hash = *ptr;
-        *ptr = h;
-        h = next;
-        count++;
-      }
-    }
-    assert(elems_ == count);
-    delete[] list_;
-    list_ = new_list;
-    length_ = new_length;
-  }
-};
-
-// A single shard of sharded cache.
-class LRUCache {
- public:
-  LRUCache();
-  ~LRUCache();
-
-  // Separate from constructor so caller can easily make an array of LRUCache
-  void SetCapacity(size_t capacity) { capacity_ = capacity; }
-  void SetRemoveScanCountLimit(size_t remove_scan_count_limit) {
-    remove_scan_count_limit_ = remove_scan_count_limit;
-  }
-
-  // Like Cache methods, but with an extra "hash" parameter.
-  Cache::Handle* Insert(const Slice& key, uint32_t hash,
-                        void* value, size_t charge,
-                        void (*deleter)(const Slice& key, void* value));
-  Cache::Handle* Lookup(const Slice& key, uint32_t hash);
-  void Release(Cache::Handle* handle);
-  void Erase(const Slice& key, uint32_t hash);
-  // Although in some platforms the update of size_t is atomic, to make sure
-  // GetUsage() works correctly under any platforms, we'll protect this
-  // function with mutex.
-  size_t GetUsage() const {
-    MutexLock l(&mutex_);
-    return usage_;
-  }
-
-  void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
-                              bool thread_safe);
-
- private:
-  void LRU_Remove(LRUHandle* e);
-  void LRU_Append(LRUHandle* e);
-  // Just reduce the reference count by 1.
-  // Return true if last reference
-  bool Unref(LRUHandle* e);
-  // Call deleter and free
-  void FreeEntry(LRUHandle* e);
-
-  // Initialized before use.
-  size_t capacity_;
-  uint32_t remove_scan_count_limit_;
-
-  // mutex_ protects the following state.
-  // We don't count mutex_ as the cache's internal state so semantically we
-  // don't mind mutex_ invoking the non-const actions.
-  mutable port::Mutex mutex_;
-  size_t usage_;
-
-  // Dummy head of LRU list.
-  // lru.prev is newest entry, lru.next is oldest entry.
-  LRUHandle lru_;
-
-  HandleTable table_;
-};
-
-LRUCache::LRUCache()
-    : usage_(0) {
-  // Make empty circular linked list
-  lru_.next = &lru_;
-  lru_.prev = &lru_;
-}
-
-LRUCache::~LRUCache() {
-  for (LRUHandle* e = lru_.next; e != &lru_; ) {
-    LRUHandle* next = e->next;
-    assert(e->refs == 1);  // Error if caller has an unreleased handle
-    if (Unref(e)) {
-      FreeEntry(e);
-    }
-    e = next;
-  }
-}
-
-bool LRUCache::Unref(LRUHandle* e) {
-  assert(e->refs > 0);
-  e->refs--;
-  return e->refs == 0;
-}
-
-void LRUCache::FreeEntry(LRUHandle* e) {
-  assert(e->refs == 0);
-  (*e->deleter)(e->key(), e->value);
-  free(e);
-}
-
-void LRUCache::ApplyToAllCacheEntries(void (*callback)(void*, size_t),
-                                      bool thread_safe) {
-  if (thread_safe) {
-    mutex_.Lock();
-  }
-  for (auto e = lru_.next; e != &lru_; e = e->next) {
-    callback(e->value, e->charge);
-  }
-  if (thread_safe) {
-    mutex_.Unlock();
-  }
-}
-
-void LRUCache::LRU_Remove(LRUHandle* e) {
-  e->next->prev = e->prev;
-  e->prev->next = e->next;
-  usage_ -= e->charge;
-}
-
-void LRUCache::LRU_Append(LRUHandle* e) {
-  // Make "e" newest entry by inserting just before lru_
-  e->next = &lru_;
-  e->prev = lru_.prev;
-  e->prev->next = e;
-  e->next->prev = e;
-  usage_ += e->charge;
-}
-
-Cache::Handle* LRUCache::Lookup(const Slice& key, uint32_t hash) {
-  MutexLock l(&mutex_);
-  LRUHandle* e = table_.Lookup(key, hash);
-  if (e != nullptr) {
-    e->refs++;
-    LRU_Remove(e);
-    LRU_Append(e);
-  }
-  return reinterpret_cast<Cache::Handle*>(e);
-}
-
-void LRUCache::Release(Cache::Handle* handle) {
-  LRUHandle* e = reinterpret_cast<LRUHandle*>(handle);
-  bool last_reference = false;
-  {
-    MutexLock l(&mutex_);
-    last_reference = Unref(e);
-  }
-  if (last_reference) {
-    FreeEntry(e);
-  }
-}
-
-Cache::Handle* LRUCache::Insert(
-    const Slice& key, uint32_t hash, void* value, size_t charge,
-    void (*deleter)(const Slice& key, void* value)) {
-
-  LRUHandle* e = reinterpret_cast<LRUHandle*>(
-      malloc(sizeof(LRUHandle)-1 + key.size()));
-  autovector<LRUHandle*> last_reference_list;
-
-  e->value = value;
-  e->deleter = deleter;
-  e->charge = charge;
-  e->key_length = key.size();
-  e->hash = hash;
-  e->refs = 2;  // One from LRUCache, one for the returned handle
-  memcpy(e->key_data, key.data(), key.size());
-
-  {
-    MutexLock l(&mutex_);
-
-    LRU_Append(e);
-
-    LRUHandle* old = table_.Insert(e);
-    if (old != nullptr) {
-      LRU_Remove(old);
-      if (Unref(old)) {
-        last_reference_list.push_back(old);
-      }
-    }
-
-    if (remove_scan_count_limit_ > 0) {
-      // Try to free the space by evicting the entries that are only
-      // referenced by the cache first.
-      LRUHandle* cur = lru_.next;
-      for (unsigned int scanCount = 0;
-           usage_ > capacity_ && cur != &lru_
-           && scanCount < remove_scan_count_limit_; scanCount++) {
-        LRUHandle* next = cur->next;
-        if (cur->refs <= 1) {
-          LRU_Remove(cur);
-          table_.Remove(cur->key(), cur->hash);
-          if (Unref(cur)) {
-            last_reference_list.push_back(cur);
-          }
-        }
-        cur = next;
-      }
-    }
-
-    // Free the space following strict LRU policy until enough space
-    // is freed.
-    while (usage_ > capacity_ && lru_.next != &lru_) {
-      LRUHandle* old = lru_.next;
-      LRU_Remove(old);
-      table_.Remove(old->key(), old->hash);
-      if (Unref(old)) {
-        last_reference_list.push_back(old);
-      }
-    }
-  }
-
-  // we free the entries here outside of mutex for
-  // performance reasons
-  for (auto entry : last_reference_list) {
-    FreeEntry(entry);
-  }
-
-  return reinterpret_cast<Cache::Handle*>(e);
-}
-
-void LRUCache::Erase(const Slice& key, uint32_t hash) {
-  LRUHandle* e;
-  bool last_reference = false;
-  {
-    MutexLock l(&mutex_);
-    e = table_.Remove(key, hash);
-    if (e != nullptr) {
-      LRU_Remove(e);
-      last_reference = Unref(e);
-    }
-  }
-  // mutex not held here
-  // last_reference will only be true if e != nullptr
-  if (last_reference) {
-    FreeEntry(e);
-  }
-}
-
-static int kNumShardBits = 4;          // default values, can be overridden
-static int kRemoveScanCountLimit = 0; // default values, can be overridden
-
-class ShardedLRUCache : public Cache {
- private:
-  LRUCache* shards_;
-  port::Mutex id_mutex_;
-  uint64_t last_id_;
-  int num_shard_bits_;
-  size_t capacity_;
-
-  static inline uint32_t HashSlice(const Slice& s) {
-    return Hash(s.data(), s.size(), 0);
-  }
-
-  uint32_t Shard(uint32_t hash) {
-    // Note, hash >> 32 yields hash in gcc, not the zero we expect!
-    return (num_shard_bits_ > 0) ? (hash >> (32 - num_shard_bits_)) : 0;
-  }
-
-  void init(size_t capacity, int numbits, int removeScanCountLimit) {
-    num_shard_bits_ = numbits;
-    capacity_ = capacity;
-    int num_shards = 1 << num_shard_bits_;
-    shards_ = new LRUCache[num_shards];
-    const size_t per_shard = (capacity + (num_shards - 1)) / num_shards;
-    for (int s = 0; s < num_shards; s++) {
-      shards_[s].SetCapacity(per_shard);
-      shards_[s].SetRemoveScanCountLimit(removeScanCountLimit);
-    }
-  }
-
- public:
-  explicit ShardedLRUCache(size_t capacity)
-      : last_id_(0) {
-    init(capacity, kNumShardBits, kRemoveScanCountLimit);
-  }
-  ShardedLRUCache(size_t capacity, int num_shard_bits,
-                  int removeScanCountLimit)
-     : last_id_(0) {
-    init(capacity, num_shard_bits, removeScanCountLimit);
-  }
-  virtual ~ShardedLRUCache() {
-    delete[] shards_;
-  }
-  virtual Handle* Insert(const Slice& key, void* value, size_t charge,
-                         void (*deleter)(const Slice& key, void* value)) {
-    const uint32_t hash = HashSlice(key);
-    return shards_[Shard(hash)].Insert(key, hash, value, charge, deleter);
-  }
-  virtual Handle* Lookup(const Slice& key) {
-    const uint32_t hash = HashSlice(key);
-    return shards_[Shard(hash)].Lookup(key, hash);
-  }
-  virtual void Release(Handle* handle) {
-    LRUHandle* h = reinterpret_cast<LRUHandle*>(handle);
-    shards_[Shard(h->hash)].Release(handle);
-  }
-  virtual void Erase(const Slice& key) {
-    const uint32_t hash = HashSlice(key);
-    shards_[Shard(hash)].Erase(key, hash);
-  }
-  virtual void* Value(Handle* handle) {
-    return reinterpret_cast<LRUHandle*>(handle)->value;
-  }
-  virtual uint64_t NewId() {
-    MutexLock l(&id_mutex_);
-    return ++(last_id_);
-  }
-  virtual size_t GetCapacity() const {
-    return capacity_;
-  }
-
-  virtual size_t GetUsage() const {
-    // We will not lock the cache when getting the usage from shards.
-    // for (size_t i = 0; i < num_shard_bits_; ++i)
-    int num_shards = 1 << num_shard_bits_;
-    size_t usage = 0;
-    for (int s = 0; s < num_shards; s++) {
-      usage += shards_[s].GetUsage();
-    }
-    return usage;
-  }
-
-  virtual void DisownData() {
-    shards_ = nullptr;
-  }
-
-  virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
-                                      bool thread_safe) override {
-    int num_shards = 1 << num_shard_bits_;
-    for (int s = 0; s < num_shards; s++) {
-      shards_[s].ApplyToAllCacheEntries(callback, thread_safe);
-    }
-  }
-};
-
-}  // end anonymous namespace
-
-shared_ptr<Cache> NewLRUCache(size_t capacity) {
-  return NewLRUCache(capacity, kNumShardBits);
-}
-
-shared_ptr<Cache> NewLRUCache(size_t capacity, int num_shard_bits) {
-  return NewLRUCache(capacity, num_shard_bits, kRemoveScanCountLimit);
-}
-
-shared_ptr<Cache> NewLRUCache(size_t capacity, int num_shard_bits,
-                              int removeScanCountLimit) {
-  if (num_shard_bits >= 20) {
-    return nullptr;  // the cache cannot be sharded into too many fine pieces
-  }
-  return std::make_shared<ShardedLRUCache>(capacity,
-                                           num_shard_bits,
-                                           removeScanCountLimit);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/cache_test.cc b/src/rocksdb/util/cache_test.cc
deleted file mode 100644
index c12cdb7..0000000
--- a/src/rocksdb/util/cache_test.cc
+++ /dev/null
@@ -1,449 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/cache.h"
-
-#include <vector>
-#include <string>
-#include <iostream>
-#include "util/coding.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-// Conversions between numeric keys/values and the types expected by Cache.
-static std::string EncodeKey(int k) {
-  std::string result;
-  PutFixed32(&result, k);
-  return result;
-}
-static int DecodeKey(const Slice& k) {
-  assert(k.size() == 4);
-  return DecodeFixed32(k.data());
-}
-static void* EncodeValue(uintptr_t v) { return reinterpret_cast<void*>(v); }
-static int DecodeValue(void* v) { return reinterpret_cast<uintptr_t>(v); }
-
-class CacheTest {
- public:
-  static CacheTest* current_;
-
-  static void Deleter(const Slice& key, void* v) {
-    current_->deleted_keys_.push_back(DecodeKey(key));
-    current_->deleted_values_.push_back(DecodeValue(v));
-  }
-
-  static const int kCacheSize = 1000;
-  static const int kNumShardBits = 4;
-  static const int kRemoveScanCountLimit = 16;
-
-  static const int kCacheSize2 = 100;
-  static const int kNumShardBits2 = 2;
-  static const int kRemoveScanCountLimit2 = 200;
-
-  std::vector<int> deleted_keys_;
-  std::vector<int> deleted_values_;
-  shared_ptr<Cache> cache_;
-  shared_ptr<Cache> cache2_;
-
-  CacheTest() :
-      cache_(NewLRUCache(kCacheSize, kNumShardBits, kRemoveScanCountLimit)),
-      cache2_(NewLRUCache(kCacheSize2, kNumShardBits2,
-                          kRemoveScanCountLimit2)) {
-    current_ = this;
-  }
-
-  ~CacheTest() {
-  }
-
-  int Lookup(shared_ptr<Cache> cache, int key) {
-    Cache::Handle* handle = cache->Lookup(EncodeKey(key));
-    const int r = (handle == nullptr) ? -1 : DecodeValue(cache->Value(handle));
-    if (handle != nullptr) {
-      cache->Release(handle);
-    }
-    return r;
-  }
-
-  void Insert(shared_ptr<Cache> cache, int key, int value, int charge = 1) {
-    cache->Release(cache->Insert(EncodeKey(key), EncodeValue(value), charge,
-                                  &CacheTest::Deleter));
-  }
-
-  void Erase(shared_ptr<Cache> cache, int key) {
-    cache->Erase(EncodeKey(key));
-  }
-
-
-  int Lookup(int key) {
-    return Lookup(cache_, key);
-  }
-
-  void Insert(int key, int value, int charge = 1) {
-    Insert(cache_, key, value, charge);
-  }
-
-  void Erase(int key) {
-    Erase(cache_, key);
-  }
-
-  int Lookup2(int key) {
-    return Lookup(cache2_, key);
-  }
-
-  void Insert2(int key, int value, int charge = 1) {
-    Insert(cache2_, key, value, charge);
-  }
-
-  void Erase2(int key) {
-    Erase(cache2_, key);
-  }
-};
-CacheTest* CacheTest::current_;
-
-namespace {
-void dumbDeleter(const Slice& key, void* value) { }
-}  // namespace
-
-TEST(CacheTest, UsageTest) {
-  // cache is shared_ptr and will be automatically cleaned up.
-  const uint64_t kCapacity = 100000;
-  auto cache = NewLRUCache(kCapacity, 8, 200);
-
-  size_t usage = 0;
-  const char* value = "abcdef";
-  // make sure everything will be cached
-  for (int i = 1; i < 100; ++i) {
-    std::string key(i, 'a');
-    auto kv_size = key.size() + 5;
-    cache->Release(
-        cache->Insert(key, (void*)value, kv_size, dumbDeleter)
-    );
-    usage += kv_size;
-    ASSERT_EQ(usage, cache->GetUsage());
-  }
-
-  // make sure the cache will be overloaded
-  for (uint64_t i = 1; i < kCapacity; ++i) {
-    auto key = std::to_string(i);
-    cache->Release(
-        cache->Insert(key, (void*)value, key.size() + 5, dumbDeleter)
-    );
-  }
-
-  // the usage should be close to the capacity
-  ASSERT_GT(kCapacity, cache->GetUsage());
-  ASSERT_LT(kCapacity * 0.95, cache->GetUsage());
-}
-
-TEST(CacheTest, HitAndMiss) {
-  ASSERT_EQ(-1, Lookup(100));
-
-  Insert(100, 101);
-  ASSERT_EQ(101, Lookup(100));
-  ASSERT_EQ(-1,  Lookup(200));
-  ASSERT_EQ(-1,  Lookup(300));
-
-  Insert(200, 201);
-  ASSERT_EQ(101, Lookup(100));
-  ASSERT_EQ(201, Lookup(200));
-  ASSERT_EQ(-1,  Lookup(300));
-
-  Insert(100, 102);
-  ASSERT_EQ(102, Lookup(100));
-  ASSERT_EQ(201, Lookup(200));
-  ASSERT_EQ(-1,  Lookup(300));
-
-  ASSERT_EQ(1U, deleted_keys_.size());
-  ASSERT_EQ(100, deleted_keys_[0]);
-  ASSERT_EQ(101, deleted_values_[0]);
-}
-
-TEST(CacheTest, Erase) {
-  Erase(200);
-  ASSERT_EQ(0U, deleted_keys_.size());
-
-  Insert(100, 101);
-  Insert(200, 201);
-  Erase(100);
-  ASSERT_EQ(-1,  Lookup(100));
-  ASSERT_EQ(201, Lookup(200));
-  ASSERT_EQ(1U, deleted_keys_.size());
-  ASSERT_EQ(100, deleted_keys_[0]);
-  ASSERT_EQ(101, deleted_values_[0]);
-
-  Erase(100);
-  ASSERT_EQ(-1,  Lookup(100));
-  ASSERT_EQ(201, Lookup(200));
-  ASSERT_EQ(1U, deleted_keys_.size());
-}
-
-TEST(CacheTest, EntriesArePinned) {
-  Insert(100, 101);
-  Cache::Handle* h1 = cache_->Lookup(EncodeKey(100));
-  ASSERT_EQ(101, DecodeValue(cache_->Value(h1)));
-
-  Insert(100, 102);
-  Cache::Handle* h2 = cache_->Lookup(EncodeKey(100));
-  ASSERT_EQ(102, DecodeValue(cache_->Value(h2)));
-  ASSERT_EQ(0U, deleted_keys_.size());
-
-  cache_->Release(h1);
-  ASSERT_EQ(1U, deleted_keys_.size());
-  ASSERT_EQ(100, deleted_keys_[0]);
-  ASSERT_EQ(101, deleted_values_[0]);
-
-  Erase(100);
-  ASSERT_EQ(-1, Lookup(100));
-  ASSERT_EQ(1U, deleted_keys_.size());
-
-  cache_->Release(h2);
-  ASSERT_EQ(2U, deleted_keys_.size());
-  ASSERT_EQ(100, deleted_keys_[1]);
-  ASSERT_EQ(102, deleted_values_[1]);
-}
-
-TEST(CacheTest, EvictionPolicy) {
-  Insert(100, 101);
-  Insert(200, 201);
-
-  // Frequently used entry must be kept around
-  for (int i = 0; i < kCacheSize + 100; i++) {
-    Insert(1000+i, 2000+i);
-    ASSERT_EQ(2000+i, Lookup(1000+i));
-    ASSERT_EQ(101, Lookup(100));
-  }
-  ASSERT_EQ(101, Lookup(100));
-  ASSERT_EQ(-1, Lookup(200));
-}
-
-TEST(CacheTest, EvictionPolicyRef) {
-  Insert(100, 101);
-  Insert(101, 102);
-  Insert(102, 103);
-  Insert(103, 104);
-  Insert(200, 101);
-  Insert(201, 102);
-  Insert(202, 103);
-  Insert(203, 104);
-  Cache::Handle* h201 = cache_->Lookup(EncodeKey(200));
-  Cache::Handle* h202 = cache_->Lookup(EncodeKey(201));
-  Cache::Handle* h203 = cache_->Lookup(EncodeKey(202));
-  Cache::Handle* h204 = cache_->Lookup(EncodeKey(203));
-  Insert(300, 101);
-  Insert(301, 102);
-  Insert(302, 103);
-  Insert(303, 104);
-
-  // Insert entries much more than Cache capacity
-  for (int i = 0; i < kCacheSize + 100; i++) {
-    Insert(1000 + i, 2000 + i);
-  }
-
-  // Check whether the entries inserted in the beginning
-  // are evicted. Ones without extra ref are evicted and
-  // those with are not.
-  ASSERT_EQ(-1, Lookup(100));
-  ASSERT_EQ(-1, Lookup(101));
-  ASSERT_EQ(-1, Lookup(102));
-  ASSERT_EQ(-1, Lookup(103));
-
-  ASSERT_EQ(-1, Lookup(300));
-  ASSERT_EQ(-1, Lookup(301));
-  ASSERT_EQ(-1, Lookup(302));
-  ASSERT_EQ(-1, Lookup(303));
-
-  ASSERT_EQ(101, Lookup(200));
-  ASSERT_EQ(102, Lookup(201));
-  ASSERT_EQ(103, Lookup(202));
-  ASSERT_EQ(104, Lookup(203));
-
-  // Cleaning up all the handles
-  cache_->Release(h201);
-  cache_->Release(h202);
-  cache_->Release(h203);
-  cache_->Release(h204);
-}
-
-TEST(CacheTest, EvictionPolicyRef2) {
-  std::vector<Cache::Handle*> handles;
-
-  Insert(100, 101);
-  // Insert entries much more than Cache capacity
-  for (int i = 0; i < kCacheSize + 100; i++) {
-    Insert(1000 + i, 2000 + i);
-    if (i < kCacheSize ) {
-      handles.push_back(cache_->Lookup(EncodeKey(1000 + i)));
-    }
-  }
-
-  // Make sure referenced keys are also possible to be deleted
-  // if there are not sufficient non-referenced keys
-  for (int i = 0; i < 5; i++) {
-    ASSERT_EQ(-1, Lookup(1000 + i));
-  }
-
-  for (int i = kCacheSize; i < kCacheSize + 100; i++) {
-    ASSERT_EQ(2000 + i, Lookup(1000 + i));
-  }
-  ASSERT_EQ(-1, Lookup(100));
-
-  // Cleaning up all the handles
-  while (handles.size() > 0) {
-    cache_->Release(handles.back());
-    handles.pop_back();
-  }
-}
-
-TEST(CacheTest, EvictionPolicyRefLargeScanLimit) {
-  std::vector<Cache::Handle*> handles2;
-
-  // Cache2 has a cache RemoveScanCountLimit higher than cache size
-  // so it would trigger a boundary condition.
-
-  // Populate the cache with 10 more keys than its size.
-  // Reference all keys except one close to the end.
-  for (int i = 0; i < kCacheSize2 + 10; i++) {
-    Insert2(1000 + i, 2000+i);
-    if (i != kCacheSize2 ) {
-      handles2.push_back(cache2_->Lookup(EncodeKey(1000 + i)));
-    }
-  }
-
-  // Make sure referenced keys are also possible to be deleted
-  // if there are not sufficient non-referenced keys
-  for (int i = 0; i < 3; i++) {
-    ASSERT_EQ(-1, Lookup2(1000 + i));
-  }
-  // The non-referenced value is deleted even if it's accessed
-  // recently.
-  ASSERT_EQ(-1, Lookup2(1000 + kCacheSize2));
-  // Other values recently accessed are not deleted since they
-  // are referenced.
-  for (int i = kCacheSize2 - 10; i < kCacheSize2 + 10; i++) {
-    if (i != kCacheSize2) {
-      ASSERT_EQ(2000 + i, Lookup2(1000 + i));
-    }
-  }
-
-  // Cleaning up all the handles
-  while (handles2.size() > 0) {
-    cache2_->Release(handles2.back());
-    handles2.pop_back();
-  }
-}
-
-
-
-TEST(CacheTest, HeavyEntries) {
-  // Add a bunch of light and heavy entries and then count the combined
-  // size of items still in the cache, which must be approximately the
-  // same as the total capacity.
-  const int kLight = 1;
-  const int kHeavy = 10;
-  int added = 0;
-  int index = 0;
-  while (added < 2*kCacheSize) {
-    const int weight = (index & 1) ? kLight : kHeavy;
-    Insert(index, 1000+index, weight);
-    added += weight;
-    index++;
-  }
-
-  int cached_weight = 0;
-  for (int i = 0; i < index; i++) {
-    const int weight = (i & 1 ? kLight : kHeavy);
-    int r = Lookup(i);
-    if (r >= 0) {
-      cached_weight += weight;
-      ASSERT_EQ(1000+i, r);
-    }
-  }
-  ASSERT_LE(cached_weight, kCacheSize + kCacheSize/10);
-}
-
-TEST(CacheTest, NewId) {
-  uint64_t a = cache_->NewId();
-  uint64_t b = cache_->NewId();
-  ASSERT_NE(a, b);
-}
-
-
-class Value {
- private:
-  int v_;
- public:
-  explicit Value(int v) : v_(v) { }
-
-  ~Value() { std::cout << v_ << " is destructed\n"; }
-};
-
-namespace {
-void deleter(const Slice& key, void* value) {
-  delete (Value *)value;
-}
-}  // namespace
-
-TEST(CacheTest, BadEviction) {
-  int n = 10;
-
-  // a LRUCache with n entries and one shard only
-  std::shared_ptr<Cache> cache = NewLRUCache(n, 0);
-
-  std::vector<Cache::Handle*> handles(n+1);
-
-  // Insert n+1 entries, but not releasing.
-  for (int i = 0; i < n+1; i++) {
-    std::string key = std::to_string(i+1);
-    handles[i] = cache->Insert(key, new Value(i+1), 1, &deleter);
-  }
-
-  // Guess what's in the cache now?
-  for (int i = 0; i < n+1; i++) {
-    std::string key = std::to_string(i+1);
-    auto h = cache->Lookup(key);
-    std::cout << key << (h?" found\n":" not found\n");
-    // Only the first entry should be missing
-    ASSERT_TRUE(h || i == 0);
-    if (h) cache->Release(h);
-  }
-
-  for (int i = 0; i < n+1; i++) {
-    cache->Release(handles[i]);
-  }
-  std::cout << "Poor entries\n";
-}
-
-namespace {
-std::vector<std::pair<int, int>> callback_state;
-void callback(void* entry, size_t charge) {
-  callback_state.push_back({DecodeValue(entry), static_cast<int>(charge)});
-}
-};
-
-TEST(CacheTest, ApplyToAllCacheEntiresTest) {
-  std::vector<std::pair<int, int>> inserted;
-  callback_state.clear();
-
-  for (int i = 0; i < 10; ++i) {
-    Insert(i, i * 2, i + 1);
-    inserted.push_back({i * 2, i + 1});
-  }
-  cache_->ApplyToAllCacheEntries(callback, true);
-
-  sort(inserted.begin(), inserted.end());
-  sort(callback_state.begin(), callback_state.end());
-  ASSERT_TRUE(inserted == callback_state);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/coding.cc b/src/rocksdb/util/coding.cc
deleted file mode 100644
index 31ae0e3..0000000
--- a/src/rocksdb/util/coding.cc
+++ /dev/null
@@ -1,169 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/coding.h"
-
-#include <algorithm>
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-
-namespace rocksdb {
-
-char* EncodeVarint32(char* dst, uint32_t v) {
-  // Operate on characters as unsigneds
-  unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
-  static const int B = 128;
-  if (v < (1 << 7)) {
-    *(ptr++) = v;
-  } else if (v < (1 << 14)) {
-    *(ptr++) = v | B;
-    *(ptr++) = v >> 7;
-  } else if (v < (1 << 21)) {
-    *(ptr++) = v | B;
-    *(ptr++) = (v >> 7) | B;
-    *(ptr++) = v >> 14;
-  } else if (v < (1 << 28)) {
-    *(ptr++) = v | B;
-    *(ptr++) = (v >> 7) | B;
-    *(ptr++) = (v >> 14) | B;
-    *(ptr++) = v >> 21;
-  } else {
-    *(ptr++) = v | B;
-    *(ptr++) = (v >> 7) | B;
-    *(ptr++) = (v >> 14) | B;
-    *(ptr++) = (v >> 21) | B;
-    *(ptr++) = v >> 28;
-  }
-  return reinterpret_cast<char*>(ptr);
-}
-
-const char* GetVarint32PtrFallback(const char* p, const char* limit,
-                                   uint32_t* value) {
-  uint32_t result = 0;
-  for (uint32_t shift = 0; shift <= 28 && p < limit; shift += 7) {
-    uint32_t byte = *(reinterpret_cast<const unsigned char*>(p));
-    p++;
-    if (byte & 128) {
-      // More bytes are present
-      result |= ((byte & 127) << shift);
-    } else {
-      result |= (byte << shift);
-      *value = result;
-      return reinterpret_cast<const char*>(p);
-    }
-  }
-  return nullptr;
-}
-
-const char* GetVarint64Ptr(const char* p, const char* limit, uint64_t* value) {
-  uint64_t result = 0;
-  for (uint32_t shift = 0; shift <= 63 && p < limit; shift += 7) {
-    uint64_t byte = *(reinterpret_cast<const unsigned char*>(p));
-    p++;
-    if (byte & 128) {
-      // More bytes are present
-      result |= ((byte & 127) << shift);
-    } else {
-      result |= (byte << shift);
-      *value = result;
-      return reinterpret_cast<const char*>(p);
-    }
-  }
-  return nullptr;
-}
-
-void BitStreamPutInt(char* dst, size_t dstlen, size_t offset,
-                     uint32_t bits, uint64_t value) {
-  assert((offset + bits + 7)/8 <= dstlen);
-  assert(bits <= 64);
-
-  unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
-
-  size_t byteOffset = offset / 8;
-  size_t bitOffset = offset % 8;
-
-  // This prevents unused variable warnings when compiling.
-#ifndef NDEBUG
-  // Store truncated value.
-  uint64_t origValue = (bits < 64)?(value & (((uint64_t)1 << bits) - 1)):value;
-  uint32_t origBits = bits;
-#endif
-
-  while (bits > 0) {
-    size_t bitsToGet = std::min<size_t>(bits, 8 - bitOffset);
-    unsigned char mask = ((1 << bitsToGet) - 1);
-
-    ptr[byteOffset] = (ptr[byteOffset] & ~(mask << bitOffset)) +
-                      ((value & mask) << bitOffset);
-
-    value >>= bitsToGet;
-    byteOffset += 1;
-    bitOffset = 0;
-    bits -= bitsToGet;
-  }
-
-  assert(origValue == BitStreamGetInt(dst, dstlen, offset, origBits));
-}
-
-uint64_t BitStreamGetInt(const char* src, size_t srclen, size_t offset,
-                         uint32_t bits) {
-  assert((offset + bits + 7)/8 <= srclen);
-  assert(bits <= 64);
-
-  const unsigned char* ptr = reinterpret_cast<const unsigned char*>(src);
-
-  uint64_t result = 0;
-
-  size_t byteOffset = offset / 8;
-  size_t bitOffset = offset % 8;
-  size_t shift = 0;
-
-  while (bits > 0) {
-    size_t bitsToGet = std::min<size_t>(bits, 8 - bitOffset);
-    unsigned char mask = ((1 << bitsToGet) - 1);
-
-    result += (uint64_t)((ptr[byteOffset] >> bitOffset) & mask) << shift;
-
-    shift += bitsToGet;
-    byteOffset += 1;
-    bitOffset = 0;
-    bits -= bitsToGet;
-  }
-
-  return result;
-}
-
-void BitStreamPutInt(std::string* dst, size_t offset, uint32_t bits,
-                     uint64_t value) {
-  assert((offset + bits + 7)/8 <= dst->size());
-
-  const size_t kTmpBufLen = sizeof(value) + 1;
-  char tmpBuf[kTmpBufLen];
-
-  // Number of bytes of tmpBuf being used
-  const size_t kUsedBytes = (offset%8 + bits)/8;
-
-  // Copy relevant parts of dst to tmpBuf
-  for (size_t idx = 0; idx <= kUsedBytes; ++idx) {
-    tmpBuf[idx] = (*dst)[offset/8 + idx];
-  }
-
-  BitStreamPutInt(tmpBuf, kTmpBufLen, offset%8, bits, value);
-
-  // Copy tmpBuf back to dst
-  for (size_t idx = 0; idx <= kUsedBytes; ++idx) {
-    (*dst)[offset/8 + idx] = tmpBuf[idx];
-  }
-
-  // Do the check here too as we are working with a buffer.
-  assert(((bits < 64)?(value & (((uint64_t)1 << bits) - 1)):value) ==
-         BitStreamGetInt(dst, offset, bits));
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/coding.h b/src/rocksdb/util/coding.h
deleted file mode 100644
index 8ffba51..0000000
--- a/src/rocksdb/util/coding.h
+++ /dev/null
@@ -1,294 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Endian-neutral encoding:
-// * Fixed-length numbers are encoded with least-significant byte first
-// * In addition we support variable length "varint" encoding
-// * Strings are encoded prefixed by their length in varint format
-
-#pragma once
-#include <algorithm>
-#include <stdint.h>
-#include <string.h>
-#include <string>
-
-#include "rocksdb/write_batch.h"
-#include "port/port.h"
-
-namespace rocksdb {
-
-// The maximum length of a varint in bytes for 32 and 64 bits respectively.
-const unsigned int kMaxVarint32Length = 5;
-const unsigned int kMaxVarint64Length = 10;
-
-// Standard Put... routines append to a string
-extern void PutFixed32(std::string* dst, uint32_t value);
-extern void PutFixed64(std::string* dst, uint64_t value);
-extern void PutVarint32(std::string* dst, uint32_t value);
-extern void PutVarint64(std::string* dst, uint64_t value);
-extern void PutLengthPrefixedSlice(std::string* dst, const Slice& value);
-extern void PutLengthPrefixedSliceParts(std::string* dst,
-                                        const SliceParts& slice_parts);
-
-// Standard Get... routines parse a value from the beginning of a Slice
-// and advance the slice past the parsed value.
-extern bool GetVarint32(Slice* input, uint32_t* value);
-extern bool GetVarint64(Slice* input, uint64_t* value);
-extern bool GetLengthPrefixedSlice(Slice* input, Slice* result);
-// This function assumes data is well-formed.
-extern Slice GetLengthPrefixedSlice(const char* data);
-
-extern Slice GetSliceUntil(Slice* slice, char delimiter);
-
-// Pointer-based variants of GetVarint...  These either store a value
-// in *v and return a pointer just past the parsed value, or return
-// nullptr on error.  These routines only look at bytes in the range
-// [p..limit-1]
-extern const char* GetVarint32Ptr(const char* p,const char* limit, uint32_t* v);
-extern const char* GetVarint64Ptr(const char* p,const char* limit, uint64_t* v);
-
-// Returns the length of the varint32 or varint64 encoding of "v"
-extern int VarintLength(uint64_t v);
-
-// Lower-level versions of Put... that write directly into a character buffer
-// REQUIRES: dst has enough space for the value being written
-extern void EncodeFixed32(char* dst, uint32_t value);
-extern void EncodeFixed64(char* dst, uint64_t value);
-
-// Lower-level versions of Put... that write directly into a character buffer
-// and return a pointer just past the last byte written.
-// REQUIRES: dst has enough space for the value being written
-extern char* EncodeVarint32(char* dst, uint32_t value);
-extern char* EncodeVarint64(char* dst, uint64_t value);
-
-// Lower-level versions of Get... that read directly from a character buffer
-// without any bounds checking.
-
-inline uint32_t DecodeFixed32(const char* ptr) {
-  if (port::kLittleEndian) {
-    // Load the raw bytes
-    uint32_t result;
-    memcpy(&result, ptr, sizeof(result));  // gcc optimizes this to a plain load
-    return result;
-  } else {
-    return ((static_cast<uint32_t>(static_cast<unsigned char>(ptr[0])))
-        | (static_cast<uint32_t>(static_cast<unsigned char>(ptr[1])) << 8)
-        | (static_cast<uint32_t>(static_cast<unsigned char>(ptr[2])) << 16)
-        | (static_cast<uint32_t>(static_cast<unsigned char>(ptr[3])) << 24));
-  }
-}
-
-inline uint64_t DecodeFixed64(const char* ptr) {
-  if (port::kLittleEndian) {
-    // Load the raw bytes
-    uint64_t result;
-    memcpy(&result, ptr, sizeof(result));  // gcc optimizes this to a plain load
-    return result;
-  } else {
-    uint64_t lo = DecodeFixed32(ptr);
-    uint64_t hi = DecodeFixed32(ptr + 4);
-    return (hi << 32) | lo;
-  }
-}
-
-// Internal routine for use by fallback path of GetVarint32Ptr
-extern const char* GetVarint32PtrFallback(const char* p,
-                                          const char* limit,
-                                          uint32_t* value);
-inline const char* GetVarint32Ptr(const char* p,
-                                  const char* limit,
-                                  uint32_t* value) {
-  if (p < limit) {
-    uint32_t result = *(reinterpret_cast<const unsigned char*>(p));
-    if ((result & 128) == 0) {
-      *value = result;
-      return p + 1;
-    }
-  }
-  return GetVarint32PtrFallback(p, limit, value);
-}
-
-// Writes an unsigned integer with bits number of bits with its least
-// significant bit at offset.
-// Bits are numbered from 0 to 7 in the first byte, 8 to 15 in the second and
-// so on.
-// value is truncated to the bits number of least significant bits.
-// REQUIRES: (offset+bits+7)/8 <= dstlen
-// REQUIRES: bits <= 64
-extern void BitStreamPutInt(char* dst, size_t dstlen, size_t offset,
-                            uint32_t bits, uint64_t value);
-
-// Reads an unsigned integer with bits number of bits with its least
-// significant bit at offset.
-// Bits are numbered in the same way as ByteStreamPutInt().
-// REQUIRES: (offset+bits+7)/8 <= srclen
-// REQUIRES: bits <= 64
-extern uint64_t BitStreamGetInt(const char* src, size_t srclen, size_t offset,
-                                uint32_t bits);
-
-// Convenience functions
-extern void BitStreamPutInt(std::string* dst, size_t offset, uint32_t bits,
-                            uint64_t value);
-extern uint64_t BitStreamGetInt(const std::string* src, size_t offset,
-                                uint32_t bits);
-extern uint64_t BitStreamGetInt(const Slice* src, size_t offset,
-                                uint32_t bits);
-
-// -- Implementation of the functions declared above
-inline void EncodeFixed32(char* buf, uint32_t value) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-  memcpy(buf, &value, sizeof(value));
-#else
-  buf[0] = value & 0xff;
-  buf[1] = (value >> 8) & 0xff;
-  buf[2] = (value >> 16) & 0xff;
-  buf[3] = (value >> 24) & 0xff;
-#endif
-}
-
-inline void EncodeFixed64(char* buf, uint64_t value) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-  memcpy(buf, &value, sizeof(value));
-#else
-  buf[0] = value & 0xff;
-  buf[1] = (value >> 8) & 0xff;
-  buf[2] = (value >> 16) & 0xff;
-  buf[3] = (value >> 24) & 0xff;
-  buf[4] = (value >> 32) & 0xff;
-  buf[5] = (value >> 40) & 0xff;
-  buf[6] = (value >> 48) & 0xff;
-  buf[7] = (value >> 56) & 0xff;
-#endif
-}
-
-inline void PutFixed32(std::string* dst, uint32_t value) {
-  char buf[sizeof(value)];
-  EncodeFixed32(buf, value);
-  dst->append(buf, sizeof(buf));
-}
-
-inline void PutFixed64(std::string* dst, uint64_t value) {
-  char buf[sizeof(value)];
-  EncodeFixed64(buf, value);
-  dst->append(buf, sizeof(buf));
-}
-
-inline void PutVarint32(std::string* dst, uint32_t v) {
-  char buf[5];
-  char* ptr = EncodeVarint32(buf, v);
-  dst->append(buf, ptr - buf);
-}
-
-inline char* EncodeVarint64(char* dst, uint64_t v) {
-  static const unsigned int B = 128;
-  unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
-  while (v >= B) {
-    *(ptr++) = (v & (B - 1)) | B;
-    v >>= 7;
-  }
-  *(ptr++) = static_cast<unsigned char>(v);
-  return reinterpret_cast<char*>(ptr);
-}
-
-inline void PutVarint64(std::string* dst, uint64_t v) {
-  char buf[10];
-  char* ptr = EncodeVarint64(buf, v);
-  dst->append(buf, ptr - buf);
-}
-
-inline void PutLengthPrefixedSlice(std::string* dst, const Slice& value) {
-  PutVarint32(dst, value.size());
-  dst->append(value.data(), value.size());
-}
-
-inline void PutLengthPrefixedSliceParts(std::string* dst,
-                                        const SliceParts& slice_parts) {
-  uint32_t total_bytes = 0;
-  for (int i = 0; i < slice_parts.num_parts; ++i) {
-    total_bytes += slice_parts.parts[i].size();
-  }
-  PutVarint32(dst, total_bytes);
-  for (int i = 0; i < slice_parts.num_parts; ++i) {
-    dst->append(slice_parts.parts[i].data(), slice_parts.parts[i].size());
-  }
-}
-
-inline int VarintLength(uint64_t v) {
-  int len = 1;
-  while (v >= 128) {
-    v >>= 7;
-    len++;
-  }
-  return len;
-}
-
-inline bool GetVarint32(Slice* input, uint32_t* value) {
-  const char* p = input->data();
-  const char* limit = p + input->size();
-  const char* q = GetVarint32Ptr(p, limit, value);
-  if (q == nullptr) {
-    return false;
-  } else {
-    *input = Slice(q, limit - q);
-    return true;
-  }
-}
-
-inline bool GetVarint64(Slice* input, uint64_t* value) {
-  const char* p = input->data();
-  const char* limit = p + input->size();
-  const char* q = GetVarint64Ptr(p, limit, value);
-  if (q == nullptr) {
-    return false;
-  } else {
-    *input = Slice(q, limit - q);
-    return true;
-  }
-}
-
-inline bool GetLengthPrefixedSlice(Slice* input, Slice* result) {
-  uint32_t len = 0;
-  if (GetVarint32(input, &len) && input->size() >= len) {
-    *result = Slice(input->data(), len);
-    input->remove_prefix(len);
-    return true;
-  } else {
-    return false;
-  }
-}
-
-inline Slice GetLengthPrefixedSlice(const char* data) {
-  uint32_t len = 0;
-  // +5: we assume "data" is not corrupted
-  auto p = GetVarint32Ptr(data, data + 5 /* limit */, &len);
-  return Slice(p, len);
-}
-
-inline Slice GetSliceUntil(Slice* slice, char delimiter) {
-  uint32_t len = 0;
-  for (len = 0; len < slice->size() && slice->data()[len] != delimiter; ++len) {
-    // nothing
-  }
-
-  Slice ret(slice->data(), len);
-  slice->remove_prefix(len + ((len < slice->size()) ? 1 : 0));
-  return ret;
-}
-
-inline uint64_t BitStreamGetInt(const std::string* src, size_t offset,
-                                uint32_t bits) {
-  return BitStreamGetInt(src->data(), src->size(), offset, bits);
-}
-
-inline uint64_t BitStreamGetInt(const Slice* src, size_t offset,
-                                uint32_t bits) {
-  return BitStreamGetInt(src->data(), src->size(), offset, bits);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/coding_test.cc b/src/rocksdb/util/coding_test.cc
deleted file mode 100644
index ed542d6..0000000
--- a/src/rocksdb/util/coding_test.cc
+++ /dev/null
@@ -1,296 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/coding.h"
-
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-class Coding { };
-
-TEST(Coding, Fixed32) {
-  std::string s;
-  for (uint32_t v = 0; v < 100000; v++) {
-    PutFixed32(&s, v);
-  }
-
-  const char* p = s.data();
-  for (uint32_t v = 0; v < 100000; v++) {
-    uint32_t actual = DecodeFixed32(p);
-    ASSERT_EQ(v, actual);
-    p += sizeof(uint32_t);
-  }
-}
-
-TEST(Coding, Fixed64) {
-  std::string s;
-  for (int power = 0; power <= 63; power++) {
-    uint64_t v = static_cast<uint64_t>(1) << power;
-    PutFixed64(&s, v - 1);
-    PutFixed64(&s, v + 0);
-    PutFixed64(&s, v + 1);
-  }
-
-  const char* p = s.data();
-  for (int power = 0; power <= 63; power++) {
-    uint64_t v = static_cast<uint64_t>(1) << power;
-    uint64_t actual = 0;
-    actual = DecodeFixed64(p);
-    ASSERT_EQ(v-1, actual);
-    p += sizeof(uint64_t);
-
-    actual = DecodeFixed64(p);
-    ASSERT_EQ(v+0, actual);
-    p += sizeof(uint64_t);
-
-    actual = DecodeFixed64(p);
-    ASSERT_EQ(v+1, actual);
-    p += sizeof(uint64_t);
-  }
-}
-
-// Test that encoding routines generate little-endian encodings
-TEST(Coding, EncodingOutput) {
-  std::string dst;
-  PutFixed32(&dst, 0x04030201);
-  ASSERT_EQ(4U, dst.size());
-  ASSERT_EQ(0x01, static_cast<int>(dst[0]));
-  ASSERT_EQ(0x02, static_cast<int>(dst[1]));
-  ASSERT_EQ(0x03, static_cast<int>(dst[2]));
-  ASSERT_EQ(0x04, static_cast<int>(dst[3]));
-
-  dst.clear();
-  PutFixed64(&dst, 0x0807060504030201ull);
-  ASSERT_EQ(8U, dst.size());
-  ASSERT_EQ(0x01, static_cast<int>(dst[0]));
-  ASSERT_EQ(0x02, static_cast<int>(dst[1]));
-  ASSERT_EQ(0x03, static_cast<int>(dst[2]));
-  ASSERT_EQ(0x04, static_cast<int>(dst[3]));
-  ASSERT_EQ(0x05, static_cast<int>(dst[4]));
-  ASSERT_EQ(0x06, static_cast<int>(dst[5]));
-  ASSERT_EQ(0x07, static_cast<int>(dst[6]));
-  ASSERT_EQ(0x08, static_cast<int>(dst[7]));
-}
-
-TEST(Coding, Varint32) {
-  std::string s;
-  for (uint32_t i = 0; i < (32 * 32); i++) {
-    uint32_t v = (i / 32) << (i % 32);
-    PutVarint32(&s, v);
-  }
-
-  const char* p = s.data();
-  const char* limit = p + s.size();
-  for (uint32_t i = 0; i < (32 * 32); i++) {
-    uint32_t expected = (i / 32) << (i % 32);
-    uint32_t actual = 0;
-    const char* start = p;
-    p = GetVarint32Ptr(p, limit, &actual);
-    ASSERT_TRUE(p != nullptr);
-    ASSERT_EQ(expected, actual);
-    ASSERT_EQ(VarintLength(actual), p - start);
-  }
-  ASSERT_EQ(p, s.data() + s.size());
-}
-
-TEST(Coding, Varint64) {
-  // Construct the list of values to check
-  std::vector<uint64_t> values;
-  // Some special values
-  values.push_back(0);
-  values.push_back(100);
-  values.push_back(~static_cast<uint64_t>(0));
-  values.push_back(~static_cast<uint64_t>(0) - 1);
-  for (uint32_t k = 0; k < 64; k++) {
-    // Test values near powers of two
-    const uint64_t power = 1ull << k;
-    values.push_back(power);
-    values.push_back(power-1);
-    values.push_back(power+1);
-  };
-
-  std::string s;
-  for (unsigned int i = 0; i < values.size(); i++) {
-    PutVarint64(&s, values[i]);
-  }
-
-  const char* p = s.data();
-  const char* limit = p + s.size();
-  for (unsigned int i = 0; i < values.size(); i++) {
-    ASSERT_TRUE(p < limit);
-    uint64_t actual = 0;
-    const char* start = p;
-    p = GetVarint64Ptr(p, limit, &actual);
-    ASSERT_TRUE(p != nullptr);
-    ASSERT_EQ(values[i], actual);
-    ASSERT_EQ(VarintLength(actual), p - start);
-  }
-  ASSERT_EQ(p, limit);
-
-}
-
-TEST(Coding, Varint32Overflow) {
-  uint32_t result;
-  std::string input("\x81\x82\x83\x84\x85\x11");
-  ASSERT_TRUE(GetVarint32Ptr(input.data(), input.data() + input.size(), &result)
-              == nullptr);
-}
-
-TEST(Coding, Varint32Truncation) {
-  uint32_t large_value = (1u << 31) + 100;
-  std::string s;
-  PutVarint32(&s, large_value);
-  uint32_t result;
-  for (unsigned int len = 0; len < s.size() - 1; len++) {
-    ASSERT_TRUE(GetVarint32Ptr(s.data(), s.data() + len, &result) == nullptr);
-  }
-  ASSERT_TRUE(
-      GetVarint32Ptr(s.data(), s.data() + s.size(), &result) != nullptr);
-  ASSERT_EQ(large_value, result);
-}
-
-TEST(Coding, Varint64Overflow) {
-  uint64_t result;
-  std::string input("\x81\x82\x83\x84\x85\x81\x82\x83\x84\x85\x11");
-  ASSERT_TRUE(GetVarint64Ptr(input.data(), input.data() + input.size(), &result)
-              == nullptr);
-}
-
-TEST(Coding, Varint64Truncation) {
-  uint64_t large_value = (1ull << 63) + 100ull;
-  std::string s;
-  PutVarint64(&s, large_value);
-  uint64_t result;
-  for (unsigned int len = 0; len < s.size() - 1; len++) {
-    ASSERT_TRUE(GetVarint64Ptr(s.data(), s.data() + len, &result) == nullptr);
-  }
-  ASSERT_TRUE(
-      GetVarint64Ptr(s.data(), s.data() + s.size(), &result) != nullptr);
-  ASSERT_EQ(large_value, result);
-}
-
-TEST(Coding, Strings) {
-  std::string s;
-  PutLengthPrefixedSlice(&s, Slice(""));
-  PutLengthPrefixedSlice(&s, Slice("foo"));
-  PutLengthPrefixedSlice(&s, Slice("bar"));
-  PutLengthPrefixedSlice(&s, Slice(std::string(200, 'x')));
-
-  Slice input(s);
-  Slice v;
-  ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v));
-  ASSERT_EQ("", v.ToString());
-  ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v));
-  ASSERT_EQ("foo", v.ToString());
-  ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v));
-  ASSERT_EQ("bar", v.ToString());
-  ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v));
-  ASSERT_EQ(std::string(200, 'x'), v.ToString());
-  ASSERT_EQ("", input.ToString());
-}
-
-TEST(Coding, BitStream) {
-  const int kNumBytes = 10;
-  char bytes[kNumBytes+1];
-  for (int i = 0; i < kNumBytes + 1; ++i) {
-      bytes[i] = '\0';
-  }
-
-  // Simple byte aligned test.
-  for (int i = 0; i < kNumBytes; ++i) {
-    BitStreamPutInt(bytes, kNumBytes, i*8, 8, 255-i);
-
-    ASSERT_EQ((unsigned char)bytes[i], (unsigned char)(255-i));
-  }
-  for (int i = 0; i < kNumBytes; ++i) {
-    ASSERT_EQ(BitStreamGetInt(bytes, kNumBytes, i*8, 8), (uint32_t)(255-i));
-  }
-  ASSERT_EQ(bytes[kNumBytes], '\0');
-
-  // Write and read back at strange offsets
-  for (int i = 0; i < kNumBytes + 1; ++i) {
-      bytes[i] = '\0';
-  }
-  for (int i = 0; i < kNumBytes; ++i) {
-    BitStreamPutInt(bytes, kNumBytes, i*5+1, 4, (i * 7) % (1 << 4));
-  }
-  for (int i = 0; i < kNumBytes; ++i) {
-    ASSERT_EQ(BitStreamGetInt(bytes, kNumBytes, i*5+1, 4),
-              (uint32_t)((i * 7) % (1 << 4)));
-  }
-  ASSERT_EQ(bytes[kNumBytes], '\0');
-
-  // Create 11011011 as a bit pattern
-  for (int i = 0; i < kNumBytes + 1; ++i) {
-      bytes[i] = '\0';
-  }
-  for (int i = 0; i < kNumBytes; ++i) {
-    BitStreamPutInt(bytes, kNumBytes, i*8, 2, 3);
-    BitStreamPutInt(bytes, kNumBytes, i*8+3, 2, 3);
-    BitStreamPutInt(bytes, kNumBytes, i*8+6, 2, 3);
-
-    ASSERT_EQ((unsigned char)bytes[i],
-              (unsigned char)(3 + (3 << 3) + (3 << 6)));
-  }
-  ASSERT_EQ(bytes[kNumBytes], '\0');
-
-
-  // Test large values
-  for (int i = 0; i < kNumBytes + 1; ++i) {
-      bytes[i] = '\0';
-  }
-  BitStreamPutInt(bytes, kNumBytes, 0, 64, (uint64_t)(-1));
-  for (int i = 0; i < 64/8; ++i) {
-    ASSERT_EQ((unsigned char)bytes[i],
-              (unsigned char)(255));
-  }
-  ASSERT_EQ(bytes[64/8], '\0');
-
-
-}
-
-TEST(Coding, BitStreamConvenienceFuncs) {
-  std::string bytes(1, '\0');
-
-  // Check that independent changes to byte are preserved.
-  BitStreamPutInt(&bytes, 0, 2, 3);
-  BitStreamPutInt(&bytes, 3, 2, 3);
-  BitStreamPutInt(&bytes, 6, 2, 3);
-  ASSERT_EQ((unsigned char)bytes[0], (unsigned char)(3 + (3 << 3) + (3 << 6)));
-  ASSERT_EQ(BitStreamGetInt(&bytes, 0, 2), 3u);
-  ASSERT_EQ(BitStreamGetInt(&bytes, 3, 2), 3u);
-  ASSERT_EQ(BitStreamGetInt(&bytes, 6, 2), 3u);
-  Slice slice(bytes);
-  ASSERT_EQ(BitStreamGetInt(&slice, 0, 2), 3u);
-  ASSERT_EQ(BitStreamGetInt(&slice, 3, 2), 3u);
-  ASSERT_EQ(BitStreamGetInt(&slice, 6, 2), 3u);
-
-  // Test overlapping crossing over byte boundaries
-  bytes = std::string(2, '\0');
-  BitStreamPutInt(&bytes, 6, 4, 15);
-  ASSERT_EQ((unsigned char)bytes[0], 3 << 6);
-  ASSERT_EQ((unsigned char)bytes[1], 3);
-  ASSERT_EQ(BitStreamGetInt(&bytes, 6, 4), 15u);
-  slice = Slice(bytes);
-  ASSERT_EQ(BitStreamGetInt(&slice, 6, 4), 15u);
-
-  // Test 64-bit number
-  bytes = std::string(64/8, '\0');
-  BitStreamPutInt(&bytes, 0, 64, (uint64_t)(-1));
-  ASSERT_EQ(BitStreamGetInt(&bytes, 0, 64), (uint64_t)(-1));
-  slice = Slice(bytes);
-  ASSERT_EQ(BitStreamGetInt(&slice, 0, 64), (uint64_t)(-1));
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/comparator.cc b/src/rocksdb/util/comparator.cc
deleted file mode 100644
index adeacac..0000000
--- a/src/rocksdb/util/comparator.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <algorithm>
-#include <stdint.h>
-#include "rocksdb/comparator.h"
-#include "rocksdb/slice.h"
-#include "port/port.h"
-#include "util/logging.h"
-
-namespace rocksdb {
-
-Comparator::~Comparator() { }
-
-namespace {
-class BytewiseComparatorImpl : public Comparator {
- public:
-  BytewiseComparatorImpl() { }
-
-  virtual const char* Name() const {
-    return "leveldb.BytewiseComparator";
-  }
-
-  virtual int Compare(const Slice& a, const Slice& b) const {
-    return a.compare(b);
-  }
-
-  virtual void FindShortestSeparator(
-      std::string* start,
-      const Slice& limit) const {
-    // Find length of common prefix
-    size_t min_length = std::min(start->size(), limit.size());
-    size_t diff_index = 0;
-    while ((diff_index < min_length) &&
-           ((*start)[diff_index] == limit[diff_index])) {
-      diff_index++;
-    }
-
-    if (diff_index >= min_length) {
-      // Do not shorten if one string is a prefix of the other
-    } else {
-      uint8_t diff_byte = static_cast<uint8_t>((*start)[diff_index]);
-      if (diff_byte < static_cast<uint8_t>(0xff) &&
-          diff_byte + 1 < static_cast<uint8_t>(limit[diff_index])) {
-        (*start)[diff_index]++;
-        start->resize(diff_index + 1);
-        assert(Compare(*start, limit) < 0);
-      }
-    }
-  }
-
-  virtual void FindShortSuccessor(std::string* key) const {
-    // Find first character that can be incremented
-    size_t n = key->size();
-    for (size_t i = 0; i < n; i++) {
-      const uint8_t byte = (*key)[i];
-      if (byte != static_cast<uint8_t>(0xff)) {
-        (*key)[i] = byte + 1;
-        key->resize(i+1);
-        return;
-      }
-    }
-    // *key is a run of 0xffs.  Leave it alone.
-  }
-};
-}  // namespace
-
-static port::OnceType once = LEVELDB_ONCE_INIT;
-static const Comparator* bytewise;
-
-static void InitModule() {
-  bytewise = new BytewiseComparatorImpl;
-}
-
-const Comparator* BytewiseComparator() {
-  port::InitOnce(&once, InitModule);
-  return bytewise;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/crc32c.cc b/src/rocksdb/util/crc32c.cc
deleted file mode 100644
index d27fb4b..0000000
--- a/src/rocksdb/util/crc32c.cc
+++ /dev/null
@@ -1,393 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// A portable implementation of crc32c, optimized to handle
-// four bytes at a time.
-
-#include "util/crc32c.h"
-
-#include <stdint.h>
-#ifdef __SSE4_2__
-#include <nmmintrin.h>
-#endif
-#include "util/coding.h"
-
-namespace rocksdb {
-namespace crc32c {
-
-static const uint32_t table0_[256] = {
-  0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,
-  0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,
-  0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
-  0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24,
-  0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b,
-  0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384,
-  0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54,
-  0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b,
-  0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a,
-  0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35,
-  0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5,
-  0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa,
-  0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45,
-  0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a,
-  0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a,
-  0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595,
-  0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48,
-  0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957,
-  0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687,
-  0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198,
-  0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927,
-  0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38,
-  0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8,
-  0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7,
-  0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096,
-  0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789,
-  0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859,
-  0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46,
-  0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9,
-  0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6,
-  0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36,
-  0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829,
-  0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c,
-  0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93,
-  0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043,
-  0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c,
-  0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3,
-  0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc,
-  0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c,
-  0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033,
-  0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652,
-  0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d,
-  0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d,
-  0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982,
-  0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d,
-  0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622,
-  0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2,
-  0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed,
-  0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530,
-  0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f,
-  0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff,
-  0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0,
-  0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f,
-  0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540,
-  0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90,
-  0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f,
-  0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee,
-  0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1,
-  0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321,
-  0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e,
-  0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81,
-  0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e,
-  0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,
-  0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351
-};
-static const uint32_t table1_[256] = {
-  0x00000000, 0x13a29877, 0x274530ee, 0x34e7a899,
-  0x4e8a61dc, 0x5d28f9ab, 0x69cf5132, 0x7a6dc945,
-  0x9d14c3b8, 0x8eb65bcf, 0xba51f356, 0xa9f36b21,
-  0xd39ea264, 0xc03c3a13, 0xf4db928a, 0xe7790afd,
-  0x3fc5f181, 0x2c6769f6, 0x1880c16f, 0x0b225918,
-  0x714f905d, 0x62ed082a, 0x560aa0b3, 0x45a838c4,
-  0xa2d13239, 0xb173aa4e, 0x859402d7, 0x96369aa0,
-  0xec5b53e5, 0xfff9cb92, 0xcb1e630b, 0xd8bcfb7c,
-  0x7f8be302, 0x6c297b75, 0x58ced3ec, 0x4b6c4b9b,
-  0x310182de, 0x22a31aa9, 0x1644b230, 0x05e62a47,
-  0xe29f20ba, 0xf13db8cd, 0xc5da1054, 0xd6788823,
-  0xac154166, 0xbfb7d911, 0x8b507188, 0x98f2e9ff,
-  0x404e1283, 0x53ec8af4, 0x670b226d, 0x74a9ba1a,
-  0x0ec4735f, 0x1d66eb28, 0x298143b1, 0x3a23dbc6,
-  0xdd5ad13b, 0xcef8494c, 0xfa1fe1d5, 0xe9bd79a2,
-  0x93d0b0e7, 0x80722890, 0xb4958009, 0xa737187e,
-  0xff17c604, 0xecb55e73, 0xd852f6ea, 0xcbf06e9d,
-  0xb19da7d8, 0xa23f3faf, 0x96d89736, 0x857a0f41,
-  0x620305bc, 0x71a19dcb, 0x45463552, 0x56e4ad25,
-  0x2c896460, 0x3f2bfc17, 0x0bcc548e, 0x186eccf9,
-  0xc0d23785, 0xd370aff2, 0xe797076b, 0xf4359f1c,
-  0x8e585659, 0x9dface2e, 0xa91d66b7, 0xbabffec0,
-  0x5dc6f43d, 0x4e646c4a, 0x7a83c4d3, 0x69215ca4,
-  0x134c95e1, 0x00ee0d96, 0x3409a50f, 0x27ab3d78,
-  0x809c2506, 0x933ebd71, 0xa7d915e8, 0xb47b8d9f,
-  0xce1644da, 0xddb4dcad, 0xe9537434, 0xfaf1ec43,
-  0x1d88e6be, 0x0e2a7ec9, 0x3acdd650, 0x296f4e27,
-  0x53028762, 0x40a01f15, 0x7447b78c, 0x67e52ffb,
-  0xbf59d487, 0xacfb4cf0, 0x981ce469, 0x8bbe7c1e,
-  0xf1d3b55b, 0xe2712d2c, 0xd69685b5, 0xc5341dc2,
-  0x224d173f, 0x31ef8f48, 0x050827d1, 0x16aabfa6,
-  0x6cc776e3, 0x7f65ee94, 0x4b82460d, 0x5820de7a,
-  0xfbc3faf9, 0xe861628e, 0xdc86ca17, 0xcf245260,
-  0xb5499b25, 0xa6eb0352, 0x920cabcb, 0x81ae33bc,
-  0x66d73941, 0x7575a136, 0x419209af, 0x523091d8,
-  0x285d589d, 0x3bffc0ea, 0x0f186873, 0x1cbaf004,
-  0xc4060b78, 0xd7a4930f, 0xe3433b96, 0xf0e1a3e1,
-  0x8a8c6aa4, 0x992ef2d3, 0xadc95a4a, 0xbe6bc23d,
-  0x5912c8c0, 0x4ab050b7, 0x7e57f82e, 0x6df56059,
-  0x1798a91c, 0x043a316b, 0x30dd99f2, 0x237f0185,
-  0x844819fb, 0x97ea818c, 0xa30d2915, 0xb0afb162,
-  0xcac27827, 0xd960e050, 0xed8748c9, 0xfe25d0be,
-  0x195cda43, 0x0afe4234, 0x3e19eaad, 0x2dbb72da,
-  0x57d6bb9f, 0x447423e8, 0x70938b71, 0x63311306,
-  0xbb8de87a, 0xa82f700d, 0x9cc8d894, 0x8f6a40e3,
-  0xf50789a6, 0xe6a511d1, 0xd242b948, 0xc1e0213f,
-  0x26992bc2, 0x353bb3b5, 0x01dc1b2c, 0x127e835b,
-  0x68134a1e, 0x7bb1d269, 0x4f567af0, 0x5cf4e287,
-  0x04d43cfd, 0x1776a48a, 0x23910c13, 0x30339464,
-  0x4a5e5d21, 0x59fcc556, 0x6d1b6dcf, 0x7eb9f5b8,
-  0x99c0ff45, 0x8a626732, 0xbe85cfab, 0xad2757dc,
-  0xd74a9e99, 0xc4e806ee, 0xf00fae77, 0xe3ad3600,
-  0x3b11cd7c, 0x28b3550b, 0x1c54fd92, 0x0ff665e5,
-  0x759baca0, 0x663934d7, 0x52de9c4e, 0x417c0439,
-  0xa6050ec4, 0xb5a796b3, 0x81403e2a, 0x92e2a65d,
-  0xe88f6f18, 0xfb2df76f, 0xcfca5ff6, 0xdc68c781,
-  0x7b5fdfff, 0x68fd4788, 0x5c1aef11, 0x4fb87766,
-  0x35d5be23, 0x26772654, 0x12908ecd, 0x013216ba,
-  0xe64b1c47, 0xf5e98430, 0xc10e2ca9, 0xd2acb4de,
-  0xa8c17d9b, 0xbb63e5ec, 0x8f844d75, 0x9c26d502,
-  0x449a2e7e, 0x5738b609, 0x63df1e90, 0x707d86e7,
-  0x0a104fa2, 0x19b2d7d5, 0x2d557f4c, 0x3ef7e73b,
-  0xd98eedc6, 0xca2c75b1, 0xfecbdd28, 0xed69455f,
-  0x97048c1a, 0x84a6146d, 0xb041bcf4, 0xa3e32483
-};
-static const uint32_t table2_[256] = {
-  0x00000000, 0xa541927e, 0x4f6f520d, 0xea2ec073,
-  0x9edea41a, 0x3b9f3664, 0xd1b1f617, 0x74f06469,
-  0x38513ec5, 0x9d10acbb, 0x773e6cc8, 0xd27ffeb6,
-  0xa68f9adf, 0x03ce08a1, 0xe9e0c8d2, 0x4ca15aac,
-  0x70a27d8a, 0xd5e3eff4, 0x3fcd2f87, 0x9a8cbdf9,
-  0xee7cd990, 0x4b3d4bee, 0xa1138b9d, 0x045219e3,
-  0x48f3434f, 0xedb2d131, 0x079c1142, 0xa2dd833c,
-  0xd62de755, 0x736c752b, 0x9942b558, 0x3c032726,
-  0xe144fb14, 0x4405696a, 0xae2ba919, 0x0b6a3b67,
-  0x7f9a5f0e, 0xdadbcd70, 0x30f50d03, 0x95b49f7d,
-  0xd915c5d1, 0x7c5457af, 0x967a97dc, 0x333b05a2,
-  0x47cb61cb, 0xe28af3b5, 0x08a433c6, 0xade5a1b8,
-  0x91e6869e, 0x34a714e0, 0xde89d493, 0x7bc846ed,
-  0x0f382284, 0xaa79b0fa, 0x40577089, 0xe516e2f7,
-  0xa9b7b85b, 0x0cf62a25, 0xe6d8ea56, 0x43997828,
-  0x37691c41, 0x92288e3f, 0x78064e4c, 0xdd47dc32,
-  0xc76580d9, 0x622412a7, 0x880ad2d4, 0x2d4b40aa,
-  0x59bb24c3, 0xfcfab6bd, 0x16d476ce, 0xb395e4b0,
-  0xff34be1c, 0x5a752c62, 0xb05bec11, 0x151a7e6f,
-  0x61ea1a06, 0xc4ab8878, 0x2e85480b, 0x8bc4da75,
-  0xb7c7fd53, 0x12866f2d, 0xf8a8af5e, 0x5de93d20,
-  0x29195949, 0x8c58cb37, 0x66760b44, 0xc337993a,
-  0x8f96c396, 0x2ad751e8, 0xc0f9919b, 0x65b803e5,
-  0x1148678c, 0xb409f5f2, 0x5e273581, 0xfb66a7ff,
-  0x26217bcd, 0x8360e9b3, 0x694e29c0, 0xcc0fbbbe,
-  0xb8ffdfd7, 0x1dbe4da9, 0xf7908dda, 0x52d11fa4,
-  0x1e704508, 0xbb31d776, 0x511f1705, 0xf45e857b,
-  0x80aee112, 0x25ef736c, 0xcfc1b31f, 0x6a802161,
-  0x56830647, 0xf3c29439, 0x19ec544a, 0xbcadc634,
-  0xc85da25d, 0x6d1c3023, 0x8732f050, 0x2273622e,
-  0x6ed23882, 0xcb93aafc, 0x21bd6a8f, 0x84fcf8f1,
-  0xf00c9c98, 0x554d0ee6, 0xbf63ce95, 0x1a225ceb,
-  0x8b277743, 0x2e66e53d, 0xc448254e, 0x6109b730,
-  0x15f9d359, 0xb0b84127, 0x5a968154, 0xffd7132a,
-  0xb3764986, 0x1637dbf8, 0xfc191b8b, 0x595889f5,
-  0x2da8ed9c, 0x88e97fe2, 0x62c7bf91, 0xc7862def,
-  0xfb850ac9, 0x5ec498b7, 0xb4ea58c4, 0x11abcaba,
-  0x655baed3, 0xc01a3cad, 0x2a34fcde, 0x8f756ea0,
-  0xc3d4340c, 0x6695a672, 0x8cbb6601, 0x29faf47f,
-  0x5d0a9016, 0xf84b0268, 0x1265c21b, 0xb7245065,
-  0x6a638c57, 0xcf221e29, 0x250cde5a, 0x804d4c24,
-  0xf4bd284d, 0x51fcba33, 0xbbd27a40, 0x1e93e83e,
-  0x5232b292, 0xf77320ec, 0x1d5de09f, 0xb81c72e1,
-  0xccec1688, 0x69ad84f6, 0x83834485, 0x26c2d6fb,
-  0x1ac1f1dd, 0xbf8063a3, 0x55aea3d0, 0xf0ef31ae,
-  0x841f55c7, 0x215ec7b9, 0xcb7007ca, 0x6e3195b4,
-  0x2290cf18, 0x87d15d66, 0x6dff9d15, 0xc8be0f6b,
-  0xbc4e6b02, 0x190ff97c, 0xf321390f, 0x5660ab71,
-  0x4c42f79a, 0xe90365e4, 0x032da597, 0xa66c37e9,
-  0xd29c5380, 0x77ddc1fe, 0x9df3018d, 0x38b293f3,
-  0x7413c95f, 0xd1525b21, 0x3b7c9b52, 0x9e3d092c,
-  0xeacd6d45, 0x4f8cff3b, 0xa5a23f48, 0x00e3ad36,
-  0x3ce08a10, 0x99a1186e, 0x738fd81d, 0xd6ce4a63,
-  0xa23e2e0a, 0x077fbc74, 0xed517c07, 0x4810ee79,
-  0x04b1b4d5, 0xa1f026ab, 0x4bdee6d8, 0xee9f74a6,
-  0x9a6f10cf, 0x3f2e82b1, 0xd50042c2, 0x7041d0bc,
-  0xad060c8e, 0x08479ef0, 0xe2695e83, 0x4728ccfd,
-  0x33d8a894, 0x96993aea, 0x7cb7fa99, 0xd9f668e7,
-  0x9557324b, 0x3016a035, 0xda386046, 0x7f79f238,
-  0x0b899651, 0xaec8042f, 0x44e6c45c, 0xe1a75622,
-  0xdda47104, 0x78e5e37a, 0x92cb2309, 0x378ab177,
-  0x437ad51e, 0xe63b4760, 0x0c158713, 0xa954156d,
-  0xe5f54fc1, 0x40b4ddbf, 0xaa9a1dcc, 0x0fdb8fb2,
-  0x7b2bebdb, 0xde6a79a5, 0x3444b9d6, 0x91052ba8
-};
-static const uint32_t table3_[256] = {
-  0x00000000, 0xdd45aab8, 0xbf672381, 0x62228939,
-  0x7b2231f3, 0xa6679b4b, 0xc4451272, 0x1900b8ca,
-  0xf64463e6, 0x2b01c95e, 0x49234067, 0x9466eadf,
-  0x8d665215, 0x5023f8ad, 0x32017194, 0xef44db2c,
-  0xe964b13d, 0x34211b85, 0x560392bc, 0x8b463804,
-  0x924680ce, 0x4f032a76, 0x2d21a34f, 0xf06409f7,
-  0x1f20d2db, 0xc2657863, 0xa047f15a, 0x7d025be2,
-  0x6402e328, 0xb9474990, 0xdb65c0a9, 0x06206a11,
-  0xd725148b, 0x0a60be33, 0x6842370a, 0xb5079db2,
-  0xac072578, 0x71428fc0, 0x136006f9, 0xce25ac41,
-  0x2161776d, 0xfc24ddd5, 0x9e0654ec, 0x4343fe54,
-  0x5a43469e, 0x8706ec26, 0xe524651f, 0x3861cfa7,
-  0x3e41a5b6, 0xe3040f0e, 0x81268637, 0x5c632c8f,
-  0x45639445, 0x98263efd, 0xfa04b7c4, 0x27411d7c,
-  0xc805c650, 0x15406ce8, 0x7762e5d1, 0xaa274f69,
-  0xb327f7a3, 0x6e625d1b, 0x0c40d422, 0xd1057e9a,
-  0xaba65fe7, 0x76e3f55f, 0x14c17c66, 0xc984d6de,
-  0xd0846e14, 0x0dc1c4ac, 0x6fe34d95, 0xb2a6e72d,
-  0x5de23c01, 0x80a796b9, 0xe2851f80, 0x3fc0b538,
-  0x26c00df2, 0xfb85a74a, 0x99a72e73, 0x44e284cb,
-  0x42c2eeda, 0x9f874462, 0xfda5cd5b, 0x20e067e3,
-  0x39e0df29, 0xe4a57591, 0x8687fca8, 0x5bc25610,
-  0xb4868d3c, 0x69c32784, 0x0be1aebd, 0xd6a40405,
-  0xcfa4bccf, 0x12e11677, 0x70c39f4e, 0xad8635f6,
-  0x7c834b6c, 0xa1c6e1d4, 0xc3e468ed, 0x1ea1c255,
-  0x07a17a9f, 0xdae4d027, 0xb8c6591e, 0x6583f3a6,
-  0x8ac7288a, 0x57828232, 0x35a00b0b, 0xe8e5a1b3,
-  0xf1e51979, 0x2ca0b3c1, 0x4e823af8, 0x93c79040,
-  0x95e7fa51, 0x48a250e9, 0x2a80d9d0, 0xf7c57368,
-  0xeec5cba2, 0x3380611a, 0x51a2e823, 0x8ce7429b,
-  0x63a399b7, 0xbee6330f, 0xdcc4ba36, 0x0181108e,
-  0x1881a844, 0xc5c402fc, 0xa7e68bc5, 0x7aa3217d,
-  0x52a0c93f, 0x8fe56387, 0xedc7eabe, 0x30824006,
-  0x2982f8cc, 0xf4c75274, 0x96e5db4d, 0x4ba071f5,
-  0xa4e4aad9, 0x79a10061, 0x1b838958, 0xc6c623e0,
-  0xdfc69b2a, 0x02833192, 0x60a1b8ab, 0xbde41213,
-  0xbbc47802, 0x6681d2ba, 0x04a35b83, 0xd9e6f13b,
-  0xc0e649f1, 0x1da3e349, 0x7f816a70, 0xa2c4c0c8,
-  0x4d801be4, 0x90c5b15c, 0xf2e73865, 0x2fa292dd,
-  0x36a22a17, 0xebe780af, 0x89c50996, 0x5480a32e,
-  0x8585ddb4, 0x58c0770c, 0x3ae2fe35, 0xe7a7548d,
-  0xfea7ec47, 0x23e246ff, 0x41c0cfc6, 0x9c85657e,
-  0x73c1be52, 0xae8414ea, 0xcca69dd3, 0x11e3376b,
-  0x08e38fa1, 0xd5a62519, 0xb784ac20, 0x6ac10698,
-  0x6ce16c89, 0xb1a4c631, 0xd3864f08, 0x0ec3e5b0,
-  0x17c35d7a, 0xca86f7c2, 0xa8a47efb, 0x75e1d443,
-  0x9aa50f6f, 0x47e0a5d7, 0x25c22cee, 0xf8878656,
-  0xe1873e9c, 0x3cc29424, 0x5ee01d1d, 0x83a5b7a5,
-  0xf90696d8, 0x24433c60, 0x4661b559, 0x9b241fe1,
-  0x8224a72b, 0x5f610d93, 0x3d4384aa, 0xe0062e12,
-  0x0f42f53e, 0xd2075f86, 0xb025d6bf, 0x6d607c07,
-  0x7460c4cd, 0xa9256e75, 0xcb07e74c, 0x16424df4,
-  0x106227e5, 0xcd278d5d, 0xaf050464, 0x7240aedc,
-  0x6b401616, 0xb605bcae, 0xd4273597, 0x09629f2f,
-  0xe6264403, 0x3b63eebb, 0x59416782, 0x8404cd3a,
-  0x9d0475f0, 0x4041df48, 0x22635671, 0xff26fcc9,
-  0x2e238253, 0xf36628eb, 0x9144a1d2, 0x4c010b6a,
-  0x5501b3a0, 0x88441918, 0xea669021, 0x37233a99,
-  0xd867e1b5, 0x05224b0d, 0x6700c234, 0xba45688c,
-  0xa345d046, 0x7e007afe, 0x1c22f3c7, 0xc167597f,
-  0xc747336e, 0x1a0299d6, 0x782010ef, 0xa565ba57,
-  0xbc65029d, 0x6120a825, 0x0302211c, 0xde478ba4,
-  0x31035088, 0xec46fa30, 0x8e647309, 0x5321d9b1,
-  0x4a21617b, 0x9764cbc3, 0xf54642fa, 0x2803e842
-};
-
-// Used to fetch a naturally-aligned 32-bit word in little endian byte-order
-static inline uint32_t LE_LOAD32(const uint8_t *p) {
-  return DecodeFixed32(reinterpret_cast<const char*>(p));
-}
-
-#ifdef __SSE4_2__
-static inline uint64_t LE_LOAD64(const uint8_t *p) {
-  return DecodeFixed64(reinterpret_cast<const char*>(p));
-}
-#endif
-
-static inline void Slow_CRC32(uint64_t* l, uint8_t const **p) {
-  uint32_t c = *l ^ LE_LOAD32(*p);
-  *p += 4;
-  *l = table3_[c & 0xff] ^
-  table2_[(c >> 8) & 0xff] ^
-  table1_[(c >> 16) & 0xff] ^
-  table0_[c >> 24];
-  // DO it twice.
-  c = *l ^ LE_LOAD32(*p);
-  *p += 4;
-  *l = table3_[c & 0xff] ^
-  table2_[(c >> 8) & 0xff] ^
-  table1_[(c >> 16) & 0xff] ^
-  table0_[c >> 24];
-}
-
-static inline void Fast_CRC32(uint64_t* l, uint8_t const **p) {
-#ifdef __SSE4_2__
-  *l = _mm_crc32_u64(*l, LE_LOAD64(*p));
-  *p += 8;
-#else
-  Slow_CRC32(l, p);
-#endif
-}
-
-template<void (*CRC32)(uint64_t*, uint8_t const**)>
-uint32_t ExtendImpl(uint32_t crc, const char* buf, size_t size) {
-  const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
-  const uint8_t *e = p + size;
-  uint64_t l = crc ^ 0xffffffffu;
-
-// Align n to (1 << m) byte boundary
-#define ALIGN(n, m)     ((n + ((1 << m) - 1)) & ~((1 << m) - 1))
-
-#define STEP1 do {                              \
-    int c = (l & 0xff) ^ *p++;                  \
-    l = table0_[c] ^ (l >> 8);                  \
-} while (0)
-
-
-  // Point x at first 16-byte aligned byte in string.  This might be
-  // just past the end of the string.
-  const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
-  const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
-  if (x <= e) {
-    // Process bytes until finished or p is 16-byte aligned
-    while (p != x) {
-      STEP1;
-    }
-  }
-  // Process bytes 16 at a time
-  while ((e-p) >= 16) {
-    CRC32(&l, &p);
-    CRC32(&l, &p);
-  }
-  // Process bytes 8 at a time
-  while ((e-p) >= 8) {
-    CRC32(&l, &p);
-  }
-  // Process the last few bytes
-  while (p != e) {
-    STEP1;
-  }
-#undef STEP1
-#undef ALIGN
-  return l ^ 0xffffffffu;
-}
-
-// Detect if SS42 or not.
-static bool isSSE42() {
-#if defined(__GNUC__) && defined(__x86_64__) && !defined(IOS_CROSS_COMPILE)
-  uint32_t c_;
-  uint32_t d_;
-  __asm__("cpuid" : "=c"(c_), "=d"(d_) : "a"(1) : "ebx");
-  return c_ & (1U << 20);  // copied from CpuId.h in Folly.
-#else
-  return false;
-#endif
-}
-
-typedef uint32_t (*Function)(uint32_t, const char*, size_t);
-
-static inline Function Choose_Extend() {
-  return isSSE42() ? ExtendImpl<Fast_CRC32> : ExtendImpl<Slow_CRC32>;
-}
-
-Function ChosenExtend = Choose_Extend();
-
-uint32_t Extend(uint32_t crc, const char* buf, size_t size) {
-  return ChosenExtend(crc, buf, size);
-}
-
-}  // namespace crc32c
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/crc32c.h b/src/rocksdb/util/crc32c.h
deleted file mode 100644
index e5e6e14..0000000
--- a/src/rocksdb/util/crc32c.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <stddef.h>
-#include <stdint.h>
-
-namespace rocksdb {
-namespace crc32c {
-
-// Return the crc32c of concat(A, data[0,n-1]) where init_crc is the
-// crc32c of some string A.  Extend() is often used to maintain the
-// crc32c of a stream of data.
-extern uint32_t Extend(uint32_t init_crc, const char* data, size_t n);
-
-// Return the crc32c of data[0,n-1]
-inline uint32_t Value(const char* data, size_t n) {
-  return Extend(0, data, n);
-}
-
-static const uint32_t kMaskDelta = 0xa282ead8ul;
-
-// Return a masked representation of crc.
-//
-// Motivation: it is problematic to compute the CRC of a string that
-// contains embedded CRCs.  Therefore we recommend that CRCs stored
-// somewhere (e.g., in files) should be masked before being stored.
-inline uint32_t Mask(uint32_t crc) {
-  // Rotate right by 15 bits and add a constant.
-  return ((crc >> 15) | (crc << 17)) + kMaskDelta;
-}
-
-// Return the crc whose masked representation is masked_crc.
-inline uint32_t Unmask(uint32_t masked_crc) {
-  uint32_t rot = masked_crc - kMaskDelta;
-  return ((rot >> 17) | (rot << 15));
-}
-
-}  // namespace crc32c
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/crc32c_test.cc b/src/rocksdb/util/crc32c_test.cc
deleted file mode 100644
index 300c9d3..0000000
--- a/src/rocksdb/util/crc32c_test.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/crc32c.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-namespace crc32c {
-
-class CRC { };
-
-TEST(CRC, StandardResults) {
-  // From rfc3720 section B.4.
-  char buf[32];
-
-  memset(buf, 0, sizeof(buf));
-  ASSERT_EQ(0x8a9136aaU, Value(buf, sizeof(buf)));
-
-  memset(buf, 0xff, sizeof(buf));
-  ASSERT_EQ(0x62a8ab43U, Value(buf, sizeof(buf)));
-
-  for (int i = 0; i < 32; i++) {
-    buf[i] = i;
-  }
-  ASSERT_EQ(0x46dd794eU, Value(buf, sizeof(buf)));
-
-  for (int i = 0; i < 32; i++) {
-    buf[i] = 31 - i;
-  }
-  ASSERT_EQ(0x113fdb5cU, Value(buf, sizeof(buf)));
-
-  unsigned char data[48] = {
-    0x01, 0xc0, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00,
-    0x14, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x04, 0x00,
-    0x00, 0x00, 0x00, 0x14,
-    0x00, 0x00, 0x00, 0x18,
-    0x28, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00,
-    0x02, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00,
-  };
-  ASSERT_EQ(0xd9963a56, Value(reinterpret_cast<char*>(data), sizeof(data)));
-}
-
-TEST(CRC, Values) {
-  ASSERT_NE(Value("a", 1), Value("foo", 3));
-}
-
-TEST(CRC, Extend) {
-  ASSERT_EQ(Value("hello world", 11),
-            Extend(Value("hello ", 6), "world", 5));
-}
-
-TEST(CRC, Mask) {
-  uint32_t crc = Value("foo", 3);
-  ASSERT_NE(crc, Mask(crc));
-  ASSERT_NE(crc, Mask(Mask(crc)));
-  ASSERT_EQ(crc, Unmask(Mask(crc)));
-  ASSERT_EQ(crc, Unmask(Unmask(Mask(Mask(crc)))));
-}
-
-}  // namespace crc32c
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/dynamic_bloom.cc b/src/rocksdb/util/dynamic_bloom.cc
deleted file mode 100644
index bc48b9f..0000000
--- a/src/rocksdb/util/dynamic_bloom.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#include "dynamic_bloom.h"
-
-#include <algorithm>
-
-#include "port/port.h"
-#include "rocksdb/slice.h"
-#include "util/hash.h"
-
-namespace rocksdb {
-
-namespace {
-static uint32_t BloomHash(const Slice& key) {
-  return Hash(key.data(), key.size(), 0xbc9f1d34);
-}
-}
-
-DynamicBloom::DynamicBloom(uint32_t total_bits, uint32_t cl_per_block,
-                           uint32_t num_probes,
-                           uint32_t (*hash_func)(const Slice& key),
-                           size_t huge_page_tlb_size)
-    : kBlocked(cl_per_block > 0),
-      kBitsPerBlock(std::min(cl_per_block, num_probes) * CACHE_LINE_SIZE * 8),
-      kTotalBits((kBlocked ? (total_bits + kBitsPerBlock - 1) / kBitsPerBlock *
-                                 kBitsPerBlock
-                           : total_bits + 7) /
-                 8 * 8),
-      kNumBlocks(kBlocked ? kTotalBits / kBitsPerBlock : 1),
-      kNumProbes(num_probes),
-      hash_func_(hash_func == nullptr ? &BloomHash : hash_func) {
-  assert(kBlocked ? kTotalBits > 0 : kTotalBits >= kBitsPerBlock);
-  assert(kNumProbes > 0);
-
-  uint32_t sz = kTotalBits / 8;
-  if (kBlocked) {
-    sz += CACHE_LINE_SIZE - 1;
-  }
-  raw_ = reinterpret_cast<unsigned char*>(
-      arena_.AllocateAligned(sz, huge_page_tlb_size));
-  memset(raw_, 0, sz);
-  if (kBlocked && (reinterpret_cast<uint64_t>(raw_) % CACHE_LINE_SIZE)) {
-    data_ = raw_ + CACHE_LINE_SIZE -
-      reinterpret_cast<uint64_t>(raw_) % CACHE_LINE_SIZE;
-  } else {
-    data_ = raw_;
-  }
-}
-
-}  // rocksdb
diff --git a/src/rocksdb/util/dynamic_bloom.h b/src/rocksdb/util/dynamic_bloom.h
deleted file mode 100644
index f91bb8f..0000000
--- a/src/rocksdb/util/dynamic_bloom.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#pragma once
-
-#include <atomic>
-#include <memory>
-
-#include <util/arena.h>
-
-namespace rocksdb {
-
-class Slice;
-
-class DynamicBloom {
- public:
-  // total_bits: fixed total bits for the bloom
-  // num_probes: number of hash probes for a single key
-  // cl_per_block: block size in cache lines. When this is non-zero, a
-  //               query/set is done within a block to improve cache locality.
-  // hash_func:  customized hash function
-  // huge_page_tlb_size:  if >0, try to allocate bloom bytes from huge page TLB
-  //                      withi this page size. Need to reserve huge pages for
-  //                      it to be allocated, like:
-  //                         sysctl -w vm.nr_hugepages=20
-  //                     See linux doc Documentation/vm/hugetlbpage.txt
-  explicit DynamicBloom(uint32_t total_bits, uint32_t cl_per_block = 0,
-                        uint32_t num_probes = 6,
-                        uint32_t (*hash_func)(const Slice& key) = nullptr,
-                        size_t huge_page_tlb_size = 0);
-
-  ~DynamicBloom() {}
-
-  // Assuming single threaded access to this function.
-  void Add(const Slice& key);
-
-  // Assuming single threaded access to this function.
-  void AddHash(uint32_t hash);
-
-  // Multithreaded access to this function is OK
-  bool MayContain(const Slice& key);
-
-  // Multithreaded access to this function is OK
-  bool MayContainHash(uint32_t hash);
-
- private:
-  const bool kBlocked;
-  const uint32_t kBitsPerBlock;
-  const uint32_t kTotalBits;
-  const uint32_t kNumBlocks;
-  const uint32_t kNumProbes;
-
-  uint32_t (*hash_func_)(const Slice& key);
-  unsigned char* data_;
-  unsigned char* raw_;
-
-  Arena arena_;
-};
-
-inline void DynamicBloom::Add(const Slice& key) { AddHash(hash_func_(key)); }
-
-inline bool DynamicBloom::MayContain(const Slice& key) {
-  return (MayContainHash(hash_func_(key)));
-}
-
-inline bool DynamicBloom::MayContainHash(uint32_t h) {
-  const uint32_t delta = (h >> 17) | (h << 15);  // Rotate right 17 bits
-  if (kBlocked) {
-    uint32_t b = ((h >> 11 | (h << 21)) % kNumBlocks) * kBitsPerBlock;
-    for (uint32_t i = 0; i < kNumProbes; ++i) {
-      const uint32_t bitpos = b + h % kBitsPerBlock;
-      if (((data_[bitpos / 8]) & (1 << (bitpos % 8))) == 0) {
-        return false;
-      }
-      h += delta;
-    }
-  } else {
-    for (uint32_t i = 0; i < kNumProbes; ++i) {
-      const uint32_t bitpos = h % kTotalBits;
-      if (((data_[bitpos / 8]) & (1 << (bitpos % 8))) == 0) {
-        return false;
-      }
-      h += delta;
-    }
-  }
-  return true;
-}
-
-inline void DynamicBloom::AddHash(uint32_t h) {
-  const uint32_t delta = (h >> 17) | (h << 15);  // Rotate right 17 bits
-  if (kBlocked) {
-    uint32_t b = ((h >> 11 | (h << 21)) % kNumBlocks) * kBitsPerBlock;
-    for (uint32_t i = 0; i < kNumProbes; ++i) {
-      const uint32_t bitpos = b + h % kBitsPerBlock;
-      data_[bitpos / 8] |= (1 << (bitpos % 8));
-      h += delta;
-    }
-  } else {
-    for (uint32_t i = 0; i < kNumProbes; ++i) {
-      const uint32_t bitpos = h % kTotalBits;
-      data_[bitpos / 8] |= (1 << (bitpos % 8));
-      h += delta;
-    }
-  }
-}
-
-}  // rocksdb
diff --git a/src/rocksdb/util/dynamic_bloom_test.cc b/src/rocksdb/util/dynamic_bloom_test.cc
deleted file mode 100644
index 4a34d50..0000000
--- a/src/rocksdb/util/dynamic_bloom_test.cc
+++ /dev/null
@@ -1,202 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <algorithm>
-#include <gflags/gflags.h>
-
-#include "dynamic_bloom.h"
-#include "port/port.h"
-#include "util/logging.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-#include "util/stop_watch.h"
-
-DEFINE_int32(bits_per_key, 10, "");
-DEFINE_int32(num_probes, 6, "");
-DEFINE_bool(enable_perf, false, "");
-
-namespace rocksdb {
-
-static Slice Key(uint64_t i, char* buffer) {
-  memcpy(buffer, &i, sizeof(i));
-  return Slice(buffer, sizeof(i));
-}
-
-class DynamicBloomTest {
-};
-
-TEST(DynamicBloomTest, EmptyFilter) {
-  DynamicBloom bloom1(100, 0, 2);
-  ASSERT_TRUE(!bloom1.MayContain("hello"));
-  ASSERT_TRUE(!bloom1.MayContain("world"));
-
-  DynamicBloom bloom2(CACHE_LINE_SIZE * 8 * 2 - 1, 1, 2);
-  ASSERT_TRUE(!bloom2.MayContain("hello"));
-  ASSERT_TRUE(!bloom2.MayContain("world"));
-}
-
-TEST(DynamicBloomTest, Small) {
-  DynamicBloom bloom1(100, 0, 2);
-  bloom1.Add("hello");
-  bloom1.Add("world");
-  ASSERT_TRUE(bloom1.MayContain("hello"));
-  ASSERT_TRUE(bloom1.MayContain("world"));
-  ASSERT_TRUE(!bloom1.MayContain("x"));
-  ASSERT_TRUE(!bloom1.MayContain("foo"));
-
-  DynamicBloom bloom2(CACHE_LINE_SIZE * 8 * 2 - 1, 1, 2);
-  bloom2.Add("hello");
-  bloom2.Add("world");
-  ASSERT_TRUE(bloom2.MayContain("hello"));
-  ASSERT_TRUE(bloom2.MayContain("world"));
-  ASSERT_TRUE(!bloom2.MayContain("x"));
-  ASSERT_TRUE(!bloom2.MayContain("foo"));
-}
-
-static uint32_t NextNum(uint32_t num) {
-  if (num < 10) {
-    num += 1;
-  } else if (num < 100) {
-    num += 10;
-  } else if (num < 1000) {
-    num += 100;
-  } else {
-    num += 1000;
-  }
-  return num;
-}
-
-TEST(DynamicBloomTest, VaryingLengths) {
-  char buffer[sizeof(uint64_t)];
-
-  // Count number of filters that significantly exceed the false positive rate
-  int mediocre_filters = 0;
-  int good_filters = 0;
-  uint32_t num_probes = static_cast<uint32_t>(FLAGS_num_probes);
-
-  fprintf(stderr, "bits_per_key: %d  num_probes: %d\n",
-          FLAGS_bits_per_key, num_probes);
-
-  for (uint32_t cl_per_block = 0; cl_per_block < num_probes;
-      ++cl_per_block) {
-    for (uint32_t num = 1; num <= 10000; num = NextNum(num)) {
-      uint32_t bloom_bits = 0;
-      if (cl_per_block == 0) {
-        bloom_bits = std::max(num * FLAGS_bits_per_key, 64U);
-      } else {
-        bloom_bits = std::max(num * FLAGS_bits_per_key,
-            cl_per_block * CACHE_LINE_SIZE * 8);
-      }
-      DynamicBloom bloom(bloom_bits, cl_per_block, num_probes);
-      for (uint64_t i = 0; i < num; i++) {
-        bloom.Add(Key(i, buffer));
-        ASSERT_TRUE(bloom.MayContain(Key(i, buffer)));
-      }
-
-      // All added keys must match
-      for (uint64_t i = 0; i < num; i++) {
-        ASSERT_TRUE(bloom.MayContain(Key(i, buffer)))
-          << "Num " << num << "; key " << i;
-      }
-
-      // Check false positive rate
-
-      int result = 0;
-      for (uint64_t i = 0; i < 10000; i++) {
-        if (bloom.MayContain(Key(i + 1000000000, buffer))) {
-          result++;
-        }
-      }
-      double rate = result / 10000.0;
-
-      fprintf(stderr, "False positives: %5.2f%% @ num = %6u, bloom_bits = %6u, "
-              "cl per block = %u\n", rate*100.0, num, bloom_bits, cl_per_block);
-
-      if (rate > 0.0125)
-        mediocre_filters++;  // Allowed, but not too often
-      else
-        good_filters++;
-    }
-
-    fprintf(stderr, "Filters: %d good, %d mediocre\n",
-            good_filters, mediocre_filters);
-    ASSERT_LE(mediocre_filters, good_filters/5);
-  }
-}
-
-TEST(DynamicBloomTest, perf) {
-  StopWatchNano timer(Env::Default());
-  uint32_t num_probes = static_cast<uint32_t>(FLAGS_num_probes);
-
-  if (!FLAGS_enable_perf) {
-    return;
-  }
-
-  for (uint64_t m = 1; m <= 8; ++m) {
-    const uint64_t num_keys = m * 8 * 1024 * 1024;
-    fprintf(stderr, "testing %" PRIu64 "M keys\n", m * 8);
-
-    DynamicBloom std_bloom(num_keys * 10, 0, num_probes);
-
-    timer.Start();
-    for (uint64_t i = 1; i <= num_keys; ++i) {
-      std_bloom.Add(Slice(reinterpret_cast<const char*>(&i), 8));
-    }
-
-    uint64_t elapsed = timer.ElapsedNanos();
-    fprintf(stderr, "standard bloom, avg add latency %" PRIu64 "\n",
-            elapsed / num_keys);
-
-    uint64_t count = 0;
-    timer.Start();
-    for (uint64_t i = 1; i <= num_keys; ++i) {
-      if (std_bloom.MayContain(Slice(reinterpret_cast<const char*>(&i), 8))) {
-        ++count;
-      }
-    }
-    elapsed = timer.ElapsedNanos();
-    fprintf(stderr, "standard bloom, avg query latency %" PRIu64 "\n",
-            elapsed / count);
-    ASSERT_TRUE(count == num_keys);
-
-    for (uint32_t cl_per_block = 1; cl_per_block <= num_probes;
-        ++cl_per_block) {
-      DynamicBloom blocked_bloom(num_keys * 10, cl_per_block, num_probes);
-
-      timer.Start();
-      for (uint64_t i = 1; i <= num_keys; ++i) {
-        blocked_bloom.Add(Slice(reinterpret_cast<const char*>(&i), 8));
-      }
-
-      uint64_t elapsed = timer.ElapsedNanos();
-      fprintf(stderr, "blocked bloom(%d), avg add latency %" PRIu64 "\n",
-              cl_per_block, elapsed / num_keys);
-
-      uint64_t count = 0;
-      timer.Start();
-      for (uint64_t i = 1; i <= num_keys; ++i) {
-        if (blocked_bloom.MayContain(
-              Slice(reinterpret_cast<const char*>(&i), 8))) {
-          ++count;
-        }
-      }
-
-      elapsed = timer.ElapsedNanos();
-      fprintf(stderr, "blocked bloom(%d), avg query latency %" PRIu64 "\n",
-              cl_per_block, elapsed / count);
-      ASSERT_TRUE(count == num_keys);
-    }
-  }
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  google::ParseCommandLineFlags(&argc, &argv, true);
-
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/env.cc b/src/rocksdb/util/env.cc
deleted file mode 100644
index 1c0cae4..0000000
--- a/src/rocksdb/util/env.cc
+++ /dev/null
@@ -1,251 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/env.h"
-
-#include <sys/time.h>
-#include "rocksdb/options.h"
-#include "util/arena.h"
-#include "util/autovector.h"
-
-namespace rocksdb {
-
-Env::~Env() {
-}
-
-SequentialFile::~SequentialFile() {
-}
-
-RandomAccessFile::~RandomAccessFile() {
-}
-
-WritableFile::~WritableFile() {
-}
-
-Logger::~Logger() {
-}
-
-FileLock::~FileLock() {
-}
-
-void LogFlush(Logger *info_log) {
-  if (info_log) {
-    info_log->Flush();
-  }
-}
-
-void Log(Logger* info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::INFO_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Log(const InfoLogLevel log_level, Logger* info_log, const char* format,
-         ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(log_level, format, ap);
-    va_end(ap);
-  }
-}
-
-void Debug(Logger* info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::DEBUG_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Info(Logger* info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::INFO_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Warn(Logger* info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::WARN_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-void Error(Logger* info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::ERROR_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-void Fatal(Logger* info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::FATAL_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void LogFlush(const shared_ptr<Logger>& info_log) {
-  if (info_log) {
-    info_log->Flush();
-  }
-}
-
-void Log(const InfoLogLevel log_level, const shared_ptr<Logger>& info_log,
-         const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(log_level, format, ap);
-    va_end(ap);
-  }
-}
-
-void Debug(const shared_ptr<Logger>& info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::DEBUG_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Info(const shared_ptr<Logger>& info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::INFO_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Warn(const shared_ptr<Logger>& info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::WARN_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Error(const shared_ptr<Logger>& info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::ERROR_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Fatal(const shared_ptr<Logger>& info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::FATAL_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-void Log(const shared_ptr<Logger>& info_log, const char* format, ...) {
-  if (info_log) {
-    va_list ap;
-    va_start(ap, format);
-    info_log->Logv(InfoLogLevel::INFO_LEVEL, format, ap);
-    va_end(ap);
-  }
-}
-
-Status WriteStringToFile(Env* env, const Slice& data, const std::string& fname,
-                         bool should_sync) {
-  unique_ptr<WritableFile> file;
-  EnvOptions soptions;
-  Status s = env->NewWritableFile(fname, &file, soptions);
-  if (!s.ok()) {
-    return s;
-  }
-  s = file->Append(data);
-  if (s.ok() && should_sync) {
-    s = file->Sync();
-  }
-  if (!s.ok()) {
-    env->DeleteFile(fname);
-  }
-  return s;
-}
-
-Status ReadFileToString(Env* env, const std::string& fname, std::string* data) {
-  EnvOptions soptions;
-  data->clear();
-  unique_ptr<SequentialFile> file;
-  Status s = env->NewSequentialFile(fname, &file, soptions);
-  if (!s.ok()) {
-    return s;
-  }
-  static const int kBufferSize = 8192;
-  char* space = new char[kBufferSize];
-  while (true) {
-    Slice fragment;
-    s = file->Read(kBufferSize, &fragment, space);
-    if (!s.ok()) {
-      break;
-    }
-    data->append(fragment.data(), fragment.size());
-    if (fragment.empty()) {
-      break;
-    }
-  }
-  delete[] space;
-  return s;
-}
-
-EnvWrapper::~EnvWrapper() {
-}
-
-namespace {  // anonymous namespace
-
-void AssignEnvOptions(EnvOptions* env_options, const DBOptions& options) {
-  env_options->use_os_buffer = options.allow_os_buffer;
-  env_options->use_mmap_reads = options.allow_mmap_reads;
-  env_options->use_mmap_writes = options.allow_mmap_writes;
-  env_options->set_fd_cloexec = options.is_fd_close_on_exec;
-  env_options->bytes_per_sync = options.bytes_per_sync;
-}
-
-}
-
-EnvOptions Env::OptimizeForLogWrite(const EnvOptions& env_options) const {
-  return env_options;
-}
-
-EnvOptions Env::OptimizeForManifestWrite(const EnvOptions& env_options) const {
-  return env_options;
-}
-
-EnvOptions::EnvOptions(const DBOptions& options) {
-  AssignEnvOptions(this, options);
-}
-
-EnvOptions::EnvOptions() {
-  DBOptions options;
-  AssignEnvOptions(this, options);
-}
-
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/env_hdfs.cc b/src/rocksdb/util/env_hdfs.cc
deleted file mode 100644
index c724b23..0000000
--- a/src/rocksdb/util/env_hdfs.cc
+++ /dev/null
@@ -1,523 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifdef USE_HDFS
-#ifndef ROCKSDB_HDFS_FILE_C
-#define ROCKSDB_HDFS_FILE_C
-
-#include <algorithm>
-#include <stdio.h>
-#include <sys/time.h>
-#include <time.h>
-#include <iostream>
-#include <sstream>
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-#include "hdfs/hdfs.h"
-#include "hdfs/env_hdfs.h"
-
-//
-// This file defines an HDFS environment for rocksdb. It uses the libhdfs
-// api to access HDFS. All HDFS files created by one instance of rocksdb
-// will reside on the same HDFS cluster.
-//
-
-namespace rocksdb {
-
-namespace {
-
-// Log error message
-static Status IOError(const std::string& context, int err_number) {
-  return Status::IOError(context, strerror(err_number));
-}
-
-// assume that there is one global logger for now. It is not thread-safe,
-// but need not be because the logger is initialized at db-open time.
-static Logger* mylog = nullptr;
-
-// Used for reading a file from HDFS. It implements both sequential-read
-// access methods as well as random read access methods.
-class HdfsReadableFile: virtual public SequentialFile, virtual public RandomAccessFile {
- private:
-  hdfsFS fileSys_;
-  std::string filename_;
-  hdfsFile hfile_;
-
- public:
-  HdfsReadableFile(hdfsFS fileSys, const std::string& fname)
-      : fileSys_(fileSys), filename_(fname), hfile_(nullptr) {
-    Log(mylog, "[hdfs] HdfsReadableFile opening file %s\n",
-        filename_.c_str());
-    hfile_ = hdfsOpenFile(fileSys_, filename_.c_str(), O_RDONLY, 0, 0, 0);
-    Log(mylog, "[hdfs] HdfsReadableFile opened file %s hfile_=0x%p\n",
-            filename_.c_str(), hfile_);
-  }
-
-  virtual ~HdfsReadableFile() {
-    Log(mylog, "[hdfs] HdfsReadableFile closing file %s\n",
-       filename_.c_str());
-    hdfsCloseFile(fileSys_, hfile_);
-    Log(mylog, "[hdfs] HdfsReadableFile closed file %s\n",
-        filename_.c_str());
-    hfile_ = nullptr;
-  }
-
-  bool isValid() {
-    return hfile_ != nullptr;
-  }
-
-  // sequential access, read data at current offset in file
-  virtual Status Read(size_t n, Slice* result, char* scratch) {
-    Status s;
-    Log(mylog, "[hdfs] HdfsReadableFile reading %s %ld\n",
-        filename_.c_str(), n);
-    size_t bytes_read = hdfsRead(fileSys_, hfile_, scratch, (tSize)n);
-    Log(mylog, "[hdfs] HdfsReadableFile read %s\n", filename_.c_str());
-    *result = Slice(scratch, bytes_read);
-    if (bytes_read < n) {
-      if (feof()) {
-        // We leave status as ok if we hit the end of the file
-      } else {
-        // A partial read with an error: return a non-ok status
-        s = IOError(filename_, errno);
-      }
-    }
-    return s;
-  }
-
-  // random access, read data from specified offset in file
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const {
-    Status s;
-    Log(mylog, "[hdfs] HdfsReadableFile preading %s\n", filename_.c_str());
-    ssize_t bytes_read = hdfsPread(fileSys_, hfile_, offset,
-                                   (void*)scratch, (tSize)n);
-    Log(mylog, "[hdfs] HdfsReadableFile pread %s\n", filename_.c_str());
-    *result = Slice(scratch, (bytes_read < 0) ? 0 : bytes_read);
-    if (bytes_read < 0) {
-      // An error: return a non-ok status
-      s = IOError(filename_, errno);
-    }
-    return s;
-  }
-
-  virtual Status Skip(uint64_t n) {
-    Log(mylog, "[hdfs] HdfsReadableFile skip %s\n", filename_.c_str());
-    // get current offset from file
-    tOffset current = hdfsTell(fileSys_, hfile_);
-    if (current < 0) {
-      return IOError(filename_, errno);
-    }
-    // seek to new offset in file
-    tOffset newoffset = current + n;
-    int val = hdfsSeek(fileSys_, hfile_, newoffset);
-    if (val < 0) {
-      return IOError(filename_, errno);
-    }
-    return Status::OK();
-  }
-
- private:
-
-  // returns true if we are at the end of file, false otherwise
-  bool feof() {
-    Log(mylog, "[hdfs] HdfsReadableFile feof %s\n", filename_.c_str());
-    if (hdfsTell(fileSys_, hfile_) == fileSize()) {
-      return true;
-    }
-    return false;
-  }
-
-  // the current size of the file
-  tOffset fileSize() {
-    Log(mylog, "[hdfs] HdfsReadableFile fileSize %s\n", filename_.c_str());
-    hdfsFileInfo* pFileInfo = hdfsGetPathInfo(fileSys_, filename_.c_str());
-    tOffset size = 0L;
-    if (pFileInfo != nullptr) {
-      size = pFileInfo->mSize;
-      hdfsFreeFileInfo(pFileInfo, 1);
-    } else {
-      throw rocksdb::HdfsFatalException("fileSize on unknown file " +
-                                            filename_);
-    }
-    return size;
-  }
-};
-
-// Appends to an existing file in HDFS.
-class HdfsWritableFile: public WritableFile {
- private:
-  hdfsFS fileSys_;
-  std::string filename_;
-  hdfsFile hfile_;
-
- public:
-  HdfsWritableFile(hdfsFS fileSys, const std::string& fname)
-      : fileSys_(fileSys), filename_(fname) , hfile_(nullptr) {
-    Log(mylog, "[hdfs] HdfsWritableFile opening %s\n", filename_.c_str());
-    hfile_ = hdfsOpenFile(fileSys_, filename_.c_str(), O_WRONLY, 0, 0, 0);
-    Log(mylog, "[hdfs] HdfsWritableFile opened %s\n", filename_.c_str());
-    assert(hfile_ != nullptr);
-  }
-  virtual ~HdfsWritableFile() {
-    if (hfile_ != nullptr) {
-      Log(mylog, "[hdfs] HdfsWritableFile closing %s\n", filename_.c_str());
-      hdfsCloseFile(fileSys_, hfile_);
-      Log(mylog, "[hdfs] HdfsWritableFile closed %s\n", filename_.c_str());
-      hfile_ = nullptr;
-    }
-  }
-
-  // If the file was successfully created, then this returns true.
-  // Otherwise returns false.
-  bool isValid() {
-    return hfile_ != nullptr;
-  }
-
-  // The name of the file, mostly needed for debug logging.
-  const std::string& getName() {
-    return filename_;
-  }
-
-  virtual Status Append(const Slice& data) {
-    Log(mylog, "[hdfs] HdfsWritableFile Append %s\n", filename_.c_str());
-    const char* src = data.data();
-    size_t left = data.size();
-    size_t ret = hdfsWrite(fileSys_, hfile_, src, left);
-    Log(mylog, "[hdfs] HdfsWritableFile Appended %s\n", filename_.c_str());
-    if (ret != left) {
-      return IOError(filename_, errno);
-    }
-    return Status::OK();
-  }
-
-  virtual Status Flush() {
-    return Status::OK();
-  }
-
-  virtual Status Sync() {
-    Status s;
-    Log(mylog, "[hdfs] HdfsWritableFile Sync %s\n", filename_.c_str());
-    if (hdfsFlush(fileSys_, hfile_) == -1) {
-      return IOError(filename_, errno);
-    }
-    if (hdfsSync(fileSys_, hfile_) == -1) {
-      return IOError(filename_, errno);
-    }
-    Log(mylog, "[hdfs] HdfsWritableFile Synced %s\n", filename_.c_str());
-    return Status::OK();
-  }
-
-  // This is used by HdfsLogger to write data to the debug log file
-  virtual Status Append(const char* src, size_t size) {
-    if (hdfsWrite(fileSys_, hfile_, src, size) != (tSize)size) {
-      return IOError(filename_, errno);
-    }
-    return Status::OK();
-  }
-
-  virtual Status Close() {
-    Log(mylog, "[hdfs] HdfsWritableFile closing %s\n", filename_.c_str());
-    if (hdfsCloseFile(fileSys_, hfile_) != 0) {
-      return IOError(filename_, errno);
-    }
-    Log(mylog, "[hdfs] HdfsWritableFile closed %s\n", filename_.c_str());
-    hfile_ = nullptr;
-    return Status::OK();
-  }
-};
-
-// The object that implements the debug logs to reside in HDFS.
-class HdfsLogger : public Logger {
- private:
-  HdfsWritableFile* file_;
-  uint64_t (*gettid_)();  // Return the thread id for the current thread
-
- public:
-  HdfsLogger(HdfsWritableFile* f, uint64_t (*gettid)(),
-             const InfoLogLevel log_level = InfoLogLevel::ERROR)
-      : Logger(log_level), file_(f), gettid_(gettid) {
-    Log(mylog, "[hdfs] HdfsLogger opened %s\n",
-            file_->getName().c_str());
-  }
-
-  virtual ~HdfsLogger() {
-    Log(mylog, "[hdfs] HdfsLogger closed %s\n",
-            file_->getName().c_str());
-    delete file_;
-    if (mylog != nullptr && mylog == this) {
-      mylog = nullptr;
-    }
-  }
-
-  virtual void Logv(const char* format, va_list ap) {
-    const uint64_t thread_id = (*gettid_)();
-
-    // We try twice: the first time with a fixed-size stack allocated buffer,
-    // and the second time with a much larger dynamically allocated buffer.
-    char buffer[500];
-    for (int iter = 0; iter < 2; iter++) {
-      char* base;
-      int bufsize;
-      if (iter == 0) {
-        bufsize = sizeof(buffer);
-        base = buffer;
-      } else {
-        bufsize = 30000;
-        base = new char[bufsize];
-      }
-      char* p = base;
-      char* limit = base + bufsize;
-
-      struct timeval now_tv;
-      gettimeofday(&now_tv, nullptr);
-      const time_t seconds = now_tv.tv_sec;
-      struct tm t;
-      localtime_r(&seconds, &t);
-      p += snprintf(p, limit - p,
-                    "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ",
-                    t.tm_year + 1900,
-                    t.tm_mon + 1,
-                    t.tm_mday,
-                    t.tm_hour,
-                    t.tm_min,
-                    t.tm_sec,
-                    static_cast<int>(now_tv.tv_usec),
-                    static_cast<long long unsigned int>(thread_id));
-
-      // Print the message
-      if (p < limit) {
-        va_list backup_ap;
-        va_copy(backup_ap, ap);
-        p += vsnprintf(p, limit - p, format, backup_ap);
-        va_end(backup_ap);
-      }
-
-      // Truncate to available space if necessary
-      if (p >= limit) {
-        if (iter == 0) {
-          continue;       // Try again with larger buffer
-        } else {
-          p = limit - 1;
-        }
-      }
-
-      // Add newline if necessary
-      if (p == base || p[-1] != '\n') {
-        *p++ = '\n';
-      }
-
-      assert(p <= limit);
-      file_->Append(base, p-base);
-      file_->Flush();
-      if (base != buffer) {
-        delete[] base;
-      }
-      break;
-    }
-  }
-};
-
-}  // namespace
-
-// Finally, the hdfs environment
-
-// open a file for sequential reading
-Status HdfsEnv::NewSequentialFile(const std::string& fname,
-                                 SequentialFile** result) {
-  HdfsReadableFile* f = new HdfsReadableFile(fileSys_, fname);
-  if (f == nullptr) {
-    *result = nullptr;
-    return IOError(fname, errno);
-  }
-  *result = dynamic_cast<SequentialFile*>(f);
-  return Status::OK();
-}
-
-// open a file for random reading
-Status HdfsEnv::NewRandomAccessFile(const std::string& fname,
-                                   RandomAccessFile** result) {
-  HdfsReadableFile* f = new HdfsReadableFile(fileSys_, fname);
-  if (f == nullptr) {
-    *result = nullptr;
-    return IOError(fname, errno);
-  }
-  *result = dynamic_cast<RandomAccessFile*>(f);
-  return Status::OK();
-}
-
-// create a new file for writing
-Status HdfsEnv::NewWritableFile(const std::string& fname,
-                               WritableFile** result) {
-  Status s;
-  HdfsWritableFile* f = new HdfsWritableFile(fileSys_, fname);
-  if (f == nullptr || !f->isValid()) {
-    *result = nullptr;
-    return IOError(fname, errno);
-  }
-  *result = dynamic_cast<WritableFile*>(f);
-  return Status::OK();
-}
-
-Status HdfsEnv::NewRandomRWFile(const std::string& fname,
-                                unique_ptr<RandomRWFile>* result,
-                                const EnvOptions& options) {
-  return Status::NotSupported("NewRandomRWFile not supported on HdfsEnv");
-}
-
-virtual Status NewDirectory(const std::string& name,
-                            unique_ptr<Directory>* result) {
-  return Status::NotSupported("NewDirectory not yet supported on HdfsEnv");
-}
-
-bool HdfsEnv::FileExists(const std::string& fname) {
-  int value = hdfsExists(fileSys_, fname.c_str());
-  if (value == 0) {
-    return true;
-  }
-  return false;
-}
-
-Status HdfsEnv::GetChildren(const std::string& path,
-                            std::vector<std::string>* result) {
-  int value = hdfsExists(fileSys_, path.c_str());
-  switch (value) {
-  case 0: {
-    int numEntries = 0;
-    hdfsFileInfo* pHdfsFileInfo = 0;
-    pHdfsFileInfo = hdfsListDirectory(fileSys_, path.c_str(), &numEntries);
-    if (numEntries >= 0) {
-      for(int i = 0; i < numEntries; i++) {
-        char* pathname = pHdfsFileInfo[i].mName;
-        char* filename = rindex(pathname, '/');
-        if (filename != nullptr) {
-          result->push_back(filename+1);
-        }
-      }
-      if (pHdfsFileInfo != nullptr) {
-        hdfsFreeFileInfo(pHdfsFileInfo, numEntries);
-      }
-    } else {
-      // numEntries < 0 indicates error
-      Log(mylog, "hdfsListDirectory call failed with error ");
-      throw HdfsFatalException("hdfsListDirectory call failed negative error.\n");
-    }
-    break;
-  }
-  case 1:           // directory does not exist, exit
-    break;
-  default:          // anything else should be an error
-    Log(mylog, "hdfsListDirectory call failed with error ");
-    throw HdfsFatalException("hdfsListDirectory call failed with error.\n");
-  }
-  return Status::OK();
-}
-
-Status HdfsEnv::DeleteFile(const std::string& fname) {
-  if (hdfsDelete(fileSys_, fname.c_str()) == 0) {
-    return Status::OK();
-  }
-  return IOError(fname, errno);
-};
-
-Status HdfsEnv::CreateDir(const std::string& name) {
-  if (hdfsCreateDirectory(fileSys_, name.c_str()) == 0) {
-    return Status::OK();
-  }
-  return IOError(name, errno);
-};
-
-Status HdfsEnv::CreateDirIfMissing(const std::string& name) {
-  const int value = hdfsExists(fileSys_, name.c_str());
-  //  Not atomic. state might change b/w hdfsExists and CreateDir.
-  if (value == 0) {
-    return Status::OK();
-  } else {
-    return CreateDir(name);
-  }
-};
-
-Status HdfsEnv::DeleteDir(const std::string& name) {
-  return DeleteFile(name);
-};
-
-Status HdfsEnv::GetFileSize(const std::string& fname, uint64_t* size) {
-  *size = 0L;
-  hdfsFileInfo* pFileInfo = hdfsGetPathInfo(fileSys_, fname.c_str());
-  if (pFileInfo != nullptr) {
-    *size = pFileInfo->mSize;
-    hdfsFreeFileInfo(pFileInfo, 1);
-    return Status::OK();
-  }
-  return IOError(fname, errno);
-}
-
-Status HdfsEnv::GetFileModificationTime(const std::string& fname,
-                                        uint64_t* time) {
-  hdfsFileInfo* pFileInfo = hdfsGetPathInfo(fileSys_, fname.c_str());
-  if (pFileInfo != nullptr) {
-    *time = static_cast<uint64_t>(pFileInfo->mLastMod);
-    hdfsFreeFileInfo(pFileInfo, 1);
-    return Status::OK();
-  }
-  return IOError(fname, errno);
-
-}
-
-// The rename is not atomic. HDFS does not allow a renaming if the
-// target already exists. So, we delete the target before attemting the
-// rename.
-Status HdfsEnv::RenameFile(const std::string& src, const std::string& target) {
-  hdfsDelete(fileSys_, target.c_str());
-  if (hdfsRename(fileSys_, src.c_str(), target.c_str()) == 0) {
-    return Status::OK();
-  }
-  return IOError(src, errno);
-}
-
-Status HdfsEnv::LockFile(const std::string& fname, FileLock** lock) {
-  // there isn's a very good way to atomically check and create
-  // a file via libhdfs
-  *lock = nullptr;
-  return Status::OK();
-}
-
-Status HdfsEnv::UnlockFile(FileLock* lock) {
-  return Status::OK();
-}
-
-Status HdfsEnv::NewLogger(const std::string& fname,
-                          shared_ptr<Logger>* result) {
-  HdfsWritableFile* f = new HdfsWritableFile(fileSys_, fname);
-  if (f == nullptr || !f->isValid()) {
-    *result = nullptr;
-    return IOError(fname, errno);
-  }
-  HdfsLogger* h = new HdfsLogger(f, &HdfsEnv::gettid);
-  *result = h;
-  if (mylog == nullptr) {
-    // mylog = h; // uncomment this for detailed logging
-  }
-  return Status::OK();
-}
-
-}  // namespace rocksdb
-
-#endif // ROCKSDB_HDFS_FILE_C
-
-#else // USE_HDFS
-
-// dummy placeholders used when HDFS is not available
-#include "rocksdb/env.h"
-#include "hdfs/env_hdfs.h"
-namespace rocksdb {
- Status HdfsEnv::NewSequentialFile(const std::string& fname,
-                                   unique_ptr<SequentialFile>* result,
-                                   const EnvOptions& options) {
-   return Status::NotSupported("Not compiled with hdfs support");
- }
-}
-
-#endif
diff --git a/src/rocksdb/util/env_posix.cc b/src/rocksdb/util/env_posix.cc
deleted file mode 100644
index 63b9fc2..0000000
--- a/src/rocksdb/util/env_posix.cc
+++ /dev/null
@@ -1,1654 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <deque>
-#include <set>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#ifdef OS_LINUX
-#include <sys/statfs.h>
-#endif
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
-#include <unistd.h>
-#if defined(OS_LINUX)
-#include <linux/fs.h>
-#include <fcntl.h>
-#endif
-#if defined(LEVELDB_PLATFORM_ANDROID)
-#include <sys/stat.h>
-#endif
-#include "rocksdb/env.h"
-#include "rocksdb/slice.h"
-#include "port/port.h"
-#include "util/coding.h"
-#include "util/logging.h"
-#include "util/posix_logger.h"
-#include "util/random.h"
-#include <signal.h>
-
-// Get nano time for mach systems
-#ifdef __MACH__
-#include <mach/clock.h>
-#include <mach/mach.h>
-#endif
-
-#if !defined(TMPFS_MAGIC)
-#define TMPFS_MAGIC 0x01021994
-#endif
-#if !defined(XFS_SUPER_MAGIC)
-#define XFS_SUPER_MAGIC 0x58465342
-#endif
-#if !defined(EXT4_SUPER_MAGIC)
-#define EXT4_SUPER_MAGIC 0xEF53
-#endif
-
-// For non linux platform, the following macros are used only as place
-// holder.
-#ifndef OS_LINUX
-#define POSIX_FADV_NORMAL 0 /* [MC1] no further special treatment */
-#define POSIX_FADV_RANDOM 1 /* [MC1] expect random page refs */
-#define POSIX_FADV_SEQUENTIAL 2 /* [MC1] expect sequential page refs */
-#define POSIX_FADV_WILLNEED 3 /* [MC1] will need these pages */
-#define POSIX_FADV_DONTNEED 4 /* [MC1] dont need these pages */
-#endif
-
-// This is only set from db_stress.cc and for testing only.
-// If non-zero, kill at various points in source code with probability 1/this
-int rocksdb_kill_odds = 0;
-
-namespace rocksdb {
-
-namespace {
-
-// A wrapper for fadvise, if the platform doesn't support fadvise,
-// it will simply return Status::NotSupport.
-int Fadvise(int fd, off_t offset, size_t len, int advice) {
-#ifdef OS_LINUX
-  return posix_fadvise(fd, offset, len, advice);
-#else
-  return 0;  // simply do nothing.
-#endif
-}
-
-// list of pathnames that are locked
-static std::set<std::string> lockedFiles;
-static port::Mutex mutex_lockedFiles;
-
-static Status IOError(const std::string& context, int err_number) {
-  return Status::IOError(context, strerror(err_number));
-}
-
-#ifdef NDEBUG
-// empty in release build
-#define TEST_KILL_RANDOM(rocksdb_kill_odds)
-#else
-
-// Kill the process with probablity 1/odds for testing.
-static void TestKillRandom(int odds, const std::string& srcfile,
-                           int srcline) {
-  time_t curtime = time(nullptr);
-  Random r((uint32_t)curtime);
-
-  assert(odds > 0);
-  bool crash = r.OneIn(odds);
-  if (crash) {
-    fprintf(stdout, "Crashing at %s:%d\n", srcfile.c_str(), srcline);
-    fflush(stdout);
-    kill(getpid(), SIGTERM);
-  }
-}
-
-// To avoid crashing always at some frequently executed codepaths (during
-// kill random test), use this factor to reduce odds
-#define REDUCE_ODDS 2
-#define REDUCE_ODDS2 4
-
-#define TEST_KILL_RANDOM(rocksdb_kill_odds) {   \
-  if (rocksdb_kill_odds > 0) { \
-    TestKillRandom(rocksdb_kill_odds, __FILE__, __LINE__);     \
-  } \
-}
-
-#endif
-
-#if defined(OS_LINUX)
-namespace {
-  static size_t GetUniqueIdFromFile(int fd, char* id, size_t max_size) {
-    if (max_size < kMaxVarint64Length*3) {
-      return 0;
-    }
-
-    struct stat buf;
-    int result = fstat(fd, &buf);
-    if (result == -1) {
-      return 0;
-    }
-
-    long version = 0;
-    result = ioctl(fd, FS_IOC_GETVERSION, &version);
-    if (result == -1) {
-      return 0;
-    }
-    uint64_t uversion = (uint64_t)version;
-
-    char* rid = id;
-    rid = EncodeVarint64(rid, buf.st_dev);
-    rid = EncodeVarint64(rid, buf.st_ino);
-    rid = EncodeVarint64(rid, uversion);
-    assert(rid >= id);
-    return static_cast<size_t>(rid-id);
-  }
-}
-#endif
-
-class PosixSequentialFile: public SequentialFile {
- private:
-  std::string filename_;
-  FILE* file_;
-  int fd_;
-  bool use_os_buffer_;
-
- public:
-  PosixSequentialFile(const std::string& fname, FILE* f,
-      const EnvOptions& options)
-      : filename_(fname), file_(f), fd_(fileno(f)),
-        use_os_buffer_(options.use_os_buffer) {
-  }
-  virtual ~PosixSequentialFile() { fclose(file_); }
-
-  virtual Status Read(size_t n, Slice* result, char* scratch) {
-    Status s;
-    size_t r = 0;
-    do {
-      r = fread_unlocked(scratch, 1, n, file_);
-    } while (r == 0 && ferror(file_) && errno == EINTR);
-    *result = Slice(scratch, r);
-    if (r < n) {
-      if (feof(file_)) {
-        // We leave status as ok if we hit the end of the file
-        // We also clear the error so that the reads can continue
-        // if a new data is written to the file
-        clearerr(file_);
-      } else {
-        // A partial read with an error: return a non-ok status
-        s = IOError(filename_, errno);
-      }
-    }
-    if (!use_os_buffer_) {
-      // we need to fadvise away the entire range of pages because
-      // we do not want readahead pages to be cached.
-      Fadvise(fd_, 0, 0, POSIX_FADV_DONTNEED); // free OS pages
-    }
-    return s;
-  }
-
-  virtual Status Skip(uint64_t n) {
-    if (fseek(file_, n, SEEK_CUR)) {
-      return IOError(filename_, errno);
-    }
-    return Status::OK();
-  }
-
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-#ifndef OS_LINUX
-    return Status::OK();
-#else
-    // free OS pages
-    int ret = Fadvise(fd_, offset, length, POSIX_FADV_DONTNEED);
-    if (ret == 0) {
-      return Status::OK();
-    }
-    return IOError(filename_, errno);
-#endif
-  }
-};
-
-// pread() based random-access
-class PosixRandomAccessFile: public RandomAccessFile {
- private:
-  std::string filename_;
-  int fd_;
-  bool use_os_buffer_;
-
- public:
-  PosixRandomAccessFile(const std::string& fname, int fd,
-                        const EnvOptions& options)
-      : filename_(fname), fd_(fd), use_os_buffer_(options.use_os_buffer) {
-    assert(!options.use_mmap_reads);
-  }
-  virtual ~PosixRandomAccessFile() { close(fd_); }
-
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const {
-    Status s;
-    ssize_t r = -1;
-    do {
-      r = pread(fd_, scratch, n, static_cast<off_t>(offset));
-    } while (r < 0 && errno == EINTR);
-    *result = Slice(scratch, (r < 0) ? 0 : r);
-    if (r < 0) {
-      // An error: return a non-ok status
-      s = IOError(filename_, errno);
-    }
-    if (!use_os_buffer_) {
-      // we need to fadvise away the entire range of pages because
-      // we do not want readahead pages to be cached.
-      Fadvise(fd_, 0, 0, POSIX_FADV_DONTNEED); // free OS pages
-    }
-    return s;
-  }
-
-#ifdef OS_LINUX
-  virtual size_t GetUniqueId(char* id, size_t max_size) const {
-    return GetUniqueIdFromFile(fd_, id, max_size);
-  }
-#endif
-
-  virtual void Hint(AccessPattern pattern) {
-    switch(pattern) {
-      case NORMAL:
-        Fadvise(fd_, 0, 0, POSIX_FADV_NORMAL);
-        break;
-      case RANDOM:
-        Fadvise(fd_, 0, 0, POSIX_FADV_RANDOM);
-        break;
-      case SEQUENTIAL:
-        Fadvise(fd_, 0, 0, POSIX_FADV_SEQUENTIAL);
-        break;
-      case WILLNEED:
-        Fadvise(fd_, 0, 0, POSIX_FADV_WILLNEED);
-        break;
-      case DONTNEED:
-        Fadvise(fd_, 0, 0, POSIX_FADV_DONTNEED);
-        break;
-      default:
-        assert(false);
-        break;
-    }
-  }
-
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-#ifndef OS_LINUX
-    return Status::OK();
-#else
-    // free OS pages
-    int ret = Fadvise(fd_, offset, length, POSIX_FADV_DONTNEED);
-    if (ret == 0) {
-      return Status::OK();
-    }
-    return IOError(filename_, errno);
-#endif
-  }
-};
-
-// mmap() based random-access
-class PosixMmapReadableFile: public RandomAccessFile {
- private:
-  int fd_;
-  std::string filename_;
-  void* mmapped_region_;
-  size_t length_;
-
- public:
-  // base[0,length-1] contains the mmapped contents of the file.
-  PosixMmapReadableFile(const int fd, const std::string& fname,
-                        void* base, size_t length,
-                        const EnvOptions& options)
-      : fd_(fd), filename_(fname), mmapped_region_(base), length_(length) {
-    fd_ = fd_ + 0;  // suppress the warning for used variables
-    assert(options.use_mmap_reads);
-    assert(options.use_os_buffer);
-  }
-  virtual ~PosixMmapReadableFile() {
-    int ret = munmap(mmapped_region_, length_);
-    if (ret != 0) {
-      fprintf(stdout, "failed to munmap %p length %zu \n",
-              mmapped_region_, length_);
-    }
-  }
-
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const {
-    Status s;
-    if (offset + n > length_) {
-      *result = Slice();
-      s = IOError(filename_, EINVAL);
-    } else {
-      *result = Slice(reinterpret_cast<char*>(mmapped_region_) + offset, n);
-    }
-    return s;
-  }
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-#ifndef OS_LINUX
-    return Status::OK();
-#else
-    // free OS pages
-    int ret = Fadvise(fd_, offset, length, POSIX_FADV_DONTNEED);
-    if (ret == 0) {
-      return Status::OK();
-    }
-    return IOError(filename_, errno);
-#endif
-  }
-};
-
-// We preallocate up to an extra megabyte and use memcpy to append new
-// data to the file.  This is safe since we either properly close the
-// file before reading from it, or for log files, the reading code
-// knows enough to skip zero suffixes.
-class PosixMmapFile : public WritableFile {
- private:
-  std::string filename_;
-  int fd_;
-  size_t page_size_;
-  size_t map_size_;       // How much extra memory to map at a time
-  char* base_;            // The mapped region
-  char* limit_;           // Limit of the mapped region
-  char* dst_;             // Where to write next  (in range [base_,limit_])
-  char* last_sync_;       // Where have we synced up to
-  uint64_t file_offset_;  // Offset of base_ in file
-  // Have we done an munmap of unsynced data?
-  bool pending_sync_;
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-  bool fallocate_with_keep_size_;
-#endif
-
-  // Roundup x to a multiple of y
-  static size_t Roundup(size_t x, size_t y) {
-    return ((x + y - 1) / y) * y;
-  }
-
-  size_t TruncateToPageBoundary(size_t s) {
-    s -= (s & (page_size_ - 1));
-    assert((s % page_size_) == 0);
-    return s;
-  }
-
-  bool UnmapCurrentRegion() {
-    bool result = true;
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    if (base_ != nullptr) {
-      if (last_sync_ < limit_) {
-        // Defer syncing this data until next Sync() call, if any
-        pending_sync_ = true;
-      }
-      if (munmap(base_, limit_ - base_) != 0) {
-        result = false;
-      }
-      file_offset_ += limit_ - base_;
-      base_ = nullptr;
-      limit_ = nullptr;
-      last_sync_ = nullptr;
-      dst_ = nullptr;
-
-      // Increase the amount we map the next time, but capped at 1MB
-      if (map_size_ < (1<<20)) {
-        map_size_ *= 2;
-      }
-    }
-    return result;
-  }
-
-  Status MapNewRegion() {
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-    assert(base_ == nullptr);
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    // we can't fallocate with FALLOC_FL_KEEP_SIZE here
-    int alloc_status = fallocate(fd_, 0, file_offset_, map_size_);
-    if (alloc_status != 0) {
-      // fallback to posix_fallocate
-      alloc_status = posix_fallocate(fd_, file_offset_, map_size_);
-    }
-    if (alloc_status != 0) {
-      return Status::IOError("Error allocating space to file : " + filename_ +
-        "Error : " + strerror(alloc_status));
-    }
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    void* ptr = mmap(nullptr, map_size_, PROT_READ | PROT_WRITE, MAP_SHARED,
-                     fd_, file_offset_);
-    if (ptr == MAP_FAILED) {
-      return Status::IOError("MMap failed on " + filename_);
-    }
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-
-    base_ = reinterpret_cast<char*>(ptr);
-    limit_ = base_ + map_size_;
-    dst_ = base_;
-    last_sync_ = base_;
-    return Status::OK();
-#else
-    return Status::NotSupported("This platform doesn't support fallocate()");
-#endif
-  }
-
- public:
-  PosixMmapFile(const std::string& fname, int fd, size_t page_size,
-                const EnvOptions& options)
-      : filename_(fname),
-        fd_(fd),
-        page_size_(page_size),
-        map_size_(Roundup(65536, page_size)),
-        base_(nullptr),
-        limit_(nullptr),
-        dst_(nullptr),
-        last_sync_(nullptr),
-        file_offset_(0),
-        pending_sync_(false) {
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-    fallocate_with_keep_size_ = options.fallocate_with_keep_size;
-#endif
-    assert((page_size & (page_size - 1)) == 0);
-    assert(options.use_mmap_writes);
-  }
-
-
-  ~PosixMmapFile() {
-    if (fd_ >= 0) {
-      PosixMmapFile::Close();
-    }
-  }
-
-  virtual Status Append(const Slice& data) {
-    const char* src = data.data();
-    size_t left = data.size();
-    TEST_KILL_RANDOM(rocksdb_kill_odds * REDUCE_ODDS);
-    PrepareWrite(GetFileSize(), left);
-    while (left > 0) {
-      assert(base_ <= dst_);
-      assert(dst_ <= limit_);
-      size_t avail = limit_ - dst_;
-      if (avail == 0) {
-        if (UnmapCurrentRegion()) {
-          Status s = MapNewRegion();
-          if (!s.ok()) {
-            return s;
-          }
-          TEST_KILL_RANDOM(rocksdb_kill_odds);
-        }
-      }
-
-      size_t n = (left <= avail) ? left : avail;
-      memcpy(dst_, src, n);
-      dst_ += n;
-      src += n;
-      left -= n;
-    }
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    return Status::OK();
-  }
-
-  virtual Status Close() {
-    Status s;
-    size_t unused = limit_ - dst_;
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-
-    if (!UnmapCurrentRegion()) {
-      s = IOError(filename_, errno);
-    } else if (unused > 0) {
-      // Trim the extra space at the end of the file
-      if (ftruncate(fd_, file_offset_ - unused) < 0) {
-        s = IOError(filename_, errno);
-      }
-    }
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-
-    if (close(fd_) < 0) {
-      if (s.ok()) {
-        s = IOError(filename_, errno);
-      }
-    }
-
-    fd_ = -1;
-    base_ = nullptr;
-    limit_ = nullptr;
-    return s;
-  }
-
-  virtual Status Flush() {
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    return Status::OK();
-  }
-
-  virtual Status Sync() {
-    Status s;
-
-    if (pending_sync_) {
-      // Some unmapped data was not synced
-      TEST_KILL_RANDOM(rocksdb_kill_odds);
-      pending_sync_ = false;
-      if (fdatasync(fd_) < 0) {
-        s = IOError(filename_, errno);
-      }
-      TEST_KILL_RANDOM(rocksdb_kill_odds * REDUCE_ODDS);
-    }
-
-    if (dst_ > last_sync_) {
-      // Find the beginnings of the pages that contain the first and last
-      // bytes to be synced.
-      size_t p1 = TruncateToPageBoundary(last_sync_ - base_);
-      size_t p2 = TruncateToPageBoundary(dst_ - base_ - 1);
-      last_sync_ = dst_;
-      TEST_KILL_RANDOM(rocksdb_kill_odds);
-      if (msync(base_ + p1, p2 - p1 + page_size_, MS_SYNC) < 0) {
-        s = IOError(filename_, errno);
-      }
-      TEST_KILL_RANDOM(rocksdb_kill_odds);
-    }
-
-    return s;
-  }
-
-  /**
-   * Flush data as well as metadata to stable storage.
-   */
-  virtual Status Fsync() {
-    if (pending_sync_) {
-      // Some unmapped data was not synced
-      TEST_KILL_RANDOM(rocksdb_kill_odds);
-      pending_sync_ = false;
-      if (fsync(fd_) < 0) {
-        return IOError(filename_, errno);
-      }
-      TEST_KILL_RANDOM(rocksdb_kill_odds);
-    }
-    // This invocation to Sync will not issue the call to
-    // fdatasync because pending_sync_ has already been cleared.
-    return Sync();
-  }
-
-  /**
-   * Get the size of valid data in the file. This will not match the
-   * size that is returned from the filesystem because we use mmap
-   * to extend file by map_size every time.
-   */
-  virtual uint64_t GetFileSize() {
-    size_t used = dst_ - base_;
-    return file_offset_ + used;
-  }
-
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-#ifndef OS_LINUX
-    return Status::OK();
-#else
-    // free OS pages
-    int ret = Fadvise(fd_, offset, length, POSIX_FADV_DONTNEED);
-    if (ret == 0) {
-      return Status::OK();
-    }
-    return IOError(filename_, errno);
-#endif
-  }
-
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-  virtual Status Allocate(off_t offset, off_t len) {
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    int alloc_status = fallocate(
-        fd_, fallocate_with_keep_size_ ? FALLOC_FL_KEEP_SIZE : 0, offset, len);
-    if (alloc_status == 0) {
-      return Status::OK();
-    } else {
-      return IOError(filename_, errno);
-    }
-  }
-#endif
-};
-
-// Use posix write to write data to a file.
-class PosixWritableFile : public WritableFile {
- private:
-  const std::string filename_;
-  int fd_;
-  size_t cursize_;      // current size of cached data in buf_
-  size_t capacity_;     // max size of buf_
-  unique_ptr<char[]> buf_;           // a buffer to cache writes
-  uint64_t filesize_;
-  bool pending_sync_;
-  bool pending_fsync_;
-  uint64_t last_sync_size_;
-  uint64_t bytes_per_sync_;
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-  bool fallocate_with_keep_size_;
-#endif
-
- public:
-  PosixWritableFile(const std::string& fname, int fd, size_t capacity,
-                    const EnvOptions& options)
-      : filename_(fname),
-        fd_(fd),
-        cursize_(0),
-        capacity_(capacity),
-        buf_(new char[capacity]),
-        filesize_(0),
-        pending_sync_(false),
-        pending_fsync_(false),
-        last_sync_size_(0),
-        bytes_per_sync_(options.bytes_per_sync) {
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-    fallocate_with_keep_size_ = options.fallocate_with_keep_size;
-#endif
-    assert(!options.use_mmap_writes);
-  }
-
-  ~PosixWritableFile() {
-    if (fd_ >= 0) {
-      PosixWritableFile::Close();
-    }
-  }
-
-  virtual Status Append(const Slice& data) {
-    const char* src = data.data();
-    size_t left = data.size();
-    Status s;
-    pending_sync_ = true;
-    pending_fsync_ = true;
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds * REDUCE_ODDS2);
-
-    PrepareWrite(GetFileSize(), left);
-    // if there is no space in the cache, then flush
-    if (cursize_ + left > capacity_) {
-      s = Flush();
-      if (!s.ok()) {
-        return s;
-      }
-      // Increase the buffer size, but capped at 1MB
-      if (capacity_ < (1<<20)) {
-        capacity_ *= 2;
-        buf_.reset(new char[capacity_]);
-      }
-      assert(cursize_ == 0);
-    }
-
-    // if the write fits into the cache, then write to cache
-    // otherwise do a write() syscall to write to OS buffers.
-    if (cursize_ + left <= capacity_) {
-      memcpy(buf_.get()+cursize_, src, left);
-      cursize_ += left;
-    } else {
-      while (left != 0) {
-        ssize_t done = write(fd_, src, left);
-        if (done < 0) {
-          if (errno == EINTR) {
-            continue;
-          }
-          return IOError(filename_, errno);
-        }
-        TEST_KILL_RANDOM(rocksdb_kill_odds);
-
-        left -= done;
-        src += done;
-      }
-    }
-    filesize_ += data.size();
-    return Status::OK();
-  }
-
-  virtual Status Close() {
-    Status s;
-    s = Flush(); // flush cache to OS
-    if (!s.ok()) {
-      return s;
-    }
-
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-
-    size_t block_size;
-    size_t last_allocated_block;
-    GetPreallocationStatus(&block_size, &last_allocated_block);
-    if (last_allocated_block > 0) {
-      // trim the extra space preallocated at the end of the file
-      int dummy __attribute__((unused));
-      dummy = ftruncate(fd_, filesize_);  // ignore errors
-    }
-
-    if (close(fd_) < 0) {
-      if (s.ok()) {
-        s = IOError(filename_, errno);
-      }
-    }
-    fd_ = -1;
-    return s;
-  }
-
-  // write out the cached data to the OS cache
-  virtual Status Flush() {
-    TEST_KILL_RANDOM(rocksdb_kill_odds * REDUCE_ODDS2);
-    size_t left = cursize_;
-    char* src = buf_.get();
-    while (left != 0) {
-      ssize_t done = write(fd_, src, left);
-      if (done < 0) {
-        if (errno == EINTR) {
-          continue;
-        }
-        return IOError(filename_, errno);
-      }
-      TEST_KILL_RANDOM(rocksdb_kill_odds * REDUCE_ODDS2);
-      left -= done;
-      src += done;
-    }
-    cursize_ = 0;
-
-    // sync OS cache to disk for every bytes_per_sync_
-    // TODO: give log file and sst file different options (log
-    // files could be potentially cached in OS for their whole
-    // life time, thus we might not want to flush at all).
-    if (bytes_per_sync_ &&
-        filesize_ - last_sync_size_ >= bytes_per_sync_) {
-      RangeSync(last_sync_size_, filesize_ - last_sync_size_);
-      last_sync_size_ = filesize_;
-    }
-
-    return Status::OK();
-  }
-
-  virtual Status Sync() {
-    Status s = Flush();
-    if (!s.ok()) {
-      return s;
-    }
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    if (pending_sync_ && fdatasync(fd_) < 0) {
-      return IOError(filename_, errno);
-    }
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    pending_sync_ = false;
-    return Status::OK();
-  }
-
-  virtual Status Fsync() {
-    Status s = Flush();
-    if (!s.ok()) {
-      return s;
-    }
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    if (pending_fsync_ && fsync(fd_) < 0) {
-      return IOError(filename_, errno);
-    }
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    pending_fsync_ = false;
-    pending_sync_ = false;
-    return Status::OK();
-  }
-
-  virtual uint64_t GetFileSize() {
-    return filesize_;
-  }
-
-  virtual Status InvalidateCache(size_t offset, size_t length) {
-#ifndef OS_LINUX
-    return Status::OK();
-#else
-    // free OS pages
-    int ret = Fadvise(fd_, offset, length, POSIX_FADV_DONTNEED);
-    if (ret == 0) {
-      return Status::OK();
-    }
-    return IOError(filename_, errno);
-#endif
-  }
-
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-  virtual Status Allocate(off_t offset, off_t len) {
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    int alloc_status = fallocate(
-        fd_, fallocate_with_keep_size_ ? FALLOC_FL_KEEP_SIZE : 0, offset, len);
-    if (alloc_status == 0) {
-      return Status::OK();
-    } else {
-      return IOError(filename_, errno);
-    }
-  }
-
-  virtual Status RangeSync(off_t offset, off_t nbytes) {
-    if (sync_file_range(fd_, offset, nbytes, SYNC_FILE_RANGE_WRITE) == 0) {
-      return Status::OK();
-    } else {
-      return IOError(filename_, errno);
-    }
-  }
-  virtual size_t GetUniqueId(char* id, size_t max_size) const {
-    return GetUniqueIdFromFile(fd_, id, max_size);
-  }
-#endif
-};
-
-class PosixRandomRWFile : public RandomRWFile {
- private:
-  const std::string filename_;
-  int fd_;
-  bool pending_sync_;
-  bool pending_fsync_;
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-  bool fallocate_with_keep_size_;
-#endif
-
- public:
-  PosixRandomRWFile(const std::string& fname, int fd, const EnvOptions& options)
-      : filename_(fname),
-        fd_(fd),
-        pending_sync_(false),
-        pending_fsync_(false) {
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-    fallocate_with_keep_size_ = options.fallocate_with_keep_size;
-#endif
-    assert(!options.use_mmap_writes && !options.use_mmap_reads);
-  }
-
-  ~PosixRandomRWFile() {
-    if (fd_ >= 0) {
-      Close();
-    }
-  }
-
-  virtual Status Write(uint64_t offset, const Slice& data) {
-    const char* src = data.data();
-    size_t left = data.size();
-    Status s;
-    pending_sync_ = true;
-    pending_fsync_ = true;
-
-    while (left != 0) {
-      ssize_t done = pwrite(fd_, src, left, offset);
-      if (done < 0) {
-        if (errno == EINTR) {
-          continue;
-        }
-        return IOError(filename_, errno);
-      }
-
-      left -= done;
-      src += done;
-      offset += done;
-    }
-
-    return Status::OK();
-  }
-
-  virtual Status Read(uint64_t offset, size_t n, Slice* result,
-                      char* scratch) const {
-    Status s;
-    ssize_t r = pread(fd_, scratch, n, static_cast<off_t>(offset));
-    *result = Slice(scratch, (r < 0) ? 0 : r);
-    if (r < 0) {
-      s = IOError(filename_, errno);
-    }
-    return s;
-  }
-
-  virtual Status Close() {
-    Status s = Status::OK();
-    if (fd_ >= 0 && close(fd_) < 0) {
-      s = IOError(filename_, errno);
-    }
-    fd_ = -1;
-    return s;
-  }
-
-  virtual Status Sync() {
-    if (pending_sync_ && fdatasync(fd_) < 0) {
-      return IOError(filename_, errno);
-    }
-    pending_sync_ = false;
-    return Status::OK();
-  }
-
-  virtual Status Fsync() {
-    if (pending_fsync_ && fsync(fd_) < 0) {
-      return IOError(filename_, errno);
-    }
-    pending_fsync_ = false;
-    pending_sync_ = false;
-    return Status::OK();
-  }
-
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-  virtual Status Allocate(off_t offset, off_t len) {
-    TEST_KILL_RANDOM(rocksdb_kill_odds);
-    int alloc_status = fallocate(
-        fd_, fallocate_with_keep_size_ ? FALLOC_FL_KEEP_SIZE : 0, offset, len);
-    if (alloc_status == 0) {
-      return Status::OK();
-    } else {
-      return IOError(filename_, errno);
-    }
-  }
-#endif
-};
-
-class PosixDirectory : public Directory {
- public:
-  explicit PosixDirectory(int fd) : fd_(fd) {}
-  ~PosixDirectory() {
-    close(fd_);
-  }
-
-  virtual Status Fsync() {
-    if (fsync(fd_) == -1) {
-      return IOError("directory", errno);
-    }
-    return Status::OK();
-  }
-
- private:
-  int fd_;
-};
-
-static int LockOrUnlock(const std::string& fname, int fd, bool lock) {
-  mutex_lockedFiles.Lock();
-  if (lock) {
-    // If it already exists in the lockedFiles set, then it is already locked,
-    // and fail this lock attempt. Otherwise, insert it into lockedFiles.
-    // This check is needed because fcntl() does not detect lock conflict
-    // if the fcntl is issued by the same thread that earlier acquired
-    // this lock.
-    if (lockedFiles.insert(fname).second == false) {
-      mutex_lockedFiles.Unlock();
-      errno = ENOLCK;
-      return -1;
-    }
-  } else {
-    // If we are unlocking, then verify that we had locked it earlier,
-    // it should already exist in lockedFiles. Remove it from lockedFiles.
-    if (lockedFiles.erase(fname) != 1) {
-      mutex_lockedFiles.Unlock();
-      errno = ENOLCK;
-      return -1;
-    }
-  }
-  errno = 0;
-  struct flock f;
-  memset(&f, 0, sizeof(f));
-  f.l_type = (lock ? F_WRLCK : F_UNLCK);
-  f.l_whence = SEEK_SET;
-  f.l_start = 0;
-  f.l_len = 0;        // Lock/unlock entire file
-  int value = fcntl(fd, F_SETLK, &f);
-  if (value == -1 && lock) {
-    // if there is an error in locking, then remove the pathname from lockedfiles
-    lockedFiles.erase(fname);
-  }
-  mutex_lockedFiles.Unlock();
-  return value;
-}
-
-class PosixFileLock : public FileLock {
- public:
-  int fd_;
-  std::string filename;
-};
-
-
-namespace {
-void PthreadCall(const char* label, int result) {
-  if (result != 0) {
-    fprintf(stderr, "pthread %s: %s\n", label, strerror(result));
-    exit(1);
-  }
-}
-}
-
-class PosixEnv : public Env {
- public:
-  PosixEnv();
-
-  virtual ~PosixEnv(){
-    for (const auto tid : threads_to_join_) {
-      pthread_join(tid, nullptr);
-    }
-  }
-
-  void SetFD_CLOEXEC(int fd, const EnvOptions* options) {
-    if ((options == nullptr || options->set_fd_cloexec) && fd > 0) {
-      fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
-    }
-  }
-
-  virtual Status NewSequentialFile(const std::string& fname,
-                                   unique_ptr<SequentialFile>* result,
-                                   const EnvOptions& options) {
-    result->reset();
-    FILE* f = nullptr;
-    do {
-      f = fopen(fname.c_str(), "r");
-    } while (f == nullptr && errno == EINTR);
-    if (f == nullptr) {
-      *result = nullptr;
-      return IOError(fname, errno);
-    } else {
-      int fd = fileno(f);
-      SetFD_CLOEXEC(fd, &options);
-      result->reset(new PosixSequentialFile(fname, f, options));
-      return Status::OK();
-    }
-  }
-
-  virtual Status NewRandomAccessFile(const std::string& fname,
-                                     unique_ptr<RandomAccessFile>* result,
-                                     const EnvOptions& options) {
-    result->reset();
-    Status s;
-    int fd = open(fname.c_str(), O_RDONLY);
-    SetFD_CLOEXEC(fd, &options);
-    if (fd < 0) {
-      s = IOError(fname, errno);
-    } else if (options.use_mmap_reads && sizeof(void*) >= 8) {
-      // Use of mmap for random reads has been removed because it
-      // kills performance when storage is fast.
-      // Use mmap when virtual address-space is plentiful.
-      uint64_t size;
-      s = GetFileSize(fname, &size);
-      if (s.ok()) {
-        void* base = mmap(nullptr, size, PROT_READ, MAP_SHARED, fd, 0);
-        if (base != MAP_FAILED) {
-          result->reset(new PosixMmapReadableFile(fd, fname, base,
-                                                  size, options));
-        } else {
-          s = IOError(fname, errno);
-        }
-      }
-      close(fd);
-    } else {
-      result->reset(new PosixRandomAccessFile(fname, fd, options));
-    }
-    return s;
-  }
-
-  virtual Status NewWritableFile(const std::string& fname,
-                                 unique_ptr<WritableFile>* result,
-                                 const EnvOptions& options) {
-    result->reset();
-    Status s;
-    int fd = -1;
-    do {
-      fd = open(fname.c_str(), O_CREAT | O_RDWR | O_TRUNC, 0644);
-    } while (fd < 0 && errno == EINTR);
-    if (fd < 0) {
-      s = IOError(fname, errno);
-    } else {
-      SetFD_CLOEXEC(fd, &options);
-      if (options.use_mmap_writes) {
-        if (!checkedDiskForMmap_) {
-          // this will be executed once in the program's lifetime.
-          // do not use mmapWrite on non ext-3/xfs/tmpfs systems.
-          if (!SupportsFastAllocate(fname)) {
-            forceMmapOff = true;
-          }
-          checkedDiskForMmap_ = true;
-        }
-      }
-      if (options.use_mmap_writes && !forceMmapOff) {
-        result->reset(new PosixMmapFile(fname, fd, page_size_, options));
-      } else {
-        // disable mmap writes
-        EnvOptions no_mmap_writes_options = options;
-        no_mmap_writes_options.use_mmap_writes = false;
-
-        result->reset(
-            new PosixWritableFile(fname, fd, 65536, no_mmap_writes_options)
-        );
-      }
-    }
-    return s;
-  }
-
-  virtual Status NewRandomRWFile(const std::string& fname,
-                                 unique_ptr<RandomRWFile>* result,
-                                 const EnvOptions& options) {
-    result->reset();
-    // no support for mmap yet
-    if (options.use_mmap_writes || options.use_mmap_reads) {
-      return Status::NotSupported("No support for mmap read/write yet");
-    }
-    Status s;
-    const int fd = open(fname.c_str(), O_CREAT | O_RDWR, 0644);
-    if (fd < 0) {
-      s = IOError(fname, errno);
-    } else {
-      SetFD_CLOEXEC(fd, &options);
-      result->reset(new PosixRandomRWFile(fname, fd, options));
-    }
-    return s;
-  }
-
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result) {
-    result->reset();
-    const int fd = open(name.c_str(), 0);
-    if (fd < 0) {
-      return IOError(name, errno);
-    } else {
-      result->reset(new PosixDirectory(fd));
-    }
-    return Status::OK();
-  }
-
-  virtual bool FileExists(const std::string& fname) {
-    return access(fname.c_str(), F_OK) == 0;
-  }
-
-  virtual Status GetChildren(const std::string& dir,
-                             std::vector<std::string>* result) {
-    result->clear();
-    DIR* d = opendir(dir.c_str());
-    if (d == nullptr) {
-      return IOError(dir, errno);
-    }
-    struct dirent* entry;
-    while ((entry = readdir(d)) != nullptr) {
-      result->push_back(entry->d_name);
-    }
-    closedir(d);
-    return Status::OK();
-  }
-
-  virtual Status DeleteFile(const std::string& fname) {
-    Status result;
-    if (unlink(fname.c_str()) != 0) {
-      result = IOError(fname, errno);
-    }
-    return result;
-  };
-
-  virtual Status CreateDir(const std::string& name) {
-    Status result;
-    if (mkdir(name.c_str(), 0755) != 0) {
-      result = IOError(name, errno);
-    }
-    return result;
-  };
-
-  virtual Status CreateDirIfMissing(const std::string& name) {
-    Status result;
-    if (mkdir(name.c_str(), 0755) != 0) {
-      if (errno != EEXIST) {
-        result = IOError(name, errno);
-      } else if (!DirExists(name)) { // Check that name is actually a
-                                     // directory.
-        // Message is taken from mkdir
-        result = Status::IOError("`"+name+"' exists but is not a directory");
-      }
-    }
-    return result;
-  };
-
-  virtual Status DeleteDir(const std::string& name) {
-    Status result;
-    if (rmdir(name.c_str()) != 0) {
-      result = IOError(name, errno);
-    }
-    return result;
-  };
-
-  virtual Status GetFileSize(const std::string& fname, uint64_t* size) {
-    Status s;
-    struct stat sbuf;
-    if (stat(fname.c_str(), &sbuf) != 0) {
-      *size = 0;
-      s = IOError(fname, errno);
-    } else {
-      *size = sbuf.st_size;
-    }
-    return s;
-  }
-
-  virtual Status GetFileModificationTime(const std::string& fname,
-                                         uint64_t* file_mtime) {
-    struct stat s;
-    if (stat(fname.c_str(), &s) !=0) {
-      return IOError(fname, errno);
-    }
-    *file_mtime = static_cast<uint64_t>(s.st_mtime);
-    return Status::OK();
-  }
-  virtual Status RenameFile(const std::string& src, const std::string& target) {
-    Status result;
-    if (rename(src.c_str(), target.c_str()) != 0) {
-      result = IOError(src, errno);
-    }
-    return result;
-  }
-
-  virtual Status LockFile(const std::string& fname, FileLock** lock) {
-    *lock = nullptr;
-    Status result;
-    int fd = open(fname.c_str(), O_RDWR | O_CREAT, 0644);
-    if (fd < 0) {
-      result = IOError(fname, errno);
-    } else if (LockOrUnlock(fname, fd, true) == -1) {
-      result = IOError("lock " + fname, errno);
-      close(fd);
-    } else {
-      SetFD_CLOEXEC(fd, nullptr);
-      PosixFileLock* my_lock = new PosixFileLock;
-      my_lock->fd_ = fd;
-      my_lock->filename = fname;
-      *lock = my_lock;
-    }
-    return result;
-  }
-
-  virtual Status UnlockFile(FileLock* lock) {
-    PosixFileLock* my_lock = reinterpret_cast<PosixFileLock*>(lock);
-    Status result;
-    if (LockOrUnlock(my_lock->filename, my_lock->fd_, false) == -1) {
-      result = IOError("unlock", errno);
-    }
-    close(my_lock->fd_);
-    delete my_lock;
-    return result;
-  }
-
-  virtual void Schedule(void (*function)(void*), void* arg, Priority pri = LOW);
-
-  virtual void StartThread(void (*function)(void* arg), void* arg);
-
-  virtual void WaitForJoin();
-
-  virtual unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const override;
-
-  virtual Status GetTestDirectory(std::string* result) {
-    const char* env = getenv("TEST_TMPDIR");
-    if (env && env[0] != '\0') {
-      *result = env;
-    } else {
-      char buf[100];
-      snprintf(buf, sizeof(buf), "/tmp/rocksdbtest-%d", int(geteuid()));
-      *result = buf;
-    }
-    // Directory may already exist
-    CreateDir(*result);
-    return Status::OK();
-  }
-
-  static uint64_t gettid() {
-    pthread_t tid = pthread_self();
-    uint64_t thread_id = 0;
-    memcpy(&thread_id, &tid, std::min(sizeof(thread_id), sizeof(tid)));
-    return thread_id;
-  }
-
-  virtual Status NewLogger(const std::string& fname,
-                           shared_ptr<Logger>* result) {
-    FILE* f = fopen(fname.c_str(), "w");
-    if (f == nullptr) {
-      result->reset();
-      return IOError(fname, errno);
-    } else {
-      int fd = fileno(f);
-      SetFD_CLOEXEC(fd, nullptr);
-      result->reset(new PosixLogger(f, &PosixEnv::gettid, this));
-      return Status::OK();
-    }
-  }
-
-  virtual uint64_t NowMicros() {
-    struct timeval tv;
-    // TODO(kailiu) MAC DON'T HAVE THIS
-    gettimeofday(&tv, nullptr);
-    return static_cast<uint64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
-  }
-
-  virtual uint64_t NowNanos() {
-#ifdef OS_LINUX
-    struct timespec ts;
-    clock_gettime(CLOCK_MONOTONIC, &ts);
-    return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
-#elif __MACH__
-    clock_serv_t cclock;
-    mach_timespec_t ts;
-    host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-    clock_get_time(cclock, &ts);
-    mach_port_deallocate(mach_task_self(), cclock);
-#endif
-    return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
-  }
-
-  virtual void SleepForMicroseconds(int micros) {
-    usleep(micros);
-  }
-
-  virtual Status GetHostName(char* name, uint64_t len) {
-    int ret = gethostname(name, len);
-    if (ret < 0) {
-      if (errno == EFAULT || errno == EINVAL)
-        return Status::InvalidArgument(strerror(errno));
-      else
-        return IOError("GetHostName", errno);
-    }
-    return Status::OK();
-  }
-
-  virtual Status GetCurrentTime(int64_t* unix_time) {
-    time_t ret = time(nullptr);
-    if (ret == (time_t) -1) {
-      return IOError("GetCurrentTime", errno);
-    }
-    *unix_time = (int64_t) ret;
-    return Status::OK();
-  }
-
-  virtual Status GetAbsolutePath(const std::string& db_path,
-      std::string* output_path) {
-    if (db_path.find('/') == 0) {
-      *output_path = db_path;
-      return Status::OK();
-    }
-
-    char the_path[256];
-    char* ret = getcwd(the_path, 256);
-    if (ret == nullptr) {
-      return Status::IOError(strerror(errno));
-    }
-
-    *output_path = ret;
-    return Status::OK();
-  }
-
-  // Allow increasing the number of worker threads.
-  virtual void SetBackgroundThreads(int num, Priority pri) {
-    assert(pri >= Priority::LOW && pri <= Priority::HIGH);
-    thread_pools_[pri].SetBackgroundThreads(num);
-  }
-
-  virtual std::string TimeToString(uint64_t secondsSince1970) {
-    const time_t seconds = (time_t)secondsSince1970;
-    struct tm t;
-    int maxsize = 64;
-    std::string dummy;
-    dummy.reserve(maxsize);
-    dummy.resize(maxsize);
-    char* p = &dummy[0];
-    localtime_r(&seconds, &t);
-    snprintf(p, maxsize,
-             "%04d/%02d/%02d-%02d:%02d:%02d ",
-             t.tm_year + 1900,
-             t.tm_mon + 1,
-             t.tm_mday,
-             t.tm_hour,
-             t.tm_min,
-             t.tm_sec);
-    return dummy;
-  }
-
-  EnvOptions OptimizeForLogWrite(const EnvOptions& env_options) const {
-    EnvOptions optimized = env_options;
-    optimized.use_mmap_writes = false;
-    // TODO(icanadi) it's faster if fallocate_with_keep_size is false, but it
-    // breaks TransactionLogIteratorStallAtLastRecord unit test. Fix the unit
-    // test and make this false
-    optimized.fallocate_with_keep_size = true;
-    return optimized;
-  }
-
-  EnvOptions OptimizeForManifestWrite(const EnvOptions& env_options) const {
-    EnvOptions optimized = env_options;
-    optimized.use_mmap_writes = false;
-    optimized.fallocate_with_keep_size = true;
-    return optimized;
-  }
-
- private:
-  bool checkedDiskForMmap_;
-  bool forceMmapOff; // do we override Env options?
-
-
-  // Returns true iff the named directory exists and is a directory.
-  virtual bool DirExists(const std::string& dname) {
-    struct stat statbuf;
-    if (stat(dname.c_str(), &statbuf) == 0) {
-      return S_ISDIR(statbuf.st_mode);
-    }
-    return false; // stat() failed return false
-  }
-
-  bool SupportsFastAllocate(const std::string& path) {
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-    struct statfs s;
-    if (statfs(path.c_str(), &s)){
-      return false;
-    }
-    switch (s.f_type) {
-      case EXT4_SUPER_MAGIC:
-        return true;
-      case XFS_SUPER_MAGIC:
-        return true;
-      case TMPFS_MAGIC:
-        return true;
-      default:
-        return false;
-    }
-#else
-    return false;
-#endif
-  }
-
-  size_t page_size_;
-
-
-  class ThreadPool {
-   public:
-    ThreadPool()
-        : total_threads_limit_(1),
-          bgthreads_(0),
-          queue_(),
-          queue_len_(0),
-          exit_all_threads_(false) {
-      PthreadCall("mutex_init", pthread_mutex_init(&mu_, nullptr));
-      PthreadCall("cvar_init", pthread_cond_init(&bgsignal_, nullptr));
-    }
-
-    ~ThreadPool() {
-      PthreadCall("lock", pthread_mutex_lock(&mu_));
-      assert(!exit_all_threads_);
-      exit_all_threads_ = true;
-      PthreadCall("signalall", pthread_cond_broadcast(&bgsignal_));
-      PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-      for (const auto tid : bgthreads_) {
-        pthread_join(tid, nullptr);
-      }
-    }
-
-    void BGThread() {
-      while (true) {
-        // Wait until there is an item that is ready to run
-        PthreadCall("lock", pthread_mutex_lock(&mu_));
-        while (queue_.empty() && !exit_all_threads_) {
-          PthreadCall("wait", pthread_cond_wait(&bgsignal_, &mu_));
-        }
-        if (exit_all_threads_) { // mechanism to let BG threads exit safely
-          PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-          break;
-        }
-        void (*function)(void*) = queue_.front().function;
-        void* arg = queue_.front().arg;
-        queue_.pop_front();
-        queue_len_.store(queue_.size(), std::memory_order_relaxed);
-
-        PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-        (*function)(arg);
-      }
-    }
-
-    static void* BGThreadWrapper(void* arg) {
-      reinterpret_cast<ThreadPool*>(arg)->BGThread();
-      return nullptr;
-    }
-
-    void SetBackgroundThreads(int num) {
-      PthreadCall("lock", pthread_mutex_lock(&mu_));
-      if (num > total_threads_limit_) {
-        total_threads_limit_ = num;
-      }
-      assert(total_threads_limit_ > 0);
-      PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-    }
-
-    void Schedule(void (*function)(void*), void* arg) {
-      PthreadCall("lock", pthread_mutex_lock(&mu_));
-
-      if (exit_all_threads_) {
-        PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-        return;
-      }
-      // Start background thread if necessary
-      while ((int)bgthreads_.size() < total_threads_limit_) {
-        pthread_t t;
-        PthreadCall(
-          "create thread",
-          pthread_create(&t,
-                         nullptr,
-                         &ThreadPool::BGThreadWrapper,
-                         this));
-
-        // Set the thread name to aid debugging
-#if defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
-#if __GLIBC_PREREQ(2, 12)
-        char name_buf[16];
-        snprintf(name_buf, sizeof name_buf, "rocksdb:bg%zu", bgthreads_.size());
-        name_buf[sizeof name_buf - 1] = '\0';
-        pthread_setname_np(t, name_buf);
-#endif
-#endif
-
-        bgthreads_.push_back(t);
-      }
-
-      // Add to priority queue
-      queue_.push_back(BGItem());
-      queue_.back().function = function;
-      queue_.back().arg = arg;
-      queue_len_.store(queue_.size(), std::memory_order_relaxed);
-
-      // always wake up at least one waiting thread.
-      PthreadCall("signal", pthread_cond_signal(&bgsignal_));
-
-      PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-    }
-
-    unsigned int GetQueueLen() const {
-      return queue_len_.load(std::memory_order_relaxed);
-    }
-
-   private:
-    // Entry per Schedule() call
-    struct BGItem { void* arg; void (*function)(void*); };
-    typedef std::deque<BGItem> BGQueue;
-
-    pthread_mutex_t mu_;
-    pthread_cond_t bgsignal_;
-    int total_threads_limit_;
-    std::vector<pthread_t> bgthreads_;
-    BGQueue queue_;
-    std::atomic_uint queue_len_;  // Queue length. Used for stats reporting
-    bool exit_all_threads_;
-  };
-
-  std::vector<ThreadPool> thread_pools_;
-
-  pthread_mutex_t mu_;
-  std::vector<pthread_t> threads_to_join_;
-
-};
-
-PosixEnv::PosixEnv() : checkedDiskForMmap_(false),
-                       forceMmapOff(false),
-                       page_size_(getpagesize()),
-                       thread_pools_(Priority::TOTAL) {
-  PthreadCall("mutex_init", pthread_mutex_init(&mu_, nullptr));
-}
-
-void PosixEnv::Schedule(void (*function)(void*), void* arg, Priority pri) {
-  assert(pri >= Priority::LOW && pri <= Priority::HIGH);
-  thread_pools_[pri].Schedule(function, arg);
-}
-
-unsigned int PosixEnv::GetThreadPoolQueueLen(Priority pri) const {
-  assert(pri >= Priority::LOW && pri <= Priority::HIGH);
-  return thread_pools_[pri].GetQueueLen();
-}
-
-namespace {
-struct StartThreadState {
-  void (*user_function)(void*);
-  void* arg;
-};
-}
-static void* StartThreadWrapper(void* arg) {
-  StartThreadState* state = reinterpret_cast<StartThreadState*>(arg);
-  state->user_function(state->arg);
-  delete state;
-  return nullptr;
-}
-
-void PosixEnv::StartThread(void (*function)(void* arg), void* arg) {
-  pthread_t t;
-  StartThreadState* state = new StartThreadState;
-  state->user_function = function;
-  state->arg = arg;
-  PthreadCall("start thread",
-              pthread_create(&t, nullptr,  &StartThreadWrapper, state));
-  PthreadCall("lock", pthread_mutex_lock(&mu_));
-  threads_to_join_.push_back(t);
-  PthreadCall("unlock", pthread_mutex_unlock(&mu_));
-}
-
-void PosixEnv::WaitForJoin() {
-  for (const auto tid : threads_to_join_) {
-    pthread_join(tid, nullptr);
-  }
-  threads_to_join_.clear();
-}
-
-}  // namespace
-
-std::string Env::GenerateUniqueId() {
-  std::string uuid_file = "/proc/sys/kernel/random/uuid";
-  if (FileExists(uuid_file)) {
-    std::string uuid;
-    Status s = ReadFileToString(this, uuid_file, &uuid);
-    if (s.ok()) {
-      return uuid;
-    }
-  }
-  // Could not read uuid_file - generate uuid using "nanos-random"
-  Random64 r(time(nullptr));
-  uint64_t random_uuid_portion =
-    r.Uniform(std::numeric_limits<uint64_t>::max());
-  uint64_t nanos_uuid_portion = NowNanos();
-  char uuid2[200];
-  snprintf(uuid2,
-           200,
-           "%lx-%lx",
-           (unsigned long)nanos_uuid_portion,
-           (unsigned long)random_uuid_portion);
-  return uuid2;
-}
-
-Env* Env::Default() {
-  static PosixEnv default_env;
-  return &default_env;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/env_test.cc b/src/rocksdb/util/env_test.cc
deleted file mode 100644
index 1ac3773..0000000
--- a/src/rocksdb/util/env_test.cc
+++ /dev/null
@@ -1,550 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <sys/types.h>
-
-#include <iostream>
-#include <unordered_set>
-
-#ifdef OS_LINUX
-#include <sys/stat.h>
-#include <unistd.h>
-#endif
-
-#include "rocksdb/env.h"
-#include "port/port.h"
-#include "util/coding.h"
-#include "util/log_buffer.h"
-#include "util/mutexlock.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-static const int kDelayMicros = 100000;
-
-class EnvPosixTest {
- private:
-  port::Mutex mu_;
-  std::string events_;
-
- public:
-  Env* env_;
-  EnvPosixTest() : env_(Env::Default()) { }
-};
-
-static void SetBool(void* ptr) {
-  reinterpret_cast<port::AtomicPointer*>(ptr)->NoBarrier_Store(ptr);
-}
-
-TEST(EnvPosixTest, RunImmediately) {
-  port::AtomicPointer called (nullptr);
-  env_->Schedule(&SetBool, &called);
-  Env::Default()->SleepForMicroseconds(kDelayMicros);
-  ASSERT_TRUE(called.NoBarrier_Load() != nullptr);
-}
-
-TEST(EnvPosixTest, RunMany) {
-  port::AtomicPointer last_id (nullptr);
-
-  struct CB {
-    port::AtomicPointer* last_id_ptr;   // Pointer to shared slot
-    uintptr_t id;             // Order# for the execution of this callback
-
-    CB(port::AtomicPointer* p, int i) : last_id_ptr(p), id(i) { }
-
-    static void Run(void* v) {
-      CB* cb = reinterpret_cast<CB*>(v);
-      void* cur = cb->last_id_ptr->NoBarrier_Load();
-      ASSERT_EQ(cb->id-1, reinterpret_cast<uintptr_t>(cur));
-      cb->last_id_ptr->Release_Store(reinterpret_cast<void*>(cb->id));
-    }
-  };
-
-  // Schedule in different order than start time
-  CB cb1(&last_id, 1);
-  CB cb2(&last_id, 2);
-  CB cb3(&last_id, 3);
-  CB cb4(&last_id, 4);
-  env_->Schedule(&CB::Run, &cb1);
-  env_->Schedule(&CB::Run, &cb2);
-  env_->Schedule(&CB::Run, &cb3);
-  env_->Schedule(&CB::Run, &cb4);
-
-  Env::Default()->SleepForMicroseconds(kDelayMicros);
-  void* cur = last_id.Acquire_Load();
-  ASSERT_EQ(4U, reinterpret_cast<uintptr_t>(cur));
-}
-
-struct State {
-  port::Mutex mu;
-  int val;
-  int num_running;
-};
-
-static void ThreadBody(void* arg) {
-  State* s = reinterpret_cast<State*>(arg);
-  s->mu.Lock();
-  s->val += 1;
-  s->num_running -= 1;
-  s->mu.Unlock();
-}
-
-TEST(EnvPosixTest, StartThread) {
-  State state;
-  state.val = 0;
-  state.num_running = 3;
-  for (int i = 0; i < 3; i++) {
-    env_->StartThread(&ThreadBody, &state);
-  }
-  while (true) {
-    state.mu.Lock();
-    int num = state.num_running;
-    state.mu.Unlock();
-    if (num == 0) {
-      break;
-    }
-    Env::Default()->SleepForMicroseconds(kDelayMicros);
-  }
-  ASSERT_EQ(state.val, 3);
-}
-
-TEST(EnvPosixTest, TwoPools) {
-
-  class CB {
-   public:
-    CB(const std::string& pool_name, int pool_size)
-        : mu_(),
-          num_running_(0),
-          num_finished_(0),
-          pool_size_(pool_size),
-          pool_name_(pool_name) { }
-
-    static void Run(void* v) {
-      CB* cb = reinterpret_cast<CB*>(v);
-      cb->Run();
-    }
-
-    void Run() {
-      {
-        MutexLock l(&mu_);
-        num_running_++;
-        std::cout << "Pool " << pool_name_ << ": "
-                  << num_running_ << " running threads.\n";
-        // make sure we don't have more than pool_size_ jobs running.
-        ASSERT_LE(num_running_, pool_size_);
-      }
-
-      // sleep for 1 sec
-      Env::Default()->SleepForMicroseconds(1000000);
-
-      {
-        MutexLock l(&mu_);
-        num_running_--;
-        num_finished_++;
-      }
-    }
-
-    int NumFinished() {
-      MutexLock l(&mu_);
-      return num_finished_;
-    }
-
-   private:
-    port::Mutex mu_;
-    int num_running_;
-    int num_finished_;
-    int pool_size_;
-    std::string pool_name_;
-  };
-
-  const int kLowPoolSize = 2;
-  const int kHighPoolSize = 4;
-  const int kJobs = 8;
-
-  CB low_pool_job("low", kLowPoolSize);
-  CB high_pool_job("high", kHighPoolSize);
-
-  env_->SetBackgroundThreads(kLowPoolSize);
-  env_->SetBackgroundThreads(kHighPoolSize, Env::Priority::HIGH);
-
-  ASSERT_EQ(0U, env_->GetThreadPoolQueueLen(Env::Priority::LOW));
-  ASSERT_EQ(0U, env_->GetThreadPoolQueueLen(Env::Priority::HIGH));
-
-  // schedule same number of jobs in each pool
-  for (int i = 0; i < kJobs; i++) {
-    env_->Schedule(&CB::Run, &low_pool_job);
-    env_->Schedule(&CB::Run, &high_pool_job, Env::Priority::HIGH);
-  }
-  // Wait a short while for the jobs to be dispatched.
-  Env::Default()->SleepForMicroseconds(kDelayMicros);
-  ASSERT_EQ((unsigned int)(kJobs - kLowPoolSize),
-            env_->GetThreadPoolQueueLen());
-  ASSERT_EQ((unsigned int)(kJobs - kLowPoolSize),
-            env_->GetThreadPoolQueueLen(Env::Priority::LOW));
-  ASSERT_EQ((unsigned int)(kJobs - kHighPoolSize),
-            env_->GetThreadPoolQueueLen(Env::Priority::HIGH));
-
-  // wait for all jobs to finish
-  while (low_pool_job.NumFinished() < kJobs ||
-         high_pool_job.NumFinished() < kJobs) {
-    env_->SleepForMicroseconds(kDelayMicros);
-  }
-
-  ASSERT_EQ(0U, env_->GetThreadPoolQueueLen(Env::Priority::LOW));
-  ASSERT_EQ(0U, env_->GetThreadPoolQueueLen(Env::Priority::HIGH));
-}
-
-#ifdef OS_LINUX
-// To make sure the Env::GetUniqueId() related tests work correctly, The files
-// should be stored in regular storage like "hard disk" or "flash device".
-// Otherwise we cannot get the correct id.
-//
-// The following function act as the replacement of test::TmpDir() that may be
-// customized by user to be on a storage that doesn't work with GetUniqueId().
-//
-// TODO(kailiu) This function still assumes /tmp/<test-dir> reside in regular
-// storage system.
-namespace {
-bool IsSingleVarint(const std::string& s) {
-  Slice slice(s);
-
-  uint64_t v;
-  if (!GetVarint64(&slice, &v)) {
-    return false;
-  }
-
-  return slice.size() == 0;
-}
-
-bool IsUniqueIDValid(const std::string& s) {
-  return !s.empty() && !IsSingleVarint(s);
-}
-
-const size_t MAX_ID_SIZE = 100;
-char temp_id[MAX_ID_SIZE];
-
-std::string GetOnDiskTestDir() {
-  char base[100];
-  snprintf(base, sizeof(base), "/tmp/rocksdbtest-%d",
-           static_cast<int>(geteuid()));
-  // Directory may already exist
-  Env::Default()->CreateDirIfMissing(base);
-
-  return base;
-}
-}  // namespace
-
-// Only works in linux platforms
-TEST(EnvPosixTest, RandomAccessUniqueID) {
-  // Create file.
-  const EnvOptions soptions;
-  std::string fname = GetOnDiskTestDir() + "/" + "testfile";
-  unique_ptr<WritableFile> wfile;
-  ASSERT_OK(env_->NewWritableFile(fname, &wfile, soptions));
-
-  unique_ptr<RandomAccessFile> file;
-
-  // Get Unique ID
-  ASSERT_OK(env_->NewRandomAccessFile(fname, &file, soptions));
-  size_t id_size = file->GetUniqueId(temp_id, MAX_ID_SIZE);
-  ASSERT_TRUE(id_size > 0);
-  std::string unique_id1(temp_id, id_size);
-  ASSERT_TRUE(IsUniqueIDValid(unique_id1));
-
-  // Get Unique ID again
-  ASSERT_OK(env_->NewRandomAccessFile(fname, &file, soptions));
-  id_size = file->GetUniqueId(temp_id, MAX_ID_SIZE);
-  ASSERT_TRUE(id_size > 0);
-  std::string unique_id2(temp_id, id_size);
-  ASSERT_TRUE(IsUniqueIDValid(unique_id2));
-
-  // Get Unique ID again after waiting some time.
-  env_->SleepForMicroseconds(1000000);
-  ASSERT_OK(env_->NewRandomAccessFile(fname, &file, soptions));
-  id_size = file->GetUniqueId(temp_id, MAX_ID_SIZE);
-  ASSERT_TRUE(id_size > 0);
-  std::string unique_id3(temp_id, id_size);
-  ASSERT_TRUE(IsUniqueIDValid(unique_id3));
-
-  // Check IDs are the same.
-  ASSERT_EQ(unique_id1, unique_id2);
-  ASSERT_EQ(unique_id2, unique_id3);
-
-  // Delete the file
-  env_->DeleteFile(fname);
-}
-
-// only works in linux platforms
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-TEST(EnvPosixTest, AllocateTest) {
-  std::string fname = GetOnDiskTestDir() + "/preallocate_testfile";
-  EnvOptions soptions;
-  soptions.use_mmap_writes = false;
-  unique_ptr<WritableFile> wfile;
-  ASSERT_OK(env_->NewWritableFile(fname, &wfile, soptions));
-
-  // allocate 100 MB
-  size_t kPreallocateSize = 100 * 1024 * 1024;
-  size_t kBlockSize = 512;
-  std::string data = "test";
-  wfile->SetPreallocationBlockSize(kPreallocateSize);
-  ASSERT_OK(wfile->Append(Slice(data)));
-  ASSERT_OK(wfile->Flush());
-
-  struct stat f_stat;
-  stat(fname.c_str(), &f_stat);
-  ASSERT_EQ((unsigned int)data.size(), f_stat.st_size);
-  // verify that blocks are preallocated
-  // Note here that we don't check the exact number of blocks preallocated --
-  // we only require that number of allocated blocks is at least what we expect.
-  // It looks like some FS give us more blocks that we asked for. That's fine.
-  // It might be worth investigating further.
-  auto st_blocks = f_stat.st_blocks;
-  ASSERT_LE((unsigned int)(kPreallocateSize / kBlockSize), st_blocks);
-
-  // close the file, should deallocate the blocks
-  wfile.reset();
-
-  stat(fname.c_str(), &f_stat);
-  ASSERT_EQ((unsigned int)data.size(), f_stat.st_size);
-  // verify that preallocated blocks were deallocated on file close
-  ASSERT_GT(st_blocks, f_stat.st_blocks);
-}
-#endif
-
-// Returns true if any of the strings in ss are the prefix of another string.
-bool HasPrefix(const std::unordered_set<std::string>& ss) {
-  for (const std::string& s: ss) {
-    if (s.empty()) {
-      return true;
-    }
-    for (size_t i = 1; i < s.size(); ++i) {
-      if (ss.count(s.substr(0, i)) != 0) {
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-// Only works in linux platforms
-TEST(EnvPosixTest, RandomAccessUniqueIDConcurrent) {
-  // Check whether a bunch of concurrently existing files have unique IDs.
-  const EnvOptions soptions;
-
-  // Create the files
-  std::vector<std::string> fnames;
-  for (int i = 0; i < 1000; ++i) {
-    fnames.push_back(GetOnDiskTestDir() + "/" + "testfile" + std::to_string(i));
-
-    // Create file.
-    unique_ptr<WritableFile> wfile;
-    ASSERT_OK(env_->NewWritableFile(fnames[i], &wfile, soptions));
-  }
-
-  // Collect and check whether the IDs are unique.
-  std::unordered_set<std::string> ids;
-  for (const std::string fname: fnames) {
-    unique_ptr<RandomAccessFile> file;
-    std::string unique_id;
-    ASSERT_OK(env_->NewRandomAccessFile(fname, &file, soptions));
-    size_t id_size = file->GetUniqueId(temp_id, MAX_ID_SIZE);
-    ASSERT_TRUE(id_size > 0);
-    unique_id = std::string(temp_id, id_size);
-    ASSERT_TRUE(IsUniqueIDValid(unique_id));
-
-    ASSERT_TRUE(ids.count(unique_id) == 0);
-    ids.insert(unique_id);
-  }
-
-  // Delete the files
-  for (const std::string fname: fnames) {
-    ASSERT_OK(env_->DeleteFile(fname));
-  }
-
-  ASSERT_TRUE(!HasPrefix(ids));
-}
-
-// Only works in linux platforms
-TEST(EnvPosixTest, RandomAccessUniqueIDDeletes) {
-  const EnvOptions soptions;
-
-  std::string fname = GetOnDiskTestDir() + "/" + "testfile";
-
-  // Check that after file is deleted we don't get same ID again in a new file.
-  std::unordered_set<std::string> ids;
-  for (int i = 0; i < 1000; ++i) {
-    // Create file.
-    {
-      unique_ptr<WritableFile> wfile;
-      ASSERT_OK(env_->NewWritableFile(fname, &wfile, soptions));
-    }
-
-    // Get Unique ID
-    std::string unique_id;
-    {
-      unique_ptr<RandomAccessFile> file;
-      ASSERT_OK(env_->NewRandomAccessFile(fname, &file, soptions));
-      size_t id_size = file->GetUniqueId(temp_id, MAX_ID_SIZE);
-      ASSERT_TRUE(id_size > 0);
-      unique_id = std::string(temp_id, id_size);
-    }
-
-    ASSERT_TRUE(IsUniqueIDValid(unique_id));
-    ASSERT_TRUE(ids.count(unique_id) == 0);
-    ids.insert(unique_id);
-
-    // Delete the file
-    ASSERT_OK(env_->DeleteFile(fname));
-  }
-
-  ASSERT_TRUE(!HasPrefix(ids));
-}
-
-// Only works in linux platforms
-TEST(EnvPosixTest, InvalidateCache) {
-  const EnvOptions soptions;
-  std::string fname = test::TmpDir() + "/" + "testfile";
-
-  // Create file.
-  {
-    unique_ptr<WritableFile> wfile;
-    ASSERT_OK(env_->NewWritableFile(fname, &wfile, soptions));
-    ASSERT_OK(wfile.get()->Append(Slice("Hello world")));
-    ASSERT_OK(wfile.get()->InvalidateCache(0, 0));
-    ASSERT_OK(wfile.get()->Close());
-  }
-
-  // Random Read
-  {
-    unique_ptr<RandomAccessFile> file;
-    char scratch[100];
-    Slice result;
-    ASSERT_OK(env_->NewRandomAccessFile(fname, &file, soptions));
-    ASSERT_OK(file.get()->Read(0, 11, &result, scratch));
-    ASSERT_EQ(memcmp(scratch, "Hello world", 11), 0);
-    ASSERT_OK(file.get()->InvalidateCache(0, 11));
-    ASSERT_OK(file.get()->InvalidateCache(0, 0));
-  }
-
-  // Sequential Read
-  {
-    unique_ptr<SequentialFile> file;
-    char scratch[100];
-    Slice result;
-    ASSERT_OK(env_->NewSequentialFile(fname, &file, soptions));
-    ASSERT_OK(file.get()->Read(11, &result, scratch));
-    ASSERT_EQ(memcmp(scratch, "Hello world", 11), 0);
-    ASSERT_OK(file.get()->InvalidateCache(0, 11));
-    ASSERT_OK(file.get()->InvalidateCache(0, 0));
-  }
-  // Delete the file
-  ASSERT_OK(env_->DeleteFile(fname));
-}
-#endif
-
-TEST(EnvPosixTest, PosixRandomRWFileTest) {
-  EnvOptions soptions;
-  soptions.use_mmap_writes = soptions.use_mmap_reads = false;
-  std::string fname = test::TmpDir() + "/" + "testfile";
-
-  unique_ptr<RandomRWFile> file;
-  ASSERT_OK(env_->NewRandomRWFile(fname, &file, soptions));
-  // If you run the unit test on tmpfs, then tmpfs might not
-  // support fallocate. It is still better to trigger that
-  // code-path instead of eliminating it completely.
-  file.get()->Allocate(0, 10*1024*1024);
-  ASSERT_OK(file.get()->Write(100, Slice("Hello world")));
-  ASSERT_OK(file.get()->Write(105, Slice("Hello world")));
-  ASSERT_OK(file.get()->Sync());
-  ASSERT_OK(file.get()->Fsync());
-  char scratch[100];
-  Slice result;
-  ASSERT_OK(file.get()->Read(100, 16, &result, scratch));
-  ASSERT_EQ(result.compare("HelloHello world"), 0);
-  ASSERT_OK(file.get()->Close());
-}
-
-class TestLogger : public Logger {
- public:
-  virtual void Logv(const char* format, va_list ap) override {
-    log_count++;
-
-    char new_format[550];
-    std::fill_n(new_format, sizeof(new_format), '2');
-    {
-      va_list backup_ap;
-      va_copy(backup_ap, ap);
-      int n = vsnprintf(new_format, sizeof(new_format) - 1, format, backup_ap);
-      // 48 bytes for extra information + bytes allocated
-
-      if (new_format[0] == '[') {
-        // "[DEBUG] "
-        ASSERT_TRUE(n <= 56 + (512 - static_cast<int>(sizeof(struct timeval))));
-      } else {
-        ASSERT_TRUE(n <= 48 + (512 - static_cast<int>(sizeof(struct timeval))));
-      }
-      va_end(backup_ap);
-    }
-
-    for (size_t i = 0; i < sizeof(new_format); i++) {
-      if (new_format[i] == 'x') {
-        char_x_count++;
-      } else if (new_format[i] == '\0') {
-        char_0_count++;
-      }
-    }
-  }
-  int log_count;
-  int char_x_count;
-  int char_0_count;
-};
-
-TEST(EnvPosixTest, LogBufferTest) {
-  TestLogger test_logger;
-  test_logger.SetInfoLogLevel(InfoLogLevel::INFO_LEVEL);
-  test_logger.log_count = 0;
-  test_logger.char_x_count = 0;
-  test_logger.char_0_count = 0;
-  LogBuffer log_buffer(InfoLogLevel::INFO_LEVEL, &test_logger);
-  LogBuffer log_buffer_debug(DEBUG_LEVEL, &test_logger);
-
-  char bytes200[200];
-  std::fill_n(bytes200, sizeof(bytes200), '1');
-  bytes200[sizeof(bytes200) - 1] = '\0';
-  char bytes600[600];
-  std::fill_n(bytes600, sizeof(bytes600), '1');
-  bytes600[sizeof(bytes600) - 1] = '\0';
-  char bytes9000[9000];
-  std::fill_n(bytes9000, sizeof(bytes9000), '1');
-  bytes9000[sizeof(bytes9000) - 1] = '\0';
-
-  LogToBuffer(&log_buffer, "x%sx", bytes200);
-  LogToBuffer(&log_buffer, "x%sx", bytes600);
-  LogToBuffer(&log_buffer, "x%sx%sx%sx", bytes200, bytes200, bytes200);
-  LogToBuffer(&log_buffer, "x%sx%sx", bytes200, bytes600);
-  LogToBuffer(&log_buffer, "x%sx%sx", bytes600, bytes9000);
-
-  LogToBuffer(&log_buffer_debug, "x%sx", bytes200);
-  test_logger.SetInfoLogLevel(DEBUG_LEVEL);
-  LogToBuffer(&log_buffer_debug, "x%sx%sx%sx", bytes600, bytes9000, bytes200);
-
-  ASSERT_EQ(0, test_logger.log_count);
-  log_buffer.FlushBufferToLog();
-  log_buffer_debug.FlushBufferToLog();
-  ASSERT_EQ(6, test_logger.log_count);
-  ASSERT_EQ(6, test_logger.char_0_count);
-  ASSERT_EQ(10, test_logger.char_x_count);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/filelock_test.cc b/src/rocksdb/util/filelock_test.cc
deleted file mode 100644
index a9e30a5..0000000
--- a/src/rocksdb/util/filelock_test.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "rocksdb/status.h"
-#include "rocksdb/env.h"
-
-#include <vector>
-#include "util/coding.h"
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-class LockTest {
- public:
-  static LockTest* current_;
-  std::string file_;
-  rocksdb::Env* env_;
-
-  LockTest() : file_(test::TmpDir() + "/db_testlock_file"),
-               env_(rocksdb::Env::Default()) {
-    current_ = this;
-  }
-
-  ~LockTest() {
-  }
-
-  Status LockFile(FileLock** db_lock) {
-    return env_->LockFile(file_, db_lock);
-  }
-
-  Status UnlockFile(FileLock* db_lock) {
-    return env_->UnlockFile(db_lock);
-  }
-};
-LockTest* LockTest::current_;
-
-TEST(LockTest, LockBySameThread) {
-  FileLock* lock1;
-  FileLock* lock2;
-
-  // acquire a lock on a file
-  ASSERT_OK(LockFile(&lock1));
-
-  // re-acquire the lock on the same file. This should fail.
-  ASSERT_TRUE(LockFile(&lock2).IsIOError());
-
-  // release the lock
-  ASSERT_OK(UnlockFile(lock1));
-
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/filter_policy.cc b/src/rocksdb/util/filter_policy.cc
deleted file mode 100644
index e950b75..0000000
--- a/src/rocksdb/util/filter_policy.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/filter_policy.h"
-
-namespace rocksdb {
-
-FilterPolicy::~FilterPolicy() { }
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/hash.cc b/src/rocksdb/util/hash.cc
deleted file mode 100644
index e38c186..0000000
--- a/src/rocksdb/util/hash.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <string.h>
-#include "util/coding.h"
-#include "util/hash.h"
-
-namespace rocksdb {
-
-uint32_t Hash(const char* data, size_t n, uint32_t seed) {
-  // Similar to murmur hash
-  const uint32_t m = 0xc6a4a793;
-  const uint32_t r = 24;
-  const char* limit = data + n;
-  uint32_t h = seed ^ (n * m);
-
-  // Pick up four bytes at a time
-  while (data + 4 <= limit) {
-    uint32_t w = DecodeFixed32(data);
-    data += 4;
-    h += w;
-    h *= m;
-    h ^= (h >> 16);
-  }
-
-  // Pick up remaining bytes
-  switch (limit - data) {
-    case 3:
-      h += data[2] << 16;
-      // fall through
-    case 2:
-      h += data[1] << 8;
-      // fall through
-    case 1:
-      h += data[0];
-      h *= m;
-      h ^= (h >> r);
-      break;
-  }
-  return h;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/hash.h b/src/rocksdb/util/hash.h
deleted file mode 100644
index c9eb659..0000000
--- a/src/rocksdb/util/hash.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Simple hash function used for internal data structures
-
-#pragma once
-#include <stddef.h>
-#include <stdint.h>
-
-namespace rocksdb {
-
-extern uint32_t Hash(const char* data, size_t n, uint32_t seed);
-
-}
diff --git a/src/rocksdb/util/hash_cuckoo_rep.cc b/src/rocksdb/util/hash_cuckoo_rep.cc
deleted file mode 100644
index d10bc5d..0000000
--- a/src/rocksdb/util/hash_cuckoo_rep.cc
+++ /dev/null
@@ -1,627 +0,0 @@
-
-//  Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef ROCKSDB_LITE
-#include "util/hash_cuckoo_rep.h"
-
-#include <algorithm>
-#include <atomic>
-#include <limits>
-#include <queue>
-#include <string>
-#include <memory>
-#include <vector>
-
-#include "rocksdb/memtablerep.h"
-#include "util/murmurhash.h"
-#include "db/memtable.h"
-#include "db/skiplist.h"
-#include "util/stl_wrappers.h"
-
-namespace rocksdb {
-namespace {
-
-// the default maximum size of the cuckoo path searching queue
-static const int kCuckooPathMaxSearchSteps = 100;
-
-struct CuckooStep {
-  static const int kNullStep = -1;
-  // the bucket id in the cuckoo array.
-  int bucket_id_;
-  // index of cuckoo-step array that points to its previous step,
-  // -1 if it the beginning step.
-  int prev_step_id_;
-  // the depth of the current step.
-  unsigned int depth_;
-
-  CuckooStep() : bucket_id_(-1), prev_step_id_(kNullStep), depth_(1) {}
-
-  CuckooStep(CuckooStep&&) = default;
-  CuckooStep& operator=(CuckooStep&&) = default;
-
-  CuckooStep(const CuckooStep&) = delete;
-  CuckooStep& operator=(const CuckooStep&) = delete;
-
-  CuckooStep(int bucket_id, int prev_step_id, int depth)
-      : bucket_id_(bucket_id), prev_step_id_(prev_step_id), depth_(depth) {}
-};
-
-class HashCuckooRep : public MemTableRep {
- public:
-  explicit HashCuckooRep(const MemTableRep::KeyComparator& compare,
-                         Arena* arena, const size_t bucket_count,
-                         const unsigned int hash_func_count)
-      : MemTableRep(arena),
-        compare_(compare),
-        arena_(arena),
-        bucket_count_(bucket_count),
-        cuckoo_path_max_depth_(kDefaultCuckooPathMaxDepth),
-        occupied_count_(0),
-        hash_function_count_(hash_func_count),
-        backup_table_(nullptr) {
-    char* mem = reinterpret_cast<char*>(
-        arena_->Allocate(sizeof(std::atomic<const char*>) * bucket_count_));
-    cuckoo_array_ = new (mem) std::atomic<const char*>[bucket_count_];
-    for (unsigned int bid = 0; bid < bucket_count_; ++bid) {
-      cuckoo_array_[bid].store(nullptr, std::memory_order_relaxed);
-    }
-
-    cuckoo_path_ = reinterpret_cast<int*>(
-        arena_->Allocate(sizeof(int*) * (cuckoo_path_max_depth_ + 1)));
-    is_nearly_full_ = false;
-  }
-
-  // return false, indicating HashCuckooRep does not support merge operator.
-  virtual bool IsMergeOperatorSupported() const override { return false; }
-
-  // return false, indicating HashCuckooRep does not support snapshot.
-  virtual bool IsSnapshotSupported() const override { return false; }
-
-  // Returns true iff an entry that compares equal to key is in the collection.
-  virtual bool Contains(const char* internal_key) const override;
-
-  virtual ~HashCuckooRep() override {}
-
-  // Insert the specified key (internal_key) into the mem-table.  Assertion
-  // fails if
-  // the current mem-table already contains the specified key.
-  virtual void Insert(KeyHandle handle) override;
-
-  // This function returns std::numeric_limits<size_t>::max() in the following
-  // three cases to disallow further write operations:
-  // 1. when the fullness reaches kMaxFullnes.
-  // 2. when the backup_table_ is used.
-  //
-  // otherwise, this function will always return 0.
-  virtual size_t ApproximateMemoryUsage() override {
-    if (is_nearly_full_) {
-      return std::numeric_limits<size_t>::max();
-    }
-    return 0;
-  }
-
-  virtual void Get(const LookupKey& k, void* callback_args,
-                   bool (*callback_func)(void* arg,
-                                         const char* entry)) override;
-
-  class Iterator : public MemTableRep::Iterator {
-    std::shared_ptr<std::vector<const char*>> bucket_;
-    typename std::vector<const char*>::const_iterator mutable cit_;
-    const KeyComparator& compare_;
-    std::string tmp_;  // For passing to EncodeKey
-    bool mutable sorted_;
-    void DoSort() const;
-
-   public:
-    explicit Iterator(std::shared_ptr<std::vector<const char*>> bucket,
-                      const KeyComparator& compare);
-
-    // Initialize an iterator over the specified collection.
-    // The returned iterator is not valid.
-    // explicit Iterator(const MemTableRep* collection);
-    virtual ~Iterator() override{};
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const override;
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const override;
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() override;
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() override;
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& user_key, const char* memtable_key) override;
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() override;
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() override;
-  };
-
-  struct CuckooStepBuffer {
-    CuckooStepBuffer() : write_index_(0), read_index_(0) {}
-    ~CuckooStepBuffer() {}
-
-    int write_index_;
-    int read_index_;
-    CuckooStep steps_[kCuckooPathMaxSearchSteps];
-
-    CuckooStep& NextWriteBuffer() { return steps_[write_index_++]; }
-
-    inline const CuckooStep& ReadNext() { return steps_[read_index_++]; }
-
-    inline bool HasNewWrite() { return write_index_ > read_index_; }
-
-    inline void reset() {
-      write_index_ = 0;
-      read_index_ = 0;
-    }
-
-    inline bool IsFull() { return write_index_ >= kCuckooPathMaxSearchSteps; }
-
-    // returns the number of steps that has been read
-    inline int ReadCount() { return read_index_; }
-
-    // returns the number of steps that has been written to the buffer.
-    inline int WriteCount() { return write_index_; }
-  };
-
- private:
-  const MemTableRep::KeyComparator& compare_;
-  // the pointer to Arena to allocate memory, immutable after construction.
-  Arena* const arena_;
-  // the number of hash bucket in the hash table.
-  const size_t bucket_count_;
-  // the maxinum depth of the cuckoo path.
-  const unsigned int cuckoo_path_max_depth_;
-  // the current number of entries in cuckoo_array_ which has been occupied.
-  size_t occupied_count_;
-  // the current number of hash functions used in the cuckoo hash.
-  unsigned int hash_function_count_;
-  // the backup MemTableRep to handle the case where cuckoo hash cannot find
-  // a vacant bucket for inserting the key of a put request.
-  std::shared_ptr<MemTableRep> backup_table_;
-  // the array to store pointers, pointing to the actual data.
-  std::atomic<const char*>* cuckoo_array_;
-  // a buffer to store cuckoo path
-  int* cuckoo_path_;
-  // a boolean flag indicating whether the fullness of bucket array
-  // reaches the point to make the current memtable immutable.
-  bool is_nearly_full_;
-
-  // the default maximum depth of the cuckoo path.
-  static const unsigned int kDefaultCuckooPathMaxDepth = 10;
-
-  CuckooStepBuffer step_buffer_;
-
-  // returns the bucket id assogied to the input slice based on the
-  unsigned int GetHash(const Slice& slice, const int hash_func_id) const {
-    // the seeds used in the Murmur hash to produce different hash functions.
-    static const int kMurmurHashSeeds[HashCuckooRepFactory::kMaxHashCount] = {
-        545609244,  1769731426, 763324157,  13099088,   592422103,
-        1899789565, 248369300,  1984183468, 1613664382, 1491157517};
-    return MurmurHash(slice.data(), slice.size(),
-                      kMurmurHashSeeds[hash_func_id]) %
-           bucket_count_;
-  }
-
-  // A cuckoo path is a sequence of bucket ids, where each id points to a
-  // location of cuckoo_array_.  This path describes the displacement sequence
-  // of entries in order to store the desired data specified by the input user
-  // key.  The path starts from one of the locations associated with the
-  // specified user key and ends at a vacant space in the cuckoo array. This
-  // function will update the cuckoo_path.
-  //
-  // @return true if it found a cuckoo path.
-  bool FindCuckooPath(const char* internal_key, const Slice& user_key,
-                      int* cuckoo_path, size_t* cuckoo_path_length,
-                      int initial_hash_id = 0);
-
-  // Perform quick insert by checking whether there is a vacant bucket in one
-  // of the possible locations of the input key.  If so, then the function will
-  // return true and the key will be stored in that vacant bucket.
-  //
-  // This function is a helper function of FindCuckooPath that discovers the
-  // first possible steps of a cuckoo path.  It begins by first computing
-  // the possible locations of the input keys (and stores them in bucket_ids.)
-  // Then, if one of its possible locations is vacant, then the input key will
-  // be stored in that vacant space and the function will return true.
-  // Otherwise, the function will return false indicating a complete search
-  // of cuckoo-path is needed.
-  bool QuickInsert(const char* internal_key, const Slice& user_key,
-                   int bucket_ids[], const int initial_hash_id);
-
-  // Unhide default implementations of GetIterator
-  using MemTableRep::GetIterator;
-  // Returns the pointer to the internal iterator to the buckets where buckets
-  // are sorted according to the user specified KeyComparator.  Note that
-  // any insert after this function call may affect the sorted nature of
-  // the returned iterator.
-  virtual MemTableRep::Iterator* GetIterator() override {
-    std::vector<const char*> compact_buckets;
-    for (unsigned int bid = 0; bid < bucket_count_; ++bid) {
-      const char* bucket = cuckoo_array_[bid].load(std::memory_order_relaxed);
-      if (bucket != nullptr) {
-        compact_buckets.push_back(bucket);
-      }
-    }
-    MemTableRep* backup_table = backup_table_.get();
-    if (backup_table != nullptr) {
-      std::unique_ptr<MemTableRep::Iterator> iter(backup_table->GetIterator());
-      for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-        compact_buckets.push_back(iter->key());
-      }
-    }
-    return new Iterator(
-        std::shared_ptr<std::vector<const char*>>(
-            new std::vector<const char*>(std::move(compact_buckets))),
-        compare_);
-  }
-};
-
-void HashCuckooRep::Get(const LookupKey& key, void* callback_args,
-                        bool (*callback_func)(void* arg, const char* entry)) {
-  Slice user_key = key.user_key();
-  for (unsigned int hid = 0; hid < hash_function_count_; ++hid) {
-    const char* bucket =
-        cuckoo_array_[GetHash(user_key, hid)].load(std::memory_order_acquire);
-    if (bucket != nullptr) {
-      auto bucket_user_key = UserKey(bucket);
-      if (user_key.compare(bucket_user_key) == 0) {
-        callback_func(callback_args, bucket);
-        break;
-      }
-    } else {
-      // as Put() always stores at the vacant bucket located by the
-      // hash function with the smallest possible id, when we first
-      // find a vacant bucket in Get(), that means a miss.
-      break;
-    }
-  }
-  MemTableRep* backup_table = backup_table_.get();
-  if (backup_table != nullptr) {
-    backup_table->Get(key, callback_args, callback_func);
-  }
-}
-
-void HashCuckooRep::Insert(KeyHandle handle) {
-  static const float kMaxFullness = 0.90;
-
-  auto* key = static_cast<char*>(handle);
-  int initial_hash_id = 0;
-  size_t cuckoo_path_length = 0;
-  auto user_key = UserKey(key);
-  // find cuckoo path
-  if (FindCuckooPath(key, user_key, cuckoo_path_, &cuckoo_path_length,
-                     initial_hash_id) == false) {
-    // if true, then we can't find a vacant bucket for this key even we
-    // have used up all the hash functions.  Then use a backup memtable to
-    // store such key, which will further make this mem-table become
-    // immutable.
-    if (backup_table_.get() == nullptr) {
-      VectorRepFactory factory(10);
-      backup_table_.reset(factory.CreateMemTableRep(compare_, arena_, nullptr));
-      is_nearly_full_ = true;
-    }
-    backup_table_->Insert(key);
-    return;
-  }
-  // when reaching this point, means the insert can be done successfully.
-  occupied_count_++;
-  if (occupied_count_ >= bucket_count_ * kMaxFullness) {
-    is_nearly_full_ = true;
-  }
-
-  // perform kickout process if the length of cuckoo path > 1.
-  if (cuckoo_path_length == 0) return;
-
-  // the cuckoo path stores the kickout path in reverse order.
-  // so the kickout or displacement is actually performed
-  // in reverse order, which avoids false-negatives on read
-  // by moving each key involved in the cuckoo path to the new
-  // location before replacing it.
-  for (size_t i = 1; i < cuckoo_path_length; ++i) {
-    int kicked_out_bid = cuckoo_path_[i - 1];
-    int current_bid = cuckoo_path_[i];
-    // since we only allow one writer at a time, it is safe to do relaxed read.
-    cuckoo_array_[kicked_out_bid]
-        .store(cuckoo_array_[current_bid].load(std::memory_order_relaxed),
-               std::memory_order_release);
-  }
-  int insert_key_bid = cuckoo_path_[cuckoo_path_length - 1];
-  cuckoo_array_[insert_key_bid].store(key, std::memory_order_release);
-}
-
-bool HashCuckooRep::Contains(const char* internal_key) const {
-  auto user_key = UserKey(internal_key);
-  for (unsigned int hid = 0; hid < hash_function_count_; ++hid) {
-    const char* stored_key =
-        cuckoo_array_[GetHash(user_key, hid)].load(std::memory_order_acquire);
-    if (stored_key != nullptr) {
-      if (compare_(internal_key, stored_key) == 0) {
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool HashCuckooRep::QuickInsert(const char* internal_key, const Slice& user_key,
-                                int bucket_ids[], const int initial_hash_id) {
-  int cuckoo_bucket_id = -1;
-
-  // Below does the followings:
-  // 0. Calculate all possible locations of the input key.
-  // 1. Check if there is a bucket having same user_key as the input does.
-  // 2. If there exists such bucket, then replace this bucket by the newly
-  //    insert data and return.  This step also performs duplication check.
-  // 3. If no such bucket exists but exists a vacant bucket, then insert the
-  //    input data into it.
-  // 4. If step 1 to 3 all fail, then return false.
-  for (unsigned int hid = initial_hash_id; hid < hash_function_count_; ++hid) {
-    bucket_ids[hid] = GetHash(user_key, hid);
-    // since only one PUT is allowed at a time, and this is part of the PUT
-    // operation, so we can safely perform relaxed load.
-    const char* stored_key =
-        cuckoo_array_[bucket_ids[hid]].load(std::memory_order_relaxed);
-    if (stored_key == nullptr) {
-      if (cuckoo_bucket_id == -1) {
-        cuckoo_bucket_id = bucket_ids[hid];
-      }
-    } else {
-      const auto bucket_user_key = UserKey(stored_key);
-      if (bucket_user_key.compare(user_key) == 0) {
-        cuckoo_bucket_id = bucket_ids[hid];
-        break;
-      }
-    }
-  }
-
-  if (cuckoo_bucket_id != -1) {
-    cuckoo_array_[cuckoo_bucket_id]
-        .store(internal_key, std::memory_order_release);
-    return true;
-  }
-
-  return false;
-}
-
-// Perform pre-check and find the shortest cuckoo path.  A cuckoo path
-// is a displacement sequence for inserting the specified input key.
-//
-// @return true if it successfully found a vacant space or cuckoo-path.
-//     If the return value is true but the length of cuckoo_path is zero,
-//     then it indicates that a vacant bucket or an bucket with matched user
-//     key with the input is found, and a quick insertion is done.
-bool HashCuckooRep::FindCuckooPath(const char* internal_key,
-                                   const Slice& user_key, int* cuckoo_path,
-                                   size_t* cuckoo_path_length,
-                                   const int initial_hash_id) {
-  int bucket_ids[HashCuckooRepFactory::kMaxHashCount];
-  *cuckoo_path_length = 0;
-
-  if (QuickInsert(internal_key, user_key, bucket_ids, initial_hash_id)) {
-    return true;
-  }
-  // If this step is reached, then it means:
-  // 1. no vacant bucket in any of the possible locations of the input key.
-  // 2. none of the possible locations of the input key has the same user
-  //    key as the input `internal_key`.
-
-  // the front and back indices for the step_queue_
-  step_buffer_.reset();
-
-  for (unsigned int hid = initial_hash_id; hid < hash_function_count_; ++hid) {
-    /// CuckooStep& current_step = step_queue_[front_pos++];
-    CuckooStep& current_step = step_buffer_.NextWriteBuffer();
-    current_step.bucket_id_ = bucket_ids[hid];
-    current_step.prev_step_id_ = CuckooStep::kNullStep;
-    current_step.depth_ = 1;
-  }
-
-  while (step_buffer_.HasNewWrite()) {
-    int step_id = step_buffer_.read_index_;
-    const CuckooStep& step = step_buffer_.ReadNext();
-    // Since it's a BFS process, then the first step with its depth deeper
-    // than the maximum allowed depth indicates all the remaining steps
-    // in the step buffer queue will all exceed the maximum depth.
-    // Return false immediately indicating we can't find a vacant bucket
-    // for the input key before the maximum allowed depth.
-    if (step.depth_ >= cuckoo_path_max_depth_) {
-      return false;
-    }
-    // again, we can perform no barrier load safely here as the current
-    // thread is the only writer.
-    auto bucket_user_key =
-        UserKey(cuckoo_array_[step.bucket_id_].load(std::memory_order_relaxed));
-    if (step.prev_step_id_ != CuckooStep::kNullStep) {
-      if (bucket_user_key.compare(user_key) == 0) {
-        // then there is a loop in the current path, stop discovering this path.
-        continue;
-      }
-    }
-    // if the current bucket stores at its nth location, then we only consider
-    // its mth location where m > n.  This property makes sure that all reads
-    // will not miss if we do have data associated to the query key.
-    //
-    // The n and m in the above statement is the start_hid and hid in the code.
-    unsigned int start_hid = hash_function_count_;
-    for (unsigned int hid = 0; hid < hash_function_count_; ++hid) {
-      bucket_ids[hid] = GetHash(bucket_user_key, hid);
-      if (step.bucket_id_ == bucket_ids[hid]) {
-        start_hid = hid;
-      }
-    }
-    // must found a bucket which is its current "home".
-    assert(start_hid != hash_function_count_);
-
-    // explore all possible next steps from the current step.
-    for (unsigned int hid = start_hid + 1; hid < hash_function_count_; ++hid) {
-      CuckooStep& next_step = step_buffer_.NextWriteBuffer();
-      next_step.bucket_id_ = bucket_ids[hid];
-      next_step.prev_step_id_ = step_id;
-      next_step.depth_ = step.depth_ + 1;
-      // once a vacant bucket is found, trace back all its previous steps
-      // to generate a cuckoo path.
-      if (cuckoo_array_[next_step.bucket_id_].load(std::memory_order_relaxed) ==
-          nullptr) {
-        // store the last step in the cuckoo path.  Note that cuckoo_path
-        // stores steps in reverse order.  This allows us to move keys along
-        // the cuckoo path by storing each key to the new place first before
-        // removing it from the old place.  This property ensures reads will
-        // not missed due to moving keys along the cuckoo path.
-        cuckoo_path[(*cuckoo_path_length)++] = next_step.bucket_id_;
-        int depth;
-        for (depth = step.depth_; depth > 0 && step_id != CuckooStep::kNullStep;
-             depth--) {
-          const CuckooStep& prev_step = step_buffer_.steps_[step_id];
-          cuckoo_path[(*cuckoo_path_length)++] = prev_step.bucket_id_;
-          step_id = prev_step.prev_step_id_;
-        }
-        assert(depth == 0 && step_id == CuckooStep::kNullStep);
-        return true;
-      }
-      if (step_buffer_.IsFull()) {
-        // if true, then it reaches maxinum number of cuckoo search steps.
-        return false;
-      }
-    }
-  }
-
-  // tried all possible paths but still not unable to find a cuckoo path
-  // which path leads to a vacant bucket.
-  return false;
-}
-
-HashCuckooRep::Iterator::Iterator(
-    std::shared_ptr<std::vector<const char*>> bucket,
-    const KeyComparator& compare)
-    : bucket_(bucket),
-      cit_(bucket_->end()),
-      compare_(compare),
-      sorted_(false) {}
-
-void HashCuckooRep::Iterator::DoSort() const {
-  if (!sorted_) {
-    std::sort(bucket_->begin(), bucket_->end(),
-              stl_wrappers::Compare(compare_));
-    cit_ = bucket_->begin();
-    sorted_ = true;
-  }
-}
-
-// Returns true iff the iterator is positioned at a valid node.
-bool HashCuckooRep::Iterator::Valid() const {
-  DoSort();
-  return cit_ != bucket_->end();
-}
-
-// Returns the key at the current position.
-// REQUIRES: Valid()
-const char* HashCuckooRep::Iterator::key() const {
-  assert(Valid());
-  return *cit_;
-}
-
-// Advances to the next position.
-// REQUIRES: Valid()
-void HashCuckooRep::Iterator::Next() {
-  assert(Valid());
-  if (cit_ == bucket_->end()) {
-    return;
-  }
-  ++cit_;
-}
-
-// Advances to the previous position.
-// REQUIRES: Valid()
-void HashCuckooRep::Iterator::Prev() {
-  assert(Valid());
-  if (cit_ == bucket_->begin()) {
-    // If you try to go back from the first element, the iterator should be
-    // invalidated. So we set it to past-the-end. This means that you can
-    // treat the container circularly.
-    cit_ = bucket_->end();
-  } else {
-    --cit_;
-  }
-}
-
-// Advance to the first entry with a key >= target
-void HashCuckooRep::Iterator::Seek(const Slice& user_key,
-                                   const char* memtable_key) {
-  DoSort();
-  // Do binary search to find first value not less than the target
-  const char* encoded_key =
-      (memtable_key != nullptr) ? memtable_key : EncodeKey(&tmp_, user_key);
-  cit_ = std::equal_range(bucket_->begin(), bucket_->end(), encoded_key,
-                          [this](const char* a, const char* b) {
-                            return compare_(a, b) < 0;
-                          }).first;
-}
-
-// Position at the first entry in collection.
-// Final state of iterator is Valid() iff collection is not empty.
-void HashCuckooRep::Iterator::SeekToFirst() {
-  DoSort();
-  cit_ = bucket_->begin();
-}
-
-// Position at the last entry in collection.
-// Final state of iterator is Valid() iff collection is not empty.
-void HashCuckooRep::Iterator::SeekToLast() {
-  DoSort();
-  cit_ = bucket_->end();
-  if (bucket_->size() != 0) {
-    --cit_;
-  }
-}
-
-}  // anom namespace
-
-MemTableRep* HashCuckooRepFactory::CreateMemTableRep(
-    const MemTableRep::KeyComparator& compare, Arena* arena,
-    const SliceTransform* transform) {
-  // The estimated average fullness.  The write performance of any close hash
-  // degrades as the fullness of the mem-table increases.  Setting kFullness
-  // to a value around 0.7 can better avoid write performance degradation while
-  // keeping efficient memory usage.
-  static const float kFullness = 0.7;
-  size_t pointer_size = sizeof(std::atomic<const char*>);
-  assert(write_buffer_size_ >= (average_data_size_ + pointer_size));
-  size_t bucket_count =
-      (write_buffer_size_ / (average_data_size_ + pointer_size)) / kFullness +
-      1;
-  unsigned int hash_function_count = hash_function_count_;
-  if (hash_function_count < 2) {
-    hash_function_count = 2;
-  }
-  if (hash_function_count > kMaxHashCount) {
-    hash_function_count = kMaxHashCount;
-  }
-  return new HashCuckooRep(compare, arena, bucket_count, hash_function_count);
-}
-
-MemTableRepFactory* NewHashCuckooRepFactory(size_t write_buffer_size,
-                                            size_t average_data_size,
-                                            unsigned int hash_function_count) {
-  return new HashCuckooRepFactory(write_buffer_size, average_data_size,
-                                  hash_function_count);
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/hash_cuckoo_rep.h b/src/rocksdb/util/hash_cuckoo_rep.h
deleted file mode 100644
index 8f97ed4..0000000
--- a/src/rocksdb/util/hash_cuckoo_rep.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/memtablerep.h"
-
-namespace rocksdb {
-
-class HashCuckooRepFactory : public MemTableRepFactory {
- public:
-  // maxinum number of hash functions used in the cuckoo hash.
-  static const unsigned int kMaxHashCount = 10;
-
-  explicit HashCuckooRepFactory(size_t write_buffer_size,
-                                size_t average_data_size,
-                                unsigned int hash_function_count)
-      : write_buffer_size_(write_buffer_size),
-        average_data_size_(average_data_size),
-        hash_function_count_(hash_function_count) {}
-
-  virtual ~HashCuckooRepFactory() {}
-
-  virtual MemTableRep* CreateMemTableRep(
-      const MemTableRep::KeyComparator& compare, Arena* arena,
-      const SliceTransform* transform) override;
-
-  virtual const char* Name() const override { return "HashCuckooRepFactory"; }
-
- private:
-  size_t write_buffer_size_;
-  size_t average_data_size_;
-  const unsigned int hash_function_count_;
-};
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/hash_linklist_rep.cc b/src/rocksdb/util/hash_linklist_rep.cc
deleted file mode 100644
index acd78c5..0000000
--- a/src/rocksdb/util/hash_linklist_rep.cc
+++ /dev/null
@@ -1,483 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef ROCKSDB_LITE
-#include "util/hash_linklist_rep.h"
-
-#include "rocksdb/memtablerep.h"
-#include "util/arena.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "port/port.h"
-#include "port/atomic_pointer.h"
-#include "util/murmurhash.h"
-#include "db/memtable.h"
-#include "db/skiplist.h"
-
-namespace rocksdb {
-namespace {
-
-typedef const char* Key;
-
-struct Node {
-  // Accessors/mutators for links.  Wrapped in methods so we can
-  // add the appropriate barriers as necessary.
-  Node* Next() {
-    // Use an 'acquire load' so that we observe a fully initialized
-    // version of the returned Node.
-    return reinterpret_cast<Node*>(next_.Acquire_Load());
-  }
-  void SetNext(Node* x) {
-    // Use a 'release store' so that anybody who reads through this
-    // pointer observes a fully initialized version of the inserted node.
-    next_.Release_Store(x);
-  }
-  // No-barrier variants that can be safely used in a few locations.
-  Node* NoBarrier_Next() {
-    return reinterpret_cast<Node*>(next_.NoBarrier_Load());
-  }
-
-  void NoBarrier_SetNext(Node* x) {
-    next_.NoBarrier_Store(x);
-  }
-
- private:
-  port::AtomicPointer next_;
- public:
-  char key[0];
-};
-
-class HashLinkListRep : public MemTableRep {
- public:
-  HashLinkListRep(const MemTableRep::KeyComparator& compare, Arena* arena,
-                  const SliceTransform* transform, size_t bucket_size,
-                  size_t huge_page_tlb_size);
-
-  virtual KeyHandle Allocate(const size_t len, char** buf) override;
-
-  virtual void Insert(KeyHandle handle) override;
-
-  virtual bool Contains(const char* key) const override;
-
-  virtual size_t ApproximateMemoryUsage() override;
-
-  virtual void Get(const LookupKey& k, void* callback_args,
-                   bool (*callback_func)(void* arg,
-                                         const char* entry)) override;
-
-  virtual ~HashLinkListRep();
-
-  virtual MemTableRep::Iterator* GetIterator() override;
-
-  virtual MemTableRep::Iterator* GetIterator(const Slice& slice) override;
-
-  virtual MemTableRep::Iterator* GetDynamicPrefixIterator() override;
-
- private:
-  friend class DynamicIterator;
-  typedef SkipList<const char*, const MemTableRep::KeyComparator&> FullList;
-
-  size_t bucket_size_;
-
-  // Maps slices (which are transformed user keys) to buckets of keys sharing
-  // the same transform.
-  port::AtomicPointer* buckets_;
-
-  // The user-supplied transform whose domain is the user keys.
-  const SliceTransform* transform_;
-
-  const MemTableRep::KeyComparator& compare_;
-
-  bool BucketContains(Node* head, const Slice& key) const;
-
-  Slice GetPrefix(const Slice& internal_key) const {
-    return transform_->Transform(ExtractUserKey(internal_key));
-  }
-
-  size_t GetHash(const Slice& slice) const {
-    return MurmurHash(slice.data(), slice.size(), 0) % bucket_size_;
-  }
-
-  Node* GetBucket(size_t i) const {
-    return static_cast<Node*>(buckets_[i].Acquire_Load());
-  }
-
-  Node* GetBucket(const Slice& slice) const {
-    return GetBucket(GetHash(slice));
-  }
-
-  bool Equal(const Slice& a, const Key& b) const {
-    return (compare_(b, a) == 0);
-  }
-
-
-  bool Equal(const Key& a, const Key& b) const { return (compare_(a, b) == 0); }
-
-  bool KeyIsAfterNode(const Slice& internal_key, const Node* n) const {
-    // nullptr n is considered infinite
-    return (n != nullptr) && (compare_(n->key, internal_key) < 0);
-  }
-
-  bool KeyIsAfterNode(const Key& key, const Node* n) const {
-    // nullptr n is considered infinite
-    return (n != nullptr) && (compare_(n->key, key) < 0);
-  }
-
-
-  Node* FindGreaterOrEqualInBucket(Node* head, const Slice& key) const;
-
-  class FullListIterator : public MemTableRep::Iterator {
-   public:
-    explicit FullListIterator(FullList* list, Arena* arena)
-      : iter_(list), full_list_(list), arena_(arena) {}
-
-    virtual ~FullListIterator() {
-    }
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const {
-      return iter_.Valid();
-    }
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const {
-      assert(Valid());
-      return iter_.key();
-    }
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() {
-      assert(Valid());
-      iter_.Next();
-    }
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() {
-      assert(Valid());
-      iter_.Prev();
-    }
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& internal_key, const char* memtable_key) {
-      const char* encoded_key =
-          (memtable_key != nullptr) ?
-              memtable_key : EncodeKey(&tmp_, internal_key);
-      iter_.Seek(encoded_key);
-    }
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() {
-      iter_.SeekToFirst();
-    }
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() {
-      iter_.SeekToLast();
-    }
-   private:
-    FullList::Iterator iter_;
-    // To destruct with the iterator.
-    std::unique_ptr<FullList> full_list_;
-    std::unique_ptr<Arena> arena_;
-    std::string tmp_;       // For passing to EncodeKey
-  };
-
-  class Iterator : public MemTableRep::Iterator {
-   public:
-    explicit Iterator(const HashLinkListRep* const hash_link_list_rep,
-                      Node* head) :
-        hash_link_list_rep_(hash_link_list_rep), head_(head), node_(nullptr) {
-    }
-
-    virtual ~Iterator() {
-    }
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const {
-      return node_ != nullptr;
-    }
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const {
-      assert(Valid());
-      return node_->key;
-    }
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() {
-      assert(Valid());
-      node_ = node_->Next();
-    }
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() {
-      // Prefix iterator does not support total order.
-      // We simply set the iterator to invalid state
-      Reset(nullptr);
-    }
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& internal_key, const char* memtable_key) {
-      node_ = hash_link_list_rep_->FindGreaterOrEqualInBucket(head_,
-                                                              internal_key);
-    }
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() {
-      // Prefix iterator does not support total order.
-      // We simply set the iterator to invalid state
-      Reset(nullptr);
-    }
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() {
-      // Prefix iterator does not support total order.
-      // We simply set the iterator to invalid state
-      Reset(nullptr);
-    }
-
-   protected:
-    void Reset(Node* head) {
-      head_ = head;
-      node_ = nullptr;
-    }
-   private:
-    friend class HashLinkListRep;
-    const HashLinkListRep* const hash_link_list_rep_;
-    Node* head_;
-    Node* node_;
-    std::string tmp_;       // For passing to EncodeKey
-
-    virtual void SeekToHead() {
-      node_ = head_;
-    }
-  };
-
-  class DynamicIterator : public HashLinkListRep::Iterator {
-   public:
-    explicit DynamicIterator(HashLinkListRep& memtable_rep)
-      : HashLinkListRep::Iterator(&memtable_rep, nullptr),
-        memtable_rep_(memtable_rep) {}
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& k, const char* memtable_key) {
-      auto transformed = memtable_rep_.GetPrefix(k);
-      Reset(memtable_rep_.GetBucket(transformed));
-      HashLinkListRep::Iterator::Seek(k, memtable_key);
-    }
-
-   private:
-    // the underlying memtable
-    const HashLinkListRep& memtable_rep_;
-  };
-
-  class EmptyIterator : public MemTableRep::Iterator {
-    // This is used when there wasn't a bucket. It is cheaper than
-    // instantiating an empty bucket over which to iterate.
-   public:
-    EmptyIterator() { }
-    virtual bool Valid() const {
-      return false;
-    }
-    virtual const char* key() const {
-      assert(false);
-      return nullptr;
-    }
-    virtual void Next() { }
-    virtual void Prev() { }
-    virtual void Seek(const Slice& user_key, const char* memtable_key) { }
-    virtual void SeekToFirst() { }
-    virtual void SeekToLast() { }
-   private:
-  };
-};
-
-HashLinkListRep::HashLinkListRep(const MemTableRep::KeyComparator& compare,
-                                 Arena* arena, const SliceTransform* transform,
-                                 size_t bucket_size, size_t huge_page_tlb_size)
-    : MemTableRep(arena),
-      bucket_size_(bucket_size),
-      transform_(transform),
-      compare_(compare) {
-  char* mem = arena_->AllocateAligned(sizeof(port::AtomicPointer) * bucket_size,
-                                      huge_page_tlb_size);
-
-  buckets_ = new (mem) port::AtomicPointer[bucket_size];
-
-  for (size_t i = 0; i < bucket_size_; ++i) {
-    buckets_[i].NoBarrier_Store(nullptr);
-  }
-}
-
-HashLinkListRep::~HashLinkListRep() {
-}
-
-KeyHandle HashLinkListRep::Allocate(const size_t len, char** buf) {
-  char* mem = arena_->AllocateAligned(sizeof(Node) + len);
-  Node* x = new (mem) Node();
-  *buf = x->key;
-  return static_cast<void*>(x);
-}
-
-void HashLinkListRep::Insert(KeyHandle handle) {
-  Node* x = static_cast<Node*>(handle);
-  assert(!Contains(x->key));
-  Slice internal_key = GetLengthPrefixedSlice(x->key);
-  auto transformed = GetPrefix(internal_key);
-  auto& bucket = buckets_[GetHash(transformed)];
-  Node* head = static_cast<Node*>(bucket.Acquire_Load());
-
-  if (!head) {
-    // NoBarrier_SetNext() suffices since we will add a barrier when
-    // we publish a pointer to "x" in prev[i].
-    x->NoBarrier_SetNext(nullptr);
-    bucket.Release_Store(static_cast<void*>(x));
-    return;
-  }
-
-  Node* cur = head;
-  Node* prev = nullptr;
-  while (true) {
-    if (cur == nullptr) {
-      break;
-    }
-    Node* next = cur->Next();
-    // Make sure the lists are sorted.
-    // If x points to head_ or next points nullptr, it is trivially satisfied.
-    assert((cur == head) || (next == nullptr) ||
-           KeyIsAfterNode(next->key, cur));
-    if (KeyIsAfterNode(internal_key, cur)) {
-      // Keep searching in this list
-      prev = cur;
-      cur = next;
-    } else {
-      break;
-    }
-  }
-
-  // Our data structure does not allow duplicate insertion
-  assert(cur == nullptr || !Equal(x->key, cur->key));
-
-  // NoBarrier_SetNext() suffices since we will add a barrier when
-  // we publish a pointer to "x" in prev[i].
-  x->NoBarrier_SetNext(cur);
-
-  if (prev) {
-    prev->SetNext(x);
-  } else {
-    bucket.Release_Store(static_cast<void*>(x));
-  }
-}
-
-bool HashLinkListRep::Contains(const char* key) const {
-  Slice internal_key = GetLengthPrefixedSlice(key);
-
-  auto transformed = GetPrefix(internal_key);
-  auto bucket = GetBucket(transformed);
-  if (bucket == nullptr) {
-    return false;
-  }
-  return BucketContains(bucket, internal_key);
-}
-
-size_t HashLinkListRep::ApproximateMemoryUsage() {
-  // Memory is always allocated from the arena.
-  return 0;
-}
-
-void HashLinkListRep::Get(const LookupKey& k, void* callback_args,
-                          bool (*callback_func)(void* arg, const char* entry)) {
-  auto transformed = transform_->Transform(k.user_key());
-  auto bucket = GetBucket(transformed);
-  if (bucket != nullptr) {
-    Iterator iter(this, bucket);
-    for (iter.Seek(k.internal_key(), nullptr);
-         iter.Valid() && callback_func(callback_args, iter.key());
-         iter.Next()) {
-    }
-  }
-}
-
-MemTableRep::Iterator* HashLinkListRep::GetIterator() {
-  // allocate a new arena of similar size to the one currently in use
-  Arena* new_arena = new Arena(arena_->BlockSize());
-  auto list = new FullList(compare_, new_arena);
-  for (size_t i = 0; i < bucket_size_; ++i) {
-    auto bucket = GetBucket(i);
-    if (bucket != nullptr) {
-      Iterator itr(this, bucket);
-      for (itr.SeekToHead(); itr.Valid(); itr.Next()) {
-        list->Insert(itr.key());
-      }
-    }
-  }
-  return new FullListIterator(list, new_arena);
-}
-
-MemTableRep::Iterator* HashLinkListRep::GetIterator(const Slice& slice) {
-  auto bucket = GetBucket(transform_->Transform(slice));
-  if (bucket == nullptr) {
-    return new EmptyIterator();
-  }
-  return new Iterator(this, bucket);
-}
-
-MemTableRep::Iterator* HashLinkListRep::GetDynamicPrefixIterator() {
-  return new DynamicIterator(*this);
-}
-
-bool HashLinkListRep::BucketContains(Node* head, const Slice& user_key) const {
-  Node* x = FindGreaterOrEqualInBucket(head, user_key);
-  return (x != nullptr && Equal(user_key, x->key));
-}
-
-Node* HashLinkListRep::FindGreaterOrEqualInBucket(Node* head,
-                                                  const Slice& key) const {
-  Node* x = head;
-  while (true) {
-    if (x == nullptr) {
-      return x;
-    }
-    Node* next = x->Next();
-    // Make sure the lists are sorted.
-    // If x points to head_ or next points nullptr, it is trivially satisfied.
-    assert((x == head) || (next == nullptr) || KeyIsAfterNode(next->key, x));
-    if (KeyIsAfterNode(key, x)) {
-      // Keep searching in this list
-      x = next;
-    } else {
-      break;
-    }
-  }
-  return x;
-}
-
-} // anon namespace
-
-MemTableRep* HashLinkListRepFactory::CreateMemTableRep(
-    const MemTableRep::KeyComparator& compare, Arena* arena,
-    const SliceTransform* transform) {
-  return new HashLinkListRep(compare, arena, transform, bucket_count_,
-                             huge_page_tlb_size_);
-}
-
-MemTableRepFactory* NewHashLinkListRepFactory(size_t bucket_count,
-                                              size_t huge_page_tlb_size) {
-  return new HashLinkListRepFactory(bucket_count, huge_page_tlb_size);
-}
-
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/hash_linklist_rep.h b/src/rocksdb/util/hash_linklist_rep.h
deleted file mode 100644
index 4a9fd00..0000000
--- a/src/rocksdb/util/hash_linklist_rep.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/memtablerep.h"
-
-namespace rocksdb {
-
-class HashLinkListRepFactory : public MemTableRepFactory {
- public:
-  explicit HashLinkListRepFactory(size_t bucket_count,
-                                  size_t huge_page_tlb_size)
-      : bucket_count_(bucket_count), huge_page_tlb_size_(huge_page_tlb_size) {}
-
-  virtual ~HashLinkListRepFactory() {}
-
-  virtual MemTableRep* CreateMemTableRep(
-      const MemTableRep::KeyComparator& compare, Arena* arena,
-      const SliceTransform* transform) override;
-
-  virtual const char* Name() const override {
-    return "HashLinkListRepFactory";
-  }
-
- private:
-  const size_t bucket_count_;
-  const size_t huge_page_tlb_size_;
-};
-
-}
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/hash_skiplist_rep.cc b/src/rocksdb/util/hash_skiplist_rep.cc
deleted file mode 100644
index 21df9f6..0000000
--- a/src/rocksdb/util/hash_skiplist_rep.cc
+++ /dev/null
@@ -1,336 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef ROCKSDB_LITE
-#include "util/hash_skiplist_rep.h"
-
-#include "rocksdb/memtablerep.h"
-#include "util/arena.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "port/port.h"
-#include "port/atomic_pointer.h"
-#include "util/murmurhash.h"
-#include "db/memtable.h"
-#include "db/skiplist.h"
-
-namespace rocksdb {
-namespace {
-
-class HashSkipListRep : public MemTableRep {
- public:
-  HashSkipListRep(const MemTableRep::KeyComparator& compare, Arena* arena,
-                  const SliceTransform* transform, size_t bucket_size,
-                  int32_t skiplist_height, int32_t skiplist_branching_factor);
-
-  virtual void Insert(KeyHandle handle) override;
-
-  virtual bool Contains(const char* key) const override;
-
-  virtual size_t ApproximateMemoryUsage() override;
-
-  virtual void Get(const LookupKey& k, void* callback_args,
-                   bool (*callback_func)(void* arg,
-                                         const char* entry)) override;
-
-  virtual ~HashSkipListRep();
-
-  virtual MemTableRep::Iterator* GetIterator() override;
-
-  virtual MemTableRep::Iterator* GetIterator(const Slice& slice) override;
-
-  virtual MemTableRep::Iterator* GetDynamicPrefixIterator() override;
-
- private:
-  friend class DynamicIterator;
-  typedef SkipList<const char*, const MemTableRep::KeyComparator&> Bucket;
-
-  size_t bucket_size_;
-
-  const int32_t skiplist_height_;
-  const int32_t skiplist_branching_factor_;
-
-  // Maps slices (which are transformed user keys) to buckets of keys sharing
-  // the same transform.
-  port::AtomicPointer* buckets_;
-
-  // The user-supplied transform whose domain is the user keys.
-  const SliceTransform* transform_;
-
-  const MemTableRep::KeyComparator& compare_;
-  // immutable after construction
-  Arena* const arena_;
-
-  inline size_t GetHash(const Slice& slice) const {
-    return MurmurHash(slice.data(), slice.size(), 0) % bucket_size_;
-  }
-  inline Bucket* GetBucket(size_t i) const {
-    return static_cast<Bucket*>(buckets_[i].Acquire_Load());
-  }
-  inline Bucket* GetBucket(const Slice& slice) const {
-    return GetBucket(GetHash(slice));
-  }
-  // Get a bucket from buckets_. If the bucket hasn't been initialized yet,
-  // initialize it before returning.
-  Bucket* GetInitializedBucket(const Slice& transformed);
-
-  class Iterator : public MemTableRep::Iterator {
-   public:
-    explicit Iterator(Bucket* list, bool own_list = true,
-                      Arena* arena = nullptr)
-        : list_(list), iter_(list), own_list_(own_list), arena_(arena) {}
-
-    virtual ~Iterator() {
-      // if we own the list, we should also delete it
-      if (own_list_) {
-        assert(list_ != nullptr);
-        delete list_;
-      }
-    }
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const {
-      return list_ != nullptr && iter_.Valid();
-    }
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const {
-      assert(Valid());
-      return iter_.key();
-    }
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() {
-      assert(Valid());
-      iter_.Next();
-    }
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() {
-      assert(Valid());
-      iter_.Prev();
-    }
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& internal_key, const char* memtable_key) {
-      if (list_ != nullptr) {
-        const char* encoded_key =
-            (memtable_key != nullptr) ?
-                memtable_key : EncodeKey(&tmp_, internal_key);
-        iter_.Seek(encoded_key);
-      }
-    }
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() {
-      if (list_ != nullptr) {
-        iter_.SeekToFirst();
-      }
-    }
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() {
-      if (list_ != nullptr) {
-        iter_.SeekToLast();
-      }
-    }
-   protected:
-    void Reset(Bucket* list) {
-      if (own_list_) {
-        assert(list_ != nullptr);
-        delete list_;
-      }
-      list_ = list;
-      iter_.SetList(list);
-      own_list_ = false;
-    }
-   private:
-    // if list_ is nullptr, we should NEVER call any methods on iter_
-    // if list_ is nullptr, this Iterator is not Valid()
-    Bucket* list_;
-    Bucket::Iterator iter_;
-    // here we track if we own list_. If we own it, we are also
-    // responsible for it's cleaning. This is a poor man's shared_ptr
-    bool own_list_;
-    std::unique_ptr<Arena> arena_;
-    std::string tmp_;       // For passing to EncodeKey
-  };
-
-  class DynamicIterator : public HashSkipListRep::Iterator {
-   public:
-    explicit DynamicIterator(const HashSkipListRep& memtable_rep)
-      : HashSkipListRep::Iterator(nullptr, false),
-        memtable_rep_(memtable_rep) {}
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& k, const char* memtable_key) {
-      auto transformed = memtable_rep_.transform_->Transform(ExtractUserKey(k));
-      Reset(memtable_rep_.GetBucket(transformed));
-      HashSkipListRep::Iterator::Seek(k, memtable_key);
-    }
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() {
-      // Prefix iterator does not support total order.
-      // We simply set the iterator to invalid state
-      Reset(nullptr);
-    }
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() {
-      // Prefix iterator does not support total order.
-      // We simply set the iterator to invalid state
-      Reset(nullptr);
-    }
-   private:
-    // the underlying memtable
-    const HashSkipListRep& memtable_rep_;
-  };
-
-  class EmptyIterator : public MemTableRep::Iterator {
-    // This is used when there wasn't a bucket. It is cheaper than
-    // instantiating an empty bucket over which to iterate.
-   public:
-    EmptyIterator() { }
-    virtual bool Valid() const {
-      return false;
-    }
-    virtual const char* key() const {
-      assert(false);
-      return nullptr;
-    }
-    virtual void Next() { }
-    virtual void Prev() { }
-    virtual void Seek(const Slice& internal_key,
-                      const char* memtable_key) { }
-    virtual void SeekToFirst() { }
-    virtual void SeekToLast() { }
-   private:
-  };
-};
-
-HashSkipListRep::HashSkipListRep(const MemTableRep::KeyComparator& compare,
-                                 Arena* arena, const SliceTransform* transform,
-                                 size_t bucket_size, int32_t skiplist_height,
-                                 int32_t skiplist_branching_factor)
-    : MemTableRep(arena),
-      bucket_size_(bucket_size),
-      skiplist_height_(skiplist_height),
-      skiplist_branching_factor_(skiplist_branching_factor),
-      transform_(transform),
-      compare_(compare),
-      arena_(arena) {
-  buckets_ = new port::AtomicPointer[bucket_size];
-
-  for (size_t i = 0; i < bucket_size_; ++i) {
-    buckets_[i].NoBarrier_Store(nullptr);
-  }
-}
-
-HashSkipListRep::~HashSkipListRep() {
-  delete[] buckets_;
-}
-
-HashSkipListRep::Bucket* HashSkipListRep::GetInitializedBucket(
-    const Slice& transformed) {
-  size_t hash = GetHash(transformed);
-  auto bucket = GetBucket(hash);
-  if (bucket == nullptr) {
-    auto addr = arena_->AllocateAligned(sizeof(Bucket));
-    bucket = new (addr) Bucket(compare_, arena_, skiplist_height_,
-                               skiplist_branching_factor_);
-    buckets_[hash].Release_Store(static_cast<void*>(bucket));
-  }
-  return bucket;
-}
-
-void HashSkipListRep::Insert(KeyHandle handle) {
-  auto* key = static_cast<char*>(handle);
-  assert(!Contains(key));
-  auto transformed = transform_->Transform(UserKey(key));
-  auto bucket = GetInitializedBucket(transformed);
-  bucket->Insert(key);
-}
-
-bool HashSkipListRep::Contains(const char* key) const {
-  auto transformed = transform_->Transform(UserKey(key));
-  auto bucket = GetBucket(transformed);
-  if (bucket == nullptr) {
-    return false;
-  }
-  return bucket->Contains(key);
-}
-
-size_t HashSkipListRep::ApproximateMemoryUsage() {
-  return sizeof(buckets_);
-}
-
-void HashSkipListRep::Get(const LookupKey& k, void* callback_args,
-                          bool (*callback_func)(void* arg, const char* entry)) {
-  auto transformed = transform_->Transform(k.user_key());
-  auto bucket = GetBucket(transformed);
-  if (bucket != nullptr) {
-    Bucket::Iterator iter(bucket);
-    for (iter.Seek(k.memtable_key().data());
-         iter.Valid() && callback_func(callback_args, iter.key());
-         iter.Next()) {
-    }
-  }
-}
-
-MemTableRep::Iterator* HashSkipListRep::GetIterator() {
-  // allocate a new arena of similar size to the one currently in use
-  Arena* new_arena = new Arena(arena_->BlockSize());
-  auto list = new Bucket(compare_, new_arena);
-  for (size_t i = 0; i < bucket_size_; ++i) {
-    auto bucket = GetBucket(i);
-    if (bucket != nullptr) {
-      Bucket::Iterator itr(bucket);
-      for (itr.SeekToFirst(); itr.Valid(); itr.Next()) {
-        list->Insert(itr.key());
-      }
-    }
-  }
-  return new Iterator(list, true, new_arena);
-}
-
-MemTableRep::Iterator* HashSkipListRep::GetIterator(const Slice& slice) {
-  auto bucket = GetBucket(transform_->Transform(slice));
-  if (bucket == nullptr) {
-    return new EmptyIterator();
-  }
-  return new Iterator(bucket, false);
-}
-
-MemTableRep::Iterator* HashSkipListRep::GetDynamicPrefixIterator() {
-  return new DynamicIterator(*this);
-}
-
-} // anon namespace
-
-MemTableRep* HashSkipListRepFactory::CreateMemTableRep(
-    const MemTableRep::KeyComparator& compare, Arena* arena,
-    const SliceTransform* transform) {
-  return new HashSkipListRep(compare, arena, transform, bucket_count_,
-                             skiplist_height_, skiplist_branching_factor_);
-}
-
-MemTableRepFactory* NewHashSkipListRepFactory(
-    size_t bucket_count, int32_t skiplist_height,
-    int32_t skiplist_branching_factor) {
-  return new HashSkipListRepFactory(bucket_count, skiplist_height,
-      skiplist_branching_factor);
-}
-
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/hash_skiplist_rep.h b/src/rocksdb/util/hash_skiplist_rep.h
deleted file mode 100644
index 16903c6..0000000
--- a/src/rocksdb/util/hash_skiplist_rep.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/memtablerep.h"
-
-namespace rocksdb {
-
-class HashSkipListRepFactory : public MemTableRepFactory {
- public:
-  explicit HashSkipListRepFactory(
-    size_t bucket_count,
-    int32_t skiplist_height,
-    int32_t skiplist_branching_factor)
-      : bucket_count_(bucket_count),
-        skiplist_height_(skiplist_height),
-        skiplist_branching_factor_(skiplist_branching_factor) { }
-
-  virtual ~HashSkipListRepFactory() {}
-
-  virtual MemTableRep* CreateMemTableRep(
-      const MemTableRep::KeyComparator& compare, Arena* arena,
-      const SliceTransform* transform) override;
-
-  virtual const char* Name() const override {
-    return "HashSkipListRepFactory";
-  }
-
- private:
-  const size_t bucket_count_;
-  const int32_t skiplist_height_;
-  const int32_t skiplist_branching_factor_;
-};
-
-}
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/histogram.cc b/src/rocksdb/util/histogram.cc
deleted file mode 100644
index 968769c..0000000
--- a/src/rocksdb/util/histogram.cc
+++ /dev/null
@@ -1,198 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/histogram.h"
-
-#include <cassert>
-#include <math.h>
-#include <stdio.h>
-#include "port/port.h"
-
-namespace rocksdb {
-
-HistogramBucketMapper::HistogramBucketMapper()
-    :
-      // Add newer bucket index here.
-      // Should be alwyas added in sorted order.
-      // If you change this, you also need to change
-      // size of array buckets_ in HistogramImpl
-      bucketValues_(
-          {1,         2,         3,         4,         5,         6,
-           7,         8,         9,         10,        12,        14,
-           16,        18,        20,        25,        30,        35,
-           40,        45,        50,        60,        70,        80,
-           90,        100,       120,       140,       160,       180,
-           200,       250,       300,       350,       400,       450,
-           500,       600,       700,       800,       900,       1000,
-           1200,      1400,      1600,      1800,      2000,      2500,
-           3000,      3500,      4000,      4500,      5000,      6000,
-           7000,      8000,      9000,      10000,     12000,     14000,
-           16000,     18000,     20000,     25000,     30000,     35000,
-           40000,     45000,     50000,     60000,     70000,     80000,
-           90000,     100000,    120000,    140000,    160000,    180000,
-           200000,    250000,    300000,    350000,    400000,    450000,
-           500000,    600000,    700000,    800000,    900000,    1000000,
-           1200000,   1400000,   1600000,   1800000,   2000000,   2500000,
-           3000000,   3500000,   4000000,   4500000,   5000000,   6000000,
-           7000000,   8000000,   9000000,   10000000,  12000000,  14000000,
-           16000000,  18000000,  20000000,  25000000,  30000000,  35000000,
-           40000000,  45000000,  50000000,  60000000,  70000000,  80000000,
-           90000000,  100000000, 120000000, 140000000, 160000000, 180000000,
-           200000000, 250000000, 300000000, 350000000, 400000000, 450000000,
-           500000000, 600000000, 700000000, 800000000, 900000000, 1000000000}),
-      maxBucketValue_(bucketValues_.back()),
-      minBucketValue_(bucketValues_.front()) {
-  for (size_t i =0; i < bucketValues_.size(); ++i) {
-    valueIndexMap_[bucketValues_[i]] = i;
-  }
-}
-
-const size_t HistogramBucketMapper::IndexForValue(const uint64_t value) const {
-  if (value >= maxBucketValue_) {
-    return bucketValues_.size() - 1;
-  } else if ( value >= minBucketValue_ ) {
-    std::map<uint64_t, uint64_t>::const_iterator lowerBound =
-      valueIndexMap_.lower_bound(value);
-    if (lowerBound != valueIndexMap_.end()) {
-      return lowerBound->second;
-    } else {
-      return 0;
-    }
-  } else {
-    return 0;
-  }
-}
-
-namespace {
-  const HistogramBucketMapper bucketMapper;
-}
-
-void HistogramImpl::Clear() {
-  min_ = bucketMapper.LastValue();
-  max_ = 0;
-  num_ = 0;
-  sum_ = 0;
-  sum_squares_ = 0;
-  memset(buckets_, 0, sizeof buckets_);
-}
-
-bool HistogramImpl::Empty() { return sum_squares_ == 0; }
-
-void HistogramImpl::Add(uint64_t value) {
-  const size_t index = bucketMapper.IndexForValue(value);
-  buckets_[index] += 1;
-  if (min_ > value) min_ = value;
-  if (max_ < value) max_ = value;
-  num_++;
-  sum_ += value;
-  sum_squares_ += (value * value);
-}
-
-void HistogramImpl::Merge(const HistogramImpl& other) {
-  if (other.min_ < min_) min_ = other.min_;
-  if (other.max_ > max_) max_ = other.max_;
-  num_ += other.num_;
-  sum_ += other.sum_;
-  sum_squares_ += other.sum_squares_;
-  for (unsigned int b = 0; b < bucketMapper.BucketCount(); b++) {
-    buckets_[b] += other.buckets_[b];
-  }
-}
-
-double HistogramImpl::Median() const {
-  return Percentile(50.0);
-}
-
-double HistogramImpl::Percentile(double p) const {
-  double threshold = num_ * (p / 100.0);
-  double sum = 0;
-  for (unsigned int b = 0; b < bucketMapper.BucketCount(); b++) {
-    sum += buckets_[b];
-    if (sum >= threshold) {
-      // Scale linearly within this bucket
-      double left_point = (b == 0) ? 0 : bucketMapper.BucketLimit(b-1);
-      double right_point = bucketMapper.BucketLimit(b);
-      double left_sum = sum - buckets_[b];
-      double right_sum = sum;
-      double pos = 0;
-      double right_left_diff = right_sum - left_sum;
-      if (right_left_diff != 0) {
-       pos = (threshold - left_sum) / (right_sum - left_sum);
-      }
-      double r = left_point + (right_point - left_point) * pos;
-      if (r < min_) r = min_;
-      if (r > max_) r = max_;
-      return r;
-    }
-  }
-  return max_;
-}
-
-double HistogramImpl::Average() const {
-  if (num_ == 0.0) return 0;
-  return sum_ / num_;
-}
-
-double HistogramImpl::StandardDeviation() const {
-  if (num_ == 0.0) return 0;
-  double variance = (sum_squares_ * num_ - sum_ * sum_) / (num_ * num_);
-  return sqrt(variance);
-}
-
-std::string HistogramImpl::ToString() const {
-  std::string r;
-  char buf[200];
-  snprintf(buf, sizeof(buf),
-           "Count: %.0f  Average: %.4f  StdDev: %.2f\n",
-           num_, Average(), StandardDeviation());
-  r.append(buf);
-  snprintf(buf, sizeof(buf),
-           "Min: %.4f  Median: %.4f  Max: %.4f\n",
-           (num_ == 0.0 ? 0.0 : min_), Median(), max_);
-  r.append(buf);
-  snprintf(buf, sizeof(buf),
-           "Percentiles: "
-           "P50: %.2f P75: %.2f P99: %.2f P99.9: %.2f P99.99: %.2f\n",
-           Percentile(50), Percentile(75), Percentile(99), Percentile(99.9),
-           Percentile(99.99));
-  r.append(buf);
-  r.append("------------------------------------------------------\n");
-  const double mult = 100.0 / num_;
-  double sum = 0;
-  for (unsigned int b = 0; b < bucketMapper.BucketCount(); b++) {
-    if (buckets_[b] <= 0.0) continue;
-    sum += buckets_[b];
-    snprintf(buf, sizeof(buf),
-             "[ %7lu, %7lu ) %8lu %7.3f%% %7.3f%% ",
-             // left
-             (unsigned long)((b == 0) ? 0 : bucketMapper.BucketLimit(b-1)),
-             (unsigned long)bucketMapper.BucketLimit(b), // right
-             (unsigned long)buckets_[b],                 // count
-             (mult * buckets_[b]),        // percentage
-             (mult * sum));               // cumulative percentage
-    r.append(buf);
-
-    // Add hash marks based on percentage; 20 marks for 100%.
-    int marks = static_cast<int>(20*(buckets_[b] / num_) + 0.5);
-    r.append(marks, '#');
-    r.push_back('\n');
-  }
-  return r;
-}
-
-void HistogramImpl::Data(HistogramData * const data) const {
-  assert(data);
-  data->median = Median();
-  data->percentile95 = Percentile(95);
-  data->percentile99 = Percentile(99);
-  data->average = Average();
-  data->standard_deviation = StandardDeviation();
-}
-
-} // namespace levedb
diff --git a/src/rocksdb/util/histogram.h b/src/rocksdb/util/histogram.h
deleted file mode 100644
index d95588d..0000000
--- a/src/rocksdb/util/histogram.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "rocksdb/statistics.h"
-
-#include <cassert>
-#include <string>
-#include <vector>
-#include <map>
-
-namespace rocksdb {
-
-class HistogramBucketMapper {
- public:
-
-  HistogramBucketMapper();
-
-  // converts a value to the bucket index.
-  const size_t IndexForValue(const uint64_t value) const;
-  // number of buckets required.
-
-  const size_t BucketCount() const {
-    return bucketValues_.size();
-  }
-
-  uint64_t LastValue() const {
-    return maxBucketValue_;
-  }
-
-  uint64_t FirstValue() const {
-    return minBucketValue_;
-  }
-
-  uint64_t BucketLimit(const uint64_t bucketNumber) const {
-    assert(bucketNumber < BucketCount());
-    return bucketValues_[bucketNumber];
-  }
-
- private:
-  const std::vector<uint64_t> bucketValues_;
-  const uint64_t maxBucketValue_;
-  const uint64_t minBucketValue_;
-  std::map<uint64_t, uint64_t> valueIndexMap_;
-};
-
-class HistogramImpl {
- public:
-  virtual void Clear();
-  virtual bool Empty();
-  virtual void Add(uint64_t value);
-  void Merge(const HistogramImpl& other);
-
-  virtual std::string ToString() const;
-
-  virtual double Median() const;
-  virtual double Percentile(double p) const;
-  virtual double Average() const;
-  virtual double StandardDeviation() const;
-  virtual void Data(HistogramData * const data) const;
-
- private:
-  // To be able to use HistogramImpl as thread local variable, its constructor
-  // has to be static. That's why we're using manually values from BucketMapper
-  double min_ = 1000000000;  // this is BucketMapper:LastValue()
-  double max_ = 0;
-  double num_ = 0;
-  double sum_ = 0;
-  double sum_squares_ = 0;
-  uint64_t buckets_[138] = {0};  // this is BucketMapper::BucketCount()
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/histogram_test.cc b/src/rocksdb/util/histogram_test.cc
deleted file mode 100644
index 065f957..0000000
--- a/src/rocksdb/util/histogram_test.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "util/histogram.h"
-
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-class HistogramTest { };
-
-TEST(HistogramTest, BasicOperation) {
-
-  HistogramImpl histogram;
-  for (uint64_t i = 1; i <= 100; i++) {
-    histogram.Add(i);
-  }
-
-  {
-    double median = histogram.Median();
-    // ASSERT_LE(median, 50);
-    ASSERT_GT(median, 0);
-  }
-
-  {
-    double percentile100 = histogram.Percentile(100.0);
-    ASSERT_LE(percentile100, 100.0);
-    ASSERT_GT(percentile100, 0.0);
-    double percentile99 = histogram.Percentile(99.0);
-    double percentile85 = histogram.Percentile(85.0);
-    ASSERT_LE(percentile99, 99.0);
-    ASSERT_TRUE(percentile99 >= percentile85);
-  }
-
-  ASSERT_EQ(histogram.Average(), 50.5); // avg is acurately caluclated.
-}
-
-TEST(HistogramTest, EmptyHistogram) {
-  HistogramImpl histogram;
-  ASSERT_EQ(histogram.Median(), 0.0);
-  ASSERT_EQ(histogram.Percentile(85.0), 0.0);
-  ASSERT_EQ(histogram.Average(), 0.0);
-}
-
-TEST(HistogramTest, ClearHistogram) {
-  HistogramImpl histogram;
-  for (uint64_t i = 1; i <= 100; i++) {
-    histogram.Add(i);
-  }
-  histogram.Clear();
-  ASSERT_EQ(histogram.Median(), 0);
-  ASSERT_EQ(histogram.Percentile(85.0), 0);
-  ASSERT_EQ(histogram.Average(), 0);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/ldb_cmd.cc b/src/rocksdb/util/ldb_cmd.cc
deleted file mode 100644
index 597179f..0000000
--- a/src/rocksdb/util/ldb_cmd.cc
+++ /dev/null
@@ -1,1839 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef ROCKSDB_LITE
-#include "util/ldb_cmd.h"
-
-#include "db/dbformat.h"
-#include "db/db_impl.h"
-#include "db/log_reader.h"
-#include "db/filename.h"
-#include "db/write_batch_internal.h"
-#include "rocksdb/write_batch.h"
-#include "rocksdb/cache.h"
-#include "util/coding.h"
-#include "utilities/ttl/db_ttl_impl.h"
-
-#include <ctime>
-#include <dirent.h>
-#include <sstream>
-#include <string>
-#include <stdexcept>
-
-namespace rocksdb {
-
-using namespace std;
-
-const string LDBCommand::ARG_DB = "db";
-const string LDBCommand::ARG_HEX = "hex";
-const string LDBCommand::ARG_KEY_HEX = "key_hex";
-const string LDBCommand::ARG_VALUE_HEX = "value_hex";
-const string LDBCommand::ARG_TTL = "ttl";
-const string LDBCommand::ARG_TTL_START = "start_time";
-const string LDBCommand::ARG_TTL_END = "end_time";
-const string LDBCommand::ARG_TIMESTAMP = "timestamp";
-const string LDBCommand::ARG_FROM = "from";
-const string LDBCommand::ARG_TO = "to";
-const string LDBCommand::ARG_MAX_KEYS = "max_keys";
-const string LDBCommand::ARG_BLOOM_BITS = "bloom_bits";
-const string LDBCommand::ARG_COMPRESSION_TYPE = "compression_type";
-const string LDBCommand::ARG_BLOCK_SIZE = "block_size";
-const string LDBCommand::ARG_AUTO_COMPACTION = "auto_compaction";
-const string LDBCommand::ARG_WRITE_BUFFER_SIZE = "write_buffer_size";
-const string LDBCommand::ARG_FILE_SIZE = "file_size";
-const string LDBCommand::ARG_CREATE_IF_MISSING = "create_if_missing";
-
-const char* LDBCommand::DELIM = " ==> ";
-
-LDBCommand* LDBCommand::InitFromCmdLineArgs(
-  int argc,
-  char** argv,
-  const Options& options
-) {
-  vector<string> args;
-  for (int i = 1; i < argc; i++) {
-    args.push_back(argv[i]);
-  }
-  return InitFromCmdLineArgs(args, options);
-}
-
-/**
- * Parse the command-line arguments and create the appropriate LDBCommand2
- * instance.
- * The command line arguments must be in the following format:
- * ./ldb --db=PATH_TO_DB [--commonOpt1=commonOpt1Val] ..
- *        COMMAND <PARAM1> <PARAM2> ... [-cmdSpecificOpt1=cmdSpecificOpt1Val] ..
- * This is similar to the command line format used by HBaseClientTool.
- * Command name is not included in args.
- * Returns nullptr if the command-line cannot be parsed.
- */
-LDBCommand* LDBCommand::InitFromCmdLineArgs(
-  const vector<string>& args,
-  const Options& options
-) {
-  // --x=y command line arguments are added as x->y map entries.
-  map<string, string> option_map;
-
-  // Command-line arguments of the form --hex end up in this array as hex
-  vector<string> flags;
-
-  // Everything other than option_map and flags. Represents commands
-  // and their parameters.  For eg: put key1 value1 go into this vector.
-  vector<string> cmdTokens;
-
-  const string OPTION_PREFIX = "--";
-
-  for (const auto& arg : args) {
-    if (arg[0] == '-' && arg[1] == '-'){
-      vector<string> splits = stringSplit(arg, '=');
-      if (splits.size() == 2) {
-        string optionKey = splits[0].substr(OPTION_PREFIX.size());
-        option_map[optionKey] = splits[1];
-      } else {
-        string optionKey = splits[0].substr(OPTION_PREFIX.size());
-        flags.push_back(optionKey);
-      }
-    } else {
-      cmdTokens.push_back(arg);
-    }
-  }
-
-  if (cmdTokens.size() < 1) {
-    fprintf(stderr, "Command not specified!");
-    return nullptr;
-  }
-
-  string cmd = cmdTokens[0];
-  vector<string> cmdParams(cmdTokens.begin()+1, cmdTokens.end());
-  LDBCommand* command = LDBCommand::SelectCommand(
-    cmd,
-    cmdParams,
-    option_map,
-    flags
-  );
-
-  if (command) {
-    command->SetOptions(options);
-  }
-  return command;
-}
-
-LDBCommand* LDBCommand::SelectCommand(
-    const std::string& cmd,
-    const vector<string>& cmdParams,
-    const map<string, string>& option_map,
-    const vector<string>& flags
-  ) {
-
-  if (cmd == GetCommand::Name()) {
-    return new GetCommand(cmdParams, option_map, flags);
-  } else if (cmd == PutCommand::Name()) {
-    return new PutCommand(cmdParams, option_map, flags);
-  } else if (cmd == BatchPutCommand::Name()) {
-    return new BatchPutCommand(cmdParams, option_map, flags);
-  } else if (cmd == ScanCommand::Name()) {
-    return new ScanCommand(cmdParams, option_map, flags);
-  } else if (cmd == DeleteCommand::Name()) {
-    return new DeleteCommand(cmdParams, option_map, flags);
-  } else if (cmd == ApproxSizeCommand::Name()) {
-    return new ApproxSizeCommand(cmdParams, option_map, flags);
-  } else if (cmd == DBQuerierCommand::Name()) {
-    return new DBQuerierCommand(cmdParams, option_map, flags);
-  } else if (cmd == CompactorCommand::Name()) {
-    return new CompactorCommand(cmdParams, option_map, flags);
-  } else if (cmd == WALDumperCommand::Name()) {
-    return new WALDumperCommand(cmdParams, option_map, flags);
-  } else if (cmd == ReduceDBLevelsCommand::Name()) {
-    return new ReduceDBLevelsCommand(cmdParams, option_map, flags);
-  } else if (cmd == ChangeCompactionStyleCommand::Name()) {
-    return new ChangeCompactionStyleCommand(cmdParams, option_map, flags);
-  } else if (cmd == DBDumperCommand::Name()) {
-    return new DBDumperCommand(cmdParams, option_map, flags);
-  } else if (cmd == DBLoaderCommand::Name()) {
-    return new DBLoaderCommand(cmdParams, option_map, flags);
-  } else if (cmd == ManifestDumpCommand::Name()) {
-    return new ManifestDumpCommand(cmdParams, option_map, flags);
-  } else if (cmd == ListColumnFamiliesCommand::Name()) {
-    return new ListColumnFamiliesCommand(cmdParams, option_map, flags);
-  } else if (cmd == InternalDumpCommand::Name()) {
-    return new InternalDumpCommand(cmdParams, option_map, flags);
-  } else if (cmd == CheckConsistencyCommand::Name()) {
-    return new CheckConsistencyCommand(cmdParams, option_map, flags);
-  }
-  return nullptr;
-}
-
-
-/**
- * Parses the specific integer option and fills in the value.
- * Returns true if the option is found.
- * Returns false if the option is not found or if there is an error parsing the
- * value.  If there is an error, the specified exec_state is also
- * updated.
- */
-bool LDBCommand::ParseIntOption(const map<string, string>& options,
-                                const string& option, int& value,
-                                LDBCommandExecuteResult& exec_state) {
-
-  map<string, string>::const_iterator itr = option_map_.find(option);
-  if (itr != option_map_.end()) {
-    try {
-      value = stoi(itr->second);
-      return true;
-    } catch(const invalid_argument&) {
-      exec_state = LDBCommandExecuteResult::FAILED(option +
-                      " has an invalid value.");
-    } catch(const out_of_range&) {
-      exec_state = LDBCommandExecuteResult::FAILED(option +
-                      " has a value out-of-range.");
-    }
-  }
-  return false;
-}
-
-/**
- * Parses the specified option and fills in the value.
- * Returns true if the option is found.
- * Returns false otherwise.
- */
-bool LDBCommand::ParseStringOption(const map<string, string>& options,
-                                   const string& option, string* value) {
-  auto itr = option_map_.find(option);
-  if (itr != option_map_.end()) {
-    *value = itr->second;
-    return true;
-  }
-  return false;
-}
-
-Options LDBCommand::PrepareOptionsForOpenDB() {
-
-  Options opt = options_;
-  opt.create_if_missing = false;
-
-  map<string, string>::const_iterator itr;
-
-  int bits;
-  if (ParseIntOption(option_map_, ARG_BLOOM_BITS, bits, exec_state_)) {
-    if (bits > 0) {
-      opt.filter_policy = NewBloomFilterPolicy(bits);
-    } else {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_BLOOM_BITS +
-                      " must be > 0.");
-    }
-  }
-
-  int block_size;
-  if (ParseIntOption(option_map_, ARG_BLOCK_SIZE, block_size, exec_state_)) {
-    if (block_size > 0) {
-      opt.block_size = block_size;
-    } else {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_BLOCK_SIZE +
-                      " must be > 0.");
-    }
-  }
-
-  itr = option_map_.find(ARG_AUTO_COMPACTION);
-  if (itr != option_map_.end()) {
-    opt.disable_auto_compactions = ! StringToBool(itr->second);
-  }
-
-  itr = option_map_.find(ARG_COMPRESSION_TYPE);
-  if (itr != option_map_.end()) {
-    string comp = itr->second;
-    if (comp == "no") {
-      opt.compression = kNoCompression;
-    } else if (comp == "snappy") {
-      opt.compression = kSnappyCompression;
-    } else if (comp == "zlib") {
-      opt.compression = kZlibCompression;
-    } else if (comp == "bzip2") {
-      opt.compression = kBZip2Compression;
-    } else if (comp == "lz4") {
-      opt.compression = kLZ4Compression;
-    } else if (comp == "lz4hc") {
-      opt.compression = kLZ4HCCompression;
-    } else {
-      // Unknown compression.
-      exec_state_ = LDBCommandExecuteResult::FAILED(
-                      "Unknown compression level: " + comp);
-    }
-  }
-
-  int write_buffer_size;
-  if (ParseIntOption(option_map_, ARG_WRITE_BUFFER_SIZE, write_buffer_size,
-        exec_state_)) {
-    if (write_buffer_size > 0) {
-      opt.write_buffer_size = write_buffer_size;
-    } else {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_WRITE_BUFFER_SIZE +
-                      " must be > 0.");
-    }
-  }
-
-  int file_size;
-  if (ParseIntOption(option_map_, ARG_FILE_SIZE, file_size, exec_state_)) {
-    if (file_size > 0) {
-      opt.target_file_size_base = file_size;
-    } else {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_FILE_SIZE +
-                      " must be > 0.");
-    }
-  }
-
-  return opt;
-}
-
-bool LDBCommand::ParseKeyValue(const string& line, string* key, string* value,
-                              bool is_key_hex, bool is_value_hex) {
-  size_t pos = line.find(DELIM);
-  if (pos != string::npos) {
-    *key = line.substr(0, pos);
-    *value = line.substr(pos + strlen(DELIM));
-    if (is_key_hex) {
-      *key = HexToString(*key);
-    }
-    if (is_value_hex) {
-      *value = HexToString(*value);
-    }
-    return true;
-  } else {
-    return false;
-  }
-}
-
-/**
- * Make sure that ONLY the command-line options and flags expected by this
- * command are specified on the command-line.  Extraneous options are usually
- * the result of user error.
- * Returns true if all checks pass.  Else returns false, and prints an
- * appropriate error msg to stderr.
- */
-bool LDBCommand::ValidateCmdLineOptions() {
-
-  for (map<string, string>::const_iterator itr = option_map_.begin();
-        itr != option_map_.end(); itr++) {
-    if (find(valid_cmd_line_options_.begin(),
-          valid_cmd_line_options_.end(), itr->first) ==
-          valid_cmd_line_options_.end()) {
-      fprintf(stderr, "Invalid command-line option %s\n", itr->first.c_str());
-      return false;
-    }
-  }
-
-  for (vector<string>::const_iterator itr = flags_.begin();
-        itr != flags_.end(); itr++) {
-    if (find(valid_cmd_line_options_.begin(),
-          valid_cmd_line_options_.end(), *itr) ==
-          valid_cmd_line_options_.end()) {
-      fprintf(stderr, "Invalid command-line flag %s\n", itr->c_str());
-      return false;
-    }
-  }
-
-  if (!NoDBOpen() && option_map_.find(ARG_DB) == option_map_.end()) {
-    fprintf(stderr, "%s must be specified\n", ARG_DB.c_str());
-    return false;
-  }
-
-  return true;
-}
-
-CompactorCommand::CompactorCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, false,
-               BuildCmdLineOptions({ARG_FROM, ARG_TO, ARG_HEX, ARG_KEY_HEX,
-                                    ARG_VALUE_HEX, ARG_TTL})),
-    null_from_(true), null_to_(true) {
-
-  map<string, string>::const_iterator itr = options.find(ARG_FROM);
-  if (itr != options.end()) {
-    null_from_ = false;
-    from_ = itr->second;
-  }
-
-  itr = options.find(ARG_TO);
-  if (itr != options.end()) {
-    null_to_ = false;
-    to_ = itr->second;
-  }
-
-  if (is_key_hex_) {
-    if (!null_from_) {
-      from_ = HexToString(from_);
-    }
-    if (!null_to_) {
-      to_ = HexToString(to_);
-    }
-  }
-}
-
-void CompactorCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(CompactorCommand::Name());
-  ret.append(HelpRangeCmdArgs());
-  ret.append("\n");
-}
-
-void CompactorCommand::DoCommand() {
-
-  Slice* begin = nullptr;
-  Slice* end = nullptr;
-  if (!null_from_) {
-    begin = new Slice(from_);
-  }
-  if (!null_to_) {
-    end = new Slice(to_);
-  }
-
-  db_->CompactRange(begin, end);
-  exec_state_ = LDBCommandExecuteResult::SUCCEED("");
-
-  delete begin;
-  delete end;
-}
-
-const string DBLoaderCommand::ARG_DISABLE_WAL = "disable_wal";
-const string DBLoaderCommand::ARG_BULK_LOAD = "bulk_load";
-const string DBLoaderCommand::ARG_COMPACT = "compact";
-
-DBLoaderCommand::DBLoaderCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, false,
-               BuildCmdLineOptions({ARG_HEX, ARG_KEY_HEX, ARG_VALUE_HEX,
-                                    ARG_FROM, ARG_TO, ARG_CREATE_IF_MISSING,
-                                    ARG_DISABLE_WAL, ARG_BULK_LOAD,
-                                    ARG_COMPACT})),
-    create_if_missing_(false), disable_wal_(false), bulk_load_(false),
-    compact_(false) {
-
-  create_if_missing_ = IsFlagPresent(flags, ARG_CREATE_IF_MISSING);
-  disable_wal_ = IsFlagPresent(flags, ARG_DISABLE_WAL);
-  bulk_load_ = IsFlagPresent(flags, ARG_BULK_LOAD);
-  compact_ = IsFlagPresent(flags, ARG_COMPACT);
-}
-
-void DBLoaderCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(DBLoaderCommand::Name());
-  ret.append(" [--" + ARG_CREATE_IF_MISSING + "]");
-  ret.append(" [--" + ARG_DISABLE_WAL + "]");
-  ret.append(" [--" + ARG_BULK_LOAD + "]");
-  ret.append(" [--" + ARG_COMPACT + "]");
-  ret.append("\n");
-}
-
-Options DBLoaderCommand::PrepareOptionsForOpenDB() {
-  Options opt = LDBCommand::PrepareOptionsForOpenDB();
-  opt.create_if_missing = create_if_missing_;
-  if (bulk_load_) {
-    opt.PrepareForBulkLoad();
-  }
-  return opt;
-}
-
-void DBLoaderCommand::DoCommand() {
-  if (!db_) {
-    return;
-  }
-
-  WriteOptions write_options;
-  if (disable_wal_) {
-    write_options.disableWAL = true;
-  }
-
-  int bad_lines = 0;
-  string line;
-  while (getline(cin, line, '\n')) {
-    string key;
-    string value;
-    if (ParseKeyValue(line, &key, &value, is_key_hex_, is_value_hex_)) {
-      db_->Put(write_options, Slice(key), Slice(value));
-    } else if (0 == line.find("Keys in range:")) {
-      // ignore this line
-    } else if (0 == line.find("Created bg thread 0x")) {
-      // ignore this line
-    } else {
-      bad_lines ++;
-    }
-  }
-
-  if (bad_lines > 0) {
-    cout << "Warning: " << bad_lines << " bad lines ignored." << endl;
-  }
-  if (compact_) {
-    db_->CompactRange(nullptr, nullptr);
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-const string ManifestDumpCommand::ARG_VERBOSE = "verbose";
-const string ManifestDumpCommand::ARG_PATH    = "path";
-
-void ManifestDumpCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(ManifestDumpCommand::Name());
-  ret.append(" [--" + ARG_VERBOSE + "]");
-  ret.append(" [--" + ARG_PATH + "=<path_to_manifest_file>]");
-  ret.append("\n");
-}
-
-ManifestDumpCommand::ManifestDumpCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, false,
-               BuildCmdLineOptions({ARG_VERBOSE, ARG_PATH, ARG_HEX})),
-    verbose_(false),
-    path_("")
-{
-  verbose_ = IsFlagPresent(flags, ARG_VERBOSE);
-
-  map<string, string>::const_iterator itr = options.find(ARG_PATH);
-  if (itr != options.end()) {
-    path_ = itr->second;
-    if (path_.empty()) {
-      exec_state_ = LDBCommandExecuteResult::FAILED("--path: missing pathname");
-    }
-  }
-}
-
-void ManifestDumpCommand::DoCommand() {
-
-  std::string manifestfile;
-
-  if (!path_.empty()) {
-    manifestfile = path_;
-  } else {
-    bool found = false;
-    // We need to find the manifest file by searching the directory
-    // containing the db for files of the form MANIFEST_[0-9]+
-    DIR* d = opendir(db_path_.c_str());
-    if (d == nullptr) {
-      exec_state_ = LDBCommandExecuteResult::FAILED(
-        db_path_ + " is not a directory");
-      return;
-    }
-    struct dirent* entry;
-    while ((entry = readdir(d)) != nullptr) {
-      unsigned int match;
-      unsigned long long num;
-      if (sscanf(entry->d_name,
-                 "MANIFEST-%ln%ln",
-                 (unsigned long*)&num,
-                 (unsigned long*)&match)
-          && match == strlen(entry->d_name)) {
-        if (!found) {
-          manifestfile = db_path_ + "/" + std::string(entry->d_name);
-          found = true;
-        } else {
-          exec_state_ = LDBCommandExecuteResult::FAILED(
-            "Multiple MANIFEST files found; use --path to select one");
-          return;
-        }
-      }
-    }
-    closedir(d);
-  }
-
-  if (verbose_) {
-    printf("Processing Manifest file %s\n", manifestfile.c_str());
-  }
-
-  Options options;
-  EnvOptions sopt;
-  std::string file(manifestfile);
-  std::string dbname("dummy");
-  std::shared_ptr<Cache> tc(NewLRUCache(
-      options.max_open_files - 10, options.table_cache_numshardbits,
-      options.table_cache_remove_scan_count_limit));
-  VersionSet* versions = new VersionSet(dbname, &options, sopt, tc.get());
-  Status s = versions->DumpManifest(options, file, verbose_, is_key_hex_);
-  if (!s.ok()) {
-    printf("Error in processing file %s %s\n", manifestfile.c_str(),
-           s.ToString().c_str());
-  }
-  if (verbose_) {
-    printf("Processing Manifest file %s done\n", manifestfile.c_str());
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-void ListColumnFamiliesCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(ListColumnFamiliesCommand::Name());
-  ret.append(" full_path_to_db_directory ");
-  ret.append("\n");
-}
-
-ListColumnFamiliesCommand::ListColumnFamiliesCommand(
-    const vector<string>& params, const map<string, string>& options,
-    const vector<string>& flags)
-    : LDBCommand(options, flags, false, {}) {
-
-  if (params.size() != 1) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-        "dbname must be specified for the list_column_families command");
-  } else {
-    dbname_ = params[0];
-  }
-}
-
-void ListColumnFamiliesCommand::DoCommand() {
-  vector<string> column_families;
-  Status s = DB::ListColumnFamilies(DBOptions(), dbname_, &column_families);
-  if (!s.ok()) {
-    printf("Error in processing db %s %s\n", dbname_.c_str(),
-           s.ToString().c_str());
-  } else {
-    printf("Column families in %s: \n{", dbname_.c_str());
-    bool first = true;
-    for (auto cf : column_families) {
-      if (!first) {
-        printf(", ");
-      }
-      first = false;
-      printf("%s", cf.c_str());
-    }
-    printf("}\n");
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-namespace {
-
-string ReadableTime(int unixtime) {
-  char time_buffer [80];
-  time_t rawtime = unixtime;
-  struct tm * timeinfo = localtime(&rawtime);
-  strftime(time_buffer, 80, "%c", timeinfo);
-  return string(time_buffer);
-}
-
-// This function only called when it's the sane case of >1 buckets in time-range
-// Also called only when timekv falls between ttl_start and ttl_end provided
-void IncBucketCounts(vector<uint64_t>& bucket_counts, int ttl_start,
-      int time_range, int bucket_size, int timekv, int num_buckets) {
-  assert(time_range > 0 && timekv >= ttl_start && bucket_size > 0 &&
-    timekv < (ttl_start + time_range) && num_buckets > 1);
-  int bucket = (timekv - ttl_start) / bucket_size;
-  bucket_counts[bucket]++;
-}
-
-void PrintBucketCounts(const vector<uint64_t>& bucket_counts, int ttl_start,
-      int ttl_end, int bucket_size, int num_buckets) {
-  int time_point = ttl_start;
-  for(int i = 0; i < num_buckets - 1; i++, time_point += bucket_size) {
-    fprintf(stdout, "Keys in range %s to %s : %lu\n",
-            ReadableTime(time_point).c_str(),
-            ReadableTime(time_point + bucket_size).c_str(),
-            (unsigned long)bucket_counts[i]);
-  }
-  fprintf(stdout, "Keys in range %s to %s : %lu\n",
-          ReadableTime(time_point).c_str(),
-          ReadableTime(ttl_end).c_str(),
-          (unsigned long)bucket_counts[num_buckets - 1]);
-}
-
-}  // namespace
-
-const string InternalDumpCommand::ARG_COUNT_ONLY = "count_only";
-const string InternalDumpCommand::ARG_COUNT_DELIM = "count_delim";
-const string InternalDumpCommand::ARG_STATS = "stats";
-const string InternalDumpCommand::ARG_INPUT_KEY_HEX = "input_key_hex";
-
-InternalDumpCommand::InternalDumpCommand(const vector<string>& params,
-                                         const map<string, string>& options,
-                                         const vector<string>& flags) :
-    LDBCommand(options, flags, true,
-               BuildCmdLineOptions({ ARG_HEX, ARG_KEY_HEX, ARG_VALUE_HEX,
-                                     ARG_FROM, ARG_TO, ARG_MAX_KEYS,
-                                     ARG_COUNT_ONLY, ARG_COUNT_DELIM, ARG_STATS,
-                                     ARG_INPUT_KEY_HEX})),
-    has_from_(false),
-    has_to_(false),
-    max_keys_(-1),
-    delim_("."),
-    count_only_(false),
-    count_delim_(false),
-    print_stats_(false),
-    is_input_key_hex_(false) {
-
-  has_from_ = ParseStringOption(options, ARG_FROM, &from_);
-  has_to_ = ParseStringOption(options, ARG_TO, &to_);
-
-  ParseIntOption(options, ARG_MAX_KEYS, max_keys_, exec_state_);
-  map<string, string>::const_iterator itr = options.find(ARG_COUNT_DELIM);
-  if (itr != options.end()) {
-    delim_ = itr->second;
-    count_delim_ = true;
-   // fprintf(stdout,"delim = %c\n",delim_[0]);
-  } else {
-    count_delim_ = IsFlagPresent(flags, ARG_COUNT_DELIM);
-    delim_=".";
-  }
-
-  print_stats_ = IsFlagPresent(flags, ARG_STATS);
-  count_only_ = IsFlagPresent(flags, ARG_COUNT_ONLY);
-  is_input_key_hex_ = IsFlagPresent(flags, ARG_INPUT_KEY_HEX);
-
-  if (is_input_key_hex_) {
-    if (has_from_) {
-      from_ = HexToString(from_);
-    }
-    if (has_to_) {
-      to_ = HexToString(to_);
-    }
-  }
-}
-
-void InternalDumpCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(InternalDumpCommand::Name());
-  ret.append(HelpRangeCmdArgs());
-  ret.append(" [--" + ARG_INPUT_KEY_HEX + "]");
-  ret.append(" [--" + ARG_MAX_KEYS + "=<N>]");
-  ret.append(" [--" + ARG_COUNT_ONLY + "]");
-  ret.append(" [--" + ARG_COUNT_DELIM + "=<char>]");
-  ret.append(" [--" + ARG_STATS + "]");
-  ret.append("\n");
-}
-
-void InternalDumpCommand::DoCommand() {
-  if (!db_) {
-    return;
-  }
-
-  if (print_stats_) {
-    string stats;
-    if (db_->GetProperty("rocksdb.stats", &stats)) {
-      fprintf(stdout, "%s\n", stats.c_str());
-    }
-  }
-
-  // Cast as DBImpl to get internal iterator
-  DBImpl* idb = dynamic_cast<DBImpl*>(db_);
-  if (!idb) {
-    exec_state_ = LDBCommandExecuteResult::FAILED("DB is not DBImpl");
-    return;
-  }
-  string rtype1,rtype2,row,val;
-  rtype2 = "";
-  uint64_t c=0;
-  uint64_t s1=0,s2=0;
-  // Setup internal key iterator
-  auto iter = unique_ptr<Iterator>(idb->TEST_NewInternalIterator());
-  Status st = iter->status();
-  if (!st.ok()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED("Iterator error:"
-                                                  + st.ToString());
-  }
-
-  if (has_from_) {
-    InternalKey ikey(from_, kMaxSequenceNumber, kValueTypeForSeek);
-    iter->Seek(ikey.Encode());
-  } else {
-    iter->SeekToFirst();
-  }
-
-  long long count = 0;
-  for (; iter->Valid(); iter->Next()) {
-    ParsedInternalKey ikey;
-    if (!ParseInternalKey(iter->key(), &ikey)) {
-      fprintf(stderr, "Internal Key [%s] parse error!\n",
-              iter->key().ToString(true /* in hex*/).data());
-      // TODO: add error counter
-      continue;
-    }
-
-    // If end marker was specified, we stop before it
-    if (has_to_ && options_.comparator->Compare(ikey.user_key, to_) >= 0) {
-      break;
-    }
-
-    ++count;
-    int k;
-    if (count_delim_) {
-      rtype1 = "";
-      s1=0;
-      row = iter->key().ToString();
-      val = iter->value().ToString();
-      for(k=0;row[k]!='\x01' && row[k]!='\0';k++)
-        s1++;
-      for(k=0;val[k]!='\x01' && val[k]!='\0';k++)
-        s1++;
-      for(int j=0;row[j]!=delim_[0] && row[j]!='\0' && row[j]!='\x01';j++)
-        rtype1+=row[j];
-      if(rtype2.compare("") && rtype2.compare(rtype1)!=0) {
-        fprintf(stdout,"%s => count:%lld\tsize:%lld\n",rtype2.c_str(),
-            (long long)c,(long long)s2);
-        c=1;
-        s2=s1;
-        rtype2 = rtype1;
-      } else {
-        c++;
-        s2+=s1;
-        rtype2=rtype1;
-    }
-  }
-
-    if (!count_only_ && !count_delim_) {
-      string key = ikey.DebugString(is_key_hex_);
-      string value = iter->value().ToString(is_value_hex_);
-      std::cout << key << " => " << value << "\n";
-    }
-
-    // Terminate if maximum number of keys have been dumped
-    if (max_keys_ > 0 && count >= max_keys_) break;
-  }
-  if(count_delim_) {
-    fprintf(stdout,"%s => count:%lld\tsize:%lld\n", rtype2.c_str(),
-        (long long)c,(long long)s2);
-  } else
-  fprintf(stdout, "Internal keys in range: %lld\n", (long long) count);
-}
-
-
-const string DBDumperCommand::ARG_COUNT_ONLY = "count_only";
-const string DBDumperCommand::ARG_COUNT_DELIM = "count_delim";
-const string DBDumperCommand::ARG_STATS = "stats";
-const string DBDumperCommand::ARG_TTL_BUCKET = "bucket";
-
-DBDumperCommand::DBDumperCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, true,
-               BuildCmdLineOptions({ARG_TTL, ARG_HEX, ARG_KEY_HEX,
-                                    ARG_VALUE_HEX, ARG_FROM, ARG_TO,
-                                    ARG_MAX_KEYS, ARG_COUNT_ONLY,
-                                    ARG_COUNT_DELIM, ARG_STATS, ARG_TTL_START,
-                                    ARG_TTL_END, ARG_TTL_BUCKET,
-                                    ARG_TIMESTAMP})),
-    null_from_(true),
-    null_to_(true),
-    max_keys_(-1),
-    count_only_(false),
-    count_delim_(false),
-    print_stats_(false) {
-
-  map<string, string>::const_iterator itr = options.find(ARG_FROM);
-  if (itr != options.end()) {
-    null_from_ = false;
-    from_ = itr->second;
-  }
-
-  itr = options.find(ARG_TO);
-  if (itr != options.end()) {
-    null_to_ = false;
-    to_ = itr->second;
-  }
-
-  itr = options.find(ARG_MAX_KEYS);
-  if (itr != options.end()) {
-    try {
-      max_keys_ = stoi(itr->second);
-    } catch(const invalid_argument&) {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_MAX_KEYS +
-                        " has an invalid value");
-    } catch(const out_of_range&) {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_MAX_KEYS +
-                        " has a value out-of-range");
-    }
-  }
-  itr = options.find(ARG_COUNT_DELIM);
-  if (itr != options.end()) {
-    delim_ = itr->second;
-    count_delim_ = true;
-  } else {
-    count_delim_ = IsFlagPresent(flags, ARG_COUNT_DELIM);
-    delim_=".";
-  }
-
-  print_stats_ = IsFlagPresent(flags, ARG_STATS);
-  count_only_ = IsFlagPresent(flags, ARG_COUNT_ONLY);
-
-  if (is_key_hex_) {
-    if (!null_from_) {
-      from_ = HexToString(from_);
-    }
-    if (!null_to_) {
-      to_ = HexToString(to_);
-    }
-  }
-}
-
-void DBDumperCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(DBDumperCommand::Name());
-  ret.append(HelpRangeCmdArgs());
-  ret.append(" [--" + ARG_TTL + "]");
-  ret.append(" [--" + ARG_MAX_KEYS + "=<N>]");
-  ret.append(" [--" + ARG_TIMESTAMP + "]");
-  ret.append(" [--" + ARG_COUNT_ONLY + "]");
-  ret.append(" [--" + ARG_COUNT_DELIM + "=<char>]");
-  ret.append(" [--" + ARG_STATS + "]");
-  ret.append(" [--" + ARG_TTL_BUCKET + "=<N>]");
-  ret.append(" [--" + ARG_TTL_START + "=<N>:- is inclusive]");
-  ret.append(" [--" + ARG_TTL_END + "=<N>:- is exclusive]");
-  ret.append("\n");
-}
-
-void DBDumperCommand::DoCommand() {
-  if (!db_) {
-    return;
-  }
-  // Parse command line args
-  uint64_t count = 0;
-  if (print_stats_) {
-    string stats;
-    if (db_->GetProperty("rocksdb.stats", &stats)) {
-      fprintf(stdout, "%s\n", stats.c_str());
-    }
-  }
-
-  // Setup key iterator
-  Iterator* iter = db_->NewIterator(ReadOptions());
-  Status st = iter->status();
-  if (!st.ok()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED("Iterator error."
-        + st.ToString());
-  }
-
-  if (!null_from_) {
-    iter->Seek(from_);
-  } else {
-    iter->SeekToFirst();
-  }
-
-  int max_keys = max_keys_;
-  int ttl_start;
-  if (!ParseIntOption(option_map_, ARG_TTL_START, ttl_start, exec_state_)) {
-    ttl_start = DBWithTTLImpl::kMinTimestamp;  // TTL introduction time
-  }
-  int ttl_end;
-  if (!ParseIntOption(option_map_, ARG_TTL_END, ttl_end, exec_state_)) {
-    ttl_end = DBWithTTLImpl::kMaxTimestamp;  // Max time allowed by TTL feature
-  }
-  if (ttl_end < ttl_start) {
-    fprintf(stderr, "Error: End time can't be less than start time\n");
-    delete iter;
-    return;
-  }
-  int time_range = ttl_end - ttl_start;
-  int bucket_size;
-  if (!ParseIntOption(option_map_, ARG_TTL_BUCKET, bucket_size, exec_state_) ||
-      bucket_size <= 0) {
-    bucket_size = time_range; // Will have just 1 bucket by default
-  }
-  //cretaing variables for row count of each type
-  string rtype1,rtype2,row,val;
-  rtype2 = "";
-  uint64_t c=0;
-  uint64_t s1=0,s2=0;
-
-  // At this point, bucket_size=0 => time_range=0
-  uint64_t num_buckets = (bucket_size >= time_range) ? 1 :
-    ((time_range + bucket_size - 1) / bucket_size);
-  vector<uint64_t> bucket_counts(num_buckets, 0);
-  if (is_db_ttl_ && !count_only_ && timestamp_ && !count_delim_) {
-    fprintf(stdout, "Dumping key-values from %s to %s\n",
-            ReadableTime(ttl_start).c_str(), ReadableTime(ttl_end).c_str());
-  }
-
-  for (; iter->Valid(); iter->Next()) {
-    int rawtime = 0;
-    // If end marker was specified, we stop before it
-    if (!null_to_ && (iter->key().ToString() >= to_))
-      break;
-    // Terminate if maximum number of keys have been dumped
-    if (max_keys == 0)
-      break;
-    if (is_db_ttl_) {
-      TtlIterator* it_ttl = dynamic_cast<TtlIterator*>(iter);
-      assert(it_ttl);
-      rawtime = it_ttl->timestamp();
-      if (rawtime < ttl_start || rawtime >= ttl_end) {
-        continue;
-      }
-    }
-    if (max_keys > 0) {
-      --max_keys;
-    }
-    if (is_db_ttl_ && num_buckets > 1) {
-      IncBucketCounts(bucket_counts, ttl_start, time_range, bucket_size,
-                      rawtime, num_buckets);
-    }
-    ++count;
-    if (count_delim_) {
-      rtype1 = "";
-      row = iter->key().ToString();
-      val = iter->value().ToString();
-      s1 = row.size()+val.size();
-      for(int j=0;row[j]!=delim_[0] && row[j]!='\0';j++)
-        rtype1+=row[j];
-      if(rtype2.compare("") && rtype2.compare(rtype1)!=0) {
-        fprintf(stdout,"%s => count:%lld\tsize:%lld\n",rtype2.c_str(),
-            (long long )c,(long long)s2);
-        c=1;
-        s2=s1;
-        rtype2 = rtype1;
-      } else {
-          c++;
-          s2+=s1;
-          rtype2=rtype1;
-      }
-
-    }
-
-
-
-    if (!count_only_ && !count_delim_) {
-      if (is_db_ttl_ && timestamp_) {
-        fprintf(stdout, "%s ", ReadableTime(rawtime).c_str());
-      }
-      string str = PrintKeyValue(iter->key().ToString(),
-                                 iter->value().ToString(), is_key_hex_,
-                                 is_value_hex_);
-      fprintf(stdout, "%s\n", str.c_str());
-    }
-  }
-
-  if (num_buckets > 1 && is_db_ttl_) {
-    PrintBucketCounts(bucket_counts, ttl_start, ttl_end, bucket_size,
-                      num_buckets);
-  } else if(count_delim_) {
-    fprintf(stdout,"%s => count:%lld\tsize:%lld\n",rtype2.c_str(),
-        (long long )c,(long long)s2);
-  } else {
-    fprintf(stdout, "Keys in range: %lld\n", (long long) count);
-  }
-  // Clean up
-  delete iter;
-}
-
-const string ReduceDBLevelsCommand::ARG_NEW_LEVELS = "new_levels";
-const string  ReduceDBLevelsCommand::ARG_PRINT_OLD_LEVELS = "print_old_levels";
-
-ReduceDBLevelsCommand::ReduceDBLevelsCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, false,
-               BuildCmdLineOptions({ARG_NEW_LEVELS, ARG_PRINT_OLD_LEVELS})),
-    old_levels_(1 << 16),
-    new_levels_(-1),
-    print_old_levels_(false) {
-
-
-  ParseIntOption(option_map_, ARG_NEW_LEVELS, new_levels_, exec_state_);
-  print_old_levels_ = IsFlagPresent(flags, ARG_PRINT_OLD_LEVELS);
-
-  if(new_levels_ <= 0) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-           " Use --" + ARG_NEW_LEVELS + " to specify a new level number\n");
-  }
-}
-
-vector<string> ReduceDBLevelsCommand::PrepareArgs(const string& db_path,
-    int new_levels, bool print_old_level) {
-  vector<string> ret;
-  ret.push_back("reduce_levels");
-  ret.push_back("--" + ARG_DB + "=" + db_path);
-  ret.push_back("--" + ARG_NEW_LEVELS + "=" + to_string(new_levels));
-  if(print_old_level) {
-    ret.push_back("--" + ARG_PRINT_OLD_LEVELS);
-  }
-  return ret;
-}
-
-void ReduceDBLevelsCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(ReduceDBLevelsCommand::Name());
-  ret.append(" --" + ARG_NEW_LEVELS + "=<New number of levels>");
-  ret.append(" [--" + ARG_PRINT_OLD_LEVELS + "]");
-  ret.append("\n");
-}
-
-Options ReduceDBLevelsCommand::PrepareOptionsForOpenDB() {
-  Options opt = LDBCommand::PrepareOptionsForOpenDB();
-  opt.num_levels = old_levels_;
-  opt.max_bytes_for_level_multiplier_additional.resize(opt.num_levels, 1);
-  // Disable size compaction
-  opt.max_bytes_for_level_base = 1ULL << 50;
-  opt.max_bytes_for_level_multiplier = 1;
-  opt.max_mem_compaction_level = 0;
-  return opt;
-}
-
-Status ReduceDBLevelsCommand::GetOldNumOfLevels(Options& opt,
-    int* levels) {
-  EnvOptions soptions;
-  std::shared_ptr<Cache> tc(
-      NewLRUCache(opt.max_open_files - 10, opt.table_cache_numshardbits,
-                  opt.table_cache_remove_scan_count_limit));
-  const InternalKeyComparator cmp(opt.comparator);
-  VersionSet versions(db_path_, &opt, soptions, tc.get());
-  std::vector<ColumnFamilyDescriptor> dummy;
-  ColumnFamilyDescriptor dummy_descriptor(kDefaultColumnFamilyName,
-                                          ColumnFamilyOptions(opt));
-  dummy.push_back(dummy_descriptor);
-  // We rely the VersionSet::Recover to tell us the internal data structures
-  // in the db. And the Recover() should never do any change
-  // (like LogAndApply) to the manifest file.
-  Status st = versions.Recover(dummy);
-  if (!st.ok()) {
-    return st;
-  }
-  int max = -1;
-  auto default_cfd = versions.GetColumnFamilySet()->GetDefault();
-  for (int i = 0; i < default_cfd->NumberLevels(); i++) {
-    if (default_cfd->current()->NumLevelFiles(i)) {
-      max = i;
-    }
-  }
-
-  *levels = max + 1;
-  return st;
-}
-
-void ReduceDBLevelsCommand::DoCommand() {
-  if (new_levels_ <= 1) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-        "Invalid number of levels.\n");
-    return;
-  }
-
-  Status st;
-  Options opt = PrepareOptionsForOpenDB();
-  int old_level_num = -1;
-  st = GetOldNumOfLevels(opt, &old_level_num);
-  if (!st.ok()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-    return;
-  }
-
-  if (print_old_levels_) {
-    fprintf(stdout, "The old number of levels in use is %d\n", old_level_num);
-  }
-
-  if (old_level_num <= new_levels_) {
-    return;
-  }
-
-  old_levels_ = old_level_num;
-
-  OpenDB();
-  if (!db_) {
-    return;
-  }
-  // Compact the whole DB to put all files to the highest level.
-  fprintf(stdout, "Compacting the db...\n");
-  db_->CompactRange(nullptr, nullptr);
-  CloseDB();
-
-  EnvOptions soptions;
-  st = VersionSet::ReduceNumberOfLevels(db_path_, &opt, soptions, new_levels_);
-  if (!st.ok()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-    return;
-  }
-}
-
-const string ChangeCompactionStyleCommand::ARG_OLD_COMPACTION_STYLE =
-  "old_compaction_style";
-const string ChangeCompactionStyleCommand::ARG_NEW_COMPACTION_STYLE =
-  "new_compaction_style";
-
-ChangeCompactionStyleCommand::ChangeCompactionStyleCommand(
-      const vector<string>& params, const map<string, string>& options,
-      const vector<string>& flags) :
-    LDBCommand(options, flags, false,
-               BuildCmdLineOptions({ARG_OLD_COMPACTION_STYLE,
-                                    ARG_NEW_COMPACTION_STYLE})),
-    old_compaction_style_(-1),
-    new_compaction_style_(-1) {
-
-  ParseIntOption(option_map_, ARG_OLD_COMPACTION_STYLE, old_compaction_style_,
-    exec_state_);
-  if (old_compaction_style_ != kCompactionStyleLevel &&
-     old_compaction_style_ != kCompactionStyleUniversal) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-      "Use --" + ARG_OLD_COMPACTION_STYLE + " to specify old compaction " +
-      "style. Check ldb help for proper compaction style value.\n");
-    return;
-  }
-
-  ParseIntOption(option_map_, ARG_NEW_COMPACTION_STYLE, new_compaction_style_,
-    exec_state_);
-  if (new_compaction_style_ != kCompactionStyleLevel &&
-     new_compaction_style_ != kCompactionStyleUniversal) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-      "Use --" + ARG_NEW_COMPACTION_STYLE + " to specify new compaction " +
-      "style. Check ldb help for proper compaction style value.\n");
-    return;
-  }
-
-  if (new_compaction_style_ == old_compaction_style_) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-      "Old compaction style is the same as new compaction style. "
-      "Nothing to do.\n");
-    return;
-  }
-
-  if (old_compaction_style_ == kCompactionStyleUniversal &&
-      new_compaction_style_ == kCompactionStyleLevel) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-      "Convert from universal compaction to level compaction. "
-      "Nothing to do.\n");
-    return;
-  }
-}
-
-void ChangeCompactionStyleCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(ChangeCompactionStyleCommand::Name());
-  ret.append(" --" + ARG_OLD_COMPACTION_STYLE + "=<Old compaction style: 0 " +
-             "for level compaction, 1 for universal compaction>");
-  ret.append(" --" + ARG_NEW_COMPACTION_STYLE + "=<New compaction style: 0 " +
-             "for level compaction, 1 for universal compaction>");
-  ret.append("\n");
-}
-
-Options ChangeCompactionStyleCommand::PrepareOptionsForOpenDB() {
-  Options opt = LDBCommand::PrepareOptionsForOpenDB();
-
-  if (old_compaction_style_ == kCompactionStyleLevel &&
-      new_compaction_style_ == kCompactionStyleUniversal) {
-    // In order to convert from level compaction to universal compaction, we
-    // need to compact all data into a single file and move it to level 0.
-    opt.disable_auto_compactions = true;
-    opt.target_file_size_base = INT_MAX;
-    opt.target_file_size_multiplier = 1;
-    opt.max_bytes_for_level_base = INT_MAX;
-    opt.max_bytes_for_level_multiplier = 1;
-  }
-
-  return opt;
-}
-
-void ChangeCompactionStyleCommand::DoCommand() {
-  // print db stats before we have made any change
-  std::string property;
-  std::string files_per_level;
-  for (int i = 0; i < db_->NumberLevels(); i++) {
-    db_->GetProperty("rocksdb.num-files-at-level" + NumberToString(i),
-                     &property);
-
-    // format print string
-    char buf[100];
-    snprintf(buf, sizeof(buf), "%s%s", (i ? "," : ""), property.c_str());
-    files_per_level += buf;
-  }
-  fprintf(stdout, "files per level before compaction: %s\n",
-          files_per_level.c_str());
-
-  // manual compact into a single file and move the file to level 0
-  db_->CompactRange(nullptr, nullptr,
-                    true /* reduce level */,
-                    0    /* reduce to level 0 */);
-
-  // verify compaction result
-  files_per_level = "";
-  int num_files = 0;
-  for (int i = 0; i < db_->NumberLevels(); i++) {
-    db_->GetProperty("rocksdb.num-files-at-level" + NumberToString(i),
-                     &property);
-
-    // format print string
-    char buf[100];
-    snprintf(buf, sizeof(buf), "%s%s", (i ? "," : ""), property.c_str());
-    files_per_level += buf;
-
-    num_files = atoi(property.c_str());
-
-    // level 0 should have only 1 file
-    if (i == 0 && num_files != 1) {
-      exec_state_ = LDBCommandExecuteResult::FAILED("Number of db files at "
-        "level 0 after compaction is " + std::to_string(num_files) +
-        ", not 1.\n");
-      return;
-    }
-    // other levels should have no file
-    if (i > 0 && num_files != 0) {
-      exec_state_ = LDBCommandExecuteResult::FAILED("Number of db files at "
-        "level " + std::to_string(i) + " after compaction is " +
-        std::to_string(num_files) + ", not 0.\n");
-      return;
-    }
-  }
-
-  fprintf(stdout, "files per level after compaction: %s\n",
-          files_per_level.c_str());
-}
-
-class InMemoryHandler : public WriteBatch::Handler {
- public:
-  InMemoryHandler(stringstream& row, bool print_values) : Handler(),row_(row) {
-    print_values_ = print_values;
-  }
-
-  void commonPutMerge(const Slice& key, const Slice& value) {
-    string k = LDBCommand::StringToHex(key.ToString());
-    if (print_values_) {
-      string v = LDBCommand::StringToHex(value.ToString());
-      row_ << k << " : ";
-      row_ << v << " ";
-    } else {
-      row_ << k << " ";
-    }
-  }
-
-  virtual void Put(const Slice& key, const Slice& value) {
-    row_ << "PUT : ";
-    commonPutMerge(key, value);
-  }
-
-  virtual void Merge(const Slice& key, const Slice& value) {
-    row_ << "MERGE : ";
-    commonPutMerge(key, value);
-  }
-
-  virtual void Delete(const Slice& key) {
-    row_ <<",DELETE : ";
-    row_ << LDBCommand::StringToHex(key.ToString()) << " ";
-  }
-
-  virtual ~InMemoryHandler() { };
-
- private:
-  stringstream & row_;
-  bool print_values_;
-};
-
-const string WALDumperCommand::ARG_WAL_FILE = "walfile";
-const string WALDumperCommand::ARG_PRINT_VALUE = "print_value";
-const string WALDumperCommand::ARG_PRINT_HEADER = "header";
-
-WALDumperCommand::WALDumperCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, true,
-               BuildCmdLineOptions(
-                {ARG_WAL_FILE, ARG_PRINT_HEADER, ARG_PRINT_VALUE})),
-    print_header_(false), print_values_(false) {
-
-  wal_file_.clear();
-
-  map<string, string>::const_iterator itr = options.find(ARG_WAL_FILE);
-  if (itr != options.end()) {
-    wal_file_ = itr->second;
-  }
-
-
-  print_header_ = IsFlagPresent(flags, ARG_PRINT_HEADER);
-  print_values_ = IsFlagPresent(flags, ARG_PRINT_VALUE);
-  if (wal_file_.empty()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-                    "Argument " + ARG_WAL_FILE + " must be specified.");
-  }
-}
-
-void WALDumperCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(WALDumperCommand::Name());
-  ret.append(" --" + ARG_WAL_FILE + "=<write_ahead_log_file_path>");
-  ret.append(" [--" + ARG_PRINT_HEADER + "] ");
-  ret.append(" [--" + ARG_PRINT_VALUE + "] ");
-  ret.append("\n");
-}
-
-void WALDumperCommand::DoCommand() {
-  struct StdErrReporter : public log::Reader::Reporter {
-    virtual void Corruption(size_t bytes, const Status& s) {
-      cerr<<"Corruption detected in log file "<<s.ToString()<<"\n";
-    }
-  };
-
-  unique_ptr<SequentialFile> file;
-  Env* env_ = Env::Default();
-  EnvOptions soptions;
-  Status status = env_->NewSequentialFile(wal_file_, &file, soptions);
-  if (!status.ok()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED("Failed to open WAL file " +
-      status.ToString());
-  } else {
-    StdErrReporter reporter;
-    log::Reader reader(move(file), &reporter, true, 0);
-    string scratch;
-    WriteBatch batch;
-    Slice record;
-    stringstream row;
-    if (print_header_) {
-      cout<<"Sequence,Count,ByteSize,Physical Offset,Key(s)";
-      if (print_values_) {
-        cout << " : value ";
-      }
-      cout << "\n";
-    }
-    while(reader.ReadRecord(&record, &scratch)) {
-      row.str("");
-      if (record.size() < 12) {
-        reporter.Corruption(
-            record.size(), Status::Corruption("log record too small"));
-      } else {
-        WriteBatchInternal::SetContents(&batch, record);
-        row<<WriteBatchInternal::Sequence(&batch)<<",";
-        row<<WriteBatchInternal::Count(&batch)<<",";
-        row<<WriteBatchInternal::ByteSize(&batch)<<",";
-        row<<reader.LastRecordOffset()<<",";
-        InMemoryHandler handler(row, print_values_);
-        batch.Iterate(&handler);
-        row<<"\n";
-      }
-      cout<<row.str();
-    }
-  }
-}
-
-
-GetCommand::GetCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, true, BuildCmdLineOptions({ARG_TTL, ARG_HEX,
-                                                        ARG_KEY_HEX,
-                                                        ARG_VALUE_HEX})) {
-
-  if (params.size() != 1) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-                    "<key> must be specified for the get command");
-  } else {
-    key_ = params.at(0);
-  }
-
-  if (is_key_hex_) {
-    key_ = HexToString(key_);
-  }
-}
-
-void GetCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(GetCommand::Name());
-  ret.append(" <key>");
-  ret.append(" [--" + ARG_TTL + "]");
-  ret.append("\n");
-}
-
-void GetCommand::DoCommand() {
-  string value;
-  Status st = db_->Get(ReadOptions(), key_, &value);
-  if (st.ok()) {
-    fprintf(stdout, "%s\n",
-              (is_value_hex_ ? StringToHex(value) : value).c_str());
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-  }
-}
-
-
-ApproxSizeCommand::ApproxSizeCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, true,
-             BuildCmdLineOptions({ARG_HEX, ARG_KEY_HEX, ARG_VALUE_HEX,
-                                  ARG_FROM, ARG_TO})) {
-
-  if (options.find(ARG_FROM) != options.end()) {
-    start_key_ = options.find(ARG_FROM)->second;
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(ARG_FROM +
-                    " must be specified for approxsize command");
-    return;
-  }
-
-  if (options.find(ARG_TO) != options.end()) {
-    end_key_ = options.find(ARG_TO)->second;
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(ARG_TO +
-                    " must be specified for approxsize command");
-    return;
-  }
-
-  if (is_key_hex_) {
-    start_key_ = HexToString(start_key_);
-    end_key_ = HexToString(end_key_);
-  }
-}
-
-void ApproxSizeCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(ApproxSizeCommand::Name());
-  ret.append(HelpRangeCmdArgs());
-  ret.append("\n");
-}
-
-void ApproxSizeCommand::DoCommand() {
-
-  Range ranges[1];
-  ranges[0] = Range(start_key_, end_key_);
-  uint64_t sizes[1];
-  db_->GetApproximateSizes(ranges, 1, sizes);
-  fprintf(stdout, "%lu\n", (unsigned long)sizes[0]);
-  /* Weird that GetApproximateSizes() returns void, although documentation
-   * says that it returns a Status object.
-  if (!st.ok()) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-  }
-  */
-}
-
-
-BatchPutCommand::BatchPutCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, false,
-             BuildCmdLineOptions({ARG_TTL, ARG_HEX, ARG_KEY_HEX, ARG_VALUE_HEX,
-                                  ARG_CREATE_IF_MISSING})) {
-
-  if (params.size() < 2) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-        "At least one <key> <value> pair must be specified batchput.");
-  } else if (params.size() % 2 != 0) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-        "Equal number of <key>s and <value>s must be specified for batchput.");
-  } else {
-    for (size_t i = 0; i < params.size(); i += 2) {
-      string key = params.at(i);
-      string value = params.at(i+1);
-      key_values_.push_back(pair<string, string>(
-                    is_key_hex_ ? HexToString(key) : key,
-                    is_value_hex_ ? HexToString(value) : value));
-    }
-  }
-}
-
-void BatchPutCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(BatchPutCommand::Name());
-  ret.append(" <key> <value> [<key> <value>] [..]");
-  ret.append(" [--" + ARG_TTL + "]");
-  ret.append("\n");
-}
-
-void BatchPutCommand::DoCommand() {
-  WriteBatch batch;
-
-  for (vector<pair<string, string>>::const_iterator itr
-        = key_values_.begin(); itr != key_values_.end(); itr++) {
-      batch.Put(itr->first, itr->second);
-  }
-  Status st = db_->Write(WriteOptions(), &batch);
-  if (st.ok()) {
-    fprintf(stdout, "OK\n");
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-  }
-}
-
-Options BatchPutCommand::PrepareOptionsForOpenDB() {
-  Options opt = LDBCommand::PrepareOptionsForOpenDB();
-  opt.create_if_missing = IsFlagPresent(flags_, ARG_CREATE_IF_MISSING);
-  return opt;
-}
-
-
-ScanCommand::ScanCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-    LDBCommand(options, flags, true,
-               BuildCmdLineOptions({ARG_TTL, ARG_HEX, ARG_KEY_HEX, ARG_TO,
-                                    ARG_VALUE_HEX, ARG_FROM, ARG_TIMESTAMP,
-                                    ARG_MAX_KEYS, ARG_TTL_START, ARG_TTL_END})),
-    start_key_specified_(false),
-    end_key_specified_(false),
-    max_keys_scanned_(-1) {
-
-  map<string, string>::const_iterator itr = options.find(ARG_FROM);
-  if (itr != options.end()) {
-    start_key_ = itr->second;
-    if (is_key_hex_) {
-      start_key_ = HexToString(start_key_);
-    }
-    start_key_specified_ = true;
-  }
-  itr = options.find(ARG_TO);
-  if (itr != options.end()) {
-    end_key_ = itr->second;
-    if (is_key_hex_) {
-      end_key_ = HexToString(end_key_);
-    }
-    end_key_specified_ = true;
-  }
-
-  itr = options.find(ARG_MAX_KEYS);
-  if (itr != options.end()) {
-    try {
-      max_keys_scanned_ = stoi(itr->second);
-    } catch(const invalid_argument&) {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_MAX_KEYS +
-                        " has an invalid value");
-    } catch(const out_of_range&) {
-      exec_state_ = LDBCommandExecuteResult::FAILED(ARG_MAX_KEYS +
-                        " has a value out-of-range");
-    }
-  }
-}
-
-void ScanCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(ScanCommand::Name());
-  ret.append(HelpRangeCmdArgs());
-  ret.append(" [--" + ARG_TTL + "]");
-  ret.append(" [--" + ARG_TIMESTAMP + "]");
-  ret.append(" [--" + ARG_MAX_KEYS + "=<N>q] ");
-  ret.append(" [--" + ARG_TTL_START + "=<N>:- is inclusive]");
-  ret.append(" [--" + ARG_TTL_END + "=<N>:- is exclusive]");
-  ret.append("\n");
-}
-
-void ScanCommand::DoCommand() {
-
-  int num_keys_scanned = 0;
-  Iterator* it = db_->NewIterator(ReadOptions());
-  if (start_key_specified_) {
-    it->Seek(start_key_);
-  } else {
-    it->SeekToFirst();
-  }
-  int ttl_start;
-  if (!ParseIntOption(option_map_, ARG_TTL_START, ttl_start, exec_state_)) {
-    ttl_start = DBWithTTLImpl::kMinTimestamp;  // TTL introduction time
-  }
-  int ttl_end;
-  if (!ParseIntOption(option_map_, ARG_TTL_END, ttl_end, exec_state_)) {
-    ttl_end = DBWithTTLImpl::kMaxTimestamp;  // Max time allowed by TTL feature
-  }
-  if (ttl_end < ttl_start) {
-    fprintf(stderr, "Error: End time can't be less than start time\n");
-    delete it;
-    return;
-  }
-  if (is_db_ttl_ && timestamp_) {
-    fprintf(stdout, "Scanning key-values from %s to %s\n",
-            ReadableTime(ttl_start).c_str(), ReadableTime(ttl_end).c_str());
-  }
-  for ( ;
-        it->Valid() && (!end_key_specified_ || it->key().ToString() < end_key_);
-        it->Next()) {
-    string key = it->key().ToString();
-    if (is_db_ttl_) {
-      TtlIterator* it_ttl = dynamic_cast<TtlIterator*>(it);
-      assert(it_ttl);
-      int rawtime = it_ttl->timestamp();
-      if (rawtime < ttl_start || rawtime >= ttl_end) {
-        continue;
-      }
-      if (timestamp_) {
-        fprintf(stdout, "%s ", ReadableTime(rawtime).c_str());
-      }
-    }
-    string value = it->value().ToString();
-    fprintf(stdout, "%s : %s\n",
-          (is_key_hex_ ? StringToHex(key) : key).c_str(),
-          (is_value_hex_ ? StringToHex(value) : value).c_str()
-        );
-    num_keys_scanned++;
-    if (max_keys_scanned_ >= 0 && num_keys_scanned >= max_keys_scanned_) {
-      break;
-    }
-  }
-  if (!it->status().ok()) {  // Check for any errors found during the scan
-    exec_state_ = LDBCommandExecuteResult::FAILED(it->status().ToString());
-  }
-  delete it;
-}
-
-
-DeleteCommand::DeleteCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, false,
-             BuildCmdLineOptions({ARG_HEX, ARG_KEY_HEX, ARG_VALUE_HEX})) {
-
-  if (params.size() != 1) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-                    "KEY must be specified for the delete command");
-  } else {
-    key_ = params.at(0);
-    if (is_key_hex_) {
-      key_ = HexToString(key_);
-    }
-  }
-}
-
-void DeleteCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(DeleteCommand::Name() + " <key>");
-  ret.append("\n");
-}
-
-void DeleteCommand::DoCommand() {
-  Status st = db_->Delete(WriteOptions(), key_);
-  if (st.ok()) {
-    fprintf(stdout, "OK\n");
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-  }
-}
-
-
-PutCommand::PutCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, false,
-             BuildCmdLineOptions({ARG_TTL, ARG_HEX, ARG_KEY_HEX, ARG_VALUE_HEX,
-                                  ARG_CREATE_IF_MISSING})) {
-
-  if (params.size() != 2) {
-    exec_state_ = LDBCommandExecuteResult::FAILED(
-                    "<key> and <value> must be specified for the put command");
-  } else {
-    key_ = params.at(0);
-    value_ = params.at(1);
-  }
-
-  if (is_key_hex_) {
-    key_ = HexToString(key_);
-  }
-
-  if (is_value_hex_) {
-    value_ = HexToString(value_);
-  }
-}
-
-void PutCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(PutCommand::Name());
-  ret.append(" <key> <value> ");
-  ret.append(" [--" + ARG_TTL + "]");
-  ret.append("\n");
-}
-
-void PutCommand::DoCommand() {
-  Status st = db_->Put(WriteOptions(), key_, value_);
-  if (st.ok()) {
-    fprintf(stdout, "OK\n");
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-  }
-}
-
-Options PutCommand::PrepareOptionsForOpenDB() {
-  Options opt = LDBCommand::PrepareOptionsForOpenDB();
-  opt.create_if_missing = IsFlagPresent(flags_, ARG_CREATE_IF_MISSING);
-  return opt;
-}
-
-
-const char* DBQuerierCommand::HELP_CMD = "help";
-const char* DBQuerierCommand::GET_CMD = "get";
-const char* DBQuerierCommand::PUT_CMD = "put";
-const char* DBQuerierCommand::DELETE_CMD = "delete";
-
-DBQuerierCommand::DBQuerierCommand(const vector<string>& params,
-    const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, false,
-             BuildCmdLineOptions({ARG_TTL, ARG_HEX, ARG_KEY_HEX,
-                                  ARG_VALUE_HEX})) {
-
-}
-
-void DBQuerierCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(DBQuerierCommand::Name());
-  ret.append(" [--" + ARG_TTL + "]");
-  ret.append("\n");
-  ret.append("    Starts a REPL shell.  Type help for list of available "
-             "commands.");
-  ret.append("\n");
-}
-
-void DBQuerierCommand::DoCommand() {
-  if (!db_) {
-    return;
-  }
-
-  ReadOptions read_options;
-  WriteOptions write_options;
-
-  string line;
-  string key;
-  string value;
-  while (getline(cin, line, '\n')) {
-
-    // Parse line into vector<string>
-    vector<string> tokens;
-    size_t pos = 0;
-    while (true) {
-      size_t pos2 = line.find(' ', pos);
-      if (pos2 == string::npos) {
-        break;
-      }
-      tokens.push_back(line.substr(pos, pos2-pos));
-      pos = pos2 + 1;
-    }
-    tokens.push_back(line.substr(pos));
-
-    const string& cmd = tokens[0];
-
-    if (cmd == HELP_CMD) {
-      fprintf(stdout,
-              "get <key>\n"
-              "put <key> <value>\n"
-              "delete <key>\n");
-    } else if (cmd == DELETE_CMD && tokens.size() == 2) {
-      key = (is_key_hex_ ? HexToString(tokens[1]) : tokens[1]);
-      db_->Delete(write_options, Slice(key));
-      fprintf(stdout, "Successfully deleted %s\n", tokens[1].c_str());
-    } else if (cmd == PUT_CMD && tokens.size() == 3) {
-      key = (is_key_hex_ ? HexToString(tokens[1]) : tokens[1]);
-      value = (is_value_hex_ ? HexToString(tokens[2]) : tokens[2]);
-      db_->Put(write_options, Slice(key), Slice(value));
-      fprintf(stdout, "Successfully put %s %s\n",
-              tokens[1].c_str(), tokens[2].c_str());
-    } else if (cmd == GET_CMD && tokens.size() == 2) {
-      key = (is_key_hex_ ? HexToString(tokens[1]) : tokens[1]);
-      if (db_->Get(read_options, Slice(key), &value).ok()) {
-        fprintf(stdout, "%s\n", PrintKeyValue(key, value,
-              is_key_hex_, is_value_hex_).c_str());
-      } else {
-        fprintf(stdout, "Not found %s\n", tokens[1].c_str());
-      }
-    } else {
-      fprintf(stdout, "Unknown command %s\n", line.c_str());
-    }
-  }
-}
-
-CheckConsistencyCommand::CheckConsistencyCommand(const vector<string>& params,
-    const map<string, string>& options, const vector<string>& flags) :
-  LDBCommand(options, flags, false,
-             BuildCmdLineOptions({})) {
-}
-
-void CheckConsistencyCommand::Help(string& ret) {
-  ret.append("  ");
-  ret.append(CheckConsistencyCommand::Name());
-  ret.append("\n");
-}
-
-void CheckConsistencyCommand::DoCommand() {
-  Options opt = PrepareOptionsForOpenDB();
-  opt.paranoid_checks = true;
-  if (!exec_state_.IsNotStarted()) {
-    return;
-  }
-  DB* db;
-  Status st = DB::OpenForReadOnly(opt, db_path_, &db, false);
-  delete db;
-  if (st.ok()) {
-    fprintf(stdout, "OK\n");
-  } else {
-    exec_state_ = LDBCommandExecuteResult::FAILED(st.ToString());
-  }
-}
-
-}   // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/ldb_cmd.h b/src/rocksdb/util/ldb_cmd.h
deleted file mode 100644
index 4f760e0..0000000
--- a/src/rocksdb/util/ldb_cmd.h
+++ /dev/null
@@ -1,722 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-#include <string>
-#include <iostream>
-#include <sstream>
-#include <stdlib.h>
-#include <algorithm>
-#include <stdio.h>
-
-#include "db/version_set.h"
-#include "rocksdb/env.h"
-#include "rocksdb/options.h"
-#include "rocksdb/iterator.h"
-#include "rocksdb/slice.h"
-#include "util/logging.h"
-#include "util/ldb_cmd_execute_result.h"
-#include "util/string_util.h"
-#include "utilities/db_ttl.h"
-#include "utilities/ttl/db_ttl_impl.h"
-
-using std::string;
-using std::map;
-using std::vector;
-using std::ostringstream;
-
-namespace rocksdb {
-
-class LDBCommand {
-public:
-
-  // Command-line arguments
-  static const string ARG_DB;
-  static const string ARG_HEX;
-  static const string ARG_KEY_HEX;
-  static const string ARG_VALUE_HEX;
-  static const string ARG_TTL;
-  static const string ARG_TTL_START;
-  static const string ARG_TTL_END;
-  static const string ARG_TIMESTAMP;
-  static const string ARG_FROM;
-  static const string ARG_TO;
-  static const string ARG_MAX_KEYS;
-  static const string ARG_BLOOM_BITS;
-  static const string ARG_COMPRESSION_TYPE;
-  static const string ARG_BLOCK_SIZE;
-  static const string ARG_AUTO_COMPACTION;
-  static const string ARG_WRITE_BUFFER_SIZE;
-  static const string ARG_FILE_SIZE;
-  static const string ARG_CREATE_IF_MISSING;
-
-  static LDBCommand* InitFromCmdLineArgs(
-    const vector<string>& args,
-    const Options& options = Options()
-  );
-
-  static LDBCommand* InitFromCmdLineArgs(
-    int argc,
-    char** argv,
-    const Options& options = Options()
-  );
-
-  bool ValidateCmdLineOptions();
-
-  virtual Options PrepareOptionsForOpenDB();
-
-  virtual void SetOptions(Options options) {
-    options_ = options;
-  }
-
-  virtual bool NoDBOpen() {
-    return false;
-  }
-
-  virtual ~LDBCommand() {
-    if (db_ != nullptr) {
-      delete db_;
-      db_ = nullptr;
-    }
-  }
-
-  /* Run the command, and return the execute result. */
-  void Run() {
-    if (!exec_state_.IsNotStarted()) {
-      return;
-    }
-
-    if (db_ == nullptr && !NoDBOpen()) {
-      OpenDB();
-      if (!exec_state_.IsNotStarted()) {
-        return;
-      }
-    }
-
-    DoCommand();
-    if (exec_state_.IsNotStarted()) {
-      exec_state_ = LDBCommandExecuteResult::SUCCEED("");
-    }
-
-    if (db_ != nullptr) {
-      CloseDB ();
-    }
-  }
-
-  virtual void DoCommand() = 0;
-
-  LDBCommandExecuteResult GetExecuteState() {
-    return exec_state_;
-  }
-
-  void ClearPreviousRunState() {
-    exec_state_.Reset();
-  }
-
-  static string HexToString(const string& str) {
-    string parsed;
-    if (str[0] != '0' || str[1] != 'x') {
-      fprintf(stderr, "Invalid hex input %s.  Must start with 0x\n",
-              str.c_str());
-      throw "Invalid hex input";
-    }
-
-    for (unsigned int i = 2; i < str.length();) {
-      int c;
-      sscanf(str.c_str() + i, "%2X", &c);
-      parsed.push_back(c);
-      i += 2;
-    }
-    return parsed;
-  }
-
-  static string StringToHex(const string& str) {
-    string result = "0x";
-    char buf[10];
-    for (size_t i = 0; i < str.length(); i++) {
-      snprintf(buf, 10, "%02X", (unsigned char)str[i]);
-      result += buf;
-    }
-    return result;
-  }
-
-  static const char* DELIM;
-
-protected:
-
-  LDBCommandExecuteResult exec_state_;
-  string db_path_;
-  DB* db_;
-  DBWithTTL* db_ttl_;
-
-  /**
-   * true implies that this command can work if the db is opened in read-only
-   * mode.
-   */
-  bool is_read_only_;
-
-  /** If true, the key is input/output as hex in get/put/scan/delete etc. */
-  bool is_key_hex_;
-
-  /** If true, the value is input/output as hex in get/put/scan/delete etc. */
-  bool is_value_hex_;
-
-  /** If true, the value is treated as timestamp suffixed */
-  bool is_db_ttl_;
-
-  // If true, the kvs are output with their insert/modify timestamp in a ttl db
-  bool timestamp_;
-
-  /**
-   * Map of options passed on the command-line.
-   */
-  const map<string, string> option_map_;
-
-  /**
-   * Flags passed on the command-line.
-   */
-  const vector<string> flags_;
-
-  /** List of command-line options valid for this command */
-  const vector<string> valid_cmd_line_options_;
-
-  bool ParseKeyValue(const string& line, string* key, string* value,
-                      bool is_key_hex, bool is_value_hex);
-
-  LDBCommand(const map<string, string>& options, const vector<string>& flags,
-             bool is_read_only, const vector<string>& valid_cmd_line_options) :
-      db_(nullptr),
-      is_read_only_(is_read_only),
-      is_key_hex_(false),
-      is_value_hex_(false),
-      is_db_ttl_(false),
-      timestamp_(false),
-      option_map_(options),
-      flags_(flags),
-      valid_cmd_line_options_(valid_cmd_line_options) {
-
-    map<string, string>::const_iterator itr = options.find(ARG_DB);
-    if (itr != options.end()) {
-      db_path_ = itr->second;
-    }
-
-    is_key_hex_ = IsKeyHex(options, flags);
-    is_value_hex_ = IsValueHex(options, flags);
-    is_db_ttl_ = IsFlagPresent(flags, ARG_TTL);
-    timestamp_ = IsFlagPresent(flags, ARG_TIMESTAMP);
-  }
-
-  void OpenDB() {
-    Options opt = PrepareOptionsForOpenDB();
-    if (!exec_state_.IsNotStarted()) {
-      return;
-    }
-    // Open the DB.
-    Status st;
-    if (is_db_ttl_) {
-      if (is_read_only_) {
-        st = DBWithTTL::Open(opt, db_path_, &db_ttl_, 0, true);
-      } else {
-        st = DBWithTTL::Open(opt, db_path_, &db_ttl_);
-      }
-      db_ = db_ttl_;
-    } else if (is_read_only_) {
-      st = DB::OpenForReadOnly(opt, db_path_, &db_);
-    } else {
-      st = DB::Open(opt, db_path_, &db_);
-    }
-    if (!st.ok()) {
-      string msg = st.ToString();
-      exec_state_ = LDBCommandExecuteResult::FAILED(msg);
-    }
-
-    options_ = opt;
-  }
-
-  void CloseDB () {
-    if (db_ != nullptr) {
-      delete db_;
-      db_ = nullptr;
-    }
-  }
-
-  static string PrintKeyValue(const string& key, const string& value,
-        bool is_key_hex, bool is_value_hex) {
-    string result;
-    result.append(is_key_hex ? StringToHex(key) : key);
-    result.append(DELIM);
-    result.append(is_value_hex ? StringToHex(value) : value);
-    return result;
-  }
-
-  static string PrintKeyValue(const string& key, const string& value,
-        bool is_hex) {
-    return PrintKeyValue(key, value, is_hex, is_hex);
-  }
-
-  /**
-   * Return true if the specified flag is present in the specified flags vector
-   */
-  static bool IsFlagPresent(const vector<string>& flags, const string& flag) {
-    return (std::find(flags.begin(), flags.end(), flag) != flags.end());
-  }
-
-  static string HelpRangeCmdArgs() {
-    ostringstream str_stream;
-    str_stream << " ";
-    str_stream << "[--" << ARG_FROM << "] ";
-    str_stream << "[--" << ARG_TO << "] ";
-    return str_stream.str();
-  }
-
-  /**
-   * A helper function that returns a list of command line options
-   * used by this command.  It includes the common options and the ones
-   * passed in.
-   */
-  vector<string> BuildCmdLineOptions(vector<string> options) {
-    vector<string> ret = {ARG_DB, ARG_BLOOM_BITS, ARG_BLOCK_SIZE,
-                          ARG_AUTO_COMPACTION, ARG_COMPRESSION_TYPE,
-                          ARG_WRITE_BUFFER_SIZE, ARG_FILE_SIZE};
-    ret.insert(ret.end(), options.begin(), options.end());
-    return ret;
-  }
-
-  bool ParseIntOption(const map<string, string>& options, const string& option,
-                      int& value, LDBCommandExecuteResult& exec_state);
-
-  bool ParseStringOption(const map<string, string>& options,
-                         const string& option, string* value);
-
-  Options options_;
-
-private:
-
-  /**
-   * Interpret command line options and flags to determine if the key
-   * should be input/output in hex.
-   */
-  bool IsKeyHex(const map<string, string>& options,
-      const vector<string>& flags) {
-    return (IsFlagPresent(flags, ARG_HEX) ||
-        IsFlagPresent(flags, ARG_KEY_HEX) ||
-        ParseBooleanOption(options, ARG_HEX, false) ||
-        ParseBooleanOption(options, ARG_KEY_HEX, false));
-  }
-
-  /**
-   * Interpret command line options and flags to determine if the value
-   * should be input/output in hex.
-   */
-  bool IsValueHex(const map<string, string>& options,
-      const vector<string>& flags) {
-    return (IsFlagPresent(flags, ARG_HEX) ||
-          IsFlagPresent(flags, ARG_VALUE_HEX) ||
-          ParseBooleanOption(options, ARG_HEX, false) ||
-          ParseBooleanOption(options, ARG_VALUE_HEX, false));
-  }
-
-  /**
-   * Returns the value of the specified option as a boolean.
-   * default_val is used if the option is not found in options.
-   * Throws an exception if the value of the option is not
-   * "true" or "false" (case insensitive).
-   */
-  bool ParseBooleanOption(const map<string, string>& options,
-      const string& option, bool default_val) {
-
-    map<string, string>::const_iterator itr = options.find(option);
-    if (itr != options.end()) {
-      string option_val = itr->second;
-      return StringToBool(itr->second);
-    }
-    return default_val;
-  }
-
-  /**
-   * Converts val to a boolean.
-   * val must be either true or false (case insensitive).
-   * Otherwise an exception is thrown.
-   */
-  bool StringToBool(string val) {
-    std::transform(val.begin(), val.end(), val.begin(), ::tolower);
-    if (val == "true") {
-      return true;
-    } else if (val == "false") {
-      return false;
-    } else {
-      throw "Invalid value for boolean argument";
-    }
-  }
-
-  static LDBCommand* SelectCommand(
-    const string& cmd,
-    const vector<string>& cmdParams,
-    const map<string, string>& option_map,
-    const vector<string>& flags
-  );
-
-};
-
-class CompactorCommand: public LDBCommand {
-public:
-  static string Name() { return "compact"; }
-
-  CompactorCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  static void Help(string& ret);
-
-  virtual void DoCommand();
-
-private:
-  bool null_from_;
-  string from_;
-  bool null_to_;
-  string to_;
-};
-
-class DBDumperCommand: public LDBCommand {
-public:
-  static string Name() { return "dump"; }
-
-  DBDumperCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  static void Help(string& ret);
-
-  virtual void DoCommand();
-
-private:
-  bool null_from_;
-  string from_;
-  bool null_to_;
-  string to_;
-  int max_keys_;
-  string delim_;
-  bool count_only_;
-  bool count_delim_;
-  bool print_stats_;
-
-  static const string ARG_COUNT_ONLY;
-  static const string ARG_COUNT_DELIM;
-  static const string ARG_STATS;
-  static const string ARG_TTL_BUCKET;
-};
-
-class InternalDumpCommand: public LDBCommand {
-public:
-  static string Name() { return "idump"; }
-
-  InternalDumpCommand(const vector<string>& params,
-                      const map<string, string>& options,
-                      const vector<string>& flags);
-
-  static void Help(string& ret);
-
-  virtual void DoCommand();
-
-private:
-  bool has_from_;
-  string from_;
-  bool has_to_;
-  string to_;
-  int max_keys_;
-  string delim_;
-  bool count_only_;
-  bool count_delim_;
-  bool print_stats_;
-  bool is_input_key_hex_;
-
-  static const string ARG_DELIM;
-  static const string ARG_COUNT_ONLY;
-  static const string ARG_COUNT_DELIM;
-  static const string ARG_STATS;
-  static const string ARG_INPUT_KEY_HEX;
-};
-
-class DBLoaderCommand: public LDBCommand {
-public:
-  static string Name() { return "load"; }
-
-  DBLoaderCommand(string& db_name, vector<string>& args);
-
-  DBLoaderCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  static void Help(string& ret);
-  virtual void DoCommand();
-
-  virtual Options PrepareOptionsForOpenDB();
-
-private:
-  bool create_if_missing_;
-  bool disable_wal_;
-  bool bulk_load_;
-  bool compact_;
-
-  static const string ARG_DISABLE_WAL;
-  static const string ARG_BULK_LOAD;
-  static const string ARG_COMPACT;
-};
-
-class ManifestDumpCommand: public LDBCommand {
-public:
-  static string Name() { return "manifest_dump"; }
-
-  ManifestDumpCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  static void Help(string& ret);
-  virtual void DoCommand();
-
-  virtual bool NoDBOpen() {
-    return true;
-  }
-
-private:
-  bool verbose_;
-  string path_;
-
-  static const string ARG_VERBOSE;
-  static const string ARG_PATH;
-};
-
-class ListColumnFamiliesCommand : public LDBCommand {
- public:
-  static string Name() { return "list_column_families"; }
-
-  ListColumnFamiliesCommand(const vector<string>& params,
-                            const map<string, string>& options,
-                            const vector<string>& flags);
-
-  static void Help(string& ret);
-  virtual void DoCommand();
-
-  virtual bool NoDBOpen() { return true; }
-
- private:
-  string dbname_;
-};
-
-class ReduceDBLevelsCommand : public LDBCommand {
-public:
-  static string Name() { return "reduce_levels"; }
-
-  ReduceDBLevelsCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual Options PrepareOptionsForOpenDB();
-
-  virtual void DoCommand();
-
-  virtual bool NoDBOpen() {
-    return true;
-  }
-
-  static void Help(string& msg);
-
-  static vector<string> PrepareArgs(const string& db_path, int new_levels,
-      bool print_old_level = false);
-
-private:
-  int old_levels_;
-  int new_levels_;
-  bool print_old_levels_;
-
-  static const string ARG_NEW_LEVELS;
-  static const string ARG_PRINT_OLD_LEVELS;
-
-  Status GetOldNumOfLevels(Options& opt, int* levels);
-};
-
-class ChangeCompactionStyleCommand : public LDBCommand {
-public:
-  static string Name() { return "change_compaction_style"; }
-
-  ChangeCompactionStyleCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual Options PrepareOptionsForOpenDB();
-
-  virtual void DoCommand();
-
-  static void Help(string& msg);
-
-private:
-  int old_compaction_style_;
-  int new_compaction_style_;
-
-  static const string ARG_OLD_COMPACTION_STYLE;
-  static const string ARG_NEW_COMPACTION_STYLE;
-};
-
-class WALDumperCommand : public LDBCommand {
-public:
-  static string Name() { return "dump_wal"; }
-
-  WALDumperCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual bool  NoDBOpen() {
-    return true;
-  }
-
-  static void Help(string& ret);
-  virtual void DoCommand();
-
-private:
-  bool print_header_;
-  string wal_file_;
-  bool print_values_;
-
-  static const string ARG_WAL_FILE;
-  static const string ARG_PRINT_HEADER;
-  static const string ARG_PRINT_VALUE;
-};
-
-
-class GetCommand : public LDBCommand {
-public:
-  static string Name() { return "get"; }
-
-  GetCommand(const vector<string>& params, const map<string, string>& options,
-      const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  static void Help(string& ret);
-
-private:
-  string key_;
-};
-
-class ApproxSizeCommand : public LDBCommand {
-public:
-  static string Name() { return "approxsize"; }
-
-  ApproxSizeCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  static void Help(string& ret);
-
-private:
-  string start_key_;
-  string end_key_;
-};
-
-class BatchPutCommand : public LDBCommand {
-public:
-  static string Name() { return "batchput"; }
-
-  BatchPutCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  static void Help(string& ret);
-
-  virtual Options PrepareOptionsForOpenDB();
-
-private:
-  /**
-   * The key-values to be inserted.
-   */
-  vector<std::pair<string, string>> key_values_;
-};
-
-class ScanCommand : public LDBCommand {
-public:
-  static string Name() { return "scan"; }
-
-  ScanCommand(const vector<string>& params, const map<string, string>& options,
-      const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  static void Help(string& ret);
-
-private:
-  string start_key_;
-  string end_key_;
-  bool start_key_specified_;
-  bool end_key_specified_;
-  int max_keys_scanned_;
-};
-
-class DeleteCommand : public LDBCommand {
-public:
-  static string Name() { return "delete"; }
-
-  DeleteCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  static void Help(string& ret);
-
-private:
-  string key_;
-};
-
-class PutCommand : public LDBCommand {
-public:
-  static string Name() { return "put"; }
-
-  PutCommand(const vector<string>& params, const map<string, string>& options,
-      const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  static void Help(string& ret);
-
-  virtual Options PrepareOptionsForOpenDB();
-
-private:
-  string key_;
-  string value_;
-};
-
-/**
- * Command that starts up a REPL shell that allows
- * get/put/delete.
- */
-class DBQuerierCommand: public LDBCommand {
-public:
-  static string Name() { return "query"; }
-
-  DBQuerierCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  static void Help(string& ret);
-
-  virtual void DoCommand();
-
-private:
-  static const char* HELP_CMD;
-  static const char* GET_CMD;
-  static const char* PUT_CMD;
-  static const char* DELETE_CMD;
-};
-
-class CheckConsistencyCommand : public LDBCommand {
-public:
-  static string Name() { return "checkconsistency"; }
-
-  CheckConsistencyCommand(const vector<string>& params,
-      const map<string, string>& options, const vector<string>& flags);
-
-  virtual void DoCommand();
-
-  virtual bool NoDBOpen() {
-    return true;
-  }
-
-  static void Help(string& ret);
-};
-
-} // namespace rocksdb
diff --git a/src/rocksdb/util/ldb_cmd_execute_result.h b/src/rocksdb/util/ldb_cmd_execute_result.h
deleted file mode 100644
index b9121b2..0000000
--- a/src/rocksdb/util/ldb_cmd_execute_result.h
+++ /dev/null
@@ -1,76 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-
-namespace rocksdb {
-
-class LDBCommandExecuteResult {
-public:
-  enum State {
-    EXEC_NOT_STARTED = 0, EXEC_SUCCEED = 1, EXEC_FAILED = 2,
-  };
-
-  LDBCommandExecuteResult() {
-    state_ = EXEC_NOT_STARTED;
-    message_ = "";
-  }
-
-  LDBCommandExecuteResult(State state, std::string& msg) {
-    state_ = state;
-    message_ = msg;
-  }
-
-  std::string ToString() {
-    std::string ret;
-    switch (state_) {
-    case EXEC_SUCCEED:
-      break;
-    case EXEC_FAILED:
-      ret.append("Failed: ");
-      break;
-    case EXEC_NOT_STARTED:
-      ret.append("Not started: ");
-    }
-    if (!message_.empty()) {
-      ret.append(message_);
-    }
-    return ret;
-  }
-
-  void Reset() {
-    state_ = EXEC_NOT_STARTED;
-    message_ = "";
-  }
-
-  bool IsSucceed() {
-    return state_ == EXEC_SUCCEED;
-  }
-
-  bool IsNotStarted() {
-    return state_ == EXEC_NOT_STARTED;
-  }
-
-  bool IsFailed() {
-    return state_ == EXEC_FAILED;
-  }
-
-  static LDBCommandExecuteResult SUCCEED(std::string msg) {
-    return LDBCommandExecuteResult(EXEC_SUCCEED, msg);
-  }
-
-  static LDBCommandExecuteResult FAILED(std::string msg) {
-    return LDBCommandExecuteResult(EXEC_FAILED, msg);
-  }
-
-private:
-  State state_;
-  std::string message_;
-
-  bool operator==(const LDBCommandExecuteResult&);
-  bool operator!=(const LDBCommandExecuteResult&);
-};
-
-}
diff --git a/src/rocksdb/util/ldb_tool.cc b/src/rocksdb/util/ldb_tool.cc
deleted file mode 100644
index 8439b63..0000000
--- a/src/rocksdb/util/ldb_tool.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef ROCKSDB_LITE
-#include "rocksdb/ldb_tool.h"
-#include "util/ldb_cmd.h"
-
-namespace rocksdb {
-
-class LDBCommandRunner {
-public:
-
-  static void PrintHelp(const char* exec_name) {
-    string ret;
-
-    ret.append("ldb - LevelDB Tool");
-    ret.append("\n\n");
-    ret.append("commands MUST specify --" + LDBCommand::ARG_DB +
-        "=<full_path_to_db_directory> when necessary\n");
-    ret.append("\n");
-    ret.append("The following optional parameters control if keys/values are "
-        "input/output as hex or as plain strings:\n");
-    ret.append("  --" + LDBCommand::ARG_KEY_HEX +
-        " : Keys are input/output as hex\n");
-    ret.append("  --" + LDBCommand::ARG_VALUE_HEX +
-        " : Values are input/output as hex\n");
-    ret.append("  --" + LDBCommand::ARG_HEX +
-        " : Both keys and values are input/output as hex\n");
-    ret.append("\n");
-
-    ret.append("The following optional parameters control the database "
-        "internals:\n");
-    ret.append("  --" + LDBCommand::ARG_TTL +
-        " with 'put','get','scan','dump','query','batchput'"
-        " : DB supports ttl and value is internally timestamp-suffixed\n");
-    ret.append("  --" + LDBCommand::ARG_BLOOM_BITS + "=<int,e.g.:14>\n");
-    ret.append("  --" + LDBCommand::ARG_COMPRESSION_TYPE +
-        "=<no|snappy|zlib|bzip2>\n");
-    ret.append("  --" + LDBCommand::ARG_BLOCK_SIZE +
-        "=<block_size_in_bytes>\n");
-    ret.append("  --" + LDBCommand::ARG_AUTO_COMPACTION + "=<true|false>\n");
-    ret.append("  --" + LDBCommand::ARG_WRITE_BUFFER_SIZE +
-        "=<int,e.g.:4194304>\n");
-    ret.append("  --" + LDBCommand::ARG_FILE_SIZE + "=<int,e.g.:2097152>\n");
-
-    ret.append("\n\n");
-    ret.append("Data Access Commands:\n");
-    PutCommand::Help(ret);
-    GetCommand::Help(ret);
-    BatchPutCommand::Help(ret);
-    ScanCommand::Help(ret);
-    DeleteCommand::Help(ret);
-    DBQuerierCommand::Help(ret);
-    ApproxSizeCommand::Help(ret);
-    CheckConsistencyCommand::Help(ret);
-
-    ret.append("\n\n");
-    ret.append("Admin Commands:\n");
-    WALDumperCommand::Help(ret);
-    CompactorCommand::Help(ret);
-    ReduceDBLevelsCommand::Help(ret);
-    ChangeCompactionStyleCommand::Help(ret);
-    DBDumperCommand::Help(ret);
-    DBLoaderCommand::Help(ret);
-    ManifestDumpCommand::Help(ret);
-    ListColumnFamiliesCommand::Help(ret);
-    InternalDumpCommand::Help(ret);
-
-    fprintf(stderr, "%s\n", ret.c_str());
-  }
-
-  static void RunCommand(int argc, char** argv, Options options) {
-    if (argc <= 2) {
-      PrintHelp(argv[0]);
-      exit(1);
-    }
-
-    LDBCommand* cmdObj = LDBCommand::InitFromCmdLineArgs(argc, argv, options);
-    if (cmdObj == nullptr) {
-      fprintf(stderr, "Unknown command\n");
-      PrintHelp(argv[0]);
-      exit(1);
-    }
-
-    if (!cmdObj->ValidateCmdLineOptions()) {
-      exit(1);
-    }
-
-    cmdObj->Run();
-    LDBCommandExecuteResult ret = cmdObj->GetExecuteState();
-    fprintf(stderr, "%s\n", ret.ToString().c_str());
-    delete cmdObj;
-
-    exit(ret.IsFailed());
-  }
-
-};
-
-
-void LDBTool::Run(int argc, char** argv, Options options) {
-  LDBCommandRunner::RunCommand(argc, argv, options);
-}
-} // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/log_buffer.cc b/src/rocksdb/util/log_buffer.cc
deleted file mode 100644
index 726c014..0000000
--- a/src/rocksdb/util/log_buffer.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-//  Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include "util/log_buffer.h"
-
-#include <sys/time.h>
-
-namespace rocksdb {
-
-LogBuffer::LogBuffer(const InfoLogLevel log_level,
-                     Logger*info_log)
-    : log_level_(log_level), info_log_(info_log) {}
-
-void LogBuffer::AddLogToBuffer(const char* format, va_list ap) {
-  if (!info_log_ || log_level_ < info_log_->GetInfoLogLevel()) {
-    // Skip the level because of its level.
-    return;
-  }
-
-  const size_t kLogSizeLimit = 512;
-  char* alloc_mem = arena_.AllocateAligned(kLogSizeLimit);
-  BufferedLog* buffered_log = new (alloc_mem) BufferedLog();
-  char* p = buffered_log->message;
-  char* limit = alloc_mem + kLogSizeLimit - 1;
-
-  // store the time
-  gettimeofday(&(buffered_log->now_tv), nullptr);
-
-  // Print the message
-  if (p < limit) {
-    va_list backup_ap;
-    va_copy(backup_ap, ap);
-    auto n = vsnprintf(p, limit - p, format, backup_ap);
-    assert(n >= 0);
-    p += n;
-    va_end(backup_ap);
-  }
-
-  if (p > limit) {
-    p = limit;
-  }
-
-  // Add '\0' to the end
-  *p = '\0';
-
-  logs_.push_back(buffered_log);
-}
-
-void LogBuffer::FlushBufferToLog() {
-  for (BufferedLog* log : logs_) {
-    const time_t seconds = log->now_tv.tv_sec;
-    struct tm t;
-    localtime_r(&seconds, &t);
-    Log(log_level_, info_log_,
-        "(Original Log Time %04d/%02d/%02d-%02d:%02d:%02d.%06d) %s",
-        t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min,
-        t.tm_sec, static_cast<int>(log->now_tv.tv_usec), log->message);
-  }
-  logs_.clear();
-}
-
-void LogToBuffer(LogBuffer* log_buffer, const char* format, ...) {
-  if (log_buffer != nullptr) {
-    va_list ap;
-    va_start(ap, format);
-    log_buffer->AddLogToBuffer(format, ap);
-    va_end(ap);
-  }
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/log_buffer.h b/src/rocksdb/util/log_buffer.h
deleted file mode 100644
index 8ebe92e..0000000
--- a/src/rocksdb/util/log_buffer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2014, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-
-#pragma once
-
-#include "rocksdb/env.h"
-#include "util/arena.h"
-#include "util/autovector.h"
-
-namespace rocksdb {
-
-class Logger;
-
-// A class to buffer info log entries and flush them in the end.
-class LogBuffer {
- public:
-  // log_level: the log level for all the logs
-  // info_log:  logger to write the logs to
-  LogBuffer(const InfoLogLevel log_level, Logger* info_log);
-
-  // Add a log entry to the buffer.
-  void AddLogToBuffer(const char* format, va_list ap);
-
-  size_t IsEmpty() const { return logs_.empty(); }
-
-  // Flush all buffered log to the info log.
-  void FlushBufferToLog();
-
- private:
-  // One log entry with its timestamp
-  struct BufferedLog {
-    struct timeval now_tv;  // Timestamp of the log
-    char message[1];        // Beginning of log message
-  };
-
-  const InfoLogLevel log_level_;
-  Logger* info_log_;
-  Arena arena_;
-  autovector<BufferedLog*> logs_;
-};
-
-// Add log to the LogBuffer for a delayed info logging. It can be used when
-// we want to add some logs inside a mutex.
-extern void LogToBuffer(LogBuffer* log_buffer, const char* format, ...);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/log_write_bench.cc b/src/rocksdb/util/log_write_bench.cc
deleted file mode 100644
index 536d14f..0000000
--- a/src/rocksdb/util/log_write_bench.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <gflags/gflags.h>
-
-#include "rocksdb/env.h"
-#include "util/histogram.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-// A simple benchmark to simulate transactional logs
-
-DEFINE_int32(num_records, 6000, "Number of records.");
-DEFINE_int32(record_size, 249, "Size of each record.");
-DEFINE_int32(record_interval, 10000, "Interval between records (microSec)");
-DEFINE_int32(bytes_per_sync, 0, "bytes_per_sync parameter in EnvOptions");
-DEFINE_bool(enable_sync, false, "sync after each write.");
-
-namespace rocksdb {
-void RunBenchmark() {
-  std::string file_name = test::TmpDir() + "/log_write_benchmark.log";
-  Env* env = Env::Default();
-  EnvOptions env_options;
-  env_options.use_mmap_writes = false;
-  env_options.bytes_per_sync = FLAGS_bytes_per_sync;
-  unique_ptr<WritableFile> file;
-  env->NewWritableFile(file_name, &file, env_options);
-
-  std::string record;
-  record.assign('X', FLAGS_record_size);
-
-  HistogramImpl hist;
-
-  uint64_t start_time = env->NowMicros();
-  for (int i = 0; i < FLAGS_num_records; i++) {
-    uint64_t start_nanos = env->NowNanos();
-    file->Append(record);
-    file->Flush();
-    if (FLAGS_enable_sync) {
-      file->Sync();
-    }
-    hist.Add(env->NowNanos() - start_nanos);
-
-    if (i % 1000 == 1) {
-      fprintf(stderr, "Wrote %d records...\n", i);
-    }
-
-    int time_to_sleep =
-        (i + 1) * FLAGS_record_interval - (env->NowMicros() - start_time);
-    if (time_to_sleep > 0) {
-      env->SleepForMicroseconds(time_to_sleep);
-    }
-  }
-
-  fprintf(stderr, "Distribution of latency of append+flush: \n%s",
-          hist.ToString().c_str());
-}
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  google::SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) +
-                          " [OPTIONS]...");
-  google::ParseCommandLineFlags(&argc, &argv, true);
-
-  rocksdb::RunBenchmark();
-  return 0;
-}
diff --git a/src/rocksdb/util/logging.cc b/src/rocksdb/util/logging.cc
deleted file mode 100644
index 02e3560..0000000
--- a/src/rocksdb/util/logging.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/logging.h"
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "rocksdb/env.h"
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-void AppendNumberTo(std::string* str, uint64_t num) {
-  char buf[30];
-  snprintf(buf, sizeof(buf), "%llu", (unsigned long long) num);
-  str->append(buf);
-}
-
-void AppendEscapedStringTo(std::string* str, const Slice& value) {
-  for (size_t i = 0; i < value.size(); i++) {
-    char c = value[i];
-    if (c >= ' ' && c <= '~') {
-      str->push_back(c);
-    } else {
-      char buf[10];
-      snprintf(buf, sizeof(buf), "\\x%02x",
-               static_cast<unsigned int>(c) & 0xff);
-      str->append(buf);
-    }
-  }
-}
-
-std::string NumberToString(uint64_t num) {
-  std::string r;
-  AppendNumberTo(&r, num);
-  return r;
-}
-
-std::string EscapeString(const Slice& value) {
-  std::string r;
-  AppendEscapedStringTo(&r, value);
-  return r;
-}
-
-bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
-  uint64_t v = 0;
-  int digits = 0;
-  while (!in->empty()) {
-    char c = (*in)[0];
-    if (c >= '0' && c <= '9') {
-      ++digits;
-      const unsigned int delta = (c - '0');
-      static const uint64_t kMaxUint64 = ~static_cast<uint64_t>(0);
-      if (v > kMaxUint64/10 ||
-          (v == kMaxUint64/10 && delta > kMaxUint64%10)) {
-        // Overflow
-        return false;
-      }
-      v = (v * 10) + delta;
-      in->remove_prefix(1);
-    } else {
-      break;
-    }
-  }
-  *val = v;
-  return (digits > 0);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/logging.h b/src/rocksdb/util/logging.h
deleted file mode 100644
index d8ce45e..0000000
--- a/src/rocksdb/util/logging.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Must not be included from any .h files to avoid polluting the namespace
-// with macros.
-
-#pragma once
-#include <stdio.h>
-#include <stdint.h>
-#include <string>
-#include "port/port.h"
-
-namespace rocksdb {
-
-class Slice;
-class WritableFile;
-
-// Append a human-readable printout of "num" to *str
-extern void AppendNumberTo(std::string* str, uint64_t num);
-
-// Append a human-readable printout of "value" to *str.
-// Escapes any non-printable characters found in "value".
-extern void AppendEscapedStringTo(std::string* str, const Slice& value);
-
-// Return a human-readable printout of "num"
-extern std::string NumberToString(uint64_t num);
-
-// Return a human-readable version of "value".
-// Escapes any non-printable characters found in "value".
-extern std::string EscapeString(const Slice& value);
-
-// Parse a human-readable number from "*in" into *value.  On success,
-// advances "*in" past the consumed number and sets "*val" to the
-// numeric value.  Otherwise, returns false and leaves *in in an
-// unspecified state.
-extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/manual_compaction_test.cc b/src/rocksdb/util/manual_compaction_test.cc
deleted file mode 100644
index dd615f0..0000000
--- a/src/rocksdb/util/manual_compaction_test.cc
+++ /dev/null
@@ -1,156 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Test for issue 178: a manual compaction causes deleted data to reappear.
-#include <iostream>
-#include <sstream>
-#include <cstdlib>
-
-#include "rocksdb/db.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/write_batch.h"
-#include "util/testharness.h"
-
-using namespace rocksdb;
-
-namespace {
-
-const int kNumKeys = 1100000;
-
-std::string Key1(int i) {
-  char buf[100];
-  snprintf(buf, sizeof(buf), "my_key_%d", i);
-  return buf;
-}
-
-std::string Key2(int i) {
-  return Key1(i) + "_xxx";
-}
-
-class ManualCompactionTest {
- public:
-  ManualCompactionTest() {
-    // Get rid of any state from an old run.
-    dbname_ = rocksdb::test::TmpDir() + "/rocksdb_cbug_test";
-    DestroyDB(dbname_, rocksdb::Options());
-  }
-
-  std::string dbname_;
-};
-
-class DestroyAllCompactionFilter : public CompactionFilter {
- public:
-  DestroyAllCompactionFilter() {}
-
-  virtual bool Filter(int level,
-                      const Slice& key,
-                      const Slice& existing_value,
-                      std::string* new_value,
-                      bool* value_changed) const {
-    return existing_value.ToString() == "destroy";
-  }
-
-  virtual const char* Name() const {
-    return "DestroyAllCompactionFilter";
-  }
-};
-
-TEST(ManualCompactionTest, CompactTouchesAllKeys) {
-  for (int iter = 0; iter < 2; ++iter) {
-    DB* db;
-    Options options;
-    if (iter == 0) { // level compaction
-      options.num_levels = 3;
-      options.compaction_style = kCompactionStyleLevel;
-    } else { // universal compaction
-      options.compaction_style = kCompactionStyleUniversal;
-    }
-    options.create_if_missing = true;
-    options.compression = rocksdb::kNoCompression;
-    options.compaction_filter = new DestroyAllCompactionFilter();
-    ASSERT_OK(DB::Open(options, dbname_, &db));
-
-    db->Put(WriteOptions(), Slice("key1"), Slice("destroy"));
-    db->Put(WriteOptions(), Slice("key2"), Slice("destroy"));
-    db->Put(WriteOptions(), Slice("key3"), Slice("value3"));
-    db->Put(WriteOptions(), Slice("key4"), Slice("destroy"));
-
-    Slice key4("key4");
-    db->CompactRange(nullptr, &key4);
-    Iterator* itr = db->NewIterator(ReadOptions());
-    itr->SeekToFirst();
-    ASSERT_TRUE(itr->Valid());
-    ASSERT_EQ("key3", itr->key().ToString());
-    itr->Next();
-    ASSERT_TRUE(!itr->Valid());
-    delete itr;
-
-    delete options.compaction_filter;
-    delete db;
-    DestroyDB(dbname_, options);
-  }
-}
-
-TEST(ManualCompactionTest, Test) {
-
-  // Open database.  Disable compression since it affects the creation
-  // of layers and the code below is trying to test against a very
-  // specific scenario.
-  rocksdb::DB* db;
-  rocksdb::Options db_options;
-  db_options.create_if_missing = true;
-  db_options.compression = rocksdb::kNoCompression;
-  ASSERT_OK(rocksdb::DB::Open(db_options, dbname_, &db));
-
-  // create first key range
-  rocksdb::WriteBatch batch;
-  for (int i = 0; i < kNumKeys; i++) {
-    batch.Put(Key1(i), "value for range 1 key");
-  }
-  ASSERT_OK(db->Write(rocksdb::WriteOptions(), &batch));
-
-  // create second key range
-  batch.Clear();
-  for (int i = 0; i < kNumKeys; i++) {
-    batch.Put(Key2(i), "value for range 2 key");
-  }
-  ASSERT_OK(db->Write(rocksdb::WriteOptions(), &batch));
-
-  // delete second key range
-  batch.Clear();
-  for (int i = 0; i < kNumKeys; i++) {
-    batch.Delete(Key2(i));
-  }
-  ASSERT_OK(db->Write(rocksdb::WriteOptions(), &batch));
-
-  // compact database
-  std::string start_key = Key1(0);
-  std::string end_key = Key1(kNumKeys - 1);
-  rocksdb::Slice least(start_key.data(), start_key.size());
-  rocksdb::Slice greatest(end_key.data(), end_key.size());
-
-  // commenting out the line below causes the example to work correctly
-  db->CompactRange(&least, &greatest);
-
-  // count the keys
-  rocksdb::Iterator* iter = db->NewIterator(rocksdb::ReadOptions());
-  int num_keys = 0;
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    num_keys++;
-  }
-  delete iter;
-  ASSERT_EQ(kNumKeys, num_keys) << "Bad number of keys";
-
-  // close database
-  delete db;
-  DestroyDB(dbname_, rocksdb::Options());
-}
-
-}  // anonymous namespace
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/murmurhash.cc b/src/rocksdb/util/murmurhash.cc
deleted file mode 100644
index d9d8b70..0000000
--- a/src/rocksdb/util/murmurhash.cc
+++ /dev/null
@@ -1,183 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-/*
-  Murmurhash from http://sites.google.com/site/murmurhash/
-
-  All code is released to the public domain. For business purposes, Murmurhash is
-  under the MIT license.
-*/
-#include "murmurhash.h"
-
-#if defined(__x86_64__)
-
-// -------------------------------------------------------------------
-//
-// The same caveats as 32-bit MurmurHash2 apply here - beware of alignment
-// and endian-ness issues if used across multiple platforms.
-//
-// 64-bit hash for 64-bit platforms
-
-uint64_t MurmurHash64A ( const void * key, int len, unsigned int seed )
-{
-    const uint64_t m = 0xc6a4a7935bd1e995;
-    const int r = 47;
-
-    uint64_t h = seed ^ (len * m);
-
-    const uint64_t * data = (const uint64_t *)key;
-    const uint64_t * end = data + (len/8);
-
-    while(data != end)
-    {
-        uint64_t k = *data++;
-
-        k *= m;
-        k ^= k >> r;
-        k *= m;
-
-        h ^= k;
-        h *= m;
-    }
-
-    const unsigned char * data2 = (const unsigned char*)data;
-
-    switch(len & 7)
-    {
-    case 7: h ^= ((uint64_t)data2[6]) << 48;
-    case 6: h ^= ((uint64_t)data2[5]) << 40;
-    case 5: h ^= ((uint64_t)data2[4]) << 32;
-    case 4: h ^= ((uint64_t)data2[3]) << 24;
-    case 3: h ^= ((uint64_t)data2[2]) << 16;
-    case 2: h ^= ((uint64_t)data2[1]) << 8;
-    case 1: h ^= ((uint64_t)data2[0]);
-        h *= m;
-    };
-
-    h ^= h >> r;
-    h *= m;
-    h ^= h >> r;
-
-    return h;
-}
-
-#elif defined(__i386__)
-
-// -------------------------------------------------------------------
-//
-// Note - This code makes a few assumptions about how your machine behaves -
-//
-// 1. We can read a 4-byte value from any address without crashing
-// 2. sizeof(int) == 4
-//
-// And it has a few limitations -
-//
-// 1. It will not work incrementally.
-// 2. It will not produce the same results on little-endian and big-endian
-//    machines.
-
-unsigned int MurmurHash2 ( const void * key, int len, unsigned int seed )
-{
-    // 'm' and 'r' are mixing constants generated offline.
-    // They're not really 'magic', they just happen to work well.
-
-    const unsigned int m = 0x5bd1e995;
-    const int r = 24;
-
-    // Initialize the hash to a 'random' value
-
-    unsigned int h = seed ^ len;
-
-    // Mix 4 bytes at a time into the hash
-
-    const unsigned char * data = (const unsigned char *)key;
-
-    while(len >= 4)
-    {
-        unsigned int k = *(unsigned int *)data;
-
-        k *= m;
-        k ^= k >> r;
-        k *= m;
-
-        h *= m;
-        h ^= k;
-
-        data += 4;
-        len -= 4;
-    }
-
-    // Handle the last few bytes of the input array
-
-    switch(len)
-    {
-    case 3: h ^= data[2] << 16;
-    case 2: h ^= data[1] << 8;
-    case 1: h ^= data[0];
-        h *= m;
-    };
-
-    // Do a few final mixes of the hash to ensure the last few
-    // bytes are well-incorporated.
-
-    h ^= h >> 13;
-    h *= m;
-    h ^= h >> 15;
-
-    return h;
-}
-
-#else
-
-// -------------------------------------------------------------------
-//
-// Same as MurmurHash2, but endian- and alignment-neutral.
-// Half the speed though, alas.
-
-unsigned int MurmurHashNeutral2 ( const void * key, int len, unsigned int seed )
-{
-    const unsigned int m = 0x5bd1e995;
-    const int r = 24;
-
-    unsigned int h = seed ^ len;
-
-    const unsigned char * data = (const unsigned char *)key;
-
-    while(len >= 4)
-    {
-        unsigned int k;
-
-        k  = data[0];
-        k |= data[1] << 8;
-        k |= data[2] << 16;
-        k |= data[3] << 24;
-
-        k *= m;
-        k ^= k >> r;
-        k *= m;
-
-        h *= m;
-        h ^= k;
-
-        data += 4;
-        len -= 4;
-    }
-
-    switch(len)
-    {
-    case 3: h ^= data[2] << 16;
-    case 2: h ^= data[1] << 8;
-    case 1: h ^= data[0];
-        h *= m;
-    };
-
-    h ^= h >> 13;
-    h *= m;
-    h ^= h >> 15;
-
-    return h;
-}
-
-#endif
diff --git a/src/rocksdb/util/murmurhash.h b/src/rocksdb/util/murmurhash.h
deleted file mode 100644
index faa8655..0000000
--- a/src/rocksdb/util/murmurhash.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-/*
-  Murmurhash from http://sites.google.com/site/murmurhash/
-
-  All code is released to the public domain. For business purposes, Murmurhash is
-  under the MIT license.
-*/
-#pragma once
-#include <stdint.h>
-#include "rocksdb/slice.h"
-
-#if defined(__x86_64__)
-#define MURMUR_HASH MurmurHash64A
-uint64_t MurmurHash64A ( const void * key, int len, unsigned int seed );
-#define MurmurHash MurmurHash64A
-typedef uint64_t murmur_t;
-
-#elif defined(__i386__)
-#define MURMUR_HASH MurmurHash2
-unsigned int MurmurHash2 ( const void * key, int len, unsigned int seed );
-#define MurmurHash MurmurHash2
-typedef unsigned int murmur_t;
-
-#else
-#define MURMUR_HASH MurmurHashNeutral2
-unsigned int MurmurHashNeutral2 ( const void * key, int len, unsigned int seed );
-#define MurmurHash MurmurHashNeutral2
-typedef unsigned int murmur_t;
-#endif
-
-// Allow slice to be hashable by murmur hash.
-namespace rocksdb {
-struct murmur_hash {
-  size_t operator()(const Slice& slice) const {
-    return MurmurHash(slice.data(), slice.size(), 0);
-  }
-};
-}  // rocksdb
diff --git a/src/rocksdb/util/mutexlock.h b/src/rocksdb/util/mutexlock.h
deleted file mode 100644
index 0f4e5c8..0000000
--- a/src/rocksdb/util/mutexlock.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include "port/port.h"
-
-namespace rocksdb {
-
-// Helper class that locks a mutex on construction and unlocks the mutex when
-// the destructor of the MutexLock object is invoked.
-//
-// Typical usage:
-//
-//   void MyClass::MyMethod() {
-//     MutexLock l(&mu_);       // mu_ is an instance variable
-//     ... some complex code, possibly with multiple return paths ...
-//   }
-
-class MutexLock {
- public:
-  explicit MutexLock(port::Mutex *mu) : mu_(mu) {
-    this->mu_->Lock();
-  }
-  ~MutexLock() { this->mu_->Unlock(); }
-
- private:
-  port::Mutex *const mu_;
-  // No copying allowed
-  MutexLock(const MutexLock&);
-  void operator=(const MutexLock&);
-};
-
-//
-// Acquire a ReadLock on the specified RWMutex.
-// The Lock will be automatically released then the
-// object goes out of scope.
-//
-class ReadLock {
- public:
-  explicit ReadLock(port::RWMutex *mu) : mu_(mu) {
-    this->mu_->ReadLock();
-  }
-  ~ReadLock() { this->mu_->Unlock(); }
-
- private:
-  port::RWMutex *const mu_;
-  // No copying allowed
-  ReadLock(const ReadLock&);
-  void operator=(const ReadLock&);
-};
-
-
-//
-// Acquire a WriteLock on the specified RWMutex.
-// The Lock will be automatically released then the
-// object goes out of scope.
-//
-class WriteLock {
- public:
-  explicit WriteLock(port::RWMutex *mu) : mu_(mu) {
-    this->mu_->WriteLock();
-  }
-  ~WriteLock() { this->mu_->Unlock(); }
-
- private:
-  port::RWMutex *const mu_;
-  // No copying allowed
-  WriteLock(const WriteLock&);
-  void operator=(const WriteLock&);
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/options.cc b/src/rocksdb/util/options.cc
deleted file mode 100644
index c8d1e38..0000000
--- a/src/rocksdb/util/options.cc
+++ /dev/null
@@ -1,483 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/options.h"
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <limits>
-
-#include "rocksdb/cache.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/comparator.h"
-#include "rocksdb/env.h"
-#include "rocksdb/filter_policy.h"
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/slice.h"
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/table.h"
-#include "rocksdb/table_properties.h"
-#include "table/block_based_table_factory.h"
-
-namespace rocksdb {
-
-ColumnFamilyOptions::ColumnFamilyOptions()
-    : comparator(BytewiseComparator()),
-      merge_operator(nullptr),
-      compaction_filter(nullptr),
-      compaction_filter_factory(std::shared_ptr<CompactionFilterFactory>(
-          new DefaultCompactionFilterFactory())),
-      compaction_filter_factory_v2(new DefaultCompactionFilterFactoryV2()),
-      write_buffer_size(4 << 20),
-      max_write_buffer_number(2),
-      min_write_buffer_number_to_merge(1),
-      block_cache(nullptr),
-      block_cache_compressed(nullptr),
-      block_size(4096),
-      block_restart_interval(16),
-      compression(kSnappyCompression),
-      filter_policy(nullptr),
-      prefix_extractor(nullptr),
-      whole_key_filtering(true),
-      num_levels(7),
-      level0_file_num_compaction_trigger(4),
-      level0_slowdown_writes_trigger(20),
-      level0_stop_writes_trigger(24),
-      max_mem_compaction_level(2),
-      target_file_size_base(2 * 1048576),
-      target_file_size_multiplier(1),
-      max_bytes_for_level_base(10 * 1048576),
-      max_bytes_for_level_multiplier(10),
-      max_bytes_for_level_multiplier_additional(num_levels, 1),
-      expanded_compaction_factor(25),
-      source_compaction_factor(1),
-      max_grandparent_overlap_factor(10),
-      disable_seek_compaction(true),
-      soft_rate_limit(0.0),
-      hard_rate_limit(0.0),
-      rate_limit_delay_max_milliseconds(1000),
-      no_block_cache(false),
-      arena_block_size(0),
-      disable_auto_compactions(false),
-      purge_redundant_kvs_while_flush(true),
-      block_size_deviation(10),
-      compaction_style(kCompactionStyleLevel),
-      verify_checksums_in_compaction(true),
-      filter_deletes(false),
-      max_sequential_skip_in_iterations(8),
-      memtable_factory(std::shared_ptr<SkipListFactory>(new SkipListFactory)),
-      table_factory(
-          std::shared_ptr<TableFactory>(new BlockBasedTableFactory())),
-      inplace_update_support(false),
-      inplace_update_num_locks(10000),
-      inplace_callback(nullptr),
-      memtable_prefix_bloom_bits(0),
-      memtable_prefix_bloom_probes(6),
-      memtable_prefix_bloom_huge_page_tlb_size(0),
-      bloom_locality(0),
-      max_successive_merges(0),
-      min_partial_merge_operands(2) {
-  assert(memtable_factory.get() != nullptr);
-}
-
-ColumnFamilyOptions::ColumnFamilyOptions(const Options& options)
-    : comparator(options.comparator),
-      merge_operator(options.merge_operator),
-      compaction_filter(options.compaction_filter),
-      compaction_filter_factory(options.compaction_filter_factory),
-      compaction_filter_factory_v2(options.compaction_filter_factory_v2),
-      write_buffer_size(options.write_buffer_size),
-      max_write_buffer_number(options.max_write_buffer_number),
-      min_write_buffer_number_to_merge(
-          options.min_write_buffer_number_to_merge),
-      block_cache(options.block_cache),
-      block_cache_compressed(options.block_cache_compressed),
-      block_size(options.block_size),
-      block_restart_interval(options.block_restart_interval),
-      compression(options.compression),
-      compression_per_level(options.compression_per_level),
-      compression_opts(options.compression_opts),
-      filter_policy(options.filter_policy),
-      prefix_extractor(options.prefix_extractor),
-      whole_key_filtering(options.whole_key_filtering),
-      num_levels(options.num_levels),
-      level0_file_num_compaction_trigger(
-          options.level0_file_num_compaction_trigger),
-      level0_slowdown_writes_trigger(options.level0_slowdown_writes_trigger),
-      level0_stop_writes_trigger(options.level0_stop_writes_trigger),
-      max_mem_compaction_level(options.max_mem_compaction_level),
-      target_file_size_base(options.target_file_size_base),
-      target_file_size_multiplier(options.target_file_size_multiplier),
-      max_bytes_for_level_base(options.max_bytes_for_level_base),
-      max_bytes_for_level_multiplier(options.max_bytes_for_level_multiplier),
-      max_bytes_for_level_multiplier_additional(
-          options.max_bytes_for_level_multiplier_additional),
-      expanded_compaction_factor(options.expanded_compaction_factor),
-      source_compaction_factor(options.source_compaction_factor),
-      max_grandparent_overlap_factor(options.max_grandparent_overlap_factor),
-      disable_seek_compaction(options.disable_seek_compaction),
-      soft_rate_limit(options.soft_rate_limit),
-      hard_rate_limit(options.hard_rate_limit),
-      rate_limit_delay_max_milliseconds(
-          options.rate_limit_delay_max_milliseconds),
-      no_block_cache(options.no_block_cache),
-      arena_block_size(options.arena_block_size),
-      disable_auto_compactions(options.disable_auto_compactions),
-      purge_redundant_kvs_while_flush(options.purge_redundant_kvs_while_flush),
-      block_size_deviation(options.block_size_deviation),
-      compaction_style(options.compaction_style),
-      verify_checksums_in_compaction(options.verify_checksums_in_compaction),
-      compaction_options_universal(options.compaction_options_universal),
-      filter_deletes(options.filter_deletes),
-      max_sequential_skip_in_iterations(
-          options.max_sequential_skip_in_iterations),
-      memtable_factory(options.memtable_factory),
-      table_factory(options.table_factory),
-      table_properties_collectors(options.table_properties_collectors),
-      inplace_update_support(options.inplace_update_support),
-      inplace_update_num_locks(options.inplace_update_num_locks),
-      inplace_callback(options.inplace_callback),
-      memtable_prefix_bloom_bits(options.memtable_prefix_bloom_bits),
-      memtable_prefix_bloom_probes(options.memtable_prefix_bloom_probes),
-      memtable_prefix_bloom_huge_page_tlb_size(
-          options.memtable_prefix_bloom_huge_page_tlb_size),
-      bloom_locality(options.bloom_locality),
-      max_successive_merges(options.max_successive_merges),
-      min_partial_merge_operands(options.min_partial_merge_operands) {
-  assert(memtable_factory.get() != nullptr);
-}
-
-DBOptions::DBOptions()
-    : create_if_missing(false),
-      error_if_exists(false),
-      paranoid_checks(true),
-      env(Env::Default()),
-      info_log(nullptr),
-      info_log_level(INFO_LEVEL),
-      max_open_files(5000),
-      max_total_wal_size(0),
-      statistics(nullptr),
-      disableDataSync(false),
-      use_fsync(false),
-      db_stats_log_interval(1800),
-      db_log_dir(""),
-      wal_dir(""),
-      delete_obsolete_files_period_micros(6 * 60 * 60 * 1000000UL),
-      max_background_compactions(1),
-      max_background_flushes(1),
-      max_log_file_size(0),
-      log_file_time_to_roll(0),
-      keep_log_file_num(1000),
-      max_manifest_file_size(std::numeric_limits<uint64_t>::max()),
-      table_cache_numshardbits(4),
-      table_cache_remove_scan_count_limit(16),
-      WAL_ttl_seconds(0),
-      WAL_size_limit_MB(0),
-      manifest_preallocation_size(4 * 1024 * 1024),
-      allow_os_buffer(true),
-      allow_mmap_reads(false),
-      allow_mmap_writes(false),
-      is_fd_close_on_exec(true),
-      skip_log_error_on_recovery(false),
-      stats_dump_period_sec(3600),
-      advise_random_on_open(true),
-      access_hint_on_compaction_start(NORMAL),
-      use_adaptive_mutex(false),
-      bytes_per_sync(0),
-      allow_thread_local(true) {}
-
-DBOptions::DBOptions(const Options& options)
-    : create_if_missing(options.create_if_missing),
-      error_if_exists(options.error_if_exists),
-      paranoid_checks(options.paranoid_checks),
-      env(options.env),
-      info_log(options.info_log),
-      info_log_level(options.info_log_level),
-      max_open_files(options.max_open_files),
-      max_total_wal_size(options.max_total_wal_size),
-      statistics(options.statistics),
-      disableDataSync(options.disableDataSync),
-      use_fsync(options.use_fsync),
-      db_stats_log_interval(options.db_stats_log_interval),
-      db_log_dir(options.db_log_dir),
-      wal_dir(options.wal_dir),
-      delete_obsolete_files_period_micros(
-          options.delete_obsolete_files_period_micros),
-      max_background_compactions(options.max_background_compactions),
-      max_background_flushes(options.max_background_flushes),
-      max_log_file_size(options.max_log_file_size),
-      log_file_time_to_roll(options.log_file_time_to_roll),
-      keep_log_file_num(options.keep_log_file_num),
-      max_manifest_file_size(options.max_manifest_file_size),
-      table_cache_numshardbits(options.table_cache_numshardbits),
-      table_cache_remove_scan_count_limit(
-          options.table_cache_remove_scan_count_limit),
-      WAL_ttl_seconds(options.WAL_ttl_seconds),
-      WAL_size_limit_MB(options.WAL_size_limit_MB),
-      manifest_preallocation_size(options.manifest_preallocation_size),
-      allow_os_buffer(options.allow_os_buffer),
-      allow_mmap_reads(options.allow_mmap_reads),
-      allow_mmap_writes(options.allow_mmap_writes),
-      is_fd_close_on_exec(options.is_fd_close_on_exec),
-      skip_log_error_on_recovery(options.skip_log_error_on_recovery),
-      stats_dump_period_sec(options.stats_dump_period_sec),
-      advise_random_on_open(options.advise_random_on_open),
-      access_hint_on_compaction_start(options.access_hint_on_compaction_start),
-      use_adaptive_mutex(options.use_adaptive_mutex),
-      bytes_per_sync(options.bytes_per_sync),
-      allow_thread_local(options.allow_thread_local) {}
-
-static const char* const access_hints[] = {
-  "NONE", "NORMAL", "SEQUENTIAL", "WILLNEED"
-};
-
-void DBOptions::Dump(Logger* log) const {
-    Log(log,"         Options.error_if_exists: %d", error_if_exists);
-    Log(log,"       Options.create_if_missing: %d", create_if_missing);
-    Log(log,"         Options.paranoid_checks: %d", paranoid_checks);
-    Log(log,"                     Options.env: %p", env);
-    Log(log,"                Options.info_log: %p", info_log.get());
-    Log(log,"          Options.max_open_files: %d", max_open_files);
-    Log(log,"      Options.max_total_wal_size: %" PRIu64, max_total_wal_size);
-    Log(log, "       Options.disableDataSync: %d", disableDataSync);
-    Log(log, "             Options.use_fsync: %d", use_fsync);
-    Log(log, "     Options.max_log_file_size: %zu", max_log_file_size);
-    Log(log, "Options.max_manifest_file_size: %lu",
-        (unsigned long)max_manifest_file_size);
-    Log(log, "     Options.log_file_time_to_roll: %zu", log_file_time_to_roll);
-    Log(log, "     Options.keep_log_file_num: %zu", keep_log_file_num);
-    Log(log, " Options.db_stats_log_interval: %d", db_stats_log_interval);
-    Log(log, "       Options.allow_os_buffer: %d", allow_os_buffer);
-    Log(log, "      Options.allow_mmap_reads: %d", allow_mmap_reads);
-    Log(log, "     Options.allow_mmap_writes: %d", allow_mmap_writes);
-    Log(log, "                             Options.db_log_dir: %s",
-        db_log_dir.c_str());
-    Log(log, "                             Options.wal_dir: %s",
-        wal_dir.c_str());
-    Log(log, "               Options.table_cache_numshardbits: %d",
-        table_cache_numshardbits);
-    Log(log, "    Options.table_cache_remove_scan_count_limit: %d",
-        table_cache_remove_scan_count_limit);
-    Log(log, "    Options.delete_obsolete_files_period_micros: %lu",
-        (unsigned long)delete_obsolete_files_period_micros);
-    Log(log, "             Options.max_background_compactions: %d",
-        max_background_compactions);
-    Log(log, "                 Options.max_background_flushes: %d",
-        max_background_flushes);
-    Log(log, "                        Options.WAL_ttl_seconds: %lu",
-        (unsigned long)WAL_ttl_seconds);
-    Log(log, "                      Options.WAL_size_limit_MB: %lu",
-        (unsigned long)WAL_size_limit_MB);
-    Log(log, "            Options.manifest_preallocation_size: %zu",
-        manifest_preallocation_size);
-    Log(log, "                         Options.allow_os_buffer: %d",
-        allow_os_buffer);
-    Log(log, "                        Options.allow_mmap_reads: %d",
-        allow_mmap_reads);
-    Log(log, "                       Options.allow_mmap_writes: %d",
-        allow_mmap_writes);
-    Log(log, "                     Options.is_fd_close_on_exec: %d",
-        is_fd_close_on_exec);
-    Log(log, "              Options.skip_log_error_on_recovery: %d",
-        skip_log_error_on_recovery);
-    Log(log, "                   Options.stats_dump_period_sec: %u",
-        stats_dump_period_sec);
-    Log(log, "                   Options.advise_random_on_open: %d",
-        advise_random_on_open);
-    Log(log, "         Options.access_hint_on_compaction_start: %s",
-        access_hints[access_hint_on_compaction_start]);
-    Log(log, "                      Options.use_adaptive_mutex: %d",
-        use_adaptive_mutex);
-    Log(log, "                          Options.bytes_per_sync: %lu",
-        (unsigned long)bytes_per_sync);
-}  // DBOptions::Dump
-
-void ColumnFamilyOptions::Dump(Logger* log) const {
-  Log(log, "              Options.comparator: %s", comparator->Name());
-  Log(log, "          Options.merge_operator: %s",
-      merge_operator ? merge_operator->Name() : "None");
-  Log(log, "       Options.compaction_filter_factory: %s",
-      compaction_filter_factory->Name());
-  Log(log, "       Options.compaction_filter_factory_v2: %s",
-      compaction_filter_factory_v2->Name());
-  Log(log, "        Options.memtable_factory: %s", memtable_factory->Name());
-  Log(log, "           Options.table_factory: %s", table_factory->Name());
-  Log(log, "       Options.write_buffer_size: %zd", write_buffer_size);
-  Log(log, " Options.max_write_buffer_number: %d", max_write_buffer_number);
-    Log(log,"             Options.block_cache: %p", block_cache.get());
-    Log(log,"  Options.block_cache_compressed: %p",
-        block_cache_compressed.get());
-    if (block_cache) {
-      Log(log,"        Options.block_cache_size: %zd",
-          block_cache->GetCapacity());
-    }
-    if (block_cache_compressed) {
-      Log(log,"Options.block_cache_compressed_size: %zd",
-          block_cache_compressed->GetCapacity());
-    }
-    Log(log,"              Options.block_size: %zd", block_size);
-    Log(log,"  Options.block_restart_interval: %d", block_restart_interval);
-    if (!compression_per_level.empty()) {
-      for (unsigned int i = 0; i < compression_per_level.size(); i++) {
-          Log(log,"       Options.compression[%d]: %d",
-              i, compression_per_level[i]);
-       }
-    } else {
-      Log(log,"         Options.compression: %d", compression);
-    }
-    Log(log,"         Options.filter_policy: %s",
-        filter_policy == nullptr ? "nullptr" : filter_policy->Name());
-    Log(log,"      Options.prefix_extractor: %s",
-        prefix_extractor == nullptr ? "nullptr" : prefix_extractor->Name());
-    Log(log,"   Options.whole_key_filtering: %d", whole_key_filtering);
-    Log(log,"            Options.num_levels: %d", num_levels);
-    Log(log,"       Options.min_write_buffer_number_to_merge: %d",
-        min_write_buffer_number_to_merge);
-    Log(log,"        Options.purge_redundant_kvs_while_flush: %d",
-         purge_redundant_kvs_while_flush);
-    Log(log,"           Options.compression_opts.window_bits: %d",
-        compression_opts.window_bits);
-    Log(log,"                 Options.compression_opts.level: %d",
-        compression_opts.level);
-    Log(log,"              Options.compression_opts.strategy: %d",
-        compression_opts.strategy);
-    Log(log,"     Options.level0_file_num_compaction_trigger: %d",
-        level0_file_num_compaction_trigger);
-    Log(log,"         Options.level0_slowdown_writes_trigger: %d",
-        level0_slowdown_writes_trigger);
-    Log(log,"             Options.level0_stop_writes_trigger: %d",
-        level0_stop_writes_trigger);
-    Log(log,"               Options.max_mem_compaction_level: %d",
-        max_mem_compaction_level);
-    Log(log,"                  Options.target_file_size_base: %d",
-        target_file_size_base);
-    Log(log,"            Options.target_file_size_multiplier: %d",
-        target_file_size_multiplier);
-    Log(log,"               Options.max_bytes_for_level_base: %lu",
-        (unsigned long)max_bytes_for_level_base);
-    Log(log,"         Options.max_bytes_for_level_multiplier: %d",
-        max_bytes_for_level_multiplier);
-    for (int i = 0; i < num_levels; i++) {
-      Log(log,"Options.max_bytes_for_level_multiplier_addtl[%d]: %d",
-          i, max_bytes_for_level_multiplier_additional[i]);
-    }
-    Log(log,"      Options.max_sequential_skip_in_iterations: %lu",
-        (unsigned long)max_sequential_skip_in_iterations);
-    Log(log,"             Options.expanded_compaction_factor: %d",
-        expanded_compaction_factor);
-    Log(log,"               Options.source_compaction_factor: %d",
-        source_compaction_factor);
-    Log(log,"         Options.max_grandparent_overlap_factor: %d",
-        max_grandparent_overlap_factor);
-    Log(log,"                Options.disable_seek_compaction: %d",
-        disable_seek_compaction);
-    Log(log,"                         Options.no_block_cache: %d",
-        no_block_cache);
-    Log(log,"                       Options.arena_block_size: %zu",
-        arena_block_size);
-    Log(log,"                      Options.soft_rate_limit: %.2f",
-        soft_rate_limit);
-    Log(log,"                      Options.hard_rate_limit: %.2f",
-        hard_rate_limit);
-    Log(log,"      Options.rate_limit_delay_max_milliseconds: %u",
-        rate_limit_delay_max_milliseconds);
-    Log(log,"               Options.disable_auto_compactions: %d",
-        disable_auto_compactions);
-    Log(log,"         Options.purge_redundant_kvs_while_flush: %d",
-        purge_redundant_kvs_while_flush);
-    Log(log,"                    Options.block_size_deviation: %d",
-        block_size_deviation);
-    Log(log,"                          Options.filter_deletes: %d",
-        filter_deletes);
-    Log(log, "          Options.verify_checksums_in_compaction: %d",
-        verify_checksums_in_compaction);
-    Log(log,"                        Options.compaction_style: %d",
-        compaction_style);
-    Log(log," Options.compaction_options_universal.size_ratio: %u",
-        compaction_options_universal.size_ratio);
-    Log(log,"Options.compaction_options_universal.min_merge_width: %u",
-        compaction_options_universal.min_merge_width);
-    Log(log,"Options.compaction_options_universal.max_merge_width: %u",
-        compaction_options_universal.max_merge_width);
-    Log(log,"Options.compaction_options_universal."
-            "max_size_amplification_percent: %u",
-        compaction_options_universal.max_size_amplification_percent);
-    Log(log,
-        "Options.compaction_options_universal.compression_size_percent: %u",
-        compaction_options_universal.compression_size_percent);
-    std::string collector_names;
-    for (auto collector : table_properties_collectors) {
-      collector_names.append(collector->Name());
-      collector_names.append("; ");
-    }
-    Log(log, "                  Options.table_properties_collectors: %s",
-        collector_names.c_str());
-    Log(log, "                  Options.inplace_update_support: %d",
-        inplace_update_support);
-    Log(log, "                Options.inplace_update_num_locks: %zd",
-        inplace_update_num_locks);
-    Log(log, "              Options.min_partial_merge_operands: %u",
-        min_partial_merge_operands);
-    // TODO: easier config for bloom (maybe based on avg key/value size)
-    Log(log, "              Options.memtable_prefix_bloom_bits: %d",
-        memtable_prefix_bloom_bits);
-    Log(log, "            Options.memtable_prefix_bloom_probes: %d",
-        memtable_prefix_bloom_probes);
-    Log(log, "  Options.memtable_prefix_bloom_huge_page_tlb_size: %zu",
-        memtable_prefix_bloom_huge_page_tlb_size);
-    Log(log, "                          Options.bloom_locality: %d",
-        bloom_locality);
-    Log(log, "                   Options.max_successive_merges: %zd",
-        max_successive_merges);
-}  // ColumnFamilyOptions::Dump
-
-void Options::Dump(Logger* log) const {
-  DBOptions::Dump(log);
-  ColumnFamilyOptions::Dump(log);
-}   // Options::Dump
-
-//
-// The goal of this method is to create a configuration that
-// allows an application to write all files into L0 and
-// then do a single compaction to output all files into L1.
-Options*
-Options::PrepareForBulkLoad()
-{
-  // never slowdown ingest.
-  level0_file_num_compaction_trigger = (1<<30);
-  level0_slowdown_writes_trigger = (1<<30);
-  level0_stop_writes_trigger = (1<<30);
-
-  // no auto compactions please. The application should issue a
-  // manual compaction after all data is loaded into L0.
-  disable_auto_compactions = true;
-  disable_seek_compaction = true;
-  disableDataSync = true;
-
-  // A manual compaction run should pick all files in L0 in
-  // a single compaction run.
-  source_compaction_factor = (1<<30);
-
-  // It is better to have only 2 levels, otherwise a manual
-  // compaction would compact at every possible level, thereby
-  // increasing the total time needed for compactions.
-  num_levels = 2;
-
-  // Prevent a memtable flush to automatically promote files
-  // to L1. This is helpful so that all files that are
-  // input to the manual compaction are all at L0.
-  max_background_compactions = 2;
-
-  // The compaction would create large files in L1.
-  target_file_size_base = 256 * 1024 * 1024;
-  return this;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/perf_context.cc b/src/rocksdb/util/perf_context.cc
deleted file mode 100644
index 264b10d..0000000
--- a/src/rocksdb/util/perf_context.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#include <sstream>
-#include "util/perf_context_imp.h"
-
-namespace rocksdb {
-
-#if defined(NPERF_CONTEXT) || defined(IOS_CROSS_COMPILE)
-PerfLevel perf_level = kEnableCount;
-// This is a dummy variable since some place references it
-PerfContext perf_context;
-#else
-__thread PerfLevel perf_level = kEnableCount;
-__thread PerfContext perf_context;
-#endif
-
-void SetPerfLevel(PerfLevel level) {
-  perf_level = level;
-}
-
-void PerfContext::Reset() {
-#if !defined(NPERF_CONTEXT) && !defined(IOS_CROSS_COMPILE)
-  user_key_comparison_count = 0;
-  block_cache_hit_count = 0;
-  block_read_count = 0;
-  block_read_byte = 0;
-  block_read_time = 0;
-  block_checksum_time = 0;
-  block_decompress_time = 0;
-  internal_key_skipped_count = 0;
-  internal_delete_skipped_count = 0;
-  write_wal_time = 0;
-
-  get_snapshot_time = 0;
-  get_from_memtable_time = 0;
-  get_from_memtable_count = 0;
-  get_post_process_time = 0;
-  get_from_output_files_time = 0;
-  seek_child_seek_time = 0;
-  seek_child_seek_count = 0;
-  seek_min_heap_time = 0;
-  seek_internal_seek_time = 0;
-  find_next_user_entry_time = 0;
-  write_pre_and_post_process_time = 0;
-  write_memtable_time = 0;
-#endif
-}
-
-#define OUTPUT(counter) #counter << " = " << counter << ", "
-
-std::string PerfContext::ToString() const {
-#if defined(NPERF_CONTEXT) || defined(IOS_CROSS_COMPILE)
-  return "";
-#else
-  std::ostringstream ss;
-  ss << OUTPUT(user_key_comparison_count)
-     << OUTPUT(block_cache_hit_count)
-     << OUTPUT(block_read_count)
-     << OUTPUT(block_read_byte)
-     << OUTPUT(block_read_time)
-     << OUTPUT(block_checksum_time)
-     << OUTPUT(block_decompress_time)
-     << OUTPUT(internal_key_skipped_count)
-     << OUTPUT(internal_delete_skipped_count)
-     << OUTPUT(write_wal_time)
-     << OUTPUT(get_snapshot_time)
-     << OUTPUT(get_from_memtable_time)
-     << OUTPUT(get_from_memtable_count)
-     << OUTPUT(get_post_process_time)
-     << OUTPUT(get_from_output_files_time)
-     << OUTPUT(seek_child_seek_time)
-     << OUTPUT(seek_child_seek_count)
-     << OUTPUT(seek_min_heap_time)
-     << OUTPUT(seek_internal_seek_time)
-     << OUTPUT(find_next_user_entry_time)
-     << OUTPUT(write_pre_and_post_process_time)
-     << OUTPUT(write_memtable_time);
-  return ss.str();
-#endif
-}
-
-}
diff --git a/src/rocksdb/util/perf_context_imp.h b/src/rocksdb/util/perf_context_imp.h
deleted file mode 100644
index dc4ae95..0000000
--- a/src/rocksdb/util/perf_context_imp.h
+++ /dev/null
@@ -1,88 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-#include "rocksdb/perf_context.h"
-#include "util/stop_watch.h"
-
-namespace rocksdb {
-
-#if defined(NPERF_CONTEXT) || defined(IOS_CROSS_COMPILE)
-
-#define PERF_TIMER_DECLARE()
-#define PERF_TIMER_START(metric)
-#define PERF_TIMER_AUTO(metric)
-#define PERF_TIMER_MEASURE(metric)
-#define PERF_TIMER_STOP(metric)
-#define PERF_COUNTER_ADD(metric, value)
-
-#else
-
-extern __thread PerfLevel perf_level;
-
-class PerfStepTimer {
- public:
-  PerfStepTimer()
-    : enabled_(perf_level >= PerfLevel::kEnableTime),
-      env_(enabled_ ? Env::Default() : nullptr),
-      start_(0) {
-  }
-
-  void Start() {
-    if (enabled_) {
-      start_ = env_->NowNanos();
-    }
-  }
-
-  void Measure(uint64_t* metric) {
-    if (start_) {
-      uint64_t now = env_->NowNanos();
-      *metric += now - start_;
-      start_ = now;
-    }
-  }
-
-  void Stop(uint64_t* metric) {
-    if (start_) {
-      *metric += env_->NowNanos() - start_;
-      start_ = 0;
-    }
-  }
-
- private:
-  const bool enabled_;
-  Env* const env_;
-  uint64_t start_;
-};
-
-// Declare the local timer object to be used later on
-#define PERF_TIMER_DECLARE()           \
-  PerfStepTimer perf_step_timer;
-
-// Set start time of the timer
-#define PERF_TIMER_START(metric)          \
-  perf_step_timer.Start();
-
-// Declare and set start time of the timer
-#define PERF_TIMER_AUTO(metric)           \
-  PerfStepTimer perf_step_timer;          \
-  perf_step_timer.Start();
-
-// Update metric with time elapsed since last START. start time is reset
-// to current timestamp.
-#define PERF_TIMER_MEASURE(metric)        \
-  perf_step_timer.Measure(&(perf_context.metric));
-
-// Update metric with time elapsed since last START. But start time is not set.
-#define PERF_TIMER_STOP(metric)        \
-  perf_step_timer.Stop(&(perf_context.metric));
-
-// Increase metric value
-#define PERF_COUNTER_ADD(metric, value)     \
-  perf_context.metric += value;
-
-#endif
-
-}
diff --git a/src/rocksdb/util/posix_logger.h b/src/rocksdb/util/posix_logger.h
deleted file mode 100644
index 6aba769..0000000
--- a/src/rocksdb/util/posix_logger.h
+++ /dev/null
@@ -1,161 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
-// Logger implementation that can be shared by all environments
-// where enough posix functionality is available.
-
-#pragma once
-#include <algorithm>
-#include <stdio.h>
-#include <sys/time.h>
-#include <time.h>
-#include <fcntl.h>
-#include <unistd.h>
-#ifdef OS_LINUX
-#include <linux/falloc.h>
-#endif
-#include "rocksdb/env.h"
-#include <atomic>
-
-namespace rocksdb {
-
-const int kDebugLogChunkSize = 128 * 1024;
-
-class PosixLogger : public Logger {
- private:
-  FILE* file_;
-  uint64_t (*gettid_)();  // Return the thread id for the current thread
-  std::atomic_size_t log_size_;
-  int fd_;
-  const static uint64_t flush_every_seconds_ = 5;
-  std::atomic_uint_fast64_t last_flush_micros_;
-  Env* env_;
-  bool flush_pending_;
- public:
-  PosixLogger(FILE* f, uint64_t (*gettid)(), Env* env,
-              const InfoLogLevel log_level = InfoLogLevel::ERROR_LEVEL)
-      : Logger(log_level),
-        file_(f),
-        gettid_(gettid),
-        log_size_(0),
-        fd_(fileno(f)),
-        last_flush_micros_(0),
-        env_(env),
-        flush_pending_(false) {}
-  virtual ~PosixLogger() {
-    fclose(file_);
-  }
-  virtual void Flush() {
-    if (flush_pending_) {
-      flush_pending_ = false;
-      fflush(file_);
-    }
-    last_flush_micros_ = env_->NowMicros();
-  }
-  virtual void Logv(const char* format, va_list ap) {
-    const uint64_t thread_id = (*gettid_)();
-
-    // We try twice: the first time with a fixed-size stack allocated buffer,
-    // and the second time with a much larger dynamically allocated buffer.
-    char buffer[500];
-    for (int iter = 0; iter < 2; iter++) {
-      char* base;
-      int bufsize;
-      if (iter == 0) {
-        bufsize = sizeof(buffer);
-        base = buffer;
-      } else {
-        bufsize = 30000;
-        base = new char[bufsize];
-      }
-      char* p = base;
-      char* limit = base + bufsize;
-
-      struct timeval now_tv;
-      gettimeofday(&now_tv, nullptr);
-      const time_t seconds = now_tv.tv_sec;
-      struct tm t;
-      localtime_r(&seconds, &t);
-      p += snprintf(p, limit - p,
-                    "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ",
-                    t.tm_year + 1900,
-                    t.tm_mon + 1,
-                    t.tm_mday,
-                    t.tm_hour,
-                    t.tm_min,
-                    t.tm_sec,
-                    static_cast<int>(now_tv.tv_usec),
-                    static_cast<long long unsigned int>(thread_id));
-
-      // Print the message
-      if (p < limit) {
-        va_list backup_ap;
-        va_copy(backup_ap, ap);
-        p += vsnprintf(p, limit - p, format, backup_ap);
-        va_end(backup_ap);
-      }
-
-      // Truncate to available space if necessary
-      if (p >= limit) {
-        if (iter == 0) {
-          continue;       // Try again with larger buffer
-        } else {
-          p = limit - 1;
-        }
-      }
-
-      // Add newline if necessary
-      if (p == base || p[-1] != '\n') {
-        *p++ = '\n';
-      }
-
-      assert(p <= limit);
-      const size_t write_size = p - base;
-
-#ifdef ROCKSDB_FALLOCATE_PRESENT
-      // If this write would cross a boundary of kDebugLogChunkSize
-      // space, pre-allocate more space to avoid overly large
-      // allocations from filesystem allocsize options.
-      const size_t log_size = log_size_;
-      const int last_allocation_chunk =
-        ((kDebugLogChunkSize - 1 + log_size) / kDebugLogChunkSize);
-      const int desired_allocation_chunk =
-        ((kDebugLogChunkSize - 1 + log_size + write_size) /
-           kDebugLogChunkSize);
-      if (last_allocation_chunk != desired_allocation_chunk) {
-        fallocate(fd_, FALLOC_FL_KEEP_SIZE, 0,
-                  desired_allocation_chunk * kDebugLogChunkSize);
-      }
-#endif
-
-      size_t sz = fwrite(base, 1, write_size, file_);
-      flush_pending_ = true;
-      assert(sz == write_size);
-      if (sz > 0) {
-        log_size_ += write_size;
-      }
-      uint64_t now_micros = static_cast<uint64_t>(now_tv.tv_sec) * 1000000 +
-        now_tv.tv_usec;
-      if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) {
-        flush_pending_ = false;
-        fflush(file_);
-        last_flush_micros_ = now_micros;
-      }
-      if (base != buffer) {
-        delete[] base;
-      }
-      break;
-    }
-  }
-  size_t GetLogFileSize() const {
-    return log_size_;
-  }
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/random.h b/src/rocksdb/util/random.h
deleted file mode 100644
index e5b3315..0000000
--- a/src/rocksdb/util/random.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <random>
-#include <stdint.h>
-
-namespace rocksdb {
-
-// A very simple random number generator.  Not especially good at
-// generating truly random bits, but good enough for our needs in this
-// package.
-class Random {
- private:
-  uint32_t seed_;
- public:
-  explicit Random(uint32_t s) : seed_(s & 0x7fffffffu) { }
-  uint32_t Next() {
-    static const uint32_t M = 2147483647L;   // 2^31-1
-    static const uint64_t A = 16807;  // bits 14, 8, 7, 5, 2, 1, 0
-    // We are computing
-    //       seed_ = (seed_ * A) % M,    where M = 2^31-1
-    //
-    // seed_ must not be zero or M, or else all subsequent computed values
-    // will be zero or M respectively.  For all other values, seed_ will end
-    // up cycling through every number in [1,M-1]
-    uint64_t product = seed_ * A;
-
-    // Compute (product % M) using the fact that ((x << 31) % M) == x.
-    seed_ = static_cast<uint32_t>((product >> 31) + (product & M));
-    // The first reduction may overflow by 1 bit, so we may need to
-    // repeat.  mod == M is not possible; using > allows the faster
-    // sign-bit-based test.
-    if (seed_ > M) {
-      seed_ -= M;
-    }
-    return seed_;
-  }
-  // Returns a uniformly distributed value in the range [0..n-1]
-  // REQUIRES: n > 0
-  uint32_t Uniform(int n) { return Next() % n; }
-
-  // Randomly returns true ~"1/n" of the time, and false otherwise.
-  // REQUIRES: n > 0
-  bool OneIn(int n) { return (Next() % n) == 0; }
-
-  // Skewed: pick "base" uniformly from range [0,max_log] and then
-  // return "base" random bits.  The effect is to pick a number in the
-  // range [0,2^max_log-1] with exponential bias towards smaller numbers.
-  uint32_t Skewed(int max_log) {
-    return Uniform(1 << Uniform(max_log + 1));
-  }
-};
-
-// A simple 64bit random number generator based on std::mt19937_64
-class Random64 {
- private:
-  std::mt19937_64 generator_;
-
- public:
-  explicit Random64(uint64_t s) : generator_(s) { }
-
-  // Generates the next random number
-  uint64_t Next() { return generator_(); }
-
-  // Returns a uniformly distributed value in the range [0..n-1]
-  // REQUIRES: n > 0
-  uint64_t Uniform(uint64_t n) {
-    return std::uniform_int_distribution<uint64_t>(0, n - 1)(generator_);
-  }
-
-  // Randomly returns true ~"1/n" of the time, and false otherwise.
-  // REQUIRES: n > 0
-  bool OneIn(uint64_t n) { return Uniform(n) == 0; }
-
-  // Skewed: pick "base" uniformly from range [0,max_log] and then
-  // return "base" random bits.  The effect is to pick a number in the
-  // range [0,2^max_log-1] with exponential bias towards smaller numbers.
-  uint64_t Skewed(int max_log) {
-    return Uniform(1 << Uniform(max_log + 1));
-  }
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/signal_test.cc b/src/rocksdb/util/signal_test.cc
deleted file mode 100644
index f51fa54..0000000
--- a/src/rocksdb/util/signal_test.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "port/stack_trace.h"
-#include <assert.h>
-
-namespace {
-void f0() {
-  char *p = nullptr;
-  *p = 10;  /* SIGSEGV here!! */
-}
-
-void f1() {
-  f0();
-}
-
-void f2() {
-  f1();
-}
-
-void f3() {
-  f2();
-}
-}  // namespace
-
-int main() {
-  rocksdb::port::InstallStackTraceHandler();
-
-  f3();
-
-  return 0;
-}
diff --git a/src/rocksdb/util/skiplistrep.cc b/src/rocksdb/util/skiplistrep.cc
deleted file mode 100644
index 93f7134..0000000
--- a/src/rocksdb/util/skiplistrep.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "rocksdb/memtablerep.h"
-#include "db/memtable.h"
-#include "db/skiplist.h"
-
-namespace rocksdb {
-namespace {
-class SkipListRep : public MemTableRep {
-  SkipList<const char*, const MemTableRep::KeyComparator&> skip_list_;
-public:
-  explicit SkipListRep(const MemTableRep::KeyComparator& compare, Arena* arena)
-    : MemTableRep(arena), skip_list_(compare, arena) {
-  }
-
-  // Insert key into the list.
-  // REQUIRES: nothing that compares equal to key is currently in the list.
-  virtual void Insert(KeyHandle handle) override {
-    skip_list_.Insert(static_cast<char*>(handle));
-  }
-
-  // Returns true iff an entry that compares equal to key is in the list.
-  virtual bool Contains(const char* key) const override {
-    return skip_list_.Contains(key);
-  }
-
-  virtual size_t ApproximateMemoryUsage() override {
-    // All memory is allocated through arena; nothing to report here
-    return 0;
-  }
-
-  virtual void Get(const LookupKey& k, void* callback_args,
-                   bool (*callback_func)(void* arg,
-                                         const char* entry)) override {
-    SkipListRep::Iterator iter(&skip_list_);
-    Slice dummy_slice;
-    for (iter.Seek(dummy_slice, k.memtable_key().data());
-         iter.Valid() && callback_func(callback_args, iter.key());
-         iter.Next()) {
-    }
-  }
-
-  virtual ~SkipListRep() override { }
-
-  // Iteration over the contents of a skip list
-  class Iterator : public MemTableRep::Iterator {
-    SkipList<const char*, const MemTableRep::KeyComparator&>::Iterator iter_;
-   public:
-    // Initialize an iterator over the specified list.
-    // The returned iterator is not valid.
-    explicit Iterator(
-      const SkipList<const char*, const MemTableRep::KeyComparator&>* list
-    ) : iter_(list) { }
-
-    virtual ~Iterator() override { }
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const override {
-      return iter_.Valid();
-    }
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const override {
-      return iter_.key();
-    }
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() override {
-      iter_.Next();
-    }
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() override {
-      iter_.Prev();
-    }
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& user_key, const char* memtable_key)
-        override {
-      if (memtable_key != nullptr) {
-        iter_.Seek(memtable_key);
-      } else {
-        iter_.Seek(EncodeKey(&tmp_, user_key));
-      }
-    }
-
-    // Position at the first entry in list.
-    // Final state of iterator is Valid() iff list is not empty.
-    virtual void SeekToFirst() override {
-      iter_.SeekToFirst();
-    }
-
-    // Position at the last entry in list.
-    // Final state of iterator is Valid() iff list is not empty.
-    virtual void SeekToLast() override {
-      iter_.SeekToLast();
-    }
-   protected:
-    std::string tmp_;       // For passing to EncodeKey
-  };
-
-  // Unhide default implementations of GetIterator
-  using MemTableRep::GetIterator;
-
-  virtual MemTableRep::Iterator* GetIterator() override {
-    return new SkipListRep::Iterator(&skip_list_);
-  }
-};
-}
-
-MemTableRep* SkipListFactory::CreateMemTableRep(
-    const MemTableRep::KeyComparator& compare, Arena* arena,
-    const SliceTransform*) {
-  return new SkipListRep(compare, arena);
-}
-
-} // namespace rocksdb
diff --git a/src/rocksdb/util/slice.cc b/src/rocksdb/util/slice.cc
deleted file mode 100644
index 55f561f..0000000
--- a/src/rocksdb/util/slice.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "rocksdb/slice_transform.h"
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-namespace {
-
-class FixedPrefixTransform : public SliceTransform {
- private:
-  size_t prefix_len_;
-
- public:
-  explicit FixedPrefixTransform(size_t prefix_len) : prefix_len_(prefix_len) { }
-
-  virtual const char* Name() const {
-    return "rocksdb.FixedPrefix";
-  }
-
-  virtual Slice Transform(const Slice& src) const {
-    assert(InDomain(src));
-    return Slice(src.data(), prefix_len_);
-  }
-
-  virtual bool InDomain(const Slice& src) const {
-    return (src.size() >= prefix_len_);
-  }
-
-  virtual bool InRange(const Slice& dst) const {
-    return (dst.size() == prefix_len_);
-  }
-};
-
-class NoopTransform : public SliceTransform {
- public:
-  explicit NoopTransform() { }
-
-  virtual const char* Name() const {
-    return "rocksdb.Noop";
-  }
-
-  virtual Slice Transform(const Slice& src) const {
-    return src;
-  }
-
-  virtual bool InDomain(const Slice& src) const {
-    return true;
-  }
-
-  virtual bool InRange(const Slice& dst) const {
-    return true;
-  }
-};
-
-}
-
-const SliceTransform* NewFixedPrefixTransform(size_t prefix_len) {
-  return new FixedPrefixTransform(prefix_len);
-}
-
-const SliceTransform* NewNoopTransform() {
-  return new NoopTransform;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/statistics.cc b/src/rocksdb/util/statistics.cc
deleted file mode 100644
index 4fc2400..0000000
--- a/src/rocksdb/util/statistics.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include "util/statistics.h"
-#include "rocksdb/statistics.h"
-#include <algorithm>
-#include <cstdio>
-
-namespace rocksdb {
-
-std::shared_ptr<Statistics> CreateDBStatistics() {
-  return std::make_shared<StatisticsImpl>();
-}
-
-StatisticsImpl::StatisticsImpl() {}
-
-StatisticsImpl::~StatisticsImpl() {}
-
-long StatisticsImpl::getTickerCount(Tickers tickerType) {
-  assert(tickerType < TICKER_ENUM_MAX);
-  return tickers_[tickerType].value;
-}
-
-void StatisticsImpl::setTickerCount(Tickers tickerType, uint64_t count) {
-  assert(tickerType < TICKER_ENUM_MAX);
-  tickers_[tickerType].value = count;
-}
-
-void StatisticsImpl::recordTick(Tickers tickerType, uint64_t count) {
-  assert(tickerType < TICKER_ENUM_MAX);
-  tickers_[tickerType].value += count;
-}
-
-void StatisticsImpl::measureTime(Histograms histogramType, uint64_t value) {
-  assert(histogramType < HISTOGRAM_ENUM_MAX);
-  histograms_[histogramType].Add(value);
-}
-
-void StatisticsImpl::histogramData(Histograms histogramType,
-                                   HistogramData* const data) {
-  assert(histogramType < HISTOGRAM_ENUM_MAX);
-  histograms_[histogramType].Data(data);
-}
-
-namespace {
-
-// a buffer size used for temp string buffers
-const int kBufferSize = 200;
-
-std::string HistogramToString (
-    Statistics* dbstats,
-    const Histograms& histogram_type,
-    const std::string& name) {
-
-  char buffer[kBufferSize];
-  HistogramData histogramData;
-  dbstats->histogramData(histogram_type, &histogramData);
-  snprintf(
-      buffer,
-      kBufferSize,
-      "%s statistics Percentiles :=> 50 : %f 95 : %f 99 : %f\n",
-      name.c_str(),
-      histogramData.median,
-      histogramData.percentile95,
-      histogramData.percentile99
-  );
-  return std::string(buffer);
-};
-
-std::string TickerToString(Statistics* dbstats, const Tickers& ticker,
-                           const std::string& name) {
-  char buffer[kBufferSize];
-  snprintf(buffer, kBufferSize, "%s COUNT : %ld\n",
-            name.c_str(), dbstats->getTickerCount(ticker));
-  return std::string(buffer);
-};
-} // namespace
-
-std::string Statistics::ToString() {
-  std::string res;
-  res.reserve(20000);
-  for (const auto& t : TickersNameMap) {
-    res.append(TickerToString(this, t.first, t.second));
-  }
-  for (const auto& h : HistogramsNameMap) {
-    res.append(HistogramToString(this, h.first, h.second));
-  }
-  res.shrink_to_fit();
-  return res;
-}
-
-} // namespace rocksdb
diff --git a/src/rocksdb/util/statistics.h b/src/rocksdb/util/statistics.h
deleted file mode 100644
index d57a1dd..0000000
--- a/src/rocksdb/util/statistics.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-#include "rocksdb/statistics.h"
-#include "util/histogram.h"
-#include "util/mutexlock.h"
-#include "port/likely.h"
-
-#include <vector>
-#include <atomic>
-
-
-namespace rocksdb {
-
-class StatisticsImpl : public Statistics {
- public:
-  StatisticsImpl();
-  virtual ~StatisticsImpl();
-
-  virtual long getTickerCount(Tickers tickerType);
-  virtual void setTickerCount(Tickers tickerType, uint64_t count);
-  virtual void recordTick(Tickers tickerType, uint64_t count);
-  virtual void measureTime(Histograms histogramType, uint64_t value);
-  virtual void histogramData(Histograms histogramType,
-                             HistogramData* const data);
-
- private:
-  struct Ticker {
-    Ticker() : value(uint_fast64_t()) {}
-
-    std::atomic_uint_fast64_t value;
-    // Pad the structure to make it size of 64 bytes. A plain array of
-    // std::atomic_uint_fast64_t results in huge performance degradataion
-    // due to false sharing.
-    char padding[64 - sizeof(std::atomic_uint_fast64_t)];
-  };
-
-  Ticker tickers_[TICKER_ENUM_MAX] __attribute__((aligned(64)));
-  HistogramImpl histograms_[HISTOGRAM_ENUM_MAX] __attribute__((aligned(64)));
-};
-
-// Utility functions
-inline void MeasureTime(Statistics* statistics, Histograms histogramType,
-                        uint64_t value) {
-  if (statistics) {
-    statistics->measureTime(histogramType, value);
-  }
-}
-
-inline void RecordTick(Statistics* statistics, Tickers ticker,
-                       uint64_t count = 1) {
-  if (statistics) {
-    statistics->recordTick(ticker, count);
-  }
-}
-
-inline void SetTickerCount(Statistics* statistics, Tickers ticker,
-                           uint64_t count) {
-  if (statistics) {
-    statistics->setTickerCount(ticker, count);
-  }
-}
-}
diff --git a/src/rocksdb/util/stats_logger.h b/src/rocksdb/util/stats_logger.h
deleted file mode 100644
index f0b4540..0000000
--- a/src/rocksdb/util/stats_logger.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-
-namespace rocksdb {
-
-class StatsLogger {
-
- public:
-
-  virtual void Log_Deploy_Stats(const std::string& db_version,
-                                const std::string& machine_info,
-                                const std::string& data_dir,
-                                const uint64_t data_size,
-                                const uint32_t file_number,
-                                const std::string& data_size_per_level,
-                                const std::string& file_number_per_level,
-                                const int64_t& ts_unix) = 0;
-  virtual ~StatsLogger() {}
-
-};
-
-}
diff --git a/src/rocksdb/util/status.cc b/src/rocksdb/util/status.cc
deleted file mode 100644
index 2a5f05a..0000000
--- a/src/rocksdb/util/status.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <stdio.h>
-#include "port/port.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-const char* Status::CopyState(const char* state) {
-  uint32_t size;
-  memcpy(&size, state, sizeof(size));
-  char* result = new char[size + 4];
-  memcpy(result, state, size + 4);
-  return result;
-}
-
-Status::Status(Code code, const Slice& msg, const Slice& msg2) :
-    code_(code) {
-  assert(code != kOk);
-  const uint32_t len1 = msg.size();
-  const uint32_t len2 = msg2.size();
-  const uint32_t size = len1 + (len2 ? (2 + len2) : 0);
-  char* result = new char[size + 4];
-  memcpy(result, &size, sizeof(size));
-  memcpy(result + 4, msg.data(), len1);
-  if (len2) {
-    result[4 + len1] = ':';
-    result[5 + len1] = ' ';
-    memcpy(result + 6 + len1, msg2.data(), len2);
-  }
-  state_ = result;
-}
-
-std::string Status::ToString() const {
-  char tmp[30];
-  const char* type;
-  switch (code_) {
-    case kOk:
-      return "OK";
-    case kNotFound:
-      type = "NotFound: ";
-      break;
-    case kCorruption:
-      type = "Corruption: ";
-      break;
-    case kNotSupported:
-      type = "Not implemented: ";
-      break;
-    case kInvalidArgument:
-      type = "Invalid argument: ";
-      break;
-    case kIOError:
-      type = "IO error: ";
-      break;
-    case kMergeInProgress:
-      type = "Merge in progress: ";
-      break;
-    case kIncomplete:
-      type = "Result incomplete: ";
-      break;
-    case kShutdownInProgress:
-      type = "Shutdown in progress: ";
-      break;
-    default:
-      snprintf(tmp, sizeof(tmp), "Unknown code(%d): ",
-               static_cast<int>(code()));
-      type = tmp;
-      break;
-  }
-  std::string result(type);
-  if (state_ != nullptr) {
-    uint32_t length;
-    memcpy(&length, state_, sizeof(length));
-    result.append(state_ + 4, length);
-  }
-  return result;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/stl_wrappers.h b/src/rocksdb/util/stl_wrappers.h
deleted file mode 100644
index b4c14b4..0000000
--- a/src/rocksdb/util/stl_wrappers.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-
-#include "util/murmurhash.h"
-#include "util/coding.h"
-
-#include "rocksdb/memtablerep.h"
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-namespace stl_wrappers {
-  class Base {
-   protected:
-    const MemTableRep::KeyComparator& compare_;
-    explicit Base(const MemTableRep::KeyComparator& compare)
-      : compare_(compare) { }
-  };
-
-  struct Compare : private Base {
-    explicit Compare(const MemTableRep::KeyComparator& compare)
-      : Base(compare) { }
-    inline bool operator()(const char* a, const char* b) const {
-      return compare_(a, b) < 0;
-    }
-  };
-
-}
-}
diff --git a/src/rocksdb/util/stop_watch.h b/src/rocksdb/util/stop_watch.h
deleted file mode 100644
index 48e1b01..0000000
--- a/src/rocksdb/util/stop_watch.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#pragma once
-#include "rocksdb/env.h"
-#include "util/statistics.h"
-
-namespace rocksdb {
-// Auto-scoped.
-// Records the statistic into the corresponding histogram.
-class StopWatch {
- public:
-  explicit StopWatch(
-    Env * const env,
-    Statistics* statistics = nullptr,
-    const Histograms histogram_name = DB_GET,
-    bool auto_start = true) :
-      env_(env),
-      start_time_((!auto_start && !statistics) ? 0 : env->NowMicros()),
-      statistics_(statistics),
-      histogram_name_(histogram_name) {}
-
-
-
-  uint64_t ElapsedMicros() {
-    return env_->NowMicros() - start_time_;
-  }
-
-  ~StopWatch() { MeasureTime(statistics_, histogram_name_, ElapsedMicros()); }
-
- private:
-  Env* const env_;
-  const uint64_t start_time_;
-  Statistics* statistics_;
-  const Histograms histogram_name_;
-
-};
-
-// a nano second precision stopwatch
-class StopWatchNano {
- public:
-  explicit StopWatchNano(Env* const env, bool auto_start = false)
-      : env_(env), start_(0) {
-    if (auto_start) {
-      Start();
-    }
-  }
-
-  void Start() { start_ = env_->NowNanos(); }
-
-  uint64_t ElapsedNanos(bool reset = false) {
-    auto now = env_->NowNanos();
-    auto elapsed = now - start_;
-    if (reset) {
-      start_ = now;
-    }
-    return elapsed;
-  }
-
- private:
-  Env* const env_;
-  uint64_t start_;
-};
-
-} // namespace rocksdb
diff --git a/src/rocksdb/util/string_util.cc b/src/rocksdb/util/string_util.cc
deleted file mode 100644
index 97b7f9d..0000000
--- a/src/rocksdb/util/string_util.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <sstream>
-#include <string>
-#include <vector>
-#include "util/string_util.h"
-
-namespace rocksdb {
-
-std::vector<std::string> stringSplit(std::string arg, char delim) {
-  std::vector<std::string> splits;
-  std::stringstream ss(arg);
-  std::string item;
-  while (std::getline(ss, item, delim)) {
-    splits.push_back(item);
-  }
-  return splits;
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/string_util.h b/src/rocksdb/util/string_util.h
deleted file mode 100644
index 676f4aa..0000000
--- a/src/rocksdb/util/string_util.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#include <sstream>
-#include <string>
-#include <vector>
-
-#pragma once
-namespace rocksdb {
-
-extern std::vector<std::string> stringSplit(std::string arg, char delim);
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/sync_point.cc b/src/rocksdb/util/sync_point.cc
deleted file mode 100644
index 4e4c46a..0000000
--- a/src/rocksdb/util/sync_point.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-//  Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include "util/sync_point.h"
-
-#ifndef NDEBUG
-namespace rocksdb {
-
-SyncPoint* SyncPoint::GetInstance() {
-  static SyncPoint sync_point;
-  return &sync_point;
-}
-
-void SyncPoint::LoadDependency(const std::vector<Dependency>& dependencies) {
-  successors_.clear();
-  predecessors_.clear();
-  cleared_points_.clear();
-  for (const auto& dependency : dependencies) {
-    successors_[dependency.predecessor].push_back(dependency.successor);
-    predecessors_[dependency.successor].push_back(dependency.predecessor);
-  }
-}
-
-bool SyncPoint::PredecessorsAllCleared(const std::string& point) {
-  for (const auto& pred : predecessors_[point]) {
-    if (cleared_points_.count(pred) == 0) {
-      return false;
-    }
-  }
-  return true;
-}
-
-void SyncPoint::EnableProcessing() {
-  std::unique_lock<std::mutex> lock(mutex_);
-  enabled_ = true;
-}
-
-void SyncPoint::DisableProcessing() {
-  std::unique_lock<std::mutex> lock(mutex_);
-  enabled_ = false;
-}
-
-void SyncPoint::ClearTrace() {
-  std::unique_lock<std::mutex> lock(mutex_);
-  cleared_points_.clear();
-}
-
-void SyncPoint::Process(const std::string& point) {
-  std::unique_lock<std::mutex> lock(mutex_);
-
-  if (!enabled_) return;
-
-  while (!PredecessorsAllCleared(point)) {
-    cv_.wait(lock);
-  }
-
-  cleared_points_.insert(point);
-  cv_.notify_all();
-}
-
-}  // namespace rocksdb
-#endif  // NDEBUG
diff --git a/src/rocksdb/util/sync_point.h b/src/rocksdb/util/sync_point.h
deleted file mode 100644
index b4b61a9..0000000
--- a/src/rocksdb/util/sync_point.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//  Copyright (c) 2014, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-#pragma once
-
-#include <condition_variable>
-#include <mutex>
-#include <string>
-#include <unordered_set>
-#include <unordered_map>
-#include <vector>
-
-#ifdef NDEBUG
-#define TEST_SYNC_POINT(x)
-#else
-
-namespace rocksdb {
-
-// This class provides facility to reproduce race conditions deterministically
-// in unit tests.
-// Developer could specify sync points in the codebase via TEST_SYNC_POINT.
-// Each sync point represents a position in the execution stream of a thread.
-// In the unit test, 'Happens After' relationship among sync points could be
-// setup via SyncPoint::LoadDependency, to reproduce a desired interleave of
-// threads execution.
-// Refer to (DBTest,TransactionLogIteratorRace), for an exmaple use case.
-
-class SyncPoint {
- public:
-  static SyncPoint* GetInstance();
-
-  struct Dependency {
-    std::string predecessor;
-    std::string successor;
-  };
-  // call once at the beginning of a test to setup the dependency between
-  // sync points
-  void LoadDependency(const std::vector<Dependency>& dependencies);
-
-  // enable sync point processing (disabled on startup)
-  void EnableProcessing();
-
-  // disable sync point processing
-  void DisableProcessing();
-
-  // remove the execution trace of all sync points
-  void ClearTrace();
-
-  // triggered by TEST_SYNC_POINT, blocking execution until all predecessors
-  // are executed.
-  void Process(const std::string& point);
-
-  // TODO: it might be useful to provide a function that blocks until all
-  // sync points are cleared.
-
- private:
-  bool PredecessorsAllCleared(const std::string& point);
-
-  // successor/predecessor map loaded from LoadDependency
-  std::unordered_map<std::string, std::vector<std::string>> successors_;
-  std::unordered_map<std::string, std::vector<std::string>> predecessors_;
-
-  std::mutex mutex_;
-  std::condition_variable cv_;
-  // sync points that have been passed through
-  std::unordered_set<std::string> cleared_points_;
-  bool enabled_ = false;
-};
-
-}  // namespace rocksdb
-
-// Use TEST_SYNC_POINT to specify sync points inside code base.
-// Sync points can have happens-after depedency on other sync points,
-// configured at runtime via SyncPoint::LoadDependency. This could be
-// utilized to re-produce race conditions between threads.
-// See TransactionLogIteratorRace in db_test.cc for an example use case.
-// TEST_SYNC_POINT is no op in release build.
-#define TEST_SYNC_POINT(x) rocksdb::SyncPoint::GetInstance()->Process(x)
-#endif  // NDEBUG
diff --git a/src/rocksdb/util/testharness.cc b/src/rocksdb/util/testharness.cc
deleted file mode 100644
index 4208d2c..0000000
--- a/src/rocksdb/util/testharness.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/testharness.h"
-#include <string>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include "port/stack_trace.h"
-
-namespace rocksdb {
-namespace test {
-
-namespace {
-struct Test {
-  const char* base;
-  const char* name;
-  void (*func)();
-};
-std::vector<Test>* tests;
-}
-
-bool RegisterTest(const char* base, const char* name, void (*func)()) {
-  if (tests == nullptr) {
-    tests = new std::vector<Test>;
-  }
-  Test t;
-  t.base = base;
-  t.name = name;
-  t.func = func;
-  tests->push_back(t);
-  return true;
-}
-
-int RunAllTests() {
-  port::InstallStackTraceHandler();
-
-  const char* matcher = getenv("ROCKSDB_TESTS");
-
-  int num = 0;
-  if (tests != nullptr) {
-    for (unsigned int i = 0; i < tests->size(); i++) {
-      const Test& t = (*tests)[i];
-      if (matcher != nullptr) {
-        std::string name = t.base;
-        name.push_back('.');
-        name.append(t.name);
-        if (strstr(name.c_str(), matcher) == nullptr) {
-          continue;
-        }
-      }
-      fprintf(stderr, "==== Test %s.%s\n", t.base, t.name);
-      (*t.func)();
-      ++num;
-    }
-  }
-  fprintf(stderr, "==== PASSED %d tests\n", num);
-  return 0;
-}
-
-std::string TmpDir() {
-  std::string dir;
-  Status s = Env::Default()->GetTestDirectory(&dir);
-  ASSERT_TRUE(s.ok()) << s.ToString();
-  return dir;
-}
-
-int RandomSeed() {
-  const char* env = getenv("TEST_RANDOM_SEED");
-  int result = (env != nullptr ? atoi(env) : 301);
-  if (result <= 0) {
-    result = 301;
-  }
-  return result;
-}
-
-}  // namespace test
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/testharness.h b/src/rocksdb/util/testharness.h
deleted file mode 100644
index 52c2984..0000000
--- a/src/rocksdb/util/testharness.h
+++ /dev/null
@@ -1,142 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sstream>
-#include "port/stack_trace.h"
-#include "rocksdb/env.h"
-#include "rocksdb/slice.h"
-#include "util/random.h"
-
-namespace rocksdb {
-namespace test {
-
-// Run some of the tests registered by the TEST() macro.  If the
-// environment variable "ROCKSDB_TESTS" is not set, runs all tests.
-// Otherwise, runs only the tests whose name contains the value of
-// "ROCKSDB_TESTS" as a substring.  E.g., suppose the tests are:
-//    TEST(Foo, Hello) { ... }
-//    TEST(Foo, World) { ... }
-// ROCKSDB_TESTS=Hello will run the first test
-// ROCKSDB_TESTS=o     will run both tests
-// ROCKSDB_TESTS=Junk  will run no tests
-//
-// Returns 0 if all tests pass.
-// Dies or returns a non-zero value if some test fails.
-extern int RunAllTests();
-
-// Return the directory to use for temporary storage.
-extern std::string TmpDir();
-
-// Return a randomization seed for this run.  Typically returns the
-// same number on repeated invocations of this binary, but automated
-// runs may be able to vary the seed.
-extern int RandomSeed();
-
-// An instance of Tester is allocated to hold temporary state during
-// the execution of an assertion.
-class Tester {
- private:
-  bool ok_;
-  const char* fname_;
-  int line_;
-  std::stringstream ss_;
-
- public:
-  Tester(const char* f, int l)
-      : ok_(true), fname_(f), line_(l) {
-  }
-
-  ~Tester() {
-    if (!ok_) {
-      fprintf(stderr, "%s:%d:%s\n", fname_, line_, ss_.str().c_str());
-      port::PrintStack(2);
-      exit(1);
-    }
-  }
-
-  Tester& Is(bool b, const char* msg) {
-    if (!b) {
-      ss_ << " Assertion failure " << msg;
-      ok_ = false;
-    }
-    return *this;
-  }
-
-  Tester& IsOk(const Status& s) {
-    if (!s.ok()) {
-      ss_ << " " << s.ToString();
-      ok_ = false;
-    }
-    return *this;
-  }
-
-#define BINARY_OP(name,op)                              \
-  template <class X, class Y>                           \
-  Tester& name(const X& x, const Y& y) {                \
-    if (! (x op y)) {                                   \
-      ss_ << " failed: " << x << (" " #op " ") << y;    \
-      ok_ = false;                                      \
-    }                                                   \
-    return *this;                                       \
-  }
-
-  BINARY_OP(IsEq, ==)
-  BINARY_OP(IsNe, !=)
-  BINARY_OP(IsGe, >=)
-  BINARY_OP(IsGt, >)
-  BINARY_OP(IsLe, <=)
-  BINARY_OP(IsLt, <)
-#undef BINARY_OP
-
-  // Attach the specified value to the error message if an error has occurred
-  template <class V>
-  Tester& operator<<(const V& value) {
-    if (!ok_) {
-      ss_ << " " << value;
-    }
-    return *this;
-  }
-};
-
-#define ASSERT_TRUE(c) ::rocksdb::test::Tester(__FILE__, __LINE__).Is((c), #c)
-#define ASSERT_OK(s) ::rocksdb::test::Tester(__FILE__, __LINE__).IsOk((s))
-#define ASSERT_EQ(a,b) ::rocksdb::test::Tester(__FILE__, __LINE__).IsEq((a),(b))
-#define ASSERT_NE(a,b) ::rocksdb::test::Tester(__FILE__, __LINE__).IsNe((a),(b))
-#define ASSERT_GE(a,b) ::rocksdb::test::Tester(__FILE__, __LINE__).IsGe((a),(b))
-#define ASSERT_GT(a,b) ::rocksdb::test::Tester(__FILE__, __LINE__).IsGt((a),(b))
-#define ASSERT_LE(a,b) ::rocksdb::test::Tester(__FILE__, __LINE__).IsLe((a),(b))
-#define ASSERT_LT(a,b) ::rocksdb::test::Tester(__FILE__, __LINE__).IsLt((a),(b))
-
-#define TCONCAT(a,b) TCONCAT1(a,b)
-#define TCONCAT1(a,b) a##b
-
-#define TEST(base,name)                                                 \
-class TCONCAT(_Test_,name) : public base {                              \
- public:                                                                \
-  void _Run();                                                          \
-  static void _RunIt() {                                                \
-    TCONCAT(_Test_,name) t;                                             \
-    t._Run();                                                           \
-  }                                                                     \
-};                                                                      \
-bool TCONCAT(_Test_ignored_,name) =                                     \
-  ::rocksdb::test::RegisterTest(#base, #name, &TCONCAT(_Test_,name)::_RunIt); \
-void TCONCAT(_Test_,name)::_Run()
-
-// Register the specified test.  Typically not used directly, but
-// invoked via the macro expansion of TEST.
-extern bool RegisterTest(const char* base, const char* name, void (*func)());
-
-
-}  // namespace test
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/testutil.cc b/src/rocksdb/util/testutil.cc
deleted file mode 100644
index 13e781e..0000000
--- a/src/rocksdb/util/testutil.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/testutil.h"
-
-#include "util/random.h"
-
-namespace rocksdb {
-namespace test {
-
-Slice RandomString(Random* rnd, int len, std::string* dst) {
-  dst->resize(len);
-  for (int i = 0; i < len; i++) {
-    (*dst)[i] = static_cast<char>(' ' + rnd->Uniform(95));   // ' ' .. '~'
-  }
-  return Slice(*dst);
-}
-
-std::string RandomKey(Random* rnd, int len) {
-  // Make sure to generate a wide variety of characters so we
-  // test the boundary conditions for short-key optimizations.
-  static const char kTestChars[] = {
-    '\0', '\1', 'a', 'b', 'c', 'd', 'e', '\xfd', '\xfe', '\xff'
-  };
-  std::string result;
-  for (int i = 0; i < len; i++) {
-    result += kTestChars[rnd->Uniform(sizeof(kTestChars))];
-  }
-  return result;
-}
-
-
-extern Slice CompressibleString(Random* rnd, double compressed_fraction,
-                                int len, std::string* dst) {
-  int raw = static_cast<int>(len * compressed_fraction);
-  if (raw < 1) raw = 1;
-  std::string raw_data;
-  RandomString(rnd, raw, &raw_data);
-
-  // Duplicate the random data until we have filled "len" bytes
-  dst->clear();
-  while (dst->size() < (unsigned int)len) {
-    dst->append(raw_data);
-  }
-  dst->resize(len);
-  return Slice(*dst);
-}
-
-}  // namespace test
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/testutil.h b/src/rocksdb/util/testutil.h
deleted file mode 100644
index 4fc8c0f..0000000
--- a/src/rocksdb/util/testutil.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-#include <string>
-#include "db/dbformat.h"
-#include "rocksdb/env.h"
-#include "rocksdb/slice.h"
-#include "util/random.h"
-
-namespace rocksdb {
-namespace test {
-
-// Store in *dst a random string of length "len" and return a Slice that
-// references the generated data.
-extern Slice RandomString(Random* rnd, int len, std::string* dst);
-
-// Return a random key with the specified length that may contain interesting
-// characters (e.g. \x00, \xff, etc.).
-extern std::string RandomKey(Random* rnd, int len);
-
-// Store in *dst a string of length "len" that will compress to
-// "N*compressed_fraction" bytes and return a Slice that references
-// the generated data.
-extern Slice CompressibleString(Random* rnd, double compressed_fraction,
-                                int len, std::string* dst);
-
-// A wrapper that allows injection of errors.
-class ErrorEnv : public EnvWrapper {
- public:
-  bool writable_file_error_;
-  int num_writable_file_errors_;
-
-  ErrorEnv() : EnvWrapper(Env::Default()),
-               writable_file_error_(false),
-               num_writable_file_errors_(0) { }
-
-  virtual Status NewWritableFile(const std::string& fname,
-                                 unique_ptr<WritableFile>* result,
-                                 const EnvOptions& soptions) {
-    result->reset();
-    if (writable_file_error_) {
-      ++num_writable_file_errors_;
-      return Status::IOError(fname, "fake error");
-    }
-    return target()->NewWritableFile(fname, result, soptions);
-  }
-};
-
-// An internal comparator that just forward comparing results from the
-// user comparator in it. Can be used to test entities that have no dependency
-// on internal key structure but consumes InternalKeyComparator, like
-// BlockBasedTable.
-class PlainInternalKeyComparator : public InternalKeyComparator {
- public:
-  explicit PlainInternalKeyComparator(const Comparator* c)
-      : InternalKeyComparator(c) {}
-
-  virtual ~PlainInternalKeyComparator() {}
-
-  virtual int Compare(const Slice& a, const Slice& b) const override {
-    return user_comparator()->Compare(a, b);
-  }
-  virtual void FindShortestSeparator(std::string* start,
-                                     const Slice& limit) const override {
-    user_comparator()->FindShortestSeparator(start, limit);
-  }
-  virtual void FindShortSuccessor(std::string* key) const override {
-    user_comparator()->FindShortSuccessor(key);
-  }
-};
-
-}  // namespace test
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/thread_local.cc b/src/rocksdb/util/thread_local.cc
deleted file mode 100644
index bc8a4c7..0000000
--- a/src/rocksdb/util/thread_local.cc
+++ /dev/null
@@ -1,243 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include "util/thread_local.h"
-#include "util/mutexlock.h"
-#include "port/likely.h"
-
-
-namespace rocksdb {
-
-port::Mutex ThreadLocalPtr::StaticMeta::mutex_;
-#if !defined(OS_MACOSX)
-__thread ThreadLocalPtr::ThreadData* ThreadLocalPtr::StaticMeta::tls_ = nullptr;
-#endif
-
-ThreadLocalPtr::StaticMeta* ThreadLocalPtr::Instance() {
-  static ThreadLocalPtr::StaticMeta inst;
-  return &inst;
-}
-
-void ThreadLocalPtr::StaticMeta::OnThreadExit(void* ptr) {
-  auto* tls = static_cast<ThreadData*>(ptr);
-  assert(tls != nullptr);
-
-  auto* inst = Instance();
-  pthread_setspecific(inst->pthread_key_, nullptr);
-
-  MutexLock l(&mutex_);
-  inst->RemoveThreadData(tls);
-  // Unref stored pointers of current thread from all instances
-  uint32_t id = 0;
-  for (auto& e : tls->entries) {
-    void* raw = e.ptr.load(std::memory_order_relaxed);
-    if (raw != nullptr) {
-      auto unref = inst->GetHandler(id);
-      if (unref != nullptr) {
-        unref(raw);
-      }
-    }
-    ++id;
-  }
-  // Delete thread local structure no matter if it is Mac platform
-  delete tls;
-}
-
-ThreadLocalPtr::StaticMeta::StaticMeta() : next_instance_id_(0) {
-  if (pthread_key_create(&pthread_key_, &OnThreadExit) != 0) {
-    throw std::runtime_error("pthread_key_create failed");
-  }
-  head_.next = &head_;
-  head_.prev = &head_;
-}
-
-void ThreadLocalPtr::StaticMeta::AddThreadData(ThreadLocalPtr::ThreadData* d) {
-  mutex_.AssertHeld();
-  d->next = &head_;
-  d->prev = head_.prev;
-  head_.prev->next = d;
-  head_.prev = d;
-}
-
-void ThreadLocalPtr::StaticMeta::RemoveThreadData(
-    ThreadLocalPtr::ThreadData* d) {
-  mutex_.AssertHeld();
-  d->next->prev = d->prev;
-  d->prev->next = d->next;
-  d->next = d->prev = d;
-}
-
-ThreadLocalPtr::ThreadData* ThreadLocalPtr::StaticMeta::GetThreadLocal() {
-#if defined(OS_MACOSX)
-  // Make this local variable name look like a member variable so that we
-  // can share all the code below
-  ThreadData* tls_ =
-      static_cast<ThreadData*>(pthread_getspecific(Instance()->pthread_key_));
-#endif
-
-  if (UNLIKELY(tls_ == nullptr)) {
-    auto* inst = Instance();
-    tls_ = new ThreadData();
-    {
-      // Register it in the global chain, needs to be done before thread exit
-      // handler registration
-      MutexLock l(&mutex_);
-      inst->AddThreadData(tls_);
-    }
-    // Even it is not OS_MACOSX, need to register value for pthread_key_ so that
-    // its exit handler will be triggered.
-    if (pthread_setspecific(inst->pthread_key_, tls_) != 0) {
-      {
-        MutexLock l(&mutex_);
-        inst->RemoveThreadData(tls_);
-      }
-      delete tls_;
-      throw std::runtime_error("pthread_setspecific failed");
-    }
-  }
-  return tls_;
-}
-
-void* ThreadLocalPtr::StaticMeta::Get(uint32_t id) const {
-  auto* tls = GetThreadLocal();
-  if (UNLIKELY(id >= tls->entries.size())) {
-    return nullptr;
-  }
-  return tls->entries[id].ptr.load(std::memory_order_relaxed);
-}
-
-void ThreadLocalPtr::StaticMeta::Reset(uint32_t id, void* ptr) {
-  auto* tls = GetThreadLocal();
-  if (UNLIKELY(id >= tls->entries.size())) {
-    // Need mutex to protect entries access within ReclaimId
-    MutexLock l(&mutex_);
-    tls->entries.resize(id + 1);
-  }
-  tls->entries[id].ptr.store(ptr, std::memory_order_relaxed);
-}
-
-void* ThreadLocalPtr::StaticMeta::Swap(uint32_t id, void* ptr) {
-  auto* tls = GetThreadLocal();
-  if (UNLIKELY(id >= tls->entries.size())) {
-    // Need mutex to protect entries access within ReclaimId
-    MutexLock l(&mutex_);
-    tls->entries.resize(id + 1);
-  }
-  return tls->entries[id].ptr.exchange(ptr, std::memory_order_relaxed);
-}
-
-bool ThreadLocalPtr::StaticMeta::CompareAndSwap(uint32_t id, void* ptr,
-    void*& expected) {
-  auto* tls = GetThreadLocal();
-  if (UNLIKELY(id >= tls->entries.size())) {
-    // Need mutex to protect entries access within ReclaimId
-    MutexLock l(&mutex_);
-    tls->entries.resize(id + 1);
-  }
-  return tls->entries[id].ptr.compare_exchange_strong(expected, ptr,
-      std::memory_order_relaxed, std::memory_order_relaxed);
-}
-
-void ThreadLocalPtr::StaticMeta::Scrape(uint32_t id, autovector<void*>* ptrs,
-    void* const replacement) {
-  MutexLock l(&mutex_);
-  for (ThreadData* t = head_.next; t != &head_; t = t->next) {
-    if (id < t->entries.size()) {
-      void* ptr =
-          t->entries[id].ptr.exchange(replacement, std::memory_order_relaxed);
-      if (ptr != nullptr) {
-        ptrs->push_back(ptr);
-      }
-    }
-  }
-}
-
-void ThreadLocalPtr::StaticMeta::SetHandler(uint32_t id, UnrefHandler handler) {
-  MutexLock l(&mutex_);
-  handler_map_[id] = handler;
-}
-
-UnrefHandler ThreadLocalPtr::StaticMeta::GetHandler(uint32_t id) {
-  mutex_.AssertHeld();
-  auto iter = handler_map_.find(id);
-  if (iter == handler_map_.end()) {
-    return nullptr;
-  }
-  return iter->second;
-}
-
-uint32_t ThreadLocalPtr::StaticMeta::GetId() {
-  MutexLock l(&mutex_);
-  if (free_instance_ids_.empty()) {
-    return next_instance_id_++;
-  }
-
-  uint32_t id = free_instance_ids_.back();
-  free_instance_ids_.pop_back();
-  return id;
-}
-
-uint32_t ThreadLocalPtr::StaticMeta::PeekId() const {
-  MutexLock l(&mutex_);
-  if (!free_instance_ids_.empty()) {
-    return free_instance_ids_.back();
-  }
-  return next_instance_id_;
-}
-
-void ThreadLocalPtr::StaticMeta::ReclaimId(uint32_t id) {
-  // This id is not used, go through all thread local data and release
-  // corresponding value
-  MutexLock l(&mutex_);
-  auto unref = GetHandler(id);
-  for (ThreadData* t = head_.next; t != &head_; t = t->next) {
-    if (id < t->entries.size()) {
-      void* ptr =
-          t->entries[id].ptr.exchange(nullptr, std::memory_order_relaxed);
-      if (ptr != nullptr && unref != nullptr) {
-        unref(ptr);
-      }
-    }
-  }
-  handler_map_[id] = nullptr;
-  free_instance_ids_.push_back(id);
-}
-
-ThreadLocalPtr::ThreadLocalPtr(UnrefHandler handler)
-    : id_(Instance()->GetId()) {
-  if (handler != nullptr) {
-    Instance()->SetHandler(id_, handler);
-  }
-}
-
-ThreadLocalPtr::~ThreadLocalPtr() {
-  Instance()->ReclaimId(id_);
-}
-
-void* ThreadLocalPtr::Get() const {
-  return Instance()->Get(id_);
-}
-
-void ThreadLocalPtr::Reset(void* ptr) {
-  Instance()->Reset(id_, ptr);
-}
-
-void* ThreadLocalPtr::Swap(void* ptr) {
-  return Instance()->Swap(id_, ptr);
-}
-
-bool ThreadLocalPtr::CompareAndSwap(void* ptr, void*& expected) {
-  return Instance()->CompareAndSwap(id_, ptr, expected);
-}
-
-void ThreadLocalPtr::Scrape(autovector<void*>* ptrs, void* const replacement) {
-  Instance()->Scrape(id_, ptrs, replacement);
-}
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/thread_local.h b/src/rocksdb/util/thread_local.h
deleted file mode 100644
index a037a9c..0000000
--- a/src/rocksdb/util/thread_local.h
+++ /dev/null
@@ -1,166 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#include <atomic>
-#include <memory>
-#include <unordered_map>
-#include <vector>
-
-#include "util/autovector.h"
-#include "port/port_posix.h"
-#include "util/thread_local.h"
-
-namespace rocksdb {
-
-// Cleanup function that will be called for a stored thread local
-// pointer (if not NULL) when one of the following happens:
-// (1) a thread terminates
-// (2) a ThreadLocalPtr is destroyed
-typedef void (*UnrefHandler)(void* ptr);
-
-// Thread local storage that only stores value of pointer type. The storage
-// distinguish data coming from different thread and different ThreadLocalPtr
-// instances. For example, if a regular thread_local variable A is declared
-// in DBImpl, two DBImpl objects would share the same A. ThreadLocalPtr avoids
-// the confliction. The total storage size equals to # of threads * # of
-// ThreadLocalPtr instances. It is not efficient in terms of space, but it
-// should serve most of our use cases well and keep code simple.
-class ThreadLocalPtr {
- public:
-  explicit ThreadLocalPtr(UnrefHandler handler = nullptr);
-
-  ~ThreadLocalPtr();
-
-  // Return the current pointer stored in thread local
-  void* Get() const;
-
-  // Set a new pointer value to the thread local storage.
-  void Reset(void* ptr);
-
-  // Atomically swap the supplied ptr and return the previous value
-  void* Swap(void* ptr);
-
-  // Atomically compare the stored value with expected. Set the new
-  // pointer value to thread local only if the comparision is true.
-  // Otherwise, expected returns the stored value.
-  // Return true on success, false on failure
-  bool CompareAndSwap(void* ptr, void*& expected);
-
-  // Reset all thread local data to replacement, and return non-nullptr
-  // data for all existing threads
-  void Scrape(autovector<void*>* ptrs, void* const replacement);
-
- protected:
-  struct Entry {
-    Entry() : ptr(nullptr) {}
-    Entry(const Entry& e) : ptr(e.ptr.load(std::memory_order_relaxed)) {}
-    std::atomic<void*> ptr;
-  };
-
-  // This is the structure that is declared as "thread_local" storage.
-  // The vector keep list of atomic pointer for all instances for "current"
-  // thread. The vector is indexed by an Id that is unique in process and
-  // associated with one ThreadLocalPtr instance. The Id is assigned by a
-  // global StaticMeta singleton. So if we instantiated 3 ThreadLocalPtr
-  // instances, each thread will have a ThreadData with a vector of size 3:
-  //     ---------------------------------------------------
-  //     |          | instance 1 | instance 2 | instnace 3 |
-  //     ---------------------------------------------------
-  //     | thread 1 |    void*   |    void*   |    void*   | <- ThreadData
-  //     ---------------------------------------------------
-  //     | thread 2 |    void*   |    void*   |    void*   | <- ThreadData
-  //     ---------------------------------------------------
-  //     | thread 3 |    void*   |    void*   |    void*   | <- ThreadData
-  //     ---------------------------------------------------
-  struct ThreadData {
-    ThreadData() : entries() {}
-    std::vector<Entry> entries;
-    ThreadData* next;
-    ThreadData* prev;
-  };
-
-  class StaticMeta {
-   public:
-    StaticMeta();
-
-    // Return the next available Id
-    uint32_t GetId();
-    // Return the next availabe Id without claiming it
-    uint32_t PeekId() const;
-    // Return the given Id back to the free pool. This also triggers
-    // UnrefHandler for associated pointer value (if not NULL) for all threads.
-    void ReclaimId(uint32_t id);
-
-    // Return the pointer value for the given id for the current thread.
-    void* Get(uint32_t id) const;
-    // Reset the pointer value for the given id for the current thread.
-    // It triggers UnrefHanlder if the id has existing pointer value.
-    void Reset(uint32_t id, void* ptr);
-    // Atomically swap the supplied ptr and return the previous value
-    void* Swap(uint32_t id, void* ptr);
-    // Atomically compare and swap the provided value only if it equals
-    // to expected value.
-    bool CompareAndSwap(uint32_t id, void* ptr, void*& expected);
-    // Reset all thread local data to replacement, and return non-nullptr
-    // data for all existing threads
-    void Scrape(uint32_t id, autovector<void*>* ptrs, void* const replacement);
-
-    // Register the UnrefHandler for id
-    void SetHandler(uint32_t id, UnrefHandler handler);
-
-   private:
-    // Get UnrefHandler for id with acquiring mutex
-    // REQUIRES: mutex locked
-    UnrefHandler GetHandler(uint32_t id);
-
-    // Triggered before a thread terminates
-    static void OnThreadExit(void* ptr);
-
-    // Add current thread's ThreadData to the global chain
-    // REQUIRES: mutex locked
-    void AddThreadData(ThreadData* d);
-
-    // Remove current thread's ThreadData from the global chain
-    // REQUIRES: mutex locked
-    void RemoveThreadData(ThreadData* d);
-
-    static ThreadData* GetThreadLocal();
-
-    uint32_t next_instance_id_;
-    // Used to recycle Ids in case ThreadLocalPtr is instantiated and destroyed
-    // frequently. This also prevents it from blowing up the vector space.
-    autovector<uint32_t> free_instance_ids_;
-    // Chain all thread local structure together. This is necessary since
-    // when one ThreadLocalPtr gets destroyed, we need to loop over each
-    // thread's version of pointer corresponding to that instance and
-    // call UnrefHandler for it.
-    ThreadData head_;
-
-    std::unordered_map<uint32_t, UnrefHandler> handler_map_;
-
-    // protect inst, next_instance_id_, free_instance_ids_, head_,
-    // ThreadData.entries
-    static port::Mutex mutex_;
-#if !defined(OS_MACOSX)
-    // Thread local storage
-    static __thread ThreadData* tls_;
-#endif
-    // Used to make thread exit trigger possible if !defined(OS_MACOSX).
-    // Otherwise, used to retrieve thread data.
-    pthread_key_t pthread_key_;
-  };
-
-  static StaticMeta* Instance();
-
-  const uint32_t id_;
-};
-
-}  // namespace rocksdb
diff --git a/src/rocksdb/util/thread_local_test.cc b/src/rocksdb/util/thread_local_test.cc
deleted file mode 100644
index 70dfa95..0000000
--- a/src/rocksdb/util/thread_local_test.cc
+++ /dev/null
@@ -1,472 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <atomic>
-
-#include "rocksdb/env.h"
-#include "port/port_posix.h"
-#include "util/autovector.h"
-#include "util/thread_local.h"
-#include "util/testharness.h"
-#include "util/testutil.h"
-
-namespace rocksdb {
-
-class ThreadLocalTest {
- public:
-  ThreadLocalTest() : env_(Env::Default()) {}
-
-  Env* env_;
-};
-
-namespace {
-
-struct Params {
-  Params(port::Mutex* m, port::CondVar* c, int* unref, int n,
-         UnrefHandler handler = nullptr)
-      : mu(m),
-        cv(c),
-        unref(unref),
-        total(n),
-        started(0),
-        completed(0),
-        doWrite(false),
-        tls1(handler),
-        tls2(nullptr) {}
-
-  port::Mutex* mu;
-  port::CondVar* cv;
-  int* unref;
-  int total;
-  int started;
-  int completed;
-  bool doWrite;
-  ThreadLocalPtr tls1;
-  ThreadLocalPtr* tls2;
-};
-
-class IDChecker : public ThreadLocalPtr {
- public:
-  static uint32_t PeekId() { return Instance()->PeekId(); }
-};
-
-}  // anonymous namespace
-
-TEST(ThreadLocalTest, UniqueIdTest) {
-  port::Mutex mu;
-  port::CondVar cv(&mu);
-
-  ASSERT_EQ(IDChecker::PeekId(), 0u);
-  // New ThreadLocal instance bumps id by 1
-  {
-    // Id used 0
-    Params p1(&mu, &cv, nullptr, 1u);
-    ASSERT_EQ(IDChecker::PeekId(), 1u);
-    // Id used 1
-    Params p2(&mu, &cv, nullptr, 1u);
-    ASSERT_EQ(IDChecker::PeekId(), 2u);
-    // Id used 2
-    Params p3(&mu, &cv, nullptr, 1u);
-    ASSERT_EQ(IDChecker::PeekId(), 3u);
-    // Id used 3
-    Params p4(&mu, &cv, nullptr, 1u);
-    ASSERT_EQ(IDChecker::PeekId(), 4u);
-  }
-  // id 3, 2, 1, 0 are in the free queue in order
-  ASSERT_EQ(IDChecker::PeekId(), 0u);
-
-  // pick up 0
-  Params p1(&mu, &cv, nullptr, 1u);
-  ASSERT_EQ(IDChecker::PeekId(), 1u);
-  // pick up 1
-  Params* p2 = new Params(&mu, &cv, nullptr, 1u);
-  ASSERT_EQ(IDChecker::PeekId(), 2u);
-  // pick up 2
-  Params p3(&mu, &cv, nullptr, 1u);
-  ASSERT_EQ(IDChecker::PeekId(), 3u);
-  // return up 1
-  delete p2;
-  ASSERT_EQ(IDChecker::PeekId(), 1u);
-  // Now we have 3, 1 in queue
-  // pick up 1
-  Params p4(&mu, &cv, nullptr, 1u);
-  ASSERT_EQ(IDChecker::PeekId(), 3u);
-  // pick up 3
-  Params p5(&mu, &cv, nullptr, 1u);
-  // next new id
-  ASSERT_EQ(IDChecker::PeekId(), 4u);
-  // After exit, id sequence in queue:
-  // 3, 1, 2, 0
-}
-
-TEST(ThreadLocalTest, SequentialReadWriteTest) {
-  // global id list carries over 3, 1, 2, 0
-  ASSERT_EQ(IDChecker::PeekId(), 0u);
-
-  port::Mutex mu;
-  port::CondVar cv(&mu);
-  Params p(&mu, &cv, nullptr, 1);
-  ThreadLocalPtr tls2;
-  p.tls2 = &tls2;
-
-  auto func = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-
-    ASSERT_TRUE(p.tls1.Get() == nullptr);
-    p.tls1.Reset(reinterpret_cast<int*>(1));
-    ASSERT_TRUE(p.tls1.Get() == reinterpret_cast<int*>(1));
-    p.tls1.Reset(reinterpret_cast<int*>(2));
-    ASSERT_TRUE(p.tls1.Get() == reinterpret_cast<int*>(2));
-
-    ASSERT_TRUE(p.tls2->Get() == nullptr);
-    p.tls2->Reset(reinterpret_cast<int*>(1));
-    ASSERT_TRUE(p.tls2->Get() == reinterpret_cast<int*>(1));
-    p.tls2->Reset(reinterpret_cast<int*>(2));
-    ASSERT_TRUE(p.tls2->Get() == reinterpret_cast<int*>(2));
-
-    p.mu->Lock();
-    ++(p.completed);
-    p.cv->SignalAll();
-    p.mu->Unlock();
-  };
-
-  for (int iter = 0; iter < 1024; ++iter) {
-    ASSERT_EQ(IDChecker::PeekId(), 1u);
-    // Another new thread, read/write should not see value from previous thread
-    env_->StartThread(func, static_cast<void*>(&p));
-    mu.Lock();
-    while (p.completed != iter + 1) {
-      cv.Wait();
-    }
-    mu.Unlock();
-    ASSERT_EQ(IDChecker::PeekId(), 1u);
-  }
-}
-
-TEST(ThreadLocalTest, ConcurrentReadWriteTest) {
-  // global id list carries over 3, 1, 2, 0
-  ASSERT_EQ(IDChecker::PeekId(), 0u);
-
-  ThreadLocalPtr tls2;
-  port::Mutex mu1;
-  port::CondVar cv1(&mu1);
-  Params p1(&mu1, &cv1, nullptr, 16);
-  p1.tls2 = &tls2;
-
-  port::Mutex mu2;
-  port::CondVar cv2(&mu2);
-  Params p2(&mu2, &cv2, nullptr, 16);
-  p2.doWrite = true;
-  p2.tls2 = &tls2;
-
-  auto func = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-
-    p.mu->Lock();
-    int own = ++(p.started);
-    p.cv->SignalAll();
-    while (p.started != p.total) {
-      p.cv->Wait();
-    }
-    p.mu->Unlock();
-
-    // Let write threads write a different value from the read threads
-    if (p.doWrite) {
-      own += 8192;
-    }
-
-    ASSERT_TRUE(p.tls1.Get() == nullptr);
-    ASSERT_TRUE(p.tls2->Get() == nullptr);
-
-    auto* env = Env::Default();
-    auto start = env->NowMicros();
-
-    p.tls1.Reset(reinterpret_cast<int*>(own));
-    p.tls2->Reset(reinterpret_cast<int*>(own + 1));
-    // Loop for 1 second
-    while (env->NowMicros() - start < 1000 * 1000) {
-      for (int iter = 0; iter < 100000; ++iter) {
-        ASSERT_TRUE(p.tls1.Get() == reinterpret_cast<int*>(own));
-        ASSERT_TRUE(p.tls2->Get() == reinterpret_cast<int*>(own + 1));
-        if (p.doWrite) {
-          p.tls1.Reset(reinterpret_cast<int*>(own));
-          p.tls2->Reset(reinterpret_cast<int*>(own + 1));
-        }
-      }
-    }
-
-    p.mu->Lock();
-    ++(p.completed);
-    p.cv->SignalAll();
-    p.mu->Unlock();
-  };
-
-  // Initiate 2 instnaces: one keeps writing and one keeps reading.
-  // The read instance should not see data from the write instance.
-  // Each thread local copy of the value are also different from each
-  // other.
-  for (int th = 0; th < p1.total; ++th) {
-    env_->StartThread(func, static_cast<void*>(&p1));
-  }
-  for (int th = 0; th < p2.total; ++th) {
-    env_->StartThread(func, static_cast<void*>(&p2));
-  }
-
-  mu1.Lock();
-  while (p1.completed != p1.total) {
-    cv1.Wait();
-  }
-  mu1.Unlock();
-
-  mu2.Lock();
-  while (p2.completed != p2.total) {
-    cv2.Wait();
-  }
-  mu2.Unlock();
-
-  ASSERT_EQ(IDChecker::PeekId(), 3u);
-}
-
-TEST(ThreadLocalTest, Unref) {
-  ASSERT_EQ(IDChecker::PeekId(), 0u);
-
-  auto unref = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-    p.mu->Lock();
-    ++(*p.unref);
-    p.mu->Unlock();
-  };
-
-  // Case 0: no unref triggered if ThreadLocalPtr is never accessed
-  auto func0 = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-
-    p.mu->Lock();
-    ++(p.started);
-    p.cv->SignalAll();
-    while (p.started != p.total) {
-      p.cv->Wait();
-    }
-    p.mu->Unlock();
-  };
-
-  for (int th = 1; th <= 128; th += th) {
-    port::Mutex mu;
-    port::CondVar cv(&mu);
-    int unref_count = 0;
-    Params p(&mu, &cv, &unref_count, th, unref);
-
-    for (int i = 0; i < p.total; ++i) {
-      env_->StartThread(func0, static_cast<void*>(&p));
-    }
-    env_->WaitForJoin();
-    ASSERT_EQ(unref_count, 0);
-  }
-
-  // Case 1: unref triggered by thread exit
-  auto func1 = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-
-    p.mu->Lock();
-    ++(p.started);
-    p.cv->SignalAll();
-    while (p.started != p.total) {
-      p.cv->Wait();
-    }
-    p.mu->Unlock();
-
-    ASSERT_TRUE(p.tls1.Get() == nullptr);
-    ASSERT_TRUE(p.tls2->Get() == nullptr);
-
-    p.tls1.Reset(ptr);
-    p.tls2->Reset(ptr);
-
-    p.tls1.Reset(ptr);
-    p.tls2->Reset(ptr);
-  };
-
-  for (int th = 1; th <= 128; th += th) {
-    port::Mutex mu;
-    port::CondVar cv(&mu);
-    int unref_count = 0;
-    ThreadLocalPtr tls2(unref);
-    Params p(&mu, &cv, &unref_count, th, unref);
-    p.tls2 = &tls2;
-
-    for (int i = 0; i < p.total; ++i) {
-      env_->StartThread(func1, static_cast<void*>(&p));
-    }
-
-    env_->WaitForJoin();
-
-    // N threads x 2 ThreadLocal instance cleanup on thread exit
-    ASSERT_EQ(unref_count, 2 * p.total);
-  }
-
-  // Case 2: unref triggered by ThreadLocal instance destruction
-  auto func2 = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-
-    p.mu->Lock();
-    ++(p.started);
-    p.cv->SignalAll();
-    while (p.started != p.total) {
-      p.cv->Wait();
-    }
-    p.mu->Unlock();
-
-    ASSERT_TRUE(p.tls1.Get() == nullptr);
-    ASSERT_TRUE(p.tls2->Get() == nullptr);
-
-    p.tls1.Reset(ptr);
-    p.tls2->Reset(ptr);
-
-    p.tls1.Reset(ptr);
-    p.tls2->Reset(ptr);
-
-    p.mu->Lock();
-    ++(p.completed);
-    p.cv->SignalAll();
-
-    // Waiting for instruction to exit thread
-    while (p.completed != 0) {
-      p.cv->Wait();
-    }
-    p.mu->Unlock();
-  };
-
-  for (int th = 1; th <= 128; th += th) {
-    port::Mutex mu;
-    port::CondVar cv(&mu);
-    int unref_count = 0;
-    Params p(&mu, &cv, &unref_count, th, unref);
-    p.tls2 = new ThreadLocalPtr(unref);
-
-    for (int i = 0; i < p.total; ++i) {
-      env_->StartThread(func2, static_cast<void*>(&p));
-    }
-
-    // Wait for all threads to finish using Params
-    mu.Lock();
-    while (p.completed != p.total) {
-      cv.Wait();
-    }
-    mu.Unlock();
-
-    // Now destroy one ThreadLocal instance
-    delete p.tls2;
-    p.tls2 = nullptr;
-    // instance destroy for N threads
-    ASSERT_EQ(unref_count, p.total);
-
-    // Signal to exit
-    mu.Lock();
-    p.completed = 0;
-    cv.SignalAll();
-    mu.Unlock();
-    env_->WaitForJoin();
-    // additional N threads exit unref for the left instance
-    ASSERT_EQ(unref_count, 2 * p.total);
-  }
-}
-
-TEST(ThreadLocalTest, Swap) {
-  ThreadLocalPtr tls;
-  tls.Reset(reinterpret_cast<void*>(1));
-  ASSERT_EQ(reinterpret_cast<int64_t>(tls.Swap(nullptr)), 1);
-  ASSERT_TRUE(tls.Swap(reinterpret_cast<void*>(2)) == nullptr);
-  ASSERT_EQ(reinterpret_cast<int64_t>(tls.Get()), 2);
-  ASSERT_EQ(reinterpret_cast<int64_t>(tls.Swap(reinterpret_cast<void*>(3))), 2);
-}
-
-TEST(ThreadLocalTest, Scrape) {
-  auto unref = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-    p.mu->Lock();
-    ++(*p.unref);
-    p.mu->Unlock();
-  };
-
-  auto func = [](void* ptr) {
-    auto& p = *static_cast<Params*>(ptr);
-
-    ASSERT_TRUE(p.tls1.Get() == nullptr);
-    ASSERT_TRUE(p.tls2->Get() == nullptr);
-
-    p.tls1.Reset(ptr);
-    p.tls2->Reset(ptr);
-
-    p.tls1.Reset(ptr);
-    p.tls2->Reset(ptr);
-
-    p.mu->Lock();
-    ++(p.completed);
-    p.cv->SignalAll();
-
-    // Waiting for instruction to exit thread
-    while (p.completed != 0) {
-      p.cv->Wait();
-    }
-    p.mu->Unlock();
-  };
-
-  for (int th = 1; th <= 128; th += th) {
-    port::Mutex mu;
-    port::CondVar cv(&mu);
-    int unref_count = 0;
-    Params p(&mu, &cv, &unref_count, th, unref);
-    p.tls2 = new ThreadLocalPtr(unref);
-
-    for (int i = 0; i < p.total; ++i) {
-      env_->StartThread(func, static_cast<void*>(&p));
-    }
-
-    // Wait for all threads to finish using Params
-    mu.Lock();
-    while (p.completed != p.total) {
-      cv.Wait();
-    }
-    mu.Unlock();
-
-    ASSERT_EQ(unref_count, 0);
-
-    // Scrape all thread local data. No unref at thread
-    // exit or ThreadLocalPtr destruction
-    autovector<void*> ptrs;
-    p.tls1.Scrape(&ptrs, nullptr);
-    p.tls2->Scrape(&ptrs, nullptr);
-    delete p.tls2;
-    // Signal to exit
-    mu.Lock();
-    p.completed = 0;
-    cv.SignalAll();
-    mu.Unlock();
-    env_->WaitForJoin();
-
-    ASSERT_EQ(unref_count, 0);
-  }
-}
-
-TEST(ThreadLocalTest, CompareAndSwap) {
-  ThreadLocalPtr tls;
-  ASSERT_TRUE(tls.Swap(reinterpret_cast<void*>(1)) == nullptr);
-  void* expected = reinterpret_cast<void*>(1);
-  // Swap in 2
-  ASSERT_TRUE(tls.CompareAndSwap(reinterpret_cast<void*>(2), expected));
-  expected = reinterpret_cast<void*>(100);
-  // Fail Swap, still 2
-  ASSERT_TRUE(!tls.CompareAndSwap(reinterpret_cast<void*>(2), expected));
-  ASSERT_EQ(expected, reinterpret_cast<void*>(2));
-  // Swap in 3
-  expected = reinterpret_cast<void*>(2);
-  ASSERT_TRUE(tls.CompareAndSwap(reinterpret_cast<void*>(3), expected));
-  ASSERT_EQ(tls.Get(), reinterpret_cast<void*>(3));
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/util/vectorrep.cc b/src/rocksdb/util/vectorrep.cc
deleted file mode 100644
index c7f9cca..0000000
--- a/src/rocksdb/util/vectorrep.cc
+++ /dev/null
@@ -1,282 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef ROCKSDB_LITE
-#include "rocksdb/memtablerep.h"
-
-#include <unordered_set>
-#include <set>
-#include <memory>
-#include <algorithm>
-#include <type_traits>
-
-#include "util/arena.h"
-#include "db/memtable.h"
-#include "port/port.h"
-#include "util/mutexlock.h"
-#include "util/stl_wrappers.h"
-
-namespace rocksdb {
-namespace {
-
-using namespace stl_wrappers;
-
-class VectorRep : public MemTableRep {
- public:
-  VectorRep(const KeyComparator& compare, Arena* arena, size_t count);
-
-  // Insert key into the collection. (The caller will pack key and value into a
-  // single buffer and pass that in as the parameter to Insert)
-  // REQUIRES: nothing that compares equal to key is currently in the
-  // collection.
-  virtual void Insert(KeyHandle handle) override;
-
-  // Returns true iff an entry that compares equal to key is in the collection.
-  virtual bool Contains(const char* key) const override;
-
-  virtual void MarkReadOnly() override;
-
-  virtual size_t ApproximateMemoryUsage() override;
-
-  virtual void Get(const LookupKey& k, void* callback_args,
-                   bool (*callback_func)(void* arg,
-                                         const char* entry)) override;
-
-  virtual ~VectorRep() override { }
-
-  class Iterator : public MemTableRep::Iterator {
-    class VectorRep* vrep_;
-    std::shared_ptr<std::vector<const char*>> bucket_;
-    typename std::vector<const char*>::const_iterator mutable cit_;
-    const KeyComparator& compare_;
-    std::string tmp_;       // For passing to EncodeKey
-    bool mutable sorted_;
-    void DoSort() const;
-   public:
-    explicit Iterator(class VectorRep* vrep,
-      std::shared_ptr<std::vector<const char*>> bucket,
-      const KeyComparator& compare);
-
-    // Initialize an iterator over the specified collection.
-    // The returned iterator is not valid.
-    // explicit Iterator(const MemTableRep* collection);
-    virtual ~Iterator() override { };
-
-    // Returns true iff the iterator is positioned at a valid node.
-    virtual bool Valid() const override;
-
-    // Returns the key at the current position.
-    // REQUIRES: Valid()
-    virtual const char* key() const override;
-
-    // Advances to the next position.
-    // REQUIRES: Valid()
-    virtual void Next() override;
-
-    // Advances to the previous position.
-    // REQUIRES: Valid()
-    virtual void Prev() override;
-
-    // Advance to the first entry with a key >= target
-    virtual void Seek(const Slice& user_key, const char* memtable_key) override;
-
-    // Position at the first entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToFirst() override;
-
-    // Position at the last entry in collection.
-    // Final state of iterator is Valid() iff collection is not empty.
-    virtual void SeekToLast() override;
-  };
-
-  // Unhide default implementations of GetIterator()
-  using MemTableRep::GetIterator;
-
-  // Return an iterator over the keys in this representation.
-  virtual MemTableRep::Iterator* GetIterator() override;
-
- private:
-  friend class Iterator;
-  typedef std::vector<const char*> Bucket;
-  std::shared_ptr<Bucket> bucket_;
-  mutable port::RWMutex rwlock_;
-  bool immutable_;
-  bool sorted_;
-  const KeyComparator& compare_;
-};
-
-void VectorRep::Insert(KeyHandle handle) {
-  auto* key = static_cast<char*>(handle);
-  assert(!Contains(key));
-  WriteLock l(&rwlock_);
-  assert(!immutable_);
-  bucket_->push_back(key);
-}
-
-// Returns true iff an entry that compares equal to key is in the collection.
-bool VectorRep::Contains(const char* key) const {
-  ReadLock l(&rwlock_);
-  return std::find(bucket_->begin(), bucket_->end(), key) != bucket_->end();
-}
-
-void VectorRep::MarkReadOnly() {
-  WriteLock l(&rwlock_);
-  immutable_ = true;
-}
-
-size_t VectorRep::ApproximateMemoryUsage() {
-  return
-    sizeof(bucket_) + sizeof(*bucket_) +
-    bucket_->size() *
-    sizeof(
-      std::remove_reference<decltype(*bucket_)>::type::value_type
-    );
-}
-
-VectorRep::VectorRep(const KeyComparator& compare, Arena* arena, size_t count)
-  : MemTableRep(arena),
-    bucket_(new Bucket()),
-    immutable_(false),
-    sorted_(false),
-    compare_(compare) { bucket_.get()->reserve(count); }
-
-VectorRep::Iterator::Iterator(class VectorRep* vrep,
-                   std::shared_ptr<std::vector<const char*>> bucket,
-                   const KeyComparator& compare)
-: vrep_(vrep),
-  bucket_(bucket),
-  cit_(bucket_->end()),
-  compare_(compare),
-  sorted_(false) { }
-
-void VectorRep::Iterator::DoSort() const {
-  // vrep is non-null means that we are working on an immutable memtable
-  if (!sorted_ && vrep_ != nullptr) {
-    WriteLock l(&vrep_->rwlock_);
-    if (!vrep_->sorted_) {
-      std::sort(bucket_->begin(), bucket_->end(), Compare(compare_));
-      cit_ = bucket_->begin();
-      vrep_->sorted_ = true;
-    }
-    sorted_ = true;
-  }
-  if (!sorted_) {
-    std::sort(bucket_->begin(), bucket_->end(), Compare(compare_));
-    cit_ = bucket_->begin();
-    sorted_ = true;
-  }
-  assert(sorted_);
-  assert(vrep_ == nullptr || vrep_->sorted_);
-}
-
-// Returns true iff the iterator is positioned at a valid node.
-bool VectorRep::Iterator::Valid() const {
-  DoSort();
-  return cit_ != bucket_->end();
-}
-
-// Returns the key at the current position.
-// REQUIRES: Valid()
-const char* VectorRep::Iterator::key() const {
-  assert(Valid());
-  return *cit_;
-}
-
-// Advances to the next position.
-// REQUIRES: Valid()
-void VectorRep::Iterator::Next() {
-  assert(Valid());
-  if (cit_ == bucket_->end()) {
-    return;
-  }
-  ++cit_;
-}
-
-// Advances to the previous position.
-// REQUIRES: Valid()
-void VectorRep::Iterator::Prev() {
-  assert(Valid());
-  if (cit_ == bucket_->begin()) {
-    // If you try to go back from the first element, the iterator should be
-    // invalidated. So we set it to past-the-end. This means that you can
-    // treat the container circularly.
-    cit_ = bucket_->end();
-  } else {
-    --cit_;
-  }
-}
-
-// Advance to the first entry with a key >= target
-void VectorRep::Iterator::Seek(const Slice& user_key,
-                               const char* memtable_key) {
-  DoSort();
-  // Do binary search to find first value not less than the target
-  const char* encoded_key =
-      (memtable_key != nullptr) ? memtable_key : EncodeKey(&tmp_, user_key);
-  cit_ = std::equal_range(bucket_->begin(),
-                          bucket_->end(),
-                          encoded_key,
-                          [this] (const char* a, const char* b) {
-                            return compare_(a, b) < 0;
-                          }).first;
-}
-
-// Position at the first entry in collection.
-// Final state of iterator is Valid() iff collection is not empty.
-void VectorRep::Iterator::SeekToFirst() {
-  DoSort();
-  cit_ = bucket_->begin();
-}
-
-// Position at the last entry in collection.
-// Final state of iterator is Valid() iff collection is not empty.
-void VectorRep::Iterator::SeekToLast() {
-  DoSort();
-  cit_ = bucket_->end();
-  if (bucket_->size() != 0) {
-    --cit_;
-  }
-}
-
-void VectorRep::Get(const LookupKey& k, void* callback_args,
-                    bool (*callback_func)(void* arg, const char* entry)) {
-  rwlock_.ReadLock();
-  VectorRep* vector_rep;
-  std::shared_ptr<Bucket> bucket;
-  if (immutable_) {
-    vector_rep = this;
-  } else {
-    vector_rep = nullptr;
-    bucket.reset(new Bucket(*bucket_));  // make a copy
-  }
-  VectorRep::Iterator iter(vector_rep, immutable_ ? bucket_ : bucket, compare_);
-  rwlock_.Unlock();
-
-  for (iter.Seek(k.user_key(), k.memtable_key().data());
-       iter.Valid() && callback_func(callback_args, iter.key()); iter.Next()) {
-  }
-}
-
-MemTableRep::Iterator* VectorRep::GetIterator() {
-  ReadLock l(&rwlock_);
-  // Do not sort here. The sorting would be done the first time
-  // a Seek is performed on the iterator.
-  if (immutable_) {
-    return new Iterator(this, bucket_, compare_);
-  } else {
-    std::shared_ptr<Bucket> tmp;
-    tmp.reset(new Bucket(*bucket_)); // make a copy
-    return new Iterator(nullptr, tmp, compare_);
-  }
-}
-} // anon namespace
-
-MemTableRep* VectorRepFactory::CreateMemTableRep(
-    const MemTableRep::KeyComparator& compare, Arena* arena,
-    const SliceTransform*) {
-  return new VectorRep(compare, arena, count_);
-}
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/util/xxhash.cc b/src/rocksdb/util/xxhash.cc
deleted file mode 100644
index 6dfd4b2..0000000
--- a/src/rocksdb/util/xxhash.cc
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
-xxHash - Fast Hash algorithm
-Copyright (C) 2012-2014, Yann Collet.
-BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-You can contact the author at :
-- xxHash source repository : http://code.google.com/p/xxhash/
-*/
-
-
-//**************************************
-// Tuning parameters
-//**************************************
-// Unaligned memory access is automatically enabled for "common" CPU, such as x86.
-// For others CPU, the compiler will be more cautious, and insert extra code to ensure aligned access is respected.
-// If you know your target CPU supports unaligned memory access, you want to force this option manually to improve performance.
-// You can also enable this parameter if you know your input data will always be aligned (boundaries of 4, for U32).
-#if defined(__ARM_FEATURE_UNALIGNED) || defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
-#  define XXH_USE_UNALIGNED_ACCESS 1
-#endif
-
-// XXH_ACCEPT_NULL_INPUT_POINTER :
-// If the input pointer is a null pointer, xxHash default behavior is to trigger a memory access error, since it is a bad pointer.
-// When this option is enabled, xxHash output for null input pointers will be the same as a null-length input.
-// This option has a very small performance cost (only measurable on small inputs).
-// By default, this option is disabled. To enable it, uncomment below define :
-//#define XXH_ACCEPT_NULL_INPUT_POINTER 1
-
-// XXH_FORCE_NATIVE_FORMAT :
-// By default, xxHash library provides endian-independent Hash values, based on little-endian convention.
-// Results are therefore identical for little-endian and big-endian CPU.
-// This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format.
-// Should endian-independance be of no importance for your application, you may set the #define below to 1.
-// It will improve speed for Big-endian CPU.
-// This option has no impact on Little_Endian CPU.
-#define XXH_FORCE_NATIVE_FORMAT 0
-
-
-//**************************************
-// Compiler Specific Options
-//**************************************
-// Disable some Visual warning messages
-#ifdef _MSC_VER  // Visual Studio
-#  pragma warning(disable : 4127)      // disable: C4127: conditional expression is constant
-#endif
-
-#ifdef _MSC_VER    // Visual Studio
-#  define FORCE_INLINE static __forceinline
-#else
-#  ifdef __GNUC__
-#    define FORCE_INLINE static inline __attribute__((always_inline))
-#  else
-#    define FORCE_INLINE static inline
-#  endif
-#endif
-
-
-//**************************************
-// Includes & Memory related functions
-//**************************************
-#include "xxhash.h"
-// Modify the local functions below should you wish to use some other memory related routines
-// for malloc(), free()
-#include <stdlib.h>
-FORCE_INLINE void* XXH_malloc(size_t s) { return malloc(s); }
-FORCE_INLINE void  XXH_free  (void* p)  { free(p); }
-// for memcpy()
-#include <string.h>
-FORCE_INLINE void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
-
-
-//**************************************
-// Basic Types
-//**************************************
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   // C99
-# include <stdint.h>
-  typedef uint8_t  BYTE;
-  typedef uint16_t U16;
-  typedef uint32_t U32;
-  typedef  int32_t S32;
-  typedef uint64_t U64;
-#else
-  typedef unsigned char      BYTE;
-  typedef unsigned short     U16;
-  typedef unsigned int       U32;
-  typedef   signed int       S32;
-  typedef unsigned long long U64;
-#endif
-
-#if defined(__GNUC__)  && !defined(XXH_USE_UNALIGNED_ACCESS)
-#  define _PACKED __attribute__ ((packed))
-#else
-#  define _PACKED
-#endif
-
-#if !defined(XXH_USE_UNALIGNED_ACCESS) && !defined(__GNUC__)
-#  ifdef __IBMC__
-#    pragma pack(1)
-#  else
-#    pragma pack(push, 1)
-#  endif
-#endif
-
-typedef struct _U32_S { U32 v; } _PACKED U32_S;
-
-#if !defined(XXH_USE_UNALIGNED_ACCESS) && !defined(__GNUC__)
-#  pragma pack(pop)
-#endif
-
-#define A32(x) (((U32_S *)(x))->v)
-
-
-//***************************************
-// Compiler-specific Functions and Macros
-//***************************************
-#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
-
-// Note : although _rotl exists for minGW (GCC under windows), performance seems poor
-#if defined(_MSC_VER)
-#  define XXH_rotl32(x,r) _rotl(x,r)
-#else
-#  define XXH_rotl32(x,r) ((x << r) | (x >> (32 - r)))
-#endif
-
-#if defined(_MSC_VER)     // Visual Studio
-#  define XXH_swap32 _byteswap_ulong
-#elif GCC_VERSION >= 403
-#  define XXH_swap32 __builtin_bswap32
-#else
-static inline U32 XXH_swap32 (U32 x) {
-    return  ((x << 24) & 0xff000000 ) |
-        ((x <<  8) & 0x00ff0000 ) |
-        ((x >>  8) & 0x0000ff00 ) |
-        ((x >> 24) & 0x000000ff );}
-#endif
-
-
-//**************************************
-// Constants
-//**************************************
-#define PRIME32_1   2654435761U
-#define PRIME32_2   2246822519U
-#define PRIME32_3   3266489917U
-#define PRIME32_4    668265263U
-#define PRIME32_5    374761393U
-
-
-//**************************************
-// Architecture Macros
-//**************************************
-typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
-#ifndef XXH_CPU_LITTLE_ENDIAN   // It is possible to define XXH_CPU_LITTLE_ENDIAN externally, for example using a compiler switch
-    static const int one = 1;
-#   define XXH_CPU_LITTLE_ENDIAN   (*(char*)(&one))
-#endif
-
-
-//**************************************
-// Macros
-//**************************************
-#define XXH_STATIC_ASSERT(c)   { enum { XXH_static_assert = 1/(!!(c)) }; }    // use only *after* variable declarations
-
-
-//****************************
-// Memory reads
-//****************************
-typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment;
-
-FORCE_INLINE U32 XXH_readLE32_align(const U32* ptr, XXH_endianess endian, XXH_alignment align)
-{
-    if (align==XXH_unaligned)
-        return endian==XXH_littleEndian ? A32(ptr) : XXH_swap32(A32(ptr));
-    else
-        return endian==XXH_littleEndian ? *ptr : XXH_swap32(*ptr);
-}
-
-FORCE_INLINE U32 XXH_readLE32(const U32* ptr, XXH_endianess endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); }
-
-
-//****************************
-// Simple Hash Functions
-//****************************
-FORCE_INLINE U32 XXH32_endian_align(const void* input, int len, U32 seed, XXH_endianess endian, XXH_alignment align)
-{
-    const BYTE* p = (const BYTE*)input;
-    const BYTE* const bEnd = p + len;
-    U32 h32;
-
-#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
-    if (p==NULL) { len=0; p=(const BYTE*)(size_t)16; }
-#endif
-
-    if (len>=16)
-    {
-        const BYTE* const limit = bEnd - 16;
-        U32 v1 = seed + PRIME32_1 + PRIME32_2;
-        U32 v2 = seed + PRIME32_2;
-        U32 v3 = seed + 0;
-        U32 v4 = seed - PRIME32_1;
-
-        do
-        {
-            v1 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v1 = XXH_rotl32(v1, 13); v1 *= PRIME32_1; p+=4;
-            v2 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v2 = XXH_rotl32(v2, 13); v2 *= PRIME32_1; p+=4;
-            v3 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v3 = XXH_rotl32(v3, 13); v3 *= PRIME32_1; p+=4;
-            v4 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v4 = XXH_rotl32(v4, 13); v4 *= PRIME32_1; p+=4;
-        } while (p<=limit);
-
-        h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18);
-    }
-    else
-    {
-        h32  = seed + PRIME32_5;
-    }
-
-    h32 += (U32) len;
-
-    while (p<=bEnd-4)
-    {
-        h32 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_3;
-        h32  = XXH_rotl32(h32, 17) * PRIME32_4 ;
-        p+=4;
-    }
-
-    while (p<bEnd)
-    {
-        h32 += (*p) * PRIME32_5;
-        h32 = XXH_rotl32(h32, 11) * PRIME32_1 ;
-        p++;
-    }
-
-    h32 ^= h32 >> 15;
-    h32 *= PRIME32_2;
-    h32 ^= h32 >> 13;
-    h32 *= PRIME32_3;
-    h32 ^= h32 >> 16;
-
-    return h32;
-}
-
-
-U32 XXH32(const void* input, int len, U32 seed)
-{
-#if 0
-    // Simple version, good for code maintenance, but unfortunately slow for small inputs
-    void* state = XXH32_init(seed);
-    XXH32_update(state, input, len);
-    return XXH32_digest(state);
-#else
-    XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN;
-
-#  if !defined(XXH_USE_UNALIGNED_ACCESS)
-    if ((((size_t)input) & 3))   // Input is aligned, let's leverage the speed advantage
-    {
-        if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
-            return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned);
-        else
-            return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned);
-    }
-#  endif
-
-    if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
-        return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned);
-    else
-        return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned);
-#endif
-}
-
-
-//****************************
-// Advanced Hash Functions
-//****************************
-
-struct XXH_state32_t
-{
-    U64 total_len;
-    U32 seed;
-    U32 v1;
-    U32 v2;
-    U32 v3;
-    U32 v4;
-    int memsize;
-    char memory[16];
-};
-
-
-int XXH32_sizeofState()
-{
-    XXH_STATIC_ASSERT(XXH32_SIZEOFSTATE >= sizeof(struct XXH_state32_t));   // A compilation error here means XXH32_SIZEOFSTATE is not large enough
-    return sizeof(struct XXH_state32_t);
-}
-
-
-XXH_errorcode XXH32_resetState(void* state_in, U32 seed)
-{
-    struct XXH_state32_t * state = (struct XXH_state32_t *) state_in;
-    state->seed = seed;
-    state->v1 = seed + PRIME32_1 + PRIME32_2;
-    state->v2 = seed + PRIME32_2;
-    state->v3 = seed + 0;
-    state->v4 = seed - PRIME32_1;
-    state->total_len = 0;
-    state->memsize = 0;
-    return XXH_OK;
-}
-
-
-void* XXH32_init (U32 seed)
-{
-    void* state = XXH_malloc (sizeof(struct XXH_state32_t));
-    XXH32_resetState(state, seed);
-    return state;
-}
-
-
-FORCE_INLINE XXH_errorcode XXH32_update_endian (void* state_in, const void* input, int len, XXH_endianess endian)
-{
-    struct XXH_state32_t * state = (struct XXH_state32_t *) state_in;
-    const BYTE* p = (const BYTE*)input;
-    const BYTE* const bEnd = p + len;
-
-#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
-    if (input==NULL) return XXH_ERROR;
-#endif
-
-    state->total_len += len;
-
-    if (state->memsize + len < 16)   // fill in tmp buffer
-    {
-        XXH_memcpy(state->memory + state->memsize, input, len);
-        state->memsize +=  len;
-        return XXH_OK;
-    }
-
-    if (state->memsize)   // some data left from previous update
-    {
-        XXH_memcpy(state->memory + state->memsize, input, 16-state->memsize);
-        {
-            const U32* p32 = (const U32*)state->memory;
-            state->v1 += XXH_readLE32(p32, endian) * PRIME32_2; state->v1 = XXH_rotl32(state->v1, 13); state->v1 *= PRIME32_1; p32++;
-            state->v2 += XXH_readLE32(p32, endian) * PRIME32_2; state->v2 = XXH_rotl32(state->v2, 13); state->v2 *= PRIME32_1; p32++;
-            state->v3 += XXH_readLE32(p32, endian) * PRIME32_2; state->v3 = XXH_rotl32(state->v3, 13); state->v3 *= PRIME32_1; p32++;
-            state->v4 += XXH_readLE32(p32, endian) * PRIME32_2; state->v4 = XXH_rotl32(state->v4, 13); state->v4 *= PRIME32_1; p32++;
-        }
-        p += 16-state->memsize;
-        state->memsize = 0;
-    }
-
-    if (p <= bEnd-16)
-    {
-        const BYTE* const limit = bEnd - 16;
-        U32 v1 = state->v1;
-        U32 v2 = state->v2;
-        U32 v3 = state->v3;
-        U32 v4 = state->v4;
-
-        do
-        {
-            v1 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v1 = XXH_rotl32(v1, 13); v1 *= PRIME32_1; p+=4;
-            v2 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v2 = XXH_rotl32(v2, 13); v2 *= PRIME32_1; p+=4;
-            v3 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v3 = XXH_rotl32(v3, 13); v3 *= PRIME32_1; p+=4;
-            v4 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v4 = XXH_rotl32(v4, 13); v4 *= PRIME32_1; p+=4;
-        } while (p<=limit);
-
-        state->v1 = v1;
-        state->v2 = v2;
-        state->v3 = v3;
-        state->v4 = v4;
-    }
-
-    if (p < bEnd)
-    {
-        XXH_memcpy(state->memory, p, bEnd-p);
-        state->memsize = (int)(bEnd-p);
-    }
-
-    return XXH_OK;
-}
-
-XXH_errorcode XXH32_update (void* state_in, const void* input, int len)
-{
-    XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN;
-
-    if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
-        return XXH32_update_endian(state_in, input, len, XXH_littleEndian);
-    else
-        return XXH32_update_endian(state_in, input, len, XXH_bigEndian);
-}
-
-
-
-FORCE_INLINE U32 XXH32_intermediateDigest_endian (void* state_in, XXH_endianess endian)
-{
-    struct XXH_state32_t * state = (struct XXH_state32_t *) state_in;
-    const BYTE * p = (const BYTE*)state->memory;
-    BYTE* bEnd = (BYTE*)state->memory + state->memsize;
-    U32 h32;
-
-    if (state->total_len >= 16)
-    {
-        h32 = XXH_rotl32(state->v1, 1) + XXH_rotl32(state->v2, 7) + XXH_rotl32(state->v3, 12) + XXH_rotl32(state->v4, 18);
-    }
-    else
-    {
-        h32  = state->seed + PRIME32_5;
-    }
-
-    h32 += (U32) state->total_len;
-
-    while (p<=bEnd-4)
-    {
-        h32 += XXH_readLE32((const U32*)p, endian) * PRIME32_3;
-        h32  = XXH_rotl32(h32, 17) * PRIME32_4;
-        p+=4;
-    }
-
-    while (p<bEnd)
-    {
-        h32 += (*p) * PRIME32_5;
-        h32 = XXH_rotl32(h32, 11) * PRIME32_1;
-        p++;
-    }
-
-    h32 ^= h32 >> 15;
-    h32 *= PRIME32_2;
-    h32 ^= h32 >> 13;
-    h32 *= PRIME32_3;
-    h32 ^= h32 >> 16;
-
-    return h32;
-}
-
-
-U32 XXH32_intermediateDigest (void* state_in)
-{
-    XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN;
-
-    if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
-        return XXH32_intermediateDigest_endian(state_in, XXH_littleEndian);
-    else
-        return XXH32_intermediateDigest_endian(state_in, XXH_bigEndian);
-}
-
-
-U32 XXH32_digest (void* state_in)
-{
-    U32 h32 = XXH32_intermediateDigest(state_in);
-
-    XXH_free(state_in);
-
-    return h32;
-}
diff --git a/src/rocksdb/util/xxhash.h b/src/rocksdb/util/xxhash.h
deleted file mode 100644
index ceff066..0000000
--- a/src/rocksdb/util/xxhash.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-   xxHash - Fast Hash algorithm
-   Header File
-   Copyright (C) 2012-2014, Yann Collet.
-   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are
-   met:
-
-       * Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-   copyright notice, this list of conditions and the following disclaimer
-   in the documentation and/or other materials provided with the
-   distribution.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   You can contact the author at :
-   - xxHash source repository : http://code.google.com/p/xxhash/
-*/
-
-/* Notice extracted from xxHash homepage :
-
-xxHash is an extremely fast Hash algorithm, running at RAM speed limits.
-It also successfully passes all tests from the SMHasher suite.
-
-Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz)
-
-Name            Speed       Q.Score   Author
-xxHash          5.4 GB/s     10
-CrapWow         3.2 GB/s      2       Andrew
-MumurHash 3a    2.7 GB/s     10       Austin Appleby
-SpookyHash      2.0 GB/s     10       Bob Jenkins
-SBox            1.4 GB/s      9       Bret Mulvey
-Lookup3         1.2 GB/s      9       Bob Jenkins
-SuperFastHash   1.2 GB/s      1       Paul Hsieh
-CityHash64      1.05 GB/s    10       Pike & Alakuijala
-FNV             0.55 GB/s     5       Fowler, Noll, Vo
-CRC32           0.43 GB/s     9
-MD5-32          0.33 GB/s    10       Ronald L. Rivest
-SHA1-32         0.28 GB/s    10
-
-Q.Score is a measure of quality of the hash function.
-It depends on successfully passing SMHasher test set.
-10 is a perfect score.
-*/
-
-#pragma once
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-//****************************
-// Type
-//****************************
-typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;
-
-
-
-//****************************
-// Simple Hash Functions
-//****************************
-
-unsigned int XXH32 (const void* input, int len, unsigned int seed);
-
-/*
-XXH32() :
-    Calculate the 32-bits hash of sequence of length "len" stored at memory address "input".
-    The memory between input & input+len must be valid (allocated and read-accessible).
-    "seed" can be used to alter the result predictably.
-    This function successfully passes all SMHasher tests.
-    Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s
-    Note that "len" is type "int", which means it is limited to 2^31-1.
-    If your data is larger, use the advanced functions below.
-*/
-
-
-
-//****************************
-// Advanced Hash Functions
-//****************************
-
-void*         XXH32_init   (unsigned int seed);
-XXH_errorcode XXH32_update (void* state, const void* input, int len);
-unsigned int  XXH32_digest (void* state);
-
-/*
-These functions calculate the xxhash of an input provided in several small packets,
-as opposed to an input provided as a single block.
-
-It must be started with :
-void* XXH32_init()
-The function returns a pointer which holds the state of calculation.
-
-This pointer must be provided as "void* state" parameter for XXH32_update().
-XXH32_update() can be called as many times as necessary.
-The user must provide a valid (allocated) input.
-The function returns an error code, with 0 meaning OK, and any other value meaning there is an error.
-Note that "len" is type "int", which means it is limited to 2^31-1.
-If your data is larger, it is recommended to chunk your data into blocks
-of size for example 2^30 (1GB) to avoid any "int" overflow issue.
-
-Finally, you can end the calculation anytime, by using XXH32_digest().
-This function returns the final 32-bits hash.
-You must provide the same "void* state" parameter created by XXH32_init().
-Memory will be freed by XXH32_digest().
-*/
-
-
-int           XXH32_sizeofState();
-XXH_errorcode XXH32_resetState(void* state, unsigned int seed);
-
-#define       XXH32_SIZEOFSTATE 48
-typedef struct { long long ll[(XXH32_SIZEOFSTATE+(sizeof(long long)-1))/sizeof(long long)]; } XXH32_stateSpace_t;
-/*
-These functions allow user application to make its own allocation for state.
-
-XXH32_sizeofState() is used to know how much space must be allocated for the xxHash 32-bits state.
-Note that the state must be aligned to access 'long long' fields. Memory must be allocated and referenced by a pointer.
-This pointer must then be provided as 'state' into XXH32_resetState(), which initializes the state.
-
-For static allocation purposes (such as allocation on stack, or freestanding systems without malloc()),
-use the structure XXH32_stateSpace_t, which will ensure that memory space is large enough and correctly aligned to access 'long long' fields.
-*/
-
-
-unsigned int XXH32_intermediateDigest (void* state);
-/*
-This function does the same as XXH32_digest(), generating a 32-bit hash,
-but preserve memory context.
-This way, it becomes possible to generate intermediate hashes, and then continue feeding data with XXH32_update().
-To free memory context, use XXH32_digest(), or free().
-*/
-
-
-
-//****************************
-// Deprecated function names
-//****************************
-// The following translations are provided to ease code transition
-// You are encouraged to no longer this function names
-#define XXH32_feed   XXH32_update
-#define XXH32_result XXH32_digest
-#define XXH32_getIntermediateResult XXH32_intermediateDigest
-
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/src/rocksdb/utilities/backupable/backupable_db.cc b/src/rocksdb/utilities/backupable/backupable_db.cc
deleted file mode 100644
index 87901e0..0000000
--- a/src/rocksdb/utilities/backupable/backupable_db.cc
+++ /dev/null
@@ -1,1306 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef ROCKSDB_LITE
-
-#include "utilities/backupable_db.h"
-#include "db/filename.h"
-#include "util/coding.h"
-#include "util/crc32c.h"
-#include "rocksdb/transaction_log.h"
-
-#define __STDC_FORMAT_MACROS
-
-#include <inttypes.h>
-#include <algorithm>
-#include <vector>
-#include <map>
-#include <string>
-#include <limits>
-#include <atomic>
-#include <unordered_map>
-
-namespace rocksdb {
-
-namespace {
-class RateLimiter {
- public:
-  RateLimiter(Env* env, uint64_t max_bytes_per_second, uint64_t bytes_per_check)
-      : env_(env),
-        max_bytes_per_second_(max_bytes_per_second),
-        bytes_per_check_(bytes_per_check),
-        micros_start_time_(env->NowMicros()),
-        bytes_since_start_(0) {}
-
-  void ReportAndWait(uint64_t bytes_since_last_call) {
-    bytes_since_start_ += bytes_since_last_call;
-    if (bytes_since_start_ < bytes_per_check_) {
-      // not enough bytes to be rate-limited
-      return;
-    }
-
-    uint64_t now = env_->NowMicros();
-    uint64_t interval = now - micros_start_time_;
-    uint64_t should_take_micros =
-        (bytes_since_start_ * kMicrosInSecond) / max_bytes_per_second_;
-
-    if (should_take_micros > interval) {
-      env_->SleepForMicroseconds(should_take_micros - interval);
-      now = env_->NowMicros();
-    }
-    // reset interval
-    micros_start_time_ = now;
-    bytes_since_start_ = 0;
-  }
-
- private:
-  Env* env_;
-  uint64_t max_bytes_per_second_;
-  uint64_t bytes_per_check_;
-  uint64_t micros_start_time_;
-  uint64_t bytes_since_start_;
-  static const uint64_t kMicrosInSecond = 1000 * 1000LL;
-};
-}  // namespace
-
-void BackupableDBOptions::Dump(Logger* logger) const {
-  Log(logger, "        Options.backup_dir: %s", backup_dir.c_str());
-  Log(logger, "        Options.backup_env: %p", backup_env);
-  Log(logger, " Options.share_table_files: %d",
-      static_cast<int>(share_table_files));
-  Log(logger, "          Options.info_log: %p", info_log);
-  Log(logger, "              Options.sync: %d", static_cast<int>(sync));
-  Log(logger, "  Options.destroy_old_data: %d",
-      static_cast<int>(destroy_old_data));
-  Log(logger, "  Options.backup_log_files: %d",
-      static_cast<int>(backup_log_files));
-  Log(logger, " Options.backup_rate_limit: %" PRIu64, backup_rate_limit);
-  Log(logger, "Options.restore_rate_limit: %" PRIu64, restore_rate_limit);
-}
-
-// -------- BackupEngineImpl class ---------
-class BackupEngineImpl : public BackupEngine {
- public:
-  BackupEngineImpl(Env* db_env, const BackupableDBOptions& options,
-                   bool read_only = false);
-  ~BackupEngineImpl();
-  Status CreateNewBackup(DB* db, bool flush_before_backup = false);
-  Status PurgeOldBackups(uint32_t num_backups_to_keep);
-  Status DeleteBackup(BackupID backup_id);
-  void StopBackup() {
-    stop_backup_.store(true, std::memory_order_release);
-  }
-
-  void GetBackupInfo(std::vector<BackupInfo>* backup_info);
-  Status RestoreDBFromBackup(BackupID backup_id, const std::string& db_dir,
-                             const std::string& wal_dir,
-                             const RestoreOptions& restore_options =
-                                 RestoreOptions());
-  Status RestoreDBFromLatestBackup(const std::string& db_dir,
-                                   const std::string& wal_dir,
-                                   const RestoreOptions& restore_options =
-                                       RestoreOptions()) {
-    return RestoreDBFromBackup(latest_backup_id_, db_dir, wal_dir,
-                               restore_options);
-  }
-
- private:
-  void DeleteChildren(const std::string& dir, uint32_t file_type_filter = 0);
-
-  struct FileInfo {
-    FileInfo(const std::string& fname, uint64_t sz, uint32_t checksum)
-      : refs(0), filename(fname), size(sz), checksum_value(checksum) {}
-
-    int refs;
-    const std::string filename;
-    const uint64_t size;
-    uint32_t checksum_value;
-  };
-
-  class BackupMeta {
-   public:
-    BackupMeta(const std::string& meta_filename,
-        std::unordered_map<std::string, FileInfo>* file_infos, Env* env)
-      : timestamp_(0), size_(0), meta_filename_(meta_filename),
-        file_infos_(file_infos), env_(env) {}
-
-    ~BackupMeta() {}
-
-    void RecordTimestamp() {
-      env_->GetCurrentTime(&timestamp_);
-    }
-    int64_t GetTimestamp() const {
-      return timestamp_;
-    }
-    uint64_t GetSize() const {
-      return size_;
-    }
-    void SetSequenceNumber(uint64_t sequence_number) {
-      sequence_number_ = sequence_number;
-    }
-    uint64_t GetSequenceNumber() {
-      return sequence_number_;
-    }
-
-    Status AddFile(const FileInfo& file_info);
-
-    void Delete(bool delete_meta = true);
-
-    bool Empty() {
-      return files_.empty();
-    }
-
-    const std::vector<std::string>& GetFiles() {
-      return files_;
-    }
-
-    Status LoadFromFile(const std::string& backup_dir);
-    Status StoreToFile(bool sync);
-
-   private:
-    int64_t timestamp_;
-    // sequence number is only approximate, should not be used
-    // by clients
-    uint64_t sequence_number_;
-    uint64_t size_;
-    std::string const meta_filename_;
-    // files with relative paths (without "/" prefix!!)
-    std::vector<std::string> files_;
-    std::unordered_map<std::string, FileInfo>* file_infos_;
-    Env* env_;
-
-    static const size_t max_backup_meta_file_size_ = 10 * 1024 * 1024;  // 10MB
-  };  // BackupMeta
-
-  inline std::string GetAbsolutePath(
-      const std::string &relative_path = "") const {
-    assert(relative_path.size() == 0 || relative_path[0] != '/');
-    return options_.backup_dir + "/" + relative_path;
-  }
-  inline std::string GetPrivateDirRel() const {
-    return "private";
-  }
-  inline std::string GetSharedChecksumDirRel() const {
-    return "shared_checksum";
-  }
-  inline std::string GetPrivateFileRel(BackupID backup_id,
-                                       bool tmp = false,
-                                       const std::string& file = "") const {
-    assert(file.size() == 0 || file[0] != '/');
-    return GetPrivateDirRel() + "/" + std::to_string(backup_id) +
-           (tmp ? ".tmp" : "") + "/" + file;
-  }
-  inline std::string GetSharedFileRel(const std::string& file = "",
-                                      bool tmp = false) const {
-    assert(file.size() == 0 || file[0] != '/');
-    return "shared/" + file + (tmp ? ".tmp" : "");
-  }
-  inline std::string GetSharedFileWithChecksumRel(const std::string& file = "",
-                                                  bool tmp = false) const {
-    assert(file.size() == 0 || file[0] != '/');
-    return GetSharedChecksumDirRel() + "/" + file + (tmp ? ".tmp" : "");
-  }
-  inline std::string GetSharedFileWithChecksum(const std::string& file,
-                                               const uint32_t checksum_value,
-                                               const uint64_t file_size) const {
-    assert(file.size() == 0 || file[0] != '/');
-    std::string file_copy = file;
-    return file_copy.insert(file_copy.find_last_of('.'),
-                            "_" + std::to_string(checksum_value)
-                              + "_" + std::to_string(file_size));
-  }
-  inline std::string GetFileFromChecksumFile(const std::string& file) const {
-    assert(file.size() == 0 || file[0] != '/');
-    std::string file_copy = file;
-    size_t first_underscore = file_copy.find_first_of('_');
-    return file_copy.erase(first_underscore,
-                           file_copy.find_last_of('.') - first_underscore);
-  }
-  inline std::string GetLatestBackupFile(bool tmp = false) const {
-    return GetAbsolutePath(std::string("LATEST_BACKUP") + (tmp ? ".tmp" : ""));
-  }
-  inline std::string GetBackupMetaDir() const {
-    return GetAbsolutePath("meta");
-  }
-  inline std::string GetBackupMetaFile(BackupID backup_id) const {
-    return GetBackupMetaDir() + "/" + std::to_string(backup_id);
-  }
-
-  Status GetLatestBackupFileContents(uint32_t* latest_backup);
-  Status PutLatestBackupFileContents(uint32_t latest_backup);
-  // if size_limit == 0, there is no size limit, copy everything
-  Status CopyFile(const std::string& src,
-                  const std::string& dst,
-                  Env* src_env,
-                  Env* dst_env,
-                  bool sync,
-                  RateLimiter* rate_limiter,
-                  uint64_t* size = nullptr,
-                  uint32_t* checksum_value = nullptr,
-                  uint64_t size_limit = 0);
-  // if size_limit == 0, there is no size limit, copy everything
-  Status BackupFile(BackupID backup_id,
-                    BackupMeta* backup,
-                    bool shared,
-                    const std::string& src_dir,
-                    const std::string& src_fname,  // starts with "/"
-                    RateLimiter* rate_limiter,
-                    uint64_t size_limit = 0,
-                    bool shared_checksum = false);
-
-  Status CalculateChecksum(const std::string& src,
-                           Env* src_env,
-                           uint64_t size_limit,
-                           uint32_t* checksum_value);
-
-  // Will delete all the files we don't need anymore
-  // If full_scan == true, it will do the full scan of files/ directory
-  // and delete all the files that are not referenced from backuped_file_infos__
-  void GarbageCollection(bool full_scan);
-
-  // backup state data
-  BackupID latest_backup_id_;
-  std::map<BackupID, BackupMeta> backups_;
-  std::unordered_map<std::string, FileInfo> backuped_file_infos_;
-  std::vector<BackupID> obsolete_backups_;
-  std::atomic<bool> stop_backup_;
-
-  // options data
-  BackupableDBOptions options_;
-  Env* db_env_;
-  Env* backup_env_;
-
-  // directories
-  unique_ptr<Directory> backup_directory_;
-  unique_ptr<Directory> shared_directory_;
-  unique_ptr<Directory> meta_directory_;
-  unique_ptr<Directory> private_directory_;
-
-  static const size_t kDefaultCopyFileBufferSize = 5 * 1024 * 1024LL;  // 5MB
-  size_t copy_file_buffer_size_;
-  bool read_only_;
-};
-
-BackupEngine* BackupEngine::NewBackupEngine(
-    Env* db_env, const BackupableDBOptions& options) {
-  return new BackupEngineImpl(db_env, options);
-}
-
-BackupEngineImpl::BackupEngineImpl(Env* db_env,
-                                   const BackupableDBOptions& options,
-                                   bool read_only)
-    : stop_backup_(false),
-      options_(options),
-      db_env_(db_env),
-      backup_env_(options.backup_env != nullptr ? options.backup_env : db_env_),
-      copy_file_buffer_size_(kDefaultCopyFileBufferSize),
-      read_only_(read_only) {
-  if (read_only_) {
-    Log(options_.info_log, "Starting read_only backup engine");
-  }
-  options_.Dump(options_.info_log);
-
-  if (!read_only_) {
-    // create all the dirs we need
-    backup_env_->CreateDirIfMissing(GetAbsolutePath());
-    backup_env_->NewDirectory(GetAbsolutePath(), &backup_directory_);
-    if (options_.share_table_files) {
-      if (options_.share_files_with_checksum) {
-        backup_env_->CreateDirIfMissing(GetAbsolutePath(
-            GetSharedFileWithChecksumRel()));
-        backup_env_->NewDirectory(GetAbsolutePath(
-            GetSharedFileWithChecksumRel()), &shared_directory_);
-      } else {
-        backup_env_->CreateDirIfMissing(GetAbsolutePath(GetSharedFileRel()));
-        backup_env_->NewDirectory(GetAbsolutePath(GetSharedFileRel()),
-                                  &shared_directory_);
-      }
-    }
-    backup_env_->CreateDirIfMissing(GetAbsolutePath(GetPrivateDirRel()));
-    backup_env_->NewDirectory(GetAbsolutePath(GetPrivateDirRel()),
-                              &private_directory_);
-    backup_env_->CreateDirIfMissing(GetBackupMetaDir());
-    backup_env_->NewDirectory(GetBackupMetaDir(), &meta_directory_);
-  }
-
-  std::vector<std::string> backup_meta_files;
-  backup_env_->GetChildren(GetBackupMetaDir(), &backup_meta_files);
-  // create backups_ structure
-  for (auto& file : backup_meta_files) {
-    BackupID backup_id = 0;
-    sscanf(file.c_str(), "%u", &backup_id);
-    if (backup_id == 0 || file != std::to_string(backup_id)) {
-      if (!read_only_) {
-        // invalid file name, delete that
-        backup_env_->DeleteFile(GetBackupMetaDir() + "/" + file);
-      }
-      continue;
-    }
-    assert(backups_.find(backup_id) == backups_.end());
-    backups_.insert(std::make_pair(
-        backup_id, BackupMeta(GetBackupMetaFile(backup_id),
-                              &backuped_file_infos_, backup_env_)));
-  }
-
-  if (options_.destroy_old_data) {  // Destory old data
-    assert(!read_only_);
-    for (auto& backup : backups_) {
-      backup.second.Delete();
-      obsolete_backups_.push_back(backup.first);
-    }
-    backups_.clear();
-    // start from beginning
-    latest_backup_id_ = 0;
-    // GarbageCollection() will do the actual deletion
-  } else {  // Load data from storage
-    // load the backups if any
-    for (auto& backup : backups_) {
-      Status s = backup.second.LoadFromFile(options_.backup_dir);
-      if (!s.ok()) {
-        Log(options_.info_log, "Backup %u corrupted -- %s", backup.first,
-            s.ToString().c_str());
-        if (!read_only_) {
-          Log(options_.info_log, "-> Deleting backup %u", backup.first);
-        }
-        backup.second.Delete(!read_only_);
-        obsolete_backups_.push_back(backup.first);
-      }
-    }
-    // delete obsolete backups from the structure
-    for (auto ob : obsolete_backups_) {
-      backups_.erase(ob);
-    }
-
-    Status s = GetLatestBackupFileContents(&latest_backup_id_);
-
-    // If latest backup file is corrupted or non-existent
-    // set latest backup as the biggest backup we have
-    // or 0 if we have no backups
-    if (!s.ok() ||
-        backups_.find(latest_backup_id_) == backups_.end()) {
-      auto itr = backups_.end();
-      latest_backup_id_ = (itr == backups_.begin()) ? 0 : (--itr)->first;
-    }
-  }
-
-  // delete any backups that claim to be later than latest
-  for (auto itr = backups_.upper_bound(latest_backup_id_);
-       itr != backups_.end();) {
-    itr->second.Delete();
-    obsolete_backups_.push_back(itr->first);
-    itr = backups_.erase(itr);
-  }
-
-  if (!read_only_) {
-    PutLatestBackupFileContents(latest_backup_id_);  // Ignore errors
-    GarbageCollection(true);
-  }
-  Log(options_.info_log, "Initialized BackupEngine, the latest backup is %u.",
-      latest_backup_id_);
-}
-
-BackupEngineImpl::~BackupEngineImpl() { LogFlush(options_.info_log); }
-
-Status BackupEngineImpl::CreateNewBackup(DB* db, bool flush_before_backup) {
-  assert(!read_only_);
-  Status s;
-  std::vector<std::string> live_files;
-  VectorLogPtr live_wal_files;
-  uint64_t manifest_file_size = 0;
-  uint64_t sequence_number = db->GetLatestSequenceNumber();
-
-  s = db->DisableFileDeletions();
-  if (s.ok()) {
-    // this will return live_files prefixed with "/"
-    s = db->GetLiveFiles(live_files, &manifest_file_size, flush_before_backup);
-  }
-  // if we didn't flush before backup, we need to also get WAL files
-  if (s.ok() && !flush_before_backup && options_.backup_log_files) {
-    // returns file names prefixed with "/"
-    s = db->GetSortedWalFiles(live_wal_files);
-  }
-  if (!s.ok()) {
-    db->EnableFileDeletions();
-    return s;
-  }
-
-  BackupID new_backup_id = latest_backup_id_ + 1;
-  assert(backups_.find(new_backup_id) == backups_.end());
-  auto ret = backups_.insert(std::make_pair(
-      new_backup_id, BackupMeta(GetBackupMetaFile(new_backup_id),
-                                &backuped_file_infos_, backup_env_)));
-  assert(ret.second == true);
-  auto& new_backup = ret.first->second;
-  new_backup.RecordTimestamp();
-  new_backup.SetSequenceNumber(sequence_number);
-
-  Log(options_.info_log, "Started the backup process -- creating backup %u",
-      new_backup_id);
-
-  // create temporary private dir
-  s = backup_env_->CreateDir(
-      GetAbsolutePath(GetPrivateFileRel(new_backup_id, true)));
-
-  unique_ptr<RateLimiter> rate_limiter;
-  if (options_.backup_rate_limit > 0) {
-    copy_file_buffer_size_ = options_.backup_rate_limit / 10;
-    rate_limiter.reset(new RateLimiter(db_env_, options_.backup_rate_limit,
-                                       copy_file_buffer_size_));
-  }
-
-  // copy live_files
-  for (size_t i = 0; s.ok() && i < live_files.size(); ++i) {
-    uint64_t number;
-    FileType type;
-    bool ok = ParseFileName(live_files[i], &number, &type);
-    if (!ok) {
-      assert(false);
-      return Status::Corruption("Can't parse file name. This is very bad");
-    }
-    // we should only get sst, manifest and current files here
-    assert(type == kTableFile || type == kDescriptorFile ||
-           type == kCurrentFile);
-
-    // rules:
-    // * if it's kTableFile, then it's shared
-    // * if it's kDescriptorFile, limit the size to manifest_file_size
-    s = BackupFile(new_backup_id,
-                   &new_backup,
-                   options_.share_table_files && type == kTableFile,
-                   db->GetName(),            /* src_dir */
-                   live_files[i],            /* src_fname */
-                   rate_limiter.get(),
-                   (type == kDescriptorFile) ? manifest_file_size : 0,
-                   options_.share_files_with_checksum && type == kTableFile);
-  }
-
-  // copy WAL files
-  for (size_t i = 0; s.ok() && i < live_wal_files.size(); ++i) {
-    if (live_wal_files[i]->Type() == kAliveLogFile) {
-      // we only care about live log files
-      // copy the file into backup_dir/files/<new backup>/
-      s = BackupFile(new_backup_id,
-                     &new_backup,
-                     false, /* not shared */
-                     db->GetOptions().wal_dir,
-                     live_wal_files[i]->PathName(),
-                     rate_limiter.get());
-    }
-  }
-
-  // we copied all the files, enable file deletions
-  db->EnableFileDeletions();
-
-  if (s.ok()) {
-    // move tmp private backup to real backup folder
-    s = backup_env_->RenameFile(
-        GetAbsolutePath(GetPrivateFileRel(new_backup_id, true)),  // tmp
-        GetAbsolutePath(GetPrivateFileRel(new_backup_id, false)));
-  }
-
-  if (s.ok()) {
-    // persist the backup metadata on the disk
-    s = new_backup.StoreToFile(options_.sync);
-  }
-  if (s.ok()) {
-    // install the newly created backup meta! (atomic)
-    s = PutLatestBackupFileContents(new_backup_id);
-  }
-  if (s.ok() && options_.sync) {
-    unique_ptr<Directory> backup_private_directory;
-    backup_env_->NewDirectory(
-        GetAbsolutePath(GetPrivateFileRel(new_backup_id, false)),
-        &backup_private_directory);
-    if (backup_private_directory != nullptr) {
-      backup_private_directory->Fsync();
-    }
-    if (private_directory_ != nullptr) {
-      private_directory_->Fsync();
-    }
-    if (meta_directory_ != nullptr) {
-      meta_directory_->Fsync();
-    }
-    if (shared_directory_ != nullptr) {
-      shared_directory_->Fsync();
-    }
-    if (backup_directory_ != nullptr) {
-      backup_directory_->Fsync();
-    }
-  }
-
-  if (!s.ok()) {
-    // clean all the files we might have created
-    Log(options_.info_log, "Backup failed -- %s", s.ToString().c_str());
-    backups_.erase(new_backup_id);
-    GarbageCollection(true);
-    return s;
-  }
-
-  // here we know that we succeeded and installed the new backup
-  // in the LATEST_BACKUP file
-  latest_backup_id_ = new_backup_id;
-  Log(options_.info_log, "Backup DONE. All is good");
-  return s;
-}
-
-Status BackupEngineImpl::PurgeOldBackups(uint32_t num_backups_to_keep) {
-  assert(!read_only_);
-  Log(options_.info_log, "Purging old backups, keeping %u",
-      num_backups_to_keep);
-  while (num_backups_to_keep < backups_.size()) {
-    Log(options_.info_log, "Deleting backup %u", backups_.begin()->first);
-    backups_.begin()->second.Delete();
-    obsolete_backups_.push_back(backups_.begin()->first);
-    backups_.erase(backups_.begin());
-  }
-  GarbageCollection(false);
-  return Status::OK();
-}
-
-Status BackupEngineImpl::DeleteBackup(BackupID backup_id) {
-  assert(!read_only_);
-  Log(options_.info_log, "Deleting backup %u", backup_id);
-  auto backup = backups_.find(backup_id);
-  if (backup == backups_.end()) {
-    return Status::NotFound("Backup not found");
-  }
-  backup->second.Delete();
-  obsolete_backups_.push_back(backup_id);
-  backups_.erase(backup);
-  GarbageCollection(false);
-  return Status::OK();
-}
-
-void BackupEngineImpl::GetBackupInfo(std::vector<BackupInfo>* backup_info) {
-  backup_info->reserve(backups_.size());
-  for (auto& backup : backups_) {
-    if (!backup.second.Empty()) {
-      backup_info->push_back(BackupInfo(
-          backup.first, backup.second.GetTimestamp(), backup.second.GetSize()));
-    }
-  }
-}
-
-Status BackupEngineImpl::RestoreDBFromBackup(
-    BackupID backup_id, const std::string& db_dir, const std::string& wal_dir,
-    const RestoreOptions& restore_options) {
-  auto backup_itr = backups_.find(backup_id);
-  if (backup_itr == backups_.end()) {
-    return Status::NotFound("Backup not found");
-  }
-  auto& backup = backup_itr->second;
-  if (backup.Empty()) {
-    return Status::NotFound("Backup not found");
-  }
-
-  Log(options_.info_log, "Restoring backup id %u\n", backup_id);
-  Log(options_.info_log, "keep_log_files: %d\n",
-      static_cast<int>(restore_options.keep_log_files));
-
-  // just in case. Ignore errors
-  db_env_->CreateDirIfMissing(db_dir);
-  db_env_->CreateDirIfMissing(wal_dir);
-
-  if (restore_options.keep_log_files) {
-    // delete files in db_dir, but keep all the log files
-    DeleteChildren(db_dir, 1 << kLogFile);
-    // move all the files from archive dir to wal_dir
-    std::string archive_dir = ArchivalDirectory(wal_dir);
-    std::vector<std::string> archive_files;
-    db_env_->GetChildren(archive_dir, &archive_files);  // ignore errors
-    for (const auto& f : archive_files) {
-      uint64_t number;
-      FileType type;
-      bool ok = ParseFileName(f, &number, &type);
-      if (ok && type == kLogFile) {
-        Log(options_.info_log, "Moving log file from archive/ to wal_dir: %s",
-            f.c_str());
-        Status s =
-            db_env_->RenameFile(archive_dir + "/" + f, wal_dir + "/" + f);
-        if (!s.ok()) {
-          // if we can't move log file from archive_dir to wal_dir,
-          // we should fail, since it might mean data loss
-          return s;
-        }
-      }
-    }
-  } else {
-    DeleteChildren(wal_dir);
-    DeleteChildren(ArchivalDirectory(wal_dir));
-    DeleteChildren(db_dir);
-  }
-
-  unique_ptr<RateLimiter> rate_limiter;
-  if (options_.restore_rate_limit > 0) {
-    copy_file_buffer_size_ = options_.restore_rate_limit / 10;
-    rate_limiter.reset(new RateLimiter(db_env_, options_.restore_rate_limit,
-                                       copy_file_buffer_size_));
-  }
-  Status s;
-  for (auto& file : backup.GetFiles()) {
-    std::string dst;
-    // 1. extract the filename
-    size_t slash = file.find_last_of('/');
-    // file will either be shared/<file>, shared_checksum/<file_crc32_size>
-    // or private/<number>/<file>
-    assert(slash != std::string::npos);
-    dst = file.substr(slash + 1);
-
-    // if the file was in shared_checksum, extract the real file name
-    // in this case the file is <number>_<checksum>_<size>.<type>
-    if (file.substr(0, slash) == GetSharedChecksumDirRel()) {
-      dst = GetFileFromChecksumFile(dst);
-    }
-
-    // 2. find the filetype
-    uint64_t number;
-    FileType type;
-    bool ok = ParseFileName(dst, &number, &type);
-    if (!ok) {
-      return Status::Corruption("Backup corrupted");
-    }
-    // 3. Construct the final path
-    // kLogFile lives in wal_dir and all the rest live in db_dir
-    dst = ((type == kLogFile) ? wal_dir : db_dir) +
-      "/" + dst;
-
-    Log(options_.info_log, "Restoring %s to %s\n", file.c_str(), dst.c_str());
-    uint32_t checksum_value;
-    s = CopyFile(GetAbsolutePath(file), dst, backup_env_, db_env_, false,
-                 rate_limiter.get(), nullptr /* size */, &checksum_value);
-    if (!s.ok()) {
-      break;
-    }
-
-    const auto iter = backuped_file_infos_.find(file);
-    assert(iter != backuped_file_infos_.end());
-    if (iter->second.checksum_value != checksum_value) {
-      s = Status::Corruption("Checksum check failed");
-      break;
-    }
-  }
-
-  Log(options_.info_log, "Restoring done -- %s\n", s.ToString().c_str());
-  return s;
-}
-
-// latest backup id is an ASCII representation of latest backup id
-Status BackupEngineImpl::GetLatestBackupFileContents(uint32_t* latest_backup) {
-  Status s;
-  unique_ptr<SequentialFile> file;
-  s = backup_env_->NewSequentialFile(GetLatestBackupFile(),
-                                     &file,
-                                     EnvOptions());
-  if (!s.ok()) {
-    return s;
-  }
-
-  char buf[11];
-  Slice data;
-  s = file->Read(10, &data, buf);
-  if (!s.ok() || data.size() == 0) {
-    return s.ok() ? Status::Corruption("Latest backup file corrupted") : s;
-  }
-  buf[data.size()] = 0;
-
-  *latest_backup = 0;
-  sscanf(data.data(), "%u", latest_backup);
-  if (backup_env_->FileExists(GetBackupMetaFile(*latest_backup)) == false) {
-    s = Status::Corruption("Latest backup file corrupted");
-  }
-  return Status::OK();
-}
-
-// this operation HAS to be atomic
-// writing 4 bytes to the file is atomic alright, but we should *never*
-// do something like 1. delete file, 2. write new file
-// We write to a tmp file and then atomically rename
-Status BackupEngineImpl::PutLatestBackupFileContents(uint32_t latest_backup) {
-  assert(!read_only_);
-  Status s;
-  unique_ptr<WritableFile> file;
-  EnvOptions env_options;
-  env_options.use_mmap_writes = false;
-  s = backup_env_->NewWritableFile(GetLatestBackupFile(true),
-                                   &file,
-                                   env_options);
-  if (!s.ok()) {
-    backup_env_->DeleteFile(GetLatestBackupFile(true));
-    return s;
-  }
-
-  char file_contents[10];
-  int len = sprintf(file_contents, "%u\n", latest_backup);
-  s = file->Append(Slice(file_contents, len));
-  if (s.ok() && options_.sync) {
-    file->Sync();
-  }
-  if (s.ok()) {
-    s = file->Close();
-  }
-  if (s.ok()) {
-    // atomically replace real file with new tmp
-    s = backup_env_->RenameFile(GetLatestBackupFile(true),
-                                GetLatestBackupFile(false));
-  }
-  return s;
-}
-
-Status BackupEngineImpl::CopyFile(const std::string& src,
-                                  const std::string& dst, Env* src_env,
-                                  Env* dst_env, bool sync,
-                                  RateLimiter* rate_limiter, uint64_t* size,
-                                  uint32_t* checksum_value,
-                                  uint64_t size_limit) {
-  Status s;
-  unique_ptr<WritableFile> dst_file;
-  unique_ptr<SequentialFile> src_file;
-  EnvOptions env_options;
-  env_options.use_mmap_writes = false;
-  env_options.use_os_buffer = false;
-  if (size != nullptr) {
-    *size = 0;
-  }
-  if (checksum_value != nullptr) {
-    *checksum_value = 0;
-  }
-
-  // Check if size limit is set. if not, set it to very big number
-  if (size_limit == 0) {
-    size_limit = std::numeric_limits<uint64_t>::max();
-  }
-
-  s = src_env->NewSequentialFile(src, &src_file, env_options);
-  if (s.ok()) {
-    s = dst_env->NewWritableFile(dst, &dst_file, env_options);
-  }
-  if (!s.ok()) {
-    return s;
-  }
-
-  unique_ptr<char[]> buf(new char[copy_file_buffer_size_]);
-  Slice data;
-
-  do {
-    if (stop_backup_.load(std::memory_order_acquire)) {
-      return Status::Incomplete("Backup stopped");
-    }
-    size_t buffer_to_read = (copy_file_buffer_size_ < size_limit) ?
-      copy_file_buffer_size_ : size_limit;
-    s = src_file->Read(buffer_to_read, &data, buf.get());
-    size_limit -= data.size();
-
-    if (!s.ok()) {
-      return s;
-    }
-
-    if (size != nullptr) {
-      *size += data.size();
-    }
-    if (checksum_value != nullptr) {
-      *checksum_value = crc32c::Extend(*checksum_value, data.data(),
-                                       data.size());
-    }
-    s = dst_file->Append(data);
-    if (rate_limiter != nullptr) {
-      rate_limiter->ReportAndWait(data.size());
-    }
-  } while (s.ok() && data.size() > 0 && size_limit > 0);
-
-  if (s.ok() && sync) {
-    s = dst_file->Sync();
-  }
-
-  return s;
-}
-
-// src_fname will always start with "/"
-Status BackupEngineImpl::BackupFile(BackupID backup_id, BackupMeta* backup,
-                                    bool shared, const std::string& src_dir,
-                                    const std::string& src_fname,
-                                    RateLimiter* rate_limiter,
-                                    uint64_t size_limit,
-                                    bool shared_checksum) {
-
-  assert(src_fname.size() > 0 && src_fname[0] == '/');
-  std::string dst_relative = src_fname.substr(1);
-  std::string dst_relative_tmp;
-  Status s;
-  uint64_t size;
-  uint32_t checksum_value = 0;
-
-  if (shared && shared_checksum) {
-    // add checksum and file length to the file name
-    s = CalculateChecksum(src_dir + src_fname,
-                          db_env_,
-                          size_limit,
-                          &checksum_value);
-    if (s.ok()) {
-        s = db_env_->GetFileSize(src_dir + src_fname, &size);
-    }
-    if (!s.ok()) {
-         return s;
-    }
-    dst_relative = GetSharedFileWithChecksum(dst_relative, checksum_value,
-                                             size);
-    dst_relative_tmp = GetSharedFileWithChecksumRel(dst_relative, true);
-    dst_relative = GetSharedFileWithChecksumRel(dst_relative, false);
-  } else if (shared) {
-    dst_relative_tmp = GetSharedFileRel(dst_relative, true);
-    dst_relative = GetSharedFileRel(dst_relative, false);
-  } else {
-    dst_relative_tmp = GetPrivateFileRel(backup_id, true, dst_relative);
-    dst_relative = GetPrivateFileRel(backup_id, false, dst_relative);
-  }
-  std::string dst_path = GetAbsolutePath(dst_relative);
-  std::string dst_path_tmp = GetAbsolutePath(dst_relative_tmp);
-
-  // if it's shared, we also need to check if it exists -- if it does,
-  // no need to copy it again
-  if (shared && backup_env_->FileExists(dst_path)) {
-    if (shared_checksum) {
-      Log(options_.info_log,
-          "%s already present, with checksum %u and size %" PRIu64,
-          src_fname.c_str(), checksum_value, size);
-    } else {
-      backup_env_->GetFileSize(dst_path, &size);  // Ignore error
-      Log(options_.info_log, "%s already present, calculate checksum",
-          src_fname.c_str());
-      s = CalculateChecksum(src_dir + src_fname,
-                            db_env_,
-                            size_limit,
-                            &checksum_value);
-    }
-  } else {
-    Log(options_.info_log, "Copying %s", src_fname.c_str());
-    s = CopyFile(src_dir + src_fname,
-                 dst_path_tmp,
-                 db_env_,
-                 backup_env_,
-                 options_.sync,
-                 rate_limiter,
-                 &size,
-                 &checksum_value,
-                 size_limit);
-    if (s.ok() && shared) {
-      s = backup_env_->RenameFile(dst_path_tmp, dst_path);
-    }
-  }
-  if (s.ok()) {
-    s = backup->AddFile(FileInfo(dst_relative, size, checksum_value));
-  }
-  return s;
-}
-
-Status BackupEngineImpl::CalculateChecksum(const std::string& src, Env* src_env,
-                                           uint64_t size_limit,
-                                           uint32_t* checksum_value) {
-  *checksum_value = 0;
-  if (size_limit == 0) {
-    size_limit = std::numeric_limits<uint64_t>::max();
-  }
-
-  EnvOptions env_options;
-  env_options.use_mmap_writes = false;
-  env_options.use_os_buffer = false;
-
-  std::unique_ptr<SequentialFile> src_file;
-  Status s = src_env->NewSequentialFile(src, &src_file, env_options);
-  if (!s.ok()) {
-    return s;
-  }
-
-  std::unique_ptr<char[]> buf(new char[copy_file_buffer_size_]);
-  Slice data;
-
-  do {
-    if (stop_backup_.load(std::memory_order_acquire)) {
-      return Status::Incomplete("Backup stopped");
-    }
-    size_t buffer_to_read = (copy_file_buffer_size_ < size_limit) ?
-      copy_file_buffer_size_ : size_limit;
-    s = src_file->Read(buffer_to_read, &data, buf.get());
-
-    if (!s.ok()) {
-      return s;
-    }
-
-    size_limit -= data.size();
-    *checksum_value = crc32c::Extend(*checksum_value, data.data(), data.size());
-  } while (data.size() > 0 && size_limit > 0);
-
-  return s;
-}
-
-void BackupEngineImpl::DeleteChildren(const std::string& dir,
-                                      uint32_t file_type_filter) {
-  std::vector<std::string> children;
-  db_env_->GetChildren(dir, &children);  // ignore errors
-
-  for (const auto& f : children) {
-    uint64_t number;
-    FileType type;
-    bool ok = ParseFileName(f, &number, &type);
-    if (ok && (file_type_filter & (1 << type))) {
-      // don't delete this file
-      continue;
-    }
-    db_env_->DeleteFile(dir + "/" + f);  // ignore errors
-  }
-}
-
-void BackupEngineImpl::GarbageCollection(bool full_scan) {
-  assert(!read_only_);
-  Log(options_.info_log, "Starting garbage collection");
-  std::vector<std::string> to_delete;
-  for (auto& itr : backuped_file_infos_) {
-    if (itr.second.refs == 0) {
-      Status s = backup_env_->DeleteFile(GetAbsolutePath(itr.first));
-      Log(options_.info_log, "Deleting %s -- %s", itr.first.c_str(),
-          s.ToString().c_str());
-      to_delete.push_back(itr.first);
-    }
-  }
-  for (auto& td : to_delete) {
-    backuped_file_infos_.erase(td);
-  }
-  if (!full_scan) {
-    // take care of private dirs -- if full_scan == true, then full_scan will
-    // take care of them
-    for (auto backup_id : obsolete_backups_) {
-      std::string private_dir = GetPrivateFileRel(backup_id);
-      Status s = backup_env_->DeleteDir(GetAbsolutePath(private_dir));
-      Log(options_.info_log, "Deleting private dir %s -- %s",
-          private_dir.c_str(), s.ToString().c_str());
-    }
-  }
-  obsolete_backups_.clear();
-
-  if (full_scan) {
-    Log(options_.info_log, "Starting full scan garbage collection");
-    // delete obsolete shared files
-    std::vector<std::string> shared_children;
-    backup_env_->GetChildren(GetAbsolutePath(GetSharedFileRel()),
-                             &shared_children);
-    for (auto& child : shared_children) {
-      std::string rel_fname = GetSharedFileRel(child);
-      // if it's not refcounted, delete it
-      if (backuped_file_infos_.find(rel_fname) == backuped_file_infos_.end()) {
-        // this might be a directory, but DeleteFile will just fail in that
-        // case, so we're good
-        Status s = backup_env_->DeleteFile(GetAbsolutePath(rel_fname));
-        if (s.ok()) {
-          Log(options_.info_log, "Deleted %s", rel_fname.c_str());
-        }
-      }
-    }
-
-    // delete obsolete private files
-    std::vector<std::string> private_children;
-    backup_env_->GetChildren(GetAbsolutePath(GetPrivateDirRel()),
-                             &private_children);
-    for (auto& child : private_children) {
-      BackupID backup_id = 0;
-      bool tmp_dir = child.find(".tmp") != std::string::npos;
-      sscanf(child.c_str(), "%u", &backup_id);
-      if (!tmp_dir &&  // if it's tmp_dir, delete it
-          (backup_id == 0 || backups_.find(backup_id) != backups_.end())) {
-        // it's either not a number or it's still alive. continue
-        continue;
-      }
-      // here we have to delete the dir and all its children
-      std::string full_private_path =
-          GetAbsolutePath(GetPrivateFileRel(backup_id, tmp_dir));
-      std::vector<std::string> subchildren;
-      backup_env_->GetChildren(full_private_path, &subchildren);
-      for (auto& subchild : subchildren) {
-        Status s = backup_env_->DeleteFile(full_private_path + subchild);
-        if (s.ok()) {
-          Log(options_.info_log, "Deleted %s",
-              (full_private_path + subchild).c_str());
-        }
-      }
-      // finally delete the private dir
-      Status s = backup_env_->DeleteDir(full_private_path);
-      Log(options_.info_log, "Deleted dir %s -- %s", full_private_path.c_str(),
-          s.ToString().c_str());
-    }
-  }
-}
-
-// ------- BackupMeta class --------
-
-Status BackupEngineImpl::BackupMeta::AddFile(const FileInfo& file_info) {
-  size_ += file_info.size;
-  files_.push_back(file_info.filename);
-
-  auto itr = file_infos_->find(file_info.filename);
-  if (itr == file_infos_->end()) {
-    auto ret = file_infos_->insert({file_info.filename, file_info});
-    if (ret.second) {
-      ret.first->second.refs = 1;
-    } else {
-      // if this happens, something is seriously wrong
-      return Status::Corruption("In memory metadata insertion error");
-    }
-  } else {
-    if (itr->second.checksum_value != file_info.checksum_value) {
-      return Status::Corruption("Checksum mismatch for existing backup file");
-    }
-    ++itr->second.refs;  // increase refcount if already present
-  }
-
-  return Status::OK();
-}
-
-void BackupEngineImpl::BackupMeta::Delete(bool delete_meta) {
-  for (const auto& file : files_) {
-    auto itr = file_infos_->find(file);
-    assert(itr != file_infos_->end());
-    --(itr->second.refs);  // decrease refcount
-  }
-  files_.clear();
-  // delete meta file
-  if (delete_meta) {
-    env_->DeleteFile(meta_filename_);
-  }
-  timestamp_ = 0;
-}
-
-// each backup meta file is of the format:
-// <timestamp>
-// <seq number>
-// <number of files>
-// <file1> <crc32(literal string)> <crc32_value>
-// <file2> <crc32(literal string)> <crc32_value>
-// ...
-Status BackupEngineImpl::BackupMeta::LoadFromFile(
-    const std::string& backup_dir) {
-  assert(Empty());
-  Status s;
-  unique_ptr<SequentialFile> backup_meta_file;
-  s = env_->NewSequentialFile(meta_filename_, &backup_meta_file, EnvOptions());
-  if (!s.ok()) {
-    return s;
-  }
-
-  unique_ptr<char[]> buf(new char[max_backup_meta_file_size_ + 1]);
-  Slice data;
-  s = backup_meta_file->Read(max_backup_meta_file_size_, &data, buf.get());
-
-  if (!s.ok() || data.size() == max_backup_meta_file_size_) {
-    return s.ok() ? Status::Corruption("File size too big") : s;
-  }
-  buf[data.size()] = 0;
-
-  uint32_t num_files = 0;
-  int bytes_read = 0;
-  sscanf(data.data(), "%" PRId64 "%n", &timestamp_, &bytes_read);
-  data.remove_prefix(bytes_read + 1);  // +1 for '\n'
-  sscanf(data.data(), "%" PRIu64 "%n", &sequence_number_, &bytes_read);
-  data.remove_prefix(bytes_read + 1);  // +1 for '\n'
-  sscanf(data.data(), "%u%n", &num_files, &bytes_read);
-  data.remove_prefix(bytes_read + 1);  // +1 for '\n'
-
-  std::vector<FileInfo> files;
-
-  for (uint32_t i = 0; s.ok() && i < num_files; ++i) {
-    auto line = GetSliceUntil(&data, '\n');
-    std::string filename = GetSliceUntil(&line, ' ').ToString();
-
-    uint64_t size;
-    s = env_->GetFileSize(backup_dir + "/" + filename, &size);
-    if (!s.ok()) {
-      return s;
-    }
-
-    if (line.empty()) {
-      return Status::Corruption("File checksum is missing");
-    }
-
-    uint32_t checksum_value = 0;
-    if (line.starts_with("crc32 ")) {
-      line.remove_prefix(6);
-      sscanf(line.data(), "%u", &checksum_value);
-      if (memcmp(line.data(), std::to_string(checksum_value).c_str(),
-                 line.size() - 1) != 0) {
-        return Status::Corruption("Invalid checksum value");
-      }
-    } else {
-      return Status::Corruption("Unknown checksum type");
-    }
-
-    files.emplace_back(filename, size, checksum_value);
-  }
-
-  if (s.ok() && data.size() > 0) {
-    // file has to be read completely. if not, we count it as corruption
-    s = Status::Corruption("Tailing data in backup meta file");
-  }
-
-  if (s.ok()) {
-    for (const auto& file_info : files) {
-      s = AddFile(file_info);
-      if (!s.ok()) {
-        break;
-      }
-    }
-  }
-
-  return s;
-}
-
-Status BackupEngineImpl::BackupMeta::StoreToFile(bool sync) {
-  Status s;
-  unique_ptr<WritableFile> backup_meta_file;
-  EnvOptions env_options;
-  env_options.use_mmap_writes = false;
-  s = env_->NewWritableFile(meta_filename_ + ".tmp", &backup_meta_file,
-                            env_options);
-  if (!s.ok()) {
-    return s;
-  }
-
-  unique_ptr<char[]> buf(new char[max_backup_meta_file_size_]);
-  int len = 0, buf_size = max_backup_meta_file_size_;
-  len += snprintf(buf.get(), buf_size, "%" PRId64 "\n", timestamp_);
-  len += snprintf(buf.get() + len, buf_size - len, "%" PRIu64 "\n",
-                  sequence_number_);
-  len += snprintf(buf.get() + len, buf_size - len, "%zu\n", files_.size());
-  for (const auto& file : files_) {
-    const auto& iter = file_infos_->find(file);
-
-    assert(iter != file_infos_->end());
-    // use crc32 for now, switch to something else if needed
-    len += snprintf(buf.get() + len, buf_size - len, "%s crc32 %u\n",
-                    file.c_str(), iter->second.checksum_value);
-  }
-
-  s = backup_meta_file->Append(Slice(buf.get(), (size_t)len));
-  if (s.ok() && sync) {
-    s = backup_meta_file->Sync();
-  }
-  if (s.ok()) {
-    s = backup_meta_file->Close();
-  }
-  if (s.ok()) {
-    s = env_->RenameFile(meta_filename_ + ".tmp", meta_filename_);
-  }
-  return s;
-}
-
-// -------- BackupEngineReadOnlyImpl ---------
-class BackupEngineReadOnlyImpl : public BackupEngineReadOnly {
- public:
-  BackupEngineReadOnlyImpl(Env* db_env, const BackupableDBOptions& options)
-      : backup_engine_(new BackupEngineImpl(db_env, options, true)) {}
-
-  virtual ~BackupEngineReadOnlyImpl() {}
-
-  virtual void GetBackupInfo(std::vector<BackupInfo>* backup_info) {
-    backup_engine_->GetBackupInfo(backup_info);
-  }
-
-  virtual Status RestoreDBFromBackup(
-      BackupID backup_id, const std::string& db_dir, const std::string& wal_dir,
-      const RestoreOptions& restore_options = RestoreOptions()) {
-    return backup_engine_->RestoreDBFromBackup(backup_id, db_dir, wal_dir,
-                                               restore_options);
-  }
-
-  virtual Status RestoreDBFromLatestBackup(
-      const std::string& db_dir, const std::string& wal_dir,
-      const RestoreOptions& restore_options = RestoreOptions()) {
-    return backup_engine_->RestoreDBFromLatestBackup(db_dir, wal_dir,
-                                                     restore_options);
-  }
-
- private:
-  std::unique_ptr<BackupEngineImpl> backup_engine_;
-};
-
-BackupEngineReadOnly* BackupEngineReadOnly::NewReadOnlyBackupEngine(
-    Env* db_env, const BackupableDBOptions& options) {
-  if (options.destroy_old_data) {
-    assert(false);
-    return nullptr;
-  }
-  return new BackupEngineReadOnlyImpl(db_env, options);
-}
-
-// --- BackupableDB methods --------
-
-BackupableDB::BackupableDB(DB* db, const BackupableDBOptions& options)
-    : StackableDB(db),
-      backup_engine_(new BackupEngineImpl(db->GetEnv(), options)) {}
-
-BackupableDB::~BackupableDB() {
-  delete backup_engine_;
-}
-
-Status BackupableDB::CreateNewBackup(bool flush_before_backup) {
-  return backup_engine_->CreateNewBackup(this, flush_before_backup);
-}
-
-void BackupableDB::GetBackupInfo(std::vector<BackupInfo>* backup_info) {
-  backup_engine_->GetBackupInfo(backup_info);
-}
-
-Status BackupableDB::PurgeOldBackups(uint32_t num_backups_to_keep) {
-  return backup_engine_->PurgeOldBackups(num_backups_to_keep);
-}
-
-Status BackupableDB::DeleteBackup(BackupID backup_id) {
-  return backup_engine_->DeleteBackup(backup_id);
-}
-
-void BackupableDB::StopBackup() {
-  backup_engine_->StopBackup();
-}
-
-// --- RestoreBackupableDB methods ------
-
-RestoreBackupableDB::RestoreBackupableDB(Env* db_env,
-                                         const BackupableDBOptions& options)
-    : backup_engine_(new BackupEngineImpl(db_env, options)) {}
-
-RestoreBackupableDB::~RestoreBackupableDB() {
-  delete backup_engine_;
-}
-
-void
-RestoreBackupableDB::GetBackupInfo(std::vector<BackupInfo>* backup_info) {
-  backup_engine_->GetBackupInfo(backup_info);
-}
-
-Status RestoreBackupableDB::RestoreDBFromBackup(
-    BackupID backup_id, const std::string& db_dir, const std::string& wal_dir,
-    const RestoreOptions& restore_options) {
-  return backup_engine_->RestoreDBFromBackup(backup_id, db_dir, wal_dir,
-                                             restore_options);
-}
-
-Status RestoreBackupableDB::RestoreDBFromLatestBackup(
-    const std::string& db_dir, const std::string& wal_dir,
-    const RestoreOptions& restore_options) {
-  return backup_engine_->RestoreDBFromLatestBackup(db_dir, wal_dir,
-                                                   restore_options);
-}
-
-Status RestoreBackupableDB::PurgeOldBackups(uint32_t num_backups_to_keep) {
-  return backup_engine_->PurgeOldBackups(num_backups_to_keep);
-}
-
-Status RestoreBackupableDB::DeleteBackup(BackupID backup_id) {
-  return backup_engine_->DeleteBackup(backup_id);
-}
-
-}  // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/backupable/backupable_db_test.cc b/src/rocksdb/utilities/backupable/backupable_db_test.cc
deleted file mode 100644
index 6f0c6bc..0000000
--- a/src/rocksdb/utilities/backupable/backupable_db_test.cc
+++ /dev/null
@@ -1,976 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <string>
-#include <algorithm>
-#include <iostream>
-
-#include "port/port.h"
-#include "rocksdb/types.h"
-#include "rocksdb/transaction_log.h"
-#include "utilities/utility_db.h"
-#include "utilities/backupable_db.h"
-#include "util/testharness.h"
-#include "util/random.h"
-#include "util/mutexlock.h"
-#include "util/testutil.h"
-#include "util/auto_roll_logger.h"
-
-namespace rocksdb {
-
-namespace {
-
-using std::unique_ptr;
-
-class DummyDB : public StackableDB {
- public:
-  /* implicit */
-  DummyDB(const Options& options, const std::string& dbname)
-     : StackableDB(nullptr), options_(options), dbname_(dbname),
-       deletions_enabled_(true), sequence_number_(0) {}
-
-  virtual SequenceNumber GetLatestSequenceNumber() const {
-    return ++sequence_number_;
-  }
-
-  virtual const std::string& GetName() const override {
-    return dbname_;
-  }
-
-  virtual Env* GetEnv() const override {
-    return options_.env;
-  }
-
-  using DB::GetOptions;
-  virtual const Options& GetOptions(ColumnFamilyHandle* column_family) const
-      override {
-    return options_;
-  }
-
-  virtual Status EnableFileDeletions(bool force) override {
-    ASSERT_TRUE(!deletions_enabled_);
-    deletions_enabled_ = true;
-    return Status::OK();
-  }
-
-  virtual Status DisableFileDeletions() override {
-    ASSERT_TRUE(deletions_enabled_);
-    deletions_enabled_ = false;
-    return Status::OK();
-  }
-
-  virtual Status GetLiveFiles(std::vector<std::string>& vec, uint64_t* mfs,
-                              bool flush_memtable = true) override {
-    ASSERT_TRUE(!deletions_enabled_);
-    vec = live_files_;
-    *mfs = 100;
-    return Status::OK();
-  }
-
-  virtual ColumnFamilyHandle* DefaultColumnFamily() const override {
-    return nullptr;
-  }
-
-  class DummyLogFile : public LogFile {
-   public:
-    /* implicit */
-     DummyLogFile(const std::string& path, bool alive = true)
-         : path_(path), alive_(alive) {}
-
-    virtual std::string PathName() const override {
-      return path_;
-    }
-
-    virtual uint64_t LogNumber() const {
-      // what business do you have calling this method?
-      ASSERT_TRUE(false);
-      return 0;
-    }
-
-    virtual WalFileType Type() const override {
-      return alive_ ? kAliveLogFile : kArchivedLogFile;
-    }
-
-    virtual SequenceNumber StartSequence() const {
-      // backupabledb should not need this method
-      ASSERT_TRUE(false);
-      return 0;
-    }
-
-    virtual uint64_t SizeFileBytes() const {
-      // backupabledb should not need this method
-      ASSERT_TRUE(false);
-      return 0;
-    }
-
-   private:
-    std::string path_;
-    bool alive_;
-  }; // DummyLogFile
-
-  virtual Status GetSortedWalFiles(VectorLogPtr& files) override {
-    ASSERT_TRUE(!deletions_enabled_);
-    files.resize(wal_files_.size());
-    for (size_t i = 0; i < files.size(); ++i) {
-      files[i].reset(
-          new DummyLogFile(wal_files_[i].first, wal_files_[i].second));
-    }
-    return Status::OK();
-  }
-
-  std::vector<std::string> live_files_;
-  // pair<filename, alive?>
-  std::vector<std::pair<std::string, bool>> wal_files_;
- private:
-  Options options_;
-  std::string dbname_;
-  bool deletions_enabled_;
-  mutable SequenceNumber sequence_number_;
-}; // DummyDB
-
-class TestEnv : public EnvWrapper {
- public:
-  explicit TestEnv(Env* t) : EnvWrapper(t) {}
-
-  class DummySequentialFile : public SequentialFile {
-   public:
-    DummySequentialFile() : SequentialFile(), rnd_(5) {}
-    virtual Status Read(size_t n, Slice* result, char* scratch) {
-      size_t read_size = (n > size_left) ? size_left : n;
-      for (size_t i = 0; i < read_size; ++i) {
-        scratch[i] = rnd_.Next() & 255;
-      }
-      *result = Slice(scratch, read_size);
-      size_left -= read_size;
-      return Status::OK();
-    }
-
-    virtual Status Skip(uint64_t n) {
-      size_left = (n > size_left) ? size_left - n : 0;
-      return Status::OK();
-    }
-   private:
-    size_t size_left = 200;
-    Random rnd_;
-  };
-
-  Status NewSequentialFile(const std::string& f,
-                           unique_ptr<SequentialFile>* r,
-                           const EnvOptions& options) {
-    MutexLock l(&mutex_);
-    if (dummy_sequential_file_) {
-      r->reset(new TestEnv::DummySequentialFile());
-      return Status::OK();
-    } else {
-      return EnvWrapper::NewSequentialFile(f, r, options);
-    }
-  }
-
-  Status NewWritableFile(const std::string& f, unique_ptr<WritableFile>* r,
-                         const EnvOptions& options) {
-    MutexLock l(&mutex_);
-    written_files_.push_back(f);
-    if (limit_written_files_ <= 0) {
-      return Status::NotSupported("Sorry, can't do this");
-    }
-    limit_written_files_--;
-    return EnvWrapper::NewWritableFile(f, r, options);
-  }
-
-  virtual Status DeleteFile(const std::string& fname) override {
-    MutexLock l(&mutex_);
-    ASSERT_GT(limit_delete_files_, 0U);
-    limit_delete_files_--;
-    return EnvWrapper::DeleteFile(fname);
-  }
-
-  void AssertWrittenFiles(std::vector<std::string>& should_have_written) {
-    MutexLock l(&mutex_);
-    sort(should_have_written.begin(), should_have_written.end());
-    sort(written_files_.begin(), written_files_.end());
-    ASSERT_TRUE(written_files_ == should_have_written);
-  }
-
-  void ClearWrittenFiles() {
-    MutexLock l(&mutex_);
-    written_files_.clear();
-  }
-
-  void SetLimitWrittenFiles(uint64_t limit) {
-    MutexLock l(&mutex_);
-    limit_written_files_ = limit;
-  }
-
-  void SetLimitDeleteFiles(uint64_t limit) {
-    MutexLock l(&mutex_);
-    limit_delete_files_ = limit;
-  }
-
-  void SetDummySequentialFile(bool dummy_sequential_file) {
-    MutexLock l(&mutex_);
-    dummy_sequential_file_ = dummy_sequential_file;
-  }
-
- private:
-  port::Mutex mutex_;
-  bool dummy_sequential_file_ = false;
-  std::vector<std::string> written_files_;
-  uint64_t limit_written_files_ = 1000000;
-  uint64_t limit_delete_files_ = 1000000;
-};  // TestEnv
-
-class FileManager : public EnvWrapper {
- public:
-  explicit FileManager(Env* t) : EnvWrapper(t), rnd_(5) {}
-
-  Status DeleteRandomFileInDir(const std::string dir) {
-    std::vector<std::string> children;
-    GetChildren(dir, &children);
-    if (children.size() <= 2) { // . and ..
-      return Status::NotFound("");
-    }
-    while (true) {
-      int i = rnd_.Next() % children.size();
-      if (children[i] != "." && children[i] != "..") {
-        return DeleteFile(dir + "/" + children[i]);
-      }
-    }
-    // should never get here
-    assert(false);
-    return Status::NotFound("");
-  }
-
-  Status CorruptFile(const std::string& fname, uint64_t bytes_to_corrupt) {
-    uint64_t size;
-    Status s = GetFileSize(fname, &size);
-    if (!s.ok()) {
-      return s;
-    }
-    unique_ptr<RandomRWFile> file;
-    EnvOptions env_options;
-    env_options.use_mmap_writes = false;
-    s = NewRandomRWFile(fname, &file, env_options);
-    if (!s.ok()) {
-      return s;
-    }
-
-    for (uint64_t i = 0; s.ok() && i < bytes_to_corrupt; ++i) {
-      std::string tmp;
-      // write one random byte to a random position
-      s = file->Write(rnd_.Next() % size, test::RandomString(&rnd_, 1, &tmp));
-    }
-    return s;
-  }
-
-  Status CorruptChecksum(const std::string& fname, bool appear_valid) {
-    std::string metadata;
-    Status s = ReadFileToString(this, fname, &metadata);
-    if (!s.ok()) {
-      return s;
-    }
-    s = DeleteFile(fname);
-    if (!s.ok()) {
-      return s;
-    }
-
-    auto pos = metadata.find("private");
-    if (pos == std::string::npos) {
-      return Status::Corruption("private file is expected");
-    }
-    pos = metadata.find(" crc32 ", pos + 6);
-    if (pos == std::string::npos) {
-      return Status::Corruption("checksum not found");
-    }
-
-    if (metadata.size() < pos + 7) {
-      return Status::Corruption("bad CRC32 checksum value");
-    }
-
-    if (appear_valid) {
-      if (metadata[pos + 8] == '\n') {
-        // single digit value, safe to insert one more digit
-        metadata.insert(pos + 8, 1, '0');
-      } else {
-        metadata.erase(pos + 8, 1);
-      }
-    } else {
-      metadata[pos + 7] = 'a';
-    }
-
-    return WriteToFile(fname, metadata);
-  }
-
-  Status WriteToFile(const std::string& fname, const std::string& data) {
-    unique_ptr<WritableFile> file;
-    EnvOptions env_options;
-    env_options.use_mmap_writes = false;
-    Status s = EnvWrapper::NewWritableFile(fname, &file, env_options);
-    if (!s.ok()) {
-      return s;
-    }
-    return file->Append(Slice(data));
-  }
-
- private:
-  Random rnd_;
-}; // FileManager
-
-// utility functions
-static size_t FillDB(DB* db, int from, int to) {
-  size_t bytes_written = 0;
-  for (int i = from; i < to; ++i) {
-    std::string key = "testkey" + std::to_string(i);
-    std::string value = "testvalue" + std::to_string(i);
-    bytes_written += key.size() + value.size();
-
-    ASSERT_OK(db->Put(WriteOptions(), Slice(key), Slice(value)));
-  }
-  return bytes_written;
-}
-
-static void AssertExists(DB* db, int from, int to) {
-  for (int i = from; i < to; ++i) {
-    std::string key = "testkey" + std::to_string(i);
-    std::string value;
-    Status s = db->Get(ReadOptions(), Slice(key), &value);
-    ASSERT_EQ(value, "testvalue" + std::to_string(i));
-  }
-}
-
-static void AssertEmpty(DB* db, int from, int to) {
-  for (int i = from; i < to; ++i) {
-    std::string key = "testkey" + std::to_string(i);
-    std::string value = "testvalue" + std::to_string(i);
-
-    Status s = db->Get(ReadOptions(), Slice(key), &value);
-    ASSERT_TRUE(s.IsNotFound());
-  }
-}
-
-class BackupableDBTest {
- public:
-  BackupableDBTest() {
-    // set up files
-    dbname_ = test::TmpDir() + "/backupable_db";
-    backupdir_ = test::TmpDir() + "/backupable_db_backup";
-
-    // set up envs
-    env_ = Env::Default();
-    test_db_env_.reset(new TestEnv(env_));
-    test_backup_env_.reset(new TestEnv(env_));
-    file_manager_.reset(new FileManager(env_));
-
-    // set up db options
-    options_.create_if_missing = true;
-    options_.paranoid_checks = true;
-    options_.write_buffer_size = 1 << 17; // 128KB
-    options_.env = test_db_env_.get();
-    options_.wal_dir = dbname_;
-    // set up backup db options
-    CreateLoggerFromOptions(dbname_, backupdir_, env_,
-                            DBOptions(), &logger_);
-    backupable_options_.reset(new BackupableDBOptions(
-        backupdir_, test_backup_env_.get(), true, logger_.get(), true));
-
-    // delete old files in db
-    DestroyDB(dbname_, Options());
-  }
-
-  DB* OpenDB() {
-    DB* db;
-    ASSERT_OK(DB::Open(options_, dbname_, &db));
-    return db;
-  }
-
-  void OpenBackupableDB(bool destroy_old_data = false, bool dummy = false,
-                        bool share_table_files = true,
-                        bool share_with_checksums = false) {
-    // reset all the defaults
-    test_backup_env_->SetLimitWrittenFiles(1000000);
-    test_db_env_->SetLimitWrittenFiles(1000000);
-    test_db_env_->SetDummySequentialFile(dummy);
-
-    DB* db;
-    if (dummy) {
-      dummy_db_ = new DummyDB(options_, dbname_);
-      db = dummy_db_;
-    } else {
-      ASSERT_OK(DB::Open(options_, dbname_, &db));
-    }
-    backupable_options_->destroy_old_data = destroy_old_data;
-    backupable_options_->share_table_files = share_table_files;
-    backupable_options_->share_files_with_checksum = share_with_checksums;
-    db_.reset(new BackupableDB(db, *backupable_options_));
-  }
-
-  void CloseBackupableDB() {
-    db_.reset(nullptr);
-  }
-
-  void OpenRestoreDB() {
-    backupable_options_->destroy_old_data = false;
-    restore_db_.reset(
-        new RestoreBackupableDB(test_db_env_.get(), *backupable_options_));
-  }
-
-  void CloseRestoreDB() {
-    restore_db_.reset(nullptr);
-  }
-
-  // restores backup backup_id and asserts the existence of
-  // [start_exist, end_exist> and not-existence of
-  // [end_exist, end>
-  //
-  // if backup_id == 0, it means restore from latest
-  // if end == 0, don't check AssertEmpty
-  void AssertBackupConsistency(BackupID backup_id, uint32_t start_exist,
-                               uint32_t end_exist, uint32_t end = 0,
-                               bool keep_log_files = false) {
-    RestoreOptions restore_options(keep_log_files);
-    bool opened_restore = false;
-    if (restore_db_.get() == nullptr) {
-      opened_restore = true;
-      OpenRestoreDB();
-    }
-    if (backup_id > 0) {
-      ASSERT_OK(restore_db_->RestoreDBFromBackup(backup_id, dbname_, dbname_,
-                                                 restore_options));
-    } else {
-      ASSERT_OK(restore_db_->RestoreDBFromLatestBackup(dbname_, dbname_,
-                                                       restore_options));
-    }
-    DB* db = OpenDB();
-    AssertExists(db, start_exist, end_exist);
-    if (end != 0) {
-      AssertEmpty(db, end_exist, end);
-    }
-    delete db;
-    if (opened_restore) {
-      CloseRestoreDB();
-    }
-  }
-
-  void DeleteLogFiles() {
-    std::vector<std::string> delete_logs;
-    env_->GetChildren(dbname_, &delete_logs);
-    for (auto f : delete_logs) {
-      uint64_t number;
-      FileType type;
-      bool ok = ParseFileName(f, &number, &type);
-      if (ok && type == kLogFile) {
-        env_->DeleteFile(dbname_ + "/" + f);
-      }
-    }
-  }
-
-  // files
-  std::string dbname_;
-  std::string backupdir_;
-
-  // envs
-  Env* env_;
-  unique_ptr<TestEnv> test_db_env_;
-  unique_ptr<TestEnv> test_backup_env_;
-  unique_ptr<FileManager> file_manager_;
-
-  // all the dbs!
-  DummyDB* dummy_db_; // BackupableDB owns dummy_db_
-  unique_ptr<BackupableDB> db_;
-  unique_ptr<RestoreBackupableDB> restore_db_;
-
-  // options
-  Options options_;
-  unique_ptr<BackupableDBOptions> backupable_options_;
-  std::shared_ptr<Logger> logger_;
-}; // BackupableDBTest
-
-void AppendPath(const std::string& path, std::vector<std::string>& v) {
-  for (auto& f : v) {
-    f = path + f;
-  }
-}
-
-// this will make sure that backup does not copy the same file twice
-TEST(BackupableDBTest, NoDoubleCopy) {
-  OpenBackupableDB(true, true);
-
-  // should write 5 DB files + LATEST_BACKUP + one meta file
-  test_backup_env_->SetLimitWrittenFiles(7);
-  test_backup_env_->ClearWrittenFiles();
-  test_db_env_->SetLimitWrittenFiles(0);
-  dummy_db_->live_files_ = { "/00010.sst", "/00011.sst",
-                             "/CURRENT",   "/MANIFEST-01" };
-  dummy_db_->wal_files_ = {{"/00011.log", true}, {"/00012.log", false}};
-  ASSERT_OK(db_->CreateNewBackup(false));
-  std::vector<std::string> should_have_written = {
-    "/shared/00010.sst.tmp",
-    "/shared/00011.sst.tmp",
-    "/private/1.tmp/CURRENT",
-    "/private/1.tmp/MANIFEST-01",
-    "/private/1.tmp/00011.log",
-    "/meta/1.tmp",
-    "/LATEST_BACKUP.tmp"
-  };
-  AppendPath(dbname_ + "_backup", should_have_written);
-  test_backup_env_->AssertWrittenFiles(should_have_written);
-
-  // should write 4 new DB files + LATEST_BACKUP + one meta file
-  // should not write/copy 00010.sst, since it's already there!
-  test_backup_env_->SetLimitWrittenFiles(6);
-  test_backup_env_->ClearWrittenFiles();
-  dummy_db_->live_files_ = { "/00010.sst", "/00015.sst",
-                             "/CURRENT",   "/MANIFEST-01" };
-  dummy_db_->wal_files_ = {{"/00011.log", true}, {"/00012.log", false}};
-  ASSERT_OK(db_->CreateNewBackup(false));
-  // should not open 00010.sst - it's already there
-  should_have_written = {
-    "/shared/00015.sst.tmp",
-    "/private/2.tmp/CURRENT",
-    "/private/2.tmp/MANIFEST-01",
-    "/private/2.tmp/00011.log",
-    "/meta/2.tmp",
-    "/LATEST_BACKUP.tmp"
-  };
-  AppendPath(dbname_ + "_backup", should_have_written);
-  test_backup_env_->AssertWrittenFiles(should_have_written);
-
-  ASSERT_OK(db_->DeleteBackup(1));
-  ASSERT_EQ(true,
-            test_backup_env_->FileExists(backupdir_ + "/shared/00010.sst"));
-  // 00011.sst was only in backup 1, should be deleted
-  ASSERT_EQ(false,
-            test_backup_env_->FileExists(backupdir_ + "/shared/00011.sst"));
-  ASSERT_EQ(true,
-            test_backup_env_->FileExists(backupdir_ + "/shared/00015.sst"));
-
-  // MANIFEST file size should be only 100
-  uint64_t size;
-  test_backup_env_->GetFileSize(backupdir_ + "/private/2/MANIFEST-01", &size);
-  ASSERT_EQ(100UL, size);
-  test_backup_env_->GetFileSize(backupdir_ + "/shared/00015.sst", &size);
-  ASSERT_EQ(200UL, size);
-
-  CloseBackupableDB();
-}
-
-// test various kind of corruptions that may happen:
-// 1. Not able to write a file for backup - that backup should fail,
-//      everything else should work
-// 2. Corrupted/deleted LATEST_BACKUP - everything should work fine
-// 3. Corrupted backup meta file or missing backuped file - we should
-//      not be able to open that backup, but all other backups should be
-//      fine
-// 4. Corrupted checksum value - if the checksum is not a valid uint32_t,
-//      db open should fail, otherwise, it aborts during the restore process.
-TEST(BackupableDBTest, CorruptionsTest) {
-  const int keys_iteration = 5000;
-  Random rnd(6);
-  Status s;
-
-  OpenBackupableDB(true);
-  // create five backups
-  for (int i = 0; i < 5; ++i) {
-    FillDB(db_.get(), keys_iteration * i, keys_iteration * (i + 1));
-    ASSERT_OK(db_->CreateNewBackup(!!(rnd.Next() % 2)));
-  }
-
-  // ---------- case 1. - fail a write -----------
-  // try creating backup 6, but fail a write
-  FillDB(db_.get(), keys_iteration * 5, keys_iteration * 6);
-  test_backup_env_->SetLimitWrittenFiles(2);
-  // should fail
-  s = db_->CreateNewBackup(!!(rnd.Next() % 2));
-  ASSERT_TRUE(!s.ok());
-  test_backup_env_->SetLimitWrittenFiles(1000000);
-  // latest backup should have all the keys
-  CloseBackupableDB();
-  AssertBackupConsistency(0, 0, keys_iteration * 5, keys_iteration * 6);
-
-  // ---------- case 2. - corrupt/delete latest backup -----------
-  ASSERT_OK(file_manager_->CorruptFile(backupdir_ + "/LATEST_BACKUP", 2));
-  AssertBackupConsistency(0, 0, keys_iteration * 5);
-  ASSERT_OK(file_manager_->DeleteFile(backupdir_ + "/LATEST_BACKUP"));
-  AssertBackupConsistency(0, 0, keys_iteration * 5);
-  // create backup 6, point LATEST_BACKUP to 5
-  OpenBackupableDB();
-  FillDB(db_.get(), keys_iteration * 5, keys_iteration * 6);
-  ASSERT_OK(db_->CreateNewBackup(false));
-  CloseBackupableDB();
-  ASSERT_OK(file_manager_->WriteToFile(backupdir_ + "/LATEST_BACKUP", "5"));
-  AssertBackupConsistency(0, 0, keys_iteration * 5, keys_iteration * 6);
-  // assert that all 6 data is gone!
-  ASSERT_TRUE(file_manager_->FileExists(backupdir_ + "/meta/6") == false);
-  ASSERT_TRUE(file_manager_->FileExists(backupdir_ + "/private/6") == false);
-
-  // --------- case 3. corrupted backup meta or missing backuped file ----
-  ASSERT_OK(file_manager_->CorruptFile(backupdir_ + "/meta/5", 3));
-  // since 5 meta is now corrupted, latest backup should be 4
-  AssertBackupConsistency(0, 0, keys_iteration * 4, keys_iteration * 5);
-  OpenRestoreDB();
-  s = restore_db_->RestoreDBFromBackup(5, dbname_, dbname_);
-  ASSERT_TRUE(!s.ok());
-  CloseRestoreDB();
-  ASSERT_OK(file_manager_->DeleteRandomFileInDir(backupdir_ + "/private/4"));
-  // 4 is corrupted, 3 is the latest backup now
-  AssertBackupConsistency(0, 0, keys_iteration * 3, keys_iteration * 5);
-  OpenRestoreDB();
-  s = restore_db_->RestoreDBFromBackup(4, dbname_, dbname_);
-  CloseRestoreDB();
-  ASSERT_TRUE(!s.ok());
-
-  // --------- case 4. corrupted checksum value ----
-  ASSERT_OK(file_manager_->CorruptChecksum(backupdir_ + "/meta/3", false));
-  // checksum of backup 3 is an invalid value, this can be detected at
-  // db open time, and it reverts to the previous backup automatically
-  AssertBackupConsistency(0, 0, keys_iteration * 2, keys_iteration * 5);
-  // checksum of the backup 2 appears to be valid, this can cause checksum
-  // mismatch and abort restore process
-  ASSERT_OK(file_manager_->CorruptChecksum(backupdir_ + "/meta/2", true));
-  ASSERT_TRUE(file_manager_->FileExists(backupdir_ + "/meta/2"));
-  OpenRestoreDB();
-  ASSERT_TRUE(file_manager_->FileExists(backupdir_ + "/meta/2"));
-  s = restore_db_->RestoreDBFromBackup(2, dbname_, dbname_);
-  ASSERT_TRUE(!s.ok());
-  ASSERT_OK(restore_db_->DeleteBackup(2));
-  CloseRestoreDB();
-  AssertBackupConsistency(0, 0, keys_iteration * 1, keys_iteration * 5);
-
-  // new backup should be 2!
-  OpenBackupableDB();
-  FillDB(db_.get(), keys_iteration * 1, keys_iteration * 2);
-  ASSERT_OK(db_->CreateNewBackup(!!(rnd.Next() % 2)));
-  CloseBackupableDB();
-  AssertBackupConsistency(2, 0, keys_iteration * 2, keys_iteration * 5);
-}
-
-// open DB, write, close DB, backup, restore, repeat
-TEST(BackupableDBTest, OfflineIntegrationTest) {
-  // has to be a big number, so that it triggers the memtable flush
-  const int keys_iteration = 5000;
-  const int max_key = keys_iteration * 4 + 10;
-  // first iter -- flush before backup
-  // second iter -- don't flush before backup
-  for (int iter = 0; iter < 2; ++iter) {
-    // delete old data
-    DestroyDB(dbname_, Options());
-    bool destroy_data = true;
-
-    // every iteration --
-    // 1. insert new data in the DB
-    // 2. backup the DB
-    // 3. destroy the db
-    // 4. restore the db, check everything is still there
-    for (int i = 0; i < 5; ++i) {
-      // in last iteration, put smaller amount of data,
-      int fill_up_to = std::min(keys_iteration * (i + 1), max_key);
-      // ---- insert new data and back up ----
-      OpenBackupableDB(destroy_data);
-      destroy_data = false;
-      FillDB(db_.get(), keys_iteration * i, fill_up_to);
-      ASSERT_OK(db_->CreateNewBackup(iter == 0));
-      CloseBackupableDB();
-      DestroyDB(dbname_, Options());
-
-      // ---- make sure it's empty ----
-      DB* db = OpenDB();
-      AssertEmpty(db, 0, fill_up_to);
-      delete db;
-
-      // ---- restore the DB ----
-      OpenRestoreDB();
-      if (i >= 3) { // test purge old backups
-        // when i == 4, purge to only 1 backup
-        // when i == 3, purge to 2 backups
-        ASSERT_OK(restore_db_->PurgeOldBackups(5 - i));
-      }
-      // ---- make sure the data is there ---
-      AssertBackupConsistency(0, 0, fill_up_to, max_key);
-      CloseRestoreDB();
-    }
-  }
-}
-
-// open DB, write, backup, write, backup, close, restore
-TEST(BackupableDBTest, OnlineIntegrationTest) {
-  // has to be a big number, so that it triggers the memtable flush
-  const int keys_iteration = 5000;
-  const int max_key = keys_iteration * 4 + 10;
-  Random rnd(7);
-  // delete old data
-  DestroyDB(dbname_, Options());
-
-  OpenBackupableDB(true);
-  // write some data, backup, repeat
-  for (int i = 0; i < 5; ++i) {
-    if (i == 4) {
-      // delete backup number 2, online delete!
-      OpenRestoreDB();
-      ASSERT_OK(restore_db_->DeleteBackup(2));
-      CloseRestoreDB();
-    }
-    // in last iteration, put smaller amount of data,
-    // so that backups can share sst files
-    int fill_up_to = std::min(keys_iteration * (i + 1), max_key);
-    FillDB(db_.get(), keys_iteration * i, fill_up_to);
-    // we should get consistent results with flush_before_backup
-    // set to both true and false
-    ASSERT_OK(db_->CreateNewBackup(!!(rnd.Next() % 2)));
-  }
-  // close and destroy
-  CloseBackupableDB();
-  DestroyDB(dbname_, Options());
-
-  // ---- make sure it's empty ----
-  DB* db = OpenDB();
-  AssertEmpty(db, 0, max_key);
-  delete db;
-
-  // ---- restore every backup and verify all the data is there ----
-  OpenRestoreDB();
-  for (int i = 1; i <= 5; ++i) {
-    if (i == 2) {
-      // we deleted backup 2
-      Status s = restore_db_->RestoreDBFromBackup(2, dbname_, dbname_);
-      ASSERT_TRUE(!s.ok());
-    } else {
-      int fill_up_to = std::min(keys_iteration * i, max_key);
-      AssertBackupConsistency(i, 0, fill_up_to, max_key);
-    }
-  }
-
-  // delete some backups -- this should leave only backups 3 and 5 alive
-  ASSERT_OK(restore_db_->DeleteBackup(4));
-  ASSERT_OK(restore_db_->PurgeOldBackups(2));
-
-  std::vector<BackupInfo> backup_info;
-  restore_db_->GetBackupInfo(&backup_info);
-  ASSERT_EQ(2UL, backup_info.size());
-
-  // check backup 3
-  AssertBackupConsistency(3, 0, 3 * keys_iteration, max_key);
-  // check backup 5
-  AssertBackupConsistency(5, 0, max_key);
-
-  CloseRestoreDB();
-}
-
-TEST(BackupableDBTest, FailOverwritingBackups) {
-  options_.write_buffer_size = 1024 * 1024 * 1024;  // 1GB
-  // create backups 1, 2, 3, 4, 5
-  OpenBackupableDB(true);
-  for (int i = 0; i < 5; ++i) {
-    CloseBackupableDB();
-    DeleteLogFiles();
-    OpenBackupableDB(false);
-    FillDB(db_.get(), 100 * i, 100 * (i + 1));
-    ASSERT_OK(db_->CreateNewBackup(true));
-  }
-  CloseBackupableDB();
-
-  // restore 3
-  OpenRestoreDB();
-  ASSERT_OK(restore_db_->RestoreDBFromBackup(3, dbname_, dbname_));
-  CloseRestoreDB();
-
-  OpenBackupableDB(false);
-  FillDB(db_.get(), 0, 300);
-  Status s = db_->CreateNewBackup(true);
-  // the new backup fails because new table files
-  // clash with old table files from backups 4 and 5
-  // (since write_buffer_size is huge, we can be sure that
-  // each backup will generate only one sst file and that
-  // a file generated by a new backup is the same as
-  // sst file generated by backup 4)
-  ASSERT_TRUE(s.IsCorruption());
-  ASSERT_OK(db_->DeleteBackup(4));
-  ASSERT_OK(db_->DeleteBackup(5));
-  // now, the backup can succeed
-  ASSERT_OK(db_->CreateNewBackup(true));
-  CloseBackupableDB();
-}
-
-TEST(BackupableDBTest, NoShareTableFiles) {
-  const int keys_iteration = 5000;
-  OpenBackupableDB(true, false, false);
-  for (int i = 0; i < 5; ++i) {
-    FillDB(db_.get(), keys_iteration * i, keys_iteration * (i + 1));
-    ASSERT_OK(db_->CreateNewBackup(!!(i % 2)));
-  }
-  CloseBackupableDB();
-
-  for (int i = 0; i < 5; ++i) {
-    AssertBackupConsistency(i + 1, 0, keys_iteration * (i + 1),
-                            keys_iteration * 6);
-  }
-}
-
-// Verify that you can backup and restore with share_files_with_checksum on
-TEST(BackupableDBTest, ShareTableFilesWithChecksums) {
-  const int keys_iteration = 5000;
-  OpenBackupableDB(true, false, true, true);
-  for (int i = 0; i < 5; ++i) {
-    FillDB(db_.get(), keys_iteration * i, keys_iteration * (i + 1));
-    ASSERT_OK(db_->CreateNewBackup(!!(i % 2)));
-  }
-  CloseBackupableDB();
-
-  for (int i = 0; i < 5; ++i) {
-    AssertBackupConsistency(i + 1, 0, keys_iteration * (i + 1),
-                            keys_iteration * 6);
-  }
-}
-
-// Verify that you can backup and restore using share_files_with_checksum set to
-// false and then transition this option to true
-TEST(BackupableDBTest, ShareTableFilesWithChecksumsTransition) {
-  const int keys_iteration = 5000;
-  // set share_files_with_checksum to false
-  OpenBackupableDB(true, false, true, false);
-  for (int i = 0; i < 5; ++i) {
-    FillDB(db_.get(), keys_iteration * i, keys_iteration * (i + 1));
-    ASSERT_OK(db_->CreateNewBackup(true));
-  }
-  CloseBackupableDB();
-
-  for (int i = 0; i < 5; ++i) {
-    AssertBackupConsistency(i + 1, 0, keys_iteration * (i + 1),
-                            keys_iteration * 6);
-  }
-
-  // set share_files_with_checksum to true and do some more backups
-  OpenBackupableDB(true, false, true, true);
-  for (int i = 5; i < 10; ++i) {
-    FillDB(db_.get(), keys_iteration * i, keys_iteration * (i + 1));
-    ASSERT_OK(db_->CreateNewBackup(true));
-  }
-  CloseBackupableDB();
-
-  for (int i = 0; i < 5; ++i) {
-    AssertBackupConsistency(i + 1, 0, keys_iteration * (i + 5 + 1),
-                            keys_iteration * 11);
-  }
-}
-
-TEST(BackupableDBTest, DeleteTmpFiles) {
-  OpenBackupableDB();
-  CloseBackupableDB();
-  std::string shared_tmp = backupdir_ + "/shared/00006.sst.tmp";
-  std::string private_tmp_dir = backupdir_ + "/private/10.tmp";
-  std::string private_tmp_file = private_tmp_dir + "/00003.sst";
-  file_manager_->WriteToFile(shared_tmp, "tmp");
-  file_manager_->CreateDir(private_tmp_dir);
-  file_manager_->WriteToFile(private_tmp_file, "tmp");
-  ASSERT_EQ(true, file_manager_->FileExists(private_tmp_dir));
-  OpenBackupableDB();
-  CloseBackupableDB();
-  ASSERT_EQ(false, file_manager_->FileExists(shared_tmp));
-  ASSERT_EQ(false, file_manager_->FileExists(private_tmp_file));
-  ASSERT_EQ(false, file_manager_->FileExists(private_tmp_dir));
-}
-
-TEST(BackupableDBTest, KeepLogFiles) {
-  backupable_options_->backup_log_files = false;
-  // basically infinite
-  options_.WAL_ttl_seconds = 24 * 60 * 60;
-  OpenBackupableDB(true);
-  FillDB(db_.get(), 0, 100);
-  ASSERT_OK(db_->Flush(FlushOptions()));
-  FillDB(db_.get(), 100, 200);
-  ASSERT_OK(db_->CreateNewBackup(false));
-  FillDB(db_.get(), 200, 300);
-  ASSERT_OK(db_->Flush(FlushOptions()));
-  FillDB(db_.get(), 300, 400);
-  ASSERT_OK(db_->Flush(FlushOptions()));
-  FillDB(db_.get(), 400, 500);
-  ASSERT_OK(db_->Flush(FlushOptions()));
-  CloseBackupableDB();
-
-  // all data should be there if we call with keep_log_files = true
-  AssertBackupConsistency(0, 0, 500, 600, true);
-}
-
-TEST(BackupableDBTest, RateLimiting) {
-  uint64_t const KB = 1024 * 1024;
-  size_t const kMicrosPerSec = 1000 * 1000LL;
-
-  std::vector<std::pair<uint64_t, uint64_t>> limits(
-      {{KB, 5 * KB}, {2 * KB, 3 * KB}});
-
-  for (const auto& limit : limits) {
-    // destroy old data
-    DestroyDB(dbname_, Options());
-
-    backupable_options_->backup_rate_limit = limit.first;
-    backupable_options_->restore_rate_limit = limit.second;
-    options_.compression = kNoCompression;
-    OpenBackupableDB(true);
-    size_t bytes_written = FillDB(db_.get(), 0, 100000);
-
-    auto start_backup = env_->NowMicros();
-    ASSERT_OK(db_->CreateNewBackup(false));
-    auto backup_time = env_->NowMicros() - start_backup;
-    auto rate_limited_backup_time = (bytes_written * kMicrosPerSec) /
-                                    backupable_options_->backup_rate_limit;
-    ASSERT_GT(backup_time, 0.9 * rate_limited_backup_time);
-    ASSERT_LT(backup_time, 2.5 * rate_limited_backup_time);
-
-    CloseBackupableDB();
-
-    OpenRestoreDB();
-    auto start_restore = env_->NowMicros();
-    ASSERT_OK(restore_db_->RestoreDBFromLatestBackup(dbname_, dbname_));
-    auto restore_time = env_->NowMicros() - start_restore;
-    CloseRestoreDB();
-    auto rate_limited_restore_time = (bytes_written * kMicrosPerSec) /
-                                     backupable_options_->restore_rate_limit;
-    ASSERT_GT(restore_time, 0.9 * rate_limited_restore_time);
-    ASSERT_LT(restore_time, 2.5 * rate_limited_restore_time);
-
-    AssertBackupConsistency(0, 0, 100000, 100010);
-  }
-}
-
-TEST(BackupableDBTest, ReadOnlyBackupEngine) {
-  DestroyDB(dbname_, Options());
-  OpenBackupableDB(true);
-  FillDB(db_.get(), 0, 100);
-  ASSERT_OK(db_->CreateNewBackup(true));
-  FillDB(db_.get(), 100, 200);
-  ASSERT_OK(db_->CreateNewBackup(true));
-  CloseBackupableDB();
-  DestroyDB(dbname_, Options());
-
-  backupable_options_->destroy_old_data = false;
-  test_backup_env_->ClearWrittenFiles();
-  test_backup_env_->SetLimitDeleteFiles(0);
-  auto read_only_backup_engine =
-      BackupEngineReadOnly::NewReadOnlyBackupEngine(env_, *backupable_options_);
-  std::vector<BackupInfo> backup_info;
-  read_only_backup_engine->GetBackupInfo(&backup_info);
-  ASSERT_EQ(backup_info.size(), 2U);
-
-  RestoreOptions restore_options(false);
-  ASSERT_OK(read_only_backup_engine->RestoreDBFromLatestBackup(
-      dbname_, dbname_, restore_options));
-  delete read_only_backup_engine;
-  std::vector<std::string> should_have_written;
-  test_backup_env_->AssertWrittenFiles(should_have_written);
-
-  DB* db = OpenDB();
-  AssertExists(db, 0, 200);
-  delete db;
-}
-
-}  // anon namespace
-
-} //  namespace rocksdb
-
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/utilities/geodb/geodb_impl.cc b/src/rocksdb/utilities/geodb/geodb_impl.cc
deleted file mode 100644
index 065e5ca..0000000
--- a/src/rocksdb/utilities/geodb/geodb_impl.cc
+++ /dev/null
@@ -1,431 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef ROCKSDB_LITE
-
-#include "utilities/geodb/geodb_impl.h"
-
-#define __STDC_FORMAT_MACROS
-
-#include <vector>
-#include <map>
-#include <string>
-#include <limits>
-#include "db/filename.h"
-#include "util/coding.h"
-
-//
-// There are two types of keys. The first type of key-values
-// maps a geo location to the set of object ids and their values.
-// Table 1
-//   key     : p + : + $quadkey + : + $id +
-//             : + $latitude + : + $longitude
-//   value  :  value of the object
-// This table can be used to find all objects that reside near
-// a specified geolocation.
-//
-// Table 2
-//   key  : 'k' + : + $id
-//   value:  $quadkey
-
-namespace rocksdb {
-
-GeoDBImpl::GeoDBImpl(DB* db, const GeoDBOptions& options) :
-  GeoDB(db, options), db_(db), options_(options) {
-}
-
-GeoDBImpl::~GeoDBImpl() {
-}
-
-Status GeoDBImpl::Insert(const GeoObject& obj) {
-  WriteBatch batch;
-
-  // It is possible that this id is already associated with
-  // with a different position. We first have to remove that
-  // association before we can insert the new one.
-
-  // remove existing object, if it exists
-  GeoObject old;
-  Status status = GetById(obj.id, &old);
-  if (status.ok()) {
-    assert(obj.id.compare(old.id) == 0);
-    std::string quadkey = PositionToQuad(old.position, Detail);
-    std::string key1 = MakeKey1(old.position, old.id, quadkey);
-    std::string key2 = MakeKey2(old.id);
-    batch.Delete(Slice(key1));
-    batch.Delete(Slice(key2));
-  } else if (status.IsNotFound()) {
-    // What if another thread is trying to insert the same ID concurrently?
-  } else {
-    return status;
-  }
-
-  // insert new object
-  std::string quadkey = PositionToQuad(obj.position, Detail);
-  std::string key1 = MakeKey1(obj.position, obj.id, quadkey);
-  std::string key2 = MakeKey2(obj.id);
-  batch.Put(Slice(key1), Slice(obj.value));
-  batch.Put(Slice(key2), Slice(quadkey));
-  return db_->Write(woptions_, &batch);
-}
-
-Status GeoDBImpl::GetByPosition(const GeoPosition& pos,
-                                const Slice& id,
-                                std::string* value) {
-  std::string quadkey = PositionToQuad(pos, Detail);
-  std::string key1 = MakeKey1(pos, id, quadkey);
-  return db_->Get(roptions_, Slice(key1), value);
-}
-
-Status GeoDBImpl::GetById(const Slice& id, GeoObject* object) {
-  Status status;
-  Slice quadkey;
-
-  // create an iterator so that we can get a consistent picture
-  // of the database.
-  Iterator* iter = db_->NewIterator(roptions_);
-
-  // create key for table2
-  std::string kt = MakeKey2(id);
-  Slice key2(kt);
-
-  iter->Seek(key2);
-  if (iter->Valid() && iter->status().ok()) {
-    if (iter->key().compare(key2) == 0) {
-      quadkey = iter->value();
-    }
-  }
-  if (quadkey.size() == 0) {
-    delete iter;
-    return Status::NotFound(key2);
-  }
-
-  //
-  // Seek to the quadkey + id prefix
-  //
-  std::string prefix = MakeKey1Prefix(quadkey.ToString(), id);
-  iter->Seek(Slice(prefix));
-  assert(iter->Valid());
-  if (!iter->Valid() || !iter->status().ok()) {
-    delete iter;
-    return Status::NotFound();
-  }
-
-  // split the key into p + quadkey + id + lat + lon
-  std::vector<std::string> parts;
-  Slice key = iter->key();
-  StringSplit(&parts, key.ToString(), ':');
-  assert(parts.size() == 5);
-  assert(parts[0] == "p");
-  assert(parts[1] == quadkey);
-  assert(parts[2] == id);
-
-  // fill up output parameters
-  object->position.latitude = atof(parts[3].c_str());
-  object->position.longitude = atof(parts[4].c_str());
-  object->id = id.ToString();  // this is redundant
-  object->value = iter->value().ToString();
-  delete iter;
-  return Status::OK();
-}
-
-
-Status GeoDBImpl::Remove(const Slice& id) {
-  // Read the object from the database
-  GeoObject obj;
-  Status status = GetById(id, &obj);
-  if (!status.ok()) {
-    return status;
-  }
-
-  // remove the object by atomically deleting it from both tables
-  std::string quadkey = PositionToQuad(obj.position, Detail);
-  std::string key1 = MakeKey1(obj.position, obj.id, quadkey);
-  std::string key2 = MakeKey2(obj.id);
-  WriteBatch batch;
-  batch.Delete(Slice(key1));
-  batch.Delete(Slice(key2));
-  return db_->Write(woptions_, &batch);
-}
-
-Status GeoDBImpl::SearchRadial(const GeoPosition& pos,
-  double radius,
-  std::vector<GeoObject>* values,
-  int number_of_values) {
-  // Gather all bounding quadkeys
-  std::vector<std::string> qids;
-  Status s = searchQuadIds(pos, radius, &qids);
-  if (!s.ok()) {
-    return s;
-  }
-
-  // create an iterator
-  Iterator* iter = db_->NewIterator(ReadOptions());
-
-  // Process each prospective quadkey
-  for (std::string qid : qids) {
-    // The user is interested in only these many objects.
-    if (number_of_values == 0) {
-      break;
-    }
-
-    // convert quadkey to db key prefix
-    std::string dbkey = MakeQuadKeyPrefix(qid);
-
-    for (iter->Seek(dbkey);
-         number_of_values > 0 && iter->Valid() && iter->status().ok();
-         iter->Next()) {
-      // split the key into p + quadkey + id + lat + lon
-      std::vector<std::string> parts;
-      Slice key = iter->key();
-      StringSplit(&parts, key.ToString(), ':');
-      assert(parts.size() == 5);
-      assert(parts[0] == "p");
-      std::string* quadkey = &parts[1];
-
-      // If the key we are looking for is a prefix of the key
-      // we found from the database, then this is one of the keys
-      // we are looking for.
-      auto res = std::mismatch(qid.begin(), qid.end(), quadkey->begin());
-      if (res.first == qid.end()) {
-        GeoPosition pos(atof(parts[3].c_str()), atof(parts[4].c_str()));
-        GeoObject obj(pos, parts[4], iter->value().ToString());
-        values->push_back(obj);
-        number_of_values--;
-      } else {
-        break;
-      }
-    }
-  }
-  delete iter;
-  return Status::OK();
-}
-
-std::string GeoDBImpl::MakeKey1(const GeoPosition& pos, Slice id,
-                                std::string quadkey) {
-  std::string lat = std::to_string(pos.latitude);
-  std::string lon = std::to_string(pos.longitude);
-  std::string key = "p:";
-  key.reserve(5 + quadkey.size() + id.size() + lat.size() + lon.size());
-  key.append(quadkey);
-  key.append(":");
-  key.append(id.ToString());
-  key.append(":");
-  key.append(lat);
-  key.append(":");
-  key.append(lon);
-  return key;
-}
-
-std::string GeoDBImpl::MakeKey2(Slice id) {
-  std::string key = "k:";
-  key.append(id.ToString());
-  return key;
-}
-
-std::string GeoDBImpl::MakeKey1Prefix(std::string quadkey,
-                                      Slice id) {
-  std::string key = "p:";
-  key.reserve(3 + quadkey.size() + id.size());
-  key.append(quadkey);
-  key.append(":");
-  key.append(id.ToString());
-  return key;
-}
-
-std::string GeoDBImpl::MakeQuadKeyPrefix(std::string quadkey) {
-  std::string key = "p:";
-  key.append(quadkey);
-  return key;
-}
-
-void GeoDBImpl::StringSplit(std::vector<std::string>* tokens,
-                            const std::string &text, char sep) {
-  std::size_t start = 0, end = 0;
-  while ((end = text.find(sep, start)) != std::string::npos) {
-    tokens->push_back(text.substr(start, end - start));
-    start = end + 1;
-  }
-  tokens->push_back(text.substr(start));
-}
-
-// convert degrees to radians
-double GeoDBImpl::radians(double x) {
-  return (x * PI) / 180;
-}
-
-// convert radians to degrees
-double GeoDBImpl::degrees(double x) {
-  return (x * 180) / PI;
-}
-
-// convert a gps location to quad coordinate
-std::string GeoDBImpl::PositionToQuad(const GeoPosition& pos,
-                                      int levelOfDetail) {
-  Pixel p = PositionToPixel(pos, levelOfDetail);
-  Tile tile = PixelToTile(p);
-  return TileToQuadKey(tile, levelOfDetail);
-}
-
-GeoPosition GeoDBImpl::displaceLatLon(double lat, double lon,
-                                      double deltay, double deltax) {
-  double dLat = deltay / EarthRadius;
-  double dLon = deltax / (EarthRadius * cos(radians(lat)));
-  return GeoPosition(lat + degrees(dLat),
-                     lon + degrees(dLon));
-}
-
-//
-// Return the distance between two positions on the earth
-//
-double GeoDBImpl::distance(double lat1, double lon1,
-                           double lat2, double lon2) {
-  double lon = radians(lon2 - lon1);
-  double lat = radians(lat2 - lat1);
-
-  double a = (sin(lat / 2) * sin(lat / 2)) +
-              cos(radians(lat1)) * cos(radians(lat2)) *
-              (sin(lon / 2) * sin(lon / 2));
-  double angle = 2 * atan2(sqrt(a), sqrt(1 - a));
-  return angle * EarthRadius;
-}
-
-//
-// Returns all the quadkeys inside the search range
-//
-Status GeoDBImpl::searchQuadIds(const GeoPosition& position,
-                                double radius,
-                                std::vector<std::string>* quadKeys) {
-  // get the outline of the search square
-  GeoPosition topLeftPos = boundingTopLeft(position, radius);
-  GeoPosition bottomRightPos = boundingBottomRight(position, radius);
-
-  Pixel topLeft =  PositionToPixel(topLeftPos, Detail);
-  Pixel bottomRight =  PositionToPixel(bottomRightPos, Detail);
-
-  // how many level of details to look for
-  int numberOfTilesAtMaxDepth = floor((bottomRight.x - topLeft.x) / 256);
-  int zoomLevelsToRise = floor(log(numberOfTilesAtMaxDepth) / log(2));
-  zoomLevelsToRise++;
-  int levels = std::max(0, Detail - zoomLevelsToRise);
-
-  quadKeys->push_back(PositionToQuad(GeoPosition(topLeftPos.latitude,
-                                                 topLeftPos.longitude),
-                                     levels));
-  quadKeys->push_back(PositionToQuad(GeoPosition(topLeftPos.latitude,
-                                                 bottomRightPos.longitude),
-                                     levels));
-  quadKeys->push_back(PositionToQuad(GeoPosition(bottomRightPos.latitude,
-                                                 topLeftPos.longitude),
-                                     levels));
-  quadKeys->push_back(PositionToQuad(GeoPosition(bottomRightPos.latitude,
-                                                 bottomRightPos.longitude),
-                                     levels));
-  return Status::OK();
-}
-
-// Determines the ground resolution (in meters per pixel) at a specified
-// latitude and level of detail.
-// Latitude (in degrees) at which to measure the ground resolution.
-// Level of detail, from 1 (lowest detail) to 23 (highest detail).
-// Returns the ground resolution, in meters per pixel.
-double GeoDBImpl::GroundResolution(double latitude, int levelOfDetail) {
-  latitude = clip(latitude, MinLatitude, MaxLatitude);
-  return cos(latitude * PI / 180) * 2 * PI * EarthRadius /
-         MapSize(levelOfDetail);
-}
-
-// Converts a point from latitude/longitude WGS-84 coordinates (in degrees)
-// into pixel XY coordinates at a specified level of detail.
-GeoDBImpl::Pixel GeoDBImpl::PositionToPixel(const GeoPosition& pos,
-                                            int levelOfDetail) {
-  double latitude = clip(pos.latitude, MinLatitude, MaxLatitude);
-  double x = (pos.longitude + 180) / 360;
-  double sinLatitude = sin(latitude * PI / 180);
-  double y = 0.5 - log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * PI);
-  double mapSize = MapSize(levelOfDetail);
-  double X = floor(clip(x * mapSize + 0.5, 0, mapSize - 1));
-  double Y = floor(clip(y * mapSize + 0.5, 0, mapSize - 1));
-  return Pixel((unsigned int)X, (unsigned int)Y);
-}
-
-GeoPosition GeoDBImpl::PixelToPosition(const Pixel& pixel, int levelOfDetail) {
-  double mapSize = MapSize(levelOfDetail);
-  double x = (clip(pixel.x, 0, mapSize - 1) / mapSize) - 0.5;
-  double y = 0.5 - (clip(pixel.y, 0, mapSize - 1) / mapSize);
-  double latitude = 90 - 360 * atan(exp(-y * 2 * PI)) / PI;
-  double longitude = 360 * x;
-  return GeoPosition(latitude, longitude);
-}
-
-// Converts a Pixel to a Tile
-GeoDBImpl::Tile GeoDBImpl::PixelToTile(const Pixel& pixel) {
-  unsigned int tileX = floor(pixel.x / 256);
-  unsigned int tileY = floor(pixel.y / 256);
-  return Tile(tileX, tileY);
-}
-
-GeoDBImpl::Pixel GeoDBImpl::TileToPixel(const Tile& tile) {
-  unsigned int pixelX = tile.x * 256;
-  unsigned int pixelY = tile.y * 256;
-  return Pixel(pixelX, pixelY);
-}
-
-// Convert a Tile to a quadkey
-std::string GeoDBImpl::TileToQuadKey(const Tile& tile, int levelOfDetail) {
-  std::stringstream quadKey;
-  for (int i = levelOfDetail; i > 0; i--) {
-    char digit = '0';
-    int mask = 1 << (i - 1);
-    if ((tile.x & mask) != 0) {
-      digit++;
-    }
-    if ((tile.y & mask) != 0) {
-      digit++;
-      digit++;
-    }
-    quadKey << digit;
-  }
-  return quadKey.str();
-}
-
-//
-// Convert a quadkey to a tile and its level of detail
-//
-void GeoDBImpl::QuadKeyToTile(std::string quadkey, Tile* tile,
-                                     int *levelOfDetail) {
-  tile->x = tile->y = 0;
-  *levelOfDetail = quadkey.size();
-  const char* key = reinterpret_cast<const char *>(quadkey.c_str());
-  for (int i = *levelOfDetail; i > 0; i--) {
-    int mask = 1 << (i - 1);
-    switch (key[*levelOfDetail - i]) {
-      case '0':
-        break;
-
-      case '1':
-        tile->x |= mask;
-        break;
-
-      case '2':
-        tile->y |= mask;
-        break;
-
-      case '3':
-        tile->x |= mask;
-        tile->y |= mask;
-        break;
-
-      default:
-        std::stringstream msg;
-        msg << quadkey;
-        msg << " Invalid QuadKey.";
-        throw std::runtime_error(msg.str());
-    }
-  }
-}
-}  // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/geodb/geodb_impl.h b/src/rocksdb/utilities/geodb/geodb_impl.h
deleted file mode 100644
index 4ee42ad..0000000
--- a/src/rocksdb/utilities/geodb/geodb_impl.h
+++ /dev/null
@@ -1,191 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef ROCKSDB_LITE
-
-#pragma once
-#include <algorithm>
-#include <cmath>
-#include <string>
-#include <sstream>
-#include <stdexcept>
-#include <vector>
-
-#include "utilities/geo_db.h"
-#include "utilities/stackable_db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/status.h"
-
-namespace rocksdb {
-
-// A specific implementation of GeoDB
-
-class GeoDBImpl : public GeoDB {
- public:
-  GeoDBImpl(DB* db, const GeoDBOptions& options);
-  ~GeoDBImpl();
-
-  // Associate the GPS location with the identified by 'id'. The value
-  // is a blob that is associated with this object.
-  virtual Status Insert(const GeoObject& object);
-
-  // Retrieve the value of the object located at the specified GPS
-  // location and is identified by the 'id'.
-  virtual Status GetByPosition(const GeoPosition& pos,
-                               const Slice& id,
-                               std::string* value);
-
-  // Retrieve the value of the object identified by the 'id'. This method
-  // could be potentially slower than GetByPosition
-  virtual Status GetById(const Slice& id, GeoObject* object);
-
-  // Delete the specified object
-  virtual Status Remove(const Slice& id);
-
-  // Returns a list of all items within a circular radius from the
-  // specified gps location
-  virtual Status SearchRadial(const GeoPosition& pos,
-                              double radius,
-                              std::vector<GeoObject>* values,
-                              int number_of_values);
-
- private:
-  DB* db_;
-  const GeoDBOptions options_;
-  const WriteOptions woptions_;
-  const ReadOptions roptions_;
-
-  // The value of PI
-  static constexpr double PI = 3.141592653589793;
-
-  // convert degrees to radians
-  static double radians(double x);
-
-  // convert radians to degrees
-  static double degrees(double x);
-
-  // A pixel class that captures X and Y coordinates
-  class Pixel {
-   public:
-    unsigned int x;
-    unsigned int y;
-    Pixel(unsigned int a, unsigned int b) :
-     x(a), y(b) {
-    }
-  };
-
-  // A Tile in the geoid
-  class Tile {
-   public:
-    unsigned int x;
-    unsigned int y;
-    Tile(unsigned int a, unsigned int b) :
-     x(a), y(b) {
-    }
-  };
-
-  // convert a gps location to quad coordinate
-  static std::string PositionToQuad(const GeoPosition& pos, int levelOfDetail);
-
-  // arbitrary constant use for WGS84 via
-  // http://en.wikipedia.org/wiki/World_Geodetic_System
-  // http://mathforum.org/library/drmath/view/51832.html
-  // http://msdn.microsoft.com/en-us/library/bb259689.aspx
-  // http://www.tuicool.com/articles/NBrE73
-  //
-  const int Detail = 23;
-  static constexpr double EarthRadius = 6378137;
-  static constexpr double MinLatitude = -85.05112878;
-  static constexpr double MaxLatitude = 85.05112878;
-  static constexpr double MinLongitude = -180;
-  static constexpr double MaxLongitude = 180;
-
-  // clips a number to the specified minimum and maximum values.
-  static double clip(double n, double minValue, double maxValue) {
-    return fmin(fmax(n, minValue), maxValue);
-  }
-
-  // Determines the map width and height (in pixels) at a specified level
-  // of detail, from 1 (lowest detail) to 23 (highest detail).
-  // Returns the map width and height in pixels.
-  static unsigned int MapSize(int levelOfDetail) {
-    return (unsigned int)(256 << levelOfDetail);
-  }
-
-  // Determines the ground resolution (in meters per pixel) at a specified
-  // latitude and level of detail.
-  // Latitude (in degrees) at which to measure the ground resolution.
-  // Level of detail, from 1 (lowest detail) to 23 (highest detail).
-  // Returns the ground resolution, in meters per pixel.
-  static double GroundResolution(double latitude, int levelOfDetail);
-
-  // Converts a point from latitude/longitude WGS-84 coordinates (in degrees)
-  // into pixel XY coordinates at a specified level of detail.
-  static Pixel PositionToPixel(const GeoPosition& pos, int levelOfDetail);
-
-  static GeoPosition PixelToPosition(const Pixel& pixel, int levelOfDetail);
-
-  // Converts a Pixel to a Tile
-  static Tile PixelToTile(const Pixel& pixel);
-
-  static Pixel TileToPixel(const Tile& tile);
-
-  // Convert a Tile to a quadkey
-  static std::string TileToQuadKey(const Tile& tile, int levelOfDetail);
-
-  // Convert a quadkey to a tile and its level of detail
-  static void QuadKeyToTile(std::string quadkey, Tile* tile,
-                            int *levelOfDetail);
-
-  // Return the distance between two positions on the earth
-  static double distance(double lat1, double lon1,
-                         double lat2, double lon2);
-  static GeoPosition displaceLatLon(double lat, double lon,
-                                    double deltay, double deltax);
-
-  //
-  // Returns the top left position after applying the delta to
-  // the specified position
-  //
-  static GeoPosition boundingTopLeft(const GeoPosition& in, double radius) {
-    return displaceLatLon(in.latitude, in.longitude, -radius, -radius);
-  }
-
-  //
-  // Returns the bottom right position after applying the delta to
-  // the specified position
-  static GeoPosition boundingBottomRight(const GeoPosition& in,
-                                         double radius) {
-    return displaceLatLon(in.latitude, in.longitude, radius, radius);
-  }
-
-  //
-  // Get all quadkeys within a radius of a specified position
-  //
-  Status searchQuadIds(const GeoPosition& position,
-                       double radius,
-                       std::vector<std::string>* quadKeys);
-
-  // splits a string into its components
-  static void StringSplit(std::vector<std::string>* tokens,
-                          const std::string &text,
-                          char sep);
-
-  //
-  // Create keys for accessing rocksdb table(s)
-  //
-  static std::string MakeKey1(const GeoPosition& pos,
-                              Slice id,
-                              std::string quadkey);
-  static std::string MakeKey2(Slice id);
-  static std::string MakeKey1Prefix(std::string quadkey,
-                                    Slice id);
-  static std::string MakeQuadKeyPrefix(std::string quadkey);
-};
-
-}  // namespace rocksdb
-
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/geodb/geodb_test.cc b/src/rocksdb/utilities/geodb/geodb_test.cc
deleted file mode 100644
index 1a42e32..0000000
--- a/src/rocksdb/utilities/geodb/geodb_test.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-//
-#include "utilities/geodb/geodb_impl.h"
-
-#include <cctype>
-#include "util/testharness.h"
-
-namespace rocksdb {
-
-class GeoDBTest {
- public:
-  static const std::string kDefaultDbName;
-  static Options options;
-  DB* db;
-  GeoDB* geodb;
-
-  GeoDBTest() {
-    GeoDBOptions geodb_options;
-    ASSERT_OK(DestroyDB(kDefaultDbName, options));
-    options.create_if_missing = true;
-    Status status = DB::Open(options, kDefaultDbName, &db);
-    geodb =  new GeoDBImpl(db, geodb_options);
-  }
-
-  ~GeoDBTest() {
-    delete geodb;
-  }
-
-  GeoDB* getdb() {
-    return geodb;
-  }
-};
-
-const std::string GeoDBTest::kDefaultDbName = "/tmp/geodefault";
-Options GeoDBTest::options = Options();
-
-// Insert, Get and Remove
-TEST(GeoDBTest, SimpleTest) {
-  GeoPosition pos1(100, 101);
-  std::string id1("id1");
-  std::string value1("value1");
-
-  // insert first object into database
-  GeoObject obj1(pos1, id1, value1);
-  Status status = getdb()->Insert(obj1);
-  ASSERT_TRUE(status.ok());
-
-  // insert second object into database
-  GeoPosition pos2(200, 201);
-  std::string id2("id2");
-  std::string value2 = "value2";
-  GeoObject obj2(pos2, id2, value2);
-  status = getdb()->Insert(obj2);
-  ASSERT_TRUE(status.ok());
-
-  // retrieve first object using position
-  std::string value;
-  status = getdb()->GetByPosition(pos1, Slice(id1), &value);
-  ASSERT_TRUE(status.ok());
-  ASSERT_EQ(value, value1);
-
-  // retrieve first object using id
-  GeoObject obj;
-  status = getdb()->GetById(Slice(id1), &obj);
-  ASSERT_TRUE(status.ok());
-  ASSERT_EQ(obj.position.latitude, 100);
-  ASSERT_EQ(obj.position.longitude, 101);
-  ASSERT_EQ(obj.id.compare(id1), 0);
-  ASSERT_EQ(obj.value, value1);
-
-  // delete first object
-  status = getdb()->Remove(Slice(id1));
-  ASSERT_TRUE(status.ok());
-  status = getdb()->GetByPosition(pos1, Slice(id1), &value);
-  ASSERT_TRUE(status.IsNotFound());
-  status = getdb()->GetById(id1, &obj);
-  ASSERT_TRUE(status.IsNotFound());
-
-  // check that we can still find second object
-  status = getdb()->GetByPosition(pos2, id2, &value);
-  ASSERT_TRUE(status.ok());
-  ASSERT_EQ(value, value2);
-  status = getdb()->GetById(id2, &obj);
-  ASSERT_TRUE(status.ok());
-}
-
-// Search.
-// Verify distances via http://www.stevemorse.org/nearest/distance.php
-TEST(GeoDBTest, Search) {
-  GeoPosition pos1(45, 45);
-  std::string id1("mid1");
-  std::string value1 = "midvalue1";
-
-  // insert object at 45 degree latitude
-  GeoObject obj1(pos1, id1, value1);
-  Status status = getdb()->Insert(obj1);
-  ASSERT_TRUE(status.ok());
-
-  // search all objects centered at 46 degree latitude with
-  // a radius of 200 kilometers. We should find the one object that
-  // we inserted earlier.
-  std::vector<GeoObject> values;
-  status = getdb()->SearchRadial(GeoPosition(46, 46), 200000, &values);
-  ASSERT_TRUE(status.ok());
-  ASSERT_EQ(values.size(), 1U);
-
-  // search all objects centered at 46 degree latitude with
-  // a radius of 2 kilometers. There should be none.
-  values.clear();
-  status = getdb()->SearchRadial(GeoPosition(46, 46), 2, &values);
-  ASSERT_TRUE(status.ok());
-  ASSERT_EQ(values.size(), 0U);
-}
-
-}  // namespace rocksdb
-
-int main(int argc, char* argv[]) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/rocksdb/utilities/merge_operators.h b/src/rocksdb/utilities/merge_operators.h
deleted file mode 100644
index fdf0664..0000000
--- a/src/rocksdb/utilities/merge_operators.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef MERGE_OPERATORS_H
-#define MERGE_OPERATORS_H
-
-#include <memory>
-#include <stdio.h>
-
-#include "rocksdb/merge_operator.h"
-
-namespace rocksdb {
-
-class MergeOperators {
- public:
-  static std::shared_ptr<MergeOperator> CreatePutOperator();
-  static std::shared_ptr<MergeOperator> CreateUInt64AddOperator();
-  static std::shared_ptr<MergeOperator> CreateStringAppendOperator();
-  static std::shared_ptr<MergeOperator> CreateStringAppendTESTOperator();
-
-  // Will return a different merge operator depending on the string.
-  // TODO: Hook the "name" up to the actual Name() of the MergeOperators?
-  static std::shared_ptr<MergeOperator> CreateFromStringId(
-      const std::string& name) {
-    if (name == "put") {
-      return CreatePutOperator();
-    } else if ( name == "uint64add") {
-      return CreateUInt64AddOperator();
-    } else if (name == "stringappend") {
-      return CreateStringAppendOperator();
-    } else if (name == "stringappendtest") {
-      return CreateStringAppendTESTOperator();
-    } else {
-      // Empty or unknown, just return nullptr
-      return nullptr;
-    }
-  }
-
-};
-
-} // namespace rocksdb
-
-#endif
diff --git a/src/rocksdb/utilities/merge_operators/put.cc b/src/rocksdb/utilities/merge_operators/put.cc
deleted file mode 100644
index 3330843..0000000
--- a/src/rocksdb/utilities/merge_operators/put.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-
-#include <memory>
-#include "rocksdb/slice.h"
-#include "rocksdb/merge_operator.h"
-#include "utilities/merge_operators.h"
-
-using namespace rocksdb;
-
-namespace { // anonymous namespace
-
-// A merge operator that mimics Put semantics
-// Since this merge-operator will not be used in production,
-// it is implemented as a non-associative merge operator to illustrate the
-// new interface and for testing purposes. (That is, we inherit from
-// the MergeOperator class rather than the AssociativeMergeOperator
-// which would be simpler in this case).
-//
-// From the client-perspective, semantics are the same.
-class PutOperator : public MergeOperator {
- public:
-  virtual bool FullMerge(const Slice& key,
-                         const Slice* existing_value,
-                         const std::deque<std::string>& operand_sequence,
-                         std::string* new_value,
-                         Logger* logger) const override {
-    // Put basically only looks at the current/latest value
-    assert(!operand_sequence.empty());
-    assert(new_value != nullptr);
-    new_value->assign(operand_sequence.back());
-    return true;
-  }
-
-  virtual bool PartialMerge(const Slice& key,
-                            const Slice& left_operand,
-                            const Slice& right_operand,
-                            std::string* new_value,
-                            Logger* logger) const override {
-    new_value->assign(right_operand.data(), right_operand.size());
-    return true;
-  }
-
-  using MergeOperator::PartialMergeMulti;
-  virtual bool PartialMergeMulti(const Slice& key,
-                                 const std::deque<Slice>& operand_list,
-                                 std::string* new_value, Logger* logger) const
-      override {
-    new_value->assign(operand_list.back().data(), operand_list.back().size());
-    return true;
-  }
-
-  virtual const char* Name() const override {
-    return "PutOperator";
-  }
-};
-
-} // end of anonymous namespace
-
-namespace rocksdb {
-
-std::shared_ptr<MergeOperator> MergeOperators::CreatePutOperator() {
-  return std::make_shared<PutOperator>();
-}
-
-}
diff --git a/src/rocksdb/utilities/merge_operators/string_append/stringappend.cc b/src/rocksdb/utilities/merge_operators/string_append/stringappend.cc
deleted file mode 100644
index 38cd22e..0000000
--- a/src/rocksdb/utilities/merge_operators/string_append/stringappend.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * A MergeOperator for rocksdb that implements string append.
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook
- */
-
-#include "stringappend.h"
-
-#include <memory>
-#include <assert.h>
-
-#include "rocksdb/slice.h"
-#include "rocksdb/merge_operator.h"
-#include "utilities/merge_operators.h"
-
-namespace rocksdb {
-
-// Constructor: also specify the delimiter character.
-StringAppendOperator::StringAppendOperator(char delim_char)
-    : delim_(delim_char) {
-}
-
-// Implementation for the merge operation (concatenates two strings)
-bool StringAppendOperator::Merge(const Slice& key,
-                                 const Slice* existing_value,
-                                 const Slice& value,
-                                 std::string* new_value,
-                                 Logger* logger) const {
-
-  // Clear the *new_value for writing.
-  assert(new_value);
-  new_value->clear();
-
-  if (!existing_value) {
-    // No existing_value. Set *new_value = value
-    new_value->assign(value.data(),value.size());
-  } else {
-    // Generic append (existing_value != null).
-    // Reserve *new_value to correct size, and apply concatenation.
-    new_value->reserve(existing_value->size() + 1 + value.size());
-    new_value->assign(existing_value->data(),existing_value->size());
-    new_value->append(1,delim_);
-    new_value->append(value.data(), value.size());
-  }
-
-  return true;
-}
-
-const char* StringAppendOperator::Name() const  {
-  return "StringAppendOperator";
-}
-
-std::shared_ptr<MergeOperator> MergeOperators::CreateStringAppendOperator() {
-  return std::make_shared<StringAppendOperator>(',');
-}
-
-} // namespace rocksdb
-
-
-
diff --git a/src/rocksdb/utilities/merge_operators/string_append/stringappend.h b/src/rocksdb/utilities/merge_operators/string_append/stringappend.h
deleted file mode 100644
index ca5b97e..0000000
--- a/src/rocksdb/utilities/merge_operators/string_append/stringappend.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * A MergeOperator for rocksdb that implements string append.
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook
- */
-
-#pragma once
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-class StringAppendOperator : public AssociativeMergeOperator {
- public:
-  StringAppendOperator(char delim_char);    /// Constructor: specify delimiter
-
-  virtual bool Merge(const Slice& key,
-                     const Slice* existing_value,
-                     const Slice& value,
-                     std::string* new_value,
-                     Logger* logger) const override;
-
-  virtual const char* Name() const override;
-
- private:
-  char delim_;         // The delimiter is inserted between elements
-
-};
-
-} // namespace rocksdb
-
diff --git a/src/rocksdb/utilities/merge_operators/string_append/stringappend2.cc b/src/rocksdb/utilities/merge_operators/string_append/stringappend2.cc
deleted file mode 100644
index b2e0358..0000000
--- a/src/rocksdb/utilities/merge_operators/string_append/stringappend2.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook
- */
-
-#include "stringappend2.h"
-
-#include <memory>
-#include <string>
-#include <assert.h>
-
-#include "rocksdb/slice.h"
-#include "rocksdb/merge_operator.h"
-#include "utilities/merge_operators.h"
-
-namespace rocksdb {
-
-// Constructor: also specify the delimiter character.
-StringAppendTESTOperator::StringAppendTESTOperator(char delim_char)
-    : delim_(delim_char) {
-}
-
-// Implementation for the merge operation (concatenates two strings)
-bool StringAppendTESTOperator::FullMerge(
-    const Slice& key,
-    const Slice* existing_value,
-    const std::deque<std::string>& operands,
-    std::string* new_value,
-    Logger* logger) const {
-
-  // Clear the *new_value for writing.
-  assert(new_value);
-  new_value->clear();
-
-  // Compute the space needed for the final result.
-  int numBytes = 0;
-  for(auto it = operands.begin(); it != operands.end(); ++it) {
-    numBytes += it->size() + 1;   // Plus 1 for the delimiter
-  }
-
-  // Only print the delimiter after the first entry has been printed
-  bool printDelim = false;
-
-  // Prepend the *existing_value if one exists.
-  if (existing_value) {
-    new_value->reserve(numBytes + existing_value->size());
-    new_value->append(existing_value->data(), existing_value->size());
-    printDelim = true;
-  } else if (numBytes) {
-    new_value->reserve(numBytes-1); // Minus 1 since we have one less delimiter
-  }
-
-  // Concatenate the sequence of strings (and add a delimiter between each)
-  for(auto it = operands.begin(); it != operands.end(); ++it) {
-    if (printDelim) {
-      new_value->append(1,delim_);
-    }
-    new_value->append(*it);
-    printDelim = true;
-  }
-
-  return true;
-}
-
-bool StringAppendTESTOperator::PartialMergeMulti(
-    const Slice& key, const std::deque<Slice>& operand_list,
-    std::string* new_value, Logger* logger) const {
-  return false;
-}
-
-// A version of PartialMerge that actually performs "partial merging".
-// Use this to simulate the exact behaviour of the StringAppendOperator.
-bool StringAppendTESTOperator::_AssocPartialMergeMulti(
-    const Slice& key, const std::deque<Slice>& operand_list,
-    std::string* new_value, Logger* logger) const {
-  // Clear the *new_value for writing
-  assert(new_value);
-  new_value->clear();
-  assert(operand_list.size() >= 2);
-
-  // Generic append
-  // Determine and reserve correct size for *new_value.
-  size_t size = 0;
-  for (const auto& operand : operand_list) {
-    size += operand.size();
-  }
-  size += operand_list.size() - 1;  // Delimiters
-  new_value->reserve(size);
-
-  // Apply concatenation
-  new_value->assign(operand_list.front().data(), operand_list.front().size());
-
-  for (std::deque<Slice>::const_iterator it = operand_list.begin() + 1;
-       it != operand_list.end(); ++it) {
-    new_value->append(1, delim_);
-    new_value->append(it->data(), it->size());
-  }
-
-  return true;
-}
-
-const char* StringAppendTESTOperator::Name() const  {
-  return "StringAppendTESTOperator";
-}
-
-
-std::shared_ptr<MergeOperator>
-MergeOperators::CreateStringAppendTESTOperator() {
-  return std::make_shared<StringAppendTESTOperator>(',');
-}
-
-} // namespace rocksdb
-
diff --git a/src/rocksdb/utilities/merge_operators/string_append/stringappend2.h b/src/rocksdb/utilities/merge_operators/string_append/stringappend2.h
deleted file mode 100644
index 5e506ef..0000000
--- a/src/rocksdb/utilities/merge_operators/string_append/stringappend2.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * A TEST MergeOperator for rocksdb that implements string append.
- * It is built using the MergeOperator interface rather than the simpler
- * AssociativeMergeOperator interface. This is useful for testing/benchmarking.
- * While the two operators are semantically the same, all production code
- * should use the StringAppendOperator defined in stringappend.{h,cc}. The
- * operator defined in the present file is primarily for testing.
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook
- */
-
-#pragma once
-#include <deque>
-#include <string>
-
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/slice.h"
-
-namespace rocksdb {
-
-class StringAppendTESTOperator : public MergeOperator {
- public:
-  // Constructor with delimiter
-  explicit StringAppendTESTOperator(char delim_char);
-
-  virtual bool FullMerge(const Slice& key,
-                         const Slice* existing_value,
-                         const std::deque<std::string>& operand_sequence,
-                         std::string* new_value,
-                         Logger* logger) const override;
-
-  virtual bool PartialMergeMulti(const Slice& key,
-                                 const std::deque<Slice>& operand_list,
-                                 std::string* new_value, Logger* logger) const
-      override;
-
-  virtual const char* Name() const override;
-
- private:
-  // A version of PartialMerge that actually performs "partial merging".
-  // Use this to simulate the exact behaviour of the StringAppendOperator.
-  bool _AssocPartialMergeMulti(const Slice& key,
-                               const std::deque<Slice>& operand_list,
-                               std::string* new_value, Logger* logger) const;
-
-  char delim_;         // The delimiter is inserted between elements
-
-};
-
-} // namespace rocksdb
diff --git a/src/rocksdb/utilities/merge_operators/string_append/stringappend_test.cc b/src/rocksdb/utilities/merge_operators/string_append/stringappend_test.cc
deleted file mode 100644
index a68186a..0000000
--- a/src/rocksdb/utilities/merge_operators/string_append/stringappend_test.cc
+++ /dev/null
@@ -1,595 +0,0 @@
-/**
- * An persistent map : key -> (list of strings), using rocksdb merge.
- * This file is a test-harness / use-case for the StringAppendOperator.
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook, Inc.
-*/
-
-#include <iostream>
-#include <map>
-
-#include "rocksdb/db.h"
-#include "rocksdb/merge_operator.h"
-#include "utilities/merge_operators.h"
-#include "utilities/merge_operators/string_append/stringappend.h"
-#include "utilities/merge_operators/string_append/stringappend2.h"
-#include "utilities/db_ttl.h"
-#include "util/testharness.h"
-#include "util/random.h"
-
-using namespace rocksdb;
-
-namespace rocksdb {
-
-// Path to the database on file system
-const std::string kDbName = "/tmp/mergetestdb";
-
-namespace {
-// OpenDb opens a (possibly new) rocksdb database with a StringAppendOperator
-std::shared_ptr<DB> OpenNormalDb(char delim_char) {
-  DB* db;
-  Options options;
-  options.create_if_missing = true;
-  options.merge_operator.reset(new StringAppendOperator(delim_char));
-  ASSERT_OK(DB::Open(options, kDbName,  &db));
-  return std::shared_ptr<DB>(db);
-}
-
-// Open a TtlDB with a non-associative StringAppendTESTOperator
-std::shared_ptr<DB> OpenTtlDb(char delim_char) {
-  DBWithTTL* db;
-  Options options;
-  options.create_if_missing = true;
-  options.merge_operator.reset(new StringAppendTESTOperator(delim_char));
-  ASSERT_OK(DBWithTTL::Open(options, kDbName, &db, 123456));
-  return std::shared_ptr<DB>(db);
-}
-}  // namespace
-
-/// StringLists represents a set of string-lists, each with a key-index.
-/// Supports Append(list, string) and Get(list)
-class StringLists {
- public:
-
-  //Constructor: specifies the rocksdb db
-  /* implicit */
-  StringLists(std::shared_ptr<DB> db)
-      : db_(db),
-        merge_option_(),
-        get_option_() {
-    assert(db);
-  }
-
-  // Append string val onto the list defined by key; return true on success
-  bool Append(const std::string& key, const std::string& val){
-    Slice valSlice(val.data(), val.size());
-    auto s = db_->Merge(merge_option_, key, valSlice);
-
-    if (s.ok()) {
-      return true;
-    } else {
-      std::cerr << "ERROR " << s.ToString() << std::endl;
-      return false;
-    }
-  }
-
-  // Returns the list of strings associated with key (or "" if does not exist)
-  bool Get(const std::string& key, std::string* const result){
-    assert(result != nullptr); // we should have a place to store the result
-    auto s = db_->Get(get_option_, key, result);
-
-    if (s.ok()) {
-      return true;
-    }
-
-    // Either key does not exist, or there is some error.
-    *result = "";       // Always return empty string (just for convention)
-
-    //NotFound is okay; just return empty (similar to std::map)
-    //But network or db errors, etc, should fail the test (or at least yell)
-    if (!s.IsNotFound()) {
-      std::cerr << "ERROR " << s.ToString() << std::endl;
-    }
-
-    // Always return false if s.ok() was not true
-    return false;
-  }
-
-
- private:
-  std::shared_ptr<DB> db_;
-  WriteOptions merge_option_;
-  ReadOptions get_option_;
-
-};
-
-
-// The class for unit-testing
-class StringAppendOperatorTest {
- public:
-  StringAppendOperatorTest() {
-    DestroyDB(kDbName, Options());    // Start each test with a fresh DB
-  }
-
-  typedef std::shared_ptr<DB> (* OpenFuncPtr)(char);
-
-  // Allows user to open databases with different configurations.
-  // e.g.: Can open a DB or a TtlDB, etc.
-  static void SetOpenDbFunction(OpenFuncPtr func) {
-    OpenDb = func;
-  }
-
- protected:
-  static OpenFuncPtr OpenDb;
-};
-StringAppendOperatorTest::OpenFuncPtr StringAppendOperatorTest::OpenDb = nullptr;
-
-// THE TEST CASES BEGIN HERE
-
-TEST(StringAppendOperatorTest, IteratorTest) {
-  auto db_ = OpenDb(',');
-  StringLists slists(db_);
-
-  slists.Append("k1", "v1");
-  slists.Append("k1", "v2");
-  slists.Append("k1", "v3");
-
-  slists.Append("k2", "a1");
-  slists.Append("k2", "a2");
-  slists.Append("k2", "a3");
-
-  std::string res;
-  std::unique_ptr<rocksdb::Iterator> it(db_->NewIterator(ReadOptions()));
-  std::string k1("k1");
-  std::string k2("k2");
-  bool first = true;
-  for (it->Seek(k1); it->Valid(); it->Next()) {
-    res = it->value().ToString();
-    if (first) {
-      ASSERT_EQ(res, "v1,v2,v3");
-      first = false;
-    } else {
-      ASSERT_EQ(res, "a1,a2,a3");
-    }
-  }
-  slists.Append("k2", "a4");
-  slists.Append("k1", "v4");
-
-  // Snapshot should still be the same. Should ignore a4 and v4.
-  first = true;
-  for (it->Seek(k1); it->Valid(); it->Next()) {
-    res = it->value().ToString();
-    if (first) {
-      ASSERT_EQ(res, "v1,v2,v3");
-      first = false;
-    } else {
-      ASSERT_EQ(res, "a1,a2,a3");
-    }
-  }
-
-
-  // Should release the snapshot and be aware of the new stuff now
-  it.reset(db_->NewIterator(ReadOptions()));
-  first = true;
-  for (it->Seek(k1); it->Valid(); it->Next()) {
-    res = it->value().ToString();
-    if (first) {
-      ASSERT_EQ(res, "v1,v2,v3,v4");
-      first = false;
-    } else {
-      ASSERT_EQ(res, "a1,a2,a3,a4");
-    }
-  }
-
-  // start from k2 this time.
-  for (it->Seek(k2); it->Valid(); it->Next()) {
-    res = it->value().ToString();
-    if (first) {
-      ASSERT_EQ(res, "v1,v2,v3,v4");
-      first = false;
-    } else {
-      ASSERT_EQ(res, "a1,a2,a3,a4");
-    }
-  }
-
-  slists.Append("k3", "g1");
-
-  it.reset(db_->NewIterator(ReadOptions()));
-  first = true;
-  std::string k3("k3");
-  for(it->Seek(k2); it->Valid(); it->Next()) {
-    res = it->value().ToString();
-    if (first) {
-      ASSERT_EQ(res, "a1,a2,a3,a4");
-      first = false;
-    } else {
-      ASSERT_EQ(res, "g1");
-    }
-  }
-  for(it->Seek(k3); it->Valid(); it->Next()) {
-    res = it->value().ToString();
-    if (first) {
-      // should not be hit
-      ASSERT_EQ(res, "a1,a2,a3,a4");
-      first = false;
-    } else {
-      ASSERT_EQ(res, "g1");
-    }
-  }
-
-}
-
-TEST(StringAppendOperatorTest, SimpleTest) {
-  auto db = OpenDb(',');
-  StringLists slists(db);
-
-  slists.Append("k1", "v1");
-  slists.Append("k1", "v2");
-  slists.Append("k1", "v3");
-
-  std::string res;
-  bool status = slists.Get("k1", &res);
-
-  ASSERT_TRUE(status);
-  ASSERT_EQ(res, "v1,v2,v3");
-}
-
-TEST(StringAppendOperatorTest, SimpleDelimiterTest) {
-  auto db = OpenDb('|');
-  StringLists slists(db);
-
-  slists.Append("k1", "v1");
-  slists.Append("k1", "v2");
-  slists.Append("k1", "v3");
-
-  std::string res;
-  slists.Get("k1", &res);
-  ASSERT_EQ(res, "v1|v2|v3");
-}
-
-TEST(StringAppendOperatorTest, OneValueNoDelimiterTest) {
-  auto db = OpenDb('!');
-  StringLists slists(db);
-
-  slists.Append("random_key", "single_val");
-
-  std::string res;
-  slists.Get("random_key", &res);
-  ASSERT_EQ(res, "single_val");
-}
-
-TEST(StringAppendOperatorTest, VariousKeys) {
-  auto db = OpenDb('\n');
-  StringLists slists(db);
-
-  slists.Append("c", "asdasd");
-  slists.Append("a", "x");
-  slists.Append("b", "y");
-  slists.Append("a", "t");
-  slists.Append("a", "r");
-  slists.Append("b", "2");
-  slists.Append("c", "asdasd");
-
-  std::string a, b, c;
-  bool sa, sb, sc;
-  sa = slists.Get("a", &a);
-  sb = slists.Get("b", &b);
-  sc = slists.Get("c", &c);
-
-  ASSERT_TRUE(sa && sb && sc); // All three keys should have been found
-
-  ASSERT_EQ(a, "x\nt\nr");
-  ASSERT_EQ(b, "y\n2");
-  ASSERT_EQ(c, "asdasd\nasdasd");
-}
-
-// Generate semi random keys/words from a small distribution.
-TEST(StringAppendOperatorTest, RandomMixGetAppend) {
-  auto db = OpenDb(' ');
-  StringLists slists(db);
-
-  // Generate a list of random keys and values
-  const int kWordCount = 15;
-  std::string words[] = {"sdasd", "triejf", "fnjsdfn", "dfjisdfsf", "342839",
-                         "dsuha", "mabuais", "sadajsid", "jf9834hf", "2d9j89",
-                         "dj9823jd", "a", "dk02ed2dh", "$(jd4h984$(*", "mabz"};
-  const int kKeyCount = 6;
-  std::string keys[] = {"dhaiusdhu", "denidw", "daisda", "keykey", "muki",
-                        "shzassdianmd"};
-
-  // Will store a local copy of all data in order to verify correctness
-  std::map<std::string, std::string> parallel_copy;
-
-  // Generate a bunch of random queries (Append and Get)!
-  enum query_t  { APPEND_OP, GET_OP, NUM_OPS };
-  Random randomGen(1337);       //deterministic seed; always get same results!
-
-  const int kNumQueries = 30;
-  for (int q=0; q<kNumQueries; ++q) {
-    // Generate a random query (Append or Get) and random parameters
-    query_t query = (query_t)randomGen.Uniform((int)NUM_OPS);
-    std::string key = keys[randomGen.Uniform((int)kKeyCount)];
-    std::string word = words[randomGen.Uniform((int)kWordCount)];
-
-    // Apply the query and any checks.
-    if (query == APPEND_OP) {
-
-      // Apply the rocksdb test-harness Append defined above
-      slists.Append(key, word);  //apply the rocksdb append
-
-      // Apply the similar "Append" to the parallel copy
-      if (parallel_copy[key].size() > 0) {
-        parallel_copy[key] += " " + word;
-      } else {
-        parallel_copy[key] = word;
-      }
-
-    } else if (query == GET_OP) {
-      // Assumes that a non-existent key just returns <empty>
-      std::string res;
-      slists.Get(key, &res);
-      ASSERT_EQ(res, parallel_copy[key]);
-    }
-
-  }
-
-}
-
-TEST(StringAppendOperatorTest, BIGRandomMixGetAppend) {
-  auto db = OpenDb(' ');
-  StringLists slists(db);
-
-  // Generate a list of random keys and values
-  const int kWordCount = 15;
-  std::string words[] = {"sdasd", "triejf", "fnjsdfn", "dfjisdfsf", "342839",
-                         "dsuha", "mabuais", "sadajsid", "jf9834hf", "2d9j89",
-                         "dj9823jd", "a", "dk02ed2dh", "$(jd4h984$(*", "mabz"};
-  const int kKeyCount = 6;
-  std::string keys[] = {"dhaiusdhu", "denidw", "daisda", "keykey", "muki",
-                        "shzassdianmd"};
-
-  // Will store a local copy of all data in order to verify correctness
-  std::map<std::string, std::string> parallel_copy;
-
-  // Generate a bunch of random queries (Append and Get)!
-  enum query_t  { APPEND_OP, GET_OP, NUM_OPS };
-  Random randomGen(9138204);       // deterministic seed
-
-  const int kNumQueries = 1000;
-  for (int q=0; q<kNumQueries; ++q) {
-    // Generate a random query (Append or Get) and random parameters
-    query_t query = (query_t)randomGen.Uniform((int)NUM_OPS);
-    std::string key = keys[randomGen.Uniform((int)kKeyCount)];
-    std::string word = words[randomGen.Uniform((int)kWordCount)];
-
-    //Apply the query and any checks.
-    if (query == APPEND_OP) {
-
-      // Apply the rocksdb test-harness Append defined above
-      slists.Append(key, word);  //apply the rocksdb append
-
-      // Apply the similar "Append" to the parallel copy
-      if (parallel_copy[key].size() > 0) {
-        parallel_copy[key] += " " + word;
-      } else {
-        parallel_copy[key] = word;
-      }
-
-    } else if (query == GET_OP) {
-      // Assumes that a non-existent key just returns <empty>
-      std::string res;
-      slists.Get(key, &res);
-      ASSERT_EQ(res, parallel_copy[key]);
-    }
-
-  }
-
-}
-
-
-TEST(StringAppendOperatorTest, PersistentVariousKeys) {
-  // Perform the following operations in limited scope
-  {
-    auto db = OpenDb('\n');
-    StringLists slists(db);
-
-    slists.Append("c", "asdasd");
-    slists.Append("a", "x");
-    slists.Append("b", "y");
-    slists.Append("a", "t");
-    slists.Append("a", "r");
-    slists.Append("b", "2");
-    slists.Append("c", "asdasd");
-
-    std::string a, b, c;
-    slists.Get("a", &a);
-    slists.Get("b", &b);
-    slists.Get("c", &c);
-
-    ASSERT_EQ(a, "x\nt\nr");
-    ASSERT_EQ(b, "y\n2");
-    ASSERT_EQ(c, "asdasd\nasdasd");
-  }
-
-  // Reopen the database (the previous changes should persist / be remembered)
-  {
-    auto db = OpenDb('\n');
-    StringLists slists(db);
-
-    slists.Append("c", "bbnagnagsx");
-    slists.Append("a", "sa");
-    slists.Append("b", "df");
-    slists.Append("a", "gh");
-    slists.Append("a", "jk");
-    slists.Append("b", "l;");
-    slists.Append("c", "rogosh");
-
-    // The previous changes should be on disk (L0)
-    // The most recent changes should be in memory (MemTable)
-    // Hence, this will test both Get() paths.
-    std::string a, b, c;
-    slists.Get("a", &a);
-    slists.Get("b", &b);
-    slists.Get("c", &c);
-
-    ASSERT_EQ(a, "x\nt\nr\nsa\ngh\njk");
-    ASSERT_EQ(b, "y\n2\ndf\nl;");
-    ASSERT_EQ(c, "asdasd\nasdasd\nbbnagnagsx\nrogosh");
-  }
-
-  // Reopen the database (the previous changes should persist / be remembered)
-  {
-    auto db = OpenDb('\n');
-    StringLists slists(db);
-
-    // All changes should be on disk. This will test VersionSet Get()
-    std::string a, b, c;
-    slists.Get("a", &a);
-    slists.Get("b", &b);
-    slists.Get("c", &c);
-
-    ASSERT_EQ(a, "x\nt\nr\nsa\ngh\njk");
-    ASSERT_EQ(b, "y\n2\ndf\nl;");
-    ASSERT_EQ(c, "asdasd\nasdasd\nbbnagnagsx\nrogosh");
-  }
-}
-
-TEST(StringAppendOperatorTest, PersistentFlushAndCompaction) {
-  // Perform the following operations in limited scope
-  {
-    auto db = OpenDb('\n');
-    StringLists slists(db);
-    std::string a, b, c;
-    bool success;
-
-    // Append, Flush, Get
-    slists.Append("c", "asdasd");
-    db->Flush(rocksdb::FlushOptions());
-    success = slists.Get("c", &c);
-    ASSERT_TRUE(success);
-    ASSERT_EQ(c, "asdasd");
-
-    // Append, Flush, Append, Get
-    slists.Append("a", "x");
-    slists.Append("b", "y");
-    db->Flush(rocksdb::FlushOptions());
-    slists.Append("a", "t");
-    slists.Append("a", "r");
-    slists.Append("b", "2");
-
-    success = slists.Get("a", &a);
-    assert(success == true);
-    ASSERT_EQ(a, "x\nt\nr");
-
-    success = slists.Get("b", &b);
-    assert(success == true);
-    ASSERT_EQ(b, "y\n2");
-
-    // Append, Get
-    success = slists.Append("c", "asdasd");
-    assert(success);
-    success = slists.Append("b", "monkey");
-    assert(success);
-
-    // I omit the "assert(success)" checks here.
-    slists.Get("a", &a);
-    slists.Get("b", &b);
-    slists.Get("c", &c);
-
-    ASSERT_EQ(a, "x\nt\nr");
-    ASSERT_EQ(b, "y\n2\nmonkey");
-    ASSERT_EQ(c, "asdasd\nasdasd");
-  }
-
-  // Reopen the database (the previous changes should persist / be remembered)
-  {
-    auto db = OpenDb('\n');
-    StringLists slists(db);
-    std::string a, b, c;
-
-    // Get (Quick check for persistence of previous database)
-    slists.Get("a", &a);
-    ASSERT_EQ(a, "x\nt\nr");
-
-    //Append, Compact, Get
-    slists.Append("c", "bbnagnagsx");
-    slists.Append("a", "sa");
-    slists.Append("b", "df");
-    db->CompactRange(nullptr, nullptr);
-    slists.Get("a", &a);
-    slists.Get("b", &b);
-    slists.Get("c", &c);
-    ASSERT_EQ(a, "x\nt\nr\nsa");
-    ASSERT_EQ(b, "y\n2\nmonkey\ndf");
-    ASSERT_EQ(c, "asdasd\nasdasd\nbbnagnagsx");
-
-    // Append, Get
-    slists.Append("a", "gh");
-    slists.Append("a", "jk");
-    slists.Append("b", "l;");
-    slists.Append("c", "rogosh");
-    slists.Get("a", &a);
-    slists.Get("b", &b);
-    slists.Get("c", &c);
-    ASSERT_EQ(a, "x\nt\nr\nsa\ngh\njk");
-    ASSERT_EQ(b, "y\n2\nmonkey\ndf\nl;");
-    ASSERT_EQ(c, "asdasd\nasdasd\nbbnagnagsx\nrogosh");
-
-    // Compact, Get
-    db->CompactRange(nullptr, nullptr);
-    ASSERT_EQ(a, "x\nt\nr\nsa\ngh\njk");
-    ASSERT_EQ(b, "y\n2\nmonkey\ndf\nl;");
-    ASSERT_EQ(c, "asdasd\nasdasd\nbbnagnagsx\nrogosh");
-
-    // Append, Flush, Compact, Get
-    slists.Append("b", "afcg");
-    db->Flush(rocksdb::FlushOptions());
-    db->CompactRange(nullptr, nullptr);
-    slists.Get("b", &b);
-    ASSERT_EQ(b, "y\n2\nmonkey\ndf\nl;\nafcg");
-  }
-}
-
-TEST(StringAppendOperatorTest, SimpleTestNullDelimiter) {
-  auto db = OpenDb('\0');
-  StringLists slists(db);
-
-  slists.Append("k1", "v1");
-  slists.Append("k1", "v2");
-  slists.Append("k1", "v3");
-
-  std::string res;
-  bool status = slists.Get("k1", &res);
-  ASSERT_TRUE(status);
-
-  // Construct the desired string. Default constructor doesn't like '\0' chars.
-  std::string checker("v1,v2,v3");    // Verify that the string is right size.
-  checker[2] = '\0';                  // Use null delimiter instead of comma.
-  checker[5] = '\0';
-  assert(checker.size() == 8);        // Verify it is still the correct size
-
-  // Check that the rocksdb result string matches the desired string
-  assert(res.size() == checker.size());
-  ASSERT_EQ(res, checker);
-}
-
-} // namespace rocksdb
-
-int main(int arc, char** argv) {
-  // Run with regular database
-  {
-    fprintf(stderr, "Running tests with regular db and operator.\n");
-    StringAppendOperatorTest::SetOpenDbFunction(&OpenNormalDb);
-    rocksdb::test::RunAllTests();
-  }
-
-  // Run with TTL
-  {
-    fprintf(stderr, "Running tests with ttl db and generic operator.\n");
-    StringAppendOperatorTest::SetOpenDbFunction(&OpenTtlDb);
-    rocksdb::test::RunAllTests();
-  }
-
-  return 0;
-}
diff --git a/src/rocksdb/utilities/merge_operators/uint64add.cc b/src/rocksdb/utilities/merge_operators/uint64add.cc
deleted file mode 100644
index 9d78651..0000000
--- a/src/rocksdb/utilities/merge_operators/uint64add.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <memory>
-#include "rocksdb/env.h"
-#include "rocksdb/merge_operator.h"
-#include "rocksdb/slice.h"
-#include "util/coding.h"
-#include "utilities/merge_operators.h"
-
-using namespace rocksdb;
-
-namespace { // anonymous namespace
-
-// A 'model' merge operator with uint64 addition semantics
-// Implemented as an AssociativeMergeOperator for simplicity and example.
-class UInt64AddOperator : public AssociativeMergeOperator {
- public:
-  virtual bool Merge(const Slice& key,
-                     const Slice* existing_value,
-                     const Slice& value,
-                     std::string* new_value,
-                     Logger* logger) const override {
-    uint64_t orig_value = 0;
-    if (existing_value){
-      orig_value = DecodeInteger(*existing_value, logger);
-    }
-    uint64_t operand = DecodeInteger(value, logger);
-
-    assert(new_value);
-    new_value->clear();
-    PutFixed64(new_value, orig_value + operand);
-
-    return true;  // Return true always since corruption will be treated as 0
-  }
-
-  virtual const char* Name() const override {
-    return "UInt64AddOperator";
-  }
-
- private:
-  // Takes the string and decodes it into a uint64_t
-  // On error, prints a message and returns 0
-  uint64_t DecodeInteger(const Slice& value, Logger* logger) const {
-    uint64_t result = 0;
-
-    if (value.size() == sizeof(uint64_t)) {
-      result = DecodeFixed64(value.data());
-    } else if (logger != nullptr) {
-      // If value is corrupted, treat it as 0
-      Log(logger, "uint64 value corruption, size: %zu > %zu",
-          value.size(), sizeof(uint64_t));
-    }
-
-    return result;
-  }
-
-};
-
-}
-
-namespace rocksdb {
-
-std::shared_ptr<MergeOperator> MergeOperators::CreateUInt64AddOperator() {
-  return std::make_shared<UInt64AddOperator>();
-}
-
-}
diff --git a/src/rocksdb/utilities/redis/README b/src/rocksdb/utilities/redis/README
deleted file mode 100644
index 8b17bc0..0000000
--- a/src/rocksdb/utilities/redis/README
+++ /dev/null
@@ -1,14 +0,0 @@
-This folder defines a REDIS-style interface for Rocksdb.
-Right now it is written as a simple tag-on in the rocksdb::RedisLists class.
-It implements Redis Lists, and supports only the "non-blocking operations".
-
-Internally, the set of lists are stored in a rocksdb database, mapping keys to
-values. Each "value" is the list itself, storing a sequence of "elements".
-Each element is stored as a 32-bit-integer, followed by a sequence of bytes.
-The 32-bit-integer represents the length of the element (that is, the number
-of bytes that follow). And then that many bytes follow.
-
-
-NOTE: This README file may be old. See the actual redis_lists.cc file for
-definitive details on the implementation. There should be a header at the top
-of that file, explaining a bit of the implementation details.
diff --git a/src/rocksdb/utilities/redis/redis_list_exception.h b/src/rocksdb/utilities/redis/redis_list_exception.h
deleted file mode 100644
index 0b0f376..0000000
--- a/src/rocksdb/utilities/redis/redis_list_exception.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * A simple structure for exceptions in RedisLists.
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook
- */
-
-#ifndef ROCKSDB_LITE
-#pragma once
-#include <exception>
-
-namespace rocksdb {
-
-class RedisListException: public std::exception {
- public:
-  const char* what() const throw() {
-    return "Invalid operation or corrupt data in Redis List.";
-  }
-};
-
-} // namespace rocksdb
-#endif
diff --git a/src/rocksdb/utilities/redis/redis_list_iterator.h b/src/rocksdb/utilities/redis/redis_list_iterator.h
deleted file mode 100644
index b776ada..0000000
--- a/src/rocksdb/utilities/redis/redis_list_iterator.h
+++ /dev/null
@@ -1,310 +0,0 @@
-// Copyright 2013 Facebook
-/**
- * RedisListIterator:
- * An abstraction over the "list" concept (e.g.: for redis lists).
- * Provides functionality to read, traverse, edit, and write these lists.
- *
- * Upon construction, the RedisListIterator is given a block of list data.
- * Internally, it stores a pointer to the data and a pointer to current item.
- * It also stores a "result" list that will be mutated over time.
- *
- * Traversal and mutation are done by "forward iteration".
- * The Push() and Skip() methods will advance the iterator to the next item.
- * However, Push() will also "write the current item to the result".
- * Skip() will simply move to next item, causing current item to be dropped.
- *
- * Upon completion, the result (accessible by WriteResult()) will be saved.
- * All "skipped" items will be gone; all "pushed" items will remain.
- *
- * @throws Any of the operations may throw a RedisListException if an invalid
- *          operation is performed or if the data is found to be corrupt.
- *
- * @notes By default, if WriteResult() is called part-way through iteration,
- *        it will automatically advance the iterator to the end, and Keep()
- *        all items that haven't been traversed yet. This may be subject
- *        to review.
- *
- * @notes Can access the "current" item via GetCurrent(), and other
- *        list-specific information such as Length().
- *
- * @notes The internal representation is due to change at any time. Presently,
- *        the list is represented as follows:
- *          - 32-bit integer header: the number of items in the list
- *          - For each item:
- *              - 32-bit int (n): the number of bytes representing this item
- *              - n bytes of data: the actual data.
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- */
-
-#ifndef ROCKSDB_LITE
-#pragma once
-
-#include <string>
-
-#include "redis_list_exception.h"
-#include "rocksdb/slice.h"
-#include "util/coding.h"
-
-namespace rocksdb {
-
-/// An abstraction over the "list" concept.
-/// All operations may throw a RedisListException
-class RedisListIterator {
- public:
-  /// Construct a redis-list-iterator based on data.
-  /// If the data is non-empty, it must formatted according to @notes above.
-  ///
-  /// If the data is valid, we can assume the following invariant(s):
-  ///  a) length_, num_bytes_ are set correctly.
-  ///  b) cur_byte_ always refers to the start of the current element,
-  ///       just before the bytes that specify element length.
-  ///  c) cur_elem_ is always the index of the current element.
-  ///  d) cur_elem_length_ is always the number of bytes in current element,
-  ///       excluding the 4-byte header itself.
-  ///  e) result_ will always contain data_[0..cur_byte_) and a header
-  ///  f) Whenever corrupt data is encountered or an invalid operation is
-  ///      attempted, a RedisListException will immediately be thrown.
-  RedisListIterator(const std::string& list_data)
-      : data_(list_data.data()),
-        num_bytes_(list_data.size()),
-        cur_byte_(0),
-        cur_elem_(0),
-        cur_elem_length_(0),
-        length_(0),
-        result_() {
-
-    // Initialize the result_ (reserve enough space for header)
-    InitializeResult();
-
-    // Parse the data only if it is not empty.
-    if (num_bytes_ == 0) {
-      return;
-    }
-
-    // If non-empty, but less than 4 bytes, data must be corrupt
-    if (num_bytes_ < sizeof(length_)) {
-      ThrowError("Corrupt header.");    // Will break control flow
-    }
-
-    // Good. The first bytes specify the number of elements
-    length_ = DecodeFixed32(data_);
-    cur_byte_ = sizeof(length_);
-
-    // If we have at least one element, point to that element.
-    // Also, read the first integer of the element (specifying the size),
-    //   if possible.
-    if (length_ > 0) {
-      if (cur_byte_ + sizeof(cur_elem_length_) <= num_bytes_) {
-        cur_elem_length_ = DecodeFixed32(data_+cur_byte_);
-      } else {
-        ThrowError("Corrupt data for first element.");
-      }
-    }
-
-    // At this point, we are fully set-up.
-    // The invariants described in the header should now be true.
-  }
-
-  /// Reserve some space for the result_.
-  /// Equivalent to result_.reserve(bytes).
-  void Reserve(int bytes) {
-    result_.reserve(bytes);
-  }
-
-  /// Go to next element in data file.
-  /// Also writes the current element to result_.
-  RedisListIterator& Push() {
-    WriteCurrentElement();
-    MoveNext();
-    return *this;
-  }
-
-  /// Go to next element in data file.
-  /// Drops/skips the current element. It will not be written to result_.
-  RedisListIterator& Skip() {
-    MoveNext();
-    --length_;          // One less item
-    --cur_elem_;        // We moved one forward, but index did not change
-    return *this;
-  }
-
-  /// Insert elem into the result_ (just BEFORE the current element / byte)
-  /// Note: if Done() (i.e.: iterator points to end), this will append elem.
-  void InsertElement(const Slice& elem) {
-    // Ensure we are in a valid state
-    CheckErrors();
-
-    const int kOrigSize = result_.size();
-    result_.resize(kOrigSize + SizeOf(elem));
-    EncodeFixed32(result_.data() + kOrigSize, elem.size());
-    memcpy(result_.data() + kOrigSize + sizeof(uint32_t),
-           elem.data(),
-           elem.size());
-    ++length_;
-    ++cur_elem_;
-  }
-
-  /// Access the current element, and save the result into *curElem
-  void GetCurrent(Slice* curElem) {
-    // Ensure we are in a valid state
-    CheckErrors();
-
-    // Ensure that we are not past the last element.
-    if (Done()) {
-      ThrowError("Invalid dereferencing.");
-    }
-
-    // Dereference the element
-    *curElem = Slice(data_+cur_byte_+sizeof(cur_elem_length_),
-                     cur_elem_length_);
-  }
-
-  // Number of elements
-  int Length() const {
-    return length_;
-  }
-
-  // Number of bytes in the final representation (i.e: WriteResult().size())
-  int Size() const {
-    // result_ holds the currently written data
-    // data_[cur_byte..num_bytes-1] is the remainder of the data
-    return result_.size() + (num_bytes_ - cur_byte_);
-  }
-
-  // Reached the end?
-  bool Done() const {
-    return cur_byte_ >= num_bytes_ || cur_elem_ >= length_;
-  }
-
-  /// Returns a string representing the final, edited, data.
-  /// Assumes that all bytes of data_ in the range [0,cur_byte_) have been read
-  ///  and that result_ contains this data.
-  /// The rest of the data must still be written.
-  /// So, this method ADVANCES THE ITERATOR TO THE END before writing.
-  Slice WriteResult() {
-    CheckErrors();
-
-    // The header should currently be filled with dummy data (0's)
-    // Correctly update the header.
-    // Note, this is safe since result_ is a vector (guaranteed contiguous)
-    EncodeFixed32(&result_[0],length_);
-
-    // Append the remainder of the data to the result.
-    result_.insert(result_.end(),data_+cur_byte_, data_ +num_bytes_);
-
-    // Seek to end of file
-    cur_byte_ = num_bytes_;
-    cur_elem_ = length_;
-    cur_elem_length_ = 0;
-
-    // Return the result
-    return Slice(result_.data(),result_.size());
-  }
-
- public: // Static public functions
-
-  /// An upper-bound on the amount of bytes needed to store this element.
-  /// This is used to hide representation information from the client.
-  /// E.G. This can be used to compute the bytes we want to Reserve().
-  static uint32_t SizeOf(const Slice& elem) {
-    // [Integer Length . Data]
-    return sizeof(uint32_t) + elem.size();
-  }
-
- private: // Private functions
-
-  /// Initializes the result_ string.
-  /// It will fill the first few bytes with 0's so that there is
-  ///  enough space for header information when we need to write later.
-  /// Currently, "header information" means: the length (number of elements)
-  /// Assumes that result_ is empty to begin with
-  void InitializeResult() {
-    assert(result_.empty());            // Should always be true.
-    result_.resize(sizeof(uint32_t),0); // Put a block of 0's as the header
-  }
-
-  /// Go to the next element (used in Push() and Skip())
-  void MoveNext() {
-    CheckErrors();
-
-    // Check to make sure we are not already in a finished state
-    if (Done()) {
-      ThrowError("Attempting to iterate past end of list.");
-    }
-
-    // Move forward one element.
-    cur_byte_ += sizeof(cur_elem_length_) + cur_elem_length_;
-    ++cur_elem_;
-
-    // If we are at the end, finish
-    if (Done()) {
-      cur_elem_length_ = 0;
-      return;
-    }
-
-    // Otherwise, we should be able to read the new element's length
-    if (cur_byte_ + sizeof(cur_elem_length_) > num_bytes_) {
-      ThrowError("Corrupt element data.");
-    }
-
-    // Set the new element's length
-    cur_elem_length_ = DecodeFixed32(data_+cur_byte_);
-
-    return;
-  }
-
-  /// Append the current element (pointed to by cur_byte_) to result_
-  /// Assumes result_ has already been reserved appropriately.
-  void WriteCurrentElement() {
-    // First verify that the iterator is still valid.
-    CheckErrors();
-    if (Done()) {
-      ThrowError("Attempting to write invalid element.");
-    }
-
-    // Append the cur element.
-    result_.insert(result_.end(),
-                   data_+cur_byte_,
-                   data_+cur_byte_+ sizeof(uint32_t) + cur_elem_length_);
-  }
-
-  /// Will ThrowError() if neccessary.
-  /// Checks for common/ubiquitous errors that can arise after most operations.
-  /// This method should be called before any reading operation.
-  /// If this function succeeds, then we are guaranteed to be in a valid state.
-  /// Other member functions should check for errors and ThrowError() also
-  ///  if an error occurs that is specific to it even while in a valid state.
-  void CheckErrors() {
-    // Check if any crazy thing has happened recently
-    if ((cur_elem_ > length_) ||                              // Bad index
-        (cur_byte_ > num_bytes_) ||                           // No more bytes
-        (cur_byte_ + cur_elem_length_ > num_bytes_) ||        // Item too large
-        (cur_byte_ == num_bytes_ && cur_elem_ != length_) ||  // Too many items
-        (cur_elem_ == length_ && cur_byte_ != num_bytes_)) {  // Too many bytes
-      ThrowError("Corrupt data.");
-    }
-  }
-
-  /// Will throw an exception based on the passed-in message.
-  /// This function is guaranteed to STOP THE CONTROL-FLOW.
-  /// (i.e.: you do not have to call "return" after calling ThrowError)
-  void ThrowError(const char* const msg = NULL) {
-    // TODO: For now we ignore the msg parameter. This can be expanded later.
-    throw RedisListException();
-  }
-
- private:
-  const char* const data_;      // A pointer to the data (the first byte)
-  const uint32_t num_bytes_;    // The number of bytes in this list
-
-  uint32_t cur_byte_;           // The current byte being read
-  uint32_t cur_elem_;           // The current element being read
-  uint32_t cur_elem_length_;    // The number of bytes in current element
-
-  uint32_t length_;             // The number of elements in this list
-  std::vector<char> result_;    // The output data
-};
-
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/redis/redis_lists.cc b/src/rocksdb/utilities/redis/redis_lists.cc
deleted file mode 100644
index 2b38a2d..0000000
--- a/src/rocksdb/utilities/redis/redis_lists.cc
+++ /dev/null
@@ -1,552 +0,0 @@
-// Copyright 2013 Facebook
-/**
- * A (persistent) Redis API built using the rocksdb backend.
- * Implements Redis Lists as described on: http://redis.io/commands#list
- *
- * @throws All functions may throw a RedisListException on error/corruption.
- *
- * @notes Internally, the set of lists is stored in a rocksdb database,
- *        mapping keys to values. Each "value" is the list itself, storing
- *        some kind of internal representation of the data. All the
- *        representation details are handled by the RedisListIterator class.
- *        The present file should be oblivious to the representation details,
- *        handling only the client (Redis) API, and the calls to rocksdb.
- *
- * @TODO  Presently, all operations take at least O(NV) time where
- *        N is the number of elements in the list, and V is the average
- *        number of bytes per value in the list. So maybe, with merge operator
- *        we can improve this to an optimal O(V) amortized time, since we
- *        wouldn't have to read and re-write the entire list.
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- */
-
-#ifndef ROCKSDB_LITE
-#include "redis_lists.h"
-
-#include <iostream>
-#include <memory>
-#include <cmath>
-
-#include "rocksdb/slice.h"
-#include "util/coding.h"
-
-namespace rocksdb
-{
-
-/// Constructors
-
-RedisLists::RedisLists(const std::string& db_path,
-                       Options options, bool destructive)
-    : put_option_(),
-      get_option_() {
-
-  // Store the name of the database
-  db_name_ = db_path;
-
-  // If destructive, destroy the DB before re-opening it.
-  if (destructive) {
-    DestroyDB(db_name_, Options());
-  }
-
-  // Now open and deal with the db
-  DB* db;
-  Status s = DB::Open(options, db_name_, &db);
-  if (!s.ok()) {
-    std::cerr << "ERROR " << s.ToString() << std::endl;
-    assert(false);
-  }
-
-  db_ = std::unique_ptr<DB>(db);
-}
-
-
-/// Accessors
-
-// Number of elements in the list associated with key
-//   : throws RedisListException
-int RedisLists::Length(const std::string& key) {
-  // Extract the string data representing the list.
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Return the length
-  RedisListIterator it(data);
-  return it.Length();
-}
-
-// Get the element at the specified index in the (list: key)
-// Returns <empty> ("") on out-of-bounds
-//   : throws RedisListException
-bool RedisLists::Index(const std::string& key, int32_t index,
-                       std::string* result) {
-  // Extract the string data representing the list.
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Handle REDIS negative indices (from the end); fast iff Length() takes O(1)
-  if (index < 0) {
-    index = Length(key) - (-index);  //replace (-i) with (N-i).
-  }
-
-  // Iterate through the list until the desired index is found.
-  int curIndex = 0;
-  RedisListIterator it(data);
-  while(curIndex < index && !it.Done()) {
-    ++curIndex;
-    it.Skip();
-  }
-
-  // If we actually found the index
-  if (curIndex == index && !it.Done()) {
-    Slice elem;
-    it.GetCurrent(&elem);
-    if (result != NULL) {
-      *result = elem.ToString();
-    }
-
-    return true;
-  } else {
-    return false;
-  }
-}
-
-// Return a truncated version of the list.
-// First, negative values for first/last are interpreted as "end of list".
-// So, if first == -1, then it is re-set to index: (Length(key) - 1)
-// Then, return exactly those indices i such that first <= i <= last.
-//   : throws RedisListException
-std::vector<std::string> RedisLists::Range(const std::string& key,
-                                           int32_t first, int32_t last) {
-  // Extract the string data representing the list.
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Handle negative bounds (-1 means last element, etc.)
-  int listLen = Length(key);
-  if (first < 0) {
-    first = listLen - (-first);           // Replace (-x) with (N-x)
-  }
-  if (last < 0) {
-    last = listLen - (-last);
-  }
-
-  // Verify bounds (and truncate the range so that it is valid)
-  first = std::max(first, 0);
-  last = std::min(last, listLen-1);
-  int len = std::max(last-first+1, 0);
-
-  // Initialize the resulting list
-  std::vector<std::string> result(len);
-
-  // Traverse the list and update the vector
-  int curIdx = 0;
-  Slice elem;
-  for (RedisListIterator it(data); !it.Done() && curIdx<=last; it.Skip()) {
-    if (first <= curIdx && curIdx <= last) {
-      it.GetCurrent(&elem);
-      result[curIdx-first].assign(elem.data(),elem.size());
-    }
-
-    ++curIdx;
-  }
-
-  // Return the result. Might be empty
-  return result;
-}
-
-// Print the (list: key) out to stdout. For debugging mostly. Public for now.
-void RedisLists::Print(const std::string& key) {
-  // Extract the string data representing the list.
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Iterate through the list and print the items
-  Slice elem;
-  for (RedisListIterator it(data); !it.Done(); it.Skip()) {
-    it.GetCurrent(&elem);
-    std::cout << "ITEM " << elem.ToString() << std::endl;
-  }
-
-  //Now print the byte data
-  RedisListIterator it(data);
-  std::cout << "==Printing data==" << std::endl;
-  std::cout << data.size() << std::endl;
-  std::cout << it.Size() << " " << it.Length() << std::endl;
-  Slice result = it.WriteResult();
-  std::cout << result.data() << std::endl;
-  if (true) {
-    std::cout << "size: " << result.size() << std::endl;
-    const char* val = result.data();
-    for(int i=0; i<(int)result.size(); ++i) {
-      std::cout << (int)val[i] << " " << (val[i]>=32?val[i]:' ') << std::endl;
-    }
-    std::cout << std::endl;
-  }
-}
-
-/// Insert/Update Functions
-/// Note: The "real" insert function is private. See below.
-
-// InsertBefore and InsertAfter are simply wrappers around the Insert function.
-int RedisLists::InsertBefore(const std::string& key, const std::string& pivot,
-                             const std::string& value) {
-  return Insert(key, pivot, value, false);
-}
-
-int RedisLists::InsertAfter(const std::string& key, const std::string& pivot,
-                            const std::string& value) {
-  return Insert(key, pivot, value, true);
-}
-
-// Prepend value onto beginning of (list: key)
-//   : throws RedisListException
-int RedisLists::PushLeft(const std::string& key, const std::string& value) {
-  // Get the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Construct the result
-  RedisListIterator it(data);
-  it.Reserve(it.Size() + it.SizeOf(value));
-  it.InsertElement(value);
-
-  // Push the data back to the db and return the length
-  db_->Put(put_option_, key, it.WriteResult());
-  return it.Length();
-}
-
-// Append value onto end of (list: key)
-// TODO: Make this O(1) time. Might require MergeOperator.
-//   : throws RedisListException
-int RedisLists::PushRight(const std::string& key, const std::string& value) {
-  // Get the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Create an iterator to the data and seek to the end.
-  RedisListIterator it(data);
-  it.Reserve(it.Size() + it.SizeOf(value));
-  while (!it.Done()) {
-    it.Push();    // Write each element as we go
-  }
-
-  // Insert the new element at the current position (the end)
-  it.InsertElement(value);
-
-  // Push it back to the db, and return length
-  db_->Put(put_option_, key, it.WriteResult());
-  return it.Length();
-}
-
-// Set (list: key)[idx] = val. Return true on success, false on fail.
-//   : throws RedisListException
-bool RedisLists::Set(const std::string& key, int32_t index,
-                     const std::string& value) {
-  // Get the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Handle negative index for REDIS (meaning -index from end of list)
-  if (index < 0) {
-    index = Length(key) - (-index);
-  }
-
-  // Iterate through the list until we find the element we want
-  int curIndex = 0;
-  RedisListIterator it(data);
-  it.Reserve(it.Size() + it.SizeOf(value));  // Over-estimate is fine
-  while(curIndex < index && !it.Done()) {
-    it.Push();
-    ++curIndex;
-  }
-
-  // If not found, return false (this occurs when index was invalid)
-  if (it.Done() || curIndex != index) {
-    return false;
-  }
-
-  // Write the new element value, and drop the previous element value
-  it.InsertElement(value);
-  it.Skip();
-
-  // Write the data to the database
-  // Check status, since it needs to return true/false guarantee
-  Status s = db_->Put(put_option_, key, it.WriteResult());
-
-  // Success
-  return s.ok();
-}
-
-/// Delete / Remove / Pop functions
-
-// Trim (list: key) so that it will only contain the indices from start..stop
-//  Invalid indices will not generate an error, just empty,
-//  or the portion of the list that fits in this interval
-//   : throws RedisListException
-bool RedisLists::Trim(const std::string& key, int32_t start, int32_t stop) {
-  // Get the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Handle negative indices in REDIS
-  int listLen = Length(key);
-  if (start < 0) {
-    start = listLen - (-start);
-  }
-  if (stop < 0) {
-    stop = listLen - (-stop);
-  }
-
-  // Truncate bounds to only fit in the list
-  start = std::max(start, 0);
-  stop = std::min(stop, listLen-1);
-
-  // Construct an iterator for the list. Drop all undesired elements.
-  int curIndex = 0;
-  RedisListIterator it(data);
-  it.Reserve(it.Size());          // Over-estimate
-  while(!it.Done()) {
-    // If not within the range, just skip the item (drop it).
-    // Otherwise, continue as usual.
-    if (start <= curIndex && curIndex <= stop) {
-      it.Push();
-    } else {
-      it.Skip();
-    }
-
-    // Increment the current index
-    ++curIndex;
-  }
-
-  // Write the (possibly empty) result to the database
-  Status s = db_->Put(put_option_, key, it.WriteResult());
-
-  // Return true as long as the write succeeded
-  return s.ok();
-}
-
-// Return and remove the first element in the list (or "" if empty)
-//   : throws RedisListException
-bool RedisLists::PopLeft(const std::string& key, std::string* result) {
-  // Get the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Point to first element in the list (if it exists), and get its value/size
-  RedisListIterator it(data);
-  if (it.Length() > 0) {            // Proceed only if list is non-empty
-    Slice elem;
-    it.GetCurrent(&elem);           // Store the value of the first element
-    it.Reserve(it.Size() - it.SizeOf(elem));
-    it.Skip();                      // DROP the first item and move to next
-
-    // Update the db
-    db_->Put(put_option_, key, it.WriteResult());
-
-    // Return the value
-    if (result != NULL) {
-      *result = elem.ToString();
-    }
-    return true;
-  } else {
-    return false;
-  }
-}
-
-// Remove and return the last element in the list (or "" if empty)
-// TODO: Make this O(1). Might require MergeOperator.
-//   : throws RedisListException
-bool RedisLists::PopRight(const std::string& key, std::string* result) {
-  // Extract the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Construct an iterator to the data and move to last element
-  RedisListIterator it(data);
-  it.Reserve(it.Size());
-  int len = it.Length();
-  int curIndex = 0;
-  while(curIndex < (len-1) && !it.Done()) {
-    it.Push();
-    ++curIndex;
-  }
-
-  // Extract and drop/skip the last element
-  if (curIndex == len-1) {
-    assert(!it.Done());         // Sanity check. Should not have ended here.
-
-    // Extract and pop the element
-    Slice elem;
-    it.GetCurrent(&elem);       // Save value of element.
-    it.Skip();                  // Skip the element
-
-    // Write the result to the database
-    db_->Put(put_option_, key, it.WriteResult());
-
-    // Return the value
-    if (result != NULL) {
-      *result = elem.ToString();
-    }
-    return true;
-  } else {
-    // Must have been an empty list
-    assert(it.Done() && len==0 && curIndex == 0);
-    return false;
-  }
-}
-
-// Remove the (first or last) "num" occurrences of value in (list: key)
-//   : throws RedisListException
-int RedisLists::Remove(const std::string& key, int32_t num,
-                       const std::string& value) {
-  // Negative num ==> RemoveLast; Positive num ==> Remove First
-  if (num < 0) {
-    return RemoveLast(key, -num, value);
-  } else if (num > 0) {
-    return RemoveFirst(key, num, value);
-  } else {
-    return RemoveFirst(key, Length(key), value);
-  }
-}
-
-// Remove the first "num" occurrences of value in (list: key).
-//   : throws RedisListException
-int RedisLists::RemoveFirst(const std::string& key, int32_t num,
-                            const std::string& value) {
-  // Ensure that the number is positive
-  assert(num >= 0);
-
-  // Extract the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Traverse the list, appending all but the desired occurrences of value
-  int numSkipped = 0;         // Keep track of the number of times value is seen
-  Slice elem;
-  RedisListIterator it(data);
-  it.Reserve(it.Size());
-  while (!it.Done()) {
-    it.GetCurrent(&elem);
-
-    if (elem == value && numSkipped < num) {
-      // Drop this item if desired
-      it.Skip();
-      ++numSkipped;
-    } else {
-      // Otherwise keep the item and proceed as normal
-      it.Push();
-    }
-  }
-
-  // Put the result back to the database
-  db_->Put(put_option_, key, it.WriteResult());
-
-  // Return the number of elements removed
-  return numSkipped;
-}
-
-
-// Remove the last "num" occurrences of value in (list: key).
-// TODO: I traverse the list 2x. Make faster. Might require MergeOperator.
-//   : throws RedisListException
-int RedisLists::RemoveLast(const std::string& key, int32_t num,
-                           const std::string& value) {
-  // Ensure that the number is positive
-  assert(num >= 0);
-
-  // Extract the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Temporary variable to hold the "current element" in the blocks below
-  Slice elem;
-
-  // Count the total number of occurrences of value
-  int totalOccs = 0;
-  for (RedisListIterator it(data); !it.Done(); it.Skip()) {
-    it.GetCurrent(&elem);
-    if (elem == value) {
-      ++totalOccs;
-    }
-  }
-
-  // Construct an iterator to the data. Reserve enough space for the result.
-  RedisListIterator it(data);
-  int bytesRemoved = std::min(num,totalOccs)*it.SizeOf(value);
-  it.Reserve(it.Size() - bytesRemoved);
-
-  // Traverse the list, appending all but the desired occurrences of value.
-  // Note: "Drop the last k occurrences" is equivalent to
-  //  "keep only the first n-k occurrences", where n is total occurrences.
-  int numKept = 0;          // Keep track of the number of times value is kept
-  while(!it.Done()) {
-    it.GetCurrent(&elem);
-
-    // If we are within the deletion range and equal to value, drop it.
-    // Otherwise, append/keep/push it.
-    if (elem == value) {
-      if (numKept < totalOccs - num) {
-        it.Push();
-        ++numKept;
-      } else {
-        it.Skip();
-      }
-    } else {
-      // Always append the others
-      it.Push();
-    }
-  }
-
-  // Put the result back to the database
-  db_->Put(put_option_, key, it.WriteResult());
-
-  // Return the number of elements removed
-  return totalOccs - numKept;
-}
-
-/// Private functions
-
-// Insert element value into (list: key), right before/after
-//  the first occurrence of pivot
-//   : throws RedisListException
-int RedisLists::Insert(const std::string& key, const std::string& pivot,
-                       const std::string& value, bool insert_after) {
-  // Get the original list data
-  std::string data;
-  db_->Get(get_option_, key, &data);
-
-  // Construct an iterator to the data and reserve enough space for result.
-  RedisListIterator it(data);
-  it.Reserve(it.Size() + it.SizeOf(value));
-
-  // Iterate through the list until we find the element we want
-  Slice elem;
-  bool found = false;
-  while(!it.Done() && !found) {
-    it.GetCurrent(&elem);
-
-    // When we find the element, insert the element and mark found
-    if (elem == pivot) {                // Found it!
-      found = true;
-      if (insert_after == true) {       // Skip one more, if inserting after it
-        it.Push();
-      }
-      it.InsertElement(value);
-    } else {
-      it.Push();
-    }
-
-  }
-
-  // Put the data (string) into the database
-  if (found) {
-    db_->Put(put_option_, key, it.WriteResult());
-  }
-
-  // Returns the new (possibly unchanged) length of the list
-  return it.Length();
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/redis/redis_lists.h b/src/rocksdb/utilities/redis/redis_lists.h
deleted file mode 100644
index 6c8b955..0000000
--- a/src/rocksdb/utilities/redis/redis_lists.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * A (persistent) Redis API built using the rocksdb backend.
- * Implements Redis Lists as described on: http://redis.io/commands#list
- *
- * @throws All functions may throw a RedisListException
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- * Copyright 2013 Facebook
- */
-
-#ifndef ROCKSDB_LITE
-#pragma once
-
-#include <string>
-#include "rocksdb/db.h"
-#include "redis_list_iterator.h"
-#include "redis_list_exception.h"
-
-namespace rocksdb {
-
-/// The Redis functionality (see http://redis.io/commands#list)
-/// All functions may THROW a RedisListException
-class RedisLists {
- public: // Constructors / Destructors
-  /// Construct a new RedisLists database, with name/path of db.
-  /// Will clear the database on open iff destructive is true (default false).
-  /// Otherwise, it will restore saved changes.
-  /// May throw RedisListException
-  RedisLists(const std::string& db_path,
-             Options options, bool destructive = false);
-
- public:  // Accessors
-  /// The number of items in (list: key)
-  int Length(const std::string& key);
-
-  /// Search the list for the (index)'th item (0-based) in (list:key)
-  /// A negative index indicates: "from end-of-list"
-  /// If index is within range: return true, and return the value in *result.
-  /// If (index < -length OR index>=length), then index is out of range:
-  ///   return false (and *result is left unchanged)
-  /// May throw RedisListException
-  bool Index(const std::string& key, int32_t index,
-             std::string* result);
-
-  /// Return (list: key)[first..last] (inclusive)
-  /// May throw RedisListException
-  std::vector<std::string> Range(const std::string& key,
-                                 int32_t first, int32_t last);
-
-  /// Prints the entire (list: key), for debugging.
-  void Print(const std::string& key);
-
- public: // Insert/Update
-  /// Insert value before/after pivot in (list: key). Return the length.
-  /// May throw RedisListException
-  int InsertBefore(const std::string& key, const std::string& pivot,
-                   const std::string& value);
-  int InsertAfter(const std::string& key, const std::string& pivot,
-                  const std::string& value);
-
-  /// Push / Insert value at beginning/end of the list. Return the length.
-  /// May throw RedisListException
-  int PushLeft(const std::string& key, const std::string& value);
-  int PushRight(const std::string& key, const std::string& value);
-
-  /// Set (list: key)[idx] = val. Return true on success, false on fail
-  /// May throw RedisListException
-  bool Set(const std::string& key, int32_t index, const std::string& value);
-
- public: // Delete / Remove / Pop / Trim
-  /// Trim (list: key) so that it will only contain the indices from start..stop
-  /// Returns true on success
-  /// May throw RedisListException
-  bool Trim(const std::string& key, int32_t start, int32_t stop);
-
-  /// If list is empty, return false and leave *result unchanged.
-  /// Else, remove the first/last elem, store it in *result, and return true
-  bool PopLeft(const std::string& key, std::string* result);  // First
-  bool PopRight(const std::string& key, std::string* result); // Last
-
-  /// Remove the first (or last) num occurrences of value from the list (key)
-  /// Return the number of elements removed.
-  /// May throw RedisListException
-  int Remove(const std::string& key, int32_t num,
-             const std::string& value);
-  int RemoveFirst(const std::string& key, int32_t num,
-                  const std::string& value);
-  int RemoveLast(const std::string& key, int32_t num,
-                 const std::string& value);
-
- private: // Private Functions
-  /// Calls InsertBefore or InsertAfter
-  int Insert(const std::string& key, const std::string& pivot,
-             const std::string& value, bool insert_after);
- private:
-  std::string db_name_;       // The actual database name/path
-  WriteOptions put_option_;
-  ReadOptions get_option_;
-
-  /// The backend rocksdb database.
-  /// Map : key --> list
-  ///       where a list is a sequence of elements
-  ///       and an element is a 4-byte integer (n), followed by n bytes of data
-  std::unique_ptr<DB> db_;
-};
-
-} // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/redis/redis_lists_test.cc b/src/rocksdb/utilities/redis/redis_lists_test.cc
deleted file mode 100644
index b05c6c7..0000000
--- a/src/rocksdb/utilities/redis/redis_lists_test.cc
+++ /dev/null
@@ -1,884 +0,0 @@
-//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
-/**
- * A test harness for the Redis API built on rocksdb.
- *
- * USAGE: Build with: "make redis_test" (in rocksdb directory).
- *        Run unit tests with: "./redis_test"
- *        Manual/Interactive user testing: "./redis_test -m"
- *        Manual user testing + restart database: "./redis_test -m -d"
- *
- * TODO:  Add LARGE random test cases to verify efficiency and scalability
- *
- * @author Deon Nicholas (dnicholas at fb.com)
- */
-
-
-#include <iostream>
-#include <cctype>
-
-#include "redis_lists.h"
-#include "util/testharness.h"
-#include "util/random.h"
-
-using namespace rocksdb;
-using namespace std;
-
-namespace rocksdb {
-
-class RedisListsTest {
- public:
-  static const string kDefaultDbName;
-  static Options options;
-
-  RedisListsTest() {
-    options.create_if_missing = true;
-  }
-};
-
-const string RedisListsTest::kDefaultDbName = "/tmp/redisdefaultdb/";
-Options RedisListsTest::options = Options();
-
-// operator== and operator<< are defined below for vectors (lists)
-// Needed for ASSERT_EQ
-
-namespace {
-void AssertListEq(const std::vector<std::string>& result,
-                  const std::vector<std::string>& expected_result) {
-  ASSERT_EQ(result.size(), expected_result.size());
-  for (size_t i = 0; i < result.size(); ++i) {
-    ASSERT_EQ(result[i], expected_result[i]);
-  }
-}
-}  // namespace
-
-// PushRight, Length, Index, Range
-TEST(RedisListsTest, SimpleTest) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Simple PushRight (should return the new length each time)
-  ASSERT_EQ(redis.PushRight("k1", "v1"), 1);
-  ASSERT_EQ(redis.PushRight("k1", "v2"), 2);
-  ASSERT_EQ(redis.PushRight("k1", "v3"), 3);
-
-  // Check Length and Index() functions
-  ASSERT_EQ(redis.Length("k1"), 3);        // Check length
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "v1");   // Check valid indices
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "v2");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "v3");
-
-  // Check range function and vectors
-  std::vector<std::string> result = redis.Range("k1", 0, 2);   // Get the list
-  std::vector<std::string> expected_result(3);
-  expected_result[0] = "v1";
-  expected_result[1] = "v2";
-  expected_result[2] = "v3";
-  AssertListEq(result, expected_result);
-}
-
-// PushLeft, Length, Index, Range
-TEST(RedisListsTest, SimpleTest2) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Simple PushRight
-  ASSERT_EQ(redis.PushLeft("k1", "v3"), 1);
-  ASSERT_EQ(redis.PushLeft("k1", "v2"), 2);
-  ASSERT_EQ(redis.PushLeft("k1", "v1"), 3);
-
-  // Check Length and Index() functions
-  ASSERT_EQ(redis.Length("k1"), 3);        // Check length
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "v1");   // Check valid indices
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "v2");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "v3");
-
-  // Check range function and vectors
-  std::vector<std::string> result = redis.Range("k1", 0, 2);   // Get the list
-  std::vector<std::string> expected_result(3);
-  expected_result[0] = "v1";
-  expected_result[1] = "v2";
-  expected_result[2] = "v3";
-  AssertListEq(result, expected_result);
-}
-
-// Exhaustive test of the Index() function
-TEST(RedisListsTest, IndexTest) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Empty Index check (return empty and should not crash or edit tempv)
-  tempv = "yo";
-  ASSERT_TRUE(!redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "yo");
-  ASSERT_TRUE(!redis.Index("fda", 3, &tempv));
-  ASSERT_EQ(tempv, "yo");
-  ASSERT_TRUE(!redis.Index("random", -12391, &tempv));
-  ASSERT_EQ(tempv, "yo");
-
-  // Simple Pushes (will yield: [v6, v4, v4, v1, v2, v3]
-  redis.PushRight("k1", "v1");
-  redis.PushRight("k1", "v2");
-  redis.PushRight("k1", "v3");
-  redis.PushLeft("k1", "v4");
-  redis.PushLeft("k1", "v4");
-  redis.PushLeft("k1", "v6");
-
-  // Simple, non-negative indices
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "v6");
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "v4");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "v4");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "v1");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "v2");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "v3");
-
-  // Negative indices
-  ASSERT_TRUE(redis.Index("k1", -6, &tempv));
-  ASSERT_EQ(tempv, "v6");
-  ASSERT_TRUE(redis.Index("k1", -5, &tempv));
-  ASSERT_EQ(tempv, "v4");
-  ASSERT_TRUE(redis.Index("k1", -4, &tempv));
-  ASSERT_EQ(tempv, "v4");
-  ASSERT_TRUE(redis.Index("k1", -3, &tempv));
-  ASSERT_EQ(tempv, "v1");
-  ASSERT_TRUE(redis.Index("k1", -2, &tempv));
-  ASSERT_EQ(tempv, "v2");
-  ASSERT_TRUE(redis.Index("k1", -1, &tempv));
-  ASSERT_EQ(tempv, "v3");
-
-  // Out of bounds (return empty, no crash)
-  ASSERT_TRUE(!redis.Index("k1", 6, &tempv));
-  ASSERT_TRUE(!redis.Index("k1", 123219, &tempv));
-  ASSERT_TRUE(!redis.Index("k1", -7, &tempv));
-  ASSERT_TRUE(!redis.Index("k1", -129, &tempv));
-}
-
-
-// Exhaustive test of the Range() function
-TEST(RedisListsTest, RangeTest) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Simple Pushes (will yield: [v6, v4, v4, v1, v2, v3])
-  redis.PushRight("k1", "v1");
-  redis.PushRight("k1", "v2");
-  redis.PushRight("k1", "v3");
-  redis.PushLeft("k1", "v4");
-  redis.PushLeft("k1", "v4");
-  redis.PushLeft("k1", "v6");
-
-  // Sanity check (check the length;  make sure it's 6)
-  ASSERT_EQ(redis.Length("k1"), 6);
-
-  // Simple range
-  std::vector<std::string> res = redis.Range("k1", 1, 4);
-  ASSERT_EQ((int)res.size(), 4);
-  ASSERT_EQ(res[0], "v4");
-  ASSERT_EQ(res[1], "v4");
-  ASSERT_EQ(res[2], "v1");
-  ASSERT_EQ(res[3], "v2");
-
-  // Negative indices (i.e.: measured from the end)
-  res = redis.Range("k1", 2, -1);
-  ASSERT_EQ((int)res.size(), 4);
-  ASSERT_EQ(res[0], "v4");
-  ASSERT_EQ(res[1], "v1");
-  ASSERT_EQ(res[2], "v2");
-  ASSERT_EQ(res[3], "v3");
-
-  res = redis.Range("k1", -6, -4);
-  ASSERT_EQ((int)res.size(), 3);
-  ASSERT_EQ(res[0], "v6");
-  ASSERT_EQ(res[1], "v4");
-  ASSERT_EQ(res[2], "v4");
-
-  res = redis.Range("k1", -1, 5);
-  ASSERT_EQ((int)res.size(), 1);
-  ASSERT_EQ(res[0], "v3");
-
-  // Partial / Broken indices
-  res = redis.Range("k1", -3, 1000000);
-  ASSERT_EQ((int)res.size(), 3);
-  ASSERT_EQ(res[0], "v1");
-  ASSERT_EQ(res[1], "v2");
-  ASSERT_EQ(res[2], "v3");
-
-  res = redis.Range("k1", -1000000, 1);
-  ASSERT_EQ((int)res.size(), 2);
-  ASSERT_EQ(res[0], "v6");
-  ASSERT_EQ(res[1], "v4");
-
-  // Invalid indices
-  res = redis.Range("k1", 7, 9);
-  ASSERT_EQ((int)res.size(), 0);
-
-  res = redis.Range("k1", -8, -7);
-  ASSERT_EQ((int)res.size(), 0);
-
-  res = redis.Range("k1", 3, 2);
-  ASSERT_EQ((int)res.size(), 0);
-
-  res = redis.Range("k1", 5, -2);
-  ASSERT_EQ((int)res.size(), 0);
-
-  // Range matches Index
-  res = redis.Range("k1", -6, -4);
-  ASSERT_TRUE(redis.Index("k1", -6, &tempv));
-  ASSERT_EQ(tempv, res[0]);
-  ASSERT_TRUE(redis.Index("k1", -5, &tempv));
-  ASSERT_EQ(tempv, res[1]);
-  ASSERT_TRUE(redis.Index("k1", -4, &tempv));
-  ASSERT_EQ(tempv, res[2]);
-
-  // Last check
-  res = redis.Range("k1", 0, -6);
-  ASSERT_EQ((int)res.size(), 1);
-  ASSERT_EQ(res[0], "v6");
-}
-
-// Exhaustive test for InsertBefore(), and InsertAfter()
-TEST(RedisListsTest, InsertTest) {
-  RedisLists redis(kDefaultDbName, options, true);
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Insert on empty list (return 0, and do not crash)
-  ASSERT_EQ(redis.InsertBefore("k1", "non-exist", "a"), 0);
-  ASSERT_EQ(redis.InsertAfter("k1", "other-non-exist", "c"), 0);
-  ASSERT_EQ(redis.Length("k1"), 0);
-
-  // Push some preliminary stuff [g, f, e, d, c, b, a]
-  redis.PushLeft("k1", "a");
-  redis.PushLeft("k1", "b");
-  redis.PushLeft("k1", "c");
-  redis.PushLeft("k1", "d");
-  redis.PushLeft("k1", "e");
-  redis.PushLeft("k1", "f");
-  redis.PushLeft("k1", "g");
-  ASSERT_EQ(redis.Length("k1"), 7);
-
-  // Test InsertBefore
-  int newLength = redis.InsertBefore("k1", "e", "hello");
-  ASSERT_EQ(newLength, 8);
-  ASSERT_EQ(redis.Length("k1"), newLength);
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "f");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "e");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "hello");
-
-  // Test InsertAfter
-  newLength =  redis.InsertAfter("k1", "c", "bye");
-  ASSERT_EQ(newLength, 9);
-  ASSERT_EQ(redis.Length("k1"), newLength);
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "bye");
-
-  // Test bad value on InsertBefore
-  newLength = redis.InsertBefore("k1", "yo", "x");
-  ASSERT_EQ(newLength, 9);
-  ASSERT_EQ(redis.Length("k1"), newLength);
-
-  // Test bad value on InsertAfter
-  newLength = redis.InsertAfter("k1", "xxxx", "y");
-  ASSERT_EQ(newLength, 9);
-  ASSERT_EQ(redis.Length("k1"), newLength);
-
-  // Test InsertBefore beginning
-  newLength = redis.InsertBefore("k1", "g", "begggggggggggggggg");
-  ASSERT_EQ(newLength, 10);
-  ASSERT_EQ(redis.Length("k1"), newLength);
-
-  // Test InsertAfter end
-  newLength = redis.InsertAfter("k1", "a", "enddd");
-  ASSERT_EQ(newLength, 11);
-  ASSERT_EQ(redis.Length("k1"), newLength);
-
-  // Make sure nothing weird happened.
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "begggggggggggggggg");
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "g");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "f");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "hello");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "e");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "d");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "c");
-  ASSERT_TRUE(redis.Index("k1", 7, &tempv));
-  ASSERT_EQ(tempv, "bye");
-  ASSERT_TRUE(redis.Index("k1", 8, &tempv));
-  ASSERT_EQ(tempv, "b");
-  ASSERT_TRUE(redis.Index("k1", 9, &tempv));
-  ASSERT_EQ(tempv, "a");
-  ASSERT_TRUE(redis.Index("k1", 10, &tempv));
-  ASSERT_EQ(tempv, "enddd");
-}
-
-// Exhaustive test of Set function
-TEST(RedisListsTest, SetTest) {
-  RedisLists redis(kDefaultDbName, options, true);
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Set on empty list (return false, and do not crash)
-  ASSERT_EQ(redis.Set("k1", 7, "a"), false);
-  ASSERT_EQ(redis.Set("k1", 0, "a"), false);
-  ASSERT_EQ(redis.Set("k1", -49, "cx"), false);
-  ASSERT_EQ(redis.Length("k1"), 0);
-
-  // Push some preliminary stuff [g, f, e, d, c, b, a]
-  redis.PushLeft("k1", "a");
-  redis.PushLeft("k1", "b");
-  redis.PushLeft("k1", "c");
-  redis.PushLeft("k1", "d");
-  redis.PushLeft("k1", "e");
-  redis.PushLeft("k1", "f");
-  redis.PushLeft("k1", "g");
-  ASSERT_EQ(redis.Length("k1"), 7);
-
-  // Test Regular Set
-  ASSERT_TRUE(redis.Set("k1", 0, "0"));
-  ASSERT_TRUE(redis.Set("k1", 3, "3"));
-  ASSERT_TRUE(redis.Set("k1", 6, "6"));
-  ASSERT_TRUE(redis.Set("k1", 2, "2"));
-  ASSERT_TRUE(redis.Set("k1", 5, "5"));
-  ASSERT_TRUE(redis.Set("k1", 1, "1"));
-  ASSERT_TRUE(redis.Set("k1", 4, "4"));
-
-  ASSERT_EQ(redis.Length("k1"), 7); // Size should not change
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "0");
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "1");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "2");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "3");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "4");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "5");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "6");
-
-  // Set with negative indices
-  ASSERT_TRUE(redis.Set("k1", -7, "a"));
-  ASSERT_TRUE(redis.Set("k1", -4, "d"));
-  ASSERT_TRUE(redis.Set("k1", -1, "g"));
-  ASSERT_TRUE(redis.Set("k1", -5, "c"));
-  ASSERT_TRUE(redis.Set("k1", -2, "f"));
-  ASSERT_TRUE(redis.Set("k1", -6, "b"));
-  ASSERT_TRUE(redis.Set("k1", -3, "e"));
-
-  ASSERT_EQ(redis.Length("k1"), 7); // Size should not change
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "a");
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "b");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "c");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "d");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "e");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "f");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "g");
-
-  // Bad indices (just out-of-bounds / off-by-one check)
-  ASSERT_EQ(redis.Set("k1", -8, "off-by-one in negative index"), false);
-  ASSERT_EQ(redis.Set("k1", 7, "off-by-one-error in positive index"), false);
-  ASSERT_EQ(redis.Set("k1", 43892, "big random index should fail"), false);
-  ASSERT_EQ(redis.Set("k1", -21391, "large negative index should fail"), false);
-
-  // One last check (to make sure nothing weird happened)
-  ASSERT_EQ(redis.Length("k1"), 7); // Size should not change
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "a");
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "b");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "c");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "d");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "e");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "f");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "g");
-}
-
-// Testing Insert, Push, and Set, in a mixed environment
-TEST(RedisListsTest, InsertPushSetTest) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // A series of pushes and insertions
-  // Will result in [newbegin, z, a, aftera, x, newend]
-  // Also, check the return value sometimes (should return length)
-  int lengthCheck;
-  lengthCheck = redis.PushLeft("k1", "a");
-  ASSERT_EQ(lengthCheck, 1);
-  redis.PushLeft("k1", "z");
-  redis.PushRight("k1", "x");
-  lengthCheck = redis.InsertAfter("k1", "a", "aftera");
-  ASSERT_EQ(lengthCheck , 4);
-  redis.InsertBefore("k1", "z", "newbegin");  // InsertBefore beginning of list
-  redis.InsertAfter("k1", "x", "newend");     // InsertAfter end of list
-
-  // Check
-  std::vector<std::string> res = redis.Range("k1", 0, -1); // Get the list
-  ASSERT_EQ((int)res.size(), 6);
-  ASSERT_EQ(res[0], "newbegin");
-  ASSERT_EQ(res[5], "newend");
-  ASSERT_EQ(res[3], "aftera");
-
-  // Testing duplicate values/pivots (multiple occurrences of 'a')
-  ASSERT_TRUE(redis.Set("k1", 0, "a"));     // [a, z, a, aftera, x, newend]
-  redis.InsertAfter("k1", "a", "happy");    // [a, happy, z, a, aftera, ...]
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "happy");
-  redis.InsertBefore("k1", "a", "sad");     // [sad, a, happy, z, a, aftera, ...]
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "sad");
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "happy");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "aftera");
-  redis.InsertAfter("k1", "a", "zz");         // [sad, a, zz, happy, z, a, aftera, ...]
-  ASSERT_TRUE(redis.Index("k1", 2, &tempv));
-  ASSERT_EQ(tempv, "zz");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "aftera");
-  ASSERT_TRUE(redis.Set("k1", 1, "nota"));    // [sad, nota, zz, happy, z, a, ...]
-  redis.InsertBefore("k1", "a", "ba");        // [sad, nota, zz, happy, z, ba, a, ...]
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "z");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "ba");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "a");
-
-  // We currently have: [sad, nota, zz, happy, z, ba, a, aftera, x, newend]
-  // redis.Print("k1");   // manually check
-
-  // Test Inserting before/after non-existent values
-  lengthCheck = redis.Length("k1"); // Ensure that the length doesn't change
-  ASSERT_EQ(lengthCheck, 10);
-  ASSERT_EQ(redis.InsertBefore("k1", "non-exist", "randval"), lengthCheck);
-  ASSERT_EQ(redis.InsertAfter("k1", "nothing", "a"), lengthCheck);
-  ASSERT_EQ(redis.InsertAfter("randKey", "randVal", "ranValue"), 0); // Empty
-  ASSERT_EQ(redis.Length("k1"), lengthCheck); // The length should not change
-
-  // Simply Test the Set() function
-  redis.Set("k1", 5, "ba2");
-  redis.InsertBefore("k1", "ba2", "beforeba2");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "z");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "beforeba2");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "ba2");
-  ASSERT_TRUE(redis.Index("k1", 7, &tempv));
-  ASSERT_EQ(tempv, "a");
-
-  // We have: [sad, nota, zz, happy, z, beforeba2, ba2, a, aftera, x, newend]
-
-  // Set() with negative indices
-  redis.Set("k1", -1, "endprank");
-  ASSERT_TRUE(!redis.Index("k1", 11, &tempv));
-  ASSERT_TRUE(redis.Index("k1", 10, &tempv));
-  ASSERT_EQ(tempv, "endprank"); // Ensure Set worked correctly
-  redis.Set("k1", -11, "t");
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "t");
-
-  // Test out of bounds Set
-  ASSERT_EQ(redis.Set("k1", -12, "ssd"), false);
-  ASSERT_EQ(redis.Set("k1", 11, "sasd"), false);
-  ASSERT_EQ(redis.Set("k1", 1200, "big"), false);
-}
-
-// Testing Trim, Pop
-TEST(RedisListsTest, TrimPopTest) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // A series of pushes and insertions
-  // Will result in [newbegin, z, a, aftera, x, newend]
-  redis.PushLeft("k1", "a");
-  redis.PushLeft("k1", "z");
-  redis.PushRight("k1", "x");
-  redis.InsertBefore("k1", "z", "newbegin");    // InsertBefore start of list
-  redis.InsertAfter("k1", "x", "newend");       // InsertAfter end of list
-  redis.InsertAfter("k1", "a", "aftera");
-
-  // Simple PopLeft/Right test
-  ASSERT_TRUE(redis.PopLeft("k1", &tempv));
-  ASSERT_EQ(tempv, "newbegin");
-  ASSERT_EQ(redis.Length("k1"), 5);
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "z");
-  ASSERT_TRUE(redis.PopRight("k1", &tempv));
-  ASSERT_EQ(tempv, "newend");
-  ASSERT_EQ(redis.Length("k1"), 4);
-  ASSERT_TRUE(redis.Index("k1", -1, &tempv));
-  ASSERT_EQ(tempv, "x");
-
-  // Now have: [z, a, aftera, x]
-
-  // Test Trim
-  ASSERT_TRUE(redis.Trim("k1", 0, -1));       // [z, a, aftera, x] (do nothing)
-  ASSERT_EQ(redis.Length("k1"), 4);
-  ASSERT_TRUE(redis.Trim("k1", 0, 2));                     // [z, a, aftera]
-  ASSERT_EQ(redis.Length("k1"), 3);
-  ASSERT_TRUE(redis.Index("k1", -1, &tempv));
-  ASSERT_EQ(tempv, "aftera");
-  ASSERT_TRUE(redis.Trim("k1", 1, 1));                     // [a]
-  ASSERT_EQ(redis.Length("k1"), 1);
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "a");
-
-  // Test out of bounds (empty) trim
-  ASSERT_TRUE(redis.Trim("k1", 1, 0));
-  ASSERT_EQ(redis.Length("k1"), 0);
-
-  // Popping with empty list (return empty without error)
-  ASSERT_TRUE(!redis.PopLeft("k1", &tempv));
-  ASSERT_TRUE(!redis.PopRight("k1", &tempv));
-  ASSERT_TRUE(redis.Trim("k1", 0, 5));
-
-  // Exhaustive Trim test (negative and invalid indices)
-  // Will start in [newbegin, z, a, aftera, x, newend]
-  redis.PushLeft("k1", "a");
-  redis.PushLeft("k1", "z");
-  redis.PushRight("k1", "x");
-  redis.InsertBefore("k1", "z", "newbegin");    // InsertBefore start of list
-  redis.InsertAfter("k1", "x", "newend");       // InsertAfter end of list
-  redis.InsertAfter("k1", "a", "aftera");
-  ASSERT_TRUE(redis.Trim("k1", -6, -1));                     // Should do nothing
-  ASSERT_EQ(redis.Length("k1"), 6);
-  ASSERT_TRUE(redis.Trim("k1", 1, -2));
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "z");
-  ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-  ASSERT_EQ(tempv, "x");
-  ASSERT_EQ(redis.Length("k1"), 4);
-  ASSERT_TRUE(redis.Trim("k1", -3, -2));
-  ASSERT_EQ(redis.Length("k1"), 2);
-}
-
-// Testing Remove, RemoveFirst, RemoveLast
-TEST(RedisListsTest, RemoveTest) {
-  RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // A series of pushes and insertions
-  // Will result in [newbegin, z, a, aftera, x, newend, a, a]
-  redis.PushLeft("k1", "a");
-  redis.PushLeft("k1", "z");
-  redis.PushRight("k1", "x");
-  redis.InsertBefore("k1", "z", "newbegin");    // InsertBefore start of list
-  redis.InsertAfter("k1", "x", "newend");       // InsertAfter end of list
-  redis.InsertAfter("k1", "a", "aftera");
-  redis.PushRight("k1", "a");
-  redis.PushRight("k1", "a");
-
-  // Verify
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "newbegin");
-  ASSERT_TRUE(redis.Index("k1", -1, &tempv));
-  ASSERT_EQ(tempv, "a");
-
-  // Check RemoveFirst (Remove the first two 'a')
-  // Results in [newbegin, z, aftera, x, newend, a]
-  int numRemoved = redis.Remove("k1", 2, "a");
-  ASSERT_EQ(numRemoved, 2);
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "newbegin");
-  ASSERT_TRUE(redis.Index("k1", 1, &tempv));
-  ASSERT_EQ(tempv, "z");
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "newend");
-  ASSERT_TRUE(redis.Index("k1", 5, &tempv));
-  ASSERT_EQ(tempv, "a");
-  ASSERT_EQ(redis.Length("k1"), 6);
-
-  // Repopulate some stuff
-  // Results in: [x, x, x, x, x, newbegin, z, x, aftera, x, newend, a, x]
-  redis.PushLeft("k1", "x");
-  redis.PushLeft("k1", "x");
-  redis.PushLeft("k1", "x");
-  redis.PushLeft("k1", "x");
-  redis.PushLeft("k1", "x");
-  redis.PushRight("k1", "x");
-  redis.InsertAfter("k1", "z", "x");
-
-  // Test removal from end
-  numRemoved = redis.Remove("k1", -2, "x");
-  ASSERT_EQ(numRemoved, 2);
-  ASSERT_TRUE(redis.Index("k1", 8, &tempv));
-  ASSERT_EQ(tempv, "aftera");
-  ASSERT_TRUE(redis.Index("k1", 9, &tempv));
-  ASSERT_EQ(tempv, "newend");
-  ASSERT_TRUE(redis.Index("k1", 10, &tempv));
-  ASSERT_EQ(tempv, "a");
-  ASSERT_TRUE(!redis.Index("k1", 11, &tempv));
-  numRemoved = redis.Remove("k1", -2, "x");
-  ASSERT_EQ(numRemoved, 2);
-  ASSERT_TRUE(redis.Index("k1", 4, &tempv));
-  ASSERT_EQ(tempv, "newbegin");
-  ASSERT_TRUE(redis.Index("k1", 6, &tempv));
-  ASSERT_EQ(tempv, "aftera");
-
-  // We now have: [x, x, x, x, newbegin, z, aftera, newend, a]
-  ASSERT_EQ(redis.Length("k1"), 9);
-  ASSERT_TRUE(redis.Index("k1", -1, &tempv));
-  ASSERT_EQ(tempv, "a");
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "x");
-
-  // Test over-shooting (removing more than there exists)
-  numRemoved = redis.Remove("k1", -9000, "x");
-  ASSERT_EQ(numRemoved , 4);    // Only really removed 4
-  ASSERT_EQ(redis.Length("k1"), 5);
-  ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-  ASSERT_EQ(tempv, "newbegin");
-  numRemoved = redis.Remove("k1", 1, "x");
-  ASSERT_EQ(numRemoved, 0);
-
-  // Try removing ALL!
-  numRemoved = redis.Remove("k1", 0, "newbegin");   // REMOVE 0 will remove all!
-  ASSERT_EQ(numRemoved, 1);
-
-  // Removal from an empty-list
-  ASSERT_TRUE(redis.Trim("k1", 1, 0));
-  numRemoved = redis.Remove("k1", 1, "z");
-  ASSERT_EQ(numRemoved, 0);
-}
-
-
-// Test Multiple keys and Persistence
-TEST(RedisListsTest, PersistenceMultiKeyTest) {
-
-  string tempv; // Used below for all Index(), PopRight(), PopLeft()
-
-  // Block one: populate a single key in the database
-  {
-    RedisLists redis(kDefaultDbName, options, true);   // Destructive
-
-    // A series of pushes and insertions
-    // Will result in [newbegin, z, a, aftera, x, newend, a, a]
-    redis.PushLeft("k1", "a");
-    redis.PushLeft("k1", "z");
-    redis.PushRight("k1", "x");
-    redis.InsertBefore("k1", "z", "newbegin");    // InsertBefore start of list
-    redis.InsertAfter("k1", "x", "newend");       // InsertAfter end of list
-    redis.InsertAfter("k1", "a", "aftera");
-    redis.PushRight("k1", "a");
-    redis.PushRight("k1", "a");
-
-    ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-    ASSERT_EQ(tempv, "aftera");
-  }
-
-  // Block two: make sure changes were saved and add some other key
-  {
-    RedisLists redis(kDefaultDbName, options, false); // Persistent, non-destructive
-
-    // Check
-    ASSERT_EQ(redis.Length("k1"), 8);
-    ASSERT_TRUE(redis.Index("k1", 3, &tempv));
-    ASSERT_EQ(tempv, "aftera");
-
-    redis.PushRight("k2", "randomkey");
-    redis.PushLeft("k2", "sas");
-
-    redis.PopLeft("k1", &tempv);
-  }
-
-  // Block three: Verify the changes from block 2
-  {
-    RedisLists redis(kDefaultDbName, options, false); // Persistent, non-destructive
-
-    // Check
-    ASSERT_EQ(redis.Length("k1"), 7);
-    ASSERT_EQ(redis.Length("k2"), 2);
-    ASSERT_TRUE(redis.Index("k1", 0, &tempv));
-    ASSERT_EQ(tempv, "z");
-    ASSERT_TRUE(redis.Index("k2", -2, &tempv));
-    ASSERT_EQ(tempv, "sas");
-  }
-}
-
-/// THE manual REDIS TEST begins here
-/// THIS WILL ONLY OCCUR IF YOU RUN: ./redis_test -m
-
-namespace {
-void MakeUpper(std::string* const s) {
-  int len = s->length();
-  for(int i=0; i<len; ++i) {
-    (*s)[i] = toupper((*s)[i]); // C-version defined in <ctype.h>
-  }
-}
-
-/// Allows the user to enter in REDIS commands into the command-line.
-/// This is useful for manual / interacticve testing / debugging.
-///  Use destructive=true to clean the database before use.
-///  Use destructive=false to remember the previous state (i.e.: persistent)
-/// Should be called from main function.
-int manual_redis_test(bool destructive){
-  RedisLists redis(RedisListsTest::kDefaultDbName,
-                   RedisListsTest::options,
-                   destructive);
-
-  // TODO: Right now, please use spaces to separate each word.
-  //  In actual redis, you can use quotes to specify compound values
-  //  Example: RPUSH mylist "this is a compound value"
-
-  std::string command;
-  while(true) {
-    cin >> command;
-    MakeUpper(&command);
-
-    if (command == "LINSERT") {
-      std::string k, t, p, v;
-      cin >> k >> t >> p >> v;
-      MakeUpper(&t);
-      if (t=="BEFORE") {
-        std::cout << redis.InsertBefore(k, p, v) << std::endl;
-      } else if (t=="AFTER") {
-        std::cout << redis.InsertAfter(k, p, v) << std::endl;
-      }
-    } else if (command == "LPUSH") {
-      std::string k, v;
-      std::cin >> k >> v;
-      redis.PushLeft(k, v);
-    } else if (command == "RPUSH") {
-      std::string k, v;
-      std::cin >> k >> v;
-      redis.PushRight(k, v);
-    } else if (command == "LPOP") {
-      std::string k;
-      std::cin >> k;
-      string res;
-      redis.PopLeft(k, &res);
-      std::cout << res << std::endl;
-    } else if (command == "RPOP") {
-      std::string k;
-      std::cin >> k;
-      string res;
-      redis.PopRight(k, &res);
-      std::cout << res << std::endl;
-    } else if (command == "LREM") {
-      std::string k;
-      int amt;
-      std::string v;
-
-      std::cin >> k >> amt >> v;
-      std::cout << redis.Remove(k, amt, v) << std::endl;
-    } else if (command == "LLEN") {
-      std::string k;
-      std::cin >> k;
-      std::cout << redis.Length(k) << std::endl;
-    } else if (command == "LRANGE") {
-      std::string k;
-      int i, j;
-      std::cin >> k >> i >> j;
-      std::vector<std::string> res = redis.Range(k, i, j);
-      for (auto it = res.begin(); it != res.end(); ++it) {
-        std::cout << " " << (*it);
-      }
-      std::cout << std::endl;
-    } else if (command == "LTRIM") {
-      std::string k;
-      int i, j;
-      std::cin >> k >> i >> j;
-      redis.Trim(k, i, j);
-    } else if (command == "LSET") {
-      std::string k;
-      int idx;
-      std::string v;
-      cin >> k >> idx >> v;
-      redis.Set(k, idx, v);
-    } else if (command == "LINDEX") {
-      std::string k;
-      int idx;
-      std::cin >> k >> idx;
-      string res;
-      redis.Index(k, idx, &res);
-      std::cout << res << std::endl;
-    } else if (command == "PRINT") {      // Added by Deon
-      std::string k;
-      cin >> k;
-      redis.Print(k);
-    } else if (command == "QUIT") {
-      return 0;
-    } else {
-      std::cout << "unknown command: " << command << std::endl;
-    }
-  }
-}
-}  // namespace
-
-} // namespace rocksdb
-
-
-// USAGE: "./redis_test" for default (unit tests)
-//        "./redis_test -m" for manual testing (redis command api)
-//        "./redis_test -m -d" for destructive manual test (erase db before use)
-
-
-namespace {
-// Check for "want" argument in the argument list
-bool found_arg(int argc, char* argv[], const char* want){
-  for(int i=1; i<argc; ++i){
-    if (strcmp(argv[i], want) == 0) {
-      return true;
-    }
-  }
-  return false;
-}
-}  // namespace
-
-// Will run unit tests.
-// However, if -m is specified, it will do user manual/interactive testing
-// -m -d is manual and destructive (will clear the database before use)
-int main(int argc, char* argv[]) {
-  if (found_arg(argc, argv, "-m")) {
-    bool destructive = found_arg(argc, argv, "-d");
-    return rocksdb::manual_redis_test(destructive);
-  } else {
-    return rocksdb::test::RunAllTests();
-  }
-}
-
diff --git a/src/rocksdb/utilities/ttl/db_ttl_impl.cc b/src/rocksdb/utilities/ttl/db_ttl_impl.cc
deleted file mode 100644
index f7a697f..0000000
--- a/src/rocksdb/utilities/ttl/db_ttl_impl.cc
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#ifndef ROCKSDB_LITE
-
-#include "utilities/ttl/db_ttl_impl.h"
-
-#include "utilities/db_ttl.h"
-#include "db/filename.h"
-#include "db/write_batch_internal.h"
-#include "util/coding.h"
-#include "rocksdb/env.h"
-#include "rocksdb/iterator.h"
-
-namespace rocksdb {
-
-void DBWithTTLImpl::SanitizeOptions(int32_t ttl, ColumnFamilyOptions* options,
-                                    Env* env) {
-  if (options->compaction_filter) {
-    options->compaction_filter =
-        new TtlCompactionFilter(ttl, env, options->compaction_filter);
-  } else {
-    options->compaction_filter_factory =
-        std::shared_ptr<CompactionFilterFactory>(new TtlCompactionFilterFactory(
-            ttl, env, options->compaction_filter_factory));
-  }
-
-  if (options->merge_operator) {
-    options->merge_operator.reset(
-        new TtlMergeOperator(options->merge_operator, env));
-  }
-}
-
-// Open the db inside DBWithTTLImpl because options needs pointer to its ttl
-DBWithTTLImpl::DBWithTTLImpl(DB* db) : DBWithTTL(db) {}
-
-DBWithTTLImpl::~DBWithTTLImpl() { delete GetOptions().compaction_filter; }
-
-Status UtilityDB::OpenTtlDB(const Options& options, const std::string& dbname,
-                            StackableDB** dbptr, int32_t ttl, bool read_only) {
-  DBWithTTL* db;
-  Status s = DBWithTTL::Open(options, dbname, &db, ttl, read_only);
-  if (s.ok()) {
-    *dbptr = db;
-  } else {
-    *dbptr = nullptr;
-  }
-  return s;
-}
-
-Status DBWithTTL::Open(const Options& options, const std::string& dbname,
-                       DBWithTTL** dbptr, int32_t ttl, bool read_only) {
-
-  DBOptions db_options(options);
-  ColumnFamilyOptions cf_options(options);
-  std::vector<ColumnFamilyDescriptor> column_families;
-  column_families.push_back(
-      ColumnFamilyDescriptor(kDefaultColumnFamilyName, cf_options));
-  std::vector<ColumnFamilyHandle*> handles;
-  Status s = DBWithTTL::Open(db_options, dbname, column_families, &handles,
-                             dbptr, {ttl}, read_only);
-  if (s.ok()) {
-    assert(handles.size() == 1);
-    // i can delete the handle since DBImpl is always holding a reference to
-    // default column family
-    delete handles[0];
-  }
-  return s;
-}
-
-Status DBWithTTL::Open(
-    const DBOptions& db_options, const std::string& dbname,
-    const std::vector<ColumnFamilyDescriptor>& column_families,
-    std::vector<ColumnFamilyHandle*>* handles, DBWithTTL** dbptr,
-    std::vector<int32_t> ttls, bool read_only) {
-
-  if (ttls.size() != column_families.size()) {
-    return Status::InvalidArgument(
-        "ttls size has to be the same as number of column families");
-  }
-
-  std::vector<ColumnFamilyDescriptor> column_families_sanitized =
-      column_families;
-  for (size_t i = 0; i < column_families_sanitized.size(); ++i) {
-    DBWithTTLImpl::SanitizeOptions(
-        ttls[i], &column_families_sanitized[i].options,
-        db_options.env == nullptr ? Env::Default() : db_options.env);
-  }
-  DB* db;
-
-  Status st;
-  if (read_only) {
-    st = DB::OpenForReadOnly(db_options, dbname, column_families_sanitized,
-                             handles, &db);
-  } else {
-    st = DB::Open(db_options, dbname, column_families_sanitized, handles, &db);
-  }
-  if (st.ok()) {
-    *dbptr = new DBWithTTLImpl(db);
-  } else {
-    *dbptr = nullptr;
-  }
-  return st;
-}
-
-Status DBWithTTLImpl::CreateColumnFamilyWithTtl(
-    const ColumnFamilyOptions& options, const std::string& column_family_name,
-    ColumnFamilyHandle** handle, int ttl) {
-  ColumnFamilyOptions sanitized_options = options;
-  DBWithTTLImpl::SanitizeOptions(ttl, &sanitized_options, GetEnv());
-
-  return DBWithTTL::CreateColumnFamily(sanitized_options, column_family_name,
-                                       handle);
-}
-
-Status DBWithTTLImpl::CreateColumnFamily(const ColumnFamilyOptions& options,
-                                         const std::string& column_family_name,
-                                         ColumnFamilyHandle** handle) {
-  return CreateColumnFamilyWithTtl(options, column_family_name, handle, 0);
-}
-
-// Appends the current timestamp to the string.
-// Returns false if could not get the current_time, true if append succeeds
-Status DBWithTTLImpl::AppendTS(const Slice& val, std::string* val_with_ts,
-                               Env* env) {
-  val_with_ts->reserve(kTSLength + val.size());
-  char ts_string[kTSLength];
-  int64_t curtime;
-  Status st = env->GetCurrentTime(&curtime);
-  if (!st.ok()) {
-    return st;
-  }
-  EncodeFixed32(ts_string, (int32_t)curtime);
-  val_with_ts->append(val.data(), val.size());
-  val_with_ts->append(ts_string, kTSLength);
-  return st;
-}
-
-// Returns corruption if the length of the string is lesser than timestamp, or
-// timestamp refers to a time lesser than ttl-feature release time
-Status DBWithTTLImpl::SanityCheckTimestamp(const Slice& str) {
-  if (str.size() < kTSLength) {
-    return Status::Corruption("Error: value's length less than timestamp's\n");
-  }
-  // Checks that TS is not lesser than kMinTimestamp
-  // Gaurds against corruption & normal database opened incorrectly in ttl mode
-  int32_t timestamp_value = DecodeFixed32(str.data() + str.size() - kTSLength);
-  if (timestamp_value < kMinTimestamp) {
-    return Status::Corruption("Error: Timestamp < ttl feature release time!\n");
-  }
-  return Status::OK();
-}
-
-// Checks if the string is stale or not according to TTl provided
-bool DBWithTTLImpl::IsStale(const Slice& value, int32_t ttl, Env* env) {
-  if (ttl <= 0) {  // Data is fresh if TTL is non-positive
-    return false;
-  }
-  int64_t curtime;
-  if (!env->GetCurrentTime(&curtime).ok()) {
-    return false;  // Treat the data as fresh if could not get current time
-  }
-  int32_t timestamp_value =
-      DecodeFixed32(value.data() + value.size() - kTSLength);
-  return (timestamp_value + ttl) < curtime;
-}
-
-// Strips the TS from the end of the string
-Status DBWithTTLImpl::StripTS(std::string* str) {
-  Status st;
-  if (str->length() < kTSLength) {
-    return Status::Corruption("Bad timestamp in key-value");
-  }
-  // Erasing characters which hold the TS
-  str->erase(str->length() - kTSLength, kTSLength);
-  return st;
-}
-
-Status DBWithTTLImpl::Put(const WriteOptions& options,
-                          ColumnFamilyHandle* column_family, const Slice& key,
-                          const Slice& val) {
-  WriteBatch batch;
-  batch.Put(column_family, key, val);
-  return Write(options, &batch);
-}
-
-Status DBWithTTLImpl::Get(const ReadOptions& options,
-                          ColumnFamilyHandle* column_family, const Slice& key,
-                          std::string* value) {
-  Status st = db_->Get(options, column_family, key, value);
-  if (!st.ok()) {
-    return st;
-  }
-  st = SanityCheckTimestamp(*value);
-  if (!st.ok()) {
-    return st;
-  }
-  return StripTS(value);
-}
-
-std::vector<Status> DBWithTTLImpl::MultiGet(
-    const ReadOptions& options,
-    const std::vector<ColumnFamilyHandle*>& column_family,
-    const std::vector<Slice>& keys, std::vector<std::string>* values) {
-  return std::vector<Status>(
-      keys.size(), Status::NotSupported("MultiGet not supported with TTL"));
-}
-
-bool DBWithTTLImpl::KeyMayExist(const ReadOptions& options,
-                                ColumnFamilyHandle* column_family,
-                                const Slice& key, std::string* value,
-                                bool* value_found) {
-  bool ret = db_->KeyMayExist(options, column_family, key, value, value_found);
-  if (ret && value != nullptr && value_found != nullptr && *value_found) {
-    if (!SanityCheckTimestamp(*value).ok() || !StripTS(value).ok()) {
-      return false;
-    }
-  }
-  return ret;
-}
-
-Status DBWithTTLImpl::Merge(const WriteOptions& options,
-                            ColumnFamilyHandle* column_family, const Slice& key,
-                            const Slice& value) {
-  WriteBatch batch;
-  batch.Merge(column_family, key, value);
-  return Write(options, &batch);
-}
-
-Status DBWithTTLImpl::Write(const WriteOptions& opts, WriteBatch* updates) {
-  class Handler : public WriteBatch::Handler {
-   public:
-    explicit Handler(Env* env) : env_(env) {}
-    WriteBatch updates_ttl;
-    Status batch_rewrite_status;
-    virtual Status PutCF(uint32_t column_family_id, const Slice& key,
-                         const Slice& value) {
-      std::string value_with_ts;
-      Status st = AppendTS(value, &value_with_ts, env_);
-      if (!st.ok()) {
-        batch_rewrite_status = st;
-      } else {
-        WriteBatchInternal::Put(&updates_ttl, column_family_id, key,
-                                value_with_ts);
-      }
-      return Status::OK();
-    }
-    virtual Status MergeCF(uint32_t column_family_id, const Slice& key,
-                           const Slice& value) {
-      std::string value_with_ts;
-      Status st = AppendTS(value, &value_with_ts, env_);
-      if (!st.ok()) {
-        batch_rewrite_status = st;
-      } else {
-        WriteBatchInternal::Merge(&updates_ttl, column_family_id, key,
-                                  value_with_ts);
-      }
-      return Status::OK();
-    }
-    virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) {
-      WriteBatchInternal::Delete(&updates_ttl, column_family_id, key);
-      return Status::OK();
-    }
-    virtual void LogData(const Slice& blob) { updates_ttl.PutLogData(blob); }
-
-   private:
-    Env* env_;
-  };
-  Handler handler(GetEnv());
-  updates->Iterate(&handler);
-  if (!handler.batch_rewrite_status.ok()) {
-    return handler.batch_rewrite_status;
-  } else {
-    return db_->Write(opts, &(handler.updates_ttl));
-  }
-}
-
-Iterator* DBWithTTLImpl::NewIterator(const ReadOptions& opts,
-                                     ColumnFamilyHandle* column_family) {
-  return new TtlIterator(db_->NewIterator(opts, column_family));
-}
-
-}  // namespace rocksdb
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/ttl/db_ttl_impl.h b/src/rocksdb/utilities/ttl/db_ttl_impl.h
deleted file mode 100644
index a5c8fc8..0000000
--- a/src/rocksdb/utilities/ttl/db_ttl_impl.h
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#pragma once
-
-#ifndef ROCKSDB_LITE
-#include <deque>
-#include <string>
-#include <vector>
-
-#include "rocksdb/db.h"
-#include "rocksdb/env.h"
-#include "rocksdb/compaction_filter.h"
-#include "rocksdb/merge_operator.h"
-#include "utilities/utility_db.h"
-#include "utilities/db_ttl.h"
-#include "db/db_impl.h"
-
-namespace rocksdb {
-
-class DBWithTTLImpl : public DBWithTTL {
- public:
-  static void SanitizeOptions(int32_t ttl, ColumnFamilyOptions* options,
-                              Env* env);
-
-  explicit DBWithTTLImpl(DB* db);
-
-  virtual ~DBWithTTLImpl();
-
-  Status CreateColumnFamilyWithTtl(const ColumnFamilyOptions& options,
-                                   const std::string& column_family_name,
-                                   ColumnFamilyHandle** handle,
-                                   int ttl) override;
-
-  Status CreateColumnFamily(const ColumnFamilyOptions& options,
-                            const std::string& column_family_name,
-                            ColumnFamilyHandle** handle) override;
-
-  using StackableDB::Put;
-  virtual Status Put(const WriteOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     const Slice& val) override;
-
-  using StackableDB::Get;
-  virtual Status Get(const ReadOptions& options,
-                     ColumnFamilyHandle* column_family, const Slice& key,
-                     std::string* value) override;
-
-  using StackableDB::MultiGet;
-  virtual std::vector<Status> MultiGet(
-      const ReadOptions& options,
-      const std::vector<ColumnFamilyHandle*>& column_family,
-      const std::vector<Slice>& keys,
-      std::vector<std::string>* values) override;
-
-  using StackableDB::KeyMayExist;
-  virtual bool KeyMayExist(const ReadOptions& options,
-                           ColumnFamilyHandle* column_family, const Slice& key,
-                           std::string* value,
-                           bool* value_found = nullptr) override;
-
-  using StackableDB::Merge;
-  virtual Status Merge(const WriteOptions& options,
-                       ColumnFamilyHandle* column_family, const Slice& key,
-                       const Slice& value) override;
-
-  virtual Status Write(const WriteOptions& opts, WriteBatch* updates) override;
-
-  using StackableDB::NewIterator;
-  virtual Iterator* NewIterator(const ReadOptions& opts,
-                                ColumnFamilyHandle* column_family) override;
-
-  virtual DB* GetBaseDB() { return db_; }
-
-  static bool IsStale(const Slice& value, int32_t ttl, Env* env);
-
-  static Status AppendTS(const Slice& val, std::string* val_with_ts, Env* env);
-
-  static Status SanityCheckTimestamp(const Slice& str);
-
-  static Status StripTS(std::string* str);
-
-  static const uint32_t kTSLength = sizeof(int32_t);  // size of timestamp
-
-  static const int32_t kMinTimestamp = 1368146402;  // 05/09/2013:5:40PM GMT-8
-
-  static const int32_t kMaxTimestamp = 2147483647;  // 01/18/2038:7:14PM GMT-8
-};
-
-class TtlIterator : public Iterator {
-
- public:
-  explicit TtlIterator(Iterator* iter) : iter_(iter) { assert(iter_); }
-
-  ~TtlIterator() { delete iter_; }
-
-  bool Valid() const { return iter_->Valid(); }
-
-  void SeekToFirst() { iter_->SeekToFirst(); }
-
-  void SeekToLast() { iter_->SeekToLast(); }
-
-  void Seek(const Slice& target) { iter_->Seek(target); }
-
-  void Next() { iter_->Next(); }
-
-  void Prev() { iter_->Prev(); }
-
-  Slice key() const { return iter_->key(); }
-
-  int32_t timestamp() const {
-    return DecodeFixed32(iter_->value().data() + iter_->value().size() -
-                         DBWithTTLImpl::kTSLength);
-  }
-
-  Slice value() const {
-    // TODO: handle timestamp corruption like in general iterator semantics
-    assert(DBWithTTLImpl::SanityCheckTimestamp(iter_->value()).ok());
-    Slice trimmed_value = iter_->value();
-    trimmed_value.size_ -= DBWithTTLImpl::kTSLength;
-    return trimmed_value;
-  }
-
-  Status status() const { return iter_->status(); }
-
- private:
-  Iterator* iter_;
-};
-
-class TtlCompactionFilter : public CompactionFilter {
- public:
-  TtlCompactionFilter(
-      int32_t ttl, Env* env, const CompactionFilter* user_comp_filter,
-      std::unique_ptr<const CompactionFilter> user_comp_filter_from_factory =
-          nullptr)
-      : ttl_(ttl),
-        env_(env),
-        user_comp_filter_(user_comp_filter),
-        user_comp_filter_from_factory_(
-            std::move(user_comp_filter_from_factory)) {
-    // Unlike the merge operator, compaction filter is necessary for TTL, hence
-    // this would be called even if user doesn't specify any compaction-filter
-    if (!user_comp_filter_) {
-      user_comp_filter_ = user_comp_filter_from_factory_.get();
-    }
-  }
-
-  virtual bool Filter(int level, const Slice& key, const Slice& old_val,
-                      std::string* new_val, bool* value_changed) const
-      override {
-    if (DBWithTTLImpl::IsStale(old_val, ttl_, env_)) {
-      return true;
-    }
-    if (user_comp_filter_ == nullptr) {
-      return false;
-    }
-    assert(old_val.size() >= DBWithTTLImpl::kTSLength);
-    Slice old_val_without_ts(old_val.data(),
-                             old_val.size() - DBWithTTLImpl::kTSLength);
-    if (user_comp_filter_->Filter(level, key, old_val_without_ts, new_val,
-                                  value_changed)) {
-      return true;
-    }
-    if (*value_changed) {
-      new_val->append(
-          old_val.data() + old_val.size() - DBWithTTLImpl::kTSLength,
-          DBWithTTLImpl::kTSLength);
-    }
-    return false;
-  }
-
-  virtual const char* Name() const override { return "Delete By TTL"; }
-
- private:
-  int32_t ttl_;
-  Env* env_;
-  const CompactionFilter* user_comp_filter_;
-  std::unique_ptr<const CompactionFilter> user_comp_filter_from_factory_;
-};
-
-class TtlCompactionFilterFactory : public CompactionFilterFactory {
- public:
-  TtlCompactionFilterFactory(
-      int32_t ttl, Env* env,
-      std::shared_ptr<CompactionFilterFactory> comp_filter_factory)
-      : ttl_(ttl), env_(env), user_comp_filter_factory_(comp_filter_factory) {}
-
-  virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-      const CompactionFilter::Context& context) {
-    return std::unique_ptr<TtlCompactionFilter>(new TtlCompactionFilter(
-        ttl_, env_, nullptr,
-        std::move(user_comp_filter_factory_->CreateCompactionFilter(context))));
-  }
-
-  virtual const char* Name() const override {
-    return "TtlCompactionFilterFactory";
-  }
-
- private:
-  int32_t ttl_;
-  Env* env_;
-  std::shared_ptr<CompactionFilterFactory> user_comp_filter_factory_;
-};
-
-class TtlMergeOperator : public MergeOperator {
-
- public:
-  explicit TtlMergeOperator(const std::shared_ptr<MergeOperator> merge_op,
-                            Env* env)
-      : user_merge_op_(merge_op), env_(env) {
-    assert(merge_op);
-    assert(env);
-  }
-
-  virtual bool FullMerge(const Slice& key, const Slice* existing_value,
-                         const std::deque<std::string>& operands,
-                         std::string* new_value, Logger* logger) const
-      override {
-    const uint32_t ts_len = DBWithTTLImpl::kTSLength;
-    if (existing_value && existing_value->size() < ts_len) {
-      Log(logger, "Error: Could not remove timestamp from existing value.");
-      return false;
-    }
-
-    // Extract time-stamp from each operand to be passed to user_merge_op_
-    std::deque<std::string> operands_without_ts;
-    for (const auto& operand : operands) {
-      if (operand.size() < ts_len) {
-        Log(logger, "Error: Could not remove timestamp from operand value.");
-        return false;
-      }
-      operands_without_ts.push_back(operand.substr(0, operand.size() - ts_len));
-    }
-
-    // Apply the user merge operator (store result in *new_value)
-    bool good = true;
-    if (existing_value) {
-      Slice existing_value_without_ts(existing_value->data(),
-                                      existing_value->size() - ts_len);
-      good = user_merge_op_->FullMerge(key, &existing_value_without_ts,
-                                       operands_without_ts, new_value, logger);
-    } else {
-      good = user_merge_op_->FullMerge(key, nullptr, operands_without_ts,
-                                       new_value, logger);
-    }
-
-    // Return false if the user merge operator returned false
-    if (!good) {
-      return false;
-    }
-
-    // Augment the *new_value with the ttl time-stamp
-    int64_t curtime;
-    if (!env_->GetCurrentTime(&curtime).ok()) {
-      Log(logger,
-          "Error: Could not get current time to be attached internally "
-          "to the new value.");
-      return false;
-    } else {
-      char ts_string[ts_len];
-      EncodeFixed32(ts_string, (int32_t)curtime);
-      new_value->append(ts_string, ts_len);
-      return true;
-    }
-  }
-
-  virtual bool PartialMergeMulti(const Slice& key,
-                                 const std::deque<Slice>& operand_list,
-                                 std::string* new_value, Logger* logger) const
-      override {
-    const uint32_t ts_len = DBWithTTLImpl::kTSLength;
-    std::deque<Slice> operands_without_ts;
-
-    for (const auto& operand : operand_list) {
-      if (operand.size() < ts_len) {
-        Log(logger, "Error: Could not remove timestamp from value.");
-        return false;
-      }
-
-      operands_without_ts.push_back(
-          Slice(operand.data(), operand.size() - ts_len));
-    }
-
-    // Apply the user partial-merge operator (store result in *new_value)
-    assert(new_value);
-    if (!user_merge_op_->PartialMergeMulti(key, operands_without_ts, new_value,
-                                           logger)) {
-      return false;
-    }
-
-    // Augment the *new_value with the ttl time-stamp
-    int64_t curtime;
-    if (!env_->GetCurrentTime(&curtime).ok()) {
-      Log(logger,
-          "Error: Could not get current time to be attached internally "
-          "to the new value.");
-      return false;
-    } else {
-      char ts_string[ts_len];
-      EncodeFixed32(ts_string, (int32_t)curtime);
-      new_value->append(ts_string, ts_len);
-      return true;
-    }
-  }
-
-  virtual const char* Name() const override { return "Merge By TTL"; }
-
- private:
-  std::shared_ptr<MergeOperator> user_merge_op_;
-  Env* env_;
-};
-}
-#endif  // ROCKSDB_LITE
diff --git a/src/rocksdb/utilities/ttl/ttl_test.cc b/src/rocksdb/utilities/ttl/ttl_test.cc
deleted file mode 100644
index 4791a2a..0000000
--- a/src/rocksdb/utilities/ttl/ttl_test.cc
+++ /dev/null
@@ -1,595 +0,0 @@
-// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#include <memory>
-#include "rocksdb/compaction_filter.h"
-#include "utilities/db_ttl.h"
-#include "util/testharness.h"
-#include "util/logging.h"
-#include <map>
-#include <unistd.h>
-
-namespace rocksdb {
-
-namespace {
-
-typedef std::map<std::string, std::string> KVMap;
-
-enum BatchOperation {
-  PUT = 0,
-  DELETE = 1
-};
-}
-
-class SpecialTimeEnv : public EnvWrapper {
- public:
-  explicit SpecialTimeEnv(Env* base) : EnvWrapper(base) {
-    base->GetCurrentTime(&current_time_);
-  }
-
-  void Sleep(int64_t sleep_time) { current_time_ += sleep_time; }
-  virtual Status GetCurrentTime(int64_t* current_time) {
-    *current_time = current_time_;
-    return Status::OK();
-  }
-
- private:
-  int64_t current_time_;
-};
-
-class TtlTest {
- public:
-  TtlTest() {
-    env_.reset(new SpecialTimeEnv(Env::Default()));
-    dbname_ = test::TmpDir() + "/db_ttl";
-    options_.create_if_missing = true;
-    options_.env = env_.get();
-    // ensure that compaction is kicked in to always strip timestamp from kvs
-    options_.max_grandparent_overlap_factor = 0;
-    // compaction should take place always from level0 for determinism
-    options_.max_mem_compaction_level = 0;
-    db_ttl_ = nullptr;
-    DestroyDB(dbname_, Options());
-  }
-
-  ~TtlTest() {
-    CloseTtl();
-    DestroyDB(dbname_, Options());
-  }
-
-  // Open database with TTL support when TTL not provided with db_ttl_ pointer
-  void OpenTtl() {
-    ASSERT_TRUE(db_ttl_ ==
-                nullptr);  //  db should be closed before opening again
-    ASSERT_OK(DBWithTTL::Open(options_, dbname_, &db_ttl_));
-  }
-
-  // Open database with TTL support when TTL provided with db_ttl_ pointer
-  void OpenTtl(int32_t ttl) {
-    ASSERT_TRUE(db_ttl_ == nullptr);
-    ASSERT_OK(DBWithTTL::Open(options_, dbname_, &db_ttl_, ttl));
-  }
-
-  // Open with TestFilter compaction filter
-  void OpenTtlWithTestCompaction(int32_t ttl) {
-    options_.compaction_filter_factory =
-      std::shared_ptr<CompactionFilterFactory>(
-          new TestFilterFactory(kSampleSize_, kNewValue_));
-    OpenTtl(ttl);
-  }
-
-  // Open database with TTL support in read_only mode
-  void OpenReadOnlyTtl(int32_t ttl) {
-    ASSERT_TRUE(db_ttl_ == nullptr);
-    ASSERT_OK(DBWithTTL::Open(options_, dbname_, &db_ttl_, ttl, true));
-  }
-
-  void CloseTtl() {
-    delete db_ttl_;
-    db_ttl_ = nullptr;
-  }
-
-  // Populates and returns a kv-map
-  void MakeKVMap(int64_t num_entries) {
-    kvmap_.clear();
-    int digits = 1;
-    for (int dummy = num_entries; dummy /= 10 ; ++digits);
-    int digits_in_i = 1;
-    for (int64_t i = 0; i < num_entries; i++) {
-      std::string key = "key";
-      std::string value = "value";
-      if (i % 10 == 0) {
-        digits_in_i++;
-      }
-      for(int j = digits_in_i; j < digits; j++) {
-        key.append("0");
-        value.append("0");
-      }
-      AppendNumberTo(&key, i);
-      AppendNumberTo(&value, i);
-      kvmap_[key] = value;
-    }
-    ASSERT_EQ((int)kvmap_.size(), num_entries);//check all insertions done
-  }
-
-  // Makes a write-batch with key-vals from kvmap_ and 'Write''s it
-  void MakePutWriteBatch(const BatchOperation* batch_ops, int num_ops) {
-    ASSERT_LE(num_ops, (int)kvmap_.size());
-    static WriteOptions wopts;
-    static FlushOptions flush_opts;
-    WriteBatch batch;
-    kv_it_ = kvmap_.begin();
-    for (int i = 0; i < num_ops && kv_it_ != kvmap_.end(); i++, kv_it_++) {
-      switch (batch_ops[i]) {
-        case PUT:
-          batch.Put(kv_it_->first, kv_it_->second);
-          break;
-        case DELETE:
-          batch.Delete(kv_it_->first);
-          break;
-        default:
-          ASSERT_TRUE(false);
-      }
-    }
-    db_ttl_->Write(wopts, &batch);
-    db_ttl_->Flush(flush_opts);
-  }
-
-  // Puts num_entries starting from start_pos_map from kvmap_ into the database
-  void PutValues(int start_pos_map, int num_entries, bool flush = true,
-                 ColumnFamilyHandle* cf = nullptr) {
-    ASSERT_TRUE(db_ttl_);
-    ASSERT_LE(start_pos_map + num_entries, (int)kvmap_.size());
-    static WriteOptions wopts;
-    static FlushOptions flush_opts;
-    kv_it_ = kvmap_.begin();
-    advance(kv_it_, start_pos_map);
-    for (int i = 0; kv_it_ != kvmap_.end() && i < num_entries; i++, kv_it_++) {
-      ASSERT_OK(cf == nullptr
-                    ? db_ttl_->Put(wopts, kv_it_->first, kv_it_->second)
-                    : db_ttl_->Put(wopts, cf, kv_it_->first, kv_it_->second));
-    }
-    // Put a mock kv at the end because CompactionFilter doesn't delete last key
-    ASSERT_OK(cf == nullptr ? db_ttl_->Put(wopts, "keymock", "valuemock")
-                            : db_ttl_->Put(wopts, cf, "keymock", "valuemock"));
-    if (flush) {
-      if (cf == nullptr) {
-        db_ttl_->Flush(flush_opts);
-      } else {
-        db_ttl_->Flush(flush_opts, cf);
-      }
-    }
-  }
-
-  // Runs a manual compaction
-  void ManualCompact(ColumnFamilyHandle* cf = nullptr) {
-    if (cf == nullptr) {
-      db_ttl_->CompactRange(nullptr, nullptr);
-    } else {
-      db_ttl_->CompactRange(cf, nullptr, nullptr);
-    }
-  }
-
-  // checks the whole kvmap_ to return correct values using KeyMayExist
-  void SimpleKeyMayExistCheck() {
-    static ReadOptions ropts;
-    bool value_found;
-    std::string val;
-    for(auto &kv : kvmap_) {
-      bool ret = db_ttl_->KeyMayExist(ropts, kv.first, &val, &value_found);
-      if (ret == false || value_found == false) {
-        fprintf(stderr, "KeyMayExist could not find key=%s in the database but"
-                        " should have\n", kv.first.c_str());
-        ASSERT_TRUE(false);
-      } else if (val.compare(kv.second) != 0) {
-        fprintf(stderr, " value for key=%s present in database is %s but"
-                        " should be %s\n", kv.first.c_str(), val.c_str(),
-                        kv.second.c_str());
-        ASSERT_TRUE(false);
-      }
-    }
-  }
-
-  // Sleeps for slp_tim then runs a manual compaction
-  // Checks span starting from st_pos from kvmap_ in the db and
-  // Gets should return true if check is true and false otherwise
-  // Also checks that value that we got is the same as inserted; and =kNewValue
-  //   if test_compaction_change is true
-  void SleepCompactCheck(int slp_tim, int st_pos, int span, bool check = true,
-                         bool test_compaction_change = false,
-                         ColumnFamilyHandle* cf = nullptr) {
-    ASSERT_TRUE(db_ttl_);
-
-    env_->Sleep(slp_tim);
-    ManualCompact(cf);
-    static ReadOptions ropts;
-    kv_it_ = kvmap_.begin();
-    advance(kv_it_, st_pos);
-    std::string v;
-    for (int i = 0; kv_it_ != kvmap_.end() && i < span; i++, kv_it_++) {
-      Status s = (cf == nullptr) ? db_ttl_->Get(ropts, kv_it_->first, &v)
-                                 : db_ttl_->Get(ropts, cf, kv_it_->first, &v);
-      if (s.ok() != check) {
-        fprintf(stderr, "key=%s ", kv_it_->first.c_str());
-        if (!s.ok()) {
-          fprintf(stderr, "is absent from db but was expected to be present\n");
-        } else {
-          fprintf(stderr, "is present in db but was expected to be absent\n");
-        }
-        ASSERT_TRUE(false);
-      } else if (s.ok()) {
-          if (test_compaction_change && v.compare(kNewValue_) != 0) {
-            fprintf(stderr, " value for key=%s present in database is %s but "
-                            " should be %s\n", kv_it_->first.c_str(), v.c_str(),
-                            kNewValue_.c_str());
-            ASSERT_TRUE(false);
-          } else if (!test_compaction_change && v.compare(kv_it_->second) !=0) {
-            fprintf(stderr, " value for key=%s present in database is %s but "
-                            " should be %s\n", kv_it_->first.c_str(), v.c_str(),
-                            kv_it_->second.c_str());
-            ASSERT_TRUE(false);
-          }
-      }
-    }
-  }
-
-  // Similar as SleepCompactCheck but uses TtlIterator to read from db
-  void SleepCompactCheckIter(int slp, int st_pos, int span, bool check=true) {
-    ASSERT_TRUE(db_ttl_);
-    env_->Sleep(slp);
-    ManualCompact();
-    static ReadOptions ropts;
-    Iterator *dbiter = db_ttl_->NewIterator(ropts);
-    kv_it_ = kvmap_.begin();
-    advance(kv_it_, st_pos);
-
-    dbiter->Seek(kv_it_->first);
-    if (!check) {
-      if (dbiter->Valid()) {
-        ASSERT_NE(dbiter->value().compare(kv_it_->second), 0);
-      }
-    } else {  // dbiter should have found out kvmap_[st_pos]
-      for (int i = st_pos;
-           kv_it_ != kvmap_.end() && i < st_pos + span;
-           i++, kv_it_++)  {
-        ASSERT_TRUE(dbiter->Valid());
-        ASSERT_EQ(dbiter->value().compare(kv_it_->second), 0);
-        dbiter->Next();
-      }
-    }
-    delete dbiter;
-  }
-
-  class TestFilter : public CompactionFilter {
-   public:
-    TestFilter(const int64_t kSampleSize, const std::string kNewValue)
-      : kSampleSize_(kSampleSize),
-        kNewValue_(kNewValue) {
-    }
-
-    // Works on keys of the form "key<number>"
-    // Drops key if number at the end of key is in [0, kSampleSize_/3),
-    // Keeps key if it is in [kSampleSize_/3, 2*kSampleSize_/3),
-    // Change value if it is in [2*kSampleSize_/3, kSampleSize_)
-    // Eg. kSampleSize_=6. Drop:key0-1...Keep:key2-3...Change:key4-5...
-    virtual bool Filter(int level, const Slice& key,
-                        const Slice& value, std::string* new_value,
-                        bool* value_changed) const override {
-      assert(new_value != nullptr);
-
-      std::string search_str = "0123456789";
-      std::string key_string = key.ToString();
-      size_t pos = key_string.find_first_of(search_str);
-      int num_key_end;
-      if (pos != std::string::npos) {
-        num_key_end = stoi(key_string.substr(pos, key.size() - pos));
-      } else {
-        return false; // Keep keys not matching the format "key<NUMBER>"
-      }
-
-      int partition = kSampleSize_ / 3;
-      if (num_key_end < partition) {
-        return true;
-      } else if (num_key_end < partition * 2) {
-        return false;
-      } else {
-        *new_value = kNewValue_;
-        *value_changed = true;
-        return false;
-      }
-    }
-
-    virtual const char* Name() const override {
-      return "TestFilter";
-    }
-
-   private:
-    const int64_t kSampleSize_;
-    const std::string kNewValue_;
-  };
-
-  class TestFilterFactory : public CompactionFilterFactory {
-    public:
-      TestFilterFactory(const int64_t kSampleSize, const std::string kNewValue)
-        : kSampleSize_(kSampleSize),
-          kNewValue_(kNewValue) {
-      }
-
-      virtual std::unique_ptr<CompactionFilter> CreateCompactionFilter(
-          const CompactionFilter::Context& context) override {
-        return std::unique_ptr<CompactionFilter>(
-            new TestFilter(kSampleSize_, kNewValue_));
-      }
-
-      virtual const char* Name() const override {
-        return "TestFilterFactory";
-      }
-
-    private:
-      const int64_t kSampleSize_;
-      const std::string kNewValue_;
-  };
-
-
-  // Choose carefully so that Put, Gets & Compaction complete in 1 second buffer
-  const int64_t kSampleSize_ = 100;
-  std::string dbname_;
-  DBWithTTL* db_ttl_;
-  unique_ptr<SpecialTimeEnv> env_;
-
- private:
-  Options options_;
-  KVMap kvmap_;
-  KVMap::iterator kv_it_;
-  const std::string kNewValue_ = "new_value";
-  unique_ptr<CompactionFilter> test_comp_filter_;
-}; // class TtlTest
-
-// If TTL is non positive or not provided, the behaviour is TTL = infinity
-// This test opens the db 3 times with such default behavior and inserts a
-// bunch of kvs each time. All kvs should accumulate in the db till the end
-// Partitions the sample-size provided into 3 sets over boundary1 and boundary2
-TEST(TtlTest, NoEffect) {
-  MakeKVMap(kSampleSize_);
-  int boundary1 = kSampleSize_ / 3;
-  int boundary2 = 2 * boundary1;
-
-  OpenTtl();
-  PutValues(0, boundary1);                       //T=0: Set1 never deleted
-  SleepCompactCheck(1, 0, boundary1);            //T=1: Set1 still there
-  CloseTtl();
-
-  OpenTtl(0);
-  PutValues(boundary1, boundary2 - boundary1);   //T=1: Set2 never deleted
-  SleepCompactCheck(1, 0, boundary2);            //T=2: Sets1 & 2 still there
-  CloseTtl();
-
-  OpenTtl(-1);
-  PutValues(boundary2, kSampleSize_ - boundary2); //T=3: Set3 never deleted
-  SleepCompactCheck(1, 0, kSampleSize_, true);    //T=4: Sets 1,2,3 still there
-  CloseTtl();
-}
-
-// Puts a set of values and checks its presence using Get during ttl
-TEST(TtlTest, PresentDuringTTL) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(2);                                 // T=0:Open the db with ttl = 2
-  PutValues(0, kSampleSize_);                  // T=0:Insert Set1. Delete at t=2
-  SleepCompactCheck(1, 0, kSampleSize_, true); // T=1:Set1 should still be there
-  CloseTtl();
-}
-
-// Puts a set of values and checks its absence using Get after ttl
-TEST(TtlTest, AbsentAfterTTL) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(1);                                  // T=0:Open the db with ttl = 2
-  PutValues(0, kSampleSize_);                  // T=0:Insert Set1. Delete at t=2
-  SleepCompactCheck(2, 0, kSampleSize_, false); // T=2:Set1 should not be there
-  CloseTtl();
-}
-
-// Resets the timestamp of a set of kvs by updating them and checks that they
-// are not deleted according to the old timestamp
-TEST(TtlTest, ResetTimestamp) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(3);
-  PutValues(0, kSampleSize_);            // T=0: Insert Set1. Delete at t=3
-  env_->Sleep(2);                        // T=2
-  PutValues(0, kSampleSize_);            // T=2: Insert Set1. Delete at t=5
-  SleepCompactCheck(2, 0, kSampleSize_); // T=4: Set1 should still be there
-  CloseTtl();
-}
-
-// Similar to PresentDuringTTL but uses Iterator
-TEST(TtlTest, IterPresentDuringTTL) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(2);
-  PutValues(0, kSampleSize_);                 // T=0: Insert. Delete at t=2
-  SleepCompactCheckIter(1, 0, kSampleSize_);  // T=1: Set should be there
-  CloseTtl();
-}
-
-// Similar to AbsentAfterTTL but uses Iterator
-TEST(TtlTest, IterAbsentAfterTTL) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(1);
-  PutValues(0, kSampleSize_);                      // T=0: Insert. Delete at t=1
-  SleepCompactCheckIter(2, 0, kSampleSize_, false); // T=2: Should not be there
-  CloseTtl();
-}
-
-// Checks presence while opening the same db more than once with the same ttl
-// Note: The second open will open the same db
-TEST(TtlTest, MultiOpenSamePresent) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(2);
-  PutValues(0, kSampleSize_);                   // T=0: Insert. Delete at t=2
-  CloseTtl();
-
-  OpenTtl(2);                                  // T=0. Delete at t=2
-  SleepCompactCheck(1, 0, kSampleSize_);        // T=1: Set should be there
-  CloseTtl();
-}
-
-// Checks absence while opening the same db more than once with the same ttl
-// Note: The second open will open the same db
-TEST(TtlTest, MultiOpenSameAbsent) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(1);
-  PutValues(0, kSampleSize_);                   // T=0: Insert. Delete at t=1
-  CloseTtl();
-
-  OpenTtl(1);                                  // T=0.Delete at t=1
-  SleepCompactCheck(2, 0, kSampleSize_, false); // T=2: Set should not be there
-  CloseTtl();
-}
-
-// Checks presence while opening the same db more than once with bigger ttl
-TEST(TtlTest, MultiOpenDifferent) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(1);
-  PutValues(0, kSampleSize_);            // T=0: Insert. Delete at t=1
-  CloseTtl();
-
-  OpenTtl(3);                           // T=0: Set deleted at t=3
-  SleepCompactCheck(2, 0, kSampleSize_); // T=2: Set should be there
-  CloseTtl();
-}
-
-// Checks presence during ttl in read_only mode
-TEST(TtlTest, ReadOnlyPresentForever) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl(1);                                 // T=0:Open the db normally
-  PutValues(0, kSampleSize_);                  // T=0:Insert Set1. Delete at t=1
-  CloseTtl();
-
-  OpenReadOnlyTtl(1);
-  SleepCompactCheck(2, 0, kSampleSize_);       // T=2:Set1 should still be there
-  CloseTtl();
-}
-
-// Checks whether WriteBatch works well with TTL
-// Puts all kvs in kvmap_ in a batch and writes first, then deletes first half
-TEST(TtlTest, WriteBatchTest) {
-  MakeKVMap(kSampleSize_);
-  BatchOperation batch_ops[kSampleSize_];
-  for (int i = 0; i < kSampleSize_; i++) {
-    batch_ops[i] = PUT;
-  }
-
-  OpenTtl(2);
-  MakePutWriteBatch(batch_ops, kSampleSize_);
-  for (int i = 0; i < kSampleSize_ / 2; i++) {
-    batch_ops[i] = DELETE;
-  }
-  MakePutWriteBatch(batch_ops, kSampleSize_ / 2);
-  SleepCompactCheck(0, 0, kSampleSize_ / 2, false);
-  SleepCompactCheck(0, kSampleSize_ / 2, kSampleSize_ - kSampleSize_ / 2);
-  CloseTtl();
-}
-
-// Checks user's compaction filter for correctness with TTL logic
-TEST(TtlTest, CompactionFilter) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtlWithTestCompaction(1);
-  PutValues(0, kSampleSize_);                  // T=0:Insert Set1. Delete at t=1
-  // T=2: TTL logic takes precedence over TestFilter:-Set1 should not be there
-  SleepCompactCheck(2, 0, kSampleSize_, false);
-  CloseTtl();
-
-  OpenTtlWithTestCompaction(3);
-  PutValues(0, kSampleSize_);                   // T=0:Insert Set1.
-  int partition = kSampleSize_ / 3;
-  SleepCompactCheck(1, 0, partition, false);   // Part dropped
-  SleepCompactCheck(0, partition, partition);  // Part kept
-  SleepCompactCheck(0, 2 * partition, partition, true, true); // Part changed
-  CloseTtl();
-}
-
-// Insert some key-values which KeyMayExist should be able to get and check that
-// values returned are fine
-TEST(TtlTest, KeyMayExist) {
-  MakeKVMap(kSampleSize_);
-
-  OpenTtl();
-  PutValues(0, kSampleSize_, false);
-
-  SimpleKeyMayExistCheck();
-
-  CloseTtl();
-}
-
-TEST(TtlTest, ColumnFamiliesTest) {
-  DB* db;
-  Options options;
-  options.create_if_missing = true;
-  options.env = env_.get();
-
-  DB::Open(options, dbname_, &db);
-  ColumnFamilyHandle* handle;
-  ASSERT_OK(db->CreateColumnFamily(ColumnFamilyOptions(options),
-                                   "ttl_column_family", &handle));
-
-  delete handle;
-  delete db;
-
-  std::vector<ColumnFamilyDescriptor> column_families;
-  column_families.push_back(ColumnFamilyDescriptor(
-      kDefaultColumnFamilyName, ColumnFamilyOptions(options)));
-  column_families.push_back(ColumnFamilyDescriptor(
-      "ttl_column_family", ColumnFamilyOptions(options)));
-
-  std::vector<ColumnFamilyHandle*> handles;
-
-  ASSERT_OK(DBWithTTL::Open(DBOptions(options), dbname_, column_families,
-                            &handles, &db_ttl_, {3, 5}, false));
-  ASSERT_EQ(handles.size(), 2U);
-  ColumnFamilyHandle* new_handle;
-  ASSERT_OK(db_ttl_->CreateColumnFamilyWithTtl(options, "ttl_column_family_2",
-                                               &new_handle, 2));
-  handles.push_back(new_handle);
-
-  MakeKVMap(kSampleSize_);
-  PutValues(0, kSampleSize_, false, handles[0]);
-  PutValues(0, kSampleSize_, false, handles[1]);
-  PutValues(0, kSampleSize_, false, handles[2]);
-
-  // everything should be there after 1 second
-  SleepCompactCheck(1, 0, kSampleSize_, true, false, handles[0]);
-  SleepCompactCheck(0, 0, kSampleSize_, true, false, handles[1]);
-  SleepCompactCheck(0, 0, kSampleSize_, true, false, handles[2]);
-
-  // only column family 1 should be alive after 4 seconds
-  SleepCompactCheck(3, 0, kSampleSize_, false, false, handles[0]);
-  SleepCompactCheck(0, 0, kSampleSize_, true, false, handles[1]);
-  SleepCompactCheck(0, 0, kSampleSize_, false, false, handles[2]);
-
-  // nothing should be there after 6 seconds
-  SleepCompactCheck(2, 0, kSampleSize_, false, false, handles[0]);
-  SleepCompactCheck(0, 0, kSampleSize_, false, false, handles[1]);
-  SleepCompactCheck(0, 0, kSampleSize_, false, false, handles[2]);
-
-  for (auto h : handles) {
-    delete h;
-  }
-  delete db_ttl_;
-  db_ttl_ = nullptr;
-}
-
-} //  namespace rocksdb
-
-// A black-box test for the ttl wrapper around rocksdb
-int main(int argc, char** argv) {
-  return rocksdb::test::RunAllTests();
-}
diff --git a/src/sample.ceph.conf b/src/sample.ceph.conf
index b2c56f5..139a05c 100644
--- a/src/sample.ceph.conf
+++ b/src/sample.ceph.conf
@@ -78,11 +78,7 @@
     # comprising the Ceph Storage Cluster.
     # Type: Boolean (optional)
     # (Default: false)
-    ;cephx require signatures   = true
-
-    # kernel RBD client do not support authentication yet:
-    cephx cluster require signatures = true
-    cephx service require signatures = false
+    cephx require signatures   = true    ; everywhere possible
 
     # The path to the keyring file.
     # Type: String (optional)
@@ -95,8 +91,8 @@
 
     ## Replication level, number of data copies.
     # Type: 32-bit Integer
-    # (Default: 3)
-    ;osd pool default size      = 3
+    # (Default: 2)
+    ;osd pool default size      = 2
 
     ## Replication level in degraded state, less than 'osd pool default size' value.
     # Sets the minimum number of written replicas for objects in the
@@ -106,7 +102,7 @@
     # operating in degraded mode.
     # Type: 32-bit Integer
     # (Default: 0), which means no particular minimum. If 0, minimum is size - (size / 2).
-    ;osd pool default min size  = 2
+    ;osd pool default min size  = 1
 
     ## Ensure you have a realistic number of placement groups. We recommend
     ## approximately 100 per OSD. E.g., total number of OSDs multiplied by 100
@@ -118,14 +114,14 @@
     #              default value is the same as pg_num with mkpool.
     # Type: 32-bit Integer
     # (Default: 8)
-    ;osd pool default pg num    = 128
+    ;osd pool default pg num    = 100
 
     # Description: The default number of placement groups for placement for a
     #              pool. The default value is the same as pgp_num with mkpool.
     #              PG and PGP should be equal (for now).
     # Type: 32-bit Integer
     # (Default: 8)
-    ;osd pool default pgp num   = 128
+    ;osd pool default pgp num   = 100
 
     # The default CRUSH ruleset to use when creating a pool
     # Type: 32-bit Integer
@@ -139,18 +135,11 @@
     ;osd crush chooseleaf type = 1
 
 
-### http://ceph.com/docs/master/rados/troubleshooting/log-and-debug/
+### http://ceph.com/docs/bobtail/rados/configuration/log-and-debug-ref/
 
-    # The location of the logging file for your cluster.
-    # Type: String
-    # Required: No
     # Default: /var/log/ceph/$cluster-$name.log
     ;log file                   = /var/log/ceph/$cluster-$name.log
 
-    # Determines if logging messages should appear in syslog.
-    # Type: Boolean
-    # Required: No
-    # (Default: false)
     ;log to syslog              = true
 
 
@@ -162,13 +151,29 @@
     # (Default: false)
     ;ms bind ipv6               = true
 
+
+### http://ceph.com/docs/master/rados/configuration/filestore-config-ref/
+
+    # The maximum interval in seconds for synchronizing the filestore.
+    # Type: Double (optional)
+    # (Default: 5)
+    ;filestore max sync interval = 5
+
+    # Use object map for XATTRS. Set to true for ext4 file systems only.
+    # Type: Boolean (optional)
+    # (Default: false)
+    ;filestore xattr use omap    = true
+
+### http://ceph.com/docs/master/rados/configuration/journal-ref/
+
 ##################
 ## Monitors
 ## You need at least one. You need at least three if you want to
 ## tolerate any node failures. Always create an odd number.
 [mon]
+### http://ceph.com/docs/argonaut/config-ref/mon-config/
 ### http://ceph.com/docs/master/rados/configuration/mon-config-ref/
-### http://ceph.com/docs/master/rados/configuration/mon-osd-interaction/
+### http://ceph.com/docs/dumpling/rados/configuration/mon-osd-interaction/
 
     # The IDs of initial monitors in a cluster during startup.
     # If specified, Ceph requires an odd number of monitors to form an
@@ -180,7 +185,7 @@
     ;mon host                   = cephhost01,cephhost02
     ;mon addr                   = 192.168.0.101,192.168.0.102
 
-    # The monitor's data location
+    # The monitor’s data location
     # Default: /var/lib/ceph/mon/$cluster-$id
     ;mon data                   = /var/lib/ceph/mon/$name
 
@@ -192,7 +197,7 @@
     # Exponential backoff for clock drift warnings
     # Type: Float
     # (Default: 5)
-    ;mon clock drift warn backoff = 30    # Tell the monitor to backoff from this warning for 30 seconds
+    ;mon clock drift warn backoff = 30    ; Tell the monitor to backoff from this warning for 30 seconds
 
     # The percentage of disk space used before an OSD is considered full.
     # Type: Float
@@ -204,19 +209,8 @@
     # (Default: .85)
     ;mon osd nearfull ratio     = .85
 
-    # The number of seconds Ceph waits before marking a Ceph OSD
-    # Daemon "down" and "out" if it doesn't respond.
-    # Type: 32-bit Integer
-    # (Default: 300)
-    ;mon osd down out interval  = 300
-
-    # The grace period in seconds before declaring unresponsive Ceph OSD
-    # Daemons "down".
-    # Type: 32-bit Integer
-    # (Default: 900)
-    ;mon osd report timeout          = 300
 
-### http://ceph.com/docs/master/rados/troubleshooting/log-and-debug/
+### http://ceph.com/docs/next/rados/troubleshooting/log-and-debug/
 
     # logging, for debugging monitor crashes, in order of
     # their likelihood of being helpful :)
@@ -245,28 +239,16 @@
 # experimental support for running multiple metadata servers. Do not run
 # multiple metadata servers in production.
 [mds]
+### http://ceph.com/docs/argonaut/config-ref/mds-config/
 ### http://ceph.com/docs/master/cephfs/mds-config-ref/
 
     # where the mds keeps it's secret encryption keys
     ;keyring                    = /var/lib/ceph/mds/$name/keyring
 
-    # Determines whether a 'ceph-mds' daemon should poll and
-    # replay the log of an active MDS (hot standby).
-    # Type:  Boolean
-    # (Default: false)
-    ;mds standby replay          = true
-
     ; mds logging to debug issues.
     ;debug ms                   = 1
     ;debug mds                  = 20
-    ;debug journaler            = 20
 
-    # The number of inodes to cache.
-    # Type: 32-bit Integer
-    # (Default: 100000)
-    ;mds cache size             = 250000
-
-    ;mds mem max                = 1048576     # KB
 
 ;[mds.alpha]
 ;    host                       = alpha
@@ -279,7 +261,8 @@
 # You need at least one.  Two or more if you want data to be replicated.
 # Define as many as you like.
 [osd]
-### http://ceph.com/docs/master/rados/configuration/osd-config-ref/
+### http://ceph.com/docs/argonaut/config-ref/osd-config/
+### http://ceph.com/docs/bobtail/rados/configuration/osd-config-ref/
 
     # The path to the OSDs data.
     # You must create the directory when deploying Ceph.
@@ -299,21 +282,15 @@
     # (Default: 5)
     ;osd recovery max active      = 3
 
-    # The maximum number of backfills allowed to or from a single OSD.
-    # Type: 64-bit Integer
-    # (Default: 10)
-    ;osd max backfills            = 5
-
-    # The maximum number of simultaneous scrub operations for a Ceph OSD Daemon.
-    # Type: 32-bit Int
-    # (Default: 1)
-    ;osd max scrubs               = 2
 
-    # You may add settings for ceph-deploy so that it will create and mount
-    # the correct type of file system. Remove the comment `#` character for
+    # You may add settings for mkcephfs so that it will create and mount
+    # the file system for you. Remove the comment `#` character for
     # the following settings and replace the values in parenthesis
     # with appropriate values, or leave the following settings commented
-    # out to accept the default values.
+    # out to accept the default values. You must specify the --mkfs
+    # option with mkcephfs in order for the deployment script to
+    # utilize the following settings, and you must define the 'devs'
+    # option for each osd instance; see below.
 
     #osd mkfs type = {fs-type}
     #osd mkfs options {fs-type}   = {mkfs options}   # default for xfs is "-f"
@@ -326,7 +303,7 @@
     ## disks.  You can use a file under the osd data dir if need be
     ## (e.g. /data/$name/journal), but it will be slower than a
     ## separate disk or partition.
-    # The path to the OSD's journal. This may be a path to a file or a block
+    # The path to the OSD’s journal. This may be a path to a file or a block
     # device (such as a partition of an SSD). If it is a file, you must
     # create the directory to contain it.
     # We recommend using a drive separate from the osd data drive.
@@ -334,11 +311,6 @@
     # Default: /var/lib/ceph/osd/$cluster-$id/journal
     ;osd journal                  = /var/lib/ceph/osd/$name/journal
 
-    # Check log files for corruption. Can be computationally expensive.
-    # Type: Boolean
-    # (Default: false)
-    ;osd check for log corruption = true
-
 ### http://ceph.com/docs/master/rados/configuration/journal-ref/
 
     # The size of the journal in megabytes. If this is 0,
@@ -349,183 +321,44 @@
     # (Default: 5120)
     # Recommended: Begin with 1GB. Should be at least twice the product
     # of the expected speed multiplied by "filestore max sync interval".
-    ;osd journal size             = 2048     ; journal size, in megabytes
+    ;osd journal size             = 1000     ; journal size, in megabytes
 
     ## If you want to run the journal on a tmpfs, disable DirectIO
     # Enables direct i/o to the journal.
-    # Requires "journal block align" set to "true".
+    # Requires journal block align set to true.
     # Type: Boolean
     # Required: Yes when using aio.
     # (Default: true)
     ;journal dio                  = false
 
+    # Check log files for corruption. Can be computationally expensive.
+    # Type: Boolean
+    # (Default: false)
+    ;osd check for log corruption = true
+
     # osd logging to debug osd issues, in order of likelihood of being helpful
     ;debug ms                     = 1
     ;debug osd                    = 20
     ;debug filestore              = 20
     ;debug journal                = 20
 
-### http://ceph.com/docs/master/rados/configuration/filestore-config-ref/
-
-    # The maximum interval in seconds for synchronizing the filestore.
-    # Type: Double (optional)
-    # (Default: 5)
-    ;filestore max sync interval = 5
-
-    # Enable snapshots for a btrfs filestore.
-    # Type: Boolean
-    # Required: No. Only used for btrfs.
-    # (Default: true)
-    ;filestore btrfs snap        = false
-
-    # Enables the filestore flusher.
-    # Type: Boolean
-    # Required: No
-    # (Default: false)
-    ;filestore flusher            = true
-
-    # Defines the maximum number of in progress operations the file store
-    # accepts before blocking on queuing new operations.
-    # Type: Integer
-    # Required: No. Minimal impact on performance.
-    # (Default: 500)
-    ;filestore queue max ops      = 500
-
-    ## Filestore and OSD settings can be tweak to achieve better performance
-
-### http://ceph.com/docs/master/rados/configuration/filestore-config-ref/#misc
-
-    # Min number of files in a subdir before merging into parent NOTE: A negative value means to disable subdir merging
-    # Type: Integer
-    # Required: No
-    # Default:  10
-    ;filestore merge threshold    = 10
-
-    # filestore_split_multiple * abs(filestore_merge_threshold) * 16 is the maximum number of files in a subdirectory before splitting into child directories.
-    # Type: Integer
-    # Required: No
-    # Default:  2
-    ;filestore split multiple     = 2
-
-    # The number of filesystem operation threads that execute in parallel.
-    # Type: Integer
-    # Required: No
-    # Default:  2
-    ;filestore op threads         = 4
-
-    # The number of threads to service Ceph OSD Daemon operations. Set to 0 to disable it. Increasing the number may increase the request processing rate.
-    # Type: 32-bit Integer
-    # Default:  2
-    ;osd op threads               = 2
 
-    ## CRUSH
-
-    # By default OSDs update their details (location, weight and root) on the CRUSH map during startup
-    # Type: Boolean
-    # Required: No;
-    # (Default: true)
-    ;osd crush update on start    = false
 
 ;[osd.0]
 ;    host                         = delta
 
+    # If 'devs' is not specified, you're responsible for
+    # setting up the 'osd data' dir (e.g. `mkdir /var/lib/ceph/osd/ceph-0`)
+    ;devs                         = /dev/sdx
+
 ;[osd.1]
 ;    host                         = epsilon
+;    devs                         = /dev/sdy
 
 ;[osd.2]
 ;    host                         = zeta
+;    devs                         = /dev/sdx
 
 ;[osd.3]
 ;    host                         = eta
-
-
-##################
-## client settings
-[client]
-
-### http://ceph.com/docs/master/rbd/rbd-config-ref/
-
-    # Enable caching for RADOS Block Device (RBD).
-    # Type: Boolean
-    # Required: No
-    # (Default: false)
-    rbd cache                  = true
-
-    # The RBD cache size in bytes.
-    # Type: 64-bit Integer
-    # Required: No
-    # (Default: 32 MiB)
-    ;rbd cache size            = 33554432
-
-    # The dirty limit in bytes at which the cache triggers write-back.
-    # If 0, uses write-through caching.
-    # Type: 64-bit Integer
-    # Required: No
-    # Constraint: Must be less than rbd cache size.
-    # (Default: 24 MiB)
-    ;rbd cache max dirty       = 25165824
-
-    # The dirty target before the cache begins writing data to the data storage.
-    # Does not block writes to the cache.
-    # Type: 64-bit Integer
-    # Required: No
-    # Constraint: Must be less than rbd cache max dirty.
-    # (Default: 16 MiB)
-    ;rbd cache target dirty    = 16777216
-
-    # The number of seconds dirty data is in the cache before writeback starts.
-    # Type: Float
-    # Required: No
-    # (Default: 1.0)
-    ;rbd cache max dirty age   = 1.0
-
-    # Start out in write-through mode, and switch to write-back after the
-    # first flush request is received. Enabling this is a conservative but
-    # safe setting in case VMs running on rbd are too old to send flushes,
-    # like the virtio driver in Linux before 2.6.32.
-    # Type: Boolean
-    # Required: No
-    # (Default: false)
-    ;rbd cache writethrough until flush = false
-
-##################
-## radosgw client settings
-[client.radosgw.gateway]
-
-### http://ceph.com/docs/master/radosgw/config-ref/
-
-    # Sets the location of the data files for Ceph Object Gateway.
-    # You must create the directory when deploying Ceph.
-    # We do not recommend changing the default.
-    # Type: String
-    # Default: /var/lib/ceph/radosgw/$cluster-$id
-    ;rgw data                     = /var/lib/ceph/radosgw/$name
-
-    # Client's hostname
-    ;host                         =  ceph-radosgw
-
-    # where the radosgw keeps it's secret encryption keys
-    ;keyring                      = /etc/ceph/ceph.client.radosgw.keyring
-
-    # FastCgiExternalServer uses this socket.
-    # If you do not specify a socket path, Ceph Object Gateway will not run as an external server.
-    # The path you specify here must be the same as the path specified in the rgw.conf file.
-    # Type: String
-    # Default: None
-    ;rgw socket path              = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
-
-    # The location of the logging file for your radosgw.
-    # Type: String
-    # Required: No
-    # Default: /var/log/ceph/$cluster-$name.log
-    ;log file                     = /var/log/ceph/client.radosgw.gateway.log
-
-    # Enable 100-continue if it is operational.
-    # Type: Boolean
-    # Default:  true
-    ;rgw print continue           = false
-
-    # The DNS name of the served domain.
-    # Type: String
-    # Default:  None
-    ;rgw dns name                 = radosgw.ceph.internal
+;    devs                         = /dev/sdy
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index bbc9c97..69f9e84 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -239,17 +239,13 @@ check_SCRIPTS += \
 	test/mon/osd-crush.sh \
 	test/mon/osd-erasure-code-profile.sh \
 	test/mon/mkfs.sh \
-	test/osd/osd-config.sh \
-	test/osd/osd-bench.sh \
 	test/ceph-disk.sh \
 	test/mon/mon-handle-forward.sh \
 	test/vstart_wrapped_tests.sh
 
 EXTRA_DIST += \
 	$(srcdir)/test/mon/mon-test-helpers.sh \
-	$(srcdir)/test/osd/osd-test-helpers.sh \
-        $(srcdir)/test/coverage.sh \
-	$(patsubst %,$(srcdir)/%,$(check_SCRIPTS))
+	$(srcdir)/test/osd/osd-test-helpers.sh
 
 # target to build but not run the unit tests
 unittests:: $(check_PROGRAMS)
@@ -293,11 +289,6 @@ unittest_sharedptr_registry_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_sharedptr_registry_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 check_PROGRAMS += unittest_sharedptr_registry
 
-unittest_shared_cache_SOURCES = test/common/test_shared_cache.cc
-unittest_shared_cache_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_shared_cache_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-check_PROGRAMS += unittest_shared_cache
-
 unittest_sloppy_crc_map_SOURCES = test/common/test_sloppy_crc_map.cc
 unittest_sloppy_crc_map_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_sloppy_crc_map_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -391,11 +382,6 @@ unittest_hitset_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_hitset_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 check_PROGRAMS += unittest_hitset
 
-unittest_lru_SOURCES = test/common/test_lru.cc
-unittest_lru_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_lru_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-check_PROGRAMS += unittest_lru
-
 unittest_io_priority_SOURCES = test/common/test_io_priority.cc
 unittest_io_priority_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_io_priority_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
@@ -587,17 +573,6 @@ unittest_on_exit_SOURCES = test/on_exit.cc
 unittest_on_exit_LDADD = $(PTHREAD_LIBS)
 check_PROGRAMS += unittest_on_exit
 
-unittest_rbd_replay_SOURCES = test/test_rbd_replay.cc
-unittest_rbd_replay_LDADD = $(LIBRBD) \
-	$(LIBRADOS) \
-	$(CEPH_GLOBAL) \
-	librbd_replay.la \
-	librbd_replay_ios.la \
-	$(UNITTEST_LDADD)
-unittest_rbd_replay_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-check_PROGRAMS += unittest_rbd_replay
-
-
 check_SCRIPTS += test/pybind/test_ceph_argparse.py
 
 if WITH_RADOSGW
@@ -659,12 +634,6 @@ noinst_LTLIBRARIES += libradostest.la
 libradostest_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 RADOS_TEST_LDADD = libradostest.la
 
-libradosstripertest_la_SOURCES = test/libradosstriper/TestCase.cc
-noinst_LTLIBRARIES += libradosstripertest.la
-libradosstripertest_la_LIBADD = $(RADOS_TEST_LDADD)
-libradosstripertest_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-RADOS_STRIPER_TEST_LDADD = libradosstripertest.la
-
 ceph_multi_stress_watch_SOURCES = test/multi_stress_watch.cc
 ceph_multi_stress_watch_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
 bin_DEBUGPROGRAMS += ceph_multi_stress_watch
@@ -675,10 +644,9 @@ ceph_test_librbd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_librbd
 
 if LINUX
-# Force use of C++ linker with dummy.cc - LIBKRBD is a C++ library
-ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c common/dummy.cc
-ceph_test_librbd_fsx_LDADD = $(LIBKRBD) $(LIBRBD) $(LIBRADOS)
-ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS}
+ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
+ceph_test_librbd_fsx_LDADD = $(LIBRBD) $(LIBRADOS) -lm
+ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
 bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
 endif
 
@@ -737,11 +705,6 @@ ceph_test_mon_workloadgen_SOURCES = test/mon/test_mon_workloadgen.cc
 ceph_test_mon_workloadgen_LDADD = $(LIBOS) $(LIBOSDC) $(CEPH_GLOBAL)
 bin_DEBUGPROGRAMS += ceph_test_mon_workloadgen
 
-ceph_test_mon_msg_SOURCES = test/mon/test-mon-msg.cc
-ceph_test_mon_msg_LDADD = $(LIBOS) $(LIBOSDC) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
-ceph_test_mon_msg_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_mon_msg
-
 ceph_test_rados_api_cmd_SOURCES = test/librados/cmd.cc
 ceph_test_rados_api_cmd_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
 ceph_test_rados_api_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
@@ -816,21 +779,6 @@ ceph_test_rados_api_lock_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDAD
 ceph_test_rados_api_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_rados_api_lock
 
-ceph_test_rados_striper_api_io_SOURCES = test/libradosstriper/io.cc
-ceph_test_rados_striper_api_io_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_io_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_rados_striper_api_io
-
-ceph_test_rados_striper_api_aio_SOURCES = test/libradosstriper/aio.cc
-ceph_test_rados_striper_api_aio_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_aio_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_rados_striper_api_aio
-
-ceph_test_rados_striper_api_striping_SOURCES = test/libradosstriper/striping.cc
-ceph_test_rados_striper_api_striping_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
-ceph_test_rados_striper_api_striping_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_rados_striper_api_striping
-
 ceph_test_libcephfs_SOURCES = \
 	test/libcephfs/test.cc \
 	test/libcephfs/readdir_r_cb.cc \
@@ -845,11 +793,6 @@ ceph_test_objectstore_SOURCES = test/objectstore/store_test.cc
 ceph_test_objectstore_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 ceph_test_objectstore_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_objectstore
-
-ceph_test_filestore_SOURCES = test/filestore/TestFileStore.cc
-ceph_test_filestore_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-ceph_test_filestore_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_filestore
 endif
 
 ceph_test_objectstore_workloadgen_SOURCES = \
@@ -949,7 +892,6 @@ noinst_HEADERS += \
 	test/kv_store_bench.h \
 	test/librados/test.h \
 	test/librados/TestCase.h \
-	test/libradosstriper/TestCase.h \
 	test/ObjectMap/KeyValueDBMemory.h \
 	test/omap_bench.h \
 	test/osdc/FakeWriteback.h \
diff --git a/src/test/ObjectMap/KeyValueDBMemory.cc b/src/test/ObjectMap/KeyValueDBMemory.cc
index 8883b95..c03e169 100644
--- a/src/test/ObjectMap/KeyValueDBMemory.cc
+++ b/src/test/ObjectMap/KeyValueDBMemory.cc
@@ -80,7 +80,7 @@ public:
 
   int lower_bound(const string &prefix, const string &to) {
     it = db->db.lower_bound(make_pair(prefix,to));
-    if ((db->db.empty()) || (it == db->db.end())) {
+    if ((db->db.size() == 0) || (it == db->db.end())) {
       it = db->db.end();
       ready = false;
       return 0;
@@ -94,7 +94,7 @@ public:
 
   int upper_bound(const string &prefix, const string &after) {
     it = db->db.upper_bound(make_pair(prefix,after));
-    if ((db->db.empty()) || (it == db->db.end())) {
+    if ((db->db.size() == 0) || (it == db->db.end())) {
       it = db->db.end();
       ready = false;
       return 0;
diff --git a/src/test/ObjectMap/test_object_map.cc b/src/test/ObjectMap/test_object_map.cc
index 6ab3f82..eecd9ea 100644
--- a/src/test/ObjectMap/test_object_map.cc
+++ b/src/test/ObjectMap/test_object_map.cc
@@ -533,7 +533,7 @@ public:
 
     string strpath(path);
 
-    cerr << "using path " << strpath << std::endl;
+    cerr << "using path " << strpath << std::endl;;
     LevelDBStore *store = new LevelDBStore(g_ceph_context, strpath);
     assert(!store->create_and_open(cerr));
 
@@ -559,7 +559,7 @@ int main(int argc, char **argv) {
 }
 
 TEST_F(ObjectMapTest, CreateOneObject) {
-  ghobject_t hoid(hobject_t(sobject_t("foo", CEPH_NOSNAP)), 100, shard_id_t(0));
+  ghobject_t hoid(hobject_t(sobject_t("foo", CEPH_NOSNAP)), 100, 0);
   map<string, bufferlist> to_set;
   string key("test");
   string val("test_val");
@@ -614,8 +614,8 @@ TEST_F(ObjectMapTest, CreateOneObject) {
 }
 
 TEST_F(ObjectMapTest, CloneOneObject) {
-  ghobject_t hoid(hobject_t(sobject_t("foo", CEPH_NOSNAP)), 200, shard_id_t(0));
-  ghobject_t hoid2(hobject_t(sobject_t("foo2", CEPH_NOSNAP)), 201, shard_id_t(1));
+  ghobject_t hoid(hobject_t(sobject_t("foo", CEPH_NOSNAP)), 200, 0);
+  ghobject_t hoid2(hobject_t(sobject_t("foo2", CEPH_NOSNAP)), 201, 1);
 
   tester.set_key(hoid, "foo", "bar");
   tester.set_key(hoid, "foo2", "bar2");
diff --git a/src/test/TestTimers.cc b/src/test/TestTimers.cc
index 0dc8a06..6e6f473 100644
--- a/src/test/TestTimers.cc
+++ b/src/test/TestTimers.cc
@@ -16,7 +16,7 @@ class TestContext;
 
 namespace
 {
-  int test_array[MAX_TEST_CONTEXTS];
+  int array[MAX_TEST_CONTEXTS];
   int array_idx;
   TestContext* test_contexts[MAX_TEST_CONTEXTS];
 
@@ -35,7 +35,7 @@ public:
   {
     array_lock.Lock();
     cout << "TestContext " << num << std::endl;
-    test_array[array_idx++] = num;
+    array[array_idx++] = num;
     array_lock.Unlock();
   }
 
@@ -59,7 +59,7 @@ public:
   {
     array_lock.Lock();
     cout << "StrictOrderTestContext " << num << std::endl;
-    test_array[num] = num;
+    array[num] = num;
     array_lock.Unlock();
   }
 
@@ -79,7 +79,7 @@ template <typename T>
 static int basic_timer_test(T &timer, Mutex *lock)
 {
   int ret = 0;
-  memset(&test_array, 0, sizeof(test_array));
+  memset(&array, 0, sizeof(array));
   array_idx = 0;
   memset(&test_contexts, 0, sizeof(test_contexts));
 
@@ -109,10 +109,10 @@ static int basic_timer_test(T &timer, Mutex *lock)
   } while (!done);
 
   for (int i = 0; i < MAX_TEST_CONTEXTS; ++i) {
-    if (test_array[i] != i) {
+    if (array[i] != i) {
       ret = 1;
-      cout << "error: expected test_array[" << i << "] = " << i
-	   << "; got " << test_array[i] << " instead." << std::endl;
+      cout << "error: expected array[" << i << "] = " << i
+	   << "; got " << array[i] << " instead." << std::endl;
     }
   }
 
@@ -122,7 +122,7 @@ static int basic_timer_test(T &timer, Mutex *lock)
 static int test_out_of_order_insertion(SafeTimer &timer, Mutex *lock)
 {
   int ret = 0;
-  memset(&test_array, 0, sizeof(test_array));
+  memset(&array, 0, sizeof(array));
   array_idx = 0;
   memset(&test_contexts, 0, sizeof(test_contexts));
 
@@ -151,7 +151,7 @@ static int test_out_of_order_insertion(SafeTimer &timer, Mutex *lock)
   for (; secs < 100 ; ++secs) {
     sleep(1);
     array_lock.Lock();
-    int a = test_array[1];
+    int a = array[1];
     array_lock.Unlock();
     if (a == 1)
       break;
@@ -159,8 +159,8 @@ static int test_out_of_order_insertion(SafeTimer &timer, Mutex *lock)
 
   if (secs == 100) {
     ret = 1;
-    cout << "error: expected test_array[" << 1 << "] = " << 1
-	 << "; got " << test_array[1] << " instead." << std::endl;
+    cout << "error: expected array[" << 1 << "] = " << 1
+	 << "; got " << array[1] << " instead." << std::endl;
   }
 
   return ret;
@@ -171,7 +171,7 @@ static int safe_timer_cancel_all_test(SafeTimer &safe_timer, Mutex& safe_timer_l
   cout << __PRETTY_FUNCTION__ << std::endl;
 
   int ret = 0;
-  memset(&test_array, 0, sizeof(test_array));
+  memset(&array, 0, sizeof(array));
   array_idx = 0;
   memset(&test_contexts, 0, sizeof(test_contexts));
 
@@ -194,10 +194,10 @@ static int safe_timer_cancel_all_test(SafeTimer &safe_timer, Mutex& safe_timer_l
   safe_timer_lock.Unlock();
 
   for (int i = 0; i < array_idx; ++i) {
-    if (test_array[i] != i) {
+    if (array[i] != i) {
       ret = 1;
-      cout << "error: expected test_array[" << i << "] = " << i
-	   << "; got " << test_array[i] << " instead." << std::endl;
+      cout << "error: expected array[" << i << "] = " << i
+	   << "; got " << array[i] << " instead." << std::endl;
     }
   }
 
@@ -209,7 +209,7 @@ static int safe_timer_cancellation_test(SafeTimer &safe_timer, Mutex& safe_timer
   cout << __PRETTY_FUNCTION__ << std::endl;
 
   int ret = 0;
-  memset(&test_array, 0, sizeof(test_array));
+  memset(&array, 0, sizeof(array));
   array_idx = 0;
   memset(&test_contexts, 0, sizeof(test_contexts));
 
@@ -239,10 +239,10 @@ static int safe_timer_cancellation_test(SafeTimer &safe_timer, Mutex& safe_timer
   safe_timer_lock.Unlock();
 
   for (int i = 1; i < array_idx; i += 2) {
-    if (test_array[i] != i) {
+    if (array[i] != i) {
       ret = 1;
-      cout << "error: expected test_array[" << i << "] = " << i
-	   << "; got " << test_array[i] << " instead." << std::endl;
+      cout << "error: expected array[" << i << "] = " << i
+	   << "; got " << array[i] << " instead." << std::endl;
     }
   }
 
diff --git a/src/test/bufferlist.cc b/src/test/bufferlist.cc
index da4d33f..ff87238 100644
--- a/src/test/bufferlist.cc
+++ b/src/test/bufferlist.cc
@@ -1122,52 +1122,6 @@ TEST(BufferList, contents_equal) {
   ASSERT_FALSE(bl1.contents_equal(bl3)); // same length different content
 }
 
-TEST(BufferList, is_aligned) {
-  const int SIMD_ALIGN = 32;
-  {
-    bufferlist bl;
-    EXPECT_TRUE(bl.is_aligned(SIMD_ALIGN));
-  }
-  {
-    bufferlist bl;
-    bufferptr ptr(buffer::create_aligned(2, SIMD_ALIGN));
-    ptr.set_offset(1);
-    ptr.set_length(1);
-    bl.append(ptr);
-    EXPECT_FALSE(bl.is_aligned(SIMD_ALIGN));
-    bl.rebuild_aligned(SIMD_ALIGN);
-    EXPECT_TRUE(bl.is_aligned(SIMD_ALIGN));
-  }
-  {
-    bufferlist bl;
-    bufferptr ptr(buffer::create_aligned(SIMD_ALIGN + 1, SIMD_ALIGN));
-    ptr.set_offset(1);
-    ptr.set_length(SIMD_ALIGN);
-    bl.append(ptr);
-    EXPECT_FALSE(bl.is_aligned(SIMD_ALIGN));
-    bl.rebuild_aligned(SIMD_ALIGN);
-    EXPECT_TRUE(bl.is_aligned(SIMD_ALIGN));
-  }
-}
-
-TEST(BufferList, is_n_align_sized) {
-  const int SIMD_ALIGN = 32;
-  {
-    bufferlist bl;
-    EXPECT_TRUE(bl.is_n_align_sized(SIMD_ALIGN));
-  }
-  {
-    bufferlist bl;
-    bl.append_zero(1);
-    EXPECT_FALSE(bl.is_n_align_sized(SIMD_ALIGN));
-  }
-  {
-    bufferlist bl;
-    bl.append_zero(SIMD_ALIGN);
-    EXPECT_TRUE(bl.is_n_align_sized(SIMD_ALIGN));
-  }
-}
-
 TEST(BufferList, is_page_aligned) {
   {
     bufferlist bl;
@@ -1370,14 +1324,6 @@ TEST(BufferList, rebuild_page_aligned) {
   }
   {
     bufferlist bl;
-    bufferptr ptr(buffer::create_page_aligned(1));
-    char *p = ptr.c_str();
-    bl.append(ptr);
-    bl.rebuild_page_aligned();
-    EXPECT_EQ(p, bl.buffers().front().c_str());
-  }
-  {
-    bufferlist bl;
     {
       bufferptr ptr(buffer::create_page_aligned(CEPH_PAGE_SIZE));
       EXPECT_TRUE(ptr.is_page_aligned());
diff --git a/src/test/ceph-disk.sh b/src/test/ceph-disk.sh
deleted file mode 100755
index bb6e838..0000000
--- a/src/test/ceph-disk.sh
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-set -xe
-PS4='${FUNCNAME[0]}: $LINENO: '
-
-export PATH=:$PATH # make sure program from sources are prefered
-DIR=test-ceph-disk
-MON_ID=a
-MONA=127.0.0.1:7451
-TEST_POOL=rbd
-FSID=$(uuidgen)
-export CEPH_CONF=/dev/null
-export CEPH_ARGS="--fsid $FSID"
-CEPH_ARGS+=" --chdir="
-CEPH_ARGS+=" --run-dir=$DIR"
-CEPH_ARGS+=" --mon-host=$MONA"
-CEPH_ARGS+=" --log-file=$DIR/\$name.log"
-CEPH_ARGS+=" --pid-file=$DIR/\$name.pidfile"
-CEPH_ARGS+=" --osd-pool-default-erasure-code-directory=.libs"
-CEPH_ARGS+=" --auth-supported=none"
-CEPH_DISK_ARGS=
-CEPH_DISK_ARGS+=" --statedir=$DIR"
-CEPH_DISK_ARGS+=" --sysconfdir=$DIR"
-CEPH_DISK_ARGS+=" --prepend-to-path="
-CEPH_DISK_ARGS+=" --verbose"
-TIMEOUT=360
-
-cat=$(which cat)
-timeout=$(which timeout)
-diff=$(which diff)
-
-function setup() {
-    teardown
-    mkdir $DIR
-    touch $DIR/ceph.conf
-}
-
-function teardown() {
-    kill_daemons
-    rm -fr $DIR
-}
-
-function run_mon() {
-    local mon_dir=$DIR/$MON_ID
-
-    ./ceph-mon \
-        --id $MON_ID \
-        --mkfs \
-        --mon-data=$mon_dir \
-        --mon-initial-members=$MON_ID \
-        "$@"
-
-    ./ceph-mon \
-        --id $MON_ID \
-        --mon-data=$mon_dir \
-        --mon-cluster-log-file=$mon_dir/log \
-        --public-addr $MONA \
-        "$@"
-}
-
-function kill_daemons() {
-    for pidfile in $(find $DIR | grep pidfile) ; do
-        pid=$(cat $pidfile)
-        for try in 0 1 1 1 2 3 ; do
-            kill $pid || break
-            sleep $try
-        done
-    done
-}
-
-function command_fixture() {
-    local command=$1
-
-    [ $(which $command) = ./$command ] || [ $(which $command) = $(pwd)/$command ] || return 1
-
-    cat > $DIR/$command <<EOF
-#!/bin/bash
-touch $DIR/used-$command
-exec ./$command "\$@"
-EOF
-    chmod +x $DIR/$command
-}
-
-function tweak_path() {
-    local tweaker=$1
-
-    setup
-
-    command_fixture ceph-conf || return 1
-    command_fixture ceph-osd || return 1
-
-    test_activate_dir
-
-    [ ! -f $DIR/used-ceph-conf ] || return 1
-    [ ! -f $DIR/used-ceph-osd ] || return 1
-
-    teardown
-
-    setup
-
-    command_fixture ceph-conf || return 1
-    command_fixture ceph-osd || return 1
-
-    $tweaker test_activate_dir || return 1
-
-    [ -f $DIR/used-ceph-conf ] || return 1
-    [ -f $DIR/used-ceph-osd ] || return 1
-
-    teardown
-}
-
-function use_prepend_to_path() {
-    local ceph_disk_args
-    ceph_disk_args+=" --statedir=$DIR"
-    ceph_disk_args+=" --sysconfdir=$DIR"
-    ceph_disk_args+=" --prepend-to-path=$DIR"
-    ceph_disk_args+=" --verbose"
-    CEPH_DISK_ARGS="$ceph_disk_args" \
-        "$@" || return 1
-}
-
-function test_prepend_to_path() {
-    tweak_path use_prepend_to_path || return 1
-}
-
-function use_path() {
-    PATH="$DIR:$PATH" \
-        "$@" || return 1
-}
-
-function test_path() {
-    tweak_path use_path || return 1
-}
-
-function test_no_path() {
-    ( unset PATH ; test_activate_dir ) || return 1
-}
-
-# ceph-disk prepare returns immediately on success if the magic file
-# exists on the --osd-data directory.
-function test_activate_dir_magic() {
-    local uuid=$(uuidgen)
-    local osd_data=$DIR/osd
-
-    echo a failure to create the fsid file implies the magic file is not created
-
-    mkdir -p $osd_data/fsid
-    CEPH_ARGS="--fsid $uuid" \
-     ./ceph-disk $CEPH_DISK_ARGS prepare $osd_data > $DIR/out 2>&1
-    grep --quiet 'Is a directory' $DIR/out || return 1
-    ! [ -f $osd_data/magic ] || return 1
-    rmdir $osd_data/fsid
-
-    echo successfully prepare the OSD
-
-    CEPH_ARGS="--fsid $uuid" \
-     ./ceph-disk $CEPH_DISK_ARGS prepare $osd_data 2>&1 | tee $DIR/out
-    grep --quiet 'Preparing osd data dir' $DIR/out || return 1
-    grep --quiet $uuid $osd_data/ceph_fsid || return 1
-    [ -f $osd_data/magic ] || return 1
-
-    echo will not override an existing OSD
-
-    CEPH_ARGS="--fsid $(uuidgen)" \
-     ./ceph-disk $CEPH_DISK_ARGS prepare $osd_data 2>&1 | tee $DIR/out
-    grep --quiet 'ceph-disk:Data dir .* already exists' $DIR/out || return 1
-    grep --quiet $uuid $osd_data/ceph_fsid || return 1
-}
-
-function test_activate_dir() {
-    run_mon
-
-    local osd_data=$DIR/osd
-
-    /bin/mkdir -p $osd_data
-    ./ceph-disk $CEPH_DISK_ARGS \
-        prepare $osd_data || return 1
-
-    CEPH_ARGS="$CEPH_ARGS --osd-journal-size=100 --osd-data=$osd_data" \
-        $timeout $TIMEOUT ./ceph-disk $CEPH_DISK_ARGS \
-                      activate \
-                     --mark-init=none \
-                    $osd_data || return 1
-    $timeout $TIMEOUT ./ceph osd pool set $TEST_POOL size 1 || return 1
-    local id=$($cat $osd_data/whoami)
-    local weight=1
-    ./ceph osd crush add osd.$id $weight root=default host=localhost || return 1
-    echo FOO > $DIR/BAR
-    $timeout $TIMEOUT ./rados --pool $TEST_POOL put BAR $DIR/BAR || return 1
-    $timeout $TIMEOUT ./rados --pool $TEST_POOL get BAR $DIR/BAR.copy || return 1
-    $diff $DIR/BAR $DIR/BAR.copy || return 1
-}
-
-function test_find_cluster_by_uuid() {
-    setup
-    test_activate_dir 2>&1 | tee $DIR/test_find
-    ! grep "No cluster conf found in $DIR" $DIR/test_find || return 1
-    teardown
-
-    setup
-    rm $DIR/ceph.conf
-    test_activate_dir > $DIR/test_find 2>&1 
-    grep --quiet "No cluster conf found in $DIR" $DIR/test_find || return 1
-    teardown
-}
-
-# http://tracker.ceph.com/issues/9653
-function test_keyring_path() {
-    test_activate_dir 2>&1 | tee $DIR/test_keyring
-    grep --quiet "keyring $DIR/bootstrap-osd/ceph.keyring" $DIR/test_keyring || return 1
-}
-
-function run() {
-    local default_actions
-    default_actions+="test_path "
-    default_actions+="test_no_path "
-    default_actions+="test_find_cluster_by_uuid "
-    default_actions+="test_prepend_to_path "
-    default_actions+="test_activate_dir_magic "
-    default_actions+="test_activate_dir "
-    default_actions+="test_keyring_path "
-    local actions=${@:-$default_actions}
-    for action in $actions  ; do
-        setup
-        $action || return 1
-        teardown
-    done
-}
-
-run $@
-
-# Local Variables:
-# compile-command: "cd .. ; test/ceph-disk.sh # test_activate_dir"
-# End:
diff --git a/src/test/cli/osdmaptool/clobber.t b/src/test/cli/osdmaptool/clobber.t
index 820a47b..5f37f03 100644
--- a/src/test/cli/osdmaptool/clobber.t
+++ b/src/test/cli/osdmaptool/clobber.t
@@ -20,7 +20,9 @@
   modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
   flags 
   
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
+  pool 1 'metadata' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 2 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
   
   max_osd 3
   
@@ -41,7 +43,9 @@
   modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
   flags 
   
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
+  pool 1 'metadata' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool stripe_width 0
+  pool 2 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 64 pgp_num 64 last_change 0 flags hashpspool stripe_width 0
   
   max_osd 1
   
diff --git a/src/test/cli/osdmaptool/create-print.t b/src/test/cli/osdmaptool/create-print.t
index 6389d80..9ebd274 100644
--- a/src/test/cli/osdmaptool/create-print.t
+++ b/src/test/cli/osdmaptool/create-print.t
@@ -75,7 +75,9 @@
   modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
   flags 
   
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
+  pool 1 'metadata' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 2 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
   
   max_osd 3
   
@@ -84,19 +86,19 @@
   osdmaptool: writing epoch 1 to myosdmap
   $ osdmaptool --print myosdmap | grep 'pool 0'
   osdmaptool: osdmap file 'myosdmap'
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 66 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 66 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
   $ osdmaptool --clobber --createsimple 3 --osd_pool_default_crush_rule 55 myosdmap 2>&1 >/dev/null | sed -e 's/^.* 0 osd_pool_//'
   osdmaptool: osdmap file 'myosdmap'
   default_crush_rule is deprecated use osd_pool_default_crush_replicated_ruleset instead
   default_crush_rule = 55 overrides osd_pool_default_crush_replicated_ruleset = 0
   $ osdmaptool --print myosdmap | grep 'pool 0'
   osdmaptool: osdmap file 'myosdmap'
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
   $ osdmaptool --clobber --createsimple 3 --osd_pool_default_crush_replicated_ruleset 66 --osd_pool_default_crush_rule 55 myosdmap 2>&1 >/dev/null | sed -e 's/^.* 0 osd_pool_//'
   osdmaptool: osdmap file 'myosdmap'
   default_crush_rule is deprecated use osd_pool_default_crush_replicated_ruleset instead
   default_crush_rule = 55 overrides osd_pool_default_crush_replicated_ruleset = 66
   $ osdmaptool --print myosdmap | grep 'pool 0'
   osdmaptool: osdmap file 'myosdmap'
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 192 pgp_num 192 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
   $ rm -f myosdmap
diff --git a/src/test/cli/osdmaptool/create-racks.t b/src/test/cli/osdmaptool/create-racks.t
index 38a20a5..33fa9ee 100644
--- a/src/test/cli/osdmaptool/create-racks.t
+++ b/src/test/cli/osdmaptool/create-racks.t
@@ -788,7 +788,9 @@
   modified \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
   flags 
   
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
+  pool 1 'metadata' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0
+  pool 2 'rbd' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0
   
   max_osd 239
   
@@ -798,19 +800,19 @@
   osdmaptool: writing epoch 1 to om
   $ osdmaptool --print om | grep 'pool 0'
   osdmaptool: osdmap file 'om'
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
   $ osdmaptool --clobber --create-from-conf --osd_pool_default_crush_rule 55 om -c $TESTDIR/ceph.conf.withracks 2>&1 >/dev/null | sed -e 's/^.* 0 osd_pool_//'
   osdmaptool: osdmap file 'om'
   default_crush_rule is deprecated use osd_pool_default_crush_replicated_ruleset instead
   default_crush_rule = 55 overrides osd_pool_default_crush_replicated_ruleset = 0
   $ osdmaptool --print om | grep 'pool 0'
   osdmaptool: osdmap file 'om'
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
   $ osdmaptool --clobber --create-from-conf --osd_pool_default_crush_replicated_ruleset 66 --osd_pool_default_crush_rule 55 om -c $TESTDIR/ceph.conf.withracks 2>&1 >/dev/null | sed -e 's/^.* 0 osd_pool_//'
   osdmaptool: osdmap file 'om'
   default_crush_rule is deprecated use osd_pool_default_crush_replicated_ruleset instead
   default_crush_rule = 55 overrides osd_pool_default_crush_replicated_ruleset = 66
   $ osdmaptool --print om | grep 'pool 0'
   osdmaptool: osdmap file 'om'
-  pool 0 'rbd' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool stripe_width 0
+  pool 0 'data' replicated size 3 min_size 2 crush_ruleset 55 object_hash rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool crash_replay_interval 45 stripe_width 0
   $ rm -f om
diff --git a/src/test/cli/osdmaptool/pool.t b/src/test/cli/osdmaptool/pool.t
index 7a74c51..0adb240 100644
--- a/src/test/cli/osdmaptool/pool.t
+++ b/src/test/cli/osdmaptool/pool.t
@@ -18,9 +18,9 @@
   There is no pool 123
   [1]
 
-  $ osdmaptool myosdmap --test-map-object foo --pool 0
+  $ osdmaptool myosdmap --test-map-object foo --pool 2
   osdmaptool: osdmap file 'myosdmap'
-   object 'foo' \-\> 0\..* (re)
+   object 'foo' \-\> 2\..* (re)
 
   $ osdmaptool myosdmap --test-map-object foo
   osdmaptool: osdmap file 'myosdmap'
@@ -43,10 +43,12 @@
   There is no pool 123
   [1]
 
-  $ osdmaptool myosdmap --mark-up-in --test-map-pgs --pool 0 | grep pool
+  $ osdmaptool myosdmap --mark-up-in --test-map-pgs --pool 2 | grep pool
   osdmaptool: osdmap file 'myosdmap'
-  pool 0 pg_num .* (re)
+  pool 2 pg_num .* (re)
 
   $ osdmaptool myosdmap --mark-up-in --test-map-pgs | grep pool
   osdmaptool: osdmap file 'myosdmap'
   pool 0 pg_num .* (re)
+  pool 1 pg_num .* (re)
+  pool 2 pg_num .* (re)
diff --git a/src/test/cli/osdmaptool/test-map-pgs.t b/src/test/cli/osdmaptool/test-map-pgs.t
index 13b8c5c..222bd76 100644
--- a/src/test/cli/osdmaptool/test-map-pgs.t
+++ b/src/test/cli/osdmaptool/test-map-pgs.t
@@ -1,5 +1,5 @@
   $ NUM_OSDS=500
-  $ POOL_COUNT=1 # data + metadata + rbd
+  $ POOL_COUNT=3 # data + metadata + rbd
   $ SIZE=3
   $ PG_BITS=4
 #
@@ -21,9 +21,12 @@
   $ PG_NUM=$(($NUM_OSDS << $PG_BITS))
   $ grep "pg_num $PG_NUM" "$OUT" || cat $OUT
   pool 0 pg_num 8000
+  pool 1 pg_num 8000
+  pool 2 pg_num 8000
   $ TOTAL=$((POOL_COUNT * $PG_NUM))
-  $ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT
-  size 3\t8000 (esc)
+  $ PATTERN=$(echo "size $SIZE.$TOTAL")
+  $ grep "$PATTERN" $OUT || cat "$OUT"
+  size 3\t24000 (esc)
   $ STATS_CRUSH=$(grep '^ avg ' "$OUT")
 # 
 # --test-map-pgs --test-random is expected to change nothing regarding the totals
@@ -33,9 +36,12 @@
   $ PG_NUM=$(($NUM_OSDS << $PG_BITS))
   $ grep "pg_num $PG_NUM" "$OUT" || cat $OUT
   pool 0 pg_num 8000
+  pool 1 pg_num 8000
+  pool 2 pg_num 8000
   $ TOTAL=$((POOL_COUNT * $PG_NUM))
-  $ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT
-  size 3\t8000 (esc)
+  $ PATTERN=$(echo "size $SIZE.$TOTAL")
+  $ grep "$PATTERN" $OUT || cat "$OUT"
+  size 3\t24000 (esc)
   $ STATS_RANDOM=$(grep '^ avg ' "$OUT")
 # it is almost impossible to get the same stats with random and crush
 # if they are, it most probably means something went wrong somewhere
diff --git a/src/test/cli/rbd/help.t b/src/test/cli/rbd/help.t
index 3818ee3..5723bef 100644
--- a/src/test/cli/rbd/help.t
+++ b/src/test/cli/rbd/help.t
@@ -74,6 +74,7 @@
     --shared <tag>                     take a shared (rather than exclusive) lock
     --format <output-format>           output format (default: plain, json, xml)
     --pretty-format                    make json or xml output more readable
+    --no-settle                        do not wait for udevadm to settle on map/unmap
     --no-progress                      do not show progress for long-running commands
     -o, --options <map-options>        options to use when mapping an image
     --read-only                        set device readonly when mapping image
diff --git a/src/test/cls_rbd/test_cls_rbd.cc b/src/test/cls_rbd/test_cls_rbd.cc
index 29e8c63..48cfb33 100644
--- a/src/test/cls_rbd/test_cls_rbd.cc
+++ b/src/test/cls_rbd/test_cls_rbd.cc
@@ -79,7 +79,7 @@ TEST(cls_rbd, copyup)
   size_t l = 4 << 20;
   char *b = random_buf(l);
   inbl.append(b, l);
-  delete [] b;
+  delete b;
   ASSERT_EQ(l, inbl.length());
 
   // copyup to nonexistent object should create new object
@@ -94,7 +94,7 @@ TEST(cls_rbd, copyup)
   bufferlist inbl2;
   b = random_buf(l);
   inbl2.append(b, l);
-  delete [] b;
+  delete b;
   ASSERT_EQ(l, inbl2.length());
 
   // should still succeed
diff --git a/src/test/common/test_bloom_filter.cc b/src/test/common/test_bloom_filter.cc
index 3043573..cfd4130 100644
--- a/src/test/common/test_bloom_filter.cc
+++ b/src/test/common/test_bloom_filter.cc
@@ -21,8 +21,6 @@ TEST(BloomFilter, Basic) {
 
   ASSERT_TRUE(bf.contains("foo"));
   ASSERT_TRUE(bf.contains("bar"));
-
-  ASSERT_EQ(2U, bf.element_count());
 }
 
 TEST(BloomFilter, Empty) {
@@ -289,17 +287,3 @@ TEST(BloomFilter, SequenceDouble) {
 }
 
 #endif
-
-TEST(BloomFilter, Assignement) {
-  bloom_filter bf1(10, .1, .1), bf2;
-
-  bf1.insert("foo");
-  bf2 = bf1;
-  bf1.insert("bar");
-
-  ASSERT_TRUE(bf2.contains("foo"));
-  ASSERT_FALSE(bf2.contains("bar"));
-
-  ASSERT_EQ(2U, bf1.element_count());
-  ASSERT_EQ(1U, bf2.element_count());
-}
diff --git a/src/test/common/test_config.cc b/src/test/common/test_config.cc
index 5f3bc3f..cffdc76 100644
--- a/src/test/common/test_config.cc
+++ b/src/test/common/test_config.cc
@@ -131,16 +131,8 @@ public:
       config_option *opt = config_optionsp + i;
       if (opt->type == OPT_STR) {
         std::string *str = (std::string *)opt->conf_ptr(this);
-
-        size_t pos = 0;
-        while ((pos = str->find("$", pos)) != string::npos) {
-          if (str->substr(pos, 8) != "$channel") {
-            std::cout << "unexpected meta-variable found at pos " << pos
-                      << " of '" << *str << "'" << std::endl;
-            after_count++;
-          }
-          pos++;
-        }
+        if (str->find("$") != string::npos)
+          after_count++;
       }
     }
     ASSERT_EQ(0, after_count);
diff --git a/src/test/common/test_lru.cc b/src/test/common/test_lru.cc
deleted file mode 100644
index 7483718..0000000
--- a/src/test/common/test_lru.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- *
- * Author: Sahid Orentino Ferdjaoui <sahid.ferdjaoui at cloudwatt.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-#include <gtest/gtest.h>
-
-#include "include/lru.h"
-
-
-class Item : public LRUObject {
-public:
-  int id;
-  Item(int v) : id(v) {}
-};
-
-
-TEST(lru, InsertTop) {
-  LRU lru = LRU(10);
-
-  lru.lru_set_midpoint(.5); // 50% of 10 elements.
-  for (int i=0; i<100; i++) {
-    lru.lru_insert_top(new Item(i));
-  }
-  ASSERT_EQ(5U, lru.lru_get_top());
-  ASSERT_EQ(95U, lru.lru_get_bot());
-  ASSERT_EQ(100U, lru.lru_get_size());
-
-  ASSERT_EQ(0, (static_cast<Item*>(lru.lru_expire()))->id);
-}
-
-TEST(lru, InsertMid) {
-  LRU lru = LRU(10);
-
-  for (int i=0; i<100; i++) {
-    lru.lru_insert_mid(new Item(i));
-  }
-  ASSERT_EQ(0U, lru.lru_get_top());
-  ASSERT_EQ(100U, lru.lru_get_bot());
-  ASSERT_EQ(100U, lru.lru_get_size());
-
-  ASSERT_EQ(0, (static_cast<Item*>(lru.lru_expire()))->id);
-}
-
-TEST(lru, InsertBot) {
-  LRU lru = LRU(10);
-
-  for (int i=0; i<100; i++) {
-    lru.lru_insert_bot(new Item(i));
-  }
-  ASSERT_EQ(0U, lru.lru_get_top());
-  ASSERT_EQ(100U, lru.lru_get_bot());
-  ASSERT_EQ(100U, lru.lru_get_size());
-
-  ASSERT_EQ(99, (static_cast<Item*>(lru.lru_expire()))->id);
-}
-
-TEST(lru, Adjust) {
-  LRU lru = LRU(10);
-
-  lru.lru_set_midpoint(.6); // 60% of 10 elements.
-  for (int i=0; i<100; i++) {
-    lru.lru_touch(new Item(i));
-  }
-  ASSERT_EQ(6U, lru.lru_get_top());
-  ASSERT_EQ(94U, lru.lru_get_bot());
-  ASSERT_EQ(100U, lru.lru_get_size());
-
-  lru.lru_clear();
-
-  lru.lru_set_midpoint(1.2); // 120% of 10 elements.
-  for (int i=0; i<100; i++) {
-    lru.lru_touch(new Item(i));
-  }
-  ASSERT_EQ(12U, lru.lru_get_top());
-  ASSERT_EQ(88U, lru.lru_get_bot());
-  ASSERT_EQ(100U, lru.lru_get_size());
-}
-
-TEST(lru, Pinning) {
-  LRU lru = LRU();
-
-  Item *ob0 = new Item(0);
-  Item *ob1 = new Item(1);
-
-  // test before ob1 are in a LRU
-  ob1->lru_pin();
-  ASSERT_FALSE(ob1->lru_is_expireable());
-
-  ob1->lru_unpin();
-  ASSERT_TRUE(ob1->lru_is_expireable());
-
-  // test when ob1 are in a LRU
-  lru.lru_touch(ob0);
-  lru.lru_touch(ob1);
-
-  ob1->lru_pin();
-  ob1->lru_pin(); // Verify that, one incr.
-  ASSERT_EQ(1U, lru.lru_get_num_pinned());
-  ASSERT_FALSE(ob1->lru_is_expireable());
-
-  ob1->lru_unpin();
-  ob1->lru_unpin(); // Verify that, one decr.
-  ASSERT_EQ(0U, lru.lru_get_num_pinned());
-  ASSERT_TRUE(ob1->lru_is_expireable());
-
-  ASSERT_EQ(0, (static_cast<Item*>(lru.lru_expire()))->id);
-  ob0->lru_pin();
-  ASSERT_EQ(1, (static_cast<Item*>(lru.lru_expire()))->id);
-}
-
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make -j4 &&
- *   make unittest_lru &&
- *   valgrind --tool=memcheck --leak-check=full \
- *      ./unittest_lru
- *   "
- * End:
- */
diff --git a/src/test/common/test_shared_cache.cc b/src/test/common/test_shared_cache.cc
deleted file mode 100644
index bafef26..0000000
--- a/src/test/common/test_shared_cache.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library Public License for more details.
- *
- */
-
-#include <stdio.h>
-#include <signal.h>
-#include "common/Thread.h"
-#include "common/shared_cache.hpp"
-#include "common/ceph_argparse.h"
-#include "global/global_init.h"
-#include <gtest/gtest.h>
-
-using namespace std::tr1;
-
-TEST(SharedCache_all, add) {
-  SharedLRU<int, int> cache;
-  unsigned int key = 1;
-  int value = 2;
-  shared_ptr<int> ptr = cache.add(key, new int(value));
-  ASSERT_EQ(ptr, cache.lookup(key));
-  ASSERT_EQ(value, *cache.lookup(key));
-}
-
-TEST(SharedCache_all, lru) {
-  const size_t SIZE = 5;
-  SharedLRU<int, int> cache(NULL, SIZE);
-
-  bool existed = false;
-  shared_ptr<int> ptr = cache.add(0, new int(0), &existed);
-  ASSERT_FALSE(existed);
-  {
-    int *tmpint = new int(0);
-    shared_ptr<int> ptr2 = cache.add(0, tmpint, &existed);
-    ASSERT_TRUE(existed);
-    delete tmpint;
-  }
-  for (size_t i = 1; i < 2*SIZE; ++i) {
-    cache.add(i, new int(i), &existed);
-    ASSERT_FALSE(existed);
-  }
-
-  ASSERT_TRUE(cache.lookup(0));
-  ASSERT_EQ(0, *cache.lookup(0));
-
-  ASSERT_FALSE(cache.lookup(SIZE-1));
-  ASSERT_FALSE(cache.lookup(SIZE));
-  ASSERT_TRUE(cache.lookup(SIZE+1));
-  ASSERT_EQ(SIZE+1, *cache.lookup(SIZE+1));
-
-  cache.purge(0);
-  ASSERT_FALSE(cache.lookup(0));
-  shared_ptr<int> ptr2 = cache.add(0, new int(0), &existed);
-  ASSERT_FALSE(ptr == ptr2);
-  ptr = shared_ptr<int>();
-  ASSERT_TRUE(cache.lookup(0));
-}
-
-// Local Variables:
-// compile-command: "cd ../.. ; make unittest_sharedptr_registry && ./unittest_sharedptr_registry # --gtest_filter=*.* --log-to-stderr=true"
-// End:
diff --git a/src/test/common/test_str_map.cc b/src/test/common/test_str_map.cc
index 7ca0bdd..f60f0d8 100644
--- a/src/test/common/test_str_map.cc
+++ b/src/test/common/test_str_map.cc
@@ -25,10 +25,10 @@ TEST(str_map, json) {
   map<string,string> str_map;
   stringstream ss;
   // well formatted
-  ASSERT_EQ(0, get_json_str_map("{\"key\": \"value\"}", ss, &str_map));
+  ASSERT_EQ(0, get_str_map("{\"key\": \"value\"}", ss, &str_map));
   ASSERT_EQ("value", str_map["key"]);
   // well formatted but not a JSON object
-  ASSERT_EQ(-EINVAL, get_json_str_map("\"key\"", ss, &str_map));
+  ASSERT_EQ(-EINVAL, get_str_map("\"key\"", ss, &str_map));
   ASSERT_NE(string::npos, ss.str().find("must be a JSON object"));
 }
 
@@ -37,7 +37,7 @@ TEST(str_map, plaintext) {
   {
     map<string,string> str_map;
     ASSERT_EQ(0, get_str_map(" foo=bar\t\nfrob=nitz   yeah right=   \n\t",
-			     &str_map));
+			     ss, &str_map));
     ASSERT_EQ(4u, str_map.size());
     ASSERT_EQ("bar", str_map["foo"]);
     ASSERT_EQ("nitz", str_map["frob"]);
@@ -46,15 +46,15 @@ TEST(str_map, plaintext) {
   }
   {
     map<string,string> str_map;
-    ASSERT_EQ(0, get_str_map("that", &str_map));
+    ASSERT_EQ(0, get_str_map("that", ss, &str_map));
     ASSERT_EQ(1u, str_map.size());
     ASSERT_EQ("", str_map["that"]);
   }
   {
     map<string,string> str_map;
-    ASSERT_EQ(0, get_str_map(" \t \n ", &str_map));
+    ASSERT_EQ(0, get_str_map(" \t \n ", ss, &str_map));
     ASSERT_EQ(0u, str_map.size());
-    ASSERT_EQ(0, get_str_map("", &str_map));
+    ASSERT_EQ(0, get_str_map("", ss, &str_map));
     ASSERT_EQ(0u, str_map.size());
   }
 }
diff --git a/src/test/confutils.cc b/src/test/confutils.cc
index 90e8372..61b92d4 100644
--- a/src/test/confutils.cc
+++ b/src/test/confutils.cc
@@ -417,6 +417,7 @@ TEST(ConfUtils, IllegalFiles) {
   std::ostringstream warn;
   std::string illegal_conf1_f(next_tempfile(illegal_conf1));
   ConfFile cf1;
+  std::string val;
   ASSERT_EQ(cf1.parse_file(illegal_conf1_f.c_str(), &err, &warn), 0);
   ASSERT_EQ(err.size(), 1U);
 
diff --git a/src/test/coverage.sh b/src/test/coverage.sh
deleted file mode 100755
index 7659171..0000000
--- a/src/test/coverage.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-set -e
-
-usage () {
-      printf '%s: usage: %s [-d srcdir] [-o output_basename] COMMAND [ARGS..]\n' "$(basename "$0")" "$(basename "$0")" 1>&2
-      exit 1
-}
-
-OUTPUT_BASENAME=coverage
-SRCDIR=.
-
-while getopts  "d:o:h" flag
-do
-    case $flag in
-    d) SRCDIR=$OPTARG;;
-    o) OUTPUT_BASENAME=$OPTARG;;
-    *) usage;;
-    esac
-done
-
-shift $(($OPTIND - 1))
-
-lcov -d $SRCDIR -z > /dev/null 2>&1
-lcov -d $SRCDIR -c -i -o "${OUTPUT_BASENAME}_base_full.lcov" > /dev/null 2>&1
-"$@"
-lcov -d $SRCDIR -c -o "${OUTPUT_BASENAME}_tested_full.lcov" > /dev/null 2>&1
-lcov -r "${OUTPUT_BASENAME}_base_full.lcov" /usr/include\* -o "${OUTPUT_BASENAME}_base.lcov" > /dev/null 2>&1
-lcov -r "${OUTPUT_BASENAME}_tested_full.lcov" /usr/include\* -o "${OUTPUT_BASENAME}_tested.lcov" > /dev/null 2>&1
-lcov -a "${OUTPUT_BASENAME}_base.lcov" -a "${OUTPUT_BASENAME}_tested.lcov" -o "${OUTPUT_BASENAME}.lcov" | tail -n 3
diff --git a/src/test/crush/indep.cc b/src/test/crush/indep.cc
index dd0b542..896e58f 100644
--- a/src/test/crush/indep.cc
+++ b/src/test/crush/indep.cc
@@ -51,21 +51,18 @@ CrushWrapper *build_indep_map(CephContext *cct, int num_rack, int num_host,
       }
     }
   }
-  int ret;
-  int ruleno = 0;
-  int ruleset = 0;
-  ruleno = ruleset;
-  ret = c->add_rule(4, ruleset, 123, 1, 20, ruleno);
-  assert(ret == ruleno);
-  ret = c->set_rule_step(ruleno, 0, CRUSH_RULE_SET_CHOOSELEAF_TRIES, 10, 0);
-  assert(ret == 0);
-  ret = c->set_rule_step(ruleno, 1, CRUSH_RULE_TAKE, rootno, 0);
-  assert(ret == 0);
-  ret = c->set_rule_step(ruleno, 2, CRUSH_RULE_CHOOSELEAF_INDEP, CRUSH_CHOOSE_N, 1);
-  assert(ret == 0);
-  ret = c->set_rule_step(ruleno, 3, CRUSH_RULE_EMIT, 0, 0);
-  assert(ret == 0);
-  c->set_rule_name(ruleno, "data");
+
+  crush_rule *rule = crush_make_rule(4, 0, 123, 1, 20);
+  assert(rule);
+  crush_rule_set_step(rule, 0, CRUSH_RULE_SET_CHOOSELEAF_TRIES, 10, 0);
+  crush_rule_set_step(rule, 1, CRUSH_RULE_TAKE, rootno, 0);
+  crush_rule_set_step(rule, 2,
+		      CRUSH_RULE_CHOOSELEAF_INDEP,
+		      CRUSH_CHOOSE_N,
+		      1);
+  crush_rule_set_step(rule, 3, CRUSH_RULE_EMIT, 0, 0);
+  int rno = crush_add_rule(c->crush, rule, -1);
+  c->set_rule_name(rno, "data");
 
   if (false) {
     Formatter *f = new_formatter("json-pretty");
@@ -143,7 +140,7 @@ TEST(CRUSH, indep_out_alt) {
   c->dump_tree(weight, &cout, NULL);
 
   // need more retries to get 9/9 hosts for x in 0..99
-  c->set_choose_total_tries(100);
+  c->crush->choose_total_tries = 100;
   for (int x = 0; x < 100; ++x) {
     vector<int> out;
     c->do_rule(0, x, out, 9, weight);
@@ -169,7 +166,7 @@ TEST(CRUSH, indep_out_contig) {
     weight[i] = 0;
   c->dump_tree(weight, &cout, NULL);
 
-  c->set_choose_total_tries(100);
+  c->crush->choose_total_tries = 100;
   for (int x = 0; x < 100; ++x) {
     vector<int> out;
     c->do_rule(0, x, out, 7, weight);
@@ -188,7 +185,7 @@ TEST(CRUSH, indep_out_contig) {
 
 TEST(CRUSH, indep_out_progressive) {
   CrushWrapper *c = build_indep_map(g_ceph_context, 3, 3, 3);
-  c->set_choose_total_tries(100);
+  c->crush->choose_total_tries = 100;
   vector<__u32> tweight(c->get_max_devices(), 0x10000);
   c->dump_tree(tweight, &cout, NULL);
 
diff --git a/src/test/daemon_config.cc b/src/test/daemon_config.cc
index 1361ddc..3e6dc49 100644
--- a/src/test/daemon_config.cc
+++ b/src/test/daemon_config.cc
@@ -41,7 +41,6 @@ TEST(DaemonConfig, SimpleSet) {
 TEST(DaemonConfig, Substitution) {
   int ret;
   ret = g_ceph_context->_conf->set_val("internal_safe_to_start_threads", "false");
-  ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("host", "foo");
   ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("public_network", "bar$host.baz", false);
@@ -58,7 +57,6 @@ TEST(DaemonConfig, Substitution) {
 TEST(DaemonConfig, SubstitutionTrailing) {
   int ret;
   ret = g_ceph_context->_conf->set_val("internal_safe_to_start_threads", "false");
-  ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("host", "foo");
   ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("public_network", "bar$host", false);
@@ -75,7 +73,6 @@ TEST(DaemonConfig, SubstitutionTrailing) {
 TEST(DaemonConfig, SubstitutionBraces) {
   int ret;
   ret = g_ceph_context->_conf->set_val("internal_safe_to_start_threads", "false");
-  ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("host", "foo");
   ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("public_network", "bar${host}baz", false);
@@ -91,7 +88,6 @@ TEST(DaemonConfig, SubstitutionBraces) {
 TEST(DaemonConfig, SubstitutionBracesTrailing) {
   int ret;
   ret = g_ceph_context->_conf->set_val("internal_safe_to_start_threads", "false");
-  ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("host", "foo");
   ASSERT_EQ(ret, 0);
   ret = g_ceph_context->_conf->set_val("public_network", "bar${host}", false);
diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h
index 9619072..7df2b6c 100644
--- a/src/test/encoding/types.h
+++ b/src/test/encoding/types.h
@@ -129,12 +129,12 @@ TYPE(MonCap)
 TYPE(DBObjectMap::_Header)
 TYPE(DBObjectMap::State)
 
-#include "mds/JournalPointer.h"
-TYPE(JournalPointer)
-
 #include "osdc/Journaler.h"
 TYPE(Journaler::Header)
 
+#include "mds/Anchor.h"
+TYPE(Anchor)
+
 #include "mds/snap.h"
 TYPE(SnapInfo)
 TYPE(snaplink_t)
@@ -159,9 +159,6 @@ TYPE(cap_reconnect_t)
 TYPE(inode_backtrace_t)
 TYPE(inode_backpointer_t)
 
-#include "mds/CInode.h"
-TYPE(InodeStore)
-
 #include "mds/MDSMap.h"
 TYPE_FEATUREFUL(MDSMap)
 TYPE_FEATUREFUL(MDSMap::mds_info_t)
@@ -169,6 +166,9 @@ TYPE_FEATUREFUL(MDSMap::mds_info_t)
 #include "mds/Capability.h"
 TYPE_NOCOPY(Capability)
 
+#include "mds/AnchorServer.h"
+TYPEWITHSTRAYDATA(AnchorServer)
+
 #include "mds/InoTable.h"
 TYPE(InoTable)
 
@@ -220,8 +220,8 @@ TYPE(EUpdate)
 #ifdef WITH_RADOSGW
 
 #include "rgw/rgw_rados.h"
-TYPE(RGWObjManifestPart)
-TYPE(RGWObjManifest)
+TYPE(RGWObjManifestPart);
+TYPE(RGWObjManifest);
 
 #include "rgw/rgw_acl.h"
 TYPE(ACLPermission)
@@ -282,8 +282,8 @@ TYPE(cls_user_get_header_ret)
 TYPE(cls_user_complete_stats_sync_op)
 
 #include "rgw/rgw_common.h"
-TYPE(RGWAccessKey)
-TYPE(RGWSubUser)
+TYPE(RGWAccessKey);
+TYPE(RGWSubUser);
 TYPE(RGWUserInfo)
 TYPE(rgw_bucket)
 TYPE(RGWBucketInfo)
diff --git a/src/test/erasure-code/ErasureCodeExample.h b/src/test/erasure-code/ErasureCodeExample.h
index dce35d1..2b77d51 100644
--- a/src/test/erasure-code/ErasureCodeExample.h
+++ b/src/test/erasure-code/ErasureCodeExample.h
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
  *
@@ -24,7 +24,7 @@
 
 #include "crush/CrushWrapper.h"
 #include "osd/osd_types.h"
-#include "erasure-code/ErasureCode.h"
+#include "erasure-code/ErasureCodeInterface.h"
 
 #define FIRST_DATA_CHUNK 0
 #define SECOND_DATA_CHUNK 1
@@ -35,7 +35,7 @@
 
 #define MINIMUM_TO_RECOVER 2u
 
-class ErasureCodeExample : public ErasureCode {
+class ErasureCodeExample : public ErasureCodeInterface {
 public:
   virtual ~ErasureCodeExample() {}
 
@@ -138,12 +138,6 @@ public:
     return 0;
   }
 
-  virtual int encode_chunks(const set<int> &want_to_encode,
-			    map<int, bufferlist> *encoded) {
-    assert(0);
-    return 0;
-  }
-
   virtual int decode(const set<int> &want_to_read,
                      const map<int, bufferlist> &chunks,
                      map<int, bufferlist> *decoded) {
@@ -185,19 +179,6 @@ public:
     }
     return 0;
   }
-
-  virtual int decode_chunks(const set<int> &want_to_read,
-			    const map<int, bufferlist> &chunks,
-			    map<int, bufferlist> *decoded) {
-    assert(0);
-    return 0;
-  }
-
-  virtual const vector<int> &get_chunk_mapping() const {
-    static vector<int> mapping;
-    return mapping;
-  }
-
 };
 
 #endif
diff --git a/src/test/erasure-code/ErasureCodePluginExample.cc b/src/test/erasure-code/ErasureCodePluginExample.cc
index 7c8aaff..c1b5b3c 100644
--- a/src/test/erasure-code/ErasureCodePluginExample.cc
+++ b/src/test/erasure-code/ErasureCodePluginExample.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -17,7 +16,6 @@
 
 #include <unistd.h>
 
-#include "ceph_ver.h"
 #include "erasure-code/ErasureCodePlugin.h"
 #include "ErasureCodeExample.h"
 
@@ -31,9 +29,7 @@ public:
   }
 };
 
-const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
   return instance.add(plugin_name, new ErasureCodePluginExample());
diff --git a/src/test/erasure-code/ErasureCodePluginFailToInitialize.cc b/src/test/erasure-code/ErasureCodePluginFailToInitialize.cc
index f1219fa..d3043a4 100644
--- a/src/test/erasure-code/ErasureCodePluginFailToInitialize.cc
+++ b/src/test/erasure-code/ErasureCodePluginFailToInitialize.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -16,11 +15,9 @@
  */
 
 #include <errno.h>
-#include "ceph_ver.h"
+#include "erasure-code/ErasureCodePlugin.h"
 
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   return -ESRCH;
 }
diff --git a/src/test/erasure-code/ErasureCodePluginFailToRegister.cc b/src/test/erasure-code/ErasureCodePluginFailToRegister.cc
index 9e8e016..c26ac5b 100644
--- a/src/test/erasure-code/ErasureCodePluginFailToRegister.cc
+++ b/src/test/erasure-code/ErasureCodePluginFailToRegister.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,11 +14,9 @@
  * 
  */
 
-#include "ceph_ver.h"
+#include "erasure-code/ErasureCodePlugin.h"
 
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   return 0;
 }
diff --git a/src/test/erasure-code/ErasureCodePluginHangs.cc b/src/test/erasure-code/ErasureCodePluginHangs.cc
index 55b9e5a..01c2fa8 100644
--- a/src/test/erasure-code/ErasureCodePluginHangs.cc
+++ b/src/test/erasure-code/ErasureCodePluginHangs.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -16,11 +15,9 @@
  */
 
 #include <unistd.h>
-#include "ceph_ver.h"
+#include "erasure-code/ErasureCodePlugin.h"
 
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   sleep(1000);
   return 0;
diff --git a/src/test/erasure-code/ErasureCodePluginMissingEntryPoint.cc b/src/test/erasure-code/ErasureCodePluginMissingEntryPoint.cc
index 8a55214..4d8f1ba 100644
--- a/src/test/erasure-code/ErasureCodePluginMissingEntryPoint.cc
+++ b/src/test/erasure-code/ErasureCodePluginMissingEntryPoint.cc
@@ -1,6 +1,4 @@
-#include "ceph_ver.h"
-
-// missing int __erasure_code_init(char *plugin_name, char *directory) {}
-
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
+// missing int __erasure_code_init(char *plugin_name) {}
 
+// avoid warnings about library containing no symbols
+int __this_is_an_used_variable_to_avoid_warnings;
diff --git a/src/test/erasure-code/ErasureCodePluginMissingVersion.cc b/src/test/erasure-code/ErasureCodePluginMissingVersion.cc
deleted file mode 100644
index da4ed0e..0000000
--- a/src/test/erasure-code/ErasureCodePluginMissingVersion.cc
+++ /dev/null
@@ -1,3 +0,0 @@
-// missing __erasure_code_version
-
-int __this_is_an_used_variable_to_avoid_warnings;
diff --git a/src/test/erasure-code/Makefile.am b/src/test/erasure-code/Makefile.am
index 60f6ee1..c91eef9 100644
--- a/src/test/erasure-code/Makefile.am
+++ b/src/test/erasure-code/Makefile.am
@@ -2,7 +2,6 @@ check_SCRIPTS += \
 	test/erasure-code/test-erasure-code.sh
 
 ceph_erasure_code_benchmark_SOURCES = \
-	erasure-code/ErasureCode.cc \
 	test/erasure-code/ceph_erasure_code_benchmark.cc
 ceph_erasure_code_benchmark_LDADD = $(LIBOSD) $(LIBCOMMON) $(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL)
 if LINUX
@@ -10,8 +9,13 @@ ceph_erasure_code_benchmark_LDADD += -ldl
 endif
 bin_DEBUGPROGRAMS += ceph_erasure_code_benchmark
 
-noinst_HEADERS += \
-	test/erasure-code/ceph_erasure_code_benchmark.h
+ceph_erasure_code_non_regression_SOURCES = \
+	test/erasure-code/ceph_erasure_code_non_regression.cc
+ceph_erasure_code_non_regression_LDADD = $(LIBOSD) $(LIBCOMMON) $(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL)
+if LINUX
+ceph_erasure_code_non_regression_LDADD += -ldl
+endif
+noinst_PROGRAMS += ceph_erasure_code_non_regression
 
 ceph_erasure_code_SOURCES = \
 	test/erasure-code/ceph_erasure_code.cc
@@ -22,7 +26,6 @@ endif
 bin_DEBUGPROGRAMS += ceph_erasure_code
 
 libec_example_la_SOURCES = test/erasure-code/ErasureCodePluginExample.cc
-test/erasure-code/ErasureCodePluginExample.cc: ./ceph_ver.h
 libec_example_la_CFLAGS = ${AM_CFLAGS}
 libec_example_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_example_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -30,22 +33,13 @@ libec_example_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code
 erasure_codelib_LTLIBRARIES += libec_example.la
 
 libec_missing_entry_point_la_SOURCES = test/erasure-code/ErasureCodePluginMissingEntryPoint.cc
-test/erasure-code/ErasureCodePluginMissingEntryPoint.cc: ./ceph_ver.h
 libec_missing_entry_point_la_CFLAGS = ${AM_CFLAGS}
 libec_missing_entry_point_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_missing_entry_point_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_missing_entry_point_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
 erasure_codelib_LTLIBRARIES += libec_missing_entry_point.la
 
-libec_missing_version_la_SOURCES = test/erasure-code/ErasureCodePluginMissingVersion.cc
-libec_missing_version_la_CFLAGS = ${AM_CFLAGS}
-libec_missing_version_la_CXXFLAGS= ${AM_CXXFLAGS}
-libec_missing_version_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libec_missing_version_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
-erasure_codelib_LTLIBRARIES += libec_missing_version.la
-
 libec_hangs_la_SOURCES = test/erasure-code/ErasureCodePluginHangs.cc
-test/erasure-code/ErasureCodePluginHangs.cc: ./ceph_ver.h
 libec_hangs_la_CFLAGS = ${AM_CFLAGS}
 libec_hangs_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_hangs_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -53,7 +47,6 @@ libec_hangs_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.
 erasure_codelib_LTLIBRARIES += libec_hangs.la
 
 libec_fail_to_initialize_la_SOURCES = test/erasure-code/ErasureCodePluginFailToInitialize.cc
-test/erasure-code/ErasureCodePluginFailToInitialize.cc: ./ceph_ver.h
 libec_fail_to_initialize_la_CFLAGS = ${AM_CFLAGS}
 libec_fail_to_initialize_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_fail_to_initialize_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -61,7 +54,6 @@ libec_fail_to_initialize_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__e
 erasure_codelib_LTLIBRARIES += libec_fail_to_initialize.la
 
 libec_fail_to_register_la_SOURCES = test/erasure-code/ErasureCodePluginFailToRegister.cc
-test/erasure-code/ErasureCodePluginFailToRegister.cc: ./ceph_ver.h
 libec_fail_to_register_la_CFLAGS = ${AM_CFLAGS}
 libec_fail_to_register_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_fail_to_register_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -69,7 +61,6 @@ libec_fail_to_register_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__era
 erasure_codelib_LTLIBRARIES += libec_fail_to_register.la
 
 libec_test_jerasure_sse4_la_SOURCES = test/erasure-code/TestJerasurePluginSSE4.cc
-test/erasure-code/TestJerasurePluginSSE4.cc: ./ceph_ver.h
 libec_test_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS}
 libec_test_jerasure_sse4_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_test_jerasure_sse4_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -77,7 +68,6 @@ libec_test_jerasure_sse4_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__e
 erasure_codelib_LTLIBRARIES += libec_test_jerasure_sse4.la
 
 libec_test_jerasure_sse3_la_SOURCES = test/erasure-code/TestJerasurePluginSSE3.cc
-test/erasure-code/TestJerasurePluginSSE3.cc: ./ceph_ver.h
 libec_test_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS}
 libec_test_jerasure_sse3_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_test_jerasure_sse3_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
@@ -85,16 +75,13 @@ libec_test_jerasure_sse3_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__e
 erasure_codelib_LTLIBRARIES += libec_test_jerasure_sse3.la
 
 libec_test_jerasure_generic_la_SOURCES = test/erasure-code/TestJerasurePluginGeneric.cc
-test/erasure-code/TestJerasurePluginGeneric.cc: ./ceph_ver.h
 libec_test_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}
 libec_test_jerasure_generic_la_CXXFLAGS= ${AM_CXXFLAGS}
 libec_test_jerasure_generic_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
 libec_test_jerasure_generic_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
 erasure_codelib_LTLIBRARIES += libec_test_jerasure_generic.la
 
-unittest_erasure_code_plugin_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodePlugin.cc 
+unittest_erasure_code_plugin_SOURCES = test/erasure-code/TestErasureCodePlugin.cc 
 unittest_erasure_code_plugin_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_erasure_code_plugin_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 if LINUX
@@ -102,13 +89,6 @@ unittest_erasure_code_plugin_LDADD += -ldl
 endif
 check_PROGRAMS += unittest_erasure_code_plugin
 
-unittest_erasure_code_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCode.cc
-unittest_erasure_code_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_erasure_code_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-check_PROGRAMS += unittest_erasure_code
-
 unittest_erasure_code_jerasure_SOURCES = \
 	test/erasure-code/TestErasureCodeJerasure.cc \
 	${jerasure_sources}
@@ -133,51 +113,11 @@ unittest_erasure_code_plugin_jerasure_LDADD += -ldl
 endif
 check_PROGRAMS += unittest_erasure_code_plugin_jerasure
 
-if WITH_BETTER_YASM_ELF64
-unittest_erasure_code_isa_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodeIsa.cc
-unittest_erasure_code_isa_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_erasure_code_isa_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL) .libs/libec_isa.la $(LIBERASURE_CODE)
-if LINUX
-unittest_erasure_code_isa_LDADD += -ldl
-endif
-check_PROGRAMS += unittest_erasure_code_isa
-
-unittest_erasure_code_plugin_isa_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodePluginIsa.cc
-unittest_erasure_code_plugin_isa_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_erasure_code_plugin_isa_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL) .libs/libec_isa.la $(LIBERASURE_CODE)
-if LINUX
-unittest_erasure_code_plugin_isa_LDADD += -ldl
-endif
-check_PROGRAMS += unittest_erasure_code_plugin_isa
-endif
-
-unittest_erasure_code_lrc_SOURCES = \
-	test/erasure-code/TestErasureCodeLrc.cc \
-	${lrc_sources}
-unittest_erasure_code_lrc_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-unittest_erasure_code_lrc_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-if LINUX
-unittest_erasure_code_lrc_LDADD += -ldl
-endif
-check_PROGRAMS += unittest_erasure_code_lrc
-
-unittest_erasure_code_plugin_lrc_SOURCES = \
-	test/erasure-code/TestErasureCodePluginLrc.cc
-unittest_erasure_code_plugin_lrc_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_erasure_code_plugin_lrc_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-if LINUX
-unittest_erasure_code_plugin_lrc_LDADD += -ldl
-endif
-check_PROGRAMS += unittest_erasure_code_plugin_lrc
-
-unittest_erasure_code_example_SOURCES = \
-	erasure-code/ErasureCode.cc \
-	test/erasure-code/TestErasureCodeExample.cc
+unittest_erasure_code_example_SOURCES = test/erasure-code/TestErasureCodeExample.cc 
 noinst_HEADERS += test/erasure-code/ErasureCodeExample.h
 unittest_erasure_code_example_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 unittest_erasure_code_example_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 check_PROGRAMS += unittest_erasure_code_example
+
+noinst_HEADERS += \
+	test/erasure-code/ceph_erasure_code_benchmark.h
diff --git a/src/test/erasure-code/TestErasureCode.cc b/src/test/erasure-code/TestErasureCode.cc
deleted file mode 100644
index c572cdc..0000000
--- a/src/test/erasure-code/TestErasureCode.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph distributed storage system
- *
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-
-#include "global/global_init.h"
-#include "erasure-code/ErasureCode.h"
-#include "common/ceph_argparse.h"
-#include "global/global_context.h"
-#include "gtest/gtest.h"
-
-class ErasureCodeTest : public ErasureCode {
-public:
-  map<int, bufferlist> encode_chunks_encoded;
-  unsigned int k;
-  unsigned int m;
-  unsigned int chunk_size;
-
-  ErasureCodeTest(unsigned int _k, unsigned int _m, unsigned int _chunk_size) :
-    k(_k), m(_m), chunk_size(_chunk_size) {}
-  virtual ~ErasureCodeTest() {}
-
-  virtual unsigned int get_chunk_count() const { return k + m; }
-  virtual unsigned int get_data_chunk_count() const { return k; }
-  virtual unsigned int get_chunk_size(unsigned int object_size) const {
-    return chunk_size;
-  }
-  virtual int encode_chunks(const set<int> &want_to_encode,
-			    map<int, bufferlist> *encoded) {
-    encode_chunks_encoded = *encoded;
-    return 0;
-  }
-  virtual int create_ruleset(const string &name,
-			     CrushWrapper &crush,
-			     ostream *ss) const { return 0; }
-
-};
-
-/*
- *  If we have a buffer of 5 bytes (X below) and a chunk size of 3
- *  bytes, for k=3, m=1 an additional 7 bytes (P and C below) will
- *  need to be allocated for padding (P) and the 3 coding bytes (C).
- *
- *  X -+ +----------+ +-X
- *  X  | | data   0 | | X
- *  X  | +----------+ | X
- *  X  | +----------+ | X -> +-X
- *  X -+ | data   1 | +-X -> | X
- *  P -+ +----------+        | P
- *  P  | +----------+        | P
- *  P  | | data   2 |        | P
- *  P  | +----------+        | P
- *  C  | +----------+        | C
- *  C  | | coding 3 |        | C
- *  C -+ +----------+        +-C
- *
- *  The data chunks 1 and 2 (data 1 and data 2 above) overflow the
- *  original buffer because it needs padding. A new buffer will
- *  be allocated to contain the chunk that overflows and all other
- *  chunks after it, including the coding chunk(s).
- *
- *  The following test creates a siguation where the buffer provided
- *  for encoding is not memory aligned. After encoding it asserts that:
- *
- *   a) each chunk is SIMD aligned
- *   b) the data 1 chunk content is as expected which implies that its
- *      content has been copied over.
- *
- *  It is possible for a flawed implementation to pas the test because the
- *  underlying allocation function enforces it.
- */
-TEST(ErasureCodeTest, encode_memory_align)
-{
-  int k = 3;
-  int m = 1;
-  unsigned chunk_size = ErasureCode::SIMD_ALIGN * 7;
-  ErasureCodeTest erasure_code(k, m, chunk_size);
-
-  set<int> want_to_encode;
-  for (unsigned int i = 0; i < erasure_code.get_chunk_count(); i++)
-    want_to_encode.insert(i);
-  string data(chunk_size + chunk_size / 2, 'X'); // uses 1.5 chunks out of 3
-  // make sure nothing is memory aligned
-  bufferptr ptr(buffer::create_aligned(data.length() + 1, ErasureCode::SIMD_ALIGN));
-  ptr.copy_in(1, data.length(), data.c_str());
-  ptr.set_offset(1);
-  ptr.set_length(data.length());
-  bufferlist in;
-  in.append(ptr);
-  map<int, bufferlist> encoded;
-
-  ASSERT_FALSE(in.is_aligned(ErasureCode::SIMD_ALIGN));
-  ASSERT_EQ(0, erasure_code.encode(want_to_encode, in, &encoded));
-  for (unsigned int i = 0; i < erasure_code.get_chunk_count(); i++)
-    ASSERT_TRUE(encoded[i].is_aligned(ErasureCode::SIMD_ALIGN));
-  for (unsigned i = 0; i < chunk_size / 2; i++)
-    ASSERT_EQ(encoded[1][i], 'X');
-  ASSERT_NE(encoded[1][chunk_size / 2], 'X');
-}
-
-int main(int argc, char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **)argv, args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ;
- *   make -j4 unittest_erasure_code &&
- *   valgrind --tool=memcheck --leak-check=full \
- *      ./unittest_erasure_code \
- *      --gtest_filter=*.* --log-to-stderr=true"
- * End:
- */
diff --git a/src/test/erasure-code/TestErasureCodeExample.cc b/src/test/erasure-code/TestErasureCodeExample.cc
index a02d96e..4df0762 100644
--- a/src/test/erasure-code/TestErasureCodeExample.cc
+++ b/src/test/erasure-code/TestErasureCodeExample.cc
@@ -1,7 +1,7 @@
 // -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
  *
diff --git a/src/test/erasure-code/TestErasureCodeIsa.cc b/src/test/erasure-code/TestErasureCodeIsa.cc
deleted file mode 100644
index cf89026..0000000
--- a/src/test/erasure-code/TestErasureCodeIsa.cc
+++ /dev/null
@@ -1,963 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-
-#include "crush/CrushWrapper.h"
-#include "include/stringify.h"
-#include "global/global_init.h"
-#include "erasure-code/isa/ErasureCodeIsa.h"
-#include "erasure-code/isa/xor_op.h"
-#include "common/ceph_argparse.h"
-#include "global/global_context.h"
-#include "gtest/gtest.h"
-
-ErasureCodeIsaTableCache tcache;
-
-class IsaErasureCodeTest : public ::testing::Test {
-public:
-  void compare_chunks(bufferlist &in, map<int, bufferlist> &encoded);
-  void encode_decode(unsigned object_size); 
-};
-
-void IsaErasureCodeTest::compare_chunks(bufferlist &in, map<int, bufferlist> &encoded)
-{
-  unsigned object_size = in.length();
-  unsigned chunk_size = encoded[0].length();
-  for (unsigned i = 0; i < encoded.size(); i++) {
-    if (i * chunk_size >= object_size)
-      break;
-    int chunk_length = object_size > (i + 1) * chunk_size ? chunk_size : object_size - i * chunk_size;
-    EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + i * chunk_size, chunk_length));
-  }
-}
-
-void IsaErasureCodeTest::encode_decode(unsigned object_size)
-{
-  ErasureCodeIsaDefault Isa(tcache);
-
-  map<std::string, std::string> parameters;
-  parameters["k"] = "2";
-  parameters["m"] = "2";
-  Isa.init(parameters);
-
-  string payload(object_size, 'X');
-  bufferlist in;
-  // may be multiple bufferptr if object_size is larger than CEPH_PAGE_SIZE
-  in.append(payload.c_str(), payload.length());
-  int want_to_encode[] = {0, 1, 2, 3};
-  map<int, bufferlist> encoded;
-  EXPECT_EQ(0, Isa.encode(set<int>(want_to_encode, want_to_encode + 4),
-                          in,
-                          &encoded));
-  EXPECT_EQ(4u, encoded.size());
-  unsigned chunk_size = encoded[0].length();
-  EXPECT_EQ(chunk_size, Isa.get_chunk_size(object_size));
-  compare_chunks(in, encoded);
-
-  // all chunks are available
-  {
-    int want_to_decode[] = {0, 1};
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, Isa.decode(set<int>(want_to_decode, want_to_decode + 2),
-                            encoded,
-                            &decoded));
-    EXPECT_EQ(2u, decoded.size());
-    EXPECT_EQ(chunk_size, decoded[0].length());
-    compare_chunks(in, decoded);
-  }
-
-  // one data chunk is missing
-  {
-    map<int, bufferlist> degraded = encoded;
-
-    string enc1(encoded[1].c_str(), chunk_size);
-
-    degraded.erase(1);
-    EXPECT_EQ(3u, degraded.size());
-    int want_to_decode[] = {1};
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, Isa.decode(set<int>(want_to_decode, want_to_decode + 1),
-                            degraded,
-                            &decoded));
-    // always decode all, regardless of want_to_decode
-    EXPECT_EQ(4u, decoded.size());
-    EXPECT_EQ(chunk_size, decoded[1].length());
-    EXPECT_EQ(0, memcmp(decoded[1].c_str(), enc1.c_str(), chunk_size));
-  }
-
-  // non-xor coding chunk is missing
-  {
-    map<int, bufferlist> degraded = encoded;
-
-    string enc3(encoded[3].c_str(), chunk_size);
-
-    degraded.erase(3);
-    EXPECT_EQ(3u, degraded.size());
-    int want_to_decode[] = {3};
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, Isa.decode(set<int>(want_to_decode, want_to_decode + 1),
-                            degraded,
-                            &decoded));
-    // always decode all, regardless of want_to_decode
-    EXPECT_EQ(4u, decoded.size());
-    EXPECT_EQ(chunk_size, decoded[3].length());
-    EXPECT_EQ(0, memcmp(decoded[3].c_str(), enc3.c_str(), chunk_size));
-  }
-
-  // xor coding chunk is missing
-  {
-    map<int, bufferlist> degraded = encoded;
-
-    string enc2(encoded[2].c_str(), chunk_size);
-
-    degraded.erase(2);
-    EXPECT_EQ(3u, degraded.size());
-    int want_to_decode[] = {2};
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, Isa.decode(set<int>(want_to_decode, want_to_decode + 1),
-                            degraded,
-                            &decoded));
-    // always decode all, regardless of want_to_decode
-    EXPECT_EQ(4u, decoded.size());
-    EXPECT_EQ(chunk_size, decoded[2].length());
-    EXPECT_EQ(0, memcmp(decoded[2].c_str(), enc2.c_str(), chunk_size));
-  }
-
-  // one data and one coding chunk is missing
-  {
-    map<int, bufferlist> degraded = encoded;
-
-    string enc3(encoded[3].c_str(), chunk_size);
-
-    degraded.erase(1);
-    degraded.erase(3);
-    EXPECT_EQ(2u, degraded.size());
-    int want_to_decode[] = {1, 3};
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, Isa.decode(set<int>(want_to_decode, want_to_decode + 2),
-                            degraded,
-                            &decoded));
-    // always decode all, regardless of want_to_decode
-    EXPECT_EQ(4u, decoded.size());
-    EXPECT_EQ(chunk_size, decoded[1].length());
-    EXPECT_EQ(0, memcmp(decoded[3].c_str(), enc3.c_str(), chunk_size));
-  }
-
-  // two data chunks are missing
-  {
-    map<int, bufferlist> degraded = encoded;
-    degraded.erase(0);
-    degraded.erase(1);
-    EXPECT_EQ(2u, degraded.size());
-    int want_to_decode[] = {0, 1};
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, Isa.decode(set<int>(want_to_decode, want_to_decode + 2),
-                            degraded,
-                            &decoded));
-    // always decode all, regardless of want_to_decode
-    EXPECT_EQ(4u, decoded.size());
-    EXPECT_EQ(chunk_size, decoded[0].length());
-    compare_chunks(in, decoded);
-  }
-
-}
-
-TEST_F(IsaErasureCodeTest, encode_decode)
-{
-  encode_decode(1);
-  encode_decode(EC_ISA_ADDRESS_ALIGNMENT);
-  encode_decode(EC_ISA_ADDRESS_ALIGNMENT + 1);
-  encode_decode(2048);
-  encode_decode(4096);
-  encode_decode(4096 + 1);
-}
-
-TEST_F(IsaErasureCodeTest, minimum_to_decode)
-{
-  ErasureCodeIsaDefault Isa(tcache);
-  map<std::string, std::string> parameters;
-  parameters["k"] = "2";
-  parameters["m"] = "2";
-  Isa.init(parameters);
-
-  //
-  // If trying to read nothing, the minimum is empty.
-  //
-  {
-    set<int> want_to_read;
-    set<int> available_chunks;
-    set<int> minimum;
-
-    EXPECT_EQ(0, Isa.minimum_to_decode(want_to_read,
-                                       available_chunks,
-                                       &minimum));
-    EXPECT_TRUE(minimum.empty());
-  }
-  //
-  // There is no way to read a chunk if none are available.
-  //
-  {
-    set<int> want_to_read;
-    set<int> available_chunks;
-    set<int> minimum;
-
-    want_to_read.insert(0);
-
-    EXPECT_EQ(-EIO, Isa.minimum_to_decode(want_to_read,
-                                          available_chunks,
-                                          &minimum));
-  }
-  //
-  // Reading a subset of the available chunks is always possible.
-  //
-  {
-    set<int> want_to_read;
-    set<int> available_chunks;
-    set<int> minimum;
-
-    want_to_read.insert(0);
-    available_chunks.insert(0);
-
-    EXPECT_EQ(0, Isa.minimum_to_decode(want_to_read,
-                                       available_chunks,
-                                       &minimum));
-    EXPECT_EQ(want_to_read, minimum);
-  }
-  //
-  // There is no way to read a missing chunk if there is less than k
-  // chunks available.
-  //
-  {
-    set<int> want_to_read;
-    set<int> available_chunks;
-    set<int> minimum;
-
-    want_to_read.insert(0);
-    want_to_read.insert(1);
-    available_chunks.insert(0);
-
-    EXPECT_EQ(-EIO, Isa.minimum_to_decode(want_to_read,
-                                          available_chunks,
-                                          &minimum));
-  }
-  //
-  // When chunks are not available, the minimum can be made of any
-  // chunks. For instance, to read 1 and 3 below the minimum could be
-  // 2 and 3 which may seem better because it contains one of the
-  // chunks to be read. But it won't be more efficient than retrieving
-  // 0 and 2 instead because, in both cases, the decode function will
-  // need to run the same recovery operation and use the same amount
-  // of CPU and memory.
-  //
-  {
-    set<int> want_to_read;
-    set<int> available_chunks;
-    set<int> minimum;
-
-    want_to_read.insert(1);
-    want_to_read.insert(3);
-    available_chunks.insert(0);
-    available_chunks.insert(2);
-    available_chunks.insert(3);
-
-    EXPECT_EQ(0, Isa.minimum_to_decode(want_to_read,
-                                       available_chunks,
-                                       &minimum));
-    EXPECT_EQ(2u, minimum.size());
-    EXPECT_EQ(0u, minimum.count(3));
-  }
-}
-
-TEST_F(IsaErasureCodeTest, chunk_size)
-{
-  {
-    ErasureCodeIsaDefault Isa(tcache);
-    map<std::string, std::string> parameters;
-    parameters["k"] = "2";
-    parameters["m"] = "1";
-    Isa.init(parameters);
-    int k = 2;
-
-    ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(1));
-    ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(EC_ISA_ADDRESS_ALIGNMENT * k - 1));
-    ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT * 2, Isa.get_chunk_size(EC_ISA_ADDRESS_ALIGNMENT * k + 1));
-  }
-  {
-    ErasureCodeIsaDefault Isa(tcache);
-    map<std::string, std::string> parameters;
-    parameters["k"] = "3";
-    parameters["m"] = "1";
-    Isa.init(parameters);
-    int k = 3;
-
-    ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(1));
-    ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(EC_ISA_ADDRESS_ALIGNMENT * k - 1));
-    ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT * 2, Isa.get_chunk_size(EC_ISA_ADDRESS_ALIGNMENT * k + 1));
-    int object_size = EC_ISA_ADDRESS_ALIGNMENT * k * 1024 + 1;
-    ASSERT_NE(0, object_size % k);
-    ASSERT_NE(0, object_size % EC_ISA_ADDRESS_ALIGNMENT);
-    int chunk_size = Isa.get_chunk_size(object_size);
-    ASSERT_EQ(0, chunk_size % EC_ISA_ADDRESS_ALIGNMENT);
-    ASSERT_GT(chunk_size, (chunk_size * k) - object_size);
-  }
-}
-
-TEST_F(IsaErasureCodeTest, encode)
-{
-  ErasureCodeIsaDefault Isa(tcache);
-  map<std::string, std::string> parameters;
-  parameters["k"] = "2";
-  parameters["m"] = "2";
-  Isa.init(parameters);
-
-  unsigned aligned_object_size = Isa.get_alignment() * 2;
-  {
-    //
-    // When the input bufferlist needs to be padded because
-    // it is not properly aligned, it is padded with zeros.
-    //
-    bufferlist in;
-    map<int,bufferlist> encoded;
-    int want_to_encode[] = { 0, 1, 2, 3 };
-    int trail_length = 1;
-    in.append(string(aligned_object_size + trail_length, 'X'));
-    EXPECT_EQ(0, Isa.encode(set<int>(want_to_encode, want_to_encode+4),
-				 in,
-				 &encoded));
-    EXPECT_EQ(4u, encoded.size());
-    char *last_chunk = encoded[1].c_str();
-    int length =encoded[1].length();
-    EXPECT_EQ('X', last_chunk[0]);
-    EXPECT_EQ('\0', last_chunk[length - trail_length]);
-  }
-
-  {
-    //
-    // When only the first chunk is required, the encoded map only
-    // contains the first chunk. Although the Isa encode
-    // internally allocated a buffer because of padding requirements
-    // and also computes the coding chunks, they are released before
-    // the return of the method, as shown when running the tests thru
-    // valgrind (there is no leak).
-    //
-    bufferlist in;
-    map<int,bufferlist> encoded;
-    set<int> want_to_encode;
-    want_to_encode.insert(0);
-    int trail_length = 1;
-    in.append(string(aligned_object_size + trail_length, 'X'));
-    EXPECT_EQ(0, Isa.encode(want_to_encode, in, &encoded));
-    EXPECT_EQ(1u, encoded.size());
-  }
-}
-
-bool
-DecodeAndVerify(ErasureCodeIsaDefault& Isa, map<int, bufferlist> &degraded, set<int> want_to_decode, buffer::ptr* enc, int length)
-{
-  map<int, bufferlist> decoded;
-  bool ok;
-
-  // decode as requested
-  ok = Isa.decode(want_to_decode,
-                  degraded,
-                  &decoded);
-
-  for (int i = 0; i < (int) decoded.size(); i++) {
-    // compare all the buffers with their original
-    ok |= memcmp(decoded[i].c_str(), enc[i].c_str(), length);
-  }
-
-  return ok;
-}
-
-TEST_F(IsaErasureCodeTest, isa_vandermonde_exhaustive)
-{
-  // Test all possible failure scenarios and reconstruction cases for
-  // a (12,4) configuration using the vandermonde matrix
-
-  ErasureCodeIsaDefault Isa(tcache);
-  map<std::string, std::string> parameters;
-  parameters["k"] = "12";
-  parameters["m"] = "4";
-  Isa.init(parameters);
-
-  int k = 12;
-  int m = 4;
-
-#define LARGE_ENOUGH 2048
-  bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
-  in_ptr.zero();
-  in_ptr.set_length(0);
-  const char *payload =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-  in_ptr.append(payload, strlen(payload));
-  bufferlist in;
-  in.push_front(in_ptr);
-
-  set<int>want_to_encode;
-
-  map<int, bufferlist> encoded;
-  for (int i = 0; i < (k + m); i++) {
-    want_to_encode.insert(i);
-  }
-
-
-  EXPECT_EQ(0, Isa.encode(want_to_encode,
-                          in,
-                          &encoded));
-
-  EXPECT_EQ((unsigned) (k + m), encoded.size());
-
-  unsigned length = encoded[0].length();
-
-  for (int i = 0; i < k; i++) {
-    EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
-  }
-
-  buffer::ptr enc[k + m];
-  // create buffers with a copy of the original data to be able to compare it after decoding
-  {
-    for (int i = 0; i < (k + m); i++) {
-      buffer::ptr newenc(buffer::create_page_aligned(LARGE_ENOUGH));
-      enc[i] = newenc;
-      enc[i].zero();
-      enc[i].set_length(0);
-      enc[i].append(encoded[i].c_str(), length);
-    }
-  }
-
-  // loop through all possible loss scenarios
-  bool err = true;
-  int cnt_cf = 0;
-
-  for (int l1 = 0; l1 < (k + m); l1++) {
-    map<int, bufferlist> degraded = encoded;
-    set<int> want_to_decode;
-    degraded.erase(l1);
-    want_to_decode.insert(l1);
-    err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-    EXPECT_EQ(0, err);
-    cnt_cf++;
-    for (int l2 = l1 + 1; l2 < (k + m); l2++) {
-      degraded.erase(l2);
-      want_to_decode.insert(l2);
-      err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-      EXPECT_EQ(0, err);
-      cnt_cf++;
-      for (int l3 = l2 + 1; l3 < (k + m); l3++) {
-        degraded.erase(l3);
-        want_to_decode.insert(l3);
-        err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-        EXPECT_EQ(0, err);
-        cnt_cf++;
-        for (int l4 = l3 + 1; l4 < (k + m); l4++) {
-          degraded.erase(l4);
-          want_to_decode.insert(l4);
-          err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-          EXPECT_EQ(0, err);
-          degraded[l4] = encoded[l4];
-          want_to_decode.erase(l4);
-          cnt_cf++;
-        }
-        degraded[l3] = encoded[l3];
-        want_to_decode.erase(l3);
-      }
-      degraded[l2] = encoded[l2];
-      want_to_decode.erase(l2);
-    }
-    degraded[l1] = encoded[l1];
-    want_to_decode.erase(l1);
-  }
-  EXPECT_EQ(2516, cnt_cf);
-  EXPECT_EQ(2506, tcache.getDecodingTableCacheSize()); // 3 entries from (2,2) test and 2503 from (12,4)
-}
-
-TEST_F(IsaErasureCodeTest, isa_cauchy_exhaustive)
-{
-  // Test all possible failure scenarios and reconstruction cases for
-  // a (12,4) configuration using the cauchy matrix
-  ErasureCodeIsaDefault Isa(tcache,ErasureCodeIsaDefault::kCauchy);
-  map<std::string, std::string> parameters;
-  parameters["k"] = "12";
-  parameters["m"] = "4";
-  parameters["technique"] = "cauchy";
-
-  Isa.init(parameters);
-
-  int k = 12;
-  int m = 4;
-
-#define LARGE_ENOUGH 2048
-  bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
-  in_ptr.zero();
-  in_ptr.set_length(0);
-  const char *payload =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-  in_ptr.append(payload, strlen(payload));
-  bufferlist in;
-  in.push_front(in_ptr);
-
-  set<int>want_to_encode;
-
-  map<int, bufferlist> encoded;
-  for (int i = 0; i < (k + m); i++) {
-    want_to_encode.insert(i);
-  }
-
-
-  EXPECT_EQ(0, Isa.encode(want_to_encode,
-                          in,
-                          &encoded));
-
-  EXPECT_EQ((unsigned) (k + m), encoded.size());
-
-  unsigned length = encoded[0].length();
-
-  for (int i = 0; i < k; i++) {
-    EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
-  }
-
-  buffer::ptr enc[k + m];
-  // create buffers with a copy of the original data to be able to compare it after decoding
-  {
-    for (int i = 0; i < (k + m); i++) {
-      buffer::ptr newenc(buffer::create_page_aligned(LARGE_ENOUGH));
-      enc[i] = newenc;
-      enc[i].zero();
-      enc[i].set_length(0);
-      enc[i].append(encoded[i].c_str(), length);
-    }
-  }
-
-  // loop through all possible loss scenarios
-  bool err = true;
-  int cnt_cf = 0;
-
-  for (int l1 = 0; l1 < (k + m); l1++) {
-    map<int, bufferlist> degraded = encoded;
-    set<int> want_to_decode;
-    degraded.erase(l1);
-    want_to_decode.insert(l1);
-    err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-    EXPECT_EQ(0, err);
-    cnt_cf++;
-    for (int l2 = l1 + 1; l2 < (k + m); l2++) {
-      degraded.erase(l2);
-      want_to_decode.insert(l2);
-      err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-      EXPECT_EQ(0, err);
-      cnt_cf++;
-      for (int l3 = l2 + 1; l3 < (k + m); l3++) {
-        degraded.erase(l3);
-        want_to_decode.insert(l3);
-        err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-        EXPECT_EQ(0, err);
-        cnt_cf++;
-        for (int l4 = l3 + 1; l4 < (k + m); l4++) {
-          degraded.erase(l4);
-          want_to_decode.insert(l4);
-          err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-          EXPECT_EQ(0, err);
-          degraded[l4] = encoded[l4];
-          want_to_decode.erase(l4);
-          cnt_cf++;
-        }
-        degraded[l3] = encoded[l3];
-        want_to_decode.erase(l3);
-      }
-      degraded[l2] = encoded[l2];
-      want_to_decode.erase(l2);
-    }
-    degraded[l1] = encoded[l1];
-    want_to_decode.erase(l1);
-  }
-  EXPECT_EQ(2516, cnt_cf);
-  EXPECT_EQ(2516, tcache.getDecodingTableCacheSize(ErasureCodeIsaDefault::kCauchy));
-}
-
-TEST_F(IsaErasureCodeTest, isa_cauchy_cache_trash)
-{
-  // Test all possible failure scenarios and reconstruction cases for
-  // a (12,4) configuration using the cauchy matrix
-  ErasureCodeIsaDefault Isa(tcache,ErasureCodeIsaDefault::kCauchy);
-  map<std::string, std::string> parameters;
-  parameters["k"] = "16";
-  parameters["m"] = "4";
-  parameters["technique"] = "cauchy";
-
-  Isa.init(parameters);
-
-  int k = 16;
-  int m = 4;
-
-#define LARGE_ENOUGH 2048
-  bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
-  in_ptr.zero();
-  in_ptr.set_length(0);
-  const char *payload =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-  in_ptr.append(payload, strlen(payload));
-  bufferlist in;
-  in.push_front(in_ptr);
-
-  set<int>want_to_encode;
-
-  map<int, bufferlist> encoded;
-  for (int i = 0; i < (k + m); i++) {
-    want_to_encode.insert(i);
-  }
-
-
-  EXPECT_EQ(0, Isa.encode(want_to_encode,
-                          in,
-                          &encoded));
-
-  EXPECT_EQ((unsigned) (k + m), encoded.size());
-
-  unsigned length = encoded[0].length();
-
-  for (int i = 0; i < k; i++) {
-    EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
-  }
-
-  buffer::ptr enc[k + m];
-  // create buffers with a copy of the original data to be able to compare it after decoding
-  {
-    for (int i = 0; i < (k + m); i++) {
-      buffer::ptr newenc(buffer::create_page_aligned(LARGE_ENOUGH));
-      enc[i] = newenc;
-      enc[i].zero();
-      enc[i].set_length(0);
-      enc[i].append(encoded[i].c_str(), length);
-    }
-  }
-
-  // loop through all possible loss scenarios
-  bool err = true;
-  int cnt_cf = 0;
-
-  for (int l1 = 0; l1 < (k + m); l1++) {
-    map<int, bufferlist> degraded = encoded;
-    set<int> want_to_decode;
-    degraded.erase(l1);
-    want_to_decode.insert(l1);
-    err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-    EXPECT_EQ(0, err);
-    cnt_cf++;
-    for (int l2 = l1 + 1; l2 < (k + m); l2++) {
-      degraded.erase(l2);
-      want_to_decode.insert(l2);
-      err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-      EXPECT_EQ(0, err);
-      cnt_cf++;
-      for (int l3 = l2 + 1; l3 < (k + m); l3++) {
-        degraded.erase(l3);
-        want_to_decode.insert(l3);
-        err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-        EXPECT_EQ(0, err);
-        cnt_cf++;
-        for (int l4 = l3 + 1; l4 < (k + m); l4++) {
-          degraded.erase(l4);
-          want_to_decode.insert(l4);
-          err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-          EXPECT_EQ(0, err);
-          degraded[l4] = encoded[l4];
-          want_to_decode.erase(l4);
-          cnt_cf++;
-        }
-        degraded[l3] = encoded[l3];
-        want_to_decode.erase(l3);
-      }
-      degraded[l2] = encoded[l2];
-      want_to_decode.erase(l2);
-    }
-    degraded[l1] = encoded[l1];
-    want_to_decode.erase(l1);
-  }
-  EXPECT_EQ(6195, cnt_cf);
-  EXPECT_EQ(2516, tcache.getDecodingTableCacheSize(ErasureCodeIsaDefault::kCauchy));
-}
-
-TEST_F(IsaErasureCodeTest, isa_xor_codec)
-{
-  // Test all possible failure scenarios and reconstruction cases for
-  // a (4,1) RAID-5 like configuration 
-
-  ErasureCodeIsaDefault Isa(tcache);
-  map<std::string, std::string> parameters;
-  parameters["k"] = "4";
-  parameters["m"] = "1";
-  Isa.init(parameters);
-
-  int k = 4;
-  int m = 1;
-
-#define LARGE_ENOUGH 2048
-  bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
-  in_ptr.zero();
-  in_ptr.set_length(0);
-  const char *payload =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-  in_ptr.append(payload, strlen(payload));
-  bufferlist in;
-  in.push_front(in_ptr);
-
-  set<int>want_to_encode;
-
-  map<int, bufferlist> encoded;
-  for (int i = 0; i < (k + m); i++) {
-    want_to_encode.insert(i);
-  }
-
-
-  EXPECT_EQ(0, Isa.encode(want_to_encode,
-                          in,
-                          &encoded));
-
-  EXPECT_EQ((unsigned) (k + m), encoded.size());
-
-  unsigned length = encoded[0].length();
-
-  for (int i = 0; i < k; i++) {
-    EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
-  }
-
-  buffer::ptr enc[k + m];
-  // create buffers with a copy of the original data to be able to compare it after decoding
-  {
-    for (int i = 0; i < (k + m); i++) {
-      buffer::ptr newenc(buffer::create_page_aligned(LARGE_ENOUGH));
-      enc[i] = newenc;
-      enc[i].zero();
-      enc[i].set_length(0);
-      enc[i].append(encoded[i].c_str(), length);
-    }
-  }
-
-  // loop through all possible loss scenarios
-  bool err = true;
-  int cnt_cf = 0;
-
-  for (int l1 = 0; l1 < (k + m); l1++) {
-    map<int, bufferlist> degraded = encoded;
-    set<int> want_to_decode;
-    degraded.erase(l1);
-    want_to_decode.insert(l1);
-    err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
-    EXPECT_EQ(0, err);
-    cnt_cf++;
-    degraded[l1] = encoded[l1];
-    want_to_decode.erase(l1);
-  }
-  EXPECT_EQ(5, cnt_cf);
-}
-
-TEST_F(IsaErasureCodeTest, create_ruleset)
-{
-  CrushWrapper *c = new CrushWrapper;
-  c->create();
-  int root_type = 2;
-  c->set_type_name(root_type, "root");
-  int host_type = 1;
-  c->set_type_name(host_type, "host");
-  int osd_type = 0;
-  c->set_type_name(osd_type, "osd");
-
-  int rootno;
-  c->add_bucket(0, CRUSH_BUCKET_STRAW, CRUSH_HASH_RJENKINS1,
-		root_type, 0, NULL, NULL, &rootno);
-  c->set_item_name(rootno, "default");
-
-  map<string,string> loc;
-  loc["root"] = "default";
-
-  int num_host = 4;
-  int num_osd = 5;
-  int osd = 0;
-  for (int h=0; h<num_host; ++h) {
-    loc["host"] = string("host-") + stringify(h);
-    for (int o=0; o<num_osd; ++o, ++osd) {
-      c->insert_item(g_ceph_context, osd, 1.0, string("osd.") + stringify(osd), loc);
-    }
-  }
-
-  {
-    stringstream ss;
-    ErasureCodeIsaDefault isa(tcache);
-    map<std::string,std::string> parameters;
-    parameters["k"] = "2";
-    parameters["m"] = "2";
-    parameters["w"] = "8";
-    isa.init(parameters);
-    int ruleset = isa.create_ruleset("myrule", *c, &ss);
-    EXPECT_EQ(0, ruleset);
-    EXPECT_EQ(-EEXIST, isa.create_ruleset("myrule", *c, &ss));
-    //
-    // the minimum that is expected from the created ruleset is to
-    // successfully map get_chunk_count() devices from the crushmap,
-    // at least once.
-    //
-    vector<__u32> weight(c->get_max_devices(), 0x10000);
-    vector<int> out;
-    int x = 0;
-    c->do_rule(ruleset, x, out, isa.get_chunk_count(), weight);
-    ASSERT_EQ(out.size(), isa.get_chunk_count());
-    for (unsigned i=0; i<out.size(); ++i)
-      ASSERT_NE(CRUSH_ITEM_NONE, out[i]);
-  }
-  {
-    stringstream ss;
-    ErasureCodeIsaDefault isa(tcache);
-    map<std::string,std::string> parameters;
-    parameters["k"] = "2";
-    parameters["m"] = "2";
-    parameters["w"] = "8";
-    parameters["ruleset-root"] = "BAD";
-    isa.init(parameters);
-    EXPECT_EQ(-ENOENT, isa.create_ruleset("otherrule", *c, &ss));
-    EXPECT_EQ("root item BAD does not exist", ss.str());
-  }
-  {
-    stringstream ss;
-    ErasureCodeIsaDefault isa(tcache);
-    map<std::string,std::string> parameters;
-    parameters["k"] = "2";
-    parameters["m"] = "2";
-    parameters["w"] = "8";
-    parameters["ruleset-failure-domain"] = "WORSE";
-    isa.init(parameters);
-    EXPECT_EQ(-EINVAL, isa.create_ruleset("otherrule", *c, &ss));
-    EXPECT_EQ("unknown type WORSE", ss.str());
-  }
-}
-
-int main(int argc, char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **) argv, args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make -j4 unittest_erasure_code_isa &&
- *   libtool --mode=execute valgrind --tool=memcheck --leak-check=full \
- *      ./unittest_erasure_code_isa \
- *      --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
- * End:
- */
diff --git a/src/test/erasure-code/TestErasureCodeJerasure.cc b/src/test/erasure-code/TestErasureCodeJerasure.cc
index 3762951..4b768a8 100644
--- a/src/test/erasure-code/TestErasureCodeJerasure.cc
+++ b/src/test/erasure-code/TestErasureCodeJerasure.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -43,76 +42,70 @@ TYPED_TEST_CASE(ErasureCodeTest, JerasureTypes);
 
 TYPED_TEST(ErasureCodeTest, encode_decode)
 {
-  const char *per_chunk_alignments[] = { "false", "true" };
-  for (int per_chunk_alignment = 0 ;
-       per_chunk_alignment < 2;
-       per_chunk_alignment++) {
-    TypeParam jerasure;
-    map<std::string,std::string> parameters;
-    parameters["k"] = "2";
-    parameters["m"] = "2";
-    parameters["packetsize"] = "8";
-    parameters["jerasure-per-chunk-alignment"] =
-      per_chunk_alignments[per_chunk_alignment];
-    jerasure.init(parameters);
+  TypeParam jerasure;
+  map<std::string,std::string> parameters;
+  parameters["k"] = "2";
+  parameters["m"] = "2";
+  parameters["w"] = "7";
+  parameters["packetsize"] = "8";
+  jerasure.init(parameters);
 
 #define LARGE_ENOUGH 2048
-    bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
-    in_ptr.zero();
-    in_ptr.set_length(0);
-    const char *payload =
-      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-    in_ptr.append(payload, strlen(payload));
-    bufferlist in;
-    in.push_front(in_ptr);
-    int want_to_encode[] = { 0, 1, 2, 3 };
-    map<int, bufferlist> encoded;
-    EXPECT_EQ(0, jerasure.encode(set<int>(want_to_encode, want_to_encode+4),
-				 in,
-				 &encoded));
-    EXPECT_EQ(4u, encoded.size());
-    unsigned length =  encoded[0].length();
-    EXPECT_EQ(0, strncmp(encoded[0].c_str(), in.c_str(), length));
-    EXPECT_EQ(0, strncmp(encoded[1].c_str(), in.c_str() + length,
+  bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
+  in_ptr.zero();
+  in_ptr.set_length(0);
+  const char *payload =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+  in_ptr.append(payload, strlen(payload));
+  bufferlist in;
+  in.push_front(in_ptr);
+  int want_to_encode[] = { 0, 1, 2, 3 };
+  map<int, bufferlist> encoded;
+  EXPECT_EQ(0, jerasure.encode(set<int>(want_to_encode, want_to_encode+4),
+                              in,
+                              &encoded));
+  EXPECT_EQ(4u, encoded.size());
+  unsigned length =  encoded[0].length();
+  EXPECT_EQ(0, strncmp(encoded[0].c_str(), in.c_str(), length));
+  EXPECT_EQ(0, strncmp(encoded[1].c_str(), in.c_str() + length,
+		       in.length() - length));
+
+
+  // all chunks are available
+  {
+    int want_to_decode[] = { 0, 1 };
+    map<int, bufferlist> decoded;
+    EXPECT_EQ(0, jerasure.decode(set<int>(want_to_decode, want_to_decode+2),
+                                encoded,
+                                &decoded));
+    EXPECT_EQ(2u, decoded.size()); 
+    EXPECT_EQ(length, decoded[0].length());
+    EXPECT_EQ(0, strncmp(decoded[0].c_str(), in.c_str(), length));
+    EXPECT_EQ(0, strncmp(decoded[1].c_str(), in.c_str() + length,
 			 in.length() - length));
+  }
 
-
-    // all chunks are available
-    {
-      int want_to_decode[] = { 0, 1 };
-      map<int, bufferlist> decoded;
-      EXPECT_EQ(0, jerasure.decode(set<int>(want_to_decode, want_to_decode+2),
-				   encoded,
-				   &decoded));
-      EXPECT_EQ(2u, decoded.size()); 
-      EXPECT_EQ(length, decoded[0].length());
-      EXPECT_EQ(0, strncmp(decoded[0].c_str(), in.c_str(), length));
-      EXPECT_EQ(0, strncmp(decoded[1].c_str(), in.c_str() + length,
-			   in.length() - length));
-    }
-
-    // two chunks are missing 
-    {
-      map<int, bufferlist> degraded = encoded;
-      degraded.erase(0);
-      degraded.erase(1);
-      EXPECT_EQ(2u, degraded.size());
-      int want_to_decode[] = { 0, 1 };
-      map<int, bufferlist> decoded;
-      EXPECT_EQ(0, jerasure.decode(set<int>(want_to_decode, want_to_decode+2),
-				   degraded,
-				   &decoded));
-      // always decode all, regardless of want_to_decode
-      EXPECT_EQ(4u, decoded.size()); 
-      EXPECT_EQ(length, decoded[0].length());
-      EXPECT_EQ(0, strncmp(decoded[0].c_str(), in.c_str(), length));
-      EXPECT_EQ(0, strncmp(decoded[1].c_str(), in.c_str() + length,
-			   in.length() - length));
-    }
+  // two chunks are missing 
+  {
+    map<int, bufferlist> degraded = encoded;
+    degraded.erase(0);
+    degraded.erase(1);
+    EXPECT_EQ(2u, degraded.size());
+    int want_to_decode[] = { 0, 1 };
+    map<int, bufferlist> decoded;
+    EXPECT_EQ(0, jerasure.decode(set<int>(want_to_decode, want_to_decode+2),
+                                degraded,
+                                &decoded));
+    // always decode all, regardless of want_to_decode
+    EXPECT_EQ(4u, decoded.size()); 
+    EXPECT_EQ(length, decoded[0].length());
+    EXPECT_EQ(0, strncmp(decoded[0].c_str(), in.c_str(), length));
+    EXPECT_EQ(0, strncmp(decoded[1].c_str(), in.c_str() + length,
+			 in.length() - length));
   }
 }
 
@@ -223,7 +216,7 @@ TEST(ErasureCodeTest, encode)
   parameters["w"] = "8";
   jerasure.init(parameters);
 
-  unsigned aligned_object_size = jerasure.get_alignment() * 2;
+  unsigned alignment = jerasure.get_alignment();
   {
     //
     // When the input bufferlist needs to be padded because
@@ -232,16 +225,17 @@ TEST(ErasureCodeTest, encode)
     bufferlist in;
     map<int,bufferlist> encoded;
     int want_to_encode[] = { 0, 1, 2, 3 };
-    int trail_length = 1;
-    in.append(string(aligned_object_size + trail_length, 'X'));
+    int trail_length = 10;
+    in.append(string(alignment + trail_length, 'X'));
     EXPECT_EQ(0, jerasure.encode(set<int>(want_to_encode, want_to_encode+4),
 				 in,
 				 &encoded));
     EXPECT_EQ(4u, encoded.size());
+    for(int i = 0; i < 4; i++)
+      EXPECT_EQ(alignment, encoded[i].length());
     char *last_chunk = encoded[1].c_str();
-    int length =encoded[1].length();
     EXPECT_EQ('X', last_chunk[0]);
-    EXPECT_EQ('\0', last_chunk[length - trail_length]);
+    EXPECT_EQ('\0', last_chunk[trail_length]);
   }
 
   {
@@ -257,10 +251,11 @@ TEST(ErasureCodeTest, encode)
     map<int,bufferlist> encoded;
     set<int> want_to_encode;
     want_to_encode.insert(0);
-    int trail_length = 1;
-    in.append(string(aligned_object_size + trail_length, 'X'));
+    int trail_length = 10;
+    in.append(string(alignment + trail_length, 'X'));
     EXPECT_EQ(0, jerasure.encode(want_to_encode, in, &encoded));
     EXPECT_EQ(1u, encoded.size());
+    EXPECT_EQ(alignment, encoded[0].length());
   }
 }
 
@@ -357,8 +352,8 @@ int main(int argc, char **argv)
 
 /* 
  * Local Variables:
- * compile-command: "cd ../.. ;
- *   make -j4 unittest_erasure_code_jerasure &&
+ * compile-command: "cd ../.. ; make -j4 && 
+ *   make unittest_erasure_code_jerasure && 
  *   valgrind --tool=memcheck --leak-check=full \
  *      ./unittest_erasure_code_jerasure \
  *      --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
diff --git a/src/test/erasure-code/TestErasureCodeLrc.cc b/src/test/erasure-code/TestErasureCodeLrc.cc
deleted file mode 100644
index c3f0e68..0000000
--- a/src/test/erasure-code/TestErasureCodeLrc.cc
+++ /dev/null
@@ -1,936 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph distributed storage system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-
-#include "crush/CrushWrapper.h"
-#include "common/config.h"
-#include "include/stringify.h"
-#include "global/global_init.h"
-#include "erasure-code/lrc/ErasureCodeLrc.h"
-#include "common/ceph_argparse.h"
-#include "global/global_context.h"
-#include "gtest/gtest.h"
-
-TEST(ErasureCodeLrc, parse_ruleset)
-{
-  ErasureCodeLrc lrc;
-  EXPECT_EQ("default", lrc.ruleset_root);
-  EXPECT_EQ("host", lrc.ruleset_steps.front().type);
-
-  map<std::string,std::string> parameters;
-  parameters["ruleset-root"] = "other";
-  EXPECT_EQ(0, lrc.parse_ruleset(parameters, &cerr));
-  EXPECT_EQ("other", lrc.ruleset_root);
-
-  parameters["ruleset-steps"] = "[]";
-  EXPECT_EQ(0, lrc.parse_ruleset(parameters, &cerr));
-  EXPECT_TRUE(lrc.ruleset_steps.empty());
-
-  parameters["ruleset-steps"] = "0";
-  EXPECT_EQ(ERROR_LRC_ARRAY, lrc.parse_ruleset(parameters, &cerr));
-
-  parameters["ruleset-steps"] = "{";
-  EXPECT_EQ(ERROR_LRC_PARSE_JSON, lrc.parse_ruleset(parameters, &cerr));
-
-  parameters["ruleset-steps"] = "[0]";
-  EXPECT_EQ(ERROR_LRC_ARRAY, lrc.parse_ruleset(parameters, &cerr));
-
-  parameters["ruleset-steps"] = "[[0]]";
-  EXPECT_EQ(ERROR_LRC_RULESET_OP, lrc.parse_ruleset(parameters, &cerr));
-
-  parameters["ruleset-steps"] = "[[\"choose\", 0]]";
-  EXPECT_EQ(ERROR_LRC_RULESET_TYPE, lrc.parse_ruleset(parameters, &cerr));
-
-  parameters["ruleset-steps"] = "[[\"choose\", \"host\", []]]";
-  EXPECT_EQ(ERROR_LRC_RULESET_N, lrc.parse_ruleset(parameters, &cerr));
-
-  parameters["ruleset-steps"] = "[[\"choose\", \"host\", 2]]";
-  EXPECT_EQ(0, lrc.parse_ruleset(parameters, &cerr));
-
-  const ErasureCodeLrc::Step &step = lrc.ruleset_steps.front();
-  EXPECT_EQ("choose", step.op);
-  EXPECT_EQ("host", step.type);
-  EXPECT_EQ(2, step.n);
-
-  parameters["ruleset-steps"] =
-    "["
-    " [\"choose\", \"rack\", 2], "
-    " [\"chooseleaf\", \"host\", 5], "
-    "]";
-  EXPECT_EQ(0, lrc.parse_ruleset(parameters, &cerr));
-  EXPECT_EQ(2U, lrc.ruleset_steps.size());
-  {
-    const ErasureCodeLrc::Step &step = lrc.ruleset_steps[0];
-    EXPECT_EQ("choose", step.op);
-    EXPECT_EQ("rack", step.type);
-    EXPECT_EQ(2, step.n);
-  }
-  {
-    const ErasureCodeLrc::Step &step = lrc.ruleset_steps[1];
-    EXPECT_EQ("chooseleaf", step.op);
-    EXPECT_EQ("host", step.type);
-    EXPECT_EQ(5, step.n);
-  }
-}
-
-TEST(ErasureCodeTest, create_ruleset)
-{
-  CrushWrapper *c = new CrushWrapper;
-  c->create();
-  int root_type = 3;
-  c->set_type_name(root_type, "root");
-  int rack_type = 2;
-  c->set_type_name(rack_type, "rack");
-  int host_type = 1;
-  c->set_type_name(host_type, "host");
-  int osd_type = 0;
-  c->set_type_name(osd_type, "osd");
-
-  int rootno;
-  c->add_bucket(0, CRUSH_BUCKET_STRAW, CRUSH_HASH_RJENKINS1,
-		root_type, 0, NULL, NULL, &rootno);
-  c->set_item_name(rootno, "default");
-
-  map<string,string> loc;
-  loc["root"] = "default";
-
-  //
-  // Set all to 10 so that the item number it trivial to decompose
-  // into rack/host/osd.
-  //
-  int num_rack;
-  int num_host;
-  int num_osd;
-  num_rack = num_host = num_osd = 10;
-  int osd = 0;
-  for (int r=0; r<num_rack; ++r) {
-    loc["rack"] = string("rack-") + stringify(r);
-    for (int h=0; h<num_host; ++h) {
-      loc["host"] = string("host-") + stringify(r) + string("-") + stringify(h);
-      for (int o=0; o<num_osd; ++o, ++osd) {
-	c->insert_item(g_ceph_context, osd, 1.0, string("osd.") + stringify(osd), loc);
-      }
-    }
-  }
-
-  ErasureCodeLrc lrc;
-  EXPECT_EQ(0, lrc.create_ruleset("rule1", *c, &cerr));
-
-  map<std::string,std::string> parameters;
-  unsigned int racks = 2;
-  unsigned int hosts = 5;
-  parameters["ruleset-steps"] =
-    "["
-    " [\"choose\", \"rack\", " + stringify(racks) + "], "
-    " [\"chooseleaf\", \"host\", " + stringify(hosts) + "], "
-    "]";
-  const char *rule_name = "rule2";
-  EXPECT_EQ(0, lrc.parse_ruleset(parameters, &cerr));
-  EXPECT_EQ(1, lrc.create_ruleset(rule_name, *c, &cerr));
-
-  vector<__u32> weight;
-  for (int o = 0; o < c->get_max_devices(); o++)
-    weight.push_back(0x10000);
-  int rule = c->get_rule_id(rule_name);
-  vector<int> out;
-  unsigned int n = racks * hosts;
-  c->do_rule(rule, 1, out, n, weight);
-  EXPECT_EQ(n, out.size());
-  //
-  // check that the first five are in the same rack and the next five
-  // in the same rack
-  //
-  int first_rack = out[0] / num_host / num_osd;
-  EXPECT_EQ(first_rack, out[1] / num_host / num_osd);
-  EXPECT_EQ(first_rack, out[2] / num_host / num_osd);
-  EXPECT_EQ(first_rack, out[3] / num_host / num_osd);
-  EXPECT_EQ(first_rack, out[4] / num_host / num_osd);
-  int second_rack = out[5] / num_host / num_osd;
-  EXPECT_EQ(second_rack, out[6] / num_host / num_osd);
-  EXPECT_EQ(second_rack, out[7] / num_host / num_osd);
-  EXPECT_EQ(second_rack, out[8] / num_host / num_osd);
-  EXPECT_EQ(second_rack, out[9] / num_host / num_osd);
-}
-
-TEST(ErasureCodeLrc, parse_kml)
-{
-  ErasureCodeLrc lrc;
-  map<std::string,std::string> parameters;
-  EXPECT_EQ(0, lrc.parse_kml(parameters, &cerr));
-  parameters["k"] = "4";
-  EXPECT_EQ(ERROR_LRC_ALL_OR_NOTHING, lrc.parse_kml(parameters, &cerr));
-  const char *generated[] = { "mapping",
-			      "layers",
-			      "ruleset-steps" };
-  parameters["m"] = "2";
-  parameters["l"] = "3";
-
-  for (int i = 0; i < 3; i++) {
-    parameters[generated[i]] = "SET";
-    EXPECT_EQ(ERROR_LRC_GENERATED, lrc.parse_kml(parameters, &cerr));
-    parameters.erase(parameters.find(generated[i]));
-  }
-
-  parameters["k"] = "4";
-  parameters["m"] = "2";
-  parameters["l"] = "7";
-  EXPECT_EQ(ERROR_LRC_K_M_MODULO, lrc.parse_kml(parameters, &cerr));
-
-  parameters["k"] = "3";
-  parameters["m"] = "3";
-  parameters["l"] = "3";
-  EXPECT_EQ(ERROR_LRC_K_MODULO, lrc.parse_kml(parameters, &cerr));
-
-  parameters["k"] = "4";
-  parameters["m"] = "2";
-  parameters["l"] = "3";
-  EXPECT_EQ(0, lrc.parse_kml(parameters, &cerr));
-  EXPECT_EQ("[ "
-	    " [ \"DDc_DDc_\", \"\" ],"
-	    " [ \"DDDc____\", \"\" ],"
-	    " [ \"____DDDc\", \"\" ],"
-	    "]", parameters["layers"]);
-  EXPECT_EQ("DD__DD__", parameters["mapping"]);
-  EXPECT_EQ("chooseleaf", lrc.ruleset_steps[0].op);
-  EXPECT_EQ("host", lrc.ruleset_steps[0].type);
-  EXPECT_EQ(0, lrc.ruleset_steps[0].n);
-  EXPECT_EQ(1U, lrc.ruleset_steps.size());
-  parameters.erase(parameters.find("mapping"));
-  parameters.erase(parameters.find("layers"));
-
-  parameters["k"] = "4";
-  parameters["m"] = "2";
-  parameters["l"] = "3";
-  parameters["ruleset-failure-domain"] = "osd";
-  EXPECT_EQ(0, lrc.parse_kml(parameters, &cerr));
-  EXPECT_EQ("chooseleaf", lrc.ruleset_steps[0].op);
-  EXPECT_EQ("osd", lrc.ruleset_steps[0].type);
-  EXPECT_EQ(0, lrc.ruleset_steps[0].n);
-  EXPECT_EQ(1U, lrc.ruleset_steps.size());
-  parameters.erase(parameters.find("mapping"));
-  parameters.erase(parameters.find("layers"));
-
-  parameters["k"] = "4";
-  parameters["m"] = "2";
-  parameters["l"] = "3";
-  parameters["ruleset-failure-domain"] = "osd";
-  parameters["ruleset-locality"] = "rack";
-  EXPECT_EQ(0, lrc.parse_kml(parameters, &cerr));
-  EXPECT_EQ("choose", lrc.ruleset_steps[0].op);
-  EXPECT_EQ("rack", lrc.ruleset_steps[0].type);
-  EXPECT_EQ(2, lrc.ruleset_steps[0].n);
-  EXPECT_EQ("chooseleaf", lrc.ruleset_steps[1].op);
-  EXPECT_EQ("osd", lrc.ruleset_steps[1].type);
-  EXPECT_EQ(4, lrc.ruleset_steps[1].n);
-  EXPECT_EQ(2U, lrc.ruleset_steps.size());
-  parameters.erase(parameters.find("mapping"));
-  parameters.erase(parameters.find("layers"));
-}
-
-TEST(ErasureCodeLrc, layers_description)
-{
-  ErasureCodeLrc lrc;
-  map<std::string,std::string> parameters;
-
-  json_spirit::mArray description;
-  EXPECT_EQ(ERROR_LRC_DESCRIPTION,
-	    lrc.layers_description(parameters, &description, &cerr));
-
-  {
-    const char *description_string = "\"not an array\"";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(ERROR_LRC_ARRAY,
-	      lrc.layers_description(parameters, &description, &cerr));
-  }
-  {
-    const char *description_string = "invalid json";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(ERROR_LRC_PARSE_JSON,
-	      lrc.layers_description(parameters, &description, &cerr));
-  }
-  {
-    const char *description_string = "[]";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-  }
-}
-
-TEST(ErasureCodeLrc, layers_parse)
-{
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-
-    const char *description_string ="[ 0 ]";
-    parameters["layers"] = description_string;
-    json_spirit::mArray description;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-    EXPECT_EQ(ERROR_LRC_ARRAY,
-	      lrc.layers_parse(description_string, description, &cerr));
-  }
-
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-
-    const char *description_string ="[ [ 0 ] ]";
-    parameters["layers"] = description_string;
-    json_spirit::mArray description;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-    EXPECT_EQ(ERROR_LRC_STR,
-	      lrc.layers_parse(description_string, description, &cerr));
-  }
-
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-
-    const char *description_string ="[ [ \"\", 0 ] ]";
-    parameters["layers"] = description_string;
-    json_spirit::mArray description;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-    EXPECT_EQ(ERROR_LRC_CONFIG_OPTIONS,
-	      lrc.layers_parse(description_string, description, &cerr));
-  }
-
-  //
-  // The second element can be an object describing the plugin
-  // parameters.
-  //
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-
-    const char *description_string ="[ [ \"\", { \"a\": \"b\" }, \"ignored\" ] ]";
-    parameters["layers"] = description_string;
-    json_spirit::mArray description;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-    EXPECT_EQ(0, lrc.layers_parse(description_string, description, &cerr));
-    EXPECT_EQ("b", lrc.layers.front().parameters["a"]);
-  }
-
-  //
-  // The second element can be a str_map parseable string describing the plugin
-  // parameters.
-  //
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-
-    const char *description_string ="[ [ \"\", \"a=b c=d\" ] ]";
-    parameters["layers"] = description_string;
-    json_spirit::mArray description;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-    EXPECT_EQ(0, lrc.layers_parse(description_string, description, &cerr));
-    EXPECT_EQ("b", lrc.layers.front().parameters["a"]);
-    EXPECT_EQ("d", lrc.layers.front().parameters["c"]);
-  }
-
-}
-
-TEST(ErasureCodeLrc, layers_sanity_checks)
-{
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    parameters["mapping"] =
-	    "__DDD__DD";
-    parameters["directory"] = ".libs";
-    const char *description_string =
-      "[ "
-      "  [ \"_cDDD_cDD\", \"\" ],"
-      "  [ \"c_DDD____\", \"\" ],"
-      "  [ \"_____cDDD\", \"\" ],"
-      "]";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(0, lrc.init(parameters, &cerr));
-  }
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    const char *description_string =
-      "[ "
-      "]";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(ERROR_LRC_MAPPING, lrc.init(parameters, &cerr));
-  }
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    parameters["mapping"] = "";
-    const char *description_string =
-      "[ "
-      "]";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(ERROR_LRC_LAYERS_COUNT, lrc.init(parameters, &cerr));
-  }
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    parameters["directory"] = ".libs";
-    parameters["mapping"] =
-	    "AA";
-    const char *description_string =
-      "[ "
-      "  [ \"AA??\", \"\" ], "
-      "  [ \"AA\", \"\" ], "
-      "  [ \"AA\", \"\" ], "
-      "]";
-    parameters["layers"] = description_string;
-    EXPECT_EQ(ERROR_LRC_MAPPING_SIZE, lrc.init(parameters, &cerr));
-  }
-}
-
-TEST(ErasureCodeLrc, layers_init)
-{
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-
-    const char *description_string =
-      "[ "
-      "  [ \"_cDDD_cDD_\", \"directory=.libs\" ],"
-      "]";
-    parameters["layers"] = description_string;
-    parameters["directory"] = ".libs";
-    json_spirit::mArray description;
-    EXPECT_EQ(0, lrc.layers_description(parameters, &description, &cerr));
-    EXPECT_EQ(0, lrc.layers_parse(description_string, description, &cerr));
-    EXPECT_EQ(0, lrc.layers_init());
-    EXPECT_EQ("5", lrc.layers.front().parameters["k"]);
-    EXPECT_EQ("2", lrc.layers.front().parameters["m"]);
-    EXPECT_EQ("jerasure", lrc.layers.front().parameters["plugin"]);
-    EXPECT_EQ("reed_sol_van", lrc.layers.front().parameters["technique"]);
-  }
-}
-
-TEST(ErasureCodeLrc, init)
-{
-  ErasureCodeLrc lrc;
-  map<std::string,std::string> parameters;
-  parameters["mapping"] =
-    "__DDD__DD";
-  const char *description_string =
-    "[ "
-    "  [ \"_cDDD_cDD\", \"\" ],"
-    "  [ \"c_DDD____\", \"\" ],"
-    "  [ \"_____cDDD\", \"\" ],"
-    "]";
-  parameters["layers"] = description_string;
-  parameters["directory"] = ".libs";
-  EXPECT_EQ(0, lrc.init(parameters, &cerr));
-}
-
-TEST(ErasureCodeLrc, init_kml)
-{
-  ErasureCodeLrc lrc;
-  map<std::string,std::string> parameters;
-  parameters["k"] = "4";
-  parameters["m"] = "2";
-  parameters["l"] = "3";
-  parameters["directory"] = ".libs";
-  EXPECT_EQ(0, lrc.init(parameters, &cerr));
-  EXPECT_EQ((unsigned int)(4 + 2 + (4 + 2) / 3), lrc.get_chunk_count());
-}
-
-TEST(ErasureCodeLrc, minimum_to_decode)
-{
-  // trivial : no erasures, the minimum is want_to_read
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    parameters["mapping"] =
-      "__DDD__DD";
-    const char *description_string =
-      "[ "
-      "  [ \"_cDDD_cDD\", \"\" ],"
-      "  [ \"c_DDD____\", \"\" ],"
-      "  [ \"_____cDDD\", \"\" ],"
-      "]";
-    parameters["layers"] = description_string;
-    parameters["directory"] = ".libs";
-    EXPECT_EQ(0, lrc.init(parameters, &cerr));
-    set<int> want_to_read;
-    want_to_read.insert(1);
-    set<int> available_chunks;
-    available_chunks.insert(1);
-    available_chunks.insert(2);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(want_to_read, minimum);
-  }
-  // locally repairable erasure
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    parameters["mapping"] =
-	    "__DDD__DD_";
-    const char *description_string =
-      "[ "
-      "  [ \"_cDDD_cDD_\", \"\" ],"
-      "  [ \"c_DDD_____\", \"\" ],"
-      "  [ \"_____cDDD_\", \"\" ],"
-      "  [ \"_____DDDDc\", \"\" ],"
-      "]";
-    parameters["layers"] = description_string;
-    parameters["directory"] = ".libs";
-    EXPECT_EQ(0, lrc.init(parameters, &cerr));
-    EXPECT_EQ(parameters["mapping"].length(),
-	      lrc.get_chunk_count());
-    {
-      // want to read the last chunk
-      set<int> want_to_read;
-      want_to_read.insert(lrc.get_chunk_count() - 1);
-      // all chunks are available except the last chunk
-      set<int> available_chunks;
-      for (int i = 0; i < (int)lrc.get_chunk_count() - 1; i++)
-	available_chunks.insert(i);
-      // _____DDDDc can recover c
-      set<int> minimum;
-      EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-      set<int> expected_minimum;
-      expected_minimum.insert(5);
-      expected_minimum.insert(6);
-      expected_minimum.insert(7);
-      expected_minimum.insert(8);
-      EXPECT_EQ(expected_minimum, minimum);
-    }
-    {
-      set<int> want_to_read;
-      want_to_read.insert(0);
-      set<int> available_chunks;
-      for (int i = 1; i < (int)lrc.get_chunk_count(); i++)
-	available_chunks.insert(i);
-      set<int> minimum;
-      EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-      set<int> expected_minimum;
-      expected_minimum.insert(2);
-      expected_minimum.insert(3);
-      expected_minimum.insert(4);
-      EXPECT_EQ(expected_minimum, minimum);
-    }
-  }
-  // implicit parity required
-  {
-    ErasureCodeLrc lrc;
-    map<std::string,std::string> parameters;
-    parameters["mapping"] =
-	    "__DDD__DD";
-    const char *description_string =
-      "[ "
-      "  [ \"_cDDD_cDD\", \"\" ],"
-      "  [ \"c_DDD____\", \"\" ],"
-      "  [ \"_____cDDD\", \"\" ],"
-      "]";
-    parameters["layers"] = description_string;
-    parameters["directory"] = ".libs";
-    EXPECT_EQ(0, lrc.init(parameters, &cerr));
-    EXPECT_EQ(parameters["mapping"].length(),
-	      lrc.get_chunk_count());
-    set<int> want_to_read;
-    want_to_read.insert(8);
-    //
-    // unable to recover, too many chunks missing
-    //
-    {
-      set<int> available_chunks;
-      available_chunks.insert(0);
-      available_chunks.insert(1);
-      // missing             (2)
-      // missing             (3)
-      available_chunks.insert(4);
-      available_chunks.insert(5);
-      available_chunks.insert(6);
-      // missing             (7)
-      // missing             (8)
-      set<int> minimum;
-      EXPECT_EQ(-EIO, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    }
-    //
-    // We want to read chunk 8 and encoding was done with
-    //
-    //     _cDDD_cDD
-    //	   c_DDD____
-    //	   _____cDDD
-    //
-    // First strategy fails:
-    //
-    // 012345678
-    // xxXXXxxXX  initial chunks
-    // xx.XXxx..  missing (2, 7, 8)
-    // _____cDDD  fail : can recover 1 but 2 are missing
-    // c_DDD____  ignored because 8 is not used (i.e. _)
-    // _cDDD_cDD  fail : can recover 2 but 3 are missing
-    //
-    // Second strategy succeeds:
-    //
-    // 012345678
-    // xxXXXxxXX  initial chunks
-    // xx.XXxx..  missing (2, 7, 8)
-    // _____cDDD  fail : can recover 1 but 2 are missing
-    // c_DDD____  success: recovers chunk 2
-    // _cDDD_cDD  success: recovers chunk 7, 8
-    //
-    {
-      set<int> available_chunks;
-      available_chunks.insert(0);
-      available_chunks.insert(1);
-      // missing             (2)
-      available_chunks.insert(3);
-      available_chunks.insert(4);
-      available_chunks.insert(5);
-      available_chunks.insert(6);
-      // missing             (7)
-      // missing             (8)
-      set<int> minimum;
-      EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-      EXPECT_EQ(available_chunks, minimum);
-    }
-  }
-}
-
-TEST(ErasureCodeLrc, encode_decode)
-{
-  ErasureCodeLrc lrc;
-  map<std::string,std::string> parameters;
-  parameters["mapping"] =
-    "__DD__DD";
-  const char *description_string =
-    "[ "
-    "  [ \"_cDD_cDD\", \"\" ]," // global layer
-    "  [ \"c_DD____\", \"\" ]," // first local layer
-    "  [ \"____cDDD\", \"\" ]," // second local layer
-    "]";
-  parameters["layers"] = description_string;
-  parameters["directory"] = ".libs";
-  EXPECT_EQ(0, lrc.init(parameters, &cerr));
-  EXPECT_EQ(4U, lrc.get_data_chunk_count());
-  unsigned int stripe_width = g_conf->osd_pool_erasure_code_stripe_width;
-  unsigned int chunk_size = stripe_width / lrc.get_data_chunk_count();
-  EXPECT_EQ(chunk_size, lrc.get_chunk_size(stripe_width));
-  set<int> want_to_encode;
-  map<int, bufferlist> encoded;
-  for (unsigned int i = 0; i < lrc.get_chunk_count(); ++i) {
-    want_to_encode.insert(i);
-    bufferptr ptr(buffer::create_page_aligned(chunk_size));
-    encoded[i].push_front(ptr);
-  }
-  const vector<int> &mapping = lrc.get_chunk_mapping();
-  char c = 'A';
-  for (unsigned int i = 0; i < lrc.get_data_chunk_count(); i++) {
-    int j = mapping[i];
-    string s(chunk_size, c);
-    encoded[j].clear();
-    encoded[j].append(s);
-    c++;
-  }
-  EXPECT_EQ(0, lrc.encode_chunks(want_to_encode, &encoded));
-
-  {
-    map<int, bufferlist> chunks;
-    chunks[4] = encoded[4];
-    chunks[5] = encoded[5];
-    chunks[6] = encoded[6];
-    set<int> want_to_read;
-    want_to_read.insert(7);
-    set<int> available_chunks;
-    available_chunks.insert(4);
-    available_chunks.insert(5);
-    available_chunks.insert(6);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    // only need three chunks from the second local layer
-    EXPECT_EQ(3U, minimum.size());
-    EXPECT_EQ(1U, minimum.count(4));
-    EXPECT_EQ(1U, minimum.count(5));
-    EXPECT_EQ(1U, minimum.count(6));
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, chunks, &decoded));
-    string s(chunk_size, 'D');
-    EXPECT_EQ(s, string(decoded[7].c_str(), chunk_size));
-  }
-  {
-    set<int> want_to_read;
-    want_to_read.insert(2);
-    map<int, bufferlist> chunks;
-    chunks[1] = encoded[1];
-    chunks[3] = encoded[3];
-    chunks[5] = encoded[5];
-    chunks[6] = encoded[6];
-    chunks[7] = encoded[7];
-    set<int> available_chunks;
-    available_chunks.insert(1);
-    available_chunks.insert(3);
-    available_chunks.insert(5);
-    available_chunks.insert(6);
-    available_chunks.insert(7);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(5U, minimum.size());
-    EXPECT_EQ(available_chunks, minimum);
-
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, encoded, &decoded));
-    string s(chunk_size, 'A');
-    EXPECT_EQ(s, string(decoded[2].c_str(), chunk_size));
-  }
-  {
-    set<int> want_to_read;
-    want_to_read.insert(3);
-    want_to_read.insert(6);
-    want_to_read.insert(7);
-    set<int> available_chunks;
-    available_chunks.insert(0);
-    available_chunks.insert(1);
-    available_chunks.insert(2);
-    // available_chunks.insert(3);
-    available_chunks.insert(4);
-    available_chunks.insert(5);
-    // available_chunks.insert(6);
-    // available_chunks.insert(7);
-    encoded.erase(3);
-    encoded.erase(6);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(4U, minimum.size());
-    // only need two chunks from the first local layer
-    EXPECT_EQ(1U, minimum.count(0));
-    EXPECT_EQ(1U, minimum.count(2));
-    // the above chunks will rebuild chunk 3 and the global layer only needs
-    // three more chunks to reach the required amount of chunks (4) to recover
-    // the last two
-    EXPECT_EQ(1U, minimum.count(1));
-    EXPECT_EQ(1U, minimum.count(2));
-    EXPECT_EQ(1U, minimum.count(5));
-
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, encoded, &decoded));
-    {
-      string s(chunk_size, 'B');
-      EXPECT_EQ(s, string(decoded[3].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'C');
-      EXPECT_EQ(s, string(decoded[6].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'D');
-      EXPECT_EQ(s, string(decoded[7].c_str(), chunk_size));
-    }
-  }
-}
-
-TEST(ErasureCodeLrc, encode_decode_2)
-{
-  ErasureCodeLrc lrc;
-  map<std::string,std::string> parameters;
-  parameters["mapping"] =
-    "DD__DD__";
-  const char *description_string =
-    "[ "
-    " [ \"DDc_DDc_\", \"\" ],"
-    " [ \"DDDc____\", \"\" ],"
-    " [ \"____DDDc\", \"\" ],"
-    "]";
-  parameters["layers"] = description_string;
-  parameters["directory"] = ".libs";
-  EXPECT_EQ(0, lrc.init(parameters, &cerr));
-  EXPECT_EQ(4U, lrc.get_data_chunk_count());
-  unsigned int stripe_width = g_conf->osd_pool_erasure_code_stripe_width;
-  unsigned int chunk_size = stripe_width / lrc.get_data_chunk_count();
-  EXPECT_EQ(chunk_size, lrc.get_chunk_size(stripe_width));
-  set<int> want_to_encode;
-  map<int, bufferlist> encoded;
-  for (unsigned int i = 0; i < lrc.get_chunk_count(); ++i) {
-    want_to_encode.insert(i);
-    bufferptr ptr(buffer::create_page_aligned(chunk_size));
-    encoded[i].push_front(ptr);
-  }
-  const vector<int> &mapping = lrc.get_chunk_mapping();
-  char c = 'A';
-  for (unsigned int i = 0; i < lrc.get_data_chunk_count(); i++) {
-    int j = mapping[i];
-    string s(chunk_size, c);
-    encoded[j].clear();
-    encoded[j].append(s);
-    c++;
-  }
-  EXPECT_EQ(0, lrc.encode_chunks(want_to_encode, &encoded));
-
-  {
-    set<int> want_to_read;
-    want_to_read.insert(0);
-    map<int, bufferlist> chunks;
-    chunks[1] = encoded[1];
-    chunks[3] = encoded[3];
-    chunks[4] = encoded[4];
-    chunks[5] = encoded[5];
-    chunks[6] = encoded[6];
-    chunks[7] = encoded[7];
-    set<int> available_chunks;
-    available_chunks.insert(1);
-    available_chunks.insert(3);
-    available_chunks.insert(4);
-    available_chunks.insert(5);
-    available_chunks.insert(6);
-    available_chunks.insert(7);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(4U, minimum.size());
-    EXPECT_EQ(1U, minimum.count(1));
-    EXPECT_EQ(1U, minimum.count(4));
-    EXPECT_EQ(1U, minimum.count(5));
-    EXPECT_EQ(1U, minimum.count(6));
-
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, chunks, &decoded));
-    string s(chunk_size, 'A');
-    EXPECT_EQ(s, string(decoded[0].c_str(), chunk_size));
-  }
-  {
-    set<int> want_to_read;
-    for (unsigned int i = 0; i < lrc.get_chunk_count(); i++)
-      want_to_read.insert(i);
-    map<int, bufferlist> chunks;
-    chunks[1] = encoded[1];
-    chunks[3] = encoded[3];
-    chunks[5] = encoded[5];
-    chunks[6] = encoded[6];
-    chunks[7] = encoded[7];
-    set<int> available_chunks;
-    available_chunks.insert(1);
-    available_chunks.insert(3);
-    available_chunks.insert(5);
-    available_chunks.insert(6);
-    available_chunks.insert(7);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(5U, minimum.size());
-    EXPECT_EQ(1U, minimum.count(1));
-    EXPECT_EQ(1U, minimum.count(3));
-    EXPECT_EQ(1U, minimum.count(5));
-    EXPECT_EQ(1U, minimum.count(6));
-    EXPECT_EQ(1U, minimum.count(7));
-
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, chunks, &decoded));
-    {
-      string s(chunk_size, 'A');
-      EXPECT_EQ(s, string(decoded[0].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'B');
-      EXPECT_EQ(s, string(decoded[1].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'C');
-      EXPECT_EQ(s, string(decoded[4].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'D');
-      EXPECT_EQ(s, string(decoded[5].c_str(), chunk_size));
-    }
-  }
-  {
-    set<int> want_to_read;
-    for (unsigned int i = 0; i < lrc.get_chunk_count(); i++)
-      want_to_read.insert(i);
-    map<int, bufferlist> chunks;
-    chunks[1] = encoded[1];
-    chunks[3] = encoded[3];
-    chunks[5] = encoded[5];
-    chunks[6] = encoded[6];
-    chunks[7] = encoded[7];
-    set<int> available_chunks;
-    available_chunks.insert(1);
-    available_chunks.insert(3);
-    available_chunks.insert(5);
-    available_chunks.insert(6);
-    available_chunks.insert(7);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(5U, minimum.size());
-    EXPECT_EQ(1U, minimum.count(1));
-    EXPECT_EQ(1U, minimum.count(3));
-    EXPECT_EQ(1U, minimum.count(5));
-    EXPECT_EQ(1U, minimum.count(6));
-    EXPECT_EQ(1U, minimum.count(7));
-
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, chunks, &decoded));
-    {
-      string s(chunk_size, 'A');
-      EXPECT_EQ(s, string(decoded[0].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'B');
-      EXPECT_EQ(s, string(decoded[1].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'C');
-      EXPECT_EQ(s, string(decoded[4].c_str(), chunk_size));
-    }
-    {
-      string s(chunk_size, 'D');
-      EXPECT_EQ(s, string(decoded[5].c_str(), chunk_size));
-    }
-  }
-  {
-    set<int> want_to_read;
-    want_to_read.insert(6);
-    map<int, bufferlist> chunks;
-    chunks[0] = encoded[0];
-    chunks[1] = encoded[1];
-    chunks[3] = encoded[3];
-    chunks[5] = encoded[5];
-    chunks[7] = encoded[7];
-    set<int> available_chunks;
-    available_chunks.insert(0);
-    available_chunks.insert(1);
-    available_chunks.insert(3);
-    available_chunks.insert(5);
-    available_chunks.insert(7);
-    set<int> minimum;
-    EXPECT_EQ(0, lrc.minimum_to_decode(want_to_read, available_chunks, &minimum));
-    EXPECT_EQ(available_chunks, minimum);
-
-    map<int, bufferlist> decoded;
-    EXPECT_EQ(0, lrc.decode(want_to_read, chunks, &decoded));
-  }
-}
-
-int main(int argc, char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **)argv, args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ;
- *   make -j4 && valgrind --tool=memcheck --leak-check=full \
- *      ./unittest_erasure_code_lrc \
- *      --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
- * End:
- */
diff --git a/src/test/erasure-code/TestErasureCodePlugin.cc b/src/test/erasure-code/TestErasureCodePlugin.cc
index ebd0d64..a896e3f 100644
--- a/src/test/erasure-code/TestErasureCodePlugin.cc
+++ b/src/test/erasure-code/TestErasureCodePlugin.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -73,17 +72,13 @@ TEST_F(ErasureCodePluginRegistryTest, factory_mutex) {
 TEST_F(ErasureCodePluginRegistryTest, all)
 {
   map<std::string,std::string> parameters;
-  string directory(".libs");
-  parameters["directory"] = directory;
+  parameters["directory"] = ".libs";
   ErasureCodeInterfaceRef erasure_code;
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
   stringstream ss;
   EXPECT_FALSE(erasure_code);
   EXPECT_EQ(-EIO, instance.factory("invalid", parameters, &erasure_code, ss));
   EXPECT_FALSE(erasure_code);
-  EXPECT_EQ(-EXDEV, instance.factory("missing_version", parameters,
-				     &erasure_code, ss));
-  EXPECT_FALSE(erasure_code);
   EXPECT_EQ(-ENOENT, instance.factory("missing_entry_point", parameters,
 				      &erasure_code, ss));
   EXPECT_FALSE(erasure_code);
@@ -96,13 +91,7 @@ TEST_F(ErasureCodePluginRegistryTest, all)
   EXPECT_EQ(0, instance.factory("example", parameters, &erasure_code, ss));
   EXPECT_TRUE(erasure_code);
   ErasureCodePlugin *plugin = 0;
-  {
-    Mutex::Locker l(instance.lock);
-    EXPECT_EQ(-EEXIST, instance.load("example", directory, &plugin, ss));
-    EXPECT_EQ(-ENOENT, instance.remove("does not exist"));
-    EXPECT_EQ(0, instance.remove("example"));
-    EXPECT_EQ(0, instance.load("example", directory, &plugin, ss));
-  }
+  EXPECT_EQ(-EEXIST, instance.load("example", parameters, &plugin, ss));
 }
 
 int main(int argc, char **argv) {
@@ -116,12 +105,6 @@ int main(int argc, char **argv) {
   return RUN_ALL_TESTS();
 }
 
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make -j4 && 
- *   make unittest_erasure_code_plugin && 
- *   valgrind  --leak-check=full --tool=memcheck \
- *      ./unittest_erasure_code_plugin \
- *      --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
- * End:
- */
+// Local Variables:
+// compile-command: "cd ../.. ; make -j4 && make unittest_erasure_code_plugin && valgrind  --leak-check=full --tool=memcheck ./unittest_erasure_code_plugin --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
+// End:
diff --git a/src/test/erasure-code/TestErasureCodePluginIsa.cc b/src/test/erasure-code/TestErasureCodePluginIsa.cc
deleted file mode 100644
index 605bda0..0000000
--- a/src/test/erasure-code/TestErasureCodePluginIsa.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 CERN (Switzerland)
- *
- * Author: Andreas-Joachim Peters <Andreas.Joachim.Peters at cern.ch>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-#include "arch/probe.h"
-#include "arch/intel.h"
-#include "global/global_init.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#include "common/ceph_argparse.h"
-#include "global/global_context.h"
-#include "gtest/gtest.h"
-
-TEST(ErasureCodePlugin, factory)
-{
-  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
-  map<std::string,std::string> parameters;
-  parameters["directory"] = ".libs";
-  {
-    ErasureCodeInterfaceRef erasure_code;
-    EXPECT_FALSE(erasure_code);
-    EXPECT_EQ(-EIO, instance.factory("no-isa", parameters,
-                                        &erasure_code, cerr));
-    EXPECT_FALSE(erasure_code);
-  }
-  const char *techniques[] = {
-    "reed_sol_van",
-    0
-  };
-  for(const char **technique = techniques; *technique; technique++) {
-    ErasureCodeInterfaceRef erasure_code;
-    parameters["technique"] = *technique;
-    EXPECT_FALSE(erasure_code);
-    EXPECT_EQ(0, instance.factory("isa", parameters,
-                                  &erasure_code, cerr));
-    EXPECT_TRUE(erasure_code);
-  }
-}
-
-int main(int argc, char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **)argv, args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make -j4 &&
- *   make unittest_erasure_code_plugin_isa &&
- *   valgrind --tool=memcheck ./unittest_erasure_code_plugin_isa \
- *      --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
- * End:
- */
diff --git a/src/test/erasure-code/TestErasureCodePluginJerasure.cc b/src/test/erasure-code/TestErasureCodePluginJerasure.cc
index e6cb4c4..21f6615 100644
--- a/src/test/erasure-code/TestErasureCodePluginJerasure.cc
+++ b/src/test/erasure-code/TestErasureCodePluginJerasure.cc
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
  *
@@ -169,7 +169,7 @@ TEST(ErasureCodePlugin, sse)
   parameters["m"] = "1";
   for (vector<string>::iterator sse_variant = sse_variants.begin();
        sse_variant != sse_variants.end();
-       ++sse_variant) {
+       sse_variant++) {
     //
     // load the plugin variant
     //
diff --git a/src/test/erasure-code/TestErasureCodePluginLrc.cc b/src/test/erasure-code/TestErasureCodePluginLrc.cc
deleted file mode 100644
index 9376d9b..0000000
--- a/src/test/erasure-code/TestErasureCodePluginLrc.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph distributed storage system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include <errno.h>
-#include "arch/probe.h"
-#include "arch/intel.h"
-#include "global/global_init.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#include "common/ceph_argparse.h"
-#include "global/global_context.h"
-#include "gtest/gtest.h"
-
-TEST(ErasureCodePlugin, factory)
-{
-  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
-  map<std::string,std::string> parameters;
-  parameters["directory"] = ".libs";
-  parameters["mapping"] = "DD_";
-  parameters["layers"] = "[ [ \"DDc\", \"\" ] ]";
-  ErasureCodeInterfaceRef erasure_code;
-  EXPECT_FALSE(erasure_code);
-  EXPECT_EQ(0, instance.factory("lrc", parameters, &erasure_code, cerr));
-  EXPECT_TRUE(erasure_code);
-}
-
-int main(int argc, char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **)argv, args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make -j4 &&
- *   make unittest_erasure_code_plugin_lrc &&
- *   valgrind --tool=memcheck ./unittest_erasure_code_plugin_lrc \
- *      --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
- * End:
- */
diff --git a/src/test/erasure-code/TestJerasurePluginGeneric.cc b/src/test/erasure-code/TestJerasurePluginGeneric.cc
index e7a7597..f273bd6 100644
--- a/src/test/erasure-code/TestJerasurePluginGeneric.cc
+++ b/src/test/erasure-code/TestJerasurePluginGeneric.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,11 +14,10 @@
  * 
  */
 
-#include "ceph_ver.h"
+#include <errno.h>
+#include "erasure-code/ErasureCodePlugin.h"
 
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   return -111;
 }
diff --git a/src/test/erasure-code/TestJerasurePluginSSE3.cc b/src/test/erasure-code/TestJerasurePluginSSE3.cc
index 0c752b2..9d74d52 100644
--- a/src/test/erasure-code/TestJerasurePluginSSE3.cc
+++ b/src/test/erasure-code/TestJerasurePluginSSE3.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,11 +14,10 @@
  * 
  */
 
-#include "ceph_ver.h"
+#include <errno.h>
+#include "erasure-code/ErasureCodePlugin.h"
 
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   return -333;
 }
diff --git a/src/test/erasure-code/TestJerasurePluginSSE4.cc b/src/test/erasure-code/TestJerasurePluginSSE4.cc
index a39a9b4..7bb6f7e 100644
--- a/src/test/erasure-code/TestJerasurePluginSSE4.cc
+++ b/src/test/erasure-code/TestJerasurePluginSSE4.cc
@@ -1,10 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- * Copyright (C) 2014 Red Hat <contact at redhat.com>
  *
  * Author: Loic Dachary <loic at dachary.org>
  *
@@ -15,11 +14,10 @@
  * 
  */
 
-#include "ceph_ver.h"
+#include <errno.h>
+#include "erasure-code/ErasureCodePlugin.h"
 
-extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
-
-extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+int __erasure_code_init(char *plugin_name)
 {
   return -444;
 }
diff --git a/src/test/erasure-code/ceph_erasure_code.cc b/src/test/erasure-code/ceph_erasure_code.cc
index ed48205..f99e845 100644
--- a/src/test/erasure-code/ceph_erasure_code.cc
+++ b/src/test/erasure-code/ceph_erasure_code.cc
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
  *
@@ -49,12 +49,10 @@ int ErasureCodeCommand::setup(int argc, char** argv) {
     ("all", "implies "
      "--get_chunk_size 1024 "
      "--get_data_chunk_count "
-     "--get_coding_chunk_count "
      "--get_chunk_count ")
     ("get_chunk_size", po::value<unsigned int>(),
      "display get_chunk_size(<object size>)")
     ("get_data_chunk_count", "display get_data_chunk_count()")
-    ("get_coding_chunk_count", "display get_coding_chunk_count()")
     ("get_chunk_count", "display get_chunk_count()")
     ("parameter,P", po::value<vector<string> >(),
      "parameters")
@@ -135,9 +133,6 @@ int ErasureCodeCommand::run() {
   if (vm.count("all") || vm.count("get_data_chunk_count"))
     cout << "get_data_chunk_count\t"
       	 << erasure_code->get_data_chunk_count() << endl;
-  if (vm.count("all") || vm.count("get_coding_chunk_count"))
-    cout << "get_coding_chunk_count\t"
-      	 << erasure_code->get_coding_chunk_count() << endl;
   if (vm.count("all") || vm.count("get_chunk_count"))
     cout << "get_chunk_count\t"
       	 << erasure_code->get_chunk_count() << endl;
@@ -165,7 +160,6 @@ int main(int argc, char** argv) {
  *      --parameter m=2 \
  *      --get_chunk_size 1024 \
  *      --get_data_chunk_count \
- *      --get_coding_chunk_count \
  *      --get_chunk_count \
  * "
  * End:
diff --git a/src/test/erasure-code/ceph_erasure_code_benchmark.cc b/src/test/erasure-code/ceph_erasure_code_benchmark.cc
index da90d85..9d70296 100644
--- a/src/test/erasure-code/ceph_erasure_code_benchmark.cc
+++ b/src/test/erasure-code/ceph_erasure_code_benchmark.cc
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
  *
@@ -31,7 +31,6 @@
 #include "common/Clock.h"
 #include "include/utime.h"
 #include "erasure-code/ErasureCodePlugin.h"
-#include "erasure-code/ErasureCode.h"
 
 namespace po = boost::program_options;
 
@@ -125,27 +124,14 @@ int ErasureCodeBench::encode()
 {
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
   ErasureCodeInterfaceRef erasure_code;
-  stringstream messages;
-  int code = instance.factory(plugin, parameters, &erasure_code, messages);
-  if (code) {
-    cerr << messages.str() << endl;
+  int code = instance.factory(plugin, parameters, &erasure_code, cerr);
+  if (code)
     return code;
-  }
   int k = atoi(parameters["k"].c_str());
   int m = atoi(parameters["m"].c_str());
 
-  if (erasure_code->get_data_chunk_count() != (unsigned int)k ||
-      (erasure_code->get_chunk_count() - erasure_code->get_data_chunk_count()
-       != (unsigned int)m)) {
-    cout << "paramter k is " << k << "/m is " << m << ". But data chunk count is "
-      << erasure_code->get_data_chunk_count() <<"/parity chunk count is "
-      << erasure_code->get_chunk_count() - erasure_code->get_data_chunk_count() << endl;
-    return -EINVAL;
-  }
-
   bufferlist in;
   in.append(string(in_size, 'X'));
-  in.rebuild_aligned(ErasureCode::SIMD_ALIGN);
   set<int> want_to_encode;
   for (int i = 0; i < k + m; i++) {
     want_to_encode.insert(i);
@@ -166,26 +152,14 @@ int ErasureCodeBench::decode()
 {
   ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
   ErasureCodeInterfaceRef erasure_code;
-  stringstream messages;
-  int code = instance.factory(plugin, parameters, &erasure_code, messages);
-  if (code) {
-    cerr << messages.str() << endl;
+  int code = instance.factory(plugin, parameters, &erasure_code, cerr);
+  if (code)
     return code;
-  }
   int k = atoi(parameters["k"].c_str());
   int m = atoi(parameters["m"].c_str());
 
-  if (erasure_code->get_data_chunk_count() != (unsigned int)k ||
-      (erasure_code->get_chunk_count() - erasure_code->get_data_chunk_count()
-       != (unsigned int)m)) {
-    cout << "paramter k is " << k << "/m is " << m << ". But data chunk count is "
-      << erasure_code->get_data_chunk_count() <<"/parity chunk count is "
-      << erasure_code->get_chunk_count() - erasure_code->get_data_chunk_count() << endl;
-    return -EINVAL;
-  }
   bufferlist in;
   in.append(string(in_size, 'X'));
-  in.rebuild_aligned(ErasureCode::SIMD_ALIGN);
 
   set<int> want_to_encode;
   for (int i = 0; i < k + m; i++) {
diff --git a/src/test/erasure-code/ceph_erasure_code_benchmark.h b/src/test/erasure-code/ceph_erasure_code_benchmark.h
index b25b9ce..df73aa7 100644
--- a/src/test/erasure-code/ceph_erasure_code_benchmark.h
+++ b/src/test/erasure-code/ceph_erasure_code_benchmark.h
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 /*
- * Ceph distributed storage system
+ * Ceph - scalable distributed file system
  *
  * Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
  *
diff --git a/src/test/erasure-code/ceph_erasure_code_non_regression.cc b/src/test/erasure-code/ceph_erasure_code_non_regression.cc
new file mode 100644
index 0000000..c04accf
--- /dev/null
+++ b/src/test/erasure-code/ceph_erasure_code_non_regression.cc
@@ -0,0 +1,325 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph distributed storage system
+ *
+ * Red Hat (C) 2014 Red Hat <contact at redhat.com>
+ *
+ * Author: Loic Dachary <loic at dachary.org>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <errno.h>
+#include <boost/scoped_ptr.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/program_options/option.hpp>
+#include <boost/program_options/options_description.hpp>
+#include <boost/program_options/variables_map.hpp>
+#include <boost/program_options/cmdline.hpp>
+#include <boost/program_options/parsers.hpp>
+#include <boost/algorithm/string.hpp>
+
+#include "global/global_context.h"
+#include "global/global_init.h"
+#include "common/errno.h"
+#include "common/ceph_argparse.h"
+#include "common/config.h"
+#include "erasure-code/ErasureCodePlugin.h"
+
+namespace po = boost::program_options;
+using namespace std;
+
+class ErasureCodeNonRegression {
+  unsigned stripe_width;
+  string plugin;
+  bool create;
+  bool check;
+  string base;
+  string directory;
+  map<string,string> parameters;
+public:
+  int setup(int argc, char** argv);
+  int run();
+  int run_create();
+  int run_check();
+  int decode_erasures(ErasureCodeInterfaceRef erasure_code,
+		      set<int> erasures,
+		      map<int,bufferlist> chunks);
+  string content_path();
+  string chunk_path(unsigned int chunk);
+};
+
+int ErasureCodeNonRegression::setup(int argc, char** argv) {
+
+  po::options_description desc("Allowed options");
+  desc.add_options()
+    ("help,h", "produce help message")
+    ("stripe-width,s", po::value<int>()->default_value(4 * 1024),
+     "stripe_width, i.e. the size of the buffer to be encoded")
+    ("plugin,p", po::value<string>()->default_value("jerasure"),
+     "erasure code plugin name")
+    ("base", po::value<string>()->default_value("."),
+     "prefix all paths with base")
+    ("parameter,P", po::value<vector<string> >(),
+     "parameters")
+    ("create", "create the erasure coded content in the directory")
+    ("check", "check the content in the directory matches the chunks and vice versa")
+    ;
+
+  po::variables_map vm;
+  po::parsed_options parsed =
+    po::command_line_parser(argc, argv).options(desc).allow_unregistered().run();
+  po::store(
+    parsed,
+    vm);
+  po::notify(vm);
+
+  vector<const char *> ceph_options, def_args;
+  vector<string> ceph_option_strings = po::collect_unrecognized(
+    parsed.options, po::include_positional);
+  ceph_options.reserve(ceph_option_strings.size());
+  for (vector<string>::iterator i = ceph_option_strings.begin();
+       i != ceph_option_strings.end();
+       ++i) {
+    ceph_options.push_back(i->c_str());
+  }
+
+  global_init(
+    &def_args, ceph_options, CEPH_ENTITY_TYPE_CLIENT,
+    CODE_ENVIRONMENT_UTILITY,
+    CINIT_FLAG_NO_DEFAULT_CONFIG_FILE);
+  common_init_finish(g_ceph_context);
+  g_ceph_context->_conf->apply_changes(NULL);
+
+  if (vm.count("help")) {
+    cout << desc << std::endl;
+    return 1;
+  }
+
+  stripe_width = vm["stripe-width"].as<int>();
+  plugin = vm["plugin"].as<string>();
+  base = vm["base"].as<string>();
+  check = vm.count("check") > 0;
+  create = vm.count("create") > 0;
+
+  if (!check && !create) {
+    cerr << "must specifify either --check or --create" << endl;
+    return 1;
+  }
+
+  {
+    stringstream path;
+    path << base << "/" << "plugin=" << plugin << " stipe-width=" << stripe_width;
+    directory = path.str();
+  }
+
+  if (vm.count("parameter")) {
+    const vector<string> &p = vm["parameter"].as< vector<string> >();
+    for (vector<string>::const_iterator i = p.begin();
+	 i != p.end();
+	 ++i) {
+      std::vector<std::string> strs;
+      boost::split(strs, *i, boost::is_any_of("="));
+      if (strs.size() != 2) {
+	cerr << "--parameter " << *i << " ignored because it does not contain exactly one =" << endl;
+      } else {
+	parameters[strs[0]] = strs[1];
+      }
+      if (strs[0] != "directory")
+	directory += " " + *i;
+    }
+  }
+  if (parameters.count("directory") == 0)
+    parameters["directory"] = ".libs";
+
+  return 0;
+}
+
+int ErasureCodeNonRegression::run()
+  {
+  int ret = 0;
+  if(create && (ret = run_create()))
+    return ret;
+  if(check && (ret = run_check()))
+    return ret;
+  return ret;
+}
+
+int ErasureCodeNonRegression::run_create()
+{
+  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
+  ErasureCodeInterfaceRef erasure_code;
+  stringstream messages;
+  int code = instance.factory(plugin, parameters, &erasure_code, messages);
+  if (code) {
+    cerr << messages.str() << endl;
+    return code;
+  }
+
+  if (::mkdir(directory.c_str(), 0755)) {
+    cerr << "mkdir(" << directory << "): " << cpp_strerror(errno) << endl;
+    return 1;
+  }
+  unsigned payload_chunk_size = 37;
+  string payload;
+  for (unsigned j = 0; j < payload_chunk_size; ++j)
+    payload.push_back('a' + (rand() % 26));
+  bufferlist in;
+  for (unsigned j = 0; j < stripe_width; j += payload_chunk_size)
+    in.append(payload);
+  if (stripe_width < in.length())
+    in.splice(stripe_width, in.length() - stripe_width);
+  if (in.write_file(content_path().c_str()))
+    return 1;
+  set<int> want_to_encode;
+  for (unsigned int i = 0; i < erasure_code->get_chunk_count(); i++) {
+    want_to_encode.insert(i);
+  }
+  map<int,bufferlist> encoded;
+  code = erasure_code->encode(want_to_encode, in, &encoded);
+  if (code)
+    return code;
+  for (map<int,bufferlist>::iterator chunk = encoded.begin();
+       chunk != encoded.end();
+       chunk++) {
+    if (chunk->second.write_file(chunk_path(chunk->first).c_str()))
+      return 1;
+  }
+  return 0;
+}
+
+int ErasureCodeNonRegression::decode_erasures(ErasureCodeInterfaceRef erasure_code,
+					      set<int> erasures,
+					      map<int,bufferlist> chunks)
+{
+  map<int,bufferlist> available;
+  for (map<int,bufferlist>::iterator chunk = chunks.begin();
+       chunk != chunks.end();
+       ++chunk) {
+    if (erasures.count(chunk->first) == 0)
+      available[chunk->first] = chunk->second;
+      
+  }
+  map<int,bufferlist> decoded;
+  int code = erasure_code->decode(erasures, available, &decoded);
+  if (code)
+    return code;
+  for (set<int>::iterator erasure = erasures.begin();
+       erasure != erasures.end();
+       ++erasure) {
+    if (!chunks[*erasure].contents_equal(decoded[*erasure])) {
+      cerr << "chunk " << *erasure << " incorrectly recovered" << endl;
+      return 1;
+    }
+  }
+  return 0;
+}
+
+int ErasureCodeNonRegression::run_check()
+{
+  ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
+  ErasureCodeInterfaceRef erasure_code;
+  stringstream messages;
+  int code = instance.factory(plugin, parameters, &erasure_code, messages);
+  if (code) {
+    cerr << messages.str() << endl;
+    return code;
+  }
+  string errors;
+  bufferlist in;
+  if (in.read_file(content_path().c_str(), &errors)) {
+    cerr << errors << endl;
+    return 1;
+  }
+  set<int> want_to_encode;
+  for (unsigned int i = 0; i < erasure_code->get_chunk_count(); i++) {
+    want_to_encode.insert(i);
+  }
+
+  map<int,bufferlist> encoded;
+  code = erasure_code->encode(want_to_encode, in, &encoded);
+  if (code)
+    return code;
+
+  for (map<int,bufferlist>::iterator chunk = encoded.begin();
+       chunk != encoded.end();
+       chunk++) {
+    bufferlist existing;
+    if (existing.read_file(chunk_path(chunk->first).c_str(), &errors)) {
+      cerr << errors << endl;
+      return 1;
+    }
+    bufferlist &old = chunk->second;
+    if (existing.length() != old.length() ||
+	memcmp(existing.c_str(), old.c_str(), old.length())) {
+      cerr << "chunk " << chunk->first << " encodes differently" << endl;
+      return 1;
+    }
+  }
+
+  // erasing a single chunk is likely to use a specific code path in every plugin
+  set<int> erasures;
+  erasures.clear();
+  erasures.insert(0);
+  code = decode_erasures(erasure_code, erasures, encoded);
+  if (code)
+    return code;
+
+  if (erasure_code->get_chunk_count() - erasure_code->get_data_chunk_count() > 1) {
+    // erasing two chunks is likely to be the general case
+    erasures.clear();
+    erasures.insert(0);
+    erasures.insert(erasure_code->get_chunk_count() - 1);
+    code = decode_erasures(erasure_code, erasures, encoded);
+    if (code)
+      return code;
+  }
+  
+  return 0;
+}
+
+string ErasureCodeNonRegression::content_path()
+{
+  stringstream path;
+  path << directory << "/content";
+  return path.str();
+}
+
+string ErasureCodeNonRegression::chunk_path(unsigned int chunk)
+{
+  stringstream path;
+  path << directory << "/" << chunk;
+  return path.str();
+}
+
+int main(int argc, char** argv) {
+  ErasureCodeNonRegression non_regression;
+  int err = non_regression.setup(argc, argv);
+  if (err)
+    return err;
+  return non_regression.run();
+}
+
+/*
+ * Local Variables:
+ * compile-command: "cd ../.. ; make -j4 &&
+ *   make ceph_erasure_code_non_regression &&
+ *   libtool --mode=execute valgrind --tool=memcheck --leak-check=full \
+ *      ./ceph_erasure_code_non_regression \
+ *      --plugin jerasure \
+ *      --parameter directory=.libs \
+ *      --parameter technique=reed_sol_van \
+ *      --parameter k=2 \
+ *      --parameter m=2 \
+ *      --directory /tmp/ceph_erasure_code_non_regression \
+ *      --stripe-width 3181 \
+ *      --create \
+ *      --check
+ * "
+ * End:
+ */
diff --git a/src/test/erasure-code/test-erasure-code.sh b/src/test/erasure-code/test-erasure-code.sh
deleted file mode 100755
index e754319..0000000
--- a/src/test/erasure-code/test-erasure-code.sh
+++ /dev/null
@@ -1,277 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-
-source test/mon/mon-test-helpers.sh
-source test/osd/osd-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    setup $dir || return 1
-    run_mon $dir a --public-addr 127.0.0.1 || return 1
-    # check that erasure code plugins are preloaded
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1
-    grep 'load: jerasure.*lrc' $dir/a/log || return 1
-    for id in $(seq 0 10) ; do
-        run_osd $dir $id || return 1
-    done
-    # check that erasure code plugins are preloaded
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
-    grep 'load: jerasure.*lrc' $dir/osd-0.log || return 1
-    create_erasure_coded_pool ecpool || return 1
-    FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for TEST_function in $FUNCTIONS ; do
-        if ! $TEST_function $dir ; then
-            cat $dir/a/log
-            return 1
-        fi
-    done
-    delete_pool ecpool || return 1
-    teardown $dir || return 1
-}
-
-function create_erasure_coded_pool() {
-    local poolname=$1
-
-    ./ceph osd erasure-code-profile set myprofile \
-        ruleset-failure-domain=osd || return 1
-    ./ceph osd pool create $poolname 12 12 erasure myprofile \
-        || return 1
-}
-
-function delete_pool() {
-    local poolname=$1
-
-    ./ceph osd pool delete $poolname $poolname --yes-i-really-really-mean-it
-}
-
-function rados_put_get() {
-    local dir=$1
-    local poolname=$2
-
-    for marker in AAA BBB CCCC DDDD ; do
-        printf "%*s" 1024 $marker
-    done > $dir/ORIGINAL
-
-    #
-    # get and put an object, compare they are equal
-    #
-    ./rados --pool $poolname put SOMETHING $dir/ORIGINAL || return 1
-    ./rados --pool $poolname get SOMETHING $dir/COPY || return 1
-    diff $dir/ORIGINAL $dir/COPY || return 1
-    rm $dir/COPY
-
-    #
-    # take out the first OSD used to store the object and
-    # check the object can still be retrieved, which implies
-    # recovery
-    #
-    local -a initial_osds=($(get_osds $poolname SOMETHING))
-    local last=$((${#initial_osds[@]} - 1))
-    ./ceph osd out ${initial_osds[$last]} || return 1
-    ! get_osds $poolname SOMETHING | grep '\<'${initial_osds[$last]}'\>' || return 1
-    ./rados --pool $poolname get SOMETHING $dir/COPY || return 1
-    diff $dir/ORIGINAL $dir/COPY || return 1
-    ./ceph osd in ${initial_osds[$last]} || return 1
-
-    rm $dir/ORIGINAL
-}
-
-function plugin_exists() {
-    local plugin=$1
-
-    local status
-    ./ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin
-    if ./ceph osd crush rule create-erasure TESTRULE TESTPROFILE 2>&1 |
-        grep "$plugin.*No such file" ; then
-        status=1
-    else
-        ./ceph osd crush rule rm TESTRULE
-        status=0
-    fi
-    ./ceph osd erasure-code-profile rm TESTPROFILE 
-    return $status
-}
-
-function TEST_rados_put_get_lrc_advanced() {
-    local dir=$1
-    local poolname=pool-lrc
-    local profile=profile-lrc
-
-    ./ceph osd erasure-code-profile set $profile \
-        plugin=lrc \
-        mapping=DD_ \
-        ruleset-steps='[ [ "chooseleaf", "osd", 0 ] ]' \
-        layers='[ [ "DDc", "" ] ]'  || return 1
-    ./ceph osd pool create $poolname 12 12 erasure $profile \
-        || return 1
-
-    rados_put_get $dir $poolname || return 1
-
-    delete_pool $poolname
-    ./ceph osd erasure-code-profile rm $profile
-}
-
-function TEST_rados_put_get_lrc_kml() {
-    local dir=$1
-    local poolname=pool-lrc
-    local profile=profile-lrc
-
-    ./ceph osd erasure-code-profile set $profile \
-        plugin=lrc \
-        k=4 m=2 l=3 \
-        ruleset-failure-domain=osd || return 1
-    ./ceph osd pool create $poolname 12 12 erasure $profile \
-        || return 1
-
-    rados_put_get $dir $poolname || return 1
-
-    delete_pool $poolname
-    ./ceph osd erasure-code-profile rm $profile
-}
-
-function TEST_rados_put_get_isa() {
-    if ! plugin_exists isa ; then
-        echo "SKIP because plugin isa has not been built"
-        return 0
-    fi
-    local dir=$1
-    local poolname=pool-isa
-
-    ./ceph osd erasure-code-profile set profile-isa \
-        plugin=isa \
-        ruleset-failure-domain=osd || return 1
-    ./ceph osd pool create $poolname 12 12 erasure profile-isa \
-        || return 1
-
-    rados_put_get $dir $poolname || return 1
-
-    delete_pool $poolname
-}
-
-function TEST_rados_put_get_jerasure() {
-    local dir=$1
-
-    rados_put_get $dir ecpool || return 1
-
-    local poolname=pool-jerasure
-    local profile=profile-jerasure
-
-    ./ceph osd erasure-code-profile set $profile \
-        plugin=jerasure \
-        k=4 m=2 \
-        ruleset-failure-domain=osd || return 1
-    ./ceph osd pool create $poolname 12 12 erasure $profile \
-        || return 1
-
-    rados_put_get $dir $poolname || return 1
-
-    delete_pool $poolname
-    ./ceph osd erasure-code-profile rm $profile
-}
-
-function TEST_alignment_constraints() {
-    local payload=ABC
-    echo "$payload" > $dir/ORIGINAL
-    # 
-    # Verify that the rados command enforces alignment constraints
-    # imposed by the stripe width
-    # See http://tracker.ceph.com/issues/8622
-    #
-    local stripe_width=$(./ceph-conf --show-config-value osd_pool_erasure_code_stripe_width)
-    local block_size=$((stripe_width - 1))
-    dd if=/dev/zero of=$dir/ORIGINAL bs=$block_size count=2
-    ./rados --block-size=$block_size \
-        --pool ecpool put UNALIGNED $dir/ORIGINAL || return 1
-    rm $dir/ORIGINAL
-}
-
-function chunk_size() {
-    local stripe_width=$(./ceph-conf --show-config-value osd_pool_erasure_code_stripe_width)
-    eval local $(./ceph osd erasure-code-profile get default | grep k=)
-    echo $(($stripe_width / $k))
-}
-
-#
-# By default an object will be split in two (k=2) with the first part
-# of the object in the first OSD of the up set and the second part in
-# the next OSD in the up set. This layout is defined by the mapping
-# parameter and this function helps verify that the first and second
-# part of the object are located in the OSD where they should be.
-#
-function verify_chunk_mapping() {
-    local dir=$1
-    local poolname=$2
-    local first=$3
-    local second=$4
-
-    local payload=$(printf '%*s' $(chunk_size) FIRST$poolname ; printf '%*s' $(chunk_size) SECOND$poolname)
-    echo -n "$payload" > $dir/ORIGINAL
-
-    ./rados --pool $poolname put SOMETHING$poolname $dir/ORIGINAL || return 1
-    ./rados --pool $poolname get SOMETHING$poolname $dir/COPY || return 1
-    local -a osds=($(get_osds $poolname SOMETHING$poolname))
-    for (( i = 0; i < ${#osds[@]}; i++ )) ; do
-        ./ceph daemon osd.${osds[$i]} flush_journal
-    done
-    diff $dir/ORIGINAL $dir/COPY || return 1
-    rm $dir/COPY
-
-    local -a osds=($(get_osds $poolname SOMETHING$poolname))
-    grep --quiet --recursive --text FIRST$poolname $dir/${osds[$first]} || return 1
-    grep --quiet --recursive --text SECOND$poolname $dir/${osds[$second]} || return 1
-}
-
-function TEST_chunk_mapping() {
-    local dir=$1
-
-    #
-    # mapping=DD_ is the default:
-    #  first OSD (i.e. 0) in the up set has the first part of the object
-    #  second OSD (i.e. 1) in the up set has the second part of the object
-    #
-    verify_chunk_mapping $dir ecpool 0 1 || return 1
-
-    ./ceph osd erasure-code-profile set remap-profile \
-        plugin=lrc \
-        layers='[ [ "_DD", "" ] ]' \
-        mapping='_DD' \
-        ruleset-steps='[ [ "choose", "osd", 0 ] ]' || return 1
-    ./ceph osd erasure-code-profile get remap-profile
-    ./ceph osd pool create remap-pool 12 12 erasure remap-profile \
-        || return 1
-
-    #
-    # mapping=_DD
-    #  second OSD (i.e. 1) in the up set has the first part of the object
-    #  third OSD (i.e. 2) in the up set has the second part of the object
-    #
-    verify_chunk_mapping $dir remap-pool 1 2 || return 1
-
-    delete_pool remap-pool
-    ./ceph osd erasure-code-profile rm remap-profile
-}
-
-main test-erasure-code
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/erasure-code/test-erasure-code.sh"
-# End:
diff --git a/src/test/filestore/TestFileStore.cc b/src/test/filestore/TestFileStore.cc
deleted file mode 100644
index a9b58a1..0000000
--- a/src/test/filestore/TestFileStore.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
- *
- * Author: Loic Dachary <loic at dachary.org>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "common/ceph_argparse.h"
-#include "global/global_init.h"
-#include "os/FileStore.h"
-#include <gtest/gtest.h>
-
-class TestFileStore {
-public:
-  static void create_backend(FileStore &fs, long f_type) {
-    fs.create_backend(f_type);
-  }
-};
-
-TEST(FileStore, create)
-{
-  {
-    map<string,string> pm;
-    FileStore fs("a", "b");
-    TestFileStore::create_backend(fs, 0);
-    fs.collect_metadata(&pm);
-    ASSERT_EQ(pm["filestore_backend"], "generic");
-  }
-#if defined(__linux__)
-  {
-    map<string,string> pm;
-    FileStore fs("a", "b");
-    TestFileStore::create_backend(fs, BTRFS_SUPER_MAGIC);
-    fs.collect_metadata(&pm);
-    ASSERT_EQ(pm["filestore_backend"], "btrfs");
-  }
-# ifdef HAVE_LIBXFS
-  {
-    map<string,string> pm;
-    FileStore fs("a", "b");
-    TestFileStore::create_backend(fs, XFS_SUPER_MAGIC);
-    fs.collect_metadata(&pm);
-    ASSERT_EQ(pm["filestore_backend"], "xfs");
-  }
-# endif
-#endif
-#ifdef HAVE_LIBZFS
-  {
-    map<string,string> pm;
-    FileStore fs("a", "b");
-    TestFileStore::create_backend(fs, ZFS_SUPER_MAGIC);
-    fs.collect_metadata(&pm);
-    ASSERT_EQ(pm["filestore_backend"], "zfs");
-  }
-#endif
-}
-
-int main(int argc, char **argv) {
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **)argv, args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-  g_ceph_context->_conf->set_val("osd_journal_size", "100");
-  g_ceph_context->_conf->apply_changes(NULL);
-
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
-
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make ceph_test_filestore && 
- *    ./ceph_test_filestore \
- *        --gtest_filter=*.* --log-to-stderr=true --debug-filestore=20
- *  "
- * End:
- */
diff --git a/src/test/formatter.cc b/src/test/formatter.cc
index bb55629..a02e895 100644
--- a/src/test/formatter.cc
+++ b/src/test/formatter.cc
@@ -178,22 +178,3 @@ TEST(XmlFormatter, NamespaceTest) {
     "<foo xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">"
     "<blah>hithere</blah><pi>3.14</pi></foo>");
 }
-
-TEST(XmlFormatter, DumpFormatNameSpaceTest) {
-  ostringstream oss1;
-  XMLFormatter fmt(false);
-
-  fmt.dump_format_ns("foo",
-		     "http://s3.amazonaws.com/doc/2006-03-01/",
-		     "%s","bar");
-  fmt.flush(oss1);
-  ASSERT_EQ(oss1.str(),
-	    "<foo xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">bar</foo>");
-
-  // Testing with a null ns..should be same as dump format
-  ostringstream oss2;
-  fmt.reset();
-  fmt.dump_format_ns("foo",NULL,"%s","bar");
-  fmt.flush(oss2);
-  ASSERT_EQ(oss2.str(),"<foo>bar</foo>");
-}
diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc
index 9204150..6baadae 100644
--- a/src/test/libcephfs/test.cc
+++ b/src/test/libcephfs/test.cc
@@ -110,7 +110,6 @@ TEST(LibCephFS, UnmountUnmounted) {
   ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
   ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL));
   ASSERT_EQ(-ENOTCONN, ceph_unmount(cmount));
-  ceph_shutdown(cmount);
 }
 
 TEST(LibCephFS, ReleaseUnmounted) {
@@ -132,6 +131,7 @@ TEST(LibCephFS, ReleaseMounted) {
   ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL));
   ASSERT_EQ(0, ceph_mount(cmount, "/"));
   ASSERT_EQ(-EISCONN, ceph_release(cmount));
+  ceph_shutdown(cmount);
 }
 
 TEST(LibCephFS, UnmountRelease) {
@@ -1138,6 +1138,7 @@ TEST(LibCephFS, GetOsdCrushLocation) {
     }
   }
 
+  ceph_close(cmount, fd);
   ceph_shutdown(cmount);
 }
 
diff --git a/src/test/librados/TestCase.h b/src/test/librados/TestCase.h
index e8b7b9a..4ede5e9 100644
--- a/src/test/librados/TestCase.h
+++ b/src/test/librados/TestCase.h
@@ -92,8 +92,8 @@ protected:
 
 class RadosTestECPP : public RadosTestPP {
 public:
-  RadosTestECPP() : cluster(s_cluster) {}
-  virtual ~RadosTestECPP() {}
+  RadosTestECPP() : cluster(s_cluster) {};
+  virtual ~RadosTestECPP() {};
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
diff --git a/src/test/librados/io.cc b/src/test/librados/io.cc
index 0cfa91e..0bb805f 100644
--- a/src/test/librados/io.cc
+++ b/src/test/librados/io.cc
@@ -270,9 +270,9 @@ TEST_F(LibRadosIo, WriteFullRoundTrip) {
   ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0));
   memset(buf2, 0xdd, sizeof(buf2));
   ASSERT_EQ(0, rados_write_full(ioctx, "foo", buf2, sizeof(buf2)));
-  memset(buf3, 0x00, sizeof(buf3));
+  memset(buf3, 0xdd, sizeof(buf3));
   ASSERT_EQ((int)sizeof(buf2), rados_read(ioctx, "foo", buf3, sizeof(buf3), 0));
-  ASSERT_EQ(0, memcmp(buf2, buf3, sizeof(buf2)));
+  ASSERT_EQ(0, memcmp(buf2, buf2, sizeof(buf2)));
 }
 
 TEST_F(LibRadosIoPP, WriteFullRoundTripPP) {
diff --git a/src/test/librados/misc.cc b/src/test/librados/misc.cc
index 3b52cbd..ea990b5 100644
--- a/src/test/librados/misc.cc
+++ b/src/test/librados/misc.cc
@@ -50,28 +50,6 @@ TEST_F(LibRadosMiscPP, WaitOSDMapPP) {
   ASSERT_EQ(0, cluster.wait_for_latest_osdmap());
 }
 
-TEST_F(LibRadosMiscPP, LongNamePP) {
-  bufferlist bl;
-  bl.append("content");
-  int maxlen = g_conf->osd_max_object_name_len;
-  ASSERT_EQ(0, ioctx.write(string(maxlen/2, 'a').c_str(), bl, bl.length(), 0));
-  ASSERT_EQ(0, ioctx.write(string(maxlen-1, 'a').c_str(), bl, bl.length(), 0));
-  ASSERT_EQ(0, ioctx.write(string(maxlen, 'a').c_str(), bl, bl.length(), 0));
-  ASSERT_EQ(-ENAMETOOLONG, ioctx.write(string(maxlen+1, 'a').c_str(), bl, bl.length(), 0));
-  ASSERT_EQ(-ENAMETOOLONG, ioctx.write(string(maxlen*2, 'a').c_str(), bl, bl.length(), 0));
-}
-
-TEST_F(LibRadosMiscPP, LongAttrNamePP) {
-  bufferlist bl;
-  bl.append("content");
-  int maxlen = g_conf->osd_max_attr_name_len;
-  ASSERT_EQ(0, ioctx.setxattr("bigattrobj", string(maxlen/2, 'a').c_str(), bl));
-  ASSERT_EQ(0, ioctx.setxattr("bigattrobj", string(maxlen-1, 'a').c_str(), bl));
-  ASSERT_EQ(0, ioctx.setxattr("bigattrobj", string(maxlen, 'a').c_str(), bl));
-  ASSERT_EQ(-ENAMETOOLONG, ioctx.setxattr("bigattrobj", string(maxlen+1, 'a').c_str(), bl));
-  ASSERT_EQ(-ENAMETOOLONG, ioctx.setxattr("bigattrobj", string(maxlen*2, 'a').c_str(), bl));
-}
-
 static std::string read_key_from_tmap(IoCtx& ioctx, const std::string &obj,
 				      const std::string &key)
 {
diff --git a/src/test/librados/tier.cc b/src/test/librados/tier.cc
index eeb1125..a89d68b 100644
--- a/src/test/librados/tier.cc
+++ b/src/test/librados/tier.cc
@@ -2154,101 +2154,6 @@ TEST_F(LibRadosTwoPoolsPP, HitSetTrim) {
   }
 }
 
-TEST_F(LibRadosTwoPoolsPP, PromoteOn2ndRead) {
-  // create object
-  {
-    bufferlist bl;
-    bl.append("hi there");
-    ObjectWriteOperation op;
-    op.write_full(bl);
-    ASSERT_EQ(0, ioctx.operate("foo", &op));
-  }
-
-  // configure cache
-  bufferlist inbl;
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier add\", \"pool\": \"" + pool_name +
-    "\", \"tierpool\": \"" + cache_pool_name +
-    "\", \"force_nonempty\": \"--force-nonempty\" }",
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier set-overlay\", \"pool\": \"" + pool_name +
-    "\", \"overlaypool\": \"" + cache_pool_name + "\"}",
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier cache-mode\", \"pool\": \"" + cache_pool_name +
-    "\", \"mode\": \"writeback\"}",
-    inbl, NULL, NULL));
-
-  // enable hitset tracking for this pool
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "hit_set_count", 2),
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "hit_set_period", 600),
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "hit_set_type", "bloom"),
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "min_read_recency_for_promote", 1),
-    inbl, NULL, NULL));
-
-  // wait for maps to settle
-  cluster.wait_for_latest_osdmap();
-
-  // 1st read, don't trigger a promote
-  utime_t start = ceph_clock_now(NULL);
-  {
-    bufferlist bl;
-    ASSERT_EQ(1, ioctx.read("foo", bl, 1, 0));
-  }
-  utime_t end = ceph_clock_now(NULL);
-  float dur = end - start;
-  cout << "duration " << dur << std::endl;
-
-  // verify the object is NOT present in the cache tier
-  {
-    ObjectIterator it = cache_ioctx.objects_begin();
-    if (it != cache_ioctx.objects_end()) {
-      if (dur > 1.0) {
-	cout << " object got promoted, but read was slow, ignoring" << std::endl;
-      } else {
-	ASSERT_TRUE(it == cache_ioctx.objects_end());
-      }
-    }
-  }
-
-  // Read until the object is present in the cache tier
-  while (true) {
-    bufferlist bl;
-    ASSERT_EQ(1, ioctx.read("foo", bl, 1, 0));
-
-    ObjectIterator it = cache_ioctx.objects_begin();
-    if (it != cache_ioctx.objects_end()) {
-      ASSERT_TRUE(it->first == string("foo"));
-      ++it;
-      ASSERT_TRUE(it == cache_ioctx.objects_end());
-      break;
-    }
-
-    sleep(1);
-  }
-
-  // tear down tiers
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier remove-overlay\", \"pool\": \"" + pool_name +
-    "\"}",
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier remove\", \"pool\": \"" + pool_name +
-    "\", \"tierpool\": \"" + cache_pool_name + "\"}",
-    inbl, NULL, NULL));
-
-  // wait for maps to settle before next test
-  cluster.wait_for_latest_osdmap();
-}
-
 class LibRadosTwoPoolsECPP : public RadosTestECPP
 {
 public:
@@ -4114,101 +4019,6 @@ TEST_F(LibRadosTwoPoolsECPP, HitSetTrim) {
   delete[] buf;
 }
 
-TEST_F(LibRadosTwoPoolsECPP, PromoteOn2ndRead) {
-  // create object
-  {
-    bufferlist bl;
-    bl.append("hi there");
-    ObjectWriteOperation op;
-    op.write_full(bl);
-    ASSERT_EQ(0, ioctx.operate("foo", &op));
-  }
-
-  // configure cache
-  bufferlist inbl;
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier add\", \"pool\": \"" + pool_name +
-    "\", \"tierpool\": \"" + cache_pool_name +
-    "\", \"force_nonempty\": \"--force-nonempty\" }",
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier set-overlay\", \"pool\": \"" + pool_name +
-    "\", \"overlaypool\": \"" + cache_pool_name + "\"}",
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier cache-mode\", \"pool\": \"" + cache_pool_name +
-    "\", \"mode\": \"writeback\"}",
-    inbl, NULL, NULL));
-
-  // enable hitset tracking for this pool
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "hit_set_count", 2),
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "hit_set_period", 600),
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "hit_set_type", "bloom"),
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    set_pool_str(cache_pool_name, "min_read_recency_for_promote", 1),
-    inbl, NULL, NULL));
-
-  // wait for maps to settle
-  cluster.wait_for_latest_osdmap();
-
-  // 1st read, don't trigger a promote
-  utime_t start = ceph_clock_now(NULL);
-  {
-    bufferlist bl;
-    ASSERT_EQ(1, ioctx.read("foo", bl, 1, 0));
-  }
-  utime_t end = ceph_clock_now(NULL);
-  float dur = end - start;
-  cout << "duration " << dur << std::endl;
-
-  // verify the object is NOT present in the cache tier
-  {
-    ObjectIterator it = cache_ioctx.objects_begin();
-    if (it != cache_ioctx.objects_end()) {
-      if (dur > 1.0) {
-	cout << " object got promoted, but read was slow, ignoring" << std::endl;
-      } else {
-	ASSERT_TRUE(it == cache_ioctx.objects_end());
-      }
-    }
-  }
-
-  // Read until the object is present in the cache tier
-  while (true) {
-    bufferlist bl;
-    ASSERT_EQ(1, ioctx.read("foo", bl, 1, 0));
-
-    ObjectIterator it = cache_ioctx.objects_begin();
-    if (it != cache_ioctx.objects_end()) {
-      ASSERT_TRUE(it->first == string("foo"));
-      ++it;
-      ASSERT_TRUE(it == cache_ioctx.objects_end());
-      break;
-    }
-
-    sleep(1);
-  }
-
-  // tear down tiers
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier remove-overlay\", \"pool\": \"" + pool_name +
-    "\"}",
-    inbl, NULL, NULL));
-  ASSERT_EQ(0, cluster.mon_command(
-    "{\"prefix\": \"osd tier remove\", \"pool\": \"" + pool_name +
-    "\", \"tierpool\": \"" + cache_pool_name + "\"}",
-    inbl, NULL, NULL));
-
-  // wait for maps to settle before next test
-  cluster.wait_for_latest_osdmap();
-}
-
 int main(int argc, char **argv)
 {
   ::testing::InitGoogleTest(&argc, argv);
diff --git a/src/test/librados/watch_notify.cc b/src/test/librados/watch_notify.cc
index 41ca711..d92c1b8 100644
--- a/src/test/librados/watch_notify.cc
+++ b/src/test/librados/watch_notify.cc
@@ -19,7 +19,6 @@ static sem_t sem;
 
 static void watch_notify_test_cb(uint8_t opcode, uint64_t ver, void *arg)
 {
-  std::cout << __func__ << std::endl;
   sem_post(&sem);
 }
 
@@ -28,7 +27,6 @@ class WatchNotifyTestCtx : public WatchCtx
 public:
     void notify(uint8_t opcode, uint64_t ver, bufferlist& bl)
     {
-      std::cout << __func__ << std::endl;
       sem_post(&sem);
     }
 };
diff --git a/src/test/libradosstriper/TestCase.cc b/src/test/libradosstriper/TestCase.cc
deleted file mode 100644
index 5e1d34a..0000000
--- a/src/test/libradosstriper/TestCase.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#include <errno.h>
-#include "test/librados/test.h"
-#include "test/libradosstriper/TestCase.h"
-
-using namespace libradosstriper;
-
-std::string StriperTest::pool_name;
-rados_t StriperTest::s_cluster = NULL;
-
-void StriperTest::SetUpTestCase()
-{
-  pool_name = get_temp_pool_name();
-  ASSERT_EQ("", create_one_pool(pool_name, &s_cluster));
-}
-
-void StriperTest::TearDownTestCase()
-{
-  ASSERT_EQ(0, destroy_one_pool(pool_name, &s_cluster));
-}
-
-void StriperTest::SetUp()
-{
-  cluster = StriperTest::s_cluster;
-  ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx));
-  ASSERT_EQ(0, rados_striper_create(ioctx, &striper));
-}
-
-void StriperTest::TearDown()
-{
-  rados_striper_destroy(striper);
-  rados_ioctx_destroy(ioctx);
-}
-
-std::string StriperTestPP::pool_name;
-librados::Rados StriperTestPP::s_cluster;
-
-void StriperTestPP::SetUpTestCase()
-{
-  pool_name = get_temp_pool_name();
-  ASSERT_EQ("", create_one_pool_pp(pool_name, s_cluster));
-}
-
-void StriperTestPP::TearDownTestCase()
-{
-  ASSERT_EQ(0, destroy_one_pool_pp(pool_name, s_cluster));
-}
-
-void StriperTestPP::SetUp()
-{
-  ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx));
-  ASSERT_EQ(0, RadosStriper::striper_create(ioctx, &striper));
-}
-
-// this is pure copy and paste from previous class
-// but for the inheritance from TestWithParam
-// with gtest >= 1.6, we couldd avoid this by using
-// inheritance from WithParamInterface
-std::string StriperTestParam::pool_name;
-librados::Rados StriperTestParam::s_cluster;
-
-void StriperTestParam::SetUpTestCase()
-{
-  pool_name = get_temp_pool_name();
-  ASSERT_EQ("", create_one_pool_pp(pool_name, s_cluster));
-}
-
-void StriperTestParam::TearDownTestCase()
-{
-  ASSERT_EQ(0, destroy_one_pool_pp(pool_name, s_cluster));
-}
-
-void StriperTestParam::SetUp()
-{
-  ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx));
-  ASSERT_EQ(0, RadosStriper::striper_create(ioctx, &striper));
-}
diff --git a/src/test/libradosstriper/TestCase.h b/src/test/libradosstriper/TestCase.h
deleted file mode 100644
index cfa9f72..0000000
--- a/src/test/libradosstriper/TestCase.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#ifndef CEPH_TEST_RADOS_TESTCASE_H
-#define CEPH_TEST_RADOS_TESTCASE_H
-
-#include "include/rados/librados.h"
-#include "include/rados/librados.hpp"
-#include "include/radosstriper/libradosstriper.h"
-#include "include/radosstriper/libradosstriper.hpp"
-#include "gtest/gtest.h"
-
-#include <string>
-
-/**
- * These test cases create a temporary pool that lives as long as the
- * test case.  Each test within a test case gets a new ioctx and striper
- * set to a unique namespace within the pool.
- *
- * Since pool creation and deletion is slow, this allows many tests to
- * run faster.
- */
-class StriperTest : public ::testing::Test {
-public:
-  StriperTest() {}
-  virtual ~StriperTest() {}
-protected:
-  static void SetUpTestCase();
-  static void TearDownTestCase();
-  static rados_t s_cluster;
-  static std::string pool_name;
-
-  virtual void SetUp();
-  virtual void TearDown();
-  rados_t cluster;
-  rados_ioctx_t ioctx;
-  rados_striper_t striper;
-};
-
-class StriperTestPP : public ::testing::Test {
-public:
-  StriperTestPP() : cluster(s_cluster) {}
-  virtual ~StriperTestPP() {}
-  static void SetUpTestCase();
-  static void TearDownTestCase();
-protected:
-  static librados::Rados s_cluster;
-  static std::string pool_name;
-
-  virtual void SetUp();
-  librados::Rados &cluster;
-  librados::IoCtx ioctx;
-  libradosstriper::RadosStriper striper;
-};
-
-struct TestData {
-  uint32_t stripe_unit;
-  uint32_t stripe_count;
-  uint32_t object_size;
-  size_t size;
-};
-// this is pure copy and paste from previous class
-// but for the inheritance from TestWithParam
-// with gtest >= 1.6, we couldd avoid this by using
-// inheritance from WithParamInterface
-class StriperTestParam : public ::testing::TestWithParam<TestData> {
-public:
-  StriperTestParam() : cluster(s_cluster) {}
-  virtual ~StriperTestParam() {}
-  static void SetUpTestCase();
-  static void TearDownTestCase();
-protected:
-  static librados::Rados s_cluster;
-  static std::string pool_name;
-
-  virtual void SetUp();
-  librados::Rados &cluster;
-  librados::IoCtx ioctx;
-  libradosstriper::RadosStriper striper;
-};
-
-#endif
diff --git a/src/test/libradosstriper/aio.cc b/src/test/libradosstriper/aio.cc
deleted file mode 100644
index dbb6a33..0000000
--- a/src/test/libradosstriper/aio.cc
+++ /dev/null
@@ -1,542 +0,0 @@
-#include "include/rados/librados.h"
-#include "include/rados/librados.hpp"
-#include "include/radosstriper/libradosstriper.h"
-#include "include/radosstriper/libradosstriper.hpp"
-#include "test/librados/test.h"
-#include "test/libradosstriper/TestCase.h"
-
-#include <semaphore.h>
-#include <errno.h>
-
-using namespace librados;
-using namespace libradosstriper;
-using std::pair;
-
-class AioTestData
-{
-public:
-  AioTestData() : m_complete(false), m_safe(false) {
-    sem_init(&m_sem, 0, 0);
-  }
-
-  ~AioTestData() {
-    sem_destroy(&m_sem);
-  }
-
-  sem_t m_sem;
-  bool m_complete;
-  bool m_safe;
-};
-
-void set_completion_complete(rados_completion_t cb, void *arg)
-{
-  AioTestData *test = static_cast<AioTestData*>(arg);
-  test->m_complete = true;
-  sem_post(&test->m_sem);
-}
-
-void set_completion_safe(rados_completion_t cb, void *arg)
-{
-  AioTestData *test = static_cast<AioTestData*>(arg);
-  test->m_safe = true;
-  sem_post(&test->m_sem);
-}
-
-TEST_F(StriperTest, SimpleWrite) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "StriperTest", my_completion, buf, sizeof(buf), 0));
-  TestAlarm alarm;
-  sem_wait(&test_data.m_sem);
-  sem_wait(&test_data.m_sem);
-  rados_aio_release(my_completion);
-}
-
-TEST_F(StriperTestPP, SimpleWritePP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("SimpleWritePP", my_completion, bl1, sizeof(buf), 0));
-  TestAlarm alarm;
-  sem_wait(&test_data.m_sem);
-  sem_wait(&test_data.m_sem);
-  my_completion->release();
-}
-
-TEST_F(StriperTest, WaitForSafe) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "WaitForSafe", my_completion, buf, sizeof(buf), 0));
-  TestAlarm alarm;
-  rados_aio_wait_for_safe(my_completion);
-  rados_aio_release(my_completion);
-}
-
-TEST_F(StriperTestPP, WaitForSafePP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("WaitForSafePP", my_completion, bl1, sizeof(buf), 0));
-  TestAlarm alarm;
-  my_completion->wait_for_safe();
-  my_completion->release();
-}
-
-TEST_F(StriperTest, RoundTrip) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "RoundTrip", my_completion, buf, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    sem_wait(&test_data.m_sem);
-    sem_wait(&test_data.m_sem);
-  }
-  char buf2[128];
-  memset(buf2, 0, sizeof(buf2));
-  rados_completion_t my_completion2;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "RoundTrip", my_completion2, buf2, sizeof(buf2), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion2);
-  }
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-}
-
-TEST_F(StriperTest, RoundTrip2) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "RoundTrip2", my_completion, buf, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    sem_wait(&test_data.m_sem);
-    sem_wait(&test_data.m_sem);
-  }
-  char buf2[128];
-  memset(buf2, 0, sizeof(buf2));
-  rados_completion_t my_completion2;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "RoundTrip2", my_completion2, buf2, sizeof(buf2), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_safe(my_completion2);
-  }
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-}
-
-TEST_F(StriperTestPP, RoundTripPP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("RoundTripPP", my_completion, bl1, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    sem_wait(&test_data.m_sem);
-    sem_wait(&test_data.m_sem);
-  }
-  bufferlist bl2;
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("RoundTripPP", my_completion2, &bl2, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion2->wait_for_complete();
-  }
-  ASSERT_EQ(0, memcmp(buf, bl2.c_str(), sizeof(buf)));
-  my_completion->release();
-  my_completion2->release();
-}
-
-TEST_F(StriperTestPP, RoundTripPP2) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("RoundTripPP2", my_completion, bl1, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    sem_wait(&test_data.m_sem);
-    sem_wait(&test_data.m_sem);
-  }
-  bufferlist bl2;
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("RoundTripPP2", my_completion2, &bl2, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion2->wait_for_safe();
-  }
-  ASSERT_EQ(0, memcmp(buf, bl2.c_str(), sizeof(buf)));
-  my_completion->release();
-  my_completion2->release();
-}
-
-TEST_F(StriperTest, IsComplete) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "IsComplete", my_completion, buf, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    sem_wait(&test_data.m_sem);
-    sem_wait(&test_data.m_sem);
-  }
-  char buf2[128];
-  memset(buf2, 0, sizeof(buf2));
-  rados_completion_t my_completion2;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "IsComplete", my_completion2, buf2, sizeof(buf2), 0));
-  {
-    TestAlarm alarm;
-    // Busy-wait until the AIO completes.
-    // Normally we wouldn't do this, but we want to test rados_aio_is_complete.
-    while (true) {
-      int is_complete = rados_aio_is_complete(my_completion2);
-      if (is_complete)
-	break;
-    }
-  }
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-}
-
-TEST_F(StriperTestPP, IsCompletePP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("IsCompletePP", my_completion, bl1, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    sem_wait(&test_data.m_sem);
-    sem_wait(&test_data.m_sem);
-  }
-  bufferlist bl2;
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("IsCompletePP", my_completion2, &bl2, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    // Busy-wait until the AIO completes.
-    // Normally we wouldn't do this, but we want to test rados_aio_is_complete.
-    while (true) {
-      int is_complete = my_completion2->is_complete();
-      if (is_complete)
-	break;
-    }
-  }
-  ASSERT_EQ(0, memcmp(buf, bl2.c_str(), sizeof(buf)));
-  my_completion->release();
-  my_completion2->release();
-}
-
-TEST_F(StriperTest, IsSafe) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "IsSafe", my_completion, buf, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    // Busy-wait until the AIO completes.
-    // Normally we wouldn't do this, but we want to test rados_aio_is_safe.
-    while (true) {
-      int is_safe = rados_aio_is_safe(my_completion);
-      if (is_safe)
-	break;
-    }
-  }
-  char buf2[128];
-  memset(buf2, 0, sizeof(buf2));
-  rados_completion_t my_completion2;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "IsSafe", my_completion2, buf2, sizeof(buf2), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion2);
-  }
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-}
-
-TEST_F(StriperTestPP, IsSafePP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("IsSafePP", my_completion, bl1, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    // Busy-wait until the AIO completes.
-    // Normally we wouldn't do this, but we want to test rados_aio_is_safe.
-    while (true) {
-      int is_safe = my_completion->is_safe();
-      if (is_safe)
-	break;
-    }
-  }
-  bufferlist bl2;
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("IsSafePP", my_completion2, &bl2, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion2->wait_for_complete();
-  }
-  ASSERT_EQ(0, memcmp(buf, bl2.c_str(), sizeof(buf)));
-  my_completion->release();
-  my_completion2->release();
-}
-
-TEST_F(StriperTest, RoundTripAppend) {
-  AioTestData test_data;
-  rados_completion_t my_completion, my_completion2, my_completion3;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_append(striper, "RoundTripAppend", my_completion, buf, sizeof(buf)));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion);
-  }
-  char buf2[128];
-  memset(buf2, 0xdd, sizeof(buf2));
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_append(striper, "RoundTripAppend", my_completion2, buf2, sizeof(buf)));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion2);
-  }
-  char buf3[sizeof(buf) + sizeof(buf2)];
-  memset(buf3, 0, sizeof(buf3));
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion3));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "RoundTripAppend", my_completion3, buf3, sizeof(buf3), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion3);
-  }
-  ASSERT_EQ((int)(sizeof(buf) + sizeof(buf2)), rados_aio_get_return_value(my_completion3));
-  ASSERT_EQ(0, memcmp(buf3, buf, sizeof(buf)));
-  ASSERT_EQ(0, memcmp(buf3 + sizeof(buf), buf2, sizeof(buf2)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-  rados_aio_release(my_completion3);
-}
-
-TEST_F(StriperTestPP, RoundTripAppendPP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_append("RoundTripAppendPP", my_completion, bl1, sizeof(buf)));
-  {
-    TestAlarm alarm;
-    my_completion->wait_for_complete();
-  }
-  char buf2[128];
-  memset(buf2, 0xdd, sizeof(buf2));
-  bufferlist bl2;
-  bl2.append(buf2, sizeof(buf2));
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_append("RoundTripAppendPP", my_completion2, bl2, sizeof(buf2)));
-  {
-    TestAlarm alarm;
-    my_completion2->wait_for_complete();
-  }
-  bufferlist bl3;
-  AioCompletion *my_completion3 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("RoundTripAppendPP", my_completion3, &bl3, 2 * sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion3->wait_for_complete();
-  }
-  ASSERT_EQ(sizeof(buf) + sizeof(buf2), (unsigned)my_completion3->get_return_value());
-  ASSERT_EQ(0, memcmp(bl3.c_str(), buf, sizeof(buf)));
-  ASSERT_EQ(0, memcmp(bl3.c_str() + sizeof(buf), buf2, sizeof(buf2)));
-  my_completion->release();
-  my_completion2->release();
-  my_completion3->release();
-}
-
-TEST_F(StriperTest, Flush) {
-  AioTestData test_data;
-  rados_completion_t my_completion;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xee, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "Flush", my_completion, buf, sizeof(buf), 0));
-  rados_striper_aio_flush(striper);
-  char buf2[128];
-  memset(buf2, 0, sizeof(buf2));
-  rados_completion_t my_completion2;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "Flush", my_completion2, buf2, sizeof(buf2), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion2);
-  }
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-}
-
-TEST_F(StriperTestPP, FlushPP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xee, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("FlushPP", my_completion, bl1, sizeof(buf), 0));
-  striper.aio_flush();
-  bufferlist bl2;
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("FlushPP", my_completion2, &bl2, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion2->wait_for_complete();
-  }
-  ASSERT_EQ(0, memcmp(buf, bl2.c_str(), sizeof(buf)));
-  my_completion->release();
-  my_completion2->release();
-}
-
-TEST_F(StriperTest, RoundTripWriteFull) {
-  AioTestData test_data;
-  rados_completion_t my_completion, my_completion2, my_completion3;
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion));
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_aio_write(striper, "RoundTripWriteFull", my_completion, buf, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion);
-  }
-  char buf2[64];
-  memset(buf2, 0xdd, sizeof(buf2));
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion2));
-  ASSERT_EQ(0, rados_striper_aio_write_full(striper, "RoundTripWriteFull", my_completion2, buf2, sizeof(buf2)));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion2);
-  }
-  char buf3[sizeof(buf) + sizeof(buf2)];
-  memset(buf3, 0, sizeof(buf3));
-  ASSERT_EQ(0, rados_aio_create_completion
-            ((void*)&test_data, set_completion_complete, set_completion_safe, &my_completion3));
-  ASSERT_EQ(0, rados_striper_aio_read(striper, "RoundTripWriteFull", my_completion3, buf3, sizeof(buf3), 0));
-  {
-    TestAlarm alarm;
-    rados_aio_wait_for_complete(my_completion3);
-  }
-  ASSERT_EQ(sizeof(buf2), (unsigned)rados_aio_get_return_value(my_completion3));
-  ASSERT_EQ(0, memcmp(buf3, buf2, sizeof(buf2)));
-  rados_aio_release(my_completion);
-  rados_aio_release(my_completion2);
-  rados_aio_release(my_completion3);
-}
-
-TEST_F(StriperTestPP, RoundTripWriteFullPP) {
-  AioTestData test_data;
-  AioCompletion *my_completion = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.aio_write("RoundTripWriteFullPP", my_completion, bl1, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion->wait_for_complete();
-  }
-  char buf2[64];
-  memset(buf2, 0xdd, sizeof(buf2));
-  bufferlist bl2;
-  bl2.append(buf2, sizeof(buf2));
-  AioCompletion *my_completion2 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_write_full("RoundTripWriteFullPP", my_completion2, bl2));
-  {
-    TestAlarm alarm;
-    my_completion2->wait_for_complete();
-  }
-  bufferlist bl3;
-  AioCompletion *my_completion3 = librados::Rados::aio_create_completion
-    ((void*)&test_data, set_completion_complete, set_completion_safe);
-  ASSERT_EQ(0, striper.aio_read("RoundTripWriteFullPP", my_completion3, &bl3, sizeof(buf), 0));
-  {
-    TestAlarm alarm;
-    my_completion3->wait_for_complete();
-  }
-  ASSERT_EQ(sizeof(buf2), (unsigned)my_completion3->get_return_value());
-  ASSERT_EQ(0, memcmp(bl3.c_str(), buf2, sizeof(buf2)));
-  my_completion->release();
-  my_completion2->release();
-  my_completion3->release();
-}
diff --git a/src/test/libradosstriper/io.cc b/src/test/libradosstriper/io.cc
deleted file mode 100644
index 1386fcc..0000000
--- a/src/test/libradosstriper/io.cc
+++ /dev/null
@@ -1,392 +0,0 @@
-#include "include/rados/librados.h"
-#include "include/rados/librados.hpp"
-#include "include/radosstriper/libradosstriper.h"
-#include "include/radosstriper/libradosstriper.hpp"
-#include "test/librados/test.h"
-#include "test/libradosstriper/TestCase.h"
-
-#include <fcntl.h>
-#include <errno.h>
-#include "gtest/gtest.h"
-
-using namespace librados;
-using namespace libradosstriper;
-using std::string;
-
-TEST_F(StriperTest, SimpleWrite) {
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "SimpleWrite", buf, sizeof(buf), 0));
-}
-
-TEST_F(StriperTestPP, SimpleWritePP) {
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl;
-  bl.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("SimpleWritePP", bl, sizeof(buf), 0));
-}
-
-TEST_F(StriperTest, Stat) {
-  uint64_t psize;
-  time_t pmtime;
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "Stat", buf, sizeof(buf), 0));
-  ASSERT_EQ(0, rados_striper_stat(striper, "Stat", &psize, &pmtime));
-  ASSERT_EQ(psize, sizeof(buf));
-  ASSERT_EQ(-ENOENT, rados_striper_stat(striper, "nonexistent", &psize, &pmtime));
-}
-
-TEST_F(StriperTestPP, StatPP) {
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl;
-  bl.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("Statpp", bl, sizeof(buf), 0));
-  uint64_t psize;
-  time_t pmtime;
-  ASSERT_EQ(0, striper.stat("Statpp", &psize, &pmtime));
-  ASSERT_EQ(psize, sizeof(buf));
-  ASSERT_EQ(-ENOENT, striper.stat("nonexistent", &psize, &pmtime));
-}
-
-TEST_F(StriperTest, RoundTrip) {
-  char buf[128];
-  char buf2[sizeof(buf)];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "RoundTrip", buf, sizeof(buf), 0));
-  memset(buf2, 0, sizeof(buf2));
-  ASSERT_EQ((int)sizeof(buf2), rados_striper_read(striper, "RoundTrip", buf2, sizeof(buf2), 0));
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-}
-
-TEST_F(StriperTestPP, RoundTripPP) {
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl;
-  bl.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("RoundTripPP", bl, sizeof(buf), 0));
-  bufferlist cl;
-  ASSERT_EQ((int)sizeof(buf), striper.read("RoundTripPP", &cl, sizeof(buf), 0));
-  ASSERT_EQ(0, memcmp(buf, cl.c_str(), sizeof(buf)));
-}
-
-TEST_F(StriperTest, OverlappingWriteRoundTrip) {
-  char buf[128];
-  char buf2[64];
-  char buf3[sizeof(buf)];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "OverlappingWriteRoundTrip", buf, sizeof(buf), 0));
-  memset(buf2, 0xdd, sizeof(buf2));
-  ASSERT_EQ(0, rados_striper_write(striper, "OverlappingWriteRoundTrip", buf2, sizeof(buf2), 0));
-  memset(buf3, 0, sizeof(buf3));
-  ASSERT_EQ((int)sizeof(buf3), rados_striper_read(striper, "OverlappingWriteRoundTrip", buf3, sizeof(buf3), 0));
-  ASSERT_EQ(0, memcmp(buf3, buf2, sizeof(buf2)));
-  ASSERT_EQ(0, memcmp(buf3 + sizeof(buf2), buf, sizeof(buf) - sizeof(buf2)));
-}
-
-TEST_F(StriperTestPP, OverlappingWriteRoundTripPP) {
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("OverlappingWriteRoundTripPP", bl1, sizeof(buf), 0));
-  char buf2[64];
-  memset(buf2, 0xdd, sizeof(buf2));
-  bufferlist bl2;
-  bl2.append(buf2, sizeof(buf2));
-  ASSERT_EQ(0, striper.write("OverlappingWriteRoundTripPP", bl2, sizeof(buf2), 0));
-  bufferlist bl3;
-  ASSERT_EQ((int)sizeof(buf), striper.read("OverlappingWriteRoundTripPP", &bl3, sizeof(buf), 0));
-  ASSERT_EQ(0, memcmp(bl3.c_str(), buf2, sizeof(buf2)));
-  ASSERT_EQ(0, memcmp(bl3.c_str() + sizeof(buf2), buf, sizeof(buf) - sizeof(buf2)));
-}
-
-TEST_F(StriperTest, SparseWriteRoundTrip) {
-  char buf[128];
-  char buf2[2*sizeof(buf)];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "SparseWriteRoundTrip", buf, sizeof(buf), 0));
-  ASSERT_EQ(0, rados_striper_write(striper, "SparseWriteRoundTrip", buf, sizeof(buf), 1000000000));
-  memset(buf2, 0xaa, sizeof(buf2));
-  ASSERT_EQ((int)sizeof(buf2), rados_striper_read(striper, "SparseWriteRoundTrip", buf2, sizeof(buf2), 0));
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  memset(buf, 0, sizeof(buf));
-  ASSERT_EQ(0, memcmp(buf, buf2+sizeof(buf), sizeof(buf)));
-  memset(buf2, 0xaa, sizeof(buf2));
-  ASSERT_EQ((int)sizeof(buf), rados_striper_read(striper, "SparseWriteRoundTrip", buf2, sizeof(buf), 500000000));
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-}
-
-TEST_F(StriperTestPP, SparseWriteRoundTripPP) {
-  char buf[128];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("SparseWriteRoundTripPP", bl1, sizeof(buf), 0));
-  ASSERT_EQ(0, striper.write("SparseWriteRoundTripPP", bl1, sizeof(buf), 1000000000));
-  bufferlist bl2;
-  ASSERT_EQ((int)(2*sizeof(buf)), striper.read("SparseWriteRoundTripPP", &bl2, 2*sizeof(buf), 0));
-  ASSERT_EQ(0, memcmp(bl2.c_str(), buf, sizeof(buf)));
-  memset(buf, 0, sizeof(buf));
-  ASSERT_EQ(0, memcmp(bl2.c_str()+sizeof(buf), buf, sizeof(buf)));
-  ASSERT_EQ((int)sizeof(buf), striper.read("SparseWriteRoundTripPP", &bl2, sizeof(buf), 500000000));
-  ASSERT_EQ(0, memcmp(bl2.c_str(), buf, sizeof(buf)));
-}
-
-TEST_F(StriperTest, WriteFullRoundTrip) {
-  char buf[128];
-  char buf2[64];
-  char buf3[128];
-  memset(buf, 0xcc, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "WriteFullRoundTrip", buf, sizeof(buf), 0));
-  memset(buf2, 0xdd, sizeof(buf2));
-  ASSERT_EQ(0, rados_striper_write_full(striper, "WriteFullRoundTrip", buf2, sizeof(buf2)));
-  memset(buf3, 0x00, sizeof(buf3));
-  ASSERT_EQ((int)sizeof(buf2), rados_striper_read(striper, "WriteFullRoundTrip", buf3, sizeof(buf3), 0));
-  ASSERT_EQ(0, memcmp(buf2, buf3, sizeof(buf2)));
-}
-
-TEST_F(StriperTestPP, WriteFullRoundTripPP) {
-  char buf[128];
-  char buf2[64];
-  memset(buf, 0xcc, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("WriteFullRoundTripPP", bl1, sizeof(buf), 0));
-  memset(buf2, 0xdd, sizeof(buf2));
-  bufferlist bl2;
-  bl2.append(buf2, sizeof(buf2));
-  ASSERT_EQ(0, striper.write_full("WriteFullRoundTripPP", bl2));
-  bufferlist bl3;
-  ASSERT_EQ((int)sizeof(buf2), striper.read("WriteFullRoundTripPP", &bl3, sizeof(buf), 0));
-  ASSERT_EQ(0, memcmp(bl3.c_str(), buf2, sizeof(buf2)));
-}
-
-TEST_F(StriperTest, AppendRoundTrip) {
-  char buf[64];
-  char buf2[64];
-  char buf3[sizeof(buf) + sizeof(buf2)];
-  memset(buf, 0xde, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_append(striper, "AppendRoundTrip", buf, sizeof(buf)));
-  memset(buf2, 0xad, sizeof(buf2));
-  ASSERT_EQ(0, rados_striper_append(striper, "AppendRoundTrip", buf2, sizeof(buf2)));
-  memset(buf3, 0, sizeof(buf3));
-  ASSERT_EQ((int)sizeof(buf3), rados_striper_read(striper, "AppendRoundTrip", buf3, sizeof(buf3), 0));
-  ASSERT_EQ(0, memcmp(buf3, buf, sizeof(buf)));
-  ASSERT_EQ(0, memcmp(buf3 + sizeof(buf), buf2, sizeof(buf2)));
-}
-
-TEST_F(StriperTestPP, AppendRoundTripPP) {
-  char buf[64];
-  char buf2[64];
-  memset(buf, 0xde, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.append("AppendRoundTripPP", bl1, sizeof(buf)));
-  memset(buf2, 0xad, sizeof(buf2));
-  bufferlist bl2;
-  bl2.append(buf2, sizeof(buf2));
-  ASSERT_EQ(0, striper.append("AppendRoundTripPP", bl2, sizeof(buf2)));
-  bufferlist bl3;
-  ASSERT_EQ((int)(sizeof(buf) + sizeof(buf2)),
-	    striper.read("AppendRoundTripPP", &bl3, (sizeof(buf) + sizeof(buf2)), 0));
-  const char *bl3_str = bl3.c_str();
-  ASSERT_EQ(0, memcmp(bl3_str, buf, sizeof(buf)));
-  ASSERT_EQ(0, memcmp(bl3_str + sizeof(buf), buf2, sizeof(buf2)));
-}
-
-TEST_F(StriperTest, TruncTest) {
-  char buf[128];
-  char buf2[sizeof(buf)];
-  memset(buf, 0xaa, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_append(striper, "TruncTest", buf, sizeof(buf)));
-  ASSERT_EQ(0, rados_striper_trunc(striper, "TruncTest", sizeof(buf) / 2));
-  memset(buf2, 0, sizeof(buf2));
-  ASSERT_EQ((int)(sizeof(buf)/2), rados_striper_read(striper, "TruncTest", buf2, sizeof(buf2), 0));
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)/2));
-}
-
-TEST_F(StriperTestPP, TruncTestPP) {
-  char buf[128];
-  memset(buf, 0xaa, sizeof(buf));
-  bufferlist bl;
-  bl.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.append("TruncTestPP", bl, sizeof(buf)));
-  ASSERT_EQ(0, striper.trunc("TruncTestPP", sizeof(buf) / 2));
-  bufferlist bl2;
-  ASSERT_EQ((int)(sizeof(buf)/2), striper.read("TruncTestPP", &bl2, sizeof(buf), 0));
-  ASSERT_EQ(0, memcmp(bl2.c_str(), buf, sizeof(buf)/2));
-}
-
-TEST_F(StriperTest, TruncTestGrow) {
-  char buf[128];
-  char buf2[sizeof(buf)*2];
-  memset(buf, 0xaa, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_append(striper, "TruncTestGrow", buf, sizeof(buf)));
-  ASSERT_EQ(0, rados_striper_trunc(striper, "TruncTestGrow", sizeof(buf2)));
-  memset(buf2, 0xbb, sizeof(buf2));
-  ASSERT_EQ((int)sizeof(buf2), rados_striper_read(striper, "TruncTestGrow", buf2, sizeof(buf2), 0));
-  ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
-  memset(buf, 0x00, sizeof(buf));
-  ASSERT_EQ(0, memcmp(buf, buf2+sizeof(buf), sizeof(buf)));
-}
-
-TEST_F(StriperTestPP, TruncTestGrowPP) {
-  char buf[128];
-  memset(buf, 0xaa, sizeof(buf));
-  bufferlist bl;
-  bl.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.append("TruncTestGrowPP", bl, sizeof(buf)));
-  ASSERT_EQ(0, striper.trunc("TruncTestGrowPP", sizeof(buf) * 2));
-  bufferlist bl2;
-  ASSERT_EQ(sizeof(buf)*2, (unsigned)striper.read("TruncTestGrowPP", &bl2, sizeof(buf)*2, 0));
-  ASSERT_EQ(0, memcmp(bl2.c_str(), buf, sizeof(buf)));
-  memset(buf, 0x00, sizeof(buf));
-  ASSERT_EQ(0, memcmp(bl2.c_str()+sizeof(buf), buf, sizeof(buf)));
-}
-
-TEST_F(StriperTest, RemoveTest) {
-  char buf[128];
-  char buf2[sizeof(buf)];
-  memset(buf, 0xaa, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "RemoveTest", buf, sizeof(buf), 0));
-  ASSERT_EQ(0, rados_striper_remove(striper, "RemoveTest"));
-  ASSERT_EQ(-ENOENT, rados_striper_read(striper, "RemoveTest", buf2, sizeof(buf2), 0));
-}
-
-TEST_F(StriperTestPP, RemoveTestPP) {
-  char buf[128];
-  memset(buf, 0xaa, sizeof(buf));
-  bufferlist bl;
-  bl.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("RemoveTestPP", bl, sizeof(buf), 0));
-  ASSERT_EQ(0, striper.remove("RemoveTestPP"));
-  bufferlist bl2;
-  ASSERT_EQ(-ENOENT, striper.read("RemoveTestPP", &bl2, sizeof(buf), 0));
-}
-
-TEST_F(StriperTest, XattrsRoundTrip) {
-  char buf[128];
-  char attr1_buf[] = "foo bar baz";
-  memset(buf, 0xaa, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "XattrsRoundTrip", buf, sizeof(buf), 0));
-  ASSERT_EQ(-ENODATA, rados_striper_getxattr(striper, "XattrsRoundTrip", "attr1", buf, sizeof(buf)));
-  ASSERT_EQ(0, rados_striper_setxattr(striper, "XattrsRoundTrip", "attr1", attr1_buf, sizeof(attr1_buf)));
-  ASSERT_EQ((int)sizeof(attr1_buf), rados_striper_getxattr(striper, "XattrsRoundTrip", "attr1", buf, sizeof(buf)));
-  ASSERT_EQ(0, memcmp(attr1_buf, buf, sizeof(attr1_buf)));
-}
-
-TEST_F(StriperTestPP, XattrsRoundTripPP) {
-  char buf[128];
-  memset(buf, 0xaa, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("XattrsRoundTripPP", bl1, sizeof(buf), 0));
-  char attr1_buf[] = "foo bar baz";
-  bufferlist bl2;
-  ASSERT_EQ(-ENODATA, striper.getxattr("XattrsRoundTripPP", "attr1", bl2));
-  bufferlist bl3;
-  bl3.append(attr1_buf, sizeof(attr1_buf));
-  ASSERT_EQ(0, striper.setxattr("XattrsRoundTripPP", "attr1", bl3));
-  bufferlist bl4;
-  ASSERT_EQ((int)sizeof(attr1_buf), striper.getxattr("XattrsRoundTripPP", "attr1", bl4));
-  ASSERT_EQ(0, memcmp(bl4.c_str(), attr1_buf, sizeof(attr1_buf)));
-}
-
-TEST_F(StriperTest, RmXattr) {
-  char buf[128];
-  char attr1_buf[] = "foo bar baz";
-  memset(buf, 0xaa, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "RmXattr", buf, sizeof(buf), 0));
-  ASSERT_EQ(0, rados_striper_setxattr(striper, "RmXattr", "attr1", attr1_buf, sizeof(attr1_buf)));
-  ASSERT_EQ(0, rados_striper_rmxattr(striper, "RmXattr", "attr1"));
-  ASSERT_EQ(-ENODATA, rados_striper_getxattr(striper, "RmXattr", "attr1", buf, sizeof(buf)));
-}
-
-TEST_F(StriperTestPP, RmXattrPP) {
-  char buf[128];
-  memset(buf, 0xaa, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("RmXattrPP", bl1, sizeof(buf), 0));
-  char attr1_buf[] = "foo bar baz";
-  bufferlist bl2;
-  bl2.append(attr1_buf, sizeof(attr1_buf));
-  ASSERT_EQ(0, striper.setxattr("RmXattrPP", "attr1", bl2));
-  ASSERT_EQ(0, striper.rmxattr("RmXattrPP", "attr1"));
-  bufferlist bl3;
-  ASSERT_EQ(-ENODATA, striper.getxattr("RmXattrPP", "attr1", bl3));
-}
-
-TEST_F(StriperTest, XattrIter) {
-  char buf[128];
-  char attr1_buf[] = "foo bar baz";
-  char attr2_buf[256];
-  for (size_t j = 0; j < sizeof(attr2_buf); ++j) {
-    attr2_buf[j] = j % 0xff;
-  }
-  memset(buf, 0xaa, sizeof(buf));
-  ASSERT_EQ(0, rados_striper_write(striper, "RmXattr", buf, sizeof(buf), 0));
-  ASSERT_EQ(0, rados_striper_setxattr(striper, "RmXattr", "attr1", attr1_buf, sizeof(attr1_buf)));
-  ASSERT_EQ(0, rados_striper_setxattr(striper, "RmXattr", "attr2", attr2_buf, sizeof(attr2_buf)));
-  rados_xattrs_iter_t iter;
-  ASSERT_EQ(0, rados_striper_getxattrs(striper, "RmXattr", &iter));
-  int num_seen = 0;
-  while (true) {
-    const char *name;
-    const char *val;
-    size_t len;
-    ASSERT_EQ(0, rados_striper_getxattrs_next(iter, &name, &val, &len));
-    if (name == NULL) {
-      break;
-    }
-    ASSERT_LT(num_seen, 2) << "Extra attribute : " << name;
-    if ((strcmp(name, "attr1") == 0) && (memcmp(val, attr1_buf, len) == 0)) {
-      num_seen++;
-      continue;
-    }
-    else if ((strcmp(name, "attr2") == 0) && (memcmp(val, attr2_buf, len) == 0)) {
-      num_seen++;
-      continue;
-    }
-    else {
-      ASSERT_EQ(0, 1) << "Unexpected attribute : " << name;;
-    }
-  }
-  rados_striper_getxattrs_end(iter);
-}
-
-TEST_F(StriperTestPP, XattrListPP) {
-  char buf[128];
-  memset(buf, 0xaa, sizeof(buf));
-  bufferlist bl1;
-  bl1.append(buf, sizeof(buf));
-  ASSERT_EQ(0, striper.write("RmXattrPP", bl1, sizeof(buf), 0));
-  char attr1_buf[] = "foo bar baz";
-  bufferlist bl2;
-  bl2.append(attr1_buf, sizeof(attr1_buf));
-  ASSERT_EQ(0, striper.setxattr("RmXattrPP", "attr1", bl2));
-  char attr2_buf[256];
-  for (size_t j = 0; j < sizeof(attr2_buf); ++j) {
-    attr2_buf[j] = j % 0xff;
-  }
-  bufferlist bl3;
-  bl3.append(attr2_buf, sizeof(attr2_buf));
-  ASSERT_EQ(0, striper.setxattr("RmXattrPP", "attr2", bl3));
-  std::map<std::string, bufferlist> attrset;
-  ASSERT_EQ(0, striper.getxattrs("RmXattrPP", attrset));
-  for (std::map<std::string, bufferlist>::iterator i = attrset.begin();
-       i != attrset.end(); ++i) {
-    if (i->first == string("attr1")) {
-      ASSERT_EQ(0, memcmp(i->second.c_str(), attr1_buf, sizeof(attr1_buf)));
-    }
-    else if (i->first == string("attr2")) {
-      ASSERT_EQ(0, memcmp(i->second.c_str(), attr2_buf, sizeof(attr2_buf)));
-    }
-    else {
-      ASSERT_EQ(0, 1) << "Unexpected attribute : " << i->first;
-    }
-  }
-}
diff --git a/src/test/libradosstriper/striping.cc b/src/test/libradosstriper/striping.cc
deleted file mode 100644
index 930e1f3..0000000
--- a/src/test/libradosstriper/striping.cc
+++ /dev/null
@@ -1,310 +0,0 @@
-#include "include/rados/librados.h"
-#include "include/rados/librados.hpp"
-#include "include/radosstriper/libradosstriper.h"
-#include "include/radosstriper/libradosstriper.hpp"
-#include "include/ceph_fs.h"
-#include "test/librados/test.h"
-#include "test/libradosstriper/TestCase.h"
-
-#include <string>
-#include <errno.h>
-using namespace librados;
-using namespace libradosstriper;
-
-class StriperTestRT : public StriperTestParam {
-public:
-  StriperTestRT() : StriperTestParam() {}
-protected:
-  char* getObjName(const std::string& soid, uint64_t nb)
-  {
-    char name[soid.size()+18];
-    sprintf(name, "%s.%016llx", soid.c_str(), (long long unsigned int)nb);
-    return strdup(name);
-  }
-  
-  void checkObjectFromRados(const std::string& soid, bufferlist &bl,
-                            uint64_t exp_stripe_unit, uint64_t exp_stripe_count,
-                            uint64_t exp_object_size, size_t size)
-  {
-    checkObjectFromRados(soid, bl, exp_stripe_unit, exp_stripe_count, exp_object_size, size, size);
-  }
-      
-  void checkObjectFromRados(const std::string& soid, bufferlist &bl,
-                            uint64_t exp_stripe_unit, uint64_t exp_stripe_count,
-                            uint64_t exp_object_size, size_t size,
-                            size_t actual_size_if_sparse)
-  {
-    // checking first object's rados xattrs
-    bufferlist xattrbl;
-    std::string firstOid = getObjName(soid, 0);
-    ASSERT_LT(0, ioctx.getxattr(firstOid, "striper.layout.stripe_unit", xattrbl));
-    std::string s_xattr(xattrbl.c_str(), xattrbl.length()); // adds 0 byte at the end
-    uint64_t stripe_unit = strtoll(s_xattr.c_str(), NULL, 10);
-    ASSERT_LT((unsigned)0, stripe_unit);
-    ASSERT_EQ(stripe_unit, exp_stripe_unit);
-    ASSERT_LT(0, ioctx.getxattr(firstOid, "striper.layout.stripe_count", xattrbl));
-    s_xattr = std::string(xattrbl.c_str(), xattrbl.length()); // adds 0 byte at the end
-    uint64_t stripe_count = strtoll(s_xattr.c_str(), NULL, 10);
-    ASSERT_LT(0U, stripe_count);
-    ASSERT_EQ(stripe_count, exp_stripe_count);
-    ASSERT_LT(0, ioctx.getxattr(firstOid, "striper.layout.object_size", xattrbl));
-    s_xattr = std::string(xattrbl.c_str(), xattrbl.length()); // adds 0 byte at the end
-    uint64_t object_size = strtoll(s_xattr.c_str(), NULL, 10);
-    ASSERT_EQ(object_size, exp_object_size);
-    ASSERT_LT(0, ioctx.getxattr(firstOid, "striper.size", xattrbl));
-    s_xattr = std::string(xattrbl.c_str(), xattrbl.length()); // adds 0 byte at the end
-    uint64_t xa_size = strtoll(s_xattr.c_str(), NULL, 10);
-    ASSERT_EQ(xa_size, size);
-    // checking object content from rados point of view
-    // we will go stripe by stripe, read the content of each of them and
-    // check with expectations
-    uint64_t stripe_per_object = object_size / stripe_unit;
-    uint64_t stripe_per_objectset = stripe_per_object * stripe_count;
-    uint64_t nb_stripes_in_object = (size+stripe_unit-1)/stripe_unit;
-    for (uint64_t stripe_nb = 0;
-         stripe_nb < nb_stripes_in_object;
-         stripe_nb++) {
-      // find out where this stripe is stored
-      uint64_t objectset = stripe_nb / stripe_per_objectset;
-      uint64_t stripe_in_object_set = stripe_nb % stripe_per_objectset;
-      uint64_t object_in_set = stripe_in_object_set % stripe_count;
-      uint64_t stripe_in_object = stripe_in_object_set / stripe_count;
-      uint64_t object_nb = objectset * stripe_count + object_in_set;
-      uint64_t start = stripe_in_object * stripe_unit;
-      uint64_t len = stripe_unit;
-      if (stripe_nb == nb_stripes_in_object-1 and size % stripe_unit != 0) {
-        len = size % stripe_unit;
-      }
-      // handle case of sparse object (can only be sparse at the end in our tests)
-      if (actual_size_if_sparse < size and
-          ((actual_size_if_sparse+stripe_unit-1)/stripe_unit)-1 == stripe_nb) {
-        len = actual_size_if_sparse % stripe_unit;
-        if (0 == len) len = stripe_unit;
-      }
-      bufferlist stripe_data;
-      // check object content
-      std::string oid = getObjName(soid, object_nb);
-      int rc = ioctx.read(oid, stripe_data, len, start);
-      if (actual_size_if_sparse < size and
-          (actual_size_if_sparse+stripe_unit-1)/stripe_unit <= stripe_nb) {
-        // sparse object case : the stripe does not exist, but the rados object may
-        uint64_t object_start = (object_in_set + objectset*stripe_per_objectset) * stripe_unit;
-        if (actual_size_if_sparse <= object_start) {
-          ASSERT_EQ(rc, -ENOENT);
-        } else {
-          ASSERT_EQ(rc, 0);
-        }
-      } else {
-        ASSERT_EQ((uint64_t)rc, len);
-        bufferlist original_data;
-        original_data.substr_of(bl, stripe_nb*stripe_unit, len);
-        ASSERT_EQ(0, memcmp(original_data.c_str(), stripe_data.c_str(), len));
-      }
-    }
-    // checking rados object sizes; we go object by object
-    uint64_t nb_full_object_sets = nb_stripes_in_object / stripe_per_objectset;
-    uint64_t nb_extra_objects = nb_stripes_in_object % stripe_per_objectset;
-    if (nb_extra_objects > stripe_count) nb_extra_objects = stripe_count;
-    uint64_t nb_objects = nb_full_object_sets * stripe_count + nb_extra_objects;
-    for (uint64_t object_nb = 0; object_nb < nb_objects; object_nb++) {
-      uint64_t rados_size;
-      time_t mtime;
-      std::string oid = getObjName(soid, object_nb);
-      uint64_t nb_full_object_set = object_nb / stripe_count;
-      uint64_t object_index_in_set = object_nb % stripe_count;
-      uint64_t object_start_stripe = nb_full_object_set * stripe_per_objectset + object_index_in_set;
-      uint64_t object_start_off = object_start_stripe * stripe_unit;
-       if (actual_size_if_sparse < size and actual_size_if_sparse <= object_start_off) {
-         ASSERT_EQ(-ENOENT, ioctx.stat(oid, &rados_size, &mtime));
-       } else {
-         ASSERT_EQ(0, ioctx.stat(oid, &rados_size, &mtime));
-         uint64_t offset = object_start_off;
-         uint64_t stripe_size = stripe_count * stripe_unit;
-         uint64_t set_size = stripe_count * object_size;
-         uint64_t len = 0;
-         for (offset = object_start_off;
-              (offset < (object_start_off) + set_size) && (offset < actual_size_if_sparse);
-              offset += stripe_size) {
-           if (offset + stripe_unit > actual_size_if_sparse) {
-             len += actual_size_if_sparse-offset;
-           } else {
-             len += stripe_unit;
-           }
-         }
-         ASSERT_EQ(len, rados_size);
-       }
-    }
-    // check we do not have an extra object behind
-    uint64_t rados_size;
-    time_t mtime;
-    std::string oid = getObjName(soid, nb_objects);
-    ASSERT_EQ(-ENOENT, ioctx.stat(oid, &rados_size, &mtime));
-  }
-};
-  
-TEST_P(StriperTestRT, StripedRoundtrip) {
-  // get striping parameters and apply them
-  TestData testData = GetParam();
-  ASSERT_EQ(0, striper.set_object_layout_stripe_unit(testData.stripe_unit));
-  ASSERT_EQ(0, striper.set_object_layout_stripe_count(testData.stripe_count));
-  ASSERT_EQ(0, striper.set_object_layout_object_size(testData.object_size));
-  std::ostringstream oss;
-  oss << "StripedRoundtrip_" << testData.stripe_unit << "_"
-      << testData.stripe_count << "_" << testData.object_size
-      << "_" << testData.size;
-  std::string soid = oss.str();
-  // writing striped data
-  bufferlist bl1;
-  {
-    SCOPED_TRACE("Writing initial object"); 
-    char buf[testData.size];
-    for (unsigned int i = 0; i < testData.size; i++) buf[i] = 13*((unsigned char)i);
-    bl1.append(buf, testData.size);
-    ASSERT_EQ(0, striper.write(soid, bl1, testData.size, 0));
-    // checking object state from Rados point of view
-    ASSERT_NO_FATAL_FAILURE(checkObjectFromRados(soid, bl1, testData.stripe_unit,
-                                                 testData.stripe_count, testData.object_size,
-                                                 testData.size));
-  }
-  // adding more data to object and checking again
-  bufferlist bl2;
-  {
-    SCOPED_TRACE("Testing append");
-    char buf2[testData.size];
-    for (unsigned int i = 0; i < testData.size; i++) buf2[i] = 17*((unsigned char)i);
-    bl2.append(buf2, testData.size);
-    ASSERT_EQ(0, striper.append(soid, bl2, testData.size));
-    bl1.append(buf2, testData.size);
-    ASSERT_NO_FATAL_FAILURE(checkObjectFromRados(soid, bl1, testData.stripe_unit,
-                                                 testData.stripe_count, testData.object_size,
-                                                 testData.size*2));
-  }
-  // truncating to half original size and checking again
-  {
-    SCOPED_TRACE("Testing trunc to truncate object");
-    ASSERT_EQ(0, striper.trunc(soid, testData.size/2));
-    ASSERT_NO_FATAL_FAILURE(checkObjectFromRados(soid, bl1, testData.stripe_unit,
-                                                 testData.stripe_count, testData.object_size,
-                                                 testData.size/2));
-  }
-  // truncating back to original size and checking again (especially for 0s)
-  {
-    SCOPED_TRACE("Testing trunc to extend object with 0s");
-    ASSERT_EQ(0, striper.trunc(soid, testData.size));
-    bufferlist bl3;
-    bl3.substr_of(bl1, 0, testData.size/2);
-    bl3.append_zero(testData.size - testData.size/2);
-    ASSERT_NO_FATAL_FAILURE(checkObjectFromRados(soid, bl3, testData.stripe_unit,
-                                                 testData.stripe_count, testData.object_size,
-                                                 testData.size, testData.size/2));
-  }
-  {
-    SCOPED_TRACE("Testing write_full");
-    // using write_full and checking again
-    ASSERT_EQ(0, striper.write_full(soid, bl2));
-    checkObjectFromRados(soid, bl2, testData.stripe_unit,
-                         testData.stripe_count, testData.object_size,
-                         testData.size);
-  }
-  {
-    SCOPED_TRACE("Testing standard remove");
-    // call remove
-    ASSERT_EQ(0, striper.remove(soid));
-    // check that the removal was successful
-    uint64_t size;
-    time_t mtime;   
-    for (uint64_t object_nb = 0;
-         object_nb < testData.size*2/testData.object_size + testData.stripe_count;
-         object_nb++) {
-      ASSERT_EQ(-ENOENT, ioctx.stat(getObjName(soid, object_nb), &size, &mtime));
-    }
-  }
-  {
-    SCOPED_TRACE("Testing remove when no object size");
-    // recreate object
-    ASSERT_EQ(0, striper.write(soid, bl1, testData.size*2, 0));
-    // remove the object size attribute from the striped object
-    std::string firstOid = getObjName(soid, 0);
-    ASSERT_EQ(0, ioctx.rmxattr(firstOid, "striper.size"));
-    // check that stat fails
-    uint64_t size;
-    time_t mtime;   
-    ASSERT_EQ(-ENODATA, striper.stat(soid, &size, &mtime));
-    // call remove
-    ASSERT_EQ(0, striper.remove(soid));
-    // check that the removal was successful
-    for (uint64_t object_nb = 0;
-         object_nb < testData.size*2/testData.object_size + testData.stripe_count;
-         object_nb++) {
-      ASSERT_EQ(-ENOENT, ioctx.stat(getObjName(soid, object_nb), &size, &mtime));
-    }
-  }
-}
-
-const TestData simple_stripe_schemes[] = {
-  // stripe_unit,        stripe_count, object_size,            size
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   2},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            3*CEPH_MIN_STRIPE_UNIT, 2*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            3*CEPH_MIN_STRIPE_UNIT, 8*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            3*CEPH_MIN_STRIPE_UNIT, 12*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            3*CEPH_MIN_STRIPE_UNIT, 15*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            3*CEPH_MIN_STRIPE_UNIT, 25*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 5,            3*CEPH_MIN_STRIPE_UNIT, 45*CEPH_MIN_STRIPE_UNIT+100},
-  {262144,               5,            262144,                 2},
-  {262144,               5,            262144,                 262144},
-  {262144,               5,            262144,                 262144-1},
-  {262144,               5,            262144,                 2*262144},
-  {262144,               5,            262144,                 12*262144},
-  {262144,               5,            262144,                 2*262144-1},
-  {262144,               5,            262144,                 12*262144-1},
-  {262144,               5,            262144,                 2*262144+100},
-  {262144,               5,            262144,                 12*262144+100},
-  {262144,               5,            3*262144,               2*262144+100},
-  {262144,               5,            3*262144,               8*262144+100},
-  {262144,               5,            3*262144,               12*262144+100},
-  {262144,               5,            3*262144,               15*262144+100},
-  {262144,               5,            3*262144,               25*262144+100},
-  {262144,               5,            3*262144,               45*262144+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   2},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            3*CEPH_MIN_STRIPE_UNIT, 2*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            3*CEPH_MIN_STRIPE_UNIT, 8*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            3*CEPH_MIN_STRIPE_UNIT, 12*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            3*CEPH_MIN_STRIPE_UNIT, 15*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            3*CEPH_MIN_STRIPE_UNIT, 25*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 1,            3*CEPH_MIN_STRIPE_UNIT, 45*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   2},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT-1},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   2*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           CEPH_MIN_STRIPE_UNIT,   12*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           3*CEPH_MIN_STRIPE_UNIT, 2*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           3*CEPH_MIN_STRIPE_UNIT, 8*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           3*CEPH_MIN_STRIPE_UNIT, 12*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           3*CEPH_MIN_STRIPE_UNIT, 15*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           3*CEPH_MIN_STRIPE_UNIT, 25*CEPH_MIN_STRIPE_UNIT+100},
-  {CEPH_MIN_STRIPE_UNIT, 50,           3*CEPH_MIN_STRIPE_UNIT, 45*CEPH_MIN_STRIPE_UNIT+100}
-};
-
-INSTANTIATE_TEST_CASE_P(SimpleStriping,
-                        StriperTestRT,
-                        ::testing::ValuesIn(simple_stripe_schemes));
diff --git a/src/test/librbd/fsx.c b/src/test/librbd/fsx.c
index 38ae4cc..97feb4c 100644
--- a/src/test/librbd/fsx.c
+++ b/src/test/librbd/fsx.c
@@ -22,24 +22,18 @@
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
-#include <linux/fs.h>
-#include <sys/ioctl.h>
 #ifdef HAVE_ERR_H
 #include <err.h>
 #endif
 #include <signal.h>
-#include <stdbool.h>
-#include <stddef.h>
 #include <stdio.h>
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
-#include <assert.h>
 #include <errno.h>
 #include <math.h>
 
-#include "include/intarith.h"
-#include "include/krbd.h"
 #include "include/rados/librados.h"
 #include "include/rbd/librbd.h"
 
@@ -114,11 +108,17 @@ int			logcount = 0;	/* total ops */
 char	*original_buf;			/* a pointer to the original data */
 char	*good_buf;			/* a pointer to the correct data */
 char	*temp_buf;			/* a pointer to the current data */
+char	*pool;				/* name of the pool our test image is in */
+char	*iname;				/* name of our test image */
+rados_t cluster;                        /* handle for our test cluster */
+rados_ioctx_t	ioctx;			/* handle for our test pool */
+rbd_image_t	image;			/* handle for our test image */
 
 char	dirpath[1024];
 
 off_t		file_size = 0;
 off_t		biggest = 0;
+char		state[256];
 unsigned long	testcalls = 0;		/* calls to function "test" */
 
 unsigned long	simulatedopcount = 0;	/* -b flag */
@@ -126,7 +126,6 @@ int	closeprob = 0;			/* -c flag */
 int	debug = 0;			/* -d flag */
 unsigned long	debugstart = 0;		/* -D flag */
 int	flush = 0;			/* -f flag */
-int	holebdy = 1;			/* -h flag */
 int	do_fsync = 0;			/* -y flag */
 unsigned long	maxfilelen = 256 * 1024;	/* -l flag */
 int	sizechecks = 1;			/* -n flag disables them */
@@ -148,11 +147,10 @@ int     mapped_writes = 0;              /* -W flag disables */
 int     fallocate_calls = 0;            /* -F flag disables */
 int     punch_hole_calls = 1;           /* -H flag disables */
 int	clone_calls = 1;                /* -C flag disables */
-int	randomize_striping = 1;		/* -U flag disables */
-int	randomize_parent_overlap = 1;
+int     randomize_striping = 1;
 int 	mapped_reads = 0;		/* -R flag disables it */
 int	fsxgoodfd = 0;
-int	o_direct = 0;			/* -Z flag */
+int	o_direct;			/* -Z */
 int	aio = 0;
 
 int num_clones = 0;
@@ -175,6 +173,15 @@ FILE *	fsxlogf = NULL;
 int badoff = -1;
 int closeopen = 0;
 
+static void *round_ptr_up(void *ptr, unsigned long align, unsigned long offset)
+{
+	unsigned long ret = (unsigned long)ptr;
+
+	ret = ((ret + align - 1) & ~(align - 1));
+	ret += offset;
+	return (void *)ret;
+}
+
 void
 vwarnc(int code, const char *fmt, va_list ap) {
   fprintf(stderr, "fsx: ");
@@ -216,531 +223,6 @@ prterr(char *prefix)
 }
 
 void
-prterrcode(char *prefix, int code)
-{
-	prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(-code));
-}
-
-void
-simple_err(const char *msg, int err)
-{
-    fprintf(stderr, "%s: %s\n", msg, strerror(-err));
-}
-
-/*
- * random
- */
-
-#define RND_STATE_LEN	256
-char	rnd_state[RND_STATE_LEN];
-struct random_data rnd_data;
-
-int32_t
-get_random(void)
-{
-	int32_t val;
-
-	if (random_r(&rnd_data, &val) < 0) {
-		prterr("random_r");
-		exit(1);
-	}
-
-	return val;
-}
-
-/*
- * rbd
- */
-
-struct rbd_ctx {
-	const char *name;	/* image name */
-	rbd_image_t image;	/* image handle */
-	const char *krbd_name;	/* image /dev/rbd<id> name */
-	int krbd_fd;		/* image /dev/rbd<id> fd */
-};
-
-#define RBD_CTX_INIT	(struct rbd_ctx) { NULL, NULL, NULL, -1 }
-
-struct rbd_operations {
-	int (*open)(const char *name, struct rbd_ctx *ctx);
-	int (*close)(struct rbd_ctx *ctx);
-	ssize_t (*read)(struct rbd_ctx *ctx, uint64_t off, size_t len, void *buf);
-	ssize_t (*write)(struct rbd_ctx *ctx, uint64_t off, size_t len, void *buf);
-	int (*flush)(struct rbd_ctx *ctx);
-	int (*discard)(struct rbd_ctx *ctx, uint64_t off, uint64_t len);
-	int (*get_size)(struct rbd_ctx *ctx, uint64_t *size);
-	int (*resize)(struct rbd_ctx *ctx, uint64_t size);
-	int (*clone)(struct rbd_ctx *ctx, const char *src_snapname,
-		     const char *dst_imagename, int *order, int stripe_unit,
-		     int stripe_count);
-	int (*flatten)(struct rbd_ctx *ctx);
-};
-
-char *pool;			/* name of the pool our test image is in */
-char *iname;			/* name of our test image */
-rados_t cluster;		/* handle for our test cluster */
-rados_ioctx_t ioctx;		/* handle for our test pool */
-struct krbd_ctx *krbd;		/* handle for libkrbd */
-
-/*
- * librbd/krbd rbd_operations handlers.  Given the rest of fsx.c, no
- * attempt to do error handling is made in these handlers.
- */
-
-int
-__librbd_open(const char *name, struct rbd_ctx *ctx)
-{
-	rbd_image_t image;
-	int ret;
-
-	assert(!ctx->name && !ctx->image &&
-	       !ctx->krbd_name && ctx->krbd_fd < 0);
-
-	ret = rbd_open(ioctx, name, &image, NULL);
-	if (ret < 0) {
-		prt("rbd_open(%s) failed\n", name);
-		return ret;
-	}
-
-	ctx->name = strdup(name);
-	ctx->image = image;
-	ctx->krbd_name = NULL;
-	ctx->krbd_fd = -1;
-
-	return 0;
-}
-
-int
-librbd_open(const char *name, struct rbd_ctx *ctx)
-{
-	return __librbd_open(name, ctx);
-}
-
-int
-__librbd_close(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	assert(ctx->name && ctx->image);
-
-	ret = rbd_close(ctx->image);
-	if (ret < 0) {
-		prt("rbd_close(%s) failed\n", ctx->name);
-		return ret;
-	}
-
-	free((void *)ctx->name);
-
-	ctx->name = NULL;
-	ctx->image = NULL;
-
-	return 0;
-}
-
-int
-librbd_close(struct rbd_ctx *ctx)
-{
-	return __librbd_close(ctx);
-}
-
-ssize_t
-librbd_read(struct rbd_ctx *ctx, uint64_t off, size_t len, void *buf)
-{
-	ssize_t n;
-
-	n = rbd_read(ctx->image, off, len, buf);
-	if (n < 0)
-		prt("rbd_read(%llu, %zu) failed\n", off, len);
-
-	return n;
-}
-
-ssize_t
-librbd_write(struct rbd_ctx *ctx, uint64_t off, size_t len, void *buf)
-{
-	ssize_t n;
-
-	n = rbd_write(ctx->image, off, len, buf);
-	if (n < 0)
-		prt("rbd_write(%llu, %zu) failed\n", off, len);
-
-	return n;
-}
-
-int
-librbd_flush(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	ret = rbd_flush(ctx->image);
-	if (ret < 0) {
-		prt("rbd_flush failed\n");
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-librbd_discard(struct rbd_ctx *ctx, uint64_t off, uint64_t len)
-{
-	int ret;
-
-	ret = rbd_discard(ctx->image, off, len);
-	if (ret < 0) {
-		prt("rbd_discard(%llu, %llu) failed\n", off, len);
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-librbd_get_size(struct rbd_ctx *ctx, uint64_t *size)
-{
-	rbd_image_info_t info;
-	int ret;
-
-	ret = rbd_stat(ctx->image, &info, sizeof(info));
-	if (ret < 0) {
-		prt("rbd_stat failed\n");
-		return ret;
-	}
-
-	*size = info.size;
-
-	return 0;
-}
-
-int
-__librbd_resize(struct rbd_ctx *ctx, uint64_t size)
-{
-	int ret;
-
-	ret = rbd_resize(ctx->image, size);
-	if (ret < 0) {
-		prt("rbd_resize(%llu) failed\n", size);
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-librbd_resize(struct rbd_ctx *ctx, uint64_t size)
-{
-	return __librbd_resize(ctx, size);
-}
-
-int
-__librbd_clone(struct rbd_ctx *ctx, const char *src_snapname,
-	       const char *dst_imagename, int *order, int stripe_unit,
-	       int stripe_count)
-{
-	int ret;
-
-	ret = rbd_snap_create(ctx->image, src_snapname);
-	if (ret < 0) {
-		prt("rbd_snap_create(%s@%s) failed\n", ctx->name,
-		    src_snapname);
-		return ret;
-	}
-
-	ret = rbd_snap_protect(ctx->image, src_snapname);
-	if (ret < 0) {
-		prt("rbd_snap_protect(%s@%s) failed\n", ctx->name,
-		    src_snapname);
-		return ret;
-	}
-
-	ret = rbd_clone2(ioctx, ctx->name, src_snapname, ioctx,
-			 dst_imagename, RBD_FEATURES_ALL, order,
-			 stripe_unit, stripe_count);
-	if (ret < 0) {
-		prt("rbd_clone2(%s@%s -> %s) failed\n", ctx->name,
-		    src_snapname, dst_imagename);
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-librbd_clone(struct rbd_ctx *ctx, const char *src_snapname,
-	     const char *dst_imagename, int *order, int stripe_unit,
-	     int stripe_count)
-{
-	return __librbd_clone(ctx, src_snapname, dst_imagename, order,
-			      stripe_unit, stripe_count);
-}
-
-int
-__librbd_flatten(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	ret = rbd_flatten(ctx->image);
-	if (ret < 0) {
-		prt("rbd_flatten failed\n");
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-librbd_flatten(struct rbd_ctx *ctx)
-{
-	return __librbd_flatten(ctx);
-}
-
-const struct rbd_operations librbd_operations = {
-	.open	= librbd_open,
-	.close	= librbd_close,
-	.read	= librbd_read,
-	.write	= librbd_write,
-	.flush	= librbd_flush,
-	.discard = librbd_discard,
-	.get_size = librbd_get_size,
-	.resize	= librbd_resize,
-	.clone	= librbd_clone,
-	.flatten = librbd_flatten,
-};
-
-int
-krbd_open(const char *name, struct rbd_ctx *ctx)
-{
-	char *devnode;
-	int fd;
-	int ret;
-
-	ret = __librbd_open(name, ctx);
-	if (ret < 0)
-		return ret;
-
-	ret = krbd_map(krbd, pool, name, NULL, NULL, &devnode);
-	if (ret < 0) {
-		prt("krbd_map(%s) failed\n", name);
-		return ret;
-	}
-
-	fd = open(devnode, O_RDWR | o_direct);
-	if (fd < 0) {
-		ret = -errno;
-		prt("open(%s) failed\n", devnode);
-		return ret;
-	}
-
-	ctx->krbd_name = devnode;
-	ctx->krbd_fd = fd;
-
-	return 0;
-}
-
-int
-krbd_close(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	assert(ctx->krbd_name && ctx->krbd_fd >= 0);
-
-	if (close(ctx->krbd_fd) < 0) {
-		ret = -errno;
-		prt("close(%s) failed\n", ctx->krbd_name);
-		return ret;
-	}
-
-	ret = krbd_unmap(krbd, ctx->krbd_name);
-	if (ret < 0) {
-		prt("krbd_unmap(%s) failed\n", ctx->krbd_name);
-		return ret;
-	}
-
-	free((void *)ctx->krbd_name);
-
-	ctx->krbd_name = NULL;
-	ctx->krbd_fd = -1;
-
-	return __librbd_close(ctx);
-}
-
-ssize_t
-krbd_read(struct rbd_ctx *ctx, uint64_t off, size_t len, void *buf)
-{
-	ssize_t n;
-
-	n = pread(ctx->krbd_fd, buf, len, off);
-	if (n < 0) {
-		n = -errno;
-		prt("pread(%llu, %zu) failed\n", off, len);
-		return n;
-	}
-
-	return n;
-}
-
-ssize_t
-krbd_write(struct rbd_ctx *ctx, uint64_t off, size_t len, void *buf)
-{
-	ssize_t n;
-
-	n = pwrite(ctx->krbd_fd, buf, len, off);
-	if (n < 0) {
-		n = -errno;
-		prt("pwrite(%llu, %zu) failed\n", off, len);
-		return n;
-	}
-
-	return n;
-}
-
-int
-__krbd_flush(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	if (o_direct)
-		return 0;
-
-	/*
-	 * fsync(2) on the block device does not sync the filesystem
-	 * mounted on top of it, but that's OK - we control the entire
-	 * lifetime of the block device and write directly to it.
-	 */
-	if (fsync(ctx->krbd_fd) < 0) {
-		ret = -errno;
-		prt("fsync failed\n");
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-krbd_flush(struct rbd_ctx *ctx)
-{
-	return __krbd_flush(ctx);
-}
-
-int
-krbd_discard(struct rbd_ctx *ctx, uint64_t off, uint64_t len)
-{
-	uint64_t range[2] = { off, len };
-	int ret;
-
-	/*
-	 * off and len must be 512-byte aligned, otherwise BLKDISCARD
-	 * will fail with -EINVAL.  This means that -K (enable krbd
-	 * mode) requires -h 512 or similar.
-	 */
-	if (ioctl(ctx->krbd_fd, BLKDISCARD, &range) < 0) {
-		ret = -errno;
-		prt("BLKDISCARD(%llu, %llu) failed\n", off, len);
-		return ret;
-	}
-
-	return 0;
-}
-
-int
-krbd_get_size(struct rbd_ctx *ctx, uint64_t *size)
-{
-	uint64_t bytes;
-	int ret;
-
-	if (ioctl(ctx->krbd_fd, BLKGETSIZE64, &bytes) < 0) {
-		ret = -errno;
-		prt("BLKGETSIZE64 failed\n");
-		return ret;
-	}
-
-	*size = bytes;
-
-	return 0;
-}
-
-int
-krbd_resize(struct rbd_ctx *ctx, uint64_t size)
-{
-	int ret;
-
-	assert(size % truncbdy == 0);
-
-	/*
-	 * This is essential: when krbd detects a size change, it calls
-	 * revalidate_disk(), which ends up calling invalidate_bdev(),
-	 * which invalidates only clean buffers.  The cache flush makes
-	 * it invalidate everything, which is what we need if we are
-	 * shrinking.
-	 */
-	ret = __krbd_flush(ctx);
-	if (ret < 0)
-		return ret;
-
-	return __librbd_resize(ctx, size);
-}
-
-int
-krbd_clone(struct rbd_ctx *ctx, const char *src_snapname,
-	   const char *dst_imagename, int *order, int stripe_unit,
-	   int stripe_count)
-{
-	int ret;
-
-	ret = __krbd_flush(ctx);
-	if (ret < 0)
-		return ret;
-
-	return __librbd_clone(ctx, src_snapname, dst_imagename, order,
-			      stripe_unit, stripe_count);
-}
-
-int
-krbd_flatten(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	ret = __krbd_flush(ctx);
-	if (ret < 0)
-		return ret;
-
-	return __librbd_flatten(ctx);
-}
-
-const struct rbd_operations krbd_operations = {
-	.open	= krbd_open,
-	.close	= krbd_close,
-	.read	= krbd_read,
-	.write	= krbd_write,
-	.flush	= krbd_flush,
-	.discard = krbd_discard,
-	.get_size = krbd_get_size,
-	.resize	= krbd_resize,
-	.clone	= krbd_clone,
-	.flatten = krbd_flatten,
-};
-
-struct rbd_ctx ctx = RBD_CTX_INIT;
-const struct rbd_operations *ops = &librbd_operations;
-
-static bool rbd_image_has_parent(struct rbd_ctx *ctx)
-{
-	int ret;
-
-	ret = rbd_get_parent_info(ctx->image, NULL, 0, NULL, 0, NULL, 0);
-	if (ret < 0 && ret != -ENOENT) {
-		prterrcode("rbd_get_parent_info", ret);
-		exit(1);
-	}
-
-	return !ret;
-}
-
-/*
- * fsx
- */
-
-void
 log4(int operation, int arg0, int arg1, int arg2)
 {
 	struct log_entry *le;
@@ -759,6 +241,12 @@ log4(int operation, int arg0, int arg1, int arg2)
 }
 
 void
+simple_err(const char *msg, int err)
+{
+    fprintf(stderr, "%s: %s\n", msg, strerror(-err));
+}
+
+void
 logdump(void)
 {
 	int	i, count, down;
@@ -867,6 +355,12 @@ logdump(void)
 }
 
 void
+prterrcode(char *prefix, int code)
+{
+	prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(-code));
+}
+
+void
 save_buffer(char *buffer, off_t bufferlength, int fd)
 {
 	off_t ret;
@@ -964,49 +458,34 @@ check_buffers(char *good_buf, char *temp_buf, unsigned offset, unsigned size)
 void
 check_size(void)
 {
-	uint64_t size;
+	rbd_image_info_t statbuf;
 	int ret;
 
-	ret = ops->get_size(&ctx, &size);
-	if (ret < 0)
-		prterrcode("check_size: ops->get_size", ret);
-
-	if ((uint64_t)file_size != size) {
+	if ((ret = rbd_stat(image, &statbuf, sizeof(statbuf))) < 0) {
+		prterrcode("check_size: fstat", ret);
+	}
+	if ((uint64_t)file_size != statbuf.size) {
 		prt("Size error: expected 0x%llx stat 0x%llx\n",
 		    (unsigned long long)file_size,
-		    (unsigned long long)size);
+		    (unsigned long long)statbuf.size);
 		report_failure(120);
 	}
 }
 
-#define TRUNC_HACK_SIZE	(200ULL << 9)	/* 512-byte aligned for krbd */
 
 void
 check_trunc_hack(void)
 {
-	uint64_t size;
-	int ret;
+	rbd_image_info_t statbuf;
 
-	ret = ops->resize(&ctx, 0ULL);
-	if (ret < 0)
-		prterrcode("check_trunc_hack: ops->resize pre", ret);
-
-	ret = ops->resize(&ctx, TRUNC_HACK_SIZE);
-	if (ret < 0)
-		prterrcode("check_trunc_hack: ops->resize actual", ret);
-
-	ret = ops->get_size(&ctx, &size);
-	if (ret < 0)
-		prterrcode("check_trunc_hack: ops->get_size", ret);
-
-	if (size != TRUNC_HACK_SIZE) {
-		prt("no extend on truncate! not posix!\n");
-		exit(130);
-	}
-
-	ret = ops->resize(&ctx, 0ULL);
-	if (ret < 0)
-		prterrcode("check_trunc_hack: ops->resize post", ret);
+	rbd_resize(image, (off_t)0);
+	rbd_resize(image, (off_t)100000);
+	rbd_stat(image, &statbuf, sizeof(statbuf));
+	if (statbuf.size != (off_t)100000) {
+ 		prt("no extend on truncate! not posix!\n");
+ 		exit(130);
+ 	}
+	rbd_resize(image, (off_t)0);
 }
 
 int
@@ -1014,7 +493,6 @@ create_image()
 {
 	int r;
 	int order = 0;
-
 	r = rados_create(&cluster, NULL);
 	if (r < 0) {
 		simple_err("Could not create cluster handle", r);
@@ -1031,21 +509,15 @@ create_image()
 		simple_err("Error connecting to cluster", r);
 		goto failed_shutdown;
 	}
-	r = krbd_create_from_context(rados_cct(cluster), &krbd);
-	if (r < 0) {
-		simple_err("Could not create libkrbd handle", r);
-		goto failed_shutdown;
-	}
-
 	r = rados_pool_create(cluster, pool);
 	if (r < 0 && r != -EEXIST) {
 		simple_err("Error creating pool", r);
-		goto failed_krbd;
+		goto failed_shutdown;
 	}
 	r = rados_ioctx_create(cluster, pool, &ioctx);
 	if (r < 0) {
 		simple_err("Error creating ioctx", r);
-		goto failed_krbd;
+		goto failed_shutdown;
 	}
 	if (clone_calls) {
 		r = rbd_create2(ioctx, iname, 0, RBD_FEATURE_LAYERING, &order);
@@ -1061,8 +533,6 @@ create_image()
 
  failed_open:
 	rados_ioctx_destroy(ioctx);
- failed_krbd:
-	krbd_destroy(krbd);
  failed_shutdown:
 	rados_shutdown(cluster);
 	return r;
@@ -1071,14 +541,10 @@ create_image()
 void
 doflush(unsigned offset, unsigned size)
 {
-	int ret;
-
-	if (o_direct)
+	if (o_direct == O_DIRECT)
 		return;
 
-	ret = ops->flush(&ctx);
-	if (ret < 0)
-		prterrcode("doflush: ops->flush", ret);
+	rbd_flush(image);
 }
 
 void
@@ -1115,17 +581,15 @@ doread(unsigned offset, unsigned size)
 			(monitorend == -1 || offset <= monitorend))))))
 		prt("%lu read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
 		    offset, offset + size - 1, size);
-
-	ret = ops->read(&ctx, offset, size, temp_buf);
+	ret = rbd_read(image, offset, size, temp_buf);
 	if (ret != (int)size) {
 		if (ret < 0)
-			prterrcode("doread: ops->read", ret);
+			prterrcode("doread: read", ret);
 		else
 			prt("short read: 0x%x bytes instead of 0x%x\n",
 			    ret, size);
 		report_failure(141);
 	}
-
 	check_buffers(good_buf, temp_buf, offset, size);
 }
 
@@ -1197,9 +661,9 @@ dowrite(unsigned offset, unsigned size)
 			warn("Lite file size bug in fsx!");
 			report_failure(149);
 		}
-		ret = ops->resize(&ctx, newsize);
+		ret = rbd_resize(image, newsize);
 		if (ret < 0) {
-			prterrcode("dowrite: ops->resize", ret);
+			prterrcode("dowrite: resize", ret);
 			report_failure(150);
 		}
 	}
@@ -1216,18 +680,18 @@ dowrite(unsigned offset, unsigned size)
 		prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
 		    offset, offset + size - 1, size);
 
-	ret = ops->write(&ctx, offset, size, good_buf + offset);
+	ret = rbd_write(image, offset, size, good_buf + offset);
 	if (ret != size) {
 		if (ret < 0)
-			prterrcode("dowrite: ops->write", ret);
+			prterrcode("dowrite: rbd_write", ret);
 		else
 			prt("short write: 0x%x bytes instead of 0x%x\n",
 			    ret, size);
 		report_failure(151);
 	}
-
-	if (flush)
+	if (flush) {
 		doflush(offset, size);
+	}
 }
 
 
@@ -1254,15 +718,14 @@ dotruncate(unsigned size)
 
 	if (testcalls <= simulatedopcount)
 		return;
-
+	
 	if ((progressinterval && testcalls % progressinterval == 0) ||
 	    (debug && (monitorstart == -1 || monitorend == -1 ||
 		      size <= monitorend)))
 		prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size);
-
-	ret = ops->resize(&ctx, size);
-	if (ret < 0) {
-		prterrcode("dotruncate: ops->resize", ret);
+	if ((ret = rbd_resize(image, size)) < 0) {
+		prt("rbd_resize: %x\n", size);
+		prterrcode("dotruncate: ftruncate", ret);
 		report_failure(160);
 	}
 }
@@ -1275,8 +738,6 @@ do_punch_hole(unsigned offset, unsigned length)
 	int max_len = 0;
 	int ret;
 
-	offset -= offset % holebdy;
-	length -= length % holebdy;
 	if (length == 0) {
 		if (!quiet && testcalls > simulatedopcount)
 			prt("skipping zero length punch hole\n");
@@ -1304,14 +765,14 @@ do_punch_hole(unsigned offset, unsigned length)
 		prt("%lu punch\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls,
 			offset, offset+length, length);
 	}
-
-	ret = ops->discard(&ctx, (unsigned long long)offset,
-			   (unsigned long long)length);
-	if (ret < 0) {
-		prterrcode("do_punch_hole: ops->discard", ret);
+	if ((ret = rbd_discard(image, (unsigned long long) offset,
+			       (unsigned long long) length)) < 0) {
+		prt("%punch hole: %x to %x\n", offset, length);
+		prterrcode("do_punch_hole: discard", ret);
 		report_failure(161);
 	}
 
+
 	max_offset = offset < file_size ? offset : file_size;
 	max_len = max_offset + length <= file_size ? length :
 			file_size - max_offset;
@@ -1342,97 +803,56 @@ do_clone()
 	char lastimagename[1024];
 	int ret, fd;
 	int order = 0, stripe_unit = 0, stripe_count = 0;
-	uint64_t newsize = file_size;
+
+	if (randomize_striping) {
+		order = 18 + rand() % 8;
+		stripe_unit = 1ull << (order - 1 - (rand() % 8));
+		stripe_count = 2 + rand() % 14;
+	}
 
 	log4(OP_CLONE, 0, 0, 0);
 	++num_clones;
+	prt("%lu clone\t%d order %d su %d sc %d\n", testcalls, num_clones, order, stripe_unit, stripe_count);
 
-	if (randomize_striping) {
-		order = 18 + get_random() % 8;
-		stripe_unit = 1ull << (order - 1 - (get_random() % 8));
-		stripe_count = 2 + get_random() % 14;
+	clone_filename(filename, sizeof(filename), num_clones);
+	if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0) {
+		simple_err("do_clone: open", -errno);
+		exit(162);
+	}
+	save_buffer(good_buf, file_size, fd);
+	if ((ret = close(fd)) < 0) {
+		simple_err("do_clone: close", -errno);
+		exit(163);
 	}
-
-	prt("%lu clone\t%d order %d su %d sc %d\n", testcalls, num_clones,
-	    order, stripe_unit, stripe_count);
 
 	clone_imagename(imagename, sizeof(imagename), num_clones);
 	clone_imagename(lastimagename, sizeof(lastimagename),
 			num_clones - 1);
-	assert(strcmp(lastimagename, ctx.name) == 0);
 
-	ret = ops->clone(&ctx, "snap", imagename, &order, stripe_unit,
-			 stripe_count);
-	if (ret < 0) {
-		prterrcode("do_clone: ops->clone", ret);
-		exit(165);
+	if ((ret = rbd_snap_create(image, "snap")) < 0) {
+		simple_err("do_clone: rbd create snap", ret);
+		exit(164);
 	}
 
-	if (randomize_parent_overlap && rbd_image_has_parent(&ctx)) {
-		int rand = get_random() % 16 + 1; // [1..16]
-
-		if (rand < 13) {
-			uint64_t overlap;
-
-			ret = rbd_get_overlap(ctx.image, &overlap);
-			if (ret < 0) {
-				prterrcode("do_clone: rbd_get_overlap", ret);
-				exit(1);
-			}
-
-			if (rand < 10) {	// 9/16
-				newsize = overlap * ((double)rand / 10);
-				newsize -= newsize % truncbdy;
-			} else {		// 3/16
-				newsize = 0;
-			}
-
-			assert(newsize != (uint64_t)file_size);
-			prt("truncating image %s from 0x%llx (overlap 0x%llx) to 0x%llx\n",
-			    ctx.name, file_size, overlap, newsize);
-
-			ret = ops->resize(&ctx, newsize);
-			if (ret < 0) {
-				prterrcode("do_clone: ops->resize", ret);
-				exit(1);
-			}
-		} else if (rand < 15) {		// 2/16
-			prt("flattening image %s\n", ctx.name);
-
-			ret = ops->flatten(&ctx);
-			if (ret < 0) {
-				prterrcode("do_clone: ops->flatten", ret);
-				exit(1);
-			}
-		} else {			// 2/16
-			prt("leaving image %s intact\n", ctx.name);
-		}
+	if ((ret = rbd_snap_protect(image, "snap")) < 0) {
+		simple_err("do_clone: rbd protect snap", ret);
+		exit(164);
 	}
 
-	clone_filename(filename, sizeof(filename), num_clones);
-	if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0) {
-		simple_err("do_clone: open", -errno);
-		exit(162);
-	}
-	save_buffer(good_buf, newsize, fd);
-	if ((ret = close(fd)) < 0) {
-		simple_err("do_clone: close", -errno);
-		exit(163);
+	ret = rbd_clone2(ioctx, lastimagename, "snap", ioctx, imagename,
+			 RBD_FEATURES_ALL, &order, stripe_unit, stripe_count);
+	if (ret < 0) {
+		simple_err("do_clone: rbd clone", ret);
+		exit(165);
 	}
 
-	/*
-	 * Close parent.
-	 */
-	if ((ret = ops->close(&ctx)) < 0) {
-		prterrcode("do_clone: ops->close", ret);
+	if ((ret = rbd_close(image)) < 0) {
+		simple_err("do_clone: rbd close", ret);
 		exit(174);
 	}
 
-	/*
-	 * Open freshly made clone.
-	 */
-	if ((ret = ops->open(imagename, &ctx)) < 0) {
-		prterrcode("do_clone: ops->open", ret);
+	if ((ret = rbd_open(ioctx, imagename, &image, NULL)) < 0) {
+		simple_err("do_clone: rbd open", ret);
 		exit(166);
 	}
 
@@ -1446,13 +866,13 @@ check_clone(int clonenum)
 	char filename[128];
 	char imagename[128];
 	int ret, fd;
-	struct rbd_ctx cur_ctx = RBD_CTX_INIT;
+	rbd_image_t cur_image;
 	struct stat file_info;
 	char *good_buf, *temp_buf;
 
 	clone_imagename(imagename, sizeof(imagename), clonenum);
-	if ((ret = ops->open(imagename, &cur_ctx)) < 0) {
-		prterrcode("check_clone: ops->open", ret);
+	if ((ret = rbd_open(ioctx, imagename, &cur_image, NULL)) < 0) {
+		simple_err("check_clone: rbd open", ret);
 		exit(167);
 	}
 
@@ -1469,35 +889,20 @@ check_clone(int clonenum)
 		exit(169);
 	}
 
-	good_buf = NULL;
-	ret = posix_memalign((void **)&good_buf,
-			     MAX(writebdy, (int)sizeof(void *)),
-			     file_info.st_size);
-	if (ret > 0) {
-		prterrcode("check_clone: posix_memalign(good_buf)", -ret);
-		exit(96);
-	}
-
-	temp_buf = NULL;
-	ret = posix_memalign((void **)&temp_buf,
-			     MAX(readbdy, (int)sizeof(void *)),
-			     file_info.st_size);
-	if (ret > 0) {
-		prterrcode("check_clone: posix_memalign(temp_buf)", -ret);
-		exit(97);
-	}
+	good_buf = malloc(file_info.st_size);
+	temp_buf = malloc(file_info.st_size);
 
 	if ((ret = pread(fd, good_buf, file_info.st_size, 0)) < 0) {
 		simple_err("check_clone: pread", -errno);
 		exit(170);
 	}
-	if ((ret = ops->read(&cur_ctx, 0, file_info.st_size, temp_buf)) < 0) {
-		prterrcode("check_clone: ops->read", ret);
+	if ((ret = rbd_read(cur_image, 0, file_info.st_size, temp_buf)) < 0) {
+		simple_err("check_clone: rbd_read", ret);
 		exit(171);
 	}
 	close(fd);
-	if ((ret = ops->close(&cur_ctx)) < 0) {
-		prterrcode("check_clone: ops->close", ret);
+	if ((ret = rbd_close(cur_image)) < 0) {
+		simple_err("check_clone: rbd close", ret);
 		exit(174);
 	}
 	check_buffers(good_buf, temp_buf, 0, file_info.st_size);
@@ -1513,22 +918,19 @@ writefileimage()
 {
 	ssize_t ret;
 
-	ret = ops->write(&ctx, 0, file_size, good_buf);
+	ret = rbd_write(image, 0, file_size, good_buf);
 	if (ret != file_size) {
 		if (ret < 0)
-			prterrcode("writefileimage: ops->write", ret);
+			prterrcode("writefileimage: write", ret);
 		else
 			prt("short write: 0x%x bytes instead of 0x%llx\n",
 			    ret, (unsigned long long)file_size);
 		report_failure(172);
 	}
-
-	if (!lite) {
-		ret = ops->resize(&ctx, file_size);
-		if (ret < 0) {
-			prterrcode("writefileimage: ops->resize", ret);
-			report_failure(173);
-		}
+	if (lite ? 0 : (ret = rbd_resize(image, file_size)) < 0) {
+		prt("rbd_resize: %llx\n", (unsigned long long)file_size);
+		prterrcode("writefileimage: rbd_resize", ret);
+		report_failure(173);
 	}
 }
 
@@ -1537,16 +939,17 @@ do_flatten()
 {
 	int ret;
 
-	if (!rbd_image_has_parent(&ctx)) {
+	if (num_clones == 0 ||
+	    (rbd_get_parent_info(image, NULL, 0, NULL, 0, NULL, 0)
+	    == -ENOENT)) {
 		log4(OP_SKIPPED, OP_FLATTEN, 0, 0);
 		return;
 	}
 	log4(OP_FLATTEN, 0, 0, 0);
 	prt("%lu flatten\n", testcalls);
 
-	ret = ops->flatten(&ctx);
-	if (ret < 0) {
-		prterrcode("writefileimage: ops->flatten", ret);
+	if ((ret = rbd_flatten(image)) < 0) {
+		simple_err("do_flatten: rbd flatten", ret);
 		exit(177);
 	}
 }
@@ -1554,30 +957,22 @@ do_flatten()
 void
 docloseopen(void)
 {
-	char *name;
 	int ret;
 
 	if (testcalls <= simulatedopcount)
 		return;
 
-	name = strdup(ctx.name);
-
 	if (debug)
 		prt("%lu close/open\n", testcalls);
-
-	ret = ops->close(&ctx);
-	if (ret < 0) {
-		prterrcode("docloseopen: ops->close", ret);
+	if ((ret = rbd_close(image)) < 0) {
+		prterrcode("docloseopen: close", ret);
 		report_failure(180);
 	}
-
-	ret = ops->open(name, &ctx);
+	ret = rbd_open(ioctx, iname, &image, NULL);
 	if (ret < 0) {
-		prterrcode("docloseopen: ops->open", ret);
+		prterrcode("docloseopen: open", ret);
 		report_failure(181);
 	}
-
-	free(name);
 }
 
 #define TRIM_OFF_LEN(off, len, size)	\
@@ -1595,7 +990,7 @@ test(void)
 {
 	unsigned long	offset;
 	unsigned long	size = maxoplen;
-	unsigned long	rv = get_random();
+	unsigned long	rv = random();
 	unsigned long	op;
 
 	if (simulatedopcount > 0 && testcalls == simulatedopcount)
@@ -1612,9 +1007,9 @@ test(void)
 	if (!quiet && testcalls < simulatedopcount && testcalls % 100000 == 0)
 		prt("%lu...\n", testcalls);
 
-	offset = get_random();
+	offset = random();
 	if (randomoplen)
-		size = get_random() % (maxoplen + 1);
+		size = random() % (maxoplen + 1);
 
 	/* calculate appropriate op to run */
 	if (lite)
@@ -1644,19 +1039,11 @@ test(void)
 		}
 		break;
 	case OP_CLONE:
-		/* clone, 8% chance */
-		if (!clone_calls || file_size == 0 || get_random() % 100 >= 8) {
+		if (!clone_calls || random() % 100 > 5 || file_size == 0) {
 			log4(OP_SKIPPED, OP_CLONE, 0, 0);
 			goto out;
 		}
 		break;
-	case OP_FLATTEN:
-		/* flatten four times as rarely as clone, 2% chance */
-		if (get_random() % 100 >= 2) {
-			log4(OP_SKIPPED, OP_FLATTEN, 0, 0);
-			goto out;
-		}
-		break;
 	}
 
 	switch (op) {
@@ -1682,7 +1069,7 @@ test(void)
 
 	case OP_TRUNCATE:
 		if (!style)
-			size = get_random() % maxfilelen;
+			size = random() % maxfilelen;
 		dotruncate(size);
 		break;
 
@@ -1728,12 +1115,11 @@ void
 usage(void)
 {
 	fprintf(stdout, "usage: %s",
-		"fsx [-dfnqxyACFHKLORUWZ] [-b opnum] [-c Prob] [-h holebdy] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] pname iname\n\
+		"fsx [-dnqxAFLOWZ] [-b opnum] [-c Prob] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] pname iname\n\
 	-b opnum: beginning operation number (default 1)\n\
 	-c P: 1 in P chance of file close+open at each op (default infinity)\n\
 	-d: debug output for all operations\n\
-	-f: flush and invalidate cache after I/O\n\
-	-h holebdy: 4096 would make discards page aligned (default 1)\n\
+	-f flush and invalidate cache after I/O\n\
 	-l flen: the upper bound on file size (default 262144)\n\
 	-m startop:endop: monitor (print debug output) specified byte range (default 0:infinity)\n\
 	-n: no verifications of file size\n\
@@ -1745,27 +1131,25 @@ usage(void)
 	-t truncbdy: 4096 would make truncates page aligned (default 1)\n\
 	-w writebdy: 4096 would make writes page aligned (default 1)\n\
 	-x: preallocate file space before starting, XFS only (default 0)\n\
-	-y: synchronize changes to a file\n"
+	-y synchronize changes to a file\n"
 
 #ifdef AIO
 "	-A: Use the AIO system calls\n"
 #endif
-"	-C: do not use clone calls\n\
-	-D startingop: debug output starting at specified operation\n"
+"	-D startingop: debug output starting at specified operation\n"
 #ifdef FALLOCATE
 "	-F: Do not use fallocate (preallocation) calls\n"
 #endif
-"	-H: do not use punch hole calls\n\
-	-K: enable krbd mode (use -t and -h too)\n\
-	-L: fsxLite - no file creations & no file size changes\n\
+"        -H: Do not use punch hole calls\n"
+"        -C: Do not use clone calls\n"
+"	-L: fsxLite - no file creations & no file size changes\n\
 	-N numops: total # operations to do (default infinity)\n\
 	-O: use oplen (see -o flag) for every op (default random)\n\
-	-P dirpath: save .fsxlog and .fsxgood files in dirpath (default ./)\n\
-	-R: read() system calls only (mapped reads disabled)\n\
+	-P: save .fsxlog and .fsxgood files in dirpath (default ./)\n\
 	-S seed: for random # generator (default 1) 0 gets timestamp\n\
-	-U: disable randomized striping\n\
 	-W: mapped write operations DISabled\n\
-	-Z: O_DIRECT (use -R, -W, -r and -w too)\n\
+        -R: read() system calls only (mapped reads disabled)\n\
+        -Z: O_DIRECT (use -R, -W, -r and -w too)\n\
 	poolname: this is REQUIRED (no default)\n\
 	imagename: this is REQUIRED (no default)\n");
 	exit(89);
@@ -1943,7 +1327,7 @@ main(int argc, char **argv)
 
 	setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
 
-	while ((ch = getopt(argc, argv, "b:c:dfh:l:m:no:p:qr:s:t:w:xyACD:FHKLN:OP:RS:UWZ"))
+	while ((ch = getopt(argc, argv, "b:c:dfl:m:no:p:qr:s:t:w:xyACD:FHLN:OP:RS:WZ"))
 	       != EOF)
 		switch (ch) {
 		case 'b':
@@ -1970,11 +1354,6 @@ main(int argc, char **argv)
 		case 'f':
 			flush = 1;
 			break;
-		case 'h':
-			holebdy = getnum(optarg, &endp);
-			if (holebdy <= 0)
-				usage();
-			break;
 		case 'l':
 			maxfilelen = getnum(optarg, &endp);
 			if (maxfilelen <= 0)
@@ -2052,10 +1431,6 @@ main(int argc, char **argv)
 		case 'H':
 			punch_hole_calls = 0;
 			break;
-		case 'K':
-			prt("krbd mode enabled\n");
-			ops = &krbd_operations;
-			break;
 		case 'L':
 			prt("lite mode not supported for rbd\n");
 			exit(1);
@@ -2077,8 +1452,6 @@ main(int argc, char **argv)
 			break;
                 case 'R':
                         mapped_reads = 0;
-			if (!quiet)
-				fprintf(stdout, "mapped reads DISABLED\n");
                         break;
 		case 'S':
                         seed = getnum(optarg, &endp);
@@ -2089,9 +1462,6 @@ main(int argc, char **argv)
 			if (seed < 0)
 				usage();
 			break;
-		case 'U':
-			randomize_striping = 0;
-			break;
 		case 'W':
 		        mapped_writes = 0;
 			if (!quiet)
@@ -2122,21 +1492,15 @@ main(int argc, char **argv)
 	signal(SIGUSR1,	cleanup);
 	signal(SIGUSR2,	cleanup);
 
-	if (initstate_r(seed, rnd_state, RND_STATE_LEN, &rnd_data) < 0) {
-		prterr("initstate_r");
-		exit(1);
-	}
-	if (setstate_r(rnd_state, &rnd_data) < 0) {
-		prterr("setstate_r");
-		exit(1);
-	}
+	initstate(seed, state, 256);
+	setstate(state);
 
 	ret = create_image();
 	if (ret < 0) {
 		prterrcode(iname, ret);
 		exit(90);
 	}
-	ret = ops->open(iname, &ctx);
+	ret = rbd_open(ioctx, iname, &image, NULL);
 	if (ret < 0) {
 		simple_err("Error opening image", ret);
 		exit(91);
@@ -2165,34 +1529,17 @@ main(int argc, char **argv)
 
 	original_buf = (char *) malloc(maxfilelen);
 	for (i = 0; i < (int)maxfilelen; i++)
-		original_buf[i] = get_random() % 256;
-
-	ret = posix_memalign((void **)&good_buf,
-			     MAX(writebdy, (int)sizeof(void *)), maxfilelen);
-	if (ret > 0) {
-		if (ret == EINVAL)
-			prt("writebdy is not a suitable power of two\n");
-		else
-			prterrcode("main: posix_memalign(good_buf)", -ret);
-		exit(94);
-	}
+		original_buf[i] = random() % 256;
+	good_buf = (char *) malloc(maxfilelen + writebdy);
+	good_buf = round_ptr_up(good_buf, writebdy, 0);
 	memset(good_buf, '\0', maxfilelen);
-
-	ret = posix_memalign((void **)&temp_buf,
-			     MAX(readbdy, (int)sizeof(void *)), maxfilelen);
-	if (ret > 0) {
-		if (ret == EINVAL)
-			prt("readbdy is not a suitable power of two\n");
-		else
-			prterrcode("main: posix_memalign(temp_buf)", -ret);
-		exit(95);
-	}
+	temp_buf = (char *) malloc(maxfilelen + writebdy);
+	temp_buf = round_ptr_up(temp_buf, writebdy, 0);
 	memset(temp_buf, '\0', maxfilelen);
-
 	if (lite) {	/* zero entire existing file */
 		ssize_t written;
 
-		written = ops->write(&ctx, 0, (size_t)maxfilelen, good_buf);
+		written = rbd_write(image, 0, (size_t)maxfilelen, good_buf);
 		if (written != (ssize_t)maxfilelen) {
 			if (written < 0) {
 				prterrcode(iname, written);
@@ -2212,9 +1559,8 @@ main(int argc, char **argv)
 	while (numops == -1 || numops--)
 		test();
 
-	ret = ops->close(&ctx);
-	if (ret < 0) {
-		prterrcode("ops->close", ret);
+	if ((ret = rbd_close(image)) < 0) {
+		prterrcode("rbd_close", ret);
 		report_failure(99);
 	}
 
@@ -2223,10 +1569,8 @@ main(int argc, char **argv)
 
 	while (num_clones >= 0) {
 		static int first = 1;
-		rbd_image_t image;
 		char clonename[128];
 		char errmsg[128];
-
 		clone_imagename(clonename, 128, num_clones);
 		if ((ret = rbd_open(ioctx, clonename, &image, NULL)) < 0) {
 			sprintf(errmsg, "rbd_open %s", clonename);
@@ -2238,7 +1582,7 @@ main(int argc, char **argv)
 				sprintf(errmsg, "rbd_snap_unprotect %s at snap",
 					clonename);
 				prterrcode(errmsg, ret);
-				report_failure(102);
+			report_failure(102);
 			}
 			if ((ret = rbd_snap_remove(image, "snap")) < 0) {
 				sprintf(errmsg, "rbd_snap_remove %s at snap",
@@ -2263,17 +1607,16 @@ main(int argc, char **argv)
 		num_clones--;
 	}
 
-	prt("All operations completed A-OK!\n");
-	fclose(fsxlogf);
-
 	rados_ioctx_destroy(ioctx);
-	krbd_destroy(krbd);
 	rados_shutdown(cluster);
 
 	free(original_buf);
 	free(good_buf);
 	free(temp_buf);
 
+	prt("All operations completed A-OK!\n");
+	fclose(fsxlogf);
+
 	exit(0);
 	return 0;
 }
diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc
index 2f0e5d2..7f35418 100644
--- a/src/test/librbd/test_librbd.cc
+++ b/src/test/librbd/test_librbd.cc
@@ -225,7 +225,7 @@ int test_ls(rados_ioctx_t io_ctx, size_t num_expected, ...)
   va_list ap;
   size_t max_size = 1024;
 
-  names = (char *) malloc(sizeof(char) * 1024);
+  names = (char *) malloc(sizeof(char *) * 1024);
   int len = rbd_list(io_ctx, names, &max_size);
 
   for (i = 0, num_images = 0, cur_name = names; cur_name < names + len; i++) {
@@ -1037,7 +1037,9 @@ TEST(LibRBD, TestClone)
   EXPECT_NE(0, rbd_clone(ioctx, "parent", NULL, ioctx, "child", features, &order));
 
   // verify that there is no parent info on "parent"
-  ASSERT_EQ(-ENOENT, rbd_get_parent_info(parent, NULL, 0, NULL, 0, NULL, 0));
+  char ppool[1], pname[1], psnapname[1];
+  ASSERT_EQ(-ENOENT, rbd_get_parent_info(parent, ppool, sizeof(ppool),
+	    pname, sizeof(pname), psnapname, sizeof(psnapname)));
   printf("parent has no parent info\n");
 
   // create a snapshot, reopen as the parent we're interested in
@@ -1151,7 +1153,9 @@ TEST(LibRBD, TestClone2)
   EXPECT_NE(0, rbd_clone(ioctx, "parent", NULL, ioctx, "child", features, &order));
 
   // verify that there is no parent info on "parent"
-  ASSERT_EQ(-ENOENT, rbd_get_parent_info(parent, NULL, 0, NULL, 0, NULL, 0));
+  char ppool[1], pname[1], psnapname[1];
+  ASSERT_EQ(-ENOENT, rbd_get_parent_info(parent, ppool, sizeof(ppool),
+	    pname, sizeof(pname), psnapname, sizeof(psnapname)));
   printf("parent has no parent info\n");
 
   // create a snapshot, reopen as the parent we're interested in
diff --git a/src/test/mon/misc.sh b/src/test/mon/misc.sh
deleted file mode 100755
index 1c8caa0..0000000
--- a/src/test/mon/misc.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-source test/mon/mon-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    setup $dir || return 1
-    run_mon $dir a --public-addr 127.0.0.1
-    FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for TEST_function in $FUNCTIONS ; do
-        if ! $TEST_function $dir ; then
-            cat $dir/a/log
-            return 1
-        fi
-    done
-    teardown $dir || return 1
-}
-
-TEST_POOL=rbd
-
-function TEST_osd_pool_get_set() {
-    local dir=$1
-    ./ceph osd dump | grep 'pool 0' | grep hashpspool || return 1
-    ./ceph osd pool set $TEST_POOL hashpspool 0 || return 1
-    ! ./ceph osd dump | grep 'pool 0' | grep hashpspool || return 1
-    ./ceph osd pool set $TEST_POOL hashpspool 1 || return 1
-    ./ceph osd dump | grep 'pool 0' | grep hashpspool || return 1
-    ./ceph osd pool set $TEST_POOL hashpspool false || return 1
-    ! ./ceph osd dump | grep 'pool 0' | grep hashpspool || return 1
-    ./ceph osd pool set $TEST_POOL hashpspool false || return 1
-    # check that setting false twice does not toggle to true (bug)
-    ! ./ceph osd dump | grep 'pool 0' | grep hashpspool || return 1
-    ./ceph osd pool set $TEST_POOL hashpspool true || return 1
-    ./ceph osd dump | grep 'pool 0' | grep hashpspool || return 1
-}
-
-main misc
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/mon/misc.sh"
-# End:
diff --git a/src/test/mon/mkfs.sh b/src/test/mon/mkfs.sh
deleted file mode 100755
index 5e96e8d..0000000
--- a/src/test/mon/mkfs.sh
+++ /dev/null
@@ -1,178 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-set -xe
-PS4='${FUNCNAME[0]}: $LINENO: '
-
-DIR=mkfs
-export CEPH_CONF=/dev/null
-unset CEPH_ARGS
-MON_ID=a
-MON_DIR=$DIR/$MON_ID
-PORT=7451
-MONA=127.0.0.1:$PORT
-TIMEOUT=360
-
-function setup() {
-    teardown
-    mkdir $DIR
-}
-
-function teardown() {
-    kill_daemons
-    rm -fr $DIR
-}
-
-function mon_mkfs() {
-    local fsid=$(uuidgen)
-
-    ./ceph-mon \
-        --id $MON_ID \
-        --fsid $fsid \
-        --osd-pool-default-erasure-code-directory=.libs \
-        --mkfs \
-        --mon-data=$MON_DIR \
-        --mon-initial-members=$MON_ID \
-        --mon-host=$MONA \
-        "$@"
-}
-
-function mon_run() {
-    ./ceph-mon \
-        --id $MON_ID \
-        --chdir= \
-        --osd-pool-default-erasure-code-directory=.libs \
-        --mon-data=$MON_DIR \
-        --log-file=$MON_DIR/log \
-        --mon-cluster-log-file=$MON_DIR/log \
-        --run-dir=$MON_DIR \
-        --pid-file=$MON_DIR/pidfile \
-        --public-addr $MONA \
-        "$@"
-}
-
-function kill_daemons() {
-    for pidfile in $(find $DIR -name pidfile) ; do
-        pid=$(cat $pidfile)
-        for try in 0 1 1 1 2 3 ; do
-            kill $pid || break
-            sleep $try
-        done
-    done
-}
-
-function auth_none() {
-    mon_mkfs --auth-supported=none
-
-    ./ceph-mon \
-        --id $MON_ID \
-        --osd-pool-default-erasure-code-directory=.libs \
-        --mon-data=$MON_DIR \
-        --extract-monmap $MON_DIR/monmap
-
-    [ -f $MON_DIR/monmap ] || return 1
-
-    [ ! -f $MON_DIR/keyring ] || return 1
-
-    mon_run --auth-supported=none
-    
-    timeout $TIMEOUT ./ceph --mon-host $MONA mon stat || return 1
-}
-
-function auth_cephx_keyring() {
-    cat > $DIR/keyring <<EOF
-[mon.]
-	key = AQDUS79S0AF9FRAA2cgRLFscVce0gROn/s9WMg==
-	caps mon = "allow *"
-EOF
-
-    mon_mkfs --keyring=$DIR/keyring
-
-    [ -f $MON_DIR/keyring ] || return 1
-
-    mon_run
-
-    timeout $TIMEOUT ./ceph \
-        --name mon. \
-        --keyring $MON_DIR/keyring \
-        --mon-host $MONA mon stat || return 1
-}
-
-function auth_cephx_key() {
-    local key=$(./ceph-authtool --gen-print-key)
-
-    if mon_mkfs --key='corrupted key' ; then
-        return 1
-    else
-        rm -fr $MON_DIR/store.db
-    fi
-
-    mon_mkfs --key=$key
-
-    [ -f $MON_DIR/keyring ] || return 1
-    grep $key $MON_DIR/keyring
-
-    mon_run
-
-    timeout $TIMEOUT ./ceph \
-        --name mon. \
-        --keyring $MON_DIR/keyring \
-        --mon-host $MONA mon stat || return 1
-}
-
-function makedir() {
-    local toodeep=$MON_DIR/toodeep
-
-    # fail if recursive directory creation is needed
-    ./ceph-mon \
-        --id $MON_ID \
-        --osd-pool-default-erasure-code-directory=.libs \
-        --mkfs \
-        --mon-data=$toodeep 2>&1 | tee $DIR/makedir.log
-    grep 'toodeep.*No such file' $DIR/makedir.log > /dev/null
-    rm $DIR/makedir.log
-
-    # an empty directory does not mean the mon exists
-    mkdir $MON_DIR
-    mon_mkfs --auth-supported=none 2>&1 | tee $DIR/makedir.log
-    ! grep "$MON_DIR already exists" $DIR/makedir.log || return 1
-}
-
-function idempotent() {
-    mon_mkfs --auth-supported=none
-    mon_mkfs --auth-supported=none 2>&1 | tee $DIR/makedir.log
-    grep "'$MON_DIR' already exists" $DIR/makedir.log > /dev/null || return 1
-}
-
-function run() {
-    local actions
-    actions+="makedir "
-    actions+="idempotent "
-    actions+="auth_cephx_key "
-    actions+="auth_cephx_keyring "
-    actions+="auth_none "
-    for action in $actions  ; do
-        setup
-        $action || return 1
-        teardown
-    done
-}
-
-run
-
-# Local Variables:
-# compile-command: "cd ../.. ; make TESTS=test/mon/mkfs.sh check"
-# End:
diff --git a/src/test/mon/mon-handle-forward.sh b/src/test/mon/mon-handle-forward.sh
deleted file mode 100755
index 6f3ea67..0000000
--- a/src/test/mon/mon-handle-forward.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-source test/mon/mon-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    PORT=7451
-    MONA=127.0.0.1:$PORT
-    MONB=127.0.0.1:$(($PORT + 1))
-    (
-        FSID=$(uuidgen) 
-        export CEPH_ARGS
-        CEPH_ARGS+="--fsid=$FSID --auth-supported=none "
-        CEPH_ARGS+="--mon-initial-members=a,b --mon-host=$MONA,$MONB "
-        run_mon $dir a --public-addr $MONA
-        run_mon $dir b --public-addr $MONB
-    )
-
-    timeout 10 ./ceph --mon-host $MONA mon stat || return 1
-    # check that MONB is indeed a peon
-    ./ceph --admin-daemon $dir/b/ceph-mon.b.asok mon_status | 
-       grep '"peon"' || return 1
-    # when the leader ( MONA ) is used, there is no message forwarding
-    ./ceph --mon-host $MONA osd pool create POOL1 12 
-    grep 'mon_command(.*"POOL1"' $dir/a/log 
-    grep 'mon_command(.*"POOL1"' $dir/b/log && return 1
-    # when the peon ( MONB ) is used, the message is forwarded to the leader
-    ./ceph --mon-host $MONB osd pool create POOL2 12 
-    grep 'forward_request.*mon_command(.*"POOL2"' $dir/b/log
-    grep ' forward(mon_command(.*"POOL2"' $dir/a/log 
-    # forwarded messages must retain features from the original connection
-    features=$(sed -n -e 's|.*127.0.0.1:0.*accept features \([0-9][0-9]*\)|\1|p' < \
-        $dir/b/log)
-    grep ' forward(mon_command(.*"POOL2".*con_features '$features $dir/a/log
-}
-
-main mon-handle-forward
-
-# Local Variables:
-# compile-command: "cd ../.. ; make TESTS=test/mon/mon-handle-forward.sh check"
-# End:
diff --git a/src/test/mon/mon-test-helpers.sh b/src/test/mon/mon-test-helpers.sh
index 1766193..052b1ca 100644
--- a/src/test/mon/mon-test-helpers.sh
+++ b/src/test/mon/mon-test-helpers.sh
@@ -42,11 +42,11 @@ function run_mon() {
     ./ceph-mon \
         --id $id \
         --paxos-propose-interval=0.1 \
-        --osd-crush-chooseleaf-type=0 \
         --osd-pool-default-erasure-code-directory=.libs \
         --debug-mon 20 \
         --debug-ms 20 \
         --debug-paxos 20 \
+        --mon-advanced-debug-mode \
         --chdir= \
         --mon-data=$dir \
         --log-file=$dir/log \
diff --git a/src/test/mon/osd-crush.sh b/src/test/mon/osd-crush.sh
deleted file mode 100755
index 56c8573..0000000
--- a/src/test/mon/osd-crush.sh
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-source test/mon/mon-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for TEST_function in $FUNCTIONS ; do
-	setup $dir || return 1
-	run_mon $dir a --public-addr 127.0.0.1
-	if ! $TEST_function $dir ; then
-	  cat $dir/a/log
-	  return 1
-	fi
-	teardown $dir || return 1
-    done
-}
-
-function TEST_crush_rule_create_simple() {
-    local dir=$1
-    ./ceph --format xml osd crush rule dump replicated_ruleset | \
-        egrep '<op>take</op><item>[^<]+</item><item_name>default</item_name>' | \
-        grep '<op>choose_firstn</op><num>0</num><type>osd</type>' || return 1
-    local ruleset=ruleset0
-    local root=host1
-    ./ceph osd crush add-bucket $root host
-    local failure_domain=osd
-    ./ceph osd crush rule create-simple $ruleset $root $failure_domain || return 1
-    ./ceph osd crush rule create-simple $ruleset $root $failure_domain 2>&1 | \
-        grep "$ruleset already exists" || return 1
-    ./ceph --format xml osd crush rule dump $ruleset | \
-        egrep '<op>take</op><item>[^<]+</item><item_name>'$root'</item_name>' | \
-        grep '<op>choose_firstn</op><num>0</num><type>'$failure_domain'</type>' || return 1
-    ./ceph osd crush rule rm $ruleset || return 1
-}
-
-function TEST_crush_rule_dump() {
-    local dir=$1
-    local ruleset=ruleset1
-    ./ceph osd crush rule create-erasure $ruleset || return 1
-    local expected
-    expected="<rule_name>$ruleset</rule_name>"
-    ./ceph --format xml osd crush rule dump $ruleset | grep $expected || return 1
-    expected='"rule_name": "'$ruleset'"'
-    ./ceph osd crush rule dump | grep "$expected" || return 1
-    ! ./ceph osd crush rule dump non_existent_ruleset || return 1
-    ./ceph osd crush rule rm $ruleset || return 1
-}
-
-function TEST_crush_rule_rm() {
-    local ruleset=erasure2
-    ./ceph osd crush rule create-erasure $ruleset default || return 1
-    ./ceph osd crush rule ls | grep $ruleset || return 1
-    ./ceph osd crush rule rm $ruleset || return 1
-    ! ./ceph osd crush rule ls | grep $ruleset || return 1
-}
-
-function TEST_crush_rule_create_erasure() {
-    local dir=$1
-    local ruleset=ruleset3
-    #
-    # create a new ruleset with the default profile, implicitly
-    #
-    ./ceph osd crush rule create-erasure $ruleset || return 1
-    ./ceph osd crush rule create-erasure $ruleset 2>&1 | \
-        grep "$ruleset already exists" || return 1
-    ./ceph --format xml osd crush rule dump $ruleset | \
-        egrep '<op>take</op><item>[^<]+</item><item_name>default</item_name>' | \
-        grep '<op>chooseleaf_indep</op><num>0</num><type>host</type>' || return 1
-    ./ceph osd crush rule rm $ruleset || return 1
-    ! ./ceph osd crush rule ls | grep $ruleset || return 1
-    #
-    # create a new ruleset with the default profile, explicitly
-    #
-    ./ceph osd crush rule create-erasure $ruleset default || return 1
-    ./ceph osd crush rule ls | grep $ruleset || return 1
-    ./ceph osd crush rule rm $ruleset || return 1
-    ! ./ceph osd crush rule ls | grep $ruleset || return 1
-    #
-    # create a new ruleset and the default profile, implicitly
-    #
-    ./ceph osd erasure-code-profile rm default || return 1
-    ! ./ceph osd erasure-code-profile ls | grep default || return 1
-    ./ceph osd crush rule create-erasure $ruleset || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1
-    grep 'profile default set' $dir/a/log || return 1
-    ./ceph osd erasure-code-profile ls | grep default || return 1
-    ./ceph osd crush rule rm $ruleset || return 1
-    ! ./ceph osd crush rule ls | grep $ruleset || return 1
-}
-
-function check_ruleset_id_match_rule_id() {
-    local rule_name=$1
-    rule_id=`./ceph osd crush rule dump $rule_name | grep "\"rule_id\":" | awk -F ":|," '{print int($2)}'`
-    ruleset_id=`./ceph osd crush rule dump $rule_name | grep "\"ruleset\":"| awk -F ":|," '{print int($2)}'`
-    test $ruleset_id = $rule_id || return 1
-}
-
-function generate_manipulated_rules() {
-    local dir=$1
-    ./ceph osd crush add-bucket $root host
-    ./ceph osd crush rule create-simple test_rule1 $root osd firstn || return 1
-    ./ceph osd crush rule create-simple test_rule2 $root osd firstn || return 1
-    ./ceph osd getcrushmap -o $dir/original_map
-    ./crushtool -d $dir/original_map -o $dir/decoded_original_map
-    #manipulate the rulesets , to make the rule_id != ruleset_id
-    sed -i 's/ruleset 0/ruleset 3/' $dir/decoded_original_map
-    sed -i 's/ruleset 2/ruleset 0/' $dir/decoded_original_map
-    sed -i 's/ruleset 1/ruleset 2/' $dir/decoded_original_map
-
-    ./crushtool -c $dir/decoded_original_map -o $dir/new_map
-    ./ceph osd setcrushmap -i $dir/new_map
-
-    ./ceph osd crush rule dump
-}
-
-function TEST_crush_ruleset_match_rule_when_creating() {
-    local dir=$1
-    local root=host1
-
-    generate_manipulated_rules $dir
-
-    ./ceph osd crush rule create-simple special_rule_simple $root osd firstn || return 1
-
-    ./ceph osd crush rule dump
-    #show special_rule_simple has same rule_id and ruleset_id
-    check_ruleset_id_match_rule_id special_rule_simple || return 1
-}
-
-function TEST_add_ruleset_failed() {
-    local dir=$1
-    local root=host1
-
-    ./ceph osd crush add-bucket $root host
-    ./ceph osd crush rule create-simple test_rule1 $root osd firstn || return 1
-    ./ceph osd crush rule create-simple test_rule2 $root osd firstn || return 1
-    ./ceph osd getcrushmap > $dir/crushmap || return 1
-    ./crushtool --decompile $dir/crushmap > $dir/crushmap.txt || return 1
-    for i in $(seq 3 255)
-        do
-            cat <<EOF
-rule test_rule$i {
-	ruleset $i
-	type replicated
-	min_size 1
-	max_size 10
-	step take $root
-	step choose firstn 0 type osd
-	step emit
-}
-EOF
-    done >> $dir/crushmap.txt
-    ./crushtool --compile $dir/crushmap.txt -o $dir/crushmap || return 1
-    ./ceph osd setcrushmap -i $dir/crushmap  || return 1
-    ./ceph osd crush rule create-simple test_rule_nospace $root osd firstn 2>&1 | grep "Error ENOSPC" || return 1
-
-}
-
-main osd-crush
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/mon/osd-crush.sh"
-# End:
diff --git a/src/test/mon/osd-erasure-code-profile.sh b/src/test/mon/osd-erasure-code-profile.sh
deleted file mode 100755
index fd0cf73..0000000
--- a/src/test/mon/osd-erasure-code-profile.sh
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-source test/mon/mon-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    local id=a
-    call_TEST_functions $dir $id --public-addr 127.0.0.1 || return 1
-}
-
-function SHARE_MON_TEST_set() {
-    local dir=$1
-    local id=$2
-
-    local profile=myprofile
-    #
-    # no key=value pairs : use the default configuration
-    #
-    ./ceph osd erasure-code-profile set $profile 2>&1 || return 1
-    ./ceph osd erasure-code-profile get $profile | \
-        grep plugin=jerasure || return 1
-    ./ceph osd erasure-code-profile rm $profile
-    #
-    # key=value pairs override the default
-    #
-    ./ceph osd erasure-code-profile set $profile \
-        key=value plugin=example || return 1
-    ./ceph osd erasure-code-profile get $profile | \
-        grep -e key=value -e plugin=example || return 1
-    #
-    # --force is required to override an existing profile
-    #
-    ! ./ceph osd erasure-code-profile set $profile > $dir/out 2>&1 || return 1
-    grep 'will not override' $dir/out || return 1
-    ./ceph osd erasure-code-profile set $profile key=other --force || return 1
-    ./ceph osd erasure-code-profile get $profile | \
-        grep key=other || return 1
-
-    ./ceph osd erasure-code-profile rm $profile # cleanup
-}
-
-function SHARE_MON_TEST_ls() {
-    local dir=$1
-    local id=$2
-
-    local profile=myprofile
-    ! ./ceph osd erasure-code-profile ls | grep $profile || return 1
-    ./ceph osd erasure-code-profile set $profile 2>&1 || return 1
-    ./ceph osd erasure-code-profile ls | grep $profile || return 1
-    ./ceph --format xml osd erasure-code-profile ls | \
-        grep "<profile>$profile</profile>" || return 1
-
-    ./ceph osd erasure-code-profile rm $profile # cleanup
-}
-
-function SHARE_MON_TEST_rm() {
-    local dir=$1
-    local id=$2
-
-    local profile=myprofile
-    ./ceph osd erasure-code-profile set $profile 2>&1 || return 1
-    ./ceph osd erasure-code-profile ls | grep $profile || return 1
-    ./ceph osd erasure-code-profile rm $profile || return 1
-    ! ./ceph osd erasure-code-profile ls | grep $profile || return 1
-    ./ceph osd erasure-code-profile rm WRONG 2>&1 | \
-        grep "WRONG does not exist" || return 1
-
-    ./ceph osd erasure-code-profile set $profile || return 1
-    ./ceph osd pool create poolname 12 12 erasure $profile || return 1
-    ! ./ceph osd erasure-code-profile rm $profile > $dir/out 2>&1 || return 1
-    grep "poolname.*using.*$profile" $dir/out || return 1
-    ./ceph osd pool delete poolname poolname --yes-i-really-really-mean-it || return 1
-    ./ceph osd erasure-code-profile rm $profile || return 1
-
-    ./ceph osd erasure-code-profile rm $profile # cleanup
-}
-
-function SHARE_MON_TEST_get() {
-    local dir=$1
-    local id=$2
-
-    local default_profile=default
-    ./ceph osd erasure-code-profile get $default_profile | \
-        grep plugin=jerasure || return 1
-    ./ceph --format xml osd erasure-code-profile get $default_profile | \
-        grep '<plugin>jerasure</plugin>' || return 1
-    ! ./ceph osd erasure-code-profile get WRONG > $dir/out 2>&1 || return 1
-    grep -q "unknown erasure code profile 'WRONG'" $dir/out || return 1
-}
-
-function TEST_format_invalid() {
-    local dir=$1
-
-    local profile=profile
-    # osd_pool_default_erasure-code-profile is
-    # valid JSON but not of the expected type
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_default_erasure-code-profile 1
-    ! ./ceph osd erasure-code-profile set $profile > $dir/out 2>&1 || return 1
-    cat $dir/out
-    grep 'must be a JSON object' $dir/out || return 1
-}
-
-function TEST_format_json() {
-    local dir=$1
-
-    # osd_pool_default_erasure-code-profile is JSON
-    expected='"plugin":"example"'
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_default_erasure-code-profile "{$expected}"
-    ./ceph --format json osd erasure-code-profile get default | \
-        grep "$expected" || return 1
-}
-
-function TEST_format_plain() {
-    local dir=$1
-
-    # osd_pool_default_erasure-code-profile is plain text
-    expected='"plugin":"example"'
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_default_erasure-code-profile "plugin=example"
-    ./ceph --format json osd erasure-code-profile get default | \
-        grep "$expected" || return 1
-}
-
-main osd-erasure-code-profile
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/mon/osd-erasure-code-profile.sh"
-# End:
diff --git a/src/test/mon/osd-pool-create.sh b/src/test/mon/osd-pool-create.sh
deleted file mode 100755
index cbcd65c..0000000
--- a/src/test/mon/osd-pool-create.sh
+++ /dev/null
@@ -1,227 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
-# Copyright (C) 2014 Red Hat <contact at redhat.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-source test/mon/mon-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for TEST_function in $FUNCTIONS ; do
-        setup $dir || return 1
-        $TEST_function $dir || return 1
-        teardown $dir || return 1
-    done
-}
-
-function TEST_default_deprectated_0() {
-    local dir=$1
-    # explicitly set the default crush rule
-    expected=66
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_default_crush_replicated_ruleset $expected
-    ./ceph --format json osd dump | grep '"crush_ruleset":'$expected
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1
-    ! grep "osd_pool_default_crush_rule is deprecated " $dir/a/log || return 1
-}
-
-function TEST_default_deprectated_1() {
-    local dir=$1
-    # explicitly set the default crush rule using deprecated option
-    expected=55
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_default_crush_rule $expected
-    ./ceph --format json osd dump | grep '"crush_ruleset":'$expected
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1
-    grep "osd_pool_default_crush_rule is deprecated " $dir/a/log || return 1
-}
-
-function TEST_default_deprectated_2() {
-    local dir=$1
-    expected=77
-    unexpected=33
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_default_crush_rule $expected \
-        --osd_pool_default_crush_replicated_ruleset $unexpected
-    ./ceph --format json osd dump | grep '"crush_ruleset":'$expected
-    ! ./ceph --format json osd dump | grep '"crush_ruleset":'$unexpected || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1
-    grep "osd_pool_default_crush_rule is deprecated " $dir/a/log || return 1
-}
-
-# Before http://tracker.ceph.com/issues/8307 the invalid profile was created
-function TEST_erasure_invalid_profile() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-    local poolname=pool_erasure
-    local notaprofile=not-a-valid-erasure-code-profile
-    ! ./ceph osd pool create $poolname 12 12 erasure $notaprofile || return 1
-    ! ./ceph osd erasure-code-profile ls | grep $notaprofile || return 1
-}
-
-function TEST_erasure_crush_rule() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-    # 
-    # choose the crush ruleset used with an erasure coded pool
-    #
-    local crush_ruleset=myruleset
-    ! ./ceph osd crush rule ls | grep $crush_ruleset || return 1
-    ./ceph osd crush rule create-erasure $crush_ruleset
-    ./ceph osd crush rule ls | grep $crush_ruleset
-    local poolname
-    poolname=pool_erasure1
-    ! ./ceph --format json osd dump | grep '"crush_ruleset":1' || return 1
-    ./ceph osd pool create $poolname 12 12 erasure default $crush_ruleset
-    ./ceph --format json osd dump | grep '"crush_ruleset":1' || return 1
-    #
-    # a crush ruleset by the name of the pool is implicitly created
-    #
-    poolname=pool_erasure2
-    ./ceph osd erasure-code-profile set myprofile
-    ./ceph osd pool create $poolname 12 12 erasure myprofile
-    ./ceph osd crush rule ls | grep $poolname || return 1
-    #
-    # a non existent crush ruleset given in argument is an error
-    # http://tracker.ceph.com/issues/9304
-    #
-    poolname=pool_erasure3
-    ! ./ceph osd pool create $poolname 12 12 erasure myprofile INVALIDRULESET || return 1
-}
-
-function TEST_erasure_code_profile_default() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-    ./ceph osd erasure-code-profile rm default || return 1
-    ! ./ceph osd erasure-code-profile ls | grep default || return 1
-    ./ceph osd pool create $poolname 12 12 erasure default
-    ./ceph osd erasure-code-profile ls | grep default || return 1
-}
-
-function TEST_erasure_crush_stripe_width() {
-    local dir=$1
-    # the default stripe width is used to initialize the pool
-    run_mon $dir a --public-addr 127.0.0.1
-    stripe_width=$(./ceph-conf --show-config-value osd_pool_erasure_code_stripe_width)
-    ./ceph osd pool create pool_erasure 12 12 erasure
-    ./ceph --format json osd dump | tee $dir/osd.json
-    grep '"stripe_width":'$stripe_width $dir/osd.json > /dev/null || return 1
-}
-
-function TEST_erasure_crush_stripe_width_padded() {
-    local dir=$1
-    # setting osd_pool_erasure_code_stripe_width modifies the stripe_width
-    # and it is padded as required by the default plugin
-    profile+=" plugin=jerasure"
-    profile+=" technique=reed_sol_van"
-    k=4
-    profile+=" k=$k"
-    profile+=" m=2"
-    expected_chunk_size=2048
-    actual_stripe_width=$(($expected_chunk_size * $k))
-    desired_stripe_width=$(($actual_stripe_width - 1))
-    run_mon $dir a --public-addr 127.0.0.1 \
-        --osd_pool_erasure_code_stripe_width $desired_stripe_width \
-        --osd_pool_default_erasure_code_profile "$profile"
-    ./ceph osd pool create pool_erasure 12 12 erasure
-    ./ceph osd dump | tee $dir/osd.json
-    grep "stripe_width $actual_stripe_width" $dir/osd.json > /dev/null || return 1
-}
-
-function TEST_erasure_code_pool() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-    ./ceph --format json osd dump > $dir/osd.json
-    local expected='"erasure_code_profile":"default"'
-    ! grep "$expected" $dir/osd.json || return 1
-    ./ceph osd pool create erasurecodes 12 12 erasure
-    ./ceph --format json osd dump | tee $dir/osd.json
-    grep "$expected" $dir/osd.json > /dev/null || return 1
-
-    ./ceph osd pool create erasurecodes 12 12 erasure 2>&1 | \
-        grep 'already exists' || return 1
-    ./ceph osd pool create erasurecodes 12 12 2>&1 | \
-        grep 'cannot change to type replicated' || return 1
-}
-
-function TEST_replicated_pool_with_ruleset() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-    local ruleset=ruleset0
-    local root=host1
-    ./ceph osd crush add-bucket $root host
-    local failure_domain=osd
-    local poolname=mypool
-    ./ceph osd crush rule create-simple $ruleset $root $failure_domain || return 1
-    ./ceph osd crush rule ls | grep $ruleset
-    ./ceph osd pool create $poolname 12 12 replicated $ruleset 2>&1 | \
-        grep "pool 'mypool' created" || return 1
-    rule_id=`./ceph osd crush rule dump $ruleset | grep "rule_id" | awk -F[' ':,] '{print $4}'`
-    ./ceph osd pool get $poolname crush_ruleset  2>&1 | \
-        grep "crush_ruleset: $rule_id" || return 1
-    #non-existent crush ruleset
-    ./ceph osd pool create newpool 12 12 replicated non-existent 2>&1 | \
-        grep "doesn't exist" || return 1
-}
-
-function TEST_erasure_code_pool_lrc() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-
-    ./ceph osd erasure-code-profile set LRCprofile \
-             plugin=lrc \
-             mapping=DD_ \
-             layers='[ [ "DDc", "" ] ]' || return 1
-
-    ./ceph --format json osd dump > $dir/osd.json
-    local expected='"erasure_code_profile":"LRCprofile"'
-    local poolname=erasurecodes
-    ! grep "$expected" $dir/osd.json || return 1
-    ./ceph osd pool create $poolname 12 12 erasure LRCprofile
-    ./ceph --format json osd dump | tee $dir/osd.json
-    grep "$expected" $dir/osd.json > /dev/null || return 1
-    ./ceph osd crush rule ls | grep $poolname || return 1
-}
-
-function TEST_replicated_pool() {
-    local dir=$1
-    run_mon $dir a --public-addr 127.0.0.1
-    ./ceph osd pool create replicated 12 12 replicated replicated_ruleset 2>&1 | \
-        grep "pool 'replicated' created" || return 1
-    ./ceph osd pool create replicated 12 12 replicated replicated_ruleset 2>&1 | \
-        grep 'already exists' || return 1
-    ! ./ceph osd pool create replicated0 12 12 replicated INVALIDRULESET
-    # default is replicated
-    ./ceph osd pool create replicated1 12 12 2>&1 | \
-        grep "pool 'replicated1' created" || return 1
-    # default is replicated, pgp_num = pg_num
-    ./ceph osd pool create replicated2 12 2>&1 | \
-        grep "pool 'replicated2' created" || return 1
-    ./ceph osd pool create replicated 12 12 erasure 2>&1 | \
-        grep 'cannot change to type erasure' || return 1
-}
-
-
-main osd-pool-create
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/mon/osd-pool-create.sh"
-# End:
diff --git a/src/test/mon/test-mon-msg.cc b/src/test/mon/test-mon-msg.cc
deleted file mode 100644
index 6961232..0000000
--- a/src/test/mon/test-mon-msg.cc
+++ /dev/null
@@ -1,337 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
-* Ceph - scalable distributed file system
-*
-* Copyright (C) 2014 Red Hat
-*
-* This is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License version 2.1, as published by the Free Software
-* Foundation. See file COPYING.
-*/
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <time.h>
-#include <stdlib.h>
-#include <map>
-
-#include "global/global_init.h"
-#include "global/global_context.h"
-#include "common/ceph_argparse.h"
-#include "common/dout.h"
-#include "common/debug.h"
-#include "common/Cond.h"
-#include "common/Mutex.h"
-#include "common/Timer.h"
-#include "common/errno.h"
-#include "mon/MonClient.h"
-#include "msg/Dispatcher.h"
-#include "include/err.h"
-#include <boost/scoped_ptr.hpp>
-
-#include "gtest/gtest.h"
-
-#include "common/config.h"
-#include "include/assert.h"
-
-#include "messages/MMonProbe.h"
-#include "messages/MRoute.h"
-#include "messages/MGenericMessage.h"
-#include "messages/MMonJoin.h"
-
-#define dout_subsys ceph_subsys_
-#undef dout_prefix
-#define dout_prefix *_dout << "test-mon-msg "
-
-class MonClientHelper : public Dispatcher
-{
-protected:
-  CephContext *cct;
-  Messenger *msg;
-  MonClient monc;
-
-  Mutex lock;
-
-  set<int> wanted;
-
-public:
-
-  MonClientHelper(CephContext *cct_)
-    : Dispatcher(cct_),
-      cct(cct_),
-      monc(cct_),
-      lock("mon-msg-test::lock")
-  { }
-
-
-  int post_init() {
-    dout(1) << __func__ << dendl;
-    if (!msg)
-      return -EINVAL;
-    msg->add_dispatcher_tail(this);
-    return 0;
-  }
-
-  int init_messenger() {
-    dout(1) << __func__ << dendl;
-
-    msg = Messenger::create(cct, entity_name_t::CLIENT(-1),
-                            "test-mon-msg", 0);
-    assert(msg != NULL);
-    msg->set_default_policy(Messenger::Policy::lossy_client(0,0));
-    dout(0) << __func__ << " starting messenger at "
-            << msg->get_myaddr() << dendl;
-    msg->start();
-    return 0;
-  }
-
-  int init_monc() {
-    dout(1) << __func__ << dendl;
-    assert(msg != NULL);
-    int err = monc.build_initial_monmap();
-    if (err < 0) {
-      derr << __func__ << " error building monmap: "
-           << cpp_strerror(err) << dendl;
-      return err;
-    }
-
-    monc.set_messenger(msg);
-    msg->add_dispatcher_head(&monc);
-
-    monc.set_want_keys(CEPH_ENTITY_TYPE_MON);
-    err = monc.init();
-    if (err < 0) {
-      derr << __func__ << " monc init failed: "
-           << cpp_strerror(err) << dendl;
-      goto fail;
-    }
-
-    err = monc.authenticate();
-    if (err < 0) {
-      derr << __func__ << " monc auth failed: "
-           << cpp_strerror(err) << dendl;
-      goto fail_monc;
-    }
-    monc.wait_auth_rotating(30.0);
-    monc.renew_subs();
-    dout(0) << __func__ << " finished" << dendl;
-    return 0;
-
-fail_monc:
-    derr << __func__ << " failing monc" << dendl;
-    monc.shutdown();
-fail:
-    return err;
-  }
-
-  void shutdown_messenger() {
-    dout(0) << __func__ << dendl;
-    msg->shutdown();
-    msg->wait();
-  }
-
-  void shutdown_monc() {
-    dout(0) << __func__ << dendl;
-    monc.shutdown();
-  }
-
-  void shutdown() {
-    dout(0) << __func__ << dendl;
-    shutdown_monc();
-    shutdown_messenger();
-  }
-
-  MonMap *get_monmap() {
-    return &monc.monmap;
-  }
-
-  int init() {
-    int err = init_messenger();
-    if (err < 0)
-      goto fail;
-    err = init_monc();
-    if (err < 0)
-      goto fail_msgr;
-    err = post_init();
-    if (err < 0)
-      goto fail_monc;
-    return 0;
-fail_monc:
-    shutdown_monc();
-fail_msgr:
-    shutdown_messenger();
-fail:
-    return err;
-  }
-
-  virtual void handle_wanted(Message *m) { }
-
-  bool handle_message(Message *m) {
-    dout(1) << __func__ << " " << *m << dendl;
-    if (!is_wanted(m)) {
-      dout(10) << __func__ << " not wanted" << dendl;
-      return false;
-    }
-    handle_wanted(m);
-    m->put();
-
-    return true;
-  }
-
-  bool ms_dispatch(Message *m) {
-    return handle_message(m);  
-  }
-  void ms_handle_connect(Connection *con) { }
-  void ms_handle_remote_reset(Connection *con) { }
-  bool ms_handle_reset(Connection *con) { return false; }
-
-  bool is_wanted(Message *m) {
-    dout(20) << __func__ << " " << *m << " type " << m->get_type() << dendl;
-    return (wanted.find(m->get_type()) != wanted.end());
-  }
-
-  void add_wanted(int t) {
-    dout(20) << __func__ << " type " << t << dendl;
-    wanted.insert(t);
-  }
-
-  void rm_wanted(int t) {
-    dout(20) << __func__ << " type " << t << dendl;
-    wanted.erase(t);
-  }
-
-  void send_message(Message *m) {
-    dout(15) << __func__ << " " << *m << dendl;
-    monc.send_mon_message(m);
-  }
-
-  void wait() { msg->wait(); }
-};
-
-class MonMsgTest : public MonClientHelper,
-                   public ::testing::Test
-{
-protected:
-  int reply_type;
-  Message *reply_msg;
-  Mutex lock;
-  Cond cond;
-
-  MonMsgTest() :
-    MonClientHelper(g_ceph_context),
-    lock("lock") { }
-
-public:
-  virtual void SetUp() {
-    reply_type = -1;
-    if (reply_msg) {
-      reply_msg->put();
-      reply_msg = NULL;
-    }
-    ASSERT_EQ(init(), 0);
-  }
-
-  virtual void TearDown() {
-    shutdown();
-    if (reply_msg) {
-      reply_msg->put();
-      reply_msg = NULL;
-    }
-  }
-
-  void handle_wanted(Message *m) {
-    lock.Lock();
-    // caller will put() after they call us, so hold on to a ref
-    m->get();
-    reply_msg = m;
-    cond.Signal();
-    lock.Unlock();
-  }
-
-  Message *send_wait_reply(Message *m, int t, double timeout=30.0) {
-    lock.Lock();
-    reply_type = t;
-    add_wanted(t);
-    send_message(m);
-
-    int err = 0;
-    if (timeout > 0) {
-      utime_t cond_timeout;
-      cond_timeout.set_from_double(timeout);
-      utime_t s = ceph_clock_now(g_ceph_context);
-      err = cond.WaitInterval(g_ceph_context, lock, cond_timeout);
-      utime_t e = ceph_clock_now(g_ceph_context);
-      dout(20) << __func__ << " took " << (e-s) << " seconds" << dendl;
-    } else {
-      err = cond.Wait(lock);
-    }
-    rm_wanted(t);
-    lock.Unlock();
-    if (err > 0) {
-      dout(20) << __func__ << " error: " << cpp_strerror(err) << dendl;
-      return (Message*)((long)-err);
-    }
-
-    if (!reply_msg)
-      dout(20) << __func__ << " reply_msg is NULL" << dendl;
-    else
-      dout(20) << __func__ << " reply_msg " << *reply_msg << dendl;
-    return reply_msg;
-  }
-};
-
-TEST_F(MonMsgTest, MMonProbeTest)
-{
-  Message *m = new MMonProbe(get_monmap()->fsid,
-                        MMonProbe::OP_PROBE, "b", false);
-  Message *r = send_wait_reply(m, MSG_MON_PROBE);
-  ASSERT_NE(IS_ERR(r), 0);
-  ASSERT_EQ(PTR_ERR(r), -ETIMEDOUT);
-}
-
-TEST_F(MonMsgTest, MRouteTest)
-{
-  Message *payload = new MGenericMessage(CEPH_MSG_SHUTDOWN);
-  MRoute *m = new MRoute;
-  m->msg = payload;
-  m->dest = msg->get_myinst();
-  Message *r = send_wait_reply(m, CEPH_MSG_SHUTDOWN);
-  // we want an error
-  ASSERT_NE(IS_ERR(r), 0);
-  ASSERT_EQ(PTR_ERR(r), -ETIMEDOUT);
-}
-
-/* MMonScrub and MMonSync have other safeguards in place that prevent
- * us from actually receiving a reply even if the message is handled
- * by the monitor due to lack of cap checking.
- */
-TEST_F(MonMsgTest, MMonJoin)
-{
-  Message *m = new MMonJoin(get_monmap()->fsid, string("client"),
-                            msg->get_myaddr());
-  send_wait_reply(m, MSG_MON_PAXOS, 10.0);
-
-  int r = monc.get_monmap();
-  ASSERT_EQ(r, 0);
-  ASSERT_FALSE(monc.monmap.contains("client"));
-}
-
-int main(int argc, char *argv[])
-{
-  vector<const char*> def_args;
-  vector<const char*> args;
-  argv_to_vec(argc, (const char **)argv, args);
-
-  global_init(&def_args, args,
-	      CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY,
-	      0);
-  common_init_finish(g_ceph_context);
-  g_ceph_context->_conf->apply_changes(NULL);
-  ::testing::InitGoogleTest(&argc, argv);
-
-  return RUN_ALL_TESTS();
-}
-
diff --git a/src/test/mon/test_mon_workloadgen.cc b/src/test/mon/test_mon_workloadgen.cc
index a09676e..3c6ff56 100644
--- a/src/test/mon/test_mon_workloadgen.cc
+++ b/src/test/mon/test_mon_workloadgen.cc
@@ -32,6 +32,7 @@
 
 #include "osd/osd_types.h"
 #include "osd/OSD.h"
+#include "osd/OSDMap.h"
 #include "osdc/Objecter.h"
 #include "mon/MonClient.h"
 #include "msg/Dispatcher.h"
@@ -183,6 +184,7 @@ class TestStub : public Dispatcher
 
 class ClientStub : public TestStub
 {
+  OSDMap osdmap;
   ObjecterRef objecter;
   rngen_t gen;
 
@@ -224,7 +226,8 @@ class ClientStub : public TestStub
 
   virtual int _shutdown() {
     if (objecter) {
-      objecter->shutdown();
+      objecter->shutdown_locked();
+      objecter->shutdown_unlocked();
     }
     return 0;
   }
@@ -253,12 +256,12 @@ class ClientStub : public TestStub
     dout(10) << "ClientStub::" << __func__ << " starting messenger at "
 	    << messenger->get_myaddr() << dendl;
 
-    objecter.reset(new Objecter(cct, messenger.get(), &monc, 0, 0));
+    objecter.reset(new Objecter(cct, messenger.get(), &monc, &osdmap,
+				lock, timer, 0, 0));
     assert(objecter.get() != NULL);
     objecter->set_balanced_budget();
 
     monc.set_messenger(messenger.get());
-    objecter->init();
     messenger->add_dispatcher_head(this);
     messenger->start();
     monc.set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD);
@@ -279,18 +282,22 @@ class ClientStub : public TestStub
     }
     monc.wait_auth_rotating(30.0);
 
-    objecter->set_client_incarnation(0);
-    objecter->start();
+    objecter->init_unlocked();
 
     lock.Lock();
     timer.init();
+    objecter->set_client_incarnation(0);
+    objecter->init_locked();
     monc.renew_subs();
 
-    lock.Unlock();
-
-    objecter->wait_for_osd_map();
+    while (osdmap.get_epoch() == 0) {
+      dout(1) << "ClientStub::" << __func__ << " waiting for osdmap" << dendl;
+      cond.Wait(lock);
+    }
 
+    lock.Unlock();
     dout(10) << "ClientStub::" << __func__ << " done" << dendl;
+
     return 0;
   }
 };
@@ -706,7 +713,7 @@ class OSDStub : public TestStub
       e.who = messenger->get_myinst();
       e.stamp = now;
       e.seq = seq++;
-      e.prio = CLOG_DEBUG;
+      e.type = CLOG_DEBUG;
       e.msg = "OSDStub::op_log";
       m->entries.push_back(e);
     }
diff --git a/src/test/objectstore/DeterministicOpSequence.cc b/src/test/objectstore/DeterministicOpSequence.cc
index 2d12d34..09c9f5e 100644
--- a/src/test/objectstore/DeterministicOpSequence.cc
+++ b/src/test/objectstore/DeterministicOpSequence.cc
@@ -26,6 +26,7 @@
 #include <boost/lexical_cast.hpp>
 
 #include "DeterministicOpSequence.h"
+
 #include "common/config.h"
 #include "include/assert.h"
 
@@ -79,9 +80,6 @@ bool DeterministicOpSequence::run_one_op(int op, rngen_t& gen)
   case DSOP_SET_ATTRS:
     ok = do_set_attrs(gen);
     break;
-  case DSOP_COLL_CREATE:
-    ok = do_coll_create(gen);
-    break;
   default:
     assert(0 == "bad op");
   }
@@ -440,47 +438,6 @@ bool DeterministicOpSequence::do_coll_add(rngen_t& gen)
   return true;
 }
 
-bool DeterministicOpSequence::do_coll_create(rngen_t& gen)
-{
-  boost::uniform_int<> pg_num_range(0, 512);
-  int pg_num = pg_num_range(gen);
-
-  // Assume there is 7 OSDs in total, the PGs are evenly distributed across those OSDs
-  int pgs = pg_num / 7;
-
-  boost::uniform_int<> num_objs_range(1, 1024);
-  int num_objs = num_objs_range(gen);
-
-  int pool_id = get_next_pool_id();
-  std::set<int> pg_created;
-  for (int i = 0; i < pgs; i++) {
-    boost::uniform_int<> pg_range(0, pg_num - 1);
-    int pg_id = pg_range(gen);
-    if (pg_created.count(pg_id) > 0)
-      continue;
-    char buf[100];
-    snprintf(buf, 100, "%d.%x_head", pool_id, pg_id);
-    _do_coll_create(coll_t(buf), (uint32_t) pg_num, (uint64_t) num_objs);
-    pg_created.insert(pg_id);
-  }
-  return true;
-}
-
-void DeterministicOpSequence::_do_coll_create(coll_t cid, uint32_t pg_num, uint64_t num_objs)
-{
-  ObjectStore::Transaction t;
-  note_txn(&t);
-  t.create_collection(cid);
-  bufferlist hint;
-  ::encode(pg_num, hint);
-  ::encode(num_objs, hint);
-  t.collection_hint(cid, ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS, hint);
-  dout(0) << "Give collection: " << cid << " a hint, pg_num is: " << pg_num << ", num_objs is: "
-    << num_objs << dendl;
-
-  m_store->apply_transaction(t);
-}
-
 void DeterministicOpSequence::_do_touch(coll_t coll, hobject_t& obj)
 {
   ObjectStore::Transaction t;
diff --git a/src/test/objectstore/DeterministicOpSequence.h b/src/test/objectstore/DeterministicOpSequence.h
index 6d4d9ba..1980c98 100644
--- a/src/test/objectstore/DeterministicOpSequence.h
+++ b/src/test/objectstore/DeterministicOpSequence.h
@@ -42,10 +42,9 @@ class DeterministicOpSequence : public TestObjectStoreState {
     DSOP_COLL_RENAME = 5,
     DSOP_COLL_ADD = 6,
     DSOP_SET_ATTRS = 7,
-    DSOP_COLL_CREATE = 8,
 
     DSOP_FIRST = DSOP_TOUCH,
-    DSOP_LAST = DSOP_COLL_CREATE,
+    DSOP_LAST = DSOP_SET_ATTRS,
   };
 
   int32_t txn;
@@ -67,7 +66,6 @@ class DeterministicOpSequence : public TestObjectStoreState {
   bool do_coll_rename(rngen_t& gen);
   bool do_coll_add(rngen_t& gen);
   bool do_set_attrs(rngen_t& gen);
-  bool do_coll_create(rngen_t& gen);
 
   virtual void _do_touch(coll_t coll, hobject_t& obj);
   virtual void _do_remove(coll_t coll, hobject_t& obj);
@@ -84,7 +82,6 @@ class DeterministicOpSequence : public TestObjectStoreState {
       uint64_t dstoff, bufferlist& bl);
   virtual void _do_coll_add(coll_t orig_coll, coll_t new_coll, hobject_t& obj);
   virtual void _do_coll_rename(coll_t orig_coll, coll_t new_coll);
-  virtual void _do_coll_create(coll_t cid, uint32_t pg_num, uint64_t num_objs);
 
   int _gen_coll_id(rngen_t& gen);
   int _gen_obj_id(rngen_t& gen);
diff --git a/src/test/objectstore/TestObjectStoreState.cc b/src/test/objectstore/TestObjectStoreState.cc
index e21e8d9..37f99c7 100644
--- a/src/test/objectstore/TestObjectStoreState.cc
+++ b/src/test/objectstore/TestObjectStoreState.cc
@@ -54,13 +54,6 @@ void TestObjectStoreState::init(int colls, int objs)
 
     t = new ObjectStore::Transaction;
     t->create_collection(entry->m_coll);
-    bufferlist hint;
-    uint32_t pg_num = colls;
-    uint64_t num_objs = uint64_t(objs / colls);
-    ::encode(pg_num, hint);
-    ::encode(num_objs, hint);
-    t->collection_hint(entry->m_coll, ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS, hint);
-    dout(5) << "give collection hint, number of objects per collection: " << num_objs << dendl;
     t->touch(META_COLL, entry->m_meta_obj);
 
     for (int i = 0; i < objs; i++) {
diff --git a/src/test/objectstore/TestObjectStoreState.h b/src/test/objectstore/TestObjectStoreState.h
index fffa243..dad2aab 100644
--- a/src/test/objectstore/TestObjectStoreState.h
+++ b/src/test/objectstore/TestObjectStoreState.h
@@ -91,17 +91,14 @@ public:
 
   coll_entry_t *get_coll(int key, bool erase = false);
   coll_entry_t *get_coll_at(int pos, bool erase = false);
-  int get_next_pool_id() { return m_next_pool++; }
 
  private:
   static const int m_default_num_colls = 30;
-  // The pool ID used for collection creation, ID 0 is preserve for other tests
-  int m_next_pool;
 
  public:
   TestObjectStoreState(ObjectStore *store) :
     m_next_coll_nr(0), m_num_objs_per_coll(10), m_num_objects(0),
-    m_max_in_flight(0), m_finished_lock("Finished Lock"), m_next_pool(1) {
+    m_max_in_flight(0), m_finished_lock("Finished Lock") {
     m_in_flight.set(0);
     m_store.reset(store);
   }
diff --git a/src/test/objectstore/chain_xattr.cc b/src/test/objectstore/chain_xattr.cc
index 1b7b17a..8346c02 100644
--- a/src/test/objectstore/chain_xattr.cc
+++ b/src/test/objectstore/chain_xattr.cc
@@ -182,7 +182,6 @@ TEST(chain_xattr, listxattr) {
   ASSERT_EQ(0, chain_removexattr(file, name1.c_str()));
   ASSERT_EQ(0, chain_removexattr(file, name2.c_str()));
 
-  free(expected);
   ::unlink(file);
 }
 
diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc
index 38c7b30..7c5dc58 100644
--- a/src/test/objectstore/store_test.cc
+++ b/src/test/objectstore/store_test.cc
@@ -75,15 +75,6 @@ bool sorted(const vector<ghobject_t> &in) {
   return true;
 }
 
-TEST_P(StoreTest, collect_metadata) {
-  map<string,string> pm;
-  store->collect_metadata(&pm);
-  if (GetParam() == string("filestore")) {
-    ASSERT_NE(pm.count("filestore_backend"), 0u);
-    ASSERT_NE(pm.count("filestore_f_type"), 0u);
-  }
-}
-
 TEST_P(StoreTest, SimpleColTest) {
   coll_t cid = coll_t("initial");
   int r = 0;
@@ -117,60 +108,6 @@ TEST_P(StoreTest, SimpleColTest) {
   }
 }
 
-TEST_P(StoreTest, SimpleColPreHashTest) {
-  // Firstly we will need to revert the value making sure
-  // collection hint actually works
-  int merge_threshold = g_ceph_context->_conf->filestore_merge_threshold;
-  std::ostringstream oss;
-  if (merge_threshold > 0) {
-    oss << "-" << merge_threshold;
-    g_ceph_context->_conf->set_val("filestore_merge_threshold", oss.str().c_str());
-  }
-
-  uint32_t pg_num = 128;
-
-  boost::uniform_int<> pg_id_range(0, pg_num);
-  gen_type rng(time(NULL));
-  int pg_id = pg_id_range(rng);
-
-  int objs_per_folder = abs(merge_threshold) * 16 * g_ceph_context->_conf->filestore_split_multiple;
-  boost::uniform_int<> folders_range(5, 256);
-  uint64_t expected_num_objs = (uint64_t)objs_per_folder * (uint64_t)folders_range(rng);
-
-  char buf[100];
-  snprintf(buf, 100, "1.%x_head", pg_id);
-
-  coll_t cid(buf);
-  int r;
-  {
-    // Create a collection along with a hint
-    ObjectStore::Transaction t;
-    t.create_collection(cid);
-    cerr << "create collection" << std::endl;
-    bufferlist hint;
-    ::encode(pg_num, hint);
-    ::encode(expected_num_objs, hint);
-    t.collection_hint(cid, ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS, hint);
-    cerr << "collection hint" << std::endl;
-    r = store->apply_transaction(t);
-    ASSERT_EQ(r, 0);
-  }
-  {
-    // Remove the collection
-    ObjectStore::Transaction t;
-    t.remove_collection(cid);
-    cerr << "remove collection" << std::endl;
-    r = store->apply_transaction(t);
-    ASSERT_EQ(r, 0);
-  }
-  // Revert the config change so that it does not affect the split/merge tests
-  if (merge_threshold > 0) {
-    oss.str("");
-    oss << merge_threshold;
-    g_ceph_context->_conf->set_val("filestore_merge_threshold", oss.str().c_str());
-  }
-}
-
 TEST_P(StoreTest, SimpleObjectTest) {
   int r;
   coll_t cid = coll_t("coll");
@@ -192,24 +129,6 @@ TEST_P(StoreTest, SimpleObjectTest) {
   {
     ObjectStore::Transaction t;
     t.remove(cid, hoid);
-    t.touch(cid, hoid);
-    cerr << "Remove then create" << std::endl;
-    r = store->apply_transaction(t);
-    ASSERT_EQ(r, 0);
-  }
-  {
-    ObjectStore::Transaction t;
-    bufferlist bl;
-    bl.append("abcde");
-    t.remove(cid, hoid);
-    t.write(cid, hoid, 10, 5, bl);
-    cerr << "Remove then create" << std::endl;
-    r = store->apply_transaction(t);
-    ASSERT_EQ(r, 0);
-  }
-  {
-    ObjectStore::Transaction t;
-    t.remove(cid, hoid);
     t.remove_collection(cid);
     cerr << "Cleaning" << std::endl;
     r = store->apply_transaction(t);
@@ -383,20 +302,13 @@ public:
 };
 
 class SyntheticWorkloadState {
-  struct Object {
-    bufferlist data;
-    map<string, bufferlist> attrs;
-  };
 public:
   static const unsigned max_in_flight = 16;
   static const unsigned max_objects = 3000;
-  static const unsigned max_object_len = 1024 * 40;
-  static const unsigned max_attr_size = 5;
-  static const unsigned max_attr_name_len = 100;
-  static const unsigned max_attr_value_len = 1024 * 4;
+  static const unsigned max_object_len = 1024 * 20;
   coll_t cid;
   unsigned in_flight;
-  map<ghobject_t, Object> contents;
+  map<ghobject_t, bufferlist> contents;
   set<ghobject_t> available_objects;
   set<ghobject_t> in_flight_objects;
   ObjectGenerator *object_gen;
@@ -428,34 +340,6 @@ public:
     }
   };
 
-  class C_SyntheticOnClone : public Context {
-  public:
-    SyntheticWorkloadState *state;
-    ObjectStore::Transaction *t;
-    ghobject_t oid, noid;
-    C_SyntheticOnClone(SyntheticWorkloadState *state,
-                          ObjectStore::Transaction *t, ghobject_t oid, ghobject_t noid)
-      : state(state), t(t), oid(oid), noid(noid) {}
-
-    void finish(int r) {
-      Mutex::Locker locker(state->lock);
-      ASSERT_TRUE(state->in_flight_objects.count(oid));
-      ASSERT_EQ(r, 0);
-      state->in_flight_objects.erase(oid);
-      if (state->contents.count(oid))
-        state->available_objects.insert(oid);
-      if (state->contents.count(noid))
-        state->available_objects.insert(noid);
-      --(state->in_flight);
-      bufferlist r2;
-      r = state->store->read(state->cid, noid, 0, state->contents[noid].data.length(), r2);
-      if (!state->contents[noid].data.contents_equal(r2)) {
-        ASSERT_TRUE(state->contents[noid].data.contents_equal(r2));
-      }
-      state->cond.Signal();
-    }
-  };
-
   static void filled_byte_array(bufferlist& bl, size_t size)
   {
     static const char alphanum[] = "0123456789"
@@ -464,7 +348,7 @@ public:
 
     bufferptr bp(size);
     for (unsigned int i = 0; i < size - 1; i++) {
-      bp[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
+      bp[i] = alphanum[rand() % sizeof(alphanum)];
     }
     bp[size - 1] = '\0';
 
@@ -527,170 +411,10 @@ public:
     ++in_flight;
     in_flight_objects.insert(new_obj);
     if (!contents.count(new_obj))
-      contents[new_obj] = Object();
+      contents[new_obj] = bufferlist();
     return store->queue_transaction(osr, t, new C_SyntheticOnReadable(this, t, new_obj));
   }
 
-  int clone() {
-    Mutex::Locker locker(lock);
-    if (!can_unlink())
-      return -ENOENT;
-    if (!can_create())
-      return -ENOSPC;
-    wait_for_ready();
-
-    ghobject_t old_obj;
-    do {
-      old_obj = get_uniform_random_object();
-    } while (contents[old_obj].data.length());
-    available_objects.erase(old_obj);
-    ghobject_t new_obj = object_gen->create_object(rng);
-    available_objects.erase(new_obj);
-
-    ObjectStore::Transaction *t = new ObjectStore::Transaction;
-    t->clone(cid, old_obj, new_obj);
-    ++in_flight;
-    in_flight_objects.insert(old_obj);
-
-    contents[new_obj] = contents[old_obj];
-    return store->queue_transaction(osr, t, new C_SyntheticOnClone(this, t, old_obj, new_obj));
-  }
-
-  int setattrs() {
-    Mutex::Locker locker(lock);
-    if (!can_unlink())
-      return -ENOENT;
-    wait_for_ready();
-
-    ghobject_t obj = get_uniform_random_object();
-    available_objects.erase(obj);
-    ObjectStore::Transaction *t = new ObjectStore::Transaction;
-
-    boost::uniform_int<> u0(1, max_attr_size);
-    boost::uniform_int<> u1(4, max_attr_name_len);
-    boost::uniform_int<> u2(4, max_attr_value_len);
-    boost::uniform_int<> u3(0, 100);
-    uint64_t size = u0(*rng);
-    uint64_t name_len, value_len;
-    uint64_t get_exist;
-    map<string, bufferlist> attrs;
-    set<string> keys;
-    for (map<string, bufferlist>::iterator it = contents[obj].attrs.begin();
-         it != contents[obj].attrs.end(); ++it)
-      keys.insert(it->first);
-
-    while (size--) {
-      bufferlist name, value;
-      get_exist = u3(*rng);
-      value_len = u2(*rng);
-      filled_byte_array(value, value_len);
-      if (get_exist < 50 && keys.size()) {
-        set<string>::iterator k = keys.begin();
-        attrs[*k] = value;
-        contents[obj].attrs[*k] = value;
-        keys.erase(k);
-      } else {
-        name_len = u1(*rng);
-        filled_byte_array(name, name_len);
-        attrs[name.c_str()] = value;
-        contents[obj].attrs[name.c_str()] = value;
-      }
-    }
-    t->setattrs(cid, obj, attrs);
-    ++in_flight;
-    in_flight_objects.insert(obj);
-    return store->queue_transaction(osr, t, new C_SyntheticOnReadable(this, t, obj));
-  }
-
-  void getattrs() {
-    ghobject_t obj;
-    int retry;
-    {
-      Mutex::Locker locker(lock);
-      if (!can_unlink())
-        return ;
-      wait_for_ready();
-
-      retry = 10;
-      do {
-        obj = get_uniform_random_object();
-        if (!--retry)
-          return ;
-      } while (contents[obj].attrs.empty());
-    }
-    map<string, bufferlist> attrs;
-    int r = store->getattrs(cid, obj, attrs);
-    ASSERT_TRUE(r == 0);
-    ASSERT_TRUE(attrs.size() == contents[obj].attrs.size());
-    for (map<string, bufferlist>::iterator it = contents[obj].attrs.begin();
-         it != contents[obj].attrs.end(); ++it) {
-      ASSERT_TRUE(it->second.contents_equal(attrs[it->first]));
-    }
-  }
-
-  void getattr() {
-    ghobject_t obj;
-    int r;
-    int retry;
-    {
-      Mutex::Locker locker(lock);
-      if (!can_unlink())
-        return ;
-      wait_for_ready();
-
-      retry = 10;
-      do {
-        obj = get_uniform_random_object();
-        if (!--retry)
-          return ;
-      } while (contents[obj].attrs.empty());
-    }
-    boost::uniform_int<> u(0, contents[obj].attrs.size()-1);
-    retry = u(*rng);
-    map<string, bufferlist>::iterator it = contents[obj].attrs.begin();
-    while (retry) {
-      retry--;
-      ++it;
-    }
-
-    bufferlist bl;
-    r = store->getattr(cid, obj, it->first, bl);
-    ASSERT_TRUE(r >= 0);
-    ASSERT_TRUE(it->second.contents_equal(bl));
-  }
-
-  int rmattr() {
-    Mutex::Locker locker(lock);
-    if (!can_unlink())
-      return -ENOENT;
-    wait_for_ready();
-
-    ghobject_t obj;
-    int retry = 10;
-    do {
-      obj = get_uniform_random_object();
-      if (!--retry)
-        return 0;
-    } while (contents[obj].attrs.empty());
-
-    boost::uniform_int<> u(0, contents[obj].attrs.size()-1);
-    retry = u(*rng);
-    map<string, bufferlist>::iterator it = contents[obj].attrs.begin();
-    while (retry) {
-      retry--;
-      ++it;
-    }
-
-    available_objects.erase(obj);
-    ObjectStore::Transaction *t = new ObjectStore::Transaction;
-    t->rmattr(cid, obj, it->first);
-
-    contents[obj].attrs.erase(it->first);
-    ++in_flight;
-    in_flight_objects.insert(obj);
-    return store->queue_transaction(osr, t, new C_SyntheticOnReadable(this, t, obj));
-  }
-
   int write() {
     Mutex::Locker locker(lock);
     if (!can_unlink())
@@ -702,7 +426,7 @@ public:
     ObjectStore::Transaction *t = new ObjectStore::Transaction;
 
     boost::uniform_int<> u1(0, max_object_len/2);
-    boost::uniform_int<> u2(0, max_object_len/10);
+    boost::uniform_int<> u2(0, max_object_len);
     uint64_t offset = u1(*rng);
     uint64_t len = u2(*rng);
     bufferlist bl;
@@ -711,17 +435,16 @@ public:
 
     filled_byte_array(bl, len);
 
-    if (contents[new_obj].data.length() <= offset) {
-      contents[new_obj].data.append_zero(offset-contents[new_obj].data.length());
-      contents[new_obj].data.append(bl);
+    if (contents[new_obj].length() <= offset) {
+      contents[new_obj].append_zero(offset-contents[new_obj].length());
+      contents[new_obj].append(bl);
     } else {
       bufferlist value;
-      contents[new_obj].data.copy(0, offset, value);
+      contents[new_obj].copy(0, offset, value);
       value.append(bl);
-      if (value.length() < contents[new_obj].data.length())
-        contents[new_obj].data.copy(value.length(),
-                                    contents[new_obj].data.length()-value.length(), value);
-      value.swap(contents[new_obj].data);
+      if (value.length() < contents[new_obj].length())
+        contents[new_obj].copy(value.length(), contents[new_obj].length()-value.length(), value);
+      value.swap(contents[new_obj]);
     }
 
     t->write(cid, new_obj, offset, len, bl);
@@ -750,14 +473,14 @@ public:
     }
     bufferlist bl, result;
     r = store->read(cid, obj, offset, len, result);
-    if (offset >= contents[obj].data.length()) {
+    if (offset >= contents[obj].length()) {
       ASSERT_EQ(r, 0);
     } else {
-      size_t max_len = contents[obj].data.length() - offset;
+      size_t max_len = contents[obj].length() - offset;
       if (len > max_len)
         len = max_len;
       ASSERT_EQ(len, result.length());
-      contents[obj].data.copy(offset, len, bl);
+      contents[obj].copy(offset, len, bl);
       ASSERT_EQ(r, (int)len);
       ASSERT_TRUE(result.contents_equal(bl));
     }
@@ -780,11 +503,11 @@ public:
     t->truncate(cid, obj, len);
     ++in_flight;
     in_flight_objects.insert(obj);
-    if (contents[obj].data.length() <= len)
-      contents[obj].data.append_zero(len - contents[obj].data.length());
+    if (contents[obj].length() <= len)
+      contents[obj].append_zero(len - contents[obj].length());
     else {
-      contents[obj].data.copy(0, len, bl);
-      bl.swap(contents[obj].data);
+      contents[obj].copy(0, len, bl);
+      bl.swap(contents[obj]);
     }
 
     return store->queue_transaction(osr, t, new C_SyntheticOnReadable(this, t, obj));
@@ -840,7 +563,7 @@ public:
     struct stat buf;
     int r = store->stat(cid, hoid, &buf);
     ASSERT_EQ(0, r);
-    ASSERT_TRUE(buf.st_size == contents[hoid].data.length());
+    ASSERT_TRUE(buf.st_size == contents[hoid].length());
     {
       Mutex::Locker locker(lock);
       --in_flight;
@@ -898,10 +621,8 @@ TEST_P(StoreTest, Synthetic) {
       test_obj.stat();
     } else if (val > 85) {
       test_obj.unlink();
-    } else if (val > 55) {
-      test_obj.write();
     } else if (val > 50) {
-      test_obj.clone();
+      test_obj.write();
     } else if (val > 10) {
       test_obj.read();
     } else {
@@ -911,44 +632,6 @@ TEST_P(StoreTest, Synthetic) {
   test_obj.wait_for_done();
 }
 
-TEST_P(StoreTest, AttrSynthetic) {
-  ObjectStore::Sequencer osr("test");
-  MixedGenerator gen;
-  gen_type rng(time(NULL));
-  coll_t cid("synthetic_2");
-
-  SyntheticWorkloadState test_obj(store.get(), &gen, &rng, &osr, cid);
-  test_obj.init();
-  for (int i = 0; i < 500; ++i) {
-    if (!(i % 10)) cerr << "seeding object " << i << std::endl;
-    test_obj.touch();
-  }
-  for (int i = 0; i < 10000; ++i) {
-    if (!(i % 10)) {
-      cerr << "Op " << i << std::endl;
-      test_obj.print_internal_state();
-    }
-    boost::uniform_int<> true_false(0, 99);
-    int val = true_false(rng);
-    if (val > 97) {
-      test_obj.scan();
-    } else if (val > 93) {
-      test_obj.stat();
-    } else if (val > 75) {
-      test_obj.rmattr();
-    } else if (val > 47) {
-      test_obj.setattrs();
-    } else if (val > 45) {
-      test_obj.clone();
-    } else if (val > 30) {
-      test_obj.getattrs();
-    } else {
-      test_obj.getattr();
-    }
-  }
-  test_obj.wait_for_done();
-}
-
 TEST_P(StoreTest, HashCollisionTest) {
   coll_t cid("blah");
   int r;
@@ -1029,81 +712,6 @@ TEST_P(StoreTest, HashCollisionTest) {
   store->apply_transaction(t);
 }
 
-TEST_P(StoreTest, ScrubTest) {
-  coll_t cid("blah");
-  int r;
-  {
-    ObjectStore::Transaction t;
-    t.create_collection(cid);
-    r = store->apply_transaction(t);
-    ASSERT_EQ(r, 0);
-  }
-  string base = "aaaaa";
-  set<ghobject_t> created;
-  for (int i = 0; i < 1000; ++i) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    if (!(i % 5)) {
-      cerr << "Object " << i << std::endl;
-    }
-    ghobject_t hoid(hobject_t(string(buf) + base, string(), CEPH_NOSNAP, i, 0, ""));
-    {
-      ObjectStore::Transaction t;
-      t.touch(cid, hoid);
-      r = store->apply_transaction(t);
-      ASSERT_EQ(r, 0);
-    }
-    created.insert(hoid);
-  }
-  vector<ghobject_t> objects;
-  r = store->collection_list(cid, objects);
-  ASSERT_EQ(r, 0);
-  set<ghobject_t> listed(objects.begin(), objects.end());
-  cerr << "listed.size() is " << listed.size() << " and created.size() is " << created.size() << std::endl;
-  ASSERT_TRUE(listed.size() == created.size());
-  objects.clear();
-  listed.clear();
-  ghobject_t current, next;
-  while (1) {
-    r = store->collection_list_partial(cid, current, 50, 60,
-                                       0, &objects, &next);
-    ASSERT_EQ(r, 0);
-    ASSERT_TRUE(sorted(objects));
-    for (vector<ghobject_t>::iterator i = objects.begin();
-         i != objects.end(); ++i) {
-      if (listed.count(*i))
-        cerr << *i << " repeated" << std::endl;
-      listed.insert(*i);
-    }
-    if (objects.size() < 50) {
-      ASSERT_TRUE(next.is_max());
-      break;
-    }
-    objects.clear();
-    current = next.get_boundary();
-  }
-  cerr << "listed.size() is " << listed.size() << std::endl;
-  ASSERT_TRUE(listed.size() == created.size());
-  for (set<ghobject_t>::iterator i = listed.begin();
-       i != listed.end();
-       ++i) {
-    ASSERT_TRUE(created.count(*i));
-  }
-
-  for (set<ghobject_t>::iterator i = created.begin();
-       i != created.end();
-       ++i) {
-    ObjectStore::Transaction t;
-    t.collection_remove(cid, *i);
-    r = store->apply_transaction(t);
-    ASSERT_EQ(r, 0);
-  }
-  ObjectStore::Transaction t;
-  t.remove_collection(cid);
-  store->apply_transaction(t);
-}
-
-
 TEST_P(StoreTest, OMapTest) {
   coll_t cid("blah");
   ghobject_t hoid(hobject_t("tesomap", "", CEPH_NOSNAP, 0, 0, ""));
@@ -1617,7 +1225,7 @@ TEST_P(StoreTest, SetAllocHint) {
 INSTANTIATE_TEST_CASE_P(
   ObjectStore,
   StoreTest,
-  ::testing::Values("memstore", "filestore", "keyvaluestore-dev"));
+  ::testing::Values("filestore", "keyvaluestore-dev"));
 
 #else
 
@@ -1705,11 +1313,6 @@ int main(int argc, char **argv) {
   return RUN_ALL_TESTS();
 }
 
-/*
- * Local Variables:
- * compile-command: "cd ../.. ; make ceph_test_objectstore && 
- *    ./ceph_test_objectstore \
- *        --gtest_filter=*.collect_metadata* --log-to-stderr=true --debug-filestore=20
- *  "
- * End:
- */
+// Local Variables:
+// compile-command: "cd ../.. ; make ceph_test_objectstore ; ./ceph_test_objectstore --gtest_filter=StoreTest.* --log-to-stderr=true --debug-filestore=20"
+// End:
diff --git a/src/test/objectstore/test_idempotent_sequence.cc b/src/test/objectstore/test_idempotent_sequence.cc
index df502f8..3ef2c79 100644
--- a/src/test/objectstore/test_idempotent_sequence.cc
+++ b/src/test/objectstore/test_idempotent_sequence.cc
@@ -79,8 +79,8 @@ std::string status_file;
 int run_diff(std::string& a_path, std::string& a_journal,
 	      std::string& b_path, std::string& b_journal)
 {
-  FileStore *a = new FileStore(a_path, a_journal, 0, "a");
-  FileStore *b = new FileStore(b_path, b_journal, 0, "b");
+  FileStore *a = new FileStore(a_path, a_journal, "a");
+  FileStore *b = new FileStore(b_path, b_journal, "b");
 
   int ret = 0;
   {
diff --git a/src/test/omap_bench.h b/src/test/omap_bench.h
index d764a5d..12b34f9 100644
--- a/src/test/omap_bench.h
+++ b/src/test/omap_bench.h
@@ -115,7 +115,7 @@ public:
       data_lock("OmapBench::data_lock"),
       busythreads_count(0),
       comp(NULL), safe(aio_is_safe),
-      pool_name("rbd"),
+      pool_name("data"),
       rados_id("admin"),
       prefix(rados_id+".obj."),
       threads(3), objects(100), entries_per_omap(10), key_size(10),
diff --git a/src/test/os/TestFlatIndex.cc b/src/test/os/TestFlatIndex.cc
index 600120a..7bb2d42 100644
--- a/src/test/os/TestFlatIndex.cc
+++ b/src/test/os/TestFlatIndex.cc
@@ -70,6 +70,7 @@ TEST(FlatIndex, created_unlink) {
   //
   {
     CollectionIndex::IndexedPath indexed_path;
+    index->set_ref(index);
     const std::string object_name(10, 'A');
     ghobject_t hoid(hobject_t(object_t(object_name), key, CEPH_NOSNAP, hash, pool, ""));
     int exists;
@@ -87,6 +88,7 @@ TEST(FlatIndex, created_unlink) {
   //
   {
     CollectionIndex::IndexedPath indexed_path;
+    index->set_ref(index);
     const std::string object_name(1024, 'A');
     ghobject_t hoid(hobject_t(object_t(object_name), key, CEPH_NOSNAP, hash, pool, ""));
     int exists;
diff --git a/src/test/os/TestLFNIndex.cc b/src/test/os/TestLFNIndex.cc
index 3bc5ba0..74fdf66 100644
--- a/src/test/os/TestLFNIndex.cc
+++ b/src/test/os/TestLFNIndex.cc
@@ -42,7 +42,7 @@ public:
   virtual int _split(
 		     uint32_t match,                           
 		     uint32_t bits,                            
-		     CollectionIndex* dest
+		     ceph::shared_ptr<CollectionIndex> dest
 		     ) { return 0; }
 
   void test_generate_and_parse(const ghobject_t &hoid, const std::string &mangled_expected) {
@@ -87,11 +87,6 @@ protected:
 				       vector<ghobject_t> *ls,
 				       ghobject_t *next
 				       ) { return 0; }
-  virtual int _pre_hash_collection(
-                                   uint32_t pg_num,
-                                   uint64_t expected_num_objs
-                                  ) { return 0; }
-
 };
 
 class TestHASH_INDEX_TAG : public TestWrapLFNIndex, public ::testing::Test {
@@ -120,6 +115,7 @@ public:
 
 TEST_F(TestHASH_INDEX_TAG_2, generate_and_parse_name) {
   const vector<string> path;
+  std::string mangled_name;
   const std::string key("KEY");
   uint64_t hash = 0xABABABAB;
   uint64_t pool = -1;
@@ -143,11 +139,12 @@ public:
 
 TEST_F(TestHOBJECT_WITH_POOL, generate_and_parse_name) {
   const vector<string> path;
+  std::string mangled_name;
   const std::string key("KEY");
   uint64_t hash = 0xABABABAB;
   uint64_t pool = 0xCDCDCDCD;
   int64_t gen = 0xefefefefef;
-  shard_id_t shard_id(0xb);
+  int8_t shard_id = 0xb;
 
   {
     std::string name(".XA/B_\\C.D");
diff --git a/src/test/osd/Object.cc b/src/test/osd/Object.cc
index c5ff040..c98d62d 100644
--- a/src/test/osd/Object.cc
+++ b/src/test/osd/Object.cc
@@ -53,7 +53,7 @@ void AppendGenerator::get_ranges_map(
     }
     if (alignment)
       assert(segment_length % alignment == 0);
-    out.insert(pair<uint64_t, uint64_t>(pos, segment_length));
+    out.insert(make_pair(pos, segment_length));
     pos += segment_length;
   }
 }
@@ -72,7 +72,7 @@ void VarLenGenerator::get_ranges_map(
       segment_length = limit - pos;
     }
     if (include) {
-      out.insert(pair<uint64_t, uint64_t>(pos, segment_length));
+      out.insert(make_pair(pos, segment_length));
       include = false;
     } else {
       include = true;
@@ -108,9 +108,7 @@ ObjectDesc::iterator &ObjectDesc::iterator::advance(bool init) {
   interval_set<uint64_t> ranges;
   cur_cont->first->get_ranges(cur_cont->second, ranges);
   while (!ranges.contains(pos)) {
-    stack.push_front(pair<list<pair<ceph::shared_ptr<ContentsGenerator>,
-				    ContDesc> >::iterator,
-		     uint64_t>(cur_cont, limit));
+    stack.push_front(make_pair(cur_cont, limit));
     uint64_t length = cur_cont->first->get_length(cur_cont->second);
     uint64_t next;
     if (pos >= length) {
@@ -155,7 +153,7 @@ const ContDesc &ObjectDesc::most_recent() {
 }
 
 void ObjectDesc::update(ContentsGenerator *gen, const ContDesc &next) {
-  layers.push_front(pair<ceph::shared_ptr<ContentsGenerator>, ContDesc>(ceph::shared_ptr<ContentsGenerator>(gen), next));
+  layers.push_front(make_pair(gen, next));
   return;
 }
 
diff --git a/src/test/osd/Object.h b/src/test/osd/Object.h
index 59b492f..d39d36c 100644
--- a/src/test/osd/Object.h
+++ b/src/test/osd/Object.h
@@ -210,9 +210,7 @@ public:
     const ContDesc &cont, map<uint64_t, uint64_t> &out);
   uint64_t get_length(const ContDesc &in) {
     RandWrap rand(in.seqnum);
-    if (max_length == 0)
-      return 0;
-    return (rand() % (max_length/2)) + ((max_length - 1)/2) + 1;
+    return (rand() % max_length);
   }
 };
 
@@ -222,7 +220,7 @@ public:
   AttrGenerator(uint64_t max_len) : max_len(max_len) {}
   void get_ranges_map(
     const ContDesc &cont, map<uint64_t, uint64_t> &out) {
-    out.insert(pair<uint64_t, uint64_t>(0, get_length(cont)));
+    out.insert(make_pair(0, get_length(cont)));
   }
   uint64_t get_length(const ContDesc &in) {
     RandWrap rand(in.seqnum);
@@ -284,7 +282,7 @@ public:
   ObjectDesc(const ContDesc &init, ContentsGenerator *cont_gen)
     : exists(false), dirty(false),
       version(0) {
-    layers.push_front(pair<ceph::shared_ptr<ContentsGenerator>, ContDesc>(ceph::shared_ptr<ContentsGenerator>(cont_gen), init));
+    layers.push_front(make_pair(cont_gen, init));
   }
 
   class iterator {
diff --git a/src/test/osd/RadosModel.cc b/src/test/osd/RadosModel.cc
index 66058b0..efde283 100644
--- a/src/test/osd/RadosModel.cc
+++ b/src/test/osd/RadosModel.cc
@@ -1,5 +1,4 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
 #include "include/interval_set.h"
 #include "include/buffer.h"
 #include <list>
diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h
index 55347bd..e81699d 100644
--- a/src/test/osd/RadosModel.h
+++ b/src/test/osd/RadosModel.h
@@ -1,5 +1,4 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
 #include "include/int_types.h"
 
 #include "common/Mutex.h"
@@ -1244,6 +1243,7 @@ public:
     context->state_lock.Lock();
     uint64_t snap = context->snaps[to_remove];
     context->remove_snap(to_remove);
+    context->state_lock.Unlock();
 
     if (context->pool_snaps) {
       string snapname;
@@ -1267,7 +1267,6 @@ public:
 	assert(0);
       }
     }
-    context->state_lock.Unlock();
   }
 
   string getType()
diff --git a/src/test/osd/TestOSDMap.cc b/src/test/osd/TestOSDMap.cc
index a4a62dc..451b6b2 100644
--- a/src/test/osd/TestOSDMap.cc
+++ b/src/test/osd/TestOSDMap.cc
@@ -233,8 +233,7 @@ TEST_F(OSDMapTest, PrimaryTempRespected) {
 
   pg_t rawpg(0, 0, -1);
   pg_t pgid = osdmap.raw_pg_to_pg(rawpg);
-  vector<int> up_osds;
-  vector<int> acting_osds;
+  vector<int> up_osds, acting_osds;
   int up_primary, acting_primary;
 
   osdmap.pg_to_up_acting_osds(pgid, &up_osds, &up_primary,
diff --git a/src/test/osd/TestPGLog.cc b/src/test/osd/TestPGLog.cc
index 0d51ed9..c2063b8 100644
--- a/src/test/osd/TestPGLog.cc
+++ b/src/test/osd/TestPGLog.cc
@@ -213,7 +213,7 @@ public:
     bool dirty_info = false;
     bool dirty_big_info = false;
     merge_log(
-      t, oinfo, olog, pg_shard_t(1, shard_id_t(0)), info,
+      t, oinfo, olog, pg_shard_t(1, 0), info,
       &h, dirty_info, dirty_big_info);
 
     ASSERT_EQ(info.last_update, oinfo.last_update);
@@ -233,7 +233,7 @@ public:
     pg_info_t oinfo = tcase.get_divinfo();
 
     proc_replica_log(
-       t, oinfo, olog, omissing, pg_shard_t(1, shard_id_t(0)));
+      t, oinfo, olog, omissing, pg_shard_t(1, 0));
 
     if (!tcase.base.empty()) {
       ASSERT_EQ(tcase.base.rbegin()->version, oinfo.last_update);
diff --git a/src/test/osd/TestRados.cc b/src/test/osd/TestRados.cc
index 405f9df..b61ceb3 100644
--- a/src/test/osd/TestRados.cc
+++ b/src/test/osd/TestRados.cc
@@ -1,5 +1,4 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
 #include "common/Mutex.h"
 #include "common/Cond.h"
 #include "common/errno.h"
@@ -262,7 +261,7 @@ int main(int argc, char **argv)
   };
 
   map<TestOpType, unsigned int> op_weights;
-  string pool_name = "rbd";
+  string pool_name = "data";
   bool ec_pool = false;
   bool no_omap = false;
 
diff --git a/src/test/osd/hitset.cc b/src/test/osd/hitset.cc
index 7fab186..9e8ee5e 100644
--- a/src/test/osd/hitset.cc
+++ b/src/test/osd/hitset.cc
@@ -23,7 +23,7 @@ public:
   void fill(unsigned count) {
     char buf[50];
     for (unsigned i = 0; i < count; ++i) {
-      sprintf(buf, "hitsettest_%u", i);
+      sprintf(buf, "hitsettest_%d", i);
       hobject_t obj(object_t(buf), "", 0, i, 0, "");
       hitset->insert(obj);
     }
@@ -32,7 +32,7 @@ public:
   void verify_fill(unsigned count) {
     char buf[50];
     for (unsigned i = 0; i < count; ++i) {
-      sprintf(buf, "hitsettest_%u", i);
+      sprintf(buf, "hitsettest_%d", i);
       hobject_t obj(object_t(buf), "", 0, i, 0, "");
       EXPECT_TRUE(hitset->contains(obj));
     }
diff --git a/src/test/osd/osd-bench.sh b/src/test/osd/osd-bench.sh
deleted file mode 100755
index 6feb841..0000000
--- a/src/test/osd/osd-bench.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-
-source test/mon/mon-test-helpers.sh
-source test/osd/osd-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    local id=a
-    call_TEST_functions $dir $id --public-addr 127.0.0.1 || return 1
-}
-
-function TEST_bench() {
-    local dir=$1
-
-    run_mon $dir a --public-addr 127.0.0.1 \
-        || return 1
-    run_osd $dir 0 || return 1
-
-    local osd_bench_small_size_max_iops=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_bench_small_size_max_iops)
-    local osd_bench_large_size_max_throughput=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_bench_large_size_max_throughput)
-    local osd_bench_max_block_size=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_bench_max_block_size)
-    local osd_bench_duration=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_bench_duration)
-
-    #
-    # block size too high
-    #
-    ! ./ceph tell osd.0 bench 1024 $((osd_bench_max_block_size + 1)) 2> $dir/out || return 1
-    grep osd_bench_max_block_size $dir/out || return 1
-
-    #
-    # count too high for small (< 1MB) block sizes
-    #
-    local bsize=1024
-    local max_count=$(($bsize * $osd_bench_duration * $osd_bench_small_size_max_iops))
-    ! ./ceph tell osd.0 bench $(($max_count + 1)) $bsize 2> $dir/out || return 1
-    grep osd_bench_small_size_max_iops $dir/out || return 1
-
-    #
-    # count too high for large (>= 1MB) block sizes
-    #
-    local bsize=$((1024 * 1024 + 1))
-    local max_count=$(($osd_bench_large_size_max_throughput * $osd_bench_duration))
-    ! ./ceph tell osd.0 bench $(($max_count + 1)) $bsize 2> $dir/out || return 1
-    grep osd_bench_large_size_max_throughput $dir/out || return 1
-
-    #
-    # default values should work
-    #
-    ./ceph tell osd.0 bench || return 1
-}
-
-main osd-bench
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/osd/osd-bench.sh"
-# End:
diff --git a/src/test/osd/osd-config.sh b/src/test/osd/osd-config.sh
deleted file mode 100755
index 042a228..0000000
--- a/src/test/osd/osd-config.sh
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-
-source test/mon/mon-test-helpers.sh
-source test/osd/osd-test-helpers.sh
-
-function run() {
-    local dir=$1
-
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=127.0.0.1 "
-
-    local id=a
-    call_TEST_functions $dir $id --public-addr 127.0.0.1 || return 1
-}
-
-function TEST_config_init() {
-    local dir=$1
-
-    run_mon $dir a --public-addr 127.0.0.1 \
-        || return 1
-    local advance=1000
-    local stale=1000
-    local cache=500
-    run_osd $dir 0 \
-        --osd-map-max-advance $advance \
-        --osd-map-cache-size $cache \
-        --osd-pg-epoch-persisted-max-stale $stale \
-        || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
-    grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-    grep 'is not > osd_pg_epoch_persisted_max_stale' $dir/osd-0.log || return 1
-}
-
-function TEST_config_track() {
-    local dir=$1
-
-    run_mon $dir a --public-addr 127.0.0.1 \
-        || return 1
-    run_osd $dir 0 || return 1
-
-    local osd_map_cache_size=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_map_cache_size)
-    local osd_map_max_advance=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_map_max_advance)
-    local osd_pg_epoch_persisted_max_stale=$(CEPH_ARGS='' ./ceph-conf \
-        --show-config-value osd_pg_epoch_persisted_max_stale)
-    #
-    # lower cache_size under max_advance to trigger the warning
-    #
-    ! grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-    local cache=$(($osd_map_max_advance / 2))
-    ./ceph tell osd.0 injectargs "--osd-map-cache-size $cache" || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
-    grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-    rm $dir/osd-0.log
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log reopen || return 1
-
-    #
-    # reset cache_size to the default and assert that it does not trigger the warning
-    #
-    ! grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-    local cache=$osd_map_cache_size
-    ./ceph tell osd.0 injectargs "--osd-map-cache-size $cache" || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
-    ! grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-
-    #
-    # increase the osd_map_max_advance above the default cache_size
-    #
-    ! grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-    local advance=$(($osd_map_cache_size * 2))
-    ./ceph tell osd.0 injectargs "--osd-map-max-advance $advance" || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
-    grep 'is not > osd_map_max_advance' $dir/osd-0.log || return 1
-
-    #
-    # increase the osd_pg_epoch_persisted_max_stale above the default cache_size
-    #
-    ! grep 'is not > osd_pg_epoch_persisted_max_stale' $dir/osd-0.log || return 1
-    local stale=$(($osd_map_cache_size * 2))
-    ceph tell osd.0 injectargs "--osd-pg-epoch-persisted-max-stale $stale" || return 1
-    CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
-    grep 'is not > osd_pg_epoch_persisted_max_stale' $dir/osd-0.log || return 1
-}
-
-main osd-config
-
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/osd/osd-config.sh"
-# End:
diff --git a/src/test/osd/osd-test-helpers.sh b/src/test/osd/osd-test-helpers.sh
index 28d8544..1ea17dd 100644
--- a/src/test/osd/osd-test-helpers.sh
+++ b/src/test/osd/osd-test-helpers.sh
@@ -30,7 +30,6 @@ function run_osd() {
 
     touch $dir/ceph.conf
 
-    mkdir -p $osd_data
     ./ceph-disk $ceph_disk_args \
         prepare $osd_data || return 1
 
@@ -45,7 +44,6 @@ function run_osd() {
     ceph_args+=" --pid-file=$dir/osd-\$id.pidfile"
     ceph_args+=" "
     ceph_args+="$@"
-    mkdir -p $osd_data
     CEPH_ARGS="$ceph_args" ./ceph-disk $ceph_disk_args \
         activate \
         --mark-init=none \
@@ -54,33 +52,4 @@ function run_osd() {
     [ "$id" = "$(cat $osd_data/whoami)" ] || return 1
 
     ./ceph osd crush create-or-move "$id" 1 root=default host=localhost
-
-    status=1
-    # Workaround for http://tracker.ceph.com/issues/8630
-    for ((i=0; i < 60; i++)); do
-        if ! ceph osd dump | grep "osd.$id up"; then
-            sleep 1
-        else
-            status=0
-            break
-        fi
-    done
-
-    return $status
-}
-
-function get_osds() {
-    local poolname=$1
-    local objectname=$2
-
-    ./ceph osd map $poolname $objectname | \
-       perl -p -e 's/.*up \(\[(.*?)\].*/$1/; s/,/ /g'
-}
-
-function get_pg() {
-    local poolname=$1
-    local objectname=$2
-
-    ./ceph osd map $poolname $objectname | \
-       perl -p -e 's/.*\((.*?)\) -> up.*/$1/'
 }
diff --git a/src/test/osd/types.cc b/src/test/osd/types.cc
index 83d9c0f..a04f2cb 100644
--- a/src/test/osd/types.cc
+++ b/src/test/osd/types.cc
@@ -182,6 +182,7 @@ TEST(pg_interval_t, check_new_interval)
 						   last_epoch_clean,
 						   osdmap,
 						   lastmap,
+						   pool_id,
 						   pgid,
 						   &past_intervals));
     ASSERT_TRUE(past_intervals.empty());
@@ -211,6 +212,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals));
     ASSERT_EQ((unsigned int)1, past_intervals.size());
@@ -243,6 +245,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals));
     old_primary = new_primary;
@@ -276,6 +279,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals));
     ASSERT_EQ((unsigned int)1, past_intervals.size());
@@ -307,6 +311,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals));
     ASSERT_EQ((unsigned int)1, past_intervals.size());
@@ -345,6 +350,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals));
     ASSERT_EQ((unsigned int)1, past_intervals.size());
@@ -383,6 +389,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals));
     ASSERT_EQ((unsigned int)1, past_intervals.size());
@@ -416,6 +423,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals,
 						  &out));
@@ -467,6 +475,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals,
 						  &out));
@@ -501,6 +510,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals,
 						  &out));
@@ -545,6 +555,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals,
 						  &out));
@@ -593,6 +604,7 @@ TEST(pg_interval_t, check_new_interval)
 						  last_epoch_clean,
 						  osdmap,
 						  lastmap,
+						  pool_id,
 						  pgid,
 						  &past_intervals,
 						  &out));
@@ -1282,19 +1294,9 @@ TEST(pg_pool_t_test, get_random_pg_position) {
   }
 }
 
-TEST(shard_id_t, iostream) {
-    set<shard_id_t> shards;
-    shards.insert(shard_id_t(0));
-    shards.insert(shard_id_t(1));
-    shards.insert(shard_id_t(2));
-    ostringstream out;
-    out << shards;
-    ASSERT_EQ(out.str(), "0,1,2");
-}
-
 /*
  * Local Variables:
- * compile-command: "cd ../.. ;
+ * compile-command: "cd .. ;
  *   make unittest_osd_types ;
  *   ./unittest_osd_types # --gtest_filter=pg_missing_t.constructor
  * "
diff --git a/src/test/osdc/FakeWriteback.cc b/src/test/osdc/FakeWriteback.cc
index 42567cb..7c678cf 100644
--- a/src/test/osdc/FakeWriteback.cc
+++ b/src/test/osdc/FakeWriteback.cc
@@ -76,7 +76,7 @@ ceph_tid_t FakeWriteback::write(const object_t& oid,
 			   uint64_t trunc_size, __u32 trunc_seq,
 			   Context *oncommit)
 {
-  C_Delay *wrapper = new C_Delay(m_cct, oncommit, m_lock, off, NULL, m_delay_ns);
+  C_Delay *wrapper = new C_Delay(m_cct, oncommit, m_lock, off, NULL, m_delay_ns);;
   m_finisher->queue(wrapper, 0);
   return m_tid.inc();
 }
diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py
deleted file mode 100755
index 7f492ed..0000000
--- a/src/test/pybind/test_ceph_argparse.py
+++ /dev/null
@@ -1,1139 +0,0 @@
-#!/usr/bin/nosetests --nocapture
-# -*- mode:python; tab-width:4; indent-tabs-mode:t -*-
-# vim: ts=4 sw=4 smarttab expandtab
-#
-# Ceph - scalable distributed file system
-#
-# Copyright (C) 2013,2014 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-
-from nose.tools import eq_ as eq
-from nose.tools import *
-
-from ceph_argparse import validate_command, parse_json_funcsigs
-
-import os
-import re
-import json
-
-def get_command_descriptions(what):
-    return os.popen("./get_command_descriptions " + "--" + what).read()
-
-def test_parse_json_funcsigs():
-    commands = get_command_descriptions("all")
-    cmd_json = parse_json_funcsigs(commands, 'cli')
-
-    # syntax error https://github.com/ceph/ceph/pull/585
-    commands = get_command_descriptions("pull585")
-    assert_raises(TypeError, parse_json_funcsigs, commands, 'cli')
-
-sigdict = parse_json_funcsigs(get_command_descriptions("all"), 'cli')
-
-
-class TestArgparse:
-
-    def assert_valid_command(self, args):
-        result = validate_command(sigdict, args)
-        assert_not_equal(result,None)
-        assert_not_equal(result,{})
-
-    def check_1_natural_arg(self, prefix, command):
-        self.assert_valid_command([prefix, command, '1'])
-        assert_equal({}, validate_command(sigdict, [prefix, command]))
-        assert_equal({}, validate_command(sigdict, [prefix, command, '-1']))
-        assert_equal({}, validate_command(sigdict, [prefix, command, '1',
-                                                    '1']))
-
-    def check_0_or_1_natural_arg(self, prefix, command):
-        self.assert_valid_command([prefix, command, '1'])
-        self.assert_valid_command([prefix, command])
-        assert_equal({}, validate_command(sigdict, [prefix, command, '-1']))
-        assert_equal({}, validate_command(sigdict, [prefix, command, '1',
-                                                    '1']))
-
-    def check_1_string_arg(self, prefix, command):
-        assert_equal({}, validate_command(sigdict, [prefix, command]))
-        self.assert_valid_command([prefix, command, 'string'])
-        assert_equal({}, validate_command(sigdict, [prefix,
-                                                    command,
-                                                    'string',
-                                                    'toomany']))
-
-    def check_1_or_more_string_args(self, prefix, command):
-        assert_equal({}, validate_command(sigdict, [prefix,
-                                                    command]))
-        self.assert_valid_command([prefix,
-                                   command,
-                                   'string'])
-        self.assert_valid_command([prefix,
-                                   command,
-                                   'string',
-                                   'more string'])
-
-    def check_no_arg(self, prefix, command):
-        self.assert_valid_command([prefix,
-                                   command])
-        assert_equal({}, validate_command(sigdict, [prefix,
-                                                    command,
-                                                    'toomany']))
-
-
-class TestPG(TestArgparse):
-
-    def test_stat(self):
-        self.assert_valid_command(['pg', 'stat'])
-
-    def test_getmap(self):
-        self.assert_valid_command(['pg', 'getmap'])
-
-    def test_send_pg_creates(self):
-        self.assert_valid_command(['pg', 'send_pg_creates'])
-
-    def test_dump(self):
-        self.assert_valid_command(['pg', 'dump'])
-        self.assert_valid_command(['pg', 'dump',
-                                   'all',
-                                   'summary',
-                                   'sum',
-                                   'delta',
-                                   'pools',
-                                   'osds',
-                                   'pgs',
-                                   'pgs_brief'])
-        assert_equal({}, validate_command(sigdict, ['pg', 'dump', 'invalid']))
-
-    def test_dump_json(self):
-        self.assert_valid_command(['pg', 'dump_json'])
-        self.assert_valid_command(['pg', 'dump_json',
-                                   'all',
-                                   'summary',
-                                   'sum',
-                                   'pools',
-                                   'osds',
-                                   'pgs'])
-        assert_equal({}, validate_command(sigdict, ['pg', 'dump_json',
-                                                    'invalid']))
-
-    def test_dump_pools_json(self):
-        self.assert_valid_command(['pg', 'dump_pools_json'])
-
-    def test_dump_pools_stuck(self):
-        self.assert_valid_command(['pg', 'dump_stuck'])
-        self.assert_valid_command(['pg', 'dump_stuck',
-                                   'inactive',
-                                   'unclean',
-                                   'stale'])
-        assert_equal({}, validate_command(sigdict, ['pg', 'dump_stuck',
-                                                    'invalid']))
-        self.assert_valid_command(['pg', 'dump_stuck',
-                                   'inactive',
-                                   '1234'])
-
-    def one_pgid(self, command):
-        self.assert_valid_command(['pg', command, '1.1'])
-        assert_equal({}, validate_command(sigdict, ['pg', command]))
-        assert_equal({}, validate_command(sigdict, ['pg', command, '1']))
-
-    def test_map(self):
-        self.one_pgid('map')
-
-    def test_scrub(self):
-        self.one_pgid('scrub')
-
-    def test_deep_scrub(self):
-        self.one_pgid('deep-scrub')
-
-    def test_repair(self):
-        self.one_pgid('repair')
-
-    def test_debug(self):
-        self.assert_valid_command(['pg',
-                                   'debug',
-                                   'unfound_objects_exist'])
-        self.assert_valid_command(['pg',
-                                   'debug',
-                                   'degraded_pgs_exist'])
-        assert_equal({}, validate_command(sigdict, ['pg', 'debug']))
-        assert_equal({}, validate_command(sigdict, ['pg', 'debug',
-                                                    'invalid']))
-
-    def test_force_create_pg(self):
-        self.one_pgid('force_create_pg')
-
-    def set_ratio(self, command):
-        self.assert_valid_command(['pg',
-                                   command,
-                                   '0.0'])
-        assert_equal({}, validate_command(sigdict, ['pg', command]))
-        assert_equal({}, validate_command(sigdict, ['pg',
-                                                    command,
-                                                    '2.0']))
-
-    def test_set_full_ratio(self):
-        self.set_ratio('set_full_ratio')
-
-    def test_set_nearfull_ratio(self):
-        self.set_ratio('set_nearfull_ratio')
-
-
-class TestAuth(TestArgparse):
-
-    def test_export(self):
-        self.assert_valid_command(['auth', 'export'])
-        self.assert_valid_command(['auth',
-                                   'export',
-                                   'string'])
-        assert_equal({}, validate_command(sigdict, ['auth',
-                                                    'export',
-                                                    'string',
-                                                    'toomany']))
-
-    def test_get(self):
-        self.check_1_string_arg('auth', 'get')
-
-    def test_get_key(self):
-        self.check_1_string_arg('auth', 'get-key')
-
-    def test_print_key(self):
-        self.check_1_string_arg('auth', 'print-key')
-        self.check_1_string_arg('auth', 'print_key')
-
-    def test_list(self):
-        self.check_no_arg('auth', 'list')
-
-    def test_import(self):
-        self.check_no_arg('auth', 'import')
-
-    def test_add(self):
-        self.check_1_or_more_string_args('auth', 'add')
-
-    def test_get_or_create_key(self):
-        self.check_1_or_more_string_args('auth', 'get-or-create-key')
-
-    def test_get_or_create(self):
-        self.check_1_or_more_string_args('auth', 'get-or-create')
-
-    def test_caps(self):
-        assert_equal({}, validate_command(sigdict, ['auth',
-                                                    'caps']))
-        assert_equal({}, validate_command(sigdict, ['auth',
-                                                    'caps',
-                                                    'string']))
-        self.assert_valid_command(['auth',
-                                   'caps',
-                                   'string',
-                                   'more string'])
-
-    def test_del(self):
-        self.check_1_string_arg('auth', 'del')
-
-
-class TestMonitor(TestArgparse):
-
-    def test_compact(self):
-        self.assert_valid_command(['compact'])
-
-    def test_scrub(self):
-        self.assert_valid_command(['scrub'])
-
-    def test_fsid(self):
-        self.assert_valid_command(['fsid'])
-
-    def test_log(self):
-        assert_equal({}, validate_command(sigdict, ['log']))
-        self.assert_valid_command(['log', 'a logtext'])
-        self.assert_valid_command(['log', 'a logtext', 'and another'])
-
-    def test_injectargs(self):
-        assert_equal({}, validate_command(sigdict, ['injectargs']))
-        self.assert_valid_command(['injectargs', 'one'])
-        self.assert_valid_command(['injectargs', 'one', 'two'])
-
-    def test_status(self):
-        self.assert_valid_command(['status'])
-
-    def test_health(self):
-        self.assert_valid_command(['health'])
-        self.assert_valid_command(['health', 'detail'])
-        assert_equal({}, validate_command(sigdict, ['health', 'invalid']))
-        assert_equal({}, validate_command(sigdict, ['health', 'detail',
-                                                    'toomany']))
-
-    def test_df(self):
-        self.assert_valid_command(['df'])
-        self.assert_valid_command(['df', 'detail'])
-        assert_equal({}, validate_command(sigdict, ['df', 'invalid']))
-        assert_equal({}, validate_command(sigdict, ['df', 'detail',
-                                                    'toomany']))
-
-    def test_report(self):
-        self.assert_valid_command(['report'])
-        self.assert_valid_command(['report', 'tag1'])
-        self.assert_valid_command(['report', 'tag1', 'tag2'])
-
-    def test_quorum_status(self):
-        self.assert_valid_command(['quorum_status'])
-
-    def test_mon_status(self):
-        self.assert_valid_command(['mon_status'])
-
-    def test_sync_force(self):
-        self.assert_valid_command(['sync',
-                                   'force',
-                                   '--yes-i-really-mean-it',
-                                   '--i-know-what-i-am-doing'])
-        self.assert_valid_command(['sync',
-                                   'force',
-                                   '--yes-i-really-mean-it'])
-        self.assert_valid_command(['sync',
-                                   'force'])
-        assert_equal({}, validate_command(sigdict, ['sync']))
-        assert_equal({}, validate_command(sigdict, ['sync',
-                                                    'force',
-                                                    '--yes-i-really-mean-it',
-                                                    '--i-know-what-i-am-doing',
-                                                    'toomany']))
-
-    def test_heap(self):
-        assert_equal({}, validate_command(sigdict, ['heap']))
-        assert_equal({}, validate_command(sigdict, ['heap', 'invalid']))
-        self.assert_valid_command(['heap', 'dump'])
-        self.assert_valid_command(['heap', 'start_profiler'])
-        self.assert_valid_command(['heap', 'stop_profiler'])
-        self.assert_valid_command(['heap', 'release'])
-        self.assert_valid_command(['heap', 'stats'])
-
-    def test_quorum(self):
-        assert_equal({}, validate_command(sigdict, ['quorum']))
-        assert_equal({}, validate_command(sigdict, ['quorum', 'invalid']))
-        self.assert_valid_command(['quorum', 'enter'])
-        self.assert_valid_command(['quorum', 'exit'])
-        assert_equal({}, validate_command(sigdict, ['quorum',
-                                                    'enter',
-                                                    'toomany']))
-
-    def test_tell(self):
-        assert_equal({}, validate_command(sigdict, ['tell']))
-        assert_equal({}, validate_command(sigdict, ['tell', 'invalid']))
-        for name in ('osd', 'mon', 'client', 'mds'):
-            assert_equal({}, validate_command(sigdict, ['tell', name]))
-            assert_equal({}, validate_command(sigdict, ['tell',
-                                                        name + ".42"]))
-            self.assert_valid_command(['tell', name + ".42", 'something'])
-            self.assert_valid_command(['tell', name + ".42",
-                                       'something',
-                                       'something else'])
-
-
-class TestMDS(TestArgparse):
-
-    def test_stat(self):
-        self.check_no_arg('mds', 'stat')
-
-    def test_dump(self):
-        self.check_0_or_1_natural_arg('mds', 'dump')
-
-    def test_tell(self):
-        self.assert_valid_command(['mds', 'tell',
-                                   'someone',
-                                   'something'])
-        self.assert_valid_command(['mds', 'tell',
-                                   'someone',
-                                   'something',
-                                   'something else'])
-        assert_equal({}, validate_command(sigdict, ['mds', 'tell']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'tell',
-                                                    'someone']))
-
-    def test_compat_show(self):
-        self.assert_valid_command(['mds', 'compat', 'show'])
-        assert_equal({}, validate_command(sigdict, ['mds', 'compat']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'compat',
-                                                    'show', 'toomany']))
-
-    def test_stop(self):
-        self.assert_valid_command(['mds', 'stop', 'someone'])
-        assert_equal({}, validate_command(sigdict, ['mds', 'stop']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'stop',
-                                                    'someone', 'toomany']))
-
-    def test_deactivate(self):
-        self.assert_valid_command(['mds', 'deactivate', 'someone'])
-        assert_equal({}, validate_command(sigdict, ['mds', 'deactivate']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'deactivate',
-                                                    'someone', 'toomany']))
-
-    def test_set_max_mds(self):
-        self.check_1_natural_arg('mds', 'set_max_mds')
-
-    def test_setmap(self):
-        self.check_1_natural_arg('mds', 'setmap')
-
-    def test_set_state(self):
-        self.assert_valid_command(['mds', 'set_state', '1', '2'])
-        assert_equal({}, validate_command(sigdict, ['mds', 'set_state']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'set_state', '-1']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'set_state',
-                                                    '1', '-1']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'set_state',
-                                                    '1', '21']))
-
-    def test_fail(self):
-        self.check_1_string_arg('mds', 'fail')
-
-    def test_rm(self):
-        assert_equal({}, validate_command(sigdict, ['mds', 'rm']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'rm', '1']))
-        for name in ('osd', 'mon', 'client', 'mds'):
-            self.assert_valid_command(['mds', 'rm', '1', name + '.42'])
-            assert_equal({}, validate_command(sigdict, ['mds', 'rm',
-                                                        '-1', name + '.42']))
-            assert_equal({}, validate_command(sigdict, ['mds', 'rm',
-                                                        '-1', name]))
-            assert_equal({}, validate_command(sigdict, ['mds', 'rm',
-                                                        '1', name + '.42',
-                                                        'toomany']))
-
-    def test_rmfailed(self):
-        self.check_1_natural_arg('mds', 'rmfailed')
-
-    def test_cluster_down(self):
-        self.check_no_arg('mds', 'cluster_down')
-
-    def test_cluster_up(self):
-        self.check_no_arg('mds', 'cluster_up')
-
-    def test_compat_rm_compat(self):
-        self.assert_valid_command(['mds', 'compat', 'rm_compat', '1'])
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'compat',
-                                                    'rm_compat']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'compat',
-                                                    'rm_compat', '-1']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'compat',
-                                                    'rm_compat', '1', '1']))
-
-    def test_incompat_rm_incompat(self):
-        self.assert_valid_command(['mds', 'compat', 'rm_incompat', '1'])
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'compat',
-                                                    'rm_incompat']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'compat',
-                                                    'rm_incompat', '-1']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'compat',
-                                                    'rm_incompat', '1', '1']))
-
-    def test_mds_set(self):
-        self.assert_valid_command(['mds', 'set', 'max_mds', '2'])
-        self.assert_valid_command(['mds', 'set', 'max_file_size', '2'])
-        self.assert_valid_command(['mds', 'set', 'allow_new_snaps', 'no'])
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'set',
-                                                    'invalid']))
-
-    def test_add_data_pool(self):
-        self.assert_valid_command(['mds', 'add_data_pool', '1'])
-        self.assert_valid_command(['mds', 'add_data_pool', 'foo'])
-
-    def test_remove_data_pool(self):
-        self.assert_valid_command(['mds', 'remove_data_pool', '1'])
-        self.assert_valid_command(['mds', 'remove_data_pool', 'foo'])
-
-    def test_newfs(self):
-        self.assert_valid_command(['mds', 'newfs', '1', '2',
-                                   '--yes-i-really-mean-it'])
-        self.assert_valid_command(['mds', 'newfs', '1', '2'])
-        assert_equal({}, validate_command(sigdict, ['mds', 'newfs']))
-        assert_equal({}, validate_command(sigdict, ['mds', 'newfs', '1']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'newfs',
-                                                    '1',
-                                                    '2',
-                                                    '--yes-i-really-mean-it',
-                                                    'toomany']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'newfs',
-                                                    '-1',
-                                                    '2',
-                                                    '--yes-i-really-mean-it']))
-        assert_equal({}, validate_command(sigdict, ['mds',
-                                                    'newfs',
-                                                    '1',
-                                                    '-1',
-                                                    '--yes-i-really-mean-it']))
-
-
-class TestFS(TestArgparse):
-    def test_fs_new(self):
-        self.assert_valid_command(['fs', 'new', 'default', 'metadata', 'data'])
-
-    def test_fs_rm(self):
-        self.assert_valid_command(['fs', 'rm', 'default'])
-        self.assert_valid_command(['fs', 'rm', 'default', '--yes-i-really-mean-it'])
-        assert_equal({}, validate_command(sigdict, ['fs', 'rm', 'default', '--yes-i-really-mean-it', 'toomany']))
-
-    def test_fs_ls(self):
-        self.assert_valid_command(['fs', 'ls'])
-        assert_equal({}, validate_command(sigdict, ['fs', 'ls', 'toomany']))
-
-class TestMon(TestArgparse):
-
-    def test_dump(self):
-        self.check_0_or_1_natural_arg('mon', 'dump')
-
-    def test_stat(self):
-        self.check_no_arg('mon', 'stat')
-
-    def test_getmap(self):
-        self.check_0_or_1_natural_arg('mon', 'getmap')
-
-    def test_add(self):
-        self.assert_valid_command(['mon', 'add', 'name', '1.2.3.4:1234'])
-        assert_equal({}, validate_command(sigdict, ['mon', 'add']))
-        assert_equal({}, validate_command(sigdict, ['mon', 'add', 'name']))
-        assert_equal({}, validate_command(sigdict, ['mon', 'add',
-                                                    'name',
-                                                    '400.500.600.700']))
-        assert_equal({}, validate_command(sigdict, ['mon', 'add', 'name',
-                                                    '1.2.3.4:1234',
-                                                    'toomany']))
-
-    def test_remove(self):
-        self.assert_valid_command(['mon', 'remove', 'name'])
-        assert_equal({}, validate_command(sigdict, ['mon', 'remove']))
-        assert_equal({}, validate_command(sigdict, ['mon', 'remove',
-                                                    'name', 'toomany']))
-
-
-class TestOSD(TestArgparse):
-
-    def test_stat(self):
-        self.check_no_arg('osd', 'stat')
-
-    def test_dump(self):
-        self.check_0_or_1_natural_arg('osd', 'dump')
-
-    def test_osd_tree(self):
-        self.check_0_or_1_natural_arg('osd', 'tree')
-
-    def test_osd_ls(self):
-        self.check_0_or_1_natural_arg('osd', 'ls')
-
-    def test_osd_getmap(self):
-        self.check_0_or_1_natural_arg('osd', 'getmap')
-
-    def test_osd_getcrushmap(self):
-        self.check_0_or_1_natural_arg('osd', 'getcrushmap')
-
-    def test_perf(self):
-        self.check_no_arg('osd', 'perf')
-
-    def test_getmaxosd(self):
-        self.check_no_arg('osd', 'getmaxosd')
-
-    def test_find(self):
-        self.check_1_natural_arg('osd', 'find')
-
-    def test_map(self):
-        self.assert_valid_command(['osd', 'map', 'poolname', 'objectname'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'map']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'map', 'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'map',
-                                                    'poolname', 'objectname',
-                                                    'toomany']))
-
-    def test_metadata(self):
-        self.check_1_natural_arg('osd', 'metadata')
-
-    def test_scrub(self):
-        self.check_1_string_arg('osd', 'scrub')
-
-    def test_deep_scrub(self):
-        self.check_1_string_arg('osd', 'deep-scrub')
-
-    def test_repair(self):
-        self.check_1_string_arg('osd', 'repair')
-
-    def test_lspools(self):
-        self.assert_valid_command(['osd', 'lspools'])
-        self.assert_valid_command(['osd', 'lspools', '1'])
-        self.assert_valid_command(['osd', 'lspools', '-1'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'lspools',
-                                                    '1', 'toomany']))
-
-    def test_blacklist_ls(self):
-        self.assert_valid_command(['osd', 'blacklist', 'ls'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'blacklist']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
-                                                    'ls', 'toomany']))
-
-    def test_crush_rule(self):
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule']))
-        for subcommand in ('list', 'ls'):
-            self.assert_valid_command(['osd', 'crush', 'rule', subcommand])
-            assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                        'rule', subcommand,
-                                                        'toomany']))
-
-    def test_crush_rule_dump(self):
-        self.assert_valid_command(['osd', 'crush', 'rule', 'dump'])
-        self.assert_valid_command(['osd', 'crush', 'rule', 'dump', 'RULE'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'rule', 'dump',
-                                                    'RULE',
-                                                    'toomany']))
-
-    def test_crush_dump(self):
-        self.assert_valid_command(['osd', 'crush', 'dump'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'dump', 
-                                                    'toomany']))
-
-    def test_setcrushmap(self):
-        self.check_no_arg('osd', 'setcrushmap')
-
-    def test_crush_add_bucket(self):
-        self.assert_valid_command(['osd', 'crush', 'add-bucket',
-                                   'name', 'type'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'add-bucket']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'add-bucket', 'name',
-                                                    'type',
-                                                    'toomany']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'add-bucket', '^^^',
-                                                    'type']))
-
-    def check_crush_setter(self, setter):
-        self.assert_valid_command(['osd', 'crush', setter,
-                                   '*', '2.3', 'AZaz09-_.='])
-        self.assert_valid_command(['osd', 'crush', setter,
-                                   'osd.0', '2.3', 'AZaz09-_.='])
-        self.assert_valid_command(['osd', 'crush', setter,
-                                   '0', '2.3', 'AZaz09-_.='])
-        self.assert_valid_command(['osd', 'crush', setter,
-                                   '0', '2.3', 'AZaz09-_.=', 'AZaz09-_.='])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    setter,
-                                                    'osd.0']))
-        ret = validate_command(sigdict, ['osd', 'crush',
-                                             setter,
-                                             'osd.0',
-                                             '-1.0'])
-        assert ret in [None, {}]
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    setter,
-                                                    'osd.0',
-                                                    '1.0',
-                                                    '^^^']))
-
-    def test_crush_set(self):
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush']))
-        self.check_crush_setter('set')
-
-    def test_crush_add(self):
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush']))
-        self.check_crush_setter('add')
-
-    def test_crush_create_or_move(self):
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush']))
-        self.check_crush_setter('create-or-move')
-
-    def test_crush_move(self):
-        self.assert_valid_command(['osd', 'crush', 'move',
-                                   'AZaz09-_.', 'AZaz09-_.='])
-        self.assert_valid_command(['osd', 'crush', 'move',
-                                   '0', 'AZaz09-_.=', 'AZaz09-_.='])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'move']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'move', 'AZaz09-_.']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'move', '^^^',
-                                                    'AZaz09-_.=']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'move', 'AZaz09-_.',
-                                                    '^^^']))
-
-    def test_crush_link(self):
-        self.assert_valid_command(['osd', 'crush', 'link',
-                                   'name', 'AZaz09-_.='])
-        self.assert_valid_command(['osd', 'crush', 'link',
-                                   'name', 'AZaz09-_.=', 'AZaz09-_.='])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'link']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'link',
-                                                    'name']))
-
-    def test_crush_rm(self):
-        for alias in ('rm', 'remove', 'unlink'):
-            self.assert_valid_command(['osd', 'crush', alias, 'AZaz09-_.'])
-            self.assert_valid_command(['osd', 'crush', alias,
-                                       'AZaz09-_.', 'AZaz09-_.'])
-            assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                        alias]))
-            assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                        alias,
-                                                        'AZaz09-_.',
-                                                        'AZaz09-_.',
-                                                        'toomany']))
-
-    def test_crush_reweight(self):
-        self.assert_valid_command(['osd', 'crush', 'reweight',
-                                   'AZaz09-_.', '2.3'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'reweight']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'reweight',
-                                                    'AZaz09-_.']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'reweight',
-                                                    'AZaz09-_.',
-                                                    '-1.0']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'reweight',
-                                                    '^^^',
-                                                    '2.3']))
-
-    def test_crush_tunables(self):
-        for tunable in ('legacy', 'argonaut', 'bobtail', 'firefly',
-						'optimal', 'default'):
-            self.assert_valid_command(['osd', 'crush', 'tunables',
-                                       tunable])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'tunables']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'tunables',
-                                                    'default', 'toomany']))
-
-    def test_crush_rule_create_simple(self):
-        self.assert_valid_command(['osd', 'crush', 'rule', 'create-simple',
-                                   'AZaz09-_.', 'AZaz09-_.', 'AZaz09-_.'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple',
-                                                    'AZaz09-_.']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple',
-                                                    'AZaz09-_.',
-                                                    'AZaz09-_.']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple',
-                                                    '^^^',
-                                                      'AZaz09-_.',
-                                                    'AZaz09-_.']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple',
-                                                    'AZaz09-_.',
-                                                    '|||',
-                                                      'AZaz09-_.']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple',
-                                                    'AZaz09-_.',
-                                                    'AZaz09-_.',
-                                                    '+++']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-simple',
-                                                    'AZaz09-_.',
-                                                    'AZaz09-_.',
-                                                    'AZaz09-_.',
-                                                    'toomany']))
-
-    def test_crush_rule_create_erasure(self):
-        self.assert_valid_command(['osd', 'crush', 'rule', 'create-erasure',
-                                   'AZaz09-_.'])
-        self.assert_valid_command(['osd', 'crush', 'rule', 'create-erasure',
-                                   'AZaz09-_.', 'whatever'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-erasure']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-erasure',
-                                                    '^^^']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush', 'rule',
-                                                    'create-erasure',
-                                                    'name', '^^^']))
-
-    def test_crush_rule_rm(self):
-        self.assert_valid_command(['osd', 'crush', 'rule', 'rm', 'AZaz09-_.'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'rule', 'rm']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'rule', 'rm',
-                                                    '^^^^']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'crush',
-                                                    'rule', 'rm',
-                                                    'AZaz09-_.',
-                                                    'toomany']))
-
-    def test_setmaxosd(self):
-        self.check_1_natural_arg('osd', 'setmaxosd')
-
-    def test_pause(self):
-        self.check_no_arg('osd', 'pause')
-
-    def test_unpause(self):
-        self.check_no_arg('osd', 'unpause')
-
-    def test_erasure_code_profile_set(self):
-        self.assert_valid_command(['osd', 'erasure-code-profile', 'set',
-                                   'name'])
-        self.assert_valid_command(['osd', 'erasure-code-profile', 'set',
-                                   'name', 'A=B'])
-        self.assert_valid_command(['osd', 'erasure-code-profile', 'set',
-                                   'name', 'A=B', 'C=D'])
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'set']))
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'set',
-                                                    '^^^^']))
-
-    def test_erasure_code_profile_get(self):
-        self.assert_valid_command(['osd', 'erasure-code-profile', 'get',
-                                   'name'])
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'get']))
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'get',
-                                                    '^^^^']))
-
-    def test_erasure_code_profile_rm(self):
-        self.assert_valid_command(['osd', 'erasure-code-profile', 'rm',
-                                   'name'])
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'rm']))
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'rm',
-                                                    '^^^^']))
-
-    def test_erasure_code_profile_ls(self):
-        self.assert_valid_command(['osd', 'erasure-code-profile', 'ls'])
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'erasure-code-profile',
-                                                    'ls',
-                                                    'toomany']))
-
-    def test_set_unset(self):
-        for action in ('set', 'unset'):
-            for flag in ('pause', 'noup', 'nodown', 'noout', 'noin',
-                         'nobackfill', 'norecover', 'noscrub', 'nodeep-scrub'):
-                self.assert_valid_command(['osd', action, flag])
-            assert_equal({}, validate_command(sigdict, ['osd', action]))
-            assert_equal({}, validate_command(sigdict, ['osd', action,
-                                                        'invalid']))
-            assert_equal({}, validate_command(sigdict, ['osd', action,
-                                                        'pause', 'toomany']))
-
-    def test_cluster_snap(self):
-        assert_equal(None, validate_command(sigdict, ['osd', 'cluster_snap']))
-
-    def test_down(self):
-        self.check_1_or_more_string_args('osd', 'down')
-
-    def test_out(self):
-        self.check_1_or_more_string_args('osd', 'out')
-
-    def test_in(self):
-        self.check_1_or_more_string_args('osd', 'in')
-
-    def test_rm(self):
-        self.check_1_or_more_string_args('osd', 'rm')
-
-    def test_reweight(self):
-        self.assert_valid_command(['osd', 'reweight', '1', '0.1'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'reweight']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'reweight',
-                                                    '1']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'reweight',
-                                                    '1', '2.0']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'reweight',
-                                                    '-1', '0.1']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'reweight',
-                                                    '1', '0.1',
-                                                    'toomany']))
-
-    def test_lost(self):
-        self.assert_valid_command(['osd', 'lost', '1',
-                                   '--yes-i-really-mean-it'])
-        self.assert_valid_command(['osd', 'lost', '1'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'lost']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'lost',
-                                                    '1',
-                                                    'what?']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'lost',
-                                                    '-1',
-                                                    '--yes-i-really-mean-it']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'lost',
-                                                    '1',
-                                                    '--yes-i-really-mean-it',
-                                                    'toomany']))
-
-    def test_create(self):
-        uuid = '12345678123456781234567812345678'
-        self.assert_valid_command(['osd', 'create'])
-        self.assert_valid_command(['osd', 'create',
-                                   uuid])
-        assert_equal({}, validate_command(sigdict, ['osd', 'create',
-                                                    'invalid']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'create',
-                                                    uuid,
-                                                    'toomany']))
-
-    def test_blacklist(self):
-        for action in ('add', 'rm'):
-            self.assert_valid_command(['osd', 'blacklist', action,
-                                       '1.2.3.4/567'])
-            self.assert_valid_command(['osd', 'blacklist', action,
-                                       '1.2.3.4'])
-            self.assert_valid_command(['osd', 'blacklist', action,
-                                       '1.2.3.4/567', '600.40'])
-            self.assert_valid_command(['osd', 'blacklist', action,
-                                       '1.2.3.4', '600.40'])
-            assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
-                                                        action,
-                                                        'invalid',
-                                                        '600.40']))
-            assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
-                                                        action,
-                                                        '1.2.3.4/567',
-                                                        '-1.0']))
-            assert_equal({}, validate_command(sigdict, ['osd', 'blacklist',
-                                                        action,
-                                                        '1.2.3.4/567',
-                                                        '600.40',
-                                                        'toomany']))
-
-    def test_pool_mksnap(self):
-        self.assert_valid_command(['osd', 'pool', 'mksnap',
-                                   'poolname', 'snapname'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'mksnap']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'mksnap',
-                                                    'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'mksnap',
-                                                    'poolname', 'snapname',
-                                                    'toomany']))
-
-    def test_pool_rmsnap(self):
-        self.assert_valid_command(['osd', 'pool', 'rmsnap',
-                                   'poolname', 'snapname'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'rmsnap']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'rmsnap',
-                                                    'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'rmsnap',
-                                                    'poolname', 'snapname',
-                                                    'toomany']))
-
-    def test_pool_create(self):
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'replicated'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'erasure', 'A-Za-z0-9-_.', 'ruleset^^'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
-                                                    'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
-                                                    'poolname', '-1']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
-                                                    'poolname',
-                                                    '128', '128',
-                                                    'erasure', '^^^', 
-													'ruleset']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
-                                                    'poolname',
-                                                    '128', '128',
-                                                    'erasure', 'profile',
-                                                    'ruleset',
-												    'toomany']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
-                                                    'poolname',
-                                                    '128', '128',
-                                                    'INVALID', 'profile',
-                                                    'ruleset']))
-
-    def test_pool_delete(self):
-        self.assert_valid_command(['osd', 'pool', 'delete',
-                                   'poolname', 'poolname',
-                                   '--yes-i-really-really-mean-it'])
-        self.assert_valid_command(['osd', 'pool', 'delete',
-                                   'poolname', 'poolname'])
-        self.assert_valid_command(['osd', 'pool', 'delete',
-                                   'poolname'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'delete']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'delete',
-                                                    'poolname', 'poolname',
-                                                    'not really']))
-        assert_equal({}, validate_command(sigdict,
-                                          ['osd', 'pool', 'delete',
-                                           'poolname', 'poolname',
-                                           '--yes-i-really-really-mean-it',
-                                           'toomany']))
-
-    def test_pool_rename(self):
-        self.assert_valid_command(['osd', 'pool', 'rename',
-                                   'poolname', 'othername'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'rename']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'rename',
-                                                    'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'rename',
-                                                    'poolname', 'othername',
-                                                    'toomany']))
-
-    def test_pool_get(self):
-        for var in ('size', 'min_size', 'crash_replay_interval',
-                    'pg_num', 'pgp_num', 'crush_ruleset', 'auid'):
-            self.assert_valid_command(['osd', 'pool', 'get', 'poolname', var])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'get']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'get', 'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'get', 'poolname',
-                                                    'size', 'toomany']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'get', 'poolname',
-                                                    'invalid']))
-
-    def test_pool_set(self):
-        for var in ('size', 'min_size', 'crash_replay_interval',
-                    'pg_num', 'pgp_num', 'crush_ruleset',
-                    'hashpspool', 'auid'):
-            self.assert_valid_command(['osd', 'pool',
-                                       'set', 'poolname', var, 'value'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set', 'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set', 'poolname',
-                                                    'size', 'value',
-                                                    'toomany']))
-
-    def test_pool_set_quota(self):
-        for field in ('max_objects', 'max_bytes'):
-            self.assert_valid_command(['osd', 'pool', 'set-quota',
-                                       'poolname', field, '10K'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set-quota']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set-quota',
-                                                    'poolname']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set-quota',
-                                                    'poolname',
-                                                    'max_objects']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set-quota',
-                                                    'poolname',
-                                                    'invalid',
-                                                    '10K']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool',
-                                                    'set-quota',
-                                                    'poolname',
-                                                    'max_objects',
-                                                    '10K',
-                                                    'toomany']))
-
-    def test_reweight_by_utilization(self):
-        self.assert_valid_command(['osd', 'reweight-by-utilization'])
-        self.assert_valid_command(['osd', 'reweight-by-utilization', '100'])
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'reweight-by-utilization',
-                                                    '50']))
-        assert_equal({}, validate_command(sigdict, ['osd',
-                                                    'reweight-by-utilization',
-                                                    '100',
-                                                    'toomany']))
-
-    def test_thrash(self):
-        self.check_1_natural_arg('osd', 'thrash')
-
-    def test_tier_op(self):
-        for op in ('add', 'remove', 'set-overlay'):
-            self.assert_valid_command(['osd', 'tier', op,
-                                       'poolname', 'othername'])
-            assert_equal({}, validate_command(sigdict, ['osd', 'tier', op]))
-            assert_equal({}, validate_command(sigdict, ['osd', 'tier', op,
-                                                        'poolname']))
-            assert_equal({}, validate_command(sigdict, ['osd', 'tier', op,
-                                                        'poolname',
-                                                        'othername',
-                                                        'toomany']))
-
-    def test_tier_cache_mode(self):
-        for mode in ('none', 'writeback', 'forward', 'readonly', 'readforward'):
-            self.assert_valid_command(['osd', 'tier', 'cache-mode',
-                                       'poolname', mode])
-        assert_equal({}, validate_command(sigdict, ['osd', 'tier',
-                                                    'cache-mode']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'tier',
-                                                    'cache-mode',
-                                                    'invalid']))
-
-    def test_tier_remove_overlay(self):
-        self.assert_valid_command(['osd', 'tier', 'remove-overlay',
-                                   'poolname'])
-        assert_equal({}, validate_command(sigdict, ['osd', 'tier',
-                                                    'remove-overlay']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'tier',
-                                                    'remove-overlay',
-                                                    'poolname',
-                                                    'toomany']))
-
-
-class TestConfigKey(TestArgparse):
-
-    def test_get(self):
-        self.check_1_string_arg('config-key', 'get')
-
-    def test_put(self):
-        self.assert_valid_command(['config-key', 'put',
-                                   'key'])
-        self.assert_valid_command(['config-key', 'put',
-                                   'key', 'value'])
-        assert_equal({}, validate_command(sigdict, ['config-key', 'put']))
-        assert_equal({}, validate_command(sigdict, ['config-key', 'put',
-                                                    'key', 'value',
-                                                    'toomany']))
-
-    def test_del(self):
-        self.check_1_string_arg('config-key', 'del')
-
-    def test_exists(self):
-        self.check_1_string_arg('config-key', 'exists')
-
-    def test_list(self):
-        self.check_no_arg('config-key', 'list')
-# Local Variables:
-# compile-command: "cd ../.. ; make -j4 && 
-#  PYTHONPATH=pybind nosetests --stop \
-#  test/pybind/test_ceph_argparse.py # test_ceph_argparse.py:TestOSD.test_rm"
-# End:
diff --git a/src/test/rgw/test_rgw_manifest.cc b/src/test/rgw/test_rgw_manifest.cc
index 4fb8069..502eaf9 100644
--- a/src/test/rgw/test_rgw_manifest.cc
+++ b/src/test/rgw/test_rgw_manifest.cc
@@ -181,7 +181,7 @@ TEST(TestRGWManifest, obj_with_head_and_tail) {
 
 TEST(TestRGWManifest, multipart) {
   int num_parts = 16;
-  vector <RGWObjManifest> pm(num_parts);
+  RGWObjManifest pm[num_parts];
   rgw_bucket bucket;
   uint64_t part_size = 10 * 1024 * 1024;
   uint64_t stripe_size = 4 * 1024 * 1024;
diff --git a/src/test/run-cli-tests b/src/test/run-cli-tests
index e29ad20..fec60de 100755
--- a/src/test/run-cli-tests
+++ b/src/test/run-cli-tests
@@ -35,8 +35,6 @@ fi
 
 SRCDIR_ABS="$(readlink -f "$SRCDIR")"
 BUILDDIR_ABS="$(readlink -f "$BUILDDIR")"
-FAKE_HOME="$BUILDDIR_ABS/fake_home"
-mkdir -p "$FAKE_HOME"
 
 # cram doesn't like seeing the same foo.t basename twice on the same
 # run, so run it once per directory
@@ -50,7 +48,6 @@ for tool in "$SRCDIR"/cli/*; do
 	CCACHE_DIR="$CCACHE_DIR" \
 	CC="$CC" \
 	CXX="$CXX" \
-	HOME="$FAKE_HOME" \
 	"$SRCDIR/run-cli-tests-maybe-unset-ccache" \
 	"$CRAM_BIN" -v "$@"  --error-dir="$BUILDDIR/cli/$toolname" -- "$tool"/*.t; then
 	FAILED=1
diff --git a/src/test/signals.cc b/src/test/signals.cc
index 2cae0fa..2c7f4d3 100644
--- a/src/test/signals.cc
+++ b/src/test/signals.cc
@@ -1,7 +1,6 @@
 #include "common/config.h"
 #include "common/signal.h"
 #include "global/signal_handler.h"
-#include "common/debug.h"
 
 #include "test/unit.h"
 
@@ -10,8 +9,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-#include "include/assert.h"
-
 static volatile sig_atomic_t got_sigusr1 = 0;
 
 static void handle_sigusr1(int signo)
@@ -114,13 +111,6 @@ TEST(SignalHandler, Multiple)
   shutdown_async_signal_handler();
 }
 
-TEST(SignalHandler, LogInternal)
-{
-  g_ceph_context->_log->inject_segv();
-  ASSERT_DEATH(derr << "foo" << dendl, ".*");
-}
-
-
 /*
 TEST(SignalHandler, MultipleBigFd)
 {
diff --git a/src/test/system/rados_list_parallel.cc b/src/test/system/rados_list_parallel.cc
index 86b4bfa..7af86e4 100644
--- a/src/test/system/rados_list_parallel.cc
+++ b/src/test/system/rados_list_parallel.cc
@@ -139,7 +139,6 @@ public:
 
   int run(void)
   {
-    int ret_val = 0;
     rados_t cl;
     RETURN1_IF_NONZERO(rados_create(&cl, NULL));
     rados_conf_parse_argv(cl, m_argc, m_argv);
@@ -172,8 +171,7 @@ public:
       for (int i = 0; i < r; ++i)
 	++d;
       if (d == to_add.end()) {
-	ret_val = -EDOM;
-	goto out;
+	return -EDOM;
       }
       std::string oid(d->second);
       to_add.erase(d);
@@ -183,8 +181,7 @@ public:
       if (ret != 0) {
 	printf("%s: rados_write(%s) failed with error %d\n",
 	       get_id_str(), oid.c_str(), ret);
-	ret_val = ret;
-	goto out;
+	return ret;
       }
       ++added;
       if ((added % 25) == 0) {
@@ -198,11 +195,10 @@ public:
 
     printf("%s: added %d objects\n", get_id_str(), added);
 
-  out:
     rados_ioctx_destroy(io_ctx);
     rados_shutdown(cl);
 
-    return ret_val;
+    return 0;
   }
 private:
   std::string m_pool_name;
diff --git a/src/test/system/rados_watch_notify.cc b/src/test/system/rados_watch_notify.cc
index 5a081ee..6517f33 100644
--- a/src/test/system/rados_watch_notify.cc
+++ b/src/test/system/rados_watch_notify.cc
@@ -73,12 +73,10 @@ int main(int argc, const char **argv)
 		    1, 0, pool, "0.obj");
     StRadosNotify r3(argc, argv, setup_sem, watch_sem, notify_sem,
 		     0, pool, "0.obj");
-    StRadosDeletePool r4(argc, argv, notify_sem, NULL, pool);
     vector<SysTestRunnable*> vec;
     vec.push_back(&r1);
     vec.push_back(&r2);
     vec.push_back(&r3);
-    vec.push_back(&r4);
     std::string error = SysTestRunnable::run_until_finished(vec);
     if (!error.empty()) {
       printf("test1: got error: %s\n", error.c_str());
@@ -99,12 +97,10 @@ int main(int argc, const char **argv)
 		    0, -ENOENT, pool, "0.obj");
     StRadosNotify r3(argc, argv, setup_sem, watch_sem, notify_sem,
 		     -ENOENT, pool, "0.obj");
-    StRadosDeletePool r4(argc, argv, notify_sem, NULL, pool);
     vector<SysTestRunnable*> vec;
     vec.push_back(&r1);
     vec.push_back(&r2);
     vec.push_back(&r3);
-    vec.push_back(&r4);
     std::string error = SysTestRunnable::run_until_finished(vec);
     if (!error.empty()) {
       printf("test2: got error: %s\n", error.c_str());
@@ -175,7 +171,6 @@ int main(int argc, const char **argv)
     StRadosDeleteObjs r4(argc, argv, notify_sem, deleted_sem, 1, pool, ".obj");
     StRadosNotify r5(argc, argv, setup_sem, deleted_sem, finished_notifies_sem,
 		     -ENOENT, pool, "0.obj");
-    StRadosDeletePool r6(argc, argv, finished_notifies_sem, NULL, pool);
 
     vector<SysTestRunnable*> vec;
     vec.push_back(&r1);
@@ -183,7 +178,6 @@ int main(int argc, const char **argv)
     vec.push_back(&r3);
     vec.push_back(&r4);
     vec.push_back(&r5);
-    vec.push_back(&r6);
     std::string error = SysTestRunnable::run_until_finished(vec);
     if (!error.empty()) {
       printf("test4: got error: %s\n", error.c_str());
diff --git a/src/test/system/st_rados_create_pool.cc b/src/test/system/st_rados_create_pool.cc
index 78083c7..6bbe628 100644
--- a/src/test/system/st_rados_create_pool.cc
+++ b/src/test/system/st_rados_create_pool.cc
@@ -64,7 +64,6 @@ StRadosCreatePool::
 int StRadosCreatePool::
 run()
 {
-  int ret_val = 0;
   rados_t cl;
   RETURN1_IF_NONZERO(rados_create(&cl, NULL));
   rados_conf_parse_argv(cl, m_argc, m_argv);
@@ -94,15 +93,12 @@ run()
     int ret = rados_write(io_ctx, oid, buf.c_str(), buf.size(), 0);
     if (ret != 0) {
       printf("%s: rados_write error %d\n", get_id_str(), ret);
-      ret_val = ret;
-      goto out;
+      return ret;
     }
     if (((i % 25) == 0) || (i == m_num_objects - 1)) {
       printf("%s: created object %d...\n", get_id_str(), i);
     }
   }
-
-out:
   printf("%s: finishing.\n", get_id_str());
   if (m_pool_setup_sem)
     m_pool_setup_sem->post();
@@ -110,5 +106,5 @@ out:
     m_close_create_pool->wait();
   rados_ioctx_destroy(io_ctx);
   rados_shutdown(cl);
-  return ret_val;
+  return 0;
 }
diff --git a/src/test/system/systest_runnable.cc b/src/test/system/systest_runnable.cc
index 55cab0a..ec9b823 100644
--- a/src/test/system/systest_runnable.cc
+++ b/src/test/system/systest_runnable.cc
@@ -199,9 +199,7 @@ void *systest_runnable_pthread_helper(void *arg)
 {
   SysTestRunnable *st = static_cast < SysTestRunnable * >(arg);
   st->update_id_str(true);
-  printf("%s: starting.\n", st->get_id_str());
   int ret = st->run();
-  printf("%s: shutting down.\n", st->get_id_str());
   return (void*)(uintptr_t)ret;
 }
 
diff --git a/src/test/test_rbd_replay.cc b/src/test/test_rbd_replay.cc
deleted file mode 100644
index 526fccf..0000000
--- a/src/test/test_rbd_replay.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Adam Crume <adamcrume at gmail.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "common/escape.h"
-#include "gtest/gtest.h"
-#include <stdint.h>
-#include <boost/foreach.hpp>
-#include <cstdarg>
-#include "rbd_replay/Deser.hpp"
-#include "rbd_replay/ImageNameMap.hpp"
-#include "rbd_replay/ios.hpp"
-#include "rbd_replay/rbd_loc.hpp"
-#include "rbd_replay/Ser.hpp"
-
-
-using namespace rbd_replay;
-
-std::ostream& operator<<(std::ostream& o, const rbd_loc& name) {
-  return o << "('" << name.pool << "', '" << name.image << "', '" << name.snap << "')";
-}
-
-static void add_mapping(ImageNameMap *map, std::string mapping_string) {
-  ImageNameMap::Mapping mapping;
-  if (!map->parse_mapping(mapping_string, &mapping)) {
-    ASSERT_TRUE(false) << "Failed to parse mapping string '" << mapping_string << "'";
-  }
-  map->add_mapping(mapping);
-}
-
-TEST(RBDReplay, Ser) {
-  std::ostringstream oss;
-  rbd_replay::Ser ser(oss);
-  ser.write_uint32_t(0x01020304u);
-  ser.write_string("hello");
-  ser.write_bool(true);
-  ser.write_bool(false);
-  std::string s(oss.str());
-  const char* data = s.data();
-  size_t size = s.size();
-  ASSERT_EQ(15U, size);
-  const char expected_data[] = {1, 2, 3, 4, 0, 0, 0, 5, 'h', 'e', 'l', 'l', 'o', 1, 0};
-  for (size_t i = 0; i < size; i++) {
-    EXPECT_EQ(expected_data[i], data[i]);
-  }
-}
-
-TEST(RBDReplay, Deser) {
-  const char data[] = {1, 2, 3, 4, 0, 0, 0, 5, 'h', 'e', 'l', 'l', 'o', 1, 0};
-  const std::string s(data, sizeof(data));
-  std::istringstream iss(s);
-  rbd_replay::Deser deser(iss);
-  EXPECT_FALSE(deser.eof());
-  EXPECT_EQ(0x01020304u, deser.read_uint32_t());
-  EXPECT_FALSE(deser.eof());
-  EXPECT_EQ("hello", deser.read_string());
-  EXPECT_FALSE(deser.eof());
-  EXPECT_TRUE(deser.read_bool());
-  EXPECT_FALSE(deser.eof());
-  EXPECT_FALSE(deser.read_bool());
-  EXPECT_FALSE(deser.eof());
-  deser.read_uint8_t();
-  EXPECT_TRUE(deser.eof());
-}
-
-TEST(RBDReplay, ImageNameMap) {
-  ImageNameMap m;
-  add_mapping(&m, "x at y=y at x");
-  add_mapping(&m, "a\\=b at c=h at i");
-  add_mapping(&m, "a at b\\=c=j at k");
-  add_mapping(&m, "a\\@b at c=d at e");
-  add_mapping(&m, "a at b\\@c=f at g");
-  add_mapping(&m, "image at snap_1=image_1");
-  ImageNameMap::Mapping mapping;
-  EXPECT_FALSE(m.parse_mapping("bad=@@@", &mapping));
-  EXPECT_FALSE(m.parse_mapping("bad==stuff", &mapping));
-  EXPECT_EQ(rbd_loc("", "y", "x"), m.map(rbd_loc("", "x", "y")));
-  EXPECT_EQ(rbd_loc("", "h", "i"), m.map(rbd_loc("", "a=b", "c")));
-  EXPECT_EQ(rbd_loc("", "j", "k"), m.map(rbd_loc("", "a", "b=c")));
-  EXPECT_EQ(rbd_loc("", "d", "e"), m.map(rbd_loc("", "a at b", "c")));
-  EXPECT_EQ(rbd_loc("", "f", "g"), m.map(rbd_loc("", "a", "b at c")));
-  EXPECT_EQ(rbd_loc("", "image_1", ""), m.map(rbd_loc("", "image", "snap_1")));
-}
-
-TEST(RBDReplay, rbd_loc_str) {
-  EXPECT_EQ("", rbd_loc("", "", "").str());
-  EXPECT_EQ("a/", rbd_loc("a", "", "").str());
-  EXPECT_EQ("b", rbd_loc("", "b", "").str());
-  EXPECT_EQ("a/b", rbd_loc("a", "b", "").str());
-  EXPECT_EQ("@c", rbd_loc("", "", "c").str());
-  EXPECT_EQ("a/@c", rbd_loc("a", "", "c").str());
-  EXPECT_EQ("b at c", rbd_loc("", "b", "c").str());
-  EXPECT_EQ("a/b at c", rbd_loc("a", "b", "c").str());
-  EXPECT_EQ("a\\@x/b\\@y at c\\@z", rbd_loc("a at x", "b at y", "c at z").str());
-  EXPECT_EQ("a\\/x/b\\/y at c\\/z", rbd_loc("a/x", "b/y", "c/z").str());
-  EXPECT_EQ("a\\\\x/b\\\\y at c\\\\z", rbd_loc("a\\x", "b\\y", "c\\z").str());
-}
-
-TEST(RBDReplay, rbd_loc_parse) {
-  rbd_loc m("x", "y", "z");
-
-  EXPECT_TRUE(m.parse(""));
-  EXPECT_EQ("", m.pool);
-  EXPECT_EQ("", m.image);
-  EXPECT_EQ("", m.snap);
-
-  EXPECT_TRUE(m.parse("a/"));
-  EXPECT_EQ("a", m.pool);
-  EXPECT_EQ("", m.image);
-  EXPECT_EQ("", m.snap);
-
-  EXPECT_TRUE(m.parse("b"));
-  EXPECT_EQ("", m.pool);
-  EXPECT_EQ("b", m.image);
-  EXPECT_EQ("", m.snap);
-
-  EXPECT_TRUE(m.parse("a/b"));
-  EXPECT_EQ("a", m.pool);
-  EXPECT_EQ("b", m.image);
-  EXPECT_EQ("", m.snap);
-
-  EXPECT_TRUE(m.parse("@c"));
-  EXPECT_EQ("", m.pool);
-  EXPECT_EQ("", m.image);
-  EXPECT_EQ("c", m.snap);
-
-  EXPECT_TRUE(m.parse("a/@c"));
-  EXPECT_EQ("a", m.pool);
-  EXPECT_EQ("", m.image);
-  EXPECT_EQ("c", m.snap);
-
-  EXPECT_TRUE(m.parse("b at c"));
-  EXPECT_EQ("", m.pool);
-  EXPECT_EQ("b", m.image);
-  EXPECT_EQ("c", m.snap);
-
-  EXPECT_TRUE(m.parse("a/b at c"));
-  EXPECT_EQ("a", m.pool);
-  EXPECT_EQ("b", m.image);
-  EXPECT_EQ("c", m.snap);
-
-  EXPECT_TRUE(m.parse("a\\@x/b\\@y at c\\@z"));
-  EXPECT_EQ("a at x", m.pool);
-  EXPECT_EQ("b at y", m.image);
-  EXPECT_EQ("c at z", m.snap);
-
-  EXPECT_TRUE(m.parse("a\\/x/b\\/y at c\\/z"));
-  EXPECT_EQ("a/x", m.pool);
-  EXPECT_EQ("b/y", m.image);
-  EXPECT_EQ("c/z", m.snap);
-
-  EXPECT_TRUE(m.parse("a\\\\x/b\\\\y at c\\\\z"));
-  EXPECT_EQ("a\\x", m.pool);
-  EXPECT_EQ("b\\y", m.image);
-  EXPECT_EQ("c\\z", m.snap);
-
-  EXPECT_FALSE(m.parse("a at b@c"));
-  EXPECT_FALSE(m.parse("a/b/c"));
-  EXPECT_FALSE(m.parse("a at b/c"));
-}
-
-static IO::ptr mkio(action_id_t ionum, ...) {
-  IO::ptr io(new StartThreadIO(ionum, ionum, 0));
-
-  va_list ap;
-  va_start(ap, ionum);
-  while (true) {
-    IO::ptr* dep = va_arg(ap, IO::ptr*);
-    if (!dep) {
-      break;
-    }
-    io->dependencies().insert(*dep);
-  }
-  va_end(ap);
-
-  return io;
-}
-
-TEST(RBDReplay, batch_unreachable_from) {
-  io_set_t deps;
-  io_set_t base;
-  io_set_t unreachable;
-  IO::ptr io1(mkio(1, NULL));
-  IO::ptr io2(mkio(2, &io1, NULL));
-  IO::ptr io3(mkio(3, &io2, NULL));
-  IO::ptr io4(mkio(4, &io1, NULL));
-  IO::ptr io5(mkio(5, &io2, &io4, NULL));
-  IO::ptr io6(mkio(6, &io3, &io5, NULL));
-  IO::ptr io7(mkio(7, &io4, NULL));
-  IO::ptr io8(mkio(8, &io5, &io7, NULL));
-  IO::ptr io9(mkio(9, &io6, &io8, NULL));
-  // 1 (deps) <-- 2 (deps) <-- 3 (deps)
-  // ^            ^            ^
-  // |            |            |
-  // 4 <--------- 5 (base) <-- 6 (deps)
-  // ^            ^            ^
-  // |            |            |
-  // 7 <--------- 8 <--------- 9
-  deps.insert(io1);
-  deps.insert(io2);
-  deps.insert(io3);
-  deps.insert(io6);
-  base.insert(io5);
-  // Anything in 'deps' which is not reachable from 'base' is added to 'unreachable'
-  batch_unreachable_from(deps, base, &unreachable);
-  EXPECT_EQ(0U, unreachable.count(io1));
-  EXPECT_EQ(0U, unreachable.count(io2));
-  EXPECT_EQ(1U, unreachable.count(io3));
-  EXPECT_EQ(0U, unreachable.count(io4));
-  EXPECT_EQ(0U, unreachable.count(io5));
-  EXPECT_EQ(1U, unreachable.count(io6));
-  EXPECT_EQ(0U, unreachable.count(io7));
-  EXPECT_EQ(0U, unreachable.count(io8));
-  EXPECT_EQ(0U, unreachable.count(io9));
-}
diff --git a/src/test/test_rgw_admin_log.cc b/src/test/test_rgw_admin_log.cc
index 8b1a22b..f49a107 100644
--- a/src/test/test_rgw_admin_log.cc
+++ b/src/test/test_rgw_admin_log.cc
@@ -717,7 +717,8 @@ unsigned get_datalog_shard_id(const char *bucket_name, int max_shards) {
 
 TEST(TestRGWAdmin, datalog_list) {
   string start_time, 
-         end_time;
+         end_time,
+         start_time_2;
   const char *cname = "datalog",
              *perm = "*";
   string rest_req;
@@ -790,7 +791,7 @@ TEST(TestRGWAdmin, datalog_list) {
     list<rgw_data_change>::iterator it = (entries.begin());
     EXPECT_EQ((*it).entity_type, ENTITY_TYPE_BUCKET);
     EXPECT_EQ((*it).key.compare(TEST_BUCKET_NAME), 0);
-    ++it; 
+    it++; 
     EXPECT_EQ((*it).entity_type, ENTITY_TYPE_BUCKET);
     EXPECT_EQ((*it).key.compare(TEST_BUCKET_NAME), 0);
   }
@@ -999,7 +1000,7 @@ TEST(TestRGWAdmin, datalog_trim) {
   EXPECT_EQ(200U, g_test->get_resp_code());
   entries.clear();
   get_datalog_list(entries);
-  EXPECT_TRUE(!entries.empty());
+  EXPECT_TRUE(entries.size() > 0);
 
   ss.str("");
   ss << "/admin/log?type=data&id=" << shard_id << "&start-time=" << start_time 
@@ -1016,7 +1017,7 @@ TEST(TestRGWAdmin, datalog_trim) {
   EXPECT_EQ(200U, g_test->get_resp_code());
   entries.clear();
   get_datalog_list(entries);
-  EXPECT_TRUE(entries.empty());
+  EXPECT_TRUE(entries.size() == 0);
 
   ASSERT_EQ(0, caps_rm(cname, perm));
   perm = "write";
@@ -1081,15 +1082,15 @@ TEST(TestRGWAdmin, mdlog_list) {
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("write") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("complete") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("write") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("complete") == 0);
@@ -1115,15 +1116,15 @@ TEST(TestRGWAdmin, mdlog_list) {
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("write") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("complete") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("write") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("complete") == 0);
@@ -1151,14 +1152,14 @@ TEST(TestRGWAdmin, mdlog_list) {
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("remove") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("write") == 0);
-    ++it;
+    it++;
     EXPECT_TRUE(it->section.compare("user") == 0);
     EXPECT_TRUE(it->name.compare(uid) == 0);
     EXPECT_TRUE(it->log_data.status.compare("complete") == 0);
@@ -1219,7 +1220,8 @@ TEST(TestRGWAdmin, mdlog_list) {
 
 TEST(TestRGWAdmin, mdlog_trim) {
   string start_time, 
-         end_time;
+         end_time,
+         start_time_2;
   const char *cname = "mdlog",
              *perm = "*";
   string rest_req;
@@ -1415,7 +1417,7 @@ TEST(TestRGWAdmin, bilog_list) {
     EXPECT_EQ(it->object.compare(TEST_BUCKET_OBJECT), 0);
     EXPECT_EQ(it->status.compare("pending"), 0);
     EXPECT_EQ(it->index_ver, 1U);
-    ++it;
+    it++;
     EXPECT_EQ(it->op.compare("write"), 0);
     EXPECT_EQ(it->object.compare(TEST_BUCKET_OBJECT), 0);
     EXPECT_EQ(it->status.compare("complete"), 0);
@@ -1442,12 +1444,12 @@ TEST(TestRGWAdmin, bilog_list) {
   if (entries.size() == 4) {
     list<cls_bilog_entry>::iterator it = entries.begin();
 
-    ++it; ++it;
+    it++; it++;
     EXPECT_EQ(it->op.compare("write"), 0);
     EXPECT_EQ(it->object.compare(TEST_BUCKET_OBJECT_1), 0);
     EXPECT_EQ(it->status.compare("pending"), 0);
     EXPECT_EQ(it->index_ver, 3U);
-    ++it;
+    it++;
     EXPECT_EQ(it->op.compare("write"), 0);
     EXPECT_EQ(it->object.compare(TEST_BUCKET_OBJECT_1), 0);
     EXPECT_EQ(it->status.compare("complete"), 0);
@@ -1466,13 +1468,13 @@ TEST(TestRGWAdmin, bilog_list) {
   if (entries.size() == 6) {
     list<cls_bilog_entry>::iterator it = entries.begin();
     
-    ++it; ++it; ++it; ++it;
+    it++; it++; it++; it++;
     marker = it->op_id;
     EXPECT_EQ(it->op.compare("del"), 0);
     EXPECT_EQ(it->object.compare(TEST_BUCKET_OBJECT), 0);
     EXPECT_EQ(it->status.compare("pending"), 0);
     EXPECT_EQ(it->index_ver, 5U);
-    ++it;
+    it++;
     EXPECT_EQ(it->op.compare("del"), 0);
     EXPECT_EQ(it->object.compare(TEST_BUCKET_OBJECT), 0);
     EXPECT_EQ(it->status.compare("complete"), 0);
@@ -1490,7 +1492,7 @@ TEST(TestRGWAdmin, bilog_list) {
   if (entries.size() == 2U) {
     list<cls_bilog_entry>::iterator it = entries.begin();
     EXPECT_EQ(it->index_ver, 5U);
-    ++it;
+    it++;
     EXPECT_EQ(it->index_ver, 6U);
     EXPECT_EQ(it->op.compare("del"), 0);
   }
@@ -1553,7 +1555,7 @@ TEST(TestRGWAdmin, bilog_trim) {
 
   list<cls_bilog_entry>::iterator it = entries.begin();
   start_marker = it->op_id;
-  ++it;
+  it++;
   end_marker = it->op_id;
 
   rest_req = "/admin/log?type=bucket-index&bucket="TEST_BUCKET_NAME;
diff --git a/src/test/test_rgw_admin_meta.cc b/src/test/test_rgw_admin_meta.cc
index 74bc8ed..fb9cf86 100644
--- a/src/test/test_rgw_admin_meta.cc
+++ b/src/test/test_rgw_admin_meta.cc
@@ -578,7 +578,7 @@ TEST(TestRGWAdmin, meta_list){
   vector<string> l;
   l = parser.get_array_elements();
   for(vector<string>::iterator it = l.begin();
-      it != l.end(); ++it) {
+      it != l.end(); it++) {
     if((*it).compare("\"user\"") == 0) {
       found = true;
       break;
@@ -600,7 +600,7 @@ TEST(TestRGWAdmin, meta_list){
   l = parser.get_array_elements();
   EXPECT_EQ(1U, l.size());
   for(vector<string>::iterator it = l.begin();
-      it != l.end(); ++it) {
+      it != l.end(); it++) {
     if((*it).compare(string("\"") + uid + string("\"")) == 0) {
       found = true;
       break;
@@ -622,7 +622,7 @@ TEST(TestRGWAdmin, meta_list){
   EXPECT_EQ(2U, l.size());
   bool found2 = false;
   for(vector<string>::iterator it = l.begin();
-      it != l.end(); ++it) {
+      it != l.end(); it++) {
     if((*it).compare(string("\"") + uid + string("\"")) == 0) {
       found = true;
     }
diff --git a/src/test/test_rgw_admin_opstate.cc b/src/test/test_rgw_admin_opstate.cc
index 5687225..9c8835c 100644
--- a/src/test/test_rgw_admin_opstate.cc
+++ b/src/test/test_rgw_admin_opstate.cc
@@ -624,7 +624,7 @@ TEST(TestRGWAdmin, opstate_set_list_delete) {
     EXPECT_TRUE((*it).object.compare(obj_1) == 0);
     EXPECT_EQ((*it).state, (uint32_t)RGWOpState::OPSTATE_COMPLETE);
 
-    ++it;
+    it++;
     EXPECT_TRUE((*it).client_id.compare(cid_2) == 0);
     EXPECT_TRUE((*it).op_id.compare(oid_2) == 0);
     EXPECT_TRUE((*it).object.compare(obj_2) == 0);
diff --git a/src/test/test_snap_mapper.cc b/src/test/test_snap_mapper.cc
index 7f0fae3..04db762 100644
--- a/src/test/test_snap_mapper.cc
+++ b/src/test/test_snap_mapper.cc
@@ -453,7 +453,7 @@ public:
     uint32_t mask,
     uint32_t bits)
     : driver(driver),
-      mapper(new SnapMapper(driver, mask, bits, 0, shard_id_t(1))),
+      mapper(new SnapMapper(driver, mask, bits, 0, 1)),
              mask(mask), bits(bits),
       lock("lock") {}
 
diff --git a/src/test/vstart_wrapped_tests.sh b/src/test/vstart_wrapped_tests.sh
deleted file mode 100755
index d80863f..0000000
--- a/src/test/vstart_wrapped_tests.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2013 Cloudwatt <libre.licensing at cloudwatt.com>
-#
-# Author: Loic Dachary <loic at dachary.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Library Public License for more details.
-#
-code=0
-echo "Run unit tests that need a cluster, using vstart.sh"
-while read line ; do
-  echo "================ START ================"
-  echo "$line"
-  echo "======================================="
-  if ! test/vstart_wrapper.sh $line ; then
-      code=1
-  fi
-  echo "================ STOP ================="  
-done <<EOF
-../qa/workunits/cephtool/test.sh --asok-does-not-need-root
-EOF
-exit $code
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 1a73995..6078eb4 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -11,12 +11,20 @@ ceph_kvstore_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL)
 ceph_kvstore_tool_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph-kvstore-tool
 
-ceph_objectstore_tool_SOURCES = tools/ceph_objectstore_tool.cc
-ceph_objectstore_tool_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) $(BOOST_PROGRAM_OPTIONS_LIBS) $(LIBRADOS)
+
+ceph_filestore_tool_SOURCES = tools/ceph_filestore_tool.cc
+ceph_filestore_tool_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) -lboost_program_options
 if LINUX
-ceph_objectstore_tool_LDADD += -ldl
+ceph_filestore_tool_LDADD += -ldl
 endif # LINUX
-bin_PROGRAMS += ceph_objectstore_tool
+bin_PROGRAMS += ceph_filestore_tool
+
+ceph_filestore_dump_SOURCES = tools/ceph_filestore_dump.cc
+ceph_filestore_dump_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) $(BOOST_PROGRAM_OPTIONS_LIBS)
+if LINUX
+ceph_filestore_dump_LDADD += -ldl
+endif # LINUX
+bin_PROGRAMS += ceph_filestore_dump
 
 monmaptool_SOURCES = tools/monmaptool.cc
 monmaptool_LDADD = $(CEPH_GLOBAL) $(LIBCOMMON)
@@ -63,18 +71,6 @@ rados_SOURCES += common/obj_bencher.cc # needs cleanup so it can go in libcommon
 rados_LDADD = libcls_lock_client.la $(LIBRADOS) $(CEPH_GLOBAL)
 bin_PROGRAMS += rados
 
-cephfs_journal_tool_SOURCES = \
-	tools/cephfs/cephfs-journal-tool.cc \
-	tools/cephfs/JournalTool.cc \
-	tools/cephfs/JournalFilter.cc \
-	tools/cephfs/JournalScanner.cc \
-	tools/cephfs/EventOutput.cc \
-	tools/cephfs/Dumper.cc \
-	tools/cephfs/Resetter.cc \
-	tools/cephfs/MDSUtility.cc
-cephfs_journal_tool_LDADD = $(LIBMDS) $(LIBRADOS) $(CEPH_GLOBAL)
-bin_PROGRAMS += cephfs-journal-tool
-
 if WITH_REST_BENCH
 rest_bench_SOURCES = tools/rest_bench.cc
 rest_bench_SOURCES += common/obj_bencher.cc # needs cleanup so it can go in libcommon.la
@@ -103,13 +99,6 @@ ceph_mon_store_converter_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL)
 bin_PROGRAMS += ceph_mon_store_converter
 
 noinst_HEADERS += \
-	tools/cephfs/JournalTool.h \
-	tools/cephfs/JournalScanner.h \
-	tools/cephfs/JournalFilter.h \
-	tools/cephfs/EventOutput.h \
-	tools/cephfs/Resetter.h \
-	tools/cephfs/Dumper.h \
-	tools/cephfs/MDSUtility.h \
 	tools/rados/rados_sync.h \
 	tools/common.h
 
diff --git a/src/tools/ceph_authtool.cc b/src/tools/ceph_authtool.cc
index 9156b13..f66a3c6 100644
--- a/src/tools/ceph_authtool.cc
+++ b/src/tools/ceph_authtool.cc
@@ -12,16 +12,19 @@
  * 
  */
 
+#include "common/config.h"
+#include "common/strtol.h"
+
 #include "common/ConfUtils.h"
 #include "common/ceph_argparse.h"
-
 #include "global/global_context.h"
 #include "global/global_init.h"
-
 #include "auth/Crypto.h"
 #include "auth/Auth.h"
 #include "auth/KeyRing.h"
 
+#include <sstream>
+
 void usage()
 {
   cout << "usage: ceph-authtool keyringfile [OPTIONS]...\n"
@@ -81,7 +84,7 @@ int main(int argc, const char **argv)
       gen_print_key = true;
     } else if (ceph_argparse_witharg(args, i, &val, "-a", "--add-key", (char*)NULL)) {
       add_key = val;
-    } else if (ceph_argparse_flag(args, i, "-l", "--list", (char*)NULL)) {
+    } else if (ceph_argparse_flag(args, i, &val, "-l", "--list", (char*)NULL)) {
       list = true;
     } else if (ceph_argparse_witharg(args, i, &val, "--caps", (char*)NULL)) {
       caps_fn = val;
diff --git a/src/tools/ceph_conf.cc b/src/tools/ceph_conf.cc
index 30e40ab..09bbc56 100644
--- a/src/tools/ceph_conf.cc
+++ b/src/tools/ceph_conf.cc
@@ -12,11 +12,19 @@
  *
  */
 
+#include <fcntl.h>
+#include <iostream>
 #include <string>
+#include <sys/stat.h>
+#include <sys/types.h>
 
-#include "common/ceph_argparse.h"
-#include "global/global_init.h"
 #include "mon/AuthMonitor.h"
+#include "common/ConfUtils.h"
+#include "global/global_init.h"
+#include "common/entity_name.h"
+#include "common/ceph_argparse.h"
+#include "common/config.h"
+#include "include/str_list.h"
 
 using std::deque;
 using std::string;
@@ -206,7 +214,6 @@ int main(int argc, const char **argv)
     }
   }
 
-  g_ceph_context->_log->flush();
   if (action == "help") {
     usage();
     exit(0);
diff --git a/src/tools/ceph_filestore_dump.cc b/src/tools/ceph_filestore_dump.cc
new file mode 100644
index 0000000..87a8387
--- /dev/null
+++ b/src/tools/ceph_filestore_dump.cc
@@ -0,0 +1,1429 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2013 Inktank
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation.  See file COPYING.
+ *
+ */
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/program_options/option.hpp>
+#include <boost/program_options/options_description.hpp>
+#include <boost/program_options/variables_map.hpp>
+#include <boost/program_options/cmdline.hpp>
+#include <boost/program_options/parsers.hpp>
+#include <iostream>
+#include <set>
+#include <sstream>
+#include <stdlib.h>
+#include <fstream>
+
+#include "common/Formatter.h"
+
+#include "global/global_init.h"
+#include "os/ObjectStore.h"
+#include "os/FileStore.h"
+#include "common/perf_counters.h"
+#include "common/errno.h"
+#include "osd/PGLog.h"
+#include "osd/OSD.h"
+
+namespace po = boost::program_options;
+using namespace std;
+
+enum {
+    TYPE_NONE = 0,
+    TYPE_PG_BEGIN,
+    TYPE_PG_END,
+    TYPE_OBJECT_BEGIN,
+    TYPE_OBJECT_END,
+    TYPE_DATA,
+    TYPE_ATTRS,
+    TYPE_OMAP_HDR,
+    TYPE_OMAP,
+    TYPE_PG_METADATA,
+    END_OF_TYPES,	//Keep at the end
+};
+
+//#define INTERNAL_TEST
+//#define INTERNAL_TEST2
+
+#ifdef INTERNAL_TEST
+CompatSet get_test_compat_set() {
+  CompatSet::FeatureSet ceph_osd_feature_compat;
+  CompatSet::FeatureSet ceph_osd_feature_ro_compat;
+  CompatSet::FeatureSet ceph_osd_feature_incompat;
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_BASE);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_PGINFO);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_OLOC);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEC);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_CATEGORIES);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_HOBJECTPOOL);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_BIGINFO);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEVELDBINFO);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEVELDBLOG);
+#ifdef INTERNAL_TEST2
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SNAPMAPPER);
+  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SHARDS);
+#endif
+  return CompatSet(ceph_osd_feature_compat, ceph_osd_feature_ro_compat,
+		   ceph_osd_feature_incompat);
+}
+#endif
+
+typedef uint8_t sectiontype_t;
+typedef uint32_t mymagic_t;
+typedef int64_t mysize_t;
+const ssize_t max_read = 1024 * 1024;
+const uint16_t shortmagic = 0xffce;	//goes into stream as "ceff"
+//endmagic goes into stream as "ceff ffec"
+const mymagic_t endmagic = (0xecff << 16) | shortmagic;
+const int fd_none = INT_MIN;
+
+//The first FIXED_LENGTH bytes are a fixed
+//portion of the export output.  This includes the overall
+//version number, and size of header and footer.
+//THIS STRUCTURE CAN ONLY BE APPENDED TO.  If it needs to expand,
+//the version can be bumped and then anything
+//can be added to the export format.
+struct super_header {
+  static const uint32_t super_magic = (shortmagic << 16) | shortmagic;
+  static const uint32_t super_ver = 2;
+  static const uint32_t FIXED_LENGTH = 16;
+  uint32_t magic;
+  uint32_t version;
+  uint32_t header_size;
+  uint32_t footer_size;
+
+  super_header() : magic(0), version(0), header_size(0), footer_size(0) { }
+  int read_super();
+
+  void encode(bufferlist& bl) const {
+    ::encode(magic, bl);
+    ::encode(version, bl);
+    ::encode(header_size, bl);
+    ::encode(footer_size, bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    ::decode(magic, bl);
+    ::decode(version, bl);
+    ::decode(header_size, bl);
+    ::decode(footer_size, bl);
+  }
+};
+
+struct header {
+  sectiontype_t type;
+  mysize_t size;
+  header(sectiontype_t type, mysize_t size) :
+    type(type), size(size) { }
+  header(): type(0), size(0) { }
+
+  int get_header();
+
+  void encode(bufferlist& bl) const {
+    uint32_t debug_type = (type << 24) | (type << 16) | shortmagic;
+    ENCODE_START(1, 1, bl);
+    ::encode(debug_type, bl);
+    ::encode(size, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    uint32_t debug_type;
+    DECODE_START(1, bl);
+    ::decode(debug_type, bl);
+    type = debug_type >> 24;
+    ::decode(size, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+struct footer {
+  mymagic_t magic;
+  footer() : magic(endmagic) { }
+
+  int get_footer();
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(magic, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(1, bl);
+    ::decode(magic, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+struct pg_begin {
+  spg_t pgid;
+  OSDSuperblock superblock;
+
+  pg_begin(spg_t pg, const OSDSuperblock& sb):
+    pgid(pg), superblock(sb) { }
+  pg_begin() { }
+
+  void encode(bufferlist& bl) const {
+    // If superblock doesn't include CEPH_FS_FEATURE_INCOMPAT_SHARDS then
+    // shard will be NO_SHARD for a replicated pool.  This means
+    // that we allow the decode by struct_v 2.
+    ENCODE_START(3, 2, bl);
+    ::encode(pgid.pgid, bl);
+    ::encode(superblock, bl);
+    ::encode(pgid.shard, bl);
+    ENCODE_FINISH(bl);
+  }
+  // NOTE: New super_ver prevents decode from ver 1
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(3, bl);
+    ::decode(pgid.pgid, bl);
+    if (struct_v > 1) {
+      ::decode(superblock, bl);
+    }
+    if (struct_v > 2) {
+      ::decode(pgid.shard, bl);
+    } else {
+      pgid.shard = ghobject_t::NO_SHARD;
+    }
+    DECODE_FINISH(bl);
+  }
+};
+
+struct object_begin {
+  ghobject_t hoid;
+  object_begin(const ghobject_t &hoid): hoid(hoid) { }
+  object_begin() { }
+
+  // If superblock doesn't include CEPH_FS_FEATURE_INCOMPAT_SHARDS then
+  // generation will be NO_GEN, shard_id will be NO_SHARD for a replicated
+  // pool.  This means we will allow the decode by struct_v 1.
+  void encode(bufferlist& bl) const {
+    ENCODE_START(2, 1, bl);
+    ::encode(hoid.hobj, bl);
+    ::encode(hoid.generation, bl);
+    ::encode(hoid.shard_id, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(2, bl);
+    ::decode(hoid.hobj, bl);
+    if (struct_v > 1) {
+      ::decode(hoid.generation, bl);
+      ::decode(hoid.shard_id, bl);
+    } else {
+      hoid.generation = ghobject_t::NO_GEN;
+      hoid.shard_id = ghobject_t::NO_SHARD;
+    }
+    DECODE_FINISH(bl);
+  }
+};
+
+struct data_section {
+  uint64_t offset;
+  uint64_t len;
+  bufferlist databl;
+  data_section(uint64_t offset, uint64_t len, bufferlist bl):
+     offset(offset), len(len), databl(bl) { }
+  data_section(): offset(0), len(0) { }
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(offset, bl);
+    ::encode(len, bl);
+    ::encode(databl, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(1, bl);
+    ::decode(offset, bl);
+    ::decode(len, bl);
+    ::decode(databl, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+struct attr_section {
+  map<string,bufferptr> data;
+  attr_section(const map<string,bufferptr> &data) : data(data) { }
+  attr_section() { }
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(data, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(1, bl);
+    ::decode(data, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+struct omap_hdr_section {
+  bufferlist hdr;
+  omap_hdr_section(bufferlist hdr) : hdr(hdr) { }
+  omap_hdr_section() { }
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(hdr, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(1, bl);
+    ::decode(hdr, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+struct omap_section {
+  map<string, bufferlist> omap;
+  omap_section(const map<string, bufferlist> &omap) :
+    omap(omap) { }
+  omap_section() { }
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(omap, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(1, bl);
+    ::decode(omap, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+struct metadata_section {
+  __u8 struct_ver;
+  epoch_t map_epoch;
+  pg_info_t info;
+  pg_log_t log;
+
+  metadata_section(__u8 struct_ver, epoch_t map_epoch, const pg_info_t &info,
+		   const pg_log_t &log)
+    : struct_ver(struct_ver),
+      map_epoch(map_epoch),
+      info(info),
+      log(log) { }
+  metadata_section()
+    : struct_ver(0),
+      map_epoch(0) { }
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(struct_ver, bl);
+    ::encode(map_epoch, bl);
+    ::encode(info, bl);
+    ::encode(log, bl);
+    ENCODE_FINISH(bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    DECODE_START(1, bl);
+    ::decode(struct_ver, bl);
+    ::decode(map_epoch, bl);
+    ::decode(info, bl);
+    ::decode(log, bl);
+    DECODE_FINISH(bl);
+  }
+};
+
+hobject_t infos_oid = OSD::make_infos_oid();
+hobject_t biginfo_oid, log_oid;
+
+int file_fd = fd_none;
+bool debug = false;
+super_header sh;
+
+template <typename T>
+int write_section(sectiontype_t type, const T& obj, int fd) {
+  bufferlist blhdr, bl, blftr;
+  obj.encode(bl);
+  header hdr(type, bl.length());
+  hdr.encode(blhdr);
+  footer ft;
+  ft.encode(blftr);
+
+  int ret = blhdr.write_fd(fd);
+  if (ret) return ret;
+  ret = bl.write_fd(fd);
+  if (ret) return ret;
+  ret = blftr.write_fd(fd);
+  return ret;
+}
+
+int write_simple(sectiontype_t type, int fd)
+{
+  bufferlist hbl;
+
+  header hdr(type, 0);
+  hdr.encode(hbl);
+  return hbl.write_fd(fd);
+}
+
+static void invalid_path(string &path)
+{
+  cout << "Invalid path to osd store specified: " << path << "\n";
+  exit(1);
+}
+
+int get_log(ObjectStore *fs, coll_t coll, spg_t pgid, const pg_info_t &info,
+   PGLog::IndexedLog &log, pg_missing_t &missing)
+{ 
+  map<eversion_t, hobject_t> divergent_priors;
+  try {
+    ostringstream oss;
+    PGLog::read_log(fs, coll, log_oid, info, divergent_priors, log, missing, oss);
+    if (debug && oss.str().size())
+      cerr << oss.str() << std::endl;
+  }
+  catch (const buffer::error &e) {
+    cout << "read_log threw exception error " << e.what() << std::endl;
+    return 1;
+  }
+  return 0;
+}
+
+//Based on RemoveWQ::_process()
+void remove_coll(ObjectStore *store, const coll_t &coll)
+{
+  spg_t pg;
+  coll.is_pg_prefix(pg);
+  OSDriver driver(
+    store,
+    coll_t(),
+    OSD::make_snapmapper_oid());
+  SnapMapper mapper(&driver, 0, 0, 0, pg.shard);
+
+  vector<ghobject_t> objects;
+  ghobject_t next;
+  int r = 0;
+  int64_t num = 0;
+  ObjectStore::Transaction *t = new ObjectStore::Transaction;
+  cout << "remove_coll " << coll << std::endl;
+  while (!next.is_max()) {
+    r = store->collection_list_partial(coll, next, 200, 300, 0,
+      &objects, &next);
+    if (r < 0)
+      goto out;
+    for (vector<ghobject_t>::iterator i = objects.begin();
+	 i != objects.end();
+	 ++i, ++num) {
+
+      OSDriver::OSTransaction _t(driver.get_transaction(t));
+      cout << "remove " << *i << std::endl;
+      int r = mapper.remove_oid(i->hobj, &_t);
+      if (r != 0 && r != -ENOENT) {
+        assert(0);
+      }
+
+      t->remove(coll, *i);
+      if (num >= 30) {
+        store->apply_transaction(*t);
+        delete t;
+        t = new ObjectStore::Transaction;
+        num = 0;
+      }
+    }
+  }
+  t->remove_collection(coll);
+  store->apply_transaction(*t);
+out:
+  delete t;
+}
+
+//Based on part of OSD::load_pgs()
+int finish_remove_pgs(ObjectStore *store, uint64_t *next_removal_seq)
+{
+  vector<coll_t> ls;
+  int r = store->list_collections(ls);
+  if (r < 0) {
+    cout << "finish_remove_pgs: failed to list pgs: " << cpp_strerror(-r)
+      << std::endl;
+    return r;
+  }
+
+  for (vector<coll_t>::iterator it = ls.begin();
+       it != ls.end();
+       ++it) {
+    spg_t pgid;
+    snapid_t snap;
+
+    if (it->is_temp(pgid)) {
+      cout << "finish_remove_pgs " << *it << " clearing temp" << std::endl;
+      OSD::recursive_remove_collection(store, *it);
+      continue;
+    }
+
+    if (it->is_pg(pgid, snap)) {
+      continue;
+    }
+
+    uint64_t seq;
+    if (it->is_removal(&seq, &pgid)) {
+      if (seq >= *next_removal_seq)
+	*next_removal_seq = seq + 1;
+      cout << "finish_remove_pgs removing " << *it << ", seq is "
+	       << seq << " pgid is " << pgid << std::endl;
+      remove_coll(store, *it);
+      continue;
+    }
+
+    //cout << "finish_remove_pgs ignoring unrecognized " << *it << std::endl;
+  }
+  return 0;
+}
+
+int initiate_new_remove_pg(ObjectStore *store, spg_t r_pgid,
+    uint64_t *next_removal_seq)
+{
+  ObjectStore::Transaction *rmt = new ObjectStore::Transaction;
+
+  if (store->collection_exists(coll_t(r_pgid))) {
+      coll_t to_remove = coll_t::make_removal_coll((*next_removal_seq)++, r_pgid);
+      cout << "collection rename " << coll_t(r_pgid)
+	   << " to " << to_remove
+        << std::endl;
+      rmt->collection_rename(coll_t(r_pgid), to_remove);
+  } else {
+    delete rmt;
+    return ENOENT;
+  }
+
+  cout << "remove " << coll_t::META_COLL << " " << log_oid.oid << std::endl;
+  rmt->remove(coll_t::META_COLL, log_oid);
+  cout << "remove " << coll_t::META_COLL << " " << biginfo_oid.oid << std::endl;
+  rmt->remove(coll_t::META_COLL, biginfo_oid);
+
+  store->apply_transaction(*rmt);
+
+  return 0;
+}
+
+int header::get_header()
+{
+  bufferlist ebl;
+  bufferlist::iterator ebliter = ebl.begin();
+  ssize_t bytes;
+
+  bytes = ebl.read_fd(file_fd, sh.header_size);
+  if ((size_t)bytes != sh.header_size) {
+    cout << "Unexpected EOF" << std::endl;
+    return EFAULT;
+  }
+
+  decode(ebliter);
+
+  return 0;
+}
+
+int footer::get_footer()
+{
+  bufferlist ebl;
+  bufferlist::iterator ebliter = ebl.begin();
+  ssize_t bytes;
+
+  bytes = ebl.read_fd(file_fd, sh.footer_size);
+  if ((size_t)bytes != sh.footer_size) {
+    cout << "Unexpected EOF" << std::endl;
+    return EFAULT;
+  }
+
+  decode(ebliter);
+
+  if (magic != endmagic) {
+    cout << "Bad footer magic" << std::endl;
+    return EFAULT;
+  }
+
+  return 0;
+}
+
+int write_info(ObjectStore::Transaction &t, epoch_t epoch, pg_info_t &info,
+    __u8 struct_ver)
+{
+  //Empty for this
+  interval_set<snapid_t> snap_collections; // obsolete
+  map<epoch_t,pg_interval_t> past_intervals;
+  coll_t coll(info.pgid);
+
+  int ret = PG::_write_info(t, epoch,
+    info, coll,
+    past_intervals,
+    snap_collections,
+    infos_oid,
+    struct_ver,
+    true, true);
+  if (ret < 0) ret = -ret;
+  if (ret) cout << "Failed to write info" << std::endl;
+  return ret;
+}
+
+void write_log(ObjectStore::Transaction &t, pg_log_t &log)
+{
+  map<eversion_t, hobject_t> divergent_priors;
+  PGLog::write_log(t, log, log_oid, divergent_priors);
+}
+
+int write_pg(ObjectStore::Transaction &t, epoch_t epoch, pg_info_t &info,
+    pg_log_t &log, __u8 struct_ver)
+{
+  int ret = write_info(t, epoch, info, struct_ver);
+  if (ret) return ret;
+  write_log(t, log);
+  return 0;
+}
+
+int export_file(ObjectStore *store, coll_t cid, ghobject_t &obj)
+{
+  struct stat st;
+  mysize_t total;
+  footer ft;
+
+  int ret = store->stat(cid, obj, &st);
+  if (ret < 0)
+    return ret;
+
+  if (file_fd != STDOUT_FILENO)
+    cout << "read " << obj << std::endl;
+
+  total = st.st_size;
+  if (debug && file_fd != STDOUT_FILENO)
+    cout << "size=" << total << std::endl;
+
+  object_begin objb(obj);
+  ret = write_section(TYPE_OBJECT_BEGIN, objb, file_fd);
+  if (ret < 0)
+    return ret;
+
+  uint64_t offset = 0;
+  bufferlist rawdatabl, databl;
+  while(total > 0) {
+    rawdatabl.clear();
+    databl.clear();
+    mysize_t len = max_read;
+    if (len > total)
+      len = total;
+
+    ret = store->read(cid, obj, offset, len, rawdatabl);
+    if (ret < 0)
+      return ret;
+    if (ret == 0)
+      return -EINVAL;
+
+    data_section dblock(offset, len, rawdatabl);
+    total -= ret;
+    offset += ret;
+
+    if (debug && file_fd != STDOUT_FILENO)
+      cout << "data section offset=" << offset << " len=" << len << std::endl;
+
+    ret = write_section(TYPE_DATA, dblock, file_fd);
+    if (ret) return ret;
+  }
+
+  //Handle attrs for this object
+  map<string,bufferptr> aset;
+  ret = store->getattrs(cid, obj, aset, false);
+  if (ret) return ret;
+  attr_section as(aset);
+  ret = write_section(TYPE_ATTRS, as, file_fd);
+  if (ret)
+    return ret;
+
+  if (debug && file_fd != STDOUT_FILENO) {
+    cout << "attrs size " << aset.size() << std::endl;
+  }
+
+  //Handle omap information
+  databl.clear();
+  bufferlist hdrbuf;
+  map<string, bufferlist> out;
+  ret = store->omap_get(cid, obj, &hdrbuf, &out);
+  if (ret < 0)
+    return ret;
+
+  omap_hdr_section ohs(hdrbuf);
+  ret = write_section(TYPE_OMAP_HDR, ohs, file_fd);
+  if (ret)
+    return ret;
+
+  if (!out.empty()) {
+    omap_section oms(out);
+    ret = write_section(TYPE_OMAP, oms, file_fd);
+    if (ret)
+      return ret;
+
+    if (debug && file_fd != STDOUT_FILENO)
+      cout << "omap map size " << out.size() << std::endl;
+  }
+
+  ret = write_simple(TYPE_OBJECT_END, file_fd);
+  if (ret)
+    return ret;
+
+  return 0;
+}
+
+int export_files(ObjectStore *store, coll_t coll)
+{
+  vector<ghobject_t> objects;
+  ghobject_t next;
+
+  while (!next.is_max()) {
+    int r = store->collection_list_partial(coll, next, 200, 300, 0,
+      &objects, &next);
+    if (r < 0)
+      return r;
+    for (vector<ghobject_t>::iterator i = objects.begin();
+	 i != objects.end();
+	 ++i) {
+      r = export_file(store, coll, *i);
+      if (r < 0)
+        return r;
+    }
+  }
+  return 0;
+}
+
+//Write super_header with its fixed 16 byte length
+void write_super()
+{
+  bufferlist superbl;
+  super_header sh;
+  footer ft;
+
+  header hdr(TYPE_NONE, 0);
+  hdr.encode(superbl);
+
+  sh.magic = super_header::super_magic;
+  sh.version = super_header::super_ver;
+  sh.header_size = superbl.length();
+  superbl.clear();
+  ft.encode(superbl);
+  sh.footer_size = superbl.length();
+  superbl.clear();
+
+  sh.encode(superbl);
+  assert(super_header::FIXED_LENGTH == superbl.length());
+  superbl.write_fd(file_fd);
+}
+
+int do_export(ObjectStore *fs, coll_t coll, spg_t pgid, pg_info_t &info,
+    epoch_t map_epoch, __u8 struct_ver, const OSDSuperblock& superblock)
+{
+  PGLog::IndexedLog log;
+  pg_missing_t missing;
+
+  if (file_fd != STDOUT_FILENO)
+    cout << "Exporting " << pgid << std::endl;
+
+  int ret = get_log(fs, coll, pgid, info, log, missing);
+  if (ret > 0)
+      return ret;
+
+  write_super();
+
+  pg_begin pgb(pgid, superblock);
+  ret = write_section(TYPE_PG_BEGIN, pgb, file_fd);
+  if (ret)
+    return ret;
+
+  ret = export_files(fs, coll);
+  if (ret) {
+    if (file_fd != STDOUT_FILENO)
+      cout << "export_files error " << ret << std::endl;
+    return ret;
+  }
+
+  metadata_section ms(struct_ver, map_epoch, info, log);
+  ret = write_section(TYPE_PG_METADATA, ms, file_fd);
+  if (ret)
+    return ret;
+
+  ret = write_simple(TYPE_PG_END, file_fd);
+  if (ret)
+    return ret;
+
+  return 0;
+}
+
+int super_header::read_super()
+{
+  bufferlist ebl;
+  bufferlist::iterator ebliter = ebl.begin();
+  ssize_t bytes;
+
+  bytes = ebl.read_fd(file_fd, super_header::FIXED_LENGTH);
+  if ((size_t)bytes != super_header::FIXED_LENGTH) {
+    cout << "Unexpected EOF" << std::endl;
+    return EFAULT;
+  }
+
+  decode(ebliter);
+
+  return 0;
+}
+
+int read_section(int fd, sectiontype_t *type, bufferlist *bl)
+{
+  header hdr;
+  ssize_t bytes;
+
+  int ret = hdr.get_header();
+  if (ret)
+    return ret;
+
+  *type = hdr.type;
+
+  bl->clear();
+  bytes = bl->read_fd(fd, hdr.size);
+  if (bytes != hdr.size) {
+    cout << "Unexpected EOF" << std::endl;
+    return EFAULT;
+  }
+
+  if (hdr.size > 0) {
+    footer ft;
+    ret = ft.get_footer();
+    if (ret)
+      return ret;
+  }
+
+  return 0;
+}
+
+int get_data(ObjectStore *store, coll_t coll, ghobject_t hoid,
+    ObjectStore::Transaction *t, bufferlist &bl)
+{
+  bufferlist::iterator ebliter = bl.begin();
+  data_section ds;
+  ds.decode(ebliter);
+
+  if (debug)
+    cout << "\tdata: offset " << ds.offset << " len " << ds.len << std::endl;
+  t->write(coll, hoid, ds.offset, ds.len,  ds.databl);
+  return 0;
+}
+
+int get_attrs(ObjectStore *store, coll_t coll, ghobject_t hoid,
+    ObjectStore::Transaction *t, bufferlist &bl,
+    OSDriver &driver, SnapMapper &snap_mapper)
+{
+  bufferlist::iterator ebliter = bl.begin();
+  attr_section as;
+  as.decode(ebliter);
+
+  if (debug)
+    cout << "\tattrs: len " << as.data.size() << std::endl;
+  t->setattrs(coll, hoid, as.data);
+
+  if (hoid.hobj.snap < CEPH_MAXSNAP && hoid.generation == ghobject_t::NO_GEN) {
+    map<string,bufferptr>::iterator mi = as.data.find(OI_ATTR);
+    if (mi != as.data.end()) {
+      bufferlist attr_bl;
+      attr_bl.push_back(mi->second);
+      object_info_t oi(attr_bl);
+  
+      if (debug)
+        cout << "object_info " << oi << std::endl;
+  
+      OSDriver::OSTransaction _t(driver.get_transaction(t));
+      set<snapid_t> oi_snaps(oi.snaps.begin(), oi.snaps.end());
+      snap_mapper.add_oid(hoid.hobj, oi_snaps, &_t);
+    }
+  }
+
+  return 0;
+}
+
+int get_omap_hdr(ObjectStore *store, coll_t coll, ghobject_t hoid,
+    ObjectStore::Transaction *t, bufferlist &bl)
+{
+  bufferlist::iterator ebliter = bl.begin();
+  omap_hdr_section oh;
+  oh.decode(ebliter);
+
+  if (debug)
+    cout << "\tomap header: " << string(oh.hdr.c_str(), oh.hdr.length())
+      << std::endl;
+  t->omap_setheader(coll, hoid, oh.hdr);
+  return 0;
+}
+
+int get_omap(ObjectStore *store, coll_t coll, ghobject_t hoid,
+    ObjectStore::Transaction *t, bufferlist &bl)
+{
+  bufferlist::iterator ebliter = bl.begin();
+  omap_section os;
+  os.decode(ebliter);
+
+  if (debug)
+    cout << "\tomap: size " << os.omap.size() << std::endl;
+  t->omap_setkeys(coll, hoid, os.omap);
+  return 0;
+}
+
+int get_object(ObjectStore *store, coll_t coll, bufferlist &bl)
+{
+  ObjectStore::Transaction tran;
+  ObjectStore::Transaction *t = &tran;
+  bufferlist::iterator ebliter = bl.begin();
+  object_begin ob;
+  ob.decode(ebliter);
+  OSDriver driver(
+    store,
+    coll_t(),
+    OSD::make_snapmapper_oid());
+  spg_t pg;
+  coll.is_pg_prefix(pg);
+  SnapMapper mapper(&driver, 0, 0, 0, pg.shard);
+
+  t->touch(coll, ob.hoid);
+
+  cout << "Write " << ob.hoid << std::endl;
+
+  bufferlist ebl;
+  bool done = false;
+  while(!done) {
+    sectiontype_t type;
+    int ret = read_section(file_fd, &type, &ebl);
+    if (ret)
+      return ret;
+
+    //cout << "\tdo_object: Section type " << hex << type << dec << std::endl;
+    //cout << "\t\tsection size " << ebl.length() << std::endl;
+    if (type >= END_OF_TYPES) {
+      cout << "Skipping unknown object section type" << std::endl;
+      continue;
+    }
+    switch(type) {
+    case TYPE_DATA:
+      ret = get_data(store, coll, ob.hoid, t, ebl);
+      if (ret) return ret;
+      break;
+    case TYPE_ATTRS:
+      ret = get_attrs(store, coll, ob.hoid, t, ebl, driver, mapper);
+      if (ret) return ret;
+      break;
+    case TYPE_OMAP_HDR:
+      ret = get_omap_hdr(store, coll, ob.hoid, t, ebl);
+      if (ret) return ret;
+      break;
+    case TYPE_OMAP:
+      ret = get_omap(store, coll, ob.hoid, t, ebl);
+      if (ret) return ret;
+      break;
+    case TYPE_OBJECT_END:
+      done = true;
+      break;
+    default:
+      return EFAULT;
+    }
+  }
+  store->apply_transaction(*t);
+  return 0;
+}
+
+int get_pg_metadata(ObjectStore *store, coll_t coll, bufferlist &bl)
+{
+  ObjectStore::Transaction tran;
+  ObjectStore::Transaction *t = &tran;
+  bufferlist::iterator ebliter = bl.begin();
+  metadata_section ms;
+  ms.decode(ebliter);
+
+#if DIAGNOSTIC
+  Formatter *formatter = new JSONFormatter(true);
+  cout << "struct_v " << (int)ms.struct_ver << std::endl;
+  cout << "epoch " << ms.map_epoch << std::endl;
+  formatter->open_object_section("info");
+  ms.info.dump(formatter);
+  formatter->close_section();
+  formatter->flush(cout);
+  cout << std::endl;
+  
+  formatter->open_object_section("log");
+  ms.log.dump(formatter);
+  formatter->close_section();
+  formatter->flush(cout);
+  cout << std::endl;
+#endif
+
+  coll_t newcoll(ms.info.pgid);
+  t->collection_rename(coll, newcoll);
+
+  int ret = write_pg(*t, ms.map_epoch, ms.info, ms.log, ms.struct_ver);
+  if (ret) return ret;
+
+  store->apply_transaction(*t);
+
+  return 0;
+}
+
+int do_import(ObjectStore *store, OSDSuperblock& sb)
+{
+  bufferlist ebl;
+  pg_info_t info;
+  PGLog::IndexedLog log;
+
+  uint64_t next_removal_seq = 0;	//My local seq
+  finish_remove_pgs(store, &next_removal_seq);
+
+  int ret = sh.read_super();
+  if (ret)
+    return ret;
+
+  if (sh.magic != super_header::super_magic) {
+    cout << "Invalid magic number" << std::endl;
+    return EFAULT;
+  }
+
+  if (sh.version > super_header::super_ver) {
+    cout << "Can't handle export format version=" << sh.version << std::endl;
+    return EINVAL;
+  }
+
+  //First section must be TYPE_PG_BEGIN
+  sectiontype_t type;
+  ret = read_section(file_fd, &type, &ebl);
+  if (ret)
+    return ret;
+  if (type != TYPE_PG_BEGIN) {
+    return EFAULT;
+  }
+
+  bufferlist::iterator ebliter = ebl.begin();
+  pg_begin pgb;
+  pgb.decode(ebliter);
+  spg_t pgid = pgb.pgid;
+
+  if (debug) {
+    cout << "Exported features: " << pgb.superblock.compat_features << std::endl;
+  }
+  if (sb.compat_features.compare(pgb.superblock.compat_features) == -1) {
+    cout << "Export has incompatible features set "
+      << pgb.superblock.compat_features << std::endl;
+    return 1;
+  }
+
+  log_oid = OSD::make_pg_log_oid(pgid);
+  biginfo_oid = OSD::make_pg_biginfo_oid(pgid);
+
+  //Check for PG already present.
+  coll_t coll(pgid);
+  if (store->collection_exists(coll)) {
+    cout << "pgid " << pgid << " already exists" << std::endl;
+    return 1;
+  }
+
+  //Switch to collection which will be removed automatically if
+  //this program is interupted.
+  coll_t rmcoll = coll_t::make_removal_coll(next_removal_seq, pgid);
+  ObjectStore::Transaction *t = new ObjectStore::Transaction;
+  t->create_collection(rmcoll);
+  store->apply_transaction(*t);
+  delete t;
+
+  cout << "Importing pgid " << pgid << std::endl;
+
+  bool done = false;
+  bool found_metadata = false;
+  while(!done) {
+    ret = read_section(file_fd, &type, &ebl);
+    if (ret)
+      return ret;
+
+    //cout << "do_import: Section type " << hex << type << dec << std::endl;
+    if (type >= END_OF_TYPES) {
+      cout << "Skipping unknown section type" << std::endl;
+      continue;
+    }
+    switch(type) {
+    case TYPE_OBJECT_BEGIN:
+      ret = get_object(store, rmcoll, ebl);
+      if (ret) return ret;
+      break;
+    case TYPE_PG_METADATA:
+      ret = get_pg_metadata(store, rmcoll, ebl);
+      if (ret) return ret;
+      found_metadata = true;
+      break;
+    case TYPE_PG_END:
+      done = true;
+      break;
+    default:
+      return EFAULT;
+    }
+  }
+
+  if (!found_metadata) {
+    cout << "Missing metadata section" << std::endl;
+    return EFAULT;
+  }
+
+  return 0;
+}
+
+int main(int argc, char **argv)
+{
+  string fspath, jpath, pgidstr, type, file;
+  Formatter *formatter = new JSONFormatter(true);
+
+  po::options_description desc("Allowed options");
+  desc.add_options()
+    ("help", "produce help message")
+    ("filestore-path", po::value<string>(&fspath),
+     "path to filestore directory, mandatory")
+    ("journal-path", po::value<string>(&jpath),
+     "path to journal, mandatory")
+    ("pgid", po::value<string>(&pgidstr),
+     "PG id, mandatory except for import")
+    ("type", po::value<string>(&type),
+     "Arg is one of [info, log, remove, export, or import], mandatory")
+    ("file", po::value<string>(&file),
+     "path of file to export or import")
+    ("debug", "Enable diagnostic output to stderr")
+    ;
+
+  po::variables_map vm;
+  po::parsed_options parsed =
+   po::command_line_parser(argc, argv).options(desc).allow_unregistered().run();
+  po::store( parsed, vm);
+  try {
+    po::notify(vm);
+  }
+  catch(...) {
+    cout << desc << std::endl;
+    exit(1);
+  }
+     
+  if (vm.count("help")) {
+    cout << desc << std::endl;
+    return 1;
+  }
+
+  if (!vm.count("filestore-path")) {
+    cout << "Must provide filestore-path" << std::endl
+	 << desc << std::endl;
+    return 1;
+  } 
+  if (!vm.count("journal-path")) {
+    cout << "Must provide journal-path" << std::endl
+	 << desc << std::endl;
+    return 1;
+  } 
+  if (!vm.count("type")) {
+    cout << "Must provide type (info, log, remove, export, import)"
+      << std::endl << desc << std::endl;
+    return 1;
+  } 
+  if (type != "import" && !vm.count("pgid")) {
+    cout << "Must provide pgid" << std::endl
+	 << desc << std::endl;
+    return 1;
+  } 
+
+  file_fd = fd_none;
+  if (type == "export") {
+    if (!vm.count("file")) {
+      file_fd = STDOUT_FILENO;
+    } else {
+      file_fd = open(file.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0666);
+    }
+  } else if (type == "import") {
+    if (!vm.count("file")) {
+      file_fd = STDIN_FILENO;
+    } else {
+      file_fd = open(file.c_str(), O_RDONLY);
+    }
+  }
+
+  if (vm.count("file") && file_fd == fd_none) {
+    cout << "--file option only applies to import or export" << std::endl;
+    return 1;
+  }
+
+  if (file_fd != fd_none && file_fd < 0) {
+    perror("open");
+    return 1;
+  }
+  
+  if ((fspath.length() == 0 || jpath.length() == 0) ||
+      (type != "info" && type != "log" && type != "remove" && type != "export"
+        && type != "import") ||
+      (type != "import" && pgidstr.length() == 0)) {
+    cerr << "Invalid params" << std::endl;
+    exit(1);
+  }
+
+  if (type == "import" && pgidstr.length()) {
+    cerr << "--pgid option invalid with import" << std::endl;
+    exit(1);
+  }
+
+  vector<const char *> ceph_options, def_args;
+  vector<string> ceph_option_strings = po::collect_unrecognized(
+    parsed.options, po::include_positional);
+  ceph_options.reserve(ceph_option_strings.size());
+  for (vector<string>::iterator i = ceph_option_strings.begin();
+       i != ceph_option_strings.end();
+       ++i) {
+    ceph_options.push_back(i->c_str());
+  }
+
+  //Suppress derr() output to stderr by default
+  if (!vm.count("debug")) {
+    close(STDERR_FILENO);
+    (void)open("/dev/null", O_WRONLY);
+    debug = false;
+  } else {
+    debug = true;
+  }
+
+  global_init(
+    &def_args, ceph_options, CEPH_ENTITY_TYPE_OSD,
+    CODE_ENVIRONMENT_UTILITY, 0);
+    //CINIT_FLAG_NO_DEFAULT_CONFIG_FILE);
+  common_init_finish(g_ceph_context);
+  g_ceph_context->_conf->apply_changes(NULL);
+  g_conf = g_ceph_context->_conf;
+
+  //Verify that fspath really is an osd store
+  struct stat st;
+  if (::stat(fspath.c_str(), &st) == -1) {
+     perror("fspath");
+     invalid_path(fspath);
+  }
+  if (!S_ISDIR(st.st_mode)) {
+    invalid_path(fspath);
+  }
+  string check = fspath + "/whoami";
+  if (::stat(check.c_str(), &st) == -1) {
+     perror("whoami");
+     invalid_path(fspath);
+  }
+  if (!S_ISREG(st.st_mode)) {
+    invalid_path(fspath);
+  }
+  check = fspath + "/current";
+  if (::stat(check.c_str(), &st) == -1) {
+     perror("current");
+     invalid_path(fspath);
+  }
+  if (!S_ISDIR(st.st_mode)) {
+    invalid_path(fspath);
+  }
+
+  spg_t pgid;
+  if (pgidstr.length() && !pgid.parse(pgidstr.c_str())) {
+    cout << "Invalid pgid '" << pgidstr << "' specified" << std::endl;
+    exit(1);
+  }
+
+  ObjectStore *fs = new FileStore(fspath, jpath);
+  
+  int r = fs->mount();
+  if (r < 0) {
+    if (r == -EBUSY) {
+      cout << "OSD has the store locked" << std::endl;
+    } else {
+      cout << "Mount failed with '" << cpp_strerror(-r) << "'" << std::endl;
+    }
+    return 1;
+  }
+
+  bool fs_sharded_objects = fs->get_allow_sharded_objects();
+
+  int ret = 0;
+  vector<coll_t> ls;
+  vector<coll_t>::iterator it;
+  CompatSet supported;
+
+#ifdef INTERNAL_TEST
+  supported = get_test_compat_set();
+#else
+  supported = OSD::get_osd_compat_set();
+#endif
+
+  bufferlist bl;
+  OSDSuperblock superblock;
+  bufferlist::iterator p;
+  r = fs->read(coll_t::META_COLL, OSD_SUPERBLOCK_POBJECT, 0, 0, bl);
+  if (r < 0) {
+    cout << "Failure to read OSD superblock error= " << r << std::endl;
+    goto out;
+  }
+
+  p = bl.begin();
+  ::decode(superblock, p);
+
+#ifdef INTERNAL_TEST2
+  fs->set_allow_sharded_objects();
+  assert(fs->get_allow_sharded_objects());
+  fs_sharded_objects = true;
+  superblock.compat_features.incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SHARDS);
+#endif
+
+  if (debug && file_fd != STDOUT_FILENO) {
+    cout << "Supported features: " << supported << std::endl;
+    cout << "On-disk features: " << superblock.compat_features << std::endl;
+  }
+  if (supported.compare(superblock.compat_features) == -1) {
+    cout << "On-disk OSD incompatible features set "
+      << superblock.compat_features << std::endl;
+    ret = EINVAL;
+    goto out;
+  }
+
+  // If there was a crash as an OSD was transitioning to sharded objects
+  // and hadn't completed a set_allow_sharded_objects().
+  // This utility does not want to attempt to finish that transition.
+  if (superblock.compat_features.incompat.contains(CEPH_OSD_FEATURE_INCOMPAT_SHARDS) != fs_sharded_objects) {
+    // An OSD should never have call set_allow_sharded_objects() before
+    // updating its own OSD features.
+    if (fs_sharded_objects)
+      cout << "FileStore sharded but OSD not set, Corruption?" << std::endl;
+    else
+      cout << "Found incomplete transition to sharded objects" << std::endl;
+    ret = EINVAL;
+    goto out;
+  }
+
+  if (type == "import") {
+
+    try {
+      ret = do_import(fs, superblock);
+    }
+    catch (const buffer::error &e) {
+      cout << "do_import threw exception error " << e.what() << std::endl;
+      ret = EFAULT;
+    }
+    if (ret == EFAULT) {
+      cout << "Corrupt input for import" << std::endl;
+    }
+    if (ret == 0)
+      cout << "Import successful" << std::endl;
+    goto out;
+  }
+
+  log_oid = OSD::make_pg_log_oid(pgid);
+  biginfo_oid = OSD::make_pg_biginfo_oid(pgid);
+
+  if (type == "remove") {
+    uint64_t next_removal_seq = 0;	//My local seq
+    finish_remove_pgs(fs, &next_removal_seq);
+    int r = initiate_new_remove_pg(fs, pgid, &next_removal_seq);
+    if (r) {
+      cout << "PG '" << pgid << "' not found" << std::endl;
+      ret = 1;
+      goto out;
+    }
+    finish_remove_pgs(fs, &next_removal_seq);
+    cout << "Remove successful" << std::endl;
+    goto out;
+  }
+
+  r = fs->list_collections(ls);
+  if (r < 0) {
+    cout << "failed to list pgs: " << cpp_strerror(-r) << std::endl;
+    exit(1);
+  }
+
+  for (it = ls.begin(); it != ls.end(); ++it) {
+    snapid_t snap;
+    spg_t tmppgid;
+
+    if (!it->is_pg(tmppgid, snap)) {
+      continue;
+    }
+
+    if (tmppgid != pgid) {
+      continue;
+    }
+    if (snap != CEPH_NOSNAP && debug) {
+      cerr << "skipping snapped dir " << *it
+	       << " (pg " << pgid << " snap " << snap << ")" << std::endl;
+      continue;
+    }
+
+    //Found!
+    break;
+  }
+
+  epoch_t map_epoch;
+  if (it != ls.end()) {
+  
+    coll_t coll = *it;
+  
+    bufferlist bl;
+    map_epoch = PG::peek_map_epoch(fs, coll, infos_oid, &bl);
+    if (debug)
+      cerr << "map_epoch " << map_epoch << std::endl;
+
+    pg_info_t info(pgid);
+    map<epoch_t,pg_interval_t> past_intervals;
+    hobject_t biginfo_oid = OSD::make_pg_biginfo_oid(pgid);
+    interval_set<snapid_t> snap_collections;
+  
+    __u8 struct_ver;
+    r = PG::read_info(fs, coll, bl, info, past_intervals, biginfo_oid,
+      infos_oid, snap_collections, struct_ver);
+    if (r < 0) {
+      cout << "read_info error " << cpp_strerror(-r) << std::endl;
+      ret = 1;
+      goto out;
+    }
+    if (debug)
+      cerr << "struct_v " << (int)struct_ver << std::endl;
+
+    if (type == "export") {
+      ret = do_export(fs, coll, pgid, info, map_epoch, struct_ver, superblock);
+      if (ret == 0 && file_fd != STDOUT_FILENO)
+        cout << "Export successful" << std::endl;
+    } else if (type == "info") {
+      formatter->open_object_section("info");
+      info.dump(formatter);
+      formatter->close_section();
+      formatter->flush(cout);
+      cout << std::endl;
+    } else if (type == "log") {
+      PGLog::IndexedLog log;
+      pg_missing_t missing;
+      ret = get_log(fs, coll, pgid, info, log, missing);
+      if (ret > 0)
+          goto out;
+  
+      formatter->open_object_section("log");
+      log.dump(formatter);
+      formatter->close_section();
+      formatter->flush(cout);
+      cout << std::endl;
+      formatter->open_object_section("missing");
+      missing.dump(formatter);
+      formatter->close_section();
+      formatter->flush(cout);
+      cout << std::endl;
+    }
+  } else {
+    cout << "PG '" << pgid << "' not found" << std::endl;
+    ret = 1;
+  }
+
+out:
+  if (fs->umount() < 0) {
+    cout << "umount failed" << std::endl;
+    return 1;
+  }
+
+  return (ret != 0);
+}
+
diff --git a/src/tools/ceph_filestore_tool.cc b/src/tools/ceph_filestore_tool.cc
new file mode 100644
index 0000000..eb9f8da
--- /dev/null
+++ b/src/tools/ceph_filestore_tool.cc
@@ -0,0 +1,260 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2013 Inktank
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation.  See file COPYING.
+ *
+ */
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/program_options/option.hpp>
+#include <boost/program_options/options_description.hpp>
+#include <boost/program_options/variables_map.hpp>
+#include <boost/program_options/cmdline.hpp>
+#include <boost/program_options/parsers.hpp>
+#include <iostream>
+#include <set>
+#include <sstream>
+#include <stdlib.h>
+#include <fstream>
+
+#include "common/Formatter.h"
+
+#include "global/global_init.h"
+#include "os/ObjectStore.h"
+#include "os/FileStore.h"
+#include "common/perf_counters.h"
+#include "common/errno.h"
+#include "osd/PGLog.h"
+#include "osd/osd_types.h"
+#include "osd/OSD.h"
+
+namespace po = boost::program_options;
+using namespace std;
+
+static void invalid_path(string &path)
+{
+  cout << "Invalid path to osd store specified: " << path << "\n";
+  exit(1);
+}
+
+int main(int argc, char **argv)
+{
+  string fspath, jpath, pgidstr;
+  bool list_lost_objects = false;
+  bool fix_lost_objects = false;
+  unsigned LIST_AT_A_TIME = 100;
+  unsigned scanned = 0;
+  
+  po::options_description desc("Allowed options");
+  desc.add_options()
+    ("help", "produce help message")
+    ("filestore-path", po::value<string>(&fspath),
+     "path to filestore directory, mandatory")
+    ("journal-path", po::value<string>(&jpath),
+     "path to journal, mandatory")
+    ("pgid", po::value<string>(&pgidstr),
+     "PG id")
+    ("list-lost-objects", po::value<bool>(
+      &list_lost_objects)->default_value(false),
+     "list lost objects")
+    ("fix-lost-objects", po::value<bool>(
+      &fix_lost_objects)->default_value(false),
+     "fix lost objects")
+    ;
+
+  po::variables_map vm;
+  po::parsed_options parsed =
+   po::command_line_parser(argc, argv).options(desc).
+    allow_unregistered().run();
+  po::store( parsed, vm);
+  try {
+    po::notify(vm);
+  }
+  catch(...) {
+    cout << desc << std::endl;
+    exit(1);
+  }
+     
+  if (vm.count("help")) {
+    cout << desc << std::endl;
+    return 1;
+  }
+
+  if (!vm.count("filestore-path")) {
+    cerr << "Must provide filestore-path" << std::endl
+	 << desc << std::endl;
+    return 1;
+  } 
+  if (!vm.count("journal-path")) {
+    cerr << "Must provide journal-path" << std::endl
+	 << desc << std::endl;
+    return 1;
+  } 
+
+  if ((fspath.length() == 0 || jpath.length() == 0)) {
+    cerr << "Invalid params" << desc << std::endl;
+    exit(1);
+  }
+
+  vector<const char *> ceph_options, def_args;
+  vector<string> ceph_option_strings = po::collect_unrecognized(
+    parsed.options, po::include_positional);
+  ceph_options.reserve(ceph_option_strings.size());
+  for (vector<string>::iterator i = ceph_option_strings.begin();
+       i != ceph_option_strings.end();
+       ++i) {
+    ceph_options.push_back(i->c_str());
+  }
+
+  global_init(
+    &def_args, ceph_options, CEPH_ENTITY_TYPE_OSD,
+    CODE_ENVIRONMENT_UTILITY, 0);
+    //CINIT_FLAG_NO_DEFAULT_CONFIG_FILE);
+  common_init_finish(g_ceph_context);
+  g_ceph_context->_conf->apply_changes(NULL);
+  g_conf = g_ceph_context->_conf;
+
+  //Verify that fspath really is an osd store
+  struct stat st;
+  if (::stat(fspath.c_str(), &st) == -1) {
+     perror("fspath");
+     invalid_path(fspath);
+  }
+  if (!S_ISDIR(st.st_mode)) {
+    invalid_path(fspath);
+  }
+  string check = fspath + "/whoami";
+  if (::stat(check.c_str(), &st) == -1) {
+     perror("whoami");
+     invalid_path(fspath);
+  }
+  if (!S_ISREG(st.st_mode)) {
+    invalid_path(fspath);
+  }
+  check = fspath + "/current";
+  if (::stat(check.c_str(), &st) == -1) {
+     perror("current");
+     invalid_path(fspath);
+  }
+  if (!S_ISDIR(st.st_mode)) {
+    invalid_path(fspath);
+  }
+
+  ObjectStore *fs = new FileStore(fspath, jpath);
+
+  int r = fs->mount();
+  if (r < 0) {
+    if (r == -EBUSY) {
+      cout << "OSD has the store locked" << std::endl;
+    } else {
+      cout << "Mount failed with '" << cpp_strerror(-r) << "'" << std::endl;
+    }
+    return 1;
+  }
+
+  vector<coll_t> colls_to_check;
+  if (pgidstr.length()) {
+    spg_t pgid;
+    if (!pgid.parse(pgidstr.c_str())) {
+      cout << "Invalid pgid '" << pgidstr << "' specified" << std::endl;
+      exit(1);
+    }
+    colls_to_check.push_back(coll_t(pgid));
+  } else {
+    vector<coll_t> candidates;
+    r = fs->list_collections(candidates);
+    if (r < 0) {
+      cerr << "Error listing collections: " << cpp_strerror(r) << std::endl;
+      goto UMOUNT;
+    }
+    for (vector<coll_t>::iterator i = candidates.begin();
+	 i != candidates.end();
+	 ++i) {
+      spg_t pgid;
+      snapid_t snap;
+      if (i->is_pg(pgid, snap)) {
+	colls_to_check.push_back(*i);
+      }
+    }
+  }
+
+  cerr << colls_to_check.size() << " pgs to scan" << std::endl;
+  for (vector<coll_t>::iterator i = colls_to_check.begin();
+       i != colls_to_check.end();
+       ++i, ++scanned) {
+    cerr << "Scanning " << *i << ", " << scanned << "/"
+	 << colls_to_check.size() << " completed" << std::endl;
+    ghobject_t next;
+    while (!next.is_max()) {
+      vector<ghobject_t> list;
+      r = fs->collection_list_partial(
+	*i,
+	next,
+	LIST_AT_A_TIME,
+	LIST_AT_A_TIME,
+	CEPH_NOSNAP,
+	&list,
+	&next);
+      if (r < 0) {
+	cerr << "Error listing collection: " << *i << ", "
+	     << cpp_strerror(r) << std::endl;
+	goto UMOUNT;
+      }
+      for (vector<ghobject_t>::iterator obj = list.begin();
+	   obj != list.end();
+	   ++obj) {
+	bufferlist attr;
+	r = fs->getattr(*i, *obj, OI_ATTR, attr);
+	if (r < 0) {
+	  cerr << "Error getting attr on : " << make_pair(*i, *obj) << ", "
+	       << cpp_strerror(r) << std::endl;
+	  goto UMOUNT;
+	}
+	object_info_t oi;
+	bufferlist::iterator bp = attr.begin();
+	try {
+	  ::decode(oi, bp);
+	} catch (...) {
+	  r = -EINVAL;
+	  cerr << "Error getting attr on : " << make_pair(*i, *obj) << ", "
+	       << cpp_strerror(r) << std::endl;
+	  goto UMOUNT;
+	}
+	if (oi.is_lost()) {
+	  if (list_lost_objects) {
+	    cout << *i << "/" << *obj << " is lost" << std::endl;
+	  }
+	  if (fix_lost_objects) {
+	    cerr << *i << "/" << *obj << " is lost, fixing" << std::endl;
+	    oi.clear_flag(object_info_t::FLAG_LOST);
+	    bufferlist bl2;
+	    ::encode(oi, bl2);
+	    ObjectStore::Transaction t;
+	    t.setattr(*i, *obj, OI_ATTR, bl2);
+	    r = fs->apply_transaction(t);
+	    if (r < 0) {
+	      cerr << "Error getting fixing attr on : " << make_pair(*i, *obj)
+		   << ", "
+		   << cpp_strerror(r) << std::endl;
+	      goto UMOUNT;
+	    }
+	  }
+	}
+      }
+    }
+  }
+  cerr << "Completed" << std::endl;
+
+ UMOUNT:
+  fs->sync_and_flush();
+  fs->umount();
+  return r;
+}
diff --git a/src/tools/ceph_kvstore_tool.cc b/src/tools/ceph_kvstore_tool.cc
index f6a48bf..5a68d98 100644
--- a/src/tools/ceph_kvstore_tool.cc
+++ b/src/tools/ceph_kvstore_tool.cc
@@ -10,20 +10,22 @@
 * License version 2.1, as published by the Free Software
 * Foundation. See file COPYING.
 */
+#include <iostream>
+#include <string>
+#include <sstream>
 #include <map>
 #include <set>
-#include <string>
-
 #include <boost/scoped_ptr.hpp>
 
+#include "os/LevelDBStore.h"
+
 #include "common/ceph_argparse.h"
-#include "common/config.h"
+#include "global/global_init.h"
 #include "common/errno.h"
+#include "common/safe_io.h"
+#include "common/config.h"
 #include "common/strtol.h"
-
-#include "global/global_init.h"
 #include "include/stringify.h"
-#include "os/LevelDBStore.h"
 
 using namespace std;
 
diff --git a/src/tools/ceph_monstore_tool.cc b/src/tools/ceph_monstore_tool.cc
index d26add6..231d257 100644
--- a/src/tools/ceph_monstore_tool.cc
+++ b/src/tools/ceph_monstore_tool.cc
@@ -10,19 +10,31 @@
 * License version 2.1, as published by the Free Software
 * Foundation. See file COPYING.
 */
+#include <boost/scoped_ptr.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/program_options/option.hpp>
+#include <boost/program_options/options_description.hpp>
 #include <boost/program_options/variables_map.hpp>
+#include <boost/program_options/cmdline.hpp>
 #include <boost/program_options/parsers.hpp>
-
+#include <iostream>
+#include <set>
+#include <sstream>
 #include <stdlib.h>
+#include <fstream>
 #include <string>
-
-#include "common/Formatter.h"
-#include "common/errno.h"
+#include <sstream>
+#include <map>
+#include <set>
+#include <boost/scoped_ptr.hpp>
 
 #include "global/global_init.h"
-#include "include/stringify.h"
+#include "os/LevelDBStore.h"
 #include "mon/MonitorDBStore.h"
 #include "mon/Paxos.h"
+#include "common/Formatter.h"
+#include "include/stringify.h"
+#include "common/errno.h"
 
 namespace po = boost::program_options;
 using namespace std;
@@ -30,16 +42,15 @@ using namespace std;
 class TraceIter {
   int fd;
   unsigned idx;
-  MonitorDBStore::TransactionRef t;
+  MonitorDBStore::Transaction t;
 public:
   TraceIter(string fname) : fd(-1), idx(-1) {
     fd = ::open(fname.c_str(), O_RDONLY);
-    t.reset(new MonitorDBStore::Transaction);
   }
   bool valid() {
     return fd != -1;
   }
-  MonitorDBStore::TransactionRef cur() {
+  const MonitorDBStore::Transaction &cur() {
     assert(valid());
     return t;
   }
@@ -80,8 +91,7 @@ public:
       return;
     }
     bliter = bl.begin();
-    t.reset(new MonitorDBStore::Transaction);
-    t->decode(bliter);
+    t.decode(bliter);
   }
   void init() {
     next();
@@ -254,10 +264,10 @@ int main(int argc, char **argv) {
       if (bl.length() == 0)
 	break;
       cout << "\n--- " << v << " ---" << std::endl;
-      MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+      MonitorDBStore::Transaction tx;
       Paxos::decode_append_transaction(tx, bl);
       JSONFormatter f(true);
-      tx->dump(&f);
+      tx.dump(&f);
       f.flush(cout);
     }
   } else if (cmd == "dump-trace") {
@@ -276,7 +286,7 @@ int main(int argc, char **argv) {
       }
       if (iter.num() >= dstart) {
 	JSONFormatter f(true);
-	iter.cur()->dump(&f, false);
+	iter.cur().dump(&f, false);
 	f.flush(std::cout);
 	std::cout << std::endl;
       }
@@ -317,7 +327,7 @@ int main(int argc, char **argv) {
     unsigned num = 0;
     for (unsigned i = 0; i < ntrans; ++i) {
       std::cerr << "Applying trans " << i << std::endl;
-      MonitorDBStore::TransactionRef t(new MonitorDBStore::Transaction);
+      MonitorDBStore::Transaction t;
       string prefix;
       prefix.push_back((i%26)+'a');
       for (unsigned j = 0; j < tsize; ++j) {
@@ -325,10 +335,10 @@ int main(int argc, char **argv) {
 	os << num;
 	bufferlist bl;
 	for (unsigned k = 0; k < tvalsize; ++k) bl.append(rand());
-	t->put(prefix, os.str(), bl);
+	t.put(prefix, os.str(), bl);
 	++num;
       }
-      t->compact_prefix(prefix);
+      t.compact_prefix(prefix);
       st.apply_transaction(t);
     }
   } else if (cmd == "store-copy") {
@@ -368,12 +378,12 @@ int main(int argc, char **argv) {
     do {
       uint64_t num_keys = 0;
 
-      MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+      MonitorDBStore::Transaction tx;
 
       while (it->valid() && num_keys < 128) {
         pair<string,string> k = it->raw_key();
         bufferlist v = it->value();
-        tx->put(k.first, k.second, v);
+        tx.put(k.first, k.second, v);
 
         num_keys ++;
         total_tx ++;
@@ -384,7 +394,7 @@ int main(int argc, char **argv) {
 
       total_keys += num_keys;
 
-      if (!tx->empty())
+      if (!tx.empty())
         out_store.apply_transaction(tx);
 
       std::cout << "copied " << total_keys << " keys so far ("
diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc
deleted file mode 100644
index 64b36eb..0000000
--- a/src/tools/ceph_objectstore_tool.cc
+++ /dev/null
@@ -1,2548 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2013 Inktank
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include <boost/program_options/variables_map.hpp>
-#include <boost/program_options/parsers.hpp>
-
-#include <stdlib.h>
-
-#include "common/Formatter.h"
-#include "common/errno.h"
-
-#include "global/global_init.h"
-
-#include "os/ObjectStore.h"
-#include "os/FileStore.h"
-
-#include "osd/PGLog.h"
-#include "osd/OSD.h"
-
-#include "json_spirit/json_spirit_value.h"
-#include "json_spirit/json_spirit_reader.h"
-
-#include "include/rados/librados.hpp"
-
-namespace po = boost::program_options;
-using namespace std;
-
-static coll_t META_COLL("meta");
-
-enum {
-    TYPE_NONE = 0,
-    TYPE_PG_BEGIN,
-    TYPE_PG_END,
-    TYPE_OBJECT_BEGIN,
-    TYPE_OBJECT_END,
-    TYPE_DATA,
-    TYPE_ATTRS,
-    TYPE_OMAP_HDR,
-    TYPE_OMAP,
-    TYPE_PG_METADATA,
-    END_OF_TYPES,	//Keep at the end
-};
-
-//#define INTERNAL_TEST
-//#define INTERNAL_TEST2
-
-#ifdef INTERNAL_TEST
-CompatSet get_test_compat_set() {
-  CompatSet::FeatureSet ceph_osd_feature_compat;
-  CompatSet::FeatureSet ceph_osd_feature_ro_compat;
-  CompatSet::FeatureSet ceph_osd_feature_incompat;
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_BASE);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_PGINFO);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_OLOC);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEC);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_CATEGORIES);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_HOBJECTPOOL);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_BIGINFO);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEVELDBINFO);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_LEVELDBLOG);
-#ifdef INTERNAL_TEST2
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SNAPMAPPER);
-  ceph_osd_feature_incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SHARDS);
-#endif
-  return CompatSet(ceph_osd_feature_compat, ceph_osd_feature_ro_compat,
-		   ceph_osd_feature_incompat);
-}
-#endif
-
-typedef uint8_t sectiontype_t;
-typedef uint32_t mymagic_t;
-typedef int64_t mysize_t;
-const ssize_t max_read = 1024 * 1024;
-const uint16_t shortmagic = 0xffce;	//goes into stream as "ceff"
-//endmagic goes into stream as "ceff ffec"
-const mymagic_t endmagic = (0xecff << 16) | shortmagic;
-const int fd_none = INT_MIN;
-bool outistty;
-
-//The first FIXED_LENGTH bytes are a fixed
-//portion of the export output.  This includes the overall
-//version number, and size of header and footer.
-//THIS STRUCTURE CAN ONLY BE APPENDED TO.  If it needs to expand,
-//the version can be bumped and then anything
-//can be added to the export format.
-struct super_header {
-  static const uint32_t super_magic = (shortmagic << 16) | shortmagic;
-  static const uint32_t super_ver = 2;
-  static const uint32_t FIXED_LENGTH = 16;
-  uint32_t magic;
-  uint32_t version;
-  uint32_t header_size;
-  uint32_t footer_size;
-
-  super_header() : magic(0), version(0), header_size(0), footer_size(0) { }
-  int read_super();
-
-  void encode(bufferlist& bl) const {
-    ::encode(magic, bl);
-    ::encode(version, bl);
-    ::encode(header_size, bl);
-    ::encode(footer_size, bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    ::decode(magic, bl);
-    ::decode(version, bl);
-    ::decode(header_size, bl);
-    ::decode(footer_size, bl);
-  }
-};
-
-struct header {
-  sectiontype_t type;
-  mysize_t size;
-  header(sectiontype_t type, mysize_t size) :
-    type(type), size(size) { }
-  header(): type(0), size(0) { }
-
-  int get_header();
-
-  void encode(bufferlist& bl) const {
-    uint32_t debug_type = (type << 24) | (type << 16) | shortmagic;
-    ENCODE_START(1, 1, bl);
-    ::encode(debug_type, bl);
-    ::encode(size, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    uint32_t debug_type;
-    DECODE_START(1, bl);
-    ::decode(debug_type, bl);
-    type = debug_type >> 24;
-    ::decode(size, bl);
-    DECODE_FINISH(bl);
-  }
-};
-
-struct footer {
-  mymagic_t magic;
-  footer() : magic(endmagic) { }
-
-  int get_footer();
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(magic, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(magic, bl);
-    DECODE_FINISH(bl);
-  }
-};
-
-struct pg_begin {
-  spg_t pgid;
-  OSDSuperblock superblock;
-
-  pg_begin(spg_t pg, const OSDSuperblock& sb):
-    pgid(pg), superblock(sb) { }
-  pg_begin() { }
-
-  void encode(bufferlist& bl) const {
-    // If superblock doesn't include CEPH_FS_FEATURE_INCOMPAT_SHARDS then
-    // shard will be NO_SHARD for a replicated pool.  This means
-    // that we allow the decode by struct_v 2.
-    ENCODE_START(3, 2, bl);
-    ::encode(pgid.pgid, bl);
-    ::encode(superblock, bl);
-    ::encode(pgid.shard, bl);
-    ENCODE_FINISH(bl);
-  }
-  // NOTE: New super_ver prevents decode from ver 1
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(3, bl);
-    ::decode(pgid.pgid, bl);
-    if (struct_v > 1) {
-      ::decode(superblock, bl);
-    }
-    if (struct_v > 2) {
-      ::decode(pgid.shard, bl);
-    } else {
-      pgid.shard = shard_id_t::NO_SHARD;
-    }
-    DECODE_FINISH(bl);
-  }
-};
-
-struct object_begin {
-  ghobject_t hoid;
-  object_begin(const ghobject_t &hoid): hoid(hoid) { }
-  object_begin() { }
-
-  // If superblock doesn't include CEPH_FS_FEATURE_INCOMPAT_SHARDS then
-  // generation will be NO_GEN, shard_id will be NO_SHARD for a replicated
-  // pool.  This means we will allow the decode by struct_v 1.
-  void encode(bufferlist& bl) const {
-    ENCODE_START(2, 1, bl);
-    ::encode(hoid.hobj, bl);
-    ::encode(hoid.generation, bl);
-    ::encode(hoid.shard_id, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(2, bl);
-    ::decode(hoid.hobj, bl);
-    if (struct_v > 1) {
-      ::decode(hoid.generation, bl);
-      ::decode(hoid.shard_id, bl);
-    } else {
-      hoid.generation = ghobject_t::NO_GEN;
-      hoid.shard_id = shard_id_t::NO_SHARD;
-    }
-    DECODE_FINISH(bl);
-  }
-};
-
-struct data_section {
-  uint64_t offset;
-  uint64_t len;
-  bufferlist databl;
-  data_section(uint64_t offset, uint64_t len, bufferlist bl):
-     offset(offset), len(len), databl(bl) { }
-  data_section(): offset(0), len(0) { }
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(offset, bl);
-    ::encode(len, bl);
-    ::encode(databl, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(offset, bl);
-    ::decode(len, bl);
-    ::decode(databl, bl);
-    DECODE_FINISH(bl);
-  }
-};
-
-struct attr_section {
-  map<string,bufferptr> data;
-  attr_section(const map<string,bufferptr> &data) : data(data) { }
-  attr_section() { }
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(data, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(data, bl);
-    DECODE_FINISH(bl);
-  }
-};
-
-struct omap_hdr_section {
-  bufferlist hdr;
-  omap_hdr_section(bufferlist hdr) : hdr(hdr) { }
-  omap_hdr_section() { }
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(hdr, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(hdr, bl);
-    DECODE_FINISH(bl);
-  }
-};
-
-struct omap_section {
-  map<string, bufferlist> omap;
-  omap_section(const map<string, bufferlist> &omap) :
-    omap(omap) { }
-  omap_section() { }
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(omap, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(omap, bl);
-    DECODE_FINISH(bl);
-  }
-};
-
-struct metadata_section {
-  __u8 struct_ver;
-  epoch_t map_epoch;
-  pg_info_t info;
-  pg_log_t log;
-  map<epoch_t,pg_interval_t> past_intervals;
-
-  metadata_section(__u8 struct_ver, epoch_t map_epoch, const pg_info_t &info,
-		   const pg_log_t &log, map<epoch_t,pg_interval_t> &past_intervals)
-    : struct_ver(struct_ver),
-      map_epoch(map_epoch),
-      info(info),
-      log(log),
-      past_intervals(past_intervals) { }
-  metadata_section()
-    : struct_ver(0),
-      map_epoch(0) { }
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(2, 1, bl);
-    ::encode(struct_ver, bl);
-    ::encode(map_epoch, bl);
-    ::encode(info, bl);
-    ::encode(log, bl);
-    ::encode(past_intervals, bl);
-    ENCODE_FINISH(bl);
-  }
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(2, bl);
-    ::decode(struct_ver, bl);
-    ::decode(map_epoch, bl);
-    ::decode(info, bl);
-    ::decode(log, bl);
-    if (struct_v > 1) {
-      ::decode(past_intervals, bl);
-    } else {
-      cout << "NOTICE: Older export without past_intervals" << std::endl;
-    }
-    DECODE_FINISH(bl);
-  }
-};
-
-hobject_t infos_oid = OSD::make_infos_oid();
-hobject_t biginfo_oid, log_oid;
-
-int file_fd = fd_none;
-bool debug = false;
-super_header sh;
-uint64_t testalign;
-
-template <typename T>
-int write_section(sectiontype_t type, const T& obj, int fd) {
-  bufferlist blhdr, bl, blftr;
-  obj.encode(bl);
-  header hdr(type, bl.length());
-  hdr.encode(blhdr);
-  footer ft;
-  ft.encode(blftr);
-
-  int ret = blhdr.write_fd(fd);
-  if (ret) return ret;
-  ret = bl.write_fd(fd);
-  if (ret) return ret;
-  ret = blftr.write_fd(fd);
-  return ret;
-}
-
-// Convert non-printable characters to '\###'
-static void cleanbin(string &str)
-{
-  bool cleaned = false;
-  string clean;
-
-  for (string::iterator it = str.begin(); it != str.end(); ++it) {
-    if (!isprint(*it)) {
-      clean.push_back('\\');
-      clean.push_back('0' + ((*it >> 6) & 7));
-      clean.push_back('0' + ((*it >> 3) & 7));
-      clean.push_back('0' + (*it & 7));
-      cleaned = true;
-    } else {
-      clean.push_back(*it);
-    }
-  }
-
-  if (cleaned)
-    str = clean;
-  return;
-}
-
-int write_simple(sectiontype_t type, int fd)
-{
-  bufferlist hbl;
-
-  header hdr(type, 0);
-  hdr.encode(hbl);
-  return hbl.write_fd(fd);
-}
-
-static int get_fd_data(int fd, bufferlist &bl)
-{
-  uint64_t total = 0;
-  do {
-    ssize_t bytes = bl.read_fd(fd, max_read);
-    if (bytes < 0) {
-      cerr << "read_fd error " << cpp_strerror(-bytes) << std::endl;
-      return 1;
-    }
-
-    if (bytes == 0)
-      break;
-
-    total += bytes;
-  } while(true);
-
-  assert(bl.length() == total);
-  return 0;
-}
-
-static void invalid_filestore_path(string &path)
-{
-  cerr << "Invalid filestore path specified: " << path << "\n";
-  exit(1);
-}
-
-int get_log(ObjectStore *fs, coll_t coll, spg_t pgid, const pg_info_t &info,
-   PGLog::IndexedLog &log, pg_missing_t &missing)
-{
-  map<eversion_t, hobject_t> divergent_priors;
-  try {
-    ostringstream oss;
-    PGLog::read_log(fs, coll, log_oid, info, divergent_priors, log, missing, oss);
-    if (debug && oss.str().size())
-      cerr << oss.str() << std::endl;
-  }
-  catch (const buffer::error &e) {
-    cerr << "read_log threw exception error " << e.what() << std::endl;
-    return 1;
-  }
-  return 0;
-}
-
-//Based on RemoveWQ::_process()
-void remove_coll(ObjectStore *store, const coll_t &coll)
-{
-  spg_t pg;
-  coll.is_pg_prefix(pg);
-  OSDriver driver(
-    store,
-    coll_t(),
-    OSD::make_snapmapper_oid());
-  SnapMapper mapper(&driver, 0, 0, 0, pg.shard);
-
-  ghobject_t next;
-  int r = 0;
-  int64_t num = 0;
-  ObjectStore::Transaction *t = new ObjectStore::Transaction;
-  cout << "remove_coll " << coll << std::endl;
-  while (!next.is_max()) {
-    vector<ghobject_t> objects;
-    r = store->collection_list_partial(coll, next, 200, 300, 0,
-      &objects, &next);
-    if (r < 0)
-      goto out;
-    for (vector<ghobject_t>::iterator i = objects.begin();
-	 i != objects.end();
-	 ++i, ++num) {
-
-      OSDriver::OSTransaction _t(driver.get_transaction(t));
-      cout << "remove " << *i << std::endl;
-      int r = mapper.remove_oid(i->hobj, &_t);
-      if (r != 0 && r != -ENOENT) {
-        assert(0);
-      }
-
-      t->remove(coll, *i);
-      if (num >= 30) {
-        store->apply_transaction(*t);
-        delete t;
-        t = new ObjectStore::Transaction;
-        num = 0;
-      }
-    }
-  }
-  t->remove_collection(coll);
-  store->apply_transaction(*t);
-out:
-  delete t;
-}
-
-//Based on part of OSD::load_pgs()
-int finish_remove_pgs(ObjectStore *store, uint64_t *next_removal_seq)
-{
-  vector<coll_t> ls;
-  int r = store->list_collections(ls);
-  if (r < 0) {
-    cerr << "finish_remove_pgs: failed to list pgs: " << cpp_strerror(-r)
-      << std::endl;
-    return r;
-  }
-
-  for (vector<coll_t>::iterator it = ls.begin();
-       it != ls.end();
-       ++it) {
-    spg_t pgid;
-    snapid_t snap;
-
-    if (it->is_temp(pgid)) {
-      cout << "finish_remove_pgs " << *it << " clearing temp" << std::endl;
-      OSD::recursive_remove_collection(store, *it);
-      continue;
-    }
-
-    if (it->is_pg(pgid, snap)) {
-      continue;
-    }
-
-    uint64_t seq;
-    if (it->is_removal(&seq, &pgid)) {
-      if (seq >= *next_removal_seq)
-	*next_removal_seq = seq + 1;
-      cout << "finish_remove_pgs removing " << *it << ", seq is "
-	       << seq << " pgid is " << pgid << std::endl;
-      remove_coll(store, *it);
-      continue;
-    }
-
-    //cout << "finish_remove_pgs ignoring unrecognized " << *it << std::endl;
-  }
-  return 0;
-}
-
-int initiate_new_remove_pg(ObjectStore *store, spg_t r_pgid,
-    uint64_t *next_removal_seq)
-{
-  ObjectStore::Transaction *rmt = new ObjectStore::Transaction;
-
-  if (store->collection_exists(coll_t(r_pgid))) {
-      coll_t to_remove = coll_t::make_removal_coll((*next_removal_seq)++, r_pgid);
-      cout << "collection rename " << coll_t(r_pgid)
-	   << " to " << to_remove
-        << std::endl;
-      rmt->collection_rename(coll_t(r_pgid), to_remove);
-  } else {
-    delete rmt;
-    return ENOENT;
-  }
-
-  cout << "remove " << META_COLL << " " << log_oid.oid << std::endl;
-  rmt->remove(META_COLL, log_oid);
-  cout << "remove " << META_COLL << " " << biginfo_oid.oid << std::endl;
-  rmt->remove(META_COLL, biginfo_oid);
-
-  store->apply_transaction(*rmt);
-
-  return 0;
-}
-
-int header::get_header()
-{
-  bufferlist ebl;
-  bufferlist::iterator ebliter = ebl.begin();
-  ssize_t bytes;
-
-  bytes = ebl.read_fd(file_fd, sh.header_size);
-  if ((size_t)bytes != sh.header_size) {
-    cerr << "Unexpected EOF" << std::endl;
-    return EFAULT;
-  }
-
-  decode(ebliter);
-
-  return 0;
-}
-
-int footer::get_footer()
-{
-  bufferlist ebl;
-  bufferlist::iterator ebliter = ebl.begin();
-  ssize_t bytes;
-
-  bytes = ebl.read_fd(file_fd, sh.footer_size);
-  if ((size_t)bytes != sh.footer_size) {
-    cerr << "Unexpected EOF" << std::endl;
-    return EFAULT;
-  }
-
-  decode(ebliter);
-
-  if (magic != endmagic) {
-    cerr << "Bad footer magic" << std::endl;
-    return EFAULT;
-  }
-
-  return 0;
-}
-
-int write_info(ObjectStore::Transaction &t, epoch_t epoch, pg_info_t &info,
-    __u8 struct_ver, map<epoch_t,pg_interval_t> &past_intervals)
-{
-  //Empty for this
-  interval_set<snapid_t> snap_collections; // obsolete
-  coll_t coll(info.pgid);
-
-  int ret = PG::_write_info(t, epoch,
-    info, coll,
-    past_intervals,
-    snap_collections,
-    infos_oid,
-    struct_ver,
-    true, true);
-  if (ret < 0) ret = -ret;
-  if (ret) cerr << "Failed to write info" << std::endl;
-  return ret;
-}
-
-void write_log(ObjectStore::Transaction &t, pg_log_t &log)
-{
-  map<eversion_t, hobject_t> divergent_priors;
-  PGLog::write_log(t, log, log_oid, divergent_priors);
-}
-
-int write_pg(ObjectStore::Transaction &t, epoch_t epoch, pg_info_t &info,
-    pg_log_t &log, __u8 struct_ver, map<epoch_t,pg_interval_t> &past_intervals)
-{
-  int ret = write_info(t, epoch, info, struct_ver, past_intervals);
-  if (ret) return ret;
-  write_log(t, log);
-  return 0;
-}
-
-const int OMAP_BATCH_SIZE = 25;
-void get_omap_batch(ObjectMap::ObjectMapIterator &iter, map<string, bufferlist> &oset)
-{
-  oset.clear();
-  for (int count = OMAP_BATCH_SIZE; count && iter->valid(); --count, iter->next()) {
-    oset.insert(pair<string, bufferlist>(iter->key(), iter->value()));
-  }
-}
-
-int export_file(ObjectStore *store, coll_t cid, ghobject_t &obj)
-{
-  struct stat st;
-  mysize_t total;
-  footer ft;
-
-  int ret = store->stat(cid, obj, &st);
-  if (ret < 0)
-    return ret;
-
-  cout << "Read " << obj << std::endl;
-
-  total = st.st_size;
-  if (debug)
-    cerr << "size=" << total << std::endl;
-
-  object_begin objb(obj);
-  ret = write_section(TYPE_OBJECT_BEGIN, objb, file_fd);
-  if (ret < 0)
-    return ret;
-
-  uint64_t offset = 0;
-  bufferlist rawdatabl;
-  while(total > 0) {
-    rawdatabl.clear();
-    mysize_t len = max_read;
-    if (len > total)
-      len = total;
-
-    ret = store->read(cid, obj, offset, len, rawdatabl);
-    if (ret < 0)
-      return ret;
-    if (ret == 0)
-      return -EINVAL;
-
-    data_section dblock(offset, len, rawdatabl);
-    if (debug)
-      cerr << "data section offset=" << offset << " len=" << len << std::endl;
-
-    total -= ret;
-    offset += ret;
-
-    ret = write_section(TYPE_DATA, dblock, file_fd);
-    if (ret) return ret;
-  }
-
-  //Handle attrs for this object
-  map<string,bufferptr> aset;
-  ret = store->getattrs(cid, obj, aset);
-  if (ret) return ret;
-  attr_section as(aset);
-  ret = write_section(TYPE_ATTRS, as, file_fd);
-  if (ret)
-    return ret;
-
-  if (debug) {
-    cerr << "attrs size " << aset.size() << std::endl;
-  }
-
-  //Handle omap information
-  bufferlist hdrbuf;
-  ret = store->omap_get_header(cid, obj, &hdrbuf, true);
-  if (ret < 0) {
-    cerr << "omap_get_header: " << cpp_strerror(-ret) << std::endl;
-    return ret;
-  }
-
-  omap_hdr_section ohs(hdrbuf);
-  ret = write_section(TYPE_OMAP_HDR, ohs, file_fd);
-  if (ret)
-    return ret;
-
-  ObjectMap::ObjectMapIterator iter = store->get_omap_iterator(cid, obj);
-  if (!iter) {
-    ret = -ENOENT;
-    cerr << "omap_get_iterator: " << cpp_strerror(-ret) << std::endl;
-    return ret;
-  }
-  iter->seek_to_first();
-  int mapcount = 0;
-  map<string, bufferlist> out;
-  while(iter->valid()) {
-    get_omap_batch(iter, out);
-
-    if (out.empty()) break;
-
-    mapcount += out.size();
-    omap_section oms(out);
-    ret = write_section(TYPE_OMAP, oms, file_fd);
-    if (ret)
-      return ret;
-  }
-  if (debug)
-    cerr << "omap map size " << mapcount << std::endl;
-
-  ret = write_simple(TYPE_OBJECT_END, file_fd);
-  if (ret)
-    return ret;
-
-  return 0;
-}
-
-int export_files(ObjectStore *store, coll_t coll)
-{
-  ghobject_t next;
-
-  while (!next.is_max()) {
-    vector<ghobject_t> objects;
-    int r = store->collection_list_partial(coll, next, 200, 300, 0,
-      &objects, &next);
-    if (r < 0)
-      return r;
-    for (vector<ghobject_t>::iterator i = objects.begin();
-	 i != objects.end();
-	 ++i) {
-      r = export_file(store, coll, *i);
-      if (r < 0)
-        return r;
-    }
-  }
-  return 0;
-}
-
-//Write super_header with its fixed 16 byte length
-void write_super()
-{
-  bufferlist superbl;
-  super_header sh;
-  footer ft;
-
-  header hdr(TYPE_NONE, 0);
-  hdr.encode(superbl);
-
-  sh.magic = super_header::super_magic;
-  sh.version = super_header::super_ver;
-  sh.header_size = superbl.length();
-  superbl.clear();
-  ft.encode(superbl);
-  sh.footer_size = superbl.length();
-  superbl.clear();
-
-  sh.encode(superbl);
-  assert(super_header::FIXED_LENGTH == superbl.length());
-  superbl.write_fd(file_fd);
-}
-
-int do_export(ObjectStore *fs, coll_t coll, spg_t pgid, pg_info_t &info,
-    epoch_t map_epoch, __u8 struct_ver, const OSDSuperblock& superblock,
-    map<epoch_t,pg_interval_t> &past_intervals)
-{
-  PGLog::IndexedLog log;
-  pg_missing_t missing;
-
-  cout << "Exporting " << pgid << std::endl;
-
-  int ret = get_log(fs, coll, pgid, info, log, missing);
-  if (ret > 0)
-      return ret;
-
-  write_super();
-
-  pg_begin pgb(pgid, superblock);
-  ret = write_section(TYPE_PG_BEGIN, pgb, file_fd);
-  if (ret)
-    return ret;
-
-  ret = export_files(fs, coll);
-  if (ret) {
-    cerr << "export_files error " << ret << std::endl;
-    return ret;
-  }
-
-  metadata_section ms(struct_ver, map_epoch, info, log, past_intervals);
-  ret = write_section(TYPE_PG_METADATA, ms, file_fd);
-  if (ret)
-    return ret;
-
-  ret = write_simple(TYPE_PG_END, file_fd);
-  if (ret)
-    return ret;
-
-  return 0;
-}
-
-int super_header::read_super()
-{
-  bufferlist ebl;
-  bufferlist::iterator ebliter = ebl.begin();
-  ssize_t bytes;
-
-  bytes = ebl.read_fd(file_fd, super_header::FIXED_LENGTH);
-  if ((size_t)bytes != super_header::FIXED_LENGTH) {
-    cerr << "Unexpected EOF" << std::endl;
-    return EFAULT;
-  }
-
-  decode(ebliter);
-
-  return 0;
-}
-
-int read_section(int fd, sectiontype_t *type, bufferlist *bl)
-{
-  header hdr;
-  ssize_t bytes;
-
-  int ret = hdr.get_header();
-  if (ret)
-    return ret;
-
-  *type = hdr.type;
-
-  bl->clear();
-  bytes = bl->read_fd(fd, hdr.size);
-  if (bytes != hdr.size) {
-    cerr << "Unexpected EOF" << std::endl;
-    return EFAULT;
-  }
-
-  if (hdr.size > 0) {
-    footer ft;
-    ret = ft.get_footer();
-    if (ret)
-      return ret;
-  }
-
-  return 0;
-}
-
-int get_data(ObjectStore *store, coll_t coll, ghobject_t hoid,
-    ObjectStore::Transaction *t, bufferlist &bl)
-{
-  bufferlist::iterator ebliter = bl.begin();
-  data_section ds;
-  ds.decode(ebliter);
-
-  if (debug)
-    cerr << "\tdata: offset " << ds.offset << " len " << ds.len << std::endl;
-  t->write(coll, hoid, ds.offset, ds.len,  ds.databl);
-  return 0;
-}
-
-int get_attrs(ObjectStore *store, coll_t coll, ghobject_t hoid,
-    ObjectStore::Transaction *t, bufferlist &bl,
-    OSDriver &driver, SnapMapper &snap_mapper)
-{
-  bufferlist::iterator ebliter = bl.begin();
-  attr_section as;
-  as.decode(ebliter);
-
-  if (debug)
-    cerr << "\tattrs: len " << as.data.size() << std::endl;
-  t->setattrs(coll, hoid, as.data);
-
-  if (hoid.hobj.snap < CEPH_MAXSNAP && hoid.generation == ghobject_t::NO_GEN) {
-    map<string,bufferptr>::iterator mi = as.data.find(OI_ATTR);
-    if (mi != as.data.end()) {
-      bufferlist attr_bl;
-      attr_bl.push_back(mi->second);
-      object_info_t oi(attr_bl);
-
-      if (debug)
-        cerr << "object_info " << oi << std::endl;
-
-      OSDriver::OSTransaction _t(driver.get_transaction(t));
-      set<snapid_t> oi_snaps(oi.snaps.begin(), oi.snaps.end());
-      snap_mapper.add_oid(hoid.hobj, oi_snaps, &_t);
-    }
-  }
-
-  return 0;
-}
-
-int get_omap_hdr(ObjectStore *store, coll_t coll, ghobject_t hoid,
-    ObjectStore::Transaction *t, bufferlist &bl)
-{
-  bufferlist::iterator ebliter = bl.begin();
-  omap_hdr_section oh;
-  oh.decode(ebliter);
-
-  if (debug)
-    cerr << "\tomap header: " << string(oh.hdr.c_str(), oh.hdr.length())
-      << std::endl;
-  t->omap_setheader(coll, hoid, oh.hdr);
-  return 0;
-}
-
-int get_omap(ObjectStore *store, coll_t coll, ghobject_t hoid,
-    ObjectStore::Transaction *t, bufferlist &bl)
-{
-  bufferlist::iterator ebliter = bl.begin();
-  omap_section os;
-  os.decode(ebliter);
-
-  if (debug)
-    cerr << "\tomap: size " << os.omap.size() << std::endl;
-  t->omap_setkeys(coll, hoid, os.omap);
-  return 0;
-}
-
-int get_object_rados(librados::IoCtx &ioctx, bufferlist &bl)
-{
-  bufferlist::iterator ebliter = bl.begin();
-  object_begin ob;
-  ob.decode(ebliter);
-  map<string,bufferptr>::iterator i;
-  bufferlist abl;
-
-  data_section ds;
-  attr_section as;
-  omap_hdr_section oh;
-  omap_section os;
-
-  if (!ob.hoid.hobj.is_head()) {
-    cout << "Skipping non-head for " << ob.hoid << std::endl;
-  }
-
-  ioctx.set_namespace(ob.hoid.hobj.get_namespace());
-
-  string msg("Write");
-  int ret = ioctx.create(ob.hoid.hobj.oid.name, true);
-  if (ret && ret != -EEXIST) {
-    cerr << "create failed: " << cpp_strerror(ret) << std::endl;
-    return ret;
-  }
-  if (ret == -EEXIST) {
-    msg = "***Overwrite***";
-    ret = ioctx.remove(ob.hoid.hobj.oid.name);
-    if (ret < 0) {
-      cerr << "remove failed: " << cpp_strerror(ret) << std::endl;
-      return ret;
-    }
-    ret = ioctx.create(ob.hoid.hobj.oid.name, true);
-    if (ret < 0) {
-      cerr << "create failed: " << cpp_strerror(ret) << std::endl;
-      return ret;
-    }
-  }
-
-  cout << msg << " " << ob.hoid << std::endl;
-
-  bool need_align = false;
-  uint64_t alignment = 0;
-  if (testalign) {
-    need_align = true;
-    alignment = testalign;
-  } else {
-    if ((need_align = ioctx.pool_requires_alignment()))
-      alignment = ioctx.pool_required_alignment();
-  }
-
-  if (debug && need_align)
-    cerr << "alignment = " << alignment << std::endl;
-
-  bufferlist ebl, databl;
-  uint64_t in_offset = 0, out_offset = 0;
-  bool done = false;
-  while(!done) {
-    sectiontype_t type;
-    int ret = read_section(file_fd, &type, &ebl);
-    if (ret)
-      return ret;
-
-    ebliter = ebl.begin();
-    //cout << "\tdo_object: Section type " << hex << type << dec << std::endl;
-    //cout << "\t\tsection size " << ebl.length() << std::endl;
-    if (type >= END_OF_TYPES) {
-      cout << "Skipping unknown object section type" << std::endl;
-      continue;
-    }
-    switch(type) {
-    case TYPE_DATA:
-      ds.decode(ebliter);
-      if (debug)
-        cerr << "\tdata: offset " << ds.offset << " len " << ds.len << std::endl;
-      if (need_align) {
-        if (ds.offset != in_offset) {
-          cerr << "Discontiguous object data in export" << std::endl;
-          return EFAULT;
-        }
-        assert(ds.databl.length() == ds.len);
-        databl.claim_append(ds.databl);
-        in_offset += ds.len;
-        if (databl.length() >= alignment) {
-          uint64_t rndlen = uint64_t(databl.length() / alignment) * alignment;
-          if (debug) cerr << "write offset=" << out_offset << " len=" << rndlen << std::endl;
-          ret = ioctx.write(ob.hoid.hobj.oid.name, databl, rndlen, out_offset);
-          if (ret) {
-            cerr << "write failed: " << cpp_strerror(ret) << std::endl;
-            return ret;
-          }
-          out_offset += rndlen;
-          bufferlist n;
-          if (databl.length() > rndlen) {
-            assert(databl.length() - rndlen < alignment);
-	    n.substr_of(databl, rndlen, databl.length() - rndlen);
-          }
-          databl = n;
-        }
-        break;
-      }
-      ret = ioctx.write(ob.hoid.hobj.oid.name, ds.databl, ds.len, ds.offset);
-      if (ret) {
-        cerr << "write failed: " << cpp_strerror(ret) << std::endl;
-        return ret;
-      }
-      break;
-    case TYPE_ATTRS:
-      as.decode(ebliter);
-
-      if (debug)
-        cerr << "\tattrs: len " << as.data.size() << std::endl;
-      for (i = as.data.begin(); i != as.data.end(); ++i) {
-        if (i->first == "_" || i->first == "snapset")
-          continue;
-        abl.clear();
-        abl.push_front(i->second);
-        ret = ioctx.setxattr(ob.hoid.hobj.oid.name, i->first.substr(1).c_str(), abl);
-        if (ret) {
-          cerr << "setxattr failed: " << cpp_strerror(ret) << std::endl;
-          if (ret != -EOPNOTSUPP)
-            return ret;
-        }
-      }
-      break;
-    case TYPE_OMAP_HDR:
-      oh.decode(ebliter);
-
-      if (debug)
-        cerr << "\tomap header: " << string(oh.hdr.c_str(), oh.hdr.length())
-          << std::endl;
-      ret = ioctx.omap_set_header(ob.hoid.hobj.oid.name, oh.hdr);
-      if (ret) {
-        cerr << "omap_set_header failed: " << cpp_strerror(ret) << std::endl;
-        if (ret != -EOPNOTSUPP)
-          return ret;
-      }
-      break;
-    case TYPE_OMAP:
-      os.decode(ebliter);
-
-      if (debug)
-        cerr << "\tomap: size " << os.omap.size() << std::endl;
-      ret = ioctx.omap_set(ob.hoid.hobj.oid.name, os.omap);
-      if (ret) {
-        cerr << "omap_set failed: " << cpp_strerror(ret) << std::endl;
-        if (ret != -EOPNOTSUPP)
-          return ret;
-      }
-      break;
-    case TYPE_OBJECT_END:
-      if (need_align && databl.length() > 0) {
-        assert(databl.length() < alignment);
-        if (debug) cerr << "END write offset=" << out_offset << " len=" << databl.length() << std::endl;
-        ret = ioctx.write(ob.hoid.hobj.oid.name, databl, databl.length(), out_offset);
-        if (ret) {
-           cerr << "write failed: " << cpp_strerror(ret) << std::endl;
-          return ret;
-        }
-      }
-      done = true;
-      break;
-    default:
-      return EFAULT;
-    }
-  }
-  return 0;
-}
-
-int get_object(ObjectStore *store, coll_t coll, bufferlist &bl)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-  bufferlist::iterator ebliter = bl.begin();
-  object_begin ob;
-  ob.decode(ebliter);
-  OSDriver driver(
-    store,
-    coll_t(),
-    OSD::make_snapmapper_oid());
-  spg_t pg;
-  coll.is_pg_prefix(pg);
-  SnapMapper mapper(&driver, 0, 0, 0, pg.shard);
-
-  t->touch(coll, ob.hoid);
-
-  cout << "Write " << ob.hoid << std::endl;
-
-  bufferlist ebl;
-  bool done = false;
-  while(!done) {
-    sectiontype_t type;
-    int ret = read_section(file_fd, &type, &ebl);
-    if (ret)
-      return ret;
-
-    //cout << "\tdo_object: Section type " << hex << type << dec << std::endl;
-    //cout << "\t\tsection size " << ebl.length() << std::endl;
-    if (type >= END_OF_TYPES) {
-      cout << "Skipping unknown object section type" << std::endl;
-      continue;
-    }
-    switch(type) {
-    case TYPE_DATA:
-      ret = get_data(store, coll, ob.hoid, t, ebl);
-      if (ret) return ret;
-      break;
-    case TYPE_ATTRS:
-      ret = get_attrs(store, coll, ob.hoid, t, ebl, driver, mapper);
-      if (ret) return ret;
-      break;
-    case TYPE_OMAP_HDR:
-      ret = get_omap_hdr(store, coll, ob.hoid, t, ebl);
-      if (ret) return ret;
-      break;
-    case TYPE_OMAP:
-      ret = get_omap(store, coll, ob.hoid, t, ebl);
-      if (ret) return ret;
-      break;
-    case TYPE_OBJECT_END:
-      done = true;
-      break;
-    default:
-      return EFAULT;
-    }
-  }
-  store->apply_transaction(*t);
-  return 0;
-}
-
-int get_pg_metadata(ObjectStore *store, coll_t coll, bufferlist &bl)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-  bufferlist::iterator ebliter = bl.begin();
-  metadata_section ms;
-  ms.decode(ebliter);
-
-#if DIAGNOSTIC
-  Formatter *formatter = new JSONFormatter(true);
-  cout << "struct_v " << (int)ms.struct_ver << std::endl;
-  cout << "epoch " << ms.map_epoch << std::endl;
-  formatter->open_object_section("info");
-  ms.info.dump(formatter);
-  formatter->close_section();
-  formatter->flush(cout);
-  cout << std::endl;
-
-  formatter->open_object_section("log");
-  ms.log.dump(formatter);
-  formatter->close_section();
-  formatter->flush(cout);
-  cout << std::endl;
-#endif
-
-  coll_t newcoll(ms.info.pgid);
-  t->collection_rename(coll, newcoll);
-
-  int ret = write_pg(*t, ms.map_epoch, ms.info, ms.log, ms.struct_ver, ms.past_intervals);
-  if (ret) return ret;
-
-  store->apply_transaction(*t);
-
-  return 0;
-}
-
-int do_import_rados(string pool)
-{
-  bufferlist ebl;
-  pg_info_t info;
-  PGLog::IndexedLog log;
-
-  int ret = sh.read_super();
-  if (ret)
-    return ret;
-
-  if (sh.magic != super_header::super_magic) {
-    cerr << "Invalid magic number" << std::endl;
-    return EFAULT;
-  }
-
-  if (sh.version > super_header::super_ver) {
-    cerr << "Can't handle export format version=" << sh.version << std::endl;
-    return EINVAL;
-  }
-
-  //First section must be TYPE_PG_BEGIN
-  sectiontype_t type;
-  ret = read_section(file_fd, &type, &ebl);
-  if (ret)
-    return ret;
-  if (type != TYPE_PG_BEGIN) {
-    return EFAULT;
-  }
-
-  bufferlist::iterator ebliter = ebl.begin();
-  pg_begin pgb;
-  pgb.decode(ebliter);
-  spg_t pgid = pgb.pgid;
-
-  if (!pgid.is_no_shard()) {
-    cerr << "Importing Erasure Coded shard is not supported" << std::endl;
-    exit(1);
-  }
-
-  if (debug) {
-    cerr << "Exported features: " << pgb.superblock.compat_features << std::endl;
-  }
-
-  // XXX: How to check export features?
-#if 0
-  if (sb.compat_features.compare(pgb.superblock.compat_features) == -1) {
-    cerr << "Export has incompatible features set "
-      << pgb.superblock.compat_features << std::endl;
-    return 1;
-  }
-#endif
-
-  librados::IoCtx ioctx;
-  librados::Rados cluster;
-
-  char *id = getenv("CEPH_CLIENT_ID");
-  if (id) cerr << "Client id is: " << id << std::endl;
-  ret = cluster.init(id);
-  if (ret) {
-    cerr << "Error " << ret << " in cluster.init" << std::endl;
-    return ret;
-  }
-  ret = cluster.conf_read_file(NULL);
-  if (ret) {
-    cerr << "Error " << ret << " in cluster.conf_read_file" << std::endl;
-    return ret;
-  }
-  ret = cluster.conf_parse_env(NULL);
-  if (ret) {
-    cerr << "Error " << ret << " in cluster.conf_read_env" << std::endl;
-    return ret;
-  }
-  cluster.connect();
-
-  ret = cluster.ioctx_create(pool.c_str(), ioctx);
-  if (ret < 0) {
-    cerr << "ioctx_create " << pool << " failed with " << ret << std::endl;
-    return ret;
-  }
-
-  cout << "Importing from pgid " << pgid << std::endl;
-
-  bool done = false;
-  bool found_metadata = false;
-  while(!done) {
-    ret = read_section(file_fd, &type, &ebl);
-    if (ret)
-      return ret;
-
-    //cout << "do_import: Section type " << hex << type << dec << std::endl;
-    if (type >= END_OF_TYPES) {
-      cout << "Skipping unknown section type" << std::endl;
-      continue;
-    }
-    switch(type) {
-    case TYPE_OBJECT_BEGIN:
-      ret = get_object_rados(ioctx, ebl);
-      if (ret) return ret;
-      break;
-    case TYPE_PG_METADATA:
-      if (debug)
-        cout << "Don't care about the old metadata" << std::endl;
-      found_metadata = true;
-      break;
-    case TYPE_PG_END:
-      done = true;
-      break;
-    default:
-      return EFAULT;
-    }
-  }
-
-  if (!found_metadata) {
-    cerr << "Missing metadata section, ignored" << std::endl;
-  }
-
-  return 0;
-}
-
-int do_import(ObjectStore *store, OSDSuperblock& sb)
-{
-  bufferlist ebl;
-  pg_info_t info;
-  PGLog::IndexedLog log;
-
-  uint64_t next_removal_seq = 0;	//My local seq
-  finish_remove_pgs(store, &next_removal_seq);
-
-  int ret = sh.read_super();
-  if (ret)
-    return ret;
-
-  if (sh.magic != super_header::super_magic) {
-    cerr << "Invalid magic number" << std::endl;
-    return EFAULT;
-  }
-
-  if (sh.version > super_header::super_ver) {
-    cerr << "Can't handle export format version=" << sh.version << std::endl;
-    return EINVAL;
-  }
-
-  //First section must be TYPE_PG_BEGIN
-  sectiontype_t type;
-  ret = read_section(file_fd, &type, &ebl);
-  if (ret)
-    return ret;
-  if (type != TYPE_PG_BEGIN) {
-    return EFAULT;
-  }
-
-  bufferlist::iterator ebliter = ebl.begin();
-  pg_begin pgb;
-  pgb.decode(ebliter);
-  spg_t pgid = pgb.pgid;
-
-  if (debug) {
-    cerr << "Exported features: " << pgb.superblock.compat_features << std::endl;
-  }
-  if (sb.compat_features.compare(pgb.superblock.compat_features) == -1) {
-    cerr << "Export has incompatible features set "
-      << pgb.superblock.compat_features << std::endl;
-    return 1;
-  }
-
-  log_oid = OSD::make_pg_log_oid(pgid);
-  biginfo_oid = OSD::make_pg_biginfo_oid(pgid);
-
-  //Check for PG already present.
-  coll_t coll(pgid);
-  if (store->collection_exists(coll)) {
-    cerr << "pgid " << pgid << " already exists" << std::endl;
-    return 1;
-  }
-
-  //Switch to collection which will be removed automatically if
-  //this program is interupted.
-  coll_t rmcoll = coll_t::make_removal_coll(next_removal_seq, pgid);
-  ObjectStore::Transaction *t = new ObjectStore::Transaction;
-  t->create_collection(rmcoll);
-  store->apply_transaction(*t);
-  delete t;
-
-  cout << "Importing pgid " << pgid << std::endl;
-
-  bool done = false;
-  bool found_metadata = false;
-  while(!done) {
-    ret = read_section(file_fd, &type, &ebl);
-    if (ret)
-      return ret;
-
-    //cout << "do_import: Section type " << hex << type << dec << std::endl;
-    if (type >= END_OF_TYPES) {
-      cout << "Skipping unknown section type" << std::endl;
-      continue;
-    }
-    switch(type) {
-    case TYPE_OBJECT_BEGIN:
-      ret = get_object(store, rmcoll, ebl);
-      if (ret) return ret;
-      break;
-    case TYPE_PG_METADATA:
-      ret = get_pg_metadata(store, rmcoll, ebl);
-      if (ret) return ret;
-      found_metadata = true;
-      break;
-    case TYPE_PG_END:
-      done = true;
-      break;
-    default:
-      return EFAULT;
-    }
-  }
-
-  if (!found_metadata) {
-    cerr << "Missing metadata section" << std::endl;
-    return EFAULT;
-  }
-
-  return 0;
-}
-
-int do_list(ObjectStore *store, coll_t coll, Formatter *formatter)
-{
-  ghobject_t next;
-  while (!next.is_max()) {
-    vector<ghobject_t> objects;
-    int r = store->collection_list_partial(coll, next, 200, 300, 0,
-      &objects, &next);
-    if (r < 0)
-      return r;
-    for (vector<ghobject_t>::iterator i = objects.begin();
-	 i != objects.end(); ++i) {
-
-      formatter->open_object_section("list");
-      i->dump(formatter);
-      formatter->close_section();
-      formatter->flush(cout);
-      cout << std::endl;
-    }
-  }
-  return 0;
-}
-
-int do_remove_object(ObjectStore *store, coll_t coll, ghobject_t &ghobj)
-{
-  spg_t pg;
-  coll.is_pg_prefix(pg);
-  OSDriver driver(
-    store,
-    coll_t(),
-    OSD::make_snapmapper_oid());
-  SnapMapper mapper(&driver, 0, 0, 0, pg.shard);
-  struct stat st;
-
-  int r = store->stat(coll, ghobj, &st);
-  if (r < 0) {
-    cerr << "remove: " << cpp_strerror(-r) << std::endl;
-    return r;
-  }
-
-  ObjectStore::Transaction *t = new ObjectStore::Transaction;
-  OSDriver::OSTransaction _t(driver.get_transaction(t));
-  cout << "remove " << ghobj << std::endl;
-  r = mapper.remove_oid(ghobj.hobj, &_t);
-  if (r != 0 && r != -ENOENT) {
-    cerr << "remove_oid returned " << cpp_strerror(-r) << std::endl;
-    return r;
-  }
-
-  t->remove(coll, ghobj);
-
-  store->apply_transaction(*t);
-  delete t;
-  return 0;
-}
-
-int do_list_attrs(ObjectStore *store, coll_t coll, ghobject_t &ghobj)
-{
-  map<string,bufferptr> aset;
-  int r = store->getattrs(coll, ghobj, aset);
-  if (r < 0) {
-    cerr << "getattrs: " << cpp_strerror(-r) << std::endl;
-    return r;
-  }
-
-  for (map<string,bufferptr>::iterator i = aset.begin();i != aset.end(); ++i) {
-    string key(i->first);
-    if (outistty)
-      cleanbin(key);
-    cout << key << std::endl;
-  }
-  return 0;
-}
-
-int do_list_omap(ObjectStore *store, coll_t coll, ghobject_t &ghobj)
-{
-  ObjectMap::ObjectMapIterator iter = store->get_omap_iterator(coll, ghobj);
-  if (!iter) {
-    cerr << "omap_get_iterator: " << cpp_strerror(ENOENT) << std::endl;
-    return -ENOENT;
-  }
-  iter->seek_to_first();
-  map<string, bufferlist> oset;
-  while(iter->valid()) {
-    get_omap_batch(iter, oset);
-
-    for (map<string,bufferlist>::iterator i = oset.begin();i != oset.end(); ++i) {
-      string key(i->first);
-      if (outistty)
-        cleanbin(key);
-      cout << key << std::endl;
-    }
-  }
-  return 0;
-}
-
-int do_get_bytes(ObjectStore *store, coll_t coll, ghobject_t &ghobj, int fd)
-{
-  struct stat st;
-  mysize_t total;
-
-  int ret = store->stat(coll, ghobj, &st);
-  if (ret < 0) {
-    cerr << "get-bytes: " << cpp_strerror(-ret) << std::endl;
-    return 1;
-  }
-
-  total = st.st_size;
-  if (debug)
-    cerr << "size=" << total << std::endl;
-
-  uint64_t offset = 0;
-  bufferlist rawdatabl;
-  while(total > 0) {
-    rawdatabl.clear();
-    mysize_t len = max_read;
-    if (len > total)
-      len = total;
-
-    ret = store->read(coll, ghobj, offset, len, rawdatabl);
-    if (ret < 0)
-      return ret;
-    if (ret == 0)
-      return -EINVAL;
-
-    if (debug)
-      cerr << "data section offset=" << offset << " len=" << len << std::endl;
-
-    total -= ret;
-    offset += ret;
-
-    ret = write(fd, rawdatabl.c_str(), ret);
-    if (ret == -1) {
-      perror("write");
-      return 1;
-    }
-  }
-
-  return 0;
-}
-
-int do_set_bytes(ObjectStore *store, coll_t coll, ghobject_t &ghobj, int fd)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-
-  if (debug)
-    cerr << "Write " << ghobj << std::endl;
-
-  t->touch(coll, ghobj);
-  t->truncate(coll, ghobj, 0);
-
-  uint64_t offset = 0;
-  bufferlist rawdatabl;
-  do {
-    rawdatabl.clear();
-    ssize_t bytes = rawdatabl.read_fd(fd, max_read);
-    if (bytes < 0) {
-      cerr << "read_fd error " << cpp_strerror(-bytes) << std::endl;
-      return 1;
-    }
-
-    if (bytes == 0)
-      break;
-
-    if (debug)
-      cerr << "\tdata: offset " << offset << " bytes " << bytes << std::endl;
-    t->write(coll, ghobj, offset, bytes,  rawdatabl);
-
-    offset += bytes;
-    // XXX: Should we apply_transaction() every once in a while for very large files
-  } while(true);
-
-  store->apply_transaction(*t);
-  return 0;
-}
-
-int do_get_attr(ObjectStore *store, coll_t coll, ghobject_t &ghobj, string key)
-{
-  bufferptr bp;
-
-  int r = store->getattr(coll, ghobj, key.c_str(), bp);
-  if (r < 0) {
-    cerr << "getattr: " << cpp_strerror(-r) << std::endl;
-    return r;
-  }
-
-  string value(bp.c_str(), bp.length());
-  if (outistty) {
-    cleanbin(value);
-    value.push_back('\n');
-  }
-  cout << value;
-
-  return 0;
-}
-
-int do_set_attr(ObjectStore *store, coll_t coll, ghobject_t &ghobj, string key, int fd)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-  bufferlist bl;
-
-  if (debug)
-    cerr << "Setattr " << ghobj << std::endl;
-
-  if (get_fd_data(fd, bl))
-    return 1;
-
-  t->touch(coll, ghobj);
-
-  t->setattr(coll, ghobj, key,  bl);
-
-  store->apply_transaction(*t);
-  return 0;
-}
-
-int do_rm_attr(ObjectStore *store, coll_t coll, ghobject_t &ghobj, string key)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-
-  if (debug)
-    cerr << "Rmattr " << ghobj << std::endl;
-
-  t->rmattr(coll, ghobj, key);
-
-  store->apply_transaction(*t);
-  return 0;
-}
-
-int do_get_omap(ObjectStore *store, coll_t coll, ghobject_t &ghobj, string key)
-{
-  set<string> keys;
-  map<string, bufferlist> out;
-
-  keys.insert(key);
-
-  int r = store->omap_get_values(coll, ghobj, keys, &out);
-  if (r < 0) {
-    cerr << "omap_get_values: " << cpp_strerror(-r) << std::endl;
-    return r;
-  }
-
-  if (out.empty()) {
-    cerr << "Key not found" << std::endl;
-    return -ENOENT;
-  }
-
-  assert(out.size() == 1);
-
-  bufferlist bl = out.begin()->second;
-  string value(bl.c_str(), bl.length());
-  if (outistty) {
-    cleanbin(value);
-    value.push_back('\n');
-  }
-  cout << value;
-
-  return 0;
-}
-
-int do_set_omap(ObjectStore *store, coll_t coll, ghobject_t &ghobj, string key, int fd)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-  map<string, bufferlist> attrset;
-  bufferlist valbl;
-
-  if (debug)
-    cerr << "Set_omap " << ghobj << std::endl;
-
-  if (get_fd_data(fd, valbl))
-    return 1;
-
-  attrset.insert(pair<string, bufferlist>(key, valbl));
-
-  t->touch(coll, ghobj);
-
-  t->omap_setkeys(coll, ghobj, attrset);
-
-  store->apply_transaction(*t);
-  return 0;
-}
-
-int do_rm_omap(ObjectStore *store, coll_t coll, ghobject_t &ghobj, string key)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-  set<string> keys;
-
-  keys.insert(key);
-
-  if (debug)
-    cerr << "Rm_omap " << ghobj << std::endl;
-
-  t->omap_rmkeys(coll, ghobj, keys);
-
-  store->apply_transaction(*t);
-  return 0;
-}
-
-int do_get_omaphdr(ObjectStore *store, coll_t coll, ghobject_t &ghobj)
-{
-  bufferlist hdrbl;
-
-  int r = store->omap_get_header(coll, ghobj, &hdrbl, true);
-  if (r < 0) {
-    cerr << "omap_get_header: " << cpp_strerror(-r) << std::endl;
-    return r;
-  }
-
-  string header(hdrbl.c_str(), hdrbl.length());
-  if (outistty) {
-    cleanbin(header);
-    header.push_back('\n');
-  }
-  cout << header;
-
-  return 0;
-}
-
-int do_set_omaphdr(ObjectStore *store, coll_t coll, ghobject_t &ghobj, int fd)
-{
-  ObjectStore::Transaction tran;
-  ObjectStore::Transaction *t = &tran;
-  bufferlist hdrbl;
-
-  if (debug)
-    cerr << "Omap_setheader " << ghobj << std::endl;
-
-  if (get_fd_data(fd, hdrbl))
-    return 1;
-
-  t->touch(coll, ghobj);
-
-  t->omap_setheader(coll, ghobj, hdrbl);
-
-  store->apply_transaction(*t);
-  return 0;
-}
-
-void usage(po::options_description &desc)
-{
-    cerr << std::endl;
-    cerr << desc << std::endl;
-    cerr << std::endl;
-    cerr << "Positional syntax:" << std::endl;
-    cerr << std::endl;
-    cerr << "(requires --data, --journal (for filestore type) and --pgid to be specified)" << std::endl;
-    cerr << "(optional [file] argument will read stdin or write stdout if not specified or if '-' specified)" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> (get|set)-bytes [file]" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> (set-(attr|omap) <key> [file]" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> (set-omaphdr) [file]" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> (get|rm)-(attr|omap) <key>" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> (get-omaphdr)" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> list-attrs" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> list-omap" << std::endl;
-    cerr << "ceph_objectstore_tool ... <object> remove" << std::endl;
-    cerr << std::endl;
-    cerr << "ceph_objectstore_tool import-rados <pool> [file]" << std::endl;
-    cerr << std::endl;
-    exit(1);
-}
-
-int main(int argc, char **argv)
-{
-  string dpath, jpath, pgidstr, op, file, object, objcmd, arg1, arg2, type;
-  ghobject_t ghobj;
-
-  po::options_description desc("Allowed options");
-  desc.add_options()
-    ("help", "produce help message")
-    ("type", po::value<string>(&type),
-     "Arg is one of [filestore (default), memstore, keyvaluestore-dev]")
-    ("data-path", po::value<string>(&dpath),
-     "path to object store, mandatory")
-    ("journal-path", po::value<string>(&jpath),
-     "path to journal, mandatory for filestore type")
-    ("pgid", po::value<string>(&pgidstr),
-     "PG id, mandatory except for import, list-lost, fix-lost")
-    ("op", po::value<string>(&op),
-     "Arg is one of [info, log, remove, export, import, list, list-lost, fix-lost, list-pgs, rm-past-intervals]")
-    ("file", po::value<string>(&file),
-     "path of file to export or import")
-    ("debug", "Enable diagnostic output to stderr")
-    ("skip-journal-replay", "Disable journal replay")
-    ("skip-mount-omap", "Disable mounting of omap")
-    ;
-
-  po::options_description positional("Positional options");
-  positional.add_options()
-    ("object", po::value<string>(&object), "ghobject in json")
-    ("objcmd", po::value<string>(&objcmd), "command [(get|set)-bytes, (get|set|rm)-(attr|omap), list-attrs, list-omap, remove]")
-    ("arg1", po::value<string>(&arg1), "arg1 based on cmd")
-    ("arg2", po::value<string>(&arg2), "arg2 based on cmd")
-    ("test-align", po::value<uint64_t>(&testalign)->default_value(0), "hidden align option for testing")
-    ;
-
-  po::options_description all("All options");
-  all.add(desc).add(positional);
-
-  po::positional_options_description pd;
-  pd.add("object", 1).add("objcmd", 1).add("arg1", 1).add("arg2", 1);
-
-  po::variables_map vm;
-  po::parsed_options parsed =
-   po::command_line_parser(argc, argv).options(all).allow_unregistered().positional(pd).run();
-  po::store( parsed, vm);
-  try {
-    po::notify(vm);
-  }
-  catch(...) {
-    usage(desc);
-  }
-
-  if (vm.count("help")) {
-    usage(desc);
-  }
-
-  if (!vm.count("debug")) {
-    debug = false;
-  } else {
-    debug = true;
-  }
-
-  // Handle completely different operation "import-rados"
-  if (object == "import-rados") {
-    if (vm.count("objcmd") == 0) {
-      cerr << "ceph_objectstore_tool import-rados <pool> [file]" << std::endl;
-      exit(1);
-    }
-
-    string pool = objcmd;
-    // positional argument takes precendence, but accept
-    // --file option too
-    if (!vm.count("arg1")) {
-      if (!vm.count("file"))
-        arg1 = "-";
-      else
-        arg1 = file;
-    }
-    if (arg1 == "-") {
-      if (isatty(STDIN_FILENO)) {
-        cerr << "stdin is a tty and no file specified" << std::endl;
-        exit(1);
-      }
-      file_fd = STDIN_FILENO;
-    } else {
-      file_fd = open(arg1.c_str(), O_RDONLY);
-      if (file_fd < 0) {
-        perror("open");
-        return 1;
-      }
-    }
-    int ret = do_import_rados(pool);
-    if (ret == 0)
-      cout << "Import successful" << std::endl;
-    return ret != 0;
-  }
-
-  if (!vm.count("data-path")) {
-    cerr << "Must provide --data-path" << std::endl;
-    usage(desc);
-  }
-  if (!vm.count("type")) {
-    type = "filestore";
-  }
-  if (type == "filestore" && !vm.count("journal-path")) {
-    cerr << "Must provide --journal-path" << std::endl;
-    usage(desc);
-  }
-  if (vm.count("object") && !vm.count("objcmd")) {
-    cerr << "Invalid syntax, missing command" << std::endl;
-    usage(desc);
-  }
-  if (!vm.count("op") && !(vm.count("object") && vm.count("objcmd"))) {
-    cerr << "Must provide --op or object command..." << std::endl;
-    usage(desc);
-  }
-  if (vm.count("op") && vm.count("object")) {
-    cerr << "Can't specify both --op and object command syntax" << std::endl;
-    usage(desc);
-  }
-  if (op != "import" && op != "list-lost" && op != "fix-lost"
-      && op != "list-pgs" && !vm.count("pgid")) {
-    cerr << "Must provide pgid" << std::endl;
-    usage(desc);
-  }
-
-  if (vm.count("object")) {
-    json_spirit::Value v;
-    try {
-      if (!json_spirit::read(object, v))
-        throw std::runtime_error("bad json");
-      ghobj.decode(v);
-    } catch (std::runtime_error& e) {
-      cerr << "error parsing offset: " << e.what() << std::endl;
-      exit(1);
-    }
-  }
-
-  outistty = isatty(STDOUT_FILENO);
-
-  file_fd = fd_none;
-  if (op == "export") {
-    if (!vm.count("file")) {
-      if (outistty) {
-        cerr << "stdout is a tty and no --file option specified" << std::endl;
-        exit(1);
-      }
-      file_fd = STDOUT_FILENO;
-    } else {
-      file_fd = open(file.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0666);
-    }
-  } else if (op == "import") {
-    if (!vm.count("file")) {
-      if (isatty(STDIN_FILENO)) {
-        cerr << "stdin is a tty and no --file option specified" << std::endl;
-        exit(1);
-      }
-      file_fd = STDIN_FILENO;
-    } else {
-      file_fd = open(file.c_str(), O_RDONLY);
-    }
-  }
-
-  if (vm.count("file") && file_fd == fd_none) {
-    cerr << "--file option only applies to import or export" << std::endl;
-    return 1;
-  }
-
-  if (file_fd != fd_none && file_fd < 0) {
-    perror("open");
-    return 1;
-  }
-
-  if (dpath.length() == 0) {
-    cerr << "Invalid params" << std::endl;
-    return 1;
-  }
-
-  if (op == "import" && pgidstr.length()) {
-    cerr << "--pgid option invalid with import" << std::endl;
-    return 1;
-  }
-
-  vector<const char *> ceph_options, def_args;
-  vector<string> ceph_option_strings = po::collect_unrecognized(
-    parsed.options, po::include_positional);
-  ceph_options.reserve(ceph_option_strings.size());
-  for (vector<string>::iterator i = ceph_option_strings.begin();
-       i != ceph_option_strings.end();
-       ++i) {
-    ceph_options.push_back(i->c_str());
-  }
-
-  osflagbits_t flags = 0;
-  if (vm.count("skip-journal-replay"))
-    flags |= SKIP_JOURNAL_REPLAY;
-  if (vm.count("skip-mount-omap"))
-    flags |= SKIP_MOUNT_OMAP;
-
-  global_init(
-    &def_args, ceph_options, CEPH_ENTITY_TYPE_OSD,
-    CODE_ENVIRONMENT_UTILITY_NODOUT, 0);
-    //CINIT_FLAG_NO_DEFAULT_CONFIG_FILE);
-  common_init_finish(g_ceph_context);
-  g_conf = g_ceph_context->_conf;
-  if (debug) {
-    g_conf->set_val_or_die("log_to_stderr", "true");
-    g_conf->set_val_or_die("err_to_stderr", "true");
-  }
-  g_conf->apply_changes(NULL);
-
-  //Verify that data-path really exists
-  struct stat st;
-  if (::stat(dpath.c_str(), &st) == -1) {
-     perror("data-path");
-     exit(1);
-  }
-  //Verify data data-path really is a filestore
-  if (type == "filestore") {
-    if (!S_ISDIR(st.st_mode)) {
-      invalid_filestore_path(dpath);
-    }
-    string check = dpath + "/whoami";
-    if (::stat(check.c_str(), &st) == -1) {
-       perror("whoami");
-       invalid_filestore_path(dpath);
-    }
-    if (!S_ISREG(st.st_mode)) {
-      invalid_filestore_path(dpath);
-    }
-    check = dpath + "/current";
-    if (::stat(check.c_str(), &st) == -1) {
-       perror("current");
-       invalid_filestore_path(dpath);
-    }
-    if (!S_ISDIR(st.st_mode)) {
-      invalid_filestore_path(dpath);
-    }
-  }
-
-  spg_t pgid;
-  if (pgidstr.length() && !pgid.parse(pgidstr.c_str())) {
-    cerr << "Invalid pgid '" << pgidstr << "' specified" << std::endl;
-    return 1;
-  }
-
-  ObjectStore *fs = ObjectStore::create(NULL, type, dpath, jpath, flags);
-  if (fs == NULL) {
-    cerr << "Must provide --type (filestore, memstore, keyvaluestore-dev)" << std::endl;
-    exit(1);
-  }
-
-  int r = fs->mount();
-  if (r < 0) {
-    if (r == -EBUSY) {
-      cerr << "OSD has the store locked" << std::endl;
-    } else {
-      cerr << "Mount failed with '" << cpp_strerror(-r) << "'" << std::endl;
-    }
-    return 1;
-  }
-
-  bool fs_sharded_objects = fs->get_allow_sharded_objects();
-
-  int ret = 0;
-  vector<coll_t> ls;
-  vector<coll_t>::iterator it;
-  CompatSet supported;
-
-#ifdef INTERNAL_TEST
-  supported = get_test_compat_set();
-#else
-  supported = OSD::get_osd_compat_set();
-#endif
-
-  bufferlist bl;
-  OSDSuperblock superblock;
-  bufferlist::iterator p;
-  r = fs->read(META_COLL, OSD_SUPERBLOCK_POBJECT, 0, 0, bl);
-  if (r < 0) {
-    cerr << "Failure to read OSD superblock error= " << r << std::endl;
-    goto out;
-  }
-
-  p = bl.begin();
-  ::decode(superblock, p);
-
-#ifdef INTERNAL_TEST2
-  fs->set_allow_sharded_objects();
-  assert(fs->get_allow_sharded_objects());
-  fs_sharded_objects = true;
-  superblock.compat_features.incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SHARDS);
-#endif
-
-  if (debug) {
-    cerr << "Supported features: " << supported << std::endl;
-    cerr << "On-disk features: " << superblock.compat_features << std::endl;
-  }
-  if (supported.compare(superblock.compat_features) == -1) {
-    cerr << "On-disk OSD incompatible features set "
-      << superblock.compat_features << std::endl;
-    ret = EINVAL;
-    goto out;
-  }
-
-  // If there was a crash as an OSD was transitioning to sharded objects
-  // and hadn't completed a set_allow_sharded_objects().
-  // This utility does not want to attempt to finish that transition.
-  if (superblock.compat_features.incompat.contains(CEPH_OSD_FEATURE_INCOMPAT_SHARDS) != fs_sharded_objects) {
-    // An OSD should never have call set_allow_sharded_objects() before
-    // updating its own OSD features.
-    if (fs_sharded_objects)
-      cerr << "FileStore sharded but OSD not set, Corruption?" << std::endl;
-    else
-      cerr << "Found incomplete transition to sharded objects" << std::endl;
-    ret = EINVAL;
-    goto out;
-  }
-
-  if (op == "import") {
-
-    try {
-      ret = do_import(fs, superblock);
-    }
-    catch (const buffer::error &e) {
-      cerr << "do_import threw exception error " << e.what() << std::endl;
-      ret = EFAULT;
-    }
-    if (ret == EFAULT) {
-      cerr << "Corrupt input for import" << std::endl;
-    }
-    if (ret == 0)
-      cout << "Import successful" << std::endl;
-    goto out;
-  }
-
-  log_oid = OSD::make_pg_log_oid(pgid);
-  biginfo_oid = OSD::make_pg_biginfo_oid(pgid);
-
-  if (op == "remove") {
-    uint64_t next_removal_seq = 0;	//My local seq
-    finish_remove_pgs(fs, &next_removal_seq);
-    int r = initiate_new_remove_pg(fs, pgid, &next_removal_seq);
-    if (r) {
-      cerr << "PG '" << pgid << "' not found" << std::endl;
-      ret = 1;
-      goto out;
-    }
-    finish_remove_pgs(fs, &next_removal_seq);
-    cout << "Remove successful" << std::endl;
-    goto out;
-  }
-
-  if (op == "list-lost" || op == "fix-lost") {
-    unsigned LIST_AT_A_TIME = 100;
-    unsigned scanned = 0;
-    int r = 0;
-    vector<coll_t> colls_to_check;
-    if (pgidstr.length()) {
-      colls_to_check.push_back(coll_t(pgid));
-    } else {
-      vector<coll_t> candidates;
-      r = fs->list_collections(candidates);
-      if (r < 0) {
-        cerr << "Error listing collections: " << cpp_strerror(r) << std::endl;
-        goto UMOUNT;
-      }
-      for (vector<coll_t>::iterator i = candidates.begin();
-           i != candidates.end();
-           ++i) {
-        spg_t pgid;
-        snapid_t snap;
-        if (i->is_pg(pgid, snap)) {
-          colls_to_check.push_back(*i);
-        }
-      }
-    }
-
-    cout << colls_to_check.size() << " pgs to scan" << std::endl;
-    for (vector<coll_t>::iterator i = colls_to_check.begin();
-         i != colls_to_check.end();
-         ++i, ++scanned) {
-      cout << "Scanning " << *i << ", " << scanned << "/"
-           << colls_to_check.size() << " completed" << std::endl;
-      ghobject_t next;
-      while (!next.is_max()) {
-        vector<ghobject_t> list;
-        r = fs->collection_list_partial(
-          *i,
-          next,
-          LIST_AT_A_TIME,
-          LIST_AT_A_TIME,
-          CEPH_NOSNAP,
-          &list,
-          &next);
-        if (r < 0) {
-          cerr << "Error listing collection: " << *i << ", "
-               << cpp_strerror(r) << std::endl;
-          goto UMOUNT;
-        }
-        for (vector<ghobject_t>::iterator obj = list.begin();
-             obj != list.end();
-             ++obj) {
-          bufferlist attr;
-          r = fs->getattr(*i, *obj, OI_ATTR, attr);
-          if (r < 0) {
-            cerr << "Error getting attr on : " << make_pair(*i, *obj) << ", "
-                 << cpp_strerror(r) << std::endl;
-            goto UMOUNT;
-          }
-          object_info_t oi;
-          bufferlist::iterator bp = attr.begin();
-          try {
-            ::decode(oi, bp);
-          } catch (...) {
-            r = -EINVAL;
-            cerr << "Error getting attr on : " << make_pair(*i, *obj) << ", "
-                 << cpp_strerror(r) << std::endl;
-            goto UMOUNT;
-          }
-          if (oi.is_lost()) {
-            if (op == "list-lost") {
-              cout << *i << "/" << *obj << " is lost" << std::endl;
-            }
-            if (op == "fix-lost") {
-              cout << *i << "/" << *obj << " is lost, fixing" << std::endl;
-              oi.clear_flag(object_info_t::FLAG_LOST);
-              bufferlist bl2;
-              ::encode(oi, bl2);
-              ObjectStore::Transaction t;
-              t.setattr(*i, *obj, OI_ATTR, bl2);
-              r = fs->apply_transaction(t);
-              if (r < 0) {
-                cerr << "Error getting fixing attr on : " << make_pair(*i, *obj)
-                     << ", "
-                     << cpp_strerror(r) << std::endl;
-                goto UMOUNT;
-              }
-            }
-          }
-        }
-      }
-    }
-    cout << "Completed" << std::endl;
-
-   UMOUNT:
-    fs->sync_and_flush();
-    ret = r;
-    goto out;
-  }
-
-  r = fs->list_collections(ls);
-  if (r < 0) {
-    cerr << "failed to list pgs: " << cpp_strerror(-r) << std::endl;
-    ret = 1;
-    goto out;
-  }
-
-  if (debug && op == "list-pgs")
-    cout << "Performing list-pgs operation" << std::endl;
-
-  // Find pg
-  for (it = ls.begin(); it != ls.end(); ++it) {
-    snapid_t snap;
-    spg_t tmppgid;
-
-    if (!it->is_pg(tmppgid, snap)) {
-      continue;
-    }
-
-    if (it->is_temp(tmppgid)) {
-      continue;
-    }
-
-    if (op != "list-pgs" && tmppgid != pgid) {
-      continue;
-    }
-    if (snap != CEPH_NOSNAP && debug) {
-      cout << "skipping snapped dir " << *it
-	       << " (pg " << pgid << " snap " << snap << ")" << std::endl;
-      continue;
-    }
-
-    if (op != "list-pgs") {
-      //Found!
-      break;
-    }
-
-    cout << tmppgid << std::endl;
-  }
-
-  if (op == "list-pgs") {
-    ret = 0;
-    goto out;
-  }
-
-  epoch_t map_epoch;
-// The following code for export, info, log require omap or !skip-mount-omap
-  if (it != ls.end()) {
-
-    coll_t coll = *it;
-
-    if (vm.count("objcmd")) {
-      ret = 0;
-      if (objcmd == "remove") {
-        int r = do_remove_object(fs, coll, ghobj);
-        if (r) {
-          ret = 1;
-        }
-        goto out;
-      } else if (objcmd == "list-attrs") {
-        int r = do_list_attrs(fs, coll, ghobj);
-        if (r) {
-          ret = 1;
-        }
-        goto out;
-      } else if (objcmd == "list-omap") {
-        int r = do_list_omap(fs, coll, ghobj);
-        if (r) {
-          ret = 1;
-        }
-        goto out;
-      } else if (objcmd == "get-bytes" || objcmd == "set-bytes") {
-        int r;
-        if (objcmd == "get-bytes") {
-          int fd;
-          if (vm.count("arg1") == 0 || arg1 == "-") {
-            fd = STDOUT_FILENO;
-	  } else {
-            fd = open(arg1.c_str(), O_WRONLY|O_TRUNC|O_CREAT|O_EXCL|O_LARGEFILE, 0666);
-            if (fd == -1) {
-              cerr << "open " << arg1 << " " << cpp_strerror(errno) << std::endl;
-              ret = 1;
-              goto out;
-            }
-          }
-          r = do_get_bytes(fs, coll, ghobj, fd);
-          if (fd != STDOUT_FILENO)
-            close(fd);
-        } else {
-          int fd;
-          if (vm.count("arg1") == 0 || arg1 == "-") {
-            fd = STDIN_FILENO;
-	  } else {
-            fd = open(arg1.c_str(), O_RDONLY|O_LARGEFILE, 0666);
-            if (fd == -1) {
-              cerr << "open " << arg1 << " " << cpp_strerror(errno) << std::endl;
-              ret = 1;
-              goto out;
-            }
-          }
-          r = do_set_bytes(fs, coll, ghobj, fd);
-          if (fd != STDIN_FILENO)
-            close(fd);
-        }
-        if (r)
-          ret = 1;
-        goto out;
-      } else if (objcmd == "get-attr") {
-	if (vm.count("arg1") == 0)
-	  usage(desc);
-	r = do_get_attr(fs, coll, ghobj, arg1);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "set-attr") {
-	if (vm.count("arg1") == 0)
-	  usage(desc);
-
-	int fd;
-	if (vm.count("arg2") == 0 || arg2 == "-") {
-	  fd = STDIN_FILENO;
-	} else {
-	  fd = open(arg2.c_str(), O_RDONLY|O_LARGEFILE, 0666);
-	  if (fd == -1) {
-	    cerr << "open " << arg2 << " " << cpp_strerror(errno) << std::endl;
-	    ret = 1;
-	    goto out;
-	  }
-	}
-	r = do_set_attr(fs, coll, ghobj, arg1, fd);
-	if (fd != STDIN_FILENO)
-	  close(fd);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "rm-attr") {
-	if (vm.count("arg1") == 0)
-	  usage(desc);
-	r = do_rm_attr(fs, coll, ghobj, arg1);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "get-omap") {
-	if (vm.count("arg1") == 0)
-	  usage(desc);
-	r = do_get_omap(fs, coll, ghobj, arg1);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "set-omap") {
-	if (vm.count("arg1") == 0)
-	  usage(desc);
-
-	int fd;
-	if (vm.count("arg2") == 0 || arg2 == "-") {
-	  fd = STDIN_FILENO;
-	} else {
-	  fd = open(arg2.c_str(), O_RDONLY|O_LARGEFILE, 0666);
-	  if (fd == -1) {
-	    cerr << "open " << arg2 << " " << cpp_strerror(errno) << std::endl;
-	    ret = 1;
-	    goto out;
-	  }
-	}
-	r = do_set_omap(fs, coll, ghobj, arg1, fd);
-	if (fd != STDIN_FILENO)
-	  close(fd);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "rm-omap") {
-	if (vm.count("arg1") == 0)
-	  usage(desc);
-	r = do_rm_omap(fs, coll, ghobj, arg1);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "get-omaphdr") {
-	if (vm.count("arg1"))
-	  usage(desc);
-	r = do_get_omaphdr(fs, coll, ghobj);
-	if (r)
-	  ret = 1;
-        goto out;
-      } else if (objcmd == "set-omaphdr") {
-        // Extra arg
-	if (vm.count("arg2"))
-	  usage(desc);
-	int fd;
-	if (vm.count("arg1") == 0 || arg1 == "-") {
-	  fd = STDIN_FILENO;
-	} else {
-	  fd = open(arg1.c_str(), O_RDONLY|O_LARGEFILE, 0666);
-	  if (fd == -1) {
-	    cerr << "open " << arg1 << " " << cpp_strerror(errno) << std::endl;
-	    ret = 1;
-	    goto out;
-	  }
-	}
-	r = do_set_omaphdr(fs, coll, ghobj, fd);
-	if (fd != STDIN_FILENO)
-	  close(fd);
-	if (r)
-	  ret = 1;
-        goto out;
-      }
-      cerr << "Unknown object command '" << objcmd << "'" << std::endl;
-      usage(desc);
-    }
-
-    if (op == "list") {
-      Formatter *formatter = new JSONFormatter(false);
-      r = do_list(fs, coll, formatter);
-      if (r) {
-        cerr << "do_list failed with " << r << std::endl;
-        ret = 1;
-      }
-      goto out;
-    }
-
-    Formatter *formatter = new JSONFormatter(true);
-    bufferlist bl;
-    map_epoch = PG::peek_map_epoch(fs, coll, infos_oid, &bl);
-    if (debug)
-      cerr << "map_epoch " << map_epoch << std::endl;
-
-    pg_info_t info(pgid);
-    map<epoch_t,pg_interval_t> past_intervals;
-    hobject_t biginfo_oid = OSD::make_pg_biginfo_oid(pgid);
-    interval_set<snapid_t> snap_collections;
-
-    __u8 struct_ver;
-    r = PG::read_info(fs, coll, bl, info, past_intervals, biginfo_oid,
-      infos_oid, snap_collections, struct_ver);
-    if (r < 0) {
-      cerr << "read_info error " << cpp_strerror(-r) << std::endl;
-      ret = 1;
-      goto out;
-    }
-    if (debug)
-      cerr << "struct_v " << (int)struct_ver << std::endl;
-
-    if (op == "export") {
-      ret = do_export(fs, coll, pgid, info, map_epoch, struct_ver, superblock, past_intervals);
-      if (ret == 0 && file_fd != STDOUT_FILENO)
-        cout << "Export successful" << std::endl;
-    } else if (op == "info") {
-      formatter->open_object_section("info");
-      info.dump(formatter);
-      formatter->close_section();
-      formatter->flush(cout);
-      cout << std::endl;
-    } else if (op == "log") {
-      PGLog::IndexedLog log;
-      pg_missing_t missing;
-      ret = get_log(fs, coll, pgid, info, log, missing);
-      if (ret > 0)
-          goto out;
-
-      formatter->open_object_section("log");
-      log.dump(formatter);
-      formatter->close_section();
-      formatter->flush(cout);
-      cout << std::endl;
-      formatter->open_object_section("missing");
-      missing.dump(formatter);
-      formatter->close_section();
-      formatter->flush(cout);
-      cout << std::endl;
-    } else if (op == "rm-past-intervals") {
-      ObjectStore::Transaction tran;
-      ObjectStore::Transaction *t = &tran;
-
-      cout << "Remove past-intervals " << past_intervals << std::endl;
-
-      past_intervals.clear();
-      ret = write_info(*t, map_epoch, info, struct_ver, past_intervals);
-
-      if (ret == 0) {
-        fs->apply_transaction(*t);
-        cout << "Removal succeeded" << std::endl;
-      }
-    } else {
-      cerr << "Must provide --op (info, log, remove, export, import, list, list-lost, fix-lost, list-pgs, rm-past-intervals)"
-	<< std::endl;
-      usage(desc);
-    }
-  } else {
-    cerr << "PG '" << pgid << "' not found" << std::endl;
-    ret = 1;
-  }
-
-out:
-  if (fs->umount() < 0) {
-    cerr << "umount failed" << std::endl;
-    return 1;
-  }
-
-  return (ret != 0);
-}
diff --git a/src/tools/ceph_osdomap_tool.cc b/src/tools/ceph_osdomap_tool.cc
index eba4115..f368a4b 100644
--- a/src/tools/ceph_osdomap_tool.cc
+++ b/src/tools/ceph_osdomap_tool.cc
@@ -10,17 +10,29 @@
 * License kkjversion 2.1, as published by the Free Software
 * Foundation. See file COPYING.
 */
+#include <boost/scoped_ptr.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/program_options/option.hpp>
+#include <boost/program_options/options_description.hpp>
 #include <boost/program_options/variables_map.hpp>
+#include <boost/program_options/cmdline.hpp>
 #include <boost/program_options/parsers.hpp>
-
+#include <iostream>
+#include <set>
+#include <sstream>
 #include <stdlib.h>
+#include <fstream>
 #include <string>
+#include <sstream>
+#include <map>
+#include <set>
+#include <boost/scoped_ptr.hpp>
 
-#include "common/errno.h"
 #include "global/global_init.h"
-
-#include "os/DBObjectMap.h"
 #include "os/LevelDBStore.h"
+#include "mon/MonitorDBStore.h"
+#include "os/DBObjectMap.h"
+#include "common/errno.h"
 
 namespace po = boost::program_options;
 using namespace std;
diff --git a/src/tools/cephfs/EventOutput.cc b/src/tools/cephfs/EventOutput.cc
deleted file mode 100644
index 6af9497..0000000
--- a/src/tools/cephfs/EventOutput.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-
-#include <iostream>
-#include <fstream>
-
-#include "common/errno.h"
-#include "mds/mdstypes.h"
-#include "mds/events/EUpdate.h"
-#include "mds/LogEvent.h"
-#include "JournalScanner.h"
-
-#include "EventOutput.h"
-
-
-int EventOutput::binary() const
-{
-  // Binary output, files
-  int r = ::mkdir(path.c_str(), 0755);
-  if (r != 0) {
-    std::cerr << "Error creating output directory: " << cpp_strerror(r) << std::endl;
-    return r;
-  }
-
-  for (JournalScanner::EventMap::const_iterator i = scan.events.begin(); i != scan.events.end(); ++i) {
-    LogEvent *le = i->second.log_event;
-    bufferlist le_bin;
-    le->encode(le_bin);
-
-    std::stringstream filename;
-    filename << "0x" << std::hex << i->first << std::dec << "_" << le->get_type_str() << ".bin";
-    std::string const file_path = path + std::string("/") + filename.str();
-    std::ofstream bin_file(file_path.c_str(), std::ofstream::out | std::ofstream::binary);
-    le_bin.write_stream(bin_file);
-    bin_file.close();
-    if (bin_file.fail()) {
-      return -EIO;
-    }
-  }
-  std::cerr << "Wrote output to binary files in directory '" << path << "'" << std::endl;
-
-  return 0;
-}
-
-int EventOutput::json() const
-{
-  JSONFormatter jf(true);
-  std::ofstream out_file(path.c_str(), std::ofstream::out);
-  jf.open_array_section("journal");
-  {
-    for (JournalScanner::EventMap::const_iterator i = scan.events.begin(); i != scan.events.end(); ++i) {
-      LogEvent *le = i->second.log_event;
-      jf.open_object_section("log_event");
-      {
-        le->dump(&jf);
-      }
-      jf.close_section();  // log_event
-    }
-  }
-  jf.close_section();  // journal
-  jf.flush(out_file);
-  out_file.close();
-
-  if (out_file.fail()) {
-    return -EIO;
-  } else {
-    std::cerr << "Wrote output to JSON file '" << path << "'" << std::endl;
-    return 0;
-  }
-}
-
-void EventOutput::list() const
-{
-  for (JournalScanner::EventMap::const_iterator i = scan.events.begin(); i != scan.events.end(); ++i) {
-    std::vector<std::string> ev_paths;
-    EMetaBlob const *emb = i->second.log_event->get_metablob();
-    if (emb) {
-      emb->get_paths(ev_paths);
-    }
-
-    std::string detail;
-    if (i->second.log_event->get_type() == EVENT_UPDATE) {
-      EUpdate *eu = reinterpret_cast<EUpdate*>(i->second.log_event);
-      detail = eu->type;
-    }
-
-    std::cout << "0x"
-      << std::hex << i->first << std::dec << " "
-      << i->second.log_event->get_type_str() << ": "
-      << " (" << detail << ")" << std::endl;
-    for (std::vector<std::string>::iterator i = ev_paths.begin(); i != ev_paths.end(); ++i) {
-        std::cout << "  " << *i << std::endl;
-    }
-  }
-}
-
-void EventOutput::summary() const
-{
-  std::map<std::string, int> type_count;
-  for (JournalScanner::EventMap::const_iterator i = scan.events.begin(); i != scan.events.end(); ++i) {
-    std::string const type = i->second.log_event->get_type_str();
-    if (type_count.count(type) == 0) {
-      type_count[type] = 0;
-    }
-    type_count[type] += 1;
-  }
-
-  std::cout << "Events by type:" << std::endl;
-  for (std::map<std::string, int>::iterator i = type_count.begin(); i != type_count.end(); ++i) {
-      std::cout << "  " << i->first << ": " << i->second << std::endl;
-  }
-}
diff --git a/src/tools/cephfs/EventOutput.h b/src/tools/cephfs/EventOutput.h
deleted file mode 100644
index 65d9684..0000000
--- a/src/tools/cephfs/EventOutput.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-
-#ifndef EVENT_OUTPUT_H
-#define EVENT_OUTPUT_H
-
-#include <string>
-
-class JournalScanner;
-
-/**
- * Different output formats for the results of a journal scan
- */
-class EventOutput
-{
-  private:
-    JournalScanner const &scan;
-    std::string const path;
-
-  public:
-    EventOutput(JournalScanner const &scan_, std::string const &path_)
-      : scan(scan_), path(path_) {}
-
-    void summary() const;
-    void list() const;
-    int json() const;
-    int binary() const;
-};
-
-#endif // EVENT_OUTPUT_H
-
diff --git a/src/tools/cephfs/JournalFilter.cc b/src/tools/cephfs/JournalFilter.cc
deleted file mode 100644
index aefbb2f..0000000
--- a/src/tools/cephfs/JournalFilter.cc
+++ /dev/null
@@ -1,276 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-
-#include "JournalFilter.h"
-
-#include "common/ceph_argparse.h"
-
-#include "mds/events/ESession.h"
-#include "mds/events/EUpdate.h"
-
-#define dout_subsys ceph_subsys_mds
-
-
-const string JournalFilter::range_separator("..");
-
-
-/*
- * Return whether a LogEvent is to be included or excluded.
- *
- * The filter parameters are applied on an AND basis: if any
- * condition is not met, the event is excluded.  Try to do
- * the fastest checks first.
- */
-bool JournalFilter::apply(uint64_t pos, LogEvent &le) const
-{
-  /* Filtering by journal offset range */
-  if (pos < range_start || pos >= range_end) {
-    return false;
-  }
-
-  /* Filtering by event type */
-  if (event_type != 0) {
-    if (le.get_type() != event_type) {
-      return false;
-    }
-  }
-
-  /* Filtering by client */
-  if (client_name.num()) {
-    EMetaBlob const *metablob = le.get_metablob();
-    if (metablob) {
-      if (metablob->get_client_name() != client_name) {
-        return false;
-      }
-    } else if (le.get_type() == EVENT_SESSION) {
-      ESession *es = reinterpret_cast<ESession*>(&le);
-      if (es->get_client_inst().name != client_name) {
-        return false;
-      }
-    } else {
-      return false;
-    }
-  }
-
-  /* Filtering by inode */
-  if (inode) {
-    EMetaBlob const *metablob = le.get_metablob();
-    if (metablob) {
-      std::set<inodeno_t> inodes;
-      metablob->get_inodes(inodes);
-      bool match_any = false;
-      for (std::set<inodeno_t>::iterator i = inodes.begin(); i != inodes.end(); ++i) {
-        if (*i == inode) {
-          match_any = true;
-          break;
-        }
-      }
-      if (!match_any) {
-        return false;
-      }
-    } else {
-      return false;
-    }
-  }
-
-  /* Filtering by frag and dentry */
-  if (!frag_dentry.empty() || frag.ino) {
-    EMetaBlob const *metablob = le.get_metablob();
-    if (metablob) {
-      std::map<dirfrag_t, std::set<std::string> > dentries;
-      metablob->get_dentries(dentries);
-
-      if (frag.ino) {
-        bool match_any = false;
-        for (std::map<dirfrag_t, std::set<std::string> >::iterator i = dentries.begin();
-            i != dentries.end(); ++i) {
-          if (i->first == frag) {
-            match_any = true;
-            break;
-          }
-        }
-        if (!match_any) {
-          return false;
-        }
-      }
-
-      if (!frag_dentry.empty()) {
-        bool match_any = false;
-        for (std::map<dirfrag_t, std::set<std::string> >::iterator i = dentries.begin();
-            i != dentries.end() && !match_any; ++i) {
-          std::set<std::string> const &names = i->second;
-          for (std::set<std::string>::iterator j = names.begin();
-              j != names.end() && !match_any; ++j) {
-            if (*j == frag_dentry) {
-              match_any = true;
-            }
-          }
-        }
-        if (!match_any) {
-          return false;
-        }
-      }
-
-    } else {
-      return false;
-    }
-  }
-
-  /* Filtering by file path */
-  if (!path_expr.empty()) {
-    EMetaBlob const *metablob = le.get_metablob();
-    if (metablob) {
-      std::vector<std::string> paths;
-      metablob->get_paths(paths);
-      bool match_any = false;
-      for (std::vector<std::string>::iterator p = paths.begin(); p != paths.end(); ++p) {
-        if ((*p).find(path_expr) != std::string::npos) {
-          match_any = true;
-          break;
-        }
-      }
-      if (!match_any) {
-        return false;
-      }
-    } else {
-      return false;
-    }
-  }
-
-  return true;
-}
-
-
-int JournalFilter::parse_args(
-  std::vector<const char*> &argv, 
-  std::vector<const char*>::iterator &arg)
-{
-  while(arg != argv.end()) {
-    std::string arg_str;
-    if (ceph_argparse_witharg(argv, arg, &arg_str, "--range", (char*)NULL)) {
-      size_t sep_loc = arg_str.find(JournalFilter::range_separator);
-      if (sep_loc == std::string::npos || arg_str.size() <= JournalFilter::range_separator.size()) {
-        derr << "Invalid range '" << arg_str << "'" << dendl;
-        return -EINVAL;
-      }
-
-      // We have a lower bound
-      if (sep_loc > 0) {
-        std::string range_start_str = arg_str.substr(0, sep_loc); 
-        std::string parse_err;
-        range_start = strict_strtoll(range_start_str.c_str(), 0, &parse_err);
-        if (!parse_err.empty()) {
-          derr << "Invalid lower bound '" << range_start_str << "': " << parse_err << dendl;
-          return -EINVAL;
-        }
-      }
-
-      if (sep_loc < arg_str.size() - JournalFilter::range_separator.size()) {
-        std::string range_end_str = arg_str.substr(sep_loc + range_separator.size()); 
-        std::string parse_err;
-        range_end = strict_strtoll(range_end_str.c_str(), 0, &parse_err);
-        if (!parse_err.empty()) {
-          derr << "Invalid upper bound '" << range_end_str << "': " << parse_err << dendl;
-          return -EINVAL;
-        }
-      }
-    } else if (ceph_argparse_witharg(argv, arg, &arg_str, "--path", (char*)NULL)) {
-      dout(4) << "Filtering by path '" << arg_str << "'" << dendl;
-      path_expr = arg_str;
-    } else if (ceph_argparse_witharg(argv, arg, &arg_str, "--inode", (char*)NULL)) {
-      dout(4) << "Filtering by inode '" << arg_str << "'" << dendl;
-      std::string parse_err;
-      inode = strict_strtoll(arg_str.c_str(), 0, &parse_err);
-      if (!parse_err.empty()) {
-        derr << "Invalid inode '" << arg_str << "': " << parse_err << dendl;
-        return -EINVAL;
-      }
-    } else if (ceph_argparse_witharg(argv, arg, &arg_str, "--type", (char*)NULL)) {
-      std::string parse_err;
-      event_type = LogEvent::str_to_type(arg_str);
-      if (event_type == LogEvent::EventType(-1)) {
-        derr << "Invalid event type '" << arg_str << "': " << parse_err << dendl;
-        return -EINVAL;
-      }
-
-    } else if (ceph_argparse_witharg(argv, arg, &arg_str, "--frag", (char*)NULL)) {
-      std::string const frag_sep = ".";
-      size_t sep_loc = arg_str.find(frag_sep);
-      std::string inode_str;
-      std::string frag_str;
-      if (sep_loc != std::string::npos) {
-        inode_str = arg_str.substr(0, sep_loc);
-        frag_str = arg_str.substr(sep_loc + 1);
-      } else {
-        inode_str = arg_str;
-        frag_str = "0";
-      }
-
-      std::string parse_err;
-      inodeno_t frag_ino = strict_strtoll(inode_str.c_str(), 0, &parse_err);
-      if (!parse_err.empty()) {
-        derr << "Invalid inode '" << inode_str << "': " << parse_err << dendl;
-        return -EINVAL;
-      }
-
-      uint32_t frag_enc = strict_strtoll(frag_str.c_str(), 0, &parse_err);
-      if (!parse_err.empty()) {
-        derr << "Invalid frag '" << frag_str << "': " << parse_err << dendl;
-        return -EINVAL;
-      }
-
-      frag = dirfrag_t(frag_ino, frag_t(frag_enc));
-      dout(4) << "dirfrag filter: '" << frag << "'" << dendl;
-    } else if (ceph_argparse_witharg(argv, arg, &arg_str, "--dname", (char*)NULL)) {
-      frag_dentry = arg_str;
-      dout(4) << "dentry filter: '" << frag_dentry << "'" << dendl;
-    } else if (ceph_argparse_witharg(argv, arg, &arg_str, "--client", (char*)NULL)) {
-      std::string parse_err;
-      int64_t client_num = strict_strtoll(arg_str.c_str(), 0, &parse_err);
-      if (!parse_err.empty()) {
-        derr << "Invalid client number " << arg_str << dendl;
-        return -EINVAL;
-      }
-      client_name = entity_name_t::CLIENT(client_num);
-    } else {
-      // We're done with args the filter understands
-      break;
-    }
-  }
-
-  return 0;
-}
-
-/**
- * If the filter params are only range, then return
- * true and set start & end.  Else return false.
- *
- * Use this to discover if the user has requested a contiguous range
- * rather than any per-event filtering.
- */
-bool JournalFilter::get_range(uint64_t &start, uint64_t &end) const
-{
-  if (!path_expr.empty()
-      || inode != 0
-      || event_type != 0
-      || frag.ino != 0
-      || client_name.num() != 0
-      || (range_start == 0 && range_end == (uint64_t)(-1))) {
-    return false;
-  } else {
-    start = range_start;
-    end = range_end;
-    return true;
-  }
-}
diff --git a/src/tools/cephfs/JournalFilter.h b/src/tools/cephfs/JournalFilter.h
deleted file mode 100644
index 4fd8fff..0000000
--- a/src/tools/cephfs/JournalFilter.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-
-#ifndef JOURNAL_FILTER_H
-#define JOURNAL_FILTER_H
-
-#include "mds/mdstypes.h"
-#include "mds/LogEvent.h"
-
-/**
- * A set of conditions for narrowing down a search through the journal
- */
-class JournalFilter
-{
-  private:
-
-  /* Filtering by journal offset range */
-  uint64_t range_start;
-  uint64_t range_end;
-  static const std::string range_separator;
-
-  /* Filtering by file (sub) path */
-  std::string path_expr;
-
-  /* Filtering by inode */
-  inodeno_t inode;
-
-  /* Filtering by type */
-  LogEvent::EventType event_type;
-
-  /* Filtering by dirfrag */
-  dirfrag_t frag;
-  std::string frag_dentry;  //< optional, filter dentry name within fragment
-
-  /* Filtering by metablob client name */
-  entity_name_t client_name;
-
-  public:
-  JournalFilter() : 
-    range_start(0),
-    range_end(-1),
-    inode(0),
-    event_type(0) {}
-
-  bool get_range(uint64_t &start, uint64_t &end) const;
-  bool apply(uint64_t pos, LogEvent &le) const;
-  int parse_args(
-    std::vector<const char*> &argv, 
-    std::vector<const char*>::iterator &arg);
-};
-
-#endif // JOURNAL_FILTER_H
-
diff --git a/src/tools/cephfs/JournalScanner.cc b/src/tools/cephfs/JournalScanner.cc
deleted file mode 100644
index e38f669..0000000
--- a/src/tools/cephfs/JournalScanner.cc
+++ /dev/null
@@ -1,377 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-
-#include "include/rados/librados.hpp"
-#include "mds/JournalPointer.h"
-
-#include "JournalScanner.h"
-
-#define dout_subsys ceph_subsys_mds
-
-/**
- * Read journal header, followed by sequential scan through journal space.
- *
- * Return 0 on success, else error code.  Note that success has the special meaning
- * that we were able to apply our checks, it does *not* mean that the journal is
- * healthy.
- */
-int JournalScanner::scan(bool const full)
-{
-  int r = 0;
-
-  r = scan_pointer();
-  if (r < 0) {
-    return r;
-  }
-
-  if (pointer_present) {
-    r = scan_header();
-    if (r < 0) {
-      return r;
-    }
-  }
-
-  if (full && header_present) {
-    r = scan_events();
-    if (r < 0) {
-      return r;
-    }
-  }
-
-  return 0;
-}
-
-
-int JournalScanner::scan_pointer()
-{
-  // Issue read
-  std::string const pointer_oid = obj_name(MDS_INO_LOG_POINTER_OFFSET + rank, 0);
-  bufferlist pointer_bl;
-  int r = io.read(pointer_oid, pointer_bl, INT_MAX, 0);
-  if (r == -ENOENT) {
-    // 'Successfully' discovered the pointer is missing.
-    derr << "Pointer " << pointer_oid << " is absent" << dendl;
-    return 0;
-  } else if (r < 0) {
-    // Error preventing us interrogating pointer
-    derr << "Pointer " << pointer_oid << " is unreadable" << dendl;
-    return r;
-  } else {
-    dout(4) << "Pointer " << pointer_oid << " is readable" << dendl;
-    pointer_present = true;
-
-    JournalPointer jp;
-    try {
-      bufferlist::iterator q = pointer_bl.begin();
-      jp.decode(q);
-    } catch(buffer::error &e) {
-      derr << "Pointer " << pointer_oid << " is corrupt: " << e.what() << dendl;
-      return 0;
-    }
-
-    pointer_valid = true;
-    ino = jp.front;
-    return 0;
-  }
-}
-
-
-int JournalScanner::scan_header()
-{
-  int r;
-
-  bufferlist header_bl;
-  std::string header_name = obj_name(0);
-  dout(4) << "JournalScanner::scan: reading header object '" << header_name << "'" << dendl;
-  r = io.read(header_name, header_bl, INT_MAX, 0);
-  if (r < 0) {
-    derr << "Header " << header_name << " is unreadable" << dendl;
-    return 0;  // "Successfully" found an error
-  } else {
-    header_present = true;
-  }
-
-  bufferlist::iterator header_bl_i = header_bl.begin();
-  header = new Journaler::Header();
-  try
-  {
-    header->decode(header_bl_i);
-  }
-  catch (buffer::error &e)
-  {
-    derr << "Header is corrupt (" << e.what() << ")" << dendl;
-    delete header;
-    header = NULL;
-    return 0;  // "Successfully" found an error
-  }
-
-  if (header->magic != std::string(CEPH_FS_ONDISK_MAGIC)) {
-    derr << "Header is corrupt (bad magic)" << dendl;
-    return 0;  // "Successfully" found an error
-  }
-  if (!((header->trimmed_pos <= header->expire_pos) && (header->expire_pos <= header->write_pos))) {
-    derr << "Header is invalid (inconsistent offsets)" << dendl;
-    return 0;  // "Successfully" found an error
-  }
-  header_valid = true;
-
-  return 0;
-}
-
-
-int JournalScanner::scan_events()
-{
-  int r;
-
-  uint64_t object_size = g_conf->mds_log_segment_size;
-  if (object_size == 0) {
-    // Default layout object size
-    object_size = g_default_file_layout.fl_object_size;
-  }
-
-  uint64_t read_offset = header->expire_pos;
-  dout(10) << std::hex << "Header 0x"
-    << header->trimmed_pos << " 0x"
-    << header->expire_pos << " 0x"
-    << header->write_pos << std::dec << dendl;
-  dout(10) << "Starting journal scan from offset 0x" << std::hex << read_offset << std::dec << dendl;
-
-  // TODO also check for extraneous objects before the trimmed pos or after the write pos,
-  // which would indicate a bogus header.
-
-  bufferlist read_buf;
-  bool gap = false;
-  uint64_t gap_start = -1;
-  for (uint64_t obj_offset = (read_offset / object_size); ; obj_offset++) {
-    // Read this journal segment
-    bufferlist this_object;
-    std::string const oid = obj_name(obj_offset);
-    r = io.read(oid, this_object, INT_MAX, 0);
-
-    // Handle absent journal segments
-    if (r < 0) {
-      if (obj_offset > (header->write_pos / object_size)) {
-        dout(4) << "Reached end of journal objects" << dendl;
-        break;
-      } else {
-        derr << "Missing object " << oid << dendl;
-      }
-
-      objects_missing.push_back(obj_offset);
-      gap = true;
-      gap_start = read_offset;
-      continue;
-    } else {
-      dout(4) << "Read 0x" << std::hex << this_object.length() << std::dec
-              << " bytes from " << oid << " gap=" << gap << dendl;
-      objects_valid.push_back(oid);
-      this_object.copy(0, this_object.length(), read_buf);
-    }
-
-    if (gap) {
-      // No valid data at the current read offset, scan forward until we find something valid looking
-      // or have to drop out to load another object.
-      dout(4) << "Searching for sentinel from 0x" << std::hex << read_offset
-              << ", 0x" << read_buf.length() << std::dec << " bytes available" << dendl;
-
-      do {
-        bufferlist::iterator p = read_buf.begin();
-        uint64_t candidate_sentinel;
-        ::decode(candidate_sentinel, p);
-
-        dout(4) << "Data at 0x" << std::hex << read_offset << " = 0x" << candidate_sentinel << std::dec << dendl;
-
-        if (candidate_sentinel == JournalStream::sentinel) {
-          dout(4) << "Found sentinel at 0x" << std::hex << read_offset << std::dec << dendl;
-          ranges_invalid.push_back(Range(gap_start, read_offset));
-          gap = false;
-          break;
-        } else {
-          // No sentinel, discard this byte
-          read_buf.splice(0, 1);
-          read_offset += 1;
-        }
-      } while (read_buf.length() >= sizeof(JournalStream::sentinel));
-      dout(4) << "read_buf size is " << read_buf.length() << dendl;
-    } else {
-      dout(10) << "Parsing data, 0x" << std::hex << read_buf.length() << std::dec << " bytes available" << dendl;
-      while(true) {
-        // TODO: detect and handle legacy format journals: can do many things
-        // on them but on read errors have to give up instead of searching
-        // for sentinels.
-        JournalStream journal_stream(JOURNAL_FORMAT_RESILIENT);
-        bool readable = false;
-        try {
-          uint64_t need;
-          readable = journal_stream.readable(read_buf, &need);
-        } catch (buffer::error &e) {
-          readable = false;
-          dout(4) << "Invalid container encoding at 0x" << std::hex << read_offset << std::dec << dendl;
-          gap = true;
-          gap_start = read_offset;
-          read_buf.splice(0, 1);
-          read_offset += 1;
-          break;
-        }
-
-        if (!readable) {
-          // Out of data, continue to read next object
-          break;
-        }
-
-        bufferlist le_bl;  //< Serialized LogEvent blob
-        dout(10) << "Attempting decode at 0x" << std::hex << read_offset << std::dec << dendl;
-        // This cannot fail to decode because we pre-checked that a serialized entry
-        // blob would be readable.
-        uint64_t start_ptr = 0;
-        uint64_t consumed = journal_stream.read(read_buf, &le_bl, &start_ptr);
-        dout(10) << "Consumed 0x" << std::hex << consumed << std::dec << " bytes" << dendl;
-        if (start_ptr != read_offset) {
-          derr << "Bad entry start ptr (0x" << std::hex << start_ptr << ") at 0x"
-              << read_offset << std::dec << dendl;
-          gap = true;
-          gap_start = read_offset;
-          // FIXME: given that entry was invalid, should we be skipping over it?
-          // maybe push bytes back onto start of read_buf and just advance one byte
-          // to start scanning instead.  e.g. if a bogus size value is found it can
-          // cause us to consume and thus skip a bunch of following valid events.
-          read_offset += consumed;
-          break;
-        }
-
-        LogEvent *le = LogEvent::decode(le_bl);
-        if (le) {
-          dout(10) << "Valid entry at 0x" << std::hex << read_offset << std::dec << dendl;
-
-          if (filter.apply(read_offset, *le)) {
-            events[read_offset] = EventRecord(le, consumed);
-          } else {
-            delete le;
-          }
-          events_valid.push_back(read_offset);
-          read_offset += consumed;
-        } else {
-          dout(10) << "Invalid entry at 0x" << std::hex << read_offset << std::dec << dendl;
-          gap = true;
-          gap_start = read_offset;
-          read_offset += consumed;
-        }
-      }
-    }
-  }
-
-  if (gap) {
-    // Ended on a gap, assume it ran to end
-    ranges_invalid.push_back(Range(gap_start, -1));
-  }
-
-  dout(4) << "Scanned objects, " << objects_missing.size() << " missing, " << objects_valid.size() << " valid" << dendl;
-  dout(4) << "Events scanned, " << ranges_invalid.size() << " gaps" << dendl;
-  dout(4) << "Found " << events_valid.size() << " valid events" << dendl;
-  dout(4) << "Selected " << events.size() << " events events for processing" << dendl;
-
-  return 0;
-}
-
-
-JournalScanner::~JournalScanner()
-{
-  if (header) {
-    delete header;
-    header = NULL;
-  }
-  dout(4) << events.size() << " events" << dendl;
-  for (EventMap::iterator i = events.begin(); i != events.end(); ++i) {
-    delete i->second.log_event;
-  }
-  events.clear();
-}
-
-
-/**
- * Whether the journal data looks valid and replayable
- */
-bool JournalScanner::is_healthy() const
-{
-  return (pointer_present && pointer_valid
-      && header_present && header_valid
-      && ranges_invalid.empty()
-      && objects_missing.empty());
-}
-
-
-/**
- * Whether the journal data can be read from RADOS
- */
-bool JournalScanner::is_readable() const
-{
-  return (header_present && header_valid && objects_missing.empty());
-}
-
-
-/**
- * Calculate the object name for a given offset
- */
-std::string JournalScanner::obj_name(inodeno_t ino, uint64_t offset) const
-{
-  char name[60];
-  snprintf(name, sizeof(name), "%llx.%08llx",
-      (unsigned long long)(ino),
-      (unsigned long long)offset);
-  return std::string(name);
-}
-
-
-std::string JournalScanner::obj_name(uint64_t offset) const
-{
-  return obj_name(ino, offset);
-}
-
-
-/*
- * Write a human readable summary of the journal health
- */
-void JournalScanner::report(std::ostream &out) const
-{
-  out << "Overall journal integrity: " << (is_healthy() ? "OK" : "DAMAGED") << std::endl;
-
-  if (!pointer_present) {
-    out << "Pointer not found" << std::endl;
-  } else if (!pointer_valid) {
-    out << "Pointer could not be decoded" << std::endl;
-  }
-
-  if (!header_present) {
-    out << "Header not found" << std::endl;
-  } else if (!header_valid) {
-    out << "Header could not be decoded" << std::endl;
-  }
-
-  if (objects_missing.size()) {
-    out << "Objects missing:" << std::endl;
-    for (std::vector<uint64_t>::const_iterator om = objects_missing.begin();
-         om != objects_missing.end(); ++om) {
-      out << "  0x" << std::hex << *om << std::dec << std::endl;
-    }
-  }
-
-  if (ranges_invalid.size()) {
-    out << "Corrupt regions:" << std::endl;
-    for (std::vector<Range>::const_iterator r = ranges_invalid.begin();
-         r != ranges_invalid.end(); ++r) {
-      out << "  0x" << std::hex << r->first << "-" << r->second << std::dec << std::endl;
-    }
-  }
-}
-
diff --git a/src/tools/cephfs/JournalScanner.h b/src/tools/cephfs/JournalScanner.h
deleted file mode 100644
index 2700f2b..0000000
--- a/src/tools/cephfs/JournalScanner.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-#ifndef JOURNAL_SCANNER_H
-#define JOURNAL_SCANNER_H
-
-// For Journaler::Header, can't forward-declare nested classes
-#include <osdc/Journaler.h>
-
-namespace librados {
-  class IoCtx;
-}
-
-#include "JournalFilter.h"
-
-/**
- * A simple sequential reader for metadata journals.  Unlike
- * the MDS Journaler class, this is written to detect, record,
- * and read past corruptions and missing objects.  It is also
- * less efficient but more plainly written.
- */
-class JournalScanner
-{
-  private:
-  librados::IoCtx &io;
-
-  // Input constraints
-  int const rank;
-  JournalFilter const filter;
-
-  void gap_advance();
-
-  public:
-  JournalScanner(
-      librados::IoCtx &io_,
-      int rank_,
-      JournalFilter const &filter_) :
-    io(io_),
-    rank(rank_),
-    filter(filter_),
-    pointer_present(false),
-    pointer_valid(false),
-    header_present(false),
-    header_valid(false),
-    header(NULL) {};
-
-  JournalScanner(
-      librados::IoCtx &io_,
-      int rank_) :
-    io(io_),
-    rank(rank_),
-    pointer_present(false),
-    pointer_valid(false),
-    header_present(false),
-    header_valid(false),
-    header(NULL) {};
-
-  ~JournalScanner();
-
-  int scan(bool const full=true);
-  int scan_pointer();
-  int scan_header();
-  int scan_events();
-  void report(std::ostream &out) const;
-
-  std::string obj_name(uint64_t offset) const;
-  std::string obj_name(inodeno_t ino, uint64_t offset) const;
-
-  // The results of the scan
-  inodeno_t ino;  // Corresponds to JournalPointer.front
-  class EventRecord {
-    public:
-    EventRecord() : log_event(NULL), raw_size(0) {}
-    EventRecord(LogEvent *le, uint32_t rs) : log_event(le), raw_size(rs) {}
-    LogEvent *log_event;
-    uint32_t raw_size;  //< Size from start offset including all encoding overhead
-  };
-  typedef std::map<uint64_t, EventRecord> EventMap;
-  typedef std::pair<uint64_t, uint64_t> Range;
-  bool pointer_present;
-  bool pointer_valid;
-  bool header_present;
-  bool header_valid;
-  Journaler::Header *header;
-
-  bool is_healthy() const;
-  bool is_readable() const;
-  std::vector<std::string> objects_valid;
-  std::vector<uint64_t> objects_missing;
-  std::vector<Range> ranges_invalid;
-  std::vector<uint64_t> events_valid;
-  EventMap events;
-
-  private:
-  // Forbid copy construction because I have ptr members
-  JournalScanner(const JournalScanner &rhs);
-};
-
-#endif // JOURNAL_SCANNER_H
-
diff --git a/src/tools/cephfs/JournalTool.cc b/src/tools/cephfs/JournalTool.cc
deleted file mode 100644
index 976376c..0000000
--- a/src/tools/cephfs/JournalTool.cc
+++ /dev/null
@@ -1,730 +0,0 @@
-// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * ceph - scalable distributed file system
- *
- * copyright (c) 2014 john spray <john.spray at inktank.com>
- *
- * this is free software; you can redistribute it and/or
- * modify it under the terms of the gnu lesser general public
- * license version 2.1, as published by the free software
- * foundation.  see file copying.
- */
-
-
-#include <sstream>
-
-#include "common/ceph_argparse.h"
-#include "common/errno.h"
-#include "osdc/Journaler.h"
-#include "mds/mdstypes.h"
-#include "mds/LogEvent.h"
-
-#include "mds/events/ENoOp.h"
-#include "mds/events/EUpdate.h"
-
-#include "JournalScanner.h"
-#include "EventOutput.h"
-#include "Dumper.h"
-#include "Resetter.h"
-
-#include "JournalTool.h"
-
-
-#define dout_subsys ceph_subsys_mds
-
-
-
-void JournalTool::usage()
-{
-  std::cout << "Usage: \n"
-    << "  cephfs-journal-tool [options] journal [inspect|import|export|reset]\n"
-    << "  cephfs-journal-tool [options] header <get|set <field> <value>\n"
-    << "  cephfs-journal-tool [options] event <effect> <selector> <output>\n"
-    << "    <selector>:\n"
-    << "      --range=<start>..<end>\n"
-    << "      --path=<substring>\n"
-    << "      --inode=<integer>\n"
-    << "      --type=<UPDATE|OPEN|SESSION...><\n"
-    << "      --frag=<ino>.<frag> [--dname=<dentry string>]\n"
-    << "      --client=<session id integer>\n"
-    << "    <effect>: [get|apply|splice]\n"
-    << "    <output>: [summary|binary|json] [--path <path>]\n"
-    << "\n"
-    << "Options:\n"
-    << "  --rank=<int>  Journal rank (default 0)\n";
-
-  generic_client_usage();
-}
-
-
-/**
- * Handle arguments and hand off to journal/header/event mode
- */
-int JournalTool::main(std::vector<const char*> &argv)
-{
-  int r;
-
-  dout(10) << "JournalTool::main " << dendl;
-  // Common arg parsing
-  // ==================
-  if (argv.empty()) {
-    usage();
-    return -EINVAL;
-  }
-
-  std::vector<const char*>::iterator arg = argv.begin();
-  std::string rank_str;
-  if(ceph_argparse_witharg(argv, arg, &rank_str, "--rank", (char*)NULL)) {
-    std::string rank_err;
-    rank = strict_strtol(rank_str.c_str(), 10, &rank_err);
-    if (!rank_err.empty()) {
-        derr << "Bad rank '" << rank_str << "'" << dendl;
-        usage();
-    }
-  }
-
-  std::string mode;
-  if (arg == argv.end()) {
-    derr << "Missing mode [journal|header|event]" << dendl;
-    return -EINVAL;
-  }
-  mode = std::string(*arg);
-  arg = argv.erase(arg);
-
-  // RADOS init
-  // ==========
-  r = rados.init_with_context(g_ceph_context);
-  if (r < 0) {
-    derr << "RADOS unavailable, cannot scan filesystem journal" << dendl;
-    return r;
-  }
-
-  dout(4) << "JournalTool: connecting to RADOS..." << dendl;
-  rados.connect();
- 
-  int const pool_id = mdsmap->get_metadata_pool();
-  dout(4) << "JournalTool: resolving pool " << pool_id << dendl;
-  std::string pool_name;
-  r = rados.pool_reverse_lookup(pool_id, &pool_name);
-  if (r < 0) {
-    derr << "Pool " << pool_id << " named in MDS map not found in RADOS!" << dendl;
-    return r;
-  }
-
-  dout(4) << "JournalTool: creating IoCtx.." << dendl;
-  r = rados.ioctx_create(pool_name.c_str(), io);
-  assert(r == 0);
-
-  // Execution
-  // =========
-  dout(4) << "Executing for rank " << rank << dendl;
-  if (mode == std::string("journal")) {
-    return main_journal(argv);
-  } else if (mode == std::string("header")) {
-    return main_header(argv);
-  } else if (mode == std::string("event")) {
-    return main_event(argv);
-  } else {
-    derr << "Bad command '" << mode << "'" << dendl;
-    usage();
-    return -EINVAL;
-  }
-}
-
-
-/**
- * Handle arguments for 'journal' mode
- *
- * This is for operations that act on the journal as a whole.
- */
-int JournalTool::main_journal(std::vector<const char*> &argv)
-{
-  std::string command = argv[0];
-  if (command == "inspect") {
-    return journal_inspect();
-  } else if (command == "export" || command == "import") {
-    if (argv.size() >= 2) {
-      std::string const path = argv[1];
-      return journal_export(path, command == "import");
-    } else {
-      derr << "Missing path" << dendl;
-      return -EINVAL;
-    }
-  } else if (command == "reset") {
-      return journal_reset();
-  } else {
-    derr << "Bad journal command '" << command << "'" << dendl;
-    return -EINVAL;
-  }
-}
-
-
-/**
- * Parse arguments and execute for 'header' mode
- *
- * This is for operations that act on the header only.
- */
-int JournalTool::main_header(std::vector<const char*> &argv)
-{
-  JournalFilter filter;
-  JournalScanner js(io, rank, filter);
-  int r = js.scan(false);
-  if (r < 0) {
-    std::cerr << "Unable to scan journal" << std::endl;
-    return r;
-  }
-
-  if (!js.header_present) {
-    std::cerr << "Header object not found!" << std::endl;
-    return -ENOENT;
-  } else if (!js.header_valid && js.header == NULL) {
-    // Can't do a read or a single-field write without a copy of the original
-    derr << "Header could not be read!" << dendl;
-    return -ENOENT;
-  } else {
-    assert(js.header != NULL);
-  }
-
-  if (argv.size() == 0) {
-    derr << "Invalid header command, must be [get|set]" << dendl;
-    return -EINVAL;
-  }
-  std::vector<const char *>::iterator arg = argv.begin();
-  std::string const command = *arg;
-  arg = argv.erase(arg);
-
-  if (command == std::string("get")) {
-    // Write JSON journal dump to stdout
-    JSONFormatter jf(true);
-    js.header->dump(&jf);
-    jf.flush(std::cout);
-    std::cout << std::endl;
-  } else if (command == std::string("set")) {
-    // Need two more args <key> <val>
-    if (argv.size() != 2) {
-      derr << "'set' requires two arguments <trimmed_pos|expire_pos|write_pos> <value>" << dendl;
-      return -EINVAL;
-    }
-
-    std::string const field_name = *arg;
-    arg = argv.erase(arg);
-
-    std::string const value_str = *arg;
-    arg = argv.erase(arg);
-    assert(argv.empty());
-
-    std::string parse_err;
-    uint64_t new_val = strict_strtoll(value_str.c_str(), 0, &parse_err);
-    if (!parse_err.empty()) {
-      derr << "Invalid value '" << value_str << "': " << parse_err << dendl;
-      return -EINVAL;
-    }
-
-    uint64_t *field = NULL;
-    if (field_name == "trimmed_pos") {
-      field = &(js.header->trimmed_pos);
-    } else if (field_name == "expire_pos") {
-      field = &(js.header->expire_pos);
-    } else if (field_name == "write_pos") {
-      field = &(js.header->write_pos);
-    } else {
-      derr << "Invalid field '" << field_name << "'" << dendl;
-      return -EINVAL;
-    }
-
-    std::cout << "Updating " << field_name << std::hex << " 0x" << *field << " -> 0x" << new_val << std::dec << std::endl;
-    *field = new_val;
-
-    dout(4) << "Writing object..." << dendl;
-    bufferlist header_bl;
-    ::encode(*(js.header), header_bl);
-    io.write_full(js.obj_name(0), header_bl);
-    dout(4) << "Write complete." << dendl;
-    std::cout << "Successfully updated header." << std::endl;
-  } else {
-    derr << "Bad header command '" << command << "'" << dendl;
-    return -EINVAL;
-  }
-
-  return 0;
-}
-
-
-/**
- * Parse arguments and execute for 'event' mode
- *
- * This is for operations that act on LogEvents within the log
- */
-int JournalTool::main_event(std::vector<const char*> &argv)
-{
-  int r;
-
-  std::vector<const char*>::iterator arg = argv.begin();
-
-  std::string command = *(arg++);
-  if (command != "get" && command != "apply" && command != "splice") {
-    derr << "Unknown argument '" << command << "'" << dendl;
-    usage();
-    return -EINVAL;
-  }
-
-  if (arg == argv.end()) {
-    derr << "Incomplete command line" << dendl;
-    usage();
-    return -EINVAL;
-  }
-
-  // Parse filter options
-  // ====================
-  JournalFilter filter;
-  r = filter.parse_args(argv, arg);
-  if (r) {
-    return r;
-  }
-
-  // Parse output options
-  // ====================
-  if (arg == argv.end()) {
-    derr << "Missing output command" << dendl;
-    usage();
-  }
-  std::string output_style = *(arg++);
-  if (output_style != "binary" && output_style != "json" &&
-      output_style != "summary" && output_style != "list") {
-      derr << "Unknown argument: '" << output_style << "'" << dendl;
-      usage();
-      return -EINVAL;
-  }
-
-  std::string output_path = "dump";
-  while(arg != argv.end()) {
-    std::string arg_str;
-    if (ceph_argparse_witharg(argv, arg, &arg_str, "--path", (char*)NULL)) {
-      output_path = arg_str;
-    } else {
-      derr << "Unknown argument: '" << *arg << "'" << dendl;
-      usage();
-      return -EINVAL;
-    }
-  }
-
-  // Execute command
-  // ===============
-  JournalScanner js(io, rank, filter);
-  if (command == "get") {
-    r = js.scan();
-    if (r) {
-      derr << "Failed to scan journal (" << cpp_strerror(r) << ")" << dendl;
-      return r;
-    }
-  } else if (command == "apply") {
-    r = js.scan();
-    if (r) {
-      derr << "Failed to scan journal (" << cpp_strerror(r) << ")" << dendl;
-      return r;
-    }
-
-    bool dry_run = false;
-    if (arg != argv.end() && ceph_argparse_flag(argv, arg, "--dry_run", (char*)NULL)) {
-      dry_run = true;
-    }
-
-    for (JournalScanner::EventMap::iterator i = js.events.begin(); i != js.events.end(); ++i) {
-      LogEvent *le = i->second.log_event;
-      EMetaBlob const *mb = le->get_metablob();
-      if (mb) {
-        replay_offline(*mb, dry_run);
-      }
-    }
-  } else if (command == "splice") {
-    r = js.scan();
-    if (r) {
-      derr << "Failed to scan journal (" << cpp_strerror(r) << ")" << dendl;
-      return r;
-    }
-
-    uint64_t start, end;
-    if (filter.get_range(start, end)) {
-      // Special case for range filter: erase a numeric range in the log
-      uint64_t range = end - start;
-      int r = erase_region(js, start, range);
-      if (r) {
-        derr << "Failed to erase region 0x" << std::hex << start << "~0x" << range << std::dec
-             << ": " << cpp_strerror(r) << dendl;
-        return r;
-      }
-    } else {
-      // General case: erase a collection of individual entries in the log
-      for (JournalScanner::EventMap::iterator i = js.events.begin(); i != js.events.end(); ++i) {
-        dout(4) << "Erasing offset 0x" << std::hex << i->first << std::dec << dendl;
-
-        int r = erase_region(js, i->first, i->second.raw_size);
-        if (r) {
-          derr << "Failed to erase event 0x" << std::hex << i->first << std::dec
-               << ": " << cpp_strerror(r) << dendl;
-          return r;
-        }
-      }
-    }
-
-
-  } else {
-    derr << "Unknown argument '" << command << "'" << dendl;
-    usage();
-    return -EINVAL;
-  }
-
-  // Generate output
-  // ===============
-  EventOutput output(js, output_path);
-  int output_result = 0;
-  if (output_style == "binary") {
-      output_result = output.binary();
-  } else if (output_style == "json") {
-      output_result = output.json();
-  } else if (output_style == "summary") {
-      output.summary();
-  } else if (output_style == "list") {
-      output.list();
-  } else {
-    std::cerr << "Bad output command '" << output_style << "'" << std::endl;
-    return -EINVAL;
-  }
-
-  if (output_result != 0) {
-    std::cerr << "Error writing output: " << cpp_strerror(output_result) << std::endl;
-  }
-
-  return output_result;
-}
-
-/**
- * Provide the user with information about the condition of the journal,
- * especially indicating what range of log events is available and where
- * any gaps or corruptions in the journal are.
- */
-int JournalTool::journal_inspect()
-{
-  int r;
-
-  JournalFilter filter;
-  JournalScanner js(io, rank, filter);
-  r = js.scan();
-  if (r) {
-    std::cerr << "Failed to scan journal (" << cpp_strerror(r) << ")" << std::endl;
-    return r;
-  }
-
-  js.report(std::cout);
-
-  return 0;
-}
-
-
-/**
- * Attempt to export a binary dump of the journal.
- *
- * This is allowed to fail if the header is malformed or there are
- * objects inaccessible, in which case the user would have to fall
- * back to manually listing RADOS objects and extracting them, which
- * they can do with the ``rados`` CLI.
- */
-int JournalTool::journal_export(std::string const &path, bool import)
-{
-  int r = 0;
-  JournalScanner js(io, rank);
-
-  if (!import) {
-    /*
-     * If doing an export, first check that the header is valid and
-     * no objects are missing before trying to dump
-     */
-    r = js.scan();
-    if (r < 0) {
-      derr << "Unable to scan journal, assuming badly damaged" << dendl;
-      return r;
-    }
-    if (!js.is_readable()) {
-      derr << "Journal not readable, attempt object-by-object dump with `rados`" << dendl;
-      return -EIO;
-    }
-  }
-
-  /*
-   * Assuming we can cleanly read the journal data, dump it out to a file
-   */
-  {
-    Dumper dumper;
-    r = dumper.init(rank);
-    if (r < 0) {
-      derr << "dumper::init failed: " << cpp_strerror(r) << dendl;
-      return r;
-    }
-    if (import) {
-      dumper.undump(path.c_str());
-    } else {
-      dumper.dump(path.c_str());
-    }
-    dumper.shutdown();
-  }
-
-  return r;
-}
-
-
-/**
- * Truncate journal and insert EResetJournal
- */
-int JournalTool::journal_reset()
-{
-  int r = 0;
-  Resetter resetter;
-  r = resetter.init();
-  if (r < 0) {
-    derr << "resetter::init failed: " << cpp_strerror(r) << dendl;
-    return r;
-  }
-  resetter.reset(rank);
-  resetter.shutdown();
-
-  return r;
-}
-
-
-int JournalTool::replay_offline(EMetaBlob const &metablob, bool const dry_run)
-{
-  int r;
-
-  // Replay roots
-  for (list<ceph::shared_ptr<EMetaBlob::fullbit> >::const_iterator p = metablob.roots.begin(); p != metablob.roots.end(); ++p) {
-    EMetaBlob::fullbit const &fb = *(*p);
-    inodeno_t ino = fb.inode.ino;
-    dout(4) << __func__ << ": updating root 0x" << std::hex << ino << std::dec << dendl;
-
-    object_t root_oid = InodeStore::get_object_name(ino, frag_t(), ".inode");
-    dout(4) << __func__ << ": object id " << root_oid.name << dendl;
-
-    bufferlist inode_bl;
-    r = io.read(root_oid.name, inode_bl, (1<<22), 0);
-    InodeStore inode;
-    if (r == -ENOENT) {
-      dout(4) << __func__ << ": root does not exist, will create" << dendl;
-    } else {
-      dout(4) << __func__ << ": root exists, will modify (" << inode_bl.length() << ")" << dendl;
-      // TODO: add some kind of force option so that we can overwrite bad inodes
-      // from the journal if needed
-      bufferlist::iterator inode_bl_iter = inode_bl.begin(); 
-      std::string magic;
-      ::decode(magic, inode_bl_iter);
-      if (magic == CEPH_FS_ONDISK_MAGIC) {
-        dout(4) << "magic ok" << dendl;
-      } else {
-        dout(4) << "magic bad: '" << magic << "'" << dendl;
-      }
-      inode.decode(inode_bl_iter);
-    }
-
-    // This is a distant cousin of EMetaBlob::fullbit::update_inode, but for use
-    // on an offline InodeStore instance.  It's way simpler, because we are just
-    // uncritically hauling the data between structs.
-    inode.inode = fb.inode;
-    inode.xattrs = fb.xattrs;
-    inode.dirfragtree = fb.dirfragtree;
-    inode.snap_blob = fb.snapbl;
-    inode.symlink = fb.symlink;
-    inode.old_inodes = fb.old_inodes;
-
-    inode_bl.clear();
-    std::string magic = CEPH_FS_ONDISK_MAGIC;
-    ::encode(magic, inode_bl);
-    inode.encode(inode_bl);
-
-    if (!dry_run) {
-      r = io.write_full(root_oid.name, inode_bl);
-      assert(r == 0);
-    }
-  }
-
-  // TODO: respect metablob.renamed_dirino (cues us as to which dirlumps
-  // indicate renamed directories)
-
-  // Replay fullbits (dentry+inode)
-  for (list<dirfrag_t>::const_iterator lp = metablob.lump_order.begin(); lp != metablob.lump_order.end(); ++lp) {
-    dirfrag_t const &frag = *lp;
-    EMetaBlob::dirlump const &lump = metablob.lump_map.find(frag)->second;
-    lump._decode_bits();
-    object_t frag_object_id = InodeStore::get_object_name(frag.ino, frag.frag, "");
-
-    // Check for presence of dirfrag object
-    uint64_t psize;
-    time_t pmtime;
-    r = io.stat(frag_object_id.name, &psize, &pmtime);
-    if (r == -ENOENT) {
-      dout(4) << "Frag object " << frag_object_id.name << " did not exist, will create" << dendl;
-    } else if (r != 0) {
-      // FIXME: what else can happen here?  can I deal?
-      assert(r == 0);
-    } else {
-      dout(4) << "Frag object " << frag_object_id.name << " exists, will modify" << dendl;
-    }
-
-    // Write fnode to omap header of dirfrag object
-    bufferlist fnode_bl;
-    lump.fnode.encode(fnode_bl);
-    if (!dry_run) {
-      r = io.omap_set_header(frag_object_id.name, fnode_bl);
-      if (r != 0) {
-        derr << "Failed to write fnode for frag object " << frag_object_id.name << dendl;
-        return r;
-      }
-    }
-
-    // Try to get the existing dentry
-    list<ceph::shared_ptr<EMetaBlob::fullbit> > const &fb_list = lump.get_dfull();
-    for (list<ceph::shared_ptr<EMetaBlob::fullbit> >::const_iterator fbi = fb_list.begin(); fbi != fb_list.end(); ++fbi) {
-      EMetaBlob::fullbit const &fb = *(*fbi);
-
-      // Get a key like "foobar_head"
-      std::string key;
-      dentry_key_t dn_key(fb.dnlast, fb.dn.c_str());
-      dn_key.encode(key);
-
-      // See if the dentry is present
-      std::set<std::string> keys;
-      keys.insert(key);
-      std::map<std::string, bufferlist> vals;
-      r = io.omap_get_vals_by_keys(frag_object_id.name, keys, &vals);
-      assert (r == 0);  // I assume success because I checked object existed and absence of 
-                        // dentry gives me empty map instead of failure
-                        // FIXME handle failures so we can replay other events
-                        // if this one is causing some unexpected issue
-    
-      if (vals.find(key) == vals.end()) {
-        dout(4) << "dentry " << key << " does not exist, will be created" << dendl;
-      } else {
-        dout(4) << "dentry " << key << " existed already" << dendl;
-        // TODO: read out existing dentry before adding new one so that
-        // we can print a bit of info about what we're overwriting
-      }
-    
-      bufferlist dentry_bl;
-      ::encode(fb.dnfirst, dentry_bl);
-      ::encode('I', dentry_bl);
-
-      InodeStore inode;
-      inode.inode = fb.inode;
-      inode.xattrs = fb.xattrs;
-      inode.dirfragtree = fb.dirfragtree;
-      inode.snap_blob = fb.snapbl;
-      inode.symlink = fb.symlink;
-      inode.old_inodes = fb.old_inodes;
-      inode.encode_bare(dentry_bl);
-      
-      vals[key] = dentry_bl;
-      if (!dry_run) {
-        r = io.omap_set(frag_object_id.name, vals);
-        assert(r == 0);  // FIXME handle failures
-      }
-    }
-
-    list<EMetaBlob::nullbit> const &nb_list = lump.get_dnull();
-    for (list<EMetaBlob::nullbit>::const_iterator
-	iter = nb_list.begin(); iter != nb_list.end(); ++iter) {
-      EMetaBlob::nullbit const &nb = *iter;
-
-      // Get a key like "foobar_head"
-      std::string key;
-      dentry_key_t dn_key(nb.dnlast, nb.dn.c_str());
-      dn_key.encode(key);
-
-      // Remove it from the dirfrag
-      dout(4) << "Removing dentry " << key << dendl;
-      std::set<std::string> keys;
-      keys.insert(key);
-      if (!dry_run) {
-        r = io.omap_rm_keys(frag_object_id.name, keys);
-        assert(r == 0);
-      }
-    }
-  }
-
-  for (std::vector<inodeno_t>::const_iterator i = metablob.destroyed_inodes.begin();
-       i != metablob.destroyed_inodes.end(); ++i) {
-    dout(4) << "Destroyed inode: " << *i << dendl;
-    // TODO: if it was a dir, then delete its dirfrag objects
-  }
-
-  return 0;
-}
-
-
-/**
- * Erase a region of the log by overwriting it with ENoOp
- *
- */
-int JournalTool::erase_region(JournalScanner const &js, uint64_t const pos, uint64_t const length)
-{
-  // To erase this region, we use our preamble, the encoding overhead
-  // of an ENoOp, and our trailing start ptr.  Calculate how much padding
-  // is needed inside the ENoOp to make up the difference.
-  bufferlist tmp;
-  ENoOp enoop(0);
-  enoop.encode_with_header(tmp);
-
-  dout(4) << "erase_region " << pos << " len=" << length << dendl;
-
-  // FIXME: get the preamble/postamble length via JournalStream
-  int32_t padding = length - tmp.length() - sizeof(uint32_t) - sizeof(uint64_t) - sizeof(uint64_t);
-  dout(4) << "erase_region padding=0x" << std::hex << padding << std::dec << dendl;
-
-  if (padding < 0) {
-    derr << "Erase region " << length << " too short" << dendl;
-    return -EINVAL;
-  }
-
-  // Serialize an ENoOp with the correct amount of padding
-  enoop = ENoOp(padding);
-  bufferlist entry;
-  enoop.encode_with_header(entry);
-  JournalStream stream(JOURNAL_FORMAT_RESILIENT);
-
-  // Serialize region of log stream
-  bufferlist log_data;
-  stream.write(entry, &log_data, pos);
-
-  dout(4) << "erase_region data length " << log_data.length() << dendl;
-  assert(log_data.length() == length);
-
-  // Write log stream region to RADOS
-  // FIXME: get object size somewhere common to scan_events
-  uint32_t object_size = g_conf->mds_log_segment_size;
-  if (object_size == 0) {
-    // Default layout object size
-    object_size = g_default_file_layout.fl_object_size;
-  }
-
-  uint64_t write_offset = pos;
-  uint64_t obj_offset = (pos / object_size);
-  int r = 0;
-  while(log_data.length()) {
-    std::string const oid = js.obj_name(obj_offset);
-    uint32_t offset_in_obj = write_offset % object_size;
-    uint32_t write_len = min(log_data.length(), object_size - offset_in_obj);
-
-    r = io.write(oid, log_data, write_len, offset_in_obj);
-    if (r < 0) {
-      return r;
-    } else {
-      dout(4) << "Wrote " << write_len << " bytes to " << oid << dendl;
-      r = 0;
-    }
-     
-    log_data.splice(0, write_len);
-    write_offset += write_len;
-    obj_offset++;
-  }
-
-  return r;
-}
-
diff --git a/src/tools/cephfs/JournalTool.h b/src/tools/cephfs/JournalTool.h
deleted file mode 100644
index 7598766..0000000
--- a/src/tools/cephfs/JournalTool.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 John Spray <john.spray at inktank.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- */
-
-#include "MDSUtility.h"
-#include <vector>
-
-#include "mds/mdstypes.h"
-#include "mds/LogEvent.h"
-
-#include "include/rados/librados.hpp"
-
-#include "JournalFilter.h"
-
-class EMetaBlob;
-class JournalScanner;
-
-
-/**
- * Command line tool for investigating and repairing filesystems
- * with damaged metadata logs
- */
-class JournalTool : public MDSUtility
-{
-  private:
-    int rank;
-
-    // Entry points
-    int main_journal(std::vector<const char*> &argv);
-    int main_header(std::vector<const char*> &argv);
-    int main_event(std::vector<const char*> &argv);
-
-    // Shared functionality
-    int recover_journal();
-
-    // Journal operations
-    int journal_inspect();
-    int journal_export(std::string const &path, bool import);
-    int journal_reset();
-
-    // Header operations
-    int header_set();
-
-    // I/O handles
-    librados::Rados rados;
-    librados::IoCtx io;
-
-    // Metadata backing store manipulation
-    int replay_offline(EMetaBlob const &metablob, bool const dry_run);
-
-    // Splicing
-    int erase_region(JournalScanner const &jp, uint64_t const pos, uint64_t const length);
-
-  public:
-    void usage();
-    JournalTool() :
-      rank(0) {}
-    int main(std::vector<const char*> &argv);
-};
-
diff --git a/src/tools/cephfs/cephfs-journal-tool.cc b/src/tools/cephfs/cephfs-journal-tool.cc
deleted file mode 100644
index e9083a5..0000000
--- a/src/tools/cephfs/cephfs-journal-tool.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 John Spray <john.spray at inktank.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- */
-
-
-#include "include/types.h"
-#include "common/config.h"
-#include "common/ceph_argparse.h"
-#include "common/errno.h"
-#include "global/global_init.h"
-
-#include "JournalTool.h"
-
-
-int main(int argc, const char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, argv, args);
-  env_to_vec(args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  JournalTool jt;
-
-  // Handle --help before calling init() so we don't depend on network.
-  if (args.empty() || (args.size() == 1 && (std::string(args[0]) == "--help" || std::string(args[0]) == "-h"))) {
-    jt.usage();
-    return 0;
-  }
-
-  // Connect to mon cluster, download MDS map etc
-  int rc = jt.init();
-  if (rc != 0) {
-      std::cerr << "Error in initialization: " << cpp_strerror(rc) << std::endl;
-      return rc;
-  }
-
-  // Finally, execute the user's commands
-  rc = jt.main(args);
-  if (rc != 0) {
-    std::cerr << "Error (" << cpp_strerror(rc) << ")" << std::endl;
-  }
-
-  jt.shutdown();
-
-  return rc;
-}
-
diff --git a/src/tools/crushtool.cc b/src/tools/crushtool.cc
index ccb0efd..8dcd79c 100644
--- a/src/tools/crushtool.cc
+++ b/src/tools/crushtool.cc
@@ -193,7 +193,7 @@ int main(int argc, const char **argv)
 
   CrushWrapper crush;
 
-  CrushTester tester(crush, cout);
+  CrushTester tester(crush, cerr);
 
   // we use -c, don't confuse the generic arg parsing
   // only parse arguments from CEPH_ARGS, if in the environment
@@ -427,13 +427,13 @@ int main(int argc, const char **argv)
   }
 
   if (decompile + compile + build > 1) {
-    cerr << "cannot specify more than one of compile, decompile, and build" << std::endl;
+    cout << "cannot specify more than one of compile, decompile, and build" << std::endl;
     exit(EXIT_FAILURE);
   }
   if (!compile && !decompile && !build && !test && !reweight && !adjust &&
       add_item < 0 &&
       remove_name.empty() && reweight_name.empty()) {
-    cerr << "no action specified; -h for help" << std::endl;
+    cout << "no action specified; -h for help" << std::endl;
     exit(EXIT_FAILURE);
   }
   if ((!build) && (!args.empty())) {
@@ -581,8 +581,10 @@ int main(int argc, const char **argv)
 	  dout(2) << "  item " << items[j] << " weight " << weights[j] << dendl;
 	}
 
+	crush_bucket *b = crush_make_bucket(buckettype, CRUSH_HASH_DEFAULT, type, j, items, weights);
+	assert(b);
 	int id;
-	int r = crush.add_bucket(0, buckettype, CRUSH_HASH_DEFAULT, type, j, items, weights, &id);
+	int r = crush_add_bucket(crush.crush, 0, b, &id);
 	if (r < 0) {
 	  dout(2) << "Couldn't add bucket: " << cpp_strerror(r) << dendl;
 	}
diff --git a/src/tools/dupstore.cc b/src/tools/dupstore.cc
index 9b07fbd..592b4b7 100644
--- a/src/tools/dupstore.cc
+++ b/src/tools/dupstore.cc
@@ -11,10 +11,13 @@
  * Foundation.  See file COPYING.
  * 
  */
+
+#include <iostream>
+#include "os/FileStore.h"
 #include "common/ceph_argparse.h"
 #include "global/global_init.h"
+
 #include "include/unordered_map.h"
-#include "os/FileStore.h"
 
 int dupstore(ObjectStore* src, ObjectStore* dst)
 {
diff --git a/src/tools/mon_store_converter.cc b/src/tools/mon_store_converter.cc
index 7b8add8..1c0d3af 100644
--- a/src/tools/mon_store_converter.cc
+++ b/src/tools/mon_store_converter.cc
@@ -10,18 +10,20 @@
 * License version 2.1, as published by the Free Software
 * Foundation. See file COPYING.
 */
-#include <boost/scoped_ptr.hpp>
-
-#include <set>
+#include <iostream>
 #include <string>
-
-#include "common/ceph_argparse.h"
-#include "common/debug.h"
+#include <sstream>
+#include <map>
+#include <set>
+#include <boost/scoped_ptr.hpp>
+#include <errno.h>
 
 #include "include/types.h"
 #include "include/buffer.h"
-
+#include "common/ceph_argparse.h"
 #include "global/global_init.h"
+#include "common/debug.h"
+#include "common/config.h"
 
 #include "mon/MonitorDBStore.h"
 #include "mon/MonitorStore.h"
@@ -94,14 +96,14 @@ class MonitorStoreConverter {
   }
 
   void _mark_convert_start() {
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    tx->put("mon_convert", "on_going", 1);
+    MonitorDBStore::Transaction tx;
+    tx.put("mon_convert", "on_going", 1);
     db->apply_transaction(tx);
   }
 
   void _mark_convert_finish() {
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    tx->erase("mon_convert", "on_going");
+    MonitorDBStore::Transaction tx;
+    tx.erase("mon_convert", "on_going");
     db->apply_transaction(tx);
   }
 
@@ -112,11 +114,11 @@ class MonitorStoreConverter {
     assert(store->exists_bl_ss("feature_set"));
     assert(store->exists_bl_ss("election_epoch"));
 
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+    MonitorDBStore::Transaction tx;
 
     if (store->exists_bl_ss("joined")) {
       version_t joined = store->get_int("joined");
-      tx->put(MONITOR_NAME, "joined", joined);
+      tx.put(MONITOR_NAME, "joined", joined);
     }
 
     vector<string> keys;
@@ -133,10 +135,10 @@ class MonitorStoreConverter {
       bufferlist bl;
       int r = store->get_bl_ss(bl, (*it).c_str(), 0);
       assert(r > 0);
-      tx->put(MONITOR_NAME, *it, bl);
+      tx.put(MONITOR_NAME, *it, bl);
     }
 
-    assert(!tx->empty());
+    assert(!tx.empty());
     db->apply_transaction(tx);
   }
 
@@ -179,9 +181,9 @@ class MonitorStoreConverter {
       std::cout << __func__ << " " << machine
 		<< " ver " << ver << " bl " << bl.length() << std::endl;
 
-      MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-      tx->put(machine, ver, bl);
-      tx->put(machine, "last_committed", ver);
+      MonitorDBStore::Transaction tx;
+      tx.put(machine, ver, bl);
+      tx.put(machine, "last_committed", ver);
 
       if (has_gv && store->exists_bl_sn(machine_gv.c_str(), ver)) {
 	stringstream s;
@@ -201,8 +203,8 @@ class MonitorStoreConverter {
 	}
 
 	bufferlist tx_bl;
-	tx->encode(tx_bl);
-	tx->put("paxos", gv, tx_bl);
+	tx.encode(tx_bl);
+	tx.put("paxos", gv, tx_bl);
       }
       db->apply_transaction(tx);
     }
@@ -210,9 +212,9 @@ class MonitorStoreConverter {
     version_t lc = db->get(machine, "last_committed");
     assert(lc == last_committed);
 
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
-    tx->put(machine, "first_committed", first_committed);
-    tx->put(machine, "last_committed", last_committed);
+    MonitorDBStore::Transaction tx;
+    tx.put(machine, "first_committed", first_committed);
+    tx.put(machine, "last_committed", last_committed);
 
     if (store->exists_bl_ss(machine.c_str(), "latest")) {
       bufferlist latest_bl_raw;
@@ -224,7 +226,7 @@ class MonitorStoreConverter {
 	goto out;
       }
 
-      tx->put(machine, "latest", latest_bl_raw);
+      tx.put(machine, "latest", latest_bl_raw);
 
       bufferlist::iterator lbl_it = latest_bl_raw.begin();
       bufferlist latest_bl;
@@ -235,10 +237,10 @@ class MonitorStoreConverter {
       std::cout << __func__ << " machine " << machine
 		<< " latest ver " << latest_ver << std::endl;
 
-      tx->put(machine, "full_latest", latest_ver);
+      tx.put(machine, "full_latest", latest_ver);
       stringstream os;
       os << "full_" << latest_ver;
-      tx->put(machine, os.str(), latest_bl);
+      tx.put(machine, os.str(), latest_bl);
     }
   out:
     db->apply_transaction(tx);
@@ -269,17 +271,17 @@ class MonitorStoreConverter {
 
     // erase all paxos versions between [first, last_gv[, with first being the
     // first gv in the map.
-    MonitorDBStore::TransactionRef tx(new MonitorDBStore::Transaction);
+    MonitorDBStore::Transaction tx;
     set<version_t>::iterator it = gvs.begin();
     std::cout << __func__ << " first gv " << (*it)
 	      << " last gv " << last_gv << std::endl;
     for (; it != gvs.end() && (*it < last_gv); ++it) {
-      tx->erase("paxos", *it);
+      tx.erase("paxos", *it);
     }
-    tx->put("paxos", "first_committed", last_gv);
-    tx->put("paxos", "last_committed", highest_gv);
-    tx->put("paxos", "accepted_pn", highest_accepted_pn);
-    tx->put("paxos", "last_pn", highest_last_pn);
+    tx.put("paxos", "first_committed", last_gv);
+    tx.put("paxos", "last_committed", highest_gv);
+    tx.put("paxos", "accepted_pn", highest_accepted_pn);
+    tx.put("paxos", "last_pn", highest_last_pn);
     db->apply_transaction(tx);
   }
 
diff --git a/src/tools/monmaptool.cc b/src/tools/monmaptool.cc
index 515abd7..f11858c 100644
--- a/src/tools/monmaptool.cc
+++ b/src/tools/monmaptool.cc
@@ -11,16 +11,22 @@
  * Foundation.  See file COPYING.
  * 
  */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <iostream>
 #include <string>
+using namespace std;
 
+#include "common/config.h"
 #include "common/ceph_argparse.h"
 #include "common/errno.h"
-
 #include "global/global_init.h"
-#include "include/str_list.h"
 #include "mon/MonMap.h"
-
-using namespace std;
+#include "include/str_list.h"
 
 void usage()
 {
diff --git a/src/tools/osdmaptool.cc b/src/tools/osdmaptool.cc
index d84aeb8..0db39da 100644
--- a/src/tools/osdmaptool.cc
+++ b/src/tools/osdmaptool.cc
@@ -12,16 +12,22 @@
  * 
  */
 
-#include <string>
+#include <sys/types.h>
 #include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
 
-#include "common/ceph_argparse.h"
-#include "common/errno.h"
+#include <iostream>
+#include <string>
+using namespace std;
 
-#include "global/global_init.h"
-#include "osd/OSDMap.h"
+#include "common/config.h"
 
-using namespace std;
+#include "common/errno.h"
+#include "osd/OSDMap.h"
+#include "mon/MonMap.h"
+#include "common/ceph_argparse.h"
+#include "global/global_init.h"
 
 void usage()
 {
diff --git a/src/tools/psim.cc b/src/tools/psim.cc
index 6ea5a5d..7f094b9 100644
--- a/src/tools/psim.cc
+++ b/src/tools/psim.cc
@@ -1,5 +1,9 @@
 
+#include <iostream>
+
+#include "crush/CrushWrapper.h"
 #include "osd/OSDMap.h"
+#include "common/config.h"
 #include "include/buffer.h"
 
 int main(int argc, char **argv)
diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc
index 8e321d9..bd71433 100644
--- a/src/tools/rados/rados.cc
+++ b/src/tools/rados/rados.cc
@@ -110,7 +110,7 @@ void usage(ostream& out)
 "IMPORT AND EXPORT\n"
 "   import [options] <local-directory> <rados-pool>\n"
 "       Upload <local-directory> to <rados-pool>\n"
-"   export [options] <rados-pool> <local-directory>\n"
+"   export [options] rados-pool> <local-directory>\n"
 "       Download <rados-pool> to <local-directory>\n"
 "   options:\n"
 "       -f / --force                 Copy everything, even if it hasn't changed.\n"
@@ -184,8 +184,6 @@ void usage(ostream& out)
     ;
 }
 
-unsigned default_op_size = 1 << 22;
-
 static void usage_exit()
 {
   usage(cerr);
@@ -197,7 +195,7 @@ static int dump_data(std::string const &filename, bufferlist const &data)
 {
   int fd;
   if (filename == "-") {
-    fd = STDOUT_FILENO;
+    fd = 1;
   } else {
     fd = TEMP_FAILURE_RETRY(::open(filename.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644));
     if (fd < 0) {
@@ -223,7 +221,7 @@ static int do_get(IoCtx& io_ctx, const char *objname, const char *outfile, unsig
 
   int fd;
   if (strcmp(outfile, "-") == 0) {
-    fd = STDOUT_FILENO;
+    fd = 1;
   } else {
     fd = TEMP_FAILURE_RETRY(::open(outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644));
     if (fd < 0) {
@@ -413,7 +411,7 @@ static int do_put(IoCtx& io_ctx, const char *objname, const char *infile, int op
     stdio = true;
 
   int ret;
-  int fd = STDIN_FILENO;
+  int fd = 0;
   if (!stdio)
     fd = open(infile, O_RDONLY);
   if (fd < 0) {
@@ -1127,12 +1125,12 @@ static int do_cache_evict(IoCtx& io_ctx, string oid)
 
 static int do_cache_flush_evict_all(IoCtx& io_ctx, bool blocking)
 {
+  int r;
   int errors = 0;
   try {
     librados::ObjectIterator i = io_ctx.objects_begin();
     librados::ObjectIterator i_end = io_ctx.objects_end();
     for (; i != i_end; ++i) {
-      int r;
       cout << i->first << "\t" << i->second << std::endl;
       if (i->second.size()) {
 	io_ctx.locator_set_key(i->second);
@@ -1177,7 +1175,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
   const char *target_pool_name = NULL;
   string oloc, target_oloc, nspace;
   int concurrent_ios = 16;
-  unsigned op_size = default_op_size;
+  int op_size = 1 << 22;
   bool cleanup = true;
   const char *snapname = NULL;
   snap_t snapid = CEPH_NOSNAP;
@@ -1365,10 +1363,9 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
     // align op_size
     if (io_ctx.pool_requires_alignment()) {
       const uint64_t align = io_ctx.pool_required_alignment();
-      const uint64_t prev_op_size = op_size;
+      const bool wrn = (op_size != (1<<22));
       op_size = uint64_t((op_size + align - 1) / align) * align;
-      // Warn: if user specified and it was rounded
-      if (prev_op_size != default_op_size && prev_op_size != op_size)
+      if (wrn)
 	cerr << "INFO: op_size has been rounded to " << op_size << std::endl;
     }
   }
@@ -1489,10 +1486,10 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
           formatter->dump_format("num_objects_missing_on_primary", "%lld", s.num_objects_missing_on_primary);
           formatter->dump_format("num_objects_unfound", "%lld", s.num_objects_unfound);
           formatter->dump_format("num_objects_degraded", "%lld", s.num_objects_degraded);
-          formatter->dump_format("read_ops", "%lld", s.num_rd);
-          formatter->dump_format("read_bytes", "%lld", s.num_rd_kb * 1024ull);
-          formatter->dump_format("write_ops", "%lld", s.num_wr);
-          formatter->dump_format("write_bytes", "%lld", s.num_wr_kb * 1024ull);
+          formatter->dump_format("read_bytes", "%lld", s.num_rd);
+          formatter->dump_format("read_kb", "%lld", s.num_rd_kb);
+          formatter->dump_format("write_bytes", "%lld", s.num_wr);
+          formatter->dump_format("write_kb", "%lld", s.num_wr_kb);
           formatter->flush(cout);
         }
         if (formatter) {
@@ -1644,22 +1641,15 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
     }
   }
   else if (strcmp(nargs[0], "setxattr") == 0) {
-    if (!pool_name || nargs.size() < 3 || nargs.size() > 4)
+    if (!pool_name || nargs.size() < 4)
       usage_exit();
 
     string oid(nargs[1]);
     string attr_name(nargs[2]);
+    string attr_val(nargs[3]);
+
     bufferlist bl;
-    if (nargs.size() == 4) {
-      string attr_val(nargs[3]);
-      bl.append(attr_val.c_str(), attr_val.length());
-    } else {
-      do {
-	ret = bl.read_fd(STDIN_FILENO, 1024); // from stdin
-	if (ret < 0)
-	  goto out;
-      } while (ret > 0);
-    }
+    bl.append(attr_val.c_str(), attr_val.length());
 
     ret = io_ctx.setxattr(oid, attr_name.c_str(), bl);
     if (ret < 0) {
@@ -1685,7 +1675,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
     else
       ret = 0;
     string s(bl.c_str(), bl.length());
-    cout << s;
+    cout << s << std::endl;
   } else if (strcmp(nargs[0], "rmxattr") == 0) {
     if (!pool_name || nargs.size() < 3)
       usage_exit();
diff --git a/src/tools/radosacl.cc b/src/tools/radosacl.cc
index 1c482ed..d2f7ca5 100644
--- a/src/tools/radosacl.cc
+++ b/src/tools/radosacl.cc
@@ -12,15 +12,16 @@
  * 
  */
 
-#include <stdlib.h>
-#include <time.h>
-#include <errno.h>
-
 #include "include/types.h"
 #include "include/rados/librados.hpp"
-
 using namespace librados;
 
+#include <iostream>
+
+#include <stdlib.h>
+#include <time.h>
+#include <errno.h>
+
 void buf_to_hex(const unsigned char *buf, int len, char *str)
 {
   str[0] = '\0';
diff --git a/src/tools/rest_bench.cc b/src/tools/rest_bench.cc
index 50340d9..d617fe1 100644
--- a/src/tools/rest_bench.cc
+++ b/src/tools/rest_bench.cc
@@ -12,21 +12,22 @@
  *
  */
 
-#include <deque>
-#include <errno.h>
-
-#include "libs3.h"
+#include "include/types.h"
+#include "include/atomic.h"
 
-#include "common/ceph_argparse.h"
-#include "common/debug.h"
 #include "common/obj_bencher.h"
+#include "common/config.h"
+#include "common/debug.h"
+#include "common/ceph_argparse.h"
 #include "common/WorkQueue.h"
+#include "msg/Message.h"
+#include "global/global_init.h"
 
-#include "include/types.h"
-#include "include/atomic.h"
+#include "libs3.h"
 
-#include "global/global_init.h"
-#include "msg/Message.h"
+#include <deque>
+
+#include <errno.h>
 
 #define DEFAULT_USER_AGENT "rest-bench"
 #define DEFAULT_BUCKET "rest-bench-bucket"
diff --git a/src/tools/scratchtool.c b/src/tools/scratchtool.c
index 9f71790..22cf2bd 100644
--- a/src/tools/scratchtool.c
+++ b/src/tools/scratchtool.c
@@ -15,6 +15,7 @@
 #include "include/rados/librados.h"
 
 #include <assert.h>
+#include <pthread.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -56,24 +57,24 @@ static int do_rados_getxattrs(rados_ioctx_t io_ctx, const char *oid,
 			const char **exkeys, const char **exvals)
 {
 	rados_xattrs_iter_t iter;
-	int nval = 0, i, nfound = 0, r = 0, ret = 1;
+	int nval = 0, i, nfound = 0, ret = 0;
 
 	for (i = 0; exvals[i]; ++i) {
 		++nval;
 	}
-	r = rados_getxattrs(io_ctx, oid, &iter);
-	if (r) {
-		printf("rados_getxattrs(%s) failed with error %d\n", oid, r);
+	ret = rados_getxattrs(io_ctx, oid, &iter);
+	if (ret) {
+		printf("rados_getxattrs(%s) failed with error %d\n", oid, ret);
 		return 1;
 	}
 	while (1) {
 	        size_t len;
 	        const char *key, *val;
-		r = rados_getxattrs_next(iter, &key, &val, &len);
-		if (r) {
+		ret = rados_getxattrs_next(iter, &key, &val, &len);
+		if (ret) {
 			printf("rados_getxattrs(%s): rados_getxattrs_next "
-				"returned error %d\n", oid, r);
-			goto out_err;
+				"returned error %d\n", oid, ret);
+			return 1;
 		}
 		if (!key)
 			break;
@@ -87,20 +88,17 @@ static int do_rados_getxattrs(rados_ioctx_t io_ctx, const char *oid,
 			printf("rados_getxattrs(%s): got key %s, but the "
 				"value was %s rather than %s.\n",
 				oid, key, val, exvals[i]);
-			goto out_err;
+			return 1;
 		}
 	}
 	if (nfound != nval) {
 		printf("rados_getxattrs(%s): only found %d extended attributes. "
 			"Expected %d\n", oid, nfound, nval);
-		goto out_err;
+		return 1;
 	}
-	ret = 0;
-	printf("rados_getxattrs(%s)\n", oid);
-
-out_err:
 	rados_getxattrs_end(iter);
-	return ret;
+	printf("rados_getxattrs(%s)\n", oid);
+	return 0;
 }
 
 static int testrados(void)
@@ -162,10 +160,6 @@ static int testrados(void)
 
 	rados_ioctx_t io_ctx;
 	r = rados_ioctx_create(cl, "foo", &io_ctx);
-	if (r < 0) {
-		printf("error creating ioctx\n");
-		goto out_err;
-	}
 	printf("rados_ioctx_create = %d, io_ctx = %p\n", r, io_ctx);
 
 	/* list all pools */
@@ -177,7 +171,7 @@ static int testrados(void)
 		if (r != buf_sz) {
 			printf("buffer size mismatch: got %d the first time, but %d "
 			"the second.\n", buf_sz, r);
-			goto out_err_cleanup;
+			goto out_err;
 		}
 		const char *b = buf;
 		printf("begin pools.\n");
@@ -227,21 +221,21 @@ static int testrados(void)
 
 	/* attrs */
 	if (do_rados_setxattr(io_ctx, oid, "b", "2"))
-		goto out_err_cleanup;
+		goto out_err;
 	if (do_rados_setxattr(io_ctx, oid, "a", "1"))
-		goto out_err_cleanup;
+		goto out_err;
 	if (do_rados_setxattr(io_ctx, oid, "c", "3"))
-		goto out_err_cleanup;
+		goto out_err;
 	if (do_rados_getxattr(io_ctx, oid, "a", "1"))
-		goto out_err_cleanup;
+		goto out_err;
 	if (do_rados_getxattr(io_ctx, oid, "b", "2"))
-		goto out_err_cleanup;
+		goto out_err;
 	if (do_rados_getxattr(io_ctx, oid, "c", "3"))
-		goto out_err_cleanup;
+		goto out_err;
 	const char *exkeys[] = { "a", "b", "c", NULL };
 	const char *exvals[] = { "1", "2", "3", NULL };
 	if (do_rados_getxattrs(io_ctx, oid, exkeys, exvals))
-		goto out_err_cleanup;
+		goto out_err;
 
 	uint64_t size;
 	time_t mtime;
@@ -299,15 +293,14 @@ static int testrados(void)
 	r = rados_ioctx_pool_stat(io_ctx, &st);
 	printf("rados_stat_pool = %d, %lld KB, %lld objects\n", r, (long long)st.num_kb, (long long)st.num_objects);
 
-	ret = 0;
-
-out_err_cleanup:
 	/* delete a pool */
+	printf("rados_delete_pool = %d\n", r);
 	rados_ioctx_destroy(io_ctx);
 
 	r = rados_pool_delete(cl, "foo");
-	printf("rados_delete_pool = %d\n", r);
+	printf("rados_ioctx_pool_delete = %d\n", r);
 
+	ret = 0;
 out_err:
 	rados_shutdown(cl);
 	return ret;
diff --git a/src/tools/scratchtoolpp.cc b/src/tools/scratchtoolpp.cc
index 9dc25c1..0444cca 100644
--- a/src/tools/scratchtoolpp.cc
+++ b/src/tools/scratchtoolpp.cc
@@ -101,11 +101,8 @@ int main(int argc, const char **argv)
 
   const char *oid = "bar";
 
-  int r = rados.pool_create("foo");
-  cout << "pool_create result = " << r << std::endl;
-
   IoCtx io_ctx;
-  r = rados.ioctx_create("foo", io_ctx);
+  int r = rados.ioctx_create("data", io_ctx);
   cout << "ioctx_create result = " << r << std::endl;
 
   r = io_ctx.write(oid, bl, bl.length(), 0);
@@ -304,10 +301,6 @@ int main(int argc, const char **argv)
 
   r = io_ctx.remove(oid);
   cout << "remove result=" << r << std::endl;
-
-  r = rados.pool_delete("foo");
-  cout << "pool_delete result=" << r << std::endl;
-
   rados.shutdown();
 
   return 0;
diff --git a/src/tracing/Makefile.am b/src/tracing/Makefile.am
deleted file mode 100644
index 16d300e..0000000
--- a/src/tracing/Makefile.am
+++ /dev/null
@@ -1,79 +0,0 @@
-EXTRA_DIST = tracing-common.h
-
-if WITH_LTTNG
-%.c %.h: %.tp
-	$(LTTNG_GEN_TP_PROG) $< -o $*.c -o $*.h
-endif
-
-dist_noinst_DATA = \
-	librados.tp \
-	librbd.tp \
-	oprequest.tp \
-	osd.tp \
-	pg.tp \
-	objectstore.tp
-
-if WITH_LTTNG
-nodist_libosd_tp_la_SOURCES = \
-	oprequest.c \
-	oprequest.h \
-	osd.c \
-	osd.h \
-	pg.h \
-	pg.c
-endif
-libosd_tp_la_LIBADD = -llttng-ust -ldl
-libosd_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-libosd_tp_la_LDFLAGS =
-
-if WITH_LTTNG
-nodist_librados_tp_la_SOURCES = \
-	librados.c \
-	librados.h
-endif
-librados_tp_la_LIBADD = -llttng-ust -ldl
-librados_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-librados_tp_la_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS)
-librados_tp_la_LDFLAGS =
-
-if WITH_LTTNG
-nodist_librbd_tp_la_SOURCES = \
-	librbd.c \
-	librbd.h
-endif
-librbd_tp_la_LIBADD = -llttng-ust -ldl
-librbd_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-librbd_tp_la_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS)
-librbd_tp_la_LDFLAGS =
-
-if WITH_LTTNG
-nodist_libos_tp_la_SOURCES = \
-	objectstore.c \
-	objectstore.h
-endif
-libos_tp_la_LIBADD = -llttng-ust -ldl
-libos_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-libos_tp_la_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS)
-libos_tp_la_LDFLAGS =
-
-if WITH_LTTNG
-noinst_LTLIBRARIES = \
-	libosd_tp.la \
-	librados_tp.la \
-	librbd_tp.la \
-	libos_tp.la
-
-BUILT_SOURCES = \
-	librados.h \
-	librbd.h \
-	oprequest.h \
-	osd.h \
-	pg.h \
-	objectstore.h
-endif
-
-CLEANFILES = \
-	$(nodist_libosd_tp_la_SOURCES) \
-	$(nodist_librados_tp_la_SOURCES) \
-	$(nodist_librbd_tp_la_SOURCES) \
-	$(nodist_libos_tp_la_SOURCES)
diff --git a/src/tracing/Makefile.in b/src/tracing/Makefile.in
deleted file mode 100644
index e4ab897..0000000
--- a/src/tracing/Makefile.in
+++ /dev/null
@@ -1,729 +0,0 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = src/tracing
-DIST_COMMON = $(dist_noinst_DATA) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
-	$(top_srcdir)/m4/ac_prog_jar.m4 \
-	$(top_srcdir)/m4/ac_prog_javac.m4 \
-	$(top_srcdir)/m4/ac_prog_javac_works.m4 \
-	$(top_srcdir)/m4/ac_prog_javah.m4 \
-	$(top_srcdir)/m4/acx_pthread.m4 \
-	$(top_srcdir)/m4/ax_c_pretty_func.m4 \
-	$(top_srcdir)/m4/ax_c_var_func.m4 \
-	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
-	$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
-	$(top_srcdir)/m4/ax_cxx_static_cast.m4 \
-	$(top_srcdir)/m4/ax_intel.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/acconfig.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libos_tp_la_DEPENDENCIES =
- at WITH_LTTNG_TRUE@nodist_libos_tp_la_OBJECTS =  \
- at WITH_LTTNG_TRUE@	libos_tp_la-objectstore.lo
-libos_tp_la_OBJECTS = $(nodist_libos_tp_la_OBJECTS)
-AM_V_lt = $(am__v_lt_ at AM_V@)
-am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-libos_tp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libos_tp_la_CFLAGS) \
-	$(CFLAGS) $(libos_tp_la_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_LTTNG_TRUE@am_libos_tp_la_rpath =
-libosd_tp_la_DEPENDENCIES =
- at WITH_LTTNG_TRUE@nodist_libosd_tp_la_OBJECTS =  \
- at WITH_LTTNG_TRUE@	libosd_tp_la-oprequest.lo libosd_tp_la-osd.lo \
- at WITH_LTTNG_TRUE@	libosd_tp_la-pg.lo
-libosd_tp_la_OBJECTS = $(nodist_libosd_tp_la_OBJECTS)
-libosd_tp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(libosd_tp_la_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_LTTNG_TRUE@am_libosd_tp_la_rpath =
-librados_tp_la_DEPENDENCIES =
- at WITH_LTTNG_TRUE@nodist_librados_tp_la_OBJECTS =  \
- at WITH_LTTNG_TRUE@	librados_tp_la-librados.lo
-librados_tp_la_OBJECTS = $(nodist_librados_tp_la_OBJECTS)
-librados_tp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(librados_tp_la_CFLAGS) $(CFLAGS) $(librados_tp_la_LDFLAGS) \
-	$(LDFLAGS) -o $@
- at WITH_LTTNG_TRUE@am_librados_tp_la_rpath =
-librbd_tp_la_DEPENDENCIES =
- at WITH_LTTNG_TRUE@nodist_librbd_tp_la_OBJECTS = librbd_tp_la-librbd.lo
-librbd_tp_la_OBJECTS = $(nodist_librbd_tp_la_OBJECTS)
-librbd_tp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(librbd_tp_la_CFLAGS) \
-	$(CFLAGS) $(librbd_tp_la_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_LTTNG_TRUE@am_librbd_tp_la_rpath =
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_ at AM_V@)
-am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_ at AM_V@)
-am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
-am__v_at_0 = @
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_ at AM_V@)
-am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(nodist_libos_tp_la_SOURCES) $(nodist_libosd_tp_la_SOURCES) \
-	$(nodist_librados_tp_la_SOURCES) \
-	$(nodist_librbd_tp_la_SOURCES)
-DIST_SOURCES =
-DATA = $(dist_noinst_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_CXXFLAGS = @AM_CXXFLAGS@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CRYPTOPP_CFLAGS = @CRYPTOPP_CFLAGS@
-CRYPTOPP_LIBS = @CRYPTOPP_LIBS@
-CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
-CRYPTO_LIBS = @CRYPTO_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-EXTRA_CLASSPATH_JAR = @EXTRA_CLASSPATH_JAR@
-FGREP = @FGREP@
-GCOV_PREFIX_STRIP = @GCOV_PREFIX_STRIP@
-GIT_CHECK = @GIT_CHECK@
-GREP = @GREP@
-HAVE_CXX11 = @HAVE_CXX11@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTEL_FLAGS = @INTEL_FLAGS@
-INTEL_PCLMUL_FLAGS = @INTEL_PCLMUL_FLAGS@
-INTEL_SSE2_FLAGS = @INTEL_SSE2_FLAGS@
-INTEL_SSE3_FLAGS = @INTEL_SSE3_FLAGS@
-INTEL_SSE4_1_FLAGS = @INTEL_SSE4_1_FLAGS@
-INTEL_SSE4_2_FLAGS = @INTEL_SSE4_2_FLAGS@
-INTEL_SSE_FLAGS = @INTEL_SSE_FLAGS@
-INTEL_SSSE3_FLAGS = @INTEL_SSSE3_FLAGS@
-JAR = @JAR@
-JAVAC = @JAVAC@
-JAVAH = @JAVAH@
-JDK_CPPFLAGS = @JDK_CPPFLAGS@
-KEYUTILS_LIB = @KEYUTILS_LIB@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
-LIBEDIT_LIBS = @LIBEDIT_LIBS@
-LIBFUSE = @LIBFUSE@
-LIBOBJS = @LIBOBJS@
-LIBROCKSDB_CFLAGS = @LIBROCKSDB_CFLAGS@
-LIBROCKSDB_LIBS = @LIBROCKSDB_LIBS@
-LIBS = @LIBS@
-LIBTCMALLOC = @LIBTCMALLOC@
-LIBTOOL = @LIBTOOL@
-LIBZFS_CFLAGS = @LIBZFS_CFLAGS@
-LIBZFS_LIBS = @LIBZFS_LIBS@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LTTNG_GEN_TP_CHECK = @LTTNG_GEN_TP_CHECK@
-LTTNG_GEN_TP_PROG = @LTTNG_GEN_TP_PROG@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NSS_CFLAGS = @NSS_CFLAGS@
-NSS_LIBS = @NSS_LIBS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-RANLIB = @RANLIB@
-RESOLV_LIBS = @RESOLV_LIBS@
-RPM_RELEASE = @RPM_RELEASE@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-WARN_IGNORED_QUALIFIERS = @WARN_IGNORED_QUALIFIERS@
-WARN_TYPE_LIMITS = @WARN_TYPE_LIMITS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-acx_pthread_config = @acx_pthread_config@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = tracing-common.h
-dist_noinst_DATA = \
-	librados.tp \
-	librbd.tp \
-	oprequest.tp \
-	osd.tp \
-	pg.tp \
-	objectstore.tp
-
- at WITH_LTTNG_TRUE@nodist_libosd_tp_la_SOURCES = \
- at WITH_LTTNG_TRUE@	oprequest.c \
- at WITH_LTTNG_TRUE@	oprequest.h \
- at WITH_LTTNG_TRUE@	osd.c \
- at WITH_LTTNG_TRUE@	osd.h \
- at WITH_LTTNG_TRUE@	pg.h \
- at WITH_LTTNG_TRUE@	pg.c
-
-libosd_tp_la_LIBADD = -llttng-ust -ldl
-libosd_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-libosd_tp_la_LDFLAGS = 
- at WITH_LTTNG_TRUE@nodist_librados_tp_la_SOURCES = \
- at WITH_LTTNG_TRUE@	librados.c \
- at WITH_LTTNG_TRUE@	librados.h
-
-librados_tp_la_LIBADD = -llttng-ust -ldl
-librados_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-librados_tp_la_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS)
-librados_tp_la_LDFLAGS = 
- at WITH_LTTNG_TRUE@nodist_librbd_tp_la_SOURCES = \
- at WITH_LTTNG_TRUE@	librbd.c \
- at WITH_LTTNG_TRUE@	librbd.h
-
-librbd_tp_la_LIBADD = -llttng-ust -ldl
-librbd_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-librbd_tp_la_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS)
-librbd_tp_la_LDFLAGS = 
- at WITH_LTTNG_TRUE@nodist_libos_tp_la_SOURCES = \
- at WITH_LTTNG_TRUE@	objectstore.c \
- at WITH_LTTNG_TRUE@	objectstore.h
-
-libos_tp_la_LIBADD = -llttng-ust -ldl
-libos_tp_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
-libos_tp_la_CFLAGS = -I$(top_srcdir)/src $(AM_CFLAGS)
-libos_tp_la_LDFLAGS = 
- at WITH_LTTNG_TRUE@noinst_LTLIBRARIES = \
- at WITH_LTTNG_TRUE@	libosd_tp.la \
- at WITH_LTTNG_TRUE@	librados_tp.la \
- at WITH_LTTNG_TRUE@	librbd_tp.la \
- at WITH_LTTNG_TRUE@	libos_tp.la
-
- at WITH_LTTNG_TRUE@BUILT_SOURCES = \
- at WITH_LTTNG_TRUE@	librados.h \
- at WITH_LTTNG_TRUE@	librbd.h \
- at WITH_LTTNG_TRUE@	oprequest.h \
- at WITH_LTTNG_TRUE@	osd.h \
- at WITH_LTTNG_TRUE@	pg.h \
- at WITH_LTTNG_TRUE@	objectstore.h
-
-CLEANFILES = \
-	$(nodist_libosd_tp_la_SOURCES) \
-	$(nodist_librados_tp_la_SOURCES) \
-	$(nodist_librbd_tp_la_SOURCES) \
-	$(nodist_libos_tp_la_SOURCES)
-
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tracing/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign src/tracing/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLTLIBRARIES:
-	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libos_tp.la: $(libos_tp_la_OBJECTS) $(libos_tp_la_DEPENDENCIES) $(EXTRA_libos_tp_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libos_tp_la_LINK) $(am_libos_tp_la_rpath) $(libos_tp_la_OBJECTS) $(libos_tp_la_LIBADD) $(LIBS)
-libosd_tp.la: $(libosd_tp_la_OBJECTS) $(libosd_tp_la_DEPENDENCIES) $(EXTRA_libosd_tp_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libosd_tp_la_LINK) $(am_libosd_tp_la_rpath) $(libosd_tp_la_OBJECTS) $(libosd_tp_la_LIBADD) $(LIBS)
-librados_tp.la: $(librados_tp_la_OBJECTS) $(librados_tp_la_DEPENDENCIES) $(EXTRA_librados_tp_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(librados_tp_la_LINK) $(am_librados_tp_la_rpath) $(librados_tp_la_OBJECTS) $(librados_tp_la_LIBADD) $(LIBS)
-librbd_tp.la: $(librbd_tp_la_OBJECTS) $(librbd_tp_la_DEPENDENCIES) $(EXTRA_librbd_tp_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(librbd_tp_la_LINK) $(am_librbd_tp_la_rpath) $(librbd_tp_la_OBJECTS) $(librbd_tp_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libos_tp_la-objectstore.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libosd_tp_la-oprequest.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libosd_tp_la-osd.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libosd_tp_la-pg.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/librados_tp_la-librados.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/librbd_tp_la-librbd.Plo at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-libos_tp_la-objectstore.lo: objectstore.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libos_tp_la_CPPFLAGS) $(CPPFLAGS) $(libos_tp_la_CFLAGS) $(CFLAGS) -MT libos_tp_la-objectstore.lo -MD -MP -MF $(DEPDIR)/libos_tp_la-objectstore.Tpo -c -o libos_tp_la-objectstore.lo `test -f 'objectstore.c' || echo '$(srcdir)/'`objectstore.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libos_tp_la-objectstore.Tpo $(DEPDIR)/libos_tp_la-objectstore.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='objectstore.c' object='libos_tp_la-objectstore.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libos_tp_la_CPPFLAGS) $(CPPFLAGS) $(libos_tp_la_CFLAGS) $(CFLAGS) -c -o libos_tp_la-objectstore.lo `test -f 'objectstore.c' || echo '$(srcdir)/'`objectstore.c
-
-libosd_tp_la-oprequest.lo: oprequest.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libosd_tp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libosd_tp_la-oprequest.lo -MD -MP -MF $(DEPDIR)/libosd_tp_la-oprequest.Tpo -c -o libosd_tp_la-oprequest.lo `test -f 'oprequest.c' || echo '$(srcdir)/'`oprequest.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libosd_tp_la-oprequest.Tpo $(DEPDIR)/libosd_tp_la-oprequest.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='oprequest.c' object='libosd_tp_la-oprequest.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libosd_tp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libosd_tp_la-oprequest.lo `test -f 'oprequest.c' || echo '$(srcdir)/'`oprequest.c
-
-libosd_tp_la-osd.lo: osd.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libosd_tp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libosd_tp_la-osd.lo -MD -MP -MF $(DEPDIR)/libosd_tp_la-osd.Tpo -c -o libosd_tp_la-osd.lo `test -f 'osd.c' || echo '$(srcdir)/'`osd.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libosd_tp_la-osd.Tpo $(DEPDIR)/libosd_tp_la-osd.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='osd.c' object='libosd_tp_la-osd.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libosd_tp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libosd_tp_la-osd.lo `test -f 'osd.c' || echo '$(srcdir)/'`osd.c
-
-libosd_tp_la-pg.lo: pg.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libosd_tp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libosd_tp_la-pg.lo -MD -MP -MF $(DEPDIR)/libosd_tp_la-pg.Tpo -c -o libosd_tp_la-pg.lo `test -f 'pg.c' || echo '$(srcdir)/'`pg.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libosd_tp_la-pg.Tpo $(DEPDIR)/libosd_tp_la-pg.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pg.c' object='libosd_tp_la-pg.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libosd_tp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libosd_tp_la-pg.lo `test -f 'pg.c' || echo '$(srcdir)/'`pg.c
-
-librados_tp_la-librados.lo: librados.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librados_tp_la_CPPFLAGS) $(CPPFLAGS) $(librados_tp_la_CFLAGS) $(CFLAGS) -MT librados_tp_la-librados.lo -MD -MP -MF $(DEPDIR)/librados_tp_la-librados.Tpo -c -o librados_tp_la-librados.lo `test -f 'librados.c' || echo '$(srcdir)/'`librados.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/librados_tp_la-librados.Tpo $(DEPDIR)/librados_tp_la-librados.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='librados.c' object='librados_tp_la-librados.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librados_tp_la_CPPFLAGS) $(CPPFLAGS) $(librados_tp_la_CFLAGS) $(CFLAGS) -c -o librados_tp_la-librados.lo `test -f 'librados.c' || echo '$(srcdir)/'`librados.c
-
-librbd_tp_la-librbd.lo: librbd.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librbd_tp_la_CPPFLAGS) $(CPPFLAGS) $(librbd_tp_la_CFLAGS) $(CFLAGS) -MT librbd_tp_la-librbd.lo -MD -MP -MF $(DEPDIR)/librbd_tp_la-librbd.Tpo -c -o librbd_tp_la-librbd.lo `test -f 'librbd.c' || echo '$(srcdir)/'`librbd.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/librbd_tp_la-librbd.Tpo $(DEPDIR)/librbd_tp_la-librbd.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='librbd.c' object='librbd_tp_la-librbd.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librbd_tp_la_CPPFLAGS) $(CPPFLAGS) $(librbd_tp_la_CFLAGS) $(CFLAGS) -c -o librbd_tp_la-librbd.lo `test -f 'librbd.c' || echo '$(srcdir)/'`librbd.c
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LTLIBRARIES) $(DATA)
-installdirs:
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am
-
-
- at WITH_LTTNG_TRUE@%.c %.h: %.tp
- at WITH_LTTNG_TRUE@	$(LTTNG_GEN_TP_PROG) $< -o $*.c -o $*.h
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/tracing/librados.tp b/src/tracing/librados.tp
deleted file mode 100644
index 9f3e549..0000000
--- a/src/tracing/librados.tp
+++ /dev/null
@@ -1,3057 +0,0 @@
-#include "tracing/tracing-common.h"
-#include "include/rados/librados.h"
-
-TRACEPOINT_EVENT(librados, rados_create_enter,
-    TP_ARGS(
-        const char*, id),
-    TP_FIELDS(
-        ceph_ctf_string(id, id)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create_exit,
-    TP_ARGS(
-        int, retval,
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create2_enter,
-    TP_ARGS(
-        const char*, clustername,
-        const char*, name,
-        uint64_t, flags),
-    TP_FIELDS(
-        ceph_ctf_string(clustername, clustername)
-        ceph_ctf_string(name, name)
-        ctf_integer_hex(uint64_t, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create2_exit,
-    TP_ARGS(
-        int, retval,
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create_with_context_enter,
-    TP_ARGS(
-        rados_config_t, cct),
-    TP_FIELDS(
-        ctf_integer_hex(rados_config_t, cct, cct)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create_with_context_exit,
-    TP_ARGS(
-        int, retval,
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_cct_enter,
-    TP_ARGS(
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_cct_exit,
-    TP_ARGS(
-        rados_config_t, retval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_config_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_connect_enter,
-    TP_ARGS(
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_connect_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_shutdown_enter,
-    TP_ARGS(
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_shutdown_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_get_instance_id_enter,
-    TP_ARGS(
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_get_instance_id_exit,
-    TP_ARGS(
-        uint64_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint64_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_version_enter,
-    TP_ARGS(
-        int*, pmajor,
-        int*, pminor,
-        int*, pextra),
-    TP_FIELDS(
-        ctf_integer_hex(int*, pmajor, pmajor)
-        ctf_integer_hex(int*, pminor, pminor)
-        ctf_integer_hex(int*, pextra, pextra)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_version_exit,
-    TP_ARGS(
-        int, major,
-        int, minor,
-        int, extra),
-    TP_FIELDS(
-        ctf_integer(int, major, major)
-        ctf_integer(int, minor, minor)
-        ctf_integer(int, extra, extra)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_read_file_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, path_list),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ceph_ctf_string(path_list, path_list)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_read_file_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        int, argc),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(int, argc, argc)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_arg,
-    TP_ARGS(
-        const char*, arg),
-    TP_FIELDS(
-        ceph_ctf_string(arg, arg)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_remainder_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        int, argc),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(int, argc, argc)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_remainder_arg,
-    TP_ARGS(
-        const char*, arg),
-    TP_FIELDS(
-        ceph_ctf_string(arg, arg)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_remainder_remarg,
-    TP_ARGS(
-        const char*, remarg),
-    TP_FIELDS(
-        ceph_ctf_string(remarg, remarg)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_argv_remainder_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_env_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, env),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(env, env)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_parse_env_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_set_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, option,
-        const char*, value),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ceph_ctf_string(option, option)
-        ceph_ctf_string(value, value)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_set_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_cluster_stat_enter,
-    TP_ARGS(
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_cluster_stat_exit,
-    TP_ARGS(
-        int, retval,
-        uint64_t, kb,
-        uint64_t, kb_used,
-        uint64_t, kb_avail,
-        uint64_t, num_objects),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(uint64_t, kb, kb)
-        ctf_integer(uint64_t, kb_used, kb_used)
-        ctf_integer(uint64_t, kb_avail, kb_avail)
-        ctf_integer(uint64_t, num_objects, num_objects)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_get_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, option,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(option, option)
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_conf_get_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, value),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_string(value, value)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_lookup_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_lookup_exit,
-    TP_ARGS(
-        int64_t, retval),
-    TP_FIELDS(
-        ctf_integer(int64_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_reverse_lookup_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        int64_t, id,
-        size_t, maxlen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(int64_t, id, id)
-        ctf_integer(size_t, maxlen, maxlen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_reverse_lookup_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_cluster_fsid_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        size_t, maxlen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(size_t, maxlen, maxlen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_cluster_fsid_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, fsid),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_string(fsid, fsid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_wait_for_latest_osdmap_enter,
-    TP_ARGS(
-        rados_t, cluster),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_wait_for_latest_osdmap_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_list_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        size_t, maxlen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(size_t, maxlen, maxlen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_list_pool,
-    TP_ARGS(
-        const char*, buf),
-    TP_FIELDS(
-        ctf_string(buf, buf)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_list_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ping_monitor_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, mon_id),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(mon_id, mon_id)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ping_monitor_exit,
-    TP_ARGS(
-        int, retval,
-        char const* const*, buf,
-        size_t*, len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_sequencep(unsigned char, buf, buf, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_mon_command_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        size_t, cmdlen,
-        const char*, inbuf,
-        size_t, inbuflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(size_t, cmdlen, cmdlen)
-        ceph_ctf_sequence(unsigned char, inbuf, inbuf, size_t, inbuflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_mon_command_cmd,
-    TP_ARGS(
-        const char*, cmd),
-    TP_FIELDS(
-        ctf_string(cmd, cmd)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_mon_command_exit,
-    TP_ARGS(
-        int, retval,
-        char**, outbuf,
-        size_t*, outbuflen,
-        char**, outs,
-        size_t*, outslen),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_stringp(outs, outs)
-        ceph_ctf_sequencep(unsigned char, outbuf, outbuf, size_t, outbuflen)
-        ceph_ctf_integerp(size_t, outslen, outslen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_mon_command_target_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name,
-        size_t, cmdlen,
-        const char*, inbuf,
-        size_t, inbuflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-        ctf_integer(size_t, cmdlen, cmdlen)
-        ceph_ctf_sequence(unsigned char, inbuf, inbuf, size_t, inbuflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_mon_command_target_cmd,
-    TP_ARGS(
-        const char*, cmd),
-    TP_FIELDS(
-        ctf_string(cmd, cmd)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_mon_command_target_exit,
-    TP_ARGS(
-        int, retval,
-        char**, outbuf,
-        size_t*, outbuflen,
-        char**, outs,
-        size_t*, outslen),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_stringp(outs, outs)
-        ceph_ctf_sequencep(unsigned char, outbuf, outbuf, size_t, outbuflen)
-        ceph_ctf_integerp(size_t, outslen, outslen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_osd_command_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        int, osdid,
-        size_t, cmdlen,
-        const char*, inbuf,
-        size_t, inbuflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_integer(int, osdid, osdid)
-        ctf_integer(size_t, cmdlen, cmdlen)
-        ceph_ctf_sequence(unsigned char, inbuf, inbuf, size_t, inbuflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_osd_command_cmd,
-    TP_ARGS(
-        const char*, cmd),
-    TP_FIELDS(
-        ctf_string(cmd, cmd)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_osd_command_exit,
-    TP_ARGS(
-        int, retval,
-        char**, outbuf,
-        size_t*, outbuflen,
-        char**, outs,
-        size_t*, outslen),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_stringp(outs, outs)
-        ceph_ctf_sequencep(unsigned char, outbuf, outbuf, size_t, outbuflen)
-        ceph_ctf_integerp(size_t, outslen, outslen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pg_command_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, pg,
-        size_t, cmdlen,
-        const char*, inbuf,
-        size_t, inbuflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(pg, pg)
-        ctf_integer(size_t, cmdlen, cmdlen)
-        ceph_ctf_sequence(unsigned char, inbuf, inbuf, size_t, inbuflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pg_command_cmd,
-    TP_ARGS(
-        const char*, cmd),
-    TP_FIELDS(
-        ctf_string(cmd, cmd)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pg_command_exit,
-    TP_ARGS(
-        int, retval,
-        char**, outbuf,
-        size_t*, outbuflen,
-        char**, outs,
-        size_t*, outslen),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_stringp(outs, outs)
-        ceph_ctf_sequencep(unsigned char, outbuf, outbuf, size_t, outbuflen)
-        ceph_ctf_integerp(size_t, outslen, outslen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_buffer_free_enter,
-    TP_ARGS(
-        void*, buf),
-    TP_FIELDS(
-        ctf_integer_hex(void*, buf, buf)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_buffer_free_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_monitor_log_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, level,
-        rados_log_callback_t, callback,
-        void*, arg),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ceph_ctf_string(level, level)
-        ctf_integer_hex(rados_log_callback_t, callback, callback)
-        ctf_integer_hex(void*, arg, arg)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_monitor_log_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_create_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_create_exit,
-    TP_ARGS(
-        int, retval,
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_destroy_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_destroy_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_stat_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_stat_exit,
-    TP_ARGS(
-        int, retval,
-        struct rados_pool_stat_t*, stats),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(uint64_t, num_kb, stats->num_kb)
-        ctf_integer(uint64_t, num_bytes, stats->num_bytes)
-        ctf_integer(uint64_t, num_objects, stats->num_objects)
-        ctf_integer(uint64_t, num_object_clones, stats->num_object_clones)
-        ctf_integer(uint64_t, num_object_copies, stats->num_object_copies)
-        ctf_integer(uint64_t, num_objects_missing_on_primary, stats->num_objects_missing_on_primary)
-        ctf_integer(uint64_t, num_objects_unfound, stats->num_objects_unfound)
-        ctf_integer(uint64_t, num_objects_degraded, stats->num_objects_degraded)
-        ctf_integer(uint64_t, num_rd, stats->num_rd)
-        ctf_integer(uint64_t, num_rd_kb, stats->num_rd_kb)
-        ctf_integer(uint64_t, num_wr, stats->num_wr)
-        ctf_integer(uint64_t, num_wr_kb, stats->num_wr_kb)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_cct_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_cct_exit,
-    TP_ARGS(
-        rados_config_t, retval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_config_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_set_read_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        uint64_t, snapid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(uint64_t, snapid, snapid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_set_read_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_set_write_ctx_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        uint64_t, seq,
-        uint64_t*, snaps,
-        int, num_snaps),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(uint64_t, seq, seq)
-        ctf_sequence(uint64_t, snaps, snaps,
-                     uint32_t, num_snaps)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_set_write_ctx_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const void*, buf,
-        size_t, len,
-        uint64_t, off),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_sequence(unsigned char, buf, buf, size_t, len)
-        ctf_integer(uint64_t, off, off)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_append_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const void*, buf,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_sequence(unsigned char, buf, buf, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_append_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_full_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const void*, buf,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_sequence(unsigned char, buf, buf, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_full_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_clone_range_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, dst,
-        uint64_t, dst_off,
-        const char*, src,
-        uint64_t, src_off,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(dst, dst)
-        ctf_integer(uint64_t, dst_off, dst_off)
-        ctf_string(src, src)
-        ctf_integer(uint64_t, src_off, src_off)
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_clone_range_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_trunc_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        uint64_t, size),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, size, size)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_trunc_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_remove_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        void*, buf,
-        size_t, len,
-        uint64_t, off),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(void*, buf, buf)
-        ctf_integer(size_t, len, len)
-        ctf_integer(size_t, off, off)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_exit,
-    TP_ARGS(
-        int, retval,
-        void*, buf),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_sequence(unsigned char, buf, buf, uint64_t, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_get_last_version_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_get_last_version_exit,
-    TP_ARGS(
-        uint64_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint64_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_with_auid_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name,
-        uint64_t, auid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-        ctf_integer(uint64_t, auid, auid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_with_auid_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_with_crush_rule_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name,
-        uint8_t, crush_rule_num),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-        ctf_integer(uint8_t, crush_rule_num, crush_rule_num)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_with_crush_rule_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_with_all_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name,
-        uint64_t, auid,
-        uint8_t, crush_rule_num),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-        ctf_integer(uint64_t, auid, auid)
-        ctf_integer(uint8_t, crush_rule_num, crush_rule_num)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_create_with_all_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_delete_enter,
-    TP_ARGS(
-        rados_t, cluster,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, cluster, cluster)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_pool_delete_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_set_auid_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        uint64_t, auid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(uint64_t, auid, auid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_set_auid_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_get_auid_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_get_auid_exit,
-    TP_ARGS(
-        int, retval,
-        uint64_t, auid),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(uint64_t, auid, auid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_requires_alignment_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_requires_alignment_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_required_alignment_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_pool_required_alignment_exit,
-    TP_ARGS(
-        uint64_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint64_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_locator_set_key_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, key),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ceph_ctf_string(key, key)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_locator_set_key_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_set_namespace_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, nspace),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ceph_ctf_string(nspace, nspace)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_set_namespace_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_get_cluster_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_get_cluster_exit,
-    TP_ARGS(
-        rados_t, retval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_get_id_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_get_id_exit,
-    TP_ARGS(
-        int64_t, retval),
-    TP_FIELDS(
-        ctf_integer_hex(int64_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_get_pool_name_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        unsigned, maxlen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(unsigned, maxlen, maxlen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_get_pool_name_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_create_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, snapname),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(snapname, snapname)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_create_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_remove_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, snapname),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(snapname, snapname)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_rollback_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, snapname),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_string(snapname, snapname)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_rollback_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_create_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_create_exit,
-    TP_ARGS(
-        int, retval,
-        uint64_t, snapid),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(uint64_t, snapid, snapid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_remove_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        uint64_t, snapid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(uint64_t, snapid, snapid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_rollback_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        uint64_t, snapid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snapid, snapid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_selfmanaged_snap_rollback_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_list_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        int, maxlen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(int, maxlen, maxlen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_list_exit,
-    TP_ARGS(
-        int, retval,
-        rados_snap_t*, snaps,
-        int, num_snaps),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_sequence(rados_snap_t, snaps, snaps, uint32_t, num_snaps)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_lookup_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_lookup_exit,
-    TP_ARGS(
-        int, retval,
-        uint64_t, snapid),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(uint64_t, snapid, snapid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_get_name_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        uint64_t, snapid,
-        int, maxlen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(uint64_t, snapid, snapid)
-        ctf_integer(int, maxlen, maxlen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_get_name_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_get_stamp_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        uint64_t, snapid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer(uint64_t, snapid, snapid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_ioctx_snap_get_stamp_exit,
-    TP_ARGS(
-        int, retval,
-        time_t, time),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_time_t(time, time)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattr_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, aname,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_string(aname, aname)
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattr_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, value,
-        int, len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_sequence(unsigned char, value, value, uint64_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattrs_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattrs_exit,
-    TP_ARGS(
-        int, retval,
-        rados_xattrs_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_xattrs_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattrs_next_enter,
-    TP_ARGS(
-        rados_xattrs_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_xattrs_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattrs_next_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, aname,
-        const char*, value,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_string(aname, aname)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattrs_end_enter,
-    TP_ARGS(
-        rados_xattrs_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_xattrs_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_getxattrs_end_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_setxattr_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, aname,
-        const char*, value,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_string(aname, aname)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_setxattr_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_rmxattr_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, aname),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_string(aname, aname)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_rmxattr_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_stat_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_stat_exit,
-    TP_ARGS(
-        int, retval,
-        uint64_t*, size,
-        time_t*, mtime),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_integerp(uint64_t, size, size)
-        ceph_ctf_time_tp(mtime, mtime)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_update_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, cmdbuf,
-        size_t, cmdbuflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_sequence(unsigned char, cmdbuf, cmdbuf, size_t, CEPH_MIN(cmdbuflen, CEPH_TRACE_BUF_TRUNC_LEN))
-        ctf_integer(size_t, cmdbuflen, cmdbuflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_update_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_put_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, buf,
-        size_t, buflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_sequence(unsigned char, buf, buf, size_t, CEPH_MIN(buflen, CEPH_TRACE_BUF_TRUNC_LEN))
-        ctf_integer(size_t, buflen, buflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_put_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_get_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        size_t, buflen),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(size_t, buflen, buflen)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_get_exit,
-    TP_ARGS(
-        int, retval,
-        char*, buf,
-        int, len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_sequence(unsigned char, buf, buf, uint32_t, CEPH_MIN(len, CEPH_TRACE_BUF_TRUNC_LEN))
-        ctf_integer(int, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_to_omap_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        char, nullok),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(char, nullok, nullok)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_tmap_to_omap_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_exec_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, cls,
-        const char*, method,
-        const char*, inbuf,
-        size_t, in_len,
-        size_t, out_len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_string(cls, cls)
-        ctf_string(method, method)
-        ceph_ctf_sequence(unsigned char, inbuf, inbuf, size_t, in_len)
-        ctf_integer(size_t, out_len, out_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_exec_exit,
-    TP_ARGS(
-        int, retval,
-        char*, outbuf,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_sequence(unsigned char, outbuf, outbuf, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_open_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_open_exit,
-    TP_ARGS(
-        int, retval,
-        rados_list_ctx_t, listctx),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_list_ctx_t, listctx, listctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_close_enter,
-    TP_ARGS(
-        rados_list_ctx_t, listctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_list_ctx_t, listctx, listctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_close_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_seek_enter,
-    TP_ARGS(
-        rados_list_ctx_t, listctx,
-        uint32_t, pos),
-    TP_FIELDS(
-        ctf_integer_hex(rados_list_ctx_t, listctx, listctx)
-        ctf_integer(uint32_t, pos, pos)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_seek_exit,
-    TP_ARGS(
-        uint32_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint32_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_get_pg_hash_position_enter,
-    TP_ARGS(
-        rados_list_ctx_t, listctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_list_ctx_t, listctx, listctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_get_pg_hash_position_exit,
-    TP_ARGS(
-        uint32_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint32_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_next_enter,
-    TP_ARGS(
-        rados_list_ctx_t, listctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_list_ctx_t, listctx, listctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_objects_list_next_exit,
-    TP_ARGS(
-        int, retval,
-        const char*, entry,
-        char const* const*, key),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_string(entry, entry)
-        ceph_ctf_stringp(key, key)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_create_completion_enter,
-    TP_ARGS(
-        void*, cb_arg,
-        rados_callback_t, cb_complete,
-        rados_callback_t, cb_safe),
-    TP_FIELDS(
-        ctf_integer_hex(void*, cb_arg, cb_arg)
-        ctf_integer_hex(rados_callback_t, cb_complete, cb_complete)
-        ctf_integer_hex(rados_callback_t, cb_safe, cb_safe)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_create_completion_exit,
-    TP_ARGS(
-        int, retval,
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_complete_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_complete_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_safe_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_safe_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_complete_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_complete_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_safe_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_safe_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_complete_and_cb_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_complete_and_cb_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_safe_and_cb_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_wait_for_safe_and_cb_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_complete_and_cb_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_complete_and_cb_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_safe_and_cb_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_is_safe_and_cb_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_get_return_value_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_get_return_value_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_get_version_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_get_version_exit,
-    TP_ARGS(
-        uint64_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint64_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_release_enter,
-    TP_ARGS(
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_release_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_read_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        rados_completion_t, completion,
-        size_t, len,
-        uint64_t, off),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-        ctf_integer(size_t, len, len)
-        ctf_integer(uint64_t, off, off)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_read_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_write_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        rados_completion_t, completion,
-        const char*, buf,
-        size_t, len,
-        uint64_t, off),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-        ctf_sequence(unsigned char, buf, buf, size_t, CEPH_MIN(len, CEPH_TRACE_BUF_TRUNC_LEN))
-        ctf_integer(size_t, len, len)
-        ctf_integer(uint64_t, off, off)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_write_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_append_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        rados_completion_t, completion,
-        const char*, buf,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-        ctf_sequence(unsigned char, buf, buf, size_t, CEPH_MIN(len, CEPH_TRACE_BUF_TRUNC_LEN))
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_append_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_write_full_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        rados_completion_t, completion,
-        const char*, buf,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-        ctf_sequence(unsigned char, buf, buf, size_t, CEPH_MIN(len, CEPH_TRACE_BUF_TRUNC_LEN))
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_write_full_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_remove_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_flush_async_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_flush_async_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_flush_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_flush_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_stat_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        rados_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_stat_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_watch_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        uint64_t, version,
-        rados_watchcb_t, callback,
-        void*, arg),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, version, version)
-        ctf_integer_hex(rados_watchcb_t, callback, callback)
-        ctf_integer_hex(void*, arg, arg)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_watch_exit,
-    TP_ARGS(
-        int, retval,
-        uint64_t, handle),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(uint64_t, handle, handle)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_unwatch_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        uint64_t, handle),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, handle, handle)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_unwatch_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_notify_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        uint64_t, version,
-        const char*, buf,
-        int, buf_len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, version, version)
-        ceph_ctf_sequence(unsigned char, buf, buf, size_t, buf_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_notify_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_set_alloc_hint_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        uint64_t, expected_object_size,
-        uint64_t, expected_write_size),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, expected_object_size, expected_object_size)
-        ctf_integer(uint64_t, expected_write_size, expected_write_size)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_set_alloc_hint_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_lock_exclusive_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, name,
-        const char*, cookie,
-        const char*, description,
-        struct timeval*, duration,
-        uint8_t, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_string(name, name)
-        ceph_ctf_string(cookie, cookie)
-        ceph_ctf_string(description, description)
-        ceph_ctf_timevalp(duration, duration)
-        ctf_integer(uint8_t, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_lock_exclusive_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_lock_shared_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, name,
-        const char*, cookie,
-        const char*, tag,
-        const char*, description,
-        struct timeval*, duration,
-        uint8_t, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_string(name, name)
-        ceph_ctf_string(cookie, cookie)
-        ceph_ctf_string(tag, tag)
-        ceph_ctf_string(description, description)
-        ceph_ctf_timevalp(duration, duration)
-        ctf_integer(uint8_t, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_lock_shared_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_unlock_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, name,
-        const char*, cookie),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_string(name, name)
-        ceph_ctf_string(cookie, cookie)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_unlock_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_list_lockers_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, name,
-        size_t, tag_len,
-        size_t, clients_len,
-        size_t, cookies_len,
-        size_t, addrs_len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_string(name, name)
-        ctf_integer(size_t, tag_len, tag_len)
-        ctf_integer(size_t, clients_len, clients_len)
-        ctf_integer(size_t, cookies_len, cookies_len)
-        ctf_integer(size_t, addrs_len, addrs_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_list_lockers_locker,
-    TP_ARGS(
-        const char*, client,
-        const char*, cookie,
-        const char*, addr),
-    TP_FIELDS(
-        ctf_string(client, client)
-        ctf_string(cookie, cookie)
-        ctf_string(addr, addr)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_list_lockers_exit,
-    TP_ARGS(
-        int, retval,
-        int, exclusive,
-        const char*, tag,
-        size_t, tag_len,
-        size_t, clients_len,
-        size_t, cookies_len,
-        size_t, addrs_len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(int, exclusive, exclusive)
-        ctf_string(tag, tag)
-        ctf_integer(size_t, tag_len, tag_len)
-        ctf_integer(size_t, clients_len, clients_len)
-        ctf_integer(size_t, cookies_len, cookies_len)
-        ctf_integer(size_t, addrs_len, addrs_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_break_lock_enter,
-    TP_ARGS(
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        const char*, name,
-        const char*, client,
-        const char*, cookie),
-    TP_FIELDS(
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_string(name, name)
-        ceph_ctf_string(client, client)
-        ceph_ctf_string(cookie, cookie)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_break_lock_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create_write_op_enter,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_create_write_op_exit,
-    TP_ARGS(
-        rados_write_op_t, retval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_release_write_op_enter,
-    TP_ARGS(
-        rados_write_op_t, op),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_release_write_op_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_set_flags_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        int, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(int, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_set_flags_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_assert_exists_enter,
-    TP_ARGS(
-        rados_write_op_t, op),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_assert_exists_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_cmpxattr_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, aname,
-        uint8_t, comparison_operator,
-        const char*, value,
-        size_t, value_len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_string(aname, aname)
-        ctf_integer(uint8_t, comparison_operator, comparison_operator)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, value_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_cmpxattr_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_cmp_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, name,
-        uint8_t, comparison_operator,
-        const char*, value,
-        size_t, value_len,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_string(name, name)
-        ctf_integer(uint8_t, comparison_operator, comparison_operator)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, value_len)
-        ctf_integer_hex(int*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_cmp_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_setxattr_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, name,
-        const char*, value,
-        size_t, value_len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_string(name, name)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, value_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_setxattr_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_rmxattr_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, name),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_string(name, name)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_rmxattr_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_create_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        int, exclusive,
-        const char*, category),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(int, exclusive, exclusive)
-        ceph_ctf_string(category, category)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_create_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_write_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, buffer,
-        size_t, len,
-        uint64_t, offset),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_sequence(unsigned char, buffer, buffer, size_t, len)
-        ctf_integer(uint64_t, offset, offset)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_write_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_write_full_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, buffer,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_sequence(unsigned char, buffer, buffer, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_write_full_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_append_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, buffer,
-        size_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_sequence(unsigned char, buffer, buffer, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_append_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_remove_enter,
-    TP_ARGS(
-        rados_write_op_t, op),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_remove_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_truncate_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        uint64_t, offset),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(uint64_t, offset, offset)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_truncate_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_zero_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        uint64_t, offset,
-        uint64_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_zero_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_exec_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        const char*, cls,
-        const char*, method,
-        const char*, in_buf,
-        size_t, in_len,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ceph_ctf_string(cls, cls)
-        ceph_ctf_string(method, method)
-        ceph_ctf_sequence(unsigned char, in_buf, in_buf, size_t, in_len)
-        ctf_integer_hex(int*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_exec_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_set_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        size_t, num),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(size_t, num, num)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_set_entry,
-    TP_ARGS(
-        const char*, key,
-        const char*, value,
-        size_t, value_len),
-    TP_FIELDS(
-        ceph_ctf_string(key, key)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, value_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_set_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_rm_keys_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        size_t, num),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(size_t, num, num)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_rm_keys_entry,
-    TP_ARGS(
-        const char*, key),
-    TP_FIELDS(
-        ceph_ctf_string(key, key)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_rm_keys_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_clear_enter,
-    TP_ARGS(
-        rados_write_op_t, op),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_omap_clear_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_set_alloc_hint_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        uint64_t, expected_object_size,
-        uint64_t, expected_write_size),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer(uint64_t, expected_object_size, expected_object_size)
-        ctf_integer(uint64_t, expected_write_size, expected_write_size)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_set_alloc_hint_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_operate_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        rados_ioctx_t, ioctx,
-        const char*, oid,
-        time_t*, mtime,
-        int, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_string(oid, oid)
-        ceph_ctf_time_tp(mtime, mtime)
-        ctf_integer_hex(int, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_write_op_operate_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_write_op_operate_enter,
-    TP_ARGS(
-        rados_write_op_t, op,
-        rados_ioctx_t, ioctx,
-        rados_completion_t, completion,
-        const char*, oid,
-        time_t*, mtime,
-        int, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_write_op_t, op, op)
-        ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-        ctf_string(oid, oid)
-        ceph_ctf_time_tp(mtime, mtime)
-        ctf_integer_hex(int, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_write_op_operate_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_create_read_op_enter,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_create_read_op_exit,
-    TP_ARGS(
-        rados_read_op_t, retval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_release_read_op_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_release_read_op_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_set_flags_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        int, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer_hex(int, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_set_flags_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_assert_exists_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_assert_exists_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_cmpxattr_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        const char*, name,
-        uint8_t, comparison_operator,
-        const char*, value,
-        size_t, value_len),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_string(name, name)
-        ctf_integer(uint8_t, comparison_operator, comparison_operator)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, value_len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_cmpxattr_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_cmp_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        const char*, name,
-        uint8_t, comparison_operator,
-        const char*, value,
-        size_t, value_len,
-        void*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_string(name, name)
-        ctf_integer(uint8_t, comparison_operator, comparison_operator)
-        ceph_ctf_sequence(unsigned char, value, value, size_t, value_len)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_cmp_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_stat_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        void*, psize,
-        void*, pmtime,
-        void*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer_hex(void*, psize, psize)
-        ctf_integer_hex(void*, pmtime, pmtime)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_stat_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_read_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        uint64_t, offset,
-        size_t, len,
-        char*, buf,
-        size_t*, bytes_read,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(size_t, len, len)
-        ctf_integer_hex(void*, buf, buf)
-        ctf_integer_hex(void*, bytes_read, bytes_read)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_read_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_exec_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        const char*, cls,
-        const char*, method,
-        const char*, in_buf,
-        size_t, in_len,
-        char**, out_buf,
-        size_t*, out_len,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ceph_ctf_string(cls, cls)
-        ceph_ctf_string(method, method)
-        ceph_ctf_sequence(unsigned char, in_buf, in_buf, size_t, in_len)
-        ctf_integer_hex(void*, out_buf, out_buf)
-        ctf_integer_hex(void*, out_len, out_len)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_exec_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_exec_user_buf_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        const char*, cls,
-        const char*, method,
-        const char*, in_buf,
-        size_t, in_len,
-        char*, out_buf,
-        size_t, out_len,
-        size_t*, used_len,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ceph_ctf_string(cls, cls)
-        ceph_ctf_string(method, method)
-        ceph_ctf_sequence(unsigned char, in_buf, in_buf, size_t, in_len)
-        ctf_integer_hex(void*, out_buf, out_buf)
-        ctf_integer(size_t, out_len, out_len)
-        ctf_integer_hex(void*, used_len, used_len)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_exec_user_buf_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_getxattrs_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_getxattrs_exit,
-    TP_ARGS(
-        rados_xattrs_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_xattrs_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_get_vals_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        const char*, start_after,
-        const char*, filter_prefix,
-        uint64_t, max_return,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ceph_ctf_string(start_after, start_after)
-        ceph_ctf_string(filter_prefix, filter_prefix)
-        ctf_integer(uint64_t, max_return, max_return)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_get_vals_exit,
-    TP_ARGS(
-        rados_omap_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_omap_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_get_keys_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        const char*, start_after,
-        uint64_t, max_return,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ceph_ctf_string(start_after, start_after)
-        ctf_integer(uint64_t, max_return, max_return)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_get_keys_exit,
-    TP_ARGS(
-        rados_omap_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_omap_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_get_vals_by_keys_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        char const* const*, keys,
-        size_t, keys_len,
-        rados_omap_iter_t*, piter,
-        int*, prval),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer_hex(void*, keys, keys)
-        ctf_integer(size_t, keys_len, keys_len)
-        ctf_integer_hex(void*, piter, piter)
-        ctf_integer_hex(void*, prval, prval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_omap_get_vals_by_keys_exit,
-    TP_ARGS(
-        rados_omap_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_omap_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_omap_get_next_enter,
-    TP_ARGS(
-        rados_omap_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_omap_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_omap_get_next_exit,
-    TP_ARGS(
-        int, retval,
-        char**, key,
-        char**, val,
-        size_t*, len),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ceph_ctf_stringp(key, key)
-        ceph_ctf_sequencep(unsigned char, val, val, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_omap_get_end_enter,
-    TP_ARGS(
-        rados_omap_iter_t, iter),
-    TP_FIELDS(
-        ctf_integer_hex(rados_omap_iter_t, iter, iter)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_omap_get_end_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_operate_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        rados_ioctx_t, ctx,
-        const char*, oid,
-        int, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer_hex(rados_ioctx_t, ctx, ctx)
-        ctf_string(oid, oid)
-        ctf_integer(int, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_read_op_operate_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_read_op_operate_enter,
-    TP_ARGS(
-        rados_read_op_t, read_op,
-        rados_ioctx_t, ctx,
-        rados_completion_t, completion,
-        const char*, oid,
-        int, flags),
-    TP_FIELDS(
-        ctf_integer_hex(rados_read_op_t, read_op, read_op)
-        ctf_integer_hex(rados_ioctx_t, ctx, ctx)
-        ctf_integer_hex(rados_completion_t, completion, completion)
-        ceph_ctf_string(oid, oid)
-        ctf_integer(int, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(librados, rados_aio_read_op_operate_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
diff --git a/src/tracing/librbd.tp b/src/tracing/librbd.tp
deleted file mode 100644
index 7124637..0000000
--- a/src/tracing/librbd.tp
+++ /dev/null
@@ -1,546 +0,0 @@
-#include "tracing/tracing-common.h"
-#include "include/rbd/librbd.h"
-
-TRACEPOINT_EVENT(librbd, read_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, offset,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, read_exit,
-    TP_ARGS(
-        ssize_t, retval),
-    TP_FIELDS(
-        ctf_integer(ssize_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, write_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, off,
-        size_t, len,
-        const char*, buf),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, off, off)
-        ceph_ctf_sequence(unsigned char, buf, buf, size_t, len)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, write_exit,
-    TP_ARGS(
-        ssize_t, retval),
-    TP_FIELDS(
-        ctf_integer(ssize_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, open_image_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, id,
-        const char*, snap_name,
-        int, read_only),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(id, id)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(uint8_t, read_only, read_only ? 1 : 0)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, open_image_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, close_image_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, id),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(id, id)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, close_image_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(librbd, create_enter,
-    TP_ARGS(
-        const char*, pool_name,
-        int64_t, id,
-        const char*, imgname,
-        uint64_t, size,
-        int, order),
-    TP_FIELDS(
-        ctf_string(pool_name, pool_name)
-        ctf_integer(int64_t, id, id)
-        ctf_string(imgname, imgname)
-        ctf_integer(uint64_t, size, size)
-        ctf_integer(int, order, order)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, create_exit,
-    TP_ARGS(
-        int, retval,
-        int, order),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(int, order, order)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, create2_enter,
-    TP_ARGS(
-        const char*, pool_name,
-        int64_t, id,
-        const char*, imgname,
-        uint64_t, size,
-        uint64_t, features,
-        int, order),
-    TP_FIELDS(
-        ctf_string(pool_name, pool_name)
-        ctf_integer(int64_t, id, id)
-        ctf_string(imgname, imgname)
-        ctf_integer(uint64_t, size, size)
-        ctf_integer(uint64_t, features, features)
-        ctf_integer(int, order, order)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, create2_exit,
-    TP_ARGS(
-        int, retval,
-        int, order),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(int, order, order)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, create3_enter,
-    TP_ARGS(
-        const char*, pool_name,
-        int64_t, id,
-        const char*, imgname,
-        uint64_t, size,
-        uint64_t, features,
-        int, order,
-        uint64_t, stripe_unit,
-        uint64_t, stripe_count),
-    TP_FIELDS(
-        ctf_string(pool_name, pool_name)
-        ctf_integer(int64_t, id, id)
-        ctf_string(imgname, imgname)
-        ctf_integer(uint64_t, size, size)
-        ctf_integer(uint64_t, features, features)
-        ctf_integer(int, order, order)
-        ctf_integer(uint64_t, stripe_unit, stripe_unit)
-        ctf_integer(uint64_t, stripe_count, stripe_count)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, create3_exit,
-    TP_ARGS(
-        int, retval,
-        int, order),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-        ctf_integer(int, order, order)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, remove_enter,
-    TP_ARGS(
-        const char*, pool_name,
-        int64_t, id,
-        const char*, imgname),
-    TP_FIELDS(
-        ctf_string(pool_name, pool_name)
-        ctf_integer(int64_t, id, id)
-        ctf_string(imgname, imgname)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_write_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, off,
-        size_t, len,
-        const char*, buf,
-        const void*, completion),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, off, off)
-        ctf_integer(size_t, len, len)
-        ceph_ctf_sequence(unsigned char, buf, buf, size_t, len)
-        ctf_integer_hex(const void*, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_write_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_read_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, offset,
-        uint64_t, length,
-        const char*, buf,
-        const void*, completion),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer_hex(const void*, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_read_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_discard_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, off,
-        uint64_t, len,
-        void*, completion),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, off, off)
-        ctf_integer(uint64_t, len, len)
-        ctf_integer_hex(void*, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_discard_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, invalidate_cache_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, invalidate_cache_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, flush_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, flush_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_flush_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        const void*, completion),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer_hex(const void*, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_flush_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, copy_enter,
-    TP_ARGS(
-        void*, src_imagectx,
-        const char*, src_name,
-        const char*, src_snap_name,
-        char, src_read_only,
-        const char*, dst_name),
-    TP_FIELDS(
-        ctf_integer_hex(void*, src_imagectx, src_imagectx)
-        ctf_string(src_name, src_name)
-        ctf_string(src_snap_name, src_snap_name)
-        ctf_integer(char, src_read_only, src_read_only)
-        ctf_string(dst_name, dst_name)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, copy_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, copy2_enter,
-    TP_ARGS(
-        void*, src_imagectx,
-        const char*, src_name,
-        const char*, src_snap_name,
-        char, src_read_only,
-        void*, dst_imagectx,
-        const char*, dst_name,
-        const char*, dst_snap_name,
-        char, dst_read_only),
-    TP_FIELDS(
-        ctf_integer_hex(void*, src_imagectx, src_imagectx)
-        ctf_string(src_name, src_name)
-        ctf_string(src_snap_name, src_snap_name)
-        ctf_integer(char, src_read_only, src_read_only)
-        ctf_integer_hex(void*, dst_imagectx, dst_imagectx)
-        ctf_string(dst_name, dst_name)
-        ctf_string(dst_snap_name, dst_snap_name)
-        ctf_integer(char, dst_read_only, dst_read_only)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, copy2_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, resize_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, size),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, size, size)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, resize_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, rename_enter,
-    TP_ARGS(
-        const char*, pool_name,
-        uint64_t, id,
-        const char*, srcname,
-        const char*, dstname),
-    TP_FIELDS(
-        ctf_string(pool_name, pool_name)
-        ctf_integer(uint64_t, id, id)
-        ctf_string(srcname, srcname)
-        ctf_string(dstname, dstname)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, rename_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, discard_enter,
-    TP_ARGS(
-        void*, imagectx,
-        const char*, name,
-        const char*, snap_name,
-        char, read_only,
-        uint64_t, off,
-        uint64_t, len),
-    TP_FIELDS(
-        ctf_integer_hex(void*, imagectx, imagectx)
-        ctf_string(name, name)
-        ctf_string(snap_name, snap_name)
-        ctf_integer(char, read_only, read_only)
-        ctf_integer(uint64_t, off, off)
-        ctf_integer(uint64_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, discard_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_is_complete_enter,
-    TP_ARGS(
-        rbd_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rbd_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_is_complete_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_get_return_value_enter,
-    TP_ARGS(
-        rbd_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rbd_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_get_return_value_exit,
-    TP_ARGS(
-        ssize_t, retval),
-    TP_FIELDS(
-        ctf_integer(ssize_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_wait_for_complete_enter,
-    TP_ARGS(
-        rbd_completion_t, completion),
-    TP_FIELDS(
-        ctf_integer_hex(rbd_completion_t, completion, completion)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_wait_for_complete_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_complete_enter,
-    TP_ARGS(
-        rbd_completion_t, completion,
-        ssize_t, rval),
-    TP_FIELDS(
-        ctf_integer_hex(rbd_completion_t, completion, completion)
-        ctf_integer(ssize_t, rval, rval)
-    )
-)
-
-TRACEPOINT_EVENT(librbd, aio_complete_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
diff --git a/src/tracing/objectstore.tp b/src/tracing/objectstore.tp
deleted file mode 100644
index 9c3c45f..0000000
--- a/src/tracing/objectstore.tp
+++ /dev/null
@@ -1,782 +0,0 @@
-TRACEPOINT_EVENT(objectstore, exists_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, exists_exit,
-    TP_ARGS(
-       uint8_t, retval),
-    TP_FIELDS(
-        ctf_integer(uint8_t, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, stat_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, stat_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, read_enter,
-    TP_ARGS(
-        const char *, coll_name,
-        uint64_t,     offset,
-        size_t,     len),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, read_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, fiemap_enter,
-    TP_ARGS(
-        const char *, coll_name,
-        uint64_t,     offset,
-        size_t,     len),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(size_t, len, len)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, fiemap_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, getattr_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, getattr_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, getattrs_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, getattrs_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, list_collections_enter,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(objectstore, list_collections_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_stat_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_stat_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_exists_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_exists_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_empty_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_empty_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_list_range_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_list_range_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_list_partial_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_list_partial_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_list_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, collection_list_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_header_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_header_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_keys_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_keys_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_values_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_get_values_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_check_keys_enter,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_check_keys_exit,
-    TP_ARGS(
-       int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, get_omap_iterator,
-    TP_ARGS(
-        const char *, coll_name),
-    TP_FIELDS(
-        ctf_string(coll_name, coll_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, write_enter,
-    TP_ARGS(
-        const char *, osr_name,
-        uint64_t, offset,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, write_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, setallochint_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, setallochint_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, split_coll_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, split_coll_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, split_coll2_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, split_coll2_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_setheader_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_setheader_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_rmkeyrange_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_rmkeyrange_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_rmkeys_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_rmkeys_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_setkeys_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_setkeys_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_clear_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, omap_clear_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_rename_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_rename_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, startsync_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, startsync_exit,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(objectstore, coll_rmattr_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_rmattr_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_setattr_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_setattr_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_move_enter,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(objectstore, coll_move_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_move_rename_enter,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(objectstore, coll_move_rename_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_remove_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, coll_add_enter,
-    TP_ARGS(),
-    TP_FIELDS()
-)
-
-TRACEPOINT_EVENT(objectstore, coll_add_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, rmcoll_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, rmcoll_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, mkcoll_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, mkcoll_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, clone_range2_enter,
-    TP_ARGS(
-        const char *, osr_name,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, clone_range2_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, clone_range_enter,
-    TP_ARGS(
-        const char *, osr_name,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, clone_range_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, clone_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, clone_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, rmattrs_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, rmattrs_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, rmattr_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, rmattr_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, setattrs_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, setattrs_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, setattr_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, setattr_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, remove_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, remove_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, truncate_enter,
-    TP_ARGS(
-        const char *, osr_name,
-        uint64_t, offset),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-        ctf_integer(uint64_t, offset, offset)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, truncate_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, zero_enter,
-    TP_ARGS(
-        const char *, osr_name,
-        uint64_t, offset,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, zero_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, touch_enter,
-    TP_ARGS(
-        const char *, osr_name),
-    TP_FIELDS(
-        ctf_string(osr_name, osr_name)
-    )
-)
-
-TRACEPOINT_EVENT(objectstore, touch_exit,
-    TP_ARGS(
-        int, retval),
-    TP_FIELDS(
-        ctf_integer(int, retval, retval)
-    )
-)
diff --git a/src/tracing/oprequest.tp b/src/tracing/oprequest.tp
deleted file mode 100644
index 4db3030..0000000
--- a/src/tracing/oprequest.tp
+++ /dev/null
@@ -1,45 +0,0 @@
-TRACEPOINT_EVENT(oprequest, set_rmw_flags,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc,
-        int,      flag,
-        int,      old_rmw_flags,
-        int,      new_rmw_flags),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-        ctf_integer_hex(int, flag, flag)
-        ctf_integer_hex(int, old_rmw_flags, old_rmw_flags)
-        ctf_integer_hex(int, new_rmw_flags, new_rmw_flags)
-    )
-)
-
-TRACEPOINT_EVENT(oprequest, mark_flag_point,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc,
-        int,      rmw_flags,
-        uint8_t,  flag,
-        const char*,    msg,
-        uint8_t,  old_hit_flag_points,
-        uint8_t,  new_hit_flag_points),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-        ctf_integer_hex(int, rmw_flags, rmw_flags)
-        ctf_integer_hex(uint8_t, flag, flag)
-        ctf_string(msg, msg)
-        ctf_integer_hex(uint8_t, old_hit_flag_points, old_hit_flag_points)
-        ctf_integer_hex(uint8_t, new_hit_flag_points, new_hit_flag_points)
-    )
-)
diff --git a/src/tracing/osd.tp b/src/tracing/osd.tp
deleted file mode 100644
index 50ca23c..0000000
--- a/src/tracing/osd.tp
+++ /dev/null
@@ -1,756 +0,0 @@
-TRACEPOINT_EVENT(osd, prepare_tx_enter,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-    )
-)
-
-TRACEPOINT_EVENT(osd, prepare_tx_exit,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-    )
-)
-
-TRACEPOINT_EVENT(osd, ms_fast_dispatch,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-    )
-)
-
-TRACEPOINT_EVENT(osd, opwq_process_start,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-    )
-)
-
-TRACEPOINT_EVENT(osd, opwq_process_finish,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint16_t, op,
-        const char*, opname,
-        uint32_t, flags),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer_hex(uint16_t, op, op)
-        ctf_string(opname, opname)
-        ctf_integer_hex(uint32_t, flags, flags)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_read,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, osize,
-        uint32_t, oseq,
-        uint64_t, offset,
-        uint64_t, length,
-        uint64_t, truncate_size,
-        uint32_t, truncate_seq),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, osize, osize)
-        ctf_integer(uint32_t, oseq, oseq)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer(uint64_t, truncate_size, truncate_size)
-        ctf_integer(uint32_t, truncate_seq, truncate_seq)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_mapext,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, offset,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_sparse_read,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, osize,
-        uint32_t, oseq,
-        uint64_t, offset,
-        uint64_t, length,
-        uint64_t, truncate_size,
-        uint32_t, truncate_seq),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, osize, osize)
-        ctf_integer(uint32_t, oseq, oseq)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer(uint64_t, truncate_size, truncate_size)
-        ctf_integer(uint32_t, truncate_seq, truncate_seq)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_call,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, class_name,
-        const char*, method_name),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(class_name, class_name)
-        ctf_string(method_name, method_name)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_stat,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_isdirty,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_undirty,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_try_flush,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_cache_flush,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_cache_evict,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_getxattr,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, aname),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(aname, aname)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_getxattrs,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_cmpxattr,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, aname),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(aname, aname)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_assert_ver,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, ver),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, ver, ver)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_list_watchers,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_list_snaps,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_assert_src_version,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, ver),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, ver, ver)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_notify,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, timeout),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, timeout, timeout)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_notify_ack,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, notify_id,
-        uint64_t, watch_cookie,
-        const char*, watch_cookie_valid),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, notify_id, notify_id)
-        ctf_integer(uint64_t, watch_cookie, watch_cookie)
-        ctf_string(watch_cookie_valid, watch_cookie_valid)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_setallochint,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, expected_object_size,
-        uint64_t, expected_write_size),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, expected_object_size, expected_object_size)
-        ctf_integer(uint64_t, expected_write_size, expected_write_size)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_write,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, osize,
-        uint32_t, oseq,
-        uint64_t, offset,
-        uint64_t, length,
-        uint64_t, truncate_size,
-        uint32_t, truncate_seq),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, osize, osize)
-        ctf_integer(uint32_t, oseq, oseq)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer(uint64_t, truncate_size, truncate_size)
-        ctf_integer(uint32_t, truncate_seq, truncate_seq)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_writefull,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, osize,
-        uint64_t, offset,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, osize, osize)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_rollback,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_zero,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, offset,
-        uint64_t, length),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_create,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_truncate,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, osize,
-        uint32_t, oseq,
-        uint64_t, offset,
-        uint64_t, length,
-        uint64_t, truncate_size,
-        uint32_t, truncate_seq),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, osize, osize)
-        ctf_integer(uint32_t, oseq, oseq)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer(uint64_t, truncate_size, truncate_size)
-        ctf_integer(uint32_t, truncate_seq, truncate_seq)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_delete,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_clonerange,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, offset,
-        uint64_t, length,
-        uint64_t, src_offset),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer(uint64_t, src_offset, src_offset)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_watch,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, cookie,
-        uint8_t, flag),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, cookie, cookie)
-        ctf_integer(uint8_t, flag, flag)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_setxattr,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, aname),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(aname, aname)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_rmxattr,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, aname),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(aname, aname)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_append,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint64_t, osize,
-        uint32_t, oseq,
-        uint64_t, offset,
-        uint64_t, length,
-        uint64_t, truncate_size,
-        uint32_t, truncate_seq),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer(uint64_t, osize, osize)
-        ctf_integer(uint32_t, oseq, oseq)
-        ctf_integer(uint64_t, offset, offset)
-        ctf_integer(uint64_t, length, length)
-        ctf_integer(uint64_t, truncate_size, truncate_size)
-        ctf_integer(uint32_t, truncate_seq, truncate_seq)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_startsync,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_tmapget,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_tmapput,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_tmapup,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_tmap2omap,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapgetkeys,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, start_after,
-        uint64_t, max_return),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(start_after, start_after)
-        ctf_integer(uint64_t, max_return, max_return)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapgetvals,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, start_after,
-        uint64_t, max_return,
-        const char*, filter_prefix),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(start_after, start_after)
-        ctf_integer(uint64_t, max_return, max_return)
-        ctf_string(filter_prefix, filter_prefix)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapgetheader,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapgetvalsbykeys,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, keys),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(keys, keys)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omap_cmp,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, keys),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(keys, keys)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapsetvals,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, keys),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(keys, keys)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapsetheader,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omapclear,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_omaprmkeys,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, keys),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(keys, keys)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_copy_get_classic,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_copy_get,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_copy_from,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        const char*, src_name,
-        int64_t, src_pool,
-        const char*, src_key,
-        const char*, src_nspace,
-        int64_t, src_hash,
-        uint64_t, src_snapid,
-        uint64_t, src_version),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_string(src_name, src_name)
-        ctf_integer(int64_t, src_pool, src_pool)
-        ctf_string(src_key, src_key)
-        ctf_string(src_nspace, src_nspace)
-        ctf_integer(int64_t, src_hash, src_hash)
-        ctf_integer(uint64_t, src_snapid, src_snapid)
-        ctf_integer(uint64_t, src_version, src_version)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_pre_unknown,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint16_t, op,
-        const char*, opname),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer_hex(uint16_t, op, op)
-        ctf_string(opname, opname)
-    )
-)
-
-TRACEPOINT_EVENT(osd, do_osd_op_post,
-    TP_ARGS(
-        const char*, oid,
-        uint64_t, snap,
-        uint16_t, op,
-        const char*, opname,
-        uint32_t, flags,
-        int, result),
-    TP_FIELDS(
-        ctf_string(oid, oid)
-        ctf_integer(uint64_t, snap, snap)
-        ctf_integer_hex(uint16_t, op, op)
-        ctf_string(opname, opname)
-        ctf_integer_hex(uint32_t, flags, flags)
-        ctf_integer_hex(int, result, result)
-    )
-)
diff --git a/src/tracing/pg.tp b/src/tracing/pg.tp
deleted file mode 100644
index ce14740..0000000
--- a/src/tracing/pg.tp
+++ /dev/null
@@ -1,16 +0,0 @@
-TRACEPOINT_EVENT(pg, queue_op,
-    TP_ARGS(
-        // osd_reqid_t
-        uint8_t,  type,
-        int64_t,  num,
-        uint64_t, tid,
-        int32_t,  inc,
-        int,      rmw_flags),
-    TP_FIELDS(
-        ctf_integer(uint8_t, type, type)
-        ctf_integer(int64_t, num, num)
-        ctf_integer(uint64_t, tid, tid)
-        ctf_integer(int32_t, inc, inc)
-        ctf_integer(int, rmw_flags, rmw_flags)
-    )
-)
diff --git a/src/tracing/tracing-common.h b/src/tracing/tracing-common.h
deleted file mode 100644
index 2ab1b76..0000000
--- a/src/tracing/tracing-common.h
+++ /dev/null
@@ -1,96 +0,0 @@
-#if !defined(TRACING_COMMON_H)
-#define TRACING_COMMON_H
-
-// Amount of buffer data to dump when using ceph_ctf_sequence or ceph_ctf_sequencep.
-// If 0, then *_data field is omitted entirely.
-#if !defined(CEPH_TRACE_BUF_TRUNC_LEN)
-#define CEPH_TRACE_BUF_TRUNC_LEN 0
-#endif
-
-// TODO: This is GCC-specific.  Replace CEPH_MAX and CEPH_MIN with standard macros, if possible.
-#define CEPH_MAX(a,b) \
-   ({ __typeof__ (a) _a = (a); \
-       __typeof__ (b) _b = (b); \
-     _a > _b ? _a : _b; })
-
-#define CEPH_MIN(a,b) \
-   ({ __typeof__ (a) _a = (a); \
-       __typeof__ (b) _b = (b); \
-     _a < _b ? _a : _b; })
-
-// type should be an integer type
-// val should have type type*
-#define ceph_ctf_integerp(type, field, val) \
-    ctf_integer(type, field, (val) == NULL ? 0 : (val)) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL)
-
-// val should have type char*
-#define ceph_ctf_string(field, val) \
-    ctf_string(field, (val) == NULL ? "" : (val)) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL)
-
-// val should have type char**
-#define ceph_ctf_stringp(field, val) \
-    ctf_string(field, ((val) == NULL || *(val) == NULL) ? "" : *(val)) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
-    ctf_integer(uint8_t, field##_data_isnull, (val) == NULL || *(val) == NULL)
-
-// val should have type type*
-// lenval should have type lentype
-#if CEPH_TRACE_BUF_TRUNC_LEN > 0
-#define ceph_ctf_sequence(type, field, val, lentype, lenval) \
-    ctf_integer_hex(void*, field, val) \
-    ctf_sequence(type, field##_data, (val) == NULL ? "" : (val), lentype, (val) == NULL ? 0 : CEPH_MIN((lenval), CEPH_TRACE_BUF_TRUNC_LEN)) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
-    ctf_integer(lentype, field##_len, lenval)
-#else
-#define ceph_ctf_sequence(type, field, val, lentype, lenval) \
-    ctf_integer_hex(void*, field, val) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
-    ctf_integer(lentype, field##_len, lenval)
-#endif
-
-// val should have type type**
-// lenval should have type lentype*
-#if CEPH_TRACE_BUF_TRUNC_LEN > 0
-#define ceph_ctf_sequencep(type, field, val, lentype, lenval) \
-    ctf_integer_hex(void*, field, val) \
-    ctf_sequence(type, \
-                 field##_data, \
-                 ((val) == NULL || *(val) == NULL) ? "" : *(val), \
-                 lentype, \
-                 ((val) == NULL || *(val) == NULL || (lenval) == NULL) ? 0 : CEPH_MIN(*(lenval), CEPH_TRACE_BUF_TRUNC_LEN)) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
-    ctf_integer(uint8_t, field##_data_isnull, ((val) == NULL || *(val) == NULL)) \
-    ctf_integer(lentype, field##_len, (lenval) == NULL ? 0 : *(lenval)) \
-    ctf_integer(lentype, field##_len_isnull, (lenval) == NULL)
-#else
-#define ceph_ctf_sequencep(type, field, val, lentype, lenval) \
-    ctf_integer_hex(void*, field, val) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
-    ctf_integer(uint8_t, field##_data_isnull, ((val) == NULL || *(val) == NULL)) \
-    ctf_integer(lentype, field##_len, (lenval) == NULL ? 0 : *(lenval)) \
-    ctf_integer(lentype, field##_len_isnull, (lenval) == NULL)
-#endif
-
-// p should be of type struct timeval*
-#define ceph_ctf_timevalp(field, p) \
-    ctf_integer(long int, field##_sec, (p) == NULL ? 0 : (p)->tv_sec) \
-    ctf_integer(long int, field##_usec, (p) == NULL ? 0 : (p)->tv_usec) \
-    ctf_integer(uint8_t, field##_isnull, (p) == NULL)
-
-// val should be of type time_t
-// Currently assumes that time_t is an integer and no more than 64 bits wide.
-// This is verified by the configure script.
-#define ceph_ctf_time_t(field, val) \
-    ctf_integer(uint64_t, field, (uint64_t)(val))
-
-// val should be of type time_t*
-// Currently assumes that time_t is an integer and no more than 64 bits wide.
-// This is verified by the configure script.
-#define ceph_ctf_time_tp(field, val) \
-    ctf_integer(uint64_t, field, (val) == NULL ? 0 : (uint64_t)(*val)) \
-    ctf_integer(uint8_t, field##_isnull, (val) == NULL)
-
-
-#endif /* TRACING_COMMON_H */
diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf
index d0205ee..7175c2d 100644
--- a/src/upstart/ceph-osd.conf
+++ b/src/upstart/ceph-osd.conf
@@ -6,7 +6,7 @@ stop on runlevel [!2345] or stopping ceph-osd-all
 respawn
 respawn limit 5 30
 
-limit nofile 327680 327680
+limit nofile 32768 32768
 
 pre-start script
     set -e
@@ -15,7 +15,36 @@ pre-start script
 
     install -d -m0755 /var/run/ceph
 
-    /usr/libexec/ceph/ceph-osd-prestart.sh --cluster="${cluster:-ceph}" -i "$id"
+    update="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_update_on_start || :)"
+    if [ "${update:-1}" = "1" -o "${update:-1}" = "true" ]; then
+        # update location in crush
+	hook="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_location_hook || :)"
+	if [ -z "$hook" ]; then
+	    hook="/usr/bin/ceph-crush-location"
+	fi
+	location="$($hook --cluster ${cluster:-ceph} --id $id --type osd)"
+	weight="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_initial_weight || :)"
+	defaultweight=`df -P -k /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'`
+	ceph \
+            --cluster="${cluster:-ceph}" \
+            --name="osd.$id" \
+            --keyring="/var/lib/ceph/osd/${cluster:-ceph}-$id/keyring" \
+            osd crush create-or-move \
+	    -- \
+            "$id" \
+	    "${weight:-${defaultweight:-1}}" \
+	    $location
+    fi
+
+    journal="/var/lib/ceph/osd/${cluster:-ceph}-$id/journal"
+    if [ -L "$journal" -a ! -e "$journal" ]; then
+        udevadm settle --timeout=5 || :
+	if [ -L "$journal" -a ! -e "$journal" ]; then
+            echo "ceph-osd($UPSTART_INSTANCE): journal not present, not starting yet." 1>&2
+	    stop
+	    exit 0
+	fi
+    fi
 end script
 
 instance ${cluster:-ceph}/$id
diff --git a/src/vstart.sh b/src/vstart.sh
index ffd6b20..5349c49 100755
--- a/src/vstart.sh
+++ b/src/vstart.sh
@@ -14,11 +14,11 @@ set -e
 [ -z "$CEPH_NUM_RGW" ] && CEPH_NUM_RGW="$RGW"
 
 [ -z "$CEPH_NUM_MON" ] && CEPH_NUM_MON=3
-[ -z "$CEPH_NUM_OSD" ] && CEPH_NUM_OSD=3
+[ -z "$CEPH_NUM_OSD" ] && CEPH_NUM_OSD=1
 [ -z "$CEPH_NUM_MDS" ] && CEPH_NUM_MDS=3
 [ -z "$CEPH_NUM_RGW" ] && CEPH_NUM_RGW=1
 
-[ -z "$CEPH_DIR" ] && CEPH_DIR="$PWD"
+[ -z "$CEPH_DIR" ] && CEPH_DIR="$PWD/"
 [ -z "$CEPH_DEV_DIR" ] && CEPH_DEV_DIR="$CEPH_DIR/dev"
 [ -z "$CEPH_OUT_DIR" ] && CEPH_OUT_DIR="$CEPH_DIR/out"
 [ -z "$CEPH_RGW_PORT" ] && CEPH_RGW_PORT=8000
@@ -35,17 +35,16 @@ start_rgw=0
 ip=""
 nodaemon=0
 smallmds=0
-ec=0
 hitset=""
 overwrite_conf=1
 cephx=1 #turn cephx on by default
 cache=""
 memstore=0
-journal=1
 
 MON_ADDR=""
 
-conf_fn="$CEPH_DIR/ceph.conf"
+conf="$CEPH_DIR/ceph.conf"
+
 keyring_fn="$CEPH_DIR/keyring"
 osdmap_fn="/tmp/ceph_osdmap.$$"
 monmap_fn="/tmp/ceph_monmap.$$"
@@ -66,10 +65,7 @@ usage=$usage"\t-k keep old configuration files\n"
 usage=$usage"\t-x enable cephx (on by default)\n"
 usage=$usage"\t-X disable cephx\n"
 usage=$usage"\t--hitset <pool> <hit_set_type>: enable hitset tracking\n"
-usage=$usage"\t-e : create an erasure pool\n";
 usage=$usage"\t-o config\t\t add extra config parameters to mds section\n"
-usage=$usage"\t-J no journal\t\tdisable filestore journal\n"
-
 
 usage_exit() {
 	printf "$usage"
@@ -95,9 +91,6 @@ case $1 in
     -r )
 	    start_rgw=1
 	    ;;
-    -e )
-	    ec=1
-	    ;;
     --new | -n )
 	    new=1
 	    ;;
@@ -150,9 +143,6 @@ case $1 in
     -X )
 	    cephx=0
 	    ;;
-    -J )
-	    journal=0
-	    ;;
     -k )
 	    overwrite_conf=0
 	    ;;
@@ -189,7 +179,7 @@ if [ "$start_all" -eq 1 ]; then
 	start_osd=1
 fi
 
-ARGS="-c $conf_fn"
+ARGS="-c $conf"
 
 run() {
     type=$1
@@ -234,7 +224,6 @@ else
         debug monc = 20
         debug journal = 20
         debug filestore = 20
-        debug rgw = 20
         debug objclass = 20'
     CMDSDEBUG='
         debug ms = 1
@@ -298,9 +287,9 @@ echo "ip $IP"
 
 
 if [ "$cephx" -eq 1 ]; then
-    CEPH_ADM="$CEPH_BIN/ceph -c $conf_fn -k $keyring_fn"
+    CEPH_ADM="$CEPH_BIN/ceph -c $conf -k $keyring_fn"
 else
-    CEPH_ADM="$CEPH_BIN/ceph -c $conf_fn"
+    CEPH_ADM="$CEPH_BIN/ceph -c $conf"
 fi
 
 MONS=""
@@ -330,7 +319,7 @@ if [ "$start_mon" -eq 1 ]; then
 
 	if [ "$new" -eq 1 ]; then
 		if [ $overwrite_conf -eq 1 ]; then
-		        cat <<EOF > $conf_fn
+		        cat <<EOF > $conf
 ; generated by vstart.sh on `date`
 [global]
         fsid = $(uuidgen)
@@ -340,32 +329,24 @@ if [ "$start_mon" -eq 1 ]; then
         osd pool default min size = 1
         osd pool default erasure code directory = .libs
         osd pool default erasure code profile = plugin=jerasure technique=reed_sol_van k=2 m=1 ruleset-failure-domain=osd
-        rgw frontends = fastcgi, civetweb port=$CEPH_RGW_PORT
-        filestore fd cache size = 32
         run dir = $CEPH_OUT_DIR
 EOF
 if [ "$cephx" -eq 1 ] ; then
-cat <<EOF >> $conf_fn
+cat <<EOF >> $conf
         auth supported = cephx
 EOF
 else
-cat <<EOF >> $conf_fn
+cat <<EOF >> $conf
 	auth cluster required = none
 	auth service required = none
 	auth client required = none
 EOF
 fi
-                        if [ $journal -eq 1 ]; then
-			    journal_path="$CEPH_DEV_DIR/osd\$id.journal"
-			else
-			    journal_path=""
-			fi
-			cat <<EOF >> $conf_fn
+			cat <<EOF >> $conf
 
 [client]
         keyring = $keyring_fn
         log file = $CEPH_OUT_DIR/\$name.\$pid.log
-        admin socket = $CEPH_OUT_DIR/\$name.\$pid.asok
 
 [mds]
 $DAEMONOPTS
@@ -378,25 +359,18 @@ $extra_conf
 [osd]
 $DAEMONOPTS
         osd data = $CEPH_DEV_DIR/osd\$id
-        osd journal = $journal_path
+        osd journal = $CEPH_DEV_DIR/osd\$id.journal
         osd journal size = 100
         osd class tmp = out
         osd class dir = .libs
         osd scrub load threshold = 5.0
         osd debug op order = true
-        filestore wbthrottle xfs ios start flusher = 10
-        filestore wbthrottle xfs ios hard limit = 20
-        filestore wbthrottle xfs inodes hard limit = 30
-        filestore wbthrottle btrfs ios start flusher = 10
-        filestore wbthrottle btrfs ios hard limit = 20
-        filestore wbthrottle btrfs inodes hard limit = 30
 $COSDDEBUG
 $COSDMEMSTORE
 $extra_conf
 [mon]
         mon pg warn min per osd = 10
         mon osd allow primary affinity = true
-        mon reweight min pgs per osd = 4
 $DAEMONOPTS
 $CMONDEBUG
 $extra_conf
@@ -429,7 +403,7 @@ EOF
 		do
 			str=$str" --add $f $IP:$(($CEPH_PORT+$count))"
 			if [ $overwrite_conf -eq 1 ]; then
-				cat <<EOF >> $conf_fn
+				cat <<EOF >> $conf
 [mon.$f]
         host = $HOSTNAME
         mon data = $CEPH_DEV_DIR/mon.$f
@@ -450,7 +424,7 @@ EOF
                     cmd="mkdir -p $CEPH_DEV_DIR/mon.$f"
                     echo $cmd
                     $cmd
-		    cmd="$CEPH_BIN/ceph-mon --mkfs -c $conf_fn -i $f --monmap=$monmap_fn"
+		    cmd="$CEPH_BIN/ceph-mon --mkfs -c $conf -i $f --monmap=$monmap_fn"
 		    cmd="$cmd --keyring=$keyring_fn"
 		    echo $cmd
 		    $cmd
@@ -474,7 +448,7 @@ if [ "$start_osd" -eq 1 ]; then
     do
 	if [ "$new" -eq 1 ]; then
 	    if [ $overwrite_conf -eq 1 ]; then
-		    cat <<EOF >> $conf_fn
+		    cat <<EOF >> $conf
 [osd.$osd]
         host = $HOSTNAME
 EOF
@@ -500,7 +474,7 @@ fi
 
 # mds
 if [ "$smallmds" -eq 1 ]; then
-    cat <<EOF >> $conf_fn
+    cat <<EOF >> $conf
 [mds]
 	mds log max segments = 2
 	mds cache size = 10000
@@ -515,13 +489,13 @@ if [ "$start_mds" -eq 1 -a "$CEPH_NUM_MDS" -gt 0 ]; then
 	    mkdir -p $CEPH_DEV_DIR/mds.$name
 	    key_fn=$CEPH_DEV_DIR/mds.$name/keyring
 	    if [ $overwrite_conf -eq 1 ]; then
-	    cat <<EOF >> $conf_fn
+	    	cat <<EOF >> $conf
 [mds.$name]
         host = $HOSTNAME
 EOF
 		if [ "$standby" -eq 1 ]; then
 		    mkdir -p $CEPH_DEV_DIR/mds.${name}s
-		    cat <<EOF >> $conf_fn
+		    cat <<EOF >> $conf
        mds standby for rank = $mds
 [mds.${name}s]
         mds standby replay = true
@@ -537,18 +511,6 @@ EOF
                     $SUDO $CEPH_ADM -i $CEPH_DEV_DIR/mds.${name}s/keyring auth add mds.${name}s \
 			mon 'allow *' osd 'allow *' mds 'allow'
 	    fi
-
-        cmd="$CEPH_ADM osd pool create cephfs_data 128"
-        echo $cmd
-        $cmd
-
-        cmd="$CEPH_ADM osd pool create cephfs_metadata 128"
-        echo $cmd
-        $cmd
-
-        cmd="$CEPH_ADM fs new cephfs cephfs_metadata cephfs_data"
-        echo $cmd
-        $cmd
 	fi
 	
 	run 'mds' $CEPH_BIN/ceph-mds -i $name $ARGS $CMDS_ARGS
@@ -568,14 +530,90 @@ EOF
     $cmd
 fi
 
-if [ "$ec" -eq 1 ]; then
-    $SUDO $CEPH_ADM <<EOF
-osd erasure-code-profile set ec-profile m=2 k=1
-osd pool create ec 8 8 erasure ec-profile
-quit
+
+# rgw
+if [ "$start_rgw" -eq 1 ]; then
+    for rgw in `seq 0 $((CEPH_NUM_RGW-1))`
+    do
+	rgwport=$(( $CEPH_RGW_PORT + $rgw ))
+	if [ "$new" -eq 1 ]; then
+	    if [ $overwrite_conf -eq 1 ]; then
+		    dnsname=`hostname -f`
+		    cat <<EOF >> $conf
+[client.radosgw.rgw$rgw]
+        host = $HOSTNAME
+$DAEMONOPTS
+        keyring = $CEPH_OUT_DIR/keyring.client.radosgw.rgw$rgw
+        rgw socket path = $CEPH_OUT_DIR/sock.client.radosgw.rgw$rgw
+        rgw dns name = $dnsname
 EOF
+		    mkdir -p $CEPH_OUT_DIR/htdocs
+		    mkdir -p $CEPH_OUT_DIR/fastcgi_sock
+		    APACHE2_MODULE_PATH="/usr/lib/apache2/modules"
+		    APACHE2_EXTRA_MODULES_NAME="mpm_prefork authz_core"
+		    for module in $APACHE2_EXTRA_MODULES_NAME
+		    do
+			    if [ -f "${APACHE2_MODULE_PATH}/mod_${module}.so" ]; then
+				    APACHE2_EXTRA_MODULES="${APACHE2_EXTRA_MODULES}LoadModule ${module}_module ${APACHE2_MODULE_PATH}/mod_${module}.so
+"
+			    fi 
+		    done
+		    echo $APACHE2_EXTRA_MODULES
+		    cat <<EOF > $CEPH_OUT_DIR/apache.conf
+LoadModule env_module /usr/lib/apache2/modules/mod_env.so
+LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
+LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so
+$APACHE2_EXTRA_MODULES
+
+Listen $rgwport
+ServerName rgwtest.example.com
+
+ServerRoot $CEPH_OUT_DIR
+ErrorLog $CEPH_OUT_DIR/apache.error.log
+LogFormat "%h l %u %t \"%r\" %>s %b \"{Referer}i\" \"%{User-agent}i\"" combined
+CustomLog $CEPH_OUT_DIR/apache.access.log combined
+PidFile $CEPH_OUT_DIR/apache.pid
+DocumentRoot $CEPH_OUT_DIR/htdocs
+FastCgiIPCDir $CEPH_OUT_DIR/fastcgi_sock
+FastCgiExternalServer $CEPH_OUT_DIR/htdocs/rgw.fcgi -socket $CEPH_OUT_DIR/sock.client.radosgw.rgw$rgw
+RewriteEngine On
+
+RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /rgw.fcgi?page=$1&params=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+
+# Set fastcgi environment variables.
+# Note that this is separate from Unix environment variables!
+SetEnv RGW_LOG_LEVEL 20
+SetEnv RGW_PRINT_CONTINUE yes
+SetEnv RGW_SHOULD_LOG yes
+
+<Directory $CEPH_OUT_DIR/htdocs>
+  Options +ExecCGI
+  AllowOverride All
+  SetHandler fastcgi-script
+</Directory>
+
+AllowEncodedSlashes On
+ServerSignature Off
+EOF
+		    $SUDO $CEPH_ADM auth get-or-create client.radosgw.rgw$rgw osd 'allow rwx' mon 'allow r' -o $CEPH_OUT_DIR/keyring.client.radosgw.rgw$rgw
+
+		    #akey=`echo $$ | md5sum | cut -c 1-20`
+		    #skey=`dd if=/dev/urandom of=/tmp/random.$$ bs=1 count=40 2>/dev/null ; base64 < /tmp/random.$$ ; rm /tmp/random.$$`
+		    akey='0555b35654ad1656d804'
+		    skey='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
+		    echo access key $akey
+		    echo secret key $skey
+		    $CEPH_BIN/radosgw-admin user create --uid tester --access-key $akey --secret $skey --display-name 'M. Tester' --email tester at ceph.com -c $conf
+	    fi
+	fi
+	echo start rgw$rgw on http://localhost:$rgwport
+	run 'rgw' $SUDO $CEPH_BIN/radosgw -n client.radosgw.rgw$rgw $ARGS
+	run 'apache2' $SUDO apache2 -f $CEPH_OUT_DIR/apache.conf
+    done
 fi
 
+echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
+
 do_cache() {
     while [ -n "$*" ]; do
 	p="$1"
@@ -609,37 +647,7 @@ EOF
 }
 do_hitsets $hitset
 
-do_rgw()
-{
-    # Start server
-    echo start rgw on http://localhost:$CEPH_RGW_PORT
-    RGWDEBUG=""
-    if [ "$debug" -ne 0 ]; then
-        RGWDEBUG="--debug-rgw=20"
-    fi
-    $CEPH_BIN/radosgw --log-file=${CEPH_OUT_DIR}/rgw.log ${RGWDEBUG} --debug-ms=1
-
-    # Create S3 user
-    local akey='0555b35654ad1656d804'
-    local skey='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
-    echo "setting up user testid"
-    $CEPH_BIN/radosgw-admin user create --uid testid --access-key $akey --secret $skey --display-name 'M. Tester' --email tester at ceph.com -c $conf_fn > /dev/null
-
-    # Create Swift user
-    echo "setting up user tester"
-    $CEPH_BIN/radosgw-admin user create --subuser=tester:testing --display-name=Tester-Subuser --key-type=swift --secret=asdf > /dev/null
-}
-if [ "$start_rgw" -eq 1 ]; then
-    do_rgw
-fi
-
-echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
-
 echo ""
 echo "export PYTHONPATH=./pybind"
 echo "export LD_LIBRARY_PATH=.libs"
 
-if [ "$CEPH_DIR" != "$PWD" ]; then
-    echo "export CEPH_CONF=$conf_fn"
-    echo "export CEPH_KEYRING=$keyring_fn"
-fi
diff --git a/src/yasm-wrapper b/src/yasm-wrapper
index 3695192..57d95de 100755
--- a/src/yasm-wrapper
+++ b/src/yasm-wrapper
@@ -2,22 +2,16 @@
 
 # libtool and yasm do not get along.
 # filter out any crap that libtool feeds us that yasm does not understand.
-echo $0: got $*
 new=""
 touch=""
 while [ -n "$*" ]; do
     case "$1" in
 	-f )
 	    shift
-	    new="$new -f $1"
+	    new="-f $1"
 	    shift
 	    ;;
-	-g* | -f* | -W* | -MD | -MP | -fPIC | -c | -D* | --param* | -O* | -m* | -pipe )
-	    shift
-	    ;;
-	-I )
-	    shift
-	    new="$new -i $1"
+	-g* | -f* | -W* | -MD | -MP | -fPIC | -c | -D* | --param* | -O* | -I* | -m* | -pipe )
 	    shift
 	    ;;
 	-MT )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list